pax_global_header00006660000000000000000000000064133355335740014525gustar00rootroot0000000000000052 comment=d004770e175be4e90c4926eea17d5e8a52e968f7 nextepc-0.3.10/000077500000000000000000000000001333553357400132545ustar00rootroot00000000000000nextepc-0.3.10/.gitignore000066400000000000000000000021321333553357400152420ustar00rootroot00000000000000# compiler output *.o *.lo *.a *.la *.conf .deps .dirstamp .libs # generated files lib/freeDiameter-*/libfdcore/fdd.tab.[chy] lib/freeDiameter-*/libfdcore/lex.fdd.[cl] lib/freeDiameter-*/include/freeDiameter/version.h lib/freeDiameter-*/include/freeDiameter/config.h.in lib/freeDiameter-*/include/freeDiameter/freeDiameter-host.h lib/core/include/core.h support/systemd/nextepc-*.service support/logrotate/nextepc # autotools stamp-h1 config.h config.in config.nice config.log configure aclocal.m4 config.status libtool autom4te.cache build-aux Makefile Makefile.in m4 # autotest test/package.m4 test/atconfig test/testsuite test/testsuite.dir/ test/testsuite.log # executables lib/core/test/testcore test/testvolte test/testepc nextepc-mmed nextepc-pcrfd nextepc-pgwd nextepc-sgwd nextepc-epcd nextepc-hssd # debian debian/*.debhelper.log debian/*.debhelper debian/*.substvars debian/tmp debian/files debian/autoreconf.before debian/autoreconf.after debian/nextepc-core debian/nextepc-mme debian/nextepc-sgw debian/nextepc-pgw debian/nextepc-pcrf debian/nextepc-hss # webui webui/.next/ webui/node_modules/ nextepc-0.3.10/LICENSE000066400000000000000000001033301333553357400142610ustar00rootroot00000000000000 GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are 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. 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. Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. 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 Affero 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. Remote Network Interaction; Use with the GNU General Public License. Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. 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 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 work with which it is combined will remain governed by version 3 of the GNU General Public License. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU Affero 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 Affero 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 Affero 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 Affero 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. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. 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 AGPL, see . nextepc-0.3.10/Makefile.am000066400000000000000000000032331333553357400153110ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in ACLOCAL_AMFLAGS = -I m4 SUBDIRS = lib src support test bin_PROGRAMS = nextepc-mmed nextepc-hssd nextepc-sgwd nextepc-pgwd nextepc-pcrfd nextepc-epcd dist_nextepc_mmed_SOURCES = main.c nextepc_mmed_LDADD = $(top_srcdir)/src/libmme.la dist_nextepc_hssd_SOURCES = main.c nextepc_hssd_LDADD = $(top_srcdir)/src/libhss.la dist_nextepc_sgwd_SOURCES = main.c nextepc_sgwd_LDADD = $(top_srcdir)/src/libsgw.la dist_nextepc_pgwd_SOURCES = main.c nextepc_pgwd_LDADD = $(top_srcdir)/src/libpgw.la dist_nextepc_pcrfd_SOURCES = main.c nextepc_pcrfd_LDADD = $(top_srcdir)/src/libpcrf.la dist_nextepc_epcd_SOURCES = main.c nextepc_epcd_LDADD = $(top_srcdir)/src/libepc.la AM_CPPFLAGS = \ -I$(top_srcdir)/lib/core/include \ -I$(top_srcdir)/src \ $(NULL) install-data-hook: $(MKDIR_P) $(DESTDIR)/$(localstatedir)/log/nextepc $(MKDIR_P) $(DESTDIR)/$(localstatedir)/run/nextepc-mmed $(MKDIR_P) $(DESTDIR)/$(localstatedir)/run/nextepc-sgwd $(MKDIR_P) $(DESTDIR)/$(localstatedir)/run/nextepc-pgwd $(MKDIR_P) $(DESTDIR)/$(localstatedir)/run/nextepc-pcrfd $(MKDIR_P) $(DESTDIR)/$(localstatedir)/run/nextepc-hssd $(MKDIR_P) $(DESTDIR)/$(localstatedir)/run/nextepc-epcd CLEANFILES = -R data debian/test DISTCLEANFILES = $(DIST_ARCHIVES) MAINTAINERCLEANFILES = \ configure config.in \ aclocal.m4 m4/ltsugar.m4 m4/libtool.m4 m4/ltversion.m4 \ m4/lt~obsolete.m4 m4/ltoptions.m4 \ build-aux/ar-lib build-aux/config.guess build-aux/depcomp \ build-aux/ltmain.sh build-aux/test-driver build-aux/compile \ build-aux/config.sub build-aux/missing build-aux/install-sh \ Makefile.in MOSTLYCLEANFILES = core *.stackdump nextepc-0.3.10/README.md000066400000000000000000000074771333553357400145520ustar00rootroot00000000000000What's NextEPC ================ NextEPC is a C-language Open Source implementation of the 3GPP Evolved Packet Core, i.e. the core network of an LTE network. NextEPC provides the MME (Mobility Management Engine), which terminates the S1 interfaces from the eNodeBs cells in the cellular network, and interfaces via S11 to the SGW as well as via S6a to the HSS. NextEPC provides the SGW (Serving Gateway) which is situated between the MME and PGW. It implements the S11 interface to the MME, and the S5 interface to the PGW. NextEPC provides the PGW or PDN-GW (Packet Data Network Gateway) element of the EPC, i.e. the gateway between the EPC and the external packet data network, such as the public Internet. It implements the S5 interface towards the S-GW, the SGi interface towards the Internet, and the S7 interface towards the PCRF. NextEPC provides the HSS (Home Subscriber Server) element of the EPC, i.e. the central database of mobile network subscribers, with their IMSI, MSISDN, cryptographic key materials, service subscription information, etc. It implements the S6a interface towards the MME using the DIAMETER protocol. NextEPC contains the PCRF (Policy and Charging Rules Function), which controls the service quality (QoS) of individual connections and how to account/charge related traffic. It implements the Gx interface towards the PGW using the DIAMETER protocol. Installation ============ * ### MME, SGW, PGW, HSS, and PCRF The NextEPC package is available on the recent versions of Ubuntu. ```bash sudo add-apt-repository ppa:acetcom/nextepc sudo apt-get update sudo apt-get -y install nextepc ``` This will create a virtual network interface named as *pgwtun*. It is automatically removed by uninstalling NextEPC. ```markdown ifconfig pgwtun pgwtun Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:45.45.0.1 P-t-P:45.45.0.1 Mask:255.255.0.0 inet6 addr: fe80::50f6:182c:5aa3:16bb/64 Scope:Link inet6 addr: cafe::1/64 Scope:Global ... ``` The NextEPC service is registered in `systemd` environment, and is started automatically during the installation phase. The service names are *nextepc-mmed*, *nextepc-sgwd*, *nextepc-pgwd*, *nextepc-hssd*, and *nextepc-pcrfd*. You can use the `systemctl` command to control specific services. ```bash sudo systemctl status nextepc-mmed (Check the service status) sudo systemctl stop nextepc-mmed (Stop the service) sudo systemctl disable nextepc-mmed (Will not be started after rebooting) sudo systemctl enable nextepc-mmed (Will be started after rebooting) sudo systemctl start nextepc-mmed (Start the service) sudo systemctl restart nextepc-mmed (Stop and start) ``` * ### Web User Interface ```bash sudo apt-get -y install curl curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - curl -sL http://nextepc.org/static/webui/install | sudo -E bash - ``` The service name is *nextepc-webui*, and it will be running on _http://localhost:3000_. ```bash sudo systemctl start nextepc-webui ``` * ### Uninstall NextEPC ```bash curl -sL http://nextepc.org/static/webui/uninstall | sudo -E bash - sudo apt-get purge nextepc* ``` You may need to remove manually /var/log/nextepc unless it is empty. ```bash sudo rm -Rf /var/log/nextepc ``` ## Documentation If you don't understand something about NextEPC, the [http://nextepc.org](http://nextepc.org/) is a great place to look for answers. ## Support Problem with NextEPC can be filed as [issues](https://github.com/acetcom/nextepc/issues) in this repository. And also, we've created *Discord* workspace for _nextepc_. Use [this link](https://discord.gg/GreNkuc) to get started. ## License NextEPC source files are made available under the terms of the GNU Affero General Public License (GNU AGPLv3). See [this link](http://nextepc.org/docs/nextepc/4-license/) for details. nextepc-0.3.10/acinclude.m4000066400000000000000000000057751333553357400154630ustar00rootroot00000000000000dnl dnl CORE_SUBST(varname) dnl dnl Adds variable with it's value into Makefile, e.g.: dnl CC = gcc dnl AC_DEFUN([CORE_SUBST],[ CORE_VAR_SUBST="$CORE_VAR_SUBST $1" ]) dnl dnl CORE_SUBST_OLD(varname) dnl dnl Same as CORE_SUBST() but also substitutes all @VARNAME@ dnl instances in every file passed to AC_OUTPUT() dnl AC_DEFUN([CORE_SUBST_OLD],[ CORE_SUBST($1) AC_SUBST($1) ]) dnl dnl CORE_CONFIG_NICE(filename) dnl dnl Generates the config.nice file dnl AC_DEFUN([CORE_CONFIG_NICE],[ AC_REQUIRE([AC_PROG_EGREP]) AC_REQUIRE([LT_AC_PROG_SED]) CORE_SUBST_OLD(EGREP) CORE_SUBST_OLD(SED) test -f $1 && mv $1 $1.old rm -f $1.old cat >$1<> $1 fi done echo "'[$]0' \\" >> $1 if test `expr -- [$]0 : "'.*"` = 0; then CONFIGURE_COMMAND="$CONFIGURE_COMMAND '[$]0'" else CONFIGURE_COMMAND="$CONFIGURE_COMMAND [$]0" fi for arg in $ac_configure_args; do if test `expr -- $arg : "'.*"` = 0; then if test `expr -- $arg : "--.*"` = 0; then break; fi echo "'[$]arg' \\" >> $1 CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS '[$]arg'" else if test `expr -- $arg : "'--.*"` = 0; then break; fi echo "[$]arg \\" >> $1 CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS [$]arg" fi done echo '"[$]@"' >> $1 chmod +x $1 CONFIGURE_COMMAND="$CONFIGURE_COMMAND $CONFIGURE_OPTIONS" CORE_SUBST_OLD(CONFIGURE_COMMAND) CORE_SUBST_OLD(CONFIGURE_OPTIONS) ]) AC_DEFUN([AX_CHECK_COMPILE_FLAG], [AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], [AS_VAR_SET(CACHEVAR,[yes])], [AS_VAR_SET(CACHEVAR,[no])]) _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], [m4_default([$2], :)], [m4_default([$3], :)]) AS_VAR_POPDEF([CACHEVAR])dnl ])dnl AX_CHECK_COMPILE_FLAGS # adl_RECURSIVE_EVAL(VALUE, RESULT) # ================================= # Interpolate the VALUE in loop until it doesn't change, # and set the result to $RESULT. # WARNING: It's easy to get an infinite loop with some unsane input. # For example ${datadir} becomes ${datarootdir}, and then ${prefix}/share, and # finally ${prefix} is replaced by the prefix. AC_DEFUN([adl_RECURSIVE_EVAL], [_lcl_receval="$1" $2=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" _lcl_receval_old='' while test "[$]_lcl_receval_old" != "[$]_lcl_receval"; do _lcl_receval_old="[$]_lcl_receval" eval _lcl_receval="\"[$]_lcl_receval\"" done echo "[$]_lcl_receval")`]) nextepc-0.3.10/configure.ac000066400000000000000000000344451333553357400155540ustar00rootroot00000000000000dnl Process this file with autoconf to produce a configure script. dnl dnl This file is free software; as a special exception the author gives dnl unlimited permission to copy and/or distribute it, with or without dnl modifications, as long as this notice is preserved. dnl dnl This program is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. AC_INIT([NextEPC], [0.3.10], [acetcom@gmail.com]) AC_SUBST(LIBVERSION) LIBVERSION=1:0:0 CORE_CONFIG_NICE(config.nice) dnl Must come before AM_INIT_AUTOMAKE. AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_TESTDIR(test) AM_INIT_AUTOMAKE([1.10 -Wall -Werror foreign subdir-objects]) # Where to generate output; srcdir location. AC_CONFIG_HEADERS([config.h:config.in])dnl Keep filename to 8.3 for MS-DOS. AC_CONFIG_SRCDIR([main.c]) AC_CANONICAL_HOST LO_DEV="lo0" case $host in *linux*) OSDIR="unix" OSCPPFLAGS="-DLINUX=1" IPFW_CPPFLAGS="-DNEED_SYSCTLBYNAME -DNEED_SIN_LEN" LO_DEV="lo" ;; *-apple-darwin*) OSDIR="unix" OSCPPFLAGS="-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK" ;; *) OSDIR="unix" ;; esac AC_SUBST(OSCPPFLAGS) AC_SUBST(OSDIR) AC_SUBST(IPFW_CPPFLAGS) AC_SUBST(LO_DEV) AH_TOP([ #ifndef __NEXTEPC_CONFIG_H__ #define __NEXTEPC_CONFIG_H__ /* need this, because some autoconf tests rely on this (e.g. stpcpy) * and it should be used for new programs */ #define _DEFAULT_SOURCE 1 #define _BSD_SOURCE 1 ]) AH_BOTTOM([ #endif /* __NEXTEPC_CONFIG_H__ */ ]) AH_VERBATIM([_REENTRANT], [/* To allow the use of core in multithreaded programs we have to use special features from the library. */ #ifndef _REENTRANT # define _REENTRANT 1 #endif ]) dnl kernel style compile messages m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) dnl Checks CC and freinds AC_PROG_MAKE_SET AC_PROG_MKDIR_P AC_PROG_CC AM_PROG_CC_C_O AC_PROG_INSTALL AM_PROG_AR LT_INIT([pic-only disable-static]) AC_PATH_PROG(PKG_CONFIG, pkg-config, no) if test "x$PKG_CONFIG" = "xno"; then AC_MSG_ERROR([You need to install pkg-config]) fi PKG_PROG_PKG_CONFIG([0.20]) dnl Checks for compile flag AX_CHECK_COMPILE_FLAG([-Wno-unused-result], [CFLAGS="$CFLAGS -Wno-unused-result"]) dnl Checks for pointer size AC_CHECK_SIZEOF(void*, 4) dnl Checks for integer size AC_CHECK_SIZEOF(char, 1) AC_CHECK_SIZEOF(int, 4) AC_CHECK_SIZEOF(long, 4) AC_CHECK_SIZEOF(short, 2) AC_CHECK_SIZEOF(long long, 8) if test "$ac_cv_sizeof_short" = "2"; then short_value=short fi if test "$ac_cv_sizeof_int" = "4"; then int_value=int fi # Now we need to find what c_int64_t (sizeof == 8) will be. # The first match is our preference. if test "$ac_cv_sizeof_int" = "8"; then int64_literal='#define C_INT64_C(val) (val)' uint64_literal='#define C_UINT64_C(val) (val##U)' int64_t_fmt='#define C_INT64_T_FMT "d"' uint64_t_fmt='#define C_UINT64_T_FMT "u"' uint64_t_hex_fmt='#define C_UINT64_T_HEX_FMT "x"' int64_value="int" long_value=int int64_strfn="strtoi" elif test "$ac_cv_sizeof_long" = "8"; then int64_literal='#define C_INT64_C(val) (val##L)' uint64_literal='#define C_UINT64_C(val) (val##UL)' int64_t_fmt='#define C_INT64_T_FMT "ld"' uint64_t_fmt='#define C_UINT64_T_FMT "lu"' uint64_t_hex_fmt='#define C_UINT64_T_HEX_FMT "lx"' int64_value="long" long_value=long int64_strfn="strtol" elif test "$ac_cv_sizeof_long_long" = "8"; then int64_literal='#define C_INT64_C(val) (val##LL)' uint64_literal='#define C_UINT64_C(val) (val##ULL)' # Linux, Solaris, FreeBSD all support ll with printf. # BSD 4.4 originated 'q'. Solaris is more popular and # doesn't support 'q'. Solaris wins. Exceptions can # go to the OS-dependent section. int64_t_fmt='#define C_INT64_T_FMT "lld"' uint64_t_fmt='#define C_UINT64_T_FMT "llu"' uint64_t_hex_fmt='#define C_UINT64_T_HEX_FMT "llx"' int64_value="long long" long_value="long long" int64_strfn="strtoll" elif test "$ac_cv_sizeof_longlong" = "8"; then int64_literal='#define C_INT64_C(val) (val##LL)' uint64_literal='#define C_UINT64_C(val) (val##ULL)' int64_t_fmt='#define C_INT64_T_FMT "qd"' uint64_t_fmt='#define C_UINT64_T_FMT "qu"' uint64_t_hex_fmt='#define C_UINT64_T_HEX_FMT "qx"' int64_value="__int64" long_value="__int64" int64_strfn="strtoll" else # int64_literal may be overriden if your compiler thinks you have # a 64-bit value but CORE does not agree. AC_ERROR([could not detect a 64-bit integer type]) fi AC_SUBST(short_value) AC_SUBST(int_value) AC_SUBST(long_value) AC_SUBST(int64_value) AC_SUBST(int64_t_fmt) AC_SUBST(uint64_t_fmt) AC_SUBST(uint64_t_hex_fmt) AC_SUBST(int64_literal) AC_SUBST(uint64_literal) AC_CHECK_SIZEOF(pid_t, 8) if test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_short"; then pid_t_fmt='#define C_PID_T_FMT "hd"' elif test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_int"; then pid_t_fmt='#define C_PID_T_FMT "d"' elif test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_long"; then pid_t_fmt='#define C_PID_T_FMT "ld"' elif test "$ac_cv_sizeof_pid_t" = "$ac_cv_sizeof_long_long"; then pid_t_fmt='#define C_PID_T_FMT APR_INT64_T_FMT' else pid_t_fmt='#error Can not determine the proper size for pid_t' fi case $host in *-solaris*) if test "$ac_cv_sizeof_long" = "8"; then pid_t_fmt='#define C_PID_T_FMT "d"' else pid_t_fmt='#define C_PID_T_FMT "ld"' fi ;; esac AC_SUBST(pid_t_fmt) AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], [`echo $PACKAGE_VERSION | $SED 's/^\([[^\.]]\+\)\.\([[^\.]]\+\)\.\([[^\.]]\+\).*/\1/'`], [Major version of this package]) AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], [`echo $PACKAGE_VERSION | $SED 's/^\([[^\.]]\+\)\.\([[^\.]]\+\)\.\([[^\.]]\+\).*/\2/'`], [Minor version of this package]) AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], [`echo $PACKAGE_VERSION | $SED 's/^\([[^\.]]\+\)\.\([[^\.]]\+\)\.\([[^\.]]\+\).*/\3/'`], [Patch version of this package]) ################################## #### Checks for Directories. ##### ################################## adl_RECURSIVE_EVAL(["${bindir}"], [BIN_DIR]) adl_RECURSIVE_EVAL(["${libdir}"], [LIB_DIR]) adl_RECURSIVE_EVAL(["${sysconfdir}"], [SYSCONF_DIR]) adl_RECURSIVE_EVAL(["${localstatedir}"], [LOCALSTATE_DIR]) AC_SUBST(BIN_DIR) AC_SUBST(LIB_DIR) AC_SUBST(SYSCONF_DIR) AC_SUBST(LOCALSTATE_DIR) ################################## #### Checks for header files. #### ################################## AC_HEADER_STDC AC_CHECK_HEADERS( \ arpa/inet.h \ ctype.h \ errno.h \ fcntl.h \ ifaddrs.h \ limits.h \ netdb.h \ pthread.h \ regex.h \ semaphore.h \ signal.h \ stdarg.h \ stdio.h \ stdint.h \ stdlib.h \ string.h \ strings.h \ time.h \ unistd.h \ net/if_dl.h \ net/if.h \ netinet/ether.h \ netinet/in.h \ netinet/in_systm.h \ netinet/udp.h \ netinet/tcp.h \ netinet/sctp.h \ usrsctp.h \ sys/ioctl.h \ sys/param.h \ sys/socket.h \ sys/stat.h \ sys/syslimits.h \ sys/types.h \ sys/time.h \ sys/wait.h \ sys/uio.h \ ) AC_CHECK_HEADERS(netinet/ip.h netinet/ip6.h net/route.h,,,[[ #include #if HAVE_SYS_SOCKET_H #include #endif #include #if HAVE_NETINET_IN_SYSTM_H #include #endif ]]) AC_CHECK_HEADERS(netinet/ip_icmp.h netinet/icmp6.h,,,[[ #include #if HAVE_SYS_SOCKET_H #include #endif #include #if HAVE_NETINET_IN_SYSTM_H #include #endif #include ]]) ########################################## #### Checks for typedefs, structures, #### #### and compiler characteristics. #### ########################################## AC_C_BIGENDIAN AC_CHECK_MEMBERS([struct tm.tm_gmtoff, struct tm.__tm_gmtoff],,,[ #include #include ]) AC_CHECK_MEMBER(struct sockaddr.sa_len, AC_DEFINE(HAVE_SA_LEN, 1, [Define this if your stack has sa_len in sockaddr struct.]),, [#ifdef HAVE_SYS_TYPES_H #include #endif #include ]) AC_CHECK_MEMBER(struct sockaddr_in.sin_len, AC_DEFINE(HAVE_SIN_LEN, 1, [Define this if your IPv4 has sin_len in sockaddr_in struct.]),, [#ifdef HAVE_SYS_TYPES_H #include #endif #include ]) AC_CHECK_MEMBER(struct sockaddr_in6.sin6_len, AC_DEFINE(HAVE_SIN6_LEN, 1, [Define this if your IPv6 has sin6_len in sockaddr_in6 struct.]),, [#ifdef HAVE_SYS_TYPES_H #include #endif #include ]) AC_CHECK_MEMBER(struct sockaddr_conn.sconn_len, AC_DEFINE(HAVE_SCONN_LEN, 1, [Define this if your userland stack has sconn_len in sockaddr_conn struct.]),, [#include "usrsctplib/usrsctp.h"]) AC_MSG_CHECKING(for socklen_t) AC_TRY_COMPILE([#ifdef HAVE_SYS_TYPES_H #include #endif #include ], [socklen_t x; x = 1; return ((int)x);], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(int) AC_DEFINE(socklen_t, int, [Define a type for socklen_t.])]) AC_CHECK_FILE(/dev/random, AC_DEFINE([HAVE_DEV_RANDOM], [1], [Define to 1 if you have the /dev/random file.])) AC_CACHE_CHECK([whether the compiler provides atomic builtins], [ap_cv_atomic_builtins], [AC_TRY_RUN([ int main() { unsigned long val = 1010, tmp, *mem = &val; if (__sync_fetch_and_add(&val, 1010) != 1010 || val != 2020) return 1; tmp = val; if (__sync_fetch_and_sub(mem, 1010) != tmp || val != 1010) return 1; if (__sync_sub_and_fetch(&val, 1010) != 0 || val != 0) return 1; tmp = 3030; if (__sync_val_compare_and_swap(mem, 0, tmp) != 0 || val != tmp) return 1; if (__sync_lock_test_and_set(&val, 4040) != 3030) return 1; mem = &tmp; if (__sync_val_compare_and_swap(&mem, &tmp, &val) != &tmp) return 1; __sync_synchronize(); if (mem != &val) return 1; return 0; }], [ap_cv_atomic_builtins=yes], [ap_cv_atomic_builtins=no], [ap_cv_atomic_builtins=no])]) if test "$ap_cv_atomic_builtins" = "yes"; then AC_DEFINE(HAVE_ATOMIC_BUILTINS, 1, [Define if compiler provides atomic builtins]) fi ####################################### #### Checks for library functions. #### ####################################### AC_FUNC_VPRINTF AC_CHECK_FUNCS(\ atexit \ gettimeofday \ memmove \ strerror \ inet_ntop inet_pton inet_aton \ sigaction sigwait sigsuspend \ stpcpy strcasecmp strtoul stricmp \ writev \ utime utimes sem_timedwait \ pthread_yield sched_yield \ getenv putenv setenv unsetenv \ ) AC_SEARCH_LIBS(gethostbyname, nsl) AC_SEARCH_LIBS(gethostname, nsl) AC_SEARCH_LIBS(socket, socket) AC_SEARCH_LIBS(pthread_barrier_wait, pthread) AC_SEARCH_LIBS(gnutls_global_set_log_level, gnutls) AC_SEARCH_LIBS([sctp_sendmsg], [sctp], [have_sctp_lib=yes], [have_sctp_lib=no]) if test x$have_sctp_lib == xno; then AC_SEARCH_LIBS([usrsctp_init], [usrsctp], [have_usrsctp_lib=yes], [have_usrsctp_lib=no]) if test x$have_usrsctp_lib == xno; then AC_MSG_ERROR([You must install the SCTP libraries and development headers to enable SCTP support.]) else AC_DEFINE([USE_USRSCTP], [1], [Define to 1 if you have the usrsctp library.]) fi fi AM_CONDITIONAL([USRSCTP], [test x$have_usrsctp_lib = xyes]) PKG_CHECK_MODULES([YAML], yaml-0.1 >= 0.1.4) PKG_CHECK_MODULES([MONGOC], libmongoc-1.0 >= 1.3.1) FREEDIAMETER_DIR=freeDiameter-1.2.1 AC_SUBST(FREEDIAMETER_DIR) ##################### #### Conclusion. #### ##################### AC_CONFIG_SUBDIRS([lib/freeDiameter-1.2.1]) AC_CONFIG_FILES([lib/core/include/core.h]) AC_CONFIG_FILES([lib/core/src/Makefile]) AC_CONFIG_FILES([lib/core/test/Makefile]) AC_CONFIG_FILES([lib/core/Makefile]) AC_CONFIG_FILES([lib/s1ap/asn1c/Makefile]) AC_CONFIG_FILES([lib/s1ap/Makefile]) AC_CONFIG_FILES([lib/nas/Makefile]) AC_CONFIG_FILES([lib/fd/Makefile]) AC_CONFIG_FILES([lib/gtp/Makefile]) AC_CONFIG_FILES([lib/ipfw/Makefile]) AC_CONFIG_FILES([lib/Makefile]) AC_CONFIG_FILES([src/common/Makefile]) AC_CONFIG_FILES([src/mme/Makefile]) AC_CONFIG_FILES([src/hss/Makefile]) AC_CONFIG_FILES([src/sgw/Makefile]) AC_CONFIG_FILES([src/pgw/Makefile]) AC_CONFIG_FILES([src/pcrf/Makefile]) AC_CONFIG_FILES([src/Makefile]) AC_CONFIG_FILES([support/config/nextepc.conf]) AC_CONFIG_FILES([support/config/mme.conf]) AC_CONFIG_FILES([support/config/sgw.conf]) AC_CONFIG_FILES([support/config/pgw.conf]) AC_CONFIG_FILES([support/config/hss.conf]) AC_CONFIG_FILES([support/config/pcrf.conf]) AC_CONFIG_FILES([support/config/Makefile]) AC_CONFIG_FILES([support/freeDiameter/mme.conf]) AC_CONFIG_FILES([support/freeDiameter/pgw.conf]) AC_CONFIG_FILES([support/freeDiameter/hss.conf]) AC_CONFIG_FILES([support/freeDiameter/pcrf.conf]) AC_CONFIG_FILES([support/freeDiameter/Makefile]) AC_CONFIG_FILES([support/systemd/nextepc-mmed.service]) AC_CONFIG_FILES([support/systemd/nextepc-sgwd.service]) AC_CONFIG_FILES([support/systemd/nextepc-pgwd.service]) AC_CONFIG_FILES([support/systemd/nextepc-hssd.service]) AC_CONFIG_FILES([support/systemd/nextepc-pcrfd.service]) AC_CONFIG_FILES([support/systemd/Makefile]) AC_CONFIG_FILES([support/logrotate/nextepc]) AC_CONFIG_FILES([support/logrotate/Makefile]) AC_CONFIG_FILES([support/newsyslog/nextepc.conf]) AC_CONFIG_FILES([support/newsyslog/Makefile]) AC_CONFIG_FILES([support/Makefile]) AC_CONFIG_FILES([test/sample.conf]) AC_CONFIG_FILES([test/sample-volte.conf]) AC_CONFIG_FILES([test/Makefile]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT echo " NextEPC configuration -------------------- version : ${PACKAGE_VERSION} host : ${host} source code location : ${srcdir} compiler : ${CC} compiler flags : ${CFLAGS} ${YAML_CFLAGS} ${MONGOC_CFLAGS} linker flags : ${LDFLAGS} ${LIBS} ${YAML_LIBS} ${MONGOC_LIBS} bin directory : ${BIN_DIR} lib directory : ${LIB_DIR}/nextepc config directory : ${SYSCONF_DIR}/nextepc log directory : ${LOCALSTATE_DIR}/log/nextepc " nextepc-0.3.10/debian/000077500000000000000000000000001333553357400144765ustar00rootroot00000000000000nextepc-0.3.10/debian/changelog000066400000000000000000000223071333553357400163540ustar00rootroot00000000000000nextepc (0.3.10~xenial) xenial; urgency=medium * Bug Fixed -- Sukchan Lee Fri, 17 Aug 2018 04:28:38 +0000 nextepc (0.3.10~bionic) bionic; urgency=medium * Bug Fixed -- Sukchan Lee Fri, 17 Aug 2018 04:21:39 +0000 nextepc (0.3.9~artful) artful; urgency=medium * Bug Fixed -- Sukchan Lee Sun, 03 Jun 2018 01:40:44 +0000 nextepc (0.3.9~xenial) xenial; urgency=medium * Bug Fixed -- Sukchan Lee Sun, 03 Jun 2018 01:39:33 +0000 nextepc (0.3.9~bionic) bionic; urgency=medium * Bug Fixed -- Sukchan Lee Sun, 03 Jun 2018 01:38:15 +0000 nextepc (0.3.8-1~bionic) bionic; urgency=medium * Bug Fixed -- Sukchan Lee Sat, 05 May 2018 22:37:45 +0900 nextepc (0.3.8~bionic) bionic; urgency=medium * Bug Fixed -- Sukchan Lee Sat, 05 May 2018 21:48:55 +0900 nextepc (0.3.8~xenial) xenial; urgency=medium * Bug Fixed -- Sukchan Lee Sun, 29 Apr 2018 21:47:25 +0900 nextepc (0.3.8~artful) artful; urgency=medium * Bug Fixed -- Sukchan Lee Sun, 29 Apr 2018 21:45:36 +0900 nextepc (0.3.7~artful) artful; urgency=medium * Buf Fixed -- Sukchan Lee Sat, 14 Apr 2018 15:02:05 +0900 nextepc (0.3.7~xenial) xenial; urgency=medium * Bug Fixed -- Sukchan Lee Sat, 14 Apr 2018 14:59:37 +0900 nextepc (0.3.6~xenial) xenial; urgency=medium * Bug Fixed -- Sukchan Lee Wed, 21 Mar 2018 08:02:52 +0000 nextepc (0.3.6~artful) artful; urgency=medium * Bug Fixed -- Sukchan Lee Wed, 21 Mar 2018 08:00:12 +0000 nextepc (0.3.5~xenial) xenial; urgency=medium * Bug Fixed -- Sukchan Lee Tue, 06 Mar 2018 12:41:53 +0000 nextepc (0.3.5~artful) artful; urgency=medium * Bug Fixed -- Sukchan Lee Tue, 06 Mar 2018 12:40:07 +0000 nextepc (0.3.4-1~xenial) xenial; urgency=medium * Bug Fixed -- Sukchan Lee Thu, 22 Feb 2018 02:16:08 +0000 nextepc (0.3.4-1~artful) artful; urgency=medium * Bug Fixed -- Sukchan Lee Thu, 22 Feb 2018 02:14:43 +0000 nextepc (0.3.4~xenial) xenial; urgency=medium * Bug Fixed -- Sukchan Lee Thu, 22 Feb 2018 02:09:23 +0000 nextepc (0.3.4~artful) artful; urgency=medium * Bug Fixed -- Sukchan Lee Thu, 22 Feb 2018 01:33:04 +0000 nextepc (0.3.3-3~artful) artful; urgency=medium * Support Docker -- Sukchan Lee Tue, 13 Feb 2018 04:47:43 +0000 nextepc (0.3.3-3~xenial) xenial; urgency=medium * Support Docker -- Sukchan Lee Tue, 13 Feb 2018 04:44:47 +0000 nextepc (0.3.3-2~xenial) xenial; urgency=medium * Minor bug fixes -- Sukchan Lee Sun, 11 Feb 2018 16:08:14 +0000 nextepc (0.3.3-2~artful) artful; urgency=medium * Minor bug fixes -- Sukchan Lee Sun, 11 Feb 2018 16:05:44 +0000 nextepc (0.3.3-1~xenial) xenial; urgency=medium * Minor bug fixes -- Sukchan Lee Sun, 11 Feb 2018 15:39:37 +0000 nextepc (0.3.3-1~artful) artful; urgency=medium * Minor bug fixes -- Sukchan Lee Sun, 11 Feb 2018 15:33:57 +0000 nextepc (0.3.3~artful) artful; urgency=medium * Minor bug fixes -- Sukchan Lee Sun, 11 Feb 2018 15:05:08 +0000 nextepc (0.3.3~xenial) xenial; urgency=medium * Minor bug fixes -- Sukchan Lee Sun, 11 Feb 2018 15:00:24 +0000 nextepc (0.3.2~zesty) zesty; urgency=medium * VoLTE Support -- Sukchan Lee Wed, 24 Jan 2018 08:06:32 +0000 nextepc (0.3.2~xenial) xenial; urgency=medium * VoLTE Support -- Sukchan Lee Wed, 24 Jan 2018 08:03:41 +0000 nextepc (0.3.2~artful) artful; urgency=medium * VoLTE Support -- Sukchan Lee Wed, 24 Jan 2018 08:00:24 +0000 nextepc (0.3.1-1~zesty) zesty; urgency=medium * IPv6 Support (Linux Only) * Change Configuration File (JSON -> YAML) -- Sukchan Lee Sun, 31 Dec 2017 22:10:52 +0000 nextepc (0.3.1-1~xenial) xenial; urgency=medium * IPv6 Support (Linux Only) * Change Configuration File (JSON -> YAML) -- Sukchan Lee Sun, 31 Dec 2017 22:09:26 +0000 nextepc (0.3.1-1~artful) artful; urgency=medium * IPv6 Support (Linux Only) * Change Configuration File (JSON -> YAML) -- Sukchan Lee Sun, 31 Dec 2017 22:04:50 +0000 nextepc (0.3-3~zesty) zesty; urgency=medium * IPv6 Support (Linux Only) * Change Configuration File (JSON -> YAML) -- Sukchan Lee Mon, 18 Dec 2017 10:18:26 +0000 nextepc (0.3-3~xenial) xenial; urgency=medium * IPv6 Support (Linux Only) * Change Configuration File (JSON -> YAML) -- Sukchan Lee Mon, 18 Dec 2017 10:16:51 +0000 nextepc (0.3-3~artful) artful; urgency=medium * IPv6 Support (Linux Only) * Change Configuration File (JSON -> YAML) -- Sukchan Lee Mon, 18 Dec 2017 10:15:18 +0000 nextepc (0.3-2~artful) artful; urgency=medium * Fix the bug reboot scenario -- Sukchan Lee Mon, 18 Dec 2017 07:06:52 +0000 nextepc (0.3-1~artful) artful; urgency=medium * IPv6 Support (Linux Only) * Change Configuration File (JSON -> YAML) -- Sukchan Lee Mon, 18 Dec 2017 05:07:31 +0000 nextepc (0.2-6~artful2) artful; urgency=medium * postrm script is improved to purge package completely. -- Sukchan Lee Fri, 03 Nov 2017 02:30:53 +0000 nextepc (0.2-6~zesty2) zesty; urgency=medium * postrm script is improved to purge package completely. -- Sukchan Lee Fri, 03 Nov 2017 02:30:08 +0000 nextepc (0.2-6~xenial2) xenial; urgency=medium * postrm script is improved to purge package completely. -- Sukchan Lee Fri, 03 Nov 2017 02:28:41 +0000 nextepc (0.2-6~zesty) zesty; urgency=medium * postrm script is improved to purge package completely. -- Sukchan Lee Fri, 03 Nov 2017 02:25:37 +0000 nextepc (0.2-6~xenial) xenial; urgency=medium * postrm script is improved to purge package completely. -- Sukchan Lee Fri, 03 Nov 2017 02:23:54 +0000 nextepc (0.2-6~artful) artful; urgency=medium * postrm script is improved to purge package completely. -- Sukchan Lee Fri, 03 Nov 2017 02:00:14 +0000 nextepc (0.2-5~artful) artful; urgency=medium * Relase 0.2 -- Sukchan Lee Thu, 02 Nov 2017 07:13:23 +0000 nextepc (0.2-5~zesty) zesty; urgency=medium * Relase 0.2 -- Sukchan Lee Thu, 02 Nov 2017 07:12:17 +0000 nextepc (0.2-5~xenial) xenial; urgency=medium * Release 0.2 -- Sukchan Lee Thu, 02 Nov 2017 07:11:16 +0000 nextepc (0.2-4~xenial2) xenial; urgency=medium * Fix the bug nextepc-pgwd post install script -- Sukchan Lee Tue, 31 Oct 2017 14:07:54 +0000 nextepc (0.2-4~artful) artful; urgency=medium * Fix the bug nextepc-pgwd post install script -- Sukchan Lee Tue, 31 Oct 2017 14:06:31 +0000 nextepc (0.2-4~zesty) zesty; urgency=medium * Fix the bug nextepc-pgwd post install script -- Sukchan Lee Tue, 31 Oct 2017 14:04:23 +0000 nextepc (0.2-4~xenial) xenial; urgency=medium * Fix the bug nextepc-pgwd post install script -- Sukchan Lee Tue, 31 Oct 2017 14:01:58 +0000 nextepc (0.2-3~artful) artful; urgency=medium * MongoDB re-connect using systemd -- Sukchan Lee Tue, 31 Oct 2017 12:10:18 +0000 nextepc (0.2-3~zesty) zesty; urgency=medium * MongoDB re-connect using systemd -- Sukchan Lee Tue, 31 Oct 2017 12:07:36 +0000 nextepc (0.2-3~xenial) xenial; urgency=medium * MongoDB re-connect using systemd -- Sukchan Lee Tue, 31 Oct 2017 12:00:16 +0000 nextepc (0.2-2~artful) artful; urgency=medium * Fix PGW installation -- Sukchan Lee Tue, 31 Oct 2017 05:02:03 +0000 nextepc (0.2-2~xenial) xenial; urgency=medium * Fix PGW installation -- Sukchan Lee Tue, 31 Oct 2017 03:16:02 +0000 nextepc (0.2-1~artful2) artful; urgency=medium * Fix the compile error [-Werror=pointer] -- Sukchan Lee Mon, 30 Oct 2017 13:14:42 +0000 nextepc (0.2-1~artful1) artful; urgency=medium * Remove mongodb build-dependancy for Ubuntu 17.10(i386) -- Sukchan Lee Mon, 30 Oct 2017 12:46:58 +0000 nextepc (0.2-1~artful) artful; urgency=medium * Ubuntu 17.10(amd64) * Currently, `mongodb` is not available in Ubuntu 17.10(i386) -- Sukchan Lee Mon, 30 Oct 2017 06:50:47 +0000 nextepc (0.2-1~zesty) zesty; urgency=medium * Ubuntu 17.04 -- Sukchan Lee Mon, 30 Oct 2017 06:47:55 +0000 nextepc (0.2-1~xenial) xenial; urgency=medium * Add matapackage * dh_overide_auto_test is re-enabled -- Sukchan Lee Mon, 30 Oct 2017 03:48:39 +0000 nextepc (0.1.1) UNRELEASED; urgency=medium * Initial release. -- Harald Welte Tue, 17 Oct 2017 08:19:54 +0200 nextepc-0.3.10/debian/compat000066400000000000000000000000021333553357400156740ustar00rootroot000000000000009 nextepc-0.3.10/debian/control000066400000000000000000000114251333553357400161040ustar00rootroot00000000000000Source: nextepc Maintainer: Harald Welte Section: net Priority: optional Build-Depends: debhelper (>= 9), autotools-dev, pkg-config, git, dh-autoreconf, dh-systemd, flex, bison, libsctp-dev, libgnutls28-dev, libgcrypt-dev, libssl-dev, libidn11-dev, libmongoc-dev, libbson-dev, libyaml-dev Standards-Version: 3.9.6 Vcs-Browser: https://github.com/acetcom/nextepc Vcs-Git: git://github.com/acetcom/nextepc Homepage: http://nextepc.org/ Package: nextepc-core Architecture: any Multi-Arch: same Depends: ${shlibs:Depends}, ${misc:Depends} Description: Open Source based 3GPP EPC (Shared Files) NextEPC is a C-language Open Source implementation of the 3GPP Evolved Packet Core, i.e. the core network of an LTE network. . This package contains some core libraries/plugins required by the other binary packages such as nextepc-{mme,sgw,pgw,pcrf,hss}. Package: nextepc-mme Architecture: any Multi-Arch: same Depends: ${shlibs:Depends}, ${misc:Depends}, nextepc-core (= ${binary:Version}) Description: Open Source based 3GPP EPC MME (Mobility Management Entity) NextEPC is a C-language Open Source implementation of the 3GPP Evolved Packet Core, i.e. the core network of an LTE network. . This package provides the MME (Mobility Management Engine), which terminates the S1 interfaces from the eNodeBs cells in the cellular network, and interfaces via S11 to the SGW as well as via S6a to the HSS. Package: nextepc-sgw Architecture: any Multi-Arch: same Depends: ${shlibs:Depends}, ${misc:Depends}, nextepc-core (= ${binary:Version}) Description: Open Source based 3GPP EPC SGW (Serving Gateway) NextEPC is a C-language Open Source implementation of the 3GPP Evolved Packet Core, i.e. the core network of an LTE network. . This package provides the SGW (Serving Gateway) which is situated between the MME and PGW. It implements the S11 interface to the MME, and the S5 interface to the PGW. Package: nextepc-pgw Architecture: any Multi-Arch: same Depends: ${shlibs:Depends}, ${misc:Depends}, udev, nextepc-core (= ${binary:Version}) Description: Open Source based 3GPP EPC PGW (Packet Data Network Gateway) NextEPC is a C-language Open Source implementation of the 3GPP Evolved Packet Core, i.e. the core network of an LTE network. . This package provides the PGW or PDN-GW (Packet Data Network Gateway) element of the EPC, i.e. the gateway between the EPC and the external packet data network, such as the public Internet. It implements the S5 interface towards the S-GW, the SGi interface towards the Internet, and the S7 interface towards the PCRF. Package: nextepc-pcrf Architecture: any Multi-Arch: same Depends: ${shlibs:Depends}, ${misc:Depends}, mongodb, nextepc-core (= ${binary:Version}) Description: Open Source based 3GPP EPC PCRF (Policy and Charging Rules Function) NextEPC is a C-language Open Source implementation of the 3GPP Evolved Packet Core, i.e. the core network of an LTE network. . This package contains the PCRF (Policy and Charging Rules Function), which controls the service quality (QoS) of individual connections and how to account/charge related traffic. It implements the Gx interface towards the PGW using the DIAMETER protocol. Package: nextepc-hss Architecture: any Multi-Arch: same Depends: ${shlibs:Depends}, ${misc:Depends}, mongodb, nextepc-core (= ${binary:Version}) Description: Open Source based 3GPP EPC HSS (Home Subscriber Server) NextEPC is a C-language Open Source implementation of the 3GPP Evolved Packet Core, i.e. the core network of an LTE network. . This package provides the HSS (Home Subscriber Server) element of the EPC, i.e. the central database of mobile network subscribers, with their IMSI, MSISDN, cryptographic key materials, service subscription information, etc. It implements the S6a interface towards the MME using the DIAMETER protocol. Package: nextepc Architecture: any Multi-Arch: same Depends: ${shlibs:Depends}, ${misc:Depends}, mongodb, nextepc-core (= ${binary:Version}), nextepc-mme (= ${binary:Version}), nextepc-sgw (= ${binary:Version}), nextepc-pgw (= ${binary:Version}), nextepc-hss (= ${binary:Version}), nextepc-pcrf (= ${binary:Version}) Description: Open Source based 3GPP EPC (metapackage) NextEPC is a C-language Open Source implementation of the 3GPP Evolved Packet Core, i.e. the core network of an LTE network. . This is a metapackage that depends on all the nextepc parts. (MME, SGW, PGW, HSS, PCRF) nextepc-0.3.10/debian/copyright000066400000000000000000000037541333553357400164420ustar00rootroot00000000000000Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: nextepc Source: https://github.com/acetcom/nextepc Files: * Copyright: 2017 NextEPC Group License: AGPL-3 Files: lib/freeDiameter-1.2.1/* Copyright: 2008-2011, WIDE Project and NICT License: BSD-3-clause Files: debian/* Copyright: 2017 Harald Welte License: GPL-3 License: GPL-3 This package 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; version 3 of the License . 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 . . On Debian systems, the complete text of the GNU General Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". License: BSD-3-clause Software License Agreement (BSD License) . Copyright (c) 2008-2011, WIDE Project and NICT All rights reserved. . Redistribution and use of this software in source and binary forms, with or without modification, are· permitted provided that the following conditions are met: . * Redistributions of source code must retain the above· copyright notice, this list of conditions and the· following disclaimer. ··· * 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. . * Neither the name of the WIDE Project or NICT nor the· names of its contributors may be used to endorse or· promote products derived from this software without· specific prior written permission of WIDE Project and· NICT. nextepc-0.3.10/debian/nextepc-core.install000066400000000000000000000002141333553357400204570ustar00rootroot00000000000000usr/lib/*/nextepc/* var/log/nextepc etc/nextepc/nextepc.conf etc/nextepc/freeDiameter/cacert.pem support/logrotate/nextepc /etc/logrotate.d nextepc-0.3.10/debian/nextepc-core.postinst000066400000000000000000000024771333553357400207110ustar00rootroot00000000000000#!/bin/sh # postinst script for nextepc # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in configure) # create a nextepc group and user if ! getent passwd nextepc >/dev/null; then adduser --system --disabled-password --disabled-login \ --home /var/run/nextepc --no-create-home \ --quiet --group nextepc fi for dir in /var/log/nextepc; do if ! dpkg-statoverride --list "$dir" >/dev/null 2>&1; then dpkg-statoverride --update --add nextepc nextepc 0755 "$dir" fi done ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 nextepc-0.3.10/debian/nextepc-core.postrm000066400000000000000000000020261333553357400203400ustar00rootroot00000000000000#!/bin/sh # postrm script for nextepc-core # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `purge' # * `upgrade' # * `failed-upgrade' # * `abort-install' # * `abort-install' # * `abort-upgrade' # * `disappear' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in purge) rm -f /var/log/nextepc/*.log || true rmdir /var/log/nextepc || true ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 nextepc-0.3.10/debian/nextepc-hss.install000066400000000000000000000003171333553357400203300ustar00rootroot00000000000000usr/bin/nextepc-hssd etc/nextepc/freeDiameter/hss.conf etc/nextepc/freeDiameter/hss.cert.pem etc/nextepc/freeDiameter/hss.key.pem etc/nextepc/hss.conf support/systemd/nextepc-hssd.service lib/systemd/system nextepc-0.3.10/debian/nextepc-mme.install000066400000000000000000000003171333553357400203110ustar00rootroot00000000000000usr/bin/nextepc-mmed etc/nextepc/freeDiameter/mme.conf etc/nextepc/freeDiameter/mme.cert.pem etc/nextepc/freeDiameter/mme.key.pem etc/nextepc/mme.conf support/systemd/nextepc-mmed.service lib/systemd/system nextepc-0.3.10/debian/nextepc-pcrf.install000066400000000000000000000003251333553357400204640ustar00rootroot00000000000000usr/bin/nextepc-pcrfd etc/nextepc/freeDiameter/pcrf.conf etc/nextepc/freeDiameter/pcrf.cert.pem etc/nextepc/freeDiameter/pcrf.key.pem etc/nextepc/pcrf.conf support/systemd/nextepc-pcrfd.service lib/systemd/system nextepc-0.3.10/debian/nextepc-pgw.install000066400000000000000000000004001333553357400203210ustar00rootroot00000000000000usr/bin/nextepc-pgwd etc/nextepc/freeDiameter/pgw.conf etc/nextepc/freeDiameter/pgw.cert.pem etc/nextepc/freeDiameter/pgw.key.pem etc/nextepc/pgw.conf support/network/99-nextepc.* etc/systemd/network support/systemd/nextepc-pgwd.service lib/systemd/system nextepc-0.3.10/debian/nextepc-pgw.postinst000066400000000000000000000027521333553357400205520ustar00rootroot00000000000000#!/bin/sh # postinst script for nextepc # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-remove' # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in configure) if test "x`sysctl -n net.ipv6.conf.all.disable_ipv6`" = x1; then echo "net.ipv6.conf.all.disable_ipv6=0" > /etc/sysctl.d/30-nextepc.conf sysctl -p /etc/sysctl.d/30-nextepc.conf fi if test "x`systemctl is-enabled systemd-networkd`" = xdisabled; then systemctl enable systemd-networkd fi deb-systemd-invoke restart systemd-networkd if test -f /etc/sysctl.d/30-nextepc.conf && grep "pgwtun" /proc/net/dev > /dev/null; then echo "net.ipv6.conf.pgwtun.disable_ipv6=0" > /etc/sysctl.d/30-nextepc.conf sysctl -p /etc/sysctl.d/30-nextepc.conf fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 nextepc-0.3.10/debian/nextepc-pgw.postrm000066400000000000000000000021121333553357400202010ustar00rootroot00000000000000#!/bin/sh # postrm script for nextepc-core # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `purge' # * `upgrade' # * `failed-upgrade' # * `abort-install' # * `abort-install' # * `abort-upgrade' # * `disappear' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in purge) if grep "pgwtun" /proc/net/dev > /dev/null; then ip tuntap del name pgwtun mode tun fi rm -f /etc/sysctl.d/30-nextepc.conf ;; remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 nextepc-0.3.10/debian/nextepc-sgw.install000066400000000000000000000001421333553357400203270ustar00rootroot00000000000000usr/bin/nextepc-sgwd etc/nextepc/sgw.conf support/systemd/nextepc-sgwd.service lib/systemd/system nextepc-0.3.10/debian/rules000077500000000000000000000012201333553357400155510ustar00rootroot00000000000000#!/usr/bin/make -f # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 DEBIAN := $(shell dpkg-parsechangelog | grep ^Version: | cut -d' ' -f2) DEBVERS := $(shell echo '$(DEBIAN)' | cut -d- -f1) VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/[+-].*//' -e 's/~//g') # This has to be exported to make some magic below work. #export DH_OPTIONS export DEB_BUILD_MAINT_OPTIONS = hardening=+all %: dh $@ --with autoreconf --with systemd override_dh_auto_test: sctp_exclude_list=; \ if ! cat /proc/net/protocols | grep SCTP > /dev/null; then \ sctp_exclude_list="-x testsctp"; \ fi; \ lib/core/test/testcore $$sctp_exclude_list || exit; \ nextepc-0.3.10/debian/source/000077500000000000000000000000001333553357400157765ustar00rootroot00000000000000nextepc-0.3.10/debian/source/format000066400000000000000000000000151333553357400172050ustar00rootroot000000000000003.0 (native) nextepc-0.3.10/lib/000077500000000000000000000000001333553357400140225ustar00rootroot00000000000000nextepc-0.3.10/lib/Makefile.am000066400000000000000000000002661333553357400160620ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in SUBDIRS = @FREEDIAMETER_DIR@ ipfw core s1ap nas fd gtp MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump nextepc-0.3.10/lib/core/000077500000000000000000000000001333553357400147525ustar00rootroot00000000000000nextepc-0.3.10/lib/core/Makefile.am000066400000000000000000000002261333553357400170060ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in SUBDIRS = src test MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = core *.stackdump nextepc-0.3.10/lib/core/include/000077500000000000000000000000001333553357400163755ustar00rootroot00000000000000nextepc-0.3.10/lib/core/include/3gpp_types.h000066400000000000000000000253531333553357400206530ustar00rootroot00000000000000#ifndef __TYPES_H__ #define __TYPES_H__ #include "core_list.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define S1AP_SCTP_PORT 36412 #define GTPV2_C_UDP_PORT 2123 #define GTPV1_U_UDP_PORT 2152 #define SCTP_S1AP_PPID 18 #define SCTP_X2AP_PPID 27 #define MAX_NUM_OF_ENB 128 #define MAX_NUM_OF_UE 128 #define MAX_NUM_OF_SESS 4 #define MAX_NUM_OF_BEARER 4 #define MAX_NUM_OF_TUNNEL 3 /* Num of Tunnel per Bearer */ #define MAX_NUM_OF_PF 16 /* Num of Packet Filter per Bearer */ #define MAX_POOL_OF_UE (MAX_NUM_OF_ENB * MAX_NUM_OF_UE) #define MAX_POOL_OF_SESS (MAX_POOL_OF_UE * MAX_NUM_OF_SESS) #define MAX_POOL_OF_BEARER (MAX_POOL_OF_SESS * MAX_NUM_OF_BEARER) #define MAX_POOL_OF_TUNNEL (MAX_POOL_OF_BEARER * MAX_NUM_OF_TUNNEL) #define MAX_POOL_OF_PF (MAX_POOL_OF_BEARER * MAX_NUM_OF_PF) #define MAX_POOL_OF_DIAMETER_SESS (MAX_POOL_OF_UE * MAX_NUM_OF_SESS) #define MAX_NUM_OF_HOSTNAME 16 #define MAX_NUM_OF_PCC_RULE 8 #define MAX_NUM_OF_FLOW 8 /* Num of Flow per PCC Rule */ #define MAX_NUM_OF_PACKET_FILTER 16 /* Num of Packet Filter per Bearer */ #define MAX_SDU_LEN 8192 #define PLMN_ID_LEN 3 #define BCD_TO_BUFFER_LEN(x) (((x)+1)/2) #define MAX_IMSI_BCD_LEN 15 #define MAX_IMSI_LEN BCD_TO_BUFFER_LEN(MAX_IMSI_BCD_LEN) #define RAND_LEN 16 #define AUTN_LEN 16 #define AUTS_LEN 14 #define MAX_RES_LEN 16 #define MAX_APN_LEN 100 #define MAX_PCO_LEN 251 #define NEXT_ID(__id, __min, __max) \ ((__id) = ((__id) == (__max) ? (__min) : ((__id) + 1))) #define COMPARE_ID(__id1, __id2, __max) \ ((__id2) > (__id1) ? ((__id2) - (__id1) < ((__max)-1) ? -1 : 1) : \ (__id1) > (__id2) ? ((__id1) - (__id2) < ((__max)-1) ? 1 : -1) : 0) #define TIME_TO_BCD(x) \ (((((x) % 10) << 4) & 0xf0) | (((x) / 10) & 0x0f)) /********************************** * PLMN_ID Structure */ typedef struct _plmn_id_t { ED2(c_uint8_t mcc2:4;, c_uint8_t mcc1:4;) ED2(c_uint8_t mnc1:4;, c_uint8_t mcc3:4;) ED2(c_uint8_t mnc3:4;, c_uint8_t mnc2:4;) } __attribute__ ((packed)) plmn_id_t; CORE_DECLARE(c_uint16_t) plmn_id_mcc(plmn_id_t *plmn_id); CORE_DECLARE(c_uint16_t) plmn_id_mnc(plmn_id_t *plmn_id); CORE_DECLARE(c_uint16_t) plmn_id_mnc_len(plmn_id_t *plmn_id); CORE_DECLARE(void *) plmn_id_build(plmn_id_t *plmn_id, c_uint16_t mcc, c_uint16_t mnc, c_uint16_t mnc_len); #define MAX_NUM_OF_TAI 16 typedef struct _tai_t { plmn_id_t plmn_id; c_uint16_t tac; } __attribute__ ((packed)) tai_t; typedef struct _e_cgi_t { plmn_id_t plmn_id; c_uint32_t cell_id; /* 28 bit */ } __attribute__ ((packed)) e_cgi_t; typedef struct _guti_t { plmn_id_t plmn_id; c_uint16_t mme_gid; c_uint8_t mme_code; c_uint32_t m_tmsi; } __attribute__ ((packed)) guti_t; /************************************************** * Common Structure * S1AP : 9.2.2.1 Transport Layer Address, See 36.414 * GTP : 8.22 Fully Qualified TEID (F-TEID) */ #define IPV4_LEN 4 #define IPV6_LEN 16 #define IPV4V6_LEN 20 typedef struct _ip_t { union { c_uint32_t addr; c_uint8_t addr6[IPV6_LEN]; struct { c_uint32_t addr; c_uint8_t addr6[IPV6_LEN]; } both; }; c_uint32_t len; ED3(c_uint8_t ipv4:1;, c_uint8_t ipv6:1;, c_uint8_t reserved:6;) } ip_t; /************************************************** * 8.14 PDN Address Allocation (PAA) */ #define PAA_IPV4_LEN 5 #define PAA_IPV6_LEN 18 #define PAA_IPV4V6_LEN 22 typedef struct _paa_t { /* 8.34 PDN Type */ #define GTP_PDN_TYPE_IPV4 1 #define GTP_PDN_TYPE_IPV6 2 #define GTP_PDN_TYPE_IPV4V6 3 #define GTP_PDN_TYPE_NON_IP 4 ED2(c_uint8_t spare:5;, c_uint8_t pdn_type:3;) union { /* GTP_PDN_TYPE_IPV4 */ c_uint32_t addr; /* GTP_PDN_TYPE_IPV6 */ struct { /* the IPv6 Prefix Length */ c_uint8_t len; /* IPv6 Prefix and Interface Identifier */ c_uint8_t addr6[IPV6_LEN]; }; /* GTP_PDN_TYPE_BOTH */ struct { struct { /* the IPv6 Prefix Length */ c_uint8_t len; /* IPv6 Prefix and Interface Identifier */ c_uint8_t addr6[IPV6_LEN]; }; c_uint32_t addr; } __attribute__ ((packed)) both; }; } __attribute__ ((packed)) paa_t; #define MAX_BIT_RATE C_UINT64_C(10000000000) typedef struct _bitrate_t { c_uint64_t downlink; /* bits per seconds */ c_uint64_t uplink; /* bits per seconds */ } bitrate_t; /********************************** * QoS Structure */ typedef struct _qos_t { #define PDN_QCI_1 1 #define PDN_QCI_2 2 #define PDN_QCI_3 3 #define PDN_QCI_4 4 #define PDN_QCI_5 5 #define PDN_QCI_6 6 #define PDN_QCI_7 7 #define PDN_QCI_8 8 #define PDN_QCI_9 9 #define PDN_QCI_65 65 #define PDN_QCI_66 66 #define PDN_QCI_69 69 #define PDN_QCI_70 70 c_uint8_t qci; struct { /* Values 1 to 8 should only be assigned for services that are * authorized to receive prioritized treatment within an operator domain. * Values 9 to 15 may be assigned to resources that are authorized * by the home network and thus applicable when a UE is roaming. */ c_uint8_t priority_level; #define PDN_PRE_EMPTION_CAPABILITY_ENABLED 0 #define PDN_PRE_EMPTION_CAPABILITY_DISABLED 1 c_uint8_t pre_emption_capability; #define PDN_PRE_EMPTION_VULNERABILITY_ENABLED 0 #define PDN_PRE_EMPTION_VULNERABILITY_DISABLED 1 c_uint8_t pre_emption_vulnerability; } arp; bitrate_t mbr; /* Maxmimum Bit Rate (MBR) */ bitrate_t gbr; /* Guaranteed Bit Rate (GBR) */ } qos_t; /********************************** * Flow Structure */ #define FLOW_DOWNLINK_ONLY 1 #define FLOW_UPLINK_ONLY 2 typedef struct _flow_t { c_uint8_t direction; c_int8_t *description; } flow_t; #define FLOW_FREE(__fLOW) \ do { \ if ((__fLOW)->description) \ { \ CORE_FREE((__fLOW)->description); \ } \ else \ d_assert(0,, "Null param"); \ } while(0) /********************************** * PCC Rule Structure */ typedef struct _pcc_rule_t { #define PCC_RULE_TYPE_INSTALL 1 #define PCC_RULE_TYPE_REMOVE 2 c_uint8_t type; #define MAX_PCC_RULE_NAME_LEN 256 c_int8_t *name; flow_t flow[MAX_NUM_OF_FLOW]; int num_of_flow; #define FLOW_STATUS_ENABLED_UPLINK 0 #define FLOW_STATUS_ENABLED_DOWNLINK 1 #define FLOW_STATUS_ENABLED 2 #define FLOW_STATUS_DISABLED 3 #define FLOW_STATUS_REMOVE 4 c_int8_t flow_status; c_uint32_t precedence; qos_t qos; } pcc_rule_t; #define PCC_RULE_FREE(__pCCrULE) \ do { \ int __pCCrULE_iNDEX; \ d_assert((__pCCrULE), break,); \ if ((__pCCrULE)->name) \ { \ CORE_FREE((__pCCrULE)->name); \ } \ else \ d_assert(0,, "Null param"); \ for (__pCCrULE_iNDEX = 0; \ __pCCrULE_iNDEX < (__pCCrULE)->num_of_flow; __pCCrULE_iNDEX++) \ { \ FLOW_FREE(&((__pCCrULE)->flow[__pCCrULE_iNDEX])); \ } \ (__pCCrULE)->num_of_flow = 0; \ } while(0) /********************************** * PDN Structure */ typedef struct _pdn_t { c_uint32_t context_identifier; c_int8_t apn[MAX_APN_LEN+1]; #define HSS_PDN_TYPE_IPV4 0 #define HSS_PDN_TYPE_IPV6 1 #define HSS_PDN_TYPE_IPV4V6 2 #define HSS_PDN_TYPE_IPV4_OR_IPV6 3 c_int8_t pdn_type; qos_t qos; bitrate_t ambr; /* APN-AMBR */ paa_t paa; ip_t pgw_ip; } pdn_t; CORE_DECLARE(c_int16_t) apn_build(c_int8_t *dst, c_int8_t *src, c_int16_t len); CORE_DECLARE(c_int16_t) apn_parse(c_int8_t *dst, c_int8_t *src, c_int16_t len); /************************************************** * Protocol Configuration Options Structure * 8.13 Protocol Configuration Options (PCO) * 10.5.6.3 Protocol configuration options in 3GPP TS 24.008 * RFC 3232 [103] * RFC 1661 [102] */ #define PCO_PPP_FOR_USE_WITH_IP_PDP_TYPE_OR_IP_PDN_TYPE 0 #define PCO_ID_INTERNET_PROTOCOL_CONTROL_PROTOCOL 0x8021 #define PCO_ID_CHALLENGE_HANDSHAKE_AUTHENTICATION_PROTOCOL 0xc223 #define PCO_ID_P_CSCF_IPV6_ADDRESS_REQUEST 0x0001 #define PCO_ID_DNS_SERVER_IPV6_ADDRESS_REQUEST 0x0003 #define PCO_ID_IP_ADDRESS_ALLOCATION_VIA_NAS_SIGNALLING 0x000a #define PCO_ID_P_CSCF_IPV4_ADDRESS_REQUEST 0x000c #define PCO_ID_DNS_SERVER_IPV4_ADDRESS_REQUEST 0x000d #define PCO_ID_IPV4_LINK_MTU_REQUEST 0x0010 typedef struct _pco_ipcp_options_t { c_uint8_t type; c_uint8_t len; c_uint32_t addr; } __attribute__ ((packed)) pco_ipcp_options_t; #define PCO_MAX_NUM_OF_IPCO_OPTIONS 4 typedef struct _pco_ipcp_t { c_uint8_t code; c_uint8_t identifier; c_uint16_t len; pco_ipcp_options_t options[PCO_MAX_NUM_OF_IPCO_OPTIONS]; } __attribute__ ((packed)) pco_ipcp_t; typedef struct _pco_id_t { c_uint16_t id; c_uint8_t len; void *data; } pco_id_t; #define MAX_NUM_OF_PROTOCOL_OR_CONTAINER_ID 8 typedef struct _pco_t { ED3(c_uint8_t ext:1;, c_uint8_t spare:4;, c_uint8_t configuration_protocol:3;) c_uint8_t num_of_id; pco_id_t ids[MAX_NUM_OF_PROTOCOL_OR_CONTAINER_ID]; } pco_t; CORE_DECLARE(c_int16_t) pco_parse(pco_t *pco, void *data, int data_len); CORE_DECLARE(c_int16_t) pco_build(void *data, int data_len, pco_t *pco); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __3GPP_COMMON_H__ */ nextepc-0.3.10/lib/core/include/arch/000077500000000000000000000000001333553357400173125ustar00rootroot00000000000000nextepc-0.3.10/lib/core/include/arch/core_private_common.h000066400000000000000000000001371333553357400235160ustar00rootroot00000000000000#ifndef CORE_PRIVATE_COMMON_H #define CORE_PRIVATE_COMMON_H #endif /*CORE_PRIVATE_COMMON_H*/ nextepc-0.3.10/lib/core/include/arch/unix/000077500000000000000000000000001333553357400202755ustar00rootroot00000000000000nextepc-0.3.10/lib/core/include/arch/unix/core_arch_file.h000066400000000000000000000011311333553357400233660ustar00rootroot00000000000000#ifndef __CORE_ARCH_FILE_H__ #define __CORE_ARCH_FILE_H__ #include "core_portable.h" #include "core_time.h" #include "core_file.h" #define FILE_DEFAULT_BUFSIZE 4096 /* For backwards-compat */ #define FILE_BUFSIZE FILE_DEFAULT_BUFSIZE struct file_t { os_file_t filedes; char fname[MAX_FILENAME_SIZE]; c_int32_t flags; int eof_hit; c_time_t timeout; off_t filePtr; /* position in file of handle */ }; typedef struct stat struct_stat; mode_t unix_perms2mode(file_perms_t perms); file_perms_t unix_mode2perms(mode_t mode); #endif /* ! __CORE_ARCH_FILE_H__ */ nextepc-0.3.10/lib/core/include/arch/unix/core_arch_mutex.h000066400000000000000000000003161333553357400236150ustar00rootroot00000000000000#ifndef __CORE_ARCH_MUTEX_H__ #define __CORE_ARCH_MUTEX_H__ #include "core.h" #include "core_mutex.h" typedef struct _mutex_t { pthread_mutex_t mutex; } mutex_t; #endif /* __CORE_ARCH_MUTEX_H__ */ nextepc-0.3.10/lib/core/include/arch/unix/core_arch_network.h000066400000000000000000000017421333553357400241500ustar00rootroot00000000000000#ifndef __CORE_ARCH_NETWORK_H__ #define __CORE_ARCH_NETWORK_H__ #include "core_list.h" #include "core_network.h" #if HAVE_NETDB_H #include #endif #if HAVE_SYS_SOCKET_H #include #endif #if HAVE_IFADDRS_H #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _sock_t { lnode_t node; int family; int fd; char ifname[IFNAMSIZ]; c_sockaddr_t local_addr; c_sockaddr_t remote_addr; sock_handler handler; void *data; c_int32_t options; } sock_t; #define sock_is_option_set(skt, option) \ (((skt)->options & (option)) == (option)) #define sock_set_option(skt, option, on) \ do { \ if (on) \ (skt)->options |= (option); \ else \ (skt)->options &= ~(option); \ } while (0) #ifdef __cplusplus } #endif /* __cplusplus */ #endif nextepc-0.3.10/lib/core/include/arch/unix/core_arch_proc.h000066400000000000000000000005231333553357400234160ustar00rootroot00000000000000#ifndef __CORE_ARCH_PROC_H__ #define __CORE_ARCH_PROC_H__ #include "core_proc.h" #include "core_semaphore.h" typedef struct _proc_t { pid_t proc; void *data; proc_func_t start_func; proc_func_t stop_func; status_t exitval; semaphore_id sem1; semaphore_id sem2; } proc_t; #endif /* __CORE_ARCH_PROC_H__ */ nextepc-0.3.10/lib/core/include/arch/unix/core_arch_semaphore.h000066400000000000000000000003411333553357400244340ustar00rootroot00000000000000#ifndef __CORE_ARCH_SEMAPHORE_H__ #define __CORE_ARCH_SEMAPHORE_H__ #include "core.h" #include "core_semaphore.h" typedef struct _semaphore_t { sem_t *semaphore; } semaphore_t; #endif /* __CORE_ARCH_SEMAPHORE_H__ */ nextepc-0.3.10/lib/core/include/arch/unix/core_arch_thread.h000066400000000000000000000005501333553357400237220ustar00rootroot00000000000000#ifndef __CORE_ARCH_THREAD_H__ #define __CORE_ARCH_THREAD_H__ #include "core_thread.h" #include "core_semaphore.h" typedef struct _thread_t { pthread_t thread; void *data; thread_start_t func; status_t exitval; semaphore_id semaphore; } thread_t; struct threadattr_t { pthread_attr_t attr; }; #endif /* __CORE_ARCH_THREAD_H__ */ nextepc-0.3.10/lib/core/include/core.h.in000066400000000000000000000210071333553357400201030ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __CORE_H__ #define __CORE_H__ /* GENERATED FILE WARNING! DO NOT EDIT core.h * * You must modify core.h.in instead. * * And please, make an effort to stub core.hw and core.hnw in the process. */ #if !defined(__GNUC__) || __GNUC__ < 2 || \ (__GNUC__ == 2 && __GNUC_MINOR__ < 7) ||\ defined(NEXT) #ifndef __attribute__ #define __attribute__(__x) #endif #define CORE_INLINE #else #define CORE_INLINE __inline__ #endif #ifdef HAVE_CONFIG_H #include "config.h" #endif /** * @file core.h * @brief CORE Platform Definitions */ /** * @defgroup CORE Core Runtime library * @{ */ #if HAVE_SYS_TYPES_H #include #endif #if defined(__cplusplus) && !defined(__STDC_CONSTANT_MACROS) /* C99 7.18.4 requires that stdint.h only exposes INT64_C * and UINT64_C for C++ implementations if this is defined: */ #define __STDC_CONSTANT_MACROS #endif #if HAVE_CTYPE_H #include #endif #if HAVE_ERRNO_H #include #endif #if HAVE_FCNTL_H #include #endif #if HAVE_NET_IF_H #include #endif #if HAVE_PTHREAD_H #include #endif #if HAVE_SIGNAL_H #include #endif #if HAVE_SEMAPHORE_H #include #endif #if HAVE_STDARG_H #include #endif #if HAVE_STDIO_H #include #endif #if HAVE_STDINT_H #include #endif #if HAVE_STDLIB_H #include #endif #if HAVE_STRING_H #include #endif #if HAVE_STRINGS_H #include #endif #if HAVE_TIME_H #include #endif #if HAVE_UNISTD_H #include #endif #if HAVE_NET_IF_DL_H #include #endif #if HAVE_NETINET_ETHER_H #include #endif #if HAVE_NETINET_IN_H #include #endif #if HAVE_NETINET_IP_H #include #endif #if HAVE_NETINET_IP6_H #include #endif #if HAVE_NETINET_IP_ICMP_H #include #endif #if HAVE_NETINET_ICMP6_H #include #endif #if HAVE_NETINET_UDP_H #include #endif #if HAVE_NETINET_TCP_H #include #endif #if HAVE_SYS_IOCTL_H #include #endif #if HAVE_SYS_PARAM_H #include #endif #if HAVE_SYS_STAT_H #include #endif #if HAVE_SYS_TIME_H #include #endif #if HAVE_SYS_WAIT_H #include #endif /* header files for PATH_MAX, _POSIX_PATH_MAX */ #if HAVE_LIMITS_H #include #else #if HAVE_SYS_SYSLIMITS_H #include #endif #endif #if HAVE_SYS_UIO_H #include #endif #ifdef __cplusplus extern "C" { #endif /* Typedefs that CORE needs. */ typedef char c_int8_t; typedef unsigned char c_uint8_t; typedef @short_value@ c_int16_t; typedef unsigned @short_value@ c_uint16_t; typedef @int_value@ c_int32_t; typedef unsigned @int_value@ c_uint32_t; typedef @long_value@ c_int64_t; typedef unsigned @long_value@ c_uint64_t; #if SIZEOF_VOIDP == 8 typedef c_uint64_t c_uintptr_t; typedef c_int64_t c_intptr_t; #else typedef c_uint32_t c_uintptr_t; typedef c_int32_t c_intptr_t; #endif /* Mechanisms to properly type numeric literals */ @int64_literal@ @uint64_literal@ @int64_t_fmt@ @uint64_t_fmt@ @uint64_t_hex_fmt@ @pid_t_fmt@ #ifdef INT16_MIN #define C_INT16_MIN INT16_MIN #else #define C_INT16_MIN (-0x7fff - 1) #endif #ifdef INT16_MAX #define C_INT16_MAX INT16_MAX #else #define C_INT16_MAX (0x7fff) #endif #ifdef UINT16_MAX #define C_UINT16_MAX UINT16_MAX #else #define C_UINT16_MAX (0xffff) #endif #ifdef INT32_MIN #define C_INT32_MIN INT32_MIN #else #define C_INT32_MIN (-0x7fffffff - 1) #endif #ifdef INT32_MAX #define C_INT32_MAX INT32_MAX #else #define C_INT32_MAX 0x7fffffff #endif #ifdef UINT32_MAX #define C_UINT32_MAX UINT32_MAX #else #define C_UINT32_MAX (0xffffffffU) #endif #ifdef INT64_MIN #define C_INT64_MIN INT64_MIN #else #define C_INT64_MIN (C_INT64_C(-0x7fffffffffffffff) - 1) #endif #ifdef INT64_MAX #define C_INT64_MAX INT64_MAX #else #define C_INT64_MAX C_INT64_C(0x7fffffffffffffff) #endif #ifdef UINT64_MAX #define C_UINT64_MAX UINT64_MAX #else #define C_UINT64_MAX C_UINT64_C(0xffffffffffffffff) #endif /* Definitions that CORE programs need to work properly. */ /** * Thread callbacks from CORE functions must be declared with THREAD_FUNC, * so that they follow the platform's calling convention. *
 *
 * void* THREAD_FUNC my_thread_entry_fn(thread_id id, void *data);
 *
 * 
*/ #define THREAD_FUNC /** * The public CORE functions are declared with CORE_DECLARE(), so they may * use the most appropriate calling convention. Public CORE functions with * variable arguments must use CORE_DECLARE_NONSTD(). * * @remark Both the declaration and implementations must use the same macro. * *
 * CORE_DECLARE(rettype) core_func(args)
 * 
* @see CORE_DECLARE_NONSTD @see CORE_DECLARE_DATA * @remark Note that when CORE compiles the library itself, it passes the * symbol -DCORE_DECLARE_EXPORT to the compiler on some platforms (e.g. Win32) * to export public symbols from the dynamic library build.\n * The user must define the CORE_DECLARE_STATIC when compiling to target * the static CORE library on some platforms (e.g. Win32.) The public symbols * are neither exported nor imported when CORE_DECLARE_STATIC is defined.\n * By default, compiling an application and including the CORE public * headers, without defining CORE_DECLARE_STATIC, will prepare the code to be * linked to the dynamic library. */ #define CORE_DECLARE(type) type /** * The public CORE functions using variable arguments are declared with * CORE_DECLARE_NONSTD(), as they must follow the C language calling convention. * @see CORE_DECLARE @see CORE_DECLARE_DATA * @remark Both the declaration and implementations must use the same macro. *
 *
 * CORE_DECLARE_NONSTD(rettype) core_func(args, ...);
 *
 * 
*/ #define CORE_DECLARE_NONSTD(type) type /** * The public CORE variables are declared with CORE_DECLARE_DATA. * This assures the appropriate indirection is invoked at compile time. * @see CORE_DECLARE @see CORE_DECLARE_NONSTD * @remark Note that the declaration and implementations use different forms, * but both must include the macro. * *
 *
 * extern CORE_DECLARE_DATA type core_variable;\n
 * CORE_DECLARE_DATA type core_variable = value;
 *
 * 
*/ #define CORE_DECLARE_DATA #if defined(PATH_MAX) #define C_PATH_MAX PATH_MAX #elif defined(_POSIX_PATH_MAX) #define C_PATH_MAX _POSIX_PATH_MAX #else #error no decision has been made on C_PATH_MAX for your platform #endif /** @} */ /* Definitions that only Win32 programs need to compile properly. */ #if WORDS_BIGENDIAN #define ED2(x1, x2) x1 x2 #define ED3(x1, x2, x3) x1 x2 x3 #define ED4(x1, x2, x3, x4) x1 x2 x3 x4 #define ED5(x1, x2, x3, x4, x5) x1 x2 x3 x4 x5 #define ED6(x1, x2, x3, x4, x5, x6) x1 x2 x3 x4 x5 x6 #define ED7(x1, x2, x3, x4, x5, x6, x7) x1 x2 x3 x4 x5 x6 x7 #define ED8(x1, x2, x3, x4, x5, x6, x7, x8) x1 x2 x3 x4 x5 x6 x7 x8 #else #define ED2(x1, x2) x2 x1 #define ED3(x1, x2, x3) x3 x2 x1 #define ED4(x1, x2, x3, x4) x4 x3 x2 x1 #define ED5(x1, x2, x3, x4, x5) x5 x4 x3 x2 x1 #define ED6(x1, x2, x3, x4, x5, x6) x6 x5 x4 x3 x2 x1 #define ED7(x1, x2, x3, x4, x5, x6, x7) x7 x6 x5 x4 x3 x2 x1 #define ED8(x1, x2, x3, x4, x5, x6, x7, x8) x8 x7 x6 x5 x4 x3 x2 x1 #endif /** FALSE */ #ifndef FALSE #define FALSE 0 #endif /** TRUE */ #ifndef TRUE #define TRUE (!FALSE) #endif /* CORE_ALIGN() is only to be used to align on a power of 2 boundary */ #define CORE_ALIGN(size, boundary) \ (((size) + ((boundary) - 1)) & ~((boundary) - 1)) /** Default alignment */ #define CORE_ALIGN_DEFAULT(size) CORE_ALIGN(size, 4) #ifdef __cplusplus } #endif #endif /* CORE_H */ nextepc-0.3.10/lib/core/include/core_aes.h000066400000000000000000000026141333553357400203310ustar00rootroot00000000000000#ifndef _CORE_AES_H__ #define _CORE_AES_H__ #include "core.h" #include "core_errno.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define AES_BLOCK_SIZE 16 #define MAX_KEY_BITS 256 #define KEYLENGTH(keybits) ((keybits)/8) #define RKLENGTH(keybits) ((keybits)/8+28) #define NROUNDS(keybits) ((keybits)/32+6) CORE_DECLARE(int) aes_setup_enc(c_uint32_t *rk, const c_uint8_t *key, int keybits); CORE_DECLARE(int) aes_setup_dec(c_uint32_t *rk, const c_uint8_t *key, int keybits); CORE_DECLARE(void) aes_encrypt(const c_uint32_t *rk, int nrounds, const c_uint8_t plaintext[16], c_uint8_t ciphertext[16]); CORE_DECLARE(void) aes_decrypt(const c_uint32_t *rk, int nrounds, const c_uint8_t ciphertext[16], c_uint8_t plaintext[16]); CORE_DECLARE(status_t) aes_cbc_encrypt(const c_uint8_t *key, const c_uint32_t keybits, c_uint8_t *ivec, const c_uint8_t *in, const c_uint32_t inlen, c_uint8_t *out, c_uint32_t *outlen); CORE_DECLARE(status_t) aes_cbc_decrypt(const c_uint8_t *key, const c_uint32_t keybits, c_uint8_t *ivec, const c_uint8_t *in, const c_uint32_t inlen, c_uint8_t *out, c_uint32_t *outlen); CORE_DECLARE(status_t) aes_ctr128_encrypt(const c_uint8_t *key, c_uint8_t *ivec, const c_uint8_t *in, const c_uint32_t inlen, c_uint8_t *out); #ifdef __cplusplus } #endif /* __cplusplus */ #endif nextepc-0.3.10/lib/core/include/core_aes_cmac.h000066400000000000000000000014361333553357400213150ustar00rootroot00000000000000#ifndef _CORE_AES_CMAC_H #define _CORE_AES_CMAC_H #include "core_aes.h" #define AES_CMAC_DIGEST_LEN 16 #ifdef __cplusplus extern "C" { #endif /** * Caculate CMAC value * * @param cmac * @param key * @param msg * @param len * * @return CORE_OK * CORE_ERROR */ CORE_DECLARE(status_t) aes_cmac_calculate(c_uint8_t *cmac, const c_uint8_t *key, const c_uint8_t *msg, const c_uint32_t len); /** * Verify CMAC value * * @param cmac * @param key * @param msg * @param len * * @return CORE_OK * CORE_ERROR * ERR_INVALID_CMAC */ #define ERR_INVALID_CMAC -2 CORE_DECLARE(status_t) aes_cmac_verify(c_uint8_t *cmac, const c_uint8_t *key, const c_uint8_t *msg, const c_uint32_t len); #ifdef __cplusplus } #endif #endif /* ! _CORE_AES_CMAC_H */ nextepc-0.3.10/lib/core/include/core_atomic.h000066400000000000000000000062771333553357400210460ustar00rootroot00000000000000#ifndef __CORE_ATOMIC_H__ #define __CORE_ATOMIC_H__ #include "core.h" #include "core_errno.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * this function is required on some platforms to initialize the * atomic operation's internal structures * @param p pool * @return APR_SUCCESS on successful completion * @remark Programs do NOT need to call this directly. APR will call this * automatically from apr_initialize. * @internal */ CORE_DECLARE(status_t) atomic_init(); CORE_DECLARE(status_t) atomic_final(); /* * Atomic operations on 32-bit values * Note: Each of these functions internally implements a memory barrier * on platforms that require it */ /** * atomically read an c_uint32_t from memory * @param mem the pointer */ CORE_DECLARE(c_uint32_t) atomic_read32(volatile c_uint32_t *mem); /** * atomically set an c_uint32_t in memory * @param mem pointer to the object * @param val value that the object will assume */ CORE_DECLARE(void) atomic_set32(volatile c_uint32_t *mem, c_uint32_t val); /** * atomically add 'val' to an c_uint32_t * @param mem pointer to the object * @param val amount to add * @return old value pointed to by mem */ CORE_DECLARE(c_uint32_t) atomic_add32(volatile c_uint32_t *mem, c_uint32_t val); /** * atomically subtract 'val' from an c_uint32_t * @param mem pointer to the object * @param val amount to subtract */ CORE_DECLARE(void) atomic_sub32(volatile c_uint32_t *mem, c_uint32_t val); /** * atomically increment an c_uint32_t by 1 * @param mem pointer to the object * @return old value pointed to by mem */ CORE_DECLARE(c_uint32_t) atomic_inc32(volatile c_uint32_t *mem); /** * atomically decrement an c_uint32_t by 1 * @param mem pointer to the atomic value * @return zero if the value becomes zero on decrement, otherwise non-zero */ CORE_DECLARE(int) atomic_dec32(volatile c_uint32_t *mem); /** * compare an c_uint32_t's value with 'cmp'. * If they are the same swap the value with 'with' * @param mem pointer to the value * @param with what to swap it with * @param cmp the value to compare it to * @return the old value of *mem */ CORE_DECLARE(c_uint32_t) atomic_cas32(volatile c_uint32_t *mem, c_uint32_t with, c_uint32_t cmp); /** * exchange an c_uint32_t's value with 'val'. * @param mem pointer to the value * @param val what to swap it with * @return the old value of *mem */ CORE_DECLARE(c_uint32_t) atomic_xchg32(volatile c_uint32_t *mem, c_uint32_t val); /** * compare the pointer's value with cmp. * If they are the same swap the value with 'with' * @param mem pointer to the pointer * @param with what to swap it with * @param cmp the value to compare it to * @return the old value of the pointer */ CORE_DECLARE(void*) atomic_casptr(void *volatile *mem, void *with, const void *cmp); /** * exchange a pair of pointer values * @param mem pointer to the pointer * @param with what to swap it with * @return the old value of the pointer */ CORE_DECLARE(void*) atomic_xchgptr(void *volatile *mem, void *with); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* !__CORE_ATOMIC_H__ */ nextepc-0.3.10/lib/core/include/core_cond.h000066400000000000000000000100611333553357400204770ustar00rootroot00000000000000#ifndef __CORE_COND_H__ #define __CORE_COND_H__ /** * @file cond.h * @brief CORE Condition Variable Routines */ #include "core.h" #include "core_errno.h" #include "core_time.h" #include "core_mutex.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * @defgroup cond Condition Variable Routines * @ingroup CORE * @{ */ /** Opaque structure for thread condition variables */ typedef c_uintptr_t cond_id; /** * Initialize Conditional Pool */ CORE_DECLARE(status_t) cond_init(void); /** * Finalize Conditional Pool */ CORE_DECLARE(status_t) cond_final(void); /** * Note: destroying a condition variable (or likewise, destroying or * clearing the pool from which a condition variable was allocated) if * any threads are blocked waiting on it gives undefined results. */ /** * Create and initialize a condition variable that can be used to signal * and schedule threads in a single process. * @param id the memory address where the newly created condition variable * will be stored. */ CORE_DECLARE(status_t) cond_create(cond_id *id); /** * Put the active calling thread to sleep until signaled to wake up. Each * condition variable must be associated with a mutex, and that mutex must * be locked before calling this function, or the behavior will be * undefined. As the calling thread is put to sleep, the given mutex * will be simultaneously released; and as this thread wakes up the lock * is again simultaneously acquired. * @param id the condition variable on which to block. * @param mid the mutex that must be locked upon entering this function, * is released while the thread is asleep, and is again acquired before * returning from this function. * @remark Spurious wakeups may occur. Before and after every call to wait on * a condition variable, the caller should test whether the condition is already * met. */ CORE_DECLARE(status_t) cond_wait(cond_id id, mutex_id mid); /** * Put the active calling thread to sleep until signaled to wake up or * the timeout is reached. Each condition variable must be associated * with a mutex, and that mutex must be locked before calling this * function, or the behavior will be undefined. As the calling thread * is put to sleep, the given mutex will be simultaneously released; * and as this thread wakes up the lock is again simultaneously acquired. * @param id the condition variable on which to block. * @param mid the mutex that must be locked upon entering this function, * is released while the thread is asleep, and is again acquired before * returning from this function. * @param timeout The amount of time in microseconds to wait. This is * a maximum, not a minimum. If the condition is signaled, we * will wake up before this time, otherwise the error CORE_TIMEUP * is returned. */ CORE_DECLARE(status_t) cond_timedwait( cond_id id, mutex_id mid, c_time_t timeout); /** * Signals a single thread, if one exists, that is blocking on the given * condition variable. That thread is then scheduled to wake up and acquire * the associated mutex. Although it is not required, if predictable scheduling * is desired, that mutex must be locked while calling this function. * @param id the condition variable on which to produce the signal. * @remark If no threads are waiting on the condition variable, nothing happens. */ CORE_DECLARE(status_t) cond_signal(cond_id id); /** * Signals all threads blocking on the given condition variable. * Each thread that was signaled is then scheduled to wake up and acquire * the associated mutex. This will happen in a serialized manner. * @param id the condition variable on which to produce the broadcast. * @remark If no threads are waiting on the condition variable, nothing happens. */ CORE_DECLARE(status_t) cond_broadcast(cond_id id); /** * Destroy the condition variable and free the associated memory. * @param id the condition variable to destroy. */ CORE_DECLARE(status_t) cond_delete(cond_id id); /** @} */ #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* ! __CORE_COND_H__ */ nextepc-0.3.10/lib/core/include/core_debug.h000066400000000000000000000130721333553357400206470ustar00rootroot00000000000000#ifndef __CORE_DEBUG_H__ #define __CORE_DEBUG_H__ #include "core.h" #include "core_time.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #ifdef TRACE_MODULE int TRACE_MODULE; #endif extern int g_trace_mask; #define trace_level_set(__level) (TRACE_MODULE = __level); #define D_MSG_TYPE_NONE 0 #define D_MSG_TYPE_RAW 1 #define D_MSG_TYPE_TRACE 2 #define D_MSG_TYPE_LOG 3 #define D_MSG_TYPE_ASSERT 4 #define D_MSG_TO_CONSOLE 0x00000001 #define D_MSG_TO_STDOUT 0x00000002 #define D_MSG_TO_SYSLOG 0x00000004 #define D_MSG_TO_NETWORK 0x00000008 #define D_MSG_TO_FILE 0x00000010 #define D_MSG_TO_ALL (D_MSG_TO_CONSOLE | D_MSG_TO_STDOUT | \ D_MSG_TO_SYSLOG | D_MSG_TO_NETWORK | \ D_MSG_TO_FILE ) #define D_LOG_LEVEL_NONE 0 #define D_LOG_LEVEL_FATAL 1 #define D_LOG_LEVEL_ERROR 2 #define D_LOG_LEVEL_WARN 3 #define D_LOG_LEVEL_INFO 4 #define D_LOG_LEVEL_FULL D_LOG_LEVEL_INFO CORE_DECLARE(int) d_msg(int tp, int lv, c_time_t t, char *fn, int ln, char *fmt, ...); /** * Use for printing message. This always print out the message. */ #define d_print(fmt, ...) \ d_msg(D_MSG_TYPE_RAW, 0, 0, NULL, 0, fmt, ## __VA_ARGS__) #define __MAX_HEX_BUF 128 /** * Use for printing binary buffer as printable hex string. This always * print out the message. */ #define d_print_hex(__buf, __buflen) do { \ int __i = 0, __l, __off = 0; \ char __hex[__MAX_HEX_BUF*2+__MAX_HEX_BUF/4+__MAX_HEX_BUF/32+4], *__p; \ d_print("%d bytes hex:\r\n", __buflen); \ while (__off < (__buflen)) { \ __p = __hex; __p[0] = 0; \ __l = ((__buflen) - __off) > __MAX_HEX_BUF ? \ __MAX_HEX_BUF : (__buflen) - __off; \ for (__i = 0; __i < __l; __i++) { \ __p += sprintf(__p, "%02x", ((char*)(__buf))[__off+__i] & 0xff); \ if ((__i & 0x1f) == 31) \ __p += sprintf(__p, "\r\n"); \ else if ((__i & 0x3) == 3) \ __p += sprintf(__p, " "); \ } \ __off += __l; \ d_print(__hex); \ } \ if (__i & 0x1f) d_print("\r\n"); \ } while (0) /** * Use for trace. * Trace message shall be shown only if trace level is set equal or higher * than __level. */ #define d_trace(__level, fmt, ...) \ (!g_trace_mask || TRACE_MODULE < __level ? 0 : \ d_msg(D_MSG_TYPE_TRACE, 0, time_now(), NULL, 0, fmt, ## __VA_ARGS__)) #define d_trace2(__level, fmt, ...) \ (!g_trace_mask || TRACE_MODULE < __level ? 0 : \ d_msg(D_MSG_TYPE_RAW, 0, 0, NULL, 0, fmt, ## __VA_ARGS__)) /** * Use for trace binary buffer as printable hex string . * Trace message shall be shown only if trace level is set equal or higher * than __level. */ #define d_trace_hex(__level, __buf, __buflen) do { \ if (g_trace_mask && TRACE_MODULE >= __level) \ d_print_hex(__buf, __buflen); \ } while (0) /** * Informative log. * If log level is larger than 4, * this message is logged with informative format. */ #define d_info(fmt, ...) \ d_msg(D_MSG_TYPE_LOG, D_LOG_LEVEL_INFO, time_now(), \ __FILE__, __LINE__, fmt, ## __VA_ARGS__) /** * Informative log. * If log level is larger than 3, * this message is logged with warning format. */ #define d_warn(fmt, ...) \ d_msg(D_MSG_TYPE_LOG, D_LOG_LEVEL_WARN, time_now(), \ __FILE__, __LINE__, fmt, ## __VA_ARGS__) /** * Error log. * If log level is larger than 2, * this message is logged with error format. */ #define d_error(fmt, ...) \ d_msg(D_MSG_TYPE_LOG, D_LOG_LEVEL_ERROR, time_now(), \ __FILE__, __LINE__, fmt, ## __VA_ARGS__) /** * Fatal error log. * If log level is larger than 1, * this message is logged with fatal error format. */ #define d_fatal(fmt, ...) \ d_msg(D_MSG_TYPE_LOG, D_LOG_LEVEL_FATAL, time_now(), \ __FILE__, __LINE__, fmt, ## __VA_ARGS__) /** * Assertion * this message is logged with assertion format. */ #define d_assert(cond, expr, fmt, ...) \ if (!(cond)) { \ d_msg(D_MSG_TYPE_ASSERT, 0, time_now(), __FILE__, __LINE__, \ "!("#cond"). "fmt, ## __VA_ARGS__); \ expr; \ } status_t d_msg_console_init(int console_fd); void d_msg_console_final(); void d_msg_syslog_init(const char *name); void d_msg_syslog_final(); status_t d_msg_network_init(const char *name); void d_msg_network_final(); status_t d_msg_network_start(const char *file); void d_msg_network_stop(); void d_msg_network_final(); status_t d_msg_file_init(const char *file); void d_msg_file_final(); void d_msg_to(int to, int on_off); int d_msg_get_to(); /** * Turn on log partially. * level 4: d_fatal, d_error, d_warn, d_info * level 3: d_fatal, d_error, d_warn * level 2: d_fatal, d_error * level 1: d_fatal * level 0: none */ void d_log_set_level(int to, int level); int d_log_get_level(int to); /** * Turn on log fully. * All of d_info, d_warn, d_error and d_fatal will be shown. * Equivalent to log_level(4). */ void d_log_full(int to); /** * Turn off log fully. * All log will not be shown. * Equivalent to log_level(0). */ void d_log_off(int to); /** * Turn on trace mask globally. */ void d_trace_global_on(); /** * Turn off trace mask globally. * Any trace of any module will not be shown although some trace module is * turned on. */ void d_trace_global_off(); /** * Turn on trace of specifed module with level. */ void d_trace_level(int *mod_name, int level); /** * Turn off trace of specifed module. * Equivalent to trace_level(0). */ void d_trace_off(int *mod_name); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* ! __CORE_DEBUG_H__ */ nextepc-0.3.10/lib/core/include/core_errno.h000066400000000000000000001454301333553357400207120ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef __CORE_ERRNO_H__ #define __CORE_ERRNO_H__ /** * @file core_errno.h * @brief CORE Error Codes */ #include "core.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * @defgroup core_errno Error Codes * @ingroup CORE * @{ */ /** * Type for specifying an error or status code. */ typedef int status_t; /** * Return a human readable string describing the specified error. * @param statcode The error code the get a string for. * @param buf A buffer to hold the error string. * @param bufsize Size of the buffer to hold the string. */ CORE_DECLARE(char *) core_strerror(status_t statcode, char *buf, size_t bufsize); #if defined(DOXYGEN) /** * @def FROM_OS_ERROR(os_err_type syserr) * Fold a platform specific error into an STATUS_T code. * @return STATUS_T * @param e The platform os error code. * @warning macro implementation; the syserr argument may be evaluated * multiple times. */ #define FROM_OS_ERROR(e) (e == 0 ? CORE_OK : e + OS_START_SYSERR) /** * @def TO_OS_ERROR(STATUS_T statcode) * @return os_err_type * Fold an STATUS_T code back to the native platform defined error. * @param e The STATUS_T folded platform os error code. * @warning macro implementation; the statcode argument may be evaluated * multiple times. If the statcode was not created by get_os_error * or FROM_OS_ERROR, the results are undefined. */ #define TO_OS_ERROR(e) (e == 0 ? CORE_OK : e - OS_START_SYSERR) /** @def get_os_error() * @return STATUS_T the last platform error, folded into STATUS_T, on most platforms * @remark This retrieves errno, or calls a GetLastError() style function, and * folds it with FROM_OS_ERROR. Some platforms (such as OS2) have no * such mechanism, so this call may be unsupported. Do NOT use this * call for socket errors from socket, send, recv etc! */ /** @def set_os_error(e) * Reset the last platform error, unfolded from an STATUS_T, on some platforms * @param e The OS error folded in a prior call to FROM_OS_ERROR() * @warning This is a macro implementation; the statcode argument may be evaluated * multiple times. If the statcode was not created by get_os_error * or FROM_OS_ERROR, the results are undefined. This macro sets * errno, or calls a SetLastError() style function, unfolding statcode * with TO_OS_ERROR. Some platforms (such as OS2) have no such * mechanism, so this call may be unsupported. */ /** @def get_netos_error() * Return the last socket error, folded into STATUS_T, on all platforms * @remark This retrieves errno or calls a GetLastSocketError() style function, * and folds it with FROM_OS_ERROR. */ /** @def set_netos_error(e) * Reset the last socket error, unfolded from an STATUS_T * @param e The socket error folded in a prior call to FROM_OS_ERROR() * @warning This is a macro implementation; the statcode argument may be evaluated * multiple times. If the statcode was not created by get_os_error * or FROM_OS_ERROR, the results are undefined. This macro sets * errno, or calls a WSASetLastError() style function, unfolding * socketcode with TO_OS_ERROR. */ #endif /* defined(DOXYGEN) */ /** * OS_START_ERROR is where the CORE specific error values start. */ #define OS_START_ERROR 20000 /** * OS_ERRSPACE_SIZE is the maximum number of errors you can fit * into one of the error/status ranges below -- except for * OS_START_USERERR, which see. */ #define OS_ERRSPACE_SIZE 50000 /** * UTIL_ERRSPACE_SIZE is the size of the space that is reserved for * use within core-util. This space is reserved above that used by CORE * internally. * @note This number MUST be smaller than OS_ERRSPACE_SIZE by a * large enough amount that CORE has sufficient room for it's * codes. */ #define UTIL_ERRSPACE_SIZE 20000 /** * OS_START_STATUS is where the CORE specific status codes start. */ #define OS_START_STATUS (OS_START_ERROR + OS_ERRSPACE_SIZE) /** * UTIL_START_STATUS is where CORE-Util starts defining it's * status codes. */ #define UTIL_START_STATUS (OS_START_STATUS + \ (OS_ERRSPACE_SIZE - UTIL_ERRSPACE_SIZE)) /** * OS_START_USERERR are reserved for applications that use CORE that * layer their own error codes along with CORE's. Note that the * error immediately following this one is set ten times farther * away than usual, so that users of core have a lot of room in * which to declare custom error codes. * * In general applications should try and create unique error codes. To try * and assist in finding suitable ranges of numbers to use, the following * ranges are known to be used by the listed applications. If your * application defines error codes please advise the range of numbers it * uses to dev@core.apache.org for inclusion in this list. * * Ranges shown are in relation to OS_START_USERERR * * Subversion - Defined ranges, of less than 100, at intervals of 5000 * starting at an offset of 5000, e.g. * +5000 to 5100, +10000 to 10100 */ #define OS_START_USERERR (OS_START_STATUS + OS_ERRSPACE_SIZE) /** * OS_START_USEERR is obsolete, defined for compatibility only. * Use OS_START_USERERR instead. */ #define OS_START_USEERR OS_START_USERERR /** * OS_START_CANONERR is where CORE versions of errno values are defined * on systems which don't have the corresponding errno. */ #define OS_START_CANONERR (OS_START_USERERR \ + (OS_ERRSPACE_SIZE * 10)) /** * OS_START_EAIERR folds EAI_ error codes from getaddrinfo() into * STATUS_T values. */ #define OS_START_EAIERR (OS_START_CANONERR + OS_ERRSPACE_SIZE) /** * OS_START_SYSERR folds platform-specific system error values into * STATUS_T values. */ #define OS_START_SYSERR (OS_START_EAIERR + OS_ERRSPACE_SIZE) /** * @defgroup CORE_ERROR_map CORE Error Space *
 * The following attempts to show the relation of the various constants
 * used for mapping CORE Status codes.
 *
 *       0
 *
 *  20,000     OS_START_ERROR
 *
 *         + OS_ERRSPACE_SIZE (50,000)
 *
 *  70,000      OS_START_STATUS
 *
 *         + OS_ERRSPACE_SIZE - UTIL_ERRSPACE_SIZE (30,000)
 *
 * 100,000      UTIL_START_STATUS
 *
 *         + UTIL_ERRSPACE_SIZE (20,000)
 *
 * 120,000      OS_START_USERERR
 *
 *         + 10 x OS_ERRSPACE_SIZE (50,000 * 10)
 *
 * 620,000      OS_START_CANONERR
 *
 *         + OS_ERRSPACE_SIZE (50,000)
 *
 * 670,000      OS_START_EAIERR
 *
 *         + OS_ERRSPACE_SIZE (50,000)
 *
 * 720,000      OS_START_SYSERR
 *
 * 
*/ /** no error. */ #define CORE_OK 0 #define CORE_ERROR -1 /** * @defgroup CORE_Error CORE Error Values *
 * CORE ERROR VALUES
 * CORE_ENOSTAT      CORE was unable to perform a stat on the file
 * CORE_ENOPOOL      CORE was not provided a pool with which to allocate memory
 * CORE_EBADDATE     CORE was given an invalid date
 * CORE_EINVALSOCK   CORE was given an invalid socket
 * CORE_ENOPROC      CORE was not given a process structure
 * CORE_ENOTIME      CORE was not given a time structure
 * CORE_ENODIR       CORE was not given a directory structure
 * CORE_ENOLOCK      CORE was not given a lock structure
 * CORE_ENOPOLL      CORE was not given a poll structure
 * CORE_ENOSOCKET    CORE was not given a socket
 * CORE_ENOTHREAD    CORE was not given a thread structure
 * CORE_ENOTHDKEY    CORE was not given a thread key structure
 * CORE_ENOSHMAVAIL  There is no more shared memory available
 * CORE_EDSOOPEN     CORE was unable to open the dso object.  For more
 *                  information call dso_error().
 * CORE_EGENERAL     General failure (specific information not available)
 * CORE_EBADIP       The specified IP address is invalid
 * CORE_EBADMASK     The specified netmask is invalid
 * CORE_ESYMNOTFOUND Could not find the requested symbol
 * CORE_ENOTENOUGHENTROPY Not enough entropy to continue
 * 
* *
 * CORE STATUS VALUES
 * CORE_INCHILD        Program is currently executing in the child
 * CORE_INPARENT       Program is currently executing in the parent
 * CORE_DETACH         The thread is detached
 * CORE_NOTDETACH      The thread is not detached
 * CORE_CHILD_DONE     The child has finished executing
 * CORE_CHILD_NOTDONE  The child has not finished executing
 * CORE_TIMEUP         The operation did not finish before the timeout
 * CORE_INCOMPLETE     The operation was incomplete although some processing
 *                    was performed and the results are partially valid
 * CORE_BADCH          Getopt found an option not in the option string
 * CORE_BADARG         Getopt found an option that is missing an argument
 *                    and an argument was specified in the option string
 * CORE_EOF            CORE has encountered the end of the file
 * CORE_NOTFOUND       CORE was unable to find the socket in the poll structure
 * CORE_ANONYMOUS      CORE is using anonymous shared memory
 * CORE_FILEBASED      CORE is using a file name as the key to the shared memory
 * CORE_KEYBASED       CORE is using a shared key as the key to the shared memory
 * CORE_EINIT          Ininitalizer value.  If no option has been found, but
 *                    the status variable requires a value, this should be used
 * CORE_ENOTIMPL       The CORE function has not been implemented on this
 *                    platform, either because nobody has gotten to it yet,
 *                    or the function is impossible on this platform.
 * CORE_EMISMATCH      Two passwords do not match.
 * CORE_EABSOLUTE      The given path was absolute.
 * CORE_ERELATIVE      The given path was relative.
 * CORE_EINCOMPLETE    The given path was neither relative nor absolute.
 * CORE_EABOVEROOT     The given path was above the root path.
 * CORE_EBUSY          The given lock was busy.
 * CORE_EPROC_UNKNOWN  The given process wasn't recognized by CORE
 * 
* @{ */ /** @see STATUS_IS_ENOSTAT */ #define CORE_ENOSTAT (OS_START_ERROR + 1) /** @see STATUS_IS_ENOPOOL */ #define CORE_ENOPOOL (OS_START_ERROR + 2) /* empty slot: +3 */ /** @see STATUS_IS_EBADDATE */ #define CORE_EBADDATE (OS_START_ERROR + 4) /** @see STATUS_IS_EINVALSOCK */ #define CORE_EINVALSOCK (OS_START_ERROR + 5) /** @see STATUS_IS_ENOPROC */ #define CORE_ENOPROC (OS_START_ERROR + 6) /** @see STATUS_IS_ENOTIME */ #define CORE_ENOTIME (OS_START_ERROR + 7) /** @see STATUS_IS_ENODIR */ #define CORE_ENODIR (OS_START_ERROR + 8) /** @see STATUS_IS_ENOLOCK */ #define CORE_ENOLOCK (OS_START_ERROR + 9) /** @see STATUS_IS_ENOPOLL */ #define CORE_ENOPOLL (OS_START_ERROR + 10) /** @see STATUS_IS_ENOSOCKET */ #define CORE_ENOSOCKET (OS_START_ERROR + 11) /** @see STATUS_IS_ENOTHREAD */ #define CORE_ENOTHREAD (OS_START_ERROR + 12) /** @see STATUS_IS_ENOTHDKEY */ #define CORE_ENOTHDKEY (OS_START_ERROR + 13) /** @see STATUS_IS_EGENERAL */ #define CORE_EGENERAL (OS_START_ERROR + 14) /** @see STATUS_IS_ENOSHMAVAIL */ #define CORE_ENOSHMAVAIL (OS_START_ERROR + 15) /** @see STATUS_IS_EBADIP */ #define CORE_EBADIP (OS_START_ERROR + 16) /** @see STATUS_IS_EBADMASK */ #define CORE_EBADMASK (OS_START_ERROR + 17) /* empty slot: +18 */ /** @see STATUS_IS_EDSOPEN */ #define CORE_EDSOOPEN (OS_START_ERROR + 19) /** @see STATUS_IS_EABSOLUTE */ #define CORE_EABSOLUTE (OS_START_ERROR + 20) /** @see STATUS_IS_ERELATIVE */ #define CORE_ERELATIVE (OS_START_ERROR + 21) /** @see STATUS_IS_EINCOMPLETE */ #define CORE_EINCOMPLETE (OS_START_ERROR + 22) /** @see STATUS_IS_EABOVEROOT */ #define CORE_EABOVEROOT (OS_START_ERROR + 23) /** @see STATUS_IS_EBADPATH */ #define CORE_EBADPATH (OS_START_ERROR + 24) /** @see STATUS_IS_EPATHWILD */ #define CORE_EPATHWILD (OS_START_ERROR + 25) /** @see STATUS_IS_ESYMNOTFOUND */ #define CORE_ESYMNOTFOUND (OS_START_ERROR + 26) /** @see STATUS_IS_EPROC_UNKNOWN */ #define CORE_EPROC_UNKNOWN (OS_START_ERROR + 27) /** @see STATUS_IS_ENOTENOUGHENTROPY */ #define CORE_ENOTENOUGHENTROPY (OS_START_ERROR + 28) /** @} */ /** * @defgroup STATUS_IS Status Value Tests * @warning For any particular error condition, more than one of these tests * may match. This is because platform-specific error codes may not * always match the semantics of the POSIX codes these tests (and the * corresponding CORE error codes) are named after. A notable example * are the STATUS_IS_ENOENT and STATUS_IS_ENOTDIR tests on * Win32 platforms. The programmer should always be aware of this and * adjust the order of the tests accordingly. * @{ */ /** * CORE was unable to perform a stat on the file * @warning always use this test, as platform-specific variances may meet this * more than one error code */ #define STATUS_IS_ENOSTAT(s) ((s) == CORE_ENOSTAT) /** * CORE was not provided a pool with which to allocate memory * @warning always use this test, as platform-specific variances may meet this * more than one error code */ #define STATUS_IS_ENOPOOL(s) ((s) == CORE_ENOPOOL) /** CORE was given an invalid date */ #define STATUS_IS_EBADDATE(s) ((s) == CORE_EBADDATE) /** CORE was given an invalid socket */ #define STATUS_IS_EINVALSOCK(s) ((s) == CORE_EINVALSOCK) /** CORE was not given a process structure */ #define STATUS_IS_ENOPROC(s) ((s) == CORE_ENOPROC) /** CORE was not given a time structure */ #define STATUS_IS_ENOTIME(s) ((s) == CORE_ENOTIME) /** CORE was not given a directory structure */ #define STATUS_IS_ENODIR(s) ((s) == CORE_ENODIR) /** CORE was not given a lock structure */ #define STATUS_IS_ENOLOCK(s) ((s) == CORE_ENOLOCK) /** CORE was not given a poll structure */ #define STATUS_IS_ENOPOLL(s) ((s) == CORE_ENOPOLL) /** CORE was not given a socket */ #define STATUS_IS_ENOSOCKET(s) ((s) == CORE_ENOSOCKET) /** CORE was not given a thread structure */ #define STATUS_IS_ENOTHREAD(s) ((s) == CORE_ENOTHREAD) /** CORE was not given a thread key structure */ #define STATUS_IS_ENOTHDKEY(s) ((s) == CORE_ENOTHDKEY) /** Generic Error which can not be put into another spot */ #define STATUS_IS_EGENERAL(s) ((s) == CORE_EGENERAL) /** There is no more shared memory available */ #define STATUS_IS_ENOSHMAVAIL(s) ((s) == CORE_ENOSHMAVAIL) /** The specified IP address is invalid */ #define STATUS_IS_EBADIP(s) ((s) == CORE_EBADIP) /** The specified netmask is invalid */ #define STATUS_IS_EBADMASK(s) ((s) == CORE_EBADMASK) /* empty slot: +18 */ /** * CORE was unable to open the dso object. * For more information call dso_error(). */ #if defined(WIN32) #define STATUS_IS_EDSOOPEN(s) ((s) == CORE_EDSOOPEN \ || TO_OS_ERROR(s) == ERROR_MOD_NOT_FOUND) #else #define STATUS_IS_EDSOOPEN(s) ((s) == CORE_EDSOOPEN) #endif /** The given path was absolute. */ #define STATUS_IS_EABSOLUTE(s) ((s) == CORE_EABSOLUTE) /** The given path was relative. */ #define STATUS_IS_ERELATIVE(s) ((s) == CORE_ERELATIVE) /** The given path was neither relative nor absolute. */ #define STATUS_IS_EINCOMPLETE(s) ((s) == CORE_EINCOMPLETE) /** The given path was above the root path. */ #define STATUS_IS_EABOVEROOT(s) ((s) == CORE_EABOVEROOT) /** The given path was bad. */ #define STATUS_IS_EBADPATH(s) ((s) == CORE_EBADPATH) /** The given path contained wildcards. */ #define STATUS_IS_EPATHWILD(s) ((s) == CORE_EPATHWILD) /** Could not find the requested symbol. * For more information call dso_error(). */ #if defined(WIN32) #define STATUS_IS_ESYMNOTFOUND(s) ((s) == CORE_ESYMNOTFOUND \ || TO_OS_ERROR(s) == ERROR_PROC_NOT_FOUND) #else #define STATUS_IS_ESYMNOTFOUND(s) ((s) == CORE_ESYMNOTFOUND) #endif /** The given process was not recognized by CORE. */ #define STATUS_IS_EPROC_UNKNOWN(s) ((s) == CORE_EPROC_UNKNOWN) /** CORE could not gather enough entropy to continue. */ #define STATUS_IS_ENOTENOUGHENTROPY(s) ((s) == CORE_ENOTENOUGHENTROPY) /** @} */ /** * @addtogroup CORE_Error * @{ */ /** @see STATUS_IS_INCHILD */ #define CORE_INCHILD (OS_START_STATUS + 1) /** @see STATUS_IS_INPARENT */ #define CORE_INPARENT (OS_START_STATUS + 2) /** @see STATUS_IS_DETACH */ #define CORE_DETACH (OS_START_STATUS + 3) /** @see STATUS_IS_NOTDETACH */ #define CORE_NOTDETACH (OS_START_STATUS + 4) /** @see STATUS_IS_CHILD_DONE */ #define CORE_CHILD_DONE (OS_START_STATUS + 5) /** @see STATUS_IS_CHILD_NOTDONE */ #define CORE_CHILD_NOTDONE (OS_START_STATUS + 6) /** @see STATUS_IS_TIMEUP */ #define CORE_TIMEUP (OS_START_STATUS + 7) /** @see STATUS_IS_INCOMPLETE */ #define CORE_INCOMPLETE (OS_START_STATUS + 8) /* empty slot: +9 */ /* empty slot: +10 */ /* empty slot: +11 */ /** @see STATUS_IS_BADCH */ #define CORE_BADCH (OS_START_STATUS + 12) /** @see STATUS_IS_BADARG */ #define CORE_BADARG (OS_START_STATUS + 13) /** @see STATUS_IS_EOF */ #define CORE_EOF (OS_START_STATUS + 14) /** @see STATUS_IS_NOTFOUND */ #define CORE_NOTFOUND (OS_START_STATUS + 15) /* empty slot: +16 */ /* empty slot: +17 */ /* empty slot: +18 */ /** @see STATUS_IS_ANONYMOUS */ #define CORE_ANONYMOUS (OS_START_STATUS + 19) /** @see STATUS_IS_FILEBASED */ #define CORE_FILEBASED (OS_START_STATUS + 20) /** @see STATUS_IS_KEYBASED */ #define CORE_KEYBASED (OS_START_STATUS + 21) /** @see STATUS_IS_EINIT */ #define CORE_EINIT (OS_START_STATUS + 22) /** @see STATUS_IS_ENOTIMPL */ #define CORE_ENOTIMPL (OS_START_STATUS + 23) /** @see STATUS_IS_EMISMATCH */ #define CORE_EMISMATCH (OS_START_STATUS + 24) /** @see STATUS_IS_EBUSY */ #define CORE_EBUSY (OS_START_STATUS + 25) /** @} */ /** * @addtogroup STATUS_IS * @{ */ /** * Program is currently executing in the child * @warning * always use this test, as platform-specific variances may meet this * more than one error code */ #define STATUS_IS_INCHILD(s) ((s) == CORE_INCHILD) /** * Program is currently executing in the parent * @warning * always use this test, as platform-specific variances may meet this * more than one error code */ #define STATUS_IS_INPARENT(s) ((s) == CORE_INPARENT) /** * The thread is detached * @warning * always use this test, as platform-specific variances may meet this * more than one error code */ #define STATUS_IS_DETACH(s) ((s) == CORE_DETACH) /** * The thread is not detached * @warning * always use this test, as platform-specific variances may meet this * more than one error code */ #define STATUS_IS_NOTDETACH(s) ((s) == CORE_NOTDETACH) /** * The child has finished executing * @warning * always use this test, as platform-specific variances may meet this * more than one error code */ #define STATUS_IS_CHILD_DONE(s) ((s) == CORE_CHILD_DONE) /** * The child has not finished executing * @warning * always use this test, as platform-specific variances may meet this * more than one error code */ #define STATUS_IS_CHILD_NOTDONE(s) ((s) == CORE_CHILD_NOTDONE) /** * The operation did not finish before the timeout * @warning * always use this test, as platform-specific variances may meet this * more than one error code */ #define STATUS_IS_TIMEUP(s) ((s) == CORE_TIMEUP) /** * The operation was incomplete although some processing was performed * and the results are partially valid. * @warning * always use this test, as platform-specific variances may meet this * more than one error code */ #define STATUS_IS_INCOMPLETE(s) ((s) == CORE_INCOMPLETE) /* empty slot: +9 */ /* empty slot: +10 */ /* empty slot: +11 */ /** * Getopt found an option not in the option string * @warning * always use this test, as platform-specific variances may meet this * more than one error code */ #define STATUS_IS_BADCH(s) ((s) == CORE_BADCH) /** * Getopt found an option not in the option string and an argument was * specified in the option string * @warning * always use this test, as platform-specific variances may meet this * more than one error code */ #define STATUS_IS_BADARG(s) ((s) == CORE_BADARG) /** * CORE has encountered the end of the file * @warning * always use this test, as platform-specific variances may meet this * more than one error code */ #define STATUS_IS_EOF(s) ((s) == CORE_EOF) /** * CORE was unable to find the socket in the poll structure * @warning * always use this test, as platform-specific variances may meet this * more than one error code */ #define STATUS_IS_NOTFOUND(s) ((s) == CORE_NOTFOUND) /* empty slot: +16 */ /* empty slot: +17 */ /* empty slot: +18 */ /** * CORE is using anonymous shared memory * @warning * always use this test, as platform-specific variances may meet this * more than one error code */ #define STATUS_IS_ANONYMOUS(s) ((s) == CORE_ANONYMOUS) /** * CORE is using a file name as the key to the shared memory * @warning * always use this test, as platform-specific variances may meet this * more than one error code */ #define STATUS_IS_FILEBASED(s) ((s) == CORE_FILEBASED) /** * CORE is using a shared key as the key to the shared memory * @warning * always use this test, as platform-specific variances may meet this * more than one error code */ #define STATUS_IS_KEYBASED(s) ((s) == CORE_KEYBASED) /** * Ininitalizer value. If no option has been found, but * the status variable requires a value, this should be used * @warning * always use this test, as platform-specific variances may meet this * more than one error code */ #define STATUS_IS_EINIT(s) ((s) == CORE_EINIT) /** * The CORE function has not been implemented on this * platform, either because nobody has gotten to it yet, * or the function is impossible on this platform. * @warning * always use this test, as platform-specific variances may meet this * more than one error code */ #define STATUS_IS_ENOTIMPL(s) ((s) == CORE_ENOTIMPL) /** * Two passwords do not match. * @warning * always use this test, as platform-specific variances may meet this * more than one error code */ #define STATUS_IS_EMISMATCH(s) ((s) == CORE_EMISMATCH) /** * The given lock was busy * @warning always use this test, as platform-specific variances may meet this * more than one error code */ #define STATUS_IS_EBUSY(s) ((s) == CORE_EBUSY) /** @} */ /** * @addtogroup CORE_Error CORE Error Values * @{ */ /* CORE CANONICAL ERROR VALUES */ /** @see STATUS_IS_EACCES */ #ifdef EACCES #define CORE_EACCES EACCES #else #define CORE_EACCES (OS_START_CANONERR + 1) #endif /** @see STATUS_IS_EEXIST */ #ifdef EEXIST #define CORE_EEXIST EEXIST #else #define CORE_EEXIST (OS_START_CANONERR + 2) #endif /** @see STATUS_IS_ENAMETOOLONG */ #ifdef ENAMETOOLONG #define CORE_ENAMETOOLONG ENAMETOOLONG #else #define CORE_ENAMETOOLONG (OS_START_CANONERR + 3) #endif /** @see STATUS_IS_ENOENT */ #ifdef ENOENT #define CORE_ENOENT ENOENT #else #define CORE_ENOENT (OS_START_CANONERR + 4) #endif /** @see STATUS_IS_ENOTDIR */ #ifdef ENOTDIR #define CORE_ENOTDIR ENOTDIR #else #define CORE_ENOTDIR (OS_START_CANONERR + 5) #endif /** @see STATUS_IS_ENOSPC */ #ifdef ENOSPC #define CORE_ENOSPC ENOSPC #else #define CORE_ENOSPC (OS_START_CANONERR + 6) #endif /** @see STATUS_IS_ENOMEM */ #ifdef ENOMEM #define CORE_ENOMEM ENOMEM #else #define CORE_ENOMEM (OS_START_CANONERR + 7) #endif /** @see STATUS_IS_EMFILE */ #ifdef EMFILE #define CORE_EMFILE EMFILE #else #define CORE_EMFILE (OS_START_CANONERR + 8) #endif /** @see STATUS_IS_ENFILE */ #ifdef ENFILE #define CORE_ENFILE ENFILE #else #define CORE_ENFILE (OS_START_CANONERR + 9) #endif /** @see STATUS_IS_EBADF */ #ifdef EBADF #define CORE_EBADF EBADF #else #define CORE_EBADF (OS_START_CANONERR + 10) #endif /** @see STATUS_IS_EINVAL */ #ifdef EINVAL #define CORE_EINVAL EINVAL #else #define CORE_EINVAL (OS_START_CANONERR + 11) #endif /** @see STATUS_IS_ESPIPE */ #ifdef ESPIPE #define CORE_ESPIPE ESPIPE #else #define CORE_ESPIPE (OS_START_CANONERR + 12) #endif /** * @see STATUS_IS_EAGAIN * @warning use STATUS_IS_EAGAIN instead of just testing this value */ #ifdef EAGAIN #define CORE_EAGAIN EAGAIN #elif defined(EWOULDBLOCK) #define CORE_EAGAIN EWOULDBLOCK #else #define CORE_EAGAIN (OS_START_CANONERR + 13) #endif /** @see STATUS_IS_EINTR */ #ifdef EINTR #define CORE_EINTR EINTR #else #define CORE_EINTR (OS_START_CANONERR + 14) #endif /** @see STATUS_IS_ENOTSOCK */ #ifdef ENOTSOCK #define CORE_ENOTSOCK ENOTSOCK #else #define CORE_ENOTSOCK (OS_START_CANONERR + 15) #endif /** @see STATUS_IS_ECONNREFUSED */ #ifdef ECONNREFUSED #define CORE_ECONNREFUSED ECONNREFUSED #else #define CORE_ECONNREFUSED (OS_START_CANONERR + 16) #endif /** @see STATUS_IS_EINPROGRESS */ #ifdef EINPROGRESS #define CORE_EINPROGRESS EINPROGRESS #else #define CORE_EINPROGRESS (OS_START_CANONERR + 17) #endif /** * @see STATUS_IS_ECONNABORTED * @warning use STATUS_IS_ECONNABORTED instead of just testing this value */ #ifdef ECONNABORTED #define CORE_ECONNABORTED ECONNABORTED #else #define CORE_ECONNABORTED (OS_START_CANONERR + 18) #endif /** @see STATUS_IS_ECONNRESET */ #ifdef ECONNRESET #define CORE_ECONNRESET ECONNRESET #else #define CORE_ECONNRESET (OS_START_CANONERR + 19) #endif /** @see STATUS_IS_ETIMEDOUT * @deprecated */ #ifdef ETIMEDOUT #define CORE_ETIMEDOUT ETIMEDOUT #else #define CORE_ETIMEDOUT (OS_START_CANONERR + 20) #endif /** @see STATUS_IS_EHOSTUNREACH */ #ifdef EHOSTUNREACH #define CORE_EHOSTUNREACH EHOSTUNREACH #else #define CORE_EHOSTUNREACH (OS_START_CANONERR + 21) #endif /** @see STATUS_IS_ENETUNREACH */ #ifdef ENETUNREACH #define CORE_ENETUNREACH ENETUNREACH #else #define CORE_ENETUNREACH (OS_START_CANONERR + 22) #endif /** @see STATUS_IS_EFTYPE */ #ifdef EFTYPE #define CORE_EFTYPE EFTYPE #else #define CORE_EFTYPE (OS_START_CANONERR + 23) #endif /** @see STATUS_IS_EPIPE */ #ifdef EPIPE #define CORE_EPIPE EPIPE #else #define CORE_EPIPE (OS_START_CANONERR + 24) #endif /** @see STATUS_IS_EXDEV */ #ifdef EXDEV #define CORE_EXDEV EXDEV #else #define CORE_EXDEV (OS_START_CANONERR + 25) #endif /** @see STATUS_IS_ENOTEMPTY */ #ifdef ENOTEMPTY #define CORE_ENOTEMPTY ENOTEMPTY #else #define CORE_ENOTEMPTY (OS_START_CANONERR + 26) #endif /** @see STATUS_IS_EAFNOSUPPORT */ #ifdef EAFNOSUPPORT #define CORE_EAFNOSUPPORT EAFNOSUPPORT #else #define CORE_EAFNOSUPPORT (OS_START_CANONERR + 27) #endif /** @} */ #if defined(OS2) && !defined(DOXYGEN) #define FROM_OS_ERROR(e) (e == 0 ? CORE_OK : e + OS_START_SYSERR) #define TO_OS_ERROR(e) (e == 0 ? CORE_OK : e - OS_START_SYSERR) #define INCL_DOSERRORS #define INCL_DOS /* Leave these undefined. * OS2 doesn't rely on the errno concept. * The API calls always return a result codes which * should be filtered through FROM_OS_ERROR(). * * #define get_os_error() (FROM_OS_ERROR(GetLastError())) * #define set_os_error(e) (SetLastError(TO_OS_ERROR(e))) */ /* A special case, only socket calls require this; */ #define get_netos_error() (FROM_OS_ERROR(errno)) #define set_netos_error(e) (errno = TO_OS_ERROR(e)) /* And this needs to be greped away for good: */ #define OS2_STATUS(e) (FROM_OS_ERROR(e)) /* These can't sit in a private header, so in spite of the extra size, * they need to be made available here. */ #define SOCBASEERR 10000 #define SOCEPERM (SOCBASEERR+1) /* Not owner */ #define SOCESRCH (SOCBASEERR+3) /* No such process */ #define SOCEINTR (SOCBASEERR+4) /* Interrupted system call */ #define SOCENXIO (SOCBASEERR+6) /* No such device or address */ #define SOCEBADF (SOCBASEERR+9) /* Bad file number */ #define SOCEACCES (SOCBASEERR+13) /* Permission denied */ #define SOCEFAULT (SOCBASEERR+14) /* Bad address */ #define SOCEINVAL (SOCBASEERR+22) /* Invalid argument */ #define SOCEMFILE (SOCBASEERR+24) /* Too many open files */ #define SOCEPIPE (SOCBASEERR+32) /* Broken pipe */ #define SOCEOS2ERR (SOCBASEERR+100) /* OS/2 Error */ #define SOCEWOULDBLOCK (SOCBASEERR+35) /* Operation would block */ #define SOCEINPROGRESS (SOCBASEERR+36) /* Operation now in progress */ #define SOCEALREADY (SOCBASEERR+37) /* Operation already in progress */ #define SOCENOTSOCK (SOCBASEERR+38) /* Socket operation on non-socket */ #define SOCEDESTADDRREQ (SOCBASEERR+39) /* Destination address required */ #define SOCEMSGSIZE (SOCBASEERR+40) /* Message too long */ #define SOCEPROTOTYPE (SOCBASEERR+41) /* Protocol wrong type for socket */ #define SOCENOPROTOOPT (SOCBASEERR+42) /* Protocol not available */ #define SOCEPROTONOSUPPORT (SOCBASEERR+43) /* Protocol not supported */ #define SOCESOCKTNOSUPPORT (SOCBASEERR+44) /* Socket type not supported */ #define SOCEOPNOTSUPP (SOCBASEERR+45) /* Operation not supported on socket */ #define SOCEPFNOSUPPORT (SOCBASEERR+46) /* Protocol family not supported */ #define SOCEAFNOSUPPORT (SOCBASEERR+47) /* Address family not supported by protocol family */ #define SOCEADDRINUSE (SOCBASEERR+48) /* Address already in use */ #define SOCEADDRNOTAVAIL (SOCBASEERR+49) /* Can't assign requested address */ #define SOCENETDOWN (SOCBASEERR+50) /* Network is down */ #define SOCENETUNREACH (SOCBASEERR+51) /* Network is unreachable */ #define SOCENETRESET (SOCBASEERR+52) /* Network dropped connection on reset */ #define SOCECONNABORTED (SOCBASEERR+53) /* Software caused connection abort */ #define SOCECONNRESET (SOCBASEERR+54) /* Connection reset by peer */ #define SOCENOBUFS (SOCBASEERR+55) /* No buffer space available */ #define SOCEISCONN (SOCBASEERR+56) /* Socket is already connected */ #define SOCENOTCONN (SOCBASEERR+57) /* Socket is not connected */ #define SOCESHUTDOWN (SOCBASEERR+58) /* Can't send after socket shutdown */ #define SOCETOOMANYREFS (SOCBASEERR+59) /* Too many references: can't splice */ #define SOCETIMEDOUT (SOCBASEERR+60) /* Connection timed out */ #define SOCECONNREFUSED (SOCBASEERR+61) /* Connection refused */ #define SOCELOOP (SOCBASEERR+62) /* Too many levels of symbolic links */ #define SOCENAMETOOLONG (SOCBASEERR+63) /* File name too long */ #define SOCEHOSTDOWN (SOCBASEERR+64) /* Host is down */ #define SOCEHOSTUNREACH (SOCBASEERR+65) /* No route to host */ #define SOCENOTEMPTY (SOCBASEERR+66) /* Directory not empty */ /* CORE CANONICAL ERROR TESTS */ #define STATUS_IS_EACCES(s) ((s) == CORE_EACCES \ || (s) == OS_START_SYSERR + ERROR_ACCESS_DENIED \ || (s) == OS_START_SYSERR + ERROR_SHARING_VIOLATION) #define STATUS_IS_EEXIST(s) ((s) == CORE_EEXIST \ || (s) == OS_START_SYSERR + ERROR_OPEN_FAILED \ || (s) == OS_START_SYSERR + ERROR_FILE_EXISTS \ || (s) == OS_START_SYSERR + ERROR_ALREADY_EXISTS \ || (s) == OS_START_SYSERR + ERROR_ACCESS_DENIED) #define STATUS_IS_ENAMETOOLONG(s) ((s) == CORE_ENAMETOOLONG \ || (s) == OS_START_SYSERR + ERROR_FILENAME_EXCED_RANGE \ || (s) == OS_START_SYSERR + SOCENAMETOOLONG) #define STATUS_IS_ENOENT(s) ((s) == CORE_ENOENT \ || (s) == OS_START_SYSERR + ERROR_FILE_NOT_FOUND \ || (s) == OS_START_SYSERR + ERROR_PATH_NOT_FOUND \ || (s) == OS_START_SYSERR + ERROR_NO_MORE_FILES \ || (s) == OS_START_SYSERR + ERROR_OPEN_FAILED) #define STATUS_IS_ENOTDIR(s) ((s) == CORE_ENOTDIR) #define STATUS_IS_ENOSPC(s) ((s) == CORE_ENOSPC \ || (s) == OS_START_SYSERR + ERROR_DISK_FULL) #define STATUS_IS_ENOMEM(s) ((s) == CORE_ENOMEM) #define STATUS_IS_EMFILE(s) ((s) == CORE_EMFILE \ || (s) == OS_START_SYSERR + ERROR_TOO_MANY_OPEN_FILES) #define STATUS_IS_ENFILE(s) ((s) == CORE_ENFILE) #define STATUS_IS_EBADF(s) ((s) == CORE_EBADF \ || (s) == OS_START_SYSERR + ERROR_INVALID_HANDLE) #define STATUS_IS_EINVAL(s) ((s) == CORE_EINVAL \ || (s) == OS_START_SYSERR + ERROR_INVALID_PARAMETER \ || (s) == OS_START_SYSERR + ERROR_INVALID_FUNCTION) #define STATUS_IS_ESPIPE(s) ((s) == CORE_ESPIPE \ || (s) == OS_START_SYSERR + ERROR_NEGATIVE_SEEK) #define STATUS_IS_EAGAIN(s) ((s) == CORE_EAGAIN \ || (s) == OS_START_SYSERR + ERROR_NO_DATA \ || (s) == OS_START_SYSERR + SOCEWOULDBLOCK \ || (s) == OS_START_SYSERR + ERROR_LOCK_VIOLATION) #define STATUS_IS_EINTR(s) ((s) == CORE_EINTR \ || (s) == OS_START_SYSERR + SOCEINTR) #define STATUS_IS_ENOTSOCK(s) ((s) == CORE_ENOTSOCK \ || (s) == OS_START_SYSERR + SOCENOTSOCK) #define STATUS_IS_ECONNREFUSED(s) ((s) == CORE_ECONNREFUSED \ || (s) == OS_START_SYSERR + SOCECONNREFUSED) #define STATUS_IS_EINPROGRESS(s) ((s) == CORE_EINPROGRESS \ || (s) == OS_START_SYSERR + SOCEINPROGRESS) #define STATUS_IS_ECONNABORTED(s) ((s) == CORE_ECONNABORTED \ || (s) == OS_START_SYSERR + SOCECONNABORTED) #define STATUS_IS_ECONNRESET(s) ((s) == CORE_ECONNRESET \ || (s) == OS_START_SYSERR + SOCECONNRESET) /* XXX deprecated */ #define STATUS_IS_ETIMEDOUT(s) ((s) == CORE_ETIMEDOUT \ || (s) == OS_START_SYSERR + SOCETIMEDOUT) #undef STATUS_IS_TIMEUP #define STATUS_IS_TIMEUP(s) ((s) == CORE_TIMEUP \ || (s) == OS_START_SYSERR + SOCETIMEDOUT) #define STATUS_IS_EHOSTUNREACH(s) ((s) == CORE_EHOSTUNREACH \ || (s) == OS_START_SYSERR + SOCEHOSTUNREACH) #define STATUS_IS_ENETUNREACH(s) ((s) == CORE_ENETUNREACH \ || (s) == OS_START_SYSERR + SOCENETUNREACH) #define STATUS_IS_EFTYPE(s) ((s) == CORE_EFTYPE) #define STATUS_IS_EPIPE(s) ((s) == CORE_EPIPE \ || (s) == OS_START_SYSERR + ERROR_BROKEN_PIPE \ || (s) == OS_START_SYSERR + SOCEPIPE) #define STATUS_IS_EXDEV(s) ((s) == CORE_EXDEV \ || (s) == OS_START_SYSERR + ERROR_NOT_SAME_DEVICE) #define STATUS_IS_ENOTEMPTY(s) ((s) == CORE_ENOTEMPTY \ || (s) == OS_START_SYSERR + ERROR_DIR_NOT_EMPTY \ || (s) == OS_START_SYSERR + ERROR_ACCESS_DENIED) #define STATUS_IS_EAFNOSUPPORT(s) ((s) == CORE_AFNOSUPPORT \ || (s) == OS_START_SYSERR + SOCEAFNOSUPPORT) /* Sorry, too tired to wrap this up for OS2... feel free to fit the following into their best matches. { ERROR_NO_SIGNAL_SENT, ESRCH }, { SOCEALREADY, EALREADY }, { SOCEDESTADDRREQ, EDESTADDRREQ }, { SOCEMSGSIZE, EMSGSIZE }, { SOCEPROTOTYPE, EPROTOTYPE }, { SOCENOPROTOOPT, ENOPROTOOPT }, { SOCEPROTONOSUPPORT, EPROTONOSUPPORT }, { SOCESOCKTNOSUPPORT, ESOCKTNOSUPPORT }, { SOCEOPNOTSUPP, EOPNOTSUPP }, { SOCEPFNOSUPPORT, EPFNOSUPPORT }, { SOCEADDRINUSE, EADDRINUSE }, { SOCEADDRNOTAVAIL, EADDRNOTAVAIL }, { SOCENETDOWN, ENETDOWN }, { SOCENETRESET, ENETRESET }, { SOCENOBUFS, ENOBUFS }, { SOCEISCONN, EISCONN }, { SOCENOTCONN, ENOTCONN }, { SOCESHUTDOWN, ESHUTDOWN }, { SOCETOOMANYREFS, ETOOMANYREFS }, { SOCELOOP, ELOOP }, { SOCEHOSTDOWN, EHOSTDOWN }, { SOCENOTEMPTY, ENOTEMPTY }, { SOCEPIPE, EPIPE } */ #elif defined(WIN32) && !defined(DOXYGEN) /* !defined(OS2) */ #define FROM_OS_ERROR(e) (e == 0 ? CORE_OK : e + OS_START_SYSERR) #define TO_OS_ERROR(e) (e == 0 ? CORE_OK : e - OS_START_SYSERR) #define get_os_error() (FROM_OS_ERROR(GetLastError())) #define set_os_error(e) (SetLastError(TO_OS_ERROR(e))) /* A special case, only socket calls require this: */ #define get_netos_error() (FROM_OS_ERROR(WSAGetLastError())) #define set_netos_error(e) (WSASetLastError(TO_OS_ERROR(e))) /* CORE CANONICAL ERROR TESTS */ #define STATUS_IS_EACCES(s) ((s) == CORE_EACCES \ || (s) == OS_START_SYSERR + ERROR_ACCESS_DENIED \ || (s) == OS_START_SYSERR + ERROR_CANNOT_MAKE \ || (s) == OS_START_SYSERR + ERROR_CURRENT_DIRECTORY \ || (s) == OS_START_SYSERR + ERROR_DRIVE_LOCKED \ || (s) == OS_START_SYSERR + ERROR_FAIL_I24 \ || (s) == OS_START_SYSERR + ERROR_LOCK_VIOLATION \ || (s) == OS_START_SYSERR + ERROR_LOCK_FAILED \ || (s) == OS_START_SYSERR + ERROR_NOT_LOCKED \ || (s) == OS_START_SYSERR + ERROR_NETWORK_ACCESS_DENIED \ || (s) == OS_START_SYSERR + ERROR_SHARING_VIOLATION) #define STATUS_IS_EEXIST(s) ((s) == CORE_EEXIST \ || (s) == OS_START_SYSERR + ERROR_FILE_EXISTS \ || (s) == OS_START_SYSERR + ERROR_ALREADY_EXISTS) #define STATUS_IS_ENAMETOOLONG(s) ((s) == CORE_ENAMETOOLONG \ || (s) == OS_START_SYSERR + ERROR_FILENAME_EXCED_RANGE \ || (s) == OS_START_SYSERR + WSAENAMETOOLONG) #define STATUS_IS_ENOENT(s) ((s) == CORE_ENOENT \ || (s) == OS_START_SYSERR + ERROR_FILE_NOT_FOUND \ || (s) == OS_START_SYSERR + ERROR_PATH_NOT_FOUND \ || (s) == OS_START_SYSERR + ERROR_OPEN_FAILED \ || (s) == OS_START_SYSERR + ERROR_NO_MORE_FILES) #define STATUS_IS_ENOTDIR(s) ((s) == CORE_ENOTDIR \ || (s) == OS_START_SYSERR + ERROR_PATH_NOT_FOUND \ || (s) == OS_START_SYSERR + ERROR_BAD_NETPATH \ || (s) == OS_START_SYSERR + ERROR_BAD_NET_NAME \ || (s) == OS_START_SYSERR + ERROR_BAD_PATHNAME \ || (s) == OS_START_SYSERR + ERROR_INVALID_DRIVE) #define STATUS_IS_ENOSPC(s) ((s) == CORE_ENOSPC \ || (s) == OS_START_SYSERR + ERROR_DISK_FULL) #define STATUS_IS_ENOMEM(s) ((s) == CORE_ENOMEM \ || (s) == OS_START_SYSERR + ERROR_ARENA_TRASHED \ || (s) == OS_START_SYSERR + ERROR_NOT_ENOUGH_MEMORY \ || (s) == OS_START_SYSERR + ERROR_INVALID_BLOCK \ || (s) == OS_START_SYSERR + ERROR_NOT_ENOUGH_QUOTA \ || (s) == OS_START_SYSERR + ERROR_OUTOFMEMORY) #define STATUS_IS_EMFILE(s) ((s) == CORE_EMFILE \ || (s) == OS_START_SYSERR + ERROR_TOO_MANY_OPEN_FILES) #define STATUS_IS_ENFILE(s) ((s) == CORE_ENFILE) #define STATUS_IS_EBADF(s) ((s) == CORE_EBADF \ || (s) == OS_START_SYSERR + ERROR_INVALID_HANDLE \ || (s) == OS_START_SYSERR + ERROR_INVALID_TARGET_HANDLE) #define STATUS_IS_EINVAL(s) ((s) == CORE_EINVAL \ || (s) == OS_START_SYSERR + ERROR_INVALID_ACCESS \ || (s) == OS_START_SYSERR + ERROR_INVALID_DATA \ || (s) == OS_START_SYSERR + ERROR_INVALID_FUNCTION \ || (s) == OS_START_SYSERR + ERROR_INVALID_HANDLE \ || (s) == OS_START_SYSERR + ERROR_INVALID_PARAMETER \ || (s) == OS_START_SYSERR + ERROR_NEGATIVE_SEEK) #define STATUS_IS_ESPIPE(s) ((s) == CORE_ESPIPE \ || (s) == OS_START_SYSERR + ERROR_SEEK_ON_DEVICE \ || (s) == OS_START_SYSERR + ERROR_NEGATIVE_SEEK) #define STATUS_IS_EAGAIN(s) ((s) == CORE_EAGAIN \ || (s) == OS_START_SYSERR + ERROR_NO_DATA \ || (s) == OS_START_SYSERR + ERROR_NO_PROC_SLOTS \ || (s) == OS_START_SYSERR + ERROR_NESTING_NOT_ALLOWED \ || (s) == OS_START_SYSERR + ERROR_MAX_THRDS_REACHED \ || (s) == OS_START_SYSERR + ERROR_LOCK_VIOLATION \ || (s) == OS_START_SYSERR + WSAEWOULDBLOCK) #define STATUS_IS_EINTR(s) ((s) == CORE_EINTR \ || (s) == OS_START_SYSERR + WSAEINTR) #define STATUS_IS_ENOTSOCK(s) ((s) == CORE_ENOTSOCK \ || (s) == OS_START_SYSERR + WSAENOTSOCK) #define STATUS_IS_ECONNREFUSED(s) ((s) == CORE_ECONNREFUSED \ || (s) == OS_START_SYSERR + WSAECONNREFUSED) #define STATUS_IS_EINPROGRESS(s) ((s) == CORE_EINPROGRESS \ || (s) == OS_START_SYSERR + WSAEINPROGRESS) #define STATUS_IS_ECONNABORTED(s) ((s) == CORE_ECONNABORTED \ || (s) == OS_START_SYSERR + WSAECONNABORTED) #define STATUS_IS_ECONNRESET(s) ((s) == CORE_ECONNRESET \ || (s) == OS_START_SYSERR + ERROR_NETNAME_DELETED \ || (s) == OS_START_SYSERR + WSAECONNRESET) /* XXX deprecated */ #define STATUS_IS_ETIMEDOUT(s) ((s) == CORE_ETIMEDOUT \ || (s) == OS_START_SYSERR + WSAETIMEDOUT \ || (s) == OS_START_SYSERR + WAIT_TIMEOUT) #undef STATUS_IS_TIMEUP #define STATUS_IS_TIMEUP(s) ((s) == CORE_TIMEUP \ || (s) == OS_START_SYSERR + WSAETIMEDOUT \ || (s) == OS_START_SYSERR + WAIT_TIMEOUT) #define STATUS_IS_EHOSTUNREACH(s) ((s) == CORE_EHOSTUNREACH \ || (s) == OS_START_SYSERR + WSAEHOSTUNREACH) #define STATUS_IS_ENETUNREACH(s) ((s) == CORE_ENETUNREACH \ || (s) == OS_START_SYSERR + WSAENETUNREACH) #define STATUS_IS_EFTYPE(s) ((s) == CORE_EFTYPE \ || (s) == OS_START_SYSERR + ERROR_EXE_MACHINE_TYPE_MISMATCH \ || (s) == OS_START_SYSERR + ERROR_INVALID_DLL \ || (s) == OS_START_SYSERR + ERROR_INVALID_MODULETYPE \ || (s) == OS_START_SYSERR + ERROR_BAD_EXE_FORMAT \ || (s) == OS_START_SYSERR + ERROR_INVALID_EXE_SIGNATURE \ || (s) == OS_START_SYSERR + ERROR_FILE_CORRUPT \ || (s) == OS_START_SYSERR + ERROR_BAD_FORMAT) #define STATUS_IS_EPIPE(s) ((s) == CORE_EPIPE \ || (s) == OS_START_SYSERR + ERROR_BROKEN_PIPE) #define STATUS_IS_EXDEV(s) ((s) == CORE_EXDEV \ || (s) == OS_START_SYSERR + ERROR_NOT_SAME_DEVICE) #define STATUS_IS_ENOTEMPTY(s) ((s) == CORE_ENOTEMPTY \ || (s) == OS_START_SYSERR + ERROR_DIR_NOT_EMPTY) #define STATUS_IS_EAFNOSUPPORT(s) ((s) == CORE_EAFNOSUPPORT \ || (s) == OS_START_SYSERR + WSAEAFNOSUPPORT) #elif defined(NETWARE) && defined(USE_WINSOCK) && !defined(DOXYGEN) /* !defined(OS2) && !defined(WIN32) */ #define FROM_OS_ERROR(e) (e == 0 ? CORE_OK : e + OS_START_SYSERR) #define TO_OS_ERROR(e) (e == 0 ? CORE_OK : e - OS_START_SYSERR) #define get_os_error() (errno) #define set_os_error(e) (errno = (e)) /* A special case, only socket calls require this: */ #define get_netos_error() (FROM_OS_ERROR(WSAGetLastError())) #define set_netos_error(e) (WSASetLastError(TO_OS_ERROR(e))) /* CORE CANONICAL ERROR TESTS */ #define STATUS_IS_EACCES(s) ((s) == CORE_EACCES) #define STATUS_IS_EEXIST(s) ((s) == CORE_EEXIST) #define STATUS_IS_ENAMETOOLONG(s) ((s) == CORE_ENAMETOOLONG) #define STATUS_IS_ENOENT(s) ((s) == CORE_ENOENT) #define STATUS_IS_ENOTDIR(s) ((s) == CORE_ENOTDIR) #define STATUS_IS_ENOSPC(s) ((s) == CORE_ENOSPC) #define STATUS_IS_ENOMEM(s) ((s) == CORE_ENOMEM) #define STATUS_IS_EMFILE(s) ((s) == CORE_EMFILE) #define STATUS_IS_ENFILE(s) ((s) == CORE_ENFILE) #define STATUS_IS_EBADF(s) ((s) == CORE_EBADF) #define STATUS_IS_EINVAL(s) ((s) == CORE_EINVAL) #define STATUS_IS_ESPIPE(s) ((s) == CORE_ESPIPE) #define STATUS_IS_EAGAIN(s) ((s) == CORE_EAGAIN \ || (s) == EWOULDBLOCK \ || (s) == OS_START_SYSERR + WSAEWOULDBLOCK) #define STATUS_IS_EINTR(s) ((s) == CORE_EINTR \ || (s) == OS_START_SYSERR + WSAEINTR) #define STATUS_IS_ENOTSOCK(s) ((s) == CORE_ENOTSOCK \ || (s) == OS_START_SYSERR + WSAENOTSOCK) #define STATUS_IS_ECONNREFUSED(s) ((s) == CORE_ECONNREFUSED \ || (s) == OS_START_SYSERR + WSAECONNREFUSED) #define STATUS_IS_EINPROGRESS(s) ((s) == CORE_EINPROGRESS \ || (s) == OS_START_SYSERR + WSAEINPROGRESS) #define STATUS_IS_ECONNABORTED(s) ((s) == CORE_ECONNABORTED \ || (s) == OS_START_SYSERR + WSAECONNABORTED) #define STATUS_IS_ECONNRESET(s) ((s) == CORE_ECONNRESET \ || (s) == OS_START_SYSERR + WSAECONNRESET) /* XXX deprecated */ #define STATUS_IS_ETIMEDOUT(s) ((s) == CORE_ETIMEDOUT \ || (s) == OS_START_SYSERR + WSAETIMEDOUT \ || (s) == OS_START_SYSERR + WAIT_TIMEOUT) #undef STATUS_IS_TIMEUP #define STATUS_IS_TIMEUP(s) ((s) == CORE_TIMEUP \ || (s) == OS_START_SYSERR + WSAETIMEDOUT \ || (s) == OS_START_SYSERR + WAIT_TIMEOUT) #define STATUS_IS_EHOSTUNREACH(s) ((s) == CORE_EHOSTUNREACH \ || (s) == OS_START_SYSERR + WSAEHOSTUNREACH) #define STATUS_IS_ENETUNREACH(s) ((s) == CORE_ENETUNREACH \ || (s) == OS_START_SYSERR + WSAENETUNREACH) #define STATUS_IS_ENETDOWN(s) ((s) == OS_START_SYSERR + WSAENETDOWN) #define STATUS_IS_EFTYPE(s) ((s) == CORE_EFTYPE) #define STATUS_IS_EPIPE(s) ((s) == CORE_EPIPE) #define STATUS_IS_EXDEV(s) ((s) == CORE_EXDEV) #define STATUS_IS_ENOTEMPTY(s) ((s) == CORE_ENOTEMPTY) #define STATUS_IS_EAFNOSUPPORT(s) ((s) == CORE_EAFNOSUPPORT \ || (s) == OS_START_SYSERR + WSAEAFNOSUPPORT) #else /* !defined(NETWARE) && !defined(OS2) && !defined(WIN32) */ /* * os error codes are clib error codes */ #define FROM_OS_ERROR(e) (e) #define TO_OS_ERROR(e) (e) #define get_os_error() (errno) #define set_os_error(e) (errno = (e)) /* A special case, only socket calls require this: */ #define get_netos_error() (errno) #define set_netos_error(e) (errno = (e)) /** * @addtogroup STATUS_IS * @{ */ /** permission denied */ #define STATUS_IS_EACCES(s) ((s) == CORE_EACCES) /** file exists */ #define STATUS_IS_EEXIST(s) ((s) == CORE_EEXIST) /** path name is too long */ #define STATUS_IS_ENAMETOOLONG(s) ((s) == CORE_ENAMETOOLONG) /** * no such file or directory * @remark * EMVSCATLG can be returned by the automounter on z/OS for * paths which do not exist. */ #ifdef EMVSCATLG #define STATUS_IS_ENOENT(s) ((s) == CORE_ENOENT \ || (s) == EMVSCATLG) #else #define STATUS_IS_ENOENT(s) ((s) == CORE_ENOENT) #endif /** not a directory */ #define STATUS_IS_ENOTDIR(s) ((s) == CORE_ENOTDIR) /** no space left on device */ #ifdef EDQUOT #define STATUS_IS_ENOSPC(s) ((s) == CORE_ENOSPC \ || (s) == EDQUOT) #else #define STATUS_IS_ENOSPC(s) ((s) == CORE_ENOSPC) #endif /** not enough memory */ #define STATUS_IS_ENOMEM(s) ((s) == CORE_ENOMEM) /** too many open files */ #define STATUS_IS_EMFILE(s) ((s) == CORE_EMFILE) /** file table overflow */ #define STATUS_IS_ENFILE(s) ((s) == CORE_ENFILE) /** bad file # */ #define STATUS_IS_EBADF(s) ((s) == CORE_EBADF) /** invalid argument */ #define STATUS_IS_EINVAL(s) ((s) == CORE_EINVAL) /** illegal seek */ #define STATUS_IS_ESPIPE(s) ((s) == CORE_ESPIPE) /** operation would block */ #if !defined(EWOULDBLOCK) || !defined(EAGAIN) #define STATUS_IS_EAGAIN(s) ((s) == CORE_EAGAIN) #elif (EWOULDBLOCK == EAGAIN) #define STATUS_IS_EAGAIN(s) ((s) == CORE_EAGAIN) #else #define STATUS_IS_EAGAIN(s) ((s) == CORE_EAGAIN \ || (s) == EWOULDBLOCK) #endif /** interrupted system call */ #define STATUS_IS_EINTR(s) ((s) == CORE_EINTR) /** socket operation on a non-socket */ #define STATUS_IS_ENOTSOCK(s) ((s) == CORE_ENOTSOCK) /** Connection Refused */ #define STATUS_IS_ECONNREFUSED(s) ((s) == CORE_ECONNREFUSED) /** operation now in progress */ #define STATUS_IS_EINPROGRESS(s) ((s) == CORE_EINPROGRESS) /** * Software caused connection abort * @remark * EPROTO on certain older kernels really means ECONNABORTED, so we need to * ignore it for them. See discussion in new-httpd archives nh.9701 & nh.9603 * * There is potentially a bug in Solaris 2.x x<6, and other boxes that * implement tcp sockets in userland (i.e. on top of STREAMS). On these * systems, EPROTO can actually result in a fatal loop. See PR#981 for * example. It's hard to handle both uses of EPROTO. */ #ifdef EPROTO #define STATUS_IS_ECONNABORTED(s) ((s) == CORE_ECONNABORTED \ || (s) == EPROTO) #else #define STATUS_IS_ECONNABORTED(s) ((s) == CORE_ECONNABORTED) #endif /** Connection Reset by peer */ #define STATUS_IS_ECONNRESET(s) ((s) == CORE_ECONNRESET) /** Operation timed out * @deprecated */ #define STATUS_IS_ETIMEDOUT(s) ((s) == CORE_ETIMEDOUT) /** no route to host */ #define STATUS_IS_EHOSTUNREACH(s) ((s) == CORE_EHOSTUNREACH) /** network is unreachable */ #define STATUS_IS_ENETUNREACH(s) ((s) == CORE_ENETUNREACH) /** inappropiate file type or format */ #define STATUS_IS_EFTYPE(s) ((s) == CORE_EFTYPE) /** broken pipe */ #define STATUS_IS_EPIPE(s) ((s) == CORE_EPIPE) /** cross device link */ #define STATUS_IS_EXDEV(s) ((s) == CORE_EXDEV) /** Directory Not Empty */ #define STATUS_IS_ENOTEMPTY(s) ((s) == CORE_ENOTEMPTY || \ (s) == CORE_EEXIST) /** Address Family not supported */ #define STATUS_IS_EAFNOSUPPORT(s) ((s) == CORE_EAFNOSUPPORT) /** @} */ #endif /* !defined(NETWARE) && !defined(OS2) && !defined(WIN32) */ /** @} */ #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* ! __CORE_ERRNO_H__ */ nextepc-0.3.10/lib/core/include/core_event.h000066400000000000000000000072711333553357400207060ustar00rootroot00000000000000#ifndef __EVENT_H__ #define __EVENT_H__ #include "core_msgq.h" #include "core_timer.h" #include "core_fsm.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define EVENT_SIZE sizeof(event_t) #define event_set(__ptr_e, __evnt) ((__ptr_e)->event = (__evnt)) #define event_get(__ptr_e) ((__ptr_e)->event) #define event_set_param1(__ptr_e, __param) \ ((__ptr_e)->param1 = (c_uintptr_t)(__param)) #define event_set_param2(__ptr_e, __param) \ ((__ptr_e)->param2 = (c_uintptr_t)(__param)) #define event_set_param3(__ptr_e, __param) \ ((__ptr_e)->param3 = (c_uintptr_t)(__param)) #define event_set_param4(__ptr_e, __param) \ ((__ptr_e)->param4 = (c_uintptr_t)(__param)) #define event_set_param5(__ptr_e, __param) \ ((__ptr_e)->param5 = (c_uintptr_t)(__param)) #define event_set_param6(__ptr_e, __param) \ ((__ptr_e)->param6 = (c_uintptr_t)(__param)) #define event_set_param7(__ptr_e, __param) \ ((__ptr_e)->param7 = (c_uintptr_t)(__param)) #define event_set_param8(__ptr_e, __param) \ ((__ptr_e)->param8 = (c_uintptr_t)(__param)) #define event_get_param1(__ptr_e) ((__ptr_e)->param1) #define event_get_param2(__ptr_e) ((__ptr_e)->param2) #define event_get_param3(__ptr_e) ((__ptr_e)->param3) #define event_get_param4(__ptr_e) ((__ptr_e)->param4) #define event_get_param5(__ptr_e) ((__ptr_e)->param5) #define event_get_param6(__ptr_e) ((__ptr_e)->param6) #define event_get_param7(__ptr_e) ((__ptr_e)->param7) #define event_get_param8(__ptr_e) ((__ptr_e)->param8) #define timer_create(__tm_service, __ptr_e, __duration) \ event_timer_create((__tm_service), TIMER_TYPE_ONE_SHOT, \ (__duration), (__ptr_e)) #define periodic_timer_create(__tm_service, __ptr_e, __duration) \ event_timer_create((__tm_service), TIMER_TYPE_PERIODIC, \ (__duration), (__ptr_e)) #define timer_set_param1(__ptr_e, __param) tm_set_param2(__ptr_e, __param); #define timer_set_param2(__ptr_e, __param) tm_set_param3(__ptr_e, __param); #define timer_set_param3(__ptr_e, __param) tm_set_param4(__ptr_e, __param); #define timer_set_param4(__ptr_e, __param) tm_set_param5(__ptr_e, __param); #define timer_set_param5(__ptr_e, __param) tm_set_param6(__ptr_e, __param); typedef struct { fsm_event_t event; c_uintptr_t param1; c_uintptr_t param2; c_uintptr_t param3; c_uintptr_t param4; c_uintptr_t param5; c_uintptr_t param6; c_uintptr_t param7; c_uintptr_t param8; } event_t; extern char *EVT_NAME_UNKNOWN; /** * Create event message queue * * @return event queue or 0 */ CORE_DECLARE(msgq_id) event_create(int opt); /** * Delete event message queue * * @return CORE_OK or CORE_ERROR */ CORE_DECLARE(status_t) event_delete(msgq_id queue_id); /** * Send a event to event queue * * @return If success, return CORE_OK * If queue is full, return CORE_EAGAIN * If else, return CORE_ERROR */ CORE_DECLARE(status_t) event_send(msgq_id queue_id, event_t *e); /** * Receive a event from event queue * * @return If success, return CORE_OK * If queue is empty, return CORE_EAGAIN * If else, return CORE_ERROR. */ CORE_DECLARE(status_t) event_recv(msgq_id queue_id, event_t *e); /** * Receive a event from event queue with timeout * * @return If success, return CORE_OK * If timout occurs, return CORE_TIMEUP. * If queue is empty, return CORE_EAGAIN * If else, return CORE_ERROR. */ CORE_DECLARE(status_t) event_timedrecv( msgq_id queue_id, event_t *e, c_time_t timeout); /** * Create a timer */ CORE_DECLARE(tm_block_id) event_timer_create(tm_service_t *tm_service, tm_type_e type, c_uint32_t duration, c_uintptr_t event); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __EVENT_H__ */ nextepc-0.3.10/lib/core/include/core_file.h000066400000000000000000000562471333553357400205130ustar00rootroot00000000000000#ifndef __CORE_FILE_H__ #define __CORE_FILE_H__ /** * @file core_file.h * @brief CORE File I/O Handling */ #include "core.h" #include "core_time.h" #include "core_errno.h" #include "core_param.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * @defgroup file_io File I/O Handling Functions * @ingroup CORE * @{ */ /** filetype_e values for the filetype member of the * file_info_t structure * @warning: Not all of the filetypes below can be determined. * For example, a given platform might not correctly report * a socket descriptor as CORE_SOCK if that type isn't * well-identified on that platform. In such cases where * a filetype exists but cannot be described by the recognized * flags below, the filetype will be CORE_UNKFILE. If the * filetype member is not determined, the type will be CORE_NOFILE. */ typedef enum { FILE_NOFILE = 0, /**< no file type determined */ FILE_REG, /**< a regular file */ FILE_DIR, /**< a directory */ FILE_CHR, /**< a character device */ FILE_BLK, /**< a block device */ FILE_PIPE, /**< a FIFO / pipe */ FILE_LNK, /**< a symbolic link */ FILE_SOCK, /**< a [unix domain] socket */ FILE_UNKFILE = 127 /**< a file of some other unknown type */ } filetype_e; /** * @defgroup file_permissions File Permissions flags * @{ */ #define FILE_USETID 0x8000 /**< Set user id */ #define FILE_UREAD 0x0400 /**< Read by user */ #define FILE_UWRITE 0x0200 /**< Write by user */ #define FILE_UEXECUTE 0x0100 /**< Execute by user */ #define FILE_GSETID 0x4000 /**< Set group id */ #define FILE_GREAD 0x0040 /**< Read by group */ #define FILE_GWRITE 0x0020 /**< Write by group */ #define FILE_GEXECUTE 0x0010 /**< Execute by group */ #define FILE_WSTICKY 0x2000 /**< Sticky bit */ #define FILE_WREAD 0x0004 /**< Read by others */ #define FILE_WWRITE 0x0002 /**< Write by others */ #define FILE_WEXECUTE 0x0001 /**< Execute by others */ #define FILE_OS_DEFAULT 0x0FFF /**< use OS's default permissions */ /* additional permission flags for file_copy and file_append */ #define FILE_SOURCE_PERMS 0x1000 /**< Copy source file's permissions */ /** @} */ /** * @defgroup file_open_flags File Open Flags/Routines * @{ */ /* Note to implementors: Values in the range 0x00100000--0x80000000 are reserved for platform-specific values. */ #define FILE_READ 0x00001 /**< Open the file for reading */ #define FILE_WRITE 0x00002 /**< Open the file for writing */ #define FILE_CREATE 0x00004 /**< Create the file if not there */ #define FILE_APPEND 0x00008 /**< Append to the end of the file */ #define FILE_TRUNCATE 0x00010 /**< Open the file and truncate to 0 length */ #define FILE_BINARY 0x00020 /**< Open the file in binary mode */ #define FILE_EXCL 0x00040 /**< Open should fail if FILE_CREATE and file exists. */ #define FILE_DELONCLOSE 0x00100 /**< Delete the file after close */ /** @} */ /** * @defgroup file_seek_flags File Seek Flags * @{ */ /* flags for file_seek */ /** Set the file position */ #define FILE_SET SEEK_SET /** Current */ #define FILE_CUR SEEK_CUR /** Go to end of file */ #define FILE_END SEEK_END /** @} */ /** * @defgroup file_attrs_set_flags File Attribute Flags * @{ */ /* flags for file_attrs_set */ #define ATTR_READONLY 0x01 /**< File is read-only */ #define ATTR_EXECUTABLE 0x02 /**< File is executable */ #define ATTR_HIDDEN 0x04 /**< File is hidden */ /** @} */ /** * @defgroup file_writev{_full} max iovec size * @{ */ #if defined(DOXYGEN) #define MAX_IOVEC_SIZE 1024 /**< System dependent maximum size of an iovec array */ #elif defined(IOV_MAX) #define MAX_IOVEC_SIZE IOV_MAX #elif defined(MAX_IOVEC) #define MAX_IOVEC_SIZE MAX_IOVEC #else #define MAX_IOVEC_SIZE 1024 #endif /** @} */ /** File attributes */ typedef c_uint32_t file_attrs_t; /** Type to pass as whence argument to file_seek. */ typedef int seek_where_t; /** * Structure for referencing files. */ typedef struct file_t file_t; /** * Structure for referencing directories. */ typedef struct dir_t dir_t; /** * Structure for determining file permissions. */ typedef c_int32_t file_perms_t; #if (defined WIN32) || (defined NETWARE) /** * Structure for determining the device the file is on. */ typedef c_uint32_t dev_t; #endif /** @} */ /** * @defgroup file_stat Stat Functions * @{ */ /** file info structure */ typedef struct file_info_t file_info_t; #define FILE_INFO_LINK 0x00000001 /**< Stat the link not the file itself if it is a link */ #define FILE_INFO_MTIME 0x00000010 /**< Modification Time */ #define FILE_INFO_CTIME 0x00000020 /**< Creation or inode-changed time */ #define FILE_INFO_ATIME 0x00000040 /**< Access Time */ #define FILE_INFO_SIZE 0x00000100 /**< Size of the file */ #define FILE_INFO_CSIZE 0x00000200 /**< Storage size consumed by the file */ #define FILE_INFO_DEV 0x00001000 /**< Device */ #define FILE_INFO_INODE 0x00002000 /**< Inode */ #define FILE_INFO_NLINK 0x00004000 /**< Number of links */ #define FILE_INFO_TYPE 0x00008000 /**< Type */ #define FILE_INFO_USER 0x00010000 /**< User */ #define FILE_INFO_GROUP 0x00020000 /**< Group */ #define FILE_INFO_UPROT 0x00100000 /**< User protection bits */ #define FILE_INFO_GPROT 0x00200000 /**< Group protection bits */ #define FILE_INFO_WPROT 0x00400000 /**< World protection bits */ #define FILE_INFO_ICASE 0x01000000 /**< if dev is case insensitive */ #define FILE_INFO_NAME 0x02000000 /**< ->name in proper case */ #define FILE_INFO_MIN 0x00008170 /**< type, mtime, ctime, atime, size */ #define FILE_INFO_IDENT 0x00003000 /**< dev and inode */ #define FILE_INFO_OWNER 0x00030000 /**< user and group */ #define FILE_INFO_PROT 0x00700000 /**< all protections */ #define FILE_INFO_NORM 0x0073b170 /**< an atomic unix file_stat() */ #define FILE_INFO_DIRENT 0x02000000 /**< an atomic unix dir_read() */ /** * The file information structure. This is analogous to the POSIX * stat structure. */ struct file_info_t { /** The bitmask describing valid fields of this c_file_info_t structure * including all available 'wanted' fields and potentially more */ c_int32_t valid; /** The access permissions of the file. Mimics Unix access rights. */ file_perms_t protection; /** The type of file. One of CORE_REG, CORE_DIR, CORE_CHR, CORE_BLK, CORE_PIPE, CORE_LNK or CORE_SOCK. If the type is undetermined, the value is CORE_NOFILE. * If the type cannot be determined, the value is CORE_UNKFILE. */ filetype_e filetype; /** The user id that owns the file */ uid_t user; /** The group id that owns the file */ gid_t group; /** The inode of the file. */ ino_t inode; /** The id of the device the file is on. */ dev_t device; /** The number of hard links to the file. */ c_int32_t nlink; /** The size of the file */ off_t size; /** The storage size consumed by the file */ off_t csize; /** The time the file was last accessed */ c_time_t atime; /** The time the file was last modified */ c_time_t mtime; /** The time the file was created, or the inode was last changed */ c_time_t ctime; /** The pathname of the file (possibly unrooted) */ char fname[MAX_FILENAME_SIZE]; /** The file's name (no path) in filesystem case */ char name[MAX_FILENAME_SIZE]; /** The file's handle, if accessed (can be submitted to c_duphandle) */ struct c_file_t *filehand; }; /** @} */ /** * Initialize the file utility. */ CORE_DECLARE(status_t) file_init(void); /** * Finalize the file utility. */ CORE_DECLARE(status_t) file_final(void); /** * Open the specified file. * @param newf The opened file descriptor. * @param fname The full path to the file (using / on all systems) * @param flag Or'ed value of: *
 *         FILE_READ              open for reading
 *         FILE_WRITE             open for writing
 *         FILE_CREATE            create the file if not there
 *         FILE_APPEND            file ptr is set to end prior to all writes
 *         FILE_TRUNCATE          set length to zero if file exists
 *         FILE_BINARY            not a text file (This flag is ignored on
 *                               UNIX because it has no meaning)
 *         FILE_EXCL              return error if FILE_CREATE and file exists
 *         FILE_DELONCLOSE        delete the file after closing.
 * 
* @param perm Access permissions for file. * @remark If perm is FILE_OS_DEFAULT and the file is being created, * appropriate default permissions will be used. */ CORE_DECLARE(status_t) file_open(file_t **newf, const char *fname, c_int32_t flag, file_perms_t perm); /** * Close the specified file. * @param file The file descriptor to close. */ CORE_DECLARE(status_t) file_close(file_t *file); /** * Delete the specified file. * @param path The full path to the file (using / on all systems) * @remark If the file is open, it won't be removed until all * instances are closed. */ CORE_DECLARE(status_t) file_remove(const char *path); /** * Rename the specified file. * @param from_path The full path to the original file (using / on all systems) * @param to_path The full path to the new file (using / on all systems) * @warning If a file exists at the new location, then it will be * overwritten. Moving files or directories across devices may not be * possible. */ CORE_DECLARE(status_t) file_rename(const char *from_path, const char *to_path); /** * Create a hard link to the specified file. * @param from_path The full path to the original file (using / on all systems) * @param to_path The full path to the new file (using / on all systems) * @remark Both files must reside on the same device. */ CORE_DECLARE(status_t) file_link(const char *from_path, const char *to_path); /** * Copy the specified file to another file. * @param from_path The full path to the original file (using / on all systems) * @param to_path The full path to the new file (using / on all systems) * @param perms Access permissions for the new file if it is created. * In place of the usual or'd combination of file permissions, the * value CORE_SOURCE_PERMS may be given, in which case the source * file's permissions are copied. * @remark The new file does not need to exist, it will be created if required. * @warning If the new file already exists, its contents will be overwritten. */ CORE_DECLARE(status_t) file_copy( const char *from_path, const char *to_path, file_perms_t perms); /** * Append the specified file to another file. * @param from_path The full path to the source file (use / on all systems) * @param to_path The full path to the destination file (use / on all systems) * @param perms Access permissions for the destination file if it is created. * In place of the usual or'd combination of file permissions, the * value CORE_SOURCE_PERMS may be given, in which case the source * file's permissions are copied. * @remark The new file does not need to exist, it will be created if required. */ CORE_DECLARE(status_t) file_append( const char *from_path, const char *to_path, file_perms_t perms); /** * Are we at the end of the file * @param fptr The core file we are testing. * @remark Returns CORE_EOF if we are at the end of file, * CORE_OK otherwise. */ CORE_DECLARE(status_t) file_eof(file_t *fptr); /** * Read data from the specified file. * @param thefile The file descriptor to read from. * @param buf The buffer to store the data to. * @param nbytes On entry, the number of bytes to read; on exit, the number * of bytes read. * * @remark file_read will read up to the specified number of * bytes, but never more. If there isn't enough data to fill that * number of bytes, all of the available data is read. The third * argument is modified to reflect the number of bytes read. If a * char was put back into the stream via ungetc, it will be the first * character returned. * * @remark It is not possible for both bytes to be read and an CORE_EOF * or other error to be returned. CORE_EINTR is never returned. */ CORE_DECLARE(status_t) file_read(file_t *thefile, void *buf, size_t *nbytes); /** * Write data to the specified file. * @param thefile The file descriptor to write to. * @param buf The buffer which contains the data. * @param nbytes On entry, the number of bytes to write; on exit, the number * of bytes written. * * @remark file_write will write up to the specified number of * bytes, but never more. If the OS cannot write that many bytes, it * will write as many as it can. The third argument is modified to * reflect the * number of bytes written. * * @remark It is possible for both bytes to be written and an error to * be returned. CORE_EINTR is never returned. */ CORE_DECLARE(status_t) file_write( file_t *thefile, const void *buf, size_t *nbytes); /** * Write data from iovec array to the specified file. * @param thefile The file descriptor to write to. * @param vec The array from which to get the data to write to the file. * @param nvec The number of elements in the struct iovec array. This must * be smaller than MAX_IOVEC_SIZE. If it isn't, the function * will fail with CORE_EINVAL. * @param nbytes The number of bytes written. * * @remark It is possible for both bytes to be written and an error to * be returned. CORE_EINTR is never returned. * * @remark file_writev is available even if the underlying * operating system doesn't provide writev(). */ CORE_DECLARE(status_t) file_writev(file_t *thefile, const struct iovec *vec, size_t nvec, size_t *nbytes); /** * Read data from the specified file, ensuring that the buffer is filled * before returning. * @param thefile The file descriptor to read from. * @param buf The buffer to store the data to. * @param nbytes The number of bytes to read. * @param bytes_read If non-NULL, this will contain the number of bytes read. * * @remark file_read will read up to the specified number of * bytes, but never more. If there isn't enough data to fill that * number of bytes, then the process/thread will block until it is * available or EOF is reached. If a char was put back into the * stream via ungetc, it will be the first character returned. * * @remark It is possible for both bytes to be read and an error to be * returned. And if *bytes_read is less than nbytes, an accompanying * error is _always_ returned. * * @remark CORE_EINTR is never returned. */ CORE_DECLARE(status_t) file_read_full(file_t *thefile, void *buf, size_t nbytes, size_t *bytes_read); /** * Write data to the specified file, ensuring that all of the data is * written before returning. * @param thefile The file descriptor to write to. * @param buf The buffer which contains the data. * @param nbytes The number of bytes to write. * @param bytes_written If non-NULL, set to the number of bytes written. * * @remark file_write will write up to the specified number of * bytes, but never more. If the OS cannot write that many bytes, the * process/thread will block until they can be written. Exceptional * error such as "out of space" or "pipe closed" will terminate with * an error. * * @remark It is possible for both bytes to be written and an error to * be returned. And if *bytes_written is less than nbytes, an * accompanying error is _always_ returned. * * @remark CORE_EINTR is never returned. */ CORE_DECLARE(status_t) file_write_full(file_t *thefile, const void *buf, size_t nbytes, size_t *bytes_written); /** * Write data from iovec array to the specified file, ensuring that all of the * data is written before returning. * @param thefile The file descriptor to write to. * @param vec The array from which to get the data to write to the file. * @param nvec The number of elements in the struct iovec array. This must * be smaller than MAX_IOVEC_SIZE. If it isn't, the function * will fail with CORE_EINVAL. * @param nbytes The number of bytes written. * * @remark file_writev_full is available even if the underlying * operating system doesn't provide writev(). */ CORE_DECLARE(status_t) file_writev_full(file_t *thefile, const struct iovec *vec, size_t nvec, size_t *nbytes); /** * Write a character into the specified file. * @param ch The character to write. * @param thefile The file descriptor to write to */ CORE_DECLARE(status_t) file_putc(char ch, file_t *thefile); /** * Read a character from the specified file. * @param ch The character to read into * @param thefile The file descriptor to read from */ CORE_DECLARE(status_t) file_getc(char *ch, file_t *thefile); /** * Put a character back onto a specified stream. * @param ch The character to write. * @param thefile The file descriptor to write to */ CORE_DECLARE(status_t) file_ungetc(char ch, file_t *thefile); /** * Read a string from the specified file. * @param str The buffer to store the string in. * @param len The length of the string * @param thefile The file descriptor to read from * @remark The buffer will be NUL-terminated if any characters are stored. */ CORE_DECLARE(status_t) file_gets(char *str, int len, file_t *thefile); /** * Write the string into the specified file. * @param str The string to write. * @param thefile The file descriptor to write to */ CORE_DECLARE(status_t) file_puts(const char *str, file_t *thefile); /** * Transfer all file modified data and metadata to disk. * @param thefile The file descriptor to sync */ CORE_DECLARE(status_t) file_sync(file_t *thefile); /** * Move the read/write file offset to a specified byte within a file. * @param thefile The file descriptor * @param where How to move the pointer, one of: *
 *            CORE_SET  --  set the offset to offset
 *            CORE_CUR  --  add the offset to the current position
 *            CORE_END  --  add the offset to the current file size
 * 
* @param offset The offset to move the pointer to. * @remark The third argument is modified to be the offset the pointer was actually moved to. */ CORE_DECLARE(status_t) file_seek(file_t *thefile, seek_where_t where, off_t *offset); /**accessor and general file_io functions. */ /** * return the file name of the current file. * @param new_path The path of the file. * @param thefile The currently open file. */ CORE_DECLARE(status_t) file_name_get(const char **fname, file_t *thefile); /** * set the specified file's permission bits. * @param fname The file (name) to apply the permissions to. * @param perms The permission bits to apply to the file. * * @warning Some platforms may not be able to apply all of the * available permission bits; CORE_INCOMPLETE will be returned if some * permissions are specified which could not be set. * * @warning Platforms which do not implement this feature will return * CORE_ENOTIMPL. */ CORE_DECLARE(status_t) file_perms_set(const char *fname, file_perms_t perms); /** * Set attributes of the specified file. * @param fname The full path to the file (using / on all systems) * @param attributes Or'd combination of *
 *            ATTR_READONLY   - make the file readonly
 *            ATTR_EXECUTABLE - make the file executable
 *            ATTR_HIDDEN     - make the file hidden
 * 
* @param attr_mask Mask of valid bits in attributes. * @remark This function should be used in preference to explict manipulation * of the file permissions, because the operations to provide these * attributes are platform specific and may involve more than simply * setting permission bits. * @warning Platforms which do not implement this feature will return * CORE_ENOTIMPL. */ CORE_DECLARE(status_t) file_attrs_set(const char *fname, file_attrs_t attributes, file_attrs_t attr_mask); /** * Set the mtime of the specified file. * @param fname The full path to the file (using / on all systems) * @param mtime The mtime to apply to the file. * @warning Platforms which do not implement this feature will return * CORE_ENOTIMPL. */ CORE_DECLARE(status_t) file_mtime_set(const char *fname, c_time_t mtime); /** * Create a new directory on the file system. * @param path the path for the directory to be created. (use / on all systems) * @param perm Permissions for the new direcoty. */ CORE_DECLARE(status_t) dir_make(const char *path, file_perms_t perm); /** Creates a new directory on the file system, but behaves like * 'mkdir -p'. Creates intermediate directories as required. No error * will be reported if PATH already exists. * @param path the path for the directory to be created. (use / on all systems) * @param perm Permissions for the new direcoty. */ CORE_DECLARE(void) path_remove_last_component(char *dir, const char *path); CORE_DECLARE(status_t) dir_make_recursive(const char *path, file_perms_t perm); /** * Remove directory from the file system. * @param path the path for the directory to be removed. (use / on all systems) * @remark Removing a directory which is in-use (e.g., the current working * directory, or during core_dir_read, or with an open file) is not portable. */ CORE_DECLARE(status_t) dir_remove(const char *path); /** * get the specified file's stats. * @param finfo Where to store the information about the file. * @param wanted The desired file_info_t fields, as a bit flag of * CORE_FINFO_ values * @param thefile The file to get information about. */ CORE_DECLARE(status_t) file_info_get(file_info_t *finfo, c_int32_t wanted, file_t *thefile); /** * Truncate the file's length to the specified offset * @param fp The file to truncate * @param offset The offset to truncate to. * @remark The read/write file offset is repositioned to offset. */ CORE_DECLARE(status_t) file_trunc(file_t *fp, off_t offset); /** * Retrieve the flags that were passed into file_open() * when the file was opened. * @return c_int32_t the flags */ CORE_DECLARE(c_int32_t) file_flags_get(file_t *f); /** * get the specified file's stats. The file is specified by filename, * instead of using a pre-opened file. * @param finfo Where to store the information about the file, which is * never touched if the call fails. * @param fname The name of the file to stat. * @param wanted The desired file_info_t fields, as a bit flag of FILE_INFO_ values * * @note If @c CORE_INCOMPLETE is returned all the fields in @a finfo may * not be filled in, and you need to check the @c finfo->valid bitmask * to verify that what you're looking for is there. */ CORE_DECLARE(status_t) file_stat(file_info_t *finfo, const char *fname, c_int32_t wanted); /** * Find an existing directory suitable as a temporary storage location. * @param temp_dir The temp directory. * @remark * This function uses an algorithm to search for a directory that an * an application can use for temporary storage. * */ CORE_DECLARE(status_t) temp_dir_get(char *temp_dir); /** @} */ #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* ! __CORE_FILE_H__ */ nextepc-0.3.10/lib/core/include/core_fsm.h000066400000000000000000000022601333553357400203430ustar00rootroot00000000000000#ifndef __CORE_FSM_H__ #define __CORE_FSM_H__ #include "core.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ extern char *FSM_NAME_INIT_SIG; extern char *FSM_NAME_ENTRY_SIG; extern char *FSM_NAME_EXIT_SIG; typedef enum _fsm_signal_t { FSM_ENTRY_SIG, FSM_EXIT_SIG, FSM_USER_SIG } fsm_signal_t; typedef c_uintptr_t fsm_event_t; typedef c_uintptr_t fsm_state_t; typedef void (*fsm_handler_t)(void *s, void *e); typedef struct _fsm_t { fsm_handler_t initial; fsm_handler_t final; fsm_handler_t state; } fsm_t; #define fsm_create(__s, __i, __f) \ (((__s)->initial = (__s)->state = (fsm_handler_t)(__i)), \ (__s)->final = (fsm_handler_t)(__f)) #define fsm_clear(__s) \ ((__s)->initial = (__s)->state = (__s)->final = NULL) CORE_DECLARE(void) fsm_init(void *s, void *e); CORE_DECLARE(void) fsm_dispatch(void *s, void *e); CORE_DECLARE(void) fsm_final(void *s, void *e); #define FSM_TRAN(__s, __target) \ ((fsm_t *)__s)->state = (fsm_handler_t)(__target) #define FSM_STATE(__s) \ (((fsm_t *)__s)->state) #define FSM_CHECK(__s, __f) \ (FSM_STATE(__s) == (fsm_handler_t)__f) #ifdef __cplusplus } #endif #endif /* ! __CORE_FSM_H__ */ nextepc-0.3.10/lib/core/include/core_general.h000066400000000000000000000072101333553357400211730ustar00rootroot00000000000000#ifndef __CORE_GENERAL_H__ #define __CORE_GENERAL_H__ /** * @file core_general.h * This is collection of oddballs that didn't fit anywhere else, * and might move to more appropriate headers with the release * of CORE 1.0. * @brief CORE Miscellaneous library routines */ #include "core.h" #include "core_errno.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * @defgroup core_general Miscellaneous library routines * @ingroup CORE * This is collection of oddballs that didn't fit anywhere else, * and might move to more appropriate headers with the release * of CORE 1.0. * @{ */ /** a space */ #define ASCII_BLANK '\040' /** a carrige return */ #define ASCII_CR '\015' /** a line feed */ #define ASCII_LF '\012' /** a tab */ #define ASCII_TAB '\011' /** * Alignment macros */ /* C_ALIGN() is only to be used to align on a power of 2 boundary */ #define C_ALIGN(size, boundary) \ (((size) + ((boundary) - 1)) & ~((boundary) - 1)) /** Default alignment */ #define C_ALIGN_DEFAULT(size) C_ALIGN(size, 8) /** * String and memory functions */ /* STRINGIFY is defined here, and also in core_release.h, so wrap it */ #ifndef STRINGIFY /** Properly quote a value as a string in the C preprocessor */ #define STRINGIFY(n) STRINGIFY_HELPER(n) /** Helper macro for STRINGIFY */ #define STRINGIFY_HELPER(n) #n #endif /** @} */ /** * @defgroup core_library Library initialization and termination * @{ */ /** * Setup any CORE internal data structures. This MUST be the first function * called for any CORE library. * @remark See core_app_initialize if this is an application, rather than * a library consumer of core. */ CORE_DECLARE(status_t) core_initialize(void); /** * Set up an application with normalized argc, argv (and optionally env) in * order to deal with platform-specific oddities, such as Win32 services, * code pages and signals. This must be the first function called for any * CORE program. * @param argc Pointer to the argc that may be corrected * @param argv Pointer to the argv that may be corrected * @param env Pointer to the env that may be corrected, may be NULL * @remark See core_initialize if this is a library consumer of core. * Otherwise, this call is identical to core_initialize, and must be closed * with a call to core_terminate at the end of program execution. */ CORE_DECLARE(status_t) core_app_initialize(int *argc, char const * const * *argv, char const * const * *env); /** * Tear down any CORE internal data structures which aren't torn down * automatically. * @remark An CORE program must call this function at termination once it * has stopped using CORE services. The CORE developers suggest using * atexit to ensure this is called. When using CORE from a language * other than C that has problems with the calling convention, use * core_terminate2() instead. */ CORE_DECLARE_NONSTD(void) core_terminate(void); /** * Tear down any CORE internal data structures which aren't torn down * automatically, same as core_terminate * @remark An CORE program must call either the core_terminate or * core_terminate2 function once it it has finished using CORE * services. The CORE developers suggest using atexit(core_terminate) * to ensure this is done. core_terminate2 exists to allow non-c * language apps to tear down core, while core_terminate is * recommended from c language applications. */ CORE_DECLARE(void) core_terminate2(void); /** @} */ #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* ! CORE_GENERAL_H */ nextepc-0.3.10/lib/core/include/core_hash.h000066400000000000000000000152701333553357400205060ustar00rootroot00000000000000#ifndef __HASH_H__ #define __HASH_H__ #include "core.h" /** * @file hash.h * @brief CORE Hash Tables */ #ifdef __cplusplus extern "C" { #endif /** * @defgroup hash Hash Tables * @ingroup CORE * @{ */ /** * When passing a key to hash_set or hash_get, this value can be * passed to indicate a string-valued key, and have hash compute the * length automatically. * * @remark hash will use strlen(key) for the length. The NUL terminator * is not included in the hash value (why throw a constant in?). * Since the hash table merely references the provided key (rather * than copying it), hash_this() will return the NUL-term'd key. */ #define HASH_KEY_STRING (-1) /** * Abstract type for hash tables. */ typedef struct hash_t hash_t; /** * Abstract type for scanning hash tables. */ typedef struct hash_index_t hash_index_t; /** * Callback functions for calculating hash values. * @param key The key. * @param klen The length of the key, or HASH_KEY_STRING to use the string * length. If HASH_KEY_STRING then returns the actual key length. */ typedef unsigned int (*hashfunc_t)(const char *key, int *klen); /** * The default hash function. */ CORE_DECLARE_NONSTD(unsigned int) core_hashfunc_default(const char *key, int *klen); /** * Create a hash table. * @return The hash table just created */ CORE_DECLARE(hash_t *) hash_make(); /** * Create a hash table with a custom hash function * @param hash_func A custom hash function. * @return The hash table just created */ CORE_DECLARE(hash_t *) hash_make_custom(hashfunc_t hash_func); /* Destroy hash memory */ CORE_DECLARE(void) hash_destroy(hash_t *ht); /** * Associate a value with a key in a hash table. * @param ht The hash table * @param key Pointer to the key * @param klen Length of the key. Can be HASH_KEY_STRING to use the string length. * @param val Value to associate with the key * @remark If the value is NULL the hash entry is deleted. The key is stored as is, * and so must have a lifetime at least as long as the hash table's pool. */ CORE_DECLARE(void) hash_set(hash_t *ht, const void *key, int klen, const void *val); /** * Look up the value associated with a key in a hash table. * @param ht The hash table * @param key Pointer to the key * @param klen Length of the key. Can be HASH_KEY_STRING to use the string length. * @return Returns NULL if the key is not present. */ CORE_DECLARE(void *) hash_get(hash_t *ht, const void *key, int klen); /** * Look up the value associated with a key in a hash table, or if none exists * associate a value. * @param ht The hash table * @param key Pointer to the key * @param klen Length of the key. Can be HASH_KEY_STRING to use the string * length. * @param val Value to associate with the key (if none exists). * @return Returns the existing value if any, the given value otherwise. * @remark If the given value is NULL and a hash entry exists, nothing is done. */ CORE_DECLARE(void *) hash_get_or_set(hash_t *ht, const void *key, int klen, const void *val); /** * Start iterating over the entries in a hash table. * @param ht The hash table * @return The iteration state * @remark There is no restriction on adding or deleting hash entries during * an iteration (although the results may be unpredictable unless all you do * is delete the current entry) and multiple iterations can be in * progress at the same time. * * @par Example: * * @code * int sum_values(hash_t *ht) * { * hash_index_t *hi; * void *val; * int sum = 0; * for (hi = hash_first(ht); hi; hi = hash_next(hi)) { * hash_this(hi, NULL, NULL, &val); * sum += *(int *)val; * } * return sum; * } * @endcode */ CORE_DECLARE(hash_index_t *) hash_first(hash_t *ht); /** * Continue iterating over the entries in a hash table. * @param hi The iteration state * @return a pointer to the updated iteration state. NULL if there are no more * entries. */ CORE_DECLARE(hash_index_t *) hash_next(hash_index_t *hi); /** * Get the current entry's details from the iteration state. * @param hi The iteration state * @param key Return pointer for the pointer to the key. * @param klen Return pointer for the key length. * @param val Return pointer for the associated value. * @remark The return pointers should point to a variable that will be set to the * corresponding data, or they may be NULL if the data isn't interesting. */ CORE_DECLARE(void) hash_this(hash_index_t *hi, const void **key, int *klen, void **val); /** * Get the current entry's key from the iteration state. * @param hi The iteration state * @return The pointer to the key */ CORE_DECLARE(const void*) hash_this_key(hash_index_t *hi); /** * Get the current entry's key length from the iteration state. * @param hi The iteration state * @return The key length */ CORE_DECLARE(int) hash_this_key_len(hash_index_t *hi); /** * Get the current entry's value from the iteration state. * @param hi The iteration state * @return The pointer to the value */ CORE_DECLARE(void*) hash_this_val(hash_index_t *hi); /** * Get the number of key/value pairs in the hash table. * @param ht The hash table * @return The number of key/value pairs in the hash table. */ CORE_DECLARE(unsigned int) hash_count(hash_t *ht); /** * Clear any key/value pairs in the hash table. * @param ht The hash table */ CORE_DECLARE(void) hash_clear(hash_t *ht); /** * Declaration prototype for the iterator callback function of hash_do(). * * @param rec The data passed as the first argument to hash_[v]do() * @param key The key from this iteration of the hash table * @param klen The key length from this iteration of the hash table * @param value The value from this iteration of the hash table * @remark Iteration continues while this callback function returns non-zero. * To export the callback function for hash_do() it must be declared * in the _NONSTD convention. */ typedef int (hash_do_callback_fn_t)( void *rec, const void *key, int klen, const void *value); /** * Iterate over a hash table running the provided function once for every * element in the hash table. The @param comp function will be invoked for * every element in the hash table. * * @param comp The function to run * @param rec The data to pass as the first argument to the function * @param ht The hash table to iterate over * @return FALSE if one of the comp() iterations returned zero; TRUE if all * iterations returned non-zero * @see hash_do_callback_fn_t */ CORE_DECLARE(int) hash_do(hash_do_callback_fn_t *comp, void *rec, const hash_t *ht); /** @} */ #ifdef __cplusplus } #endif #endif /* __HASH_H__ */ nextepc-0.3.10/lib/core/include/core_index.h000066400000000000000000000056641333553357400207000ustar00rootroot00000000000000#ifndef __CORE_INDEX_H__ #define __CORE_INDEX_H__ #include "core.h" #include "core_mutex.h" typedef c_uint32_t index_t; #define INVALID_INDEX 0 #define index_declare(__name, __type, __size) \ typedef struct { \ int head, tail; \ int size, avail; \ index_t free_index[__size]; \ __type *index_pool[__size + 1]; \ __type *free_pool[__size], node_pool[__size]; \ mutex_id mut; \ } index_##__name##_t; \ index_##__name##_t __name #define index_init(__pname, __size) do { \ int __i; \ mutex_create(&(__pname)->mut, MUTEX_DEFAULT); \ (__pname)->size = (__pname)->avail = __size; \ (__pname)->head = (__pname)->tail = 0; \ for (__i = 0; __i < __size; __i++) \ { \ (__pname)->free_index[__i] = (__i + 1); \ (__pname)->index_pool[__i + 1] = NULL; \ (__pname)->free_pool[__i] = &((__pname)->node_pool[__i]); \ } \ } while (0) #define index_final(__pname) \ ((__pname)->mut ? mutex_delete((__pname)->mut) : CORE_OK) #define index_init_wo_lock(__pname, __size) do { \ int __i; \ (__pname)->mut = 0; \ (__pname)->size = (__pname)->avail = __size; \ (__pname)->head = (__pname)->tail = 0; \ for (__i = 0; __i < __size; __i++) \ { \ (__pname)->free_index[__i] = (__i + 1); \ (__pname)->index_pool[__i + 1] = NULL; \ (__pname)->free_pool[__i] = &((__pname)->node_pool[__i]); \ } \ } while (0) #define index_alloc(__pname, __pptr_node) do { \ if ((__pname)->mut) mutex_lock((__pname)->mut); \ if ((__pname)->avail > 0) { \ (__pname)->avail--; \ *(__pptr_node) = (void*)(__pname)->free_pool[(__pname)->head]; \ memset(*(__pptr_node), 0, sizeof(**(__pptr_node))); \ (__pname)->free_pool[(__pname)->head] = NULL; \ ((*(__pptr_node))->index) = (__pname)->free_index[(__pname)->head]; \ (__pname)->index_pool[((*(__pptr_node))->index)] = *(__pptr_node); \ (__pname)->free_index[(__pname)->head] = INVALID_INDEX; \ (__pname)->head = ((__pname)->head + 1) % ((__pname)->size); \ } \ if ((__pname)->mut) mutex_unlock((__pname)->mut); \ } while (0) #define index_free(__pname, __ptr_node) do { \ if ((__pname)->mut) mutex_lock((__pname)->mut); \ if ((__pname)->avail < (__pname)->size) { \ (__pname)->avail++; \ (__pname)->index_pool[((__ptr_node)->index)] = NULL; \ (__pname)->free_index[(__pname)->tail] = ((__ptr_node)->index); \ (__pname)->free_pool[(__pname)->tail] = (void*)(__ptr_node); \ (__pname)->tail = ((__pname)->tail + 1) % ((__pname)->size); \ } \ if ((__pname)->mut) mutex_unlock((__pname)->mut); \ } while (0) #define index_find(__pname, __index) (void*)(__pname)->index_pool[(__index)]; #define index_size(__pname) ((__pname)->size) #define index_avail(__pname) ((__pname)->avail) #define index_used(__pname) (index_size(__pname) - index_avail(__pname)) #endif /* ! __CORE_INDEX_H__ */ nextepc-0.3.10/lib/core/include/core_lib.h000066400000000000000000000104441333553357400203270ustar00rootroot00000000000000#ifndef __CORE_LIB_H__ #define __CORE_LIB_H__ /** * @file c_lib.h * This is collection of oddballs that didn't fit anywhere else, * and might move to more appropriate headers with the release * of CORE 1.0. * @brief CORE general purpose library routines */ #include "core.h" #include "core_errno.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * @defgroup c_lib General Purpose Library Routines * @ingroup CORE * This is collection of oddballs that didn't fit anywhere else, * and might move to more appropriate headers with the release * of CORE 1.0. * @{ */ /* * Define the structures used by the CORE general-purpose library. */ /** @} */ /** * @defgroup c_ctype ctype functions * These macros allow correct support of 8-bit characters on systems which * support 8-bit characters. Pretty dumb how the cast is required, but * that's legacy libc for ya. These new macros do not support EOF like * the standard macros do. Tough. * @{ */ /** @see isalnum */ #define c_isalnum(c) (isalnum(((unsigned char)(c)))) /** @see isalpha */ #define c_isalpha(c) (isalpha(((unsigned char)(c)))) /** @see iscntrl */ #define c_iscntrl(c) (iscntrl(((unsigned char)(c)))) /** @see isdigit */ #define c_isdigit(c) (isdigit(((unsigned char)(c)))) /** @see isgraph */ #define c_isgraph(c) (isgraph(((unsigned char)(c)))) /** @see islower*/ #define c_islower(c) (islower(((unsigned char)(c)))) /** @see isascii */ #ifdef isascii #define c_isascii(c) (isascii(((unsigned char)(c)))) #else #define c_isascii(c) (((c) & ~0x7f)==0) #endif /** @see isprint */ #define c_isprint(c) (isprint(((unsigned char)(c)))) /** @see ispunct */ #define c_ispunct(c) (ispunct(((unsigned char)(c)))) /** @see isspace */ #define c_isspace(c) (isspace(((unsigned char)(c)))) /** @see isupper */ #define c_isupper(c) (isupper(((unsigned char)(c)))) /** @see isxdigit */ #define c_isxdigit(c) (isxdigit(((unsigned char)(c)))) /** @see tolower */ #define c_tolower(c) (tolower(((unsigned char)(c)))) /** @see toupper */ #define c_toupper(c) (toupper(((unsigned char)(c)))) #define c_max(x , y) (((x) > (y)) ? (x) : (y)) #define c_min(x , y) (((x) < (y)) ? (x) : (y)) #define c_uint64_to_array(array, uint64) \ { \ int i = 0; \ for (i = 0; i < 8; i++) array[i] = ((uint64 >> (8-1-i) * 8) & 0xff); \ } CORE_DECLARE(status_t) core_generate_random_bytes( c_uint8_t *buf, int length); #define CORE_HEX(I, I_LEN, O) core_ascii_to_hex(I, I_LEN, O, sizeof(O)) CORE_DECLARE(void *) core_ascii_to_hex( char *in, int in_len, void *out, int out_len); CORE_DECLARE(void *) core_hex_to_ascii( void *in, int in_len, void *out, int out_len); CORE_DECLARE(void *) core_uint64_to_buffer( c_uint64_t num, int size, void *buffer); CORE_DECLARE(c_uint64_t) core_buffer_to_uint64(void *buffer, int size); CORE_DECLARE(void *) core_bcd_to_buffer(c_int8_t *in, void *out, int *out_len); CORE_DECLARE(void *) core_buffer_to_bcd(c_uint8_t *in, int in_len, void *out); /* * Apache's "replacement" for the strncpy() function. We roll our * own to implement these specific changes: * (1) strncpy() doesn't always null terminate and we want it to. * (2) strncpy() null fills, which is bogus, esp. when copy 8byte * strings into 8k blocks. * (3) Instead of returning the pointer to the beginning of * the destination string, we return a pointer to the * terminating '\0' to allow us to "check" for truncation * (4) If src is NULL, null terminate dst (empty string copy) * * apr_cpystrn() follows the same call structure as strncpy(). */ CORE_DECLARE(char *)core_cpystrn(char *dst, const char *src, size_t dst_size); /** * Get the value of an environment variable * @param value the returned value, allocated from @a pool * @param envvar the name of the environment variable */ CORE_DECLARE(char *) core_env_get(const char *envvar); /** * Set the value of an environment variable * @param envvar the name of the environment variable * @param value the value to set */ CORE_DECLARE(status_t) core_env_set(const char *envvar, const char *value); /** * Delete a variable from the environment * @param envvar the name of the environment variable */ CORE_DECLARE(status_t) core_env_delete(const char *envvar); /** @} */ #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* ! __CORE_LIB_H__ */ nextepc-0.3.10/lib/core/include/core_list.h000066400000000000000000000064271333553357400205420ustar00rootroot00000000000000#ifndef __CORE_LIST_H__ #define __CORE_LIST_H__ #include "core.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ struct _ln_t { struct _ln_t *prev; struct _ln_t *next; }; typedef struct _ln_t ln_t; typedef struct _ln_t list_t; typedef struct _ln_t lnode_t; #define list_init(__pname) do {\ (__pname)->prev = NULL; \ (__pname)->next = NULL; \ } while (0) #define list_first(__pname) ((void*)((__pname)->next)) #define list_last(__pname) ((void*)((__pname)->prev)) #define list_prev(__ptr_node) ((void*)(((ln_t *)(__ptr_node))->prev)) #define list_next(__ptr_node) ((void*)(((ln_t *)(__ptr_node))->next)) #define list_is_empty(__pname) ((__pname)->next == NULL) #define list_prepend(__pname, __ptr_new) do { \ ((ln_t*)(__ptr_new))->prev = NULL; \ ((ln_t*)(__ptr_new))->next = (__pname)->next; \ if ((__pname)->next) \ ((__pname)->next)->prev = (ln_t*)(__ptr_new); \ else \ (__pname)->prev = (ln_t*)(__ptr_new); \ (__pname)->next = (ln_t*)(__ptr_new); \ } while (0) #define list_append(__pname, __ptr_new) do { \ ((ln_t*)(__ptr_new))->prev = (__pname)->prev; \ ((ln_t*)(__ptr_new))->next = NULL; \ if ((__pname)->prev) \ ((__pname)->prev)->next = (ln_t*)(__ptr_new); \ else \ (__pname)->next = (ln_t*)(__ptr_new); \ ((__pname)->prev) = (ln_t*)(__ptr_new); \ } while (0) #define list_insert_prev(__pname, __ptr_node, __ptr_new) do { \ ((ln_t*)(__ptr_new))->prev = ((ln_t*)(__ptr_node))->prev; \ ((ln_t*)(__ptr_new))->next = (ln_t*)(__ptr_node); \ if (((ln_t*)(__ptr_node))->prev) \ ((ln_t*)(__ptr_node))->prev->next = (ln_t*)(__ptr_new); \ else \ (__pname)->next = (ln_t*)(__ptr_new); \ ((ln_t*)(__ptr_node))->prev = ((ln_t*)(__ptr_new)); \ } while (0) #define list_insert_next(__pname, __ptr_node, __ptr_new) do { \ ((ln_t*)(__ptr_new))->prev = (ln_t*)(__ptr_node); \ ((ln_t*)(__ptr_new))->next = ((ln_t*)(__ptr_node))->next; \ if (((ln_t*)(__ptr_node))->next) \ ((ln_t*)(__ptr_node))->next->prev = (ln_t*)(__ptr_new); \ else \ (__pname)->prev = (ln_t*)(__ptr_new); \ ((ln_t*)(__ptr_node))->next = ((ln_t*)(__ptr_new)); \ } while (0) #define list_remove(__pname, __ptr_node) do { \ ln_t *_iter = (__pname)->next; \ while (_iter) { \ if (_iter == (ln_t*)(__ptr_node)) { \ if (_iter->prev) \ _iter->prev->next = _iter->next; \ else \ (__pname)->next = _iter->next; \ if (_iter->next) \ _iter->next->prev = _iter->prev; \ else \ (__pname)->prev = _iter->prev; \ break; \ } \ _iter = _iter->next; \ } \ } while (0) typedef int (*ln_cmp_cb)(lnode_t *pnode1, lnode_t *pnode2); #define list_insert_sorted(__pname, __ptr_new, __cmp_callback) do { \ ln_cmp_cb __pcb = (ln_cmp_cb)__cmp_callback; \ ln_t *_iter = list_first(__pname); \ while (_iter) { \ if ((*__pcb)((ln_t*)(__ptr_new), _iter) < 0) { \ list_insert_prev(__pname, _iter, __ptr_new); \ break; \ } \ _iter = list_next(_iter); \ } \ if (_iter == NULL) \ list_append(__pname, __ptr_new); \ } while (0) #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* ! __CORE_LIST_H__ */ nextepc-0.3.10/lib/core/include/core_msgq.h000066400000000000000000000033521333553357400205300ustar00rootroot00000000000000#ifndef __CORE_MSGQ_H__ #define __CORE_MSGQ_H__ /** * @file core_msgq.h * @brief Message queue header */ #include "core.h" #include "core_time.h" #include "core_errno.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef c_uintptr_t msgq_id; #define MAX_MSG_LEN 0xffff /** * @return CORE_OK or CORE_ERROR. */ CORE_DECLARE(status_t) msgq_init(void); /** * @return CORE_OK or CORE_ERROR. */ CORE_DECLARE(status_t) msgq_final(void); #define MSGQ_O_BLOCK 0x0 #define MSGQ_O_NONBLOCK 0x1 /** * @param id * @param msgsize * @param opt * * @return If succeed, handler value. If fail, zero */ CORE_DECLARE(msgq_id) msgq_create(int qsize, int msgsize, int opt); /** * @param id * * @return If succeed, CORE_OK. If fail, CORE_ERROR. */ CORE_DECLARE(status_t) msgq_delete(msgq_id id); /** * @param id * @param msg * @param msglen * * @return the number of bytes to be sent. If there is insufficient room in * ring buffer, return CORE_EAGAIN. If any error, CORE_ERROR. */ CORE_DECLARE(status_t) msgq_send(msgq_id id, const char *msg, int msglen); /** * @param id * @param msg * @param msglen * * @return the number of bytes to be read. If any error, CORE_ERROR. * If ring buffer is empty and MSGQ_O_NONBLOCK set, CORE_EAGAIN. */ CORE_DECLARE(status_t) msgq_recv(msgq_id id, char *msg, int msglen); /** * @param id * @param msg * @param msglen * * @return the number of bytes to be read. If any error, CORE_ERROR. * If ring buffer is empty and MSGQ_O_NONBLOCK set, CORE_EAGAIN. * If time out with empty buffer, CORE_TIMEUP. */ CORE_DECLARE(status_t) msgq_timedrecv(msgq_id id, char *msg, int msglen, c_time_t timeout); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* !__CORE_MSGQ_H__ */ nextepc-0.3.10/lib/core/include/core_mutex.h000066400000000000000000000047151333553357400207270ustar00rootroot00000000000000#ifndef __MUTEX_H__ #define __MUTEX_H__ /** * @file mutex.h * @brief Core Mutex Routines */ #include "core.h" #include "core_errno.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * @defgroup mutex Thread Mutex Routines * @ingroup CORE * @{ */ /** Opaque thread-local mutex structure */ typedef c_uintptr_t mutex_id; #define MUTEX_DEFAULT 0x0 /**< platform-optimal lock behavior */ #define MUTEX_NESTED 0x1 /**< enable nested (recursive) locks */ #define MUTEX_UNNESTED 0x2 /**< disable nested locks */ /** * Initialize Mutex Pool */ CORE_DECLARE(status_t) mutex_init(void); /** * Finalize Mutex Pool */ CORE_DECLARE(status_t) mutex_final(void); /** * Create and initialize a mutex that can be used to synchronize threads. * @param id the memory address where the newly created mutex will be * stored. * @param flags Or'ed value of: *
 *           MUTEX_DEFAULT   platform-optimal lock behavior.
 *           MUTEX_NESTED    enable nested (recursive) locks.
 *           MUTEX_UNNESTED  disable nested locks (non-recursive).
 * 
* @param pool the pool from which to allocate the mutex. * @warning Be cautious in using MUTEX_DEFAULT. While this is the * most optimial mutex based on a given platform's performance charateristics, * it will behave as either a nested or an unnested lock. */ CORE_DECLARE(status_t) mutex_create(mutex_id *id, unsigned int flags); /** * Acquire the lock for the given mutex. If the mutex is already locked, * the current thread will be put to sleep until the lock becomes available. * @param id the mutex on which to acquire the lock. */ CORE_DECLARE(status_t) mutex_lock(mutex_id id); /** * Attempt to acquire the lock for the given mutex. If the mutex has already * been acquired, the call returns immediately with CORE_EBUSY. Note: it * is important that the CORE_STATUS_IS_EBUSY(s) macro be used to determine * if the return value was CORE_EBUSY, for portability reasons. * @param id the mutex on which to attempt the lock acquiring. */ CORE_DECLARE(status_t) mutex_trylock(mutex_id id); /** * Release the lock for the given mutex. * @param id the mutex from which to release the lock. */ CORE_DECLARE(status_t) mutex_unlock(mutex_id id); /** * Destroy the mutex and free the memory associated with the lock. * @param id the mutex to destroy. */ CORE_DECLARE(status_t) mutex_delete(mutex_id id); /** @} */ #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* ! __MUTEX_H__ */ nextepc-0.3.10/lib/core/include/core_network.h000066400000000000000000000221561333553357400212550ustar00rootroot00000000000000#ifndef __CORE_NETWORK_H__ #define __CORE_NETWORK_H__ #include "core_errno.h" #include "core_time.h" #include "core_list.h" #if HAVE_ARPA_INET_H #include #endif #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * @defgroup sock_option Socket option definitions * @{ */ #define SOCK_O_LINGER (1 << 0) /**< Linger */ #define SOCK_O_KEEPALIVE (1 << 1) /**< Keepalive */ #define SOCK_O_DEBUG (1 << 2) /**< Debug */ #define SOCK_O_NONBLOCK (1 << 3) /**< Non-blocking IO */ #define SOCK_O_REUSEADDR (1 << 4) /**< Reuse addresses */ #define SOCK_O_SNDBUF (1 << 5) /**< Send buffer */ #define SOCK_O_RCVBUF (1 << 6) /**< Receive buffer */ #define SOCK_O_DISCONNECTED (1 << 7) /**< Disconnected */ #define SOCK_O_TCP_NODELAY (1 << 8) /**< For SCTP sockets, this is mapped * to STCP_NODELAY internally. */ #define SOCK_O_TCP_NOPUSH (1 << 9) /**< No push */ #define SOCK_O_RESET_NODELAY (1 << 10) /**< This flag is ONLY set internally * when we set SOCK_O_TCP_NOPUSH with * SOCK_O_TCP_NODELAY set to tell us that * SOCK_O_TCP_NODELAY should be turned on * again when NOPUSH is turned off */ #define SOCK_O_INCOMPLETE_READ (1 << 11) /**< Set on non-blocking sockets * (timeout != 0) on which the * previous read() did not fill a buffer * completely. the next sock_read() * will first call select()/poll() rather than * going straight into read(). (Can also * be set by an application to force a * select()/poll() call before the next * read, in cases where the app expects * that an immediate read would fail.) */ #define SOCK_O_INCOMPLETE_WRITE (1 << 12) /**< like SOCK_O_INCOMPLETE_READ, but * for write * @see SOCK_O_INCOMPLETE_READ */ #define SOCK_O_IPV6_V6ONLY (1 << 13) /**< Don't accept IPv4 connections * on a IPv6 listening socket. */ #define SOCK_O_TCP_DEFER_ACCEPT (1 << 14) /**< Delay accepting of new * connections until data is available. * @see apr_socket_accept_filter */ #define SOCK_O_BROADCAST (1 << 15) /**< Allow broadcast */ #define SOCK_O_FREEBIND (1 << 16) /**< Allow binding to addresses not * owned by any interface */ typedef c_uintptr_t sock_id; typedef int (*sock_handler)(sock_id sock, void *data); typedef struct c_sockaddr_t c_sockaddr_t; struct c_sockaddr_t { /* Reserved Area * - Should not add any atrribute in this area. * * e.g) * struct sockaddr addr; * ... * sockaddr_len((c_sockaddr_t *)&addr); */ #define c_sa_family sa.sa_family #define c_sa_port sin.sin_port union { struct sockaddr_storage ss; struct sockaddr_in sin; struct sockaddr_in6 sin6; struct sockaddr sa; }; /* User Area * - Could add your attribute. */ c_sockaddr_t *next; }; typedef struct _sock_node_t { lnode_t node; sock_id sock; c_sockaddr_t *list; } sock_node_t; typedef struct ipsubnet_t { int family; c_uint32_t sub[4]; /* big enough for IPv4 and IPv6 addresses */ c_uint32_t mask[4]; } ipsubnet_t; typedef struct _sctp_info_t { c_uint32_t ppid; c_uint16_t stream_no; c_uint16_t inbound_streams; c_uint16_t outbound_streams; } sctp_info_t; /* * Init/Final */ CORE_DECLARE(status_t) network_init(void); CORE_DECLARE(status_t) network_final(void); /* * Socket */ CORE_DECLARE(status_t) sock_create(sock_id *new); CORE_DECLARE(status_t) sock_delete(sock_id id); CORE_DECLARE(status_t) sock_delete_list(list_t *list); CORE_DECLARE(status_t) sock_socket( sock_id *id, int family, int type, int protocol); CORE_DECLARE(status_t) sock_setsockopt(sock_id id, c_int32_t opt, c_int32_t on); CORE_DECLARE(status_t) sock_bind(sock_id id, c_sockaddr_t *addr); CORE_DECLARE(status_t) sock_connect(sock_id id, c_sockaddr_t *addr); CORE_DECLARE(status_t) sock_listen(sock_id id); CORE_DECLARE(status_t) sock_accept(sock_id *new, sock_id id); CORE_DECLARE(int) sock_family(sock_id id); CORE_DECLARE(c_sockaddr_t *) sock_local_addr(sock_id id); CORE_DECLARE(c_sockaddr_t *) sock_remote_addr(sock_id id); /* * Socket Node */ CORE_DECLARE(status_t) sock_add_node( list_t *list, sock_node_t **node, c_sockaddr_t *sa_list, int family); CORE_DECLARE(status_t) sock_remove_node(list_t *list, sock_node_t *node); CORE_DECLARE(status_t) sock_remove_all_nodes(list_t *list); CORE_DECLARE(status_t) sock_probe_node( list_t *list, list_t *list6, const char *dev, c_uint16_t port); CORE_DECLARE(status_t) sock_fill_scope_id_in_local(c_sockaddr_t *sa_list); /* * Socket Address */ CORE_DECLARE(status_t) core_getaddrinfo(c_sockaddr_t **sa_list, int family, const char *hostname, c_uint16_t port, int flags); CORE_DECLARE(status_t) core_freeaddrinfo(c_sockaddr_t *sa_list); CORE_DECLARE(status_t) core_addaddrinfo(c_sockaddr_t **sa_list, int family, const char *hostname, c_uint16_t port, int flags); CORE_DECLARE(status_t) core_copyaddrinfo( c_sockaddr_t **dst, const c_sockaddr_t *src); CORE_DECLARE(status_t) core_filteraddrinfo(c_sockaddr_t **sa_list, int family); CORE_DECLARE(status_t) core_sortaddrinfo(c_sockaddr_t **sa_list, int family); CORE_DECLARE(c_sockaddr_t *) core_link_local_addr_by_dev(const char *dev); #define CORE_ADDRSTRLEN INET6_ADDRSTRLEN #define CORE_ADDR(__aDDR, __bUF) \ core_inet_ntop(__aDDR, buf, CORE_ADDRSTRLEN) #define CORE_PORT(__aDDR) \ ntohs((__aDDR)->c_sa_port) #define INET_NTOP(src, dst) \ inet_ntop(AF_INET,(void *)(c_uintptr_t)(src),(dst),INET_ADDRSTRLEN) #define INET6_NTOP(src, dst) \ inet_ntop(AF_INET6,(void *)(src),(dst),INET6_ADDRSTRLEN) CORE_DECLARE(const char *)core_inet_ntop(void *addr, char *buf, int buflen); CORE_DECLARE(status_t) core_inet_pton(int family, const char *src, void *addr); CORE_DECLARE(socklen_t) sockaddr_len(const void *addr); CORE_DECLARE(int) sockaddr_is_equal(void *p, void *q); CORE_DECLARE(status_t) core_ipsubnet( ipsubnet_t *ipsub, const char *ipstr, const char *mask_or_numbits); /* * UDP Socket */ CORE_DECLARE(status_t) udp_socket(sock_id *new, int family); CORE_DECLARE(status_t) udp_server(sock_id *new, c_sockaddr_t *sa_list); CORE_DECLARE(status_t) udp_client(sock_id *new, c_sockaddr_t *sa_list); CORE_DECLARE(status_t) udp_connect(sock_id id, c_sockaddr_t *sa_list); /* * TCP Socket */ CORE_DECLARE(status_t) tcp_server(sock_id *new, c_sockaddr_t *sa_list); CORE_DECLARE(status_t) tcp_client(sock_id *new, c_sockaddr_t *sa_list); /* * SCTP Socket */ CORE_DECLARE(void) sctp_set_num_ostreams(int sctp_streams); CORE_DECLARE(status_t) sctp_socket(sock_id *new, int family, int type); CORE_DECLARE(status_t) sctp_server(sock_id *new, int type, c_sockaddr_t *sa_list); CORE_DECLARE(status_t) sctp_client(sock_id *new, int type, c_sockaddr_t *sa_list); CORE_DECLARE(status_t) sctp_connect(sock_id id, c_sockaddr_t *sa_list); CORE_DECLARE(int) core_sctp_sendmsg(sock_id id, const void *msg, size_t len, c_sockaddr_t *to, c_uint32_t ppid, c_uint16_t stream_no); CORE_DECLARE(int) core_sctp_recvmsg(sock_id id, void *msg, size_t len, c_sockaddr_t *from, sctp_info_t *sinfo, int *msg_flags); CORE_DECLARE(int) core_sctp_recvdata(sock_id id, void *msg, size_t len, c_sockaddr_t *from, sctp_info_t *sinfo); /* * TUN Driver */ CORE_DECLARE(status_t) tun_open(sock_id *new, char *ifname, int is_tap); CORE_DECLARE(status_t) tun_set_ip(sock_id id, ipsubnet_t *gw, ipsubnet_t *sub); /* * Send/Recv */ CORE_DECLARE(ssize_t) sock_write(sock_id id, const void *buf, size_t len); CORE_DECLARE(ssize_t) sock_read(sock_id id, void *buf, size_t len); CORE_DECLARE(ssize_t) core_send(sock_id id, const void *buf, size_t len, int flags); CORE_DECLARE(ssize_t) core_sendto(sock_id id, const void *buf, size_t len, int flags, const c_sockaddr_t *to); CORE_DECLARE(ssize_t) core_recv(sock_id id, void *buf, size_t len, int flags); CORE_DECLARE(ssize_t) core_recvfrom(sock_id id, void *buf, size_t len, int flags, c_sockaddr_t *from); /* * Select Loop */ CORE_DECLARE(status_t) sock_register(sock_id id, sock_handler handler, void *data); CORE_DECLARE(status_t) sock_unregister(sock_id id); CORE_DECLARE(int) sock_is_registered(sock_id id); CORE_DECLARE(int) sock_select_loop(c_time_t timeout); #ifdef __cplusplus } #endif /* __cplusplus */ #endif nextepc-0.3.10/lib/core/include/core_param.h000066400000000000000000000012041333553357400206530ustar00rootroot00000000000000#ifndef __CORE_PARAM_H__ #define __CORE_PARAM_H__ #define MAX_NUM_OF_THREAD 128 #define MAX_NUM_OF_THREADATTR MAX_NUM_OF_THREAD #define MAX_NUM_OF_PROC 128 #define MAX_NUM_OF_MUTEX 512 #define MAX_NUM_OF_COND 512 #define MAX_NUM_OF_RWLOCK 512 #define MAX_NUM_OF_SEMAPHORE 512 #define MAX_NUM_OF_FILE 256 #define MAX_FILENAME_SIZE 256 #define MAX_DIRNAME_SIZE 256 #define MAX_NUM_OF_TIMER 1024 #define MAX_SIG_DESC_SIZE 256 #define HUGE_STRING_LEN 8192 #define MAX_FILEPATH_LEN 256 #define MAX_ERROR_STRING_LEN 1024 #endif /* ! __CORE_PARAM_H__ */ nextepc-0.3.10/lib/core/include/core_pkbuf.h000066400000000000000000000126231333553357400206710ustar00rootroot00000000000000#ifndef __CORE_PKBUF_H__ #define __CORE_PKBUF_H__ /** * @file core_pkbuf.h * @brief Packet Buffer Routines */ #include "core.h" #include "core_debug.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * Cluster buffer structre */ typedef struct _clbuf_t { /** * reference count */ c_uint16_t ref; /** * pointer to cluster */ void *cluster; /** * the size of cluster */ c_uint16_t size; } clbuf_t; /** * Packet buffer structure */ typedef struct _pkbuf_t { /** next pkbuf in singly linked pkbuf chain */ struct _pkbuf_t *next; /** pointer to cluster */ clbuf_t *clbuf; /** this buffer */ void *payload; /** * total length of this buffer and all next buffers in chain * belonging to the same packet. * * For non-queue packet chains this is the invariant: * p->tot_len == p->len + (p->next? p->next->tot_len: 0) */ c_uint16_t tot_len; /** length of this buffer */ c_uint16_t len; /** misc flags */ c_uint8_t flags; } pkbuf_t; /** * Initializes the packet buffer library */ CORE_DECLARE(status_t) pkbuf_init(void); /** * Finalizes the packet buffer library */ CORE_DECLARE(status_t) pkbuf_final(void); /** * Show the pkbuf/clbuf/cluster count */ CORE_DECLARE(void) pkbuf_show(void); /** * Allocates a pkbuf of the given type (possibly a chain). * * The actual memory allocated for the pkbuf is determined by the * headroom at which the pkbuf is allocated and the requested size * (from the headroom parameter). * * @param headroom define header size * @param type define header size * should be allocated as follows: * * @return the allocated pkbuf. If multiple pkbufs where allocated, this * is the first pkbuf of a pkbuf chain. */ #define MAX_SIZEOF_HEADROOM 128 CORE_DECLARE(pkbuf_t *) pkbuf_alloc(c_uint16_t headroom, c_uint16_t length); /** * Dereference a pkbuf chain and deallocate any no-longer-used * pkbufs at the head of this chain. * * Decrements the reference count of the pkbuf's cluster buffer. * If it reaches zero, the pkbuf is deallocated. * * For a pkbuf chain, this is repeated for each pkbuf in the chain, * up to the first pkbuf which has a non-zero reference count after * decrementing. So, when all reference counts are one, the whole * chain is free'd. * * @param pkbuf The pkbuf (chain) to be dereferenced. * * @return the number of pkbufs that were de-allocated * from the head of the chain. */ CORE_DECLARE(void) pkbuf_free(pkbuf_t *pkbuf); /** * Adjusts the payload pointer to hide or reveal headers in the payload. * * Adjusts the ->payload pointer so that space for a header * (dis)appears in the pkbuf payload. * * The ->payload, ->tot_len and ->len fields are adjusted. * * @param pkbuf pkbuf to change the header size. * @param size Number of bytes to increment header size which * increases the size of the pkbuf. New space is on the front. * (Using a negative value decreases the header size.) * If hdr_size_inc is 0, this function does nothing and returns succesful. * * @return non-zero on failure, zero on success. */ CORE_DECLARE(status_t) pkbuf_header(pkbuf_t *pkbuf, c_int16_t size); /** * Concatenate two pkbufs (each may be a pkbuf chain) and take over * the caller's reference of the tail pkbuf. * * @note The caller MAY NOT reference the tail pkbuf afterwards. * Use pkbuf_chain() for that purpose. * * @see pkbuf_chain() */ CORE_DECLARE(void) pkbuf_join(pkbuf_t *h, pkbuf_t *t); /** * Create copies of pkbufs. * * @param pkbuf pkbuf source of the copy */ CORE_DECLARE(pkbuf_t*) pkbuf_copy(pkbuf_t *pkbuf); /** * Create copies of some part of pkbufs. * * @param pkbuf pkbuf source of the copy * @param offset offset into the packet buffer from where to begin copying * len bytes * @param len length of data to copy */ CORE_DECLARE(pkbuf_t*) pkbuf_copy_partial(pkbuf_t *pkbuf, c_uint16_t offset, c_uint16_t len); /** * Copy the whole contents of a packet buffer to an application supplied * buffer. * * @param pkbuf pkbuf from which to copy data * @param buf buffer to copy to * @param buflen */ CORE_DECLARE(status_t) pkbuf_tobuf(pkbuf_t *pkbuf, void *buf, c_uint16_t *buflen); /** * Copy part of the contents of a packet buffer to an application supplied * buffer. * * @param pkbuf pkbuf from which to copy data * @param buf buffer to copy to * @param buflen * @param offset offset into the packet buffer from where * to begin copying len bytes * @param len length of data to copy */ CORE_DECLARE(status_t) pkbuf_tobuf_partial(pkbuf_t *pkbuf, void *buf, c_uint16_t *buflen, c_uint16_t offset, c_uint16_t len); /** * Get the total length of packet buffer */ #define pkbuf_length(__pkbuf) (__pkbuf) ? ((__pkbuf)->tot_len : -1) /* memory handling library like OS-function(malloc,free) */ CORE_DECLARE(void *) core_malloc(size_t size); #define CORE_FREE(__pTR) d_assert(core_free(__pTR) == CORE_OK,,); CORE_DECLARE(status_t) core_free(void *ptr); CORE_DECLARE(void *) core_calloc(size_t nmemb, size_t size); CORE_DECLARE(void *) core_realloc(void *ptr, size_t size); CORE_DECLARE(char *) core_strdup(const char *s); CORE_DECLARE(char *) core_strndup(const char *s, size_t n); CORE_DECLARE(void *) core_memdup(const void *m, size_t n); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* ! __PKBUF_H__ */ nextepc-0.3.10/lib/core/include/core_pool.h000066400000000000000000000041031333553357400205250ustar00rootroot00000000000000#ifndef __CORE_POOL_H__ #define __CORE_POOL_H__ #include "core.h" #include "core_mutex.h" #define pool_declare(__name, __type, __size) \ typedef struct { \ int head, tail; \ int size, avail; \ __type *free[__size], pool[__size]; \ mutex_id mut; \ } pool_##__name##_t; \ pool_##__name##_t __name #define pool_init(__pname, __size) do { \ int __i; \ mutex_create(&(__pname)->mut, MUTEX_DEFAULT); \ (__pname)->size = (__pname)->avail = __size; \ (__pname)->head = (__pname)->tail = 0; \ for (__i = 0; __i < __size; __i++) \ (__pname)->free[__i] = &((__pname)->pool[__i]); \ } while (0) #define pool_final(__pname) \ ((__pname)->mut ? mutex_delete((__pname)->mut) : CORE_OK) #define pool_init_wo_lock(__pname, __size) do { \ int __i; \ (__pname)->mut = 0; \ (__pname)->size = (__pname)->avail = __size; \ (__pname)->head = (__pname)->tail = 0; \ for (__i = 0; __i < __size; __i++) \ (__pname)->free[__i] = &((__pname)->pool[__i]); \ } while (0) #define pool_alloc_node(__pname, __pptr_node) do { \ *(__pptr_node) = NULL; \ if ((__pname)->mut) mutex_lock((__pname)->mut); \ if ((__pname)->avail > 0) { \ (__pname)->avail--; \ *(__pptr_node) = (void*)(__pname)->free[(__pname)->head]; \ (__pname)->free[(__pname)->head] = NULL; \ (__pname)->head = ((__pname)->head + 1) % ((__pname)->size); \ } \ if ((__pname)->mut) mutex_unlock((__pname)->mut); \ } while (0) #define pool_free_node(__pname, __ptr_node) do { \ if ((__pname)->mut) mutex_lock((__pname)->mut); \ if ((__pname)->avail < (__pname)->size) { \ (__pname)->avail++; \ (__pname)->free[(__pname)->tail] = (void*)(__ptr_node); \ (__pname)->tail = ((__pname)->tail + 1) % ((__pname)->size); \ } \ if ((__pname)->mut) mutex_unlock((__pname)->mut); \ } while (0) #define pool_size(__pname) ((__pname)->size) #define pool_avail(__pname) ((__pname)->avail) #define pool_used(__pname) (pool_size(__pname) - pool_avail(__pname)) #endif /* ! __CORE_POOL_H__ */ nextepc-0.3.10/lib/core/include/core_portable.h000066400000000000000000000040611333553357400213670ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* This header file is where you should put ANY platform specific information. * This should be the only header file that programs need to include that * actually has platform dependent code which refers to the . */ #ifndef __CORE_PORTABLE_H__ #define __CORE_PORTABLE_H__ #include "core_thread.h" #include "core_network.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef int os_file_t; /**< native file */ typedef pthread_t os_thread_t; /**< native thread */ typedef pid_t os_proc_t; /**< native pid */ typedef int os_sock_t; /**< native socket */ /** * convert the thread to os specific type from core type. * @param thethd The core thread to convert * @param thd The os specific thread we are converting to */ CORE_DECLARE(status_t) os_thread_get(os_thread_t **thethd, thread_id id); /** * Get the thread ID */ CORE_DECLARE(os_thread_t) os_thread_current(void); /** * Convert the socket from an core type to an OS specific socket * @param thesock The socket to convert. * @param sock The os specific equivalent of the core socket.. */ CORE_DECLARE(status_t) os_sock_get(os_sock_t *thesock, sock_id id); #ifdef __cplusplus } #endif #endif /* __CORE_PORTABLE_H__ */ nextepc-0.3.10/lib/core/include/core_queue.h000066400000000000000000000022211333553357400206770ustar00rootroot00000000000000#ifndef __CORE_QUEUE_H__ #define __CORE_QUEUE_H__ #include "core.h" #define que_declare(__name, __type, __size) \ struct { \ int head, tail, size, used; \ __type pool[(__size)]; \ } __name #define que_init(__pname, __size) \ ((__pname)->head = (__pname)->tail = 0, \ (__pname)->used = 0, \ (__pname)->size = __size) #define que_push(__pname, __ptr_node) \ ((__pname)->used == ((__pname)->size) ? -1 : \ (((__pname)->pool[(__pname)->head] = *(__ptr_node), \ (__pname)->head = ((__pname)->head + 1) % ((__pname)->size), \ ++(__pname)->used))) #define que_pop(__pname, __ptr_node) \ ((__pname)->used == 0 ? -1 : \ ((*(__ptr_node) = (__pname)->pool[(__pname)->tail], \ (__pname)->tail = ((__pname)->tail + 1) % ((__pname)->size), \ --(__pname)->used))) #define que_is_empty(__pname) ((__pname)->used == 0) #define que_is_full(__pname) ((__pname)->used == (__pname)->size) #define que_size(__pname) ((__pname)->size) #define que_used(__pname) ((__pname)->used) #define que_avail(__pname) (que_size(__pname) - que_used(__pname)) #endif /* ! __CORE_QUEUE_H__ */ nextepc-0.3.10/lib/core/include/core_ringbuf.h000066400000000000000000000026431333553357400212170ustar00rootroot00000000000000#ifndef __CORE_RINGBUF_H__ #define __CORE_RINGBUF_H__ #include "core.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ struct _rbuf_header_t { int head, tail, size; char *pool; }; #define rbuf_declare(__name, __size) \ struct { \ struct _rbuf_header_t h; \ char int_pool[(__size) + 1]; \ } __name #define rbuf_declare_ext(__name) \ struct { \ struct _rbuf_header_t h; \ } __name #define rbuf_init(__pname, __size) \ ((__pname)->h.head = (__pname)->h.tail = 0, \ (__pname)->h.size = __size, \ (__pname)->h.pool = (__pname)->int_pool) #define rbuf_init_ext(__pname, __size, __ext_pool) \ ((__pname)->h.head = (__pname)->h.tail = 0, \ (__pname)->h.size = __size, \ (__pname)->h.pool = (char *)(__ext_pool)) #define rbuf_size(__pname) ((__pname)->h.size) #define rbuf_is_empty(__pname) ((__pname)->h.head == (__pname)->h.tail) #define rbuf_is_full(__pname) (rbuf_free_bytes(__pname) == 0) CORE_DECLARE(int) rbuf_bytes(void *__pname); CORE_DECLARE(int) rbuf_free_bytes(void *__pname); CORE_DECLARE(int) rbuf_skip_write_pos(void *__pname, int __len); CORE_DECLARE(int) rbuf_write(void *__pname, const char *__buf, int __buf_len); CORE_DECLARE(int) rbuf_skip_read_pos(void *__pname, int __len); CORE_DECLARE(int) rbuf_read(void *__pname, char *__buf, int __buf_len); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* ! __CORE_RINGBUF_H__ */ nextepc-0.3.10/lib/core/include/core_rwlock.h000066400000000000000000000067101333553357400210630ustar00rootroot00000000000000#ifndef __CORE_RWLOCK_H__ #define __CORE_RWLOCK_H__ /** * @file rwlock.h * @brief CORE Reader/Writer Lock Routines */ #include "core.h" #include "core_errno.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * @defgroup rwlock Reader/Writer Lock Routines * @ingroup CORE * @{ */ /** Opaque read-write thread-safe lock. */ typedef c_uintptr_t rwlock_id; /** * Initialize Read-Write Lock Pool */ CORE_DECLARE(status_t) rwlock_init(void); /** * Finalize Read-Write Lock Pool */ CORE_DECLARE(status_t) rwlock_final(void); /** * Note: The following operations have undefined results: unlocking a * read-write lock which is not locked in the calling thread; write * locking a read-write lock which is already locked by the calling * thread; destroying a read-write lock more than once; clearing or * destroying the pool from which a locked read-write lock is * allocated. */ /** * Create and initialize a read-write lock that can be used to synchronize * threads. * @param id the memory address where the newly created readwrite lock * will be stored. */ CORE_DECLARE(status_t) rwlock_create(rwlock_id *id); /** * Acquire a shared-read lock on the given read-write lock. This will allow * multiple threads to enter the same critical section while they have acquired * the read lock. * @param id the read-write lock on which to acquire the shared read. */ CORE_DECLARE(status_t) rwlock_rdlock(rwlock_id id); /** * Attempt to acquire the shared-read lock on the given read-write lock. This * is the same as rwlock_rdlock(), only that the function fails * if there is another thread holding the write lock, or if there are any * write threads blocking on the lock. If the function fails for this case, * CORE_EBUSY will be returned. Note: it is important that the * CORE_STATUS_IS_EBUSY(s) macro be used to determine if the return value was * CORE_EBUSY, for portability reasons. * @param id the rwlock on which to attempt the shared read. */ CORE_DECLARE(status_t) rwlock_tryrdlock(rwlock_id id); /** * Acquire an exclusive-write lock on the given read-write lock. This will * allow only one single thread to enter the critical sections. If there * are any threads currently holding the read-lock, this thread is put to * sleep until it can have exclusive access to the lock. * @param id the read-write lock on which to acquire the exclusive write. */ CORE_DECLARE(status_t) rwlock_wrlock(rwlock_id id); /** * Attempt to acquire the exclusive-write lock on the given read-write lock. * This is the same as rwlock_wrlock(), only that the function fails * if there is any other thread holding the lock (for reading or writing), * in which case the function will return CORE_EBUSY. Note: it is important * that the CORE_STATUS_IS_EBUSY(s) macro be used to determine if the return * value was CORE_EBUSY, for portability reasons. * @param id the rwlock on which to attempt the exclusive write. */ CORE_DECLARE(status_t) rwlock_trywrlock(rwlock_id id); /** * Release either the read or write lock currently held by the calling thread * associated with the given read-write lock. * @param id the read-write lock to be released (unlocked). */ CORE_DECLARE(status_t) rwlock_unlock(rwlock_id id); /** * Destroy the read-write lock and free the associated memory. * @param id the rwlock to destroy. */ CORE_DECLARE(status_t) rwlock_delete(rwlock_id id); /** @} */ #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* ! __CORE_RWLOCK_H__ */ nextepc-0.3.10/lib/core/include/core_semaphore.h000066400000000000000000000037501333553357400215460ustar00rootroot00000000000000#ifndef __SEMAPHORE_H__ #define __SEMAPHORE_H__ /** * @file semaphore.h * @brief Core Mutex Routines */ #include "core.h" #include "core_errno.h" #include "core_time.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * @defgroup semaphore Routines * @ingroup CORE * @{ */ /** Opaque semaphore structure */ typedef c_uintptr_t semaphore_id; /** * Initialize Mutex Pool */ CORE_DECLARE(status_t) semaphore_init(void); /** * Finalize Mutex Pool */ CORE_DECLARE(status_t) semaphore_final(void); /** * Create and initialize a semaphore that can be used to synchronize processes. * @param id the memory address where the newly created semaphore will be * stored. * @value initial value for semaphore */ CORE_DECLARE(status_t) semaphore_create(semaphore_id *id, c_uint32_t value); /** * Put the active calling thread to sleep until signaled to wake up. * @param id the semaphore variable on which to block. */ CORE_DECLARE(status_t) semaphore_wait(semaphore_id id); #if HAVE_SEM_TIMEDWAIT /** * Put the active calling thread to sleep until signaled to wake up or * the timeout is reached. * @param id the semaphore variable on which to block. * @param timeout The amount of time in microsesemaphores to wait. This is * a maximum, not a minimum. If the semaphoreition is signaled, we * will wake up before this time, otherwise the error CORE_TIMEUP * is returned. */ CORE_DECLARE(status_t) semaphore_timedwait(semaphore_id id, c_time_t timeout); #endif /** * Posts a single thread, if one exists, that is blocking on the given * semaphore variable. * @param id the semaphore variable on which to produce the signal. */ CORE_DECLARE(status_t) semaphore_post(semaphore_id id); /** * Destroy the semaphore and free the memory associated with the lock. * @param semaphore the semaphore to destroy. */ CORE_DECLARE(status_t) semaphore_delete(semaphore_id id); /** @} */ #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* ! __SEMAPHORE_H__ */ nextepc-0.3.10/lib/core/include/core_sha1.h000066400000000000000000000034261333553357400204170ustar00rootroot00000000000000/* * sha1.h * * Copyright (C) 1998, 2009 * Paul E. Jones * All Rights Reserved * ***************************************************************************** * $Id: sha1.h 12 2009-06-22 19:34:25Z paulej $ ***************************************************************************** * * Description: * This class implements the Secure Hashing Standard as defined * in FIPS PUB 180-1 published April 17, 1995. * * Many of the variable names in the sha1_ctx, especially the * single character names, were used because those were the names * used in the publication. * * Please read the file sha1.c for more information. * */ #ifndef _CORE_SHA1_H_ #define _CORE_SHA1_H_ #include "core.h" #define SHA1_DIGEST_SIZE (160 / 8) #define SHA1_BLOCK_SIZE (512 / 8) #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct sha1_ctx { unsigned Message_Digest[5]; /* Message Digest (output) */ unsigned Length_Low; /* Message length in bits */ unsigned Length_High; /* Message length in bits */ unsigned char Message_Block[64]; /* 512-bit message blocks */ int Message_Block_Index; /* Index into message block array */ int Computed; /* Is the digest computed? */ int Corrupted; /* Is the message digest corruped? */ } sha1_ctx; CORE_DECLARE(void) sha1_init(sha1_ctx *ctx); CORE_DECLARE(void) sha1_update(sha1_ctx *ctx, const c_uint8_t *message, c_uint32_t len); CORE_DECLARE(void) sha1_final(sha1_ctx *ctx, c_uint8_t *digest); CORE_DECLARE(void) sha1(const c_uint8_t *message, c_uint32_t len, c_uint8_t *digest); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* _CORE_SHA1_H_ */ nextepc-0.3.10/lib/core/include/core_sha1_hmac.h000066400000000000000000000053451333553357400214110ustar00rootroot00000000000000/*- * HMAC-SHA-224/256/384/512 implementation * Last update: 06/15/2005 * Issue date: 06/15/2005 * * Copyright (C) 2005 Olivier Gay * 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. * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE PROJECT 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 PROJECT 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. */ #ifndef _CORE_HMAC_SHA1_H #define _CORE_HMAC_SHA1_H #include "core_sha1.h" #ifdef __cplusplus extern "C" { #endif typedef struct { sha1_ctx ctx_inside; sha1_ctx ctx_outside; /* for hmac_reinit */ sha1_ctx ctx_inside_reinit; sha1_ctx ctx_outside_reinit; c_uint8_t block_ipad[SHA1_BLOCK_SIZE]; c_uint8_t block_opad[SHA1_BLOCK_SIZE]; } hmac_sha1_ctx; CORE_DECLARE(void) hmac_sha1_init(hmac_sha1_ctx *ctx, c_uint8_t *key, c_uint32_t key_size); CORE_DECLARE(void) hmac_sha1_reinit(hmac_sha1_ctx *ctx); CORE_DECLARE(void) hmac_sha1_update(hmac_sha1_ctx *ctx, c_uint8_t *message, c_uint32_t message_len); CORE_DECLARE(void) hmac_sha1_final(hmac_sha1_ctx *ctx, c_uint8_t *mac, c_uint32_t mac_size); CORE_DECLARE(void) hmac_sha1(c_uint8_t *key, c_uint32_t key_size, c_uint8_t *message, c_uint32_t message_len, c_uint8_t *mac, c_uint32_t mac_size); #ifdef __cplusplus } #endif #endif /* ! _CORE_HMAC_SHA1_H */ nextepc-0.3.10/lib/core/include/core_sha2.h000066400000000000000000000074111333553357400204160ustar00rootroot00000000000000/* * FIPS 180-2 SHA-224/256/384/512 implementation * Last update: 02/02/2007 * Issue date: 04/30/2005 * * Copyright (C) 2005, 2007 Olivier Gay * 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. * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE PROJECT 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 PROJECT 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. */ #ifndef _CORE_SHA2_H_ #define _CORE_SHA2_H_ #include "core.h" #define SHA224_DIGEST_SIZE ( 224 / 8) #define SHA256_DIGEST_SIZE ( 256 / 8) #define SHA384_DIGEST_SIZE ( 384 / 8) #define SHA512_DIGEST_SIZE ( 512 / 8) #define SHA256_BLOCK_SIZE ( 512 / 8) #define SHA512_BLOCK_SIZE (1024 / 8) #define SHA384_BLOCK_SIZE SHA512_BLOCK_SIZE #define SHA224_BLOCK_SIZE SHA256_BLOCK_SIZE #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct { c_uint32_t tot_len; c_uint32_t len; c_uint8_t block[2 * SHA256_BLOCK_SIZE]; c_uint32_t h[8]; } sha256_ctx; typedef struct { c_uint32_t tot_len; c_uint32_t len; c_uint8_t block[2 * SHA512_BLOCK_SIZE]; c_uint64_t h[8]; } sha512_ctx; typedef sha512_ctx sha384_ctx; typedef sha256_ctx sha224_ctx; CORE_DECLARE(void) sha224_init(sha224_ctx *ctx); CORE_DECLARE(void) sha224_update(sha224_ctx *ctx, const c_uint8_t *message, c_uint32_t len); CORE_DECLARE(void) sha224_final(sha224_ctx *ctx, c_uint8_t *digest); CORE_DECLARE(void) sha224(const c_uint8_t *message, c_uint32_t len, c_uint8_t *digest); CORE_DECLARE(void) sha256_init(sha256_ctx * ctx); CORE_DECLARE(void) sha256_update(sha256_ctx *ctx, const c_uint8_t *message, c_uint32_t len); CORE_DECLARE(void) sha256_final(sha256_ctx *ctx, c_uint8_t *digest); CORE_DECLARE(void) sha256(const c_uint8_t *message, c_uint32_t len, c_uint8_t *digest); CORE_DECLARE(void) sha384_init(sha384_ctx *ctx); CORE_DECLARE(void) sha384_update(sha384_ctx *ctx, const c_uint8_t *message, c_uint32_t len); CORE_DECLARE(void) sha384_final(sha384_ctx *ctx, c_uint8_t *digest); CORE_DECLARE(void) sha384(const c_uint8_t *message, c_uint32_t len, c_uint8_t *digest); CORE_DECLARE(void) sha512_init(sha512_ctx *ctx); CORE_DECLARE(void) sha512_update(sha512_ctx *ctx, const c_uint8_t *message, c_uint32_t len); CORE_DECLARE(void) sha512_final(sha512_ctx *ctx, c_uint8_t *digest); CORE_DECLARE(void) sha512(const c_uint8_t *message, c_uint32_t len, c_uint8_t *digest); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* !_CORE_SHA2_H_ */ nextepc-0.3.10/lib/core/include/core_sha2_hmac.h000066400000000000000000000126761333553357400214170ustar00rootroot00000000000000/*- * HMAC-SHA-224/256/384/512 implementation * Last update: 06/15/2005 * Issue date: 06/15/2005 * * Copyright (C) 2005 Olivier Gay * 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. * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE PROJECT 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 PROJECT 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. */ #ifndef _CORE_HMAC_SHA2_H #define _CORE_HMAC_SHA2_H #include "core_sha2.h" #ifdef __cplusplus extern "C" { #endif typedef struct { sha224_ctx ctx_inside; sha224_ctx ctx_outside; /* for hmac_reinit */ sha224_ctx ctx_inside_reinit; sha224_ctx ctx_outside_reinit; c_uint8_t block_ipad[SHA224_BLOCK_SIZE]; c_uint8_t block_opad[SHA224_BLOCK_SIZE]; } hmac_sha224_ctx; typedef struct { sha256_ctx ctx_inside; sha256_ctx ctx_outside; /* for hmac_reinit */ sha256_ctx ctx_inside_reinit; sha256_ctx ctx_outside_reinit; c_uint8_t block_ipad[SHA256_BLOCK_SIZE]; c_uint8_t block_opad[SHA256_BLOCK_SIZE]; } hmac_sha256_ctx; typedef struct { sha384_ctx ctx_inside; sha384_ctx ctx_outside; /* for hmac_reinit */ sha384_ctx ctx_inside_reinit; sha384_ctx ctx_outside_reinit; c_uint8_t block_ipad[SHA384_BLOCK_SIZE]; c_uint8_t block_opad[SHA384_BLOCK_SIZE]; } hmac_sha384_ctx; typedef struct { sha512_ctx ctx_inside; sha512_ctx ctx_outside; /* for hmac_reinit */ sha512_ctx ctx_inside_reinit; sha512_ctx ctx_outside_reinit; c_uint8_t block_ipad[SHA512_BLOCK_SIZE]; c_uint8_t block_opad[SHA512_BLOCK_SIZE]; } hmac_sha512_ctx; CORE_DECLARE(void) hmac_sha224_init(hmac_sha224_ctx *ctx, c_uint8_t *key, c_uint32_t key_size); CORE_DECLARE(void) hmac_sha224_reinit(hmac_sha224_ctx *ctx); CORE_DECLARE(void) hmac_sha224_update(hmac_sha224_ctx *ctx, c_uint8_t *message, c_uint32_t message_len); CORE_DECLARE(void) hmac_sha224_final(hmac_sha224_ctx *ctx, c_uint8_t *mac, c_uint32_t mac_size); CORE_DECLARE(void) hmac_sha224(c_uint8_t *key, c_uint32_t key_size, c_uint8_t *message, c_uint32_t message_len, c_uint8_t *mac, c_uint32_t mac_size); CORE_DECLARE(void) hmac_sha256_init(hmac_sha256_ctx *ctx, c_uint8_t *key, c_uint32_t key_size); CORE_DECLARE(void) hmac_sha256_reinit(hmac_sha256_ctx *ctx); CORE_DECLARE(void) hmac_sha256_update(hmac_sha256_ctx *ctx, c_uint8_t *message, c_uint32_t message_len); CORE_DECLARE(void) hmac_sha256_final(hmac_sha256_ctx *ctx, c_uint8_t *mac, c_uint32_t mac_size); CORE_DECLARE(void) hmac_sha256(c_uint8_t *key, c_uint32_t key_size, c_uint8_t *message, c_uint32_t message_len, c_uint8_t *mac, c_uint32_t mac_size); CORE_DECLARE(void) hmac_sha384_init(hmac_sha384_ctx *ctx, c_uint8_t *key, c_uint32_t key_size); CORE_DECLARE(void) hmac_sha384_reinit(hmac_sha384_ctx *ctx); CORE_DECLARE(void) hmac_sha384_update(hmac_sha384_ctx *ctx, c_uint8_t *message, c_uint32_t message_len); CORE_DECLARE(void) hmac_sha384_final(hmac_sha384_ctx *ctx, c_uint8_t *mac, c_uint32_t mac_size); CORE_DECLARE(void) hmac_sha384(c_uint8_t *key, c_uint32_t key_size, c_uint8_t *message, c_uint32_t message_len, c_uint8_t *mac, c_uint32_t mac_size); CORE_DECLARE(void) hmac_sha512_init(hmac_sha512_ctx *ctx, c_uint8_t *key, c_uint32_t key_size); CORE_DECLARE(void) hmac_sha512_reinit(hmac_sha512_ctx *ctx); CORE_DECLARE(void) hmac_sha512_update(hmac_sha512_ctx *ctx, c_uint8_t *message, c_uint32_t message_len); CORE_DECLARE(void) hmac_sha512_final(hmac_sha512_ctx *ctx, c_uint8_t *mac, c_uint32_t mac_size); CORE_DECLARE(void) hmac_sha512(c_uint8_t *key, c_uint32_t key_size, c_uint8_t *message, c_uint32_t message_len, c_uint8_t *mac, c_uint32_t mac_size); #ifdef __cplusplus } #endif #endif /* ! _CORE_HMAC_SHA2_H */ nextepc-0.3.10/lib/core/include/core_signal.h000066400000000000000000000044141333553357400210360ustar00rootroot00000000000000#ifndef CORE_SIGNAL_H #define CORE_SIGNAL_H /** * @file core_signal.h * @brief CORE Signal Handling */ #include "core.h" #include "core_errno.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * @defgroup core_signal Signal Handling * @ingroup CORE * @{ */ /** * Terminate a process. * @param proc The process to terminate. * @param sig How to kill the process. */ CORE_DECLARE(status_t) core_kill(pid_t pid, int sig); #if HAVE_SIGACTION #if defined(DARWIN) && !defined(__cplusplus) && !defined(_ANSI_SOURCE) /* work around Darwin header file bugs * http://www.opensource.apple.com/bugs/X/BSD%20Kernel/2657228.html */ #undef SIG_DFL #undef SIG_IGN #undef SIG_ERR #define SIG_DFL (void (*)(int))0 #define SIG_IGN (void (*)(int))1 #define SIG_ERR (void (*)(int))-1 #endif /** Function prototype for signal handlers */ typedef void core_sigfunc_t(int); /** * Set the signal handler function for a given signal * @param signo The signal (eg... SIGWINCH) * @param func the function to get called */ CORE_DECLARE(core_sigfunc_t *) core_signal(int signo, core_sigfunc_t * func); #if defined(SIG_IGN) && !defined(SIG_ERR) #define SIG_ERR ((core_sigfunc_t *) -1) #endif #else /* !HAVE_SIGACTION */ #define core_signal(a, b) signal(a, b) #endif /** * Setup the process for a single thread to be used for all signal handling. * @warning This must be called before any threads are created */ CORE_DECLARE(status_t) signal_init(void); /** * Make the current thread listen for signals. This thread will loop * forever, calling a provided function whenever it receives a signal. That * functions should return 1 if the signal has been handled, 0 otherwise. * @param signal_handler The function to call when a signal is received * apr_status_t apr_signal_thread((int)(*signal_handler)(int signum)) */ CORE_DECLARE(status_t) signal_thread(int(*signal_handler)(int signum)); /** * Block the delivery of a particular signal * @param signum The signal number * @return status */ CORE_DECLARE(status_t) signal_block(int signum); /** * Enable the delivery of a particular signal * @param signum The signal number * @return status */ CORE_DECLARE(status_t) signal_unblock(int signum); /** @} */ #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* CORE_SIGNAL_H */ nextepc-0.3.10/lib/core/include/core_tcp.h000066400000000000000000000005761333553357400203540ustar00rootroot00000000000000#ifndef __CORE_TCP_H__ #define __CORE_TCP_H__ #include "core_sock.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(status_t) tcp_open(sock_id *new, int family, const char *local_host, c_uint16_t local_port, const char *remote_host, c_uint16_t remote_port, int flags); #ifdef __cplusplus } #endif /* __cplusplus */ #endif nextepc-0.3.10/lib/core/include/core_thread.h000066400000000000000000000046001333553357400210250ustar00rootroot00000000000000#ifndef __CORE_THREAD_H__ #define __CORE_THREAD_H__ #include "core.h" #include "core_errno.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** Opaque Thread structure. */ typedef c_uintptr_t thread_id; /** Opaque Thread attributes structure. */ typedef struct threadattr_t threadattr_t; typedef void *(THREAD_FUNC *thread_start_t)(thread_id id, void*); /** * Check if Thread Should Stop */ CORE_DECLARE(int) thread_should_stop(void); /** * Initialize Thread */ CORE_DECLARE(status_t) thread_init(void); /** * Finalize Thread */ CORE_DECLARE(status_t) thread_final(void); /** * Create and initialize a new threadattr variable * @param new_attr The newly created threadattr. */ CORE_DECLARE(status_t) threadattr_create(threadattr_t **new_attr); /** * Set the stack size of newly created threads. * @param attr The threadattr to affect * @param stacksize The stack size in bytes */ CORE_DECLARE(status_t) threadattr_stacksize_set( threadattr_t *attr, size_t stacksize); /** * Delete and initialize a new threadattr variable * @param new_attr The newly created threadattr. */ CORE_DECLARE(status_t) threadattr_delete(threadattr_t *attr); /** * Create a new thread of execution * @param id The newly created thread handle. * @param attr The threadattr to use to determine how to create the thread * @param func The function to start the new thread in * @param data Any data to be passed to the starting function */ CORE_DECLARE(status_t) thread_create(thread_id *id, threadattr_t *attr, thread_start_t func, void *data); /** * Delete a new thread of execution * @param id The thread to delete */ CORE_DECLARE(status_t) thread_delete(thread_id id); /** * detach a thread * @param thd The thread to detach */ CORE_DECLARE(status_t) thread_detach(thread_id id); /** * stop the current thread * @param thd The thread to stop * @param retval The return value to pass back to any thread that cares */ CORE_DECLARE(status_t) thread_exit(thread_id id, status_t retval); /** * block until the desired thread stops executing. * @param retval The return value from the dead thread. * @param thd The thread to join */ CORE_DECLARE(status_t) thread_join(status_t *retval, thread_id id); /** * force the current thread to yield the processor */ CORE_DECLARE(void) thread_yield(void); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* ! __CORE_THREAD_H__ */ nextepc-0.3.10/lib/core/include/core_time.h000066400000000000000000000125651333553357400205250ustar00rootroot00000000000000#ifndef __CORE_TIME_H__ #define __CORE_TIME_H__ /** * @file core_time.h * @brief CORE Time Library */ #include "core.h" #include "core_errno.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * @defgroup core_time Time Routines * @ingroup CORE * @{ */ /** month names */ CORE_DECLARE_DATA extern const char month_snames[12][4]; /** day names */ CORE_DECLARE_DATA extern const char day_snames[7][4]; /** number of microseconds since 00:00:00 january 1, 1970 UTC */ typedef c_int64_t c_time_t; /** mechanism to properly type c_time_t literals */ #define TIME_C(val) INT64_C(val) /** mechanism to properly print c_time_t values */ #define TIME_T_FMT INT64_T_FMT /** number of microseconds per second */ #define USEC_PER_SEC TIME_C(1000000) /** @return c_time_t as a second */ #define time_sec(time) ((time) / USEC_PER_SEC) /** @return c_time_t as a usec */ #define time_usec(time) ((time) % USEC_PER_SEC) /** @return c_time_t as a msec */ #define time_msec(time) (((time) / 1000) % 1000) /** @return c_time_t as a msec */ #define time_as_msec(time) ((time) / 1000) /** @return milliseconds as an c_time_t */ #define time_from_msec(msec) ((c_time_t)(msec) * 1000) /** @return seconds as an c_time_t */ #define time_from_sec(sec) ((c_time_t)(sec) * USEC_PER_SEC) /** @return a second and usec combination as an c_time_t */ #define time_make(sec, usec) ((c_time_t)(sec) * USEC_PER_SEC \ + (c_time_t)(usec)) /** @see time_exp_t */ typedef struct time_exp_t time_exp_t; /** * a structure similar to ANSI struct tm with the following differences: * - tm_usec isn't an ANSI field * - tm_gmtoff isn't an ANSI field (it's a bsdism) */ struct time_exp_t { /** microseconds past tm_sec */ int32_t tm_usec; /** (0-61) seconds past tm_min */ int32_t tm_sec; /** (0-59) minutes past tm_hour */ int32_t tm_min; /** (0-23) hours past midnight */ int32_t tm_hour; /** (1-31) day of the month */ int32_t tm_mday; /** (0-11) month of the year */ int32_t tm_mon; /** year since 1900 */ int32_t tm_year; /** (0-6) days since sunday */ int32_t tm_wday; /** (0-365) days since jan 1 */ int32_t tm_yday; /** daylight saving time */ int32_t tm_isdst; /** seconds east of UTC */ int32_t tm_gmtoff; }; /** * @return the current time */ CORE_DECLARE(c_time_t) time_now(void); /** * Sleep for the specified number of micro-seconds. * @param t desired amount of time to sleep. * @warning May sleep for longer than the specified time. */ CORE_DECLARE(void) core_sleep(c_time_t t); /** * convert an ansi time_t to an c_time_t * @param result the resulting c_time_t * @param input the time_t to convert */ CORE_DECLARE(status_t) time_ansi_put(c_time_t *result, time_t input); /** * convert a time to its human readable components using an offset * from GMT * @param result the exploded time * @param input the time to explode * @param offs the number of seconds offset to apply */ CORE_DECLARE(status_t) time_exp_tz(time_exp_t *result, c_time_t input, int32_t offs); /** * convert a time to its human readable components in GMT timezone * @param result the exploded time * @param input the time to explode */ CORE_DECLARE(status_t) time_exp_gmt(time_exp_t *result, c_time_t input); /** * convert a time to its human readable components in local timezone * @param result the exploded time * @param input the time to explode */ CORE_DECLARE(status_t) time_exp_lt(time_exp_t *result, c_time_t input); /** * Convert time value from human readable format to a numeric c_time_t * e.g. elapsed usec since epoch * @param result the resulting imploded time * @param input the input exploded time */ CORE_DECLARE(status_t) time_exp_get(c_time_t *result, time_exp_t *input); /** * Convert time value from human readable format to a numeric c_time_t that * always represents GMT * @param result the resulting imploded time * @param input the input exploded time */ CORE_DECLARE(status_t) time_exp_gmt_get(c_time_t *result, time_exp_t *input); /** length of a RFC822 Date */ #define APR_RFC822_DATE_LEN (30) /** * rfc822_date formats dates in the RFC822 * format in an efficient manner. It is a fixed length * format which requires the indicated amount of storage, * including the trailing NUL terminator. * @param date_str String to write to. * @param t the time to convert */ CORE_DECLARE(status_t) rfc822_date(char *date_str, c_time_t t); /** length of a CTIME date */ #define CTIME_LEN (25) /** * ctime formats dates in the ctime() format * in an efficient manner. it is a fixed length format * and requires the indicated amount of storage including * the trailing NUL terminator. * Unlike ANSI/ISO C ctime(), ctime() does not include * a \n at the end of the string. * @param date_str String to write to. * @param t the time to convert */ CORE_DECLARE(status_t) core_ctime(char *date_str, c_time_t t); /** * formats the exploded time according to the format specified * @param s string to write to * @param retsize The length of the returned string * @param max The maximum length of the string * @param format The format for the time string * @param tm The time to convert */ CORE_DECLARE(status_t) core_strftime(char *s, size_t *retsize, size_t max, const char *format, time_exp_t *tm); /** @} */ #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* ! __CORE_TIME_H__ */ nextepc-0.3.10/lib/core/include/core_timer.h000066400000000000000000000037641333553357400207100ustar00rootroot00000000000000#ifndef __CORE_TIMER_H__ #define __CORE_TIMER_H__ #include "core.h" #include "core_errno.h" #include "core_list.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef enum _tm_type { TIMER_TYPE_ONE_SHOT, TIMER_TYPE_PERIODIC } tm_type_e; typedef struct _tm_service_t { list_t active_list; list_t idle_list; /* timer basic element */ } tm_service_t; typedef c_uintptr_t tm_block_id; typedef void (*expire_func_t)(c_uintptr_t data, c_uintptr_t param1, c_uintptr_t param2, c_uintptr_t param3, c_uintptr_t param4, c_uintptr_t param5, c_uintptr_t param6); typedef struct _tm_desc_t { tm_type_e type; c_uint32_t duration; expire_func_t expire_func; c_uintptr_t param1; c_uintptr_t param2; c_uintptr_t param3; c_uintptr_t param4; c_uintptr_t param5; c_uintptr_t param6; } tm_desc_t; CORE_DECLARE(status_t) tm_init(void); CORE_DECLARE(status_t) tm_final(void); CORE_DECLARE(c_uint32_t) tm_pool_avail(void); CORE_DECLARE(void) tm_service_init(tm_service_t *tm_service); CORE_DECLARE(status_t) tm_execute_tm_service( tm_service_t *p_tm_s, c_uintptr_t data); CORE_DECLARE(tm_block_id) tm_create(tm_service_t *tm_service, tm_type_e type, c_uint32_t duration, expire_func_t expire_func); CORE_DECLARE(void) tm_delete(tm_block_id id); CORE_DECLARE(status_t) tm_set_duration(tm_block_id id, c_uint32_t duration); CORE_DECLARE(status_t) tm_set_param1(tm_block_id id, c_uintptr_t param); CORE_DECLARE(status_t) tm_set_param2(tm_block_id id, c_uintptr_t param); CORE_DECLARE(status_t) tm_set_param3(tm_block_id id, c_uintptr_t param); CORE_DECLARE(status_t) tm_set_param4(tm_block_id id, c_uintptr_t param); CORE_DECLARE(status_t) tm_set_param5(tm_block_id id, c_uintptr_t param); CORE_DECLARE(status_t) tm_set_param6(tm_block_id id, c_uintptr_t param); CORE_DECLARE(status_t) tm_start(tm_block_id id); CORE_DECLARE(status_t) tm_stop(tm_block_id id); #ifdef __cplusplus } #endif /* __cplusplus */ #endif nextepc-0.3.10/lib/core/include/core_tlv.h000066400000000000000000000050121333553357400203610ustar00rootroot00000000000000#ifndef __CORE_TLV_H__ #define __CORE_TLV_H__ #include "core.h" #include "core_pool.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define TLV_MODE_T1_L1 1 #define TLV_MODE_T1_L2 2 #define TLV_MODE_T1_L2_I1 3 #define TLV_MODE_T2_L2 4 #define NUM_OF_TLV_NODE 100 /* tlv_t struncture */ typedef struct _tlv_t { /* for tlv management */ struct _tlv_t* head; struct _tlv_t* tail; /* this is used only for head tlv_t */ struct _tlv_t* next; struct _tlv_t* parent; struct _tlv_t* embedded; /* tlv basic element */ c_uint32_t type; c_uint32_t length; c_uint8_t instance; void* value; /* can be needed in encoding tlv_t*/ c_uint8_t buff_allocated; c_uint32_t buff_len; c_uint8_t* buff_ptr; c_uint8_t* buff; } tlv_t; #define tlv_type(pTlv) pTlv->type #define tlv_length(pTlv) pTlv->length #define tlv_instance(pTlv) pTlv->instance #define tlv_value(pTlv) pTlv->value /* tlv_t pool related functions */ CORE_DECLARE(tlv_t*) tlv_get(void); CORE_DECLARE(void) tlv_free(tlv_t *pTlv); CORE_DECLARE(void) tlv_free_all(tlv_t *rootTlv); CORE_DECLARE(status_t) tlv_init(void); CORE_DECLARE(status_t) tlv_final(void); /* tlv_t encoding functions */ CORE_DECLARE(tlv_t*) tlv_add(tlv_t *headTlv, c_uint32_t type, c_uint32_t length, c_uint8_t instance, c_uint8_t *value); CORE_DECLARE(tlv_t*) tlv_copy(c_uint8_t *buff, c_uint32_t buff_len, c_uint32_t type, c_uint32_t length, c_uint8_t instance, c_uint8_t *value); CORE_DECLARE(tlv_t*) tlv_embed(tlv_t *parent_tlv, c_uint32_t type, c_uint32_t length, c_uint8_t instance, c_uint8_t *value); CORE_DECLARE(c_uint32_t) tlv_render( tlv_t *rootTlv, c_uint8_t *blk, c_uint32_t length, c_uint8_t mode); /* tlv_t parsing functions */ CORE_DECLARE(tlv_t*) tlv_parse_block( c_uint32_t length, c_uint8_t *blk, c_uint8_t mode); CORE_DECLARE(tlv_t*) tlv_parse_embedded_block(tlv_t* pTlv, c_uint8_t mode); /* tlv operation-related function */ CORE_DECLARE(tlv_t*) tlv_find(tlv_t* pTlv, c_uint32_t type); CORE_DECLARE(tlv_t*) tlv_find_root(tlv_t* pTlv); CORE_DECLARE(c_uint32_t) tlv_pool_avail(void); CORE_DECLARE(c_uint32_t) tlv_calc_length(tlv_t *p_tlv, c_uint8_t mode); CORE_DECLARE(c_uint32_t) tlv_calc_count(tlv_t *p_tlv); CORE_DECLARE(c_uint8_t) tlv_value_8(tlv_t *tlv); CORE_DECLARE(c_uint16_t) tlv_value_16(tlv_t *tlv); CORE_DECLARE(c_uint32_t) tlv_value_32(tlv_t *tlv); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* !__CORE_TLV_H__ */ nextepc-0.3.10/lib/core/include/core_tlv_msg.h000066400000000000000000000064571333553357400212450ustar00rootroot00000000000000#ifndef __TLV_MSG_H__ #define __TLV_MSG_H__ #include "core_tlv.h" #include "core_pkbuf.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define TLV_MAX_HEADROOM 16 #define TLV_VARIABLE_LEN 0 #define TLV_MAX_MORE 8 #define TLV_1_OR_MORE(__v) __v[TLV_MAX_MORE] #define TLV_MAX_CHILD_DESC 128 typedef enum { TLV_UINT8, TLV_UINT16, TLV_UINT24, TLV_UINT32, TLV_INT8, TLV_INT16, TLV_INT24, TLV_INT32, TLV_FIXED_STR, TLV_VAR_STR, TLV_NULL, TLV_MORE, TLV_COMPOUND, TLV_MESSAGE, } tlv_type_e; typedef struct _tlv_desc_t { tlv_type_e ctype; c_int8_t *name; c_uint16_t type; c_uint16_t length; c_uint8_t instance; c_uint16_t vsize; void *child_descs[TLV_MAX_CHILD_DESC]; } tlv_desc_t; extern tlv_desc_t tlv_desc_more1; extern tlv_desc_t tlv_desc_more2; extern tlv_desc_t tlv_desc_more3; extern tlv_desc_t tlv_desc_more4; extern tlv_desc_t tlv_desc_more5; extern tlv_desc_t tlv_desc_more6; extern tlv_desc_t tlv_desc_more7; extern tlv_desc_t tlv_desc_more8; typedef c_uint64_t tlv_presence_t; /* 8-bit Unsigned integer */ typedef struct _tlv_uint8_t { tlv_presence_t presence; c_uint8_t u8; } tlv_uint8_t; /* 16-bit Unsigned integer */ typedef struct _tlv_uint16_t { tlv_presence_t presence; c_uint16_t u16; } tlv_uint16_t; /* 24-bit Unsigned integer */ typedef struct _tlv_uint24_t { tlv_presence_t presence; c_uint32_t u24; /* Only 3 bytes valid */ } tlv_uint24_t; /* 32-bit Unsigned integer */ typedef struct _tlv_uint32_t { tlv_presence_t presence; c_uint32_t u32; } tlv_uint32_t; /* 8-bit Signed integer */ typedef struct _tlv_int8_t { tlv_presence_t presence; c_int8_t i8; } tlv_int8_t; /* 16-bit Signed integer */ typedef struct _tlv_int16t { tlv_presence_t presence; c_int16_t i16; } tlv_int16_t; /* 24-bit Signed integer */ typedef struct _tlv_int24_t { tlv_presence_t presence; c_int32_t i24; /* Only 3 bytes valid */ } tlv_int24_t; /* 32-bit Signed integer */ typedef struct _tlv_int32_t { tlv_presence_t presence; c_int32_t i32; } tlv_int32_t; /* Octets */ #define TLV_CLEAR_DATA(__dATA) \ do { \ d_assert((__dATA), , "Null param"); \ if ((__dATA)->data) \ { \ CORE_FREE((__dATA)->data); \ (__dATA)->data = NULL; \ (__dATA)->len = 0; \ (__dATA)->presence = 0; \ } \ } while(0) #define TLV_STORE_DATA(__dST, __sRC) \ do { \ d_assert((__sRC),, "Null param") \ d_assert((__sRC)->data,, "Null param") \ d_assert((__dST),, "Null param") \ TLV_CLEAR_DATA(__dST); \ (__dST)->presence = (__sRC)->presence; \ (__dST)->len = (__sRC)->len; \ (__dST)->data = core_calloc((__dST)->len, sizeof(c_uint8_t)); \ memcpy((__dST)->data, (__sRC)->data, (__dST)->len); \ } while(0) typedef struct _tlv_octet_t { tlv_presence_t presence; void *data; c_uint32_t len; } tlv_octet_t; /* No value */ typedef struct _tlv_null { tlv_presence_t presence; } tlv_null_t; CORE_DECLARE(status_t) tlv_build_msg( pkbuf_t **pkbuf, tlv_desc_t *desc, void *msg, int mode); CORE_DECLARE(status_t) tlv_parse_msg( void *msg, tlv_desc_t *desc, pkbuf_t *pkbuf, int mode); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __TLV_MSG_H__ */ nextepc-0.3.10/lib/core/include/core_udp.h000066400000000000000000000005761333553357400203560ustar00rootroot00000000000000#ifndef __CORE_UDP_H__ #define __CORE_UDP_H__ #include "core_sock.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(status_t) udp_open(sock_id *new, int family, const char *local_host, c_uint16_t local_port, const char *remote_host, c_uint16_t remote_port, int flags); #ifdef __cplusplus } #endif /* __cplusplus */ #endif nextepc-0.3.10/lib/core/include/core_version.h000066400000000000000000000104131333553357400212420ustar00rootroot00000000000000#ifndef __CORE_VERSION_H__ #define __CORE_VERSION_H__ /** * @file version.h * @brief CORE Versioning Interface * * CORE's Version * * There are several different mechanisms for accessing the version. There * is a string form, and a set of numbers; in addition, there are constants * which can be compiled into your application, and you can query the library * being used for its actual version. * * Note that it is possible for an application to detect that it has been * compiled against a different version of CORE by use of the compile-time * constants and the use of the run-time query function. * */ /* The numeric compile-time version constants. These constants are the * authoritative version numbers for CORE. */ /** major version * Major API changes that could cause compatibility problems for older * programs such as structure size changes. No binary compatibility is * possible across a change in the major version. */ #define CORE_MAJOR_VERSION 1 /** minor version * Minor API changes that do not cause binary compatibility problems. * Reset to 0 when upgrading CORE_MAJOR_VERSION */ #define CORE_MINOR_VERSION 0 /** patch level * The Patch Level never includes API changes, simply bug fixes. * Reset to 0 when upgrading CORE_MINOR_VERSION */ #define CORE_PATCH_VERSION 0 /** * The symbol CORE_IS_DEV_VERSION is only defined for internal, * "development" copies of CORE. It is undefined for released versions * of CORE. */ #define CORE_IS_DEV_VERSION /** * Check at compile time if the CORE version is at least a certain * level. * @param major The major version component of the version checked * for (e.g., the "1" of "1.3.0"). * @param minor The minor version component of the version checked * for (e.g., the "3" of "1.3.0"). * @param patch The patch level component of the version checked * for (e.g., the "0" of "1.3.0"). * @remark This macro is available with CORE versions starting with * 1.3.0. */ #define CORE_VERSION_AT_LEAST(major,minor,patch) \ (((major) < CORE_MAJOR_VERSION) \ || ((major) == CORE_MAJOR_VERSION && (minor) < CORE_MINOR_VERSION) \ || ((major) == CORE_MAJOR_VERSION && (minor) == CORE_MINOR_VERSION && (patch) <= CORE_PATCH_VERSION)) #if defined(CORE_IS_DEV_VERSION) || defined(DOXYGEN) /** Internal: string form of the "is dev" flag */ #define CORE_IS_DEV_STRING "-dev" #else #define CORE_IS_DEV_STRING "" #endif /* STRINGIFY is defined here, and also in general.h, so wrap it */ #ifndef STRINGIFY /** Properly quote a value as a string in the C preprocessor */ #define STRINGIFY(n) STRINGIFY_HELPER(n) /** Helper macro for STRINGIFY */ #define STRINGIFY_HELPER(n) #n #endif /** The formatted string of CORE's version */ #define CORE_VERSION_STRING \ STRINGIFY(CORE_MAJOR_VERSION) "." \ STRINGIFY(CORE_MINOR_VERSION) "." \ STRINGIFY(CORE_PATCH_VERSION) \ CORE_IS_DEV_STRING /** An alternative formatted string of CORE's version */ /* macro for Win32 .rc files using numeric csv representation */ #define CORE_VERSION_STRING_CSV CORE_MAJOR_VERSION ##, \ ##CORE_MINOR_VERSION ##, \ ##CORE_PATCH_VERSION #ifndef __CORE_VERSION_ONLY__ /* The C language API to access the version at run time, * as opposed to compile time. CORE_VERSION_ONLY may be defined * externally when preprocessing version.h to obtain strictly * the C Preprocessor macro declarations. */ #include "core.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * The numeric version information is broken out into fields within this * structure. */ typedef struct { int major; /**< major number */ int minor; /**< minor number */ int patch; /**< patch number */ int is_dev; /**< is development (1 or 0) */ } core_version_t; /** * Return CORE's version information information in a numeric form. * * @param pvsn Pointer to a version structure for returning the version * information. */ CORE_DECLARE(void) core_version(core_version_t *pvsn); /** Return CORE's version information as a string. */ CORE_DECLARE(const char *) core_version_string(void); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* ndef CORE_VERSION_ONLY */ #endif /* ndef CORE_VERSION_H */ nextepc-0.3.10/lib/core/src/000077500000000000000000000000001333553357400155415ustar00rootroot00000000000000nextepc-0.3.10/lib/core/src/3gpp_types.c000066400000000000000000000102471333553357400200060ustar00rootroot00000000000000#define TRACE_MODULE _types #include "core_debug.h" #include "core_lib.h" #include "core_pkbuf.h" #include "3gpp_types.h" #define PLMN_ID_DIGIT1(x) (((x) / 100) % 10) #define PLMN_ID_DIGIT2(x) (((x) / 10) % 10) #define PLMN_ID_DIGIT3(x) ((x) % 10) c_uint16_t plmn_id_mcc(plmn_id_t *plmn_id) { return plmn_id->mcc1 * 100 + plmn_id->mcc2 * 10 + plmn_id->mcc3; } c_uint16_t plmn_id_mnc(plmn_id_t *plmn_id) { return plmn_id->mnc1 == 0xf ? plmn_id->mnc2 * 10 + plmn_id->mnc3 : plmn_id->mnc1 * 100 + plmn_id->mnc2 * 10 + plmn_id->mnc3; } c_uint16_t plmn_id_mnc_len(plmn_id_t *plmn_id) { return plmn_id->mnc1 == 0xf ? 2 : 3; } void *plmn_id_build(plmn_id_t *plmn_id, c_uint16_t mcc, c_uint16_t mnc, c_uint16_t mnc_len) { plmn_id->mcc1 = PLMN_ID_DIGIT1(mcc); plmn_id->mcc2 = PLMN_ID_DIGIT2(mcc); plmn_id->mcc3 = PLMN_ID_DIGIT3(mcc); if (mnc_len == 2) plmn_id->mnc1 = 0xf; else plmn_id->mnc1 = PLMN_ID_DIGIT1(mnc); plmn_id->mnc2 = PLMN_ID_DIGIT2(mnc); plmn_id->mnc3 = PLMN_ID_DIGIT3(mnc); return plmn_id; } c_int16_t apn_build(c_int8_t *dst, c_int8_t *src, c_int16_t length) { int i = 0, j = 0; for (i = 0, j = 0; i < length; i++, j++) { if (src[i] == '.') { dst[i-j] = j; j = -1; } else { dst[i+1] = src[i]; } } dst[i-j] = j; return length+1; } c_int16_t apn_parse(c_int8_t *dst, c_int8_t *src, c_int16_t length) { int i = 0, j = 0; c_uint8_t len = 0; do { len = src[i++]; memcpy(&dst[j], &src[i], len); i += len; j += len; if (i < length) dst[j++] = '.'; else dst[j] = 0; } while(i < length); return j; } /* 8.13 Protocol Configuration Options (PCO) * 10.5.6.3 Protocol configuration options in 3GPP TS 24.008 */ c_int16_t pco_parse(pco_t *pco, void *data, int data_len) { pco_t *source = (pco_t *)data; c_int16_t size = 0; int i = 0; d_assert(pco, return -1, "Null param"); d_assert(data, return -1, "Null param"); d_assert(data_len, return -1, "Null param"); memset(pco, 0, sizeof(pco_t)); pco->ext = source->ext; pco->configuration_protocol = source->configuration_protocol; size++; while(size < data_len && i < MAX_NUM_OF_PROTOCOL_OR_CONTAINER_ID) { pco_id_t *id = &pco->ids[i]; d_assert(size + sizeof(id->id) <= data_len, return -1, "decode error"); memcpy(&id->id, data + size, sizeof(id->id)); id->id = ntohs(id->id); size += sizeof(id->id); d_assert(size + sizeof(id->len) <= data_len, return -1, "decode error"); memcpy(&id->len, data + size, sizeof(id->len)); size += sizeof(id->len); id->data = data + size; size += id->len; i++; } pco->num_of_id = i; d_assert(size == data_len, return -1, "decode error(%d != %d)", size, data_len); return size; } c_int16_t pco_build(void *data, int data_len, pco_t *pco) { pco_t target; c_int16_t size = 0; int i = 0; d_assert(pco, return -1, "Null param"); d_assert(data, return -1, "Null param"); d_assert(data_len, return -1, "Null param"); memcpy(&target, pco, sizeof(pco_t)); d_assert(size + 1 <= data_len, return -1, "encode error"); memcpy(data + size, &target, 1); size += 1; d_assert(target.num_of_id <= MAX_NUM_OF_PROTOCOL_OR_CONTAINER_ID, return -1, "encode error"); for (i = 0; i < target.num_of_id; i++) { pco_id_t *id = &target.ids[i]; d_assert(size + sizeof(id->id) <= data_len, return -1, "encode error"); id->id = htons(id->id); memcpy(data + size, &id->id, sizeof(id->id)); size += sizeof(id->id); d_assert(size + sizeof(id->len) <= data_len, return -1, "encode error"); memcpy(data + size, &id->len, sizeof(id->len)); size += sizeof(id->len); d_assert(size + id->len <= data_len, return -1, "encode error"); memcpy(data + size, id->data, id->len); size += id->len; } return size; } nextepc-0.3.10/lib/core/src/Makefile.am000066400000000000000000000041051333553357400175750ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in pkglib_LTLIBRARIES = libcore.la libcore_la_SOURCES = \ ../include/core_aes_cmac.h ../include/core_aes.h ../include/core_cond.h \ ../include/core_debug.h ../include/core_errno.h ../include/core_file.h \ ../include/core_fsm.h ../include/core_general.h ../include/core.h \ ../include/core.h.in ../include/core_index.h ../include/core_lib.h \ ../include/core_list.h ../include/core_msgq.h ../include/core_mutex.h \ ../include/core_network.h ../include/core_param.h ../include/core_pkbuf.h \ ../include/core_pool.h ../include/core_queue.h ../include/core_ringbuf.h \ ../include/core_rwlock.h ../include/core_semaphore.h ../include/core_sha1.h \ ../include/core_sha1_hmac.h ../include/core_sha2.h ../include/core_sha2_hmac.h \ ../include/core_signal.h ../include/core_thread.h ../include/core_time.h \ ../include/core_timer.h ../include/core_tlv.h ../include/core_tlv_msg.h \ ../include/core_atomic.h ../include/core_portable.h \ ../include/core_version.h ../include/core_event.h ../include/core_hash.h \ ../include/3gpp_types.h \ \ debug.c version.c fsm.c msgq.c ringbuf.c timer.c tlv.c tlv_msg.c hash.c \ aes.c aes_cmac.c sha1.c sha1_hmac.c sha2.c sha2_hmac.c misc.c event.c \ 3gpp_types.c \ \ ../include/arch/core_private_common.h \ ../include/arch/unix/core_arch_file.h \ ../include/arch/unix/core_arch_mutex.h \ ../include/arch/unix/core_arch_semaphore.h \ ../include/arch/unix/core_arch_thread.h \ unix/start.c unix/errorcodes.c unix/pkbuf.c \ unix/rand.c unix/time.c unix/file.c \ unix/thread.c unix/signal.c \ unix/atomic.c unix/cond.c unix/mutex.c unix/rwlock.c unix/semaphore.c \ unix/socket.c unix/sockaddr.c unix/udp.c unix/tcp.c unix/tun.c \ $(NULL) if !USRSCTP libcore_la_SOURCES += unix/sctp.c endif AM_LDFLAGS = \ -version-info @LIBVERSION@ \ $(NULL) AM_CPPFLAGS = \ -I$(top_srcdir)/lib/core/include/arch/@OSDIR@ \ -I$(top_srcdir)/lib/core/include \ $(NULL) AM_CFLAGS = \ -Wall -Werror \ @OSCPPFLAGS@ \ $(NULL) MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = core *.stackdump nextepc-0.3.10/lib/core/src/aes.c000066400000000000000000001730441333553357400164660ustar00rootroot00000000000000#define FULL_UNROLL #define TRACE_MODULE _aes #include "core_debug.h" #include "core_aes.h" static const c_uint32_t Te0[256] = { 0xc66363a5U, 0xf87c7c84U, 0xee777799U, 0xf67b7b8dU, 0xfff2f20dU, 0xd66b6bbdU, 0xde6f6fb1U, 0x91c5c554U, 0x60303050U, 0x02010103U, 0xce6767a9U, 0x562b2b7dU, 0xe7fefe19U, 0xb5d7d762U, 0x4dababe6U, 0xec76769aU, 0x8fcaca45U, 0x1f82829dU, 0x89c9c940U, 0xfa7d7d87U, 0xeffafa15U, 0xb25959ebU, 0x8e4747c9U, 0xfbf0f00bU, 0x41adadecU, 0xb3d4d467U, 0x5fa2a2fdU, 0x45afafeaU, 0x239c9cbfU, 0x53a4a4f7U, 0xe4727296U, 0x9bc0c05bU, 0x75b7b7c2U, 0xe1fdfd1cU, 0x3d9393aeU, 0x4c26266aU, 0x6c36365aU, 0x7e3f3f41U, 0xf5f7f702U, 0x83cccc4fU, 0x6834345cU, 0x51a5a5f4U, 0xd1e5e534U, 0xf9f1f108U, 0xe2717193U, 0xabd8d873U, 0x62313153U, 0x2a15153fU, 0x0804040cU, 0x95c7c752U, 0x46232365U, 0x9dc3c35eU, 0x30181828U, 0x379696a1U, 0x0a05050fU, 0x2f9a9ab5U, 0x0e070709U, 0x24121236U, 0x1b80809bU, 0xdfe2e23dU, 0xcdebeb26U, 0x4e272769U, 0x7fb2b2cdU, 0xea75759fU, 0x1209091bU, 0x1d83839eU, 0x582c2c74U, 0x341a1a2eU, 0x361b1b2dU, 0xdc6e6eb2U, 0xb45a5aeeU, 0x5ba0a0fbU, 0xa45252f6U, 0x763b3b4dU, 0xb7d6d661U, 0x7db3b3ceU, 0x5229297bU, 0xdde3e33eU, 0x5e2f2f71U, 0x13848497U, 0xa65353f5U, 0xb9d1d168U, 0x00000000U, 0xc1eded2cU, 0x40202060U, 0xe3fcfc1fU, 0x79b1b1c8U, 0xb65b5bedU, 0xd46a6abeU, 0x8dcbcb46U, 0x67bebed9U, 0x7239394bU, 0x944a4adeU, 0x984c4cd4U, 0xb05858e8U, 0x85cfcf4aU, 0xbbd0d06bU, 0xc5efef2aU, 0x4faaaae5U, 0xedfbfb16U, 0x864343c5U, 0x9a4d4dd7U, 0x66333355U, 0x11858594U, 0x8a4545cfU, 0xe9f9f910U, 0x04020206U, 0xfe7f7f81U, 0xa05050f0U, 0x783c3c44U, 0x259f9fbaU, 0x4ba8a8e3U, 0xa25151f3U, 0x5da3a3feU, 0x804040c0U, 0x058f8f8aU, 0x3f9292adU, 0x219d9dbcU, 0x70383848U, 0xf1f5f504U, 0x63bcbcdfU, 0x77b6b6c1U, 0xafdada75U, 0x42212163U, 0x20101030U, 0xe5ffff1aU, 0xfdf3f30eU, 0xbfd2d26dU, 0x81cdcd4cU, 0x180c0c14U, 0x26131335U, 0xc3ecec2fU, 0xbe5f5fe1U, 0x359797a2U, 0x884444ccU, 0x2e171739U, 0x93c4c457U, 0x55a7a7f2U, 0xfc7e7e82U, 0x7a3d3d47U, 0xc86464acU, 0xba5d5de7U, 0x3219192bU, 0xe6737395U, 0xc06060a0U, 0x19818198U, 0x9e4f4fd1U, 0xa3dcdc7fU, 0x44222266U, 0x542a2a7eU, 0x3b9090abU, 0x0b888883U, 0x8c4646caU, 0xc7eeee29U, 0x6bb8b8d3U, 0x2814143cU, 0xa7dede79U, 0xbc5e5ee2U, 0x160b0b1dU, 0xaddbdb76U, 0xdbe0e03bU, 0x64323256U, 0x743a3a4eU, 0x140a0a1eU, 0x924949dbU, 0x0c06060aU, 0x4824246cU, 0xb85c5ce4U, 0x9fc2c25dU, 0xbdd3d36eU, 0x43acacefU, 0xc46262a6U, 0x399191a8U, 0x319595a4U, 0xd3e4e437U, 0xf279798bU, 0xd5e7e732U, 0x8bc8c843U, 0x6e373759U, 0xda6d6db7U, 0x018d8d8cU, 0xb1d5d564U, 0x9c4e4ed2U, 0x49a9a9e0U, 0xd86c6cb4U, 0xac5656faU, 0xf3f4f407U, 0xcfeaea25U, 0xca6565afU, 0xf47a7a8eU, 0x47aeaee9U, 0x10080818U, 0x6fbabad5U, 0xf0787888U, 0x4a25256fU, 0x5c2e2e72U, 0x381c1c24U, 0x57a6a6f1U, 0x73b4b4c7U, 0x97c6c651U, 0xcbe8e823U, 0xa1dddd7cU, 0xe874749cU, 0x3e1f1f21U, 0x964b4bddU, 0x61bdbddcU, 0x0d8b8b86U, 0x0f8a8a85U, 0xe0707090U, 0x7c3e3e42U, 0x71b5b5c4U, 0xcc6666aaU, 0x904848d8U, 0x06030305U, 0xf7f6f601U, 0x1c0e0e12U, 0xc26161a3U, 0x6a35355fU, 0xae5757f9U, 0x69b9b9d0U, 0x17868691U, 0x99c1c158U, 0x3a1d1d27U, 0x279e9eb9U, 0xd9e1e138U, 0xebf8f813U, 0x2b9898b3U, 0x22111133U, 0xd26969bbU, 0xa9d9d970U, 0x078e8e89U, 0x339494a7U, 0x2d9b9bb6U, 0x3c1e1e22U, 0x15878792U, 0xc9e9e920U, 0x87cece49U, 0xaa5555ffU, 0x50282878U, 0xa5dfdf7aU, 0x038c8c8fU, 0x59a1a1f8U, 0x09898980U, 0x1a0d0d17U, 0x65bfbfdaU, 0xd7e6e631U, 0x844242c6U, 0xd06868b8U, 0x824141c3U, 0x299999b0U, 0x5a2d2d77U, 0x1e0f0f11U, 0x7bb0b0cbU, 0xa85454fcU, 0x6dbbbbd6U, 0x2c16163aU, }; static const c_uint32_t Te1[256] = { 0xa5c66363U, 0x84f87c7cU, 0x99ee7777U, 0x8df67b7bU, 0x0dfff2f2U, 0xbdd66b6bU, 0xb1de6f6fU, 0x5491c5c5U, 0x50603030U, 0x03020101U, 0xa9ce6767U, 0x7d562b2bU, 0x19e7fefeU, 0x62b5d7d7U, 0xe64dababU, 0x9aec7676U, 0x458fcacaU, 0x9d1f8282U, 0x4089c9c9U, 0x87fa7d7dU, 0x15effafaU, 0xebb25959U, 0xc98e4747U, 0x0bfbf0f0U, 0xec41adadU, 0x67b3d4d4U, 0xfd5fa2a2U, 0xea45afafU, 0xbf239c9cU, 0xf753a4a4U, 0x96e47272U, 0x5b9bc0c0U, 0xc275b7b7U, 0x1ce1fdfdU, 0xae3d9393U, 0x6a4c2626U, 0x5a6c3636U, 0x417e3f3fU, 0x02f5f7f7U, 0x4f83ccccU, 0x5c683434U, 0xf451a5a5U, 0x34d1e5e5U, 0x08f9f1f1U, 0x93e27171U, 0x73abd8d8U, 0x53623131U, 0x3f2a1515U, 0x0c080404U, 0x5295c7c7U, 0x65462323U, 0x5e9dc3c3U, 0x28301818U, 0xa1379696U, 0x0f0a0505U, 0xb52f9a9aU, 0x090e0707U, 0x36241212U, 0x9b1b8080U, 0x3ddfe2e2U, 0x26cdebebU, 0x694e2727U, 0xcd7fb2b2U, 0x9fea7575U, 0x1b120909U, 0x9e1d8383U, 0x74582c2cU, 0x2e341a1aU, 0x2d361b1bU, 0xb2dc6e6eU, 0xeeb45a5aU, 0xfb5ba0a0U, 0xf6a45252U, 0x4d763b3bU, 0x61b7d6d6U, 0xce7db3b3U, 0x7b522929U, 0x3edde3e3U, 0x715e2f2fU, 0x97138484U, 0xf5a65353U, 0x68b9d1d1U, 0x00000000U, 0x2cc1ededU, 0x60402020U, 0x1fe3fcfcU, 0xc879b1b1U, 0xedb65b5bU, 0xbed46a6aU, 0x468dcbcbU, 0xd967bebeU, 0x4b723939U, 0xde944a4aU, 0xd4984c4cU, 0xe8b05858U, 0x4a85cfcfU, 0x6bbbd0d0U, 0x2ac5efefU, 0xe54faaaaU, 0x16edfbfbU, 0xc5864343U, 0xd79a4d4dU, 0x55663333U, 0x94118585U, 0xcf8a4545U, 0x10e9f9f9U, 0x06040202U, 0x81fe7f7fU, 0xf0a05050U, 0x44783c3cU, 0xba259f9fU, 0xe34ba8a8U, 0xf3a25151U, 0xfe5da3a3U, 0xc0804040U, 0x8a058f8fU, 0xad3f9292U, 0xbc219d9dU, 0x48703838U, 0x04f1f5f5U, 0xdf63bcbcU, 0xc177b6b6U, 0x75afdadaU, 0x63422121U, 0x30201010U, 0x1ae5ffffU, 0x0efdf3f3U, 0x6dbfd2d2U, 0x4c81cdcdU, 0x14180c0cU, 0x35261313U, 0x2fc3ececU, 0xe1be5f5fU, 0xa2359797U, 0xcc884444U, 0x392e1717U, 0x5793c4c4U, 0xf255a7a7U, 0x82fc7e7eU, 0x477a3d3dU, 0xacc86464U, 0xe7ba5d5dU, 0x2b321919U, 0x95e67373U, 0xa0c06060U, 0x98198181U, 0xd19e4f4fU, 0x7fa3dcdcU, 0x66442222U, 0x7e542a2aU, 0xab3b9090U, 0x830b8888U, 0xca8c4646U, 0x29c7eeeeU, 0xd36bb8b8U, 0x3c281414U, 0x79a7dedeU, 0xe2bc5e5eU, 0x1d160b0bU, 0x76addbdbU, 0x3bdbe0e0U, 0x56643232U, 0x4e743a3aU, 0x1e140a0aU, 0xdb924949U, 0x0a0c0606U, 0x6c482424U, 0xe4b85c5cU, 0x5d9fc2c2U, 0x6ebdd3d3U, 0xef43acacU, 0xa6c46262U, 0xa8399191U, 0xa4319595U, 0x37d3e4e4U, 0x8bf27979U, 0x32d5e7e7U, 0x438bc8c8U, 0x596e3737U, 0xb7da6d6dU, 0x8c018d8dU, 0x64b1d5d5U, 0xd29c4e4eU, 0xe049a9a9U, 0xb4d86c6cU, 0xfaac5656U, 0x07f3f4f4U, 0x25cfeaeaU, 0xafca6565U, 0x8ef47a7aU, 0xe947aeaeU, 0x18100808U, 0xd56fbabaU, 0x88f07878U, 0x6f4a2525U, 0x725c2e2eU, 0x24381c1cU, 0xf157a6a6U, 0xc773b4b4U, 0x5197c6c6U, 0x23cbe8e8U, 0x7ca1ddddU, 0x9ce87474U, 0x213e1f1fU, 0xdd964b4bU, 0xdc61bdbdU, 0x860d8b8bU, 0x850f8a8aU, 0x90e07070U, 0x427c3e3eU, 0xc471b5b5U, 0xaacc6666U, 0xd8904848U, 0x05060303U, 0x01f7f6f6U, 0x121c0e0eU, 0xa3c26161U, 0x5f6a3535U, 0xf9ae5757U, 0xd069b9b9U, 0x91178686U, 0x5899c1c1U, 0x273a1d1dU, 0xb9279e9eU, 0x38d9e1e1U, 0x13ebf8f8U, 0xb32b9898U, 0x33221111U, 0xbbd26969U, 0x70a9d9d9U, 0x89078e8eU, 0xa7339494U, 0xb62d9b9bU, 0x223c1e1eU, 0x92158787U, 0x20c9e9e9U, 0x4987ceceU, 0xffaa5555U, 0x78502828U, 0x7aa5dfdfU, 0x8f038c8cU, 0xf859a1a1U, 0x80098989U, 0x171a0d0dU, 0xda65bfbfU, 0x31d7e6e6U, 0xc6844242U, 0xb8d06868U, 0xc3824141U, 0xb0299999U, 0x775a2d2dU, 0x111e0f0fU, 0xcb7bb0b0U, 0xfca85454U, 0xd66dbbbbU, 0x3a2c1616U, }; static const c_uint32_t Te2[256] = { 0x63a5c663U, 0x7c84f87cU, 0x7799ee77U, 0x7b8df67bU, 0xf20dfff2U, 0x6bbdd66bU, 0x6fb1de6fU, 0xc55491c5U, 0x30506030U, 0x01030201U, 0x67a9ce67U, 0x2b7d562bU, 0xfe19e7feU, 0xd762b5d7U, 0xabe64dabU, 0x769aec76U, 0xca458fcaU, 0x829d1f82U, 0xc94089c9U, 0x7d87fa7dU, 0xfa15effaU, 0x59ebb259U, 0x47c98e47U, 0xf00bfbf0U, 0xadec41adU, 0xd467b3d4U, 0xa2fd5fa2U, 0xafea45afU, 0x9cbf239cU, 0xa4f753a4U, 0x7296e472U, 0xc05b9bc0U, 0xb7c275b7U, 0xfd1ce1fdU, 0x93ae3d93U, 0x266a4c26U, 0x365a6c36U, 0x3f417e3fU, 0xf702f5f7U, 0xcc4f83ccU, 0x345c6834U, 0xa5f451a5U, 0xe534d1e5U, 0xf108f9f1U, 0x7193e271U, 0xd873abd8U, 0x31536231U, 0x153f2a15U, 0x040c0804U, 0xc75295c7U, 0x23654623U, 0xc35e9dc3U, 0x18283018U, 0x96a13796U, 0x050f0a05U, 0x9ab52f9aU, 0x07090e07U, 0x12362412U, 0x809b1b80U, 0xe23ddfe2U, 0xeb26cdebU, 0x27694e27U, 0xb2cd7fb2U, 0x759fea75U, 0x091b1209U, 0x839e1d83U, 0x2c74582cU, 0x1a2e341aU, 0x1b2d361bU, 0x6eb2dc6eU, 0x5aeeb45aU, 0xa0fb5ba0U, 0x52f6a452U, 0x3b4d763bU, 0xd661b7d6U, 0xb3ce7db3U, 0x297b5229U, 0xe33edde3U, 0x2f715e2fU, 0x84971384U, 0x53f5a653U, 0xd168b9d1U, 0x00000000U, 0xed2cc1edU, 0x20604020U, 0xfc1fe3fcU, 0xb1c879b1U, 0x5bedb65bU, 0x6abed46aU, 0xcb468dcbU, 0xbed967beU, 0x394b7239U, 0x4ade944aU, 0x4cd4984cU, 0x58e8b058U, 0xcf4a85cfU, 0xd06bbbd0U, 0xef2ac5efU, 0xaae54faaU, 0xfb16edfbU, 0x43c58643U, 0x4dd79a4dU, 0x33556633U, 0x85941185U, 0x45cf8a45U, 0xf910e9f9U, 0x02060402U, 0x7f81fe7fU, 0x50f0a050U, 0x3c44783cU, 0x9fba259fU, 0xa8e34ba8U, 0x51f3a251U, 0xa3fe5da3U, 0x40c08040U, 0x8f8a058fU, 0x92ad3f92U, 0x9dbc219dU, 0x38487038U, 0xf504f1f5U, 0xbcdf63bcU, 0xb6c177b6U, 0xda75afdaU, 0x21634221U, 0x10302010U, 0xff1ae5ffU, 0xf30efdf3U, 0xd26dbfd2U, 0xcd4c81cdU, 0x0c14180cU, 0x13352613U, 0xec2fc3ecU, 0x5fe1be5fU, 0x97a23597U, 0x44cc8844U, 0x17392e17U, 0xc45793c4U, 0xa7f255a7U, 0x7e82fc7eU, 0x3d477a3dU, 0x64acc864U, 0x5de7ba5dU, 0x192b3219U, 0x7395e673U, 0x60a0c060U, 0x81981981U, 0x4fd19e4fU, 0xdc7fa3dcU, 0x22664422U, 0x2a7e542aU, 0x90ab3b90U, 0x88830b88U, 0x46ca8c46U, 0xee29c7eeU, 0xb8d36bb8U, 0x143c2814U, 0xde79a7deU, 0x5ee2bc5eU, 0x0b1d160bU, 0xdb76addbU, 0xe03bdbe0U, 0x32566432U, 0x3a4e743aU, 0x0a1e140aU, 0x49db9249U, 0x060a0c06U, 0x246c4824U, 0x5ce4b85cU, 0xc25d9fc2U, 0xd36ebdd3U, 0xacef43acU, 0x62a6c462U, 0x91a83991U, 0x95a43195U, 0xe437d3e4U, 0x798bf279U, 0xe732d5e7U, 0xc8438bc8U, 0x37596e37U, 0x6db7da6dU, 0x8d8c018dU, 0xd564b1d5U, 0x4ed29c4eU, 0xa9e049a9U, 0x6cb4d86cU, 0x56faac56U, 0xf407f3f4U, 0xea25cfeaU, 0x65afca65U, 0x7a8ef47aU, 0xaee947aeU, 0x08181008U, 0xbad56fbaU, 0x7888f078U, 0x256f4a25U, 0x2e725c2eU, 0x1c24381cU, 0xa6f157a6U, 0xb4c773b4U, 0xc65197c6U, 0xe823cbe8U, 0xdd7ca1ddU, 0x749ce874U, 0x1f213e1fU, 0x4bdd964bU, 0xbddc61bdU, 0x8b860d8bU, 0x8a850f8aU, 0x7090e070U, 0x3e427c3eU, 0xb5c471b5U, 0x66aacc66U, 0x48d89048U, 0x03050603U, 0xf601f7f6U, 0x0e121c0eU, 0x61a3c261U, 0x355f6a35U, 0x57f9ae57U, 0xb9d069b9U, 0x86911786U, 0xc15899c1U, 0x1d273a1dU, 0x9eb9279eU, 0xe138d9e1U, 0xf813ebf8U, 0x98b32b98U, 0x11332211U, 0x69bbd269U, 0xd970a9d9U, 0x8e89078eU, 0x94a73394U, 0x9bb62d9bU, 0x1e223c1eU, 0x87921587U, 0xe920c9e9U, 0xce4987ceU, 0x55ffaa55U, 0x28785028U, 0xdf7aa5dfU, 0x8c8f038cU, 0xa1f859a1U, 0x89800989U, 0x0d171a0dU, 0xbfda65bfU, 0xe631d7e6U, 0x42c68442U, 0x68b8d068U, 0x41c38241U, 0x99b02999U, 0x2d775a2dU, 0x0f111e0fU, 0xb0cb7bb0U, 0x54fca854U, 0xbbd66dbbU, 0x163a2c16U, }; static const c_uint32_t Te3[256] = { 0x6363a5c6U, 0x7c7c84f8U, 0x777799eeU, 0x7b7b8df6U, 0xf2f20dffU, 0x6b6bbdd6U, 0x6f6fb1deU, 0xc5c55491U, 0x30305060U, 0x01010302U, 0x6767a9ceU, 0x2b2b7d56U, 0xfefe19e7U, 0xd7d762b5U, 0xababe64dU, 0x76769aecU, 0xcaca458fU, 0x82829d1fU, 0xc9c94089U, 0x7d7d87faU, 0xfafa15efU, 0x5959ebb2U, 0x4747c98eU, 0xf0f00bfbU, 0xadadec41U, 0xd4d467b3U, 0xa2a2fd5fU, 0xafafea45U, 0x9c9cbf23U, 0xa4a4f753U, 0x727296e4U, 0xc0c05b9bU, 0xb7b7c275U, 0xfdfd1ce1U, 0x9393ae3dU, 0x26266a4cU, 0x36365a6cU, 0x3f3f417eU, 0xf7f702f5U, 0xcccc4f83U, 0x34345c68U, 0xa5a5f451U, 0xe5e534d1U, 0xf1f108f9U, 0x717193e2U, 0xd8d873abU, 0x31315362U, 0x15153f2aU, 0x04040c08U, 0xc7c75295U, 0x23236546U, 0xc3c35e9dU, 0x18182830U, 0x9696a137U, 0x05050f0aU, 0x9a9ab52fU, 0x0707090eU, 0x12123624U, 0x80809b1bU, 0xe2e23ddfU, 0xebeb26cdU, 0x2727694eU, 0xb2b2cd7fU, 0x75759feaU, 0x09091b12U, 0x83839e1dU, 0x2c2c7458U, 0x1a1a2e34U, 0x1b1b2d36U, 0x6e6eb2dcU, 0x5a5aeeb4U, 0xa0a0fb5bU, 0x5252f6a4U, 0x3b3b4d76U, 0xd6d661b7U, 0xb3b3ce7dU, 0x29297b52U, 0xe3e33eddU, 0x2f2f715eU, 0x84849713U, 0x5353f5a6U, 0xd1d168b9U, 0x00000000U, 0xeded2cc1U, 0x20206040U, 0xfcfc1fe3U, 0xb1b1c879U, 0x5b5bedb6U, 0x6a6abed4U, 0xcbcb468dU, 0xbebed967U, 0x39394b72U, 0x4a4ade94U, 0x4c4cd498U, 0x5858e8b0U, 0xcfcf4a85U, 0xd0d06bbbU, 0xefef2ac5U, 0xaaaae54fU, 0xfbfb16edU, 0x4343c586U, 0x4d4dd79aU, 0x33335566U, 0x85859411U, 0x4545cf8aU, 0xf9f910e9U, 0x02020604U, 0x7f7f81feU, 0x5050f0a0U, 0x3c3c4478U, 0x9f9fba25U, 0xa8a8e34bU, 0x5151f3a2U, 0xa3a3fe5dU, 0x4040c080U, 0x8f8f8a05U, 0x9292ad3fU, 0x9d9dbc21U, 0x38384870U, 0xf5f504f1U, 0xbcbcdf63U, 0xb6b6c177U, 0xdada75afU, 0x21216342U, 0x10103020U, 0xffff1ae5U, 0xf3f30efdU, 0xd2d26dbfU, 0xcdcd4c81U, 0x0c0c1418U, 0x13133526U, 0xecec2fc3U, 0x5f5fe1beU, 0x9797a235U, 0x4444cc88U, 0x1717392eU, 0xc4c45793U, 0xa7a7f255U, 0x7e7e82fcU, 0x3d3d477aU, 0x6464acc8U, 0x5d5de7baU, 0x19192b32U, 0x737395e6U, 0x6060a0c0U, 0x81819819U, 0x4f4fd19eU, 0xdcdc7fa3U, 0x22226644U, 0x2a2a7e54U, 0x9090ab3bU, 0x8888830bU, 0x4646ca8cU, 0xeeee29c7U, 0xb8b8d36bU, 0x14143c28U, 0xdede79a7U, 0x5e5ee2bcU, 0x0b0b1d16U, 0xdbdb76adU, 0xe0e03bdbU, 0x32325664U, 0x3a3a4e74U, 0x0a0a1e14U, 0x4949db92U, 0x06060a0cU, 0x24246c48U, 0x5c5ce4b8U, 0xc2c25d9fU, 0xd3d36ebdU, 0xacacef43U, 0x6262a6c4U, 0x9191a839U, 0x9595a431U, 0xe4e437d3U, 0x79798bf2U, 0xe7e732d5U, 0xc8c8438bU, 0x3737596eU, 0x6d6db7daU, 0x8d8d8c01U, 0xd5d564b1U, 0x4e4ed29cU, 0xa9a9e049U, 0x6c6cb4d8U, 0x5656faacU, 0xf4f407f3U, 0xeaea25cfU, 0x6565afcaU, 0x7a7a8ef4U, 0xaeaee947U, 0x08081810U, 0xbabad56fU, 0x787888f0U, 0x25256f4aU, 0x2e2e725cU, 0x1c1c2438U, 0xa6a6f157U, 0xb4b4c773U, 0xc6c65197U, 0xe8e823cbU, 0xdddd7ca1U, 0x74749ce8U, 0x1f1f213eU, 0x4b4bdd96U, 0xbdbddc61U, 0x8b8b860dU, 0x8a8a850fU, 0x707090e0U, 0x3e3e427cU, 0xb5b5c471U, 0x6666aaccU, 0x4848d890U, 0x03030506U, 0xf6f601f7U, 0x0e0e121cU, 0x6161a3c2U, 0x35355f6aU, 0x5757f9aeU, 0xb9b9d069U, 0x86869117U, 0xc1c15899U, 0x1d1d273aU, 0x9e9eb927U, 0xe1e138d9U, 0xf8f813ebU, 0x9898b32bU, 0x11113322U, 0x6969bbd2U, 0xd9d970a9U, 0x8e8e8907U, 0x9494a733U, 0x9b9bb62dU, 0x1e1e223cU, 0x87879215U, 0xe9e920c9U, 0xcece4987U, 0x5555ffaaU, 0x28287850U, 0xdfdf7aa5U, 0x8c8c8f03U, 0xa1a1f859U, 0x89898009U, 0x0d0d171aU, 0xbfbfda65U, 0xe6e631d7U, 0x4242c684U, 0x6868b8d0U, 0x4141c382U, 0x9999b029U, 0x2d2d775aU, 0x0f0f111eU, 0xb0b0cb7bU, 0x5454fca8U, 0xbbbbd66dU, 0x16163a2cU, }; static const c_uint32_t Te4[256] = { 0x63636363U, 0x7c7c7c7cU, 0x77777777U, 0x7b7b7b7bU, 0xf2f2f2f2U, 0x6b6b6b6bU, 0x6f6f6f6fU, 0xc5c5c5c5U, 0x30303030U, 0x01010101U, 0x67676767U, 0x2b2b2b2bU, 0xfefefefeU, 0xd7d7d7d7U, 0xababababU, 0x76767676U, 0xcacacacaU, 0x82828282U, 0xc9c9c9c9U, 0x7d7d7d7dU, 0xfafafafaU, 0x59595959U, 0x47474747U, 0xf0f0f0f0U, 0xadadadadU, 0xd4d4d4d4U, 0xa2a2a2a2U, 0xafafafafU, 0x9c9c9c9cU, 0xa4a4a4a4U, 0x72727272U, 0xc0c0c0c0U, 0xb7b7b7b7U, 0xfdfdfdfdU, 0x93939393U, 0x26262626U, 0x36363636U, 0x3f3f3f3fU, 0xf7f7f7f7U, 0xccccccccU, 0x34343434U, 0xa5a5a5a5U, 0xe5e5e5e5U, 0xf1f1f1f1U, 0x71717171U, 0xd8d8d8d8U, 0x31313131U, 0x15151515U, 0x04040404U, 0xc7c7c7c7U, 0x23232323U, 0xc3c3c3c3U, 0x18181818U, 0x96969696U, 0x05050505U, 0x9a9a9a9aU, 0x07070707U, 0x12121212U, 0x80808080U, 0xe2e2e2e2U, 0xebebebebU, 0x27272727U, 0xb2b2b2b2U, 0x75757575U, 0x09090909U, 0x83838383U, 0x2c2c2c2cU, 0x1a1a1a1aU, 0x1b1b1b1bU, 0x6e6e6e6eU, 0x5a5a5a5aU, 0xa0a0a0a0U, 0x52525252U, 0x3b3b3b3bU, 0xd6d6d6d6U, 0xb3b3b3b3U, 0x29292929U, 0xe3e3e3e3U, 0x2f2f2f2fU, 0x84848484U, 0x53535353U, 0xd1d1d1d1U, 0x00000000U, 0xededededU, 0x20202020U, 0xfcfcfcfcU, 0xb1b1b1b1U, 0x5b5b5b5bU, 0x6a6a6a6aU, 0xcbcbcbcbU, 0xbebebebeU, 0x39393939U, 0x4a4a4a4aU, 0x4c4c4c4cU, 0x58585858U, 0xcfcfcfcfU, 0xd0d0d0d0U, 0xefefefefU, 0xaaaaaaaaU, 0xfbfbfbfbU, 0x43434343U, 0x4d4d4d4dU, 0x33333333U, 0x85858585U, 0x45454545U, 0xf9f9f9f9U, 0x02020202U, 0x7f7f7f7fU, 0x50505050U, 0x3c3c3c3cU, 0x9f9f9f9fU, 0xa8a8a8a8U, 0x51515151U, 0xa3a3a3a3U, 0x40404040U, 0x8f8f8f8fU, 0x92929292U, 0x9d9d9d9dU, 0x38383838U, 0xf5f5f5f5U, 0xbcbcbcbcU, 0xb6b6b6b6U, 0xdadadadaU, 0x21212121U, 0x10101010U, 0xffffffffU, 0xf3f3f3f3U, 0xd2d2d2d2U, 0xcdcdcdcdU, 0x0c0c0c0cU, 0x13131313U, 0xececececU, 0x5f5f5f5fU, 0x97979797U, 0x44444444U, 0x17171717U, 0xc4c4c4c4U, 0xa7a7a7a7U, 0x7e7e7e7eU, 0x3d3d3d3dU, 0x64646464U, 0x5d5d5d5dU, 0x19191919U, 0x73737373U, 0x60606060U, 0x81818181U, 0x4f4f4f4fU, 0xdcdcdcdcU, 0x22222222U, 0x2a2a2a2aU, 0x90909090U, 0x88888888U, 0x46464646U, 0xeeeeeeeeU, 0xb8b8b8b8U, 0x14141414U, 0xdedededeU, 0x5e5e5e5eU, 0x0b0b0b0bU, 0xdbdbdbdbU, 0xe0e0e0e0U, 0x32323232U, 0x3a3a3a3aU, 0x0a0a0a0aU, 0x49494949U, 0x06060606U, 0x24242424U, 0x5c5c5c5cU, 0xc2c2c2c2U, 0xd3d3d3d3U, 0xacacacacU, 0x62626262U, 0x91919191U, 0x95959595U, 0xe4e4e4e4U, 0x79797979U, 0xe7e7e7e7U, 0xc8c8c8c8U, 0x37373737U, 0x6d6d6d6dU, 0x8d8d8d8dU, 0xd5d5d5d5U, 0x4e4e4e4eU, 0xa9a9a9a9U, 0x6c6c6c6cU, 0x56565656U, 0xf4f4f4f4U, 0xeaeaeaeaU, 0x65656565U, 0x7a7a7a7aU, 0xaeaeaeaeU, 0x08080808U, 0xbabababaU, 0x78787878U, 0x25252525U, 0x2e2e2e2eU, 0x1c1c1c1cU, 0xa6a6a6a6U, 0xb4b4b4b4U, 0xc6c6c6c6U, 0xe8e8e8e8U, 0xddddddddU, 0x74747474U, 0x1f1f1f1fU, 0x4b4b4b4bU, 0xbdbdbdbdU, 0x8b8b8b8bU, 0x8a8a8a8aU, 0x70707070U, 0x3e3e3e3eU, 0xb5b5b5b5U, 0x66666666U, 0x48484848U, 0x03030303U, 0xf6f6f6f6U, 0x0e0e0e0eU, 0x61616161U, 0x35353535U, 0x57575757U, 0xb9b9b9b9U, 0x86868686U, 0xc1c1c1c1U, 0x1d1d1d1dU, 0x9e9e9e9eU, 0xe1e1e1e1U, 0xf8f8f8f8U, 0x98989898U, 0x11111111U, 0x69696969U, 0xd9d9d9d9U, 0x8e8e8e8eU, 0x94949494U, 0x9b9b9b9bU, 0x1e1e1e1eU, 0x87878787U, 0xe9e9e9e9U, 0xcecececeU, 0x55555555U, 0x28282828U, 0xdfdfdfdfU, 0x8c8c8c8cU, 0xa1a1a1a1U, 0x89898989U, 0x0d0d0d0dU, 0xbfbfbfbfU, 0xe6e6e6e6U, 0x42424242U, 0x68686868U, 0x41414141U, 0x99999999U, 0x2d2d2d2dU, 0x0f0f0f0fU, 0xb0b0b0b0U, 0x54545454U, 0xbbbbbbbbU, 0x16161616U, }; static const c_uint32_t Td0[256] = { 0x51f4a750U, 0x7e416553U, 0x1a17a4c3U, 0x3a275e96U, 0x3bab6bcbU, 0x1f9d45f1U, 0xacfa58abU, 0x4be30393U, 0x2030fa55U, 0xad766df6U, 0x88cc7691U, 0xf5024c25U, 0x4fe5d7fcU, 0xc52acbd7U, 0x26354480U, 0xb562a38fU, 0xdeb15a49U, 0x25ba1b67U, 0x45ea0e98U, 0x5dfec0e1U, 0xc32f7502U, 0x814cf012U, 0x8d4697a3U, 0x6bd3f9c6U, 0x038f5fe7U, 0x15929c95U, 0xbf6d7aebU, 0x955259daU, 0xd4be832dU, 0x587421d3U, 0x49e06929U, 0x8ec9c844U, 0x75c2896aU, 0xf48e7978U, 0x99583e6bU, 0x27b971ddU, 0xbee14fb6U, 0xf088ad17U, 0xc920ac66U, 0x7dce3ab4U, 0x63df4a18U, 0xe51a3182U, 0x97513360U, 0x62537f45U, 0xb16477e0U, 0xbb6bae84U, 0xfe81a01cU, 0xf9082b94U, 0x70486858U, 0x8f45fd19U, 0x94de6c87U, 0x527bf8b7U, 0xab73d323U, 0x724b02e2U, 0xe31f8f57U, 0x6655ab2aU, 0xb2eb2807U, 0x2fb5c203U, 0x86c57b9aU, 0xd33708a5U, 0x302887f2U, 0x23bfa5b2U, 0x02036abaU, 0xed16825cU, 0x8acf1c2bU, 0xa779b492U, 0xf307f2f0U, 0x4e69e2a1U, 0x65daf4cdU, 0x0605bed5U, 0xd134621fU, 0xc4a6fe8aU, 0x342e539dU, 0xa2f355a0U, 0x058ae132U, 0xa4f6eb75U, 0x0b83ec39U, 0x4060efaaU, 0x5e719f06U, 0xbd6e1051U, 0x3e218af9U, 0x96dd063dU, 0xdd3e05aeU, 0x4de6bd46U, 0x91548db5U, 0x71c45d05U, 0x0406d46fU, 0x605015ffU, 0x1998fb24U, 0xd6bde997U, 0x894043ccU, 0x67d99e77U, 0xb0e842bdU, 0x07898b88U, 0xe7195b38U, 0x79c8eedbU, 0xa17c0a47U, 0x7c420fe9U, 0xf8841ec9U, 0x00000000U, 0x09808683U, 0x322bed48U, 0x1e1170acU, 0x6c5a724eU, 0xfd0efffbU, 0x0f853856U, 0x3daed51eU, 0x362d3927U, 0x0a0fd964U, 0x685ca621U, 0x9b5b54d1U, 0x24362e3aU, 0x0c0a67b1U, 0x9357e70fU, 0xb4ee96d2U, 0x1b9b919eU, 0x80c0c54fU, 0x61dc20a2U, 0x5a774b69U, 0x1c121a16U, 0xe293ba0aU, 0xc0a02ae5U, 0x3c22e043U, 0x121b171dU, 0x0e090d0bU, 0xf28bc7adU, 0x2db6a8b9U, 0x141ea9c8U, 0x57f11985U, 0xaf75074cU, 0xee99ddbbU, 0xa37f60fdU, 0xf701269fU, 0x5c72f5bcU, 0x44663bc5U, 0x5bfb7e34U, 0x8b432976U, 0xcb23c6dcU, 0xb6edfc68U, 0xb8e4f163U, 0xd731dccaU, 0x42638510U, 0x13972240U, 0x84c61120U, 0x854a247dU, 0xd2bb3df8U, 0xaef93211U, 0xc729a16dU, 0x1d9e2f4bU, 0xdcb230f3U, 0x0d8652ecU, 0x77c1e3d0U, 0x2bb3166cU, 0xa970b999U, 0x119448faU, 0x47e96422U, 0xa8fc8cc4U, 0xa0f03f1aU, 0x567d2cd8U, 0x223390efU, 0x87494ec7U, 0xd938d1c1U, 0x8ccaa2feU, 0x98d40b36U, 0xa6f581cfU, 0xa57ade28U, 0xdab78e26U, 0x3fadbfa4U, 0x2c3a9de4U, 0x5078920dU, 0x6a5fcc9bU, 0x547e4662U, 0xf68d13c2U, 0x90d8b8e8U, 0x2e39f75eU, 0x82c3aff5U, 0x9f5d80beU, 0x69d0937cU, 0x6fd52da9U, 0xcf2512b3U, 0xc8ac993bU, 0x10187da7U, 0xe89c636eU, 0xdb3bbb7bU, 0xcd267809U, 0x6e5918f4U, 0xec9ab701U, 0x834f9aa8U, 0xe6956e65U, 0xaaffe67eU, 0x21bccf08U, 0xef15e8e6U, 0xbae79bd9U, 0x4a6f36ceU, 0xea9f09d4U, 0x29b07cd6U, 0x31a4b2afU, 0x2a3f2331U, 0xc6a59430U, 0x35a266c0U, 0x744ebc37U, 0xfc82caa6U, 0xe090d0b0U, 0x33a7d815U, 0xf104984aU, 0x41ecdaf7U, 0x7fcd500eU, 0x1791f62fU, 0x764dd68dU, 0x43efb04dU, 0xccaa4d54U, 0xe49604dfU, 0x9ed1b5e3U, 0x4c6a881bU, 0xc12c1fb8U, 0x4665517fU, 0x9d5eea04U, 0x018c355dU, 0xfa877473U, 0xfb0b412eU, 0xb3671d5aU, 0x92dbd252U, 0xe9105633U, 0x6dd64713U, 0x9ad7618cU, 0x37a10c7aU, 0x59f8148eU, 0xeb133c89U, 0xcea927eeU, 0xb761c935U, 0xe11ce5edU, 0x7a47b13cU, 0x9cd2df59U, 0x55f2733fU, 0x1814ce79U, 0x73c737bfU, 0x53f7cdeaU, 0x5ffdaa5bU, 0xdf3d6f14U, 0x7844db86U, 0xcaaff381U, 0xb968c43eU, 0x3824342cU, 0xc2a3405fU, 0x161dc372U, 0xbce2250cU, 0x283c498bU, 0xff0d9541U, 0x39a80171U, 0x080cb3deU, 0xd8b4e49cU, 0x6456c190U, 0x7bcb8461U, 0xd532b670U, 0x486c5c74U, 0xd0b85742U, }; static const c_uint32_t Td1[256] = { 0x5051f4a7U, 0x537e4165U, 0xc31a17a4U, 0x963a275eU, 0xcb3bab6bU, 0xf11f9d45U, 0xabacfa58U, 0x934be303U, 0x552030faU, 0xf6ad766dU, 0x9188cc76U, 0x25f5024cU, 0xfc4fe5d7U, 0xd7c52acbU, 0x80263544U, 0x8fb562a3U, 0x49deb15aU, 0x6725ba1bU, 0x9845ea0eU, 0xe15dfec0U, 0x02c32f75U, 0x12814cf0U, 0xa38d4697U, 0xc66bd3f9U, 0xe7038f5fU, 0x9515929cU, 0xebbf6d7aU, 0xda955259U, 0x2dd4be83U, 0xd3587421U, 0x2949e069U, 0x448ec9c8U, 0x6a75c289U, 0x78f48e79U, 0x6b99583eU, 0xdd27b971U, 0xb6bee14fU, 0x17f088adU, 0x66c920acU, 0xb47dce3aU, 0x1863df4aU, 0x82e51a31U, 0x60975133U, 0x4562537fU, 0xe0b16477U, 0x84bb6baeU, 0x1cfe81a0U, 0x94f9082bU, 0x58704868U, 0x198f45fdU, 0x8794de6cU, 0xb7527bf8U, 0x23ab73d3U, 0xe2724b02U, 0x57e31f8fU, 0x2a6655abU, 0x07b2eb28U, 0x032fb5c2U, 0x9a86c57bU, 0xa5d33708U, 0xf2302887U, 0xb223bfa5U, 0xba02036aU, 0x5ced1682U, 0x2b8acf1cU, 0x92a779b4U, 0xf0f307f2U, 0xa14e69e2U, 0xcd65daf4U, 0xd50605beU, 0x1fd13462U, 0x8ac4a6feU, 0x9d342e53U, 0xa0a2f355U, 0x32058ae1U, 0x75a4f6ebU, 0x390b83ecU, 0xaa4060efU, 0x065e719fU, 0x51bd6e10U, 0xf93e218aU, 0x3d96dd06U, 0xaedd3e05U, 0x464de6bdU, 0xb591548dU, 0x0571c45dU, 0x6f0406d4U, 0xff605015U, 0x241998fbU, 0x97d6bde9U, 0xcc894043U, 0x7767d99eU, 0xbdb0e842U, 0x8807898bU, 0x38e7195bU, 0xdb79c8eeU, 0x47a17c0aU, 0xe97c420fU, 0xc9f8841eU, 0x00000000U, 0x83098086U, 0x48322bedU, 0xac1e1170U, 0x4e6c5a72U, 0xfbfd0effU, 0x560f8538U, 0x1e3daed5U, 0x27362d39U, 0x640a0fd9U, 0x21685ca6U, 0xd19b5b54U, 0x3a24362eU, 0xb10c0a67U, 0x0f9357e7U, 0xd2b4ee96U, 0x9e1b9b91U, 0x4f80c0c5U, 0xa261dc20U, 0x695a774bU, 0x161c121aU, 0x0ae293baU, 0xe5c0a02aU, 0x433c22e0U, 0x1d121b17U, 0x0b0e090dU, 0xadf28bc7U, 0xb92db6a8U, 0xc8141ea9U, 0x8557f119U, 0x4caf7507U, 0xbbee99ddU, 0xfda37f60U, 0x9ff70126U, 0xbc5c72f5U, 0xc544663bU, 0x345bfb7eU, 0x768b4329U, 0xdccb23c6U, 0x68b6edfcU, 0x63b8e4f1U, 0xcad731dcU, 0x10426385U, 0x40139722U, 0x2084c611U, 0x7d854a24U, 0xf8d2bb3dU, 0x11aef932U, 0x6dc729a1U, 0x4b1d9e2fU, 0xf3dcb230U, 0xec0d8652U, 0xd077c1e3U, 0x6c2bb316U, 0x99a970b9U, 0xfa119448U, 0x2247e964U, 0xc4a8fc8cU, 0x1aa0f03fU, 0xd8567d2cU, 0xef223390U, 0xc787494eU, 0xc1d938d1U, 0xfe8ccaa2U, 0x3698d40bU, 0xcfa6f581U, 0x28a57adeU, 0x26dab78eU, 0xa43fadbfU, 0xe42c3a9dU, 0x0d507892U, 0x9b6a5fccU, 0x62547e46U, 0xc2f68d13U, 0xe890d8b8U, 0x5e2e39f7U, 0xf582c3afU, 0xbe9f5d80U, 0x7c69d093U, 0xa96fd52dU, 0xb3cf2512U, 0x3bc8ac99U, 0xa710187dU, 0x6ee89c63U, 0x7bdb3bbbU, 0x09cd2678U, 0xf46e5918U, 0x01ec9ab7U, 0xa8834f9aU, 0x65e6956eU, 0x7eaaffe6U, 0x0821bccfU, 0xe6ef15e8U, 0xd9bae79bU, 0xce4a6f36U, 0xd4ea9f09U, 0xd629b07cU, 0xaf31a4b2U, 0x312a3f23U, 0x30c6a594U, 0xc035a266U, 0x37744ebcU, 0xa6fc82caU, 0xb0e090d0U, 0x1533a7d8U, 0x4af10498U, 0xf741ecdaU, 0x0e7fcd50U, 0x2f1791f6U, 0x8d764dd6U, 0x4d43efb0U, 0x54ccaa4dU, 0xdfe49604U, 0xe39ed1b5U, 0x1b4c6a88U, 0xb8c12c1fU, 0x7f466551U, 0x049d5eeaU, 0x5d018c35U, 0x73fa8774U, 0x2efb0b41U, 0x5ab3671dU, 0x5292dbd2U, 0x33e91056U, 0x136dd647U, 0x8c9ad761U, 0x7a37a10cU, 0x8e59f814U, 0x89eb133cU, 0xeecea927U, 0x35b761c9U, 0xede11ce5U, 0x3c7a47b1U, 0x599cd2dfU, 0x3f55f273U, 0x791814ceU, 0xbf73c737U, 0xea53f7cdU, 0x5b5ffdaaU, 0x14df3d6fU, 0x867844dbU, 0x81caaff3U, 0x3eb968c4U, 0x2c382434U, 0x5fc2a340U, 0x72161dc3U, 0x0cbce225U, 0x8b283c49U, 0x41ff0d95U, 0x7139a801U, 0xde080cb3U, 0x9cd8b4e4U, 0x906456c1U, 0x617bcb84U, 0x70d532b6U, 0x74486c5cU, 0x42d0b857U, }; static const c_uint32_t Td2[256] = { 0xa75051f4U, 0x65537e41U, 0xa4c31a17U, 0x5e963a27U, 0x6bcb3babU, 0x45f11f9dU, 0x58abacfaU, 0x03934be3U, 0xfa552030U, 0x6df6ad76U, 0x769188ccU, 0x4c25f502U, 0xd7fc4fe5U, 0xcbd7c52aU, 0x44802635U, 0xa38fb562U, 0x5a49deb1U, 0x1b6725baU, 0x0e9845eaU, 0xc0e15dfeU, 0x7502c32fU, 0xf012814cU, 0x97a38d46U, 0xf9c66bd3U, 0x5fe7038fU, 0x9c951592U, 0x7aebbf6dU, 0x59da9552U, 0x832dd4beU, 0x21d35874U, 0x692949e0U, 0xc8448ec9U, 0x896a75c2U, 0x7978f48eU, 0x3e6b9958U, 0x71dd27b9U, 0x4fb6bee1U, 0xad17f088U, 0xac66c920U, 0x3ab47dceU, 0x4a1863dfU, 0x3182e51aU, 0x33609751U, 0x7f456253U, 0x77e0b164U, 0xae84bb6bU, 0xa01cfe81U, 0x2b94f908U, 0x68587048U, 0xfd198f45U, 0x6c8794deU, 0xf8b7527bU, 0xd323ab73U, 0x02e2724bU, 0x8f57e31fU, 0xab2a6655U, 0x2807b2ebU, 0xc2032fb5U, 0x7b9a86c5U, 0x08a5d337U, 0x87f23028U, 0xa5b223bfU, 0x6aba0203U, 0x825ced16U, 0x1c2b8acfU, 0xb492a779U, 0xf2f0f307U, 0xe2a14e69U, 0xf4cd65daU, 0xbed50605U, 0x621fd134U, 0xfe8ac4a6U, 0x539d342eU, 0x55a0a2f3U, 0xe132058aU, 0xeb75a4f6U, 0xec390b83U, 0xefaa4060U, 0x9f065e71U, 0x1051bd6eU, 0x8af93e21U, 0x063d96ddU, 0x05aedd3eU, 0xbd464de6U, 0x8db59154U, 0x5d0571c4U, 0xd46f0406U, 0x15ff6050U, 0xfb241998U, 0xe997d6bdU, 0x43cc8940U, 0x9e7767d9U, 0x42bdb0e8U, 0x8b880789U, 0x5b38e719U, 0xeedb79c8U, 0x0a47a17cU, 0x0fe97c42U, 0x1ec9f884U, 0x00000000U, 0x86830980U, 0xed48322bU, 0x70ac1e11U, 0x724e6c5aU, 0xfffbfd0eU, 0x38560f85U, 0xd51e3daeU, 0x3927362dU, 0xd9640a0fU, 0xa621685cU, 0x54d19b5bU, 0x2e3a2436U, 0x67b10c0aU, 0xe70f9357U, 0x96d2b4eeU, 0x919e1b9bU, 0xc54f80c0U, 0x20a261dcU, 0x4b695a77U, 0x1a161c12U, 0xba0ae293U, 0x2ae5c0a0U, 0xe0433c22U, 0x171d121bU, 0x0d0b0e09U, 0xc7adf28bU, 0xa8b92db6U, 0xa9c8141eU, 0x198557f1U, 0x074caf75U, 0xddbbee99U, 0x60fda37fU, 0x269ff701U, 0xf5bc5c72U, 0x3bc54466U, 0x7e345bfbU, 0x29768b43U, 0xc6dccb23U, 0xfc68b6edU, 0xf163b8e4U, 0xdccad731U, 0x85104263U, 0x22401397U, 0x112084c6U, 0x247d854aU, 0x3df8d2bbU, 0x3211aef9U, 0xa16dc729U, 0x2f4b1d9eU, 0x30f3dcb2U, 0x52ec0d86U, 0xe3d077c1U, 0x166c2bb3U, 0xb999a970U, 0x48fa1194U, 0x642247e9U, 0x8cc4a8fcU, 0x3f1aa0f0U, 0x2cd8567dU, 0x90ef2233U, 0x4ec78749U, 0xd1c1d938U, 0xa2fe8ccaU, 0x0b3698d4U, 0x81cfa6f5U, 0xde28a57aU, 0x8e26dab7U, 0xbfa43fadU, 0x9de42c3aU, 0x920d5078U, 0xcc9b6a5fU, 0x4662547eU, 0x13c2f68dU, 0xb8e890d8U, 0xf75e2e39U, 0xaff582c3U, 0x80be9f5dU, 0x937c69d0U, 0x2da96fd5U, 0x12b3cf25U, 0x993bc8acU, 0x7da71018U, 0x636ee89cU, 0xbb7bdb3bU, 0x7809cd26U, 0x18f46e59U, 0xb701ec9aU, 0x9aa8834fU, 0x6e65e695U, 0xe67eaaffU, 0xcf0821bcU, 0xe8e6ef15U, 0x9bd9bae7U, 0x36ce4a6fU, 0x09d4ea9fU, 0x7cd629b0U, 0xb2af31a4U, 0x23312a3fU, 0x9430c6a5U, 0x66c035a2U, 0xbc37744eU, 0xcaa6fc82U, 0xd0b0e090U, 0xd81533a7U, 0x984af104U, 0xdaf741ecU, 0x500e7fcdU, 0xf62f1791U, 0xd68d764dU, 0xb04d43efU, 0x4d54ccaaU, 0x04dfe496U, 0xb5e39ed1U, 0x881b4c6aU, 0x1fb8c12cU, 0x517f4665U, 0xea049d5eU, 0x355d018cU, 0x7473fa87U, 0x412efb0bU, 0x1d5ab367U, 0xd25292dbU, 0x5633e910U, 0x47136dd6U, 0x618c9ad7U, 0x0c7a37a1U, 0x148e59f8U, 0x3c89eb13U, 0x27eecea9U, 0xc935b761U, 0xe5ede11cU, 0xb13c7a47U, 0xdf599cd2U, 0x733f55f2U, 0xce791814U, 0x37bf73c7U, 0xcdea53f7U, 0xaa5b5ffdU, 0x6f14df3dU, 0xdb867844U, 0xf381caafU, 0xc43eb968U, 0x342c3824U, 0x405fc2a3U, 0xc372161dU, 0x250cbce2U, 0x498b283cU, 0x9541ff0dU, 0x017139a8U, 0xb3de080cU, 0xe49cd8b4U, 0xc1906456U, 0x84617bcbU, 0xb670d532U, 0x5c74486cU, 0x5742d0b8U, }; static const c_uint32_t Td3[256] = { 0xf4a75051U, 0x4165537eU, 0x17a4c31aU, 0x275e963aU, 0xab6bcb3bU, 0x9d45f11fU, 0xfa58abacU, 0xe303934bU, 0x30fa5520U, 0x766df6adU, 0xcc769188U, 0x024c25f5U, 0xe5d7fc4fU, 0x2acbd7c5U, 0x35448026U, 0x62a38fb5U, 0xb15a49deU, 0xba1b6725U, 0xea0e9845U, 0xfec0e15dU, 0x2f7502c3U, 0x4cf01281U, 0x4697a38dU, 0xd3f9c66bU, 0x8f5fe703U, 0x929c9515U, 0x6d7aebbfU, 0x5259da95U, 0xbe832dd4U, 0x7421d358U, 0xe0692949U, 0xc9c8448eU, 0xc2896a75U, 0x8e7978f4U, 0x583e6b99U, 0xb971dd27U, 0xe14fb6beU, 0x88ad17f0U, 0x20ac66c9U, 0xce3ab47dU, 0xdf4a1863U, 0x1a3182e5U, 0x51336097U, 0x537f4562U, 0x6477e0b1U, 0x6bae84bbU, 0x81a01cfeU, 0x082b94f9U, 0x48685870U, 0x45fd198fU, 0xde6c8794U, 0x7bf8b752U, 0x73d323abU, 0x4b02e272U, 0x1f8f57e3U, 0x55ab2a66U, 0xeb2807b2U, 0xb5c2032fU, 0xc57b9a86U, 0x3708a5d3U, 0x2887f230U, 0xbfa5b223U, 0x036aba02U, 0x16825cedU, 0xcf1c2b8aU, 0x79b492a7U, 0x07f2f0f3U, 0x69e2a14eU, 0xdaf4cd65U, 0x05bed506U, 0x34621fd1U, 0xa6fe8ac4U, 0x2e539d34U, 0xf355a0a2U, 0x8ae13205U, 0xf6eb75a4U, 0x83ec390bU, 0x60efaa40U, 0x719f065eU, 0x6e1051bdU, 0x218af93eU, 0xdd063d96U, 0x3e05aeddU, 0xe6bd464dU, 0x548db591U, 0xc45d0571U, 0x06d46f04U, 0x5015ff60U, 0x98fb2419U, 0xbde997d6U, 0x4043cc89U, 0xd99e7767U, 0xe842bdb0U, 0x898b8807U, 0x195b38e7U, 0xc8eedb79U, 0x7c0a47a1U, 0x420fe97cU, 0x841ec9f8U, 0x00000000U, 0x80868309U, 0x2bed4832U, 0x1170ac1eU, 0x5a724e6cU, 0x0efffbfdU, 0x8538560fU, 0xaed51e3dU, 0x2d392736U, 0x0fd9640aU, 0x5ca62168U, 0x5b54d19bU, 0x362e3a24U, 0x0a67b10cU, 0x57e70f93U, 0xee96d2b4U, 0x9b919e1bU, 0xc0c54f80U, 0xdc20a261U, 0x774b695aU, 0x121a161cU, 0x93ba0ae2U, 0xa02ae5c0U, 0x22e0433cU, 0x1b171d12U, 0x090d0b0eU, 0x8bc7adf2U, 0xb6a8b92dU, 0x1ea9c814U, 0xf1198557U, 0x75074cafU, 0x99ddbbeeU, 0x7f60fda3U, 0x01269ff7U, 0x72f5bc5cU, 0x663bc544U, 0xfb7e345bU, 0x4329768bU, 0x23c6dccbU, 0xedfc68b6U, 0xe4f163b8U, 0x31dccad7U, 0x63851042U, 0x97224013U, 0xc6112084U, 0x4a247d85U, 0xbb3df8d2U, 0xf93211aeU, 0x29a16dc7U, 0x9e2f4b1dU, 0xb230f3dcU, 0x8652ec0dU, 0xc1e3d077U, 0xb3166c2bU, 0x70b999a9U, 0x9448fa11U, 0xe9642247U, 0xfc8cc4a8U, 0xf03f1aa0U, 0x7d2cd856U, 0x3390ef22U, 0x494ec787U, 0x38d1c1d9U, 0xcaa2fe8cU, 0xd40b3698U, 0xf581cfa6U, 0x7ade28a5U, 0xb78e26daU, 0xadbfa43fU, 0x3a9de42cU, 0x78920d50U, 0x5fcc9b6aU, 0x7e466254U, 0x8d13c2f6U, 0xd8b8e890U, 0x39f75e2eU, 0xc3aff582U, 0x5d80be9fU, 0xd0937c69U, 0xd52da96fU, 0x2512b3cfU, 0xac993bc8U, 0x187da710U, 0x9c636ee8U, 0x3bbb7bdbU, 0x267809cdU, 0x5918f46eU, 0x9ab701ecU, 0x4f9aa883U, 0x956e65e6U, 0xffe67eaaU, 0xbccf0821U, 0x15e8e6efU, 0xe79bd9baU, 0x6f36ce4aU, 0x9f09d4eaU, 0xb07cd629U, 0xa4b2af31U, 0x3f23312aU, 0xa59430c6U, 0xa266c035U, 0x4ebc3774U, 0x82caa6fcU, 0x90d0b0e0U, 0xa7d81533U, 0x04984af1U, 0xecdaf741U, 0xcd500e7fU, 0x91f62f17U, 0x4dd68d76U, 0xefb04d43U, 0xaa4d54ccU, 0x9604dfe4U, 0xd1b5e39eU, 0x6a881b4cU, 0x2c1fb8c1U, 0x65517f46U, 0x5eea049dU, 0x8c355d01U, 0x877473faU, 0x0b412efbU, 0x671d5ab3U, 0xdbd25292U, 0x105633e9U, 0xd647136dU, 0xd7618c9aU, 0xa10c7a37U, 0xf8148e59U, 0x133c89ebU, 0xa927eeceU, 0x61c935b7U, 0x1ce5ede1U, 0x47b13c7aU, 0xd2df599cU, 0xf2733f55U, 0x14ce7918U, 0xc737bf73U, 0xf7cdea53U, 0xfdaa5b5fU, 0x3d6f14dfU, 0x44db8678U, 0xaff381caU, 0x68c43eb9U, 0x24342c38U, 0xa3405fc2U, 0x1dc37216U, 0xe2250cbcU, 0x3c498b28U, 0x0d9541ffU, 0xa8017139U, 0x0cb3de08U, 0xb4e49cd8U, 0x56c19064U, 0xcb84617bU, 0x32b670d5U, 0x6c5c7448U, 0xb85742d0U, }; static const c_uint32_t Td4[256] = { 0x52525252U, 0x09090909U, 0x6a6a6a6aU, 0xd5d5d5d5U, 0x30303030U, 0x36363636U, 0xa5a5a5a5U, 0x38383838U, 0xbfbfbfbfU, 0x40404040U, 0xa3a3a3a3U, 0x9e9e9e9eU, 0x81818181U, 0xf3f3f3f3U, 0xd7d7d7d7U, 0xfbfbfbfbU, 0x7c7c7c7cU, 0xe3e3e3e3U, 0x39393939U, 0x82828282U, 0x9b9b9b9bU, 0x2f2f2f2fU, 0xffffffffU, 0x87878787U, 0x34343434U, 0x8e8e8e8eU, 0x43434343U, 0x44444444U, 0xc4c4c4c4U, 0xdedededeU, 0xe9e9e9e9U, 0xcbcbcbcbU, 0x54545454U, 0x7b7b7b7bU, 0x94949494U, 0x32323232U, 0xa6a6a6a6U, 0xc2c2c2c2U, 0x23232323U, 0x3d3d3d3dU, 0xeeeeeeeeU, 0x4c4c4c4cU, 0x95959595U, 0x0b0b0b0bU, 0x42424242U, 0xfafafafaU, 0xc3c3c3c3U, 0x4e4e4e4eU, 0x08080808U, 0x2e2e2e2eU, 0xa1a1a1a1U, 0x66666666U, 0x28282828U, 0xd9d9d9d9U, 0x24242424U, 0xb2b2b2b2U, 0x76767676U, 0x5b5b5b5bU, 0xa2a2a2a2U, 0x49494949U, 0x6d6d6d6dU, 0x8b8b8b8bU, 0xd1d1d1d1U, 0x25252525U, 0x72727272U, 0xf8f8f8f8U, 0xf6f6f6f6U, 0x64646464U, 0x86868686U, 0x68686868U, 0x98989898U, 0x16161616U, 0xd4d4d4d4U, 0xa4a4a4a4U, 0x5c5c5c5cU, 0xccccccccU, 0x5d5d5d5dU, 0x65656565U, 0xb6b6b6b6U, 0x92929292U, 0x6c6c6c6cU, 0x70707070U, 0x48484848U, 0x50505050U, 0xfdfdfdfdU, 0xededededU, 0xb9b9b9b9U, 0xdadadadaU, 0x5e5e5e5eU, 0x15151515U, 0x46464646U, 0x57575757U, 0xa7a7a7a7U, 0x8d8d8d8dU, 0x9d9d9d9dU, 0x84848484U, 0x90909090U, 0xd8d8d8d8U, 0xababababU, 0x00000000U, 0x8c8c8c8cU, 0xbcbcbcbcU, 0xd3d3d3d3U, 0x0a0a0a0aU, 0xf7f7f7f7U, 0xe4e4e4e4U, 0x58585858U, 0x05050505U, 0xb8b8b8b8U, 0xb3b3b3b3U, 0x45454545U, 0x06060606U, 0xd0d0d0d0U, 0x2c2c2c2cU, 0x1e1e1e1eU, 0x8f8f8f8fU, 0xcacacacaU, 0x3f3f3f3fU, 0x0f0f0f0fU, 0x02020202U, 0xc1c1c1c1U, 0xafafafafU, 0xbdbdbdbdU, 0x03030303U, 0x01010101U, 0x13131313U, 0x8a8a8a8aU, 0x6b6b6b6bU, 0x3a3a3a3aU, 0x91919191U, 0x11111111U, 0x41414141U, 0x4f4f4f4fU, 0x67676767U, 0xdcdcdcdcU, 0xeaeaeaeaU, 0x97979797U, 0xf2f2f2f2U, 0xcfcfcfcfU, 0xcecececeU, 0xf0f0f0f0U, 0xb4b4b4b4U, 0xe6e6e6e6U, 0x73737373U, 0x96969696U, 0xacacacacU, 0x74747474U, 0x22222222U, 0xe7e7e7e7U, 0xadadadadU, 0x35353535U, 0x85858585U, 0xe2e2e2e2U, 0xf9f9f9f9U, 0x37373737U, 0xe8e8e8e8U, 0x1c1c1c1cU, 0x75757575U, 0xdfdfdfdfU, 0x6e6e6e6eU, 0x47474747U, 0xf1f1f1f1U, 0x1a1a1a1aU, 0x71717171U, 0x1d1d1d1dU, 0x29292929U, 0xc5c5c5c5U, 0x89898989U, 0x6f6f6f6fU, 0xb7b7b7b7U, 0x62626262U, 0x0e0e0e0eU, 0xaaaaaaaaU, 0x18181818U, 0xbebebebeU, 0x1b1b1b1bU, 0xfcfcfcfcU, 0x56565656U, 0x3e3e3e3eU, 0x4b4b4b4bU, 0xc6c6c6c6U, 0xd2d2d2d2U, 0x79797979U, 0x20202020U, 0x9a9a9a9aU, 0xdbdbdbdbU, 0xc0c0c0c0U, 0xfefefefeU, 0x78787878U, 0xcdcdcdcdU, 0x5a5a5a5aU, 0xf4f4f4f4U, 0x1f1f1f1fU, 0xddddddddU, 0xa8a8a8a8U, 0x33333333U, 0x88888888U, 0x07070707U, 0xc7c7c7c7U, 0x31313131U, 0xb1b1b1b1U, 0x12121212U, 0x10101010U, 0x59595959U, 0x27272727U, 0x80808080U, 0xececececU, 0x5f5f5f5fU, 0x60606060U, 0x51515151U, 0x7f7f7f7fU, 0xa9a9a9a9U, 0x19191919U, 0xb5b5b5b5U, 0x4a4a4a4aU, 0x0d0d0d0dU, 0x2d2d2d2dU, 0xe5e5e5e5U, 0x7a7a7a7aU, 0x9f9f9f9fU, 0x93939393U, 0xc9c9c9c9U, 0x9c9c9c9cU, 0xefefefefU, 0xa0a0a0a0U, 0xe0e0e0e0U, 0x3b3b3b3bU, 0x4d4d4d4dU, 0xaeaeaeaeU, 0x2a2a2a2aU, 0xf5f5f5f5U, 0xb0b0b0b0U, 0xc8c8c8c8U, 0xebebebebU, 0xbbbbbbbbU, 0x3c3c3c3cU, 0x83838383U, 0x53535353U, 0x99999999U, 0x61616161U, 0x17171717U, 0x2b2b2b2bU, 0x04040404U, 0x7e7e7e7eU, 0xbabababaU, 0x77777777U, 0xd6d6d6d6U, 0x26262626U, 0xe1e1e1e1U, 0x69696969U, 0x14141414U, 0x63636363U, 0x55555555U, 0x21212121U, 0x0c0c0c0cU, 0x7d7d7d7dU, }; static const c_uint32_t rcon[] = { 0x01000000, 0x02000000, 0x04000000, 0x08000000, 0x10000000, 0x20000000, 0x40000000, 0x80000000, 0x1B000000, 0x36000000, /* for 128-bit blocks, Rijndael never uses more than 10 rcon values */ }; #define GETU32(plaintext) (((c_uint32_t)(plaintext)[0] << 24) ^ \ ((c_uint32_t)(plaintext)[1] << 16) ^ \ ((c_uint32_t)(plaintext)[2] << 8) ^ \ ((c_uint32_t)(plaintext)[3])) #define PUTU32(ciphertext, st) { (ciphertext)[0] = (c_uint8_t)((st) >> 24); \ (ciphertext)[1] = (c_uint8_t)((st) >> 16); \ (ciphertext)[2] = (c_uint8_t)((st) >> 8); \ (ciphertext)[3] = (c_uint8_t)(st); } /** * Expand the cipher key into the encryption key schedule. * * @return the number of rounds for the given cipher key size. */ int aes_setup_enc(c_uint32_t *rk, const c_uint8_t *key, int keybits) { int i = 0; c_uint32_t temp; rk[0] = GETU32(key ); rk[1] = GETU32(key + 4); rk[2] = GETU32(key + 8); rk[3] = GETU32(key + 12); if (keybits == 128) { for (;;) { temp = rk[3]; rk[4] = rk[0] ^ (Te4[(temp >> 16) & 0xff] & 0xff000000) ^ (Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^ (Te4[(temp ) & 0xff] & 0x0000ff00) ^ (Te4[(temp >> 24) ] & 0x000000ff) ^ rcon[i]; rk[5] = rk[1] ^ rk[4]; rk[6] = rk[2] ^ rk[5]; rk[7] = rk[3] ^ rk[6]; if (++i == 10) return 10; rk += 4; } } rk[4] = GETU32(key + 16); rk[5] = GETU32(key + 20); if (keybits == 192) { for (;;) { temp = rk[ 5]; rk[ 6] = rk[ 0] ^ (Te4[(temp >> 16) & 0xff] & 0xff000000) ^ (Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^ (Te4[(temp ) & 0xff] & 0x0000ff00) ^ (Te4[(temp >> 24) ] & 0x000000ff) ^ rcon[i]; rk[ 7] = rk[ 1] ^ rk[ 6]; rk[ 8] = rk[ 2] ^ rk[ 7]; rk[ 9] = rk[ 3] ^ rk[ 8]; if (++i == 8) return 12; rk[10] = rk[ 4] ^ rk[ 9]; rk[11] = rk[ 5] ^ rk[10]; rk += 6; } } rk[6] = GETU32(key + 24); rk[7] = GETU32(key + 28); if (keybits == 256) { for (;;) { temp = rk[ 7]; rk[ 8] = rk[ 0] ^ (Te4[(temp >> 16) & 0xff] & 0xff000000) ^ (Te4[(temp >> 8) & 0xff] & 0x00ff0000) ^ (Te4[(temp ) & 0xff] & 0x0000ff00) ^ (Te4[(temp >> 24) ] & 0x000000ff) ^ rcon[i]; rk[ 9] = rk[ 1] ^ rk[ 8]; rk[10] = rk[ 2] ^ rk[ 9]; rk[11] = rk[ 3] ^ rk[10]; if (++i == 7) return 14; temp = rk[11]; rk[12] = rk[ 4] ^ (Te4[(temp >> 24) ] & 0xff000000) ^ (Te4[(temp >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(temp >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(temp ) & 0xff] & 0x000000ff); rk[13] = rk[ 5] ^ rk[12]; rk[14] = rk[ 6] ^ rk[13]; rk[15] = rk[ 7] ^ rk[14]; rk += 8; } } return 0; } /** * Expand the cipher key into the decryption key schedule. * * @return the number of rounds for the given cipher key size. */ int aes_setup_dec(c_uint32_t *rk, const c_uint8_t *key, int keybits) { int nrounds, i, j; c_uint32_t temp; /* expand the cipher key: */ nrounds = aes_setup_enc(rk, key, keybits); /* invert the order of the round keys: */ for (i = 0, j = 4*nrounds; i < j; i += 4, j -= 4) { temp = rk[i ]; rk[i ] = rk[j ]; rk[j ] = temp; temp = rk[i + 1]; rk[i + 1] = rk[j + 1]; rk[j + 1] = temp; temp = rk[i + 2]; rk[i + 2] = rk[j + 2]; rk[j + 2] = temp; temp = rk[i + 3]; rk[i + 3] = rk[j + 3]; rk[j + 3] = temp; } /* apply the inverse MixColumn transform to all round keys but the first and the last: */ for (i = 1; i < nrounds; i++) { rk += 4; rk[0] = Td0[Te4[(rk[0] >> 24) ] & 0xff] ^ Td1[Te4[(rk[0] >> 16) & 0xff] & 0xff] ^ Td2[Te4[(rk[0] >> 8) & 0xff] & 0xff] ^ Td3[Te4[(rk[0] ) & 0xff] & 0xff]; rk[1] = Td0[Te4[(rk[1] >> 24) ] & 0xff] ^ Td1[Te4[(rk[1] >> 16) & 0xff] & 0xff] ^ Td2[Te4[(rk[1] >> 8) & 0xff] & 0xff] ^ Td3[Te4[(rk[1] ) & 0xff] & 0xff]; rk[2] = Td0[Te4[(rk[2] >> 24) ] & 0xff] ^ Td1[Te4[(rk[2] >> 16) & 0xff] & 0xff] ^ Td2[Te4[(rk[2] >> 8) & 0xff] & 0xff] ^ Td3[Te4[(rk[2] ) & 0xff] & 0xff]; rk[3] = Td0[Te4[(rk[3] >> 24) ] & 0xff] ^ Td1[Te4[(rk[3] >> 16) & 0xff] & 0xff] ^ Td2[Te4[(rk[3] >> 8) & 0xff] & 0xff] ^ Td3[Te4[(rk[3] ) & 0xff] & 0xff]; } return nrounds; } void aes_encrypt(const c_uint32_t *rk, int nrounds, const c_uint8_t plaintext[16], c_uint8_t ciphertext[16]) { c_uint32_t s0, s1, s2, s3, t0, t1, t2, t3; #ifndef FULL_UNROLL int r; #endif /* ?FULL_UNROLL */ /* * map byte array block to cipher state * and add initial round key: */ s0 = GETU32(plaintext ) ^ rk[0]; s1 = GETU32(plaintext + 4) ^ rk[1]; s2 = GETU32(plaintext + 8) ^ rk[2]; s3 = GETU32(plaintext + 12) ^ rk[3]; #ifdef FULL_UNROLL /* round 1: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[ 4]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[ 5]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[ 6]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[ 7]; /* round 2: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[ 8]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[ 9]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[10]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[11]; /* round 3: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[12]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[13]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[14]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[15]; /* round 4: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[16]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[17]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[18]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[19]; /* round 5: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[20]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[21]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[22]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[23]; /* round 6: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[24]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[25]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[26]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[27]; /* round 7: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[28]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[29]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[30]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[31]; /* round 8: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[32]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[33]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[34]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[35]; /* round 9: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[36]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[37]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[38]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[39]; if (nrounds > 10) { /* round 10: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[40]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[41]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[42]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[43]; /* round 11: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[44]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[45]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[46]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[47]; if (nrounds > 12) { /* round 12: */ s0 = Te0[t0 >> 24] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[t3 & 0xff] ^ rk[48]; s1 = Te0[t1 >> 24] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[t0 & 0xff] ^ rk[49]; s2 = Te0[t2 >> 24] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[t1 & 0xff] ^ rk[50]; s3 = Te0[t3 >> 24] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[t2 & 0xff] ^ rk[51]; /* round 13: */ t0 = Te0[s0 >> 24] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[s3 & 0xff] ^ rk[52]; t1 = Te0[s1 >> 24] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[s0 & 0xff] ^ rk[53]; t2 = Te0[s2 >> 24] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[s1 & 0xff] ^ rk[54]; t3 = Te0[s3 >> 24] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[s2 & 0xff] ^ rk[55]; } } rk += nrounds << 2; #else /* !FULL_UNROLL */ /* * nrounds - 1 full rounds: */ r = nrounds >> 1; for (;;) { t0 = Te0[(s0 >> 24) ] ^ Te1[(s1 >> 16) & 0xff] ^ Te2[(s2 >> 8) & 0xff] ^ Te3[(s3 ) & 0xff] ^ rk[4]; t1 = Te0[(s1 >> 24) ] ^ Te1[(s2 >> 16) & 0xff] ^ Te2[(s3 >> 8) & 0xff] ^ Te3[(s0 ) & 0xff] ^ rk[5]; t2 = Te0[(s2 >> 24) ] ^ Te1[(s3 >> 16) & 0xff] ^ Te2[(s0 >> 8) & 0xff] ^ Te3[(s1 ) & 0xff] ^ rk[6]; t3 = Te0[(s3 >> 24) ] ^ Te1[(s0 >> 16) & 0xff] ^ Te2[(s1 >> 8) & 0xff] ^ Te3[(s2 ) & 0xff] ^ rk[7]; rk += 8; if (--r == 0) break; s0 = Te0[(t0 >> 24) ] ^ Te1[(t1 >> 16) & 0xff] ^ Te2[(t2 >> 8) & 0xff] ^ Te3[(t3 ) & 0xff] ^ rk[0]; s1 = Te0[(t1 >> 24) ] ^ Te1[(t2 >> 16) & 0xff] ^ Te2[(t3 >> 8) & 0xff] ^ Te3[(t0 ) & 0xff] ^ rk[1]; s2 = Te0[(t2 >> 24) ] ^ Te1[(t3 >> 16) & 0xff] ^ Te2[(t0 >> 8) & 0xff] ^ Te3[(t1 ) & 0xff] ^ rk[2]; s3 = Te0[(t3 >> 24) ] ^ Te1[(t0 >> 16) & 0xff] ^ Te2[(t1 >> 8) & 0xff] ^ Te3[(t2 ) & 0xff] ^ rk[3]; } #endif /* ?FULL_UNROLL */ /* * apply last round and * map cipher state to byte array block: */ s0 = (Te4[(t0 >> 24) ] & 0xff000000) ^ (Te4[(t1 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(t2 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(t3 ) & 0xff] & 0x000000ff) ^ rk[0]; PUTU32(ciphertext , s0); s1 = (Te4[(t1 >> 24) ] & 0xff000000) ^ (Te4[(t2 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(t3 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(t0 ) & 0xff] & 0x000000ff) ^ rk[1]; PUTU32(ciphertext + 4, s1); s2 = (Te4[(t2 >> 24) ] & 0xff000000) ^ (Te4[(t3 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(t0 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(t1 ) & 0xff] & 0x000000ff) ^ rk[2]; PUTU32(ciphertext + 8, s2); s3 = (Te4[(t3 >> 24) ] & 0xff000000) ^ (Te4[(t0 >> 16) & 0xff] & 0x00ff0000) ^ (Te4[(t1 >> 8) & 0xff] & 0x0000ff00) ^ (Te4[(t2 ) & 0xff] & 0x000000ff) ^ rk[3]; PUTU32(ciphertext + 12, s3); } void aes_decrypt(const c_uint32_t *rk, int nrounds, const c_uint8_t ciphertext[16], c_uint8_t plaintext[16]) { c_uint32_t s0, s1, s2, s3, t0, t1, t2, t3; #ifndef FULL_UNROLL int r; #endif /* ?FULL_UNROLL */ /* * map byte array block to cipher state * and add initial round key: */ s0 = GETU32(ciphertext ) ^ rk[0]; s1 = GETU32(ciphertext + 4) ^ rk[1]; s2 = GETU32(ciphertext + 8) ^ rk[2]; s3 = GETU32(ciphertext + 12) ^ rk[3]; #ifdef FULL_UNROLL /* round 1: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[ 4]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[ 5]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[ 6]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[ 7]; /* round 2: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[ 8]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[ 9]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[10]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[11]; /* round 3: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[12]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[13]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[14]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[15]; /* round 4: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[16]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[17]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[18]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[19]; /* round 5: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[20]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[21]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[22]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[23]; /* round 6: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[24]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[25]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[26]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[27]; /* round 7: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[28]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[29]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[30]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[31]; /* round 8: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[32]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[33]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[34]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[35]; /* round 9: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[36]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[37]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[38]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[39]; if (nrounds > 10) { /* round 10: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[40]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[41]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[42]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[43]; /* round 11: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[44]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[45]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[46]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[47]; if (nrounds > 12) { /* round 12: */ s0 = Td0[t0 >> 24] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[t1 & 0xff] ^ rk[48]; s1 = Td0[t1 >> 24] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[t2 & 0xff] ^ rk[49]; s2 = Td0[t2 >> 24] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[t3 & 0xff] ^ rk[50]; s3 = Td0[t3 >> 24] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[t0 & 0xff] ^ rk[51]; /* round 13: */ t0 = Td0[s0 >> 24] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[s1 & 0xff] ^ rk[52]; t1 = Td0[s1 >> 24] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[s2 & 0xff] ^ rk[53]; t2 = Td0[s2 >> 24] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[s3 & 0xff] ^ rk[54]; t3 = Td0[s3 >> 24] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[s0 & 0xff] ^ rk[55]; } } rk += nrounds << 2; #else /* !FULL_UNROLL */ /* * nrounds - 1 full rounds: */ r = nrounds >> 1; for (;;) { t0 = Td0[(s0 >> 24) ] ^ Td1[(s3 >> 16) & 0xff] ^ Td2[(s2 >> 8) & 0xff] ^ Td3[(s1 ) & 0xff] ^ rk[4]; t1 = Td0[(s1 >> 24) ] ^ Td1[(s0 >> 16) & 0xff] ^ Td2[(s3 >> 8) & 0xff] ^ Td3[(s2 ) & 0xff] ^ rk[5]; t2 = Td0[(s2 >> 24) ] ^ Td1[(s1 >> 16) & 0xff] ^ Td2[(s0 >> 8) & 0xff] ^ Td3[(s3 ) & 0xff] ^ rk[6]; t3 = Td0[(s3 >> 24) ] ^ Td1[(s2 >> 16) & 0xff] ^ Td2[(s1 >> 8) & 0xff] ^ Td3[(s0 ) & 0xff] ^ rk[7]; rk += 8; if (--r == 0) break; s0 = Td0[(t0 >> 24) ] ^ Td1[(t3 >> 16) & 0xff] ^ Td2[(t2 >> 8) & 0xff] ^ Td3[(t1 ) & 0xff] ^ rk[0]; s1 = Td0[(t1 >> 24) ] ^ Td1[(t0 >> 16) & 0xff] ^ Td2[(t3 >> 8) & 0xff] ^ Td3[(t2 ) & 0xff] ^ rk[1]; s2 = Td0[(t2 >> 24) ] ^ Td1[(t1 >> 16) & 0xff] ^ Td2[(t0 >> 8) & 0xff] ^ Td3[(t3 ) & 0xff] ^ rk[2]; s3 = Td0[(t3 >> 24) ] ^ Td1[(t2 >> 16) & 0xff] ^ Td2[(t1 >> 8) & 0xff] ^ Td3[(t0 ) & 0xff] ^ rk[3]; } #endif /* ?FULL_UNROLL */ /* * apply last round and * map cipher state to byte array block: */ s0 = (Td4[(t0 >> 24) ] & 0xff000000) ^ (Td4[(t3 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(t2 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(t1 ) & 0xff] & 0x000000ff) ^ rk[0]; PUTU32(plaintext , s0); s1 = (Td4[(t1 >> 24) ] & 0xff000000) ^ (Td4[(t0 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(t3 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(t2 ) & 0xff] & 0x000000ff) ^ rk[1]; PUTU32(plaintext + 4, s1); s2 = (Td4[(t2 >> 24) ] & 0xff000000) ^ (Td4[(t1 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(t0 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(t3 ) & 0xff] & 0x000000ff) ^ rk[2]; PUTU32(plaintext + 8, s2); s3 = (Td4[(t3 >> 24) ] & 0xff000000) ^ (Td4[(t2 >> 16) & 0xff] & 0x00ff0000) ^ (Td4[(t1 >> 8) & 0xff] & 0x0000ff00) ^ (Td4[(t0 ) & 0xff] & 0x000000ff) ^ rk[3]; PUTU32(plaintext + 12, s3); } status_t aes_cbc_encrypt(const c_uint8_t *key, const c_uint32_t keybits, c_uint8_t *ivec, const c_uint8_t *in, const c_uint32_t inlen, c_uint8_t *out, c_uint32_t *outlen) { c_uint32_t n; c_uint32_t len = inlen; const c_uint8_t *iv = ivec; c_uint32_t rk[RKLENGTH(MAX_KEY_BITS)]; int nrounds; d_assert(key, return CORE_ERROR, "Null param"); d_assert(keybits >= 128, return CORE_ERROR, "param 'keybits' must be larger than 128"); d_assert(ivec, return CORE_ERROR, "Null param"); d_assert(in, return CORE_ERROR, "Null param"); d_assert(inlen, return CORE_ERROR, "param 'inlen' is zero"); d_assert(out, return CORE_ERROR, "Null param"); d_assert(outlen, return CORE_ERROR, "Null param"); if (*outlen < ((inlen - 1) / AES_BLOCK_SIZE + 1) * AES_BLOCK_SIZE) { return CORE_ERROR; } *outlen = ((inlen - 1) / AES_BLOCK_SIZE + 1) * AES_BLOCK_SIZE; nrounds = aes_setup_enc(rk, key, keybits); while (len >= AES_BLOCK_SIZE) { for(n=0; n < AES_BLOCK_SIZE; ++n) out[n] = in[n] ^ iv[n]; aes_encrypt(rk, nrounds, out, out); iv = out; len -= AES_BLOCK_SIZE; in += AES_BLOCK_SIZE; out += AES_BLOCK_SIZE; } if (len) { for(n=0; n < len; ++n) out[n] = in[n] ^ iv[n]; for(n=len; n < AES_BLOCK_SIZE; ++n) out[n] = iv[n]; aes_encrypt(rk, nrounds, out, out); iv = out; } memcpy(ivec, iv, AES_BLOCK_SIZE); return CORE_OK; } status_t aes_cbc_decrypt(const c_uint8_t *key, const c_uint32_t keybits, c_uint8_t *ivec, const c_uint8_t *in, const c_uint32_t inlen, c_uint8_t *out, c_uint32_t *outlen) { c_uint32_t n; c_uint32_t len = inlen; c_uint8_t tmp[AES_BLOCK_SIZE]; const c_uint8_t *iv = ivec; c_uint32_t rk[RKLENGTH(MAX_KEY_BITS)]; int nrounds; d_assert(key, return CORE_ERROR, "Null param"); d_assert(keybits >= 128, return CORE_ERROR, "param 'keybits' must be larger than 128"); d_assert(ivec, return CORE_ERROR, "Null param"); d_assert(in, return CORE_ERROR, "Null param"); d_assert(inlen, return CORE_ERROR, "param 'inlen' is zero"); d_assert(out, return CORE_ERROR, "Null param"); d_assert(outlen, return CORE_ERROR, "Null param"); if (inlen % AES_BLOCK_SIZE != 0) { return CORE_ERROR; } *outlen = inlen; nrounds = aes_setup_dec(rk, key, keybits); if (in != out) { while (len >= AES_BLOCK_SIZE) { aes_decrypt(rk, nrounds, in, out); for(n=0; n < AES_BLOCK_SIZE; ++n) out[n] ^= iv[n]; iv = in; len -= AES_BLOCK_SIZE; in += AES_BLOCK_SIZE; out += AES_BLOCK_SIZE; } if (len) { aes_decrypt(rk, nrounds, in, tmp); for(n=0; n < len; ++n) out[n] = tmp[n] ^ iv[n]; iv = in; } memcpy(ivec, iv, AES_BLOCK_SIZE); } else { while (len >= AES_BLOCK_SIZE) { memcpy(tmp, in, AES_BLOCK_SIZE); aes_decrypt(rk, nrounds, in, out); for(n=0; n < AES_BLOCK_SIZE; ++n) out[n] ^= ivec[n]; memcpy(ivec, tmp, AES_BLOCK_SIZE); len -= AES_BLOCK_SIZE; in += AES_BLOCK_SIZE; out += AES_BLOCK_SIZE; } if (len) { memcpy(tmp, in, AES_BLOCK_SIZE); aes_decrypt(rk, nrounds, tmp, out); for(n=0; n < len; ++n) out[n] ^= ivec[n]; for(n=len; n < AES_BLOCK_SIZE; ++n) out[n] = tmp[n]; memcpy(ivec, tmp, AES_BLOCK_SIZE); } } return CORE_OK; } static void ctr128_inc(c_uint8_t *counter) { c_uint32_t n = 16, c = 1; do { --n; c += counter[n]; counter[n] = (c_uint8_t)c; c >>= 8; } while (n); } static void ctr128_inc_aligned(c_uint8_t *counter) { size_t *data, c, d, n; const union { long one; char little; } is_endian = { 1 }; if (is_endian.little || ((size_t)counter % sizeof(size_t)) != 0) { ctr128_inc(counter); return; } data = (size_t *)counter; c = 1; n = 16 / sizeof(size_t); do { --n; d = data[n] += c; /* did addition carry? */ c = ((d - c) & ~d) >> (sizeof(size_t) * 8 - 1); } while (n); } status_t aes_ctr128_encrypt(const c_uint8_t *key, c_uint8_t *ivec, const c_uint8_t *in, const c_uint32_t inlen, c_uint8_t *out) { c_uint8_t ecount_buf[16]; c_uint32_t len = inlen; c_uint32_t rk[RKLENGTH(MAX_KEY_BITS)]; int nrounds; c_uint32_t n = 0; size_t l = 0; d_assert(key, return CORE_ERROR, "Null param"); d_assert(ivec, return CORE_ERROR, "Null param"); d_assert(in, return CORE_ERROR, "Null param"); d_assert(len, return CORE_ERROR, "param 'inlen' is zero"); d_assert(out, return CORE_ERROR, "Null param"); memset(ecount_buf, 0, 16); nrounds = aes_setup_enc(rk, key, 128); while (n && len) { *(out++) = *(in++) ^ ecount_buf[n]; --len; n = (n + 1) % 16; } while (len >= 16) { aes_encrypt(rk, nrounds, ivec, ecount_buf); ctr128_inc_aligned(ivec); for (n = 0; n < 16; n += sizeof(size_t)) *(size_t *)(out + n) = *(size_t *)(in + n) ^ *(size_t *)(ecount_buf + n); len -= 16; out += 16; in += 16; n = 0; } if (len) { aes_encrypt(rk, nrounds, ivec, ecount_buf); ctr128_inc_aligned(ivec); while (len--) { out[n] = in[n] ^ ecount_buf[n]; ++n; } } return CORE_OK; /* low-performance for understanding the aes-ctr128 */ while (l < len) { if (n == 0) { aes_encrypt(rk, nrounds, ivec, ecount_buf); ctr128_inc(ivec); } out[l] = in[l] ^ ecount_buf[n]; ++l; n = (n + 1) % 16; } return CORE_OK; } nextepc-0.3.10/lib/core/src/aes_cmac.c000066400000000000000000000253321333553357400174450ustar00rootroot00000000000000#define TRACE_MODULE _cmac #include "core.h" #include "core_debug.h" #include "core_aes_cmac.h" #if (AES_BLOCK_SIZE != 16) #error "Wrong AES block size" #endif /* From RFC 4493 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Algorithm Generate_Subkey + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + + Input : K (128-bit key) + + Output : K1 (128-bit first subkey) + + K2 (128-bit second subkey) + +-------------------------------------------------------------------+ + + + Constants: const_Zero is 0x00000000000000000000000000000000 + + const_Rb is 0x00000000000000000000000000000087 + + Variables: L for output of AES-128 applied to 0^128 + + + + Step 1. L := AES-128(K, const_Zero); + + Step 2. if MSB(L) is equal to 0 + + then K1 := L << 1; + + else K1 := (L << 1) XOR const_Rb; + + Step 3. if MSB(K1) is equal to 0 + + then K2 := K1 << 1; + + else K2 := (K1 << 1) XOR const_Rb; + + Step 4. return K1, K2; + + + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ static status_t _generate_subkey(c_uint8_t *k1, c_uint8_t *k2, const c_uint8_t *key) { c_uint8_t zero[16] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; c_uint8_t rb[16] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x87 }; c_uint8_t L[16]; c_uint32_t rk[RKLENGTH(MAX_KEY_BITS)]; int i, nrounds; /* Step 1. L := AES-128(K, const_Zero) */ nrounds = aes_setup_enc(rk, key, 128); aes_encrypt(rk, nrounds, zero, L); /* Step 2. if MSB(L) is equal to 0 */ if ((L[0] & 0x80) == 0) { /* then k1 := L << 1; */ for (i = 0; i < 15; i++) k1[i] = ((L[i] << 1) & 0xfe) | ((L[i + 1] & 0x80) ? 1 : 0); k1[15] = ((L[15] << 1) & 0xfe); } else { /* else k1 := (L << 1) XOR const_Rb; */ for (i = 0; i < 15; i++) k1[i] = (((L[i] << 1) & 0xfe) | ((L[i + 1] & 0x80) ? 1 : 0)) ^ rb[i]; k1[15] = ((L[15] << 1) & 0xfe) ^ rb[15]; } /* Step 3. if MSB(k1) is equal to 0 */ if ((k1[0] & 0x80) == 0) { /* then k2 := k2 << 1; */ for (i = 0; i < 15; i++) k2[i] = ((k1[i] << 1) & 0xfe) | ((k1[i + 1] & 0x80) ? 1 : 0); k2[15] = ((k1[15] << 1) & 0xfe); } else { /* else k2 := (k2 << 1) XOR const_Rb; */ for (i = 0; i < 15; i++) k2[i] = (((k1[i] << 1) & 0xfe) | ((k1[i + 1] & 0x80) ? 1 : 0)) ^ rb[i]; k2[15] = ((k1[15] << 1) & 0xfe) ^ rb[15]; } return CORE_OK; } /* From RFC 4493 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Algorithm AES-CMAC + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + + Input : K ( 128-bit key ) + + : M ( message to be authenticated ) + + : len ( length of the message in octets ) + + Output : T ( message authentication code ) + + + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Constants: const_Zero is 0x00000000000000000000000000000000 + + const_Bsize is 16 + + + + Variables: K1, K2 for 128-bit subkeys + + M_i is the i-th block (i=1..ceil(len/const_Bsize)) + + M_last is the last block xor-ed with K1 or K2 + + n for number of blocks to be processed + + r for number of octets of last block + + flag for denoting if last block is complete or not + + + + Step 1. (K1,K2) := Generate_Subkey(K); + + Step 2. n := ceil(len/const_Bsize); + + Step 3. if n = 0 + + then + + n := 1; + + flag := false; + + else + + if len mod const_Bsize is 0 + + then flag := true; + + else flag := false; + + + + Step 4. if flag is true + + then M_last := M_n XOR K1; + + else M_last := padding(M_n) XOR K2; + + Step 5. X := const_Zero; + + Step 6. for i := 1 to n-1 do + + begin + + Y := X XOR M_i; + + X := AES-128(K,Y); + + end + + Y := M_last XOR X; + + T := AES-128(K,Y); + + Step 7. return T; + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ status_t aes_cmac_calculate(c_uint8_t *cmac, const c_uint8_t *key, const c_uint8_t *msg, const c_uint32_t len) { c_uint8_t x[16] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }; c_uint8_t y[16], m_last[16]; c_uint8_t k1[16], k2[16]; int i, j, n, bs, flag; c_uint32_t rk[RKLENGTH(MAX_KEY_BITS)]; int nrounds; d_assert(cmac, return CORE_ERROR, "Null param"); d_assert(key, return CORE_ERROR, "Null param"); d_assert(msg, return CORE_ERROR, "Null param"); /* Step 1. (K1,K2) := Generate_Subkey(K); */ _generate_subkey(k1, k2, key); /* Step 2. n := ceil(len/const_Bsize); */ n = (len + 15) / AES_BLOCK_SIZE; /* Step 3. if n = 0 then n := 1; flag := false; else if len mod const_Bsize is 0 then flag := true; else flag := false; */ if (n == 0) { n = 1; flag = 0; } else { if (len % AES_BLOCK_SIZE == 0) flag = 1; else flag = 0; } /* Step 4. if flag is true then M_last := M_n XOR K1; else M_last := padding(M_n) XOR K2; */ bs = (n - 1) * AES_BLOCK_SIZE; if (flag) { for (i = 0; i < 16; i++) m_last[i] = msg[bs + i] ^ k1[i]; } else { for (i = 0; i < len % AES_BLOCK_SIZE; i++) m_last[i] = msg[bs + i] ^ k2[i]; m_last[i] = 0x80 ^ k2[i]; for (i = i + 1; i < AES_BLOCK_SIZE; i++) m_last[i] = 0x00 ^ k2[i]; } /* Step 5. X := const_Zero; */ /* Step 6. for i := 1 to n-1 do begin Y := X XOR M_i; X := AES-128(K,Y); end Y := M_last XOR X; T := AES-128(K,Y); */ nrounds = aes_setup_enc(rk, key, 128); for (i = 0; i <= n - 2; i++) { bs = i * AES_BLOCK_SIZE; for (j = 0; j < 16; j++) y[j] = x[j] ^ msg[bs + j]; aes_encrypt(rk, nrounds, y, x); } bs = (n - 1) * AES_BLOCK_SIZE; for (j = 0; j < 16; j++) y[j] = m_last[j] ^ x[j]; aes_encrypt(rk, nrounds, y, cmac); return CORE_OK; } /* From RFC 4493 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + Algorithm Verify_MAC + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + + + Input : K ( 128-bit Key ) + + : M ( message to be verified ) + + : len ( length of the message in octets ) + + : T' ( the received MAC to be verified ) + + Output : INVALID or VALID + + + +-------------------------------------------------------------------+ + + + Step 1. T* := AES-CMAC(K,M,len); + + Step 2. if T* is equal to T' + + then + + return VALID; + + else + + return INVALID; + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ */ status_t aes_cmac_verify(c_uint8_t *cmac, const c_uint8_t *key, const c_uint8_t *msg, const c_uint32_t len) { status_t rv; c_uint8_t cmac_calc[16]; rv = aes_cmac_calculate(cmac_calc, key, msg, len); if (rv != CORE_OK) return rv; if (memcmp(cmac_calc, cmac, 16) != 0) return ERR_INVALID_CMAC; return CORE_OK; } nextepc-0.3.10/lib/core/src/debug.c000066400000000000000000000423711333553357400170020ustar00rootroot00000000000000#include "core_debug.h" #include "core_param.h" #include "core_file.h" #include "core_thread.h" #include #include #include #include int g_trace_mask = 1; int g_msg_to = D_MSG_TO_STDOUT; int g_console_connected = 0; int g_syslog_connected = 0; int g_network_connected = 0; int g_file_connected = 0; int g_log_level_console = D_LOG_LEVEL_FULL; int g_log_level_stdout = D_LOG_LEVEL_FULL; int g_log_level_syslog = D_LOG_LEVEL_FULL; int g_log_level_network = D_LOG_LEVEL_FULL; int g_log_level_file = D_LOG_LEVEL_FULL; static int g_console_fd = -1; static int g_network_fd = -1; static struct sockaddr_un g_network_addr; static thread_id network_thread = 0; static void *THREAD_FUNC network_main(thread_id id, void *data); static int network_handler(const char *path); static file_t *g_file = NULL; status_t d_msg_console_init(int console_fd) { d_assert(console_fd >= 0, return CORE_ERROR, "param 'console_fd' is invalid"); g_console_fd = console_fd; g_console_connected = 1; return CORE_OK; } void d_msg_console_final() { g_console_connected = 0; g_console_fd = -1; } void d_msg_syslog_init(const char *name) { d_assert(name, return, ); openlog(name, 0, LOG_DAEMON); g_syslog_connected = 1; } void d_msg_syslog_final() { g_syslog_connected = 0; closelog(); } status_t d_msg_network_init(const char *name) { d_assert(name, return CORE_ERROR, ); g_network_fd = socket(AF_UNIX, SOCK_DGRAM, 0); d_assert(g_network_fd >= 0, return CORE_ERROR, "socket() failed. (%d:%s)\n", errno, strerror(errno)); g_network_addr.sun_family = AF_UNIX; strcpy(g_network_addr.sun_path, name); return CORE_OK; } status_t d_msg_network_start(const char *file) { status_t rv; d_assert(file, return CORE_ERROR, ); rv = thread_create(&network_thread, NULL, network_main, (void*)file); d_assert(rv == CORE_OK, return CORE_ERROR, "network thread creation failed"); g_network_connected = 1; d_msg_to(D_MSG_TO_NETWORK, 1); return CORE_OK; } void d_msg_network_stop() { d_msg_to(D_MSG_TO_NETWORK, 0); g_network_connected = 0; if (network_thread) thread_delete(network_thread); } void d_msg_network_final() { close(g_network_fd); g_network_fd = -1; } static void *THREAD_FUNC network_main(thread_id id, void *data) { int ret; char *path = data; ret = network_handler(path); if (ret != 0) { d_error("Failed to initialize logger."); d_error("Check file permission for `%s`", path); } return NULL; } static int network_handler(const char *path) { status_t rv; int ret; size_t nbytes; ssize_t r; int us; fd_set readfd; struct timeval timer_val; struct sockaddr_un svaddr; file_t *file = NULL; char g_buffer[HUGE_STRING_LEN]; us = socket(AF_UNIX, SOCK_DGRAM, 0); if (us < 0) { d_error("socket() failed. (%d:%s)", errno, strerror(errno)); return -1; } memcpy(&svaddr, &g_network_addr, sizeof(struct sockaddr_un)); ret = bind(us, (struct sockaddr *)&svaddr, sizeof(svaddr)); if (ret != 0) { if (errno == EADDRINUSE) { ret = file_remove(svaddr.sun_path); if (ret != 0) { d_error("unlink(`%s`) failed. (%d:%s)", svaddr.sun_path, errno, strerror(errno)); return -1; } ret = bind(us, (struct sockaddr *)&svaddr, sizeof(svaddr)); if (ret != 0) { d_error("bind() failed 2. (%d:%s)", errno, strerror(errno)); return -1; } } else { d_error("bind() failed. (%d:%s)", errno, strerror(errno)); return -1; } } rv = file_open(&file, path, FILE_CREATE | FILE_WRITE| FILE_APPEND, FILE_UREAD | FILE_UWRITE | FILE_GREAD); if (rv != CORE_OK) { d_error("Cannot open log file '%s'", path); close(us); return -1; } while (!thread_should_stop()) { timer_val.tv_sec = 0; timer_val.tv_usec = 50000; FD_ZERO(&readfd); FD_SET(us, &readfd); r = select (us+1, &readfd, NULL, NULL, &timer_val); if (r == -1) { if (errno == EINTR) break; d_error("select() error(%d: %s)", errno, strerror(errno)); } if (r == 0) continue; if (FD_ISSET(us, &readfd)) { r = read(us, g_buffer, sizeof(g_buffer)); if (r < 0) { if (errno == EINTR) break; d_error("read() failed. (%d:%s)", errno, strerror(errno)); continue; } if (r == 0) continue; nbytes = r; rv = file_write(file, g_buffer, &nbytes); if (rv != CORE_OK || r != nbytes) { d_error("Cannot write %ld bytes to log file (%ld written)", (long)r, (long)nbytes); } } } file_close(file); close(us); file_remove(svaddr.sun_path); return 0; } status_t d_msg_file_init(const char *file) { status_t rv; d_assert(file, return CORE_ERROR, ); rv = file_open(&g_file, file, FILE_CREATE | FILE_WRITE| FILE_APPEND, FILE_UREAD | FILE_UWRITE | FILE_GREAD); if (rv != CORE_OK) { d_error("CHECK PERMISSION of Installation Directory..."); d_error("Cannot create LOG file '%s'", file); return CORE_ERROR; } g_file_connected = 1; d_msg_to(D_MSG_TO_FILE, 1); return CORE_OK; } void d_msg_file_final() { d_msg_to(D_MSG_TO_FILE, 0); g_file_connected = 0; file_close(g_file); } void d_msg_to(int to, int on_off) { switch (to) { case D_MSG_TO_CONSOLE: g_msg_to = on_off ? g_msg_to | D_MSG_TO_CONSOLE : g_msg_to & ~D_MSG_TO_CONSOLE; break; case D_MSG_TO_STDOUT: g_msg_to = on_off ? g_msg_to | D_MSG_TO_STDOUT : g_msg_to & ~D_MSG_TO_STDOUT; break; case D_MSG_TO_SYSLOG: g_msg_to = on_off ? g_msg_to | D_MSG_TO_SYSLOG : g_msg_to & ~D_MSG_TO_SYSLOG; break; case D_MSG_TO_NETWORK: g_msg_to = on_off ? g_msg_to | D_MSG_TO_NETWORK : g_msg_to & ~D_MSG_TO_NETWORK; break; case D_MSG_TO_FILE: g_msg_to = on_off ? g_msg_to | D_MSG_TO_FILE : g_msg_to & ~D_MSG_TO_FILE; break; case D_MSG_TO_ALL: g_msg_to = on_off ? D_MSG_TO_ALL : 0; break; default: break; } } int d_msg_get_to() { return g_msg_to; } void d_log_set_level(int to, int level) { switch (to) { case D_MSG_TO_CONSOLE: g_log_level_console = level; break; case D_MSG_TO_STDOUT: g_log_level_stdout = level; break; case D_MSG_TO_SYSLOG: g_log_level_syslog = level; break; case D_MSG_TO_NETWORK: g_log_level_network = level; break; case D_MSG_TO_FILE: g_log_level_file = level; break; case D_MSG_TO_ALL: g_log_level_console = level; g_log_level_stdout = level; g_log_level_syslog = level; g_log_level_network = level; g_log_level_file = level; break; default: break; } } int d_log_get_level(int to) { switch (to) { case D_MSG_TO_CONSOLE: return g_log_level_console; case D_MSG_TO_STDOUT: return g_log_level_stdout; case D_MSG_TO_SYSLOG: return g_log_level_syslog; case D_MSG_TO_NETWORK: return g_log_level_network; case D_MSG_TO_FILE: return g_log_level_file; default: break; } return -1; } void d_log_full(int to) { switch (to) { case D_MSG_TO_CONSOLE: g_log_level_console = D_LOG_LEVEL_FULL; break; case D_MSG_TO_STDOUT: g_log_level_stdout = D_LOG_LEVEL_FULL; break; case D_MSG_TO_SYSLOG: g_log_level_syslog = D_LOG_LEVEL_FULL; break; case D_MSG_TO_NETWORK: g_log_level_network = D_LOG_LEVEL_FULL; break; case D_MSG_TO_FILE: g_log_level_file = D_LOG_LEVEL_FULL; break; case D_MSG_TO_ALL: g_log_level_console = D_LOG_LEVEL_FULL; g_log_level_stdout = D_LOG_LEVEL_FULL; g_log_level_syslog = D_LOG_LEVEL_FULL; g_log_level_network = D_LOG_LEVEL_FULL; g_log_level_file = D_LOG_LEVEL_FULL; break; default: break; } } void d_log_off(int to) { switch (to) { case D_MSG_TO_CONSOLE: g_log_level_console = D_LOG_LEVEL_NONE; break; case D_MSG_TO_STDOUT: g_log_level_stdout = D_LOG_LEVEL_NONE; break; case D_MSG_TO_SYSLOG: g_log_level_syslog = D_LOG_LEVEL_NONE; break; case D_MSG_TO_NETWORK: g_log_level_network = D_LOG_LEVEL_NONE; break; case D_MSG_TO_FILE: g_log_level_file = D_LOG_LEVEL_NONE; break; case D_MSG_TO_ALL: g_log_level_console = D_LOG_LEVEL_NONE; g_log_level_stdout = D_LOG_LEVEL_NONE; g_log_level_syslog = D_LOG_LEVEL_NONE; g_log_level_network = D_LOG_LEVEL_NONE; g_log_level_file = D_LOG_LEVEL_NONE; break; default: break; } } void d_trace_global_on() { g_trace_mask = 1; } void d_trace_global_off() { g_trace_mask = 0; } void d_trace_level(int *mod_name, int level) { *mod_name = level; } void d_trace_off(int *mod_name) { *mod_name = 0; } #define TA_NOR "\033[0m" /* all off */ #define TA_BOLD "\033[1m" /* bold */ #define TA_UNDER "\033[4m" /* underscore */ #define TA_BLINK "\033[5m" /* blink */ #define TA_REVERSE "\033[7m" /* reverse video */ #define TA_CONCEALED "\033[8m" /* concealed */ #define TA_FGC_BLACK "\033[30m" /* Black */ #define TA_FGC_RED "\033[31m" /* Red */ #define TA_FGC_GREEN "\033[32m" /* Green */ #define TA_FGC_YELLOW "\033[33m" /* Yellow */ #define TA_FGC_BLUE "\033[34m" /* Blue */ #define TA_FGC_MAGENTA "\033[35m" /* Magenta */ #define TA_FGC_CYAN "\033[36m" /* Cyan */ #define TA_FGC_WHITE "\033[37m" /* White */ #define TA_FGC_DEFAULT "\033[39m" /* default */ #define TA_BGC_BLACK "\033[40m" /* Black */ #define TA_BGC_RED "\033[41m" /* Red */ #define TA_BGC_GREEN "\033[42m" /* Green */ #define TA_BGC_YELLOW "\033[43m" /* Yellow */ #define TA_BGC_BLUE "\033[44m" /* Blue */ #define TA_BGC_MAGENTA "\033[45m" /* Magenta */ #define TA_BGC_CYAN "\033[46m" /* Cyan */ #define TA_BGC_WHITE "\033[47m" /* White */ #define TA_BGC_DEFAULT "\033[49m" /* default */ #define TIME_FMT_STR "%02d/%02d %02d:%02d:%02d.%03d" #define TIME_FMT_STR2 "%02d.%06d" #define TIME_FMT_STR3 "%04d/%02d/%02d %02d:%02d:%02d.%03d" int d_msg(int tp, int lv, c_time_t t, char *fn, int ln, char *fmt, ...) { char str[HUGE_STRING_LEN+1] = {0}, fstr[HUGE_STRING_LEN+1] = {0}, *ac_str; time_exp_t te; size_t n; char *lv_str[5] = {"NONE", "FATL", "ERRR", "WARN", "INFO"}; va_list args; va_start(args, fmt); if (t) { time_exp_lt(&te, t); } switch (tp) { case D_MSG_TYPE_RAW: { n = vsprintf(fstr, fmt, args); if (g_msg_to & D_MSG_TO_STDOUT) { printf("%s", fstr); } if (g_syslog_connected && (g_msg_to & D_MSG_TO_SYSLOG)) { syslog(LOG_DEBUG, "%s", fstr); } if (g_network_connected && (g_msg_to & D_MSG_TO_NETWORK)) { sendto(g_network_fd, fstr, n, 0, (struct sockaddr *)&g_network_addr, sizeof(g_network_addr)); } if (g_file_connected && (g_msg_to & D_MSG_TO_FILE)) { size_t nbytes = n; file_write(g_file, fstr, &nbytes); } if (g_console_connected && (g_msg_to & D_MSG_TO_CONSOLE)) { if (fstr[n-1] == '\n') { fstr[n-1] = '\r'; fstr[n++] = '\n'; } write(g_console_fd, fstr, n); } break; } case D_MSG_TYPE_TRACE: { vsprintf(str, fmt, args); n = snprintf(fstr, HUGE_STRING_LEN, "["TIME_FMT_STR"] %s", te.tm_mon + 1, te.tm_mday, te.tm_hour, te.tm_min, te.tm_sec, te.tm_usec/1000, str); if (g_msg_to & D_MSG_TO_STDOUT) { printf("%s", fstr); } if (g_syslog_connected && (g_msg_to & D_MSG_TO_SYSLOG)) { syslog(LOG_DEBUG, "%s", fstr); } if (g_network_connected && (g_msg_to & D_MSG_TO_NETWORK)) { sendto(g_network_fd, fstr, n, 0, (struct sockaddr *)&g_network_addr, sizeof(g_network_addr)); } if (g_file_connected && (g_msg_to & D_MSG_TO_FILE)) { size_t nbytes = n; file_write(g_file, fstr, &nbytes); } if (g_console_connected && (g_msg_to & D_MSG_TO_CONSOLE)) { if (fstr[n-1] == '\n') { fstr[n-1] = '\r'; fstr[n++] = '\n'; } write(g_console_fd, fstr, n); } break; } case D_MSG_TYPE_LOG: { switch(lv) { case D_LOG_LEVEL_INFO: ac_str = TA_FGC_WHITE; break; case D_LOG_LEVEL_WARN: ac_str = TA_FGC_CYAN; break; case D_LOG_LEVEL_ERROR: ac_str = TA_FGC_YELLOW; break; case D_LOG_LEVEL_FATAL: ac_str = TA_FGC_RED; break; default: ac_str = NULL; break; } vsprintf(str, fmt, args); n = snprintf(fstr, HUGE_STRING_LEN, "["TIME_FMT_STR"] %s: %s (%s:%d)", te.tm_mon + 1, te.tm_mday, te.tm_hour, te.tm_min, te.tm_sec, te.tm_usec/1000, lv_str[lv], str, fn, ln); if ((g_msg_to & D_MSG_TO_STDOUT) && lv <= g_log_level_stdout) { printf("%s%s" TA_NOR "\n", ac_str, fstr); } if (g_syslog_connected && (g_msg_to & D_MSG_TO_SYSLOG) && lv <= g_log_level_syslog) { syslog(LOG_INFO, "[%s\n", fstr + 13); } if (g_network_connected && (g_msg_to & D_MSG_TO_NETWORK) && lv <= g_log_level_network) { fstr[n++] = '\n'; sendto(g_network_fd, fstr, n, 0, (struct sockaddr *)&g_network_addr, sizeof(g_network_addr)); } if (g_file_connected && (g_msg_to & D_MSG_TO_FILE)) { size_t nbytes; fstr[n++] = '\n'; nbytes = n; file_write(g_file, fstr, &nbytes); } if (g_console_connected && (g_msg_to & D_MSG_TO_CONSOLE) && lv <= g_log_level_console) { fstr[n++] = '\r'; /* fstr[n++] = '\n'; FIXME: */ write(g_console_fd, fstr, n); } break; } case D_MSG_TYPE_ASSERT: { vsprintf(str, fmt, args); n = snprintf(fstr, HUGE_STRING_LEN, "[" TIME_FMT_STR "] ASSERT: %s (%s:%d)", te.tm_mon + 1, te.tm_mday, te.tm_hour, te.tm_min, te.tm_sec, te.tm_usec/1000, str, fn, ln); if (g_msg_to & D_MSG_TO_STDOUT) { printf(TA_BOLD TA_FGC_RED "%s" TA_NOR "\n", fstr); } if (g_syslog_connected && (g_msg_to & D_MSG_TO_SYSLOG)) { syslog(LOG_CRIT, "[%s\n", fstr + 13); } if (g_network_connected && (g_msg_to & D_MSG_TO_NETWORK)) { fstr[n++] = '\n'; sendto(g_network_fd, fstr, n, 0, (struct sockaddr *)&g_network_addr, sizeof(g_network_addr)); } if (g_file_connected && (g_msg_to & D_MSG_TO_FILE)) { size_t nbytes; fstr[n++] = '\n'; nbytes = n; file_write(g_file, fstr, &nbytes); } if (g_console_connected && (g_msg_to & D_MSG_TO_CONSOLE)) { fstr[n++] = '\r'; /* fstr[n++] = '\n'; FIXME: */ write(g_console_fd, fstr, n); } break; } default: break; } return CORE_OK; } nextepc-0.3.10/lib/core/src/event.c000066400000000000000000000050721333553357400170320ustar00rootroot00000000000000/** * @file event.c */ /* Core libaray */ #define TRACE_MODULE _event #include "core_debug.h" #include "core_msgq.h" #include "core_event.h" #define EVT_Q_DEPTH 16 char *EVT_NAME_UNKNOWN = "UNKNOWN"; msgq_id event_create(int opt) { msgq_id queue_id = 0; /* Start threads */ queue_id = msgq_create(EVT_Q_DEPTH, EVENT_SIZE, opt); d_assert(queue_id != 0, return CORE_ERROR, "Message queue creation failed"); return queue_id; } status_t event_delete(msgq_id queue_id) { msgq_delete(queue_id); return CORE_OK; } status_t event_send(msgq_id queue_id, event_t *e) { status_t rv; d_assert(e, return -1, "Null param"); d_assert(queue_id, return -1, "event queue isn't initialized"); rv = msgq_send(queue_id, (const char*)e, EVENT_SIZE); if (rv == CORE_EAGAIN) { d_warn("msgq_send full"); } else if (rv == CORE_ERROR) { d_error("msgq_send failed"); } return rv; } status_t event_recv(msgq_id queue_id, event_t *e) { status_t rv; d_assert(e, return -1, "Null param"); d_assert(queue_id, return -1, "event queue isn't initialized"); rv = msgq_recv(queue_id, (char*)e, EVENT_SIZE); if (rv == CORE_ERROR) { d_error("msgq_timedrecv failed", rv); } return rv; } status_t event_timedrecv(msgq_id queue_id, event_t *e, c_time_t timeout) { status_t rv; d_assert(e, return -1, "Null param"); d_assert(queue_id, return -1, "event queue isn't initialized"); rv = msgq_timedrecv(queue_id, (char*)e, EVENT_SIZE, timeout); if (rv == CORE_ERROR) { d_error("msgq_timedrecv failed", rv); } return rv; } void* event_timer_expire_func(c_uintptr_t queue_id, c_uintptr_t param1, c_uintptr_t param2, c_uintptr_t param3, c_uintptr_t param4, c_uintptr_t param5, c_uintptr_t param6) { event_t e; status_t rv; d_assert(queue_id, return NULL, "Null param"); event_set(&e, param1); event_set_param1(&e, param2); event_set_param2(&e, param3); event_set_param3(&e, param4); event_set_param4(&e, param5); event_set_param5(&e, param6); rv = event_send(queue_id, &e); if (rv != CORE_OK) { d_error("event_send error:%d", rv); } return NULL; } tm_block_id event_timer_create(tm_service_t *tm_service, tm_type_e type, c_uint32_t duration, c_uintptr_t event) { tm_block_id id; id = tm_create(tm_service, type, duration, (expire_func_t)event_timer_expire_func); tm_set_param1(id, event); d_assert(id, return 0, "tm_create() failed"); return id; } nextepc-0.3.10/lib/core/src/fsm.c000066400000000000000000000036151333553357400164770ustar00rootroot00000000000000#include "core_fsm.h" typedef struct _event_t { fsm_event_t event; } event_t; static event_t entry_event = { FSM_ENTRY_SIG, }; static event_t exit_event = { FSM_EXIT_SIG, }; char *FSM_NAME_INIT_SIG = "INIT"; char *FSM_NAME_ENTRY_SIG = "ENTRY"; char *FSM_NAME_EXIT_SIG = "EXIT"; void fsm_init(void *s, void *_e) { fsm_t *fsm = s; event_t *e = _e; if (fsm->initial != NULL) { (*fsm->initial)(s, e); if (fsm->initial != fsm->state) { if (e) { e->event = FSM_ENTRY_SIG; (*fsm->state)(s, e); } else { (*fsm->state)(s, &entry_event); } } } } void fsm_dispatch(void *s, void *_e) { fsm_t *fsm = s; event_t *e = _e; fsm_handler_t tmp = fsm->state; #if OLD_FSM_DISPATCH fsm->state = (fsm_handler_t)0; #endif (*tmp)(s, e); #if OLD_FSM_DISPATCH if (fsm->state != NULL) #else if (fsm->state != tmp) #endif { if (e) { e->event = FSM_EXIT_SIG; (*tmp)(s, e); } else { (*tmp)(s, &exit_event); } if (e) { e->event = FSM_ENTRY_SIG; (*fsm->state)(s, e); } else { #if OLD_FSM_DISPATCH (*tmp)(s, &entry_event); #else (*fsm->state)(s, &entry_event); #endif } } #if OLD_FSM_DISPATCH else { fsm->state = tmp; } #endif } void fsm_final(void *s, void *_e) { fsm_t *fsm = s; event_t *e = _e; if (fsm->final != fsm->state) { if (e) { e->event = FSM_EXIT_SIG; (*fsm->state)(s, e); } else { (*fsm->state)(s, &exit_event); } } if (fsm->final != NULL) { (*fsm->final)(s, e); } fsm->state = fsm->initial; } nextepc-0.3.10/lib/core/src/hash.c000066400000000000000000000244611333553357400166370ustar00rootroot00000000000000#include "core_debug.h" #include "core_pkbuf.h" #include "core_time.h" #include "core_hash.h" /* * The internal form of a hash table. * * The table is an array indexed by the hash of the key; collisions * are resolved by hanging a linked list of hash entries off each * element of the array. Although this is a really simple design it * isn't too bad given that pools have a low allocation overhead. */ typedef struct hash_entry_t hash_entry_t; struct hash_entry_t { hash_entry_t *next; unsigned int hash; const void *key; int klen; const void *val; }; /* * Data structure for iterating through a hash table. * * We keep a pointer to the next hash entry here to allow the current * hash entry to be freed or otherwise mangled between calls to * hash_next(). */ struct hash_index_t { hash_t *ht; hash_entry_t *this, *next; unsigned int index; }; /* * The size of the array is always a power of two. We use the maximum * index rather than the size so that we can use bitwise-AND for * modular arithmetic. * The count of hash entries may be greater depending on the chosen * collision rate. */ struct hash_t { hash_entry_t **array; hash_index_t iterator; /* For hash_first(NULL, ...) */ unsigned int count, max, seed; hashfunc_t hash_func; hash_entry_t *free; /* List of recycled entries */ }; #define INITIAL_MAX 15 /* tunable == 2^n - 1 */ /* * Hash creation functions. */ static hash_entry_t **alloc_array(hash_t *ht, unsigned int max) { return core_calloc(1, sizeof(*ht->array) * (max + 1)); } CORE_DECLARE(hash_t *) hash_make() { hash_t *ht; c_time_t now = time_now(); ht = core_malloc(sizeof(hash_t)); ht->free = NULL; ht->count = 0; ht->max = INITIAL_MAX; ht->seed = (unsigned int)((now >> 32) ^ now ^ (c_uintptr_t)ht ^ (c_uintptr_t)&now) - 1; ht->array = alloc_array(ht, ht->max); ht->hash_func = NULL; return ht; } CORE_DECLARE(hash_t *) hash_make_custom(hashfunc_t hash_func) { hash_t *ht = hash_make(); ht->hash_func = hash_func; return ht; } CORE_DECLARE(void) hash_destroy(hash_t *ht) { hash_entry_t *he = NULL, *next_he = NULL; d_assert(ht, return, "Null param"); d_assert(ht->array, return, "Null param"); hash_clear(ht); he = ht->free; while(he) { next_he = he->next; CORE_FREE(he); he = next_he; } CORE_FREE(ht->array); CORE_FREE(ht); } /* * Hash iteration functions. */ CORE_DECLARE(hash_index_t *) hash_next(hash_index_t *hi) { hi->this = hi->next; while (!hi->this) { if (hi->index > hi->ht->max) return NULL; hi->this = hi->ht->array[hi->index++]; } hi->next = hi->this->next; return hi; } CORE_DECLARE(hash_index_t *) hash_first(hash_t *ht) { hash_index_t *hi; hi = &ht->iterator; hi->ht = ht; hi->index = 0; hi->this = NULL; hi->next = NULL; return hash_next(hi); } CORE_DECLARE(void) hash_this(hash_index_t *hi, const void **key, int *klen, void **val) { if (key) *key = hi->this->key; if (klen) *klen = hi->this->klen; if (val) *val = (void *)hi->this->val; } CORE_DECLARE(const void *) hash_this_key(hash_index_t *hi) { const void *key; hash_this(hi, &key, NULL, NULL); return key; } CORE_DECLARE(int) hash_this_key_len(hash_index_t *hi) { int klen; hash_this(hi, NULL, &klen, NULL); return klen; } CORE_DECLARE(void *) hash_this_val(hash_index_t *hi) { void *val; hash_this(hi, NULL, NULL, &val); return val; } /* * Expanding a hash table */ static void expand_array(hash_t *ht) { hash_index_t *hi; hash_entry_t **new_array; unsigned int new_max; new_max = ht->max * 2 + 1; new_array = alloc_array(ht, new_max); for (hi = hash_first(ht); hi; hi = hash_next(hi)) { unsigned int i = hi->this->hash & new_max; hi->this->next = new_array[i]; new_array[i] = hi->this; } CORE_FREE(ht->array); ht->array = new_array; ht->max = new_max; } static unsigned int hashfunc_default( const char *char_key, int *klen, unsigned int hash) { const unsigned char *key = (const unsigned char *)char_key; const unsigned char *p; int i; /* * This is the popular `times 33' hash algorithm which is used by * perl and also appears in Berkeley DB. This is one of the best * known hash functions for strings because it is both computed * very fast and distributes very well. * * The originator may be Dan Bernstein but the code in Berkeley DB * cites Chris Torek as the source. The best citation I have found * is "Chris Torek, Hash function for text in C, Usenet message * <27038@mimsy.umd.edu> in comp.lang.c , October, 1990." in Rich * Salz's USENIX 1992 paper about INN which can be found at * . * * The magic of number 33, i.e. why it works better than many other * constants, prime or not, has never been adequately explained by * anyone. So I try an explanation: if one experimentally tests all * multipliers between 1 and 256 (as I did while writing a low-level * data structure library some time ago) one detects that even * numbers are not useable at all. The remaining 128 odd numbers * (except for the number 1) work more or less all equally well. * They all distribute in an acceptable way and this way fill a hash * table with an average percent of approx. 86%. * * If one compares the chi^2 values of the variants (see * Bob Jenkins ``Hashing Frequently Asked Questions'' at * http://burtleburtle.net/bob/hash/hashfaq.html for a description * of chi^2), the number 33 not even has the best value. But the * number 33 and a few other equally good numbers like 17, 31, 63, * 127 and 129 have nevertheless a great advantage to the remaining * numbers in the large set of possible multipliers: their multiply * operation can be replaced by a faster operation based on just one * shift plus either a single addition or subtraction operation. And * because a hash function has to both distribute good _and_ has to * be very fast to compute, those few numbers should be preferred. * * -- Ralf S. Engelschall */ if (*klen == HASH_KEY_STRING) { for (p = key; *p; p++) { hash = hash * 33 + *p; } *klen = p - key; } else { for (p = key, i = *klen; i; i--, p++) { hash = hash * 33 + *p; } } return hash; } CORE_DECLARE_NONSTD(unsigned int) core_hashfunc_default( const char *char_key, int *klen) { return hashfunc_default(char_key, klen, 0); } /* * This is where we keep the details of the hash function and control * the maximum collision rate. * * If val is non-NULL it creates and initializes a new hash entry if * there isn't already one there; it returns an updatable pointer so * that hash entries can be removed. */ static hash_entry_t **find_entry(hash_t *ht, const void *key, int klen, const void *val) { hash_entry_t **hep, *he; unsigned int hash; if (ht->hash_func) hash = ht->hash_func(key, &klen); else hash = hashfunc_default(key, &klen, ht->seed); /* scan linked list */ for (hep = &ht->array[hash & ht->max], he = *hep; he; hep = &he->next, he = *hep) { if (he->hash == hash && he->klen == klen && memcmp(he->key, key, klen) == 0) break; } if (he || !val) return hep; /* add a new entry for non-NULL values */ if ((he = ht->free) != NULL) ht->free = he->next; else he = core_malloc(sizeof(*he)); he->next = NULL; he->hash = hash; he->key = key; he->klen = klen; he->val = val; *hep = he; ht->count++; return hep; } CORE_DECLARE(void *) hash_get(hash_t *ht, const void *key, int klen) { hash_entry_t *he; he = *find_entry(ht, key, klen, NULL); if (he) return (void *)he->val; else return NULL; } CORE_DECLARE(void) hash_set(hash_t *ht, const void *key, int klen, const void *val) { hash_entry_t **hep; hep = find_entry(ht, key, klen, val); if (*hep) { if (!val) { /* delete entry */ hash_entry_t *old = *hep; *hep = (*hep)->next; old->next = ht->free; ht->free = old; --ht->count; } else { /* replace entry */ (*hep)->val = val; /* check that the collision rate isn't too high */ if (ht->count > ht->max) { expand_array(ht); } } } /* else key not present and val==NULL */ } CORE_DECLARE(void *) hash_get_or_set(hash_t *ht, const void *key, int klen, const void *val) { hash_entry_t **hep; hep = find_entry(ht, key, klen, val); if (*hep) { val = (*hep)->val; /* check that the collision rate isn't too high */ if (ht->count > ht->max) { expand_array(ht); } return (void *)val; } /* else key not present and val==NULL */ return NULL; } CORE_DECLARE(unsigned int) hash_count(hash_t *ht) { return ht->count; } CORE_DECLARE(void) hash_clear(hash_t *ht) { hash_index_t *hi; for (hi = hash_first(ht); hi; hi = hash_next(hi)) hash_set(ht, hi->this->key, hi->this->klen, NULL); } /* This is basically the following... * for every element in hash table { * comp elemeny.key, element.value * } * * Like with table_do, the comp callback is called for each and every * element of the hash table. */ CORE_DECLARE(int) hash_do(hash_do_callback_fn_t *comp, void *rec, const hash_t *ht) { hash_index_t hix; hash_index_t *hi; int rv, dorv = 1; hix.ht = (hash_t *)ht; hix.index = 0; hix.this = NULL; hix.next = NULL; if ((hi = hash_next(&hix))) { /* Scan the entire table */ do { rv = (*comp)(rec, hi->this->key, hi->this->klen, hi->this->val); } while (rv && (hi = hash_next(hi))); if (rv == 0) { dorv = 0; } } return dorv; } nextepc-0.3.10/lib/core/src/misc.c000066400000000000000000000076131333553357400166470ustar00rootroot00000000000000#include "core_errno.h" #include "core_lib.h" void *core_ascii_to_hex(char *in, int in_len, void *out, int out_len) { int i = 0, j = 0, k = 0, hex; c_uint8_t *out_p = out; while(i < in_len && j < out_len) { if (!c_isspace(in[i])) { hex = c_isdigit(in[i]) ? in[i] - '0' : c_islower(in[i]) ? in[i] - 'a' + 10 : in[i] - 'A' + 10; if ((k & 0x1) == 0) { out_p[j] = (hex << 4); } else { out_p[j] |= hex; j++; } k++; } i++; } return out; } void *core_hex_to_ascii(void *in, int in_len, void *out, int out_len) { char *p; int i = 0, l, off = 0; p = out; p[0] = 0; l = (in_len - off) > out_len ? out_len : in_len - off; for (i = 0; i < l; i++) { p += sprintf(p, "%02X", ((char*)in)[off+i] & 0xff); if ((i & 0x3) == 3 && (i != (l-1))) p += sprintf(p, " "); } return out; } void *core_uint64_to_buffer(c_uint64_t num, int size, void *buffer) { int i; c_uint8_t *buffer_p = buffer; for (i = 0; i < size; i++) buffer_p[i] = (num >> ((size-1-i) * 8)) & 0xff; return buffer; } c_uint64_t core_buffer_to_uint64(void *buffer, int size) { c_uint64_t num = 0; c_uint8_t *buffer_p = buffer; int i; for (i = 0; i < size; i++) { num |= (((c_uint64_t)buffer_p[i]) << ((size-1-i) * 8)); } return num; } void *core_bcd_to_buffer(c_int8_t *in, void *out, int *out_len) { int i = 0; c_uint8_t *out_p = out; int in_len = strlen(in); for (i = 0; i < in_len; i++) { if (i & 0x01) out_p[i>>1] = out_p[i>>1] | (((in[i] - 0x30) << 4) & 0xF0); else out_p[i>>1] = (in[i] - 0x30) & 0x0F; } *out_len = (in_len + 1) / 2; if (in_len & 0x01) { out_p[(*out_len)-1] |= 0xF0; } return out; } void *core_buffer_to_bcd(c_uint8_t *in, int in_len, void *out) { int i = 0; c_uint8_t *out_p = out; for (i = 0; i < in_len-1; i++) { out_p[i*2] = 0x30 + (in[i] & 0x0F); out_p[i*2+1] = 0x30 + ((in[i] & 0xF0) >> 4); } if ((in[i] & 0xF0) == 0xF0) { out_p[i*2] = 0x30 + (in[i] & 0x0F); out_p[i*2+1] = 0; } else { out_p[i*2] = 0x30 + (in[i] & 0x0F); out_p[i*2+1] = 0x30 + ((in[i] & 0xF0) >> 4); out_p[i*2+2] = 0; } return out; } char *core_cpystrn(char *dst, const char *src, size_t dst_size) { char *d = dst, *end; if (dst_size == 0) { return (dst); } if (src) { end = dst + dst_size - 1; for (; d < end; ++d, ++src) { if (!(*d = *src)) { return (d); } } } *d = '\0'; /* always null terminate */ return (d); } char *core_env_get(const char *envvar) { #ifdef HAVE_GETENV return getenv(envvar); #else return NULL; #endif } status_t core_env_set(const char *envvar, const char *value) { #if defined(HAVE_SETENV) if (0 > setenv(envvar, value, 1)) return CORE_ENOMEM; return CORE_OK; #elif defined(HAVE_PUTENV) char buf[HUGE_STRING_LEN]; if (snprintf(buf, HUGE_STRING_LEN, "%s=%s", envvar, value) < 0) return CORE_ENOMEM; if (0 > putenv(buf)) return CORE_ENOMEM; return CORE_OK; #else return CORE_ENOTIMPL; #endif } status_t core_env_delete(const char *envvar) { #ifdef HAVE_UNSETENV unsetenv(envvar); return CORE_OK; #else /* hint: some platforms allow envvars to be unset via * putenv("varname")... that isn't Single Unix spec, * but if your platform doesn't have unsetenv() it is * worth investigating and potentially adding a * configure check to decide when to use that form of * putenv() here */ return CORE_ENOTIMPL; #endif } nextepc-0.3.10/lib/core/src/msgq.c000066400000000000000000000150301333553357400166530ustar00rootroot00000000000000#define TRACE_MODULE _msgq #include "core_debug.h" #include "core_pool.h" #include "core_ringbuf.h" #include "core_cond.h" #include "core_mutex.h" #include "core_msgq.h" #include "core_pkbuf.h" #include "core_list.h" typedef struct _msq_desc_t { mutex_id mut_c, mut_r, mut_w; cond_id cond; int opt; int qdepth, msgsize, used; rbuf_declare_ext(rbuf); unsigned char *pool; } msg_desc_t; #define SIZE_OF_MSGQ_POOL 5 /* MME 1, SGW 2, PGW 2 */ pool_declare(msgqpool, msg_desc_t, SIZE_OF_MSGQ_POOL); status_t msgq_init(void) { pool_init(&msgqpool, SIZE_OF_MSGQ_POOL); return CORE_OK; } status_t msgq_final(void) { pool_final(&msgqpool); return CORE_OK; } msgq_id msgq_create(int qdepth, int msgsize, int opt) { msg_desc_t *md; int s; status_t rv; if (qdepth == 0 || msgsize == 0) return 0; pool_alloc_node(&msgqpool, &md); d_assert(md != NULL, return 0, "empty msgq pool"); memset((void*)md, 0, sizeof(msg_desc_t)); rv = mutex_create(&md->mut_c, MUTEX_DEFAULT); d_assert(rv == CORE_OK, goto error_final, "mutex creation failed"); rv = mutex_create(&md->mut_r, MUTEX_DEFAULT); d_assert(rv == CORE_OK, goto error_final, "mutex creation failed"); rv = mutex_create(&md->mut_w, MUTEX_DEFAULT); d_assert(rv == CORE_OK, goto error_final, "mutex creation failed"); rv = cond_create(&md->cond); d_assert(rv == CORE_OK, goto error_final, "mutex creation failed"); s = qdepth * msgsize; md->pool = core_malloc(s); d_assert(md->pool != NULL, goto error_final, "can't allocate msg q buffer %d bytes", s); rbuf_init_ext(&(md->rbuf), s, md->pool); md->opt = opt; md->qdepth = qdepth; md->msgsize = msgsize; md->used = 0; return (msgq_id)md; error_final: if (md->pool) CORE_FREE(md->pool); if (md->mut_c) mutex_delete(md->mut_c); if (md->mut_r) mutex_delete(md->mut_r); if (md->mut_w) mutex_delete(md->mut_w); if (md->cond) cond_delete(md->cond); pool_free_node(&msgqpool, md); return 0; } status_t msgq_delete(msgq_id id) { msg_desc_t *md = (msg_desc_t*)id; d_assert(md != NULL, return CORE_ERROR, "param 'id' is null"); if (md->pool) CORE_FREE(md->pool); if (md->mut_c) mutex_delete(md->mut_c); if (md->mut_r) mutex_delete(md->mut_r); if (md->mut_w) mutex_delete(md->mut_w); if (md->cond) cond_delete(md->cond); pool_free_node(&msgqpool, md); return CORE_OK; } status_t msgq_send(msgq_id id, const char *msg, int msglen) { msg_desc_t *md = (msg_desc_t*)id; int n; d_assert(md != NULL, return CORE_ERROR, "param 'id' is null"); d_assert(msg != NULL, return CORE_ERROR, "param 'msg' is null"); d_assert(msglen <= md->msgsize, return CORE_ERROR, "'msglen' is bigger than the msg size of queue"); d_assert(md->pool != NULL, return CORE_ERROR, "msgq has no ring buffer"); mutex_lock(md->mut_w); n = rbuf_free_bytes(&md->rbuf); if (n == 0) { mutex_unlock(md->mut_w); return CORE_EAGAIN; } n = rbuf_write(&md->rbuf, msg, msglen); d_trace(2, "ring write. head:%d tail:%d size:%d len:%d\n", md->rbuf.h.head, md->rbuf.h.tail, md->rbuf.h.size, msglen); d_assert(n == msglen, mutex_unlock(md->mut_w); return CORE_ERROR, "msgq integrity broken n:%d len:%d", n, msglen); d_trace(1, "msg (%d bytes) pushed.\n", msglen); mutex_unlock(md->mut_w); mutex_lock(md->mut_c); cond_signal(md->cond); mutex_unlock(md->mut_c); return CORE_OK; } status_t msgq_recv(msgq_id id, char *msg, int msglen) { msg_desc_t *md = (msg_desc_t*)id; int n; d_assert(md != NULL, return CORE_ERROR, "param 'id' is null"); d_assert(msg != NULL, return CORE_ERROR, "param 'msg' is null"); d_assert(msglen >= md->msgsize, return CORE_ERROR, "'msglen' is smaller than msgsize"); d_assert(md->pool != NULL, return CORE_ERROR, "msgq has no ring buffer"); mutex_lock(md->mut_r); n = rbuf_bytes(&md->rbuf); if (!(md->opt & MSGQ_O_NONBLOCK) && (n < md->msgsize)) { mutex_lock(md->mut_c); while(rbuf_is_empty(&md->rbuf) && cond_wait(md->cond, md->mut_c) == CORE_OK); mutex_unlock(md->mut_c); n = rbuf_bytes(&md->rbuf); d_assert(n >= md->msgsize, mutex_unlock(md->mut_r); return CORE_ERROR, "msgq integrity broken"); } else if (n < md->msgsize) { mutex_unlock(md->mut_r); return CORE_EAGAIN; } n = rbuf_read(&md->rbuf, msg, msglen); d_trace(2, "ring read. head:%d tail:%d size:%d len:%d\n", md->rbuf.h.head, md->rbuf.h.tail, md->rbuf.h.size, msglen); d_assert(n == msglen, mutex_unlock(md->mut_r); return CORE_ERROR, "msgq integrity broken n:%d len:%d", n, msglen); d_trace(1, "msg (%d bytes) pop.\n", msglen); mutex_unlock(md->mut_r); return CORE_OK; } status_t msgq_timedrecv(msgq_id id, char *msg, int msglen, c_time_t timeout) { msg_desc_t *md = (msg_desc_t*)id; int n; status_t rv; d_assert(md != NULL, return CORE_ERROR, "param 'id' is null"); d_assert(msg != NULL, return CORE_ERROR, "param 'msg' is null"); d_assert(msglen >= md->msgsize, return CORE_ERROR, "'msglen' is smaller than msgsize"); d_assert(md->pool != NULL, return CORE_ERROR, "msgq has no ring buffer"); mutex_lock(md->mut_r); n = rbuf_bytes(&md->rbuf); if (!(md->opt & MSGQ_O_NONBLOCK) && (n < md->msgsize)) { mutex_lock(md->mut_c); while(rbuf_is_empty(&md->rbuf) && (rv = cond_timedwait(md->cond, md->mut_c, timeout)) == CORE_OK); mutex_unlock(md->mut_c); if (rv == CORE_TIMEUP) { mutex_unlock(md->mut_r); return CORE_TIMEUP; } n = rbuf_bytes(&md->rbuf); d_assert(n >= md->msgsize, mutex_unlock(md->mut_r); return CORE_ERROR, "msgq integrity broken"); } else if (n < md->msgsize) { mutex_unlock(md->mut_r); return CORE_EAGAIN; } n = rbuf_read(&md->rbuf, msg, msglen); d_trace(2, "ring read. head:%d tail:%d size:%d len:%d\n", md->rbuf.h.head, md->rbuf.h.tail, md->rbuf.h.size, msglen); d_assert(n == msglen, mutex_unlock(md->mut_r); return CORE_ERROR, "msgq integrity broken n:%d len:%d", n, msglen); d_trace(1, "msg (%d bytes) pop.\n", msglen); mutex_unlock(md->mut_r); return CORE_OK; } nextepc-0.3.10/lib/core/src/ringbuf.c000066400000000000000000000102371333553357400173440ustar00rootroot00000000000000#define TRACE_MODULE _ringbuf #include "core_debug.h" #include "core_ringbuf.h" #define _rbuf_bytes(__h, __t, __s) \ (((__h) < (__t)) ? (__h) + (__s) - (__t) + 1 : (__h) - (__t)) #define _rbuf_free_bytes(__h, __t, __s) \ (((__h) < (__t)) ? (__t) - (__h) - 1 : (__t) + (__s) - (__h)) int rbuf_bytes(void *__pname) { int h, t; struct _rbuf_header_t *ptr_h = (struct _rbuf_header_t*)__pname; /* Store for thread safety */ h = ptr_h->head; t = ptr_h->tail; return _rbuf_bytes(h, t, ptr_h->size); } int rbuf_free_bytes(void *__pname) { int h, t; struct _rbuf_header_t *ptr_h = (struct _rbuf_header_t*)__pname; /* Store for thread safety */ h = ptr_h->head; t = ptr_h->tail; return _rbuf_free_bytes(h, t, ptr_h->size); } #define rbuf_is_empty(__pname) ((__pname)->h.head == (__pname)->h.tail) #define rbuf_is_full(__pname) (rbuf_free_bytes(__pname) == 0) int rbuf_skip_write_pos(void *__pname, int __len) { /* Write operation must handle only head pointer */ int n, h, t; struct _rbuf_header_t *ptr_h = (struct _rbuf_header_t*)__pname; if (ptr_h == NULL) return -1; t = ptr_h->tail; /* Store for thread safety with read thread */ h = ptr_h->head; /* Check available buffer size */ n = _rbuf_free_bytes(h, t, ptr_h->size); /* If no space, return */ if (n == 0) return -1; /* Determin the number of bytes to be skipped */ n = n < __len ? n : __len; /* In this function, only ptr_h->head should be updated */ ptr_h->head = (h + n) % (ptr_h->size + 1); return n; } int rbuf_write(void *__pname, const char *__buf, int __buf_len) { /* Write operation must handle only head pointer */ int n, h, t; struct _rbuf_header_t *ptr_h = (struct _rbuf_header_t*)__pname; if (ptr_h == NULL) return -1; t = ptr_h->tail; /* Store for thread safety with read thread */ h = ptr_h->head; /* Check available buffer size */ n = _rbuf_free_bytes(h, t, ptr_h->size); /* If no space, return */ if (n == 0) return -1; /* Determin the number of bytes to be written */ n = n < __buf_len ? n : __buf_len; if ((t > h) || (n < ptr_h->size - h + 1)) { memcpy(ptr_h->pool + h, __buf, n); } else { memcpy(ptr_h->pool + h, __buf, ptr_h->size - h + 1); memcpy(ptr_h->pool, __buf + (ptr_h->size - h + 1), n - (ptr_h->size - h + 1)); } /* In this function, only ptr_h->head should be updated */ ptr_h->head = (h + n) % (ptr_h->size + 1); return n; } int rbuf_skip_read_pos(void *__pname, int __len) { /* Read operation must handle only tail pointer */ int n, h, t; struct _rbuf_header_t *ptr_h = (struct _rbuf_header_t*)__pname; if (ptr_h == NULL) return -1; h = ptr_h->head; /* Store for thread safety with write thread */ t = ptr_h->tail; /* Check filled buffer size */ n = _rbuf_bytes(h, t, ptr_h->size); /* If empty, return */ if (n == 0) return -1; /* Determine the number of bytes to be skipped */ n = n < __len ? n : __len; /* In this function, only ptr_h->tail should be updated */ ptr_h->tail = (t + n) % (ptr_h->size + 1); return n; } int rbuf_read(void *__pname, char *__buf, int __buf_len) { /* Read operation must handle only tail pointer */ int n, h, t; struct _rbuf_header_t *ptr_h = (struct _rbuf_header_t*)__pname; if (ptr_h == NULL) return -1; h = ptr_h->head; /* Store for thread safety with write thread */ t = ptr_h->tail; /* Check filled buffer size */ n = _rbuf_bytes(h, t, ptr_h->size); /* If empty, return */ if (n == 0) return -1; /* Determine the number of bytes to be read */ n = n < __buf_len ? n : __buf_len; if (t < h || (n < ptr_h->size - t + 1)) { memcpy(__buf, ptr_h->pool + t, n); } else { memcpy(__buf, ptr_h->pool + t, ptr_h->size - t + 1); memcpy(__buf + (ptr_h->size - t + 1), ptr_h->pool, n - (ptr_h->size - t + 1)); } /* In this function, only ptr_h->tail should be updated */ ptr_h->tail = (t + n) % (ptr_h->size + 1); return n; } nextepc-0.3.10/lib/core/src/sha1.c000066400000000000000000000252541333553357400165510ustar00rootroot00000000000000/* * sha1.c * * Copyright (C) 1998, 2009 * Paul E. Jones * All Rights Reserved * ***************************************************************************** * $Id: sha1.c 12 2009-06-22 19:34:25Z paulej $ ***************************************************************************** * * Description: * This file implements the Secure Hashing Standard as defined * in FIPS PUB 180-1 published April 17, 1995. * * The Secure Hashing Standard, which uses the Secure Hashing * Algorithm (SHA), produces a 160-bit message digest for a * given data stream. In theory, it is highly improbable that * two messages will produce the same message digest. Therefore, * this algorithm can serve as a means of providing a "fingerprint" * for a message. * * Portability Issues: * SHA-1 is defined in terms of 32-bit "words". This code was * written with the expectation that the processor has at least * a 32-bit machine word size. If the machine word size is larger, * the code should still function properly. One caveat to that * is that the input functions taking characters and character * arrays assume that only 8 bits of information are stored in each * character. * * Caveats: * SHA-1 is designed to work with messages less than 2^64 bits * long. Although SHA-1 allows a message digest to be generated for * messages of any number of bits less than 2^64, this * implementation only works with messages with a length that is a * multiple of the size of an 8-bit character. * */ #include "core_sha1.h" /* * Define the circular shift macro */ #define SHA1CircularShift(bits,word) \ ((((word) << (bits)) & 0xFFFFFFFF) | \ ((word) >> (32-(bits)))) /* Function prototypes */ static void SHA1ProcessMessageBlock(sha1_ctx *); static void SHA1PadMessage(sha1_ctx *); /* * sha1_init * * Description: * This function will initialize the sha1_ctx in preparation * for computing a new message digest. * * Parameters: * context: [in/out] * The context to reset. * * Returns: * Nothing. * * Comments: * */ void sha1_init(sha1_ctx *ctx) { ctx->Length_Low = 0; ctx->Length_High = 0; ctx->Message_Block_Index = 0; ctx->Message_Digest[0] = 0x67452301; ctx->Message_Digest[1] = 0xEFCDAB89; ctx->Message_Digest[2] = 0x98BADCFE; ctx->Message_Digest[3] = 0x10325476; ctx->Message_Digest[4] = 0xC3D2E1F0; ctx->Computed = 0; ctx->Corrupted = 0; } /* * sha1_final * * Description: * This function will return the 160-bit message digest into the * Message_Digest array within the sha1_ctx provided * * Parameters: * context: [in/out] * The context to use to calculate the SHA-1 hash. * * Returns: * 1 if successful, 0 if it failed. * * Comments: * */ #if 0 /* modifed by anoveth */ void sha1_final(sha1_ctx *ctx) #else void sha1_final(sha1_ctx *ctx, c_uint8_t *digest) #endif { #if 0 /* blocked by anoveth */ if (ctx->Corrupted) { return 0; } #endif if (!ctx->Computed) { SHA1PadMessage(ctx); ctx->Computed = 1; } #if 0 /* modified by anoveth */ return 1; #else { #if WORDS_BIGENDIAN memcpy(digest, ctx->Message_Digest, SHA1_DIGEST_SIZE); #else #define ROTR(a) ((((unsigned)(a))>>8)|((a)<<24)) #define ROTL(a) (((a)<<8)|(((unsigned)(a))>>24)) #define SWAP32(a) (ROTL((a)&0xff00ff00)|ROTR((a)&0x00ff00ff)) c_uint32_t n[5]; n[0] = SWAP32(ctx->Message_Digest[0]); n[1] = SWAP32(ctx->Message_Digest[1]); n[2] = SWAP32(ctx->Message_Digest[2]); n[3] = SWAP32(ctx->Message_Digest[3]); n[4] = SWAP32(ctx->Message_Digest[4]); memcpy(digest, n, SHA1_DIGEST_SIZE); } #endif #endif } /* * sha1_update * * Description: * This function accepts an array of octets as the next portion of * the message. * * Parameters: * context: [in/out] * The SHA-1 context to update * message_array: [in] * An array of characters representing the next portion of the * message. * length: [in] * The length of the message in message_array * * Returns: * Nothing. * * Comments: * */ void sha1_update(sha1_ctx *ctx, const c_uint8_t *message_array, c_uint32_t length) { if (!length) { return; } if (ctx->Computed || ctx->Corrupted) { ctx->Corrupted = 1; return; } while(length-- && !ctx->Corrupted) { ctx->Message_Block[ctx->Message_Block_Index++] = (*message_array & 0xFF); ctx->Length_Low += 8; /* Force it to 32 bits */ ctx->Length_Low &= 0xFFFFFFFF; if (ctx->Length_Low == 0) { ctx->Length_High++; /* Force it to 32 bits */ ctx->Length_High &= 0xFFFFFFFF; if (ctx->Length_High == 0) { /* Message is too long */ ctx->Corrupted = 1; } } if (ctx->Message_Block_Index == 64) { SHA1ProcessMessageBlock(ctx); } message_array++; } } /* * SHA1ProcessMessageBlock * * Description: * This function will process the next 512 bits of the message * stored in the Message_Block array. * * Parameters: * None. * * Returns: * Nothing. * * Comments: * Many of the variable names in the SHAContext, especially the * single character names, were used because those were the names * used in the publication. * * */ static void SHA1ProcessMessageBlock(sha1_ctx *ctx) { const unsigned K[] = /* Constants defined in SHA-1 */ { 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6 }; int t; /* Loop counter */ unsigned temp; /* Temporary word value */ unsigned W[80]; /* Word sequence */ unsigned A, B, C, D, E; /* Word buffers */ /* * Initialize the first 16 words in the array W */ for(t = 0; t < 16; t++) { W[t] = ((unsigned) ctx->Message_Block[t * 4]) << 24; W[t] |= ((unsigned) ctx->Message_Block[t * 4 + 1]) << 16; W[t] |= ((unsigned) ctx->Message_Block[t * 4 + 2]) << 8; W[t] |= ((unsigned) ctx->Message_Block[t * 4 + 3]); } for(t = 16; t < 80; t++) { W[t] = SHA1CircularShift(1,W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16]); } A = ctx->Message_Digest[0]; B = ctx->Message_Digest[1]; C = ctx->Message_Digest[2]; D = ctx->Message_Digest[3]; E = ctx->Message_Digest[4]; for(t = 0; t < 20; t++) { temp = SHA1CircularShift(5,A) + ((B & C) | ((~B) & D)) + E + W[t] + K[0]; temp &= 0xFFFFFFFF; E = D; D = C; C = SHA1CircularShift(30,B); B = A; A = temp; } for(t = 20; t < 40; t++) { temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[1]; temp &= 0xFFFFFFFF; E = D; D = C; C = SHA1CircularShift(30,B); B = A; A = temp; } for(t = 40; t < 60; t++) { temp = SHA1CircularShift(5,A) + ((B & C) | (B & D) | (C & D)) + E + W[t] + K[2]; temp &= 0xFFFFFFFF; E = D; D = C; C = SHA1CircularShift(30,B); B = A; A = temp; } for(t = 60; t < 80; t++) { temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[3]; temp &= 0xFFFFFFFF; E = D; D = C; C = SHA1CircularShift(30,B); B = A; A = temp; } ctx->Message_Digest[0] = (ctx->Message_Digest[0] + A) & 0xFFFFFFFF; ctx->Message_Digest[1] = (ctx->Message_Digest[1] + B) & 0xFFFFFFFF; ctx->Message_Digest[2] = (ctx->Message_Digest[2] + C) & 0xFFFFFFFF; ctx->Message_Digest[3] = (ctx->Message_Digest[3] + D) & 0xFFFFFFFF; ctx->Message_Digest[4] = (ctx->Message_Digest[4] + E) & 0xFFFFFFFF; ctx->Message_Block_Index = 0; } /* * SHA1PadMessage * * Description: * According to the standard, the message must be padded to an even * 512 bits. The first padding bit must be a '1'. The last 64 * bits represent the length of the original message. All bits in * between should be 0. This function will pad the message * according to those rules by filling the Message_Block array * accordingly. It will also call SHA1ProcessMessageBlock() * appropriately. When it returns, it can be assumed that the * message digest has been computed. * * Parameters: * context: [in/out] * The context to pad * * Returns: * Nothing. * * Comments: * */ static void SHA1PadMessage(sha1_ctx *ctx) { /* * Check to see if the current message block is too small to hold * the initial padding bits and length. If so, we will pad the * block, process it, and then continue padding into a second * block. */ if (ctx->Message_Block_Index > 55) { ctx->Message_Block[ctx->Message_Block_Index++] = 0x80; while(ctx->Message_Block_Index < 64) { ctx->Message_Block[ctx->Message_Block_Index++] = 0; } SHA1ProcessMessageBlock(ctx); while(ctx->Message_Block_Index < 56) { ctx->Message_Block[ctx->Message_Block_Index++] = 0; } } else { ctx->Message_Block[ctx->Message_Block_Index++] = 0x80; while(ctx->Message_Block_Index < 56) { ctx->Message_Block[ctx->Message_Block_Index++] = 0; } } /* * Store the message length as the last 8 octets */ ctx->Message_Block[56] = (ctx->Length_High >> 24) & 0xFF; ctx->Message_Block[57] = (ctx->Length_High >> 16) & 0xFF; ctx->Message_Block[58] = (ctx->Length_High >> 8) & 0xFF; ctx->Message_Block[59] = (ctx->Length_High) & 0xFF; ctx->Message_Block[60] = (ctx->Length_Low >> 24) & 0xFF; ctx->Message_Block[61] = (ctx->Length_Low >> 16) & 0xFF; ctx->Message_Block[62] = (ctx->Length_Low >> 8) & 0xFF; ctx->Message_Block[63] = (ctx->Length_Low) & 0xFF; SHA1ProcessMessageBlock(ctx); } void sha1(const c_uint8_t *message, c_uint32_t len, c_uint8_t *digest) { sha1_ctx ctx; sha1_init(&ctx); sha1_update(&ctx, message, len); sha1_final(&ctx, digest); } nextepc-0.3.10/lib/core/src/sha1_hmac.c000066400000000000000000000102371333553357400175340ustar00rootroot00000000000000/*- * HMAC-SHA-224/256/384/512 implementation * Last update: 06/15/2005 * Issue date: 06/15/2005 * * Copyright (C) 2005 Olivier Gay * 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. * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE PROJECT 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 PROJECT 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. */ #include #include "core_sha1_hmac.h" void hmac_sha1_init(hmac_sha1_ctx *ctx, c_uint8_t *key, c_uint32_t key_size) { c_uint32_t fill; c_uint32_t num; c_uint8_t *key_used; c_uint8_t key_temp[SHA1_DIGEST_SIZE]; int i; if (key_size == SHA1_BLOCK_SIZE) { key_used = key; num = SHA1_BLOCK_SIZE; } else { if (key_size > SHA1_BLOCK_SIZE){ key_used = key_temp; num = SHA1_DIGEST_SIZE; sha1(key, key_size, key_used); } else { /* key_size > SHA1_BLOCK_SIZE */ key_used = key; num = key_size; } fill = SHA1_BLOCK_SIZE - num; memset(ctx->block_ipad + num, 0x36, fill); memset(ctx->block_opad + num, 0x5c, fill); } for (i = 0; i < num; i++) { ctx->block_ipad[i] = key_used[i] ^ 0x36; ctx->block_opad[i] = key_used[i] ^ 0x5c; } sha1_init(&ctx->ctx_inside); sha1_update(&ctx->ctx_inside, ctx->block_ipad, SHA1_BLOCK_SIZE); sha1_init(&ctx->ctx_outside); sha1_update(&ctx->ctx_outside, ctx->block_opad, SHA1_BLOCK_SIZE); /* for hmac_reinit */ memcpy(&ctx->ctx_inside_reinit, &ctx->ctx_inside, sizeof(sha1_ctx)); memcpy(&ctx->ctx_outside_reinit, &ctx->ctx_outside, sizeof(sha1_ctx)); } void hmac_sha1_reinit(hmac_sha1_ctx *ctx) { memcpy(&ctx->ctx_inside, &ctx->ctx_inside_reinit, sizeof(sha1_ctx)); memcpy(&ctx->ctx_outside, &ctx->ctx_outside_reinit, sizeof(sha1_ctx)); } void hmac_sha1_update(hmac_sha1_ctx *ctx, c_uint8_t *message, c_uint32_t message_len) { sha1_update(&ctx->ctx_inside, message, message_len); } void hmac_sha1_final(hmac_sha1_ctx *ctx, c_uint8_t *mac, c_uint32_t mac_size) { c_uint8_t digest_inside[SHA1_DIGEST_SIZE]; c_uint8_t mac_temp[SHA1_DIGEST_SIZE]; sha1_final(&ctx->ctx_inside, digest_inside); sha1_update(&ctx->ctx_outside, digest_inside, SHA1_DIGEST_SIZE); sha1_final(&ctx->ctx_outside, mac_temp); memcpy(mac, mac_temp, mac_size); } void hmac_sha1(c_uint8_t *key, c_uint32_t key_size, c_uint8_t *message, c_uint32_t message_len, c_uint8_t *mac, c_uint32_t mac_size) { hmac_sha1_ctx ctx; hmac_sha1_init(&ctx, key, key_size); hmac_sha1_update(&ctx, message, message_len); hmac_sha1_final(&ctx, mac, mac_size); } nextepc-0.3.10/lib/core/src/sha2.c000066400000000000000000000675221333553357400165560ustar00rootroot00000000000000/* * FIPS 180-2 SHA-224/256/384/512 implementation * Last update: 02/02/2007 * Issue date: 04/30/2005 * * Copyright (C) 2005, 2007 Olivier Gay * 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. * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE PROJECT 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 PROJECT 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. */ #if 0 #define UNROLL_LOOPS /* Enable loops unrolling */ #endif #define TRACE_MODULE _sha2 #include "core_debug.h" #include "core_sha2.h" #define SHFR(x, n) (x >> n) #define ROTR(x, n) ((x >> n) | (x << ((sizeof(x) << 3) - n))) #define ROTL(x, n) ((x << n) | (x >> ((sizeof(x) << 3) - n))) #define CH(x, y, z) ((x & y) ^ (~x & z)) #define MAJ(x, y, z) ((x & y) ^ (x & z) ^ (y & z)) #define SHA256_F1(x) (ROTR(x, 2) ^ ROTR(x, 13) ^ ROTR(x, 22)) #define SHA256_F2(x) (ROTR(x, 6) ^ ROTR(x, 11) ^ ROTR(x, 25)) #define SHA256_F3(x) (ROTR(x, 7) ^ ROTR(x, 18) ^ SHFR(x, 3)) #define SHA256_F4(x) (ROTR(x, 17) ^ ROTR(x, 19) ^ SHFR(x, 10)) #define SHA512_F1(x) (ROTR(x, 28) ^ ROTR(x, 34) ^ ROTR(x, 39)) #define SHA512_F2(x) (ROTR(x, 14) ^ ROTR(x, 18) ^ ROTR(x, 41)) #define SHA512_F3(x) (ROTR(x, 1) ^ ROTR(x, 8) ^ SHFR(x, 7)) #define SHA512_F4(x) (ROTR(x, 19) ^ ROTR(x, 61) ^ SHFR(x, 6)) #define UNPACK32(x, str) \ { \ *((str) + 3) = (c_uint8_t) ((x) ); \ *((str) + 2) = (c_uint8_t) ((x) >> 8); \ *((str) + 1) = (c_uint8_t) ((x) >> 16); \ *((str) + 0) = (c_uint8_t) ((x) >> 24); \ } #define PACK32(str, x) \ { \ *(x) = ((c_uint32_t) *((str) + 3) ) \ | ((c_uint32_t) *((str) + 2) << 8) \ | ((c_uint32_t) *((str) + 1) << 16) \ | ((c_uint32_t) *((str) + 0) << 24); \ } #define UNPACK64(x, str) \ { \ *((str) + 7) = (c_uint8_t) ((x) ); \ *((str) + 6) = (c_uint8_t) ((x) >> 8); \ *((str) + 5) = (c_uint8_t) ((x) >> 16); \ *((str) + 4) = (c_uint8_t) ((x) >> 24); \ *((str) + 3) = (c_uint8_t) ((x) >> 32); \ *((str) + 2) = (c_uint8_t) ((x) >> 40); \ *((str) + 1) = (c_uint8_t) ((x) >> 48); \ *((str) + 0) = (c_uint8_t) ((x) >> 56); \ } #define PACK64(str, x) \ { \ *(x) = ((c_uint64_t) *((str) + 7) ) \ | ((c_uint64_t) *((str) + 6) << 8) \ | ((c_uint64_t) *((str) + 5) << 16) \ | ((c_uint64_t) *((str) + 4) << 24) \ | ((c_uint64_t) *((str) + 3) << 32) \ | ((c_uint64_t) *((str) + 2) << 40) \ | ((c_uint64_t) *((str) + 1) << 48) \ | ((c_uint64_t) *((str) + 0) << 56); \ } /* Macros used for loops unrolling */ #define SHA256_SCR(i) \ { \ w[i] = SHA256_F4(w[i - 2]) + w[i - 7] \ + SHA256_F3(w[i - 15]) + w[i - 16]; \ } #define SHA512_SCR(i) \ { \ w[i] = SHA512_F4(w[i - 2]) + w[i - 7] \ + SHA512_F3(w[i - 15]) + w[i - 16]; \ } #define SHA256_EXP(a, b, c, d, e, f, g, h, j) \ { \ t1 = wv[h] + SHA256_F2(wv[e]) + CH(wv[e], wv[f], wv[g]) \ + sha256_k[j] + w[j]; \ t2 = SHA256_F1(wv[a]) + MAJ(wv[a], wv[b], wv[c]); \ wv[d] += t1; \ wv[h] = t1 + t2; \ } #define SHA512_EXP(a, b, c, d, e, f, g ,h, j) \ { \ t1 = wv[h] + SHA512_F2(wv[e]) + CH(wv[e], wv[f], wv[g]) \ + sha512_k[j] + w[j]; \ t2 = SHA512_F1(wv[a]) + MAJ(wv[a], wv[b], wv[c]); \ wv[d] += t1; \ wv[h] = t1 + t2; \ } c_uint32_t sha224_h0[8] = {0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4}; c_uint32_t sha256_h0[8] = {0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a, 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19}; c_uint64_t sha384_h0[8] = {0xcbbb9d5dc1059ed8ULL, 0x629a292a367cd507ULL, 0x9159015a3070dd17ULL, 0x152fecd8f70e5939ULL, 0x67332667ffc00b31ULL, 0x8eb44a8768581511ULL, 0xdb0c2e0d64f98fa7ULL, 0x47b5481dbefa4fa4ULL}; c_uint64_t sha512_h0[8] = {0x6a09e667f3bcc908ULL, 0xbb67ae8584caa73bULL, 0x3c6ef372fe94f82bULL, 0xa54ff53a5f1d36f1ULL, 0x510e527fade682d1ULL, 0x9b05688c2b3e6c1fULL, 0x1f83d9abfb41bd6bULL, 0x5be0cd19137e2179ULL}; c_uint32_t sha256_k[64] = {0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2}; c_uint64_t sha512_k[80] = {0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL, 0xb5c0fbcfec4d3b2fULL, 0xe9b5dba58189dbbcULL, 0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL, 0x923f82a4af194f9bULL, 0xab1c5ed5da6d8118ULL, 0xd807aa98a3030242ULL, 0x12835b0145706fbeULL, 0x243185be4ee4b28cULL, 0x550c7dc3d5ffb4e2ULL, 0x72be5d74f27b896fULL, 0x80deb1fe3b1696b1ULL, 0x9bdc06a725c71235ULL, 0xc19bf174cf692694ULL, 0xe49b69c19ef14ad2ULL, 0xefbe4786384f25e3ULL, 0x0fc19dc68b8cd5b5ULL, 0x240ca1cc77ac9c65ULL, 0x2de92c6f592b0275ULL, 0x4a7484aa6ea6e483ULL, 0x5cb0a9dcbd41fbd4ULL, 0x76f988da831153b5ULL, 0x983e5152ee66dfabULL, 0xa831c66d2db43210ULL, 0xb00327c898fb213fULL, 0xbf597fc7beef0ee4ULL, 0xc6e00bf33da88fc2ULL, 0xd5a79147930aa725ULL, 0x06ca6351e003826fULL, 0x142929670a0e6e70ULL, 0x27b70a8546d22ffcULL, 0x2e1b21385c26c926ULL, 0x4d2c6dfc5ac42aedULL, 0x53380d139d95b3dfULL, 0x650a73548baf63deULL, 0x766a0abb3c77b2a8ULL, 0x81c2c92e47edaee6ULL, 0x92722c851482353bULL, 0xa2bfe8a14cf10364ULL, 0xa81a664bbc423001ULL, 0xc24b8b70d0f89791ULL, 0xc76c51a30654be30ULL, 0xd192e819d6ef5218ULL, 0xd69906245565a910ULL, 0xf40e35855771202aULL, 0x106aa07032bbd1b8ULL, 0x19a4c116b8d2d0c8ULL, 0x1e376c085141ab53ULL, 0x2748774cdf8eeb99ULL, 0x34b0bcb5e19b48a8ULL, 0x391c0cb3c5c95a63ULL, 0x4ed8aa4ae3418acbULL, 0x5b9cca4f7763e373ULL, 0x682e6ff3d6b2b8a3ULL, 0x748f82ee5defb2fcULL, 0x78a5636f43172f60ULL, 0x84c87814a1f0ab72ULL, 0x8cc702081a6439ecULL, 0x90befffa23631e28ULL, 0xa4506cebde82bde9ULL, 0xbef9a3f7b2c67915ULL, 0xc67178f2e372532bULL, 0xca273eceea26619cULL, 0xd186b8c721c0c207ULL, 0xeada7dd6cde0eb1eULL, 0xf57d4f7fee6ed178ULL, 0x06f067aa72176fbaULL, 0x0a637dc5a2c898a6ULL, 0x113f9804bef90daeULL, 0x1b710b35131c471bULL, 0x28db77f523047d84ULL, 0x32caab7b40c72493ULL, 0x3c9ebe0a15c9bebcULL, 0x431d67c49c100d4cULL, 0x4cc5d4becb3e42b6ULL, 0x597f299cfc657e2aULL, 0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL}; /* SHA-256 functions */ void sha256_transf(sha256_ctx *ctx, const c_uint8_t *message, c_uint32_t block_nb) { c_uint32_t w[64]; c_uint32_t wv[8]; c_uint32_t t1, t2; const c_uint8_t *sub_block; int i; #ifndef UNROLL_LOOPS int j; #endif for (i = 0; i < (int) block_nb; i++) { sub_block = message + (i << 6); #ifndef UNROLL_LOOPS for (j = 0; j < 16; j++) { PACK32(&sub_block[j << 2], &w[j]); } for (j = 16; j < 64; j++) { SHA256_SCR(j); } for (j = 0; j < 8; j++) { wv[j] = ctx->h[j]; } for (j = 0; j < 64; j++) { t1 = wv[7] + SHA256_F2(wv[4]) + CH(wv[4], wv[5], wv[6]) + sha256_k[j] + w[j]; t2 = SHA256_F1(wv[0]) + MAJ(wv[0], wv[1], wv[2]); wv[7] = wv[6]; wv[6] = wv[5]; wv[5] = wv[4]; wv[4] = wv[3] + t1; wv[3] = wv[2]; wv[2] = wv[1]; wv[1] = wv[0]; wv[0] = t1 + t2; } for (j = 0; j < 8; j++) { ctx->h[j] += wv[j]; } #else PACK32(&sub_block[ 0], &w[ 0]); PACK32(&sub_block[ 4], &w[ 1]); PACK32(&sub_block[ 8], &w[ 2]); PACK32(&sub_block[12], &w[ 3]); PACK32(&sub_block[16], &w[ 4]); PACK32(&sub_block[20], &w[ 5]); PACK32(&sub_block[24], &w[ 6]); PACK32(&sub_block[28], &w[ 7]); PACK32(&sub_block[32], &w[ 8]); PACK32(&sub_block[36], &w[ 9]); PACK32(&sub_block[40], &w[10]); PACK32(&sub_block[44], &w[11]); PACK32(&sub_block[48], &w[12]); PACK32(&sub_block[52], &w[13]); PACK32(&sub_block[56], &w[14]); PACK32(&sub_block[60], &w[15]); SHA256_SCR(16); SHA256_SCR(17); SHA256_SCR(18); SHA256_SCR(19); SHA256_SCR(20); SHA256_SCR(21); SHA256_SCR(22); SHA256_SCR(23); SHA256_SCR(24); SHA256_SCR(25); SHA256_SCR(26); SHA256_SCR(27); SHA256_SCR(28); SHA256_SCR(29); SHA256_SCR(30); SHA256_SCR(31); SHA256_SCR(32); SHA256_SCR(33); SHA256_SCR(34); SHA256_SCR(35); SHA256_SCR(36); SHA256_SCR(37); SHA256_SCR(38); SHA256_SCR(39); SHA256_SCR(40); SHA256_SCR(41); SHA256_SCR(42); SHA256_SCR(43); SHA256_SCR(44); SHA256_SCR(45); SHA256_SCR(46); SHA256_SCR(47); SHA256_SCR(48); SHA256_SCR(49); SHA256_SCR(50); SHA256_SCR(51); SHA256_SCR(52); SHA256_SCR(53); SHA256_SCR(54); SHA256_SCR(55); SHA256_SCR(56); SHA256_SCR(57); SHA256_SCR(58); SHA256_SCR(59); SHA256_SCR(60); SHA256_SCR(61); SHA256_SCR(62); SHA256_SCR(63); wv[0] = ctx->h[0]; wv[1] = ctx->h[1]; wv[2] = ctx->h[2]; wv[3] = ctx->h[3]; wv[4] = ctx->h[4]; wv[5] = ctx->h[5]; wv[6] = ctx->h[6]; wv[7] = ctx->h[7]; SHA256_EXP(0,1,2,3,4,5,6,7, 0); SHA256_EXP(7,0,1,2,3,4,5,6, 1); SHA256_EXP(6,7,0,1,2,3,4,5, 2); SHA256_EXP(5,6,7,0,1,2,3,4, 3); SHA256_EXP(4,5,6,7,0,1,2,3, 4); SHA256_EXP(3,4,5,6,7,0,1,2, 5); SHA256_EXP(2,3,4,5,6,7,0,1, 6); SHA256_EXP(1,2,3,4,5,6,7,0, 7); SHA256_EXP(0,1,2,3,4,5,6,7, 8); SHA256_EXP(7,0,1,2,3,4,5,6, 9); SHA256_EXP(6,7,0,1,2,3,4,5,10); SHA256_EXP(5,6,7,0,1,2,3,4,11); SHA256_EXP(4,5,6,7,0,1,2,3,12); SHA256_EXP(3,4,5,6,7,0,1,2,13); SHA256_EXP(2,3,4,5,6,7,0,1,14); SHA256_EXP(1,2,3,4,5,6,7,0,15); SHA256_EXP(0,1,2,3,4,5,6,7,16); SHA256_EXP(7,0,1,2,3,4,5,6,17); SHA256_EXP(6,7,0,1,2,3,4,5,18); SHA256_EXP(5,6,7,0,1,2,3,4,19); SHA256_EXP(4,5,6,7,0,1,2,3,20); SHA256_EXP(3,4,5,6,7,0,1,2,21); SHA256_EXP(2,3,4,5,6,7,0,1,22); SHA256_EXP(1,2,3,4,5,6,7,0,23); SHA256_EXP(0,1,2,3,4,5,6,7,24); SHA256_EXP(7,0,1,2,3,4,5,6,25); SHA256_EXP(6,7,0,1,2,3,4,5,26); SHA256_EXP(5,6,7,0,1,2,3,4,27); SHA256_EXP(4,5,6,7,0,1,2,3,28); SHA256_EXP(3,4,5,6,7,0,1,2,29); SHA256_EXP(2,3,4,5,6,7,0,1,30); SHA256_EXP(1,2,3,4,5,6,7,0,31); SHA256_EXP(0,1,2,3,4,5,6,7,32); SHA256_EXP(7,0,1,2,3,4,5,6,33); SHA256_EXP(6,7,0,1,2,3,4,5,34); SHA256_EXP(5,6,7,0,1,2,3,4,35); SHA256_EXP(4,5,6,7,0,1,2,3,36); SHA256_EXP(3,4,5,6,7,0,1,2,37); SHA256_EXP(2,3,4,5,6,7,0,1,38); SHA256_EXP(1,2,3,4,5,6,7,0,39); SHA256_EXP(0,1,2,3,4,5,6,7,40); SHA256_EXP(7,0,1,2,3,4,5,6,41); SHA256_EXP(6,7,0,1,2,3,4,5,42); SHA256_EXP(5,6,7,0,1,2,3,4,43); SHA256_EXP(4,5,6,7,0,1,2,3,44); SHA256_EXP(3,4,5,6,7,0,1,2,45); SHA256_EXP(2,3,4,5,6,7,0,1,46); SHA256_EXP(1,2,3,4,5,6,7,0,47); SHA256_EXP(0,1,2,3,4,5,6,7,48); SHA256_EXP(7,0,1,2,3,4,5,6,49); SHA256_EXP(6,7,0,1,2,3,4,5,50); SHA256_EXP(5,6,7,0,1,2,3,4,51); SHA256_EXP(4,5,6,7,0,1,2,3,52); SHA256_EXP(3,4,5,6,7,0,1,2,53); SHA256_EXP(2,3,4,5,6,7,0,1,54); SHA256_EXP(1,2,3,4,5,6,7,0,55); SHA256_EXP(0,1,2,3,4,5,6,7,56); SHA256_EXP(7,0,1,2,3,4,5,6,57); SHA256_EXP(6,7,0,1,2,3,4,5,58); SHA256_EXP(5,6,7,0,1,2,3,4,59); SHA256_EXP(4,5,6,7,0,1,2,3,60); SHA256_EXP(3,4,5,6,7,0,1,2,61); SHA256_EXP(2,3,4,5,6,7,0,1,62); SHA256_EXP(1,2,3,4,5,6,7,0,63); ctx->h[0] += wv[0]; ctx->h[1] += wv[1]; ctx->h[2] += wv[2]; ctx->h[3] += wv[3]; ctx->h[4] += wv[4]; ctx->h[5] += wv[5]; ctx->h[6] += wv[6]; ctx->h[7] += wv[7]; #endif /* !UNROLL_LOOPS */ } } void sha256(const c_uint8_t *message, c_uint32_t len, c_uint8_t *digest) { sha256_ctx ctx; sha256_init(&ctx); sha256_update(&ctx, message, len); sha256_final(&ctx, digest); } void sha256_init(sha256_ctx *ctx) { #ifndef UNROLL_LOOPS int i; for (i = 0; i < 8; i++) { ctx->h[i] = sha256_h0[i]; } #else ctx->h[0] = sha256_h0[0]; ctx->h[1] = sha256_h0[1]; ctx->h[2] = sha256_h0[2]; ctx->h[3] = sha256_h0[3]; ctx->h[4] = sha256_h0[4]; ctx->h[5] = sha256_h0[5]; ctx->h[6] = sha256_h0[6]; ctx->h[7] = sha256_h0[7]; #endif /* !UNROLL_LOOPS */ ctx->len = 0; ctx->tot_len = 0; } void sha256_update(sha256_ctx *ctx, const c_uint8_t *message, c_uint32_t len) { c_uint32_t block_nb; c_uint32_t new_len, rem_len, tmp_len; const c_uint8_t *shifted_message; tmp_len = SHA256_BLOCK_SIZE - ctx->len; rem_len = len < tmp_len ? len : tmp_len; memcpy(&ctx->block[ctx->len], message, rem_len); if (ctx->len + len < SHA256_BLOCK_SIZE) { ctx->len += len; return; } new_len = len - rem_len; block_nb = new_len / SHA256_BLOCK_SIZE; shifted_message = message + rem_len; sha256_transf(ctx, ctx->block, 1); sha256_transf(ctx, shifted_message, block_nb); rem_len = new_len % SHA256_BLOCK_SIZE; memcpy(ctx->block, &shifted_message[block_nb << 6], rem_len); ctx->len = rem_len; ctx->tot_len += (block_nb + 1) << 6; } void sha256_final(sha256_ctx *ctx, c_uint8_t *digest) { c_uint32_t block_nb; c_uint32_t pm_len; c_uint32_t len_b; #ifndef UNROLL_LOOPS int i; #endif block_nb = (1 + ((SHA256_BLOCK_SIZE - 9) < (ctx->len % SHA256_BLOCK_SIZE))); len_b = (ctx->tot_len + ctx->len) << 3; pm_len = block_nb << 6; memset(ctx->block + ctx->len, 0, pm_len - ctx->len); ctx->block[ctx->len] = 0x80; UNPACK32(len_b, ctx->block + pm_len - 4); sha256_transf(ctx, ctx->block, block_nb); #ifndef UNROLL_LOOPS for (i = 0 ; i < 8; i++) { UNPACK32(ctx->h[i], &digest[i << 2]); } #else UNPACK32(ctx->h[0], &digest[ 0]); UNPACK32(ctx->h[1], &digest[ 4]); UNPACK32(ctx->h[2], &digest[ 8]); UNPACK32(ctx->h[3], &digest[12]); UNPACK32(ctx->h[4], &digest[16]); UNPACK32(ctx->h[5], &digest[20]); UNPACK32(ctx->h[6], &digest[24]); UNPACK32(ctx->h[7], &digest[28]); #endif /* !UNROLL_LOOPS */ } /* SHA-512 functions */ void sha512_transf(sha512_ctx *ctx, const c_uint8_t *message, c_uint32_t block_nb) { c_uint64_t w[80]; c_uint64_t wv[8]; c_uint64_t t1, t2; const c_uint8_t *sub_block; int i, j; for (i = 0; i < (int) block_nb; i++) { sub_block = message + (i << 7); #ifndef UNROLL_LOOPS for (j = 0; j < 16; j++) { PACK64(&sub_block[j << 3], &w[j]); } for (j = 16; j < 80; j++) { SHA512_SCR(j); } for (j = 0; j < 8; j++) { wv[j] = ctx->h[j]; } for (j = 0; j < 80; j++) { t1 = wv[7] + SHA512_F2(wv[4]) + CH(wv[4], wv[5], wv[6]) + sha512_k[j] + w[j]; t2 = SHA512_F1(wv[0]) + MAJ(wv[0], wv[1], wv[2]); wv[7] = wv[6]; wv[6] = wv[5]; wv[5] = wv[4]; wv[4] = wv[3] + t1; wv[3] = wv[2]; wv[2] = wv[1]; wv[1] = wv[0]; wv[0] = t1 + t2; } for (j = 0; j < 8; j++) { ctx->h[j] += wv[j]; } #else PACK64(&sub_block[ 0], &w[ 0]); PACK64(&sub_block[ 8], &w[ 1]); PACK64(&sub_block[ 16], &w[ 2]); PACK64(&sub_block[ 24], &w[ 3]); PACK64(&sub_block[ 32], &w[ 4]); PACK64(&sub_block[ 40], &w[ 5]); PACK64(&sub_block[ 48], &w[ 6]); PACK64(&sub_block[ 56], &w[ 7]); PACK64(&sub_block[ 64], &w[ 8]); PACK64(&sub_block[ 72], &w[ 9]); PACK64(&sub_block[ 80], &w[10]); PACK64(&sub_block[ 88], &w[11]); PACK64(&sub_block[ 96], &w[12]); PACK64(&sub_block[104], &w[13]); PACK64(&sub_block[112], &w[14]); PACK64(&sub_block[120], &w[15]); SHA512_SCR(16); SHA512_SCR(17); SHA512_SCR(18); SHA512_SCR(19); SHA512_SCR(20); SHA512_SCR(21); SHA512_SCR(22); SHA512_SCR(23); SHA512_SCR(24); SHA512_SCR(25); SHA512_SCR(26); SHA512_SCR(27); SHA512_SCR(28); SHA512_SCR(29); SHA512_SCR(30); SHA512_SCR(31); SHA512_SCR(32); SHA512_SCR(33); SHA512_SCR(34); SHA512_SCR(35); SHA512_SCR(36); SHA512_SCR(37); SHA512_SCR(38); SHA512_SCR(39); SHA512_SCR(40); SHA512_SCR(41); SHA512_SCR(42); SHA512_SCR(43); SHA512_SCR(44); SHA512_SCR(45); SHA512_SCR(46); SHA512_SCR(47); SHA512_SCR(48); SHA512_SCR(49); SHA512_SCR(50); SHA512_SCR(51); SHA512_SCR(52); SHA512_SCR(53); SHA512_SCR(54); SHA512_SCR(55); SHA512_SCR(56); SHA512_SCR(57); SHA512_SCR(58); SHA512_SCR(59); SHA512_SCR(60); SHA512_SCR(61); SHA512_SCR(62); SHA512_SCR(63); SHA512_SCR(64); SHA512_SCR(65); SHA512_SCR(66); SHA512_SCR(67); SHA512_SCR(68); SHA512_SCR(69); SHA512_SCR(70); SHA512_SCR(71); SHA512_SCR(72); SHA512_SCR(73); SHA512_SCR(74); SHA512_SCR(75); SHA512_SCR(76); SHA512_SCR(77); SHA512_SCR(78); SHA512_SCR(79); wv[0] = ctx->h[0]; wv[1] = ctx->h[1]; wv[2] = ctx->h[2]; wv[3] = ctx->h[3]; wv[4] = ctx->h[4]; wv[5] = ctx->h[5]; wv[6] = ctx->h[6]; wv[7] = ctx->h[7]; j = 0; do { SHA512_EXP(0,1,2,3,4,5,6,7,j); j++; SHA512_EXP(7,0,1,2,3,4,5,6,j); j++; SHA512_EXP(6,7,0,1,2,3,4,5,j); j++; SHA512_EXP(5,6,7,0,1,2,3,4,j); j++; SHA512_EXP(4,5,6,7,0,1,2,3,j); j++; SHA512_EXP(3,4,5,6,7,0,1,2,j); j++; SHA512_EXP(2,3,4,5,6,7,0,1,j); j++; SHA512_EXP(1,2,3,4,5,6,7,0,j); j++; } while (j < 80); ctx->h[0] += wv[0]; ctx->h[1] += wv[1]; ctx->h[2] += wv[2]; ctx->h[3] += wv[3]; ctx->h[4] += wv[4]; ctx->h[5] += wv[5]; ctx->h[6] += wv[6]; ctx->h[7] += wv[7]; #endif /* !UNROLL_LOOPS */ } } void sha512(const c_uint8_t *message, c_uint32_t len, c_uint8_t *digest) { sha512_ctx ctx; sha512_init(&ctx); sha512_update(&ctx, message, len); sha512_final(&ctx, digest); } void sha512_init(sha512_ctx *ctx) { #ifndef UNROLL_LOOPS int i; for (i = 0; i < 8; i++) { ctx->h[i] = sha512_h0[i]; } #else ctx->h[0] = sha512_h0[0]; ctx->h[1] = sha512_h0[1]; ctx->h[2] = sha512_h0[2]; ctx->h[3] = sha512_h0[3]; ctx->h[4] = sha512_h0[4]; ctx->h[5] = sha512_h0[5]; ctx->h[6] = sha512_h0[6]; ctx->h[7] = sha512_h0[7]; #endif /* !UNROLL_LOOPS */ ctx->len = 0; ctx->tot_len = 0; } void sha512_update(sha512_ctx *ctx, const c_uint8_t *message, c_uint32_t len) { c_uint32_t block_nb; c_uint32_t new_len, rem_len, tmp_len; const c_uint8_t *shifted_message; tmp_len = SHA512_BLOCK_SIZE - ctx->len; rem_len = len < tmp_len ? len : tmp_len; memcpy(&ctx->block[ctx->len], message, rem_len); if (ctx->len + len < SHA512_BLOCK_SIZE) { ctx->len += len; return; } new_len = len - rem_len; block_nb = new_len / SHA512_BLOCK_SIZE; shifted_message = message + rem_len; sha512_transf(ctx, ctx->block, 1); sha512_transf(ctx, shifted_message, block_nb); rem_len = new_len % SHA512_BLOCK_SIZE; memcpy(ctx->block, &shifted_message[block_nb << 7], rem_len); ctx->len = rem_len; ctx->tot_len += (block_nb + 1) << 7; } void sha512_final(sha512_ctx *ctx, c_uint8_t *digest) { c_uint32_t block_nb; c_uint32_t pm_len; c_uint32_t len_b; #ifndef UNROLL_LOOPS int i; #endif block_nb = 1 + ((SHA512_BLOCK_SIZE - 17) < (ctx->len % SHA512_BLOCK_SIZE)); len_b = (ctx->tot_len + ctx->len) << 3; pm_len = block_nb << 7; memset(ctx->block + ctx->len, 0, pm_len - ctx->len); ctx->block[ctx->len] = 0x80; UNPACK32(len_b, ctx->block + pm_len - 4); sha512_transf(ctx, ctx->block, block_nb); #ifndef UNROLL_LOOPS for (i = 0 ; i < 8; i++) { UNPACK64(ctx->h[i], &digest[i << 3]); } #else UNPACK64(ctx->h[0], &digest[ 0]); UNPACK64(ctx->h[1], &digest[ 8]); UNPACK64(ctx->h[2], &digest[16]); UNPACK64(ctx->h[3], &digest[24]); UNPACK64(ctx->h[4], &digest[32]); UNPACK64(ctx->h[5], &digest[40]); UNPACK64(ctx->h[6], &digest[48]); UNPACK64(ctx->h[7], &digest[56]); #endif /* !UNROLL_LOOPS */ } /* SHA-384 functions */ void sha384(const c_uint8_t *message, c_uint32_t len, c_uint8_t *digest) { sha384_ctx ctx; sha384_init(&ctx); sha384_update(&ctx, message, len); sha384_final(&ctx, digest); } void sha384_init(sha384_ctx *ctx) { #ifndef UNROLL_LOOPS int i; for (i = 0; i < 8; i++) { ctx->h[i] = sha384_h0[i]; } #else ctx->h[0] = sha384_h0[0]; ctx->h[1] = sha384_h0[1]; ctx->h[2] = sha384_h0[2]; ctx->h[3] = sha384_h0[3]; ctx->h[4] = sha384_h0[4]; ctx->h[5] = sha384_h0[5]; ctx->h[6] = sha384_h0[6]; ctx->h[7] = sha384_h0[7]; #endif /* !UNROLL_LOOPS */ ctx->len = 0; ctx->tot_len = 0; } void sha384_update(sha384_ctx *ctx, const c_uint8_t *message, c_uint32_t len) { c_uint32_t block_nb; c_uint32_t new_len, rem_len, tmp_len; const c_uint8_t *shifted_message; tmp_len = SHA384_BLOCK_SIZE - ctx->len; rem_len = len < tmp_len ? len : tmp_len; memcpy(&ctx->block[ctx->len], message, rem_len); if (ctx->len + len < SHA384_BLOCK_SIZE) { ctx->len += len; return; } new_len = len - rem_len; block_nb = new_len / SHA384_BLOCK_SIZE; shifted_message = message + rem_len; sha512_transf(ctx, ctx->block, 1); sha512_transf(ctx, shifted_message, block_nb); rem_len = new_len % SHA384_BLOCK_SIZE; memcpy(ctx->block, &shifted_message[block_nb << 7], rem_len); ctx->len = rem_len; ctx->tot_len += (block_nb + 1) << 7; } void sha384_final(sha384_ctx *ctx, c_uint8_t *digest) { c_uint32_t block_nb; c_uint32_t pm_len; c_uint32_t len_b; #ifndef UNROLL_LOOPS int i; #endif block_nb = (1 + ((SHA384_BLOCK_SIZE - 17) < (ctx->len % SHA384_BLOCK_SIZE))); len_b = (ctx->tot_len + ctx->len) << 3; pm_len = block_nb << 7; memset(ctx->block + ctx->len, 0, pm_len - ctx->len); ctx->block[ctx->len] = 0x80; UNPACK32(len_b, ctx->block + pm_len - 4); sha512_transf(ctx, ctx->block, block_nb); #ifndef UNROLL_LOOPS for (i = 0 ; i < 6; i++) { UNPACK64(ctx->h[i], &digest[i << 3]); } #else UNPACK64(ctx->h[0], &digest[ 0]); UNPACK64(ctx->h[1], &digest[ 8]); UNPACK64(ctx->h[2], &digest[16]); UNPACK64(ctx->h[3], &digest[24]); UNPACK64(ctx->h[4], &digest[32]); UNPACK64(ctx->h[5], &digest[40]); #endif /* !UNROLL_LOOPS */ } /* SHA-224 functions */ void sha224(const c_uint8_t *message, c_uint32_t len, c_uint8_t *digest) { sha224_ctx ctx; sha224_init(&ctx); sha224_update(&ctx, message, len); sha224_final(&ctx, digest); } void sha224_init(sha224_ctx *ctx) { #ifndef UNROLL_LOOPS int i; for (i = 0; i < 8; i++) { ctx->h[i] = sha224_h0[i]; } #else ctx->h[0] = sha224_h0[0]; ctx->h[1] = sha224_h0[1]; ctx->h[2] = sha224_h0[2]; ctx->h[3] = sha224_h0[3]; ctx->h[4] = sha224_h0[4]; ctx->h[5] = sha224_h0[5]; ctx->h[6] = sha224_h0[6]; ctx->h[7] = sha224_h0[7]; #endif /* !UNROLL_LOOPS */ ctx->len = 0; ctx->tot_len = 0; } void sha224_update(sha224_ctx *ctx, const c_uint8_t *message, c_uint32_t len) { c_uint32_t block_nb; c_uint32_t new_len, rem_len, tmp_len; const c_uint8_t *shifted_message; tmp_len = SHA224_BLOCK_SIZE - ctx->len; rem_len = len < tmp_len ? len : tmp_len; memcpy(&ctx->block[ctx->len], message, rem_len); if (ctx->len + len < SHA224_BLOCK_SIZE) { ctx->len += len; return; } new_len = len - rem_len; block_nb = new_len / SHA224_BLOCK_SIZE; shifted_message = message + rem_len; sha256_transf(ctx, ctx->block, 1); sha256_transf(ctx, shifted_message, block_nb); rem_len = new_len % SHA224_BLOCK_SIZE; memcpy(ctx->block, &shifted_message[block_nb << 6], rem_len); ctx->len = rem_len; ctx->tot_len += (block_nb + 1) << 6; } void sha224_final(sha224_ctx *ctx, c_uint8_t *digest) { c_uint32_t block_nb; c_uint32_t pm_len; c_uint32_t len_b; #ifndef UNROLL_LOOPS int i; #endif block_nb = (1 + ((SHA224_BLOCK_SIZE - 9) < (ctx->len % SHA224_BLOCK_SIZE))); len_b = (ctx->tot_len + ctx->len) << 3; pm_len = block_nb << 6; memset(ctx->block + ctx->len, 0, pm_len - ctx->len); ctx->block[ctx->len] = 0x80; UNPACK32(len_b, ctx->block + pm_len - 4); sha256_transf(ctx, ctx->block, block_nb); #ifndef UNROLL_LOOPS for (i = 0 ; i < 7; i++) { UNPACK32(ctx->h[i], &digest[i << 2]); } #else UNPACK32(ctx->h[0], &digest[ 0]); UNPACK32(ctx->h[1], &digest[ 4]); UNPACK32(ctx->h[2], &digest[ 8]); UNPACK32(ctx->h[3], &digest[12]); UNPACK32(ctx->h[4], &digest[16]); UNPACK32(ctx->h[5], &digest[20]); UNPACK32(ctx->h[6], &digest[24]); #endif /* !UNROLL_LOOPS */ } nextepc-0.3.10/lib/core/src/sha2_hmac.c000066400000000000000000000276031333553357400175420ustar00rootroot00000000000000/*- * HMAC-SHA-224/256/384/512 implementation * Last update: 06/15/2005 * Issue date: 06/15/2005 * * Copyright (C) 2005 Olivier Gay * 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. * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE PROJECT 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 PROJECT 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. */ #include #include "core_sha2_hmac.h" /* HMAC-SHA-224 functions */ void hmac_sha224_init(hmac_sha224_ctx *ctx, c_uint8_t *key, c_uint32_t key_size) { c_uint32_t fill; c_uint32_t num; c_uint8_t *key_used; c_uint8_t key_temp[SHA224_DIGEST_SIZE]; int i; if (key_size == SHA224_BLOCK_SIZE) { key_used = key; num = SHA224_BLOCK_SIZE; } else { if (key_size > SHA224_BLOCK_SIZE){ key_used = key_temp; num = SHA224_DIGEST_SIZE; sha224(key, key_size, key_used); } else { /* key_size > SHA224_BLOCK_SIZE */ key_used = key; num = key_size; } fill = SHA224_BLOCK_SIZE - num; memset(ctx->block_ipad + num, 0x36, fill); memset(ctx->block_opad + num, 0x5c, fill); } for (i = 0; i < num; i++) { ctx->block_ipad[i] = key_used[i] ^ 0x36; ctx->block_opad[i] = key_used[i] ^ 0x5c; } sha224_init(&ctx->ctx_inside); sha224_update(&ctx->ctx_inside, ctx->block_ipad, SHA224_BLOCK_SIZE); sha224_init(&ctx->ctx_outside); sha224_update(&ctx->ctx_outside, ctx->block_opad, SHA224_BLOCK_SIZE); /* for hmac_reinit */ memcpy(&ctx->ctx_inside_reinit, &ctx->ctx_inside, sizeof(sha224_ctx)); memcpy(&ctx->ctx_outside_reinit, &ctx->ctx_outside, sizeof(sha224_ctx)); } void hmac_sha224_reinit(hmac_sha224_ctx *ctx) { memcpy(&ctx->ctx_inside, &ctx->ctx_inside_reinit, sizeof(sha224_ctx)); memcpy(&ctx->ctx_outside, &ctx->ctx_outside_reinit, sizeof(sha224_ctx)); } void hmac_sha224_update(hmac_sha224_ctx *ctx, c_uint8_t *message, c_uint32_t message_len) { sha224_update(&ctx->ctx_inside, message, message_len); } void hmac_sha224_final(hmac_sha224_ctx *ctx, c_uint8_t *mac, c_uint32_t mac_size) { c_uint8_t digest_inside[SHA224_DIGEST_SIZE]; c_uint8_t mac_temp[SHA224_DIGEST_SIZE]; sha224_final(&ctx->ctx_inside, digest_inside); sha224_update(&ctx->ctx_outside, digest_inside, SHA224_DIGEST_SIZE); sha224_final(&ctx->ctx_outside, mac_temp); memcpy(mac, mac_temp, mac_size); } void hmac_sha224(c_uint8_t *key, c_uint32_t key_size, c_uint8_t *message, c_uint32_t message_len, c_uint8_t *mac, c_uint32_t mac_size) { hmac_sha224_ctx ctx; hmac_sha224_init(&ctx, key, key_size); hmac_sha224_update(&ctx, message, message_len); hmac_sha224_final(&ctx, mac, mac_size); } /* HMAC-SHA-256 functions */ void hmac_sha256_init(hmac_sha256_ctx *ctx, c_uint8_t *key, c_uint32_t key_size) { c_uint32_t fill; c_uint32_t num; c_uint8_t *key_used; c_uint8_t key_temp[SHA256_DIGEST_SIZE]; int i; if (key_size == SHA256_BLOCK_SIZE) { key_used = key; num = SHA256_BLOCK_SIZE; } else { if (key_size > SHA256_BLOCK_SIZE){ key_used = key_temp; num = SHA256_DIGEST_SIZE; sha256(key, key_size, key_used); } else { /* key_size > SHA256_BLOCK_SIZE */ key_used = key; num = key_size; } fill = SHA256_BLOCK_SIZE - num; memset(ctx->block_ipad + num, 0x36, fill); memset(ctx->block_opad + num, 0x5c, fill); } for (i = 0; i < num; i++) { ctx->block_ipad[i] = key_used[i] ^ 0x36; ctx->block_opad[i] = key_used[i] ^ 0x5c; } sha256_init(&ctx->ctx_inside); sha256_update(&ctx->ctx_inside, ctx->block_ipad, SHA256_BLOCK_SIZE); sha256_init(&ctx->ctx_outside); sha256_update(&ctx->ctx_outside, ctx->block_opad, SHA256_BLOCK_SIZE); /* for hmac_reinit */ memcpy(&ctx->ctx_inside_reinit, &ctx->ctx_inside, sizeof(sha256_ctx)); memcpy(&ctx->ctx_outside_reinit, &ctx->ctx_outside, sizeof(sha256_ctx)); } void hmac_sha256_reinit(hmac_sha256_ctx *ctx) { memcpy(&ctx->ctx_inside, &ctx->ctx_inside_reinit, sizeof(sha256_ctx)); memcpy(&ctx->ctx_outside, &ctx->ctx_outside_reinit, sizeof(sha256_ctx)); } void hmac_sha256_update(hmac_sha256_ctx *ctx, c_uint8_t *message, c_uint32_t message_len) { sha256_update(&ctx->ctx_inside, message, message_len); } void hmac_sha256_final(hmac_sha256_ctx *ctx, c_uint8_t *mac, c_uint32_t mac_size) { c_uint8_t digest_inside[SHA256_DIGEST_SIZE]; c_uint8_t mac_temp[SHA256_DIGEST_SIZE]; sha256_final(&ctx->ctx_inside, digest_inside); sha256_update(&ctx->ctx_outside, digest_inside, SHA256_DIGEST_SIZE); sha256_final(&ctx->ctx_outside, mac_temp); memcpy(mac, mac_temp, mac_size); } void hmac_sha256(c_uint8_t *key, c_uint32_t key_size, c_uint8_t *message, c_uint32_t message_len, c_uint8_t *mac, c_uint32_t mac_size) { hmac_sha256_ctx ctx; hmac_sha256_init(&ctx, key, key_size); hmac_sha256_update(&ctx, message, message_len); hmac_sha256_final(&ctx, mac, mac_size); } /* HMAC-SHA-384 functions */ void hmac_sha384_init(hmac_sha384_ctx *ctx, c_uint8_t *key, c_uint32_t key_size) { c_uint32_t fill; c_uint32_t num; c_uint8_t *key_used; c_uint8_t key_temp[SHA384_DIGEST_SIZE]; int i; if (key_size == SHA384_BLOCK_SIZE) { key_used = key; num = SHA384_BLOCK_SIZE; } else { if (key_size > SHA384_BLOCK_SIZE){ key_used = key_temp; num = SHA384_DIGEST_SIZE; sha384(key, key_size, key_used); } else { /* key_size > SHA384_BLOCK_SIZE */ key_used = key; num = key_size; } fill = SHA384_BLOCK_SIZE - num; memset(ctx->block_ipad + num, 0x36, fill); memset(ctx->block_opad + num, 0x5c, fill); } for (i = 0; i < num; i++) { ctx->block_ipad[i] = key_used[i] ^ 0x36; ctx->block_opad[i] = key_used[i] ^ 0x5c; } sha384_init(&ctx->ctx_inside); sha384_update(&ctx->ctx_inside, ctx->block_ipad, SHA384_BLOCK_SIZE); sha384_init(&ctx->ctx_outside); sha384_update(&ctx->ctx_outside, ctx->block_opad, SHA384_BLOCK_SIZE); /* for hmac_reinit */ memcpy(&ctx->ctx_inside_reinit, &ctx->ctx_inside, sizeof(sha384_ctx)); memcpy(&ctx->ctx_outside_reinit, &ctx->ctx_outside, sizeof(sha384_ctx)); } void hmac_sha384_reinit(hmac_sha384_ctx *ctx) { memcpy(&ctx->ctx_inside, &ctx->ctx_inside_reinit, sizeof(sha384_ctx)); memcpy(&ctx->ctx_outside, &ctx->ctx_outside_reinit, sizeof(sha384_ctx)); } void hmac_sha384_update(hmac_sha384_ctx *ctx, c_uint8_t *message, c_uint32_t message_len) { sha384_update(&ctx->ctx_inside, message, message_len); } void hmac_sha384_final(hmac_sha384_ctx *ctx, c_uint8_t *mac, c_uint32_t mac_size) { c_uint8_t digest_inside[SHA384_DIGEST_SIZE]; c_uint8_t mac_temp[SHA384_DIGEST_SIZE]; sha384_final(&ctx->ctx_inside, digest_inside); sha384_update(&ctx->ctx_outside, digest_inside, SHA384_DIGEST_SIZE); sha384_final(&ctx->ctx_outside, mac_temp); memcpy(mac, mac_temp, mac_size); } void hmac_sha384(c_uint8_t *key, c_uint32_t key_size, c_uint8_t *message, c_uint32_t message_len, c_uint8_t *mac, c_uint32_t mac_size) { hmac_sha384_ctx ctx; hmac_sha384_init(&ctx, key, key_size); hmac_sha384_update(&ctx, message, message_len); hmac_sha384_final(&ctx, mac, mac_size); } /* HMAC-SHA-512 functions */ void hmac_sha512_init(hmac_sha512_ctx *ctx, c_uint8_t *key, c_uint32_t key_size) { c_uint32_t fill; c_uint32_t num; c_uint8_t *key_used; c_uint8_t key_temp[SHA512_DIGEST_SIZE]; int i; if (key_size == SHA512_BLOCK_SIZE) { key_used = key; num = SHA512_BLOCK_SIZE; } else { if (key_size > SHA512_BLOCK_SIZE){ key_used = key_temp; num = SHA512_DIGEST_SIZE; sha512(key, key_size, key_used); } else { /* key_size > SHA512_BLOCK_SIZE */ key_used = key; num = key_size; } fill = SHA512_BLOCK_SIZE - num; memset(ctx->block_ipad + num, 0x36, fill); memset(ctx->block_opad + num, 0x5c, fill); } for (i = 0; i < num; i++) { ctx->block_ipad[i] = key_used[i] ^ 0x36; ctx->block_opad[i] = key_used[i] ^ 0x5c; } sha512_init(&ctx->ctx_inside); sha512_update(&ctx->ctx_inside, ctx->block_ipad, SHA512_BLOCK_SIZE); sha512_init(&ctx->ctx_outside); sha512_update(&ctx->ctx_outside, ctx->block_opad, SHA512_BLOCK_SIZE); /* for hmac_reinit */ memcpy(&ctx->ctx_inside_reinit, &ctx->ctx_inside, sizeof(sha512_ctx)); memcpy(&ctx->ctx_outside_reinit, &ctx->ctx_outside, sizeof(sha512_ctx)); } void hmac_sha512_reinit(hmac_sha512_ctx *ctx) { memcpy(&ctx->ctx_inside, &ctx->ctx_inside_reinit, sizeof(sha512_ctx)); memcpy(&ctx->ctx_outside, &ctx->ctx_outside_reinit, sizeof(sha512_ctx)); } void hmac_sha512_update(hmac_sha512_ctx *ctx, c_uint8_t *message, c_uint32_t message_len) { sha512_update(&ctx->ctx_inside, message, message_len); } void hmac_sha512_final(hmac_sha512_ctx *ctx, c_uint8_t *mac, c_uint32_t mac_size) { c_uint8_t digest_inside[SHA512_DIGEST_SIZE]; c_uint8_t mac_temp[SHA512_DIGEST_SIZE]; sha512_final(&ctx->ctx_inside, digest_inside); sha512_update(&ctx->ctx_outside, digest_inside, SHA512_DIGEST_SIZE); sha512_final(&ctx->ctx_outside, mac_temp); memcpy(mac, mac_temp, mac_size); } void hmac_sha512(c_uint8_t *key, c_uint32_t key_size, c_uint8_t *message, c_uint32_t message_len, c_uint8_t *mac, c_uint32_t mac_size) { hmac_sha512_ctx ctx; hmac_sha512_init(&ctx, key, key_size); hmac_sha512_update(&ctx, message, message_len); hmac_sha512_final(&ctx, mac, mac_size); } nextepc-0.3.10/lib/core/src/timer.c000066400000000000000000000141531333553357400170310ustar00rootroot00000000000000#define TRACE_MODULE _timer #include "core_debug.h" #include "core_timer.h" #include "core_time.h" #include "core_param.h" #include "core_pool.h" typedef struct _tm_block_t { lnode_t node; tm_service_t *tm_s; c_uint32_t expire_time; expire_func_t expire_func; c_uintptr_t param1; c_uintptr_t param2; c_uintptr_t param3; c_uintptr_t param4; c_uintptr_t param5; c_uintptr_t param6; tm_type_e type; c_uint8_t running; c_uint32_t duration; } tm_block_t; pool_declare(timer_pool, tm_block_t, MAX_NUM_OF_TIMER); static int _tm_cmp_func(lnode_t *pnode1, lnode_t *pnode2); static tm_block_t *_tm_get(void); static void _tm_free(tm_block_t *tm); #define _tm_add(__l, __tm) \ list_insert_sorted(__l, __tm, _tm_cmp_func) #define _tm_remove(__l, __tm) \ list_remove(__l, __tm) status_t tm_init(void) { pool_init(&timer_pool, MAX_NUM_OF_TIMER); return CORE_OK; } status_t tm_final(void) { if (pool_size(&timer_pool) != pool_avail(&timer_pool)) d_error("%d not freed in timer_pool[%d]", pool_size(&timer_pool) - pool_avail(&timer_pool), pool_size(&timer_pool)); d_trace(9, "%d not freed in timer_pool[%d]\n", pool_size(&timer_pool) - pool_avail(&timer_pool), pool_size(&timer_pool)); pool_final(&timer_pool); return CORE_OK; } c_uint32_t tm_pool_avail(void) { return pool_avail(&timer_pool); } void tm_service_init(tm_service_t *tm_service) { memset(tm_service, 0x00, sizeof(tm_service_t)); list_init(&tm_service->active_list); list_init(&tm_service->idle_list); return; } status_t tm_execute_tm_service(tm_service_t *p_tm_s, c_uintptr_t data) { c_uint32_t cur_time; tm_block_t *tm; cur_time = time_as_msec(time_now()); tm = list_first(&(p_tm_s->active_list)); while(tm) { if(tm->expire_time < cur_time) { /* execute expiry function */ tm->expire_func(data, tm->param1, tm->param2, tm->param3, tm->param4, tm->param5, tm->param6); /* remove this tm_block from the active list */ _tm_remove(&(p_tm_s->active_list), tm); if(tm->type == TIMER_TYPE_PERIODIC) { tm->expire_time = cur_time + tm->duration; /* add this tm_block to the active list */ _tm_add(&(p_tm_s->active_list), tm); } else { /* add this tm_block to the idle list */ _tm_add(&(p_tm_s->idle_list), tm); tm->running = 0; } tm = list_first(&(p_tm_s->active_list)); } else { break; } } return CORE_OK; } static int _tm_cmp_func(lnode_t *pnode1, lnode_t *pnode2) { tm_block_t *tm1 = (tm_block_t*)pnode1; tm_block_t *tm2 = (tm_block_t*)pnode2; if(tm1->expire_time < tm2->expire_time) return -1; else return 1; } static tm_block_t *_tm_get(void) { tm_block_t *tm_b = NULL; /* get timer node from node pool */ pool_alloc_node(&timer_pool, &tm_b); /* check for error */ d_assert(tm_b != NULL, return NULL, "fail to get timer pool\n"); /* intialize timer node */ memset((char*)tm_b, 0x00, sizeof(tm_block_t)); return tm_b; } static void _tm_free(tm_block_t *tm) { /* free tlv node to the node pool */ pool_free_node(&timer_pool, tm); return; } tm_block_id tm_create(tm_service_t *tm_service, tm_type_e type, c_uint32_t duration, expire_func_t expire_func) { tm_block_t *tm = NULL; tm = _tm_get(); d_assert(tm, return 0, "tm_create failed\n"); tm->tm_s = tm_service; _tm_add(&(tm->tm_s->idle_list), tm); tm->type = type; tm->duration = duration; tm->expire_func = expire_func; return (tm_block_id)tm; } void tm_delete(tm_block_id id) { tm_block_t *tm = (tm_block_t *)id; /* If running timer, pop it from active list */ if (tm->running == 1) _tm_remove(&(tm->tm_s->active_list), tm); /* If not running timer, pop it from idle list */ else _tm_remove(&(tm->tm_s->idle_list), tm); _tm_free(tm); return; } status_t tm_set_duration(tm_block_id id, c_uint32_t duration) { tm_block_t *tm = (tm_block_t *)id; tm->duration = duration; return CORE_OK; } status_t tm_set_param1(tm_block_id id, c_uintptr_t param) { tm_block_t *tm = (tm_block_t *)id; tm->param1 = param; return CORE_OK; } status_t tm_set_param2(tm_block_id id, c_uintptr_t param) { tm_block_t *tm = (tm_block_t *)id; tm->param2 = param; return CORE_OK; } status_t tm_set_param3(tm_block_id id, c_uintptr_t param) { tm_block_t *tm = (tm_block_t *)id; tm->param3 = param; return CORE_OK; } status_t tm_set_param4(tm_block_id id, c_uintptr_t param) { tm_block_t *tm = (tm_block_t *)id; tm->param4 = param; return CORE_OK; } status_t tm_set_param5(tm_block_id id, c_uintptr_t param) { tm_block_t *tm = (tm_block_t *)id; tm->param5 = param; return CORE_OK; } status_t tm_set_param6(tm_block_id id, c_uintptr_t param) { tm_block_t *tm = (tm_block_t *)id; tm->param6 = param; return CORE_OK; } status_t tm_start(tm_block_id id) { c_uint32_t cur_time = time_as_msec(time_now()); tm_block_t *tm = (tm_block_t *)id; /* If already running timer, pop it from active list for put again */ if (tm->running == 1) _tm_remove(&(tm->tm_s->active_list), tm); /* If not running, tm is in idle list. pop it */ else _tm_remove(&(tm->tm_s->idle_list), tm); /* Calculate expiration */ tm->expire_time = cur_time + tm->duration; /* Push tm to active list */ _tm_add(&(tm->tm_s->active_list), tm); tm->running = 1; return CORE_OK; } status_t tm_stop(tm_block_id id) { tm_block_t *tm = (tm_block_t *)id; /* If already stopped timer, no operations needed */ if (tm->running == 0) return CORE_OK; _tm_remove(&(tm->tm_s->active_list), tm); _tm_add(&(tm->tm_s->idle_list), tm); tm->running = 0; return CORE_OK; } nextepc-0.3.10/lib/core/src/tlv.c000066400000000000000000000272271333553357400165240ustar00rootroot00000000000000#define TRACE_MODULE _tlv #include "core_debug.h" #include "core_tlv.h" #include "core_lib.h" pool_declare(tlv_pool, tlv_t, NUM_OF_TLV_NODE); /* tlv_t common functions */ tlv_t* tlv_get(void) { tlv_t *tlv = NULL; /* get tlv node from node pool */ pool_alloc_node(&tlv_pool, &tlv); /* check for error */ d_assert(tlv != NULL, return NULL, "fail to get tlv pool\n"); /* intialize tlv node */ memset((char*)tlv, 0x00, sizeof(tlv_t)); return tlv; } void tlv_free(tlv_t *p_tlv) { /* free tlv node to the node pool */ pool_free_node(&tlv_pool, p_tlv); return; } status_t tlv_init(void) { pool_init(&tlv_pool, NUM_OF_TLV_NODE); return CORE_OK; } status_t tlv_final(void) { pool_final(&tlv_pool); return CORE_OK; } c_uint32_t tlv_pool_avail(void) { return pool_avail(&tlv_pool); } void tlv_free_all(tlv_t *root_tlv) { /* free all tlv node to the node pool */ tlv_t *p_tlv = root_tlv; tlv_t *next = NULL; while(p_tlv) { if(p_tlv->embedded != NULL) { tlv_free_all(p_tlv->embedded); } next = p_tlv->next; tlv_free(p_tlv); p_tlv = next; } return; } c_uint8_t tlv_value_8(tlv_t *tlv) { return (*((c_uint8_t*)(tlv->value))); } c_uint16_t tlv_value_16(tlv_t *tlv) { c_uint16_t c_16; c_uint8_t *v = tlv->value; c_16 = ((v[0] << 8) & 0xff00) | ((v[1] ) & 0x00ff); return c_16; } c_uint32_t tlv_value_32(tlv_t *tlv) { c_uint32_t c_32; c_uint8_t *v = tlv->value; c_32 = ((v[0] << 24) & 0xff000000) | ((v[1] << 16) & 0x00ff0000) | ((v[2] << 8) & 0x0000ff00) | ((v[3] ) & 0x000000ff); return c_32; } c_uint32_t tlv_calc_length(tlv_t *p_tlv, c_uint8_t mode) { tlv_t *tmp_tlv = p_tlv; c_uint32_t length = 0; while(tmp_tlv) { /* this is length for type field */ switch(mode) { case TLV_MODE_T1_L1: length += 2; break; case TLV_MODE_T1_L2: length += 3; break; case TLV_MODE_T1_L2_I1: case TLV_MODE_T2_L2: length += 4; break; default: d_assert(0, return 0, "Invalid mode(%d)", mode); break; } /* this is length for type field */ if(tmp_tlv->embedded != NULL) { tmp_tlv->length = tlv_calc_length(tmp_tlv->embedded, mode); } /* this is length for value field */ length += tmp_tlv->length; tmp_tlv = tmp_tlv->next; } return length; } c_uint32_t tlv_calc_count(tlv_t *p_tlv) { tlv_t *tmp_tlv = p_tlv; c_uint32_t count = 0; while(tmp_tlv) { if(tmp_tlv->embedded != NULL) { count += tlv_calc_count(tmp_tlv->embedded); } else { count++; } tmp_tlv = tmp_tlv->next; } return count; } c_uint8_t *_tlv_put_type(c_uint32_t type, c_uint8_t *pos, c_uint8_t mode) { switch(mode) { case TLV_MODE_T1_L1: case TLV_MODE_T1_L2: case TLV_MODE_T1_L2_I1: *(pos++) = type & 0xFF; break; case TLV_MODE_T2_L2: *(pos++) = (type >> 8) & 0xFF; *(pos++) = type & 0xFF; break; default: d_assert(0, return 0, "Invalid mode(%d)", mode); break; } return pos; } c_uint8_t *_tlv_put_length(c_uint32_t length, c_uint8_t *pos, c_uint8_t mode) { switch(mode) { case TLV_MODE_T1_L1: *(pos++) = length & 0xFF; break; case TLV_MODE_T1_L2: case TLV_MODE_T1_L2_I1: case TLV_MODE_T2_L2: *(pos++) = (length >> 8) & 0xFF; *(pos++) = length & 0xFF; break; default: d_assert(0, return 0, "Invalid mode(%d)", mode); break; } return pos; } c_uint8_t *_tlv_put_instance(c_uint8_t instance, c_uint8_t *pos, c_uint8_t mode) { switch(mode) { case TLV_MODE_T1_L2_I1: *(pos++) = instance & 0xFF; break; default: break; } return pos; } c_uint8_t *_tlv_get_element(tlv_t *p_tlv, c_uint8_t *tlvBlock, c_uint8_t mode) { c_uint8_t *pos = tlvBlock; switch(mode) { case TLV_MODE_T1_L1: p_tlv->type = *(pos++); p_tlv->length = *(pos++); break; case TLV_MODE_T1_L2: p_tlv->type = *(pos++); p_tlv->length = *(pos++) << 8; p_tlv->length += *(pos++); break; case TLV_MODE_T1_L2_I1: p_tlv->type = *(pos++); p_tlv->length = *(pos++) << 8; p_tlv->length += *(pos++); p_tlv->instance = *(pos++); break; case TLV_MODE_T2_L2: p_tlv->type = *(pos++) << 8; p_tlv->type += *(pos++); p_tlv->length = *(pos++) << 8; p_tlv->length += *(pos++); break; default: d_assert(0, return 0, "Invalid mode(%d)", mode); break; } p_tlv->value = pos; return (pos + tlv_length(p_tlv)); } void _tlv_alloc_buff_to_tlv( tlv_t* head_tlv, c_uint8_t* buff, c_uint32_t buff_len) { head_tlv->buff_allocated = TRUE; head_tlv->buff_len = buff_len; head_tlv->buff_ptr = buff; head_tlv->buff = buff; } tlv_t *tlv_find_root(tlv_t* p_tlv) { tlv_t *head_tlv = p_tlv->head; tlv_t *parentTlv; parentTlv = head_tlv->parent; while(parentTlv) { head_tlv = parentTlv->head; parentTlv = head_tlv->parent; } return head_tlv; } tlv_t *tlv_add(tlv_t *head_tlv, c_uint32_t type, c_uint32_t length, c_uint8_t instance, c_uint8_t *value) { tlv_t* curr_tlv = head_tlv; tlv_t* new_tlv = NULL; new_tlv = tlv_get(); d_assert(new_tlv, return NULL, "can't get tlv node\n"); if(length != 0) { d_assert(value, return NULL, "tlv value is NULL\n"); } new_tlv->type = type; new_tlv->length = length; new_tlv->instance = instance; new_tlv->value = value; if(head_tlv != NULL && head_tlv->buff_allocated == TRUE) { d_assert((head_tlv->buff_ptr - head_tlv->buff + length)< head_tlv->buff_len, tlv_free(new_tlv); return NULL, "overflow in tlv buffer\n"); memcpy(head_tlv->buff_ptr, value, length); new_tlv->value = head_tlv->buff_ptr; head_tlv->buff_ptr += length; } if(curr_tlv == NULL) { new_tlv->head = new_tlv; new_tlv->tail = new_tlv; } else { head_tlv = head_tlv->head; /* in case head_tlv is not head */ new_tlv->head = head_tlv; head_tlv->tail->next = new_tlv; head_tlv->tail = new_tlv; } return new_tlv; } tlv_t *tlv_copy(c_uint8_t *buff, c_uint32_t buff_len, c_uint32_t type, c_uint32_t length, c_uint8_t instance, c_uint8_t *value) { tlv_t* new_tlv = NULL; new_tlv = tlv_get(); d_assert(new_tlv, return NULL, "can't get tlv node\n"); new_tlv->type = type; new_tlv->length = length; new_tlv->instance = instance; new_tlv->value = value; new_tlv->head = new_tlv->tail = new_tlv; _tlv_alloc_buff_to_tlv(new_tlv, buff, buff_len); memcpy(new_tlv->buff_ptr, value, length); new_tlv->value = new_tlv->buff_ptr; new_tlv->buff_ptr += length; return new_tlv; } tlv_t *tlv_embed(tlv_t *parent_tlv, c_uint32_t type, c_uint32_t length, c_uint8_t instance, c_uint8_t *value) { tlv_t* new_tlv = NULL, *root_tlv = NULL; d_assert(parent_tlv, return NULL, "parent tlv is NULL\n"); new_tlv = tlv_get(); d_assert(new_tlv, return NULL, "can't get tlv node\n"); new_tlv->type = type; new_tlv->length = length; new_tlv->instance = instance; new_tlv->value = value; root_tlv = tlv_find_root(parent_tlv); if(root_tlv->buff_allocated == TRUE) { d_assert((root_tlv->buff_ptr - root_tlv->buff + length)buff_len, tlv_free(new_tlv); return NULL, "overflow in tlv buffer\n"); memcpy(root_tlv->buff_ptr, value, length); new_tlv->value = root_tlv->buff_ptr; root_tlv->buff_ptr += length; } if(parent_tlv->embedded == NULL) { parent_tlv->embedded = new_tlv->head = new_tlv->tail = new_tlv; new_tlv->parent = parent_tlv; } else { new_tlv->head = parent_tlv->embedded; parent_tlv->embedded->tail->next = new_tlv; parent_tlv->embedded->tail = new_tlv; } return new_tlv; } c_uint32_t tlv_render(tlv_t *root_tlv, c_uint8_t *blk, c_uint32_t length, c_uint8_t mode) { tlv_t* curr_tlv = root_tlv; c_uint8_t* pos = blk; c_uint32_t embedded_len = 0; while(curr_tlv) { pos = _tlv_put_type(curr_tlv->type, pos, mode); if(curr_tlv->embedded == NULL) { pos = _tlv_put_length(curr_tlv->length, pos, mode); pos = _tlv_put_instance(curr_tlv->instance, pos, mode); if((pos - blk) + tlv_length(curr_tlv) > length) { d_assert(FALSE, ;, "tlv_t encoding error:overflow for given buff length\n"); memcpy((char*)pos, (char*)curr_tlv->value, length - (pos-blk)); pos += length - (pos-blk); return (pos - blk); } memcpy((char*)pos, (char*)curr_tlv->value, curr_tlv->length); pos += curr_tlv->length; } else { embedded_len = tlv_calc_length(curr_tlv->embedded, mode); pos = _tlv_put_length(embedded_len, pos, mode); pos = _tlv_put_instance(curr_tlv->instance, pos, mode); tlv_render(curr_tlv->embedded, pos, length - (c_uint32_t)(pos-blk), mode); pos += embedded_len; } curr_tlv = curr_tlv->next; } return (pos - blk); } /* tlv_t parsing functions */ tlv_t *tlv_parse_block(c_uint32_t length, c_uint8_t *blk, c_uint8_t mode) { c_uint8_t* pos = blk; tlv_t* root_tlv = NULL; tlv_t* prev_tlv = NULL; tlv_t* curr_tlv = NULL; root_tlv = curr_tlv = tlv_get(); d_assert(curr_tlv, return NULL, "can't get tlv node\n"); pos = _tlv_get_element(curr_tlv, pos, mode); d_assert(pos != NULL, tlv_free_all(root_tlv); return NULL, "tlvGetElement Failed\n"); while(pos - blk < length) { prev_tlv = curr_tlv; curr_tlv = tlv_get(); d_assert(curr_tlv, tlv_free_all(root_tlv); return NULL, "can't get tlv node\n"); prev_tlv->next = curr_tlv; pos = _tlv_get_element(curr_tlv, pos, mode); d_assert(pos != NULL, tlv_free_all(root_tlv); return NULL, "tlvGetElement Failed\n"); } d_assert(length == (pos - blk), tlv_free_all(root_tlv); return NULL, "total size is not equal to sum of each tlv. %d %d", length, pos - blk); return root_tlv; } tlv_t *tlv_parse_embedded_block(tlv_t* p_tlv, c_uint8_t mode) { p_tlv->embedded = tlv_parse_block(p_tlv->length, p_tlv->value, mode); return p_tlv->embedded; } /* tlv operation-related function */ tlv_t *tlv_find(tlv_t* p_tlv, c_uint32_t type) { tlv_t *tmp_tlv = p_tlv, *embed_tlv = NULL; while(tmp_tlv) { if(tmp_tlv->type == type) { return tmp_tlv; } if(tmp_tlv->embedded != NULL) { embed_tlv = tlv_find(tmp_tlv->embedded, type); if(embed_tlv != NULL) { return embed_tlv; } } tmp_tlv = tmp_tlv->next; } /* tlv for the designated type doesn't exist */ return NULL; } nextepc-0.3.10/lib/core/src/tlv_msg.c000066400000000000000000000447621333553357400173750ustar00rootroot00000000000000#define TRACE_MODULE _tlv_msg #include "core_debug.h" #include "core_tlv_msg.h" tlv_desc_t tlv_desc_more1 = { TLV_MORE, "More", 0, 1, 0, 0, { NULL } }; tlv_desc_t tlv_desc_more2 = { TLV_MORE, "More", 0, 2, 0, 0, { NULL } }; tlv_desc_t tlv_desc_more3 = { TLV_MORE, "More", 0, 3, 0, 0, { NULL } }; tlv_desc_t tlv_desc_more4 = { TLV_MORE, "More", 0, 4, 0, 0, { NULL } }; tlv_desc_t tlv_desc_more5 = { TLV_MORE, "More", 0, 5, 0, 0, { NULL } }; tlv_desc_t tlv_desc_more6 = { TLV_MORE, "More", 0, 6, 0, 0, { NULL } }; tlv_desc_t tlv_desc_more7 = { TLV_MORE, "More", 0, 7, 0, 0, { NULL } }; tlv_desc_t tlv_desc_more8 = { TLV_MORE, "More", 0, 8, 0, 0, { NULL } }; static tlv_t* _tlv_add_leaf( tlv_t *parent_tlv, tlv_t *tlv, tlv_desc_t *desc, void *msg) { switch (desc->ctype) { case TLV_UINT8: case TLV_INT8: { tlv_uint8_t *v = (tlv_uint8_t *)msg; d_trace2(25, "V_1B:%02x", v->u8); if (parent_tlv) tlv = tlv_embed(parent_tlv, desc->type, 1, desc->instance, (c_uint8_t*)&v->u8); else tlv = tlv_add(tlv, desc->type, 1, desc->instance, (c_uint8_t*)&v->u8); d_assert(tlv, return NULL, "Can't add TLV"); break; } case TLV_UINT16: { tlv_uint16_t *v = (tlv_uint16_t *)msg; d_trace2(25, "V_2B:%04x", v->u16); v->u16 = htons(v->u16); if (parent_tlv) tlv = tlv_embed(parent_tlv, desc->type, 2, desc->instance, (c_uint8_t*)&v->u16); else tlv = tlv_add(tlv, desc->type, 2, desc->instance, (c_uint8_t*)&v->u16); d_assert(tlv, return NULL, "Can't add TLV"); break; } case TLV_UINT24: case TLV_INT24: { tlv_uint24_t *v = (tlv_uint24_t *)msg; d_trace2(25, "V_3B:%06x", v->u24); v->u24 = v->u24 << 8; v->u24 = htonl(v->u24); if (parent_tlv) tlv = tlv_embed(parent_tlv, desc->type, 3, desc->instance, (c_uint8_t*)&v->u24); else tlv = tlv_add(tlv, desc->type, 3, desc->instance, (c_uint8_t*)&v->u24); d_assert(tlv, return NULL, "Can't add TLV"); break; } case TLV_UINT32: case TLV_INT32: { tlv_uint32_t *v = (tlv_uint32_t *)msg; d_trace2(25, "V_4B:%08x", v->u32); v->u32 = htonl(v->u32); if (parent_tlv) tlv = tlv_embed(parent_tlv, desc->type, 4, desc->instance, (c_uint8_t*)&v->u32); else tlv = tlv_add(tlv, desc->type, 4, desc->instance, (c_uint8_t*)&v->u32); d_assert(tlv, return NULL, "Can't add TLV"); break; } case TLV_FIXED_STR: { tlv_octet_t *v = (tlv_octet_t *)msg; d_trace2(25, "V_FSTR: ", v->data); d_trace_hex(25, v->data, v->len); if (parent_tlv) tlv = tlv_embed(parent_tlv, desc->type, desc->length, desc->instance, v->data); else tlv = tlv_add(tlv, desc->type, desc->length, desc->instance, v->data); d_assert(tlv, return NULL, "Can't add TLV"); break; } case TLV_VAR_STR: { tlv_octet_t *v = (tlv_octet_t *)msg; d_assert(v->len > 0, return NULL, "Length is zero"); d_trace2(25, "V_VSTR: ", v->data); d_trace_hex(25, v->data, v->len); if (parent_tlv) tlv = tlv_embed(parent_tlv, desc->type, v->len, desc->instance, v->data); else tlv = tlv_add(tlv, desc->type, v->len, desc->instance, v->data); d_assert(tlv, return NULL, "Can't add TLV"); break; } case TLV_NULL: { d_trace2(25, "V_NULL" ); if (parent_tlv) tlv = tlv_embed(parent_tlv, desc->type, 0, desc->instance, NULL); else tlv = tlv_add(tlv, desc->type, 0, desc->instance, NULL); d_assert(tlv, return NULL, "Can't add TLV"); break; } default: { d_assert(0, return NULL, "Unknown class %d", desc->ctype); break; } } return tlv; } static c_uint32_t _tlv_add_compound(tlv_t **root, tlv_t *parent_tlv, tlv_desc_t *parent_desc, void *msg, int depth) { tlv_presence_t *presence_p; tlv_desc_t *desc = NULL, *next_desc = NULL; tlv_t *tlv = NULL, *emb_tlv = NULL; c_uint8_t *p = msg; c_uint32_t offset = 0, count = 0; int i, j, r; char indent[17] = " "; /* 16 spaces */ d_assert(root, return 0, "Null param"); d_assert(parent_desc, return 0, "Null param"); d_assert(msg, return 0, "Null param"); d_assert(depth <= 8, return 0, "Too deep recursion"); indent[depth*2] = 0; *root = NULL; for (i = 0, desc = parent_desc->child_descs[i]; desc != NULL; i++, desc = parent_desc->child_descs[i]) { next_desc = parent_desc->child_descs[i+1]; if (next_desc != NULL && next_desc->ctype == TLV_MORE) { int offset2 = offset; for (j = 0; j < next_desc->length; j++) { presence_p = (tlv_presence_t *)(p + offset2); if (*presence_p == 0) break; if (desc->ctype == TLV_COMPOUND) { d_trace2(25, "\nBUILD %sC#%d [%s] T:%d I:%d (vsz=%d) off:%p ", indent, i, desc->name, desc->type, desc->instance, desc->vsize, p + offset2); if (parent_tlv) tlv = tlv_embed(parent_tlv, desc->type, 0, desc->instance, NULL); else tlv = tlv_add(tlv, desc->type, 0, desc->instance, NULL); r = _tlv_add_compound(&emb_tlv, tlv, desc, p + offset2 + sizeof(tlv_presence_t), depth + 1); d_assert(r > 0 && emb_tlv, return 0, "Can't build compound TLV"); count += 1 + r; } else { d_trace2(25, "\nBUILD %sL#%d [%s] T:%d L:%d I:%d " "(cls:%d vsz:%d) off:%p ", indent, i, desc->name, desc->type, desc->length, desc->instance, desc->ctype, desc->vsize, p + offset2); tlv = _tlv_add_leaf(parent_tlv, tlv, desc, p + offset2); d_assert(tlv, return 0, "Can't build leaf TLV"); count++; } if (*root == NULL) *root = tlv; offset2 += desc->vsize; } offset += desc->vsize * next_desc->length; i++; } else { presence_p = (tlv_presence_t *)(p + offset); if (*presence_p) { if (desc->ctype == TLV_COMPOUND) { d_trace2(25, "\nBUILD %sC#%d [%s] T:%d I:%d (vsz=%d) off:%p ", indent, i, desc->name, desc->type, desc->instance, desc->vsize, p + offset); if (parent_tlv) tlv = tlv_embed(parent_tlv, desc->type, 0, desc->instance, NULL); else tlv = tlv_add(tlv, desc->type, 0, desc->instance, NULL); r = _tlv_add_compound(&emb_tlv, tlv, desc, p + offset + sizeof(tlv_presence_t), depth + 1); d_assert(r > 0 && emb_tlv, return 0, "Can't build compound TLV"); count += 1 + r; } else { d_trace2(25, "\nBUILD %sL#%d [%s] T:%d L:%d I:%d " "(cls:%d vsz:%d) off:%p ", indent, i, desc->name, desc->type, desc->length, desc->instance, desc->ctype, desc->vsize, p + offset); tlv = _tlv_add_leaf(parent_tlv, tlv, desc, p + offset); d_assert(tlv, return 0, "Can't build leaf TLV"); count++; } if (*root == NULL) *root = tlv; } offset += desc->vsize; } } return count; } status_t tlv_build_msg(pkbuf_t **pkbuf, tlv_desc_t *desc, void *msg, int mode) { tlv_t *root = NULL; c_uint32_t r, length, rendlen; d_assert(pkbuf, return CORE_ERROR, "Null param"); d_assert(desc, return CORE_ERROR, "Null param"); d_assert(msg, return CORE_ERROR, "Null param"); d_assert(desc->ctype == TLV_MESSAGE, return CORE_ERROR, "Not TLV message descriptor"); d_assert(desc->child_descs[0], return CORE_ERROR, "TLV message descriptor has no members"); d_trace2(25, "\n"); d_trace2(25, "[GTP] Build %s\n", desc->name); r = _tlv_add_compound(&root, NULL, desc, msg, 0); d_assert(r > 0 && root, tlv_free_all(root); return CORE_ERROR, "Can't build TLV message"); length = tlv_calc_length(root, mode); *pkbuf = pkbuf_alloc(TLV_MAX_HEADROOM, length); d_assert(*pkbuf, tlv_free_all(root); return CORE_ENOMEM, "pkbuf_alloc() failed"); (*pkbuf)->len = length; rendlen = tlv_render(root, (*pkbuf)->payload, length, mode); d_assert(rendlen == length, pkbuf_free(*pkbuf); tlv_free_all(root); return CORE_ERROR, "Error while render TLV (%d != %d)", length, rendlen); tlv_free_all(root); return CORE_OK; } static tlv_desc_t* _tlv_find_desc(c_uint8_t *desc_index, c_uint32_t *tlv_offset, tlv_desc_t *parent_desc, tlv_t *tlv) { tlv_desc_t *prev_desc = NULL, *desc = NULL; int i, offset = 0; d_assert(parent_desc, return NULL, "Null param"); d_assert(tlv, return NULL, "Null param"); d_trace2(25, "_tlv_find_desc:T(%d), I(%d) - ", tlv->type, tlv->instance); for (i = 0, desc = parent_desc->child_descs[i]; desc != NULL; i++, desc = parent_desc->child_descs[i]) { d_trace2(25, "%d, ", desc->type); if (desc->type == tlv->type && desc->instance == tlv->instance) { *desc_index = i; *tlv_offset = offset; break; } if (desc->ctype == TLV_MORE) { d_assert(prev_desc && prev_desc->ctype != TLV_MORE, return NULL, "Invalid previous tlv_desc_t"); offset += prev_desc->vsize * (desc->length - 1); } else { offset += desc->vsize; } prev_desc = desc; } d_trace2(25, "\n"); return desc; } static status_t _tlv_parse_leaf(void *msg, tlv_desc_t *desc, tlv_t *tlv) { d_assert(msg, return CORE_ERROR, "Null param"); d_assert(desc, return CORE_ERROR, "Null param"); d_assert(tlv, return CORE_ERROR, "Null param"); switch (desc->ctype) { case TLV_UINT8: case TLV_INT8: { tlv_uint8_t *v = (tlv_uint8_t *)msg; if (tlv->length != 1) { d_error("Invalid TLV length %d. It should be 1", tlv->length); return CORE_ERROR; } v->u8 = *(c_uint8_t*)(tlv->value); d_trace2(25, "V_1B:%02x", v->u8); break; } case TLV_UINT16: case TLV_INT16: { tlv_uint16_t *v = (tlv_uint16_t *)msg; if (tlv->length != 2) { d_error("Invalid TLV length %d. It should be 2", tlv->length); return CORE_ERROR; } v->u16 = ((((c_uint8_t*)tlv->value)[0]<< 8)&0xff00) | ((((c_uint8_t*)tlv->value)[1] )&0x00ff); d_trace2(25, "V_2B:%02x", v->u16); break; } case TLV_UINT24: case TLV_INT24: { tlv_uint24_t *v = (tlv_uint24_t *)msg; if (tlv->length != 3) { d_error("Invalid TLV length %d. It should be 3", tlv->length); return CORE_ERROR; } v->u24 = ((((c_uint8_t*)tlv->value)[0]<<16)&0x00ff0000) | ((((c_uint8_t*)tlv->value)[1]<< 8)&0x0000ff00) | ((((c_uint8_t*)tlv->value)[2] )&0x000000ff); d_trace2(25, "V_3B:%06x", v->u24); break; } case TLV_UINT32: case TLV_INT32: { tlv_uint32_t *v = (tlv_uint32_t *)msg; if (tlv->length != 4) { d_error("Invalid TLV length %d. It should be 4", tlv->length); return CORE_ERROR; } v->u32 = ((((c_uint8_t*)tlv->value)[0]<<24)&0xff000000) | ((((c_uint8_t*)tlv->value)[1]<<16)&0x00ff0000) | ((((c_uint8_t*)tlv->value)[2]<< 8)&0x0000ff00) | ((((c_uint8_t*)tlv->value)[3] )&0x000000ff); d_trace2(25, "V_4B:%08x", v->u32); break; } case TLV_FIXED_STR: { tlv_octet_t *v = (tlv_octet_t *)msg; if (tlv->length != desc->length) { d_error("Invalid TLV length %d. It should be %d", tlv->length, desc->length); return CORE_ERROR; } v->data = tlv->value; v->len = tlv->length; d_trace2(25, "V_FSTR: ", v->data); d_trace_hex(25, v->data, v->len); break; } case TLV_VAR_STR: { tlv_octet_t *v = (tlv_octet_t *)msg; v->data = tlv->value; v->len = tlv->length; d_trace2(25, "V_VSTR: ", v->data); d_trace_hex(25, v->data, v->len); break; } case TLV_NULL: { if (tlv->length != 0) { d_error("Invalid TLV length %d. It should be 0", tlv->length); return CORE_ERROR; } break; } default: d_assert(0, return CORE_ERROR, "Unknown TLV class"); break; } return CORE_OK; } static status_t _tlv_parse_compound(void *msg, tlv_desc_t *parent_desc, tlv_t *parent_tlv, int depth, int mode) { status_t rv; tlv_presence_t *presence_p = (tlv_presence_t *)msg; tlv_desc_t *desc = NULL, *next_desc = NULL; tlv_t *tlv = NULL, *emb_tlv = NULL; c_uint8_t *p = msg; c_uint32_t offset = 0; c_uint8_t index = 0; int i = 0, j; char indent[17] = " "; /* 16 spaces */ d_assert(msg, return CORE_ERROR, "Null param"); d_assert(parent_desc, return CORE_ERROR, "Null param"); d_assert(parent_tlv, return CORE_ERROR, "Null param"); d_assert(depth <= 8, return 0, "Too deep recursion"); indent[depth*2] = 0; tlv = parent_tlv; while(tlv) { desc = _tlv_find_desc(&index, &offset, parent_desc, tlv); if (desc == NULL) { d_error("Unexpected TLV type:%d", tlv->type); return CORE_ERROR; } presence_p = (tlv_presence_t *)(p + offset); /* Multiple of the same type TLV may be included */ next_desc = parent_desc->child_descs[index+1]; if (next_desc != NULL && next_desc->ctype == TLV_MORE) { for (j = 0; j < next_desc->length; j++) { presence_p = (tlv_presence_t *)(p + offset + desc->vsize * j); if (*presence_p == 0) { offset += desc->vsize * j; break; } } if (j == next_desc->length) { d_fatal("Multiple of the same type TLV need more room"); tlv = tlv->next; continue; } } if (desc->ctype == TLV_COMPOUND) { emb_tlv = tlv_parse_embedded_block(tlv, mode); if (emb_tlv == NULL) { d_error("Error while parse TLV"); return CORE_ERROR; } d_trace2(25, "\nPARSE %sC#%d [%s] T:%d I:%d (vsz=%d) off:%p ", indent, i++, desc->name, desc->type, desc->instance, desc->vsize, p + offset); offset += sizeof(tlv_presence_t); rv = _tlv_parse_compound( p + offset, desc, emb_tlv, depth + 1, mode); if (rv != CORE_OK) { d_error("Can't parse compound TLV"); return CORE_ERROR; } *presence_p = 1; } else { d_trace2(25, "\nPARSE %sL#%d [%s] T:%d L:%d I:%d " "(cls:%d vsz:%d) off:%p ", indent, i++, desc->name, desc->type, desc->length, desc->instance, desc->ctype, desc->vsize, p + offset); rv = _tlv_parse_leaf(p + offset, desc, tlv); if (rv != CORE_OK) { d_error("Can't parse leaf TLV"); return CORE_ERROR; } *presence_p = 1; } tlv = tlv->next; } d_trace2(25, "\n"); return CORE_OK; } status_t tlv_parse_msg(void *msg, tlv_desc_t *desc, pkbuf_t *pkbuf, int mode) { status_t rv; tlv_t *root; d_assert(msg, return CORE_ERROR, "Null param"); d_assert(desc, return CORE_ERROR, "Null param"); d_assert(pkbuf, return CORE_ERROR, "Null param"); d_assert(desc->ctype == TLV_MESSAGE, return CORE_ERROR, "Not TLV message descriptor"); d_assert(desc->child_descs[0], return CORE_ERROR, "TLV message descriptor has no members"); d_trace2(25, "\n"); d_trace2(25, "[GTP] Parse %s\n", desc->name); root = tlv_parse_block(pkbuf->len, pkbuf->payload, mode); if (root == NULL) { d_error("Can't parse TLV message"); return CORE_ERROR; } rv = _tlv_parse_compound(msg, desc, root, 0, mode); tlv_free_all(root); return rv; } nextepc-0.3.10/lib/core/src/unix/000077500000000000000000000000001333553357400165245ustar00rootroot00000000000000nextepc-0.3.10/lib/core/src/unix/atomic.c000066400000000000000000000103321333553357400201430ustar00rootroot00000000000000#define TRACE_MODULE _atomic #include "core_atomic.h" #include "core_mutex.h" #include "core_debug.h" #if HAVE_ATOMIC_BUILTINS == 1 status_t atomic_init() { return CORE_OK; } status_t atomic_final() { return CORE_OK; } c_uint32_t atomic_read32(volatile c_uint32_t *mem) { return *mem; } void atomic_set32(volatile c_uint32_t *mem, c_uint32_t val) { *mem = val; } c_uint32_t atomic_add32(volatile c_uint32_t *mem, c_uint32_t val) { return __sync_fetch_and_add(mem, val); } void atomic_sub32(volatile c_uint32_t *mem, c_uint32_t val) { __sync_fetch_and_sub(mem, val); } c_uint32_t atomic_inc32(volatile c_uint32_t *mem) { return __sync_fetch_and_add(mem, 1); } int atomic_dec32(volatile c_uint32_t *mem) { return __sync_sub_and_fetch(mem, 1); } c_uint32_t atomic_cas32(volatile c_uint32_t *mem, c_uint32_t with, c_uint32_t cmp) { return __sync_val_compare_and_swap(mem, cmp, with); } c_uint32_t atomic_xchg32(volatile c_uint32_t *mem, c_uint32_t val) { __sync_synchronize(); return __sync_lock_test_and_set(mem, val); } void* atomic_casptr(void *volatile *mem, void *with, const void *cmp) { return (void*) __sync_val_compare_and_swap(mem, (void *)cmp, with); } void* atomic_xchgptr(void *volatile *mem, void *with) { __sync_synchronize(); return (void*) __sync_lock_test_and_set(mem, with); } #else #define DECLARE_MUTEX_LOCKED(name, mem) \ mutex_id name = mutex_hash(mem) #define MUTEX_UNLOCK(name) \ d_assert(mutex_unlock(name) == CORE_OK,,); #define NUM_ATOMIC_HASH 7 static mutex_id hash_mutex[NUM_ATOMIC_HASH]; /* shift by 2 to get rid of alignment issues */ #define ATOMIC_HASH(x) (unsigned int)(((unsigned long)(x)>>2)%(unsigned int)NUM_ATOMIC_HASH) status_t atomic_init() { int i; status_t rv; for (i = 0; i < NUM_ATOMIC_HASH; i++) { rv = mutex_create(&hash_mutex[i], MUTEX_DEFAULT); if (rv != CORE_OK) { return rv; } } return CORE_OK; } status_t atomic_final() { status_t rv; int i; for (i = 0; i < NUM_ATOMIC_HASH; i++) { rv = mutex_delete(hash_mutex[i]); if (rv != CORE_OK) { return rv; } } return CORE_OK; } static CORE_INLINE mutex_id mutex_hash(volatile c_uint32_t *mem) { mutex_id id = hash_mutex[ATOMIC_HASH(mem)]; d_assert(mutex_lock(id) == CORE_OK, return (mutex_id)NULL,); return id; } c_uint32_t atomic_read32(volatile c_uint32_t *mem) { return *mem; } void atomic_set32(volatile c_uint32_t *mem, c_uint32_t val) { DECLARE_MUTEX_LOCKED(mutex, mem); *mem = val; MUTEX_UNLOCK(mutex); } c_uint32_t atomic_add32(volatile c_uint32_t *mem, c_uint32_t val) { c_uint32_t old_value; DECLARE_MUTEX_LOCKED(mutex, mem); old_value = *mem; *mem += val; MUTEX_UNLOCK(mutex); return old_value; } void atomic_sub32(volatile c_uint32_t *mem, c_uint32_t val) { DECLARE_MUTEX_LOCKED(mutex, mem); *mem -= val; MUTEX_UNLOCK(mutex); } c_uint32_t atomic_inc32(volatile c_uint32_t *mem) { return atomic_add32(mem, 1); } int atomic_dec32(volatile c_uint32_t *mem) { c_uint32_t new; DECLARE_MUTEX_LOCKED(mutex, mem); (*mem)--; new = *mem; MUTEX_UNLOCK(mutex); return new; } c_uint32_t atomic_cas32(volatile c_uint32_t *mem, c_uint32_t with, c_uint32_t cmp) { c_uint32_t prev; DECLARE_MUTEX_LOCKED(mutex, mem); prev = *mem; if (prev == cmp) { *mem = with; } MUTEX_UNLOCK(mutex); return prev; } c_uint32_t atomic_xchg32(volatile c_uint32_t *mem, c_uint32_t val) { c_uint32_t prev; DECLARE_MUTEX_LOCKED(mutex, mem); prev = *mem; *mem = val; MUTEX_UNLOCK(mutex); return prev; } void* atomic_casptr(void *volatile *mem, void *with, const void *cmp) { void *prev; DECLARE_MUTEX_LOCKED(mutex, *mem); prev = *(void **)mem; if (prev == cmp) { *mem = with; } MUTEX_UNLOCK(mutex); return prev; } void* atomic_xchgptr(void *volatile *mem, void *with) { void *prev; DECLARE_MUTEX_LOCKED(mutex, *mem); prev = *(void **)mem; *mem = with; MUTEX_UNLOCK(mutex); return prev; } #endif nextepc-0.3.10/lib/core/src/unix/cond.c000066400000000000000000000037461333553357400176250ustar00rootroot00000000000000#include "core.h" #include "core_cond.h" #include "core_arch_mutex.h" #include "core_pool.h" #include "core_param.h" #include "core_general.h" #include "core_debug.h" typedef struct _cond_t { pthread_cond_t cond; } cond_t; pool_declare(cond_pool, cond_t, MAX_NUM_OF_COND); status_t cond_init(void) { pool_init(&cond_pool, MAX_NUM_OF_COND); return CORE_OK; } status_t cond_final(void) { pool_final(&cond_pool); return CORE_OK; } status_t cond_create(cond_id *id) { cond_t *new_cond = NULL; status_t rv; pool_alloc_node(&cond_pool, &new_cond); d_assert(new_cond, return CORE_ENOMEM, "cond_pool(%d) is not enough\n", MAX_NUM_OF_COND); if ((rv = pthread_cond_init(&new_cond->cond, NULL))) { return rv; } *id = (cond_id)new_cond; return CORE_OK; } status_t cond_wait(cond_id id, mutex_id mid) { status_t rv; cond_t *cond = (cond_t *)id; mutex_t *mutex = (mutex_t *)mid; rv = pthread_cond_wait(&cond->cond, &mutex->mutex); return rv; } status_t cond_timedwait(cond_id id, mutex_id mid, c_time_t timeout) { status_t rv; c_time_t then; struct timespec abstime; cond_t *cond = (cond_t *)id; mutex_t *mutex = (mutex_t *)mid; then = time_now() + timeout; abstime.tv_sec = time_sec(then); abstime.tv_nsec = time_usec(then) * 1000; /* nanoseconds */ rv = pthread_cond_timedwait(&cond->cond, &mutex->mutex, &abstime); if (ETIMEDOUT == rv) { return CORE_TIMEUP; } return rv; } status_t cond_signal(cond_id id) { status_t rv; cond_t *cond = (cond_t *)id; rv = pthread_cond_signal(&cond->cond); return rv; } status_t cond_broadcast(cond_id id) { status_t rv; cond_t *cond = (cond_t *)id; rv = pthread_cond_broadcast(&cond->cond); return rv; } status_t cond_delete(cond_id id) { status_t rv; cond_t *cond = (cond_t *)id; rv = pthread_cond_destroy(&cond->cond); pool_free_node(&cond_pool, cond); return rv; } nextepc-0.3.10/lib/core/src/unix/errorcodes.c000066400000000000000000000333311333553357400210420ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "core.h" #include "core_lib.h" #include "core_arch_network.h" static char *stuffbuffer(char *buf, size_t bufsize, const char *s) { strncpy(buf,s,bufsize); return buf; } static char *core_error_string(status_t statcode) { switch (statcode) { case CORE_ENOPOOL: return "A new pool could not be created."; case CORE_EBADDATE: return "An invalid date has been provided"; case CORE_EINVALSOCK: return "An invalid socket was returned"; case CORE_ENOPROC: return "No process was provided and one was required."; case CORE_ENOTIME: return "No time was provided and one was required."; case CORE_ENODIR: return "No directory was provided and one was required."; case CORE_ENOLOCK: return "No lock was provided and one was required."; case CORE_ENOPOLL: return "No poll structure was provided and one was required."; case CORE_ENOSOCKET: return "No socket was provided and one was required."; case CORE_ENOTHREAD: return "No thread was provided and one was required."; case CORE_ENOTHDKEY: return "No thread key structure was provided and one was required."; case CORE_ENOSHMAVAIL: return "No shared memory is currently available"; case CORE_EDSOOPEN: return "DSO load failed"; case CORE_EBADIP: return "The specified IP address is invalid."; case CORE_EBADMASK: return "The specified network mask is invalid."; case CORE_INCHILD: return "Your code just forked, and you are currently executing in the " "child process"; case CORE_INPARENT: return "Your code just forked, and you are currently executing in the " "parent process"; case CORE_DETACH: return "The specified thread is detached"; case CORE_NOTDETACH: return "The specified thread is not detached"; case CORE_CHILD_DONE: return "The specified child process is done executing"; case CORE_CHILD_NOTDONE: return "The specified child process is not done executing"; case CORE_TIMEUP: return "The timeout specified has expired"; case CORE_INCOMPLETE: return "Partial results are valid but processing is incomplete"; case CORE_BADCH: return "Bad character specified on command line"; case CORE_BADARG: return "Missing parameter for the specified command line option"; case CORE_EOF: return "End of file found"; case CORE_NOTFOUND: return "Could not find specified socket in poll list."; case CORE_ANONYMOUS: return "Shared memory is implemented anonymously"; case CORE_FILEBASED: return "Shared memory is implemented using files"; case CORE_KEYBASED: return "Shared memory is implemented using a key system"; case CORE_EINIT: return "There is no error, this value signifies an initialized " "error code"; case CORE_ENOTIMPL: return "This function has not been implemented on this platform"; case CORE_EMISMATCH: return "passwords do not match"; case CORE_EABSOLUTE: return "The given path is absolute"; case CORE_ERELATIVE: return "The given path is relative"; case CORE_EINCOMPLETE: return "The given path is incomplete"; case CORE_EABOVEROOT: return "The given path was above the root path"; case CORE_EBADPATH: return "The given path is misformatted or contained invalid characters"; case CORE_EPATHWILD: return "The given path contained wildcard characters"; case CORE_EPROC_UNKNOWN: return "The process is not recognized."; case CORE_EGENERAL: return "Internal error"; default: return "Error string not specified yet"; } } #ifdef OS2 #include int core_canonical_error(status_t err); static char *core_os_strerror(char* buf, size_t bufsize, int err) { char result[200]; unsigned char message[HUGE_STRING_LEN]; ULONG len; char *pos; int c; if (err >= 10000 && err < 12000) { /* socket error codes */ return stuffbuffer(buf, bufsize, strerror(core_canonical_error(err+OS_START_SYSERR))); } else if (DosGetMessage(NULL, 0, message, HUGE_STRING_LEN, err, "OSO001.MSG", &len) == 0) { len--; message[len] = 0; pos = result; if (len >= sizeof(result)) len = sizeof(result) - 1; for (c=0; c= 0) { buf[i] = (char) msg[i]; } else { buf[i] = '?'; } } #endif #endif if (!len) { for (i = 0; gaErrorList[i].msg; ++i) { if (gaErrorList[i].code == errcode) { core_cpystrn(buf, gaErrorList[i].msg, bufsize); len = strlen(buf); break; } } } if (len) { /* FormatMessage put the message in the buffer, but it may * have embedded a newline (\r\n), and possible more than one. * Remove the newlines replacing them with a space. This is not * as visually perfect as moving all the remaining message over, * but more efficient. */ i = len; while (i) { i--; if ((buf[i] == '\r') || (buf[i] == '\n')) buf[i] = ' '; } } else { /* Windows didn't provide us with a message. Even stuff like * WSAECONNREFUSED won't get a message. */ core_snprintf(buf, bufsize, "Unrecognized Win32 error code %d", errcode); } return buf; } #else /* On Unix, core_os_strerror() handles error codes from the resolver * (h_errno). */ static char *core_os_strerror(char* buf, size_t bufsize, int err) { #ifdef HAVE_HSTRERROR return stuffbuffer(buf, bufsize, hstrerror(err)); #else /* HAVE_HSTRERROR */ const char *msg; switch(err) { case HOST_NOT_FOUND: msg = "Unknown host"; break; #if defined(NO_DATA) case NO_DATA: #if defined(NO_ADDRESS) && (NO_DATA != NO_ADDRESS) case NO_ADDRESS: #endif msg = "No address for host"; break; #elif defined(NO_ADDRESS) case NO_ADDRESS: msg = "No address for host"; break; #endif /* NO_DATA */ default: msg = "Unrecognized resolver error"; } return stuffbuffer(buf, bufsize, msg); #endif /* HAVE_STRERROR */ } #endif #if defined(HAVE_STRERROR_R) && defined(STRERROR_R_RC_INT) && !defined(BEOS) /* AIX and Tru64 style */ static char *native_strerror(status_t statcode, char *buf, size_t bufsize) { if (strerror_r(statcode, buf, bufsize) < 0) { return stuffbuffer(buf, bufsize, "CORE does not understand this error code"); } else { return buf; } } #elif defined(HAVE_STRERROR_R) /* glibc style */ /* BeOS has the function available, but it doesn't provide * the prototype publically (doh!), so to avoid a build warning * we add a suitable prototype here. */ #if defined(BEOS) const char *strerror_r(status_t, char *, size_t); #endif static char *native_strerror(status_t statcode, char *buf, size_t bufsize) { const char *msg; buf[0] = '\0'; msg = strerror_r(statcode, buf, bufsize); if (buf[0] == '\0') { /* libc didn't use our buffer */ return stuffbuffer(buf, bufsize, msg); } else { return buf; } } #else /* plain old strerror(); * thread-safe on some platforms (e.g., Solaris, OS/390) */ static char *native_strerror(status_t statcode, char *buf, size_t bufsize) { #ifdef _WIN32_WCE static char err[32]; sprintf(err, "Native Error #%d", statcode); return stuffbuffer(buf, bufsize, err); #else const char *err = strerror(statcode); if (err) { return stuffbuffer(buf, bufsize, err); } else { return stuffbuffer(buf, bufsize, "CORE does not understand this error code"); } #endif } #endif char * core_strerror(status_t statcode, char *buf, size_t bufsize) { if (statcode < OS_START_ERROR) { return native_strerror(statcode, buf, bufsize); } else if (statcode < OS_START_USERERR) { return stuffbuffer(buf, bufsize, core_error_string(statcode)); } else if (statcode < OS_START_EAIERR) { return stuffbuffer(buf, bufsize, "CORE does not understand this error code"); } else if (statcode < OS_START_SYSERR) { #if defined(HAVE_GAI_STRERROR) statcode -= OS_START_EAIERR; #if defined(NEGATIVE_EAI) statcode = -statcode; #endif return stuffbuffer(buf, bufsize, gai_strerror(statcode)); #else return stuffbuffer(buf, bufsize, "CORE does not understand this error code"); #endif } else { return core_os_strerror(buf, bufsize, statcode - OS_START_SYSERR); } } nextepc-0.3.10/lib/core/src/unix/file.c000066400000000000000000000615101333553357400176120ustar00rootroot00000000000000#include "core_arch_file.h" #include "core.h" #include "core_errno.h" #include "core_general.h" #include "core_debug.h" #include "core_pool.h" pool_declare(file_pool, file_t, MAX_NUM_OF_FILE); status_t file_init(void) { pool_init(&file_pool, MAX_NUM_OF_FILE); return CORE_OK; } status_t file_final(void) { pool_final(&file_pool); return CORE_OK; } #if !defined(OS2) && !defined(WIN32) mode_t unix_perms2mode(file_perms_t perms) { mode_t mode = 0; if (perms & FILE_USETID) mode |= S_ISUID; if (perms & FILE_UREAD) mode |= S_IRUSR; if (perms & FILE_UWRITE) mode |= S_IWUSR; if (perms & FILE_UEXECUTE) mode |= S_IXUSR; if (perms & FILE_GSETID) mode |= S_ISGID; if (perms & FILE_GREAD) mode |= S_IRGRP; if (perms & FILE_GWRITE) mode |= S_IWGRP; if (perms & FILE_GEXECUTE) mode |= S_IXGRP; #ifdef S_ISVTX if (perms & FILE_WSTICKY) mode |= S_ISVTX; #endif if (perms & FILE_WREAD) mode |= S_IROTH; if (perms & FILE_WWRITE) mode |= S_IWOTH; if (perms & FILE_WEXECUTE) mode |= S_IXOTH; return mode; } file_perms_t unix_mode2perms(mode_t mode) { file_perms_t perms = 0; if (mode & S_ISUID) perms |= FILE_USETID; if (mode & S_IRUSR) perms |= FILE_UREAD; if (mode & S_IWUSR) perms |= FILE_UWRITE; if (mode & S_IXUSR) perms |= FILE_UEXECUTE; if (mode & S_ISGID) perms |= FILE_GSETID; if (mode & S_IRGRP) perms |= FILE_GREAD; if (mode & S_IWGRP) perms |= FILE_GWRITE; if (mode & S_IXGRP) perms |= FILE_GEXECUTE; #ifdef S_ISVTX if (mode & S_ISVTX) perms |= FILE_WSTICKY; #endif if (mode & S_IROTH) perms |= FILE_WREAD; if (mode & S_IWOTH) perms |= FILE_WWRITE; if (mode & S_IXOTH) perms |= FILE_WEXECUTE; return perms; } #endif status_t file_open(file_t **new, const char *fname, c_int32_t flag, file_perms_t perm) { os_file_t fd; int oflags = 0; d_assert(fname, return CORE_ERROR,); if ((flag & FILE_READ) && (flag & FILE_WRITE)) { oflags = O_RDWR; } else if (flag & FILE_READ) { oflags = O_RDONLY; } else if (flag & FILE_WRITE) { oflags = O_WRONLY; } else { return CORE_EACCES; } if (flag & FILE_CREATE) { oflags |= O_CREAT; if (flag & FILE_EXCL) { oflags |= O_EXCL; } } if ((flag & FILE_EXCL) && !(flag & FILE_CREATE)) { return CORE_EACCES; } if (flag & FILE_APPEND) { oflags |= O_APPEND; } if (flag & FILE_TRUNCATE) { oflags |= O_TRUNC; } #ifdef O_BINARY if (flag & FILE_BINARY) { oflags |= O_BINARY; } #endif if (perm == FILE_OS_DEFAULT) { fd = open(fname, oflags, 0666); } else { fd = open(fname, oflags, unix_perms2mode(perm)); } if (fd < 0) { return errno; } pool_alloc_node(&file_pool, &(*new)); d_assert((*new), return CORE_ENOMEM, "file_pool(%d) is not enough\n", MAX_NUM_OF_FILE); (*new)->flags = flag; (*new)->filedes = fd; strcpy((*new)->fname, fname); (*new)->timeout = -1; (*new)->eof_hit = 0; (*new)->filePtr = 0; return CORE_OK; } status_t file_close(file_t *file) { status_t rv = CORE_OK; d_assert(file, return CORE_ERROR,); if (close(file->filedes) == 0) { file->filedes = -1; /* Only the parent process should delete the file! */ if (file->flags & FILE_DELONCLOSE) { unlink(file->fname); } } else { /* Are there any error conditions other than EINTR or EBADF? */ rv = errno; } pool_free_node(&file_pool, file); return rv; } status_t file_remove(const char *path) { d_assert(path, return CORE_ERROR,); if (unlink(path) == 0) { return CORE_OK; } else { return errno; } } static status_t file_transfer_contents( const char *from_path, const char *to_path, c_int32_t flags, file_perms_t to_perms) { file_t *s, *d; status_t status; file_info_t finfo; file_perms_t perms; d_assert(from_path, return CORE_ERROR,); d_assert(to_path, return CORE_ERROR,); /* Open source file. */ status = file_open(&s, from_path, FILE_READ, FILE_OS_DEFAULT); if (status) return status; /* Maybe get its permissions. */ if (to_perms == FILE_SOURCE_PERMS) { status = file_info_get(&finfo, FILE_INFO_PROT, s); if (status != CORE_OK && status != CORE_INCOMPLETE) { file_close(s); /* toss any error */ return status; } perms = finfo.protection; } else perms = to_perms; /* Open dest file. */ status = file_open(&d, to_path, flags, perms); if (status) { file_close(s); /* toss any error */ return status; } #if BUFSIZ > FILE_DEFAULT_BUFSIZE #define COPY_BUFSIZ BUFSIZ #else #define COPY_BUFSIZ FILE_DEFAULT_BUFSIZE #endif /* Copy bytes till the cows come home. */ while (1) { char buf[COPY_BUFSIZ]; size_t bytes_this_time = sizeof(buf); status_t read_err; status_t write_err; /* Read 'em. */ read_err = file_read(s, buf, &bytes_this_time); if (read_err && !STATUS_IS_EOF(read_err)) { file_close(s); /* toss any error */ file_close(d); /* toss any error */ return read_err; } /* Write 'em. */ write_err = file_write_full(d, buf, bytes_this_time, NULL); if (write_err) { file_close(s); /* toss any error */ file_close(d); /* toss any error */ return write_err; } if (read_err && STATUS_IS_EOF(read_err)) { status = file_close(s); if (status) { file_close(d); /* toss any error */ return status; } /* return the results of this close: an error, or success */ return file_close(d); } } /* NOTREACHED */ } status_t file_rename(const char *from_path, const char *to_path) { d_assert(from_path, return CORE_ERROR,); d_assert(to_path, return CORE_ERROR,); if (rename(from_path, to_path) != 0) { return errno; } return CORE_OK; } status_t file_link(const char *from_path, const char *to_path) { d_assert(from_path, return CORE_ERROR,); d_assert(to_path, return CORE_ERROR,); if (link(from_path, to_path) == -1) { return errno; } return CORE_OK; } status_t file_copy( const char *from_path, const char *to_path, file_perms_t perms) { return file_transfer_contents(from_path, to_path, (FILE_WRITE | FILE_CREATE | FILE_TRUNCATE), perms); } status_t file_append( const char *from_path, const char *to_path, file_perms_t perms) { return file_transfer_contents(from_path, to_path, (FILE_WRITE | FILE_CREATE | FILE_APPEND), perms); } status_t file_eof(file_t *fptr) { d_assert(fptr, return CORE_ERROR,); if (fptr->eof_hit == 1) { return CORE_EOF; } return CORE_OK; } status_t file_read(file_t *thefile, void *buf, size_t *nbytes) { ssize_t rv; size_t bytes_read; d_assert(thefile, return CORE_ERROR,); d_assert(nbytes, return CORE_ERROR,); if (*nbytes <= 0) { *nbytes = 0; return CORE_OK; } bytes_read = 0; do { rv = read(thefile->filedes, buf, *nbytes); } while (rv == -1 && errno == EINTR); *nbytes = bytes_read; if (rv == 0) { thefile->eof_hit = TRUE; return CORE_EOF; } if (rv > 0) { *nbytes += rv; return CORE_OK; } return errno; } status_t file_write( file_t *thefile, const void *buf, size_t *nbytes) { size_t rv; d_assert(thefile, return CORE_ERROR,); d_assert(buf, return CORE_ERROR,); d_assert(nbytes, return CORE_ERROR,); do { rv = write(thefile->filedes, buf, *nbytes); } while (rv == (size_t)-1 && errno == EINTR); if (rv == (size_t)-1) { (*nbytes) = 0; return errno; } *nbytes = rv; return CORE_OK; } status_t file_writev(file_t *thefile, const struct iovec *vec, size_t nvec, size_t *nbytes) { #ifdef HAVE_WRITEV status_t rv; ssize_t bytes; d_assert(thefile, return CORE_ERROR,); d_assert(vec, return CORE_ERROR,); d_assert(nvec, return CORE_ERROR,); d_assert(nbytes, return CORE_ERROR,); if ((bytes = writev(thefile->filedes, vec, nvec)) < 0) { *nbytes = 0; rv = errno; } else { *nbytes = bytes; rv = CORE_OK; } return rv; #else /** * The problem with trying to output the entire iovec is that we cannot * maintain the behaviour that a real writev would have. If we iterate * over the iovec one at a time, we lose the atomic properties of * writev(). The other option is to combine the entire iovec into one * buffer that we could then send in one call to write(). This is not * reasonable since we do not know how much data an iovec could contain. * * The only reasonable option, that maintains the semantics of a real * writev(), is to only write the first iovec. Callers of file_writev() * must deal with partial writes as they normally would. If you want to * ensure an entire iovec is written, use file_writev_full(). */ *nbytes = vec[0].iov_len; return file_write(thefile, vec[0].iov_base, nbytes); #endif } status_t file_read_full(file_t *thefile, void *buf, size_t nbytes, size_t *bytes_read) { status_t status; size_t total_read = 0; d_assert(thefile, return CORE_ERROR,); d_assert(buf, return CORE_ERROR,); do { size_t amt = nbytes; status = file_read(thefile, buf, &amt); buf = (char *)buf + amt; nbytes -= amt; total_read += amt; } while (status == CORE_OK && nbytes > 0); if (bytes_read != NULL) *bytes_read = total_read; return status; } status_t file_write_full(file_t *thefile, const void *buf, size_t nbytes, size_t *bytes_written) { status_t status; size_t total_written = 0; d_assert(thefile, return CORE_ERROR,); d_assert(buf, return CORE_ERROR,); do { size_t amt = nbytes; status = file_write(thefile, buf, &amt); buf = (char *)buf + amt; nbytes -= amt; total_written += amt; } while (status == CORE_OK && nbytes > 0); if (bytes_written != NULL) *bytes_written = total_written; return status; } status_t file_writev_full(file_t *thefile, const struct iovec *vec, size_t nvec, size_t *bytes_written) { status_t rv = CORE_OK; size_t i; size_t amt = 0; size_t total = 0; d_assert(thefile, return CORE_ERROR,); d_assert(vec, return CORE_ERROR,); d_assert(nvec, return CORE_ERROR,); d_assert(bytes_written, return CORE_ERROR,); for (i = 0; i < nvec; i++) { total += vec[i].iov_len; } rv = file_writev(thefile, vec, nvec, &amt); if (bytes_written != NULL) *bytes_written = amt; if (rv != CORE_OK || (amt == total)) { return rv; } for (i = 0; i < nvec && amt; i++) { if (amt >= vec[i].iov_len) { amt -= vec[i].iov_len; } else { break; } } if (amt) { rv = file_write_full(thefile, (const char *)vec[i].iov_base + amt, vec[i].iov_len - amt, NULL); } for (; i < nvec && rv == CORE_OK; i++) { rv = file_write_full(thefile, vec[i].iov_base, vec[i].iov_len, &amt); } if (bytes_written != NULL) *bytes_written = total; return rv; } status_t file_putc(char ch, file_t *thefile) { size_t nbytes = 1; d_assert(thefile, return CORE_ERROR,); return file_write(thefile, &ch, &nbytes); } status_t file_getc(char *ch, file_t *thefile) { size_t nbytes = 1; d_assert(thefile, return CORE_ERROR,); return file_read(thefile, ch, &nbytes); } status_t file_gets(char *str, int len, file_t *thefile) { status_t rv = CORE_OK; /* get rid of gcc warning */ size_t nbytes; const char *str_start = str; char *final = str + len - 1; d_assert(str, return CORE_ERROR,); d_assert(thefile, return CORE_ERROR,); if (len <= 1) { /* sort of like fgets(), which returns NULL and stores no bytes */ return CORE_OK; } while (str < final) { /* leave room for trailing '\0' */ nbytes = 1; rv = file_read(thefile, str, &nbytes); if (rv != CORE_OK) { break; } if (*str == '\n') { ++str; break; } ++str; } /* We must store a terminating '\0' if we've stored any chars. We can * get away with storing it if we hit an error first. */ *str = '\0'; if (str > str_start) { /* we stored chars; don't report EOF or any other errors; * the app will find out about that on the next call */ return CORE_OK; } return rv; } status_t file_puts(const char *str, file_t *thefile) { d_assert(str, return CORE_ERROR,); d_assert(thefile, return CORE_ERROR,); return file_write_full(thefile, str, strlen(str), NULL); } status_t file_sync(file_t *thefile) { status_t rv = CORE_OK; d_assert(thefile, return CORE_ERROR,); if (fsync(thefile->filedes)) { rv = get_os_error(); } return rv; } status_t file_seek(file_t *thefile, seek_where_t where, off_t *offset) { off_t rv; d_assert(thefile, return CORE_ERROR,); d_assert(offset, return CORE_ERROR,); thefile->eof_hit = 0; rv = lseek(thefile->filedes, *offset, where); if (rv == -1) { *offset = -1; return errno; } else { *offset = rv; return CORE_OK; } } status_t file_name_get(const char **fname, file_t *thefile) { d_assert(fname, return CORE_ERROR,); d_assert(thefile, return CORE_ERROR,); *fname = thefile->fname; return CORE_OK; } status_t file_perms_set(const char *fname, file_perms_t perms) { mode_t mode = unix_perms2mode(perms); d_assert(fname, return CORE_ERROR,); if (chmod(fname, mode) == -1) return errno; return CORE_OK; } status_t file_attrs_set(const char *fname, file_attrs_t attributes, file_attrs_t attr_mask) { status_t status; file_info_t finfo; d_assert(fname, return CORE_ERROR,); /* Don't do anything if we can't handle the requested attributes */ if (!(attr_mask & (ATTR_READONLY | ATTR_EXECUTABLE))) return CORE_OK; status = file_stat(&finfo, fname, FILE_INFO_PROT); if (status) return status; /* ### TODO: should added bits be umask'd? */ if (attr_mask & ATTR_READONLY) { if (attributes & ATTR_READONLY) { finfo.protection &= ~FILE_UWRITE; finfo.protection &= ~FILE_GWRITE; finfo.protection &= ~FILE_WWRITE; } else { /* ### umask this! */ finfo.protection |= FILE_UWRITE; finfo.protection |= FILE_GWRITE; finfo.protection |= FILE_WWRITE; } } if (attr_mask & ATTR_EXECUTABLE) { if (attributes & ATTR_EXECUTABLE) { /* ### umask this! */ finfo.protection |= FILE_UEXECUTE; finfo.protection |= FILE_GEXECUTE; finfo.protection |= FILE_WEXECUTE; } else { finfo.protection &= ~FILE_UEXECUTE; finfo.protection &= ~FILE_GEXECUTE; finfo.protection &= ~FILE_WEXECUTE; } } return file_perms_set(fname, finfo.protection); } status_t file_mtime_set(const char *fname, c_time_t mtime) { status_t status; file_info_t finfo; d_assert(fname, return CORE_ERROR,); status = file_stat(&finfo, fname, FILE_INFO_ATIME); if (status) { return status; } #ifdef HAVE_UTIMES { struct timeval tvp[2]; tvp[0].tv_sec = time_sec(finfo.atime); tvp[0].tv_usec = time_usec(finfo.atime); tvp[1].tv_sec = time_sec(mtime); tvp[1].tv_usec = time_usec(mtime); if (utimes(fname, tvp) == -1) { return errno; } } #elif defined(HAVE_UTIME) { struct utimbuf buf; buf.actime = (time_t) (finfo.atime / USEC_PER_SEC); buf.modtime = (time_t) (mtime / USEC_PER_SEC); if (utime(fname, &buf) == -1) { return errno; } } #else return CORE_ENOTIMPL; #endif return CORE_OK; } status_t dir_make(const char *path, file_perms_t perm) { mode_t mode = unix_perms2mode(perm); d_assert(path, return CORE_ERROR,); if (mkdir(path, mode) == 0) { return CORE_OK; } else { return errno; } } #define PATH_SEPARATOR '/' /* Remove trailing separators that don't affect the meaning of PATH. */ static void path_canonicalize (char *dir) { d_assert(dir, return,); /* At some point this could eliminate redundant components. For * now, it just makes sure there is no trailing slash. */ size_t len = strlen (dir); size_t orig_len = len; while ((len > 0) && (dir[len - 1] == PATH_SEPARATOR)) len--; if (len != orig_len) dir[len] = 0; } /* Remove one component off the end of PATH. */ void path_remove_last_component (char *dir, const char *path) { int i; int len = 0; d_assert(dir, return,); d_assert(path, return,); strcpy(dir, path); path_canonicalize (dir); for (i = (strlen(dir) - 1); i >= 0; i--) { if (path[i] == PATH_SEPARATOR) break; } len = (i < 0) ? 0 : i; dir[len] = 0; } status_t dir_make_recursive(const char *path, file_perms_t perm) { status_t err = 0; d_assert(path, return CORE_ERROR,); err = dir_make(path, perm); /* Try to make PATH right out */ if (err == EEXIST) /* It's OK if PATH exists */ return CORE_OK; if (err == ENOENT) /* Missing an intermediate dir */ { char dir[MAX_DIRNAME_SIZE]; path_remove_last_component(dir, path); /* If there is no path left, give up. */ if (dir[0] == '\0') { return err; } err = dir_make_recursive(dir, perm); if (!err) err = dir_make (path, perm); } return err; } status_t dir_remove(const char *path) { d_assert(path, return CORE_ERROR,); if (rmdir(path) == 0) { return CORE_OK; } else { return errno; } } static filetype_e filetype_from_mode(mode_t mode) { filetype_e type; switch (mode & S_IFMT) { case S_IFREG: type = FILE_REG; break; case S_IFDIR: type = FILE_DIR; break; case S_IFLNK: type = FILE_LNK; break; case S_IFCHR: type = FILE_CHR; break; case S_IFBLK: type = FILE_BLK; break; #if defined(S_IFFIFO) case S_IFFIFO: type = FILE_PIPE; break; #endif #if !defined(BEOS) && defined(S_IFSOCK) case S_IFSOCK: type = FILE_SOCK; break; #endif default: /* Work around missing S_IFxxx values above * for Linux et al. */ #if !defined(S_IFFIFO) && defined(S_ISFIFO) if (S_ISFIFO(mode)) { type = FILE_PIPE; } else #endif #if !defined(BEOS) && !defined(S_IFSOCK) && defined(S_ISSOCK) if (S_ISSOCK(mode)) { type = FILE_SOCK; } else #endif type = FILE_UNKFILE; } return type; } static void fill_out_finfo(file_info_t *finfo, struct_stat *info, c_int32_t wanted) { d_assert(finfo, return,); d_assert(info, return,); finfo->valid = FILE_INFO_MIN | FILE_INFO_IDENT | FILE_INFO_NLINK | FILE_INFO_OWNER | FILE_INFO_PROT; finfo->protection = unix_mode2perms(info->st_mode); finfo->filetype = filetype_from_mode(info->st_mode); finfo->user = info->st_uid; finfo->group = info->st_gid; finfo->size = info->st_size; finfo->device = info->st_dev; finfo->nlink = info->st_nlink; /* Check for overflow if storing a 64-bit st_ino in a 32-bit * ino_t for LFS builds: */ if (sizeof(ino_t) >= sizeof(info->st_ino) || (ino_t)info->st_ino == info->st_ino) { finfo->inode = info->st_ino; } else { finfo->valid &= ~FILE_INFO_INODE; } time_ansi_put(&finfo->atime, info->st_atime); #ifdef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC finfo->atime += info->st_atim.tv_nsec / TIME_C(1000); #elif defined(HAVE_STRUCT_STAT_ST_ATIMENSEC) finfo->atime += info->st_atimensec / TIME_C(1000); #elif defined(HAVE_STRUCT_STAT_ST_ATIME_N) finfo->ctime += info->st_atime_n / TIME_C(1000); #endif time_ansi_put(&finfo->mtime, info->st_mtime); #ifdef HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC finfo->mtime += info->st_mtim.tv_nsec / TIME_C(1000); #elif defined(HAVE_STRUCT_STAT_ST_MTIMENSEC) finfo->mtime += info->st_mtimensec / TIME_C(1000); #elif defined(HAVE_STRUCT_STAT_ST_MTIME_N) finfo->ctime += info->st_mtime_n / TIME_C(1000); #endif time_ansi_put(&finfo->ctime, info->st_ctime); #ifdef HAVE_STRUCT_STAT_ST_CTIM_TV_NSEC finfo->ctime += info->st_ctim.tv_nsec / TIME_C(1000); #elif defined(HAVE_STRUCT_STAT_ST_CTIMENSEC) finfo->ctime += info->st_ctimensec / TIME_C(1000); #elif defined(HAVE_STRUCT_STAT_ST_CTIME_N) finfo->ctime += info->st_ctime_n / TIME_C(1000); #endif #ifdef HAVE_STRUCT_STAT_ST_BLOCKS #ifdef DEV_BSIZE finfo->csize = (off_t)info->st_blocks * (off_t)DEV_BSIZE; #else finfo->csize = (off_t)info->st_blocks * (off_t)512; #endif finfo->valid |= FILE_INFO_CSIZE; #endif } status_t file_info_get(file_info_t *finfo, c_int32_t wanted, file_t *thefile) { struct_stat info; d_assert(finfo, return CORE_ERROR,); d_assert(thefile, return CORE_ERROR,); if (fstat(thefile->filedes, &info) == 0) { strcpy(finfo->fname, thefile->fname); fill_out_finfo(finfo, &info, wanted); return (wanted & ~finfo->valid) ? CORE_INCOMPLETE : CORE_OK; } else { return errno; } } status_t file_trunc(file_t *fp, off_t offset) { d_assert(fp, return CORE_ERROR,); if (ftruncate(fp->filedes, offset) == -1) { return errno; } return file_seek(fp, FILE_SET, &offset); } c_int32_t file_flags_get(file_t *f) { d_assert(f, return CORE_ERROR,); return f->flags; } status_t file_stat(file_info_t *finfo, const char *fname, c_int32_t wanted) { struct_stat info; int srv; d_assert(finfo, return CORE_ERROR,); d_assert(fname, return CORE_ERROR,); if (wanted & FILE_INFO_LINK) srv = lstat(fname, &info); else srv = stat(fname, &info); if (srv == 0) { strcpy(finfo->fname, fname); fill_out_finfo(finfo, &info, wanted); if (wanted & FILE_INFO_LINK) wanted &= ~FILE_INFO_LINK; return (wanted & ~finfo->valid) ? CORE_INCOMPLETE : CORE_OK; } else { #if !defined(ENOENT) || !defined(ENOTDIR) #error ENOENT || ENOTDIR not defined; please see the #error comments at this line in the source for a workaround. /* * If ENOENT || ENOTDIR is not defined in one of the your OS's * include files, CORE cannot report a good reason why the stat() * of the file failed; there are cases where it can fail even though * the file exists. This opens holes in Apache, for example, because * it becomes possible for someone to get a directory listing of a * directory even though there is an index (eg. index.html) file in * it. If you do not have a problem with this, delete the above * #error lines and start the compile again. If you need to do this, * please submit a bug report to http://www.apache.org/bug_report.html * letting us know that you needed to do this. Please be sure to * include the operating system you are using. */ /* WARNING: All errors will be handled as not found */ #if !defined(ENOENT) return CORE_ENOENT; #else /* WARNING: All errors but not found will be handled as not directory */ if (errno != ENOENT) return CORE_ENOENT; else return errno; #endif #else /* All was defined well, report the usual: */ return errno; #endif } } status_t temp_dir_get(char *temp_dir) { d_assert(temp_dir, return CORE_ERROR,); strcpy(temp_dir, "/tmp"); return CORE_OK; } nextepc-0.3.10/lib/core/src/unix/mutex.c000066400000000000000000000050641333553357400200370ustar00rootroot00000000000000#define TRACE_MODULE _mutex #include "core.h" #include "core_arch_mutex.h" #include "core_errno.h" #include "core_param.h" #include "core_general.h" #include "core_debug.h" #include "core_pool.h" pool_declare(mutex_pool, mutex_t, MAX_NUM_OF_MUTEX); status_t mutex_init(void) { pool_init_wo_lock(&mutex_pool, MAX_NUM_OF_MUTEX); return CORE_OK; } status_t mutex_final(void) { if (pool_size(&mutex_pool) != pool_avail(&mutex_pool)) d_error("%d not freed in mutex_pool[%d]", pool_size(&mutex_pool) - pool_avail(&mutex_pool), pool_size(&mutex_pool)); d_trace(9, "%d not freed in mutex_pool[%d]\n", pool_size(&mutex_pool) - pool_avail(&mutex_pool), pool_size(&mutex_pool)); pool_final(&mutex_pool); return CORE_OK; } status_t mutex_create(mutex_id *id, unsigned int flags) { mutex_t *new_mutex; status_t rv; pool_alloc_node(&mutex_pool, &new_mutex); d_assert(new_mutex, return CORE_ENOMEM, "mutex_pool(%d) is not enough" "(new_mutex=%p, mut:%p, avail:%d,size:%d,head:%d,tail:%d \n", MAX_NUM_OF_MUTEX, new_mutex, mutex_pool.mut, mutex_pool.avail, mutex_pool.size, mutex_pool.head, mutex_pool.tail); if (flags & MUTEX_NESTED) { pthread_mutexattr_t mattr; rv = pthread_mutexattr_init(&mattr); if (rv) return rv; rv = pthread_mutexattr_settype(&mattr, PTHREAD_MUTEX_RECURSIVE); if (rv) { pthread_mutexattr_destroy(&mattr); return rv; } rv = pthread_mutex_init(&new_mutex->mutex, &mattr); pthread_mutexattr_destroy(&mattr); } else rv = pthread_mutex_init(&new_mutex->mutex, NULL); if (rv) { return rv; } *id = (mutex_id)new_mutex; return CORE_OK; } status_t mutex_lock(mutex_id id) { status_t rv; mutex_t *mutex = (mutex_t *)id; rv = pthread_mutex_lock(&mutex->mutex); return rv; } status_t mutex_trylock(mutex_id id) { status_t rv; mutex_t *mutex = (mutex_t *)id; rv = pthread_mutex_trylock(&mutex->mutex); if (rv) { return (rv == EBUSY) ? CORE_EBUSY : rv; } return CORE_OK; } status_t mutex_unlock(mutex_id id) { status_t rv; mutex_t *mutex = (mutex_t *)id; rv = pthread_mutex_unlock(&mutex->mutex); return rv; } status_t mutex_delete(mutex_id id) { status_t rv; mutex_t *mutex = (mutex_t *)id; rv = pthread_mutex_destroy(&mutex->mutex); pool_free_node(&mutex_pool, mutex); return rv; } nextepc-0.3.10/lib/core/src/unix/pkbuf.c000066400000000000000000000411541333553357400200040ustar00rootroot00000000000000#define TRACE_MODULE _pkbuf #include "core.h" #include "core_pkbuf.h" #include "core_errno.h" #include "core_lib.h" #include "core_debug.h" #include "core_pool.h" #define MAX_NUM_OF_CLBUF 256 #define MAX_NUM_OF_PKBUF 256 pool_declare(clbuf_pool, clbuf_t, MAX_NUM_OF_CLBUF); pool_declare(pkbuf_pool, pkbuf_t, MAX_NUM_OF_PKBUF); #undef BOUNDARY #define BOUNDARY SIZEOF_VOIDP #define SIZEOF_CLUSTER_128 CORE_ALIGN(128+MAX_SIZEOF_HEADROOM, BOUNDARY) #define SIZEOF_CLUSTER_256 CORE_ALIGN(256+MAX_SIZEOF_HEADROOM, BOUNDARY) #define SIZEOF_CLUSTER_512 CORE_ALIGN(512+MAX_SIZEOF_HEADROOM, BOUNDARY) #define SIZEOF_CLUSTER_1024 CORE_ALIGN(1024+MAX_SIZEOF_HEADROOM, BOUNDARY) #define SIZEOF_CLUSTER_2048 CORE_ALIGN(2048+MAX_SIZEOF_HEADROOM, BOUNDARY) #define SIZEOF_CLUSTER_8192 CORE_ALIGN(8192+MAX_SIZEOF_HEADROOM, BOUNDARY) #define MAX_NUM_OF_CLUSTER_128 256 #define MAX_NUM_OF_CLUSTER_256 256 #define MAX_NUM_OF_CLUSTER_512 256 #define MAX_NUM_OF_CLUSTER_1024 256 #define MAX_NUM_OF_CLUSTER_2048 256 #define MAX_NUM_OF_CLUSTER_8192 256 typedef c_uint8_t cluster_128_t[SIZEOF_CLUSTER_128]; typedef c_uint8_t cluster_256_t[SIZEOF_CLUSTER_256]; typedef c_uint8_t cluster_512_t[SIZEOF_CLUSTER_512]; typedef c_uint8_t cluster_1024_t[SIZEOF_CLUSTER_1024]; typedef c_uint8_t cluster_2048_t[SIZEOF_CLUSTER_2048]; typedef c_uint8_t cluster_8192_t[SIZEOF_CLUSTER_8192]; pool_declare(cluster_128_pool, cluster_128_t, MAX_NUM_OF_CLUSTER_128); pool_declare(cluster_256_pool, cluster_256_t, MAX_NUM_OF_CLUSTER_256); pool_declare(cluster_512_pool, cluster_512_t, MAX_NUM_OF_CLUSTER_512); pool_declare(cluster_1024_pool, cluster_1024_t, MAX_NUM_OF_CLUSTER_1024); pool_declare(cluster_2048_pool, cluster_2048_t, MAX_NUM_OF_CLUSTER_2048); pool_declare(cluster_8192_pool, cluster_8192_t, MAX_NUM_OF_CLUSTER_8192); static mutex_id mutex; status_t pkbuf_init(void) { mutex_create(&mutex, MUTEX_DEFAULT); pool_init(&clbuf_pool, MAX_NUM_OF_CLBUF); pool_init(&pkbuf_pool, MAX_NUM_OF_PKBUF); pool_init(&cluster_128_pool, MAX_NUM_OF_CLUSTER_128); pool_init(&cluster_256_pool, MAX_NUM_OF_CLUSTER_256); pool_init(&cluster_512_pool, MAX_NUM_OF_CLUSTER_512); pool_init(&cluster_1024_pool, MAX_NUM_OF_CLUSTER_1024); pool_init(&cluster_2048_pool, MAX_NUM_OF_CLUSTER_2048); pool_init(&cluster_8192_pool, MAX_NUM_OF_CLUSTER_8192); return CORE_OK; } status_t pkbuf_final(void) { pkbuf_show(); pool_final(&clbuf_pool); pool_final(&pkbuf_pool); pool_final(&cluster_128_pool); pool_final(&cluster_256_pool); pool_final(&cluster_512_pool); pool_final(&cluster_1024_pool); pool_final(&cluster_2048_pool); pool_final(&cluster_8192_pool); mutex_delete(mutex); return CORE_OK; } void pkbuf_show(void) { if (pool_used(&pkbuf_pool)) d_error("%d not freed in pkbuf_pool[%d]", pool_used(&pkbuf_pool), pool_size(&pkbuf_pool)); d_trace(9, "%d not freed in pkbuf_pool[%d]\n", pool_used(&pkbuf_pool), pool_size(&pkbuf_pool)); if (pool_used(&clbuf_pool)) d_error("%d not freed in clbuf_pool[%d]", pool_used(&clbuf_pool), pool_size(&clbuf_pool)); d_trace(9, "%d not freed in clbuf_pool[%d]\n", pool_used(&clbuf_pool), pool_size(&clbuf_pool)); if (pool_used(&cluster_128_pool)) d_error("%d not freed in cluster128_pool[%d]", pool_used(&cluster_128_pool), pool_size(&cluster_128_pool)); d_trace(9, "%d not freed in cluster128_pool[%d]\n", pool_used(&cluster_128_pool), pool_size(&cluster_128_pool)); if (pool_used(&cluster_256_pool)) d_error("%d not freed in cluster256_pool[%d]", pool_used(&cluster_256_pool), pool_size(&cluster_256_pool)); d_trace(9, "%d not freed in cluster256_pool[%d]\n", pool_used(&cluster_256_pool), pool_size(&cluster_256_pool)); if (pool_used(&cluster_512_pool)) d_error("%d not freed in cluster512_pool[%d]", pool_used(&cluster_512_pool), pool_size(&cluster_512_pool)); d_trace(9, "%d not freed in cluster512_pool[%d]\n", pool_used(&cluster_512_pool), pool_size(&cluster_512_pool)); if (pool_used(&cluster_1024_pool)) d_error("%d not freed in cluster1024_pool[%d]", pool_used(&cluster_1024_pool), pool_size(&cluster_1024_pool)); d_trace(9, "%d not freed in cluster1024_pool[%d]\n", pool_used(&cluster_1024_pool), pool_size(&cluster_1024_pool)); if (pool_used(&cluster_2048_pool)) d_error("%d not freed in cluster2048_pool[%d]", pool_used(&cluster_2048_pool), pool_size(&cluster_2048_pool)); d_trace(9, "%d not freed in cluster2048_pool[%d]\n", pool_used(&cluster_2048_pool), pool_size(&cluster_2048_pool)); if (pool_used(&cluster_8192_pool)) d_error("%d not freed in cluster8192_pool[%d]", pool_used(&cluster_8192_pool), pool_size(&cluster_8192_pool)); d_trace(9, "%d not freed in cluster8192_pool[%d]\n", pool_used(&cluster_8192_pool), pool_size(&cluster_8192_pool)); } static clbuf_t* clbuf_alloc(c_uint16_t length); static void clbuf_free(clbuf_t *clbuf); static clbuf_t* clbuf_alloc(c_uint16_t length) { clbuf_t *clbuf = NULL; c_uint8_t *cluster = NULL; pool_alloc_node(&clbuf_pool, &clbuf); d_assert(clbuf, return NULL, "No more free clbuf. "); if (length <= 128) { pool_alloc_node(&cluster_128_pool, &cluster); clbuf->size = SIZEOF_CLUSTER_128; } else if (length <= 256) { pool_alloc_node(&cluster_256_pool, &cluster); clbuf->size = SIZEOF_CLUSTER_256; } else if (length <= 512) { pool_alloc_node(&cluster_512_pool, &cluster); clbuf->size = SIZEOF_CLUSTER_512; } else if (length <= 1024) { pool_alloc_node(&cluster_1024_pool, &cluster); clbuf->size = SIZEOF_CLUSTER_1024; } else if (length <= 2048) { pool_alloc_node(&cluster_2048_pool, &cluster); clbuf->size = SIZEOF_CLUSTER_2048; } else if (length <= 8192) { pool_alloc_node(&cluster_8192_pool, &cluster); clbuf->size = SIZEOF_CLUSTER_8192; } d_assert(cluster, pool_free_node(&clbuf_pool, clbuf); return NULL, "No more free cluster. length:%d requested", length); clbuf->ref = 0; clbuf->cluster = cluster; return clbuf; } static void clbuf_free(clbuf_t *clbuf) { d_assert(clbuf, return, "Null param"); d_assert(clbuf->cluster, return, "clbuf has no cluster"); switch (clbuf->size) { case SIZEOF_CLUSTER_128: pool_free_node(&cluster_128_pool, clbuf->cluster); break; case SIZEOF_CLUSTER_256: pool_free_node(&cluster_256_pool, clbuf->cluster); break; case SIZEOF_CLUSTER_512: pool_free_node(&cluster_512_pool, clbuf->cluster); break; case SIZEOF_CLUSTER_1024: pool_free_node(&cluster_1024_pool, clbuf->cluster); break; case SIZEOF_CLUSTER_2048: pool_free_node(&cluster_2048_pool, clbuf->cluster); break; case SIZEOF_CLUSTER_8192: pool_free_node(&cluster_8192_pool, clbuf->cluster); break; default: d_assert(0, return, "clbuf has invalid size %d", clbuf->size); break; } pool_free_node(&clbuf_pool, clbuf); return; } pkbuf_t* pkbuf_alloc(c_uint16_t headroom, c_uint16_t length) { pkbuf_t *np = NULL, *pnp, *ret; clbuf_t *clbuf = NULL; c_uint16_t rem_length; d_assert(headroom <= MAX_SIZEOF_HEADROOM, return NULL, "Max size of headroom is %d, but %d requested", MAX_SIZEOF_HEADROOM, headroom); clbuf = clbuf_alloc(length); d_assert(clbuf, return NULL, "Can't allocate clbuf(length:%d)", length); pool_alloc_node(&pkbuf_pool, &np); d_assert(np, clbuf_free(clbuf); return NULL, "No more free pkbuf"); ret = np; np->next = NULL; np->clbuf = clbuf; np->payload = (void*)CORE_ALIGN((c_uintptr_t)(clbuf->cluster + headroom), BOUNDARY); np->tot_len = length; np->len = c_min(length, clbuf->size - (np->payload - clbuf->cluster)); np->flags = 0; clbuf->ref = 1; pnp = np; rem_length = length - np->len; while (rem_length > 0) { clbuf = clbuf_alloc(rem_length); d_assert(clbuf, break, "Can't allocate clbuf"); pool_alloc_node(&pkbuf_pool, &np); d_assert(np, clbuf_free(clbuf); break, "No more free pkbuf"); /* Chaining */ pnp->next = np; np->next = NULL; np->clbuf = clbuf; np->payload = clbuf->cluster; np->tot_len = rem_length; np->len = c_min(rem_length, clbuf->size); np->flags = 0; clbuf->ref = 1; pnp = np; rem_length -= np->len; } /* Abnormal break */ if (rem_length > 0) { if (ret) pkbuf_free(ret); ret = NULL; } return ret; } status_t pkbuf_header(pkbuf_t *pkbuf, c_int16_t increment) { clbuf_t *clbuf; d_assert(pkbuf, return CORE_ERROR, "Null param"); d_assert(pkbuf->clbuf, return CORE_ERROR, "pkbuf has no clbuf"); d_assert(pkbuf->clbuf->cluster, return CORE_ERROR, "clbuf has no cluster"); clbuf = pkbuf->clbuf; /* No change */ if (increment == 0) return CORE_OK; if (increment > 0) { if (pkbuf->payload - clbuf->cluster < increment) return CORE_ERROR; } else { if (pkbuf->len < -increment) return CORE_ERROR; } pkbuf->payload -= increment; pkbuf->tot_len += increment; pkbuf->len += increment; return CORE_OK; } void pkbuf_free(pkbuf_t *pkbuf) { pkbuf_t *p, *q; d_assert(pkbuf, return, "Null param"); p = pkbuf; while (p) { d_assert(p->clbuf, return, "param 'pkbuf' has no clbuf"); q = p->next; mutex_lock(mutex); p->clbuf->ref--; mutex_unlock(mutex); if (p->clbuf->ref == 0) clbuf_free(p->clbuf); pool_free_node(&pkbuf_pool, p); p = q; } return; } void pkbuf_join(pkbuf_t *h, pkbuf_t *t) { pkbuf_t *p; d_assert(h, return, "Null param"); d_assert(t, return, "Null param"); /* proceed to last pbuf of chain */ for (p = h; p->next != NULL; p = p->next) { /* add total length of second chain to all totals of first chain */ p->tot_len += t->tot_len; } d_assert(p->tot_len == p->len, return, "p->tot_len(%d) == p->len(%d) (of last pbuf in chain)", p->tot_len, p->len); d_assert(p->next == NULL, return, "p->next == NULL"); /* add total length of second chain to last pbuf total of first chain */ p->tot_len += t->tot_len; /* chain last pbuf of head (p) with first of tail (t) */ p->next = t; /* p->next now references t, but the caller will drop its reference to t, * so netto there is no change to the reference count of t. */ } pkbuf_t* pkbuf_copy(pkbuf_t *pkbuf) { pkbuf_t *p, *np, *pnp = NULL, *ret = NULL; d_assert(pkbuf, return NULL, "Null param"); p = pkbuf; while (p) { pool_alloc_node(&pkbuf_pool, &np); d_assert(np, break, "No more free pkbuf. "); if (ret == NULL) ret = np; if (pnp) pnp->next = np; np->next = NULL; np->clbuf = p->clbuf; np->payload = p->payload; np->tot_len = p->tot_len; np->len = p->len; np->flags = p->flags; mutex_lock(mutex); p->clbuf->ref++; mutex_unlock(mutex); pnp = np; p = p->next; } /* Abnormal break */ if (p) { if (ret) pkbuf_free(ret); ret = NULL; } return ret; } pkbuf_t* pkbuf_copy_partial(pkbuf_t *pkbuf, c_uint16_t offset, c_uint16_t len) { pkbuf_t *p, *np, *pnp = NULL, *ret = NULL; c_uint16_t copied = 0, bytes = 0, skipped = 0; d_assert(pkbuf, return NULL, "Null param"); if (pkbuf->tot_len < offset + len) return NULL; p = pkbuf; while (p) { bytes += p->len; if (bytes > offset) { pool_alloc_node(&pkbuf_pool, &np); d_assert(np, break, "No more free pkbuf. "); /* First block */ if (ret == NULL) { ret = np; np->payload = p->payload + (offset - skipped); np->tot_len = len; np->len = p->len - (offset - skipped); } else { np->payload = p->payload; np->tot_len = pnp->tot_len - pnp->len; np->len = p->len; } np->next = NULL; np->flags = p->flags; np->clbuf = p->clbuf; mutex_lock(mutex); p->clbuf->ref++; mutex_unlock(mutex); if (pnp) pnp->next = np; pnp = np; copied += np->len; /* Check the last block */ if (copied >= len) { np->len -= copied - len; break; } } skipped += p->len; p = p->next; } /* Abnormal break */ if (copied < len) { if (ret) pkbuf_free(ret); ret = NULL; } return ret; } status_t pkbuf_tobuf(pkbuf_t *pkbuf, void *buf, c_uint16_t *buflen) { pkbuf_t *p; c_uint16_t copied = 0; d_assert(pkbuf, return CORE_ERROR, "Null param"); d_assert(buf, return CORE_ERROR, "Null param"); d_assert(buflen, return CORE_ERROR, "Null param"); if (pkbuf->tot_len > *buflen) return CORE_ERROR; *buflen = 0; p = pkbuf; while (p) { d_assert(p->clbuf, return CORE_ERROR, "pkbuf has no clbuf"); d_assert(p->clbuf->cluster, return CORE_ERROR, "clbuf has no cluster"); memcpy(buf + copied, p->payload, p->len); copied += p->len; p = p->next; } d_assert(copied == pkbuf->tot_len, return CORE_ERROR, "Copy length isn't same with total length"); *buflen = copied; return CORE_OK;; } status_t pkbuf_tobuf_partial(pkbuf_t *pkbuf, void *buf, c_uint16_t *buflen, c_uint16_t offset, c_uint16_t len) { return CORE_OK; } void *core_malloc(size_t size) { c_uint16_t headroom = 0; pkbuf_t *p = NULL; d_assert(size, return NULL, "if size == 0, then returns NULL"); headroom = sizeof(pkbuf_t *); p = pkbuf_alloc(headroom, size); d_assert(p, return NULL, "pkbuf_alloc failed(headroom:%d, size:%d)", headroom, size); d_assert(p->next == NULL, pkbuf_free(p);return NULL, "core_malloc should not be fragmented"); memcpy(p->payload - headroom, &p, headroom); return p->payload; } status_t core_free(void *ptr) { c_uint16_t headroom = sizeof(pkbuf_t *); pkbuf_t *p = NULL; if (!ptr) return CORE_OK; memcpy(&p, ptr - headroom, headroom); d_assert(p, return CORE_ERROR, "Null param"); pkbuf_free(p); return CORE_OK; } void *core_calloc(size_t nmemb, size_t size) { void *ptr = NULL; ptr = core_malloc(nmemb * size); d_assert(ptr, return NULL, "nmeb = %d, sizeo = %d", nmemb, size); memset(ptr, 0, nmemb * size); return ptr; } void *core_realloc(void *ptr, size_t size) { c_uint16_t headroom = sizeof(pkbuf_t *); pkbuf_t *p = NULL; if (!ptr) { return core_malloc(size); } memcpy(&p, ptr - headroom, headroom); d_assert(p, return NULL, "Null param"); if (!size) { pkbuf_free(p); return NULL; } d_assert(p->clbuf, return NULL, "Null param"); if (size >= (p->clbuf->size - headroom)) { void *new = NULL; new = core_malloc(size); d_assert(new, return NULL, "Null param"); memcpy(new, ptr, p->len); pkbuf_free(p); return new; } else { p->tot_len = size; p->len = c_min(size, p->clbuf->size - (p->payload - p->clbuf->cluster)); return ptr; } } char *core_strdup(const char *s) { char *res; size_t len; if (s == NULL) return NULL; len = strlen(s) + 1; res = core_memdup(s, len); return res; } char *core_strndup(const char *s, size_t n) { char *res; const char *end; if (s == NULL) return NULL; end = memchr(s, '\0', n); if (end != NULL) n = end - s; res = core_malloc(n + 1); memcpy(res, s, n); res[n] = '\0'; return res; } void *core_memdup(const void *m, size_t n) { void *res; if (m == NULL) return NULL; res = core_malloc(n); memcpy(res, m, n); return res; } nextepc-0.3.10/lib/core/src/unix/rand.c000066400000000000000000000016301333553357400176140ustar00rootroot00000000000000#include "core_errno.h" #define DEV_RANDOM "/dev/urandom" status_t core_generate_random_bytes(c_uint8_t *buf, int length) { int fd = -1; /* On BSD/OS 4.1, /dev/random gives out 8 bytes at a time, then * gives EOF, so reading 'length' bytes may require opening the * device several times. */ do { int rc; if (fd == -1) if ((fd = open(DEV_RANDOM, O_RDONLY)) == -1) return errno; do { rc = read(fd, buf, length); } while (rc == -1 && errno == EINTR); if (rc < 0) { int errnum = errno; close(fd); return errnum; } else if (rc == 0) { close(fd); fd = -1; /* force open() again */ } else { buf += rc; length -= rc; } } while (length > 0); close(fd); return CORE_OK; } nextepc-0.3.10/lib/core/src/unix/rwlock.c000066400000000000000000000040041333553357400201670ustar00rootroot00000000000000#include "core.h" #include "core_rwlock.h" #include "core_pool.h" #include "core_debug.h" #include "core_general.h" #include "core_param.h" typedef struct _rwlock_t { pthread_rwlock_t rwlock; } rwlock_t; pool_declare(rwlock_pool, rwlock_t, MAX_NUM_OF_RWLOCK); status_t rwlock_init(void) { pool_init(&rwlock_pool, MAX_NUM_OF_RWLOCK); return CORE_OK; } status_t rwlock_final(void) { pool_final(&rwlock_pool); return CORE_OK; } status_t rwlock_create(rwlock_id *id) { rwlock_t *new_rwlock; status_t stat; pool_alloc_node(&rwlock_pool, &new_rwlock); d_assert(new_rwlock, return CORE_ENOMEM, "rwlock_pool(%d) is not enough\n", MAX_NUM_OF_RWLOCK); if ((stat = pthread_rwlock_init(&new_rwlock->rwlock, NULL))) { return stat; } *id = (rwlock_id)new_rwlock; return CORE_OK; } status_t rwlock_rdlock(rwlock_id id) { status_t stat; rwlock_t *rwlock = (rwlock_t *)id; stat = pthread_rwlock_rdlock(&rwlock->rwlock); return stat; } status_t rwlock_tryrdlock(rwlock_id id) { status_t stat; rwlock_t *rwlock = (rwlock_t *)id; stat = pthread_rwlock_tryrdlock(&rwlock->rwlock); /* Normalize the return code. */ if (stat == EBUSY) stat = CORE_EBUSY; return stat; } status_t rwlock_wrlock(rwlock_id id) { status_t stat; rwlock_t *rwlock = (rwlock_t *)id; stat = pthread_rwlock_wrlock(&rwlock->rwlock); return stat; } status_t rwlock_trywrlock(rwlock_id id) { status_t stat; rwlock_t *rwlock = (rwlock_t *)id; stat = pthread_rwlock_trywrlock(&rwlock->rwlock); /* Normalize the return code. */ if (stat == EBUSY) stat = CORE_EBUSY; return stat; } status_t rwlock_unlock(rwlock_id id) { status_t stat; rwlock_t *rwlock = (rwlock_t *)id; stat = pthread_rwlock_unlock(&rwlock->rwlock); return stat; } status_t rwlock_delete(rwlock_id id) { status_t stat; rwlock_t *rwlock = (rwlock_t *)id; stat = pthread_rwlock_destroy(&rwlock->rwlock); return stat; } nextepc-0.3.10/lib/core/src/unix/sctp.c000066400000000000000000000263261333553357400176520ustar00rootroot00000000000000#define TRACE_MODULE _sctp #include "core_debug.h" #include "core_arch_network.h" #if HAVE_NETINET_SCTP_H #include #endif static status_t subscribe_to_events(sock_id id); static status_t set_paddrparams(sock_id id, c_uint32_t spp_hbinterval); static status_t set_rtoinfo(sock_id id, c_uint32_t srto_initial, c_uint32_t srto_min, c_uint32_t srto_max); static status_t set_initmsg(sock_id id, c_uint32_t sinit_num_ostreams, c_uint32_t sinit_max_instreams, c_uint32_t sinit_max_attempts, c_uint32_t sinit_max_init_timeo); static int sctp_num_ostreams = -1; void sctp_set_num_ostreams(int sctp_streams) { sctp_num_ostreams = sctp_streams; } status_t sctp_socket(sock_id *new, int family, int type) { status_t rv; rv = sock_socket(new, family, type, IPPROTO_SCTP); d_assert(rv == CORE_OK, return CORE_ERROR,); rv = subscribe_to_events(*new); d_assert(rv == CORE_OK, return CORE_ERROR,); /* heartbit interval : 5 secs */ rv = set_paddrparams(*new, 5000); d_assert(rv == CORE_OK, return CORE_ERROR,); /* * RTO info * * initial : 3 secs * min : 1 sec * max : 5 secs */ rv = set_rtoinfo(*new, 3000, 1000, 5000); d_assert(rv == CORE_OK, return CORE_ERROR,); /* * INITMSG * * max number of input streams : 65535 * max attemtps : 4 * max initial timeout : 8 secs */ rv = set_initmsg(*new, sctp_num_ostreams, 65535, 4, 8000); d_assert(rv == CORE_OK, return CORE_ERROR,); return CORE_OK; } status_t sctp_server(sock_id *new, int type, c_sockaddr_t *sa_list) { status_t rv; c_sockaddr_t *addr; char buf[CORE_ADDRSTRLEN]; addr = sa_list; while(addr) { rv = sctp_socket(new, addr->c_sa_family, type); if (rv == CORE_OK) { d_assert(sock_setsockopt(*new, SOCK_O_REUSEADDR, 1) == CORE_OK, return CORE_ERROR, "setsockopt [%s]:%d failed(%d:%s)", CORE_ADDR(addr, buf), CORE_PORT(addr), errno, strerror(errno)); if (sock_bind(*new, addr) == CORE_OK) { d_trace(1, "sctp_server() [%s]:%d\n", CORE_ADDR(addr, buf), CORE_PORT(addr)); break; } rv = sock_delete(*new); d_assert(rv == CORE_OK, return CORE_ERROR,); } addr = addr->next; } if (addr == NULL) { d_error("sctp_server() [%s]:%d failed(%d:%s)", CORE_ADDR(sa_list, buf), CORE_PORT(sa_list), errno, strerror(errno)); return CORE_ERROR; } rv = sock_listen(*new); d_assert(rv == CORE_OK, return CORE_ERROR,); return CORE_OK; } status_t sctp_client(sock_id *new, int type, c_sockaddr_t *sa_list) { status_t rv; c_sockaddr_t *addr; char buf[CORE_ADDRSTRLEN]; addr = sa_list; while(addr) { rv = sctp_socket(new, addr->c_sa_family, type); if (rv == CORE_OK) { if (sock_connect(*new, addr) == CORE_OK) { d_trace(1, "sctp_client() [%s]:%d\n", CORE_ADDR(addr, buf), CORE_PORT(addr)); break; } rv = sock_delete(*new); d_assert(rv == CORE_OK, return CORE_ERROR,); } addr = addr->next; } if (addr == NULL) { d_error("sctp_client() [%s]:%d failed(%d:%s)", CORE_ADDR(sa_list, buf), CORE_PORT(sa_list), errno, strerror(errno)); return CORE_ERROR; } return CORE_OK; } status_t sctp_connect(sock_id id, c_sockaddr_t *sa_list) { c_sockaddr_t *addr; char buf[CORE_ADDRSTRLEN]; d_assert(id, return CORE_ERROR,); addr = sa_list; while(addr) { if (sock_connect(id, addr) == CORE_OK) { d_trace(1, "sctp_connect() [%s]:%d\n", CORE_ADDR(addr, buf), CORE_PORT(addr)); break; } addr = addr->next; } if (addr == NULL) { d_error("sctp_connect() [%s]:%d failed(%d:%s)", CORE_ADDR(sa_list, buf), CORE_PORT(sa_list), errno, strerror(errno)); return CORE_ERROR; } return CORE_OK; } int core_sctp_sendmsg(sock_id id, const void *msg, size_t len, c_sockaddr_t *to, c_uint32_t ppid, c_uint16_t stream_no) { sock_t *sock = (sock_t *)id; int size; socklen_t addrlen = 0; d_assert(id, return -1, ); if (to) addrlen = sockaddr_len(to); size = sctp_sendmsg(sock->fd, msg, len, to ? &to->sa : NULL, addrlen, htonl(ppid), 0, /* flags */ stream_no, 0, /* timetolive */ 0); /* context */ if (size < 0) { d_error("sctp_sendmsg(len:%ld) failed(%d:%s)", len, errno, strerror(errno)); } return size; } int core_sctp_recvmsg(sock_id id, void *msg, size_t len, c_sockaddr_t *from, sctp_info_t *sinfo, int *msg_flags) { sock_t *sock = (sock_t *)id; int size; socklen_t addrlen = sizeof(struct sockaddr_storage); int flags = 0; struct sctp_sndrcvinfo sndrcvinfo; d_assert(id, return -1,); size = sctp_recvmsg(sock->fd, msg, len, from ? &from->sa : NULL, from ? &addrlen : NULL, &sndrcvinfo, &flags); if (size < 0) { d_error("sctp_recvmsg(%d) failed(%d:%s)", size, errno, strerror(errno)); return size; } if (msg_flags) { *msg_flags = flags; } if (sinfo) { sinfo->ppid = ntohl(sndrcvinfo.sinfo_ppid); sinfo->stream_no = sndrcvinfo.sinfo_stream; } return size; } int core_sctp_recvdata(sock_id id, void *msg, size_t len, c_sockaddr_t *from, sctp_info_t *sinfo) { int size; int flags = 0; do { size = core_sctp_recvmsg(id, msg, len, from, sinfo, &flags); if (size < 0) { d_error("core_sctp_recvdata(%d) failed(%d:%s)", size, errno, strerror(errno)); return size; } if (flags & MSG_NOTIFICATION) { /* Nothing */ } else if (flags & MSG_EOR) { break; } else { d_assert(0, return -1,); } } while(1); return size; } static status_t subscribe_to_events(sock_id id) { sock_t *sock = (sock_t *)id; struct sctp_event_subscribe event; d_assert(id, return CORE_ERROR,); memset(&event, 0, sizeof(event)); event.sctp_data_io_event = 1; event.sctp_association_event = 1; event.sctp_send_failure_event = 1; event.sctp_shutdown_event = 1; if (setsockopt(sock->fd, IPPROTO_SCTP, SCTP_EVENTS, &event, sizeof( event)) != 0 ) { d_error("Unable to subscribe to SCTP events: (%d:%s)", errno, strerror( errno )); return CORE_ERROR; } return CORE_OK; } static status_t set_paddrparams(sock_id id, c_uint32_t spp_hbinterval) { sock_t *sock = (sock_t *)id; struct sctp_paddrparams heartbeat; socklen_t socklen; d_assert(id, return CORE_ERROR,); memset(&heartbeat, 0, sizeof(heartbeat)); socklen = sizeof(heartbeat); if (getsockopt(sock->fd, IPPROTO_SCTP, SCTP_PEER_ADDR_PARAMS, &heartbeat, &socklen) != 0 ) { d_error("getsockopt for SCTP_PEER_ADDR failed(%d:%s)", errno, strerror(errno)); return CORE_ERROR; } d_trace(3,"Old spp _flags = 0x%x hbinter = %d pathmax = %d\n", heartbeat.spp_flags, heartbeat.spp_hbinterval, heartbeat.spp_pathmaxrxt); heartbeat.spp_hbinterval = spp_hbinterval; if (setsockopt(sock->fd, IPPROTO_SCTP, SCTP_PEER_ADDR_PARAMS, &heartbeat, sizeof( heartbeat)) != 0 ) { d_error("setsockopt for SCTP_PEER_ADDR_PARAMS failed(%d:%s)", errno, strerror(errno)); return CORE_ERROR; } d_trace(3,"New spp _flags = 0x%x hbinter = %d pathmax = %d\n", heartbeat.spp_flags, heartbeat.spp_hbinterval, heartbeat.spp_pathmaxrxt); return CORE_OK; } static status_t set_rtoinfo(sock_id id, c_uint32_t srto_initial, c_uint32_t srto_min, c_uint32_t srto_max) { sock_t *sock = (sock_t *)id; struct sctp_rtoinfo rtoinfo; socklen_t socklen; d_assert(id, return CORE_ERROR,); memset(&rtoinfo, 0, sizeof(rtoinfo)); socklen = sizeof(rtoinfo); if (getsockopt(sock->fd, IPPROTO_SCTP, SCTP_RTOINFO, &rtoinfo, &socklen) != 0 ) { d_error("getsockopt for SCTP_RTOINFO failed(%d:%s)", errno, strerror( errno )); return CORE_ERROR; } d_trace(3,"Old RTO (initial:%d max:%d min:%d)\n", rtoinfo.srto_initial, rtoinfo.srto_max, rtoinfo.srto_min); rtoinfo.srto_initial = srto_initial; rtoinfo.srto_min = srto_min; rtoinfo.srto_max = srto_max; if (setsockopt(sock->fd, IPPROTO_SCTP, SCTP_RTOINFO, &rtoinfo, sizeof(rtoinfo)) != 0 ) { d_error("setsockopt for SCTP_RTOINFO failed(%d:%s)", errno, strerror( errno )); return CORE_ERROR; } d_trace(3,"New RTO (initial:%d max:%d min:%d)\n", rtoinfo.srto_initial, rtoinfo.srto_max, rtoinfo.srto_min); return CORE_OK; } static status_t set_initmsg(sock_id id, c_uint32_t sinit_num_ostreams, c_uint32_t sinit_max_instreams, c_uint32_t sinit_max_attempts, c_uint32_t sinit_max_init_timeo) { sock_t *sock = (sock_t *)id; struct sctp_initmsg initmsg; socklen_t socklen; d_assert(id, return CORE_ERROR,); d_assert(sinit_num_ostreams > 1, return CORE_ERROR, "Invalid SCTP number of output streams = %d\n", sctp_num_ostreams); memset(&initmsg, 0, sizeof(initmsg)); socklen = sizeof(initmsg); if (getsockopt(sock->fd, IPPROTO_SCTP, SCTP_INITMSG, &initmsg, &socklen) != 0 ) { d_error("getsockopt for SCTP_INITMSG failed(%d:%s)", errno, strerror( errno )); return CORE_ERROR; } d_trace(3,"Old INITMSG (numout:%d maxin:%d maxattempt:%d maxinit_to:%d)\n", initmsg.sinit_num_ostreams, initmsg.sinit_max_instreams, initmsg.sinit_max_attempts, initmsg.sinit_max_init_timeo); initmsg.sinit_num_ostreams = sinit_num_ostreams; initmsg.sinit_max_instreams = sinit_max_instreams; initmsg.sinit_max_attempts = sinit_max_attempts; initmsg.sinit_max_init_timeo = sinit_max_init_timeo; if (setsockopt(sock->fd, IPPROTO_SCTP, SCTP_INITMSG, &initmsg, sizeof(initmsg)) != 0 ) { d_error("setsockopt for SCTP_INITMSG failed(%d:%s)", errno, strerror( errno )); return CORE_ERROR; } d_trace(3,"New INITMSG (numout:%d maxin:%d maxattempt:%d maxinit_to:%d)\n", initmsg.sinit_num_ostreams, initmsg.sinit_max_instreams, initmsg.sinit_max_attempts, initmsg.sinit_max_init_timeo); return CORE_OK; } nextepc-0.3.10/lib/core/src/unix/semaphore.c000066400000000000000000000041551333553357400206600ustar00rootroot00000000000000#include "core.h" #include "core_arch_semaphore.h" #include "core_errno.h" #include "core_param.h" #include "core_general.h" #include "core_debug.h" #include "core_pool.h" pool_declare(semaphore_pool, semaphore_t, MAX_NUM_OF_SEMAPHORE); status_t semaphore_init(void) { pool_init(&semaphore_pool, MAX_NUM_OF_SEMAPHORE); return CORE_OK; } status_t semaphore_final(void) { pool_final(&semaphore_pool); return CORE_OK; } status_t semaphore_create(semaphore_id *id, c_uint32_t value) { semaphore_t *new_semaphore; c_time_t now = time_now(); char semname[64]; pool_alloc_node(&semaphore_pool, &new_semaphore); d_assert(new_semaphore, return CORE_ENOMEM, "semaphore_pool(%d) is not enough\n", MAX_NUM_OF_SEMAPHORE); sprintf(semname, "/CoRe%" C_UINT64_T_HEX_FMT, now); new_semaphore->semaphore = sem_open(semname, O_CREAT | O_EXCL, 0644, value); if (new_semaphore->semaphore == (sem_t *)SEM_FAILED) { return CORE_ERROR; } sem_unlink(semname); *id = (semaphore_id)new_semaphore; return CORE_OK; } status_t semaphore_wait(semaphore_id id) { status_t rv; semaphore_t *semaphore = (semaphore_t *)id; rv = sem_wait(semaphore->semaphore); return rv; } #if HAVE_SEM_TIMEDWAIT status_t semaphore_timedwait(semaphore_id id, c_time_t timeout) { status_t rv; c_time_t then; struct timespec abstime; semaphore_t *semaphore = (semaphore_t *)id; then = time_now() + timeout; abstime.tv_sec = time_sec(then); abstime.tv_nsec = time_usec(then) * 1000; /* nanosesemaphores */ rv = sem_timedwait(semaphore->semaphore, &abstime); if (rv == -1 && ETIMEDOUT == errno) { return CORE_TIMEUP; } return rv; } #endif status_t semaphore_post(semaphore_id id) { status_t rv; semaphore_t *semaphore = (semaphore_t *)id; rv = sem_post(semaphore->semaphore); return rv; } status_t semaphore_delete(semaphore_id id) { status_t rv; semaphore_t *semaphore = (semaphore_t *)id; rv = sem_close(semaphore->semaphore); pool_free_node(&semaphore_pool, semaphore); return rv; } nextepc-0.3.10/lib/core/src/unix/signal.c000066400000000000000000000162521333553357400201530ustar00rootroot00000000000000#include "core.h" #include "core_signal.h" CORE_DECLARE(status_t) core_kill(pid_t pid, int signum) { #ifdef OS2 /* SIGTERM's don't work too well in OS/2 (only affects other EMX * programs). CGIs may not be, esp. REXX scripts, so use a native * call instead */ if (signum == SIGTERM) { return APR_FROM_OS_ERROR(DosSendSignalException(pid, XCPT_SIGNAL_BREAK)); } #endif /* OS2 */ if (kill(pid, signum) == -1) { return errno; } return CORE_OK; } #if HAVE_SIGACTION #if defined(__NetBSD__) || defined(DARWIN) static void avoid_zombies(int signo) { int exit_status; while (waitpid(-1, &exit_status, WNOHANG) > 0) { /* do nothing */ } } #endif /* DARWIN */ /* * Replace standard signal() with the more reliable sigaction equivalent * from W. Richard Stevens' "Advanced Programming in the UNIX Environment" * (the version that does not automatically restart system calls). */ core_sigfunc_t *core_signal(int signo, core_sigfunc_t *func) { struct sigaction act, oact; act.sa_handler = func; sigemptyset(&act.sa_mask); act.sa_flags = 0; #ifdef SA_INTERRUPT /* SunOS */ act.sa_flags |= SA_INTERRUPT; #endif #if defined(__osf__) && defined(__alpha) /* XXX jeff thinks this should be enabled whenever SA_NOCLDWAIT is defined */ /* this is required on Tru64 to cause child processes to * disappear gracefully - XPG4 compatible */ if ((signo == SIGCHLD) && (func == SIG_IGN)) { act.sa_flags |= SA_NOCLDWAIT; } #endif #if defined(__NetBSD__) || defined(DARWIN) /* ignoring SIGCHLD or leaving the default disposition doesn't avoid zombies, * and there is no SA_NOCLDWAIT flag, so catch the signal and reap status in * the handler to avoid zombies */ if ((signo == SIGCHLD) && (func == SIG_IGN)) { act.sa_handler = avoid_zombies; } #endif if (sigaction(signo, &act, &oact) < 0) return SIG_ERR; return oact.sa_handler; } #endif static void remove_sync_sigs(sigset_t *sig_mask) { #ifdef SIGABRT sigdelset(sig_mask, SIGABRT); #endif #ifdef SIGBUS sigdelset(sig_mask, SIGBUS); #endif #ifdef SIGEMT sigdelset(sig_mask, SIGEMT); #endif #ifdef SIGFPE sigdelset(sig_mask, SIGFPE); #endif #ifdef SIGILL sigdelset(sig_mask, SIGILL); #endif #ifdef SIGIOT sigdelset(sig_mask, SIGIOT); #endif #ifdef SIGPIPE sigdelset(sig_mask, SIGPIPE); #endif #ifdef SIGSEGV sigdelset(sig_mask, SIGSEGV); #endif #ifdef SIGSYS sigdelset(sig_mask, SIGSYS); #endif #ifdef SIGTRAP sigdelset(sig_mask, SIGTRAP); #endif #ifdef SIGCHLD sigdelset(sig_mask, SIGCHLD); #endif #ifdef SIGWINCH sigdelset(sig_mask, SIGWINCH); #endif /* the rest of the signals removed from the mask in this function * absolutely must be removed; you cannot block synchronous signals * (requirement of pthreads API) * * SIGUSR2 is being removed from the mask for the convenience of * Purify users (Solaris, HP-UX, SGI) since Purify uses SIGUSR2 */ #ifdef SIGUSR2 sigdelset(sig_mask, SIGUSR2); #endif } status_t signal_thread(int (*signal_handler)(int signum)) { sigset_t sig_mask; int (*sig_func)(int signum) = (int (*)(int))signal_handler; /* This thread will be the one responsible for handling signals */ sigfillset(&sig_mask); /* On certain platforms, sigwait() returns EINVAL if any of various * unblockable signals are included in the mask. This was first * observed on AIX and Tru64. */ #ifdef SIGKILL sigdelset(&sig_mask, SIGKILL); #endif #ifdef SIGSTOP sigdelset(&sig_mask, SIGSTOP); #endif #ifdef SIGCONT sigdelset(&sig_mask, SIGCONT); #endif #ifdef SIGWAITING sigdelset(&sig_mask, SIGWAITING); #endif /* no synchronous signals should be in the mask passed to sigwait() */ remove_sync_sigs(&sig_mask); /* On AIX (4.3.3, at least), sigwait() won't wake up if the high- * order bit of the second word of flags is turned on. sigdelset() * returns an error when trying to turn this off, so we'll turn it * off manually. * * Note that the private fields differ between 32-bit and 64-bit * and even between _ALL_SOURCE and !_ALL_SOURCE. Except that on * AIX 4.3 32-bit builds and 64-bit builds use the same definition. * * Applicable AIX fixes such that this is no longer needed: * * APAR IY23096 for AIX 51B, fix included in AIX 51C, and * APAR IY24162 for 43X. */ #if defined(_AIX) #if defined(__64BIT__) && defined(_AIXVERSION_510) #ifdef _ALL_SOURCE sig_mask.ss_set[3] &= 0x7FFFFFFF; #else /* not _ALL_SOURCE */ sig_mask.__ss_set[3] &= 0x7FFFFFFF; #endif #else /* not 64-bit build, or 64-bit build on 4.3 */ #ifdef _ALL_SOURCE sig_mask.hisigs &= 0x7FFFFFFF; #else /* not _ALL_SOURCE */ sig_mask.__hisigs &= 0x7FFFFFFF; #endif #endif #endif /* _AIX */ while (1) { #if HAVE_SIGWAIT int signal_received; if (sigwait(&sig_mask, &signal_received) != 0) { /* handle sigwait() error here */ } if (sig_func(signal_received) == 1) { return CORE_OK; } #elif HAVE_SIGSUSPEND sigsuspend(&sig_mask); #else #error No sigwait() and no sigsuspend() #endif } } status_t signal_init(void) { sigset_t sig_mask; int rv; /* All threads should mask out signals to be handled by * the thread doing sigwait(). * * No thread should ever block synchronous signals. * See the Solaris man page for pthread_sigmask() for * some information. Solaris chooses to knock out such * processes when a blocked synchronous signal is * delivered, skipping any registered signal handler. * AIX doesn't call a signal handler either. At least * one level of linux+glibc does call the handler even * when the synchronous signal is blocked. */ sigfillset(&sig_mask); remove_sync_sigs(&sig_mask); #if defined(SIGPROCMASK_SETS_THREAD_MASK) || ! APR_HAS_THREADS if ((rv = sigprocmask(SIG_SETMASK, &sig_mask, NULL)) != 0) { rv = errno; } #else if ((rv = pthread_sigmask(SIG_SETMASK, &sig_mask, NULL)) != 0) { #ifdef HAVE_ZOS_PTHREADS rv = errno; #endif } #endif return rv; } status_t signal_block(int signum) { #if HAVE_SIGACTION sigset_t sig_mask; int rv; sigemptyset(&sig_mask); sigaddset(&sig_mask, signum); #if defined(SIGPROCMASK_SETS_THREAD_MASK) if ((rv = sigprocmask(SIG_BLOCK, &sig_mask, NULL)) != 0) { rv = errno; } #else if ((rv = pthread_sigmask(SIG_BLOCK, &sig_mask, NULL)) != 0) { #ifdef HAVE_ZOS_PTHREADS rv = errno; #endif } #endif return rv; #else return CORE_ENOTIMPL; #endif } status_t signal_unblock(int signum) { #if HAVE_SIGACTION sigset_t sig_mask; int rv; sigemptyset(&sig_mask); sigaddset(&sig_mask, signum); #if defined(SIGPROCMASK_SETS_THREAD_MASK) if ((rv = sigprocmask(SIG_UNBLOCK, &sig_mask, NULL)) != 0) { rv = errno; } #else if ((rv = pthread_sigmask(SIG_UNBLOCK, &sig_mask, NULL)) != 0) { #ifdef HAVE_ZOS_PTHREADS rv = errno; #endif } #endif return rv; #else return CORE_ENOTIMPL; #endif } nextepc-0.3.10/lib/core/src/unix/sockaddr.c000066400000000000000000000316351333553357400204720ustar00rootroot00000000000000#define TRACE_MODULE _sockaddr #include "core_debug.h" #include "core_lib.h" #include "core_pkbuf.h" #include "core_arch_network.h" status_t core_getaddrinfo(c_sockaddr_t **sa_list, int family, const char *hostname, c_uint16_t port, int flags) { *sa_list = NULL; return core_addaddrinfo(sa_list, family, hostname, port, flags); } status_t core_freeaddrinfo(c_sockaddr_t *sa_list) { c_sockaddr_t *next = NULL, *addr = NULL; addr = sa_list; while(addr) { next = addr->next; CORE_FREE(addr); addr = next; } return CORE_OK; } status_t core_addaddrinfo(c_sockaddr_t **sa_list, int family, const char *hostname, c_uint16_t port, int flags) { int rc; char service[NI_MAXSERV]; struct addrinfo hints, *ai, *ai_list; c_sockaddr_t *prev; char buf[CORE_ADDRSTRLEN]; d_assert(sa_list, return CORE_ERROR,); memset(&hints, 0, sizeof(hints)); hints.ai_family = family; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = flags; snprintf(service, sizeof(service), "%u", port); rc = getaddrinfo(hostname, service, &hints, &ai_list); if (rc != 0) { d_error("getaddrinfo(%d:%s:%d:0x%x) failed(%d:%s)", family, hostname, port, flags, errno, strerror(errno)); return CORE_ERROR; } prev = NULL; if (*sa_list) { prev = *sa_list; while(prev->next) prev = prev->next; } for (ai = ai_list; ai; ai = ai->ai_next) { c_sockaddr_t *new; if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6) continue; new = core_calloc(1, sizeof(c_sockaddr_t)); memcpy(&new->sa, ai->ai_addr, ai->ai_addrlen); new->c_sa_port = htons(port); d_trace(3, "addr:%s, port:%d\n", CORE_ADDR(new, buf), port); if (!prev) *sa_list = new; else prev->next = new; prev = new; } freeaddrinfo(ai_list); if (prev == NULL) { d_error("core_getaddrinfo(%d:%s:%d:%d) failed(%d:%s)", family, hostname, port, flags, errno, strerror(errno)); return CORE_ERROR; } return CORE_OK; } status_t core_filteraddrinfo(c_sockaddr_t **sa_list, int family) { c_sockaddr_t *addr = NULL, *prev = NULL, *next = NULL; d_assert(sa_list, return CORE_ERROR,); prev = NULL; addr = *sa_list; while(addr) { next = addr->next; if (addr->c_sa_family != family) { if (prev) prev->next = addr->next; else *sa_list = addr->next; CORE_FREE(addr); } else { prev = addr; } addr = next; } return CORE_OK; } status_t core_copyaddrinfo(c_sockaddr_t **dst, const c_sockaddr_t *src) { c_sockaddr_t *d; const c_sockaddr_t *s; for (*dst = d = NULL, s = src; s; s = s->next) { if (!d) { d = core_calloc(1, sizeof *s); *dst = memcpy(d, s, sizeof *s); } else { d->next = core_calloc(1, sizeof(c_sockaddr_t)); d = memcpy(d->next, s, sizeof *s); } } return CORE_OK; } status_t core_sortaddrinfo(c_sockaddr_t **sa_list, int family) { c_sockaddr_t *head = NULL, *addr = NULL, *new = NULL, *old = NULL; d_assert(sa_list, return CORE_ERROR,); old = *sa_list; while(old) { addr = old; old = old->next; if (head == NULL || addr->c_sa_family == family) { addr->next = head; head = addr; } else { new = head; while(new->next != NULL && new->next->c_sa_family != family) { new = new->next; } addr->next = new->next; new->next = addr; } } *sa_list = head; return CORE_OK; } c_sockaddr_t *core_link_local_addr_by_dev(const char *dev) { struct ifaddrs *iflist, *cur; int rc; d_assert(dev, return NULL,); rc = getifaddrs(&iflist); if (rc != 0) { d_error("getifaddrs failed(%d:%s)", errno, strerror(errno)); return NULL; } for (cur = iflist; cur != NULL; cur = cur->ifa_next) { c_sockaddr_t *addr = NULL; if (cur->ifa_addr == NULL) /* may happen with ppp interfaces */ continue; if (strcmp(dev, cur->ifa_name) != 0) continue; if (cur->ifa_addr->sa_family == AF_INET) continue; addr = (c_sockaddr_t *)cur->ifa_addr; if (!IN6_IS_ADDR_LINKLOCAL(&addr->sin6.sin6_addr)) continue; addr = core_calloc(1, sizeof(c_sockaddr_t)); d_assert(addr, return NULL,); memcpy(&addr->sa, cur->ifa_addr, sockaddr_len(cur->ifa_addr)); freeifaddrs(iflist); return addr; } freeifaddrs(iflist); return NULL; } const char *core_inet_ntop(void *sa, char *buf, int buflen) { int family; c_sockaddr_t *sockaddr = NULL; d_assert(buf, return NULL,); sockaddr = sa; d_assert(sockaddr, return NULL,); family = sockaddr->c_sa_family; switch(family) { case AF_INET: d_assert(buflen >= INET_ADDRSTRLEN, return NULL,); return inet_ntop(family, &sockaddr->sin.sin_addr, buf, INET_ADDRSTRLEN); case AF_INET6: d_assert(buflen >= CORE_ADDRSTRLEN, return NULL,); return inet_ntop(family, &sockaddr->sin6.sin6_addr, buf, INET6_ADDRSTRLEN); default: d_assert(0, return NULL, "Unknown family(%d)", family); } } status_t core_inet_pton(int family, const char *src, void *sa) { c_sockaddr_t *dst = NULL; d_assert(src, return CORE_ERROR,); dst = sa; d_assert(dst, return CORE_ERROR,); dst->c_sa_family = family; switch(family) { case AF_INET: return inet_pton(family, src, &dst->sin.sin_addr) == 1 ? CORE_OK : CORE_ERROR; case AF_INET6: return inet_pton(family, src, &dst->sin6.sin6_addr) == 1 ? CORE_OK : CORE_ERROR; default: d_assert(0, return CORE_ERROR, "Unknown family(%d)", family); } } socklen_t sockaddr_len(const void *sa) { const c_sockaddr_t *sockaddr = sa; d_assert(sa, return 0,); switch(sockaddr->c_sa_family) { case AF_INET: return sizeof(struct sockaddr_in); case AF_INET6: return sizeof(struct sockaddr_in6); default: d_assert(0, return 0, "Unknown family(%d)", sockaddr->c_sa_family); } } int sockaddr_is_equal(void *p, void *q) { c_sockaddr_t *a, *b; a = p; d_assert(a, return 0,); b = q; d_assert(b, return 0,); if (a->c_sa_family != b->c_sa_family) return 0; if (a->c_sa_family == AF_INET && memcmp( &a->sin.sin_addr, &b->sin.sin_addr, sizeof(struct in_addr)) == 0) return 1; else if (a->c_sa_family == AF_INET6 && memcmp( &a->sin6.sin6_addr, &b->sin6.sin6_addr, sizeof(struct in6_addr)) == 0) return 1; else d_assert(0, return 0, "Unknown family(%d)", a->c_sa_family); return 0; } static status_t parse_network(ipsubnet_t *ipsub, const char *network) { /* legacy syntax for ip addrs: a.b.c. ==> a.b.c.0/24 for example */ int shift; char *s, *t; int octet; char buf[sizeof "255.255.255.255"]; if (strlen(network) < sizeof buf) { strcpy(buf, network); } else { return CORE_EBADIP; } /* parse components */ s = buf; ipsub->sub[0] = 0; ipsub->mask[0] = 0; shift = 24; while (*s) { t = s; if (!c_isdigit(*t)) { return CORE_EBADIP; } while (c_isdigit(*t)) { ++t; } if (*t == '.') { *t++ = 0; } else if (*t) { return CORE_EBADIP; } if (shift < 0) { return CORE_EBADIP; } octet = atoi(s); if (octet < 0 || octet > 255) { return CORE_EBADIP; } ipsub->sub[0] |= octet << shift; ipsub->mask[0] |= 0xFFUL << shift; s = t; shift -= 8; } ipsub->sub[0] = ntohl(ipsub->sub[0]); ipsub->mask[0] = ntohl(ipsub->mask[0]); ipsub->family = AF_INET; return CORE_OK; } /* return values: * CORE_EINVAL not an IP address; caller should see * if it is something else * CORE_BADIP IP address portion is is not valid * CORE_BADMASK mask portion is not valid */ static status_t parse_ip( ipsubnet_t *ipsub, const char *ipstr, int network_allowed) { /* supported flavors of IP: * * . IPv6 numeric address string (e.g., "fe80::1") * * IMPORTANT: Don't store IPv4-mapped IPv6 address as an IPv6 address. * * . IPv4 numeric address string (e.g., "127.0.0.1") * * . IPv4 network string (e.g., "9.67") * * IMPORTANT: This network form is only allowed if network_allowed is on. */ int rc; rc = inet_pton(AF_INET6, ipstr, ipsub->sub); if (rc == 1) { if (IN6_IS_ADDR_V4MAPPED((struct in6_addr *)ipsub->sub)) { /* ipsubnet_test() assumes that we don't create IPv4-mapped IPv6 * addresses; this of course forces the user to specify * IPv4 addresses in a.b.c.d style instead of ::ffff:a.b.c.d style. */ d_error("Cannot support IPv4-mapped IPv6: " "Use IPv4 address in a.b.c.d style " "instead of ::ffff:a.b.c.d style"); return CORE_EBADIP; } ipsub->family = AF_INET6; } else { rc = inet_pton(AF_INET, ipstr, ipsub->sub); if (rc == 1) { ipsub->family = AF_INET; } } if (rc != 1) { if (network_allowed) { return parse_network(ipsub, ipstr); } else { return CORE_EBADIP; } } return CORE_OK; } static int looks_like_ip(const char *ipstr) { if (strlen(ipstr) == 0) { return 0; } if (strchr(ipstr, ':')) { /* definitely not a hostname; * assume it is intended to be an IPv6 address */ return 1; } /* simple IPv4 address string check */ while ((*ipstr == '.') || c_isdigit(*ipstr)) ipstr++; return (*ipstr == '\0'); } static void fix_subnet(ipsubnet_t *ipsub) { /* in case caller specified more bits in network address than are * valid according to the mask, turn off the extra bits */ int i; for (i = 0; i < sizeof ipsub->mask / sizeof(c_int32_t); i++) { ipsub->sub[i] &= ipsub->mask[i]; } } /* be sure not to store any IPv4 address as a v4-mapped IPv6 address */ CORE_DECLARE(status_t) core_ipsubnet( ipsubnet_t *ipsub, const char *ipstr, const char *mask_or_numbits) { status_t rv; char *endptr; long bits, maxbits = 32; d_assert(ipsub, return CORE_ERROR,); d_assert(ipstr, return CORE_ERROR,); /* filter out stuff which doesn't look remotely like an IP address; * this helps callers like mod_access which have a syntax allowing * hostname or IP address; * CORE_EINVAL tells the caller that it was probably not intended * to be an IP address */ if (!looks_like_ip(ipstr)) { d_error("looks_like_ip() is failed"); return CORE_EINVAL; } /* assume ipstr is an individual IP address, not a subnet */ memset(ipsub->mask, 0xFF, sizeof ipsub->mask); rv = parse_ip(ipsub, ipstr, mask_or_numbits == NULL); if (rv != CORE_OK) { d_error("parse_ip() is failed"); return rv; } if (mask_or_numbits) { if (ipsub->family == AF_INET6) { maxbits = 128; } bits = strtol(mask_or_numbits, &endptr, 10); if (*endptr == '\0' && bits > 0 && bits <= maxbits) { /* valid num-bits string; fill in mask appropriately */ int cur_entry = 0; c_int32_t cur_bit_value; memset(ipsub->mask, 0, sizeof ipsub->mask); while (bits > 32) { ipsub->mask[cur_entry] = 0xFFFFFFFF; /* all 32 bits */ bits -= 32; ++cur_entry; } cur_bit_value = 0x80000000; while (bits) { ipsub->mask[cur_entry] |= cur_bit_value; --bits; cur_bit_value /= 2; } ipsub->mask[cur_entry] = htonl(ipsub->mask[cur_entry]); } else if (inet_pton(AF_INET, mask_or_numbits, ipsub->mask) == 1 && ipsub->family == AF_INET) { /* valid IPv4 netmask */ } else { d_error("Bad netmask"); return CORE_EBADMASK; } } fix_subnet(ipsub); return CORE_OK; } nextepc-0.3.10/lib/core/src/unix/socket.c000066400000000000000000000443451333553357400201720ustar00rootroot00000000000000#define TRACE_MODULE _sock #include "core_pool.h" #include "core_debug.h" #include "core_pkbuf.h" #include "core_arch_network.h" #define MAX_SOCK_POOL_SIZE 512 #define MAX_SOCK_NODE_POOL_SIZE 512 static int max_fd; static list_t fd_list; static fd_set read_fds; static mutex_id mutex; pool_declare(sock_pool, sock_t, MAX_SOCK_POOL_SIZE); pool_declare(sock_node_pool, sock_node_t, MAX_SOCK_NODE_POOL_SIZE); static status_t sononblock(int sd); static status_t soblock(int sd); static void set_fds(fd_set *fds); static void fd_dispatch(fd_set *fds); /* * Init/Final */ status_t network_init(void) { mutex_create(&mutex, MUTEX_DEFAULT); pool_init(&sock_pool, MAX_SOCK_POOL_SIZE); pool_init(&sock_node_pool, MAX_SOCK_NODE_POOL_SIZE); max_fd = 0; list_init(&fd_list); memset(&read_fds, 0, sizeof(fd_set)); return CORE_OK; } status_t network_final(void) { if (pool_size(&sock_pool) != pool_avail(&sock_pool)) d_error("%d not freed in sock_pool[%d]", pool_size(&sock_pool) - pool_avail(&sock_pool), pool_size(&sock_pool)); d_trace(3, "%d not freed in sock_pool[%d]\n", pool_size(&sock_pool) - pool_avail(&sock_pool), pool_size(&sock_pool)); if (pool_size(&sock_node_pool) != pool_avail(&sock_node_pool)) d_error("%d not freed in sock_node_pool[%d]", pool_size(&sock_node_pool) - pool_avail(&sock_node_pool), pool_size(&sock_node_pool)); d_trace(3, "%d not freed in sock_node_pool[%d]\n", pool_size(&sock_node_pool) - pool_avail(&sock_node_pool), pool_size(&sock_node_pool)); pool_final(&sock_pool); pool_final(&sock_node_pool); mutex_delete(mutex); return CORE_OK; } /* * Socket */ status_t sock_create(sock_id *new) { sock_t *sock = NULL; pool_alloc_node(&sock_pool, &sock); d_assert(sock, return CORE_ENOMEM,); memset(sock, 0, sizeof(sock_t)); sock->fd = -1; *new = (sock_id)sock; return CORE_OK; } status_t sock_delete(sock_id id) { sock_t *sock = (sock_t *)id; d_assert(id, return CORE_ERROR,); if (sock_is_registered(id)) sock_unregister(id); if (sock->fd >= 0) close(sock->fd); sock->fd = -1; pool_free_node(&sock_pool, sock); return CORE_OK; } status_t sock_delete_list(list_t *list) { status_t rv; sock_node_t *snode; d_assert(list, return CORE_ERROR,); for (snode = list_first(list); snode; snode = list_next(snode)) { rv = sock_delete(snode->sock); d_assert(rv == CORE_OK, return CORE_ERROR,); } return CORE_OK; } status_t sock_socket(sock_id *new, int family, int type, int protocol) { status_t rv; sock_t *sock = NULL; rv = sock_create(new); d_assert(rv == CORE_OK, return CORE_ERROR,); sock = (sock_t *)(*new); sock->family = family; sock->fd = socket(sock->family, type, protocol); if (sock->fd < 0) { d_warn("socket create(%d:%d:%d) failed(%d:%s)", sock->family, type, protocol, errno, strerror(errno)); return CORE_ERROR; } d_trace(1, "socket create(%d:%d:%d)\n", sock->family, type, protocol); return CORE_OK; } status_t sock_setsockopt(sock_id id, c_int32_t opt, c_int32_t on) { sock_t *sock = (sock_t *)id; int one; status_t rv; d_assert(sock, return CORE_ERROR,); if (on) one = 1; else one = 0; switch(opt) { case SOCK_O_REUSEADDR: if (on != sock_is_option_set(sock, SOCK_O_REUSEADDR)) { if (setsockopt(sock->fd, SOL_SOCKET, SO_REUSEADDR, (void *)&one, sizeof(int)) == -1) { return errno; } sock_set_option(sock, SOCK_O_REUSEADDR, on); } break; case SOCK_O_NONBLOCK: if (sock_is_option_set(sock, SOCK_O_NONBLOCK) != on) { if (on) { if ((rv = sononblock(sock->fd)) != CORE_OK) return rv; } else { if ((rv = soblock(sock->fd)) != CORE_OK) return rv; } sock_set_option(sock, SOCK_O_NONBLOCK, on); } break; default: d_error("Not implemented(%d)", opt); return CORE_EINVAL; } return CORE_OK; } status_t sock_bind(sock_id id, c_sockaddr_t *addr) { sock_t *sock = (sock_t *)id; char buf[CORE_ADDRSTRLEN]; socklen_t addrlen; d_assert(sock, return CORE_ERROR,); d_assert(addr, return CORE_ERROR,); addrlen = sockaddr_len(addr); d_assert(addrlen, return CORE_ERROR,); if (bind(sock->fd, &addr->sa, addrlen) != 0) { d_error("socket bind(%d) [%s]:%d failed(%d:%s)", addr->c_sa_family, CORE_ADDR(addr, buf), CORE_PORT(addr), errno, strerror(errno)); return CORE_ERROR; } memcpy(&sock->local_addr, addr, sizeof(sock->local_addr)); d_trace(1, "socket bind %s:%d\n", CORE_ADDR(addr, buf), CORE_PORT(addr)); return CORE_OK; } status_t sock_connect(sock_id id, c_sockaddr_t *addr) { sock_t *sock = (sock_t *)id; char buf[CORE_ADDRSTRLEN]; socklen_t addrlen; d_assert(sock, return CORE_ERROR,); d_assert(addr, return CORE_ERROR,); addrlen = sockaddr_len(addr); d_assert(addrlen, return CORE_ERROR,); if (connect(sock->fd, &addr->sa, addrlen) != 0) { d_error("socket connect[%s]:%d failed(%d:%s)", CORE_ADDR(addr, buf), CORE_PORT(addr), errno, strerror(errno)); return CORE_ERROR; } memcpy(&sock->remote_addr, addr, sizeof(sock->remote_addr)); d_trace(1, "socket connect %s:%d\n", CORE_ADDR(addr, buf), CORE_PORT(addr)); return CORE_OK; } status_t sock_listen(sock_id id) { int rc; sock_t *sock = (sock_t *)id; d_assert(sock, return CORE_ERROR,); rc = listen(sock->fd, 5); if (rc < 0) { d_error("listen failed(%d:%s)", errno, strerror(errno)); return CORE_ERROR; } return CORE_OK; } status_t sock_accept(sock_id *new, sock_id id) { sock_t *sock = (sock_t *)id; sock_t *new_sock = NULL; int new_fd = -1; c_sockaddr_t addr; socklen_t addrlen; memset(&addr, 0, sizeof(addr)); addrlen = sizeof(addr.ss); d_assert(id, return CORE_ERROR,); new_fd = accept(sock->fd, &addr.sa, &addrlen); if (new_fd < 0) { d_error("accept failed(%d:%s)", errno, strerror(errno)); return CORE_ERROR; } pool_alloc_node(&sock_pool, &new_sock); d_assert(new_sock, return CORE_ENOMEM,); memset(new_sock, 0, sizeof(sock_t)); new_sock->family = sock->family; new_sock->fd = new_fd; memcpy(&new_sock->remote_addr, &addr, sizeof(new_sock->remote_addr)); *new = (sock_id)new_sock; return CORE_OK; } int sock_family(sock_id id) { sock_t *sock = (sock_t *)id; d_assert(id, return -1,); return sock->family; } c_sockaddr_t *sock_local_addr(sock_id id) { sock_t *sock = (sock_t *)id; d_assert(id, return NULL,); return &sock->local_addr; } c_sockaddr_t *sock_remote_addr(sock_id id) { sock_t *sock = (sock_t *)id; d_assert(id, return NULL,); return &sock->remote_addr; } /* * Socket Node */ status_t sock_add_node( list_t *list, sock_node_t **node, c_sockaddr_t *sa_list, int family) { status_t rv; c_sockaddr_t *new_list = NULL; d_assert(list, return CORE_OK,); d_assert(node, return CORE_OK,); d_assert(sa_list, return CORE_OK,); rv = core_copyaddrinfo(&new_list, sa_list); d_assert(rv == CORE_OK, return CORE_OK,); if (family != AF_UNSPEC) { rv = core_filteraddrinfo(&new_list, family); d_assert(rv == CORE_OK, return CORE_OK,); } if (new_list) { pool_alloc_node(&sock_node_pool, node); d_assert(*node, return CORE_OK,); memset(*node, 0, sizeof(sock_node_t)); (*node)->list = new_list; list_append(list, *node); } return CORE_OK; } status_t sock_remove_node(list_t *list, sock_node_t *node) { d_assert(node, return CORE_ERROR,); list_remove(list, node); core_freeaddrinfo(node->list); pool_free_node(&sock_node_pool, node); return CORE_OK; } status_t sock_remove_all_nodes(list_t *list) { sock_node_t *node = NULL, *next_node = NULL; node = list_first(list); while(node) { next_node = list_next(node); sock_remove_node(list, node); node = next_node; } return CORE_OK; } status_t sock_probe_node( list_t *list, list_t *list6, const char *dev, c_uint16_t port) { sock_node_t *node = NULL; struct ifaddrs *iflist, *cur; int rc; rc = getifaddrs(&iflist); if (rc != 0) { d_error("getifaddrs failed(%d:%s)", errno, strerror(errno)); return CORE_ERROR; } for (cur = iflist; cur != NULL; cur = cur->ifa_next) { c_sockaddr_t *addr = NULL; if (cur->ifa_flags & IFF_LOOPBACK) continue; if (cur->ifa_flags & IFF_POINTOPOINT) continue; if (cur->ifa_addr == NULL) /* may happen with ppp interfaces */ continue; if (dev && strcmp(dev, cur->ifa_name) != 0) continue; addr = (c_sockaddr_t *)cur->ifa_addr; if (cur->ifa_addr->sa_family == AF_INET) { if (!list) continue; #ifndef IN_IS_ADDR_LOOPBACK #define IN_IS_ADDR_LOOPBACK(a) \ ((((long int) (a)->s_addr) & ntohl(0xff000000)) == ntohl(0x7f000000)) #endif /* IN_IS_ADDR_LOOPBACK */ /* An IP equivalent to IN6_IS_ADDR_UNSPECIFIED */ #ifndef IN_IS_ADDR_UNSPECIFIED #define IN_IS_ADDR_UNSPECIFIED(a) \ (((long int) (a)->s_addr) == 0x00000000) #endif /* IN_IS_ADDR_UNSPECIFIED */ if (IN_IS_ADDR_UNSPECIFIED(&addr->sin.sin_addr) || IN_IS_ADDR_LOOPBACK(&addr->sin.sin_addr)) continue; } else if (cur->ifa_addr->sa_family == AF_INET6) { if (!list6) continue; if (IN6_IS_ADDR_UNSPECIFIED(&addr->sin6.sin6_addr) || IN6_IS_ADDR_LOOPBACK(&addr->sin6.sin6_addr) || IN6_IS_ADDR_MULTICAST(&addr->sin6.sin6_addr) || IN6_IS_ADDR_LINKLOCAL(&addr->sin6.sin6_addr) || IN6_IS_ADDR_SITELOCAL(&addr->sin6.sin6_addr)) continue; } else continue; addr = core_calloc(1, sizeof(c_sockaddr_t)); d_assert(addr, return CORE_ERROR,); memcpy(&addr->sa, cur->ifa_addr, sockaddr_len(cur->ifa_addr)); addr->c_sa_port = htons(port); pool_alloc_node(&sock_node_pool, &node); d_assert(node, return CORE_ERROR,); memset(node, 0, sizeof(sock_node_t)); node->list = addr; if (addr->c_sa_family == AF_INET) { d_assert(list, return CORE_ERROR,); list_append(list, node); } else if (addr->c_sa_family == AF_INET6) { d_assert(list6, return CORE_ERROR,); list_append(list6, node); } else d_assert(0, return CORE_ERROR,); } freeifaddrs(iflist); return CORE_OK; } status_t sock_fill_scope_id_in_local(c_sockaddr_t *sa_list) { struct ifaddrs *iflist = NULL, *cur; int rc; c_sockaddr_t *addr, *ifaddr; for (addr = sa_list; addr != NULL; addr = addr->next) { if (addr->c_sa_family != AF_INET6) continue; if (!IN6_IS_ADDR_LINKLOCAL(&addr->sin6.sin6_addr)) continue; if (addr->sin6.sin6_scope_id != 0) continue; if (iflist == NULL) { rc = getifaddrs(&iflist); if (rc != 0) { d_error("getifaddrs failed(%d:%s)", errno, strerror(errno)); return CORE_ERROR; } } for (cur = iflist; cur != NULL; cur = cur->ifa_next) { ifaddr = (c_sockaddr_t *)cur->ifa_addr; if (cur->ifa_addr == NULL) /* may happen with ppp interfaces */ continue; if (cur->ifa_addr->sa_family != AF_INET6) continue; if (!IN6_IS_ADDR_LINKLOCAL(&ifaddr->sin6.sin6_addr)) continue; if (memcmp(&addr->sin6.sin6_addr, &ifaddr->sin6.sin6_addr, sizeof(struct in6_addr)) == 0) { /* Fill Scope ID in localhost */ addr->sin6.sin6_scope_id = ifaddr->sin6.sin6_scope_id; } } } if (iflist) freeifaddrs(iflist); return CORE_OK; } /* * Send/Recv */ ssize_t sock_write(sock_id id, const void *buf, size_t len) { sock_t *sock = (sock_t *)id; ssize_t size; d_assert(id, return -1,); size = write(sock->fd, buf, len); if (size < 0) { d_error("sock_write(len:%ld) failed(%d:%s)", len, errno, strerror(errno)); } return size; } ssize_t sock_read(sock_id id, void *buf, size_t len) { sock_t *sock = (sock_t *)id; ssize_t size; d_assert(id, return -1,); size = read(sock->fd, buf, len); if (size < 0) { d_error("sock_read(len:%ld) failed(%d:%s)", len, errno, strerror(errno)); } return size; } ssize_t core_send(sock_id id, const void *buf, size_t len, int flags) { sock_t *sock = (sock_t *)id; ssize_t size; d_assert(id, return -1,); size = send(sock->fd, buf, len, flags); if (size < 0) { d_error("core_send(len:%ld) failed(%d:%s)", len, errno, strerror(errno)); } return size; } ssize_t core_sendto(sock_id id, const void *buf, size_t len, int flags, const c_sockaddr_t *to) { sock_t *sock = (sock_t *)id; ssize_t size; socklen_t addrlen; d_assert(id, return -1,); d_assert(to, return -1,); addrlen = sockaddr_len(to); d_assert(addrlen, return CORE_ERROR,); size = sendto(sock->fd, buf, len, flags, &to->sa, addrlen); if (size < 0) { d_error("core_sendto(len:%ld) failed(%d:%s)", len, errno, strerror(errno)); } return size; } ssize_t core_recv(sock_id id, void *buf, size_t len, int flags) { sock_t *sock = (sock_t *)id; ssize_t size; d_assert(id, return -1,); size = recv(sock->fd, buf, len, flags); if (size < 0) { d_error("core_recv(len:%ld) failed(%d:%s)", len, errno, strerror(errno)); } return size; } ssize_t core_recvfrom(sock_id id, void *buf, size_t len, int flags, c_sockaddr_t *from) { sock_t *sock = (sock_t *)id; ssize_t size; socklen_t addrlen = sizeof(struct sockaddr_storage); d_assert(id, return -1,); d_assert(from, return -1,); size = recvfrom(sock->fd, buf, len, flags, &from->sa, &addrlen); if (size < 0) { d_error("corek_recvfrom(len:%ld) failed(%d:%s)", len, errno, strerror(errno)); } return size; } /* * Select Loop */ status_t sock_register(sock_id id, sock_handler handler, void *data) { sock_t *sock = (sock_t *)id; d_assert(id, return CORE_ERROR,); if (sock_is_registered(id)) { d_error("socket has already been registered"); return CORE_ERROR; } if (sock_setsockopt(id, SOCK_O_NONBLOCK, 1) == CORE_ERROR) { d_error("cannot set socket to non-block"); return CORE_ERROR; } if (sock->fd > max_fd) { max_fd = sock->fd; } sock->handler = handler; sock->data = data; list_append(&fd_list, sock); return CORE_OK; } status_t sock_unregister(sock_id id) { d_assert(id, return CORE_ERROR,); list_remove(&fd_list, id); return CORE_OK; } int sock_is_registered(sock_id id) { sock_t *sock = (sock_t *)id; sock_t *iter = NULL; d_assert(id, return CORE_ERROR,); for (iter = list_first(&fd_list); iter != NULL; iter = list_next(iter)) { if (iter == sock) { return 1; } } return 0; } int sock_select_loop(c_time_t timeout) { struct timeval tv; int rc; if (timeout > 0) { tv.tv_sec = time_sec(timeout); tv.tv_usec = time_usec(timeout); } set_fds(&read_fds); rc = select(max_fd + 1, &read_fds, NULL, NULL, timeout > 0 ? &tv : NULL); if (rc < 0) { if (errno != EINTR && errno != 0) d_error("select failed(%d:%s)", errno, strerror(errno)); return rc; } /* Timeout */ if (rc == 0) { return rc; } /* Dispatch Handler */ fd_dispatch(&read_fds); return 0; } static status_t soblock(int sd) { /* BeOS uses setsockopt at present for non blocking... */ #ifndef BEOS int fd_flags; fd_flags = fcntl(sd, F_GETFL, 0); #if defined(O_NONBLOCK) fd_flags &= ~O_NONBLOCK; #elif defined(O_NDELAY) fd_flags &= ~O_NDELAY; #elif defined(FNDELAY) fd_flags &= ~FNDELAY; #else #error Please teach CORE how to make sockets blocking on your platform. #endif if (fcntl(sd, F_SETFL, fd_flags) == -1) { return errno; } #else int on = 0; if (setsockopt(sd, SOL_SOCKET, SO_NONBLOCK, &on, sizeof(int)) < 0) return errno; #endif /* BEOS */ return CORE_OK; } static status_t sononblock(int sd) { #ifndef BEOS int fd_flags; fd_flags = fcntl(sd, F_GETFL, 0); #if defined(O_NONBLOCK) fd_flags |= O_NONBLOCK; #elif defined(O_NDELAY) fd_flags |= O_NDELAY; #elif defined(FNDELAY) fd_flags |= FNDELAY; #else #error Please teach CORE how to make sockets non-blocking on your platform. #endif if (fcntl(sd, F_SETFL, fd_flags) == -1) { return errno; } #else int on = 1; if (setsockopt(sd, SOL_SOCKET, SO_NONBLOCK, &on, sizeof(int)) < 0) return errno; #endif /* BEOS */ return CORE_OK; } static void set_fds(fd_set *fds) { sock_t *sock = NULL; FD_ZERO(fds); for (sock = list_first(&fd_list); sock != NULL; sock = list_next(sock)) { FD_SET(sock->fd, fds); } } static void fd_dispatch(fd_set *fds) { sock_t *sock = NULL; for (sock = list_first(&fd_list); sock != NULL; sock = list_next(sock)) { if (FD_ISSET(sock->fd, fds)) { if (sock->handler) { sock->handler((sock_id)sock, sock->data); } } } } nextepc-0.3.10/lib/core/src/unix/start.c000066400000000000000000000035151333553357400200310ustar00rootroot00000000000000#include "core.h" #include "core_general.h" #include "core_debug.h" #include "core_pool.h" #include "core_msgq.h" #include "core_tlv.h" #include "core_timer.h" #include "core_atomic.h" #include "core_mutex.h" #include "core_cond.h" #include "core_rwlock.h" #include "core_semaphore.h" #include "core_thread.h" #include "core_network.h" #include "core_file.h" #include "core_pkbuf.h" #include "core_signal.h" status_t core_app_initialize(int *argc, const char * const * *argv, const char * const * *env) { /* An absolute noop. At present, only Win32 requires this stub, but it's * required in order to move command arguments passed through the service * control manager into the process, and it's required to fix the char* * data passed in from win32 unicode into utf-8, win32's core internal fmt. */ return core_initialize(); } static int initialized = 0; status_t core_initialize(void) { if (initialized++) { return CORE_OK; } /* IMPORTANT: Mutex should be initialized firtly because node-pool * framework uses mutex and it will be used by other xxx_init() */ mutex_init(); semaphore_init(); cond_init(); rwlock_init(); atomic_init(); thread_init(); network_init(); file_init(); pkbuf_init(); tlv_init(); tm_init(); msgq_init(); signal_init(); return CORE_OK; } void core_terminate(void) { initialized--; if (initialized) { return; } /* Reverse ordered finalization */ msgq_final(); tm_final(); tlv_final(); pkbuf_final(); file_final(); network_final(); thread_final(); atomic_final(); rwlock_final(); cond_final(); semaphore_final(); mutex_final(); return; } void core_terminate2(void) { core_terminate(); } nextepc-0.3.10/lib/core/src/unix/tcp.c000066400000000000000000000045071333553357400174640ustar00rootroot00000000000000#define TRACE_MODULE _tcp #include "core_debug.h" #include "core_arch_network.h" status_t tcp_server(sock_id *new, c_sockaddr_t *sa_list) { status_t rv; c_sockaddr_t *addr; char buf[CORE_ADDRSTRLEN]; d_assert(new, return CORE_ERROR,); d_assert(sa_list, return CORE_ERROR,); addr = sa_list; while(addr) { rv = sock_socket(new, addr->c_sa_family, SOCK_STREAM, IPPROTO_TCP); if (rv == CORE_OK) { d_assert(sock_setsockopt(*new, SOCK_O_REUSEADDR, 1) == CORE_OK, return CORE_ERROR, "setsockopt [%s]:%d failed(%d:%s)", CORE_ADDR(addr, buf), CORE_PORT(addr), errno, strerror(errno)); if (sock_bind(*new, addr) == CORE_OK) { d_trace(1, "tcp_server() [%s]:%d\n", CORE_ADDR(addr, buf), CORE_PORT(addr)); break; } rv = sock_delete(*new); d_assert(rv == CORE_OK, return CORE_ERROR,); } addr = addr->next; } if (addr == NULL) { d_error("tcp_server() [%s]:%d failed(%d:%s)", CORE_ADDR(sa_list, buf), CORE_PORT(sa_list), errno, strerror(errno)); return CORE_ERROR; } rv = sock_listen(*new); d_assert(rv == CORE_OK, return CORE_ERROR,); return CORE_OK; } status_t tcp_client(sock_id *new, c_sockaddr_t *sa_list) { status_t rv; c_sockaddr_t *addr; char buf[CORE_ADDRSTRLEN]; d_assert(new, return CORE_ERROR,); d_assert(sa_list, return CORE_ERROR,); addr = sa_list; while(addr) { rv = sock_socket(new, addr->c_sa_family, SOCK_STREAM, IPPROTO_TCP); if (rv == CORE_OK) { if (sock_connect(*new, addr) == CORE_OK) { d_trace(1, "tcp_client() [%s]:%d\n", CORE_ADDR(addr, buf), CORE_PORT(addr)); break; } rv = sock_delete(*new); d_assert(rv == CORE_OK, return CORE_ERROR,); } addr = addr->next; } if (addr == NULL) { d_error("tcp_client() [%s]:%d failed(%d:%s)", CORE_ADDR(sa_list, buf), CORE_PORT(sa_list), errno, strerror(errno)); return CORE_ERROR; } return CORE_OK; } nextepc-0.3.10/lib/core/src/unix/thread.c000066400000000000000000000113321333553357400201370ustar00rootroot00000000000000#include "core.h" #include "core_arch_thread.h" #include "core_portable.h" #include "core_errno.h" #include "core_param.h" #include "core_general.h" #define TRACE_MODULE _thread #include "core_debug.h" #include "core_pool.h" #include "core_semaphore.h" struct thread_stop_info { pthread_t thread; semaphore_id semaphore; }; pool_declare(thread_pool, thread_t, MAX_NUM_OF_THREAD); pool_declare(threadattr_pool, threadattr_t, MAX_NUM_OF_THREADATTR); static struct thread_stop_info thread_stop_info; int thread_should_stop(void) { return (thread_stop_info.thread == pthread_self()); } status_t thread_init(void) { pool_init(&thread_pool, MAX_NUM_OF_THREAD); pool_init(&threadattr_pool, MAX_NUM_OF_THREADATTR); memset(&thread_stop_info, 0, sizeof(thread_stop_info)); semaphore_create(&thread_stop_info.semaphore, 0); return CORE_OK; } status_t thread_final(void) { pool_final(&thread_pool); pool_final(&threadattr_pool); semaphore_delete(thread_stop_info.semaphore); return CORE_OK; } status_t threadattr_create(threadattr_t **new) { status_t stat; pool_alloc_node(&threadattr_pool, &(*new)); d_assert((*new), return CORE_ENOMEM, "threadattr_pool(%d) is not enough\n", MAX_NUM_OF_THREADATTR); stat = pthread_attr_init(&(*new)->attr); if (stat == 0) { return CORE_OK; } return stat; } status_t threadattr_stacksize_set( threadattr_t *attr, size_t stacksize) { int stat; stat = pthread_attr_setstacksize(&attr->attr, stacksize); if (stat == 0) { return CORE_OK; } return stat; } status_t threadattr_delete(threadattr_t *attr) { status_t stat; stat = pthread_attr_destroy(&attr->attr); pool_free_node(&threadattr_pool, attr); if (stat == 0) { return CORE_OK; } return stat; } static void *dummy_worker(void *opaque) { void *func = NULL; thread_t *thread = (thread_t *)opaque; thread->thread = pthread_self(); semaphore_post(thread->semaphore); d_trace(3, "[%d] dummy_worker post semaphore\n", thread->thread); if (!thread_should_stop()) func = thread->func((thread_id)thread, thread->data); d_trace(3, "[%d] thread stopped = %d\n", thread->thread, thread_should_stop()); semaphore_post(thread_stop_info.semaphore); d_trace(3, "[%d] post semaphore for thread_stop_info.semaphore\n", thread->thread); return func; } status_t thread_create(thread_id *id, threadattr_t *attr, thread_start_t func, void *data) { status_t stat; pthread_attr_t *temp; thread_t *new = NULL; pool_alloc_node(&thread_pool, &new); d_assert(new, return CORE_ENOMEM, "thread_pool(%d) is not enough\n", MAX_NUM_OF_THREAD); memset(new, 0, sizeof(thread_id)); new->data = data; new->func = func; semaphore_create(&new->semaphore, 0); if (attr) temp = &attr->attr; else temp = NULL; if ((stat = pthread_create(&new->thread, temp, dummy_worker, new)) != 0) { return stat; } d_trace(3, "thread_create wait\n"); semaphore_wait(new->semaphore); d_trace(3, "thread_create done\n"); *id = (thread_id)new; return CORE_OK; } status_t thread_delete(thread_id id) { thread_t *thread = (thread_t *)id; thread_stop_info.thread = thread->thread; d_trace(3, "thread_stop_info.thread for %d\n", thread_stop_info.thread); semaphore_wait(thread_stop_info.semaphore); d_trace(3, "semaphore_wait done\n"); thread_stop_info.thread = 0; pthread_join(thread->thread, 0); semaphore_delete(thread->semaphore); pool_free_node(&thread_pool, thread); d_trace(3, "delete thread-related memory\n"); return CORE_OK; } status_t thread_join(status_t *retval, thread_id id) { thread_t *thread = (thread_t *)id; status_t stat; status_t *thread_stat; if ((stat = pthread_join(thread->thread, (void *)&thread_stat)) == 0) { *retval = thread->exitval; } semaphore_delete(thread->semaphore); pool_free_node(&thread_pool, thread); return stat; } status_t thread_exit(thread_id id, status_t retval) { thread_t *thread = (thread_t *)id; thread->exitval = retval; pthread_exit(NULL); return CORE_OK; } status_t thread_detach(thread_id id) { thread_t *thread = (thread_t *)id; return pthread_detach(thread->thread); } void thread_yield(void) { #ifdef HAVE_PTHREAD_YIELD pthread_yield(NULL); #else #ifdef HAVE_SCHED_YIELD sched_yield(); #endif #endif } status_t os_thread_get(os_thread_t **thethd, thread_id id) { thread_t *thread = (thread_t *)id; *thethd = &thread->thread; return CORE_OK; } os_thread_t os_thread_current(void) { return pthread_self(); } nextepc-0.3.10/lib/core/src/unix/time.c000066400000000000000000000146361333553357400176400ustar00rootroot00000000000000#include "core.h" #include "core_time.h" static c_int32_t get_offset(struct tm *tm) { #if defined(HAVE_STRUCT_TM_TM_GMTOFF) return tm->tm_gmtoff; #elif defined(HAVE_STRUCT_TM___TM_GMTOFF) return tm->__tm_gmtoff; #else #error cannot support tm->tm_gmtoff #endif } status_t time_ansi_put(c_time_t *result, time_t input) { *result = (c_time_t)input * USEC_PER_SEC; return CORE_OK; } /* NB NB NB NB This returns GMT!!!!!!!!!! */ c_time_t time_now(void) { struct timeval tv; gettimeofday(&tv, NULL); return tv.tv_sec * USEC_PER_SEC + tv.tv_usec; } void core_sleep(c_time_t t) { #ifdef OS2 DosSleep(t/1000); #elif defined(BEOS) snooze(t); #elif defined(NETWARE) delay(t/1000); #else struct timeval tv; tv.tv_usec = t % USEC_PER_SEC; tv.tv_sec = t / USEC_PER_SEC; select(0, NULL, NULL, NULL, &tv); #endif } static void explode_time(time_exp_t *xt, c_time_t t, c_int32_t offset, int use_localtime) { struct tm tm; time_t tt = (t / USEC_PER_SEC) + offset; xt->tm_usec = t % USEC_PER_SEC; #if defined (_POSIX_THREAD_SAFE_FUNCTIONS) if (use_localtime) localtime_r(&tt, &tm); else gmtime_r(&tt, &tm); #else if (use_localtime) tm = *localtime(&tt); else tm = *gmtime(&tt); #endif xt->tm_sec = tm.tm_sec; xt->tm_min = tm.tm_min; xt->tm_hour = tm.tm_hour; xt->tm_mday = tm.tm_mday; xt->tm_mon = tm.tm_mon; xt->tm_year = tm.tm_year; xt->tm_wday = tm.tm_wday; xt->tm_yday = tm.tm_yday; xt->tm_isdst = tm.tm_isdst; xt->tm_gmtoff = get_offset(&tm); } status_t time_exp_tz(time_exp_t *result, c_time_t input, c_int32_t offs) { explode_time(result, input, offs, 0); result->tm_gmtoff = offs; return CORE_OK; } status_t time_exp_gmt(time_exp_t *result, c_time_t input) { return time_exp_tz(result, input, 0); } status_t time_exp_lt(time_exp_t *result, c_time_t input) { #if defined(__EMX__) /* EMX gcc (OS/2) has a timezone global we can use */ return time_exp_tz(result, input, -timezone); #else explode_time(result, input, 0, 1); return CORE_OK; #endif /* __EMX__ */ } status_t time_exp_get(c_time_t *t, time_exp_t *xt) { time_t year = xt->tm_year; time_t days; static const int dayoffset[12] = {306, 337, 0, 31, 61, 92, 122, 153, 184, 214, 245, 275}; /* shift new year to 1st March in order to make leap year calc easy */ if (xt->tm_mon < 2) year--; /* Find number of days since 1st March 1900 (in the Gregorian calendar). */ days = year * 365 + year / 4 - year / 100 + (year / 100 + 3) / 4; days += dayoffset[xt->tm_mon] + xt->tm_mday - 1; days -= 25508; /* 1 jan 1970 is 25508 days since 1 mar 1900 */ days = ((days * 24 + xt->tm_hour) * 60 + xt->tm_min) * 60 + xt->tm_sec; if (days < 0) { return CORE_EBADDATE; } *t = days * USEC_PER_SEC + xt->tm_usec; return CORE_OK; } status_t time_exp_gmt_get(c_time_t *t, time_exp_t *xt) { status_t status = time_exp_get(t, xt); if (status == CORE_OK) *t -= (time_t) xt->tm_gmtoff * USEC_PER_SEC; return status; } const char month_snames[12][4] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" }; const char day_snames[7][4] = { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }; status_t rfc822_date(char *date_str, c_time_t t) { time_exp_t xt; const char *s; int real_year; time_exp_gmt(&xt, t); /* example: "Sat, 08 Jan 2000 18:31:41 GMT" */ /* 12345678901234567890123456789 */ s = &day_snames[xt.tm_wday][0]; *date_str++ = *s++; *date_str++ = *s++; *date_str++ = *s++; *date_str++ = ','; *date_str++ = ' '; *date_str++ = xt.tm_mday / 10 + '0'; *date_str++ = xt.tm_mday % 10 + '0'; *date_str++ = ' '; s = &month_snames[xt.tm_mon][0]; *date_str++ = *s++; *date_str++ = *s++; *date_str++ = *s++; *date_str++ = ' '; real_year = 1900 + xt.tm_year; /* This routine isn't y10k ready. */ *date_str++ = real_year / 1000 + '0'; *date_str++ = real_year % 1000 / 100 + '0'; *date_str++ = real_year % 100 / 10 + '0'; *date_str++ = real_year % 10 + '0'; *date_str++ = ' '; *date_str++ = xt.tm_hour / 10 + '0'; *date_str++ = xt.tm_hour % 10 + '0'; *date_str++ = ':'; *date_str++ = xt.tm_min / 10 + '0'; *date_str++ = xt.tm_min % 10 + '0'; *date_str++ = ':'; *date_str++ = xt.tm_sec / 10 + '0'; *date_str++ = xt.tm_sec % 10 + '0'; *date_str++ = ' '; *date_str++ = 'G'; *date_str++ = 'M'; *date_str++ = 'T'; *date_str++ = 0; return CORE_OK; } status_t core_ctime(char *date_str, c_time_t t) { time_exp_t xt; const char *s; int real_year; /* example: "Wed Jun 30 21:49:08 1993" */ /* 123456789012345678901234 */ time_exp_lt(&xt, t); s = &day_snames[xt.tm_wday][0]; *date_str++ = *s++; *date_str++ = *s++; *date_str++ = *s++; *date_str++ = ' '; s = &month_snames[xt.tm_mon][0]; *date_str++ = *s++; *date_str++ = *s++; *date_str++ = *s++; *date_str++ = ' '; *date_str++ = xt.tm_mday / 10 + '0'; *date_str++ = xt.tm_mday % 10 + '0'; *date_str++ = ' '; *date_str++ = xt.tm_hour / 10 + '0'; *date_str++ = xt.tm_hour % 10 + '0'; *date_str++ = ':'; *date_str++ = xt.tm_min / 10 + '0'; *date_str++ = xt.tm_min % 10 + '0'; *date_str++ = ':'; *date_str++ = xt.tm_sec / 10 + '0'; *date_str++ = xt.tm_sec % 10 + '0'; *date_str++ = ' '; real_year = 1900 + xt.tm_year; *date_str++ = real_year / 1000 + '0'; *date_str++ = real_year % 1000 / 100 + '0'; *date_str++ = real_year % 100 / 10 + '0'; *date_str++ = real_year % 10 + '0'; *date_str++ = 0; return CORE_OK; } status_t core_strftime(char *s, size_t *retsize, size_t max, const char *format, time_exp_t *xt) { struct tm tm; memset(&tm, 0, sizeof tm); tm.tm_sec = xt->tm_sec; tm.tm_min = xt->tm_min; tm.tm_hour = xt->tm_hour; tm.tm_mday = xt->tm_mday; tm.tm_mon = xt->tm_mon; tm.tm_year = xt->tm_year; tm.tm_wday = xt->tm_wday; tm.tm_yday = xt->tm_yday; tm.tm_isdst = xt->tm_isdst; #if defined(HAVE_STRUCT_TM_TM_GMTOFF) tm.tm_gmtoff = xt->tm_gmtoff; #elif defined(HAVE_STRUCT_TM___TM_GMTOFF) tm.__tm_gmtoff = xt->tm_gmtoff; #endif (*retsize) = strftime(s, max, format, &tm); return CORE_OK; } nextepc-0.3.10/lib/core/src/unix/tun.c000066400000000000000000000231051333553357400174770ustar00rootroot00000000000000#define TRACE_MODULE _core_tun #include "core_debug.h" #include "core_arch_network.h" #if LINUX == 1 #include #else #include #include #endif #if HAVE_NET_ROUTE_H #include #endif status_t tun_open(sock_id *new, char *ifname, int is_tap) { status_t rv; sock_t *sock = NULL; int fd = -1; #if LINUX == 1 char *dev = "/dev/net/tun"; int rc; struct ifreq ifr; int flags = IFF_NO_PI; fd = open(dev, O_RDWR); if (fd < 0) { d_error("open() failed(%d:%s) : dev[%s]", errno, strerror(errno), dev); return -1; } #else char name[C_PATH_MAX]; int tun = 0; #define TUNTAP_ID_MAX 255 for (tun = 0; tun < TUNTAP_ID_MAX; tun++) { (void)snprintf(name, sizeof(name), "/dev/tun%i", tun); if ((fd = open(name, O_RDWR)) > 0) { (void)snprintf(name, sizeof(name), "tun%i", tun); ifname = name; break; } } #endif rv = sock_create(new); d_assert(rv == CORE_OK, return CORE_ERROR,); sock = (sock_t *)(*new); d_assert(sock, return CORE_ERROR,); /* Save socket descriptor */ sock->fd = fd; /* Save the interface name */ strncpy(sock->ifname, ifname, IFNAMSIZ-1); #if LINUX == 1 memset(&ifr, 0, sizeof(ifr)); ifr.ifr_flags = (is_tap ? (flags | IFF_TAP) : (flags | IFF_TUN)); strncpy(ifr.ifr_name, ifname, IFNAMSIZ-1); rc = ioctl(sock->fd, TUNSETIFF, (void *)&ifr); if (rc < 0) { d_error("ioctl() failed(%d:%s) : dev[%s] flags[0x%x]", errno, strerror(errno), ifname, flags); goto cleanup; } #endif return CORE_OK; #if LINUX == 1 cleanup: sock_delete(*new); return CORE_ERROR; #endif } status_t tun_set_ipv4(sock_id id, ipsubnet_t *ipaddr, ipsubnet_t *ipsub) { #if LINUX != 1 sock_t *sock = NULL; int fd; struct ifaliasreq ifa; struct ifreq ifr; struct sockaddr_in addr; struct sockaddr_in mask; char buf[512]; int len; struct rt_msghdr *rtm; struct sockaddr_in dst, gw; struct sockaddr_in *paddr; d_assert(ipaddr, return CORE_ERROR,); d_assert(ipsub, return CORE_ERROR,); sock = (sock_t *)id; d_assert(id, return CORE_ERROR,); fd = socket(ipaddr->family, SOCK_DGRAM, 0); (void)memset(&ifa, '\0', sizeof ifa); (void)strlcpy(ifa.ifra_name, sock->ifname, sizeof ifa.ifra_name); (void)memset(&ifr, '\0', sizeof ifr); (void)strlcpy(ifr.ifr_name, sock->ifname, sizeof ifr.ifr_name); #if 0 /* Delete previously assigned address */ (void)ioctl(fd, SIOCDIFADDR, &ifr); #endif (void)memset(&addr, '\0', sizeof(addr)); addr.sin_family = ipaddr->family; addr.sin_addr.s_addr = ipaddr->sub[0]; addr.sin_len = sizeof(addr); (void)memcpy(&ifa.ifra_addr, &addr, sizeof(addr)); (void)memcpy(&ifa.ifra_broadaddr, &addr, sizeof(addr)); (void)memset(&mask, '\0', sizeof(mask)); mask.sin_family = ipaddr->family; mask.sin_addr.s_addr = ipaddr->mask[0]; mask.sin_len = sizeof(mask); (void)memcpy(&ifa.ifra_mask, &mask, sizeof(ifa.ifra_mask)); if (ioctl(fd, SIOCAIFADDR, &ifa) == -1) { d_error("Can't IP address(%d:%s) : dev[%s]", errno, strerror(errno), sock->ifname); return CORE_ERROR; } close(fd); /* SOCK_DGRAM */ fd = socket(PF_ROUTE, SOCK_RAW, 0); if (fd < 0) { d_error("Can't open PF_ROUTE(%d:%s)", errno, strerror(errno)); return CORE_ERROR; } (void)memset(&buf, 0, sizeof(buf)); rtm = (struct rt_msghdr *)buf; rtm->rtm_type = RTM_ADD; rtm->rtm_version = RTM_VERSION; rtm->rtm_pid = getpid(); rtm->rtm_seq = 0; rtm->rtm_flags = RTF_UP | RTF_GATEWAY; rtm->rtm_addrs = RTA_DST | RTA_GATEWAY | RTA_NETMASK; paddr = (struct sockaddr_in *)(rtm + 1); (void)memset(&dst, '\0', sizeof(dst)); dst.sin_family = ipaddr->family; dst.sin_addr.s_addr = ipsub->sub[0]; dst.sin_len = sizeof(dst); (void)memcpy(paddr, &dst, sizeof(dst)); paddr = (struct sockaddr_in *)((char *)paddr + CORE_ALIGN(sizeof(*paddr), sizeof(c_uintptr_t))); (void)memset(&gw, '\0', sizeof(gw)); gw.sin_family = ipaddr->family; gw.sin_addr.s_addr = ipaddr->sub[0]; gw.sin_len = sizeof(gw); (void)memcpy(paddr, &gw, sizeof(gw)); paddr = (struct sockaddr_in *)((char *)paddr + CORE_ALIGN(sizeof(*paddr), sizeof(c_uintptr_t))); (void)memset(&mask, '\0', sizeof(mask)); mask.sin_family = ipaddr->family; mask.sin_addr.s_addr = ipsub->mask[0]; mask.sin_len = sizeof(mask); (void)memcpy(paddr, &mask, sizeof(mask)); paddr = (struct sockaddr_in *)((char *)paddr + CORE_ALIGN(sizeof(*paddr), sizeof(c_uintptr_t))); len = (char*)paddr - buf; rtm->rtm_msglen = len; if (write(fd, buf, len) < 0) { d_error("Can't add routing(%d:%s)", errno, strerror(errno)); return CORE_ERROR; } close(fd); /* PF_ROUTE, SOCK_RAW */ #endif /* LINUX == 1 */ return CORE_OK; } status_t tun_set_ipv6(sock_id id, ipsubnet_t *ipaddr, ipsubnet_t *ipsub) { #if LINUX != 1 sock_t *sock = NULL; int fd; struct in6_aliasreq ifa; struct in6_ifreq ifr; struct sockaddr_in6 addr; struct sockaddr_in6 mask; char buf[512]; int len; struct rt_msghdr *rtm; #if 0 struct sockaddr_in6 dst, gw; #else struct sockaddr_in6 dst; #endif struct sockaddr_in6 *paddr; d_assert(ipaddr, return CORE_ERROR,); d_assert(ipsub, return CORE_ERROR,); sock = (sock_t *)id; d_assert(id, return CORE_ERROR,); fd = socket(ipaddr->family, SOCK_DGRAM, 0); (void)memset(&ifa, '\0', sizeof ifa); (void)strlcpy(ifa.ifra_name, sock->ifname, sizeof ifa.ifra_name); (void)memset(&ifr, '\0', sizeof ifr); (void)strlcpy(ifr.ifr_name, sock->ifname, sizeof ifr.ifr_name); #if 0 /* Delete previously assigned address */ (void)ioctl(fd, SIOCDIFADDR, &ifr); #endif (void)memset(&addr, '\0', sizeof(addr)); addr.sin6_family = ipaddr->family; memcpy(addr.sin6_addr.s6_addr, ipaddr->sub, sizeof ipaddr->sub); addr.sin6_len = sizeof(addr); (void)memcpy(&ifa.ifra_addr, &addr, sizeof(addr)); (void)memcpy(&ifa.ifra_dstaddr, &addr, sizeof(addr)); (void)memset(&mask, '\0', sizeof(mask)); mask.sin6_family = ipaddr->family; memcpy(mask.sin6_addr.s6_addr, ipaddr->mask, sizeof ipaddr->mask); mask.sin6_len = sizeof(mask); (void)memcpy(&ifa.ifra_prefixmask, &mask, sizeof(ifa.ifra_prefixmask)); ifa.ifra_lifetime.ia6t_vltime = ND6_INFINITE_LIFETIME; ifa.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME; if (ioctl(fd, SIOCAIFADDR_IN6, &ifa) == -1) { d_error("Can't IP address(%d:%s) : dev[%s]", errno, strerror(errno), sock->ifname); return CORE_ERROR; } close(fd); /* SOCK_DGRAM */ fd = socket(PF_ROUTE, SOCK_RAW, 0); if (fd < 0) { d_error("Can't open PF_ROUTE(%d:%s)", errno, strerror(errno)); return CORE_ERROR; } (void)memset(&buf, 0, sizeof(buf)); rtm = (struct rt_msghdr *)buf; rtm->rtm_type = RTM_DELETE; rtm->rtm_version = RTM_VERSION; rtm->rtm_pid = getpid(); rtm->rtm_seq = 0; rtm->rtm_addrs = RTA_DST; paddr = (struct sockaddr_in6 *)(rtm + 1); (void)memset(&dst, '\0', sizeof(dst)); dst.sin6_family = ipaddr->family; memcpy(dst.sin6_addr.s6_addr, ipaddr->sub, sizeof ipsub->sub); dst.sin6_len = sizeof(dst); (void)memcpy(paddr, &dst, sizeof(dst)); paddr = (struct sockaddr_in6 *)((char *)paddr + CORE_ALIGN(sizeof(*paddr), sizeof(c_uintptr_t))); len = (char*)paddr - buf; rtm->rtm_msglen = len; if (write(fd, buf, len) < 0) { d_error("Can't add routing(%d:%s)", errno, strerror(errno)); return CORE_ERROR; } #if 0 (void)memset(&buf, 0, sizeof(buf)); rtm = (struct rt_msghdr *)buf; rtm->rtm_type = RTM_ADD; rtm->rtm_version = RTM_VERSION; rtm->rtm_pid = getpid(); rtm->rtm_seq = 0; rtm->rtm_flags = RTF_UP | RTF_GATEWAY; rtm->rtm_addrs = RTA_DST | RTA_GATEWAY | RTA_NETMASK; paddr = (struct sockaddr_in6 *)(rtm + 1); (void)memset(&dst, '\0', sizeof(dst)); dst.sin6_family = ipaddr->family; memcpy(dst.sin6_addr.s6_addr, ipsub->sub, sizeof ipsub->sub); dst.sin6_len = sizeof(dst); (void)memcpy(paddr, &dst, sizeof(dst)); paddr = (struct sockaddr_in6 *)((char *)paddr + CORE_ALIGN(sizeof(*paddr), sizeof(c_uintptr_t))); (void)memset(&gw, '\0', sizeof(gw)); gw.sin6_family = ipaddr->family; memcpy(gw.sin6_addr.s6_addr, ipaddr->sub, sizeof ipaddr->sub); gw.sin6_len = sizeof(gw); (void)memcpy(paddr, &gw, sizeof(gw)); paddr = (struct sockaddr_in6 *)((char *)paddr + CORE_ALIGN(sizeof(*paddr), sizeof(c_uintptr_t))); (void)memset(&mask, '\0', sizeof(mask)); mask.sin6_family = ipaddr->family; memcpy(mask.sin6_addr.s6_addr, ipsub->mask, sizeof ipsub->mask); mask.sin6_len = sizeof(mask); (void)memcpy(paddr, &mask, sizeof(mask)); paddr = (struct sockaddr_in6 *)((char *)paddr + CORE_ALIGN(sizeof(*paddr), sizeof(c_uintptr_t))); len = (char*)paddr - buf; rtm->rtm_msglen = len; if (write(fd, buf, len) < 0) { d_error("Can't add routing(%d:%s)", errno, strerror(errno)); return CORE_ERROR; } #endif close(fd); /* PF_ROUTE, SOCK_RAW */ #endif /* LINUX == 1 */ return CORE_OK; } status_t tun_set_ip(sock_id id, ipsubnet_t *gw, ipsubnet_t *sub) { status_t rv = CORE_OK; d_assert(id, return CORE_ERROR,); d_assert(gw, return CORE_ERROR,); d_assert(sub, return CORE_ERROR,); if (gw->family == AF_INET) rv = tun_set_ipv4(id, gw, sub); else if (gw->family == AF_INET6) { #if 0 rv = tun_set_ipv6(id, gw, sub); #endif } else d_assert(0, return CORE_ERROR,); return rv; } nextepc-0.3.10/lib/core/src/unix/udp.c000066400000000000000000000062051333553357400174630ustar00rootroot00000000000000#define TRACE_MODULE _udp #include "core_debug.h" #include "core_arch_network.h" status_t udp_socket(sock_id *new, int family) { status_t rv; rv = sock_socket(new, family, SOCK_DGRAM, IPPROTO_UDP); d_assert(rv == CORE_OK && new, return CORE_ERROR,); d_trace(1, "udp socket(%d)\n", family); return CORE_OK; } status_t udp_server(sock_id *new, c_sockaddr_t *sa_list) { status_t rv; c_sockaddr_t *addr; char buf[CORE_ADDRSTRLEN]; d_assert(new, return CORE_ERROR,); d_assert(sa_list, return CORE_ERROR,); addr = sa_list; while(addr) { rv = udp_socket(new, addr->c_sa_family); if (rv == CORE_OK) { d_assert(sock_setsockopt(*new, SOCK_O_REUSEADDR, 1) == CORE_OK, return CORE_ERROR, "setsockopt [%s]:%d failed(%d:%s)", CORE_ADDR(addr, buf), CORE_PORT(addr), errno, strerror(errno)); if (sock_bind(*new, addr) == CORE_OK) { d_trace(1, "udp_server() [%s]:%d\n", CORE_ADDR(addr, buf), CORE_PORT(addr)); break; } rv = sock_delete(*new); d_assert(rv == CORE_OK, return CORE_ERROR,); } addr = addr->next; } if (addr == NULL) { d_error("udp_server() [%s]:%d failed(%d:%s)", CORE_ADDR(sa_list, buf), CORE_PORT(sa_list), errno, strerror(errno)); return CORE_ERROR; } return CORE_OK; } status_t udp_client(sock_id *new, c_sockaddr_t *sa_list) { status_t rv; c_sockaddr_t *addr; char buf[CORE_ADDRSTRLEN]; d_assert(new, return CORE_ERROR,); d_assert(sa_list, return CORE_ERROR,); addr = sa_list; while(addr) { rv = udp_socket(new, addr->c_sa_family); if (rv == CORE_OK) { if (sock_connect(*new, addr) == CORE_OK) { d_trace(1, "udp_client() [%s]:%d\n", CORE_ADDR(addr, buf), CORE_PORT(addr)); break; } rv = sock_delete(*new); d_assert(rv == CORE_OK, return CORE_ERROR,); } addr = addr->next; } if (addr == NULL) { d_error("udp_client() [%s]:%d failed(%d:%s)", CORE_ADDR(sa_list, buf), CORE_PORT(sa_list), errno, strerror(errno)); return CORE_ERROR; } return CORE_OK; } status_t udp_connect(sock_id id, c_sockaddr_t *sa_list) { c_sockaddr_t *addr; char buf[CORE_ADDRSTRLEN]; d_assert(id, return CORE_ERROR,); d_assert(sa_list, return CORE_ERROR,); addr = sa_list; while(addr) { if (sock_connect(id, addr) == CORE_OK) { d_trace(1, "udp_connect() [%s]:%d\n", CORE_ADDR(addr, buf), CORE_PORT(addr)); break; } addr = addr->next; } if (addr == NULL) { d_error("udp_connect() [%s]:%d failed(%d:%s)", CORE_ADDR(sa_list, buf), CORE_PORT(sa_list), errno, strerror(errno)); return CORE_ERROR; } return CORE_OK; } nextepc-0.3.10/lib/core/src/version.c000066400000000000000000000006501333553357400173730ustar00rootroot00000000000000#include "core_version.h" #include "core_general.h" /* for CORE_STRINGIFY */ CORE_DECLARE(void) core_version(core_version_t *pvsn) { pvsn->major = CORE_MAJOR_VERSION; pvsn->minor = CORE_MINOR_VERSION; pvsn->patch = CORE_PATCH_VERSION; #ifdef CORE_IS_DEV_VERSION pvsn->is_dev = 1; #else pvsn->is_dev = 0; #endif } CORE_DECLARE(const char *) core_version_string(void) { return CORE_VERSION_STRING; } nextepc-0.3.10/lib/core/test/000077500000000000000000000000001333553357400157315ustar00rootroot00000000000000nextepc-0.3.10/lib/core/test/Makefile.am000066400000000000000000000015311333553357400177650ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in. bin_PROGRAMS = testcore testcore_SOURCES = \ abts.c testds.c testfsm.c testsock.c testthread.c testtlv.c \ testaes.c testfile.c testlock.c testatomic.c testsha.c testtime.c \ testdir.c testfilecopy.c testmsgq.c testsleep.c testtimer.c \ testpkbuf.c testmisc.c testhash.c test3gpp.c \ abts.h abts_tests.h testutil.c testutil.h \ $(NULL) if !USRSCTP testcore_SOURCES += testsctp.c endif testcore_LDADD = \ $(top_srcdir)/lib/core/src/libcore.la \ $(NULL) AM_CPPFLAGS = \ -I$(top_srcdir)/lib/core/include \ $(NULL) AM_CFLAGS = \ -Wall -Werror @OSCPPFLAGS@ \ -Wno-unused-function -Wno-unused-variable -Wno-restrict \ -Wno-unknown-warning-option \ $(NULL) TESTS = testcore MAINTAINERCLEANFILES = Makefile.in CLEANFILES = -R data MOSTLYCLEANFILES = core *.stackdump nextepc-0.3.10/lib/core/test/abts.c000066400000000000000000000257771333553357400170500ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "abts.h" #include "abts_tests.h" #include "testutil.h" #include "core_pkbuf.h" #define ABTS_STAT_SIZE 6 static char status[ABTS_STAT_SIZE] = {'|', '/', '-', '|', '\\', '-'}; static int curr_char; static int verbose = 1; static int exclude = 0; static int quiet = 0; static int list_tests = 0; const char **testlist = NULL; static int find_test_name(const char *testname) { int i; for (i = 0; testlist[i] != NULL; i++) { if (!strcmp(testlist[i], testname)) { return 1; } } return 0; } /* Determine if the test should be run at all */ static int should_test_run(const char *testname) { int found = 0; if (list_tests == 1) { return 0; } if (testlist == NULL) { return 1; } found = find_test_name(testname); if ((found && !exclude) || (!found && exclude)) { return 1; } return 0; } static void reset_status(void) { curr_char = 0; } static void update_status(void) { if (!quiet) { curr_char = (curr_char + 1) % ABTS_STAT_SIZE; fprintf(stdout, "\b%c", status[curr_char]); fflush(stdout); } } static void end_suite(abts_suite *suite) { if (suite != NULL) { sub_suite *last = suite->tail; if (!quiet) { fprintf(stdout, "\b"); fflush(stdout); } if (last->failed == 0) { fprintf(stdout, "SUCCESS\n"); fflush(stdout); } else { fprintf(stdout, "FAILED %d of %d\n", last->failed, last->num_test); fflush(stdout); } } } abts_suite *abts_add_suite(abts_suite *suite, const char *suite_name_full) { sub_suite *subsuite; char *p; const char *suite_name; curr_char = 0; /* Only end the suite if we actually ran it */ if (suite && suite->tail &&!suite->tail->not_run) { end_suite(suite); } subsuite = core_malloc(sizeof(*subsuite)); subsuite->num_test = 0; subsuite->failed = 0; subsuite->next = NULL; /* suite_name_full may be an absolute path depending on __FILE__ * expansion */ suite_name = strrchr(suite_name_full, '/'); if (suite_name) { suite_name++; } else { suite_name = suite_name_full; } p = strrchr(suite_name, '.'); if (p) { subsuite->name = memcpy(core_calloc(p - suite_name + 1, 1), suite_name, p - suite_name); } else { subsuite->name = suite_name; } if (list_tests) { fprintf(stdout, "%s\n", subsuite->name); } subsuite->not_run = 0; if (suite == NULL) { suite = core_malloc(sizeof(*suite)); suite->head = subsuite; suite->tail = subsuite; } else { suite->tail->next = subsuite; suite->tail = subsuite; } if (!should_test_run(subsuite->name)) { subsuite->not_run = 1; return suite; } reset_status(); fprintf(stdout, "%-20s: ", subsuite->name); update_status(); fflush(stdout); return suite; } void abts_run_test(abts_suite *ts, test_func f, void *value) { abts_case tc; sub_suite *ss; if (!should_test_run(ts->tail->name)) { return; } ss = ts->tail; tc.failed = 0; tc.suite = ss; ss->num_test++; update_status(); f(&tc, value); if (tc.failed) { ss->failed++; } } static int report(abts_suite *suite) { int count = 0; sub_suite *dptr; if (suite && suite->tail &&!suite->tail->not_run) { end_suite(suite); } for (dptr = suite->head; dptr; dptr = dptr->next) { count += dptr->failed; } if (list_tests) { return 0; } if (count == 0) { printf("All tests passed.\n"); return 0; } dptr = suite->head; fprintf(stdout, "%-15s\t\tTotal\tFail\tFailed %%\n", "Failed Tests"); fprintf(stdout, "===================================================\n"); while (dptr != NULL) { if (dptr->failed != 0) { float percent = ((float)dptr->failed / (float)dptr->num_test); fprintf(stdout, "%-15s\t\t%5d\t%4d\t%6.2f%%\n", dptr->name, dptr->num_test, dptr->failed, percent * 100); } dptr = dptr->next; } return 1; } static void abts_free(abts_suite *suite) { sub_suite *ptr = NULL, *next_ptr = NULL; ptr = suite->head; while (ptr != NULL) { next_ptr = ptr->next; CORE_FREE((void*)ptr->name); CORE_FREE(ptr); ptr = next_ptr; } CORE_FREE(suite); } void abts_log_message(const char *fmt, ...) { va_list args; update_status(); if (verbose) { va_start(args, fmt); vfprintf(stderr, fmt, args); va_end(args); fprintf(stderr, "\n"); fflush(stderr); } } void abts_int_equal(abts_case *tc, const int expected, const int actual, int lineno) { update_status(); if (tc->failed) return; if (expected == actual) return; tc->failed = TRUE; if (verbose) { fprintf(stderr, "Line %d: expected <%d>, but saw <%d>\n", lineno, expected, actual); fflush(stderr); } } void abts_int_nequal(abts_case *tc, const int expected, const int actual, int lineno) { update_status(); if (tc->failed) return; if (expected != actual) return; tc->failed = TRUE; if (verbose) { fprintf(stderr, "Line %d: expected <%d>, but saw <%d>\n", lineno, expected, actual); fflush(stderr); } } void abts_size_equal(abts_case *tc, size_t expected, size_t actual, int lineno) { update_status(); if (tc->failed) return; if (expected == actual) return; tc->failed = TRUE; if (verbose) { /* Note that the comparison is type-exact, reporting must be a best-fit */ fprintf(stderr, "Line %d: expected %lu, but saw %lu\n", lineno, (unsigned long)expected, (unsigned long)actual); fflush(stderr); } } void abts_str_equal(abts_case *tc, const char *expected, const char *actual, int lineno) { update_status(); if (tc->failed) return; if (!expected && !actual) return; if (expected && actual) if (!strcmp(expected, actual)) return; tc->failed = TRUE; if (verbose) { fprintf(stderr, "Line %d: expected <%s>, but saw <%s>\n", lineno, expected, actual); fflush(stderr); } } void abts_str_nequal(abts_case *tc, const char *expected, const char *actual, size_t n, int lineno) { update_status(); if (tc->failed) return; if (!strncmp(expected, actual, n)) return; tc->failed = TRUE; if (verbose) { fprintf(stderr, "Line %d: expected <%s>, but saw <%s>\n", lineno, expected, actual); fflush(stderr); } } void abts_ptr_null(abts_case *tc, const void *ptr, int lineno) { update_status(); if (tc->failed) return; if (ptr == NULL) return; tc->failed = TRUE; if (verbose) { fprintf(stderr, "Line %d: Expected NULL, but saw <%p>\n", lineno, ptr); fflush(stderr); } } void abts_ptr_notnull(abts_case *tc, const void *ptr, int lineno) { update_status(); if (tc->failed) return; if (ptr != NULL) return; tc->failed = TRUE; if (verbose) { fprintf(stderr, "Line %d: Expected not NULL, but saw <%p>\n", lineno, ptr); fflush(stderr); } } void abts_ptr_equal(abts_case *tc, const void *expected, const void *actual, int lineno) { update_status(); if (tc->failed) return; if (expected == actual) return; tc->failed = TRUE; if (verbose) { fprintf(stderr, "Line %d: expected <%p>, but saw <%p>\n", lineno, expected, actual); fflush(stderr); } } void abts_fail(abts_case *tc, const char *message, int lineno) { update_status(); if (tc->failed) return; tc->failed = TRUE; if (verbose) { fprintf(stderr, "Line %d: %s\n", lineno, message); fflush(stderr); } } void abts_assert(abts_case *tc, const char *message, int condition, int lineno) { update_status(); if (tc->failed) return; if (condition) return; tc->failed = TRUE; if (verbose) { fprintf(stderr, "Line %d: %s\n", lineno, message); fflush(stderr); } } void abts_true(abts_case *tc, int condition, int lineno) { update_status(); if (tc->failed) return; if (condition) return; tc->failed = TRUE; if (verbose) { fprintf(stderr, "Line %d: Condition is false, but expected true\n", lineno); fflush(stderr); } } void abts_false(abts_case *tc, int condition, int lineno) { update_status(); if (tc->failed) return; if (!condition) return; tc->failed = TRUE; if (verbose) { fprintf(stderr, "Line %d: Condition is true, but expected false\n", lineno); fflush(stderr); } } void abts_not_impl(abts_case *tc, const char *message, int lineno) { update_status(); tc->suite->not_impl++; if (verbose) { fprintf(stderr, "Line %d: %s\n", lineno, message); fflush(stderr); } } int main(int argc, const char *const argv[]) { int i; int rv; int list_provided = 0; abts_suite *suite = NULL; test_initialize(); quiet = !isatty(STDOUT_FILENO); for (i = 1; i < argc; i++) { if (!strcmp(argv[i], "-v")) { verbose = 1; continue; } if (!strcmp(argv[i], "-x")) { exclude = 1; continue; } if (!strcmp(argv[i], "-l")) { list_tests = 1; continue; } if (!strcmp(argv[i], "-q")) { quiet = 1; continue; } if (argv[i][0] == '-') { fprintf(stderr, "Invalid option: `%s'\n", argv[i]); exit(1); } list_provided = 1; } if (list_provided) { /* Waste a little space here, because it is easier than counting the * number of tests listed. Besides it is at most three char *. */ testlist = core_calloc(argc + 1, sizeof(char *)); for (i = 1; i < argc; i++) { testlist[i - 1] = argv[i]; } } for (i = 0; i < (sizeof(alltests) / sizeof(struct testlist *)); i++) { suite = alltests[i].func(suite); } rv = report(suite); abts_free(suite); CORE_FREE(testlist); return rv; } nextepc-0.3.10/lib/core/test/abts.h000066400000000000000000000073741333553357400170460ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #ifdef WIN32 #include #else #include #endif #ifndef ABTS_H #define ABTS_H #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif struct sub_suite { const char *name; int num_test; int failed; int not_run; int not_impl; struct sub_suite *next; }; typedef struct sub_suite sub_suite; struct abts_suite { sub_suite *head; sub_suite *tail; }; typedef struct abts_suite abts_suite; struct abts_case { int failed; sub_suite *suite; }; typedef struct abts_case abts_case; typedef void (*test_func)(abts_case *tc, void *data); #define ADD_SUITE(suite) abts_add_suite(suite, __FILE__); abts_suite *abts_add_suite(abts_suite *suite, const char *suite_name); void abts_run_test(abts_suite *ts, test_func f, void *value); void abts_log_message(const char *fmt, ...); void abts_int_equal(abts_case *tc, const int expected, const int actual, int lineno); void abts_int_nequal(abts_case *tc, const int expected, const int actual, int lineno); void abts_str_equal(abts_case *tc, const char *expected, const char *actual, int lineno); void abts_str_nequal(abts_case *tc, const char *expected, const char *actual, size_t n, int lineno); void abts_ptr_null(abts_case *tc, const void *ptr, int lineno); void abts_ptr_notnull(abts_case *tc, const void *ptr, int lineno); void abts_ptr_equal(abts_case *tc, const void *expected, const void *actual, int lineno); void abts_true(abts_case *tc, int condition, int lineno); void abts_false(abts_case *tc, int condition, int lineno); void abts_fail(abts_case *tc, const char *message, int lineno); void abts_not_impl(abts_case *tc, const char *message, int lineno); void abts_assert(abts_case *tc, const char *message, int condition, int lineno); void abts_size_equal(abts_case *tc, size_t expected, size_t actual, int lineno); /* Convenience macros. Ryan hates these! */ #define ABTS_INT_EQUAL(a, b, c) abts_int_equal(a, b, c, __LINE__) #define ABTS_INT_NEQUAL(a, b, c) abts_int_nequal(a, b, c, __LINE__) #define ABTS_STR_EQUAL(a, b, c) abts_str_equal(a, b, c, __LINE__) #define ABTS_STR_NEQUAL(a, b, c, d) abts_str_nequal(a, b, c, d, __LINE__) #define ABTS_PTR_NULL(a, b) abts_ptr_null(a, b, __LINE__) #define ABTS_PTR_NOTNULL(a, b) abts_ptr_notnull(a, b, __LINE__) #define ABTS_PTR_EQUAL(a, b, c) abts_ptr_equal(a, b, c, __LINE__) #define ABTS_TRUE(a, b) abts_true(a, b, __LINE__); #define ABTS_FALSE(a, b) abts_false(a, b, __LINE__); #define ABTS_FAIL(a, b) abts_fail(a, b, __LINE__); #define ABTS_NOT_IMPL(a, b) abts_not_impl(a, b, __LINE__); #define ABTS_ASSERT(a, b, c) abts_assert(a, b, c, __LINE__); #define ABTS_SIZE_EQUAL(a, b, c) abts_size_equal(a, b, c, __LINE__) abts_suite *run_tests(abts_suite *suite); abts_suite *run_tests1(abts_suite *suite); #endif #ifdef __cplusplus } #endif nextepc-0.3.10/lib/core/test/abts_tests.h000066400000000000000000000025411333553357400202570ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef APR_TEST_INCLUDES #define APR_TEST_INCLUDES #include "abts.h" #include "testutil.h" const struct testlist { abts_suite *(*func)(abts_suite *suite); } alltests[] = { {testds}, {testfsm}, {testtlv}, {testaes}, {testsha2}, {testsock}, #ifndef DARWIN {testsctp}, #endif {testtime}, {testtimer}, {testthread}, {testlock}, {testatomic}, {testfile}, {testfilecopy}, {testdir}, {testmsgq}, {testsleep}, {testpkbuf}, {testmisc}, {testhash}, {test3gpp}, }; #endif /* APR_TEST_INCLUDES */ nextepc-0.3.10/lib/core/test/test3gpp.c000066400000000000000000000016151333553357400176510ustar00rootroot00000000000000#include "core_lib.h" #include "core_debug.h" #include "3gpp_types.h" #include "testutil.h" static void _3gpp_test1(abts_case *tc, void *data) { status_t rv; plmn_id_t plmn_id; plmn_id_build(&plmn_id, 1, 1, 2); ABTS_TRUE(tc, memcmp(plmn_id_build(&plmn_id, 1, 1, 2), "\x00\xf1\x10", PLMN_ID_LEN) == 0); ABTS_INT_EQUAL(tc, 1, plmn_id_mcc(&plmn_id)); ABTS_INT_EQUAL(tc, 1, plmn_id_mnc(&plmn_id)); ABTS_INT_EQUAL(tc, 2, plmn_id_mnc_len(&plmn_id)); ABTS_TRUE(tc, memcmp(plmn_id_build(&plmn_id, 555, 10, 2), "\x55\xf5\x01", PLMN_ID_LEN) == 0); ABTS_INT_EQUAL(tc, 555, plmn_id_mcc(&plmn_id)); ABTS_INT_EQUAL(tc, 10, plmn_id_mnc(&plmn_id)); ABTS_INT_EQUAL(tc, 2, plmn_id_mnc_len(&plmn_id)); } abts_suite *test3gpp(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, _3gpp_test1, NULL); return suite; } nextepc-0.3.10/lib/core/test/testaes.c000066400000000000000000000340551333553357400175540ustar00rootroot00000000000000#include "core_aes.h" #include "core_aes_cmac.h" #include "core_pkbuf.h" #include "testutil.h" typedef struct { unsigned char *key; unsigned int *rk; int key_bits; unsigned char input[16]; unsigned char cipher_output[16]; unsigned char decipher_output[16]; } aes_test_vector_t; static void aes_test1(abts_case *tc, void *data) { const int key_bits = 128; unsigned int rk[RKLENGTH(128)]; unsigned char key[16] = "\x00\x01\x02\x03\x05\x06\x07\x08\x0A\x0B\x0C\x0D\x0F\x10\x11\x12"; unsigned char pt[16] = "\x50\x68\x12\xA4\x5F\x08\xC8\x89\xB9\x7F\x59\x80\x03\x8B\x83\x59"; unsigned char ct[16]; unsigned char expected[16] = "\xD8\xF5\x32\x53\x82\x89\xEF\x7D\x06\xB5\x06\xA4\xFD\x5B\xE9\xC9"; int nrounds; int rc; nrounds = aes_setup_enc(rk, key, key_bits); aes_encrypt(rk ,nrounds, pt, ct); rc = memcmp(ct, expected, 16); ABTS_INT_EQUAL(tc, 0, rc); } static void aes_test2(abts_case *tc, void *data) { unsigned char tmp[16]; int nrounds; int rc; aes_test_vector_t test_vector[3]; int i; test_vector[0].key_bits = 128; test_vector[0].key = core_malloc(sizeof(char)*KEYLENGTH(test_vector[0].key_bits)); test_vector[0].rk = core_malloc(sizeof(unsigned int)*RKLENGTH(test_vector[0].key_bits)); memcpy(test_vector[0].key, "\x95\xA8\xEE\x8E\x89\x97\x9B\x9E" "\xFD\xCB\xC6\xEB\x97\x97\x52\x8D", KEYLENGTH(test_vector[0].key_bits)); memcpy(test_vector[0].input, "\x4E\xC1\x37\xA4\x26\xDA\xBF\x8A" "\xA0\xBE\xB8\xBC\x0C\x2B\x89\xD6", 16); memcpy(test_vector[0].cipher_output, "\xD9\xB6\x5D\x12\x32\xBA\x01\x99" "\xCD\xBD\x48\x7B\x2A\x1F\xD6\x46", 16); memcpy(test_vector[0].decipher_output, "\x95\x70\xC3\x43\x63\x56\x5B\x39" "\x35\x03\xA0\x01\xC0\xE2\x3B\x65", 16); test_vector[1].key_bits = 192; test_vector[1].key = core_malloc(sizeof(char)*KEYLENGTH(test_vector[1].key_bits)); test_vector[1].rk = core_malloc(sizeof(unsigned int)*RKLENGTH(test_vector[1].key_bits)); memcpy(test_vector[1].key, "\x95\xA8\xEE\x8E\x89\x97\x9B\x9E" "\xFD\xCB\xC6\xEB\x97\x97\x52\x8D" "\x43\x2D\xC2\x60\x61\x55\x38\x18", KEYLENGTH(test_vector[1].key_bits)); memcpy(test_vector[1].input , "\x4E\xC1\x37\xA4\x26\xDA\xBF\x8A" "\xA0\xBE\xB8\xBC\x0C\x2B\x89\xD6", 16); memcpy(test_vector[1].cipher_output, "\xB1\x8B\xB3\xE7\xE1\x07\x32\xBE" "\x13\x58\x44\x3A\x50\x4D\xBB\x49", 16); memcpy(test_vector[1].decipher_output, "\x29\xDF\xD7\x5B\x85\xCE\xE4\xDE" "\x6E\x26\xA8\x08\xCD\xC2\xC9\xC3", 16); test_vector[2].key_bits = 256; test_vector[2].key = core_malloc(sizeof(char)*KEYLENGTH(test_vector[2].key_bits)); test_vector[2].rk = core_malloc(sizeof(unsigned int)*RKLENGTH(test_vector[2].key_bits)); memcpy(test_vector[2].key, "\x95\xA8\xEE\x8E\x89\x97\x9B\x9E" "\xFD\xCB\xC6\xEB\x97\x97\x52\x8D" "\x43\x2D\xC2\x60\x61\x55\x38\x18" "\xEA\x63\x5E\xC5\xD5\xA7\x72\x7E", KEYLENGTH(test_vector[2].key_bits)); memcpy(test_vector[2].input , "\x4E\xC1\x37\xA4\x26\xDA\xBF\x8A" "\xA0\xBE\xB8\xBC\x0C\x2B\x89\xD6", 16); memcpy(test_vector[2].cipher_output, "\x2F\x9C\xFD\xDB\xFF\xCD\xE6\xB9" "\xF3\x7E\xF8\xE4\x0D\x51\x2C\xF4", 16); memcpy(test_vector[2].decipher_output, "\x11\x0A\x35\x45\xCE\x49\xB8\x4B" "\xBB\x7B\x35\x23\x61\x08\xFA\x6E", 16); for (i=0; i<3; i++) { nrounds = aes_setup_enc(test_vector[i].rk, test_vector[i].key, test_vector[i].key_bits); aes_encrypt(test_vector[i].rk ,nrounds, test_vector[i].input, tmp); rc = memcmp(tmp, test_vector[i].cipher_output, 16); ABTS_INT_EQUAL(tc, 0, rc); nrounds = aes_setup_dec(test_vector[i].rk, test_vector[i].key, test_vector[i].key_bits); aes_decrypt(test_vector[i].rk ,nrounds, test_vector[i].input, tmp); rc = memcmp(tmp, test_vector[i].decipher_output, 16); ABTS_INT_EQUAL(tc, 0, rc); CORE_FREE(test_vector[i].key); CORE_FREE(test_vector[i].rk); } } #if 0 Case #1: Encrypting 16 bytes (1 block) using AES-CBC with 128-bit key Key : 0x06a9214036b8a15b512e03d534120006 IV : 0x3dafba429d9eb430b422da802c9fac41 Plaintext : "Single block msg" Ciphertext: 0xe353779c1079aeb82708942dbe77181a Case #2: Encrypting 32 bytes (2 blocks) using AES-CBC with 128-bit key Key : 0xc286696d887c9aa0611bbb3e2025a45a IV : 0x562e17996d093d28ddb3ba695a2e6f58 Plaintext : 0x000102030405060708090a0b0c0d0e0f 101112131415161718191a1b1c1d1e1f Ciphertext: 0xd296cd94c2cccf8a3a863028b5e1dc0a 7586602d253cfff91b8266bea6d61ab1 Case #3: Encrypting 48 bytes (3 blocks) using AES-CBC with 128-bit key Key : 0x6c3ea0477630ce21a2ce334aa746c2cd IV : 0xc782dc4c098c66cbd9cd27d825682c81 Plaintext : "This is a 48-byte message (exactly 3 AES blocks)" Ciphertext: 0xd0a02b3836451753d493665d33f0e886 2dea54cdb293abc7506939276772f8d5 021c19216bad525c8579695d83ba2684 Case #4: Encrypting 64 bytes (4 blocks) using AES-CBC with 128-bit key Key : 0x56e47a38c5598974bc46903dba290349 IV : 0x8ce82eefbea0da3c44699ed7db51b7d9 Plaintext : 0xa0a1a2a3a4a5a6a7a8a9aaabacadaeaf b0b1b2b3b4b5b6b7b8b9babbbcbdbebf c0c1c2c3c4c5c6c7c8c9cacbcccdcecf d0d1d2d3d4d5d6d7d8d9dadbdcdddedf Ciphertext: 0xc30e32ffedc0774e6aff6af0869f71aa 0f3af07a9a31a9c684db207eb0ef8e4e 35907aa632c3ffdf868bb7b29d3d46ad 83ce9f9a102ee99d49a53e87f4c3da55 #endif typedef struct { unsigned char key[33]; int key_bits; unsigned char ivec[33]; unsigned char plain[65]; unsigned int plainlen; unsigned char cipher[65]; unsigned int cipherlen; } aes_cbc_test_vector_t; static void aes_test3(abts_case *tc, void *data) { aes_cbc_test_vector_t tv[5] = { { "\x06\xa9\x21\x40\x36\xb8\xa1\x5b\x51\x2e\x03\xd5\x34\x12\x00\x06", 128, "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30\xb4\x22\xda\x80\x2c\x9f\xac\x41", "Single block msg", 16, "\xe3\x53\x77\x9c\x10\x79\xae\xb8\x27\x08\x94\x2d\xbe\x77\x18\x1a", 16 }, { "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0\x61\x1b\xbb\x3e\x20\x25\xa4\x5a", 128, "\x56\x2e\x17\x99\x6d\x09\x3d\x28\xdd\xb3\xba\x69\x5a\x2e\x6f\x58", "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f" "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f", 32, "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a\x3a\x86\x30\x28\xb5\xe1\xdc\x0a" "\x75\x86\x60\x2d\x25\x3c\xff\xf9\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1", 32 }, { "\x6c\x3e\xa0\x47\x76\x30\xce\x21\xa2\xce\x33\x4a\xa7\x46\xc2\xcd", 128, "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb\xd9\xcd\x27\xd8\x25\x68\x2c\x81", "This is a 48-byte message (exactly 3 AES blocks)", 48, "\xd0\xa0\x2b\x38\x36\x45\x17\x53\xd4\x93\x66\x5d\x33\xf0\xe8\x86" "\x2d\xea\x54\xcd\xb2\x93\xab\xc7\x50\x69\x39\x27\x67\x72\xf8\xd5" "\x02\x1c\x19\x21\x6b\xad\x52\x5c\x85\x79\x69\x5d\x83\xba\x26\x84", 48 }, { "\x56\xe4\x7a\x38\xc5\x59\x89\x74\xbc\x46\x90\x3d\xba\x29\x03\x49", 128, "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c\x44\x69\x9e\xd7\xdb\x51\xb7\xd9", "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf" "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf" "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf" "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf", 64, "\xc3\x0e\x32\xff\xed\xc0\x77\x4e\x6a\xff\x6a\xf0\x86\x9f\x71\xaa" "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6\x84\xdb\x20\x7e\xb0\xef\x8e\x4e" "\x35\x90\x7a\xa6\x32\xc3\xff\xdf\x86\x8b\xb7\xb2\x9d\x3d\x46\xad" "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d\x49\xa5\x3e\x87\xf4\xc3\xda\x55", 64 }, { "\x56\xe4\x7a\x38\xc5\x59\x89\x74\xbc\x46\x90\x3d\xba\x29\x03\x49", 128, "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c\x44\x69\x9e\xd7\xdb\x51\xb7\xd9", "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf" "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf" "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf" "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd", 62, "\xc3\x0e\x32\xff\xed\xc0\x77\x4e\x6a\xff\x6a\xf0\x86\x9f\x71\xaa" "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6\x84\xdb\x20\x7e\xb0\xef\x8e\x4e" "\x35\x90\x7a\xa6\x32\xc3\xff\xdf\x86\x8b\xb7\xb2\x9d\x3d\x46\xad" "\x5d\x96\x74\x07\xe9\x86\x0c\x0b\x50\x80\x4a\xfb\x69\xc1\x13\xaa", 64 } }; unsigned char out[128]; unsigned int i, rc, outlen; c_uint8_t ivec[32]; for (i = 0; i < 5; i++) { outlen = sizeof(out); memcpy(ivec, tv[i].ivec, 16); aes_cbc_encrypt(tv[i].key, tv[i].key_bits, ivec, tv[i].plain, tv[i].plainlen, out, &outlen); ABTS_INT_EQUAL(tc, tv[i].cipherlen, outlen); rc = memcmp(tv[i].cipher, out, tv[i].cipherlen); ABTS_INT_EQUAL(tc, 0, rc); outlen = sizeof(out); memcpy(ivec, tv[i].ivec, 16); aes_cbc_decrypt(tv[i].key, tv[i].key_bits, ivec, tv[i].cipher, tv[i].cipherlen, out, &outlen); ABTS_INT_EQUAL(tc, tv[i].cipherlen, outlen); rc = memcmp(tv[i].plain, out, tv[i].plainlen); ABTS_INT_EQUAL(tc, 0, rc); } } /* RFC 4493 -------------------------------------------------- Subkey Generation K 2b7e1516 28aed2a6 abf71588 09cf4f3c AES-128(key,0) 7df76b0c 1ab899b3 3e42f047 b91b546f K1 fbeed618 35713366 7c85e08f 7236a8de K2 f7ddac30 6ae266cc f90bc11e e46d513b -------------------------------------------------- -------------------------------------------------- Example 1: len = 0 M AES-CMAC bb1d6929 e9593728 7fa37d12 9b756746 -------------------------------------------------- Example 2: len = 16 M 6bc1bee2 2e409f96 e93d7e11 7393172a AES-CMAC 070a16b4 6b4d4144 f79bdd9d d04a287c -------------------------------------------------- Example 3: len = 40 M 6bc1bee2 2e409f96 e93d7e11 7393172a ae2d8a57 1e03ac9c 9eb76fac 45af8e51 30c81c46 a35ce411 AES-CMAC dfa66747 de9ae630 30ca3261 1497c827 -------------------------------------------------- Example 4: len = 64 M 6bc1bee2 2e409f96 e93d7e11 7393172a ae2d8a57 1e03ac9c 9eb76fac 45af8e51 30c81c46 a35ce411 e5fbc119 1a0a52ef f69f2445 df4f9b17 ad2b417b e66c3710 AES-CMAC 51f0bebf 7e3b9d92 fc497417 79363cfe -------------------------------------------------- */ static void cmac_test(abts_case *tc, void *data) { c_uint8_t key[16] = { 0x2b,0x7e,0x15,0x16,0x28,0xae,0xd2,0xa6, 0xab,0xf7,0x15,0x88,0x09,0xcf,0x4f,0x3c }; c_uint8_t msg[4][64] = { { /* Empty string */ }, { 0x6b,0xc1,0xbe,0xe2,0x2e,0x40,0x9f,0x96, 0xe9,0x3d,0x7e,0x11,0x73,0x93,0x17,0x2a }, { 0x6b,0xc1,0xbe,0xe2,0x2e,0x40,0x9f,0x96, 0xe9,0x3d,0x7e,0x11,0x73,0x93,0x17,0x2a, 0xae,0x2d,0x8a,0x57,0x1e,0x03,0xac,0x9c, 0x9e,0xb7,0x6f,0xac,0x45,0xaf,0x8e,0x51, 0x30,0xc8,0x1c,0x46,0xa3,0x5c,0xe4,0x11 }, { 0x6b,0xc1,0xbe,0xe2,0x2e,0x40,0x9f,0x96, 0xe9,0x3d,0x7e,0x11,0x73,0x93,0x17,0x2a, 0xae,0x2d,0x8a,0x57,0x1e,0x03,0xac,0x9c, 0x9e,0xb7,0x6f,0xac,0x45,0xaf,0x8e,0x51, 0x30,0xc8,0x1c,0x46,0xa3,0x5c,0xe4,0x11, 0xe5,0xfb,0xc1,0x19,0x1a,0x0a,0x52,0xef, 0xf6,0x9f,0x24,0x45,0xdf,0x4f,0x9b,0x17, 0xad,0x2b,0x41,0x7b,0xe6,0x6c,0x37,0x10 } }; c_uint32_t msglen[4] = {0, 16, 40, 64}; c_uint8_t cmac_answer[4][16] = { { 0xbb,0x1d,0x69,0x29,0xe9,0x59,0x37,0x28, 0x7f,0xa3,0x7d,0x12,0x9b,0x75,0x67,0x46 }, { 0x07,0x0a,0x16,0xb4,0x6b,0x4d,0x41,0x44, 0xf7,0x9b,0xdd,0x9d,0xd0,0x4a,0x28,0x7c }, { 0xdf,0xa6,0x67,0x47,0xde,0x9a,0xe6,0x30, 0x30,0xca,0x32,0x61,0x14,0x97,0xc8,0x27 }, { 0x51,0xf0,0xbe,0xbf,0x7e,0x3b,0x9d,0x92, 0xfc,0x49,0x74,0x17,0x79,0x36,0x3c,0xfe } }; c_uint8_t cmac[16]; int i, rc; status_t rv; for (i = 0; i < 4; i++) { rv = aes_cmac_calculate(cmac, key, msg[i], msglen[i]); ABTS_INT_EQUAL(tc, CORE_OK, rv); rc = memcmp(cmac, cmac_answer[i], 16); ABTS_INT_EQUAL(tc, 0, rc); } for (i = 0; i < 4; i++) { rv = aes_cmac_verify(cmac_answer[i], key, msg[i], msglen[i]); ABTS_INT_EQUAL(tc, CORE_OK, rv); } key[0] = 0; for (i = 0; i < 4; i++) { rv = aes_cmac_verify(cmac_answer[i], key, msg[i], msglen[i]); ABTS_INT_EQUAL(tc, ERR_INVALID_CMAC, rv); } } abts_suite *testaes(abts_suite *suite) { suite = ADD_SUITE(suite); abts_run_test(suite, aes_test1, NULL); abts_run_test(suite, aes_test2, NULL); abts_run_test(suite, aes_test3, NULL); abts_run_test(suite, cmac_test, NULL); return suite; } nextepc-0.3.10/lib/core/test/testatomic.c000066400000000000000000000272341333553357400202610ustar00rootroot00000000000000#include "core_atomic.h" #include "core_thread.h" #include "core_mutex.h" #include "testutil.h" static void test_set32(abts_case *tc, void *data) { c_uint32_t y32; atomic_set32(&y32, 2); ABTS_INT_EQUAL(tc, 2, y32); } static void test_read32(abts_case *tc, void *data) { c_uint32_t y32; atomic_set32(&y32, 2); ABTS_INT_EQUAL(tc, 2, atomic_read32(&y32)); } static void test_dec32(abts_case *tc, void *data) { c_uint32_t y32; int rv; atomic_set32(&y32, 2); rv = atomic_dec32(&y32); ABTS_INT_EQUAL(tc, 1, y32); ABTS_ASSERT(tc, "atomic_dec returned zero when it shouldn't", rv != 0); rv = atomic_dec32(&y32); ABTS_INT_EQUAL(tc, 0, y32); ABTS_ASSERT(tc, "atomic_dec didn't returned zero when it should", rv == 0); } static void test_xchg32(abts_case *tc, void *data) { c_uint32_t oldval; c_uint32_t y32; atomic_set32(&y32, 100); oldval = atomic_xchg32(&y32, 50); ABTS_INT_EQUAL(tc, 100, oldval); ABTS_INT_EQUAL(tc, 50, y32); } static void test_xchgptr(abts_case *tc, void *data) { int a; void *ref = "little piggy"; void *target_ptr = ref; void *old_ptr; old_ptr = atomic_xchgptr(&target_ptr, &a); ABTS_PTR_EQUAL(tc, ref, old_ptr); ABTS_PTR_EQUAL(tc, &a, (void *) target_ptr); } static void test_cas_equal(abts_case *tc, void *data) { c_uint32_t casval = 0; c_uint32_t oldval; oldval = atomic_cas32(&casval, 12, 0); ABTS_INT_EQUAL(tc, 0, oldval); ABTS_INT_EQUAL(tc, 12, casval); } static void test_cas_equal_nonnull(abts_case *tc, void *data) { c_uint32_t casval = 12; c_uint32_t oldval; oldval = atomic_cas32(&casval, 23, 12); ABTS_INT_EQUAL(tc, 12, oldval); ABTS_INT_EQUAL(tc, 23, casval); } static void test_cas_notequal(abts_case *tc, void *data) { c_uint32_t casval = 12; c_uint32_t oldval; oldval = atomic_cas32(&casval, 23, 2); ABTS_INT_EQUAL(tc, 12, oldval); ABTS_INT_EQUAL(tc, 12, casval); } static void test_casptr_equal(abts_case *tc, void *data) { int a; void *target_ptr = NULL; void *old_ptr; old_ptr = atomic_casptr(&target_ptr, &a, NULL); ABTS_PTR_EQUAL(tc, NULL, old_ptr); ABTS_PTR_EQUAL(tc, &a, (void *) target_ptr); } static void test_casptr_equal_nonnull(abts_case *tc, void *data) { int a, b; void *target_ptr = &a; void *old_ptr; old_ptr = atomic_casptr(&target_ptr, &b, &a); ABTS_PTR_EQUAL(tc, &a, old_ptr); ABTS_PTR_EQUAL(tc, &b, (void *) target_ptr); } static void test_casptr_notequal(abts_case *tc, void *data) { int a, b; void *target_ptr = &a; void *old_ptr; old_ptr = atomic_casptr(&target_ptr, &a, &b); ABTS_PTR_EQUAL(tc, &a, old_ptr); ABTS_PTR_EQUAL(tc, &a, (void *) target_ptr); } static void test_add32(abts_case *tc, void *data) { c_uint32_t oldval; c_uint32_t y32; atomic_set32(&y32, 23); oldval = atomic_add32(&y32, 4); ABTS_INT_EQUAL(tc, 23, oldval); ABTS_INT_EQUAL(tc, 27, y32); } static void test_add32_neg(abts_case *tc, void *data) { c_uint32_t oldval; c_uint32_t y32; atomic_set32(&y32, 23); oldval = atomic_add32(&y32, -10); ABTS_INT_EQUAL(tc, 23, oldval); ABTS_INT_EQUAL(tc, 13, y32); } static void test_inc32(abts_case *tc, void *data) { c_uint32_t oldval; c_uint32_t y32; atomic_set32(&y32, 23); oldval = atomic_inc32(&y32); ABTS_INT_EQUAL(tc, 23, oldval); ABTS_INT_EQUAL(tc, 24, y32); } static void test_set_add_inc_sub(abts_case *tc, void *data) { c_uint32_t y32; atomic_set32(&y32, 0); atomic_add32(&y32, 20); atomic_inc32(&y32); atomic_sub32(&y32, 10); ABTS_INT_EQUAL(tc, 11, y32); } static void test_wrap_zero(abts_case *tc, void *data) { c_uint32_t y32; c_uint32_t rv; c_uint32_t minus1 = (c_uint32_t)-1; char str[256];; atomic_set32(&y32, 0); rv = atomic_dec32(&y32); ABTS_ASSERT(tc, "atomic_dec32 on zero returned zero.", rv != 0); sprintf(str, "zero wrap failed: 0 - 1 = %d", y32); ABTS_ASSERT(tc, str, y32 == minus1); } static void test_inc_neg1(abts_case *tc, void *data) { c_uint32_t y32 = (c_uint32_t)-1; c_uint32_t minus1 = (c_uint32_t)-1; c_uint32_t rv; char str[256]; rv = atomic_inc32(&y32); ABTS_ASSERT(tc, "atomic_inc32 didn't return the old value.", rv == minus1); sprintf(str, "zero wrap failed: -1 + 1 = %d", y32); ABTS_ASSERT(tc, str, y32 == 0); } void *THREAD_FUNC thread_func_mutex(thread_id id, void *data); void *THREAD_FUNC thread_func_atomic(thread_id id, void *data); mutex_id thread_lock; volatile c_uint32_t mutex_locks = 0; volatile c_uint32_t atomic_ops = 0; status_t exit_ret_val = 123; /* just some made up number to check on later */ #define NUM_THREADS 40 #define NUM_ITERATIONS 20000 void *THREAD_FUNC thread_func_mutex(thread_id id, void *data) { int i; for (i = 0; i < NUM_ITERATIONS; i++) { mutex_lock(thread_lock); mutex_locks++; mutex_unlock(thread_lock); } thread_exit(id, exit_ret_val); return NULL; } void *THREAD_FUNC thread_func_atomic(thread_id id, void *data) { int i; for (i = 0; i < NUM_ITERATIONS ; i++) { atomic_inc32(&atomic_ops); atomic_add32(&atomic_ops, 2); atomic_dec32(&atomic_ops); atomic_dec32(&atomic_ops); } thread_exit(id, exit_ret_val); return NULL; } static void test_atomics_threaded(abts_case *tc, void *data) { thread_id t1[NUM_THREADS]; thread_id t2[NUM_THREADS]; status_t rv; int i; #ifdef HAVE_PTHREAD_SETCONCURRENCY pthread_setconcurrency(8); #endif rv = mutex_create(&thread_lock, MUTEX_DEFAULT); ABTS_ASSERT(tc, "Could not create lock", rv == CORE_OK) ; for (i = 0; i < NUM_THREADS; i++) { status_t r1, r2; r1 = thread_create(&t1[i], NULL, thread_func_mutex, NULL); r2 = thread_create(&t2[i], NULL, thread_func_atomic, NULL); ABTS_ASSERT(tc, "Failed creating threads", !r1 && !r2); } for (i = 0; i < NUM_THREADS; i++) { status_t s1, s2; thread_join(&s1, t1[i]); thread_join(&s2, t2[i]); ABTS_ASSERT(tc, "Invalid return value from thread_join", s1 == exit_ret_val && s2 == exit_ret_val); } ABTS_INT_EQUAL(tc, NUM_THREADS * NUM_ITERATIONS, mutex_locks); ABTS_INT_EQUAL(tc, NUM_THREADS * NUM_ITERATIONS, atomic_read32(&atomic_ops)); rv = mutex_delete(thread_lock); ABTS_ASSERT(tc, "Failed creating threads", rv == CORE_OK); } #undef NUM_THREADS #define NUM_THREADS 7 typedef struct tbox_t tbox_t; struct tbox_t { abts_case *tc; c_uint32_t *mem; c_uint32_t preval; c_uint32_t postval; c_uint32_t loop; void (*func)(tbox_t *box); }; static CORE_INLINE void busyloop_read32(tbox_t *tbox) { c_uint32_t val; do { val = atomic_read32(tbox->mem); if (val != tbox->preval) thread_yield(); else break; } while (1); } static void busyloop_set32(tbox_t *tbox) { do { busyloop_read32(tbox); atomic_set32(tbox->mem, tbox->postval); } while (--tbox->loop); } static void busyloop_add32(tbox_t *tbox) { c_uint32_t val; do { busyloop_read32(tbox); val = atomic_add32(tbox->mem, tbox->postval); mutex_lock(thread_lock); ABTS_INT_EQUAL(tbox->tc, val, tbox->preval); mutex_unlock(thread_lock); } while (--tbox->loop); } static void busyloop_sub32(tbox_t *tbox) { do { busyloop_read32(tbox); atomic_sub32(tbox->mem, tbox->postval); } while (--tbox->loop); } static void busyloop_inc32(tbox_t *tbox) { c_uint32_t val; do { busyloop_read32(tbox); val = atomic_inc32(tbox->mem); mutex_lock(thread_lock); ABTS_INT_EQUAL(tbox->tc, val, tbox->preval); mutex_unlock(thread_lock); } while (--tbox->loop); } static void busyloop_dec32(tbox_t *tbox) { c_uint32_t val; do { busyloop_read32(tbox); val = atomic_dec32(tbox->mem); mutex_lock(thread_lock); ABTS_INT_NEQUAL(tbox->tc, 0, val); mutex_unlock(thread_lock); } while (--tbox->loop); } static void busyloop_cas32(tbox_t *tbox) { c_uint32_t val; do { do { val = atomic_cas32(tbox->mem, tbox->postval, tbox->preval); if (val != tbox->preval) thread_yield(); else break; } while (1); } while (--tbox->loop); } static void busyloop_xchg32(tbox_t *tbox) { c_uint32_t val; do { busyloop_read32(tbox); val = atomic_xchg32(tbox->mem, tbox->postval); mutex_lock(thread_lock); ABTS_INT_EQUAL(tbox->tc, val, tbox->preval); mutex_unlock(thread_lock); } while (--tbox->loop); } static void *THREAD_FUNC thread_func_busyloop(thread_id id, void *data) { tbox_t *tbox = data; tbox->func(tbox); thread_exit(id, 0); return NULL; } static void test_atomics_busyloop_threaded(abts_case *tc, void *data) { unsigned int i; status_t rv; c_uint32_t count = 0; tbox_t tbox[NUM_THREADS]; thread_id thread[NUM_THREADS]; rv = mutex_create(&thread_lock, MUTEX_DEFAULT); ABTS_ASSERT(tc, "Could not create lock", rv == CORE_OK); /* get ready */ for (i = 0; i < NUM_THREADS; i++) { tbox[i].tc = tc; tbox[i].mem = &count; tbox[i].loop = 50; } tbox[0].preval = 98; tbox[0].postval = 3891; tbox[0].func = busyloop_add32; tbox[1].preval = 3989; tbox[1].postval = 1010; tbox[1].func = busyloop_sub32; tbox[2].preval = 2979; tbox[2].postval = 0; /* not used */ tbox[2].func = busyloop_inc32; tbox[3].preval = 2980; tbox[3].postval = 16384; tbox[3].func = busyloop_set32; tbox[4].preval = 16384; tbox[4].postval = 0; /* not used */ tbox[4].func = busyloop_dec32; tbox[5].preval = 16383; tbox[5].postval = 1048576; tbox[5].func = busyloop_cas32; tbox[6].preval = 1048576; tbox[6].postval = 98; /* goto tbox[0] */ tbox[6].func = busyloop_xchg32; /* get set */ for (i = 0; i < NUM_THREADS; i++) { rv = thread_create(&thread[i], NULL, thread_func_busyloop, &tbox[i]); ABTS_ASSERT(tc, "Failed creating thread", rv == CORE_OK); } /* go! */ atomic_set32(tbox->mem, 98); for (i = 0; i < NUM_THREADS; i++) { status_t retval; rv = thread_join(&retval, thread[i]); ABTS_ASSERT(tc, "Thread join failed", rv == CORE_OK); ABTS_ASSERT(tc, "Invalid return value from thread_join", retval == 0); } ABTS_INT_EQUAL(tbox->tc, 98, count); rv = mutex_delete(thread_lock); ABTS_ASSERT(tc, "Failed creating threads", rv == CORE_OK); } abts_suite *testatomic(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, test_set32, NULL); abts_run_test(suite, test_read32, NULL); abts_run_test(suite, test_dec32, NULL); abts_run_test(suite, test_xchg32, NULL); abts_run_test(suite, test_xchgptr, NULL); abts_run_test(suite, test_cas_equal, NULL); abts_run_test(suite, test_cas_equal_nonnull, NULL); abts_run_test(suite, test_cas_notequal, NULL); abts_run_test(suite, test_casptr_equal, NULL); abts_run_test(suite, test_casptr_equal_nonnull, NULL); abts_run_test(suite, test_casptr_notequal, NULL); abts_run_test(suite, test_add32, NULL); abts_run_test(suite, test_add32_neg, NULL); abts_run_test(suite, test_inc32, NULL); abts_run_test(suite, test_set_add_inc_sub, NULL); abts_run_test(suite, test_wrap_zero, NULL); abts_run_test(suite, test_inc_neg1, NULL); abts_run_test(suite, test_atomics_threaded, NULL); abts_run_test(suite, test_atomics_busyloop_threaded, NULL); return suite; } nextepc-0.3.10/lib/core/test/testdir.c000066400000000000000000000071241333553357400175570ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "core_file.h" #include "testutil.h" static void test_mkdir(abts_case *tc, void *data) { status_t rv; file_info_t finfo; rv = dir_make("data/testdir", FILE_UREAD | FILE_UWRITE | FILE_UEXECUTE); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = file_stat(&finfo, "data/testdir", FILE_INFO_TYPE); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_INT_EQUAL(tc, FILE_DIR, finfo.filetype); } static void test_mkdir_recurs(abts_case *tc, void *data) { status_t rv; file_info_t finfo; rv = dir_make_recursive("data/one/two/three", FILE_UREAD | FILE_UWRITE | FILE_UEXECUTE); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = file_stat(&finfo, "data/one", FILE_INFO_TYPE); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_INT_EQUAL(tc, FILE_DIR, finfo.filetype); rv = file_stat(&finfo, "data/one/two", FILE_INFO_TYPE); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_INT_EQUAL(tc, FILE_DIR, finfo.filetype); rv = file_stat(&finfo, "data/one/two/three", FILE_INFO_TYPE); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_INT_EQUAL(tc, FILE_DIR, finfo.filetype); } static void test_remove(abts_case *tc, void *data) { status_t rv; file_info_t finfo; rv = dir_remove("data/testdir"); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = file_stat(&finfo, "data/testdir", FILE_INFO_TYPE); ABTS_INT_EQUAL(tc, 1, STATUS_IS_ENOENT(rv)); } static void test_removeall_fail(abts_case *tc, void *data) { status_t rv; rv = dir_remove("data/one"); ABTS_INT_EQUAL(tc, 1, STATUS_IS_ENOTEMPTY(rv)); } static void test_removeall(abts_case *tc, void *data) { status_t rv; rv = dir_remove("data/one/two/three"); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = dir_remove("data/one/two"); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = dir_remove("data/one"); ABTS_INT_EQUAL(tc, CORE_OK, rv); } static void test_remove_notthere(abts_case *tc, void *data) { status_t rv; rv = dir_remove("data/notthere"); ABTS_INT_EQUAL(tc, 1, STATUS_IS_ENOENT(rv)); } static void test_mkdir_twice(abts_case *tc, void *data) { status_t rv; rv = dir_make("data/testdir", FILE_UREAD | FILE_UWRITE | FILE_UEXECUTE); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = dir_make("data/testdir", FILE_UREAD | FILE_UWRITE | FILE_UEXECUTE); ABTS_INT_EQUAL(tc, 1, STATUS_IS_EEXIST(rv)); rv = dir_remove("data/testdir"); ABTS_INT_EQUAL(tc, CORE_OK, rv); } abts_suite *testdir(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, test_mkdir, NULL); abts_run_test(suite, test_mkdir_recurs, NULL); abts_run_test(suite, test_remove, NULL); abts_run_test(suite, test_removeall_fail, NULL); abts_run_test(suite, test_removeall, NULL); abts_run_test(suite, test_remove_notthere, NULL); abts_run_test(suite, test_mkdir_twice, NULL); return suite; } nextepc-0.3.10/lib/core/test/testds.c000066400000000000000000000530271333553357400174120ustar00rootroot00000000000000#include "core_pool.h" #include "core_list.h" #include "core_queue.h" #include "core_ringbuf.h" #include "testutil.h" /***************************************************************************** * test for core_pool.h */ typedef struct { char m1; int m2; } pt_type1; #define SIZE_OF_TPOOL1 5 #define SIZE_OF_TPOOL2 5 typedef char type_of_tpool1; typedef pt_type1 type_of_tpool2; pool_declare(tpool1, type_of_tpool1, SIZE_OF_TPOOL1); static void pool_test_core1(abts_case *tc, void *data, int start) { int i, j, n; type_of_tpool1 *org[SIZE_OF_TPOOL1+1]; type_of_tpool1 *node[SIZE_OF_TPOOL1+1]; pool_init(&tpool1, SIZE_OF_TPOOL1); /* Check basic members */ n = pool_size(&tpool1); ABTS_INT_EQUAL(tc, SIZE_OF_TPOOL1, n); n = pool_avail(&tpool1); ABTS_INT_EQUAL(tc, SIZE_OF_TPOOL1, n); n = pool_used(&tpool1); ABTS_INT_EQUAL(tc, 0, n); /* Allocation up to start index */ for (i = 0; i < start; i++) { pool_alloc_node(&tpool1, &node[i]); /* Check not null */ ABTS_PTR_NOTNULL(tc, node[i]); /* Check the number of available nodes */ n = pool_avail(&tpool1); ABTS_INT_EQUAL(tc, SIZE_OF_TPOOL1 - (i + 1), n); } /* Free all allocated nodes */ for (i = 0; i < start; i++) { pool_free_node(&tpool1, node[i]); /* Check the number of available nodes */ n = pool_avail(&tpool1); ABTS_INT_EQUAL(tc, SIZE_OF_TPOOL1 - start + (i + 1), n); } /* Allocation up to maximum pool size */ for (i = 0; i < SIZE_OF_TPOOL1; i++) { pool_alloc_node(&tpool1, &node[i]); org[i] = node[i]; /* Check not null */ ABTS_PTR_NOTNULL(tc, node[i]); /* Check the number of available nodes */ n = pool_avail(&tpool1); ABTS_INT_EQUAL(tc, SIZE_OF_TPOOL1 - (i + 1), n); } /* Free all allocated */ for (i = 0; i < SIZE_OF_TPOOL1; i++) { pool_free_node(&tpool1, node[i]); /* Check the number of available nodes */ n = pool_avail(&tpool1); ABTS_INT_EQUAL(tc, i + 1, n); } /* Check that addresses of nodes are same with original ones */ n = 0; for (i = 0; i < SIZE_OF_TPOOL1; i++) { pool_alloc_node(&tpool1, &node[i]); for (j = 0; j < SIZE_OF_TPOOL1; j++) { if (node[i] == org[j]) n++; } } /* Free all allocated */ for (i = 0; i < SIZE_OF_TPOOL1; i++) { pool_free_node(&tpool1, node[i]); /* Check the number of available nodes */ n = pool_avail(&tpool1); ABTS_INT_EQUAL(tc, i + 1, n); } pool_final(&tpool1); } static void pool_test_core2(abts_case *tc, void *data, int start) { int i, j, n; type_of_tpool2 *org[SIZE_OF_TPOOL2+1]; type_of_tpool2 *node[SIZE_OF_TPOOL2+1]; pool_init(&tpool1, SIZE_OF_TPOOL2); /* Check basic members */ n = pool_size(&tpool1); ABTS_INT_EQUAL(tc, SIZE_OF_TPOOL2, n); n = pool_avail(&tpool1); ABTS_INT_EQUAL(tc, SIZE_OF_TPOOL2, n); n = pool_used(&tpool1); ABTS_INT_EQUAL(tc, 0, n); /* Allocation up to start index */ for (i = 0; i < start; i++) { pool_alloc_node(&tpool1, &node[i]); /* Check not null */ ABTS_PTR_NOTNULL(tc, node[i]); /* Check the number of available nodes */ n = pool_avail(&tpool1); ABTS_INT_EQUAL(tc, SIZE_OF_TPOOL2 - (i + 1), n); } /* Free all allocated nodes */ for (i = 0; i < start; i++) { pool_free_node(&tpool1, node[i]); /* Check the number of available nodes */ n = pool_avail(&tpool1); ABTS_INT_EQUAL(tc, SIZE_OF_TPOOL2 - start + (i + 1), n); } /* Allocation up to maximum pool size */ for (i = 0; i < SIZE_OF_TPOOL2; i++) { pool_alloc_node(&tpool1, &node[i]); org[i] = node[i]; /* Check not null */ ABTS_PTR_NOTNULL(tc, node[i]); /* Check the number of available nodes */ n = pool_avail(&tpool1); ABTS_INT_EQUAL(tc, SIZE_OF_TPOOL2 - (i + 1), n); } /* Free all allocated */ for (i = 0; i < SIZE_OF_TPOOL2; i++) { pool_free_node(&tpool1, node[i]); /* Check the number of available nodes */ n = pool_avail(&tpool1); ABTS_INT_EQUAL(tc, i + 1, n); } /* Check that addresses of nodes are same with original ones */ n = 0; for (i = 0; i < SIZE_OF_TPOOL2; i++) { pool_alloc_node(&tpool1, &node[i]); for (j = 0; j < SIZE_OF_TPOOL2; j++) { if (node[i] == org[j]) n++; } } /* Free all allocated */ for (i = 0; i < SIZE_OF_TPOOL2; i++) { pool_free_node(&tpool1, node[i]); /* Check the number of available nodes */ n = pool_avail(&tpool1); ABTS_INT_EQUAL(tc, i + 1, n); } pool_final(&tpool1); } static void pool_test1(abts_case *tc, void *data) { int i; for (i = 0; i < SIZE_OF_TPOOL1; i++) pool_test_core1(tc, data, i); } static void pool_test2(abts_case *tc, void *data) { int i; for (i = 0; i < SIZE_OF_TPOOL2; i++) pool_test_core2(tc, data, i); } /***************************************************************************** * test for core_list.h */ typedef struct { lnode_t node; int m1; } lt_type1; list_t tlist1; int lttype1_compare(lt_type1 *pnode1, lt_type1 *pnode2) { if (pnode1->m1 == pnode2->m1) return 0; else if (pnode1->m1 < pnode2->m1) return -1; else return 1; } #define SIZE_OF_lt_type1 16 static void list_test1(abts_case *tc, void *data) { int i; lt_type1 *iter, node[SIZE_OF_lt_type1]; for (i = 0; i < SIZE_OF_lt_type1; i++) node[i].m1 = i; /* Initialize head of list */ list_init(&tlist1); /* Check list is empty */ ABTS_TRUE(tc, list_is_empty(&tlist1)); /* Confirm that any node can't be get */ iter = list_first(&tlist1); ABTS_PTR_NULL(tc, iter); /* Add a node */ list_append(&tlist1, &node[0]); /* Iterate from the first. And check the pointers */ iter = list_first(&tlist1); ABTS_PTR_EQUAL(tc, &node[0], iter); iter = list_next(iter); ABTS_PTR_NULL(tc, iter); /* Iterate from the last. And check the pointers */ iter = list_last(&tlist1); ABTS_PTR_EQUAL(tc, &node[0], iter); iter = list_prev(iter); ABTS_PTR_NULL(tc, iter); /* Add two nodes */ list_append(&tlist1, &node[1]); list_append(&tlist1, &node[2]); /* Iterate from the first. And check the pointers */ iter = list_first(&tlist1); ABTS_PTR_EQUAL(tc, &node[0], iter); iter = list_next(iter); ABTS_PTR_EQUAL(tc, &node[1], iter); iter = list_next(iter); ABTS_PTR_EQUAL(tc, &node[2], iter); iter = list_next(iter); ABTS_PTR_NULL(tc, iter); /* Iterate from the last. And check the pointers */ iter = list_last(&tlist1); ABTS_PTR_EQUAL(tc, &node[2], iter); iter = list_prev(iter); ABTS_PTR_EQUAL(tc, &node[1], iter); iter = list_prev(iter); ABTS_PTR_EQUAL(tc, &node[0], iter); iter = list_prev(iter); ABTS_PTR_NULL(tc, iter); /* Remove all nodes */ list_remove(&tlist1, &node[0]); list_remove(&tlist1, &node[1]); list_remove(&tlist1, &node[2]); /* Check list is empty */ ABTS_TRUE(tc, list_is_empty(&tlist1)); } static void list_test2(abts_case *tc, void *data) { int i; lt_type1 *iter, node[SIZE_OF_lt_type1]; for (i = 0; i < SIZE_OF_lt_type1; i++) node[i].m1 = i; /* Initialize head of list */ list_init(&tlist1); /* Check list is empty */ ABTS_TRUE(tc, list_is_empty(&tlist1)); /* Confirm that any node can't be get */ iter = list_first(&tlist1); ABTS_PTR_NULL(tc, iter); /* Add a node */ list_prepend(&tlist1, &node[0]); /* Iterate from the first. And check the pointers */ iter = list_first(&tlist1); ABTS_PTR_EQUAL(tc, &node[0], iter); iter = list_next(iter); ABTS_PTR_NULL(tc, iter); /* Iterate from the last. And check the pointers */ iter = list_last(&tlist1); ABTS_PTR_EQUAL(tc, &node[0], iter); iter = list_prev(iter); ABTS_PTR_NULL(tc, iter); /* Add two nodes */ list_prepend(&tlist1, &node[1]); list_prepend(&tlist1, &node[2]); /* Iterate from the first. And check the pointers */ iter = list_first(&tlist1); ABTS_PTR_EQUAL(tc, &node[2], iter); iter = list_next(iter); ABTS_PTR_EQUAL(tc, &node[1], iter); iter = list_next(iter); ABTS_PTR_EQUAL(tc, &node[0], iter); iter = list_next(iter); ABTS_PTR_NULL(tc, iter); /* Iterate from the last. And check the pointers */ iter = list_last(&tlist1); ABTS_PTR_EQUAL(tc, &node[0], iter); iter = list_prev(iter); ABTS_PTR_EQUAL(tc, &node[1], iter); iter = list_prev(iter); ABTS_PTR_EQUAL(tc, &node[2], iter); iter = list_prev(iter); ABTS_PTR_NULL(tc, iter); /* Remove all nodes */ list_remove(&tlist1, &node[2]); list_remove(&tlist1, &node[1]); list_remove(&tlist1, &node[0]); /* Check list is empty */ ABTS_TRUE(tc, list_is_empty(&tlist1)); } static void list_test3(abts_case *tc, void *data) { int i; lt_type1 *iter, node[SIZE_OF_lt_type1]; for (i = 0; i < SIZE_OF_lt_type1; i++) node[i].m1 = i; /* Initialize head of list */ list_init(&tlist1); /* Add three nodes */ for (i = 0; i < 3; i++) list_append(&tlist1, &node[i]); /* Iterate from the first. And check the pointers */ i = 0; iter = list_first(&tlist1); while (iter) { ABTS_PTR_EQUAL(tc, &node[i++], iter); iter = list_next(iter); } ABTS_INT_EQUAL(tc, 3, i); /* Iterate from the last. And check the pointers */ i = 0; iter = list_last(&tlist1); while (iter) { ABTS_PTR_EQUAL(tc, &node[3 - (++i)], iter); iter = list_prev(iter); } ABTS_INT_EQUAL(tc, 3, i); /* Insert three nodes by list_insert_prev() */ list_insert_prev(&tlist1, &node[0], &node[3]); list_insert_prev(&tlist1, &node[1], &node[4]); list_insert_prev(&tlist1, &node[2], &node[5]); /* Iterate from the first. And check the pointers */ iter = list_first(&tlist1); ABTS_PTR_EQUAL(tc, &node[3], iter); iter = list_next(iter); ABTS_PTR_EQUAL(tc, &node[0], iter); iter = list_next(iter); ABTS_PTR_EQUAL(tc, &node[4], iter); iter = list_next(iter); ABTS_PTR_EQUAL(tc, &node[1], iter); iter = list_next(iter); ABTS_PTR_EQUAL(tc, &node[5], iter); iter = list_next(iter); ABTS_PTR_EQUAL(tc, &node[2], iter); iter = list_next(iter); ABTS_PTR_NULL(tc, iter); /* Remove three nodes inserted by list_insert_prev() */ list_remove(&tlist1, &node[3]); list_remove(&tlist1, &node[4]); list_remove(&tlist1, &node[5]); /* Iterate from the first. And check the pointers */ iter = list_first(&tlist1); ABTS_PTR_EQUAL(tc, &node[0], iter); iter = list_next(iter); ABTS_PTR_EQUAL(tc, &node[1], iter); iter = list_next(iter); ABTS_PTR_EQUAL(tc, &node[2], iter); iter = list_next(iter); ABTS_PTR_NULL(tc, iter); } static void list_test4(abts_case *tc, void *data) { int i; lt_type1 *iter, node[SIZE_OF_lt_type1]; for (i = 0; i < SIZE_OF_lt_type1; i++) node[i].m1 = i; /* Initialize head of list */ list_init(&tlist1); /* Add three nodes */ for (i = 0; i < 3; i++) list_append(&tlist1, &node[i]); /* Iterate from the first. And check the pointers */ i = 0; iter = list_first(&tlist1); while (iter) { ABTS_PTR_EQUAL(tc, &node[i++], iter); iter = list_next(iter); } ABTS_INT_EQUAL(tc, 3, i); /* Iterate from the last. And check the pointers */ i = 0; iter = list_last(&tlist1); while (iter) { ABTS_PTR_EQUAL(tc, &node[3 - (++i)], iter); iter = list_prev(iter); } ABTS_INT_EQUAL(tc, 3, i); /* Insert three nodes by list_insert_next() */ list_insert_next(&tlist1, &node[0], &node[3]); list_insert_next(&tlist1, &node[1], &node[4]); list_insert_next(&tlist1, &node[2], &node[5]); /* Iterate from the first. And check the pointers */ iter = list_first(&tlist1); ABTS_PTR_EQUAL(tc, &node[0], iter); iter = list_next(iter); ABTS_PTR_EQUAL(tc, &node[3], iter); iter = list_next(iter); ABTS_PTR_EQUAL(tc, &node[1], iter); iter = list_next(iter); ABTS_PTR_EQUAL(tc, &node[4], iter); iter = list_next(iter); ABTS_PTR_EQUAL(tc, &node[2], iter); iter = list_next(iter); ABTS_PTR_EQUAL(tc, &node[5], iter); iter = list_next(iter); ABTS_PTR_NULL(tc, iter); /* Remove three nodes inserted by list_insert_next() */ list_remove(&tlist1, &node[3]); list_remove(&tlist1, &node[4]); list_remove(&tlist1, &node[5]); /* Iterate from the first. And check the pointers */ iter = list_first(&tlist1); ABTS_PTR_EQUAL(tc, &node[0], iter); iter = list_next(iter); ABTS_PTR_EQUAL(tc, &node[1], iter); iter = list_next(iter); ABTS_PTR_EQUAL(tc, &node[2], iter); iter = list_next(iter); ABTS_PTR_NULL(tc, iter); } static void list_test5(abts_case *tc, void *data) { int i, j; /* List up posssible oders with four nodes */ int od[24][4] = { {0,1,2,3}, {0,1,3,2}, {0,2,1,3}, {0,2,3,1}, {0,3,1,2}, {0,3,2,1}, {1,0,2,3}, {1,0,3,2}, {1,2,0,3}, {1,2,3,0}, {1,3,0,2}, {1,3,2,0}, {2,1,0,3}, {2,1,3,0}, {2,0,1,3}, {2,0,3,1}, {2,3,1,0}, {2,3,0,1}, {3,1,2,0}, {3,1,0,2}, {3,2,1,0}, {3,2,0,1}, {3,0,1,2}, {3,0,2,1} }; lt_type1 *iter, node[SIZE_OF_lt_type1]; for (i = 0; i < SIZE_OF_lt_type1; i++) node[i].m1 = i; for (i = 0; i < 24; i++) { /* Initialize head of list */ list_init(&tlist1); /* Add four nodes using predefined orders */ for (j = 0; j < 4; j++) list_insert_sorted(&tlist1, &node[od[i][j]], <type1_compare); /* Iterate from the first. And check the SORTED */ j = 0; iter = list_first(&tlist1); while (iter) { ABTS_INT_EQUAL(tc, iter->m1, j++); iter = list_next(iter); } } } /***************************************************************************** * test for core_queue.h */ typedef struct { int m1; } qt_type1; #define SIZE_OF_TQUE1 4 #define SIZE_OF_TQUE2 3 typedef int type_of_tque1; typedef qt_type1 type_of_tque2; que_declare(tque1, type_of_tque1, SIZE_OF_TQUE1); que_declare(tque2, type_of_tque2, SIZE_OF_TQUE2); que_declare(tque3, type_of_tque2 *, SIZE_OF_TQUE2); static void que_test1(abts_case *tc, void *data) { int i, r; type_of_tque1 n, node[SIZE_OF_TQUE1+1]; n = 0; for (i = 0; i < SIZE_OF_TQUE1; i++) node[i] = i; /* Initialize queue */ que_init(&tque1, SIZE_OF_TQUE1); /* Check basic members */ ABTS_TRUE(tc, que_is_empty(&tque1)); ABTS_FALSE(tc, que_is_full(&tque1)); ABTS_INT_EQUAL(tc, SIZE_OF_TQUE1, que_avail(&tque1)); ABTS_INT_EQUAL(tc, 0, que_used(&tque1)); /* Push a node */ r = que_push(&tque1, &node[0]); ABTS_INT_EQUAL(tc, 1, r); /* Check queue status */ ABTS_FALSE(tc, que_is_empty(&tque1)); ABTS_FALSE(tc, que_is_full(&tque1)); ABTS_INT_EQUAL(tc, SIZE_OF_TQUE1 - 1, que_avail(&tque1)); ABTS_INT_EQUAL(tc, 1, que_used(&tque1)); /* Pop a node */ r = que_pop(&tque1, &n); ABTS_INT_EQUAL(tc, 0, r); /* Check queue status */ ABTS_TRUE(tc, que_is_empty(&tque1)); ABTS_FALSE(tc, que_is_full(&tque1)); ABTS_INT_EQUAL(tc, SIZE_OF_TQUE1, que_avail(&tque1)); ABTS_INT_EQUAL(tc, 0, que_used(&tque1)); /* Push nodes up to queue size */ for (i = 0; i < SIZE_OF_TQUE1; i++) { r = que_push(&tque1, &node[i]); ABTS_INT_EQUAL(tc, i + 1, r); } /* Check queue status */ ABTS_FALSE(tc, que_is_empty(&tque1)); ABTS_TRUE(tc, que_is_full(&tque1)); ABTS_INT_EQUAL(tc, 0, que_avail(&tque1)); ABTS_INT_EQUAL(tc, SIZE_OF_TQUE1, que_used(&tque1)); /* Push a node to full queue */ r = que_push(&tque1, &node[0]); ABTS_INT_EQUAL(tc, -1, r); /* Pop all pushed nodes and check pop order */ for (i = 0; i < SIZE_OF_TQUE1; i++) { r = que_pop(&tque1, &n); ABTS_INT_EQUAL(tc, node[i], n); ABTS_INT_EQUAL(tc, SIZE_OF_TQUE1 - (i + 1), r); } /* Check queue status */ ABTS_TRUE(tc, que_is_empty(&tque1)); ABTS_FALSE(tc, que_is_full(&tque1)); ABTS_INT_EQUAL(tc, SIZE_OF_TQUE1, que_avail(&tque1)); ABTS_INT_EQUAL(tc, 0, que_used(&tque1)); /* Pop a node from empty queue */ r = que_pop(&tque1, &n); ABTS_INT_EQUAL(tc, -1, r); } /***************************************************************************** * test for core_ringbuf.h */ #define SIZE_OF_TRBUF1 7 rbuf_declare(trbuf1, SIZE_OF_TRBUF1); #define SIZE_OF_TRBUF2 7 rbuf_declare_ext(trbuf2); char trbuf2_ext_buf[SIZE_OF_TRBUF2]; static void rbuf_test1(abts_case *tc, void *data) { int i, n; char wbuf[32]; char rbuf[32]; for (i = 0; i < 26; i++) wbuf[i] = 'a' + i; rbuf_init(&trbuf1, SIZE_OF_TRBUF1); /* Check basic members */ ABTS_TRUE(tc, rbuf_is_empty(&trbuf1)); ABTS_FALSE(tc, rbuf_is_full(&trbuf1)); ABTS_INT_EQUAL(tc, SIZE_OF_TRBUF1, rbuf_free_bytes(&trbuf1)); ABTS_INT_EQUAL(tc, 0, rbuf_bytes(&trbuf1)); /* Write 3 bytes */ n = rbuf_write(&trbuf1, wbuf, 3); ABTS_INT_EQUAL(tc, 3, n); /* Check basic members */ ABTS_FALSE(tc, rbuf_is_empty(&trbuf1)); ABTS_FALSE(tc, rbuf_is_full(&trbuf1)); ABTS_INT_EQUAL(tc, SIZE_OF_TRBUF1 - 3, rbuf_free_bytes(&trbuf1)); ABTS_INT_EQUAL(tc, 3, rbuf_bytes(&trbuf1)); /* Read 3 bytes */ n = rbuf_read(&trbuf1, rbuf, 3); rbuf[3] = 0; ABTS_INT_EQUAL(tc, 3, n); ABTS_STR_EQUAL(tc, "abc", rbuf); /* Check basic members */ ABTS_TRUE(tc, rbuf_is_empty(&trbuf1)); ABTS_FALSE(tc, rbuf_is_full(&trbuf1)); ABTS_INT_EQUAL(tc, SIZE_OF_TRBUF1, rbuf_free_bytes(&trbuf1)); ABTS_INT_EQUAL(tc, 0, rbuf_bytes(&trbuf1)); /* Write 3 bytes */ n = rbuf_write(&trbuf1, wbuf, 3); ABTS_INT_EQUAL(tc, 3, n); /* Write 5 bytes, but only 4 bytes shall be written */ n = rbuf_write(&trbuf1, wbuf + 3, 5); ABTS_INT_EQUAL(tc, 4, n); /* Write 1 bytes to full buffer */ n = rbuf_write(&trbuf1, wbuf, 1); ABTS_INT_EQUAL(tc, -1, n); /* Read 2 bytes */ n = rbuf_read(&trbuf1, rbuf, 2); rbuf[2] = 0; ABTS_INT_EQUAL(tc, 2, n); ABTS_STR_EQUAL(tc, "ab", rbuf); /* Read 5 bytes */ n = rbuf_read(&trbuf1, rbuf, 5); rbuf[5] = 0; ABTS_INT_EQUAL(tc, 5, n); ABTS_STR_EQUAL(tc, "cdefg", rbuf); /* Check basic members */ ABTS_TRUE(tc, rbuf_is_empty(&trbuf1)); ABTS_FALSE(tc, rbuf_is_full(&trbuf1)); ABTS_INT_EQUAL(tc, SIZE_OF_TRBUF1, rbuf_free_bytes(&trbuf1)); ABTS_INT_EQUAL(tc, 0, rbuf_bytes(&trbuf1)); /* Read 1 bytes from empty buffer */ n = rbuf_read(&trbuf1, rbuf, 1); ABTS_INT_EQUAL(tc, -1, n); } static void rbuf_test2(abts_case *tc, void *data) { int i, n; char wbuf[32]; char rbuf[32]; for (i = 0; i < 26; i++) wbuf[i] = 'a' + i; rbuf_init_ext(&trbuf2, SIZE_OF_TRBUF1, trbuf2_ext_buf); /* Check basic members */ ABTS_TRUE(tc, rbuf_is_empty(&trbuf2)); ABTS_FALSE(tc, rbuf_is_full(&trbuf2)); ABTS_INT_EQUAL(tc, SIZE_OF_TRBUF2, rbuf_free_bytes(&trbuf2)); ABTS_INT_EQUAL(tc, 0, rbuf_bytes(&trbuf2)); /* Write 3 bytes */ n = rbuf_write(&trbuf2, wbuf, 3); ABTS_INT_EQUAL(tc, 3, n); /* Check basic members */ ABTS_FALSE(tc, rbuf_is_empty(&trbuf2)); ABTS_FALSE(tc, rbuf_is_full(&trbuf2)); ABTS_INT_EQUAL(tc, SIZE_OF_TRBUF2 - 3, rbuf_free_bytes(&trbuf2)); ABTS_INT_EQUAL(tc, 3, rbuf_bytes(&trbuf2)); /* Read 3 bytes */ n = rbuf_read(&trbuf2, rbuf, 3); rbuf[3] = 0; ABTS_INT_EQUAL(tc, 3, n); ABTS_STR_EQUAL(tc, "abc", rbuf); /* Check basic members */ ABTS_TRUE(tc, rbuf_is_empty(&trbuf2)); ABTS_FALSE(tc, rbuf_is_full(&trbuf2)); ABTS_INT_EQUAL(tc, SIZE_OF_TRBUF2, rbuf_free_bytes(&trbuf2)); ABTS_INT_EQUAL(tc, 0, rbuf_bytes(&trbuf2)); /* Write 3 bytes */ n = rbuf_write(&trbuf2, wbuf, 3); ABTS_INT_EQUAL(tc, 3, n); /* Write 5 bytes, but only 4 bytes shall be written */ n = rbuf_write(&trbuf2, wbuf + 3, 5); ABTS_INT_EQUAL(tc, 4, n); /* Write 1 bytes to full buffer */ n = rbuf_write(&trbuf2, wbuf, 1); ABTS_INT_EQUAL(tc, -1, n); /* Read 2 bytes */ n = rbuf_read(&trbuf2, rbuf, 2); rbuf[2] = 0; ABTS_INT_EQUAL(tc, 2, n); ABTS_STR_EQUAL(tc, "ab", rbuf); /* Read 5 bytes */ n = rbuf_read(&trbuf2, rbuf, 5); rbuf[5] = 0; ABTS_INT_EQUAL(tc, 5, n); ABTS_STR_EQUAL(tc, "cdefg", rbuf); /* Check basic members */ ABTS_TRUE(tc, rbuf_is_empty(&trbuf2)); ABTS_FALSE(tc, rbuf_is_full(&trbuf2)); ABTS_INT_EQUAL(tc, SIZE_OF_TRBUF2, rbuf_free_bytes(&trbuf2)); ABTS_INT_EQUAL(tc, 0, rbuf_bytes(&trbuf2)); /* Read 1 bytes from empty buffer */ n = rbuf_read(&trbuf2, rbuf, 1); ABTS_INT_EQUAL(tc, -1, n); n = rbuf_skip_write_pos(&trbuf2, 5); ABTS_INT_EQUAL(tc, 5, n); n = rbuf_skip_read_pos(&trbuf2, 5); ABTS_INT_EQUAL(tc, 5, n); } abts_suite *testds(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, pool_test1, NULL); abts_run_test(suite, pool_test2, NULL); abts_run_test(suite, list_test1, NULL); abts_run_test(suite, list_test2, NULL); abts_run_test(suite, list_test3, NULL); abts_run_test(suite, list_test4, NULL); abts_run_test(suite, list_test5, NULL); abts_run_test(suite, que_test1, NULL); abts_run_test(suite, rbuf_test1, NULL); abts_run_test(suite, rbuf_test2, NULL); return suite; } nextepc-0.3.10/lib/core/test/testfile.c000066400000000000000000000460621333553357400177240ustar00rootroot00000000000000#include "core_file.h" #include "core_pkbuf.h" #include "testutil.h" #define DIRNAME "data" #define FILENAME DIRNAME "/file_datafile.txt" #define TESTSTR "This is the file data file." #define TESTREAD_BLKSIZE 1024 #define FILE_BUFFERSIZE 4096 /* This should match FILE's buffer size. */ static void test_file_init(abts_case *tc, void *data) { status_t rv; file_info_t finfo; size_t bytes; file_t *filetest = NULL; rv = dir_make("data", FILE_UREAD | FILE_UWRITE | FILE_UEXECUTE); rv = file_stat(&finfo, "data", FILE_INFO_TYPE); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_INT_EQUAL(tc, FILE_DIR, finfo.filetype); rv = file_open(&filetest, FILENAME, FILE_WRITE | FILE_CREATE, FILE_UREAD | FILE_UWRITE | FILE_GREAD); ABTS_INT_EQUAL(tc, CORE_OK, rv); bytes = strlen(TESTSTR); rv = file_write(filetest, TESTSTR, &bytes); ABTS_INT_EQUAL(tc, CORE_OK, rv); file_close(filetest); } static void test_open_noreadwrite(abts_case *tc, void *data) { status_t rv; file_t *thefile = NULL; rv = file_open(&thefile, FILENAME, FILE_CREATE | FILE_EXCL, FILE_UREAD | FILE_UWRITE | FILE_GREAD); ABTS_TRUE(tc, rv != CORE_OK); ABTS_INT_EQUAL(tc, 1, STATUS_IS_EACCES(rv)); ABTS_PTR_EQUAL(tc, NULL, thefile); } static void test_open_excl(abts_case *tc, void *data) { status_t rv; file_t *thefile = NULL; rv = file_open(&thefile, FILENAME, FILE_CREATE | FILE_EXCL | FILE_WRITE, FILE_UREAD | FILE_UWRITE | FILE_GREAD); ABTS_TRUE(tc, rv != CORE_OK); ABTS_INT_EQUAL(tc, 1, STATUS_IS_EEXIST(rv)); ABTS_PTR_EQUAL(tc, NULL, thefile); } static void test_open_read(abts_case *tc, void *data) { status_t rv; file_t *filetest = NULL; rv = file_open(&filetest, FILENAME, FILE_READ, FILE_UREAD | FILE_UWRITE | FILE_GREAD); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_PTR_NOTNULL(tc, filetest); file_close(filetest); } static void link_existing(abts_case *tc, void *data) { status_t rv; rv = file_link("data/file_datafile.txt", "data/file_datafile2.txt"); file_remove("data/file_datafile2.txt"); ABTS_ASSERT(tc, "Couldn't create hardlink to file", rv == CORE_OK); } static void link_nonexisting(abts_case *tc, void *data) { status_t rv; rv = file_link("data/does_not_exist.txt", "data/fake.txt"); ABTS_ASSERT(tc, "", rv != CORE_OK); } static void test_read(abts_case *tc, void *data) { status_t rv; size_t nbytes = 256; char *str = core_malloc(nbytes + 1); file_t *filetest = NULL; rv = file_open(&filetest, FILENAME, FILE_READ, FILE_UREAD | FILE_UWRITE | FILE_GREAD); CORE_ASSERT_OK(tc, "Opening test file " FILENAME, rv); rv = file_read(filetest, str, &nbytes); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_SIZE_EQUAL(tc, strlen(TESTSTR), nbytes); ABTS_STR_EQUAL(tc, TESTSTR, str); CORE_FREE(str); file_close(filetest); } static void test_readzero(abts_case *tc, void *data) { status_t rv; size_t nbytes = 0; char *str = NULL; file_t *filetest; rv = file_open(&filetest, FILENAME, FILE_READ, FILE_OS_DEFAULT); CORE_ASSERT_OK(tc, "Opening test file " FILENAME, rv); rv = file_read(filetest, str, &nbytes); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_SIZE_EQUAL(tc, 0, nbytes); file_close(filetest); } static void test_filename(abts_case *tc, void *data) { const char *str; status_t rv; file_t *filetest = NULL; rv = file_open(&filetest, FILENAME, FILE_READ, FILE_UREAD | FILE_UWRITE | FILE_GREAD); CORE_ASSERT_OK(tc, "Opening test file " FILENAME, rv); rv = file_name_get(&str, filetest); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_STR_EQUAL(tc, FILENAME, str); file_close(filetest); } static void test_fileclose(abts_case *tc, void *data) { char str; status_t rv; size_t one = 1; file_t *filetest = NULL; rv = file_open(&filetest, FILENAME, FILE_READ, FILE_UREAD | FILE_UWRITE | FILE_GREAD); CORE_ASSERT_OK(tc, "Opening test file " FILENAME, rv); rv = file_close(filetest); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* We just closed the file, so this should fail */ rv = file_read(filetest, &str, &one); ABTS_INT_EQUAL(tc, 1, STATUS_IS_EBADF(rv)); } static void test_file_remove(abts_case *tc, void *data) { status_t rv; file_t *filetest = NULL; rv = file_remove(FILENAME); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = file_open(&filetest, FILENAME, FILE_READ, FILE_UREAD | FILE_UWRITE | FILE_GREAD); ABTS_INT_EQUAL(tc, 1, STATUS_IS_ENOENT(rv)); } static void test_open_write(abts_case *tc, void *data) { status_t rv; file_t *filetest = NULL; filetest = NULL; rv = file_open(&filetest, FILENAME, FILE_WRITE, FILE_UREAD | FILE_UWRITE | FILE_GREAD); ABTS_INT_EQUAL(tc, 1, STATUS_IS_ENOENT(rv)); ABTS_PTR_EQUAL(tc, NULL, filetest); } static void test_open_writecreate(abts_case *tc, void *data) { status_t rv; file_t *filetest = NULL; filetest = NULL; rv = file_open(&filetest, FILENAME, FILE_WRITE | FILE_CREATE, FILE_UREAD | FILE_UWRITE | FILE_GREAD); ABTS_INT_EQUAL(tc, CORE_OK, rv); file_close(filetest); } static void test_write(abts_case *tc, void *data) { status_t rv; size_t bytes = strlen(TESTSTR); file_t *filetest = NULL; rv = file_open(&filetest, FILENAME, FILE_WRITE | FILE_CREATE, FILE_UREAD | FILE_UWRITE | FILE_GREAD); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = file_write(filetest, TESTSTR, &bytes); ABTS_INT_EQUAL(tc, CORE_OK, rv); file_close(filetest); } static void test_open_readwrite(abts_case *tc, void *data) { status_t rv; file_t *filetest = NULL; filetest = NULL; rv = file_open(&filetest, FILENAME, FILE_READ | FILE_WRITE, FILE_UREAD | FILE_UWRITE | FILE_GREAD); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_PTR_NOTNULL(tc, filetest); file_close(filetest); } static void test_seek(abts_case *tc, void *data) { status_t rv; off_t offset = 5; size_t nbytes = 256; char *str = core_malloc(nbytes + 1); file_t *filetest = NULL; rv = file_open(&filetest, FILENAME, FILE_READ, FILE_UREAD | FILE_UWRITE | FILE_GREAD); CORE_ASSERT_OK(tc, "Open test file " FILENAME, rv); rv = file_read(filetest, str, &nbytes); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_SIZE_EQUAL(tc, strlen(TESTSTR), nbytes); ABTS_STR_EQUAL(tc, TESTSTR, str); memset(str, 0, nbytes + 1); rv = file_seek(filetest, SEEK_SET, &offset); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = file_read(filetest, str, &nbytes); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_SIZE_EQUAL(tc, strlen(TESTSTR) - 5, nbytes); ABTS_STR_EQUAL(tc, TESTSTR + 5, str); file_close(filetest); /* Test for regression of sign error bug with SEEK_END and buffered files. */ rv = file_open(&filetest, FILENAME, FILE_READ, FILE_UREAD | FILE_UWRITE | FILE_GREAD); CORE_ASSERT_OK(tc, "Open test file " FILENAME, rv); offset = -5; rv = file_seek(filetest, SEEK_END, &offset); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_SIZE_EQUAL(tc, strlen(TESTSTR) - 5, nbytes); memset(str, 0, nbytes + 1); nbytes = 256; rv = file_read(filetest, str, &nbytes); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_SIZE_EQUAL(tc, 5, nbytes); ABTS_STR_EQUAL(tc, TESTSTR + strlen(TESTSTR) - 5, str); CORE_FREE(str); file_close(filetest); } static void test_getc(abts_case *tc, void *data) { file_t *f = NULL; status_t rv; char ch; rv = file_open(&f, FILENAME, FILE_READ, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); file_getc(&ch, f); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_INT_EQUAL(tc, (int)TESTSTR[0], (int)ch); file_close(f); } static void test_gets(abts_case *tc, void *data) { file_t *f = NULL; status_t rv; char *str = core_malloc(256); rv = file_open(&f, FILENAME, FILE_READ, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = file_gets(str, 256, f); /* Only one line in the test file, so FILE will encounter EOF on the first * call to gets, but we should get CORE_OK on this call and * CORE_EOF on the next. */ ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_STR_EQUAL(tc, TESTSTR, str); rv = file_gets(str, 256, f); ABTS_INT_EQUAL(tc, CORE_EOF, rv); ABTS_STR_EQUAL(tc, "", str); CORE_FREE(str); file_close(f); } static void test_bigread(abts_case *tc, void *data) { file_t *f = NULL; status_t rv; char buf[FILE_BUFFERSIZE * 2]; size_t nbytes; /* Create a test file with known content. */ rv = file_open(&f, "data/created_file", FILE_CREATE | FILE_WRITE | FILE_TRUNCATE, FILE_UREAD | FILE_UWRITE); ABTS_INT_EQUAL(tc, CORE_OK, rv); nbytes = FILE_BUFFERSIZE; memset(buf, 0xFE, nbytes); rv = file_write(f, buf, &nbytes); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_SIZE_EQUAL(tc, FILE_BUFFERSIZE, nbytes); rv = file_close(f); ABTS_INT_EQUAL(tc, CORE_OK, rv); f = NULL; rv = file_open(&f, "data/created_file", FILE_READ, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); nbytes = sizeof buf; rv = file_read(f, buf, &nbytes); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_SIZE_EQUAL(tc, FILE_BUFFERSIZE, nbytes); rv = file_close(f); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = file_remove("data/created_file"); ABTS_INT_EQUAL(tc, CORE_OK, rv); } /* This is a horrible name for this function. We are testing FILE, not how * Apache uses FILE. And, this function tests _way_ too much stuff. */ static void test_mod_neg(abts_case *tc, void *data) { status_t rv; file_t *f; const char *s; int i; size_t nbytes; char buf[8192]; off_t cur; const char *fname = "data/modneg.dat"; rv = file_open(&f, fname, FILE_CREATE | FILE_WRITE, FILE_UREAD | FILE_UWRITE); ABTS_INT_EQUAL(tc, CORE_OK, rv); s = "body56789\n"; nbytes = strlen(s); rv = file_write(f, s, &nbytes); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_SIZE_EQUAL(tc, strlen(s), nbytes); for (i = 0; i < 7980; i++) { s = "0"; nbytes = strlen(s); rv = file_write(f, s, &nbytes); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_SIZE_EQUAL(tc, strlen(s), nbytes); } s = "end456789\n"; nbytes = strlen(s); rv = file_write(f, s, &nbytes); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_SIZE_EQUAL(tc, strlen(s), nbytes); for (i = 0; i < 10000; i++) { s = "1"; nbytes = strlen(s); rv = file_write(f, s, &nbytes); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_SIZE_EQUAL(tc, strlen(s), nbytes); } rv = file_close(f); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = file_open(&f, fname, FILE_READ, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = file_gets(buf, 11, f); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_STR_EQUAL(tc, "body56789\n", buf); cur = 0; rv = file_seek(f, FILE_CUR, &cur); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_ASSERT(tc, "File Pointer Mismatch, expected 10", cur == 10); nbytes = sizeof(buf); rv = file_read(f, buf, &nbytes); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_SIZE_EQUAL(tc, nbytes, sizeof(buf)); cur = -((off_t)nbytes - 7980); rv = file_seek(f, FILE_CUR, &cur); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_ASSERT(tc, "File Pointer Mismatch, expected 7990", cur == 7990); rv = file_gets(buf, 11, f); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_STR_EQUAL(tc, "end456789\n", buf); rv = file_close(f); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = file_remove(fname); ABTS_INT_EQUAL(tc, CORE_OK, rv); } /* Test that the contents of file FNAME are equal to data EXPECT of * length EXPECTLEN. */ static void file_contents_equal(abts_case *tc, const char *fname, const void *expect, size_t expectlen) { void *actual = core_malloc(expectlen); file_t *f; CORE_ASSERT_OK(tc, "open file", file_open(&f, fname, FILE_READ, 0)); CORE_ASSERT_OK(tc, "read from file", file_read_full(f, actual, expectlen, NULL)); ABTS_ASSERT(tc, "matched expected file contents", memcmp(expect, actual, expectlen) == 0); CORE_ASSERT_OK(tc, "close file", file_close(f)); CORE_FREE(actual); } #define LINE1 "this is a line of text\n" #define LINE2 "this is a second line of text\n" static void test_puts(abts_case *tc, void *data) { file_t *f; const char *fname = "data/testputs.txt"; CORE_ASSERT_OK(tc, "open file for writing", file_open(&f, fname, FILE_WRITE|FILE_CREATE|FILE_TRUNCATE, FILE_OS_DEFAULT)); CORE_ASSERT_OK(tc, "write line to file", file_puts(LINE1, f)); CORE_ASSERT_OK(tc, "write second line to file", file_puts(LINE2, f)); CORE_ASSERT_OK(tc, "close for writing", file_close(f)); file_contents_equal(tc, fname, LINE1 LINE2, strlen(LINE1 LINE2)); } static void test_writev(abts_case *tc, void *data) { file_t *f; size_t nbytes; struct iovec vec[5]; const char *fname = "data/testwritev.txt"; CORE_ASSERT_OK(tc, "open file for writing", file_open(&f, fname, FILE_WRITE|FILE_CREATE|FILE_TRUNCATE, FILE_OS_DEFAULT)); vec[0].iov_base = LINE1; vec[0].iov_len = strlen(LINE1); CORE_ASSERT_OK(tc, "writev of size 1 to file", file_writev(f, vec, 1, &nbytes)); file_contents_equal(tc, fname, LINE1, strlen(LINE1)); vec[0].iov_base = LINE1; vec[0].iov_len = strlen(LINE1); vec[1].iov_base = LINE2; vec[1].iov_len = strlen(LINE2); vec[2].iov_base = LINE1; vec[2].iov_len = strlen(LINE1); vec[3].iov_base = LINE1; vec[3].iov_len = strlen(LINE1); vec[4].iov_base = LINE2; vec[4].iov_len = strlen(LINE2); CORE_ASSERT_OK(tc, "writev of size 5 to file", file_writev(f, vec, 5, &nbytes)); CORE_ASSERT_OK(tc, "close for writing", file_close(f)); file_contents_equal(tc, fname, LINE1 LINE1 LINE2 LINE1 LINE1 LINE2, strlen(LINE1)*4 + strlen(LINE2)*2); } static void test_writev_full(abts_case *tc, void *data) { file_t *f; size_t nbytes; struct iovec vec[5]; const char *fname = "data/testwritev_full.txt"; CORE_ASSERT_OK(tc, "open file for writing", file_open(&f, fname, FILE_WRITE|FILE_CREATE|FILE_TRUNCATE, FILE_OS_DEFAULT)); vec[0].iov_base = LINE1; vec[0].iov_len = strlen(LINE1); vec[1].iov_base = LINE2; vec[1].iov_len = strlen(LINE2); vec[2].iov_base = LINE1; vec[2].iov_len = strlen(LINE1); vec[3].iov_base = LINE1; vec[3].iov_len = strlen(LINE1); vec[4].iov_base = LINE2; vec[4].iov_len = strlen(LINE2); CORE_ASSERT_OK(tc, "writev_full of size 5 to file", file_writev_full(f, vec, 5, &nbytes)); ABTS_SIZE_EQUAL(tc, strlen(LINE1)*3 + strlen(LINE2)*2, nbytes); CORE_ASSERT_OK(tc, "close for writing", file_close(f)); file_contents_equal(tc, fname, LINE1 LINE2 LINE1 LINE1 LINE2, strlen(LINE1)*3 + strlen(LINE2)*2); } static void test_truncate(abts_case *tc, void *data) { status_t rv; file_t *f; const char *fname = "data/testtruncate.dat"; const char *s; size_t nbytes; file_info_t finfo; file_remove(fname); rv = file_open(&f, fname, FILE_CREATE | FILE_WRITE, FILE_UREAD | FILE_UWRITE); ABTS_INT_EQUAL(tc, CORE_OK, rv); s = "some data"; nbytes = strlen(s); rv = file_write(f, s, &nbytes); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_SIZE_EQUAL(tc, strlen(s), nbytes); rv = file_close(f); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = file_open(&f, fname, FILE_TRUNCATE | FILE_WRITE, FILE_UREAD | FILE_UWRITE); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = file_close(f); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = file_stat(&finfo, fname, FILE_INFO_SIZE); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_ASSERT(tc, "File size mismatch, expected 0 (empty)", finfo.size == 0); rv = file_remove(fname); ABTS_INT_EQUAL(tc, CORE_OK, rv); } static void test_fail_write_flush(abts_case *tc, void *data) { file_t *f; const char *fname = "data/testflush.dat"; status_t rv; char buf[FILE_BUFFERSIZE]; int n; file_remove(fname); CORE_ASSERT_OK(tc, "open test file", file_open(&f, fname, FILE_CREATE|FILE_READ, FILE_UREAD|FILE_UWRITE)); memset(buf, 'A', sizeof buf); /* Try three writes. One of these should fail when it exceeds the * internal buffer and actually tries to write to the file, which * was opened read-only and hence should be unwritable. */ for (n = 0, rv = CORE_OK; n < 4 && rv == CORE_OK; n++) { size_t bytes = sizeof buf; rv = file_write(f, buf, &bytes); } ABTS_ASSERT(tc, "failed to write to read-only buffered fd", rv != CORE_OK); file_close(f); } abts_suite *testfile(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, test_file_init, NULL); abts_run_test(suite, test_open_noreadwrite, NULL); abts_run_test(suite, test_open_excl, NULL); abts_run_test(suite, test_open_read, NULL); abts_run_test(suite, test_open_readwrite, NULL); abts_run_test(suite, link_existing, NULL); abts_run_test(suite, link_nonexisting, NULL); abts_run_test(suite, test_read, NULL); abts_run_test(suite, test_readzero, NULL); abts_run_test(suite, test_seek, NULL); abts_run_test(suite, test_filename, NULL); abts_run_test(suite, test_fileclose, NULL); abts_run_test(suite, test_file_remove, NULL); abts_run_test(suite, test_open_write, NULL); abts_run_test(suite, test_open_writecreate, NULL); abts_run_test(suite, test_write, NULL); abts_run_test(suite, test_getc, NULL); abts_run_test(suite, test_gets, NULL); abts_run_test(suite, test_puts, NULL); abts_run_test(suite, test_writev, NULL); abts_run_test(suite, test_writev_full, NULL); abts_run_test(suite, test_bigread, NULL); abts_run_test(suite, test_mod_neg, NULL); abts_run_test(suite, test_truncate, NULL); abts_run_test(suite, test_fail_write_flush, NULL); return suite; } nextepc-0.3.10/lib/core/test/testfilecopy.c000066400000000000000000000111661333553357400206140ustar00rootroot00000000000000#include "core_file.h" #include "testutil.h" #define DIRNAME "data" #define FILENAME1 DIRNAME "/file_datafile.txt" #define TESTSTR1 "This is the file data file." #define FILENAME2 DIRNAME "/mmap_datafile.txt" #define TESTSTR2 "This is the MMAP data file." static void test_filecopy_init(abts_case *tc, void *data) { status_t rv; file_info_t finfo; size_t bytes; file_t *filetest = NULL; rv = dir_make("data", FILE_UREAD | FILE_UWRITE | FILE_UEXECUTE); rv = file_stat(&finfo, "data", FILE_INFO_TYPE); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_INT_EQUAL(tc, FILE_DIR, finfo.filetype); rv = file_open(&filetest, FILENAME1, FILE_WRITE | FILE_CREATE, FILE_UREAD | FILE_UWRITE | FILE_GREAD); ABTS_INT_EQUAL(tc, CORE_OK, rv); bytes = strlen(TESTSTR1); rv = file_write(filetest, TESTSTR1, &bytes); ABTS_INT_EQUAL(tc, CORE_OK, rv); file_close(filetest); rv = file_open(&filetest, FILENAME2, FILE_WRITE | FILE_CREATE, FILE_UREAD | FILE_UWRITE | FILE_GREAD); ABTS_INT_EQUAL(tc, CORE_OK, rv); bytes = strlen(TESTSTR2); rv = file_write(filetest, TESTSTR2, &bytes); ABTS_INT_EQUAL(tc, CORE_OK, rv); file_close(filetest); } static void copy_helper(abts_case *tc, const char *from, const char * to, file_perms_t perms, int append) { status_t rv; status_t dest_rv; file_info_t copy; file_info_t orig; file_info_t dest; dest_rv = file_stat(&dest, to, FILE_INFO_SIZE); if (!append) { rv = file_copy(from, to, perms); } else { rv = file_append(from, to, perms); } CORE_ASSERT_OK(tc, "Error copying file", rv); rv = file_stat(&orig, from, FILE_INFO_SIZE); CORE_ASSERT_OK(tc, "Couldn't stat original file", rv); rv = file_stat(©, to, FILE_INFO_SIZE); CORE_ASSERT_OK(tc, "Couldn't stat copy file", rv); if (!append) { ABTS_ASSERT(tc, "File size differs", orig.size == copy.size); } else { ABTS_ASSERT(tc, "File size differs", ((dest_rv == CORE_OK) ? dest.size : 0) + orig.size == copy.size); } } static void copy_short_file(abts_case *tc, void *data) { status_t rv; /* make absolutely sure that the dest file doesn't exist. */ file_remove("data/file_copy.txt"); copy_helper(tc, "data/file_datafile.txt", "data/file_copy.txt", FILE_SOURCE_PERMS, 0); rv = file_remove("data/file_copy.txt"); CORE_ASSERT_OK(tc, "Couldn't remove copy file", rv); } static void copy_over_existing(abts_case *tc, void *data) { status_t rv; /* make absolutely sure that the dest file doesn't exist. */ file_remove("data/file_copy.txt"); /* This is a cheat. I don't want to create a new file, so I just copy * one file, then I copy another. If the second copy succeeds, then * this works. */ copy_helper(tc, "data/file_datafile.txt", "data/file_copy.txt", FILE_SOURCE_PERMS, 0); copy_helper(tc, "data/mmap_datafile.txt", "data/file_copy.txt", FILE_SOURCE_PERMS, 0); rv = file_remove("data/file_copy.txt"); CORE_ASSERT_OK(tc, "Couldn't remove copy file", rv); } static void append_nonexist(abts_case *tc, void *data) { status_t rv; /* make absolutely sure that the dest file doesn't exist. */ file_remove("data/file_copy.txt"); copy_helper(tc, "data/file_datafile.txt", "data/file_copy.txt", FILE_SOURCE_PERMS, 0); rv = file_remove("data/file_copy.txt"); CORE_ASSERT_OK(tc, "Couldn't remove copy file", rv); } static void append_exist(abts_case *tc, void *data) { status_t rv; /* make absolutely sure that the dest file doesn't exist. */ file_remove("data/file_copy.txt"); /* This is a cheat. I don't want to create a new file, so I just copy * one file, then I copy another. If the second copy succeeds, then * this works. */ copy_helper(tc, "data/file_datafile.txt", "data/file_copy.txt", FILE_SOURCE_PERMS, 0); copy_helper(tc, "data/mmap_datafile.txt", "data/file_copy.txt", FILE_SOURCE_PERMS, 1); rv = file_remove("data/file_copy.txt"); CORE_ASSERT_OK(tc, "Couldn't remove copy file", rv); } abts_suite *testfilecopy(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, test_filecopy_init, NULL); abts_run_test(suite, copy_short_file, NULL); abts_run_test(suite, copy_over_existing, NULL); abts_run_test(suite, append_nonexist, NULL); abts_run_test(suite, append_exist, NULL); return suite; } nextepc-0.3.10/lib/core/test/testfsm.c000066400000000000000000000154561333553357400175750ustar00rootroot00000000000000#include "core_fsm.h" #include "testutil.h" enum bomb_signal_t { UP_SIG = FSM_USER_SIG, DOWN_SIG, ARM_SIG }; typedef struct _tick_event_t { fsm_event_t event; } tick_event_t; typedef struct _bomb_t { fsm_t fsm; c_uint8_t timeout; c_uint8_t code; c_uint8_t defuse; } bomb_t; void bomb_initial(bomb_t *s, tick_event_t *e); void bomb_setting(bomb_t *s, tick_event_t *e); void bomb_timing(bomb_t *s, tick_event_t *e); void bomb_create(bomb_t *s, uint8_t defuse) { fsm_create(&s->fsm, &bomb_initial, 0); s->defuse = defuse; } void bomb_initial(bomb_t *s, tick_event_t *e) { s->timeout = 10; FSM_TRAN(s, &bomb_setting); } void bomb_setting(bomb_t *s, tick_event_t *e) { switch (e->event) { case UP_SIG: { if (s->timeout < 12) { ++s->timeout; } break; } case DOWN_SIG: { if (s->timeout > 8) { --s->timeout; } break; } case ARM_SIG: { FSM_TRAN(s, &bomb_timing); break; } } } void bomb_timing(bomb_t *s, tick_event_t *e) { switch (e->event) { case FSM_ENTRY_SIG: { s->code = 0; break; } case UP_SIG: { s->code <<= 1; s->code |= 1; break; } case DOWN_SIG: { s->code <<= 1; break; } case ARM_SIG: { if (s->code == s->defuse) { FSM_TRAN(s, &bomb_setting); break; } } } } static void fsm_test1(abts_case *tc, void *data) { bomb_t bomb; tick_event_t tick_event; bomb_create(&bomb, 14); fsm_init(&bomb, 0); ABTS_PTR_EQUAL(tc, &bomb_setting, FSM_STATE(&bomb)); ABTS_INT_EQUAL(tc, 10, bomb.timeout); tick_event.event = UP_SIG; fsm_dispatch(&bomb, &tick_event); ABTS_PTR_EQUAL(tc, &bomb_setting, FSM_STATE(&bomb)); ABTS_INT_EQUAL(tc, 11, bomb.timeout); fsm_dispatch(&bomb, &tick_event); ABTS_PTR_EQUAL(tc, &bomb_setting, FSM_STATE(&bomb)); ABTS_INT_EQUAL(tc, 12, bomb.timeout); fsm_dispatch(&bomb, &tick_event); ABTS_PTR_EQUAL(tc, &bomb_setting, FSM_STATE(&bomb)); ABTS_INT_EQUAL(tc, 12, bomb.timeout); tick_event.event = DOWN_SIG; fsm_dispatch(&bomb, &tick_event); ABTS_PTR_EQUAL(tc, &bomb_setting, FSM_STATE(&bomb)); ABTS_INT_EQUAL(tc, 11, bomb.timeout); fsm_dispatch(&bomb, &tick_event); ABTS_PTR_EQUAL(tc, &bomb_setting, FSM_STATE(&bomb)); ABTS_INT_EQUAL(tc, 10, bomb.timeout); fsm_dispatch(&bomb, &tick_event); ABTS_PTR_EQUAL(tc, &bomb_setting, FSM_STATE(&bomb)); ABTS_INT_EQUAL(tc, 9, bomb.timeout); fsm_dispatch(&bomb, &tick_event); ABTS_PTR_EQUAL(tc, &bomb_setting, FSM_STATE(&bomb)); ABTS_INT_EQUAL(tc, 8, bomb.timeout); fsm_dispatch(&bomb, &tick_event); ABTS_PTR_EQUAL(tc, &bomb_setting, FSM_STATE(&bomb)); ABTS_INT_EQUAL(tc, 8, bomb.timeout); tick_event.event = ARM_SIG; fsm_dispatch((fsm_t *)&bomb, &tick_event); ABTS_PTR_EQUAL(tc, &bomb_timing, FSM_STATE(&bomb)); ABTS_INT_EQUAL(tc, 0, bomb.code); tick_event.event = UP_SIG; fsm_dispatch((fsm_t *)&bomb, &tick_event); ABTS_PTR_EQUAL(tc, &bomb_timing, FSM_STATE(&bomb)); ABTS_INT_EQUAL(tc, 1, bomb.code); tick_event.event = UP_SIG; fsm_dispatch((fsm_t *)&bomb, &tick_event); ABTS_PTR_EQUAL(tc, &bomb_timing, FSM_STATE(&bomb)); ABTS_INT_EQUAL(tc, 3, bomb.code); tick_event.event = UP_SIG; fsm_dispatch((fsm_t *)&bomb, &tick_event); ABTS_PTR_EQUAL(tc, &bomb_timing, FSM_STATE(&bomb)); ABTS_INT_EQUAL(tc, 7, bomb.code); tick_event.event = DOWN_SIG; fsm_dispatch((fsm_t *)&bomb, &tick_event); ABTS_PTR_EQUAL(tc, &bomb_timing, FSM_STATE(&bomb)); ABTS_INT_EQUAL(tc, 14, bomb.code); tick_event.event = ARM_SIG; fsm_dispatch((fsm_t *)&bomb, &tick_event); ABTS_PTR_EQUAL(tc, &bomb_setting, FSM_STATE(&bomb)); } enum alarm_signal_t { TICK_SIG = FSM_USER_SIG, ALARM_SET_SIG, ALARM_ON_SIG, ALARM_OFF_SIG, ALARM_SIG, CLOCK_12H_SIG, CLOCK_24H_SIG, TIME_SIG, TERMINATE_SIG }; typedef struct _alarm_t { fsm_t fsm; c_uint32_t time; } alarm_t; typedef struct _set_event_t { fsm_event_t event; c_uint8_t digit; } set_event_t; typedef struct _time_event_t { fsm_event_t event; c_uint8_t current_time; } time_event_t; void alarm_initial(alarm_t *s, set_event_t *e); void alarm_off(alarm_t *s, set_event_t *e); void alarm_on(alarm_t *s, time_event_t *e); void alarm_initial(alarm_t *s, set_event_t *e) { s->time = 12*60; FSM_TRAN(s, &alarm_off); } void alarm_off(alarm_t *s, set_event_t *e) { switch (e->event) { case FSM_ENTRY_SIG: { s->time = (s->time/60)*100 + s->time%60; break; } case FSM_EXIT_SIG: { s->time = (s->time/100)*60 + s->time%100; break; } case ALARM_ON_SIG: { FSM_TRAN(s, &alarm_on); break; } case ALARM_SET_SIG: { c_uint32_t alarm = (10 * s->time + e->digit) % 10000; if ((alarm / 100 < 24) && (alarm % 100 < 60)) { s->time = alarm; } else { s->time = 0; } break; } } } void alarm_on(alarm_t *s, time_event_t *e) { switch (e->event) { case FSM_ENTRY_SIG: { break; } case ALARM_SET_SIG: { break; } case ALARM_OFF_SIG: { FSM_TRAN(s, &alarm_off); break; } } } static void fsm_test2(abts_case *tc, void *data) { alarm_t alarm; set_event_t set_event; time_event_t time_event; fsm_create(&alarm.fsm, &alarm_initial, 0); fsm_init(&alarm, 0); ABTS_PTR_EQUAL(tc, &alarm_off, FSM_STATE(&alarm)); ABTS_INT_EQUAL(tc, 1200, alarm.time); set_event.event = ALARM_ON_SIG; fsm_dispatch(&alarm, &set_event); ABTS_PTR_EQUAL(tc, &alarm_on, FSM_STATE(&alarm)); ABTS_INT_EQUAL(tc, 720, alarm.time); time_event.event = ALARM_OFF_SIG; fsm_dispatch(&alarm, &time_event); ABTS_PTR_EQUAL(tc, &alarm_off, FSM_STATE(&alarm)); ABTS_INT_EQUAL(tc, 1200, alarm.time); set_event.event = ALARM_SET_SIG; set_event.digit = 0; fsm_dispatch(&alarm, &set_event); ABTS_PTR_EQUAL(tc, &alarm_off, FSM_STATE(&alarm)); ABTS_INT_EQUAL(tc, 2000, alarm.time); } abts_suite *testfsm(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, fsm_test1, NULL); abts_run_test(suite, fsm_test2, NULL); return suite; } nextepc-0.3.10/lib/core/test/testhash.c000066400000000000000000000231601333553357400177220ustar00rootroot00000000000000#include "testutil.h" #include "core_hash.h" #define MAX_LTH 256 #define MAX_DEPTH 11 static int comp_string(const void *str1, const void *str2) { return strcmp(str1,str2); } static void dump_hash(hash_t *h, char str[][MAX_LTH]) { hash_index_t *hi; int i = 0; for (hi = hash_first(h); hi; hi = hash_next(hi)) { const char *key = hash_this_key(hi); int len = hash_this_key_len(hi); char *val = hash_this_val(hi); str[i][0]='\0'; sprintf(str[i], "%sKey %s (%d) Value %s\n", str[i], key, len, val); i++; } str[i][0]='\0'; sprintf(str[i], "%s#entries %d\n", str[i], i); /* Sort the result strings so that they can be checked for expected results easily, * without having to worry about platform quirks */ qsort( str, /* Pointer to elements */ i, /* number of elements */ MAX_LTH, /* size of one element */ comp_string /* Pointer to comparison routine */ ); } static void sum_hash(hash_t *h, int *pcount, int *keySum, int *valSum) { hash_index_t *hi; void *val, *key; int count = 0; *keySum = 0; *valSum = 0; *pcount = 0; for (hi = hash_first(h); hi; hi = hash_next(hi)) { hash_this(hi, (void*)&key, NULL, &val); *valSum += *(int *)val; *keySum += *(int *)key; count++; } *pcount=count; } static void hash_make_test(abts_case *tc, void *data) { hash_t *h = NULL; h = hash_make(); ABTS_PTR_NOTNULL(tc, h); hash_destroy(h); } static void hash_set_test(abts_case *tc, void *data) { hash_t *h = NULL; char *result = NULL; h = hash_make(); ABTS_PTR_NOTNULL(tc, h); hash_set(h, "key", HASH_KEY_STRING, "value"); result = hash_get(h, "key", HASH_KEY_STRING); ABTS_STR_EQUAL(tc, "value", result); hash_destroy(h); } static void hash_get_or_set_test(abts_case *tc, void *data) { hash_t *h = NULL; char *result = NULL; h = hash_make(); ABTS_PTR_NOTNULL(tc, h); result = hash_get_or_set(h, "key", HASH_KEY_STRING, "value"); ABTS_STR_EQUAL(tc, "value", result); result = hash_get_or_set(h, "key", HASH_KEY_STRING, "other"); ABTS_STR_EQUAL(tc, "value", result); result = hash_get_or_set(h, "key", HASH_KEY_STRING, NULL); ABTS_STR_EQUAL(tc, "value", result); hash_set(h, "key", HASH_KEY_STRING, NULL); result = hash_get(h, "key", HASH_KEY_STRING); ABTS_PTR_EQUAL(tc, NULL, result); result = hash_get_or_set(h, "key", HASH_KEY_STRING, NULL); ABTS_PTR_EQUAL(tc, NULL, result); result = hash_get_or_set(h, "key", HASH_KEY_STRING, "other"); ABTS_STR_EQUAL(tc, "other", result); hash_destroy(h); } static void hash_reset(abts_case *tc, void *data) { hash_t *h = NULL; char *result = NULL; h = hash_make(); ABTS_PTR_NOTNULL(tc, h); hash_set(h, "key", HASH_KEY_STRING, "value"); result = hash_get(h, "key", HASH_KEY_STRING); ABTS_STR_EQUAL(tc, "value", result); hash_set(h, "key", HASH_KEY_STRING, "new"); result = hash_get(h, "key", HASH_KEY_STRING); ABTS_STR_EQUAL(tc, "new", result); hash_destroy(h); } static void same_value(abts_case *tc, void *data) { hash_t *h = NULL; char *result = NULL; h = hash_make(); ABTS_PTR_NOTNULL(tc, h); hash_set(h, "same1", HASH_KEY_STRING, "same"); result = hash_get(h, "same1", HASH_KEY_STRING); ABTS_STR_EQUAL(tc, "same", result); hash_set(h, "same2", HASH_KEY_STRING, "same"); result = hash_get(h, "same2", HASH_KEY_STRING); ABTS_STR_EQUAL(tc, "same", result); hash_destroy(h); } static unsigned int hash_custom( const char *key, int *klen) { unsigned int hash = 0; unsigned int len = *klen; while( len ) { (len) --; hash = hash * 33 + key[ len ]; } return hash; } static void same_value_custom(abts_case *tc, void *data) { hash_t *h = NULL; char *result = NULL; h = hash_make_custom(hash_custom); ABTS_PTR_NOTNULL(tc, h); hash_set(h, "same1", 5, "same"); result = hash_get(h, "same1", 5); ABTS_STR_EQUAL(tc, "same", result); hash_set(h, "same2", 5, "same"); result = hash_get(h, "same2", 5); ABTS_STR_EQUAL(tc, "same", result); hash_destroy(h); } static void key_space(abts_case *tc, void *data) { hash_t *h = NULL; char *result = NULL; h = hash_make(); ABTS_PTR_NOTNULL(tc, h); hash_set(h, "key with space", HASH_KEY_STRING, "value"); result = hash_get(h, "key with space", HASH_KEY_STRING); ABTS_STR_EQUAL(tc, "value", result); hash_destroy(h); } static void hash_clear_test(abts_case *tc, void *data) { hash_t *h; int num[10], i; int c; h = hash_make(); ABTS_PTR_NOTNULL(tc, h); for (i = 0; i < 10; i++) { num[i] = i; hash_set(h, &num[i], sizeof(num[i]), &num[i]); } c = hash_count(h); ABTS_INT_EQUAL(tc, 10, c); hash_clear(h); c = hash_count(h); ABTS_INT_EQUAL(tc, 0, c); hash_destroy(h); } /* This is kind of a hack, but I am just keeping an existing test. This is * really testing hash_first, hash_next, and hash_this which * should be tested in three separate tests, but this will do for now. */ static void hash_traverse(abts_case *tc, void *data) { hash_t *h; char StrArray[MAX_DEPTH][MAX_LTH]; h = hash_make(); ABTS_PTR_NOTNULL(tc, h); hash_set(h, "OVERWRITE", HASH_KEY_STRING, "should not see this"); hash_set(h, "FOO3", HASH_KEY_STRING, "bar3"); hash_set(h, "FOO3", HASH_KEY_STRING, "bar3"); hash_set(h, "FOO1", HASH_KEY_STRING, "bar1"); hash_set(h, "FOO2", HASH_KEY_STRING, "bar2"); hash_set(h, "FOO4", HASH_KEY_STRING, "bar4"); hash_set(h, "SAME1", HASH_KEY_STRING, "same"); hash_set(h, "SAME2", HASH_KEY_STRING, "same"); hash_set(h, "OVERWRITE", HASH_KEY_STRING, "Overwrite key"); dump_hash(h, StrArray); ABTS_STR_EQUAL(tc, "Key FOO1 (4) Value bar1\n", StrArray[0]); ABTS_STR_EQUAL(tc, "Key FOO2 (4) Value bar2\n", StrArray[1]); ABTS_STR_EQUAL(tc, "Key FOO3 (4) Value bar3\n", StrArray[2]); ABTS_STR_EQUAL(tc, "Key FOO4 (4) Value bar4\n", StrArray[3]); ABTS_STR_EQUAL(tc, "Key OVERWRITE (9) Value Overwrite key\n", StrArray[4]); ABTS_STR_EQUAL(tc, "Key SAME1 (5) Value same\n", StrArray[5]); ABTS_STR_EQUAL(tc, "Key SAME2 (5) Value same\n", StrArray[6]); ABTS_STR_EQUAL(tc, "#entries 7\n", StrArray[7]); hash_destroy(h); } /* This is kind of a hack, but I am just keeping an existing test. This is * really testing hash_first, hash_next, and hash_this which * should be tested in three separate tests, but this will do for now. */ static void summation_test(abts_case *tc, void *data) { hash_t *h; int sumKeys, sumVal, trySumKey, trySumVal; int i, j, val[100], key[100]; h = hash_make(); ABTS_PTR_NOTNULL(tc, h); sumKeys = 0; sumVal = 0; trySumKey = 0; trySumVal = 0; for (i = 0; i < 100; i++) { j = i * 10 + 1; sumKeys += j; sumVal += i; key[i] = j; val[i] = i; hash_set(h, &key[i], sizeof(int), &val[i]); } sum_hash(h, &i, &trySumKey, &trySumVal); ABTS_INT_EQUAL(tc, 100, i); ABTS_INT_EQUAL(tc, sumVal, trySumVal); ABTS_INT_EQUAL(tc, sumKeys, trySumKey); hash_destroy(h); } static void delete_key(abts_case *tc, void *data) { hash_t *h = NULL; char *result = NULL; h = hash_make(); ABTS_PTR_NOTNULL(tc, h); hash_set(h, "key", HASH_KEY_STRING, "value"); hash_set(h, "key2", HASH_KEY_STRING, "value2"); result = hash_get(h, "key", HASH_KEY_STRING); ABTS_STR_EQUAL(tc, "value", result); result = hash_get(h, "key2", HASH_KEY_STRING); ABTS_STR_EQUAL(tc, "value2", result); hash_set(h, "key", HASH_KEY_STRING, NULL); result = hash_get(h, "key", HASH_KEY_STRING); ABTS_PTR_EQUAL(tc, NULL, result); result = hash_get(h, "key2", HASH_KEY_STRING); ABTS_STR_EQUAL(tc, "value2", result); hash_destroy(h); } static void hash_count_0(abts_case *tc, void *data) { hash_t *h = NULL; int count; h = hash_make(); ABTS_PTR_NOTNULL(tc, h); count = hash_count(h); ABTS_INT_EQUAL(tc, 0, count); hash_destroy(h); } static void hash_count_1(abts_case *tc, void *data) { hash_t *h = NULL; int count; h = hash_make(); ABTS_PTR_NOTNULL(tc, h); hash_set(h, "key", HASH_KEY_STRING, "value"); count = hash_count(h); ABTS_INT_EQUAL(tc, 1, count); hash_destroy(h); } static void hash_count_5(abts_case *tc, void *data) { hash_t *h = NULL; int count; h = hash_make(); ABTS_PTR_NOTNULL(tc, h); hash_set(h, "key1", HASH_KEY_STRING, "value1"); hash_set(h, "key2", HASH_KEY_STRING, "value2"); hash_set(h, "key3", HASH_KEY_STRING, "value3"); hash_set(h, "key4", HASH_KEY_STRING, "value4"); hash_set(h, "key5", HASH_KEY_STRING, "value5"); count = hash_count(h); ABTS_INT_EQUAL(tc, 5, count); hash_destroy(h); } abts_suite *testhash(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, hash_make_test, NULL); abts_run_test(suite, hash_set_test, NULL); abts_run_test(suite, hash_get_or_set_test, NULL); abts_run_test(suite, hash_reset, NULL); abts_run_test(suite, same_value, NULL); abts_run_test(suite, same_value_custom, NULL); abts_run_test(suite, key_space, NULL); abts_run_test(suite, delete_key, NULL); abts_run_test(suite, hash_count_0, NULL); abts_run_test(suite, hash_count_1, NULL); abts_run_test(suite, hash_count_5, NULL); abts_run_test(suite, hash_clear_test, NULL); abts_run_test(suite, hash_traverse, NULL); abts_run_test(suite, summation_test, NULL); return suite; } nextepc-0.3.10/lib/core/test/testlock.c000066400000000000000000000241361333553357400177330ustar00rootroot00000000000000#include "core_thread.h" #include "core_mutex.h" #include "core_cond.h" #include "core_rwlock.h" #include "core_semaphore.h" #include "core_time.h" #include "testutil.h" #define MAX_ITER 40000 #define MAX_COUNTER 10000 #define MAX_RETRY 3 static void *THREAD_FUNC thread_rwlock_func(thread_id id, void *data); static void *THREAD_FUNC thread_mutex_function(thread_id id, void *data); static void *THREAD_FUNC thread_cond_producer(thread_id id, void *data); static void *THREAD_FUNC thread_cond_consumer(thread_id id, void *data); static mutex_id mutex; static rwlock_id rwlock; static semaphore_id semaphore; static int i = 0, x = 0; static int buff[MAX_COUNTER]; struct { mutex_id mutex; int nput; int nval; } put; struct { mutex_id mutex; cond_id cond; int nready; } nready; static mutex_id timeout_mutex; static cond_id timeout_cond; static void *THREAD_FUNC thread_rwlock_func(thread_id id, void *data) { int exitLoop = 1; while (1) { rwlock_rdlock(rwlock); if (i == MAX_ITER) exitLoop = 0; rwlock_unlock(rwlock); if (!exitLoop) break; rwlock_wrlock(rwlock); if (i != MAX_ITER) { i++; x++; } rwlock_unlock(rwlock); } return NULL; } static void *THREAD_FUNC thread_mutex_function(thread_id id, void *data) { int exitLoop = 1; /* slight delay to allow things to settle */ core_sleep (1); while (1) { mutex_lock(mutex); if (i == MAX_ITER) exitLoop = 0; else { i++; x++; } mutex_unlock(mutex); if (!exitLoop) break; } return NULL; } static void *THREAD_FUNC thread_cond_producer(thread_id id, void *data) { for (;;) { mutex_lock(put.mutex); if (put.nput >= MAX_COUNTER) { mutex_unlock(put.mutex); return NULL; } buff[put.nput] = put.nval; put.nput++; put.nval++; mutex_unlock(put.mutex); mutex_lock(nready.mutex); if (nready.nready == 0) cond_signal(nready.cond); nready.nready++; mutex_unlock(nready.mutex); *((int *) data) += 1; } return NULL; } static void *THREAD_FUNC thread_cond_consumer(thread_id id, void *data) { int i; for (i = 0; i < MAX_COUNTER; i++) { mutex_lock(nready.mutex); while (nready.nready == 0) cond_wait(nready.cond, nready.mutex); nready.nready--; mutex_unlock(nready.mutex); if (buff[i] != i) printf("buff[%d] = %d\n", i, buff[i]); } return NULL; } static void *THREAD_FUNC thread_semaphore_function(thread_id id, void *data) { int exitLoop = 1; /* slight delay to allow things to settle */ core_sleep (1); while (1) { semaphore_wait(semaphore); if (i == MAX_ITER) exitLoop = 0; else { i++; x++; } semaphore_post(semaphore); if (!exitLoop) break; } return NULL; } static void test_mutex(abts_case *tc, void *data) { thread_id t1, t2, t3, t4; status_t s1, s2, s3, s4; s1 = mutex_create(&mutex, MUTEX_DEFAULT); ABTS_INT_EQUAL(tc, CORE_OK, s1); i = 0; x = 0; s1 = thread_create(&t1, NULL, thread_mutex_function, NULL); ABTS_INT_EQUAL(tc, CORE_OK, s1); s2 = thread_create(&t2, NULL, thread_mutex_function, NULL); ABTS_INT_EQUAL(tc, CORE_OK, s2); s3 = thread_create(&t3, NULL, thread_mutex_function, NULL); ABTS_INT_EQUAL(tc, CORE_OK, s3); s4 = thread_create(&t4, NULL, thread_mutex_function, NULL); ABTS_INT_EQUAL(tc, CORE_OK, s4); ABTS_INT_EQUAL(tc, CORE_OK, thread_delete(t1)); ABTS_INT_EQUAL(tc, CORE_OK, thread_delete(t2)); ABTS_INT_EQUAL(tc, CORE_OK, thread_delete(t3)); ABTS_INT_EQUAL(tc, CORE_OK, thread_delete(t4)); ABTS_INT_EQUAL(tc, MAX_ITER, x); CORE_ASSERT_OK(tc, "delete mutex", mutex_delete(mutex)); } static void test_thread_rwlock(abts_case *tc, void *data) { thread_id t1, t2, t3, t4; status_t s1, s2, s3, s4; s1 = rwlock_create(&rwlock); if (s1 == CORE_ENOTIMPL) { ABTS_NOT_IMPL(tc, "rwlocks not implemented"); return; } CORE_ASSERT_OK(tc, "rwlock_create", s1); i = 0; x = 0; s1 = thread_create(&t1, NULL, thread_rwlock_func, NULL); CORE_ASSERT_OK(tc, "create thread 1", s1); s2 = thread_create(&t2, NULL, thread_rwlock_func, NULL); CORE_ASSERT_OK(tc, "create thread 2", s2); s3 = thread_create(&t3, NULL, thread_rwlock_func, NULL); CORE_ASSERT_OK(tc, "create thread 3", s3); s4 = thread_create(&t4, NULL, thread_rwlock_func, NULL); CORE_ASSERT_OK(tc, "create thread 4", s4); ABTS_INT_EQUAL(tc, CORE_OK, thread_delete(t1)); ABTS_INT_EQUAL(tc, CORE_OK, thread_delete(t2)); ABTS_INT_EQUAL(tc, CORE_OK, thread_delete(t3)); ABTS_INT_EQUAL(tc, CORE_OK, thread_delete(t4)); ABTS_INT_EQUAL(tc, MAX_ITER, x); CORE_ASSERT_OK(tc, "delete rwlock", rwlock_delete(rwlock)); } static void test_cond(abts_case *tc, void *data) { thread_id p1, p2, p3, p4, c1; status_t s0, s1, s2, s3, s4; int count1, count2, count3, count4; int sum; CORE_ASSERT_OK(tc, "create put mutex", mutex_create(&put.mutex, MUTEX_DEFAULT)); CORE_ASSERT_OK(tc, "create nready mutex", mutex_create(&nready.mutex, MUTEX_DEFAULT)); CORE_ASSERT_OK(tc, "create condvar", cond_create(&nready.cond)); count1 = count2 = count3 = count4 = 0; put.nput = put.nval = 0; nready.nready = 0; i = 0; x = 0; s0 = thread_create(&p1, NULL, thread_cond_producer, &count1); ABTS_INT_EQUAL(tc, CORE_OK, s0); s1 = thread_create(&p2, NULL, thread_cond_producer, &count2); ABTS_INT_EQUAL(tc, CORE_OK, s1); s2 = thread_create(&p3, NULL, thread_cond_producer, &count3); ABTS_INT_EQUAL(tc, CORE_OK, s2); s3 = thread_create(&p4, NULL, thread_cond_producer, &count4); ABTS_INT_EQUAL(tc, CORE_OK, s3); s4 = thread_create(&c1, NULL, thread_cond_consumer, NULL); ABTS_INT_EQUAL(tc, CORE_OK, s4); ABTS_INT_EQUAL(tc, CORE_OK, thread_delete(p1)); ABTS_INT_EQUAL(tc, CORE_OK, thread_delete(p2)); ABTS_INT_EQUAL(tc, CORE_OK, thread_delete(p3)); ABTS_INT_EQUAL(tc, CORE_OK, thread_delete(p4)); ABTS_INT_EQUAL(tc, CORE_OK, thread_delete(c1)); CORE_ASSERT_OK(tc, "delete condvar", cond_delete(nready.cond)); CORE_ASSERT_OK(tc, "delete ready mutex", mutex_delete(nready.mutex)); CORE_ASSERT_OK(tc, "delete put mutex", mutex_delete(put.mutex)); sum = count1 + count2 + count3 + count4; ABTS_INT_EQUAL(tc, MAX_COUNTER, sum); } static void test_timeoutcond(abts_case *tc, void *data) { status_t s; c_time_t timeout; c_time_t begin, end; int i; s = mutex_create(&timeout_mutex, MUTEX_DEFAULT); ABTS_INT_EQUAL(tc, CORE_OK, s); s = cond_create(&timeout_cond); ABTS_INT_EQUAL(tc, CORE_OK, s); timeout = time_from_sec(1); for (i = 0; i < MAX_RETRY; i++) { mutex_lock(timeout_mutex); begin = time_now(); s = cond_timedwait(timeout_cond, timeout_mutex, timeout); end = time_now(); mutex_unlock(timeout_mutex); if (s != CORE_OK && !STATUS_IS_TIMEUP(s)) { continue; } ABTS_INT_EQUAL(tc, 1, STATUS_IS_TIMEUP(s)); ABTS_ASSERT(tc, "Timer returned too late", end - begin - timeout < 100000); break; } ABTS_ASSERT(tc, "Too many retries", i < MAX_RETRY); CORE_ASSERT_OK(tc, "Unable to delete the conditional", cond_delete(timeout_cond)); CORE_ASSERT_OK(tc, "Unable to delete the mutex", mutex_delete(timeout_mutex)); } static void test_semaphore(abts_case *tc, void *data) { thread_id t1, t2, t3, t4; status_t s1, s2, s3, s4; s1 = semaphore_create(&semaphore, 1); ABTS_INT_EQUAL(tc, CORE_OK, s1); i = 0; x = 0; s1 = thread_create(&t1, NULL, thread_semaphore_function, NULL); ABTS_INT_EQUAL(tc, CORE_OK, s1); s2 = thread_create(&t2, NULL, thread_semaphore_function, NULL); ABTS_INT_EQUAL(tc, CORE_OK, s2); s3 = thread_create(&t3, NULL, thread_semaphore_function, NULL); ABTS_INT_EQUAL(tc, CORE_OK, s3); s4 = thread_create(&t4, NULL, thread_semaphore_function, NULL); ABTS_INT_EQUAL(tc, CORE_OK, s4); ABTS_INT_EQUAL(tc, CORE_OK, thread_delete(t1)); ABTS_INT_EQUAL(tc, CORE_OK, thread_delete(t2)); ABTS_INT_EQUAL(tc, CORE_OK, thread_delete(t3)); ABTS_INT_EQUAL(tc, CORE_OK, thread_delete(t4)); ABTS_INT_EQUAL(tc, MAX_ITER, x); CORE_ASSERT_OK(tc, "delete semaphore", semaphore_delete(semaphore)); } #if HAVE_SEM_TIMEDWAIT static semaphore_id timeout_semaphore; static void test_timeoutsemaphore(abts_case *tc, void *data) { status_t s; c_time_t timeout; c_time_t begin, end; int i; s = semaphore_create(&timeout_semaphore, 0); ABTS_INT_EQUAL(tc, CORE_OK, s); timeout = time_from_sec(1); for (i = 0; i < MAX_RETRY; i++) { begin = time_now(); s = semaphore_timedwait(timeout_semaphore, timeout); end = time_now(); if (s != CORE_OK && !STATUS_IS_TIMEUP(s)) { continue; } ABTS_INT_EQUAL(tc, 1, STATUS_IS_TIMEUP(s)); ABTS_ASSERT(tc, "Timer returned too late", end - begin - timeout < 100000); break; } ABTS_ASSERT(tc, "Too many retries", i < MAX_RETRY); CORE_ASSERT_OK(tc, "Unable to delete the semaphore", semaphore_delete(timeout_semaphore)); } #endif abts_suite *testlock(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, test_mutex, NULL); abts_run_test(suite, test_thread_rwlock, NULL); abts_run_test(suite, test_cond, NULL); abts_run_test(suite, test_timeoutcond, NULL); abts_run_test(suite, test_semaphore, NULL); #if HAVE_SEM_TIMEDWAIT abts_run_test(suite, test_timeoutsemaphore, NULL); #endif return suite; } nextepc-0.3.10/lib/core/test/testmisc.c000066400000000000000000000162601333553357400177350ustar00rootroot00000000000000#include "core_lib.h" #include "core_debug.h" #include "testutil.h" static void misc_test1(abts_case *tc, void *data) { unsigned char c[42]; ABTS_INT_EQUAL(tc, CORE_OK, core_generate_random_bytes(c, sizeof c)); } static void misc_test2(abts_case *tc, void *data) { #define K "4 6 5B5 CE8 B199B49FAA5F0A2EE238A6BC " #define OP "5F1D289C 5D354D0A 140C2548 F5F3E3BA" #define OPc "E8ED2 89D EBA9 52E4 283B 54E8 8E61 83CA" #define AMF "8000" c_uint8_t k[16] = "\x46\x5B\x5C\xE8\xB1\x99\xB4\x9F\xAA\x5F\x0A\x2E\xE2\x38\xA6\xBC"; c_uint8_t op[16] = "\x5F\x1D\x28\x9C\x5D\x35\x4D\x0A\x14\x0C\x25\x48\xF5\xF3\xE3\xBA"; c_uint8_t opc[16] = "\xE8\xED\x28\x9D\xEB\xA9\x52\xE4\x28\x3B\x54\xE8\x8E\x61\x83\xCA"; c_uint8_t amf[2] = { 0x80, 0x00 }; #define LOWER " 12abcdE F" c_uint8_t lower[4] = "\x12\xab\xcd\xef"; char buffer[16]; ABTS_TRUE(tc, memcmp(k, CORE_HEX(K, strlen(K), buffer), 16) == 0); ABTS_TRUE(tc, memcmp(op, CORE_HEX(OP, strlen(OP), buffer), 16) == 0); ABTS_TRUE(tc, memcmp(opc, CORE_HEX(OPc, strlen(OPc), buffer), 16) == 0); ABTS_TRUE(tc, memcmp(amf, CORE_HEX(AMF, strlen(AMF), buffer), 2) == 0); ABTS_TRUE(tc, memcmp(lower, CORE_HEX(LOWER, strlen(LOWER), buffer), 4) == 0); } static void misc_test3(abts_case *tc, void *data) { c_uint8_t k[16] = "\x46\x5B\x5C\xE8\xB1\x99\xB4\x9F\xAA\x5F\x0A\x2E\xE2\x38\xA6\xBC"; c_uint8_t op[16] = "\x5F\x1D\x28\x9C\x5D\x35\x4D\x0A\x14\x0C\x25\x48\xF5\xF3\xE3\xBA"; c_uint8_t opc[16] = "\xE8\xED\x28\x9D\xEB\xA9\x52\xE4\x28\x3B\x54\xE8\x8E\x61\x83\xCA"; c_uint8_t amf[2] = { 0x80, 0x00 }; c_uint8_t lower[4] = "\x12\xab\xcd\xef"; c_uint8_t buffer[128]; ABTS_TRUE(tc, strcmp("465B5CE8 B199B49F AA5F0A2E E238A6BC", core_hex_to_ascii(k, sizeof(k), buffer, sizeof(buffer))) == 0); ABTS_TRUE(tc, strcmp("5F1D289C 5D354D0A 140C2548 F5F3E3BA", core_hex_to_ascii(op, sizeof(op), buffer, sizeof(buffer))) == 0); ABTS_TRUE(tc, strcmp("E8ED289D EBA952E4 283B54E8 8E6183CA", core_hex_to_ascii(opc, sizeof(opc), buffer, sizeof(buffer))) == 0); ABTS_TRUE(tc, strcmp("8000", core_hex_to_ascii(amf, sizeof(amf), buffer, sizeof(buffer))) == 0); ABTS_TRUE(tc, strcmp("12ABCDEF", core_hex_to_ascii(lower, sizeof(lower), buffer, sizeof(buffer))) == 0); } static void misc_test4(abts_case *tc, void *data) { #define MAX_SIZE 8 c_uint8_t tmp[MAX_SIZE] = "\x01\x23\x45\x67\x89\xab\xcd\xef"; c_uint8_t buf[MAX_SIZE]; c_uint64_t num; num = 0x0123456789abcdef; ABTS_TRUE(tc, memcmp(tmp, core_uint64_to_buffer(num, 8, buf), 8) == 0); num = 0x0123456789abcd; ABTS_TRUE(tc, memcmp(tmp, core_uint64_to_buffer(num, 7, buf), 7) == 0); num = 0x0123456789ab; ABTS_TRUE(tc, memcmp(tmp, core_uint64_to_buffer(num, 6, buf), 6) == 0); num = 0x0123456789; ABTS_TRUE(tc, memcmp(tmp, core_uint64_to_buffer(num, 5, buf), 5) == 0); num = 0x01234567; ABTS_TRUE(tc, memcmp(tmp, core_uint64_to_buffer(num, 4, buf), 4) == 0); num = 0x012345; ABTS_TRUE(tc, memcmp(tmp, core_uint64_to_buffer(num, 3, buf), 3) == 0); num = 0x0123; ABTS_TRUE(tc, memcmp(tmp, core_uint64_to_buffer(num, 2, buf), 2) == 0); num = 0x01; ABTS_TRUE(tc, memcmp(tmp, core_uint64_to_buffer(num, 1, buf), 1) == 0); } static void misc_test5(abts_case *tc, void *data) { ABTS_TRUE(tc, 0x0123456789abcdef == core_buffer_to_uint64("\x01\x23\x45\x67\x89\xab\xcd\xef", 8)); ABTS_TRUE(tc, 0x0123456789abcd == core_buffer_to_uint64("\x01\x23\x45\x67\x89\xab\xcd", 7)); ABTS_TRUE(tc, 0x0123456789ab == core_buffer_to_uint64("\x01\x23\x45\x67\x89\xab", 6)); ABTS_TRUE(tc, 0x0123456789 == core_buffer_to_uint64("\x01\x23\x45\x67\x89", 5)); ABTS_TRUE(tc, 0x01234567 == core_buffer_to_uint64("\x01\x23\x45\x67", 4)); ABTS_TRUE(tc, 0x012345 == core_buffer_to_uint64("\x01\x23\x45", 3)); ABTS_TRUE(tc, 0x0123 == core_buffer_to_uint64("\x01\x23", 2)); ABTS_TRUE(tc, 0x01 == core_buffer_to_uint64("\x01", 1)); } static void misc_test6(abts_case *tc, void *data) { char out[16]; int out_len; #define MSISDN "491725670014" core_bcd_to_buffer(MSISDN, out, &out_len); ABTS_TRUE(tc, memcmp("\x94\x71\x52\x76\x00\x41", out, out_len) == 0); #define MEI "3516020019874800" core_bcd_to_buffer(MEI, out, &out_len); ABTS_TRUE(tc, memcmp("\x53\x61\x20\x00\x91\x78\x84\x00", out, out_len) == 0); #define IMSI "001010123456819" core_bcd_to_buffer(IMSI, out, &out_len); ABTS_TRUE(tc, memcmp("\x00\x01\x01\x21\x43\x65\x18\xf9", out, out_len) == 0); } static void misc_test7(abts_case *tc, void *data) { char out[32]; c_uint8_t buf1[6] = "\x94\x71\x52\x76\x00\x41"; int buf1_len = 6; c_uint8_t buf2[8] = "\x53\x61\x20\x00\x91\x78\x84\x00"; int buf2_len = 8; c_uint8_t buf3[8] = "\x00\x01\x01\x21\x43\x65\x18\xf9"; int buf3_len = 8; core_buffer_to_bcd(buf1, buf1_len, out); ABTS_TRUE(tc, strcmp("491725670014", out) == 0); core_buffer_to_bcd(buf2, buf2_len, out); ABTS_TRUE(tc, strcmp("3516020019874800", out) == 0); core_buffer_to_bcd(buf3, buf3_len, out); ABTS_TRUE(tc, strcmp("001010123456819", out) == 0); } #define TEST_ENVVAR_NAME "core_test_envvar" #define TEST_ENVVAR2_NAME "core_test_envvar2" #define TEST_ENVVAR_VALUE "Just a value that we'll check" static void misc_test8(abts_case *tc, void *data) { char *value; status_t rv; rv = core_env_set(TEST_ENVVAR_NAME, TEST_ENVVAR_VALUE); ABTS_INT_EQUAL(tc, CORE_OK, rv); value = core_env_get(TEST_ENVVAR_NAME); ABTS_PTR_NOTNULL(tc, value); ABTS_STR_EQUAL(tc, TEST_ENVVAR_VALUE, value); rv = core_env_delete(TEST_ENVVAR_NAME); ABTS_INT_EQUAL(tc, CORE_OK, rv); value = core_env_get(TEST_ENVVAR_NAME); ABTS_PTR_NULL(tc, value); rv = core_env_set(TEST_ENVVAR_NAME, ""); ABTS_INT_EQUAL(tc, CORE_OK, rv); value = core_env_get(TEST_ENVVAR_NAME); ABTS_PTR_NOTNULL(tc, value); ABTS_STR_EQUAL(tc, "", value); rv = core_env_delete(TEST_ENVVAR_NAME); ABTS_INT_EQUAL(tc, CORE_OK, rv); value = core_env_get(TEST_ENVVAR_NAME); ABTS_PTR_NULL(tc, value); rv = core_env_set(TEST_ENVVAR2_NAME, TEST_ENVVAR_VALUE); ABTS_INT_EQUAL(tc, CORE_OK, rv); value = core_env_get(TEST_ENVVAR2_NAME); ABTS_PTR_NOTNULL(tc, value); ABTS_STR_EQUAL(tc, TEST_ENVVAR_VALUE, value); value = core_env_get(TEST_ENVVAR_NAME); ABTS_PTR_NULL(tc, value); value = core_env_get(TEST_ENVVAR2_NAME); ABTS_PTR_NOTNULL(tc, value); ABTS_STR_EQUAL(tc, TEST_ENVVAR_VALUE, value); rv = core_env_delete(TEST_ENVVAR2_NAME); ABTS_INT_EQUAL(tc, CORE_OK, rv); value = core_env_get(TEST_ENVVAR2_NAME); ABTS_PTR_NULL(tc, value); } abts_suite *testmisc(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, misc_test1, NULL); abts_run_test(suite, misc_test2, NULL); abts_run_test(suite, misc_test3, NULL); abts_run_test(suite, misc_test4, NULL); abts_run_test(suite, misc_test5, NULL); abts_run_test(suite, misc_test6, NULL); abts_run_test(suite, misc_test7, NULL); abts_run_test(suite, misc_test8, NULL); return suite; } nextepc-0.3.10/lib/core/test/testmsgq.c000066400000000000000000000166451333553357400177600ustar00rootroot00000000000000#include "core_msgq.h" #include "core_thread.h" #include "core_portable.h" #include "testutil.h" static char msg[16][24] = { {0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18}, {0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28}, {0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38}, {0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48}, {0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58}, {0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68}, {0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78}, {0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88}, {0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98}, {0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8}, {0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, 0xb8}, {0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8}, {0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8}, {0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8}, {0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8}, {0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08} }; static char rmsg[16][24]; static int msglen[16] = {3, 4, 5, 6, 7, 8, 1, 2, 11, 12, 13, 14, 15, 16, 17, 18}; static msgq_id md; static void msgq_test1(abts_case *tc, void *data) { int i, n; /* Basic test */ md = msgq_create(5, 8, 0); ABTS_INT_NEQUAL(tc, 0, md); n = msgq_send(md, msg[0], msglen[0]); ABTS_INT_EQUAL(tc, msglen[0], n); n = msgq_recv(md, rmsg[0], 8); ABTS_INT_EQUAL(tc, msglen[0], n); n = memcmp(msg[0], rmsg[0], msglen[0]); ABTS_INT_EQUAL(tc, 0, n); msgq_delete(md); /* Test with send() and recv() function up to queue size */ md = msgq_create(5, 8, 0); ABTS_INT_NEQUAL(tc, 0, md); for (i = 0; i < 5; i++) { n = msgq_send(md, msg[i], msglen[i]); ABTS_INT_EQUAL(tc, msglen[i], n); } for (i = 0; i < 5; i++) { n = msgq_recv(md, rmsg[i], 8); ABTS_INT_EQUAL(tc, msglen[i], n); n = memcmp(msg[i], rmsg[i], msglen[i]); ABTS_INT_EQUAL(tc, 0, n); } msgq_delete(md); /* Test with send() and timedrecv() function up to queue size */ md = msgq_create(5, 8, 0); ABTS_INT_NEQUAL(tc, 0, md); for (i = 0; i < 5; i++) { n = msgq_send(md, msg[i], msglen[i]); ABTS_INT_EQUAL(tc, msglen[i], n); } for (i = 0; i < 5; i++) { n = msgq_timedrecv(md, rmsg[i], 8, 0); ABTS_INT_EQUAL(tc, msglen[i], n); n = memcmp(msg[i], rmsg[i], msglen[i]); ABTS_INT_EQUAL(tc, 0, n); } msgq_delete(md); } static void msgq_test2(abts_case *tc, void *data) { int i, n; md = msgq_create(5, 8, MSGQ_O_NONBLOCK); ABTS_INT_NEQUAL(tc, 0, md); /* fill up the queue */ for (i = 0; i < 5; i++) { n = msgq_send(md, msg[i], msglen[i]); ABTS_INT_EQUAL(tc, msglen[i], n); } /* Now, there is no room to send. * Confirm that send() returns CORE_EGAIN */ n = msgq_send(md, msg[0], msglen[0]); ABTS_INT_EQUAL(tc, CORE_EAGAIN, n); /* empty queue */ for (i = 0; i < 5; i++) { n = msgq_recv(md, rmsg[i], 8); ABTS_INT_EQUAL(tc, msglen[i], n); n = memcmp(msg[i], rmsg[i], msglen[i]); ABTS_INT_EQUAL(tc, 0, n); } /* Now, there is no sent buffer to be read. * Confirm that recv() return CORE_EGAIN */ n = msgq_recv(md, rmsg[i], 8); ABTS_INT_EQUAL(tc, CORE_EAGAIN, n); msgq_delete(md); } static void msgq_test3(abts_case *tc, void *data) { int i, j, n; md = msgq_create(16, 24, MSGQ_O_BLOCK); ABTS_INT_NEQUAL(tc, 0, md); /* Repeat 10 times */ for (j = 0; j < 10; j++) { /* Cycle repeatedly by queue depth */ for (i = 0; i < 16; i++) { n = msgq_send(md, msg[i], 24); ABTS_INT_EQUAL(tc, CORE_OK, n); n = msgq_recv(md, rmsg[i], 24); ABTS_INT_EQUAL(tc, CORE_OK, n); n = memcmp(msg[i], rmsg[i], 24); ABTS_INT_EQUAL(tc, 0, n); } } msgq_delete(md); } #define TEST_QUEUE_SIZE 128 #define TEST_EVT_SIZE (sizeof(test_event_t)) typedef struct { int a; int b; char c[30]; } test_event_t; typedef struct { abts_case *tc; int opt; int cancelled; int timed; } test_param_t; static thread_id thr_producer; static thread_id thr_consumer; static int max = 100000; static int exit_ret_val = 123; static void *THREAD_FUNC producer_main(thread_id id, void *data) { test_param_t *param = (test_param_t *)data; abts_case *tc = param->tc; status_t rv; int i = 0; unsigned int full = 0; while (i++ < max) { test_event_t te; te.a = i; te.b = i+2; te.c[28] = 'X'; te.c[29] = 'Y'; rv = msgq_send(md, (char*)&te, TEST_EVT_SIZE); if (rv == CORE_EAGAIN) { full++; thread_yield(); continue; } ABTS_ASSERT(tc, "producer error", rv == CORE_OK); } thread_exit(id, exit_ret_val); return NULL; } static void *THREAD_FUNC consumer_main(thread_id id, void *data) { test_param_t *param = (test_param_t *)data; abts_case *tc = param->tc; status_t rv; int i = 0; while (!thread_should_stop()) { test_event_t te; if (param->cancelled) pthread_testcancel(); if (param->timed) rv = msgq_timedrecv(md, (char*)&te, TEST_EVT_SIZE, 10000); else rv = msgq_recv(md, (char*)&te, TEST_EVT_SIZE); if (rv == CORE_EAGAIN || rv == CORE_TIMEUP) { thread_yield(); continue; } ABTS_ASSERT(tc, "consumer error", rv == CORE_OK); ABTS_ASSERT(tc, "consumer error", te.c[28] == 'X' && te.c[29] == 'Y'); i++; } return NULL; } static void msgq_test4(abts_case *tc, void *data) { status_t rv; test_param_t *param = (test_param_t *)data; param->tc = tc; md = msgq_create(TEST_QUEUE_SIZE, TEST_EVT_SIZE, param->opt); ABTS_INT_NEQUAL(tc, 0, md); rv = thread_create(&thr_producer, NULL, producer_main, param); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = thread_create(&thr_consumer, NULL, consumer_main, param); ABTS_INT_EQUAL(tc, CORE_OK, rv); thread_join(&rv, thr_producer); ABTS_INT_EQUAL(tc, exit_ret_val, rv); if (param->cancelled) { os_thread_t *thread; os_thread_get(&thread, thr_consumer); pthread_cancel(*thread); thread_join(&rv, thr_consumer); } else { thread_delete(thr_consumer); } msgq_delete(md); } #define STRESS_TEST 0 abts_suite *testmsgq(abts_suite *suite) { suite = ADD_SUITE(suite) #if 0 /* Deprecated */ abts_run_test(suite, msgq_test1, NULL); abts_run_test(suite, msgq_test2, NULL); #endif abts_run_test(suite, msgq_test3, NULL); #if STRESS_TEST == 1 while(1) { #endif test_param_t param; memset(¶m, 0, sizeof(test_param_t)); param.opt = MSGQ_O_NONBLOCK; abts_run_test(suite, msgq_test4, (void *)¶m); #if HAVE_PTHREAD_H == 1 param.opt = MSGQ_O_BLOCK; param.cancelled = 1; abts_run_test(suite, msgq_test4, (void *)¶m); #endif param.opt = MSGQ_O_NONBLOCK; param.timed = 1; abts_run_test(suite, msgq_test4, (void *)¶m); param.opt = MSGQ_O_BLOCK; param.timed = 1; abts_run_test(suite, msgq_test4, (void *)¶m); #if STRESS_TEST == 1 printf("Test again = %"C_UINT64_T_FMT "\n", time_now()); sleep(3); } #endif return suite; } nextepc-0.3.10/lib/core/test/testnetlib.c000066400000000000000000000327131333553357400202600ustar00rootroot00000000000000#define TRACE_MODULE _testnetlib #include "core_debug.h" #include "core_net.h" #include "testutil.h" #define TEST_SERVER_PORT 5121 #define TEST_BUFFER_SIZE 1024 #define TEST_MAX_NUM 4 #define DISABLE_FTPTEST 1 #define DISABLE_LINKTEST 1 static char buffer[TEST_BUFFER_SIZE]; static int tcp_server_started = 0; static int udp_server_started = 0; pthread_t tserver_tid,userver_tid; net_sock_t *tserver_sock,*userver_sock; static void *tcp_session_main(void *param) { int rc; net_sock_t *net_sock = (net_sock_t *)param; while (1) { rc = net_read(net_sock, buffer, TEST_BUFFER_SIZE, 1); if (rc > 0) { if (!strncmp(buffer, "QUIT",4)) { break; } else { /* Send received data */ rc = net_send(net_sock, buffer, rc); } } else if (rc == 0) { /* Timeout */ } else { printf("error = %d\n", net_sock->sndrcv_errno); break; } } net_close(net_sock); return NULL; } static void start_tcp_session(net_sock_t *net_sock) { pthread_t tid; pthread_create(&tid, NULL, tcp_session_main, (void *)net_sock); pthread_detach(tid); return; } static void *tcp_server_main(void *param) { int rc; net_sock_t *new_sock; rc = net_listen(&tserver_sock, SOCK_STREAM, IPPROTO_TCP, TEST_SERVER_PORT); if (rc != 0) { d_error("net_tcp_listen Error(rc = %d)\n",rc); return NULL; } tcp_server_started = 1; while (1) { rc = net_accept(&new_sock, tserver_sock, 1); if (rc >0) { /* New connection arrived. Start session */ start_tcp_session(new_sock); } else if (rc == 0) { /* Timeout */ } else { /* Error occured */ break; } } return NULL; } static void start_tcp_server() { pthread_create(&tserver_tid, NULL, tcp_server_main, NULL); while (tcp_server_started == 0) { sleep(1); } sleep(1); return; } static void stop_tcp_server() { net_close(tserver_sock); pthread_join(tserver_tid, NULL); } static void *udp_server_main(void *param) { int rc; rc = net_listen(&userver_sock, SOCK_DGRAM, IPPROTO_UDP, TEST_SERVER_PORT); if (rc != 0) { d_error("net_udp Error(rc = %d)\n",rc); return NULL; } udp_server_started = 1; while (1) { d_trace(1,"Wait for data....\n"); rc = net_read(userver_sock, buffer, TEST_BUFFER_SIZE, 2); if (rc >0) { d_trace(1,"RECV %d bytes\n", rc); if (!strncmp(buffer, "QUIT",4)) { break; } else { /* Send received data */ rc = net_send(userver_sock, buffer, rc); d_trace(1,"SEND %d bytes\n", rc); if (rc == -1) { printf("error = %d\n", userver_sock->sndrcv_errno); } } } else if (rc == 0) { /* Timeout */ } else { /* Error occured */ break; } } return NULL; } static void start_udp_server() { pthread_create(&userver_tid, NULL, udp_server_main, NULL); while (udp_server_started == 0) { sleep(1); } return; } static void stop_udp_server() { net_close(userver_sock); pthread_join(userver_tid, NULL); } static void netlib1(abts_case *tc, void *data) { int rc = 0; net_sock_t *net_sock; char inputbuf[TEST_MAX_NUM][20]; char outputbuf[TEST_MAX_NUM][20]; int i; /* Start TCP server */ start_tcp_server(); rc = net_open(&net_sock, "127.0.0.1", 0, TEST_SERVER_PORT, SOCK_STREAM, IPPROTO_TCP); ABTS_INT_EQUAL(tc, 0, rc); for (i=0; i< TEST_MAX_NUM; i++) { sprintf(inputbuf[i],"asdf%d",i); rc = net_send(net_sock, inputbuf[i], strlen(inputbuf[i])+1); ABTS_INT_EQUAL(tc, strlen(inputbuf[i])+1, rc); } for (i=0; i< TEST_MAX_NUM; i++) { memset(outputbuf[i], 0, sizeof(outputbuf[i])); rc = 0; while (1) { int n; n = net_read(net_sock, outputbuf[i], 6, 1); rc += n; if (n == 0 || n == 6) break; } ABTS_INT_EQUAL(tc, 6, rc); ABTS_INT_EQUAL(tc, 6, strlen(outputbuf[i])+1); ABTS_STR_EQUAL(tc, inputbuf[i], outputbuf[i]); } /* Send QUIT */ rc = net_send(net_sock, "QUIT", 4); ABTS_INT_EQUAL(tc, 4, rc); /* Close */ rc = net_close(net_sock); ABTS_INT_EQUAL(tc, 0, rc); /* Stop TCP server */ stop_tcp_server(); } static void netlib2(abts_case *tc, void *data) { int rc = 0; net_sock_t *net_sock[TEST_MAX_NUM]; char inputbuf[TEST_MAX_NUM][20]; char outputbuf[TEST_MAX_NUM][20]; int i; /* Start TCP server */ start_tcp_server(); /* Connect to invalid port */ d_log_set_level(D_MSG_TO_STDOUT, D_LOG_LEVEL_FATAL); for (i =0 ; ih_proto) == proto) { d_print_hex(buf, len); } } static void netlib5(abts_case *tc, void *data) { net_link_t *net_link = NULL; int promisc = 1; int rc; int max_count = 10; char buf[1024]; #if DISABLE_LINKTEST return; #endif rc = net_link_open(&net_link, "eth0", ETH_P_ALL); ABTS_INT_EQUAL(tc, 0, rc); ABTS_PTR_NOTNULL(tc, net_link); rc = net_link_promisc(net_link, promisc); ABTS_INT_EQUAL(tc, 0, rc); #if 0 d_print("HW addr of %s : ",net_link->ifname); d_print_hex(net_link->hwaddr.sa_data, 6); #endif while (max_count-- > 0) { rc = net_link_read(net_link, buf, 1024, 1); ABTS_TRUE(tc, rc > 0); filter_updu(buf, rc); } rc = net_link_close(net_link); ABTS_INT_EQUAL(tc, 0, rc); } static int make_test_updu(char *src_addr, char *dst_addr, char *buf, int len) { unsigned short proto = 0x88B6; struct ethhdr *eth_hdr = NULL; int rc = sizeof(struct ethhdr); char *ptr = buf; eth_hdr = (struct ethhdr *)buf; memcpy(eth_hdr->h_source, src_addr, 6); memcpy(eth_hdr->h_dest, dst_addr, 6); eth_hdr->h_proto = htons(proto); /* Fill the data */ rc += sprintf(ptr+rc,"Hellow World"); d_print_hex(buf, rc); return rc; } static void netlib6(abts_case *tc, void *data) { net_link_t *net_link = NULL; int promisc = 1; int rc; int max_count = 1; char buf[1024]; #if 0 char dst_addr[6] = {'\x00','\x00','\x00','\x11','\x22','\x33'}; #else char dst_addr[6] = {'\xff','\xff','\xff','\xff','\xff','\xff'}; #endif #if DISABLE_LINKTEST return; #endif rc = net_link_open(&net_link, "eth0", ETH_P_ALL); ABTS_INT_EQUAL(tc, 0, rc); ABTS_PTR_NOTNULL(tc, net_link); rc = net_link_promisc(net_link, promisc); ABTS_INT_EQUAL(tc, 0, rc); while (max_count-- > 0) { rc = make_test_updu(net_link->hwaddr.sa_data, dst_addr,buf,1024); rc = net_link_write(net_link, buf, rc); ABTS_TRUE(tc, rc > 0); } rc = net_link_close(net_link); ABTS_INT_EQUAL(tc, 0, rc); } #endif abts_suite *testnetlib(abts_suite *suite) { suite = ADD_SUITE(suite); abts_run_test(suite, netlib1, NULL); /* * OpenSUSE OBS * - Ubuntu 17.04 i586 failed * - Jinyoung Fixed * [ 542s] testnetlib : Line 262: expected <0>, but saw <-1> [ 542s] [10/30 07:48:38.730] ERRR: connect error(111:Connection refused)(proto:6 remote:127.0.0.1 dport:5121 lport:0) (net_lib.c:353) [ 542s] [10/30 07:48:38.730] ERRR: connect error(111:Connection refused)(proto:6 remote:127.0.0.1 dport:5121 lport:0) (net_lib.c:353) [ 542s] [10/30 07:48:38.730] ERRR: connect error(111:Connection refused)(proto:6 remote:127.0.0.1 dport:5121 lport:0) (net_lib.c:353) [ 542s] [10/30 07:48:38.730] ERRR: connect error(111:Connection refused)(proto:6 remote:127.0.0.1 dport:5121 lport:0) (net_lib.c:353) [ 542s] [10/30 07:48:38.730] ASSERT: !(net_sock && buffer). Invalid params [ 542s] (net_lib.c:590) [ 542s] [10/30 07:48:38.730] ASSERT: !(net_sock). net_sock is NULL [ 542s] (net_lib.c:408) [ 542s] [10/30 07:48:38.730] ASSERT: !(net_sock). net_sock is NULL */ abts_run_test(suite, netlib2, NULL); abts_run_test(suite, netlib3, NULL); abts_run_test(suite, netlib4, NULL); #if LINUX == 1 abts_run_test(suite, netlib5, NULL); abts_run_test(suite, netlib6, NULL); #endif return suite; } nextepc-0.3.10/lib/core/test/testpkbuf.c000066400000000000000000000026341333553357400201110ustar00rootroot00000000000000#include "core_pkbuf.h" #include "testutil.h" static void pkbuf_test1(abts_case *tc, void *data) { char *ptr = core_malloc(256); ABTS_PTR_NOTNULL(tc, ptr); CORE_FREE(ptr); } static void pkbuf_test2(abts_case *tc, void *data) { char *ptr = core_calloc(2, 10); int i; for (i = 0; i < 2*10; i++) { ABTS_INT_EQUAL(tc, 0, ptr[i]); } ABTS_PTR_NOTNULL(tc, ptr); CORE_FREE(ptr); } static void pkbuf_test3(abts_case *tc, void *data) { char *ptr = core_realloc(0, 10); ABTS_PTR_NOTNULL(tc, ptr); CORE_FREE(ptr); ptr = core_malloc(20); ABTS_PTR_NOTNULL(tc, ptr); ptr = core_realloc(ptr, 0); } static void pkbuf_test4(abts_case *tc, void *data) { char *p, *q; p = core_malloc(10); ABTS_PTR_NOTNULL(tc, p); memset(p, 1, 10); q = core_realloc(p, CORE_ALIGN(128+MAX_SIZEOF_HEADROOM, SIZEOF_VOIDP) - SIZEOF_VOIDP-1); ABTS_TRUE(tc, p == q); p = core_realloc(q, CORE_ALIGN(128+MAX_SIZEOF_HEADROOM, SIZEOF_VOIDP) - SIZEOF_VOIDP); ABTS_TRUE(tc, p != q); ABTS_TRUE(tc, memcmp(p, q, 10) == 0); CORE_FREE(p); } abts_suite *testpkbuf(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, pkbuf_test1, NULL); abts_run_test(suite, pkbuf_test2, NULL); abts_run_test(suite, pkbuf_test3, NULL); abts_run_test(suite, pkbuf_test4, NULL); return suite; } nextepc-0.3.10/lib/core/test/testsctp.c000066400000000000000000000221231333553357400177460ustar00rootroot00000000000000#include "core_debug.h" #include "core_thread.h" #include "core_network.h" #include "testutil.h" #define DATASTR "This is a test" #define STRLEN 8092 #define PORT 7777 #define PORT2 7778 #define PPID 12345 #ifndef AI_PASSIVE #define AI_PASSIVE 1 #endif static void sctp_test1(abts_case *tc, void *data) { sock_id sctp; c_sockaddr_t *addr; status_t rv; rv = sctp_socket(&sctp, AF_INET6, SOCK_SEQPACKET); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = sock_delete(sctp); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_getaddrinfo(&addr, AF_INET, NULL, PORT, AI_PASSIVE); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = sctp_server(&sctp, SOCK_STREAM, addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_freeaddrinfo(addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = sock_delete(sctp); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_getaddrinfo(&addr, AF_UNSPEC, NULL, PORT, AI_PASSIVE); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = sctp_server(&sctp, SOCK_SEQPACKET, addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_freeaddrinfo(addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = sock_delete(sctp); ABTS_INT_EQUAL(tc, CORE_OK, rv); } static thread_id test2_thread; static void *THREAD_FUNC test2_main(thread_id id, void *data) { abts_case *tc = data; status_t rv; sock_id sctp; char str[STRLEN]; ssize_t size; c_uint32_t ppid; sctp_info_t sinfo; c_sockaddr_t *addr; c_sockaddr_t from; rv = core_getaddrinfo(&addr, AF_UNSPEC, NULL, PORT, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = sctp_client(&sctp, SOCK_SEQPACKET, addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_freeaddrinfo(addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); size = core_sctp_recvdata(sctp, str, STRLEN, &from, &sinfo); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); ABTS_INT_EQUAL(tc, PPID, sinfo.ppid); rv = sock_delete(sctp); ABTS_INT_EQUAL(tc, CORE_OK, rv); thread_exit(id, size); return NULL; } static void sctp_test2(abts_case *tc, void *data) { status_t rv; sock_id sctp, sctp2; ssize_t size; c_sockaddr_t *addr; rv = core_getaddrinfo(&addr, AF_INET6, NULL, PORT, AI_PASSIVE); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = sctp_server(&sctp, SOCK_STREAM, addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_freeaddrinfo(addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = thread_create(&test2_thread, NULL, test2_main, tc); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = sock_accept(&sctp2, sctp); ABTS_INT_EQUAL(tc, CORE_OK, rv); size = core_sctp_sendmsg(sctp2, DATASTR, strlen(DATASTR), NULL, PPID, 0); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); thread_join(&rv, test2_thread); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); rv = sock_delete(sctp2); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = sock_delete(sctp); ABTS_INT_EQUAL(tc, CORE_OK, rv); } static thread_id test3_thread; static void *THREAD_FUNC test3_main(thread_id id, void *data) { abts_case *tc = data; status_t rv; sock_id sctp; c_sockaddr_t *addr; c_sockaddr_t *to; char str[STRLEN]; ssize_t size; int rc; rv = sctp_socket(&sctp, AF_INET, SOCK_SEQPACKET); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_getaddrinfo(&to, AF_INET, NULL, PORT, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); size = core_sctp_sendmsg(sctp, DATASTR, strlen(DATASTR), to, PPID, 0); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); rv = core_freeaddrinfo(to); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = sock_delete(sctp); ABTS_INT_EQUAL(tc, CORE_OK, rv); thread_exit(id, size); return NULL; } static void sctp_test3(abts_case *tc, void *data) { sock_id sctp; status_t rv; ssize_t size; c_sockaddr_t from, *addr; char str[STRLEN]; char buf[CORE_ADDRSTRLEN]; sctp_info_t sinfo; rv = core_getaddrinfo(&addr, AF_INET, NULL, PORT, AI_PASSIVE); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = sctp_server(&sctp, SOCK_SEQPACKET, addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_freeaddrinfo(addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = thread_create(&test3_thread, NULL, test3_main, tc); ABTS_INT_EQUAL(tc, CORE_OK, rv); size = core_sctp_recvdata(sctp, str, STRLEN, &from, &sinfo); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); ABTS_INT_EQUAL(tc, PPID, sinfo.ppid); thread_join(&rv, test3_thread); ABTS_INT_EQUAL(tc, strlen(DATASTR), rv); rv = sock_delete(sctp); ABTS_INT_EQUAL(tc, CORE_OK, rv); } static thread_id test4_thread; static void *THREAD_FUNC test4_main(thread_id id, void *data) { abts_case *tc = data; status_t rv; sock_id sctp; c_sockaddr_t *addr; char str[STRLEN]; ssize_t size; sctp_info_t sinfo; rv = core_getaddrinfo(&addr, AF_UNSPEC, NULL, PORT, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = sctp_client(&sctp, SOCK_STREAM, addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_freeaddrinfo(addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); size = core_sctp_sendmsg(sctp, DATASTR, strlen(DATASTR), NULL, PPID, 0); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); size = core_sctp_recvdata(sctp, str, STRLEN, NULL, &sinfo); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); ABTS_INT_EQUAL(tc, PPID, sinfo.ppid); rv = sock_delete(sctp); ABTS_INT_EQUAL(tc, CORE_OK, rv); thread_exit(id, size); return NULL; } static void sctp_test4(abts_case *tc, void *data) { sock_id sctp; status_t rv; ssize_t size; c_sockaddr_t from, *addr; char str[STRLEN]; sctp_info_t sinfo; char buf[CORE_ADDRSTRLEN]; rv = core_getaddrinfo(&addr, AF_INET6, NULL, PORT, AI_PASSIVE); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = sctp_server(&sctp, SOCK_SEQPACKET, addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_freeaddrinfo(addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = thread_create(&test4_thread, NULL, test4_main, tc); ABTS_INT_EQUAL(tc, CORE_OK, rv); size = core_sctp_recvdata(sctp, str, STRLEN, &from, &sinfo); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); ABTS_STR_EQUAL(tc, "::1", CORE_ADDR(&from, buf)); ABTS_INT_EQUAL(tc, PPID, sinfo.ppid); size = core_sctp_sendmsg(sctp, DATASTR, strlen(DATASTR), &from, PPID, 0); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); thread_join(&rv, test4_thread); ABTS_INT_EQUAL(tc, strlen(DATASTR), rv); rv = sock_delete(sctp); ABTS_INT_EQUAL(tc, CORE_OK, rv); } static thread_id test5_thread; static void *THREAD_FUNC test5_main(thread_id id, void *data) { abts_case *tc = data; status_t rv; sock_id sctp; char str[STRLEN]; c_sockaddr_t from, *remote_addr, *addr; sctp_info_t sinfo; ssize_t size; char buf[CORE_ADDRSTRLEN]; rv = core_getaddrinfo(&addr, AF_INET6, NULL, PORT2, AI_PASSIVE); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = sctp_server(&sctp, SOCK_SEQPACKET, addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_freeaddrinfo(addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_getaddrinfo(&addr, AF_INET6, NULL, PORT, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = sctp_connect(sctp, addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_freeaddrinfo(addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); remote_addr = sock_remote_addr(sctp); ABTS_STR_EQUAL(tc, "::1", CORE_ADDR(remote_addr, buf)); size = core_sctp_sendmsg(sctp, DATASTR, strlen(DATASTR), remote_addr, PPID, 0); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); size = core_sctp_recvdata(sctp, str, STRLEN, &from, &sinfo); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); ABTS_STR_EQUAL(tc, "::1", CORE_ADDR(&from, buf)); ABTS_INT_EQUAL(tc, PPID, sinfo.ppid); rv = sock_delete(sctp); ABTS_INT_EQUAL(tc, CORE_OK, rv); thread_exit(id, size); return NULL; } static void sctp_test5(abts_case *tc, void *data) { sock_id sctp; status_t rv; ssize_t size; c_sockaddr_t from, *addr; socklen_t addrlen; char str[STRLEN]; sctp_info_t sinfo; char buf[CORE_ADDRSTRLEN]; rv = core_getaddrinfo(&addr, AF_INET6, NULL, PORT, AI_PASSIVE); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = sctp_server(&sctp, SOCK_SEQPACKET, addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_freeaddrinfo(addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = thread_create(&test5_thread, NULL, test5_main, tc); ABTS_INT_EQUAL(tc, CORE_OK, rv); size = core_sctp_recvdata(sctp, str, STRLEN, &from, &sinfo); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); ABTS_STR_EQUAL(tc, "::1", CORE_ADDR(&from, buf)); ABTS_INT_EQUAL(tc, PPID, sinfo.ppid); size = core_sctp_sendmsg(sctp, DATASTR, strlen(DATASTR), &from, sinfo.ppid, 0); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); thread_join(&rv, test5_thread); ABTS_INT_EQUAL(tc, strlen(DATASTR), rv); rv = sock_delete(sctp); ABTS_INT_EQUAL(tc, CORE_OK, rv); } abts_suite *testsctp(abts_suite *suite) { suite = ADD_SUITE(suite); abts_run_test(suite, sctp_test1, NULL); abts_run_test(suite, sctp_test2, NULL); abts_run_test(suite, sctp_test3, NULL); abts_run_test(suite, sctp_test4, NULL); abts_run_test(suite, sctp_test5, NULL); return suite; } nextepc-0.3.10/lib/core/test/testsha.c000066400000000000000000000152151333553357400175540ustar00rootroot00000000000000#include "core_debug.h" #include "core_sha1.h" #include "core_sha2.h" #include "core_pkbuf.h" #include "testutil.h" static void sha1_test1(abts_case *tc, void *data) { c_uint8_t msg1[] = "abc"; c_uint8_t msg2[] = "abcdbcdecdefdefgefghfghighij" "hijkijkljklmklmnlmnomnopnopq"; c_uint8_t digest1[] = { 0xa9,0x99,0x3e,0x36,0x47,0x06,0x81,0x6a, 0xba,0x3e,0x25,0x71,0x78,0x50,0xc2,0x6c, 0x9c,0xd0,0xd8,0x9d }; c_uint8_t digest2[] = { 0x84,0x98,0x3e,0x44,0x1c,0x3b,0xd2,0x6e, 0xba,0xae,0x4a,0xa1,0xf9,0x51,0x29,0xe5, 0xe5,0x46,0x70,0xf1 }; c_uint8_t digest3[] = { 0x34,0xaa,0x97,0x3c,0xd4,0xc4,0xda,0xa4, 0xf6,0x1e,0xeb,0x2b,0xdb,0xad,0x27,0x31, 0x65,0x34,0x01,0x6f, }; c_uint8_t digest[20]; int i; sha1_ctx ctx; sha1_init(&ctx); sha1_update(&ctx, msg1, sizeof(msg1) - 1); sha1_final(&ctx, digest); ABTS_INT_EQUAL(tc, 0, memcmp(digest1, digest, 20)); sha1_init(&ctx); sha1_update(&ctx, msg2, sizeof(msg2) - 1); sha1_final(&ctx, digest); ABTS_INT_EQUAL(tc, 0, memcmp(digest2, digest, 20)); sha1_init(&ctx); for (i = 0; i < 1000000; i++) sha1_update(&ctx, (c_uint8_t*)"a", 1); sha1_final(&ctx, digest); ABTS_INT_EQUAL(tc, 0, memcmp(digest3, digest, 20)); } static void sha2_test1(abts_case *tc, void *data) { char *vectors[4][3] = { /* SHA-224 */ { "\x23\x09\x7d\x22\x34\x05\xd8\x22\x86\x42\xa4\x77\xbd\xa2\x55\xb3\x2a\xad\xbc\xe4\xbd\xa0\xb3\xf7\xe3\x6c\x9d\xa7", "\x75\x38\x8b\x16\x51\x27\x76\xcc\x5d\xba\x5d\xa1\xfd\x89\x01\x50\xb0\xc6\x45\x5c\xb4\xf5\x8b\x19\x52\x52\x25\x25", "\x20\x79\x46\x55\x98\x0c\x91\xd8\xbb\xb4\xc1\xea\x97\x61\x8a\x4b\xf0\x3f\x42\x58\x19\x48\xb2\xee\x4e\xe7\xad\x67", }, /* SHA-\x25\x6 */ { "\xba\x78\x16\xbf\x8f\x01\xcf\xea\x41\x41\x40\xde\x5d\xae\x22\x23\xb0\x03\x61\xa3\x96\x17\x7a\x9c\xb4\x10\xff\x61\xf2\x00\x15\xad", "\x24\x8d\x6a\x61\xd2\x06\x38\xb8\xe5\xc0\x26\x93\x0c\x3e\x60\x39\xa3\x3c\xe4\x59\x64\xff\x21\x67\xf6\xec\xed\xd4\x19\xdb\x06\xc1", "\xcd\xc7\x6e\x5c\x99\x14\xfb\x92\x81\xa1\xc7\xe2\x84\xd7\x3e\x67\xf1\x80\x9a\x48\xa4\x97\x20\x0e\x04\x6d\x39\xcc\xc7\x11\x2c\xd0", }, /* SHA-\x38\x4 */ { "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b\xb5\xa0\x3d\x69\x9a\xc6\x50\x07\x27\x2c\x32\xab\x0e\xde\xd1\x63\x1a\x8b\x60\x5a\x43\xff\x5b\xed" "\x80\x86\x07\x2b\xa1\xe7\xcc\x23\x58\xba\xec\xa1\x34\xc8\x25\xa7", "\x09\x33\x0c\x33\xf7\x11\x47\xe8\x3d\x19\x2f\xc7\x82\xcd\x1b\x47\x53\x11\x1b\x17\x3b\x3b\x05\xd2\x2f\xa0\x80\x86\xe3\xb0\xf7\x12" "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9\x66\xc3\xe9\xfa\x91\x74\x60\x39", "\x9d\x0e\x18\x09\x71\x64\x74\xcb\x08\x6e\x83\x4e\x31\x0a\x4a\x1c\xed\x14\x9e\x9c\x00\xf2\x48\x52\x79\x72\xce\xc5\x70\x4c\x2a\x5b" "\x07\xb8\xb3\xdc\x38\xec\xc4\xeb\xae\x97\xdd\xd8\x7f\x3d\x89\x85", }, /* SHA-\x51\x2 */ { "\xdd\xaf\x35\xa1\x93\x61\x7a\xba\xcc\x41\x73\x49\xae\x20\x41\x31\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a" "\x21\x92\x99\x2a\x27\x4f\xc1\xa8\x36\xba\x3c\x23\xa3\xfe\xeb\xbd\x45\x4d\x44\x23\x64\x3c\xe8\x0e\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f", "\x8e\x95\x9b\x75\xda\xe3\x13\xda\x8c\xf4\xf7\x28\x14\xfc\x14\x3f\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1\x72\x99\xae\xad\xb6\x88\x90\x18" "\x50\x1d\x28\x9e\x49\x00\xf7\xe4\x33\x1b\x99\xde\xc4\xb5\x43\x3a\xc7\xd3\x29\xee\xb6\xdd\x26\x54\x5e\x96\xe5\x5b\x87\x4b\xe9\x09", "\xe7\x18\x48\x3d\x0c\xe7\x69\x64\x4e\x2e\x42\xc7\xbc\x15\xb4\x63\x8e\x1f\x98\xb1\x3b\x20\x44\x28\x56\x32\xa8\x03\xaf\xa9\x73\xeb" "\xde\x0f\xf2\x44\x87\x7e\xa6\x0a\x4c\xb0\x43\x2c\xe5\x77\xc3\x1b\xeb\x00\x9c\x5c\x2c\x49\xaa\x2e\x4e\xad\xb2\x17\xad\x8c\xc0\x9b" } }; char message1[] = "abc"; char message2a[] = "abcdbcdecdefdefgefghfghighijhi" "jkijkljklmklmnlmnomnopnopq"; char message2b[] = "abcdefghbcdefghicdefghijdefghijkefghij" "klfghijklmghijklmnhijklmnoijklmnopjklm" "nopqklmnopqrlmnopqrsmnopqrstnopqrstu"; unsigned char *message3; unsigned int message3_len = 1000000; unsigned char digest[SHA512_DIGEST_SIZE]; int rc; message3 = malloc(message3_len); if (message3 == NULL) { fprintf(stderr, "Can't allocate memory\n"); return; } memset(message3, 'a', message3_len); /* SHA-2 FIPS 180-2 Validation tests. * SHA-224 Test vector */ sha224((c_uint8_t *)message1, strlen((char *) message1), digest); rc = memcmp(vectors[0][0], digest, SHA224_DIGEST_SIZE); ABTS_INT_EQUAL(tc, 0, rc); sha224((c_uint8_t *)message2a, strlen((char *) message2a), digest); rc = memcmp(vectors[0][1], digest, SHA224_DIGEST_SIZE); ABTS_INT_EQUAL(tc, 0, rc); sha224((c_uint8_t *)message3, message3_len, digest); rc = memcmp(vectors[0][2], digest, SHA224_DIGEST_SIZE); ABTS_INT_EQUAL(tc, 0, rc); /* SHA-256 Test vector */ sha256((c_uint8_t *)message1, strlen((char *) message1), digest); rc = memcmp(vectors[1][0], digest, SHA256_DIGEST_SIZE); ABTS_INT_EQUAL(tc, 0, rc); sha256((c_uint8_t *)message2a, strlen((char *) message2a), digest); rc = memcmp(vectors[1][1], digest, SHA256_DIGEST_SIZE); ABTS_INT_EQUAL(tc, 0, rc); sha256((c_uint8_t *)message3, message3_len, digest); rc = memcmp(vectors[1][2], digest, SHA256_DIGEST_SIZE); ABTS_INT_EQUAL(tc, 0, rc); /* SHA-384 Test vector */ sha384((c_uint8_t *)message1, strlen((char *) message1), digest); rc = memcmp(vectors[2][0], digest, SHA384_DIGEST_SIZE); ABTS_INT_EQUAL(tc, 0, rc); sha384((c_uint8_t *)message2b, strlen((char *) message2b), digest); rc = memcmp(vectors[2][1], digest, SHA384_DIGEST_SIZE); ABTS_INT_EQUAL(tc, 0, rc); sha384((c_uint8_t *)message3, message3_len, digest); rc = memcmp(vectors[2][2], digest, SHA384_DIGEST_SIZE); ABTS_INT_EQUAL(tc, 0, rc); /* SHA-512 Test vector */ sha512((c_uint8_t *)message1, strlen((char *) message1), digest); rc = memcmp(vectors[3][0], digest, SHA512_DIGEST_SIZE); ABTS_INT_EQUAL(tc, 0, rc); sha512((c_uint8_t *)message2b, strlen((char *) message2b), digest); rc = memcmp(vectors[3][1], digest, SHA512_DIGEST_SIZE); ABTS_INT_EQUAL(tc, 0, rc); sha512((c_uint8_t *)message3, message3_len, digest); rc = memcmp(vectors[3][2], digest, SHA512_DIGEST_SIZE); ABTS_INT_EQUAL(tc, 0, rc); free(message3); } abts_suite *testsha2(abts_suite *suite) { suite = ADD_SUITE(suite); abts_run_test(suite, sha1_test1, NULL); abts_run_test(suite, sha2_test1, NULL); return suite; } nextepc-0.3.10/lib/core/test/testsleep.c000066400000000000000000000026641333553357400201150ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "core_time.h" #include "testutil.h" #define SLEEP_INTERVAL 3 static void sleep_one(abts_case *tc, void *data) { time_t pretime = time(NULL); time_t posttime; time_t timediff; core_sleep(time_from_sec(SLEEP_INTERVAL)); posttime = time(NULL); /* normalize the timediff. We should have slept for SLEEP_INTERVAL, so * we should just subtract that out. */ timediff = posttime - pretime - SLEEP_INTERVAL; ABTS_TRUE(tc, timediff >= 0); ABTS_TRUE(tc, timediff <= 1); } abts_suite *testsleep(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, sleep_one, NULL); return suite; } nextepc-0.3.10/lib/core/test/testsock.c000066400000000000000000000304321333553357400177360ustar00rootroot00000000000000#include "core_debug.h" #include "core_thread.h" #include "core_pkbuf.h" #include "core_network.h" #include "testutil.h" #define DATASTR "This is a test" #define STRLEN 8092 #define PORT 7777 #define PORT2 7778 #ifndef AI_PASSIVE #define AI_PASSIVE 1 #endif static void sock_test1(abts_case *tc, void *data) { sock_id udp; c_sockaddr_t *addr; status_t rv; rv = core_getaddrinfo(&addr, AF_UNSPEC, NULL, PORT, AI_PASSIVE); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = udp_server(&udp, addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_freeaddrinfo(addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = sock_delete(udp); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_getaddrinfo(&addr, AF_UNSPEC, "127.0.0.1", PORT, AI_PASSIVE); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = udp_server(&udp, addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_freeaddrinfo(addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = sock_delete(udp); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_getaddrinfo(&addr, AF_UNSPEC, "::1", PORT, AI_PASSIVE); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = udp_server(&udp, addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_freeaddrinfo(addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = sock_delete(udp); ABTS_INT_EQUAL(tc, CORE_OK, rv); } static thread_id test2_thread; static void *THREAD_FUNC test2_main(thread_id id, void *data) { abts_case *tc = data; status_t rv; sock_id tcp; c_sockaddr_t *addr; char str[STRLEN]; ssize_t size; rv = core_getaddrinfo(&addr, AF_UNSPEC, "::1", PORT, AI_PASSIVE); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tcp_client(&tcp, addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_freeaddrinfo(addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); size = core_recv(tcp, str, STRLEN, 0); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); rv = sock_delete(tcp); ABTS_INT_EQUAL(tc, CORE_OK, rv); thread_exit(id, size); return NULL; } static void sock_test2(abts_case *tc, void *data) { status_t rv; sock_id tcp, tcp2; c_sockaddr_t *addr; ssize_t size; rv = core_getaddrinfo(&addr, AF_INET6, NULL, PORT, AI_PASSIVE); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tcp_server(&tcp, addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_freeaddrinfo(addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = thread_create(&test2_thread, NULL, test2_main, tc); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = sock_accept(&tcp2, tcp); ABTS_INT_EQUAL(tc, CORE_OK, rv); size = core_send(tcp2, DATASTR, strlen(DATASTR), 0); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); thread_join(&rv, test2_thread); ABTS_INT_EQUAL(tc, strlen(DATASTR), rv); rv = sock_delete(tcp2); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = sock_delete(tcp); ABTS_INT_EQUAL(tc, CORE_OK, rv); } static thread_id test3_thread; static void *THREAD_FUNC test3_main(thread_id id, void *data) { abts_case *tc = data; status_t rv; sock_id udp; c_sockaddr_t *sa; char str[STRLEN]; ssize_t size; int rc; char buf[CORE_ADDRSTRLEN]; rv = udp_socket(&udp, AF_INET); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_getaddrinfo(&sa, AF_INET, NULL, PORT, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); size = core_sendto(udp, DATASTR, strlen(DATASTR), 0, sa); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); rv = core_freeaddrinfo(sa); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = sock_delete(udp); ABTS_INT_EQUAL(tc, CORE_OK, rv); thread_exit(id, size); return NULL; } static void sock_test3(abts_case *tc, void *data) { sock_id udp; status_t rv; ssize_t size; c_sockaddr_t sa, *addr; socklen_t addrlen; char str[STRLEN]; char buf[CORE_ADDRSTRLEN]; rv = core_getaddrinfo(&addr, AF_INET, NULL, PORT, AI_PASSIVE); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = udp_server(&udp, addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_freeaddrinfo(addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = thread_create(&test3_thread, NULL, test3_main, tc); ABTS_INT_EQUAL(tc, CORE_OK, rv); size = core_recvfrom(udp, str, STRLEN, 0, &sa); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); ABTS_STR_EQUAL(tc, "127.0.0.1", CORE_ADDR(&sa, buf)); thread_join(&rv, test3_thread); ABTS_INT_EQUAL(tc, strlen(DATASTR), rv); rv = sock_delete(udp); ABTS_INT_EQUAL(tc, CORE_OK, rv); } static thread_id test4_thread; static void *THREAD_FUNC test4_main(thread_id id, void *data) { abts_case *tc = data; status_t rv; sock_id udp; c_sockaddr_t *addr; char str[STRLEN]; ssize_t size; rv = core_getaddrinfo(&addr, AF_INET, NULL, PORT, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = udp_client(&udp, addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_freeaddrinfo(addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); size = core_send(udp, DATASTR, strlen(DATASTR), 0); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); size = core_recv(udp, str, STRLEN, 0); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); rv = sock_delete(udp); ABTS_INT_EQUAL(tc, CORE_OK, rv); thread_exit(id, size); return NULL; } static void sock_test4(abts_case *tc, void *data) { sock_id udp; status_t rv; ssize_t size; c_sockaddr_t sa, *addr; socklen_t addrlen; char str[STRLEN]; char buf[CORE_ADDRSTRLEN]; rv = core_getaddrinfo(&addr, AF_INET, NULL, PORT, AI_PASSIVE); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = udp_server(&udp, addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_freeaddrinfo(addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = thread_create(&test4_thread, NULL, test4_main, tc); ABTS_INT_EQUAL(tc, CORE_OK, rv); size = core_recvfrom(udp, str, STRLEN, 0, &sa); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); ABTS_STR_EQUAL(tc, "127.0.0.1", CORE_ADDR(&sa, buf)); size = core_sendto(udp, DATASTR, strlen(DATASTR), 0, &sa); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); thread_join(&rv, test4_thread); ABTS_INT_EQUAL(tc, strlen(DATASTR), rv); rv = sock_delete(udp); ABTS_INT_EQUAL(tc, CORE_OK, rv); } static thread_id test5_thread; static void *THREAD_FUNC test5_main(thread_id id, void *data) { abts_case *tc = data; status_t rv; sock_id udp; c_sockaddr_t *addr; char str[STRLEN]; ssize_t size; rv = core_getaddrinfo(&addr, AF_INET6, NULL, PORT2, AI_PASSIVE); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = udp_server(&udp, addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_freeaddrinfo(addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_getaddrinfo(&addr, AF_INET6, NULL, PORT, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = udp_connect(udp, addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_freeaddrinfo(addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); size = core_send(udp, DATASTR, strlen(DATASTR), 0); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); size = core_recv(udp, str, STRLEN, 0); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); rv = sock_delete(udp); ABTS_INT_EQUAL(tc, CORE_OK, rv); thread_exit(id, size); return NULL; } static void sock_test5(abts_case *tc, void *data) { sock_id udp; status_t rv; ssize_t size; c_sockaddr_t sa, *addr; socklen_t addrlen; char str[STRLEN]; char buf[CORE_ADDRSTRLEN]; rv = core_getaddrinfo(&addr, AF_INET6, NULL, PORT, AI_PASSIVE); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = udp_server(&udp, addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_freeaddrinfo(addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_getaddrinfo(&addr, AF_INET6, NULL, PORT2, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = udp_connect(udp, addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_freeaddrinfo(addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = thread_create(&test5_thread, NULL, test5_main, tc); ABTS_INT_EQUAL(tc, CORE_OK, rv); size = core_recvfrom(udp, str, STRLEN, 0, &sa); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); ABTS_STR_EQUAL(tc, "::1", CORE_ADDR(&sa, buf)); size = core_send(udp, DATASTR, strlen(DATASTR), 0); ABTS_INT_EQUAL(tc, strlen(DATASTR), size); thread_join(&rv, test5_thread); ABTS_INT_EQUAL(tc, strlen(DATASTR), rv); rv = sock_delete(udp); ABTS_INT_EQUAL(tc, CORE_OK, rv); } static void sock_test6(abts_case *tc, void *data) { c_sockaddr_t addr, *paddr, *dst; char buf[CORE_ADDRSTRLEN]; status_t rv; rv = core_inet_pton(AF_INET, "127.0.0.1", &addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_STR_EQUAL(tc, "127.0.0.1", CORE_ADDR(&addr, buf)); rv = core_inet_pton(AF_INET6, "::1", &addr); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_STR_EQUAL(tc, "::1", CORE_ADDR(&addr, buf)); paddr = NULL; rv = core_addaddrinfo(&paddr, AF_UNSPEC, NULL, PORT, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_sortaddrinfo(&paddr, AF_INET6); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_STR_EQUAL(tc, "::1", CORE_ADDR(paddr, buf)); ABTS_PTR_NOTNULL(tc, paddr->next); ABTS_STR_EQUAL(tc, "127.0.0.1", CORE_ADDR(paddr->next, buf)); rv = core_copyaddrinfo(&dst, paddr); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_STR_EQUAL(tc, "::1", CORE_ADDR(dst, buf)); ABTS_PTR_NOTNULL(tc, paddr->next); ABTS_STR_EQUAL(tc, "127.0.0.1", CORE_ADDR(dst->next, buf)); rv = core_freeaddrinfo(dst); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_sortaddrinfo(&paddr, AF_INET); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_STR_EQUAL(tc, "127.0.0.1", CORE_ADDR(paddr, buf)); ABTS_PTR_NOTNULL(tc, paddr->next); ABTS_STR_EQUAL(tc, "::1", CORE_ADDR(paddr->next, buf)); rv = core_filteraddrinfo(&paddr, AF_INET); ABTS_PTR_NOTNULL(tc, paddr); ABTS_STR_EQUAL(tc, "127.0.0.1", CORE_ADDR(paddr, buf)); rv = core_copyaddrinfo(&dst, paddr); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_STR_EQUAL(tc, "127.0.0.1", CORE_ADDR(dst, buf)); rv = core_addaddrinfo(&dst, AF_UNSPEC, NULL, PORT, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_STR_EQUAL(tc, "127.0.0.1", CORE_ADDR(dst, buf)); rv = core_freeaddrinfo(dst); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_filteraddrinfo(&paddr, AF_INET6); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_PTR_NULL(tc, paddr); rv = core_copyaddrinfo(&dst, paddr); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_PTR_NULL(tc, dst); paddr = NULL; rv = core_addaddrinfo(&paddr, AF_INET, "127.0.0.1", PORT, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_addaddrinfo(&paddr, AF_INET, "127.0.0.2", PORT, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_addaddrinfo(&paddr, AF_INET, "127.0.0.3", PORT, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_filteraddrinfo(&paddr, AF_INET6); ABTS_INT_EQUAL(tc, CORE_OK, rv); } static void sock_test7(abts_case *tc, void *data) { status_t rv; sock_node_t *node; c_sockaddr_t *addr; list_t list, list6; list_init(&list); list_init(&list6); rv = core_getaddrinfo(&addr, AF_UNSPEC, "localhost", PORT, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = sock_add_node(&list, &node, addr, AF_INET); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_freeaddrinfo(addr); sock_remove_all_nodes(&list); rv = sock_probe_node(&list, &list6, NULL, PORT); ABTS_INT_EQUAL(tc, CORE_OK, rv); sock_remove_all_nodes(&list); sock_remove_all_nodes(&list6); } static void sock_test8(abts_case *tc, void *data) { status_t rv; ipsubnet_t ipsub; rv = core_ipsubnet(&ipsub, "127.0.0.1", "8"); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_ipsubnet(&ipsub, "fe80::1", "64"); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_ipsubnet(&ipsub, "172.16.0.1", "16"); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_ipsubnet(&ipsub, "cafe::1", "64"); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_ipsubnet(&ipsub, "172.16.0.1", NULL); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = core_ipsubnet(&ipsub, "cafe::1", NULL); ABTS_INT_EQUAL(tc, CORE_OK, rv); } abts_suite *testsock(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, sock_test1, NULL); abts_run_test(suite, sock_test2, NULL); abts_run_test(suite, sock_test3, NULL); abts_run_test(suite, sock_test4, NULL); abts_run_test(suite, sock_test5, NULL); abts_run_test(suite, sock_test6, NULL); abts_run_test(suite, sock_test7, NULL); abts_run_test(suite, sock_test8, NULL); return suite; } nextepc-0.3.10/lib/core/test/testthread.c000066400000000000000000000036671333553357400202600ustar00rootroot00000000000000#include "core_mutex.h" #include "core_thread.h" #include "testutil.h" static mutex_id lock; static int x = 0; static status_t exit_ret_val = 123; static thread_id t1; static thread_id t2; static thread_id t3; static thread_id t4; static void *THREAD_FUNC thread_func1(thread_id id, void *data) { int i; for (i = 0; i < 10000; i++) { mutex_lock(lock); x++; mutex_unlock(lock); } thread_exit(id, exit_ret_val); return NULL; } static void init_thread(abts_case *tc, void *data) { status_t rv; rv = mutex_create(&lock, MUTEX_DEFAULT); ABTS_INT_EQUAL(tc, CORE_OK, rv); } static void create_threads(abts_case *tc, void *data) { status_t rv; rv = thread_create(&t1, NULL, thread_func1, NULL); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = thread_create(&t2, NULL, thread_func1, NULL); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = thread_create(&t3, NULL, thread_func1, NULL); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = thread_create(&t4, NULL, thread_func1, NULL); ABTS_INT_EQUAL(tc, CORE_OK, rv); } static void join_threads(abts_case *tc, void *data) { status_t s; thread_join(&s, t1); ABTS_INT_EQUAL(tc, exit_ret_val, s); thread_join(&s, t2); ABTS_INT_EQUAL(tc, exit_ret_val, s); thread_join(&s, t3); ABTS_INT_EQUAL(tc, exit_ret_val, s); thread_join(&s, t4); ABTS_INT_EQUAL(tc, exit_ret_val, s); } static void check_locks(abts_case *tc, void *data) { ABTS_INT_EQUAL(tc, 40000, x); } static void final_thread(abts_case *tc, void *data) { status_t rv; rv = mutex_delete(lock); ABTS_INT_EQUAL(tc, CORE_OK, rv); } abts_suite *testthread(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, init_thread, NULL); abts_run_test(suite, create_threads, NULL); abts_run_test(suite, join_threads, NULL); abts_run_test(suite, check_locks, NULL); abts_run_test(suite, final_thread, NULL); return suite; } nextepc-0.3.10/lib/core/test/testtime.c000066400000000000000000000164361333553357400177450ustar00rootroot00000000000000#include "core_time.h" #include "testutil.h" #define STR_SIZE 100 /* The time value is used throughout the tests, so just make this a global. * Also, we need a single value that we can test for the positive tests, so * I chose the number below, it corresponds to: * 2002-08-14 12:05:36.186711 -25200 [257 Sat]. * Which happens to be when I wrote the new tests. */ static c_time_t now = C_INT64_C(1032030336186711); static void test_now(abts_case *tc, void *data) { c_time_t timediff; c_time_t current; time_t os_now; current = time_now(); time(&os_now); timediff = os_now - (current / USEC_PER_SEC); /* Even though these are called so close together, there is the chance * that the time will be slightly off, so accept anything between -1 and * 1 second. */ ABTS_ASSERT(tc, "core_time and OS time do not agree", (timediff > -2) && (timediff < 2)); } static void test_gmtstr(abts_case *tc, void *data) { status_t rv; time_exp_t xt; char str[STR_SIZE+1]; rv = time_exp_gmt(&xt, now); if (rv == CORE_ENOTIMPL) { ABTS_NOT_IMPL(tc, "time_exp_gmt"); } ABTS_TRUE(tc, rv == CORE_OK); sprintf(str, "%04d-%02d-%02d %02d:%02d:%02d.%06d %+05d [%d %s]%s", xt.tm_year + 1900, xt.tm_mon, xt.tm_mday, xt.tm_hour, xt.tm_min, xt.tm_sec, xt.tm_usec, xt.tm_gmtoff, xt.tm_yday + 1, day_snames[xt.tm_wday], (xt.tm_isdst ? " DST" : "")); ABTS_STR_EQUAL(tc, "2002-08-14 19:05:36.186711 +0000 [257 Sat]", str); } static void test_exp_lt(abts_case *tc, void *data) { status_t rv; time_exp_t xt; time_t posix_secs = (time_t)time_sec(now); struct tm *posix_exp = localtime(&posix_secs); rv = time_exp_lt(&xt, now); if (rv == CORE_ENOTIMPL) { ABTS_NOT_IMPL(tc, "time_exp_lt"); } ABTS_TRUE(tc, rv == CORE_OK); #define CHK_FIELD(f) \ ABTS_ASSERT(tc, "Mismatch in " #f, posix_exp->f == xt.f) CHK_FIELD(tm_sec); CHK_FIELD(tm_min); CHK_FIELD(tm_hour); CHK_FIELD(tm_mday); CHK_FIELD(tm_mon); CHK_FIELD(tm_year); CHK_FIELD(tm_wday); CHK_FIELD(tm_yday); CHK_FIELD(tm_isdst); #undef CHK_FIELD } static void test_exp_get_gmt(abts_case *tc, void *data) { status_t rv; time_exp_t xt; c_time_t imp; c_int64_t hr_off_64; rv = time_exp_gmt(&xt, now); ABTS_TRUE(tc, rv == CORE_OK); rv = time_exp_get(&imp, &xt); if (rv == CORE_ENOTIMPL) { ABTS_NOT_IMPL(tc, "time_exp_get"); } ABTS_TRUE(tc, rv == CORE_OK); hr_off_64 = (c_int64_t) xt.tm_gmtoff * USEC_PER_SEC; ABTS_TRUE(tc, now + hr_off_64 == imp); } static void test_exp_get_lt(abts_case *tc, void *data) { status_t rv; time_exp_t xt; c_time_t imp; c_int64_t hr_off_64; rv = time_exp_lt(&xt, now); ABTS_TRUE(tc, rv == CORE_OK); rv = time_exp_get(&imp, &xt); if (rv == CORE_ENOTIMPL) { ABTS_NOT_IMPL(tc, "time_exp_get"); } ABTS_TRUE(tc, rv == CORE_OK); hr_off_64 = (c_int64_t) xt.tm_gmtoff * USEC_PER_SEC; ABTS_TRUE(tc, now + hr_off_64 == imp); } static void test_imp_gmt(abts_case *tc, void *data) { status_t rv; time_exp_t xt; c_time_t imp; rv = time_exp_gmt(&xt, now); ABTS_TRUE(tc, rv == CORE_OK); rv = time_exp_gmt_get(&imp, &xt); if (rv == CORE_ENOTIMPL) { ABTS_NOT_IMPL(tc, "time_exp_gmt_get"); } ABTS_TRUE(tc, rv == CORE_OK); ABTS_TRUE(tc, now == imp); } static void test_rfcstr(abts_case *tc, void *data) { status_t rv; char str[STR_SIZE]; rv = rfc822_date(str, now); if (rv == CORE_ENOTIMPL) { ABTS_NOT_IMPL(tc, "rfc822_date"); } ABTS_TRUE(tc, rv == CORE_OK); ABTS_STR_EQUAL(tc, "Sat, 14 Sep 2002 19:05:36 GMT", str); } static void test_ctime(abts_case *tc, void *data) { status_t rv; char core_str[STR_SIZE]; char libc_str[STR_SIZE]; c_time_t now_sec = time_sec(now); time_t posix_sec = (time_t) now_sec; rv = core_ctime(core_str, now); if (rv == CORE_ENOTIMPL) { ABTS_NOT_IMPL(tc, "core_ctime"); } ABTS_TRUE(tc, rv == CORE_OK); strcpy(libc_str, ctime(&posix_sec)); *strchr(libc_str, '\n') = '\0'; ABTS_STR_EQUAL(tc, libc_str, core_str); } static void test_strftime(abts_case *tc, void *data) { status_t rv; time_exp_t xt; char str[STR_SIZE+1]; size_t sz; rv = time_exp_gmt(&xt, now); rv = core_strftime(str, &sz, STR_SIZE, "%R %A %d %B %Y", &xt); if (rv == CORE_ENOTIMPL) { ABTS_NOT_IMPL(tc, "core_strftime"); } ABTS_TRUE(tc, rv == CORE_OK); ABTS_STR_EQUAL(tc, "19:05 Saturday 14 September 2002", str); } static void test_strftimesmall(abts_case *tc, void *data) { status_t rv; time_exp_t xt; char str[STR_SIZE]; size_t sz; rv = time_exp_gmt(&xt, now); rv = core_strftime(str, &sz, STR_SIZE, "%T", &xt); if (rv == CORE_ENOTIMPL) { ABTS_NOT_IMPL(tc, "core_strftime"); } ABTS_TRUE(tc, rv == CORE_OK); ABTS_STR_EQUAL(tc, "19:05:36", str); } static void test_exp_tz(abts_case *tc, void *data) { status_t rv; time_exp_t xt; c_int32_t hr_off = -5 * 3600; /* 5 hours in seconds */ rv = time_exp_tz(&xt, now, hr_off); if (rv == CORE_ENOTIMPL) { ABTS_NOT_IMPL(tc, "time_exp_tz"); } ABTS_TRUE(tc, rv == CORE_OK); ABTS_TRUE(tc, (xt.tm_usec == 186711) && (xt.tm_sec == 36) && (xt.tm_min == 5) && (xt.tm_hour == 14) && (xt.tm_mday == 14) && (xt.tm_mon == 8) && (xt.tm_year == 102) && (xt.tm_wday == 6) && (xt.tm_yday == 256)); } static void test_strftimeoffset(abts_case *tc, void *data) { status_t rv; time_exp_t xt; char str[STR_SIZE]; size_t sz; c_int32_t hr_off = -5 * 3600; /* 5 hours in seconds */ time_exp_tz(&xt, now, hr_off); rv = core_strftime(str, &sz, STR_SIZE, "%T", &xt); if (rv == CORE_ENOTIMPL) { ABTS_NOT_IMPL(tc, "core_strftime"); } ABTS_TRUE(tc, rv == CORE_OK); } /* 0.9.4 and earlier rejected valid dates in 2038 */ static void test_2038(abts_case *tc, void *data) { time_exp_t xt; c_time_t t; /* 2038-01-19T03:14:07.000000Z */ xt.tm_year = 138; xt.tm_mon = 0; xt.tm_mday = 19; xt.tm_hour = 3; xt.tm_min = 14; xt.tm_sec = 7; CORE_ASSERT_OK(tc, "explode January 19th, 2038", time_exp_get(&t, &xt)); } abts_suite *testtime(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, test_now, NULL); abts_run_test(suite, test_gmtstr, NULL); abts_run_test(suite, test_exp_lt, NULL); abts_run_test(suite, test_exp_get_gmt, NULL); abts_run_test(suite, test_exp_get_lt, NULL); abts_run_test(suite, test_imp_gmt, NULL); abts_run_test(suite, test_rfcstr, NULL); abts_run_test(suite, test_ctime, NULL); abts_run_test(suite, test_strftime, NULL); abts_run_test(suite, test_strftimesmall, NULL); abts_run_test(suite, test_exp_tz, NULL); abts_run_test(suite, test_strftimeoffset, NULL); abts_run_test(suite, test_2038, NULL); return suite; } nextepc-0.3.10/lib/core/test/testtimer.c000066400000000000000000000274741333553357400201330ustar00rootroot00000000000000#include "core_time.h" #include "core_timer.h" #include "core_param.h" #include "testutil.h" #define TEST_TIMER_NUM 200 #define TEST_TIMER_PRECISION 20 /* 2ms precision */ #define TEST_DURATION 400 c_uint8_t expire_check[TEST_DURATION/TEST_TIMER_PRECISION]; typedef struct _test_timer_eliment { c_uint8_t type; c_uint32_t duration; } test_timer_eliment; test_timer_eliment timer_eliment[] ={ {TIMER_TYPE_ONE_SHOT, 500}, {TIMER_TYPE_ONE_SHOT, 50}, {TIMER_TYPE_ONE_SHOT, 200}, {TIMER_TYPE_ONE_SHOT, 90}, {TIMER_TYPE_ONE_SHOT, 800} }; void test_expire_func_1(c_uintptr_t data, c_uintptr_t param1, c_uintptr_t param2, c_uintptr_t param3, c_uintptr_t param4, c_uintptr_t param5, c_uintptr_t param6) { c_uint32_t index = param2; expire_check[index] = TRUE; } void test_expire_func_2(c_uintptr_t data, c_uintptr_t param1, c_uintptr_t param2, c_uintptr_t param3, c_uintptr_t param4, c_uintptr_t param5, c_uintptr_t param6) { c_uint32_t index = param2; expire_check[index]++; } static void test_now(abts_case *tc, void *data) { c_time_t timediff; c_time_t current; time_t os_now; current = time_now(); time(&os_now); timediff = os_now - (current / USEC_PER_SEC); /* Even though these are called so close together, there is the chance * that the time will be slightly off, so accept anything between -1 and * 1 second. */ ABTS_ASSERT(tc, "core_time and OS time do not agree", (timediff > -2) && (timediff < 2)); } /* basic timer Test */ static void timer_test_1(abts_case *tc, void *data) { int n = 0; tm_block_id id_array[100]; tm_block_id id; tm_service_t tm_service; memset((char*)id_array, 0x00, sizeof(tm_service)); memset(expire_check, 0x00, sizeof(expire_check)); /* init tm_service */ tm_service_init(&tm_service); for(n = 0; n < sizeof(timer_eliment) / sizeof(test_timer_eliment); n++) { id_array[n] = tm_create(&tm_service, TIMER_TYPE_ONE_SHOT, timer_eliment[n].duration, test_expire_func_1); tm_set_param1(id_array[n], (c_uintptr_t)id_array[n]); tm_set_param2(id_array[n], n); } for(n = 0; n < sizeof(timer_eliment) / sizeof(test_timer_eliment); n++) { tm_start(id_array[n]); } id = (tm_block_id)list_first(&tm_service.idle_list); ABTS_INT_EQUAL(tc, id, 0); id = (tm_block_id)list_first(&tm_service.active_list); ABTS_INT_NEQUAL(tc, id, 0); ABTS_INT_EQUAL(tc, id, id_array[1]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, id_array[3]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, id_array[2]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, id_array[0]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, id_array[4]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, 0); core_sleep(70000); tm_execute_tm_service(&tm_service, 0); id = (tm_block_id)list_first(&tm_service.idle_list); ABTS_INT_EQUAL(tc, id, id_array[1]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, 0); id = (tm_block_id)list_first(&tm_service.active_list); ABTS_INT_NEQUAL(tc, id, 0); ABTS_INT_EQUAL(tc, id, id_array[3]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, id_array[2]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, id_array[0]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, id_array[4]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, 0); ABTS_INT_EQUAL(tc, expire_check[0], 0); ABTS_INT_EQUAL(tc, expire_check[1], 1); ABTS_INT_EQUAL(tc, expire_check[2], 0); ABTS_INT_EQUAL(tc, expire_check[3], 0); ABTS_INT_EQUAL(tc, expire_check[4], 0); core_sleep(40000); tm_execute_tm_service(&tm_service, 0); id = (tm_block_id)list_first(&tm_service.idle_list); ABTS_INT_EQUAL(tc, id, id_array[1]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, id_array[3]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, 0); id = (tm_block_id)list_first(&tm_service.active_list); ABTS_INT_NEQUAL(tc, id, 0); ABTS_INT_EQUAL(tc, id, id_array[2]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, id_array[0]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, id_array[4]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, 0); ABTS_INT_EQUAL(tc, expire_check[0], 0); ABTS_INT_EQUAL(tc, expire_check[1], 1); ABTS_INT_EQUAL(tc, expire_check[2], 0); ABTS_INT_EQUAL(tc, expire_check[3], 1); ABTS_INT_EQUAL(tc, expire_check[4], 0); core_sleep(140000); tm_execute_tm_service(&tm_service, 0); id = (tm_block_id)list_first(&tm_service.idle_list); ABTS_INT_EQUAL(tc, id, id_array[1]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, id_array[3]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, id_array[2]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, 0); id = (tm_block_id)list_first(&tm_service.active_list); ABTS_INT_NEQUAL(tc, id, 0); ABTS_INT_EQUAL(tc, id, id_array[0]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, id_array[4]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, 0); ABTS_INT_EQUAL(tc, expire_check[0], 0); ABTS_INT_EQUAL(tc, expire_check[1], 1); ABTS_INT_EQUAL(tc, expire_check[2], 1); ABTS_INT_EQUAL(tc, expire_check[3], 1); ABTS_INT_EQUAL(tc, expire_check[4], 0); core_sleep(300000); tm_execute_tm_service(&tm_service, 0); id = (tm_block_id)list_first(&tm_service.idle_list); ABTS_INT_EQUAL(tc, id, id_array[1]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, id_array[3]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, id_array[2]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, id_array[0]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, 0); id = (tm_block_id)list_first(&tm_service.active_list); ABTS_INT_NEQUAL(tc, id, 0); ABTS_INT_EQUAL(tc, id, id_array[4]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, 0); ABTS_INT_EQUAL(tc, expire_check[0], 1); ABTS_INT_EQUAL(tc, expire_check[1], 1); ABTS_INT_EQUAL(tc, expire_check[2], 1); ABTS_INT_EQUAL(tc, expire_check[3], 1); ABTS_INT_EQUAL(tc, expire_check[4], 0); core_sleep(300000); tm_execute_tm_service(&tm_service, 0); id = (tm_block_id)list_first(&tm_service.idle_list); ABTS_INT_EQUAL(tc, id, id_array[1]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, id_array[3]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, id_array[2]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, id_array[0]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, id_array[4]); if(tc->failed) return; id = (tm_block_id)list_next(id); ABTS_INT_EQUAL(tc, id, 0); id = (tm_block_id)list_first(&tm_service.active_list); ABTS_INT_EQUAL(tc, id, 0); ABTS_INT_EQUAL(tc, expire_check[0], 1); ABTS_INT_EQUAL(tc, expire_check[1], 1); ABTS_INT_EQUAL(tc, expire_check[2], 1); ABTS_INT_EQUAL(tc, expire_check[3], 1); ABTS_INT_EQUAL(tc, expire_check[4], 1); for( n = 0; n < sizeof(timer_eliment) / sizeof(test_timer_eliment); n++) { tm_delete(id_array[n]); } ABTS_INT_EQUAL(tc, tm_pool_avail(), MAX_NUM_OF_TIMER); return; } static void timer_test_2(abts_case *tc, void *data) { int n = 0; tm_block_id id_array[TEST_TIMER_NUM]; tm_service_t tm_service; int duration; int tm_num[TEST_DURATION/TEST_TIMER_PRECISION]; int tm_idx; memset((char*)id_array, 0x00, sizeof(tm_service)); memset(expire_check, 0x00, sizeof(expire_check)); memset(tm_num, 0x00, sizeof(tm_num)); /* init tm_service */ tm_service_init(&tm_service); for(n = 0; n < TEST_TIMER_NUM; n++) { duration = (rand() % (TEST_DURATION/TEST_TIMER_PRECISION)) * TEST_TIMER_PRECISION; tm_idx = duration/TEST_TIMER_PRECISION; tm_num[tm_idx]++; duration += (TEST_TIMER_PRECISION >> 1); id_array[n] = tm_create(&tm_service, TIMER_TYPE_ONE_SHOT, duration, test_expire_func_2); tm_set_param1(id_array[n], (c_uintptr_t)id_array[n]); tm_set_param2(id_array[n], tm_idx); } for(n = 0; n < TEST_TIMER_NUM; n++) { tm_start(id_array[n]); } for(n = 0; n < TEST_DURATION/TEST_TIMER_PRECISION; n++) { core_sleep(TEST_TIMER_PRECISION * 1000); tm_execute_tm_service(&tm_service, 0); ABTS_INT_EQUAL(tc, tm_num[n], expire_check[n]); } for(n = 0; n < TEST_TIMER_NUM; n++) { tm_delete(id_array[n]); } ABTS_INT_EQUAL(tc, tm_pool_avail(), MAX_NUM_OF_TIMER); return; } static void timer_test_3(abts_case *tc, void *data) { c_uint32_t n = 0; tm_block_id id_array[TEST_TIMER_NUM]; tm_service_t tm_service; int id_duration[TEST_TIMER_NUM]; int duration; int tm_num[TEST_DURATION/TEST_TIMER_PRECISION]; int tm_idx, tm_check_id; memset((char*)id_array, 0x00, sizeof(tm_service)); memset(expire_check, 0x00, sizeof(expire_check)); memset(tm_num, 0x00, sizeof(tm_num)); /* init tm_service */ tm_service_init(&tm_service); for(n = 0; n < TEST_TIMER_NUM; n++) { duration = (rand() % (TEST_DURATION/TEST_TIMER_PRECISION)) * TEST_TIMER_PRECISION; tm_idx = duration/TEST_TIMER_PRECISION; tm_num[tm_idx]++; id_duration[n] = duration; duration += (TEST_TIMER_PRECISION >> 1); id_array[n] = tm_create(&tm_service, TIMER_TYPE_ONE_SHOT, duration, test_expire_func_2); tm_set_param1(id_array[n], (c_uintptr_t)id_array[n]); tm_set_param2(id_array[n], tm_idx); } for(n = 0; n < TEST_TIMER_NUM; n++) { tm_start(id_array[n]); } for(n = 0; n < TEST_TIMER_NUM / 10; n++) { tm_idx = n*10 + rand()%10; tm_check_id = id_duration[tm_idx]/TEST_TIMER_PRECISION; tm_num[tm_check_id]--; tm_delete(id_array[tm_idx]); id_array[tm_idx] = 0; } for(n = 0; n < TEST_DURATION/TEST_TIMER_PRECISION; n++) { core_sleep(TEST_TIMER_PRECISION * 1000); tm_execute_tm_service(&tm_service, 0); ABTS_INT_EQUAL(tc, tm_num[n], expire_check[n]); } for(n = 0; n < TEST_TIMER_NUM; n++) { if(id_array[n] != 0) { tm_delete(id_array[n]); } } ABTS_INT_EQUAL(tc, tm_pool_avail(), MAX_NUM_OF_TIMER); return; } abts_suite *testtimer(abts_suite *suite) { suite = ADD_SUITE(suite) /* * OpenSUSE OBS * - Ubuntu 16.10 i586 failed * - It is probably VM issue * [ 661s] testtimer : Line 176: expected <1449351760>, but saw <0> * [ 661s] Line 305: expected <1019>, but saw <1024> * [ 661s] Line 372: expected <1019>, but saw <1024> * [ 661s] FAILED 3 of 4 */ abts_run_test(suite, test_now, NULL); abts_run_test(suite, timer_test_1, NULL); abts_run_test(suite, timer_test_2, NULL); abts_run_test(suite, timer_test_3, NULL); return suite; } nextepc-0.3.10/lib/core/test/testtlv.c000066400000000000000000000730731333553357400176140ustar00rootroot00000000000000#include "core_tlv.h" #include "core_tlv_msg.h" #include "core_lib.h" #include "core_debug.h" #include "testutil.h" #define TLV_0_LEN 10 #define TLV_1_LEN 20 #define TLV_2_LEN 100 #define TLV_3_LEN 200 #define TLV_4_LEN 2 #define TLV_5_LEN 2000 #define TLV_0_INSTANCE 0 #define TLV_1_INSTANCE 1 #define TLV_2_INSTANCE 2 #define TLV_3_INSTANCE 3 #define TLV_4_INSTANCE 4 #define TLV_5_INSTANCE 5 #define TLV_VALUE_ARRAY_SIZE 3000 #define EMBED_TLV_TYPE 20 #define EMBED_TLV_INSTANCE 7 typedef struct _test_tlv_element { c_uint8_t type; c_uint32_t length; c_uint8_t instance; c_uint8_t *value; c_uint8_t val_char; } test_tlv_element; c_uint8_t test_tlv_value[TLV_VALUE_ARRAY_SIZE]; test_tlv_element tlv_element[] ={ {1, TLV_0_LEN, TLV_0_INSTANCE, 0, 0x0a}, {50, TLV_1_LEN, TLV_1_INSTANCE, 0, 0x0b}, {255, TLV_2_LEN, TLV_2_INSTANCE, 0, 0x0c}, {254, TLV_3_LEN, TLV_3_INSTANCE, 0, 0x0d}, {5, TLV_4_LEN, TLV_4_INSTANCE, 0, 0x0e}, {30, TLV_5_LEN, TLV_5_INSTANCE, 0, 0x0f} }; void tlv_test_set_tlv_value(void) { c_uint32_t inc = 0; /* set test tlv value */ tlv_element[0].value = test_tlv_value; memset(tlv_element[0].value, tlv_element[0].val_char, tlv_element[0].length); inc += tlv_element[0].length; tlv_element[1].value = test_tlv_value + inc; memset(tlv_element[1].value, tlv_element[1].val_char, tlv_element[1].length); inc += tlv_element[1].length; tlv_element[2].value = test_tlv_value + inc; memset(tlv_element[2].value, tlv_element[2].val_char, tlv_element[2].length); inc += tlv_element[2].length; tlv_element[3].value = test_tlv_value + inc; memset(tlv_element[3].value, tlv_element[3].val_char, tlv_element[3].length); inc += tlv_element[3].length; tlv_element[4].value = test_tlv_value + inc; memset(tlv_element[4].value, tlv_element[4].val_char, tlv_element[4].length); inc += tlv_element[4].length; return; } void tlv_test_check_embed_tlv_test(abts_case *tc, tlv_t *root_tlv, int mode) { c_uint32_t m; c_uint32_t parent_block_len; tlv_t *pTlv; tlv_t *embed_tlv = NULL, *parent_tlv = NULL, *parsed_tlv = NULL; c_uint8_t parent_block[4000]; c_uint8_t *pos = NULL; int result; memset(parent_block, 0x00, sizeof(parent_block)); parent_block_len = tlv_render(root_tlv, parent_block, sizeof(parent_block), mode); tlv_free_all(root_tlv); ABTS_INT_EQUAL(tc, tlv_pool_avail(), NUM_OF_TLV_NODE); pos = parent_block; switch(mode) { case TLV_MODE_T2_L2: { ABTS_INT_EQUAL(tc, 332, parent_block_len); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[0].type >> 8); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[0].type & 0xFF); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[0].length >> 8); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[0].length & 0xFF); for(m = 0; m < tlv_element[0].length; m++) ABTS_INT_EQUAL(tc, *(pos++), tlv_element[0].val_char); ABTS_INT_EQUAL(tc, *(pos++), EMBED_TLV_TYPE >> 8); ABTS_INT_EQUAL(tc, *(pos++), EMBED_TLV_TYPE & 0xFF); ABTS_INT_EQUAL(tc, *(pos++), (308 >> 8)); ABTS_INT_EQUAL(tc, *(pos++), 308 & 0xFF); /* embedded tlv_t */ ABTS_INT_EQUAL(tc, *(pos++), tlv_element[2].type >> 8); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[2].type & 0xFF); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[2].length >> 8); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[2].length & 0xFF); for(m = 0; m < tlv_element[2].length; m++) ABTS_INT_EQUAL(tc, *(pos++), tlv_element[2].val_char); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[3].type >> 8); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[3].type & 0xFF); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[3].length >> 8); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[3].length & 0xFF); for(m = 0; m < tlv_element[3].length; m++) ABTS_INT_EQUAL(tc, *(pos++), tlv_element[3].val_char); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[4].type >> 8); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[4].type & 0xFF); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[4].length >> 8); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[4].length & 0xFF); for(m = 0; m < tlv_element[4].length; m++) ABTS_INT_EQUAL(tc, *(pos++), 0x0e); break; } case TLV_MODE_T1_L2: { ABTS_INT_EQUAL(tc, 327, parent_block_len); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[0].type & 0xFF); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[0].length >> 8); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[0].length & 0xFF); for(m = 0; m < tlv_element[0].length; m++) ABTS_INT_EQUAL(tc, *(pos++), tlv_element[0].val_char); ABTS_INT_EQUAL(tc, *(pos++), EMBED_TLV_TYPE & 0xFF); ABTS_INT_EQUAL(tc, *(pos++), (306 >> 8)); ABTS_INT_EQUAL(tc, *(pos++), 306 & 0xFF); /* embedded tlv_t */ ABTS_INT_EQUAL(tc, *(pos++), tlv_element[2].type & 0xFF); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[2].length >> 8); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[2].length & 0xFF); for(m = 0; m < tlv_element[2].length; m++) ABTS_INT_EQUAL(tc, *(pos++), tlv_element[2].val_char); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[3].type & 0xFF); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[3].length >> 8); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[3].length & 0xFF); for(m = 0; m < tlv_element[3].length; m++) ABTS_INT_EQUAL(tc, *(pos++), tlv_element[3].val_char); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[4].type & 0xFF); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[4].length >> 8); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[4].length & 0xFF); for(m = 0; m < tlv_element[4].length; m++) ABTS_INT_EQUAL(tc, *(pos++), 0x0e); break; } case TLV_MODE_T1_L2_I1: { ABTS_INT_EQUAL(tc, 332, parent_block_len); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[0].type & 0xFF); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[0].length >> 8); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[0].length & 0xFF); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[0].instance & 0xFF); for(m = 0; m < tlv_element[0].length; m++) ABTS_INT_EQUAL(tc, *(pos++), tlv_element[0].val_char); ABTS_INT_EQUAL(tc, *(pos++), EMBED_TLV_TYPE & 0xFF); ABTS_INT_EQUAL(tc, *(pos++), (308 >> 8)); ABTS_INT_EQUAL(tc, *(pos++), 308 & 0xFF); ABTS_INT_EQUAL(tc, *(pos++), EMBED_TLV_INSTANCE); /* embedded tlv_t */ ABTS_INT_EQUAL(tc, *(pos++), tlv_element[2].type & 0xFF); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[2].length >> 8); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[2].length & 0xFF); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[2].instance & 0xFF); for(m = 0; m < tlv_element[2].length; m++) ABTS_INT_EQUAL(tc, *(pos++), tlv_element[2].val_char); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[3].type & 0xFF); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[3].length >> 8); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[3].length & 0xFF); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[3].instance & 0xFF); for(m = 0; m < tlv_element[3].length; m++) ABTS_INT_EQUAL(tc, *(pos++), tlv_element[3].val_char); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[4].type & 0xFF); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[4].length >> 8); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[4].length & 0xFF); ABTS_INT_EQUAL(tc, *(pos++), tlv_element[4].instance & 0xFF); for(m = 0; m < tlv_element[4].length; m++) ABTS_INT_EQUAL(tc, *(pos++), 0x0e); break; } default: { ABTS_TRUE(tc, 0); break; } } parsed_tlv = tlv_parse_block(parent_block_len, parent_block, mode); ABTS_PTR_NOTNULL(tc, parsed_tlv); pTlv = parsed_tlv; ABTS_INT_EQUAL(tc, pTlv->type, tlv_element[0].type); ABTS_INT_EQUAL(tc, pTlv->length, tlv_element[0].length); ABTS_INT_EQUAL(tc, pTlv->instance, tlv_element[0].instance); result = memcmp(pTlv->value, tlv_element[0].value, tlv_element[0].length); ABTS_INT_EQUAL(tc, result, 0); pTlv = pTlv->next; ABTS_INT_EQUAL(tc, pTlv->type, 20); switch(mode) { case TLV_MODE_T2_L2: case TLV_MODE_T1_L2_I1: ABTS_INT_EQUAL(tc, pTlv->length, 308); break; case TLV_MODE_T1_L2: ABTS_INT_EQUAL(tc, pTlv->length, 306); break; default: ABTS_TRUE(tc, 0); break; } pTlv = pTlv->next; ABTS_INT_EQUAL(tc, pTlv->type, tlv_element[4].type); ABTS_INT_EQUAL(tc, pTlv->length, tlv_element[4].length); if (mode == TLV_MODE_T1_L2_I1) ABTS_INT_EQUAL(tc, pTlv->instance, tlv_element[4].instance); else ABTS_INT_EQUAL(tc, pTlv->instance, 0); result = memcmp(pTlv->value, tlv_element[4].value, tlv_element[4].length); ABTS_INT_EQUAL(tc, result, 0); pTlv = pTlv->next; ABTS_PTR_NULL(tc, pTlv); parent_tlv = tlv_find(parsed_tlv,20); ABTS_PTR_NOTNULL(tc, parent_tlv); tlv_parse_embedded_block(parent_tlv, mode); embed_tlv = parent_tlv->embedded; ABTS_PTR_NOTNULL(tc, embed_tlv); ABTS_INT_EQUAL(tc, embed_tlv->type, tlv_element[2].type); ABTS_INT_EQUAL(tc, embed_tlv->length, tlv_element[2].length); if (mode == TLV_MODE_T1_L2_I1) ABTS_INT_EQUAL(tc, embed_tlv->instance, tlv_element[2].instance); else ABTS_INT_EQUAL(tc, embed_tlv->instance, 0); for(m = 0; m < tlv_element[2].length; m++) { ABTS_INT_EQUAL(tc, *((c_uint8_t*)(embed_tlv->value+m)), tlv_element[2].val_char); } embed_tlv = embed_tlv->next; ABTS_INT_EQUAL(tc, embed_tlv->type, tlv_element[3].type); ABTS_INT_EQUAL(tc, embed_tlv->length, tlv_element[3].length); if (mode == TLV_MODE_T1_L2_I1) ABTS_INT_EQUAL(tc, embed_tlv->instance, tlv_element[3].instance); else ABTS_INT_EQUAL(tc, embed_tlv->instance, 0); for(m = 0; m < tlv_element[3].length; m++) { ABTS_INT_EQUAL(tc, *((c_uint8_t*)(embed_tlv->value+m)), tlv_element[3].val_char); } embed_tlv = embed_tlv->next; ABTS_PTR_NULL(tc, embed_tlv); embed_tlv = tlv_find(parsed_tlv,254); ABTS_PTR_NOTNULL(tc, embed_tlv); embed_tlv = tlv_find(parsed_tlv,253); ABTS_PTR_NULL(tc, embed_tlv); tlv_free_all(parsed_tlv); ABTS_INT_EQUAL(tc, tlv_pool_avail(), NUM_OF_TLV_NODE); return; } /* basic encoding/decoding/finding Test */ static void tlv_test_1(abts_case *tc, void *data) { c_uint32_t idx, m, parent_block_len; tlv_t *root_tlv = NULL, *parsed_tlv = NULL, *pTlv; c_uint8_t parent_block[4000]; c_uint8_t *pos = NULL; c_uint8_t mode = (c_uintptr_t)data; tlv_test_set_tlv_value(); /* tlv encoding for test */ root_tlv = tlv_add(NULL,tlv_element[0].type, tlv_element[0].length, tlv_element[0].instance, tlv_element[0].value); for(idx = 1; idx < 4; idx++) { tlv_add(root_tlv, tlv_element[idx].type, tlv_element[idx].length, tlv_element[idx].instance, tlv_element[idx].value); } memset(parent_block, 0x00, sizeof(parent_block)); parent_block_len = tlv_render(root_tlv, parent_block, sizeof(parent_block), mode); switch(mode) { case TLV_MODE_T2_L2: case TLV_MODE_T1_L2_I1: ABTS_INT_EQUAL(tc, 346, parent_block_len); break; case TLV_MODE_T1_L2: ABTS_INT_EQUAL(tc, 342, parent_block_len); break; case TLV_MODE_T1_L1: ABTS_INT_EQUAL(tc, 338, parent_block_len); break; default: ABTS_TRUE(tc, 0); break; } tlv_free_all(root_tlv); ABTS_INT_EQUAL(tc, tlv_pool_avail(), NUM_OF_TLV_NODE); pos = parent_block; for(idx = 0; idx < 4; idx++) { switch(mode) { case TLV_MODE_T2_L2: ABTS_INT_EQUAL(tc, (tlv_element[idx].type >> 8), *(pos++)); ABTS_INT_EQUAL(tc, tlv_element[idx].type & 0xFF, *(pos++)); ABTS_INT_EQUAL(tc, (tlv_element[idx].length >> 8), *(pos++)); ABTS_INT_EQUAL(tc, tlv_element[idx].length & 0xFF, *(pos++)); break; case TLV_MODE_T1_L2: ABTS_INT_EQUAL(tc, tlv_element[idx].type & 0xFF, *(pos++)); ABTS_INT_EQUAL(tc, (tlv_element[idx].length >> 8), *(pos++)); ABTS_INT_EQUAL(tc, tlv_element[idx].length & 0xFF, *(pos++)); break; case TLV_MODE_T1_L1: ABTS_INT_EQUAL(tc, tlv_element[idx].type & 0xFF, *(pos++)); ABTS_INT_EQUAL(tc, tlv_element[idx].length & 0xFF, *(pos++)); break; case TLV_MODE_T1_L2_I1: ABTS_INT_EQUAL(tc, tlv_element[idx].type & 0xFF, *(pos++)); ABTS_INT_EQUAL(tc, (tlv_element[idx].length >> 8), *(pos++)); ABTS_INT_EQUAL(tc, tlv_element[idx].length & 0xFF, *(pos++)); ABTS_INT_EQUAL(tc, tlv_element[idx].instance & 0xFF, *(pos++)); break; default: ABTS_TRUE(tc, 0); break; } for(m = 0; m < tlv_element[idx].length; m++) ABTS_INT_EQUAL(tc, tlv_element[idx].val_char, *(pos++)); } parsed_tlv = tlv_parse_block(parent_block_len,parent_block, mode); ABTS_PTR_NOTNULL(tc, parsed_tlv); pTlv = parsed_tlv; idx = 0; while(pTlv) { int result; ABTS_INT_EQUAL(tc, pTlv->type, tlv_element[idx].type); ABTS_INT_EQUAL(tc, pTlv->length, tlv_element[idx].length); if (mode == TLV_MODE_T1_L2_I1) ABTS_INT_EQUAL(tc, pTlv->instance, tlv_element[idx].instance); else ABTS_INT_EQUAL(tc, pTlv->instance, 0); result = memcmp(pTlv->value, tlv_element[idx].value, tlv_element[idx].length); ABTS_INT_EQUAL(tc, result, 0); pTlv = pTlv->next; idx++; } ABTS_INT_EQUAL(tc, idx, 4); pTlv = tlv_find(parsed_tlv, 255); ABTS_PTR_NOTNULL(tc, pTlv); pTlv = tlv_find(parsed_tlv, 253); ABTS_PTR_NULL(tc, pTlv); tlv_free_all(parsed_tlv); ABTS_INT_EQUAL(tc, tlv_pool_avail(), NUM_OF_TLV_NODE); return; } /* embedded tlv_t test : first, make embedded tlv block for embeded tlv and then make whole tlv block using embedded tlv block previously made*/ static void tlv_test_2(abts_case *tc, void *data) { c_uint32_t embed_block_len; tlv_t *root_tlv = NULL; tlv_t *embed_tlv = NULL; c_uint8_t embed_block[1000];; c_uint8_t mode = (c_uintptr_t)data; tlv_test_set_tlv_value(); /* Tlv Encoding for embeded tlv_t */ embed_tlv = tlv_add(NULL, tlv_element[2].type, tlv_element[2].length, tlv_element[2].instance, tlv_element[2].value); tlv_add(embed_tlv,tlv_element[3].type, tlv_element[3].length, tlv_element[3].instance, tlv_element[3].value); embed_block_len = tlv_render(embed_tlv, embed_block, sizeof(embed_block), mode); switch(mode) { case TLV_MODE_T2_L2: case TLV_MODE_T1_L2_I1: ABTS_INT_EQUAL(tc, embed_block_len, 308); break; case TLV_MODE_T1_L2: ABTS_INT_EQUAL(tc, embed_block_len, 306); break; default: ABTS_TRUE(tc, 0); break; } tlv_free_all(embed_tlv); ABTS_INT_EQUAL(tc, tlv_pool_avail(), NUM_OF_TLV_NODE); root_tlv = tlv_add(NULL,tlv_element[0].type, tlv_element[0].length, tlv_element[0].instance, tlv_element[0].value); tlv_add(root_tlv, EMBED_TLV_TYPE, embed_block_len, EMBED_TLV_INSTANCE, embed_block); tlv_add(root_tlv,tlv_element[4].type, tlv_element[4].length, tlv_element[4].instance, tlv_element[4].value); tlv_test_check_embed_tlv_test(tc, root_tlv, mode); return; } /* embedded tlv_t test : make parent and embedded tlv and then tlv_render functions makes whole tlv block. the value member of each tlv must point to vaild address at the time using tlv_rendering function */ static void tlv_test_3(abts_case *tc, void *data) { tlv_t *root_tlv = NULL, *parent_tlv = NULL; c_uint8_t mode = (c_uintptr_t)data; tlv_test_set_tlv_value(); /* Tlv Encoding for embeded tlv_t */ root_tlv = tlv_add(NULL,tlv_element[0].type, tlv_element[0].length, tlv_element[0].instance, tlv_element[0].value); parent_tlv= tlv_add(root_tlv, EMBED_TLV_TYPE, 0, EMBED_TLV_INSTANCE, NULL); tlv_add(root_tlv,tlv_element[4].type, tlv_element[4].length, tlv_element[4].instance, tlv_element[4].value); tlv_embed(parent_tlv,tlv_element[2].type, tlv_element[2].length, tlv_element[2].instance, tlv_element[2].value); tlv_embed(parent_tlv,tlv_element[3].type, tlv_element[3].length, tlv_element[3].instance, tlv_element[3].value); tlv_test_check_embed_tlv_test(tc, root_tlv, mode); return; } /* embedded tlv_t test : make parent and embedded tlv and then tlv_render functions makes whole tlv block. The value member of each tlv is copied to the buff of the root tlv_t, so the allocated resource for the value member of each tlv can be deallocated after executing tlv_add or tlv embed function*/ static void tlv_test_4(abts_case *tc, void *data) { tlv_t *root_tlv = NULL, *parent_tlv = NULL; c_uint8_t tlv_buff[2000]; c_uint8_t mode = (c_uintptr_t)data; tlv_test_set_tlv_value(); root_tlv = tlv_copy(tlv_buff, sizeof(tlv_buff), tlv_element[0].type, tlv_element[0].length, tlv_element[0].instance, tlv_element[0].value); parent_tlv = tlv_add(root_tlv, EMBED_TLV_TYPE, 0, EMBED_TLV_INSTANCE, NULL); tlv_add(root_tlv, tlv_element[4].type, tlv_element[4].length, tlv_element[4].instance, tlv_element[4].value); tlv_embed(parent_tlv,tlv_element[2].type, tlv_element[2].length, tlv_element[2].instance, tlv_element[2].value); tlv_embed(parent_tlv,tlv_element[3].type, tlv_element[3].length, tlv_element[3].instance, tlv_element[3].value); memset(tlv_element[2].value, 0x00, tlv_element[2].length); memset(tlv_element[3].value, 0xf0, tlv_element[3].length); tlv_test_check_embed_tlv_test(tc, root_tlv, mode); return; } /* endian check test */ static void tlv_test_5(abts_case *tc, void *data) { c_uint32_t parent_block_len; tlv_t *root_tlv = NULL, *parsed_tlv = NULL, *p_tlv; c_uint8_t parent_block[4000]; c_uint8_t *pos = NULL; c_uint16_t c_16 = 0x1122; c_uint32_t c_32 = 0x11223344; c_uint8_t mode = (c_uintptr_t)data; /* tlv encoding for test */ c_16 = htons(c_16); root_tlv = tlv_add(NULL, 10, 2, 0, (c_uint8_t*)&c_16); c_32 = htonl(c_32); tlv_add(root_tlv, 20, 4, 0, (c_uint8_t*)&c_32); memset(parent_block, 0x00, sizeof(parent_block)); parent_block_len = tlv_render(root_tlv, parent_block, sizeof(parent_block), mode); tlv_free_all(root_tlv); ABTS_INT_EQUAL(tc, tlv_pool_avail(), NUM_OF_TLV_NODE); pos = parent_block; switch(mode) { case TLV_MODE_T2_L2: ABTS_INT_EQUAL(tc, *(pos++), 0); ABTS_INT_EQUAL(tc, *(pos++), 10); ABTS_INT_EQUAL(tc, *(pos++), 0); ABTS_INT_EQUAL(tc, *(pos++), 2); ABTS_INT_EQUAL(tc, *(pos++), 0x11); ABTS_INT_EQUAL(tc, *(pos++), 0x22); ABTS_INT_EQUAL(tc, *(pos++), 0); ABTS_INT_EQUAL(tc, *(pos++), 20); ABTS_INT_EQUAL(tc, *(pos++), 0); ABTS_INT_EQUAL(tc, *(pos++), 4); ABTS_INT_EQUAL(tc, *(pos++), 0x11); ABTS_INT_EQUAL(tc, *(pos++), 0x22); ABTS_INT_EQUAL(tc, *(pos++), 0x33); ABTS_INT_EQUAL(tc, *(pos++), 0x44); break; case TLV_MODE_T1_L2: ABTS_INT_EQUAL(tc, *(pos++), 10); ABTS_INT_EQUAL(tc, *(pos++), 0); ABTS_INT_EQUAL(tc, *(pos++), 2); ABTS_INT_EQUAL(tc, *(pos++), 0x11); ABTS_INT_EQUAL(tc, *(pos++), 0x22); ABTS_INT_EQUAL(tc, *(pos++), 20); ABTS_INT_EQUAL(tc, *(pos++), 0); ABTS_INT_EQUAL(tc, *(pos++), 4); ABTS_INT_EQUAL(tc, *(pos++), 0x11); ABTS_INT_EQUAL(tc, *(pos++), 0x22); ABTS_INT_EQUAL(tc, *(pos++), 0x33); ABTS_INT_EQUAL(tc, *(pos++), 0x44); break; case TLV_MODE_T1_L2_I1: ABTS_INT_EQUAL(tc, *(pos++), 10); ABTS_INT_EQUAL(tc, *(pos++), 0); ABTS_INT_EQUAL(tc, *(pos++), 2); ABTS_INT_EQUAL(tc, *(pos++), 0); ABTS_INT_EQUAL(tc, *(pos++), 0x11); ABTS_INT_EQUAL(tc, *(pos++), 0x22); ABTS_INT_EQUAL(tc, *(pos++), 20); ABTS_INT_EQUAL(tc, *(pos++), 0); ABTS_INT_EQUAL(tc, *(pos++), 4); ABTS_INT_EQUAL(tc, *(pos++), 0); ABTS_INT_EQUAL(tc, *(pos++), 0x11); ABTS_INT_EQUAL(tc, *(pos++), 0x22); ABTS_INT_EQUAL(tc, *(pos++), 0x33); ABTS_INT_EQUAL(tc, *(pos++), 0x44); break; case TLV_MODE_T1_L1: ABTS_INT_EQUAL(tc, *(pos++), 10); ABTS_INT_EQUAL(tc, *(pos++), 2); ABTS_INT_EQUAL(tc, *(pos++), 0x11); ABTS_INT_EQUAL(tc, *(pos++), 0x22); ABTS_INT_EQUAL(tc, *(pos++), 20); ABTS_INT_EQUAL(tc, *(pos++), 4); ABTS_INT_EQUAL(tc, *(pos++), 0x11); ABTS_INT_EQUAL(tc, *(pos++), 0x22); ABTS_INT_EQUAL(tc, *(pos++), 0x33); ABTS_INT_EQUAL(tc, *(pos++), 0x44); break; default: ABTS_TRUE(tc, 0); break; } p_tlv = parsed_tlv = tlv_parse_block(parent_block_len,parent_block, mode); ABTS_INT_EQUAL(tc, tlv_value_16(p_tlv), 0x1122); p_tlv = parsed_tlv->next; ABTS_INT_EQUAL(tc, tlv_value_32(p_tlv), 0x11223344); tlv_free_all(parsed_tlv); ABTS_INT_EQUAL(tc, tlv_pool_avail(), NUM_OF_TLV_NODE); return; } /* Sample header for tlv_msg */ #define TLV_AUTHORIZATION_POLICY_SUPPORT_TYPE 21 #define TLV_AUTHORIZATION_POLICY_SUPPORT_LEN 1 typedef tlv_uint8_t tlv_authorization_policy_support_t; extern tlv_desc_t tlv_desc_authorization_policy_support; #define TLV_CLIENT_SECURITY_HISTORY_TYPE 108 #define TLV_CLIENT_SECURITY_HISTORY_LEN TLV_VARIABLE_LEN typedef struct _tlv_client_security_history_t { tlv_presence_t presence; tlv_authorization_policy_support_t authorization_policy_support0; tlv_authorization_policy_support_t authorization_policy_support2; } tlv_client_security_history_t; extern tlv_desc_t tlv_desc_client_security_history; #define TLV_CLIENT_INFO_TYPE 103 #define TLV_CLIENT_INFO_LEN TLV_VARIABLE_LEN typedef struct _tlv_client_info_t { tlv_presence_t presence; tlv_client_security_history_t client_security_history; } tlv_client_info_t; extern tlv_desc_t tlv_desc_client_info; #define TLV_SERVER_NAME_TYPE 25 #define TLV_SERVER_NAME_LEN TLV_VARIABLE_LEN typedef tlv_octet_t tlv_server_name_t; extern tlv_desc_t tlv_desc_server_name; #define TLV_SERVER_INFO_TYPE 26 #define TLV_SERVER_INFO_LEN TLV_VARIABLE_LEN typedef struct _tlv_server_info_t { tlv_presence_t presence; tlv_server_name_t TLV_1_OR_MORE(server_name); } tlv_server_info_t; extern tlv_desc_t tlv_desc_server_info; typedef struct _tlv_attach_req { tlv_client_info_t client_info; tlv_server_info_t server_info; } tlv_attach_req; extern tlv_desc_t tlv_desc_attach_req; /* Sample source for tlv_msg */ tlv_desc_t tlv_desc_authorization_policy_support0 = { TLV_UINT8, "Auth Policy0", TLV_AUTHORIZATION_POLICY_SUPPORT_TYPE, TLV_AUTHORIZATION_POLICY_SUPPORT_LEN, 0, sizeof(tlv_authorization_policy_support_t), { NULL } }; tlv_desc_t tlv_desc_authorization_policy_support2 = { TLV_UINT8, "Auth Policy2", TLV_AUTHORIZATION_POLICY_SUPPORT_TYPE, TLV_AUTHORIZATION_POLICY_SUPPORT_LEN, 2, sizeof(tlv_authorization_policy_support_t), { NULL } }; tlv_desc_t tlv_desc_client_security_history = { TLV_COMPOUND, "Sec History", TLV_CLIENT_SECURITY_HISTORY_TYPE, TLV_CLIENT_SECURITY_HISTORY_LEN, 0, sizeof(tlv_client_security_history_t), { &tlv_desc_authorization_policy_support0, &tlv_desc_authorization_policy_support2, NULL, } }; tlv_desc_t tlv_desc_client_info = { TLV_COMPOUND, "Client Info", TLV_CLIENT_INFO_TYPE, TLV_CLIENT_INFO_LEN, 0, sizeof(tlv_client_info_t), { &tlv_desc_client_security_history, NULL, } }; tlv_desc_t tlv_desc_server_name = { TLV_VAR_STR, "Server Name", TLV_SERVER_NAME_TYPE, TLV_SERVER_NAME_LEN, 0, sizeof(tlv_server_name_t), { NULL } }; tlv_desc_t tlv_desc_server_info = { TLV_COMPOUND, "Server Info", TLV_SERVER_INFO_TYPE, TLV_SERVER_INFO_LEN, 0, sizeof(tlv_server_info_t), { &tlv_desc_server_name, &tlv_desc_more2, NULL, } }; tlv_desc_t tlv_desc_attach_req = { TLV_MESSAGE, "Attach Req", 0, 0, 0, 0, { &tlv_desc_client_info, &tlv_desc_server_info, NULL, }}; static void tlv_test_6(abts_case *tc, void *data) { tlv_attach_req reqv; tlv_attach_req reqv2; pkbuf_t *req = NULL; char testbuf[1024]; /* Initialize message value structure */ memset(&reqv, 0, sizeof(tlv_attach_req)); /* Set nessary members of message */ reqv.client_info.presence = 1; reqv.client_info.client_security_history.presence = 1; reqv.client_info.client_security_history. authorization_policy_support0.presence = 1; reqv.client_info.client_security_history. authorization_policy_support0.u8 = 0x3; reqv.client_info.client_security_history. authorization_policy_support2.presence = 1; reqv.client_info.client_security_history. authorization_policy_support2.u8 = 0x9; reqv.server_info.presence = 1; reqv.server_info.server_name[0].presence = 1; reqv.server_info.server_name[0].data = (c_uint8_t*)"\x11\x22\x33\x44\x55\x66"; reqv.server_info.server_name[0].len = 6; reqv.server_info.presence = 1; reqv.server_info.server_name[1].presence = 1; reqv.server_info.server_name[1].data = (c_uint8_t*)"\xaa\xbb\xcc\xdd\xee\xff"; reqv.server_info.server_name[1].len = 6; /* Build message */ tlv_build_msg(&req, &tlv_desc_attach_req, &reqv, TLV_MODE_T1_L2_I1); #define TEST_TLV_BUILD_MSG \ "67000e00 6c000a00 15000100 03150001" \ "02091a00 14001900 06001122 33445566" \ "19000600 aabbccdd eeff" ABTS_INT_EQUAL(tc, 42, req->len); ABTS_TRUE(tc, memcmp(req->payload, CORE_HEX(TEST_TLV_BUILD_MSG, strlen(TEST_TLV_BUILD_MSG), testbuf), req->len) == 0); /* Initialize message value structure */ memset(&reqv2, 0, sizeof(tlv_attach_req)); /* Parse message */ tlv_parse_msg(&reqv2, &tlv_desc_attach_req, req, TLV_MODE_T1_L2_I1); ABTS_INT_EQUAL(tc, 1, reqv2.client_info.presence); ABTS_INT_EQUAL(tc, 1, reqv2.client_info.client_security_history.presence); ABTS_INT_EQUAL(tc, 1, reqv2.client_info.client_security_history. authorization_policy_support0.presence); ABTS_INT_EQUAL(tc, 0x3, reqv2.client_info. client_security_history.authorization_policy_support0.u8); ABTS_INT_EQUAL(tc, 1, reqv2.client_info.client_security_history. authorization_policy_support2.presence); ABTS_INT_EQUAL(tc, 0x9, reqv2.client_info. client_security_history.authorization_policy_support2.u8); ABTS_INT_EQUAL(tc, 1, reqv2.server_info.presence); ABTS_INT_EQUAL(tc, 1, reqv2.server_info.server_name[0].presence); ABTS_INT_EQUAL(tc, 1, reqv2.server_info.server_name[1].presence); ABTS_INT_EQUAL(tc, 6, reqv2.server_info.server_name[0].len); ABTS_TRUE(tc, memcmp(reqv2.server_info.server_name[0].data, (c_uint8_t*)"\x11\x22\x33\x44\x55\x66", 6) == 0); ABTS_INT_EQUAL(tc, 6, reqv2.server_info.server_name[1].len); ABTS_TRUE(tc, memcmp(reqv2.server_info.server_name[1].data, (c_uint8_t*)"\xaa\xbb\xcc\xdd\xee\xff", 6) == 0); pkbuf_free(req); } abts_suite *testtlv(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, tlv_test_1, (void*)TLV_MODE_T2_L2); abts_run_test(suite, tlv_test_2, (void*)TLV_MODE_T2_L2); abts_run_test(suite, tlv_test_3, (void*)TLV_MODE_T2_L2); abts_run_test(suite, tlv_test_4, (void*)TLV_MODE_T2_L2); abts_run_test(suite, tlv_test_5, (void*)TLV_MODE_T2_L2); abts_run_test(suite, tlv_test_1, (void*)TLV_MODE_T1_L1); abts_run_test(suite, tlv_test_5, (void*)TLV_MODE_T1_L1); abts_run_test(suite, tlv_test_1, (void*)TLV_MODE_T1_L2); abts_run_test(suite, tlv_test_2, (void*)TLV_MODE_T1_L2); abts_run_test(suite, tlv_test_3, (void*)TLV_MODE_T1_L2); abts_run_test(suite, tlv_test_4, (void*)TLV_MODE_T1_L2); abts_run_test(suite, tlv_test_5, (void*)TLV_MODE_T1_L2); abts_run_test(suite, tlv_test_1, (void*)TLV_MODE_T1_L2_I1); abts_run_test(suite, tlv_test_2, (void*)TLV_MODE_T1_L2_I1); abts_run_test(suite, tlv_test_3, (void*)TLV_MODE_T1_L2_I1); abts_run_test(suite, tlv_test_4, (void*)TLV_MODE_T1_L2_I1); abts_run_test(suite, tlv_test_5, (void*)TLV_MODE_T1_L2_I1); abts_run_test(suite, tlv_test_6, NULL); return suite; } nextepc-0.3.10/lib/core/test/testutil.c000066400000000000000000000025141333553357400177540ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "core.h" #include "abts.h" #include "testutil.h" void core_assert_ok(abts_case* tc, const char* context, status_t rv, int lineno) { if (rv == CORE_ENOTIMPL) { abts_not_impl(tc, context, lineno); } else if (rv != CORE_OK) { char buf[STRING_MAX], ebuf[128]; sprintf(buf, "%s (%d): %s\n", context, rv, core_strerror(rv, ebuf, sizeof ebuf)); abts_fail(tc, buf, lineno); } } void test_initialize(void) { core_initialize(); atexit(core_terminate); } nextepc-0.3.10/lib/core/test/testutil.h000066400000000000000000000050521333553357400177610ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "core_general.h" #include "abts.h" #ifndef __APR_TEST_UTIL__ #define __APR_TEST_UTIL__ /* XXX: FIXME - these all should become much more utilitarian * and part of core, itself */ #ifdef WIN32 #ifdef BINPATH #define TESTBINPATH APR_STRINGIFY(BINPATH) "/" #else #define TESTBINPATH "" #endif #else #define TESTBINPATH "./" #endif #ifdef WIN32 #define EXTENSION ".exe" #elif NETWARE #define EXTENSION ".nlm" #else #define EXTENSION #endif #define STRING_MAX 8096 /* Some simple functions to make the test apps easier to write and * a bit more consistent... */ /* Assert that RV is an CORE_OK value; else fail giving strerror * for RV and CONTEXT message. */ void core_assert_ok(abts_case* tc, const char *context, status_t rv, int lineno); #define CORE_ASSERT_OK(tc, ctxt, rv) \ core_assert_ok(tc, ctxt, rv, __LINE__) void test_initialize(void); abts_suite *testds(abts_suite *suite); abts_suite *testfsm(abts_suite *suite); abts_suite *testtlv(abts_suite *suite); abts_suite *testaes(abts_suite *suite); abts_suite *testsha2(abts_suite *suite); abts_suite *testsock(abts_suite *suite); abts_suite *testsctp(abts_suite *suite); abts_suite *testtime(abts_suite *suite); abts_suite *testtimer(abts_suite *suite); abts_suite *testthread(abts_suite *suite); abts_suite *testlock(abts_suite *suite); abts_suite *testatomic(abts_suite *suite); abts_suite *testfile(abts_suite *suite); abts_suite *testfilecopy(abts_suite *suite); abts_suite *testdir(abts_suite *suite); abts_suite *testmsgq(abts_suite *suite); abts_suite *testsleep(abts_suite *suite); abts_suite *testpkbuf(abts_suite *suite); abts_suite *testmisc(abts_suite *suite); abts_suite *testhash(abts_suite *suite); abts_suite *test3gpp(abts_suite *suite); #endif /* CORE_TEST_INCLUDES */ nextepc-0.3.10/lib/fd/000077500000000000000000000000001333553357400144135ustar00rootroot00000000000000nextepc-0.3.10/lib/fd/Makefile.am000066400000000000000000000021351333553357400164500ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in pkglib_LTLIBRARIES = libfd.la libfd_la_SOURCES = \ fd_message.h fd_logger.h fd_lib.h \ libapp_sip.c fd_message.c fd_logger.c fd_config.c fd_init.c \ \ s6a/s6a_dict.h s6a/s6a_message.h \ s6a/dict_init.c \ \ gx/gx_dict.h gx/gx_message.h \ gx/dict_init.c gx/gx_message.c \ \ rx/rx_dict.h rx/rx_message.h \ rx/dict_init.c rx/rx_message.c \ $(NULL) libfd_la_DEPENDENCIES = \ $(top_srcdir)/lib/core/src/libcore.la \ $(top_srcdir)/lib/@FREEDIAMETER_DIR@/libfdcore/libfdcore.la \ $(top_srcdir)/lib/@FREEDIAMETER_DIR@/libfdproto/libfdproto.la \ $(NULL) libfd_la_LIBADD = \ $(top_srcdir)/lib/core/src/libcore.la \ $(top_srcdir)/lib/@FREEDIAMETER_DIR@/libfdcore/libfdcore.la \ $(top_srcdir)/lib/@FREEDIAMETER_DIR@/libfdproto/libfdproto.la \ $(NULL) AM_LDFLAGS = \ -version-info @LIBVERSION@ \ $(NULL) AM_CPPFLAGS = \ -I$(top_srcdir)/lib/core/include \ -I$(top_srcdir)/lib/@FREEDIAMETER_DIR@/include \ $(NULL) AM_CFLAGS = \ -Wall -Werror \ $(NULL) MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump nextepc-0.3.10/lib/fd/fd_config.c000066400000000000000000000131571333553357400165040ustar00rootroot00000000000000#define TRACE_MODULE _fd_config #include "core_debug.h" #include "core_lib.h" #include "core_file.h" #include "fd_lib.h" static status_t fd_config_apply(fd_config_t *fd_config) { struct addrinfo hints, *ai; int ret; int i; d_assert(fd_config->cnf_diamid, return CORE_ERROR,); d_assert(fd_config->cnf_diamrlm, return CORE_ERROR,); d_assert(fd_config->cnf_addr, return CORE_ERROR,); /******************************************************************** * Diameter Server */ fd_g_config->cnf_diamid = (DiamId_t)fd_config->cnf_diamid; fd_os_validate_DiameterIdentity( &fd_g_config->cnf_diamid, &fd_g_config->cnf_diamid_len, 1); fd_g_config->cnf_diamrlm = (DiamId_t)fd_config->cnf_diamrlm; fd_os_validate_DiameterIdentity( &fd_g_config->cnf_diamrlm, &fd_g_config->cnf_diamrlm_len, 1); memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST; ret = getaddrinfo(fd_config->cnf_addr, NULL, &hints, &ai); if (ret) { d_error("getaddrinfo() [%s] failed(%d:%s)", fd_config->cnf_addr, errno, strerror(errno)); return CORE_ERROR; } CHECK_FCT_DO( fd_ep_add_merge( &fd_g_config->cnf_endpoints, ai->ai_addr, ai->ai_addrlen, EP_FL_CONF), return CORE_ERROR ); freeaddrinfo(ai); if (fd_config->cnf_port) fd_g_config->cnf_port = fd_config->cnf_port; if (fd_config->cnf_port_tls) fd_g_config->cnf_port_tls = fd_config->cnf_port_tls; if (fd_config->cnf_flags.no_sctp) fd_g_config->cnf_flags.no_sctp = fd_config->cnf_flags.no_sctp; /******************************************************************** * Diameter Client */ for (i = 0; i < fd_config->num_of_conn; i++) { int disc = 0; struct peer_info fddpi; d_assert(fd_config->conn[i].addr, return CORE_ERROR,); memset(&fddpi, 0, sizeof(fddpi)); fddpi.config.pic_flags.persist = PI_PRST_ALWAYS; fddpi.config.pic_flags.pro3 = PI_P3_IP; fddpi.config.pic_flags.pro4 = PI_P4_TCP; fddpi.config.pic_flags.alg = PI_ALGPREF_TCP; fddpi.config.pic_flags.sec |= PI_SEC_NONE; fddpi.config.pic_port = fd_config->conn[i].port; fddpi.pi_diamid = (DiamId_t)fd_config->conn[i].identity; fd_list_init( &fddpi.pi_endpoints, NULL ); memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_ADDRCONFIG | AI_NUMERICHOST; ret = getaddrinfo(fd_config->conn[i].addr, NULL, &hints, &ai); if (ret) { d_error("getaddrinfo() [%s] failed(%d:%s)", fd_config->conn[i].addr, errno, strerror(errno)); return CORE_ERROR; } CHECK_FCT_DO( fd_ep_add_merge( &fddpi.pi_endpoints, ai->ai_addr, ai->ai_addrlen, EP_FL_CONF | (disc ?: EP_ACCEPTALL) ), return CORE_ERROR); CHECK_FCT_DO( fd_peer_add ( &fddpi, NULL, NULL, NULL ), return CORE_ERROR); freeaddrinfo(ai); } /******************************************************************** * Load Extension */ for (i = 0; i < fd_config->num_of_ext; i++) { char *fname = NULL; char *cfname = NULL; FILE *fd; fname = strdup(fd_config->ext[i].module); d_assert(fname, return CORE_ERROR,); fd = fopen(fname, "r"); if ((fd == NULL) && (*fname != '/')) { char *bkp = fname; fname = malloc(strlen(bkp) + strlen(DEFAULT_EXTENSIONS_PATH) + 2); d_assert(fname, return CORE_ERROR,); sprintf(fname, DEFAULT_EXTENSIONS_PATH "/%s", bkp); fd = fopen(fname, "r"); if (fd == NULL) { free(fname); fname = bkp; } else { free(bkp); } } if (fd) fclose(fd); cfname = (char *)fd_config->ext[i].conf; if (cfname) { cfname = strdup(fd_config->ext[i].conf); d_assert(cfname, return CORE_ERROR,); fd = fopen(cfname, "r"); if ((fd == NULL) && (*cfname != '/')) { char *test = NULL; test = malloc( strlen(cfname) + strlen(DEFAULT_CONF_PATH) + 2); d_assert(test, return CORE_ERROR,); sprintf(test, DEFAULT_CONF_PATH "/%s", cfname); fd = fopen(test, "r"); if (fd) { free(cfname); cfname=test; } else { free(test); } } if (fd) fclose(fd); } extern int fd_ext_add( char * filename, char * conffile ); CHECK_FCT_DO( fd_ext_add( fname, cfname ), return CORE_ERROR ); } return CORE_OK; } status_t fd_config_init(fd_config_t *fd_config) { char * buf = NULL, *b; size_t len = 0; CHECK_FCT( fd_config_apply(fd_config) ); /* The following module use data from the configuration */ int fd_rtdisp_init(void); CHECK_FCT( fd_rtdisp_init() ); /* Now, load all dynamic extensions */ int fd_ext_load(); CHECK_FCT( fd_ext_load() ); /* Display configuration */ b = fd_conf_dump(&buf, &len, NULL); LOG_SPLIT(FD_LOG_NOTICE, NULL, b ?: "", NULL); free(buf); /* Since some extensions might have modified the definitions from the dict_base_protocol, we only load the objects now */ int fd_msg_init(void); CHECK_FCT( fd_msg_init() ); return CORE_OK; } nextepc-0.3.10/lib/fd/fd_init.c000066400000000000000000000071331333553357400161770ustar00rootroot00000000000000#define TRACE_MODULE _fd_init #include "core_debug.h" #include "core_param.h" #include "core_signal.h" #include "core_semaphore.h" #include "fd_logger.h" #include "fd_lib.h" static void fd_gnutls_log_func(int level, const char *str); static void fd_log_func(int printlevel, const char *format, va_list ap); int fd_init(int mode, const char *conffile, fd_config_t *fd_config) { int ret; fd_g_debug_lvl = FD_LOG_ERROR; if (g_trace_mask) { if (TRACE_MODULE >= 25) gnutls_global_set_log_level(TRACE_MODULE-24); if (TRACE_MODULE >= 25 && TRACE_MODULE < 27) fd_g_debug_lvl = FD_LOG_NOTICE; else if (TRACE_MODULE >= 27 && TRACE_MODULE < 29) fd_g_debug_lvl = FD_LOG_DEBUG; else if (TRACE_MODULE >= 29) fd_g_debug_lvl = FD_LOG_ANNOYING; } gnutls_global_set_log_function(fd_gnutls_log_func); ret = fd_log_handler_register(fd_log_func); if (ret != 0) { d_error("fd_log_handler_register() failed"); return ret; } ret = fd_core_initialize(); if (ret != 0) { d_error("fd_core_initialize() failed"); return ret; } /* Parse the configuration file */ if (conffile) { CHECK_FCT_DO( fd_core_parseconf(conffile), goto error ); } else { CHECK_FCT_DO( fd_config_init(fd_config), goto error ); } /* Initialize FD Message */ CHECK_FCT( fd_message_init() ); /* Initialize FD logger */ CHECK_FCT_DO( fd_logger_init(mode), goto error ); /* Start the servers */ CHECK_FCT_DO( fd_core_start(), goto error ); CHECK_FCT_DO( fd_core_waitstartcomplete(), goto error ); CHECK_FCT( fd_logger_stats_start() ); return 0; error: CHECK_FCT_DO( fd_core_shutdown(), ); CHECK_FCT_DO( fd_core_wait_shutdown_complete(), ); return -1; } void fd_final() { fd_logger_final(); CHECK_FCT_DO( fd_core_shutdown(), d_error("fd_core_shutdown() failed") ); CHECK_FCT_DO( fd_core_wait_shutdown_complete(), d_error("fd_core_wait_shutdown_complete() failed")); } static void fd_gnutls_log_func(int level, const char *str) { d_trace(25-level, "gnutls[%d]: %s", level, str); } static void fd_log_func(int printlevel, const char *format, va_list ap) { char buffer[HUGE_STRING_LEN]; int ret = 0; ret = vsnprintf(buffer, HUGE_STRING_LEN, format, ap); if (ret < 0 || ret > HUGE_STRING_LEN) { d_error("vsnprintf() failed"); return; } switch(printlevel) { case FD_LOG_ANNOYING: d_trace(29, "freeDiameter[%d]: %s\n", printlevel, buffer); break; case FD_LOG_DEBUG: d_trace(27, "freeDiameter[%d]: %s\n", printlevel, buffer); break; case FD_LOG_NOTICE: d_trace(25, "freeDiameter[%d]: %s\n", printlevel, buffer); break; case FD_LOG_ERROR: d_error("%s", buffer); if (!strcmp(buffer, " - The certificate is expired.")) { d_error("You can renew CERT as follows:"); d_error("./support/freeDiameter/make_certs.sh " "./install/etc/nextepc/freeDiameter"); } break; case FD_LOG_FATAL: { char *except = "Initiating freeDiameter shutdown sequence"; if (strncmp(buffer, except, strlen(except)) == 0) d_trace(1, "freeDiameter[%d]: %s\n", printlevel, buffer); else d_fatal("%s", buffer); } break; default: d_warn("%s", buffer); break; } } nextepc-0.3.10/lib/fd/fd_lib.h000066400000000000000000000034661333553357400160140ustar00rootroot00000000000000#ifndef __FD_LIB_H__ #define __FD_LIB_H__ #include "core_errno.h" #include "freeDiameter/freeDiameter-host.h" #include "freeDiameter/libfdcore.h" #include "fd_message.h" #include "fd_logger.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* This is default diameter configuration if there is no config file * The Configuration : No TLS, Only TCP */ typedef struct _fd_config_t { /* Diameter Identity of the local peer (FQDN -- ASCII) */ const char *cnf_diamid; /* Diameter realm of the local peer, default to realm part of cnf_diamid */ const char *cnf_diamrlm; /* IP address of the local peer */ const char *cnf_addr; /* the local port for legacy Diameter (default: 3868) in host byte order */ c_uint16_t cnf_port; /* the local port for Diameter/TLS (default: 5658) in host byte order */ c_uint16_t cnf_port_tls; struct { unsigned no_sctp: 1; /* disable the use of SCTP */ } cnf_flags; #define MAX_NUM_OF_FD_EXTENSION 32 struct { const char *module; const char *conf; } ext[MAX_NUM_OF_FD_EXTENSION]; int num_of_ext; #define MAX_NUM_OF_FD_CONN 16 /* (supposedly) UTF-8, \0 terminated. * The Diameter Identity of the remote peer. */ struct { const char *identity; const char *addr; /* IP address of the remote peer */ c_uint16_t port; /* port to connect to. 0: default. */ } conn[MAX_NUM_OF_FD_CONN]; int num_of_conn; } fd_config_t; CORE_DECLARE(int) fd_init( int mode, const char *conffile, fd_config_t *fd_config); CORE_DECLARE(void) fd_final(void); CORE_DECLARE(int) fd_config_init(fd_config_t *fd_config); int fd_avp_search_avp ( struct avp * groupedavp, struct dict_object * what, struct avp ** avp ); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* ! __FD_LIB_H__ */ nextepc-0.3.10/lib/fd/fd_logger.c000066400000000000000000000105111333553357400165050ustar00rootroot00000000000000#define TRACE_MODULE _fd_logger #include "core_debug.h" #include "fd_logger.h" static struct fd_logger_t self; static struct fd_hook_hdl *logger_hdl = NULL; static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; static pthread_t fd_stats_th = (pthread_t)NULL; static fd_logger_user_handler user_handler = NULL; static void fd_logger_cb(enum fd_hook_type type, struct msg * msg, struct peer_hdr * peer, void * other, struct fd_hook_permsgdata *pmd, void * regdata); static void * fd_stats_worker(void * arg); int fd_logger_init(int mode) { uint32_t mask_peers = HOOK_MASK( HOOK_PEER_CONNECT_SUCCESS ); memset(&self, 0, sizeof(struct fd_logger_t)); self.mode = mode; self.duration = 60; /* 60 seconds */ CHECK_FCT( fd_hook_register( mask_peers, fd_logger_cb, NULL, NULL, &logger_hdl) ); CHECK_POSIX( pthread_mutex_init(&self.stats_lock, NULL) ); return 0; } void fd_logger_final() { CHECK_FCT_DO( fd_thr_term(&fd_stats_th), ); CHECK_POSIX_DO( pthread_mutex_destroy(&self.stats_lock), ); if (logger_hdl) { CHECK_FCT_DO( fd_hook_unregister( logger_hdl ), ); } } struct fd_logger_t* fd_logger_self() { return &self; } int fd_logger_stats_start() { /* Start the statistics thread */ CHECK_POSIX( pthread_create(&fd_stats_th, NULL, fd_stats_worker, NULL) ); return 0; } void fd_logger_register(fd_logger_user_handler instance) { user_handler = instance; } void fd_logger_unregister(void) { user_handler = NULL; } /* The callback called when messages are received and sent */ static void fd_logger_cb(enum fd_hook_type type, struct msg * msg, struct peer_hdr * peer, void * other, struct fd_hook_permsgdata *pmd, void * regdata) { char * peer_name = peer ? peer->info.pi_diamid : ""; CHECK_POSIX_DO( pthread_mutex_lock(&mtx), ); if (user_handler) { user_handler(type, msg, peer, other, pmd, regdata); } switch (type) { /* peers */ case HOOK_PEER_CONNECT_SUCCESS: { char protobuf[40]; if (peer) { CHECK_FCT_DO(fd_peer_cnx_proto_info(peer, protobuf, sizeof(protobuf)), break ); } else { protobuf[0] = '-'; protobuf[1] = '\0'; } d_info("CONNECTED TO '%s' (%s):", peer_name, protobuf); } break; default: d_warn("Unknown type(%d)", type); break; } CHECK_POSIX_DO( pthread_mutex_unlock(&mtx), ); } /* Function to display statistics periodically */ static void * fd_stats_worker(void * arg) { struct timespec start, now; struct fd_stats copy; /* Get the start time */ CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &start), ); /* Now, loop until canceled */ while (1) { /* Display statistics every XX seconds */ sleep(self.duration); /* Now, get the current stats */ CHECK_POSIX_DO( pthread_mutex_lock(&self.stats_lock), ); memcpy(©, &self.stats, sizeof(struct fd_stats)); CHECK_POSIX_DO( pthread_mutex_unlock(&self.stats_lock), ); /* Get the current execution time */ CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &now), ); /* Now, display everything */ d_trace(15, "------- fd statistics ---------\n"); if (now.tv_nsec >= start.tv_nsec) { d_trace(15, " Executing for: %d.%06ld sec\n", (int)(now.tv_sec - start.tv_sec), (long)(now.tv_nsec - start.tv_nsec) / 1000); } else { d_trace(15, " Executing for: %d.%06ld sec\n", (int)(now.tv_sec - 1 - start.tv_sec), (long)(now.tv_nsec + 1000000000 - start.tv_nsec) / 1000); } if (self.mode & FD_MODE_SERVER) { d_trace(15, " Server: %llu message(s) echoed\n", copy.nb_echoed); } if (self.mode & FD_MODE_CLIENT) { d_trace(15, " Client:\n"); d_trace(15, " %llu message(s) sent\n", copy.nb_sent); d_trace(15, " %llu error(s) received\n", copy.nb_errs); d_trace(15, " %llu answer(s) received\n", copy.nb_recv); d_trace(15, " fastest: %ld.%06ld sec.\n", copy.shortest / 1000000, copy.shortest % 1000000); d_trace(15, " slowest: %ld.%06ld sec.\n", copy.longest / 1000000, copy.longest % 1000000); d_trace(15, " Average: %ld.%06ld sec.\n", copy.avg / 1000000, copy.avg % 1000000); } d_trace(15, "-------------------------------------\n"); } return NULL; /* never called */ } nextepc-0.3.10/lib/fd/fd_logger.h000066400000000000000000000026431333553357400165210ustar00rootroot00000000000000#ifndef __FD_LOGGER_H__ #define __FD_LOGGER_H__ #include "core_errno.h" #include "freeDiameter/freeDiameter-host.h" #include "freeDiameter/libfdcore.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ struct fd_logger_t { #define FD_MODE_SERVER 0x1 #define FD_MODE_CLIENT 0x2 int mode; /* default FD_MODE_SERVER | FD_MODE_CLIENT */ int duration; /* default 10 */ struct fd_stats { unsigned long long nb_echoed; /* server */ unsigned long long nb_sent; /* client */ unsigned long long nb_recv; /* client */ unsigned long long nb_errs; /* client */ unsigned long shortest; /* fastest answer, in microseconds */ unsigned long longest; /* slowest answer, in microseconds */ unsigned long avg; /* average answer time, in microseconds */ } stats; pthread_mutex_t stats_lock; }; CORE_DECLARE(int) fd_logger_init(int mode); CORE_DECLARE(void) fd_logger_final(); CORE_DECLARE(struct fd_logger_t*) fd_logger_self(); CORE_DECLARE(int) fd_logger_stats_start(); typedef void (*fd_logger_user_handler)( enum fd_hook_type type, struct msg *msg, struct peer_hdr *peer, void *other, struct fd_hook_permsgdata *pmd, void *regdata); CORE_DECLARE(void) fd_logger_register(fd_logger_user_handler instance); CORE_DECLARE(void) fd_logger_unregister(); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* ! __FD_LOGGER_H__ */ nextepc-0.3.10/lib/fd/fd_message.c000066400000000000000000000120711333553357400166550ustar00rootroot00000000000000#define TRACE_MODULE _fd_message #include "fd_message.h" #define CHECK_dict_search( _type, _criteria, _what, _result ) \ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); #define FD_3GPP_VENDOR_ID 10415 struct dict_object *fd_session_id = NULL; struct dict_object *fd_origin_host = NULL; struct dict_object *fd_origin_realm = NULL; struct dict_object *fd_destination_host = NULL; struct dict_object *fd_destination_realm = NULL; struct dict_object *fd_user_name = NULL; struct dict_object *fd_auth_session_state = NULL; struct dict_object *fd_auth_application_id = NULL; struct dict_object *fd_auth_request_type = NULL; struct dict_object *fd_re_auth_request_type = NULL; struct dict_object *fd_result_code = NULL; struct dict_object *fd_experimental_result = NULL; struct dict_object *fd_experimental_result_code = NULL; struct dict_object *fd_vendor_specific_application_id = NULL; struct dict_object *fd_mip6_agent_info = NULL; struct dict_object *fd_mip_home_agent_address = NULL; struct dict_object *fd_vendor = NULL; struct dict_object *fd_vendor_id = NULL; int fd_message_init() { vendor_id_t id = FD_3GPP_VENDOR_ID; CHECK_dict_search( DICT_VENDOR, VENDOR_BY_ID, (void *)&id, &fd_vendor); CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Vendor-Id", &fd_vendor_id); CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Session-Id", &fd_session_id); CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Origin-Host", &fd_origin_host); CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Origin-Realm", &fd_origin_realm); CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Destination-Host", &fd_destination_host); CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Destination-Realm", &fd_destination_realm); CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "User-Name", &fd_user_name); CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Auth-Session-State", &fd_auth_session_state); CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Auth-Application-Id", &fd_auth_application_id); CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Auth-Request-Type", &fd_auth_request_type); CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Re-Auth-Request-Type", &fd_re_auth_request_type); CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Result-Code", &fd_result_code); CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Experimental-Result", &fd_experimental_result); CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Experimental-Result-Code", &fd_experimental_result_code); CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "Vendor-Specific-Application-Id", &fd_vendor_specific_application_id); CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "MIP6-Agent-Info", &fd_mip6_agent_info); CHECK_dict_search( DICT_AVP, AVP_BY_NAME, "MIP-Home-Agent-Address", &fd_mip_home_agent_address); return 0; } int fd_message_session_id_set( struct msg *msg, c_uint8_t *sid, size_t sidlen) { struct avp *avp; union avp_value val; /* Create an AVP to hold it */ CHECK_FCT( fd_msg_avp_new( fd_session_id, 0, &avp ) ); /* Set its value */ memset(&val, 0, sizeof(val)); val.os.data = sid; val.os.len = sidlen; CHECK_FCT( fd_msg_avp_setvalue( avp, &val ) ); /* Add it to the message */ CHECK_FCT( fd_msg_avp_add( msg, MSG_BRW_FIRST_CHILD, avp ) ); return 0; } int fd_message_experimental_rescode_set( struct msg *msg, c_uint32_t result_code) { struct avp *avp; struct avp *avp_vendor; struct avp *avp_experimental_result_code; union avp_value value; CHECK_FCT( fd_msg_avp_new(fd_experimental_result, 0, &avp) ); CHECK_FCT( fd_msg_avp_new(fd_vendor_id, 0, &avp_vendor) ); value.u32 = FD_3GPP_VENDOR_ID; CHECK_FCT( fd_msg_avp_setvalue(avp_vendor, &value) ); CHECK_FCT( fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, avp_vendor) ); CHECK_FCT( fd_msg_avp_new( fd_experimental_result_code, 0, &avp_experimental_result_code) ); value.u32 = result_code; CHECK_FCT( fd_msg_avp_setvalue(avp_experimental_result_code, &value) ); CHECK_FCT( fd_msg_avp_add( avp, MSG_BRW_LAST_CHILD, avp_experimental_result_code) ); CHECK_FCT( fd_msg_avp_add(msg, MSG_BRW_LAST_CHILD, avp) ); CHECK_FCT( fd_msg_add_origin(msg, 0) ); return 0; } int fd_message_vendor_specific_appid_set(struct msg *msg, c_uint32_t app_id) { struct avp *avp; struct avp *avp_vendor; struct avp *avp_vendor_specific_application_id; union avp_value value; CHECK_FCT( fd_msg_avp_new(fd_vendor_specific_application_id, 0, &avp) ); CHECK_FCT( fd_msg_avp_new(fd_vendor_id, 0, &avp_vendor) ); value.u32 = FD_3GPP_VENDOR_ID; CHECK_FCT( fd_msg_avp_setvalue(avp_vendor, &value) ); CHECK_FCT( fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, avp_vendor) ); CHECK_FCT( fd_msg_avp_new( fd_auth_application_id, 0, &avp_vendor_specific_application_id) ); value.u32 = app_id; CHECK_FCT( fd_msg_avp_setvalue(avp_vendor_specific_application_id, &value) ); CHECK_FCT( fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, avp_vendor_specific_application_id) ); CHECK_FCT( fd_msg_avp_add(msg, MSG_BRW_LAST_CHILD, avp) ); return 0; } nextepc-0.3.10/lib/fd/fd_message.h000066400000000000000000000045651333553357400166730ustar00rootroot00000000000000#ifndef __FD_MESSAGE_H__ #define __FD_MESSAGE_H__ #include "core_errno.h" #include "freeDiameter/freeDiameter-host.h" #include "freeDiameter/libfdcore.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define FD_AVP_CODE_FRAME_IP_ADDRESS 8 #define FD_AVP_CODE_FRAME_IPV6_PREFIX 97 /* Result-Code AVP */ #define FD_DIAMETER_UNKNOWN_PEER 3010 #define FD_DIAMETER_AVP_UNSUPPORTED 5001 #define FD_DIAMETER_UNKNOWN_SESSION_ID 5002 #define FD_DIAMETER_AUTHORIZATION_REJECTED 5003 #define FD_DIAMETER_MISSING_AVP 5004 #define FD_DIAMETER_INVALID_AVP_VALUE 5005 extern struct dict_object *fd_session_id; extern struct dict_object *fd_origin_host; extern struct dict_object *fd_origin_realm; extern struct dict_object *fd_destination_host; extern struct dict_object *fd_destination_realm; extern struct dict_object *fd_user_name; #define FD_AUTH_SESSION_STATE_MAINTAINED 0 #define FD_AUTH_SESSION_NO_STATE_MAINTAINED 1 extern struct dict_object *fd_auth_session_state; extern struct dict_object *fd_auth_application_id; #define FD_AUTH_REQUEST_TYPE_AUTHENTICATE_ONLY 1 #define FD_AUTH_REQUEST_TYPE_AUTHORIZE_ONLY 2 #define FD_AUTH_REQUEST_TYPE_AUTHORIZE_AUTHENTICATE 3 extern struct dict_object *fd_auth_request_type; #define FD_RE_AUTH_REQUEST_TYPE_AUTHORIZE_ONLY 0 #define FD_RE_AUTH_REQUEST_TYPE_AUTHORIZE_AUTHENTICATE 1 extern struct dict_object *fd_re_auth_request_type; extern struct dict_object *fd_result_code; extern struct dict_object *fd_experimental_result; extern struct dict_object *fd_experimental_result_code; extern struct dict_object *fd_vendor_specific_application_id; extern struct dict_object *fd_mip6_agent_info; extern struct dict_object *fd_mip_home_agent_address; extern struct dict_object *fd_vendor; extern struct dict_object *fd_vendor_id; CORE_DECLARE(int) fd_message_init(void); CORE_DECLARE(int) fd_message_session_id_set( struct msg *msg, c_uint8_t *sid, size_t sidlen); CORE_DECLARE(int) fd_message_experimental_rescode_set( struct msg *msg, c_uint32_t result_code); CORE_DECLARE(int) fd_message_vendor_specific_appid_set( struct msg *msg, c_uint32_t app_id); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* ! __FD_MESSAGE_H__ */ nextepc-0.3.10/lib/fd/gx/000077500000000000000000000000001333553357400150315ustar00rootroot00000000000000nextepc-0.3.10/lib/fd/gx/dict_init.c000066400000000000000000000216071333553357400171510ustar00rootroot00000000000000#define TRACE_MODULE _gx_dict #include "gx_dict.h" #define CHECK_dict_search( _type, _criteria, _what, _result ) \ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); struct dict_object *gx_application = NULL; struct dict_object *gx_cmd_ccr = NULL; struct dict_object *gx_cmd_cca = NULL; struct dict_object *gx_cmd_rar = NULL; struct dict_object *gx_cmd_raa = NULL; struct dict_object *gx_cc_request_type = NULL; struct dict_object *gx_cc_request_number = NULL; struct dict_object *gx_network_request_support = NULL; struct dict_object *gx_subscription_id = NULL; struct dict_object *gx_subscription_id_type = NULL; struct dict_object *gx_subscription_id_data = NULL; struct dict_object *gx_supported_features = NULL; struct dict_object *gx_feature_list_id = NULL; struct dict_object *gx_feature_list = NULL; struct dict_object *gx_framed_ip_address = NULL; struct dict_object *gx_framed_ipv6_prefix = NULL; struct dict_object *gx_ip_can_type = NULL; struct dict_object *gx_rat_type = NULL; struct dict_object *gx_qos_information = NULL; struct dict_object *gx_qos_class_identifier = NULL; struct dict_object *gx_max_requested_bandwidth_ul = NULL; struct dict_object *gx_max_requested_bandwidth_dl = NULL; struct dict_object *gx_min_requested_bandwidth_ul = NULL; struct dict_object *gx_min_requested_bandwidth_dl = NULL; struct dict_object *gx_guaranteed_bitrate_ul = NULL; struct dict_object *gx_guaranteed_bitrate_dl = NULL; struct dict_object *gx_allocation_retention_priority = NULL; struct dict_object *gx_priority_level = NULL; struct dict_object *gx_pre_emption_capability = NULL; struct dict_object *gx_pre_emption_vulnerability = NULL; struct dict_object *gx_apn_aggregate_max_bitrate_ul = NULL; struct dict_object *gx_apn_aggregate_max_bitrate_dl = NULL; struct dict_object *gx_3gpp_user_location_info = NULL; struct dict_object *gx_called_station_id = NULL; struct dict_object *gx_default_eps_bearer_qos = NULL; struct dict_object *gx_3gpp_ms_timezone = NULL; struct dict_object *gx_event_trigger = NULL; struct dict_object *gx_bearer_control_mode = NULL; struct dict_object *gx_charging_rule_install = NULL; struct dict_object *gx_charging_rule_remove = NULL; struct dict_object *gx_charging_rule_definition = NULL; struct dict_object *gx_charging_rule_base_name = NULL; struct dict_object *gx_charging_rule_name = NULL; struct dict_object *gx_flow_information = NULL; struct dict_object *gx_flow_direction = NULL; struct dict_object *gx_flow_description = NULL; struct dict_object *gx_flow_status = NULL; struct dict_object *gx_precedence = NULL; struct dict_object *gx_flows = NULL; struct dict_object *gx_media_component_description = NULL; struct dict_object *gx_media_component_number = NULL; struct dict_object *gx_media_type = NULL; struct dict_object *gx_rr_bandwidth = NULL; struct dict_object *gx_rs_bandwidth = NULL; struct dict_object *gx_codec_data = NULL; struct dict_object *gx_media_sub_component = NULL; struct dict_object *gx_flow_number = NULL; struct dict_object *gx_flow_usage = NULL; int gx_dict_init(void) { application_id_t id = GX_APPLICATION_ID; CHECK_dict_search(DICT_APPLICATION, APPLICATION_BY_ID, (void *)&id, &gx_application); CHECK_dict_search(DICT_COMMAND, CMD_BY_NAME, "Credit-Control-Request", &gx_cmd_ccr); CHECK_dict_search(DICT_COMMAND, CMD_BY_NAME, "Credit-Control-Answer", &gx_cmd_cca); CHECK_dict_search(DICT_COMMAND, CMD_BY_NAME, "Re-Auth-Request", &gx_cmd_rar); CHECK_dict_search(DICT_COMMAND, CMD_BY_NAME, "Re-Auth-Answer", &gx_cmd_raa); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "CC-Request-Type", &gx_cc_request_type); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "CC-Request-Number", &gx_cc_request_number); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Network-Request-Support", &gx_network_request_support); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Subscription-Id", &gx_subscription_id); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Subscription-Id-Type", &gx_subscription_id_type); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Subscription-Id-Data", &gx_subscription_id_data); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Supported-Features", &gx_supported_features); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Feature-List-ID", &gx_feature_list_id); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Feature-List", &gx_feature_list); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Framed-IP-Address", &gx_framed_ip_address); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Framed-IPv6-Prefix", &gx_framed_ipv6_prefix); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "IP-CAN-Type", &gx_ip_can_type); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "RAT-Type", &gx_rat_type); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "QoS-Information", &gx_qos_information); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "QoS-Class-Identifier" , &gx_qos_class_identifier); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Max-Requested-Bandwidth-UL" , &gx_max_requested_bandwidth_ul); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Max-Requested-Bandwidth-DL" , &gx_max_requested_bandwidth_dl); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Min-Requested-Bandwidth-UL" , &gx_min_requested_bandwidth_ul); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Min-Requested-Bandwidth-DL" , &gx_min_requested_bandwidth_dl); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Guaranteed-Bitrate-UL" , &gx_guaranteed_bitrate_ul); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Guaranteed-Bitrate-DL" , &gx_guaranteed_bitrate_dl); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Allocation-Retention-Priority" , &gx_allocation_retention_priority); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Priority-Level", &gx_priority_level); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Pre-emption-Capability", &gx_pre_emption_capability); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Pre-emption-Vulnerability", &gx_pre_emption_vulnerability); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "APN-Aggregate-Max-Bitrate-UL" , &gx_apn_aggregate_max_bitrate_ul); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "APN-Aggregate-Max-Bitrate-DL" , &gx_apn_aggregate_max_bitrate_dl); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "3GPP-User-Location-Info", &gx_3gpp_user_location_info); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Called-Station-Id", &gx_called_station_id); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Default-EPS-Bearer-QoS", &gx_default_eps_bearer_qos); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "3GPP-MS-TimeZone", &gx_3gpp_ms_timezone); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Event-Trigger", &gx_event_trigger); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Bearer-Control-Mode", &gx_bearer_control_mode); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Charging-Rule-Install", &gx_charging_rule_install); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Charging-Rule-Remove", &gx_charging_rule_remove); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Charging-Rule-Definition", &gx_charging_rule_definition); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Charging-Rule-Base-Name", &gx_charging_rule_base_name); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Charging-Rule-Name", &gx_charging_rule_name); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Flow-Information", &gx_flow_information); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Flow-Direction", &gx_flow_direction); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Flow-Description", &gx_flow_description); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Flow-Status", &gx_flow_status); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Precedence", &gx_precedence); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Flows", &gx_flows); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Media-Component-Description", &gx_media_component_description); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Media-Component-Number", &gx_media_component_number); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Media-Type", &gx_media_type); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "RR-Bandwidth" , &gx_rr_bandwidth); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "RS-Bandwidth" , &gx_rs_bandwidth); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Codec-Data", &gx_codec_data); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Media-Sub-Component", &gx_media_sub_component); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Flow-Number", &gx_flow_number); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Flow-Usage", &gx_flow_usage); return 0; } nextepc-0.3.10/lib/fd/gx/gx_dict.h000066400000000000000000000114771333553357400166350ustar00rootroot00000000000000#ifndef __GX_DICT_H__ #define __GX_DICT_H__ #include "freeDiameter/freeDiameter-host.h" #include "freeDiameter/libfdcore.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define GX_APPLICATION_ID 16777238 #define GX_AVP_CODE_RE_AUTH_REQUEST_TYPE (285) #define GX_AVP_CODE_CC_REQUEST_NUMBER (415) #define GX_AVP_CODE_CC_REQUEST_TYPE (416) #define GX_AVP_CODE_DEFAULT_EPS_BEARER_QOS (1049) #define GX_AVP_CODE_SUPPORTED_FEATURES (628) #define GX_AVP_CODE_CHARGING_RULE_INSTALL (1001) #define GX_AVP_CODE_CHARGING_RULE_REMOVE (1002) #define GX_AVP_CODE_CHARGING_RULE_DEFINITION (1003) #define GX_AVP_CODE_CHARGING_RULE_NAME (1005) #define GX_AVP_CODE_FLOW_INFORMATION (1058) #define GX_AVP_CODE_FLOW_STATUS (511) #define GX_AVP_CODE_QOS_INFORMATION (1016) #define GX_AVP_CODE_PRECEDENCE (1010) extern struct dict_object *gx_application; extern struct dict_object *gx_cmd_ccr; extern struct dict_object *gx_cmd_cca; extern struct dict_object *gx_cmd_rar; extern struct dict_object *gx_cmd_raa; extern struct dict_object *gx_cc_request_type; extern struct dict_object *gx_cc_request_number; extern struct dict_object *gx_network_request_support; extern struct dict_object *gx_subscription_id; #define GX_SUBSCRIPTION_ID_TYPE_END_USER_E164 0 #define GX_SUBSCRIPTION_ID_TYPE_END_USER_IMSI 1 #define GX_SUBSCRIPTION_ID_TYPE_END_USER_SIP_URI 2 #define GX_SUBSCRIPTION_ID_TYPE_END_USER_NAI 3 extern struct dict_object *gx_subscription_id_type; extern struct dict_object *gx_subscription_id_data; extern struct dict_object *gx_supported_features; extern struct dict_object *gx_feature_list_id; extern struct dict_object *gx_feature_list; extern struct dict_object *gx_framed_ip_address; extern struct dict_object *gx_framed_ipv6_prefix; #define GX_IP_CAN_TYPE_3GPP_GPRS 0 #define GX_IP_CAN_TYPE_DOCSIS 1 #define GX_IP_CAN_TYPE_xDSL 2 #define GX_IP_CAN_TYPE_WiMAX 3 #define GX_IP_CAN_TYPE_3GPP2 4 #define GX_IP_CAN_TYPE_3GPP_EPS 5 #define GX_IP_CAN_TYPE_Non_3GPP_EPS 6 extern struct dict_object *gx_ip_can_type; #define GX_RAT_TYPE_WLAN 0 #define GX_RAT_TYPE_VIRTUAL 1 #define GX_RAT_TYPE_UTRAN 1000 #define GX_RAT_TYPE_GERAN 1001 #define GX_RAT_TYPE_GAN 1002 #define GX_RAT_TYPE_HSPA_EVOLUTION 1003 #define GX_RAT_TYPE_EUTRAN 1004 #define GX_RAT_TYPE_EUTRAN_NB_IoT 1005 #define GX_RAT_TYPE_CDMA2000_1X 2000 #define GX_RAT_TYPE_HRPD 2001 #define GX_RAT_TYPE_UMB 2002 #define GX_RAT_TYPE_EHRPD 2003 extern struct dict_object *gx_rat_type; extern struct dict_object *gx_qos_information; extern struct dict_object *gx_qos_class_identifier; extern struct dict_object *gx_max_requested_bandwidth_ul; extern struct dict_object *gx_max_requested_bandwidth_dl; extern struct dict_object *gx_guaranteed_bitrate_ul; extern struct dict_object *gx_guaranteed_bitrate_dl; extern struct dict_object *gx_allocation_retention_priority; extern struct dict_object *gx_priority_level; extern struct dict_object *gx_pre_emption_capability; extern struct dict_object *gx_pre_emption_vulnerability; extern struct dict_object *gx_apn_aggregate_max_bitrate_ul; extern struct dict_object *gx_apn_aggregate_max_bitrate_dl; #define GX_3GPP_USER_LOCATION_INFO_TYPE_TAI_AND_ECGI 130 extern struct dict_object *gx_3gpp_user_location_info; extern struct dict_object *gx_called_station_id; extern struct dict_object *gx_default_eps_bearer_qos; extern struct dict_object *gx_3gpp_ms_timezone; extern struct dict_object *gx_event_trigger; extern struct dict_object *gx_bearer_control_mode; extern struct dict_object *gx_charging_rule_install; extern struct dict_object *gx_charging_rule_remove; extern struct dict_object *gx_charging_rule_definition; extern struct dict_object *gx_charging_rule_base_name; extern struct dict_object *gx_charging_rule_name; extern struct dict_object *gx_flow_information; extern struct dict_object *gx_flow_direction; extern struct dict_object *gx_flow_description; extern struct dict_object *gx_flow_status; extern struct dict_object *gx_precedence; extern struct dict_object *gx_flows; extern struct dict_object *gx_media_component_description; extern struct dict_object *gx_media_component_number; extern struct dict_object *gx_media_type; extern struct dict_object *gx_rr_bandwidth; extern struct dict_object *gx_rs_bandwidth; extern struct dict_object *gx_codec_data; extern struct dict_object *gx_media_sub_component; extern struct dict_object *gx_flow_number; extern struct dict_object *gx_flow_usage; int gx_dict_init(void); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GX_DICT_H__ */ nextepc-0.3.10/lib/fd/gx/gx_message.c000066400000000000000000000005021333553357400173140ustar00rootroot00000000000000#define TRACE_MODULE _gx_message #include "core_debug.h" #include "core_pkbuf.h" #include "gx_message.h" void gx_message_free(gx_message_t *gx_message) { int i; d_assert(gx_message, return,); for (i = 0; i < gx_message->num_of_pcc_rule; i++) { PCC_RULE_FREE(&gx_message->pcc_rule[i]); } } nextepc-0.3.10/lib/fd/gx/gx_message.h000066400000000000000000000030241333553357400173230ustar00rootroot00000000000000#ifndef __GX_MESSAGE_H__ #define __GX_MESSAGE_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "3gpp_types.h" typedef struct _gx_message_t { #define GX_CMD_CODE_CREDIT_CONTROL 272 #define GX_CMD_RE_AUTH 258 c_uint16_t cmd_code; /* Experimental-Result-Codes */ #define GX_DIAMETER_ERROR_LATE_OVERLAPPING_REQUEST 5453 #define GX_DIAMETER_ERROR_TIMED_OUT_REQUEST 5454 #define GX_DIAMETER_ERROR_INITIAL_PARAMETERS 5140 #define GX_DIAMETER_ERROR_TRIGGER_EVENT 5141 #define GX_DIAMETER_PCC_RULE_EVENT 5142 #define GX_DIAMETER_ERROR_BEARER_NOT_AUTHORIZED 5143 #define GX_DIAMETER_ERROR_TRAFFIC_MAPPING_INFO_REJECTED 5144 #define GX_DIAMETER_ERROR_CONFLICTING_REQUEST 5147 #define GX_DIAMETER_ADC_RULE_EVENT 5148 #define GX_DIAMETER_ERROR_NBIFOM_NOT_AUTHORIZED 5149 c_uint32_t result_code; #define GX_CC_REQUEST_TYPE_INITIAL_REQUEST 1 #define GX_CC_REQUEST_TYPE_UPDATE_REQUEST 2 #define GX_CC_REQUEST_TYPE_TERMINATION_REQUEST 3 #define GX_CC_REQUEST_TYPE_EVENT_REQUEST 4 c_uint32_t cc_request_type; pdn_t pdn; pcc_rule_t pcc_rule[MAX_NUM_OF_PCC_RULE]; int num_of_pcc_rule; } gx_message_t; CORE_DECLARE(void) gx_message_free(gx_message_t *gx_message); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GX_MESSAGE_H__ */ nextepc-0.3.10/lib/fd/libapp_sip.c000066400000000000000000000071111333553357400167010ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ #include "freeDiameter/freeDiameter-host.h" #include "freeDiameter/libfdcore.h" /* Search a given AVP model in an AVP (extracted from libfreediameter/message.c ) */ int fd_avp_search_avp ( struct avp * groupedavp, struct dict_object * what, struct avp ** avp ) { struct avp * nextavp; struct avp_hdr * nextavphdr; struct dict_avp_data dictdata; TRACE_ENTRY("%p %p %p", groupedavp, what, avp); CHECK_FCT( fd_dict_getval(what, &dictdata) ); // Loop only in the group AVP CHECK_FCT( fd_msg_browse(groupedavp, MSG_BRW_FIRST_CHILD, (void *)&nextavp, NULL) ); CHECK_FCT( fd_msg_avp_hdr( nextavp, &nextavphdr ) ); while (nextavphdr) { if ( (nextavphdr->avp_code == dictdata.avp_code) && (nextavphdr->avp_vendor == dictdata.avp_vendor) ) // always 0 if no Vendor flag { break; } // Otherwise move to next AVP in the grouped AVP CHECK_FCT( fd_msg_browse(nextavp, MSG_BRW_NEXT, (void *)&nextavp, NULL) ); if(nextavp!=NULL) { CHECK_FCT( fd_msg_avp_hdr( nextavp, &nextavphdr ) ); } else nextavphdr=NULL; } if (avp) *avp = nextavp; if (avp && nextavp) { struct dictionary * dict; CHECK_FCT( fd_dict_getdict( what, &dict) ); CHECK_FCT_DO( fd_msg_parse_dict( nextavp, dict, NULL ), ); } if (avp || nextavp) return 0; else return ENOENT; } nextepc-0.3.10/lib/fd/rx/000077500000000000000000000000001333553357400150445ustar00rootroot00000000000000nextepc-0.3.10/lib/fd/rx/dict_init.c000066400000000000000000000115061333553357400171610ustar00rootroot00000000000000#define TRACE_MODULE _rx_dict #include "rx_dict.h" #define CHECK_dict_search( _type, _criteria, _what, _result ) \ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); struct dict_object *rx_application = NULL; struct dict_object *rx_cmd_aar = NULL; struct dict_object *rx_cmd_aaa = NULL; struct dict_object *rx_cmd_asr = NULL; struct dict_object *rx_cmd_asa = NULL; struct dict_object *rx_cmd_str = NULL; struct dict_object *rx_cmd_sta = NULL; struct dict_object *rx_media_component_description = NULL; struct dict_object *rx_media_component_number = NULL; struct dict_object *rx_media_type = NULL; struct dict_object *rx_max_requested_bandwidth_ul = NULL; struct dict_object *rx_max_requested_bandwidth_dl = NULL; struct dict_object *rx_min_requested_bandwidth_ul = NULL; struct dict_object *rx_min_requested_bandwidth_dl = NULL; struct dict_object *rx_rr_bandwidth = NULL; struct dict_object *rx_rs_bandwidth = NULL; struct dict_object *rx_flow_status = NULL; struct dict_object *rx_codec_data = NULL; struct dict_object *rx_media_sub_component = NULL; struct dict_object *rx_flow_number = NULL; struct dict_object *rx_flow_usage = NULL; struct dict_object *rx_flow_description = NULL; struct dict_object *rx_subscription_id = NULL; struct dict_object *rx_subscription_id_type = NULL; struct dict_object *rx_subscription_id_data = NULL; struct dict_object *rx_specific_action = NULL; struct dict_object *rx_framed_ip_address = NULL; struct dict_object *rx_framed_ipv6_prefix = NULL; struct dict_object *rx_ip_can_type = NULL; struct dict_object *rx_rat_type = NULL; struct dict_object *rx_abort_cause = NULL; struct dict_object *rx_termination_cause = NULL; int rx_dict_init(void) { application_id_t id = RX_APPLICATION_ID; CHECK_dict_search(DICT_APPLICATION, APPLICATION_BY_ID, (void *)&id, &rx_application); CHECK_dict_search(DICT_COMMAND, CMD_BY_NAME, "AA-Request", &rx_cmd_aar); CHECK_dict_search(DICT_COMMAND, CMD_BY_NAME, "AA-Answer", &rx_cmd_aaa); CHECK_dict_search(DICT_COMMAND, CMD_BY_NAME, "Abort-Session-Request", &rx_cmd_asr); CHECK_dict_search(DICT_COMMAND, CMD_BY_NAME, "Abort-Session-Answer", &rx_cmd_asa); CHECK_dict_search(DICT_COMMAND, CMD_BY_NAME, "Session-Termination-Request", &rx_cmd_str); CHECK_dict_search(DICT_COMMAND, CMD_BY_NAME, "Session-Termination-Answer", &rx_cmd_sta); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Media-Component-Description", &rx_media_component_description); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Media-Component-Number", &rx_media_component_number); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Media-Type", &rx_media_type); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Max-Requested-Bandwidth-UL" , &rx_max_requested_bandwidth_ul); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Max-Requested-Bandwidth-DL" , &rx_max_requested_bandwidth_dl); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Min-Requested-Bandwidth-UL" , &rx_min_requested_bandwidth_ul); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Min-Requested-Bandwidth-DL" , &rx_min_requested_bandwidth_dl); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "RR-Bandwidth" , &rx_rr_bandwidth); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "RS-Bandwidth" , &rx_rs_bandwidth); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Flow-Status", &rx_flow_status); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Codec-Data", &rx_codec_data); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Media-Sub-Component", &rx_media_sub_component); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Flow-Number", &rx_flow_number); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Flow-Usage", &rx_flow_usage); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Flow-Description", &rx_flow_description); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Subscription-Id", &rx_subscription_id); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Subscription-Id-Type", &rx_subscription_id_type); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Subscription-Id-Data", &rx_subscription_id_data); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Specific-Action", &rx_specific_action); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Framed-IP-Address", &rx_framed_ip_address); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Framed-IPv6-Prefix", &rx_framed_ipv6_prefix); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "IP-CAN-Type", &rx_ip_can_type); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "RAT-Type", &rx_rat_type); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Abort-Cause", &rx_abort_cause); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Termination-Cause", &rx_termination_cause); return 0; } nextepc-0.3.10/lib/fd/rx/rx_dict.h000066400000000000000000000112541333553357400166540ustar00rootroot00000000000000#ifndef __RX_DICT_H__ #define __RX_DICT_H__ #include "freeDiameter/freeDiameter-host.h" #include "freeDiameter/libfdcore.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define RX_APPLICATION_ID 16777236 #define RX_AVP_CODE_SUBSCRIPTION_ID (443) #define RX_AVP_CODE_SPECIFIC_ACTION (513) #define RX_AVP_CODE_MEDIA_COMPONENT_DESCRIPTION (517) #define RX_AVP_CODE_MEDIA_TYPE (520) #define RX_AVP_CODE_MAX_REQUESTED_BANDWIDTH_DL (515) #define RX_AVP_CODE_MAX_REQUESTED_BANDWIDTH_UL (516) #define RX_AVP_CODE_RR_BANDWIDTH (521) #define RX_AVP_CODE_RS_BANDWIDTH (522) #define RX_AVP_CODE_MIN_REQUESTED_BANDWIDTH_DL (534) #define RX_AVP_CODE_MIN_REQUESTED_BANDWIDTH_UL (535) #define RX_AVP_CODE_MEDIA_COMPONENT_NUMBER (518) #define RX_AVP_CODE_MEDIA_SUB_COMPONENT (519) #define RX_AVP_CODE_FLOW_DESCRIPTION (507) #define RX_AVP_CODE_FLOW_NUMBER (509) #define RX_AVP_CODE_FLOW_USAGE (512) extern struct dict_object *rx_application; extern struct dict_object *rx_cmd_aar; extern struct dict_object *rx_cmd_aaa; extern struct dict_object *rx_cmd_asr; extern struct dict_object *rx_cmd_asa; extern struct dict_object *rx_cmd_str; extern struct dict_object *rx_cmd_sta; extern struct dict_object *rx_media_component_description; extern struct dict_object *rx_media_component_number; extern struct dict_object *rx_media_type; extern struct dict_object *rx_max_requested_bandwidth_ul; extern struct dict_object *rx_max_requested_bandwidth_dl; extern struct dict_object *rx_min_requested_bandwidth_ul; extern struct dict_object *rx_min_requested_bandwidth_dl; extern struct dict_object *rx_rr_bandwidth; extern struct dict_object *rx_rs_bandwidth; #define RX_FLOW_STATUS_ENABLED_UPLINK 0 #define RX_FLOW_STATUS_ENABLED_DOWNLINK 1 #define RX_FLOW_STATUS_ENABLED 2 #define RX_FLOW_STATUS_DISABLED 3 extern struct dict_object *rx_flow_status; extern struct dict_object *rx_codec_data; extern struct dict_object *rx_media_sub_component; extern struct dict_object *rx_flow_number; extern struct dict_object *rx_flow_usage; extern struct dict_object *rx_flow_description; extern struct dict_object *rx_subscription_id; #define RX_SUBSCRIPTION_ID_TYPE_END_USER_E164 0 #define RX_SUBSCRIPTION_ID_TYPE_END_USER_IMSI 1 #define RX_SUBSCRIPTION_ID_TYPE_END_USER_SIP_URI 2 #define RX_SUBSCRIPTION_ID_TYPE_END_USER_NAI 3 extern struct dict_object *rx_subscription_id_type; extern struct dict_object *rx_subscription_id_data; extern struct dict_object *rx_specific_action; extern struct dict_object *rx_framed_ip_address; extern struct dict_object *rx_framed_ipv6_prefix; #define RX_IP_CAN_TYPE_3GPP_GPRS 0 #define RX_IP_CAN_TYPE_DOCSIS 1 #define RX_IP_CAN_TYPE_xDSL 2 #define RX_IP_CAN_TYPE_WiMAX 3 #define RX_IP_CAN_TYPE_3GPP2 4 #define RX_IP_CAN_TYPE_3GPP_EPS 5 #define RX_IP_CAN_TYPE_Non_3GPP_EPS 6 extern struct dict_object *rx_ip_can_type; #define RX_RAT_TYPE_WLAN 0 #define RX_RAT_TYPE_VIRTUAL 1 #define RX_RAT_TYPE_UTRAN 1000 #define RX_RAT_TYPE_GERAN 1001 #define RX_RAT_TYPE_GAN 1002 #define RX_RAT_TYPE_HSPA_EVOLUTION 1003 #define RX_RAT_TYPE_EUTRAN 1004 #define RX_RAT_TYPE_EUTRAN_NB_IoT 1005 #define RX_RAT_TYPE_CDMA2000_1X 2000 #define RX_RAT_TYPE_HRPD 2001 #define RX_RAT_TYPE_UMB 2002 #define RX_RAT_TYPE_EHRPD 2003 extern struct dict_object *rx_rat_type; #define RX_ABORT_CAUSE_BEARER_RELEASED 0 #define RX_ABORT_CAUSE_INSUFFICIENT_SERVER_RESOURCES 1 #define RX_ABORT_CAUSE_INSUFFICIENT_BEARER_RESOURCES 2 #define RX_ABORT_CAUSE_PS_TO_CS_HANDOVER 3 #define RX_ABORT_CAUSE_SPONSORED_DATA_CONNECTIVITY_ DISALLOWED 4 extern struct dict_object *rx_abort_cause; #define RX_TERMINATION_CAUSE_DIAMETER_LOGOUT 1 #define RX_TERMINATION_CAUSE_DIAMETER_SERVICE_NOT_PROVIDED 2 #define RX_TERMINATION_CAUSE_DIAMETER_BAD_ANSWER 3 #define RX_TERMINATION_CAUSE_DIAMETER_DIAMETER_ADMINISTRATIVE 4 #define RX_TERMINATION_CAUSE_DIAMETER_LINK_BROKEN 5 #define RX_TERMINATION_CAUSE_DIAMETER_AUTH_EXPIRED 6 #define RX_TERMINATION_CAUSE_DIAMETER_USER_MOVED 7 #define RX_TERMINATION_CAUSE_DIAMETER_SESSION_TIMEOUT 8 extern struct dict_object *rx_termination_cause; int rx_dict_init(void); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __RX_DICT_H__ */ nextepc-0.3.10/lib/fd/rx/rx_message.c000066400000000000000000000015361333553357400173520ustar00rootroot00000000000000#define TRACE_MODULE _rx_message #include "core_debug.h" #include "core_pkbuf.h" #include "rx_message.h" void rx_message_free(rx_message_t *rx_message) { int i, j, k; d_assert(rx_message, return, "Null param"); for (i = 0; i < rx_message->num_of_media_component; i++) { rx_media_component_t *media_component = &rx_message->media_component[i]; for (j = 0; j < media_component->num_of_sub; j++) { rx_media_sub_component_t *sub = &media_component->sub[j]; for (k = 0; k < sub->num_of_flow; k++) { flow_t *flow = &sub->flow[k]; if (flow->description) { CORE_FREE(flow->description); } else d_assert(0,, "Null param"); } } } } nextepc-0.3.10/lib/fd/rx/rx_message.h000066400000000000000000000050451333553357400173560ustar00rootroot00000000000000#ifndef __RX_MESSAGE_H__ #define __RX_MESSAGE_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "3gpp_types.h" typedef struct _rx_media_sub_component_t { c_uint32_t flow_number; #define RX_FLOW_USAGE_NO_INFORMATION 0 #define RX_FLOW_USAGE_RTCP 1 #define RX_FLOW_USAGE_AF_SIGNALLING 2 c_uint32_t flow_usage; flow_t flow[MAX_NUM_OF_FLOW]; int num_of_flow; } rx_media_sub_component_t; typedef struct _rx_media_component_t { c_uint32_t media_component_number; #define RX_MEDIA_TYPE_AUDIO 0 #define RX_MEDIA_TYPE_VIDEO 1 #define RX_MEDIA_TYPE_DATA 2 #define RX_MEDIA_TYPE_APPLICATION 3 #define RX_MEDIA_TYPE_CONTROL 4 #define RX_MEDIA_TYPE_TEXT 5 #define RX_MEDIA_TYPE_MESSAGE 6 #define RX_MEDIA_TYPE_OTHER 0xFFFFFFFF c_uint32_t media_type; c_uint64_t max_requested_bandwidth_dl; c_uint64_t max_requested_bandwidth_ul; c_uint64_t min_requested_bandwidth_dl; c_uint64_t min_requested_bandwidth_ul; c_uint64_t rr_bandwidth; c_uint64_t rs_bandwidth; #define MAX_NUM_OF_MEDIA_SUB_COMPONENT 8 rx_media_sub_component_t sub[MAX_NUM_OF_MEDIA_SUB_COMPONENT]; int num_of_sub; } rx_media_component_t; typedef struct _rx_message_t { #define RX_CMD_CODE_AA 265 #define RX_CMD_CODE_SESSION_TERMINATION 275 c_uint16_t cmd_code; /* Experimental-Result-Codes */ #define RX_DIAMETER_INVALID_SERVICE_INFORMATION 5061 #define RX_DIAMETER_FILTER_RESTRICTIONS 5062 #define RX_DIAMETER_REQUESTED_SERVICE_NOT_AUTHORIZED 5063 #define RX_DIAMETER_DUPLICATED_AF_SESSION 5064 #define RX_DIAMETER_IP_CAN_SESSION_NOT_AVAILABLE 5065 #define RX_DIAMETER_UNAUTHORIZED_NON_EMERGENCY_SESSION 5066 #define RX_DIAMETER_UNAUTHORIZED_SPONSORED_DATA_CONNECTIVITY 5067 #define RX_DIAMETER_TEMPORARY_NETWORK_FAILURE 5068 c_uint32_t result_code; #define MAX_NUM_OF_MEDIA_COMPONENT 16 rx_media_component_t media_component[MAX_NUM_OF_MEDIA_COMPONENT]; int num_of_media_component; } rx_message_t; CORE_DECLARE(void) rx_message_free(rx_message_t *rx_message); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __RX_MESSAGE_H__ */ nextepc-0.3.10/lib/fd/s6a/000077500000000000000000000000001333553357400151045ustar00rootroot00000000000000nextepc-0.3.10/lib/fd/s6a/dict_init.c000066400000000000000000000147671333553357400172350ustar00rootroot00000000000000#include "s6a_dict.h" #define CHECK_dict_search( _type, _criteria, _what, _result ) \ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); struct dict_object *s6a_application = NULL; struct dict_object *s6a_cmd_air = NULL; struct dict_object *s6a_cmd_aia = NULL; struct dict_object *s6a_cmd_ulr = NULL; struct dict_object *s6a_cmd_ula = NULL; struct dict_object *s6a_cmd_pur = NULL; struct dict_object *s6a_cmd_pua = NULL; struct dict_object *s6a_visited_plmn_id = NULL; struct dict_object *s6a_rat_type = NULL; struct dict_object *s6a_ulr_flags = NULL; struct dict_object *s6a_ula_flags = NULL; struct dict_object *s6a_subscription_data = NULL; struct dict_object *s6a_req_eutran_auth_info = NULL; struct dict_object *s6a_number_of_requested_vectors = NULL; struct dict_object *s6a_immediate_response_preferred = NULL; struct dict_object *s6a_authentication_info = NULL; struct dict_object *s6a_re_synchronization_info = NULL; struct dict_object *s6a_service_selection = NULL; struct dict_object *s6a_ue_srvcc_capability = NULL; struct dict_object *s6a_e_utran_vector = NULL; struct dict_object *s6a_rand = NULL; struct dict_object *s6a_xres = NULL; struct dict_object *s6a_autn = NULL; struct dict_object *s6a_kasme = NULL; struct dict_object *s6a_subscriber_status = NULL; struct dict_object *s6a_ambr = NULL; struct dict_object *s6a_network_access_mode = NULL; struct dict_object *s6a_access_restriction_data = NULL; struct dict_object *s6a_apn_configuration_profile = NULL; struct dict_object *s6a_subscribed_rau_tau_timer = NULL; struct dict_object *s6a_context_identifier = NULL; struct dict_object *s6a_all_apn_configuration_included_indicator = NULL; struct dict_object *s6a_apn_configuration = NULL; struct dict_object *s6a_max_bandwidth_ul = NULL; struct dict_object *s6a_max_bandwidth_dl = NULL; struct dict_object *s6a_pdn_type = NULL; struct dict_object *s6a_eps_subscribed_qos_profile = NULL; struct dict_object *s6a_qos_class_identifier = NULL; struct dict_object *s6a_allocation_retention_priority = NULL; struct dict_object *s6a_priority_level = NULL; struct dict_object *s6a_pre_emption_capability = NULL; struct dict_object *s6a_pre_emption_vulnerability = NULL; int s6a_dict_init(void) { application_id_t id = S6A_APPLICATION_ID; CHECK_dict_search(DICT_APPLICATION, APPLICATION_BY_ID, (void *)&id, &s6a_application); CHECK_dict_search(DICT_COMMAND, CMD_BY_NAME, "Authentication-Information-Request", &s6a_cmd_air); CHECK_dict_search(DICT_COMMAND, CMD_BY_NAME, "Authentication-Information-Answer", &s6a_cmd_aia); CHECK_dict_search(DICT_COMMAND, CMD_BY_NAME, "Update-Location-Request", &s6a_cmd_ulr); CHECK_dict_search(DICT_COMMAND, CMD_BY_NAME, "Update-Location-Answer", &s6a_cmd_ula); CHECK_dict_search(DICT_COMMAND, CMD_BY_NAME, "Purge-UE-Request", &s6a_cmd_pur); CHECK_dict_search(DICT_COMMAND, CMD_BY_NAME, "Purge-UE-Answer", &s6a_cmd_pua); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Visited-PLMN-Id", &s6a_visited_plmn_id); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "RAT-Type", &s6a_rat_type); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "ULR-Flags", &s6a_ulr_flags); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "ULA-Flags", &s6a_ula_flags); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "UE-SRVCC-Capability", &s6a_ue_srvcc_capability); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Requested-EUTRAN-Authentication-Info", &s6a_req_eutran_auth_info); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Number-Of-Requested-Vectors", &s6a_number_of_requested_vectors); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Immediate-Response-Preferred", &s6a_immediate_response_preferred); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Re-Synchronization-Info", &s6a_re_synchronization_info); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Authentication-Info", &s6a_authentication_info); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "E-UTRAN-Vector", &s6a_e_utran_vector); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "RAND", &s6a_rand); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "XRES", &s6a_xres); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "AUTN", &s6a_autn); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "KASME", &s6a_kasme); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "EPS-Subscribed-QoS-Profile", &s6a_eps_subscribed_qos_profile); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "QoS-Class-Identifier", &s6a_qos_class_identifier); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Allocation-Retention-Priority", &s6a_allocation_retention_priority); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Priority-Level", &s6a_priority_level); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Pre-emption-Capability", &s6a_pre_emption_capability); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Pre-emption-Vulnerability", &s6a_pre_emption_vulnerability); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "AMBR", &s6a_ambr); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Max-Requested-Bandwidth-UL", &s6a_max_bandwidth_ul); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Max-Requested-Bandwidth-DL", &s6a_max_bandwidth_dl); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "APN-Configuration-Profile", &s6a_apn_configuration_profile); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Context-Identifier", &s6a_context_identifier); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "All-APN-Configurations-Included-Indicator", &s6a_all_apn_configuration_included_indicator); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "APN-Configuration", &s6a_apn_configuration); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Service-Selection", &s6a_service_selection); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "PDN-Type", &s6a_pdn_type); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Subscription-Data", &s6a_subscription_data); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Subscriber-Status", &s6a_subscriber_status); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Network-Access-Mode", &s6a_network_access_mode); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Access-Restriction-Data", &s6a_access_restriction_data); CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Subscribed-Periodic-RAU-TAU-Timer", &s6a_subscribed_rau_tau_timer); return 0; } nextepc-0.3.10/lib/fd/s6a/s6a_dict.h000066400000000000000000000070661333553357400167620ustar00rootroot00000000000000#ifndef __S6A_LIB_H__ #define __S6A_LIB_H__ #include "freeDiameter/freeDiameter-host.h" #include "freeDiameter/libfdcore.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define S6A_APPLICATION_ID 16777251 #define S6A_AVP_CODE_CONTEXT_IDENTIFIER (1423) #define S6A_AVP_CODE_ALL_APN_CONFIG_INC_IND (1428) #define S6A_AVP_CODE_APN_CONFIGURATION (1430) #define S6A_AVP_CODE_MIP_HOME_AGENT_ADDRESS (334) #define S6A_RAT_TYPE_WLAN 0 #define S6A_RAT_TYPE_VIRTUAL 1 #define S6A_RAT_TYPE_UTRAN 1000 #define S6A_RAT_TYPE_GERAN 1001 #define S6A_RAT_TYPE_GAN 1002 #define S6A_RAT_TYPE_HSPA_EVOLUTION 1003 #define S6A_RAT_TYPE_EUTRAN 1004 #define S6A_RAT_TYPE_EUTRAN_NB_IOT 1005 #define S6A_RAT_TYPE_CDMA2000_1X 2000 #define S6A_RAT_TYPE_HRPD 2001 #define S6A_RAT_TYPE_UMB 2002 #define S6A_RAT_TYPE_EHRPD 2003 #define S6A_ULR_SINGLE_REGISTRATION_IND (1) #define S6A_ULR_S6A_S6D_INDICATOR (1 << 1) #define S6A_ULR_SKIP_SUBSCRIBER_DATA (1 << 2) #define S6A_ULR_GPRS_SUBSCRIPTION_DATA_IND (1 << 3) #define S6A_ULR_NODE_TYPE_IND (1 << 4) #define S6A_ULR_INITIAL_ATTACH_IND (1 << 5) #define S6A_ULR_PS_LCS_SUPPORTED_BY_UE (1 << 6) #define S6A_UE_SRVCC_NOT_SUPPORTED (0) #define S6A_UE_SRVCC_SUPPORTED (1) extern struct dict_object *s6a_application; extern struct dict_object *s6a_cmd_air; extern struct dict_object *s6a_cmd_aia; extern struct dict_object *s6a_cmd_ulr; extern struct dict_object *s6a_cmd_ula; extern struct dict_object *s6a_cmd_pur; extern struct dict_object *s6a_cmd_pua; extern struct dict_object *s6a_visited_plmn_id; extern struct dict_object *s6a_rat_type; extern struct dict_object *s6a_ulr_flags; extern struct dict_object *s6a_ula_flags; extern struct dict_object *s6a_subscription_data; extern struct dict_object *s6a_req_eutran_auth_info; extern struct dict_object *s6a_number_of_requested_vectors; extern struct dict_object *s6a_immediate_response_preferred; extern struct dict_object *s6a_authentication_info; extern struct dict_object *s6a_re_synchronization_info; extern struct dict_object *s6a_service_selection; extern struct dict_object *s6a_ue_srvcc_capability; extern struct dict_object *s6a_e_utran_vector; extern struct dict_object *s6a_rand; extern struct dict_object *s6a_xres; extern struct dict_object *s6a_autn; extern struct dict_object *s6a_kasme; extern struct dict_object *s6a_subscriber_status; extern struct dict_object *s6a_ambr; extern struct dict_object *s6a_network_access_mode; extern struct dict_object *s6a_access_restriction_data; extern struct dict_object *s6a_apn_configuration_profile; extern struct dict_object *s6a_subscribed_rau_tau_timer; extern struct dict_object *s6a_context_identifier; extern struct dict_object *s6a_all_apn_configuration_included_indicator; extern struct dict_object *s6a_apn_configuration; extern struct dict_object *s6a_max_bandwidth_ul; extern struct dict_object *s6a_max_bandwidth_dl; extern struct dict_object *s6a_pdn_type; extern struct dict_object *s6a_eps_subscribed_qos_profile; extern struct dict_object *s6a_qos_class_identifier; extern struct dict_object *s6a_allocation_retention_priority; extern struct dict_object *s6a_priority_level; extern struct dict_object *s6a_pre_emption_capability; extern struct dict_object *s6a_pre_emption_vulnerability; int s6a_dict_init(void); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* ! __S6A_LIB_H__ */ nextepc-0.3.10/lib/fd/s6a/s6a_message.h000066400000000000000000000057341333553357400174630ustar00rootroot00000000000000#ifndef __S6A_MESSAGE_H__ #define __S6A_MESSAGE_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "core_sha2.h" #include "3gpp_types.h" typedef struct _e_utran_vector_t { c_uint8_t xres[MAX_RES_LEN]; c_uint8_t xres_len; c_uint8_t kasme[SHA256_DIGEST_SIZE]; c_uint8_t rand[RAND_LEN]; c_uint8_t autn[AUTN_LEN]; } e_utran_vector_t; typedef struct _s6a_aia_message_t { e_utran_vector_t e_utran_vector; } s6a_aia_message_t; typedef struct _s6a_subscription_data_t { #define HSS_ACCESS_RESTRICTION_UTRAN_NOT_ALLOWED (1) #define HSS_ACCESS_RESTRICTION_GERAN_NOT_ALLOWED (1<<1) #define HSS_ACCESS_RESTRICTION_GAN_NOT_ALLOWED (1<<2) #define HSS_ACCESS_RESTRICTION_I_HSPA_EVOLUTION_NOT_ALLOWED (1<<3) #define HSS_ACCESS_RESTRICTION_WB_E_UTRAN_NOT_ALLOWED (1<<4) #define HSS_ACCESS_RESTRICTION_HO_TO_NON_3GPP_ACCESS_NOT_ALLOWED (1<<5) #define HSS_ACCESS_RESTRICTION_NB_IOT_NOT_ALLOWED (1<<6) c_uint32_t access_restriction_data; #define HSS_SUBSCRIBER_STATUS_SERVICE_GRANTED 0 #define HSS_SUBSCRIBER_STATUS_OPERATOR_DETERMINED_BARRING 1 c_uint32_t subscriber_status; #define HSS_NETWORK_ACCESS_MODE_PACKET_AND_CIRCUIT 0 #define HSS_NETWORK_ACCESS_MODE_RESERVED 1 #define HSS_NETWORK_ACCESS_MODE_ONLY_PACKET 2 c_uint32_t network_access_mode; bitrate_t ambr; /* UE-AMBR */ c_uint32_t subscribed_rau_tau_timer; /* unit : minutes */ c_uint32_t context_identifier; /* default APN */ pdn_t pdn[MAX_NUM_OF_SESS]; int num_of_pdn; } s6a_subscription_data_t; typedef struct _s6a_ula_message_t { #define S6A_ULA_FLAGS_SEPARATION_INDICATION (0) #define S6A_ULA_FLAGS_MME_REGISTERED_FOR_SMS (1) c_uint32_t ula_flags; s6a_subscription_data_t subscription_data; } s6a_ula_message_t; typedef struct _s6a_message_t { #define S6A_CMD_CODE_UPDATE_LOCATION 316 #define S6A_CMD_CODE_AUTHENTICATION_INFORMATION 318 c_uint16_t cmd_code; /* Experimental Result Code */ #define S6A_DIAMETER_AUTHENTICATION_DATA_UNAVAILABLE 4181 #define S6A_DIAMETER_ERROR_USER_UNKNOWN 5001 #define S6A_DIAMETER_ERROR_ROAMING_NOT_ALLOWED 5004 #define S6A_DIAMETER_ERROR_UNKNOWN_EPS_SUBSCRIPTION 5420 #define S6A_DIAMETER_ERROR_RAT_NOT_ALLOWED 5421 #define S6A_DIAMETER_ERROR_EQUIPMENT_UNKNOWN 5422 #define S6A_DIAMETER_ERROR_UNKOWN_SERVING_NODE 5423 c_uint32_t result_code; s6a_aia_message_t aia_message; s6a_ula_message_t ula_message; } s6a_message_t; #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __S6A_MESSAGE_H__ */ nextepc-0.3.10/lib/freeDiameter-1.2.1/000077500000000000000000000000001333553357400170535ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/.hg_archival.txt000066400000000000000000000001711333553357400221400ustar00rootroot00000000000000repo: 13530e1f02e3d918eaec5cf9ad027d752c1cf2ab node: 2cb8d71a405df19cf385e49e237f649589513e8d branch: default tag: 1.2.1 nextepc-0.3.10/lib/freeDiameter-1.2.1/.hgignore000066400000000000000000000001161333553357400206540ustar00rootroot00000000000000syntax: glob *.orig *.rej *~ *.log *.sum .hg build* test.* GPATH GRTAGS GTAGS nextepc-0.3.10/lib/freeDiameter-1.2.1/.hgtags000066400000000000000000000077401333553357400203410ustar00rootroot00000000000000195096819152dcceb181b01f05e3e22594e33bbd 1.0.0-rc1 478173cb832ac426090c8ef4c37783303fe7931d 1.0.0 478173cb832ac426090c8ef4c37783303fe7931d 1.0.0 e9ab851f6dca2d4b0c3ca11821d0efda78d9c3c5 1.0.0 25440e53a48e96c1cff0e29569a4a8ec32019cf9 1.0.1-rc1 62ad61238af2b83dcdb8848c2fedb1f3e482010d 1.0.1 144eeab1e3a45288e79321e5783b4f02e10851ca 1.0.2-rc1 f27b40a9dd82152f4587679f397e6ff571a70efb 1.0.2 7ae66129fd7341846df8b6c51ddc2d525707bc3b 1.0.3-rc1 18c4a738e3e910e4e6863aebe5ecb8a61948f5f5 1.0.3-rc2 69d3579f6c6cd3b16daeedc60ca94ca6056a3748 1.0.3-rc3 f065e3cb846ee557b13279b99272032a4ad913a9 1.0.3 5b05d85682f1a23fcd0ecfc87649a65b841e7ca8 1.0.x-last 2e94ef0515d71fb7e932e48894feb84487939c3f 1.1.0-rc1 ff23fecac0b2214818e19f1d4b74b2d4b97f1142 1.1.0-rc2 b2bc31410425527e4c0930580d185c4f15b1cb56 1.1.0-rc3 5d529eb0ad331e9a381de9100a9670e1148b7a98 1.1.0 36caa2c02d1e25309bc9cc6a1f0bb3333ddf7e80 1.1.1 36caa2c02d1e25309bc9cc6a1f0bb3333ddf7e80 1.1.1 0925471e2a88d4d7e2993214e83d925b37908991 1.1.1 69ef21d4a7fea3a812bf19b909df8e56c43adce8 1.1.2 066e1ad7e9fa1eccd6e1d2174d5b57eb6bd33507 1.1.3 7541554029bfbca3370a2ae58a09e91946c6bd78 1.1.4-rc1 4ae6da028be7582a0b3fe98054d5fa0940f8985b 1.1.4 4ae6da028be7582a0b3fe98054d5fa0940f8985b 1.1.4 0000000000000000000000000000000000000000 1.1.4 0000000000000000000000000000000000000000 1.1.4 a39848239f3ab933d5e62089357dd6fd3a59e393 1.1.4 5c4cf8d15ef0e298734daf16203278d7fa62fa7a 1.1.5-rc1 226f5957186ae4369467b070aeb61b1c631c9a5c 1.1.5-rc2 ae96ae28f3ddc48b9e2676e9538008eab2b9d60a 1.1.5 8500947421cb412b5f4f2dfffdf1a35b6fb369e0 FORK 155d45d0653025f45b58ab96b6ba0d5e6fb7fcf8 1.1.6 8500947421cb412b5f4f2dfffdf1a35b6fb369e0 FORK 0000000000000000000000000000000000000000 FORK ec348f6043998ca77d2b3122ef47157c82055ccd proposed_merged ec348f6043998ca77d2b3122ef47157c82055ccd proposed_merged 371f899276ed15d796ae324a88421109c847922b proposed_merged 371f899276ed15d796ae324a88421109c847922b proposed_merged 80584f0e851a725470a42e41607fe21775f2dac8 proposed_merged 80584f0e851a725470a42e41607fe21775f2dac8 proposed_merged cf09fde3d7f5da1aac5b8ec0412da83af732ac8d proposed_merged cf09fde3d7f5da1aac5b8ec0412da83af732ac8d proposed_merged 7ca81c10ba06a3a722c825ce94b6a01bc6b39b04 proposed_merged 7ca81c10ba06a3a722c825ce94b6a01bc6b39b04 proposed_merged 2a510c541472ccd14e2fe83051ade7ddc5ae23f5 proposed_merged 2a510c541472ccd14e2fe83051ade7ddc5ae23f5 proposed_merged 0117a7746b2166b861ff66c42b21115cd17bfcc5 proposed_merged 0117a7746b2166b861ff66c42b21115cd17bfcc5 proposed_merged 09e2a6d796ef8cd55295c635e36ba5a0e2bf7cad proposed_merged 09e2a6d796ef8cd55295c635e36ba5a0e2bf7cad proposed_merged 7c5449ddc434828e77517cb893c882d740b5a4d6 proposed_merged f916f4fc3d99b05adf5e6c94cef089568de7b252 1.2.0-rc1 7c5449ddc434828e77517cb893c882d740b5a4d6 proposed_merged 75633912f364ad94a82e197d918c75b4745998f8 proposed_merged 75633912f364ad94a82e197d918c75b4745998f8 proposed_merged 7ef8ab1d664f300fb5ad8f102c8b2fdafa609518 proposed_merged 7ef8ab1d664f300fb5ad8f102c8b2fdafa609518 proposed_merged 7b57dc5a681fd642a218971da9af9af7356152d9 proposed_merged 7b57dc5a681fd642a218971da9af9af7356152d9 proposed_merged 5d19d6f3e1bd03adc8869e294d0c4b13e0977fd6 proposed_merged 5d19d6f3e1bd03adc8869e294d0c4b13e0977fd6 proposed_merged d00b5914351e83fa90b2ea09f8c51cd82b312157 proposed_merged d00b5914351e83fa90b2ea09f8c51cd82b312157 proposed_merged fb9282c75ec51eb43690413c5b66a3192dfc79d3 proposed_merged fb9282c75ec51eb43690413c5b66a3192dfc79d3 proposed_merged 043b894b0511b6beb155576e9e2c509a21be8360 proposed_merged 08e72b858f03a77869792cb8ad8e0acbc83c2590 1.2.0-rc2 f937feb727347445f8afb7759a97e34c76c0ba7b 1.2.0 ab6457399be2762b3e85bd173ba754ff758ef060 1.2.1-rc1 043b894b0511b6beb155576e9e2c509a21be8360 proposed_merged 0000000000000000000000000000000000000000 proposed_merged 13948c684c354d8c891ca5e2a5f1d76d1f176afe 1.2.1-rc2 19d01728f26f7318b5e851d3e5aae9703fa540ff 1.2.1 9caedf4a058b5ec7274c84201bfad986bc7f943c 1.2.1a 6446c0eea54742c8745c2efdad7963c65e74df5a 1.2.1b 19d01728f26f7318b5e851d3e5aae9703fa540ff 1.2.1 0000000000000000000000000000000000000000 1.2.1 nextepc-0.3.10/lib/freeDiameter-1.2.1/CMakeLists.txt000066400000000000000000000107131333553357400216150ustar00rootroot00000000000000# This file is the source for generating the Makefile for the project, using cmake tool (cmake.org) # Name of the project PROJECT("freeDiameter") # Informations to display in daemon's help SET(FD_PROJECT_NAME freeDiameter) SET(FD_PROJECT_BINARY freeDiameterd) SET(FD_PROJECT_COPYRIGHT "Copyright (c) 2008-2015, WIDE Project (www.wide.ad.jp) and NICT (www.nict.go.jp)") # Version of the source code SET(FD_PROJECT_VERSION_MAJOR 1) SET(FD_PROJECT_VERSION_MINOR 2) SET(FD_PROJECT_VERSION_REV 1) # Version of the API with the library SET(FD_PROJECT_VERSION_API 6) # The test framework, using CTest and CDash. INCLUDE(CTest) # CMake version CMAKE_MINIMUM_REQUIRED(VERSION 2.6) # Location of additional CMake modules SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") # The default directories SET(DEFAULT_CONF_PATH ${CMAKE_INSTALL_PREFIX}/etc/freeDiameter CACHE PATH "Default location of freeDiameter configuration files") IF (NOT DEFINED LIB_INSTALL_DIR) SET(LIB_INSTALL_DIR lib CACHE PATH "Default library path name on the system, to accomodate RPM-based systems that use lib64") ENDIF (NOT DEFINED LIB_INSTALL_DIR) SET(INSTALL_HEADERS_SUFFIX include/freeDiameter CACHE PATH "Directory where the headers are installed (relative to CMAKE_INSTALL_PREFIX).") SET(INSTALL_DAEMON_SUFFIX bin CACHE PATH "Directory where the daemon binary is installed (relative to CMAKE_INSTALL_PREFIX).") SET(INSTALL_LIBRARY_SUFFIX ${LIB_INSTALL_DIR} CACHE PATH "Directory where the freeDiameter libraries are installed (relative to CMAKE_INSTALL_PREFIX).") SET(INSTALL_EXTENSIONS_SUFFIX ${LIB_INSTALL_DIR}/freeDiameter CACHE PATH "Directory where the extensions are installed / searched (relative to CMAKE_INSTALL_PREFIX).") # All source code should be POSIX 200112L compatible, but some other extensions might be used, so: ADD_DEFINITIONS(-D_GNU_SOURCE) # Set a default build type if none was specified if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) message(STATUS "Setting build type to 'Debug' as none was specified.") set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build." FORCE) # Set the possible values of build type for cmake-gui set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo" "Profiling" "MaxPerformance" "DebianPackage" "DebugValgrind") endif() # Add a "Profiling" build type # SET(CMAKE_BUILD_TYPE Profiling) SET(CMAKE_C_FLAGS_PROFILING "-fprofile-arcs -ftest-coverage -fstack-protector -g -Wall") # Add a "MaxPerformance" build type -- this is very silent... # SET(CMAKE_BUILD_TYPE MaxPerformance) SET(CMAKE_C_FLAGS_MAXPERFORMANCE "${CMAKE_C_FLAGS_RELEASE} -DSTRIP_DEBUG_CODE") # Add a "DebianPackage" build type used when creating the Debian packages SET(CMAKE_C_FLAGS_DEBIANPACKAGE "${CMAKE_C_FLAGS_RELWITHDEBINFO}") # Set the "Debug" flags SET(CMAKE_C_FLAGS_DEBUG "-Wall -g -O0") # Add a "DebugValgrind" build type used for checking execution with Valgrind tool SET(CMAKE_C_FLAGS_DEBUGVALGRIND "-Wall -g -O0") # Set the DEBUG flag for Debug and Profiling builds IF (CMAKE_BUILD_TYPE MATCHES "Debug|Profiling|DebugValgrind") SET(DEBUG 1) ENDIF (CMAKE_BUILD_TYPE MATCHES "Debug|Profiling|DebugValgrind") # some subfolders use yacc and lex parsers SET(BISON_GENERATE_DEFINES TRUE) SET(BISON_PREFIX_OUTPUTS TRUE) INCLUDE(CMakeUserUseBison) SET(FLEX_PREFIX_OUTPUTS TRUE) INCLUDE(CMakeUserUseFlex) IF( NOT BISON_EXECUTABLE OR NOT FLEX_EXECUTABLE ) MESSAGE( SEND_ERROR "Bison and Flex are required" ) ENDIF( NOT BISON_EXECUTABLE OR NOT FLEX_EXECUTABLE ) # Check that flex is at least 2.5.20 to support bison-bridge # how to do the check with cmake??? # Add this to workaround an apparent bug in FreeBSD cmake (already defined in Linux) SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-rdynamic") # For Darwin systems IF(APPLE) SET(CMAKE_SHARED_MODULE_CREATE_C_FLAGS "${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} -flat_namespace -undefined dynamic_lookup") SET(CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS "${CMAKE_SHARED_MODULE_CREATE_CXX_FLAGS} -flat_namespace -undefined dynamic_lookup") ENDIF(APPLE) # Location for the include files INCLUDE_DIRECTORIES(include) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/include) SUBDIRS(include/freeDiameter) # Location for the source code SUBDIRS(libfdproto) SUBDIRS(libfdcore) SUBDIRS(freeDiameterd) # Extensions (there is no use of freeDiameter without any extension) SUBDIRS(extensions) # The unary tests directory IF ( BUILD_TESTING ) SUBDIRS(tests) ENDIF ( BUILD_TESTING ) nextepc-0.3.10/lib/freeDiameter-1.2.1/CTestConfig.cmake000066400000000000000000000005471333553357400222330ustar00rootroot00000000000000# Configuration for sumitting the test result. # Check http://www.freediameter.net/CDash for detail. set(CTEST_PROJECT_NAME "freeDiameter") set(CTEST_NIGHTLY_START_TIME "00:00:00 JST") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "www.freediameter.net") set(CTEST_DROP_LOCATION "/CDash/submit.php?project=freeDiameter") set(CTEST_DROP_SITE_CDASH TRUE) nextepc-0.3.10/lib/freeDiameter-1.2.1/INSTALL000066400000000000000000000026631333553357400201130ustar00rootroot00000000000000This package uses CMake (cmake.org) as building system. You'll need the cmake tool in order to generate the Makefiles for your platform. You can also select which extensions must be built with cmake. After the initial cmake configuration, you will need several tools such as make, a C compiler (tested mostly with gcc), flex (> 2.5.4), bison, ... You may retrieve the source package in several ways: - as a pre-packaged version for your platform. Check the website for supported platforms. - as a tarball containing the source. - directly from the repository using Mercurial tool: hg clone http://www.freediameter.net/hg/freeDiameter In order to update later: hg pull -u Building in a separate directory is recommended: # mkdir build # cd build # cmake ../ # make You can pass options to instruct cmake about which components to compile on the command-line. You can also use a CMake front-end (for example ccmake or cmake-gui). If your cmake installation is recent, the edit_cache target is a good help as well: # mkdir build # cd build # cmake ../ # make help # make edit_cache # make You can disable the unit tests by doing: # cmake -DBUILD_TESTING:BOOL=OFF ../ # make When the tests are enabled, you can run them with: # make test See the INSTALL.* files for additional platform-specific information. Note that the most up-to-date INSTALL file is the Ubuntu one. You may want to read there in addition to your own platform file. nextepc-0.3.10/lib/freeDiameter-1.2.1/INSTALL.Fedora000066400000000000000000000022611333553357400213040ustar00rootroot00000000000000### Very short install notes for Fedora (tested on Fedora 13 and 14) # Please refer to other INSTALL files for more detailed instructions (e.g. extension-specific notes). Dependencies on Fedora 13 (from minimal system): # yum install cmake make gcc gcc-c++ flex bison lksctp-tools-devel gnutls-devel libgcrypt-devel libidn-devel In addition, if you have not already retrieved the latest source: # yum install mercurial Following dependencies are optional, depending on which extensions you plan to compile app_acct: # yum install postgresql-devel optional: # yum install postgresql-server app_sip: app_diameap: # yum install mysql-devel optional: # yum install mysql-server dict_legacy_xml: # yum install libxml2 libxml2-devel dbg_interactive: # yum install swig python-devel NOTE: You may need to change something in SELinux to allow binding the SCTP socket on Diameter port. The following command is the very naive way to do it, you can probably do better (feedback appreciated!) # setenforce Permissive There is currently no Fedora-specific package for freeDiameter. You are welcome to contribute packaging scripts. Please contact dev@freediameter.net for more details. nextepc-0.3.10/lib/freeDiameter-1.2.1/INSTALL.FreeBSD000066400000000000000000000066541333553357400213300ustar00rootroot00000000000000See INSTALL file for general instructions on building freeDiameter. ------------------ QUICK INSTRUCTIONS ------------------ On FreeBSD-8.0 at least the following ports packages were required (should be same on FreeBSD-7.x): cmake flex bison gnutls Then the cmake command had to look like: cmake -DFLEX_EXECUTABLE:FILEPATH=/usr/local/bin/flex -DSCTP_USE_MAPPED_ADDRESSES:BOOL=ON ... --------------------- COMPLETE INSTRUCTIONS --------------------- 1) If you don't have freeBSD yet: Install minimal system + ports using initial installer /usr/sbin/sysinstall 2) Install 'cmake' a) from sources: # cd /usr/ports/devel/cmake # make install b) or from package (don't forget to set your PACKAGEROOT appropriately. Ex: set PACKAGEROOT=ftp://ftp.jp.freebsd.org): # pkg_add -v -r cmake 3) Install 'mercurial' (optional) (replace 'cmake' by 'mercurial' in the previous command) 4) Install 'flex' and 'bison', same way. 5) Install 'gnutls' and 'libidn', same way also. 6) Retrieve freeDiameter source code: # cd ~ # /usr/local/bin/hg clone http://www.freediameter.net/hg/freeDiameter/ 6b) Make a build directory # mkdir fD-build # cd fD-build 7) Run cmake for freeDiameter (add other flags as you see fit, see INSTALL for more details) # /usr/local/bin/cmake -DFLEX_EXECUTABLE:FILEPATH=/usr/local/bin/flex -DSCTP_USE_MAPPED_ADDRESSES:BOOL=ON ../freeDiameter 8) Compile, optionnaly test # make # make test 9) Install # make install 10) Run (the install path can be changed during cmake step): # /usr/local/bin/freeDiameterd --help ------------------------------ app_acct test ADDITIONAL STEPS ------------------------------ Here is additional steps in order to run the test for app_acct 1) Install the required packages # pkg_add -v -r postgresql84-client # pkg_add -v -r postgresql84-server 2) Prepare access to the database: # echo postgresql_enable=YES >> /etc/rc.conf # /usr/local/etc/rc.d/postgresql initdb # su - pgsql > /usr/local/bin/pg_ctl -D /usr/local/pgsql/data -l logfile start > /usr/local/bin/createuser root Shall the new user be allowed to create databases? (y/n) y > logout # /usr/local/bin/createdb root # /usr/local/bin/psql root root=# CREATE TABLE incoming_test ( root(# recorded_on timestamp with time zone NOT NULL, root(# "Accounting-Record-Type" integer, root(# "Session-Id" bytea, root(# "Accounting-Record-Number" integer, root(# "Route-Record1" bytea, root(# "Route-Record2" bytea, root(# "Route-Record3" bytea, root(# "Route-Record4" bytea ); root=# \q 3) configure the sources # make edit_cache BUILD_APP_ACCT:BOOL=ON TEST_APP_ACCT:BOOL=ON TEST_APP_ACCT_CONNINFO:STRING="user=root dbname=root" 4) run the test # tests/testappacct -d or # make test ---------------------------------- Segmentation fault on program exit ---------------------------------- In case you encounter a segmentation fault on program termination like this: [...] freeDiameterd framework is terminated. Segmentation fault: 11 (core dumped) with a backtrace like this: #0 0x0000000801a414a0 in ?? () #1 0x0000000800f99274 in __cxa_finalize () from /lib/libc.so.7 #2 0x0000000800f460b7 in exit () from /lib/libc.so.7 You may try to add the following compilation directive in cmake: -DSKIP_DLCLOSE:BOOL=ON Note: this segmentation fault was experienced with: - FreeBSD 8.1 - 64 bits architecture only. - Profiling mode only. nextepc-0.3.10/lib/freeDiameter-1.2.1/INSTALL.OSX000066400000000000000000000047141333553357400205620ustar00rootroot00000000000000See INSTALL file for general instructions on building freeDiameter. ------------------ QUICK INSTRUCTIONS ------------------ Starting from version 1.1.5, freeDiameter is available through Homebrew: 1) Install Homebrew a) Install Command Line Tools for Xcode or Xcode: - Command Line Tools (your OS X Version) for Xcode: https://developer.apple.com/downloads (Free Apple Developer ID Registration Required) - or Xcode: https://itunes.apple.com/us/app/xcode/id497799835 (Free App Store Account Required) b) Install Homebrew $ ruby -e "$(curl -fsSkL raw.github.com/mxcl/homebrew/go)" 2) Install freeDiameter: $ brew install freediameter After installation is done "Caveats" section will provide information how to start freeDiameterd through launchd at system startup. To view this information again: $ brew info freediameter To learn more about freeDiameter configuration options, read: http://www.freediameter.net/trac/wiki/Configuration For more information on available extension and how to configure them, read: http://www.freediameter.net/trac/wiki/Extensions ------------ FROM SOURCES ------------ 1) Install Homebrew: See QUICK INSTRUCTIONS Step #1 above. 2) Install dependencies: $ brew install mercurial cmake gnutls libgcrypt postgres mysql libidn Notes: * GNU IDN (libidn) is optional, see below * When libusrsctp package is available, you can use it as well. However, it requires some rework on the source code as libusrsctp is not fully compliant with the other SCTP stack. 3) Retrieve source code: $ hg clone http://www.freediameter.net/hg/freeDiameter 4) Enter source folder: $ cd freeDiameter 5) Create build folder: $ mkdir freeDiameter-build 6) Enter build folder: $ cd freeDiameter-build 7) Configure: $ cmake .. -DDISABLE_SCTP:BOOL=ON or for ncurses-based configuration: $ ccmake .. -DDISABLE_SCTP:BOOL=ON Notes: * GNU IDN (Support for International Domain Names) can be disabled with: -DDIAMID_IDNA_IGNORE=ON or -DDIAMID_IDNA_REJECT=ON * For more information on available configuration options, read: http://www.freediameter.net/trac/wiki/Installation 8) Compile: $ make 9) Install (might require to be root): $ make install ------------------------------------------------ These instructions have been tested on OS X: - 10.6.8 (Snow Leopard) - 10.7.5 (Lion) - 10.8.2 (Mountain Lion) nextepc-0.3.10/lib/freeDiameter-1.2.1/INSTALL.OpenSUSE000066400000000000000000000017471333553357400215150ustar00rootroot00000000000000### Very short install notes for OpenSUSE (tested on OpenSUSE 11.3) # Please refer to other INSTALL files for more detailed instructions (e.g. extension-specific notes). Dependencies on OpenSUSE 11.3 (from minimal server system installation): # zypper install cmake make gcc gcc-c++ flex bison lksctp-tools-devel libgnutls-devel libgcrypt-devel libidn-devel # zypper install mercurial Following dependencies are optional, depending on which extensions you plan to compile app_acct: # zypper install postgresql-server postgresql-devel app_sip: app_diameap: # zypper install libmysqlclient-devel (would also need a server, not sure which package is appropriate) dict_legacy_xml: # zypper install libxml2 libxml2-devel dbg_interactive: # zypper install swig python-devel sample: # zypper install gcc-c++ There is currently no OpenSUSE-specific package for freeDiameter. You are welcome to contribute packaging scripts! Please contact with dev@freediameter.net for more details. nextepc-0.3.10/lib/freeDiameter-1.2.1/INSTALL.OpenWRT000066400000000000000000000001731333553357400214020ustar00rootroot00000000000000There is a package script available for the OpenWRT platform. Please refer to contrib/OpenWRT/HOWTO for more information. nextepc-0.3.10/lib/freeDiameter-1.2.1/INSTALL.Ubuntu000066400000000000000000000075371333553357400214010ustar00rootroot00000000000000See http://www.freediameter.net/trac/wiki/DebRepository for instructions on how to install freeDiameter from existing package. See INSTALL file for general instructions on building freeDiameter from sources. The remaining of this file contains specific instructions for building the freeDiameter package files for Debian and Ubuntu systems. freeDiameter is shipped with the necessary files to generate the Debian package. All related files are in the directory "contrib/debian" of the distribution. As a first step, you have to link this directory from your top-level dir: ln -s contrib/debian ============================================ The following packages are required to compile freeDiameter from source: cmake make gcc g++ flex bison libsctp1 libsctp-dev libgnutls-dev libgcrypt-dev libidn11-dev (note that libidn and libsctp can be avoided by defining DISABLE_SCTP and DIAMID_IDNA_REJECT) Additionnaly, these ones may be useful: mercurial gdb Extensions additional dependencies: app_acct: libpq-dev app_sip: app_diameap: libmysqlclient-dev dict_legacy_xml: libxml2-dev dbg_interactive: swig python-dev ============================================ If your debhelper environment is recent (> 7.3.9 for cmake support), the following commands should generate the freeDiameter packages for you: # Install the dependencies for building the source: sudo apt-get -y install mercurial cmake make gcc g++ bison flex libsctp-dev libgnutls-dev libgcrypt-dev libidn11-dev ssl-cert debhelper fakeroot \ libpq-dev libmysqlclient-dev libxml2-dev swig python-dev # Retrieve the latest version of the source package cd hg clone http://www.freediameter.net/hg/freeDiameter cd freeDiameter # Prepare for Debian package ln -s contrib/debian # Build the packages fakeroot dh binary # Install the packages cd .. sudo dpkg -i *.deb # The following lines may help you getting started.... (execute as root) ln -s /etc/ssl/certs/ssl-cert-snakeoil.pem /etc/ssl/certs/freeDiameter.pem ln -s /etc/ssl/private/ssl-cert-snakeoil.key /etc/ssl/private/freeDiameter.key zcat /usr/share/doc/freediameter-daemon/examples/freediameter.conf.sample.gz > /etc/freeDiameter/freeDiameter.conf echo "Identity=\"localhost.localdomain\";" >> /etc/freeDiameter/freeDiameter.conf freeDiameterd =========================================== freeDiameter is tested regularly on all current Ubuntu distributions since Intrepid (compiled from source as described below) Ubuntu Hardy support is known to be broken. The Debian package has been generated with success on Debian (>=Squeeze) and Ubuntu (>=Karmic). ===========================================- Step by step instructions without using the debhelper tools: 1) Install all packages dependencies # sudo apt-get install mercurial cmake make gcc g++ bison flex libsctp-dev libgnutls-dev libgcrypt-dev libidn11-dev 2) (OPTION) If you will compile modules that require postgresql, also install: # sudo apt-get install libpq-dev and for mysql: # sudo apt-get install libmysqlclient-dev 3) (OPTION) If you want a more user-friendly interface, install this: # sudo apt-get install cmake-curses-gui 4) Retrieve the source files # hg clone http://www.freediameter.net/hg/freeDiameter 5) Create a build directory, and enter it # mkdir fDbuild # cd fDbuild 6) Configure and generate the Makefiles # cmake ../freeDiameter # make edit_cache 7) Compile all files: # make 8) (OPTION) See available targets: # make help 9) (OPTION) Check the software has a correct basic behavior on your environment. -- only if you did not disable the tests in step 6 # make test 10) (OPTION) Install the software in configured locations: # sudo make install =========================================== Note: On Ubuntu Quantal Quetzal, you may have to force use of python 2.7 library for the dbg_interactive extension, as on some systems CMake selects the 3.2 library by default. nextepc-0.3.10/lib/freeDiameter-1.2.1/INSTALL.pkgsrc000066400000000000000000000012051333553357400213720ustar00rootroot00000000000000The simplest way to install on NetBSD, DragonFly, MirBSD or other pkgsrc platforms is: pkg_add freeDiameter If no binary package exists: cd /usr/pkgsrc/net/freeDiameter make install If you want to build and install freeDiameter from the repository, you'll need to install: pkg_add bison pkg-config libidn gnutls libgcrypt mercurial and follow the usual installation note. NetBSD does not support SCTP, so you have to add -DDISABLE_SCTP:BOOL=ON to the cmake command line. For the optional extensions, you need mysql*-client, postgres*-client, libxml2. For the debugging extensions, you also need swig and a python -- install as usual. nextepc-0.3.10/lib/freeDiameter-1.2.1/LICENSE000066400000000000000000000041111333553357400200550ustar00rootroot00000000000000Unless specified otherwise, this software package is copyrighted under the terms of the BSD license, as follow: Software License Agreement (BSD License) Copyright (c) 2008-2011, WIDE Project and NICT All rights reserved. Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * 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. * Neither the name of the WIDE Project or NICT nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission of WIDE Project and NICT. 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 following authors have contributed the following files. See source files for copyright information. * Alexandre Westfahl: extensions/dict_sip/* extensions/app_sip/* extensions/app_radgw/rgwx_sip.c * Souheil Ben Ayed: extensions/app_diameap/* * Francois Bard: extensions/dict_mip6a/* extensions/dict_mip6i/* extensions/dict_nas_mipv6/* extensions/dict_rfc5777/* nextepc-0.3.10/lib/freeDiameter-1.2.1/Makefile.am000066400000000000000000000011761333553357400211140ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in ACLOCAL_AMFLAGS = -I m4 SUBDIRS = libfdproto libfdcore extensions MAINTAINERCLEANFILES = \ configure include/freeDiameter/config.h.in \ aclocal.m4 m4/ltsugar.m4 m4/libtool.m4 m4/ltversion.m4 \ m4/lt~obsolete.m4 m4/ltoptions.m4 \ build-aux/ar-lib build-aux/config.guess build-aux/depcomp \ build-aux/ltmain.sh build-aux/test-driver build-aux/compile \ build-aux/config.sub build-aux/missing build-aux/install-sh \ build-aux/ylwrap \ Makefile.in \ include/freeDiameter/version.h libfdcore/fdd.tab.y libfdcore/lex.fdd.l MOSTLYCLEANFILES = core *.stackdump nextepc-0.3.10/lib/freeDiameter-1.2.1/NEWS000066400000000000000000000003371333553357400175550ustar00rootroot00000000000000The digested changelog can be found under: contrib/debian/changelog You can also find the exhaustive list of change using mercurial history, or at the following URL: http://www.freediameter.net/hg/freeDiameter/shortlog nextepc-0.3.10/lib/freeDiameter-1.2.1/README000066400000000000000000000041061333553357400177340ustar00rootroot00000000000000freeDiameter is an implementation of the Diameter protocol. Diameter is a protocol designed to carry Authentication, Authorization and Accounting (AAA) payload. It is an evolution of the RADIUS protocol (as the name suggests). Diameter is an extensible protocol. RFC3588 (currently under revision) defines the Base Protocol that all Diameter nodes must support, while other documents define the additional protocol support for specific applications. Such applications include for example Network Access Servers (RFC4005), EAP (RFC4072), ... The implementation consists in several components: - libfdproto : this shared library provides the functions to manipulate Diameter messages and dictionary. This library is meant to be re-used by other projects that would require parsing or manipulating Diameter messages. - libfdcore : this shared library contains the core of the framework. It establishes the network connections with other Diameter peers and performs the tasks described in Diameter Base Protocol, such as watchdogs, basic routing, ... It also handles the loading of extensions (see below). - freeDiameterd : this simple daemon parses the command line and initializes the freeDiameter framework. Use it for your Diameter server & agent components. In case of Diameter clients, you probably will prefer linking the libfdcore directly with your client application that must be made Diameter-aware. - extensions : the extensions provide the mean to augment the features of the freeDiameterd framework. Extensions can provide the handling of a Diameter server application, but also advanced routing features, peer management, etc. See http://www.freediameter.net/ for more information on the project. freeDiameter was previously known as the "waaad" project (WIDE AAA Daemon) This project is not related to the "freediameter" project from Sun on sourceforge. Author: Sebastien Decugis. See LICENSE file for legal information on this software. See INSTALL for information on building and using this software. nextepc-0.3.10/lib/freeDiameter-1.2.1/cmake/000077500000000000000000000000001333553357400201335ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/cmake/Modules/000077500000000000000000000000001333553357400215435ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/cmake/Modules/CMakeUserUseBison.cmake000066400000000000000000000055341333553357400260430ustar00rootroot00000000000000# - Look for GNU Bison, the parser generator # Based off a news post from Andy Cedilnik at Kitware # Defines the following: # BISON_EXECUTABLE - path to the bison executable # BISON_FILE - parse a file with bison # BISON_PREFIX_OUTPUTS - Set to true to make BISON_FILE produce prefixed # symbols in the generated output based on filename. # So for ${filename}.y, you'll get ${filename}parse(), etc. # instead of yyparse(). # BISON_GENERATE_DEFINES - Set to true to make BISON_FILE output the matching # .h file for a .c file. You want this if you're using # flex. IF(NOT DEFINED BISON_PREFIX_OUTPUTS) SET(BISON_PREFIX_OUTPUTS FALSE) ENDIF(NOT DEFINED BISON_PREFIX_OUTPUTS) IF(NOT DEFINED BISON_GENERATE_DEFINES) SET(BISON_GENERATE_DEFINES FALSE) ENDIF(NOT DEFINED BISON_GENERATE_DEFINES) IF(NOT BISON_EXECUTABLE) MESSAGE(STATUS "Looking for bison") FIND_PROGRAM(BISON_EXECUTABLE bison) IF(BISON_EXECUTABLE) MESSAGE(STATUS "Looking for bison -- ${BISON_EXECUTABLE}") ENDIF(BISON_EXECUTABLE) MARK_AS_ADVANCED(BISON_EXECUTABLE) ENDIF(NOT BISON_EXECUTABLE) IF(BISON_EXECUTABLE) MACRO(BISON_FILE FILENAME) GET_FILENAME_COMPONENT(PATH "${FILENAME}" PATH) IF("${PATH}" STREQUAL "") SET(PATH_OPT "") ELSE("${PATH}" STREQUAL "") SET(PATH_OPT "/${PATH}") ENDIF("${PATH}" STREQUAL "") GET_FILENAME_COMPONENT(HEAD "${FILENAME}" NAME_WE) IF(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}${PATH_OPT}") FILE(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}${PATH_OPT}") ENDIF(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}${PATH_OPT}") IF(BISON_PREFIX_OUTPUTS) SET(PREFIX "${HEAD}") ELSE(BISON_PREFIX_OUTPUTS) SET(PREFIX "yy") ENDIF(BISON_PREFIX_OUTPUTS) SET(OUTFILE "${CMAKE_CURRENT_BINARY_DIR}${PATH_OPT}/${HEAD}.tab.c") IF(BISON_GENERATE_DEFINES) SET(HEADER "${CMAKE_CURRENT_BINARY_DIR}${PATH_OPT}/${HEAD}.tab.h") ADD_CUSTOM_COMMAND( OUTPUT "${OUTFILE}" "${HEADER}" COMMAND "${BISON_EXECUTABLE}" ARGS "--name-prefix=${PREFIX}" "--defines" "--output-file=${OUTFILE}" "${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}" DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}") SET_SOURCE_FILES_PROPERTIES("${OUTFILE}" "${HEADER}" PROPERTIES GENERATED TRUE) SET_SOURCE_FILES_PROPERTIES("${HEADER}" PROPERTIES HEADER_FILE_ONLY TRUE) ELSE(BISON_GENERATE_DEFINES) ADD_CUSTOM_COMMAND( OUTPUT "${OUTFILE}" COMMAND "${BISON_EXECUTABLE}" ARGS "--name-prefix=${PREFIX}" "--output-file=${OUTFILE}" "${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}" DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}") SET_SOURCE_FILES_PROPERTIES("${OUTFILE}" PROPERTIES GENERATED TRUE) ENDIF(BISON_GENERATE_DEFINES) ENDMACRO(BISON_FILE) ENDIF(BISON_EXECUTABLE) nextepc-0.3.10/lib/freeDiameter-1.2.1/cmake/Modules/CMakeUserUseFlex.cmake000066400000000000000000000033001333553357400256540ustar00rootroot00000000000000# - Look for GNU flex, the lexer generator. # Defines the following: # FLEX_EXECUTABLE - path to the flex executable # FLEX_FILE - parse a file with flex # FLEX_PREFIX_OUTPUTS - Set to true to make FLEX_FILE produce outputs of # lex.${filename}.c, not lex.yy.c . Passes -P to flex. IF(NOT DEFINED FLEX_PREFIX_OUTPUTS) SET(FLEX_PREFIX_OUTPUTS FALSE) ENDIF(NOT DEFINED FLEX_PREFIX_OUTPUTS) IF(NOT FLEX_EXECUTABLE) MESSAGE(STATUS "Looking for flex") FIND_PROGRAM(FLEX_EXECUTABLE flex) IF(FLEX_EXECUTABLE) MESSAGE(STATUS "Looking for flex -- ${FLEX_EXECUTABLE}") ENDIF(FLEX_EXECUTABLE) MARK_AS_ADVANCED(FLEX_EXECUTABLE) ENDIF(NOT FLEX_EXECUTABLE) IF(FLEX_EXECUTABLE) MACRO(FLEX_FILE FILENAME) GET_FILENAME_COMPONENT(PATH "${FILENAME}" PATH) IF("${PATH}" STREQUAL "") SET(PATH_OPT "") ELSE("${PATH}" STREQUAL "") SET(PATH_OPT "/${PATH}") ENDIF("${PATH}" STREQUAL "") IF(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}${PATH_OPT}") FILE(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}${PATH_OPT}") ENDIF(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}${PATH_OPT}") IF(FLEX_PREFIX_OUTPUTS) GET_FILENAME_COMPONENT(PREFIX "${FILENAME}" NAME_WE) ELSE(FLEX_PREFIX_OUTPUTS) SET(PREFIX "yy") ENDIF(FLEX_PREFIX_OUTPUTS) SET(OUTFILE "${CMAKE_CURRENT_BINARY_DIR}${PATH_OPT}/lex.${PREFIX}.c") ADD_CUSTOM_COMMAND( OUTPUT "${OUTFILE}" COMMAND "${FLEX_EXECUTABLE}" ARGS "-P${PREFIX}" "-o${OUTFILE}" "${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}" DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${FILENAME}") SET_SOURCE_FILES_PROPERTIES("${OUTFILE}" PROPERTIES GENERATED TRUE) ENDMACRO(FLEX_FILE) ENDIF(FLEX_EXECUTABLE) nextepc-0.3.10/lib/freeDiameter-1.2.1/cmake/Modules/FindGcrypt.cmake000066400000000000000000000020111333553357400246100ustar00rootroot00000000000000# - Find gnutls # Find the native GCRYPT includes and library # # GCRYPT_FOUND - True if gnutls found. # GCRYPT_INCLUDE_DIR - where to find gnutls.h, etc. # GCRYPT_LIBRARIES - List of libraries when using gnutls. if (GCRYPT_INCLUDE_DIR AND GCRYPT_LIBRARIES) set(GCRYPT_FIND_QUIETLY TRUE) endif (GCRYPT_INCLUDE_DIR AND GCRYPT_LIBRARIES) # Include dir find_path(GCRYPT_INCLUDE_DIR NAMES gcrypt.h ) # Library find_library(GCRYPT_LIBRARY NAMES gcrypt ) # handle the QUIETLY and REQUIRED arguments and set GCRYPT_FOUND to TRUE if # all listed variables are TRUE INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(GCRYPT DEFAULT_MSG GCRYPT_LIBRARY GCRYPT_INCLUDE_DIR) IF(GCRYPT_FOUND) SET( GCRYPT_LIBRARIES ${GCRYPT_LIBRARY} ) ELSE(GCRYPT_FOUND) SET( GCRYPT_LIBRARIES ) ENDIF(GCRYPT_FOUND) # Lastly make it so that the GCRYPT_LIBRARY and GCRYPT_INCLUDE_DIR variables # only show up under the advanced options in the gui cmake applications. MARK_AS_ADVANCED( GCRYPT_LIBRARY GCRYPT_INCLUDE_DIR ) nextepc-0.3.10/lib/freeDiameter-1.2.1/cmake/Modules/FindGnuTLS.cmake000066400000000000000000000052471333553357400244720ustar00rootroot00000000000000# - Find gnutls # Find the native GNUTLS includes and library # # GNUTLS_FOUND - True if gnutls found. # GNUTLS_INCLUDE_DIR - where to find gnutls.h, etc. # GNUTLS_LIBRARIES - List of libraries when using gnutls. # GNUTLS_VERSION_210 - true if GnuTLS version is >= 2.10.0 (does not require additional separate gcrypt initialization) # GNUTLS_VERSION_212 - true if GnuTLS version is >= 2.12.0 (supports gnutls_transport_set_vec_push_function) # GNUTLS_VERSION_300 - true if GnuTLS version is >= 3.00.0 (x509 verification functions changed) # GNUTLS_VERSION_310 - true if GnuTLS version is >= 3.01.0 (stabilization branch with new APIs) if (GNUTLS_INCLUDE_DIR AND GNUTLS_LIBRARIES) set(GNUTLS_FIND_QUIETLY TRUE) endif (GNUTLS_INCLUDE_DIR AND GNUTLS_LIBRARIES) # Include dir find_path(GNUTLS_INCLUDE_DIR NAMES gnutls.h gnutls/gnutls.h ) # Library find_library(GNUTLS_LIBRARY NAMES gnutls ) # handle the QUIETLY and REQUIRED arguments and set GNUTLS_FOUND to TRUE if # all listed variables are TRUE INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(GNUTLS DEFAULT_MSG GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR) IF(GNUTLS_FOUND) SET( GNUTLS_LIBRARIES ${GNUTLS_LIBRARY} ) ELSE(GNUTLS_FOUND) SET( GNUTLS_LIBRARIES ) ENDIF(GNUTLS_FOUND) # Lastly make it so that the GNUTLS_LIBRARY and GNUTLS_INCLUDE_DIR variables # only show up under the advanced options in the gui cmake applications. MARK_AS_ADVANCED( GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR ) # Now check if the library is recent. gnutls_hash was added in 2.10.0. # Also test library is even more recent. gnutls_x509_trust_list_verify_crt was added in 3.00.0. IF(GNUTLS_FOUND) IF( NOT( "${GNUTLS_VERSION_TEST_FOR}" STREQUAL "${GNUTLS_LIBRARY}" )) INCLUDE (CheckLibraryExists) MESSAGE(STATUS "Checking GNUTLS version") UNSET(GNUTLS_VERSION_210) UNSET(GNUTLS_VERSION_210 CACHE) UNSET(GNUTLS_VERSION_212) UNSET(GNUTLS_VERSION_212 CACHE) UNSET(GNUTLS_VERSION_300) UNSET(GNUTLS_VERSION_300 CACHE) UNSET(GNUTLS_VERSION_310) UNSET(GNUTLS_VERSION_310 CACHE) GET_FILENAME_COMPONENT(GNUTLS_PATH ${GNUTLS_LIBRARY} PATH) CHECK_LIBRARY_EXISTS(gnutls gnutls_hash ${GNUTLS_PATH} GNUTLS_VERSION_210) CHECK_LIBRARY_EXISTS(gnutls gnutls_transport_set_vec_push_function ${GNUTLS_PATH} GNUTLS_VERSION_212) CHECK_LIBRARY_EXISTS(gnutls gnutls_x509_trust_list_verify_crt ${GNUTLS_PATH} GNUTLS_VERSION_300) CHECK_LIBRARY_EXISTS(gnutls gnutls_handshake_set_timeout ${GNUTLS_PATH} GNUTLS_VERSION_310) SET( GNUTLS_VERSION_TEST_FOR ${GNUTLS_LIBRARY} CACHE INTERNAL "Version the test was made against" ) ENDIF (NOT( "${GNUTLS_VERSION_TEST_FOR}" STREQUAL "${GNUTLS_LIBRARY}" )) ENDIF(GNUTLS_FOUND) nextepc-0.3.10/lib/freeDiameter-1.2.1/cmake/Modules/FindIDNA.cmake000066400000000000000000000021731333553357400240640ustar00rootroot00000000000000# - Try to find GNU IDN library and headers # Once done, this will define # # IDNA_FOUND - system has IDNA # IDNA_INCLUDE_DIR - the IDNA include directories () # IDNA_LIBRARIES - link these to use IDNA (idna_to_ascii_8z) if (IDNA_INCLUDE_DIR AND IDNA_LIBRARIES) set(IDNA_FIND_QUIETLY TRUE) endif (IDNA_INCLUDE_DIR AND IDNA_LIBRARIES) # Include dir find_path(IDNA_INCLUDE_DIR NAMES idna.h ) # Library find_library(IDNA_LIBRARY NAMES idn ) # handle the QUIETLY and REQUIRED arguments and set IDNA_FOUND to TRUE if # all listed variables are TRUE INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(IDNA DEFAULT_MSG IDNA_LIBRARY IDNA_INCLUDE_DIR) # If we successfully found the idn library then add the library to the # IDNA_LIBRARIES cmake variable otherwise set IDNA_LIBRARIES to nothing. IF(IDNA_FOUND) SET( IDNA_LIBRARIES ${IDNA_LIBRARY} ) ELSE(IDNA_FOUND) SET( IDNA_LIBRARIES ) ENDIF(IDNA_FOUND) # Lastly make it so that the IDNA_LIBRARY and IDNA_INCLUDE_DIR variables # only show up under the advanced options in the gui cmake applications. MARK_AS_ADVANCED( IDNA_LIBRARY IDNA_INCLUDE_DIR ) nextepc-0.3.10/lib/freeDiameter-1.2.1/cmake/Modules/FindLibXml2.cmake000066400000000000000000000037401333553357400246230ustar00rootroot00000000000000# - Try to find the LibXml2 xml processing library # Once done this will define # # LIBXML2_FOUND - System has LibXml2 # LIBXML2_INCLUDE_DIR - The LibXml2 include directory # LIBXML2_LIBRARIES - The libraries needed to use LibXml2 # LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2 # LIBXML2_XMLLINT_EXECUTABLE - The XML checking tool xmllint coming with LibXml2 #============================================================================= # Copyright 2006-2009 Kitware, Inc. # Copyright 2006 Alexander Neundorf # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file Copyright.txt for details. # # This software is distributed WITHOUT ANY WARRANTY; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the License for more information. #============================================================================= # (To distributed this file outside of CMake, substitute the full # License text for the above reference.) # use pkg-config to get the directories and then use these values # in the FIND_PATH() and FIND_LIBRARY() calls FIND_PACKAGE(PkgConfig) PKG_CHECK_MODULES(PC_LIBXML libxml-2.0) SET(LIBXML2_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER}) FIND_PATH(LIBXML2_INCLUDE_DIR NAMES libxml/xpath.h HINTS ${PC_LIBXML_INCLUDEDIR} ${PC_LIBXML_INCLUDE_DIRS} PATH_SUFFIXES libxml2 ) FIND_LIBRARY(LIBXML2_LIBRARIES NAMES xml2 libxml2 HINTS ${PC_LIBXML_LIBDIR} ${PC_LIBXML_LIBRARY_DIRS} ) FIND_PROGRAM(LIBXML2_XMLLINT_EXECUTABLE xmllint) # for backwards compat. with KDE 4.0.x: SET(XMLLINT_EXECUTABLE "${LIBXML2_XMLLINT_EXECUTABLE}") # handle the QUIETLY and REQUIRED arguments and set LIBXML2_FOUND to TRUE if # all listed variables are TRUE INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR) MARK_AS_ADVANCED(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES LIBXML2_XMLLINT_EXECUTABLE) nextepc-0.3.10/lib/freeDiameter-1.2.1/cmake/Modules/FindMySQL.cmake000066400000000000000000000025351333553357400243200ustar00rootroot00000000000000# - Find mysqlclient # # -*- cmake -*- # # Find the native MySQL includes and library # # MySQL_INCLUDE_DIR - where to find mysql.h, etc. # MySQL_LIBRARIES - List of libraries when using MySQL. # MySQL_FOUND - True if MySQL found. IF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY) # Already in cache, be silent SET(MySQL_FIND_QUIETLY TRUE) ENDIF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY) # Include dir FIND_PATH(MySQL_INCLUDE_DIR NAMES mysql.h PATH_SUFFIXES mysql ) # Library #SET(MySQL_NAMES mysqlclient mysqlclient_r) #SET(MySQL_NAMES mysqlclient_r) SET(MySQL_NAMES mysqlclient_r mysqlclient) FIND_LIBRARY(MySQL_LIBRARY NAMES ${MySQL_NAMES} PATHS /usr/lib /usr/local/lib PATH_SUFFIXES mysql ) IF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY) SET(MySQL_FOUND TRUE) SET( MySQL_LIBRARIES ${MySQL_LIBRARY} ) ELSE (MySQL_INCLUDE_DIR AND MySQL_LIBRARY) SET(MySQL_FOUND FALSE) SET( MySQL_LIBRARIES ) ENDIF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY) IF (MySQL_FOUND) IF (NOT MySQL_FIND_QUIETLY) MESSAGE(STATUS "Found MySQL: ${MySQL_LIBRARY}") ENDIF (NOT MySQL_FIND_QUIETLY) ELSE (MySQL_FOUND) IF (MySQL_FIND_REQUIRED) MESSAGE(STATUS "Looked for MySQL libraries named ${MySQL_NAMES}.") MESSAGE(FATAL_ERROR "Could NOT find MySQL library") ENDIF (MySQL_FIND_REQUIRED) ENDIF (MySQL_FOUND) MARK_AS_ADVANCED( MySQL_LIBRARY MySQL_INCLUDE_DIR ) nextepc-0.3.10/lib/freeDiameter-1.2.1/cmake/Modules/FindPostgreSQL.cmake000066400000000000000000000021741333553357400253550ustar00rootroot00000000000000# - Find PostgreSQL library # # This module defines: # POSTGRESQL_FOUND - True if the package is found # POSTGRESQL_INCLUDE_DIR - containing libpq-fe.h # POSTGRESQL_LIBRARIES - Libraries to link to use PQ functions. if (POSTGRESQL_INCLUDE_DIR AND POSTGRESQL_LIBRARIES) set(POSTGRESQL_FIND_QUIETLY TRUE) endif (POSTGRESQL_INCLUDE_DIR AND POSTGRESQL_LIBRARIES) # Include dir find_path(POSTGRESQL_INCLUDE_DIR NAMES libpq-fe.h PATH_SUFFIXES pgsql postgresql ) # Library find_library(POSTGRESQL_LIBRARY NAMES pq ) # handle the QUIETLY and REQUIRED arguments and set POSTGRESQL_FOUND to TRUE if # all listed variables are TRUE INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(POSTGRESQL DEFAULT_MSG POSTGRESQL_LIBRARY POSTGRESQL_INCLUDE_DIR) IF(POSTGRESQL_FOUND) SET( POSTGRESQL_LIBRARIES ${POSTGRESQL_LIBRARY} ) ELSE(POSTGRESQL_FOUND) SET( POSTGRESQL_LIBRARIES ) ENDIF(POSTGRESQL_FOUND) # Lastly make it so that the POSTGRESQL_LIBRARY and POSTGRESQL_INCLUDE_DIR variables # only show up under the advanced options in the gui cmake applications. MARK_AS_ADVANCED( POSTGRESQL_LIBRARY POSTGRESQL_INCLUDE_DIR ) nextepc-0.3.10/lib/freeDiameter-1.2.1/cmake/Modules/FindSCTP.cmake000066400000000000000000000026011333553357400241160ustar00rootroot00000000000000# - Try to find SCTP library and headers # Once done, this will define # # SCTP_FOUND - system has SCTP # SCTP_INCLUDE_DIR - the SCTP include directories # SCTP_LIBRARIES - link these to use SCTP if (SCTP_INCLUDE_DIR AND SCTP_LIBRARIES) set(SCTP_FIND_QUIETLY TRUE) endif (SCTP_INCLUDE_DIR AND SCTP_LIBRARIES) # Include dir find_path(SCTP_INCLUDE_DIR NAMES netinet/sctp.h ) # Library find_library(SCTP_LIBRARY NAMES sctp ) # Set the include dir variables and the libraries and let libfind_process do the rest. # NOTE: Singular variables for this library, plural for libraries this this lib depends on. #set(SCTP_PROCESS_INCLUDES SCTP_INCLUDE_DIR) #set(SCTP_PROCESS_LIBS SCTP_LIBRARY) #libfind_process(SCTP) # handle the QUIETLY and REQUIRED arguments and set SCTP_FOUND to TRUE if # all listed variables are TRUE INCLUDE(FindPackageHandleStandardArgs) FIND_PACKAGE_HANDLE_STANDARD_ARGS(SCTP DEFAULT_MSG SCTP_LIBRARY SCTP_INCLUDE_DIR) # If we successfully found the sctp library then add the library to the # SCTP_LIBRARIES cmake variable otherwise set SCTP_LIBRARIES to nothing. IF(SCTP_FOUND) SET( SCTP_LIBRARIES ${SCTP_LIBRARY} ) ELSE(SCTP_FOUND) SET( SCTP_LIBRARIES ) ENDIF(SCTP_FOUND) # Lastly make it so that the SCTP_LIBRARY and SCTP_INCLUDE_DIR variables # only show up under the advanced options in the gui cmake applications. MARK_AS_ADVANCED( SCTP_LIBRARY SCTP_INCLUDE_DIR ) nextepc-0.3.10/lib/freeDiameter-1.2.1/cmake/Modules/GetVersionWithHg.cmake000066400000000000000000000012131333553357400257420ustar00rootroot00000000000000# This file is called at build time. It regenerates the version.h file based on the hg version. EXECUTE_PROCESS( COMMAND ${HGCOMMAND} id -i WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} RESULT_VARIABLE reshash OUTPUT_VARIABLE verhash ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) EXECUTE_PROCESS( COMMAND ${HGCOMMAND} id -n WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} RESULT_VARIABLE resval OUTPUT_VARIABLE verval ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) if (reshash EQUAL 0) SET(FD_PROJECT_VERSION_HG "${verval}(${verhash})") message(STATUS "Source version: ${FD_PROJECT_VERSION_HG}") endif (reshash EQUAL 0) CONFIGURE_FILE(${SRC} ${DST}) nextepc-0.3.10/lib/freeDiameter-1.2.1/configure.ac000066400000000000000000000173201333553357400213440ustar00rootroot00000000000000dnl Process this file with autoconf to produce a configure script. dnl dnl This file is free software; as a special exception the author gives dnl unlimited permission to copy and/or distribute it, with or without dnl modifications, as long as this notice is preserved. dnl dnl This program is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. AC_INIT([nextepc], [1.2.1], [acetcom@gmail.com]) AC_SUBST(LIBVERSION) LIBVERSION=1:0:0 dnl Must come before AM_INIT_AUTOMAKE. AC_CONFIG_AUX_DIR([build-aux]) AM_INIT_AUTOMAKE([1.10 -Wall -Werror foreign]) # Where to generate output; srcdir location. AC_CONFIG_HEADERS([include/freeDiameter/config.h]) AC_CANONICAL_HOST case $host in *-freebsd*) AC_DEFINE_UNQUOTED([SCTP_USE_MAPPED_ADDRESSES], [1], [Disable SCTP]) ;; *) ;; esac AH_TOP([ #ifndef FD_IS_CONFIG #define FD_IS_CONFIG #define _GNU_SOURCE 1 #ifdef __cplusplus extern "C" { #endif ]) AH_BOTTOM([ #define FD_PROJECT_COPYRIGHT "Copyright (c) 2008-2015, WIDE Project (www.wide.ad.jp) and NICT (www.nict.go.jp)" #ifndef FD_DEFAULT_CONF_FILENAME #define FD_DEFAULT_CONF_FILENAME "freeDiameter.conf" #endif /* FD_DEFAULT_CONF_FILENAME */ /* Maximum number of hooks handlers that can be registered. Make this compilation option if needed */ #define FD_HOOK_HANDLE_LIMIT 5 #ifdef __cplusplus } #endif #endif /* FD_IS_CONFIG */ ]) dnl kernel style compile messages m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) dnl Checks CC and freinds AC_PROG_MAKE_SET AC_PROG_CC AC_PROG_INSTALL AC_PROG_YACC AC_PROG_LEX AM_PROG_AR LT_INIT([dlopen pic-only disable-static]) dnl Checks for compile flag dnl AX_CHECK_COMPILE_FLAG([-Wno-format-truncation],[CFLAGS="$CFLAGS -Wno-format-truncation"]) dnl Check Endian AC_C_BIGENDIAN ############################# #### From FreeDiameter CMAKE ############################# touch include/freeDiameter/version.h rm -f libfdcore/fdd.tab.y ln -s fdd.y libfdcore/fdd.tab.y rm -f libfdcore/lex.fdd.l ln -s fdd.l libfdcore/lex.fdd.l AC_DEFINE_UNQUOTED([FD_PROJECT_BINARY], ["freeDiameterd"], [Project Binary]) AC_DEFINE_UNQUOTED([FD_PROJECT_NAME], ["freeDiameter"], [Project Name]) AC_DEFINE_UNQUOTED([FD_PROJECT_VERSION_MAJOR], [`echo $PACKAGE_VERSION | $SED 's/^\([[^\.]]\+\)\.\([[^\.]]\+\)\.\([[^\.]]\+\).*/\1/'`], [Major version of this package]) AC_DEFINE_UNQUOTED([FD_PROJECT_VERSION_MINOR], [`echo $PACKAGE_VERSION | $SED 's/^\([[^\.]]\+\)\.\([[^\.]]\+\)\.\([[^\.]]\+\).*/\2/'`], [Minor version of this package]) AC_DEFINE_UNQUOTED([FD_PROJECT_VERSION_REV], [`echo $PACKAGE_VERSION | $SED 's/^\([[^\.]]\+\)\.\([[^\.]]\+\)\.\([[^\.]]\+\).*/\3/'`], [Patch version of this package]) AC_DEFINE_UNQUOTED([FD_PROJECT_VERSION_API], [6], [API version of this package]) # adl_RECURSIVE_EVAL(VALUE, RESULT) # ================================= # Interpolate the VALUE in loop until it doesn't change, # and set the result to $RESULT. # WARNING: It's easy to get an infinite loop with some unsane input. # For example ${datadir} becomes ${datarootdir}, and then ${prefix}/share, and # finally ${prefix} is replaced by the prefix. AC_DEFUN([adl_RECURSIVE_EVAL], [_lcl_receval="$1" $2=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix" test "x$exec_prefix" = xNONE && exec_prefix="${prefix}" _lcl_receval_old='' while test "[$]_lcl_receval_old" != "[$]_lcl_receval"; do _lcl_receval_old="[$]_lcl_receval" eval _lcl_receval="\"[$]_lcl_receval\"" done echo "[$]_lcl_receval")`]) adl_RECURSIVE_EVAL(["${libdir}"], [LIB_DIR]) adl_RECURSIVE_EVAL(["${sysconfdir}"], [SYSCONF_DIR]) AC_SUBST(extlibdir) extlibdir=${libdir}/nextepc/freeDiameter AC_DEFINE_UNQUOTED([DEFAULT_CONF_PATH], ["${SYSCONF_DIR}/nextepc/freeDiameter"], [Default Configuration Path]) AC_DEFINE_UNQUOTED([DEFAULT_EXTENSIONS_PATH], ["${LIB_DIR}/nextepc/freeDiameter"], [Default Extensions Path]) AC_SUBST(PREFIX) AC_CHECK_FUNCS([strndup]) AC_CHECK_DECL([ntohll],[AC_DEFINE([HAVE_NTOHLL], [1], [Define to 1 if you have ntohll.])]) AC_CHECK_DECL([AI_ADDRCONFIG], [AC_DEFINE([HAVE_AI_ADDRCONFIG], [1], [Define AI_ADDRCONFIG])], [], [[#include ]]) AC_SEARCH_LIBS([clock_gettime], [rt], [AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Define clock_gettime])]) AC_SEARCH_LIBS([dlopen], [dl dld]) AC_SEARCH_LIBS([pthread_barrier_wait], [pthread], [AC_DEFINE([HAVE_PTHREAD_BAR], [1], [Define to 1 if you have pthread_barrier_wait in libpthread])], []) AC_SEARCH_LIBS([sctp_sendmsg], [sctp], [have_sctp_lib=yes]) if test x$have_sctp_lib != xyes; then AC_DEFINE([DISABLE_SCTP], [1], [Disable SCTP]) fi AM_CONDITIONAL([SCTP], [test x$have_sctp_lib = xyes]) AC_SEARCH_LIBS([gnutls_global_init], [gnutls],, [have_gnutls_lib=no]) if test x$have_gnutls_lib == xno; then AC_MSG_ERROR([You must install the GnuTLS libraries and development headers to enable GnuTLS support.]) fi AC_SEARCH_LIBS([gnutls_hash], [gnutls], [AC_DEFINE(GNUTLS_VERSION_210, 1, [Define to 1 if you have gnutls 2.10 installed])], []) AC_SEARCH_LIBS([gnutls_transport_set_vec_push_function], [gnutls], [AC_DEFINE(GNUTLS_VERSION_212, 1, [Define to 1 if you have gnutls 2.10 installed])], []) AC_SEARCH_LIBS([gnutls_x509_trust_list_verify_crt], [gnutls], [AC_DEFINE(GNUTLS_VERSION_300, 1, [Define to 1 if you have gnutls 3.0 installed])], []) AC_SEARCH_LIBS([gnutls_handshake_set_timeout], [gnutls], [AC_DEFINE(GNUTLS_VERSION_310, 1, [Define to 1 if you have gnutls 3.1 installed])], []) AC_SEARCH_LIBS([gcry_control], [gcrypt],, [have_gcrypt_lib=no]) if test x$have_gcrypt_lib == xno; then AC_MSG_ERROR([You must install the Libgcrypt libraries and development headers to enable Libgcrypt support.]) fi AC_SEARCH_LIBS([idna_strerror], [idn],, [have_idn_lib=no]) if test x$have_idn_lib == xno; then AC_MSG_ERROR([You must install the GNU Libidn libraries and development headers to enable GNU Libidn support.]) fi AC_CACHE_CHECK([whether sctp_connectx function accepts 4 arguments], [ap_cv_sctp_connectx], [AC_TRY_COMPILE( [#include #include ], [sctp_connectx(0, NULL, 0, NULL);], [ap_cv_sctp_connectx=yes], [ap_cv_sctp_connectx=no]) ]) if test "$ap_cv_sctp_connectx" = "yes"; then AC_DEFINE([SCTP_CONNECTX_4_ARGS], [1], [Define 1 if sctp_connectx function accepts 4 arguments]) fi ##################### #### Conclusion. #### ##################### AC_CONFIG_FILES([include/freeDiameter/freeDiameter-host.h:include/freeDiameter/freeDiameter-host.hin]) AC_CONFIG_FILES([libfdproto/Makefile]) AC_CONFIG_FILES([libfdcore/Makefile]) AC_CONFIG_FILES([extensions/dbg_msg_dumps/Makefile]) AC_CONFIG_FILES([extensions/dict_rfc5777/Makefile]) AC_CONFIG_FILES([extensions/dict_mip6i/Makefile]) AC_CONFIG_FILES([extensions/dict_nasreq/Makefile]) AC_CONFIG_FILES([extensions/dict_nas_mipv6/Makefile]) AC_CONFIG_FILES([extensions/dict_dcca/Makefile]) AC_CONFIG_FILES([extensions/dict_dcca_3gpp/Makefile]) AC_CONFIG_FILES([extensions/dict_s6a/Makefile]) AC_CONFIG_FILES([extensions/Makefile]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT echo " FreeDiameter configuration -------------------- version : ${PACKAGE_VERSION} host : ${host} source code location : ${srcdir} compiler : ${CC} compiler flags : ${CFLAGS} linker flags : ${LDFLAGS} ${LIBS} config directory : ${SYSCONF_DIR}/nextepc/freeDiameter extensions directory : ${LIB_DIR}/nextepc " nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/000077500000000000000000000000001333553357400205135ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/CxDx/000077500000000000000000000000001333553357400213615ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/CxDx/README000066400000000000000000000005501333553357400222410ustar00rootroot00000000000000Date: Thu, 13 Oct 2011 14:01:40 -0300 From: "Norberto R. de Goes Jr." To: help@freediameter.net Subject: [Help] Cx dictionary (samples "c" and "xml") Hi. Just a contribution, they were not tested. Best regards, -- Norberto R. de Goes Jr. CPqD - DRC Tel.: +55 19 3705-4241 / Fax: +55 19 3705-6125 norberto@cpqd.com.br www.cpqd.com.br nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/CxDx/dict_cxdx.c000066400000000000000000002141321333553357400235010ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Norberto R. de Goes Jr. * * * * Copyright (c) 2011, Norberto R. de Goes Jr.. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ /********************************************************************************************************* === CpqD/DRC - Projeto ADRIMS - Mar/2011 === === Dicionario Dx/Cx === Baseado no "dict_sip" do FreeDiameter (www.freediameter.net) Norberto R Goes Jr *********************************************************************************************************/ #include /* The content of this file follows the same structure as dict_base_proto.c */ #define CHECK_dict_new( _type, _data, _parent, _ref ) \ CHECK_FCT( fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref)) ); #define CHECK_dict_search( _type, _criteria, _what, _result ) \ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); struct local_rules_definition { char *avp_name; enum rule_position position; int min; int max; }; /*==================================================================*/ #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) /*==================================================================*/ #define PARSE_loc_rules( _rulearray, _parent, _avp_search_flag) { \ int __ar; \ for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ struct dict_rule_data __data = { NULL, \ (_rulearray)[__ar].position, \ 0, \ (_rulearray)[__ar].min, \ (_rulearray)[__ar].max}; \ __data.rule_order = RULE_ORDER(__data.rule_position); \ \ CHECK_FCT( fd_dict_search( \ fd_g_config->cnf_dict, \ DICT_AVP, \ _avp_search_flag, \ (_rulearray)[__ar].avp_name, \ &__data.rule_avp, 0 ) ); \ if ( !__data.rule_avp ) { \ TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_name ); \ return ENOENT; \ } \ \ CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL), \ { \ TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \ (_rulearray)[__ar].avp_name ); \ return EINVAL; \ } ); \ } \ } #define enumval_def_u32( _val_, _str_ ) \ { _str_, { .u32 = _val_ }} #define enumval_def_os( _len_, _val_, _str_ ) \ { _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}} /*==================================================================*/ /*==================================================================*/ /*==================================================================*/ /*==================================================================*/ int cxdx_dict_init(char * conffile) { #define VENDOR_3GPP_Id 10415 struct dict_object * vendor_dict; { struct dict_vendor_data vendor_data = { VENDOR_3GPP_Id, "3GPP" }; CHECK_dict_new (DICT_VENDOR, &vendor_data, NULL, &vendor_dict); } struct dict_object * cxdx_dict; { struct dict_application_data data = { 16777216 /* NRGJ */, "Diameter CxDx Application" }; CHECK_dict_new (DICT_APPLICATION, &data, vendor_dict, &cxdx_dict); } /* ##### AVP section #################################### */ { struct dict_object * UTF8String_type; struct dict_object * DiameterURI_type; CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterURI", &DiameterURI_type); /* Digest AVPs: */ /* Visited-Network-Identifier */ { struct dict_avp_data data = { 600, /* Code */ VENDOR_3GPP_Id, /* Vendor */ "Visited-Network-Identifier", /* Name */ AVP_FLAG_MANDATORY | AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_MANDATORY | AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Public-Identity */ { struct dict_avp_data data = { 601, /* Code */ VENDOR_3GPP_Id, /* Vendor */ "Public-Identity", /* Name */ AVP_FLAG_MANDATORY | AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_MANDATORY | AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Server-Name */ { struct dict_avp_data data = { 602, /* Code */ VENDOR_3GPP_Id, /* Vendor */ "Server-Name", /* Name */ AVP_FLAG_MANDATORY | AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_MANDATORY | AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , DiameterURI_type/*UTF8String_type*/, NULL); } /* Optional-Capability */ { struct dict_avp_data data = { 605, /* Code */ VENDOR_3GPP_Id, /* Vendor */ "Optional-Capability", /* Name */ AVP_FLAG_MANDATORY | AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_MANDATORY | AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Feature-List-ID */ { struct dict_avp_data data = { 629, /* Code */ VENDOR_3GPP_Id, /* Vendor */ "Feature-List-ID", /* Name */ AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Feature-List */ { struct dict_avp_data data = { 630, /* Code */ VENDOR_3GPP_Id, /* Vendor */ "Feature-List", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Server-Capabilities */ { struct dict_object * avp; struct dict_avp_data data = { 603, /* Code */ VENDOR_3GPP_Id, /* Vendor */ "Server-Capabilities", /* Name */ AVP_FLAG_MANDATORY | AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_MANDATORY | AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Vendor-Id", RULE_REQUIRED, -1, 1 }, { "Feature-List-ID", RULE_REQUIRED, -1, 1 }, { "Feature-List", RULE_REQUIRED, -1, 1 } }; CHECK_dict_new (DICT_AVP, &data , NULL, &avp); PARSE_loc_rules(rules, avp, AVP_BY_NAME_ALL_VENDORS ); } /* User-Authorization-Type */ { struct dict_avp_data data = { 623, /* Code */ VENDOR_3GPP_Id, /* Vendor */ "User-Authorization-Type", /* Name */ AVP_FLAG_MANDATORY | AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_MANDATORY | AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Supported-Features */ { struct dict_object * avp; struct dict_avp_data data = { 628, /* Code */ VENDOR_3GPP_Id, /* Vendor */ "Supported-Features", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Vendor-Id", RULE_REQUIRED, -1, 1 }, { "Feature-List-ID", RULE_REQUIRED, -1, 1 }, { "Feature-List", RULE_REQUIRED, -1, 1 } }; CHECK_dict_new (DICT_AVP, &data , NULL, &avp); PARSE_loc_rules(rules, avp, AVP_BY_NAME_ALL_VENDORS ); } } /* end AVP section */ /* ### Command section ############################# */ { /* User-Authorization-Request (UAR) Command */ { /* The User-Authorization-Request (UAR) is indicated by the Command-Code set to 283 and the Command Flags' 'R' bit set. The Diameter client in a SIP server sends this command to the Diameter server to request authorization for the SIP User Agent to route a SIP REGISTER request. Because the SIP REGISTER request implicitly carries a permission to bind an AOR to a contact address, the Diameter client uses the Diameter UAR as a first authorization request towards the Diameter server to authorize the registration. For instance, the Diameter server can verify that the AOR is a legitimate user of the realm. The Diameter client in the SIP server requests authorization for one of the possible values defined in the SIP-User-Authorization-Type AVP (Section 9.10). The user name used for authentication of the user is conveyed in a User-Name AVP (defined in the Diameter base protocol, RFC 3588 [RFC3588]). The location of the authentication user name in the SIP REGISTER request varies depending on the authentication mechanism. When the authentication mechanism is HTTP Digest as defined in RFC 2617 [RFC2617], the authentication user name is found in the "username" directive of the SIP Authorization header field value. This Diameter SIP application only provides support for HTTP Digest authentication in SIP; other authentication mechanisms are not currently supported. The SIP or SIPS URI to be registered is conveyed in the SIP-AOR AVP (Section 9.8). Typically this SIP or SIPS URI is found in the To header field value of the SIP REGISTER request that triggered the Diameter UAR message. The SIP-Visited-Network-Id AVP indicates the network that is providing SIP services (e.g., SIP proxy functionality or any other kind of services) to the SIP User Agent. The Message Format of the UAR command is as follows: < UAR> ::=< Diameter Header: 300, REQ, PXY, 16777216 > < Session-Id > { Vendor-Specific-Application-Id } { Auth-Session-State } { Origin-Host } { Origin-Realm } [ Destination-Host ] { Destination-Realm } { User-Name } *[ Supported-Features ] { Public-Identity } { Visited-Network-Identifier } [ User-Authorization-Type ] [ UAR-Flags ] *[ AVP ] *[ Proxy-Info ] *[ Route-Record ] */ struct dict_object * cmd; struct dict_cmd_data data = { 300, /* Code */ "User-Authorization-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 }, { "Vendor-Specific-Application-Id", RULE_REQUIRED, -1, 1 }, { "Auth-Session-State", RULE_REQUIRED, -1, 1 }, { "Origin-Host", RULE_REQUIRED, -1, 1 }, { "Origin-Realm", RULE_REQUIRED, -1, 1 }, // { "Destination-Host", RULE_OPTIONAL, -1, 1 }, { "Destination-Realm", RULE_REQUIRED, -1, 1 }, { "User-Name", RULE_REQUIRED, -1, 1 }, // { "Supported-Features", RULE_OPTIONAL, -1, -1 }, { "Public-Identity", RULE_REQUIRED, -1, 1 }, { "Visited-Network-Identifier", RULE_REQUIRED, -1, 1 }, // { "UAR-Flags", RULE_OPTIONAL, -1, 1 }, // { "User-Authorization-Type", RULE_OPTIONAL, -1, 1 }, // { "Proxy-Info", RULE_OPTIONAL, -1, -1 }, // { "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , cxdx_dict, &cmd); PARSE_loc_rules( rules, cmd, AVP_BY_NAME_ALL_VENDORS); } /* User-Authorization-Answer (UAA) Command */ { /* The User-Authorization-Answer (UAA) is indicated by the Command-Code set to 283 and the Command Flags' 'R' bit cleared. The Diameter server sends this command in response to a previously received Diameter User-Authorization-Request (UAR) command. The Diameter server indicates the result of the requested registration authorization. Additionally, the Diameter server may indicate a collection of SIP capabilities that assists the Diameter client to select a SIP proxy to the AOR under registration. In addition to the values already defined in RFC 3588 [RFC3588], the Result-Code AVP may contain one of the values defined in Section 10.1. Whenever the Diameter server fails to process the Diameter UAR message, it MUST stop processing and return the relevant error in the Diameter UAA message. When there is success in the process, the Diameter server MUST set the code to DIAMETER_SUCCESS in the Diameter UAA message. If the Diameter server requires a User-Name AVP value to process the Diameter UAR request, but the Diameter UAR message did not contain a User-Name AVP value, the Diameter server MUST set the Result-Code AVP value to DIAMETER_USER_NAME_REQUIRED (see Section 10.1.2) and return it in a Diameter UAA message. Upon reception of this Diameter UAA message with the Result-Code AVP value set to DIAMETER_USER_NAME_REQUIRED, the SIP server typically requests authentication by sending a SIP 401 (Unauthorized) or SIP 407 (Proxy Authentication Required) response back to the originator. When the authorization procedure succeeds, the Diameter server constructs a User-Authorization-Answer (UAA) message that MUST include (1) the address of the SIP server already assigned to the user name, (2) the capabilities needed by the SIP server (Diameter client) to select another SIP server for the user, or (3) a combination of the previous two options. If the Diameter server is already aware of a SIP server allocated to the user, the Diameter UAA message contains the address of that SIP server. The Diameter UAA message contains the capabilities required by a SIP server to trigger and execute services. It is required that these capabilities are present in the Diameter UAA message due to the possibility that the Diameter client (in the SIP server) allocates a different SIP server to trigger and execute services for that particular user. If a User-Name AVP is present in the Diameter UAR message, then the Diameter server MUST verify the existence of the user in the realm, i.e., the User-Name AVP value is a valid user within that realm. If the Diameter server does not recognize the user name received in the User-Name AVP, the Diameter server MUST build a Diameter User- Authorization-Answer (UAA) message and MUST set the Result-Code AVP to DIAMETER_ERROR_USER_UNKNOWN. If a User-Name AVP is present in the Diameter UAR message, then the Diameter server MUST authorize that User-Name AVP value is able to register the SIP or SIPS URI included in the SIP-AOR AVP. If this authorization fails, the Diameter server must set the Result-Code AVP to DIAMETER_ERROR_IDENTITIES_DONT_MATCH and send it in a Diameter User-Authorization-Answer (UAA) message. Note: Correlation between User-Name and SIP-AOR AVP values is required in order to avoid registration of a SIP-AOR allocated to another user. If there is a SIP-Visited-Network-Id AVP in the Diameter UAR message, and the SIP-User-Authorization-Type AVP value received in the Diameter UAR message is set to REGISTRATION or REGISTRATION& CAPABILITIES, then the Diameter server SHOULD verify whether the user is allowed to roam into the network specified in the SIP-Visited-Network-Id AVP in the Diameter UAR message. If the user is not allowed to roam into that network, the Diameter AAA server MUST set the Result-Code AVP value in the Diameter UAA message to DIAMETER_ERROR_ROAMING_NOT_ALLOWED. If the SIP-User-Authorization-Type AVP value received in the Diameter UAR message is set to REGISTRATION or REGISTRATION&CAPABILITIES, then the Diameter server SHOULD verify whether the SIP-AOR AVP value is authorized to register in the Home Realm. Where the SIP AOR is not authorized to register in the Home Realm, the Diameter server MUST set the Result-Code AVP to DIAMETER_AUTHORIZATION_REJECTED and send it in a Diameter UAA message. When the SIP-User-Authorization-Type AVP is not present in the Diameter UAR message, or when it is present and its value is set to REGISTRATION, then: o If the Diameter server is not aware of any previous registration of the user name (including registrations of other SIP AORs allocated to the same user name), then the Diameter server does not know of any SIP server allocated to the user. In this case, the Diameter server MUST set the Result-Code AVP value to DIAMETER_FIRST_REGISTRATION in the Diameter UAA message, and the Diameter server SHOULD include the required SIP server capabilities in the SIP-Server-Capabilities AVP value in the Diameter UAA message. The SIP-Server-Capabilities AVP assists the Diameter client (SIP server) to select an appropriate SIP server for the user, according to the required capabilities. o In some cases, the Diameter server is aware of a previously assigned SIP server for the same or different SIP AORs allocated to the same user name. In these cases, re-assignment of a new SIP server may or may not be needed, depending on the capabilities of the SIP server. The Diameter server MUST always include the allocated SIP server URI in the SIP-Server-URI AVP of the UAA message. If the Diameter server does not return the SIP capabilities, the Diameter server MUST set the Result-Code AVP in the Diameter UAA message to DIAMETER_SUBSEQUENT_REGISTRATION. Otherwise (i.e., if the Diameter server includes a SIP-Server-Capabilities AVP), then the Diameter server MUST set the Result-Code AVP in the Diameter UAA message to DIAMETER_SERVER_SELECTION. Then the Diameter client determines, based on the received information, whether it needs to select a new SIP server. When the SIP-User-Authorization-Type AVP value received in the Diameter UAR message is set to REGISTRATION&CAPABILITIES, then Diameter Server MUST return the list of capabilities in the SIP-Server-Capabilities AVP value of the Diameter UAA message, it MUST set the Result-Code to DIAMETER_SUCCESS, and it MUST NOT return a SIP-Server-URI AVP. The SIP-Server-Capabilities AVP enables the SIP server (Diameter client) to select another appropriate SIP server for invoking and executing services for the user, depending on the required capabilities. The Diameter server MAY leave the list of capabilities empty to indicate that any SIP server can be selected. When the SIP-User-Authorization-Type AVP value received in the Diameter UAR message is set to DEREGISTRATION, then: o If the Diameter server is aware of a SIP server assigned to the SIP AOR under deregistration, the Diameter server MUST set the Result-Code AVP to DIAMETER_SUCCESS and MUST set the SIP-Server-URI AVP value to the known SIP server, and return them in the Diameter UAA message. o If the Diameter server is not aware of a SIP server assigned to the SIP AOR under deregistration, then the Diameter server MUST set the Result-Code AVP in the Diameter UAA message to DIAMETER_ERROR_IDENTITY_NOT_REGISTERED. The Message Format of the UAA command is as follows: ::= < Diameter Header: 283, PXY > < Session-Id > { Auth-Application-Id } { Auth-Session-State } { Result-Code } { Origin-Host } { Origin-Realm } [ SIP-Server-URI ] [ SIP-Server-Capabilities ] [ Authorization-Lifetime ] [ Auth-Grace-Period ] [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Max-Cache-Time ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 300, /* Code */ "User-Authorization-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 }, { "Auth-Application-Id", RULE_REQUIRED, -1, 1 }, { "Auth-Session-State", RULE_REQUIRED, -1, 1 }, { "Result-Code", RULE_REQUIRED, -1, 1 }, { "Origin-Host", RULE_REQUIRED, -1, 1 }, { "Origin-Realm", RULE_REQUIRED, -1, 1 }, { "Proxy-Info", RULE_OPTIONAL, -1, -1 }, { "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , cxdx_dict, &cmd); PARSE_loc_rules( rules, cmd, AVP_BY_NAME ); } #if 0 /* TODO - NRGJ : alterar conforme RFC-3GPP : */ /* Multimedia-Auth-Request (MAR) Command */ { /* The Multimedia-Auth-Request (MAR) command is indicated by the Command-Code set to 286 and the Command Flags' 'R' bit set. The Diameter client in a SIP server sends this command to the Diameter server to request that the Diameter server authenticate and authorize a user attempt to use some SIP service (in this context, SIP service can be something as simple as a SIP subscription or using the proxy services for a SIP request). The MAR command may also register the SIP server's own URI to the Diameter server, so that future LIR/LIA messages can return this URI. If the SIP server is acting as a SIP registrar (see examples in Sections 6.2 and 6.3), its Diameter client MUST include a SIP- Server-URI AVP in the MAR command. In any other cases (see example in Section 6.4), its Diameter client MUST NOT include a SIP-Server- URI AVP in the MAR command. The SIP-Method AVP MUST include the SIP method name of the SIP request that triggered this Diameter MAR message. The Diameter server can use this AVP to authorize some SIP requests depending on the method. The Diameter MAR message MUST include a SIP-AOR AVP. The SIP-AOR AVP indicates the target of the SIP request. The value of the AVP is extracted from different places in SIP request, depending on the semantics of the SIP request. For SIP REGISTER messages the SIP-AOR AVP value indicates the intended public user identity under registration, and it is the SIP or SIPS URI populated in the To header field value (addr-spec as per RFC 3261 [RFC3261]) of the SIP REGISTER request. For other types of SIP requests, such as INVITE, SUBSCRIBE, MESSAGE, etc., the SIP-AOR AVP value indicates the intended destination of the request. This is typically populated in the Request-URI of the SIP request. Extracting the SIP-AOR AVP value from the proper SIP header field is the Diameter client's responsibility. Extensions to SIP (new SIP methods or new semantics) may require the SIP-AOR to be extracted from other parts of the request. If the SIP request includes some sort of authentication information, the Diameter client MUST include the user name, extracted from the authentication information of the SIP request, in the User-Name AVP value. The Message Format of the MAR command is as follows: ::= < Diameter Header: 286, REQ, PXY > < Session-Id > { Auth-Application-Id } { Auth-Session-State } { Origin-Host } { Origin-Realm } { Destination-Realm } { SIP-AOR } { SIP-Method } [ Destination-Host ] [ User-Name ] [ SIP-Server-URI ] [ SIP-Number-Auth-Items ] [ SIP-Auth-Data-Item ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 303, /* Code */ "Multimedia-Auth-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } ,{ "SIP-AOR", RULE_REQUIRED, -1, 1 } ,{ "SIP-Method", RULE_REQUIRED, -1, 1 } ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "SIP-Server-URI", RULE_OPTIONAL, -1, 1 } ,{ "SIP-Number-Auth-Items", RULE_OPTIONAL, -1, 1 } ,{ "SIP-Auth-Data-Item", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , cxdx_dict, &cmd); PARSE_loc_rules( rules, cmd, AVP_BY_NAME ); } /* Multimedia-Auth-Answer (MAA) Command */ { /* The Multimedia-Auth-Answer (MAA) is indicated by the Command-Code set to 286 and the Command Flags' 'R' bit cleared. The Diameter server sends this command in response to a previously received Diameter Multimedia-Auth-Request (MAR) command. In addition to the values already defined in RFC 3588 [RFC3588], the Result-Code AVP may contain one of the values defined in Section 10.1. If the Diameter server requires a User-Name AVP value to process the Diameter MAR request, but the Diameter MAR message did not contain a User-Name AVP value, the Diameter server MUST set the Result-Code AVP value to DIAMETER_USER_NAME_REQUIRED (see Section 10.1.2) and return it in a Diameter MAA message. The Diameter server MAY include a SIP-Number-Auth-Items AVP and one or more SIP-Auth-Data-Item AVPs with authentication information (e.g., a challenge). Upon reception of this Diameter MAA message with the Result-Code AVP value set to DIAMETER_USER_NAME_REQUIRED, the SIP server typically requests authentication by generating a SIP 401 (Unauthorized) or SIP 407 (Proxy Authentication Required) response back to the originator. If the User-Name AVP is present in the Diameter MAR message, the Diameter server MUST verify the existence of the user in the realm, i.e., the User-Name AVP value is a valid user within that realm. If the Diameter server does not recognize the user name received in the User-Name AVP, the Diameter server MUST build a Diameter Multimedia-Auth-Answer (MAA) message and MUST set the Result-Code AVP to DIAMETER_ERROR_USER_UNKNOWN. If the SIP-Methods AVP value of the Diameter MAR message is set to REGISTER and a User-Name AVP is present, then the Diameter server MUST authorize that User-Name AVP value is able to use the URI included in the SIP-AOR AVP. If this authorization fails, the Diameter server must set the Result-Code AVP to DIAMETER_ERROR_IDENTITIES_DONT_MATCH and send it in a Diameter Multimedia-Auth-Answer (MAA) message. Note: Correlation between User-Name and SIP-AOR AVP values is only required for SIP REGISTER request, to prevent a user from registering a SIP-AOR allocated to another user. In other types of SIP requests (e.g., INVITE), the SIP-AOR indicates the intended destination of the request, rather than the originator of it. The Diameter server MUST verify whether the authentication scheme (SIP-Authentication-Scheme AVP value) indicated in the grouped SIP-Auth-Data-Item AVP is supported or not. If that authentication scheme is not supported, then the Diameter server MUST set the Result-Code AVP to DIAMETER_ERROR_AUTH_SCHEME_NOT_SUPPORTED and send it in a Diameter Multimedia-Auth-Answer (MAA) message. If the SIP-Number-Auth-Items AVP is present in the Diameter MAR message, it indicates the number of authentication data items that the Diameter client is requesting. It is RECOMMENDED that the Diameter server, when building the Diameter MAA message, includes a number of SIP-Auth-Data-Item AVPs that are a subset of the authentication data items requested by the Diameter client in the SIP-Number-Auth-Items AVP value of the Diameter MAR message. If the SIP-Server-URI AVP is present in the Diameter MAR message, then the Diameter server MUST compare the stored SIP server (assigned to the user) with the SIP-Server-URI AVP value (received in the Diameter MAR message). If they don't match, the Diameter server MUST temporarily save the newly received SIP server assigned to the user, and MUST set an "authentication pending" flag for the user. If they match, the Diameter server shall clear the "authentication pending" flag for the user. In any other situation, if there is a success in processing the Diameter MAR command and the Diameter server stored the SIP-Server-URI, the Diameter server MUST set the Result-Code AVP value to DIAMETER_SUCCESS and return it in a Diameter MAA message. If there is a success in processing the Diameter MAR command, but the Diameter server does not store the SIP-Server-URI because the AVP was not present in the Diameter MAR command, then the Diameter server MUST set the Result-Code AVP value to either: 1. DIAMETER_SUCCESS_AUTH_SENT_SERVER_NOT_STORED, if the Diameter server is sending authentication credentials to create a challenge. 2. DIAMETER_SUCCESS_SERVER_NAME_NOT_STORED, if the Diameter server successfully authenticated the user and authorized the SIP server to proceed with the SIP request. Otherwise, the Diameter server MUST set the Result-Code AVP value to DIAMETER_UNABLE_TO_COMPLY, and it MUST NOT include any SIP-Auth-Data-Item AVP. The Message Format of the MAA command is as follows: ::= < Diameter Header: 286, PXY > < Session-Id > { Auth-Application-Id } { Result-Code } { Auth-Session-State } { Origin-Host } { Origin-Realm } [ User-Name ] [ SIP-AOR ] [ SIP-Number-Auth-Items ] * [ SIP-Auth-Data-Item ] [ Authorization-Lifetime ] [ Auth-Grace-Period ] [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Max-Cache-Time ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 286, /* Code */ "Multimedia-Auth-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Result-Code", RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "SIP-AOR", RULE_OPTIONAL, -1, 1 } ,{ "SIP-Number-Auth-Items", RULE_OPTIONAL, -1, 1 } ,{ "SIP-Auth-Data-Item", RULE_OPTIONAL, -1, -1 } ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Host", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , cxdx_dict, &cmd); PARSE_loc_rules( rules, cmd, AVP_BY_NAME ); } /* Server-Assignment-Request (SAR) Command */ { /* The Server-Assignment-Request (SAR) command is indicated by the Command-Code set to 284 and the Command Flags' 'R' bit set. The Diameter client in a SIP server sends this command to the Diameter server to indicate the completion of the authentication process and to request that the Diameter server store the URI of the SIP server that is currently serving the user. The main functions of the Diameter SAR command are to inform the Diameter server of the URI of the SIP server allocated to the user, and to store or clear it from the Diameter server. Additionally, the Diameter client can request to download the user profile or part of it. During the registration procedure, a SIP server becomes assigned to the user. The Diameter client in the assigned SIP server MUST include its own URI in the SIP-Server-URI AVP of the Server-Assignment-Request (SAR) Diameter message and send it to the Diameter server. The Diameter server then becomes aware of the allocation of the SIP server to the user name and the server's URI. The Diameter client in the SIP server MAY send a Diameter SAR message because of other reasons. These reasons are identified in the SIP-Server-Assignment-Type AVP (Section 9.4) value. For instance, a Diameter client in a SIP server may contact the Diameter server to request deregistration of a user, to inform the Diameter server of an authentication failure, or just to download the user profile. For a complete description of all the SIP-Server-Assignment-Type AVP values, see Section 9.4. Typically the reception of a SIP REGISTER request in a SIP server will trigger the Diameter client in the SIP server to send the Diameter SAR message. However, if a SIP server is receiving other SIP request, such as INVITE, and the SIP server does not have the user profile, the Diameter client in the SIP server may send the Diameter SAR message to the Diameter server in order to download the user profile and make the Diameter server aware of the SIP server assigned to the user. The user profile is an important piece of information that dictates the behavior of the SIP server when triggering or providing services for the user. Typically the user profile is divided into: o Services to be rendered to the user when the user is registered and initiates a SIP request. o Services to be rendered to the user when the user is registered and a SIP request destined to that user arrives to the SIP proxy. o Services to be rendered to the user when the user is not registered and a SIP request destined to that user arrives to the SIP proxy. The SIP-Server-Assignment-Type AVP indicates the reason why the Diameter client (SIP server) contacted the Diameter server. If the Diameter client sets the SIP-Server-Assignment-Type AVP value to REGISTRATION, RE_REGISTRATION, UNREGISTERED_USER, NO_ASSIGNMENT, AUTHENTICATION_FAILURE or AUTHENTICATION_TIMEOUT, the Diameter client MUST include exactly one SIP-AOR AVP in the Diameter SAR message. The SAR message MAY contain zero or more SIP-Supported-User-Data-Type AVPs. Each of them contains a type of user data understood by the SIP server. This allows the Diameter client to provide an indication to the Diameter server of the different format of user data understood by the SIP server. The Diameter server uses this information to select one or more SIP-User-Data AVPs that will be included in the SAA message. The Message Format of the SAR command is as follows: ::= < Diameter Header: 284, REQ, PXY > < Session-Id > { Auth-Application-Id } { Auth-Session-State } { Origin-Host } { Origin-Realm } { Destination-Realm } { SIP-Server-Assignment-Type } { SIP-User-Data-Already-Available } [ Destination-Host ] [ User-Name ] [ SIP-Server-URI ] * [ SIP-Supported-User-Data-Type ] * [ SIP-AOR ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 284, /* Code */ "Server-Assignment-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } ,{ "SIP-Server-Assignment-Type", RULE_REQUIRED, -1, 1 } ,{ "SIP-User-Data-Already-Available", RULE_REQUIRED, -1, 1 } ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "SIP-Server-URI", RULE_OPTIONAL, -1, 1 } ,{ "SIP-Supported-User-Data-Type", RULE_OPTIONAL, -1, -1 } ,{ "SIP-AOR", RULE_OPTIONAL, -1, -1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , cxdx_dict, &cmd); PARSE_loc_rules( rules, cmd, AVP_BY_NAME ); } /* Server-Assignment-Answer (SAA) Command */ { /* The Server-Assignment-Answer (SAA) is indicated by the Command-Code set to 284 and the Command Flags' 'R' bit cleared. The Diameter server sends this command in response to a previously received Diameter Server-Assignment-Request (SAR) command. The response may include the user profile or part of it, if requested. In addition to the values already defined in RFC 3588 [RFC3588], the Result-Code AVP may contain one of the values defined in Section 10.1. The Result-Code AVP value in the Diameter SAA message may indicate a success or an error in the execution of the Diameter SAR command. If Result-Code AVP value in the Diameter SAA message does not contain an error code, the SAA message MAY include one or more SIP-User-Data AVPs that typically contain the profile of the user, indicating services that the SIP server can provide to that user. The Diameter server MAY include one or more SIP-Supported-User-Data-Type AVPs, each one identifying a type of user data format supported in the Diameter server. If there is not a common supported user data type between the Diameter client and the Diameter server, the Diameter server SHOULD declare its list of supported user data types by including one or more SIP-Supported-User-Data-Type AVPs in a Diameter SAA message. This indication is merely for debugging reasons, since there is not a fallback mechanism that allows the Diameter client to retrieve the profile in a supported format. If the Diameter server requires a User-Name AVP value to process the Diameter SAR request, but the Diameter SAR message did not contain a User-Name AVP value, the Diameter server MUST set the Result-Code AVP value to DIAMETER_USER_NAME_REQUIRED (see Section 10.1.2) and return it in a Diameter SAA message. Upon reception of this Diameter SAA message with the Result-Code AVP value set to DIAMETER_USER_NAME_REQUIRED, the SIP server typically requests authentication by generating a SIP 401 (Unauthorized) or SIP 407 (Proxy Authentication Required) response back to the originator. If the User-Name AVP is included in the Diameter SAR message, upon reception of the Diameter SAR message, the Diameter server MUST verify the existence of the user in the realm, i.e., the User-Name AVP value is a valid user within that realm. If the Diameter server does not recognize the user name received in the User-Name AVP, the Diameter server MUST build a Diameter Server-Assignment-Answer (SAA) message and MUST set the Result-Code AVP to DIAMETER_ERROR_USER_UNKNOWN. Then the Diameter server MUST authorize that User-Name AVP value is a valid authentication name for the SIP or SIPS URI included in the SIP-AOR AVP of the Diameter SAR message. If this authorization fails, the Diameter server must set the Result-Code AVP to DIAMETER_ERROR_IDENTITIES_DONT_MATCH and send it in a Diameter Server-Assignment-Answer (SAA) message. After successful execution of the Diameter SAR command, the Diameter server MUST clear the "authentication pending" flag and SHOULD move the temporarily stored SIP server URI to permanent storage. The actions of the Diameter server upon reception of the Diameter SAR message depend on the value of the SIP-Server-Assignment-Type: o If the SIP-Server-Assignment-Type AVP value in the Diameter SAR message is set to REGISTRATION or RE_REGISTRATION, the Diameter server SHOULD verify that there is only one SIP-AOR AVP. Otherwise, the Diameter server MUST answer with a Diameter SAA message with the Result-Code AVP value set to DIAMETER_AVP_OCCURS_TOO_MANY_TIMES and MUST NOT include any SIP-User-Data AVP. If there is only one SIP-AOR AVP and if the SIP-User-Data-Already-Available AVP value is set to USER_DATA_NOT_AVAILABLE, then the Diameter server SHOULD include one or more user profile data with the SIP or SIPS URI (SIP-AOR AVP) and all other SIP identities associated with that AVP in the SIP-User-Data AVP value of the Diameter SAA message. On selecting the type of user data, the Diameter server SHOULD take into account the supported formats at the SIP server (SIP-Supported-User-Data-Type AVP in the SAR message) and the local policy. Additionally, the Diameter server MUST set the Result-Code AVP value to DIAMETER_SUCCESS in the Diameter SAA message. The Diameter server considers the SIP AOR authenticated and registered. o If the SIP-Server-Assignment-Type AVP value in the Diameter SAR message is set to UNREGISTERED_USER, then the Diameter server MUST store the SIP server address included in the SIP-Server-URI AVP value. The Diameter server will return the SIP server address in Diameter Location-Info-Answer (LIA) messages. If the SIP-User-Data-Already-Available AVP value is set to USER_DATA_NOT_AVAILABLE, then the Diameter server SHOULD include one or more user profile data associated with the SIP or SIPS URI (SIP-AOR AVP) and associated identities in the SIP-User-Data AVP value of the Diameter SAA message. On selecting the type of user data, the Diameter server SHOULD take into account the supported formats at the SIP server (SIP-Supported-User-Data-Type AVP in the SAR message) and the local policy. The Diameter server MUST set the Result-Code AVP value to DIAMETER_SUCCESS. The Diameter server considers the SIP AOR UNREGISTERED, but with a SIP server allocated to trigger and provide services for unregistered users. Note that in case of UNREGISTERED_USER (SIP-Server-Assignment-Type AVP), the Diameter server MUST verify that there is only one SIP-AOR AVP. Otherwise, the Diameter server MUST answer the Diameter SAR message with a Diameter SAA message, and it MUST set the Result-Code AVP value to DIAMETER_AVP_OCCURS_TOO_MANY_TIMES and MUST NOT include any SIP-User-Data AVP. If the User-Name AVP was not present in the Diameter SAR message and the SIP-AOR is not known for the Diameter server, the Diameter server MUST NOT include a User-Name AVP in the Diameter SAA message and MUST set the Result-Code AVP value to DIAMETER_ERROR_USER_UNKNOWN. o If the SIP-Server-Assignment-Type AVP value in the Diameter SAR message is set to TIMEOUT_DEREGISTRATION, USER_DEREGISTRATION, DEREGISTRATION_TOO_MUCH_DATA, or ADMINISTRATIVE_DEREGISTRATION, the Diameter server MUST clear the SIP server address associated with all SIP AORs indicated in each of the SIP-AOR AVP values included in the Diameter SAR message. The Diameter server considers all of these SIP AORs as not registered. The Diameter server MUST set the Result-Code AVP value to DIAMETER_SUCCESS in the Diameter SAA message. o If the SIP-Server-Assignment-Type AVP value in the Diameter SAR message is set to TIMEOUT_DEREGISTRATION_STORE_SERVER_NAME or USER_DEREGISTRATION_STORE_SERVER_NAME, the Diameter server MAY keep the SIP server address associated with the SIP AORs included in the SIP-AOR AVP values of the Diameter SAR message, even though the SIP AORs become unregistered. This feature allows a SIP server to request that the Diameter server remain an assigned SIP server for those SIP AORs (SIP-AOR AVP values) allocated to the same user name, and avoid SIP server assignment. The Diameter server MUST consider all these SIP AORs as not registered. If the Diameter server honors the request of the Diameter client (SIP server) to remain as an allocated SIP server, then the Diameter server MUST keep the SIP server assigned to those SIP AORs allocated to the username and MUST set the Result-Code AVP value to DIAMETER_SUCCESS in the Diameter SAA message. Otherwise, when the Diameter server does not honor the request of the Diameter client (SIP server) to remain as an allocated SIP server, the Diameter server MUST clear the SIP server name assigned to those SIP AORs and it MUST set the Result-Code AVP value to DIAMETER_SUCCESS_SERVER_NAME_NOT_STORED in the Diameter SAA message. o If the SIP-Server-Assignment-Type AVP value in the Diameter SAR message is set to NO_ASSIGNMENT, the Diameter server SHOULD first verify that the SIP-Server-URI AVP value in the Diameter SAR message is the same URI as the one assigned to the SIP-AOR AVP value. If they differ, then the Diameter server MUST set the Result-Code AVP value to DIAMETER_UNABLE_TO_COMPLY in the Diameter SAA message. Otherwise, if the SIP-User-Data-Already-Available AVP value is set to USER_DATA_NOT_AVAILABLE, then the Diameter server SHOULD include the user profile data with the SIP or SIPS URI (SIP-AOR AVP) and all other SIP identities associated with that AVP in the SIP-User-Data AVP value of the Diameter SAA message. On selecting the type of user data, the Diameter server SHOULD take into account the supported formats at the SIP server (SIP-Supported-User-Data-Type AVP in the SAR message) and the local policy. o If the SIP-Server-Assignment-Type AVP value in the Diameter SAR message is set to AUTHENTICATION_FAILURE or AUTHENTICATION_TIMEOUT, the Diameter server MUST verify that there is exactly one SIP-AOR AVP in the Diameter SAR message. If the number of occurrences of the SIP-AOR AVP is not exactly one, the Diameter server MUST set the Result-Code AVP value to DIAMETER_AVP_OCCURS_TOO_MANY_TIMES in the Diameter SAA message, and SHOULD not take further actions. If there is exactly one SIP-AOR AVP in the Diameter SAR message, the Diameter server MUST clear the address of the SIP server assigned to the SIP AOR allocated to the user name, and the Diameter server MUST set the Result-Code AVP value to DIAMETER_SUCCESS in the Diameter SAA message. The Diameter server MUST consider the SIP AOR as not registered. The Message Format of the SAA command is as follows: ::= < Diameter Header: 284, PXY > < Session-Id > { Auth-Application-Id } { Result-Code } { Auth-Session-State } { Origin-Host } { Origin-Realm } * [ SIP-User-Data ] [ SIP-Accounting-Information ] * [ SIP-Supported-User-Data-Type ] [ User-Name ] [ Auth-Grace-Period ] [ Authorization-Lifetime ] [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Max-Cache-Time ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 284, /* Code */ "Server-Assignment-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Result-Code", RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "SIP-User-Data", RULE_OPTIONAL, -1, -1 } ,{ "SIP-Accounting-Information", RULE_OPTIONAL, -1, 1 } ,{ "SIP-Supported-User-Data-Type", RULE_OPTIONAL, -1, -1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 } ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Host", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , cxdx_dict, &cmd); PARSE_loc_rules( rules, cmd, AVP_BY_NAME ); } /* Location-Info-Request (LIR) Command */ { /* The Location-Info-Request (LIR) is indicated by the Command-Code set to 285 and the Command Flags' 'R' bit set. The Diameter client in a SIP server sends this command to the Diameter server to request routing information, e.g., the URI of the SIP server assigned to the SIP-AOR AVP value allocated to the users. The Message Format of the LIR command is as follows: ::= < Diameter Header: 285, REQ, PXY > < Session-Id > { Auth-Application-Id } { Auth-Session-State } { Origin-Host } { Origin-Realm } { Destination-Realm } { SIP-AOR } [ Destination-Host ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 285, /* Code */ "Location-Info-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } ,{ "SIP-AOR", RULE_REQUIRED, -1, 1 } ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , cxdx_dict, &cmd); PARSE_loc_rules( rules, cmd, AVP_BY_NAME ); } /* Location-Info-Answer (LIA) Command */ { /* The Location-Info-Answer (LIA) is indicated by the Command-Code set to 285 and the Command Flags' 'R' bit cleared. The Diameter server sends this command in response to a previously received Diameter Location-Info-Request (LIR) command. In addition to the values already defined in RFC 3588 [RFC3588], the Result-Code AVP may contain one of the values defined in Section 10.1. When the Diameter server finds an error in processing the Diameter LIR message, the Diameter server MUST stop the process of the message and answer with a Diameter LIA message that includes the appropriate error code in the Result-Code AVP value. When there is no error, the Diameter server MUST set the Result-Code AVP value to DIAMETER_SUCCESS in the Diameter LIA message. One of the errors that the Diameter server may find is that the SIP-AOR AVP value is not a valid user in the realm. In such cases, the Diameter server MUST set the Result-Code AVP value to DIAMETER_ERROR_USER_UNKNOWN and return it in a Diameter LIA message. If the Diameter server cannot process the Diameter LIR command, e.g., due to a database error, the Diameter server MUST set the Result-Code AVP value to DIAMETER_UNABLE_TO_COMPLY and return it in a Diameter LIA message. The Diameter server MUST NOT include any SIP-Server-URI or SIP-Server-Capabilities AVP in the Diameter LIA message. The Diameter server may or may not be aware of a SIP server assigned to the SIP-AOR AVP value included in the Diameter LIR message. If the Diameter server is aware of a SIP server allocated to that particular user, the Diameter server MUST include the URI of such SIP server in the SIP-Server-URI AVP and return it in a Diameter LIA message. This is typically the situation when the user is either registered, or unregistered but a SIP server is still assigned to the user. When the Diameter server is not aware of a SIP server allocated to the user (typically the case when the user unregistered), the Result-Code AVP value in the Diameter LIA message depends on whether the Diameter server is aware that the user has services defined for unregistered users: o Those users who have services defined for unregistered users may require the allocation of a SIP server to trigger and perhaps execute those services. Therefore, when the Diameter server is not aware of an assigned SIP server, but the user has services defined for unregistered users, the Diameter server MUST set the Result-Code AVP value to DIAMETER_UNREGISTERED_SERVICE and return it in a Diameter LIA message. The Diameter server MAY also include a SIP-Server-Capabilities AVP to facilitate the SIP server (Diameter client) with the selection of an appropriate SIP server with the required capabilities. Absence of the SIP-Server- Capabilities AVP indicates to the SIP server (Diameter client) that any SIP server is suitable to be allocated for the user. o Those users who do not have service defined for unregistered users do not require further processing. The Diameter server MUST set the Result-Code AVP value to DIAMETER_ERROR_IDENTITY_NOT_REGISTERED and return it to the Diameter client in a Diameter LIA message. The SIP server (Diameter client) may return the appropriate SIP response (e.g., 480 (Temporarily unavailable)) to the original SIP request. The Message Format of the LIA command is as follows: ::= < Diameter Header: 285, PXY > < Session-Id > { Auth-Application-Id } { Result-Code } { Auth-Session-State } { Origin-Host } { Origin-Realm } [ SIP-Server-URI ] [ SIP-Server-Capabilities ] [ Auth-Grace-Period ] [ Authorization-Lifetime ] [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Max-Cache-Time ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 285, /* Code */ "Location-Info-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Result-Code", RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "SIP-Server-URI", RULE_OPTIONAL, -1, 1 } ,{ "SIP-Server-Capabilities", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 } ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Host", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , cxdx_dict, &cmd); PARSE_loc_rules( rules, cmd, AVP_BY_NAME ); } /* Registration-Termination-Request (RTR) Command */ { /* The Registration-Termination-Request (RTR) command is indicated by the Command-Code set to 287 and the Command Flags' 'R' bit set. The Diameter server sends this command to the Diameter client in a SIP server to indicate to the SIP server that one or more SIP AORs have to be deregistered. The command allows an operator to administratively cancel the registration of a user from a centralized Diameter server. The Diameter server has the capability to initiate the deregistration of a user and inform the SIP server by means of the Diameter RTR command. The Diameter server can decide whether only one SIP AOR is going to be deregistered, a list of SIP AORs, or all the SIP AORs allocated to the user. The absence of a SIP-AOR AVP in the Diameter RTR message indicates that all the SIP AORs allocated to the user identified by the User-Name AVP are being deregistered. The Diameter server MUST include a SIP-Deregistration-Reason AVP value to indicate the reason for the deregistration. The Message Format of the RTR command is as follows: ::= < Diameter Header: 287, REQ, PXY > < Session-Id > { Auth-Application-Id } { Auth-Session-State } { Origin-Host } { Origin-Realm } { Destination-Host } { SIP-Deregistration-Reason } [ Destination-Realm ] [ User-Name ] * [ SIP-AOR ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 287, /* Code */ "Registration-Termination-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 }, { "Auth-Application-Id", RULE_REQUIRED, -1, 1 }, { "Auth-Session-State", RULE_REQUIRED, -1, 1 }, { "Origin-Host", RULE_REQUIRED, -1, 1 }, { "Origin-Realm", RULE_REQUIRED, -1, 1 }, { "Destination-Host", RULE_REQUIRED, -1, 1 }, { "SIP-Deregistration-Reason",RULE_REQUIRED, -1, 1 }, { "Destination-Realm", RULE_OPTIONAL, -1, 1 }, { "User-Name", RULE_OPTIONAL, -1, 1 }, { "SIP-AOR", RULE_REQUIRED, -1, -1 }, { "Proxy-Info", RULE_OPTIONAL, -1, -1 }, { "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , cxdx_dict, &cmd); PARSE_loc_rules( rules, cmd, AVP_BY_NAME ); } /* Registration-Termination-Answer (RTA) Command */ { /* The Registration-Termination-Answer (RTA) is indicated by the Command-Code set to 287 and the Command Flags' 'R' bit cleared. The Diameter client sends this command in response to a previously received Diameter Registration-Termination-Request (RTR) command. In addition to the values already defined in RFC 3588 [RFC3588], the Result-Code AVP may contain one of the values defined in Section 10.1. If the SIP server (Diameter client) requires a User-Name AVP value to process the Diameter RTR request, but the Diameter RTR message did not contain a User-Name AVP value, the Diameter client MUST set the Result-Code AVP value to DIAMETER_USER_NAME_REQUIRED (see Section 10.1.2) and return it in a Diameter RTA message. The SIP server (Diameter client) applies the administrative deregistration to each of the URIs included in each of the SIP-AOR AVP values, or, if there is no SIP-AOR AVP present in the Diameter RTR request, to all the URIs allocated to the User-Name AVP value. The value of the SIP-Deregistration-Reason AVP in the Diameter RTR command has an effect on the actions performed at the SIP server (Diameter client): o If the value is set to PERMANENT_TERMINATION, then the user has terminated his/her registration to the realm. If informing the interested parties (e.g., subscribers to the "reg" event [RFC3680]) about the administrative deregistration is supported through SIP procedures, the SIP server (Diameter client) will do so. The Diameter Client in the SIP Server SHOULD NOT request a new user registration. The SIP server clears the registration state of the deregistered AORs. o If the value is set to NEW_SIP_SERVER_ASSIGNED, the Diameter server informs the SIP server (Diameter client) that a new SIP server has been allocated to the user, due to some reason. The SIP server, if supported through SIP procedures, will inform the interested parties (e.g., subscribers to the "reg" event [RFC3680]) about the administrative deregistration at this SIP server. The Diameter client in the SIP server SHOULD NOT request a new user registration. The SIP server clears the registration state of the deregistered SIP AORs. o If the value is set to SIP_SERVER_CHANGE, the Diameter server informs the SIP server (Diameter client) that a new SIP server has to be allocated to the user, e.g., due to user's capabilities requiring a new SIP server, or not enough resources in the current SIP server. If informing the interested parties about the administrative deregistration is supported through SIP procedures (e.g., subscriptions to the "reg" event [RFC3680]), the SIP server will do so. The Diameter client in the SIP Server SHOULD NOT request a new user registration. The SIP server clears the registration state of the deregistered SIP AORs. o If the value is set to REMOVE_SIP_SERVER, the Diameter server informs the SIP server (Diameter client) that the SIP server will no longer be bound in the Diameter server with that user. The SIP server can delete all data related to the user. The Message Format of the RTA command is as follows: ::= < Diameter Header: 287, PXY > < Session-Id > { Auth-Application-Id } { Result-Code } { Auth-Session-State } { Origin-Host } { Origin-Realm } [ Authorization-Lifetime ] [ Auth-Grace-Period ] [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Max-Cache-Time ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 287, /* Code */ "Registration-Termination-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Result-Code", RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Host", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , cxdx_dict, &cmd); PARSE_loc_rules( rules, cmd, AVP_BY_NAME ); } /* Push-Profile-Request (PPR) Command */ { /* The Push-Profile-Request (PPR) command is indicated by the Command-Code set to 288 and the Command Flags' 'R' bit set. The Diameter server sends this command to the Diameter client in a SIP server to update either the user profile of an already registered user in that SIP server or the SIP accounting information. This allows an operator to modify the data of a user profile or the accounting information and push it to the SIP server where the user is registered. Each user has a user profile associated with him/her and other accounting information. The profile or the accounting information may change with time, e.g., due to addition of new services to the user. When the user profile or the accounting information changes, the Diameter server sends a Diameter Push-Profile-Request (PPR) command to the Diameter client in a SIP server, in order to start applying those new services. A PPR command MAY contain a SIP-Accounting-Information AVP that updates the addresses of the accounting servers. Changes in the addresses of the accounting servers take effect immediately. The Diameter client SHOULD close any existing accounting session with the existing server and start providing accounting information to the newly acquired accounting server. A PPR command MAY contain zero or more SIP-User-Data AVP values containing the new user profile. On selecting the type of user data, the Diameter server SHOULD take into account the supported formats at the SIP server (SIP-Supported-User-Data-Type AVP sent in a previous SAR message) and the local policy. The User-Name AVP indicates the user to whom the profile is applicable. The Message Format of the PPR command is as follows: ::= < Diameter Header: 288, REQ, PXY > < Session-Id > { Auth-Application-Id } { Auth-Session-State } { Origin-Host } { Origin-Realm } { Destination-Realm } { User-Name } * [ SIP-User-Data ] [ SIP-Accounting-Information ] [ Destination-Host ] [ Authorization-Lifetime ] [ Auth-Grace-Period ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 288, /* Code */ "Push-Profile-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } ,{ "User-Name", RULE_REQUIRED, -1, 1 } ,{ "SIP-User-Data", RULE_OPTIONAL, -1, -1 } ,{ "SIP-Accounting-Information", RULE_OPTIONAL, -1, 1 } ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , cxdx_dict, &cmd); PARSE_loc_rules( rules, cmd, AVP_BY_NAME ); } /* Push-Profile-Answer (PPA) Command */ { /* The Push-Profile-Answer (PPA) is indicated by the Command-Code set to 288 and the Command Flags' 'R' bit cleared. The Diameter client sends this command in response to a previously received Diameter Push-Profile-Request (PPR) command. In addition to the values already defined in RFC 3588 [RFC3588], the Result-Code AVP may contain one of the values defined in Section 10.1. If there is no error when processing the received Diameter PPR message, the SIP server (Diameter client) MUST download the received user profile from the SIP-User-Data AVP values in the Diameter PPR message and store it associated with the user specified in the User-Name AVP value. If the SIP server does not recognize or does not support some of the data transferred in the SIP-User-Data AVP values, the Diameter client in the SIP server MUST return a Diameter PPA message that includes a Result-Code AVP set to the value DIAMETER_ERROR_NOT_SUPPORTED_USER_DATA. If the SIP server (Diameter client) receives a Diameter PPR message with a User-Name AVP that is unknown, the Diameter client MUST set the Result-Code AVP value to DIAMETER_ERROR_USER_UNKNOWN and MUST return it to the Diameter server in a Diameter PPA message. If the SIP server (Diameter client) receives in the SIP-User-Data-Content AVP value (of the grouped SIP-User-Data AVP) more data than it can accept, it MUST set the Result-Code AVP value to DIAMETER_ERROR_TOO_MUCH_DATA and MUST return it to the Diameter server in a Diameter PPA message. The SIP server MUST NOT override the existing user profile with the one received in the PPR message. If the Diameter server receives the Result-Code AVP value set to DIAMETER_ERROR_TOO_MUCH_DATA in a Diameter PPA message, it SHOULD force a new re-registration of the user by sending to the Diameter client a Diameter Registration-Termination-Request (RTR) with the SIP-Deregistration-Reason AVP value set to SIP_SERVER_CHANGE. This will force a re-registration of the user and will trigger a selection of a new SIP server. If the Diameter client is not able to honor the command, for any other reason, it MUST set the Result-Code AVP value to DIAMETER_UNABLE_TO_COMPLY and it MUST return it in a Diameter PPA message. The Message Format of the PPA command is as follows: ::= < Diameter Header: 288, PXY > < Session-Id > { Auth-Application-Id } { Result-Code } { Auth-Session-State } { Origin-Host } { Origin-Realm } [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Max-Cache-Time ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 288, /* Code */ "Push-Profile-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Result-Code", RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Redirect-Host", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , cxdx_dict, &cmd); PARSE_loc_rules( rules, cmd, AVP_BY_NAME ); } #endif /* TODO - NRGJ */ } /* end Command section */ TRACE_DEBUG(INFO, "Extension 'Dictionary CxDx' initialized"); return 0; } EXTENSION_ENTRY("dict_cxdx", cxdx_dict_init); nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/CxDx/dict_cxdx.xml000066400000000000000000000312611333553357400240570ustar00rootroot00000000000000 nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/OpenWRT/000077500000000000000000000000001333553357400220115ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/OpenWRT/HOWTO000066400000000000000000000257741333553357400226530ustar00rootroot00000000000000##################### # !! IMPORTANT !! # ##################### The uClibc library that is shipped with OpenWRT lacks support for several POSIX thread features, such as pthread_cleanup_{push,pop}, that are required by the freeDiameter framework. Until these features are included in the base OpenWRT system, the framework will not behave correctly on this platform. Therefore, the OpenWRT port is NOT usable properly at this moment with uClibc. A test software is included in test_required for checking if new uClibc distributions support the required features. You'll have to adapt the Makefile according to your environment. An alternative choice if your hardware allows it is to use (e)glibc in your openwrt image. ##################### This HOWTO describes how to generate a set of ipkg modules for providing support of freeDiameter in an OpenWRT system. This HOWTO is written for OpenWRT 10.03 (BackFire) and no guarantee is provided that it will work for you. Be prepared to eventually brick your routeur... Table of contents: 0) Quick HOWTO: optimistic step-by-step instructions. 1) Prerequisites: get the OpenWRT development environment ready. 2) Supplied packages: use the existing packages when possible (gnutls, ...) 3) Other dependencies: provide for additional missing dependencies (sctp ...) 4) freediameter package: now create the freeDiameter package 5) Configuration: how to set the configuration on the router. This HOWTO will NOT cover how to install OpenWRT on your access device, nor its basic configuration. Please refer to OpenWRT website for this type of HOWTOs. ============================================== 0) Quick HOWTO ============================================== The following instructions should allow you to put freeDiameter on your OpenWRT-compatible router. In case something goes wrong, you should follow the detailed instructions in the remaining of this file. Be warned: playing with the software in your router may brick it, i.e. make it unusable forever. Do it at your own risk. 1) Get the OpenWRT environment: $ git clone git://nbd.name/openwrt.git $ cd openwrt 2) Get the feeds $ cp feeds.conf.default feeds.conf $ echo "src-hg freediameter http://www.freediameter.net/hg/fD-OWRT-packages" >> feeds.conf $ scripts/feeds update $ scripts/feeds install freeDiameter 3) Configure your image $ make menuconfig (set Target System and Target Profile as needed for your equipment) - Network ---> freeDiameter (M) freeDiameter-test (M) wpad (*) wpad-mini ( ) 4) Set the C library to glibc instead of uClibc (broken support, see #26) - Advanced configuration options (for developers) ---> - Toolchain Options ----> C Library implementation (Use eglibc) 5) Build the image and packages, this takes a while $ make world 6) Export the bin/* directory through a webserver. We assume it is available at http://192.168.1.25/owrt 7) Flash the router with your new image -- THIS DESTROYS ALL CONFIG ON THE ROUTER! $ ssh root@192.168.1.1 # cd /tmp # wget http://192.168.1.25/owrt/openwrt-brcm47xx-squashfs.trx ;; change the file name with yours # mtd -r write openwrt-brcm47xx-squashfs.trx linux ;; wait for reboot $ telnet 192.168.1.1 # passwd # sync # exit 8) Update the opkg router's config to get your new packages ssh root@192.168.1.1 # echo "src/gz localrepo http://192.168.1.25/owrt/packages" >> /etc/opkg.conf # opkg update 9) Install freeDiameter, you're done. Optionnaly, install also certtool on the router before, to generate the TLS certificate automatically. # opkg install freeDiameter ============================================== 1) Prerequisites: ============================================== We will first need a working OpenWRT toolchain environment. You can retrieve pre-compiled binaries of such toolchains ("Image builder") on the OpenWRT website. Anyway, in case the architecture you are interested in is not listed, you can build the full toolchain from source. This is the path we are following in this HOWTO. a) Retrieve the latest OpenWRT source, using subversion or git. Since I have to go through a proxy, I use the later here, svn being quite annoying with proxies. Note, the following commands must not be run as root. $ git clone git://nbd.name/openwrt.git (Note: you might instead use "backfire.git" if you want to stick with an OpenWRT release.) $ cd openwrt $ cp feeds.conf.default feeds.conf b) If you are using git, you have to edit the feeds.conf file to use git as well for packages. Do the following modifications in this case: $ vi feeds.conf Comment out this line: src-svn packages https://svn.openwrt.org/openwrt/packages Add this line instead: src-git packages git://nbd.name/packages.git You can leave uncommented the luci (for GNUTLS) and Xwrt (webif) repositories. Since these repositories use svn over http, you can use subversion even if you are behind a proxy. c) Then issue the following command to update the package list: $ scripts/feeds update d) Now, let's already create the toolchain and basic image. $ make menuconfig This will open a menu for you. You must select the target you are building for. See http://wiki.openwrt.org/toh/start for the table of hardware and associated information. In my case, I am using a Buffalo WZR-HP-G300NH router. I therefore select these options: - Target System ---> Atheros AR71xx/AR7240/AR913x - Target Profile ---> Buffalo WZR-HP-G300NH For many routeurs, the recommended kernel is a 2.4x version. I have NOT tried with such kernel, and the SCTP support is likely to be different in this generation of kernels. I strongly recommend to go with a 2.6x kernel, whenever possible. e) As per freeDiameter ticket #26, you also need to change the library to glibc instead of uClibc. Change the option as follow: - Advanced configuration options (for developers) ---> - Toolchain Options ----> C Library implementation (Use eglibc) f) Once configured, create the toolchain and default image (this takes a while): $ make world After this command completes successfully, your build environment is ready. The resulting image and packages are stored in the "bin/" subdirectory. It is very convenient if you make this repository available in http to your routeur. You should probably try at this early stage to flash your device with the image you have generated. If the default basic image does not work, it is probably not worth adding new problems on top of it. For troubleshooting, please consult OpenWRT documentation directly. "make prereq" may help you building the initial image also. See http://downloads.openwrt.org/docs/buildroot-documentation.html for additional information concerning this step. You should now be able to login on your routeur with telnet (first time) or ssh (after setting a password). ============================================== 2) Supplied packages: ============================================== There are some dependencies of freeDiameter already available in the OpenWRT packages repository. You can check for the available packages with the script: $ ./scripts/feeds search We will now describe how to install these dependencies. At the time this HOWTO is written, the OpenWRT repositories contains packages for sctp, ipv6, gnutls, pthreads and hostapd. Follow these instructions to build them. Alternatively, you can find these packages pre-compiled in the OpenWRT packages repository. a) Add the packages $ scripts/feeds install libgnutls $ scripts/feeds install sctp b) Select the following components in the menu: $ make menuconfig - Base system ---> libpthread (M) - Network ---> sctp (M) hostapd (M) wpad-mini ( ) - Libraries ---> SSL ---> libgnutls (M) - Kernel modules ---> Network Support ---> kmod-ipv6 (M) Quit and save the new config, then: $ make world This will add a bunch of modules in your bin directory that will be required for freeDiameter. Since we are removing the wpad-mini daemon from the base image, this image (trx or bin file) is also recompiled. Note that if you are setting your device as WPA supplicant also (wireless client), you must select wpad instead of hostapd. (in any case, the -mini version is not suitable since we will use the RADIUS authentication). You should now reflash your routeur with the new firmware image. The simplest way to achieve if your routeur has enough flash memory is to: - copy the new trx image to your routeur's /tmp (using wget or scp) - run this command (on the device) -- replace with your actual filename: root@OpenWrt:~# mtd -r write linux WARNING: this will erase your existing configuration on the routeur. In case you need to save it, you may try the sysupgrade command instead. This will reboot the device after writing the new image file. Afterwards, if you have set up the http server on your development machine properly (let's assume it has IP address 192.168.1.25) you can run the following command on your router: root@OpenWrt:~# echo "src/gz mydev http://192.168.1.25/packages" >> /etc/opkg.conf root@OpenWrt:~# opkg update Install the newly compiled packages with: root@OpenWrt:~# opkg install kmod-ipv6 hostapd libpthread sctp ============================================== 3) Missing packages: ============================================== UPDATE: Starting from revision r22917, sctp and kmod-sctp are included in the OpenWRT distribution, and have been removed from freeDiameter package. One may consider using a freeDiameter package prior to 2010/09/05 in order to get the sctp package, or a more recent OpenWRT environment. PREVIOUS SITUATION: If you are using components prior to 2010/09/05, the following applies: P: P: There are other dependencies for freeDiameter that are not provided by OpenWRT packages. P: For convenience, we include these meta-packages in the freeDiameter distribution -- but they P: might not be up-to-date. P: P: a) Adding the contributed directory to the feeds P: Add the following line in your feeds.conf file: P: src-link freediameter /path/to/freediameter/contrib/OpenWRT/packages/ P: P: Then run: P: $ scripts/feeds update P: P: This should allow you to install the missing dependencies as follow: P: P: P: b) SCTP library (note: you might alternatively compile freeDiameter without SCTP support). P: $ scripts/feeds install sctp P: P: P: c) Select these components in the menu: P: $ make menuconfig P: - Libraries ---> P: sctp (M) P: P: Quit and save the new config, then: P: $ make world P: P: P: d) Install this on the router as well: P: root@OpenWrt:~# opkg update P: root@OpenWrt:~# opkg install sctp ============================================== 4) freediameter package: ============================================== Now, your environment should be ready to compile the freeDiameter ipkg package. $ scripts/feeds install freeDiameter Note that in order to build this package, you need to have cmake & flex on your compilation machine. $ make menuconfig - Network ---> freeDiameter (M) freeDiameter-test (M) Quit and save the new config, then: $ make world On your router, run: # opkg update # opkg install freeDiameter nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/OpenWRT/others/000077500000000000000000000000001333553357400233155ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/OpenWRT/others/D-Link_DIR-330_netconfig.patch000066400000000000000000000032741333553357400304570ustar00rootroot00000000000000diff --git a/target/linux/brcm47xx/base-files/etc/init.d/netconfig b/target/linux/brcm47xx/base-files/etc/init.d/netconfig index d7839b6..6446483 100755 --- a/target/linux/brcm47xx/base-files/etc/init.d/netconfig +++ b/target/linux/brcm47xx/base-files/etc/init.d/netconfig @@ -150,6 +150,30 @@ start() { } } } + if (model == "D-Link DIR-330") { # boardtype is 0x0472, so we need to reset the parameters + # The switch is on eth1, this script defaults to switch on eth0, so we write the values directly instead. + print "#### DIR-330: eth1 must be up for configuring the switch " + print "config interface switchport" + print " option ifname \"eth1\"" + print " option proto none" + print "" + print "config switch eth1" + print " option enable 1" + print "" + print "config switch_vlan eth1_0" + print " option device \"eth1\"" + print " option vlan 0" + print " option ports \"0 1 2 3 5t\"" + print "" + print "config switch_vlan eth1_1" + print " option device \"eth1\"" + print " option vlan 1" + print " option ports \"4 5t\"" + print "" + c["lan_ifname"] = "eth0.0" + c["wan_ifname"] = "eth0.1" + } + # Buffalo WBR-B11 and Buffalo WBR-G54 if (nvram["boardtype"] == "bcm94710ap") { c["vlan0ports"] = "0 1 2 3 4 5u" nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/OpenWRT/packages/000077500000000000000000000000001333553357400235675ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/OpenWRT/packages/freeDiameter/000077500000000000000000000000001333553357400261635ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/OpenWRT/packages/freeDiameter/Makefile000066400000000000000000000222261333553357400276270ustar00rootroot00000000000000# # Software License Agreement (BSD License) # # Copyright (c) 2013, WIDE Project and NICT # All rights reserved. # # See LICENSE file from freeDiameter source package for more information. # include $(TOPDIR)/rules.mk PKG_NAME:=freeDiameter PKG_REV:=696 PKG_VERSION:=r$(PKG_REV) PKG_RELEASE:=1 PKG_SOURCE_PROTO:=hg PKG_SOURCE_VERSION:=$(PKG_REV) PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.freediameter.net/hg/freeDiameter # PKG_MD5SUM:= PKG_FIXUP:=libtool PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk define Package/freeDiameter SECTION:=freeDiameter CATEGORY:=Network TITLE:=freeDiameter URL:=http://www.freediameter.net DEPENDS:=+sctp +libgnutls +libpthread +kmod-ipv6 endef define Package/freeDiameter-test SECTION:=freeDiameter CATEGORY:=Network TITLE:=freeDiameter-test URL:=http://www.freediameter.net DEPENDS:=+freeDiameter endef define Package/freeDiameter/description freeDiameter + RADIUS/Diameter gateway extension package. endef define Package/freeDiameter-test/description The app_test.fdx extension for freeDiameter, useful only to perform some tests between freeDiameter peers (ping-like for Diameter). endef define Package/freeDiameter/conffiles /etc/freeDiameter/freeDiameter.conf /etc/freeDiameter/rgw.conf endef define Build/Configure IN_OPENWRT=1 \ AR="$(TARGET_CROSS)ar" \ AS="$(TARGET_CC) -c $(TARGET_CFLAGS)" \ LD="$(TARGET_CROSS)ld" \ NM="$(TARGET_CROSS)nm" \ CC="$(TARGET_CC)" \ GCC="$(TARGET_CC)" \ CXX="$(TARGET_CROSS)g++" \ RANLIB="$(TARGET_CROSS)ranlib" \ STRIP="$(TARGET_CROSS)strip" \ OBJCOPY="$(TARGET_CROSS)objcopy" \ OBJDUMP="$(TARGET_CROSS)objdump" \ TARGET_CPPFLAGS="$(TARGET_CPPFLAGS)" \ TARGET_CFLAGS="$(TARGET_CFLAGS)" \ TARGET_LDFLAGS="$(TARGET_LDFLAGS)" \ cmake \ -DCMAKE_PREFIX_PATH:PATH=$(STAGING_DIR)/usr \ -DCMAKE_INSTALL_PREFIX:PATH=/usr \ -DDIAMID_IDNA_REJECT:BOOL=ON \ -DBUILD_TESTING:BOOL=OFF \ -DCMAKE_BUILD_TYPE:STRING=DebianPackage \ -DDEFAULT_CONF_PATH:PATH=/etc/freeDiameter \ -DBUILD_APP_RADGW:BOOL=ON \ -DBUILD_DBG_MONITOR:BOOL=ON \ -DBUILD_TEST_APP:BOOL=ON \ VERBOSE=1 \ $(PKG_BUILD_DIR)/CMakeLists.txt endef TARGET_LDFLAGS := -L$(STAGING_DIR)/usr/lib $(TARGET_LDFLAGS) define Package/freeDiameter/install # binaries $(INSTALL_DIR) $(1)/usr/bin $(CP) \ $(PKG_INSTALL_DIR)/usr/bin/freeDiameterd* \ $(1)/usr/bin/ # libraries & extensions $(INSTALL_DIR) $(1)/usr/lib/ $(CP) \ $(PKG_INSTALL_DIR)/usr/lib/* \ $(1)/usr/lib/ # Remove the test_app from the main package (see freeDiameter-test) $(RM) $(1)/usr/lib/freeDiameter/test_app* # configuration files $(INSTALL_DIR) $(1)/etc/freeDiameter $(INSTALL_CONF) \ $(PKG_BUILD_DIR)/doc/freediameter.conf.sample \ $(1)/etc/freeDiameter/freeDiameter.conf $(SED) 's,TLS_Cred,#TLS_Cred,g' $(1)/etc/freeDiameter/freeDiameter.conf echo "" >> $(1)/etc/freeDiameter/freeDiameter.conf echo "### OPENWRT specific" >> $(1)/etc/freeDiameter/freeDiameter.conf echo "TLS_Cred = \"/etc/freeDiameter/freeDiameter.pem\", \"/etc/freeDiameter/freeDiameter.key\";" \ >> $(1)/etc/freeDiameter/freeDiameter.conf echo "TLS_CA = \"/etc/freeDiameter/freeDiameter.ca.pem\";" \ >> $(1)/etc/freeDiameter/freeDiameter.conf echo "TLS_DH_File = \"/etc/freeDiameter/dh.pem\";" \ >> $(1)/etc/freeDiameter/freeDiameter.conf echo "SCTP_streams = 3;" >> $(1)/etc/freeDiameter/freeDiameter.conf echo "LoadExtension = \"dict_nasreq.fdx\";" >> $(1)/etc/freeDiameter/freeDiameter.conf echo "LoadExtension = \"dict_eap.fdx\";" >> $(1)/etc/freeDiameter/freeDiameter.conf echo "LoadExtension = \"app_radgw.fdx\":\"rgw.conf\";" \ >> $(1)/etc/freeDiameter/freeDiameter.conf echo "# test_app.fdx provided in freeDiameter-test package:" \ >> $(1)/etc/freeDiameter/freeDiameter.conf echo "# LoadExtension = \"test_app.fdx\";" >> $(1)/etc/freeDiameter/freeDiameter.conf echo "## Add overrides below this point" >> $(1)/etc/freeDiameter/freeDiameter.conf $(INSTALL_CONF) \ $(PKG_BUILD_DIR)/doc/app_radgw.conf.sample \ $(1)/etc/freeDiameter/rgw.conf $(SED) 's,RGWX,#RGWX,g' $(1)/etc/freeDiameter/rgw.conf echo "" >> $(1)/etc/freeDiameter/rgw.conf echo "### OPENWRT specific" >> $(1)/etc/freeDiameter/rgw.conf echo " RGWX = \"auth.rgwx\" : auth;" >> $(1)/etc/freeDiameter/rgw.conf echo " RGWX = \"acct.rgwx\" : acct;" >> $(1)/etc/freeDiameter/rgw.conf echo "" >> $(1)/etc/freeDiameter/rgw.conf echo " cli = 127.0.0.1 / \"secret key\" ;" >> $(1)/etc/freeDiameter/rgw.conf echo " auth_server_ip4 = 127.0.0.1;" >> $(1)/etc/freeDiameter/rgw.conf echo " auth_server_ip6 = ::1 ;" >> $(1)/etc/freeDiameter/rgw.conf echo " acct_server_ip4 = 127.0.0.1;" >> $(1)/etc/freeDiameter/rgw.conf echo " acct_server_ip6 = ::1 ;" >> $(1)/etc/freeDiameter/rgw.conf endef define Package/freeDiameter-test/install # Only the test_app extension $(INSTALL_DIR) $(1)/usr/lib/freeDiameter/ $(CP) $(PKG_INSTALL_DIR)/usr/lib/freeDiameter/test_app* \ $(1)/usr/lib/freeDiameter/ endef define Package/freeDiameter/postinst #!/bin/sh # Test if the configuration file contains the local identity already localid=`sed -n -r -e "s/^[[:space:]]*Identity[[:space:]]*=[[:space:]]*\"([^\"]*)\"[[:space:]]*;/\1/p" /etc/freeDiameter/freeDiameter.conf` if [ -z "$$localid" ]; then # Ask for the local name echo -n "Full name of your access point? (openwrt.localdomain) : " read localid if [ -z "$$localid" ]; then localid="openwrt.localdomain" fi echo "Identity = \"$$localid\";" >> /etc/freeDiameter/freeDiameter.conf fi # Is there already a ConnectPeer directive? grep -q -E -e "^[[:space:]]*ConnectPeer[[:space:]]*=" /etc/freeDiameter/freeDiameter.conf if [ "$$?" -eq "1" ]; then echo -n "Diameter Identity of your Diameter server: " read serverid if [ -z "$$serverid" ]; then echo "Skipped. Please add ConnectPeer directive to your /etc/freeDiameter/freeDiameter.conf file later." else echo -n "IP or IPv6 address of your Diameter server? (leave blank for dynamic resolution) " read serverip connstr="" if [ -n "$$serverip" ]; then connstr=" { ConnectTo = \"$$serverip\"; }" fi echo "ConnectPeer = \"$$serverid\"$$connstr;" >> /etc/freeDiameter/freeDiameter.conf fi fi # Certificate configuration if [ ! -f "/usr/bin/certtool" ]; then echo "certtool is not installed, skipping creation of default certificate and DH parameters." echo "The following files are expected by freeDiameter:" echo " /etc/freeDiameter/freeDiameter.key" echo " /etc/freeDiameter/freeDiameter.pem" echo " /etc/freeDiameter/freeDiameter.ca.pem" echo " /etc/freeDiameter/dh.pem" exit 0 fi if [ ! -f "/etc/freeDiameter/freeDiameter.key" ]; then echo "Creating a new private key for freeDiameter, please wait" certtool -p --outfile /etc/freeDiameter/freeDiameter.key fi if [ ! -f "/etc/freeDiameter/freeDiameter.pem" ]; then echo "organization = freeDiameter" > /tmp/template.cnf echo "unit = OpenWRT" >>/tmp/template.cnf echo "state = internet" >>/tmp/template.cnf echo "country = net" >>/tmp/template.cnf echo "cn = $$localid" >>/tmp/template.cnf echo "expiration_days = 3650" >>/tmp/template.cnf echo "signing_key" >>/tmp/template.cnf echo "encryption_key" >>/tmp/template.cnf if [ ! -f "/etc/freeDiameter/freeDiameter.csr" ]; then echo "Creating a new CSR (use if you have a separate CA)" certtool -q --load-privkey /etc/freeDiameter/freeDiameter.key \ --outfile /etc/freeDiameter/freeDiameter.csr \ --template /tmp/template.cnf fi echo "Creating a new certificate for freeDiameter" certtool -s --load-privkey /etc/freeDiameter/freeDiameter.key \ --outfile /etc/freeDiameter/freeDiameter.pem \ --template /tmp/template.cnf rm -f /tmp/template.cnf cat /etc/freeDiameter/freeDiameter.pem >> /etc/freeDiameter/freeDiameter.ca.pem echo "Done." echo "========================================================================" echo "To enable TLS communication, you should either:" echo " - use a real certificate signed by your server's CA:" echo " Use the CSR provided in /etc/freeDiameter/freeDiameter.csr" echo " Save the new certificate as /etc/freeDiameter/freeDiameter.pem" echo " Replace the contents of /etc/freeDiameter/freeDiameter.ca.pem with your CA's certificate" echo " - or, declare the certificates as trusted as follow: " echo " Add your server's CA certificate into /etc/freeDiameter/freeDiameter.ca.pem" echo " Add the content of /etc/freeDiameter/freeDiameter.pem into your server's trusted CA file" echo "========================================================================" fi if [ ! -f "/etc/freeDiameter/dh.pem" ]; then echo "Creating new Diffie-Hellman parameters file. This operation takes a while..." certtool --generate-dh-params --outfile /etc/freeDiameter/dh.pem echo "Done." fi echo "freeDiameter configuration completed and stored in /etc/freeDiameter/." endef $(eval $(call BuildPackage,freeDiameter)) $(eval $(call BuildPackage,freeDiameter-test)) nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/OpenWRT/packages/freeDiameter/patches/000077500000000000000000000000001333553357400276125ustar00rootroot0000000000000001-freeDiameter-OpenWRT.patch000066400000000000000000000014161333553357400346640ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/OpenWRT/packages/freeDiameter/patchesdiff -Nur freeDiameter/CMakeLists.txt freeDiameter-OpenWRT/CMakeLists.txt --- freeDiameter/CMakeLists.txt 2010-08-13 16:19:35.000000000 +0900 +++ freeDiameter-OpenWRT/CMakeLists.txt 2010-08-13 16:21:32.000000000 +0900 @@ -51,6 +51,14 @@ SET(DEBUG 1) ENDIF (CMAKE_BUILD_TYPE MATCHES "Debug|Profiling|DebugValgrind") +# OpenWRT +SET(IN_OPENWRT $ENV{IN_OPENWRT}) +IF (IN_OPENWRT) + ADD_DEFINITIONS("$ENV{TARGET_LDFLAGS}" "$ENV{TARGET_CPPFLAGS}" "$ENV{TARGET_CFLAGS}") + INCLUDE_DIRECTORIES("$ENV{TARGET_LDFLAGS}" "$ENV{TARGET_CPPFLAGS}" "$ENV{TARGET_CFLAGS}") +ENDIF(IN_OPENWRT) + + # some subfolders use yacc and lex parsers SET(BISON_GENERATE_DEFINES TRUE) SET(BISON_PREFIX_OUTPUTS TRUE) Binary files freeDiameter/.hg/dirstate and freeDiameter-OpenWRT/.hg/dirstate differ nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/OpenWRT/test_required/000077500000000000000000000000001333553357400246705ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/OpenWRT/test_required/Makefile000066400000000000000000000014071333553357400263320ustar00rootroot00000000000000OWRT_ENV_ROOT=/root/openwrt-env/openwrt STAGING_UCLIBC_ROOT=$(OWRT_ENV_ROOT)/staging_dir/target-mipsel_uClibc-0.9.31 STAGING_GCC_ROOT=$(OWRT_ENV_ROOT)/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.31 CFLAGS=-Os -pipe -mips32 -mtune=mips32 -funit-at-a-time -fhonour-copts -msoft-float -I$(STAGING_UCLIBC_ROOT)/usr/include -I$(STAGING_UCLIBC_ROOT)/include -I$(STAGING_GCC_ROOT)/usr/include -I$(STAGING_GCC_ROOT)/include LDFLAGS=-L$(STAGING_UCLIBC_ROOT)/usr/lib -L$(STAGING_UCLIBC_ROOT)/lib -L$(STAGING_GCC_ROOT)/usr/lib -L$(STAGING_GCC_ROOT)/lib GCC=mipsel-openwrt-linux-uclibc-gcc PATH:=$(STAGING_GCC_ROOT)/bin/:$(PATH) testcase: testcase.o $(GCC) $(LDFLAGS) -lpthread testcase.o -o testcase testcase.o: testcase.c $(GCC) $(CFLAGS) -o testcase.o -c testcase.c nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/OpenWRT/test_required/testcase.c000066400000000000000000000037601333553357400266550ustar00rootroot00000000000000#include #include #include #include static pthread_barrier_t bar; static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t cnd = PTHREAD_COND_INITIALIZER; static int called = 0; #ifndef ASSERT #define ASSERT(x) assert(x) #endif /* ASSERT */ static void cleanupmutex(void * arg) { printf("cancelation cleanup handler called\n"); if (arg) { ASSERT( pthread_mutex_unlock((pthread_mutex_t *)arg) == 0 ); called++; } } static void * mythread(void * a) { int ret; /* lock mutex */ ASSERT( pthread_mutex_lock(&mtx) == 0 ); /* Push cleanup */ pthread_cleanup_push(cleanupmutex, &mtx); printf("thread synchronization (mutex acquired)\n"); /* Wake the other thread */ ret = pthread_barrier_wait(&bar); ASSERT( (ret == 0) || (ret == PTHREAD_BARRIER_SERIAL_THREAD) ); /* Now wait for the condition, this unlocks the mutex */ do { printf("thread waiting cond\n"); ASSERT( pthread_cond_wait(&cnd, &mtx) == 0); printf("thread woken\n"); } while (1); /* Cleanup, never reached */ pthread_cleanup_pop(1); return NULL; } int main(int argc, char * argv[]) { int ret; pthread_t thr; void * dummy; /* initialize the barrier */ ASSERT( pthread_barrier_init(&bar, NULL, 2) == 0 ); printf("Creating thread\n"); /* Create the thread */ ASSERT( pthread_create(&thr, NULL, mythread, NULL) == 0 ); printf("main synchronization\n"); ret = pthread_barrier_wait(&bar); ASSERT( (ret == 0) || (ret == PTHREAD_BARRIER_SERIAL_THREAD) ); ASSERT( pthread_mutex_lock(&mtx) == 0 ); printf("main: thread is now waiting for condvar\n"); /* Cancel the thread */ ASSERT( pthread_cancel(thr) == 0 ); /* Now, unlock, so that the thread can actually really exit */ ASSERT( pthread_mutex_unlock(&mtx) == 0 ); /* Release thread resources */ ASSERT( pthread_join(thr, &dummy) == 0 ); if (called == 1) printf("Test successful!\n"); else printf("Test failed! Cleanup was not called (& lock not released)\n"); return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/PKI/000077500000000000000000000000001333553357400211365ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/PKI/ca_script/000077500000000000000000000000001333553357400231055ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/PKI/ca_script/Makefile000066400000000000000000000134051333553357400245500ustar00rootroot00000000000000#!/usr/bin/make -s # # This file is designed to automatize the CA tasks such as: # -> init : create the initial CA tree and the CA root certificate. # -> newcsr: create a new private key and csr. $name and $email must be set. C, ST, L, O, OU may be overwitten (example: make newcsr C=FR) # -> cert : sign a pending CSR and generate the certificate. $name must be provided. # -> revoke: revoke a certificate. $name must be provided. # -> gencrl: update/create the CRL. # # The file should be located in the directory STATIC_DIR as defined below. # The DIR directory will contain the data of the CA. It might be placed in /var. # The DIR should also be configured in openssl.cnf file under [ CA_default ]->dir. # # Here are the steps to install the CA scripts in default environment: ## mkdir /etc/openssl-ca.static ## cp Makefile openssl.cnf /etc/openssl-ca.static # ( configure the default parameters of your CA in /etc/openssl-ca/openssl.cnf ) ## ## mkdir /etc/openssl-ca ## make -f /etc/openssl-ca.static/Makefile destroy force=y ## cd /etc/openssl-ca ## make init ## make help DIR = /home/thedoc/testbed.aaa/ca STATIC_DIR = /home/thedoc/testbed.aaa/ca CONFIG = -config $(DIR)/openssl.cnf #Defaults for new CSR C = JP ST = Tokyo L = Koganei O = WIDE OU = "AAA WG" #Default lifetime DAYS = 365 #Values for the CA CA_CN = mgr.testbed.aaa CA_mail = sdecugis@freediameter.net #Disable "make destroy" force = # Default: print the help all: help # Help message help: @echo "\n\ Default values (can be overwritten on command-line):\n\ [C=$(C)] [ST=$(ST)] [L=$(L)] [O=$(O)] [OU=$(OU)]\n\ [CA_CN=$(CA_CN)] [CA_mail=$(CA_mail)]\n\n\ Available commands:\n\ make init\n\ Creates the initial CA structure in $(DIR)\n\ make gencrl\n\ Regenerates the CRL. Should be run at least once a month.\n\ make newcsr name=foo email=b@r [type=ca]\n\ Create private key and csr in clients subdir (named foo.*)\n\ make cert name=foo\n\ Signs the CSR foo.csr and creates the certificate foo.cert.\n\ make revoke name=foo\n\ Revokes the certificate foo.cert and regenerates the CRL.\n\ \n\ Notes:\n\ Content from public-www should be available from Internet. \n\ The URL to CRL should be set in openssl.cnf.\n\ A cron job should execute make gencrl once a month.\n\ "; # Destroy the CA completely. Use with care. destroy: @if [ -z "$(force)" ]; then echo "Restart disabled, use: make destroy force=y"; exit 1; fi @if [ ! -d $(STATIC_DIR) ]; then echo "Error in setup"; exit 1; fi @echo "Removing everything (for debug purpose)..." @rm -rf $(DIR)/* @ln -sf $(STATIC_DIR)/Makefile $(DIR) @ln -sf $(STATIC_DIR)/openssl.cnf $(DIR) # Initialize the CA structure and keys. init: @if [ -d $(DIR)/private ]; then echo "CA already initialized."; exit 1; fi @echo "Creating CA structure..." @mkdir $(DIR)/crl @mkdir $(DIR)/certs @mkdir $(DIR)/newcerts @mkdir $(DIR)/public-www @mkdir $(DIR)/private @chmod 700 $(DIR)/private @mkdir $(DIR)/clients @mkdir $(DIR)/clients/privkeys @mkdir $(DIR)/clients/csr @mkdir $(DIR)/clients/certs @echo "01" > $(DIR)/serial @touch $(DIR)/index.txt @openssl req $(CONFIG) -new -batch -x509 -days 3650 -nodes -newkey rsa:2048 -out $(DIR)/public-www/cacert.pem \ -keyout $(DIR)/private/cakey.pem -subj /C=$(C)/ST=$(ST)/L=$(L)/O=$(O)/OU=$(OU)/CN=$(CA_CN)/emailAddress=$(CA_mail) @ln -s $(DIR)/public-www/cacert.pem $(DIR)/certs/`openssl x509 -noout -hash < $(DIR)/public-www/cacert.pem`.0 @$(MAKE) -f $(DIR)/Makefile gencrl # Regenerate the Certificate Revocation List. # This list should be available publicly gencrl: @openssl ca $(CONFIG) -gencrl -out $(DIR)/public-www/crl.pem @ln -sf $(DIR)/public-www/crl.pem $(DIR)/crl/`openssl crl -noout -hash < $(DIR)/public-www/crl.pem`.r0 # Create a new private key and a CSR, in case the client does not provide the CSR by another mean. # Usage is: make newcsr name=peer.client.fqdn email=admin@client.fqdn newcsr: @if [ -z "$(name)" -o -z "$(email)" ]; then echo "Please provide certificate name and email address: make newcsr name=mn.nautilus.org email=you@mail.com"; exit 1; fi @if [ -e $(DIR)/clients/csr/$(name).csr ]; then echo "There is already a pending csr for this name."; exit 1; fi @if [ ! -e $(DIR)/clients/privkeys/$(name).key.pem ]; \ then echo "Generating a private key for $(name) ..."; \ openssl genrsa -out $(DIR)/clients/privkeys/$(name).key.pem 1024; \ fi; @echo "Creating the CSR in $(DIR)/clients/csr/$(name).csr"; @openssl req $(CONFIG) -new -batch -out $(DIR)/clients/csr/$(name).csr \ -key $(DIR)/clients/privkeys/$(name).key.pem \ -subj /C=$(C)/ST=$(ST)/L=$(L)/O=$(O)/OU=$(OU)/CN=$(name)/emailAddress=$(email) # Process a CSR to create a x509 certificate. The certificate is valid for 1 year. # It should be sent to the client by any mean. cert: @if [ -z "$(name)" ]; then echo "name must be provided: make cert name=mn.n6.org"; exit 1; fi @if [ ! -e $(DIR)/clients/csr/$(name).csr ]; then echo "Could not find CSR in $(DIR)/clients/csr/$(name).csr."; exit 1; fi @if [ -e $(DIR)/clients/certs/$(name).cert ]; \ then echo "Revoking old certificate..."; \ $(MAKE) revoke name=$(name); \ fi; @openssl ca $(CONFIG) -in $(DIR)/clients/csr/$(name).csr \ -out $(DIR)/clients/certs/$(name).cert \ -days $(DAYS) \ -batch @ln -s $(DIR)/clients/certs/$(name).cert $(DIR)/certs/`openssl x509 -noout -hash < $(DIR)/clients/certs/$(name).cert`.0 # Revoke a certificate. revoke: @if [ -z "$(name)" ]; then echo "name must be provided: make revoke name=mn.n6.org"; exit 1; fi @if [ ! -e $(DIR)/clients/certs/$(name).cert ]; \ then echo "$(DIR)/clients/certs/$(name).cert not found"; \ exit 1; \ fi; @openssl ca $(CONFIG) -revoke $(DIR)/clients/certs/$(name).cert; @rm -f $(DIR)/certs/`openssl x509 -noout -hash < $(DIR)/clients/certs/$(name).cert`.0 @$(MAKE) gencrl # End of file... nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/PKI/ca_script/openssl.cnf000066400000000000000000000224121333553357400252610ustar00rootroot00000000000000# # OpenSSL example configuration file. # This is mostly being used for generation of certificate requests. # # This definition stops the following lines choking if HOME isn't # defined. HOME = . RANDFILE = $ENV::HOME/.rnd # Extra OBJECT IDENTIFIER info: #oid_file = $ENV::HOME/.oid oid_section = new_oids # To use this configuration file with the "-extfile" option of the # "openssl x509" utility, name here the section containing the # X.509v3 extensions to use: # extensions = # (Alternatively, use a configuration file that has only # X.509v3 extensions in its main [= default] section.) [ new_oids ] # We can add new OIDs in here for use by 'ca' and 'req'. # Add a simple OID like this: # testoid1=1.2.3.4 # Or use config file substitution like this: # testoid2=${testoid1}.5.6 #################################################################### [ ca ] default_ca = CA_default # The default ca section #################################################################### [ CA_default ] dir = /etc/openssl-ca # Where everything is kept certs = $dir/certs # Where the issued certs are kept crl_dir = $dir/crl # Where the issued crl are kept database = $dir/index.txt # database index file. #unique_subject = no # Set to 'no' to allow creation of # several ctificates with same subject. new_certs_dir = $dir/newcerts # default place for new certs. certificate = $dir/public-www/cacert.pem # The CA certificate serial = $dir/serial # The current serial number # crlnumber = $dir/crlnumber # the current crl number # must be commented out to leave a V1 CRL crl = $dir/public-www/crl.pem # The current CRL private_key = $dir/private/cakey.pem# The private key RANDFILE = $dir/private/.rand # private random number file x509_extensions = usr_cert # The extentions to add to the cert # Comment out the following two lines for the "traditional" # (and highly broken) format. name_opt = ca_default # Subject Name options cert_opt = ca_default # Certificate field options # Extension copying option: use with caution. # copy_extensions = copy # Extensions to add to a CRL. Note: Netscape communicator chokes on V2 CRLs # so this is commented out by default to leave a V1 CRL. # crlnumber must also be commented out to leave a V1 CRL. # crl_extensions = crl_ext default_days = 365 # how long to certify for default_crl_days= 30 # how long before next CRL default_md = sha1 # which md to use. preserve = no # keep passed DN ordering # A few difference way of specifying how similar the request should look # For type CA, the listed attributes must be the same, and the optional # and supplied fields are just that :-) # policy = policy_match policy = policy_anything # For the CA policy [ policy_match ] countryName = match stateOrProvinceName = match organizationName = match organizationalUnitName = optional commonName = supplied emailAddress = optional # For the 'anything' policy # At this point in time, you must list all acceptable 'object' # types. [ policy_anything ] countryName = optional stateOrProvinceName = optional localityName = optional organizationName = optional organizationalUnitName = optional commonName = supplied emailAddress = optional #################################################################### [ req ] default_bits = 1024 default_keyfile = privkey.pem distinguished_name = req_distinguished_name attributes = req_attributes x509_extensions = v3_ca # The extentions to add to the self signed cert # Passwords for private keys if not present they will be prompted for # input_password = fdsecret # output_password = fdsecret # This sets a mask for permitted string types. There are several options. # default: PrintableString, T61String, BMPString. # pkix : PrintableString, BMPString. # utf8only: only UTF8Strings. # nombstr : PrintableString, T61String (no BMPStrings or UTF8Strings). # MASK:XXXX a literal mask value. # WARNING: current versions of Netscape crash on BMPStrings or UTF8Strings # so use this option with caution! string_mask = utf8only # req_extensions = v3_req # The extensions to add to a certificate request [ req_distinguished_name ] countryName = Country Name (2 letter code) countryName_default = JP countryName_min = 2 countryName_max = 2 stateOrProvinceName = State or Province Name (full name) stateOrProvinceName_default = Tokyo localityName = Locality Name (eg, city) localityName_default = Koganei 0.organizationName = Organization Name (eg, company) 0.organizationName_default = WIDE # we can do this but it is not needed normally :-) 1.organizationName = Second Organization Name (eg, company) 1.organizationName_default = NICT organizationalUnitName = Organizational Unit Name (eg, section) organizationalUnitName_default = AAA WG commonName = Common Name (i.e. Diameter Agent hostname) commonName_max = 64 emailAddress = Email Address (i.e. Diameter agent administrator) emailAddress_max = 64 # SET-ex3 = SET extension number 3 [ req_attributes ] challengePassword = A challenge password challengePassword_min = 0 challengePassword_max = 20 unstructuredName = An optional company name [ usr_cert ] # These extensions are added when 'ca' signs a request. # This goes against PKIX guidelines but some CAs do it and some software # requires this to avoid interpreting an end user certificate as a CA. basicConstraints=CA:FALSE # Here are some examples of the usage of nsCertType. If it is omitted # the certificate can be used for anything *except* object signing. # This is OK for an SSL server. # nsCertType = server # For an object signing certificate this would be used. # nsCertType = objsign # For normal client use this is typical # nsCertType = client, email # and for everything including object signing: # nsCertType = client, email, objsign # This is typical in keyUsage for a client certificate. # keyUsage = nonRepudiation, digitalSignature, keyEncipherment # This will be displayed in Netscape's comment listbox. nsComment = "OpenSSL Generated Certificate" # PKIX recommendations harmless if included in all certificates. subjectKeyIdentifier=hash authorityKeyIdentifier=keyid,issuer # This stuff is for subjectAltName and issuerAltname. # Import the email address. # subjectAltName=email:copy # An alternative to produce certificates that aren't # deprecated according to PKIX. # subjectAltName=email:move # Copy subject details # issuerAltName=issuer:copy #nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem #nsBaseUrl #nsRevocationUrl #nsRenewalUrl #nsCaPolicyUrl #nsSslServerName [ v3_req ] # Extensions to add to a certificate request basicConstraints = CA:FALSE keyUsage = nonRepudiation, digitalSignature, keyEncipherment [ v3_ca ] # Extensions for a typical CA # PKIX recommendation. subjectKeyIdentifier=hash authorityKeyIdentifier=keyid:always,issuer:always # This is what PKIX recommends but some broken software chokes on critical # extensions. #basicConstraints = critical,CA:true # So we do this instead. basicConstraints = CA:true # Key usage: this is typical for a CA certificate. However since it will # prevent it being used as an test self-signed certificate it is best # left out by default. # keyUsage = cRLSign, keyCertSign # Some might want this also # nsCertType = sslCA, emailCA # Include email address in subject alt name: another PKIX recommendation # subjectAltName=email:copy # Copy issuer details # issuerAltName=issuer:copy # DER hex encoding of an extension: beware experts only! # obj=DER:02:03 # Where 'obj' is a standard or added object # You can even override a supported extension: # basicConstraints= critical, DER:30:03:01:01:FF [ crl_ext ] # CRL extensions. # Only issuerAltName and authorityKeyIdentifier make any sense in a CRL. # issuerAltName=issuer:copy authorityKeyIdentifier=keyid:always,issuer:always [ proxy_cert_ext ] # These extensions should be added when creating a proxy certificate # This goes against PKIX guidelines but some CAs do it and some software # requires this to avoid interpreting an end user certificate as a CA. basicConstraints=CA:FALSE # Here are some examples of the usage of nsCertType. If it is omitted # the certificate can be used for anything *except* object signing. # This is OK for an SSL server. # nsCertType = server # For an object signing certificate this would be used. # nsCertType = objsign # For normal client use this is typical # nsCertType = client, email # and for everything including object signing: # nsCertType = client, email, objsign # This is typical in keyUsage for a client certificate. # keyUsage = nonRepudiation, digitalSignature, keyEncipherment # This will be displayed in Netscape's comment listbox. nsComment = "OpenSSL Generated Certificate" # PKIX recommendations harmless if included in all certificates. subjectKeyIdentifier=hash authorityKeyIdentifier=keyid,issuer:always # This stuff is for subjectAltName and issuerAltname. # Import the email address. # subjectAltName=email:copy # An alternative to produce certificates that aren't # deprecated according to PKIX. # subjectAltName=email:move # Copy subject details # issuerAltName=issuer:copy #nsCaRevocationUrl = http://www.domain.dom/ca-crl.pem #nsBaseUrl #nsRevocationUrl #nsRenewalUrl #nsCaPolicyUrl #nsSslServerName # This really needs to be in place for it to be a proxy certificate. proxyCertInfo=critical,language:id-ppl-anyLanguage,pathlen:3,policy:foo nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/PKI/ca_script2/000077500000000000000000000000001333553357400231675ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/PKI/ca_script2/Makefile000066400000000000000000000215251333553357400246340ustar00rootroot00000000000000#!/usr/bin/make -s # # This file is inspired from freeDiameter's contrib/ca_script and # improved to handle multiple CA in a hierarchical fashion. # Warning: the directory structure is flat, does not reflect the CA hierarchy SCRIPT_DIR = . DATA_DIR = ./ca_data CONFIG = -config $(SCRIPT_DIR)/openssl.cnf REMAKE = $(MAKE) -f $(SCRIPT_DIR)/Makefile #Disable "make destroy" -- overwrite on command line force = #RSA key sizes, can be overwritten on command line cakeysize = 2048 keysize = 1024 # Save current date DATE=`date +%Y%m%d-%H%M%S` # Default: print the help all: help # Help message help: @echo "\n\ Available commands:\n\ make init topca=name\n\ Creates the initial top-level CA structure\n\ make newca name=newcaname ca=parentca\n\ Creates a new sub-CA that can be used for certificates later.\n\ make newcert name=foo ca=parentca\n\ Create private key and csr, then issue the certificate (named foo.*)\n\ make p12 name=foo ca=parentca\n\ Same as newcert, but additionnaly creates a pkcs12 file to ship client certificate to Windows or Mac\n\ make ship name=foo ca=parentca\n\ Create an archive with the data for the client (useful for freeDiameter peers)\n\ make revoke name=foo ca=parentca\n\ Revokes the certificate foo.cert issued by parentca and regenerates the CRL.\n\ make gencrl ca=caname\n\ Regenerates the CRL of CA caname. Should be run periodically.\n\ \n\ "; # Destroy the CA hierarchy completely. Use with care. destroy: @if [ -z "$(force)" ]; then echo "Destroy disabled, use: make destroy force=y"; exit 1; fi @if [ ! -d $(SCRIPT_DIR) ]; then echo "Error in setup"; exit 1; fi @echo "Removing everything (for debug purpose)..." @rm -rf $(DATA_DIR)/* # Initialize the CA structure structure: @if [ -z "$(caname)" ]; then echo "Internal error: caname is missing"; exit 1; fi @if [ -d $(DATA_DIR)/$(caname) ]; then echo "CA $(caname) already exists."; exit 1; fi # Creating CA structure @mkdir -p $(DATA_DIR)/$(caname) @mkdir $(DATA_DIR)/$(caname)/public @mkdir $(DATA_DIR)/$(caname)/public/crl @mkdir $(DATA_DIR)/$(caname)/private @chmod 700 $(DATA_DIR)/$(caname)/private @mkdir $(DATA_DIR)/$(caname)/clients @echo "01" > $(DATA_DIR)/$(caname)/serial @echo "01" > $(DATA_DIR)/$(caname)/crlnumber @touch $(DATA_DIR)/$(caname)/index.txt # Initialize the top-level CA structure and keys. init: @if [ -z "$(topca)" ]; then echo "Please specify the name of the root CA. Ex: make init topca=rootca.testbed.aaa"; exit 1; fi # Create the folder hierarchy @$(REMAKE) structure caname=$(topca) # Generate the self-signed certificate @CA_ROOT_DIR=$(DATA_DIR)/$(topca) openssl req $(CONFIG) -new -batch -x509 -days 3650 -nodes -newkey rsa:$(cakeysize) -out $(DATA_DIR)/$(topca)/public/cacert.pem \ -keyout $(DATA_DIR)/$(topca)/private/cakey.pem -extensions ca_cert -subj /CN=$(topca) @ln -s cacert.pem $(DATA_DIR)/$(topca)/public/`openssl x509 -noout -hash < $(DATA_DIR)/$(topca)/public/cacert.pem`.0 @touch $(DATA_DIR)/$(topca)/public/cachain.pem @ln -s ../../$(topca)/public/cacert.pem $(DATA_DIR)/$(topca)/public/caroot.pem @$(REMAKE) gencrl ca=$(topca) # Create a secondary CA newca: @if [ -z "$(name)" -o -z "$(ca)" ]; then echo "Missing parameter. Ex: make newca name=subca.testbed.aaa ca=rootca.testbed.aaa"; exit 1; fi @if [ ! -e $(DATA_DIR)/$(ca)/private/cakey.pem ]; then echo "The parent CA $(ca) does not exist."; exit 1; fi @if [ ! -d $(DATA_DIR)/$(name) ]; then $(REMAKE) structure caname=$(name); fi # Generate the private key and CSR for the new CA if needed @if [ ! -e $(DATA_DIR)/$(name)/private/cakey.pem ]; then \ openssl genrsa -out $(DATA_DIR)/$(name)/private/cakey.pem $(cakeysize) ; fi @if [ ! -e $(DATA_DIR)/$(name)/private/cacsr.pem ]; then \ CA_ROOT_DIR=$(DATA_DIR)/$(name) openssl req $(CONFIG) -new -batch -out $(DATA_DIR)/$(name)/private/cacsr.pem \ -key $(DATA_DIR)/$(name)/private/cakey.pem \ -subj /CN=$(name) -reqexts v3_req_ca; fi # Revoke a previous certificate for this CA if any @if [ -e $(DATA_DIR)/$(name)/public/cacert.pem ]; then \ echo "Revoking previous certificate ..."; \ $(REMAKE) revoke name=$(name) ca=$(ca); \ mv $(DATA_DIR)/$(name)/public/cacert.pem $(DATA_DIR)/$(name)/public/cacert-$(DATE).pem; fi # Issue the new CA certificate @CA_ROOT_DIR=$(DATA_DIR)/$(ca) openssl ca $(CONFIG) -in $(DATA_DIR)/$(name)/private/cacsr.pem \ -out $(DATA_DIR)/$(name)/public/cacert.pem \ -batch -extensions ca_cert # Hash and link to parent @ln -s cacert.pem $(DATA_DIR)/$(ca)/public/`openssl x509 -noout -hash < $(DATA_DIR)/$(name)/public/cacert.pem`.0 @rm -f $(DATA_DIR)/$(name)/parent @ln -s ../$(ca) $(DATA_DIR)/$(name)/parent @cat $(DATA_DIR)/$(name)/public/cacert.pem $(DATA_DIR)/$(ca)/public/cachain.pem > $(DATA_DIR)/$(name)/public/cachain.pem @ln -s ../../$(ca)/public/caroot.pem $(DATA_DIR)/$(name)/public/caroot.pem @for CRLFILE in `cd $(DATA_DIR)/$(ca)/public/crl && ls -1`; do ln -sf ../../../$(ca)/public/crl/$$CRLFILE $(DATA_DIR)/$(name)/public/crl/$$CRLFILE; done @$(REMAKE) gencrl ca=$(name) # Create a new certificate for use in TLS communications and other terminal usages newcert: @if [ -z "$(name)" -o -z "$(ca)" ]; then echo "Missing parameter. Ex: make newcert name=service.testbed.aaa ca=ca.testbed.aaa"; exit 1; fi @if [ ! -e $(DATA_DIR)/$(ca)/private/cakey.pem ]; then echo "The parent CA $(ca) does not exist."; exit 1; fi @if [ ! -d $(DATA_DIR)/$(ca)/clients/$(name) ]; then mkdir $(DATA_DIR)/$(ca)/clients/$(name); fi # Create a private key if needed @if [ ! -e $(DATA_DIR)/$(ca)/clients/$(name)/privkey.pem ]; then \ openssl genrsa -out $(DATA_DIR)/$(ca)/clients/$(name)/privkey.pem $(keysize); fi # Create a CSR if needed @if [ ! -e $(DATA_DIR)/$(ca)/clients/$(name)/csr.pem ]; then \ CA_ROOT_DIR=$(DATA_DIR)/$(ca) openssl req $(CONFIG) -new -batch -out $(DATA_DIR)/$(ca)/clients/$(name)/csr.pem \ -key $(DATA_DIR)/$(ca)/clients/$(name)/privkey.pem \ -subj /CN=$(name); fi # Revoke a previous certificate if any @if [ -e $(DATA_DIR)/$(ca)/clients/$(name)/cert.pem ]; then \ $(REMAKE) revoke name=$(name) ca=$(ca); \ mv $(DATA_DIR)/$(ca)/clients/$(name)/cert.pem $(DATA_DIR)/$(ca)/clients/$(name)/cert-$(DATE).pem; fi # Now sign the new certificate with the CA key @CA_ROOT_DIR=$(DATA_DIR)/$(ca) openssl ca $(CONFIG) -in $(DATA_DIR)/$(ca)/clients/$(name)/csr.pem \ -out $(DATA_DIR)/$(ca)/clients/$(name)/cert.pem \ -batch # Hash @ln -sf `cat $(DATA_DIR)/$(ca)/serial.old`.pem $(DATA_DIR)/$(ca)/public/`openssl x509 -noout -hash < $(DATA_DIR)/$(ca)/clients/$(name)/cert.pem`.0 # Compiled informations for the client @cat $(DATA_DIR)/$(ca)/clients/$(name)/cert.pem $(DATA_DIR)/$(ca)/public/cachain.pem > $(DATA_DIR)/$(ca)/clients/$(name)/certchain.pem @ln -sf ../../public/crl $(DATA_DIR)/$(ca)/clients/$(name)/crl @ln -sf ../../public/caroot.pem $(DATA_DIR)/$(ca)/clients/$(name)/ca.pem # Create a PKCS#12 file containing the client's information p12: newcert # Create the PKCS#12 file @cat $(DATA_DIR)/$(ca)/clients/$(name)/privkey.pem \ $(DATA_DIR)/$(ca)/clients/$(name)/certchain.pem \ $(DATA_DIR)/$(ca)/clients/$(name)/ca.pem \ | openssl pkcs12 -export -out $(DATA_DIR)/$(ca)/clients/$(name)/$(name).p12 @echo "Client certificate is created in $(DATA_DIR)/$(ca)/clients/$(name)/$(name).p12" # Create an archive to send the data to the client node ship: @if [ -z "$(name)" -o -z "$(ca)" ]; then echo "Missing parameter. Ex: make ship name=service.testbed.aaa ca=ca.testbed.aaa"; exit 1; fi @if [ ! -e $(DATA_DIR)/$(ca)/private/cakey.pem ]; then echo "The parent CA $(ca) does not exist."; exit 1; fi @if [ ! -e $(DATA_DIR)/$(ca)/clients/$(name)/privkey.pem ]; then echo "The client $(name) does not exist, use 'make newcert' first."; exit 1; fi # Ship the data @tar -c -C $(DATA_DIR)/$(ca)/clients/$(name) -z -f $(ca)_$(name).tar.gz -h . @echo "The files have been packaged into archive: $(ca)_$(name).tar.gz" # Revoke a certificate revoke: @if [ -z "$(name)" -o -z "$(ca)" ]; then echo "Missing parameter. Ex: make revoke name=service.testbed.aaa ca=ca.testbed.aaa"; exit 1; fi @if [ ! -e $(DATA_DIR)/$(ca)/private/cakey.pem ]; then echo "The parent CA $(ca) does not exist."; exit 1; fi @if [ ! -e $(DATA_DIR)/$(ca)/clients/$(name)/cert.pem ]; \ then echo "$(DATA_DIR)/$(ca)/clients/$(name)/cert.pem not found"; \ exit 1; \ fi; # Revoke the certificate @CA_ROOT_DIR=$(DATA_DIR)/$(ca) openssl ca $(CONFIG) -revoke $(DATA_DIR)/$(ca)/clients/$(name)/cert.pem; @$(REMAKE) gencrl ca=$(ca) # Regenerate the Certificate Revocation List. gencrl: @if [ -z "$(ca)" ]; then echo "Missing parameter. Ex: make gencrl ca=ca.testbed.aaa"; exit 1; fi # Create the CRL @CA_ROOT_DIR=$(DATA_DIR)/$(ca) openssl ca $(CONFIG) -gencrl -out $(DATA_DIR)/$(ca)/public/crl/$(ca).pem @ln -s crl/$(ca).pem $(DATA_DIR)/$(ca)/public/local.pem @ln -s local.pem $(DATA_DIR)/$(ca)/public/`openssl crl -noout -hash < $(DATA_DIR)/$(ca)/public/crl/$(ca).pem`.r0 # End of file... nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/PKI/ca_script2/openssl.cnf000066400000000000000000000073751333553357400253560ustar00rootroot00000000000000# Note: for this file to be working, an environment var CA_ROOT_DIR = directory # must be defined and pointing to the CA top-level directory. HOME = . RANDFILE = $ENV::HOME/.rnd oid_section = new_oids [ new_oids ] #################################################################### [ req ] default_bits = 1024 # default_keyfile = privkey.pem string_mask = utf8only distinguished_name = req_distinguished_name attributes = req_attributes req_extensions = v3_req # overwrite with -reqexts x509_extensions = ca_cert # overwrite with -extensions; used for self-signed keys only [ req_distinguished_name ] countryName = Country Name (2 letter code) countryName_default = JP countryName_min = 2 countryName_max = 2 stateOrProvinceName = State or Province Name (full name) stateOrProvinceName_default = Tokyo localityName = Locality Name (eg, city) localityName_default = Koganei 0.organizationName = Organization Name (eg, company) 0.organizationName_default = WIDE 1.organizationName = Second Organization Name (eg, company) 1.organizationName_default = NICT organizationalUnitName = Organizational Unit Name (eg, section) organizationalUnitName_default = AAA WG testbed [ req_attributes ] challengePassword = A challenge password challengePassword_min = 0 challengePassword_max = 20 unstructuredName = An optional company name [ v3_req ] # Extensions to add to a certificate request basicConstraints = CA:FALSE keyUsage = nonRepudiation, digitalSignature, keyEncipherment [ v3_req_ca ] # Extensions to add to a certificate request for CA basicConstraints = CA:TRUE #################################################################### [ ca ] default_ca = CA_default # The default ca section [ CA_default ] dir = $ENV::CA_ROOT_DIR # Where everything is kept certs = $dir/public # Where the issued certs are kept crl_dir = $dir/public # Where the issued crl are kept database = $dir/index.txt # database index file. #unique_subject = no # Set to 'no' to allow creation of # several ctificates with same subject. new_certs_dir = $dir/public # default place for new certs. certificate = $dir/public/cacert.pem # The CA certificate serial = $dir/serial # The current serial number crlnumber = $dir/crlnumber # the current crl number crl = $dir/public/local.pem # The current CRL private_key = $dir/private/cakey.pem # The private key x509_extensions = usr_cert # The extentions to add to the cert # overwrite with -extensions name_opt = ca_default # Subject Name options cert_opt = ca_default # Certificate field options crl_extensions = crl_ext default_days = 3650 # how long to certify for default_crl_days= 365 # how long before next CRL default_md = sha1 # which md to use. preserve = no # keep passed DN ordering # We accept to sign anything, but a real deployment would limit to proper domain etc... policy = policy_anything [ policy_anything ] countryName = optional stateOrProvinceName = optional localityName = optional organizationName = optional organizationalUnitName = optional commonName = supplied emailAddress = optional [ usr_cert ] basicConstraints=CA:FALSE # This is typical in keyUsage for a client certificate. keyUsage = nonRepudiation, digitalSignature, keyEncipherment subjectKeyIdentifier=hash authorityKeyIdentifier=keyid,issuer [ ca_cert ] # Extensions for a typical CA subjectKeyIdentifier=hash authorityKeyIdentifier=keyid:always,issuer:always basicConstraints = critical,CA:true # Remove "critical," in case of problems keyUsage = cRLSign, keyCertSign # subjectAltName=email:copy # Copy issuer details # issuerAltName=issuer:copy [ crl_ext ] # CRL extensions. # Only issuerAltName and authorityKeyIdentifier make any sense in a CRL. # issuerAltName=issuer:copy authorityKeyIdentifier=keyid:always,issuer:always nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/PKI/phpki-0.82.patch000066400000000000000000000307631333553357400236700ustar00rootroot00000000000000diff -Nur phpki-0.82/ca/main.php phpki-0.82-fD/ca/main.php --- phpki-0.82/ca/main.php 2005-11-17 10:17:20.000000000 +0900 +++ phpki-0.82-fD/ca/main.php 2010-05-27 17:04:44.000000000 +0900 @@ -36,7 +36,7 @@ else { ?> -

There was an error updating the Certificate Revocation List.


+

There was an error updating the Certificate Revocation List.


Debug Info:

@@ -53,8 +53,11 @@ default: printHeader('ca'); ?> -
-
+
+
+ +

For freeDiameter specific instructions, scroll down this page...


+
@@ -89,7 +92,57 @@
-

+

+
+ + + + + + + + + + + + + + + +
+

@@ -302,13 +303,14 @@ Certificate Use: diff -Nur phpki-0.82/include/openssl_functions.php phpki-0.82-fD/include/openssl_functions.php --- phpki-0.82/include/openssl_functions.php 2007-01-04 15:47:57.000000000 +0900 +++ phpki-0.82-fD/include/openssl_functions.php 2010-05-27 16:59:57.000000000 +0900 @@ -69,6 +69,13 @@ default_days = 365 policy = policy_supplied +[ freediameter_cert ] +x509_extensions = freediameter_ext +default_days = 730 +policy = policy_supplied + + + [ vpn_cert ] x509_extensions = vpn_client_server_ext default_days = 365 @@ -152,6 +159,24 @@ nsRevocationUrl = ns_revoke_query.php? nsCaPolicyUrl = $config[base_url]policy.html +[ freediameter_ext ] +basicConstraints = CA:false +keyUsage = critical, digitalSignature, keyEncipherment +extendedKeyUsage = critical, serverAuth, clientAuth +nsCertType = critical, server, client +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid:always, issuer:always +subjectAltName = DNS:$common_name,email:copy +issuerAltName = issuer:copy +crlDistributionPoints = URI:$config[base_url]index.php?stage=dl_crl +nsComment = \"PHPki/OpenSSL Generated Secure Certificate for freeDiameter\" +nsBaseUrl = $config[base_url] +nsRevocationUrl = ns_revoke_query.php? +nsCaPolicyUrl = $config[base_url]policy.html + + + + [ time_stamping_ext ] basicConstraints = CA:false keyUsage = critical, nonRepudiation, digitalSignature diff -Nur phpki-0.82/openssl.cnf phpki-0.82-fD/openssl.cnf --- phpki-0.82/openssl.cnf 2006-07-23 00:33:34.000000000 +0900 +++ phpki-0.82-fD/openssl.cnf 2010-05-27 17:00:33.000000000 +0900 @@ -39,6 +39,11 @@ default_days = 365 policy = policy_supplied +[ freediameter_cert ] +x509_extensions = freediameter_ext +default_days = 730 +policy = policy_supplied + [ vpn_cert ] x509_extensions = vpn_client_server_ext default_days = 365 @@ -115,6 +120,23 @@ nsRevocationUrl = ns_revoke_query.php? nsCaPolicyUrl = http://www.somewhere.com/phpki/policy.html +[ freediameter_ext ] +basicConstraints = CA:false +keyUsage = critical, digitalSignature, keyEncipherment +extendedKeyUsage = critical, serverAuth, clientAuth +nsCertType = critical, server, client +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid:always, issuer:always +subjectAltName = DNS:$common_name,email:copy +issuerAltName = issuer:copy +crlDistributionPoints = URI:$config[base_url]index.php?stage=dl_crl +nsComment = "PHPki/OpenSSL Generated Secure Certificate for freeDiameter" +nsBaseUrl = $config[base_url] +nsRevocationUrl = ns_revoke_query.php? +nsCaPolicyUrl = $config[base_url]policy.html + + + [ vpn_client_ext ] basicConstraints = critical, CA:false keyUsage = critical, digitalSignature diff -Nur phpki-0.82/setup.php phpki-0.82-fD/setup.php --- phpki-0.82/setup.php 2007-07-22 23:34:08.000000000 +0900 +++ phpki-0.82-fD/setup.php 2010-05-27 17:01:41.000000000 +0900 @@ -339,6 +339,11 @@ default_days = 365 policy = policy_supplied +[ freediameter_cert ] +x509_extensions = freediameter_ext +default_days = 730 +policy = policy_supplied + [ vpn_cert ] x509_extensions = vpn_client_server_ext default_days = 365 @@ -418,6 +423,22 @@ nsRevocationUrl = ns_revoke_query.php? nsCaPolicyUrl = $config[base_url]policy.html +[ freediameter_ext ] +basicConstraints = CA:false +keyUsage = critical, digitalSignature, keyEncipherment +extendedKeyUsage = critical, serverAuth, clientAuth +nsCertType = critical, server, client +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid:always, issuer:always +subjectAltName = DNS:$common_name,email:copy +issuerAltName = issuer:copy +crlDistributionPoints = URI:$config[base_url]index.php?stage=dl_crl +nsComment = "PHPki/OpenSSL Generated Secure Certificate for freeDiameter" +nsBaseUrl = $config[base_url] +nsRevocationUrl = ns_revoke_query.php? +nsCaPolicyUrl = $config[base_url]policy.html + + [ time_stamping_ext ] basicConstraints = CA:false keyUsage = critical, nonRepudiation, digitalSignature diff -Nur phpki-0.82/setup.php-presetup phpki-0.82-fD/setup.php-presetup --- phpki-0.82/setup.php-presetup 2007-07-22 23:34:08.000000000 +0900 +++ phpki-0.82-fD/setup.php-presetup 2010-05-27 17:01:41.000000000 +0900 @@ -339,6 +339,11 @@ default_days = 365 policy = policy_supplied +[ freediameter_cert ] +x509_extensions = freediameter_ext +default_days = 730 +policy = policy_supplied + [ vpn_cert ] x509_extensions = vpn_client_server_ext default_days = 365 @@ -418,6 +423,22 @@ nsRevocationUrl = ns_revoke_query.php? nsCaPolicyUrl = $config[base_url]policy.html +[ freediameter_ext ] +basicConstraints = CA:false +keyUsage = critical, digitalSignature, keyEncipherment +extendedKeyUsage = critical, serverAuth, clientAuth +nsCertType = critical, server, client +subjectKeyIdentifier = hash +authorityKeyIdentifier = keyid:always, issuer:always +subjectAltName = DNS:$common_name,email:copy +issuerAltName = issuer:copy +crlDistributionPoints = URI:$config[base_url]index.php?stage=dl_crl +nsComment = "PHPki/OpenSSL Generated Secure Certificate for freeDiameter" +nsBaseUrl = $config[base_url] +nsRevocationUrl = ns_revoke_query.php? +nsCaPolicyUrl = $config[base_url]policy.html + + [ time_stamping_ext ] basicConstraints = CA:false keyUsage = critical, nonRepudiation, digitalSignature nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/README000066400000000000000000000055151333553357400214010ustar00rootroot00000000000000This file describes the content of the "contrib" directory. For information about the freeDiameter project, please refer to top-level README file. - update_copyright.sh : This script will simply update the copyright information in all source files in the freeDiameter mercurial repository, based on the last modification time. Thought I might share it if other people find it useful for their own project... - debian : This directory contains the packaging information to create native Debian / Ubuntu packages. It requires debhelper >= 7.3.9 (support for cmake). To use, simply link the debian folder from the main freeDiameter folder, then use your building script as usual ('dh binary' or 'pdebuild' or ...). If you simply intend to use freeDiameter package, the relevant information is located at: http://www.freediameter.net/trac/wiki/DebRepository - PKI : This directory contains useful material related to establishing a Public Key Infrastructure (PKI) for deploying x509 certificates and use these for TLS authentication of the freeDiameter nodes. IMPORTANT: Please note that these solutions are NOT suitable for use in a production environment! It allows easy deployment of certificates for tests, and that is their sole purpose. The directory contains: - ca_script: a simple Makefile allowing you to generate a self-signed certificate (root) and then issue new certificates and private keys for your users. Run "make" without argument to get the help. - ca_script2: An evolution of the previous Makefile. This one allows you to create a hierarchy of CA and certificates. - phpki-0.82.patch : This patch is to be applied to PHPki to customize the use for freeDiameter. PHPki (http://sourceforge.net/projects/phpki/) is a PHP-based web interface that provides more or less the same services as ca_script. - OpenWRT : This directory contains the scripts and documentation related to the integration of freeDiameter RADIUS/Diameter gateway component in the openWRT distribution (http://openwrt.org) -- the goal is to give the access point the ability to "talk" Diameter instead of RADIUS. - nightly_tests : This directory contains the scripts and documentation for the nightly tests run on freeDiameter. The results are published at the following URL: http://www.freediameter.net/CDash/index.php?project=freeDiameter - dict_legacy: XML and DTD files for the dict_legacy_xml.fdx extension. - dict_dcca: partial implementations of the DCCA dictionary - dict_gx: untested implementation of the Gx interface. - test_Gx: a responder on the Gx interface that always send SUCCESS status. - wireshark: This contains some information on how to use Wireshark to monitor Diameter exchange protected with TLS. It involves patching the wireshark software. nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/RPM/000077500000000000000000000000001333553357400211515ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/RPM/build_rpm.txt000077500000000000000000000005541333553357400236760ustar00rootroot00000000000000[krum@ThinkPad DelMe]$ cp freeDiameter.spec /home/krum/rpmbuild/SPECS/ [krum@ThinkPad DelMe]$ cd /home/krum/rpmbuild/SOURCES/ [krum@ThinkPad ~]$ cd /home/krum/rpmbuild/SOURCES/ [krum@ThinkPad SOURCES]$ wget http://www.freediameter.net/hg/freeDiameter/archive/1.1.6.tar.gz [krum@ThinkPad SOURCES]$ cd ../SPECS/ [krum@ThinkPad SPECS]$ rpmbuild -ba freeDiameter.spec nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/RPM/freeDiameter.spec000077500000000000000000000037051333553357400244310ustar00rootroot00000000000000 Name: freeDiameter Version: 1.1.6 Release: 1%{?dist} Packager: krum.boy4ev@gmail.com Summary: freeDiameter is an implementation of the Diameter protocol. Group: Development/Libraries License: BSD License URL: http://www.freediameter.net Source0: http://www.freediameter.net/hg/freeDiameter/archive/1.1.6.tar.gz BuildRequires: cmake make gcc gcc-c++ flex bison lksctp-tools-devel BuildRequires: gnutls-devel libgcrypt-devel libidn-devel BuildRequires: mercurial Requires: lksctp-tools %description freeDiameter is an implementation of the Diameter protocol. Diameter is a protocol designed to carry Authentication, Authorization and Accounting (AAA) payload. It is an evolution of the RADIUS protocol (as the name suggests). See http://www.freediameter.net/ for more information on the project. freeDiameter was previously known as the "waaad" project (WIDE AAA Daemon) This project is not related to the "freediameter" project from Sun on sourceforge. Author: Sebastien Decugis. %package daemon Summary: Simple daemon parses the command line and initializes the freeDiameter framework. Group: Development/Libraries Requires: freeDiameter %description daemon freeDiameterd : this simple daemon parses the command line and initializes the freeDiameter framework. Use it for your Diameter server & agent components. In case of Diameter clients, you probably will prefer linking the libfdcore directly with your client application that must be made Diameter-aware. %prep %setup -qn %{name}-%{version} %build mkdir -p build cd build cmake ../ make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT cd build make install DESTDIR=$RPM_BUILD_ROOT make test %post daemon echo "/usr/local/lib/" > /etc/ld.so.conf.d/%{name}.conf /sbin/ldconfig %files %defattr(-,root,root,-) /usr/local/include/ /usr/local/lib/ %files daemon %defattr(-,root,root,-) /usr/local/bin/ %changelog * Sat Jul 5 2013 Krum Boychev - 1.1.6-1 - initial version nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/app_acct_tools/000077500000000000000000000000001333553357400235055ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/app_acct_tools/README000066400000000000000000000052671333553357400243770ustar00rootroot00000000000000This folder contains several tools to use and parse the data from the app_acct.fdx extension. - database.sql : An example database format for use with the scripts in this folder. - app_acct.conf : The part of app_acct.conf that is relevant to this database schema. - purge_to_file.php : This PHP script is used to take the records from the incoming table (stored by app_acct.fdx extension) and save these records in a file in SQL format. This is similar to pg_dump command, except that all the records that have been saved in the file are removed from the table. This can be used in cron jobs for example to maintain a reasonable size of the incoming table and move the data to another host for off-line processing. It can also be useful to aggregate the data from different hosts, if you are load-balancing your accounting servers for example (granted that all app_acct.fdx use identical table format on all the servers). See the top of the file for configuration parameters. - process_records.php : This PHP script processes the records pertaining to users sessions, as follow: * when a session is complete (STOP record received), it stores a session summary into the processed records table (see process_database.sql file for format). * It optionally archives the processed records into a different table, before deleting them. * It can also move records of unterminated sessions that are older than a configurable time to an orphan_records table, so that they are not re-processed every time. This orphans table must have the same structure as the "incoming" table. - display_results.php, display_self.php, display_stats.php : These scripts give a few examples of how to display the processed data. USAGE: *) Initial: create your database using database.sql file *) Configure the app_acct.fdx extension using tips from app_acct.conf The following processing can be run for example as cron jobs. 1) On each accounting server for the realm, configure the app_acct.fdx extension to dump the records in a local database (all servers must use the same database format). The table would typically be "incoming". 2) Run the purge_to_file.php script on each server regularly, then move the generated files onto a single server for processing. This server only needs the other tables. 3) Add the data from the files into the database in this server by running: psql < file.sql Each file that has been added should then be archived and removed so that it is not re-added later. 4) Run the process_records.php script on this processing server. Now, the database contains the aggregated data that can be visualized with display_*.php scripts. nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/app_acct_tools/app_acct.conf000066400000000000000000000027521333553357400261340ustar00rootroot00000000000000 # This is the configuration for use with the database created by 'database.sql' file. # One should take care of configuring the ConnInfo properly. ConnInfo = ""; # The table and special fields names: Table = "incoming"; Timestamp_field = "recorded_on"; Server_name_field = "recorded_serv"; # The AVPs that are saved in the table: "Origin-Host"; "Origin-Realm"; "Destination-Realm"; "Destination-Host"; "Session-Id"; "Origin-State-Id"; "Accounting-Record-Type"; "Accounting-Record-Number"; "User-Name"; "Event-Timestamp"; "Acct-Application-Id"; "Accounting-Sub-Session-Id"; "Acct-Session-Id"; "Acct-Multi-Session-Id"; "Origin-AAA-Protocol"; "Acct-Delay-Time"; "NAS-Identifier"; "NAS-IP-Address"; "NAS-IPv6-Address"; "NAS-Port"; "NAS-Port-Id"; "NAS-Port-Type"; "Service-Type"; "Termination-Cause"; "Accounting-Input-Octets"; "Accounting-Input-Packets"; "Accounting-Output-Octets"; "Accounting-Output-Packets"; "Acct-Authentic"; "Acct-Link-Count"; "Acct-Session-Time"; "Acct-Tunnel-Connection"; "Acct-Tunnel-Packets-Lost"; "Callback-Id"; "Callback-Number"; "Called-Station-Id"; "Calling-Station-Id"; "Connect-Info"; "Originating-Line-Info"; "Authorization-Lifetime"; "Session-Timeout"; "Idle-Timeout"; "Port-Limit"; "Accounting-Realtime-Required"; "Acct-Interim-Interval"; "Filter-Id"; "NAS-Filter-Rule"; "QoS-Filter-Rule"; "Login-IP-Host"; "Login-IPv6-Host"; "Login-LAT-Group"; "Login-LAT-Node"; "Login-LAT-Port"; "Login-LAT-Service"; "Login-Service"; "Login-TCP-Port"; "Route-Record" = { multi=5; }; nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/app_acct_tools/database.sql000066400000000000000000000156421333553357400260020ustar00rootroot00000000000000-- database.sql -- Script to create the tables for process_records.php script to perform. -- IMPORTANT NOTE: No constraint and almost no index are created by this script. -- One should consider adding the appropriate indexes according to their utilization of the data. -- Incoming table table. -- This table is used by app_acct.fdx to store the Accounting records. CREATE TABLE incoming ( "Origin-Host" bytea NOT NULL, "Origin-Realm" bytea NOT NULL, "Destination-Realm" bytea, "Destination-Host" bytea, "Session-Id" bytea NOT NULL, "Origin-State-Id" integer, "Accounting-Record-Type" integer NOT NULL, "Accounting-Record-Number" integer NOT NULL, "User-Name" bytea, "Event-Timestamp" bytea, "Acct-Application-Id" integer, "Accounting-Sub-Session-Id" bigint, "Acct-Session-Id" bytea, "Acct-Multi-Session-Id" bytea, "Origin-AAA-Protocol" integer, "Acct-Delay-Time" integer, "NAS-Identifier" bytea, "NAS-IP-Address" bytea, "NAS-IPv6-Address" bytea, "NAS-Port" integer, "NAS-Port-Id" bytea, "NAS-Port-Type" integer, "Service-Type" integer, "Termination-Cause" integer, "Accounting-Input-Octets" bigint, "Accounting-Input-Packets" bigint, "Accounting-Output-Octets" bigint, "Accounting-Output-Packets" bigint, "Acct-Authentic" integer, "Acct-Link-Count" integer, "Acct-Session-Time" integer, "Acct-Tunnel-Connection" bytea, "Acct-Tunnel-Packets-Lost" integer, "Callback-Id" bytea, "Callback-Number" bytea, "Called-Station-Id" bytea, "Calling-Station-Id" bytea, "Connect-Info" bytea, "Originating-Line-Info" bytea, "Authorization-Lifetime" integer, "Session-Timeout" integer, "Idle-Timeout" integer, "Port-Limit" integer, "Accounting-Realtime-Required" integer, "Acct-Interim-Interval" integer, "Filter-Id" bytea, "NAS-Filter-Rule" bytea, "QoS-Filter-Rule" bytea, "Login-IP-Host" bytea, "Login-IPv6-Host" bytea, "Login-LAT-Group" bytea, "Login-LAT-Node" bytea, "Login-LAT-Port" bytea, "Login-LAT-Service" bytea, "Login-Service" integer, "Login-TCP-Port" integer, "Route-Record1" bytea, "Route-Record2" bytea, "Route-Record3" bytea, "Route-Record4" bytea, "Route-Record5" bytea, "recorded_on" timestamp with time zone NOT NULL, "recorded_serv" bytea ); -- Accounting Data. -- This is is the processed data that is used also by display_results.php CREATE TABLE processed ( user_name bytea, user_device bytea, nas_info bytea, sess_start timestamp with time zone, sess_duration interval, downl_bytes bigint, upl_bytes bigint, downl_packets bigint, upl_packets bigint ); CREATE INDEX un_index ON processed (user_name); -- Orphans table. -- This is optional, and it must match the structure of your incoming table. CREATE TABLE orphans ( "Origin-Host" bytea NOT NULL, "Origin-Realm" bytea NOT NULL, "Destination-Realm" bytea, "Destination-Host" bytea, "Session-Id" bytea NOT NULL, "Origin-State-Id" integer, "Accounting-Record-Type" integer NOT NULL, "Accounting-Record-Number" integer NOT NULL, "User-Name" bytea, "Event-Timestamp" bytea, "Acct-Application-Id" integer, "Accounting-Sub-Session-Id" bigint, "Acct-Session-Id" bytea, "Acct-Multi-Session-Id" bytea, "Origin-AAA-Protocol" integer, "Acct-Delay-Time" integer, "NAS-Identifier" bytea, "NAS-IP-Address" bytea, "NAS-IPv6-Address" bytea, "NAS-Port" integer, "NAS-Port-Id" bytea, "NAS-Port-Type" integer, "Service-Type" integer, "Termination-Cause" integer, "Accounting-Input-Octets" bigint, "Accounting-Input-Packets" bigint, "Accounting-Output-Octets" bigint, "Accounting-Output-Packets" bigint, "Acct-Authentic" integer, "Acct-Link-Count" integer, "Acct-Session-Time" integer, "Acct-Tunnel-Connection" bytea, "Acct-Tunnel-Packets-Lost" integer, "Callback-Id" bytea, "Callback-Number" bytea, "Called-Station-Id" bytea, "Calling-Station-Id" bytea, "Connect-Info" bytea, "Originating-Line-Info" bytea, "Authorization-Lifetime" integer, "Session-Timeout" integer, "Idle-Timeout" integer, "Port-Limit" integer, "Accounting-Realtime-Required" integer, "Acct-Interim-Interval" integer, "Filter-Id" bytea, "NAS-Filter-Rule" bytea, "QoS-Filter-Rule" bytea, "Login-IP-Host" bytea, "Login-IPv6-Host" bytea, "Login-LAT-Group" bytea, "Login-LAT-Node" bytea, "Login-LAT-Port" bytea, "Login-LAT-Service" bytea, "Login-Service" integer, "Login-TCP-Port" integer, "Route-Record1" bytea, "Route-Record2" bytea, "Route-Record3" bytea, "Route-Record4" bytea, "Route-Record5" bytea, "recorded_on" timestamp with time zone NOT NULL, "recorded_serv" bytea ); -- Archives table. -- This is also optional, and it must match the structure of your incoming table. CREATE TABLE archived ( "Origin-Host" bytea NOT NULL, "Origin-Realm" bytea NOT NULL, "Destination-Realm" bytea, "Destination-Host" bytea, "Session-Id" bytea NOT NULL, "Origin-State-Id" integer, "Accounting-Record-Type" integer NOT NULL, "Accounting-Record-Number" integer NOT NULL, "User-Name" bytea, "Event-Timestamp" bytea, "Acct-Application-Id" integer, "Accounting-Sub-Session-Id" bigint, "Acct-Session-Id" bytea, "Acct-Multi-Session-Id" bytea, "Origin-AAA-Protocol" integer, "Acct-Delay-Time" integer, "NAS-Identifier" bytea, "NAS-IP-Address" bytea, "NAS-IPv6-Address" bytea, "NAS-Port" integer, "NAS-Port-Id" bytea, "NAS-Port-Type" integer, "Service-Type" integer, "Termination-Cause" integer, "Accounting-Input-Octets" bigint, "Accounting-Input-Packets" bigint, "Accounting-Output-Octets" bigint, "Accounting-Output-Packets" bigint, "Acct-Authentic" integer, "Acct-Link-Count" integer, "Acct-Session-Time" integer, "Acct-Tunnel-Connection" bytea, "Acct-Tunnel-Packets-Lost" integer, "Callback-Id" bytea, "Callback-Number" bytea, "Called-Station-Id" bytea, "Calling-Station-Id" bytea, "Connect-Info" bytea, "Originating-Line-Info" bytea, "Authorization-Lifetime" integer, "Session-Timeout" integer, "Idle-Timeout" integer, "Port-Limit" integer, "Accounting-Realtime-Required" integer, "Acct-Interim-Interval" integer, "Filter-Id" bytea, "NAS-Filter-Rule" bytea, "QoS-Filter-Rule" bytea, "Login-IP-Host" bytea, "Login-IPv6-Host" bytea, "Login-LAT-Group" bytea, "Login-LAT-Node" bytea, "Login-LAT-Port" bytea, "Login-LAT-Service" bytea, "Login-Service" integer, "Login-TCP-Port" integer, "Route-Record1" bytea, "Route-Record2" bytea, "Route-Record3" bytea, "Route-Record4" bytea, "Route-Record5" bytea, "recorded_on" timestamp with time zone NOT NULL, "recorded_serv" bytea ); nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/app_acct_tools/display_results.php000066400000000000000000000075531333553357400274560ustar00rootroot000000000000001 && $count<8) { $size=$size/1024; $count++; } if( $size >= 100 ) $decimals = 0; elseif ($size >= 10 ) $decimals = 1; else $decimals = 2; $return = number_format($size,$decimals,'.',' ')." ".$format[$count]; return $return; } /* Build the SQL query */ $sql = 'SELECT *, to_char(sess_start, \'YYYY-MM-DD HH24:MI:SS (TZ)\') as fmt_sess_start FROM "'.$PROCESSED.'"'; $where=0; if ($USERS) { $USERS = array_map(pg_escape_bytea, $USERS); $sql .= " WHERE user_name IN ('". join("', '", array_values($USERS))."') "; $where = 1; } if ($START_TIME) { $START_TIME = pg_escape_string($START_TIME); if ($where++) $sql .= " AND "; else $sql .= " WHERE "; $sql .= "sess_start >= '".$START_TIME."'"; } if ($END_TIME) { $END_TIME = pg_escape_string($END_TIME); if ($where++) $sql .= " AND "; else $sql .= " WHERE "; $sql .= "sess_start <= '".$END_TIME."'"; } $sql .= " ORDER BY sess_start, sess_duration"; if ($LIMIT) $sql .= " LIMIT $LIMIT"; if ($LIMIT_OFFSET) $sql .= " OFFSET $LIMIT_OFFSET"; /* Execute the query */ $result = pg_query($dbconn, $sql) or die('Query failed: ' . pg_last_error() . "\n"); $recs = pg_num_rows($result); if ($recs == 0) { echo "

Sorry, no data is available in this selection.

\n"; } else { echo "

$recs records found.

\n"; ?> \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; } } pg_free_result($result); /* Closing connection */ pg_close($dbconn); ?> nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/app_acct_tools/display_self.php000066400000000000000000000116051333553357400266770ustar00rootroot00000000000000 # SSLVerifyClient require # SSLVerifyDepth 2 # /* Check the client is correctly SSL authenticated with his server */ if (!isset($_SERVER["SSL_CLIENT_VERIFY"]) || $_SERVER["SSL_CLIENT_VERIFY"] != "SUCCESS") die("SSL authentication failed, the webserver is probably not configured correctly.\n"); /* Force some parameters to integer values */ if ($_GET["t_limit"]) $_GET["t_limit"] = (int) $_GET["t_limit"]; if ($_GET["t_offset"]) $_GET["t_offset"] = (int) $_GET["t_offset"]; /* Default form values */ if (!isset($_GET["Submit"])) { $_GET["t_limit"] = 50; $_GET["c_limit"] = 1; $_GET["t_offset"] = 0; } /* Output the form */ ?> Accounting Data

Accounting data

Note well: this page displays only data about terminated sessions.

Device identifier Access Device information Session started on Duration Downloaded Uploaded
"; echo htmlentities(pg_unescape_bytea($record["user_device"])); echo ""; echo htmlentities(pg_unescape_bytea($record["nas_info"])); echo ""; echo $record["fmt_sess_start"]; echo ""; echo htmlentities($record["sess_duration"]); echo ""; echo human_readable( $record["downl_bytes"] )." (".$record["downl_packets"]."pckts)"; echo ""; echo human_readable( $record["upl_bytes"] )." (".$record["upl_packets"]."pckts)"; echo "
Filtering parameters
> Show only sessions starting from (YYYY-MM-DD HH:MM:SS): >
> Show only sessions starting until (YYYY-MM-DD HH:MM:SS): >
> Show only this number of records: >
> Starting from record: >
Apply this filter:

Currently displaying user

nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/app_acct_tools/display_stats.php000066400000000000000000000205341333553357400271050ustar00rootroot00000000000000 Accounting Data

Statistical accounting data

Filtering options
> Limit to sessions starting from (hint): >
> Limit to sessions starting until (hint): >
Apply this filter:

Note well: this page displays only data about terminated sessions.

= '".pg_escape_string($START_TIME)."'"; } if ($END_TIME) { if ($sql_cond) $sql_cond .= " AND "; $sql_cond .= "sess_start =< '".pg_escape_string($END_TIME)."'"; } /* Function to format download size (from php.net) */ function human_readable( $size ) { $count = 0; $format = array("B","KB","MB","GB","TB","PB","EB","ZB","YB"); while(($size/1024)>1 && $count<8) { $size=$size/1024; $count++; } if( $size >= 100 ) $decimals = 0; elseif ($size >= 10 ) $decimals = 1; else $decimals = 2; $return = number_format($size,$decimals,'.',' ')." ".$format[$count]; return $return; } ?>
No data is available in the selected period.

\n"; die("\n"); } $data = pg_fetch_array($result, null, PGSQL_ASSOC); ?> \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "
Total accounted data
First session started:".$data["first_sess"]."
Last session started:".$data["last_sess"]."
Total data downloaded:".human_readable($data["total_down"])."
Total data uploaded:".human_readable($data["total_up"])."
Number of users who connected at least once:".$data["nb_users"]."
Number of access points involved:".$data["nb_ap"]."
\n"; pg_free_result($result); ?>
\n"; echo " \n"; echo " \n"; echo " \n"; } pg_free_result($result); ?>
Top-5 downloading users
".htmlentities(pg_unescape_bytea($data["user_name"]))."".human_readable($data["total_down"])."

\n"; echo " \n"; echo " \n"; echo " \n"; } pg_free_result($result); ?>
Top-5 uploading users
".htmlentities(pg_unescape_bytea($data["user_name"]))."".human_readable($data["total_up"])."

\n"; echo " \n"; echo " \n"; echo " \n"; } pg_free_result($result); ?>
Top-8 access devices (by number of users)
".htmlentities(pg_unescape_bytea($data["nas_info"]))."".$data["unc"]."

\n"; echo " \n"; echo " \n"; echo " \n"; } pg_free_result($result); ?>
Top-8 access devices (by traffic: up+down)
".htmlentities(pg_unescape_bytea($data["nas_info"]))."".human_readable($data["traffic"])."

Data generated by scripts from the freeDiameter project.

nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/app_acct_tools/process_records.php000066400000000000000000000242751333553357400274270ustar00rootroot00000000000000 0) { $i = 0; while ($orphan = pg_fetch_array($result, null, PGSQL_ASSOC)) { $i++; // this doesn't work: pg_insert( $dbconn, $ORPHANED_TABLE, $orphan ) or die('Insert failed: ' . pg_last_error() . "\n"); $sql = "INSERT INTO \"$ORPHANED_TABLE\" "; $sql .= '("'; $sql .= join('", "', array_keys($orphan)); $sql .= '") VALUES ('; for($c = 0; $c < count($orphan); $c++) $sql .= ($c ? ', ' : '').'$'.($c+1); $sql .= ')'; pg_query_params($dbconn, $sql, array_values($orphan)) or die('Insert failed: ' . pg_last_error() . "\n"); // This also doesn't work: pg_delete( $dbconn, $INCOMING, $orphan ) or die('Removing orphan failed: ' . pg_last_error() . "\n"); $sql = "DELETE FROM \"$INCOMING\" WHERE "; $sql .= '"Acct-Session-Id" = $1 AND "recorded_on" = $2'; pg_query_params($dbconn, $sql, array($orphan["Acct-Session-Id"], $orphan["recorded_on"])) or die('Removing orphan failed: ' . pg_last_error() . "\n"); } echo $i." orphans have been moved to '".$ORPHANED_TABLE."'\n"; } pg_free_result($result); } /* Delete duplicate records (which might have been received by different servers on different time, but are identical otherwise */ $duplicate_sql = ' SELECT * FROM (SELECT count(*) as cnt, min("recorded_on") as first, "Session-Id", "Acct-Session-Id", "Accounting-Record-Type", "Accounting-Record-Number"'; $duplicate_sql .= ' FROM "'.$INCOMING.'" GROUP BY "Session-Id", "Acct-Session-Id", "Accounting-Record-Type", "Accounting-Record-Number") as qry WHERE qry.cnt > 1'; $result = pg_query($dbconn, $orphans_sql) or die('Query failed: ' . pg_last_error() . "\n"); if (pg_num_rows($result) > 0) { /* We have some duplicates to delete */ $i=0; while ($dup = pg_fetch_array($result, null, PGSQL_ASSOC)) { $i++; $sql = "DELETE FROM \"$INCOMING\" WHERE "; $sql .= '"Session-Id" = $1 AND "Acct-Session-Id" = $2 AND "Accounting-Record-Type" = $3 AND "Accounting-Record-Number" = $4 AND "recorded_on" <> $5'; $params = array($dup["Session-Id"], $dup["Acct-Session-Id"], $dup["Accounting-Record-Type"], $dup["Accounting-Record-Number"], $dup["first"]); pg_query_params($dbconn, $sql, $params) or die('Removing duplicates failed: ' . pg_last_error() . "\n"); } echo $i." duplicate records have been deleted from '".$INCOMING."'\n"; } pg_free_result($result); /* Now, find Acct-Session-Id of completed sessions */ $completed_sql = ' SELECT "Session-Id", "Acct-Session-Id" FROM ('; $completed_sql .= ' SELECT "Session-Id", "Acct-Session-Id", bool_or("Accounting-Record-Type" = 2) as got_start, bool_or("Accounting-Record-Type" = 4) as got_stop '; $completed_sql .= ' FROM "'.$INCOMING.'" GROUP BY "Session-Id", "Acct-Session-Id"'; $completed_sql .= ' ) as input'; $completed_sql .= ' WHERE got_start AND got_stop'; $sids = pg_query($dbconn, $completed_sql) or die('Query failed: ' . pg_last_error() . "\n"); if (pg_num_rows($sids) > 0) { while ($sids_line = pg_fetch_array($sids, null, PGSQL_ASSOC)) { $sid = $sids_line["Session-Id"]; $asid = $sids_line["Acct-Session-Id"]; echo "Processing Acct-Session-Id '".$asid."', Session-Id '".$sid ."'... "; $data=array(); /* We simply ignore the interim record(s) in this first version, since they contain only cumulative data. It could be used in later version to draw the session details for example. */ $result = pg_query_params($dbconn, 'SELECT *, "recorded_on" - CAST(textcat(text("Acct-Session-Time"), text(\' seconds\')) as INTERVAL) as start_time FROM "'.$INCOMING. '" WHERE "Session-Id" = $1 AND "Acct-Session-Id" = $2 AND "Accounting-Record-Type" = 4 ORDER BY "recorded_on"', array($sid, $asid)) or die('Query failed: ' . pg_last_error() . "\n"); $record = pg_fetch_array($result, null, PGSQL_ASSOC) or die('Internal error, got_stop is true but no record was returned'); $data[/* "user_name" */] = $record["User-Name"]; $data[/* "user_device" */] = $record["Calling-Station-Id"]; $nas_id= ($record["NAS-Identifier"] ?: $record["Origin-Host"]) ?: ""; $ip = $record["NAS-IP-Address"] ?: $record["NAS-IPv6-Address"]; $nas_ip= $ip ? inet_ntop(pg_unescape_bytea($ip)) : ""; $nas_csi = $record["Called-Station-Id"]; $data[/* "nas_info" */] = $nas_id . " (".$nas_ip.")" . ($nas_csi ? " - Called Station: ".$nas_csi : ""); /* Is it possible to infer the session start time from this record only? */ if ($record["Acct-Session-Time"]) { /* Yes, let's go */ $data[/* "sess_start" */] = $record["start_time"]; $data[/* "sess_duration" */] = $record["Acct-Session-Time"]." seconds"; } else { /* No the information is missing, let's compute the approx value with the START record timestamp */ $res = pg_query_params($dbconn, 'SELECT t_start."recorded_on" as begining, t_end."recorded_on" - t_start."recorded_on" as duration'. ' FROM (SELECT "recorded_on" FROM "'.$INCOMING.'" WHERE "Session-Id" = $1 AND "Acct-Session-Id" = $2 AND "Accounting-Record-Type" = 4 ORDER BY "recorded_on" LIMIT 1) as t_end, '. ' (SELECT "recorded_on" FROM "'.$INCOMING.'" WHERE "Session-Id" = $1 AND "Acct-Session-Id" = $2 AND "Accounting-Record-Type" = 2 ORDER BY "Accounting-Record-Number", "recorded_on" LIMIT 1) as t_start', array($sid, $asid)) or die('Query failed: ' . pg_last_error() . "\n"); $vals = pg_fetch_array($result, null, PGSQL_ASSOC) or die('Internal error, unable to compute session time'); $data[/* "sess_start" */] = $vals["begining"]; $data[/* "sess_duration" */] = $vals["duration"]; pg_free_result($res); } $data[/* "downl_bytes" */] = $record["Accounting-Output-Octets"]; $data[/* "downl_packets" */] = $record["Accounting-Output-Packets"]; $data[/* "upl_bytes" */] = $record["Accounting-Input-Octets"]; $data[/* "upl_packets" */] = $record["Accounting-Input-Packets"]; pg_free_result($result); $result = pg_query_params($dbconn, 'INSERT INTO "'.$PROCESSED.'" (user_name, user_device, nas_info, sess_start, sess_duration, downl_bytes, downl_packets, upl_bytes, upl_packets) '. 'VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)', $data) or die('Query failed: ' . pg_last_error() . "\n"); pg_free_result($result); echo "Data stored into '$PROCESSED'... "; /* Now that we have processed it, move these records to the $ARCHIVES_TABLE table. */ if ($ARCHIVES_TABLE) { $result = pg_query_params($dbconn, 'SELECT * FROM "'.$INCOMING.'" WHERE "Session-Id" = $1 AND "Acct-Session-Id" = $2', array($sid, $asid)) or die('Query failed: ' . pg_last_error() . "\n"); $i = 0; while ($rec = pg_fetch_array($result, null, PGSQL_ASSOC)) { $i++; $sql = "INSERT INTO \"$ARCHIVES_TABLE\" "; $sql .= '("'; $sql .= join('", "', array_keys($rec)); $sql .= '") VALUES ('; for($c = 0; $c < count($rec); $c++) $sql .= ($c ? ', ' : '').'$'.($c+1); $sql .= ')'; pg_query_params($dbconn, $sql, array_values($rec)) or die('Insert failed: ' . pg_last_error() . "\n"); } echo $i." records archived into '".$ARCHIVES_TABLE."'"; pg_free_result($result); } echo "\n"; $result = pg_query_params($dbconn, 'DELETE FROM "'.$INCOMING.'" WHERE "Session-Id" = $1 AND "Acct-Session-Id" = $2', array($sid, $asid)) or die('Query failed: ' . pg_last_error() . "\n"); pg_free_result($result); } } pg_free_result($sids); echo "Operation completed with success!\n"; /* Closing connection */ pg_close($dbconn); ?> nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/app_acct_tools/purge_to_file.php000066400000000000000000000122121333553357400270370ustar00rootroot00000000000000 0". " AND a.attrelid = c.oid". " AND a.atttypid = t.oid". " ORDER BY a.attnum"; $result = pg_query($dbconn, $format_sql) or die('Query failed: ' . pg_last_error() . "\n"); /* app_acct.fdx only uses a few different fields types: */ $conv_types = array( "timestamptz" => "timestamp with time zone", /* recorded on */ "bytea" => "bytea", /* octet string */ "int4" => "integer", /* unsigned32, integer32, float32 */ "int8" => "bigint" /* unsigned64, integer64, float64 */ ); $fields_types=array(); fwrite($file, " -- Data purged on ".date(DATE_RFC822)."\n\n"); fwrite($file, " -- Format of the table it was extracted from:\n"); fwrite($file, " -- CREATE TABLE \"".$TABLE."\" (\n"); $i = 0; while ($field = pg_fetch_array($result, null, PGSQL_ASSOC)) { if ($i++) fwrite($file, ",\n"); fwrite($file, " -- \"".$field["field"]."\" "); if (array_key_exists($field["type"], $conv_types)) $fields_types[$field["field"]] = $conv_types[$field["type"]]; else $fields_types[$field["field"]] = $field["type"]; fwrite($file, $fields_types[$field["field"]]); if ($field["lengthvar"] != "-1") fwrite($file, "(".$field["lengthvar"].")"); if ($field["notnull"] == "t") fwrite($file, " NOT NULL"); } fwrite($file, "\n -- );\n\n"); pg_free_result($result); /* Now, the data */ $result = pg_query($dbconn, "SELECT * FROM \"".$TABLE."\"") or die('Query failed: ' . pg_last_error() . "\n"); if (pg_num_rows($result) > 0) { fwrite($file, "INSERT INTO \"".$TABLE."\"\n (\n"); $i = pg_num_fields($result); if ($DISPLAY_HTML && $HTML_HEADERS) echo "\nPurge\n\n"; if ($DISPLAY_HTML) echo "\n \n"; for ($j = 0; $j < $i; $j++) { fwrite($file, ($j ? ", " : "") . "\"" . pg_escape_string(pg_field_name($result, $j)). "\""); if ($DISPLAY_HTML) echo " \n"; } fwrite($file, "\n )\n VALUES \n"); if ($DISPLAY_HTML) echo " \n"; $i = 0; while ($line = pg_fetch_array($result, null, PGSQL_ASSOC)) { if ($i++) fwrite($file, ",\n"); fwrite($file, " ( "); if ($DISPLAY_HTML) echo " \n"; $j = 0; $sql = ""; foreach ($line as $f => $v) { if (!is_null($v)) switch ($fields_types[$f]) { case "bytea": $v = "E'".pg_escape_bytea(pg_unescape_bytea($v))."'"; break; case "timestamp with time zone": $v = "E'".pg_escape_string($v)."'"; break; } else $v = "NULL"; if ($DISPLAY_HTML) echo " \n"; fwrite($file, ($j ? ", " : "") . $v); $sql .= ($j ? " AND " : "") . "\"".pg_escape_string($f)."\" "; if (is_null($line[$f])) $sql .= " IS NULL"; else $sql .= " = " . $v; $j++; } fwrite($file, ")"); if ($DISPLAY_HTML) echo " \n"; $res = pg_query( "DELETE FROM \"".$TABLE."\" WHERE ".$sql) or die('DELETE query failed: ' . pg_last_error() . "\n"); pg_free_result($res); } fwrite($file, "\n;\n"); if ($DISPLAY_HTML) echo "
".htmlentities(pg_field_name($result, $j))."
".htmlentities(print_r($line[$f], TRUE))."
\n"; if ($DISPLAY_HTML && $HTML_HEADERS) echo "\n\n"; else echo $i." records have been successfully written to '".$DUMPFILE."' and removed from database.\n"; } else { if ($DISPLAY_HTML) echo "

No new record in the database

\n"; else echo "No new record in the database, the generated file is empty.\n"; } pg_free_result($result); /* Closing connection */ pg_close($dbconn); /* Closing the file */ fclose($file); ?> nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/000077500000000000000000000000001333553357400217355ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/changelog000066400000000000000000000234301333553357400236110ustar00rootroot00000000000000freediameter (1.2.1) UNRELEASED; urgency=low * New extension: rt_randomize (load-balancing on possible destinations) * New contrib: Gx extension. * rt_redirect.fdx and rt_load_balance.fdx improvement: use a hash table. Thanks Thomas. * New hook HOOK_MESSAGE_SENDING to give a last chance to edit messages before they are sent. This will be mostly used for enforcing interoperability constraints on non-compliant peers. * Simplified log output. Old output can be recovered with DEBUG_WITH_META build option. * Updated the internal counters for finer control on the load. * Fixes in message expiry mechanism. * Bug fixes in error messages generation and various parts. * Improvements on shutdown sequence handling. * Improvements to the dict_dcca_* extensions. * Improved default CMake configuration. * Improved build for MacOSX * Fixes for a few newer operating systems compatibility. * Fixed default secure Diameter port number 5868 instead of5658 (errata of RFC 6733) -- Sebastien Decugis Sat, 30 Jan 2016 23:38:03 +0800 freediameter (1.2.0) UNRELEASED; urgency=low * Major changes in the logging system to be more syslog and production friendly * New extension: dict_dcca_3gpp * New extension: dict_dcca_starent (Starent DCCA vendor-specific AVPs) * New extension: rt_ignore_dh (hide network topology by proxying Destination-Host). * New extension: rt_load_balance (load balancer based on pending queue size). * New extension: rt_busypeers. See doc/rt_busypeers.conf.sample. * New extension: dbg_msg_timings. Measures timing of message operations. * New extension: dbg_msg_dumps. Use to control hooks display. * New API (fd_hook_*) for extensions to control messages logging & profiling * New API (fd_stats_*) for extensions to monitor framework state (e.g. SNMP implem) * API change: all the fd_*_dump functions now return malloc'd strings instead of logging directly. * API change: callback parameter of fd_rt_out_register had its signature updated. * Updated dbg_monitoring extension to use the new API * New script to generate dictionary extensions from org file (see contrib/tools) * New compilation option: WORKAROUND_ACCEPT_INVALID_VSAI to improve compatibility with invalid Vendor-Specific-Application-Id AVPs received from some equipments (e.g. Cisco). * New compilation option: DISABLE_PEER_EXPIRY for use in test environments. * Extensions are now also searched in LD_LIBRARY_PATH. * Copy Proxy-Info AVP automatically in new answers. * Port value 0 allowed in configuration to disable local server (e.g. disable non-secure port). * API change: fd_msg_send_timeout now takes a separate callback for timeout situation. * Function changes: fd_msg_dump_* now split in three different type of output. * New test testmesg_stress to measure message parser performance * Fix termination of the framework to avoid failures. * Fix invalid timespec value in peer PSM appearing randomly (leading to crash). * Return DIAMETER_LOOP_DETECTED if local peer in the Route-Record list of a message. * Allow running without TLS configuration. * Upgraded SCTP code to comply with RFC 6458 * Using default secure Diameter port number 5658 as per RFC 6733 * Updated TLS code for performance improvements with new GNU TLS. * Fix interlocking problem when large number of requests were failed over. * New option in test_app.fdx extension for long messages payload. * Performance improvement in message sending code path. -- Sebastien Decugis Sat, 14 Sep 2013 18:08:07 +0800 freediameter (1.1.6) UNRELEASED; urgency=low * Fix major issue in 1.1.5 preventing to send answers to a received message. * New command-line option: --enable_msg_log=( DROPPED | RECEIVED | SENT | NODELIVER | TIMING ) * Improved parsing error handling and Failed-AVP generation. * Added support for some timings measurements in freeDiameter (in the logs) * Fix port handling when using non-default port. * Some cleanups in several dictionary files. * New option to fd_dict_search: AVP_BY_STRUCT * Improved compatibility with C++ compilers. * Cleanups in sessions creation/destruction to avoid memory corruption under stress. * Add support for "include" directive in freeDiameter.conf file. -- Sebastien Decugis Sun, 03 Mar 2013 07:40:43 +0100 freediameter (1.1.5) UNRELEASED; urgency=low * Added compatibility with MAC OS X * Fix behavior of timeout whe nsending messages to allow re-send. * Several cleanups and new contributions included. * Added dependency on C++ compiler for CMakeLists.txt -- Sebastien Decugis Sat, 03 Nov 2012 17:58:11 +0100 freediameter (1.1.4) UNRELEASED; urgency=low * Compatibility with GnuTLS 3.x versions / updated packaging files accordingly * Fix crash on Sparc 64 (possibly other 64b machines) * Updated dict_dcca in extensions and contrib (thanks Konstantin) * Changed dumping of messages to avoid interleaved information -- Sebastien Decugis Fri, 24 Aug 2012 00:17:05 +0200 freediameter (1.1.3) UNRELEASED; urgency=low * Fixed a memory leak * Clean-up of some extensions -- Sebastien Decugis Tue, 03 Jul 2012 08:15:49 +0200 freediameter (1.1.2) UNRELEASED; urgency=low * FIFO queues are now capped to avoid memory exhaustion. * Cleanups in MIPv6 dictionaries. * app_acct upgraded: enabled vendor-specific AVP logging, thread-safe version. * New function: fd_dict_getlistof to list dictionary contents. * New function: fd_dict_delete to remove an entry (dangerous function!) * New function: fd_sess_getcount to get count of session objects. * A few additional bug fixes, check hg log for details. -- Sebastien Decugis Tue, 21 Feb 2012 18:38:10 +0100 freediameter (1.1.1) UNRELEASED; urgency=low * Bug fix release * Supports newer GNUTLS versions * Allow empty OctetString AVPs (l=0) * Allow two instances of freeDiameter on a single host. -- Sebastien Decugis Fri, 30 Sep 2011 21:56:50 +0200 freediameter (1.1.0) UNRELEASED; urgency=low * Source package restructured. Most of the framework now contained in the libfdcore library. libfreeDiameter renamed as libfdproto. This closes #15. * API version bumped to version 4. * Improved fd_dict_new() when the same object already exists. * Improvements to dict_legacy_xml extension. * Cleanups in links to shared libraries * (app_radgw.fdx) Better handling conversion of DEA with error status to RADIUS (closes #25) * Allow default signals such as SIGTSTP (ctrl-z) to be used with freeDiameterd * Improved DiameterIdentity handling (esp. interationalization issues), and improve efficiency of some string operations in peers, sessions, and dictionary modules (closes #7) * Cleanup in the session module to free only unreferenced sessions (#16) * Removed fd_cpu_flush_cache(), replaced by more robust alternatives. * Improved peer state machine algorithm to counter SCTP multistream race condition. * New extension rt_redirect.fdx that handles the Diameter Redirect errors. * New extension app_redirect that allows sending Redirect indications to other peers. See doc/app_redirect.conf.sample for more information. * Added incomplete dictionary extension for rfc4006 (DCCA), courtesy of Konstantin Chekushin -- Sebastien Decugis Tue, 29 Mar 2011 10:41:19 +0900 freediameter (1.0.4) UNRELEASED; urgency=low * Added new API to specify timeout on receiving answer (#10) * Bumped API version number accordingly. * New test_netemul extension (simple network emulator proxy) * Improved API compatibility to C++ compilers -- Sebastien Decugis Tue, 11 Jan 2011 12:28:22 +0900 freediameter (1.0.3) UNRELEASED; urgency=low * Fixed a couple of issues for portability (#21, #22, #23) * Fixed issue with ListenOn bit ordering (#20) * Added dictionary support for MIPv6 application objects. * Added dictionary support for legacy XML files. * Added python interface dbg_interactive (experimental). * Added parameters to fd_disp_register() and fd_sess_handler_create(), Bumped API version number accordingly. -- Sebastien Decugis Tue, 14 Dec 2010 11:39:29 +0900 freediameter (1.0.2) UNRELEASED; urgency=low * Fix an issue in app_diameap.fdx with user names (#18) * Allow DH parameters loaded from a file (#17) * Fixed a few compilation warnings on 64bits architectures. * New ALL_EXTENSIONS build option. -- Sebastien Decugis Wed, 27 Oct 2010 11:17:32 +0900 freediameter (1.0.1) UNRELEASED; urgency=low * app_acct.fdx: new set of PHP scripts available in source contrib/app_acct_tools * app_acct.fdx: new directive 'Server_name_field' in the configuration. * app_radgw.fdx: new directive 'nonai' in acct and auth plugins to disable NAI processing. * app_radgw.fdx: New support for RADIUS proxies. * app_radgw.fdx: many bug fixes. * daemon: Check the local certificate is valid during TLS initialization. * daemon: Fixed issue for IP addresses in the form x.x.x.235 * daemon: new option --dbg_gnutls to get GNUTLS debug messages. * debian: some cleanups in the packaging (dependencies, meta-data) * rt_ereg.fdx: New routing extension based on regular expression matching in package freediameter-daemon. -- Sebastien Decugis Wed, 15 Sep 2010 18:30:28 +0900 freediameter (1.0.0-2) experimental; urgency=low * Official release 1.0.0 -- Sebastien Decugis Thu, 29 Jul 2010 17:27:13 +0900 freediameter (1.0.0-1) experimental; urgency=low * Initial Release. -- Sebastien Decugis Wed, 19 May 2010 15:36:54 +0900 nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/compat000066400000000000000000000000021333553357400231330ustar00rootroot000000000000007 nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/control000066400000000000000000000231171333553357400233440ustar00rootroot00000000000000Source: freediameter Section: contrib/net Priority: extra Maintainer: Sebastien Decugis Build-Depends: debhelper ( >= 7.3.9), cmake, make, gcc, g++, bison, flex, libsctp-dev, libgnutls-dev | gnutls-dev, libidn11-dev, libpq-dev, libmysqlclient-dev, libxml2-dev, swig, python-dev, libgcrypt11-dev | libgcrypt20-dev Standards-Version: 3.8.3 Homepage: http://www.freediameter.net Package: freediameter-common Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: The freeDiameter libraries. This package contains the freeDiameter framework core libraries, required by all freeDiameter components. It may also be useful for other projects which need to perform operations on Diameter messages. . The freeDiameter framework provides support for the Diameter Base Protocol. Without any extension, the framework can only be used as a Diameter routing agent. You probably want to install some freeDiameter extension(s) to extend its features, and also the freediameter-daemon package that will initialize the framework for you. . See 'freeDiameter-dev' package to retrieve the API for the library. Package: freediameter-dev Architecture: any Section: contrib/devel Depends: freediameter-common (= ${binary:Version}), libsctp-dev, libgnutls-dev, libgcrypt-dev Description: This package provides the development files for freeDiameter. Package: freediameter-daemon Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, freediameter-common (= ${binary:Version}) Suggests: ssl-cert, freediameter-dictionary-rfc4005, freediameter-dictionary-rfc4072, freediameter-dictionary-rfc4740, freediameter-dictionary-mip6, freediameter-dictionary-legacy Description: The freeDiameter daemon. This daemon is a simple loader for the freeDiameter framework. It is shipped with a small set of extensions, for example to configure the routing behavior. See the examples in /usr/share/freediameter* for more details. Package: freediameter-debug-tools Architecture: any Section: contrib/debug Depends: ${misc:Depends}, freediameter-common (= ${binary:Version}) Suggests: python, libmysqlclient16 | libmysqlclient18 Description: freeDiameter debug tools. This package provides useful tools to help tracking problems in freeDiameter installation. For example, the dbg_interactive.fdx extension allows access to the framework via a python interpreter console. Package: freediameter-dictionary-rfc4005 Architecture: any Depends: ${misc:Depends}, freediameter-common (= ${binary:Version}) Description: RFC4005 (NASREQ) dictionary support. This freeDiameter extension provides the dictionary support for commands and AVP defined in RFC4005 (NASREQ). . In order to use this extension, your main freeDiameter configuration file must contain a LoadExtension directive. See freeDiameter documentation for more details. . This extension does not require a configuration file. Package: freediameter-dictionary-rfc4006 Architecture: any Depends: ${misc:Depends}, freediameter-common (= ${binary:Version}) Description: RFC4006 (DCCA) dictionary support (incomplete). This freeDiameter extension provides the dictionary support for commands and AVP defined in RFC4006 (DCCA). . In order to use this extension, your main freeDiameter configuration file must contain a LoadExtension directive. See freeDiameter documentation for more details. . This extension does not require a configuration file. . Currently this extension is not complete: only AVP definitions are included. See the source file for more details. Package: freediameter-dictionary-rfc4072 Architecture: any Depends: ${misc:Depends}, freediameter-common (= ${binary:Version}), freediameter-dictionary-rfc4005 (= ${binary:Version}) Description: RFC4072 (Diameter EAP) dictionary support. This freeDiameter extension provides the dictionary support for commands and AVP defined in RFC4072 (Diameter EAP). . In order to use this extension, your main freeDiameter configuration file must contain a LoadExtension directive. See freeDiameter documentation for more details. . This extension does not require a configuration file. Package: freediameter-dictionary-rfc4740 Architecture: any Depends: ${misc:Depends}, freediameter-common (= ${binary:Version}) Description: RFC4740 (Diameter SIP) dictionary support. This freeDiameter extension provides the dictionary support for commands and AVP defined in RFC4740 (Diameter SIP). . In order to use this extension, your main freeDiameter configuration file must contain a LoadExtension directive. See freeDiameter documentation for more details. . This extension does not require a configuration file. Package: freediameter-dictionary-mip6 Architecture: any Depends: ${misc:Depends}, freediameter-common (= ${binary:Version}) Description: Diameter Mobile IPv6 application dictionary support. This package contains a set of extensions to provide the support for commands and AVP defined in several RFCs related to Diameter MIPv6. It is split is several extensions: mip6a, mip6i, nas-mipv6, rfc5777. . In order to use these extensions, your main freeDiameter configuration file must contain LoadExtension directives. See freeDiameter documentation for more details. . These extensions do not require a configuration file. Package: freediameter-dictionary-legacy Architecture: any Depends: ${misc:Depends}, freediameter-common (= ${binary:Version}), libxml2 Description: Legacy XML dictionary files support. This freeDiameter extension allows the use of XML dictionary files with the freeDiameter framework. Please note that dictionaries provided as XML files come with less features than native binary format, so the later should be preferred when possible. . In order to use this extension, your main freeDiameter configuration file must contain a LoadExtension directive. See freeDiameter documentation for more details. . This extension requires a configuration file. See dict_legacy_xml.conf.sample for documentation. Package: freediameter-radius-gateway Architecture: any Depends: ${misc:Depends}, freediameter-daemon (= ${binary:Version}) Suggests: freediameter-dictionary-rfc4072 (= ${binary:Version}), freediameter-dictionary-rfc4740 (= ${binary:Version}) Description: RADIUS/Diameter extensible gateway. This freeDiameter extension implements a RADIUS to Diameter gateway. It allows a RADIUS client to connect to a Diameter server. . The support for specific Diameter applications and/or RADIUS extensions is provided in the gateway by the use of plugins. Currently, the following plugins are available: - echodrop.rgwx : drop or echo a RADIUS attribute. The attribute is not converted to Diameter. See echodrop.rgwx.conf.sample for details. - auth.rgwx : Convert Access-Request to Diameter AAR or DER. Requests For Comments: RADIUS: 2865, 3162, 2868, 2869, 3579; Diameter: 4005, 4072. Requires freediameter-dictionary-rfc4072. - sip.rgwx : Convert Access-Request to Diameter SIP messages. Requests For Comments: Diameter: 4740. Requires freediameter-dictionary-rfc4740. - acct.rgwx : Converts Accounting-Request (2866) to Diameter ACR (3588). Requires freediameter-dictionary-rfc4072. . In order to use this extension, your main freeDiameter configuration file must contain a LoadExtension directive. See freeDiameter documentation for more details. . This extension requires a configuration file. See app_radgw.conf.sample for more details. Package: freediameter-accounting-server Architecture: any Depends: ${misc:Depends}, freediameter-daemon (= ${binary:Version}), libpq5 Suggests: freediameter-dictionary-rfc4072 Description: freeDiameter simple Accounting server. This freeDiameter extension implements the Diameter Base Accounting application. It saves the accounting records in a PostgreSQL database backend in a highly configurable maneer. . In order to use this extension, your main freeDiameter configuration file must contain a LoadExtension directive. See freeDiameter documentation for more details. . This extension requires a configuration file. See app_acct.conf.sample for more details. . You may find some useful resources to parse the saved records in the contrib/app_acct_tools folder in source package. Package: freediameter-eap-server Architecture: any Depends: ${misc:Depends}, freediameter-daemon (= ${binary:Version}), libmysqlclient16 | libmysqlclient18, freediameter-dictionary-rfc4072 (= ${binary:Version}) Description: freeDiameter Diameter EAP server implementation. This freeDiameter extension implements a Diameter EAP server. It supports EAP-MD5 and EAP-TLS methods currently. . In order to use this extension, your main freeDiameter configuration file must contain a LoadExtension directive. See freeDiameter documentation for more details. . This extension requires a configuration file. See app_diameap.conf.sample and http://diameap.yagami.freediameter.net for more details. Package: freediameter-sip-server Architecture: any Depends: ${misc:Depends}, freediameter-daemon (= ${binary:Version}), libmysqlclient16 | libmysqlclient18, freediameter-dictionary-rfc4740 (= ${binary:Version}) Description: freeDiameter Diameter SIP server implementation. This freeDiameter extension implements a prototype Diameter SIP server. See http://www.freediameter.net/trac/wiki/app_sip.fdx for status information. . In order to use this extension, your main freeDiameter configuration file must contain a LoadExtension directive. See freeDiameter documentation for more details. . This extension requires a configuration file. See app_sip.conf.sample for more details. nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/copyright000066400000000000000000000033341333553357400236730ustar00rootroot00000000000000Format-Specification: http://dep.debian.net/deps/dep5/ Name: freeDiameter Maintainer: Sebastien Decugis Source: http://www.freediameter.net Files: * Copyright: 2008-2011, WIDE Project and NICT. License: BSD Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . * 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. . * Neither the name of the WIDE Project or NICT nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission of WIDE Project and NICT. . 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. nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/dirs000066400000000000000000000000221333553357400226130ustar00rootroot00000000000000etc/freeDiameter/ nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/docs000066400000000000000000000000301333553357400226010ustar00rootroot00000000000000INSTALL* LICENSE README nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/freediameter-accounting-server.examples000066400000000000000000000000311333553357400315570ustar00rootroot00000000000000doc/app_acct.conf.sample nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/freediameter-accounting-server.install000066400000000000000000000000421333553357400314110ustar00rootroot00000000000000usr/lib/freeDiameter/app_acct.fdx nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/freediameter-common.examples000066400000000000000000000001671333553357400274230ustar00rootroot00000000000000doc/freediameter.conf.sample doc/acl_wl.conf.sample doc/rt_default.conf.sample doc/rt_ereg.conf.sample doc/single_host nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/freediameter-common.install000066400000000000000000000002671333553357400272540ustar00rootroot00000000000000usr/lib/libfdproto.so* usr/lib/libfdcore.so* usr/lib/freeDiameter/acl_wl.fdx usr/lib/freeDiameter/rt_default.fdx usr/lib/freeDiameter/rt_ereg.fdx usr/lib/freeDiameter/dbg_monitor.fdx nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/freediameter-daemon.default000066400000000000000000000004061333553357400272000ustar00rootroot00000000000000# Defaults for freediameter initscript # sourced by /etc/init.d/freediameter # installed at /etc/default/freediameter by the maintainer scripts # Additional options that are passed to the Daemon. # See "freeDiameterd --help" for supported flags. DAEMON_OPTS="" nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/freediameter-daemon.init000066400000000000000000000106601333553357400265220ustar00rootroot00000000000000#! /bin/sh ### BEGIN INIT INFO # Provides: freediameter # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Short-Description: Start freeDiameter daemon at boot time # Description: Start the freeDiameter daemon at boot time. # freeDiameter is an extensible implementation of the Diameter protocol, # designed for Authentication, Authorization and Accounting. Diameter is # an evolution of the RADIUS protocol. ### END INIT INFO# DAEMON=/usr/bin/freeDiameterd CONF=/etc/freeDiameter/freeDiameter.conf NAME=freediameter DESC="freeDiameter daemon" test -x $DAEMON || exit 0 LOGDIR=/var/log/freediameter PIDFILE=/var/run/$NAME.pid DODTIME=30 # Time to wait for the server to die, in seconds # The value is high because we wait for STA answers # before disconnecting the peers. # Include freediameter defaults if available if [ -f /etc/default/freediameter ] ; then . /etc/default/freediameter fi test x"" != x$DAEMON_OPTS || test -f $CONF || exit 0 set -e running_pid() { # Check if a given process pid's cmdline matches a given name pid=$1 name=$2 [ -z "$pid" ] && return 1 [ ! -d /proc/$pid ] && return 1 cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1` # Is this the expected child? [ "$cmd" != "$name" ] && return 1 return 0 } running() { # Check if the process is running looking at /proc # (works for all users) # No pidfile, probably no daemon present [ ! -f "$PIDFILE" ] && return 1 # Obtain the pid and check it against the binary name pid=`cat $PIDFILE` running_pid $pid $DAEMON || return 1 return 0 } force_stop() { # Forcefully kill the process [ ! -f "$PIDFILE" ] && return if running ; then kill -15 $pid # Is it really dead? [ -n "$DODTIME" ] && sleep "$DODTIME"s if running ; then kill -9 $pid [ -n "$DODTIME" ] && sleep "$DODTIME"s if running ; then echo "Cannot kill $LABEL (pid=$pid)!" exit 1 fi fi fi rm -f $PIDFILE return 0 } case "$1" in start) echo -n "Starting $DESC: " start-stop-daemon --start --quiet --pidfile $PIDFILE \ --exec $DAEMON -- $DAEMON_OPTS if running ; then echo "$NAME." else echo " ERROR." fi ;; stop) echo -n "Stopping $DESC: " start-stop-daemon --stop --quiet --pidfile $PIDFILE \ --exec $DAEMON echo "$NAME." ;; force-stop) echo -n "Forcefully stopping $DESC: " force_stop if ! running ; then echo "$NAME." else echo " ERROR." fi ;; #reload) # # If the daemon can reload its config files on the fly # for example by sending it SIGHUP, do it here. # # If the daemon responds to changes in its config file # directly anyway, make this a do-nothing entry. # # echo "Reloading $DESC configuration files." # start-stop-daemon --stop --signal 1 --quiet --pidfile \ # /var/run/$NAME.pid --exec $DAEMON #;; force-reload) # # If the "reload" option is implemented, move the "force-reload" # option to the "reload" entry above. If not, "force-reload" is # just the same as "restart" except that it does nothing if the # daemon isn't already running. # check wether $DAEMON is running. If so, restart start-stop-daemon --stop --test --quiet --pidfile \ /var/run/$NAME.pid --exec $DAEMON \ && $0 restart \ || exit 0 ;; restart) echo -n "Restarting $DESC: " start-stop-daemon --stop --quiet --pidfile \ /var/run/$NAME.pid --exec $DAEMON [ -n "$DODTIME" ] && sleep $DODTIME start-stop-daemon --start --quiet --pidfile \ /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS echo "$NAME." ;; status) echo -n "$LABEL is " if running ; then echo "running" else echo " not running." exit 1 fi ;; *) N=/etc/init.d/$NAME # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2 exit 1 ;; esac exit 0 nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/freediameter-daemon.install000066400000000000000000000000271333553357400272210ustar00rootroot00000000000000usr/bin/freeDiameterd* nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/freediameter-debug-tools.examples000066400000000000000000000001241333553357400303500ustar00rootroot00000000000000doc/test_app.conf.sample doc/test_netemul.conf.sample doc/dbg_interactive.py.sample nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/freediameter-debug-tools.install000066400000000000000000000002631333553357400302040ustar00rootroot00000000000000usr/lib/freeDiameter/dbg_rt.fdx usr/lib/freeDiameter/test_app.fdx usr/lib/freeDiameter/test_sip.fdx usr/lib/freeDiameter/test_netemul.fdx usr/lib/freeDiameter/dbg_interactive.fdx nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/freediameter-dev.install000066400000000000000000000000331333553357400265310ustar00rootroot00000000000000usr/include/freeDiameter/* nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/freediameter-dictionary-legacy.examples000066400000000000000000000001031333553357400315300ustar00rootroot00000000000000doc/dict_legacy_xml.conf.sample contrib/dict_legacy/dictionary.dtd nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/freediameter-dictionary-legacy.install000066400000000000000000000000511333553357400313620ustar00rootroot00000000000000usr/lib/freeDiameter/dict_legacy_xml.fdx nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/freediameter-dictionary-mip6.install000066400000000000000000000002261333553357400307750ustar00rootroot00000000000000usr/lib/freeDiameter/dict_nas_mipv6.fdx usr/lib/freeDiameter/dict_mip6i.fdx usr/lib/freeDiameter/dict_mip6a.fdx usr/lib/freeDiameter/dict_rfc5777.fdx nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/freediameter-dictionary-rfc4005.install000066400000000000000000000000451333553357400312040ustar00rootroot00000000000000usr/lib/freeDiameter/dict_nasreq.fdx nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/freediameter-dictionary-rfc4006.install000066400000000000000000000000431333553357400312030ustar00rootroot00000000000000usr/lib/freeDiameter/dict_dcca.fdx nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/freediameter-dictionary-rfc4072.install000066400000000000000000000000421333553357400312050ustar00rootroot00000000000000usr/lib/freeDiameter/dict_eap.fdx nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/freediameter-dictionary-rfc4740.install000066400000000000000000000000421333553357400312070ustar00rootroot00000000000000usr/lib/freeDiameter/dict_sip.fdx nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/freediameter-eap-server.examples000066400000000000000000000001031333553357400301720ustar00rootroot00000000000000doc/app_diameap.conf.sample doc/eap_tls_plugin.diameap.conf.sample nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/freediameter-eap-server.install000066400000000000000000000001001333553357400300170ustar00rootroot00000000000000usr/lib/freeDiameter/app_diameap.fdx usr/lib/freeDiameter/*.emp nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/freediameter-radius-gateway.examples000066400000000000000000000000701333553357400310520ustar00rootroot00000000000000doc/app_radgw.conf.sample doc/echodrop.rgwx.conf.sample nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/freediameter-radius-gateway.install000066400000000000000000000000771333553357400307110ustar00rootroot00000000000000usr/lib/freeDiameter/app_radgw.fdx usr/lib/freeDiameter/*.rgwx nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/freediameter-sip-server.examples000066400000000000000000000001241333553357400302230ustar00rootroot00000000000000doc/app_sip.conf.sample doc/app_sip.sql doc/app_sip_SL.sql doc/test_sip.conf.sample nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/freediameter-sip-server.install000066400000000000000000000001441333553357400300550ustar00rootroot00000000000000usr/lib/freeDiameter/app_sip.fdx usr/share/doc/freeDiameter-sip-server/* usr/bin/freediameter-sip-* nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/rules000077500000000000000000000017141333553357400230200ustar00rootroot00000000000000#!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # # Modified to make a template file for a multi-binary package with separated # build-arch and build-indep targets by Bill Allombert 2001 # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This has to be exported to make some magic below work. export DH_OPTIONS # Comment this out if you want to include the tests when the package is built skip_the_tests=-DBUILD_TESTING:BOOL=OFF %: dh $@ override_dh_auto_configure: dh_auto_configure -- $(skip_the_tests) \ -DCMAKE_BUILD_TYPE:STRING=DebianPackage \ -DDEFAULT_CONF_PATH:PATH=/etc/freeDiameter \ -DALL_EXTENSIONS:BOOL=ON nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/debian/update_changelog.txt000066400000000000000000000001551333553357400257700ustar00rootroot00000000000000new release: dch -v 1.0.3 -D UNRELEASED --release-heuristic log Simple addition: dch "changelog entry text" nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/dict_dcca/000077500000000000000000000000001333553357400224105ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/dict_dcca/README000066400000000000000000000002671333553357400232750ustar00rootroot00000000000000Files provided courtesy of Konstantin Chekushin under the same license as freeDiameter. Comment: "They are not full, I've filled only that I wanted to use in our app_dcca module. " nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/dict_dcca/dict_dcca_3gpp.c000066400000000000000000001231421333553357400254050ustar00rootroot00000000000000/* * Dictionary definitions of objects specified in DCCA (Nokia, 3GPP). */ #include /* The content of this file follows the same structure as dict_base_proto.c */ #define CHECK_dict_new( _type, _data, _parent, _ref ) \ CHECK_FCT( fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref)) ); #define CHECK_dict_search( _type, _criteria, _what, _result ) \ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); struct local_rules_definition { char *avp_name; enum rule_position position; int min; int max; }; #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) #define PARSE_loc_rules( _rulearray, _parent) { \ int __ar; \ for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ struct dict_rule_data __data = { NULL, \ (_rulearray)[__ar].position, \ 0, \ (_rulearray)[__ar].min, \ (_rulearray)[__ar].max}; \ __data.rule_order = RULE_ORDER(__data.rule_position); \ CHECK_FCT( fd_dict_search( \ fd_g_config->cnf_dict, \ DICT_AVP, \ AVP_BY_NAME, \ (_rulearray)[__ar].avp_name, \ &__data.rule_avp, 0 ) ); \ if ( !__data.rule_avp ) { \ TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_name ); \ return ENOENT; \ } \ CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL), \ { \ TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \ (_rulearray)[__ar].avp_name ); \ return EINVAL; \ } ); \ } \ } #define enumval_def_u32( _val_, _str_ ) \ { _str_, { .u32 = _val_ }} #define enumval_def_os( _len_, _val_, _str_ ) \ { _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}} static int dict_dcca_3gpp_entry(char * conffile) { TRACE_ENTRY("%p", conffile); /* Applications section */ { /* Create the vendors */ { struct dict_vendor_data vendor_data = { 10415, "3GPP" }; CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data, NULL, NULL)); } } /* AVP section */ { struct dict_object * Address_type; struct dict_object * UTF8String_type; struct dict_object * DiameterIdentity_type; struct dict_object * DiameterURI_type; struct dict_object * Time_type; CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Address", &Address_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterIdentity", &DiameterIdentity_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterURI", &DiameterURI_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Time", &Time_type); /* Reporting-Reason */ { /* Enumerated. Will be present if quota was exhausted for one or more metering types. Only one Reporting-Reason AVP can be present in the Used-Service-Unit AVP. (Note that the Reporting- Reason AVP may be present also at the MSCC level; see below.) The following values are supported: QUOTA_EXHAUSTED(3); Quota for the associated metering type has been exhausted. With this reporting reason there is only one metering type in this Used-Service- Unit AVP. OTHER_QUOTA_TYPE(5); Quota for one or more of the other metering types has been exhausted. With this reporting reason there may be multiple metering types in Used- Service-Unit AVP. POOL_EXHAUSTED(8); Quota from the credit pool has been exhausted. This reporting reason is used if the quota for the associated metering type was granted from a credit pool by using the GSU-Pool-Reference AVP in the CCA. With this reporting reason there is only one metering type in the Used-Service-Unit AVP. */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Reporting-Reason)" , NULL, NULL, NULL }; struct dict_enumval_data t_1 = { "QHT", { .i32 = 1 }}; struct dict_enumval_data t_2 = { "FINAL", { .i32 = 2 }}; struct dict_enumval_data t_3 = { "QUOTA_EXHAUSTED", { .i32 = 3 }}; struct dict_enumval_data t_4 = { "VALIDITY_TIME", { .i32 = 4 }}; struct dict_enumval_data t_5 = { "OTHER_QUOTA_TYPE", { .i32 = 5 }}; struct dict_enumval_data t_6 = { "RATING_CONDITION_CHANGE", { .i32 = 6 }}; struct dict_enumval_data t_7 = { "FORCED_REAUTHORIZATION", { .i32 = 7 }}; struct dict_enumval_data t_8 = { "POOL_EXHAUSTED", { .i32 = 8 }}; struct dict_avp_data data = { 872, /* Code */ 10415, /* Vendor */ "Reporting-Reason", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_5 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_8 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Trigger */ { /* Grouped. The presence of the Trigger AVP in the CCR identifies the event(s) triggering the CCR. */ struct dict_avp_data data = { 1264, /* Code */ 10415, /* Vendor */ "Trigger", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Trigger-Type */ { /* Enumerated. One or more of these AVPs may be present. Indicates the event that triggered the MSCC. Supported values are: CHANGE_IN_SGSN_IP_ADDRESS (1), a change in the SGSN address. CHANGEINQOS_ANY (2), a change in the QoS profile CHANGEINRAT (4), a change in radio access technology */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Trigger-Type)" , NULL, NULL, NULL }; struct dict_enumval_data t_1 = { "CHANGE_IN_SGSN_IP_ADDRESS", { .i32 = 1 }}; struct dict_enumval_data t_2 = { "CHANGEINQOS_ANY", { .i32 = 2 }}; struct dict_enumval_data t_4 = { "CHANGEINRAT", { .i32 = 4 }}; struct dict_avp_data data = { 870, /* Code */ 10415, /* Vendor */ "Trigger-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_4 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Service-Information */ { /* Grouped. The Service-Information purpose is to allow the transmission of additional 3GPP service specific information elements (3GPP 32.299 Rel7). */ struct dict_avp_data data = { 873, /* Code */ 10415, /* Vendor */ "Service-Information", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* PS-Information */ { /* Grouped. Its purpose is to allow the transmission of additional PS service specific information elements (3GPP 32.299 Rel7). */ struct dict_avp_data data = { 874, /* Code */ 10415, /* Vendor */ "PS-Information", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* PDP-Address */ { /* Address. Present only in the initial CCR. Contains the user equipment IP address. This AVP is defined in 3GPP 32.299 Rel7. */ struct dict_avp_data data = { 1227, /* Code */ 10415, /* Vendor */ "PDP-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); } /* 3GPP-IMSI */ { /* IMSI encoded in UTF-8 per 3GPP TS 23.003. No padding. Maximum length of data: 15. */ struct dict_avp_data data = { 1, /* Code */ 10415, /* Vendor */ "3GPP-IMSI", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* 3GPP-Charging-Id */ { /* Unsigned32. (3GPP TS 29.061 Rel7) . The charging identifier for the PDP context. The Flexi ISN generates the 3GPP charging ID for both virtual and normal PDP contexts with one excep- tion. If the Flexi ISN acts as a NAS server and the charging ID selection is set to NAS Client, the charging ID will be the NAand not the 3GPP charging ID of Flexi ISN. Present in the initial CCR only.S client */ struct dict_avp_data data = { 2, /* Code */ 10415, /* Vendor */ "3GPP-Charging-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* 3GPP-PDP-Type */ { /* Enumerated. (3GPP TS 29.061 Rel7 ). Type of PDP context, for example, IP or PPP. Present in the initial CCR only. 0 = IPv4 1 = PPP 2 = IPv6 3 = IPv4v6 */ struct dict_avp_data data = { 3, /* Code */ 10415, /* Vendor */ "3GPP-PDP-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* 3GPP-CG-Address */ { /* OctetString. (3GPP TS 29.061 Rel4). The address of the charging gateway that has been marked as the default charging gateway for the PDP context. The address is expressed as a four-byte integer. Present in the initial CCR only. */ struct dict_avp_data data = { 4, /* Code */ 10415, /* Vendor */ "3GPP-CG-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); } /* 3GPP-GPRS-Negotiated-QoS-Profile */ { /* UTF8String. (3GPP TS 29.061 Rel7 ). The QoS profile applied by the Flexi ISN. In update and ter- mination requests, this AVP is present only when the CCR has been triggered by a PDP context update affecting the negotiated QoS Each octet is described by two UTF-8-encoded characters denoting the hexadecimal representation. */ struct dict_avp_data data = { 5, /* Code */ 10415, /* Vendor */ "3GPP-GPRS-Negotiated-QoS-Profile", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* 3GPP-SGSN-Address */ { /* OctetString. (3GPP TS 29.061 Rel4). The address of the charging gateway that has been marked as the default charging gateway for the PDP context. The address is expressed as a four-byte integer. Present in the initial CCR only. */ struct dict_avp_data data = { 6, /* Code */ 10415, /* Vendor */ "3GPP-SGSN-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); } /* 3GPP-GGSN-Address */ { /* OctetString. (3GPP TS 29.061 Rel4). Usually the IP address of Flexi ISN. The only exception is when the Flexi ISN acts as a NAS server and the charging ID selection is set to NAS Client; then the GGSN IP address will be the NAIP address. Present in the initial CCR only.S client */ struct dict_avp_data data = { 7, /* Code */ 10415, /* Vendor */ "3GPP-GGSN-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); } /* 3GPP-IMSI-MCC-MNC */ { /* UTF8String. MCC and MNC extracted from the user's IMSI (first 5 or 6 digits, as applicable from the presented IMSI). The MCC-MNCs are extracted from the tables configured in FlexiISN configuration under the General and Roaming configurations. */ struct dict_avp_data data = { 8, /* Code */ 10415, /* Vendor */ "3GPP-IMSI-MCC-MNC", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* 3GPP-GGSN-MCC-MNC */ { /* UTF8String. (3GPP TS 29.061 Rel7 ). Contains the mobile country and network code of the PLMN that the Flexi ISN belongs to. Present in the initial CCR only. The first entry in the list of local PLMNs in the Flexi ISN configuration determines the value of this AVP. */ struct dict_avp_data data = { 9, /* Code */ 10415, /* Vendor */ "3GPP-GGSN-MCC-MNC", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* 3GPP-NSAPI */ { /* UTF8String. (3GPP TS 29.061 Rel7 ). Indicates the NSAPI of the PDP context. Contains one octet consisting of a single digit. Present in the initial CCR only. */ struct dict_avp_data data = { 10, /* Code */ 10415, /* Vendor */ "3GPP-NSAPI", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* 3GPP-Session-Stop-Indicator */ { /* OctetString. (3GPP TS 29.061 Rel4). The presence of this AVP indicates that the last context of the PDP session has been deleted. May be present in the termination CCR only. Contains one octet that has a value of 0xff. */ struct dict_avp_data data = { 11, /* Code */ 10415, /* Vendor */ "3GPP-Session-Stop-Indicator", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* 3GPP-Selection-Mode */ { /* UTF8String. (3GPP TS 29.061 Rel7 ). Consists of one octet containing the selection mode as received from SGSN in the Create PDP Context Request. Present in the initial CCR only. */ struct dict_avp_data data = { 12, /* Code */ 10415, /* Vendor */ "3GPP-Selection-Mode", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* 3GPP-Charging-Characteristics */ { /* UTF8String. (3GPP TS 29.061 Rel7 ). The charging characteristics for the PDP context. Present in the initial CCR only. Consists of four octets. Each octet contains a single UTF-8 encoded digit. The content of the charging charac- teristics is described in 3GPP TS 32.215. */ struct dict_avp_data data = { 13, /* Code */ 10415, /* Vendor */ "3GPP-Charging-Characteristics", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* 3GPP-CG-IPv6-Address */ { /* UTF8String.. (3GPP TS 29.061 Rel? (<=10) ). The IPv6 address of the charging gateway. */ struct dict_avp_data data = { 14, /* Code */ 10415, /* Vendor */ "3GPP-CG-IPv6-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* 3GPP-SGSN-IPv6-Address */ { /* UTF8String.. (3GPP TS 29.061 Rel? (<=10) ). The IPv6 address of the SGSN. */ struct dict_avp_data data = { 15, /* Code */ 10415, /* Vendor */ "3GPP-SGSN-IPv6-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* 3GPP-GGSN-IPv6-Address */ { /* UTF8String.. (3GPP TS 29.061 Rel? (<=10) ). The IPv6 address of the GGSN. */ struct dict_avp_data data = { 16, /* Code */ 10415, /* Vendor */ "3GPP-GGSN-IPv6-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* 3GPP-GGSN-IPv6-DNS-Servers */ { /* UTF8String.. (3GPP TS 29.061 Rel? (<=10) ). List of IPv6 addresses of DNS servers for an APN in order of preference (max. 15 servers, 16 bytes each). */ struct dict_avp_data data = { 17, /* Code */ 10415, /* Vendor */ "3GPP-GGSN-IPv6-DNS-Servers", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* 3GPP-SGSN-MCC-MNC */ { /* UTF8String. (3GPP TS 29.061 Rel7 ). MCC and MNC extracted from the RAI within Create or Update PDP Context Request. In update and ter- mination requests, this AVP is present only when the CCR has been triggered by a routing area update. */ struct dict_avp_data data = { 18, /* Code */ 10415, /* Vendor */ "3GPP-SGSN-MCC-MNC", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Missing: 3GPP-Teardown-Indicator (19) */ /* 3GPP-IMEISV */ { /* IMEI(SV) encoded as sequence of UTF8 characters. */ struct dict_avp_data data = { 20, /* Code */ 10415, /* Vendor */ "3GPP-IMEISV", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* 3GPP-RAT-Type */ { /* OctetString. (3GPP TS 29.061 Rel7 ) Defines the method used to access the network. Consists of a single octet. The following values may be sent: UTRAN (1), GERAN (2), WLAN (3), NAS (254), Unspecified (255). This AVP is included in the initial CCR and in update or termination CCRs if the value changes. */ struct dict_avp_data data = { 21, /* Code */ 10415, /* Vendor */ "3GPP-RAT-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* 3GPP-User-Location-Info */ { /* OctetString. (3GPP TS 29.061 Rel7 ) Contains information about the user's current geographical location as received from the SGSN. Present always in initial CCR if the value is known and in update and termination CCRs if the value changes. */ struct dict_avp_data data = { 22, /* Code */ 10415, /* Vendor */ "3GPP-User-Location-Info", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* 3GPP-MS-TimeZone */ { /* OctetString. (3GPP TS 29.061 Rel7 ) 3GPP-MS- TimeZone is AVP is present always in the initial CCR if the value is known and in the update and termination CCRs if the value changes. This IE is encoded according to 3GPP TS 29.061 Rel7 */ struct dict_avp_data data = { 23, /* Code */ 10415, /* Vendor */ "3GPP-MS-TimeZone", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Missing: 3GPP-CAMEL-Charging-Info (24) */ /* Missing: 3GPP-Packet-Filter (25) */ /* Missing: 3GPP-Negotiated-DSCP (26) */ /* Missing: 3GPP-Allocate-IP-Type (27) */ /* PDP-Context-Type */ { /* Enumerated. Indicates the type of a PDP context and is only included in CCR initial. values are 0 for primary and 1 for secondary (3GPP 32.299 Rel7) */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(PDP-Context-Type)" , NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "PRIMARY", { .i32 = 0 }}; struct dict_enumval_data t_1 = { "SECONDARY", { .i32 = 1 }}; struct dict_avp_data data = { 1247, /* Code */ 10415, /* Vendor */ "PDP-Context-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* IMS-Information */ { /* Grouped. Its purpose is to allow the transmission of additional IMS service specific information ele- ments. (3GPP 32.299 Rel7) */ struct dict_avp_data data = { 876, /* Code */ 10415, /* Vendor */ "IMS-Information", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* IMS-Charging-Identifier */ { /* UTF8String. Contains the IMS charging identifier as given to the Flexi ISN by the IMS. This AVP is defined in 3GPP TS 32.225. This AVP is present in IMS sessions only. Present in the initial CCR only. */ struct dict_avp_data data = { 841, /* Code */ 10415, /* Vendor */ "IMS-Charging-Identifier", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Max-Requested-Bandwidth-UL */ { /* Unsigned32. The Max-Requested-Bandwidth- UL/DL AVP indicates the maximum allowed bit rate (in bits per second) for the uplink direction. (Re-used from 3GPP 29.214) */ struct dict_avp_data data = { 515, /* Code */ 10415, /* Vendor */ "Max-Requested-Bandwidth-UL", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Max-Requested-Bandwidth-DL */ { /* Unsigned32. The Max-Requested-Bandwidth- UL/DL AVP indicates the maximum allowed bit rate (in bits per second) for the uplink direction. */ struct dict_avp_data data = { 516, /* Code */ 10415, /* Vendor */ "Max-Requested-Bandwidth-DL", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* QoS-Information */ { /* Grouped. This is the QoS that the DCCA server requests from Flexi ISN to be applied for this PDP context. This AVP and all AVPs con- tained within are described in 3GPP TS 29.212 Release 7. The ARP AVP is introduced with Release 8. The relevant types are defined on table 5.3.1 of TS 29.212. */ struct dict_avp_data data = { 1016, /* Code */ 10415, /* Vendor */ "QoS-Information", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } } TRACE_DEBUG(INFO, "Extension 'Dictionary definitions for DCCA 3GPP' initialized"); return 0; } EXTENSION_ENTRY("dict_dcca_3gpp", dict_dcca_3gpp_entry, "dict_dcca"); nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/dict_dcca/dict_dcca_nokia.c000066400000000000000000000327201333553357400256360ustar00rootroot00000000000000/* * Dictionary definitions of objects specified in DCCA (Nokia, 3GPP). */ #include /* The content of this file follows the same structure as dict_base_proto.c */ #define CHECK_dict_new( _type, _data, _parent, _ref ) \ CHECK_FCT( fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref)) ); #define CHECK_dict_search( _type, _criteria, _what, _result ) \ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); struct local_rules_definition { char *avp_name; enum rule_position position; int min; int max; }; #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) #define PARSE_loc_rules( _rulearray, _parent) { \ int __ar; \ for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ struct dict_rule_data __data = { NULL, \ (_rulearray)[__ar].position, \ 0, \ (_rulearray)[__ar].min, \ (_rulearray)[__ar].max}; \ __data.rule_order = RULE_ORDER(__data.rule_position); \ CHECK_FCT( fd_dict_search( \ fd_g_config->cnf_dict, \ DICT_AVP, \ AVP_BY_NAME, \ (_rulearray)[__ar].avp_name, \ &__data.rule_avp, 0 ) ); \ if ( !__data.rule_avp ) { \ TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_name ); \ return ENOENT; \ } \ CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL), \ { \ TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \ (_rulearray)[__ar].avp_name ); \ return EINVAL; \ } ); \ } \ } #define enumval_def_u32( _val_, _str_ ) \ { _str_, { .u32 = _val_ }} #define enumval_def_os( _len_, _val_, _str_ ) \ { _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}} static int dict_dcca_nokia_entry(char * conffile) { TRACE_ENTRY("%p", conffile); /* Applications section */ { /* Create the vendors */ { struct dict_vendor_data vendor_data = { 94, "Nokia" }; CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data, NULL, NULL)); } } /* AVP section */ { struct dict_object * Address_type; struct dict_object * UTF8String_type; struct dict_object * DiameterIdentity_type; struct dict_object * DiameterURI_type; struct dict_object * Time_type; CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Address", &Address_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterIdentity", &DiameterIdentity_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterURI", &DiameterURI_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Time", &Time_type); /* NSN-Token-Value */ { /* OctetString. A token that was received, for example, from the subscription portal [14]. The maximum length of the token is 64 octets. When this AVP is included in the MSCC, the USU and Reporting-Reason AVPs will not be included (because the token is not a trigger to report quota usage). Additionally, the Rating-Group and Service-Id AVPs will have the values received from the subscription portal. */ struct dict_avp_data data = { 5113, /* Code */ 94, /* Vendor */ "NSN-Token-Value", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Quota-Consumption-Time */ { /* Unsigned32. Contains the time quota envelope expiration time in seconds. This is the time elapsed from the previous service request, to the moment the Flexi ISN considers that the time envelope finishes. The value of this AVP will be in effect for the remainder of the session or until a new value is received. If this AVP is not present, the default value configured for the rating group will be used. The OCS may disable the time quota envelope expiration by setting the value of this AVP to 0. The value of QCT sent from the OCS for a certain MSCC instance is stored in the Flexi ISN and it is used if the OCS does not sent a new value in the CCAs that follow */ struct dict_avp_data data = { 5109, /* Code */ 94, /* Vendor */ "Quota-Consumption-Time", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Quota-Holding-Time */ { /* Unsigned32. Indicates how long the Flexi ISN will keep the granted quota after a service request has been received. The unit is in seconds. When this time elapses, the Flexi ISN ends the MSCC instance and reports the used quota without requesting more. The value of this AVP will be in effect for the remainder of the session or until a new value is received. If this AVP is not present, the default value con- figured for the rating group will be used. The OCS may disable the Quota Holding Timer by setting the value of this AVP to 0. The value of the QHT sent from the OCS for a certain MSCC instance is stored in the Flexi ISN, and it is used if the OCS does not sent a new value in the CCAs that follow. */ struct dict_avp_data data = { 5110, /* Code */ 94, /* Vendor */ "Quota-Holding-Time", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Default-Quota */ { /* Grouped. Indicates the absolute number of units that are available for consumption during each upcoming OCS interrogation (e.g. after a CCR has been sent but before the CCA is received). If this AVP is not present, the Flexi ISN will use the configured or earlier received default quota. If this AVP is present but does not include the default quota for a certain unit type, that unit type is considered to have no default quota. The usage of default quota can be disabled in certain situations by modifying the Flexi ISN settings */ struct dict_avp_data data = { 5111, /* Code */ 94, /* Vendor */ "Default-Quota", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Session-Start-Indicator */ { /* OctetString. (3GPP TS 29.061 Rel4). The address of the charging gateway that has been marked as the default charging gateway for the PDP context. The address is expressed as a four-byte integer. Present in the initial CCR only. */ struct dict_avp_data data = { 5105, /* Code */ 94, /* Vendor */ "Session-Start-Indicator", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Rulebase-id */ { /* */ struct dict_avp_data data = { 5106, /* Code */ 94, /* Vendor */ "Rulebase-id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Time-Of-First-Usage */ { /* Time. Contains a time-stamp identifying the date and time of the first increment of the used units counter since the previous report. If no used units were gathered during the previous reporting inter- val, this AVP will not be present. */ struct dict_avp_data data = { 5103, /* Code */ 94, /* Vendor */ "Time-Of-First-Usage", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Time_type, NULL); } /* Time-Of-Last-Usage */ { /* Time. Contains a time-stamp identifying the date and time of the first increment of the used units counter since the previous report. If no used units were gathered during the previous reporting inter- val, this AVP will not be present. */ struct dict_avp_data data = { 5104, /* Code */ 94, /* Vendor */ "Time-Of-Last-Usage", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Time_type, NULL); } } TRACE_DEBUG(INFO, "Extension 'Dictionary definitions for DCCA Nokia' initialized"); return 0; } EXTENSION_ENTRY("dict_dcca_nokia", dict_dcca_nokia_entry, "dict_dcca"); nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/dict_gx/000077500000000000000000000000001333553357400221345ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/dict_gx/README000066400000000000000000000001661333553357400230170ustar00rootroot00000000000000File sent to the mailing-list by German Barros . To be used with the dict_legacy_xml extension. nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/dict_gx/dict_gx.xml000066400000000000000000000557211333553357400243110ustar00rootroot00000000000000 nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/dict_legacy/000077500000000000000000000000001333553357400227625ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/dict_legacy/README000066400000000000000000000010051333553357400236360ustar00rootroot00000000000000The dictionary.dtd file originates from draft-frascone-xml-dictionary-00. A few modifications may have been performed (see file history in Mercurial) However, no DTD validation is performed by the parser, but the extension expects a known format therefore the flexibility is limited. Additional XML dictionary files can be found: - Circum project (circum.sf.net) under share/*.xml - OpenDiameter project (diameter.sf.net) under libdiameter/config/dictionary.xml (will probably require some stripping) nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/dict_legacy/dictionary.dtd000066400000000000000000000031141333553357400256230ustar00rootroot00000000000000 nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/nightly_tests/000077500000000000000000000000001333553357400234135ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/nightly_tests/README000066400000000000000000000067271333553357400243070ustar00rootroot00000000000000This folder contains information and scripts to run a new test configuration for nightly builds and reporting the results to freeDiameter dashboard at: http://www.freediameter.net/CDash/index.php?project=freeDiameter The information gathered here mostly comes from the following pages: http://www.itk.org/Wiki/CMake_Testing_With_CTest http://www.itk.org/Wiki/CMake_Scripting_Of_CTest http://www.itk.org/Wiki/CTest:Buildserver ============= INSTRUCTIONS to setup a new build slave for the freeDiameter buildserver: -- note: the build slave should have cmake version 2.8 at least so that ctest will update the source tree properly. 1) Install all dependencies for freeDiameter as follow: a) Debian / Ubuntu: See the "prereqs.ubuntu" file $ sudo aptitude install `wget http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/prereqs.ubuntu -O - | grep -v -e "^#"` b) FreeBSD: See the "prereqs.freebsd" file - install base system and ports - install freediameter dependencies as follow: # pkg_add -r -v wget # pkg_add -r -v `wget http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/prereqs.freebsd -O - | grep -v -e "^#"` c) OpenSUSE: $ sudo zypper install `wget http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/prereqs.opensuse -O - | grep -v -e "^#"` d) Fedora: $ sudo yum install wget $ sudo yum install `wget http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/prereqs.fedora -O - | grep -v -e "^#"` You may also have issues with SELinux later, an easy workaround is to disable it (until better solution) # setenforce Permissive 2) Create the "test" database for app_acct test (we assume the tests are run as user "test" here) - check INSTALL.FreeBSD file for specific PostgreSQL pre-install instructions. - These are the instructions for Debian/Ubuntu/OpenSUSE, adjust as needed: # su - postgres # createuser --interactive test Shall the new role be a superuser? (y/n) n Shall the new role be allowed to create databases? (y/n) y Shall the new role be allowed to create more new roles? (y/n) n # logout $ whoami test $ createdb test $ psql test psql (8.4.4) Type "help" for help. test=> CREATE TABLE incoming_test ( recorded_on timestamp with time zone NOT NULL, "Accounting-Record-Type" integer, "Session-Id" bytea, "Accounting-Record-Number" integer, "Route-Record1" bytea, "Route-Record2" bytea, "Route-Record3" bytea, "Route-Record4" bytea ); \q 3) Create a directory ~/fDtests $ cd $ mkdir fDtests $ cd fDtests 4) Retrieve the runtests.sh script and save in this directory $ wget http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/runtests.sh $ chmod +x runtests.sh 5) Create a file local.cmake defining the name of the build slave in this directory also. $ echo "SET(CTEST_SITE \""`hostname`"\")" > local.cmake For FreeBSD, in addition do: $ echo "set(CTEST_BUILD_OPTIONS \"\${CTEST_BUILD_OPTIONS} -DFLEX_EXECUTABLE:FILEPATH=/usr/local/bin/flex\")" >> local.cmake 6) Run the runtests.sh script once to check it works properly (freeBSD might require: ln -s /usr/local/bin/bash /bin/bash) 7) Set up a crontab to run the script $ wget http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/cronjob.sh $ chmod +x cronjob.sh $ crontab -l 0 0 * * * /home/test/fDtests/cronjob.sh > /home/test/fDtests/cronjob.log 2>&1 nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/nightly_tests/alldefault.conf000066400000000000000000000000411333553357400263720ustar00rootroot00000000000000 set(CTEST_BUILD_NAME "Default") nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/nightly_tests/allext.conf000066400000000000000000000006371333553357400255610ustar00rootroot00000000000000 # This configuration compiles all the extensions. It also performs a coverage test. # For this to pass, you need to setup the pg database for app_acct test. set(CTEST_BUILD_NAME "All extensions (default)") set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DALL_EXTENSIONS:BOOL=ON") set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DTEST_APP_ACCT:BOOL=ON -DTEST_APP_ACCT_CONNINFO:STRING=user=test\\ dbname=test") nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/nightly_tests/allextdbg.conf000066400000000000000000000010071333553357400262260ustar00rootroot00000000000000 # This configuration compiles all the extensions. It also performs a coverage test. # For this to pass, you need to setup the pg database for app_acct test. set(WITH_COVERAGE TRUE) set(CTEST_BUILD_NAME "All extensions (Debug)") set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DALL_EXTENSIONS:BOOL=ON") set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DCMAKE_BUILD_TYPE:STRING=Debug") set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DTEST_APP_ACCT:BOOL=ON -DTEST_APP_ACCT_CONNINFO:STRING=user=test\\ dbname=test") nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/nightly_tests/allextdeb.conf000066400000000000000000000007771333553357400262410ustar00rootroot00000000000000 # This configuration compiles all the extensions. It also performs a coverage test. # For this to pass, you need to setup the pg database for app_acct test. set(CTEST_BUILD_NAME "All extensions (DebianPackage)") set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DALL_EXTENSIONS:BOOL=ON") set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DCMAKE_BUILD_TYPE:STRING=DebianPackage") set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DTEST_APP_ACCT:BOOL=ON -DTEST_APP_ACCT_CONNINFO:STRING=user=test\\ dbname=test") nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/nightly_tests/allextmax.conf000066400000000000000000000010011333553357400262510ustar00rootroot00000000000000 # This configuration compiles all the extensions. It also performs a coverage test. # For this to pass, you need to setup the pg database for app_acct test. set(CTEST_BUILD_NAME "All extensions (MaxPerformance)") set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DALL_EXTENSIONS:BOOL=ON") set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DCMAKE_BUILD_TYPE:STRING=MaxPerformance") set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DTEST_APP_ACCT:BOOL=ON -DTEST_APP_ACCT_CONNINFO:STRING=user=test\\ dbname=test") nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/nightly_tests/allextprof.conf000066400000000000000000000010171333553357400264410ustar00rootroot00000000000000 # This configuration compiles all the extensions. It also performs a coverage test. # For this to pass, you need to setup the pg database for app_acct test. set(WITH_COVERAGE TRUE) set(CTEST_BUILD_NAME "All extensions (Profiling)") set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DALL_EXTENSIONS:BOOL=ON") set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DCMAKE_BUILD_TYPE:STRING=Profiling") set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DTEST_APP_ACCT:BOOL=ON -DTEST_APP_ACCT_CONNINFO:STRING=user=test\\ dbname=test") nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/nightly_tests/allextrel.conf000066400000000000000000000007631333553357400262640ustar00rootroot00000000000000 # This configuration compiles all the extensions. It also performs a coverage test. # For this to pass, you need to setup the pg database for app_acct test. set(CTEST_BUILD_NAME "All extensions (Release)") set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DALL_EXTENSIONS:BOOL=ON") set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DCMAKE_BUILD_TYPE:STRING=Release") set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DTEST_APP_ACCT:BOOL=ON -DTEST_APP_ACCT_CONNINFO:STRING=user=test\\ dbname=test") nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/nightly_tests/allextval.conf000066400000000000000000000010271333553357400262560ustar00rootroot00000000000000 # This configuration compiles all the extensions. It also performs a coverage test. # For this to pass, you need to setup the pg database for app_acct test. set(WITH_COVERAGE TRUE) set(CTEST_BUILD_NAME "All extensions (DebugValgrind)") set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DALL_EXTENSIONS:BOOL=ON") set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DCMAKE_BUILD_TYPE:STRING=DebugValgrind") set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DTEST_APP_ACCT:BOOL=ON -DTEST_APP_ACCT_CONNINFO:STRING=user=test\\ dbname=test") nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/nightly_tests/cronjob.sh000066400000000000000000000004361333553357400254060ustar00rootroot00000000000000#!/bin/bash # This script will simply retrieve the latest "runtest" script and run it. pushd ~/fDtests mv -f runtests.sh runtests.sh.prev wget "http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/runtests.sh" chmod +x runtests.sh popd ~/fDtests/runtests.sh nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/nightly_tests/idnaignore.conf000066400000000000000000000001651333553357400264030ustar00rootroot00000000000000 set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DDIAMID_IDNA_IGNORE:BOOL=ON") set(CTEST_BUILD_NAME "IDNA Ignore") nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/nightly_tests/idnareject.conf000066400000000000000000000001651333553357400263740ustar00rootroot00000000000000 set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DDIAMID_IDNA_REJECT:BOOL=ON") set(CTEST_BUILD_NAME "IDNA Reject") nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/nightly_tests/nosctp.conf000066400000000000000000000002201333553357400255620ustar00rootroot00000000000000 # Remove SCTP support at compilation set(CTEST_BUILD_OPTIONS "${CTEST_BUILD_OPTIONS} -DDISABLE_SCTP:BOOL=ON") set(CTEST_BUILD_NAME "No SCTP") nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/nightly_tests/prereqs.fedora000066400000000000000000000011341333553357400262550ustar00rootroot00000000000000# Fedora packages names of dependencies for nightly tests (using "yum install "): cmake make gcc gcc-c++ flex bison gnutls-devel libgcrypt-devel mercurial lksctp-tools-devel kernel-modules-extra postgresql-server postgresql-devel mysql-server mysql-devel libxml2 libxml2-devel libidn-devel swig python-devel # For postgresql server to start automatically, you may have to issue: # service postgresql initdb # chkconfig --level 345 postgresql on # To allow SCTP sockets to be bound in SELinux, I don't know the command, # so let's disable SELinux for the moment: # setenforce Permissive nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/nightly_tests/prereqs.freebsd000066400000000000000000000006201333553357400264260ustar00rootroot00000000000000# 1: install base system and ports # 2: install wget with command: pkg_add -r -v wget # Finally, install the other packages from this file # pkg_add -r -F -v `wget http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/prereqs.freebsd -O - | grep -v -e "^#"` bash cmake mercurial flex bison libgcrypt gnutls postgresql84-client postgresql84-server mysql50-client libxml2 swig nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/nightly_tests/prereqs.opensuse000066400000000000000000000011341333553357400266560ustar00rootroot00000000000000# OpenSUSE packages names of dependencies for nightly tests (using "zypper install "): # zypper install `wget http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/prereqs.opensuse -O - | grep -v -e "^#"` cmake mercurial make gcc gcc-c++ flex bison lksctp-tools-devel libgnutls-devel libgcrypt-devel postgresql-server postgresql-devel libmysqlclient-devel libxml2-devel swig python-devel # Afterwards, you may need to issue the following command so that postgresql starts at boot: # insserv postgresql # or for open Suse 12.x: # systemctl enable postgresql.service nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/nightly_tests/prereqs.ubuntu000066400000000000000000000003011333553357400263320ustar00rootroot00000000000000# Packages (Ubuntu names) cmake mercurial make gcc g++ flex bison binutils libsctp-dev libgnutls-dev valgrind wget libpq-dev postgresql libmysqlclient-dev libxml2-dev libxml2 swig python-dev nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/nightly_tests/runtests.sh000066400000000000000000000110201333553357400256300ustar00rootroot00000000000000#!/bin/bash -x # This script will retrieve the list of tests to run from the freediameter website, # and execute them one by one. ROOTDIR=$HOME/fDtests if [ ! -d $ROOTDIR ]; then echo "The working directory $ROOTDIR does not exist. Please create it or edit the script." exit 1; fi WORKDIR=$ROOTDIR/data # The script requires a local.cmake file to exist and define the following: # CTEST_SITE= # the name of the build slave. # Example: SET(CTEST_SITE "Ubuntu-Lucid-64b") if [ ! -e $ROOTDIR/local.cmake ]; then echo "Missing $ROOTDIR/local.cmake file, generating one (edit as needed, and run the script again)"; echo "SET(CTEST_SITE \""`hostname --fqdn`"\")" > $ROOTDIR/local.cmake exit 1; fi # Now, cleanup any previous built data, but keep the sources (to get the diffs) if [ ! -d $WORKDIR ]; then mkdir $WORKDIR else rm -rf $WORKDIR/*/build fi echo "Starting Nightly tests, time: "`date` # Retrieve the default parameters. wget "http://www.freediameter.net/hg/freeDiameter/raw-file/tip/CTestConfig.cmake" -O $WORKDIR/1_default.cmake if [ ! -e $WORKDIR/1_default.cmake ]; then echo "Error retrieving CTestConfig.cmake file"; exit 1; fi # Retrieve the list of build names wget "http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/tests.list" -O $WORKDIR/2_tests.list if [ ! -e $WORKDIR/2_tests.list ]; then echo "Error retrieving tests.list file"; exit 1; fi # Now, for each test in the list for t in $(cat $WORKDIR/2_tests.list | grep -v -e "^#"); do # Create the work environment if needed if [ ! -d $WORKDIR/$t ]; then mkdir $WORKDIR/$t fi #### Create the script # Project name, nightly time cp $WORKDIR/1_default.cmake $WORKDIR/$t/CTestScript.cmake # Create path names, default build configuration, ... cat >> $WORKDIR/$t/CTestScript.cmake << EOF ########################## SET(CTEST_SOURCE_DIRECTORY "$WORKDIR/$t/source") SET(CTEST_BINARY_DIRECTORY "$WORKDIR/$t/build") set(CTEST_CMAKE_GENERATOR "Unix Makefiles") set(CTEST_BUILD_CONFIGURATION "Profiling") set(WITH_MEMCHECK FALSE) set(WITH_COVERAGE FALSE) set(CTEST_BUILD_OPTIONS "") set(CTEST_BUILD_NAME "Unnamed") ########################## EOF wget "http://www.freediameter.net/hg/freeDiameter/raw-file/tip/contrib/nightly_tests/$t.conf" -O $WORKDIR/$t/params.conf if [ ! -e $WORKDIR/$t/params.conf ]; then echo "Error retrieving $t.conf file"; continue; fi # The retrieved parameters will overwrite the defaults cat $WORKDIR/$t/params.conf >> $WORKDIR/$t/CTestScript.cmake # Overwrite with all the local data (site name, ...) echo "######## Local site data: " >> $WORKDIR/$t/CTestScript.cmake cat $ROOTDIR/local.cmake >> $WORKDIR/$t/CTestScript.cmake # Now, the remaining of the script cat >> $WORKDIR/$t/CTestScript.cmake << EOF ####################################################################### # ctest_empty_binary_directory(\${CTEST_BINARY_DIRECTORY}) find_program(CTEST_HG_COMMAND NAMES hg) find_program(CTEST_COVERAGE_COMMAND NAMES gcov) find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind) # set(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE \${CTEST_SOURCE_DIRECTORY}/tests/valgrind.supp) if(NOT EXISTS "\${CTEST_SOURCE_DIRECTORY}") set(CTEST_CHECKOUT_COMMAND "\${CTEST_HG_COMMAND} clone http://www.freediameter.net/hg/freeDiameter \${CTEST_SOURCE_DIRECTORY}") endif() set(CTEST_UPDATE_COMMAND "\${CTEST_HG_COMMAND}") set(CTEST_CONFIGURE_COMMAND "\${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE:STRING=\${CTEST_BUILD_CONFIGURATION}") set(CTEST_CONFIGURE_COMMAND "\${CTEST_CONFIGURE_COMMAND} -DBUILD_TESTING:BOOL=ON -DOPT_TEST_ARGUMENTS:STRING=-d \${CTEST_BUILD_OPTIONS}") set(CTEST_CONFIGURE_COMMAND "\${CTEST_CONFIGURE_COMMAND} \\"-G\${CTEST_CMAKE_GENERATOR}\\"") set(CTEST_CONFIGURE_COMMAND "\${CTEST_CONFIGURE_COMMAND} \\"\${CTEST_SOURCE_DIRECTORY}\\"") ctest_start("Nightly") ctest_update() ctest_configure() ctest_build() ctest_test() if (WITH_COVERAGE AND CTEST_COVERAGE_COMMAND) ctest_coverage() endif (WITH_COVERAGE AND CTEST_COVERAGE_COMMAND) if (WITH_MEMCHECK AND CTEST_MEMORYCHECK_COMMAND) ctest_memcheck() endif (WITH_MEMCHECK AND CTEST_MEMORYCHECK_COMMAND) ctest_submit() EOF # OK, now run this test, it will submit its results. ctest -S $WORKDIR/$t/CTestScript.cmake -V done echo "Completed Nightly tests, time: "`date` nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/nightly_tests/tests.list000066400000000000000000000001631333553357400254520ustar00rootroot00000000000000allext allextdbg allextval allextret allextprof allextmax allextdeb alldefault nosctp idnaignore idnareject #noext nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/test_Gx/000077500000000000000000000000001333553357400221305ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/test_Gx/CMakeLists.txt000066400000000000000000000004331333553357400246700ustar00rootroot00000000000000# The dict_nasreq extension PROJECT("Gx Interface for freediameter" C) # Compile as a module FD_ADD_EXTENSION(app_gx main_gx.c) #### ## INSTALL section ## INSTALL(TARGETS app_gx LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-rx-interface) nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/test_Gx/main_gx.c000066400000000000000000000572751333553357400237360ustar00rootroot00000000000000/**************** Contributed by: Krishnan Srinivasan License: to be specified. TODO: ****************/ #include #include #include #define AUTH_APP_ID 16777238 #define VENDOR_ID_3GPP 10415 /* The content of this file follows the same structure as dict_base_proto.c */ #if 0 #define CHECK_dict_new( _type, _data, _parent, _ref ) \ CHECK_FCT( fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref)) ); #endif void dump_sess_eyec(struct session *sess, const char *); static int ccr_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act); static int reauth_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act); static int cca_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act); static struct disp_hdl * ccr_cb_hdl = NULL; /* handler for ccr req cb */ static struct disp_hdl * cca_cb_hdl = NULL; /* handler for cca req cb */ static struct disp_hdl * reauth_cb_hdl = NULL; /* handler for cca req cb */ struct dict_object *ccr_cmd = NULL; struct dict_object *cca_cmd = NULL; struct dict_object *dataobj_re_auth_request_type = NULL; struct dict_object * origin_host = NULL; struct dict_object * origin_realm = NULL; struct dict_object * dest_host = NULL; struct dict_object * dest_realm = NULL; struct dict_object *reauth_cmd = NULL; struct dict_object * auth_app_id = NULL; struct dict_object * service_cxt_id = NULL ; struct dict_object * cc_req_type = NULL; struct dict_object * cc_req_num = NULL; struct dict_object * bearer_usage = NULL; struct dict_object * pflt_oper = NULL; struct dict_object * pflt_info = NULL; struct dict_object * pflt_id = NULL; struct dict_object * gx_inf; struct dict_object * term_cause = NULL; struct session *g_sess = NULL; struct session_handler *g_hdlr = NULL; enum gx_state { STATE_INIT = 0, STATE_INTERMEDIATE , STATE_FINAL }; struct gx_sm_t { enum gx_state state; pthread_t tid; struct fifo *events; pthread_mutex_t p_sm_mtx; int req_num; struct session *sess; } g_gx_sm; int snd_ccr_msg(struct gx_sm_t **gx_sm , struct dict_object *cmd_r ) ; void sig_hdlr(void); void *gx_sm_th(void *sm); #define press_key_continue() { printf("%s %d\n", __FUNCTION__, __LINE__);} static int app_gx_entry(char * conffile) { // TRACE_ENTRY("%p", conffile); { application_id_t dcca_id = AUTH_APP_ID; application_id_t ccr_id = 272; application_id_t cca_id = 272; application_id_t reauth_id = 258; CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_APPLICATION, APPLICATION_BY_ID, &dcca_id, &gx_inf, ENOENT)); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_CODE_R, &ccr_id, &ccr_cmd, ENOENT)); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_CODE_A, &cca_id, &cca_cmd, ENOENT)); // CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_CODE_R, &reauth_id, &reauth_cmd, ENOENT)); } /* Applications section */ #if 0 { // Gx interface { struct dict_application_data data = { AUTH_APP_ID, "3GPP-Gx Application" }; CHECK_dict_new( DICT_APPLICATION, &data, NULL, &gx_inf); } } #endif // Do registeration and init stuff { struct disp_when data; TRACE_DEBUG(FULL, "Initializing dispatch callbacks for Gx interface"); memset(&data, 0, sizeof(data)); data.app = gx_inf; data.command = ccr_cmd; /* Now specific handler for CCR-CMD */ CHECK_FCT( fd_disp_register( ccr_cb, DISP_HOW_CC, &data, NULL, &ccr_cb_hdl ) ); memset(&data, 0, sizeof(data)); data.app = gx_inf; data.command = cca_cmd; CHECK_FCT( fd_disp_register( cca_cb, DISP_HOW_CC, &data, NULL, &cca_cb_hdl ) ); #ifdef REAUTH CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Re-Auth-Request", &reauth_cmd, ENOENT)); memset(&data, 0, sizeof(data)); data.app = gx_inf; data.command = reauth_cmd; printf("register REAUTH\n"); CHECK_FCT( fd_disp_register( reauth_cb, DISP_HOW_CC, &data, NULL, &reauth_cb_hdl ) ); #endif } CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Host", &origin_host, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Realm", &origin_realm, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Host", &dest_host, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Realm", &dest_realm, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Auth-Application-Id", &auth_app_id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Service-Context-Id", &service_cxt_id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "CC-Request-Type", &cc_req_type, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Termination-Cause", &term_cause, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "CC-Request-Number", &cc_req_num, ENOENT) ); { struct dict_avp_request req = { VENDOR_ID_3GPP, 0, "Bearer-Usage"}; CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME_AND_VENDOR, &req, &bearer_usage, ENOENT) ); } { struct dict_avp_request req = { VENDOR_ID_3GPP, 0, "Packet-Filter-Operation"}; CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME_AND_VENDOR, &req, &pflt_oper, ENOENT) ); } { struct dict_avp_request req = { VENDOR_ID_3GPP, 0, "Packet-Filter-Information"}; CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME_AND_VENDOR, &req, &pflt_info, ENOENT) ); } { struct dict_avp_request req = { VENDOR_ID_3GPP, 0, "Packet-Filter-Identifier"}; CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME_AND_VENDOR, &req, &pflt_id, ENOENT) ); } CHECK_FCT(fd_sess_handler_create( &g_hdlr, free, NULL)); CHECK_FCT( fd_fifo_new(&g_gx_sm.events)); CHECK_FCT( fd_disp_app_support( gx_inf, NULL, 1 , 0)); CHECK_FCT( fd_event_trig_regcb(SIGUSR1, "app_gx", sig_hdlr ) ); TRACE_DEBUG(INFO, "Extension 'Gx' initialized"); return 0; } void * gx_sm_th(void *sm) { struct gx_sm_t *gx_sm = (struct gx_sm_t *) sm; struct timespec tout; int evt_code; CHECK_SYS_DO( clock_gettime( CLOCK_REALTIME, &tout), goto out); tout.tv_sec =+ 60 ; while(1) { fd_event_timedget(gx_sm->events, &tout , ETIMEDOUT, &evt_code, NULL, NULL ); CHECK_SYS_DO( clock_gettime( CLOCK_REALTIME, &tout), goto out); printf("in tout sec %d\n", tout.tv_sec); if(evt_code == ETIMEDOUT) { snd_ccr_msg(&gx_sm, ccr_cmd); gx_sm->req_num++ ; gx_sm->state = STATE_INTERMEDIATE; CHECK_SYS_DO( clock_gettime( CLOCK_REALTIME, &tout), goto out); tout.tv_sec += 30 ; } // printf("press enter\n"); // getchar(); } out: return NULL; } //TBD int init_gx_sm(struct gx_sm_t *sm) { sm->state = STATE_INIT; sm->tid = 0;// sm->events = NULL; pthread_mutex_t p_sm_mtx; sm->req_num = 0; sm->sess = NULL; return 0; } int free_gx_sm(struct gx_sm_t *sm) { free(sm); } struct gx_sm_t *gl_gx_sm = NULL; void sig_hdlr() { struct gx_sm_t *gx_sm = gl_gx_sm; if( gx_sm) { fd_sess_dump( 0 , g_gx_sm.sess); } else { if(gx_sm= (struct gx_sm_t *)malloc(sizeof(struct gx_sm_t))) { init_gx_sm(gx_sm); } gl_gx_sm = gx_sm; } snd_ccr_msg( &gx_sm, ccr_cmd); return; } static void cr_cb_ans(void *data, struct msg **msg) { printf("call back \n"); return; } /* < Session-Id > { Origin-Host } { Origin-Realm } { Destination-Realm } { Auth-Application-Id } { Service-Context-Id } { CC-Request-Type } { CC-Request-Number } */ int snd_ccr_msg(struct gx_sm_t **sm , struct dict_object *cmd_r ) { struct msg * req = NULL; struct avp * avp = NULL; union avp_value val; struct ta_mess_info * mi = NULL, *svg; struct session *sess = NULL; struct gx_sm_t *gx_sm = NULL; struct gx_sm_t *ptr = NULL; TRACE_DEBUG(FULL, "Creating a new CCR message for sending. %p", gx_sm); /* Create the request from template */ CHECK_FCT_DO( fd_msg_new( cmd_r, MSGFL_ALLOC_ETEID, &req ), goto out ); gx_sm = *sm; /* Create a new session */ if(!gx_sm->sess) { CHECK_FCT_DO( fd_sess_new( &sess, fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len, "CCR_SESSION", strlen("CCR_SESSION") ), goto out ); printf("statemachine: %p %p %p\n", *(&gx_sm), gx_sm , *sm); gx_sm->sess = sess; printf("new session %p \n", sess); //Hold the session till terminate happens CHECK_FCT( fd_sess_ref_msg(sess) ); } else { sess = gx_sm->sess; printf("use previous session %p \n", sess); } fd_sess_dump( 0 , sess); // dump_sess_eyec( sess, __FUNCTION__); /* Now set all AVPs values */ /* Session-Id */ { os0_t sid; size_t sidlen; struct dict_object *sess_id = NULL; CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict , DICT_AVP, AVP_BY_NAME , "Session-Id" , &sess_id, ENOENT) ); CHECK_FCT_DO( fd_sess_getsid ( sess, &sid, &sidlen ), goto out ); CHECK_FCT_DO( fd_msg_avp_new ( sess_id, 0, &avp ), goto out ); val.os.data = sid; val.os.len = sidlen; CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_FIRST_CHILD, avp ), goto out ); } /* Set the Destination-Realm AVP */ { CHECK_FCT_DO( fd_msg_avp_new ( dest_realm, 0, &avp ), goto out ); val.os.data = (unsigned char *)("vm"); val.os.len = strlen("vm"); CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); } /* Set the Destination-Host AVP if needed*/ { CHECK_FCT_DO( fd_msg_avp_new ( dest_host, 0, &avp ), goto out ); val.os.data = (unsigned char *)("192.168.101.3"); val.os.len = strlen("192.168.101.3"); CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); } /* Set Origin-Host & Origin-Realm */ CHECK_FCT_DO( fd_msg_add_origin ( req, 0 ), goto out ); /* Set Auth-Application ID */ { CHECK_FCT_DO( fd_msg_avp_new ( auth_app_id, 0, &avp ), goto out ); val.i32 = AUTH_APP_ID; // Auth-App id is 4 for CCR CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); } /* Set Service Context ID */ { CHECK_FCT_DO( fd_msg_avp_new ( service_cxt_id, 0, &avp ), goto out ); val.os.data = (unsigned char *)("test@tst"); CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); } /* Set Request Type */ { #define CCR_INIT_REQUEST 1 #define CCR_UPDATE_REQUEST 2 #define CCR_TERMINATION_REQUEST 3 #define CCR_EVENT_REQUEST 4 //TODO Change this to use enum object CHECK_FCT_DO( fd_msg_avp_new ( cc_req_type, 0, &avp ), goto out ); if(gx_sm->state == STATE_INIT) val.i32 = CCR_INIT_REQUEST; else if(gx_sm->state == STATE_FINAL) val.i32 = CCR_TERMINATION_REQUEST; else val.i32 = CCR_UPDATE_REQUEST; CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); } /* Set Request Number */ { CHECK_FCT_DO( fd_msg_avp_new ( cc_req_num, 0, &avp ), goto out ); val.i32 = gx_sm->req_num; CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); gx_sm->req_num++; } switch(gx_sm->state) { case STATE_INIT: { //Set Bearer-Usage //TODO Change this to use enum object CHECK_FCT_DO( fd_msg_avp_new ( bearer_usage, 0, &avp ), goto out ); val.i32 = 1;//IMS CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); } { //Set Packet Filter Operation //TODO Change this to use enum object CHECK_FCT_DO( fd_msg_avp_new ( pflt_oper, 0, &avp ), goto out ); val.i32 = 1;//ADDITION CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); } struct avp *flt_info = NULL; { //Set Packet Filter Information CHECK_FCT_DO( fd_msg_avp_new ( pflt_info, 0, &flt_info ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, flt_info ), goto out ); } // Set Packet Filter Identity { CHECK_FCT_DO( fd_msg_avp_new ( pflt_id, 0, &avp ), goto out ); val.os.data = (unsigned char *)("ID"); val.os.len = strlen("ID"); CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); if(flt_info) { CHECK_FCT_DO( fd_msg_avp_add( flt_info, MSG_BRW_LAST_CHILD, avp ), goto out ); }else { printf("flt_info NULL\n"); } } CHECK_FCT(fd_sess_state_store(g_hdlr, sess, &gx_sm)); break; case STATE_FINAL: { //Set Packet Filter Operation //TODO Change this to use enum object CHECK_FCT_DO( fd_msg_avp_new ( term_cause, 0, &avp ), goto out ); val.i32 = 1;//Diameter logout CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); } break; default: printf("State mismatch \n"); } fflush(stderr); /* Send the request */ printf("CCA %p\n",req); // Everthing Done Store the state: reply should retreive it CHECK_FCT_DO( fd_msg_send( &req, NULL, NULL ), goto out ); out: return; } static int reauth_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act) { struct msg *ans, *qry; struct avp * a; TRACE_ENTRY("%p %p %p %p", msg, avp, sess, act); if (msg == NULL) return EINVAL; /* Create answer header */ qry = *msg; CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, msg, 0 ) ); ans = *msg; /* Set the Origin-Host, Origin-Realm, Result-Code AVPs */ CHECK_FCT( fd_msg_rescode_set( ans, "DIAMETER_SUCCESS", NULL, NULL, 1 ) ); /* Send the answer */ CHECK_FCT( fd_msg_send( msg, NULL, NULL ) ); } static int dcca_ans_from_req( struct dict_object * obj, struct msg *qry, struct msg **msg) { struct avp *avp = NULL; struct avp_hdr * avpdata; int rc = -1; CHECK_FCT(fd_msg_search_avp( qry, obj, &avp)); CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); avp = NULL; CHECK_FCT_DO( fd_msg_avp_new ( obj, 0, &avp ), goto out ); CHECK_FCT_DO( fd_msg_avp_setvalue( avp, avpdata->avp_value ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( *msg, MSG_BRW_LAST_CHILD, avp ), goto out ); rc = 0; out: return rc; } /* Dummy ccr which : Read the cc-req-type && cc-req-number from the msg and stick it back in the reply */ static int ccr_cb( struct msg ** msg, struct avp * r_avp, struct session * sess, void * opaque, enum disp_action * act) { struct msg *ans, *qry; struct avp *avp = NULL; struct avp_hdr * avp_data; int rc = - 1; TRACE_ENTRY("%p %p %p %p", msg, r_avp, sess, act); if (msg == NULL) return EINVAL; /* Create answer header */ qry = *msg; CHECK_FCT_DO( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, msg, 0 ) , goto out); ans = *msg; /* Set the Origin-Host, Origin-Realm, Result-Code AVPs */ CHECK_FCT_DO( fd_msg_rescode_set( ans, "DIAMETER_SUCCESS", NULL, NULL, 1 ), goto out ); // Get the auth_app_id and from the reply and set it in the reply CHECK_FCT_DO(dcca_ans_from_req( auth_app_id, qry, msg), goto out); CHECK_FCT_DO(dcca_ans_from_req( cc_req_type, qry, msg), goto out); CHECK_FCT_DO(dcca_ans_from_req( cc_req_num, qry, msg), goto out); /* Send the answer */ CHECK_FCT_DO( fd_msg_send( msg, NULL, NULL ), goto out ); rc = 0; out: //Free up the memory return rc ; } int send_reauth_req() { struct dict_application_data appdata; struct avp *avp = NULL; union avp_value val ; struct msg *qry, *ans = NULL; struct msg *req = NULL; struct msg *tst = NULL; struct dict_object * auth_app_id = NULL, *reauth_req_type = NULL; // qry = *msg; { // Send new reauth request CHECK_FCT_DO( fd_msg_new( reauth_cmd, MSGFL_ALLOC_ETEID, &req ), goto out ); CHECK_FCT( fd_dict_getval(gx_inf, &appdata) ); struct msg_hdr * header = NULL; CHECK_FCT( fd_msg_hdr ( req, &header ) ); header->msg_appl = appdata.application_id; } /* Session-Id */ { os0_t sid; size_t sidlen; struct dict_object *sess_id = NULL; CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Session-Id", &sess_id, ENOENT) ); //CHECK_FCT_DO( fd_sess_getsid ( sess, &sid, &sidlen ), goto out ); CHECK_FCT_DO( fd_msg_avp_new ( sess_id, 0, &avp ), goto out ); val.os.data = sid; val.os.len = sidlen; CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_FIRST_CHILD, avp ), goto out ); } /* Set the Destination-Realm AVP */ { CHECK_FCT_DO( fd_msg_avp_new ( dest_realm, 0, &avp ), goto out ); val.os.data = (unsigned char *)("vm"); val.os.len = strlen("vm"); CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); } /* Set the Destination-Host AVP if needed*/ // if (ta_conf->dest_host) { CHECK_FCT_DO( fd_msg_avp_new ( dest_host, 0, &avp ), goto out ); val.os.data = (unsigned char *)("cli.vm"); val.os.len = strlen("cli.vm"); CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); // } /* Set Origin-Host & Origin-Realm */ CHECK_FCT_DO( fd_msg_add_origin ( req, 0 ), goto out ); /* AUTH_Application-ID */ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Auth-Application-Id", &auth_app_id, ENOENT) ); CHECK_FCT_DO( fd_msg_avp_new ( auth_app_id, 0, &avp ), goto out ); val.i32 = appdata.application_id; CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); /* Re-Auth Request Type */ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Re-Auth-Request-Type", &reauth_req_type, ENOENT) ); CHECK_FCT_DO( fd_msg_avp_new ( reauth_req_type, 0, &avp ), goto out ); val.i32 = 0; CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); CHECK_FCT_DO( fd_msg_send( &req, cr_cb_ans, NULL ), goto out ); out: return 0 ; } /* Search a given AVP model in an AVP (extracted from libfreediameter/message.c ) */ int fd_avp_search_avp ( struct avp * groupedavp, struct dict_object * what, struct avp ** avp ) { struct avp * nextavp; struct avp_hdr * nextavphdr; struct dict_avp_data dictdata; TRACE_ENTRY("%p %p %p", groupedavp, what, avp); CHECK_FCT( fd_dict_getval(what, &dictdata) ); // Loop only in the group AVP CHECK_FCT( fd_msg_browse(groupedavp, MSG_BRW_FIRST_CHILD, (void *)&nextavp, NULL) ); CHECK_FCT( fd_msg_avp_hdr( nextavp, &nextavphdr ) ); while (nextavphdr) { if ( (nextavphdr->avp_code == dictdata.avp_code) && (nextavphdr->avp_vendor == dictdata.avp_vendor) ) // always 0 if no Vendor flag { break; } // Otherwise move to next AVP in the grouped AVP CHECK_FCT( fd_msg_browse(nextavp, MSG_BRW_NEXT, (void *)&nextavp, NULL) ); if(nextavp!=NULL) { CHECK_FCT( fd_msg_avp_hdr( nextavp, &nextavphdr ) ); } else nextavphdr=NULL; } if (avp) *avp = nextavp; if (avp && nextavp) { struct dictionary * dict; CHECK_FCT( fd_dict_getdict( what, &dict) ); CHECK_FCT_DO( fd_msg_parse_dict( nextavp, dict, NULL ), ); } if (avp || nextavp) return 0; else return ENOENT; } static int cca_cb( struct msg ** msg, struct avp * t_avp , struct session * sess, void * opaque, enum disp_action * act) { struct avp *avp = NULL, *g_avp = NULL; struct msg *req = *msg; struct dict_object *chrg_rule_name = NULL ; struct dict_object *chrg_rule_grp = NULL ; struct avp_hdr * avpdata = NULL; struct dict_avp_request grule_req = {VENDOR_ID_3GPP, 0,"Charging-Rule-Install"}; struct dict_avp_request rule_req = {VENDOR_ID_3GPP, 0,"Charging-Rule-Name"}; struct timespec sess_timeout; struct gx_sm_t *gx_sm = NULL; // struct session *sess = NULL; CHECK_FCT(fd_sess_state_retrieve( g_hdlr, sess, &gx_sm)); fd_sess_dump( 0, sess); if(gx_sm->state != STATE_FINAL) { CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict , DICT_AVP, AVP_BY_NAME_AND_VENDOR , &grule_req , &chrg_rule_grp , ENOENT)); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict , DICT_AVP, AVP_BY_NAME_AND_VENDOR , &rule_req , &chrg_rule_name , ENOENT)); CHECK_FCT(fd_msg_search_avp ( *msg, chrg_rule_grp, &g_avp )); CHECK_FCT(fd_avp_search_avp(g_avp, chrg_rule_name, &avp)); if(avp) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); } else { printf("NULL AVP \n"); } printf("charging-rule-name %s\n", avpdata->avp_value->os.data); gx_sm->state = STATE_FINAL; dump_sess_eyec( sess, __FUNCTION__); printf("next dump\n"); CHECK_FCT(fd_sess_state_store( g_hdlr, sess, &gx_sm)); fd_msg_free(*msg); *msg = NULL; } else { printf("Session terminated\n"); free_gx_sm(gx_sm); fd_msg_free(*msg); fd_sess_reclaim(&sess); *msg = NULL; } fd_sess_dump( 0 , sess); return 0; } static int gx_entry(char * conffile) { return 0; } EXTENSION_ENTRY( "app_gx", app_gx_entry, "dict_dcca_3gpp"); //EXTENSION_ENTRY( "app_gx", gx_entry); nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/test_Gx/readme.txt000066400000000000000000000003141333553357400241240ustar00rootroot00000000000000This content was contributed by Krishnan Srinivasan from Allot Communication. The dictionary entries may need some adjustments to match the content of the dict_dcca_3gpp extension. Thank you Krishnan! nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/tools/000077500000000000000000000000001333553357400216535ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/tools/README000066400000000000000000000001611333553357400225310ustar00rootroot00000000000000org_to_fd.pl converts org files like diameter-rfcs.org to C fragments that can be included in freeDiameter code. nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/tools/diameter-rfcs.org000066400000000000000000000503101333553357400251100ustar00rootroot00000000000000| Attribute Name | Code | Section | Data | MUST | MAY | SHLD NOT | MUST NOT | Encr | | # RFC 3588 - Diameter # | | | | | | | | | | Acct-Interim-Interval | 85 | 9.8.2 | Unsigned32 | M | P | | V | Y | | Accounting-Realtime-Required | 483 | 9.8.7 | Enumerated | M | P | | V | Y | | Acct-Multi-Session-Id | 50 | 9.8.5 | UTF8String | M | P | | V | Y | | Accounting-Record-Number | 485 | 9.8.3 | Unsigned32 | M | P | | V | Y | | Accounting-Record-Type | 480 | 9.8.1 | Enumerated | M | P | | V | Y | | Accounting-Session-Id | 44 | 9.8.4 | OctetString | M | P | | V | Y | | Accounting-Sub-Session-Id | 287 | 9.8.6 | Unsigned64 | M | P | | V | Y | | Acct-Application-Id | 259 | 6.9 | Unsigned32 | M | P | | V | N | | Auth-Application-Id | 258 | 6.8 | Unsigned32 | M | P | | V | N | | Auth-Request-Type | 274 | 8.7 | Enumerated | M | P | | V | N | | Authorization-Lifetime | 291 | 8.9 | Unsigned32 | M | P | | V | N | | Auth-Grace-Period | 276 | 8.10 | Unsigned32 | M | P | | V | N | | Auth-Session-State | 277 | 8.11 | Enumerated | M | P | | V | N | | Re-Auth-Request-Type | 285 | 8.12 | Enumerated | M | P | | V | N | | Class | 25 | 8.20 | OctetString | M | P | | V | Y | | Destination-Host | 293 | 6.5 | DiamIdent | M | P | | V | N | | Destination-Realm | 283 | 6.6 | DiamIdent | M | P | | V | N | | Disconnect-Cause | 273 | 5.4.3 | Enumerated | M | P | | V | N | | E2E-Sequence-AVP | 300 | 6.15 | Grouped | M | P | | V | Y | | Error-Message | 281 | 7.3 | UTF8String | | P | | V,M | N | | Error-Reporting-Host | 294 | 7.4 | DiamIdent | | P | | V,M | N | | Event-Timestamp | 55 | 8.21 | Time | M | P | | V | N | | Experimental-Result | 297 | 7.6 | Grouped | M | P | | V | N | | Experimental-Result-Code | 298 | 7.7 | Unsigned32 | M | P | | V | N | | Failed-AVP | 279 | 7.5 | Grouped | M | P | | V | N | | Firmware-Revision | 267 | 5.3.4 | Unsigned32 | | | | P,V,M | N | | Host-IP-Address | 257 | 5.3.5 | Address | M | P | | V | N | | Inband-Security-Id | 299 | 6.10 | Unsigned32 | M | P | | V | N | | Multi-Round-Time-Out | 272 | 8.19 | Unsigned32 | M | P | | V | Y | | Origin-Host | 264 | 6.3 | DiamIdent | M | P | | V | N | | Origin-Realm | 296 | 6.4 | DiamIdent | M | P | | V | N | | Origin-State-Id | 278 | 8.16 | Unsigned32 | M | P | | V | N | | Product-Name | 269 | 5.3.7 | UTF8String | | | | P,V,M | N | | Proxy-Host | 280 | 6.7.3 | DiamIdent | M | | | P,V | N | | Proxy-Info | 284 | 6.7.2 | Grouped | M | | | P,V | N | | Proxy-State | 33 | 6.7.4 | OctetString | M | | | P,V | N | | Redirect-Host | 292 | 6.12 | DiamURI | M | P | | V | N | | Redirect-Host-Usage | 261 | 6.13 | Enumerated | M | P | | V | N | | Redirect-Max-Cache-Time | 262 | 6.14 | Unsigned32 | M | P | | V | N | | Result-Code | 268 | 7.1 | Unsigned32 | M | P | | V | N | | Route-Record | 282 | 6.7.1 | DiamIdent | M | | | P,V | N | | Session-Id | 263 | 8.8 | UTF8String | M | P | | V | Y | | Session-Timeout | 27 | 8.13 | Unsigned32 | M | P | | V | N | | Session-Binding | 270 | 8.17 | Unsigned32 | M | P | | V | Y | | Session-Server-Failover | 271 | 8.18 | Enumerated | M | P | | V | Y | | Supported-Vendor-Id | 265 | 5.3.6 | Unsigned32 | M | P | | V | N | | Termination-Cause | 295 | 8.15 | Enumerated | M | P | | V | N | | User-Name | 1 | 8.14 | UTF8String | M | P | | V | Y | | Vendor-Id | 266 | 5.3.3 | Unsigned32 | M | P | | V | N | | Vendor-Specific-Application-Id | 260 | 6.11 | Grouped | M | P | | V | N | | # RFC 4005 - NAS # | | | | | | | | | | NAS-Port | 5 | 4.2 | Unsigned32 | M | P | | V | Y | | NAS-Port-Id | 87 | 4.3 | UTF8String | M | P | | V | Y | | NAS-Port-Type | 61 | 4.4 | Enumerated | M | P | | V | Y | | Called-Station-Id | 30 | 4.5 | UTF8String | M | P | | V | Y | | Calling-Station-Id | 31 | 4.6 | UTF8String | M | P | | V | Y | | Connect-Info | 77 | 4.7 | UTF8String | M | P | | V | Y | | Originating-Line-Info | 94 | 4.8 | OctetString | | M,P | | V | Y | | Reply-Message | 18 | 4.9 | UTF8String | M | P | | V | Y | | User-Password | 2 | 5.1 | OctetString | M | P | | V | Y | | Password-Retry | 75 | 5.2 | Unsigned32 | M | P | | V | Y | | Prompt | 76 | 5.3 | Enumerated | M | P | | V | Y | | CHAP-Auth | 402 | 5.4 | Grouped | M | P | | V | Y | | CHAP-Algorithm | 403 | 5.5 | Enumerated | M | P | | V | Y | | CHAP-Ident | 404 | 5.6 | OctetString | M | P | | V | Y | | CHAP-Response | 405 | 5.7 | OctetString | M | P | | V | Y | | CHAP-Challenge | 60 | 5.8 | OctetString | M | P | | V | Y | | ARAP-Password | 70 | 5.9 | OctetString | M | P | | V | Y | | ARAP-Challenge-Response | 84 | 5.10 | OctetString | M | P | | V | Y | | ARAP-Security | 73 | 5.11 | Unsigned32 | M | P | | V | Y | | ARAP-Security-Data | 74 | 5.12 | OctetString | M | P | | V | Y | | Service-Type | 6 | 6.1 | Enumerated | M | P | | V | Y | | Callback-Number | 19 | 6.2 | UTF8String | M | P | | V | Y | | Callback-Id | 20 | 6.3 | UTF8String | M | P | | V | Y | | Idle-Timeout | 28 | 6.4 | Unsigned32 | M | P | | V | Y | | Port-Limit | 62 | 6.5 | Unsigned32 | M | P | | V | Y | | NAS-Filter-Rule | 400 | 6.6 | IPFltrRule | M | P | | V | Y | | Filter-Id | 11 | 6.7 | UTF8String | M | P | | V | Y | | Configuration-Token | 78 | 6.8 | OctetString | M | | | P,V | | | QoS-Filter-Rule | 407 | 6.9 | QoSFltrRule | | | | | | | Framed-Protocol | 7 | 6.10.1 | Enumerated | M | P | | V | Y | | Framed-Routing | 10 | 6.10.2 | Enumerated | M | P | | V | Y | | Framed-MTU | 12 | 6.10.3 | Unsigned32 | M | P | | V | Y | | Framed-Compression | 13 | 6.10.4 | Enumerated | M | P | | V | Y | | Framed-IP-Address | 8 | 6.11.1 | OctetString | M | P | | V | Y | | Framed-IP-Netmask | 9 | 6.11.2 | OctetString | M | P | | V | Y | | Framed-Route | 22 | 6.11.3 | UTF8String | M | P | | V | Y | | Framed-Pool | 88 | 6.11.4 | OctetString | M | P | | V | Y | | Framed-Interface-Id | 96 | 6.11.5 | Unsigned64 | M | P | | V | Y | | Framed-IPv6-Prefix | 97 | 6.11.6 | OctetString | M | P | | V | Y | | Framed-IPv6-Route | 99 | 6.11.7 | UTF8String | M | P | | V | Y | | Framed-IPv6-Pool | 100 | 6.11.8 | OctetString | M | P | | V | Y | | Framed-IPX-Network | 23 | 6.12.1 | UTF8String | M | P | | V | Y | | Framed-Appletalk-Link | 37 | 6.13.1 | Unsigned32 | M | P | | V | Y | | Framed-Appletalk-Network | 38 | 6.13.2 | Unsigned32 | M | P | | V | Y | | Framed-Appletalk-Zone | 39 | 6.13.3 | OctetString | M | P | | V | Y | | ARAP-Features | 71 | 6.14.1 | OctetString | M | P | | V | Y | | ARAP-Zone-Access | 72 | 6.14.2 | Enumerated | M | P | | V | Y | | Login-IP-Host | 14 | 6.15.1 | OctetString | M | P | | V | Y | | Login-IPv6-Host | 98 | 6.15.2 | OctetString | M | P | | V | Y | | Login-Service | 15 | 6.15.3 | Enumerated | M | P | | V | Y | | Login-TCP-Port | 16 | 6.16.1 | Unsigned32 | M | P | | V | Y | | Login-LAT-Service | 34 | 6.17.1 | OctetString | M | P | | V | Y | | Login-LAT-Node | 35 | 6.17.2 | OctetString | M | P | | V | Y | | Login-LAT-Group | 36 | 6.17.3 | OctetString | M | P | | V | Y | | Login-LAT-Port | 63 | 6.17.4 | OctetString | M | P | | V | Y | | Tunneling | 401 | 7.1 | Grouped | M | P | | V | N | | Tunnel-Type | 64 | 7.2 | Enumerated | M | P | | V | Y | | Tunnel-Medium-Type | 65 | 7.3 | Enumerated | M | P | | V | Y | | Tunnel-Client-Endpoint | 66 | 7.4 | UTF8String | M | P | | V | Y | | Tunnel-Server-Endpoint | 67 | 7.5 | UTF8String | M | P | | V | Y | | Tunnel-Password | 69 | 7.6 | OctetString | M | P | | V | Y | | Tunnel-Private-Group-Id | 81 | 7.7 | OctetString | M | P | | V | Y | | Tunnel-Assignment-Id | 82 | 7.8 | OctetString | M | P | | V | Y | | Tunnel-Preference | 83 | 7.9 | Unsigned32 | M | P | | V | Y | | Tunnel-Client-Auth-Id | 90 | 7.10 | UTF8String | M | P | | V | Y | | Tunnel-Server-Auth-Id | 91 | 7.11 | UTF8String | M | P | | V | Y | | Accounting-Input-Octets | 363 | 8.1 | Unsigned64 | M | P | | V | Y | | Accounting-Output-Octets | 364 | 8.2 | Unsigned64 | M | P | | V | Y | | Accounting-Input-Packets | 365 | 8.3 | Unsigned64 | M | P | | V | Y | | Accounting-Output-Packets | 366 | 8.4 | Unsigned64 | M | P | | V | Y | | Acct-Session-Time | 46 | 8.5 | Unsigned32 | M | P | | V | Y | | Acct-Authentic | 45 | 8.6 | Enumerated | M | P | | V | Y | | Acounting-Auth-Method | 406 | 8.7 | Enumerated | M | P | | V | Y | | Acct-Delay-Time | 41 | 8.8 | Unsigned32 | M | P | | V | Y | | Acct-Link-Count | 51 | 8.9 | Unsigned32 | M | P | | V | Y | | Acct-Tunnel-Connection | 68 | 8.10 | OctetString | M | P | | V | Y | | Acct-Tunnel-Packets-Lost | 86 | 8.11 | Unsigned32 | M | P | | V | Y | | NAS-Identifier | 32 | 9.3.1 | UTF8String | M | P | | V | Y | | NAS-IP-Address | 4 | 9.3.2 | OctetString | M | P | | V | Y | | NAS-IPv6-Address | 95 | 9.3.3 | OctetString | M | P | | V | Y | | State | 24 | 9.3.4 | OctetString | M | P | | V | Y | | Termination-Cause | 295 | 9.3.5 | Enumerated | M | P | | V | Y | | Origin-AAA-Protocol | 408 | 9.3.6 | Enumerated | M | P | | V | Y | | # RFC 4006 - DCCA # | | | | | | | | | | CC-Correlation-Id | 411 | 8.1 | OctetString | | P,M | | V | Y | | CC-Input-Octets | 412 | 8.24 | Unsigned64 | M | P | | V | Y | | CC-Money | 413 | 8.22 | Grouped | M | P | | V | Y | | CC-Output-Octets | 414 | 8.25 | Unsigned64 | M | P | | V | Y | | CC-Request-Number | 415 | 8.2 | Unsigned32 | M | P | | V | Y | | CC-Request-Type | 416 | 8.3 | Enumerated | M | P | | V | Y | | CC-Service-Specific-Units | 417 | 8.26 | Unsigned64 | M | P | | V | Y | | CC-Session-Failover | 418 | 8.4 | Enumerated | M | P | | V | Y | | CC-Sub-Session-Id | 419 | 8.5 | Unsigned64 | M | P | | V | Y | | CC-Time | 420 | 8.21 | Unsigned32 | M | P | | V | Y | | CC-Total-Octets | 421 | 8.23 | Unsigned64 | M | P | | V | Y | | CC-Unit-Type | 454 | 8.32 | Enumerated | M | P | | V | Y | | Check-Balance-Result | 422 | 8.6 | Enumerated | M | P | | V | Y | | Cost-Information | 423 | 8.7 | Grouped | M | P | | V | Y | | Cost-Unit | 424 | 8.12 | UTF8String | M | P | | V | Y | | Credit-Control | 426 | 8.13 | Enumerated | M | P | | V | Y | | Credit-Control-Failure-Handling | 427 | 8.14 | Enumerated | M | P | | V | Y | | Currency-Code | 425 | 8.11 | Unsigned32 | M | P | | V | Y | | Direct-Debiting-Failure-Handling | 428 | 8.15 | Enumerated | M | P | | V | Y | | Exponent | 429 | 8.9 | Integer32 | M | P | | V | Y | | Final-Unit-Action | 449 | 8.35 | Enumerated | M | P | | V | Y | | Final-Unit-Indication | 430 | 8.34 | Grouped | M | P | | V | Y | | Granted-Service-Unit | 431 | 8.17 | Grouped | M | P | | V | Y | | G-S-U-Pool-Identifier | 453 | 8.31 | Unsigned32 | M | P | | V | Y | | G-S-U-Pool-Reference | 457 | 8.30 | Grouped | M | P | | V | Y | | Multiple-Services-Credit-Control | 456 | 8.16 | Grouped | M | P | | V | Y | | Multiple-Services-Indicator | 455 | 8.40 | Enumerated | M | P | | V | Y | | Rating-Group | 432 | 8.29 | Unsigned32 | M | P | | V | Y | | Redirect-Address-Type | 433 | 8.38 | Enumerated | M | P | | V | Y | | Redirect-Server | 434 | 8.37 | Grouped | M | P | | V | Y | | Redirect-Server-Address | 435 | 8.39 | UTF8String | M | P | | V | Y | | Requested-Action | 436 | 8.41 | Enumerated | M | P | | V | Y | | Requested-Service-Unit | 437 | 8.18 | Grouped | M | P | | V | Y | | Restriction-Filter-Rule | 438 | 8.36 | IPFiltrRule | M | P | | V | Y | | Service-Context-Id | 461 | 8.42 | UTF8String | M | P | | V | Y | | Service-Identifier | 439 | 8.28 | Unsigned32 | M | P | | V | Y | | Service-Parameter-Info | 440 | 8.43 | Grouped | | P,M | | V | Y | | Service-Parameter-Type | 441 | 8.44 | Unsigned32 | | P,M | | V | Y | | Service-Parameter-Value | 442 | 8.45 | OctetString | | P,M | | V | Y | | Subscription-Id | 443 | 8.46 | Grouped | M | P | | V | Y | | Subscription-Id-Data | 444 | 8.48 | UTF8String | M | P | | V | Y | | Subscription-Id-Type | 450 | 8.47 | Enumerated | M | P | | V | Y | | Tariff-Change-Usage | 452 | 8.27 | Enumerated | M | P | | V | Y | | Tariff-Time-Change | 451 | 8.20 | Time | M | P | | V | Y | | Unit-Value | 445 | 8.8 | Grouped | M | P | | V | Y | | Used-Service-Unit | 446 | 8.19 | Grouped | M | P | | V | Y | | User-Equipment-Info | 458 | 8.49 | Grouped | | P,M | | V | Y | | User-Equipment-Info-Type | 459 | 8.50 | Enumerated | | P,M | | V | Y | | User-Equipment-Info-Value | 460 | 8.51 | OctetString | | P,M | | V | Y | | Value-Digits | 447 | 8.10 | Integer64 | M | P | | V | Y | | Validity-Time | 448 | 8.33 | Unsigned32 | M | P | | V | Y | nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/tools/org_to_fd.pl000077500000000000000000000057311333553357400241630ustar00rootroot00000000000000#!/usr/bin/env perl use strict; use Getopt::Std; our ($opt_V, $opt_v); # default to 3GPP my ($vendor) = 10415; my ($vendor_name) = "3GPP"; sub convert_must_to_flags($) { my ($allmust) = @_; my ($mustfields) = ""; $mustfields .= "AVP_FLAG_VENDOR |" if ($allmust =~ m/V/); $mustfields .= "AVP_FLAG_MANDATORY |" if ($allmust =~ m/M/); $mustfields =~ s/ \|$//; return $mustfields; } sub base_type($) { my ($type) = @_; return "AVP_TYPE_GROUPED" if ($type =~ m/Grouped/); return "AVP_TYPE_OCTETSTRING" if ($type =~ m/(Address|DiameterIdentity|DiameterURI|OctetString|IPFilterRule|Time|UTF8String)/); return "AVP_TYPE_INTEGER32" if ($type =~ m/Enumerated|Integer32/); return "AVP_TYPE_INTEGER64" if ($type =~ m/Integer64/); return "AVP_TYPE_UNSIGNED32" if ($type =~ m/Unsigned32/); return "AVP_TYPE_UNSIGNED64" if ($type =~ m/Unsigned64/); return "AVP_TYPE_FLOAT32" if ($type =~ m/Float32/); return "AVP_TYPE_FLOAT64" if ($type =~ m/Float64/); return "UNKNOWN TYPE: $type"; } sub print_insert($$) { my ($type, $name) = @_; my $avp_type; if ($type =~ m/(Grouped|OctetString|Integer32|Integer64|Unsigned32|Unsigned64|Float32|Float64)/) { $avp_type = "NULL"; } elsif ($type =~ m/Enumerated/) { print "\t\tstruct dict_object *type;\n"; print "\t\tstruct dict_type_data tdata = { AVP_TYPE_INTEGER32, \"" . ($vendor_name ? "$vendor_name/" : "") ."Enumerated($name)\", NULL, NULL, NULL };\n"; # XXX: add enumerated values print "\t\tCHECK_dict_new(DICT_TYPE, &tdata, NULL, &type);\n"; $avp_type = "type"; } else { $avp_type = "${type}_type"; } print "\t\tCHECK_dict_new(DICT_AVP, &data, $avp_type, NULL);\n"; } sub usage($) { die("usage: org_to_fd.pl [-V vendor_name -v vendor_code] [file ...]\n"); exit(@_); } getopts("V:v:") || usage(1); if (defined($opt_v)) { $vendor = $opt_v; if (!defined($opt_V)) { usage(1); } $vendor_name = $opt_V; } print "\t/* The following is created automatically. Do not modify. */\n"; print "\t/* Changes will be lost during the next update. Modify the source org file instead. */\n\n"; while (<>) { my ($dummy, $name, $code, $section, $type, $must, $may, $shouldnot, $mustnot, $encr) = split /\|/; next if ($name =~ m/Attribute Name/); if ($name =~ m/ # (.*)/) { print "\t/* $1 */\n"; next; } $name =~ s/ *//g; $code =~ s/ *//g; $type =~ s/ *//g; print "\t/* $name */\n\t{\n\t\tstruct dict_avp_data data = {\n"; print "\t\t\t$code,\t/* Code */\n"; print "\t\t\t$vendor,\t/* Vendor */\n"; print "\t\t\t\"$name\",\t/* Name */\n"; print "\t\t\t" . convert_must_to_flags("$must, $mustnot") . ",\t/* Fixed flags */\n"; print "\t\t\t" . convert_must_to_flags("$must") . ",\t/* Fixed flag values */\n"; print "\t\t\t" . base_type($type) . "\t/* base type of data */\n"; print "\t\t};\n"; print_insert($type, $name); print "\t};\n\n"; } nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/update_copyright.sh000077500000000000000000000020551333553357400244260ustar00rootroot00000000000000#!/bin/bash -x # This script will search all copyrights dates from source files, and update these if # the file has been modified at a later date. if [ ! -f include/freeDiameter/libfdcore.h ]; then echo "This script must be run from the source top directory" exit 1; fi; # Create a clean working copy TMPDIR=`mktemp -d up_cop.XXXXXXX` || exit 1 hg clone . $TMPDIR/fD || exit 1 pushd $TMPDIR/fD # Now, for each file with a copyright for SRC_FILE in `find . -name .hg -prune -or -type f -exec grep -q 'Copyright (c) 20.., WIDE Project and NICT' {} \; -print`; do HG_YEAR=`hg log --template '{date|shortdate}' $SRC_FILE | tr - ' ' | awk '{print \$1}'` CPY_YEAR=`grep 'Copyright (c) 20.., WIDE Project and NICT' $SRC_FILE | awk '{print substr(\$4, 1, 4) }'` if [ $HG_YEAR -gt $CPY_YEAR ]; then echo "Updating copyright $CPY_YEAR -> $HG_YEAR in $SRC_FILE"; sed -i -e "s/Copyright (c) $CPY_YEAR, WIDE Project and NICT/Copyright (c) $HG_YEAR, WIDE Project and NICT/" $SRC_FILE fi; done hg commit -m"Updated copyright information" hg push popd rm -rf $TMPDIR hg update nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/wireshark/000077500000000000000000000000001333553357400225125ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/wireshark/HOWTO000066400000000000000000000047351333553357400233460ustar00rootroot00000000000000 -------- FOREWORD -------- The patch in this folder allows Wireshark to process packets that contain TLS-protected Diameter messages over SCTP multi-stream associations. Each SCTP stream pairs is handled as a separate TLS channel (RFC3436), which is consistent with freeDiameter 1.0.x mechanism. It should be noted however that rfc3588bis (revised Diameter) recommends that DTLS is used instead of TLS over SCTP, for the reasons highlighted in the introduction of RFC6083. When this new mechanism is implemented in freeDiameter, a different patch will probably be required for wireshark. The instructions in this file will change your wireshark binary in a way suitable for analysis of Diameter over TLS over SCTP, but may have unexpected side-effects on some other protocols analysis (including DTLS). The instructions refer to Debian-style packaging (apt), you should adapt the process to build a new modified package of wireshark for your distribution. The provided patch has been successfully tested with: - wireshark-1.2.7 (Ubuntu Lucid) - wireshark-1.2.11 (Ubuntu Maverick) It may or may not work on more recent or ancient versions. ------------ INSTRUCTIONS ------------ The steps are: - get your wireshark source apt-get source wireshark cd wireshark-1.2.* - apply the patch cat ~/wireshark-1.2.7-diameter-tls.patch | patch -p1 - increase the version number dch -lfD "Added support for Diameter over TLS over SCTP" - Create a new package, this might take a while fakeroot debian/rules binary - Install the modified version sudo dpkg --install ../wireshark-common_*fD*.deb ../wireshark_*fD*.deb - Start the new wireshark: wireshark & To analyze a capture file, you will need the private keys of both peers involved. Let's imagine for example: peer A with IP address 192.168.0.10 has private key privA.pem peer B with IP address 192.168.0.11 has private key privB.pem In wireshark you must do the following: - go to menu Edit->Preferences - In the left panel, under Protocols, scroll to "SSL" and select it. - In the right panel, fill "RSA keys list" as follow: 192.168.0.10,3869,diameter,/absolute/path/to/privA.pem;192.168.0.11,3869,diameter,/absolute/path/to/privB.pem - You may find also useful to select an SSL debug file to get a hint of any problem. Once this configuration is complete, you should be able to see the contents of SCTP packets, including protected Diameter payload. Check the "sample" subdirectory for a test capture file. nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/wireshark/sample/000077500000000000000000000000001333553357400237735ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/wireshark/sample/192.168.103.10.priv.pem000066400000000000000000000015671333553357400270370ustar00rootroot00000000000000-----BEGIN RSA PRIVATE KEY----- MIICXAIBAAKBgQDMcXy2iVqcXkGaY44yNihVNzW/zHptqID49/ZyyyOinxHenvf9 o/fr613XvUuyquaapL99yiMPuLU3I1UxxacWBSAb496eGd7fY1Udw1RtqKCeb60c jpTc3zKySGPHtnzOxeSMDK/R6uqkFirF6Lnu18mKZyAwJtvFYnh0wK3SwwIDAQAB AoGAa6kX08hhPxcj1Pm4WBjNBJMeavJzRmwF/xYVYj43ddvuvR1Z2ugOFt7LfGDj DCOTbLx1Wvinng/W3kJtCtjbM3w3k5cuFJdJcURXda73IHSaJOHnBAw5RlvFCE79 12yKqGOBgy80gGHDlqnSIjISCGb/9wLcHYLccakekckPc4ECQQDubt5fWzN4wUwU yW+e/SO9Vz4j+FiIC2aZy2OM9XXt6cgh4v0hQ3l0sWVJ6lTvK17aD9LXE5rluAOI thnPZElFAkEA24GH8Po/+3K6A5d5Zh1+hwoMLbWrykQDWSOgtmaOtbAvezlolF8O W18pVdvyMJg3gUiCA/rHG+r+OBxa4sx4ZwJAH4c1jHJo2fzlbJI+Wk2q3iydIPCD 9GldhdSpM0h58Z3KQwDa6/0aIF4cwKtl08JuZnNVM+95ugqdHQTHYO8n6QJBAIgO m+KEWxBSpnX/d+IRuhGd6rqSdu8ihSjFaqJko2R+1o98oBQHb3C3ZXmwoUf5sb3S 4bPxx2TIndbNzI/zyVUCQGqN7eyoeTxtPD8P08lUGTUnC2n0imZ1mU5p8Bnv8gw5 lwt9qxuz0Ujr7uFPPu58bvGsYeoFUV23WRmS0rKLXv0= -----END RSA PRIVATE KEY----- nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/wireshark/sample/192.168.103.20.priv.pem000066400000000000000000000015731333553357400270350ustar00rootroot00000000000000-----BEGIN RSA PRIVATE KEY----- MIICXgIBAAKBgQDef8CrqawfvmCLBwmlPRlWjwB6V4TvVMRhivAYlwwFbUSoU5bm 2D780IBr3fNL3zP38ySa7r9cXxPgk7mbj3PhcJbI0Ix0AjQdFSB08AOXev4gqU8p qgEODFV04tnFhOcDysp77qH/DFuNwxd2xtFUbGKfGhroAssHxJuogOmiWQIDAQAB AoGAP6H7wVyCLIXu6HP3zzkdIQM+2L5k92mfzGHG7tFsD7VDWHyngJfB093xjGfq p/1KyJPSGTlEoy9R6P12rMWnFv7sYYKmPGfKdRUMxZYIXbplw6+L/gwW3MCiOMDD zRzRjknE3a+Mjo3e2XMHh6Z+GJ61megMeGInODP05/h66AECQQDyFhT+D8DVj1hp RlaYTFDKCmS9rgMQ+g4YyqMLzuakkKwaJwbCIlMbQortGBvY9I+0uZC4jklcOpnl YYcGIUEBAkEA60l5uAVBk6vKWKWX2cksBP/VlJM2B9pkvmlL7tPwJVEfoaAzZx4N rPpC9sOsFlX1ShpirAmIqmvY16in4xEJWQJBAOvULSEOcZjZapQrjEIS3gTkOR06 fgw0vDTUeh8PsEmSEcXsTL4jt/fvS+0KNl6UZ8Xzm5LeMYLiJ3d4GZQUIwECQQCb vYLoH/KMQMYrb1DYQ6TzmjRRqC+3ewP8Vc6BQ6BN0yjQ3y2nL+l1eiIhHNwn3LYE Wvq9TYI87C4YcfbPAlPhAkEA0bNU/Utgdbv/yT4lUmw+0toqFHkcT5s13RFWzNJU KdQ308kwz9rSDmuQ8eYzn5V02TioJKV4r0NZz+WcCyDY3A== -----END RSA PRIVATE KEY----- nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/wireshark/sample/README000066400000000000000000000041711333553357400246560ustar00rootroot00000000000000This folder contains an example capture file, as well as the two private keys required to decode the TLS-protected exchanges. In order to decrypt properly the packets, you'll need a patched wireshark (see parent directory) and the SSL "RSA Private Keys" properties set to (replace with real full path): 192.168.103.10,3869,diameter,freeDiameter/contrib/wireshark/sample/192.168.103.10.priv.pem;192.168.103.20,3869,diameter,freeDiameter/contrib/wireshark/sample/192.168.103.20.priv.pem This capture contains everything that was exchanged by the peer since it boot up. The captured peer is "relay.a.rt.freediameter.net" with IP address 192.168.103.20. Here is the detail of what you can see in the capture, if the decyphering works as expected, in chronological order: ----------------------------------------------------------------------------- Frames | Comments ----------------------------------------------------------------------------- 1-24 | Peer booting up: DHCP, NTP, ... | 25-29 | Connection attempt from 192.168.103.10 | first attempt on SCTP (frames 26-27) | then on TCP (frames 28-29) | 32-35 | freeDiameter starting: Diameter Identities | from the peer's configuration file are | DNS resolved. | 36-39 | SCTP connection to 192.168.103.10 | 40-45 | Failed attempt to connect to 192.168.103.30 | where freeDiameter was not started. | 46-49 | (I think this is trigged by Debug output, | I have to check) | 50-73 | TLS handshake on first stream pair (#0). | 74-90 | Resumed handshakes on streams #1 and #2 in parallel. | (not sure where to find that it is resumed, | except that certificates are not re-exchanged) | 91-92 | CER/CEA exchange. 93-96 | DWR/DWA exchange. | 103-118 | SCTP heartbeats are exchanged more frequently than DWR/DWA. | 119-124 | Concurrent DWR/DWA (it happens sometimes) | 125-128 | Another failed attempt to 192.168.103.30 (cf. frames 40-45) | 137-140 | DPR/DPA exchange. | 141-153 | TLS clean shutdown on all streams in parallel. | 154-157 | SCTP association is closed. ----------------------------------------------------------------------------- nextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/wireshark/sample/capture.cap000066400000000000000000000624301333553357400261300ustar00rootroot00000000000000ò$"M ZZ33'`$:N%{NN33'`:3 '&Q%VV'EH9DC452U'cSc52g relay7 w ,/y*&)^^'' <=EP@ggCD<652Ugg'cSc56g3:T`;gggrt.testbed.aaa&aVV'EH9DC4O52U'cSc56g2g relay7 w ,/y*&~ee'' <=EW@ggCDCiM52Ugg'cSc56g3:T`;gggrt.testbed.aaa relay&FF33'`: '''1**''gg'U4**'' <=' <=g'g'4JJ' <='E<@@gg5(E<ntpubuntucom':ZZ'' <=EL@@:gg58H<ntpubuntucom [^'ZZ' <='EL@@Y#g[^{{8=h+7(ZZ' <='EL@@Y#g[^{{8h* ˚(H ZZ33'`$ ':()LZZ' <='EL@@Y#g[^{{8h54*@ZZ' <='EL@@Y#g[^{{8Sh,{,*̤FF33'`: '',2**'' <=' <=gg,5**' <=''g' <=g.֤FF33'`: ''jwVV'EH9DC4hV՟ 'cSc52g relay7 w ,/y*jee'' <=EW@ggCDC4՟ gg'cSc56g3:T`;gggrt.testbed.aaa relayo**'' <=' <=ggo**' <=''g' <=gV **'+11''g'+11g RR''+11ED@@g gְ؈,$dA ann'+11'E`@.gg JLED@@g gְ؈,$dA EJJ''+11E<#@@3g guФP /66'+11'E(@@`gg uPn**''ggw**'' <=' <=g'gPP' <='EB@@6Bgg5.P,nasarttestbedaaaRR' <='ED@@6@ggV50]ݩproxyarttestbedaaa0``'' <=ER@@4gg5>,؅nasarttestbedaaa g Vbb'' <=ET@@2gg5V@ݩproxyarttestbedaaa g #RR'+11'ED@@gg 5$W$(R K%22''+11E$@@g g8}sɂ%CrS -"%ςldMrCg$,ajNm/ٸ?B]W,;8l$(R %'+11'E@@gg ɂ%e@ S -"%ςldMrCg$,ajNm/ٸ?B]W,;8l$(R :22''+11E$@@g g ;**''gg3?**''E'Eg'g?RR'E'ED@@gg[t57$?!_ @nn''EE`0@ggED@@gg[t57$?!_ xJJ'E'E<*@@ggR Ю  y66''EE(@@LggR!PzWW' <='EI @@62ggW55bGZ10103168192in-addrarpa yy'' <=Ek@@gg5WWMtZ10103168192in-addrarpa  nasarttestbedaaaγWW' <='EI@@6/ggx558H10103168192in-addrarpa Pyy'' <=Ek@@gg5xWeH10103168192in-addrarpa  nasarttestbedaaa'+11'E@@gg ɂ%~a(RLHMdl?Onx_bn;Mh)6:;93928f/5  >>''+11E0@@g gӹ(Rۯ$''+11E@@g g%_CrJFMdl8VI;UV*N 7U| q_eX2 Of+@Ypi/?''+11E@@@g gCTCs   00s0  *H 010U a.rt.testbed.aaa0 110222062900Z 210219062900Z010U nas.a.rt.testbed.aaa00  *H 0q|Z^Ac26(U75zmr#ޞ]׽K暤}#7#U1ŧ ޞcUTmo2HcǶ| *Ɋg 0&bxtZ0X0 U00 U0UWA`<'a--{&}0U#0~簔D^4l;TL0  *H uͅsBL"E&;Rj{fl vA葜Ro'ה Uo=sBO\`;Ϥ?J5*9:Uh,0ju.ߨEFT?pHy8fV)]aDk/ )M 80400  *H 010U rt.testbed.aaa0 110222062900Z 210219062900Z010U a.rt.testbed.aaa0"0  *H 0 7ǃl$w[ xxL+]Kz28|xSQ{Kv?X49ĺ'(B3K 歌PEjΧvi!zdUlv(_&R(/U§Yx(xsg[n10ש*C4{1XDE*$If7!y2AU{!fېϷ[)V`,: V曁#ziY{%R2!%00U~簔D^4l;TL0BU#;09}OiL4010U mgr.testbed.aaa0U00 U0  *H L/!96Bn^flp%g;u6'CENnj(S)@epn;j3UȼcrBneawk̊V`#\a0#v;(kr;nAbG6+x*EW>-/cGMi]xo:'(טɇ`M''+11E@@Tg gnJ9Cth~j=ڑ1aP|v@+3&H ۯ_ DotPbdJS?0;0#0  *H 010U mgr.testbed.aaa0 110222062900Z 210219062900Z010U rt.testbed.aaa0"0  *H 0 ¶cmעUxIf:JЉVS Ds/k%KǝUv<S]}eYH0aSp7) Qj Sdn"UPՆcyϲIFUs9_8;l3JAB\Ja16),xqZ4B << "?EѾ*-Ҝ`IM?4Y+Mܫm U=m00U}OiL40JU#C0Az ޑ, @010U mgr.testbed.aaa /10U00 U0  *H z 9MzfB+#毡gPr%5G+`h# 8Jry9ǁS79ݩ*%&ŝfwT~"U]l]r?yEy'1?")iB|0T2üg<b@R]03?%d?܂2feTE&;m9,Ċ/amO`D_;;PsxP~jo !>'+11'E0@@gg ɂ%Cr߱E>>'+11'E0@@gg ɂ%>wCt֖F>>'+11'E0@@gg ɂ%ǁYCvaIH>>'+11'E0@@gg ɂ%FCvcO'+11'E@@:gg ɂ%,(R   00u0  *H 010U a.rt.testbed.aaa0 110222062900Z 210219062900Z0!10U relay.a.rt.testbed.aaa00  *H 0` =VzWTa mDS>ЀkK3$\_spЌt4 tz O) Utń{ [vTlběYZ0X0 U00 U0U+J;Ij,0U#0~簔D^4l;TL0  *H 8`]4+X)z26Ҿm[En]LAR5'+rP,ٙ54XC;JSu !u7 1}(CmRĀzB.Rpͮx&];/P$\0?SqKP2C˜llU>:?&W 9QT|j3(uZZ.\ۭ!D"z:>SA]] :#"j,x80400  *H 010U rt.testbed.aaa0 110222062900Z 210219062900Z010U a.rt.testbed.aaa0"0  *H 0 7ǃl$w[ xxL+]Kz28|xSQ{Kv?X49ĺ'(B3K 歌PEjΧvi!zdUlv(_&R(/U§Yx(xsg[n10ש*C4{1XDE*$If7!y2AU{!fېϷ[)V`,: V曁#ziY{%R2!%00U~簔D^4l;TL0BU#;09}OiL4010U mgr.testbed.aaa0U00 U0  *H L/!96Bn^flp%g;u6'CENnj(S)@epn;j3UȼcrBneawk̊V`#\a0#v;(kr;nAbG6+x*EW>-/cGMi]xo:'(טɇ`O'+11'E@@Igg ɂ%<(Rh~j=ڑ1aP|v@+3&H ۯ_ DotPbdJS?0;0#0  *H 010U mgr.testbed.aaa0 110222062900Z 210219062900Z010U rt.testbed.aaa0"0  *H 0 ¶cmעUxIf:JЉVS Ds/k%KǝUv<S]}eYH0aSp7) Qj Sdn"UPՆcyϲIFUs9_8;l3JAB\Ja16),xqZ4B << "?EѾ*-Ҝ`IM?4Y+Mܫm U=m00U}OiL40JU#C0Az ޑ, @010U mgr.testbed.aaa /10U00 U0  *H z 9MzfB+#毡gPr%5G+`h# 8Jry9ǁS79ݩ*%&ŝfwT~"U]l]r?yEy'1?")iB|0T2üg<b@R]03?%d?܂2feTE&;m9,Ċ/amO`D_;;PsxP~jo !>''+11E0@@g g;(RQ>>''+11E0@@g gh (RIX'+11'E@@Dgg ɂ%Sv(R kqlpQ1z'H3 qMkxTRY[.x#̔xE}1[(p'+11'E @@Cgg ɂ%F{(Rom >< c&a^J!g#fZ*&9>d:* 8obzquQ k>zZ͉KYto}8K q>>''+11E0@@g gG[ (Ru'qFF'+11'E8 @@gg ɂ%6(Rk'+11'E @@Egg ɂ%|(R`4=``澱ałB ݯ\$^51jc%2.`gB-nPC>FS%CP Rt@5=vw-ywg}"%?_):o2$4kރ/h U>>''+11E0@@g g_?(Ru FF''+11E8@@g ghiiCw66''+11E(@@g g CxF)fd6'ƺWA~T4Au4zBgMk/cZ:^SՀjˇ֞𖃉Br'vﻼ0d MVϕbVf6*@ %B:t,q6v'aQJxqP}_5ydRfe*{1,*U{NW0>0#0tϽb葼vj5] Qg/(n"/&wv2<3a) >>'+11'E0 @@gg ɂ%MyNCxA'+11'E @@Wgg ɂ%'Z(RlhMdlyYB]_Y q_eX2 Of+@Ypi3928f/5  C''+11E@@xg g]J(R_CyJFMdl`+^Tgk£U/ q_eX2 Of+@Ypi/&D'+11'E@@Vgg ɂ%](RlhMdlp< P}ڜg- q_eX2 Of+@Ypi3928f/5  EDFF''+11E8@@g gPCzD>>'+11'E0@@gg ɂ%,|Cz@L''+11E@@xg g(R_C{JFMdlh,%D\kf?lFlF,SH q_eX2 Of+@Ypi/MFF''+11E8@@g g`!=C|jO>>'+11'E0@@gg ɂ%~OC|Q''+11E@@pg gkn$^uC}`Q˚Jz{n{SuD!(.{DԂC7I#BX"03{̯XJ1;|z2c3GvOk)O?xG>F̈ExR''+11E@@0g gYTI C~i61$O=+?j /(1) ԵpdB`-#kYAq 7Op(!uvt_Z㍲K>?fCdh[1B͉>B><0x[yKj\i8R>>'+11'E0@@gg ɂ%oC~ޡnFF'+11'E8@@gg ɂ%{z(RLp'+11'E@@ gg ɂ%}^5(R)\0.؞uFVB,Vxy?J l25̧NR$ r'BC<Lw ]1m|KZ_G1=8Hyx3 /1!tM.KrLG)NxL4ژJ(@=S$yMDOxq>>''+11E0@@g g3(REptFF'+11'E8@@gg ɂ%QsA(R u'+11'E@@gg ɂ%'-(R >#x{%&Ę%2ЉJ VMyafWOP?FrYxgnL˘_k A!jqOG{~",TN>ؠ P{HǶhXbgFNQ1<F:pv>>''+11E0@@g g[Y(R +ǥvv'+11'Eh@@gg ɂ%ҖE(R 0G3)=R 9/DE忭T~] )M䦿kg-#ҒjۉDF{ZL -|1 YgJzIiם{R*gCK_= /I >LIyn`K/N3 ZNR6A jN(Ʀ79%I%^ʌaHҁcD7ȃwy5h| FdHTs?1srfI 8&&''+11E@@g g`@I(R CНb0E2m*&r.Sv~LɎ"[NA?ywYؒṔ^xH5ht'*FIUԳnE2mZ zϝu'o4I6ڭG넛v%HYlxPI}w*4n3}wLrRNĴOURmR6up,,"^kȓ 9 Fo;C\oЙ2zGxVSii[&.>P=tWEwf5Jj {C0̡vxWC0׭0juvb=-US7CH,+WH+:-luPQ'c[|Hٛ@TCubTx?' -\o`pLTQ-SFLc$/Irۛ5,5@M"2+h`+ZW15ŀU''+11E@@@g gϬC^}_l2PvzM_x8fQ U 7n?x'u: ȍ.-wmڽ*.8GqLc^閠pY^;i*bW|2-O0t;ڿuh74w| &/+/QƑˍkUH>>'+11'E0@@gg ɂ%eCݖ|'+11'Ex@@xgg ɂ%STU(R @bY }l?D(ڢDb)vd' 09v7c !l(#'V"`TaòTL:6ޕ8ϥiyk0)C5$?yGdjur :5˨\}X@C*mF(E '$$Ixn w/&,7惴-0+WΔ2l̯_I(O(Ⱥ> OEȩ"\0o[(H4w)>>''+11E0@@g g>z(R 2 **'+11''gg **''+11'+11g 'g**'' <=' <=gg]**' <=''g' <=g **''E'Egg**'E''g'EgN^^''+11EP@@g g.n0,g)8ٖVvO^^'+11'EP@@gg ɂ%\0,g)8ٖV^^'+11'EP@@gg ɂ%f3g0,g ؘeV^^''+11EP@@g gw0,g ؘeC^^'+11'EP@@gg ɂ% 0,g ؘe^^''+11EP@@g g 0,g ؘe^^''+11EP@@g gF(0,g)8ٖV^^'+11'EP@@gg ɂ%s0,g)8ٖV ^^'+11'EP@@gg ɂ%0,g ,ؘe ^^''+11EP@@g gt't0,g ,ؘe& ^^''+11EP@@g g'@0,g)8ٖV ^^'+11'EP@@gg ɂ%#0,g)8ٖV ^^'+11'EP@@gg ɂ%oH0,g ؘe ^^''+11EP@@g gn#0,g ؘe e^^''+11EP@@g gT0,g)8ٖV n^^'+11'EP @@gg ɂ%Z 0,g)8ٖV X ''+11E@@Pg g PC6 ;B'֘ >蝗# X/,i;k!zh/Jjz pJ]TgF fc [ݓ \E>S* ^ '+11'E"@@gg ɂ%ET(RrcVbs?o|]WcQ=bˮ5cۚ(ܭ~i3($!Y_DG a匏5䆥MFag-]?ߢ#qc ?K* '(2,V[ /CFɥLeq\ÌX㱗F#<8R*lcƲ DUj@&4L: \c >>''+11E0@@g g2(R+ e ''+11E@@@g giCfX(iԁwrSup >\qo]U@N9&LWNR}uEŃ^ZX$.X6]wco1uҼjiq,h3&!K25*LzG7z>?;ENQ+ of >>'+11'E0#@@gg ɂ%}%^Cݖ mRR'E'ED@@ggڤ7K$rQH;w  unn''EE`0@ggkED@@ggڤ7K$rQH;w  JJ'E'E<#@@IggS'a ' ƒ66''EE(@@LggSPz%5**'+11''gg **''+11'+11g 'g^^'+11'EP$@@gg ɂ%0,g ؘe^^''+11EP@@g gk0,g ؘe$ ^^''+11EP@@g g:0,gi)8ٖV ^^'+11'EP%@@gg ɂ%k0,gi)8ٖVk**'E''gg`o**''E'Eg'g ''+11E@@pg gDVuC`O9Űfehzm.+&|0^jڻ'[)oYdWZwIϼƥ{ɸ~e{9}B{14]Z< f22,܆H;Z.7!Ue\ޯش ؆|UomMhc9i7~\kn!5 "jKR&?4ɿw4BɰoT&47 * B UrOMhT 1绮kϸtie !?c`#&AOG'K.=5o(lhiSIN5D/ '+11'E&@@gg ɂ%o(Rb6z؈ff!(EZdB$:kW> B/J#"!o߈fn‰-bn~GU4Ƒ @5/ 槓pr{E>>'+11'E0'@@gg ɂ%LCݖ->>''+11E0@@g gzs(R+ '+11'E(@@gg ɂ%|(R FyuN~N~W,yVRZICǘx9N0Ӕz>''+11E0@@g g^(R ''+11Ex@@g g;9*(REC 0ϣ(r$'Ί=n+OF,qvsG2 n VV''+11EH@@g g$%C%*o{5ۤ:%sm> $=z,a;iO^3]kI:=vGn3,c[jڶS ާMsBz Ce߈RoLQav| Um(VZwfohUs+xZV쮸\UKV(ܘ맦>UN_sB[)n&nDQ;Q3|@mz;)ag0U<a= cUqHm8B`%ϻ{- ''+11E@@pg gu@uC`R]ӆSbfduLQ!5 2Lkfdd ƥG< $wXk,&1Vޗi+N;ۑUE3 >>'+11'E0+@@gg ɂ%ECݖH '+11'E,@@gg ɂ%j(Rˠ!Cϰ5-^N YɵAj KX{^R{8Pl +,|Ȝ?-J.c79ѹH63r>ѓ۝)ro3HZ'~lGQyyx_'yB/^F?\T* >AS+U9dYnP`~̽棙}l0=N >>''+11E0@@g g_ȷ(RB>>'+11'E0/@@gg ɂ%7CݖQ66''+11E(@@g g$l(RY22'+11'E$0@@gg ɂ%l>>''+11E0@@g g̉C(RAl22''+11E$@@g gxrnextepc-0.3.10/lib/freeDiameter-1.2.1/contrib/wireshark/wireshark-1.2.7-diameter-tls.patch000066400000000000000000000622371333553357400305770ustar00rootroot00000000000000diff -Nur wireshark-1.2.7/epan/conversation.c wireshark-1.2.7-fD/epan/conversation.c --- wireshark-1.2.7/epan/conversation.c 2010-04-01 01:44:39.000000000 +0900 +++ wireshark-1.2.7-fD/epan/conversation.c 2011-02-23 14:26:35.000000000 +0900 @@ -40,6 +40,11 @@ static GHashTable *conversation_hashtable_exact = NULL; /* + * Hash table for conversations without strid. + */ +static GHashTable *conversation_hashtable_no_strid = NULL; + +/* * Hash table for conversations with one wildcard address. */ static GHashTable *conversation_hashtable_no_addr2 = NULL; @@ -63,6 +68,7 @@ port_type ptype; guint32 port1; guint32 port2; + guint32 strid; } conversation_key; #endif /* @@ -193,6 +199,7 @@ hash_val += key->port1; ADD_ADDRESS_TO_HASH(hash_val, &key->addr2); hash_val += key->port2; + hash_val += key->strid; return hash_val; } @@ -217,6 +224,78 @@ */ if (v1->port1 == v2->port1 && v1->port2 == v2->port2 && + v1->strid == v2->strid && + ADDRESSES_EQUAL(&v1->addr1, &v2->addr1) && + ADDRESSES_EQUAL(&v1->addr2, &v2->addr2)) { + /* + * Yes. It's the same conversation, and the two + * address/port pairs are going in the same direction. + */ + return 1; + } + + /* + * Is the first port 2 the same as the second port 1, the first + * port 1 the same as the second port 2, the first address 2 + * the same as the second address 1, and the first address 1 + * the same as the second address 2? + */ + if (v1->port2 == v2->port1 && + v1->port1 == v2->port2 && + v1->strid == v2->strid && + ADDRESSES_EQUAL(&v1->addr2, &v2->addr1) && + ADDRESSES_EQUAL(&v1->addr1, &v2->addr2)) { + /* + * Yes. It's the same conversation, and the two + * address/port pairs are going in opposite directions. + */ + return 1; + } + + /* + * The addresses or the ports don't match. + */ + return 0; +} + +/* + * Compute the hash value for two given address/port pairs if the match + * has a wildcard stream id. + */ +static guint +conversation_hash_no_strid(gconstpointer v) +{ + const conversation_key *key = (const conversation_key *)v; + guint hash_val; + + hash_val = 0; + ADD_ADDRESS_TO_HASH(hash_val, &key->addr1); + hash_val += key->port1; + hash_val += key->port2; + + return hash_val; +} + +/* + * Compare two conversation keys, except for the stream id value. + */ +static gint +conversation_match_no_strid(gconstpointer v, gconstpointer w) +{ + const conversation_key *v1 = (const conversation_key *)v; + const conversation_key *v2 = (const conversation_key *)w; + + if (v1->ptype != v2->ptype) + return 0; /* different types of port */ + + /* + * Are the first and second port 1 values the same, the first and + * second port 2 values the same, the first and second address + * 1 values the same, and the first and second address 2 values + * the same? + */ + if (v1->port1 == v2->port1 && + v1->port2 == v2->port2 && ADDRESSES_EQUAL(&v1->addr1, &v2->addr1) && ADDRESSES_EQUAL(&v1->addr2, &v2->addr2)) { /* @@ -263,6 +342,7 @@ ADD_ADDRESS_TO_HASH(hash_val, &key->addr1); hash_val += key->port1; hash_val += key->port2; + hash_val += key->strid; return hash_val; } @@ -289,6 +369,7 @@ */ if (v1->port1 == v2->port1 && v1->port2 == v2->port2 && + v1->strid == v2->strid && ADDRESSES_EQUAL(&v1->addr1, &v2->addr1)) { /* * Yes. It's the same conversation, and the two @@ -317,6 +398,7 @@ ADD_ADDRESS_TO_HASH(hash_val, &key->addr1); hash_val += key->port1; ADD_ADDRESS_TO_HASH(hash_val, &key->addr2); + hash_val += key->strid; return hash_val; } @@ -342,6 +424,7 @@ * address 2 values the same? */ if (v1->port1 == v2->port1 && + v1->strid == v2->strid && ADDRESSES_EQUAL(&v1->addr1, &v2->addr1) && ADDRESSES_EQUAL(&v1->addr2, &v2->addr2)) { /* @@ -370,6 +453,7 @@ hash_val = 0; ADD_ADDRESS_TO_HASH(hash_val, &key->addr1); hash_val += key->port1; + hash_val += key->strid; return hash_val; } @@ -394,6 +478,7 @@ * and second address 1 values the same? */ if (v1->port1 == v2->port1 && + v1->strid == v2->strid && ADDRESSES_EQUAL(&v1->addr1, &v2->addr1)) { /* * Yes. It's the same conversation, and the two @@ -420,6 +505,8 @@ conversation_keys = NULL; if (conversation_hashtable_exact != NULL) g_hash_table_destroy(conversation_hashtable_exact); + if (conversation_hashtable_no_strid != NULL) + g_hash_table_destroy(conversation_hashtable_no_strid); if (conversation_hashtable_no_addr2 != NULL) g_hash_table_destroy(conversation_hashtable_no_addr2); if (conversation_hashtable_no_port2 != NULL) @@ -438,6 +525,9 @@ conversation_hashtable_exact = g_hash_table_new(conversation_hash_exact, conversation_match_exact); + conversation_hashtable_no_strid = + g_hash_table_new(conversation_hash_no_strid, + conversation_match_no_strid); conversation_hashtable_no_addr2 = g_hash_table_new(conversation_hash_no_addr2, conversation_match_no_addr2); @@ -466,6 +556,15 @@ conversation_new(guint32 setup_frame, address *addr1, address *addr2, port_type ptype, guint32 port1, guint32 port2, guint options) { + return conversation_new_ext(setup_frame, addr1, addr2, ptype, + port1, port2, options & ~(DISTINCT_SCTP_STREAMID), 0); + +} + +conversation_t * +conversation_new_ext(guint32 setup_frame, address *addr1, address *addr2, port_type ptype, + guint32 port1, guint32 port2, guint options, guint16 strid) +{ /* DISSECTOR_ASSERT(!(options | CONVERSATION_TEMPLATE) || ((options | (NO_ADDR2 | NO_PORT2 | NO_PORT2_FORCE))) && "A conversation template may not be constructed without wildcard options"); @@ -486,7 +585,11 @@ if (options & (NO_PORT2|NO_PORT2_FORCE)) { hashtable = conversation_hashtable_no_port2; } else { - hashtable = conversation_hashtable_exact; + if (options & DISTINCT_SCTP_STREAMID) { + hashtable = conversation_hashtable_exact; + } else { + hashtable = conversation_hashtable_no_strid; + } } } @@ -495,6 +598,7 @@ existing_key.ptype = ptype; existing_key.port1 = port1; existing_key.port2 = port2; + existing_key.strid = strid; conversation = g_hash_table_lookup(hashtable, &existing_key); tc = conversation; /* Remember if lookup was successful */ @@ -507,6 +611,7 @@ new_key->ptype = ptype; new_key->port1 = port1; new_key->port2 = port2; + new_key->strid = strid; if (conversation) { for (; conversation->next; conversation = conversation->next) @@ -568,8 +673,13 @@ g_hash_table_insert(conversation_hashtable_no_addr2, conv->key_ptr, conv); } else { - g_hash_table_insert(conversation_hashtable_exact, - conv->key_ptr, conv); + if (conv->options & DISTINCT_SCTP_STREAMID) { + g_hash_table_insert(conversation_hashtable_exact, + conv->key_ptr, conv); + } else { + g_hash_table_insert(conversation_hashtable_no_strid, + conv->key_ptr, conv); + } } } @@ -602,18 +712,23 @@ g_hash_table_insert(conversation_hashtable_no_port2, conv->key_ptr, conv); } else { - g_hash_table_insert(conversation_hashtable_exact, - conv->key_ptr, conv); + if (conv->options & DISTINCT_SCTP_STREAMID) { + g_hash_table_insert(conversation_hashtable_exact, + conv->key_ptr, conv); + } else { + g_hash_table_insert(conversation_hashtable_no_strid, + conv->key_ptr, conv); + } } } /* * Search a particular hash table for a conversation with the specified - * {addr1, port1, addr2, port2} and set up before frame_num. + * {addr1, port1, addr2, port2, strid} and set up before frame_num. */ static conversation_t * conversation_lookup_hashtable(GHashTable *hashtable, guint32 frame_num, address *addr1, address *addr2, - port_type ptype, guint32 port1, guint32 port2) + port_type ptype, guint32 port1, guint32 port2, guint16 strid) { conversation_t* conversation; conversation_t* match; @@ -628,6 +743,7 @@ key.ptype = ptype; key.port1 = port1; key.port2 = port2; + key.strid = strid; match = g_hash_table_lookup(hashtable, &key); @@ -685,12 +801,19 @@ find_conversation(guint32 frame_num, address *addr_a, address *addr_b, port_type ptype, guint32 port_a, guint32 port_b, guint options) { + return find_conversation_ext(frame_num, addr_a, addr_b, ptype, + port_a, port_b, options | IGNORE_SCTP_STREAMID, 0); +} +conversation_t * +find_conversation_ext(guint32 frame_num, address *addr_a, address *addr_b, port_type ptype, + guint32 port_a, guint32 port_b, guint options, guint16 strid) +{ conversation_t *conversation; /* - * First try an exact match, if we have two addresses and ports. + * First try an exact match, if we have two addresses and ports and strid. */ - if (!(options & (NO_ADDR_B|NO_PORT_B))) { + if (!(options & (NO_ADDR_B|NO_PORT_B|IGNORE_SCTP_STREAMID))) { /* * Neither search address B nor search port B are wildcarded, * start out with an exact match. @@ -699,7 +822,7 @@ conversation = conversation_lookup_hashtable(conversation_hashtable_exact, frame_num, addr_a, addr_b, ptype, - port_a, port_b); + port_a, port_b, strid); if ((conversation == NULL) && (addr_a->type == AT_FC)) { /* In Fibre channel, OXID & RXID are never swapped as * TCP/UDP ports are in TCP/IP. @@ -707,7 +830,33 @@ conversation = conversation_lookup_hashtable(conversation_hashtable_exact, frame_num, addr_b, addr_a, ptype, - port_a, port_b); + port_a, port_b, strid); + } + if (conversation != NULL) + return conversation; + } + + /* + * Then, ignoring strid try an exact match, if we have two addresses and ports. + */ + if (!(options & (NO_ADDR_B|NO_PORT_B|NO_IGNORE_SCTP_STREAMID))) { + /* + * Neither search address B nor search port B are wildcarded, + * start out with an exact match. + * Exact matches check both directions. + */ + conversation = + conversation_lookup_hashtable(conversation_hashtable_no_strid, + frame_num, addr_a, addr_b, ptype, + port_a, port_b, strid); + if ((conversation == NULL) && (addr_a->type == AT_FC)) { + /* In Fibre channel, OXID & RXID are never swapped as + * TCP/UDP ports are in TCP/IP. + */ + conversation = + conversation_lookup_hashtable(conversation_hashtable_no_strid, + frame_num, addr_b, addr_a, ptype, + port_a, port_b, strid); } if (conversation != NULL) return conversation; @@ -729,7 +878,7 @@ */ conversation = conversation_lookup_hashtable(conversation_hashtable_no_addr2, - frame_num, addr_a, addr_b, ptype, port_a, port_b); + frame_num, addr_a, addr_b, ptype, port_a, port_b, strid); if ((conversation == NULL) && (addr_a->type == AT_FC)) { /* In Fibre channel, OXID & RXID are never swapped as * TCP/UDP ports are in TCP/IP. @@ -737,7 +886,7 @@ conversation = conversation_lookup_hashtable(conversation_hashtable_no_addr2, frame_num, addr_b, addr_a, ptype, - port_a, port_b); + port_a, port_b, strid); } if (conversation != NULL) { /* @@ -779,7 +928,7 @@ if (!(options & NO_ADDR_B)) { conversation = conversation_lookup_hashtable(conversation_hashtable_no_addr2, - frame_num, addr_b, addr_a, ptype, port_b, port_a); + frame_num, addr_b, addr_a, ptype, port_b, port_a, strid); if (conversation != NULL) { /* * If this is for a connection-oriented @@ -821,14 +970,14 @@ */ conversation = conversation_lookup_hashtable(conversation_hashtable_no_port2, - frame_num, addr_a, addr_b, ptype, port_a, port_b); + frame_num, addr_a, addr_b, ptype, port_a, port_b, strid); if ((conversation == NULL) && (addr_a->type == AT_FC)) { /* In Fibre channel, OXID & RXID are never swapped as * TCP/UDP ports are in TCP/IP */ conversation = conversation_lookup_hashtable(conversation_hashtable_no_port2, - frame_num, addr_b, addr_a, ptype, port_a, port_b); + frame_num, addr_b, addr_a, ptype, port_a, port_b, strid); } if (conversation != NULL) { /* @@ -870,7 +1019,7 @@ if (!(options & NO_PORT_B)) { conversation = conversation_lookup_hashtable(conversation_hashtable_no_port2, - frame_num, addr_b, addr_a, ptype, port_b, port_a); + frame_num, addr_b, addr_a, ptype, port_b, port_a, strid); if (conversation != NULL) { /* * If this is for a connection-oriented @@ -907,7 +1056,7 @@ */ conversation = conversation_lookup_hashtable(conversation_hashtable_no_addr2_or_port2, - frame_num, addr_a, addr_b, ptype, port_a, port_b); + frame_num, addr_a, addr_b, ptype, port_a, port_b, strid); if (conversation != NULL) { /* * If this is for a connection-oriented protocol: @@ -952,11 +1101,11 @@ if (addr_a->type == AT_FC) conversation = conversation_lookup_hashtable(conversation_hashtable_no_addr2_or_port2, - frame_num, addr_b, addr_a, ptype, port_a, port_b); + frame_num, addr_b, addr_a, ptype, port_a, port_b, strid); else conversation = conversation_lookup_hashtable(conversation_hashtable_no_addr2_or_port2, - frame_num, addr_b, addr_a, ptype, port_b, port_a); + frame_num, addr_b, addr_a, ptype, port_b, port_a, strid); if (conversation != NULL) { /* * If this is for a connection-oriented protocol, set the diff -Nur wireshark-1.2.7/epan/conversation.h wireshark-1.2.7-fD/epan/conversation.h --- wireshark-1.2.7/epan/conversation.h 2010-04-01 01:44:39.000000000 +0900 +++ wireshark-1.2.7-fD/epan/conversation.h 2011-02-23 14:25:44.000000000 +0900 @@ -39,11 +39,13 @@ * TEMPLATE flag will be altered once the first connections (connection * oriented protocols only) to include the newly found information which * matched the wildcard options. + * DISTINCT_SCTP_STREAMID will also save the SCTP stream identifier, if any. */ #define NO_ADDR2 0x01 #define NO_PORT2 0x02 #define NO_PORT2_FORCE 0x04 #define CONVERSATION_TEMPLATE 0x08 +#define DISTINCT_SCTP_STREAMID 0x10 /* * Flags to pass to "find_conversation()" to indicate that the address B @@ -51,6 +53,8 @@ */ #define NO_ADDR_B 0x01 #define NO_PORT_B 0x02 +#define IGNORE_SCTP_STREAMID 0x04 +#define NO_IGNORE_SCTP_STREAMID 0x08 #include "packet.h" /* for conversation dissector type */ @@ -64,6 +68,7 @@ port_type ptype; guint32 port1; guint32 port2; + guint16 strid; } conversation_key; typedef struct conversation { @@ -85,6 +90,13 @@ extern conversation_t *find_conversation(guint32 frame_num, address *addr_a, address *addr_b, port_type ptype, guint32 port_a, guint32 port_b, guint options); +/* for SCTP stream */ +extern conversation_t *conversation_new_ext(guint32 setup_frame, address *addr1, address *addr2, + port_type ptype, guint32 port1, guint32 port2, guint options, guint16 strid); +extern conversation_t *find_conversation_ext(guint32 frame_num, address *addr_a, address *addr_b, + port_type ptype, guint32 port_a, guint32 port_b, guint options, guint16 strid); + + extern void conversation_add_proto_data(conversation_t *conv, int proto, void *proto_data); extern void *conversation_get_proto_data(conversation_t *conv, int proto); diff -Nur wireshark-1.2.7/epan/dissectors/packet-diameter.c wireshark-1.2.7-fD/epan/dissectors/packet-diameter.c --- wireshark-1.2.7/epan/dissectors/packet-diameter.c 2010-04-01 01:44:21.000000000 +0900 +++ wireshark-1.2.7-fD/epan/dissectors/packet-diameter.c 2011-02-23 13:33:10.000000000 +0900 @@ -63,8 +63,10 @@ #include "packet-ntp.h" #include "packet-diameter.h" #include "diam_dict.h" +#include "packet-ssl.h" #define SCTP_PORT_DIAMETER 3868 +#define SCTP_TLS_PORT_DIAMETER 3869 /* Diameter Header Flags */ /* RPETrrrrCCCCCCCCCCCCCCCCCCCCCCCC */ @@ -271,10 +273,13 @@ static guint gbl_diameterSctpPort=SCTP_PORT_DIAMETER; +static guint gbl_diameterSctpTlsPort=SCTP_TLS_PORT_DIAMETER; static dissector_handle_t diameter_tcp_handle; static range_t *global_diameter_tcp_port_range; +static range_t *global_diameter_tcp_tls_port_range; #define DEFAULT_DIAMETER_PORT_RANGE "3868" +#define DEFAULT_DIAMETER_TLS_PORT_RANGE "3869" /* desegmentation of Diameter over TCP */ static gboolean gbl_diameter_desegment = TRUE; @@ -1358,13 +1363,27 @@ dissector_add("tcp.port", port, diameter_tcp_handle); } +static void +range_delete_callback_sec(guint32 port) +{ + ssl_dissector_delete(port, "diameter", TRUE); +} + +static void +range_add_callback_sec(guint32 port) +{ + ssl_dissector_add(port, "diameter", TRUE); +} + void proto_reg_handoff_diameter(void) { static gboolean Initialized=FALSE; static guint SctpPort; + static guint SctpsPort; static dissector_handle_t diameter_handle; static range_t *diameter_tcp_port_range; + static range_t *diameters_tcp_port_range; if (!Initialized) { diameter_handle = find_dissector("diameter"); @@ -1382,20 +1401,27 @@ /* AVP Code: 463 EAP-Reissued-Payload */ dissector_add("diameter.base", 463, new_create_dissector_handle(dissect_diameter_eap_payload, proto_diameter)); + + /* set port for future deletes */ + diameter_tcp_port_range = range_copy(global_diameter_tcp_port_range); + range_foreach(diameter_tcp_port_range, range_add_callback); + diameters_tcp_port_range = range_copy(global_diameter_tcp_tls_port_range); + range_foreach(diameters_tcp_port_range, range_add_callback_sec); + + dissector_add("sctp.port", gbl_diameterSctpPort, diameter_handle); + ssl_dissector_add(gbl_diameterSctpTlsPort, "diameter", TRUE); Initialized=TRUE; } else { range_foreach(diameter_tcp_port_range, range_delete_callback); g_free(diameter_tcp_port_range); + range_foreach(diameters_tcp_port_range, range_delete_callback_sec); + g_free(diameters_tcp_port_range); dissector_delete("sctp.port", SctpPort, diameter_handle); } - /* set port for future deletes */ - diameter_tcp_port_range = range_copy(global_diameter_tcp_port_range); - range_foreach(diameter_tcp_port_range, range_add_callback); - SctpPort=gbl_diameterSctpPort; - dissector_add("sctp.port", gbl_diameterSctpPort, diameter_handle); + } /* registration with the filtering engine */ @@ -1543,8 +1569,9 @@ diameter_dissector_table = register_dissector_table("diameter.base", "DIAMETER_3GPP_AVPS", FT_UINT32, BASE_DEC); diameter_3gpp_avp_dissector_table = register_dissector_table("diameter.3gpp", "DIAMETER_3GPP_AVPS", FT_UINT32, BASE_DEC); - /* Set default TCP ports */ + /* Set default TCP & TLS ports */ range_convert_str(&global_diameter_tcp_port_range, DEFAULT_DIAMETER_PORT_RANGE, MAX_UDP_PORT); + range_convert_str(&global_diameter_tcp_tls_port_range, DEFAULT_DIAMETER_TLS_PORT_RANGE, MAX_UDP_PORT); /* Register configuration options for ports */ diameter_module = prefs_register_protocol(proto_diameter, diff -Nur wireshark-1.2.7/epan/dissectors/packet-sctp.c wireshark-1.2.7-fD/epan/dissectors/packet-sctp.c --- wireshark-1.2.7/epan/dissectors/packet-sctp.c 2010-04-01 01:44:28.000000000 +0900 +++ wireshark-1.2.7-fD/epan/dissectors/packet-sctp.c 2011-02-23 13:54:13.000000000 +0900 @@ -2693,6 +2693,7 @@ b_bit = tvb_get_guint8(chunk_tvb, CHUNK_FLAGS_OFFSET) & SCTP_DATA_CHUNK_B_BIT; u_bit = tvb_get_guint8(chunk_tvb, CHUNK_FLAGS_OFFSET) & SCTP_DATA_CHUNK_U_BIT; stream_id = tvb_get_ntohs(chunk_tvb, DATA_CHUNK_STREAM_ID_OFFSET); + pinfo->strid = stream_id; stream_seq_num = tvb_get_ntohs(chunk_tvb, DATA_CHUNK_STREAM_SEQ_NUMBER_OFFSET); tsn = tvb_get_ntohl(chunk_tvb, DATA_CHUNK_TSN_OFFSET); diff -Nur wireshark-1.2.7/epan/dissectors/packet-ssl.c wireshark-1.2.7-fD/epan/dissectors/packet-ssl.c --- wireshark-1.2.7/epan/dissectors/packet-ssl.c 2010-04-01 01:44:34.000000000 +0900 +++ wireshark-1.2.7-fD/epan/dissectors/packet-ssl.c 2011-02-23 14:56:36.000000000 +0900 @@ -500,6 +500,7 @@ guint* conv_version; Ssl_private_key_t * private_key; guint32 port; + guint16 strid; ti = NULL; ssl_tree = NULL; @@ -507,9 +508,14 @@ first_record_in_frame = TRUE; ssl_session = NULL; port = 0; + strid = 0; ssl_debug_printf("\ndissect_ssl enter frame #%u (%s)\n", pinfo->fd->num, (pinfo->fd->flags.visited)?"already visited":"first time"); + + if (pinfo->ptype == PT_SCTP) { + ssl_debug_printf("\ndissect_ssl SCTP stream %hd\n", pinfo->strid); + } /* Track the version using conversations to reduce the * chance that a packet that simply *looks* like a v2 or @@ -523,14 +529,14 @@ * the conv_version, must set the copy in the conversation * in addition to conv_version */ - conversation = find_conversation(pinfo->fd->num, &pinfo->src, &pinfo->dst, pinfo->ptype, - pinfo->srcport, pinfo->destport, 0); + conversation = find_conversation_ext(pinfo->fd->num, &pinfo->src, &pinfo->dst, pinfo->ptype, + pinfo->srcport, pinfo->destport, NO_IGNORE_SCTP_STREAMID, pinfo->strid); if (!conversation) { /* create a new conversation */ - conversation = conversation_new(pinfo->fd->num, &pinfo->src, &pinfo->dst, pinfo->ptype, - pinfo->srcport, pinfo->destport, 0); + conversation = conversation_new_ext(pinfo->fd->num, &pinfo->src, &pinfo->dst, pinfo->ptype, + pinfo->srcport, pinfo->destport, (pinfo->ptype == PT_SCTP) ? DISTINCT_SCTP_STREAMID : 0, pinfo->strid); ssl_debug_printf(" new conversation = %p created\n", (void *)conversation); } conv_data = conversation_get_proto_data(conversation, proto_ssl); @@ -549,7 +555,7 @@ conversation_add_proto_data(conversation, proto_ssl, ssl_session); /* we need to know which side of the conversation is speaking */ - if (ssl_packet_from_server(ssl_associations, pinfo->srcport, pinfo->ptype == PT_TCP)) { + if (ssl_packet_from_server(ssl_associations, pinfo->srcport, pinfo->ptype != PT_UDP)) { dummy.addr = pinfo->src; dummy.port = port = pinfo->srcport; } else { @@ -762,7 +768,7 @@ * add decrypted data to this packet info */ ssl_debug_printf("decrypt_ssl3_record: app_data len %d ssl, state 0x%02X\n", record_length, ssl->state); - direction = ssl_packet_from_server(ssl_associations, pinfo->srcport, pinfo->ptype == PT_TCP); + direction = ssl_packet_from_server(ssl_associations, pinfo->srcport, pinfo->ptype != PT_UDP); /* retrieve decoder for this packet direction */ if (direction != 0) { @@ -1504,7 +1510,7 @@ col_append_str(pinfo->cinfo, COL_INFO, "Change Cipher Spec"); dissect_ssl3_change_cipher_spec(tvb, ssl_record_tree, offset, conv_version, content_type); - if (ssl) ssl_change_cipher(ssl, ssl_packet_from_server(ssl_associations, pinfo->srcport, pinfo->ptype == PT_TCP)); + if (ssl) ssl_change_cipher(ssl, ssl_packet_from_server(ssl_associations, pinfo->srcport, pinfo->ptype != PT_UDP)); break; case SSL_ID_ALERT: { @@ -1566,8 +1572,8 @@ /* we need dissector information when the selected packet is shown. * ssl session pointer is NULL at that time, so we can't access * info cached there*/ - association = ssl_association_find(ssl_associations, pinfo->srcport, pinfo->ptype == PT_TCP); - association = association ? association: ssl_association_find(ssl_associations, pinfo->destport, pinfo->ptype == PT_TCP); + association = ssl_association_find(ssl_associations, pinfo->srcport, pinfo->ptype != PT_UDP); + association = association ? association: ssl_association_find(ssl_associations, pinfo->destport, pinfo->ptype != PT_UDP); proto_item_set_text(ssl_record_tree, "%s Record Layer: %s Protocol: %s", diff -Nur wireshark-1.2.7/epan/dissectors/packet-ssl-utils.c wireshark-1.2.7-fD/epan/dissectors/packet-ssl-utils.c --- wireshark-1.2.7/epan/dissectors/packet-ssl-utils.c 2010-04-01 01:44:27.000000000 +0900 +++ wireshark-1.2.7-fD/epan/dissectors/packet-ssl-utils.c 2011-02-23 13:33:10.000000000 +0900 @@ -2713,9 +2713,10 @@ fprintf(stderr, "association_add() could not find handle for protocol:%s\n",protocol); } else { if(port) { - if(tcp) + if(tcp) { dissector_add("tcp.port", port, handle); - else + dissector_add("sctp.port", port, handle); + } else dissector_add("udp.port", port, handle); } g_tree_insert(associations, assoc, assoc); diff -Nur wireshark-1.2.7/epan/packet_info.h wireshark-1.2.7-fD/epan/packet_info.h --- wireshark-1.2.7/epan/packet_info.h 2010-04-01 01:44:40.000000000 +0900 +++ wireshark-1.2.7-fD/epan/packet_info.h 2011-02-23 13:54:52.000000000 +0900 @@ -169,6 +169,7 @@ tvbuff_t *gssapi_decrypted_tvb; gboolean gssapi_data_encrypted; + guint16 strid; /* Stream Id of the last DATA chunk in the packet */ guint32 ppid; /* SCTP PPI of current DATA chunk */ guint32 ppids[MAX_NUMBER_OF_PPIDS]; /* The first NUMBER_OF_PPIDS PPIDS which are present * in the SCTP packet nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/000077500000000000000000000000001333553357400176205ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/acl_wl.conf.sample000066400000000000000000000020571333553357400232140ustar00rootroot00000000000000# Configuration file for the peer whitelist extension. # # This extension is meant to allow connection from remote peers, without actively # maintaining this connection ourselves (as it would be the case by declaring the # peer in a ConnectPeer directive). # The format of this file is very simple. It contains a list of peer names # separated by spaces or newlines. # # The peer name must be a fqdn. We allow also a special "*" character as the # first label of the fqdn, to allow all fqdn with the same domain name. # Example: *.example.net will allow host1.example.net and host2.example.net # # At the beginning of a line, the following flags are allowed (case sensitive) -- either or both can appear: # ALLOW_OLD_TLS : we accept unprotected CER/CEA exchange with Inband-Security-Id = TLS # ALLOW_IPSEC : we accept implicitly protected connection with with peer (Inband-Security-Id = IPSec) # It is specified for example as: # ALLOW_IPSEC vpn.example.net vpn2.example.net *.vpn.example.net # These flag take effect from their position, until the end of the line. nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/app_acct.conf.sample000066400000000000000000000064771333553357400235370ustar00rootroot00000000000000####################### # This file contains the description of configuration and general information about the # "App_Acct" extension. # This extension provides a simple Diameter Accounting server. # The extension does receive the Accounting-Request message, then # saves the contents of the AVP in a database, as configured here. # The data is not processed at all. The intent is that a dedicated # application will then pull from this database and process the data (consolidate # sessions, ...) # In order to enable this extension, the main freeDiameter configuration file # must contain the following declaration: # LoadExtension = "extensions/app_acct.fdx" : "/path/to/app_acct.conf" ; ####################### ################# ## Part I: AVP ## ################# # Configure here the AVPs that must be stored in the database. # The format is: # "AVP-dictionary-name" = { # field = "db-field-name"; # required; # multi=N; # }; # Where: # AVP-dictionary-name: # The name of the AVP, such as "Session-Id". Only this field is mandatory. # field="...": # The name of the field in the database where is AVP contents will be saved. # The default is that the field is named as the AVP-dictionary-name. # required: # By default, if the AVP is not in the Diameter message, it is not passed in # the INSERT statement (will get NULL). If Required is specified for the AVP, # an error is returned in the Diameter answer, and the data is discarded. # multi=N: # If an AVP may appear several times in a request, you may specify a number of # occurrences to save in the database. The Nth first occurrences of the AVP # will be saved in fields "db-field-name1", "db-field-name2", ... "db-field-nameN" # # In case the default behavior for an AVP is fine, you can use the short syntax: # "AVP-dictionary-name"; # # Note that at the moment, GROUPED AVP are not supported. Also, only the top-level AVPs are # searched. This behavior can be changed quite easily if needed. # You may look at contrib/app_acct_tools/app_acct.conf and database.sql files # for an example of setup. ####################### ## Part II: Database ## ####################### # You must specify the connection information to the database here. # Please note that if the connection is terminated, it will trig the shutdown of the freeDiameter daemon # For this reason, you should as much as possible use a local database. # ConnInfo: # The connection string to the database. See http://www.postgresql.org/docs/8.4/static/libpq-connect.html # Example: ConnInfo = "host=localhost port=5432 dbname=acct user=acct password=freediameter"; # Table: # The name of the table to use. The fields and types in this table must be created accordingly to the Part I configuration in this file. # Example: Table = "incoming"; # Timestamp_field: # Optionally, you can specify a name of a field that will receive the value 'now' when a new record is inserted. # Default: no timestamp is inserted. # Example: Timestamp_field = "recorded_on"; # Server_name_field: # Optionally, you can specify a field which will receive the Diameter Identity of the local server for each record saved. # This is useful especially if you have several Accounting servers and want to check Load-Balancing behavior or so, # after aggregating all the data. # Default: no server name inserted. # Example: Server_name_field = "recorded_serv"; nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/app_diameap.conf.sample000066400000000000000000000047451333553357400242210ustar00rootroot00000000000000##### a sample Configuration file for DiamEAP # MySQL Database settings # Specify connection parameters for DiamEAP MySQL database: # - username and password to connect to the MySQL Server # - databaseserver : the MySQL server location. It can be the IP address or the host name where MySQL server is located. 'localhost' can be used as the location if the server is locatd in the same host than DiamEAP. # - database_name : the created database for DiamEAP. # Syntax : # DiamEAP_MySQL = "" , "" , "" , ""; ##### Extensible Authentication Protocol (EAP) Methods Plugins ##### # An EAP method is identified by its EAP method name, EAP TYPE, VENDOR and path to its EAP Method Plugin. # Optionally, path to a configuration file of plugin can also be provided. # Location of plugins and their configuration files can be provided by the absolute pathor the relative path from the location configured in cmake. # An EAP Method Plugin can not be loaded twice. Only the first added method will be loaded. # Any EAP Method plugin with a same EAP_TYPE value than an already loaded one will be discarded. # EAP Methods are added in the same order they are added to the the configuration file. # Syntax : # Load_plugin = "":EAP_TYPE:VENDOR:"":""; # # Example: # Load_plugin = "EAP MD5":4:0:"/extensions/eap_md5.emp":""; # Load_plugin = "EAP TLS":13:0;"/extensions/eap_tls.emp":"/doc/eap_tls_plugin.diameap.conf"; Load_plugin = "EAP Identity":1:0:"/extensions/eap_identity.emp":""; # Enable/disable checking User's Identity. If disabled, default parameters value will be used for authentication and authorization attributes. # Default values are defined in database for 'Default User'. Check_User_Identity = 1; # In addition to authentication DiamEAP can be configured to check authorization of authenticated users. If set to 0 authorization is disabled, otherwise enabled.( by default disabled). Authorization = 1; # This parameter specify the maximum number of seconds provided to the access device for responding to an EAP request. (by default set to 30 seconds) #Multi_Round_Time_Out=30; # After receivin a number of invalid EAP packets, DiamEAP reject the authentication by responding with Failure Authentication. # The default value of maximum number of invalid EAP packets is set to 5 packets. # The value of maximum invalid EAP packets can be modified by adding a new value. #MAX_Invalid_EAP_Packets=5; nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/app_radgw.conf.sample000066400000000000000000000107131333553357400237150ustar00rootroot00000000000000# This file contains information for configuring the app_radgw extension. # To find how to have freeDiameter load this extension, please refer to the freeDiameter documentation. # # The app_radgw extension allows a freeDiameter agent to serve as a # RADIUS/Diameter gateway. Typically, a RADIUS client (e.g. a NAS) will connect to # this agent, and the message will be converted to Diameter and sent to a Diameter server. # # Note that this extension does not provide a fully functionnal RADIUS/Diameter gateway. # You need to load plugins to handle specific RADIUS messages and convert them to # Diameter apps such as NASREQ, EAP, ... See the next section for information. ########### # PLUGINS # ########### # Additional plugins must be loaded to support specific RADIUS messages and attributes. # Plugins are registered either for every message, or by port (auth or acct), or by port and code. # The general format is: # RGWX = plugin [: conf_file] [: port] [: code(s)] ; # Where: # plugin is the quoted file name (relative or absolute) of the plugin to load (.rgwx files). # conf_file (optional) is the quoted name of the configuration file. # port (optional), either auth or acct. # If not specified, extension is called for messages incoming on both ports # code(s): space-separated list of command codes for which this extension must be called. # If not specified, the extension is called for all incoming messages. # The values are interpreted as hexadecimal. # # The plugins are called in the order they appear in this file. # Here are some explained examples: # RGWX = "3579.rgwx"; Load this extension and call it for all messages. No configuration file. # RGWX = "3579.rgwx" : "3579.conf"; Same as previous but with a configuration file specified. # RGWX = "3579.rgwx" : auth; No configuration file, but called only for RADIUS messages received on authentication port. # RGWX = "3579.rgwx" : 4 8 b; Called for messages with command code 4, 8, or 11 only. # RGWX = "3579.rgwx" : "3579.conf" : auth : 4 8 b; All parameters combined. # Once the list of extensions for an incoming message has been called (or if the list is empty), # an error is logged if some RADIUS attributes of the message have not been handled. RGWX = "extensions/echodrop.rgwx" : "echodrop.rgwx.conf"; # See echodrop.rgwx.conf.sample file RGWX = "extensions/auth.rgwx" : auth; RGWX = "extensions/acct.rgwx" : acct; # RGWX = "extensions/debug.rgwx"; # Uncomment to see the result of the translation plugins. # For some extensions (auth, acct), a false configuration file name # can be passed to specify flags, such as "nonai" to ignore NAI-based routing. ################## # RADIUS Clients # ################## # Each RADIUS client must be declared in the form: # nas = IP / shared-secret ; # IP can be ipv4 or ipv6 # port can be additionaly restricted with brackets: IP[port] (ex: 192.168.0.1[1812]) # shared-secret can be a quoted string, or a list of hexadecimal values. # examples: # nas = 192.168.100.1 / "secret key" ; # the shared secret buffer is 0x736563726574206b6579 (length 10 bytes) # nas = fe00::1 / 73 65 63 72 65 74 20 6b 65 79; # same shared secret as previously # When a packet is received from an IP not declared here, it is discarded. # If the RADIUS client is a Proxy that forwards messages from different peers, it must be # declared instead as follow: # pxy = IP / shared-secret ; # Note that it is not recommended to use this gateway implementation with a proxy currently, # since the management of duplicate messages might be insufficient. # The old notation cli = ... is equivalent to nas = ... and kept for backward compatibility. #################### # Authentication # # Authorization # #################### # Enable the RADIUS/Diameter authentication/authorization gateway? # auth_server_enable = 1; # The port on which the accounting server listens # auth_server_port = 1812; # The IPv4 on which to bind the server, or "disable" if IPv4 must not be used. # auth_server_ip4 = 0.0.0.0; # The IPv6 address to which the server is bound, or "disable" # auth_server_ip6 = :: ; ################ # Accounting # ################ # Enable the RADIUS/Diameter accounting gateway? # acct_server_enable = 1; # The port on which the accounting server listens # acct_server_port = 1813; # The IPv4 on which to bind the server, or "disable" if no IPv4 is wanted. # acct_server_ip4 = 0.0.0.0; # The IPv6 address to which the server is bound, or "disable" # acct_server_ip6 = :: ; nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/app_redirect.conf.sample000066400000000000000000000104211333553357400244060ustar00rootroot00000000000000# This file contains the configuration for the app_redirect extension of freeDiameter. # # This extension provides configurable Redirect messages. # Lines starting with a # are comments and ignored. # Spaces and newlines are not meaningful, except inside quoted areas. ######################################################################################### # See Diameter RFC for a detailed explanation on Redirects semantics # ######################################################################################### ## default_redirect_cache_time # Specify the default value for Redirect-Max-Cache-Time. # This value can be overwritten for each rule as specified below. # If this value is not specified, the default is: #default_redirect_cache_time = 86400; ## => 1 day # The remaining of this file contains a list of RULE elements. # Each RULE consists in three parts: # - a CRITERIA that specifies which messages the RULE applies to. # - a REDIRECT_TYPE that specifies what type of redirect is to be sent, and its duration. # - a TARGET_HOSTS list that specifies the host(s) to send the message to. # # The rules are matched in the order they appear in this file. Once a rule has matched, the # remaining rules are not processed. # # The basic format of a rule is: # REDIRECT_TYPE : CRITERIA to TARGET_HOSTS ; # These are a few examples. The definition of each term follows. # # 1) REALM_AND_APPLICATION : app=3 "Destination-Realm"="myrealm.net" to "aaas://acct1.myrealm.net" "aaas://acct2.myrealm.net"; # will ask all peers sending a Base Accounting message for realm "myrealm.net" to send # this message directly to either 'acct1.myrealm.net' or 'acct2.myrealm.net'. # # 2) ALL_SESSION 3600 : "Origin-AAA-Protocol"=1 "Destination-Realm"="myrealm.net" to "aaas://raddiam.myrealm.net"; # Will ask any peer sending messages translated from RADIUS and targeted to this realm # to address all the messages from the same session to 'raddiam.myrealm.net'. The # redirect entry should be stored for 1 hour. # # 3) ALL_HOST : from.realm=[".*\.(fr|de|es)"] to "aaas://relay-EU.myrealm.net"; # ALL_HOST : from.realm=[".*\.(cn|jp|vn)"] to "aaas://relay-ASIA.myrealm.net"; # Redirect messages to different relays depending on where they come from. # # 4) ALL_HOST : to "aaas://newserv.myrealm.net"; # This server was relocated, tell all peers to go directly to the new one. # This rule should appear last because it matches all messages, so further rules will never be used. # # REDIRECT_TYPE # # The redirect_type is one of the following (see Redirect-Host-Usage AVP definition in RFC for semantics): # DONT_CACHE # ALL_SESSION # ALL_REALM # REALM_AND_APPLICATION # ALL_APPLICATION # ALL_HOST # ALL_USER # In addition, an integer can follow. If specified, it overwrites the default_redirect_cache_time # value for this rule. The value is always specified in seconds. # # CRITERIA # # Each RULE can contain 0 or more criteria. # If no criteria is specified, all messages are assumed to match (wildcard). # If more than one criteria is specified, an "AND" relationship is assumed. # If you need to specify "OR", just create separate rules. # # In the following definitions, "STR/REG" stands for: # - a quoted string "some.peer" that will match exactly this string (case-insensitive), or # - a bracket-quoted string ["some regex"] that will be interpreted as a POSIX extended regular expression (case-sensitive), and attempt to match the string. # # A criteria is one of the following: # from.id="STR/REG" -> matches messages received from peer with this Diameter Identity. # from.realm="STR/REG" -> matches messages received from peer with this Realm. # app=U32_VALUE -> matches messages with this Diameter Application-Id value in its header. # "AVP-name"=U32_VALUE -> matches messages that contain an avp "AVP-name" (replace with the realm name) with this value. # "AVP-name"="STR/REG" -> matches messages that contain an avp "AVP-name" (replace with the realm name) with this . # # TARGET_HOSTS # # This is a simple list of DiameterURI that must be sent back. # See the RFC for valid format of Diameter URI: # "aaa://" FQDN [ port ] [ transport ] [ protocol ] # "aaas://" FQDN [ port ] [ transport ] [ protocol ] ###################################################################################### nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/app_sip.conf.sample000066400000000000000000000012231333553357400234000ustar00rootroot00000000000000 # MODE Diameter-SIP server (DSSERVER) or Subscriber Locator (SL) #You must have at least in your network a Diameter SIP server and a Subscriber Locator (on different nodes) mode = DSSERVER; # Administrator commands port (port should be provided with "-p" in remote line) ppr_port=90; rtr_port=91; #******************# #*****DATABASE*****# #******************# # DATASOURCE: MYSQL datasource = MYSQL; #MYSQL connection details mysql_login = "login"; mysql_password = "password"; mysql_database = "db"; mysql_server = "server.fr"; #If value=0, default port for mysql will be set mysql_port = 0; #Prefix for tables (default is "ds") mysql_prefix = "ds"; nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/app_sip.sql000066400000000000000000000064421333553357400220020ustar00rootroot00000000000000--Can be used in phpMyAdmin SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- DIAMETER SERVER DATABASE -- -- -------------------------------------------------------- -- -- Table structure for table `ds_data_types` -- CREATE TABLE IF NOT EXISTS `ds_data_types` ( `id_data_type` int(11) NOT NULL AUTO_INCREMENT, `label_type` varchar(255) NOT NULL, PRIMARY KEY (`id_data_type`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; -- -------------------------------------------------------- -- -- Table structure for table `ds_networks` -- CREATE TABLE IF NOT EXISTS `ds_networks` ( `id_network` int(11) NOT NULL AUTO_INCREMENT, `label_network` varchar(255) NOT NULL, PRIMARY KEY (`id_network`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; -- -------------------------------------------------------- -- -- Table structure for table `ds_sip_aor` -- CREATE TABLE IF NOT EXISTS `ds_sip_aor` ( `id_sip_aor` int(11) NOT NULL AUTO_INCREMENT, `id_user` int(11) NOT NULL, `sip_aor` varchar(255) NOT NULL, `sip_server_uri` varchar(255) DEFAULT NULL, `registered` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id_sip_aor`,`id_user`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; -- -------------------------------------------------------- -- -- Table structure for table `ds_sip_services` -- CREATE TABLE IF NOT EXISTS `ds_sip_services` ( `id_service` int(11) NOT NULL AUTO_INCREMENT, `label_service` varchar(255) NOT NULL, PRIMARY KEY (`id_service`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; -- -------------------------------------------------------- -- -- Table structure for table `ds_users` -- CREATE TABLE IF NOT EXISTS `ds_users` ( `id_user` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(50) NOT NULL, `password` varchar(50) NOT NULL, `SIP_Server_URI` varchar(255) DEFAULT NULL, `temp_SIP_Server_URI` varchar(255) DEFAULT NULL, `authentication_pending` tinyint(1) NOT NULL DEFAULT '0', `registrated` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id_user`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; -- -------------------------------------------------------- -- -- Table structure for table `ds_user_data` -- CREATE TABLE IF NOT EXISTS `ds_user_data` ( `id_user_data` int(11) NOT NULL AUTO_INCREMENT, `id_sip_aor` int(11) NOT NULL, `id_data_type` int(11) NOT NULL, `data` longblob NOT NULL, PRIMARY KEY (`id_user_data`,`id_sip_aor`,`id_data_type`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; -- -------------------------------------------------------- -- -- Table structure for table `ds_user_networks` -- CREATE TABLE IF NOT EXISTS `ds_user_networks` ( `id_user_network` int(11) NOT NULL AUTO_INCREMENT, `id_user` int(11) NOT NULL, `id_network` int(11) NOT NULL, PRIMARY KEY (`id_user_network`,`id_user`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ; -- -------------------------------------------------------- -- -- Table structure for table `ds_user_services` -- CREATE TABLE IF NOT EXISTS `ds_user_services` ( `id_user_service` int(11) NOT NULL AUTO_INCREMENT, `id_user` int(11) NOT NULL, `id_service` int(11) NOT NULL, `compulsory` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id_user_service`,`id_user`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/app_sip_SL.sql000066400000000000000000000006731333553357400224000ustar00rootroot00000000000000 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -- SUBSCRIBER LOCATOR DATABASE -- -- -------------------------------------------------------- -- -- Table structure for table `ds_sip_aor_map` -- CREATE TABLE IF NOT EXISTS `ds_sip_aor_map` ( `id_map` int(11) NOT NULL AUTO_INCREMENT, `sip_aor` varchar(255) NOT NULL, `diameter_uri` varchar(255) NOT NULL, PRIMARY KEY (`id_map`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ; nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/dbg_interactive.py.sample000066400000000000000000000563411333553357400246140ustar00rootroot00000000000000# Example file for the dbg_interactive.fdx extension. # # This extension provides an interactive python interpreter console that allows # interacting with freeDiameter framework. # # The adaptation layer between Python and C is provided by SWIG (http://swig.org). # You may refer to SWIG documentation for more information on how the wrapper is generated and used. # The name of the module wrapping freeDiameter framework is: _fDpy # # Similar to all freeDiameter extensions, an optional filename can be specified in the # main freeDiameter.conf configuration file for the dbg_interactive.fdx extension. # If such file is provided, it will be passed to the python interpreter as a python script # to execute. Otherwise, the interpreter will be interactive. # # SWIG deals with structures as follow: # Given the structure: # struct foo { int a; } # The following functions are available to python (their C equivalent processing is given in [ ]): # s = new_foo() [ s = calloc(1, sizeof(struct foo)) ] # foo_a_set(s, 2) [ s->a = 2 ] # foo_a_get(s) [ returns s->a value ] # delete_foo(s) [ free(s) ] # # In addition, thanks to the proxy (aka shadow) class, we can also do the more user-friendly: # s = foo() # s.a = 2 # s.a # del s # # The remaining of this file gives some examples of how to use the python interpreter. # Note that at the moment not 100% of the framework is usable. # You may have to extend some classes or write some typemaps in the source code # of the extension to do what you want. ############# Compilation-time constants (from freeDiameter-host.h) ############ # Display current version print "%s %d.%d.%d" % (FD_PROJECT_NAME, FD_PROJECT_VERSION_MAJOR, FD_PROJECT_VERSION_MINOR, FD_PROJECT_VERSION_REV) ############# Debug ############ # Change the global debug level of the framework (cvar contains all global variables) cvar.fd_g_debug_lvl = 1 # Turn on debug for a specific function (if framework compiled with DEBUG support) cvar.fd_debug_one_function = "gc_th_fct" # Print messages to freeDiameter's debug facility # Note: the python version does not support printf-like argument list. The formating should be done in python. # See SWIG documentation about varargs functions for more information. fd_log(FD_LOG_NOTICE, "3 + 4 = %d" % (7)) # Display some framework state information conf = fd_conf_dump(); print conf; fd_peer_dump_list(0) fd_servers_dump(0) fd_ext_dump(0) ############# Global variables ############ # Display the local Diameter Identity: print "Local Diameter Identity:", cvar.fd_g_config.cnf_diamid # Display realm, using the low-level functions (skip proxy classe definitions): print "Realm:", _fDpy.fd_config_cnf_diamrlm_get(_fDpy.cvar.fd_g_config) ############# Lists ############ # Note: we use different names from the C API here, for usability. l1 = fd_list() # Will be our sentinel l2 = fd_list() l3 = fd_list() l1.isempty() l1.insert_next(l2) # l1 -> l2 l1.isempty() l1.insert_prev(l3) # l1 -> l2 -> l3 (circular list) l1.dump() l3.detach() # l1 -> l2 l4=fd_list() l5=fd_list() l3.insert_next(l4) # l3 -> l4 l3.insert_next(l5) # l3 -> l5 -> l4 l1.concat(l3) # l1 -> l2 -> l5 -> l4 elements = l1.enum_as() # default: enumerates as fd_list. Warning: this a copy, changing the python list has no effect on the underlying fd_list. for li in elements: li.dump() del elements del l2 del l3 del l4 del l5 l1.isempty() # The destructor has an implicit fd_list_unlink call del l1 ############# Hash ############ hex(fd_os_hash("hello world")) # It accepts binary data ############# Dictionary ############ ##### Create a dedicated dictionary for our tests d = dictionary() d.dump() # New vendor v = dict_vendor_data() v.vendor_id = 123 v.vendor_name = "My test vendor" my_vendor = d.new_obj(DICT_VENDOR, v) del v d.dump() d.vendors_list() # Compact invocation also possible: v2 = dict_vendor_data(124, "My test vendor 2") del v2 # New application a = dict_application_data() a.application_id = 99 a.application_name = "My test appl" my_appl = d.new_obj(DICT_APPLICATION, a, my_vendor) del a a2 = dict_application_data(99, "My test appl 2") del a2 # New type (callbacks are not supported yet...) t = dict_type_data() t.type_base = AVP_TYPE_INTEGER32 t.type_name = "My integer AVP" my_type_int = d.new_obj(DICT_TYPE, t, my_appl) t.type_base = AVP_TYPE_OCTETSTRING t.type_name = "My binary buffer AVP" my_type_os = d.new_obj(DICT_TYPE, t, my_appl) del t t2 = dict_type_data(AVP_TYPE_UNSIGNED32, "u32 type") del t2 # Constants c = dict_enumval_data() c.enum_name = "AVP_VALUE_TROIS" c.enum_value.i32 = 3 d.new_obj(DICT_ENUMVAL, c, my_type_int) c.enum_name = "A_BUFFER_CONSTANT" c.enum_value.os = "This is a very long AVP value that we prefer to represent as a constant" c.enum_value.os.dump() d.new_obj(DICT_ENUMVAL, c, my_type_os) del c c2 = dict_enumval_data("enum 23", 23) # The constructor only accepts unsigned32, for other values, set them afterwards c3 = dict_enumval_data("enum other") c3.os = "other value" del c2 del c3 # AVP a = dict_avp_data() a.avp_code = 234 a.avp_name = "my integer avp" a.avp_flag_mask = AVP_FLAG_MANDATORY a.avp_basetype = AVP_TYPE_INTEGER32 my_avp_int = d.new_obj(DICT_AVP, a, my_type_int) a.avp_vendor = 123 a.avp_name = "my OS avp" a.avp_flag_mask = AVP_FLAG_MANDATORY + AVP_FLAG_VENDOR a.avp_flag_val = AVP_FLAG_VENDOR a.avp_basetype = AVP_TYPE_OCTETSTRING my_avp_os = d.new_obj(DICT_AVP, a, my_type_os) del a a2 = dict_avp_data(235, "no vendor, not mandatory", AVP_TYPE_OCTETSTRING) a3 = dict_avp_data(236, "vendor 12, not mandatory", AVP_TYPE_OCTETSTRING, 12) a4 = dict_avp_data(237, "vendor 12, mandatory", AVP_TYPE_OCTETSTRING, 12, 1) a5 = dict_avp_data(238, "no vendor, mandatory", AVP_TYPE_OCTETSTRING, 0, 1) del a2 del a3 del a4 del a5 # Command c = dict_cmd_data() c.cmd_code = 345 c.cmd_name = "My-Python-Request" c.cmd_flag_mask = CMD_FLAG_REQUEST + CMD_FLAG_PROXIABLE c.cmd_flag_val = CMD_FLAG_REQUEST + CMD_FLAG_PROXIABLE my_req = d.new_obj(DICT_COMMAND, c, my_appl) c.cmd_name = "My-Python-Answer" c.cmd_flag_val = CMD_FLAG_PROXIABLE my_ans = d.new_obj(DICT_COMMAND, c, my_appl) del c c2 = dict_cmd_data(346, "Second-Request", 1) # Default created with PROXIABLE flag. c3 = dict_cmd_data(346, "Second-Answer", 0) del c2 del c3 # Rule r = dict_rule_data() r.rule_avp = my_avp_int r.rule_position = RULE_REQUIRED r.rule_min = -1 r.rule_max = -1 d.new_obj(DICT_RULE, r, my_req) d.new_obj(DICT_RULE, r, my_ans) r.rule_avp = my_avp_os d.new_obj(DICT_RULE, r, my_req) d.new_obj(DICT_RULE, r, my_ans) del r r2 = dict_rule_data(my_avp_int, RULE_REQUIRED) # min & max are optional parameters, default to -1 r3 = dict_rule_data(my_avp_int, RULE_REQUIRED, 2, 3) # min is 2, max is 3 r4 = dict_rule_data(my_avp_int, RULE_FIXED_HEAD) # The r4.rule_order = 1 by default, change afterwards if needed. del r2 del r3 del r4 d.dump() del d ####### Now play with the "real" dictionary gdict = cvar.fd_g_config.cnf_dict appl = gdict.search ( DICT_APPLICATION, APPLICATION_BY_ID, 3 ) appl.dump() avp = gdict.search ( DICT_AVP, AVP_BY_NAME, "Origin-Host") avp.dump() errcmd = gdict.error_cmd() v = avp.getval() print v.avp_code del v t = avp.gettype() print t del t dict = avp.getdict() del dict ############# Sessions ############ # handler def my_cleanup(state,sid): print "Cleaning up python state for session:", sid print "Received state:", state del state hdl = session_handler(my_cleanup) hdl.dump() del hdl # Session hdl = session_handler(my_cleanup) s1 = session() s1.getsid() s2 = session("this.is.a.full.session.id") r,s3,isnew = fd_sess_fromsid("this.is.a.full.session.id") # use this call if "isnew" is really needed... s4 = session("host.id", "optional.part") s4.settimeout(30) # the python wrapper takes a number of seconds as parameter for simplicity s4.dump() # states mystate = [ 34, "blah", [ 32, 12 ] ] s1.store(hdl, mystate) del mystate gotstate = s1.retrieve(hdl) print gotstate del gotstate ############# Routing ############ rd = rt_data() rd.add("p1.testbed.aaa", "testbed.aaa") rd.add("p2.testbed.aaa", "testbed.aaa") rd.add("p3.testbed.aaa", "testbed.aaa") rd.add("p4.testbed.aaa", "testbed.aaa") rd.remove("p2.testbed.aaa") rd.error("p3.testbed.aaa", "relay.testbed.aaa", 3002) list = rd.extract(-1) for c in list.enum_as("struct rtd_candidate *"): print "%s (%s): %s" % (c.diamid, c.realm, c.score) del rd # A rt_fwd callback has the following prototype: def my_rtfwd_cb(msg): print "Forwarding the following message:" msg.dump() return [ 0, msg ] # return None instead of msg to stop forwarding. fwdhdl = fd_rt_fwd_hdl( my_rtfwd_cb, RT_FWD_REQ ) # A rt_out cb has the following prototype: def my_rtout_cb(msg, list): print "Sending out the following message:" msg.dump() print "The possible candidates are:" for c in list.enum_as("struct rtd_candidate *"): print "%s (%s): %s" % (c.diamid, c.realm, c.score) return 0 # returns an error code (standard errno values) outhdl = fd_rt_out_hdl( my_rtout_cb ) # a priority can be specified as 2nd parameter, default is 0. ############# Messages, AVPs ############ ## AVP # Create empty blank_avp = avp() del blank_avp # Create from dictionary definitions oh = avp(cvar.fd_g_config.cnf_dict.search ( DICT_AVP, AVP_BY_NAME, "Origin-Host")) # Octet String vi = avp(cvar.fd_g_config.cnf_dict.search ( DICT_AVP, AVP_BY_NAME, "Vendor-Id")) # U32 vsai = avp(cvar.fd_g_config.cnf_dict.search ( DICT_AVP, AVP_BY_NAME, "Vendor-Specific-Application-Id")) # Grouped # Set values val = avp_value() val.u32 = 123 vi.setval(None) # this cleans a previous value (usually not needed) vi.setval(val) val.os = "my.origin.host" oh.setval(val) vsai.add_child(vi) # call as add_child(vi, 1) to add the new AVP at the beginning, default is at the end # It is possible to initialize the AVP with a blank value as follow: blank_with_value = avp(None, AVPFL_SET_BLANK_VALUE) # it enables this without doing the setval call: blank_with_value.header().avp_value.u32 = 12 ## Messages # Create empt (as for avps, pass None or a dictionary object as 1st param, and flags as optional 2nd param)y a_msg = msg() a_msg.dump() del a_msg # It is also possible to pass MSGFL_* flags in second parameter (ALLOC_ETEID is default) msg_no_eid = msg(None, 0) msg_no_eid.dump() del msg_no_eid # Create from dictionary dwr_dict = cvar.fd_g_config.cnf_dict.search ( DICT_COMMAND, CMD_BY_NAME, "Device-Watchdog-Request" ) dwr = msg(dwr_dict) dwr.dump() # Create msg from a binary buffer (then you should call parse_dict and parse_rules methods) dwr2 = msg("\x01\x00\x00\x14\x80\x00\x01\x18\x00\x00\x00\x00\x00\x00\x00\x00\x1b\xf0\x00\x01") # Create answer from request (optional parameters: dictionary to use, and flags): dwr3 = msg(cvar.fd_g_config.cnf_dict.search ( DICT_COMMAND, CMD_BY_NAME, "Device-Watchdog-Request" )) dwa3 = dwr3.create_answer() dwr3cpy = dwa3.get_query() ## Other functions with AVPs & messages # Add the AVPs in the message dwr.add_child(oh) oh.add_next(vsai) # equivalent to add_child on the parent # Create a network byte buffer from the message dwr.bufferize() # Get first child AVP (fast) avp = dwr.first_child() # then: avp = avp.get_next() # when last AVP, returns None # Get all 1st level children (slower) -- warning, changes to the python list will not be reflected on the underlying message. read-only use. dwr.children() # example use: for a in dwr.children(): a.dump(0) # 0 means: dump only this object, do not walk the tree # Search the first AVP of a given type oh_dict = cvar.fd_g_config.cnf_dict.search( DICT_AVP, AVP_BY_NAME, "Origin-Host") oh = dwr.search( oh_dict ) # After adding AVPs, the length in the message header is outdated, refresh as follow: dwr.update_length() # Get dictionary model for a message or avp dwr.model() oh.model().dump() # Retrieve the header of messages & avp: dwr_hdr = dwr.header() dwr_hdr.msg_version dwr_hdr.msg_hbhid oh_hdr = oh.header() hex(oh_hdr.avp_flags) oh_hdr.avp_vendor oh_hdr.avp_value.os.as_str() # Get or set the routing data rd = rt_data() dwr.set_rtd(rd) rd = dwr.get_rtd() # Test if message is routable dwr.is_routable() # Which peer the message was received from (when received from network) dwr.source() # The session corresponding to this message (returns None when no Session-Id AVP is included) dwr.get_session() # Parse a buffer buf = "\x01\x00\x00@\x80\x00\x01\x18\x00\x00\x00\x00\x00\x00\x00\x00N\x10\x00\x00\x00\x00\x01\x08@\x00\x00\x16my.origin.host\x00\x00\x00\x00\x01\x04@\x00\x00\x14\x00\x00\x01\n@\x00\x00\x0c\x00\x00\x00{" mydwr = msg(buf) # Resolve objects in the dictionary. Return value is None or a struct pei_error in case of problem. mydwr.parse_dict() # if not using the fD global dict, pass it as parameter err = mydwr.parse_rules() err.pei_errcode # Grouped AVPs are browsed with same methods as messages: gavp = dwr.children()[1] gavp.first_child().dump() gavp.children() # Send a message: mydwr = msg(buf) mydwr.send() # Optionally, a callback can be registered when a request is sent, with an optional object. # This callback takes the answer message as parameter and should return None or a message. (cf. fd_msg_send) def send_callback(msg, obj): print "Received answer:" msg.dump() print "Associated data:" obj return None mydwr = msg(buf) mydwr.send(send_callback, some_object) # Again optionally, a time limit can be specified in this case as follow: mydwr.send(send_callback, some_object, 10) # In that case, if no answer / error is received after 10 seconds (the value specified), # the callback is called with the request as parameter. # Testing for timeout case is done by using msg.is_request() def send_callback(msg, obj): if (msg.is_request()): print "Request timed out without answer:" else: print "Received answer:" msg.dump() print "Associated data:" obj return None # Set a result code in an answer message. mydwr = msg(buf) dwa = mydwr.create_answer() dwa.rescode_set() # This adds the DIAMETER_SUCCESS result code dwa.rescode_set("DIAMETER_LIMITED_SUCCESS" ) # This adds a different result code dwa.rescode_set("DIAMETER_LIMITED_SUCCESS", "Something went not so well" ) # This adds a different result code + specified Error-Message dwa.rescode_set("DIAMETER_INVALID_AVP", None, faulty_avp ) # This adds a Failed-AVP dwa.rescode_set("DIAMETER_SUCCESS", None, None, 1 ) # This adds origin information (see fd_msg_rescode_set's type_id for more info) # Set the origin to local host mydwr.add_origin() # adds Origin-Host & Origin-Realm mydwr.add_origin(1) # adds Origin-State-Id in addition. ############# DISPATCH (aka. server application) ############ # As for sessions, only one dispatch handler can be registered in this extension at the moment. # The callback for the handler has the following syntax: def dispatch_cb_model(inmsg, inavp, insession): print "Callback trigged on message: " inmsg.dump() # inavp is None or the AVP that trigged the callback, depending on how it was registered. if inavp: print "From the following AVP:" inavp.dump() else: print "No AVP" # Session is provided only if a Session-Id is in the message if insession: print "The session is: ", insession.getsid() else: print "No session" # Now, for the return value. # This callback must return 3 elements: # - an integer which is interpreted as an error code (errno.h) # - a message or None, depending on the next item # - an enum disp_action value, with the same meaning as in C (see libfreeDiameter.h) del inmsg return [ 0, None, DISP_ACT_CONT ] ### Example use: rebuild the server-side of test_app.fdx in python # The following block defines the dictionary objects from the test_app.fdx application that we use on the remote peer gdict = cvar.fd_g_config.cnf_dict d_si = gdict.search ( DICT_AVP, AVP_BY_NAME, "Session-Id" ) d_oh = gdict.search ( DICT_AVP, AVP_BY_NAME, "Origin-Host" ) d_or = gdict.search ( DICT_AVP, AVP_BY_NAME, "Origin-Realm" ) d_dh = gdict.search ( DICT_AVP, AVP_BY_NAME, "Destination-Host" ) d_dr = gdict.search ( DICT_AVP, AVP_BY_NAME, "Destination-Realm" ) d_rc = gdict.search ( DICT_AVP, AVP_BY_NAME, "Result-Code" ) d_vnd = gdict.new_obj(DICT_VENDOR, dict_vendor_data(999999, "app_test_py vendor") ) d_app = gdict.new_obj(DICT_APPLICATION, dict_application_data(0xffffff, "app_test_py appli"), d_vnd) d_req = gdict.new_obj(DICT_COMMAND, dict_cmd_data(0xfffffe, "Test_py-Request", 1), d_app) d_ans = gdict.new_obj(DICT_COMMAND, dict_cmd_data(0xfffffe, "Test_py-Answer", 0), d_app) d_avp = gdict.new_obj(DICT_AVP, dict_avp_data(0xffffff, "app_test_py avp", AVP_TYPE_INTEGER32, 999999 )) gdict.new_obj(DICT_RULE, dict_rule_data(d_si, RULE_FIXED_HEAD, 1, 1), d_req) gdict.new_obj(DICT_RULE, dict_rule_data(d_si, RULE_FIXED_HEAD, 1, 1), d_ans) gdict.new_obj(DICT_RULE, dict_rule_data(d_avp, RULE_REQUIRED, 1, 1), d_req) gdict.new_obj(DICT_RULE, dict_rule_data(d_avp, RULE_REQUIRED, 1, 1), d_ans) gdict.new_obj(DICT_RULE, dict_rule_data(d_oh, RULE_REQUIRED, 1, 1), d_req) gdict.new_obj(DICT_RULE, dict_rule_data(d_oh, RULE_REQUIRED, 1, 1), d_ans) gdict.new_obj(DICT_RULE, dict_rule_data(d_or, RULE_REQUIRED, 1, 1), d_req) gdict.new_obj(DICT_RULE, dict_rule_data(d_or, RULE_REQUIRED, 1, 1), d_ans) gdict.new_obj(DICT_RULE, dict_rule_data(d_dr, RULE_REQUIRED, 1, 1), d_req) gdict.new_obj(DICT_RULE, dict_rule_data(d_dh, RULE_OPTIONAL, 0, 1), d_req) gdict.new_obj(DICT_RULE, dict_rule_data(d_rc, RULE_REQUIRED, 1, 1), d_ans) # Now, create the Test_app server callback: def test_app_cb(inmsg, inavp, insession): tval = inmsg.search(d_avp).header().avp_value.u32 print "Py ECHO Test message from '%s' with test value %x, replying..." % (inmsg.search(d_oh).header().avp_value.os.as_str(), tval) answ = inmsg.create_answer() answ.rescode_set() answ.add_origin() ta = avp(d_avp, AVPFL_SET_BLANK_VALUE) ta.header().avp_value.u32 = tval answ.add_child(ta) return [ 0, answ, DISP_ACT_SEND ] # Register the callback for dispatch thread: hdl = disp_hdl(test_app_cb, DISP_HOW_CC, disp_when(d_app, d_req)) # disp_when() takes 0 to 4 arguments as follow: (app=NULL, cmd=NULL, avp=NULL, val=NULL) # Don't forget to register the application in the daemon for CER/CEA capabilities. fd_disp_app_support ( d_app, d_vnd, 1, 0 ) ### For the fun, the client part of the test_app: def receive_answer(ans, testval): try: tval = ans.search(d_avp).header().avp_value.u32 except: print "Error in receive_answer: no Test-AVP included" tval = 0 try: print "Py RECV %x (expected: %x) Status: %d From: '%s'" % (tval, testval, ans.search(d_rc).header().avp_value.u32, ans.search(d_oh).header().avp_value.os.as_str()) except: print "Error in receive_answer: Result-Code or Origin-Host are missing" del ans return None import random def send_query(destrealm="localdomain"): qry = msg(d_req) sess = session() tv = random.randint(1, 1<<32) # Session-Id a = avp(d_si, AVPFL_SET_BLANK_VALUE) a.header().avp_value.os = sess.getsid() qry.add_child(a) # Destination-Realm a = avp(d_dr, AVPFL_SET_BLANK_VALUE) a.header().avp_value.os = destrealm qry.add_child(a) # Origin-Host, Origin-Realm qry.add_origin() # Test-AVP a = avp(d_avp, AVPFL_SET_BLANK_VALUE) a.header().avp_value.u32 = tv qry.add_child(a) print "Py SEND %x to '%s'" % (tv, destrealm) qry.send(receive_answer, tv) send_query() ############# FIFO queues ############ myqueue = fifo() # enqueue any object myqueue.post(3) myqueue.post("blah") myqueue.post( [ 3, 2 ] ) # Simple get (blocks when the queue is empty) myqueue.get() # Try get: returns the next object, or None if the queue is empty myqueue.tryget() # timed get: like get, but returns None after x seconds myqueue.timedget(3) # Show the number of items in the queue myqueue.length() ## Variants: # All the previous calls are suitable to queue Python objects. # In order to interact with objects queued / poped by C counterpart, # a second parameter must be passed to specify the object type, # as follow: ev = fd_event() ev.code = FDEV_DUMP_EXT cvar.fd_g_config.cnf_main_ev.post(ev, "struct fd_event *") # Similarly, for *get, we can specify the structure that was queued: myqueue.get("struct fd_event *") myqueue.tryget("struct fd_event *") myqueue.timedget(3, "struct fd_event *") del myqueue ############# HOOKS ############ def my_hook_cb(type, msg, peer, other, oldpmd): print "callback type ", type, " called: ", msg, other, oldpmd return "this is the new pmd" # Create a wrapped fd_hook_data_hdl: datahdl = fd_hook_data_hdl() # Register the hook callback: hdl = fd_hook_hdl(1 << HOOK_MESSAGE_SENT, my_hook_cb, datahdl) ############# PEERS ############ # Get the list of peers defined in the system # (we are supposed to readlock fd_g_peers_rw before accessing this list) cvar.fd_g_peers_rw.rdlock() peers = cvar.fd_g_peers.enum_as("struct peer_hdr *") cvar.fd_g_peers_rw.unlock() for p in peers: print "Peer:", p.info.pi_diamid # Create a new peer np = peer_info() np.pi_diamid = "nas.localdomain" np.config.pic_flags.pro4 = PI_P4_TCP # Add this peer into the framework. np.add() # It is possible to specify a callback for when the connection completes or fails with this peer. # The prototype is as follow: def add_cb(peer): if peer: if peer.runtime.pir_state == STATE_OPEN: print "Connection to peer '%s' completed" % (peer.pi_diamid) # can find more information in peer.runtime.* else: print "Connection to peer '%s' failed (state:%d)" % (peer.pi_diamid, peer.runtime.pir_state) else: print "The peer has been destroyed before it completed the connection." # Then add the peer like this: np.add(add_cb) # Search a peer by its diameter id (returns a peer_hdr object if found) -- similar to fd_peer_getbyid p = peer_search("nas.domain.aaa") ## Validation callback (see fd_peer_validate_register documentation) # cb2 prototype: def my_validate_cb2(pinfo): print "Cb2 callback trigged for peer %s" % (pinfo.pi_diamid) # Usually, this would be used only to check some TLS properties, # which is not really possible yet through the python interpreter... return 0 # return an error code if the peer is not validated # cb prototype: def my_validate_cb(pinfo): print "Validate callback trigged for peer %s" % (pinfo.pi_diamid) # If the peer is not allowed to connect: #return -1 # If the peer is authorized: #return 1 # In addition, if IPsec is allowed, #pinfo.config.pic_flags.sec = PI_SEC_NONE # If no decision has been made: #return 0 # If the peer is temporarily authorized but a second callback must be called after TLS negociation: return my_validate_cb2 # Register the callback, it will be called on new incoming connections. peer_validate_register(my_validate_cb) ############# ENDPOINTS ############ ep = fd_endpoint("129.168.168.192") # with port: ep = fd_endpoint("129.168.168.192", 3868) # With different flags: ep = fd_endpoint("129.168.168.192", 3868, EP_FL_PRIMARY) # Add IP information for the peer np = peer_info() ep.add_merge(np.pi_endpoints) fd_ep_dump(0, np.pi_endpoints) ############# POSIX functions wrappers ############ # The interface also provides wrappers around base POSIX # synchronization functions: m = pthread_mutex_t() m.lock() m.unlock() c = pthread_cond_t() c.signal() c.broadcast() c.wait(m) c.timedwait(m, 5) # it takes a relative time r = pthread_rwlock_t() r.rdlock() r.unlock() r.wrlock() nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/dict_legacy_xml.conf.sample000066400000000000000000000014211333553357400250740ustar00rootroot00000000000000# This file documents the configuration format for the dict_legacy_xml.fdx freeDiameter extension. # In order to load this extension, please refer to main freeDiameter.conf manual. # This extension allows the use of Diameter dictionary files in XML format, # as roughly specified in draft-frascone-xml-dictionary-00. # (the actual format is the one from OpenDiameter latest version) # Note that this format, although more widely used, is less efficient than the # internal freeDiameter format. It is recommended when possible to use the later. # You may refer to the contrib/dict_legacy/README file for information on where to find such resources. # This file simply consists in a list of XML dictionary files that must be parsed. # Example: # "/etc/freeDiameter/dictionary.xml"; nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/eap_tls_plugin.diameap.conf.sample000066400000000000000000000004401333553357400263510ustar00rootroot00000000000000#### a sample configuration file for EAP-TLS #Certificate and Private key files #Cred = "" : ""; #CA file #CA = ""; #CRL file #CRL = ""; #Enable/disable checking certificate's CN check_cert_cn_username = 1; nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/echodrop.rgwx.conf.sample000066400000000000000000000031611333553357400245410ustar00rootroot00000000000000# Sample configuration file for the echodrop.rgwx plugin of RADIUS/Diameter translation agent. # # This plugin allows to easily specify the following handling of RADIUS attributes # received in a RADIUS request: # - ECHO: the attribute will be copied verbatim in the RADIUS answer. # - DROP: the attribute is discarded. # # In both cases, the attribute is NOT translated in Diameter message. # # The format of this file is: # CODE [ VENDOR [ TLV | EXT ] ]; # Where: # : is either DROP or ECHO. # : is a (decimal) integer between 0 and 255, and designates the type of the attribute. # # The remaining of the line is optional, and should only be used # with lines containing "CODE 26" (Vendor-Specific Attribute) # : a Vendor value (32 bit), see RFC2865 section 5.26 for detail. # # : The attribute is interpreted as TLV (rfc3865, section 5.26) # and we match only this "vendor type" value (8 bits). # # : NOTE: THIS OPTION IS NOT SUPPORTED PROPERLY YET!!!! # The attribute is interpreted as extended attribute (draft-ietf-radext-extended-attributes-08) # and we match only this "Ext-Type" value (16 bits). # This option should only be used with "CODE 26 VENDOR 0". # # Note that the Proxy-State (code 33) attribute is handled directly as an ECHO parameter by the gateway core. # Examples: # DROP code 18 ; # Reply-Message attribute, should not be included in requests # DROP code 26 vendor 9 ; # Drop any Cisco-specific attribute # ECHO code 26 vendor 0 ext 256 ; # Echo any extended attribute with the type 256. nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/freediameter.conf.sample000066400000000000000000000244601333553357400244110ustar00rootroot00000000000000# This is a sample configuration file for freeDiameter daemon. # Most of the options can be omitted, as they default to reasonable values. # Only TLS-related options must be configured properly in usual setups. # It is possible to use "include" keyword to import additional files # e.g.: include "/etc/freeDiameter.d/*.conf" # This is exactly equivalent as copy & paste the content of the included file(s) # where the "include" keyword is found. ############################################################## ## Peer identity and realm # The Diameter Identity of this daemon. # This must be a valid FQDN that resolves to the local host. # Default: hostname's FQDN #Identity = "aaa.koganei.freediameter.net"; # The Diameter Realm of this daemon. # Default: the domain part of Identity (after the first dot). #Realm = "koganei.freediameter.net"; ############################################################## ## Transport protocol configuration # The port this peer is listening on for incoming connections (TCP and SCTP). # Default: 3868. Use 0 to disable. #Port = 3868; # The port this peer is listening on for incoming TLS-protected connections (TCP and SCTP). # See TLS_old_method for more information about TLS flavours. # Note: we use TLS/SCTP instead of DTLS/SCTP at the moment. This will change in future version of freeDiameter. # Default: 5868. Use 0 to disable. #SecPort = 5868; # Use RFC3588 method for TLS protection, where TLS is negociated after CER/CEA exchange is completed # on the unsecure connection. The alternative is RFC6733 mechanism, where TLS protects also the # CER/CEA exchange on a dedicated secure port. # This parameter only affects outgoing connections. # The setting can be also defined per-peer (see Peers configuration section). # Default: use RFC6733 method with separate port for TLS. #TLS_old_method; # Disable use of TCP protocol (only listen and connect over SCTP) # Default : TCP enabled #No_TCP; # Disable use of SCTP protocol (only listen and connect over TCP) # Default : SCTP enabled #No_SCTP; # This option is ignored if freeDiameter is compiled with DISABLE_SCTP option. # Prefer TCP instead of SCTP for establishing new connections. # This setting may be overwritten per peer in peer configuration blocs. # Default : SCTP is attempted first. #Prefer_TCP; # Default number of streams per SCTP associations. # This setting may be overwritten per peer basis. # Default : 30 streams #SCTP_streams = 30; ############################################################## ## Endpoint configuration # Disable use of IP addresses (only IPv6) # Default : IP enabled #No_IP; # Disable use of IPv6 addresses (only IP) # Default : IPv6 enabled #No_IPv6; # Specify local addresses the server must bind to # Default : listen on all addresses available. #ListenOn = "202.249.37.5"; #ListenOn = "2001:200:903:2::202:1"; #ListenOn = "fe80::21c:5ff:fe98:7d62%eth0"; ############################################################## ## Server configuration # How many Diameter peers are allowed to be connecting at the same time ? # This parameter limits the number of incoming connections from the time # the connection is accepted until the first CER is received. # Default: 5 unidentified clients in paralel. #ThreadsPerServer = 5; ############################################################## ## TLS Configuration # TLS is managed by the GNUTLS library in the freeDiameter daemon. # You may find more information about parameters and special behaviors # in the relevant documentation. # http://www.gnu.org/software/gnutls/manual/ # Credentials of the local peer # The X509 certificate and private key file to use for the local peer. # The files must contain PKCS-1 encoded RSA key, in PEM format. # (These parameters are passed to gnutls_certificate_set_x509_key_file function) # Default : NO DEFAULT #TLS_Cred = "" , ""; TLS_Cred = "/etc/ssl/certs/freeDiameter.pem", "/etc/ssl/private/freeDiameter.key"; # Certificate authority / trust anchors # The file containing the list of trusted Certificate Authorities (PEM list) # (This parameter is passed to gnutls_certificate_set_x509_trust_file function) # The directive can appear several times to specify several files. # Default : GNUTLS default behavior #TLS_CA = ""; # Certificate Revocation List file # The information about revoked certificates. # The file contains a list of trusted CRLs in PEM format. They should have been verified before. # (This parameter is passed to gnutls_certificate_set_x509_crl_file function) # Note: openssl CRL format might have interoperability issue with GNUTLS format. # Default : GNUTLS default behavior #TLS_CRL = ""; # GNU TLS Priority string # This string allows to configure the behavior of GNUTLS key exchanges # algorithms. See gnutls_priority_init function documentation for information. # You should also refer to the Diameter required TLS support here: # http://tools.ietf.org/html/rfc6733#section-13.1 # Default : "NORMAL" # Example: TLS_Prio = "NONE:+VERS-TLS1.1:+AES-128-CBC:+RSA:+SHA1:+COMP-NULL"; #TLS_Prio = "NORMAL"; # Diffie-Hellman parameters size # Set the number of bits for generated DH parameters # Valid value should be 768, 1024, 2048, 3072 or 4096. # (This parameter is passed to gnutls_dh_params_generate2 function, # it usually should match RSA key size) # Default : 1024 #TLS_DH_Bits = 1024; # Alternatively, you can specify a file to load the PKCS#3 encoded # DH parameters directly from. This accelerates the daemon start # but is slightly less secure. If this file is provided, the # TLS_DH_Bits parameters has no effect. # Default : no default. #TLS_DH_File = ""; ############################################################## ## Timers configuration # The Tc timer of this peer. # It is the delay before a new attempt is made to reconnect a disconnected peer. # The value is expressed in seconds. The recommended value is 30 seconds. # Default: 30 #TcTimer = 30; # The Tw timer of this peer. # It is the delay before a watchdog message is sent, as described in RFC 3539. # The value is expressed in seconds. The default value is 30 seconds. Value must # be greater or equal to 6 seconds. See details in the RFC. # Default: 30 #TwTimer = 30; ############################################################## ## Applications configuration # Disable the relaying of Diameter messages? # For messages not handled locally, the default behavior is to forward the # message to another peer if any is available, according to the routing # algorithms. In addition the "0xffffff" application is advertised in CER/CEA # exchanges. # Default: Relaying is enabled. #NoRelay; # Number of server threads that can handle incoming messages at the same time. # Default: 4 #AppServThreads = 4; # Other applications are configured by loaded extensions. ############################################################## ## Extensions configuration # The freeDiameter framework merely provides support for # Diameter Base Protocol. The specific application behaviors, # as well as advanced functions, are provided # by loadable extensions (plug-ins). # These extensions may in addition receive the name of a # configuration file, the format of which is extension-specific. # # Format: #LoadExtension = "/path/to/extension" [ : "/optional/configuration/file" ] ; # # Examples: #LoadExtension = "extensions/sample.fdx"; #LoadExtension = "extensions/sample.fdx":"conf/sample.conf"; # Extensions are named as follow: # dict_* for extensions that add content to the dictionary definitions. # dbg_* for extensions useful only to retrieve more information on the framework execution. # acl_* : Access control list, to control which peers are allowed to connect. # rt_* : routing extensions that impact how messages are forwarded to other peers. # app_* : applications, these extensions usually register callbacks to handle specific messages. # test_* : dummy extensions that are useful only in testing environments. # The dbg_msg_dump.fdx extension allows you to tweak the way freeDiameter displays some # information about some events. This extension does not actually use a configuration file # but receives directly a parameter in the string passed to the extension. Here are some examples: ## LoadExtension = "dbg_msg_dumps.fdx" : "0x1111"; # Removes all default hooks, very quiet even in case of errors. ## LoadExtension = "dbg_msg_dumps.fdx" : "0x2222"; # Display all events with few details. ## LoadExtension = "dbg_msg_dumps.fdx" : "0x0080"; # Dump complete information about sent and received messages. # The four digits respectively control: connections, routing decisions, sent/received messages, errors. # The values for each digit are: # 0 - default - keep the default behavior # 1 - quiet - remove any specific log # 2 - compact - display only a summary of the information # 4 - full - display the complete information on a single long line # 8 - tree - display the complete information in an easier to read format spanning several lines. ############################################################## ## Peers configuration # The local server listens for incoming connections. By default, # all unknown connecting peers are rejected. Extensions can override this behavior (e.g., acl_wl). # # In addition to incoming connections, the local peer can # be configured to establish and maintain connections to some # Diameter nodes and allow connections from these nodes. # This is achieved with the ConnectPeer directive described below. # # Note that the configured Diameter Identity MUST match # the information received inside CEA, or the connection will be aborted. # # Format: #ConnectPeer = "diameterid" [ { parameter1; parameter2; ...} ] ; # Parameters that can be specified in the peer's parameter list: # No_TCP; No_SCTP; No_IP; No_IPv6; Prefer_TCP; TLS_old_method; # No_TLS; # assume transparent security instead of TLS. DTLS is not supported yet (will change in future versions). # Port = 5868; # The port to connect to # TcTimer = 30; # TwTimer = 30; # ConnectTo = "202.249.37.5"; # ConnectTo = "2001:200:903:2::202:1"; # TLS_Prio = "NORMAL"; # Realm = "realm.net"; # Reject the peer if it does not advertise this realm. # Examples: #ConnectPeer = "aaa.wide.ad.jp"; #ConnectPeer = "old.diameter.serv" { TcTimer = 60; TLS_old_method; No_SCTP; Port=3868; } ; ############################################################## nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/rt_busypeers.conf.sample000066400000000000000000000054651333553357400245070ustar00rootroot00000000000000# This file contains information for configuring the rt_busypeers extension. # To find how to have freeDiameter load this extension, please refer to the freeDiameter documentation. # # The rt_busypeers extension has two purposes. # - when the local peer receives an error DIAMETER_TOO_BUSY from a peer, # this extension catchs this error and attempts to retransmit the query to another peer if it makes sense, i.e.: # * the peer issuing the error is not the peer referenced in the Destination-Host AVP of the message, # * we have a direct link with the peer that issued the error (see parameter RetryDistantPeers below) # # - When a request is forwarded by the local peer, start a timer and if the corresponding answer/error has # not been received within RelayTimeout seconds, either send to another peer or return a DIAMETER_TOO_BUSY # error, depending on the RetryMaxPeers parameter. # # This extension is mainly useful for Diameter agents, for Diameter clients it is recommended to # implement this logic directly in the client application. # Parameter: SkipTooBusyErrors # If defined, this parameter disables the handling of Diameter Errors message with a Result-Code set to DIAMETER_TOO_BUSY in this extension. # When this parameter is defined, the parameter RetryDistantPeer has no effect. # Default: parameter is not defined. #SkipTooBusyErrors; # Parameter: RetryDistantPeers # By default, the extension only retries to send messages if the peer that issued the DIAMETER_TOO_BUSY error is directly connected to # the local peer (not through a Diameter agent). This avoids the situation where the message is sent to a different relay that will deliver # to the same busy peer afterwards. If the parameter is defined, then the extension will also retry sending messages for errors generated in # distant peers. This should increase the chance that the message is delivered, but also can increase the load of the network unnecessarily. # Default: parameter is not defined. #RetryDistantPeers; # Parameter: RetryMaxPeers # This parameter specifies the limit on the number of times a request can be re-sent to a different peer, before the local relay gives up and # forwards the error to upstream. # Default: 0, meaning all possible candidates are attempted before give up. #RetryMaxPeers=0; # Parameter: RelayTimeout # If the value of this parameter is not 0, it specifies the number of milliseconds (1/1000 s) that the local relay waits for an answer to a # forwarded request before considering the remote peer is busy and taking corrective action (similar as if that relay had returned TOO_BUSY status). # Note: this parameter does not apply for requests issued locally. In that case, the extension issuing the request should directly specify the timeout. # Default: 0, meaning that there is no timeout parameter. #RelayTimeout=0; nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/rt_default.conf.sample000066400000000000000000000106541333553357400241060ustar00rootroot00000000000000# This file contains the configuration for the rt_default extension of freeDiameter. # # This extension provides configurable routing properties for freeDiameter. # Lines starting with a # are comments and ignored. ############################################################################## # The freeDiameter daemon will not allow forwarding a message to a peer that: # - already forwarded the message (appear as Route-Record inside the message) # - connection is not in STATE_OPEN state. # We call here "eligible peer" a peer that is not screened out by one of these criteria. # # Even if a peer is specified as route for a message here, the daemon may # choose to send a message to another peer, or return a UNABLE_TO_DELIVER error, if that peer is not eligible # at the time where the message is to be forwarded. # # Note also that defining a peer here will not result in the daemon trying to establish # a connection to this peer. For this purpose, the peer must be defined in the main # configuration (ConnectPeer), or connection established through other means (e.g. dynamic peer # discovery extension). # # The default forwarding behavior of freeDiameter is: # - if the message contains a Destination-Host AVP, and the designated peer is an eligible candidate, send to this peer. # - if a peer does not support the message application or Relay application, give it a penalty for this message # (it means that unless overwritten by an extension, the message will not be sent to that peer) # - if one of the eligible peer advertised a realm matching the message's Destination-Realm, send to this peer. # # The mechanism is as follow: # - the daemon builds a list of eligible peers, then attributes a score to these peers (see enum fd_rt_out_score in freeDiameter.h) # - any number of extensions can register a callback and modify the score # - after all callbacks have been called, the message is sent to the peer with the higher score. If an error is received, it is retried to the next peer in the list, and so on, # until the list is empty. In such situation, an error UNABLE_TO_DELIVER is generated. # # This extension allows to modify the score of some peers based on some criteria of the message. # # Finally, please note that the freeDiameter daemon does not support REDIRECT indications natively. # You have to load the rt_redir extension to add this support. ############################################################################## # This file contains a list of RULE elements. # Each RULE is made of three components: # - a CRITERIA, which specifies which messages the RULE apply to. # - a TARGET string, that specifies which peer(s) in the eligible list the rule is applied to # - and a SCORE, that is added to the matching peer's current score. # # In the following definitions, "STR/REG" stands for: # - a quoted string "some.peer" that will match exactly this string (case-insensitive), or # - a bracket-quoted string ["some regex"] that will be interpreted as a POSIX extended regular expression (case-sensitive), and attempt to match the string. # # The RULE is specified as: # CRITERIA : TARGET += SCORE ; # # The CRITERIA can be: # * -> matches any message. # oh="STR/REG" -> selects the message if the string or regular expression matches the message's Origin-Host AVP content # or="STR/REG" -> idem with Origin-Realm # dh="STR/REG" -> idem with Destination-Host # dr="STR/REG" -> idem with Destination-Realm # un="STR/REG" -> idem with User-Name # si="STR/REG" -> idem with Session-Id # # The TARGET is also of a similar form: # "STR/REG" -> Will apply the score to this peer if its Diameter-Id is matched by the string or regular expression. # rlm="STR/REG" -> Idem with the peer's advertized Diameter-Realm. # # The SCORE is either numeric (positive or negative), or one of the following constants (see values in libfdcore.h): # NO_DELIVERY # DEFAULT # DEFAULT_REALM # REALM # REDIR_HOST # REDIR_APP # REDIR_REALM # REDIR_REALM_APP # REDIR_USER # REDIR_SESSION # FINALDEST # # # Here are some examples: # 1) Rule to add a default next-hop peer to all messages: # * : "proxy.testbed.aaa" += DEFAULT ; # # 2) Rule to route messages for a given realm (realmA) through another realm (realmB): # dr="realmA" : rlm="realmB" += DEFAULT_REALM ; # # 3) Avoid sending messages with decorated NAI to the proxy A: # un=[".+!.+@.+"] : "proxy.A" += NO_DELIVERY ; nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/rt_ereg.conf.sample000066400000000000000000000021141333553357400233740ustar00rootroot00000000000000# This file contains information for configuring the rt_ereg extension. # To find how to have freeDiameter load this extension, please refer to the freeDiameter documentation. # # The rt_ereg extension allows creation of routing rules based on AVP value matching regular expressions. # First, one must indicate which AVP should be used for matching. # At the moment, only AVP with OCTETSTRING types are valid. # AVP = "User-Name"; # This parameter is mandatory. There is no default value. # Then a list of rules follow. A rule has this format: # "pattern" : "server" += score ; # Where: # pattern is the quoted-string regex to match, # server is the next hop in the routing list that will receive the # score, which can be positive or negative. # Example: # "[[:digit:]]*" : "serverA.example.net" += -3 ; # means that if the AVP value is only numeric, the ServerA will have its score decreased by 3 points. # (reminder: the server with the peer with the highest score gets the message) # Note that all rules are tested for each message that contain the AVP, not only the first match. nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/single_host/000077500000000000000000000000001333553357400221365ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/single_host/freeDiameter-1.conf000066400000000000000000000005431333553357400255410ustar00rootroot00000000000000 # -------- Test configuration --------- Identity = "peer1.localdomain"; Realm = "localdomain"; # Port = 3868; # SecPort = 3869; TLS_Cred = "peer1.cert.pem", "peer1.key.pem"; TLS_CA = "cacert.pem"; LoadExtension = "extensions/test_app.fdx" : "test_app1.conf"; ConnectPeer = "peer2.localdomain" { ConnectTo = "127.0.0.1"; No_TLS; port = 30868; }; nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/single_host/freeDiameter-2.conf000066400000000000000000000005221333553357400255370ustar00rootroot00000000000000# -------- Test configuration --------- Identity = "peer2.localdomain"; Realm = "localdomain"; Port = 30868; SecPort = 30869; TLS_Cred = "peer2.cert.pem", "peer2.key.pem"; TLS_CA = "cacert.pem"; LoadExtension = "extensions/test_app.fdx" : "test_app2.conf"; ConnectPeer = "peer1.localdomain" { ConnectTo = "127.0.0.1"; No_TLS; }; nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/single_host/make_certs.sh000066400000000000000000000014371333553357400246140ustar00rootroot00000000000000rm -rf demoCA mkdir demoCA echo 01 > demoCA/serial touch demoCA/index.txt # CA self certificate openssl req -new -batch -x509 -days 3650 -nodes -newkey rsa:1024 -out cacert.pem -keyout cakey.pem -subj /CN=ca.localdomain/C=FR/ST=BdR/L=Aix/O=fD/OU=Tests #peer1 openssl genrsa -out peer1.key.pem 1024 openssl req -new -batch -out peer1.csr.pem -key peer1.key.pem -subj /CN=peer1.localdomain/C=FR/ST=BdR/L=Aix/O=fD/OU=Tests openssl ca -cert cacert.pem -keyfile cakey.pem -in peer1.csr.pem -out peer1.cert.pem -outdir . -batch #peer2 openssl genrsa -out peer2.key.pem 1024 openssl req -new -batch -out peer2.csr.pem -key peer2.key.pem -subj /CN=peer2.localdomain/C=FR/ST=BdR/L=Aix/O=fD/OU=Tests openssl ca -cert cacert.pem -keyfile cakey.pem -in peer2.csr.pem -out peer2.cert.pem -outdir . -batch nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/single_host/test_app1.conf000066400000000000000000000000001333553357400246730ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/single_host/test_app2.conf000066400000000000000000000000001333553357400246740ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/test_app.conf.sample000066400000000000000000000054441333553357400235750ustar00rootroot00000000000000####################### # This file contains the description of configuration and general information about the # "test_app" extension. # This extension provides a simple way to send a predefined message over the Diameter Network. # It may be used to test the Routing or other base mechanisms from the Diameter network. # In order to enable this extension, the main freeDiameter configuration file # must contain the following declaration: # LoadExtension = "extensions/app_test.fdx" : "/path/to/app_test.conf" ; # Note that the conffile may be omitted, in which case default parameters will be assumed. ####################### ####################### # Configuration of the test message # This application is defined as a Vendor-Specific application. # Since freeDiameter does not have a IANA-assigned Vendor ID, we let a configurable value here: # vendor-id = 999999; # The application id. Same remark as previously. # appli-id = 999999; # The command code for Test-Request and Test-Answer. The range 0xfffffe-ffffff (dec: 16777215) is reserved for experimental use. # cmd-id = 16777214; # The AVP id for the test. # avp-id = 345678; # Another AVP id for long payload test. default to value 0, meaning this is not used. # long-avp-id = 0; # Define the payload length of the long-avp. Default 5000 bytes. # long-avp-len = 5000; ####################### # Configuration of the extension behavior # The mode for the extension. # - server: Answer incoming requests. The signal is ignored. # - client: Send a request when the signal is received, and measure the time to receiving answer. # - both: acts as client and server # mode = both; # The behavior can be changed by specifying additional "benchmark;" keyword. # When this keyword appears, it changes the behavior as follow: # - server is silent on message reception, only the activity summary is displayed every 30 seconds # - client attempts to send as many messages as possible during 10 seconds and counts them. # The benchmark keyword can be followed optionally by two integers: # duration is the time for the measurement, in seconds (default 10). # concurrency is the number of messages that can be on the wire before waiting for an answer (default 100). # benchmark [duration concurrency]; ####################### # Client-specific configuration # The Destination-Realm for the message # (default is sending to same realm as local peer). # dest-realm = "foreign.net"; # The Destination-Host for the message. # (default is not providing this AVP). # dest-host = "server.foreign.net"; # The User-Name for the message (may be useful for some routing tests). # (default is not providing this AVP). # user-name = "user@server.foreign.net"; # The signal that triggers sending the test message # Note: Symbolic names are not recognized, you must use integers # signal = 10; nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/test_netemul.conf.sample000066400000000000000000000054461333553357400244700ustar00rootroot00000000000000# This file contains information for configuring the test_netemul extension. # To find how to have freeDiameter load this extension, please refer to the freeDiameter documentation. # # The test_netemul extension implements a Diameter proxy that behaves like simple forwarding agent, # with the exception that it can introduce delay in the forwarding of the messages and generate duplicates # of messages, as can be expected from a real Diameter network. It can also generate routing errors when # connected to more than 2 peers. # LATENCY: # Two parameters are used to control the delay introduced in the messages. # - latency_average: # This is the average delay introduced in the packets. # Set to 0 to not add any latency (beyond the normal processing time). # The value is expressed as an integer followed by a unit which can # be 's' (seconds) or 'ms' (milliseconds). Example: # latency_average = 700 ms; # # - latency_deviation: # This parameter controls the variance in the latency. It is expressed # as a value between 0 % and 100 %. When set to 0 %, all messages will be delayed # by exactly latency_average. Otherwise, it represents the width of the interval # "around" the average where "most" of the latency will be chosen (the distribution # has a Gaussian shape). Example: # latency_deviation = 25 %; # # The default values give an added latency "mostly" between 0.4 and 0.6 seconds: # latency_average = 500 ms; # latency_deviation = 20 % ; # REORDERING: # There is no special control over the reordering of messages. It may simply happen # as a result of the latency. If you want to get a lot of reordering, set the # latency_variance to a high value. # DUPLICATES: # Duplicate messages are expected in the Diameter protocol by design, as a consequence # of the failover mechanism that provides the protocol's reliability. # - dupl_proba: # This value gives the probability of producing a duplicate of a forwarded message. # The value is comprized between 0 (no duplicates) and 1 (duplicate all messages). # Duplicates are created for requests, but may result in duplicate answers # received by your Diameter client(s), depending on your server(s)'s behavior. # In the case of freeDiameter client, the duplicate answer is automatically filtered out # because the hop-by-hop id has already been used. # Note that each duplicate copy is an independent message, # which receives a different latency, and might be routed to a different server if you # use for example load-balancing. # The parameter can take several forms: # dupl_proba = 0 ; # Disables the generation of duplicate messages completely. # dupl_proba = 1 / 10000 ; # dupl_proba = 0.0001 ; # Around 1 messages over ten thousands will be duplicated. # # Default value: # dupl_proba = 1 / 100 ; nextepc-0.3.10/lib/freeDiameter-1.2.1/doc/test_sip.conf.sample000066400000000000000000000003371333553357400236040ustar00rootroot00000000000000#User configuration username = "awestfahl" password = "test" sip_aor = "sip:awestfahl@tera.ics.keio.ac.jp" #Destination information destination_realm = "freediameter.net" destination_sip = "sip:awestfahl@freediameter.net" nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/000077500000000000000000000000001333553357400212525ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/CMakeLists.txt000066400000000000000000000121721333553357400240150ustar00rootroot00000000000000PROJECT("freeDiameter extensions" C) # We want all resulting objects in the same folder SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}) # Use the macro FD_ADD_EXTENSION(name files...) to create an extension # It is equivalent to add_library with the appropriate parameters # and naming conventions (.fdx : FreeDiameter eXtension) MACRO(FD_ADD_EXTENSION EXTNAME) ADD_LIBRARY(${EXTNAME} MODULE ${ARGN}) SET_TARGET_PROPERTIES(${EXTNAME} PROPERTIES PREFIX "" ) SET_TARGET_PROPERTIES(${EXTNAME} PROPERTIES SUFFIX ".fdx" ) ENDMACRO(FD_ADD_EXTENSION) # Use the macro FD_EXTENSION_SUBDIR(extmacroname subdir descr default) to # add a new extension subdirectory. MACRO(FD_EXTENSION_SUBDIR EXTSUBDIR EXTDESCR EXTDEFAULT) STRING(TOUPPER ${EXTSUBDIR} EXTMACRONAME) IF (NOT ALL_EXTENSIONS) OPTION(BUILD_${EXTMACRONAME} "Build ${EXTSUBDIR}.fdx? (${EXTDESCR})" ${EXTDEFAULT}) ENDIF (NOT ALL_EXTENSIONS) IF (BUILD_${EXTMACRONAME} OR ALL_EXTENSIONS) SUBDIRS(${EXTSUBDIR}) ENDIF (BUILD_${EXTMACRONAME} OR ALL_EXTENSIONS) ENDMACRO(FD_EXTENSION_SUBDIR) OPTION(ALL_EXTENSIONS "Build ALL available extensions? (disable to select individual components)" OFF) # The extensions include the headers of freeDiameter that contains gnutls objects INCLUDE_DIRECTORIES(${LFDCORE_INCLUDES}) ########################### # Extensions section #### # Diameter applications dictionaries FD_EXTENSION_SUBDIR(dict_nasreq "NASREQ (RFC4005) Dictionary definitions" ON) FD_EXTENSION_SUBDIR(dict_eap "Diameter EAP (RFC4072) Dictionary definitions" ON) FD_EXTENSION_SUBDIR(dict_dcca "Diameter CC (RFC4006) Dictionary definitions [incomplete]" ON) FD_EXTENSION_SUBDIR(dict_dcca_3gpp "Diameter CC 3GPP Dictionary definitions [incomplete]" ON) FD_EXTENSION_SUBDIR(dict_dcca_starent "Diameter CC Starent Dictionary definitions" ON) FD_EXTENSION_SUBDIR(dict_sip "Diameter SIP (RFC4740) Dictionary definitions" ON) FD_EXTENSION_SUBDIR(dict_mip6a "Diameter Mobile IPv6 Auth Dictionary definitions" ON) FD_EXTENSION_SUBDIR(dict_mip6i "Diameter Mobile IPv6 IKE Dictionary definitions" ON) FD_EXTENSION_SUBDIR(dict_nas_mipv6 "Diameter NAS-to-HAAA Interaction Dictionary definitions" ON) FD_EXTENSION_SUBDIR(dict_rfc5777 "Classification and QoS (RFC 5777) Dictionary definitions" ON) FD_EXTENSION_SUBDIR(dict_legacy_xml "Load Diameter dictionary definitions from XML files." OFF) #### # Diameter applications FD_EXTENSION_SUBDIR(app_acct "Simple accounting application that stores accounting records in flat database" OFF) FD_EXTENSION_SUBDIR(app_diameap "Diameter EAP Application server (RFC 4072)" OFF) FD_EXTENSION_SUBDIR(app_radgw "RADIUS/Diameter gateway translation - RADIUS client to Diameter server" OFF) FD_EXTENSION_SUBDIR(app_sip "Diameter SIP Authentication and Authorization server (RFC 4740)" OFF) FD_EXTENSION_SUBDIR(app_redirect "Diameter Redirect server: send configurable Redirect indications to other peers" OFF) #### # Routing extensions FD_EXTENSION_SUBDIR(rt_busypeers "Handling of Diameter TOO_BUSY messages and relay timeouts" ON) FD_EXTENSION_SUBDIR(rt_default "Configurable routing rules for freeDiameter" ON) FD_EXTENSION_SUBDIR(rt_ereg "Configurable routing based on regexp matching of AVP values" OFF) FD_EXTENSION_SUBDIR(rt_ignore_dh "Stow Destination-Host in Proxy-Info, restore to Origin-Host for answers" ON) FD_EXTENSION_SUBDIR(rt_load_balance "Balance load over multiple equal hosts, based on outstanding requests" ON) FD_EXTENSION_SUBDIR(rt_randomize "Randomly choose one of the highest scored hosts and increase its score by one" ON) FD_EXTENSION_SUBDIR(rt_redirect "Handling of Diameter Redirect messages" ON) #### # Peers security extensions FD_EXTENSION_SUBDIR(acl_wl "White-list based authorization of incoming connections" ON) #### # Debug & test extensions FD_EXTENSION_SUBDIR(dbg_monitor "Outputs periodical status information" ON) FD_EXTENSION_SUBDIR(dbg_msg_timings "Show some timing information for messages" ON) FD_EXTENSION_SUBDIR(dbg_msg_dumps "Show human-readable content of the received & sent messages" ON) FD_EXTENSION_SUBDIR(dbg_rt "Routing extension for debugging the routing module" ON) FD_EXTENSION_SUBDIR(test_app "Testing application to send dummy message to another peer, like a Diameter 'ping'" OFF) FD_EXTENSION_SUBDIR(test_sip "Testing application to simulate Diameter-SIP client (RFC4740)" OFF) FD_EXTENSION_SUBDIR(dbg_interactive "Python-interpreter based module" OFF) FD_EXTENSION_SUBDIR(test_netemul "Simple Diameter network emulator proxy extension (latency, PDV, duplicates)" OFF) # The following extension have very little use except for specific tests, so we disable them except in Debug configurations. IF (CMAKE_BUILD_TYPE MATCHES "Debug") FD_EXTENSION_SUBDIR(_sample "Simple extension to demonstrate extension mechanism, for developpers" OFF) FD_EXTENSION_SUBDIR(test_acct "Receive Accounting-Requests and display the data, but no storage" OFF) FD_EXTENSION_SUBDIR(test_rt_any "Routing extension randomly sending message to any peer available, for testing purpose" OFF) ENDIF (CMAKE_BUILD_TYPE MATCHES "Debug") nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/Makefile.am000066400000000000000000000003651333553357400233120ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in SUBDIRS = \ dbg_msg_dumps dict_rfc5777 dict_mip6i \ dict_nasreq dict_nas_mipv6 \ dict_dcca dict_dcca_3gpp dict_s6a MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/_sample/000077500000000000000000000000001333553357400226725ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/_sample/CMakeLists.txt000066400000000000000000000005271333553357400254360ustar00rootroot00000000000000# The sample extension PROJECT("Sample extension") # Compile as a module FD_ADD_EXTENSION(dbg_sample sample.c hello.cpp fini.c) #### ## INSTALL section ## # Uncomment the following lines to have the extension installed # INSTALL(TARGETS dbg_sample # LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} # COMPONENT freeDiameter-debug-tools) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/_sample/fini.c000066400000000000000000000047551333553357400237760ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2011, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include /* The function MUST be called this */ void fd_ext_fini(void) { /* This code is executed when the daemon is exiting; cleanup management should be placed here */ TRACE_DEBUG(INFO, "Extension is terminated... Bye!"); return ; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/_sample/hello.cpp000066400000000000000000000047441333553357400245120ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Sample file demonstrating how to write some C++ code */ #include #include extern "C" void mycppfunc(); /* will be called from C code */ void mycppfunc() { std::cout << "Hello World!" << std::endl; /* done */ } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/_sample/sample.c000066400000000000000000000110661333553357400243230ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Sample extension to test extensions mechanism in freeDiameter */ #include /* from sample.cpp */ void mycppfunc(); static int sample_main(char * conffile); /* Define the entry point. A convenience macro is provided */ EXTENSION_ENTRY("sample", sample_main); /* The extension-specific initialization code */ static int sample_main(char * conffile) { /* The debug macro from main tree can be used the same way */ TRACE_ENTRY("%p", conffile); /* This is how we access daemon's global vars */ fprintf(stdout, "I am extension " __FILE__ " running on host %s.", fd_g_config->cnf_diamid); /* The configuration file name is received in the conffile var. It's up to extension to parse it */ if (conffile) { fprintf(stdout, "I should parse my configuration file there: %s\n", conffile); } else { fprintf(stdout, "I received no configuration file to parse\n"); } /* Functions from the libfreediameter can also be used as demonstrated here: */ TRACE_DEBUG(INFO, "Let's create that 'Example-AVP'..."); { struct dict_object * origin_host_avp = NULL; struct dict_object * session_id_avp = NULL; struct dict_object * example_avp_avp = NULL; struct dict_rule_data rule_data = { NULL, RULE_REQUIRED, 0, -1, 1 }; struct dict_avp_data example_avp_data = { 999999, 0, "Example-AVP", AVP_FLAG_VENDOR , 0, AVP_TYPE_GROUPED }; CHECK_FCT( fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Host", &origin_host_avp, ENOENT)); CHECK_FCT( fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Session-Id", &session_id_avp, ENOENT)); CHECK_FCT( fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &example_avp_data , NULL, &example_avp_avp )); rule_data.rule_avp = origin_host_avp; rule_data.rule_min = 1; rule_data.rule_max = 1; CHECK_FCT( fd_dict_new ( fd_g_config->cnf_dict, DICT_RULE, &rule_data, example_avp_avp, NULL )); rule_data.rule_avp = session_id_avp; rule_data.rule_min = 1; rule_data.rule_max = -1; CHECK_FCT( fd_dict_new ( fd_g_config->cnf_dict, DICT_RULE, &rule_data, example_avp_avp, NULL )); } TRACE_DEBUG(INFO, "'Example-AVP' created without error"); /* Call the c++ function */ mycppfunc(); /* The initialization function returns an error code with the standard POSIX meaning (ENOMEM, and so on) */ return 0; } /* See file fini.c for an example of destructor */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/acl_wl/000077500000000000000000000000001333553357400225135ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/acl_wl/CMakeLists.txt000066400000000000000000000011561333553357400252560ustar00rootroot00000000000000# The acl_wl extension PROJECT("Access Control / White List" C) # Parser files BISON_FILE(aw_conf.y) FLEX_FILE(aw_conf.l) SET_SOURCE_FILES_PROPERTIES(lex.aw_conf.c aw_conf.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}") # List of source files SET( ACL_WL_SRC acl_wl.h acl_wl.c aw_tree.c lex.aw_conf.c aw_conf.tab.c aw_conf.tab.h ) # Compile as a module FD_ADD_EXTENSION(acl_wl ${ACL_WL_SRC}) #### ## INSTALL section ## # We install with the daemon component because it is a base feature. INSTALL(TARGETS acl_wl LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-daemon) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/acl_wl/acl_wl.c000066400000000000000000000102341333553357400241200ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2011, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* * Whitelist extension for freeDiameter. */ #include "acl_wl.h" /* The validator function */ static int aw_validate(struct peer_info * info, int * auth, int (**cb2)(struct peer_info *)) { int res; TRACE_ENTRY("%p %p %p", info, auth, cb2); CHECK_PARAMS(info && auth && cb2); /* We don't use the second callback */ *cb2 = NULL; /* Default to unknown result */ *auth = 0; /* Now search the peer in our tree */ CHECK_FCT( aw_tree_lookup(info->pi_diamid, &res) ); if (res < 0) { /* The peer is not whitelisted */ return 0; } /* We found the peer in the tree, now check the status */ /* First, if TLS is already in place, just accept */ if (info->runtime.pir_cert_list) { *auth = 1; return 0; } /* Now, if we did not specify any flag, reject */ if (res == 0) { TRACE_DEBUG(INFO, "Peer '%s' rejected, only TLS-protected connection is whitelisted.", info->pi_diamid); /* We don't actually set *auth = -1, leave space for a further extension to validate the peer */ return 0; } /* Otherwise, just set the configured flags for the peer, and authorize it */ *auth = 1; /* Save information about the security mechanism to use after CER/CEA exchange */ if ((res & PI_SEC_NONE) && (res & PI_SEC_TLS_OLD)) res = PI_SEC_NONE; /* If we authorized it, we must have an IPsec tunnel setup, no need for TLS in this case */ info->config.pic_flags.sec = res; return 0; } /* entry point */ static int aw_entry(char * conffile) { TRACE_ENTRY("%p", conffile); CHECK_PARAMS(conffile); /* Parse configuration file */ CHECK_FCT( aw_conf_handle(conffile) ); TRACE_DEBUG(INFO, "Extension ACL_wl initialized with configuration: '%s'", conffile); if (TRACE_BOOL(ANNOYING)) { aw_tree_dump(); } /* Register the validator function */ CHECK_FCT( fd_peer_validate_register ( aw_validate ) ); return 0; } /* Unload */ void fd_ext_fini(void) { /* Destroy the tree */ aw_tree_destroy(); } EXTENSION_ENTRY("acl_wl", aw_entry); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/acl_wl/acl_wl.h000066400000000000000000000056531333553357400241360ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2011, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Header file for the acl_wl extension. * * This extension provides a simple mechanism to allow connections from remote peers * without actively maintaining a connection to these peers. * * See the acl_wl.conf.sample file for the format of the configuration file. */ #include /* Parse the configuration file */ int aw_conf_handle(char * conffile); /* Add to the tree (name is \0 terminated) */ int aw_tree_add(char * name, int flags); /* Search in the tree. On return, *result = -1: not found; >=0: found with PI_SEC_* flags */ int aw_tree_lookup(char * name, int * result); /* Cleanup the tree */ void aw_tree_destroy(void); /* For debug */ void aw_tree_dump(void); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/acl_wl/aw_conf.l000066400000000000000000000076561333553357400243220ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Lex extension's configuration parser. * * The configuration file contains a default priority, and a list of peers with optional overwite priority. * -- see the app_test.conf.sample file for more detail. */ %{ #include "acl_wl.h" /* Include yacc tokens definitions */ #include "aw_conf.tab.h" /* Update the column information */ #define YY_USER_ACTION { \ yylloc->first_column = yylloc->last_column + 1; \ yylloc->last_column = yylloc->first_column + yyleng - 1; \ } /* Avoid warning with newer flex */ #define YY_NO_INPUT static int curflag = 0; %} %option bison-bridge bison-locations %option noyywrap %option nounput %% /* Update the line count, reset flag value */ \n { yylloc->first_line++; yylloc->last_line++; yylloc->last_column=0; curflag = 0; } /* Eat all spaces but not new lines */ ([[:space:]]{-}[\n])+ ; /* Eat all comments */ #.*$ ; /* Match the two allowed flags directly in LEX */ ALLOW_IPSEC { curflag |= PI_SEC_NONE; } ALLOW_OLD_TLS { curflag |= PI_SEC_TLS_OLD; } /* Any other string is considered a fqdn or partial fqdn with a star. The star can only be the first label. */ (\*|[[:alnum:]][[:alnum:]-]*)(\.[[:alnum:]][[:alnum:]-]*)+ { /* We matched a valid label, let's directly save it into the tree. The function will issue the appropriate warnings. */ CHECK_FCT_DO( aw_tree_add(yytext, curflag), return LEX_ERROR); yylval->string = yytext; return FQDN; } /* No match */ <*>[[:alnum:]]+ | /* This rule is only useful to print a complete token in error messages */ <*>. { TRACE_ERROR("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); return LEX_ERROR; } %% nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/acl_wl/aw_conf.y000066400000000000000000000112571333553357400243270ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Yacc extension's configuration parser. * See doc/acl_wl.conf.sample for configuration file format */ /* For development only : */ %debug %error-verbose /* The parser receives the configuration file filename as parameter */ %parse-param {char * conffile} /* Keep track of location */ %locations %pure-parser %{ #include "acl_wl.h" #include "aw_conf.tab.h" /* bison is not smart enough to define the YYLTYPE before including this code, so... */ #include #include /* Forward declaration */ int yyparse(char * conffile); static int fqdn_added = 0; /* Parse the configuration file */ int aw_conf_handle(char * conffile) { extern FILE * aw_confin; int ret; TRACE_ENTRY("%p", conffile); TRACE_DEBUG (FULL, "Parsing configuration file: %s...", conffile); aw_confin = fopen(conffile, "r"); if (aw_confin == NULL) { ret = errno; fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret)); TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file."); return ret; } ret = yyparse(conffile); fclose(aw_confin); if (ret != 0) { TRACE_DEBUG (INFO, "Unable to parse the configuration file."); return EINVAL; } else { TRACE_DEBUG(FULL, "Read %d FQDN entries successfully.", fqdn_added); } return 0; } /* The Lex parser prototype */ int aw_conflex(YYSTYPE *lvalp, YYLTYPE *llocp); /* Function to report the errors */ void yyerror (YYLTYPE *ploc, char * conffile, char const *s) { TRACE_DEBUG(INFO, "Error in configuration parsing"); if (ploc->first_line != ploc->last_line) fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); else if (ploc->first_column != ploc->last_column) fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); else fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); } %} /* Values returned by lex for token */ %union { char *string; } /* In case of error in the lexical analysis */ %token LEX_ERROR /* Key words */ %token FQDN /* -------------------------------------- */ %% /* The grammar definition */ conffile: /* empty grammar is OK */ | conffile FQDN { fqdn_added++; TRACE_DEBUG(FULL, "Added FQDN: %s", $2); } | conffile LEX_ERROR { yyerror(&yylloc, conffile, "An error occurred while parsing the configuration file"); return EINVAL; } ; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/acl_wl/aw_tree.c000066400000000000000000000303611333553357400243100ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "acl_wl.h" /* The configuration simply contains the allowed fqdn and/or domains (*.example.net) * It is represented similarly to the DNS tree: * (root)--___ * / \ \ * tld1 tld2 (tld3...) * / | * label1 label2 * / \ * lbl21 lbl22 * / \ * lbl211 * * * This tree would whitelist: * - label1.tld1 * - lbl211.lbl21.label2.tld2 * - *.lbl22.label2.tld2 * * The functions to add and search the tree are in aw_tree.c. * */ /* Maximum depth of the tree. We set a static size to avoid dynamic allocations. We report an error if this is not sufficient. */ #define AW_TREE_MAXDEPTH 10 /* An element of the tree */ struct tree_item { struct fd_list chain; /* Link to elements at the same level. Ordered alphabetically. */ struct fd_list children; /* Sentinel for the subtree. */ char * str; /* the \0 terminated label, or NULL if it is a generic container ("*") */ int flags; /* PI_SEC_* flags */ int leaf; /* true if this item can be a leaf of the tree */ }; /* The root of the tree */ static struct fd_list tree_root = FD_LIST_INITIALIZER(tree_root); /* Note: we don't need to lock, since we add only when parsing the conf, and then read only */ /* The parsed name */ struct split_name { struct { char * str; /* start of this label */ size_t len; /* length of this label. It does not include the final "." or "\0" */ } label[AW_TREE_MAXDEPTH]; int last_lbl; /* idx of last label defined */ }; /* The following function explodes a name into a split_name structure */ static int parse_name(char * name, struct split_name * result) { int i, l, prev_offset; TRACE_ENTRY("%p %p", name, result); /* First, initialize the result array */ memset(result, 0, sizeof(struct split_name)); result->label[0].str = name; l = 0; prev_offset = 0; for (i=0; name[i] != '\0'; i++) { if (name[i]=='.') { l++; CHECK_PARAMS( l < AW_TREE_MAXDEPTH ); /* The previous label is complete, write its size */ result->label[l - 1].len = i - prev_offset; prev_offset = i + 1; /* Write the start of the new label */ result->label[l].str = name + i + 1; } } /* Finally, write the size of the last label */ result->label[l].len = i - prev_offset; result->last_lbl = l; #if 0 fd_log_debug("Parsed name %s as:", name); for (i=0; i<=l; i++) fd_log_debug(" str[%d] len: %d, v:%.*s", i, result->label[i].len, result->label[i].len, result->label[i].str); #endif /* 0 */ return 0; } /* Create a new tree_item structure */ static struct tree_item * new_ti(char * str, size_t len, int flags, int leaf) { struct tree_item * ti; char * s = NULL; TRACE_ENTRY("%p %zd %x", str, len, flags); if (str) { CHECK_MALLOC_DO(s = malloc(len + 1), return NULL); memcpy(s, str, len); s[len] = '\0'; } CHECK_MALLOC_DO( ti = malloc(sizeof(struct tree_item)), {free(s); return NULL; } ); memset(ti, 0, sizeof(struct tree_item)); fd_list_init(&ti->chain, ti); fd_list_init(&ti->children, ti); ti->str = s; ti->flags = flags; ti->leaf = leaf; return ti; } /* Recursively delete a subtree */ static void delete_tree(struct fd_list * senti) { while (!FD_IS_LIST_EMPTY(senti)) { struct tree_item * ti = (struct tree_item *)(senti->next); /* Delete recursively its children first */ delete_tree(&ti->children); /* Now, unlink from the sentinel list */ fd_list_unlink(&ti->chain); /* destroy this tree item */ free(ti->str); free(ti); } } /* Top-level destroy function */ void aw_tree_destroy(void) { delete_tree(&tree_root); } /* Display the content of a subtree */ static void tree_dump(struct fd_list * sub, int indent) { struct fd_list * li; for (li = sub->next; li != sub; li = li->next) { struct tree_item * ti = (struct tree_item *)li; char buf[1024]; snprintf(buf, sizeof(buf), "%*s%s", indent * 2, "", ti->str?:"*"); if (ti->leaf) snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), " (flag:%x)", ti->flags); fd_log_debug("%s", buf); tree_dump(&ti->children, indent + 1); } } /* Top-level function */ void aw_tree_dump(void) { fd_log_debug("[acl_wl] tree dump:"); fd_log_debug("(root)"); tree_dump(&tree_root, 1); fd_log_debug("[acl_wl] end of dump"); } /* Function to add a new entry in the tree */ int aw_tree_add(char * name, int flags) { struct split_name sn; struct tree_item * ti; struct fd_list * li, *senti; int lbl, found; TRACE_ENTRY("%p %x", name, flags); CHECK_PARAMS(name && *name); CHECK_FCT_DO( parse_name(name, &sn), { fd_log_debug("The name '%s' contains too many labels, try a generic (*) or recompile with bigger AW_TREE_MAXDEPTH value (cur: %d)", name, AW_TREE_MAXDEPTH); return EINVAL; } ); senti = &tree_root; for (lbl = sn.last_lbl; lbl > 0; lbl--) { /* Check if the list is empty, we can directly create the new entry */ if (FD_IS_LIST_EMPTY(senti)) { CHECK_MALLOC( ti = new_ti(sn.label[lbl].str, sn.label[lbl].len, 0, 0 /* flags are only set in the terminals */) ); /* Insert this label in the sentinel sublist */ fd_list_insert_after(senti, &ti->chain); /* Update the sentinel */ senti = &ti->children; /* loop to the next label */ continue; } /* Check if we have a '*' element already that overlapses */ ti = (struct tree_item *)(senti->next); if (ti->str == NULL) { fd_log_debug("[acl_wl] Warning: entry '%s' is superseeded by a generic entry at label %d, ignoring.", name, lbl + 1); return 0; } /* Search this label in the ordered list */ found = 0; for (li = senti->next; li != senti; li=li->next) { int cmp, len; ti = (struct tree_item *)li; cmp = strncasecmp(ti->str, sn.label[lbl].str, sn.label[lbl].len); if (cmp > 0) break; /* the new label must be inserted before li */ if (cmp < 0) continue; /* Check the lengths */ len = strlen(ti->str); if (len > sn.label[lbl].len) break; /* the new label must be inserted before li */ if (len < sn.label[lbl].len) continue; /* We already had this label */ found = 1; senti = &ti->children; break; } if (found) continue; /* Otherwise, we have to create a new ti, and add it before li */ CHECK_MALLOC( ti = new_ti(sn.label[lbl].str, sn.label[lbl].len, 0, 0 /* flags are only set in the terminals */) ); /* Insert this label in the sentinel sublist */ fd_list_insert_before(li, &ti->chain); /* Update the sentinel */ senti = &ti->children; } ti = NULL; li = senti; /* At this point, senti points to the list where we are supposed to insert our last label. */ if (sn.label[0].str[0] == '*') { if (!FD_IS_LIST_EMPTY(senti)) { fd_log_debug("[acl_wl] Warning: entry '%s' overwrites previous more detailed entries, these are deleted.", name); delete_tree(senti); } /* Create the new entry */ CHECK_MALLOC( ti = new_ti(NULL, 0, flags, 1) ); } else { if (!FD_IS_LIST_EMPTY(senti)) { /* Check we don't have a '*' entry already */ ti = (struct tree_item *)(senti->next); if (ti->str == NULL) { fd_log_debug("[acl_wl] Warning: entry '%s' is superseeded by a generic entry at label 1, ignoring.", name); return 0; } /* Search the place for the new label */ for (li = senti->next; li != senti; li=li->next) { int cmp, len; ti = (struct tree_item *)li; cmp = strncasecmp(ti->str, sn.label[0].str, sn.label[0].len); if (cmp > 0) break; /* the new label must be inserted before li */ if (cmp < 0) continue; /* Check the lengths */ len = strlen(ti->str); if (len > sn.label[0].len) break; /* the new label must be inserted before li */ if (len < sn.label[0].len) continue; /* We already had this label */ if (ti->leaf) { fd_log_debug("[acl_wl] Warning: entry '%s' is duplicated, merging the flags.", name); ti->flags |= flags; return 0; } else { /* Just mark this entry as a valid leaf also */ ti->leaf = 1; ti->flags = flags; return 0; } } } /* Create the new entry */ CHECK_MALLOC( ti = new_ti(sn.label[0].str, sn.label[0].len, flags, 1) ); } /* The new label is "ti", it is inserted before "li" */ fd_list_insert_before(li, &ti->chain); /* Done! */ return 0; } /* Search in the tree. On return, *result = -1: not found; >=0: found with PI_SEC_* flags */ int aw_tree_lookup(char * name, int * result) { struct split_name sn; int lbl, found; struct tree_item * ti; struct fd_list * senti, *li; TRACE_ENTRY("%p %p", name, result); CHECK_PARAMS(name && result); /* Initialize */ *result = -1; /* Parse the name into labels */ CHECK_FCT_DO( parse_name(name, &sn), { TRACE_DEBUG(INFO, "Too many labels in this name, it cannot be found in the tree, skipping."); return 0; } ); senti = &tree_root; for (lbl = sn.last_lbl; lbl >= 0; lbl--) { /* Check if the list is empty, we can directly return */ if (FD_IS_LIST_EMPTY(senti)) { /* The item is not found */ return 0; } /* Check if we have a '*' element */ ti = (struct tree_item *)(senti->next); if (ti->str == NULL) { TRACE_DEBUG(ANNOYING, "[acl_wl] %s matched at label %d with a generic entry.", name, lbl + 1); *result = ti->flags; return 0; } /* Search this label in the ordered list */ found = 0; for (li = senti->next; li != senti; li=li->next) { int cmp, len; ti = (struct tree_item *)li; cmp = strncasecmp(ti->str, sn.label[lbl].str, sn.label[lbl].len); if (cmp > 0) return 0; /* the label was not found */ if (cmp < 0) continue; /* Check the lengths */ len = strlen(ti->str); if (len > sn.label[lbl].len) return 0; /* the label was not found */ if (len < sn.label[lbl].len) continue; /* We found the label */ found = 1; senti = &ti->children; break; } if (!found) return 0; /* label not found */ /* otherwise, continue, sentinel has been updated */ } /* At the end, ti points to the correct leaf */ if (!ti->leaf) return 0; TRACE_DEBUG(ANNOYING, "[acl_wl] %s matched exactly.", name); *result = ti->flags; return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_acct/000077500000000000000000000000001333553357400230245ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_acct/CMakeLists.txt000066400000000000000000000015551333553357400255720ustar00rootroot00000000000000# The app_acct extension PROJECT("Simple Accounting server" C) ######################## # Search for libpg (postgresql package) FIND_PACKAGE(PostgreSQL REQUIRED) INCLUDE_DIRECTORIES(${POSTGRESQL_INCLUDE_DIR}) ######################## # Parser files BISON_FILE(acct_conf.y) FLEX_FILE(acct_conf.l) SET_SOURCE_FILES_PROPERTIES(lex.acct_conf.c acct_conf.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}") # List of source files SET( APP_ACCT_SRC app_acct.h app_acct.c acct_db.c acct_records.c ) SET( APP_ACCT_SRC_GEN lex.acct_conf.c acct_conf.tab.c acct_conf.tab.h ) # Compile as a module FD_ADD_EXTENSION(app_acct ${APP_ACCT_SRC} ${APP_ACCT_SRC_GEN}) TARGET_LINK_LIBRARIES(app_acct ${POSTGRESQL_LIBRARIES}) #### ## INSTALL section ## INSTALL(TARGETS app_acct LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-accounting-server) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_acct/acct_conf.l000066400000000000000000000110111333553357400251120ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Lex extension's configuration parser. * */ %{ #include "app_acct.h" #include "acct_conf.tab.h" /* Update the column information */ #define YY_USER_ACTION { \ yylloc->first_column = yylloc->last_column + 1; \ yylloc->last_column = yylloc->first_column + yyleng - 1; \ } /* Avoid warning with newer flex */ #define YY_NO_INPUT %} %option bison-bridge bison-locations %option noyywrap %option nounput /* Quoted string. Multilines do not match. */ qstring \"[^\"\n]*\" %% /* Update the line count */ \n { yylloc->first_line++; yylloc->last_line++; yylloc->last_column=0; } /* Eat all spaces but not new lines */ ([[:space:]]{-}[\n])+ ; /* Eat all comments */ #.*$ ; /* Recognize any integer */ [-]?[[:digit:]]+ { /* Convert this to an integer value */ int ret=0; ret = sscanf(yytext, "%i", &yylval->integer); if (ret != 1) { /* No matching: an error occurred */ fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); return LEX_ERROR; /* trig an error in yacc parser */ /* Maybe we could REJECT instead of failing here? */ } return INTEGER; } /* Recognize quoted strings -- we do not support escaped \" in the string currently. */ {qstring} { /* Match a quoted string. Let's be very permissive. */ yylval->string = strdup(yytext+1); if (!yylval->string) { fd_log_debug("Unable to copy the string '%s': %s", yytext, strerror(errno)); TRACE_DEBUG(INFO, "strdup failed"); return LEX_ERROR; /* trig an error in yacc parser */ } yylval->string[strlen(yytext) - 2] = '\0'; return QSTRING; } /* Recognize the tokens */ (?i:"ConnInfo") { return CONNINFO; } (?i:"Table") { return TABLE; } (?i:"Timestamp_field") { return TSFIELD; } (?i:"Server_name_field") { return SRVNFIELD; } (?i:"field") { return FIELD; } (?i:"required") { return REQUIRED; } (?i:"multi") { return MULTI; } /* Valid single characters for yyparse */ [=;{}] { return yytext[0]; } /* Unrecognized sequence, if it did not match any previous pattern */ [^[:space:]"*=>;\n]+ { fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); return LEX_ERROR; } %% nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_acct/acct_conf.y000066400000000000000000000231501333553357400251360ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2015, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Yacc extension's configuration parser. * See doc/app_acct.conf.sample for configuration file format */ /* For development only : */ %debug %error-verbose /* The parser receives the configuration file filename as parameter */ %parse-param {char * conffile} /* Keep track of location */ %locations %pure-parser %{ #include "app_acct.h" #include "acct_conf.tab.h" #include #include /* Forward declaration */ int yyparse(char * conffile); /* The Lex parser prototype */ int acct_conflex(YYSTYPE *lvalp, YYLTYPE *llocp); /* the global configuration */ struct acct_conf * acct_config = NULL; /* Initialize the blank configuration structure */ int acct_conf_init(void) { TRACE_ENTRY(); CHECK_MALLOC( acct_config = malloc(sizeof(struct acct_conf)) ); memset(acct_config, 0, sizeof(struct acct_conf) ); fd_list_init(&acct_config->avps, NULL); return 0; } /* Validate and eventually display the content of the configuration file for debug */ int acct_conf_check(char * conffile) { CHECK_PARAMS(acct_config); if ( ! acct_config->conninfo) { fd_log_debug("[app_acct] ERROR: 'ConnInfo' is missing in file '%s'." " You can specify 'ConnInfo=\"\";' to use default parameters.", conffile); return EINVAL; } if ( ! acct_config->tablename) { fd_log_debug("[app_acct] ERROR: 'Table' value is missing in file '%s'.", conffile); return EINVAL; } if (!TRACE_BOOL(FULL)) return 0; struct fd_list * li; fd_log_debug("[app_acct] Configuration dump:"); fd_log_debug(" Database:"); fd_log_debug(" ConnInfo ...... : '%s'", acct_config->conninfo ?: ""); fd_log_debug(" Table name .... : '%s'", acct_config->tablename ?: ""); fd_log_debug(" Timestamp field : '%s'", acct_config->tsfield ?: ""); fd_log_debug(" Server name fld : '%s'", acct_config->srvnfield ?: ""); fd_log_debug(" AVPs that will be saved to the database:"); for (li = acct_config->avps.next; li != &acct_config->avps; li = li->next) { struct acct_conf_avp * a = (struct acct_conf_avp *)li; fd_log_debug(" %-*s AVP%s saved in ", 30, a->avpname, a->required ? " [required]":"" ); if (a->multi) { fd_log_debug("fields '%s[1..%d]' ", a->field?:a->avpname, a->multi); } else { fd_log_debug("field '%s' ", a->field?:a->avpname); } fd_log_debug("as ::%s", diam2db_types_mapping[a->avptype]); } fd_log_debug("[app_acct] Complete."); return 0; } void acct_conf_free(void) { TRACE_ENTRY(); if (!acct_config) return; /* Destroy the list */ while (!FD_IS_LIST_EMPTY(&acct_config->avps)) { struct acct_conf_avp * a = (struct acct_conf_avp *)(acct_config->avps.next); fd_list_unlink(&a->chain); free(a->avpname); free(a->field); free(a); } /* destroy other data */ free(acct_config->conninfo); free(acct_config->tablename); free(acct_config->tsfield); free(acct_config->srvnfield); /* Done */ free(acct_config); acct_config = NULL; } /* Parse the configuration file */ int acct_conf_parse(char * conffile) { extern FILE * acct_confin; int ret; TRACE_ENTRY("%p", conffile); TRACE_DEBUG (FULL, "Parsing configuration file: %s...", conffile); acct_confin = fopen(conffile, "r"); if (acct_confin == NULL) { ret = errno; fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret)); return ret; } ret = yyparse(conffile); fclose(acct_confin); if (ret != 0) { TRACE_DEBUG (INFO, "Unable to parse the configuration file."); return EINVAL; } return 0; } /* Function to report the errors */ void yyerror (YYLTYPE *ploc, char * conffile, char const *s) { LOG_E( "Error in configuration parsing"); if (ploc->first_line != ploc->last_line) LOG_E("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); else if (ploc->first_column != ploc->last_column) LOG_E("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); else LOG_E("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); } static struct acct_conf_avp avpdata; %} /* Values returned by lex for token */ %union { char *string; /* The string is allocated by strdup in lex.*/ int integer; /* Store integer values */ } /* In case of error in the lexical analysis */ %token LEX_ERROR /* Keywords */ %token FIELD %token REQUIRED %token MULTI %token CONNINFO %token TABLE %token TSFIELD %token SRVNFIELD /* Tokens and types */ /* A (de)quoted string (malloc'd in lex parser; it must be freed after use) */ %token QSTRING /* An integer value */ %token INTEGER /* -------------------------------------- */ %% /* The grammar definition */ conffile: /* empty grammar is OK for the parser (will be validated afterwards) */ | conffile avpline | conffile conninfoline | conffile tableline | conffile tsfieldline | conffile srvnfieldline | conffile errors { yyerror(&yylloc, conffile, "An error occurred while parsing the configuration file."); return EINVAL; } ; /* Catch lexical and syntax errors */ errors: LEX_ERROR | error ; /* The tokens */ avpline: { memset(&avpdata, 0, sizeof(struct acct_conf_avp)); } QSTRING avpcontents ';' { struct acct_conf_avp *new; struct dict_object * dict; struct dict_avp_data dictdata; /* Validate the avp name first */ CHECK_FCT_DO( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME_ALL_VENDORS, $2, &dict, ENOENT), { yyerror (&yylloc, conffile, "AVP definition not found in the dictionary. Was the appropriate dict_*.fdx extension loaded?"); YYERROR; } ); CHECK_FCT( fd_dict_getval( dict, &dictdata )); /* Create a new entry */ CHECK_MALLOC_DO( new = malloc(sizeof(struct acct_conf_avp)), { yyerror (&yylloc, conffile, "Out of memory"); YYERROR; } ); /* Retrieve all the data from avpcontents parsing (field, required, multi) */ memcpy(new, &avpdata, sizeof(struct acct_conf_avp)); /* Initialize the other data */ fd_list_init(&new->chain, NULL); new->avpname = $2; new->avpobj = dict; new->avptype = dictdata.avp_basetype; /* Add this new entry at the end of the list */ fd_list_insert_before( &acct_config->avps, &new->chain ); } ; avpcontents: /* Empty content is fine */ | '=' '{' avpflagline '}' ; avpflagline: /* Empty flags is also fine */ | avpflagline FIELD '=' QSTRING ';' { if (avpdata.field) { yyerror (&yylloc, conffile, "Duplicate entry"); YYERROR; } avpdata.field = $4; } | avpflagline REQUIRED ';' { avpdata.required = 1; } | avpflagline MULTI '=' INTEGER ';' { avpdata.multi = (unsigned) $4; } ; conninfoline: CONNINFO '=' QSTRING ';' { if (acct_config->conninfo) { yyerror (&yylloc, conffile, "Duplicate entry"); YYERROR; } acct_config->conninfo = $3; } ; tableline: TABLE '=' QSTRING ';' { if (acct_config->tablename) { yyerror (&yylloc, conffile, "Duplicate entry"); YYERROR; } acct_config->tablename = $3; } ; tsfieldline: TSFIELD '=' QSTRING ';' { if (acct_config->tsfield) { yyerror (&yylloc, conffile, "Duplicate entry"); YYERROR; } acct_config->tsfield = $3; } ; srvnfieldline: SRVNFIELD '=' QSTRING ';' { if (acct_config->srvnfield) { yyerror (&yylloc, conffile, "Duplicate entry"); YYERROR; } acct_config->srvnfield = $3; } ; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_acct/acct_db.c000066400000000000000000000256301333553357400245550ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Database interface module */ /* There is one connection to the db per thread. The connection is stored in the pthread_key_t variable */ #include "app_acct.h" #include const char * diam2db_types_mapping[AVP_TYPE_MAX + 1] = { "" /* AVP_TYPE_GROUPED */, "bytea" /* AVP_TYPE_OCTETSTRING */, "integer" /* AVP_TYPE_INTEGER32 */, "bigint" /* AVP_TYPE_INTEGER64 */, "integer" /* AVP_TYPE_UNSIGNED32 + cast */, "bigint" /* AVP_TYPE_UNSIGNED64 + cast */, "real" /* AVP_TYPE_FLOAT32 */, "double precision" /* AVP_TYPE_FLOAT64 */ }; static const char * stmt = "acct_db_stmt"; #ifndef TEST_DEBUG static #endif /* TEST_DEBUG */ pthread_key_t connk; static char * sql = NULL; /* The buffer that will contain the SQL query */ static int nbrecords = 0; /* Initialize the database context: connection to the DB, prepared statement to insert new records */ int acct_db_init(void) { struct acct_record_list emptyrecords; struct fd_list * li; size_t sql_allocd = 0; /* The malloc'd size of the buffer */ size_t sql_offset = 0; /* The actual data already written in this buffer */ int idx = 0; PGresult * res; PGconn *conn; #define REALLOC_SIZE 1024 /* We extend the buffer by this amount */ TRACE_ENTRY(); CHECK_PARAMS( acct_config && acct_config->conninfo && acct_config->tablename ); CHECK_PARAMS_DO( PQisthreadsafe() == 1, { fd_log_debug("You PostGreSQL installation is not thread-safe!"); return EINVAL; } ); /* Use the information from acct_config to create the connection and prepare the query */ conn = PQconnectdb(acct_config->conninfo); /* Check to see that the backend connection was successfully made */ if (PQstatus(conn) != CONNECTION_OK) { fd_log_debug("Connection to database failed: %s", PQerrorMessage(conn)); acct_db_free(); return EINVAL; } if (PQprotocolVersion(conn) < 3) { fd_log_debug("Database protocol version is too old, version 3 is required for prepared statements."); acct_db_free(); return EINVAL; } TRACE_DEBUG(FULL, "Connection to database successful, server version %d.", PQserverVersion(conn)); /* Now, prepare the request object */ /* First, we build the list of AVP we will insert in the database */ CHECK_FCT( acct_rec_prepare(&emptyrecords) ); /* Now, prepare the text of the request */ CHECK_MALLOC(sql = malloc(REALLOC_SIZE)); sql_allocd = REALLOC_SIZE; /* This macro hides the details of extending the buffer on each sprintf... */ #define ADD_EXTEND(args...) { \ size_t p; \ int loop = 0; \ do { \ p = snprintf(sql + sql_offset, sql_allocd - sql_offset, ##args); \ if (p >= sql_allocd - sql_offset) { \ /* Too short, extend the buffer and start again */ \ CHECK_MALLOC( sql = realloc(sql, sql_allocd + REALLOC_SIZE) ); \ sql_allocd += REALLOC_SIZE; \ loop++; \ ASSERT(loop < 100); /* detect infinite loops */ \ continue; \ } \ sql_offset += p; \ break; \ } while (1); \ } /* This macro allows to add a value in the SQL buffer while escaping in properly */ #define ADD_ESCAPE(str) { \ char * __s = (char *)str; \ /* Check we have at least twice the size available +1 */ \ size_t p = strlen(__s); \ \ while (sql_allocd - sql_offset < 2 * p + 1) { \ /* Too short, extend the buffer */ \ CHECK_MALLOC( sql = realloc(sql, sql_allocd + REALLOC_SIZE) ); \ sql_allocd += REALLOC_SIZE; \ } \ \ /* Now add the escaped string */ \ p = PQescapeStringConn(conn, sql+sql_offset, __s, p, NULL); \ sql_offset += p; \ } /* INSERT INTO table (tsfield, field1, field2, ...) VALUES (now, $1::bytea, $2::integer, ...) */ ADD_EXTEND("INSERT INTO %s (", acct_config->tablename); if (acct_config->tsfield) { ADD_EXTEND("\""); ADD_ESCAPE(acct_config->tsfield); ADD_EXTEND("\", "); } if (acct_config->srvnfield) { ADD_EXTEND("\""); ADD_ESCAPE(acct_config->srvnfield); ADD_EXTEND("\", "); } for (li = emptyrecords.all.next; li != &emptyrecords.all; li = li->next) { struct acct_record_item * i = (struct acct_record_item *)(li->o); ADD_EXTEND("\""); ADD_ESCAPE(i->param->field?:i->param->avpname); if (i->index) { ADD_EXTEND("%d", i->index); } if (li->next != &emptyrecords.all) { ADD_EXTEND("\", "); } } ADD_EXTEND("\") VALUES ("); if (acct_config->tsfield) { ++idx; ADD_EXTEND("$%d, ", idx); } if (acct_config->srvnfield) { ADD_EXTEND("'"); ADD_ESCAPE(fd_g_config->cnf_diamid); ADD_EXTEND("', "); } for (li = emptyrecords.all.next; li != &emptyrecords.all; li = li->next) { struct acct_record_item * i = (struct acct_record_item *)(li->o); ++idx; ADD_EXTEND("$%d::%s", idx, diam2db_types_mapping[i->param->avptype]); if (li->next != &emptyrecords.all) { ADD_EXTEND(", "); } } ADD_EXTEND(");"); TRACE_DEBUG(FULL, "Preparing the following SQL statement: '%s'", sql); res = PQprepare(conn, stmt, sql, emptyrecords.nball, NULL); if (PQresultStatus(res) != PGRES_COMMAND_OK) { TRACE_DEBUG(INFO, "Preparing statement '%s' failed: %s", sql, PQerrorMessage(conn)); PQclear(res); return EINVAL; } PQclear(res); nbrecords = emptyrecords.nball; acct_rec_empty(&emptyrecords); CHECK_POSIX( pthread_key_create(&connk, (void (*)(void*))PQfinish) ); CHECK_POSIX( pthread_setspecific(connk, conn) ); /* Ok, ready */ return 0; } /* Terminate the connection to the DB */ void acct_db_free(void) { CHECK_POSIX_DO(pthread_key_delete(connk) , ); free(sql); } /* When a new message has been received, insert the content of the parsed mapping into the DB (using prepared statement) */ int acct_db_insert(struct acct_record_list * records) { char **val; int *val_len; int *val_isbin; int idx = 0; int size = 0; PGresult *res; struct fd_list *li; PGconn *conn; int new = 0; TRACE_ENTRY("%p", records); CHECK_PARAMS( records ); conn = pthread_getspecific(connk); if (!conn) { conn = PQconnectdb(acct_config->conninfo); CHECK_POSIX( pthread_setspecific(connk, conn) ); new = 1; } /* First, check if the connection with the DB has not staled, and eventually try to fix it */ if (PQstatus(conn) != CONNECTION_OK) { /* Attempt a reset */ PQreset(conn); if (PQstatus(conn) != CONNECTION_OK) { TRACE_DEBUG(INFO, "Lost connection to the database server, and attempt to reestablish it failed"); TODO("Terminate the freeDiameter instance completely?"); return ENOTCONN; } } if (new) { /* Create the prepared statement for this ocnnection, it is not shared */ res = PQprepare(conn, stmt, sql, nbrecords, NULL); if (PQresultStatus(res) != PGRES_COMMAND_OK) { TRACE_DEBUG(INFO, "Preparing statement '%s' failed: %s", sql, PQerrorMessage(conn)); PQclear(res); return EINVAL; } PQclear(res); } size = acct_config->tsfield ? records->nball + 1 : records->nball; /* Alloc the arrays of parameters */ CHECK_MALLOC( val = calloc(size, sizeof(const char *)) ); CHECK_MALLOC( val_len = calloc(size, sizeof(const int)) ); CHECK_MALLOC( val_isbin = calloc(size, sizeof(const int)) ); if (acct_config->tsfield) { val[idx] = "now"; val_len[idx] = 3; val_isbin[idx] = 0; idx++; } /* Now write all the map'd records in these arrays */ for (li = records->all.next; li != &records->all; li = li->next) { struct acct_record_item * r = (struct acct_record_item *)(li->o); if (r->value) { val_isbin[idx] = 1; /* We always pass binary parameters */ switch (r->param->avptype) { case AVP_TYPE_OCTETSTRING: val[idx] = (void *)(r->value->os.data); val_len[idx] = r->value->os.len; break; case AVP_TYPE_INTEGER32: case AVP_TYPE_UNSIGNED32: case AVP_TYPE_FLOAT32: r->scalar.v32 = htonl(r->value->u32); val[idx] = &r->scalar.c; val_len[idx] = sizeof(uint32_t); break; case AVP_TYPE_INTEGER64: case AVP_TYPE_UNSIGNED64: case AVP_TYPE_FLOAT64: r->scalar.v64 = htonll(r->value->u64); val[idx] = &r->scalar.c; val_len[idx] = sizeof(uint64_t); break; default: ASSERT(0); /* detect bugs */ } } idx++; } /* OK, now execute the SQL statement */ res = PQexecPrepared(conn, stmt, size, (const char * const *)val, val_len, val_isbin, 1 /* We actually don't care here */); /* Done with the parameters */ free(val); free(val_len); free(val_isbin); /* Now check the result code */ if (PQresultStatus(res) != PGRES_COMMAND_OK) { TRACE_DEBUG(INFO, "An error occurred while INSERTing in the database: %s", PQerrorMessage(conn)); PQclear(res); return EINVAL; /* It was probably a mistake in configuration file... */ } PQclear(res); /* Ok, we are done */ return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_acct/acct_records.c000066400000000000000000000142511333553357400256260ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Functions to create a list of AVPs according to the configuration file */ #include "app_acct.h" /* Prepare a list of acct_record entries from the configuration, without mapping any value at this time */ int acct_rec_prepare(struct acct_record_list * records) { struct fd_list * li; TRACE_ENTRY("%p", records); CHECK_PARAMS( records && acct_config ); /* Prepare the records structure */ memset(records, 0, sizeof(struct acct_record_list)); fd_list_init(&records->all, records); fd_list_init(&records->unmaped, records); /* for each entry in the configuration */ for (li = acct_config->avps.next; li != &acct_config->avps; li = li->next) { struct acct_conf_avp * a = (struct acct_conf_avp *)li; struct acct_record_item * new; int i = a->multi ? 1 : 0; /* Create as many records as the 'multi' parameter requires */ do { CHECK_MALLOC( new = malloc(sizeof(struct acct_record_item)) ); memset(new, 0, sizeof(struct acct_record_item)); fd_list_init(&new->chain, new); fd_list_init(&new->unmapd, new); new->param = a; new->index = i; fd_list_insert_before(&records->all, &new->chain); fd_list_insert_before(&records->unmaped, &new->unmapd); records->nball++; records->nbunmap++; i++; } while (i <= a->multi); } return 0; } /* Find the AVPs from configuration inside a received message */ int acct_rec_map(struct acct_record_list * records, struct msg * msg) { struct avp * avp; TRACE_ENTRY("%p %p", records, msg); /* For each AVP in the message, search if we have a corresponding unmap'd record */ CHECK_FCT( fd_msg_browse(msg, MSG_BRW_FIRST_CHILD, &avp, NULL) ); while (avp) { struct fd_list * li; struct dict_object * model; CHECK_FCT( fd_msg_model(avp, &model) ); if (model != NULL) { /* we ignore the AVPs we don't recognize */ /* Search this model in the list */ for (li = records->unmaped.next; li != &records->unmaped; li = li->next) { struct acct_record_item * r = (struct acct_record_item *)(li->o); if (r->param->avpobj == model) { /* It matches: save the AVP value and unlink this record from the unmap'd list */ struct avp_hdr * h; CHECK_FCT( fd_msg_avp_hdr( avp, &h ) ); r->value = h->avp_value; fd_list_unlink(&r->unmapd); records->nbunmap -= 1; break; } } /* Continue only while there are some AVPs to map */ if (FD_IS_LIST_EMPTY(&records->unmaped)) break; } /* Go to next AVP in the message */ CHECK_FCT( fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL) ); } /* Done */ return 0; } /* Check that a mapped list is not empty and no required AVP is missing. Free the record list in case of error */ int acct_rec_validate(struct acct_record_list * records) { struct fd_list * li; TRACE_ENTRY("%p", records); CHECK_PARAMS( records ); /* Check at least one AVP was mapped */ if (records->nball == records->nbunmap) { fd_log_debug("The received ACR does not contain any AVP from the configuration file." " This is an invalid situation. Please fix your configuration file." " One way to ensure this does not happen is to include Session-Id in the database."); acct_rec_empty(records); return EINVAL; } /* Now, check there is no required AVP unmap'd */ for (li = records->unmaped.next; li != &records->unmaped; li = li->next) { struct acct_record_item * r = (struct acct_record_item *)(li->o); if (r->param->required && (r->index <= 1)) { fd_log_debug("The received ACR does not contain the required AVP '%s'.", r->param->avpname); acct_rec_empty(records); return EINVAL; } } /* The record list is OK */ return 0; } /* Free all the items in an acct_record_list returned by acct_rec_prepare */ void acct_rec_empty(struct acct_record_list * records) { TRACE_ENTRY("%p", records); CHECK_PARAMS_DO( records, return ); while (!FD_IS_LIST_EMPTY(&records->all)) { struct acct_record_item * r = (struct acct_record_item *)(records->all.next); fd_list_unlink( &r->chain ); fd_list_unlink( &r->unmapd ); free(r); } } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_acct/app_acct.c000066400000000000000000000137621333553357400247530ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2011, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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 simple Accounting server for freeDiameter */ #include "app_acct.h" /* Mandatory AVPs for the Accounting-Answer (any value in adding all the other AVPs?) */ static struct { struct dict_object * Accounting_Record_Number; struct dict_object * Accounting_Record_Type; } acct_dict; /* Callback for incoming Base Accounting Accounting-Request messages */ static int acct_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act) { struct msg * m; struct avp * a = NULL; struct avp_hdr * art=NULL, *arn=NULL; /* We keep a pointer on the Accounting-Record-{Type, Number} AVPs from the query */ struct acct_record_list rl; TRACE_ENTRY("%p %p %p %p", msg, avp, sess, act); if (msg == NULL) return EINVAL; m = *msg; /* Prepare a new record list */ CHECK_FCT( acct_rec_prepare( &rl ) ); /* Maps the AVPs from the query with this record list */ CHECK_FCT( acct_rec_map( &rl, m ) ); /* Check that at least one AVP was mapped */ CHECK_FCT( acct_rec_validate( &rl ) ); /* Now, save these mapped AVPs in the database */ CHECK_FCT( acct_db_insert( &rl ) ); acct_rec_empty( &rl ); /* OK, we can send a positive reply now */ /* Get Accounting-Record-{Number,Type} values */ CHECK_FCT( fd_msg_search_avp ( m, acct_dict.Accounting_Record_Type, &a) ); if (a) { CHECK_FCT( fd_msg_avp_hdr( a, &art ) ); } CHECK_FCT( fd_msg_search_avp ( m, acct_dict.Accounting_Record_Number, &a) ); if (a) { CHECK_FCT( fd_msg_avp_hdr( a, &arn ) ); } /* Create the answer message */ CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, msg, 0 ) ); m = *msg; /* Set the Origin-Host, Origin-Realm, Result-Code AVPs */ CHECK_FCT( fd_msg_rescode_set( m, "DIAMETER_SUCCESS", NULL, NULL, 1 ) ); /* Add the mandatory AVPs in the ACA */ if (art) { CHECK_FCT( fd_msg_avp_new ( acct_dict.Accounting_Record_Type, 0, &a ) ); CHECK_FCT( fd_msg_avp_setvalue( a, art->avp_value ) ); CHECK_FCT( fd_msg_avp_add( m, MSG_BRW_LAST_CHILD, a ) ); } if (arn) { CHECK_FCT( fd_msg_avp_new ( acct_dict.Accounting_Record_Number, 0, &a ) ); CHECK_FCT( fd_msg_avp_setvalue( a, arn->avp_value ) ); CHECK_FCT( fd_msg_avp_add( m, MSG_BRW_LAST_CHILD, a ) ); } /* Send the answer */ *act = DISP_ACT_SEND; return 0; } /* entry point */ static int acct_entry(char * conffile) { struct disp_when data; TRACE_ENTRY("%p", conffile); #ifndef TEST_DEBUG /* We do this differently in the test scenario */ /* Initialize the configuration and parse the file */ CHECK_FCT( acct_conf_init() ); CHECK_FCT( acct_conf_parse(conffile) ); CHECK_FCT( acct_conf_check(conffile) ); #endif /* TEST_DEBUG */ /* Now initialize the database module */ CHECK_FCT( acct_db_init() ); /* Search the AVPs we will need in this file */ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Accounting-Record-Number", &acct_dict.Accounting_Record_Number, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Accounting-Record-Type", &acct_dict.Accounting_Record_Type, ENOENT) ); /* Register the dispatch callbacks */ memset(&data, 0, sizeof(data)); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_APPLICATION, APPLICATION_BY_NAME, "Diameter Base Accounting", &data.app, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Accounting-Request", &data.command, ENOENT) ); CHECK_FCT( fd_disp_register( acct_cb, DISP_HOW_CC, &data, NULL, NULL ) ); /* Advertise the support for the Diameter Base Accounting application in the peer */ CHECK_FCT( fd_disp_app_support ( data.app, NULL, 0, 1 ) ); return 0; } /* Unload */ void fd_ext_fini(void) { /* Close the db connection */ acct_db_free(); /* Destroy the configuration */ acct_conf_free(); } EXTENSION_ENTRY("app_acct", acct_entry); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_acct/app_acct.h000066400000000000000000000133461333553357400247560ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2011, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Header file for the app_acct extension. * * This extension is a simple Diameter Accounting server. * * It receives the Diameter Accounting-Request message, and sends its content in a * "buffer" postgreSQL database (see configuration sample file app_acct.conf.sample). * * The intent is that another application will then pick the records from this "buffer" database * and process it accordingly to the requirements of the end application. */ #include /* The structure corresponding to an AVP entry in the configuration file */ struct acct_conf_avp { /* Chain */ struct fd_list chain; /* link in the global list */ /* Raw information from the configuration file */ char *avpname; /* the name of the AVP, as appear in the configuration file */ char *field; /* the field name in the database, or NULL if it is the same as avpname */ int required; /* set to true if this AVP has to be in the message */ unsigned multi; /* the number of occurrences of this AVP we convert, or 0 if it was not specified */ /* Parsed information */ struct dict_object *avpobj; /* the dictionary object corresponding to this AVP */ enum dict_avp_basetype avptype; /* this info is extracted from avpobj. GROUPED avps are not allowed yet */ }; /* This is described only inside acct_db.c */ struct acct_db; /* The complete configuration */ struct acct_conf { /* AVPs */ struct fd_list avps; /* the list of acct_conf_avp entries */ /* Raw information */ char *conninfo; /* the connection string to the database, that is passed as is to the database library */ char *tablename; /* the name of the table we are working with */ char *tsfield; /* the name of the timestamp field, or NULL if not required */ char *srvnfield; /* the name of the server name field, or NULL if not required */ }; /* A successfully parsed Accounting-Request produces a list of these: */ struct acct_record_item { struct fd_list chain; /* link with all others */ struct fd_list unmapd;/* link with only unmap'd records */ struct acct_conf_avp *param; /* the AVP entry this refers to. */ unsigned index; /* in case of multi */ union avp_value *value; /* If the AVP was found in the message, this points to its value. Otherwise, NULL */ union { uint32_t v32 /* Storage area for network byte-order copy of the AVP value */; uint64_t v64; char c; /* pointer that is passed to the database */ } scalar;/* for scalar AVP (all types except OCTETSTRING) we copy in this area the value in network byte order */ }; /* The sentinel for a list of acct_record_items */ struct acct_record_list { struct fd_list all; /* The list of records */ int nball; /* The number of records in all */ struct fd_list unmaped;/* Only the records without a value */ int nbunmap;/* The number of unmap'd records */ }; /* Mapping of the data types between Diameter AVP and PQ types: */ extern const char * diam2db_types_mapping[]; /* In acct_conf.y */ extern struct acct_conf * acct_config; /* the global configuration */ int acct_conf_init(void); int acct_conf_parse(char * conffile); int acct_conf_check(char * conffile); void acct_conf_free(void); /* In acct_db.c */ int acct_db_init(void); int acct_db_insert(struct acct_record_list * records); void acct_db_free(void); /* In acct_records.c */ int acct_rec_prepare(struct acct_record_list * records); int acct_rec_map(struct acct_record_list * records, struct msg * msg); int acct_rec_validate(struct acct_record_list * records); void acct_rec_empty(struct acct_record_list * records); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/000077500000000000000000000000001333553357400235125ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/CMakeLists.txt000066400000000000000000000023071333553357400262540ustar00rootroot00000000000000# The Diameter EAP Application extension PROJECT("Diameter EAP Application extension" C) # Find MySQL FIND_PACKAGE(MySQL REQUIRED) FIND_PACKAGE(Gcrypt REQUIRED) INCLUDE_DIRECTORIES(${MySQL_INCLUDE_DIR}) # Parse plugins ADD_SUBDIRECTORY(plugins) # Parser BISON_FILE(diameap.y) FLEX_FILE(diameap.l) SET_SOURCE_FILES_PROPERTIES(lex.diameap.c diameap.tab.c PROPERTIES COMPILE_FLAGS "-I \"${CMAKE_CURRENT_SOURCE_DIR}\"") set( diameapsrc diameap_defs.h diameap.h diameap_server.h diameap_plugins.h diameap_eap.h plugins.h diameap_eappacket.h diameap_user.h diameap.tab.h diameap.tab.c lex.diameap.c diameap.c diameap_server.c diameap_plugins.c diameap_init.c diameap_common.h diameap_eappacket.c libdiameap.h diameap_eap.c diameap_mysql.h diameap_mysql.c diameap_tls.h diameap_tls.c libcrypt.h libcrypt.c diameap_user.c ) FD_ADD_EXTENSION(app_diameap ${diameapsrc}) TARGET_LINK_LIBRARIES(app_diameap ${GCRYPT_LIBRARY} ${GNUTLS_LIBRARIES} ${MySQL_LIBRARY} ) #### ## INSTALL section ## INSTALL(TARGETS app_diameap LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-eap-server) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/LICENSE000066400000000000000000000036771333553357400245340ustar00rootroot00000000000000 Software License Agreement (BSD License) Author : Souheil Ben Ayed Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project All rights reserved. Redistribution and use of this software 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. 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by Souheil Ben Ayed . 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 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. nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/README000066400000000000000000000103371333553357400243760ustar00rootroot00000000000000DiamEAP (http://diameap.yagami.freediameter.net/) Copyright (c) 2009-2010 Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project. Author: Souheil Ben Ayed ----- SUMMARY ----- DiamEAP is an implementation of the Diameter Extensible Authentication Protocol (EAP) Application (RFC 4072). The Diameter protocol is a AAA protocol to securely carry Authentication, Authorization and Accounting informations between the AAA client and the AAA server. Diameter EAP Application is a Diameter application that supports authentication using Extensible Authentication Protocol (RFC 3748). DiamEAP is designed to be extensible so that any new EAP method can be implemented separately as a shared library called 'EAP method plug-in'. Currently, DiamEAP comprises two EAP Methods plug-ins: - EAP MD5 plug-in : implementation of EAP-MD5 authentication method. - EAP TLS plug-in : implementation of EAP-TLS authentication method . Other EAP methods are scheduled to be added in future releases. DiamEAP is an extension for freeDiameter. Visit http://www.freediameter.net/ for more information on freeDiameter project. For more information on DiamEAP project, visit http://diameap.yagami.freediameter.net/ ----- REQUIREMENTS ----- Some packages are required to compile DiamEAP from source. If you will install DiamEAP on Debian or Ubuntu system install the following packages: cmake flex bison libgnutls-dev libgcrypt-dev libmysqlclient-dev $ sudo apt-get install cmake flex bison libgnutls-dev libgcrypt-dev libmysqlclient-dev ----- INSTALLATION ----- 1- Add DiamEAP extension to freeDiameter. See freeDiameter documentation (http://www.freediameter.net/) 2-Create a new MySQL database and add tables using the sql script 'diameap.sql'. 3- Edit the extensions/CMakeList.txt file to add DiamEAP to freeDiameter. Add the following lines: OPTION(BUILD_APP_DIAMEAP "Build DiamEAP? (Diameter EAP Application - RFC 4072)" OFF) IF (BUILD_APP_DIAMEAP) ADD_SUBDIRECTORY(app_diameap) ENDIF (BUILD_APP_DIAMEAP) Note: you can enable DiamEAP to be built with freeDiameter by setting the BUILD_APP_DIAMEAP to ON. If you enable it here you don't need to enable it when building freeDiameter. 4- Enable DiamEAP by enabling BUILD_APP_DIAMEAP option with CMake: cmake -DBUILD_APP_DIAMEAP:BOOl=ON ../ ----- CONFIGURATION ----- DiamEAP requires a configuration file to start the DiamEAP server. It is advised to start by a copy of the sample file, and customize the configuration to fit your needs. A sample configuration file 'diameap.conf.sample' can be find in extensions/app_diameap/ or in doc/ folder of freeDiameter. The file 'diameap.conf.sample' contains a description of all parameters that can be added to the DiamEAP configuration file. *Specify connection parameters to DiamEAP MySQL database: - username and password to connect to the MySQL Server - database server : address to MySQL server. - database name : database for DiamEAP. Example: DiamEAP_MySQL = "UserName" , "MyPassword" , "localhost" , "drupal_ui"; *Add EAP Method plug-ins to be loaded with DiamEAP server. Note that EAP Identity must be add. Example: Load_plugin = "EAP MD5":4:0:"extensions/eap_md5.emp":""; Load_plugin = "EAP TLS":13:0:"extensions/eap_tls.emp":"doc/eap_tls_plugin.app_diameap.conf"; * Enable Authorization with DiamEAP. You can enable DiamEAP to check authorization of authenticated users. To enable authorization set authorization to 1. ( by default disabled). * Multiple round trips timeout This parameter indicates the maximum number of seconds provides the user to answer to a Diameter-EAP-Request. (by default set to 30 seconds) * Invalid EAP Packets This parameter defines the maximum number of invalid EAP packets that can be received before rejecting the connection. (by default set to 5 packets) For more documentation on configuring DiamEAP, visit the documentation page of the project : http://diameap.yagami.freediameter.net/documentation ----- COPYRIGHT ----- See LICENSE file for legal information on this software. ----- CONTACT ----- Author: Souheil Ben Ayed (souheil@tera.ics.keio.ac.jp) Current maintainers: -Souheil Ben Ayed (Teraoka Laboratory of Keio University) souheil@tera.ics.keio.ac.jp nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/diameap.c000066400000000000000000000070641333553357400252650ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #include "diameap_common.h" /* DiamEAP Configuration */ static struct diameap_conf conf; struct diameap_conf * diameap_config = &conf; /* The entry point */ static int diameap_main(char * conffile) { TRACE_ENTRY("%p", conffile); memset(diameap_config, 0, sizeof(struct diameap_conf)); /* Initialize configuration */ CHECK_FCT(diameap_init(conffile)); /* Start Diameter EAP Application (Back-end Authenticator ) */ CHECK_FCT(diameap_start_server()); /* Announce the support of Diameter EAP Application to other peers */ CHECK_FCT(fd_disp_app_support(dataobj_diameap_app, dataobj_diameap_ven, 1, 0)); LOG_D("%sDiameter EAP Application Extension started successfully.",DIAMEAP_EXTENSION); return 0; } void fd_ext_fini(void) { TRACE_DEBUG(FULL,"%sStopping the server",DIAMEAP_EXTENSION); CHECK_FCT_DO(diameap_stop_server(), { TRACE_DEBUG(INFO,"%sStopping the server: Error occurred.",DIAMEAP_EXTENSION);}); if (db_conn) { TRACE_DEBUG(FULL,"%sDisconnecting from MySQL Server",DIAMEAP_EXTENSION); diameap_mysql_disconnect(); } TRACE_DEBUG(FULL,"%sUnloading EAP Methods plug-ins: Error occurred.",DIAMEAP_EXTENSION); CHECK_FCT_DO(diameap_plugin_unload(), { TRACE_DEBUG(INFO,"%sUnloading EAP Methods plug-ins: Error occurred.",DIAMEAP_EXTENSION);}); return; } /* Define the entry point */ EXTENSION_ENTRY("DiamEAP", diameap_main, "dict_eap") ; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/diameap.h000066400000000000000000000062341333553357400252700ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #ifndef DIAMEAP_H_ #define DIAMEAP_H_ /* Structure to hold configuration of DiamEAP*/ struct diameap_conf { char *conffile; /* configuration file of the extension*/ int authorize; /* Set to 1 if provides Authorization. Otherwise set to 0. (by default set to 0)*/ u32 vendor_id; /* Vendor ID*/ u32 application_id; /* Diameter EAP Application ID. Value set to 5. */ u32 command_code; /* Diameter EAP Application Command Code. Value set to 268. */ char * diam_realm; /* Diameter realm of the peer */ /*Diameter EAP Server*/ int max_invalid_eap_packet; //MySQL Database parameters struct { char *server; char *user; char *password; char *database; }db; u32 multi_round_time_out; }; /* The pointer to access DiamEAP configuration*/ extern struct diameap_conf *diameap_config; /* Initialize the configuration of DiamEAP*/ int diameap_init(char * conffile); /* parser */ int diameapparse(struct diameap_conf * config); #endif /* DIAMEAP_H_ */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/diameap.l000066400000000000000000000073011333553357400252700ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ /*Declarations and option settings*/ %{ #include #include "diameap_common.h" #include "diameap.tab.h" #define YY_USER_ACTION { \ yylloc->first_line = yylloc->last_line = yylineno; \ yylloc->first_column = yylloc->last_column + 1; \ yylloc->last_column += yyleng +1; \ } #define YY_NO_INPUT %} %option noyywrap %option yylineno %option bison-bridge %option bison-locations %option nounput %% /* List of patterns and actions */ <*>\n { yylloc->last_column=0; } <*>#.*$ { } [ \t\n]+ { yylloc->last_column=0; /* ignore whitespace */ } \"([^\n\"]*)\" { yylval->str = strdup(yytext+1); /* Quoted String */ yylval->str[yyleng-2]='\0'; return iSTRING; } [[:digit:]]+ { /* Digital number */ yylval->val = atoi(yytext); return NUM; /* Numeric value */ } (?i:"Load_Plugin") { return EAPMETHOD; } (?i:"Authorization") { return AUTHORIZE; } (?i:"DiamEAP_MySQL") { return DIAMEAP_MYSQL; } (?i:"MAX_Invalid_EAP_Packets") { return MAX_INVALID_EAP_PACKET; } (?i:"Multi_Round_Time_Out") { return MULTI_ROUND_TIMEOUT; } (?i:"Check_user_identity") { return CHECK_USER_IDENTITY; } "="|";"|":"|"," { return yytext[0]; } /* Unrecognized token or text */ <*>[[:alnum:]]+ | <*>. { fprintf(stderr,"Unrecognized input text '%s'( on line %i column %i )\n", yytext, yylloc->first_line, yylloc->first_column); return LEX_ERROR; } %% /* Routines */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/diameap.sql000066400000000000000000000060361333553357400256400ustar00rootroot00000000000000######################################################################### # diameap.sql # # DiamEAP extension # # Users Information Database schema # # # # # # # # MySQL command to load the script: # # mysql> mysql -u username -p password diameap_ui < diameap.sql # # # ######################################################################### -- -------------------------------------------------------- -- -- Table structure for table `authe` -- CREATE TABLE IF NOT EXISTS `authe` ( `id` int(11) NOT NULL AUTO_INCREMENT, `grp` int(11) NOT NULL, `attribute` set('Authorization-Lifetime','Auth-Grace-Period','Auth-Session-State','Re-Auth-Request-Type','Session-Timeout','Multi-Round-Time-Out','Acct-Interim-Interval') NOT NULL DEFAULT 'Authorization-Lifetime', `value` char(255) NOT NULL, PRIMARY KEY (`id`) ); -- -------------------------------------------------------- -- -- Table structure for table `authz` -- CREATE TABLE IF NOT EXISTS `authz` ( `id` int(11) NOT NULL AUTO_INCREMENT, `grp` int(11) NOT NULL, `attribute` set('NAS-IPv6-Address','NAS-Identifier','NAS-IP-Address','NAS-Port','NAS-Port-Id','NAS-Port-Type','Called-Station-Id','Calling-Station-Id','Connect-Info','Originating-Line-Info','Service-Type','Callback-Number','Callback-Id','Idle-Timeout','Port-Limit','NAS-Filter-Rule','Filter-Id','Configuration-Token','QoS-Filter-Rule','Framed-Protocol','Framed-Routing','Framed-MTU','Framed-Compression','Framed-IP-Address','Framed-IP-Netmask','Framed-Route','Framed-Pool','Framed-Interface-Id','Framed-IPv6-Prefix','Framed-IPv6-Pool','Framed-IPv6-Route','Framed-IPX-Network','Framed-Appletalk-Link','Framed-Appletalk-Network','Framed-Appletalk-Zone') NOT NULL DEFAULT 'Service-Type', `op` set('==','>','>=','<','<=','!=','~=','=+','+==','+>','+>=','+<','+<=','+!=','+~=','==+','>+','>=+','<+','<=+','!=+') NOT NULL DEFAULT '==', `value` char(255) NOT NULL, PRIMARY KEY (`id`) ); -- -------------------------------------------------------- -- -- Table structure for table `grp` -- CREATE TABLE IF NOT EXISTS `grp` ( `id` int(11) NOT NULL AUTO_INCREMENT, `grp_name` char(255) NOT NULL, `active` set('Y','N') NOT NULL DEFAULT 'Y', PRIMARY KEY (`id`) ); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE IF NOT EXISTS `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, `eapmethod` tinyint(3) unsigned NOT NULL DEFAULT '0', `vendor` int(11) NOT NULL DEFAULT '0', `password` varchar(255) CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL, `active` enum('Y','N') CHARACTER SET latin1 COLLATE latin1_general_ci NOT NULL DEFAULT 'Y', PRIMARY KEY (`id`) ); -- -------------------------------------------------------- -- -- Table structure for table `user_grp` -- CREATE TABLE IF NOT EXISTS `user_grp` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user` int(11) NOT NULL, `grp` int(11) NOT NULL, PRIMARY KEY (`id`) ); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/diameap.y000066400000000000000000000125771333553357400253200ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ %{ #include #include "diameap_common.h" #include "diameap.tab.h" void yyerror (YYLTYPE *llocp, struct diameap_conf * config, const char *s); extern int yywrap(); extern int yylex(); /* The Lex parser prototype */ int diameaplex(YYSTYPE *lvalp, YYLTYPE *llocp); %} %locations %parse-param {struct diameap_conf * config} %pure_parser /*%defines */ %error-verbose %debug %union { char *str; int val; char byte; } /* In case of error in the lexical analysis */ %token LEX_ERROR %token NUM %token iSTRING %token iBYTE %token EAPMETHOD %token AUTHORIZE %token MODE %token DIAMEAP_MYSQL %token MAX_INVALID_EAP_PACKET %token MULTI_ROUND_TIMEOUT %token CHECK_USER_IDENTITY %% confparams : /* empty */ | confparams EAPmethod | confparams Authorize | confparams DiamEAP_MySQL | confparams MAX_Invalid_EAP_Packet | confparams Multi_Round_Timeout | confparams Check_User_Identity | confparams errors { yyerror(&yylloc, config, "Unrecognized configuration parameter."); return EINVAL; } ; errors : LEX_ERROR | error ; EAPmethod : EAPMETHOD '=' iSTRING ':' NUM ':' NUM ':' iSTRING ':' iSTRING ';' { char * infile, *cfile; FILE * fl; infile = $9; fl = fopen(infile, "r"); if ((fl == NULL) && (*infile != '/')) { char * tmpfile=infile; CHECK_MALLOC_DO( infile = malloc( strlen(tmpfile) + strlen(DEFAULT_EXTENSIONS_PATH) + 2 ), { yyerror (&yylloc, config, "Not enough memory"); YYERROR; } ); sprintf(infile, DEFAULT_EXTENSIONS_PATH "/%s", tmpfile); free(tmpfile); fl = fopen(infile, "r"); } if (fl == NULL) { int ret = errno; TRACE_DEBUG(INFO, "Unable to open %s plugin file %s for reading: %s", $3, infile, strerror(ret)); yyerror (&yylloc, config, "Error adding EAP Plugin"); YYERROR; } fclose(fl); cfile = $11; if(strlen(cfile)>0){ fl = fopen(cfile, "r"); if ((fl == NULL) && (*cfile != '/')) { char * tmp = cfile; CHECK_MALLOC_DO( cfile = malloc( strlen(tmp) + strlen(DEFAULT_CONF_PATH) + 2 ), { yyerror (&yylloc, config, "Not enough memory"); YYERROR; } ); sprintf(cfile, DEFAULT_CONF_PATH "/%s", tmp); free(tmp); fl = fopen(cfile, "r"); } if (fl == NULL) { } if(fl) fclose(fl); } diameap_plugin_add($3,(char)$5,(char)$7,infile,cfile); } ; Authorize : AUTHORIZE '=' NUM ';' { if((int)$3) config->authorize=1; } ; DiamEAP_MySQL : DIAMEAP_MYSQL '=' iSTRING ',' iSTRING ',' iSTRING ',' iSTRING ';' { diameap_set_mysql_param($3,$5,$7,$9); } ; MAX_Invalid_EAP_Packet : MAX_INVALID_EAP_PACKET '=' NUM ';' { config->max_invalid_eap_packet=(int)$3; }; Multi_Round_Timeout : MULTI_ROUND_TIMEOUT '=' NUM ';' { config->multi_round_time_out=(unsigned int)$3; }; Check_User_Identity: CHECK_USER_IDENTITY '=' NUM ';' { if((int)$3){ check_user_identity = TRUE; }else{ check_user_identity = FALSE; } }; %% void yyerror(YYLTYPE *llocp, struct diameap_conf * config,const char *str) { fprintf(stderr,"Error in %s ( on line %i column %i -> line %i column %i) : %s\n",config->conffile, llocp->first_line, llocp->first_column, llocp->last_line, llocp->last_column, str); } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/diameap_common.h000066400000000000000000000145251333553357400266420ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #ifndef DIAMEAP_COMMON_H_ #define DIAMEAP_COMMON_H_ #include "libdiameap.h" #include "libcrypt.h" #include "diameap.h" #include "diameap_plugins.h" #include "diameap_eap.h" #include "diameap_server.h" #include /* Dictionary Object templates */ extern struct dict_object * dataobj_diameap_cmd; /* Diameter-EAP-Request Command Code */ extern struct dict_object * dataobj_diameap_app; /* Diameter EAP Application object */ extern struct dict_object * dataobj_diameap_ven; /* Diameter EAP Application Vendor object */ extern struct dict_object * dataobj_accounting_eap_auth_method; extern struct dict_object * dataobj_acct_interim_interval; extern struct dict_object * dataobj_auth_application_id; extern struct dict_object * dataobj_auth_grace_period; extern struct dict_object * dataobj_auth_request_type; extern struct dict_object * dataobj_auth_session_state; extern struct dict_object * dataobj_authorization_lifetime; extern struct dict_object * dataobj_callback_id; extern struct dict_object * dataobj_callback_number; extern struct dict_object * dataobj_called_station_id; extern struct dict_object * dataobj_calling_station_id; extern struct dict_object * dataobj_class; extern struct dict_object * dataobj_configuration_token; extern struct dict_object * dataobj_connect_info; extern struct dict_object * dataobj_destination_host; extern struct dict_object * dataobj_destination_realm; extern struct dict_object * dataobj_eap_master_session_key; extern struct dict_object * dataobj_eap_key_name; extern struct dict_object * dataobj_eap_payload; extern struct dict_object * dataobj_eap_reissued_payload; extern struct dict_object * dataobj_error_message; extern struct dict_object * dataobj_error_reporting_host; extern struct dict_object * dataobj_failed_avp; extern struct dict_object * dataobj_filter_id; extern struct dict_object * dataobj_framed_appletalk_link; extern struct dict_object * dataobj_framed_appletalk_network; extern struct dict_object * dataobj_framed_appletalk_zone; extern struct dict_object * dataobj_framed_compression; extern struct dict_object * dataobj_framed_interface_id; extern struct dict_object * dataobj_framed_ip_address; extern struct dict_object * dataobj_framed_ip_netmask; extern struct dict_object * dataobj_framed_ipv6_prefix; extern struct dict_object * dataobj_framed_ipv6_pool; extern struct dict_object * dataobj_framed_ipv6_route; extern struct dict_object * dataobj_framed_ipx_network; extern struct dict_object * dataobj_framed_mtu; extern struct dict_object * dataobj_framed_pool; extern struct dict_object * dataobj_framed_protocol; extern struct dict_object * dataobj_framed_route; extern struct dict_object * dataobj_framed_routing; extern struct dict_object * dataobj_idle_timeout; extern struct dict_object * dataobj_multi_round_time_out; extern struct dict_object * dataobj_nas_filter_rule; extern struct dict_object * dataobj_nas_identifier; extern struct dict_object * dataobj_nas_ip_address; extern struct dict_object * dataobj_nas_ipv6_address; extern struct dict_object * dataobj_nas_port; extern struct dict_object * dataobj_nas_port_id; extern struct dict_object * dataobj_nas_port_type; extern struct dict_object * dataobj_originating_line_info; extern struct dict_object * dataobj_origin_host; extern struct dict_object * dataobj_origin_realm; extern struct dict_object * dataobj_origin_state_id; extern struct dict_object * dataobj_port_limit; extern struct dict_object * dataobj_proxy_info; extern struct dict_object * dataobj_qos_filter_rule; extern struct dict_object * dataobj_re_auth_request_type; extern struct dict_object * dataobj_redirect_host; extern struct dict_object * dataobj_redirect_host_usage; extern struct dict_object * dataobj_redirect_max_cache_time; extern struct dict_object * dataobj_reply_message; extern struct dict_object * dataobj_result_code; extern struct dict_object * dataobj_route_record; extern struct dict_object * dataobj_service_type; extern struct dict_object * dataobj_session_id; extern struct dict_object * dataobj_session_timeout; extern struct dict_object * dataobj_state; extern struct dict_object * dataobj_tunneling; extern struct dict_object * dataobj_user_name; #endif /* DIAMEAP_COMMON_H_ */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/diameap_defs.h000066400000000000000000000151601333553357400262670ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #ifndef DIAMEAP_DEFS_H_ #define DIAMEAP_DEFS_H_ #include #include #include /************************************************/ /* Data Type Definition */ /************************************************/ /* boolean Type */ typedef enum { FALSE = 0, TRUE = 1 } boolean; /* Exact-width integer types */ typedef int8_t s8; /* signed char */ typedef uint8_t u8; /* unsigned char */ typedef int16_t s16; /* signed int */ typedef uint16_t u16; /* unsigned int */ typedef int32_t s32; /* signed long int */ typedef uint32_t u32; /* unsigned long int */ typedef int64_t s64; /* signed long long int */ typedef uint64_t u64; /* unsigned long long int */ /************************************************/ /* Macros */ /************************************************/ /* Macros for manipulating data*/ /* Retrieve signed/unsigned exact-width integer types */ #define G8(v) (u8) (* (v) ) #define G16BIGE(v) ( ( (u16) (* (v) ) << 8 ) ^ \ ( (u16) (*((v)+1)) ) ) #define G16LITE(v) ( ( (u16) (*((v)+1)) << 8 ) ^ \ ( (u16) (* (v) ) ) ) #define G24BIGE(v) ( ( (u32) (* (v) ) << 16 ) ^ \ ( (u32) (*((v)+1)) << 8 ) ^ \ ( (u32) (*((v)+2)) ) ) #define G24LITE(v) ( ( (u32) (*((v)+2)) << 16 ) ^ \ ( (u32) (*((v)+1)) << 8 ) ^ \ ( (u32) (* (v) ) ) ) #define G32BIGE(v) ( ( (u32) (* (v) ) << 24 ) ^ \ ( (u32) (*((v)+1)) << 16 ) ^ \ ( (u32) (*((v)+2)) << 8 ) ^ \ ( (u32) (*((v)+3)) ) ) #define G32LITE(v) ( ( (u32) (*((v)+3)) << 24 ) ^ \ ( (u32) (*((v)+2)) << 16 ) ^ \ ( (u32) (*((v)+1)) << 8 ) ^ \ ( (u32) (* (v) ) ) ) #define G64BIGE(v) ( ( (u64) (* (v) ) << 56 ) ^ \ ( (u64) (*((v)+1)) << 48 ) ^ \ ( (u64) (*((v)+2)) << 40 ) ^ \ ( (u64) (*((v)+3)) << 32 ) ^ \ ( (u64) (*((v)+4)) << 24 ) ^ \ ( (u64) (*((v)+5)) << 16 ) ^ \ ( (u64) (*((v)+6)) << 8 ) ^ \ ( (u64) (*((v)+7)) ) ) #define G64LITE(v) ( ( (u64) (*((v)+7)) << 56 ) ^ \ ( (u64) (*((v)+6)) << 48 ) ^ \ ( (u64) (*((v)+5)) << 40 ) ^ \ ( (u64) (*((v)+4)) << 32 ) ^ \ ( (u64) (*((v)+3)) << 24 ) ^ \ ( (u64) (*((v)+2)) << 16 ) ^ \ ( (u64) (*((v)+1)) << 8 ) ^ \ ( (u64) (* (v) ) ) ) /* Insert signed/unsigned exact-width integer types */ /* v : pointer where to insert the data * b : pointer of data to be inserted */ /* Insertion format * BIGE : BIG ENDIAN * LITE : LITTLE ENDIAN */ #define P8(v,b) do { \ u8 x = (b); \ u8 *d = (v); \ d[0] = (x&0xffU); \ } while (0) #define P16BIGE(v,b) do { \ u16 x = (b); \ u8 *d = (v); \ d[0] = ((x >> 8)&0xffU); \ d[1] = (x&0xffU); \ } while (0) #define P16LITE(v,b) do { \ u16 x = (b); \ u8 *d = (v); \ d[0] = (x&0xffU); \ d[1] = ((x >> 8)&0xffU); \ } while (0) #define P24BIGE(v, b) do { \ u32 x = (b); \ u8 *d = (v); \ d[0] = ((x >> 16)&0xffU); \ d[1] = ((x >> 8)&0xffU); \ d[2] = ((x)&0xffU); \ } while (0) #define P24LITE(v, b) do { \ u32 x = (b); \ u8 *d = (v); \ d[0] = ((x)&0xffU); \ d[1] = ((x >> 8)&0xffU); \ d[2] = ((x >> 16)&0xffU); \ } while (0) #define P32BIGE(v, b) do { \ u32 x = (b); \ u8 *d = (v); \ d[0] = ((x >> 24)&0xffU); \ d[1] = ((x >> 16)&0xffU); \ d[2] = ((x >> 8)&0xffU); \ d[3] = ((x)&0xffU); \ } while (0) #define P32LITE(v, b) do { \ u32 x = (b); \ u8 *d = (v); \ d[0] = ((x)&0xffU); \ d[1] = ((x >> 8)&0xffU); \ d[2] = ((x >> 16)&0xffU); \ d[3] = ((x >> 24)&0xffU); \ } while (0) #define P64BIGE(v, b) do { \ u64 x = (b); \ u8 *d = (v); \ d[0] = ((x >> 56)&0xffU); \ d[1] = ((x >> 48)&0xffU); \ d[2] = ((x >> 40)&0xffU); \ d[3] = ((x >> 32)&0xffU); \ d[4] = ((x >> 24)&0xffU); \ d[5] = ((x >> 16)&0xffU); \ d[6] = ((x >> 8)&0xffU); \ d[7] = ((x)&0xffU); \ } while (0) #define P64LITE(v, b) do { \ u64 x = (b); \ u8 *d = (v); \ d[0] = ((x)&0xffU); \ d[1] = ((x >> 8)&0xffU); \ d[2] = ((x >> 16)&0xffU); \ d[3] = ((x >> 24)&0xffU); \ d[4] = ((x >> 32)&0xffU); \ d[5] = ((x >> 40)&0xffU); \ d[6] = ((x >> 48)&0xffU); \ d[7] = ((x >> 56)&0xffU); \ } while (0) /* * Insert data in a specified position * a : (u8*) pointer where to insert the data * f : (int) insert from this position * l : (int) length of the data in byte to insert * b : (u8*) pointer of data to be inserted */ #define U8COPY(a,f,l,b) do{ \ u8 * x = (a); \ u8 * y = (b); \ int i; \ for(i=0;i * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #include "diameap_common.h" static void diameap_ba_nextid(struct eap_state_machine * sm, int * id) { TRACE_ENTRY("%p %p",sm,id); if (sm->currentId < 0) { *id = (u8) (255 * rand() / RAND_MAX) & 0xFFU; } else { *id = (sm->currentId++) & 0xFFU; } if (*id == sm->lastId) { *id=*id+1; } } static void diameap_ba_policyupdate(struct eap_state_machine * eap_sm, struct eap_packet *eapPacket) { TRACE_ENTRY("%p %p",eap_sm, eapPacket); if ((eap_sm->respMethod == TYPE_NAK)) { int id; eap_sm->user.pmethods = 0; u32 vendor; eap_type type; u8 *data = (u8 *) eapPacket->data; data += 5; id = 5; while (id < eapPacket->length) { vendor = VENDOR_IETF; type = G8(data); if (diameap_plugin_exist(vendor, type) == TRUE) { eap_sm->user.proposedmethods[id - 5].method = type; eap_sm->user.proposedmethods[id - 5].vendor = vendor; eap_sm->user.pmethods++; } data++; id++; } eap_sm->user.methodId = -1; } } static int diameap_ba_policygetnextmethod(struct eap_state_machine * eap_sm, eap_type * eaptype, u32 * vendor) { TRACE_ENTRY("%p %p %p",eap_sm,eaptype,vendor); *vendor = 0; *eaptype = TYPE_NONE; if (eap_sm == NULL) { return EINVAL; } eap_sm->selectedMethod = NULL; if (eap_sm->user.userid == NULL) { if ((eap_sm->currentMethod == TYPE_NONE)) { *vendor = VENDOR_IETF; *eaptype = TYPE_IDENTITY; if (eap_sm->selectedMethod != NULL) { (*eap_sm->selectedMethod->eap_method_free)(eap_sm->methodData); eap_sm->methodData = NULL; } CHECK_FCT(diameap_plugin_get(VENDOR_IETF,TYPE_IDENTITY,&eap_sm->selectedMethod)); return 0; } eap_sm->selectedMethod = NULL; *vendor = 0; *eaptype = TYPE_NONE; return 0; } if (eap_sm->user.methodId == -1) { if (eap_sm->user.proposed_eap_method >= TYPE_EAP_MD5) { *vendor = eap_sm->user.proposed_eap_method_vendor; if (*vendor == VENDOR_IETF) { *eaptype = eap_sm->user.proposed_eap_method; } else { *eaptype = TYPE_EXPANDED_TYPES; } if (eap_sm->selectedMethod != NULL) { (*eap_sm->selectedMethod->eap_method_free)(eap_sm->methodData); eap_sm->methodData = NULL; } CHECK_FCT_DO(diameap_plugin_get(*vendor,*eaptype,&eap_sm->selectedMethod), { TRACE_DEBUG(INFO,"%s [EAP Protocol] Invalid EAP-TYPE %d (vendor %d)",DIAMEAP_EXTENSION,*eaptype,*vendor);return 1;}); } eap_sm->user.proposed_eap_method = TYPE_NONE; } else { *vendor = eap_sm->user.proposedmethods[eap_sm->user.methodId].vendor; if (eap_sm->user.proposedmethods[eap_sm->user.methodId].vendor == VENDOR_IETF) { *eaptype = eap_sm->user.proposedmethods[eap_sm->user.methodId].method; } else { *eaptype = TYPE_EXPANDED_TYPES; } if (eap_sm->selectedMethod != NULL) { (*eap_sm->selectedMethod->eap_method_free)(eap_sm->methodData); eap_sm->methodData=NULL; } CHECK_FCT(diameap_plugin_get(eap_sm->user.proposedmethods[eap_sm->user.methodId].vendor,eap_sm->user.proposedmethods[eap_sm->user.methodId].method,&eap_sm->selectedMethod)); eap_sm->user.methodId++; } return 0; } static int diameap_ba_policygetdecision(struct eap_state_machine * eap_sm, struct diameap_eap_interface * eap_i, decision * gdecision) { TRACE_ENTRY("%p %p %p",eap_sm,eap_i,gdecision); if (eap_sm->user.userid != NULL) { if (eap_sm->methodState == EAP_M_END) { if (eap_sm->respMethod == TYPE_IDENTITY) { *gdecision = DECISION_CONTINUE; return 0; } if ((eap_sm->respMethod == TYPE_NAK) || ((eap_sm->respMethod == TYPE_EXPANDED_TYPES) && (eap_sm->respVendor == VENDOR_IETF) && (eap_sm->respVendorMethod == TYPE_NAK))) { goto SelectNextMethod; } if (eap_sm->user.success == TRUE) { *gdecision = DECISION_SUCCESS; } else { *gdecision = DECISION_FAILURE; } } else { goto SelectNextMethod; } return 0; SelectNextMethod: if ((eap_sm->user.methodId == (MAXPROPOSEDMETHODS - 1)) || ((eap_sm->user.proposedmethods[eap_sm->user.methodId + 1].method == TYPE_NONE) && (eap_sm->user.proposedmethods[eap_sm->user.methodId + 1].vendor == VENDOR_IETF))) { TRACE_DEBUG(FULL+1, "%s [EAP protocol] None of proposed EAP Methods authenticated the user.(FAILURE)",DIAMEAP_EXTENSION); *gdecision = DECISION_FAILURE; return 0; } eap_sm->user.methodId = 0; *gdecision = DECISION_CONTINUE; return 0; } if (eap_sm->currentMethod == TYPE_IDENTITY) { *gdecision = DECISION_FAILURE; return 0; } *gdecision = DECISION_CONTINUE; return 0; } static boolean diameap_ba_policydopickup(eap_type type) { TRACE_ENTRY("%d",type); if (type == TYPE_IDENTITY) { return TRUE; } return FALSE; } int diameap_eap_statemachine(struct eap_state_machine * eap_sm, struct diameap_eap_interface * eap_i, boolean * non_fatal_error) { TRACE_ENTRY("%p %p %p", eap_sm, eap_i, non_fatal_error); int ret; if ((eap_sm->eap_state == EAP_IDLE) && (eap_i->aaaEapResp == TRUE)) { eap_sm->eap_state = EAP_RECEIVED; } while (!((eap_sm->eap_state == EAP_IDLE) || (eap_sm->eap_state == EAP_END))) { switch (eap_sm->eap_state) { case EAP_INITIALIZE: if (eap_sm->rxResp == TRUE) { eap_sm->lastId = eap_sm->currentId; eap_sm->currentId = eap_sm->respId; } else { eap_sm->lastId = -1; eap_sm->currentId = -1; } if (eap_sm->rxResp == FALSE) { eap_sm->eap_state = EAP_SELECT_ACTION; } else if ((eap_sm->respMethod == TYPE_NAK) || (eap_sm->respMethod == TYPE_EXPANDED_TYPES && eap_sm->respVendor == VENDOR_IETF && eap_sm->respVendorMethod == TYPE_NAK)) { eap_sm->eap_state = EAP_NAK; } else { eap_sm->eap_state = EAP_PICK_UP_METHOD; } break; case EAP_PICK_UP_METHOD: if (diameap_ba_policydopickup(eap_sm->respMethod) == TRUE) { eap_sm->currentMethod = eap_sm->respMethod; if (diameap_plugin_get(eap_sm->currentVendor, eap_sm->currentMethod, &eap_sm->selectedMethod)) { TRACE_DEBUG(INFO,"%sNo EAP Method plugin available for EAP Method {Type=%d, Vendor=%d}.",DIAMEAP_EXTENSION,eap_sm->currentMethod, eap_sm->currentVendor); } else { TRACE_DEBUG(FULL,"%sCurrent EAP Method {Type=%d, Vendor=%d} (EAP Method plugin selected).",DIAMEAP_EXTENSION,eap_sm->currentMethod, eap_sm->currentVendor); } eap_sm->currentVendor = VENDOR_IETF; if (eap_sm->selectedMethod != NULL) { ret = (*eap_sm->selectedMethod->eap_method_initPickUp)( eap_sm); if (ret) { TRACE_DEBUG(INFO, "%sEAP Method InitPickUp returned error.",DIAMEAP_EXTENSION); eap_sm->selectedMethod = NULL; eap_sm->currentMethod = TYPE_NONE; } } } if (eap_sm->currentMethod == TYPE_NONE) { eap_sm->eap_state = EAP_SELECT_ACTION; } else { eap_sm->eap_state = EAP_METHOD_RESPONSE; } break; case EAP_RECEIVED: TRACE_DEBUG(FULL+1,"%s[EAP Protocol] New EAP Response received",DIAMEAP_EXTENSION) ; diameap_eap_dump(FULL + 1, &eap_i->aaaEapRespData); if ((eap_sm->rxResp == TRUE) && (eap_sm->respId == eap_sm->currentId) && ((eap_sm->respMethod == eap_sm->currentMethod) || ((eap_sm->respMethod == TYPE_EXPANDED_TYPES) && (eap_sm->respVendor == VENDOR_IETF) && (eap_sm->respVendorMethod == eap_sm->currentMethod)))) { eap_sm->eap_state = EAP_INTEGRITY_CHECK; } else if ((eap_sm->rxResp == TRUE) && (eap_sm->respId == eap_sm->currentId) && ((eap_sm->respMethod == TYPE_NAK) || (eap_sm->respMethod == TYPE_EXPANDED_TYPES && eap_sm->respVendor == VENDOR_IETF && eap_sm->respVendorMethod == TYPE_NAK)) && (eap_sm->methodState == EAP_M_PROPOSED)) { eap_sm->eap_state = EAP_NAK; } else { eap_sm->eap_state = EAP_DISCARD; } break; case EAP_DISCARD: TRACE_DEBUG(INFO,"%s[EAP Protocol] Invalid EAP Packet received (Non fatal error).",DIAMEAP_EXTENSION) ; *non_fatal_error = TRUE; eap_sm->eap_state = EAP_IDLE; break; case EAP_SEND_REQUEST: TRACE_DEBUG(FULL+1,"%s[EAP Protocol] New EAP packet request created.",DIAMEAP_EXTENSION) ; diameap_eap_dump(FULL, &eap_i->aaaEapReqData); eap_i->aaaEapResp = FALSE; eap_i->aaaEapReq = TRUE; eap_sm->eap_state = EAP_IDLE; break; case EAP_INTEGRITY_CHECK: if ((*eap_sm->selectedMethod->eap_method_check)(eap_sm, &eap_i->aaaEapRespData) == FALSE) { TRACE_DEBUG(INFO,"%s[EAP Protocol] Invalid EAP packet received {Type=%d, Vendor=%d}. Integrity check failed (non fatal error).",DIAMEAP_EXTENSION,eap_sm->currentMethod,eap_sm->currentVendor); //non_fata_error *non_fatal_error = TRUE; eap_sm->eap_state = EAP_IDLE; } else { eap_sm->eap_state = EAP_METHOD_RESPONSE; } break; case EAP_METHOD_REQUEST: eap_sm->lastId = eap_sm->currentId; diameap_ba_nextid(eap_sm, &eap_sm->currentId); CHECK_FCT((*eap_sm->selectedMethod->eap_method_buildReq)( eap_sm, eap_sm->currentId,&eap_i->aaaEapReqData)) ; if (eap_sm->selectedMethod->eap_method_getTimeout) { if ((*eap_sm->selectedMethod->eap_method_getTimeout)(eap_sm, &eap_i->aaaMethodTimeout)) { TRACE_DEBUG(INFO,"%s[EAP Protocol] [%s plugin] getTimeout failed.",DIAMEAP_EXTENSION,eap_sm->selectedMethod->methodname); eap_i->aaaMethodTimeout = 0; } } else { eap_i->aaaMethodTimeout = 0; } eap_sm->eap_state = EAP_SEND_REQUEST; break; case EAP_METHOD_RESPONSE: if (eap_sm->respMethod >= TYPE_EAP_MD5) { if (eap_sm->user.methodId < 0) { eap_sm->user.methodId = 0; eap_sm->user.methods[eap_sm->user.methodId].vendor = eap_sm->respVendor; eap_sm->user.methods[eap_sm->user.methodId].method = eap_sm->respMethod; eap_sm->user.methodId++; } else if (!((eap_sm->user.methods[eap_sm->user.methodId - 1].vendor == eap_sm->respVendor) && (eap_sm->user.methods[eap_sm->user.methodId - 1].method == eap_sm->respMethod))) { eap_sm->user.methods[eap_sm->user.methodId].vendor = eap_sm->respVendor; eap_sm->user.methods[eap_sm->user.methodId].method = eap_sm->respMethod; eap_sm->user.methodId++; } } if ((*eap_sm->selectedMethod->eap_method_process)(eap_sm, &eap_i->aaaEapRespData)) { TRACE_DEBUG(INFO,"%s[EAP Protocol] [%s plugin] Authentication process failed.",DIAMEAP_EXTENSION,eap_sm->selectedMethod->methodname); *non_fatal_error = TRUE; eap_sm->eap_state = EAP_IDLE; }else{ if ((*eap_sm->selectedMethod->eap_method_isDone)(eap_sm) == TRUE) { /*diameap_ba_PolicyUpdate();*/ eap_i->aaaEapMSKLength = 0; eap_i->aaaEapEMSKLength = 0; if (eap_sm->selectedMethod->eap_method_getKey) { if ((*eap_sm->selectedMethod->eap_method_getKey)(eap_sm, &eap_i->aaaEapMSKData, &eap_i->aaaEapMSKLength, &eap_i->aaaEapEMSKData, &eap_i->aaaEapEMSKLength)) { TRACE_DEBUG(INFO,"%s[EAP Protocol] [%s plugin] Generating EAP Master Key failed.",DIAMEAP_EXTENSION,eap_sm->selectedMethod->methodname) eap_i->aaaEapMSKLength = 0; eap_i->aaaEapEMSKLength = 0; eap_i->aaaEapKeyAvailable = FALSE; } else { eap_i->aaaEapKeyAvailable = TRUE; } } eap_sm->methodState = EAP_M_END; eap_sm->eap_state = EAP_SELECT_ACTION; } else { eap_sm->methodState = EAP_M_CONTINUE; eap_sm->eap_state = EAP_METHOD_REQUEST; } } break; case EAP_PROPOSE_METHOD: if (diameap_ba_policygetnextmethod(eap_sm, &eap_sm->currentMethod, &eap_sm->currentVendor)) { TRACE_DEBUG(INFO,"%s[EAP Protocol] [%s plugin] Selecting EAP Method plugin failed.",DIAMEAP_EXTENSION,eap_sm->selectedMethod->methodname); *non_fatal_error = TRUE; eap_sm->eap_state = EAP_END; } TRACE_DEBUG(FULL,"%s[EAP Protocol] Selecting EAP Method plugin: %s(%d). [user: %s]",DIAMEAP_EXTENSION,eap_sm->selectedMethod->methodname,eap_sm->selectedMethod->methodtype,eap_sm->user.userid) ; if ((*eap_sm->selectedMethod->eap_method_init)(eap_sm)) { TRACE_DEBUG(INFO,"%s[EAP Protocol] [%s plugin] Initializing EAP plugin failed.",DIAMEAP_EXTENSION,eap_sm->selectedMethod->methodname); } if ((eap_sm->currentMethod == TYPE_IDENTITY) || (eap_sm->currentMethod == TYPE_NOTIFICATION)) { eap_sm->methodState = EAP_M_CONTINUE; } else { eap_sm->methodState = EAP_M_PROPOSED; } eap_sm->eap_state = EAP_METHOD_REQUEST; break; case EAP_NAK: TRACE_DEBUG(FULL+1,"%s[EAP Protocol] EAP NAK Packet received.",DIAMEAP_EXTENSION) ; if (eap_sm->selectedMethod->eap_method_free) { (*eap_sm->selectedMethod->eap_method_free)(eap_sm->methodData); eap_sm->methodData = NULL; } else { if (eap_sm->methodData) { free(eap_sm->methodData); eap_sm->methodData = NULL; } } diameap_ba_policyupdate(eap_sm, &eap_i->aaaEapRespData); eap_sm->eap_state = EAP_SELECT_ACTION; break; case EAP_SELECT_ACTION: CHECK_FCT(diameap_ba_policygetdecision(eap_sm, eap_i,&eap_sm->sm_decision)) ; switch (eap_sm->sm_decision) { case DECISION_CONTINUE: eap_sm->eap_state = EAP_PROPOSE_METHOD; break; case DECISION_FAILURE: TRACE_DEBUG(FULL,"%s[EAP Protocol] Authentication Failure [User: %s].",DIAMEAP_EXTENSION,eap_sm->user.userid) ; eap_sm->lastId = eap_sm->currentId; diameap_ba_nextid(eap_sm, &eap_sm->currentId); CHECK_FCT(diameap_eap_new(EAP_FAILURE, (u8) eap_sm->currentId, TYPE_NONE, NULL, 0,&eap_i->aaaEapReqData)) ; eap_i->aaaFail = TRUE; *non_fatal_error = FALSE; eap_sm->eap_state = EAP_END; if (eap_sm->methodData) { if (eap_sm->selectedMethod->eap_method_free) { (*eap_sm->selectedMethod->eap_method_free)( eap_sm->methodData); eap_sm->methodData = NULL; } else { free(eap_sm->methodData); eap_sm->methodData = NULL; } } break; case DECISION_SUCCESS: TRACE_DEBUG(FULL,"%s[EAP Protocol] Authentication Success [User: %s].",DIAMEAP_EXTENSION,eap_sm->user.userid) ; eap_sm->lastId = eap_sm->currentId; diameap_ba_nextid(eap_sm, &eap_sm->currentId); CHECK_FCT(diameap_eap_new(EAP_SUCCESS, (u8) eap_sm->currentId, TYPE_NONE, NULL, 0,&eap_i->aaaEapReqData)) ; if (eap_i->aaaEapMSKData != NULL) { TRACE_DEBUG(FULL+1,"%s[EAP Protocol] EAP Key available [User: %s].",DIAMEAP_EXTENSION,eap_sm->user.userid); eap_i->aaaEapKeyAvailable = TRUE; } else { TRACE_DEBUG(FULL+1,"%s[EAP Protocol] No EAP Key available [User: %s].",DIAMEAP_EXTENSION,eap_sm->user.userid); } eap_i->aaaSuccess = TRUE; *non_fatal_error = FALSE; eap_sm->eap_state = EAP_END; if (eap_sm->selectedMethod->eap_method_free) { (*eap_sm->selectedMethod->eap_method_free)( eap_sm->methodData); eap_sm->methodData = NULL; } else { if (eap_sm->methodData) { free(eap_sm->methodData); eap_sm->methodData = NULL; } } break; default: TRACE_DEBUG(INFO,"%sIncorrect EAP Decision.(Please report this problem.)",DIAMEAP_EXTENSION) ; } break; case EAP_END: break; case EAP_IDLE: break; } } return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/diameap_eap.h000066400000000000000000000060151333553357400261120ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #ifndef DIAMEAP_EAP_H_ #define DIAMEAP_EAP_H_ /************************************************/ /* EAP AAA Interface */ /************************************************/ /* EAP Backend Authenticator State Machine */ struct diameap_eap_interface { /* Variables (AAA Interface to Backend Authenticator)*/ boolean aaaEapResp; struct eap_packet aaaEapRespData; /*Variables (Backend Authenticator to AAA Interface )*/ boolean aaaEapReq; boolean aaaEapNoReq; boolean aaaSuccess; boolean aaaFail; struct eap_packet aaaEapReqData; u8 *aaaEapMSKData; int aaaEapMSKLength; u8 *aaaEapEMSKData; int aaaEapEMSKLength; boolean aaaEapKeyAvailable; int aaaMethodTimeout; }; int diameap_eap_statemachine(struct eap_state_machine * sm, struct diameap_eap_interface * eap_i, boolean * error); #endif /* EAP_H_ */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/diameap_eappacket.c000066400000000000000000000222041333553357400272730ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #include "libdiameap.h" int diameap_eap_get_code(struct eap_packet *eappacket, eap_code * eapcode) { TRACE_ENTRY("%p %p",eappacket,eapcode); if (eappacket->data == NULL) { *eapcode = ERROR; TRACE_DEBUG(INFO,"%sEmpty data in EAP packet: no EAP Code to return.",DIAMEAP_EXTENSION); return EINVAL; } if (eappacket->length < 1) { *eapcode = ERROR; TRACE_DEBUG(INFO,"%sEAP packet length %d : no EAP Code to return.",DIAMEAP_EXTENSION, eappacket->length); return EINVAL; } *eapcode = G8(eappacket->data); return 0; } int diameap_eap_get_identifier(struct eap_packet *eappacket, u8 * identifier) { TRACE_ENTRY("%p %p",eappacket,identifier); *identifier = 0; if (eappacket->data == NULL) { TRACE_DEBUG(INFO,"%sEmpty data in EAP packet: no Identifier field to return.",DIAMEAP_EXTENSION); return EINVAL; } if (eappacket->length < 2) { TRACE_DEBUG(INFO,"%sEAP packet length %d : no Identifier field to return.",DIAMEAP_EXTENSION, eappacket->length); return EINVAL; } *identifier = G8(eappacket->data + 1); return 0; } int diameap_eap_get_length(struct eap_packet *eappacket, u16 *length) { TRACE_ENTRY("%p %p",eappacket,length); *length = 0; if (eappacket->data == NULL) { TRACE_DEBUG(INFO,"%sEmpty data in EAP packet: no Length field to return.",DIAMEAP_EXTENSION); return EINVAL; } if (eappacket->ulength < 4) { TRACE_DEBUG(INFO,"%sEAP packet length %d : no Length field to return.",DIAMEAP_EXTENSION, eappacket->length); return EINVAL; } *length = (u16) G16BIGE((eappacket->data + 2)); return 0; } int diameap_eap_get_packetlength(struct eap_packet *eappacket, u16 *length) { TRACE_ENTRY("%p %p",eappacket,length); if (eappacket->data == NULL) { TRACE_DEBUG(INFO,"%sEmpty data in EAP packet: no Length field to return.",DIAMEAP_EXTENSION); return EINVAL; } *length = eappacket->ulength; return 0; } int diameap_eap_get_type(struct eap_packet *eappacket, eap_type * eaptype) { TRACE_ENTRY("%p %p",eappacket,eaptype); *eaptype = 0; if (eappacket->data == NULL) { TRACE_DEBUG(INFO,"%sEmpty data in EAP packet: no EAP Type field to return.",DIAMEAP_EXTENSION); return EINVAL; } if (eappacket->length < 5) { TRACE_DEBUG(INFO,"%sEAP packet length %d : no EAP Type field to return.",DIAMEAP_EXTENSION, eappacket->length); return EINVAL; } *eaptype = (u32) G8(eappacket->data + 4); return 0; } boolean diameap_eap_check_code(eap_code code) { TRACE_ENTRY("%d",code); if (code != EAP_REQUEST && code != EAP_RESPONSE && code != EAP_SUCCESS && code != EAP_FAILURE) { TRACE_DEBUG(FULL,"%sIncorrect EAP Code (%d).",DIAMEAP_EXTENSION,code); return FALSE; } return TRUE; } int diameap_eap_get_packetdata(struct eap_packet *eappacket, u8 ** data, int *len) { TRACE_ENTRY("%p %p",eappacket,data); if (eappacket->length > 0) { *data = malloc(sizeof(u8) * eappacket->length); U8COPY(*data,0,eappacket->length,eappacket->data); *len = eappacket->length; return 0; } TRACE_DEBUG(INFO,"%sEAP packet length=%d: empty or wrong EAP Packet.",DIAMEAP_EXTENSION, eappacket->length); *data = NULL; *len = 0; return EINVAL; } int diameap_eap_get_data(struct eap_packet *eappacket, u8 ** data, int * len) { TRACE_ENTRY("%p %p",eappacket,data); if (eappacket->length > 5) { CHECK_MALLOC( *data = malloc(sizeof(u8) * (eappacket->length - 5)) ); U8COPY(*data,0,(eappacket->length-5),(eappacket->data+5)); *len = eappacket->length - 5; return 0; } TRACE_DEBUG(INFO,"%sEAP packet length=%d: empty or wrong EAP Packet.",DIAMEAP_EXTENSION, eappacket->length); *data = NULL; *len = 0; return EINVAL; } void diameap_eap_dump(int level, struct eap_packet *eappacket) { TRACE_ENTRY("%d %p",level,eappacket); if (!TRACE_BOOL(level)) return; if (eappacket->data == NULL) return; if (eappacket->length < 5) return; if (eappacket->ulength < 5) return; fd_log_debug("------------- Dump EAP Packet-------------"); int i; fd_log_debug("\t -Code : "); eap_code code; CHECK_FCT_DO(diameap_eap_get_code(eappacket,&code),return); switch (code) { case 1: fd_log_debug("Request"); break; case 2: fd_log_debug("Response"); break; case 3: fd_log_debug("Success"); break; case 4: fd_log_debug("Failure"); break; default: fd_log_debug("Error (EAP Code value [%d] not allowed)",code); break; } u8 id; CHECK_FCT_DO(diameap_eap_get_identifier(eappacket,&id),return); fd_log_debug("\t -Identifier : %x ", id); u16 length; CHECK_FCT_DO(diameap_eap_get_length(eappacket,&length),return); fd_log_debug("\t -Length : %d ", (unsigned int)length); if (eappacket->length > 4) { eap_type type; CHECK_FCT_DO(diameap_eap_get_type(eappacket,&type),return); fd_log_debug("\t -Type : %d ", type); } if (eappacket->length > 5) { char buf[1024]; snprintf(buf, sizeof(buf), "\t -Data : "); for (i = 5; i < eappacket->length && i < 30; i++) { snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "%02x ", G8(eappacket->data + i)); } if(i+1length) snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "[...] (len=%d)",(unsigned int) length); fd_log_debug("%s", buf); } fd_log_debug("-------------End Dump EAP Packet-------------"); } int diameap_eap_new(eap_code code, u8 id, eap_type type, u8 * data, u16 dataLength, struct eap_packet *eappacket) { TRACE_ENTRY("%d %hhu %d %p %hu %p", code, id, type, data, dataLength,eappacket); int length = 0; //Initialize EAP Packet eappacket->length = 0; eappacket->ulength = 0; eappacket->data = NULL; if (diameap_eap_check_code(code) == FALSE) { TRACE_DEBUG( INFO, "%sWrong EAP Code. Only Request, Response, Success or Failure are permitted.",DIAMEAP_EXTENSION); return EINVAL; } length += EAP_HEADER; if (code == EAP_REQUEST || code == EAP_RESPONSE) { // EAP Packet code is either Request or Response if (type == TYPE_NONE) { TRACE_DEBUG(INFO, "%sUnable to create a new EAP Packet (Request or Response) without EAP Type field.",DIAMEAP_EXTENSION); return EINVAL; } length += EAP_TYPE; // EAP Packet code if (data != NULL) { length += dataLength; if (length > (int) MAX_EAP_PACKET) { TRACE_DEBUG(INFO, "%sUnable to add Data to EAP Packet. Data field length exceed allowed data size.", DIAMEAP_EXTENSION); return EINVAL; } else { CHECK_MALLOC(eappacket->data=malloc(sizeof(u8)*length)); memset(eappacket->data, 0, sizeof(u8) * length); U8COPY(eappacket->data, 5, dataLength, data); } } else { CHECK_MALLOC(eappacket->data=malloc(sizeof(u8)*length)); memset(eappacket->data, 0, sizeof(u8) * length); } P8(eappacket->data + 4, type); } else { //EAP Packet code is SUCCESS or FAILURE CHECK_MALLOC(eappacket->data=malloc(sizeof(u8)*length)); memset(eappacket->data, 0, sizeof(u8) * length); //No Data filed //No Type field } //Add Code and Identifier fields P8(eappacket->data, code); P8(eappacket->data + 1, id); //Add length field P16BIGE(eappacket->data + 2, length); eappacket->length = length; eappacket->ulength = length; return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/diameap_eappacket.h000066400000000000000000000201561333553357400273040ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #ifndef DIAMEAP_EAPPACKET_H_ #define DIAMEAP_EAPPACKET_H_ #include "diameap_defs.h" /*EAP Packet definition : the Extensible Authentication Protocol (RFC3748) */ /* Define Length/Size */ #define EAP_HEADER 4 /* EAP Packet header size : 4 Bytes */ #define EAP_TYPE 1 /* EAP Type field size : 1 Byte */ #define MAX_EAP_PACKET (u16)0xffff /* Maximum value allowed for an EAP Packet */ /*EAP Packet Codes Type*/ typedef enum { ERROR = 0, /* EAP Packet Code should not be set to ERROR. Indicates a wrong Code value received. */ EAP_REQUEST = 1, /* EAP Request (value=1). */ EAP_RESPONSE = 2, /* EAP Response (value=2). */ EAP_SUCCESS = 3, /* EAP Success (value=3). */ EAP_FAILURE = 4 /* EAP Failure (value=4). */ } eap_code; /* EAP Packet */ struct eap_packet { u16 length; /* Length of data (equivalent to the length field). */ u16 ulength; /* Length of received or inserted bytes in the data pointer. */ u8 *data; /* Data buffer (including Code, Identifier, Length, (also Type and Data fields if exists)). */ }; /* EAP Methods Types */ typedef enum { TYPE_NONE = 0, /* Indicate no method specified */ TYPE_IDENTITY = 1, /* EAP Identity (RFC3748) */ TYPE_NOTIFICATION = 2, /* EAP Notification (RFC3748) */ TYPE_NAK = 3, /* EAP NAK (RFC3748) */ TYPE_EAP_MD5 = 4, /* EAP MD5 (RFC3748) */ TYPE_OTP = 5, /* EAP OTP (RFC3748) */ TYPE_GTC = 6, /* EAP GTC (RFC3748) */ TYPE_EAP_TLS = 13, /* EAP TLS (RFC5216) */ TYPE_EXPANDED_TYPES = 254, /* EAP Expanded NAK (RFC3748) */ TYPE_EXPERIMENTAL_USE = 255 /* for Experimental use (RFC3748) */ } eap_type; /* Function : diameap_eap_get_code * * Parameters: * eapPacket : an EAP Packet * eapcode : On successful return, the EAP Code is stored here. * * Description: * Get the EAP Code of an EAP Packet. If NULL EAP Packet or empty packet ERROR is stored in eapcode. * * Return value: * 0 : if successful * EINVAL : if EAP Packet is NULL or empty */ int diameap_eap_get_code(struct eap_packet *eapPacket, eap_code * eapcode); /* Function : diameap_eap_get_identifier * * Parameters: * eapPacket : an EAP Packet * identifier : on successful return, the identifier value is stored here. * * Description: * Get the Identifier field of an EAP Packet. * * Return value: * 0 : if successful * EINVAL : if the EAP Packet is NULL or the EAP identifier value is not valid or data length < 2 * */ int diameap_eap_get_identifier(struct eap_packet *eapPacket, u8 * identifier); /* Function : diameap_eap_get_length * * Parameters: * eapPacket : an EAP Packet * length : on successful return, the EAP Packet length field is stored here. * * Description: * Get the Length field of an EAP Packet * * Return value: * 0 : if successful * EINVAL : if the data length < 4, or the EAP Packet is NULL. */ int diameap_eap_get_length(struct eap_packet *eapPacket, u16 *length); /* Function : diameap_eap_get_packetlength * * Parameters: * eapPacket : an EAP Packet * length : on successful return, the length of EAP Packet is stored here. * * Description: * Get the received or inserted length of Bytes in an EAP Packet. * * Return value: * 0 : if successful * EINVAL : if the EAP Packet is NULL */ int diameap_eap_get_packetlength(struct eap_packet *eapPacket, u16 *length); /* Function : diameap_eap_get_type * * Parameters: * eapPacket : an EAP Packet * eaptype : on successful return, the EAP Type field is stored here. * * Description: * Get the Type field of an EAP Packet. * * Return value: * 0 : if successful * EINVAL : if the EAP Packet is NULL or data length < 5 */ int diameap_eap_get_type(struct eap_packet *eapPacket,eap_type * eaptype); /* Function : diameap_eap_get_packetdata * * Parameters: * eapPacket : an EAP Packet * eapdata : on successful return, the content of EAP Packet is stored here. * eapdatalen : on successful return, the length of EAP Packet is stored here. * * Description: * Get the data content of an EAP Packet. * * Return value: * 0 : if successful * EINVAL : if there is no data in the current EAP Packet (ulength<1) */ int diameap_eap_get_packetdata(struct eap_packet *eapPacket, u8 ** data, int *len); /* Function : diameap_eap_get_data * * Parameters: * eapPacket : an EAP Packet * data : on successful return, the content of data field is stored here. * datalen : on successful return, the length of data field is stored here. * * Description: * Return the Data field of an EAP Packet * * Return value: * 0 : if successful * EINVAL : if there is no data in the current EAP Packet (ulength<6) */ int diameap_eap_get_data(struct eap_packet *eapPacket, u8 ** data, int * len); /* Function : diameap_eap_chech_code * * Parameters: * code : an EAP Code value * * Description: * Check if the code value is valid or not * * Return value: * TRUE : if valid value * FALSE : if not valid value * */ boolean diameap_eap_check_code(eap_code code); /* Function : diameap_eap_dump * * Parameters: * eapPacket : an EAP Packet * level : Debug level * * Description: * Dump the structure and the content of all the fields in this EAP Packet * */ void diameap_eap_dump(int level, struct eap_packet *eapPacket); /* Function : diameap_eap_new * * Parameters: * code : EAP CODE field value * id : EAP Identifier field value * type : (optional) EAP type field value if exist, otherwise NULL * data : (optional) EAP data field value if exist, otherwise NULL * dataLength : (optional) Length of the data to be inserted in the Packet, otherwise 0 * eappacket : on successful return, pointer to eap packet is stored here. * Description: * Create a new EAP Packet with the specified parameters and data * * Return value: * 0 : if successful * EINVAL : Invalid parameter */ int diameap_eap_new(eap_code code, u8 id, eap_type type, u8 * data, u16 dataLength, struct eap_packet *eappacket); #endif /* DIAMEAP_EAPPACKET_H_ */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/diameap_init.c000066400000000000000000000500111333553357400262760ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #include "diameap_common.h" /* Dictionary Object templates */ struct dict_object * dataobj_diameap_cmd = NULL; /* Diameter-EAP-Request Command Code */ struct dict_object * dataobj_diameap_app = NULL; /* Diameter EAP Application object */ struct dict_object * dataobj_diameap_ven = NULL; /* Diameter EAP Application Vendor object */ struct dict_object * dataobj_accounting_eap_auth_method = NULL; struct dict_object * dataobj_acct_interim_interval = NULL; struct dict_object * dataobj_auth_application_id = NULL; struct dict_object * dataobj_auth_grace_period = NULL; struct dict_object * dataobj_auth_request_type = NULL; struct dict_object * dataobj_auth_session_state = NULL; struct dict_object * dataobj_authorization_lifetime = NULL; struct dict_object * dataobj_callback_id = NULL; struct dict_object * dataobj_callback_number = NULL; struct dict_object * dataobj_called_station_id = NULL; struct dict_object * dataobj_calling_station_id = NULL; struct dict_object * dataobj_class = NULL; struct dict_object * dataobj_configuration_token = NULL; struct dict_object * dataobj_connect_info = NULL; struct dict_object * dataobj_destination_host = NULL; struct dict_object * dataobj_destination_realm = NULL; struct dict_object * dataobj_eap_master_session_key = NULL; struct dict_object * dataobj_eap_key_name = NULL; struct dict_object * dataobj_eap_payload = NULL; struct dict_object * dataobj_eap_reissued_payload = NULL; struct dict_object * dataobj_error_message = NULL; struct dict_object * dataobj_error_reporting_host = NULL; struct dict_object * dataobj_failed_avp = NULL; struct dict_object * dataobj_filter_id = NULL; struct dict_object * dataobj_framed_appletalk_link = NULL; struct dict_object * dataobj_framed_appletalk_network = NULL; struct dict_object * dataobj_framed_appletalk_zone = NULL; struct dict_object * dataobj_framed_compression = NULL; struct dict_object * dataobj_framed_interface_id = NULL; struct dict_object * dataobj_framed_ip_address = NULL; struct dict_object * dataobj_framed_ip_netmask = NULL; struct dict_object * dataobj_framed_ipv6_prefix = NULL; struct dict_object * dataobj_framed_ipv6_pool = NULL; struct dict_object * dataobj_framed_ipv6_route = NULL; struct dict_object * dataobj_framed_ipx_network = NULL; struct dict_object * dataobj_framed_mtu = NULL; struct dict_object * dataobj_framed_pool = NULL; struct dict_object * dataobj_framed_protocol = NULL; struct dict_object * dataobj_framed_route = NULL; struct dict_object * dataobj_framed_routing = NULL; struct dict_object * dataobj_idle_timeout = NULL; struct dict_object * dataobj_multi_round_time_out = NULL; struct dict_object * dataobj_nas_filter_rule = NULL; struct dict_object * dataobj_nas_identifier = NULL; struct dict_object * dataobj_nas_ip_address = NULL; struct dict_object * dataobj_nas_ipv6_address = NULL; struct dict_object * dataobj_nas_port = NULL; struct dict_object * dataobj_nas_port_id = NULL; struct dict_object * dataobj_nas_port_type = NULL; struct dict_object * dataobj_originating_line_info = NULL; struct dict_object * dataobj_origin_host = NULL; struct dict_object * dataobj_origin_realm = NULL; struct dict_object * dataobj_origin_state_id = NULL; struct dict_object * dataobj_port_limit = NULL; struct dict_object * dataobj_proxy_info = NULL; struct dict_object * dataobj_qos_filter_rule = NULL; struct dict_object * dataobj_re_auth_request_type = NULL; struct dict_object * dataobj_redirect_host = NULL; struct dict_object * dataobj_redirect_host_usage = NULL; struct dict_object * dataobj_redirect_max_cache_time = NULL; struct dict_object * dataobj_reply_message = NULL; struct dict_object * dataobj_result_code = NULL; struct dict_object * dataobj_route_record = NULL; struct dict_object * dataobj_service_type = NULL; struct dict_object * dataobj_session_id = NULL; struct dict_object * dataobj_session_timeout = NULL; struct dict_object * dataobj_state = NULL; struct dict_object * dataobj_tunneling = NULL; struct dict_object * dataobj_user_name = NULL; static int diameap_init_config(char * conffile) { TRACE_ENTRY("%p",conffile); if (conffile != NULL) { diameap_config->conffile = conffile; } else { TRACE_DEBUG(FULL,"%sNo configuration file provided with the DiamEAP extension: default parameters will be used.",DIAMEAP_EXTENSION); } diameap_config->application_id = 5; diameap_config->vendor_id = 0; diameap_config->command_code = 268; diameap_config->diam_realm = strdup(fd_g_config->cnf_diamrlm); diameap_config->max_invalid_eap_packet = 5; diameap_config->multi_round_time_out = 30; check_user_identity = TRUE; return 0; } static int diameap_init_obj(void) { CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_APPLICATION, APPLICATION_BY_ID, &(diameap_config->application_id),&dataobj_diameap_app, ENOENT)); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND,CMD_BY_CODE_R, &(diameap_config->command_code), &dataobj_diameap_cmd, ENOENT)); // CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_VENDOR,VENDOR_OF_APPLICATION, &dataobj_diameap_app, &dataobj_diameap_ven,ENOENT) ); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Accounting-EAP-Auth-Method", &dataobj_accounting_eap_auth_method, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Acct-Interim-Interval", &dataobj_acct_interim_interval, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Auth-Application-Id", &dataobj_auth_application_id, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Auth-Grace-Period", &dataobj_auth_grace_period, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Auth-Request-Type", &dataobj_auth_request_type, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Auth-Session-State", &dataobj_auth_session_state, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Authorization-Lifetime", &dataobj_authorization_lifetime, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Callback-Id", &dataobj_callback_id, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Callback-Number", &dataobj_callback_number, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Called-Station-Id", &dataobj_called_station_id, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Calling-Station-Id", &dataobj_calling_station_id, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Class", &dataobj_class, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Configuration-Token", &dataobj_configuration_token, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Connect-Info", &dataobj_connect_info, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Host", &dataobj_destination_host, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Realm", &dataobj_destination_realm, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "EAP-Master-Session-Key", &dataobj_eap_master_session_key, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "EAP-Key-Name", &dataobj_eap_key_name, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "EAP-Payload", &dataobj_eap_payload, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "EAP-Reissued-Payload", &dataobj_eap_reissued_payload, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Error-Message", &dataobj_error_message, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Error-Reporting-Host", &dataobj_error_reporting_host, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Failed-AVP", &dataobj_failed_avp, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Filter-Id", &dataobj_filter_id, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-AppleTalk-Link", &dataobj_framed_appletalk_link, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-AppleTalk-Network", &dataobj_framed_appletalk_network, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-AppleTalk-Zone", &dataobj_framed_appletalk_zone, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-Compression", &dataobj_framed_compression, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-Interface-Id", &dataobj_framed_interface_id, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-IP-Address", &dataobj_framed_ip_address, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-IP-Netmask", &dataobj_framed_ip_netmask, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-IPv6-Prefix", &dataobj_framed_ipv6_prefix, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-IPv6-Pool", &dataobj_framed_ipv6_pool, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-IPv6-Route", &dataobj_framed_ipv6_route, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-IPX-Network", &dataobj_framed_ipx_network, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-MTU", &dataobj_framed_mtu, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-Pool", &dataobj_framed_pool, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-Protocol", &dataobj_framed_protocol, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-Route", &dataobj_framed_route, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-Routing", &dataobj_framed_routing, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Idle-Timeout", &dataobj_idle_timeout, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Multi-Round-Time-Out", &dataobj_multi_round_time_out, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "NAS-Filter-Rule", &dataobj_nas_filter_rule, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "NAS-Identifier", &dataobj_nas_identifier, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "NAS-IP-Address", &dataobj_nas_ip_address, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "NAS-IPv6-Address", &dataobj_nas_ipv6_address, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "NAS-Port", &dataobj_nas_port, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "NAS-Port-Id", &dataobj_nas_port_id, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "NAS-Port-Type", &dataobj_nas_port_type, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Originating-Line-Info", &dataobj_originating_line_info, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Host", &dataobj_origin_host, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Realm", &dataobj_origin_realm, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-State-Id", &dataobj_origin_state_id, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Port-Limit", &dataobj_port_limit, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Proxy-Info", &dataobj_proxy_info, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "QoS-Filter-Rule", &dataobj_qos_filter_rule, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Re-Auth-Request-Type", &dataobj_re_auth_request_type, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Redirect-Host", &dataobj_redirect_host, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Redirect-Host-Usage", &dataobj_redirect_host_usage, ENOENT)); CHECK_FCT( fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Redirect-Max-Cache-Time", &dataobj_redirect_max_cache_time, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Reply-Message", &dataobj_reply_message, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Result-Code", &dataobj_result_code, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Route-Record", &dataobj_route_record, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Service-Type", &dataobj_service_type, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Session-Id", &dataobj_session_id, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Session-Timeout", &dataobj_session_timeout, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "State", &dataobj_state, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Tunneling", &dataobj_tunneling, ENOENT)); CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "User-Name", &dataobj_user_name, ENOENT)); return 0; } /* Parse the configuration file (using the yacc parser) */ static int diameap_parse_conffile(void) { if (!diameap_config->conffile) { TRACE_DEBUG (INFO,"%sNo configuration file to parse for DiamEAP Extension.",DIAMEAP_EXTENSION); return EINVAL; } extern FILE * diameapin; TRACE_DEBUG (FULL, "%sParsing configuration file: %s",DIAMEAP_EXTENSION, diameap_config->conffile); diameapin = fopen(diameap_config->conffile, "r"); if (!diameapin) { TRACE_DEBUG(INFO,"%sUnable to open configuration file %s for reading: %s",DIAMEAP_EXTENSION, diameap_config->conffile, strerror(errno)); return errno; } /* call yacc parser */ CHECK_FCT(diameapparse(diameap_config)); /* close the file */ CHECK_FCT(fclose(diameapin)); return 0; } int diameap_set_mysql_param(char * user, char * passwd, char * server, char * database) { TRACE_ENTRY("%p %p %p %p",user,passwd,server,database); if (user == NULL) { TRACE_DEBUG(INFO,"%sUnable to connect to MySQL Database Server: Empty user name or missing in the configuration file.",DIAMEAP_EXTENSION); return EINVAL; } if (server == NULL) { TRACE_DEBUG(INFO,"%sUnable to connect to MySQL Database Server: MySQL Database Server address missing in the configuration file.",DIAMEAP_EXTENSION); return EINVAL; } if (database == NULL) { TRACE_DEBUG(INFO,"%sUnable to connect to MySQL Database Server: MySQL Database name missing in configuration file.",DIAMEAP_EXTENSION); return EINVAL; } diameap_config->db.user = user; diameap_config->db.password = passwd; diameap_config->db.server = server; diameap_config->db.database = database; return 0; } /* Connecting to MySQL Database */ int diameap_mysql_connect(void) { TRACE_ENTRY(); db_conn = mysql_init(NULL); const my_bool mysql_reconnect_val=1; mysql_options(db_conn,MYSQL_OPT_RECONNECT,&mysql_reconnect_val); /* Connect to database */ if (!mysql_real_connect(db_conn, diameap_config->db.server, diameap_config->db.user, diameap_config->db.password, diameap_config->db.database, 0, NULL, 0)) { TRACE_DEBUG(INFO,"%sConnection to MySQL Database Server failed: %s",DIAMEAP_EXTENSION, mysql_error(db_conn)); return errno; } return 0; } static void diameap_conf_dump(void) { if (!TRACE_BOOL(INFO)) return; fd_log_debug("-------- DiamEAP extension : Configuration parameters (Dump) -------------"); fd_log_debug("\t-Configuration file.....: %s", diameap_config->conffile); fd_log_debug("\t-EAP Application Id.....: %u", diameap_config->application_id); fd_log_debug("\t-EAP Application Command: %u", diameap_config->command_code); fd_log_debug("\t-EAP Application Vendor.: %u", diameap_config->vendor_id); fd_log_debug("\t-Max invalid EAP packets: %u", diameap_config->max_invalid_eap_packet); fd_log_debug("\t-Multi-Round Timeout....: %u", diameap_config->multi_round_time_out); if (diameap_config->db.user) { fd_log_debug("\t-MySQL Database Params..:"); fd_log_debug("\t\tUser .......:%s", diameap_config->db.user); fd_log_debug("\t\tServer .....:%s", diameap_config->db.server); fd_log_debug("\t\tDatabase....:%s", diameap_config->db.database); } fd_log_debug("\t-EAP Method Plugins.....: "); diameap_plugin_dump(); fd_log_debug("-------- DiamEAP extension : Configuration parameters (End) ---------------"); } int diameap_init(char * conffile) { TRACE_ENTRY("%p",conffile); /* Initialize the diameap_config structure*/ CHECK_FCT(diameap_init_config(conffile)); if (diameap_config->conffile) { /* parse the configuration file*/ CHECK_FCT(diameap_parse_conffile()); /* Load EAP methods plug-ins */ CHECK_FCT(diameap_plugin_load()); } else { TRACE_DEBUG(FULL,"%sNo EAP method plug-in available with a default configuration.",DIAMEAP_EXTENSION); } /* Initialize Dictionary templates */ CHECK_FCT(diameap_init_obj()); /* Initialize access to user's information Database */ CHECK_FCT(diameap_mysql_connect()); /* Dump DiamEAP extension configuration */ diameap_conf_dump(); return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/diameap_mysql.c000066400000000000000000000155561333553357400265170ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #include "diameap_mysql.h" static pthread_mutex_t db_cs_mutex = PTHREAD_MUTEX_INITIALIZER; int diameap_get_eap_user(struct eap_user * user, char * username) { TRACE_ENTRY("%p %p",user,username); if (db_conn == NULL) { TRACE_DEBUG(INFO, "%sNot connected to the MySQL Database server.",DIAMEAP_EXTENSION); return EINVAL; } mysql_thread_init(); MYSQL_RES *res; MYSQL_ROW row; char * query; CHECK_MALLOC(query=(char *)malloc(sizeof(char)*255)); sprintf( query, "SELECT id,username,password,eapmethod, vendor FROM users WHERE users.username='%s' and users.active='Y' ", username); CHECK_POSIX(pthread_mutex_lock( &db_cs_mutex )); if (mysql_query(db_conn, query)) { CHECK_POSIX(pthread_mutex_unlock( &db_cs_mutex )); TRACE_DEBUG(INFO, "%sQuery execution fail. %s",DIAMEAP_EXTENSION, mysql_error(db_conn)); mysql_thread_end(); free(query); query = NULL; return EINVAL; } res = mysql_store_result(db_conn); CHECK_POSIX(pthread_mutex_unlock( &db_cs_mutex )); if ((row = mysql_fetch_row(res)) != NULL) { user->id = atoi(row[0]); CHECK_MALLOC(user->userid=malloc(strlen(row[1])+1)); memcpy(user->userid,row[1],strlen(row[1])+1); user->useridLength = strlen(row[1]); CHECK_MALLOC(user->password=malloc(strlen(row[2])+1)); memcpy(user->password, row[2],strlen(row[2])+1); user->passwordLength = strlen(row[2]); user->proposed_eap_method = atoi(row[3]); user->proposed_eap_method_vendor = atoi(row[4]); mysql_free_result(res); mysql_thread_end(); free(query); query = NULL; return 0; } TRACE_DEBUG(INFO, "%sUser unavailable.",DIAMEAP_EXTENSION); mysql_free_result(res); mysql_thread_end(); free(query); query = NULL; return EINVAL; } int diameap_authentication_get_attribs(struct eap_user *user, struct fd_list * attribute_list) { TRACE_ENTRY("%p %p",user,attribute_list); if (db_conn == NULL) { TRACE_DEBUG(INFO, "%sNot connected to the MySQL Database server.",DIAMEAP_EXTENSION); return EINVAL; } mysql_thread_init(); MYSQL_RES *res; MYSQL_ROW row; char * query; CHECK_MALLOC(query=malloc(sizeof(char)*255)); sprintf( query, "SELECT `authe`.`attribute` ,`authe`.`value` FROM `authe` WHERE `authe`.`grp` IN ( SELECT `user_grp`.`grp` FROM `user_grp` WHERE `user_grp`.`user` = %d ) ", user->id); CHECK_POSIX(pthread_mutex_lock( &db_cs_mutex )); if (mysql_query(db_conn, query)) { CHECK_POSIX(pthread_mutex_unlock( &db_cs_mutex )); TRACE_DEBUG(INFO, "%sQuery execution fail. %s",DIAMEAP_EXTENSION, mysql_error(db_conn)); mysql_thread_end(); free(query); query = NULL; return EINVAL; } res = mysql_store_result(db_conn); CHECK_POSIX(pthread_mutex_unlock( &db_cs_mutex )); while ((row = mysql_fetch_row(res))) { struct auth_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct auth_attribute))); memset(attribute, 0, sizeof(struct auth_attribute)); fd_list_init(&attribute->chain, NULL); attribute->attrib = strdup(row[0]); attribute->op = NULL; attribute->value = strdup(row[1]); fd_list_insert_before(attribute_list, &attribute->chain); } mysql_free_result(res); mysql_thread_end(); free(query); query = NULL; return 0; } int diameap_authorization_get_attribs(struct eap_user *user, struct fd_list * attribute_list) { TRACE_ENTRY("%p %p",user,attribute_list); if (db_conn == NULL) { TRACE_DEBUG(INFO, "%sNot connected to the MySQL Database server.",DIAMEAP_EXTENSION); return EINVAL; } mysql_thread_init(); MYSQL_RES *res; MYSQL_ROW row; char * query; CHECK_MALLOC(query=malloc(sizeof(char)*255)); sprintf( query, "SELECT `authz`.`attribute` , `authz`.`op` , `authz`.`value` FROM `authz` WHERE `authz`.`grp` IN ( SELECT `user_grp`.`grp` FROM `user_grp` WHERE `user_grp`.`user` = %d ) ", user->id); CHECK_POSIX(pthread_mutex_lock( &db_cs_mutex )); if (mysql_query(db_conn, query)) { CHECK_POSIX(pthread_mutex_unlock( &db_cs_mutex )); TRACE_DEBUG(INFO, "%sQuery execution fail. %s",DIAMEAP_EXTENSION, mysql_error(db_conn)); mysql_thread_end(); free(query); query = NULL; return EINVAL; } res = mysql_store_result(db_conn); CHECK_POSIX(pthread_mutex_unlock( &db_cs_mutex )); while ((row = mysql_fetch_row(res))) { struct auth_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct auth_attribute))); memset(attribute, 0, sizeof(struct auth_attribute)); fd_list_init(&attribute->chain, NULL); attribute->attrib = strdup(row[0]); attribute->op = strdup(row[1]); attribute->value = strdup(row[2]); fd_list_insert_before(attribute_list, &attribute->chain); } mysql_free_result(res); mysql_thread_end(); free(query); query = NULL; return 0; } void diameap_mysql_disconnect() { mysql_close(db_conn); } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/diameap_mysql.h000066400000000000000000000055231333553357400265150ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #ifndef DIAMEAP_MYSQL_H_ #define DIAMEAP_MYSQL_H_ #include "libdiameap.h" #include /* MySQL Database connection */ MYSQL *db_conn; int diameap_get_eap_user(struct eap_user * user, char * username); int diameap_mysql_connect(); int diameap_mysql_reconnect(); int diameap_set_mysql_param(char * user, char * passwd, char * server, char * database); void diameap_mysql_disconnect(); /* */ int diameap_authentication_get_attribs(struct eap_user *user, struct fd_list * attribute_list); /* */ int diameap_authorization_get_attribs(struct eap_user *user, struct fd_list * attribute_list); #endif /* DIAMEAP_MYSQL_H_ */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/diameap_plugins.c000066400000000000000000000325521333553357400270260ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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 CONTRIBUTfORS 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. *****************************************************************************************************/ #include "diameap_common.h" /********************************************/ /* Loading and initializing plug-ins */ /********************************************/ /* Add new plugin */ int diameap_plugin_add(char * name, eap_type methodtype, u32 vendor, char * filename, char * conffile) { TRACE_ENTRY("%p %d %d %p %p", name, methodtype, vendor, filename, conffile); /* Check the filename is valid */ CHECK_PARAMS(filename); /* add new EAP method in the list of plugins*/ { struct plugin * plugin; CHECK_MALLOC(plugin = malloc(sizeof(struct plugin))); memset(plugin, 0, sizeof(struct plugin)); fd_list_init(&plugin->chain, plugin); plugin->methodname = name; plugin->methodtype = methodtype; plugin->vendor = vendor; plugin->pluginfile = filename; plugin->conffile = conffile; fd_list_insert_before(&plugins_list, &plugin->chain); } return 0; } /* Dump plugins list */ void diameap_plugin_dump(void) { struct fd_list * pl; for (pl = plugins_list.next; pl != &plugins_list; pl = pl->next) { struct plugin * plugin = (struct plugin *) pl; fd_log_debug("\t\t - %s plugin \t [Type: %i, Vendor: %i] %sloaded", plugin->methodname, plugin->methodtype,plugin->vendor, plugin->handler ? "" : "not "); } } int diameap_plugin_get(u32 vendor, eap_type type, struct plugin ** getplugin) { TRACE_ENTRY("%d %d %p",vendor,type,getplugin); struct fd_list * pl; for (pl = plugins_list.next; pl != &plugins_list; pl = pl->next) { struct plugin * plugin = (struct plugin *) pl; if (plugin->methodtype == type && plugin->vendor == vendor) { *getplugin = plugin; return 0; } } return 1; } /* Load all method in the plugins list */ int diameap_plugin_load(void) { int ret; struct fd_list * pl; /* Loop on all plugins */ for (pl = plugins_list.next; pl != &plugins_list; pl = pl->next) { struct plugin * plugin = (struct plugin *) pl; struct register_plugin * registerplugin; int (*diameap_plugin_register)(); TRACE_DEBUG(FULL, "%sLoading EAP method plugin: %s",DIAMEAP_EXTENSION, plugin->methodname); /* Load the method */ plugin->handler = dlopen(plugin->pluginfile, RTLD_LAZY | RTLD_GLOBAL); if (plugin->handler == NULL) { TRACE_DEBUG(INFO, "%sLoading of plugin %s failed: %s",DIAMEAP_EXTENSION, plugin->methodname, dlerror()); return EINVAL; } /* Defined register methods for this EAP method*/ diameap_plugin_register = (int(*)()) dlsym(plugin->handler, "diameap_plugin_register"); if (!diameap_plugin_register) { TRACE_DEBUG(INFO, "%s[%s plugin] Unable to register EAP method: %s.",DIAMEAP_EXTENSION, plugin->methodname, dlerror()); return EINVAL; } if ((*diameap_plugin_register)() != 0) { TRACE_DEBUG(INFO, "%s[%s plugin] Unable to register EAP method plugin",DIAMEAP_EXTENSION,plugin->methodname); } int (*diameap_plugin_objects)(struct register_plugin **); diameap_plugin_objects = (int(*)(struct register_plugin **)) dlsym( plugin->handler, "diameap_plugin_objects"); if (!diameap_plugin_objects) { TRACE_DEBUG(INFO, "%s[%s plugin] Unable to resolve symbol of the plugin: %s",DIAMEAP_EXTENSION, plugin->methodname, dlerror()); return EINVAL; } if ((*diameap_plugin_objects)(®isterplugin) != 0) { TRACE_DEBUG( INFO, "%s[%s plugin] Unable to get objects description from the plug-in: %s",DIAMEAP_EXTENSION, plugin->methodname, dlerror()); return EINVAL; } /* eap_method_configure method */ if (registerplugin->configure) { plugin->eap_method_configure = (int(*)(char *)) dlsym( plugin->handler, registerplugin->configure); if (plugin->eap_method_configure == NULL) { TRACE_DEBUG( INFO, "%s[%s plugin] Unable to resolve symbol for 'eap_method_configure': %s",DIAMEAP_EXTENSION, plugin->methodname, dlerror()); } } else { plugin->eap_method_configure = NULL; TRACE_DEBUG(FULL+1,"%s[%s plugin] Unavailable function 'eap_method_configure'",DIAMEAP_EXTENSION, plugin->methodname); } /* eap_method_init method */ if (registerplugin->init) { plugin->eap_method_init = (int(*)(struct eap_state_machine *)) dlsym( plugin->handler, registerplugin->init); if (plugin->eap_method_init == NULL) { TRACE_DEBUG( INFO, "%s[%s plugin] Unable to resolve symbol for 'eap_method_init': %s",DIAMEAP_EXTENSION, plugin->methodname, dlerror()); return EINVAL; } } else { plugin->eap_method_init = NULL; TRACE_DEBUG(INFO,"%s[%s plugin] Unavailable function 'eap_method_init'",DIAMEAP_EXTENSION, plugin->methodname); return EINVAL; } /* eap_method_initPickUp method */ if (registerplugin->initPickUp) { plugin->eap_method_initPickUp = (int(*)(struct eap_state_machine *)) dlsym( plugin->handler, registerplugin->initPickUp); } else { plugin->eap_method_initPickUp = NULL; TRACE_DEBUG(FULL+1,"%s[%s plugin] Unavailable function 'eap_method_initPickUp'",DIAMEAP_EXTENSION, plugin->methodname); } /* eap_method_buildReq method */ if (registerplugin->buildReq) { plugin->eap_method_buildReq = (int(*)(struct eap_state_machine *, u8, struct eap_packet *)) dlsym(plugin->handler, registerplugin->buildReq); if (plugin->eap_method_buildReq == NULL) { TRACE_DEBUG( INFO, "%s[%s plugin] Unable to resolve symbol for 'eap_method_buildReq': %s",DIAMEAP_EXTENSION, plugin->methodname, dlerror()); return EINVAL; } } else { plugin->eap_method_buildReq = NULL; TRACE_DEBUG(INFO,"%s[%s plugin] Unavailable function 'eap_method_buildReq'",DIAMEAP_EXTENSION, plugin->methodname); return EINVAL; } /* eap_method_getTimeout method */ if (registerplugin->getTimeout) { plugin->eap_method_getTimeout = (int(*)(struct eap_state_machine *, int *)) dlsym(plugin->handler, registerplugin->getTimeout); if (plugin->eap_method_getTimeout == NULL) { TRACE_DEBUG( INFO, "%s[%s plugin] Unable to resolve symbol for 'eap_method_getTimeout': %s",DIAMEAP_EXTENSION, plugin->methodname, dlerror()); return EINVAL; } } else { plugin->eap_method_getTimeout = NULL; TRACE_DEBUG(FULL+1,"%s[%s plugin] Unavailable function 'eap_method_getTimeout'",DIAMEAP_EXTENSION, plugin->methodname); } /* eap_method_check method */ if (registerplugin->check) { plugin->eap_method_check = (boolean(*)(struct eap_state_machine *, struct eap_packet*)) dlsym(plugin->handler, registerplugin->check); if (plugin->eap_method_check == NULL) { TRACE_DEBUG( INFO, "%s[%s plugin] Unable to resolve symbol for 'eap_method_check': %s",DIAMEAP_EXTENSION, plugin->methodname, dlerror()); return EINVAL; } } else { plugin->eap_method_check = NULL; TRACE_DEBUG(INFO,"%s[%s plugin] Unavailable function 'eap_method_check'",DIAMEAP_EXTENSION, plugin->methodname); return EINVAL; } /* eap_method_process method */ if (registerplugin->process) { plugin->eap_method_process = (int(*)(struct eap_state_machine *, struct eap_packet*)) dlsym(plugin->handler, registerplugin->process); if (plugin->eap_method_process == NULL) { TRACE_DEBUG( INFO, "%s[%s plugin] Unable to resolve symbol for 'eap_method_process': %s",DIAMEAP_EXTENSION, plugin->methodname, dlerror()); return EINVAL; } } else { plugin->eap_method_process = NULL; TRACE_DEBUG(INFO,"%s[%s plugin] Unavailable function 'eap_method_process'",DIAMEAP_EXTENSION, plugin->methodname); return EINVAL; } /* eap_method_isDone method */ if (registerplugin->isDone) { plugin->eap_method_isDone = (boolean(*)(struct eap_state_machine *)) dlsym( plugin->handler, registerplugin->isDone); if (plugin->eap_method_isDone == NULL) { TRACE_DEBUG( INFO, "%s[%s plugin] Unable to resolve symbol for 'eap_method_isDone': %s",DIAMEAP_EXTENSION, plugin->methodname, dlerror()); return EINVAL; } } else { plugin->eap_method_isDone = NULL; TRACE_DEBUG(INFO,"%s[%s plugin] Unavailable function 'eap_method_isDone'",DIAMEAP_EXTENSION, plugin->methodname); return EINVAL; } /* eap_method_getKey method */ if (registerplugin->getKey) { plugin->eap_method_getKey = (int(*)(struct eap_state_machine *, u8**, int*,u8**, int*)) dlsym(plugin->handler, registerplugin->getKey); if (plugin->eap_method_getKey == NULL) { TRACE_DEBUG( INFO, "%s[%s plugin] Unable to resolve symbol for 'eap_method_getKey': %s",DIAMEAP_EXTENSION, plugin->methodname, dlerror()); return EINVAL; } } else { plugin->eap_method_getKey = NULL; TRACE_DEBUG(FULL+1,"%s[%s plugin] Unavailable function 'eap_method_getKey'",DIAMEAP_EXTENSION, plugin->methodname); } /* eap_method_unregister method */ if (registerplugin->unregister) { plugin->eap_method_unregister = (void(*)(void)) dlsym( plugin->handler, registerplugin->unregister); if (plugin->eap_method_unregister == NULL) { TRACE_DEBUG( INFO, "%s[%s plugin] Unable to resolve symbol for 'eap_method_unregister': %s",DIAMEAP_EXTENSION, plugin->methodname, dlerror()); return EINVAL; } } else { plugin->eap_method_unregister = NULL; TRACE_DEBUG(FULL+1,"%s[%s plugin] Unavailable function 'eap_method_unregister'",DIAMEAP_EXTENSION, plugin->methodname); } /* eap_method_datafree method */ if (registerplugin->datafree) { plugin->eap_method_free = (void(*)(void *)) dlsym(plugin->handler, registerplugin->datafree); if (plugin->eap_method_free == NULL) { TRACE_DEBUG( INFO, "%s[%s plugin] Unable to resolve symbol for 'eap_method_datafree': %s",DIAMEAP_EXTENSION, plugin->methodname, dlerror()); return EINVAL; } } else { plugin->eap_method_free = NULL; TRACE_DEBUG(FULL+1,"%s[%s plugin] Unavailable function 'eap_method_datafree'",DIAMEAP_EXTENSION, plugin->methodname); } if (plugin->eap_method_configure != NULL) { /* call the configuration method */ ret = (*plugin->eap_method_configure)(plugin->conffile); if (ret != 0) { TRACE_DEBUG( INFO, "%s[%s plugin] Unable to configure the plugin",DIAMEAP_EXTENSION, plugin->methodname); return ret; } } TRACE_DEBUG(FULL, "%s[%s plugin] Loaded successfully.",DIAMEAP_EXTENSION, plugin->methodname); /* load next method */ } return 0; } boolean diameap_plugin_exist(u32 vendor, eap_type type) { TRACE_ENTRY("%d %d",vendor,type); struct fd_list * pl; for (pl = plugins_list.next; pl != &plugins_list; pl = pl->next) { struct plugin * plugin = (struct plugin *) pl; if (plugin->methodtype == type && plugin->vendor == vendor) { return TRUE; } } return FALSE; } int diameap_plugin_unload(void) { while (!FD_IS_LIST_EMPTY(&plugins_list)) { struct fd_list * plugin = plugins_list.next; struct plugin * item = (struct plugin *) plugin; fd_list_unlink(plugin); if (item->eap_method_unregister != NULL) { (*item->eap_method_unregister)(); } if (item->handler) { if (dlclose(item->handler) != 0) { TRACE_DEBUG (INFO, "%sFail to unload plugin %s : %s",DIAMEAP_EXTENSION, item->methodname, dlerror()); } } free(item->conffile); free(item->pluginfile); free(item); } return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/diameap_plugins.h000066400000000000000000000056671333553357400270420ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #ifndef DIAMEAP_PLUGINS_H_ #define DIAMEAP_PLUGINS_H_ #include static struct fd_list plugins_list = FD_LIST_INITIALIZER(plugins_list); /* Add a plug-in to the list of plugins*/ int diameap_plugin_add(char * name, eap_type methodtype, u32 vendor, char * filename, char * conffile); /* Dump all plug-ins (plugins_list)*/ void diameap_plugin_dump(); /* Return pointer to a plug-in */ int diameap_plugin_get(u32 vendor,eap_type type, struct plugin ** getplugin); /* Load plug-ins */ int diameap_plugin_load(void); /* Check if a plug-in exists for a given EAP method type */ boolean diameap_plugin_exist(u32 vendor, eap_type type); /* Unload all plug-ins*/ int diameap_plugin_unload(void); #endif /* DIAMEAP_PLUGINS_H_ */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/diameap_server.c000066400000000000000000003101111333553357400266410ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #include "diameap_common.h" /* handler for DiamEAP server callback */ static struct disp_hdl * handle; /* session handler for DiamEAP sessions state machine */ static struct session_handler * diameap_server_reg = NULL; struct avp_max_occurences auth_avps[] = { { "Service-Type", 1 }, { "Callback-Number", 1 }, { "Callback-Id", 1 }, { "Idle-Timeout", 1 }, { "Port-Limit", 1 }, { "NAS-Filter-Rule" - 1 }, { "Filter-Id", -1 }, { "Configuration-Token", -1 }, { "QoS-Filter-Rule", -1 }, { "Framed-Protocol", 1 }, { "Framed-Routing", 1 }, { "Framed-MTU", 1 }, { "Framed-Compression", -1 }, { "Framed-IP-Address", 1 }, { "Framed-IP-Netmask", 1 }, { "Framed-Route", -1 }, { "Framed-Pool", 1 }, { "Framed-Interface-Id", 1 }, { "Framed-IPv6-Prefix", -1 }, { "Framed-IPv6-Pool", 1 }, { "Framed-IPv6-Route", -1 }, { "Framed-IPX-Network", 1 }, { "Framed-Appletalk-Link", 1 }, { "Framed-Appletalk-Network", -1 }, { "Framed-Appletalk-Zone", 1 }, { "NAS-IPv6-Address", 0 }, { "NAS-Identifier", 0 }, { "NAS-IP-Address", 0 }, { "NAS-Port", 0 }, { "NAS-Port-Id", 0 }, { "NAS-Port-Type", 0 }, { "Called-Station-Id", 0 }, { "Calling-Station-Id", 0 }, { "Connect-Info", 0 }, { "Originating-Line-Info", 0 } }; void diameap_cli_sess_cleanup(struct sess_state * diameap_sess_data, os0_t sid, void * opaque) { CHECK_PARAMS_DO( diameap_sess_data, return ); if (diameap_sess_data != NULL) { if (diameap_sess_data->methodData != NULL) { struct plugin * cplugin; if (diameap_plugin_get(diameap_sess_data->currentVendor, diameap_sess_data->currentMethod, &cplugin)) { TRACE_DEBUG(INFO,"%sUnable to access EAP Method plugin {Type=%d, Vendor=%d}.",DIAMEAP_EXTENSION,diameap_sess_data->currentMethod,diameap_sess_data->currentVendor); } if (cplugin->eap_method_free) { (*cplugin->eap_method_free)(diameap_sess_data->methodData); diameap_sess_data->methodData = NULL; } else { TRACE_DEBUG(FULL+1,"%s[%s plugin] datafree function not available.",DIAMEAP_EXTENSION,cplugin->methodname); if (diameap_sess_data->methodData != NULL) { free(diameap_sess_data->methodData); diameap_sess_data->methodData = NULL; } } if (diameap_sess_data->methodData) { TRACE_DEBUG(INFO,"%sSession state was not been freed correctly!!!",DIAMEAP_EXTENSION); } } if (diameap_sess_data->user.password != NULL) { free(diameap_sess_data->user.password); diameap_sess_data->user.password = NULL; } if (diameap_sess_data->user.userid != NULL) { free(diameap_sess_data->user.userid); diameap_sess_data->user.userid = NULL; } free(diameap_sess_data); diameap_sess_data = NULL; } } static int diameap_initialize_diameap_sm( struct diameap_state_machine * diameap_sm, struct sess_state * diameap_sess_data) { TRACE_ENTRY("%p %p", diameap_sm, diameap_sess_data); int i; /* Initialize Long Term Variables */ if (diameap_sess_data != NULL) { diameap_sm->invalid_eappackets = diameap_sess_data->invalid_eappackets; /* Initialize eap state machine variables */ /*User*/ diameap_sm->eap_sm.user.id = diameap_sess_data->user.id; if ((diameap_sess_data->user.userid != NULL) && (diameap_sess_data->user.useridLength > 0)) { diameap_sm->eap_sm.user.useridLength = diameap_sess_data->user.useridLength; CHECK_MALLOC(diameap_sm->eap_sm.user.userid= malloc(diameap_sm->eap_sm.user.useridLength+1)); U8COPY(diameap_sm->eap_sm.user.userid,0,diameap_sm->eap_sm.user.useridLength+1,diameap_sess_data->user.userid); free(diameap_sess_data->user.userid); diameap_sess_data->user.userid = NULL; } else { TRACE_DEBUG(INFO,"%s user not identified yet.",DIAMEAP_EXTENSION); diameap_sm->eap_sm.user.useridLength = 0; diameap_sm->eap_sm.user.userid = NULL; } if ((diameap_sess_data->user.password != NULL) && (diameap_sess_data->user.passwordLength > 0)) { diameap_sm->eap_sm.user.passwordLength = diameap_sess_data->user.passwordLength; CHECK_MALLOC(diameap_sm->eap_sm.user.password = malloc(diameap_sm->eap_sm.user.passwordLength+1)); U8COPY(diameap_sm->eap_sm.user.password,0,diameap_sm->eap_sm.user.passwordLength+1, diameap_sess_data->user.password); free(diameap_sess_data->user.password); diameap_sess_data->user.password = NULL; } else { diameap_sm->eap_sm.user.passwordLength = 0; diameap_sm->eap_sm.user.password = NULL; } diameap_sm->eap_sm.user.methodId = diameap_sess_data->user.methodId; for (i = 0; i < MAXMETHODS; i++) { diameap_sm->eap_sm.user.methods[i].method = diameap_sess_data->user.methods[i].method; diameap_sm->eap_sm.user.methods[i].vendor = diameap_sess_data->user.methods[i].vendor; } for (i = 0; i < MAXPROPOSEDMETHODS; i++) { diameap_sm->eap_sm.user.proposedmethods[i].method = diameap_sess_data->user.proposedmethods[i].method; diameap_sm->eap_sm.user.proposedmethods[i].vendor = diameap_sess_data->user.proposedmethods[i].vendor; } diameap_sm->eap_sm.user.pmethods = diameap_sess_data->user.pmethods; diameap_sm->eap_sm.user.proposed_eap_method = diameap_sess_data->user.proposed_eap_method; diameap_sm->eap_sm.user.proposed_eap_method_vendor = diameap_sess_data->user.proposed_eap_method_vendor; diameap_sm->eap_sm.user.success = diameap_sess_data->user.success; diameap_sm->eap_sm.currentId = diameap_sess_data->currentId; diameap_sm->eap_sm.currentVendor = diameap_sess_data->currentVendor; diameap_sm->eap_sm.lastId = diameap_sess_data->lastId; diameap_sm->eap_sm.methodState = diameap_sess_data->methodState; diameap_sm->eap_sm.currentMethod = diameap_sess_data->currentMethod; diameap_sm->eap_sm.methodData = diameap_sess_data->methodData; diameap_sess_data->methodData = NULL; if (diameap_sm->eap_sm.currentMethod != TYPE_NONE) { diameap_plugin_get(diameap_sm->eap_sm.currentVendor, diameap_sm->eap_sm.currentMethod, &diameap_sm->eap_sm.selectedMethod); } /* free session data*/ free(diameap_sess_data); diameap_sess_data = NULL; } else { diameap_sm->invalid_eappackets = 0; /* Initialize eap state machine variables */ /*User*/ diameap_sm->eap_sm.user.id = 0; diameap_sm->eap_sm.user.userid = NULL; diameap_sm->eap_sm.user.useridLength = 0; diameap_sm->eap_sm.user.password = NULL; diameap_sm->eap_sm.user.passwordLength = 0; diameap_sm->eap_sm.user.methodId = -1; for (i = 0; i < MAXMETHODS; i++) { diameap_sm->eap_sm.user.methods[i].method = TYPE_NONE; diameap_sm->eap_sm.user.methods[i].vendor = VENDOR_IETF; } for (i = 0; i < MAXPROPOSEDMETHODS; i++) { diameap_sm->eap_sm.user.proposedmethods[i].method = TYPE_NONE; diameap_sm->eap_sm.user.proposedmethods[i].vendor = VENDOR_IETF; } diameap_sm->eap_sm.user.pmethods = -1; diameap_sm->eap_sm.user.proposed_eap_method = TYPE_NONE; diameap_sm->eap_sm.user.proposed_eap_method_vendor = VENDOR_IETF; diameap_sm->eap_sm.user.success = FALSE; diameap_sm->eap_sm.currentId = -1; diameap_sm->eap_sm.currentVendor = VENDOR_IETF; diameap_sm->eap_sm.lastId = -1; diameap_sm->eap_sm.methodState = EAP_M_PROPOSED; diameap_sm->eap_sm.currentMethod = TYPE_NONE; diameap_sm->eap_sm.methodData = NULL; } diameap_sm->result_code = 0; fd_list_init(&diameap_sm->attributes, NULL); fd_list_init(&diameap_sm->req_attributes, NULL); fd_list_init(&diameap_sm->ans_attributes, NULL); diameap_sm->failedavp = NULL; diameap_sm->auth_request_val = AUTHENTICATE_ONLY; diameap_sm->verify_authorization = FALSE; diameap_sm->authSuccess = FALSE; diameap_sm->authFailure = FALSE; diameap_sm->lastReqEAPavp = NULL; diameap_sm->privateUser = FALSE; diameap_sm->authorized = FALSE; diameap_sm->eap_sm.rxResp = FALSE; diameap_sm->eap_sm.respId = -1; diameap_sm->eap_sm.respMethod = TYPE_NONE; diameap_sm->eap_sm.respVendor = VENDOR_IETF; diameap_sm->eap_sm.respVendorMethod = TYPE_NONE; return 0; } static int diameap_initialize_diameap_eap_interface( struct diameap_eap_interface * eap_i) { TRACE_ENTRY("%p", eap_i); //Initialize AAA-EAP Interface eap_i->aaaEapResp = FALSE; eap_i->aaaEapRespData.data = NULL; //Initialize EAP-AAA Interface eap_i->aaaEapReq = FALSE; eap_i->aaaEapNoReq = FALSE; eap_i->aaaSuccess = FALSE; eap_i->aaaFail = FALSE; eap_i->aaaEapReqData.data = NULL; eap_i->aaaEapMSKData = NULL; eap_i->aaaEapEMSKData = NULL; eap_i->aaaEapKeyAvailable = FALSE; eap_i->aaaMethodTimeout = 0; return 0; } static int diameap_failed_avp(struct diameap_state_machine * diameap_sm, struct avp * invalidavp) { TRACE_ENTRY("%p %p",diameap_sm,invalidavp); if (!invalidavp) return EINVAL; if (!diameap_sm) return EINVAL; if (diameap_sm->failedavp == NULL) { CHECK_FCT( fd_msg_avp_new( dataobj_failed_avp, 0, &diameap_sm->failedavp) ); CHECK_FCT( fd_msg_avp_add( diameap_sm->failedavp, MSG_BRW_LAST_CHILD, invalidavp ) ); } else { //add multiple AVPs in Failed-AVP } return 0; } static int diameap_parse_eap_resp(struct eap_state_machine * eap_sm, struct eap_packet *eappacket) { TRACE_ENTRY("%p %p",eap_sm, eappacket) eap_sm->rxResp = FALSE; eap_sm->respId = -1; eap_sm->respMethod = TYPE_NONE; eap_sm->respVendor = VENDOR_IETF; eap_sm->respVendorMethod = TYPE_NONE; if (eappacket->data == NULL) { TRACE_DEBUG(INFO,"%s Empty EAP packet",DIAMEAP_EXTENSION); return 0; } u16 plength; CHECK_FCT(diameap_eap_get_packetlength(eappacket,&plength)); if ((int) plength < EAP_HEADER) { TRACE_DEBUG(INFO,"%s EAP packet length less than EAP header.",DIAMEAP_EXTENSION); return 0; } u16 length; CHECK_FCT(diameap_eap_get_length(eappacket,&length)); if ((int) length < EAP_HEADER) { TRACE_DEBUG(INFO,"%sEAP packet length field less than EAP header.",DIAMEAP_EXTENSION); return 0; } if (plength < length) { TRACE_DEBUG(INFO,"%sLength of received EAP packet is less than the value of the length field.",DIAMEAP_EXTENSION); return 0; } eap_code code; CHECK_FCT(diameap_eap_get_code(eappacket,&code)); if (code == EAP_REQUEST || code == EAP_SUCCESS || code == EAP_FAILURE) { TRACE_DEBUG(INFO,"%sOnly EAP Responses are accepted at EAP server side.",DIAMEAP_EXTENSION); return 0; } u8 id; CHECK_FCT(diameap_eap_get_identifier(eappacket,&id)); eap_sm->respId = id; CHECK_FCT(diameap_eap_get_type(eappacket,&eap_sm->respMethod)); if ((eap_sm->methodState != EAP_M_PROPOSED) && (eap_sm->respMethod == TYPE_NAK || eap_sm->respMethod == TYPE_EXPANDED_TYPES)) { TRACE_DEBUG(INFO,"%sNAK or EXPANDED_NAK received after an EAP TYPE been selected",DIAMEAP_EXTENSION); return 0; } if ((eap_sm->respMethod == TYPE_EXPANDED_TYPES) && (length < 20)) { TRACE_DEBUG(INFO,"%s Truncated EAP Packet received.",DIAMEAP_EXTENSION); return 0; } if ((eap_sm->respMethod == TYPE_NAK) && (eap_sm->currentMethod < 4)) { TRACE_DEBUG(INFO,"%sNAK response not expected at this step (Only EAP type = 4 and above are accepted).",DIAMEAP_EXTENSION); return 0; } if (eap_sm->respMethod == TYPE_EXPANDED_TYPES) { u8 *data = (u8 *) eappacket->data; //int len = 0; //u32 respVendor, respVendorMethod; data += 5; eap_sm->respVendor = G24BIGE(data); data += 3; eap_sm->respVendorMethod = G32BIGE(data); data += 4; /* while ((length - 12) > (len * 8)) { if (((eap_type) G8(data)) != TYPE_EXPANDED_TYPES) { return FALSE; } data += 1; respVendor = G24BIGE(data); data += 3; respVendorMethod = G32BIGE(data); eap_sm->user.proposedmethods[len].method = respVendor; eap_sm->user.proposedmethods[len].vendor = respVendorMethod; len++; data += 4; } eap_sm->user.methodId = 0;*/ } if((eap_sm->respMethod == TYPE_IDENTITY) && (length < 6)){ TRACE_DEBUG(INFO,"%sUser Identity missing",DIAMEAP_EXTENSION); return 0; } eap_sm->rxResp = TRUE; return 0; } static int diameap_eappacket_new(struct eap_packet * eappacket, struct avp_hdr * avpdata) { TRACE_ENTRY("%p %p",eappacket,avpdata); eappacket->ulength = (u16) avpdata->avp_value->os.len; eappacket->data = (u8 *) avpdata->avp_value->os.data; diameap_eap_get_packetlength(eappacket, &eappacket->length); return 0; } static int diameap_parse_avps(struct diameap_state_machine * diameap_sm, struct msg * req, struct diameap_eap_interface * eap_i) { TRACE_ENTRY("%p %p %p",diameap_sm,req,eap_i); struct avp * avp, *avp2; struct avp_hdr * avpdata; int ret; int depth; /* EAP-Payload data*/ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_eap_payload, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); CHECK_FCT(diameap_eappacket_new(&eap_i->aaaEapRespData, avpdata)); eap_i->aaaEapResp = TRUE; u16 length; diameap_eap_get_length(&eap_i->aaaEapRespData, &length); if (length >= 4) { eap_code code; CHECK_FCT(diameap_eap_get_code(&eap_i->aaaEapRespData,&code)); if (code != EAP_RESPONSE) { diameap_sm->result_code = 5004; /* DIAMETER_INVALID_AVP_VALUE 5004 */ struct avp * invalidavp; union avp_value val; CHECK_FCT( fd_msg_avp_new ( dataobj_eap_payload, 0, &invalidavp)); val.os.data = eap_i->aaaEapRespData.data; val.os.len = eap_i->aaaEapRespData.length; CHECK_FCT( fd_msg_avp_setvalue( invalidavp, &val )) CHECK_FCT( diameap_failed_avp(diameap_sm, invalidavp)); TRACE_DEBUG(INFO,"%sIncorrect EAP Packet. EAP Code != Response.",DIAMEAP_EXTENSION); return 0; } else { CHECK_FCT(diameap_parse_eap_resp(&diameap_sm->eap_sm, &eap_i->aaaEapRespData)); if (diameap_sm->eap_sm.rxResp == FALSE) { diameap_sm->result_code = 1001; /*DIAMETER_MULTI_ROUND_AUTH*/ eap_i->aaaEapNoReq = TRUE; eap_i->aaaEapResp = FALSE; } } } else { if (diameap_sm->eap_sm.currentMethod != TYPE_NONE) { diameap_sm->result_code = 5004; /* DIAMETER_INVALID_AVP_VALUE 5004 */ CHECK_FCT(diameap_failed_avp(diameap_sm, avp)); TRACE_DEBUG(INFO,"%sEAP packet length < Minimum EAP packet length.",DIAMEAP_EXTENSION); return 1; } //EAP start received } } /* User-Name AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_user_name, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "User-Name"; attribute->value.os.data = avpdata->avp_value->os.data; attribute->value.os.len = avpdata->avp_value->os.len; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* EAP-Key-Name AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_eap_key_name, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "EAP-Key-Name"; attribute->value.os.data = avpdata->avp_value->os.data; attribute->value.os.len = avpdata->avp_value->os.len; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* Auth-Request-Type AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_auth_request_type, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); diameap_sm->auth_request_val = avpdata->avp_value->i32; } /* Authorization-Lifetime AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_authorization_lifetime, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "Authorization-Lifetime"; attribute->value.u32 = avpdata->avp_value->u32; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* Auth-Grace-Period AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_auth_grace_period, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "Auth-Grace-Period"; attribute->value.u32 = avpdata->avp_value->u32; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* Auth-Session-State AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_auth_session_state, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "Auth-Session-State"; attribute->value.i32 = avpdata->avp_value->i32; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* Origin-state-Id AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_origin_state_id, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "Origin-state-Id AVP"; attribute->value.u32 = avpdata->avp_value->u32; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* NAS-Port AVP*/ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_nas_port, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "NAS-Port"; attribute->value.u32 = avpdata->avp_value->u32; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* NAS-Port-Id AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_nas_port_id, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "NAS-Port-Id"; attribute->value.os.data = avpdata->avp_value->os.data; attribute->value.os.len = avpdata->avp_value->os.len; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* NAS-Port-Type AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_nas_port_type, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "NAS-Port-Type"; attribute->value.u32 = avpdata->avp_value->u32; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* Called-Station-Id AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_called_station_id, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "Called-Station-Id"; attribute->value.os.data = avpdata->avp_value->os.data; attribute->value.os.len = avpdata->avp_value->os.len; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* Calling-Station-Id AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_calling_station_id, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "Calling-Station-Id"; attribute->value.os.data = avpdata->avp_value->os.data; attribute->value.os.len = avpdata->avp_value->os.len; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* Connect-Info AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_connect_info, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "Connect-Info"; attribute->value.os.data = avpdata->avp_value->os.data; attribute->value.os.len = avpdata->avp_value->os.len; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* Originating-Line-Info AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_originating_line_info, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "Originating-Line-Info"; attribute->value.os.data = avpdata->avp_value->os.data; attribute->value.os.len = avpdata->avp_value->os.len; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* Service-Type AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_service_type, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "Service-Type"; attribute->value.u32 = avpdata->avp_value->u32; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* Callback-Number AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_callback_number, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "Callback-Number"; attribute->value.os.data = avpdata->avp_value->os.data; attribute->value.os.len = avpdata->avp_value->os.len; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* Port-Limit AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_port_limit, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "Port-Limit"; attribute->value.u32 = avpdata->avp_value->u32; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* Framed-Protocol AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_framed_protocol, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "Framed-Protocol"; attribute->value.u32 = avpdata->avp_value->u32; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* Framed-MTU AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_framed_mtu, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "Framed-MTU"; attribute->value.u32 = avpdata->avp_value->u32; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* Framed-Compression AVP */ avp = NULL; avp2 = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_framed_compression, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); u32 Pi_Code = avpdata->avp_code; int depth; do { struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "Framed-Compression"; attribute->value.u32 = avpdata->avp_value->u32; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); ret = 0; depth = 0; ret = fd_msg_browse ( avp, MSG_BRW_NEXT, &avp2, &depth); if (avp2 != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp2, &avpdata)); } avp = avp2; } while ((avp2 != NULL) && (ret == 0) && (ret == 0) && (avpdata->avp_code == Pi_Code)); } /* Framed-IP-Address AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_framed_ip_address, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "Framed-IP-Address"; attribute->value.os.data = avpdata->avp_value->os.data; attribute->value.os.len = avpdata->avp_value->os.len; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* Framed-IP-Netmask AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_framed_ip_netmask, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "Framed-IP-Netmask"; attribute->value.os.data = avpdata->avp_value->os.data; attribute->value.os.len = avpdata->avp_value->os.len; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* Framed-Interface-Id AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_framed_interface_id, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "Framed-Interface-Id"; attribute->value.u64 = avpdata->avp_value->u64; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* Framed-IPv6-Prefix AVP */ avp = NULL; avp2 = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_framed_ipv6_prefix, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); u32 Pi_Code = avpdata->avp_code; do { struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "Framed-IPv6-Prefix"; attribute->value.u32 = avpdata->avp_value->u32; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); ret = 0; depth = 0; ret = fd_msg_browse ( avp, MSG_BRW_NEXT, &avp2, &depth); if (avp2 != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp2, &avpdata)); } avp = avp2; } while ((avp2 != NULL) && (ret == 0) && (ret == 0) && (avpdata->avp_code == Pi_Code)); } /* Tunneling AVP */ avp = NULL; avp2 = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_tunneling, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); u32 Pi_Code = avpdata->avp_code; int depth; do { struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "Tunneling"; //grouped AVP fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); ret = 0; depth = 0; ret = fd_msg_browse ( avp, MSG_BRW_NEXT, &avp2, &depth); if (avp2 != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp2, &avpdata)); } avp = avp2; } while ((avp2 != NULL) && (ret == 0) && (ret == 0) && (avpdata->avp_code == Pi_Code)); } /* NAS-Identifier AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_nas_identifier, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "NAS-Identifier"; attribute->value.os.data = avpdata->avp_value->os.data; attribute->value.os.len = avpdata->avp_value->os.len; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* NAS-IP-Address AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_nas_ip_address, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "NAS-IP-Address"; attribute->value.os.data = avpdata->avp_value->os.data; attribute->value.os.len = avpdata->avp_value->os.len; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* NAS-IPv6-Address AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_nas_ipv6_address, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "NAS-IPv6-Address"; attribute->value.os.data = avpdata->avp_value->os.data; attribute->value.os.len = avpdata->avp_value->os.len; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } /* State AVP */ avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_state, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr(avp, &avpdata)); struct avp_attribute * attribute; CHECK_MALLOC(attribute = malloc(sizeof(struct avp_attribute))); memset(attribute, 0, sizeof(struct avp_attribute)); fd_list_init(&attribute->chain, attribute); attribute->attrib = "State"; attribute->value.os.data = avpdata->avp_value->os.data; attribute->value.os.len = avpdata->avp_value->os.len; fd_list_insert_before(&diameap_sm->req_attributes, &attribute->chain); } return 0; } static int diameap_sess_data_new( struct sess_state *diameap_sess_data, struct diameap_state_machine *diameap_sm) { if (!diameap_sm) return EINVAL; int i; diameap_sess_data->invalid_eappackets = diameap_sm->invalid_eappackets; diameap_sess_data->user.id = diameap_sm->eap_sm.user.id; if ((diameap_sm->eap_sm.user.userid != NULL) && (diameap_sm->eap_sm.user.useridLength > 0)) { diameap_sess_data->user.useridLength = diameap_sm->eap_sm.user.useridLength; CHECK_MALLOC(diameap_sess_data->user.userid= malloc(diameap_sess_data->user.useridLength+1)); U8COPY(diameap_sess_data->user.userid,0,diameap_sess_data->user.useridLength+1,diameap_sm->eap_sm.user.userid); free(diameap_sm->eap_sm.user.userid); diameap_sm->eap_sm.user.userid = NULL; } else { diameap_sess_data->user.useridLength = 0; diameap_sess_data->user.userid = NULL; } if ((diameap_sm->eap_sm.user.password != NULL) && (diameap_sm->eap_sm.user.passwordLength > 0)) { diameap_sess_data->user.passwordLength = diameap_sm->eap_sm.user.passwordLength; CHECK_MALLOC(diameap_sess_data->user.password = malloc(diameap_sess_data->user.passwordLength+1)); U8COPY(diameap_sess_data->user.password,0,diameap_sess_data->user.passwordLength+1,diameap_sm->eap_sm.user.password); free(diameap_sm->eap_sm.user.password); diameap_sm->eap_sm.user.password = NULL; } else { diameap_sess_data->user.passwordLength = 0; diameap_sess_data->user.password = NULL; } diameap_sess_data->user.methodId = diameap_sm->eap_sm.user.methodId; for (i = 0; i < MAXMETHODS; i++) { diameap_sess_data->user.methods[i].method = diameap_sm->eap_sm.user.methods[i].method; diameap_sess_data->user.methods[i].vendor = diameap_sm->eap_sm.user.methods[i].vendor; } for (i = 0; i < MAXPROPOSEDMETHODS; i++) { diameap_sess_data->user.proposedmethods[i].method = diameap_sm->eap_sm.user.proposedmethods[i].method; diameap_sess_data->user.proposedmethods[i].vendor = diameap_sm->eap_sm.user.proposedmethods[i].vendor; } diameap_sess_data->user.pmethods = diameap_sm->eap_sm.user.pmethods; diameap_sess_data->user.proposed_eap_method = diameap_sm->eap_sm.user.proposed_eap_method; diameap_sess_data->user.proposed_eap_method_vendor = diameap_sm->eap_sm.user.proposed_eap_method_vendor; diameap_sess_data->user.success = diameap_sm->eap_sm.user.success; diameap_sess_data->currentId = diameap_sm->eap_sm.currentId; diameap_sess_data->currentMethod = diameap_sm->eap_sm.currentMethod; diameap_sess_data->currentVendor = diameap_sm->eap_sm.currentVendor; diameap_sess_data->lastId = diameap_sm->eap_sm.lastId; diameap_sess_data->methodState = diameap_sm->eap_sm.methodState; diameap_sess_data->methodData = diameap_sm->eap_sm.methodData; diameap_sm->eap_sm.methodData = NULL; return 0; } static void free_attrib(struct auth_attribute * auth_attrib) { if (auth_attrib == NULL) { return; } if (auth_attrib->attrib != NULL) { free(auth_attrib->attrib); auth_attrib->attrib = NULL; } if (auth_attrib->op != NULL) { free(auth_attrib->op); auth_attrib->op = NULL; } if (auth_attrib->value != NULL) { free(auth_attrib->value); auth_attrib->value = NULL; } free(auth_attrib); auth_attrib = NULL; } static void free_avp_attrib(struct avp_attribute * avp_attrib) { if(avp_attrib){ free(avp_attrib); avp_attrib = NULL; } } static void free_ans_attrib(struct avp_attribute * ans_attrib) { if(ans_attrib){ if (ans_attrib->tofree == 1) { if(ans_attrib->value.os.data){ free(ans_attrib->value.os.data); ans_attrib->value.os.data = NULL; } } free(ans_attrib); ans_attrib = NULL; } } static int diameap_unlink_attributes_lists( struct diameap_state_machine * diameap_sm) { TRACE_ENTRY("%p ", diameap_sm); if (diameap_sm == NULL) { return EINVAL; } while (!FD_IS_LIST_EMPTY(&diameap_sm->attributes)) { struct fd_list * item = (struct fd_list *) diameap_sm->attributes.next; struct auth_attribute * auth = (struct auth_attribute *) item; fd_list_unlink(item); free_attrib(auth); } while (!FD_IS_LIST_EMPTY(&diameap_sm->req_attributes)) { struct fd_list * item = (struct fd_list *) diameap_sm->req_attributes.next; struct avp_attribute * avp = (struct avp_attribute *) item; fd_list_unlink(item); free_avp_attrib(avp); } while (!FD_IS_LIST_EMPTY(&diameap_sm->ans_attributes)) { struct fd_list * item = (struct fd_list *) diameap_sm->ans_attributes.next; struct avp_attribute * avp_ans = (struct avp_attribute *) item; fd_list_unlink(item); free_ans_attrib(avp_ans); } return 0; } static void diameap_free(struct diameap_state_machine * diameap_sm) { if (diameap_sm != NULL) { if (diameap_sm->eap_sm.user.userid != NULL) { free(diameap_sm->eap_sm.user.userid); diameap_sm->eap_sm.user.userid = NULL; } if (diameap_sm->eap_sm.user.password != NULL) { free(diameap_sm->eap_sm.user.password); diameap_sm->eap_sm.user.password = NULL; } diameap_sm->eap_sm.selectedMethod = NULL; if (diameap_sm->eap_sm.methodData != NULL) { struct plugin * cplugin; if (diameap_plugin_get(diameap_sm->eap_sm.currentVendor, diameap_sm->eap_sm.currentMethod, &cplugin)) { TRACE_DEBUG(INFO,"%sUnable to access EAP Method plugin {Type=%d, Vendor=%d}.",DIAMEAP_EXTENSION,diameap_sm->eap_sm.currentMethod,diameap_sm->eap_sm.currentVendor); } if (cplugin->eap_method_free) { (*cplugin->eap_method_free)(diameap_sm->eap_sm.methodData); diameap_sm->eap_sm.methodData = NULL; } else { TRACE_DEBUG(INFO,"%s[%s plugin] datafree function not available.",DIAMEAP_EXTENSION,cplugin->methodname); if (diameap_sm->eap_sm.methodData != NULL) { free(diameap_sm->eap_sm.methodData); diameap_sm->eap_sm.methodData = NULL; } } if (diameap_sm->eap_sm.methodData) { TRACE_DEBUG(INFO,"%sSession state was not been freed correctly!!!",DIAMEAP_EXTENSION); } } if (diameap_sm->failedavp != NULL) { CHECK_FCT_DO(fd_msg_free(diameap_sm->failedavp), ); } if (diameap_sm->lastReqEAPavp != NULL) { CHECK_FCT_DO(fd_msg_free(diameap_sm->lastReqEAPavp), ); } CHECK_FCT_DO(diameap_unlink_attributes_lists(diameap_sm), ); free(diameap_sm); diameap_sm = NULL; } } static int diameap_get_avp_attribute(struct fd_list * avp_attributes, char * attribute, struct avp_attribute ** avp_attrib, int unlink, int *ret) { TRACE_ENTRY("%p %p %p %d %p", avp_attributes, attribute, avp_attrib, unlink, ret); if (avp_attributes == NULL) { return EINVAL; } if (attribute == NULL) { return EINVAL; } struct fd_list * attrib; for (attrib = avp_attributes->next; attrib != avp_attributes; attrib = attrib->next) { *avp_attrib = (struct avp_attribute *) attrib; if (strcmp((*avp_attrib)->attrib, attribute) == 0) { *ret = 0; if (unlink == 1) { fd_list_unlink(&(*avp_attrib)->chain); } return 0; } } *avp_attrib = NULL; *ret = 1; return 0; } static int diameap_get_auth_attribute(struct fd_list * auth_attributes, char * attribute, struct auth_attribute ** auth_attrib, int unlink, int *ret) { TRACE_ENTRY("%p %p %p %d %p", auth_attributes, attribute, auth_attrib, unlink, ret); if (auth_attributes == NULL) { return EINVAL; } if (attribute == NULL) { return EINVAL; } struct fd_list * attrib; for (attrib = auth_attributes->next; attrib != auth_attributes; attrib = attrib->next) { *auth_attrib = (struct auth_attribute *) attrib; if (strcmp((*auth_attrib)->attrib, attribute) == 0) { *ret = 0; if (unlink == 1) { fd_list_unlink(&(*auth_attrib)->chain); } return 0; } } *auth_attrib = NULL; *ret = 1; return 0; } static int diameap_get_ans_attribute(struct fd_list * ans_attributes, char * attribute, struct avp_attribute ** ans_attrib, int unlink, int *ret) { TRACE_ENTRY("%p %p %p %d %p", ans_attributes, attribute, ans_attrib, unlink, ret); if (ans_attributes == NULL) { return EINVAL; } if (attribute == NULL) { return EINVAL; } struct fd_list * attrib; for (attrib = ans_attributes->next; attrib != ans_attributes; attrib = attrib->next) { *ans_attrib = (struct avp_attribute *) attrib; if (strcmp((*ans_attrib)->attrib, attribute) == 0) { *ret = 0; if (unlink == 1) { fd_list_unlink(&(*ans_attrib)->chain); } return 0; } } *ans_attrib = NULL; *ret = 1; return 0; } static int diameap_answer_avp_attributes( struct diameap_state_machine * diameap_sm) { TRACE_ENTRY("%p",diameap_sm); if (diameap_sm == NULL) { return EINVAL; } int ret1, ret2; struct avp_attribute * avp_attrib; struct avp_attribute * ans_attrib; struct auth_attribute * auth_attrib; /* Authorization-Lifetime */ { CHECK_FCT(diameap_get_avp_attribute(&diameap_sm->req_attributes, "Authorization-Lifetime", &avp_attrib,1, &ret1)); CHECK_FCT(diameap_get_auth_attribute(&diameap_sm->attributes, "Authorization-Lifetime", &auth_attrib,1, &ret2)); if ((ret1 == 1) && (ret2 == 0) && (auth_attrib != NULL)) { CHECK_MALLOC(ans_attrib = malloc(sizeof(struct avp_attribute))); memset(ans_attrib, 0, sizeof(struct avp_attribute)); fd_list_init(&ans_attrib->chain, NULL); ans_attrib->attrib = "Authorization-Lifetime"; ans_attrib->value.u32 = atoi(auth_attrib->value); fd_list_insert_before(&diameap_sm->ans_attributes, &ans_attrib->chain); free_attrib(auth_attrib); } if ((ret1 == 0) && (ret2 == 1) && (avp_attrib != NULL)) { CHECK_MALLOC(ans_attrib = malloc(sizeof(struct avp_attribute))); memset(ans_attrib, 0, sizeof(struct avp_attribute)); fd_list_init(&ans_attrib->chain, NULL); ans_attrib->attrib = "Authorization-Lifetime"; ans_attrib->value.u32 = avp_attrib->value.u32; fd_list_insert_before(&diameap_sm->ans_attributes, &ans_attrib->chain); free_avp_attrib(avp_attrib); } if ((ret1 == 0) && (ret2 == 0) && (auth_attrib != NULL) && (avp_attrib != NULL)) { CHECK_MALLOC(ans_attrib = malloc(sizeof(struct avp_attribute))); memset(ans_attrib, 0, sizeof(struct avp_attribute)); fd_list_init(&ans_attrib->chain, NULL); ans_attrib->attrib = "Authorization-Lifetime"; if (avp_attrib->value.u32 < atoi(auth_attrib->value)) { ans_attrib->value.u32 = avp_attrib->value.u32; } else { ans_attrib->value.u32 = atoi(auth_attrib->value); } fd_list_insert_before(&diameap_sm->ans_attributes, &ans_attrib->chain); free_avp_attrib(avp_attrib); free_attrib(auth_attrib); } } /* Auth-Grace-Period */ { CHECK_FCT(diameap_get_avp_attribute(&diameap_sm->req_attributes, "Auth-Grace-Period", &avp_attrib,1, &ret1)); CHECK_FCT(diameap_get_auth_attribute(&diameap_sm->attributes, "Auth-Grace-Period", &auth_attrib,1, &ret2)); if ((ret1 == 1) && (ret2 == 0) && (auth_attrib != NULL)) { CHECK_MALLOC(ans_attrib = malloc(sizeof(struct avp_attribute))); memset(ans_attrib, 0, sizeof(struct avp_attribute)); fd_list_init(&ans_attrib->chain, NULL); ans_attrib->attrib = "Auth-Grace-Period"; ans_attrib->value.u32 = atoi(auth_attrib->value); fd_list_insert_before(&diameap_sm->ans_attributes, &ans_attrib->chain); free_attrib(auth_attrib); } if ((ret1 == 0) && (ret2 == 1) && (avp_attrib != NULL)) { CHECK_MALLOC(ans_attrib = malloc(sizeof(struct avp_attribute))); memset(ans_attrib, 0, sizeof(struct avp_attribute)); fd_list_init(&ans_attrib->chain, NULL); ans_attrib->attrib = "Auth-Grace-Period"; ans_attrib->value.u32 = avp_attrib->value.u32; fd_list_insert_before(&diameap_sm->ans_attributes, &ans_attrib->chain); free_avp_attrib(avp_attrib); } if ((ret1 == 0) && (ret2 == 0) && (auth_attrib != NULL) && (avp_attrib != NULL)) { CHECK_MALLOC(ans_attrib = malloc(sizeof(struct avp_attribute))); memset(ans_attrib, 0, sizeof(struct avp_attribute)); fd_list_init(&ans_attrib->chain, NULL); ans_attrib->attrib = "Auth-Grace-Period"; if (avp_attrib->value.u32 < atoi(auth_attrib->value)) { ans_attrib->value.u32 = avp_attrib->value.u32; } else { ans_attrib->value.u32 = atoi(auth_attrib->value); } fd_list_insert_before(&diameap_sm->ans_attributes, &ans_attrib->chain); free_attrib(auth_attrib); free_avp_attrib(avp_attrib); } } /* Auth-Session-State */ { CHECK_FCT(diameap_get_auth_attribute(&diameap_sm->attributes, "Auth-Session-State", &auth_attrib,1, &ret2)); if ((ret2 == 0) && (auth_attrib != NULL)) { CHECK_MALLOC(ans_attrib = malloc(sizeof(struct avp_attribute))); memset(ans_attrib, 0, sizeof(struct avp_attribute)); fd_list_init(&ans_attrib->chain, NULL); ans_attrib->attrib = "Auth-Session-State"; ans_attrib->value.i32 = atoi(auth_attrib->value); fd_list_insert_before(&diameap_sm->ans_attributes, &ans_attrib->chain); free_attrib(auth_attrib); } } /* Re-Auth-Request-Type */ { CHECK_FCT(diameap_get_auth_attribute(&diameap_sm->attributes, "Re-Auth-Request-Type", &auth_attrib,1, &ret2)); if ((ret2 == 0) && (auth_attrib != NULL)) { CHECK_MALLOC(ans_attrib = malloc(sizeof(struct avp_attribute))); memset(ans_attrib, 0, sizeof(struct avp_attribute)); fd_list_init(&ans_attrib->chain, NULL); ans_attrib->attrib = "Re-Auth-Request-Type"; ans_attrib->value.i32 = atoi(auth_attrib->value); fd_list_insert_before(&diameap_sm->ans_attributes, &ans_attrib->chain); free_attrib(auth_attrib); } else { ans_attrib = NULL; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes, "Authorization-Lifetime", &ans_attrib,0, &ret1)); if ((ret1 == 0) && (ans_attrib != NULL)) { CHECK_MALLOC(ans_attrib = malloc(sizeof(struct avp_attribute))); memset(ans_attrib, 0, sizeof(struct avp_attribute)); fd_list_init(&ans_attrib->chain, NULL); ans_attrib->attrib = "Re-Auth-Request-Type"; ans_attrib->value.i32 = 0; fd_list_insert_before(&diameap_sm->ans_attributes, &ans_attrib->chain); } } } /* Session-Timeout */ { CHECK_FCT(diameap_get_auth_attribute(&diameap_sm->attributes, "Session-Timeout", &auth_attrib,1, &ret2)); if ((ret2 == 0) && (auth_attrib != NULL)) { CHECK_MALLOC(ans_attrib = malloc(sizeof(struct avp_attribute))); memset(ans_attrib, 0, sizeof(struct avp_attribute)); fd_list_init(&ans_attrib->chain, NULL); ans_attrib->attrib = "Session-Timeout"; ans_attrib->value.u32 = atoi(auth_attrib->value); fd_list_insert_before(&diameap_sm->ans_attributes, &ans_attrib->chain); free_attrib(auth_attrib); } } /* Multi-Round-Time-Out */ { CHECK_FCT(diameap_get_auth_attribute(&diameap_sm->attributes, "Multi-Round-Time-Out", &auth_attrib,1, &ret2)); if ((ret2 == 0) && (auth_attrib != NULL)) { CHECK_MALLOC(ans_attrib = malloc(sizeof(struct avp_attribute))); memset(ans_attrib, 0, sizeof(struct avp_attribute)); fd_list_init(&ans_attrib->chain, NULL); ans_attrib->attrib = "Multi-Round-Time-Out"; ans_attrib->value.u32 = atoi(auth_attrib->value); fd_list_insert_before(&diameap_sm->ans_attributes, &ans_attrib->chain); free_attrib(auth_attrib); } } /* Acct-Interim-Interval */ { CHECK_FCT(diameap_get_auth_attribute(&diameap_sm->attributes, "Acct-Interim-Interval", &auth_attrib,1, &ret2)); if ((ret2 == 0) && (auth_attrib != NULL)) { CHECK_MALLOC(ans_attrib = malloc(sizeof(struct avp_attribute))); memset(ans_attrib, 0, sizeof(struct avp_attribute)); fd_list_init(&ans_attrib->chain, NULL); ans_attrib->attrib = "Acct-Interim-Interval"; ans_attrib->value.u32 = atoi(auth_attrib->value); fd_list_insert_before(&diameap_sm->ans_attributes, &ans_attrib->chain); free_attrib(auth_attrib); } } return 0; } #define DIAMEAP_STR 1 #define DIAMEAP_NUM 2 #define DIAMEAP_OP_NO 0 //Not supported operator #define DIAMEAP_OP_EQ 1 //== #define DIAMEAP_OP_GT 2 //> #define DIAMEAP_OP_LT 3 //< #define DIAMEAP_OP_GE 4 //>= #define DIAMEAP_OP_LE 5 //<= #define DIAMEAP_OP_NE 6 //!= #define DIAMEAP_OP_EX 7 //~= #define EQ(A,B) A==B ? TRUE : FALSE #define GT(A,B) A>B ? TRUE : FALSE #define GE(A,B) A>=B ? TRUE : FALSE #define LT(A,B) A") == 0) { return DIAMEAP_OP_GT; } if (strcmp(operator, "<") == 0) { return DIAMEAP_OP_LT; } if (strcmp(operator, ">=") == 0) { return DIAMEAP_OP_GE; } if (strcmp(operator, "<=") == 0) { return DIAMEAP_OP_LE; } if (strcmp(operator, "!=") == 0) { return DIAMEAP_OP_NE; } if (strcmp(operator, "~=") == 0) { return DIAMEAP_OP_EX; } return DIAMEAP_OP_NO; } boolean is_operator(int format_type, char * operator) { TRACE_ENTRY("%d %p",format_type,operator); if ((format_type == DIAMEAP_STR) && (strcmp(operator, "==") == 0 || strcmp( operator, "~=") == 0 || strcmp(operator, "!=") == 0)) { return TRUE; } if ((format_type == DIAMEAP_NUM) && (strcmp(operator, "~=") != 0)) { return TRUE; } return FALSE; } union avp_value diameap_get_num(char * num, enum dict_avp_basetype datatype) { TRACE_ENTRY("%p %d",num,datatype); union avp_value val; switch (datatype) { case AVP_TYPE_INTEGER32://i32 val.i32 = atoi(num); break; case AVP_TYPE_INTEGER64://i64 val.i64 = atoll(num); break; case AVP_TYPE_UNSIGNED32://u32 val.u32 = strtoul(num, NULL, 10); break; case AVP_TYPE_UNSIGNED64://u64 val.u64 = strtoull(num, NULL, 10); break; case AVP_TYPE_FLOAT32://f32 val.f32 = atof(num); break; case AVP_TYPE_FLOAT64://f64 val.f64 = strtod(num, NULL); break; default: TRACE_DEBUG(INFO, "%sUnknown AVP Base Type.",DIAMEAP_EXTENSION) ; } return val; } boolean diameap_check(union avp_value *A, char * B, char * operator, enum dict_avp_basetype datatype) { TRACE_ENTRY("%p %p %p %d",A,B,operator,datatype); if (((datatype == AVP_TYPE_OCTETSTRING) && (is_operator(DIAMEAP_STR, operator) == TRUE)) || ((datatype != AVP_TYPE_OCTETSTRING) && (datatype != AVP_TYPE_GROUPED) && (is_operator(DIAMEAP_NUM, operator) == TRUE))) { switch (diameap_get_operator(operator)) { case DIAMEAP_OP_EQ: if ((datatype == AVP_TYPE_OCTETSTRING) && (is_operator(DIAMEAP_STR, operator) == TRUE)) { if (strcmp((char *)A->os.data, B) == 0) return TRUE; else return FALSE; } else if ((datatype != AVP_TYPE_OCTETSTRING) && (datatype != AVP_TYPE_GROUPED) && (is_operator(DIAMEAP_NUM, operator) == TRUE)) { switch (datatype) { case AVP_TYPE_INTEGER32://i32 return EQ(A->i32,diameap_get_num(B, datatype).i32); break; case AVP_TYPE_INTEGER64://i64 return EQ(A->i64,diameap_get_num(B, datatype).i64); break; case AVP_TYPE_UNSIGNED32://u32 return EQ(A->u32,diameap_get_num(B, datatype).u32); break; case AVP_TYPE_UNSIGNED64://u64 return EQ(A->u64,diameap_get_num(B, datatype).u64); break; case AVP_TYPE_FLOAT32://f32 return EQ(A->f32,diameap_get_num(B, datatype).f32); break; case AVP_TYPE_FLOAT64://f64 return EQ(A->f64,diameap_get_num(B, datatype).f64); break; default: return FALSE; } } else { return FALSE; } break; case DIAMEAP_OP_EX: { //string only boolean authorized = FALSE; if ((datatype == AVP_TYPE_OCTETSTRING) && (is_operator(DIAMEAP_STR, operator) == TRUE)) { regex_t rule_regexp; regcomp(&rule_regexp, B, REG_EXTENDED | REG_NOSUB | REG_ICASE); if (regexec(&rule_regexp, (char *)A->os.data, 0, NULL, 0) != 0) { authorized = FALSE; } else { authorized = TRUE; } regfree(&rule_regexp); } return authorized; } case DIAMEAP_OP_GT: if ((datatype != AVP_TYPE_OCTETSTRING) && (datatype != AVP_TYPE_GROUPED) && (is_operator(DIAMEAP_NUM, operator) == TRUE)) { switch (datatype) { case AVP_TYPE_INTEGER32://i32 return GT(A->i32, diameap_get_num(B, datatype).i32); break; case AVP_TYPE_INTEGER64://i64 return GT(A->i64, diameap_get_num(B, datatype).i64); break; case AVP_TYPE_UNSIGNED32://u32 return GT(A->u32, diameap_get_num(B, datatype).u32); break; case AVP_TYPE_UNSIGNED64://u64 return GT(A->u64, diameap_get_num(B, datatype).u64); break; case AVP_TYPE_FLOAT32://f32 return GT(A->f32, diameap_get_num(B, datatype).f32); break; case AVP_TYPE_FLOAT64://f64 return GT(A->f64, diameap_get_num(B, datatype).f64); break; default: return FALSE; } } else { return FALSE; } break; case DIAMEAP_OP_GE: if ((datatype != AVP_TYPE_OCTETSTRING) && (datatype != AVP_TYPE_GROUPED) && (is_operator(DIAMEAP_NUM, operator) == TRUE)) { switch (datatype) { case AVP_TYPE_INTEGER32://i32 return GE(A->i32,diameap_get_num(B, datatype).i32); break; case AVP_TYPE_INTEGER64://i64 return GE(A->i64,diameap_get_num(B, datatype).i64); break; case AVP_TYPE_UNSIGNED32://u32 return GE(A->u32,diameap_get_num(B, datatype).u32); break; case AVP_TYPE_UNSIGNED64://u64 return GE(A->u64,diameap_get_num(B, datatype).u64); break; case AVP_TYPE_FLOAT32://f32 return GE(A->f32,diameap_get_num(B, datatype).f32); break; case AVP_TYPE_FLOAT64://f64 return GE(A->f64,diameap_get_num(B, datatype).f64); break; default: return FALSE; } } else { return FALSE; } break; case DIAMEAP_OP_LT: if ((datatype != AVP_TYPE_OCTETSTRING) && (datatype != AVP_TYPE_GROUPED) && (is_operator(DIAMEAP_NUM, operator) == TRUE)) { switch (datatype) { case AVP_TYPE_INTEGER32://i32 return LT(A->i32, diameap_get_num(B, datatype).i32); break; case AVP_TYPE_INTEGER64://i64 return LT(A->i64, diameap_get_num(B, datatype).i64); break; case AVP_TYPE_UNSIGNED32://u32 return LT(A->u32, diameap_get_num(B, datatype).u32); break; case AVP_TYPE_UNSIGNED64://u64 return LT(A->u64, diameap_get_num(B, datatype).u64); break; case AVP_TYPE_FLOAT32://f32 return LT(A->f32, diameap_get_num(B, datatype).f32); break; case AVP_TYPE_FLOAT64://f64 return LT(A->f64, diameap_get_num(B, datatype).f64); break; default: return FALSE; } } else { return FALSE; } break; case DIAMEAP_OP_LE: if ((datatype != AVP_TYPE_OCTETSTRING) && (datatype != AVP_TYPE_GROUPED) && (is_operator(DIAMEAP_NUM, operator) == TRUE)) { switch (datatype) { case AVP_TYPE_INTEGER32://i32 return LE(A->i32, diameap_get_num(B, datatype).i32); break; case AVP_TYPE_INTEGER64://i64 return LE(A->i64, diameap_get_num(B, datatype).i64); break; case AVP_TYPE_UNSIGNED32://u32 return LE(A->u32, diameap_get_num(B, datatype).u32); break; case AVP_TYPE_UNSIGNED64://u64 return LE(A->u64, diameap_get_num(B, datatype).u64); break; case AVP_TYPE_FLOAT32://f32 return LE(A->f32, diameap_get_num(B, datatype).f32); break; case AVP_TYPE_FLOAT64://f64 return LE(A->f64, diameap_get_num(B, datatype).f64); break; default: return FALSE; } } else { return FALSE; } break; case DIAMEAP_OP_NE: if ((datatype == AVP_TYPE_OCTETSTRING) && (is_operator(DIAMEAP_STR, operator) == TRUE)) { if (strcmp((char *)A->os.data, B) != 0) return TRUE; else return FALSE; } else if ((datatype != AVP_TYPE_OCTETSTRING) && (datatype != AVP_TYPE_GROUPED) && (is_operator(DIAMEAP_NUM, operator) == TRUE)) { switch (datatype) { case AVP_TYPE_INTEGER32://i32 return NE(A->i32, diameap_get_num(B, datatype).i32); break; case AVP_TYPE_INTEGER64://i64 return NE(A->i64, diameap_get_num(B, datatype).i64); break; case AVP_TYPE_UNSIGNED32://u32 return NE(A->u32, diameap_get_num(B, datatype).u32); break; case AVP_TYPE_UNSIGNED64://u64 return NE(A->u64, diameap_get_num(B, datatype).u64); break; case AVP_TYPE_FLOAT32://f32 return NE(A->f32, diameap_get_num(B, datatype).f32); break; case AVP_TYPE_FLOAT64://f64 return NE(A->f64, diameap_get_num(B, datatype).f64); break; default: return FALSE; } } else { return FALSE; } break; } } return FALSE; } char * diameap_attribute_operator(char * op, int * toadd, boolean *isrule) { TRACE_ENTRY("%p %p %p",op,toadd,isrule); char * attribute_op; if (op[0] == '+') { *toadd = 1; } else if (op[strlen(op) - 1] == '+') { *toadd = 2; } else { *toadd = 0; } switch (*toadd) { case 1: attribute_op = malloc(strlen(op)); memset(attribute_op, 0, strlen(op)); strncpy(attribute_op, op + 1, strlen(op) - 1); attribute_op[strlen(op)] = '\0'; break; case 2: attribute_op = malloc(strlen(op)); memset(attribute_op, 0, strlen(op)); strncpy(attribute_op, op, strlen(op) - 1); attribute_op[strlen(op)] = '\0'; break; default: attribute_op = malloc(strlen(op) + 1); memset(attribute_op, 0, strlen(op) + 1); strcpy(attribute_op, op); attribute_op[strlen(op) + 1] = '\0'; } if (strcmp(attribute_op, "=") == 0) { *isrule = FALSE; *toadd = 2; } else { *isrule = TRUE; } return attribute_op; } int diameap_answer_set_attribute_valueA(union avp_value *A, int *tofree, enum dict_avp_basetype datatype, union avp_value * rval) { TRACE_ENTRY("%p %p %d %p",A,tofree,datatype,rval); if (datatype == AVP_TYPE_OCTETSTRING) { CHECK_MALLOC(rval->os.data=malloc(A->os.len)); memcpy(rval->os.data,A->os.data,A->os.len); rval->os.len = A->os.len; *tofree = 1; } else { *rval = *A; } return 0; } int diameap_answer_set_attribute_valueB(char * B, int *tofree, enum dict_avp_basetype datatype, union avp_value * rval) { TRACE_ENTRY("%p %p %d %p",B,tofree,datatype,rval); if (datatype == AVP_TYPE_OCTETSTRING) { CHECK_MALLOC(rval->os.data=malloc(strlen(B))); memcpy(rval->os.data,B,strlen(B)); rval->os.len = strlen(B); *tofree = 1; } else { *rval = diameap_get_num(B, datatype); } return 0; } static int diameap_attribute_limits(char * attrib, int * max, int *ret) { TRACE_ENTRY("%p %p %p",attrib,max,ret); if (attrib == NULL) { return EINVAL; } int i; for (i = 0; i < sizeof(auth_avps); i++) { if (strcmp(auth_avps[i].avp_attribute, attrib) == 0) { *max = auth_avps[i].max; *ret = 0; return 0; } } *max = 0; *ret = 1; return 0; } static int diameap_answer_authorization_attributes( struct diameap_state_machine * diameap_sm) { TRACE_ENTRY("%p",diameap_sm); if (diameap_sm == NULL) { return EINVAL; } boolean checked = TRUE; struct fd_list * attrib; struct auth_attribute * auth_attrib; struct avp_attribute * avp_attrib; int ret; for (attrib = (&diameap_sm->attributes)->next; attrib != (&diameap_sm->attributes); attrib = attrib->next) { avp_attrib = NULL; auth_attrib = (struct auth_attribute *) attrib; int toadd = 0; boolean isrule = FALSE; char * op; op = diameap_attribute_operator(auth_attrib->op, &toadd, &isrule); struct dict_object * dobj; struct dict_avp_data avpdata; fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, auth_attrib->attrib, &dobj, ENOENT); fd_dict_getval(dobj, &avpdata); checked = TRUE; if (isrule == TRUE) { CHECK_FCT(diameap_get_avp_attribute(&diameap_sm->req_attributes,auth_attrib->attrib,&avp_attrib,0,&ret)); if (ret == 0) { checked = diameap_check(&avp_attrib->value, auth_attrib->value, op, avpdata.avp_basetype); } } if (checked == TRUE && toadd != 0) { struct avp_attribute * ans_attrib; int max = 0; diameap_attribute_limits(auth_attrib->attrib, &max, &ret); if ((ret == 0) && (max != 0)) { if (max == 1)//only one { int ret = 0; diameap_get_ans_attribute(&diameap_sm->ans_attributes, auth_attrib->attrib, &ans_attrib, 0, &ret); if (ret == 1) { ans_attrib = NULL; CHECK_MALLOC(ans_attrib = malloc(sizeof(struct avp_attribute))); memset(ans_attrib, 0, sizeof(struct avp_attribute)); fd_list_init(&ans_attrib->chain, NULL); ans_attrib->attrib = strdup(auth_attrib->attrib); if (toadd == 1) { diameap_answer_set_attribute_valueA( &avp_attrib->value, &ans_attrib->tofree, avpdata.avp_basetype, &ans_attrib->value); } else { diameap_answer_set_attribute_valueB( auth_attrib->value, &ans_attrib->tofree, avpdata.avp_basetype, &ans_attrib->value); } fd_list_insert_before(&diameap_sm->ans_attributes, &ans_attrib->chain); } else { //an answer avp is already added } } else { ans_attrib = NULL; CHECK_MALLOC(ans_attrib = malloc(sizeof(struct avp_attribute))); memset(ans_attrib, 0, sizeof(struct avp_attribute)); fd_list_init(&ans_attrib->chain, NULL); ans_attrib->attrib = auth_attrib->attrib; if (toadd == 1) { diameap_answer_set_attribute_valueA(&avp_attrib->value, &ans_attrib->tofree, avpdata.avp_basetype, &ans_attrib->value); } else { diameap_answer_set_attribute_valueB(auth_attrib->value, &ans_attrib->tofree, avpdata.avp_basetype, &ans_attrib->value); } fd_list_insert_before(&diameap_sm->ans_attributes, &ans_attrib->chain); } } } if (checked == FALSE) { diameap_sm->authorized = FALSE; return 0; } } diameap_sm->authorized = checked; return 0; return 0; } static int diameap_policy_decision(struct diameap_state_machine * diameap_sm, struct diameap_eap_interface *eap_i) { TRACE_ENTRY("%p %p",diameap_sm,eap_i); if ((eap_i->aaaFail == TRUE) && (eap_i->aaaSuccess == TRUE)) { TRACE_DEBUG(INFO,"%s Incorrect EAP decision. EAP process should not return both success and failure for the same session.(please report this problem.)",DIAMEAP_EXTENSION); return -1; } if (eap_i->aaaFail == TRUE) { diameap_sm->result_code = 4001; /* DIAMETER_AUTHENTICATION_REJECTED 4001 */ diameap_sm->authFailure = TRUE; TRACE_DEBUG(FULL+1,"%s Auth failure: Authentication Rejected ",DIAMEAP_EXTENSION); return 0; } if (eap_i->aaaSuccess == FALSE) { diameap_sm->result_code = 1001; /* DIAMETER_MULTI_ROUND_AUTH 1001 */ return 0; } if (eap_i->aaaSuccess == TRUE) { if (diameap_sm->auth_request_val == AUTHORIZE_AUTHENTICATE) { if ((diameap_sm->verify_authorization == TRUE) && (diameap_sm->result_code == 0)) { diameap_sm->result_code = 2001; /* DIAMETER_SUCCESS 2001 */ diameap_sm->authSuccess = TRUE; TRACE_DEBUG(FULL+1,"%s Auth success: Authorization and Authentication ",DIAMEAP_EXTENSION); return 0; } else { // } } if (diameap_sm->auth_request_val == AUTHENTICATE_ONLY) { diameap_sm->result_code = 2001; /* DIAMETER_SUCCESS 2001 */ diameap_sm->authSuccess = TRUE; TRACE_DEBUG(FULL+1,"%s Auth success: Authentication Only ",DIAMEAP_EXTENSION); return 0; } } return 0; } static int diameap_add_avps(struct diameap_state_machine * diameap_sm, struct msg * ans, struct msg * req) { TRACE_ENTRY("%p %p %p",diameap_sm,ans,req); struct avp * avp, *avp2; struct avp_hdr * avpdata; union avp_value avp_val; int ret = 0; /* Origin-Host AVP and Origin-Realm AVP */ { CHECK_FCT( fd_msg_add_origin ( ans, 0 ) ); } /* Auth-Application-Id AVP */ { CHECK_FCT(fd_msg_avp_new(dataobj_auth_application_id, 0, &avp)); avp_val.u32 = diameap_config->application_id; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT(fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp)); } /* Auth-Request-Type AVP * Enumerated values: * AUTHENTICATE_ONLY 1 * AUTHORIZE_ONLY 2 * AUTHORIZE_AUTHENTICATE 3 */ { CHECK_FCT(fd_msg_avp_new(dataobj_auth_request_type, 0, &avp)); if (!diameap_config->authorize) { //AUTHENTICATE ONLY avp_val.i32 = AUTHENTICATE_ONLY; } else { if (diameap_sm->auth_request_val == 3) { //AUTHORIZE_AUTHENTICATE avp_val.i32 = AUTHORIZE_AUTHENTICATE; } else { //AUTHENTICATE_ONLY avp_val.i32 = AUTHENTICATE_ONLY; } } CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT(fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp)); } /* Proxy-Info AVP */ CHECK_FCT(fd_msg_search_avp(req, dataobj_proxy_info, &avp)); if (avp != NULL) { CHECK_FCT(fd_msg_avp_hdr ( avp, &avpdata ) ); u32 proxy_info_code = avpdata->avp_code; int depth; do { ret = 0; depth = 0; CHECK_FCT(fd_msg_avp_hdr ( avp, &avpdata ) ); if (avpdata->avp_code == proxy_info_code) { CHECK_FCT(fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp)); } ret = fd_msg_browse ( avp, MSG_BRW_NEXT, &avp2, &depth); avp = avp2; } while ((avp != NULL) && (ret == 0) && (ret == 0)); } if (diameap_sm->eap_sm.user.userid) { /* User-Name AVP */ { CHECK_FCT(fd_msg_avp_new(dataobj_user_name, 0, &avp)); if (diameap_sm->privateUser == FALSE) { avp_val.os.data = diameap_sm->eap_sm.user.userid; avp_val.os.len = diameap_sm->eap_sm.user.useridLength; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); } else { } } } return 0; } static int diameap_add_user_sessions_avps( struct diameap_state_machine * diameap_sm, struct msg * ans) { TRACE_ENTRY("%p %p",diameap_sm,ans); struct avp * avp; union avp_value avp_val; int ret; /* Authorization-Lifetime AVP */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Authorization-Lifetime",&ans_attrib,1,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_authorization_lifetime, 0, &avp)); avp_val.u32 = ans_attrib->value.u32; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); } } /* Auth-Grace-Period AVP */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Auth-Grace-Period",&ans_attrib,1,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_auth_grace_period, 0, &avp)); avp_val.u32 = ans_attrib->value.u32; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); } } /* Auth-Session-State AVP */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Auth-Session-State",&ans_attrib,1,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_auth_session_state, 0, &avp)); avp_val.i32 = ans_attrib->value.i32; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); } } /* Re-Auth-Request-Type AVP */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Re-Auth-Request-Type",&ans_attrib,1,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_re_auth_request_type, 0, &avp)); avp_val.i32 = ans_attrib->value.i32; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); } } /* Session-Timeout AVP */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Session-Timeout",&ans_attrib,1,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_session_timeout, 0, &avp)); avp_val.u32 = ans_attrib->value.u32; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); } } /* Acct-Interim-Interval AVP */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Acct-Interim-Interval",&ans_attrib,1,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_acct_interim_interval, 0, &avp)); avp_val.u32 = ans_attrib->value.u32; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); } } return 0; } static int diameap_add_authorization_avps( struct diameap_state_machine * diameap_sm, struct msg * ans) { TRACE_ENTRY("%p %p",diameap_sm, ans); struct avp * avp; union avp_value avp_val; int ret; if (diameap_sm == NULL) { return EINVAL; } if (ans == NULL) { return EINVAL; } /* Reply-Message */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Reply-Message",&ans_attrib,1,&ret)); while ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_reply_message, 0, &avp)); avp_val.os.data = ans_attrib->value.os.data; avp_val.os.len = ans_attrib->value.os.len; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Reply-Message",&ans_attrib,1,&ret)); } } /* Service-Type */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Service-Type",&ans_attrib,1,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_service_type, 0, &avp)); avp_val.i32 = ans_attrib->value.i32; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); } } /* Callback-Number */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Callback-Number",&ans_attrib,1,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_callback_number, 0, &avp)); avp_val.os.data = ans_attrib->value.os.data; avp_val.os.len = ans_attrib->value.os.len; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); } } /* Callback-Id */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Callback-Id",&ans_attrib,1,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_callback_id, 0, &avp)); avp_val.os.data = ans_attrib->value.os.data; avp_val.os.len = ans_attrib->value.os.len; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); } } /* Idle-Timeout */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Idle-Timeout",&ans_attrib,1,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_idle_timeout, 0, &avp)); avp_val.u32 = ans_attrib->value.u32; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); } } /* NAS-Filter-Rule */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"NAS-Filter-Rule",&ans_attrib,1,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_nas_filter_rule, 0, &avp)); avp_val.u32 = ans_attrib->value.u32; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); } } /* Filter-Id */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Filter-Id",&ans_attrib,1,&ret)); while ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_filter_id, 0, &avp)); avp_val.os.data = ans_attrib->value.os.data; avp_val.os.len = ans_attrib->value.os.len; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Filter-Id",&ans_attrib,1,&ret)); } } /* Configuration-Token */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Configuration-Token",&ans_attrib,1,&ret)); while ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_configuration_token, 0, &avp)); avp_val.os.data = ans_attrib->value.os.data; avp_val.os.len = ans_attrib->value.os.len; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Configuration-Token",&ans_attrib,1,&ret)); } } /* QoS-Filter-Rule */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"QoS-Filter-Rule",&ans_attrib,1,&ret)); while ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_qos_filter_rule, 0, &avp)); avp_val.os.data = ans_attrib->value.os.data; avp_val.os.len = ans_attrib->value.os.len; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"QoS-Filter-Rule",&ans_attrib,1,&ret)); } } /* Framed-Protocol */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Framed-Protocol",&ans_attrib,1,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_framed_protocol, 0, &avp)); avp_val.i32 = ans_attrib->value.i32; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); } } /* Framed-Routing */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Framed-Routing",&ans_attrib,1,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_framed_routing, 0, &avp)); avp_val.i32 = ans_attrib->value.i32; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); } } /* Framed-MTU */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Framed-MTU",&ans_attrib,1,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_framed_mtu, 0, &avp)); avp_val.u32 = ans_attrib->value.u32; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); } } /* Framed-Compression */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Framed-Compression",&ans_attrib,1,&ret)); while ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_framed_compression, 0, &avp)); avp_val.i32 = ans_attrib->value.i32; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Framed-Compression",&ans_attrib,1,&ret)); } } /* Framed-IP-Address */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Framed-IP-Address",&ans_attrib,1,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_framed_ip_address, 0, &avp)); avp_val.os.data = ans_attrib->value.os.data; avp_val.os.len = ans_attrib->value.os.len; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); } } /* Framed-IP-Netmask */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Framed-IP-Netmask",&ans_attrib,1,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_framed_ip_netmask, 0, &avp)); avp_val.os.data = ans_attrib->value.os.data; avp_val.os.len = ans_attrib->value.os.len; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); } } /* Framed-Route */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Framed-Route",&ans_attrib,1,&ret)); while ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_framed_route, 0, &avp)); avp_val.os.data = ans_attrib->value.os.data; avp_val.os.len = ans_attrib->value.os.len; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Framed-Route",&ans_attrib,1,&ret)); } } /* Framed-Pool */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Framed-Pool",&ans_attrib,1,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_framed_pool, 0, &avp)); avp_val.os.data = ans_attrib->value.os.data; avp_val.os.len = ans_attrib->value.os.len; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); } } /* Framed-Interface-Id */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Framed-Interface-Id",&ans_attrib,1,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_framed_interface_id, 0, &avp)); avp_val.u64 = ans_attrib->value.u64; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); } } /* Framed-IPv6-Prefix */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Framed-IPv6-Prefix",&ans_attrib,1,&ret)); while ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_framed_ipv6_prefix, 0, &avp)); avp_val.os.data = ans_attrib->value.os.data; avp_val.os.len = ans_attrib->value.os.len; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Framed-IPv6-Prefix",&ans_attrib,1,&ret)); } } /* Framed-IPv6-Route */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Framed-IPv6-Route",&ans_attrib,1,&ret)); while ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_framed_ipv6_route, 0, &avp)); avp_val.os.data = ans_attrib->value.os.data; avp_val.os.len = ans_attrib->value.os.len; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Framed-IPv6-Route",&ans_attrib,1,&ret)); } } /* Framed-IPv6-Pool */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Framed-IPv6-Pool",&ans_attrib,1,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_framed_ipv6_pool, 0, &avp)); avp_val.os.data = ans_attrib->value.os.data; avp_val.os.len = ans_attrib->value.os.len; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); } } /* Framed-IPX-Network */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Framed-IPX-Network",&ans_attrib,1,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_framed_ipx_network, 0, &avp)); avp_val.u32 = ans_attrib->value.u32; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); } } /* Framed-AppleTalk-Link */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Framed-AppleTalk-Link",&ans_attrib,1,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_framed_appletalk_link, 0, &avp)); avp_val.u32 = ans_attrib->value.u32; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); } } /* Framed-AppleTalk-Network */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Framed-AppleTalk-Network",&ans_attrib,1,&ret)); while ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_framed_appletalk_network, 0, &avp)); avp_val.u32 = ans_attrib->value.u32; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Framed-AppleTalk-Network",&ans_attrib,1,&ret)); } } /* Framed-AppleTalk-Zone */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Framed-AppleTalk-Zone",&ans_attrib,1,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { CHECK_FCT(fd_msg_avp_new(dataobj_framed_appletalk_zone, 0, &avp)); avp_val.os.data = ans_attrib->value.os.data; avp_val.os.len = ans_attrib->value.os.len; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_ans_attrib(ans_attrib); } } /* Tunneling */ // /* State */ // return 0; } static int diameap_add_result_code(struct diameap_state_machine * diameap_sm, struct msg * ans, struct session * sess) { TRACE_ENTRY("%p %p",diameap_sm,ans); struct avp * avp; union avp_value avp_val; int ret; /* Result-Code AVP */ CHECK_FCT(fd_msg_avp_new(dataobj_result_code, 0, &avp)); avp_val.u32 = diameap_sm->result_code; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); /* Add Result-Code AVP to the message */ CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); /* Multi_Round_Time_Out AVP */ if (diameap_sm->result_code == 1001) { struct timespec sess_timeout; CHECK_FCT(fd_msg_avp_new(dataobj_multi_round_time_out, 0, &avp)); struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Multi-Round-Time-Out",&ans_attrib,1,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { avp_val.u32 = ans_attrib->value.u32; /* Update the session timeout with multi-round-time-out value */ CHECK_SYS(clock_gettime(CLOCK_REALTIME,&sess_timeout)); sess_timeout.tv_sec += diameap_config->multi_round_time_out; CHECK_FCT(fd_sess_settimeout(sess, &sess_timeout)); free_ans_attrib(ans_attrib); } else { avp_val.u32 = diameap_config->multi_round_time_out; /* Update the session timeout with multi-round-time-out value */ CHECK_SYS(clock_gettime(CLOCK_REALTIME,&sess_timeout)); sess_timeout.tv_sec += diameap_config->multi_round_time_out; CHECK_FCT(fd_sess_settimeout(sess, &sess_timeout)); } CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); } return 0; } static int diameap_add_eap_payload(struct diameap_state_machine * diameap_sm, struct msg * ans, struct diameap_eap_interface *eap_i) { TRACE_ENTRY("%p %p",diameap_sm,ans); struct avp * avp; union avp_value avp_val; int ret; u32 Framed_MTU = 1500; //1500 default value u32 NAS_Port_Type_HeaderLength = 4; int EAP_Max_Length = 0; /* get Framed-MTU AVP value */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"Framed-MTU",&ans_attrib,0,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { Framed_MTU = ans_attrib->value.u32; } } /* get NAS-Port-Type AVP value */ { struct avp_attribute * ans_attrib; CHECK_FCT(diameap_get_ans_attribute(&diameap_sm->ans_attributes,"NAS-Port-Type",&ans_attrib,0,&ret)); if ((ret == 0) && (ans_attrib != NULL)) { // = ans_attrib->value.i32; } } //TD take the link type into consideration when calculating EAP_MAX_Length EAP_Max_Length = Framed_MTU - NAS_Port_Type_HeaderLength; if (eap_i->aaaEapReqData.length <= EAP_Max_Length) { /* EAP-Payload AVP */ { CHECK_FCT(fd_msg_avp_new(dataobj_eap_payload, 0, &avp)); avp_val.os.data = eap_i->aaaEapReqData.data; avp_val.os.len = eap_i->aaaEapReqData.length; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); if (diameap_sm->lastReqEAPavp != NULL) { fd_msg_free(diameap_sm->lastReqEAPavp); diameap_sm->lastReqEAPavp = NULL; } CHECK_FCT(fd_msg_avp_new(dataobj_eap_payload, 0, &diameap_sm->lastReqEAPavp)); avp_val.os.data = eap_i->aaaEapReqData.data; avp_val.os.len = eap_i->aaaEapReqData.length; CHECK_FCT(fd_msg_avp_setvalue(diameap_sm->lastReqEAPavp, &avp_val)); } } else { //if EAP Packet length > EAP_Max_Length } return 0; } static int diameap_send(struct msg ** rmsg) { TRACE_ENTRY("%p",rmsg); CHECK_FCT( fd_msg_send( rmsg, NULL, NULL)); return 0; } static int diameap_add_eap_success_avps( struct diameap_state_machine * diameap_sm, struct msg * ans, struct diameap_eap_interface *eap_i) { TRACE_ENTRY("%p %p %p",diameap_sm,ans,eap_i); struct avp * avp; union avp_value avp_val; int ret; /* EAP-Master-Session-Key AVP */ if (eap_i->aaaEapKeyAvailable == TRUE) { CHECK_FCT(fd_msg_avp_new(dataobj_eap_master_session_key, 0, &avp)); avp_val.os.data = eap_i->aaaEapMSKData; avp_val.os.len = eap_i->aaaEapMSKLength; CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); } /* EAP-Key-Name AVP */ struct avp_attribute * avp_attrib = NULL; CHECK_FCT(diameap_get_avp_attribute(&diameap_sm->req_attributes,"EAP-Key-Name",&avp_attrib,1,&ret)) if ((avp_attrib != NULL) && (ret != 1)) { if (avp_attrib->value.os.len == 0) { CHECK_FCT(fd_msg_avp_new(dataobj_eap_key_name, 0, &avp)); avp_val.os.data = NULL;// avp_val.os.len = 0;// CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); free_avp_attrib(avp_attrib); } } return 0; } int diameap_authorize(struct diameap_state_machine * diameap_sm) { TRACE_ENTRY("%p",diameap_sm); CHECK_FCT(diameap_authorization_get_attribs(&diameap_sm->eap_sm.user, &diameap_sm->attributes)); diameap_sm->authorized = TRUE; CHECK_FCT_DO(diameap_answer_authorization_attributes(diameap_sm), ); if (diameap_sm->authorized == FALSE) { diameap_sm->result_code = 4001; /* DIAMETER_AUTHENTICATION_REJECTED 4001 */ } return 0; } static int diameap_add_accounting_eap_auth_method( struct diameap_state_machine * diameap_sm, struct msg * ans) { TRACE_ENTRY("%p %p",diameap_sm,ans); int i = 0; struct avp * avp; union avp_value avp_val; /* Accounting-EAP-Auth-Method AVP */ while (i < diameap_sm->eap_sm.user.methodId) { CHECK_FCT(fd_msg_avp_new(dataobj_accounting_eap_auth_method, 0, &avp)); avp_val.u64 = (u64) (((diameap_sm->eap_sm.user.methods[i].vendor) * pow((double) 2, (double) 32)) + diameap_sm->eap_sm.user.methods[i].method); CHECK_FCT(fd_msg_avp_setvalue(avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); i++; } return 0; } static int diameap_add_eap_reissued_payload(struct msg * ans, struct msg * req) { TRACE_ENTRY("%p %p", ans, req); struct avp * avp, *re_avp; union avp_value avp_val; struct avp_hdr * avphdr; if ((ans == NULL) || (req == NULL)) { return EINVAL; } avp = NULL; CHECK_FCT(fd_msg_search_avp(req, dataobj_eap_payload, &avp)); if (avp != NULL) { CHECK_FCT( fd_msg_avp_hdr(avp, &avphdr)); CHECK_FCT( fd_msg_avp_new(dataobj_eap_reissued_payload, 0, &re_avp)); CHECK_MALLOC(avp_val.os.data=malloc(avphdr->avp_value->os.len)); memcpy(avp_val.os.data,avphdr->avp_value->os.data,avphdr->avp_value->os.len); avp_val.os.len = avphdr->avp_value->os.len; CHECK_FCT(fd_msg_avp_setvalue(re_avp, &avp_val)); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, re_avp ) ); } else { TRACE_DEBUG(INFO,"%sUnable to find EAP-Payload AVP in received Diameter-EAP-Request.",DIAMEAP_EXTENSION); return 1; } return 0; } static int diameap_server_callback(struct msg ** rmsg, struct avp * ravp, struct session * sess, void * opaque, enum disp_action * action) { TRACE_ENTRY("%p %p %p %p", rmsg, ravp, sess, action); struct sess_state * diameap_sess_data = NULL; struct diameap_state_machine * diameap_sm = NULL; struct diameap_eap_interface eap_i; struct msg *req, *ans; boolean non_fatal_error = FALSE; if (rmsg == NULL) return EINVAL; req = *rmsg; CHECK_FCT_DO(fd_sess_state_retrieve(diameap_server_reg, sess, &diameap_sess_data), { TRACE_DEBUG(INFO,"%s retrieving session state failed.",DIAMEAP_EXTENSION); goto s_end;}); CHECK_MALLOC_DO(diameap_sm = malloc(sizeof(struct diameap_state_machine)), goto s_end); memset(diameap_sm, 0, sizeof(struct diameap_state_machine)); if (diameap_sess_data) { diameap_sm->state = DIAMEAP_RECEIVED; diameap_sm->eap_sm.eap_state = EAP_IDLE; } else { diameap_sm->state = DIAMEAP_DISABLED; diameap_sm->eap_sm.eap_state = EAP_INITIALIZE; } while (diameap_sm->state != DIAMEAP_IDLE && diameap_sm->state != DIAMEAP_END) { switch (diameap_sm->state) { case DIAMEAP_DISABLED: if (rmsg) { diameap_sm->state = DIAMEAP_INITIALIZE; } else { TRACE_DEBUG(INFO,"%sReceived empty Diameter EAP Request message.",DIAMEAP_EXTENSION); goto s_end; } break; case DIAMEAP_INITIALIZE: CHECK_FCT_DO(diameap_initialize_diameap_sm(diameap_sm,diameap_sess_data), { TRACE_DEBUG(INFO,"%s Initializing DiamEAP state machine failed.",DIAMEAP_EXTENSION); goto s_end;}) ; CHECK_FCT_DO(diameap_initialize_diameap_eap_interface(&eap_i), { TRACE_DEBUG(INFO,"%s Initializing DiamEAP-EAP Interface failed.",DIAMEAP_EXTENSION); goto s_end;}) ; TRACE_DEBUG(FULL+1,"%sParsing AVPs",DIAMEAP_EXTENSION) ; CHECK_FCT_DO(diameap_parse_avps(diameap_sm, req, &eap_i), TRACE_DEBUG(INFO,"%s Unable to parse Diameter-EAP-Request AVPs.",DIAMEAP_EXTENSION)) ; if ((diameap_sm->result_code != 0)) { diameap_sm->state = DIAMEAP_SEND_ERROR_MSG; } else { diameap_sm->state = DIAMEAP_AUTHENTICATION_VERIFY; } break; case DIAMEAP_RECEIVED: CHECK_FCT_DO(diameap_initialize_diameap_sm(diameap_sm,diameap_sess_data), { TRACE_DEBUG(INFO,"%s Initializing DiamEAP state machine failed.",DIAMEAP_EXTENSION); goto s_end;}) ; CHECK_FCT_DO(diameap_initialize_diameap_eap_interface(&eap_i), { TRACE_DEBUG(INFO,"%s Initializing DiamEAP-EAP Interface failed.",DIAMEAP_EXTENSION); goto s_end;}) ; TRACE_DEBUG(FULL+1,"%sParsing AVPs",DIAMEAP_EXTENSION) ; CHECK_FCT_DO(diameap_parse_avps(diameap_sm, req, &eap_i), TRACE_DEBUG(INFO,"%s Unable to parse Diameter-EAP-Request AVPs.",DIAMEAP_EXTENSION)) ; if (diameap_sm->result_code != 0) { diameap_sm->state = DIAMEAP_SEND_ERROR_MSG; } else { diameap_sm->state = DIAMEAP_AUTHENTICATION_VERIFY; } break; case DIAMEAP_AUTHENTICATION_VERIFY: { TRACE_DEBUG(FULL+1,"%sVerify authentication",DIAMEAP_EXTENSION); CHECK_FCT_DO(diameap_eap_statemachine(&diameap_sm->eap_sm, &eap_i,&non_fatal_error), { TRACE_DEBUG(INFO,"%s EAP process failed.",DIAMEAP_EXTENSION); goto s_end;}); if (non_fatal_error == TRUE) { TRACE_DEBUG(FULL+1,"%sAuthentication verify finished with a non-fatal-error.",DIAMEAP_EXTENSION); diameap_sm->state = DIAMEAP_SEND_ERROR_MSG; } else { diameap_sm->state = DIAMEAP_SELECT_DECISION; } } break; case DIAMEAP_SELECT_DECISION: CHECK_FCT_DO( diameap_policy_decision(diameap_sm,&eap_i), goto s_end) ; if ((eap_i.aaaSuccess == TRUE) && (diameap_sm->auth_request_val == AUTHORIZE_AUTHENTICATE) && (diameap_sm->verify_authorization == FALSE)) { diameap_sm->state = DIAMEAP_AUTHORIZATION_VERIFY; } else { diameap_sm->state = DIAMEAP_DIAMETER_EAP_ANSWER; } break; case DIAMEAP_AUTHORIZATION_VERIFY: diameap_sm->verify_authorization = TRUE; TRACE_DEBUG(FULL+1,"%sVerify authorization",DIAMEAP_EXTENSION) ; CHECK_FCT_DO(diameap_authorize(diameap_sm), { TRACE_DEBUG(INFO,"%s Authorization check process failed.",DIAMEAP_EXTENSION); goto s_end;}) ; diameap_sm->state = DIAMEAP_SELECT_DECISION; break; case DIAMEAP_DIAMETER_EAP_ANSWER: TRACE_DEBUG(FULL+1,"%screate Diameter EAP Answer",DIAMEAP_EXTENSION) ; CHECK_FCT_DO(fd_msg_new_answer_from_req(fd_g_config->cnf_dict, rmsg, 0), goto s_end) ; ans = *rmsg; TRACE_DEBUG(FULL+1,"%sAdding AVPs to Diameter EAP Answer.",DIAMEAP_EXTENSION) ; CHECK_FCT_DO( diameap_add_avps(diameap_sm, ans,req), { TRACE_DEBUG(INFO,"%s Unable to add AVPs to Diameter-EAP-Answer message.",DIAMEAP_EXTENSION);goto s_end;}) ; if (diameap_sm->authFailure == FALSE) { if (diameap_sm->eap_sm.user.id != 0) { TRACE_DEBUG(FULL+1,"%sSelect authentication attributes.",DIAMEAP_EXTENSION); CHECK_FCT_DO(diameap_authentication_get_attribs(&diameap_sm->eap_sm.user, &diameap_sm->attributes), { TRACE_DEBUG(INFO,"%s Unable to get user's session attributes.",DIAMEAP_EXTENSION); goto s_end;}); TRACE_DEBUG(FULL+1,"%sCreate answer authentication attributes.",DIAMEAP_EXTENSION); CHECK_FCT_DO(diameap_answer_avp_attributes(diameap_sm), { TRACE_DEBUG(INFO,"%s Unable to generate answer attributes.",DIAMEAP_EXTENSION); goto s_end;}); } if (diameap_sm->authSuccess == FALSE) { diameap_sm->state = DIAMEAP_SEND_REQUEST; } else { diameap_sm->state = DIAMEAP_SEND_SUCCESS; } } else { diameap_sm->state = DIAMEAP_SEND_FAILURE; } break; case DIAMEAP_SEND_REQUEST: TRACE_DEBUG(FULL+1,"%sAdding Result Code AVP to Diameter-EAP-Answer.",DIAMEAP_EXTENSION) ; CHECK_FCT_DO( diameap_add_result_code(diameap_sm, ans, sess), { TRACE_DEBUG(INFO,"%s Adding Result-Code AVP failed.",DIAMEAP_EXTENSION); goto s_end;}) ; TRACE_DEBUG(FULL+1,"%sAdding EAP-Payload to Diameter-EAP-Answer.",DIAMEAP_EXTENSION) ; CHECK_FCT_DO( diameap_add_eap_payload(diameap_sm, ans,&eap_i), { TRACE_DEBUG(INFO,"%s Adding EAP-Payload AVP failed.",DIAMEAP_EXTENSION); goto s_end;}) ; TRACE_DEBUG(FULL+1,"%sStoring DiamEAP session data.",DIAMEAP_EXTENSION) ; CHECK_MALLOC(diameap_sess_data = malloc(sizeof(struct sess_state))) ; memset(diameap_sess_data, 0, sizeof(struct sess_state)); diameap_sess_data_new(diameap_sess_data, diameap_sm); CHECK_FCT_DO(fd_sess_state_store(diameap_server_reg, sess, &diameap_sess_data), { TRACE_DEBUG(INFO,"%s Storing session state failed.",DIAMEAP_EXTENSION); goto s_end;}) ; CHECK_FCT_DO( diameap_send(rmsg), goto s_end) ; diameap_sm->state = DIAMEAP_IDLE; break; case DIAMEAP_SEND_FAILURE: TRACE_DEBUG(FULL+1,"%sAdding Result Code AVP to Diameter-EAP-Answer.",DIAMEAP_EXTENSION) ; CHECK_FCT_DO( diameap_add_result_code(diameap_sm, ans, sess), { TRACE_DEBUG(INFO,"%s Adding Result-Code AVP failed.",DIAMEAP_EXTENSION); goto s_end;}) ; TRACE_DEBUG(FULL+1,"%sAdding EAP-Payload to Diameter-EAP-Answer.",DIAMEAP_EXTENSION) ; CHECK_FCT_DO( diameap_add_eap_payload(diameap_sm, ans,&eap_i), { TRACE_DEBUG(INFO,"%s Adding EAP-Payload AVP failed.",DIAMEAP_EXTENSION); goto s_end;}) ; LOG_N("%s Auth FAIL: %.*s",DIAMEAP_EXTENSION, diameap_sm->eap_sm.user.useridLength, diameap_sm->eap_sm.user.userid); CHECK_FCT_DO( diameap_send(rmsg), goto s_end) ; diameap_sm->state = DIAMEAP_END; break; case DIAMEAP_SEND_SUCCESS: TRACE_DEBUG(FULL+1,"%sAdding User session AVPs to Diameter-EAP-Answer.",DIAMEAP_EXTENSION) ; CHECK_FCT_DO(diameap_add_user_sessions_avps(diameap_sm,ans), { TRACE_DEBUG(INFO,"%s Adding user's session AVPs failed.",DIAMEAP_EXTENSION); goto s_end;}) ; if (diameap_sm->auth_request_val == AUTHORIZE_AUTHENTICATE) { TRACE_DEBUG(FULL+1,"%sAdding Authorization AVPs to Diameter-EAP-Answer.",DIAMEAP_EXTENSION); CHECK_FCT_DO(diameap_add_authorization_avps(diameap_sm,ans), { TRACE_DEBUG(INFO,"%s Adding Authorization AVPs failed.",DIAMEAP_EXTENSION); goto s_end;}); } TRACE_DEBUG(FULL+1,"%sAdding Result Code AVP to Diameter-EAP-Answer.",DIAMEAP_EXTENSION) ; CHECK_FCT_DO( diameap_add_result_code(diameap_sm, ans, sess), { TRACE_DEBUG(INFO,"%s Adding Result-Code AVP failed.",DIAMEAP_EXTENSION); goto s_end;}) ; TRACE_DEBUG(FULL+1,"%sAdding EAP-Payload to Diameter-EAP-Answer.",DIAMEAP_EXTENSION) ; CHECK_FCT_DO( diameap_add_eap_payload(diameap_sm, ans,&eap_i), { TRACE_DEBUG(INFO,"%s Adding EAP-Payload AVP failed.",DIAMEAP_EXTENSION); goto s_end;}) ; TRACE_DEBUG(FULL+1,"%sAdding EAP success AVPs AVPs to Diameter-EAP-Answer.",DIAMEAP_EXTENSION) ; CHECK_FCT_DO( diameap_add_eap_success_avps(diameap_sm, ans, &eap_i), goto s_end) ; TRACE_DEBUG(FULL+1,"%sAdding Accounting-EAP-Auth-Method AVPs to Diameter-EAP-Answer.",DIAMEAP_EXTENSION) ; CHECK_FCT_DO(diameap_add_accounting_eap_auth_method(diameap_sm, ans), { TRACE_DEBUG(INFO,"%s Adding accounting AVP failed",DIAMEAP_EXTENSION); goto s_end;}) ; LOG_N("%s Auth Success: %.*s",DIAMEAP_EXTENSION, diameap_sm->eap_sm.user.useridLength, diameap_sm->eap_sm.user.userid); CHECK_FCT_DO( diameap_send(rmsg), goto s_end) ; diameap_sm->state = DIAMEAP_END; break; case DIAMEAP_SEND_ERROR_MSG: diameap_sm->invalid_eappackets++; if (diameap_sm->invalid_eappackets == diameap_config->max_invalid_eap_packet) { diameap_sm->result_code = 4001;//DIAMETER_AUTHENTICATION_REJECTED TRACE_DEBUG(FULL,"%s Maximum permitted invalid EAP Packet reached. Diameter Authentication Rejected.",DIAMEAP_EXTENSION); } CHECK_FCT_DO(fd_msg_new_answer_from_req(fd_g_config->cnf_dict, rmsg, 0), goto s_end) ; ans = *rmsg; CHECK_FCT_DO( diameap_add_avps(diameap_sm, ans,req), { TRACE_DEBUG(INFO,"%s Adding AVPs to Diameter-EAP-Answer message failed.",DIAMEAP_EXTENSION);goto s_end;}) ; if ((non_fatal_error == TRUE) && (diameap_sm->result_code == 0)) { diameap_sm->result_code = 1001; } if (diameap_sm->result_code == 1001) { CHECK_FCT_DO( diameap_add_eap_reissued_payload(ans,req), goto s_end); } if (diameap_sm->result_code == 5004) { CHECK_FCT_DO( fd_msg_avp_add( ans , MSG_BRW_LAST_CHILD, diameap_sm->failedavp ),goto s_end ); } CHECK_FCT_DO( diameap_add_result_code(diameap_sm, ans, sess), goto s_end) ; CHECK_FCT_DO( diameap_send(rmsg), goto s_end) ; diameap_sm->state = DIAMEAP_IDLE; break; case DIAMEAP_END: break; case DIAMEAP_IDLE: break; } } diameap_free(diameap_sm); s_end: return 0; } int diameap_start_server(void) { struct disp_when when; /*create handler for sessions */ CHECK_FCT(fd_sess_handler_create(&diameap_server_reg, diameap_cli_sess_cleanup, NULL, NULL)); /* Register the callback */ memset(&when, 0, sizeof(when)); when.command = dataobj_diameap_cmd; when.app = dataobj_diameap_app; /* Register the callback for EAP Application */ CHECK_FCT(fd_disp_register(diameap_server_callback, DISP_HOW_CC, &when, NULL, &handle)); if (handle == NULL) { TRACE_DEBUG(INFO, "%sCannot register the callback !!!",DIAMEAP_EXTENSION); return 1; } return 0; } int diameap_stop_server(void) { CHECK_FCT(fd_sess_handler_destroy(&diameap_server_reg, NULL)); CHECK_FCT(fd_disp_unregister(&handle, NULL)); return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/diameap_server.h000066400000000000000000000103201333553357400266450ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #ifndef DIAMEAP_SERVER_H_ #define DIAMEAP_SERVER_H_ /* session data structure to store */ struct sess_state { int invalid_eappackets; /* Number of invalid EAP Packet received*/ eap_type currentMethod; u32 currentVendor; int currentId; int lastId; void * methodData; u8 NAKproposedMethods[251]; eap_method_state methodState; struct eap_user user; }; typedef enum { AUTHENTICATE_ONLY = 1, AUTHORIZE_ONLY = 2, AUTHORIZE_AUTHENTICATE = 3 } auth_request; struct diameap_state_machine { int invalid_eappackets; /* Number of invalid EAP Packet received*/ struct avp * lastReqEAPavp; //last EAP-Payload AVP int result_code; /*Error number for Result_code*/ struct fd_list attributes; //database attributes struct fd_list req_attributes; //attributes from DER struct fd_list ans_attributes; //attributes to be set for DEA struct avp * failedavp; /* The Failed-AVP AVP. should be update whenever a Failed AVP is encountered during authentication. */ struct eap_state_machine eap_sm; /* EAP State Machine */ auth_request auth_request_val; /*the Request Type of Auth-Request-Type AVP*/ boolean verify_authorization; /* Set to TRUE at the authorization state. Parameter used to indicate that authorization is performed.*/ boolean authSuccess; // Set to TRUE if client authenticated and authorized boolean authFailure; //set to TRUE if client is not authenticated boolean authorized; //set to TRUE if client is authorized enum { DIAMEAP_DISABLED, DIAMEAP_INITIALIZE, DIAMEAP_RECEIVED, DIAMEAP_IDLE, DIAMEAP_AUTHENTICATION_VERIFY, DIAMEAP_SEND_ERROR_MSG, DIAMEAP_SELECT_DECISION, DIAMEAP_DIAMETER_EAP_ANSWER, DIAMEAP_END, DIAMEAP_AUTHORIZATION_VERIFY, DIAMEAP_SEND_REQUEST, DIAMEAP_SEND_SUCCESS, DIAMEAP_SEND_FAILURE } state; // state of DiamEAP boolean privateUser;//TD }; struct avp_max_occurences { char * avp_attribute; int max; //-1 means no limits }; /* start server */ int diameap_start_server(void); /* stop server*/ int diameap_stop_server(void); #endif /* DIAMEAP_SERVER_H_ */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/diameap_tls.c000066400000000000000000000274651333553357400261560ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #include "diameap_tls.h" //GCRY_THREAD_OPTION_PTHREAD_IMPL; int diameap_tls_init(struct tls_config * tls_conf) { int ret; ret = gnutls_global_init(); if (ret < 0) { gnutls_perror(ret); } gnutls_global_set_log_function(diameap_tls_log); //gnutls_global_set_log_level(9); if(tls_conf->cafile ==NULL){ fprintf(stderr,"[DiamEAP extension] [EAP TLS] Missing certification authority (CA) certificates. Please provide CA configuration directive.\n"); return EINVAL; } if( !tls_conf->certfile || !tls_conf->keyfile){ fprintf(stderr,"[DiamEAP extension] [EAP TLS] Missing private Key. Please provide Cred configuration directive.\n"); return EINVAL; } ret = gnutls_certificate_allocate_credentials(&tls_conf->cert_cred); if (ret < 0) { gnutls_perror(ret); return ret; } ret = gnutls_certificate_set_x509_trust_file(tls_conf->cert_cred, tls_conf->cafile, GNUTLS_X509_FMT_PEM); if (ret < 0) { gnutls_perror(ret); return ret; } if (tls_conf->crlfile) { ret = gnutls_certificate_set_x509_crl_file(tls_conf->cert_cred, tls_conf->crlfile, GNUTLS_X509_FMT_PEM); if (ret < 0) { gnutls_perror(ret); return ret; } } ret = gnutls_certificate_set_x509_key_file(tls_conf->cert_cred, tls_conf->certfile, tls_conf->keyfile, GNUTLS_X509_FMT_PEM); if (ret < 0) { gnutls_perror(ret); return ret; } return 0; } void diameap_tls_log(int lev, const char * text) { u8 * msg; if (text == NULL) return; msg = (u8 *) strdup(text); int i; for (i = 0; (G8(text+i) != '\n') && (G8(text+i) != '\0'); i++) { } P8((msg+i),'\0'); fprintf(stderr, "[DiamEAP extension] [EAP TLS] GNUTLS log[%d] : %s\n", lev, msg); free(msg); } int diameap_tls_init_session(struct tls_config * tls_conf, struct tls_data * data) { int ret; ret = gnutls_init(&data->session, GNUTLS_SERVER); if (ret < 0) { gnutls_perror(ret); } ret = gnutls_set_default_priority(data->session); if (ret < 0) { gnutls_perror(ret); } ret = gnutls_credentials_set(data->session, GNUTLS_CRD_CERTIFICATE, tls_conf->cert_cred); if (ret < 0) { gnutls_perror(ret); } /* request client certificate if any. */ gnutls_certificate_server_set_request(data->session, GNUTLS_CERT_REQUIRE); //GNUTLS_CERT_REQUEST); gnutls_transport_set_pull_function(data->session, diameap_tls_receive); gnutls_transport_set_push_function(data->session, diameap_tls_send); gnutls_transport_set_ptr(data->session, (gnutls_transport_ptr_t) data); /* starting version 2.12, this call is not needed */ //gnutls_transport_set_lowat(data->session, 0); return ret; } ssize_t diameap_tls_receive(gnutls_transport_ptr_t ptr, void *buffer, size_t length) { struct tls_data * data = (struct tls_data *) ptr; if (data->p_length == 0) { errno = EWOULDBLOCK; return -1; } if (length > data->p_length) { length = data->p_length; } memcpy(buffer, data->tlsResp.data + (data->tlsResp.datalength - data->p_length), length); data->p_length -= length; return length; } ssize_t diameap_tls_send(gnutls_transport_ptr_t ptr, const void *buffer, size_t length) { struct tls_data * data = (struct tls_data *) ptr; data->tlsReq.data = realloc(data->tlsReq.data, data->tlsReq.datalength + length); U8COPY(data->tlsReq.data,data->tlsReq.datalength,length,(u8*)buffer); data->tlsReq.datalength += length; return length; } int diameap_tls_new(struct tls_msg * tlsmsg) { if (!tlsmsg) { return EINVAL; } tlsmsg->flags = 0x00; tlsmsg->length = 0; tlsmsg->data = NULL; tlsmsg->datalength = 0; return 0; } int diameap_tls_get_flags(struct tls_msg tlsmsg, u8 * flags) { *flags = tlsmsg.flags; return 0; } int diameap_tls_set_flags(struct tls_msg * tlsmsg, u8 flags) { if (!tlsmsg) { return EINVAL; } if ((flags & TLS_FLAG_LENGTH) == TLS_FLAG_LENGTH) { flags = flags ^ TLS_FLAG_LENGTH; } tlsmsg->flags = tlsmsg->flags | flags; return 0; } int diameap_tls_get_message_length(struct tls_msg tlsmsg, u32 * length) { if ((tlsmsg.flags & TLS_FLAG_LENGTH) == TLS_FLAG_LENGTH) { *length = tlsmsg.length; } else { *length = 0; } return 0; } int diameap_tls_set_message_length(struct tls_msg * tlsmsg, u32 length) { if (!tlsmsg) { return EINVAL; } if (length > 0) { tlsmsg->length = length; tlsmsg->flags = tlsmsg->flags | TLS_FLAG_LENGTH; } else { tlsmsg->length = 0; if ((tlsmsg->flags & TLS_FLAG_LENGTH) == TLS_FLAG_LENGTH) { tlsmsg->flags = tlsmsg->flags ^ TLS_FLAG_LENGTH; } } return 0; } int diameap_tls_get_data(struct tls_msg tlsmsg, u8** tls_data, u32 * data_length) { if (tlsmsg.datalength > 0) { *tls_data = malloc(sizeof(u8) * tlsmsg.datalength); U8COPY(*tls_data,0,tlsmsg.datalength,tlsmsg.data); *data_length = tlsmsg.datalength; } else { *tls_data = NULL; *data_length = 0; } return 0; } int diameap_tls_set_data(struct tls_msg * tlsmsg, u8* tls_data, int data_length) { if (!tlsmsg) { return EINVAL; } tlsmsg->data = malloc(sizeof(u8) * data_length); U8COPY(tlsmsg->data,0,data_length,tls_data); tlsmsg->datalength = data_length; return 0; } /* * data : returned data * eaptls_data : the TLS_Data field * length : the length of eaptls_data * flags : combination of flags et set */ int diameap_tls_new_tls_packet(u8** data, int * len, struct tls_msg tlsmsg) { int buflen, pos = 0; buflen = 1; if ((tlsmsg.flags & TLS_FLAG_LENGTH) == TLS_FLAG_LENGTH) { buflen += 4; } if (tlsmsg.datalength > 0) { buflen += tlsmsg.datalength; } *data = malloc(sizeof(u8) * buflen); memset(*data, 0, sizeof(u8) * buflen); P8(*data,tlsmsg.flags); pos++; if ((tlsmsg.flags & TLS_FLAG_LENGTH) == TLS_FLAG_LENGTH) { P32BIGE(*data+pos,tlsmsg.length); pos += 4; } if (tlsmsg.data) { U8COPY(*data,pos,tlsmsg.datalength,tlsmsg.data); } *len = buflen; return 0; } int diameap_set_tls(struct tls_msg * tlsmsg, u8 flags, u32 length, u8 *tls_data, int data_length) { diameap_tls_new(tlsmsg); diameap_tls_set_flags(tlsmsg, flags); diameap_tls_set_message_length(tlsmsg, length); diameap_tls_set_data(tlsmsg, tls_data, data_length); return 0; } int diameap_tls_parse(u8* data, int len, struct tls_msg * tlsmsg) { if (data == NULL) return EINVAL; int pos = 0; diameap_tls_new(tlsmsg); tlsmsg->flags = G8(data); pos++; if ((tlsmsg->flags & TLS_FLAG_LENGTH) == TLS_FLAG_LENGTH) { tlsmsg->length = G32BIGE(data+1); pos = pos + 4; } if (len > pos) { tlsmsg->data = malloc(sizeof(u8) * (len - pos)); U8COPY(tlsmsg->data,0,(len-pos),data+pos); tlsmsg->datalength = len - pos; } else { tlsmsg->data = NULL; tlsmsg->datalength = 0; } return 0; } void diameap_tls_dump(struct tls_msg tlsmsg) { u8 * data = NULL; u32 len; diameap_tls_get_data(tlsmsg, &data, &len); fprintf(stderr, "-------------Dump EAP-TLS msg-------------\n"); u8 flags; diameap_tls_get_flags(tlsmsg, &flags); fprintf(stderr, "\t -flags : %02x ", flags); if (flags & TLS_FLAG_LENGTH) fprintf(stderr, " TLS_FLAG_LENGTH "); if (flags & TLS_FLAG_MORE) fprintf(stderr, " TLS_FLAG_MORE "); if (flags & TLS_FLAG_START) fprintf(stderr, " TLS_FLAG_START "); fprintf(stderr, "\n"); if ((tlsmsg.flags & TLS_FLAG_LENGTH) == TLS_FLAG_LENGTH) { u32 length; diameap_tls_get_message_length(tlsmsg, &length); fprintf(stderr, "\t -TLS msg length : %u (0x%02x%02x%02x%02x)\n", length, (length >> 24) & 0xffU, (length >> 16) & 0xffU, (length >> 8) & 0xffU, length & 0xffU); } fprintf(stderr, "\t -data length : %d \n", len); /* if (len > 0) { int i; fprintf(stderr, "\t -Data : "); for (i = 0; i < len; i++) { fprintf(stderr, "%02x ", G8(data + i)); } fprintf(stderr, "\n"); } */ fprintf(stderr, "-------------End Dump EAP-TLS msg-------------\n"); free(data); } int diameap_tls_initialize(struct tls_data * data) { if (!data) { return EINVAL; } data->state = START; data->more_tosend_length = 0; data->more_toreceive = FALSE; data->handshake = FALSE; return 0; } int diameap_tls_reassemble(struct tls_msg * to, struct tls_msg from) { u8 from_flag; diameap_tls_get_flags(from, &from_flag); if (from_flag & TLS_FLAG_LENGTH) { diameap_tls_new(to); u32 length; diameap_tls_get_message_length(from, &length); diameap_tls_set_message_length(to, length); } diameap_tls_set_flags(to, from_flag); u8 * tlsRespData; u32 tlsRespDataLength; diameap_tls_get_data(from, &tlsRespData, &tlsRespDataLength); to->data = realloc(to->data, to->datalength + tlsRespDataLength); U8COPY(to->data,to->datalength,tlsRespDataLength,tlsRespData); to->datalength += tlsRespDataLength; free(tlsRespData); return 0; } int diameap_tls_copy(struct tls_msg * to, struct tls_msg from) { u8 flag; u32 length; u8 * data; diameap_tls_new(to); diameap_tls_get_flags(from, &flag); diameap_tls_set_flags(to, flag); diameap_tls_get_message_length(from, &length); diameap_tls_set_message_length(to, length); length = 0; diameap_tls_get_data(from, &data, &length); diameap_tls_set_data(to, data, length); return 0; } int diameap_tls_process_receive(struct tls_data * data) { int ret; data->p_length = data->tlsResp.datalength; ret = gnutls_handshake(data->session); if (ret < 0) { switch (ret) { case GNUTLS_E_AGAIN: break; case GNUTLS_E_INTERRUPTED: fprintf(stderr, "[DiamEAP extension] [EAP TLS] gnutls handshake : GNUTLS_E_INTERRUPTED"); break; case GNUTLS_E_GOT_APPLICATION_DATA: fprintf(stderr, "[DiamEAP extension] [EAP TLS] gnutls handshake : GNUTLS_E_GOT_APPLICATION_DATA"); break; case GNUTLS_E_WARNING_ALERT_RECEIVED: fprintf(stderr, "[DiamEAP extension] [EAP TLS] gnutls handshake : GNUTLS_E_WARNING_ALERT_RECEIVED"); break; } if (ret != GNUTLS_E_AGAIN) { gnutls_perror(ret); } } if (ret == GNUTLS_E_SUCCESS) { data->handshake = TRUE; } return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/diameap_tls.h000066400000000000000000000123051333553357400261460ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #ifndef DIAMEAP_TLS_H_ #define DIAMEAP_TLS_H_ #if defined(__GNUC__) # define GCC_DIAG_DO_PRAGMA(x) _Pragma (#x) # define GCC_DIAG_PRAGMA(x) GCC_DIAG_DO_PRAGMA(GCC diagnostic x) # if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406 /* 4.6.x */ # define GCC_DIAG_OFF(x) GCC_DIAG_PRAGMA(push) \ GCC_DIAG_PRAGMA(ignored x) # define GCC_DIAG_ON(x) GCC_DIAG_PRAGMA(pop) # else /* older */ # define GCC_DIAG_OFF(x) GCC_DIAG_PRAGMA(ignored x) # define GCC_DIAG_ON(x) GCC_DIAG_PRAGMA(warning x) # endif #else # define GCC_DIAG_OFF(x) # define GCC_DIAG_ON(x) #endif #include "diameap_defs.h" #include GCC_DIAG_OFF("-Wdeprecated-declarations") #include GCC_DIAG_ON("-Wdeprecated-declarations") #include #include #define TLS_FLAG_LENGTH 0x80 #define TLS_FLAG_MORE 0x40 #define TLS_FLAG_START 0x20 struct tls_config{ char * conffile; //certificates char * keyfile; char * certfile; char * cafile; char * crlfile; //configuration parameters boolean check_cert_cn_username; int max_size; gnutls_certificate_credentials_t cert_cred; }; struct tls_msg{ u8 flags; u32 length; u8 *data; u32 datalength; }; struct tls_data { gnutls_session_t session; enum { START, CONTINUE, SUCCESS, FAILURE } state; struct tls_msg tlsReq; int p_length; /* length of buffer still not returned to handshake */ struct tls_msg tlsResp; int more_tosend_length; /* 0 if no more fragment to send. Otherwise the length of the buff not yet sent */ boolean more_toreceive; /* TRUE if wait for more fragments. */ boolean handshake; /* TRUE if handshake terminated successful. */ }; int diameap_tls_init(struct tls_config * tls_conf ); void diameap_tls_log(int lev, const char * text); int diameap_tls_init_session(struct tls_config * tls_conf, struct tls_data * data); int diameap_tls_new(struct tls_msg * tlsmsg); int diameap_tls_get_message_length(struct tls_msg tlsmsg, u32 * length); int diameap_tls_set_message_length(struct tls_msg * tlsmsg, u32 length); int diameap_tls_get_flags(struct tls_msg tlsmsg, u8 * flags); int diameap_tls_set_flags(struct tls_msg * tlsmsg, u8 flags); int diameap_tls_get_data(struct tls_msg tlsmsg, u8** tls_data, u32 * data_length); int diameap_tls_set_data(struct tls_msg * tlsmsg, u8* tls_data, int data_length); int diameap_tls_parse(u8* data, int length, struct tls_msg * tlsmsg); int diameap_tls_new_tls_packet(u8** data, int * len, struct tls_msg tlsmsg); int diameap_set_tls(struct tls_msg * tlsmsg, u8 flags, u32 length,u8 *tls_data, int data_length); void diameap_tls_dump(struct tls_msg tlsmsg); int diameap_tls_initialize(struct tls_data * data); int diameap_tls_reassemble(struct tls_msg * to,struct tls_msg from); int diameap_tls_copy(struct tls_msg * to,struct tls_msg from); int diameap_tls_process_receive(struct tls_data * data); ssize_t diameap_tls_receive(gnutls_transport_ptr_t data , void *buffer, size_t length); ssize_t diameap_tls_send(gnutls_transport_ptr_t data , const void *buffer, size_t length); #endif /* DIAMEAP_TLS_H_ */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/diameap_user.c000066400000000000000000000113701333553357400263160ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #include "libdiameap.h" int diameap_user_get_userid(struct eap_user *user, u8* userid) { TRACE_ENTRY("%p %p",user,userid); if (user->userid == NULL) return EINVAL; userid = user->userid; return 0; } int diameap_user_get_password(struct eap_user *user, u8* password,u16 * passwordlength) { TRACE_ENTRY("%p %p",user,password); if (user->password == NULL) return EINVAL; password = user->password; *passwordlength = user->passwordLength; return 0; } int diameap_user_get_passwordlength(struct eap_user *user, u16 * passwordlength) { TRACE_ENTRY("%p %p",user,passwordlength); if (user->password == NULL) return EINVAL; *passwordlength = user->passwordLength; return 0; } int diameap_user_set_password(struct eap_user * user, u8 * password, u16 passwordLength) { TRACE_ENTRY("%p %p %hu",user,password,passwordLength); if (password == NULL) return EINVAL; if (passwordLength < 1) return EINVAL; user->password = password; user->passwordLength = passwordLength; return 0; } int diameap_user_set_userid(struct eap_user * user, u8 * userid, u16 useridLength) { TRACE_ENTRY("%p %p %hu",user,userid,useridLength); if (userid == NULL) return EINVAL; if (useridLength < 1) return EINVAL; user->userid = userid; user->useridLength = useridLength; return 0; } int diameap_user_get_methodid(struct eap_user *user, int * methodid) { TRACE_ENTRY("%p %p",user,methodid); if (user->password == NULL) return EINVAL; *methodid = user->methodId; return 0; } int diameap_user_set_methodid(struct eap_user * user, int methodId) { TRACE_ENTRY("%p %d",user,methodId); if (user->password == NULL) return EINVAL; if (methodId < 0) return EINVAL; user->methodId = methodId; return 0; } boolean diameap_user_issuccess(struct eap_user *user) { TRACE_ENTRY("%p",user); if (user->password == NULL) return FALSE; return user->success; } int diameap_user_set_success(struct eap_user * user) { TRACE_ENTRY("%p",user); if (user->password == NULL) return EINVAL; user->success = TRUE; return 0; } int diameap_user_get_eap_method(struct eap_user *user, int id, struct eap_method *method) { TRACE_ENTRY("%p %d %p",user,id,method); if (sizeof(user->methods) >= (id - 1)) *method = user->methods[id]; return 0; } int diameap_user_set_eap_method(struct eap_user * user, int id, struct eap_method * method) { TRACE_ENTRY("%p %d %p",user,id,method); if (user->password == NULL) return EINVAL; if (sizeof(user->methods) < (id - 1)) return EINVAL; user->methods[id].vendor = method->vendor; user->methods[id].method = method->method; return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/diameap_user.h000066400000000000000000000077471333553357400263400ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #ifndef DIAMEAP_USER_H_ #define DIAMEAP_USER_H_ #define MAXMETHODS 8 /*Maximum number of allowed methods */ #define MAXPROPOSEDMETHODS 8 /*Maximum number of allowed proposed methods */ #define VENDOR_IETF 0 /*EAP User structure */ struct eap_user { int id; /*user's identifier*/ u8 *userid; /*user's identity*/ u16 useridLength; /*User's identity length*/ u8 *password; /*user's password*/ u16 passwordLength; /*Length of password*/ int methodId; /*Current method Id*/ struct eap_method { u32 vendor; eap_type method; } methods[MAXMETHODS]; /*used method for authentication*/ struct proposed_eap_method { u32 vendor; eap_type method; } proposedmethods[MAXPROPOSEDMETHODS]; /* methods proposed throw NAK response or EXPANDED NAK*/ int pmethods; /*Number of accepted methods from peer's proposed methods*/ eap_type proposed_eap_method; /* Proposed EAP Method*/ u32 proposed_eap_method_vendor; boolean success; /* Set to TRUE if User is authenticated successfully */ }; boolean check_user_identity; int diameap_user_get_password(struct eap_user *user, u8 * password,u16 *length); int diameap_user_get_userid(struct eap_user *user, u8 * userid); int diameap_user_set_password(struct eap_user * user, u8 * password, u16 Length); int diameap_user_set_userid(struct eap_user * user, u8 * userid, u16 Length); int diameap_user_get_methodid(struct eap_user *user,int *methodId); int diameap_user_set_methodid(struct eap_user * user, int methodId); boolean diameap_user_issuccess(struct eap_user *user); int diameap_user_set_success(struct eap_user * user); int diameap_user_get_eap_method(struct eap_user *user, int id, struct eap_method * eapmethod); int diameap_user_set_eap_method(struct eap_user * user, int id, struct eap_method * method); #endif /* DIAMEAP_USER_H_ */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/libcrypt.c000066400000000000000000000051431333553357400255110ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #include "libcrypt.h" int md5hash(void * buffer, int length, void * digest){ gcry_md_hd_t md5_ctx; gcry_md_open ( &md5_ctx, GCRY_MD_MD5, 0); if(!gcry_md_is_enabled(md5_ctx, GCRY_MD_MD5)){ fprintf(stderr,"[libcrypt] unable to initiate MD5 hash algorithm.\n"); } gcry_md_write(md5_ctx,buffer,length); memcpy (digest, gcry_md_read (md5_ctx, 0), 16); gcry_md_close (md5_ctx); return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/libcrypt.h000066400000000000000000000047611333553357400255230ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #ifndef LIBCRYPT_H_ #define LIBCRYPT_H_ /* EAP-TLS*/ #include "diameap_tls.h" GCC_DIAG_OFF("-Wdeprecated-declarations") #include GCC_DIAG_ON("-Wdeprecated-declarations") #include int md5hash(void * buffer, int length, void * digest); #endif /* LIBCRYPT_H_ */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/libdiameap.h000066400000000000000000000142361333553357400257600ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #ifndef LIBDIAMEAP_H_ #define LIBDIAMEAP_H_ #include #define DIAMEAP_EXTENSION "[DiamEAP extension] " #include "diameap_defs.h" #include "diameap_eappacket.h" #include "diameap_user.h" #include "diameap_mysql.h" #include #include /* authentication and authorization attributes */ struct auth_attribute { struct fd_list chain; char * attrib; char * op; char * value; }; struct avp_attribute { struct fd_list chain; char * attrib; union avp_value value; int tofree; }; /************************************************/ /* EAP Methods plugins */ /************************************************/ /* The register functions of an EAP method */ struct register_plugin { char * configure; char * init; char * initPickUp; char * buildReq; char * isDone; char * process; char * check; char * getTimeout; char * getKey; char * unregister; char * datafree; }; struct eap_state_machine; /* List of plugins to load ( only EAP methods declared in the configuration file will be loaded) */ struct plugin { struct fd_list chain; /* link in the list */ u32 vendor; /* vendor*/ const char *methodname; /* name of the EAP method*/ eap_type methodtype; /* type number of the EAP method */ char *pluginfile; /* plugin filename */ char *conffile; /* optional configuration file name for the method */ void *handler; /* object returned by dlopen() */ int (*eap_method_configure)(char * configfile); /* (Optional) address of the eap_method_configure method */ int (*eap_method_init)(struct eap_state_machine *smd); /* address of the eap_method_init method */ int (*eap_method_initPickUp)(struct eap_state_machine *smd); /* address of the eap_method_initPickUp method */ int (*eap_method_buildReq)(struct eap_state_machine *smd, u8 identifier,struct eap_packet * eapPacket); /* address of the eap_method_buildReq method */ int (*eap_method_getTimeout)(struct eap_state_machine *smd, int * timeout); /* address of the eap_method_getTimeout method */ boolean (*eap_method_check)(struct eap_state_machine *smd, struct eap_packet * eapRespData); /* address of the eap_method_check method */ int (*eap_method_process)(struct eap_state_machine *smd, struct eap_packet * eapRespData); /* address of the eap_method_process method */ boolean (*eap_method_isDone)(struct eap_state_machine *smd); /* address of the eap_method_isDone method */ int (*eap_method_getKey)(struct eap_state_machine *smd, u8 ** msk,int *msklength, u8 ** emsk,int *emsklength); /* address of the eap_method_getKey method */ void (*eap_method_unregister)(void); /* (Optional) address of the eap_method_unregister method */ void (*eap_method_free)(void *); /* (Optional) address of the eap_method_datafree method */ }; /************************************************/ /* EAP State Machine */ /************************************************/ /* EAP Policy Decision */ typedef enum { DECISION_FAILURE = 0, DECISION_SUCCESS = 1, DECISION_CONTINUE = 2 } decision; typedef enum { EAP_M_END, EAP_M_CONTINUE, EAP_M_PROPOSED } eap_method_state; /* EAP Backend Authenticator State Machine (RFC4137) */ /* Most of variables are described in the part 6 of the RFC 4137 */ /* */ struct eap_state_machine { /*Local state Machine Variables*/ /* Long-Term (Maintained between Packets) */ eap_type currentMethod; u32 currentVendor; int currentId; int lastId; void * methodData; struct plugin *selectedMethod; u8 NAKproposedMethods[251]; eap_method_state methodState; struct eap_user user; /* Short-Term (Not Maintained between exchanged Diameter EAP messages)*/ boolean rxResp; int respId; eap_type respMethod; int respVendorMethod; u32 respVendor; decision sm_decision; enum { EAP_INITIALIZE, EAP_PICK_UP_METHOD, EAP_IDLE, EAP_RECEIVED, EAP_SEND_REQUEST, EAP_INTEGRITY_CHECK, EAP_METHOD_REQUEST, EAP_METHOD_RESPONSE, EAP_PROPOSE_METHOD, EAP_NAK, EAP_SELECT_ACTION, EAP_END, EAP_DISCARD } eap_state; }; #endif /* LIBDIAMEAP_H_ */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/plugins.h000066400000000000000000000100021333553357400253350ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #ifndef _PLUGINS_H #define _PLUGINS_H #include "libdiameap.h" #include "libcrypt.h" /* Macro that define the register functions of an EAP method */ #define REGISTER_METHOD(_methodName, _configFunction, _initFunction, _initPickUpFunction, _buildReqFunction, _getTimeoutFunction, _checkFunction, _processFunction, _isDoneFunction, _getKeyFunction, _unregisterFunction, _datafreeFunction ) \ static struct register_plugin *registerplugin = NULL; \ static int isregistered = 0; \ int diameap_plugin_register() { \ if (!isregistered){ \ registerplugin = malloc (sizeof(struct register_plugin)); \ if(registerplugin==NULL) \ fprintf(stderr,"[DiamEAP extension] Error in registering plug-in\t%s\n",strerror(errno)); \ memset(registerplugin, 0, sizeof(struct register_plugin)); \ if(_configFunction) registerplugin->configure=_configFunction; \ if(_initFunction) registerplugin->init=_initFunction; \ if(_initPickUpFunction) registerplugin->initPickUp=_initPickUpFunction; \ if(_buildReqFunction) registerplugin->buildReq=_buildReqFunction; \ if(_getTimeoutFunction) registerplugin->getTimeout=_getTimeoutFunction; \ if(_checkFunction) registerplugin->check=_checkFunction; \ if(_processFunction) registerplugin->process=_processFunction; \ if(_isDoneFunction) registerplugin->isDone=_isDoneFunction; \ if(_getKeyFunction) registerplugin->getKey=_getKeyFunction; \ if(_unregisterFunction) registerplugin->unregister=_unregisterFunction; \ if(_datafreeFunction) registerplugin->datafree=_datafreeFunction; \ isregistered++; \ }else{ \ fprintf(stderr, "Cannot register the " _methodName " plugin twice\n"); \ return EINVAL; \ } \ return 0; \ } \ int diameap_plugin_objects(struct register_plugin ** rplugin){ \ *rplugin=registerplugin; \ return 0; \ } \ #endif /*_PLUGINS_H*/ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/plugins/000077500000000000000000000000001333553357400251735ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/plugins/CMakeLists.txt000066400000000000000000000021521333553357400277330ustar00rootroot00000000000000PROJECT("EAP Methods Plugins" C) MACRO(EAP_ADD_METHOD METHNAME) ADD_LIBRARY(${METHNAME} MODULE ${ARGN}) SET_TARGET_PROPERTIES(${METHNAME} PROPERTIES PREFIX "" ) SET_TARGET_PROPERTIES(${METHNAME} PROPERTIES SUFFIX ".emp" ) INSTALL(TARGETS ${METHNAME} LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-eap-server) ENDMACRO(EAP_ADD_METHOD) # Use the macro FD_EAP_PLUGIN(extmacroname subdir descr default) to # add a new extension subdirectory. MACRO(FD_EAP_PLUGIN EXTSUBDIR EXTDESCR EXTDEFAULT) STRING(TOUPPER ${EXTSUBDIR} EXTMACRONAME) IF (NOT ALL_EXTENSIONS) OPTION(BUILD_${EXTMACRONAME} ${EXTDESCR} ${EXTDEFAULT}) ENDIF (NOT ALL_EXTENSIONS) IF (BUILD_${EXTMACRONAME} OR ALL_EXTENSIONS) ADD_SUBDIRECTORY(${EXTSUBDIR}) ENDIF (BUILD_${EXTMACRONAME} OR ALL_EXTENSIONS) ENDMACRO(FD_EAP_PLUGIN) ########################### # EAP Methods Plugins Section # EAP Identity plugin FD_EAP_PLUGIN(eap_identity "Build EAP Identity Plugin " ON) # EAP MD5 plugin FD_EAP_PLUGIN(eap_md5 "Build EAP-MD5 Plugin " OFF) # EAP TLS plugin FD_EAP_PLUGIN(eap_tls "Build EAP-TLS Plugin " OFF) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/plugins/eap_identity/000077500000000000000000000000001333553357400276515ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/plugins/eap_identity/CMakeLists.txt000066400000000000000000000001441333553357400324100ustar00rootroot00000000000000# EAP Identity plugin PROJECT("EAP Identity Plugin" C) EAP_ADD_METHOD(eap_identity eap_identity.c) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/plugins/eap_identity/eap_identity.c000066400000000000000000000135031333553357400324750ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #include "../../plugins.h" struct identity_data { enum { IDENTITY_CONTINUE, IDENTITY_SUCCESS, IDENTITY_FAILURE } state; }; int identity_init(struct eap_state_machine *smd); int identity_initPickUp(struct eap_state_machine *smd); int identity_buildReq(struct eap_state_machine *smd, u8 identity, struct eap_packet * eapPacket); boolean identity_check(struct eap_state_machine *smd, struct eap_packet *eapRespData); int identity_process(struct eap_state_machine *smd, struct eap_packet *eapRespData); boolean identity_isDone(struct eap_state_machine *smd); void identity_free(void * data); REGISTER_METHOD("identity", NULL, "identity_init", "identity_initPickUp", "identity_buildReq", NULL, "identity_check", "identity_process", "identity_isDone", NULL, NULL, "identity_free"); int identity_init(struct eap_state_machine *smd) { struct identity_data *data = NULL; CHECK_MALLOC(data = malloc(sizeof(struct identity_data))); memset(data, 0, sizeof(struct identity_data)); data->state = IDENTITY_CONTINUE; smd->methodData = (struct identity_data*) data; return 0; } int identity_initPickUp(struct eap_state_machine *smd) { struct identity_data *data = NULL; CHECK_MALLOC(data = malloc(sizeof(struct identity_data))); memset(data, 0, sizeof(struct identity_data)); data->state = IDENTITY_CONTINUE; smd->methodData = (struct identity_data*) data; return 0; } int identity_buildReq(struct eap_state_machine *smd, u8 identity, struct eap_packet * eapPacket) { CHECK_FCT(diameap_eap_new(EAP_REQUEST, identity, TYPE_IDENTITY, NULL, 0,eapPacket)); return 0; } boolean identity_check(struct eap_state_machine *smd, struct eap_packet *eapPacket) { if (eapPacket->data == NULL) { TRACE_DEBUG(INFO,"%s[EAP Identity plugin] Empty EAP packet received.",DIAMEAP_EXTENSION); return FALSE; } eap_type type; if(diameap_eap_get_type(eapPacket,&type)!=0){ return FALSE; } if (type == TYPE_IDENTITY) { u16 length; CHECK_FCT(diameap_eap_get_length(eapPacket,&length)); if ((int)length < 6) { TRACE_DEBUG(INFO,"%s[EAP Identity plugin] Incorrect EAP packet received (length = %d ).",DIAMEAP_EXTENSION,length); return FALSE; } if ((int)length > 1020) { TRACE_DEBUG(INFO,"%s[EAP Identity plugin] Incorrect EAP packet received (length = %d ).",DIAMEAP_EXTENSION,length); return FALSE; } return TRUE; } return FALSE; } int identity_process(struct eap_state_machine *smd, struct eap_packet *eapRespData) { struct identity_data * data; u16 length; char * user; u8 * Respdata; int len,ret; CHECK_FCT(diameap_eap_get_length(eapRespData,&length)); data = (struct identity_data*) smd->methodData; CHECK_MALLOC(user=malloc(sizeof(char)*((int)length-4))); diameap_eap_get_data(eapRespData,&Respdata,&len); if(Respdata==NULL){ data->state = IDENTITY_FAILURE; goto end; } U8COPY((u8 *)user,0,len,Respdata); user[length-5]='\0'; if(check_user_identity == FALSE){ ret=diameap_get_eap_user(&(smd->user),"Default User"); CHECK_MALLOC_DO(smd->user.userid=realloc(smd->user.userid,strlen(user)+1),{ret = 1; goto next;}); memcpy(smd->user.userid,user,strlen(user)+1); smd->user.useridLength = strlen(user); } else { ret=diameap_get_eap_user(&(smd->user),user); } next: if(ret==0) { smd->user.methodId = -1; data->state = IDENTITY_SUCCESS; }else{ data->state = IDENTITY_FAILURE; } end: smd->methodData = data; free(user); user=NULL; return 0; } boolean identity_isDone(struct eap_state_machine *smd) { struct identity_data *data; data = (struct identity_data*) smd->methodData; if (data->state != IDENTITY_CONTINUE) return TRUE; else return FALSE; } void identity_free(void * data) { free(data); data=NULL; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/plugins/eap_md5/000077500000000000000000000000001333553357400265055ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/plugins/eap_md5/CMakeLists.txt000066400000000000000000000001201333553357400312360ustar00rootroot00000000000000# EAP MD5 Plugin PROJECT("EAP MD5 Plugin" C) EAP_ADD_METHOD(eap_md5 eap_md5.c) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/plugins/eap_md5/eap_md5.c000066400000000000000000000142701333553357400301670ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #include "../../plugins.h" GCC_DIAG_OFF("-Wdeprecated-declarations") #include GCC_DIAG_ON("-Wdeprecated-declarations") #define CHALLENGE_LEN 16 struct eap_md5_data { enum { EAP_MD5_CONTINUE, EAP_MD5_SUCCESS, EAP_MD5_FAILURE } state; u8 * challenge; }; int eap_md5_configure(char * configfile); int eap_md5_init(struct eap_state_machine *smd); int eap_md5_initPickUp(struct eap_state_machine *smd); int eap_md5_buildReq(struct eap_state_machine *smd, u8 eap_md5, struct eap_packet * eapPacket); boolean eap_md5_check(struct eap_state_machine *smd, struct eap_packet *eapRespData); int eap_md5_process(struct eap_state_machine *smd, struct eap_packet *eapRespData); boolean eap_md5_isDone(struct eap_state_machine *smd); void eap_md5_free(void * data); REGISTER_METHOD("eap_md5", "eap_md5_configure", "eap_md5_init", "eap_md5_initPickUp", "eap_md5_buildReq", NULL, "eap_md5_check", "eap_md5_process", "eap_md5_isDone", NULL, NULL, "eap_md5_free") ; int eap_md5_configure(char * configfile) { gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); return 0; } int eap_md5_init(struct eap_state_machine *smd) { struct eap_md5_data *data = NULL; CHECK_MALLOC(data = malloc(sizeof(struct eap_md5_data))); memset(data, 0, sizeof(struct eap_md5_data)); data->state = EAP_MD5_CONTINUE; data->challenge = NULL; smd->methodData = (struct eap_md5_data*) data; return 0; } int eap_md5_buildReq(struct eap_state_machine *smd, u8 id, struct eap_packet * eapPacket) { struct eap_md5_data * data; u8 *payload, *challenge; data = (struct eap_md5_data *) smd->methodData; CHECK_MALLOC( challenge=malloc(sizeof(u8)*CHALLENGE_LEN)); CHECK_MALLOC( payload=malloc(sizeof(u8)*(CHALLENGE_LEN+1))); memset(payload, 0, sizeof(u8) * (CHALLENGE_LEN + 1)); gcry_create_nonce(challenge,CHALLENGE_LEN); U8COPY(payload, 1, CHALLENGE_LEN, challenge); payload[0] = (u8) CHALLENGE_LEN; CHECK_FCT(diameap_eap_new(EAP_REQUEST, id, TYPE_EAP_MD5, payload, CHALLENGE_LEN + 1,eapPacket)); CHECK_MALLOC(data->challenge=realloc(data->challenge,sizeof(u8)*CHALLENGE_LEN)); U8COPY(data->challenge,0,CHALLENGE_LEN,challenge); smd->methodData = data; free(challenge); challenge=NULL; free(payload); payload=NULL; return 0; } boolean eap_md5_check(struct eap_state_machine *smd, struct eap_packet *eapRespData) { eap_type type; if(diameap_eap_get_type(eapRespData,&type)!=0){ return FALSE; } if (type == TYPE_EAP_MD5) { u16 length; CHECK_FCT(diameap_eap_get_length(eapRespData,&length)); if ((int) length < 6) { TRACE_DEBUG(INFO,"%s[EAP MD5 plugin] Incorrect EAP packet received (length = %d ).",DIAMEAP_EXTENSION,length); return FALSE; } return TRUE; } return FALSE; } int eap_md5_process(struct eap_state_machine *smd, struct eap_packet *eapRespData) { struct eap_md5_data * data; int wordlen = 0, i = 0; u8 * word, *hash, id; data = (struct eap_md5_data*) smd->methodData; wordlen = 1 + smd->user.passwordLength + CHALLENGE_LEN; CHECK_MALLOC(word = malloc(sizeof(u8)*wordlen)); memset(word, 0, sizeof(u8) * wordlen); CHECK_FCT(diameap_eap_get_identifier(eapRespData,&id)); *word = id; U8COPY(word,1,smd->user.passwordLength,smd->user.password); U8COPY(word,1+smd->user.passwordLength,CHALLENGE_LEN,data->challenge); CHECK_MALLOC(hash = malloc(sizeof(u8)*16)); md5hash(word, wordlen, hash); for (i = 0; i < CHALLENGE_LEN; i++) { if (G8(hash + i) != G8(eapRespData->data + 6 + i)) { data->state = EAP_MD5_FAILURE; } } if (data->state != EAP_MD5_FAILURE) { data->state = EAP_MD5_SUCCESS; smd->user.success = TRUE; } smd->methodData = data; free(hash); hash=NULL; free(word); word=NULL; return 0; } boolean eap_md5_isDone(struct eap_state_machine *smd) { struct eap_md5_data *data; data = (struct eap_md5_data*) smd->methodData; if (data->state != EAP_MD5_CONTINUE) { return TRUE; } return FALSE; } void eap_md5_free(void * mdata) { struct eap_md5_data *data; data = (struct eap_md5_data*) mdata; free(data->challenge); data->challenge=NULL; free(data); data=NULL; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/plugins/eap_tls/000077500000000000000000000000001333553357400266225ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/plugins/eap_tls/CMakeLists.txt000066400000000000000000000006331333553357400313640ustar00rootroot00000000000000# The EAP-TLS Plugin PROJECT("EAP-TLS Plugin" C) # Parser for the configuration file BISON_FILE(eaptls.y) FLEX_FILE(eaptls.l) SET_SOURCE_FILES_PROPERTIES(lex.eaptls.c eaptls.tab.c PROPERTIES COMPILE_FLAGS "-I \"${CMAKE_CURRENT_SOURCE_DIR}\"") EAP_ADD_METHOD(eap_tls eap_tls.c eap_tls.h lex.eaptls.c eaptls.tab.c eaptls.tab.h ) TARGET_LINK_LIBRARIES(eap_tls ${GNUTLS_LIBRARIES}) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/plugins/eap_tls/eap_tls.c000066400000000000000000000275051333553357400304260ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #include "eap_tls.h" int eap_tls_configure(char * configfile); int eap_tls_init(struct eap_state_machine *smd); int eap_tls_initPickUp(struct eap_state_machine *smd); int eap_tls_buildReq(struct eap_state_machine *smd, u8 eap_md5, struct eap_packet * eapPacket); int eap_tls_getTimeout(struct eap_state_machine *smd, int * timeout); boolean eap_tls_check(struct eap_state_machine *smd, struct eap_packet *eapRespData); int eap_tls_process(struct eap_state_machine *smd, struct eap_packet *eapRespData); boolean eap_tls_isDone(struct eap_state_machine *smd); int eap_tls_getKey(struct eap_state_machine *smd, u8** msk, int * msklen, u8** emsk, int * emsklen); void eap_tls_unregister(void); void eap_tls_free(void * data); REGISTER_METHOD("eap_tls", "eap_tls_configure", "eap_tls_init", "eap_tls_initPickUp", "eap_tls_buildReq", "eap_tls_getTimeout", "eap_tls_check", "eap_tls_process", "eap_tls_isDone", "eap_tls_getKey", "eap_tls_unregister", "eap_tls_free") ; int eap_tls_configure(char * configfile) { int ret; extern FILE * eaptlsin; if (configfile) { tls_global_conf.conffile = configfile; } tls_global_conf.certfile = NULL; tls_global_conf.keyfile = NULL; tls_global_conf.cafile = NULL; tls_global_conf.crlfile = NULL; tls_global_conf.check_cert_cn_username = FALSE; /*Parse EAP TLS configuration file */ eaptlsin = fopen(tls_global_conf.conffile, "r"); if (!eaptlsin) { TRACE_DEBUG(INFO,"%s[EAP TLS plugin] Unable to open configuration file %s for reading: %s",DIAMEAP_EXTENSION, tls_global_conf.conffile, strerror(errno)); return errno; } /* call yacc parser */ CHECK_FCT(eaptlsparse(&tls_global_conf)); tls_global_conf.max_size = 64*1024 /* As per RFC 5216 recommendation */; /* Initializing GnuTLS library */ ret = diameap_tls_init(&tls_global_conf); return ret; } int eap_tls_init(struct eap_state_machine *smd) { int ret; struct tls_data *data = NULL; CHECK_MALLOC(data = malloc(sizeof(struct tls_data))); memset(data, 0, sizeof(struct tls_data)); CHECK_FCT(diameap_tls_initialize(data)); ret = diameap_tls_init_session(&tls_global_conf, data); smd->methodData = (struct tls_data*) data; if (ret < 0) { return ret; } return 0; } int eap_tls_initPickUp(struct eap_state_machine *smd) { return 0; } int eap_tls_buildReq(struct eap_state_machine *smd, u8 id, struct eap_packet * eapPacket) { struct tls_data * data; data = (struct tls_data *) smd->methodData; if (data->more_toreceive == TRUE) { CHECK_FCT(diameap_eap_tls_buildReq_ack(id,eapPacket)); return 0; } if (data->state == START) { CHECK_FCT(diameap_eap_tls_buildReq_start(id,eapPacket)); return 0; } if (data->state == CONTINUE) { diameap_eap_tls_buildReq_data(data, id, eapPacket); smd->methodData = (struct tls_data*) data; return 0; } return 0; } int eap_tls_getTimeout(struct eap_state_machine *smd, int * timeout) { return 0; } boolean eap_tls_check(struct eap_state_machine *smd, struct eap_packet *eapRespData) { eap_type type; if(diameap_eap_get_type(eapRespData,&type)!=0){ goto cf; } if (type == TYPE_EAP_TLS) { return TRUE; } cf: TRACE_DEBUG(INFO,"%s[EAP TLS plugin] EAP-TLS check failed: Received EAP packet with different EAP-Type (Type = %d)",DIAMEAP_EXTENSION, type); return FALSE; } int eap_tls_process(struct eap_state_machine *smd, struct eap_packet *eapRespData) { struct tls_data * data; data = (struct tls_data *) smd->methodData; struct tls_msg tlsmsg; CHECK_FCT(diameap_eap_tls_parse(&tlsmsg,eapRespData)); if ((tlsmsg.datalength == 0)) { if (data->more_tosend_length > 0) { //ACK and more to send return 0; } else { //Success if (data->handshake == TRUE) { data->state = SUCCESS; smd->user.success = TRUE; if(tls_global_conf.check_cert_cn_username == TRUE){ unsigned int list_size; const gnutls_datum_t * list = gnutls_certificate_get_peers (data->session, &list_size); if(list_size<1){ goto failure; } gnutls_x509_crt_t cert; CHECK_GNUTLS_DO(gnutls_x509_crt_init(&cert),{ TRACE_DEBUG(NONE,"%s[EAP TLS plugin] [GnuTLS] error in initialization crt init",DIAMEAP_EXTENSION); goto failure;}); CHECK_GNUTLS_DO(gnutls_x509_crt_import(cert, &list[0], GNUTLS_X509_FMT_DER), { TRACE_DEBUG(NONE,"%s[EAP TLS plugin] [GnuTLS] error parsing certificate",DIAMEAP_EXTENSION); goto failure;}); void * buff; size_t size_buffer; int ret; ret = gnutls_x509_crt_get_dn_by_oid(cert,GNUTLS_OID_X520_COMMON_NAME,0,0,NULL,&size_buffer); if( ret != GNUTLS_E_SHORT_MEMORY_BUFFER){ CHECK_GNUTLS_DO(ret,{ TRACE_DEBUG(NONE,"%s[EAP TLS plugin] [GnuTLS] error get dn by oid",DIAMEAP_EXTENSION); goto failure;}); } CHECK_MALLOC_DO(buff=malloc(size_buffer), goto failure); CHECK_GNUTLS_DO(gnutls_x509_crt_get_dn_by_oid(cert,GNUTLS_OID_X520_COMMON_NAME,0,0,buff,&size_buffer),{ TRACE_DEBUG(NONE,"%s[EAP TLS plugin] [GnuTLS] error get dn by oid",DIAMEAP_EXTENSION); goto failure;}); if(strncmp((char *)smd->user.userid,buff,smd->user.useridLength)!=0){ goto failure; } gnutls_x509_crt_deinit(cert); goto next; failure: TRACE_DEBUG(NONE,"%s[EAP TLS plugin] Checking failed. certificate's CN does not match User_Name AVP value.",DIAMEAP_EXTENSION); data->state = FAILURE; smd->user.success = FALSE; gnutls_x509_crt_deinit(cert); } next: smd->methodData = (struct tls_data*) data; return 0; } return 0; } } if (data->more_toreceive == TRUE) { //reassemble received fragment to TLS Response CHECK_FCT(diameap_tls_reassemble(&data->tlsResp,tlsmsg)); } else { //receive the first fragment or a complete TLS message CHECK_FCT(diameap_tls_copy(&data->tlsResp,tlsmsg)); } if (tlsmsg.flags & TLS_FLAG_MORE) { data->more_toreceive = TRUE; smd->methodData = (struct tls_data*) data; return 0; } else { //last fragment received data->more_toreceive = FALSE; } data->state = CONTINUE; diameap_tls_process_receive(data); if (data->state == SUCCESS) { smd->user.success = TRUE; } smd->methodData = (struct tls_data*) data; return 0; } boolean eap_tls_isDone(struct eap_state_machine *smd) { struct tls_data * data; data = (struct tls_data *) smd->methodData; if (data->state == CONTINUE || data->state == START) { return FALSE; } return TRUE; } int eap_tls_getKey(struct eap_state_machine *smd, u8 ** msk, int *msklen, u8 ** emsk, int *emsklen) { struct tls_data * data; int len = emsk ? 128 : 64; data = (struct tls_data *) smd->methodData; *msk = malloc(len); if (gnutls_prf(data->session, strlen("client EAP encryption"), "client EAP encryption", 0, 0, NULL, len, (char *) *msk) != GNUTLS_E_SUCCESS) { free(*msk); *msk = NULL; *msklen = 0; return 1; } else { *msklen = 64; } if (emsk) { *emsk = malloc(64); memcpy(*emsk, (*msk)+64, 64); memset((*msk)+64, 0, 64); *emsklen = 64; } return 0; } void eap_tls_unregister(void) { // } void eap_tls_free(void * mdata) { struct tls_data *data; data = (struct tls_data*) mdata; gnutls_deinit(data->session); if(data->tlsReq.data){ free(data->tlsReq.data); data->tlsReq.data=NULL; } if(data->tlsResp.data){ free(data->tlsResp.data); data->tlsResp.data=NULL; } free(data); data=NULL; } //send TLS ACK Request (empty TLS msg) int diameap_eap_tls_buildReq_ack(u8 id, struct eap_packet * eapPacket) { u8* payload; struct tls_msg tlsmsg; int len; CHECK_FCT(diameap_tls_new(&tlsmsg)); CHECK_FCT(diameap_tls_new_tls_packet(&payload,&len,tlsmsg)); CHECK_FCT(diameap_eap_new(EAP_REQUEST,id,TYPE_EAP_TLS,payload,len,eapPacket)); return 0; } // parse EAP TLS msg int diameap_eap_tls_parse(struct tls_msg * tlsmsg, struct eap_packet *eapPacket) { u8 *datatls; int len; //initialize a new empty EAP TLS msg diameap_tls_new(tlsmsg); //retrieve the data field from EAP Packet diameap_eap_get_data(eapPacket, &datatls, &len); //parse EAP TLS msg diameap_tls_parse(datatls, len, tlsmsg); return 0; } int diameap_eap_tls_buildReq_start(u8 id, struct eap_packet * eapPacket) { u8* payload; struct tls_msg tlsmsg; int len; CHECK_FCT(diameap_tls_new(&tlsmsg)); CHECK_FCT(diameap_tls_set_flags(&tlsmsg,TLS_FLAG_START)); CHECK_FCT(diameap_tls_new_tls_packet(&payload,&len,tlsmsg)); CHECK_FCT(diameap_eap_new(EAP_REQUEST,id,TYPE_EAP_TLS,payload,len,eapPacket)); return 0; } int diameap_eap_tls_buildReq_data(struct tls_data * data, int id, struct eap_packet * eapPacket) { struct tls_msg tlsmsg; u8* datatosend; u8 * eaptls_data; int length = 0; diameap_tls_new(&tlsmsg); if (data->more_tosend_length == 0) { //First fragment of message or the only fragment of message data->more_tosend_length = data->tlsReq.datalength; } if (data->more_tosend_length > tls_global_conf.max_size) { //New fragment of message. Is not the last fragment. length = tls_global_conf.max_size; CHECK_FCT(diameap_tls_set_flags(&tlsmsg,TLS_FLAG_MORE)); if (data->more_tosend_length == data->tlsReq.datalength) { //The first fragment of message CHECK_FCT(diameap_tls_set_message_length(&tlsmsg,data->tlsReq.datalength));//set L flag and length value } } else { //The last fragment or the only fragment. length = data->more_tosend_length; } datatosend = malloc(sizeof(u8) * length); U8COPY(datatosend,0,length,data->tlsReq.data+(data->tlsReq.datalength-data->more_tosend_length)); data->more_tosend_length -= length; CHECK_FCT(diameap_tls_set_data(&tlsmsg,datatosend,length)); CHECK_FCT(diameap_tls_new_tls_packet(&eaptls_data,&length,tlsmsg)); CHECK_FCT(diameap_eap_new(EAP_REQUEST,id,TYPE_EAP_TLS,eaptls_data,length,eapPacket)); if (data->more_tosend_length == 0) { diameap_tls_new(&data->tlsReq); } return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/plugins/eap_tls/eap_tls.h000066400000000000000000000053001333553357400304200ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University, and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ #ifndef EAP_TLS_H_ #define EAP_TLS_H_ #include "../../plugins.h" struct tls_config tls_global_conf; int diameap_eap_tls_buildReq_ack(u8 id, struct eap_packet * eapPacket); int diameap_eap_tls_buildReq_start(u8 id, struct eap_packet * eapPacket); int diameap_eap_tls_buildReq_data(struct tls_data * data,int id,struct eap_packet * eapPacket); int diameap_eap_tls_parse(struct tls_msg * eaptls,struct eap_packet *eapPacket); int eaptlsparse(struct tls_config * conf); #endif /* EAP_TLS_H_ */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/plugins/eap_tls/eaptls.l000066400000000000000000000070101333553357400302650ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ /*Declarations and option settings*/ %{ #include #include "eap_tls.h" #include "eaptls.tab.h" #define YY_USER_ACTION { \ yylloc->first_line = yylloc->last_line = yylineno; \ yylloc->first_column = yylloc->last_column + 1; \ yylloc->last_column += yyleng +1; \ } #define YY_NO_INPUT %} %option noyywrap %option yylineno %option bison-bridge %option bison-locations %option nounput %% /* List of patterns and actions */ <*>\n { yylloc->last_column=0; } <*>#.*$ {} [ \t\n]+ { yylloc->last_column=0; } \"([^\n\"]*)\" { /* Quoted String */ yylval->str = strdup(yytext+1); yylval->str[yyleng-2]='\0'; return iSTRING; } [[:digit:]]+ { /* Digital number */ yylval->val = atoi(yytext); return NUM; /* Numeric value */ } (?i:"Cred") { return CERTS; } (?i:"CA") { return CAPATH; } (?i:"CRL") { return CRLPATH; } (?i:"check_cert_cn_username") { return CHECK_CN_USERNAME; } "="|";"|":"|"," { /* Single characters for yyparse */ return yytext[0]; } /* Unrecognized token or text */ <*>[[:alnum:]]+ | <*>. { fprintf(stderr,"Unrecognized input text '%s'( on line %i column %i )\n", yytext, yylloc->first_line, yylloc->first_column); return LEX_ERROR; } %% /* Routines */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_diameap/plugins/eap_tls/eaptls.y000066400000000000000000000163271333553357400303150ustar00rootroot00000000000000/***************************************************************************************************** * Software License Agreement (BSD License) * Author : Souheil Ben Ayed * * Copyright (c) 2009-2010, Souheil Ben Ayed, Teraoka Laboratory of Keio University and the WIDE Project * All rights reserved. * * Redistribution and use of this software 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. * * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by Souheil Ben Ayed . * * 4. Neither the name of Souheil Ben Ayed, Teraoka Laboratory of Keio University or the WIDE Project nor the * names of its contributors may be used to endorse or promote products * derived from this software without specific prior written permission. * * 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. *****************************************************************************************************/ %{ #include #include "eap_tls.h" #include "eaptls.tab.h" void yyerror (YYLTYPE *llocp, struct tls_config * config, const char *s); extern int yywrap(); extern int yylex(); /* The Lex parser prototype */ int eaptlslex(YYSTYPE *lvalp, YYLTYPE *llocp); %} %locations %parse-param {struct tls_config * config} %pure_parser /*%defines */ %error-verbose %debug %union { char *str; int val; char byte; } /* In case of error in the lexical analysis */ %token LEX_ERROR %token NUM %token iSTRING %token iBYTE %token CERTS %token CAPATH %token CRLPATH %token CHECK_CN_USERNAME %% confparams : /* empty */ | confparams CERTS_files | confparams CA_file | confparams CRL_file | confparams CHECK_CN_USERNAME_param | confparams errors { return EINVAL; } ; errors : LEX_ERROR | error ; CERTS_files : CERTS '=' iSTRING ':' iSTRING ';' { char * certfile, *keyfile; FILE * fl; certfile = $3; keyfile = $5; if(certfile == NULL){ TRACE_DEBUG(INFO,"%s[EAP TLS plugin] certificate file missing in configuration file",DIAMEAP_EXTENSION); yyerror (&yylloc, config, "cert file missing"); YYERROR; } if(keyfile == NULL){ TRACE_DEBUG(INFO,"%s[EAP TLS plugin] privateKey file missing in configuration file",DIAMEAP_EXTENSION); yyerror (&yylloc, config, "privateKey file missing"); YYERROR; } fl = fopen(certfile, "r"); if ((fl == NULL) && (*certfile != '/')) { char * tmpfile=certfile; CHECK_MALLOC_DO( certfile = malloc( strlen(tmpfile) + strlen(DEFAULT_EXTENSIONS_PATH) + 2 ), { yyerror (&yylloc, config, "Not enough memory"); YYERROR; } ); sprintf(certfile, DEFAULT_EXTENSIONS_PATH "/%s", tmpfile); free(tmpfile); fl = fopen(certfile, "r"); } if (fl == NULL) { int ret = errno; TRACE_DEBUG(INFO,"%s[EAP TLS plugin] Unable to open certificate file %s for reading: %s",DIAMEAP_EXTENSION,certfile,strerror(ret)); yyerror (&yylloc, config, "Error configuring certificate for EAP-TLS"); YYERROR; } fclose(fl); fl = fopen(keyfile, "r"); if ((fl == NULL) && (*keyfile != '/')) { char * tmpfile=keyfile; CHECK_MALLOC_DO( keyfile = malloc( strlen(tmpfile) + strlen(DEFAULT_EXTENSIONS_PATH) + 2 ), { yyerror (&yylloc, config, "Not enough memory"); YYERROR; } ); sprintf(keyfile, DEFAULT_EXTENSIONS_PATH "/%s", tmpfile); free(tmpfile); fl = fopen(keyfile, "r"); } if (fl == NULL) { int ret = errno; TRACE_DEBUG(INFO,"%s[EAP TLS plugin] Unable to open privateKey file %s for reading: %s",DIAMEAP_EXTENSION,keyfile,strerror(ret)); yyerror (&yylloc, config, "Error configuring privateKey for EAP-TLS"); YYERROR; } fclose(fl); config->certfile = certfile; config->keyfile = keyfile; } ; CA_file : CAPATH '=' iSTRING ';' { char * cafile; FILE * fl; cafile = $3; if(cafile == NULL){ TRACE_DEBUG(INFO,"%s[EAP TLS plugin] CA file missing in configuration file",DIAMEAP_EXTENSION); yyerror (&yylloc, config, "cert file missing"); YYERROR; } fl = fopen(cafile, "r"); if ((fl == NULL) && (*cafile != '/')) { char * tmpfile=cafile; CHECK_MALLOC_DO( cafile = malloc( strlen(tmpfile) + strlen(DEFAULT_EXTENSIONS_PATH) + 2 ), { yyerror (&yylloc, config, "Not enough memory"); YYERROR; } ); sprintf(cafile, DEFAULT_EXTENSIONS_PATH "/%s", tmpfile); free(tmpfile); fl = fopen(cafile, "r"); } if (fl == NULL) { int ret = errno; TRACE_DEBUG(INFO,"%s[EAP TLS plugin] Unable to open CA file %s for reading: %s",DIAMEAP_EXTENSION,cafile,strerror(ret)); yyerror (&yylloc, config, "Error configuring CA file for EAP-TLS"); YYERROR; } fclose(fl); config->cafile=$3; } ; CRL_file : CRLPATH '=' iSTRING ';' { char * crlfile; FILE * fl; crlfile = $3; if(crlfile == NULL){ TRACE_DEBUG(FULL+1,"%s[EAP TLS plugin] CRL file missing in configuration file",DIAMEAP_EXTENSION); }else{ fl = fopen(crlfile, "r"); if ((fl == NULL) && (*crlfile != '/')) { char * tmpfile=crlfile; CHECK_MALLOC_DO( crlfile = malloc( strlen(tmpfile) + strlen(DEFAULT_EXTENSIONS_PATH) + 2 ), { yyerror (&yylloc, config, "Not enough memory"); YYERROR; } ); sprintf(crlfile, DEFAULT_EXTENSIONS_PATH "/%s", tmpfile); free(tmpfile); fl = fopen(crlfile, "r"); } if (fl == NULL) { int ret = errno; TRACE_DEBUG(INFO,"%s[EAP TLS plugin] Unable to open CRL file %s for reading: %s",DIAMEAP_EXTENSION,crlfile,strerror(ret)); yyerror (&yylloc, config, "Error configuring CRL file for EAP-TLS"); YYERROR; } fclose(fl); } config->crlfile=$3; } ; CHECK_CN_USERNAME_param : CHECK_CN_USERNAME '=' NUM ';' { if((int)$3 == 0){ config->check_cert_cn_username = FALSE; } else { config->check_cert_cn_username = TRUE; } } ; %% void yyerror(YYLTYPE *llocp, struct tls_config * config,const char *str) { fprintf(stderr,"Error in %s ( on line %i column %i -> line %i column %i) : %s\n",config->conffile, llocp->first_line, llocp->first_column, llocp->last_line, llocp->last_column, str); } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/000077500000000000000000000000001333553357400232165ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/CMakeLists.txt000066400000000000000000000075631333553357400257710ustar00rootroot00000000000000# The app_radgw extension PROJECT("RADIUS/Diameter extensible gateway application for freeDiameter" C) ########### Main app_radgw extension ############# # Parser files BISON_FILE(rgw_conf.y) FLEX_FILE(rgw_conf.l) SET_SOURCE_FILES_PROPERTIES(lex.rgw_conf.c rgw_conf.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}") # List of source files SET( RGW_DEFAULT_SRC radius.c md5.c rgw_msg_codes.c rgw_msg_attrtype.c rgw_main.c lex.rgw_conf.c rgw_conf.tab.c rgw_conf.tab.h rgw_clients.c rgw_plugins.c rgw_servers.c rgw_worker.c ) SET( RG_COMMON_HEADER rgw_common.h radius.h md5.h hostap_compat.h ) # Compile these files as a freeDiameter extension. FD_ADD_EXTENSION(app_radgw ${RGW_DEFAULT_SRC} ${RG_COMMON_HEADER}) ########### RADIUS/Diameter translation agent plugins (support for RADIUS protocol) ############ # Use the macro RGWX_ADD_PLUGIN(name files...) to create a plugin. # It is equivalent to add_library with the appropriate parameters # and naming conventions (.rgwx : Radius GateWay eXtension) MACRO(RGWX_ADD_PLUGIN PLGNAME) ADD_LIBRARY(${PLGNAME} MODULE ${ARGN}) SET_TARGET_PROPERTIES(${PLGNAME} PROPERTIES PREFIX "" ) SET_TARGET_PROPERTIES(${PLGNAME} PROPERTIES SUFFIX ".rgwx" ) INSTALL(TARGETS ${PLGNAME} LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-radius-gateway) ENDMACRO(RGWX_ADD_PLUGIN) # Ask unless ALL_EXTENSIONS is set: MACRO(FD_OPTION_PLUGIN PLGVAR DESCR DEFLT) IF (NOT ALL_EXTENSIONS) OPTION(BUILD_${PLGVAR} ${DESCR} ${DEFLT}) ENDIF (NOT ALL_EXTENSIONS) IF (BUILD_${PLGVAR} OR ALL_EXTENSIONS) SET(${PLGVAR} TRUE) ELSE (BUILD_${PLGVAR} OR ALL_EXTENSIONS) SET(${PLGVAR} FALSE) ENDIF (BUILD_${PLGVAR} OR ALL_EXTENSIONS) ENDMACRO(FD_OPTION_PLUGIN PLGVAR DESCR DEFLT) ### Debug # Example of plugin: FD_OPTION_PLUGIN(RGWX_SAMPLE "Build sample plugin? (for developers only)" OFF) IF (RGWX_SAMPLE) RGWX_ADD_PLUGIN(sample ${RG_COMMON_HEADER} rgwx_sample.c) ENDIF (RGWX_SAMPLE) # A plugin for debug: dumps RADIUS and Diameter messages state at the time the plugin is called. FD_OPTION_PLUGIN(RGWX_DEBUG "Build debug plugin? (display status of RADIUS and Diameter messages)" ON) IF (RGWX_DEBUG) RGWX_ADD_PLUGIN(debug ${RG_COMMON_HEADER} rgwx_debug.c) ENDIF (RGWX_DEBUG) ### Authentication, Authorization messages translation. FD_OPTION_PLUGIN(RGWX_AUTH "Build Authentication & Authorization RADIUS translation plugin? (RFC2865, RFC3579)" ON) IF (RGWX_AUTH) RGWX_ADD_PLUGIN(auth ${RG_COMMON_HEADER} rgwx_auth.c) ENDIF (RGWX_AUTH) ### SIP Authentication, Authorization messages translation. FD_OPTION_PLUGIN(RGWX_SIP "Build SIP RADIUS translation plugin? (RFC4740 or RFC5090)" OFF) IF (RGWX_SIP) RGWX_ADD_PLUGIN(sip ${RG_COMMON_HEADER} rgwx_sip.c) ENDIF (RGWX_SIP) ### Accounting messages translation. FD_OPTION_PLUGIN(RGWX_ACCT "Build Accounting RADIUS translation plugin? (RFC2866)" ON) IF (RGWX_ACCT) RGWX_ADD_PLUGIN(acct ${RG_COMMON_HEADER} rgwx_acct.c) ENDIF (RGWX_ACCT) ### Generic plugin to handle some attributes (either delete them or simply echo them in the answer) FD_OPTION_PLUGIN(RGWX_ECHODROP "Build 'echo/drop' plugin? (drop specific RADIUS attributes or echo them in RADIUS answer)" ON) IF (RGWX_ECHODROP) BISON_FILE(rgwx_echodrop.y) FLEX_FILE(rgwx_echodrop.l) SET_SOURCE_FILES_PROPERTIES(lex.rgwx_echodrop.c rgwx_echodrop.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}") RGWX_ADD_PLUGIN(echodrop ${RG_COMMON_HEADER} rgwx_echodrop.h rgwx_echodrop.c lex.rgwx_echodrop.c rgwx_echodrop.tab.c rgwx_echodrop.tab.h ) ENDIF (RGWX_ECHODROP) #### ## INSTALL section ## INSTALL(TARGETS app_radgw LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-radius-gateway) # Note that all compiled plugins are added by the RGWX_ADD_PLUGIN macro in the component freeDiameter-radius-gateway as well. nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/hostap_compat.h000066400000000000000000000154231333553357400262350ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2011, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* This file contains compatibility bindings for hostap files. Most of the definitions here come from different files from the hostap project. We don't care for OS-specific definitions since we are only compatible with POSIX systems. */ #ifndef _HOSTAP_COMPAT_H #define _HOSTAP_COMPAT_H #include typedef uint64_t u64; typedef uint32_t u32; typedef uint16_t u16; typedef uint8_t u8; typedef int64_t s64; typedef int32_t s32; typedef int16_t s16; typedef int8_t s8; /* md5.c uses a different macro name than freeDiameter for endianness */ #ifdef HOST_BIG_ENDIAN # define WORDS_BIGENDIAN HOST_BIG_ENDIAN #else /* HOST_BIG_ENDIAN */ # undef WORDS_BIGENDIAN #endif /* HOST_BIG_ENDIAN */ /* freeDiameter uses the POSIX API, so we don't provide alternatives. This may be changed later as needed */ #define os_malloc(s) malloc((s)) #define os_realloc(p, s) realloc((p), (s)) #define os_free(p) free((p)) #define os_memcpy(d, s, n) memcpy((d), (s), (n)) #define os_memmove(d, s, n) memmove((d), (s), (n)) #define os_memset(s, c, n) memset(s, c, n) #define os_memcmp(s1, s2, n) memcmp((s1), (s2), (n)) #define os_strdup(s) strdup(s) #define os_strlen(s) strlen(s) #define os_strcasecmp(s1, s2) strcasecmp((s1), (s2)) #define os_strncasecmp(s1, s2, n) strncasecmp((s1), (s2), (n)) #define os_strchr(s, c) strchr((s), (c)) #define os_strcmp(s1, s2) strcmp((s1), (s2)) #define os_strncmp(s1, s2, n) strncmp((s1), (s2), (n)) #define os_strncpy(d, s, n) strncpy((d), (s), (n)) #define os_strrchr(s, c) strrchr((s), (c)) #define os_strstr(h, n) strstr((h), (n)) #define os_snprintf snprintf #define os_random() random() static __inline__ void * os_zalloc(size_t size) { void *n = os_malloc(size); if (n) os_memset(n, 0, size); return n; } typedef long os_time_t; struct os_time { os_time_t sec; os_time_t usec; }; static __inline__ int os_get_time(struct os_time *t) { int res; struct timeval tv; res = gettimeofday(&tv, NULL); t->sec = tv.tv_sec; t->usec = tv.tv_usec; return res; } /* Macros for handling unaligned memory accesses */ #define WPA_GET_BE16(a) ((u16) (((a)[0] << 8) | (a)[1])) #define WPA_PUT_BE16(a, val) \ do { \ (a)[0] = ((u16) (val)) >> 8; \ (a)[1] = ((u16) (val)) & 0xff; \ } while (0) #define WPA_GET_LE16(a) ((u16) (((a)[1] << 8) | (a)[0])) #define WPA_PUT_LE16(a, val) \ do { \ (a)[1] = ((u16) (val)) >> 8; \ (a)[0] = ((u16) (val)) & 0xff; \ } while (0) #define WPA_GET_BE24(a) ((((u32) (a)[0]) << 16) | (((u32) (a)[1]) << 8) | \ ((u32) (a)[2])) #define WPA_PUT_BE24(a, val) \ do { \ (a)[0] = (u8) ((((u32) (val)) >> 16) & 0xff); \ (a)[1] = (u8) ((((u32) (val)) >> 8) & 0xff); \ (a)[2] = (u8) (((u32) (val)) & 0xff); \ } while (0) #define WPA_GET_BE32(a) ((((u32) (a)[0]) << 24) | (((u32) (a)[1]) << 16) | \ (((u32) (a)[2]) << 8) | ((u32) (a)[3])) #define WPA_PUT_BE32(a, val) \ do { \ (a)[0] = (u8) ((((u32) (val)) >> 24) & 0xff); \ (a)[1] = (u8) ((((u32) (val)) >> 16) & 0xff); \ (a)[2] = (u8) ((((u32) (val)) >> 8) & 0xff); \ (a)[3] = (u8) (((u32) (val)) & 0xff); \ } while (0) #define WPA_GET_LE32(a) ((((u32) (a)[3]) << 24) | (((u32) (a)[2]) << 16) | \ (((u32) (a)[1]) << 8) | ((u32) (a)[0])) #define WPA_PUT_LE32(a, val) \ do { \ (a)[3] = (u8) ((((u32) (val)) >> 24) & 0xff); \ (a)[2] = (u8) ((((u32) (val)) >> 16) & 0xff); \ (a)[1] = (u8) ((((u32) (val)) >> 8) & 0xff); \ (a)[0] = (u8) (((u32) (val)) & 0xff); \ } while (0) #define WPA_GET_BE64(a) ((((u64) (a)[0]) << 56) | (((u64) (a)[1]) << 48) | \ (((u64) (a)[2]) << 40) | (((u64) (a)[3]) << 32) | \ (((u64) (a)[4]) << 24) | (((u64) (a)[5]) << 16) | \ (((u64) (a)[6]) << 8) | ((u64) (a)[7])) #define WPA_PUT_BE64(a, val) \ do { \ (a)[0] = (u8) (((u64) (val)) >> 56); \ (a)[1] = (u8) (((u64) (val)) >> 48); \ (a)[2] = (u8) (((u64) (val)) >> 40); \ (a)[3] = (u8) (((u64) (val)) >> 32); \ (a)[4] = (u8) (((u64) (val)) >> 24); \ (a)[5] = (u8) (((u64) (val)) >> 16); \ (a)[6] = (u8) (((u64) (val)) >> 8); \ (a)[7] = (u8) (((u64) (val)) & 0xff); \ } while (0) #define WPA_GET_LE64(a) ((((u64) (a)[7]) << 56) | (((u64) (a)[6]) << 48) | \ (((u64) (a)[5]) << 40) | (((u64) (a)[4]) << 32) | \ (((u64) (a)[3]) << 24) | (((u64) (a)[2]) << 16) | \ (((u64) (a)[1]) << 8) | ((u64) (a)[0])) /* Packing structures to avoid padding */ #ifdef __GNUC__ #define STRUCT_PACKED __attribute__ ((packed)) #else #define STRUCT_PACKED #endif /* For md5.c file */ #define INTERNAL_MD5 #define CONFIG_CRYPTO_INTERNAL /* For radius.c file */ #define CONFIG_IPV6 #include #endif /* _HOSTAP_COMPAT_H */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/md5.c000066400000000000000000000274361333553357400240630ustar00rootroot00000000000000/*********************************************************************************/ /* freeDiameter author note: * The content from this file comes directly from the hostap project. * It is redistributed under the terms of the BSD license, as allowed * by the original copyright reproduced below. * In addition to this notice, only the #include directives have been modified. */ #include "rgw_common.h" /*********************************************************************************/ /* * MD5 hash implementation and interface functions * Copyright (c) 2003-2005, Jouni Malinen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * Alternatively, this software may be distributed under the terms of BSD * license. * * See README and COPYING for more details. */ /** * hmac_md5_vector - HMAC-MD5 over data vector (RFC 2104) * @key: Key for HMAC operations * @key_len: Length of the key in bytes * @num_elem: Number of elements in the data vector * @addr: Pointers to the data areas * @len: Lengths of the data blocks * @mac: Buffer for the hash (16 bytes) */ void hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) { u8 k_pad[64]; /* padding - key XORd with ipad/opad */ u8 tk[16]; const u8 *_addr[6]; size_t i, _len[6]; if (num_elem > 5) { /* * Fixed limit on the number of fragments to avoid having to * allocate memory (which could fail). */ return; } /* if key is longer than 64 bytes reset it to key = MD5(key) */ if (key_len > 64) { md5_vector(1, &key, &key_len, tk); key = tk; key_len = 16; } /* the HMAC_MD5 transform looks like: * * MD5(K XOR opad, MD5(K XOR ipad, text)) * * where K is an n byte key * ipad is the byte 0x36 repeated 64 times * opad is the byte 0x5c repeated 64 times * and text is the data being protected */ /* start out by storing key in ipad */ os_memset(k_pad, 0, sizeof(k_pad)); os_memcpy(k_pad, key, key_len); /* XOR key with ipad values */ for (i = 0; i < 64; i++) k_pad[i] ^= 0x36; /* perform inner MD5 */ _addr[0] = k_pad; _len[0] = 64; for (i = 0; i < num_elem; i++) { _addr[i + 1] = addr[i]; _len[i + 1] = len[i]; } md5_vector(1 + num_elem, _addr, _len, mac); os_memset(k_pad, 0, sizeof(k_pad)); os_memcpy(k_pad, key, key_len); /* XOR key with opad values */ for (i = 0; i < 64; i++) k_pad[i] ^= 0x5c; /* perform outer MD5 */ _addr[0] = k_pad; _len[0] = 64; _addr[1] = mac; _len[1] = MD5_MAC_LEN; md5_vector(2, _addr, _len, mac); } /** * hmac_md5 - HMAC-MD5 over data buffer (RFC 2104) * @key: Key for HMAC operations * @key_len: Length of the key in bytes * @data: Pointers to the data area * @data_len: Length of the data area * @mac: Buffer for the hash (16 bytes) */ void hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac) { hmac_md5_vector(key, key_len, 1, &data, &data_len, mac); } #ifdef INTERNAL_MD5 struct MD5Context { u32 buf[4]; u32 bits[2]; u8 in[64]; }; #ifndef CONFIG_CRYPTO_INTERNAL static void MD5Init(struct MD5Context *context); static void MD5Update(struct MD5Context *context, unsigned char const *buf, unsigned len); static void MD5Final(unsigned char digest[16], struct MD5Context *context); #endif /* CONFIG_CRYPTO_INTERNAL */ static void MD5Transform(u32 buf[4], u32 const in[16]); typedef struct MD5Context MD5_CTX; /** * md5_vector - MD5 hash for data vector * @num_elem: Number of elements in the data vector * @addr: Pointers to the data areas * @len: Lengths of the data blocks * @mac: Buffer for the hash */ void md5_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) { MD5_CTX ctx; size_t i; MD5Init(&ctx); for (i = 0; i < num_elem; i++) MD5Update(&ctx, addr[i], len[i]); MD5Final(mac, &ctx); } /* ===== start - public domain MD5 implementation ===== */ /* * This code implements the MD5 message-digest algorithm. * The algorithm is due to Ron Rivest. This code was * written by Colin Plumb in 1993, no copyright is claimed. * This code is in the public domain; do with it what you wish. * * Equivalent code is available from RSA Data Security, Inc. * This code has been tested against that, and is equivalent, * except that you don't need to include two pages of legalese * with every copy. * * To compute the message digest of a chunk of bytes, declare an * MD5Context structure, pass it to MD5Init, call MD5Update as * needed on buffers full of bytes, and then call MD5Final, which * will fill a supplied 16-byte array with the digest. */ #ifndef WORDS_BIGENDIAN #define byteReverse(buf, len) /* Nothing */ #else /* * Note: this code is harmless on little-endian machines. */ static void byteReverse(unsigned char *buf, unsigned longs) { u32 t; do { t = (u32) ((unsigned) buf[3] << 8 | buf[2]) << 16 | ((unsigned) buf[1] << 8 | buf[0]); *(u32 *) buf = t; buf += 4; } while (--longs); } #endif /* * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious * initialization constants. */ void MD5Init(struct MD5Context *ctx) { ctx->buf[0] = 0x67452301; ctx->buf[1] = 0xefcdab89; ctx->buf[2] = 0x98badcfe; ctx->buf[3] = 0x10325476; ctx->bits[0] = 0; ctx->bits[1] = 0; } /* * Update context to reflect the concatenation of another buffer full * of bytes. */ void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len) { u32 t; /* Update bitcount */ t = ctx->bits[0]; if ((ctx->bits[0] = t + ((u32) len << 3)) < t) ctx->bits[1]++; /* Carry from low to high */ ctx->bits[1] += len >> 29; t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */ /* Handle any leading odd-sized chunks */ if (t) { unsigned char *p = (unsigned char *) ctx->in + t; t = 64 - t; if (len < t) { os_memcpy(p, buf, len); return; } os_memcpy(p, buf, t); byteReverse(ctx->in, 16); MD5Transform(ctx->buf, (u32 *) ctx->in); buf += t; len -= t; } /* Process data in 64-byte chunks */ while (len >= 64) { os_memcpy(ctx->in, buf, 64); byteReverse(ctx->in, 16); MD5Transform(ctx->buf, (u32 *) ctx->in); buf += 64; len -= 64; } /* Handle any remaining bytes of data. */ os_memcpy(ctx->in, buf, len); } /* * Final wrapup - pad to 64-byte boundary with the bit pattern * 1 0* (64-bit count of bits processed, MSB-first) */ void MD5Final(unsigned char digest[16], struct MD5Context *ctx) { unsigned count; unsigned char *p; /* Compute number of bytes mod 64 */ count = (ctx->bits[0] >> 3) & 0x3F; /* Set the first char of padding to 0x80. This is safe since there is always at least one byte free */ p = ctx->in + count; *p++ = 0x80; /* Bytes of padding needed to make 64 bytes */ count = 64 - 1 - count; /* Pad out to 56 mod 64 */ if (count < 8) { /* Two lots of padding: Pad the first block to 64 bytes */ os_memset(p, 0, count); byteReverse(ctx->in, 16); MD5Transform(ctx->buf, (u32 *) ctx->in); /* Now fill the next block with 56 bytes */ os_memset(ctx->in, 0, 56); } else { /* Pad block to 56 bytes */ os_memset(p, 0, count - 8); } byteReverse(ctx->in, 14); /* Append length in bits and transform */ ((u32 *) ctx->in)[14] = ctx->bits[0]; ((u32 *) ctx->in)[15] = ctx->bits[1]; MD5Transform(ctx->buf, (u32 *) ctx->in); byteReverse((unsigned char *) ctx->buf, 4); os_memcpy(digest, ctx->buf, 16); os_memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ } /* The four core functions - F1 is optimized somewhat */ /* #define F1(x, y, z) (x & y | ~x & z) */ #define F1(x, y, z) (z ^ (x & (y ^ z))) #define F2(x, y, z) F1(z, x, y) #define F3(x, y, z) (x ^ y ^ z) #define F4(x, y, z) (y ^ (x | ~z)) /* This is the central step in the MD5 algorithm. */ #define MD5STEP(f, w, x, y, z, data, s) \ ( w += f(x, y, z) + data, w = w<>(32-s), w += x ) /* * The core of the MD5 algorithm, this alters an existing MD5 hash to * reflect the addition of 16 longwords of new data. MD5Update blocks * the data and converts bytes into longwords for this routine. */ static void MD5Transform(u32 buf[4], u32 const in[16]) { register u32 a, b, c, d; a = buf[0]; b = buf[1]; c = buf[2]; d = buf[3]; MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7); MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12); MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17); MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22); MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7); MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12); MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17); MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22); MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7); MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12); MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17); MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22); MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7); MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12); MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17); MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22); MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5); MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9); MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14); MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20); MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5); MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9); MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14); MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20); MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5); MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9); MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14); MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20); MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5); MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9); MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14); MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20); MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4); MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11); MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16); MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23); MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4); MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11); MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16); MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23); MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4); MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11); MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16); MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23); MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4); MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11); MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16); MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23); MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6); MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10); MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15); MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21); MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6); MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10); MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15); MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21); MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6); MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10); MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15); MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21); MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6); MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10); MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15); MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21); buf[0] += a; buf[1] += b; buf[2] += c; buf[3] += d; } /* ===== end - public domain MD5 implementation ===== */ #endif /* INTERNAL_MD5 */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/md5.h000066400000000000000000000027561333553357400240660ustar00rootroot00000000000000/*********************************************************************************/ /* freeDiameter author note: * The content from this file comes directly from the hostap project. * It is redistributed under the terms of the BSD license, as allowed * by the original copyright reproduced below. */ /*********************************************************************************/ /* * MD5 hash implementation and interface functions * Copyright (c) 2003-2005, Jouni Malinen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * Alternatively, this software may be distributed under the terms of BSD * license. * * See README and COPYING for more details. */ #ifndef MD5_H #define MD5_H #define MD5_MAC_LEN 16 void hmac_md5_vector(const u8 *key, size_t key_len, size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac); void hmac_md5(const u8 *key, size_t key_len, const u8 *data, size_t data_len, u8 *mac); #ifdef CONFIG_CRYPTO_INTERNAL struct MD5Context; void MD5Init(struct MD5Context *context); void MD5Update(struct MD5Context *context, unsigned char const *buf, unsigned len); void MD5Final(unsigned char digest[16], struct MD5Context *context); #endif /* CONFIG_CRYPTO_INTERNAL */ /* Forward declaration: */ void md5_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac); #endif /* MD5_H */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/radius.c000066400000000000000000001060631333553357400246570ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* freeDiameter author note: * The content from this file comes for the main part from the hostap project. * It is redistributed under the terms of the BSD license, as allowed * by the original copyright reproduced below. * The modifications to this file are placed under the copyright of the freeDiameter project. */ /* * hostapd / RADIUS message processing * Copyright (c) 2002-2008, Jouni Malinen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * Alternatively, this software may be distributed under the terms of BSD * license. * * See README and COPYING for more details. */ /*********************************************************************************/ #include "rgw.h" static struct radius_attr_hdr * radius_get_attr_hdr(struct radius_msg *msg, int idx) { return (struct radius_attr_hdr *) (msg->buf + msg->attr_pos[idx]); } struct radius_msg *radius_msg_new(u8 code, u8 identifier) { struct radius_msg *msg; msg = os_malloc(sizeof(*msg)); if (msg == NULL) return NULL; if (radius_msg_initialize(msg, RADIUS_DEFAULT_MSG_SIZE)) { os_free(msg); return NULL; } radius_msg_set_hdr(msg, code, identifier); return msg; } int radius_msg_initialize(struct radius_msg *msg, size_t init_len) { if (msg == NULL || init_len < sizeof(struct radius_hdr)) return -1; os_memset(msg, 0, sizeof(*msg)); msg->buf = os_zalloc(init_len); if (msg->buf == NULL) return -1; msg->buf_size = init_len; msg->hdr = (struct radius_hdr *) msg->buf; msg->buf_used = sizeof(*msg->hdr); msg->attr_pos = os_zalloc(RADIUS_DEFAULT_ATTR_COUNT * sizeof(*msg->attr_pos)); if (msg->attr_pos == NULL) { os_free(msg->buf); msg->buf = NULL; msg->hdr = NULL; return -1; } msg->attr_size = RADIUS_DEFAULT_ATTR_COUNT; msg->attr_used = 0; return 0; } void radius_msg_set_hdr(struct radius_msg *msg, u8 code, u8 identifier) { msg->hdr->code = code; msg->hdr->identifier = identifier; } void radius_msg_free(struct radius_msg *msg) { os_free(msg->buf); msg->buf = NULL; msg->hdr = NULL; msg->buf_size = msg->buf_used = 0; os_free(msg->attr_pos); msg->attr_pos = NULL; msg->attr_size = msg->attr_used = 0; } /* Destroy a message */ void rgw_msg_free(struct rgw_radius_msg_meta ** msg) { if (!msg || !*msg) return; radius_msg_free(&(*msg)->radius); free(*msg); *msg = NULL; } struct radius_attr_type { u8 type; char *name; enum { RADIUS_ATTR_UNDIST, RADIUS_ATTR_TEXT, RADIUS_ATTR_IP, RADIUS_ATTR_HEXDUMP, RADIUS_ATTR_INT32, RADIUS_ATTR_IPV6 } data_type; }; static struct radius_attr_type radius_attrs[] = { { RADIUS_ATTR_USER_NAME, "User-Name", RADIUS_ATTR_TEXT }, { RADIUS_ATTR_USER_PASSWORD, "User-Password", RADIUS_ATTR_UNDIST }, { RADIUS_ATTR_NAS_IP_ADDRESS, "NAS-IP-Address", RADIUS_ATTR_IP }, { RADIUS_ATTR_NAS_PORT, "NAS-Port", RADIUS_ATTR_INT32 }, { RADIUS_ATTR_FRAMED_MTU, "Framed-MTU", RADIUS_ATTR_INT32 }, { RADIUS_ATTR_REPLY_MESSAGE, "Reply-Message", RADIUS_ATTR_TEXT }, { RADIUS_ATTR_STATE, "State", RADIUS_ATTR_UNDIST }, { RADIUS_ATTR_CLASS, "Class", RADIUS_ATTR_UNDIST }, { RADIUS_ATTR_VENDOR_SPECIFIC, "Vendor-Specific", RADIUS_ATTR_UNDIST }, { RADIUS_ATTR_SESSION_TIMEOUT, "Session-Timeout", RADIUS_ATTR_INT32 }, { RADIUS_ATTR_IDLE_TIMEOUT, "Idle-Timeout", RADIUS_ATTR_INT32 }, { RADIUS_ATTR_TERMINATION_ACTION, "Termination-Action", RADIUS_ATTR_INT32 }, { RADIUS_ATTR_CALLED_STATION_ID, "Called-Station-Id", RADIUS_ATTR_TEXT }, { RADIUS_ATTR_CALLING_STATION_ID, "Calling-Station-Id", RADIUS_ATTR_TEXT }, { RADIUS_ATTR_NAS_IDENTIFIER, "NAS-Identifier", RADIUS_ATTR_TEXT }, { RADIUS_ATTR_PROXY_STATE, "Proxy-State", RADIUS_ATTR_UNDIST }, { RADIUS_ATTR_ACCT_STATUS_TYPE, "Acct-Status-Type", RADIUS_ATTR_INT32 }, { RADIUS_ATTR_ACCT_DELAY_TIME, "Acct-Delay-Time", RADIUS_ATTR_INT32 }, { RADIUS_ATTR_ACCT_INPUT_OCTETS, "Acct-Input-Octets", RADIUS_ATTR_INT32 }, { RADIUS_ATTR_ACCT_OUTPUT_OCTETS, "Acct-Output-Octets", RADIUS_ATTR_INT32 }, { RADIUS_ATTR_ACCT_SESSION_ID, "Acct-Session-Id", RADIUS_ATTR_TEXT }, { RADIUS_ATTR_ACCT_AUTHENTIC, "Acct-Authentic", RADIUS_ATTR_INT32 }, { RADIUS_ATTR_ACCT_SESSION_TIME, "Acct-Session-Time", RADIUS_ATTR_INT32 }, { RADIUS_ATTR_ACCT_INPUT_PACKETS, "Acct-Input-Packets", RADIUS_ATTR_INT32 }, { RADIUS_ATTR_ACCT_OUTPUT_PACKETS, "Acct-Output-Packets", RADIUS_ATTR_INT32 }, { RADIUS_ATTR_ACCT_TERMINATE_CAUSE, "Acct-Terminate-Cause", RADIUS_ATTR_INT32 }, { RADIUS_ATTR_ACCT_MULTI_SESSION_ID, "Acct-Multi-Session-Id", RADIUS_ATTR_TEXT }, { RADIUS_ATTR_ACCT_LINK_COUNT, "Acct-Link-Count", RADIUS_ATTR_INT32 }, { RADIUS_ATTR_ACCT_INPUT_GIGAWORDS, "Acct-Input-Gigawords", RADIUS_ATTR_INT32 }, { RADIUS_ATTR_ACCT_OUTPUT_GIGAWORDS, "Acct-Output-Gigawords", RADIUS_ATTR_INT32 }, { RADIUS_ATTR_EVENT_TIMESTAMP, "Event-Timestamp", RADIUS_ATTR_INT32 }, { RADIUS_ATTR_NAS_PORT_TYPE, "NAS-Port-Type", RADIUS_ATTR_INT32 }, { RADIUS_ATTR_TUNNEL_TYPE, "Tunnel-Type", RADIUS_ATTR_HEXDUMP }, { RADIUS_ATTR_TUNNEL_MEDIUM_TYPE, "Tunnel-Medium-Type", RADIUS_ATTR_HEXDUMP }, { RADIUS_ATTR_CONNECT_INFO, "Connect-Info", RADIUS_ATTR_TEXT }, { RADIUS_ATTR_EAP_MESSAGE, "EAP-Message", RADIUS_ATTR_UNDIST }, { RADIUS_ATTR_MESSAGE_AUTHENTICATOR, "Message-Authenticator", RADIUS_ATTR_UNDIST }, { RADIUS_ATTR_TUNNEL_PRIVATE_GROUP_ID, "Tunnel-Private-Group-Id", RADIUS_ATTR_HEXDUMP }, { RADIUS_ATTR_ACCT_INTERIM_INTERVAL, "Acct-Interim-Interval", RADIUS_ATTR_INT32 }, { RADIUS_ATTR_CHARGEABLE_USER_IDENTITY, "Chargeable-User-Identity", RADIUS_ATTR_TEXT }, { RADIUS_ATTR_NAS_IPV6_ADDRESS, "NAS-IPv6-Address", RADIUS_ATTR_IPV6 }, }; #define RADIUS_ATTRS (sizeof(radius_attrs) / sizeof(radius_attrs[0])) static struct radius_attr_type *radius_get_attr_type(u8 type) { size_t i; for (i = 0; i < RADIUS_ATTRS; i++) { if (type == radius_attrs[i].type) return &radius_attrs[i]; } return NULL; } static char print_char_buf[5]; static char * print_char(char c) { if (c >= 32 && c < 127) sprintf(print_char_buf, "%c", c); else sprintf(print_char_buf, "<%02x>", c); return print_char_buf; } static char * radius_msg_dump_attr_val(struct radius_attr_hdr *hdr, char * outbuf, size_t buflen) { struct radius_attr_type *attr; int i, len; unsigned char *pos; u8 attrtype; memset(outbuf, 0, buflen); attr = radius_get_attr_type(hdr->type); if (attr == NULL) attrtype = RADIUS_ATTR_HEXDUMP; else attrtype = attr->data_type; len = hdr->length - sizeof(struct radius_attr_hdr); pos = (unsigned char *) (hdr + 1); switch (attrtype) { case RADIUS_ATTR_TEXT: snprintf(outbuf + strlen(outbuf), buflen - strlen(outbuf), " Value: '"); for (i = 0; i < len; i++) snprintf(outbuf + strlen(outbuf), buflen - strlen(outbuf), "%s", print_char(pos[i])); snprintf(outbuf + strlen(outbuf), buflen - strlen(outbuf), "'"); break; case RADIUS_ATTR_IP: if (len == 4) { struct in_addr addr; os_memcpy(&addr, pos, 4); snprintf(outbuf + strlen(outbuf), buflen - strlen(outbuf), " Value: %s", inet_ntoa(addr)); } else snprintf(outbuf + strlen(outbuf), buflen - strlen(outbuf), " Invalid IP address length %d", len); break; case RADIUS_ATTR_IPV6: if (len == 16) { char buf[128]; const char *atxt; struct in6_addr *addr = (struct in6_addr *) pos; atxt = inet_ntop(AF_INET6, addr, buf, sizeof(buf)); snprintf(outbuf + strlen(outbuf), buflen - strlen(outbuf), " Value: %s", atxt ? atxt : "?"); } else snprintf(outbuf + strlen(outbuf), buflen - strlen(outbuf), " Invalid IPv6 address length %d", len); break; case RADIUS_ATTR_INT32: if (len == 4) snprintf(outbuf + strlen(outbuf), buflen - strlen(outbuf), " Value: %u", WPA_GET_BE32(pos)); else snprintf(outbuf + strlen(outbuf), buflen - strlen(outbuf), " Invalid INT32 length %d", len); break; case RADIUS_ATTR_HEXDUMP: case RADIUS_ATTR_UNDIST: default: snprintf(outbuf + strlen(outbuf), buflen - strlen(outbuf), " Value:"); for (i = 0; i < len; i++) snprintf(outbuf + strlen(outbuf), buflen - strlen(outbuf), " %02x", pos[i]); break; } return outbuf; } /* Dump a message */ void rgw_msg_dump(struct rgw_radius_msg_meta * msg, int has_meta) { unsigned char *auth; char buf[256]; size_t i; if (! TRACE_BOOL(FULL) ) return; auth = &(msg->radius.hdr->authenticator[0]); fd_log_debug("------ RADIUS msg dump -------"); fd_log_debug(" id : 0x%02hhx, code : %hhd (%s), length : %d", msg->radius.hdr->identifier, msg->radius.hdr->code, rgw_msg_code_str(msg->radius.hdr->code), ntohs(msg->radius.hdr->length)); fd_log_debug(" auth: %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx", auth[0], auth[1], auth[2], auth[3], auth[4], auth[5], auth[6], auth[7]); fd_log_debug(" %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx", auth[8], auth[9], auth[10], auth[11], auth[12], auth[13], auth[14], auth[15]); for (i = 0; i < msg->radius.attr_used; i++) { struct radius_attr_hdr *attr = (struct radius_attr_hdr *)(msg->radius.buf + msg->radius.attr_pos[i]); fd_log_debug(" - Type: 0x%02hhx (%s) Len: %-3hhu", attr->type, rgw_msg_attrtype_str(attr->type), attr->length); fd_log_debug("%s", radius_msg_dump_attr_val(attr, buf, sizeof(buf))); } if (has_meta && msg->ps_nb) { fd_log_debug("---- hidden attributes:"); for (i = msg->ps_first; i < msg->ps_first + msg->ps_nb; i++) { struct radius_attr_hdr *attr = (struct radius_attr_hdr *)(msg->radius.buf + msg->radius.attr_pos[i]); fd_log_debug(" - Type: 0x%02hhx (%s) Len: %-3hhu", attr->type, rgw_msg_attrtype_str(attr->type), attr->length); fd_log_debug("%s", radius_msg_dump_attr_val(attr, buf, sizeof(buf))); } } fd_log_debug("-----------------------------"); } int radius_msg_finish(struct radius_msg *msg, const u8 *secret, size_t secret_len) { if (secret) { u8 auth[MD5_MAC_LEN]; struct radius_attr_hdr *attr; os_memset(auth, 0, MD5_MAC_LEN); attr = radius_msg_add_attr(msg, RADIUS_ATTR_MESSAGE_AUTHENTICATOR, auth, MD5_MAC_LEN); if (attr == NULL) { fd_log_debug("WARNING: Could not add Message-Authenticator"); return -1; } msg->hdr->length = htons(msg->buf_used); hmac_md5(secret, secret_len, msg->buf, msg->buf_used, (u8 *) (attr + 1)); } else msg->hdr->length = htons(msg->buf_used); if (msg->buf_used > 0xffff) { fd_log_debug("WARNING: too long RADIUS message (%lu)", (unsigned long) msg->buf_used); return -1; } return 0; } int radius_msg_finish_srv(struct radius_msg *msg, const u8 *secret, size_t secret_len, const u8 *req_authenticator) { u8 auth[MD5_MAC_LEN]; struct radius_attr_hdr *attr; const u8 *addr[4]; size_t len[4]; if (msg->hdr->code != RADIUS_CODE_ACCOUNTING_RESPONSE) { os_memset(auth, 0, MD5_MAC_LEN); attr = radius_msg_add_attr(msg, RADIUS_ATTR_MESSAGE_AUTHENTICATOR, auth, MD5_MAC_LEN); if (attr == NULL) { fd_log_debug("WARNING: Could not add Message-Authenticator"); return -1; } msg->hdr->length = htons(msg->buf_used); os_memcpy(msg->hdr->authenticator, req_authenticator, sizeof(msg->hdr->authenticator)); hmac_md5(secret, secret_len, msg->buf, msg->buf_used, (u8 *) (attr + 1)); } else { msg->hdr->length = htons(msg->buf_used); } /* ResponseAuth = MD5(Code+ID+Length+RequestAuth+Attributes+Secret) */ addr[0] = (u8 *) msg->hdr; len[0] = 1 + 1 + 2; addr[1] = req_authenticator; len[1] = MD5_MAC_LEN; addr[2] = (u8 *) (msg->hdr + 1); len[2] = msg->buf_used - sizeof(*msg->hdr); addr[3] = secret; len[3] = secret_len; md5_vector(4, addr, len, msg->hdr->authenticator); if (msg->buf_used > 0xffff) { fd_log_debug("WARNING: too long RADIUS message (%lu)", (unsigned long) msg->buf_used); return -1; } return 0; } void radius_msg_finish_acct(struct radius_msg *msg, const u8 *secret, size_t secret_len) { const u8 *addr[2]; size_t len[2]; msg->hdr->length = htons(msg->buf_used); os_memset(msg->hdr->authenticator, 0, MD5_MAC_LEN); addr[0] = msg->buf; len[0] = msg->buf_used; addr[1] = secret; len[1] = secret_len; md5_vector(2, addr, len, msg->hdr->authenticator); if (msg->buf_used > 0xffff) { fd_log_debug("WARNING: too long RADIUS messages (%lu)", (unsigned long) msg->buf_used); } } int radius_msg_add_attr_to_array(struct radius_msg *msg, struct radius_attr_hdr *attr) { if (msg->attr_used >= msg->attr_size) { size_t *nattr_pos; int nlen = msg->attr_size * 2; nattr_pos = os_realloc(msg->attr_pos, nlen * sizeof(*msg->attr_pos)); if (nattr_pos == NULL) return -1; msg->attr_pos = nattr_pos; msg->attr_size = nlen; } msg->attr_pos[msg->attr_used++] = (unsigned char *) attr - msg->buf; return 0; } struct radius_attr_hdr *radius_msg_add_attr(struct radius_msg *msg, u8 type, const u8 *data, size_t data_len) { size_t buf_needed; struct radius_attr_hdr *attr; if (data_len > RADIUS_MAX_ATTR_LEN) { fd_log_debug("radius_msg_add_attr: too long attribute (%lu bytes)", (unsigned long) data_len); return NULL; } buf_needed = msg->buf_used + sizeof(*attr) + data_len; if (msg->buf_size < buf_needed) { /* allocate more space for message buffer */ unsigned char *nbuf; size_t nlen = msg->buf_size; while (nlen < buf_needed) nlen *= 2; nbuf = os_realloc(msg->buf, nlen); if (nbuf == NULL) return NULL; msg->buf = nbuf; msg->hdr = (struct radius_hdr *) msg->buf; os_memset(msg->buf + msg->buf_size, 0, nlen - msg->buf_size); msg->buf_size = nlen; } attr = (struct radius_attr_hdr *) (msg->buf + msg->buf_used); attr->type = type; attr->length = sizeof(*attr) + data_len; if (data_len > 0) os_memcpy(attr + 1, data, data_len); msg->buf_used += sizeof(*attr) + data_len; if (radius_msg_add_attr_to_array(msg, attr)) return NULL; return attr; } /* Modified version of radius_msg_parse */ int rgw_msg_parse(unsigned char * buf, size_t len, struct rgw_radius_msg_meta ** msg) { struct rgw_radius_msg_meta * temp_msg = NULL; struct radius_hdr *hdr; struct radius_attr_hdr *attr; size_t msg_len; unsigned char *pos, *end; int ret = 0; TRACE_ENTRY("%p %zd %p", buf, len, msg); CHECK_PARAMS( buf && len >= sizeof(*hdr) && msg ); *msg = NULL; /* Parse the RADIUS message */ hdr = (struct radius_hdr *) buf; msg_len = ntohs(hdr->length); if (msg_len < sizeof(*hdr) || msg_len > len) { TRACE_DEBUG(INFO, "Invalid RADIUS message length"); return EINVAL; } if (msg_len < len) { TRACE_DEBUG(INFO, "Ignored %lu extra bytes after RADIUS message", (unsigned long) len - msg_len); } CHECK_MALLOC( temp_msg = malloc(sizeof(struct rgw_radius_msg_meta)) ); memset(temp_msg, 0, sizeof(struct rgw_radius_msg_meta)); if (radius_msg_initialize(&temp_msg->radius, msg_len)) { TRACE_DEBUG(INFO, "Error in radius_msg_initialize, returning ENOMEM."); free(temp_msg); return ENOMEM; } /* Store the received data in the alloc'd buffer */ memcpy(temp_msg->radius.buf, buf, msg_len); temp_msg->radius.buf_size = temp_msg->radius.buf_used = msg_len; /* parse attributes */ pos = (unsigned char *) (temp_msg->radius.hdr + 1); end = temp_msg->radius.buf + temp_msg->radius.buf_used; while (pos < end) { if ((size_t) (end - pos) < sizeof(*attr)) { TRACE_DEBUG(INFO, "Trucated attribute found in RADIUS buffer, EINVAL."); ret = EINVAL; break; } attr = (struct radius_attr_hdr *) pos; if (pos + attr->length > end || attr->length < sizeof(*attr)) { TRACE_DEBUG(INFO, "Trucated attribute found in RADIUS buffer, EINVAL."); ret = EINVAL; break; } if (radius_msg_add_attr_to_array(&temp_msg->radius, attr)) { TRACE_DEBUG(INFO, "Error in radius_msg_add_attr_to_array, ENOMEM"); ret = ENOMEM; break; } if (attr->type == RADIUS_ATTR_PROXY_STATE) temp_msg->ps_nb += 1; pos += attr->length; } if (ret != 0) { radius_msg_free(&temp_msg->radius); free(temp_msg); return ret; } /* Now move all the proxy-state attributes at the end of the attr_pos array */ if (temp_msg->ps_nb) { size_t *temp_ps = NULL; int n, new_n = 0, p = 0; CHECK_MALLOC( temp_ps = calloc(temp_msg->ps_nb, sizeof(size_t)) ); /* Move all the Proxy-State attributes into the temp_ps array */ for (n=0; n < temp_msg->radius.attr_used; n++) { struct radius_attr_hdr * attr = (struct radius_attr_hdr *)(temp_msg->radius.buf + temp_msg->radius.attr_pos[n]); if (attr->type == RADIUS_ATTR_PROXY_STATE) { temp_ps[p++] = temp_msg->radius.attr_pos[n]; } else { temp_msg->radius.attr_pos[new_n++] = temp_msg->radius.attr_pos[n]; } } temp_msg->radius.attr_used = new_n; /* hide the proxy-state to other modules */ temp_msg->ps_first = new_n; /* And back into the array */ memcpy(temp_msg->radius.attr_pos + new_n, temp_ps, p * sizeof(size_t)); free(temp_ps); } *msg = temp_msg; return 0; } int radius_msg_add_eap(struct radius_msg *msg, const u8 *data, size_t data_len) { const u8 *pos = data; size_t left = data_len; while (left > 0) { int len; if (left > RADIUS_MAX_ATTR_LEN) len = RADIUS_MAX_ATTR_LEN; else len = left; if (!radius_msg_add_attr(msg, RADIUS_ATTR_EAP_MESSAGE, pos, len)) return 0; pos += len; left -= len; } return 1; } u8 *radius_msg_get_eap(struct radius_msg *msg, size_t *eap_len) { u8 *eap, *pos; size_t len, i; struct radius_attr_hdr *attr; if (msg == NULL) return NULL; len = 0; for (i = 0; i < msg->attr_used; i++) { attr = radius_get_attr_hdr(msg, i); if (attr->type == RADIUS_ATTR_EAP_MESSAGE) len += attr->length - sizeof(struct radius_attr_hdr); } if (len == 0) return NULL; eap = os_malloc(len); if (eap == NULL) return NULL; pos = eap; for (i = 0; i < msg->attr_used; i++) { attr = radius_get_attr_hdr(msg, i); if (attr->type == RADIUS_ATTR_EAP_MESSAGE) { int flen = attr->length - sizeof(*attr); os_memcpy(pos, attr + 1, flen); pos += flen; } } if (eap_len) *eap_len = len; return eap; } int radius_msg_verify_msg_auth(struct radius_msg *msg, const u8 *secret, size_t secret_len, const u8 *req_auth) { u8 auth[MD5_MAC_LEN], orig[MD5_MAC_LEN]; u8 orig_authenticator[16]; struct radius_attr_hdr *attr = NULL, *tmp; size_t i; for (i = 0; i < msg->attr_used; i++) { tmp = radius_get_attr_hdr(msg, i); if (tmp->type == RADIUS_ATTR_MESSAGE_AUTHENTICATOR) { if (attr != NULL) { fd_log_debug("Multiple Message-Authenticator attributes in RADIUS message"); return 1; } attr = tmp; } } if (attr == NULL) { fd_log_debug("No Message-Authenticator attribute found"); return 1; } os_memcpy(orig, attr + 1, MD5_MAC_LEN); os_memset(attr + 1, 0, MD5_MAC_LEN); if (req_auth) { os_memcpy(orig_authenticator, msg->hdr->authenticator, sizeof(orig_authenticator)); os_memcpy(msg->hdr->authenticator, req_auth, sizeof(msg->hdr->authenticator)); } hmac_md5(secret, secret_len, msg->buf, msg->buf_used, auth); os_memcpy(attr + 1, orig, MD5_MAC_LEN); if (req_auth) { os_memcpy(msg->hdr->authenticator, orig_authenticator, sizeof(orig_authenticator)); } if (os_memcmp(orig, auth, MD5_MAC_LEN) != 0) { fd_log_debug("Invalid Message-Authenticator!"); return 1; } return 0; } int radius_msg_verify(struct radius_msg *msg, const u8 *secret, size_t secret_len, struct radius_msg *sent_msg, int auth) { const u8 *addr[4]; size_t len[4]; u8 hash[MD5_MAC_LEN]; if (sent_msg == NULL) { fd_log_debug("No matching Access-Request message found"); return 1; } if (auth && radius_msg_verify_msg_auth(msg, secret, secret_len, sent_msg->hdr->authenticator)) { return 1; } /* ResponseAuth = MD5(Code+ID+Length+RequestAuth+Attributes+Secret) */ addr[0] = (u8 *) msg->hdr; len[0] = 1 + 1 + 2; addr[1] = sent_msg->hdr->authenticator; len[1] = MD5_MAC_LEN; addr[2] = (u8 *) (msg->hdr + 1); len[2] = msg->buf_used - sizeof(*msg->hdr); addr[3] = secret; len[3] = secret_len; md5_vector(4, addr, len, hash); if (os_memcmp(hash, msg->hdr->authenticator, MD5_MAC_LEN) != 0) { fd_log_debug("Response Authenticator invalid!"); return 1; } return 0; } int radius_msg_copy_attr(struct radius_msg *dst, struct radius_msg *src, u8 type) { struct radius_attr_hdr *attr; size_t i; int count = 0; for (i = 0; i < src->attr_used; i++) { attr = radius_get_attr_hdr(src, i); if (attr->type == type) { if (!radius_msg_add_attr(dst, type, (u8 *) (attr + 1), attr->length - sizeof(*attr))) return -1; count++; } } return count; } /* Create Request Authenticator. The value should be unique over the lifetime * of the shared secret between authenticator and authentication server. * Use one-way MD5 hash calculated from current timestamp and some data given * by the caller. */ void radius_msg_make_authenticator(struct radius_msg *msg, const u8 *data, size_t len) { struct os_time tv; long int l; const u8 *addr[3]; size_t elen[3]; os_get_time(&tv); l = os_random(); addr[0] = (u8 *) &tv; elen[0] = sizeof(tv); addr[1] = data; elen[1] = len; addr[2] = (u8 *) &l; elen[2] = sizeof(l); md5_vector(3, addr, elen, msg->hdr->authenticator); } /* Get Vendor-specific RADIUS Attribute from a parsed RADIUS message. * Returns the Attribute payload and sets alen to indicate the length of the * payload if a vendor attribute with subtype is found, otherwise returns NULL. * The returned payload is allocated with os_malloc() and caller must free it * by calling os_free(). */ static u8 *radius_msg_get_vendor_attr(struct radius_msg *msg, u32 vendor, u8 subtype, size_t *alen) { u8 *data, *pos; size_t i, len; if (msg == NULL) return NULL; for (i = 0; i < msg->attr_used; i++) { struct radius_attr_hdr *attr = radius_get_attr_hdr(msg, i); size_t left; u32 vendor_id; struct radius_attr_vendor *vhdr; if (attr->type != RADIUS_ATTR_VENDOR_SPECIFIC) continue; left = attr->length - sizeof(*attr); if (left < 4) continue; pos = (u8 *) (attr + 1); os_memcpy(&vendor_id, pos, 4); pos += 4; left -= 4; if (ntohl(vendor_id) != vendor) continue; while (left >= sizeof(*vhdr)) { vhdr = (struct radius_attr_vendor *) pos; if (vhdr->vendor_length > left || vhdr->vendor_length < sizeof(*vhdr)) { left = 0; break; } if (vhdr->vendor_type != subtype) { pos += vhdr->vendor_length; left -= vhdr->vendor_length; continue; } len = vhdr->vendor_length - sizeof(*vhdr); data = os_malloc(len); if (data == NULL) return NULL; os_memcpy(data, pos + sizeof(*vhdr), len); if (alen) *alen = len; return data; } } return NULL; } static u8 * decrypt_ms_key(const u8 *key, size_t len, const u8 *req_authenticator, const u8 *secret, size_t secret_len, size_t *reslen) { u8 *plain, *ppos, *res; const u8 *pos; size_t left, plen; u8 hash[MD5_MAC_LEN]; int i, first = 1; const u8 *addr[3]; size_t elen[3]; /* key: 16-bit salt followed by encrypted key info */ if (len < 2 + 16) return NULL; pos = key + 2; left = len - 2; if (left % 16) { fd_log_debug("Invalid ms key len %lu", (unsigned long) left); return NULL; } plen = left; ppos = plain = os_malloc(plen); if (plain == NULL) return NULL; plain[0] = 0; while (left > 0) { /* b(1) = MD5(Secret + Request-Authenticator + Salt) * b(i) = MD5(Secret + c(i - 1)) for i > 1 */ addr[0] = secret; elen[0] = secret_len; if (first) { addr[1] = req_authenticator; elen[1] = MD5_MAC_LEN; addr[2] = key; elen[2] = 2; /* Salt */ } else { addr[1] = pos - MD5_MAC_LEN; elen[1] = MD5_MAC_LEN; } md5_vector(first ? 3 : 2, addr, elen, hash); first = 0; for (i = 0; i < MD5_MAC_LEN; i++) *ppos++ = *pos++ ^ hash[i]; left -= MD5_MAC_LEN; } if (plain[0] == 0 || plain[0] > plen - 1) { fd_log_debug("Failed to decrypt MPPE key"); os_free(plain); return NULL; } res = os_malloc(plain[0]); if (res == NULL) { os_free(plain); return NULL; } os_memcpy(res, plain + 1, plain[0]); if (reslen) *reslen = plain[0]; os_free(plain); return res; } static void encrypt_ms_key(const u8 *key, size_t key_len, u16 salt, const u8 *req_authenticator, const u8 *secret, size_t secret_len, u8 *ebuf, size_t *elen) { int i, len, first = 1; u8 hash[MD5_MAC_LEN], saltbuf[2], *pos; const u8 *addr[3]; size_t _len[3]; WPA_PUT_BE16(saltbuf, salt); len = 1 + key_len; if (len & 0x0f) { len = (len & 0xf0) + 16; } os_memset(ebuf, 0, len); ebuf[0] = key_len; os_memcpy(ebuf + 1, key, key_len); *elen = len; pos = ebuf; while (len > 0) { /* b(1) = MD5(Secret + Request-Authenticator + Salt) * b(i) = MD5(Secret + c(i - 1)) for i > 1 */ addr[0] = secret; _len[0] = secret_len; if (first) { addr[1] = req_authenticator; _len[1] = MD5_MAC_LEN; addr[2] = saltbuf; _len[2] = sizeof(saltbuf); } else { addr[1] = pos - MD5_MAC_LEN; _len[1] = MD5_MAC_LEN; } md5_vector(first ? 3 : 2, addr, _len, hash); first = 0; for (i = 0; i < MD5_MAC_LEN; i++) *pos++ ^= hash[i]; len -= MD5_MAC_LEN; } } struct radius_ms_mppe_keys * radius_msg_get_ms_keys(struct radius_msg *msg, struct radius_msg *sent_msg, const u8 *secret, size_t secret_len) { u8 *key; size_t keylen; struct radius_ms_mppe_keys *keys; if (msg == NULL || sent_msg == NULL) return NULL; keys = os_zalloc(sizeof(*keys)); if (keys == NULL) return NULL; key = radius_msg_get_vendor_attr(msg, RADIUS_VENDOR_ID_MICROSOFT, RADIUS_VENDOR_ATTR_MS_MPPE_SEND_KEY, &keylen); if (key) { keys->send = decrypt_ms_key(key, keylen, sent_msg->hdr->authenticator, secret, secret_len, &keys->send_len); os_free(key); } key = radius_msg_get_vendor_attr(msg, RADIUS_VENDOR_ID_MICROSOFT, RADIUS_VENDOR_ATTR_MS_MPPE_RECV_KEY, &keylen); if (key) { keys->recv = decrypt_ms_key(key, keylen, sent_msg->hdr->authenticator, secret, secret_len, &keys->recv_len); os_free(key); } return keys; } struct radius_ms_mppe_keys * radius_msg_get_cisco_keys(struct radius_msg *msg, struct radius_msg *sent_msg, const u8 *secret, size_t secret_len) { u8 *key; size_t keylen; struct radius_ms_mppe_keys *keys; if (msg == NULL || sent_msg == NULL) return NULL; keys = os_zalloc(sizeof(*keys)); if (keys == NULL) return NULL; key = radius_msg_get_vendor_attr(msg, RADIUS_VENDOR_ID_CISCO, RADIUS_CISCO_AV_PAIR, &keylen); if (key && keylen == 51 && os_memcmp(key, "leap:session-key=", 17) == 0) { keys->recv = decrypt_ms_key(key + 17, keylen - 17, sent_msg->hdr->authenticator, secret, secret_len, &keys->recv_len); } os_free(key); return keys; } int radius_msg_add_mppe_keys(struct radius_msg *msg, const u8 *req_authenticator, const u8 *secret, size_t secret_len, const u8 *send_key, size_t send_key_len, const u8 *recv_key, size_t recv_key_len) { struct radius_attr_hdr *attr; u32 vendor_id = htonl(RADIUS_VENDOR_ID_MICROSOFT); u8 *buf; struct radius_attr_vendor *vhdr; u8 *pos; size_t elen; int hlen; u16 salt; hlen = sizeof(vendor_id) + sizeof(*vhdr) + 2; /* MS-MPPE-Send-Key */ buf = os_malloc(hlen + send_key_len + 16); if (buf == NULL) { return 0; } pos = buf; os_memcpy(pos, &vendor_id, sizeof(vendor_id)); pos += sizeof(vendor_id); vhdr = (struct radius_attr_vendor *) pos; vhdr->vendor_type = RADIUS_VENDOR_ATTR_MS_MPPE_SEND_KEY; pos = (u8 *) (vhdr + 1); salt = os_random() | 0x8000; WPA_PUT_BE16(pos, salt); pos += 2; encrypt_ms_key(send_key, send_key_len, salt, req_authenticator, secret, secret_len, pos, &elen); vhdr->vendor_length = hlen + elen - sizeof(vendor_id); attr = radius_msg_add_attr(msg, RADIUS_ATTR_VENDOR_SPECIFIC, buf, hlen + elen); os_free(buf); if (attr == NULL) { return 0; } /* MS-MPPE-Recv-Key */ buf = os_malloc(hlen + send_key_len + 16); if (buf == NULL) { return 0; } pos = buf; os_memcpy(pos, &vendor_id, sizeof(vendor_id)); pos += sizeof(vendor_id); vhdr = (struct radius_attr_vendor *) pos; vhdr->vendor_type = RADIUS_VENDOR_ATTR_MS_MPPE_RECV_KEY; pos = (u8 *) (vhdr + 1); salt ^= 1; WPA_PUT_BE16(pos, salt); pos += 2; encrypt_ms_key(recv_key, recv_key_len, salt, req_authenticator, secret, secret_len, pos, &elen); vhdr->vendor_length = hlen + elen - sizeof(vendor_id); attr = radius_msg_add_attr(msg, RADIUS_ATTR_VENDOR_SPECIFIC, buf, hlen + elen); os_free(buf); if (attr == NULL) { return 0; } return 1; } /* Add User-Password attribute to a RADIUS message and encrypt it as specified * in RFC 2865, Chap. 5.2 */ struct radius_attr_hdr * radius_msg_add_attr_user_password(struct radius_msg *msg, const u8 *data, size_t data_len, const u8 *secret, size_t secret_len) { u8 buf[128]; int padlen, i; size_t buf_len, pos; const u8 *addr[2]; size_t len[2]; u8 hash[16]; if (data_len > 128) return NULL; os_memcpy(buf, data, data_len); buf_len = data_len; padlen = data_len % 16; if (padlen) { padlen = 16 - padlen; os_memset(buf + data_len, 0, padlen); buf_len += padlen; } addr[0] = secret; len[0] = secret_len; addr[1] = msg->hdr->authenticator; len[1] = 16; md5_vector(2, addr, len, hash); for (i = 0; i < 16; i++) buf[i] ^= hash[i]; pos = 16; while (pos < buf_len) { addr[0] = secret; len[0] = secret_len; addr[1] = &buf[pos - 16]; len[1] = 16; md5_vector(2, addr, len, hash); for (i = 0; i < 16; i++) buf[pos + i] ^= hash[i]; pos += 16; } return radius_msg_add_attr(msg, RADIUS_ATTR_USER_PASSWORD, buf, buf_len); } int radius_msg_get_attr(struct radius_msg *msg, u8 type, u8 *buf, size_t len) { struct radius_attr_hdr *attr = NULL, *tmp; size_t i, dlen; for (i = 0; i < msg->attr_used; i++) { tmp = radius_get_attr_hdr(msg, i); if (tmp->type == type) { attr = tmp; break; } } if (!attr) return -1; dlen = attr->length - sizeof(*attr); if (buf) os_memcpy(buf, (attr + 1), dlen > len ? len : dlen); return dlen; } int radius_msg_get_attr_ptr(struct radius_msg *msg, u8 type, u8 **buf, size_t *len, const u8 *start) { size_t i; struct radius_attr_hdr *attr = NULL, *tmp; for (i = 0; i < msg->attr_used; i++) { tmp = radius_get_attr_hdr(msg, i); if (tmp->type == type && (start == NULL || (u8 *) tmp > start)) { attr = tmp; break; } } if (!attr) return -1; *buf = (u8 *) (attr + 1); *len = attr->length - sizeof(*attr); return 0; } int radius_msg_count_attr(struct radius_msg *msg, u8 type, int min_len) { size_t i; int count; for (count = 0, i = 0; i < msg->attr_used; i++) { struct radius_attr_hdr *attr = radius_get_attr_hdr(msg, i); if (attr->type == type && attr->length >= sizeof(struct radius_attr_hdr) + min_len) count++; } return count; } struct radius_tunnel_attrs { int tag_used; int type; /* Tunnel-Type */ int medium_type; /* Tunnel-Medium-Type */ int vlanid; }; /** * radius_msg_get_vlanid - Parse RADIUS attributes for VLAN tunnel information * @msg: RADIUS message * Returns: VLAN ID for the first tunnel configuration of -1 if none is found */ int radius_msg_get_vlanid(struct radius_msg *msg) { struct radius_tunnel_attrs tunnel[RADIUS_TUNNEL_TAGS], *tun; size_t i; struct radius_attr_hdr *attr = NULL; const u8 *data; char buf[10]; size_t dlen; os_memset(&tunnel, 0, sizeof(tunnel)); for (i = 0; i < msg->attr_used; i++) { attr = radius_get_attr_hdr(msg, i); data = (const u8 *) (attr + 1); dlen = attr->length - sizeof(*attr); if (attr->length < 3) continue; if (data[0] >= RADIUS_TUNNEL_TAGS) tun = &tunnel[0]; else tun = &tunnel[data[0]]; switch (attr->type) { case RADIUS_ATTR_TUNNEL_TYPE: if (attr->length != 6) break; tun->tag_used++; tun->type = WPA_GET_BE24(data + 1); break; case RADIUS_ATTR_TUNNEL_MEDIUM_TYPE: if (attr->length != 6) break; tun->tag_used++; tun->medium_type = WPA_GET_BE24(data + 1); break; case RADIUS_ATTR_TUNNEL_PRIVATE_GROUP_ID: if (data[0] < RADIUS_TUNNEL_TAGS) { data++; dlen--; } if (dlen >= sizeof(buf)) break; os_memcpy(buf, data, dlen); buf[dlen] = '\0'; tun->tag_used++; tun->vlanid = atoi(buf); break; } } for (i = 0; i < RADIUS_TUNNEL_TAGS; i++) { tun = &tunnel[i]; if (tun->tag_used && tun->type == RADIUS_TUNNEL_TYPE_VLAN && tun->medium_type == RADIUS_TUNNEL_MEDIUM_TYPE_802 && tun->vlanid > 0) return tun->vlanid; } return -1; } void radius_free_class(struct radius_class_data *c) { size_t i; if (c == NULL) return; for (i = 0; i < c->count; i++) os_free(c->attr[i].data); os_free(c->attr); c->attr = NULL; c->count = 0; } int radius_copy_class(struct radius_class_data *dst, const struct radius_class_data *src) { size_t i; if (src->attr == NULL) return 0; dst->attr = os_zalloc(src->count * sizeof(struct radius_attr_data)); if (dst->attr == NULL) return -1; dst->count = 0; for (i = 0; i < src->count; i++) { dst->attr[i].data = os_malloc(src->attr[i].len); if (dst->attr[i].data == NULL) break; dst->count++; os_memcpy(dst->attr[i].data, src->attr[i].data, src->attr[i].len); dst->attr[i].len = src->attr[i].len; } return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/radius.h000066400000000000000000000276611333553357400246720ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /*********************************************************************************/ /* freeDiameter author note: * The content from this file comes mostly from the hostap project. * It is redistributed under the terms of the BSD license, as allowed * by the original copyright reproduced below. * The changes to this file are placed under the copyright of the freeDiameter project. */ /* * hostapd / RADIUS message processing * Copyright (c) 2002-2007, Jouni Malinen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * Alternatively, this software may be distributed under the terms of BSD * license. * * See README and COPYING for more details. */ /*********************************************************************************/ #ifndef RADIUS_H #define RADIUS_H /* RFC 2865 - RADIUS */ #ifdef _MSC_VER #pragma pack(push, 1) #endif /* _MSC_VER */ struct radius_hdr { u8 code; u8 identifier; u16 length; /* including this header */ u8 authenticator[16]; /* followed by length-20 octets of attributes */ } STRUCT_PACKED; enum { RADIUS_CODE_ACCESS_REQUEST = 1, RADIUS_CODE_ACCESS_ACCEPT = 2, RADIUS_CODE_ACCESS_REJECT = 3, RADIUS_CODE_ACCOUNTING_REQUEST = 4, RADIUS_CODE_ACCOUNTING_RESPONSE = 5, RADIUS_CODE_ACCESS_CHALLENGE = 11, RADIUS_CODE_STATUS_SERVER = 12, RADIUS_CODE_STATUS_CLIENT = 13, RADIUS_CODE_RESERVED = 255 }; struct radius_attr_hdr { u8 type; u8 length; /* including this header */ /* followed by length-2 octets of attribute value */ } STRUCT_PACKED; #define RADIUS_MAX_ATTR_LEN (255 - sizeof(struct radius_attr_hdr)) enum { RADIUS_ATTR_USER_NAME = 1, RADIUS_ATTR_USER_PASSWORD = 2, RADIUS_ATTR_NAS_IP_ADDRESS = 4, RADIUS_ATTR_NAS_PORT = 5, RADIUS_ATTR_FRAMED_MTU = 12, RADIUS_ATTR_REPLY_MESSAGE = 18, RADIUS_ATTR_STATE = 24, RADIUS_ATTR_CLASS = 25, RADIUS_ATTR_VENDOR_SPECIFIC = 26, RADIUS_ATTR_SESSION_TIMEOUT = 27, RADIUS_ATTR_IDLE_TIMEOUT = 28, RADIUS_ATTR_TERMINATION_ACTION = 29, RADIUS_ATTR_CALLED_STATION_ID = 30, RADIUS_ATTR_CALLING_STATION_ID = 31, RADIUS_ATTR_NAS_IDENTIFIER = 32, RADIUS_ATTR_PROXY_STATE = 33, RADIUS_ATTR_ACCT_STATUS_TYPE = 40, RADIUS_ATTR_ACCT_DELAY_TIME = 41, RADIUS_ATTR_ACCT_INPUT_OCTETS = 42, RADIUS_ATTR_ACCT_OUTPUT_OCTETS = 43, RADIUS_ATTR_ACCT_SESSION_ID = 44, RADIUS_ATTR_ACCT_AUTHENTIC = 45, RADIUS_ATTR_ACCT_SESSION_TIME = 46, RADIUS_ATTR_ACCT_INPUT_PACKETS = 47, RADIUS_ATTR_ACCT_OUTPUT_PACKETS = 48, RADIUS_ATTR_ACCT_TERMINATE_CAUSE = 49, RADIUS_ATTR_ACCT_MULTI_SESSION_ID = 50, RADIUS_ATTR_ACCT_LINK_COUNT = 51, RADIUS_ATTR_ACCT_INPUT_GIGAWORDS = 52, RADIUS_ATTR_ACCT_OUTPUT_GIGAWORDS = 53, RADIUS_ATTR_EVENT_TIMESTAMP = 55, RADIUS_ATTR_NAS_PORT_TYPE = 61, RADIUS_ATTR_TUNNEL_TYPE = 64, RADIUS_ATTR_TUNNEL_MEDIUM_TYPE = 65, RADIUS_ATTR_CONNECT_INFO = 77, RADIUS_ATTR_EAP_MESSAGE = 79, RADIUS_ATTR_MESSAGE_AUTHENTICATOR = 80, RADIUS_ATTR_TUNNEL_PRIVATE_GROUP_ID = 81, RADIUS_ATTR_ACCT_INTERIM_INTERVAL = 85, RADIUS_ATTR_CHARGEABLE_USER_IDENTITY = 89, RADIUS_ATTR_NAS_IPV6_ADDRESS = 95 }; /* Termination-Action */ #define RADIUS_TERMINATION_ACTION_DEFAULT 0 #define RADIUS_TERMINATION_ACTION_RADIUS_REQUEST 1 /* NAS-Port-Type */ #define RADIUS_NAS_PORT_TYPE_IEEE_802_11 19 /* Acct-Status-Type */ #define RADIUS_ACCT_STATUS_TYPE_START 1 #define RADIUS_ACCT_STATUS_TYPE_STOP 2 #define RADIUS_ACCT_STATUS_TYPE_INTERIM_UPDATE 3 #define RADIUS_ACCT_STATUS_TYPE_ACCOUNTING_ON 7 #define RADIUS_ACCT_STATUS_TYPE_ACCOUNTING_OFF 8 /* Acct-Authentic */ #define RADIUS_ACCT_AUTHENTIC_RADIUS 1 #define RADIUS_ACCT_AUTHENTIC_LOCAL 2 #define RADIUS_ACCT_AUTHENTIC_REMOTE 3 /* Acct-Terminate-Cause */ #define RADIUS_ACCT_TERMINATE_CAUSE_USER_REQUEST 1 #define RADIUS_ACCT_TERMINATE_CAUSE_LOST_CARRIER 2 #define RADIUS_ACCT_TERMINATE_CAUSE_LOST_SERVICE 3 #define RADIUS_ACCT_TERMINATE_CAUSE_IDLE_TIMEOUT 4 #define RADIUS_ACCT_TERMINATE_CAUSE_SESSION_TIMEOUT 5 #define RADIUS_ACCT_TERMINATE_CAUSE_ADMIN_RESET 6 #define RADIUS_ACCT_TERMINATE_CAUSE_ADMIN_REBOOT 7 #define RADIUS_ACCT_TERMINATE_CAUSE_PORT_ERROR 8 #define RADIUS_ACCT_TERMINATE_CAUSE_NAS_ERROR 9 #define RADIUS_ACCT_TERMINATE_CAUSE_NAS_REQUEST 10 #define RADIUS_ACCT_TERMINATE_CAUSE_NAS_REBOOT 11 #define RADIUS_ACCT_TERMINATE_CAUSE_PORT_UNNEEDED 12 #define RADIUS_ACCT_TERMINATE_CAUSE_PORT_PREEMPTED 13 #define RADIUS_ACCT_TERMINATE_CAUSE_PORT_SUSPENDED 14 #define RADIUS_ACCT_TERMINATE_CAUSE_SERVICE_UNAVAILABLE 15 #define RADIUS_ACCT_TERMINATE_CAUSE_CALLBACK 16 #define RADIUS_ACCT_TERMINATE_CAUSE_USER_ERROR 17 #define RADIUS_ACCT_TERMINATE_CAUSE_HOST_REQUEST 18 #define RADIUS_TUNNEL_TAGS 32 /* Tunnel-Type */ #define RADIUS_TUNNEL_TYPE_PPTP 1 #define RADIUS_TUNNEL_TYPE_L2TP 3 #define RADIUS_TUNNEL_TYPE_IPIP 7 #define RADIUS_TUNNEL_TYPE_GRE 10 #define RADIUS_TUNNEL_TYPE_VLAN 13 /* Tunnel-Medium-Type */ #define RADIUS_TUNNEL_MEDIUM_TYPE_IPV4 1 #define RADIUS_TUNNEL_MEDIUM_TYPE_IPV6 2 #define RADIUS_TUNNEL_MEDIUM_TYPE_802 6 struct radius_attr_vendor { u8 vendor_type; u8 vendor_length; } STRUCT_PACKED; #define RADIUS_VENDOR_ID_CISCO 9 #define RADIUS_CISCO_AV_PAIR 1 /* RFC 2548 - Microsoft Vendor-specific RADIUS Attributes */ #define RADIUS_VENDOR_ID_MICROSOFT 311 enum { RADIUS_VENDOR_ATTR_MS_MPPE_SEND_KEY = 16, RADIUS_VENDOR_ATTR_MS_MPPE_RECV_KEY = 17 }; #ifdef _MSC_VER #pragma pack(pop) #endif /* _MSC_VER */ struct radius_ms_mppe_keys { u8 *send; size_t send_len; u8 *recv; size_t recv_len; }; /* RADIUS message structure for new and parsed messages */ struct radius_msg { unsigned char *buf; size_t buf_size; /* total size allocated for buf */ size_t buf_used; /* bytes used in buf */ struct radius_hdr *hdr; size_t *attr_pos; /* array of indexes to attributes (number of bytes * from buf to the beginning of * struct radius_attr_hdr). */ size_t attr_size; /* total size of the attribute pointer array */ size_t attr_used; /* total number of attributes in the array */ }; /* Default size to be allocated for new RADIUS messages */ #define RADIUS_DEFAULT_MSG_SIZE 1024 /* Default size to be allocated for attribute array */ #define RADIUS_DEFAULT_ATTR_COUNT 16 /* MAC address ASCII format for IEEE 802.1X use * (draft-congdon-radius-8021x-20.txt) */ #define RADIUS_802_1X_ADDR_FORMAT "%02X-%02X-%02X-%02X-%02X-%02X" /* MAC address ASCII format for non-802.1X use */ #define RADIUS_ADDR_FORMAT "%02x%02x%02x%02x%02x%02x" struct radius_msg *radius_msg_new(u8 code, u8 identifier); int radius_msg_initialize(struct radius_msg *msg, size_t init_len); void radius_msg_set_hdr(struct radius_msg *msg, u8 code, u8 identifier); void radius_msg_free(struct radius_msg *msg); int radius_msg_finish(struct radius_msg *msg, const u8 *secret, size_t secret_len); int radius_msg_finish_srv(struct radius_msg *msg, const u8 *secret, size_t secret_len, const u8 *req_authenticator); void radius_msg_finish_acct(struct radius_msg *msg, const u8 *secret, size_t secret_len); struct radius_attr_hdr *radius_msg_add_attr(struct radius_msg *msg, u8 type, const u8 *data, size_t data_len); int radius_msg_add_eap(struct radius_msg *msg, const u8 *data, size_t data_len); u8 *radius_msg_get_eap(struct radius_msg *msg, size_t *len); int radius_msg_verify(struct radius_msg *msg, const u8 *secret, size_t secret_len, struct radius_msg *sent_msg, int auth); int radius_msg_verify_msg_auth(struct radius_msg *msg, const u8 *secret, size_t secret_len, const u8 *req_auth); int radius_msg_copy_attr(struct radius_msg *dst, struct radius_msg *src, u8 type); void radius_msg_make_authenticator(struct radius_msg *msg, const u8 *data, size_t len); struct radius_ms_mppe_keys * radius_msg_get_ms_keys(struct radius_msg *msg, struct radius_msg *sent_msg, const u8 *secret, size_t secret_len); struct radius_ms_mppe_keys * radius_msg_get_cisco_keys(struct radius_msg *msg, struct radius_msg *sent_msg, const u8 *secret, size_t secret_len); int radius_msg_add_mppe_keys(struct radius_msg *msg, const u8 *req_authenticator, const u8 *secret, size_t secret_len, const u8 *send_key, size_t send_key_len, const u8 *recv_key, size_t recv_key_len); struct radius_attr_hdr * radius_msg_add_attr_user_password(struct radius_msg *msg, const u8 *data, size_t data_len, const u8 *secret, size_t secret_len); int radius_msg_get_attr(struct radius_msg *msg, u8 type, u8 *buf, size_t len); int radius_msg_get_vlanid(struct radius_msg *msg); static inline int radius_msg_add_attr_int32(struct radius_msg *msg, u8 type, u32 value) { u32 val = htonl(value); return radius_msg_add_attr(msg, type, (u8 *) &val, 4) != NULL; } int radius_msg_add_attr_to_array(struct radius_msg *msg, struct radius_attr_hdr *attr); static inline int radius_msg_get_attr_int32(struct radius_msg *msg, u8 type, u32 *value) { u32 val; int res; res = radius_msg_get_attr(msg, type, (u8 *) &val, 4); if (res != 4) return -1; *value = ntohl(val); return 0; } int radius_msg_get_attr_ptr(struct radius_msg *msg, u8 type, u8 **buf, size_t *len, const u8 *start); int radius_msg_count_attr(struct radius_msg *msg, u8 type, int min_len); struct radius_attr_data { u8 *data; size_t len; }; struct radius_class_data { struct radius_attr_data *attr; size_t count; }; void radius_free_class(struct radius_class_data *c); int radius_copy_class(struct radius_class_data *dst, const struct radius_class_data *src); #endif /* RADIUS_H */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/rgw.h000066400000000000000000000135211333553357400241700ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* This file contains the definitions for the app_radgw internal use. */ #ifndef _RGW_H #define _RGW_H /* include the common definitions */ #include "rgw_common.h" /* RADIUS messages + metadata */ struct rgw_radius_msg_meta { /* The RADIUS message */ struct radius_msg radius; /* Metadata */ struct { /* The port it was sent from, in network byte order */ unsigned port :16; /* received on ACCT or AUTH port? */ unsigned serv_type :2; /* The message has a valid Message-Authenticator attribute */ unsigned valid_mac :1; }; /* For Proxy-State attributes: */ int ps_first; /* The index of the first Proxy-State attribute in radius.attr_pos. It is always >= radius.attr_used */ int ps_nb; /* The number of Proxy-State attributes. The real radius.attr_pos size is attr_used + ps_nb */ }; void rgw_msg_free(struct rgw_radius_msg_meta ** msg); int rgw_msg_parse(unsigned char * buf, size_t len, struct rgw_radius_msg_meta ** msg); void rgw_msg_dump(struct rgw_radius_msg_meta * msg, int has_meta); /* Local RADIUS server(s) configuration */ struct rgw_serv { unsigned disabled :1; unsigned ip_disabled :1; unsigned ip6_disabled :1; unsigned :13; /* padding */ uint16_t port; /* stored in network byte order */ struct in_addr ip_endpoint; struct in6_addr ip6_endpoint; }; extern struct rgw_servs { struct rgw_serv auth_serv; struct rgw_serv acct_serv; } rgw_servers; int rgw_servers_init(void); int rgw_servers_start(void); void rgw_servers_dump(void); int rgw_servers_send(int type, unsigned char *buf, size_t buflen, struct sockaddr *to, uint16_t to_port); void rgw_servers_fini(void); /* Clients management */ enum rgw_cli_type { RGW_CLI_NAS, RGW_CLI_PXY }; int rgw_clients_auth_check(struct rgw_radius_msg_meta * msg, struct rgw_client * cli, uint8_t * req_auth); int rgw_clients_add( struct sockaddr * ip_port, unsigned char ** key, size_t keylen, enum rgw_cli_type type ); int rgw_clients_getkey(struct rgw_client * cli, unsigned char **key, size_t *key_len); int rgw_clients_gettype(struct rgw_client * cli, enum rgw_cli_type *type); int rgw_clients_search(struct sockaddr * ip_port, struct rgw_client ** ref); int rgw_clients_check_dup(struct rgw_radius_msg_meta **msg, struct rgw_client *cli); int rgw_clients_create_origin(struct rgw_radius_msg_meta *msg, struct rgw_client * cli, struct msg ** diam); int rgw_client_finish_send(struct radius_msg ** msg, struct rgw_radius_msg_meta * req, struct rgw_client * cli); int rgw_client_finish_nosend(struct rgw_radius_msg_meta * req, struct rgw_client * cli); void rgw_clients_dispose(struct rgw_client ** ref); void rgw_clients_dump(void); int rgw_clients_init(void); void rgw_clients_fini(void); int rgw_client_session_add(struct rgw_client * cli, struct session *sess, char * dest_realm, char * dest_host, application_id_t appid); int rgw_client_session_stop(struct rgw_client * cli, struct session * sess, int32_t reason); /* Management of plugins */ int rgw_plg_add( char * plgfile, char * conffile, int port, unsigned char ** codes_array, size_t codes_sz ); void rgw_plg_dump(void); void rgw_plg_start_cache(void); int rgw_plg_loop_req(struct rgw_radius_msg_meta **rad, struct msg **diam_msg, struct rgw_client * cli); int rgw_plg_loop_ans(struct rgw_radius_msg_meta *req, struct msg **diam_ans, struct radius_msg ** rad_ans, struct rgw_client * cli); void rgw_plg_fini(void); /* Parse configuration file */ int rgw_conf_handle(char * conffile); /* Worker module, process incoming RADIUS messages (in separated threads) */ int rgw_work_start(void); int rgw_work_add(struct rgw_radius_msg_meta * msg, struct rgw_client * client); void rgw_work_fini(void); #endif /* _RGW_H */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/rgw_clients.c000066400000000000000000001166571333553357400257220ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Manage the list of RADIUS clients, along with their shared secrets. */ /* Probably some changes are needed to support RADIUS Proxies */ #include "rgw.h" #define REVERSE_DNS_SIZE_MAX 512 /* length of our buffer for reverse DNS */ #define DUPLICATE_CHECK_LIFETIME 60 /* number of seconds that the received RADIUS records are kept for duplicate checking . TODO: make it configurable if needed */ /* Ordered lists of clients. The order relationship is a memcmp on the address zone. For same addresses, the port is compared. The same address cannot be added twice, once with a 0-port and once with another port value. */ static struct fd_list cli_ip = FD_LIST_INITIALIZER(cli_ip); static struct fd_list cli_ip6 = FD_LIST_INITIALIZER(cli_ip6); /* Lock to protect the previous lists. We use a rwlock because this list is mostly static, to allow parallel reading */ static pthread_rwlock_t cli_rwl = PTHREAD_RWLOCK_INITIALIZER; /* Structure describing one received RADIUS message, for duplicate checks purpose. */ struct req_info { uint16_t port; /* UDP source port of the request */ uint8_t id; /* The identifier in the request header */ uint8_t auth[16]; /* Request authenticator, since some RADIUS clients do not implement the id mechanism properly. */ struct radius_msg *ans; /* The replied answer if any, in case the previous answer got lost. */ int nbdup; /* Number of times this request was received as a duplicate */ struct fd_list by_id; /* The list of requests ordered by their id, port, and auth */ time_t received; /* When was the last duplicate received? */ struct fd_list by_time; /* The list of requests ordered by the 'received' value . */ }; static pthread_t dbt_expire = (pthread_t)NULL; /* The thread that will remove old requests information from all clients (one thread for all) */ /* Structure describing one client */ struct rgw_client { /* Link information in global list (cli_ip or cli_ip6) */ struct fd_list chain; /* Reference count */ int refcount; /* The address and optional port (alloc'd during configuration file parsing). */ union { struct sockaddr *sa; /* generic pointer */ struct sockaddr_in *sin; struct sockaddr_in6 *sin6; }; /* The FQDN, realm, and optional aliases */ int is_local; /* true if the RADIUS client runs on the same host -- we use Diameter Identity in that case */ enum rgw_cli_type type; /* is it a proxy ? */ DiamId_t fqdn; /* malloc'd here */ size_t fqdn_len; DiamId_t realm; /* references another string, do not free */ size_t realm_len; struct { os0_t name; size_t len; } *aliases; /* Received aliases */ size_t aliases_nb; /* The secret key data. */ struct { unsigned char * data; size_t len; } key; /* information of previous msg received, for duplicate checks. */ struct { pthread_mutex_t dupl_lock; /* The mutex protecting the following lists */ struct fd_list dupl_by_id; /* The list of req_info structures ordered by their id, port, and auth */ struct fd_list dupl_by_time; /* The list of req_info structures ordered by their time (approximative) */ } dupl_info[2]; /*[0] for auth, [1] for acct. */ }; /* Create a new req_info structure and initialize its data from a RADIUS request message */ static struct req_info * dupl_new_req_info(struct rgw_radius_msg_meta *msg) { struct req_info * ret = NULL; CHECK_MALLOC_DO( ret = malloc(sizeof(struct req_info)), return NULL ); memset(ret, 0, sizeof(struct req_info)); ret->port = msg->port; ret->id = msg->radius.hdr->identifier; memcpy(&ret->auth[0], &msg->radius.hdr->authenticator[0], 16); fd_list_init(&ret->by_id, ret); fd_list_init(&ret->by_time, ret); ret->received = time(NULL); return ret; } /* Destroy a req_info structure, after it has been unlinked */ static void dupl_free_req_info(struct req_info * r) { CHECK_PARAMS_DO( r && FD_IS_LIST_EMPTY(&r->by_id) && FD_IS_LIST_EMPTY(&r->by_time), return ); if (r->ans) { /* Free this RADIUS message */ radius_msg_free(r->ans); free(r->ans); } /* Use r->nbdup for some purpose? */ free(r); } /* The core of the purge thread */ static int dupl_purge_list(struct fd_list * clients) { struct fd_list *li = NULL; for (li = clients->next; li != clients; li = li->next) { struct rgw_client * client = (struct rgw_client *)li; int p; for (p=0; p<=1; p++) { /* Lock this list */ time_t now; CHECK_POSIX( pthread_mutex_lock(&client->dupl_info[p].dupl_lock) ); now = time(NULL); while (!FD_IS_LIST_EMPTY(&client->dupl_info[p].dupl_by_time)) { /* Check the first item in the list */ struct req_info * r = (struct req_info *)(client->dupl_info[p].dupl_by_time.next->o); if (now - r->received > DUPLICATE_CHECK_LIFETIME) { TRACE_DEBUG(ANNOYING + 1, "Purging RADIUS request (id: %02hhx, port: %hu, dup #%d, age %ld secs)", r->id, ntohs(r->port), r->nbdup, (long)(now - r->received)); /* Remove this record */ fd_list_unlink(&r->by_time); fd_list_unlink(&r->by_id); dupl_free_req_info(r); } else { /* We are done for this list */ break; } } CHECK_POSIX( pthread_mutex_unlock(&client->dupl_info[p].dupl_lock) ); } } return 0; } /* Thread that purges old RADIUS requests */ static void * dupl_th(void * arg) { /* Set the thread name */ fd_log_threadname ( "app_radgw:duplicate_purge" ); /* The thread will be canceled */ while (1) { /* We don't use a cond var, we simply wake up every 5 seconds. If the size of the duplicate cache is critical, it might be changed */ sleep(5); /* When we wake up, we will check all clients duplicate lists one by one */ CHECK_POSIX_DO( pthread_rwlock_rdlock(&cli_rwl), break ); CHECK_FCT_DO( dupl_purge_list(&cli_ip), break ); CHECK_FCT_DO( dupl_purge_list(&cli_ip6), break ); CHECK_POSIX_DO( pthread_rwlock_unlock(&cli_rwl), break ); /* Loop */ } /* If we reach this part, some fatal error was encountered */ CHECK_FCT_DO(fd_core_shutdown(), ); TRACE_DEBUG(FULL, "Thread terminated"); return NULL; } /* create a new rgw_client. the arguments are MOVED into the structure (to limit malloc & free calls). */ static int client_create(struct rgw_client ** res, struct sockaddr ** ip_port, unsigned char ** key, size_t keylen, enum rgw_cli_type type ) { struct rgw_client *tmp = NULL; DiamId_t fqdn; size_t fqdn_len = 0; int ret, i; int loc = 0; /* Check if the IP address is local */ if ( ( ((*ip_port)->sa_family == AF_INET ) && ( IN_IS_ADDR_LOOPBACK( &((struct sockaddr_in *)(*ip_port))->sin_addr ) ) ) ||( ((*ip_port)->sa_family == AF_INET6) && ( IN6_IS_ADDR_LOOPBACK( &((struct sockaddr_in6 *)(*ip_port))->sin6_addr) ) )) { /* The client is local */ loc = 1; } else { char buf[255]; /* Search FQDN for the client */ ret = getnameinfo( *ip_port, sizeof(struct sockaddr_storage), &buf[0], sizeof(buf), NULL, 0, 0 ); if (ret) { TRACE_DEBUG(INFO, "Unable to resolve peer name: %s", gai_strerror(ret)); return EINVAL; } fqdn = &buf[0]; CHECK_FCT_DO( ret = fd_os_validate_DiameterIdentity(&fqdn, &fqdn_len, 1), { TRACE_DEBUG(INFO, "Unable to use resolved peer name '%s' as DiameterIdentity: %s", buf, strerror(ret)); return ret; } ); } /* Create the new object */ CHECK_MALLOC( tmp = malloc(sizeof (struct rgw_client)) ); memset(tmp, 0, sizeof(struct rgw_client)); fd_list_init(&tmp->chain, NULL); /* Initialize the duplicate list info */ for (i=0; i<=1; i++) { CHECK_POSIX( pthread_mutex_init(&tmp->dupl_info[i].dupl_lock, NULL) ); fd_list_init(&tmp->dupl_info[i].dupl_by_id, NULL); fd_list_init(&tmp->dupl_info[i].dupl_by_time, NULL); } tmp->type = type; if (loc) { tmp->is_local = 1; } else { /* Copy the fqdn */ tmp->fqdn = fqdn; tmp->fqdn_len = fqdn_len; /* Find an appropriate realm */ tmp->realm = strchr(fqdn, '.'); if (tmp->realm) { tmp->realm += 1; tmp->realm_len = tmp->fqdn_len - (tmp->realm - fqdn); } if ((!tmp->realm) || (*tmp->realm == '\0')) { /* in case the fqdn was "localhost." for example, if it is possible... */ tmp->realm = fd_g_config->cnf_diamrlm; tmp->realm_len = fd_g_config->cnf_diamrlm_len; } } /* move the sa info reference */ tmp->sa = *ip_port; *ip_port = NULL; /* move the key material */ tmp->key.data = *key; tmp->key.len = keylen; *key = NULL; /* Done! */ *res = tmp; return 0; } /* Decrease refcount on a client; the lock must be held when this function is called. */ static void client_unlink(struct rgw_client * client) { client->refcount -= 1; if (client->refcount <= 0) { int idx; /* to be sure: the refcount should be 0 only when client_fini is called */ ASSERT( FD_IS_LIST_EMPTY(&client->chain) ); /* Free the data */ for (idx = 0; idx < client->aliases_nb; idx++) free(client->aliases[idx].name); free(client->aliases); free(client->fqdn); free(client->sa); free(client->key.data); /* Free the duplicate info */ for (idx=0; idx <= 1; idx++){ CHECK_POSIX_DO( pthread_mutex_lock( &client->dupl_info[idx].dupl_lock ), /* continue */ ); while (!FD_IS_LIST_EMPTY(&client->dupl_info[idx].dupl_by_id)) { struct req_info * r = (struct req_info *)(client->dupl_info[idx].dupl_by_id.next->o); fd_list_unlink( &r->by_id ); fd_list_unlink( &r->by_time ); dupl_free_req_info(r); } CHECK_POSIX_DO( pthread_mutex_unlock( &client->dupl_info[idx].dupl_lock ), /* continue */ ); } free(client); } } /* Macro to avoid duplicating the code in the next function */ #define client_search_family( _family_ ) \ case AF_INET##_family_: { \ struct sockaddr_in##_family_ * sin##_family_ = (struct sockaddr_in##_family_ *)ip_port; \ for (ref = cli_ip##_family_.next; ref != &cli_ip##_family_; ref = ref->next) { \ cmp = memcmp(&sin##_family_->sin##_family_##_addr, \ &((struct rgw_client *)ref)->sin##_family_->sin##_family_##_addr, \ sizeof(struct in##_family_##_addr)); \ if (cmp > 0) continue; /* search further in the list */ \ if (cmp < 0) break; /* this IP is not in the list */ \ /* Now compare the ports as follow: */ \ /* If the ip_port we are searching does not contain a port, just return the first match result */ \ if ( (sin##_family_->sin##_family_##_port == 0) \ /* If the entry in the list does not contain a port, return it as a match */ \ || (((struct rgw_client *)ref)->sin##_family_->sin##_family_##_port == 0) \ /* If both ports are equal, it is a match */ \ || (sin##_family_->sin##_family_##_port == \ ((struct rgw_client *)ref)->sin##_family_->sin##_family_##_port)) { \ *res = (struct rgw_client *)ref; \ return EEXIST; \ } \ /* Otherwise, the list is ordered by port value (byte order does not matter */ \ if (sin##_family_->sin##_family_##_port \ > ((struct rgw_client *)ref)->sin##_family_->sin##_family_##_port) continue; \ else break; \ } \ *res = (struct rgw_client *)(ref->prev); \ return ENOENT; \ } /* Function to look for an existing rgw_client, or the previous element. The cli_rwl must be held for reading (at least) when calling this function. Returns ENOENT if the matching client does not exist, and res points to the previous element in the list. Returns EEXIST if the matching client is found, and res points to this element. Returns other error code on other error. */ static int client_search(struct rgw_client ** res, struct sockaddr * ip_port ) { int cmp; struct fd_list *ref = NULL; CHECK_PARAMS(res && ip_port); switch (ip_port->sa_family) { client_search_family() break; client_search_family( 6 ) break; } /* We're never supposed to reach this point */ ASSERT(0); return EINVAL; } int rgw_clients_getkey(struct rgw_client * cli, unsigned char **key, size_t *key_len) { CHECK_PARAMS( cli && key && key_len ); *key = cli->key.data; *key_len = cli->key.len; return 0; } int rgw_clients_gettype(struct rgw_client * cli, enum rgw_cli_type *type) { CHECK_PARAMS( cli && type ); *type = cli->type; return 0; } int rgw_clients_search(struct sockaddr * ip_port, struct rgw_client ** ref) { int ret = 0; TRACE_ENTRY("%p %p", ip_port, ref); CHECK_PARAMS(ip_port && ref); CHECK_POSIX( pthread_rwlock_rdlock(&cli_rwl) ); ret = client_search(ref, ip_port); if (ret == EEXIST) { (*ref)->refcount ++; ret = 0; } else { *ref = NULL; } CHECK_POSIX( pthread_rwlock_unlock(&cli_rwl) ); return ret; } int rgw_clients_check_dup(struct rgw_radius_msg_meta **msg, struct rgw_client *cli) { int p, dup = 0; struct fd_list * li; struct req_info * r; TRACE_ENTRY("%p %p", msg, cli); CHECK_PARAMS( msg && cli ); if ((*msg)->serv_type == RGW_PLG_TYPE_AUTH) p = 0; else p = 1; CHECK_POSIX( pthread_mutex_lock( &cli->dupl_info[p].dupl_lock ) ); /* Search if we have this message in our list */ for (li = cli->dupl_info[p].dupl_by_id.next; li != &cli->dupl_info[p].dupl_by_id; li = li->next) { int cmp = 0; r = (struct req_info *)(li->o); if (r->id < (*msg)->radius.hdr->identifier) continue; if (r->id > (*msg)->radius.hdr->identifier) break; if (r->port < (*msg)->port) continue; if (r->port > (*msg)->port) break; cmp = memcmp(&r->auth[0], &(*msg)->radius.hdr->authenticator[0], 16); if (cmp < 0) continue; if (cmp > 0) break; dup = 1; break; } if (dup) { time_t now = time(NULL); r->nbdup += 1; TRACE_DEBUG(INFO, "Received duplicated RADIUS message (id: %02hhx, port: %hu, dup #%d, previously seen %ld secs ago).", r->id, ntohs(r->port), r->nbdup, (long)(now - r->received)); if (r->ans) { /* Resend the answer */ CHECK_FCT_DO( rgw_servers_send((*msg)->serv_type, r->ans->buf, r->ans->buf_used, cli->sa, r->port), ); /* Should we delete 'r' so that a further duplicate will again be converted to Diameter? */ } /* Update the timestamp */ r->received = now; fd_list_unlink(&r->by_time); fd_list_insert_before(&cli->dupl_info[p].dupl_by_time, &r->by_time); /* Move as last entry, since it is the most recent */ /* Delete the request message */ rgw_msg_free(msg); } else { /* The message was not a duplicate, we save it */ /* li currently points the the next entry in list_by_id */ CHECK_MALLOC_DO( r= dupl_new_req_info(*msg), { CHECK_POSIX_DO(pthread_mutex_unlock( &cli->dupl_info[p].dupl_lock ), ); return ENOMEM; } ); fd_list_insert_before(li, &r->by_id); fd_list_insert_before(&cli->dupl_info[p].dupl_by_time, &r->by_time); /* it is the most recent */ } CHECK_POSIX( pthread_mutex_unlock( &cli->dupl_info[p].dupl_lock ) ); return 0; } /* Check if the message has a valid authenticator, and update the meta-data accordingly */ int rgw_clients_auth_check(struct rgw_radius_msg_meta * msg, struct rgw_client * cli, uint8_t * req_auth) { unsigned char * key; size_t keylen; int count; TRACE_ENTRY("%p %p %p", msg, cli, req_auth); CHECK_PARAMS(msg && cli); CHECK_FCT(rgw_clients_getkey(cli, &key, &keylen)); count = radius_msg_count_attr(&msg->radius, RADIUS_ATTR_MESSAGE_AUTHENTICATOR, 0); if (count > 1) { TRACE_DEBUG(INFO, "Too many Message-Authenticator attributes (%d), discarding message.", count); return EINVAL; } if (count == 0) { TRACE_DEBUG(FULL, "Message does not contain a Message-Authenticator attributes."); msg->valid_mac = 0; } else { if (radius_msg_verify_msg_auth( &msg->radius, key, keylen, req_auth )) { TRACE_DEBUG(INFO, "Invalid Message-Authenticator received, discarding message."); return EINVAL; } msg->valid_mac = 1; } return 0; } static struct dict_object * cache_orig_host = NULL; static struct dict_object * cache_orig_realm = NULL; static struct dict_object * cache_route_record = NULL; int rgw_clients_init(void) { TRACE_ENTRY(); CHECK_FCT( fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Host", &cache_orig_host, ENOENT) ); CHECK_FCT( fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Realm", &cache_orig_realm, ENOENT) ); CHECK_FCT( fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Route-Record", &cache_route_record, ENOENT) ); /* Create the thread that will purge old RADIUS duplicates */ CHECK_POSIX( pthread_create( &dbt_expire, NULL, dupl_th, NULL) ); return 0; } /* The following function checks if a RADIUS message contains a valid NAS identifier, and initializes an empty Diameter message with the appropriate routing information */ /* Check that the NAS-IP-Adress or NAS-Identifier is coherent with the IP the packet was received from */ /* Also update the client list of aliases if needed */ int rgw_clients_create_origin(struct rgw_radius_msg_meta *msg, struct rgw_client * cli, struct msg ** diam) { int idx; int valid_nas_info = 0; struct radius_attr_hdr *nas_ip = NULL, *nas_ip6 = NULL, *nas_id = NULL; size_t nas_id_len; char * oh_str = NULL; size_t oh_strlen = 0; int oh_free = 0; char * or_str = NULL; size_t or_strlen = 0; char * rr_str = NULL; size_t rr_strlen = 0; char buf[REVERSE_DNS_SIZE_MAX]; /* to store DNS lookups results */ struct avp *avp = NULL; union avp_value avp_val; TRACE_ENTRY("%p %p %p", msg, cli, diam); CHECK_PARAMS(msg && cli && diam && (*diam == NULL)); /* Find the relevant attributes, if any */ for (idx = 0; idx < msg->radius.attr_used; idx++) { struct radius_attr_hdr * attr = (struct radius_attr_hdr *)(msg->radius.buf + msg->radius.attr_pos[idx]); size_t attr_len = attr->length - sizeof(struct radius_attr_hdr); if ((attr->type == RADIUS_ATTR_NAS_IP_ADDRESS) && (attr_len = 4)) { nas_ip = attr; continue; } if ((attr->type == RADIUS_ATTR_NAS_IDENTIFIER) && (attr_len > 0)) { nas_id = attr; nas_id_len = attr_len; continue; } if ((attr->type == RADIUS_ATTR_NAS_IPV6_ADDRESS) && (attr_len = 16)) { nas_ip6 = attr; continue; } } if (!nas_ip && !nas_ip6 && !nas_id) { TRACE_DEBUG(FULL, "The message does not contain any NAS identification attribute."); /* Get information on this peer */ CHECK_FCT( rgw_clients_get_origin(cli, &oh_str, &oh_strlen, &or_str, &or_strlen) ); goto diameter; } /* Check if the message was received from the IP in NAS-IP-Address attribute */ if (nas_ip && (cli->sa->sa_family == AF_INET) && !memcmp(nas_ip+1, &cli->sin->sin_addr, sizeof(struct in_addr))) { TRACE_DEBUG(FULL, "NAS-IP-Address contains the same address as the message was received from."); valid_nas_info |= 1; } if (nas_ip6 && (cli->sa->sa_family == AF_INET6) && !memcmp(nas_ip6+1, &cli->sin6->sin6_addr, sizeof(struct in6_addr))) { TRACE_DEBUG(FULL, "NAS-IPv6-Address contains the same address as the message was received from."); valid_nas_info |= 2; } /* In RADIUS it would be possible for a rogue NAS to forge the NAS-IP- Address attribute value. Diameter/RADIUS translation agents MUST check a received NAS-IP-Address or NAS-IPv6-Address attribute against the source address of the RADIUS packet. If they do not match and the Diameter/RADIUS translation agent does not know whether the packet was sent by a RADIUS proxy or NAS (e.g., no Proxy-State attribute), then by default it is assumed that the source address corresponds to a RADIUS proxy, and that the NAS Address is behind that proxy, potentially with some additional RADIUS proxies in between. The Diameter/RADIUS translation agent MUST insert entries in the Route-Record AVP corresponding to the apparent route. This implies doing a reverse lookup on the source address and NAS-IP- Address or NAS-IPv6-Address attributes to determine the corresponding FQDNs. If the source address and the NAS-IP-Address or NAS-IPv6-Address do not match, and the Diameter/RADIUS translation agent knows that it is talking directly to the NAS (e.g., there are no RADIUS proxies between it and the NAS), then the error should be logged, and the packet MUST be discarded. Diameter agents and servers MUST check whether the NAS-IP-Address AVP corresponds to an entry in the Route-Record AVP. This is done by doing a reverse lookup (PTR RR) for the NAS-IP-Address to retrieve the corresponding FQDN, and by checking for a match with the Route- Record AVP. If no match is found, then an error is logged, but no other action is taken. */ if (nas_ip || nas_ip6) { if (!valid_nas_info) { if ((!cli->is_local) && (cli->type == RGW_CLI_NAS)) { TRACE_DEBUG(INFO, "Message received with a NAS-IP-Address or NAS-IPv6-Address different from the sender's. Please configure as Proxy if this is expected. Message discarded."); return EINVAL; } else { int ret; sSS ss; /* the peer is configured as a proxy, or running on localhost, so accept the message */ /* In that case, the cli will be stored as Route-Record and the NAS-IP-Address as origin */ if (!cli->is_local) { rr_str = cli->fqdn; rr_strlen = cli->fqdn_len; } /* We must DNS-reverse the NAS-IP*-Address */ memset(&ss, 0 , sizeof(sSS)); if (nas_ip) { sSA4 * sin = (sSA4 *)&ss; sin->sin_family = AF_INET; memcpy(&sin->sin_addr, nas_ip + 1, sizeof(struct in_addr)); } else { sSA6 * sin6 = (sSA6 *)&ss; sin6->sin6_family = AF_INET6; memcpy(&sin6->sin6_addr, nas_ip6 + 1, sizeof(struct in6_addr)); } CHECK_SYS_DO( getnameinfo( (sSA *)&ss, sSAlen(&ss), &buf[0], sizeof(buf), NULL, 0, NI_NAMEREQD), { if (cli->is_local) { CHECK_FCT( rgw_clients_get_origin(cli, &oh_str, &oh_strlen, &or_str, &or_strlen) ); goto diameter; } TRACE_DEBUG(INFO, "The NAS-IP*-Address cannot be DNS reversed in order to create the Origin-Host AVP; rejecting the message (translation is impossible)."); return EINVAL; } ); oh_str = &buf[0]; CHECK_FCT_DO( ret = fd_os_validate_DiameterIdentity(&oh_str, &oh_strlen, 1), { if (cli->is_local) { CHECK_FCT( rgw_clients_get_origin(cli, &oh_str, &oh_strlen, &or_str, &or_strlen) ); goto diameter; } TRACE_DEBUG(INFO, "Unable to use resolved client name '%s' as DiameterIdentity: %s", buf, strerror(ret)); return ret; } ); oh_free = 1; or_str = strchr(oh_str, '.'); if (or_str) { or_str ++; /* move after the first dot */ if (*or_str == '\0') or_str = NULL; /* Discard this realm, we will use the local realm later */ else or_strlen = oh_strlen - (or_str - oh_str); } } } else { /* The attribute matches the source address, just use this in origin-host */ CHECK_FCT( rgw_clients_get_origin(cli, &oh_str, &oh_strlen, &or_str, &or_strlen) ); } goto diameter; /* we ignore the nas_id in that case */ } /* We don't have a NAS-IP*-Address attribute if we are here */ if (cli->is_local) { /* Simple: we use our own configuration */ CHECK_FCT( rgw_clients_get_origin(cli, &oh_str, &oh_strlen, &or_str, &or_strlen) ); goto diameter; } /* At this point, we only have nas_id, and the client is not local */ ASSERT(nas_id); { int found, ret; struct addrinfo hint, *res, *ptr; /* In RADIUS it would be possible for a rogue NAS to forge the NAS- Identifier attribute. Diameter/RADIUS translation agents SHOULD attempt to check a received NAS-Identifier attribute against the source address of the RADIUS packet, by doing an A/AAAA RR query. If the NAS-Identifier attribute contains an FQDN, then such a query would resolve to an IP address matching the source address. However, the NAS-Identifier attribute is not required to contain an FQDN, so such a query could fail. If it fails, an error should be logged, but no action should be taken, other than a reverse lookup on the source address and insert the resulting FQDN into the Route-Record AVP. Diameter agents and servers SHOULD check whether a NAS-Identifier AVP corresponds to an entry in the Route-Record AVP. If no match is found, then an error is logged, but no other action is taken. */ /* first, check if the nas_id is the fqdn of the peer or a known alias */ if (!fd_os_almostcasesrch(nas_id + 1, nas_id_len, cli->fqdn, cli->fqdn_len, NULL)) { TRACE_DEBUG(FULL, "NAS-Identifier contains the fqdn of the client"); found = 1; } else { for (idx = 0; idx < cli->aliases_nb; idx++) { if (!fd_os_cmp(nas_id + 1, nas_id_len, cli->aliases[idx].name, cli->aliases[idx].len)) { TRACE_DEBUG(FULL, "NAS-Identifier valid value found in the cache"); found = 1; break; } } } if (found) { /* The NAS-Identifier matches the source IP */ CHECK_FCT( rgw_clients_get_origin(cli, &oh_str, &oh_strlen, &or_str, &or_strlen) ); goto diameter; } /* Attempt DNS resolution of the identifier */ ASSERT( nas_id_len < sizeof(buf) ); memcpy(buf, nas_id + 1, nas_id_len); buf[nas_id->length - sizeof(struct radius_attr_hdr)] = '\0'; /* Now check if this alias is valid for this peer */ memset(&hint, 0, sizeof(hint)); hint.ai_flags = AI_CANONNAME; ret = getaddrinfo(buf, NULL, &hint, &res); if (ret == 0) { strncpy(buf, res->ai_canonname, sizeof(buf)); /* The name was resolved correctly, does it match the IP of the client? */ for (ptr = res; ptr != NULL; ptr = ptr->ai_next) { if (cli->sa->sa_family != ptr->ai_family) continue; if (memcmp(cli->sa, ptr->ai_addr, sSAlen(cli->sa))) continue; found = 1; break; } freeaddrinfo(res); if (!found) { if (cli->type == RGW_CLI_NAS) { TRACE_DEBUG(INFO, "The NAS-Identifier value '%.*s' resolves to a different IP than the client's, discarding the message. Configure this client as a Proxy if this message should be valid.", (int)nas_id_len, (char *)(nas_id + 1)); return EINVAL; } else { /* This identifier matches a different IP, assume it is a proxied message */ if (!cli->is_local) { rr_str = cli->fqdn; rr_strlen = cli->fqdn_len; } oh_str = &buf[0]; /* The canonname resolved */ oh_strlen = 0; CHECK_FCT_DO( ret = fd_os_validate_DiameterIdentity(&oh_str, &oh_strlen, 1), { TRACE_DEBUG(INFO, "Unable to use resolved client name '%s' as DiameterIdentity: %s", buf, strerror(ret)); return ret; } ); oh_free = 1; or_str = strchr(oh_str, '.'); if (or_str) { or_str ++; /* move after the first dot */ if (*or_str == '\0') or_str = NULL; /* Discard this realm, we will use the local realm later */ else or_strlen = oh_strlen - (or_str - oh_str); } } } else { /* It is a valid alias, save it */ CHECK_MALLOC( cli->aliases = realloc(cli->aliases, (cli->aliases_nb + 1) * sizeof(cli->aliases[0])) ); CHECK_MALLOC( cli->aliases[cli->aliases_nb + 1].name = os0dup(nas_id + 1, nas_id_len ) ); cli->aliases[cli->aliases_nb + 1].len = nas_id_len; cli->aliases_nb ++; TRACE_DEBUG(FULL, "Saved valid alias for client: '%.*s' -> '%s'", (int)nas_id_len, (char *)(nas_id + 1), cli->fqdn); CHECK_FCT( rgw_clients_get_origin(cli, &oh_str, &oh_strlen, &or_str, &or_strlen) ); } } else { /* Error resolving the name */ TRACE_DEBUG(INFO, "NAS-Identifier '%s' cannot be resolved: %s. Ignoring...", buf, gai_strerror(ret)); /* Assume this is a valid identifier for the client */ CHECK_FCT( rgw_clients_get_origin(cli, &oh_str, &oh_strlen, &or_str, &or_strlen) ); } } /* Now, let's create the empty Diameter message with Origin-Host, -Realm, and Route-Record if needed. */ diameter: ASSERT(oh_str); /* If it is not defined here, there is a bug... */ if (!or_str) { or_str = fd_g_config->cnf_diamrlm; /* Use local realm in that case */ or_strlen = fd_g_config->cnf_diamrlm_len; } /* Create an empty Diameter message so that extensions can store their AVPs */ CHECK_FCT( fd_msg_new ( NULL, MSGFL_ALLOC_ETEID, diam ) ); /* Add the Origin-Host as next AVP */ CHECK_FCT( fd_msg_avp_new ( cache_orig_host, 0, &avp ) ); memset(&avp_val, 0, sizeof(avp_val)); avp_val.os.data = (unsigned char *)oh_str; avp_val.os.len = oh_strlen; CHECK_FCT( fd_msg_avp_setvalue ( avp, &avp_val ) ); CHECK_FCT( fd_msg_avp_add ( *diam, MSG_BRW_LAST_CHILD, avp) ); /* Add the Origin-Realm as next AVP */ CHECK_FCT( fd_msg_avp_new ( cache_orig_realm, 0, &avp ) ); memset(&avp_val, 0, sizeof(avp_val)); avp_val.os.data = (unsigned char *)or_str; avp_val.os.len = or_strlen; CHECK_FCT( fd_msg_avp_setvalue ( avp, &avp_val ) ); CHECK_FCT( fd_msg_avp_add ( *diam, MSG_BRW_LAST_CHILD, avp) ); if (rr_str) { CHECK_FCT( fd_msg_avp_new ( cache_route_record, 0, &avp ) ); memset(&avp_val, 0, sizeof(avp_val)); avp_val.os.data = (unsigned char *)rr_str; avp_val.os.len = rr_strlen; CHECK_FCT( fd_msg_avp_setvalue ( avp, &avp_val ) ); CHECK_FCT( fd_msg_avp_add ( *diam, MSG_BRW_LAST_CHILD, avp) ); } if (oh_free) free(oh_str); /* Done! */ return 0; } int rgw_clients_get_origin(struct rgw_client *cli, DiamId_t *fqdn, size_t *fqdnlen, DiamId_t *realm, size_t *realmlen) { TRACE_ENTRY("%p %p %p %p %p", cli, fqdn, fqdnlen, realm, realmlen); CHECK_PARAMS(cli && fqdn && fqdnlen); if (cli->is_local) { *fqdn = fd_g_config->cnf_diamid; *fqdnlen = fd_g_config->cnf_diamid_len; if (realm) *realm= fd_g_config->cnf_diamrlm; if (realmlen) *realmlen= fd_g_config->cnf_diamrlm_len; } else { *fqdn = cli->fqdn; *fqdnlen = cli->fqdn_len; if (realm) *realm= cli->realm; if (realmlen) *realmlen= cli->realm_len; } return 0; } char * rgw_clients_id(struct rgw_client *cli) { return cli->is_local ? "(local)" : cli->fqdn; } void rgw_clients_dispose(struct rgw_client ** ref) { TRACE_ENTRY("%p", ref); CHECK_PARAMS_DO(ref, return); CHECK_POSIX_DO( pthread_rwlock_wrlock(&cli_rwl), ); client_unlink(*ref); *ref = NULL; CHECK_POSIX_DO( pthread_rwlock_unlock(&cli_rwl), ); } int rgw_clients_add( struct sockaddr * ip_port, unsigned char ** key, size_t keylen, enum rgw_cli_type type ) { struct rgw_client * prev = NULL, *new = NULL; int ret; TRACE_ENTRY("%p %p %zu", ip_port, key, keylen); CHECK_PARAMS( ip_port && key && *key && keylen ); CHECK_PARAMS( (ip_port->sa_family == AF_INET) || (ip_port->sa_family == AF_INET6) ); CHECK_PARAMS( (type == RGW_CLI_NAS) || (type == RGW_CLI_PXY) ); /* Dump the entry in debug mode */ if (TRACE_BOOL(FULL + 1 )) { char sa_buf[sSA_DUMP_STRLEN]; fd_sa_sdump_numeric(sa_buf, ip_port); TRACE_DEBUG(FULL, "Adding %s:", (type == RGW_CLI_NAS) ? "NAS" : "PROXY" ); TRACE_DEBUG(FULL, "\tIP : %s", sa_buf ); TRACE_BUFFER(FD_LOG_DEBUG, FULL, "\tKey: [", *key, keylen, "]" ); } /* Lock the lists */ CHECK_POSIX( pthread_rwlock_wrlock(&cli_rwl) ); /* Check if the same entry does not already exist */ ret = client_search(&prev, ip_port ); if (ret == ENOENT) { /* No duplicate found, Ok to add */ CHECK_FCT_DO( ret = client_create( &new, &ip_port, key, keylen, type ), goto end ); fd_list_insert_after(&prev->chain, &new->chain); new->refcount++; ret = 0; goto end; } if (ret == EEXIST) { char sa_buf[sSA_DUMP_STRLEN]; /* Check if the key is the same, then skip or return an error */ if ((keylen == prev->key.len ) && ( ! memcmp(*key, prev->key.data, keylen) ) && (type == prev->type)) { TRACE_DEBUG(INFO, "Skipping duplicate client description"); ret = 0; goto end; } fd_log_error("ERROR: Conflicting RADIUS clients descriptions!"); TRACE_ERROR("Previous entry: %s", (prev->type == RGW_CLI_NAS) ? "NAS" : "PROXY"); fd_sa_sdump_numeric(sa_buf, prev->sa); TRACE_ERROR("\tIP : %s", sa_buf); TRACE_BUFFER(FD_LOG_ERROR, NONE, "\tKey: [", prev->key.data, prev->key.len, "]" ); TRACE_ERROR("Conflicting entry: %s", (type == RGW_CLI_NAS) ? "NAS" : "PROXY"); fd_sa_sdump_numeric(sa_buf, ip_port); TRACE_ERROR("\tIP : %s", sa_buf); TRACE_BUFFER(FD_LOG_ERROR, NONE, "\tKey: [", *key, keylen, "]" ); } end: /* release the lists */ CHECK_POSIX( pthread_rwlock_unlock(&cli_rwl) ); return ret; } static void dump_cli_list(struct fd_list *senti) { struct rgw_client * client = NULL; struct fd_list *ref = NULL; for (ref = senti->next; ref != senti; ref = ref->next) { char sa_buf[sSA_DUMP_STRLEN]; client = (struct rgw_client *)ref; fd_sa_sdump_numeric(sa_buf, client->sa); LOG_D(" - %s%s", sa_buf, (client->type == RGW_CLI_NAS) ? "" : " [PROXY]" ); } } void rgw_clients_dump(void) { if ( ! TRACE_BOOL(FULL) ) return; CHECK_POSIX_DO( pthread_rwlock_rdlock(&cli_rwl), /* ignore error */ ); if (!FD_IS_LIST_EMPTY(&cli_ip)) fd_log_debug(" RADIUS IP clients list:"); dump_cli_list(&cli_ip); if (!FD_IS_LIST_EMPTY(&cli_ip6)) fd_log_debug(" RADIUS IPv6 clients list:"); dump_cli_list(&cli_ip6); CHECK_POSIX_DO( pthread_rwlock_unlock(&cli_rwl), /* ignore error */ ); } void rgw_clients_fini(void) { struct fd_list * client; TRACE_ENTRY(); CHECK_POSIX_DO( pthread_rwlock_wrlock(&cli_rwl), /* ignore error */ ); CHECK_FCT_DO( fd_thr_term(&dbt_expire), /* continue */ ); /* empty the lists */ while ( ! FD_IS_LIST_EMPTY(&cli_ip) ) { client = cli_ip.next; fd_list_unlink(client); client_unlink((struct rgw_client *)client); } while (! FD_IS_LIST_EMPTY(&cli_ip6)) { client = cli_ip6.next; fd_list_unlink(client); client_unlink((struct rgw_client *)client); } CHECK_POSIX_DO( pthread_rwlock_unlock(&cli_rwl), /* ignore error */ ); } int rgw_client_finish_send(struct radius_msg ** msg, struct rgw_radius_msg_meta * req, struct rgw_client * cli) { int p; struct fd_list * li; TRACE_ENTRY("%p %p %p", msg, req, cli); CHECK_PARAMS( msg && *msg && cli ); if (!req) { /* We don't support this case yet */ ASSERT(0); return ENOTSUP; } /* Add all the Proxy-States back in the message */ for (p = 0; p < req->ps_nb; p++) { struct radius_attr_hdr * attr = (struct radius_attr_hdr *)(req->radius.buf + req->radius.attr_pos[req->ps_first + p]); if (radius_msg_add_attr_to_array(*msg, attr)) { TRACE_DEBUG(INFO, "Error in radius_msg_add_attr_to_array, ENOMEM"); radius_msg_free(*msg); free(*msg); *msg = NULL; return ENOMEM; } } /* Add the Message-Authenticator if needed, and other final tasks */ if (radius_msg_finish_srv(*msg, cli->key.data, cli->key.len, req->radius.hdr->authenticator)) { TRACE_DEBUG(INFO, "An error occurred while preparing the RADIUS answer"); radius_msg_free(*msg); free(*msg); *msg = NULL; return EINVAL; } /* Debug */ TRACE_DEBUG(FULL, "RADIUS message ready for sending:"); rgw_msg_dump((struct rgw_radius_msg_meta *)*msg, 0); /* Send the message */ CHECK_FCT( rgw_servers_send(req->serv_type, (*msg)->buf, (*msg)->buf_used, cli->sa, req->port) ); /* update the duplicate cache */ if (req->serv_type == RGW_PLG_TYPE_AUTH) p = 0; else p = 1; CHECK_POSIX( pthread_mutex_lock( &cli->dupl_info[p].dupl_lock ) ); /* Search this message in our list */ for (li = cli->dupl_info[p].dupl_by_id.next; li != &cli->dupl_info[p].dupl_by_id; li = li->next) { int cmp = 0; struct req_info * r = (struct req_info *)(li->o); if (r->id < req->radius.hdr->identifier) continue; if (r->id > req->radius.hdr->identifier) break; if (r->port < req->port) continue; if (r->port > req->port) break; cmp = memcmp(&r->auth[0], &req->radius.hdr->authenticator[0], 16); if (cmp < 0) continue; if (cmp > 0) break; /* We have the request in our duplicate cache */ /* This should not happen, but just in case... */ if (r->ans) { radius_msg_free(r->ans); free(r->ans); } /* Now save the message */ r->ans = *msg; *msg = NULL; /* Update the timestamp */ { time_t now = time(NULL); r->received = now; fd_list_unlink(&r->by_time); /* Move as last entry, since it is the most recent */ fd_list_insert_before(&cli->dupl_info[p].dupl_by_time, &r->by_time); } break; } CHECK_POSIX( pthread_mutex_unlock( &cli->dupl_info[p].dupl_lock ) ); /* If we have not found the request in our list, the purge time is probably too small */ if (*msg) { TODO("Augment the purge time..."); /* If we receive the duplicate request again, it will be converted to Diameter... */ radius_msg_free(*msg); free(*msg); *msg = NULL; } /* Finished */ return 0; } /* Call this function when a RADIUS request has explicitely no answer (mainly accounting) so that we purge the duplicate cache and allow further message to be translated again. This is useful for example when a temporary error occurred in Diameter (like UNABLE_TO_DELIVER) */ int rgw_client_finish_nosend(struct rgw_radius_msg_meta * req, struct rgw_client * cli) { int p; struct fd_list * li; TRACE_ENTRY("%p %p", req, cli); CHECK_PARAMS( req && cli ); /* update the duplicate cache */ if (req->serv_type == RGW_PLG_TYPE_AUTH) p = 0; else p = 1; CHECK_POSIX( pthread_mutex_lock( &cli->dupl_info[p].dupl_lock ) ); /* Search this message in our list */ for (li = cli->dupl_info[p].dupl_by_id.next; li != &cli->dupl_info[p].dupl_by_id; li = li->next) { int cmp = 0; struct req_info * r = (struct req_info *)(li->o); if (r->id < req->radius.hdr->identifier) continue; if (r->id > req->radius.hdr->identifier) break; if (r->port < req->port) continue; if (r->port > req->port) break; cmp = memcmp(&r->auth[0], &req->radius.hdr->authenticator[0], 16); if (cmp < 0) continue; if (cmp > 0) break; /* We have the request in our duplicate cache, remove it */ fd_list_unlink(&r->by_id); fd_list_unlink(&r->by_time); dupl_free_req_info(r); break; } CHECK_POSIX( pthread_mutex_unlock( &cli->dupl_info[p].dupl_lock ) ); /* Finished */ return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/rgw_common.h000066400000000000000000000257041333553357400255460ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* This file contains definitions for both app_radgw extension and its plugins. */ #ifndef _RGW_COMMON_H #define _RGW_COMMON_H /* Include definitions from the freeDiameter framework */ #include /* Include hostap files for RADIUS processings */ #include "hostap_compat.h" #include "md5.h" #include "radius.h" /**************************************************************/ /* Interface with gateway's plug-ins */ /**************************************************************/ /* This structure is private for each plugin */ struct rgwp_config; /* This structure points to a RADIUS client description, the definition is not known to plugins */ struct rgw_client; int rgw_clients_getkey(struct rgw_client * cli, unsigned char **key, size_t *key_len); char * rgw_clients_id(struct rgw_client *cli); int rgw_clients_get_origin(struct rgw_client *cli, DiamId_t *fqdn, size_t *fqdnlen, DiamId_t *realm, size_t *realmlen); /* Each plugin must provide the following structure. */ extern struct rgw_api { /* The name of the plugin */ const char * rgwp_name; /* Parse the configuration file. It may be called several times with different configurations. Called even if no configuration file is passed (with NULL conf_file parameter then) */ int (*rgwp_conf_parse) ( char * conf_file, struct rgwp_config ** state ); /* Cleanup the configuration state when the daemon is exiting (called even if state is NULL). */ void (*rgwp_conf_free) (struct rgwp_config * state); /* handle an incoming RADIUS message */ int (*rgwp_rad_req) ( struct rgwp_config * conf, struct radius_msg * rad_req, struct radius_msg ** rad_ans, struct msg ** diam_fw, struct rgw_client * cli ); /* ret >0: critical error (errno), log and exit. ret 0: continue; ret -1: stop processing this message ret -2: reply the content of rad_ans to the RADIUS client immediatly */ /* handle the corresponding Diameter answer */ int (*rgwp_diam_ans) ( struct rgwp_config * conf, struct msg ** diam_ans, struct radius_msg ** rad_fw, struct rgw_client * cli ); /* ret 0: continue; ret >0: error; ret: -1 ... (tbd) */ } rgwp_descriptor; /**************************************************************/ /* Additional definitions */ /**************************************************************/ /* Type of message / server */ #define RGW_PLG_TYPE_AUTH 1 #define RGW_PLG_TYPE_ACCT 2 /* Class attribute prefix to store the Auth Application Id (required to send STR) */ #define CLASS_AAI_PREFIX "fD/rgwx/aai:" /* Attributes missing from radius.h (not used in EAP) */ enum { RADIUS_ATTR_CHAP_PASSWORD = 3, RADIUS_ATTR_SERVICE_TYPE = 6, RADIUS_ATTR_FRAMED_PROTOCOL = 7, RADIUS_ATTR_FRAMED_IP_ADDRESS = 8, RADIUS_ATTR_FRAMED_IP_NETMASK = 9, RADIUS_ATTR_FRAMED_ROUTING = 10, RADIUS_ATTR_FILTER_ID = 11, RADIUS_ATTR_FRAMED_COMPRESSION = 13, RADIUS_ATTR_LOGIN_IP_HOST = 14, RADIUS_ATTR_LOGIN_SERVICE = 15, RADIUS_ATTR_LOGIN_TCP_PORT = 16, RADIUS_ATTR_CALLBACK_NUMBER = 19, RADIUS_ATTR_CALLBACK_ID = 20, RADIUS_ATTR_FRAMED_ROUTE = 22, RADIUS_ATTR_FRAMED_IPX_NETWORK = 23, RADIUS_ATTR_LOGIN_LAT_SERVICE = 34, RADIUS_ATTR_LOGIN_LAT_NODE = 35, RADIUS_ATTR_LOGIN_LAT_GROUP = 36, RADIUS_ATTR_FRAMED_APPLETALK_LINK = 37, RADIUS_ATTR_FRAMED_APPLETALK_NETWORK = 38, RADIUS_ATTR_FRAMED_APPLETALK_ZONE = 39, RADIUS_ATTR_CHAP_CHALLENGE = 60, RADIUS_ATTR_PORT_LIMIT = 62, RADIUS_ATTR_LOGIN_LAT_PORT = 63, RADIUS_ATTR_TUNNEL_CLIENT_ENDPOINT = 66, RADIUS_ATTR_TUNNEL_SERVER_ENDPOINT = 67, RADIUS_ATTR_TUNNEL_PASSWORD = 69, RADIUS_ATTR_ARAP_PASSWORD = 70, RADIUS_ATTR_ARAP_FEATURES = 71, RADIUS_ATTR_ARAP_ZONE_ACCESS = 72, RADIUS_ATTR_ARAP_SECURITY = 73, RADIUS_ATTR_ARAP_SECURITY_DATA = 74, RADIUS_ATTR_PASSWORD_RETRY = 75, RADIUS_ATTR_PROMPT = 76, RADIUS_ATTR_CONFIGURATION_TOKEN = 78, RADIUS_ATTR_TUNNEL_ASSIGNMENT_ID = 82, RADIUS_ATTR_TUNNEL_PREFERENCE = 83, RADIUS_ATTR_ARAP_CHALLENGE_RESPONSE = 84, RADIUS_ATTR_NAS_PORT_ID = 87, RADIUS_ATTR_FRAMED_POOL = 88, RADIUS_ATTR_TUNNEL_CLIENT_AUTH_ID = 90, RADIUS_ATTR_TUNNEL_SERVER_AUTH_ID = 91, RADIUS_ATTR_ORIGINATING_LINE_INFO = 94, RADIUS_ATTR_FRAMED_INTERFACE_ID = 96, RADIUS_ATTR_FRAMED_IPV6_PREFIX = 97, RADIUS_ATTR_LOGIN_IPV6_HOST = 98, RADIUS_ATTR_FRAMED_IPV6_ROUTE = 99, RADIUS_ATTR_FRAMED_IPV6_POOL = 100, RADIUS_ATTR_ERROR_CAUSE = 101, RADIUS_ATTR_EAP_KEY_NAME = 102, RADIUS_ATTR_DIGEST_RESPONSE = 103, RADIUS_ATTR_DIGEST_REALM = 104, RADIUS_ATTR_DIGEST_NONCE = 105, RADIUS_ATTR_DIGEST_RESPONSE_AUTH=106, RADIUS_ATTR_DIGEST_NEXTNONCE = 107, RADIUS_ATTR_DIGEST_METHOD = 108, RADIUS_ATTR_DIGEST_URI = 109, RADIUS_ATTR_DIGEST_QOP = 110, RADIUS_ATTR_DIGEST_ALGORITHM = 111, RADIUS_ATTR_DIGEST_ENTITY_BODY_HASH=112, RADIUS_ATTR_DIGEST_CNONCE = 113, RADIUS_ATTR_DIGEST_NONCE_COUNT = 114, RADIUS_ATTR_DIGEST_USERNAME = 115, RADIUS_ATTR_DIGEST_HA1 = 121, RADIUS_ATTR_SIP_AOR = 122 }; enum { DIAM_ATTR_USER_NAME = 1, DIAM_ATTR_USER_PASSWORD = 2, DIAM_ATTR_NAS_IP_ADDRESS = 4, DIAM_ATTR_NAS_PORT = 5, DIAM_ATTR_SERVICE_TYPE = 6, DIAM_ATTR_FRAMED_PROTOCOL = 7, DIAM_ATTR_FRAMED_IP_ADDRESS = 8, DIAM_ATTR_FRAMED_IP_NETMASK = 9, DIAM_ATTR_FRAMED_ROUTING = 10, DIAM_ATTR_FILTER_ID = 11, DIAM_ATTR_FRAMED_MTU = 12, DIAM_ATTR_FRAMED_COMPRESSION = 13, DIAM_ATTR_LOGIN_IP_HOST = 14, DIAM_ATTR_LOGIN_SERVICE = 15, DIAM_ATTR_LOGIN_TCP_PORT = 16, DIAM_ATTR_REPLY_MESSAGE = 18, DIAM_ATTR_CALLBACK_NUMBER = 19, DIAM_ATTR_CALLBACK_ID = 20, DIAM_ATTR_FRAMED_ROUTE = 22, DIAM_ATTR_FRAMED_IPX_NETWORK = 23, DIAM_ATTR_STATE = 24, DIAM_ATTR_CLASS = 25, DIAM_ATTR_IDLE_TIMEOUT = 28, DIAM_ATTR_NAS_IDENTIFIER = 32, DIAM_ATTR_LOGIN_LAT_SERVICE = 34, DIAM_ATTR_LOGIN_LAT_NODE = 35, DIAM_ATTR_LOGIN_LAT_GROUP = 36, DIAM_ATTR_FRAMED_APPLETALK_LINK = 37, DIAM_ATTR_FRAMED_APPLETALK_NETWORK = 38, DIAM_ATTR_FRAMED_APPLETALK_ZONE = 39, DIAM_ATTR_ACCT_SESSION_ID = 44, DIAM_ATTR_ACCT_MULTI_SESSION_ID = 50, DIAM_ATTR_EVENT_TIMESTAMP = 55, DIAM_ATTR_NAS_PORT_TYPE = 61, DIAM_ATTR_PORT_LIMIT = 62, DIAM_ATTR_LOGIN_LAT_PORT = 63, DIAM_ATTR_TUNNEL_TYPE = 64, DIAM_ATTR_TUNNEL_MEDIUM_TYPE = 65, DIAM_ATTR_TUNNEL_CLIENT_ENDPOINT = 66, DIAM_ATTR_TUNNEL_SERVER_ENDPOINT = 67, DIAM_ATTR_TUNNEL_PASSWORD = 69, DIAM_ATTR_ARAP_FEATURES = 71, DIAM_ATTR_ARAP_ZONE_ACCESS = 72, DIAM_ATTR_ARAP_SECURITY = 73, DIAM_ATTR_ARAP_SECURITY_DATA = 74, DIAM_ATTR_PASSWORD_RETRY = 75, DIAM_ATTR_PROMPT = 76, DIAM_ATTR_CONFIGURATION_TOKEN = 78, DIAM_ATTR_TUNNEL_PRIVATE_GROUP_ID = 81, DIAM_ATTR_TUNNEL_ASSIGNMENT_ID = 82, DIAM_ATTR_TUNNEL_PREFERENCE = 83, DIAM_ATTR_ARAP_CHALLENGE_RESPONSE = 84, DIAM_ATTR_ACCT_INTERIM_INTERVAL = 85, DIAM_ATTR_NAS_PORT_ID = 87, DIAM_ATTR_FRAMED_POOL = 88, DIAM_ATTR_TUNNEL_CLIENT_AUTH_ID = 90, DIAM_ATTR_TUNNEL_SERVER_AUTH_ID = 91, DIAM_ATTR_NAS_IPV6_ADDRESS = 95, DIAM_ATTR_FRAMED_INTERFACE_ID = 96, DIAM_ATTR_FRAMED_IPV6_PREFIX = 97, DIAM_ATTR_LOGIN_IPV6_HOST = 98, DIAM_ATTR_FRAMED_IPV6_ROUTE = 99, DIAM_ATTR_FRAMED_IPV6_POOL = 100, DIAM_ATTR_EAP_KEY_NAME = 102, DIAM_ATTR_DIGEST_RESPONSE = 103, DIAM_ATTR_DIGEST_REALM = 104, DIAM_ATTR_DIGEST_NONCE = 105, DIAM_ATTR_DIGEST_RESPONSE_AUTH=106, DIAM_ATTR_DIGEST_NEXTNONCE = 107, DIAM_ATTR_DIGEST_METHOD = 108, DIAM_ATTR_DIGEST_URI = 109, DIAM_ATTR_DIGEST_QOP = 110, DIAM_ATTR_DIGEST_ALGORITHM = 111, DIAM_ATTR_DIGEST_ENTITY_BODY_HASH=112, DIAM_ATTR_DIGEST_CNONCE = 113, DIAM_ATTR_DIGEST_NONCE_COUNT = 114, DIAM_ATTR_DIGEST_USERNAME = 115, DIAM_ATTR_DIGEST_HA1 = 121, DIAM_ATTR_SIP_AOR = 122, DIAM_ATTR_AUTH_APPLICATION_ID = 258, DIAM_ATTR_ACCT_APPLICATION_ID = 259, DIAM_ATTR_VENDOR_SPECIFIC_APPLICATION_ID = 260, DIAM_ATTR_SESSION_ID = 263, DIAM_ATTR_ORIGIN_HOST = 264, DIAM_ATTR_MULTI_ROUND_TIMEOUT = 272, DIAM_ATTR_AUTH_REQUEST_TYPE = 274, DIAM_ATTR_AUTH_GRACE_PERIOD = 276, DIAM_ATTR_AUTH_SESSION_STATE = 277, DIAM_ATTR_ORIGIN_STATE_ID = 278, DIAM_ATTR_FAILED_AVP = 279, DIAM_ATTR_ERROR_MESSAGE = 281, DIAM_ATTR_ROUTE_RECORD = 282, DIAM_ATTR_PROXY_INFO = 284, DIAM_ATTR_ACCOUNTING_SUB_SESSION_ID = 287, DIAM_ATTR_ERROR_REPORTING_HOST = 294, DIAM_ATTR_TERMINATION_CAUSE = 295, DIAM_ATTR_ORIGIN_REALM = 296, DIAM_ATTR_SIP_AUTH_DATA_ITEM = 376, DIAM_ATTR_SIP_AUTHENTICATION_SCHEME = 377, DIAM_ATTR_SIP_AUTHENTICATE = 379, DIAM_ATTR_SIP_NUMBER_AUTH_ITEMS = 382, DIAM_ATTR_NAS_FILTER_RULE = 400, DIAM_ATTR_TUNNELING = 401, DIAM_ATTR_QOS_FILTER_RULE = 407, DIAM_ATTR_ORIGIN_AAA_PROTOCOL = 408, DIAM_ATTR_EAP_PAYLOAD = 462, DIAM_ATTR_EAP_REISSUED_PAYLOAD = 463, DIAM_ATTR_EAP_MASTER_SESSION_KEY = 464, DIAM_ATTR_ACCOUNTING_EAP_AUTH_METHOD = 465, DIAM_ATTR_ACCOUNTING_RECORD_TYPE = 480, DIAM_ATTR_ACCOUNTING_REALTIME_REQUIRED = 483, DIAM_ATTR_ACCOUNTING_RECORD_NUMBER = 485 }; const char * rgw_msg_attrtype_str(unsigned char c); const char * rgw_msg_code_str(unsigned char c); #endif /* _RGW_COMMON_H */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/rgw_conf.l000066400000000000000000000226461333553357400252110ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Lex configuration parser for radius_gw extension. * */ %{ #include "rgw.h" #include "rgw_conf.tab.h" /* Update the column information */ #define YY_USER_ACTION { \ yylloc->first_column = yylloc->last_column + 1; \ yylloc->last_column = yylloc->first_column + yyleng - 1; \ } /* %option noinput ? */ #define YY_NO_INPUT %} %option bison-bridge bison-locations %option noyywrap %option nounput /* Use the following start condition to parse an URI */ %x IN_PLG %x IN_CLI1 %x IN_CLI2 %x EXPECT_IP4 %x EXPECT_IP6 %x EXPECT_DECINT /* Quoted string. Multilines do not match. */ qstring \"[^\"\n]*\" /* Used to match IP, IP6, and port */ IP4 [0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} IP6 [[:xdigit:]]*:[[:xdigit:]]*:[[:xdigit:].:]* BR_PORT [[][0-9]+[]] %% /* All sections */ <*>\n { /* Update the line count */ yylloc->first_line++; yylloc->last_line++; yylloc->last_column=0; } <*>([[:space:]]{-}[\n])+ ; /* Eat all spaces, not new lines */ <*>#.*$ ; /* Eat all comments */ <*>{qstring} { /* First copy the string without the quotes for use in the yacc parser */ yylval->string = strdup(yytext+1); if (yylval->string == NULL) { fd_log_debug("Unable to allocate memory: %s", strerror(errno)); return LEX_ERROR; /* trig an error in yacc parser */ } yylval->string[yyleng-2] = '\0'; /* the yacc parser will check the string is valid */ return QSTRING; } /* Extension section */ (?i:"RGWX") { BEGIN(IN_PLG); return PLG_PREFIX; } (?i:"auth") { return AUTH; } (?i:"acct") { return ACCT; } [[:xdigit:]]+ { /* Convert this to an integer value */ int ret = sscanf(yytext, "%x", &yylval->integer); if (ret != 1) { /* No matching: an error occurred */ fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); return LEX_ERROR; /* trig an error in yacc parser */ /* Maybe we could REJECT instead of failing here? */ } return INTEGER; } [:] { return yytext[0]; } /* Client section */ (?i:"nas"|"cli") { BEGIN(IN_CLI1); yylval->integer=RGW_CLI_NAS; return NAS_OR_PXY; } (?i:"pxy") { BEGIN(IN_CLI1); yylval->integer=RGW_CLI_PXY; return NAS_OR_PXY; } /* Match an IP (4 or 6) and optional port */ ({IP4}|{IP6}){BR_PORT}? { char * work; char * port; unsigned short p = 0; work = strdup(yytext); if ( work == NULL ) { fd_log_debug("Unable to allocate memory: %s", strerror(errno)); return LEX_ERROR; /* trig an error in yacc parser */ } if ((port = strchr(work, '[')) != NULL) { *port = '\0'; port++; if (sscanf(port, "%hu]", &p) != 1) { fd_log_debug("'%s' is not a valid port: %s", port, strerror(errno)); free(work); return LEX_ERROR; /* trig an error in yacc parser */ } } /* Do we have an IP or IPv6? Let's check if we have ':' char somewhere in the beginning */ if (memchr(work, ':', 5) != NULL) { struct sockaddr_in6 * sin6 = NULL; sin6 = malloc(sizeof(struct sockaddr_in6)); if (sin6 == NULL) { fd_log_debug("Unable to allocate memory: %s", strerror(errno)); free(work); return LEX_ERROR; /* trig an error in yacc parser */ } memset(sin6, 0, sizeof(struct sockaddr_in6)); sin6->sin6_family = AF_INET6; if (inet_pton(AF_INET6, work, &sin6->sin6_addr) != 1) { fd_log_debug("'%s' is not a valid IPv6 address: %s", work, strerror(errno)); free(work); free(sin6); return LEX_ERROR; /* trig an error in yacc parser */ } sin6->sin6_port = htons(p); yylval->ss = (struct sockaddr *)sin6; } else { struct sockaddr_in * sin = NULL; sin = malloc(sizeof(struct sockaddr_in)); if (sin == NULL) { fd_log_debug("Unable to allocate memory: %s", strerror(errno)); free(work); return LEX_ERROR; /* trig an error in yacc parser */ } memset(sin, 0, sizeof(struct sockaddr_in)); sin->sin_family = AF_INET; if (inet_pton(AF_INET, work, &sin->sin_addr) != 1) { fd_log_debug("'%s' is not a valid IP address: %s", work, strerror(errno)); free(work); free(sin); return LEX_ERROR; /* trig an error in yacc parser */ } sin->sin_port = htons(p); yylval->ss = (struct sockaddr *)sin; } free(work); return IP; } "/" { BEGIN(IN_CLI2); return '/'; } /* Servers section */ (?i:"auth_server_enable") { BEGIN(EXPECT_DECINT); return AUTH_ENABLE; } (?i:"auth_server_port") { BEGIN(EXPECT_DECINT); return AUTH_PORT; } (?i:"auth_server_ip4") { BEGIN(EXPECT_IP4); return AUTH_IP4; } (?i:"auth_server_ip6") { BEGIN(EXPECT_IP6); return AUTH_IP6; } (?i:"acct_server_enable") { BEGIN(EXPECT_DECINT); return ACCT_ENABLE; } (?i:"acct_server_port") { BEGIN(EXPECT_DECINT); return ACCT_PORT; } (?i:"acct_server_ip4") { BEGIN(EXPECT_IP4); return ACCT_IP4; } (?i:"acct_server_ip6") { BEGIN(EXPECT_IP6); return ACCT_IP6; } [[:digit:]]+ { /* Match an integer (not hexa) */ int ret = sscanf(yytext, "%d", &yylval->integer); if (ret != 1) { /* No matching: an error occurred */ fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); return LEX_ERROR; /* trig an error in yacc parser */ /* Maybe we could REJECT instead of failing here? */ } return INTEGER; } (?i:"disable") { return DISABLED; } {IP4} { struct sockaddr_in * sin = NULL; sin = malloc(sizeof(struct sockaddr_in)); if (sin == NULL) { fd_log_debug("Unable to allocate memory: %s", strerror(errno)); return LEX_ERROR; /* trig an error in yacc parser */ } memset(sin, 0, sizeof(struct sockaddr_in)); sin->sin_family = AF_INET; if (inet_pton(AF_INET, yytext, &sin->sin_addr) != 1) { fd_log_debug("'%s' is not a valid IP address: %s", yytext, strerror(errno)); free(sin); return LEX_ERROR; /* trig an error in yacc parser */ } yylval->ss = (struct sockaddr *)sin; return IP; } {IP6} { struct sockaddr_in6 * sin6 = NULL; sin6 = malloc(sizeof(struct sockaddr_in6)); if (sin6 == NULL) { fd_log_debug("Unable to allocate memory: %s", strerror(errno)); return LEX_ERROR; /* trig an error in yacc parser */ } memset(sin6, 0, sizeof(struct sockaddr_in6)); sin6->sin6_family = AF_INET6; if (inet_pton(AF_INET6, yytext, &sin6->sin6_addr) != 1) { fd_log_debug("'%s' is not a valid IPv6 address: %s", yytext, strerror(errno)); free(sin6); return LEX_ERROR; /* trig an error in yacc parser */ } yylval->ss = (struct sockaddr *)sin6; return IP; } /* Valid single characters for yyparse in all contexts */ <*>[=] { return yytext[0]; } <*>[;] { BEGIN(INITIAL); return yytext[0]; } /* Unrecognized token */ <*>[[:alnum:]]+ | /* This rule is only useful to print a complete token in error messages */ /* Unrecognized character */ <*>. { fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); return LEX_ERROR; } %% nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/rgw_conf.y000066400000000000000000000252271333553357400252240ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Yacc extension's configuration parser. * See doc/app_radgw.conf.sample for configuration file format */ /* For development only : */ %debug %error-verbose /* The parser receives the configuration file filename as parameter */ %parse-param {char * conffile} /* Keep track of location */ %locations %pure-parser %{ #include "rgw.h" #include "rgw_conf.tab.h" /* bison is not smart enough to define the YYLTYPE before including this code, so... */ #include #include #include /* Forward declaration */ int yyparse(char * conffile); /* Parse the configuration file */ int rgw_conf_handle(char * conffile) { extern FILE * rgw_confin; int ret; rgw_confin = fopen(conffile, "r"); if (rgw_confin == NULL) { ret = errno; fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret)); return ret; } ret = rgw_confparse(conffile); fclose(rgw_confin); if (ret != 0) { return EINVAL; } return 0; } /* The Lex parser prototype */ int rgw_conflex(YYSTYPE *lvalp, YYLTYPE *llocp); /* Function to report the errors */ void yyerror (YYLTYPE *ploc, char * conffile, char const *s) { if (ploc->first_line != ploc->last_line) fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); else if (ploc->first_column != ploc->last_column) fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); else fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); } /* Very simple byte stack management */ static unsigned char * buf = NULL; static size_t buf_sz = 0; static size_t buf_rsz = 0; static inline int buf_add(unsigned char val) /* add a value in the array */ { buf_sz++; if (buf_sz > buf_rsz) { void * rez=NULL; buf_rsz += 256; rez = realloc(buf, buf_rsz); if (rez == NULL) { fd_log_debug("Error on memory allocation: %s", strerror(errno)); return 0; } buf = (unsigned char *)rez; } buf[buf_sz - 1] = val; return 1; } static inline void buf_reinit(void) { free(buf); buf = NULL; buf_sz = 0; buf_rsz = 0; } static int port = 0; static char * plgconffile = NULL; %} /* Values returned by lex for token */ %union { char *string; /* The string is allocated by strdup in lex.*/ int integer; /* Store integer values */ struct sockaddr *ss; /* sockaddr to free after use (alloc in lex) */ } /* typed data */ %token QSTRING %token INTEGER %token IP %type FINDFILEEXT %token NAS_OR_PXY /* simple tokens */ %token DISABLED %token AUTH %token ACCT %token PLG_PREFIX %token AUTH_ENABLE %token AUTH_PORT %token AUTH_IP4 %token AUTH_IP6 %token ACCT_ENABLE %token ACCT_PORT %token ACCT_IP4 %token ACCT_IP6 /* In case of error in the lexical analysis */ %token LEX_ERROR /* -------------------------------------- */ %% /* The grammar definition */ conffile: /* empty grammar is OK */ | conffile plugin | conffile clientdef | conffile authserv | conffile acctserv ; /* -------------------------------------- */ FINDFILEEXT: QSTRING { char * fname = $1; FILE * fd; /* First, check if the file exists */ fd = fopen(fname, "r"); if ((fd == NULL) && (*fname != '/')) { char * bkp = fname; CHECK_MALLOC_DO( fname = malloc( strlen(bkp) + strlen(DEFAULT_EXTENSIONS_PATH) + 2 ), { yyerror (&yylloc, conffile, "Not enough memory"); YYERROR; } ); sprintf(fname, DEFAULT_EXTENSIONS_PATH "/%s", bkp); free(bkp); fd = fopen(fname, "r"); } if (fd == NULL) { int ret = errno; TRACE_DEBUG(INFO, "Unable to open file %s for reading: %s", fname, strerror(ret)); yyerror (&yylloc, conffile, "Error adding plugin"); YYERROR; } fclose(fd); $$ = fname; } ; /* -------------------------------------- */ plugin: { /* Reset the parameters */ buf_reinit(); port = RGW_PLG_TYPE_AUTH | RGW_PLG_TYPE_ACCT ; free(plgconffile); plgconffile = NULL; } PLG_PREFIX '=' FINDFILEEXT plg_attributes ';' { /* Add this extension in the list */ if ( rgw_plg_add( $4, plgconffile, port, &buf, buf_sz ) ) { yyerror (&yylloc, conffile, "Error parsing / adding extension !"); YYERROR; } /* Free the array */ buf_reinit(); /* stop conffile from being freed here */ plgconffile = NULL; } ; plg_attributes: /* empty */ | plg_attributes ':' QSTRING { plgconffile = $3; } | plg_attributes ':' AUTH { port = RGW_PLG_TYPE_AUTH; } | plg_attributes ':' ACCT { port = RGW_PLG_TYPE_ACCT; } | plg_attributes ':' extcodes_list ; extcodes_list: /* empty */ | extcodes_list INTEGER { if ($2 < 0 || $2 > 255) { yyerror (&yylloc, conffile, "Invalid command code value!"); YYERROR; } if ( ! buf_add((unsigned char)$2) ) { yyerror (&yylloc, conffile, "Error allocating memory!"); YYERROR; } } ; /* -------------------------------------- */ clientdef: { buf_reinit(); } NAS_OR_PXY '=' IP '/' clisecret_key ';' { /* Add this client */ if ( rgw_clients_add( $4, &buf, buf_sz, $2 ) ) { yyerror (&yylloc, conffile, "Error parsing / adding client !"); YYERROR; } /* reinit the buffer */ buf_reinit(); } ; clisecret_key: /* empty */ | clisecret_key QSTRING { int i; size_t len = strlen($2); for (i = 0; i < len; i++) { if ( ! buf_add( $2 [i] ) ) { yyerror (&yylloc, conffile, "Memory allocation error."); YYERROR; } } free($2); } | clisecret_key INTEGER { if ( $2 < 0 || $2 > 255 ) { yyerror (&yylloc, conffile, "Invalid value in key."); YYERROR; } if ( ! buf_add( $2 ) ) { yyerror (&yylloc, conffile, "Memory allocation error."); YYERROR; } } ; /* -------------------------------------- */ authserv: AUTH_ENABLE '=' INTEGER ';' { if ($3 == 0) { rgw_servers.auth_serv.disabled = 1; } else { rgw_servers.auth_serv.disabled = 0; } } | AUTH_PORT '=' INTEGER ';' { if ($3 <= 0 || $3 > 65535) { yyerror (&yylloc, conffile, "Invalid port number !"); YYERROR; } rgw_servers.auth_serv.port = htons($3); } | AUTH_IP4 '=' DISABLED ';' { rgw_servers.auth_serv.ip_disabled = 1; } | AUTH_IP4 '=' IP ';' { if (((struct sockaddr *)($3))->sa_family != AF_INET) { yyerror (&yylloc, conffile, "Invalid address specification !"); YYERROR; } memcpy( & rgw_servers.auth_serv.ip_endpoint, &((struct sockaddr_in *)($3))->sin_addr, sizeof(struct in_addr) ); free($3); rgw_servers.auth_serv.ip_disabled = 0; } | AUTH_IP6 '=' DISABLED ';' { rgw_servers.auth_serv.ip6_disabled = 1; } | AUTH_IP6 '=' IP ';' { if (((struct sockaddr *)($3)) -> sa_family != AF_INET6) { yyerror (&yylloc, conffile, "Invalid address specification !"); YYERROR; } memcpy( & rgw_servers.auth_serv.ip6_endpoint, &((struct sockaddr_in6 *)($3))->sin6_addr, sizeof(struct in6_addr) ); free($3); rgw_servers.auth_serv.ip6_disabled = 0; } ; /* -------------------------------------- */ acctserv: ACCT_ENABLE '=' INTEGER ';' { if ($3 == 0) { rgw_servers.acct_serv.disabled = 1; } else { rgw_servers.acct_serv.disabled = 0; } } | ACCT_PORT '=' INTEGER ';' { if ($3 <= 0 || $3 > 65535) { yyerror (&yylloc, conffile, "Invalid port number !"); YYERROR; } rgw_servers.acct_serv.port = htons($3); } | ACCT_IP4 '=' DISABLED ';' { rgw_servers.acct_serv.ip_disabled = 1; } | ACCT_IP4 '=' IP ';' { if (((struct sockaddr *)($3)) -> sa_family != AF_INET) { yyerror (&yylloc, conffile, "Invalid address specification !"); YYERROR; } memcpy( & rgw_servers.auth_serv.ip_endpoint, &((struct sockaddr_in *)($3))->sin_addr, sizeof(struct in_addr) ); free($3); rgw_servers.acct_serv.ip_disabled = 0; } | ACCT_IP6 '=' DISABLED ';' { rgw_servers.acct_serv.ip6_disabled = 1; } | ACCT_IP6 '=' IP ';' { if (((struct sockaddr *)($3)) -> sa_family != AF_INET6) { yyerror (&yylloc, conffile, "Invalid address specification !"); YYERROR; } memcpy( & rgw_servers.auth_serv.ip6_endpoint, &((struct sockaddr_in6 *)($3))->sin6_addr, sizeof(struct in6_addr) ); free($3); rgw_servers.acct_serv.ip6_disabled = 0; } ; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/rgw_main.c000066400000000000000000000057721333553357400252000ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* * Main file of the app_radgw extension. */ #include "rgw.h" /* Extension entry point called by freeDiameter */ static int rgw_main(char * conffile) { CHECK_FCT( rgw_clients_init() ); CHECK_FCT( rgw_servers_init() ); CHECK_FCT( rgw_conf_handle(conffile) ); LOG_D( "Extension RADIUS Gateway initialized with configuration: '%s'", conffile); rgw_servers_dump(); rgw_clients_dump(); rgw_plg_dump(); /* Start making extension list accelerators */ rgw_plg_start_cache(); /* Start the worker threads */ CHECK_FCT( rgw_work_start() ); /* Start the servers */ CHECK_FCT( rgw_servers_start() ); return 0; } /* Unload */ void fd_ext_fini(void) { rgw_servers_fini(); rgw_work_fini(); rgw_plg_fini(); rgw_clients_fini(); } EXTENSION_ENTRY("app_radgw", rgw_main); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/rgw_msg_attrtype.c000066400000000000000000000411741333553357400267720ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2011, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "rgw_common.h" /* The content of this file was semi-automatically generated from the IANA registry. */ /* Name of RADIUS attribute from its code */ const char * rgw_msg_attrtype_str(unsigned char c) { /* 1 User-Name */ if ( c == 1) return "User-Name "; /* 2 User-Password */ if ( c == 2) return "User-Password "; /* 3 CHAP-Password */ if ( c == 3) return "CHAP-Password "; /* 4 NAS-IP-Address */ if ( c == 4) return "NAS-IP-Address "; /* 5 NAS-Port */ if ( c == 5) return "NAS-Port "; /* 6 Service-Type */ if ( c == 6) return "Service-Type "; /* 7 Framed-Protocol */ if ( c == 7) return "Framed-Protocol "; /* 8 Framed-IP-Address */ if ( c == 8) return "Framed-IP-Address "; /* 9 Framed-IP-Netmask */ if ( c == 9) return "Framed-IP-Netmask "; /* 10 Framed-Routing */ if ( c == 10) return "Framed-Routing "; /* 11 Filter-Id */ if ( c == 11) return "Filter-Id "; /* 12 Framed-MTU */ if ( c == 12) return "Framed-MTU "; /* 13 Framed-Compression */ if ( c == 13) return "Framed-Compression "; /* 14 Login-IP-Host */ if ( c == 14) return "Login-IP-Host "; /* 15 Login-Service */ if ( c == 15) return "Login-Service "; /* 16 Login-TCP-Port */ if ( c == 16) return "Login-TCP-Port "; /* 17 Unassigned */ if ( c == 17) return "Unassigned "; /* 18 Reply-Message */ if ( c == 18) return "Reply-Message "; /* 19 Callback-Number */ if ( c == 19) return "Callback-Number "; /* 20 Callback-Id */ if ( c == 20) return "Callback-Id "; /* 21 Unassigned */ if ( c == 21) return "Unassigned "; /* 22 Framed-Route */ if ( c == 22) return "Framed-Route "; /* 23 Framed-IPX-Network */ if ( c == 23) return "Framed-IPX-Network "; /* 24 State */ if ( c == 24) return "State "; /* 25 Class */ if ( c == 25) return "Class "; /* 26 Vendor-Specific */ if ( c == 26) return "Vendor-Specific "; /* 27 Session-Timeout */ if ( c == 27) return "Session-Timeout "; /* 28 Idle-Timeout */ if ( c == 28) return "Idle-Timeout "; /* 29 Termination-Action */ if ( c == 29) return "Termination-Action "; /* 30 Called-Station-Id */ if ( c == 30) return "Called-Station-Id "; /* 31 Calling-Station-Id */ if ( c == 31) return "Calling-Station-Id "; /* 32 NAS-Identifier */ if ( c == 32) return "NAS-Identifier "; /* 33 Proxy-State */ if ( c == 33) return "Proxy-State "; /* 34 Login-LAT-Service */ if ( c == 34) return "Login-LAT-Service "; /* 35 Login-LAT-Node */ if ( c == 35) return "Login-LAT-Node "; /* 36 Login-LAT-Group */ if ( c == 36) return "Login-LAT-Group "; /* 37 Framed-AppleTalk-Link */ if ( c == 37) return "Framed-AppleTalk-Link "; /* 38 Framed-AppleTalk-Network */ if ( c == 38) return "Framed-AppleTalk-Network "; /* 39 Framed-AppleTalk-Zone */ if ( c == 39) return "Framed-AppleTalk-Zone "; /* 40 Acct-Status-Type [RFC2866] */ if ( c == 40) return "Acct-Status-Type [RFC2866]"; /* 41 Acct-Delay-Time [RFC2866] */ if ( c == 41) return "Acct-Delay-Time [RFC2866]"; /* 42 Acct-Input-Octets [RFC2866] */ if ( c == 42) return "Acct-Input-Octets [RFC2866]"; /* 43 Acct-Output-Octets [RFC2866] */ if ( c == 43) return "Acct-Output-Octets [RFC2866]"; /* 44 Acct-Session-Id [RFC2866] */ if ( c == 44) return "Acct-Session-Id [RFC2866]"; /* 45 Acct-Authentic [RFC2866] */ if ( c == 45) return "Acct-Authentic [RFC2866]"; /* 46 Acct-Session-Time [RFC2866] */ if ( c == 46) return "Acct-Session-Time [RFC2866]"; /* 47 Acct-Input-Packets [RFC2866] */ if ( c == 47) return "Acct-Input-Packets [RFC2866]"; /* 48 Acct-Output-Packets [RFC2866] */ if ( c == 48) return "Acct-Output-Packets [RFC2866]"; /* 49 Acct-Terminate-Cause [RFC2866] */ if ( c == 49) return "Acct-Terminate-Cause [RFC2866]"; /* 50 Acct-Multi-Session-Id [RFC2866] */ if ( c == 50) return "Acct-Multi-Session-Id [RFC2866]"; /* 51 Acct-Link-Count [RFC2866] */ if ( c == 51) return "Acct-Link-Count [RFC2866]"; /* 52 Acct-Input-Gigawords [RFC2869] */ if ( c == 52) return "Acct-Input-Gigawords [RFC2869]"; /* 53 Acct-Output-Gigawords [RFC2869] */ if ( c == 53) return "Acct-Output-Gigawords [RFC2869]"; /* 54 Unassigned */ if ( c == 54) return "Unassigned "; /* 55 Event-Timestamp [RFC2869] */ if ( c == 55) return "Event-Timestamp [RFC2869]"; /* 56 Egress-VLANID [RFC4675] */ if ( c == 56) return "Egress-VLANID [RFC4675]"; /* 57 Ingress-Filters [RFC4675] */ if ( c == 57) return "Ingress-Filters [RFC4675]"; /* 58 Egress-VLAN-Name [RFC4675] */ if ( c == 58) return "Egress-VLAN-Name [RFC4675]"; /* 59 User-Priority-Table [RFC4675] */ if ( c == 59) return "User-Priority-Table [RFC4675]"; /* 60 CHAP-Challenge */ if ( c == 60) return "CHAP-Challenge "; /* 61 NAS-Port-Type */ if ( c == 61) return "NAS-Port-Type "; /* 62 Port-Limit */ if ( c == 62) return "Port-Limit "; /* 63 Login-LAT-Port */ if ( c == 63) return "Login-LAT-Port "; /* 64 Tunnel-Type [RFC2868] */ if ( c == 64) return "Tunnel-Type [RFC2868]"; /* 65 Tunnel-Medium-Type [RFC2868] */ if ( c == 65) return "Tunnel-Medium-Type [RFC2868]"; /* 66 Tunnel-Client-Endpoint [RFC2868] */ if ( c == 66) return "Tunnel-Client-Endpoint [RFC2868]"; /* 67 Tunnel-Server-Endpoint [RFC2868] */ if ( c == 67) return "Tunnel-Server-Endpoint [RFC2868]"; /* 68 Acct-Tunnel-Connection [RFC2867] */ if ( c == 68) return "Acct-Tunnel-Connection [RFC2867]"; /* 69 Tunnel-Password [RFC2868] */ if ( c == 69) return "Tunnel-Password [RFC2868]"; /* 70 ARAP-Password [RFC2869] */ if ( c == 70) return "ARAP-Password [RFC2869]"; /* 71 ARAP-Features [RFC2869] */ if ( c == 71) return "ARAP-Features [RFC2869]"; /* 72 ARAP-Zone-Access [RFC2869] */ if ( c == 72) return "ARAP-Zone-Access [RFC2869]"; /* 73 ARAP-Security [RFC2869] */ if ( c == 73) return "ARAP-Security [RFC2869]"; /* 74 ARAP-Security-Data [RFC2869] */ if ( c == 74) return "ARAP-Security-Data [RFC2869]"; /* 75 Password-Retry [RFC2869] */ if ( c == 75) return "Password-Retry [RFC2869]"; /* 76 Prompt [RFC2869] */ if ( c == 76) return "Prompt [RFC2869]"; /* 77 Connect-Info [RFC2869] */ if ( c == 77) return "Connect-Info [RFC2869]"; /* 78 Configuration-Token [RFC2869] */ if ( c == 78) return "Configuration-Token [RFC2869]"; /* 79 EAP-Message [RFC2869] */ if ( c == 79) return "EAP-Message [RFC2869]"; /* 80 Message-Authenticator [RFC2869] */ if ( c == 80) return "Message-Authenticator [RFC2869]"; /* 81 Tunnel-Private-Group-ID [RFC2868] */ if ( c == 81) return "Tunnel-Private-Group-ID [RFC2868]"; /* 82 Tunnel-Assignment-ID [RFC2868] */ if ( c == 82) return "Tunnel-Assignment-ID [RFC2868]"; /* 83 Tunnel-Preference [RFC2868] */ if ( c == 83) return "Tunnel-Preference [RFC2868]"; /* 84 ARAP-Challenge-Response [RFC2869] */ if ( c == 84) return "ARAP-Challenge-Response [RFC2869]"; /* 85 Acct-Interim-Interval [RFC2869] */ if ( c == 85) return "Acct-Interim-Interval [RFC2869]"; /* 86 Acct-Tunnel-Packets-Lost [RFC2867] */ if ( c == 86) return "Acct-Tunnel-Packets-Lost [RFC2867]"; /* 87 NAS-Port-Id [RFC2869] */ if ( c == 87) return "NAS-Port-Id [RFC2869]"; /* 88 Framed-Pool [RFC2869] */ if ( c == 88) return "Framed-Pool [RFC2869]"; /* 89 CUI [RFC4372] */ if ( c == 89) return "CUI [RFC4372]"; /* 90 Tunnel-Client-Auth-ID [RFC2868] */ if ( c == 90) return "Tunnel-Client-Auth-ID [RFC2868]"; /* 91 Tunnel-Server-Auth-ID [RFC2868] */ if ( c == 91) return "Tunnel-Server-Auth-ID [RFC2868]"; /* 92 NAS-Filter-Rule [RFC4849] */ if ( c == 92) return "NAS-Filter-Rule [RFC4849]"; /* 93 Unassigned */ if ( c == 93) return "Unassigned "; /* 94 Originating-Line-Info [RFC4005] */ if ( c == 94) return "Originating-Line-Info [RFC4005]"; /* 95 NAS-IPv6-Address [RFC3162] */ if ( c == 95) return "NAS-IPv6-Address [RFC3162]"; /* 96 Framed-Interface-Id [RFC3162] */ if ( c == 96) return "Framed-Interface-Id [RFC3162]"; /* 97 Framed-IPv6-Prefix [RFC3162] */ if ( c == 97) return "Framed-IPv6-Prefix [RFC3162]"; /* 98 Login-IPv6-Host [RFC3162] */ if ( c == 98) return "Login-IPv6-Host [RFC3162]"; /* 99 Framed-IPv6-Route [RFC3162] */ if ( c == 99) return "Framed-IPv6-Route [RFC3162]"; /* 100 Framed-IPv6-Pool [RFC3162] */ if ( c == 100) return "Framed-IPv6-Pool [RFC3162]"; /* 101 Error-Cause Attribute [RFC3576] */ if ( c == 101) return "Error-Cause Attribute[RFC3576]"; /* 102 EAP-Key-Name [RFC4072] */ if ( c == 102) return "EAP-Key-Name [RFC4072]"; /* 103 Digest-Response [RFC5090] */ if ( c == 103) return "Digest-Response [RFC5090]"; /* 104 Digest-Realm [RFC5090] */ if ( c == 104) return "Digest-Realm [RFC5090]"; /* 105 Digest-Nonce [RFC5090] */ if ( c == 105) return "Digest-Nonce [RFC5090]"; /* 106 Digest-Response-Auth [RFC5090] */ if ( c == 106) return "Digest-Response-Auth [RFC5090]"; /* 107 Digest-Nextnonce [RFC5090] */ if ( c == 107) return "Digest-Nextnonce [RFC5090]"; /* 108 Digest-Method [RFC5090] */ if ( c == 108) return "Digest-Method [RFC5090]"; /* 109 Digest-URI [RFC5090] */ if ( c == 109) return "Digest-URI [RFC5090]"; /* 110 Digest-Qop [RFC5090] */ if ( c == 110) return "Digest-Qop [RFC5090]"; /* 111 Digest-Algorithm [RFC5090] */ if ( c == 111) return "Digest-Algorithm [RFC5090]"; /* 112 Digest-Entity-Body-Hash [RFC5090] */ if ( c == 112) return "Digest-Entity-Body-Hash [RFC5090]"; /* 113 Digest-CNonce [RFC5090] */ if ( c == 113) return "Digest-CNonce [RFC5090]"; /* 114 Digest-Nonce-Count [RFC5090] */ if ( c == 114) return "Digest-Nonce-Count [RFC5090]"; /* 115 Digest-Username [RFC5090] */ if ( c == 115) return "Digest-Username [RFC5090]"; /* 116 Digest-Opaque [RFC5090] */ if ( c == 116) return "Digest-Opaque [RFC5090]"; /* 117 Digest-Auth-Param [RFC5090] */ if ( c == 117) return "Digest-Auth-Param [RFC5090]"; /* 118 Digest-AKA-Auts [RFC5090] */ if ( c == 118) return "Digest-AKA-Auts [RFC5090]"; /* 119 Digest-Domain [RFC5090] */ if ( c == 119) return "Digest-Domain [RFC5090]"; /* 120 Digest-Stale [RFC5090] */ if ( c == 120) return "Digest-Stale [RFC5090]"; /* 121 Digest-HA1 [RFC5090] */ if ( c == 121) return "Digest-HA1 [RFC5090]"; /* 122 SIP-AOR [RFC5090] */ if ( c == 122) return "SIP-AOR [RFC5090]"; /* 123 Delegated-IPv6-Prefix [RFC4818] */ if ( c == 123) return "Delegated-IPv6-Prefix [RFC4818]"; /* 124 MIP6-Feature-Vector [RFC5447] */ if ( c == 124) return "MIP6-Feature-Vector [RFC5447]"; /* 125 MIP6-Home-Link-Prefix [RFC5447] */ if ( c == 125) return "MIP6-Home-Link-Prefix [RFC5447]"; /* 126-191 Unassigned */ if ((c >= 126) && (c <= 191)) return "Unassigned "; /* 192-223 Experimental Use [RFC3575] */ if ((c >= 192) && (c <= 223)) return "Experimental Use[RFC3575]"; /* 224-240 Implementation Specific [RFC3575] */ if ((c >= 224) && (c <= 240)) return "Implementation Specific[RFC3575]"; /* 241-255 Reserved [RFC3575] */ if ((c >= 241)) return "Reserved [RFC3575]"; /* fallback */ return "[Unknown]"; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/rgw_msg_codes.c000066400000000000000000000161031333553357400262050ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2011, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "rgw_common.h" /* The content of this file was semi-automatically generated from the IANA registry. */ /* Name of RADIUS command from its command code */ const char * rgw_msg_code_str(unsigned char c) { /* 1 Access-Request [RFC2865] */ if ( c == 1) return "Access-Request [RFC2865]"; /* 2 Access-Accept [RFC2865] */ if ( c == 2) return "Access-Accept [RFC2865]"; /* 3 Access-Reject [RFC2865] */ if ( c == 3) return "Access-Reject [RFC2865]"; /* 4 Accounting-Request [RFC2865] */ if ( c == 4) return "Accounting-Request [RFC2865]"; /* 5 Accounting-Response [RFC2865] */ if ( c == 5) return "Accounting-Response [RFC2865]"; /* 6 Accounting-Status [RFC3575] */ if ( c == 6) return "Accounting-Status [RFC3575]"; /* 7 Password-Request [RFC3575] */ if ( c == 7) return "Password-Request [RFC3575]"; /* 8 Password-Ack [RFC3575] */ if ( c == 8) return "Password-Ack [RFC3575]"; /* 9 Password-Reject [RFC3575] */ if ( c == 9) return "Password-Reject [RFC3575]"; /* 10 Accounting-Message [RFC3575] */ if ( c == 10) return "Accounting-Message [RFC3575]"; /* 11 Access-Challenge [RFC2865] */ if ( c == 11) return "Access-Challenge [RFC2865]"; /* 12 Status-Server (experimental) [RFC2865] */ if ( c == 12) return "Status-Server (experimental)[RFC2865]"; /* 13 Status-Client (experimental) [RFC2865] */ if ( c == 13) return "Status-Client (experimental)[RFC2865]"; /* 21 Resource-Free-Request [RFC3575] */ if ( c == 21) return "Resource-Free-Request [RFC3575]"; /* 22 Resource-Free-Response [RFC3575] */ if ( c == 22) return "Resource-Free-Response [RFC3575]"; /* 23 Resource-Query-Request [RFC3575] */ if ( c == 23) return "Resource-Query-Request [RFC3575]"; /* 24 Resource-Query-Response [RFC3575] */ if ( c == 24) return "Resource-Query-Response [RFC3575]"; /* 25 Alternate-Resource-Reclaim-Request [RFC3575] */ if ( c == 25) return "Alternate-Resource-Reclaim-Request [RFC3575]"; /* 26 NAS-Reboot-Request [RFC3575] */ if ( c == 26) return "NAS-Reboot-Request [RFC3575]"; /* 27 NAS-Reboot-Response [RFC3575] */ if ( c == 27) return "NAS-Reboot-Response [RFC3575]"; /* 28 Reserved */ if ( c == 28) return "Reserved "; /* 29 Next-Passcode [RFC3575] */ if ( c == 29) return "Next-Passcode [RFC3575]"; /* 30 New-Pin [RFC3575] */ if ( c == 30) return "New-Pin [RFC3575]"; /* 31 Terminate-Session [RFC3575] */ if ( c == 31) return "Terminate-Session [RFC3575]"; /* 32 Password-Expired [RFC3575] */ if ( c == 32) return "Password-Expired [RFC3575]"; /* 33 Event-Request [RFC3575] */ if ( c == 33) return "Event-Request [RFC3575]"; /* 34 Event-Response [RFC3575] */ if ( c == 34) return "Event-Response [RFC3575]"; /* 40 Disconnect-Request [RFC3575][RFC5176] */ if ( c == 40) return "Disconnect-Request [RFC3575][RFC5176]"; /* 41 Disconnect-ACK [RFC3575][RFC5176] */ if ( c == 41) return "Disconnect-ACK [RFC3575][RFC5176]"; /* 42 Disconnect-NAK [RFC3575][RFC5176] */ if ( c == 42) return "Disconnect-NAK [RFC3575][RFC5176]"; /* 43 CoA-Request [RFC3575][RFC5176] */ if ( c == 43) return "CoA-Request [RFC3575][RFC5176]"; /* 44 CoA-ACK [RFC3575][RFC5176] */ if ( c == 44) return "CoA-ACK [RFC3575][RFC5176]"; /* 45 CoA-NAK [RFC3575][RFC5176] */ if ( c == 45) return "CoA-NAK [RFC3575][RFC5176]"; /* 50 IP-Address-Allocate [RFC3575] */ if ( c == 50) return "IP-Address-Allocate [RFC3575]"; /* 51 IP-Address-Release [RFC3575] */ if ( c == 51) return "IP-Address-Release [RFC3575]"; /* 52-249 Unassigned */ if ((c >= 52) && (c <= 249)) return "Unassigned "; /* 250-253 Experimental Use [RFC3575] */ if ((c >= 250) && (c <= 253)) return "Experimental Use[RFC3575]"; /* 254 Reserved [RFC3575] */ if ( c == 254) return "Reserved [RFC3575]"; /* 255 Reserved [RFC3575] */ if ( c == 255) return "Reserved [RFC3575]"; /* fallback */ return "[Unknown]"; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/rgw_plugins.c000066400000000000000000000404341333553357400257270ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Manage the list of plugins that provide handlers for RADIUS messages and attributes */ #include "rgw.h" #include #include /* List of plugins, in the order they appear in the configuration file. */ static struct fd_list plg_list = FD_LIST_INITIALIZER(plg_list); /* A plugin entry */ struct plg_descr { struct fd_list chain; /* chaining in plg_list */ void *dlo; /* pointer returned by dlopen for the extension, to use with dlclose later */ struct rgw_api *descriptor; /* Points to the resolved plugin's rgwp_descriptor */ struct rgwp_config *cs; /* the (private) state returned by rgwp_conf_parse */ int type; /* this extension is called for messages received on this(these) server port(s) only */ unsigned char *cc; /* array of command codes, or NULL for all cc */ size_t cc_len; /* size of the previous array */ }; /* Accelerators for each command code (one for each port). These accelerators are built on-demand, as a cache, after start_cache function has been called. */ static struct fd_list plg_accel_auth = FD_LIST_INITIALIZER(plg_accel_auth); static struct fd_list plg_accel_acct = FD_LIST_INITIALIZER(plg_accel_acct); /* Accelerator list item, one per command code value (only the ones actually used) */ struct plg_accel { struct fd_list chain; /* link in the plg_accel_* list. List ordered by ccode. */ unsigned char ccode; /* the command code for this accelerator. We don't handle extended CC yet */ struct fd_list plugins;/* head for the list of plg_accel_item, corresponding to the extensions to be called for this command code. */ }; /* Accelerator item */ struct plg_accel_item { struct fd_list chain; /* link in the plg_accel "plugins" list */ struct plg_descr * plg; /* pointer to the plugin */ /* Note: we can further optimize by caching the location of plg->descriptor->rgwp_rad_req etc... at this level. */ }; /* RWlock to protect all the previous lists */ static pthread_rwlock_t plg_lock = PTHREAD_RWLOCK_INITIALIZER; /* Has start_cache been called? */ static int cache_started = 0; /* The read lock must be held before calling this function */ static int get_accelerator(struct fd_list ** list, unsigned char ccode, int type) { struct fd_list *refer, *search; struct plg_accel * accel = NULL; struct plg_accel_item * item = NULL; int upgraded = 0; TRACE_ENTRY("%p %hhu %i", list, ccode, type); CHECK_PARAMS( cache_started && list && ((type == RGW_PLG_TYPE_AUTH) || (type == RGW_PLG_TYPE_ACCT)) ); if (type == RGW_PLG_TYPE_AUTH) refer = &plg_accel_auth; else refer = &plg_accel_acct; restart: /* Check if we have already an accelerator for this ccode */ for (search = refer->next; search != refer; search = search->next) { struct plg_accel * loc = (struct plg_accel *)search; if (loc->ccode < ccode) continue; if (loc->ccode > ccode) break; /* we don't have an accelerator for this value yet */ /* We found the matching accelerator, just return this list */ *list = &loc->plugins; return 0; } /* We must create the accelerator list, then save it just before "search" */ /* First , upgrade the lock to write lock, and restart the search. This is the only robust solution to avoid deadlocks */ if (! upgraded) { CHECK_POSIX( pthread_rwlock_unlock(&plg_lock) ); CHECK_POSIX( pthread_rwlock_wrlock(&plg_lock) ); upgraded = 1; goto restart; } /* Now create the new element */ CHECK_MALLOC( accel = malloc(sizeof(struct plg_accel)) ); memset(accel, 0, sizeof(struct plg_accel) ); fd_list_init(&accel->chain, NULL); fd_list_init(&accel->plugins, accel); accel->ccode = ccode; /* Check each extension from the global list for this port and ccode */ for (refer = plg_list.next; refer != &plg_list; refer = refer->next) { struct plg_descr * loc = (struct plg_descr *)refer; /* Skip if this extension is not registered for this port */ if (! (loc->type & type) ) continue; /* Check if the ccode is there */ if (loc->cc) { int i; int match = 0; for (i=0; i< loc->cc_len; i++) { if (loc->cc[i] < ccode) continue; if (loc->cc[i] == ccode) match = 1; break; } if (!match) continue; } /* Ok, this extension must be called for this port / ccode, add to the accelerator */ CHECK_MALLOC( item = malloc(sizeof(struct plg_accel_item)) ); memset(item, 0, sizeof(struct plg_accel_item)); fd_list_init(&item->chain, NULL); item->plg = loc; /* Add as last element of the accelerator */ fd_list_insert_before(&accel->plugins, &item->chain); } /* Now, save this accelerator entry in the global list */ fd_list_insert_before(search, &accel->chain); *list = &accel->plugins; return 0; } int rgw_plg_add( char * plgfile, char * conffile, int type, unsigned char ** codes_array, size_t codes_sz ) { struct plg_descr * new; TRACE_ENTRY("%p %p %d %p %zi", plgfile, conffile, type, codes_array, codes_sz); CHECK_PARAMS( plgfile && type && codes_array && (cache_started == 0) ); CHECK_MALLOC( new = malloc(sizeof(struct plg_descr)) ); memset(new, 0, sizeof(struct plg_descr)); fd_list_init(&new->chain, new); /* Try and load the plugin */ TRACE_DEBUG(FULL, "Loading plugin: %s", plgfile); new->dlo = dlopen(plgfile, RTLD_NOW | RTLD_GLOBAL); if (new->dlo == NULL) { /* An error occured */ fd_log_debug("Loading of plugin '%s' failed: %s", plgfile, dlerror()); goto error; } /* Resolve the descriptor */ new->descriptor = dlsym( new->dlo, "rgwp_descriptor" ); if (new->descriptor == NULL) { /* An error occured */ fd_log_debug("Unable to resolve 'rgwp_descriptor' in plugin '%s': %s", plgfile, dlerror()); goto error; } TRACE_DEBUG(FULL, "Plugin '%s' found in file '%s'", new->descriptor->rgwp_name, plgfile); /* Now parse the configuration file, this will initialize all plugin states and store it in the "cs" pointer (the plugin must be re-entrant, so no global state) */ if (new->descriptor->rgwp_conf_parse) { CHECK_FCT_DO( (*(new->descriptor->rgwp_conf_parse))(conffile, &new->cs), { fd_log_debug("An error occurred while parsing configuration file '%s' in plugin '%s', aborting...", conffile, plgfile); goto error; } ); } /* Now sort the array (very simple algorithm, but this list is usually small) of command codes and save */ if (*codes_array && codes_sz) { int i; new->cc = *codes_array; *codes_array = NULL; for (i = 0; i < codes_sz - 1; i++) { int j, idx = i, min = new->cc[i]; /* find the smallest remaining element */ for (j = i + 1; j < codes_sz; j++) { if (min > new->cc[j]) { min = new->cc[j]; idx = j; } } /* swap if needed */ if (idx != i) { int tmp = new->cc[i]; new->cc[i] = new->cc[idx]; new->cc[idx] = tmp; } } new->cc_len = codes_sz; } new->type = type; /* And save this new extension in the list. We don't need to lock at this point because we are single threaded. */ fd_list_insert_before(&plg_list, &new->chain); return 0; error: if (new && new->dlo) dlclose(new->dlo); if (new) free(new); return EINVAL; } void rgw_plg_dump(void) { struct plg_descr * plg; struct fd_list * ptr, *ptraccel; if ( ! TRACE_BOOL(FULL) ) return; CHECK_POSIX_DO( pthread_rwlock_rdlock(&plg_lock), ); if ( ! FD_IS_LIST_EMPTY( &plg_list ) ) fd_log_debug("[app_radgw] --- List of registered plugins:"); for (ptr = plg_list.next; ptr != &plg_list; ptr = ptr->next) { char buf[1024]; plg = (struct plg_descr *)ptr; snprintf(buf, sizeof(buf), " %-25s ( %p ) - types: %s%s, codes: ", plg->descriptor->rgwp_name, plg->cs, plg->type & RGW_PLG_TYPE_AUTH ? "Au" : " ", plg->type & RGW_PLG_TYPE_ACCT ? "Ac" : " "); if (plg->cc) { int i; for (i = 0; i < plg->cc_len; i++) { snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "%02hhx ", plg->cc[i]); } fd_log_debug("%s", buf); } else { fd_log_debug("%s*", buf); } } CHECK_POSIX_DO( pthread_rwlock_unlock(&plg_lock), ); /* Dump the list of accelerators */ if ( ! TRACE_BOOL(FULL + 1) ) return; CHECK_POSIX_DO( pthread_rwlock_rdlock(&plg_lock), ); if ( !FD_IS_LIST_EMPTY( &plg_accel_auth ) || !FD_IS_LIST_EMPTY( &plg_accel_acct )) fd_log_debug(" --- Accelerators:"); for (ptraccel = plg_accel_auth.next; ptraccel != &plg_accel_auth; ptraccel = ptraccel->next) { struct plg_accel * accel = (struct plg_accel *)ptraccel; fd_log_debug(" auth, code %02hhu:", accel->ccode); for (ptr = accel->plugins.next; ptr != &accel->plugins; ptr = ptr->next) { struct plg_accel_item * item = (struct plg_accel_item *)ptr; fd_log_debug(" %-15s (%p)", item->plg->descriptor->rgwp_name, item->plg->cs); } } for (ptraccel = plg_accel_acct.next; ptraccel != &plg_accel_acct; ptraccel = ptraccel->next) { struct plg_accel * accel = (struct plg_accel *)ptraccel; fd_log_debug(" acct, code %02hhu:", accel->ccode); for (ptr = accel->plugins.next; ptr != &accel->plugins; ptr = ptr->next) { struct plg_accel_item * item = (struct plg_accel_item *)ptr; fd_log_debug(" %-15s (%p)", item->plg->descriptor->rgwp_name, item->plg->cs); } } CHECK_POSIX_DO( pthread_rwlock_unlock(&plg_lock), ); } void rgw_plg_start_cache(void) { cache_started++; } int rgw_plg_loop_req(struct rgw_radius_msg_meta **rad, struct msg **diam_msg, struct rgw_client * cli) { int ret = 0; struct fd_list * head = NULL, *li; struct radius_msg * rad_ans = NULL; TRACE_ENTRY("%p %p %p", rad, diam_msg, cli); CHECK_PARAMS( rad && *rad && diam_msg && *diam_msg && cli); /* First, get the list of extensions for this message */ CHECK_POSIX( pthread_rwlock_rdlock( &plg_lock) ); CHECK_FCT_DO( ret = get_accelerator(&head, (*rad)->radius.hdr->code, (*rad)->serv_type), { CHECK_POSIX( pthread_rwlock_unlock( &plg_lock) ); return ret; } ); /* Loop in the list of extensions */ for (li = head->next; li != head; li = li->next) { struct plg_descr * plg = ((struct plg_accel_item *) li)->plg; if (plg->descriptor->rgwp_rad_req) { TRACE_DEBUG(ANNOYING, "Calling next plugin: %s", plg->descriptor->rgwp_name); ret = (*plg->descriptor->rgwp_rad_req)(plg->cs, &(*rad)->radius, &rad_ans, diam_msg, cli); if (ret) break; } else { TRACE_DEBUG(ANNOYING, "Skipping extension '%s' (NULL callback)", plg->descriptor->rgwp_name); } } CHECK_POSIX( pthread_rwlock_unlock( &plg_lock) ); /* If no error encountered, we're done here */ if (ret == 0) return 0; /* Destroy the Diameter temp message, if any */ if (*diam_msg) { CHECK_FCT_DO( fd_msg_free(*diam_msg), ); *diam_msg = NULL; } /* Send the radius message back if required */ if ((ret == -2) && rad_ans && rad) { CHECK_FCT_DO( rgw_client_finish_send(&rad_ans, *rad, cli), /* It failed, it can't be helped... */); } if (ret > 0) { /* Critical error, log and exit */ TRACE_DEBUG(NONE, "An error occurred while handling a RADIUS message from '%s': %s", rgw_clients_id(cli), strerror(ret)); return ret; } /* Now, discard the message and return */ rgw_msg_free(rad); return 0; } /* Loop in the extension list (same as req) to convert data from diam_ans to rad_ans */ int rgw_plg_loop_ans(struct rgw_radius_msg_meta *req, struct msg **diam_ans, struct radius_msg ** rad_ans, struct rgw_client * cli) { int ret = 0; struct fd_list * head = NULL, *li; TRACE_ENTRY("%p %p %p %p", req, diam_ans, rad_ans, cli); CHECK_PARAMS( req && diam_ans && *diam_ans && rad_ans && *rad_ans && cli); /* Get the list of extensions of the RADIUS request */ CHECK_POSIX( pthread_rwlock_rdlock( &plg_lock) ); CHECK_FCT_DO( ret = get_accelerator(&head, req->radius.hdr->code, req->serv_type), { CHECK_POSIX( pthread_rwlock_unlock( &plg_lock) ); return ret; } ); /* Loop in the list of extensions */ for (li = head->next; li != head; li = li->next) { struct plg_descr * plg = ((struct plg_accel_item *) li)->plg; if (plg->descriptor->rgwp_diam_ans) { TRACE_DEBUG(ANNOYING, "Calling next plugin: %s", plg->descriptor->rgwp_name); ret = (*plg->descriptor->rgwp_diam_ans)(plg->cs, diam_ans, rad_ans, (void *)cli); if (ret) break; } else { TRACE_DEBUG(ANNOYING, "Skipping extension '%s' (NULL callback)", plg->descriptor->rgwp_name); } } CHECK_POSIX( pthread_rwlock_unlock( &plg_lock) ); /* If no error encountered, we're done here */ if (ret == 0) return 0; /* Destroy the temporary RADIUS answer */ if (*rad_ans) { radius_msg_free(*rad_ans); free(*rad_ans); *rad_ans = NULL; } if (ret > 0) { /* Critical error, log and exit */ fd_log_debug("[app_radgw] An error occurred while handling a DIAMETER answer to a converted RADIUS request, turn on DEBUG for details: %s", strerror(ret)); return ret; } /* We might define other return values with special meaning here (ret == -1, ...) for example create a new Diameter request */ /* -1: just abord the translation with no more processing. */ return 0; } void rgw_plg_fini(void) { struct fd_list * item, *subitem; TRACE_ENTRY(); CHECK_POSIX_DO( pthread_rwlock_rdlock( &plg_lock), /* continue anyway */ ); /* Remove all elements from all accelerators */ while ( ! FD_IS_LIST_EMPTY(&plg_accel_auth) ) { item = plg_accel_auth.next; fd_list_unlink(item); { struct plg_accel * accel = (struct plg_accel *)item; while ( ! FD_IS_LIST_EMPTY(&accel->plugins) ) { subitem = accel->plugins.next; fd_list_unlink(subitem); free(subitem); } } free(item); } while ( ! FD_IS_LIST_EMPTY(&plg_accel_acct) ) { item = plg_accel_acct.next; fd_list_unlink(item); { struct plg_accel * accel = (struct plg_accel *)item; while ( ! FD_IS_LIST_EMPTY(&accel->plugins) ) { subitem = accel->plugins.next; fd_list_unlink(subitem); free(subitem); } } free(item); } /* Now destroy all plugins information */ while ( ! FD_IS_LIST_EMPTY(&plg_list) ) { struct plg_descr * plg = (struct plg_descr *) plg_list.next; fd_list_unlink(&plg->chain); free(plg->cc); if (plg->descriptor && plg->descriptor->rgwp_conf_free ) { TRACE_DEBUG(INFO, "RADIUS/Diameter gateway plugin '%s' cleaning up...", plg->descriptor->rgwp_name); (*plg->descriptor->rgwp_conf_free)(plg->cs); } if (plg->dlo) dlclose(plg->dlo); free(plg); } CHECK_POSIX_DO( pthread_rwlock_unlock( &plg_lock), ); } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/rgw_servers.c000066400000000000000000000250771333553357400257450ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Manage the RADIUS server(s): opening sockets, receiving messages, ... */ #include "rgw.h" #define RADIUS_MAX_MSG_LEN 3000 #define RADIUS_AUTH_PORT 1812 #define RADIUS_ACCT_PORT 1813 /* Declare the rgw_servers */ struct rgw_servs rgw_servers; void rgw_servers_dump(void) { char ipstr[INET6_ADDRSTRLEN]; LOG_D(" auth server:"); LOG_D(" disabled..... : %s", rgw_servers.auth_serv.disabled ? "TRUE":"false"); LOG_D(" IP disabled.. : %s", rgw_servers.auth_serv.ip_disabled ? "TRUE":"false"); LOG_D(" IPv6 disabled : %s", rgw_servers.auth_serv.ip6_disabled ? "TRUE":"false"); LOG_D(" port......... : %hu", ntohs(rgw_servers.auth_serv.port)); inet_ntop(AF_INET, &rgw_servers.auth_serv.ip_endpoint,ipstr,sizeof(ipstr)); LOG_D(" IP bind...... : %s", ipstr); inet_ntop(AF_INET6, &rgw_servers.auth_serv.ip6_endpoint,ipstr,sizeof(ipstr)); LOG_D(" IPv6 bind.... : %s", ipstr); LOG_D(" acct server:"); LOG_D(" disabled..... : %s", rgw_servers.acct_serv.disabled ? "TRUE":"false"); LOG_D(" IP disabled.. : %s", rgw_servers.acct_serv.ip_disabled ? "TRUE":"false"); LOG_D(" IPv6 disabled : %s", rgw_servers.acct_serv.ip6_disabled ? "TRUE":"false"); LOG_D(" port......... : %hu", ntohs(rgw_servers.acct_serv.port)); inet_ntop(AF_INET, &rgw_servers.acct_serv.ip_endpoint,ipstr,sizeof(ipstr)); LOG_D(" IP bind...... : %s", ipstr); inet_ntop(AF_INET6, &rgw_servers.acct_serv.ip6_endpoint,ipstr,sizeof(ipstr)); LOG_D(" IPv6 bind.... : %s", ipstr); } static struct servers_data { int type; /* auth or acct */ int family; /* AF_INET or AF_INET6 */ int sock; /* the socket number */ pthread_t th; /* the running server thread, or NULL */ char name[10]; } SERVERS[4]; int rgw_servers_init(void) { memset(&rgw_servers, 0, sizeof(rgw_servers)); memset(&SERVERS[0], 0, sizeof(SERVERS)); rgw_servers.auth_serv.port = htons(RADIUS_AUTH_PORT); rgw_servers.acct_serv.port = htons(RADIUS_ACCT_PORT); return 0; } static void * server_thread(void * param) { struct servers_data * me = (struct servers_data *)param; TRACE_ENTRY("%p", param); CHECK_PARAMS_DO(param, return NULL); /* Set the thread name */ { char buf[48]; snprintf(buf, sizeof(buf), "radgw/%s serv", me->name); fd_log_threadname ( buf ); } /* Now loop on this socket, parse and queue each message received, until thread is cancelled. */ while (1) { struct sockaddr_storage from; char sa_buf[sSA_DUMP_STRLEN]; socklen_t fromlen = sizeof(from); int len; struct rgw_client * nas_info = NULL; uint16_t port = 0; unsigned char buf[RADIUS_MAX_MSG_LEN]; struct rgw_radius_msg_meta *msg = NULL; pthread_testcancel(); /* receive the next message */ CHECK_SYS_DO( len = recvfrom( me->sock, &buf[0], sizeof(buf), 0, (struct sockaddr *) &from, &fromlen), break ); /* Get the port */ port = sSAport(&from); if (!port) { LOG_E("Invalid port (family: %d), discarding received %d bytes...", from.ss_family, len); continue; } fd_sa_sdump_numeric(sa_buf, (sSA*)&from); LOG_D("RADIUS: RCV %dB from %s", len, sa_buf); /* Search the associated client definition, if any */ CHECK_FCT_DO( rgw_clients_search((struct sockaddr *) &from, &nas_info), { LOG_E("Discarding %d bytes received from unknown IP: %s", len, sa_buf); continue; } ); /* parse the message, loop if message is invalid */ CHECK_FCT_DO( rgw_msg_parse(&buf[0], len, &msg), { DiamId_t cliname = NULL; size_t clisz; CHECK_FCT_DO( rgw_clients_get_origin(nas_info, &cliname, &clisz, NULL, NULL), ); LOG_E( "Discarding invalid RADIUS message from '%s'", cliname); rgw_clients_dispose(&nas_info); continue; } ); msg->serv_type = me->type; msg->port = port; rgw_msg_dump(msg, 1); /* queue the message for a worker thread */ CHECK_FCT_DO( rgw_work_add(msg, nas_info), break ); /* Then wait for next incoming message */ } TRACE_DEBUG(INFO, "Server thread terminated."); return NULL; } /* Set the socket options for UDP sockets, before bind is called */ static int _udp_setsockopt(int family, int sk) { int ret = 0; int opt; /* In case of v6 address, force the v6only option, we use a different socket for v4 */ #ifdef IPV6_V6ONLY if (family == AF_INET6) { opt = 1; ret = setsockopt(sk, IPPROTO_IPV6, IPV6_V6ONLY, &opt, sizeof(opt)); if (ret != 0) { ret = errno; TRACE_DEBUG(INFO, "Unable to set the socket IPV6_V6ONLY option: %s", strerror(ret)); return ret; } } #endif /* IPV6_V6ONLY */ return 0; } /* We reuse the same logic for all 4 possible servers (IP / IPv6, Auth / Acct ports) */ #define UDPSERV( _type_, _portval_, _family_ ) { \ /* Check that this type / family are not disabled by configuration */ \ if ( (! rgw_servers. _type_ ## _serv.disabled) \ && ( ! rgw_servers. _type_ ## _serv.ip ## _family_ ## _disabled ) ) { \ struct sockaddr_in ## _family_ sin ## _family_ ; \ /* Create the socket */ \ CHECK_SYS( SERVERS[idx].sock = socket(AF_INET ## _family_, SOCK_DGRAM, 0) ); \ /* Set the parameters for bind into "sin" or "sin6" */ \ memset(& sin ## _family_, 0, sizeof(struct sockaddr_in ## _family_)); \ sin ## _family_ . sin ## _family_ ## _family = AF_INET ## _family_; \ sin ## _family_ . sin ## _family_ ## _port = rgw_servers. _type_ ## _serv . port; \ memcpy( &sin ## _family_ .sin ## _family_ ## _addr, \ &rgw_servers. _type_ ## _serv . ip ## _family_ ## _endpoint, \ sizeof(struct in ## _family_ ## _addr) ); \ /* This sockopt must be set before binding */ \ TRACE_DEBUG(ANNOYING, "Setting socket options..."); \ CHECK_FCT( _udp_setsockopt(AF_INET ## _family_, SERVERS[idx].sock) ); \ /* OK, now, bind */ \ TRACE_DEBUG(ANNOYING, "Binding " #_type_ " ip" #_family_ " server..."); \ CHECK_SYS( bind( SERVERS[idx].sock, \ (struct sockaddr *)&sin ## _family_, \ sizeof(struct sockaddr_in ## _family_) ) ); \ /* Save the server information in SERVERS structure */ \ SERVERS[idx].type = _portval_; \ SERVERS[idx].family = AF_INET ## _family_; \ snprintf(&SERVERS[idx].name[0], sizeof(SERVERS[idx].name), # _type_ "/ip" #_family_); \ /* Create the server thread */ \ CHECK_POSIX( pthread_create(&SERVERS[idx].th, NULL, server_thread, &SERVERS[idx]) ); \ idx++; \ } \ } int rgw_servers_start(void) { int idx = 0; TRACE_ENTRY(); UDPSERV( auth, RGW_PLG_TYPE_AUTH, ); UDPSERV( auth, RGW_PLG_TYPE_AUTH, 6 ); UDPSERV( acct, RGW_PLG_TYPE_ACCT, ); UDPSERV( acct, RGW_PLG_TYPE_ACCT, 6 ); TRACE_DEBUG(FULL, "%d UDP servers started succesfully.", idx); return 0; } /* Send a RADIUS message */ int rgw_servers_send(int type, unsigned char *buf, size_t buflen, struct sockaddr *to, uint16_t to_port) { int idx = 0; int ret = 0; struct sockaddr_storage sto; char sa_buf[sSA_DUMP_STRLEN]; /* Find the appropriate socket to use (not sure if it is important) */ for (idx = 0; idx < sizeof(SERVERS) / sizeof(SERVERS[0]); idx++) { if ( SERVERS[idx].sock && (type == SERVERS[idx].type) && (to->sa_family == SERVERS[idx].family) ) { ret = 1; break; } } if (!ret) { LOG_E( "Trying to send a message from a disabled server: %s / %s", (type == RGW_PLG_TYPE_AUTH) ? "Auth" : "Acct", (to->sa_family == AF_INET) ? "IP (v4)" : "IPv6"); return EINVAL; } /* Prepare the destination info */ memset(&sto, 0, sizeof(sto)); if (to->sa_family == AF_INET) { memcpy(&sto, to, sizeof(struct sockaddr_in)); ((struct sockaddr_in *)&sto)->sin_port = to_port; } else { memcpy(&sto, to, sizeof(struct sockaddr_in6)); ((struct sockaddr_in6 *)&sto)->sin6_port = to_port; } fd_sa_sdump_numeric(sa_buf, (sSA*)&sto); LOG_D("RADIUS: SND %zdB to %s", buflen, sa_buf); /* Send */ ret = sendto(SERVERS[idx].sock, buf, buflen, 0, (struct sockaddr *)&sto, sSAlen(&sto)); if (ret < 0) { ret = errno; TRACE_DEBUG(INFO, "An error prevented sending of a RADIUS message: %s", strerror(ret)); return ret; } if (ret != buflen) { TRACE_DEBUG(INFO, "Incomplete send: %d bytes / %zd", ret, buflen); return EAGAIN; } /* Done :) */ return 0; } void rgw_servers_fini(void) { int idx = 0; for (idx = 0; idx < sizeof(SERVERS) / sizeof(SERVERS[0]); idx++) { if (SERVERS[idx].sock == 0) break; CHECK_FCT_DO( fd_thr_term(&SERVERS[idx].th), /* continue */ ); close(SERVERS[idx].sock); SERVERS[idx].sock = 0; } } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/rgw_worker.c000066400000000000000000000246331333553357400255620ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Manage incoming RADIUS messages. */ #include "rgw.h" /* How many threads to handle messages in parallel ? */ #define NB_WORKERS 2 static pthread_t workers[NB_WORKERS]; static struct fifo * work_stack = NULL; /* Data that is stacked */ struct work_item { struct rgw_radius_msg_meta * msg; struct rgw_client * cli; }; /* Data stored in freeDiameter while pending Diameter answer */ struct pending_answer { struct rgw_radius_msg_meta * rad; /* the RADIUS message that was received and translated */ struct rgw_client * cli; /* the client it was received from */ }; /* Callback when a Diameter answer is received */ static void receive_diam_answer(void * paback, struct msg **ans); /* Worker thread, processing incoming RADIUS messages (after parsing) */ static void * work_th(void * arg) { TRACE_ENTRY("%p", arg); /* Set the thread name */ { char buf[48]; snprintf(buf, sizeof(buf), "radgw/worker #%ld", (long)arg); fd_log_threadname ( buf ); } while (1) { /* The thread will be cancelled */ struct rgw_radius_msg_meta * msg; struct rgw_client * cli; struct msg * diam_msg; int pb, a; struct pending_answer * pa; /* Get the next incoming RADIUS message */ { struct work_item * wi = NULL; CHECK_FCT_DO( fd_fifo_get(work_stack, &wi), break ); msg = wi->msg; cli = wi->cli; free(wi); } TRACE_DEBUG(ANNOYING, "Processing next RADIUS message: %p received on client: %p", msg, cli); /* process the data */ /* Check authenticator, if any */ CHECK_FCT_DO( rgw_clients_auth_check(msg, cli, NULL), { /* An error occurred, discard message */ rgw_msg_free(&msg); rgw_clients_dispose(&cli); continue; } ); /* Check duplicate */ CHECK_FCT_DO( rgw_clients_check_dup(&msg, cli), { /* An error occurred, discard message */ rgw_msg_free(&msg); rgw_clients_dispose(&cli); continue; } ); if (msg == NULL) { rgw_clients_dispose(&cli); continue; /* the message was a duplicate */ } diam_msg = NULL; /* Note: after this point, the radius message buffer may not be consistent with the array of attributes anymore. */ /* Check that IP is coherent with the identity in the message, and create an empty message with only Origin information */ CHECK_FCT_DO( rgw_clients_create_origin(msg, cli, &diam_msg), { /* An error occurred, discard message */ if (diam_msg) { CHECK_FCT_DO( fd_msg_free(diam_msg), ); } rgw_msg_free(&msg); rgw_clients_dispose(&cli); continue; } ); /* Pass the message to the list of registered plugins */ CHECK_FCT_DO( rgw_plg_loop_req(&msg, &diam_msg, cli), { /* An error occurred, discard message */ if (diam_msg) { CHECK_FCT_DO( fd_msg_free(diam_msg), ); diam_msg = NULL; } rgw_msg_free(&msg); rgw_clients_dispose(&cli); continue; } ); if (msg == NULL) { /* Error or RADIUS answer locally generated */ rgw_clients_dispose(&cli); if (diam_msg) { CHECK_FCT_DO( fd_msg_free(diam_msg), ); diam_msg = NULL; } continue; /* the message was handled already */ } pb = 0; /* Check the created Diameter message -- it will be invalid if no callback has handled the RADIUS message */ if ((diam_msg == NULL) || ( fd_msg_parse_rules(diam_msg, fd_g_config->cnf_dict, NULL) ) ) { fd_log_debug("[radgw] No or invalid Diameter message was generated after processing the RADIUS command %hhd (%s)." " It may indicate a gateway configuration problem, or implementation issue in a plugin.", msg->radius.hdr->code, rgw_msg_code_str(msg->radius.hdr->code)); /* We should also dump the conflicting rule here to help debug? */ pb++; } /* Check if the full content of the RADIUS message was handled */ for (a = 0; a < msg->radius.attr_used; a++) { struct radius_attr_hdr *attr = (struct radius_attr_hdr *)(msg->radius.buf + msg->radius.attr_pos[a]); pb++; fd_log_debug("[radgw] No plugin available to handle attribute %hhd (%s) in command %hhd (%s)! Translation aborted.", attr->type, rgw_msg_attrtype_str(attr->type), msg->radius.hdr->code, rgw_msg_code_str(msg->radius.hdr->code)); } if (pb) { /* Something went wrong during the conversion */ if (diam_msg) { CHECK_FCT_DO( fd_msg_free(diam_msg), ); diam_msg = NULL; } rgw_msg_free(&msg); rgw_clients_dispose(&cli); TRACE_DEBUG(INFO, "%d problem(s) occurred while translating a RADIUS message, data discarded.", pb); continue; } /* Send the Diameter message and register for receiving the answer */ CHECK_MALLOC_DO( pa = malloc(sizeof(struct pending_answer)), break ); memset(pa, 0, sizeof(*pa)); pa->rad = msg; pa->cli = cli; CHECK_FCT_DO( fd_msg_send( &diam_msg, receive_diam_answer, pa), { /* If an error occurs, log and destroy the data */ fd_log_debug("An error occurred while sending Diameter message, please turn Debug on for detail."); if (diam_msg) { CHECK_FCT_DO( fd_msg_free(diam_msg), ); diam_msg = NULL; } rgw_msg_free(&msg); rgw_clients_dispose(&cli); free(pa); continue; } ); /* Done! */ } TRACE_DEBUG(INFO, "Thread terminated!"); return NULL; } static void receive_diam_answer(void * paback, struct msg **ans) { struct pending_answer * pa = (struct pending_answer *)paback; struct radius_msg * rad_ans; struct avp *avp; struct avp_hdr *ahdr; int pb = 0; TRACE_ENTRY("%p %p", pa, ans); CHECK_PARAMS_DO( pa && ans, return ); /* Create an empty RADIUS answer message */ CHECK_MALLOC_DO( rad_ans = radius_msg_new(0, pa->rad->radius.hdr->identifier), goto out ); /* Pass the Diameter answer to the same extensions as the request */ CHECK_FCT_DO( rgw_plg_loop_ans(pa->rad, ans, &rad_ans, pa->cli), goto out ); if (*ans != NULL) { /* Now check what AVPs remain in the diameter answer. If AVPs with the 'M' flag are here, we have a problem... */ CHECK_FCT_DO( fd_msg_browse(*ans, MSG_BRW_FIRST_CHILD, &avp, NULL), { avp = NULL; pb++; } ); while (avp) { CHECK_FCT_DO( fd_msg_avp_hdr ( avp, &ahdr ), { pb++; continue; } ); if (ahdr->avp_flags & AVP_FLAG_MANDATORY) { if (ahdr->avp_flags & AVP_FLAG_VENDOR) { TRACE_DEBUG(FULL, "Remaining Mandatory Vendor AVP, code %d", ahdr->avp_code); pb++; } else { switch (ahdr->avp_code) { /* A few AVPs can be safely ignored here: */ case DIAM_ATTR_SESSION_ID: case DIAM_ATTR_ROUTE_RECORD: case DIAM_ATTR_PROXY_INFO: /* just ignore */ break; default: LOG_D("Remaining Mandatory AVP, code %d", ahdr->avp_code); pb++; } } } CHECK_FCT_DO( fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL), { pb++; break; } ); } if (pb) { TRACE_DEBUG(INFO, "[radgw] WARNING: %d mandatory AVP in the Diameter answer have not been translated to RADIUS! Please use debug.rgwx for more information.", pb); } } out: /* Now try and send the RADIUS answer */ if (rad_ans) { CHECK_FCT_DO( rgw_client_finish_send(&rad_ans, pa->rad, pa->cli), ); } else { /* Remove the request from the duplicate cache */ CHECK_FCT_DO( rgw_client_finish_nosend(pa->rad, pa->cli), ); } /* Clear the Diameter message */ if (*ans) { CHECK_FCT_DO( fd_msg_free(*ans), ); *ans = NULL; } /* Clear the RADIUS request */ if (pa->rad) { rgw_msg_free(&pa->rad); } /* Release reference on the client */ rgw_clients_dispose(&pa->cli); /* Clear the answer data */ free(pa); /* Finished */ return; } int rgw_work_start(void) { long i; TRACE_ENTRY(); memset(workers, 0, sizeof(workers)); CHECK_FCT( fd_fifo_new ( &work_stack, 30 ) ); /* Create the worker thread(s) */ for (i = 0; i < NB_WORKERS; i++) { CHECK_POSIX( pthread_create(&workers[i], NULL, work_th, (void *)i) ); } return 0; } int rgw_work_add(struct rgw_radius_msg_meta * msg, struct rgw_client * client) { struct work_item * new; CHECK_MALLOC( new = malloc(sizeof(struct work_item)) ); memset(new, 0, sizeof(struct work_item)); new->msg = msg; new->cli = client; CHECK_FCT( fd_fifo_post(work_stack, &new) ); return 0; } void rgw_work_fini(void) { int i; TRACE_ENTRY(); for (i = 0; i < NB_WORKERS; i++) { fd_thr_term(&workers[i]); } TODO("Empty the stack, what to do about the RADIUS messages?"); return; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/rgwx_acct.c000066400000000000000000001737521333553357400253620ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* RADIUS Accounting-Request messages translation plugin */ #include "rgw_common.h" /* Other constants we use */ #define AI_ACCT 3 /* Diameter Base Accounting application */ #define CC_AC 271 /* ACR/ACA */ #define ACV_ART_START_RECORD 2 /* START_RECORD */ #define ACV_ART_INTERIM_RECORD 3 /* INTERIM_RECORD */ #define ACV_ART_STOP_RECORD 4 /* STOP_RECORD */ #define ACV_ART_AUTHORIZE_AUTHENTICATE 3 /* AUTHORIZE_AUTHENTICATE */ /* The state we keep for this plugin */ struct rgwp_config { struct { struct dict_object * Accounting_Record_Number; /* Accounting-Record-Number */ struct dict_object * Accounting_Record_Type; /* Accounting-Record-Type */ struct dict_object * Acct_Application_Id; /* Acct-Application-Id */ struct dict_object * Acct_Delay_Time; /* Acct-Delay-Time */ struct dict_object * Accounting_Input_Octets; /* Accounting-Input-Octets */ struct dict_object * Accounting_Output_Octets; /* Accounting-Output-Octets */ struct dict_object * Accounting_Input_Packets; /* Accounting-Input-Packets */ struct dict_object * Accounting_Output_Packets; /* Accounting-Output-Packets */ struct dict_object * Acct_Link_Count; /* Acct-Link-Count */ struct dict_object * Acct_Authentic; /* Acct-Authentic */ struct dict_object * Acct_Multi_Session_Id; /* Acct-Multi-Session-Id */ struct dict_object * Acct_Session_Id; /* Acct-Session-Id */ struct dict_object * Acct_Session_Time; /* Acct-Session-Time */ struct dict_object * ARAP_Password; /* ARAP-Password */ struct dict_object * ARAP_Security; /* ARAP-Security */ struct dict_object * ARAP_Security_Data; /* ARAP-Security-Data */ struct dict_object * Auth_Application_Id; /* Auth-Application-Id */ struct dict_object * Auth_Request_Type; /* Auth-Request-Type */ struct dict_object * Authorization_Lifetime; /* Authorization-Lifetime */ struct dict_object * Callback_Number; /* Callback-Number */ struct dict_object * Callback_Id; /* Callback-Id */ struct dict_object * Called_Station_Id; /* Called-Station-Id */ struct dict_object * Calling_Station_Id; /* Calling-Station-Id */ struct dict_object * Class; /* Class */ struct dict_object * CHAP_Algorithm; /* CHAP-Algorithm */ struct dict_object * CHAP_Auth; /* CHAP-Auth */ struct dict_object * CHAP_Challenge; /* CHAP-Challenge */ struct dict_object * CHAP_Ident; /* CHAP-Ident */ struct dict_object * CHAP_Response; /* CHAP-Response */ struct dict_object * Connect_Info; /* Connect-Info */ struct dict_object * Destination_Host; /* Destination-Host */ struct dict_object * Destination_Realm; /* Destination-Realm */ struct dict_object * EAP_Payload; /* EAP-Payload */ struct dict_object * Error_Message; /* Error-Message */ struct dict_object * Error_Reporting_Host; /* Error-Reporting-Host */ struct dict_object * Event_Timestamp; /* Event-Timestamp */ struct dict_object * Failed_AVP; /* Failed-AVP */ struct dict_object * Framed_AppleTalk_Link; /* Framed-AppleTalk-Link */ struct dict_object * Framed_AppleTalk_Network; /* Framed-AppleTalk-Network */ struct dict_object * Framed_AppleTalk_Zone; /* Framed-AppleTalk-Zone */ struct dict_object * Framed_Compression; /* Framed-Compression */ struct dict_object * Framed_IP_Address; /* Framed-IP-Address */ struct dict_object * Framed_IP_Netmask; /* Framed-IP-Netmask */ struct dict_object * Framed_Interface_Id; /* Framed-Interface-Id */ struct dict_object * Framed_IPv6_Prefix; /* Framed-IPv6-Prefix */ struct dict_object * Framed_IPX_Network; /* Framed-IPX-Network */ struct dict_object * Framed_MTU; /* Framed-MTU */ struct dict_object * Framed_Protocol; /* Framed-Protocol */ struct dict_object * Framed_Pool; /* Framed-Pool */ struct dict_object * Framed_IPv6_Route; /* Framed-IPv6-Route */ struct dict_object * Framed_IPv6_Pool; /* Framed-IPv6-Pool */ struct dict_object * Framed_Route; /* Framed-Route */ struct dict_object * Framed_Routing; /* Framed-Routing */ struct dict_object * Filter_Id; /* Filter-Id */ struct dict_object * Idle_Timeout; /* Idle-Timeout */ struct dict_object * Login_IP_Host; /* Login-IP-Host */ struct dict_object * Login_IPv6_Host; /* Login-IPv6-Host */ struct dict_object * Login_LAT_Group; /* Login-LAT-Group */ struct dict_object * Login_LAT_Node; /* Login-LAT-Node */ struct dict_object * Login_LAT_Port; /* Login-LAT-Port */ struct dict_object * Login_LAT_Service; /* Login-LAT-Service */ struct dict_object * Login_Service; /* Login-Service */ struct dict_object * Login_TCP_Port; /* Login-TCP-Port */ struct dict_object * NAS_Identifier; /* NAS-Identifier */ struct dict_object * NAS_IP_Address; /* NAS-IP-Address */ struct dict_object * NAS_IPv6_Address; /* NAS-IPv6-Address */ struct dict_object * NAS_Port; /* NAS-Port */ struct dict_object * NAS_Port_Id; /* NAS-Port-Id */ struct dict_object * NAS_Port_Type; /* NAS-Port-Type */ struct dict_object * Origin_AAA_Protocol; /* Origin-AAA-Protocol */ struct dict_object * Origin_Host; /* Origin-Host */ struct dict_object * Origin_Realm; /* Origin-Realm */ struct dict_object * Originating_Line_Info; /* Originating-Line-Info */ struct dict_object * Port_Limit; /* Port-Limit */ struct dict_object * Re_Auth_Request_Type; /* Re-Auth-Request-Type */ struct dict_object * Result_Code; /* Result-Code */ struct dict_object * Service_Type; /* Service-Type */ struct dict_object * Session_Id; /* Session-Id */ struct dict_object * Session_Timeout; /* Session-Timeout */ struct dict_object * State; /* State */ struct dict_object * Termination_Cause; /* Termination-Cause */ struct dict_object * Tunneling; /* Tunneling */ struct dict_object * Tunnel_Type; /* Tunnel-Type */ struct dict_object * Tunnel_Assignment_Id; /* Tunnel-Assignment-Id */ struct dict_object * Tunnel_Medium_Type; /* Tunnel-Medium-Type */ struct dict_object * Tunnel_Client_Endpoint; /* Tunnel-Client-Endpoint */ struct dict_object * Tunnel_Server_Endpoint; /* Tunnel-Server-Endpoint */ struct dict_object * Tunnel_Private_Group_Id; /* Tunnel-Private-Group-Id */ struct dict_object * Tunnel_Preference; /* Tunnel-Preference */ struct dict_object * Tunnel_Client_Auth_Id; /* Tunnel-Client-Auth-Id */ struct dict_object * Tunnel_Server_Auth_Id; /* Tunnel-Server-Auth-Id */ struct dict_object * User_Name; /* User-Name */ struct dict_object * Session_Termination_Request;/* STR */ } dict; /* cache of the dictionary objects we use */ struct session_handler * sess_hdl; /* We store RADIUS request authenticator information in the session */ char * confstr; int ignore_nai; }; /* The state we store in the session */ struct sess_state { application_id_t auth_appl; /* Auth-Application-Id used for this session, if available (stored in a Class attribute) */ int send_str; /* If not 0, we must send a STR when the ACA is received. */ uint32_t term_cause; /* If not 0, the Termination-Cause to put in the STR. */ }; static DECLARE_FD_DUMP_PROTOTYPE(acct_conf_session_state_dump, struct sess_state * st) { return fd_dump_extend( FD_DUMP_STD_PARAMS, "[rgwx sess_state](@%p): aai:%x str:%d TC:%u", st, st->auth_appl, st->send_str, st->term_cause); } /* Initialize the plugin */ static int acct_conf_parse(char * conffile, struct rgwp_config ** state) { struct rgwp_config * new; struct dict_object * app; TRACE_ENTRY("%p %p", conffile, state); CHECK_PARAMS( state ); CHECK_MALLOC( new = malloc(sizeof(struct rgwp_config)) ); memset(new, 0, sizeof(struct rgwp_config)); CHECK_FCT( fd_sess_handler_create( &new->sess_hdl, (void *)free, acct_conf_session_state_dump, NULL ) ); new->confstr = conffile; if (conffile && strstr(conffile, "nonai")) new->ignore_nai = 1; /* Resolve all dictionary objects we use */ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Accounting-Record-Number", &new->dict.Accounting_Record_Number, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Accounting-Record-Type", &new->dict.Accounting_Record_Type, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Acct-Application-Id", &new->dict.Acct_Application_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Acct-Delay-Time", &new->dict.Acct_Delay_Time, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Accounting-Input-Octets", &new->dict.Accounting_Input_Octets, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Accounting-Output-Octets", &new->dict.Accounting_Output_Octets, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Accounting-Input-Packets", &new->dict.Accounting_Input_Packets, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Accounting-Output-Packets", &new->dict.Accounting_Output_Packets, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Acct-Authentic", &new->dict.Acct_Authentic, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Acct-Link-Count", &new->dict.Acct_Link_Count, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Acct-Multi-Session-Id", &new->dict.Acct_Multi_Session_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Acct-Session-Id", &new->dict.Acct_Session_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Acct-Session-Time", &new->dict.Acct_Session_Time, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "ARAP-Password", &new->dict.ARAP_Password, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "ARAP-Security", &new->dict.ARAP_Security, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "ARAP-Security-Data", &new->dict.ARAP_Security_Data, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Auth-Application-Id", &new->dict.Auth_Application_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Auth-Request-Type", &new->dict.Auth_Request_Type, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Authorization-Lifetime", &new->dict.Authorization_Lifetime, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Callback-Number", &new->dict.Callback_Number, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Callback-Id", &new->dict.Callback_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Called-Station-Id", &new->dict.Called_Station_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Calling-Station-Id", &new->dict.Calling_Station_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Class", &new->dict.Class, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Connect-Info", &new->dict.Connect_Info, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Host", &new->dict.Destination_Host, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Realm", &new->dict.Destination_Realm, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "EAP-Payload", &new->dict.EAP_Payload, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Error-Message", &new->dict.Error_Message, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Error-Reporting-Host", &new->dict.Error_Reporting_Host, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Event-Timestamp", &new->dict.Event_Timestamp, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Failed-AVP", &new->dict.Failed_AVP, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-AppleTalk-Link", &new->dict.Framed_AppleTalk_Link, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-AppleTalk-Network", &new->dict.Framed_AppleTalk_Network, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-AppleTalk-Zone", &new->dict.Framed_AppleTalk_Zone, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-Compression", &new->dict.Framed_Compression, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-IP-Address", &new->dict.Framed_IP_Address, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-IP-Netmask", &new->dict.Framed_IP_Netmask, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-Interface-Id", &new->dict.Framed_Interface_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-IPv6-Prefix", &new->dict.Framed_IPv6_Prefix, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-IPX-Network", &new->dict.Framed_IPX_Network, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-MTU", &new->dict.Framed_MTU, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-Protocol", &new->dict.Framed_Protocol, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-Pool", &new->dict.Framed_Pool, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-Route", &new->dict.Framed_Route, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-IPv6-Route", &new->dict.Framed_IPv6_Route, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-IPv6-Pool", &new->dict.Framed_IPv6_Pool, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-Routing", &new->dict.Framed_Routing, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Filter-Id", &new->dict.Filter_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Idle-Timeout", &new->dict.Idle_Timeout, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Login-IP-Host", &new->dict.Login_IP_Host, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Login-IPv6-Host", &new->dict.Login_IPv6_Host, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Login-LAT-Group", &new->dict.Login_LAT_Group, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Login-LAT-Node", &new->dict.Login_LAT_Node, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Login-LAT-Port", &new->dict.Login_LAT_Port, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Login-LAT-Service", &new->dict.Login_LAT_Service, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Login-Service", &new->dict.Login_Service, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Login-TCP-Port", &new->dict.Login_TCP_Port, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "NAS-Identifier", &new->dict.NAS_Identifier, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "NAS-IP-Address", &new->dict.NAS_IP_Address, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "NAS-IPv6-Address", &new->dict.NAS_IPv6_Address, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "NAS-Port", &new->dict.NAS_Port, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "NAS-Port-Id", &new->dict.NAS_Port_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "NAS-Port-Type", &new->dict.NAS_Port_Type, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-AAA-Protocol", &new->dict.Origin_AAA_Protocol, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Host", &new->dict.Origin_Host, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Realm", &new->dict.Origin_Realm, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Originating-Line-Info", &new->dict.Originating_Line_Info, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Port-Limit", &new->dict.Port_Limit, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Re-Auth-Request-Type", &new->dict.Re_Auth_Request_Type, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Result-Code", &new->dict.Result_Code, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Service-Type", &new->dict.Service_Type, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Session-Id", &new->dict.Session_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Session-Timeout", &new->dict.Session_Timeout, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "State", &new->dict.State, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Termination-Cause", &new->dict.Termination_Cause, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Tunneling", &new->dict.Tunneling, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Tunnel-Assignment-Id", &new->dict.Tunnel_Assignment_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Tunnel-Type", &new->dict.Tunnel_Type, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Tunnel-Medium-Type", &new->dict.Tunnel_Medium_Type, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Tunnel-Client-Endpoint", &new->dict.Tunnel_Client_Endpoint, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Tunnel-Server-Endpoint", &new->dict.Tunnel_Server_Endpoint, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Tunnel-Private-Group-Id", &new->dict.Tunnel_Private_Group_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Tunnel-Preference", &new->dict.Tunnel_Preference, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Tunnel-Client-Auth-Id", &new->dict.Tunnel_Client_Auth_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Tunnel-Server-Auth-Id", &new->dict.Tunnel_Server_Auth_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "User-Name", &new->dict.User_Name, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Session-Termination-Request", &new->dict.Session_Termination_Request, ENOENT) ); /* This plugin provides the following Diameter authentication applications support: */ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_APPLICATION, APPLICATION_BY_NAME, "Diameter Base Accounting", &app, ENOENT) ); CHECK_FCT( fd_disp_app_support ( app, NULL, 0, 1 ) ); *state = new; return 0; } /* deinitialize */ static void acct_conf_free(struct rgwp_config * state) { TRACE_ENTRY("%p", state); CHECK_PARAMS_DO( state, return ); CHECK_FCT_DO( fd_sess_handler_destroy( &state->sess_hdl, NULL ), ); free(state); return; } /* Incoming RADIUS request */ static int acct_rad_req( struct rgwp_config * cs, struct radius_msg * rad_req, struct radius_msg ** rad_ans, struct msg ** diam_fw, struct rgw_client * cli ) { int idx; int send_str=0; uint32_t str_cause=0; uint32_t e2eid = 0; application_id_t auth_appl=0; int got_id = 0; uint32_t status_type; uint32_t termination_action = 0; uint32_t gigawords_in=0, gigawords_out=0; size_t nattr_used = 0; union avp_value value; struct avp ** avp_tun = NULL, *avp = NULL; struct session * sess; const char * prefix = "Diameter/"; size_t pref_len; os0_t si = NULL; size_t si_len = 0; os0_t un = NULL; size_t un_len = 0; TRACE_ENTRY("%p %p %p %p %p", cs, rad_req, rad_ans, diam_fw, cli); CHECK_PARAMS(rad_req && (rad_req->hdr->code == RADIUS_CODE_ACCOUNTING_REQUEST) && rad_ans && diam_fw && *diam_fw); pref_len = strlen(prefix); /* Either NAS-IP-Address or NAS-Identifier MUST be present in a RADIUS Accounting-Request. It SHOULD contain a NAS-Port or NAS- Port-Type attribute or both unless the service does not involve a port or the NAS does not distinguish among its ports. */ /* We also enforce that the message contains a CLASS attribute with Diameter/ prefix containing the Session-Id. */ for (idx = 0; idx < rad_req->attr_used; idx++) { struct radius_attr_hdr * attr = (struct radius_attr_hdr *)(rad_req->buf + rad_req->attr_pos[idx]); uint8_t * v = (uint8_t *)(attr + 1); size_t attr_len = attr->length - sizeof(struct radius_attr_hdr); switch (attr->type) { case RADIUS_ATTR_NAS_IP_ADDRESS: case RADIUS_ATTR_NAS_IDENTIFIER: case RADIUS_ATTR_NAS_IPV6_ADDRESS: got_id = 1; break; case RADIUS_ATTR_TERMINATION_ACTION: CHECK_PARAMS( attr->length == 6 ); termination_action = (v[0] << 24) | (v[1] << 16) | (v[2] << 8) | v[3] ; break; case RADIUS_ATTR_ACCT_INPUT_GIGAWORDS: CHECK_PARAMS( attr->length == 6 ); gigawords_in = (v[0] << 24) | (v[1] << 16) | (v[2] << 8) | v[3] ; break; case RADIUS_ATTR_ACCT_OUTPUT_GIGAWORDS: CHECK_PARAMS( attr->length == 6 ); gigawords_out = (v[0] << 24) | (v[1] << 16) | (v[2] << 8) | v[3] ; break; case RADIUS_ATTR_CLASS: if ((attr_len > pref_len ) && ! strncmp((char *)v, prefix, pref_len)) { int i; si = v + pref_len; si_len = attr_len - pref_len; TRACE_DEBUG(ANNOYING, "Found Class attribute with '%s' prefix (attr #%d), SI:'%.*s'.", prefix, idx, (int)si_len, si); /* Remove from the message */ for (i = idx + 1; i < rad_req->attr_used; i++) rad_req->attr_pos[i - 1] = rad_req->attr_pos[i]; rad_req->attr_used -= 1; } break; case RADIUS_ATTR_USER_NAME: if (attr_len) { un = v; un_len = attr_len; TRACE_DEBUG(ANNOYING, "Found a User-Name attribute: '%.*s'", (int)un_len, un); } break; } } /* Check basic information is there */ if (!got_id || radius_msg_get_attr_int32(rad_req, RADIUS_ATTR_ACCT_STATUS_TYPE, &status_type)) { TRACE_DEBUG(INFO, "[acct.rgwx] RADIUS Account-Request from %s did not contain a NAS ip/identifier or Acct-Status-Type attribute, reject.", rgw_clients_id(cli)); return EINVAL; } /* -- RFC2866: In Accounting-Request Packets, the Authenticator value is a 16 octet MD5 [5] checksum, called the Request Authenticator. The NAS and RADIUS accounting server share a secret. The Request Authenticator field in Accounting-Request packets contains a one- way MD5 hash calculated over a stream of octets consisting of the Code + Identifier + Length + 16 zero octets + request attributes + shared secret (where + indicates concatenation). The 16 octet MD5 hash value is stored in the Authenticator field of the Accounting-Request packet. Note that the Request Authenticator of an Accounting-Request can not be done the same way as the Request Authenticator of a RADIUS Access-Request, because there is no User-Password attribute in an Accounting-Request. -- RFC5080: The Request Authenticator field MUST contain the correct data, as given by the above calculation. Invalid packets are silently discarded. Note that some early implementations always set the Request Authenticator to all zeros. New implementations of RADIUS clients MUST use the above algorithm to calculate the Request Authenticator field. New RADIUS server implementations MUST silently discard invalid packets. */ { uint8_t save[MD5_MAC_LEN]; uint8_t * secret; size_t secret_len; /* Get the shared secret */ CHECK_FCT(rgw_clients_getkey(cli, &secret, &secret_len)); /* Copy the received Request Authenticator */ memcpy(&save[0], &rad_req->hdr->authenticator[0], MD5_MAC_LEN); /* Compute the same authenticator */ radius_msg_finish_acct(rad_req, secret, secret_len); /* And now compare with the received value */ if (memcmp(&save[0], &rad_req->hdr->authenticator[0], MD5_MAC_LEN)) { /* Invalid authenticator */ TRACE_BUFFER(FD_LOG_DEBUG, FULL+1, "Received ReqAuth: ", &save[0], MD5_MAC_LEN, "" ); TRACE_BUFFER(FD_LOG_DEBUG, FULL+1, "Expected ReqAuth: ", &rad_req->hdr->authenticator[0], MD5_MAC_LEN, "" ); TRACE_DEBUG(INFO, "[acct.rgwx] Invalid Request Authenticator in Account-Request from %s, discarding the message.", rgw_clients_id(cli)); return EINVAL; } } /* Handle the Accounting-On case: nothing to do, just reply OK */ if (status_type == RADIUS_ACCT_STATUS_TYPE_ACCOUNTING_ON) { TRACE_DEBUG(FULL, "[acct.rgwx] Received Accounting-On Acct-Status-Type attribute, replying without translation to Diameter."); CHECK_MALLOC( *rad_ans = radius_msg_new(RADIUS_CODE_ACCOUNTING_RESPONSE, rad_req->hdr->identifier) ); return -2; } if (status_type == RADIUS_ACCT_STATUS_TYPE_ACCOUNTING_OFF) { TRACE_DEBUG(FULL, "[acct.rgwx] Received Accounting-Off Acct-Status-Type attribute, we must terminate all active sessions."); TODO("RADIUS side is rebooting, send STR on all sessions???"); return ENOTSUP; } /* Check if we got a valid session information, otherwise the server will not be able to handle the data... */ if (!si) { TRACE_DEBUG(INFO, "[acct.rgwx] RADIUS Account-Request from %s did not contain a CLASS attribute with Diameter session information, reject.", rgw_clients_id(cli)); return EINVAL; } /* Add the Destination-Realm */ CHECK_FCT( fd_msg_avp_new ( cs->dict.Destination_Realm, 0, &avp ) ); idx = 0; if (un && ! cs->ignore_nai) { /* Is there an '@' in the user name? We don't care for decorated NAI here */ for (idx = un_len - 2; idx > 0; idx--) { if (un[idx] == '@') { idx++; break; } } } if (idx == 0) { /* Not found in the User-Name => we use the local domain of this gateway */ value.os.data = (uint8_t *)fd_g_config->cnf_diamrlm; value.os.len = fd_g_config->cnf_diamrlm_len; } else { value.os.data = un + idx; value.os.len = un_len - idx; } CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_FIRST_CHILD, avp) ); /* Create the Session-Id AVP */ { CHECK_FCT( fd_sess_fromsid_msg ( si, si_len, &sess, NULL) ); TRACE_DEBUG(FULL, "[acct.rgwx] Translating new accounting message for session '%.*s'...", (int)si_len, si); /* Add the Session-Id AVP as first AVP */ CHECK_FCT( fd_msg_avp_new ( cs->dict.Session_Id, 0, &avp ) ); value.os.data = (unsigned char *)si; value.os.len = si_len; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_FIRST_CHILD, avp) ); CHECK_FCT( fd_msg_sess_set(*diam_fw, sess) ); } /* Add the command code */ { struct msg_hdr * header = NULL; CHECK_FCT( fd_msg_hdr ( *diam_fw, &header ) ); header->msg_flags = CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE; header->msg_code = CC_AC; header->msg_appl = AI_ACCT; /* Add the Acct-Application-Id */ CHECK_FCT( fd_msg_avp_new ( cs->dict.Acct_Application_Id, 0, &avp ) ); value.i32 = header->msg_appl; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); /* save the end to end id */ e2eid = header->msg_eteid; } /* Convert the RADIUS attributes, as they appear in the message */ for (idx = 0; idx < rad_req->attr_used; idx++) { struct radius_attr_hdr * attr = (struct radius_attr_hdr *)(rad_req->buf + rad_req->attr_pos[idx]); switch (attr->type) { /* Any attribute valid in a RADIUS Access-Request or Access-Accept packet is valid in a RADIUS Accounting-Request packet, except that the following attributes MUST NOT be present in an Accounting- Request: User-Password, CHAP-Password, Reply-Message, State. */ case RADIUS_ATTR_USER_PASSWORD: case RADIUS_ATTR_CHAP_PASSWORD: case RADIUS_ATTR_REPLY_MESSAGE: case RADIUS_ATTR_STATE: case RADIUS_ATTR_MESSAGE_AUTHENTICATOR: case RADIUS_ATTR_EAP_MESSAGE: TRACE_DEBUG(INFO, "[acct.rgwx] RADIUS Account-Request contains a forbidden attribute (%hhd), reject.", attr->type); return EINVAL; /* This macro converts a RADIUS attribute to a Diameter AVP of type OctetString */ #define CONV2DIAM_STR( _dictobj_ ) \ CHECK_PARAMS( attr->length >= 2 ); \ /* Create the AVP with the specified dictionary model */ \ CHECK_FCT( fd_msg_avp_new ( cs->dict._dictobj_, 0, &avp ) ); \ value.os.len = attr->length - 2; \ value.os.data = (unsigned char *)(attr + 1); \ CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); \ /* Add the AVP in the Diameter message. */ \ CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); \ /* Same thing, for scalar AVPs of 32 bits */ #define CONV2DIAM_32B( _dictobj_ ) \ CHECK_PARAMS( attr->length == 6 ); \ CHECK_FCT( fd_msg_avp_new ( cs->dict._dictobj_, 0, &avp ) ); \ { \ uint8_t * v = (uint8_t *)(attr + 1); \ value.u32 = (v[0] << 24) \ | (v[1] << 16) \ | (v[2] << 8) \ | v[3] ; \ } \ CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); \ CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); \ /* And the 64b version */ #define CONV2DIAM_64B( _dictobj_ ) \ CHECK_PARAMS( attr->length == 10); \ CHECK_FCT( fd_msg_avp_new ( cs->dict._dictobj_, 0, &avp ) ); \ { \ uint8_t * v = (uint8_t *)(attr + 1); \ value.u64 = ((uint64_t)(v[0]) << 56) \ | ((uint64_t)(v[1]) << 48) \ | ((uint64_t)(v[2]) << 40) \ | ((uint64_t)(v[3]) << 32) \ | ((uint64_t)(v[4]) << 24) \ | ((uint64_t)(v[5]) << 16) \ | ((uint64_t)(v[6]) << 8) \ | (uint64_t)(v[7]) ; \ } \ CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); \ CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); \ /* Attributes as listed in RFC2866, section 5.13 and RFC4005, section 10.2.1 */ case RADIUS_ATTR_USER_NAME: CONV2DIAM_STR( User_Name ); break; case RADIUS_ATTR_NAS_IP_ADDRESS: CONV2DIAM_STR( NAS_IP_Address ); break; case RADIUS_ATTR_NAS_PORT: CONV2DIAM_32B( NAS_Port ); break; case RADIUS_ATTR_SERVICE_TYPE: CONV2DIAM_32B( Service_Type ); break; case RADIUS_ATTR_FRAMED_PROTOCOL: CONV2DIAM_32B( Framed_Protocol ); break; case RADIUS_ATTR_FRAMED_IP_ADDRESS: CONV2DIAM_STR( Framed_IP_Address ); break; case RADIUS_ATTR_FRAMED_IP_NETMASK: CONV2DIAM_STR( Framed_IP_Netmask ); break; case RADIUS_ATTR_FRAMED_ROUTING: CONV2DIAM_32B( Framed_Routing ); break; case RADIUS_ATTR_FILTER_ID: CONV2DIAM_STR( Filter_Id ); break; case RADIUS_ATTR_FRAMED_MTU: CONV2DIAM_32B( Framed_MTU ); break; case RADIUS_ATTR_FRAMED_COMPRESSION: CONV2DIAM_32B( Framed_Compression ); break; case RADIUS_ATTR_LOGIN_IP_HOST: CONV2DIAM_STR( Login_IP_Host ); break; case RADIUS_ATTR_LOGIN_SERVICE: CONV2DIAM_32B( Login_Service ); break; case RADIUS_ATTR_LOGIN_TCP_PORT: CONV2DIAM_32B( Login_TCP_Port ); break; case RADIUS_ATTR_CALLBACK_NUMBER: CONV2DIAM_STR( Callback_Number ); break; case RADIUS_ATTR_CALLBACK_ID: CONV2DIAM_STR( Callback_Id ); break; case RADIUS_ATTR_FRAMED_ROUTE: CONV2DIAM_STR( Framed_Route ); break; case RADIUS_ATTR_FRAMED_IPX_NETWORK: CONV2DIAM_32B( Framed_IPX_Network ); break; case RADIUS_ATTR_CLASS: CONV2DIAM_STR( Class ); /* In addition, save the data in the session if it is "our" CLASS_AAI_PREFIX Class attribute */ { char buf[32]; char * attr_val, *auth_val; attr_val = (char *)(attr + 1); auth_val = attr_val + CONSTSTRLEN(CLASS_AAI_PREFIX); if ( (attr->length > sizeof(struct radius_attr_hdr) + CONSTSTRLEN(CLASS_AAI_PREFIX) ) && (attr->length < sizeof(struct radius_attr_hdr) + CONSTSTRLEN(CLASS_AAI_PREFIX) + sizeof(buf)) && ! strncmp(attr_val, CLASS_AAI_PREFIX, CONSTSTRLEN(CLASS_AAI_PREFIX))) { memset(buf, 0, sizeof(buf)); memcpy(buf, auth_val, attr->length - sizeof(struct radius_attr_hdr) - CONSTSTRLEN(CLASS_AAI_PREFIX)); if (sscanf(buf, "%u", &auth_appl) == 1) { TRACE_DEBUG(ANNOYING, "Found Class attribute with '%s' prefix (attr #%d), AAI:%u.", CLASS_AAI_PREFIX, idx, auth_appl); } } } break; case RADIUS_ATTR_VENDOR_SPECIFIC: if (attr->length >= 6) { uint32_t vendor_id; uint8_t * c = (uint8_t *)(attr + 1); vendor_id = c[0] << 24 | c[1] << 16 | c[2] << 8 | c[3]; c += 4; switch (vendor_id) { /* For the vendors we KNOW they follow the VSA recommended format, we convert following the rules of RFC4005 (9.6.2) */ case RADIUS_VENDOR_ID_MICROSOFT : /* RFC 2548 */ /* other vendors ? */ { size_t left; struct radius_attr_vendor *vtlv; left = attr->length - 6; vtlv = (struct radius_attr_vendor *)c; while ((left >= 2) && (vtlv->vendor_length <= left)) { /* Search our dictionary for corresponding Vendor's AVP */ struct dict_avp_request req; struct dict_object * avp_model = NULL; memset(&req, 0, sizeof(struct dict_avp_request)); req.avp_vendor = vendor_id; req.avp_code = vtlv->vendor_type; CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_CODE_AND_VENDOR, &req, &avp_model, 0) ); if (!avp_model) { TRACE_DEBUG(FULL, "Unknown attribute (vendor 0x%x, code 0x%x) ignored.", req.avp_vendor, req.avp_code); } else { CHECK_FCT( fd_msg_avp_new ( avp_model, 0, &avp ) ); value.os.len = vtlv->vendor_length - 2; value.os.data = (unsigned char *)(vtlv + 1); CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); } c += vtlv->vendor_length; left -= vtlv->vendor_length; vtlv = (struct radius_attr_vendor *)c; } } break; /* Other vendors we KNOw how to convert the attributes would be added here... */ /* case RADIUS_VENDOR_ID_CISCO : break; */ /* case RADIUS_VENDOR_ID_IETF : (extended RADIUS attributes) break; */ /* When we don't know, just discard the attribute... VSA are optional with regards to RADIUS anyway */ default: /* do nothing */ TRACE_DEBUG(FULL, "VSA attribute from vendor %d discarded", vendor_id); } } break; case RADIUS_ATTR_SESSION_TIMEOUT: /* Translation depends on Termination-Action : rfc4005#section-9.2.1 */ if (termination_action != RADIUS_TERMINATION_ACTION_RADIUS_REQUEST) { CONV2DIAM_32B( Session_Timeout ); } else { CONV2DIAM_32B( Authorization_Lifetime ); /* And add this additional AVP */ CHECK_FCT( fd_msg_avp_new ( cs->dict.Re_Auth_Request_Type, 0, &avp ) ); value.u32 = ACV_ART_AUTHORIZE_AUTHENTICATE; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); } break; case RADIUS_ATTR_IDLE_TIMEOUT: CONV2DIAM_32B( Idle_Timeout ); break; case RADIUS_ATTR_TERMINATION_ACTION: /* Just remove */ break; case RADIUS_ATTR_CALLED_STATION_ID: CONV2DIAM_STR( Called_Station_Id ); break; case RADIUS_ATTR_CALLING_STATION_ID: CONV2DIAM_STR( Calling_Station_Id ); break; case RADIUS_ATTR_NAS_IDENTIFIER: CONV2DIAM_STR( NAS_Identifier ); break; /* Proxy-State is handled by echo_drop.rgwx plugin, we ignore it here */ case RADIUS_ATTR_LOGIN_LAT_SERVICE: CONV2DIAM_STR( Login_LAT_Service ); break; case RADIUS_ATTR_LOGIN_LAT_NODE: CONV2DIAM_STR( Login_LAT_Node ); break; case RADIUS_ATTR_LOGIN_LAT_GROUP: CONV2DIAM_STR( Login_LAT_Group ); break; case RADIUS_ATTR_FRAMED_APPLETALK_LINK: CONV2DIAM_32B( Framed_AppleTalk_Link ); break; case RADIUS_ATTR_FRAMED_APPLETALK_NETWORK: CONV2DIAM_32B( Framed_AppleTalk_Network ); break; case RADIUS_ATTR_FRAMED_APPLETALK_ZONE: CONV2DIAM_STR( Framed_AppleTalk_Zone ); break; case RADIUS_ATTR_ACCT_STATUS_TYPE: /* - If the RADIUS message received is an Accounting-Request, the Acct-Status-Type attribute value must be converted to a Accounting-Record-Type AVP value. If the Acct-Status-Type attribute value is STOP, the local server MUST issue a Session-Termination-Request message once the Diameter Accounting-Answer message has been received. */ switch (status_type) { case RADIUS_ACCT_STATUS_TYPE_START: value.u32 = ACV_ART_START_RECORD; break; case RADIUS_ACCT_STATUS_TYPE_STOP: value.u32 = ACV_ART_STOP_RECORD; send_str = 1; /* Register this info in the session */ break; case RADIUS_ACCT_STATUS_TYPE_INTERIM_UPDATE: value.u32 = ACV_ART_INTERIM_RECORD; break; default: TRACE_DEBUG(INFO, "Unknown RADIUS_ATTR_ACCT_STATUS_TYPE value %d, aborting...", status_type); return ENOTSUP; } CHECK_FCT( fd_msg_avp_new ( cs->dict.Accounting_Record_Type, 0, &avp ) ); CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); /* While here, we also add the Accouting-Record-Number AVP. The Accounting-Record-Number AVP (AVP Code 485) is of type Unsigned32 and identifies this record within one session. As Session-Id AVPs are globally unique, the combination of Session-Id and Accounting- Record-Number AVPs is also globally unique, and can be used in matching accounting records with confirmations. An easy way to produce unique numbers is to set the value to 0 for records of type EVENT_RECORD and START_RECORD, and set the value to 1 for the first INTERIM_RECORD, 2 for the second, and so on until the value for STOP_RECORD is one more than for the last INTERIM_RECORD. -- we actually use the end-to-end id of the message here, which remains constant if we send a duplicate, so it has the same properties as the suggested algorithm. Anyway, it assumes that we are not converting twice the same RADIUS message. . */ CHECK_FCT( fd_msg_avp_new ( cs->dict.Accounting_Record_Number, 0, &avp ) ); value.u32 = e2eid; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); break; case RADIUS_ATTR_ACCT_DELAY_TIME: CONV2DIAM_32B( Acct_Delay_Time ); break; /* - If the RADIUS message contains the Accounting-Input-Octets, Accounting-Input-Packets, Accounting-Output-Octets, or Accounting-Output-Packets, these attributes must be converted to the Diameter equivalents. Further, if the Acct-Input- Gigawords or Acct-Output-Gigawords attributes are present, these must be used to properly compute the Diameter accounting AVPs. */ case RADIUS_ATTR_ACCT_INPUT_OCTETS: memset(&value, 0, sizeof(value)); { uint8_t * v = (uint8_t *)(attr + 1); value.u64 = (v[0] << 24) | (v[1] << 16) | (v[2] << 8) | v[3] ; } value.u64 += ((uint64_t)gigawords_in << 32); CHECK_FCT( fd_msg_avp_new ( cs->dict.Accounting_Input_Octets, 0, &avp ) ); CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); break; case RADIUS_ATTR_ACCT_OUTPUT_OCTETS: memset(&value, 0, sizeof(value)); { uint8_t * v = (uint8_t *)(attr + 1); value.u64 = (v[0] << 24) | (v[1] << 16) | (v[2] << 8) | v[3] ; } value.u64 += ((uint64_t)gigawords_out << 32); CHECK_FCT( fd_msg_avp_new ( cs->dict.Accounting_Output_Octets, 0, &avp ) ); CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); break; case RADIUS_ATTR_ACCT_SESSION_ID: CONV2DIAM_STR( Acct_Session_Id ); break; case RADIUS_ATTR_ACCT_AUTHENTIC: CONV2DIAM_32B( Acct_Authentic ); break; case RADIUS_ATTR_ACCT_SESSION_TIME: CONV2DIAM_32B( Acct_Session_Time ); break; case RADIUS_ATTR_ACCT_INPUT_PACKETS: memset(&value, 0, sizeof(value)); { uint8_t * v = (uint8_t *)(attr + 1); value.u64 = (v[0] << 24) | (v[1] << 16) | (v[2] << 8) | v[3] ; } /* value.u64 += (gigawords_in << 32); */ CHECK_FCT( fd_msg_avp_new ( cs->dict.Accounting_Input_Packets, 0, &avp ) ); CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); break; case RADIUS_ATTR_ACCT_OUTPUT_PACKETS: memset(&value, 0, sizeof(value)); { uint8_t * v = (uint8_t *)(attr + 1); value.u64 = (v[0] << 24) | (v[1] << 16) | (v[2] << 8) | v[3] ; } /* value.u64 += (gigawords_out << 32); */ CHECK_FCT( fd_msg_avp_new ( cs->dict.Accounting_Output_Packets, 0, &avp ) ); CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); break; /* - If the Accounting message contains an Acct-Termination-Cause attribute, it should be translated to the equivalent Termination-Cause AVP value. */ case RADIUS_ATTR_ACCT_TERMINATE_CAUSE: /* rfc4005#section-9.3.5 */ { uint8_t * v = (uint8_t *)(attr + 1); str_cause = (v[0] << 24) | (v[1] << 16) | (v[2] << 8) | v[3] ; } str_cause += 10; /* This seems to be the rule, we can modify later if needed */ break; case RADIUS_ATTR_ACCT_MULTI_SESSION_ID: CONV2DIAM_STR( Acct_Multi_Session_Id ); break; case RADIUS_ATTR_ACCT_LINK_COUNT: CONV2DIAM_32B( Acct_Link_Count ); break; /* CHAP-Challenge is not present in Accounting-Request */ case RADIUS_ATTR_NAS_PORT_TYPE: CONV2DIAM_32B( NAS_Port_Type ); break; case RADIUS_ATTR_PORT_LIMIT: CONV2DIAM_32B( Port_Limit ); break; case RADIUS_ATTR_LOGIN_LAT_PORT: CONV2DIAM_STR( Login_LAT_Port ); break; /* RFC 3162 */ case RADIUS_ATTR_NAS_IPV6_ADDRESS: CONV2DIAM_STR( NAS_IPv6_Address ); break; case RADIUS_ATTR_FRAMED_INTERFACE_ID: CONV2DIAM_64B( Framed_Interface_Id ); break; case RADIUS_ATTR_FRAMED_IPV6_PREFIX: CONV2DIAM_STR( Framed_IPv6_Prefix ); break; case RADIUS_ATTR_LOGIN_IPV6_HOST: CONV2DIAM_STR( Login_IPv6_Host ); break; case RADIUS_ATTR_FRAMED_IPV6_ROUTE: CONV2DIAM_STR( Framed_IPv6_Route ); break; case RADIUS_ATTR_FRAMED_IPV6_POOL: CONV2DIAM_STR( Framed_IPv6_Pool ); break; /* RFC 2868 */ /* Prepare the top-level Tunneling AVP for each tag values, as needed, and add to the Diameter message. This macro is called when an AVP is added inside the group, so we will not have empty grouped AVPs */ #define AVP_TUN_PREPARE() { \ if (avp_tun == NULL) { \ CHECK_MALLOC( avp_tun = calloc(sizeof(struct avp *), 32 ) ); \ } \ tag = *(uint8_t *)(attr + 1); \ if (tag > 0x1F) tag = 0; \ if (avp_tun[tag] == NULL) { \ CHECK_FCT( fd_msg_avp_new ( cs->dict.Tunneling, 0, &avp_tun[tag] ) ); \ CHECK_FCT( fd_msg_avp_add (*diam_fw, MSG_BRW_LAST_CHILD, avp_tun[tag]));\ } \ } /* Convert an attribute to an OctetString AVP and add inside the Tunneling AVP corresponding to the tag */ #define CONV2DIAM_TUN_STR( _dictobj_ ) { \ uint8_t tag; \ CHECK_PARAMS( attr->length >= 3); \ AVP_TUN_PREPARE(); \ CHECK_FCT( fd_msg_avp_new ( cs->dict._dictobj_, 0, &avp ) ); \ value.os.len = attr->length - (tag ? 3 : 2); \ value.os.data = ((unsigned char *)(attr + 1)) + (tag ? 1 : 0); \ CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); \ CHECK_FCT( fd_msg_avp_add ( avp_tun[tag], MSG_BRW_LAST_CHILD, avp) ); \ } /* Convert an attribute to a scalar AVP and add inside the Tunneling AVP corresponding to the tag */ #define CONV2DIAM_TUN_24B( _dictobj_ ) { \ uint8_t tag; \ CHECK_PARAMS( attr->length == 6); \ AVP_TUN_PREPARE(); \ CHECK_FCT( fd_msg_avp_new ( cs->dict._dictobj_, 0, &avp ) ); \ { \ uint8_t * v = (uint8_t *)(attr + 1); \ value.u32 = (v[1] << 16) | (v[2] <<8) | v[3] ; \ } \ CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); \ CHECK_FCT( fd_msg_avp_add ( avp_tun[tag], MSG_BRW_LAST_CHILD, avp) ); \ } /* - If the RADIUS message contains Tunnel information [RADTunnels], the attributes or tagged groups should each be converted to a Diameter Tunneling Grouped AVP set. If the tunnel information contains a Tunnel-Password attribute, the RADIUS encryption must be resolved, and the password forwarded, by using Diameter security methods. -> If the RADIUS message does not use properly the Tag info, result is unpredictable here.. */ case RADIUS_ATTR_TUNNEL_TYPE: CONV2DIAM_TUN_24B( Tunnel_Type ); break; case RADIUS_ATTR_TUNNEL_MEDIUM_TYPE: CONV2DIAM_TUN_24B( Tunnel_Medium_Type ); break; case RADIUS_ATTR_TUNNEL_CLIENT_ENDPOINT: CONV2DIAM_TUN_STR( Tunnel_Client_Endpoint ); break; case RADIUS_ATTR_TUNNEL_SERVER_ENDPOINT: CONV2DIAM_TUN_STR( Tunnel_Server_Endpoint ); break; /* Tunnel-Password never present in an Accounting-Request */ case RADIUS_ATTR_TUNNEL_PRIVATE_GROUP_ID: CONV2DIAM_TUN_STR( Tunnel_Private_Group_Id ); break; case RADIUS_ATTR_TUNNEL_ASSIGNMENT_ID: CONV2DIAM_TUN_STR( Tunnel_Assignment_Id ); break; /* Tunnel-Reference never present in an Accounting-Request */ case RADIUS_ATTR_TUNNEL_CLIENT_AUTH_ID: CONV2DIAM_TUN_STR( Tunnel_Client_Auth_Id ); break; case RADIUS_ATTR_TUNNEL_SERVER_AUTH_ID: CONV2DIAM_TUN_STR( Tunnel_Server_Auth_Id ); break; /* RFC 2869 */ /* Acct-Input-Gigawords, Acct-Output- Gigawords, Event-Timestamp, and NAS-Port-Id may have 0-1 instances in an Accounting-Request packet. Connect-Info may have 0+ instances in an Accounting-Request packet. The other attributes added in this document must not be present in an Accounting-Request. */ case RADIUS_ATTR_ACCT_INPUT_GIGAWORDS: break; /* we already saved the value in gigawords_in */ case RADIUS_ATTR_ACCT_OUTPUT_GIGAWORDS: break; /* we already saved the value in gigawords_out */ case RADIUS_ATTR_EVENT_TIMESTAMP: /* RADIUS: The Value field is four octets encoding an unsigned integer with the number of seconds since January 1, 1970 00:00 UTC. Diameter: The Time format is derived from the OctetString AVP Base Format. The string MUST contain four octets, in the same format as the first four bytes are in the NTP timestamp format. The NTP Timestamp format is defined in Chapter 3 of [RFC4330]. This represents the number of seconds since 0h on 1 January 1900 with respect to the Coordinated Universal Time (UTC). -- RFC4330: NTP timestamps are represented as a 64-bit unsigned fixed-point number, in seconds relative to 0h on 1 January 1900. The integer part is in the first 32 bits, and the fraction part in the last 32 bits. In the fraction part, the non-significant low-order bits are not specified and are ordinarily set to 0. */ { uint32_t ts; uint8_t * v = (uint8_t *)(attr + 1); /* Read the RADIUS attribute value */ ts = (v[0] << 24) | (v[1] << 16) | (v[2] << 8) | v[3] ; /* Add the 70 missing years */ ts += 2208988800U; /* 60 * 60 * 24 * ( 365 * 70 + 17 ) */ /* Convert to network byte order */ ts = htonl(ts); /* Diameter Time datatype is derived from OctetString */ value.os.data = (void *) &ts; value.os.len = sizeof(uint32_t); CHECK_FCT( fd_msg_avp_new ( cs->dict.Event_Timestamp, 0, &avp ) ); CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); } break; case RADIUS_ATTR_NAS_PORT_ID: CONV2DIAM_STR( NAS_Port_Id ); break; case RADIUS_ATTR_CONNECT_INFO: CONV2DIAM_STR( Connect_Info ); break; case RADIUS_ATTR_FRAMED_POOL: /* To follow the IPv6 version */ CONV2DIAM_STR( Framed_Pool ); break; /* RFC 3579 */ /* The EAP-Message and Message-Authenticator attributes specified in this document MUST NOT be present in an Accounting-Request. */ case RADIUS_ATTR_ORIGINATING_LINE_INFO: CONV2DIAM_STR( Originating_Line_Info ); break; /* Default */ default: /* unknown attribute */ /* We just keep the attribute in the RADIUS message */ rad_req->attr_pos[nattr_used++] = rad_req->attr_pos[idx]; } } /* Update the radius message to remove all handled attributes */ rad_req->attr_used = nattr_used; /* Store useful information in the session */ { struct sess_state * st; CHECK_MALLOC( st = malloc(sizeof(struct sess_state)) ); memset(st, 0, sizeof(struct sess_state)); st->auth_appl = auth_appl; if (auth_appl) { /* We use the value 0 for servers which indicated NO STATE MAINTAINED, hence have no need for STR */ st->send_str = send_str; } st->term_cause = str_cause; CHECK_FCT( fd_sess_state_store( cs->sess_hdl, sess, &st ) ); } return 0; } /* Callback when an STA is received after having sent an STR. */ static void handle_sta(void * data, struct msg ** answer) { struct rgwp_config * cs = data; struct avp *avp; struct avp_hdr *ahdr; CHECK_PARAMS_DO( data && answer && *answer, goto out ); /* Check the Diameter error code */ CHECK_FCT_DO( fd_msg_search_avp (*answer, cs->dict.Result_Code, &avp), goto out ); CHECK_PARAMS_DO( avp, goto out ); CHECK_FCT_DO( fd_msg_avp_hdr ( avp, &ahdr ), goto out ); if (ahdr->avp_value->u32 != ER_DIAMETER_SUCCESS) goto out; /* OK, discard the message without complaining */ fd_msg_free(*answer); *answer = NULL; out: if (answer && *answer) { char * buf = NULL; size_t buflen; CHECK_MALLOC_DO( fd_msg_dump_treeview(&buf, &buflen, NULL, *answer, NULL, 0, 1), ); TRACE_DEBUG(INFO, "Received the following problematic STA message, discarding anyway: %s", buf ?: ""); free(buf); fd_msg_free(*answer); *answer = NULL; } return; } static int acct_diam_ans( struct rgwp_config * cs, struct msg ** diam_ans, struct radius_msg ** rad_fw, struct rgw_client * cli ) { struct session * sess; struct sess_state * st = NULL, stloc; struct avp *avp, *next; struct avp_hdr *ahdr, *oh, *or; os0_t sid = NULL; size_t sidlen; TRACE_ENTRY("%p %p %p %p", cs, diam_ans, rad_fw, cli); CHECK_PARAMS(cs); CHECK_FCT( fd_msg_sess_get(fd_g_config->cnf_dict, *diam_ans, &sess, NULL) ); if (sess) { CHECK_FCT( fd_sess_state_retrieve( cs->sess_hdl, sess, &st ) ); CHECK_FCT( fd_sess_getsid(sess, &sid, &sidlen) ); } if (!st) { TRACE_DEBUG(INFO, "Received an ACA without corresponding session information, cannot translate to RADIUS"); return EINVAL; } /* Free the state */ memcpy(&stloc, st, sizeof(struct sess_state)); free(st); st = &stloc; /* Search these AVPs first */ CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Origin_Host, &avp) ); CHECK_FCT( fd_msg_avp_hdr ( avp, &oh ) ); CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Origin_Realm, &avp) ); CHECK_FCT( fd_msg_avp_hdr ( avp, &or ) ); /* Check the Diameter error code */ CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Result_Code, &avp) ); ASSERT( avp ); /* otherwise the message should have been discarded a lot earlier because of ABNF */ CHECK_FCT( fd_msg_avp_hdr ( avp, &ahdr ) ); switch (ahdr->avp_value->u32) { case ER_DIAMETER_SUCCESS: case ER_DIAMETER_LIMITED_SUCCESS: (*rad_fw)->hdr->code = RADIUS_CODE_ACCOUNTING_RESPONSE; break; default: fd_log_debug("[acct.rgwx] Received Diameter answer with error code '%d' from server '%.*s', session %.*s, not translating into Accounting-Response", ahdr->avp_value->u32, (int)oh->avp_value->os.len, oh->avp_value->os.data, (int)sidlen, sid); CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Error_Message, &avp) ); if (avp) { CHECK_FCT( fd_msg_avp_hdr ( avp, &ahdr ) ); fd_log_debug("[acct.rgwx] Error-Message content: '%.*s'", (int)ahdr->avp_value->os.len, ahdr->avp_value->os.data); } CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Error_Reporting_Host, &avp) ); if (avp) { CHECK_FCT( fd_msg_avp_hdr ( avp, &ahdr ) ); fd_log_debug("[acct.rgwx] Error-Reporting-Host: '%.*s'", (int)ahdr->avp_value->os.len, ahdr->avp_value->os.data); } CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Failed_AVP, &avp) ); if (avp) { fd_log_debug("[acct.rgwx] Failed-AVP was included in the message."); /* Dump its content ? */ } /* Now, destroy the Diameter message, since we know it is not converted to RADIUS */ CHECK_FCT( fd_msg_free(*diam_ans) ); *diam_ans = NULL; return -1; } /* Remove this Result-Code avp */ CHECK_FCT( fd_msg_free( avp ) ); /* If it was a response to a STOP record, we must send an STR for this session */ if (st->send_str) { struct msg * str = NULL; struct msg_hdr * hdr = NULL; DiamId_t fqdn; size_t fqdn_len; DiamId_t realm; size_t realm_len; union avp_value avp_val; /* Create a new STR message */ CHECK_FCT( fd_msg_new ( cs->dict.Session_Termination_Request, MSGFL_ALLOC_ETEID, &str ) ); /* Set the application-id to the auth application if available, accounting otherwise (not sure what is actually expected...) */ CHECK_FCT( fd_msg_hdr ( str, &hdr ) ); hdr->msg_appl = st->auth_appl ?: AI_ACCT; /* Add the Session-Id AVP as first AVP */ CHECK_FCT( fd_msg_avp_new ( cs->dict.Session_Id, 0, &avp ) ); avp_val.os.data = sid; avp_val.os.len = sidlen; CHECK_FCT( fd_msg_avp_setvalue ( avp, &avp_val ) ); CHECK_FCT( fd_msg_avp_add ( str, MSG_BRW_FIRST_CHILD, avp) ); CHECK_FCT( fd_sess_ref_msg(sess) ); /* Add the Destination-Realm as next AVP */ CHECK_FCT( fd_msg_avp_new ( cs->dict.Destination_Realm, 0, &avp ) ); CHECK_FCT( fd_msg_avp_setvalue ( avp, or->avp_value ) ); CHECK_FCT( fd_msg_avp_add ( str, MSG_BRW_LAST_CHILD, avp) ); /* Get information on the NAS */ CHECK_FCT( rgw_clients_get_origin(cli, &fqdn, &fqdn_len, &realm, &realm_len) ); /* Add the Origin-Host as next AVP */ CHECK_FCT( fd_msg_avp_new ( cs->dict.Origin_Host, 0, &avp ) ); memset(&avp_val, 0, sizeof(avp_val)); avp_val.os.data = (unsigned char *)fqdn; avp_val.os.len = fqdn_len; CHECK_FCT( fd_msg_avp_setvalue ( avp, &avp_val ) ); CHECK_FCT( fd_msg_avp_add ( str, MSG_BRW_LAST_CHILD, avp) ); /* Add the Origin-Realm as next AVP */ CHECK_FCT( fd_msg_avp_new ( cs->dict.Origin_Realm, 0, &avp ) ); memset(&avp_val, 0, sizeof(avp_val)); avp_val.os.data = (unsigned char *)realm; avp_val.os.len = realm_len; CHECK_FCT( fd_msg_avp_setvalue ( avp, &avp_val ) ); CHECK_FCT( fd_msg_avp_add ( str, MSG_BRW_LAST_CHILD, avp) ); /* Auth-Application-Id -- if we did not get it from our Class attribute, we just set "0" */ CHECK_FCT( fd_msg_avp_new ( cs->dict.Auth_Application_Id, 0, &avp ) ); avp_val.u32 = st->auth_appl; CHECK_FCT( fd_msg_avp_setvalue ( avp, &avp_val ) ); CHECK_FCT( fd_msg_avp_add ( str, MSG_BRW_LAST_CHILD, avp) ); /* Termination-Cause */ CHECK_FCT( fd_msg_avp_new ( cs->dict.Termination_Cause, 0, &avp ) ); avp_val.u32 = st->term_cause; CHECK_FCT( fd_msg_avp_setvalue ( avp, &avp_val ) ); CHECK_FCT( fd_msg_avp_add ( str, MSG_BRW_LAST_CHILD, avp) ); /* Send this message */ CHECK_FCT( fd_msg_send ( &str, handle_sta, cs ) ); } /* No attributes should be found in Accounting-Response packets except Proxy-State and possibly Vendor- Specific. */ /* Now loop in the list of AVPs and convert those that we know how */ CHECK_FCT( fd_msg_browse(*diam_ans, MSG_BRW_FIRST_CHILD, &next, NULL) ); while (next) { int handled = 1; avp = next; CHECK_FCT( fd_msg_browse(avp, MSG_BRW_NEXT, &next, NULL) ); CHECK_FCT( fd_msg_avp_hdr ( avp, &ahdr ) ); if (!(ahdr->avp_flags & AVP_FLAG_VENDOR)) { switch (ahdr->avp_code) { /* Based on RFC4005, sec 3.10 */ case DIAM_ATTR_SESSION_ID: case DIAM_ATTR_ORIGIN_HOST: case DIAM_ATTR_ORIGIN_REALM: case DIAM_ATTR_ACCOUNTING_RECORD_TYPE: case DIAM_ATTR_ACCOUNTING_RECORD_NUMBER: case DIAM_ATTR_ACCT_APPLICATION_ID: case DIAM_ATTR_VENDOR_SPECIFIC_APPLICATION_ID: case DIAM_ATTR_USER_NAME: case DIAM_ATTR_ACCOUNTING_SUB_SESSION_ID: case DIAM_ATTR_ACCT_SESSION_ID: case DIAM_ATTR_ACCT_MULTI_SESSION_ID: case DIAM_ATTR_EVENT_TIMESTAMP: case DIAM_ATTR_ORIGIN_AAA_PROTOCOL: case DIAM_ATTR_ORIGIN_STATE_ID: case DIAM_ATTR_NAS_IDENTIFIER: case DIAM_ATTR_NAS_IP_ADDRESS: case DIAM_ATTR_NAS_IPV6_ADDRESS: case DIAM_ATTR_NAS_PORT: case DIAM_ATTR_NAS_PORT_ID: case DIAM_ATTR_NAS_PORT_TYPE: case DIAM_ATTR_SERVICE_TYPE: case DIAM_ATTR_TERMINATION_CAUSE: case DIAM_ATTR_ACCOUNTING_REALTIME_REQUIRED: case DIAM_ATTR_ACCT_INTERIM_INTERVAL: case DIAM_ATTR_CLASS: /* We just remove these AVP, they are not expected in RADIUS client */ break; default: /* Leave the AVP in the message for further treatment */ handled = 0; } } else { /* Vendor-specific AVPs */ switch (ahdr->avp_vendor) { default: /* unknown vendor */ handled = 0; } } if (handled) { CHECK_FCT( fd_msg_free( avp ) ); } } /* The Authenticator field in an Accounting-Response packet is called the Response Authenticator, and contains a one-way MD5 hash calculated over a stream of octets consisting of the Accounting- Response Code, Identifier, Length, the Request Authenticator field from the Accounting-Request packet being replied to, and the response attributes if any, followed by the shared secret. The resulting 16 octet MD5 hash value is stored in the Authenticator field of the Accounting-Response packet. -- done in radius_msg_finish_srv */ return 0; } /* The exported symbol */ struct rgw_api rgwp_descriptor = { .rgwp_name = "acct", .rgwp_conf_parse = acct_conf_parse, .rgwp_conf_free = acct_conf_free, .rgwp_rad_req = acct_rad_req, .rgwp_diam_ans = acct_diam_ans }; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/rgwx_auth.c000066400000000000000000002325101333553357400253750ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* RADIUS Access-Request messages translation plugin */ #include "rgw_common.h" /* Attributes missing from radius.h */ #define RADIUS_ATTR_CHAP_PASSWORD 3 #define RADIUS_ATTR_ARAP_PASSWORD 70 /* Other constants we use */ #define AI_NASREQ 1 /* Diameter NASREQ */ #define AI_EAP 5 /* Diameter EAP application */ #define CC_AA 265 /* AAR */ #define CC_DIAMETER_EAP 268 /* DER */ #define ACV_ART_AUTHORIZE_AUTHENTICATE 3 /* AUTHORIZE_AUTHENTICATE */ #define ACV_OAP_RADIUS 1 /* RADIUS */ #define ACV_ASS_STATE_MAINTAINED 0 /* STATE_MAINTAINED */ #define ACV_ASS_NO_STATE_MAINTAINED 1 /* NO_STATE_MAINTAINED */ /* The state we keep for this plugin */ struct rgwp_config { struct { struct dict_object * ARAP_Password; /* ARAP-Password */ struct dict_object * ARAP_Security; /* ARAP-Security */ struct dict_object * ARAP_Security_Data; /* ARAP-Security-Data */ struct dict_object * Auth_Application_Id; /* Auth-Application-Id */ struct dict_object * Auth_Request_Type; /* Auth-Request-Type */ struct dict_object * Authorization_Lifetime; /* Authorization-Lifetime */ struct dict_object * Callback_Number; /* Callback-Number */ struct dict_object * Called_Station_Id; /* Called-Station-Id */ struct dict_object * Calling_Station_Id; /* Calling-Station-Id */ struct dict_object * CHAP_Algorithm; /* CHAP-Algorithm */ struct dict_object * CHAP_Auth; /* CHAP-Auth */ struct dict_object * CHAP_Challenge; /* CHAP-Challenge */ struct dict_object * CHAP_Ident; /* CHAP-Ident */ struct dict_object * CHAP_Response; /* CHAP-Response */ struct dict_object * Destination_Host; /* Destination-Host */ struct dict_object * Destination_Realm; /* Destination-Realm */ struct dict_object * Connect_Info; /* Connect-Info */ struct dict_object * EAP_Payload; /* EAP-Payload */ struct dict_object * Error_Message; /* Error-Message */ struct dict_object * Error_Reporting_Host; /* Error-Reporting-Host */ struct dict_object * Failed_AVP; /* Failed-AVP */ struct dict_object * Framed_Compression; /* Framed-Compression */ struct dict_object * Framed_IP_Address; /* Framed-IP-Address */ struct dict_object * Framed_IP_Netmask; /* Framed-IP-Netmask */ struct dict_object * Framed_Interface_Id; /* Framed-Interface-Id */ struct dict_object * Framed_IPv6_Prefix; /* Framed-IPv6-Prefix */ struct dict_object * Framed_MTU; /* Framed-MTU */ struct dict_object * Framed_Protocol; /* Framed-Protocol */ struct dict_object * Login_IP_Host; /* Login-IP-Host */ struct dict_object * Login_IPv6_Host; /* Login-IPv6-Host */ struct dict_object * Login_LAT_Group; /* Login-LAT-Group */ struct dict_object * Login_LAT_Node; /* Login-LAT-Node */ struct dict_object * Login_LAT_Port; /* Login-LAT-Port */ struct dict_object * Login_LAT_Service; /* Login-LAT-Service */ struct dict_object * NAS_Identifier; /* NAS-Identifier */ struct dict_object * NAS_IP_Address; /* NAS-IP-Address */ struct dict_object * NAS_IPv6_Address; /* NAS-IPv6-Address */ struct dict_object * NAS_Port; /* NAS-Port */ struct dict_object * NAS_Port_Id; /* NAS-Port-Id */ struct dict_object * NAS_Port_Type; /* NAS-Port-Type */ struct dict_object * Origin_AAA_Protocol; /* Origin-AAA-Protocol */ struct dict_object * Origin_Host; /* Origin-Host */ struct dict_object * Origin_Realm; /* Origin-Realm */ struct dict_object * Originating_Line_Info; /* Originating-Line-Info */ struct dict_object * Port_Limit; /* Port-Limit */ struct dict_object * Re_Auth_Request_Type; /* Re-Auth-Request-Type */ struct dict_object * Result_Code; /* Result-Code */ struct dict_object * Service_Type; /* Service-Type */ struct dict_object * Session_Id; /* Session-Id */ struct dict_object * Session_Timeout; /* Session-Timeout */ struct dict_object * State; /* State */ struct dict_object * Tunneling; /* Tunneling */ struct dict_object * Tunnel_Type; /* Tunnel-Type */ struct dict_object * Tunnel_Medium_Type; /* Tunnel-Medium-Type */ struct dict_object * Tunnel_Client_Endpoint; /* Tunnel-Client-Endpoint */ struct dict_object * Tunnel_Server_Endpoint; /* Tunnel-Server-Endpoint */ struct dict_object * Tunnel_Private_Group_Id; /* Tunnel-Private-Group-Id */ struct dict_object * Tunnel_Preference; /* Tunnel-Preference */ struct dict_object * Tunnel_Client_Auth_Id; /* Tunnel-Client-Auth-Id */ struct dict_object * Tunnel_Server_Auth_Id; /* Tunnel-Server-Auth-Id */ struct dict_object * User_Name; /* User-Name */ struct dict_object * User_Password; /* User-Password */ } dict; /* cache of the dictionary objects we use */ struct session_handler * sess_hdl; /* We store RADIUS request authenticator information in the session */ char * confstr; int ignore_nai; }; struct sess_state { uint8_t req_auth[16]; }; /* Initialize the plugin */ static int auth_conf_parse(char * confstr, struct rgwp_config ** state) { struct rgwp_config * new; struct dict_object * app; TRACE_ENTRY("%p %p", confstr, state); CHECK_PARAMS( state ); CHECK_MALLOC( new = malloc(sizeof(struct rgwp_config)) ); memset(new, 0, sizeof(struct rgwp_config)); CHECK_FCT( fd_sess_handler_create( &new->sess_hdl, (void *)free, NULL, NULL ) ); new->confstr = confstr; if (confstr && strstr(confstr, "nonai")) new->ignore_nai = 1; /* Resolve all dictionary objects we use */ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "ARAP-Password", &new->dict.ARAP_Password, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "ARAP-Security", &new->dict.ARAP_Security, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "ARAP-Security-Data", &new->dict.ARAP_Security_Data, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Auth-Application-Id", &new->dict.Auth_Application_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Auth-Request-Type", &new->dict.Auth_Request_Type, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Authorization-Lifetime", &new->dict.Authorization_Lifetime, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Callback-Number", &new->dict.Callback_Number, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Called-Station-Id", &new->dict.Called_Station_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Calling-Station-Id", &new->dict.Calling_Station_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "CHAP-Algorithm", &new->dict.CHAP_Algorithm, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "CHAP-Auth", &new->dict.CHAP_Auth, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "CHAP-Challenge", &new->dict.CHAP_Challenge, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "CHAP-Ident", &new->dict.CHAP_Ident, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "CHAP-Response", &new->dict.CHAP_Response, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Connect-Info", &new->dict.Connect_Info, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Host", &new->dict.Destination_Host, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Realm", &new->dict.Destination_Realm, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "EAP-Payload", &new->dict.EAP_Payload, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Error-Message", &new->dict.Error_Message, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Error-Reporting-Host", &new->dict.Error_Reporting_Host, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Failed-AVP", &new->dict.Failed_AVP, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-Compression", &new->dict.Framed_Compression, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-IP-Address", &new->dict.Framed_IP_Address, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-IP-Netmask", &new->dict.Framed_IP_Netmask, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-Interface-Id", &new->dict.Framed_Interface_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-IPv6-Prefix", &new->dict.Framed_IPv6_Prefix, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-MTU", &new->dict.Framed_MTU, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Framed-Protocol", &new->dict.Framed_Protocol, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Login-IP-Host", &new->dict.Login_IP_Host, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Login-IPv6-Host", &new->dict.Login_IPv6_Host, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Login-LAT-Group", &new->dict.Login_LAT_Group, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Login-LAT-Node", &new->dict.Login_LAT_Node, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Login-LAT-Port", &new->dict.Login_LAT_Port, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Login-LAT-Service", &new->dict.Login_LAT_Service, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "NAS-Identifier", &new->dict.NAS_Identifier, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "NAS-IP-Address", &new->dict.NAS_IP_Address, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "NAS-IPv6-Address", &new->dict.NAS_IPv6_Address, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "NAS-Port", &new->dict.NAS_Port, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "NAS-Port-Id", &new->dict.NAS_Port_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "NAS-Port-Type", &new->dict.NAS_Port_Type, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-AAA-Protocol", &new->dict.Origin_AAA_Protocol, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Host", &new->dict.Origin_Host, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Realm", &new->dict.Origin_Realm, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Originating-Line-Info", &new->dict.Originating_Line_Info, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Port-Limit", &new->dict.Port_Limit, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Re-Auth-Request-Type", &new->dict.Re_Auth_Request_Type, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Result-Code", &new->dict.Result_Code, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Service-Type", &new->dict.Service_Type, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Session-Id", &new->dict.Session_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Session-Timeout", &new->dict.Session_Timeout, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "State", &new->dict.State, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Tunneling", &new->dict.Tunneling, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Tunnel-Type", &new->dict.Tunnel_Type, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Tunnel-Medium-Type", &new->dict.Tunnel_Medium_Type, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Tunnel-Client-Endpoint", &new->dict.Tunnel_Client_Endpoint, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Tunnel-Server-Endpoint", &new->dict.Tunnel_Server_Endpoint, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Tunnel-Private-Group-Id", &new->dict.Tunnel_Private_Group_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Tunnel-Preference", &new->dict.Tunnel_Preference, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Tunnel-Client-Auth-Id", &new->dict.Tunnel_Client_Auth_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Tunnel-Server-Auth-Id", &new->dict.Tunnel_Server_Auth_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "User-Name", &new->dict.User_Name, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "User-Password", &new->dict.User_Password, ENOENT) ); /* This plugin provides the following Diameter authentication applications support: */ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_APPLICATION, APPLICATION_BY_NAME, "Diameter Network Access Server Application", &app, ENOENT) ); CHECK_FCT( fd_disp_app_support ( app, NULL, 1, 0 ) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_APPLICATION, APPLICATION_BY_NAME, "Diameter Extensible Authentication Protocol (EAP) Application", &app, ENOENT) ); CHECK_FCT( fd_disp_app_support ( app, NULL, 1, 0 ) ); *state = new; return 0; } /* deinitialize */ static void auth_conf_free(struct rgwp_config * state) { TRACE_ENTRY("%p", state); CHECK_PARAMS_DO( state, return ); CHECK_FCT_DO( fd_sess_handler_destroy( &state->sess_hdl, NULL ), ); free(state); return; } /* Handle an incoming RADIUS request */ static int auth_rad_req( struct rgwp_config * cs, struct radius_msg * rad_req, struct radius_msg ** rad_ans, struct msg ** diam_fw, struct rgw_client * cli ) { int idx; int got_id = 0; int got_mac = 0; int got_passwd = 0; int got_eap = 0; int got_empty_eap = 0; const char * prefix = "Diameter/"; size_t pref_len; os0_t dh = NULL; size_t dh_len = 0; os0_t dr = NULL; size_t dr_len = 0; os0_t si = NULL; size_t si_len = 0; os0_t un = NULL; size_t un_len = 0; size_t nattr_used = 0; struct avp ** avp_tun = NULL, *avp = NULL; union avp_value value; struct session * sess; TRACE_ENTRY("%p %p %p %p %p", cs, rad_req, rad_ans, diam_fw, cli); CHECK_PARAMS(cs && rad_req && (rad_req->hdr->code == RADIUS_CODE_ACCESS_REQUEST) && rad_ans && diam_fw && *diam_fw); pref_len = strlen(prefix); /* Guidelines: http://tools.ietf.org/html/rfc4005#section-9.1 http://tools.ietf.org/html/rfc4072#section-6.1 When a Translation Agent receives a RADIUS message, the following steps should be taken: - If a Message-Authenticator attribute is present, the value MUST be checked but not included in the Diameter message. If it is incorrect, the RADIUS message should be silently discarded. The gateway system SHOULD generate and include a Message- Authenticator in returned RADIUS responses. -> done in rgw_msg_auth_check - The transport address of the sender MUST be checked against the NAS identifying attributes. See the description of NAS- Identifier and NAS-IP-Address below. -> done in rgw_clients_check_origin - The Translation Agent must maintain transaction state information relevant to the RADIUS request, such as the Identifier field in the RADIUS header, any existing RADIUS Proxy-State attribute, and the source IP address and port number of the UDP packet. These may be maintained locally in a state table or saved in a Proxy-Info AVP group. A Diameter Session-Id AVP value must be created using a session state mapping mechanism. -> Identifier, source and port are saved along with the request, and associated with the session state. -> sub_echo_drop should handle the Proxy-State attribute (conf issue) - The Diameter Origin-Host and Origin-Realm AVPs MUST be created and added by using the information from an FQDN corresponding to the NAS-IP-Address attribute (preferred if available), and/or to the NAS-Identifier attribute. (Note that the RADIUS NAS-Identifier is not required to be an FQDN.) -> done in rgw_clients_create_origin. - The response MUST have an Origin-AAA-Protocol AVP added, indicating the protocol of origin of the message. -> what "response" ??? Added to the AAR / DER in this function. - The Proxy-Info group SHOULD be added, with the local server's identity specified in the Proxy-Host AVP. This should ensure that the response is returned to this system. -> We don't need this, answer is always routed here anyway. For EAP: o RADIUS EAP-Message attribute(s) are translated to a Diameter EAP-Payload AVP. If multiple RADIUS EAP-Message attributes are present, they are concatenated and translated to a single Diameter EAP-Payload AVP. -> concatenation done by radius_msg_get_eap -> the remaining is specific conversion rules */ /* Check basic information is there, and also retrieve some attribute information */ for (idx = 0; idx < rad_req->attr_used; idx++) { struct radius_attr_hdr * attr = (struct radius_attr_hdr *)(rad_req->buf + rad_req->attr_pos[idx]); uint8_t * attr_val = (uint8_t *)(attr + 1); size_t attr_len = attr->length - sizeof(struct radius_attr_hdr); switch (attr->type) { case RADIUS_ATTR_NAS_IP_ADDRESS: case RADIUS_ATTR_NAS_IDENTIFIER: case RADIUS_ATTR_NAS_IPV6_ADDRESS: got_id = 1; break; case RADIUS_ATTR_MESSAGE_AUTHENTICATOR: got_mac = 1; break; case RADIUS_ATTR_EAP_MESSAGE: got_eap = 1; if (attr->length == 2) got_empty_eap = 1; break; case RADIUS_ATTR_USER_PASSWORD: case RADIUS_ATTR_CHAP_PASSWORD: case RADIUS_ATTR_ARAP_PASSWORD: got_passwd += 1; break; /* Is there a State attribute with prefix "Diameter/" in the message? (in that case: Diameter/Destination-Host/Destination-Realm/Session-Id) */ /* NOTE: RFC4005 says "Origin-Host" here, but it's not coherent with the rules for answers. Destination-Host makes more sense */ case RADIUS_ATTR_STATE: if ((attr_len > pref_len + 5 /* for the '/'s and non empty strings */ ) && ! memcmp(attr_val, prefix, pref_len)) { int i, start; TRACE_DEBUG(ANNOYING, "Found a State attribute with '%s' prefix (attr #%d).", prefix, idx); /* Now parse the value and check its content is valid. Unfortunately we cannot use strchr here since strings are not \0-terminated */ i = start = pref_len; dh = attr_val + i; for (; (i < attr_len - 2) && (attr_val[i] != '/'); i++) /* loop */; if ( i >= attr_len - 2 ) continue; /* the attribute format is not good */ dh_len = i - start; start = ++i; dr = attr_val + i; for (; (i < attr_len - 1) && (attr_val[i] != '/'); i++) /* loop */; if ( i >= attr_len - 1 ) continue; /* the attribute format is not good */ dr_len = i - start; i++; si = attr_val + i; si_len = attr_len - i; TRACE_DEBUG(ANNOYING, "Attribute parsed successfully: DH:'%.*s' DR:'%.*s' SI:'%.*s'.", (int)dh_len, dh, (int)dr_len, dr, (int)si_len, si); /* Remove from the message */ for (i = idx + 1; i < rad_req->attr_used; i++) rad_req->attr_pos[i - 1] = rad_req->attr_pos[i]; rad_req->attr_used -= 1; idx--; } break; case RADIUS_ATTR_USER_NAME: TRACE_DEBUG(ANNOYING, "Found a User-Name attribute: '%.*s'", (int)attr_len, attr_len ? (char *)attr_val : ""); un = attr_val; un_len = attr_len; break; } } if (!got_id) { TRACE_DEBUG(INFO, "RADIUS Access-Request did not contain a NAS IP or Identifier attribute, reject."); return EINVAL; } /* [Note 1] An Access-Request that contains either a User-Password or CHAP-Password or ARAP-Password or one or more EAP-Message attributes MUST NOT contain more than one type of those four attributes. If it does not contain any of those four attributes, it SHOULD contain a Message-Authenticator. If any packet type contains an EAP-Message attribute it MUST also contain a Message-Authenticator. A RADIUS server receiving an Access-Request not containing any of those four attributes and also not containing a Message-Authenticator attribute SHOULD silently discard it. */ if (((got_eap + got_passwd) > 1) || (got_eap && !got_mac) || (!got_eap && !got_passwd && !got_mac)) { TRACE_DEBUG(INFO, "RADIUS Access-Request not conform to RFC3579 sec 3.3 note 1, discard."); return EINVAL; } /* - If the RADIUS request contained a State attribute and the prefix of the data is "Diameter/", the data following the prefix contains the Diameter Origin-Host/Origin-Realm/Session- Id. If no such attributes are present and the RADIUS command is an Access-Request, a new Session-Id is created. The Session-Id is included in the Session-Id AVP. */ /* Add the Destination-Realm AVP */ CHECK_FCT( fd_msg_avp_new ( cs->dict.Destination_Realm, 0, &avp ) ); if (dr) { value.os.data = (unsigned char *)dr; value.os.len = dr_len; } else { int i = 0; if (un && ! cs->ignore_nai) { /* Is there an '@' in the user name? We don't care for decorated NAI here */ for (i = un_len - 2; i > 0; i--) { if (un[i] == '@') { i++; break; } } } if (i <= 0) { /* Not found in the User-Name => we use the local domain of this gateway */ value.os.data = (uint8_t *)fd_g_config->cnf_diamrlm; value.os.len = fd_g_config->cnf_diamrlm_len; } else { value.os.data = un + i; value.os.len = un_len - i; } } CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_FIRST_CHILD, avp) ); /* Add the Destination-Host if found */ if (dh) { CHECK_FCT( fd_msg_avp_new ( cs->dict.Destination_Host, 0, &avp ) ); value.os.data = (unsigned char *)dh; value.os.len = dh_len; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_FIRST_CHILD, avp) ); } /* Create the session if it is not already done */ { os0_t sess_str = NULL; size_t sess_strlen; if (si_len) { /* We already have the Session-Id, just use it */ CHECK_FCT( fd_sess_fromsid_msg ( si, si_len, &sess, NULL) ); } else { /* Create a new Session-Id string */ DiamId_t fqdn; size_t fqdnlen; DiamId_t realm; size_t realmlen; /* Get information on the RADIUS client */ CHECK_FCT( rgw_clients_get_origin(cli, &fqdn, &fqdnlen, &realm, &realmlen) ); /* If we have a user name, create the new session with it */ if (un) { int len; /* If not found, create a new Session-Id. Our format is: {fqdn;hi32;lo32;username;diamid} */ CHECK_MALLOC( sess_str = malloc(un_len + 1 /* ';' */ + fd_g_config->cnf_diamid_len + 1 /* '\0' */) ); len = sprintf((char *)sess_str, "%.*s;%s", (int)un_len, un, fd_g_config->cnf_diamid); CHECK_FCT( fd_sess_new(&sess, fqdn, fqdnlen, sess_str, len) ); free(sess_str); } else { /* We don't have enough information to create the Session-Id, the RADIUS message is probably invalid */ TRACE_DEBUG(INFO, "RADIUS Access-Request does not contain a User-Name attribute, rejecting."); return EINVAL; } } /* Now, add the Session-Id AVP at beginning of Diameter message */ CHECK_FCT( fd_sess_getsid(sess, &sess_str, &sess_strlen) ); TRACE_DEBUG(FULL, "[auth.rgwx] Translating new message for session '%s'...", sess_str); /* Now add this session in the message */ CHECK_FCT( fd_msg_avp_new ( cs->dict.Session_Id, 0, &avp ) ); value.os.data = sess_str; value.os.len = sess_strlen; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_FIRST_CHILD, avp) ); CHECK_FCT( fd_msg_sess_set(*diam_fw, sess) ); } /* Add the appropriate command code & Auth-Application-Id */ { struct msg_hdr * header = NULL; CHECK_FCT( fd_msg_hdr ( *diam_fw, &header ) ); header->msg_flags = CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE; if (got_eap) { header->msg_code = CC_DIAMETER_EAP; header->msg_appl = AI_EAP; } else { header->msg_code = CC_AA; header->msg_appl = AI_NASREQ; } /* Add the Auth-Application-Id */ { CHECK_FCT( fd_msg_avp_new ( cs->dict.Auth_Application_Id, 0, &avp ) ); value.i32 = header->msg_appl; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); } } /* The type of request is identified through the Auth-Request-Type AVP [BASE]. The recommended value for most RADIUS interoperabily situations is AUTHORIZE_AUTHENTICATE. */ /* Add Auth-Request-Type AVP */ { CHECK_FCT( fd_msg_avp_new ( cs->dict.Auth_Request_Type, 0, &avp ) ); value.i32 = ACV_ART_AUTHORIZE_AUTHENTICATE; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); } /* Add Origin-AAA-Protocol AVP */ { CHECK_FCT( fd_msg_avp_new ( cs->dict.Origin_AAA_Protocol, 0, &avp ) ); value.i32 = ACV_OAP_RADIUS; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); } /* Convert the EAP payload (concat RADIUS attributes) */ if (got_eap) { CHECK_FCT( fd_msg_avp_new ( cs->dict.EAP_Payload, 0, &avp ) ); /* o An empty RADIUS EAP-Message attribute (with length 2) signifies EAP-Start, and it is translated to an empty EAP-Payload AVP. */ if (got_empty_eap) { value.os.len = 0; value.os.data = (uint8_t *)""; } else { CHECK_MALLOC( value.os.data = radius_msg_get_eap(rad_req, &value.os.len) ); } CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); } /* Tunnel AVPs need some preparation */ /* Convert the attributes one by one */ for (idx = 0; idx < rad_req->attr_used; idx++) { struct radius_attr_hdr * attr = (struct radius_attr_hdr *)(rad_req->buf + rad_req->attr_pos[idx]); switch (attr->type) { /* This macro converts a RADIUS attribute to a Diameter AVP of type OctetString */ #define CONV2DIAM_STR( _dictobj_ ) \ CHECK_PARAMS( attr->length >= sizeof(struct radius_attr_hdr) ); \ /* Create the AVP with the specified dictionary model */ \ CHECK_FCT( fd_msg_avp_new ( cs->dict._dictobj_, 0, &avp ) ); \ value.os.len = attr->length - sizeof(struct radius_attr_hdr); \ value.os.data = (os0_t)(attr + 1); \ CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); \ /* Add the AVP in the Diameter message. */ \ CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); \ /* Same thing, for scalar AVPs of 32 bits */ #define CONV2DIAM_32B( _dictobj_ ) \ CHECK_PARAMS( attr->length == sizeof(struct radius_attr_hdr)+sizeof(uint32_t) );\ CHECK_FCT( fd_msg_avp_new ( cs->dict._dictobj_, 0, &avp ) ); \ { \ uint8_t * v = (uint8_t *)(attr + 1); \ value.u32 = (v[0] << 24) \ | (v[1] << 16) \ | (v[2] << 8) \ | v[3] ; \ } \ CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); \ CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); \ /* And the 64b version */ #define CONV2DIAM_64B( _dictobj_ ) \ CHECK_PARAMS( attr->length == sizeof(struct radius_attr_hdr)+sizeof(uint64_t) );\ CHECK_FCT( fd_msg_avp_new ( cs->dict._dictobj_, 0, &avp ) ); \ { \ uint8_t * v = (uint8_t *)(attr + 1); \ value.u64 = ((uint64_t)(v[0]) << 56) \ | ((uint64_t)(v[1]) << 48) \ | ((uint64_t)(v[2]) << 40) \ | ((uint64_t)(v[3]) << 32) \ | ((uint64_t)(v[4]) << 24) \ | ((uint64_t)(v[5]) << 16) \ | ((uint64_t)(v[6]) << 8) \ | (uint64_t)(v[7]) ; \ } \ CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); \ CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); \ /* RFC 2865 */ /* - The Destination-Realm AVP is created from the information found in the RADIUS User-Name attribute. -> done in rgw_clients_create_origin */ case RADIUS_ATTR_USER_NAME: CONV2DIAM_STR( User_Name ); break; /* - If the RADIUS User-Password attribute is present, the password must be unencrypted by using the link's RADIUS shared secret. The unencrypted value must be forwarded in a User-Password AVP using Diameter security. */ case RADIUS_ATTR_USER_PASSWORD: if ((attr->length - 2) % 16) { TRACE_DEBUG(INFO, "Invalid length of User-Password attribute: %hhd", attr->length); return EINVAL; } { /* Decipher following this logic (refers to rfc2865#section-5.2 ) b1 = MD5(S + RA) p1 = c(1) xor b1 b2 = MD5(S + c(1)) p2 = c(2) xor b2 ... */ uint8_t *ciph = (uint8_t *)(attr+1); /* c(i) */ size_t ciph_len = attr->length - 2; uint8_t deciph[128]; /* pi */ size_t deciph_len = 0; uint8_t * secret; /* S */ size_t secret_len; uint8_t hash[16]; /* b(i) */ const uint8_t *addr[2]; size_t len[2]; /* Retrieve the shared secret */ CHECK_FCT(rgw_clients_getkey(cli, &secret, &secret_len)); /* Initial b1 = MD5(S + RA) */ addr[0] = secret; len[0] = secret_len; addr[1] = rad_req->hdr->authenticator; len[1] = 16; md5_vector(2, addr, len, hash); /* loop */ while (deciph_len < ciph_len) { int i; /* pi = c(i) xor bi */ for (i = 0; i < 16; i++) deciph[deciph_len + i] = ciph[deciph_len + i] ^ hash[i]; /* do we have to remove the padding '\0's ? */ /* b(i+1) = MD5(S + c(i) */ addr[1] = ciph + deciph_len; md5_vector(2, addr, len, hash); deciph_len += 16; } /* Now save this value in the AVP */ CHECK_FCT( fd_msg_avp_new ( cs->dict.User_Password, 0, &avp ) ); value.os.data = &deciph[0]; value.os.len = deciph_len; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); } break; /* - If the RADIUS CHAP-Password attribute is present, the Ident and Data portion of the attribute are used to create the CHAP-Auth grouped AVP. */ case RADIUS_ATTR_CHAP_PASSWORD: CHECK_PARAMS( attr->length == 19 /* RFC 2865 */); { uint8_t * c = (uint8_t *)(attr + 1); struct avp * chap_auth; CHECK_FCT( fd_msg_avp_new ( cs->dict.CHAP_Auth, 0, &chap_auth ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, chap_auth) ); CHECK_FCT( fd_msg_avp_new ( cs->dict.CHAP_Algorithm, 0, &avp ) ); value.u32 = 5; /* The only value defined currently... */ CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( chap_auth, MSG_BRW_LAST_CHILD, avp) ); CHECK_FCT( fd_msg_avp_new ( cs->dict.CHAP_Ident, 0, &avp ) ); value.os.data = c; value.os.len = 1; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( chap_auth, MSG_BRW_LAST_CHILD, avp) ); c++; CHECK_FCT( fd_msg_avp_new ( cs->dict.CHAP_Response, 0, &avp ) ); value.os.data = c; value.os.len = attr->length - 3; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( chap_auth, MSG_BRW_LAST_CHILD, avp) ); } break; case RADIUS_ATTR_NAS_IP_ADDRESS: CONV2DIAM_STR( NAS_IP_Address ); break; case RADIUS_ATTR_NAS_PORT: CONV2DIAM_32B( NAS_Port ); break; case RADIUS_ATTR_SERVICE_TYPE: CONV2DIAM_32B( Service_Type ); break; case RADIUS_ATTR_FRAMED_PROTOCOL: CONV2DIAM_32B( Framed_Protocol ); break; case RADIUS_ATTR_FRAMED_IP_ADDRESS: CONV2DIAM_STR( Framed_IP_Address ); break; case RADIUS_ATTR_FRAMED_IP_NETMASK: CONV2DIAM_STR( Framed_IP_Netmask ); break; /* Framed-Routing never present in an Access-Request */ /* Filter-Id never present in an Access-Request */ case RADIUS_ATTR_FRAMED_MTU: CONV2DIAM_32B( Framed_MTU ); break; case RADIUS_ATTR_FRAMED_COMPRESSION: CONV2DIAM_32B( Framed_Compression ); break; case RADIUS_ATTR_LOGIN_IP_HOST: CONV2DIAM_STR( Login_IP_Host ); break; /* Login-Service never present in an Access-Request */ /* Login-TCP-Port never present in an Access-Request */ /* Reply-Message never present in an Access-Request */ case RADIUS_ATTR_CALLBACK_NUMBER: CONV2DIAM_STR( Callback_Number ); break; /* Callback-Id never present in an Access-Request */ /* Framed-Route never present in an Access-Request */ /* Framed-IPX-Network never present in an Access-Request */ case RADIUS_ATTR_STATE: CONV2DIAM_STR( State ); break; /* Class never present in an Access-Request */ case RADIUS_ATTR_VENDOR_SPECIFIC: /* RFC 4005, Section 9.6 : Systems that don't have vendor format knowledge MAY discard such attributes without knowing a suitable translation. [conversion rule in 9.6.2] */ if (attr->length >= 6) { uint32_t vendor_id; uint8_t * c = (uint8_t *)(attr + 1); vendor_id = c[0] << 24 | c[1] << 16 | c[2] << 8 | c[3]; c += 4; switch (vendor_id) { /* For the vendors we KNOW they follow the VSA recommended format, we convert following the rules of RFC4005 (9.6.2) */ case RADIUS_VENDOR_ID_MICROSOFT : /* RFC 2548 */ /* other vendors ? */ { size_t left; struct radius_attr_vendor *vtlv; left = attr->length - 6; vtlv = (struct radius_attr_vendor *)c; while ((left >= 2) && (vtlv->vendor_length <= left)) { /* Search our dictionary for corresponding Vendor's AVP */ struct dict_avp_request req; struct dict_object * avp_model = NULL; memset(&req, 0, sizeof(struct dict_avp_request)); req.avp_vendor = vendor_id; req.avp_code = vtlv->vendor_type; CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_CODE_AND_VENDOR, &req, &avp_model, 0) ); if (!avp_model) { TRACE_DEBUG(FULL, "Unknown attribute (vendor 0x%x, code 0x%x) ignored.", req.avp_vendor, req.avp_code); } else { CHECK_FCT( fd_msg_avp_new ( avp_model, 0, &avp ) ); value.os.len = vtlv->vendor_length - 2; value.os.data = (unsigned char *)(vtlv + 1); CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); } c += vtlv->vendor_length; left -= vtlv->vendor_length; vtlv = (struct radius_attr_vendor *)c; } } break; /* Other vendors we KNOw how to convert the attributes would be added here... */ /* case RADIUS_VENDOR_ID_CISCO : break; */ /* case RADIUS_VENDOR_ID_IETF : (extended RADIUS attributes) break; */ /* When we don't know, just discard the attribute... VSA are optional with regards to RADIUS anyway */ default: /* do nothing */ TRACE_DEBUG(FULL, "VSA attribute from vendor %d discarded", vendor_id); } } break; /* Session-Timeout never present in an Access-Request */ /* Idle-Timeout never present in an Access-Request */ /* Termination-Action never present in an Access-Request */ case RADIUS_ATTR_CALLED_STATION_ID: CONV2DIAM_STR( Called_Station_Id ); break; case RADIUS_ATTR_CALLING_STATION_ID: CONV2DIAM_STR( Calling_Station_Id ); break; case RADIUS_ATTR_NAS_IDENTIFIER: CONV2DIAM_STR( NAS_Identifier ); break; /* Proxy-State is handled by echo_drop.rgwx plugin, we ignore it here */ case RADIUS_ATTR_LOGIN_LAT_SERVICE: CONV2DIAM_STR( Login_LAT_Service ); break; case RADIUS_ATTR_LOGIN_LAT_NODE: CONV2DIAM_STR( Login_LAT_Node ); break; case RADIUS_ATTR_LOGIN_LAT_GROUP: CONV2DIAM_STR( Login_LAT_Group ); break; /* Framed-AppleTalk-Link never present in an Access-Request */ /* Framed-AppleTalk-Network never present in an Access-Request */ /* Framed-AppleTalk-Zone never present in an Access-Request */ case RADIUS_ATTR_CHAP_CHALLENGE: CONV2DIAM_STR( CHAP_Challenge ); break; case RADIUS_ATTR_NAS_PORT_TYPE: CONV2DIAM_32B( NAS_Port_Type ); break; case RADIUS_ATTR_PORT_LIMIT: CONV2DIAM_32B( Port_Limit ); break; case RADIUS_ATTR_LOGIN_LAT_PORT: CONV2DIAM_STR( Login_LAT_Port ); break; /* RFC 3162 */ case RADIUS_ATTR_NAS_IPV6_ADDRESS: CONV2DIAM_STR( NAS_IPv6_Address ); break; case RADIUS_ATTR_FRAMED_INTERFACE_ID: CONV2DIAM_64B( Framed_Interface_Id ); break; case RADIUS_ATTR_FRAMED_IPV6_PREFIX: CONV2DIAM_STR( Framed_IPv6_Prefix ); break; case RADIUS_ATTR_LOGIN_IPV6_HOST: CONV2DIAM_STR( Login_IPv6_Host ); break; /* Framed-IPv6-Route never present in an Access-Request */ /* Framed-IPv6-Pool never present in an Access-Request */ /* RFC 2868 */ /* Prepare the top-level Tunneling AVP for each tag values, as needed, and add to the Diameter message. This macro is called when an AVP is added inside the group, so we will not have empty grouped AVPs */ #define AVP_TUN_PREPARE() { \ if (avp_tun == NULL) { \ CHECK_MALLOC( avp_tun = calloc(sizeof(struct avp *), 32 ) ); \ } \ tag = *(uint8_t *)(attr + 1); \ if (tag > 0x1F) tag = 0; \ if (avp_tun[tag] == NULL) { \ CHECK_FCT( fd_msg_avp_new ( cs->dict.Tunneling, 0, &avp_tun[tag] ) ); \ CHECK_FCT( fd_msg_avp_add (*diam_fw, MSG_BRW_LAST_CHILD, avp_tun[tag]));\ } \ } /* Convert an attribute to an OctetString AVP and add inside the Tunneling AVP corresponding to the tag */ #define CONV2DIAM_TUN_STR( _dictobj_ ) { \ uint8_t tag; \ CHECK_PARAMS( attr->length >= 3); \ AVP_TUN_PREPARE(); \ CHECK_FCT( fd_msg_avp_new ( cs->dict._dictobj_, 0, &avp ) ); \ value.os.len = attr->length - (tag ? 3 : 2); \ value.os.data = ((unsigned char *)(attr + 1)) + (tag ? 1 : 0); \ CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); \ CHECK_FCT( fd_msg_avp_add ( avp_tun[tag], MSG_BRW_LAST_CHILD, avp) ); \ } /* Convert an attribute to a scalar AVP and add inside the Tunneling AVP corresponding to the tag */ #define CONV2DIAM_TUN_24B( _dictobj_ ) { \ uint8_t tag; \ CHECK_PARAMS( attr->length == 6); \ AVP_TUN_PREPARE(); \ CHECK_FCT( fd_msg_avp_new ( cs->dict._dictobj_, 0, &avp ) ); \ { \ uint8_t * v = (uint8_t *)(attr + 1); \ value.u32 = (v[1] << 16) | (v[2] <<8) | v[3] ; \ } \ CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); \ CHECK_FCT( fd_msg_avp_add ( avp_tun[tag], MSG_BRW_LAST_CHILD, avp) ); \ } /* - If the RADIUS message contains Tunnel information [RADTunnels], the attributes or tagged groups should each be converted to a Diameter Tunneling Grouped AVP set. If the tunnel information contains a Tunnel-Password attribute, the RADIUS encryption must be resolved, and the password forwarded, by using Diameter security methods. -> If the RADIUS message does not use properly the Tag info, result is unpredictable here.. */ case RADIUS_ATTR_TUNNEL_TYPE: CONV2DIAM_TUN_24B( Tunnel_Type ); break; case RADIUS_ATTR_TUNNEL_MEDIUM_TYPE: CONV2DIAM_TUN_24B( Tunnel_Medium_Type ); break; case RADIUS_ATTR_TUNNEL_CLIENT_ENDPOINT: CONV2DIAM_TUN_STR( Tunnel_Client_Endpoint ); break; case RADIUS_ATTR_TUNNEL_SERVER_ENDPOINT: CONV2DIAM_TUN_STR( Tunnel_Server_Endpoint ); break; /* Tunnel-Password never present in an Access-Request */ case RADIUS_ATTR_TUNNEL_PRIVATE_GROUP_ID: CONV2DIAM_TUN_STR( Tunnel_Private_Group_Id ); break; /* Tunnel-Assignment-ID never present in an Access-Request */ case RADIUS_ATTR_TUNNEL_PREFERENCE: CONV2DIAM_TUN_24B( Tunnel_Preference ); break; case RADIUS_ATTR_TUNNEL_CLIENT_AUTH_ID: CONV2DIAM_TUN_STR( Tunnel_Client_Auth_Id ); break; case RADIUS_ATTR_TUNNEL_SERVER_AUTH_ID: CONV2DIAM_TUN_STR( Tunnel_Server_Auth_Id ); break; /* RFC 2869 */ case RADIUS_ATTR_ARAP_PASSWORD: CONV2DIAM_STR( ARAP_Password ); break; /* ARAP-Features never present in an Access-Request */ /* ARAP-Zone-Access never present in an Access-Request */ case RADIUS_ATTR_ARAP_SECURITY: CONV2DIAM_32B( ARAP_Security ); break; case RADIUS_ATTR_ARAP_SECURITY_DATA: CONV2DIAM_STR( ARAP_Security_Data ); break; /* Password-Retry never present in an Access-Request */ /* Prompt never present in an Access-Request */ case RADIUS_ATTR_CONNECT_INFO: CONV2DIAM_STR( Connect_Info ); break; /* Configuration-Token never present in an Access-Request */ /* ARAP-Challenge-Response never present in an Access-Request */ /* Acct-Interim-Interval never present in an Access-Request */ case RADIUS_ATTR_NAS_PORT_ID: CONV2DIAM_STR( NAS_Port_Id ); break; /* Framed-Pool never present in an Access-Request */ /* RFC 2869 / 3579 */ case RADIUS_ATTR_ORIGINATING_LINE_INFO: CONV2DIAM_STR( Originating_Line_Info ); break; case RADIUS_ATTR_MESSAGE_AUTHENTICATOR: case RADIUS_ATTR_EAP_MESSAGE: /* It was already handled, just remove the attribute */ break; /* Default */ default: /* unknown attribute */ /* We just keep the attribute in the RADIUS message */ rad_req->attr_pos[nattr_used++] = rad_req->attr_pos[idx]; } } /* Destroy tunnel pointers (if we used it) */ free(avp_tun); /* Update the radius message to remove all handled attributes */ rad_req->attr_used = nattr_used; /* Store the request identifier in the session (if provided) */ { struct sess_state *st; CHECK_MALLOC(st = malloc(sizeof(struct sess_state))); memcpy(st->req_auth, &rad_req->hdr->authenticator[0], 16); CHECK_FCT( fd_sess_state_store( cs->sess_hdl, sess, &st ) ); } return 0; } static int auth_diam_ans( struct rgwp_config * cs, struct msg ** diam_ans, struct radius_msg ** rad_fw, struct rgw_client * cli ) { struct msg_hdr * hdr; struct avp *avp, *next, *avp_x, *avp_y, *aoh; struct avp_hdr *ahdr, *oh; uint8_t buf[254]; /* to store some attributes values (with final '\0') */ size_t sz; int ta_set = 0; int no_str = 0; /* indicate if an STR is required for this server */ uint8_t tuntag = 0; struct sess_state *st; int error_cause = 0; struct session * sess; os0_t sid = NULL; size_t sidlen; TRACE_ENTRY("%p %p %p %p", cs, diam_ans, rad_fw, cli); CHECK_PARAMS(cs && diam_ans && *diam_ans && rad_fw && *rad_fw); /* Retrieve the request identified which was stored in the session */ CHECK_FCT( fd_msg_sess_get(fd_g_config->cnf_dict, *diam_ans, &sess, NULL) ); if (sess) { CHECK_FCT( fd_sess_state_retrieve( cs->sess_hdl, sess, &st ) ); CHECK_FCT( fd_sess_getsid(sess, &sid, &sidlen) ); } /* else ? */ /* - If the Diameter Command-Code is set to AA-Answer and the Result-Code AVP is set to DIAMETER_MULTI_ROUND_AUTH, the gateway must send a RADIUS Access-Challenge. This must have the Origin-Host, Origin-Realm, and Diameter Session-Id AVPs encapsulated in the RADIUS State attribute, with the prefix "Diameter/", concatenated in the above order separated with "/" characters, in UTF-8 [UTF-8]. This is necessary to ensure that the Translation Agent receiving the subsequent RADIUS Access- Request will have access to the Session Identifier and be able to set the Destination-Host to the correct value. -> done here below - If the Command-Code is set to AA-Answer, the Diameter Session- Id AVP is saved in a new RADIUS Class attribute whose format consists of the string "Diameter/" followed by the Diameter Session Identifier. This will ensure that the subsequent Accounting messages, which could be received by any Translation Agent, would have access to the original Diameter Session Identifier. -> done here but only for Access-Accept messages (Result-Code = success) */ /* MACROS to help in the process: convert AVP data to RADIUS attributes. */ /* Control large attributes: _trunc_ = 0 => error; _trunc_ = 1 => truncate; _trunc = 2 => create several attributes */ #define CONV2RAD_STR( _attr_, _data_, _len_, _trunc_) { \ size_t __l = (size_t)(_len_); \ size_t __off = 0; \ TRACE_DEBUG(FULL, "Converting AVP to "#_attr_); \ if ((_trunc_) == 0) { \ CHECK_PARAMS( __l <= 253 ); \ } \ if ((__l > 253) && (_trunc_ == 1)) { \ TRACE_DEBUG(INFO, "[auth.rgwx] AVP truncated in "#_attr_); \ __l = 253; \ } \ do { \ size_t __w = (__l > 253) ? 253 : __l; \ CHECK_MALLOC(radius_msg_add_attr(*rad_fw, (_attr_), (_data_) + __off, __w)); \ __off += __w; \ __l -= __w; \ } while (__l); \ } #define CONV2RAD_32B( _attr_, _data_) { \ uint32_t __v = htonl((uint32_t)(_data_)); \ TRACE_DEBUG(FULL, "Converting AVP to "#_attr_); \ CHECK_MALLOC(radius_msg_add_attr(*rad_fw, (_attr_), (uint8_t *)&__v, sizeof(__v))); \ } #define CONV2RAD_64B( _attr_, _data_) { \ uint64_t __v = htonll((uint64_t)(_data_)); \ TRACE_DEBUG(FULL, "Converting AVP to "#_attr_); \ CHECK_MALLOC(radius_msg_add_attr(*rad_fw, (_attr_), (uint8_t *)&__v, sizeof(__v))); \ } /* Search the different AVPs we handle here */ CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Origin_Host, &aoh) ); CHECK_FCT( fd_msg_avp_hdr ( aoh, &oh ) ); /* Check the Diameter error code */ CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Result_Code, &avp) ); ASSERT( avp ); /* otherwise the message should have been discarded a lot earlier because of ABNF */ CHECK_FCT( fd_msg_avp_hdr ( avp, &ahdr ) ); switch (ahdr->avp_value->u32) { case ER_DIAMETER_MULTI_ROUND_AUTH: (*rad_fw)->hdr->code = RADIUS_CODE_ACCESS_CHALLENGE; break; case ER_DIAMETER_SUCCESS: case ER_DIAMETER_LIMITED_SUCCESS: (*rad_fw)->hdr->code = RADIUS_CODE_ACCESS_ACCEPT; break; default: /* Can we convert the value to a natural Error-Cause ? */ switch (ahdr->avp_value->u32) { case ER_DIAMETER_AVP_UNSUPPORTED: error_cause = 401; /* Unsupported Attribute */ break; case ER_DIAMETER_MISSING_AVP: error_cause = 402; /* Missing Attribute */ break; case ER_DIAMETER_UNABLE_TO_COMPLY: error_cause = 404; /* Invalid Request */ break; case ER_DIAMETER_APPLICATION_UNSUPPORTED: error_cause = 405; /* Unsupported Service */ break; case ER_DIAMETER_COMMAND_UNSUPPORTED: error_cause = 406; /* Unsupported Extension */ break; case ER_DIAMETER_INVALID_AVP_VALUE: error_cause = 407; /* Invalid Attribute Value */ break; case ER_DIAMETER_AVP_NOT_ALLOWED: error_cause = 501; /* Administratively Prohibited */ break; case ER_DIAMETER_REALM_NOT_SERVED: case ER_DIAMETER_LOOP_DETECTED: case ER_DIAMETER_UNKNOWN_PEER: case ER_DIAMETER_UNABLE_TO_DELIVER: error_cause = 502; /* Request Not Routable (Proxy) */ break; case ER_DIAMETER_UNKNOWN_SESSION_ID: error_cause = 503; /* Session Context Not Found */ break; case ER_DIAMETER_TOO_BUSY: case ER_DIAMETER_OUT_OF_SPACE: error_cause = 506; /* Resources Unavailable */ break; #if 0 /* remaining Diameter Result-Code & RADIUS Error-Cause */ case ER_DIAMETER_REDIRECT_INDICATION: case ER_DIAMETER_INVALID_HDR_BITS: case ER_DIAMETER_INVALID_AVP_BITS: case ER_DIAMETER_AUTHENTICATION_REJECTED: case ER_ELECTION_LOST: case ER_DIAMETER_AUTHORIZATION_REJECTED: case ER_DIAMETER_RESOURCES_EXCEEDED: case ER_DIAMETER_CONTRADICTING_AVPS: case ER_DIAMETER_AVP_OCCURS_TOO_MANY_TIMES case ER_DIAMETER_NO_COMMON_APPLICATION: case ER_DIAMETER_UNSUPPORTED_VERSION: case ER_DIAMETER_INVALID_BIT_IN_HEADER: case ER_DIAMETER_INVALID_AVP_LENGTH: case ER_DIAMETER_INVALID_MESSAGE_LENGTH: case ER_DIAMETER_INVALID_AVP_BIT_COMBO: case ER_DIAMETER_NO_COMMON_SECURITY: error_cause = 403; /* NAS Identification Mismatch */ error_cause = 504; /* Session Context Not Removable */ error_cause = 505; /* Other Proxy Processing Error */ error_cause = 507; /* Request Initiated */ error_cause = 508; /* Multiple Session Selection Unsupported */ #endif /* 0 */ } /* In any case, the following is processed: */ (*rad_fw)->hdr->code = RADIUS_CODE_ACCESS_REJECT; fd_log_debug("[auth.rgwx] Received Diameter answer with error code '%d' from server '%.*s', session %.*s, translating into Access-Reject", ahdr->avp_value->u32, (int)oh->avp_value->os.len, oh->avp_value->os.data, (int)sidlen, sid); CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Error_Message, &avp_x) ); if (avp_x) { CHECK_FCT( fd_msg_avp_hdr ( avp_x, &ahdr ) ); fd_log_debug("[auth.rgwx] Error-Message content: '%.*s'", (int)ahdr->avp_value->os.len, ahdr->avp_value->os.data); } CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Error_Reporting_Host, &avp_x) ); if (avp_x) { CHECK_FCT( fd_msg_avp_hdr ( avp_x, &ahdr ) ); fd_log_debug("[auth.rgwx] Error-Reporting-Host: '%.*s'", (int)ahdr->avp_value->os.len, ahdr->avp_value->os.data); } CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Failed_AVP, &avp_x) ); if (avp_x) { fd_log_debug("[auth.rgwx] Failed-AVP was included in the message."); /* Dump its content ? */ } } /* Remove this Result-Code avp */ CHECK_FCT( fd_msg_free( avp ) ); /* Creation of the State or Class attribute with session information */ CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Origin_Realm, &avp) ); CHECK_FCT( fd_msg_avp_hdr ( avp, &ahdr ) ); /* Now, save the session-id and eventually server info in a STATE or CLASS attribute */ if ((*rad_fw)->hdr->code == RADIUS_CODE_ACCESS_CHALLENGE) { if (sizeof(buf) < (sz = snprintf((char *)buf, sizeof(buf), "Diameter/%.*s/%.*s/%.*s", (int)oh->avp_value->os.len, (char *)oh->avp_value->os.data, (int)ahdr->avp_value->os.len, (char *)ahdr->avp_value->os.data, (int)sidlen, (char *)sid))) { TRACE_DEBUG(INFO, "Data truncated in State attribute: %s", buf); } CONV2RAD_STR(RADIUS_ATTR_STATE, buf, sz, 0); } if ((*rad_fw)->hdr->code == RADIUS_CODE_ACCESS_ACCEPT) { /* Add the Session-Id */ if (sizeof(buf) < (sz = snprintf((char *)buf, sizeof(buf), "Diameter/%.*s", (int)sidlen, sid))) { TRACE_DEBUG(INFO, "Data truncated in Class attribute: %s", buf); } CONV2RAD_STR(RADIUS_ATTR_CLASS, buf, sz, 0); } /* Unlink the Origin-Realm now; the others are unlinked at the end of this function */ CHECK_FCT( fd_msg_free( avp ) ); CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Session_Timeout, &avp) ); CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Authorization_Lifetime, &avp_x) ); CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Re_Auth_Request_Type, &avp_y) ); /* When translating a Diameter AA-Answer (with successful result code) to RADIUS Access-Accept that contains a Session-Timeout or Authorization-Lifetime AVP, take the following steps: - If the Diameter message contains a Session-Timeout AVP but no Authorization-Lifetime AVP, translate it to a Session-Timeout attribute (not a Termination-Action). */ if ((avp != NULL) && (avp_x == NULL)) { CHECK_FCT( fd_msg_avp_hdr ( avp, &ahdr ) ); CONV2RAD_32B( RADIUS_ATTR_SESSION_TIMEOUT, ahdr->avp_value->u32 ); } /* - If the Diameter message contains an Authorization-Lifetime AVP but no Session-Timeout AVP, translate it to a Session-Timeout attribute and a Termination-Action set to AA-REQUEST. (Remove Authorization-Lifetime and Re-Auth-Request-Type.) */ if ((avp == NULL) && (avp_x != NULL)) { CHECK_FCT( fd_msg_avp_hdr ( avp_x, &ahdr ) ); CONV2RAD_32B( RADIUS_ATTR_SESSION_TIMEOUT, ahdr->avp_value->u32 ); CONV2RAD_32B( RADIUS_ATTR_TERMINATION_ACTION, RADIUS_TERMINATION_ACTION_RADIUS_REQUEST ); ta_set = 1; } /* - If the Diameter message has both, the Session-Timeout must be greater than or equal to the Authorization-Lifetime (required by [BASE]). Translate it to a Session-Timeout value (with value from Authorization-Lifetime AVP, the smaller one) and with the Termination-Action set to AA-REQUEST. (Remove the Authorization-Lifetime and Re-Auth-Request-Type.) */ if ((avp != NULL) && (avp_x != NULL)) { CHECK_FCT( fd_msg_avp_hdr ( avp_x, &ahdr ) ); CONV2RAD_32B( RADIUS_ATTR_SESSION_TIMEOUT, ahdr->avp_value->u32 ); CONV2RAD_32B( RADIUS_ATTR_TERMINATION_ACTION, RADIUS_TERMINATION_ACTION_RADIUS_REQUEST ); ta_set = 1; } /* -> Not too sure about Auth-Grace-Period... we'll just discard it for now */ if (avp) { CHECK_FCT( fd_msg_free( avp ) ); } if (avp_x) { CHECK_FCT( fd_msg_free( avp_x ) ); } if (avp_y) { CHECK_FCT( fd_msg_free( avp_y ) ); } /* - If a Proxy-State attribute was present in the RADIUS request, the same attribute is added in the response. This information may be found in the Proxy-Info AVP group, or in a local state table. -> handled by sub_echo_drop - If state information regarding the RADIUS request was saved in a Proxy-Info AVP or local state table, the RADIUS Identifier and UDP IP Address and port number are extracted and used in issuing the RADIUS reply. -> was saved with the full request */ /* Now loop in the list of AVPs and convert those that we know how */ CHECK_FCT( fd_msg_browse(*diam_ans, MSG_BRW_FIRST_CHILD, &next, NULL) ); while (next) { int handled = 1; avp = next; CHECK_FCT( fd_msg_browse(avp, MSG_BRW_NEXT, &next, NULL) ); CHECK_FCT( fd_msg_avp_hdr ( avp, &ahdr ) ); if (!(ahdr->avp_flags & AVP_FLAG_VENDOR)) { switch (ahdr->avp_code) { /* In case of Diameter error, include the Reply-Message attribute */ case DIAM_ATTR_ERROR_MESSAGE: CONV2RAD_STR(RADIUS_ATTR_REPLY_MESSAGE, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 2); break; case DIAM_ATTR_ERROR_REPORTING_HOST: { char buf[254]; int bsz = snprintf(buf, sizeof(buf), "Error-Reporting-Host: %*s", (int)(ahdr->avp_value->os.len), ahdr->avp_value->os.data); CONV2RAD_STR(RADIUS_ATTR_REPLY_MESSAGE, (uint8_t *)buf, bsz, 2); } break; case DIAM_ATTR_FAILED_AVP: { struct avp * favp; CHECK_FCT( fd_msg_browse(avp, MSG_BRW_FIRST_CHILD, &favp, NULL) ); if (favp) { char buf[254]; int bsz; struct dict_object * favp_model; CHECK_FCT( fd_msg_model(favp, &favp_model) ); if (favp_model) { struct dict_avp_data fadata; CHECK_FCT( fd_dict_getval(favp_model, &fadata) ); bsz = snprintf(buf, sizeof(buf), "Failed-AVP: %s", fadata.avp_name); } else { struct avp_hdr * favp_hdr; CHECK_FCT( fd_msg_avp_hdr ( favp, &favp_hdr ) ); bsz = snprintf(buf, sizeof(buf), "Failed-AVP: code %u, vendor %u", favp_hdr->avp_code, favp_hdr->avp_vendor); } CONV2RAD_STR(RADIUS_ATTR_REPLY_MESSAGE, (uint8_t *)buf, bsz, 2); } } break; /* RFC 4005 (AVP in the order of the AA-Request/Answer AVP Table) */ case DIAM_ATTR_ACCT_INTERIM_INTERVAL: CONV2RAD_32B(RADIUS_ATTR_ACCT_INTERIM_INTERVAL, ahdr->avp_value->u32); break; case DIAM_ATTR_ARAP_CHALLENGE_RESPONSE: CONV2RAD_STR(RADIUS_ATTR_ARAP_CHALLENGE_RESPONSE, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 0); break; case DIAM_ATTR_ARAP_FEATURES: CONV2RAD_STR(RADIUS_ATTR_ARAP_FEATURES, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 0); break; /* ARAP-Password is not present in answers */ case DIAM_ATTR_ARAP_SECURITY: CONV2RAD_32B(RADIUS_ATTR_ARAP_SECURITY, ahdr->avp_value->u32); break; case DIAM_ATTR_ARAP_SECURITY_DATA: CONV2RAD_STR(RADIUS_ATTR_ARAP_SECURITY_DATA, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 2); break; case DIAM_ATTR_ARAP_ZONE_ACCESS: CONV2RAD_32B(RADIUS_ATTR_ARAP_ZONE_ACCESS, ahdr->avp_value->u32); break; case DIAM_ATTR_AUTH_APPLICATION_ID: /* We just remove this AVP */ break; case DIAM_ATTR_AUTH_GRACE_PERIOD: /* We just remove this AVP (?) */ break; case DIAM_ATTR_AUTH_REQUEST_TYPE: /* We only check the value */ if (ahdr->avp_value->u32 != 3) { fd_log_debug("[auth.rgwx] Received Diameter answer with Auth-Request-Type set to %d (%s) from server %.*s, session %.*s." " This may cause interoperability problems with RADIUS.", ahdr->avp_value->u32, (ahdr->avp_value->u32 == 1) ? "AUTHENTICATE_ONLY" : ((ahdr->avp_value->u32 == 2) ? "AUTHORIZE_ONLY" : "???"), (int)oh->avp_value->os.len, oh->avp_value->os.data, (int)sidlen, sid); } break; case DIAM_ATTR_AUTH_SESSION_STATE: if ((!ta_set) && (ahdr->avp_value->u32 == ACV_ASS_STATE_MAINTAINED)) { CONV2RAD_32B( RADIUS_ATTR_TERMINATION_ACTION, RADIUS_TERMINATION_ACTION_RADIUS_REQUEST ); } if (ahdr->avp_value->u32 == ACV_ASS_NO_STATE_MAINTAINED) { no_str = 1; } break; /* Authorization-Lifetime already handled */ case DIAM_ATTR_CALLBACK_ID: CONV2RAD_STR(RADIUS_ATTR_CALLBACK_ID, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1); break; case DIAM_ATTR_CALLBACK_NUMBER: CONV2RAD_STR(RADIUS_ATTR_CALLBACK_NUMBER, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1); break; /* Called-Station-Id is not present in answers */ /* Calling-Station-Id is not present in answers */ /* CHAP-Auth is not present in answers */ /* CHAP-Challenge is not present in answers */ case DIAM_ATTR_CLASS: CONV2RAD_STR(RADIUS_ATTR_CLASS, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 2); break; case DIAM_ATTR_CONFIGURATION_TOKEN: /* We might as well remove it since it's not supposed to be sent to the NAS... */ CONV2RAD_STR(RADIUS_ATTR_CONFIGURATION_TOKEN, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 2); break; /* Connect-Info is not present in answers */ case DIAM_ATTR_FILTER_ID: CONV2RAD_STR(RADIUS_ATTR_FILTER_ID, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 2); break; case DIAM_ATTR_FRAMED_APPLETALK_LINK: CONV2RAD_32B(RADIUS_ATTR_FRAMED_APPLETALK_LINK, ahdr->avp_value->u32); break; case DIAM_ATTR_FRAMED_APPLETALK_NETWORK: CONV2RAD_32B(RADIUS_ATTR_FRAMED_APPLETALK_NETWORK, ahdr->avp_value->u32); break; case DIAM_ATTR_FRAMED_APPLETALK_ZONE: CONV2RAD_STR(RADIUS_ATTR_FRAMED_APPLETALK_ZONE, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1); break; case DIAM_ATTR_FRAMED_COMPRESSION: CONV2RAD_32B(RADIUS_ATTR_FRAMED_COMPRESSION, ahdr->avp_value->u32); break; case DIAM_ATTR_FRAMED_INTERFACE_ID: CONV2RAD_64B(RADIUS_ATTR_FRAMED_INTERFACE_ID, ahdr->avp_value->u64); break; case DIAM_ATTR_FRAMED_IP_ADDRESS: CONV2RAD_STR(RADIUS_ATTR_FRAMED_IP_ADDRESS, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 0); break; case DIAM_ATTR_FRAMED_IP_NETMASK: CONV2RAD_STR(RADIUS_ATTR_FRAMED_IP_NETMASK, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 0); break; case DIAM_ATTR_FRAMED_IPV6_PREFIX: CONV2RAD_STR(RADIUS_ATTR_FRAMED_IPV6_PREFIX, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 0); break; case DIAM_ATTR_FRAMED_IPV6_POOL: CONV2RAD_STR(RADIUS_ATTR_FRAMED_IPV6_POOL, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1); break; case DIAM_ATTR_FRAMED_IPV6_ROUTE: CONV2RAD_STR(RADIUS_ATTR_FRAMED_IPV6_ROUTE, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1); break; case DIAM_ATTR_FRAMED_IPX_NETWORK: CONV2RAD_32B(RADIUS_ATTR_FRAMED_IPX_NETWORK, ahdr->avp_value->u32); break; case DIAM_ATTR_FRAMED_MTU: CONV2RAD_32B(RADIUS_ATTR_FRAMED_MTU, ahdr->avp_value->u32); break; case DIAM_ATTR_FRAMED_POOL: CONV2RAD_STR(RADIUS_ATTR_FRAMED_POOL, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1); break; case DIAM_ATTR_FRAMED_PROTOCOL: CONV2RAD_32B(RADIUS_ATTR_FRAMED_PROTOCOL, ahdr->avp_value->u32); break; case DIAM_ATTR_FRAMED_ROUTE: CONV2RAD_STR(RADIUS_ATTR_FRAMED_ROUTE, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1); break; case DIAM_ATTR_FRAMED_ROUTING: CONV2RAD_32B(RADIUS_ATTR_FRAMED_ROUTING, ahdr->avp_value->u32); break; case DIAM_ATTR_IDLE_TIMEOUT: CONV2RAD_32B(RADIUS_ATTR_IDLE_TIMEOUT, ahdr->avp_value->u32); break; case DIAM_ATTR_LOGIN_IP_HOST: CONV2RAD_STR(RADIUS_ATTR_LOGIN_IP_HOST, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 0); break; case DIAM_ATTR_LOGIN_IPV6_HOST: CONV2RAD_STR(RADIUS_ATTR_LOGIN_IPV6_HOST, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 0); break; case DIAM_ATTR_LOGIN_LAT_GROUP: CONV2RAD_STR(RADIUS_ATTR_LOGIN_LAT_GROUP, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1); break; case DIAM_ATTR_LOGIN_LAT_NODE: CONV2RAD_STR(RADIUS_ATTR_LOGIN_LAT_NODE, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1); break; case DIAM_ATTR_LOGIN_LAT_PORT: CONV2RAD_STR(RADIUS_ATTR_LOGIN_LAT_PORT, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1); break; case DIAM_ATTR_LOGIN_LAT_SERVICE: CONV2RAD_STR(RADIUS_ATTR_LOGIN_LAT_SERVICE, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1); break; case DIAM_ATTR_LOGIN_SERVICE: CONV2RAD_32B(RADIUS_ATTR_LOGIN_SERVICE, ahdr->avp_value->u32); break; case DIAM_ATTR_LOGIN_TCP_PORT: CONV2RAD_32B(RADIUS_ATTR_LOGIN_TCP_PORT, ahdr->avp_value->u32); break; /* - If the Multi-Round-Time-Out AVP is present, the value of the AVP MUST be inserted in the RADIUS Session-Timeout AVP. o As described in [NASREQ], if the Result-Code AVP set to DIAMETER_MULTI_ROUND_AUTH and the Multi-Round-Time-Out AVP is present, it is translated to the RADIUS Session-Timeout attribute. */ case DIAM_ATTR_MULTI_ROUND_TIMEOUT: CONV2RAD_32B(RADIUS_ATTR_SESSION_TIMEOUT, ahdr->avp_value->u32); break; case DIAM_ATTR_NAS_FILTER_RULE: /* This is not translatable to RADIUS */ fd_log_debug("[auth.rgwx] Received Diameter answer with non-translatable NAS-Filter-Rule AVP from '%.*s' (session: '%.*s'), ignoring.", (int)oh->avp_value->os.len, oh->avp_value->os.data, (int)sidlen, sid); handled = 0; break; /* NAS-Identifier is not present in answers */ /* NAS-IP-Address is not present in answers */ /* NAS-IPv6-Address is not present in answers */ /* NAS-Port is not present in answers */ /* NAS-Port-Id is not present in answers */ /* NAS-Port-Type is not present in answers */ case DIAM_ATTR_ORIGIN_AAA_PROTOCOL: /* We just remove this AVP */ break; /* Originating-Line-Info is not present in answers */ case DIAM_ATTR_PASSWORD_RETRY: CONV2RAD_32B(RADIUS_ATTR_PASSWORD_RETRY, ahdr->avp_value->u32); break; case DIAM_ATTR_PORT_LIMIT: CONV2RAD_32B(RADIUS_ATTR_PORT_LIMIT, ahdr->avp_value->u32); break; case DIAM_ATTR_PROMPT: CONV2RAD_32B(RADIUS_ATTR_PROMPT, ahdr->avp_value->u32); break; case DIAM_ATTR_QOS_FILTER_RULE: /* This is not translatable to RADIUS */ fd_log_debug("[auth.rgwx] Received Diameter answer with non-translatable QoS-Filter-Rule AVP from '%.*s' (session: '%.*s'), ignoring.", (int)oh->avp_value->os.len, oh->avp_value->os.data, (int)sidlen, sid); handled = 0; break; /* Re-Auth-Request-Type already handled */ case DIAM_ATTR_REPLY_MESSAGE: CONV2RAD_STR(RADIUS_ATTR_REPLY_MESSAGE, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 2); break; case DIAM_ATTR_SERVICE_TYPE: CONV2RAD_32B(RADIUS_ATTR_SERVICE_TYPE, ahdr->avp_value->u32); break; case DIAM_ATTR_STATE: CONV2RAD_STR(RADIUS_ATTR_STATE, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 2); break; case DIAM_ATTR_TUNNELING: { #define CONV2RAD_TUN_STR( _attr_, _data_, _len_, _trunc_) { \ size_t __l = (size_t)(_len_); \ size_t __w = (__l > 252) ? 252 : __l; \ size_t __off = 0; \ if ((_trunc_) == 0) { \ CHECK_PARAMS( __l <= 252 ); \ } \ if ((__l > 252) && (_trunc_ == 1)) { \ TRACE_DEBUG(FULL, "Attribute truncated!"); \ __l = 252; \ } \ buf[0] = tuntag; \ memcpy(&buf[1], (_data_), __w); \ CHECK_MALLOC(radius_msg_add_attr(*rad_fw, (_attr_), &buf[0], __w + 1)); \ while (__l -= __w) { \ __off += __w; \ __w = (__l > 253) ? 253 : __l; \ CHECK_MALLOC(radius_msg_add_attr(*rad_fw, (_attr_), (_data_) + __off, __w)); \ } \ } #define CONV2RAD_TUN_32B( _attr_, _data_) { \ uint32_t __v = htonl((uint32_t)(_data_) | (tuntag << 24)); \ CHECK_MALLOC(radius_msg_add_attr(*rad_fw, (_attr_), (uint8_t *)&__v, sizeof(__v))); \ } struct avp *inavp, *innext; tuntag++; CHECK_FCT( fd_msg_browse(avp, MSG_BRW_FIRST_CHILD, &innext, NULL) ); while (innext) { inavp = innext; CHECK_FCT( fd_msg_browse(inavp, MSG_BRW_NEXT, &innext, NULL) ); CHECK_FCT( fd_msg_avp_hdr ( inavp, &ahdr ) ); if ( ! (ahdr->avp_flags & AVP_FLAG_VENDOR)) { switch (ahdr->avp_code) { case DIAM_ATTR_TUNNEL_TYPE: CONV2RAD_TUN_32B( RADIUS_ATTR_TUNNEL_TYPE, ahdr->avp_value->u32); break; case DIAM_ATTR_TUNNEL_MEDIUM_TYPE: CONV2RAD_TUN_32B( RADIUS_ATTR_TUNNEL_MEDIUM_TYPE, ahdr->avp_value->u32); break; case DIAM_ATTR_TUNNEL_CLIENT_ENDPOINT: CONV2RAD_TUN_STR(RADIUS_ATTR_TUNNEL_CLIENT_ENDPOINT, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1); break; case DIAM_ATTR_TUNNEL_SERVER_ENDPOINT: CONV2RAD_TUN_STR(RADIUS_ATTR_TUNNEL_SERVER_ENDPOINT, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1); break; case DIAM_ATTR_TUNNEL_PREFERENCE: CONV2RAD_TUN_32B( RADIUS_ATTR_TUNNEL_PREFERENCE, ahdr->avp_value->u32); break; case DIAM_ATTR_TUNNEL_CLIENT_AUTH_ID: CONV2RAD_TUN_STR(RADIUS_ATTR_TUNNEL_CLIENT_AUTH_ID, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1); break; case DIAM_ATTR_TUNNEL_SERVER_AUTH_ID: CONV2RAD_TUN_STR(RADIUS_ATTR_TUNNEL_SERVER_AUTH_ID, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1); break; case DIAM_ATTR_TUNNEL_ASSIGNMENT_ID: CONV2RAD_TUN_STR(RADIUS_ATTR_TUNNEL_ASSIGNMENT_ID, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1); break; case DIAM_ATTR_TUNNEL_PASSWORD: { /* This AVP must be encoded for RADIUS (similar to radius_msg_add_attr_user_password) 0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Type | Length | Tag | Salt +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ Salt (cont) | String ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ */ size_t pos; int i; uint8_t * secret; /* S */ size_t secret_len; uint8_t hash[16]; /* b(i) */ const uint8_t *addr[3]; size_t len[3]; /* We need the request authenticator */ CHECK_PARAMS(st); /* Retrieve the shared secret */ CHECK_FCT(rgw_clients_getkey(cli, &secret, &secret_len)); /* Beginning of the buffer */ buf[0] = tuntag; buf[1] = (uint8_t)(lrand48()); /* A (hi bits) */ buf[2] = (uint8_t)(lrand48()); /* A (low bits) */ /* The plain text string P */ CHECK_PARAMS(ahdr->avp_value->os.len < 240); buf[3] = ahdr->avp_value->os.len; memcpy(&buf[4], ahdr->avp_value->os.data, ahdr->avp_value->os.len); memset(&buf[4 + ahdr->avp_value->os.len], 0, sizeof(buf) - 4 - ahdr->avp_value->os.len); /* Initial b1 = MD5(S + R + A) */ addr[0] = secret; len[0] = secret_len; addr[1] = st->req_auth; len[1] = 16; addr[2] = &buf[1]; len[2] = 2; md5_vector(3, addr, len, hash); /* Initial c(1) = p(1) xor b(1) */ for (i = 0; i < 16; i++) { buf[i + 3] ^= hash[i]; } pos = 16; /* loop */ while (pos < ahdr->avp_value->os.len + 1) { addr[0] = secret; len[0] = secret_len; addr[1] = &buf[pos - 13]; len[1] = 16; /* b(i) = MD5( S + c(i-1) */ md5_vector(2, addr, len, hash); /* c(i) = p(i) xor b(i) */ for (i = 0; i < 16; i++) buf[pos + i + 3] ^= hash[i]; pos += 16; } CONV2RAD_STR(RADIUS_ATTR_TUNNEL_PASSWORD, &buf[0], pos + 3, 0); } break; case DIAM_ATTR_TUNNEL_PRIVATE_GROUP_ID: CONV2RAD_TUN_STR(RADIUS_ATTR_TUNNEL_PRIVATE_GROUP_ID, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1); break; default: TRACE_DEBUG(FULL, "Ignored unknown AVP inside Tunneling AVP (%d)", ahdr->avp_code); } } else { TRACE_DEBUG(FULL, "Ignored unknown Vendor AVP inside Tunneling AVP (%d, %d)", ahdr->avp_vendor, ahdr->avp_code); } } } break; case DIAM_ATTR_USER_NAME: CONV2RAD_STR(RADIUS_ATTR_USER_NAME, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1); break; /* User-Password never present in answers */ /* RFC 4072 (AVP in the order of the EAP Command AVP Table) */ /* o Diameter Accounting-EAP-Auth-Method AVPs, if present, are discarded. */ case DIAM_ATTR_ACCOUNTING_EAP_AUTH_METHOD: break; /* o Diameter EAP-Master-Session-Key AVP can be translated to the vendor-specific RADIUS MS-MPPE-Recv-Key and MS-MPPE-Send-Key attributes [RFC2548]. The first up to 32 octets of the key is stored into MS-MPPE-Recv-Key, and the next up to 32 octets (if present) are stored into MS-MPPE-Send-Key. The encryption of this attribute is described in [RFC2548]. */ case DIAM_ATTR_EAP_MASTER_SESSION_KEY: { uint8_t * secret; /* S */ size_t secret_len; size_t recv_len, send_len; /* We need the request authenticator */ CHECK_PARAMS(st); /* Retrieve the shared secret */ CHECK_FCT(rgw_clients_getkey(cli, &secret, &secret_len)); if (ahdr->avp_value->os.len != 64) { TRACE_DEBUG(INFO, "Received EAP-Master-Session-Key attribute with length %zd != 64.", ahdr->avp_value->os.len) } CHECK_PARAMS(ahdr->avp_value->os.len <= 64); recv_len = ahdr->avp_value->os.len >= 32 ? 32 : ahdr->avp_value->os.len; send_len = ahdr->avp_value->os.len - recv_len; if ( ! radius_msg_add_mppe_keys(*rad_fw, st->req_auth, secret, secret_len, ahdr->avp_value->os.data + recv_len, send_len, ahdr->avp_value->os.data, recv_len) ) { TRACE_DEBUG(INFO, "Error while converting EAP-Master-Session-Key to RADIUS message"); return ENOMEM; } } break; case DIAM_ATTR_EAP_KEY_NAME: CONV2RAD_STR(RADIUS_ATTR_EAP_KEY_NAME, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1); break; /* o Diameter EAP-Payload AVP is translated to RADIUS EAP-Message attribute(s). If necessary, the value is split into multiple RADIUS EAP-Message attributes. */ case DIAM_ATTR_EAP_PAYLOAD: if ( ! radius_msg_add_eap(*rad_fw, ahdr->avp_value->os.data, ahdr->avp_value->os.len) ) { TRACE_DEBUG(INFO, "Error while converting EAP payload to RADIUS message"); return ENOMEM; } break; /* o Diameter EAP-Reissued-Payload AVP is translated to a message that contains RADIUS EAP-Message attribute(s), and a RADIUS Error-Cause attribute [RFC3576] with value 202 (decimal), "Invalid EAP Packet (Ignored)" [RFC3579]. */ case DIAM_ATTR_EAP_REISSUED_PAYLOAD: if ( ! radius_msg_add_eap(*rad_fw, ahdr->avp_value->os.data, ahdr->avp_value->os.len) ) { TRACE_DEBUG(INFO, "Error while converting EAP reissued payload to RADIUS message"); return ENOMEM; } error_cause = 202; /* Invalid EAP Packet */ break; default: /* Leave the AVP in the message for further treatment */ handled = 0; } } else { /* Vendor-specific AVPs */ switch (ahdr->avp_vendor) { default: /* unknown vendor */ handled = 0; } } if (handled) { CHECK_FCT( fd_msg_free( avp ) ); } } CHECK_FCT( fd_msg_free( aoh ) ); free(st); if (error_cause) { if ( ! radius_msg_add_attr_int32(*rad_fw, RADIUS_ATTR_ERROR_CAUSE, error_cause) ) { TRACE_DEBUG(INFO, "Error while adding Error-Cause attribute in RADIUS message"); return ENOMEM; } } if ((*rad_fw)->hdr->code == RADIUS_CODE_ACCESS_ACCEPT) { /* Add the auth-application-id required for STR, or 0 if no STR is required */ CHECK_FCT( fd_msg_hdr( *diam_ans, &hdr ) ); if (sizeof(buf) < (sz = snprintf((char *)buf, sizeof(buf), CLASS_AAI_PREFIX "%u", no_str ? 0 : hdr->msg_appl))) { TRACE_DEBUG(INFO, "Data truncated in Class attribute: %s", buf); } CONV2RAD_STR(RADIUS_ATTR_CLASS, buf, sz, 0); } return 0; } /* The exported symbol */ struct rgw_api rgwp_descriptor = { .rgwp_name = "auth", .rgwp_conf_parse = auth_conf_parse, .rgwp_conf_free = auth_conf_free, .rgwp_rad_req = auth_rad_req, .rgwp_diam_ans = auth_diam_ans }; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/rgwx_debug.c000066400000000000000000000136361333553357400255300ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Debug plugin for app_radgw */ #include "rgw_common.h" /* Store the configuration string in the state */ static int debug_conf_parse ( char * conf_file, struct rgwp_config ** state ) { TRACE_ENTRY("%p %p", conf_file, state); CHECK_PARAMS(state); *state = (void *)conf_file; return 0; } /* Function to display the content of a RADIUS message (more friendly way than radius_msg_dump) */ static void debug_dump_radius(struct radius_msg *msg) { unsigned char *auth; size_t i; auth = &(msg->hdr->authenticator[0]); fd_log_debug(" id : 0x%02hhx, code: %hhd (%s)", msg->hdr->identifier, msg->hdr->code, rgw_msg_code_str(msg->hdr->code)); fd_log_debug(" auth: %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx", auth[0], auth[1], auth[2], auth[3], auth[4], auth[5], auth[6], auth[7]); fd_log_debug(" %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx %02hhx", auth[8], auth[9], auth[10], auth[11], auth[12], auth[13], auth[14], auth[15]); for (i = 0; i < msg->attr_used; i++) { struct radius_attr_hdr *attr = (struct radius_attr_hdr *)(msg->buf + msg->attr_pos[i]); fd_log_debug(" - len:%3hhu, type:0x%02hhx (%s)", attr->length, attr->type, rgw_msg_attrtype_str(attr->type)); /* If we need to dump the value, it's better to call directly radius_msg_dump instead... */ } } /* Function called when a new RADIUS message is being converted to Diameter */ static int debug_rad_req( struct rgwp_config * cs, struct radius_msg * rad_req, struct radius_msg ** rad_ans, struct msg ** diam_fw, struct rgw_client * cli ) { TRACE_ENTRY("%p %p %p %p %p", cs, rad_req, rad_ans, diam_fw, cli); fd_log_debug("------------- RADIUS/Diameter Request Debug%s%s%s -------------", cs ? " [" : "", cs ? (char *)cs : "", cs ? "]" : ""); if (!rad_req) { fd_log_debug(" RADIUS request: NULL pointer"); } else { fd_log_debug(" RADIUS request (%p) DUMP:", rad_req); debug_dump_radius(rad_req); } if (!rad_ans || ! *rad_ans) { fd_log_debug(" RADIUS answer: NULL pointer"); } else { fd_log_debug(" RADIUS answer (%p) DUMP:", *rad_ans); debug_dump_radius(*rad_ans); } if (!diam_fw || ! *diam_fw) { fd_log_debug(" Diameter message: NULL pointer"); } else { char * buf = NULL; size_t buflen; CHECK_MALLOC( fd_msg_dump_treeview(&buf, &buflen, NULL, *diam_fw, NULL, 0, 1) ); fd_log_debug(" Diameter message (%p) DUMP: %s", *diam_fw, buf); free(buf); } fd_log_debug("=========== Debug%s%s%s complete =============", cs ? " [" : "", cs ? (char *)cs : "", cs ? "]" : ""); return 0; } /* This one, when Diameter answer is converted to RADIUS */ static int debug_diam_ans( struct rgwp_config * cs, struct msg ** diam_ans, struct radius_msg ** rad_fw, struct rgw_client * cli ) { TRACE_ENTRY("%p %p %p %p", cs, diam_ans, rad_fw, cli); fd_log_debug("------------- RADIUS/Diameter Answer Debug%s%s%s -------------", cs ? " [" : "", cs ? (char *)cs : "", cs ? "]" : ""); if (!diam_ans || ! *diam_ans) { fd_log_debug(" Diameter message: NULL pointer"); } else { char * buf = NULL; size_t buflen; CHECK_MALLOC( fd_msg_dump_treeview(&buf, &buflen, NULL, *diam_ans, NULL, 0, 1) ); fd_log_debug(" Diameter message (%p) DUMP: %s", *diam_ans, buf); free(buf); } if (!rad_fw || ! *rad_fw) { fd_log_debug(" RADIUS answer: NULL pointer"); } else { fd_log_debug(" RADIUS answer (%p) DUMP:", *rad_fw); debug_dump_radius(*rad_fw); } fd_log_debug("=========== Debug%s%s%s complete =============", cs ? " [" : "", cs ? (char *)cs : "", cs ? "]" : ""); return 0; } /* The exported symbol */ struct rgw_api rgwp_descriptor = { .rgwp_name = "debug", .rgwp_conf_parse = debug_conf_parse, .rgwp_conf_free = NULL, .rgwp_rad_req = debug_rad_req, .rgwp_diam_ans = debug_diam_ans }; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/rgwx_echodrop.c000066400000000000000000000252051333553357400262400ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* See rgwx_echodrop.h for details */ #include "rgwx_echodrop.h" struct sess_state { struct fd_list sentinel; }; /* If a session is destroyed, empty the list of ed_saved_attribute */ static void state_delete(struct sess_state * arg, os0_t sid, void * opaque) { while (!FD_IS_LIST_EMPTY(&arg->sentinel)) { struct ed_saved_attribute * esa = (struct ed_saved_attribute *)(arg->sentinel.next); fd_list_unlink(&esa->chain); free(esa); } free(arg); } static DECLARE_FD_DUMP_PROTOTYPE(ed_session_state_dump, struct sess_state * st) { struct fd_list * li; CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "[rgwx sess_state](@%p):\n", st), return NULL); for (li = st->sentinel.next; li != &st->sentinel; li = li->next) { struct ed_saved_attribute * esa = (struct ed_saved_attribute *)(li); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "[rgwx sess_state {esa}] t:%2hhx l:%2hhx d:", esa->attr.type, esa->attr.length), return NULL); CHECK_MALLOC_DO( fd_dump_extend_hexdump(FD_DUMP_STD_PARAMS, (&esa->attr.length) + 1, esa->attr.length - 2, 0,0), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "\n"), return NULL); } return *buf; } /* Initialize the plugin and parse the configuration. */ static int ed_conf_parse(char * conffile, struct rgwp_config ** state) { struct rgwp_config * new; TRACE_ENTRY("%p %p", conffile, state); CHECK_PARAMS( state ); CHECK_PARAMS_DO( conffile, { fd_log_debug("[echodrop.rgwx] The configuration file is not optional for this plugin."); return EINVAL; } ); CHECK_MALLOC( new = malloc(sizeof(struct rgwp_config)) ); memset(new, 0, sizeof(struct rgwp_config)); /* Initialize the list of attributes to handle */ fd_list_init(&new->attributes, NULL); /* Create the session handler */ CHECK_FCT( fd_sess_handler_create( &new->sess_hdl, state_delete, ed_session_state_dump, NULL ) ); /* Parse the configuration file */ CHECK_FCT( ed_conffile_parse(conffile, new) ); if (TRACE_BOOL(FULL)) { TRACE_DEBUG(INFO, "Echo/Drop plugin configuration ('%s'):", conffile); struct fd_list * li; for (li = new->attributes.next; li != &new->attributes; li = li->next) { struct ed_conf_attribute * eca = (struct ed_conf_attribute *)li; char * act = (eca->action == ACT_ECHO) ? "ECHO" : "DROP"; if (eca->ext) { fd_log_debug(" %s Code: %hhu, Vendor: %u, Ext-Type: %hu", act, eca->code, eca->vendor_id, eca->extype); continue; } if (eca->tlv) { fd_log_debug(" %s Code: %hhu, Vendor: %u, Type: %hhu", act, eca->code, eca->vendor_id, eca->type); continue; } if (eca->vsa) { fd_log_debug(" %s Code: %hhu, Vendor: %u", act, eca->code, eca->vendor_id); continue; } fd_log_debug(" %s Code: %hhu", act, eca->code); } } /* OK, we are done */ *state = new; return 0; } /* Destroy the state */ static void ed_conf_free(struct rgwp_config * state) { TRACE_ENTRY("%p", state); CHECK_PARAMS_DO( state, return ); CHECK_FCT_DO( fd_sess_handler_destroy( &state->sess_hdl, NULL ), ); while (! FD_IS_LIST_EMPTY(&state->attributes) ) { struct fd_list * li = state->attributes.next; fd_list_unlink(li); free(li); } free(state); return; } /* Handle attributes from a RADIUS request as specified in the configuration */ static int ed_rad_req( struct rgwp_config * cs, struct radius_msg * rad_req, struct radius_msg ** rad_ans, struct msg ** diam_fw, struct rgw_client * cli ) { size_t nattr_used = 0; int idx; struct fd_list echo_list = FD_LIST_INITIALIZER(echo_list); struct fd_list *li; TRACE_ENTRY("%p %p %p %p %p", cs, rad_req, rad_ans, diam_fw, cli); CHECK_PARAMS(cs && rad_req); /* For each attribute in the original message */ for (idx = 0; idx < rad_req->attr_used; idx++) { int action = 0; struct radius_attr_hdr * attr = (struct radius_attr_hdr *)(rad_req->buf + rad_req->attr_pos[idx]); /* Look if we have a matching attribute in our configuration */ for (li = cs->attributes.next; li != &cs->attributes; li = li->next) { struct ed_conf_attribute * eca = (struct ed_conf_attribute *)li; uint32_t vid; unsigned char * ptr; if (eca->code < attr->type) continue; if (eca->code > attr->type) break; /* the code matches one in our configuration, check additional data if needed */ if (! eca->vsa) { action = eca->action; break; } if (attr->length < 8) continue; ptr = (unsigned char *)(attr + 1); /* since attr is not aligned, we may not access *(attr+1) directly */ memcpy(&vid, ptr, sizeof(uint32_t)); if (eca->vendor_id < ntohl(vid)) continue; if (eca->vendor_id > ntohl(vid)) break; /* The vendor matches our configured line... */ if ( ! eca->tlv && ! eca->ext ) { action = eca->action; break; } if (attr->length < 10) continue; if (eca->tlv) { struct radius_attr_vendor * tl = (struct radius_attr_vendor *)(ptr + sizeof(uint32_t)); if (tl->vendor_type == eca->type) { action = eca->action; break; } continue; } if (eca->ext) { /* To be done */ fd_log_debug("Extended attributes are not implemented yet!"); ASSERT(0); continue; } } switch (action) { case ACT_DROP: TRACE_DEBUG(FULL, "Dropping attribute with code %hhd", attr->type); break; case ACT_ECHO: { struct ed_saved_attribute * esa = NULL; TRACE_DEBUG(FULL, "Saving attribute with code %hhd", attr->type); CHECK_MALLOC( esa = malloc(sizeof(struct ed_saved_attribute) + attr->length - sizeof(struct radius_attr_hdr)) ); fd_list_init(&esa->chain, NULL); memcpy(&esa->attr, attr, attr->length); fd_list_insert_before(&echo_list, &esa->chain); } break; default: /* Attribute was not specified in the configuration */ /* We just keep the attribute in the RADIUS message */ rad_req->attr_pos[nattr_used++] = rad_req->attr_pos[idx]; } } rad_req->attr_used = nattr_used; /* Save the echoed values in the session, if any */ if (!FD_IS_LIST_EMPTY(&echo_list)) { struct session * sess; struct sess_state * st; CHECK_FCT( fd_msg_sess_get(fd_g_config->cnf_dict, *diam_fw, &sess, NULL) ); CHECK_PARAMS_DO(sess, { fd_log_debug( "[echodrop.rgwx] The extension is configured to echo some attributes from this message, but no session object has been created for it (yet)." " Please check your configuration file and include a session-generating extension BEFORE calling echodrop.rgwx to echo attributes." " Please use debug.rgwx to retrieve more information." ); return EINVAL; } ); /* Move the values in a dynamically allocated list */ CHECK_MALLOC( st = malloc(sizeof(struct sess_state)) ); fd_list_init(&st->sentinel, NULL); fd_list_move_end(&st->sentinel, &echo_list); /* Save the list in the session */ CHECK_FCT( fd_sess_state_store( cs->sess_hdl, sess, &st ) ); } return 0; } /* Process an answer: add the ECHO attributes back, if any */ static int ed_diam_ans( struct rgwp_config * cs, struct msg ** diam_ans, struct radius_msg ** rad_fw, struct rgw_client * cli ) { struct session * sess; struct sess_state * st; TRACE_ENTRY("%p %p %p %p", cs, diam_ans, rad_fw, cli); CHECK_PARAMS(cs); CHECK_FCT( fd_msg_sess_get(fd_g_config->cnf_dict, *diam_ans, &sess, NULL) ); /* If there is no session associated, just give up */ if (! sess ) { TRACE_DEBUG(FULL, "No session associated with the message, nothing to do here..."); return 0; } /* Now try and retrieve any data from the session */ CHECK_FCT( fd_sess_state_retrieve( cs->sess_hdl, sess, &st ) ); if (st == NULL) { /* No attribute saved in the session, just return */ return 0; } /* From this point on, we have a list of attributes to add to the radius message */ CHECK_PARAMS( rad_fw && *rad_fw); while (! FD_IS_LIST_EMPTY(&st->sentinel) ) { struct ed_saved_attribute * esa = (struct ed_saved_attribute *)(st->sentinel.next); fd_list_unlink(&esa->chain); TRACE_DEBUG(FULL, "Echo attribute in the RADIUS answer: type %hhu, len: %hhu", esa->attr.type, esa->attr.length); /* Add this attribute in the RADIUS message */ CHECK_MALLOC( radius_msg_add_attr(*rad_fw, esa->attr.type, (unsigned char *)(esa + 1), esa->attr.length - sizeof(struct radius_attr_hdr)) ); free(esa); } free(st); return 0; } /* The exported symbol */ struct rgw_api rgwp_descriptor = { .rgwp_name = "echo/drop", .rgwp_conf_parse = ed_conf_parse, .rgwp_conf_free = ed_conf_free, .rgwp_rad_req = ed_rad_req, .rgwp_diam_ans = ed_diam_ans }; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/rgwx_echodrop.h000066400000000000000000000077031333553357400262500ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2011, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* RADIUS translation plugin, to handle specific RADIUS attributes by either caching them and adding them to a corresponding RADIUS reply, or just dropping the attributes (no conversion to Diameter) */ /* This extension is a kind of swiss army-knife for interoperability, must be used with care. All attribute behaviors are specified through the configuration file of the extension */ #include "rgw_common.h" /* Action associated with an attribute */ #define ACT_ECHO 1 #define ACT_DROP 2 /* Result of configuration parsing */ struct rgwp_config { /* list of attributes and associated actions */ struct fd_list attributes; /* Handler to store the echo'ed attributes values */ struct session_handler * sess_hdl; }; /* An item of the attribute list */ struct ed_conf_attribute { struct fd_list chain; /* link in the list */ struct { unsigned action :2; /* ACT_ECHO or ACT_DROP */ unsigned vsa :1; /* Interpret as Vendor-Specific, and match the vendor id in addition to the code */ unsigned tlv :1; /* Interpret as Vendor-Specific with TLV format, and match the type also */ unsigned ext :1; /* Interpret as radius extended attribute, and match the ext-type also */ }; uint32_t vendor_id; /* vendor id to match when vsa = 1 */ uint16_t extype; /* Ext-Type value to match if ext = 1 */ uint8_t type; /* Type value to match if tlv = 1; */ uint8_t code; /* The attribute code, the list is ordered by this value */ }; /* For ECHO items, we save a list of these in the session */ struct ed_saved_attribute { struct fd_list chain; struct radius_attr_hdr attr; /* copy of the attribute */ /* The data of the attribute follows ... */ }; /* The yacc parser */ int ed_conffile_parse(char * conffile, struct rgwp_config *cs); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/rgwx_echodrop.l000066400000000000000000000076001333553357400262500ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Tokenizer for echo/drop plugin */ %{ #include "rgwx_echodrop.h" #include "rgwx_echodrop.tab.h" /* Update the column information */ #define YY_USER_ACTION { \ yylloc->first_column = yylloc->last_column + 1; \ yylloc->last_column = yylloc->first_column + yyleng - 1; \ } /* %option noinput ? */ #define YY_NO_INPUT %} %option bison-bridge bison-locations %option noyywrap %option nounput %% <*>\n { /* Update the line count */ yylloc->first_line++; yylloc->last_line++; yylloc->last_column=0; } <*>([[:space:]]{-}[\n])+ ; /* Eat all spaces, not new lines */ <*>#.*$ ; /* Eat all comments */ [[:digit:]]+ { /* Match an integer (not hexa) */ int ret = sscanf(yytext, "%d", &yylval->integer); if (ret != 1) { /* No matching: an error occurred */ fd_log_debug("[echodrop.rgwx] Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); return LEX_ERROR; /* trig an error in yacc parser */ /* Maybe we could REJECT instead of failing here? */ } return INTEGER; } (?i:"echo") { return TOK_ECHO; } (?i:"drop") { return TOK_DROP; } (?i:"code") { return TOK_CODE; } (?i:"vendor") { return TOK_VENDOR; } (?i:"tlv") { return TOK_TLV; } (?i:"ext") { return TOK_EXT; } /* Valid single characters for yyparse */ <*>[;] { return yytext[0]; } /* Unrecognized token */ <*>[[:alnum:]]+ | /* This rule is only useful to print a complete token in error messages */ /* Unrecognized character */ <*>. { fd_log_debug("[echodrop.rgwx] Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); return LEX_ERROR; } %% nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/rgwx_echodrop.y000066400000000000000000000163571333553357400262760ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Yacc parser for echo/drop plugin. See doc/echodrop.rgwx.conf.sample for description of the parsed format. */ /* For development only : */ %debug %error-verbose /* The parser receives the configuration file filename and the conf structure as parameter */ %parse-param {char * conffile} %parse-param {struct rgwp_config *cs} /* Keep track of location */ %locations %pure-parser %{ #include "rgwx_echodrop.h" #include "rgwx_echodrop.tab.h" /* bison is not smart enough to define the YYLTYPE before including this code, so... */ /* Forward declaration */ int yyparse(char * conffile, struct rgwp_config *cs); /* The Lex parser prototype */ int rgwx_echodroplex(YYSTYPE *lvalp, YYLTYPE *llocp); /* Parse the configuration file */ int ed_conffile_parse(char * conffile, struct rgwp_config *cs) { extern FILE * rgwx_echodropin; int ret; rgwx_echodropin = fopen(conffile, "r"); if ((rgwx_echodropin == NULL) && (*conffile != '/')) { /* We received a relative path, try adding DEFAULT_CONF_PATH prefix */ char * fullpath; CHECK_MALLOC( fullpath = malloc( strlen(conffile) + strlen(DEFAULT_CONF_PATH) + 2 ) ); sprintf( fullpath, DEFAULT_CONF_PATH "/%s", conffile ); rgwx_echodropin = fopen(fullpath, "r"); free(fullpath); } if (rgwx_echodropin == NULL) { ret = errno; fd_log_debug("[echodrop.rgwx] Unable to open plugin configuration file %s for reading: %s", conffile, strerror(ret)); return ret; } ret = rgwx_echodropparse(conffile, cs); fclose(rgwx_echodropin); if (ret != 0) { return EINVAL; } return 0; } /* Function to report the errors */ void yyerror (YYLTYPE *ploc, char * conffile, struct rgwp_config *cs, char const *s) { if (ploc->first_line != ploc->last_line) fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); else if (ploc->first_column != ploc->last_column) fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); else fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); } static struct { struct { unsigned vendor :1; unsigned tlv :1; unsigned ext :1; }; uint8_t type; uint16_t extype; uint32_t vendor_id; } attrinfo; %} /* Values returned by lex for tokens */ %union { unsigned integer; /* Value */ } /* typed data */ %token INTEGER %type action /* simple tokens */ %token TOK_ECHO %token TOK_DROP %token TOK_CODE %token TOK_VENDOR %token TOK_TLV %token TOK_EXT /* In case of error in the lexical analysis */ %token LEX_ERROR /* -------------------------------------- */ %% /* The grammar definition */ conffile: /* empty grammar is OK */ | conffile attrdef ; /* An attribute line */ attrdef: { memset(&attrinfo, 0, sizeof(attrinfo)); } action TOK_CODE INTEGER vendordef ';' { struct ed_conf_attribute * new; struct fd_list * li; if ($4 >= 256) { yyerror (&yylloc, conffile, cs, "Too big value for attribute CODE"); YYERROR; } /* Create a new list item */ CHECK_MALLOC_DO( new = malloc(sizeof(struct ed_conf_attribute)), { yyerror (&yylloc, conffile, cs, "Memory allocation error"); YYERROR; } ); memset(new, 0, sizeof(struct ed_conf_attribute)); fd_list_init(&new->chain, NULL); new->action = $2; new->vsa = attrinfo.vendor; new->tlv = attrinfo.tlv; new->ext = attrinfo.ext; if (new->vsa) new->vendor_id = attrinfo.vendor_id; if (new->tlv) new->type = attrinfo.type; if (new->ext) new->extype = attrinfo.extype; new->code = $4; /* Now place this attribute in the list */ for (li = cs->attributes.next; li != &cs->attributes; li = li->next) { struct ed_conf_attribute *eca = (struct ed_conf_attribute *)li; /* Order first by attribute code */ if (eca->code > new->code) break; if (eca->code < new->code) continue; /* Then by VSA flag */ if (! new->vsa) break; if (! eca->vsa) continue; /* Then by vendor value */ if (eca->vendor_id >= new->vendor_id) break; } fd_list_insert_before(li, &new->chain); } ; /* What to do with the specified attribute */ action: TOK_ECHO { $$ = ACT_ECHO; } | TOK_DROP { $$ = ACT_DROP; } ; /* Vendor specifics, if any */ vendordef: /* empty OK */ | TOK_VENDOR INTEGER specif { attrinfo.vendor_id = $2; attrinfo.vendor = 1; } ; /* Any additional specification ? */ specif: /* empty OK */ | TOK_TLV INTEGER { if ($2 >= (1 << 8)) { yyerror (&yylloc, conffile, cs, "Too big value for TLV type"); YYERROR; } attrinfo.type = $2; attrinfo.tlv = 1; } | TOK_EXT INTEGER { if ($2 >= (1 << 16)) { yyerror (&yylloc, conffile, cs, "Too big value for Ext-Type"); YYERROR; } attrinfo.extype = $2; attrinfo.ext = 1; yyerror (&yylloc, conffile, cs, "The EXT option is not supported in this version."); YYERROR; } ; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/rgwx_sample.c000066400000000000000000000106361333553357400257200ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Sample radius/diameter gateway plugin, for developers to see the structure of a plugin. */ #include "rgw_common.h" /* The state of this extension */ struct rgwp_config { /* In a real extension, we would store the parsed configuration file, and the states of the extension */ int init; /* If needed to store information between sent Diameter request and received answer, the session is probably the best place. See rgwx_echodrop for an example. */ }; /* The function called at plugin initialization */ static int sample_conf_parse ( char * conf_file, struct rgwp_config ** state ) { TRACE_ENTRY("%p %p", conf_file, state); CHECK_PARAMS(state); CHECK_MALLOC( *state = malloc(sizeof(struct rgwp_config)) ); (*state)->init = 1; return 0; } /* This function is called when the plugin is unloaded, to cleanup all the states */ static void sample_conf_free(struct rgwp_config * state) { TRACE_ENTRY("%p", state); CHECK_PARAMS_DO( state, ); free(state); return; } /* This function is called on incoming RADIUS messages. It should handle (some) RADIUS data and store into the Diameter message. */ static int sample_rad_req( struct rgwp_config * cs, struct radius_msg * rad_req, struct radius_msg ** rad_ans, struct msg ** diam_fw, struct rgw_client * cli ) { TRACE_ENTRY("%p %p %p %p %p", cs, rad_req, rad_ans, diam_fw, cli); CHECK_PARAMS(cs); TRACE_DEBUG(INFO, "RADIUS/Diameter Sample plugin received a new RADIUS message."); return 0; } /* This function is called when a Diameter answer is coming back. It should remove the AVPs and add the attributes in the RADIUS message. */ static int sample_diam_ans( struct rgwp_config * cs, struct msg ** diam_ans, struct radius_msg ** rad_fw, struct rgw_client * cli ) { TRACE_ENTRY("%p %p %p %p", cs, diam_ans, rad_fw, cli); CHECK_PARAMS(cs); TRACE_DEBUG(INFO, "RADIUS/Diameter Sample plugin received a new Diameter answer."); return 0; } /* Finally, we declare the structure that will be loaded by main RADIUS/Diameter gateway extension */ struct rgw_api rgwp_descriptor = { .rgwp_name = "sample", .rgwp_conf_parse = sample_conf_parse, .rgwp_conf_free = sample_conf_free, .rgwp_rad_req = sample_rad_req, .rgwp_diam_ans = sample_diam_ans }; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_radgw/rgwx_sip.c000066400000000000000000000717621333553357400252410ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * * Copyright (c) 2013, WIDE Project and NICT * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * Based on rgwx_auth plugin (Sebastien Decugis ) * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ /* RADIUS Access-Request messages translation plugin */ #include "rgw_common.h" #include #include #include #include /* Other constants we use */ #define AI_SIP 6 /* Diameter SIP application */ #define CC_MULTIMEDIA_AUTH_REQUEST 286 /* MAR */ #define CC_MULTIMEDIA_AUTH_ANSWER 286 /* MAA */ #define ACV_ASS_STATE_MAINTAINED 0 /* STATE_MAINTAINED */ #define ACV_ASS_NO_STATE_MAINTAINED 1 /* NO_STATE_MAINTAINED */ #define ER_DIAMETER_SUCCESS_AUTH_SENT_SERVER_NOT_STORED 2008 #define ER_DIAMETER_SUCCESS_SERVER_NAME_NOT_STORED 2006 /* This macro converts a RADIUS attribute to a Diameter AVP of type OctetString */ #define CONV2DIAM_STR( _dictobj_ ) \ CHECK_PARAMS( attr->length >= sizeof(struct radius_attr_hdr) ); \ /* Create the AVP with the specified dictionary model */ \ CHECK_FCT( fd_msg_avp_new ( cs->dict._dictobj_, 0, &avp ) ); \ value.os.len = attr->length - sizeof(struct radius_attr_hdr); \ value.os.data = (os0_t)(attr + 1); \ CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); \ /* Add the AVP in the Diameter message. */ \ CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); \ #define CONV2DIAM_STR_AUTH( _dictobj_ ) \ CHECK_PARAMS( attr->length >= sizeof(struct radius_attr_hdr) ); \ /* Create the AVP with the specified dictionary model */ \ CHECK_FCT( fd_msg_avp_new ( cs->dict._dictobj_, 0, &avp ) ); \ value.os.len = attr->length - sizeof(struct radius_attr_hdr); \ value.os.data = (os0_t)(attr + 1); \ CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); \ /* Add the AVP in the Diameter message. */ \ CHECK_FCT( fd_msg_avp_add ( auth, MSG_BRW_LAST_CHILD, avp) ); \ /* Same thing, for scalar AVPs of 32 bits */ #define CONV2DIAM_32B( _dictobj_ ) \ CHECK_PARAMS( attr->length == sizeof(struct radius_attr_hdr)+sizeof(uint32_t) );\ CHECK_FCT( fd_msg_avp_new ( cs->dict._dictobj_, 0, &avp ) ); \ { \ uint8_t * v = (uint8_t *)(attr + 1); \ value.u32 = (v[0] << 24) \ | (v[1] << 16) \ | (v[2] << 8) \ | v[3] ; \ } \ CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); \ CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); \ /* The state we keep for this plugin */ struct rgwp_config { struct { struct dict_object * Session_Id; struct dict_object * Auth_Application_Id; struct dict_object * Auth_Session_State; struct dict_object * Origin_Host; struct dict_object * Origin_Realm; struct dict_object * Destination_Realm; struct dict_object * SIP_AOR; struct dict_object * SIP_Method; struct dict_object * Destination_Host; struct dict_object * User_Name; struct dict_object * SIP_Server_URI; struct dict_object * SIP_Number_Auth_Items; struct dict_object * SIP_Authorization; struct dict_object * SIP_Authentication_Scheme; struct dict_object * SIP_Authentication_Info; struct dict_object * SIP_Auth_Data_Item; struct dict_object * Proxy_Info; struct dict_object * Route_Record; struct dict_object * Service_Type; struct dict_object * Result_Code; struct dict_object * Digest_URI; struct dict_object * Digest_Nonce; struct dict_object * Digest_CNonce; struct dict_object * Digest_Nonce_Count; struct dict_object * Digest_Realm; struct dict_object * Digest_Response; struct dict_object * Digest_Method; struct dict_object * Digest_Response_Auth; struct dict_object * Digest_Username; struct dict_object * Digest_Algorithm; struct dict_object * Digest_QOP; } dict; /* cache of the dictionary objects we use */ char * confstr; //Chained list of nonce struct fd_list listnonce; //This will be used to lock access to chained list pthread_mutex_t nonce_mutex; }; typedef struct noncechain noncechain; struct noncechain { struct fd_list chain; os0_t sid; size_t sidlen; os0_t nonce; size_t noncelen; }; static int nonce_add_element(os0_t nonce, size_t noncelen, os0_t sid, size_t sidlen, struct rgwp_config * state) { CHECK_PARAMS(nonce && state && sid && sidlen && noncelen); noncechain *newelt; CHECK_MALLOC(newelt=malloc(sizeof(noncechain))); CHECK_MALLOC(newelt->nonce= os0dup(nonce, noncelen)); newelt->noncelen=noncelen; CHECK_MALLOC(newelt->sid=os0dup(sid, sidlen)); newelt->sidlen=sidlen; fd_list_init(&newelt->chain,NULL); CHECK_POSIX(pthread_mutex_lock(&state->nonce_mutex)); fd_list_insert_before(&state->listnonce,&newelt->chain); CHECK_POSIX(pthread_mutex_unlock(&state->nonce_mutex)); return 0; } /* static void nonce_del_element(char * nonce, struct rgwp_config *state) { struct fd_list * li; CHECK_PARAMS_DO(nonce && state, return); for(li=state->listnonce.next;li!=&state->listnonce;li=li->next) { noncechain *temp=(noncechain *)li; if(strcmp(temp->nonce,nonce)==0) { fd_list_unlink (li); free(temp->sid); free(temp->nonce); free(temp); break; } } } */ //Retrieve sid from nonce static os0_t nonce_get_sid(os0_t nonce, size_t noncelen, size_t * sidlen, struct rgwp_config *state) { struct fd_list * li; os0_t sid=NULL; CHECK_PARAMS_DO(nonce && state && noncelen && sidlen, return NULL); *sidlen=0; // **Start mutex CHECK_POSIX_DO(pthread_mutex_lock(&state->nonce_mutex),); for(li=state->listnonce.next;li!=&state->listnonce;li=li->next) { noncechain *temp=(noncechain *)li; if (!fd_os_cmp(temp->nonce, temp->noncelen, nonce, noncelen)) { fd_list_unlink (li); sid=temp->sid; *sidlen=temp->sidlen; free(temp->nonce); free(temp); break; } } CHECK_POSIX_DO(pthread_mutex_unlock(&state->nonce_mutex),); // ***Stop mutex return sid; } static void nonce_deletelistnonce(struct rgwp_config *state) { // **Start mutex CHECK_POSIX_DO(pthread_mutex_lock(&state->nonce_mutex),); while(!(FD_IS_LIST_EMPTY(&state->listnonce)) ) { noncechain *temp=(noncechain *)state->listnonce.next; fd_list_unlink (&temp->chain); free(temp->sid); free(temp->nonce); free(temp); } CHECK_POSIX_DO(pthread_mutex_unlock(&state->nonce_mutex),); // ***Stop mutex } /* Initialize the plugin */ static int sip_conf_parse(char * conffile, struct rgwp_config ** state) { struct rgwp_config * new; struct dict_object * app; TRACE_ENTRY("%p %p", conffile, state); CHECK_PARAMS( state ); CHECK_MALLOC( new = malloc(sizeof(struct rgwp_config)) ); memset(new, 0, sizeof(struct rgwp_config)); new->confstr = conffile; /* Resolve all dictionary objects we use */ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Session-Id", &new->dict.Session_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Auth-Application-Id", &new->dict.Auth_Application_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Auth-Session-State", &new->dict.Auth_Session_State, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Host", &new->dict.Origin_Host, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Realm", &new->dict.Origin_Realm, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Realm", &new->dict.Destination_Realm, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-AOR", &new->dict.SIP_AOR, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Method", &new->dict.SIP_Method, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Host", &new->dict.Destination_Host, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "User-Name", &new->dict.User_Name, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Server-URI", &new->dict.SIP_Server_URI, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Number-Auth-Items", &new->dict.SIP_Number_Auth_Items, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Authorization", &new->dict.SIP_Authorization, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Auth-Data-Item", &new->dict.SIP_Auth_Data_Item, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Authentication-Scheme", &new->dict.SIP_Authentication_Scheme, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Authentication-Info", &new->dict.SIP_Authentication_Info, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Proxy-Info", &new->dict.Proxy_Info, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Route-Record", &new->dict.Route_Record, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Result-Code", &new->dict.Result_Code, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-URI", &new->dict.Digest_URI, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Nonce", &new->dict.Digest_Nonce, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Method", &new->dict.Digest_Method, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-CNonce", &new->dict.Digest_CNonce, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Nonce-Count", &new->dict.Digest_Nonce_Count, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Realm", &new->dict.Digest_Realm, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Response", &new->dict.Digest_Response, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Response-Auth", &new->dict.Digest_Response_Auth, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Username", &new->dict.Digest_Username, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Algorithm", &new->dict.Digest_Algorithm, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-QoP", &new->dict.Digest_QOP, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_APPLICATION, APPLICATION_BY_NAME, "Diameter Session Initiation Protocol (SIP) Application", &app, ENOENT) ); CHECK_FCT( fd_disp_app_support ( app, NULL, 1, 0 ) ); //chained list fd_list_init(&new->listnonce,NULL); CHECK_POSIX(pthread_mutex_init(&new->nonce_mutex,NULL)); *state = new; return 0; } /* deinitialize */ static void sip_conf_free(struct rgwp_config * state) { TRACE_ENTRY("%p", state); CHECK_PARAMS_DO( state, return ); nonce_deletelistnonce(state); CHECK_POSIX_DO(pthread_mutex_destroy(&state->nonce_mutex), /*continue*/); free(state); return; } /* Handle an incoming RADIUS request */ static int sip_rad_req( struct rgwp_config * cs, struct radius_msg * rad_req, struct radius_msg ** rad_ans, struct msg ** diam_fw, struct rgw_client * cli ) { int idx; int got_AOR = 0; int got_Dusername = 0; int got_Drealm = 0; int got_Duri = 0; int got_Dmethod = 0; int got_Dnonce = 0; int got_Dresponse = 0; int got_Dalgorithm = 0; os0_t sid = NULL; size_t sidlen; os0_t un=NULL; size_t un_len; size_t nattr_used = 0; struct avp *auth_data=NULL, *auth=NULL, *avp = NULL; union avp_value value; struct session * sess; TRACE_ENTRY("%p %p %p %p %p", cs, rad_req, rad_ans, diam_fw, cli); CHECK_PARAMS(rad_req && (rad_req->hdr->code == RADIUS_CODE_ACCESS_REQUEST) && rad_ans && diam_fw && *diam_fw); /* RFC5090 RADIUS Extension Digest Application */ CHECK_FCT( fd_msg_sess_get(fd_g_config->cnf_dict, *diam_fw, &sess, NULL) ); if (sess != NULL) { TRACE_DEBUG(INFO,"INTERNAL ERROR: We are not supposed to receive a session in radSIP plugin."); return EINVAL; } /* Check basic information is there */ for (idx = 0; idx < rad_req->attr_used; idx++) { struct radius_attr_hdr * attr = (struct radius_attr_hdr *)(rad_req->buf + rad_req->attr_pos[idx]); switch (attr->type) { case RADIUS_ATTR_USER_NAME: if (attr->length>sizeof(struct radius_attr_hdr)) { TRACE_DEBUG(ANNOYING, "Found a User-Name attribute: '%.*s'", (int)(attr->length- sizeof(struct radius_attr_hdr)), (char *)(attr+1)); un = (os0_t)(attr + 1); un_len =attr->length - sizeof(struct radius_attr_hdr); } break; case RADIUS_ATTR_DIGEST_USERNAME: got_Dusername = 1; break; case RADIUS_ATTR_DIGEST_REALM: got_Drealm = 1; break; case RADIUS_ATTR_DIGEST_URI: got_Duri = 1; break; case RADIUS_ATTR_DIGEST_METHOD: got_Dmethod = 1; break; // case RADIUS_ATTR_DIGEST_QOP: // got_Dqop = 1; // break; // case RADIUS_ATTR_DIGEST_NONCE_COUNT: // got_Dnonce_count = 1; // break; case RADIUS_ATTR_DIGEST_NONCE: got_Dnonce = 1; sid=nonce_get_sid((os0_t)(attr+1), attr->length - sizeof(struct radius_attr_hdr), &sidlen, cs); if(!sid) { TRACE_DEBUG(INFO,"We haven't found the session.'"); return EINVAL; } CHECK_FCT(fd_sess_fromsid_msg (sid, sidlen, &sess, NULL)); free(sid); break; // case RADIUS_ATTR_DIGEST_CNONCE: // got_Dcnonce = 1; // break; case RADIUS_ATTR_DIGEST_RESPONSE: got_Dresponse = 1; break; case RADIUS_ATTR_DIGEST_ALGORITHM: got_Dalgorithm = 1; break; case RADIUS_ATTR_SIP_AOR: got_AOR = 1; break; } } if(!un) { TRACE_DEBUG(INFO,"No Username in request"); return EINVAL; } /* Create the session if it is not already done */ if (!sess) { DiamId_t fqdn; size_t fqdn_len; DiamId_t realm; size_t realm_len; /* Get information on the RADIUS client */ CHECK_FCT( rgw_clients_get_origin(cli, &fqdn, &fqdn_len, &realm, &realm_len) ); /* Create a new Session-Id. The format is: {fqdn;hi32;lo32;username;diamid} */ CHECK_MALLOC( sid = malloc(un_len + 1 /* ';' */ + fd_g_config->cnf_diamid_len + 1 /* '\0' */) ); sidlen = sprintf((char *)sid, "%.*s;%s", (int)un_len, un, fd_g_config->cnf_diamid); CHECK_FCT( fd_sess_new(&sess, fqdn, fqdn_len, sid, sidlen) ); free(sid); } /* Now, add the Session-Id AVP at beginning of Diameter message */ CHECK_FCT( fd_msg_avp_new ( cs->dict.Session_Id, 0, &avp ) ); value.os.data = sid; value.os.len = sidlen; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_FIRST_CHILD, avp) ); TRACE_DEBUG(FULL, "[sip.rgwx] Translating new message for session '%s'...", sid); /* Now add this session in the message */ CHECK_FCT( fd_msg_sess_set(*diam_fw, sess) ); /* Add the Destination-Realm AVP */ CHECK_FCT( fd_msg_avp_new ( cs->dict.Destination_Realm, 0, &avp ) ); int i = 0; /* Is there an '@' in the user name? We don't care for decorated NAI here */ for (i = un_len - 2; i > 0; i--) { if (un[i] == '@') { i++; break; } } if (i == 0) { /* Not found in the User-Name => we use the local domain of this gateway */ value.os.data = (os0_t)fd_g_config->cnf_diamrlm; value.os.len = fd_g_config->cnf_diamrlm_len; } else { value.os.data = un + i; value.os.len = un_len - i; } CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); /* If the RADIUS Access-Request message does not contain any Digest-* attribute, then the RADIUS client does not want to apply HTTP Digest authentication, in which case, actions at the gateway are outside the scope of this document. */ if(!(got_Dmethod && got_Duri)) { TRACE_DEBUG(INFO,"No Digest attributes in request, we drop it..."); return 1; } /* Add the appropriate command code & Auth-Application-Id */ { struct msg_hdr * header = NULL; CHECK_FCT( fd_msg_hdr ( *diam_fw, &header ) ); header->msg_flags = CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE; header->msg_code = CC_MULTIMEDIA_AUTH_REQUEST; header->msg_appl = AI_SIP; /* Add the Auth-Application-Id */ { CHECK_FCT( fd_msg_avp_new ( cs->dict.Auth_Application_Id, 0, &avp ) ); value.i32 = header->msg_appl; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); } } /*Add Auth_Session_State AVP */ { CHECK_FCT( fd_msg_avp_new ( cs->dict.Auth_Session_State, 0, &avp ) ); value.i32 = ACV_ASS_NO_STATE_MAINTAINED; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); } /*Add SIP_Number_Auth_Items AVP */ { CHECK_FCT( fd_msg_avp_new ( cs->dict.SIP_Number_Auth_Items, 0, &avp ) ); value.i32 = 1; //We just treat one auth per request in gateway CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); } /* Add SIP_Auth_Data_Item AVP */ { CHECK_FCT( fd_msg_avp_new ( cs->dict.SIP_Auth_Data_Item, 0, &auth_data ) ); } /* Add SIP_Authentication_Scheme AVP */ { CHECK_FCT( fd_msg_avp_new ( cs->dict.SIP_Authentication_Scheme, 0, &avp ) ); value.i32=0; //There is only Digest Auth in RFC for now CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( auth_data, MSG_BRW_LAST_CHILD, avp) ); } /* Add SIP_Authorization AVP */ { CHECK_FCT( fd_msg_avp_new ( cs->dict.SIP_Authorization, 0, &auth ) ); CHECK_FCT( fd_msg_avp_add ( auth_data, MSG_BRW_LAST_CHILD, auth) ); } for (idx = 0; idx < rad_req->attr_used; idx++) { struct radius_attr_hdr * attr = (struct radius_attr_hdr *)(rad_req->buf + rad_req->attr_pos[idx]); switch (attr->type) { case RADIUS_ATTR_USER_NAME: CONV2DIAM_STR( User_Name ); if(!got_Dusername) { CONV2DIAM_STR_AUTH(Digest_Username); got_Dusername=1; } break; case RADIUS_ATTR_DIGEST_URI: CONV2DIAM_STR_AUTH(Digest_URI); //All of these attributes are required by Diameter but not defined in RFC5090 so we provide FAKE values (only in first exchange) if(!got_AOR) { CONV2DIAM_STR( SIP_AOR ); got_AOR=1; } /* We must provide a fake nonce because of RFC4740 problem TODO: remove when RFC is updated ==START of FAKE */ if(!got_Dresponse) { CONV2DIAM_STR_AUTH(Digest_Response); got_Dresponse=1; } /* ==END of FAKE */ if(!got_Drealm) { //We extract Realm from Digest_URI DiamId_t realm=NULL; size_t realm_len = 0; os0_t temp; temp = (os0_t)(attr + 1); for (i=attr->length - sizeof(struct radius_attr_hdr) - 1; i>=0; i--) { if (temp[i] == '@') { realm = (DiamId_t)temp + i + 1; CHECK_FCT_DO( fd_os_validate_DiameterIdentity(&realm, &realm_len, 1), realm = NULL ); break; } } if(realm!=NULL) { CHECK_FCT( fd_msg_avp_new ( cs->dict.Digest_Realm, 0, &avp ) ); value.os.data=(os0_t)realm; value.os.len=realm_len; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( auth, MSG_BRW_LAST_CHILD, avp) ); //We add SIP-Server-URI AVP because SIP server is registrar (through gateway) CHECK_FCT( fd_msg_avp_new ( cs->dict.SIP_Server_URI, 0, &avp ) ); value.os.data=(os0_t)realm; value.os.len=realm_len; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); free(realm); } else { TRACE_DEBUG(INFO, "Can't extract domain from URI, droping request..."); return 1; } got_Drealm=1; } break; case RADIUS_ATTR_DIGEST_METHOD: CONV2DIAM_STR(SIP_Method); CONV2DIAM_STR_AUTH(Digest_Method); break; case RADIUS_ATTR_DIGEST_REALM: CONV2DIAM_STR_AUTH(Digest_Realm); //We add SIP-Server-URI AVP because SIP server is registrar (through gateway) CHECK_FCT( fd_msg_avp_new ( cs->dict.SIP_Server_URI, 0, &avp ) ); os0_t temp; #define SIP_PREFIX "sip:" size_t temp_len = attr->length - sizeof(struct radius_attr_hdr) + CONSTSTRLEN(SIP_PREFIX) + 1; CHECK_MALLOC( temp = malloc(temp_len) ); temp_len = snprintf((char *)temp, temp_len, SIP_PREFIX "%.*s", (int)(attr->length - sizeof(struct radius_attr_hdr)), (char *)(attr + 1)); value.os.data=temp; value.os.len=temp_len; free(temp); CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, avp) ); break; case RADIUS_ATTR_DIGEST_USERNAME: CONV2DIAM_STR_AUTH(Digest_Username); break; case RADIUS_ATTR_DIGEST_QOP: CONV2DIAM_STR_AUTH( Digest_QOP ); break; case RADIUS_ATTR_DIGEST_ALGORITHM: CONV2DIAM_STR_AUTH( Digest_Algorithm ); break; case RADIUS_ATTR_DIGEST_CNONCE: CONV2DIAM_STR_AUTH( Digest_CNonce ); break; case RADIUS_ATTR_DIGEST_NONCE: CONV2DIAM_STR_AUTH( Digest_Nonce ); break; case RADIUS_ATTR_DIGEST_NONCE_COUNT: CONV2DIAM_STR_AUTH( Digest_Nonce_Count ); break; case RADIUS_ATTR_DIGEST_RESPONSE: CONV2DIAM_STR_AUTH( Digest_Response ); break; case RADIUS_ATTR_SIP_AOR: CONV2DIAM_STR( SIP_AOR ); break; default: if(!got_Dalgorithm) { //[Note 3] If Digest-Algorithm is missing, 'MD5' is assumed. #define DIGEST_ALGO_MD5 "MD5" CHECK_FCT( fd_msg_avp_new ( cs->dict.Digest_Algorithm, 0, &avp ) ); value.os.data = (os0_t)DIGEST_ALGO_MD5; value.os.len = CONSTSTRLEN(DIGEST_ALGO_MD5) - 1; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( auth, MSG_BRW_LAST_CHILD, avp) ); got_Dalgorithm=1; } if(!got_Dnonce) { //We give a fake nonce because it will be calculated at the server. CHECK_FCT( fd_msg_avp_new ( cs->dict.Digest_Nonce, 0, &avp ) ); value.os.data=(unsigned char *)"nonce"; value.os.len=strlen((const char *)value.os.data); CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( auth, MSG_BRW_LAST_CHILD, avp) ); got_Dnonce=1; } break; } } CHECK_FCT( fd_msg_avp_add ( *diam_fw, MSG_BRW_LAST_CHILD, auth_data) ); /* Update the radius message to remove all handled attributes */ rad_req->attr_used = nattr_used; //fd_msg_dump_walk(1,*diam_fw); return 0; } static int sip_diam_ans( struct rgwp_config * cs, struct msg ** diam_ans, struct radius_msg ** rad_fw, struct rgw_client * cli ) { struct avp *avp, *next; struct avp_hdr *ahdr; //char buf[254]; /* to store some attributes values (with final '\0') */ struct session * sess; os0_t sid = NULL; size_t sidlen; TRACE_ENTRY("%p %p %p %p", cs, diam_ans, rad_fw, cli); CHECK_PARAMS(cs && diam_ans && *diam_ans && rad_fw && *rad_fw); /* MACROS to help in the process: convert AVP data to RADIUS attributes. */ /* Control large attributes: _trunc_ = 0 => error; _trunc_ = 1 => truncate; _trunc = 2 => create several attributes */ #define CONV2RAD_STR( _attr_, _data_, _len_, _trunc_) { \ size_t __l = (size_t)(_len_); \ size_t __off = 0; \ TRACE_DEBUG(FULL, "Converting AVP to "#_attr_); \ if ((_trunc_) == 0) { \ CHECK_PARAMS( __l <= 253 ); \ } \ if ((__l > 253) && (_trunc_ == 1)) { \ TRACE_DEBUG(INFO, "[authSIP.rgwx] AVP truncated in "#_attr_); \ __l = 253; \ } \ do { \ size_t __w = (__l > 253) ? 253 : __l; \ CHECK_MALLOC(radius_msg_add_attr(*rad_fw, (_attr_), (_data_) + __off, __w)); \ __off += __w; \ __l -= __w; \ } while (__l); \ } #define CONV2RAD_32B( _attr_, _data_) { \ uint32_t __v = htonl((uint32_t)(_data_)); \ TRACE_DEBUG(FULL, "Converting AVP to "#_attr_); \ CHECK_MALLOC(radius_msg_add_attr(*rad_fw, (_attr_), (uint8_t *)&__v, sizeof(__v))); \ } /* Search the different AVPs we handle here */ CHECK_FCT( fd_msg_sess_get(fd_g_config->cnf_dict, *diam_ans, &sess, NULL) ); if (sess) { CHECK_FCT( fd_sess_getsid(sess, &sid, &sidlen) ); } /* Check the Diameter error code */ CHECK_FCT( fd_msg_search_avp (*diam_ans, cs->dict.Result_Code, &avp) ); ASSERT( avp ); /* otherwise the message should have been discarded a lot earlier because of ABNF */ CHECK_FCT( fd_msg_avp_hdr ( avp, &ahdr ) ); switch (ahdr->avp_value->u32) { case ER_DIAMETER_MULTI_ROUND_AUTH: case ER_DIAMETER_SUCCESS_AUTH_SENT_SERVER_NOT_STORED: (*rad_fw)->hdr->code = RADIUS_CODE_ACCESS_CHALLENGE; //struct timespec nowts; //CHECK_SYS(clock_gettime(CLOCK_REALTIME, &nowts)); //nowts.tv_sec+=600; //CHECK_FCT(fd_sess_settimeout(session, &nowts )); break; case ER_DIAMETER_SUCCESS_SERVER_NAME_NOT_STORED: case ER_DIAMETER_SUCCESS: (*rad_fw)->hdr->code = RADIUS_CODE_ACCESS_ACCEPT; // in_success=1; break; default: (*rad_fw)->hdr->code = RADIUS_CODE_ACCESS_REJECT; fd_log_debug("[sip.rgwx] Received Diameter answer with error code '%d', session %.*s, translating into Access-Reject", ahdr->avp_value->u32, (int)sidlen, sid); return 0; } /* Remove this Result-Code avp */ CHECK_FCT( fd_msg_free( avp ) ); /* Now loop in the list of AVPs and convert those that we know how */ CHECK_FCT( fd_msg_browse(*diam_ans, MSG_BRW_FIRST_CHILD, &next, NULL) ); while (next) { int handled = 1; avp = next; CHECK_FCT( fd_msg_browse(avp, MSG_BRW_WALK, &next, NULL) ); CHECK_FCT( fd_msg_avp_hdr ( avp, &ahdr ) ); if (!(ahdr->avp_flags & AVP_FLAG_VENDOR)) { switch (ahdr->avp_code) { case DIAM_ATTR_DIGEST_NONCE: CONV2RAD_STR(DIAM_ATTR_DIGEST_NONCE, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 0); nonce_add_element(ahdr->avp_value->os.data, ahdr->avp_value->os.len, sid, sidlen, cs); break; case DIAM_ATTR_DIGEST_REALM: CONV2RAD_STR(DIAM_ATTR_DIGEST_REALM, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1); break; case DIAM_ATTR_DIGEST_QOP: CONV2RAD_STR(DIAM_ATTR_DIGEST_QOP, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1); break; case DIAM_ATTR_DIGEST_ALGORITHM: CONV2RAD_STR(DIAM_ATTR_DIGEST_ALGORITHM, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 1); break; case DIAM_ATTR_DIGEST_RESPONSE_AUTH: CONV2RAD_STR(DIAM_ATTR_DIGEST_RESPONSE_AUTH, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 0); break; default: handled=0; break; } } else { /* Vendor-specific AVPs */ switch (ahdr->avp_vendor) { default: /* unknown vendor */ handled = 0; } } if (handled) { CHECK_FCT( fd_msg_free( avp ) ); } } return 0; } /* The exported symbol */ struct rgw_api rgwp_descriptor = { .rgwp_name = "sip", .rgwp_conf_parse = sip_conf_parse, .rgwp_conf_free = sip_conf_free, .rgwp_rad_req = sip_rad_req, .rgwp_diam_ans = sip_diam_ans }; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_redirect/000077500000000000000000000000001333553357400237135ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_redirect/CMakeLists.txt000066400000000000000000000021061333553357400264520ustar00rootroot00000000000000# The app_redirect extension PROJECT("Configurable Redirects server extension" C) # Check if REG_STARTEND is provided on the host SET(CHECK_REG_STARTEND_SOURCE_CODE " #include #include int main() { return regexec(NULL, NULL, 0, NULL, REG_STARTEND); } ") CHECK_C_SOURCE_COMPILES("${CHECK_REG_STARTEND_SOURCE_CODE}" HAVE_REG_STARTEND) # Generate the host.h file CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/ard-host.h.in ${CMAKE_CURRENT_BINARY_DIR}/ard-host.h) # Parser files BISON_FILE(ard_conf.y) FLEX_FILE(ard_conf.l) SET_SOURCE_FILES_PROPERTIES(lex.ard_conf.c ard_conf.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}") # List of source files SET( APP_REDIR_SRC app_redir.c app_redir.h lex.ard_conf.c ard_conf.tab.c ard_conf.tab.h ard_rules.c ) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) # Compile these files as a freeDiameter extension FD_ADD_EXTENSION(app_redirect ${APP_REDIR_SRC}) #### ## INSTALL section ## INSTALL(TARGETS app_redirect LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-app_redirect) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_redirect/app_redir.c000066400000000000000000000075511333553357400260340ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2011, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* * Configurable routing of messages for freeDiameter. */ #include "app_redir.h" static struct fd_rt_fwd_hdl * ard_fwd_cb = NULL; /* entry point */ static int ard_entry(char * conffile) { TRACE_ENTRY("%p", conffile); /* Parse the configuration file */ CHECK_FCT( ard_conf_handle(conffile) ); /* Resolve the dictionary objects we use */ CHECK_FCT( fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Redirect-Host", &avp_Redirect_Host, ENOENT )); CHECK_FCT( fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Redirect-Host-Usage", &avp_Redirect_Host_Usage, ENOENT )); CHECK_FCT( fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Redirect-Max-Cache-Time", &avp_Redirect_Max_Cache_Time, ENOENT )); /* Register the proxy callback */ CHECK_FCT( fd_rt_fwd_register(ard_rule_apply, NULL, RT_FWD_REQ, &ard_fwd_cb) ); /* We're done */ return 0; } /* Unload */ void fd_ext_fini(void) { TRACE_ENTRY(); /* Unregister the proxy callback */ if (ard_fwd_cb) { CHECK_FCT_DO( fd_rt_fwd_unregister(ard_fwd_cb, NULL), ); } /* Destroy all rules */ while (!FD_IS_LIST_EMPTY(&ard_conf->rules)) { struct ard_rule * r = ard_conf->rules.next->o; fd_list_unlink(&r->chain); while (!FD_IS_LIST_EMPTY(&r->criteria)) { struct ard_criteria * c = r->criteria.next->o; fd_list_unlink(&c->chain); if (c->is_regex) { regfree(&c->preg); } free(c->s); free(c); } while (!FD_IS_LIST_EMPTY(&r->targets)) { struct ard_target * t = r->targets.next->o; fd_list_unlink(&t->chain); free(t->s); free(t); } free(r); } /* Done */ return ; } EXTENSION_ENTRY("app_redirect", ard_entry); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_redirect/app_redir.h000066400000000000000000000110331333553357400260270ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2011, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Header file for the app_redirect extension. * * See the app_redirect.conf.sample file for the format of the configuration file. */ /* FreeDiameter's common include file */ #include /* Host configuration for this specific extension */ #include #include /* Extension's configuration */ struct ard_config { uint32_t default_rct; /* redirect-cache-time to use unless overwritten by a rule */ struct fd_list rules; /* the list of rules in the order they appear in the conf file. */ }; extern struct ard_config * ard_conf; /* initialized in ard_conf.y */ /* The types of redirects (from Redirect-Host-Usage AVP value) */ enum redir_h_u { DONT_CACHE = 0, ALL_SESSION, ALL_REALM, REALM_AND_APPLICATION, ALL_APPLICATION, ALL_HOST, ALL_USER }; #define H_U_MAX ALL_USER /* A rule */ struct ard_rule { struct fd_list chain; /* link in configuration */ enum redir_h_u type; /* What kind of rule is this? */ uint32_t rct; /* overwrite default_rct is not 0 */ struct fd_list criteria; /* list of criteria to match. The rule is applied if all criteria match */ struct fd_list targets; /* list of Redirect-Host values to send. */ }; /* What kind of criteria exist */ enum rule_criteria { /* note: the order of the values reflects the complexity of matching -- it should be kept this way */ APP_ID, FROM_ID, FROM_REALM, AVP_INT, AVP_STR }; /* A criteria in the list */ struct ard_criteria { struct fd_list chain; /* link in ard_rule->criteria */ enum rule_criteria type; /* What is this rule */ /* the data that must be matched -- everything is not used by all criteria types */ char * s; size_t sl; int is_regex; regex_t preg; uint32_t i; struct dict_avp_data avp_info; }; /* A target entry in the ard_rule->targets list */ struct ard_target { struct fd_list chain; os0_t s; /* must be freed afterwards */ size_t l; }; /* The AVPs we use */ extern struct dict_object * avp_Redirect_Host; extern struct dict_object * avp_Redirect_Host_Usage; extern struct dict_object * avp_Redirect_Max_Cache_Time; /* Parse the configuration file */ int ard_conf_handle(char * conffile); /* Dump a rule (debug) */ void ard_rule_dump(struct ard_rule * r); /* Check if a rule applies, and if found, create the reply */ int ard_rule_apply(void * cbdata, struct msg ** msg); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_redirect/ard-host.h.in000066400000000000000000000045601333553357400262170ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2011, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Configuration from compile-time */ #ifndef RTD_IS_CONFIG #define RTD_IS_CONFIG #cmakedefine HAVE_REG_STARTEND #endif /* RTD_IS_CONFIG */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_redirect/ard_conf.l000066400000000000000000000123001333553357400256370ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Tokenizer * */ %{ #include "app_redir.h" /* Include yacc tokens definitions */ #include "ard_conf.tab.h" /* Update the column information */ #define YY_USER_ACTION { \ yylloc->first_column = yylloc->last_column + 1; \ yylloc->last_column = yylloc->first_column + yyleng - 1; \ } /* Avoid warning with newer flex */ #define YY_NO_INPUT %} qstring \"[^\"\n]*\" %option bison-bridge bison-locations %option noyywrap %option nounput %% /* Update the line count */ \n { yylloc->first_line++; yylloc->last_line++; yylloc->last_column=0; } /* Eat all spaces but not new lines */ ([[:space:]]{-}[\n])+ ; /* Eat all comments */ #.*$ ; /* Recognize any integer */ [[:digit:]]+ { /* Convert this to an u32 value */ int ret=0; ret = sscanf(yytext, "%u", &yylval->u32); if (ret != 1) { /* No matching: an error occurred */ fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); return TOK_LEX_ERROR; /* trig an error in yacc parser */ /* Maybe we could REJECT instead of failing here? */ } return TOK_U32VAL; } /* Recognize bracketed quoted strings */ [[]{qstring}[]] { /* Match a quoted string containing a regex */ CHECK_MALLOC_DO( yylval->tstring.str = strdup(yytext+2), { TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s", yytext, strerror(errno)); return TOK_LEX_ERROR; /* trig an error in yacc parser */ } ); yylval->tstring.str[strlen(yytext) - 4] = '\0'; yylval->tstring.regex = 1; return TOK_TSTRING; } /* Recognize quoted strings (since it comes after the previous rule, the string should not be quoted) */ {qstring} { /* Match a quoted string. */ CHECK_MALLOC_DO( yylval->tstring.str = strdup(yytext+1), { TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s", yytext, strerror(errno)); return TOK_LEX_ERROR; /* trig an error in yacc parser */ } ); yylval->tstring.str[strlen(yytext) - 2] = '\0'; yylval->tstring.regex = 0; return TOK_TSTRING; } /* The key words */ (?i:"default_redirect_cache_time") { return TOK_DEFAULT_RCT; } (?i:"to") { return TOK_TO; } (?i:"DONT_CACHE") { return TOK_DONT_CACHE; } (?i:"ALL_SESSION") { return TOK_ALL_SESSION; } (?i:"ALL_REALM") { return TOK_ALL_REALM; } (?i:"REALM_AND_APPLICATION") { return TOK_REALM_AND_APPLICATION; } (?i:"ALL_APPLICATION") { return TOK_ALL_APPLICATION; } (?i:"ALL_HOST") { return TOK_ALL_HOST; } (?i:"ALL_USER") { return TOK_ALL_USER; } (?i:"from.id") { return TOK_FROM_ID; } (?i:"from.realm") { return TOK_FROM_REALM; } (?i:"app") { return TOK_APP; } /* Valid single characters for yyparse */ [:=;] { return yytext[0]; } /* Unrecognized sequence, if it did not match any previous pattern */ [^[:space:]\":=;\n]+ { fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); return TOK_LEX_ERROR; } %% nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_redirect/ard_conf.y000066400000000000000000000311461333553357400256650ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Yacc extension's configuration parser. * See doc/app_redirect.conf.sample for configuration file format */ /* For development only : */ %debug %error-verbose /* The parser receives the configuration file filename as parameter */ %parse-param {char * conffile} /* Keep track of location */ %locations %pure-parser %{ #include "app_redir.h" #include "ard_conf.tab.h" /* bison is not smart enough to define the YYLTYPE before including this code, so... */ /* Forward declaration */ int yyparse(char * conffile); static int rules_added = 0; /* We initialize statically the config */ static struct ard_config local_conf = { .default_rct = 86400, .rules = FD_LIST_INITIALIZER(local_conf.rules) }; struct ard_config * ard_conf = &local_conf; /* We use these lists in the rules parsing */ static struct fd_list temp_list_criteria = FD_LIST_INITIALIZER(temp_list_criteria); static struct fd_list temp_list_target = FD_LIST_INITIALIZER(temp_list_target); /* Local variable */ static struct ard_criteria * c; /* Dump the configuration */ static void ard_conf_dump() { struct fd_list * li; if (!TRACE_BOOL(FULL)) return; fd_log_debug("app_redirect: configuration dump:"); fd_log_debug(" default_redirect_cache_time : %u sec", ard_conf->default_rct); for (li = ard_conf->rules.next; li != &ard_conf->rules; li = li->next) { ard_rule_dump(li->o); } fd_log_debug("app_redirect: end of configuration dump"); } /* Parse the configuration file */ int ard_conf_handle(char * conffile) { extern FILE * ard_confin; int ret; TRACE_ENTRY("%p", conffile); TRACE_DEBUG (FULL, "Parsing configuration file: %s...", conffile); ard_confin = fopen(conffile, "r"); if (ard_confin == NULL) { ret = errno; TRACE_DEBUG(INFO, "Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret)); return ret; } ret = yyparse(conffile); fclose(ard_confin); if (ret != 0) { TRACE_DEBUG (INFO, "Unable to parse the configuration file."); return EINVAL; } else { TRACE_DEBUG(FULL, "Added %d Redirect RULES successfully.", rules_added); ard_conf_dump(); } return 0; } /* The Lex parser prototype */ int ard_conflex(YYSTYPE *lvalp, YYLTYPE *llocp); /* Function to report the errors */ void yyerror (YYLTYPE *ploc, char * conffile, char const *s) { TRACE_DEBUG(INFO, "Error in configuration parsing"); if (ploc->first_line != ploc->last_line) { TRACE_DEBUG (INFO, "%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); } else if (ploc->first_column != ploc->last_column) { TRACE_DEBUG (INFO, "%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); } else { TRACE_DEBUG (INFO, "%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); } } /* Compile a regular expression pattern */ static int compile_regex( regex_t * preg, char * str ) { int err; /* Compile the regular expression */ err = regcomp(preg, str, REG_EXTENDED | REG_NOSUB); if (err != 0) { char * buf; size_t bl; /* Error while compiling the regex */ TRACE_DEBUG(INFO, "Error while compiling the regular expression '%s':", str); /* Get the error message size */ bl = regerror(err, preg, NULL, 0); /* Alloc the buffer for error message */ CHECK_MALLOC( buf = malloc(bl) ); /* Get the error message content */ regerror(err, preg, buf, bl); TRACE_DEBUG(INFO, "\t%s", buf); /* Free the buffer, return the error */ free(buf); return EINVAL; } return 0; } %} /* Values returned by lex for token */ %union { /* returned by lex */ uint32_t u32; /* Store integer values */ struct { char * str; int regex; /* true or false */ } tstring; /* typed string */ } /* In case of error in the lexical analysis */ %token TOK_LEX_ERROR /* A string (malloc'd in lex parser; it must be freed after use):*/ %token TOK_TSTRING /* An integer value */ %token TOK_U32VAL %type rule_type %type rule_duration /* Tokens */ %token TOK_DEFAULT_RCT %token TOK_TO %token TOK_DONT_CACHE %token TOK_ALL_SESSION %token TOK_ALL_REALM %token TOK_REALM_AND_APPLICATION %token TOK_ALL_APPLICATION %token TOK_ALL_HOST %token TOK_ALL_USER %token TOK_FROM_ID %token TOK_FROM_REALM %token TOK_APP /* -------------------------------------- */ %% /* The grammar definition */ conffile: /* empty grammar is OK */ | conffile def_rct | conffile rule ; /* Overwrite default cache time value */ def_rct: TOK_DEFAULT_RCT '=' TOK_U32VAL ';' { ard_conf->default_rct = $3; } ; /* a RULE entry */ rule: rule_type rule_duration ':' criteria_list TOK_TO target_list ';' { struct ard_rule * r; /* Create the new rule with data in file */ CHECK_MALLOC_DO( r = malloc(sizeof(struct ard_rule)), { yyerror (&yylloc, conffile, "Error while allocating new memory..."); YYERROR; } ); memset(r, 0, sizeof(struct ard_rule)); fd_list_init(&r->chain, r); r->type = $1; r->rct = $2; fd_list_init(&r->criteria, NULL); fd_list_move_end(&r->criteria, &temp_list_criteria); fd_list_init(&r->targets, NULL); fd_list_move_end(&r->targets, &temp_list_target); /* Add the new rule in config */ fd_list_insert_before(&ard_conf->rules, &r->chain); rules_added++; } ; rule_type: TOK_DONT_CACHE { $$ = DONT_CACHE; } | TOK_ALL_SESSION { $$ = ALL_SESSION; } | TOK_ALL_REALM { $$ = ALL_REALM; } | TOK_REALM_AND_APPLICATION { $$ = REALM_AND_APPLICATION; } | TOK_ALL_APPLICATION { $$ = ALL_APPLICATION; } | TOK_ALL_HOST { $$ = ALL_HOST; } | TOK_ALL_USER { $$ = ALL_USER; } ; rule_duration: /* empty */ { $$ = 0; } | TOK_U32VAL { $$ = $1; } ; criteria_list: /* empty is OK */ | criteria_list criteria_item; ; criteria_item: { /* Create the new criteria */ CHECK_MALLOC_DO( c = malloc(sizeof(struct ard_criteria)), { yyerror (&yylloc, conffile, "Error while allocating new memory..."); YYERROR; } ); memset(c, 0, sizeof(struct ard_criteria)); fd_list_init(&c->chain, c); } criteria_item_inside { struct fd_list * li; /* If there is a string, save its length */ if (c->s) c->sl = strlen(c->s); /* If the criteria contains a regex, parse it */ if (c->is_regex) { CHECK_FCT_DO( compile_regex( &c->preg, c->s ), { yyerror (&yylloc, conffile, "Error parsing a regular expression..."); YYERROR; } ); } /* Now link this new criteria in the list. Order by criteria type to accelerate the search */ for (li = temp_list_criteria.next; li != &temp_list_criteria; li = li->next) { struct ard_criteria * nc = li->o; if (nc->type >= c->type) break; } fd_list_insert_before(li, &c->chain); } ; criteria_item_inside: TOK_FROM_ID '=' TOK_TSTRING { c->type = FROM_ID; c->s = $3.str; c->is_regex = $3.regex; } | TOK_FROM_REALM '=' TOK_TSTRING { c->type = FROM_REALM; c->s = $3.str; c->is_regex = $3.regex; } | TOK_APP '=' TOK_U32VAL { c->type = APP_ID; c->i = $3; } | TOK_TSTRING '=' TOK_U32VAL { struct dict_object * avp = NULL; if ($1.regex) { yyerror(&yylloc, conffile, "Error: the AVP name cannot be specified as regular expression"); YYERROR; } CHECK_FCT_DO( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME_ALL_VENDORS, $1.str, &avp, ENOENT ), { TRACE_DEBUG(INFO, "Error while searching for AVP '%s'. Did you load the relevant dictionary extensions?", $1.str); yyerror(&yylloc, conffile, "Unable to resolve specified AVP name."); YYERROR; } ); CHECK_FCT_DO( fd_dict_getval(avp, &c->avp_info), { TRACE_DEBUG(INFO, "Error while retrieving the description for AVP '%s'", $1.str); yyerror(&yylloc, conffile, "Unable to retrieve specified AVP's data."); YYERROR; } ); if (c->avp_info.avp_basetype != AVP_TYPE_UNSIGNED32) { TRACE_DEBUG(INFO, "The AVP '%s' is not of type UNSIGNED32, matching is not supported (yet)", $1.str); yyerror(&yylloc, conffile, "Invalid AVP for this operation."); YYERROR; } c->type = AVP_INT; c->i = $3; } | TOK_TSTRING '=' TOK_TSTRING { struct dict_object * avp = NULL; if ($1.regex) { yyerror(&yylloc, conffile, "Error: the AVP name cannot be specified as regular expression"); YYERROR; } CHECK_FCT_DO( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME_ALL_VENDORS, $1.str, &avp, ENOENT ), { TRACE_DEBUG(INFO, "Error while searching for AVP '%s'. Did you load the relevant dictionary extensions?", $1.str); yyerror(&yylloc, conffile, "Unable to resolve specified AVP name."); YYERROR; } ); CHECK_FCT_DO( fd_dict_getval(avp, &c->avp_info), { TRACE_DEBUG(INFO, "Error while retrieving the description for AVP '%s'", $1.str); yyerror(&yylloc, conffile, "Unable to retrieve specified AVP's data."); YYERROR; } ); if (c->avp_info.avp_basetype != AVP_TYPE_OCTETSTRING) { TRACE_DEBUG(INFO, "The AVP '%s' is not of type OCTETSTRING, matching is not supported (yet)", $1.str); yyerror(&yylloc, conffile, "Invalid AVP for this operation."); YYERROR; } c->type = AVP_STR; c->s = $3.str; c->is_regex = $3.regex; } ; target_list: /* This list cannot be empty */ target_item | target_list target_item ; target_item: TOK_TSTRING { struct ard_target * t; if ($1.regex) { yyerror(&yylloc, conffile, "Regular expressions are not allowed in Redirect-Host specification."); YYERROR; } /* Check if the format is valid */ CHECK_FCT_DO( fd_os_parse_DiameterURI((uint8_t *)$1.str, strlen($1.str), NULL, NULL, NULL, NULL, NULL, NULL), { TRACE_DEBUG(INFO, "Error while parsing DiameterURI '%s'", $1.str); yyerror(&yylloc, conffile, "Specified DiameterURI is invalid."); YYERROR; } ); /* Ok. we create the new target */ CHECK_MALLOC_DO( t = malloc(sizeof(struct ard_target)), { yyerror (&yylloc, conffile, "Error while allocating new memory..."); YYERROR; } ); memset(t, 0, sizeof(struct ard_target)); fd_list_init(&t->chain, t); t->s = (os0_t) $1.str; t->l = strlen($1.str); fd_list_insert_before(&temp_list_target, &t->chain); } ; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_redirect/ard_rules.c000066400000000000000000000227751333553357400260540ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "app_redir.h" static const char * redir_type_str[] = { "DONT_CACHE", "ALL_SESSION", "ALL_REALM", "REALM_AND_APPLICATION", "ALL_APPLICATION", "ALL_HOST", "ALL_USER" }; struct dict_object * avp_Redirect_Host = NULL; struct dict_object * avp_Redirect_Host_Usage = NULL; struct dict_object * avp_Redirect_Max_Cache_Time = NULL; void ard_rule_dump(struct ard_rule * r) { struct fd_list * li; fd_log_debug(" rule @%p: %s, %us", r, redir_type_str[r->type], r->rct); for (li = r->criteria.next; li != &r->criteria; li = li->next) { struct ard_criteria * c = li->o; switch (c->type) { case FROM_ID: fd_log_debug(" Criteria: received from peer %s'%s'", c->is_regex?"REGEX":"", c->s); break; case FROM_REALM: fd_log_debug(" Criteria: received from realm %s'%s'", c->is_regex?"REGEX":"", c->s); break; case APP_ID: fd_log_debug(" Criteria: application id is %u", c->i); break; case AVP_INT: fd_log_debug(" Criteria: contains '%s' AVP with value '%d'", c->avp_info.avp_name, c->i); break; case AVP_STR: fd_log_debug(" Criteria: contains '%s' AVP with value %s'%s'", c->avp_info.avp_name, c->is_regex?"REGEX":"", c->s); break; default: fd_log_debug(" Criteria: invalid (%d)!", c->type); } } for (li = r->targets.next; li != &r->targets; li = li->next) { struct ard_target * t = li->o; fd_log_debug(" Redirect to: '%s'", t->s); } } /* Tells if the string in s (is0term or not) matches the string in the criteria (regex or not) */ static int str_match(struct ard_criteria * c, uint8_t *s, size_t l, int is0term, int * match) { TRACE_ENTRY("%p %p %zd %d %p", c, s, l, is0term, match); *match = 0; if (c->is_regex == 0) { if ( ! fd_os_almostcasesrch(c->s, c->sl, s, l, NULL) ) *match = 1; } else { int err; #ifdef HAVE_REG_STARTEND regmatch_t pmatch[1]; memset(pmatch, 0, sizeof(pmatch)); pmatch[0].rm_so = 0; pmatch[0].rm_eo = l; err = regexec(&c->preg, (char *)s, 0, pmatch, REG_STARTEND); #else /* HAVE_REG_STARTEND */ if (!is0term) { /* We have to create a copy of the string in this case */ char *mystrcpy; CHECK_MALLOC( mystrcpy = (char *)os0dup(s, l) ); err = regexec(&c->preg, mystrcpy, 0, NULL, 0); free(mystrcpy); } else { err = regexec(&c->preg, (char *)s, 0, NULL, 0); } #endif /* HAVE_REG_STARTEND */ /* Now check the result */ if (err == 0) { /* We have a match */ *match = 1; } else if (err != REG_NOMATCH) { /* An error occurred */ char * buf; size_t bl; /* Error while compiling the regex */ TRACE_DEBUG(INFO, "Error while executing the regular expression '%s':", c->s); /* Get the error message size */ bl = regerror(err, &c->preg, NULL, 0); /* Alloc the buffer for error message */ CHECK_MALLOC( buf = malloc(bl) ); /* Get the error message content */ regerror(err, &c->preg, buf, bl); TRACE_DEBUG(INFO, "\t%s", buf); /* Free the buffer, return the error */ free(buf); return (err == REG_ESPACE) ? ENOMEM : EINVAL; } } return 0; } /* Search the first matching rule in the config */ static int find_rule(struct msg * msg, struct ard_rule ** found) { struct fd_list * li; struct msg_hdr * mhdr = NULL; struct peer_hdr * phdr = NULL; ASSERT(msg && found); *found = NULL; /* Get the message's header */ CHECK_FCT( fd_msg_hdr(msg, &mhdr) ); /* Get the message's origin */ { DiamId_t id; size_t len; CHECK_FCT( fd_msg_source_get(msg, &id, &len) ); CHECK_FCT( fd_peer_getbyid(id, len, 0, &phdr) ); } /* Now for each rule check if all criteria match */ for (li = ard_conf->rules.next; li != &ard_conf->rules; li = li->next) { struct fd_list * lic; struct ard_rule * r = li->o; int is_match = 1; for (lic = r->criteria.next; is_match && (lic != &r->criteria); lic = lic->next) { struct ard_criteria * c = lic->o; /* Does this criteria match ? */ switch (c->type) { case APP_ID: if (c->i != mhdr->msg_appl) is_match = 0; break; case FROM_ID: CHECK_FCT( str_match(c, (uint8_t *)phdr->info.pi_diamid, phdr->info.pi_diamidlen, 1, &is_match) ); break; case FROM_REALM: if (phdr->info.runtime.pir_realm) { CHECK_FCT( str_match(c, (uint8_t *)phdr->info.runtime.pir_realm, phdr->info.runtime.pir_realmlen, 1, &is_match) ); } else { /* since we don't have the realm it was received from, assume it does not match */ TRACE_DEBUG(INFO, "Missing realm info for peer '%s', skipping rule %p", phdr->info.pi_diamid, r); is_match = 0; } break; case AVP_INT: case AVP_STR: /* We have to search the whole message for the matching AVP */ { is_match = 0; struct avp * avp = NULL; CHECK_FCT( fd_msg_browse(msg, MSG_BRW_FIRST_CHILD, &avp, NULL) ); while (avp && !is_match) { struct avp_hdr * ahdr = NULL; CHECK_FCT( fd_msg_avp_hdr(avp, &ahdr) ); if ( (ahdr->avp_code == c->avp_info.avp_code) && (ahdr->avp_vendor == c->avp_info.avp_vendor) ) /* always 0 if no V flag */ { /* dict-parse this AVP to ensure it has a value */ CHECK_FCT( fd_msg_parse_dict( avp, fd_g_config->cnf_dict, NULL ) ); /* Now check if the value matches our criteria */ if (c->type == AVP_INT) { if (ahdr->avp_value->u32 == c->i) is_match = 1; } else { /* it is AVP_STR */ CHECK_FCT( str_match(c, ahdr->avp_value->os.data, ahdr->avp_value->os.len, 0, &is_match) ); } if (is_match) break; } /* go to next */ CHECK_FCT( fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL) ); } } break; } } if (is_match) { /* We found the first rule that matches for this message */ *found = r; break; } } return 0; } /* The forward callback */ int ard_rule_apply(void * cbdata, struct msg ** msg) { struct ard_rule * rule = NULL; TRACE_ENTRY("%p %p", cbdata, msg); CHECK_PARAMS(msg && *msg); /* First, check if we have a rule that applies to this message */ CHECK_FCT( find_rule(*msg, &rule) ); if (rule) { struct avp * avp; union avp_value val; struct fd_list * li; /* We have to reply a Redirect message in this case */ CHECK_FCT( fd_msg_new_answer_from_req(fd_g_config->cnf_dict, msg, MSGFL_ANSW_ERROR) ); CHECK_FCT( fd_msg_rescode_set( *msg, "DIAMETER_REDIRECT_INDICATION", NULL, NULL, 1 ) ); /* Now add the Redirect-* AVPs */ CHECK_FCT( fd_msg_avp_new( avp_Redirect_Host_Usage, 0, &avp ) ); val.u32 = rule->type; CHECK_FCT( fd_msg_avp_setvalue( avp, &val ) ); CHECK_FCT( fd_msg_avp_add( *msg, MSG_BRW_LAST_CHILD, avp ) ); if (rule->type) { CHECK_FCT( fd_msg_avp_new( avp_Redirect_Max_Cache_Time, 0, &avp ) ); val.u32 = rule->rct ?: ard_conf->default_rct; CHECK_FCT( fd_msg_avp_setvalue( avp, &val ) ); CHECK_FCT( fd_msg_avp_add( *msg, MSG_BRW_LAST_CHILD, avp ) ); } for (li = rule->targets.next; li != &rule->targets; li = li->next) { struct ard_target * t = li->o; CHECK_FCT( fd_msg_avp_new( avp_Redirect_Host, 0, &avp ) ); val.os.data = t->s; val.os.len = t->l; CHECK_FCT( fd_msg_avp_setvalue( avp, &val ) ); CHECK_FCT( fd_msg_avp_add( *msg, MSG_BRW_LAST_CHILD, avp ) ); } /* Send this answer */ CHECK_FCT( fd_msg_send( msg, NULL, NULL) ); } return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_sip/000077500000000000000000000000001333553357400227055ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_sip/CMakeLists.txt000066400000000000000000000017531333553357400254530ustar00rootroot00000000000000# The app_sip extension PROJECT("Diameter SIP Application (RFC4740)" C) FIND_PACKAGE(MySQL REQUIRED) INCLUDE_DIRECTORIES(${MySQL_INCLUDE_DIR}) # Parser files BISON_FILE(app_sip.y) FLEX_FILE(app_sip.l) SET_SOURCE_FILES_PROPERTIES(lex.app_sip.c app_sip.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}") # List of source files SET( DIAM_SIP_SRC lex.app_sip.c app_sip.tab.c app_sip.tab.h app_sip.c app_sip.h libapp_sip.c md5.c multimediaauth.c registrationtermination.c userauthorization.c pushprofile.c serverassignment.c locationinfo.c locationinfosl.c ) # Compile as a module FD_ADD_EXTENSION(app_sip ${DIAM_SIP_SRC}) TARGET_LINK_LIBRARIES(app_sip ${MySQL_LIBRARIES}) SUBDIRS(tools) #### ## INSTALL section ## INSTALL(TARGETS app_sip LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-sip-server) INSTALL(FILES README TODO DESTINATION /usr/share/doc/freeDiameter-sip-server CONFIGURATIONS DebianPackage COMPONENT freeDiameter-sip-server) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_sip/README000066400000000000000000000047221333553357400235720ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ Diameter-SIP Application will be fully compliant with RFC4740 (server part). However, there is still some work to do so it should be considered as experimental for now. nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_sip/TODO000066400000000000000000000056071333553357400234050ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ Diameter-SIP implementation is still under development. TODO List * add in malloc the size of char * when getting results from mysql, check lenght * sort capabilities in LIR/LIA * make functions for database access in MAR/MAA * order diamsip.h because it's becoming a mess ^^ * replace password in MAR/MAA and libdiamsip from table to malloc char! * display errors of mysql * check that all user data inserted in requests are purified * add accounting server uri in database and diamsip * add mutex on mysql writing * check multithreading of mysql! * get destination host in database for RTR and PPR nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_sip/app_sip.c000066400000000000000000000340371333553357400245130ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ #include "app_sip.h" //Diameter-SIP server struct disp_hdl * app_sip_MAR_hdl=NULL; struct disp_hdl * app_sip_LIR_hdl=NULL; struct disp_hdl * app_sip_UAR_hdl=NULL; struct disp_hdl * app_sip_SAR_hdl=NULL; struct disp_hdl * app_sip_PPA_hdl=NULL; struct disp_hdl * app_sip_RTA_hdl=NULL; //Suscriber Locator struct disp_hdl * app_sip_SL_LIR_hdl=NULL; struct disp_hdl * app_sip_default_hdl=NULL; struct session_handler * ds_sess_hdl; //configuration stucture struct as_conf * as_conf=NULL; static struct as_conf app_sip_conf; //dictionary of SIP struct app_sip_dict sip_dict; int app_sip_default_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act) { TRACE_ENTRY("%p %p %p %p %p", msg, avp, sess, opaque, act); return 0; } void dump_config() { TRACE_DEBUG(FULL,"***Configuration of Diameter-SIP extension***"); TRACE_DEBUG(FULL,"# mode: *%d*",as_conf->mode); TRACE_DEBUG(FULL,"# datasource: *%d*",as_conf->datasource); TRACE_DEBUG(FULL,"# mysql_login: *%s*",as_conf->mysql_login); TRACE_DEBUG(FULL,"# mysql_password: *%s*",as_conf->mysql_password); TRACE_DEBUG(FULL,"# mysql_database: *%s*",as_conf->mysql_database); TRACE_DEBUG(FULL,"# mysql_server: *%s*",as_conf->mysql_server); TRACE_DEBUG(FULL,"# mysql_port: *%d*",as_conf->mysql_port); TRACE_DEBUG(FULL,"# mysql_port: *%s*",as_conf->mysql_prefix); TRACE_DEBUG(FULL,"***End of Diameter-SIP configuration extension***"); } static int as_conf_init(void) { as_conf=&app_sip_conf; //memset(app_sip_conf, 0, sizeof(struct as_conf)); return 0; } /* entry point */ int as_entry(char * conffile) { TRACE_ENTRY("%p", conffile); struct dict_object * app=NULL; struct disp_when data; pthread_t rtr_thread, ppr_thread; /* Initialize configuration */ CHECK_FCT( as_conf_init() ); //We parse the configuration file if (conffile != NULL) { CHECK_FCT( as_conf_handle(conffile) ); } else { TRACE_DEBUG(INFO, "We need a configuration file for Diameter-SIP extension. See doc/ for an example."); } //TODO: replace by configuration file!! strcpy(as_conf->mysql_prefix,"as_"); //We can dump the configuration extracted from app_sip.conf //dump_config(); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_APPLICATION, APPLICATION_BY_NAME, "Diameter Session Initiation Protocol (SIP) Application", &app, ENOENT) ); CHECK_FCT( fd_disp_app_support ( app, NULL, 1, 0 ) ); //We set useful AVPs CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Auth-Session-State", &sip_dict.Auth_Session_State, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Auth-Application-Id", &sip_dict.Auth_Application_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Host", &sip_dict.Destination_Host, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Realm", &sip_dict.Destination_Realm, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Session-Id", &sip_dict.Session_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Redirect-Host", &sip_dict.Redirect_Host, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Redirect-Host-Usage", &sip_dict.Redirect_Host_Usage, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Auth-Data-Item", &sip_dict.SIP_Auth_Data_Item, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Authorization", &sip_dict.SIP_Authorization, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Authenticate", &sip_dict.SIP_Authenticate, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Number-Auth-Items", &sip_dict.SIP_Number_Auth_Items, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Authentication-Scheme", &sip_dict.SIP_Authentication_Scheme, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Authentication-Info", &sip_dict.SIP_Authentication_Info, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Server-URI", &sip_dict.SIP_Server_URI, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Server-Capabilities", &sip_dict.SIP_Server_Capabilities, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Mandatory-Capability", &sip_dict.SIP_Mandatory_Capability, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Optional-Capability", &sip_dict.SIP_Optional_Capability, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Method", &sip_dict.SIP_Method, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-AOR", &sip_dict.SIP_AOR, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Deregistration-Reason", &sip_dict.SIP_Deregistration_Reason, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Reason-Code", &sip_dict.SIP_Reason_Code, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Reason-Info", &sip_dict.SIP_Reason_Info, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Accounting-Information", &sip_dict.SIP_Accounting_Information, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Accounting-Server-URI", &sip_dict.SIP_Accounting_Server_URI, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Credit-Control-Server-URI", &sip_dict.SIP_Credit_Control_Server_URI, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Server-Assignment-Type", &sip_dict.SIP_Server_Assignment_Type, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Item-Number", &sip_dict.SIP_Item_Number, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-User-Authorization-Type", &sip_dict.SIP_User_Authorization_Type, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Supported-User-Data-Type", &sip_dict.SIP_Supported_User_Data_Type, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-User-Data", &sip_dict.SIP_User_Data, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-User-Data-Type", &sip_dict.SIP_User_Data_Type, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-User-Data-Contents", &sip_dict.SIP_User_Data_Contents, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-User-Data-Already-Available", &sip_dict.SIP_User_Data_Already_Available, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Visited-Network-Id", &sip_dict.SIP_Visited_Network_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Realm", &sip_dict.Digest_Realm, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-URI", &sip_dict.Digest_URI, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Nonce", &sip_dict.Digest_Nonce, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-CNonce", &sip_dict.Digest_CNonce, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Method", &sip_dict.Digest_Method, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Nonce-Count", &sip_dict.Digest_Nonce_Count, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Realm", &sip_dict.Digest_Realm, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Response", &sip_dict.Digest_Response, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Response-Auth", &sip_dict.Digest_Response_Auth, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Username", &sip_dict.Digest_Username, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Algorithm", &sip_dict.Digest_Algorithm, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-QoP", &sip_dict.Digest_QOP, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "User-Name", &sip_dict.User_Name, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-HA1", &sip_dict.Digest_HA1, ENOENT) ); //Register Application memset(&data, 0, sizeof(data)); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_APPLICATION, APPLICATION_BY_NAME, "Diameter Session Initiation Protocol (SIP) Application", &data.app, ENOENT) ); if(as_conf->mode==1) { // **Command Codes //MAR CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Multimedia-Auth-Request", &data.command, ENOENT) ); CHECK_FCT( fd_disp_register( app_sip_MAR_cb, DISP_HOW_CC, &data, NULL, &app_sip_MAR_hdl ) ); //RTA CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Registration-Termination-Answer", &data.command, ENOENT) ); CHECK_FCT( fd_disp_register( app_sip_RTA_cb, DISP_HOW_CC, &data, NULL, &app_sip_RTA_hdl ) ); //PPA CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Push-Profile-Answer", &data.command, ENOENT) ); CHECK_FCT( fd_disp_register( app_sip_PPA_cb, DISP_HOW_CC, &data, NULL, &app_sip_PPA_hdl ) ); //LIR CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Location-Info-Request", &data.command, ENOENT) ); CHECK_FCT( fd_disp_register( app_sip_LIR_cb, DISP_HOW_CC, &data, NULL, &app_sip_LIR_hdl ) ); //UAR CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "User-Authorization-Request", &data.command, ENOENT) ); CHECK_FCT( fd_disp_register( app_sip_UAR_cb, DISP_HOW_CC, &data, NULL, &app_sip_UAR_hdl ) ); //SAR CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Server-Assignment-Request", &data.command, ENOENT) ); CHECK_FCT( fd_disp_register( app_sip_SAR_cb, DISP_HOW_CC, &data, NULL, &app_sip_SAR_hdl ) ); } if(as_conf->mode==2) { //LIR CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Location-Info-Request", &data.command, ENOENT) ); CHECK_FCT( fd_disp_register( app_sip_SL_LIR_cb, DISP_HOW_CC, &data, NULL, &app_sip_SL_LIR_hdl ) ); } //Callback for unexpected messages CHECK_FCT( fd_disp_register( app_sip_default_cb, DISP_HOW_APPID, &data, NULL, &app_sip_default_hdl ) ); //We start database connection if(start_mysql_connection()) return EINVAL; CHECK_FCT(fd_sess_handler_create(&ds_sess_hdl, (void *)free, NULL, NULL)); //Creation of thread for Registration Termination if(pthread_create(&rtr_thread, NULL,rtr_socket, NULL)) { TRACE_DEBUG(INFO,"Creation of thread failed, abort!"); return EINVAL; } //Creation of thread for Push Profile if(pthread_create(&ppr_thread, NULL,ppr_socket, NULL)) { TRACE_DEBUG(INFO,"Creation of thread failed, abort!"); return EINVAL; } return 0; } //Cleanup callback void fd_ext_fini(void) { //TODO:unregister other callbacks (void) fd_disp_unregister(&app_sip_MAR_hdl, NULL); CHECK_FCT_DO( fd_sess_handler_destroy(&ds_sess_hdl, NULL),return); //We close database connection close_mysql_connection(); TRACE_ENTRY(); return ; } EXTENSION_ENTRY("app_sip", as_entry, "dict_sip"); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_sip/app_sip.h000066400000000000000000000305171333553357400245170ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ #include #include #include #include #include GCC_DIAG_OFF("-Wdeprecated-declarations") #include GCC_DIAG_ON("-Wdeprecated-declarations") #include #include #include "md5.h" #define NONCE_SIZE 16 #define DIGEST_LEN 16 /* Mode for the extension */ #define MODE_DSSERVER 0x1 #define MODE_SL 0x2 //Redirect_Host_Usage #define ALL_USER 6 /* The module configuration */ struct as_conf { int mode; /* default MODE_DSSERVER | MODE_SL */ enum {ASMYSQL} datasource; char * mysql_login; char * mysql_password; char * mysql_database; char * mysql_server; char mysql_prefix[10]; //default: as_ uint16_t mysql_port; //if 0, default port will be used uint16_t rtr_port; uint16_t ppr_port; }; extern struct as_conf * as_conf; /* Parse the configuration file */ int as_conf_handle(char * conffile); extern MYSQL *conn; void calc_md5(char *buffer, char * data); void clear_digest(uint8_t * digest, char * readable_digest, int digestlength); struct avp_hdr * walk_digest(struct avp *avp, int avp_code); //MySQL part int start_mysql_connection(); void request_mysql(char *query); void close_mysql_connection(); int get_sipserver_uri(const unsigned char *sip_aor, const size_t sipaorlen, unsigned char ** sipserver_uri, size_t *sipserverurilen); int exist_username(const unsigned char *sip_aor, const size_t sipaorlen); int get_sipserver_cap(const unsigned char *sip_aor, const size_t sipaorlen, struct avp **capabilities); int get_password(const unsigned char *username, const size_t usernamelen, char *password); int check_sipaor(const unsigned char *username, const size_t usernamelen, const char * sip_aor,const size_t sipaorlen); int add_user_datatype(const unsigned char *sip_aor, const size_t sipaorlen,struct msg *message); int set_pending_flag(const unsigned char *username, const size_t usernamelen); int clear_pending_flag(const unsigned char *username, const size_t usernamelen); int set_real_sipserver_uri(const unsigned char *username, const size_t usernamelen, const unsigned char *sipserver_uri,const size_t sipserverurilen); int set_sipserver_uri(const unsigned char *username, const size_t usernamelen, const unsigned char *sipserver_uri,const size_t sipserverurilen); //int get_sipserver_uri(const unsigned char *sip_aor, const size_t sipaorlen, unsigned char ** sipserver_uri, size_t *sipserverurilen); int allow_roaming(const unsigned char *username, const size_t usernamelen, const char * network,const size_t networklen); int get_diameter_uri(const unsigned char *sip_aor, const size_t sipaorlen, char ** diameter_uri, size_t *diameterurilen); //count functions int count_avp(struct msg * message, int code, int vendor); void DigestCalcHA1(char * pszAlg,char * pszUserName,char * pszRealm,char * pszPassword,char * pszNonce,char * pszCNonce,HASHHEX SessionKey); void DigestCalcResponse(HASHHEX HA1,char * pszNonce,char * pszNonceCount,char * pszCNonce,char * pszQop,char * pszMethod,char * pszDigestUri,HASHHEX HEntity,HASHHEX Response); void DigestCalcResponseAuth(HASHHEX HA1,char * pszNonce,char * pszNonceCount,char * pszCNonce,char * pszQop,char * pszMethod,char * pszDigestUri,HASHHEX HEntity,HASHHEX Response); int fd_avp_search_avp ( struct avp * groupedavp, struct dict_object * what, struct avp ** avp ); //thread procedure void *rtr_socket(void *); void *ppr_socket(void *); struct rtrsipaor { char username[200]; char sip_aor1[200]; char sip_aor2[200]; char sip_aor3[200]; char strreason[200]; char desthost[200]; int reason; }; struct pprsipaor { char username[200]; char datatype1[255]; char datatype2[255]; char datatype3[255]; int accounting; }; int app_sip_RTR_cb(struct rtrsipaor *structure); int app_sip_PPR_cb(struct pprsipaor *structure); int ds_entry(); void fd_ext_fini(void); int app_sip_default_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act); int app_sip_MAR_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act); int app_sip_RTA_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act); int app_sip_PPA_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act); int app_sip_LIR_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act); int app_sip_UAR_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act); int app_sip_SAR_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act); //Suscriber Locator int app_sip_SL_LIR_cb( struct msg ** msg, struct avp * paramavp, struct session * sess, void * opaque, enum disp_action * act); //int app_sip_SL_SAR_cb( struct msg ** msg, struct avp * paramavp, struct session * sess, void * opaque, enum disp_action * act); #define SQL_GETPASSWORD "SELECT `password` FROM ds_users WHERE `username` ='%s'" #define SQL_GETPASSWORD_LEN sizeof(SQL_GETPASSWORD)-2 //username by SIP-AOR #define SQL_GETUSERNAME "SELECT `username` FROM ds_users, ds_sip_aor WHERE `sip_aor` ='%s' AND `ds_sip_aor`.`id_user` = `ds_users`.`id_user`" #define SQL_GETUSERNAME_LEN sizeof(SQL_GETUSERNAME)-2 //sip server uri by username #define SQL_GETSIPURI "SELECT `sip_server_uri` FROM ds_users WHERE `username` ='%s'" #define SQL_GETSIPURI_LEN sizeof(SQL_GETSIPURI)-2 //sip server uri by SIP-AOR #define SQL_GETSIPSERURI "SELECT `ds_sip_aor`.`sip_server_uri` FROM ds_users, ds_sip_aor WHERE `sip_aor` ='%s' AND `ds_sip_aor`.`id_user` = `ds_users`.`id_user`" #define SQL_GETSIPSERURI_LEN sizeof(SQL_GETSIPSERURI)-2 //sip capabilities for a SIP-AOR #define SQL_GETSIPSERCAP "SELECT `compulsory`,`id_service` FROM ds_user_services, ds_sip_aor WHERE `sip_aor` ='%s' AND `ds_sip_aor`.`id_user` = `ds_user_services`.`id_user`" #define SQL_GETSIPSERCAP_LEN sizeof(SQL_GETSIPSERCAP)-2 //user data for a user data supported #define SQL_GETSIPDATA "SELECT `label_type`,`data` FROM ds_sip_aor, ds_user_data, ds_data_types WHERE `sip_aor` ='%s' AND `ds_sip_aor`.`id_sip_aor` = `ds_user_data`.`id_sip_aor` AND `ds_data_types`.`id_data_type`=`ds_user_data`.`id_data_type`" #define SQL_GETSIPDATA_LEN sizeof(SQL_GETSIPDATA)-2 #define SQL_GETDIAMURI "SELECT `sipserver_uri` FROM ds_sip_aor_map WHERE `sip_aor` ='%s'" #define SQL_GETDIAMURI_LEN sizeof(SQL_GETDIAMURI)-2 //networks for this user #define SQL_GETUSERNET "SELECT `label_network` FROM ds_users, ds_user_networks, ds_networks WHERE `ds_users`.`username` ='%s' AND `ds_user_networks`.`id_user` = `ds_users`.`id_user` AND `ds_user_networks`.`id_network` = `ds_networks`.`id_network`" #define SQL_GETUSERNET_LEN sizeof(SQL_GETUSERNET)-2 #define SQL_SETSIPURI "UPDATE ds_users SET `temp_sip_server_uri`='%s' WHERE `username` ='%s'" #define SQL_SETSIPURI_LEN sizeof(SQL_SETSIPURI)-4 //TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO #define SQL_RMSIPURI "UPDATE ds_users SET `temp_sip_server_uri`='', `sip_server_uri`='' WHERE `id_user` ='%s'" #define SQL_RMSIPURI_LEN sizeof(SQL_RMSIPURI)-2 //TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO TODO #define SQL_SETREALSIPURI "UPDATE ds_users SET `sip_server_uri`='%s' WHERE `username` ='%s'" #define SQL_SETREALSIPURI_LEN sizeof(SQL_SETREALSIPURI)-4 #define SQL_SETFLAG "UPDATE ds_users SET `authentication_pending`=1 WHERE `username` ='%s'" #define SQL_SETFLAG_LEN sizeof(SQL_SETFLAG)-2 #define SQL_CLEARFLAG "UPDATE ds_users SET `authentication_pending`=0, `registrated`=1 WHERE `username` ='%s'" #define SQL_CLEARFLAG_LEN sizeof(SQL_CLEARFLAG)-2 #define SQL_GETSIPAOR "SELECT `sip_aor` FROM `ds_sip_aor`, `ds_users` WHERE `ds_sip_aor`.`id_user` = `ds_users`.`id_user` AND `ds_users`.`username` = '%s'" #define SQL_GETSIPAOR_LEN sizeof(SQL_GETSIPAOR)-2 //#define SQL_CLEARFLAG "UPDATE ds_users SET `authentication_pending`=0 WHERE `username` ='%s'" //#define SQL_CLEARFLAG_LEN 67 extern struct session_handler * ds_sess_hdl; //AVP code #define CODE_SIP_USER_DATA_TYPE 388 #define CODE_SIP_AOR 122 //Storage for some useful AVPs struct app_sip_dict{ struct dict_object * Auth_Session_State; struct dict_object * Auth_Application_Id; struct dict_object * Destination_Host; struct dict_object * Destination_Realm; struct dict_object * User_Name; struct dict_object * Session_Id; struct dict_object * Redirect_Host; struct dict_object * Redirect_Host_Usage; struct dict_object * SIP_Auth_Data_Item; struct dict_object * SIP_Accounting_Information; struct dict_object * SIP_Accounting_Server_URI; struct dict_object * SIP_Credit_Control_Server_URI; struct dict_object * SIP_Server_Assignment_Type; struct dict_object * SIP_Item_Number; struct dict_object * SIP_User_Authorization_Type; struct dict_object * SIP_Supported_User_Data_Type; struct dict_object * SIP_User_Data; struct dict_object * SIP_User_Data_Type; struct dict_object * SIP_User_Data_Contents; struct dict_object * SIP_User_Data_Already_Available; struct dict_object * SIP_Visited_Network_Id; struct dict_object * SIP_Authorization; struct dict_object * SIP_Authenticate; struct dict_object * SIP_Number_Auth_Items; struct dict_object * SIP_Authentication_Scheme; struct dict_object * SIP_Authentication_Info; struct dict_object * SIP_Server_URI; struct dict_object * SIP_Server_Capabilities; struct dict_object * SIP_Mandatory_Capability; struct dict_object * SIP_Optional_Capability; struct dict_object * SIP_Method; struct dict_object * SIP_AOR; struct dict_object * SIP_Deregistration_Reason; struct dict_object * SIP_Reason_Code; struct dict_object * SIP_Reason_Info; struct dict_object * Digest_URI; struct dict_object * Digest_Nonce; struct dict_object * Digest_Nonce_Count; struct dict_object * Digest_CNonce; struct dict_object * Digest_Realm; struct dict_object * Digest_Response; struct dict_object * Digest_Response_Auth; struct dict_object * Digest_Username; struct dict_object * Digest_Method; struct dict_object * Digest_QOP; struct dict_object * Digest_Algorithm; struct dict_object * Digest_HA1; }; extern struct app_sip_dict sip_dict; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_sip/app_sip.l000066400000000000000000000116651333553357400245260ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * Based on ta_conf.l (Sebastien Decugis ) * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ %{ #include "app_sip.h" /* Include yacc tokens definitions */ #include "app_sip.tab.h" /* Update the column information */ #define YY_USER_ACTION { \ yylloc->first_column = yylloc->last_column + 1; \ yylloc->last_column = yylloc->first_column + yyleng - 1; \ } /* Avoid warning with newer flex */ #define YY_NO_INPUT %} %option bison-bridge bison-locations %option noyywrap %option nounput %% /* Update the line count */ \n { yylloc->first_line++; yylloc->last_line++; yylloc->last_column=0; } /* Eat all spaces but not new lines */ ([[:space:]]{-}[\n])+ ; /* Eat all comments */ #.*$ ; /* Recognize any integer */ [-]?[[:digit:]]+ { /* Convert this to an integer value */ int ret=0; ret = sscanf(yytext, "%i", &yylval->integer); if (ret != 1) { /* No matching: an error occurred */ fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); return LEX_ERROR; /* trig an error in yacc parser */ /* Maybe we could REJECT instead of failing here? */ } return INTEGER; } /* Recognize quoted strings -- we do not support escaped \" in the string currently. */ \"[^\"]+\" { /* Match a quoted string. Let's be very permissive. */ yylval->string = strdup(yytext+1); if (!yylval->string) { fd_log_debug("Unable to copy the string '%s': %s", yytext, strerror(errno)); TRACE_DEBUG(INFO, "strdup failed"); return LEX_ERROR; /* trig an error in yacc parser */ } yylval->string[strlen(yytext) - 2] = '\0'; return QSTRING; } /* Recognize the tokens */ (?i:"mysql_login") { return ASMYSQL_LOGIN; } (?i:"mysql_password") { return ASMYSQL_PASSWORD; } (?i:"mysql_database") { return ASMYSQL_DATABASE; } (?i:"mysql_server") { return ASMYSQL_SERVER; } (?i:"mysql_port") { return ASMYSQL_PORT; } (?i:"rtr_port") { return RTR_PORT; } (?i:"ppr_port") { return PPR_PORT; } (?i:"mode") { return MODE; } (?i:"datasource") { return DATASOURCE; } (?i:"mysql") { yylval->integer = ASMYSQL; return INTEGER; } (?i:"dsserver") { yylval->integer = MODE_DSSERVER; return INTEGER; } (?i:"sl") { yylval->integer = MODE_SL; return INTEGER; } /* Valid single characters for yyparse */ [=;] { return yytext[0]; } /* Unrecognized sequence, if it did not match any previous pattern */ [^[:space:]"*=>;\n]+ { fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); return LEX_ERROR; } %% nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_sip/app_sip.y000066400000000000000000000137571333553357400245470ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * Based on ta_conf.y (Sebastien Decugis ) * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ /* For development only : */ %debug %error-verbose /* The parser receives the configuration file filename as parameter */ %parse-param {char * conffile} /* Keep track of location */ %locations %pure-parser %{ #include "app_sip.h" #include "app_sip.tab.h" /* bison is not smart enough to define the YYLTYPE before including this code, so... */ #include #include /* Forward declaration */ int yyparse(char * conffile); /* Parse the configuration file */ int as_conf_handle(char * conffile) { extern FILE * app_sipin; int ret; TRACE_ENTRY("%p", conffile); TRACE_DEBUG (FULL, "Parsing configuration file: %s...", conffile); app_sipin = fopen(conffile, "r"); if (app_sipin == NULL) { ret = errno; fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret)); TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file."); return ret; } ret = yyparse(conffile); fclose(app_sipin); if (ret != 0) { TRACE_DEBUG (INFO, "Unable to parse the configuration file."); return EINVAL; } return 0; } /* The Lex parser prototype */ int app_siplex(YYSTYPE *lvalp, YYLTYPE *llocp); /* Function to report the errors */ void yyerror (YYLTYPE *ploc, char * conffile, char const *s) { TRACE_DEBUG(INFO, "Error in configuration parsing"); if (ploc->first_line != ploc->last_line) fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); else if (ploc->first_column != ploc->last_column) fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); else fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); } %} /* Values returned by lex for token */ %union { char *string; /* The string is allocated by strdup in lex.*/ int integer; /* Store integer values */ } /* In case of error in the lexical analysis */ %token LEX_ERROR /* Key words */ %token MODE %token DATASOURCE %token ASMYSQL_LOGIN %token ASMYSQL_PASSWORD %token ASMYSQL_DATABASE %token ASMYSQL_SERVER %token ASMYSQL_PORT %token RTR_PORT %token PPR_PORT /* Tokens and types for routing table definition */ /* A (de)quoted string (malloc'd in lex parser; it must be freed after use) */ %token QSTRING /* An integer value */ %token INTEGER /* -------------------------------------- */ %% /* The grammar definition */ conffile: /* empty grammar is OK */ | conffile mode | conffile datasource | conffile mysql_login | conffile mysql_password | conffile mysql_database | conffile mysql_server | conffile mysql_port | conffile rtr_port | conffile ppr_port ; mode: MODE '=' INTEGER ';' { as_conf->mode = $3; } ; datasource: DATASOURCE '=' INTEGER ';' { as_conf->datasource = $3; } ; mysql_login: ASMYSQL_LOGIN '=' QSTRING ';' { free(as_conf->mysql_login); as_conf->mysql_login = $3; } ; mysql_password: ASMYSQL_PASSWORD '=' QSTRING ';' { free(as_conf->mysql_password); as_conf->mysql_password = $3; } ; mysql_database: ASMYSQL_DATABASE '=' QSTRING ';' { free(as_conf->mysql_database); as_conf->mysql_database = $3; } ; mysql_server: ASMYSQL_SERVER '=' QSTRING ';' { free(as_conf->mysql_server); as_conf->mysql_server = $3; } ; mysql_port: ASMYSQL_PORT '=' INTEGER ';' { as_conf->mysql_port = (uint16_t)$3; } ; rtr_port: RTR_PORT '=' INTEGER ';' { as_conf->rtr_port = (uint16_t)$3; } ; ppr_port: PPR_PORT '=' INTEGER ';' { as_conf->ppr_port = (uint16_t)$3; } ; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_sip/libapp_sip.c000066400000000000000000000656111333553357400252040ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ //#include #include "app_sip.h" MYSQL *conn; void clear_digest(uint8_t * digest, char * readable_digest, int digestlength) { int i=0; for(i=0;iavp_code == dictdata.avp_code) && (nextavphdr->avp_vendor == dictdata.avp_vendor) ) // always 0 if no Vendor flag { break; } // Otherwise move to next AVP in the grouped AVP CHECK_FCT( fd_msg_browse(nextavp, MSG_BRW_NEXT, (void *)&nextavp, NULL) ); if(nextavp!=NULL) { CHECK_FCT( fd_msg_avp_hdr( nextavp, &nextavphdr ) ); } else nextavphdr=NULL; } if (avp) *avp = nextavp; if (avp && nextavp) { struct dictionary * dict; CHECK_FCT( fd_dict_getdict( what, &dict) ); CHECK_FCT_DO( fd_msg_parse_dict( nextavp, dict, NULL ), ); } if (avp || nextavp) return 0; else return ENOENT; } struct avp_hdr *walk_digest(struct avp *avp, int avp_code) { struct avp_hdr *temphdr=NULL; CHECK_FCT_DO(fd_msg_browse ( avp, MSG_BRW_WALK, &avp, NULL),return NULL); while(avp!=NULL) { CHECK_FCT_DO( fd_msg_avp_hdr( avp,&temphdr ),return NULL); if(temphdr->avp_code==avp_code) { //We found the AVP so we set avp to NULL to exit the loop avp=NULL; return temphdr; } else if(temphdr->avp_code==380)//SIP-Authorization AVP { //We didn't found the AVP but we finished browsing the Authentication AVP avp=NULL; temphdr=NULL; return temphdr; } else { CHECK_FCT_DO(fd_msg_browse ( avp, MSG_BRW_WALK, &avp, NULL),return NULL); temphdr=NULL; } } return temphdr; } int start_mysql_connection() { conn = mysql_init(NULL); mysql_options(conn, MYSQL_OPT_RECONNECT, "true"); if (!mysql_real_connect(conn, as_conf->mysql_server,as_conf->mysql_login, as_conf->mysql_password, as_conf->mysql_database, as_conf->mysql_port, NULL, 0)) {//TODO: display error from mysql TRACE_DEBUG(INFO,"Unable to connect to database (%s) with login:%s",as_conf->mysql_database,as_conf->mysql_login); return 1; } return 0; } void request_mysql(char *query) { //We check if the connection is still up mysql_ping(conn); if (mysql_query(conn, query)) { TRACE_DEBUG(INFO,"Query %s failed", query); } } void close_mysql_connection() { mysql_close(conn); } //If password is null, we just verify this user exist //We don't need the password length because it is a table' int get_password(const unsigned char *username, const size_t usernamelen, char *password) { CHECK_PARAMS(username && usernamelen); int not_found=2; size_t querylen, usernamepurelen; char *query, *username_pure; switch(as_conf->datasource) { //MySQL case ASMYSQL: //We allocate the double size of username because at worst it can be all quotes username_pure=malloc(usernamelen*2+1); //We purify username not to have forbidden characters usernamepurelen=mysql_real_escape_string(conn, username_pure, (const char *)username, usernamelen); //We copy username in query querylen=SQL_GETPASSWORD_LEN + usernamepurelen; query = malloc(querylen+2); snprintf(query, querylen+1, SQL_GETPASSWORD, username_pure); MYSQL_RES *res; MYSQL_ROW row; //We make the query request_mysql(query); res=mysql_use_result(conn); if(res==NULL) { if(password!=NULL) password[0]='\0'; free(query); return 2; } while ((row = mysql_fetch_row(res)) != NULL) { if(strlen(row[0])>0) { if(password!=NULL) strcpy(password,row[0]); not_found=0; break; } } mysql_free_result(res); free(query); break; } return not_found; } int check_sipaor(const unsigned char *username, const size_t usernamelen, const char * sip_aor,const size_t sipaorlen) { CHECK_PARAMS(username && usernamelen && sip_aor && sipaorlen); int not_found=2; size_t querylen, usernamepurelen; char *query, *username_pure; switch(as_conf->datasource) { //MySQL case ASMYSQL: //We allocate the double size of username because at worst it can be all quotes username_pure=malloc(usernamelen*2+1); //We purify username not to have forbidden characters usernamepurelen=mysql_real_escape_string(conn, username_pure, (const char *)username, usernamelen); //We get the list of AOR owned by this user querylen=SQL_GETSIPAOR_LEN + usernamepurelen; query = malloc(querylen+2); snprintf(query, querylen+1, SQL_GETSIPAOR, username_pure); MYSQL_RES *res; MYSQL_ROW row; //We make the query request_mysql(query); res=mysql_use_result(conn); if(res==NULL) { free(query); return 2; } not_found=1; while ((row = mysql_fetch_row(res)) != NULL) { if(strncmp((const char *)sip_aor,row[0],sipaorlen)==0) { not_found=0; break; } } mysql_free_result(res); free(query); break; } return not_found; } int get_diameter_uri(const unsigned char *sip_aor, const size_t sipaorlen, char ** diameter_uri, size_t *diameterurilen) { CHECK_PARAMS(sip_aor && sipaorlen); size_t querylen, sipaorpurelen; char *query, *sipaor_pure; int not_found=2; //a sip aor must begin by "sip:" or "sips:" so it must at least be longer than 4 chars if(sipaorlen<5) return 2; //NOTE: each method has to purify sip_aor itself. You must remove quotes or special chars for security switch(as_conf->datasource) { //MySQL case ASMYSQL: querylen=SQL_GETDIAMURI_LEN + sipaorlen; //We allocate the double size of SIP-URI because at worst it can be all quotes CHECK_MALLOC(sipaor_pure=malloc(sipaorlen*2+1)); //We purify SIP-URI not to have forbidden characters sipaorpurelen=mysql_real_escape_string(conn, sipaor_pure, (const char *)sip_aor, sipaorlen); query = malloc(querylen+sipaorpurelen+ 2); snprintf(query, querylen+1, SQL_GETDIAMURI, sipaor_pure); MYSQL_RES *res; MYSQL_ROW row; //We make the query request_mysql(query); res=mysql_use_result(conn); if(res==NULL) { //We couldn't make the request diameter_uri=NULL; return 2; } while ((row = mysql_fetch_row(res)) != NULL) { *diameterurilen=strlen(row[0]); if(*diameterurilen>0) { CHECK_MALLOC(*diameter_uri=malloc(*diameterurilen+1)); strcpy(*diameter_uri,row[0]); not_found=0; break; } } mysql_free_result(res); free(query); free(sipaor_pure); break; default: //We must never go here, if so, we must stop diameter_sip diameter_uri=NULL; return 2; break; } //0 if it was found return not_found; } int exist_username(const unsigned char *sip_aor, const size_t sipaorlen) { CHECK_PARAMS(sip_aor && sipaorlen); size_t querylen, sipaorpurelen; char *query, *sipaor_pure; int not_found=1; //a sip aor must begin by "sip:" or "sips:" so it must at least be longer than 4 chars if(sipaorlen<5) return 2; //NOTE: each method has to purify sip_aor itself. You must remove quotes or special chars for security switch(as_conf->datasource) { //MySQL case ASMYSQL: querylen=SQL_GETUSERNAME_LEN + sipaorlen; //We allocate the double size of SIP-URI because at worst it can be all quotes CHECK_MALLOC(sipaor_pure=malloc(sipaorlen*2+1)); //We purify SIP-URI not to have forbidden characters sipaorpurelen=mysql_real_escape_string(conn, sipaor_pure, (const char *)sip_aor, sipaorlen); query = malloc(querylen+sipaorpurelen+ 2); snprintf(query, querylen+1, SQL_GETUSERNAME, sipaor_pure); MYSQL_RES *res; MYSQL_ROW row; //We make the query request_mysql(query); res=mysql_use_result(conn); if(res==NULL) { //We couldn't make the request return 2; } while ((row = mysql_fetch_row(res)) != NULL) { if(strlen(row[0])>0) { not_found=0; break; } } mysql_free_result(res); free(query); free(sipaor_pure); break; default: //We must never go here, if so, we must stop diameter_sip TRACE_DEBUG(INFO,"FATAL ERROR: the datasource is unknown, please check your config file!"); return 2; break; } //0 if it was found return not_found; } //We check if this user can go in the given network int allow_roaming(const unsigned char *username, const size_t usernamelen, const char * network,const size_t networklen) { CHECK_PARAMS(username && usernamelen && network && networklen); int not_found=2; size_t querylen, usernamepurelen; char *query, *username_pure; switch(as_conf->datasource) { //MySQL case ASMYSQL: //We allocate the double size of username because at worst it can be all quotes username_pure=malloc(usernamelen*2+1); //We purify username not to have forbidden characters usernamepurelen=mysql_real_escape_string(conn, username_pure, (const char *)username, usernamelen); //We get the list of AOR owned by this user querylen=SQL_GETUSERNET_LEN + usernamepurelen; query = malloc(querylen+2); snprintf(query, querylen+1, SQL_GETUSERNET, username_pure); MYSQL_RES *res; MYSQL_ROW row; //We make the query request_mysql(query); res=mysql_use_result(conn); if(res==NULL) { free(query); return 2; } not_found=1; while ((row = mysql_fetch_row(res)) != NULL) { if(strncmp((const char *)network,row[0],networklen)==0) { not_found=0; break; } } mysql_free_result(res); free(query); break; } return not_found; } //SIP-Server-Capabilities for the SIP-AOR int get_sipserver_cap(const unsigned char *sip_aor, const size_t sipaorlen, struct avp **capabilities) { CHECK_PARAMS(sip_aor && sipaorlen && capabilities); size_t querylen, sipaorpurelen; char *query, *sipaor_pure; int not_found=2; union avp_value value; struct avp *avp; //a sip aor must begin by "sip:" or "sips:" so it must at least be longer than 4 chars if(sipaorlen<5) return 2; //NOTE: each method has to purify sip_aor itself. You must remove quotes or special chars for security switch(as_conf->datasource) { //MySQL case ASMYSQL: querylen=SQL_GETSIPSERCAP_LEN + sipaorlen; //We allocate the double size of SIP-URI because at worst it can be all quotes CHECK_MALLOC(sipaor_pure=malloc(sipaorlen*2+1)); //We purify SIP-URI not to have forbidden characters sipaorpurelen=mysql_real_escape_string(conn, sipaor_pure, (const char *)sip_aor, sipaorlen); query = malloc(querylen+sipaorpurelen+ 2); snprintf(query, querylen+1, SQL_GETSIPSERCAP, sipaor_pure); MYSQL_RES *res; MYSQL_ROW row; //We make the query request_mysql(query); res=mysql_use_result(conn); if(res==NULL) { //We couldn't make the request return 2; } not_found=1; while ((row = mysql_fetch_row(res)) != NULL) { if(atoi(row[0])==1) {//mandatory CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Mandatory_Capability, 0, &avp ) ); value.i32=(uint32_t)atoi(row[1]); CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *capabilities, MSG_BRW_LAST_CHILD, avp) ); } else {//optional CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Optional_Capability, 0, &avp ) ); value.i32=(uint32_t)atoi(row[1]); CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( *capabilities, MSG_BRW_LAST_CHILD, avp) ); } not_found=0; } mysql_free_result(res); free(query); free(sipaor_pure); break; default: //We must never go here, if so, we must stop diameter_sip TRACE_DEBUG(INFO,"FATAL ERROR: the datasource is unknown, please check your config file!"); return 2; break; } //0 if it was found return not_found; } //We retrieve datatype int add_user_datatype(const unsigned char *sip_aor, const size_t sipaorlen,struct msg *message) { CHECK_PARAMS(sip_aor && sipaorlen && message ); size_t querylen, sipaorpurelen; char *query, *sipaor_pure; int not_found=2; union avp_value value; struct avp *avp, *rootavp; unsigned long *length; //a sip aor must begin by "sip:" or "sips:" so it must at least be longer than 4 chars if(sipaorlen<5) return 2; //NOTE: each method has to purify sip_aor itself. You must remove quotes or special chars for security switch(as_conf->datasource) { //MySQL case ASMYSQL: querylen=SQL_GETSIPDATA_LEN + sipaorlen; //We allocate the double size of SIP-URI because at worst it can be all quotes CHECK_MALLOC(sipaor_pure=malloc(sipaorlen*2+1)); //We purify SIP-URI not to have forbidden characters sipaorpurelen=mysql_real_escape_string(conn, sipaor_pure, (const char *)sip_aor, sipaorlen); query = malloc(querylen+sipaorpurelen+ 2); snprintf(query, querylen+1, SQL_GETSIPDATA, sipaor_pure); MYSQL_RES *res; MYSQL_ROW row; //We make the query request_mysql(query); res=mysql_use_result(conn); if(res==NULL) { //We couldn't make the request return 2; } not_found=1; while ((row = mysql_fetch_row(res)) != NULL) { length=mysql_fetch_lengths(res); if(strlen(row[0])>1) { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_User_Data, 0, &rootavp ) ); CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_User_Data_Type, 0, &avp ) ); CHECK_MALLOC(value.os.data=malloc(length[0]*sizeof(unsigned char))); strncpy((char *)value.os.data,(char *)row[0],length[0]); value.os.len=(size_t)length[0]; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( rootavp, MSG_BRW_LAST_CHILD, avp) ); CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_User_Data_Contents, 0, &avp ) ); CHECK_MALLOC(value.os.data=malloc(length[1]*sizeof(unsigned char))); memcpy(value.os.data,row[1],length[1]); value.os.len=(size_t)length[1]; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( rootavp, MSG_BRW_LAST_CHILD, avp) ); //We add SIP_User_Data to message CHECK_FCT( fd_msg_avp_add ( message, MSG_BRW_LAST_CHILD, rootavp) ); not_found=0; } } mysql_free_result(res); free(query); free(sipaor_pure); break; default: //We must never go here, if so, we must stop diameter_sip TRACE_DEBUG(INFO,"FATAL ERROR: the datasource is unknown, please check your config file!"); return 2; break; } //0 if it was found return not_found; } int set_pending_flag(const unsigned char *username, const size_t usernamelen) { CHECK_PARAMS(username && usernamelen); size_t querylen, usernamepurelen; char *query, *username_pure; switch(as_conf->datasource) { //MySQL case ASMYSQL: //We allocate the double size of username because at worst it can be all quotes username_pure=malloc(usernamelen*2+1); //We purify username not to have forbidden characters usernamepurelen=mysql_real_escape_string(conn, username_pure, (const char *)username, usernamelen); //We clear the flag "authentication pending" querylen=SQL_SETFLAG_LEN + usernamepurelen; query = malloc(querylen+2); snprintf(query, querylen+1, SQL_SETFLAG, username_pure); if (mysql_query(conn, query)) { TRACE_DEBUG(INFO,"Query %s failed", query); free(query); return 2; } free(query); break; } return 0; } int clear_pending_flag(const unsigned char *username, const size_t usernamelen) { CHECK_PARAMS(username && usernamelen); size_t querylen, usernamepurelen; char *query, *username_pure; switch(as_conf->datasource) { //MySQL case ASMYSQL: //We allocate the double size of username because at worst it can be all quotes username_pure=malloc(usernamelen*2+1); //We purify username not to have forbidden characters usernamepurelen=mysql_real_escape_string(conn, username_pure, (const char *)username, usernamelen); //We clear the flag "authentication pending" querylen=SQL_CLEARFLAG_LEN + usernamepurelen; query = malloc(querylen+2); snprintf(query, querylen+1, SQL_CLEARFLAG, username_pure); if (mysql_query(conn, query)) { TRACE_DEBUG(INFO,"Query %s failed", query); free(query); return 2; } free(query); break; } return 0; } int set_sipserver_uri(const unsigned char *username, const size_t usernamelen, const unsigned char *sipserver_uri,const size_t sipserverurilen) { CHECK_PARAMS(username && usernamelen && sipserver_uri && sipserverurilen); size_t querylen, usernamepurelen, sipserveruripurelen; char *query, *username_pure, *sipserveruri_pure; switch(as_conf->datasource) { //MySQL case ASMYSQL: //We allocate the double size of username because at worst it can be all quotes username_pure=malloc(usernamelen*2+1); //We purify username not to have forbidden characters usernamepurelen=mysql_real_escape_string(conn, username_pure, (const char *)username, usernamelen); //We allocate the double size of username because at worst it can be all quotes sipserveruri_pure=malloc(sipserverurilen*2+1); //We purify username not to have forbidden characters sipserveruripurelen=mysql_real_escape_string(conn, sipserveruri_pure, (const char *)sipserver_uri, sipserverurilen); //We clear the flag "authentication pending" querylen=SQL_SETSIPURI_LEN + usernamepurelen + sipserveruripurelen; query = malloc(querylen+2); snprintf(query, querylen+1, SQL_SETSIPURI, sipserveruri_pure,username_pure); if (mysql_query(conn, query)) { TRACE_DEBUG(INFO,"Query %s failed", query); free(query); return 2; } free(query); break; } return 0; } int remove_sipserver_uri(const unsigned char *sipserver_uri,const size_t sipserverurilen) { CHECK_PARAMS(sipserver_uri && sipserverurilen); size_t querylen, sipserveruripurelen; char *query, *sipserveruri_pure; switch(as_conf->datasource) { //MySQL case ASMYSQL: //We allocate the double size of username because at worst it can be all quotes sipserveruri_pure=malloc(sipserverurilen*2+1); //We purify username not to have forbidden characters sipserveruripurelen=mysql_real_escape_string(conn, sipserveruri_pure, (const char *)sipserver_uri, sipserverurilen); //We clear the flag "authentication pending" querylen=SQL_RMSIPURI_LEN + sipserveruripurelen; query = malloc(querylen+2); snprintf(query, querylen+1, SQL_RMSIPURI, sipserveruri_pure); if (mysql_query(conn, query)) { TRACE_DEBUG(INFO,"Query %s failed", query); free(query); return 2; } free(query); break; } return 0; } int set_real_sipserver_uri(const unsigned char *username, const size_t usernamelen, const unsigned char *sipserver_uri,const size_t sipserverurilen) { CHECK_PARAMS(username && usernamelen && sipserver_uri && sipserverurilen); size_t querylen, usernamepurelen, sipserveruripurelen; char *query, *username_pure, *sipserveruri_pure; switch(as_conf->datasource) { //MySQL case ASMYSQL: //We allocate the double size of username because at worst it can be all quotes username_pure=malloc(usernamelen*2+1); //We purify username not to have forbidden characters usernamepurelen=mysql_real_escape_string(conn, username_pure, (const char *)username, usernamelen); //We allocate the double size of username because at worst it can be all quotes sipserveruri_pure=malloc(sipserverurilen*2+1); //We purify username not to have forbidden characters sipserveruripurelen=mysql_real_escape_string(conn, sipserveruri_pure, (const char *)sipserver_uri, sipserverurilen); //We clear the flag "authentication pending" querylen=SQL_SETREALSIPURI_LEN + usernamepurelen + sipserveruripurelen; query = malloc(querylen+2); snprintf(query, querylen+1, SQL_SETREALSIPURI, sipserveruri_pure,username_pure); if (mysql_query(conn, query)) { TRACE_DEBUG(INFO,"Query %s failed", query); free(query); return 2; } free(query); break; } return 0; } int get_sipserver_uri(const unsigned char *sip_aor, const size_t sipaorlen, unsigned char ** sipserver_uri, size_t *sipserverurilen) { CHECK_PARAMS(sip_aor && sipaorlen && sipserver_uri && sipserverurilen ); size_t querylen, sipaorpurelen; char *query, *sipaor_pure; int not_found=2; //a sip aor must begin by "sip:" or "sips:" so it must at least be longer than 4 chars if(sipaorlen<5) return 2; //NOTE: each method has to purify sip_aor itself. You must remove quotes or special chars for security switch(as_conf->datasource) { //MySQL case ASMYSQL: querylen=SQL_GETSIPSERURI_LEN + sipaorlen; //We allocate the double size of SIP-URI because at worst it can be all quotes CHECK_MALLOC(sipaor_pure=malloc(sipaorlen*2+1)); //We purify SIP-URI not to have forbidden characters sipaorpurelen=mysql_real_escape_string(conn, sipaor_pure, (const char *)sip_aor, sipaorlen); query = malloc(querylen+sipaorpurelen+ 2); snprintf(query, querylen+1, SQL_GETSIPSERURI, sipaor_pure); MYSQL_RES *res; MYSQL_ROW row; //We make the query request_mysql(query); res=mysql_use_result(conn); if(res==NULL) { //We couldn't make the request sipserver_uri=NULL; return 2; } not_found=1; while ((row = mysql_fetch_row(res)) != NULL) { *sipserverurilen=strlen(row[0]); if(*sipserverurilen>4) { CHECK_MALLOC(*sipserver_uri=malloc(*sipserverurilen+1)); strcpy((char *)*sipserver_uri,row[0]); not_found=0; break; } } mysql_free_result(res); free(query); free(sipaor_pure); break; default: //We must never go here, if so, we must stop diameter_sip TRACE_DEBUG(INFO,"FATAL ERROR: the datasource is unknown, please check your config file!"); sipserver_uri=NULL; return 2; break; } //0 if it was found return not_found; } int count_avp(struct msg * message, int code, int vendor) { CHECK_PARAMS(message); struct avp_hdr *temphdr; struct avp *avp; int counter=0; CHECK_FCT(fd_msg_browse (message, MSG_BRW_WALK, &avp, NULL)); while(avp!=NULL) { CHECK_FCT( fd_msg_avp_hdr( avp,&temphdr )); if(temphdr->avp_code==code && temphdr->avp_vendor==vendor) { counter++; } CHECK_FCT(fd_msg_browse (avp, MSG_BRW_WALK, &avp, NULL)); } return counter; } /* void nonce_add_element(char * nonce) { noncechain *newelt=malloc(sizeof(noncechain)); newelt->nonce=nonce; newelt->timestamp=(int)time(NULL); newelt->next=NULL; if(listnonce==NULL) { listnonce=newelt; } else { noncechain* temp=listnonce; while(temp->next != NULL) { if(temp->timestamp < ((int)time(NULL)-300)) { listnonce=temp->next; free(temp); temp=listnonce; } temp = temp->next; } temp->next = newelt; } } void nonce_del_element(char * nonce) { if(listnonce!=NULL) { noncechain *temp=listnonce, *tempbefore=NULL; if(listnonce->next==NULL && strcmp(listnonce->nonce,nonce)==0) { free(listnonce); listnonce=NULL; return; } while(temp->next != NULL) { if(strcmp(temp->nonce,nonce)==0) { if(tempbefore==NULL) { listnonce=temp->next; free(temp); return; } tempbefore->next=temp->next; free(temp); break; } tempbefore=temp; temp = temp->next; } } } int nonce_check_element(char * nonce) { if(listnonce==NULL) { //Not found return 0; } else { noncechain* temp=listnonce; while(temp->next != NULL) { if(strcmp(temp->nonce,nonce)==0) return 1; else temp = temp->next; } } return 0; } void nonce_deletelistnonce() { if(listnonce !=NULL) { noncechain* temp=listnonce; while(listnonce->next != NULL) { temp = listnonce->next; free(listnonce); listnonce=temp; } free(listnonce); } } */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_sip/locationinfo.c000066400000000000000000000151361333553357400255430ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ #include "app_sip.h" int app_sip_LIR_cb( struct msg ** msg, struct avp * paramavp, struct session * sess, void * opaque, enum disp_action * act) { TRACE_ENTRY("%p %p %p %p", msg, paramavp, sess, act); struct msg *ans, *qry; struct avp *avp, *groupedavp; struct avp_hdr *avphdr; union avp_value value; int ret=0; //Result_Code to return in the answer char result[55]; if (msg == NULL) return EINVAL; // Create answer header qry = *msg; CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, msg, 0 ) ); ans = *msg; //Add the Auth-Application-Id { CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Application_Id, 0, &avp ) ); value.i32 = 6; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( ans, MSG_BRW_LAST_CHILD, avp) ); } // Add the Auth-Session-State AVP { CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.Auth_Session_State, &avp) ); CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr ) ); CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Session_State, 0, &avp ) ); CHECK_FCT( fd_msg_avp_setvalue( avp, avphdr->avp_value ) ); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); } //Add a SIP_Server_URI { CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.SIP_AOR, &avp) ); CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr ) ); ret=exist_username(avphdr->avp_value->os.data, avphdr->avp_value->os.len); if(ret==2) {//error /* If the Diameter server cannot process the Diameter LIR command, e.g., due to a database error, the Diameter server MUST set the Result-Code AVP value to DIAMETER_UNABLE_TO_COMPLY and return it in a Diameter LIA message. */ strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } else if(ret==1) {//not found /* One of the errors that the Diameter server may find is that the SIP-AOR AVP value is not a valid user in the realm. In such cases, the Diameter server MUST set the Result-Code AVP value to DIAMETER_ERROR_USER_UNKNOWN and return it in a Diameter LIA message. */ strcpy(result,"DIAMETER_ERROR_USER_UNKNOWN"); goto out; } //If we arrive here, the user is known size_t sipserverurilen; unsigned char * sipserver_uri=NULL; ret=get_sipserver_uri(avphdr->avp_value->os.data, avphdr->avp_value->os.len, &sipserver_uri, &sipserverurilen); if(ret==0) {//found if(sipserver_uri==NULL) { //There is a problem because we must get a Diameter_URI here strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } else { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Server_URI, 0, &avp ) ); value.os.data=(unsigned char *)sipserver_uri; value.os.len=sipserverurilen; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( ans, MSG_BRW_LAST_CHILD, avp) ); strcpy(result,"DIAMETER_SUCCESS"); } } else if(ret==1) {//not found //We don't know this SIP_AOR in SL, that means strcpy(result,"DIAMETER_ERROR_USER_UNKNOWN"); goto out; } else {// returned 2, impossible to make request //We couldn't make the request, we must stop process! strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } //Adding SIP-Server-Capabilities CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Server_Capabilities, 0, &groupedavp ) ); //We add mandatory and optional capabilities ret=get_sipserver_cap(avphdr->avp_value->os.data, avphdr->avp_value->os.len, &groupedavp); if(ret==0) {//found if(sipserver_uri==NULL) { //There is a problem because we must get a Diameter_URI here strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); CHECK_FCT( fd_msg_free( groupedavp ) ); goto out; } else { CHECK_FCT( fd_msg_avp_add ( ans, MSG_BRW_LAST_CHILD, groupedavp) ); strcpy(result,"DIAMETER_SUCCESS"); } } else if(ret==1) {//not found //We don't know this SIP_AOR in SL, that means strcpy(result,"DIAMETER_ERROR_IDENTITY_NOT_REGISTERED"); CHECK_FCT( fd_msg_free( groupedavp ) ); goto out; } else {// returned 2, impossible to make request //We couldn't make the request, we must stop process! strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); CHECK_FCT( fd_msg_free( groupedavp ) ); goto out; } } out: CHECK_FCT( fd_msg_rescode_set( ans, result, NULL, NULL, 1 ) ); CHECK_FCT( fd_msg_send( msg, NULL, NULL )); return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_sip/locationinfosl.c000066400000000000000000000121401333553357400260720ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ #include "app_sip.h" //This callback is specific to SUSCRIBER LOCATOR. We must look for the "serving" SIP server int app_sip_SL_LIR_cb( struct msg ** msg, struct avp * paramavp, struct session * sess, void * opaque, enum disp_action * act) { TRACE_ENTRY("%p %p %p %p", msg, paramavp, sess, act); struct msg *ans, *qry; struct avp *avp; struct avp_hdr *avphdr; union avp_value value; //Result_Code to return in the answer char result[55]; int ret=0; if (msg == NULL) return EINVAL; // Create answer header qry = *msg; CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, msg, 0 ) ); ans = *msg; //Add the Auth-Application-Id { CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Application_Id, 0, &avp ) ); value.i32 = 6; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( ans, MSG_BRW_LAST_CHILD, avp) ); } // Add the Auth-Session-State AVP { CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.Auth_Session_State, &avp) ); CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr ) ); CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Session_State, 0, &avp ) ); CHECK_FCT( fd_msg_avp_setvalue( avp, avphdr->avp_value ) ); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); } // Add the Redirect Host AVP { CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.SIP_AOR, &avp) ); CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr ) ); size_t diameterurilen; char * diameter_uri=NULL; ret=get_diameter_uri(avphdr->avp_value->os.data, avphdr->avp_value->os.len, &diameter_uri, &diameterurilen); //found if(ret==0) { if(diameter_uri==NULL) { //There is a problem because we must get a Diameter_URI here strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } else { CHECK_FCT( fd_msg_avp_new ( sip_dict.Redirect_Host, 0, &avp ) ); value.os.data=(unsigned char *)diameter_uri; value.os.len=diameterurilen; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); CHECK_FCT( fd_msg_avp_new ( sip_dict.Redirect_Host_Usage, 0, &avp ) ); value.i32=ALL_USER; //All the request about the same user must be sent to this server CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); strcpy(result,"DIAMETER_SUCCESS"); } } else if(ret==1) {//not found //We don't know this SIP_AOR in SL strcpy(result,"DIAMETER_ERROR_USER_UNKNOWN"); goto out; } else {// returned 2, impossible to make request //We couldn't make the request, we must stop process! strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } } out: CHECK_FCT( fd_msg_rescode_set( ans, result, NULL, NULL, 1 ) ); CHECK_FCT( fd_msg_send( msg, NULL, NULL )); return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_sip/md5.c000066400000000000000000000342571333553357400235510ustar00rootroot00000000000000/*********************************************************************************/ /* freeDiameter author note: * The content from this file comes directly from the hostap project. * It is redistributed under the terms of the BSD license, as allowed * by the original copyright reproduced below. * In addition to this notice, only the #include directives have been modified. */ /*********************************************************************************/ #include"app_sip.h" /* * MD5 hash implementation and interface functions * Copyright (c) 2003-2005, Jouni Malinen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * Alternatively, this software may be distributed under the terms of BSD * license. * * See README and COPYING for more details. */ void CvtHex( IN HASH Bin, OUT HASHHEX Hex ) { unsigned short i; unsigned char j; for (i = 0; i < HASHLEN; i++) { j = (Bin[i] >> 4) & 0xf; if (j <= 9) Hex[i*2] = (j + '0'); else Hex[i*2] = (j + 'a' - 10); j = Bin[i] & 0xf; if (j <= 9) Hex[i*2+1] = (j + '0'); else Hex[i*2+1] = (j + 'a' - 10); } Hex[HASHHEXLEN] = '\0'; } // calculate H(A1) as per spec void DigestCalcHA1(char * pszAlg,char * pszUserName,char * pszRealm,char * pszPassword,char * pszNonce,char * pszCNonce,HASHHEX SessionKey) { MD5_CTX Md5Ctx; HASH HA1; MD5Init(&Md5Ctx); MD5Update(&Md5Ctx, (const unsigned char *)pszUserName, strlen(pszUserName)); MD5Update(&Md5Ctx, (const unsigned char *)":", 1); MD5Update(&Md5Ctx, (const unsigned char *)pszRealm, strlen(pszRealm)); MD5Update(&Md5Ctx, (const unsigned char *)":", 1); MD5Update(&Md5Ctx, (const unsigned char *)pszPassword, strlen(pszPassword)); MD5Final((unsigned char *)HA1, &Md5Ctx); if (strcmp(pszAlg, "md5-sess") == 0) { MD5Init(&Md5Ctx); MD5Update(&Md5Ctx, (const unsigned char *)HA1, HASHLEN); MD5Update(&Md5Ctx, (const unsigned char *)":", 1); MD5Update(&Md5Ctx, (const unsigned char *)pszNonce, strlen(pszNonce)); MD5Update(&Md5Ctx, (const unsigned char *)":", 1); MD5Update(&Md5Ctx, (const unsigned char *)pszCNonce, strlen(pszCNonce)); MD5Final((unsigned char *)HA1, &Md5Ctx); } CvtHex(HA1, SessionKey); } // calculate request-digest as SIP Digest spec RFC5090 void DigestCalcResponse(HASHHEX HA1,char * pszNonce,char * pszNonceCount,char * pszCNonce,char * pszQop,char * pszMethod,char * pszDigestUri,HASHHEX HEntity,HASHHEX Response) { MD5_CTX Md5Ctx; HASH HA2; HASH RespHash; HASHHEX HA2Hex; // calculate H(A2) MD5Init(&Md5Ctx); MD5Update(&Md5Ctx, (const unsigned char *)pszMethod, strlen(pszMethod)); MD5Update(&Md5Ctx, (const unsigned char *)":", 1); MD5Update(&Md5Ctx, (const unsigned char *)pszDigestUri, strlen(pszDigestUri)); if (strcmp(pszQop, "auth-int") == 0) { MD5Update(&Md5Ctx, (const unsigned char *)":", 1); MD5Update(&Md5Ctx, (const unsigned char *)HEntity, HASHHEXLEN); } MD5Final((unsigned char *)HA2, &Md5Ctx); CvtHex(HA2, HA2Hex); // calculate response MD5Init(&Md5Ctx); MD5Update(&Md5Ctx, (const unsigned char *)HA1, HASHHEXLEN); MD5Update(&Md5Ctx, (const unsigned char *)":", 1); MD5Update(&Md5Ctx,(const unsigned char *) pszNonce, strlen(pszNonce)); MD5Update(&Md5Ctx, (const unsigned char *)":", 1); if (*pszQop) { MD5Update(&Md5Ctx, (const unsigned char *)pszNonceCount, strlen(pszNonceCount)); MD5Update(&Md5Ctx, (const unsigned char *)":", 1); MD5Update(&Md5Ctx, (const unsigned char *)pszCNonce, strlen(pszCNonce)); MD5Update(&Md5Ctx, (const unsigned char *)":", 1); MD5Update(&Md5Ctx, (const unsigned char *)pszQop, strlen(pszQop)); MD5Update(&Md5Ctx, (const unsigned char *)":", 1); } MD5Update(&Md5Ctx, (const unsigned char *)HA2Hex, HASHHEXLEN); MD5Final((unsigned char *)RespHash, &Md5Ctx); CvtHex(RespHash, Response); } // calculate Digest_response_Auth as per SIP Digest spec RFC5090 void DigestCalcResponseAuth(HASHHEX HA1,char * pszNonce,char * pszNonceCount,char * pszCNonce,char * pszQop,char * pszMethod,char * pszDigestUri,HASHHEX HEntity,HASHHEX Response) { MD5_CTX Md5Ctx; HASH HA2; HASH RespHash; HASHHEX HA2Hex; // calculate H(A2) MD5Init(&Md5Ctx); MD5Update(&Md5Ctx, (const unsigned char *)":", 1); MD5Update(&Md5Ctx, (const unsigned char *)pszDigestUri, strlen(pszDigestUri)); if (strcmp(pszQop, "auth-int") == 0) { MD5Update(&Md5Ctx, (const unsigned char *)":", 1); MD5Update(&Md5Ctx, (const unsigned char *)HEntity, HASHHEXLEN); } MD5Final((unsigned char *)HA2, &Md5Ctx); CvtHex(HA2, HA2Hex); // calculate response MD5Init(&Md5Ctx); MD5Update(&Md5Ctx, (const unsigned char *)HA1, HASHHEXLEN); MD5Update(&Md5Ctx, (const unsigned char *)":", 1); MD5Update(&Md5Ctx, (const unsigned char *)pszNonce, strlen(pszNonce)); MD5Update(&Md5Ctx, (const unsigned char *)":", 1); if (*pszQop) { MD5Update(&Md5Ctx, (const unsigned char *)pszNonceCount, strlen(pszNonceCount)); MD5Update(&Md5Ctx, (const unsigned char *)":", 1); MD5Update(&Md5Ctx, (const unsigned char *)pszCNonce, strlen(pszCNonce)); MD5Update(&Md5Ctx, (const unsigned char *)":", 1); MD5Update(&Md5Ctx, (const unsigned char *)pszQop, strlen(pszQop)); MD5Update(&Md5Ctx, (const unsigned char *)":", 1); } MD5Update(&Md5Ctx, (const unsigned char *)HA2Hex, HASHHEXLEN); MD5Final((unsigned char *)RespHash, &Md5Ctx); CvtHex(RespHash, Response); } static void MD5Transform(u32 buf[4], u32 const in[16]); /** * md5_vector - MD5 hash for data vector * @num_elem: Number of elements in the data vector * @addr: Pointers to the data areas * @len: Lengths of the data blocks * @mac: Buffer for the hash */ void md5_vector(size_t num_elem, const u8 *addr[], const size_t *len, u8 *mac) { MD5_CTX ctx; size_t i; MD5Init(&ctx); for (i = 0; i < num_elem; i++) MD5Update(&ctx, addr[i], len[i]); MD5Final(mac, &ctx); } /* ===== start - public domain MD5 implementation ===== */ /* * This code implements the MD5 message-digest algorithm. * The algorithm is due to Ron Rivest. This code was * written by Colin Plumb in 1993, no copyright is claimed. * This code is in the public domain; do with it what you wish. * * Equivalent code is available from RSA Data Security, Inc. * This code has been tested against that, and is equivalent, * except that you don't need to include two pages of legalese * with every copy. * * To compute the message digest of a chunk of bytes, declare an * MD5Context structure, pass it to MD5Init, call MD5Update as * needed on buffers full of bytes, and then call MD5Final, which * will fill a supplied 16-byte array with the digest. */ #ifndef WORDS_BIGENDIAN #define byteReverse(buf, len) /* Nothing */ #else /* * Note: this code is harmless on little-endian machines. */ static void byteReverse(unsigned char *buf, unsigned longs) { u32 t; do { t = (u32) ((unsigned) buf[3] << 8 | buf[2]) << 16 | ((unsigned) buf[1] << 8 | buf[0]); *(u32 *) buf = t; buf += 4; } while (--longs); } #endif /* * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious * initialization constants. */ void MD5Init(struct MD5Context *ctx) { ctx->buf[0] = 0x67452301; ctx->buf[1] = 0xefcdab89; ctx->buf[2] = 0x98badcfe; ctx->buf[3] = 0x10325476; ctx->bits[0] = 0; ctx->bits[1] = 0; } /* * Update context to reflect the concatenation of another buffer full * of bytes. */ void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len) { u32 t; /* Update bitcount */ t = ctx->bits[0]; if ((ctx->bits[0] = t + ((u32) len << 3)) < t) ctx->bits[1]++; /* Carry from low to high */ ctx->bits[1] += len >> 29; t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */ /* Handle any leading odd-sized chunks */ if (t) { unsigned char *p = (unsigned char *) ctx->in + t; t = 64 - t; if (len < t) { os_memcpy(p, buf, len); return; } os_memcpy(p, buf, t); byteReverse(ctx->in, 16); MD5Transform(ctx->buf, (u32 *) ctx->in); buf += t; len -= t; } /* Process data in 64-byte chunks */ while (len >= 64) { os_memcpy(ctx->in, buf, 64); byteReverse(ctx->in, 16); MD5Transform(ctx->buf, (u32 *) ctx->in); buf += 64; len -= 64; } /* Handle any remaining bytes of data. */ os_memcpy(ctx->in, buf, len); } /* * Final wrapup - pad to 64-byte boundary with the bit pattern * 1 0* (64-bit count of bits processed, MSB-first) */ void MD5Final(unsigned char digest[16], struct MD5Context *ctx) { unsigned count; unsigned char *p; /* Compute number of bytes mod 64 */ count = (ctx->bits[0] >> 3) & 0x3F; /* Set the first char of padding to 0x80. This is safe since there is always at least one byte free */ p = ctx->in + count; *p++ = 0x80; /* Bytes of padding needed to make 64 bytes */ count = 64 - 1 - count; /* Pad out to 56 mod 64 */ if (count < 8) { /* Two lots of padding: Pad the first block to 64 bytes */ os_memset(p, 0, count); byteReverse(ctx->in, 16); MD5Transform(ctx->buf, (u32 *) ctx->in); /* Now fill the next block with 56 bytes */ os_memset(ctx->in, 0, 56); } else { /* Pad block to 56 bytes */ os_memset(p, 0, count - 8); } byteReverse(ctx->in, 14); /* Append length in bits and transform */ ((u32 *) ctx->in)[14] = ctx->bits[0]; ((u32 *) ctx->in)[15] = ctx->bits[1]; MD5Transform(ctx->buf, (u32 *) ctx->in); byteReverse((unsigned char *) ctx->buf, 4); os_memcpy(digest, ctx->buf, 16); os_memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ } /* The four core functions - F1 is optimized somewhat */ /* #define F1(x, y, z) (x & y | ~x & z) */ #define F1(x, y, z) (z ^ (x & (y ^ z))) #define F2(x, y, z) F1(z, x, y) #define F3(x, y, z) (x ^ y ^ z) #define F4(x, y, z) (y ^ (x | ~z)) /* This is the central step in the MD5 algorithm. */ #define MD5STEP(f, w, x, y, z, data, s) \ ( w += f(x, y, z) + data, w = w<>(32-s), w += x ) /* * The core of the MD5 algorithm, this alters an existing MD5 hash to * reflect the addition of 16 longwords of new data. MD5Update blocks * the data and converts bytes into longwords for this routine. */ static void MD5Transform(u32 buf[4], u32 const in[16]) { register u32 a, b, c, d; a = buf[0]; b = buf[1]; c = buf[2]; d = buf[3]; MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7); MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12); MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17); MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22); MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7); MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12); MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17); MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22); MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7); MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12); MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17); MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22); MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7); MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12); MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17); MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22); MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5); MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9); MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14); MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20); MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5); MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9); MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14); MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20); MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5); MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9); MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14); MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20); MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5); MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9); MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14); MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20); MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4); MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11); MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16); MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23); MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4); MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11); MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16); MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23); MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4); MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11); MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16); MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23); MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4); MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11); MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16); MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23); MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6); MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10); MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15); MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21); MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6); MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10); MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15); MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21); MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6); MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10); MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15); MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21); MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6); MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10); MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15); MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21); buf[0] += a; buf[1] += b; buf[2] += c; buf[3] += d; } /* ===== end - public domain MD5 implementation ===== */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_sip/md5.h000066400000000000000000000031401333553357400235410ustar00rootroot00000000000000/*********************************************************************************/ /* freeDiameter author note: * The content from this file comes directly from the hostap project. * It is redistributed under the terms of the BSD license, as allowed * by the original copyright reproduced below. * The file has not been modified, except for this notice. */ /*********************************************************************************/ /* * MD5 hash implementation and interface functions * Copyright (c) 2003-2005, Jouni Malinen * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * * Alternatively, this software may be distributed under the terms of BSD * license. * * See README and COPYING for more details. */ #ifndef MD5_H #define MD5_H #define MD5_MAC_LEN 16 typedef uint64_t u64; typedef uint32_t u32; typedef uint16_t u16; typedef uint8_t u8; typedef int64_t s64; typedef int32_t s32; typedef int16_t s16; typedef int8_t s8; #define HASHLEN 16 typedef char HASH[HASHLEN]; #define HASHHEXLEN 32 typedef char HASHHEX[HASHHEXLEN+1]; #define IN #define OUT struct MD5Context { u32 buf[4]; u32 bits[2]; u8 in[64]; }; typedef struct MD5Context MD5_CTX; #define os_memcpy(d, s, n) memcpy((d), (s), (n)) #define os_memset(s, c, n) memset(s, c, n) void MD5Init(struct MD5Context *ctx); void MD5Update(struct MD5Context *ctx, unsigned char const *buf, unsigned len); void MD5Final(unsigned char digest[16], struct MD5Context *ctx); #endif /* MD5_H */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_sip/multimediaauth.c000066400000000000000000000621221333553357400260700ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ #include "app_sip.h" struct sess_state { char *nonce; }; int app_sip_MAR_cb( struct msg ** msg, struct avp * paramavp, struct session * sess, void * opaque, enum disp_action * act) { struct msg *ans, *qry; struct avp *avp, *a2, *authdataitem; //struct msg_hdr * header = NULL; struct avp_hdr * avphdr=NULL, *avpheader=NULL, *avpheader_auth=NULL,*digestheader=NULL; union avp_value val; int found_cnonce=0; struct avp * tempavp=NULL,*sipAuthentication=NULL,*sipAuthenticate=NULL; char * result; char password[51]; int idx=0, number_of_auth_items=0,i=0, ret=0; //Flags and variables for Database int sipurinotstored=0, authenticationpending=0; size_t querylen=0, usernamelen=0; char *query=NULL; unsigned char *username=NULL; //The nonce we will store and retrieve in session struct sess_state *storednonce=NULL; TRACE_ENTRY("%p %p %p %p", msg, paramavp, sess, act); if (msg == NULL) return EINVAL; /* Create answer header */ qry = *msg; CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, msg, 0 ) ); ans = *msg; /* Add the appropriate command code & Auth-Application-Id { CHECK_FCT( fd_msg_hdr ( *msg, &header ) ); header->msg_flags = CMD_FLAG_PROXIABLE; header->msg_code = 286; header->msg_appl = 6; // Add the Auth-Application-Id { CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Application_Id, 0, &avp ) ); ASSERT(avp); val.i32 = header->msg_appl; CHECK_FCT( fd_msg_avp_setvalue ( avp, &val ) ); CHECK_FCT( fd_msg_avp_add ( ans, MSG_BRW_LAST_CHILD, avp) ); } }*/ /* Add the Auth-Session-State AVP */ { CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.Auth_Session_State, &avp) ); CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr ) ); CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Session_State, 0, &avp ) ); CHECK_FCT( fd_msg_avp_setvalue( avp, avphdr->avp_value ) ); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); } /* Check if method is REGISTER then User-Name must be present */ { CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.SIP_Method, &avp) ); CHECK_FCT( fd_msg_avp_hdr( avp, &avpheader )); char *method=NULL; CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.User_Name, &avp) ); if(avp!=NULL) { int not_found=1; MYSQL_RES *res=NULL; MYSQL_ROW row; CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr ) ); if((strncmp((const char *)avpheader->avp_value->os.data,"REGISTER",avpheader->avp_value->os.len)==0)) { not_found=1; //TODO TODO TODO TODO TODO TODO TODO: maybe doesn't work!!' ret=get_password(avphdr->avp_value->os.data, avphdr->avp_value->os.len, (char *)&password); if(ret>1) { //We couldn't make the request result="DIAMETER_UNABLE_TO_COMPLY"; goto out; } not_found=ret; if(not_found) { TRACE_DEBUG(FULL,"The user %s doesn't exist!",username); result="DIAMETER_ERROR_USER_UNKNOWN"; free(username); goto out; } //We allocate the double size of username because at worst it can be all quotes username=malloc(avphdr->avp_value->os.len*2+1); //We purify username not to have forbidden characters usernamelen=mysql_real_escape_string(conn, (char *)username, (const char *)avphdr->avp_value->os.data, avphdr->avp_value->os.len); //Now that we know the user exist, we get the list of AOR owned by this user querylen=SQL_GETSIPAOR_LEN + usernamelen; query = malloc(querylen+2); snprintf(query, querylen+1, SQL_GETSIPAOR, username); //We make the query request_mysql(query); res=mysql_use_result(conn); if(res==NULL) { //We couldn't make the request result="DIAMETER_UNABLE_TO_COMPLY"; goto out; } //We retrieve the SIP-AOR from AVP to check if the user can us it CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.SIP_AOR, &avp) ); CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr ) ); not_found=1; while ((row = mysql_fetch_row(res)) != NULL) { if(strncmp((const char *)avphdr->avp_value->os.data,row[0],avphdr->avp_value->os.len)==0) { not_found=0; break; } } mysql_free_result(res); free(query); if(not_found) { TRACE_DEBUG(FULL,"The user %s can't use this SIP-AOR!",username); result="DIAMETER_ERROR_IDENTITIES_DONT_MATCH"; free(username); goto out; } } CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.SIP_Server_URI, &avp) ); CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr )); if(avphdr!=NULL) { unsigned char *sipuri=NULL; int sipurilen=0; //We allocate the double size of SIP-URI because at worst it can be all quotes CHECK_MALLOC(sipuri=malloc(avphdr->avp_value->os.len*2+1)); //We purify SIP-URI not to have forbidden characters sipurilen=mysql_real_escape_string(conn, (char *)sipuri, (const char *)avphdr->avp_value->os.data, avphdr->avp_value->os.len); //We get the SIP-URI assignated to the user querylen=SQL_GETSIPURI_LEN + usernamelen; CHECK_MALLOC(query = malloc(querylen+2)); snprintf(query, querylen+1, SQL_GETSIPURI, username); //We make the query request_mysql(query); res=mysql_use_result(conn); if(res==NULL) { //We couldn't make the request result="DIAMETER_UNABLE_TO_COMPLY"; goto out; } not_found=1; while ((row = mysql_fetch_row(res)) != NULL) { if(strncmp((const char *)avphdr->avp_value->os.data,row[0],avphdr->avp_value->os.len)==0) { not_found=0; break; } } mysql_free_result(res); free(query); if(not_found) { //Temporary set_sipserver_uri(username, usernamelen, sipuri,sipurilen); set_pending_flag(username, usernamelen); authenticationpending=1; } free(sipuri); } else sipurinotstored=1; } else { result="DIAMETER_USER_NAME_REQUIRED"; goto out; } free(method); } //TODO: remove loop for authdataitem because RFC say only one (wait for answer from Garcia) // How many Auth Data Items? CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.SIP_Number_Auth_Items, &avp) ); CHECK_FCT( fd_msg_avp_hdr( avp, &avpheader ) ); if(avp!=NULL) { CHECK_FCT(fd_msg_search_avp ( qry, sip_dict.SIP_Auth_Data_Item, &avp)); CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr ) ); if(avp!=NULL) { //First is Authentication Scheme CHECK_FCT(fd_msg_browse ( avp, MSG_BRW_FIRST_CHILD, &avp, NULL) ); CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr ) ); //Digest-Authentication? if(avphdr->avp_value->i32==0) { for(idx=0;idxavp_value->i32;idx++) { //We look for SIP Auth items CHECK_FCT(fd_msg_browse ( avp, MSG_BRW_WALK, &avp, NULL) ); if(avp!=NULL) { CHECK_FCT( fd_msg_avp_hdr( avp,&avphdr )); if(avphdr->avp_code==380) //We only create Auth-Data-Item to answer Auth-Data-Item { /* Add the Auth-Data-Item AVP */ CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Auth_Data_Item, 0, &authdataitem ) ); /* Add the Authentication Scheme AVP */ { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Authentication_Scheme, 0, &a2 ) ); val.i32=0; //We only know Digest Authentication CHECK_FCT( fd_msg_avp_setvalue( a2, &val ) ); CHECK_FCT( fd_msg_avp_add( authdataitem, MSG_BRW_LAST_CHILD, a2 ) ); } //We need to know if there is a Cnonce attribute (only in the second MAR request) //CHECK_FCT(fd_msg_browse ( avp, MSG_BRW_WALK, &avp, NULL) ); CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_CNonce, &a2 )); if(a2!=NULL) found_cnonce=1; else found_cnonce=0; if(!found_cnonce) { /* We are in the case of first access request so we need to challenge the user. */ TRACE_DEBUG(FULL,"First Authorization in progress..."); /* Create a new session */ //this create a new session Id !!! //CHECK_FCT_DO( fd_sess_new( &sess, fd_g_config->cnf_diamid, "diamsip", 7), goto out ); /* Create the SIP-Authenticate AVP */ { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Authenticate, 0, &sipAuthenticate ) ); } /* Add the Digest QOP AVP */ { CHECK_FCT( fd_msg_avp_new ( sip_dict.Digest_QOP, 0, &a2 ) ); val.os.data=(unsigned char *)"auth"; val.os.len=strlen((const char *)val.os.data); CHECK_FCT( fd_msg_avp_setvalue( a2, &val ) ); CHECK_FCT( fd_msg_avp_add( sipAuthenticate, MSG_BRW_LAST_CHILD, a2 ) ); } /* Add the Digest Nonce AVP */ { uint8_t buffer[NONCE_SIZE]; char nonce[NONCE_SIZE * 2 + 1]; gcry_create_nonce ((uint8_t *)buffer, sizeof(buffer)); for(i=0;inonce=malloc(NONCE_SIZE*2+1)); memcpy(storednonce->nonce,(char *)nonce,NONCE_SIZE*2+1); CHECK_FCT( fd_sess_state_store ( ds_sess_hdl, sess, &storednonce )); val.os.data=(unsigned char *)nonce; val.os.len=NONCE_SIZE * 2; CHECK_FCT( fd_msg_avp_setvalue( a2, &val ) ); CHECK_FCT( fd_msg_avp_add( sipAuthenticate, MSG_BRW_LAST_CHILD, a2 ) ); } /* Add the Digest Algorithm AVP */ { CHECK_FCT( fd_msg_avp_new ( sip_dict.Digest_Algorithm, 0, &a2 ) ); val.os.data=(unsigned char *)"MD5"; val.os.len=strlen((const char *)val.os.data); CHECK_FCT( fd_msg_avp_setvalue( a2, &val ) ); CHECK_FCT( fd_msg_avp_add( sipAuthenticate, MSG_BRW_LAST_CHILD, a2 ) ); } /* Add the Digest Realm AVP */ { tempavp=avp; avpheader_auth=walk_digest(tempavp, 104); if(avpheader_auth!=NULL) { CHECK_FCT( fd_msg_avp_new ( sip_dict.Digest_Realm, 0, &a2 ) ); CHECK_FCT( fd_msg_avp_setvalue( a2, avpheader_auth->avp_value ) ); CHECK_FCT( fd_msg_avp_add( sipAuthenticate, MSG_BRW_LAST_CHILD, a2 ) ); } } //We add SIP Authenticate to Auth Data Item CHECK_FCT( fd_msg_avp_add( authdataitem, MSG_BRW_LAST_CHILD, sipAuthenticate ) ); //We add Auth Data Item to Answer CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, authdataitem ) ); number_of_auth_items++; if(sipurinotstored) result="DIAMETER_SUCCESS_AUTH_SENT_SERVER_NOT_STORED"; else result="DIAMETER_MULTI_ROUND_AUTH"; found_cnonce=0; } else { /* We are in the case of access request after challenge so we need to check credentials. */ TRACE_DEBUG(FULL,"Authentication after challenge"); /* Search the session, retrieve its data */ { //int new=0; //TRACE_DEBUG(FULL,"new: *%d*",new); //ASSERT( new == 0 ); CHECK_FCT( fd_sess_state_retrieve( ds_sess_hdl, sess, &storednonce )); if(storednonce ==NULL) { result="DIAMETER_UNABLE_TO_COMPLY"; if(username!=NULL) free(username); goto out; } } /* Create the SIP-Authentication-Info AVP */ { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Authentication_Info, 0, &sipAuthentication ) ); } /* Add the Digest response Auth AVP */ { //uint8_t bufferresp[DIGEST_LEN]; //char response[DIGEST_LEN*2+1]; //We extract all the data we need tempavp=avp; char * digest_username=NULL, *digest_uri=NULL, *digest_response=NULL, *digest_realm=NULL, *digest_nonce=NULL, *digest_method=NULL, *digest_qop=NULL, *digest_algorithm=NULL, *digest_cnonce=NULL, *digest_noncecount=NULL; CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_Nonce, &a2 )); if(a2!=NULL) { CHECK_FCT( fd_msg_avp_hdr( a2, &digestheader ) ); if(digestheader!=NULL) { digest_nonce = malloc(digestheader->avp_value->os.len + 1); memcpy(digest_nonce, digestheader->avp_value->os.data, digestheader->avp_value->os.len); digest_nonce[digestheader->avp_value->os.len]='\0'; TRACE_DEBUG(FULL,"Element:*%s*",digest_nonce); TRACE_DEBUG(FULL,"Stored Nonce:*%s*",storednonce->nonce); if(strcmp(digest_nonce,storednonce->nonce)!=0) { free(digest_nonce); free(storednonce->nonce); free(storednonce); result="DIAMETER_UNABLE_TO_COMPLY"; if(username!=NULL) free(username); goto out; } } } CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_Response, &a2 )); if(a2!=NULL) { CHECK_FCT( fd_msg_avp_hdr( a2, &digestheader ) ); if(digestheader!=NULL) { digest_response = malloc(digestheader->avp_value->os.len + 1); memcpy(digest_response, digestheader->avp_value->os.data, digestheader->avp_value->os.len); digest_response[digestheader->avp_value->os.len]='\0'; TRACE_DEBUG(FULL,"Element:*%s*",digest_response); } } CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_Realm, &a2 )); if(a2!=NULL) { CHECK_FCT( fd_msg_avp_hdr( a2, &digestheader ) ); if(digestheader!=NULL) { digest_realm = malloc(digestheader->avp_value->os.len + 1); memcpy(digest_realm, digestheader->avp_value->os.data, digestheader->avp_value->os.len); digest_realm[digestheader->avp_value->os.len]='\0'; TRACE_DEBUG(FULL,"Element:*%s*",digest_realm); } } CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_Method, &a2 )); if(a2!=NULL) { CHECK_FCT( fd_msg_avp_hdr( a2, &digestheader ) ); if(digestheader!=NULL) { digest_method = malloc(digestheader->avp_value->os.len + 1); memcpy(digest_method, digestheader->avp_value->os.data, digestheader->avp_value->os.len); digest_method[digestheader->avp_value->os.len]='\0'; TRACE_DEBUG(FULL,"Element:*%s*",digest_method); } } else digest_method=""; CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_URI, &a2 )); if(a2!=NULL) { CHECK_FCT( fd_msg_avp_hdr( a2, &digestheader ) ); if(digestheader!=NULL) { digest_uri = malloc(digestheader->avp_value->os.len + 1); memcpy(digest_uri, digestheader->avp_value->os.data, digestheader->avp_value->os.len); digest_uri[digestheader->avp_value->os.len]='\0'; TRACE_DEBUG(FULL,"Element:*%s*",digest_uri); } } CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_QOP, &a2 )); if(a2!=NULL) { CHECK_FCT( fd_msg_avp_hdr( a2, &digestheader ) ); if(digestheader!=NULL) { digest_qop = malloc(digestheader->avp_value->os.len + 1); memcpy(digest_qop, digestheader->avp_value->os.data, digestheader->avp_value->os.len); digest_qop[digestheader->avp_value->os.len]='\0'; TRACE_DEBUG(FULL,"Element:*%s*",digest_qop); } } else digest_qop=NULL; CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_Algorithm, &a2 )); if(a2!=NULL) { CHECK_FCT( fd_msg_avp_hdr( a2, &digestheader ) ); if(digestheader!=NULL) { digest_algorithm = malloc(digestheader->avp_value->os.len + 1); memcpy(digest_algorithm, digestheader->avp_value->os.data, digestheader->avp_value->os.len); digest_algorithm[digestheader->avp_value->os.len]='\0'; TRACE_DEBUG(FULL,"Element:*%s*",digest_algorithm); } } else digest_algorithm=NULL; CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_CNonce, &a2 )); if(a2!=NULL) { CHECK_FCT( fd_msg_avp_hdr( a2, &digestheader ) ); if(digestheader!=NULL) { digest_cnonce = malloc(digestheader->avp_value->os.len + 1); memcpy(digest_cnonce, digestheader->avp_value->os.data, digestheader->avp_value->os.len); digest_cnonce[digestheader->avp_value->os.len]='\0'; TRACE_DEBUG(FULL,"Element:*%s*",digest_cnonce); } } else digest_cnonce=""; CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_Nonce_Count, &a2 )); if(a2!=NULL) { CHECK_FCT( fd_msg_avp_hdr( a2, &digestheader ) ); if(digestheader!=NULL) { digest_noncecount = malloc(digestheader->avp_value->os.len + 1); memcpy(digest_noncecount, digestheader->avp_value->os.data, digestheader->avp_value->os.len); digest_noncecount[digestheader->avp_value->os.len]='\0'; TRACE_DEBUG(FULL,"Element:*%s*",digest_noncecount); } } else digest_noncecount=""; CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_Username, &a2 )); if(a2!=NULL) { CHECK_FCT( fd_msg_avp_hdr( a2, &digestheader ) ); if(digestheader!=NULL) { digest_username = malloc(digestheader->avp_value->os.len + 1); memcpy(digest_username, digestheader->avp_value->os.data, digestheader->avp_value->os.len); digest_username[digestheader->avp_value->os.len]='\0'; TRACE_DEBUG(FULL,"Element:*%s*",digest_username); } } //TODO: replace by authentication function HASHHEX HA1; HASHHEX HA2 = ""; HASHHEX response, responseauth; DigestCalcHA1(digest_algorithm, digest_username, digest_realm, password, digest_nonce,digest_cnonce, HA1); DigestCalcResponse(HA1, digest_nonce, digest_noncecount, digest_cnonce, digest_qop,digest_method, digest_uri, HA2, response); // We check that the Digest-Response is the same (UA, Diameter) if(strcmp(response,digest_response)!=0) { TRACE_DEBUG(FULL,"Response calculated by Diameter server:%s",response); TRACE_DEBUG(FULL,"Response calculated by UA:%s",digest_response); TRACE_DEBUG(INFO,"Digest-Response does not match!"); result="DIAMETER_UNABLE_TO_COMPLY"; free(digest_algorithm); free(digest_cnonce); free(digest_nonce); free(digest_noncecount); free(digest_method); free(digest_username); free(digest_uri); free(digest_qop); free(digest_response); free(digest_realm); free(storednonce->nonce); free(storednonce); if(username!=NULL) free(username); goto out; } //We calculate Digest_Response_Auth DigestCalcResponseAuth(HA1, digest_nonce, digest_noncecount, digest_cnonce, digest_qop,digest_method, digest_uri, HA2, responseauth); TRACE_DEBUG(FULL,"Response calculated by Diameter server:%s",response); TRACE_DEBUG(FULL,"Response calculated by UA:%s",digest_response); if(strcmp(digest_qop,"auth-int")==0) { //Digest-HA1 MUST be used instead of Digest-Response-Auth if Digest-Qop is 'auth-int'. CHECK_FCT( fd_msg_avp_new ( sip_dict.Digest_HA1, 0, &a2 ) ); val.os.data=(unsigned char *)HA1; val.os.len=HASHHEXLEN+1; CHECK_FCT( fd_msg_avp_setvalue( a2, &val ) ); CHECK_FCT( fd_msg_avp_add( sipAuthentication, MSG_BRW_LAST_CHILD, a2 ) ); } else { //Digest-Response-Auth MUST be used instead of Digest-HA1 if Digest-Qop is 'auth'. CHECK_FCT( fd_msg_avp_new ( sip_dict.Digest_Response_Auth, 0, &a2 ) ); val.os.data=(unsigned char *)responseauth; val.os.len=DIGEST_LEN*2; CHECK_FCT( fd_msg_avp_setvalue( a2, &val ) ); CHECK_FCT( fd_msg_avp_add( sipAuthentication, MSG_BRW_LAST_CHILD, a2 ) ); } free(digest_algorithm); free(digest_cnonce); free(digest_nonce); free(digest_noncecount); free(digest_method); free(digest_username); free(digest_uri); free(digest_qop); free(digest_response); free(digest_realm); free(storednonce->nonce); free(storednonce); number_of_auth_items++; } //We add SIP Authentication-Info to Auth Data Item CHECK_FCT( fd_msg_avp_add( authdataitem, MSG_BRW_LAST_CHILD, sipAuthentication ) ); //We add Auth Data Item to Answer CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, authdataitem ) ); if(username!=NULL && authenticationpending) { //We clear the pending flag clear_pending_flag(username, usernamelen); } if(sipurinotstored) result="DIAMETER_SUCCESS_SERVER_NAME_NOT_STORED"; else result="DIAMETER_SUCCESS"; found_cnonce=0; } } } else TRACE_DEBUG(INFO,"No auth data items!"); } /*Add SIP_Number_Auth_Items AVP */ { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Number_Auth_Items, 0, &avp ) ); val.i32 = number_of_auth_items; CHECK_FCT( fd_msg_avp_setvalue ( avp, &val ) ); CHECK_FCT( fd_msg_avp_add ( ans, MSG_BRW_LAST_CHILD, avp) ); } } else { TRACE_DEBUG(INFO,"We only support DIGEST for now, unable to comply"); result="DIAMETER_ERROR_AUTH_SCHEME_NOT_SUPPORTED"; if(username!=NULL) free(username); goto out; } } } else { //TODO: remove this because Number_Auth_Items is not compulsory TRACE_DEBUG(FULL,"Number-Auth-Items is not included."); result="DIAMETER_UNABLE_TO_COMPLY"; if(username!=NULL) free(username); goto out; } if(username!=NULL) free(username); out: /* Set the Origin-Host, Origin-Realm, Result-Code AVPs */ CHECK_FCT( fd_msg_rescode_set( ans, result, NULL, NULL, 1 ) ); /* Send the answer */ CHECK_FCT( fd_msg_send( msg, NULL, NULL ) ); return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_sip/pushprofile.c000066400000000000000000000227661333553357400254260ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ #include "app_sip.h" #include #include #include #include #include typedef int SOCKET; typedef struct sockaddr_in SOCKADDR_IN; typedef struct sockaddr SOCKADDR; //Procedure which always wait for data on socket void *ppr_socket(void *arg) { SOCKET sock; SOCKADDR_IN sin, csin; struct pprsipaor pprsip; int rcvbytes=0; sock = socket(AF_INET, SOCK_STREAM, 0); sin.sin_addr.s_addr = inet_addr("127.0.0.1"); sin.sin_family = AF_INET; sin.sin_port = htons(as_conf->ppr_port); socklen_t sinsize = sizeof(csin); int accepted=0; if(!bind(sock, (SOCKADDR*)&sin, sizeof(sin))) { if(listen(sock,1)) { TRACE_DEBUG(INFO,"ERROR on listen!"); } while(1) { accepted=accept(sock, (struct sockaddr *)&csin,&sinsize); if(accepted>-1) { rcvbytes=recv(accepted, &pprsip, sizeof(struct pprsipaor),0); if(rcvbytes>-1) { //We received something, we can send an PPR app_sip_PPR_cb(&pprsip); } } } } else TRACE_DEBUG(INFO,"Can't create socket!"); pthread_exit(NULL); } //Called to send a PPR int app_sip_PPR_cb(struct pprsipaor *structure) { /* TRACE_ENTRY("%p", structure); int got_username=0; int got_streason=0; int num_aor=0;//How many SIP-AOR? struct dict_object * rtr_model=NULL; struct msg * message=NULL; struct avp *groupedavp=NULL, *avp=NULL; struct session *sess=NULL; union avp_value value; //We must check that we have all needed value in structure if(structure.username[0]!='\0') got_username=1; if(structure.sip_aor1[0]!='\0') { num_aor++; if(structure.sip_aor2[0]!='\0') { num_aor++; if(structure.sip_aor3[0]!='\0') num_aor++; } } if(structure.strreason!='\0') got_streason=1; TRACE_DEBUG(INFO,"We have %d SIP_AOR",num_aor); if((got_username + num_aor)==0) { //We must have a least a SIP_AOR or a Username TRACE_DEBUG(INFO,"Can not proceed because there is no SIP_AOR or Username"); return EINVAL; } if(structure.reason<0) { //We must have a least a SIP_AOR or a Username TRACE_DEBUG(INFO,"Incorrect Reason-Code"); return EINVAL; } if(structure.desthost[0]=='\0') { //We must have a least a SIP_AOR or a Username TRACE_DEBUG(INFO,"No Destination_Host was provided!"); return EINVAL; } //Create the base message for an RTR CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Registration-Termination-Request", &rtr_model, ENOENT) ); CHECK_FCT( fd_msg_new (rtr_model, 0, &message)); // Create a new session { CHECK_FCT( fd_sess_new( &sess, fd_g_config->cnf_diamid, "app_sip", 7 )); char * sid; CHECK_FCT( fd_sess_getsid ( sess, &sid )); CHECK_FCT( fd_msg_avp_new ( sip_dict.Session_Id, 0, &avp )); value.os.data = (uint8_t *)sid; value.os.len = strlen(sid); CHECK_FCT( fd_msg_avp_setvalue( avp, &value )); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_FIRST_CHILD, avp )); } //Auth_Session_State { CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Session_State, 0, &avp ) ); value.i32=1; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } //Origin_Host & Origin_Realm CHECK_FCT( fd_msg_add_origin ( message, 0 )); //Destination_Host { CHECK_FCT( fd_msg_avp_new ( sip_dict.Destination_Host, 0, &avp ) ); value.os.data=(unsigned char *)structure.desthost; value.os.len=(size_t)strlen(structure.desthost); CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } //SIP Deregistration Reason (Grouped AVP) { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Deregistration_Reason, 0, &groupedavp ) ); //Reason Code CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Reason_Code, 0, &avp ) ); value.i32=structure.reason; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( groupedavp, MSG_BRW_LAST_CHILD, avp ) ); if(got_streason) { //Reason Info CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Reason_Info, 0, &avp ) ); value.os.data=(unsigned char *)structure.strreason; value.os.len=(size_t)strlen(structure.strreason); CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( groupedavp, MSG_BRW_LAST_CHILD, avp ) ); } //We add the grouped AVP to the message CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, groupedavp ) ); } //Username { if(got_username) { CHECK_FCT( fd_msg_avp_new ( sip_dict.User_Name, 0, &avp ) ); value.os.data=(unsigned char *)structure.username; value.os.len=(size_t)strlen(structure.username); CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } } //SIP_AOR { if(num_aor>0) { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_AOR, 0, &avp ) ); value.os.data=(unsigned char *)structure.sip_aor1; value.os.len=(size_t)strlen(structure.sip_aor1); CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); if(num_aor>1) { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_AOR, 0, &avp ) ); value.os.data=(unsigned char *)structure.sip_aor2; value.os.len=(size_t)strlen(structure.sip_aor2); CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); if(num_aor>2) { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_AOR, 0, &avp ) ); value.os.data=(unsigned char *)structure.sip_aor3; value.os.len=(size_t)strlen(structure.sip_aor3); CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } } } } fd_msg_dump_walk(INFO,message); CHECK_FCT( fd_msg_send( &message, NULL, NULL )); */ return 0; } //Called when an PPA arrive int app_sip_PPA_cb( struct msg ** msg, struct avp * paramavp, struct session * sess, void * opaque, enum disp_action * act) { //TODO: PPA reception /* //TODO:remove unused variables struct msg *ans, *qry; struct avp *avp, *a2, *authdataitem; struct msg_hdr * header = NULL; struct avp_hdr * avphdr=NULL, *avpheader=NULL, *avpheader_auth=NULL,*digestheader=NULL; union avp_value val; int found_cnonce=0; struct avp * tempavp=NULL,*sipAuthentication=NULL,*sipAuthenticate=NULL; char * result; int idx=0, idx2=0, number_of_auth_items=0,i=0; //Flags and variables for Database int sipurinotstored=0, authenticationpending=0, querylen=0, usernamelen=0; char *query=NULL,*username=NULL; TRACE_ENTRY("%p %p %p %p", msg, avp, sess, act); if (msg == NULL) return EINVAL; // Create answer header qry = *msg; CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, msg, 0 ) ); ans = *msg; // Add the Auth-Session-State AVP { CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.Auth_Session_State, &avp) ); CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr ) ); CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Session_State, 0, &avp ) ); CHECK_FCT( fd_msg_avp_setvalue( avp, avphdr->avp_value ) ); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); } CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.SIP_Deregistration_Reason, &avp) ); CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr ) ); */ return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_sip/registrationtermination.c000066400000000000000000000230031333553357400300330ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ #include "app_sip.h" #include #include #include #include #include typedef int SOCKET; typedef struct sockaddr_in SOCKADDR_IN; typedef struct sockaddr SOCKADDR; //Procedure which always wait for data on socket void *rtr_socket(void *arg) { SOCKET sock; SOCKADDR_IN sin, csin; struct rtrsipaor rtrsip; int rcvbytes=0; sock = socket(AF_INET, SOCK_STREAM, 0); sin.sin_addr.s_addr = inet_addr("127.0.0.1"); sin.sin_family = AF_INET; sin.sin_port = htons(as_conf->rtr_port); socklen_t sinsize = sizeof(csin); int accepted=0; if(!bind(sock, (SOCKADDR*)&sin, sizeof(sin))) { if(listen(sock,1)) { TRACE_DEBUG(INFO,"ERROR on listen!"); } while(1) { accepted=accept(sock, (struct sockaddr *)&csin,&sinsize); if(accepted>-1) { rcvbytes=recv(accepted, &rtrsip, sizeof(struct rtrsipaor),0); if(rcvbytes>-1) { //We received something, we can send an RTR app_sip_RTR_cb(&rtrsip); } } } } else TRACE_DEBUG(INFO,"Can't create socket!"); pthread_exit(NULL); } //Called to send a RTR int app_sip_RTR_cb(struct rtrsipaor *structure) { TRACE_ENTRY("%p", structure); int got_username=0; int got_streason=0; int num_aor=0;//How many SIP-AOR? struct dict_object * rtr_model=NULL; struct msg * message=NULL; struct avp *groupedavp=NULL, *avp=NULL; union avp_value value; //We must check that we have all needed value in structure if(structure->username[0]!='\0') got_username=1; if(structure->sip_aor1[0]!='\0') { num_aor++; if(structure->sip_aor2[0]!='\0') { num_aor++; if(structure->sip_aor3[0]!='\0') num_aor++; } } if(structure->strreason!='\0') got_streason=1; TRACE_DEBUG(FULL,"Request for %d SIP_AOR to be deregistred.",num_aor); if((got_username + num_aor)==0) { //We must have a least a SIP_AOR or a Username TRACE_DEBUG(INFO,"Can not proceed because there is no SIP_AOR or Username"); return EINVAL; } if(structure->reason<0) { //We must have a least a SIP_AOR or a Username TRACE_DEBUG(INFO,"Incorrect Reason-Code"); return EINVAL; } if(structure->desthost[0]=='\0') { //We must have a least a SIP_AOR or a Username TRACE_DEBUG(INFO,"No Destination_Host was provided!"); return EINVAL; } //Create the base message for an RTR CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Registration-Termination-Request", &rtr_model, ENOENT) ); CHECK_FCT( fd_msg_new (rtr_model, 0, &message)); // Create a new session { #define APP_SIP_SID_OPT "app_sip" CHECK_FCT( fd_msg_new_session( message, (os0_t)APP_SIP_SID_OPT, CONSTSTRLEN(APP_SIP_SID_OPT) ) ); } //Add the Auth-Application-Id { CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Application_Id, 0, &avp ) ); value.i32 = 6; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( message, MSG_BRW_LAST_CHILD, avp) ); } //Auth_Session_State { CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Session_State, 0, &avp ) ); value.i32=1; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } //Origin_Host & Origin_Realm CHECK_FCT( fd_msg_add_origin ( message, 0 )); //Destination_Host { CHECK_FCT( fd_msg_avp_new ( sip_dict.Destination_Host, 0, &avp ) ); value.os.data=(unsigned char *)structure->desthost; value.os.len=(size_t)strlen(structure->desthost); CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } //SIP Deregistration Reason (Grouped AVP) { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Deregistration_Reason, 0, &groupedavp ) ); //Reason Code CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Reason_Code, 0, &avp ) ); value.i32=structure->reason; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( groupedavp, MSG_BRW_LAST_CHILD, avp ) ); if(got_streason) { //Reason Info CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Reason_Info, 0, &avp ) ); value.os.data=(unsigned char *)structure->strreason; value.os.len=(size_t)strlen(structure->strreason); CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( groupedavp, MSG_BRW_LAST_CHILD, avp ) ); } //We add the grouped AVP to the message CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, groupedavp ) ); } //Username { if(got_username) { CHECK_FCT( fd_msg_avp_new ( sip_dict.User_Name, 0, &avp ) ); value.os.data=(unsigned char *)structure->username; value.os.len=(size_t)strlen(structure->username); CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } } //SIP_AOR { if(num_aor>0) { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_AOR, 0, &avp ) ); value.os.data=(unsigned char *)structure->sip_aor1; value.os.len=(size_t)strlen(structure->sip_aor1); CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); if(num_aor>1) { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_AOR, 0, &avp ) ); value.os.data=(unsigned char *)structure->sip_aor2; value.os.len=(size_t)strlen(structure->sip_aor2); CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); if(num_aor>2) { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_AOR, 0, &avp ) ); value.os.data=(unsigned char *)structure->sip_aor3; value.os.len=(size_t)strlen(structure->sip_aor3); CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } } } } //TODO:remove for debug //fd_msg_dump_walk(INFO,message); CHECK_FCT( fd_msg_send( &message, NULL, NULL )); return 0; } //Called when an RTA arrive int app_sip_RTA_cb( struct msg ** msg, struct avp * paramavp, struct session * sess, void * opaque, enum disp_action * act) { //TODO: RTA reception /* //TODO:remove unused variables struct msg *ans, *qry; struct avp *avp, *a2, *authdataitem; struct msg_hdr * header = NULL; struct avp_hdr * avphdr=NULL, *avpheader=NULL, *avpheader_auth=NULL,*digestheader=NULL; union avp_value val; int found_cnonce=0; struct avp * tempavp=NULL,*sipAuthentication=NULL,*sipAuthenticate=NULL; char * result; int idx=0, idx2=0, number_of_auth_items=0,i=0; //Flags and variables for Database int sipurinotstored=0, authenticationpending=0, querylen=0, usernamelen=0; char *query=NULL,*username=NULL; TRACE_ENTRY("%p %p %p %p", msg, avp, sess, act); if (msg == NULL) return EINVAL; // Create answer header qry = *msg; CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, msg, 0 ) ); ans = *msg; // Add the Auth-Session-State AVP { CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.Auth_Session_State, &avp) ); CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr ) ); CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Session_State, 0, &avp ) ); CHECK_FCT( fd_msg_avp_setvalue( avp, avphdr->avp_value ) ); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); } CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.SIP_Deregistration_Reason, &avp) ); CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr ) ); */ return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_sip/serverassignment.c000066400000000000000000000316221333553357400264540ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ #include "app_sip.h" int app_sip_SAR_cb( struct msg ** msg, struct avp * paramavp, struct session * sess, void * opaque, enum disp_action * act) { TRACE_ENTRY("%p %p %p %p", msg, paramavp, sess, act); struct msg *ans, *qry; struct avp *avp; struct avp_hdr *avphdr, *sipaorhdr, *usernamehdr, *sipuserdataalreadyavailable; union avp_value value; int ret=0, assignment_type=0, got_datatype=1; struct listdatatype { struct fd_list datatype; char * type; size_t typelen; }; //Result_Code to return in the answer char result[55]; if (msg == NULL) return EINVAL; // Create answer header qry = *msg; CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, msg, 0 ) ); ans = *msg; //Add the Auth-Application-Id { CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Application_Id, 0, &avp ) ); value.i32 = 6; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( ans, MSG_BRW_LAST_CHILD, avp) ); } // Add the Auth-Session-State AVP { CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.Auth_Session_State, &avp) ); CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr ) ); CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Session_State, 0, &avp ) ); CHECK_FCT( fd_msg_avp_setvalue( avp, avphdr->avp_value ) ); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); } //Retrieve SIP-AOR { CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.SIP_AOR, &avp) ); if(avp!=NULL) { CHECK_FCT( fd_msg_avp_hdr( avp, &sipaorhdr ) ); } else sipaorhdr=NULL; } //We check if we have a username AVP { CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.User_Name, &avp) ); if(avp!=NULL) { CHECK_FCT( fd_msg_avp_hdr( avp, &usernamehdr ) ); ret=get_password(usernamehdr->avp_value->os.data, usernamehdr->avp_value->os.len, NULL); if(ret==1) {//not found strcpy(result,"DIAMETER_ERROR_USER_UNKNOWN"); goto out; } else if(ret==2) {//error //We couldn't make the request, we must stop process! strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } else if(ret==0) {//found if(sipaorhdr!=NULL) { //We must check that this user can use this SIP-AOR ret=check_sipaor(usernamehdr->avp_value->os.data, usernamehdr->avp_value->os.len,(const char *) sipaorhdr->avp_value->os.data,sipaorhdr->avp_value->os.len); if(ret==0) { //The SIP-AOR and Username are ok! ret=clear_pending_flag(usernamehdr->avp_value->os.data, usernamehdr->avp_value->os.len); if(ret==2) { TRACE_DEBUG(INFO,"ERROR: We couldn't clear the flag of pending authentication.'"); strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } } else if(ret==1) {//not found strcpy(result,"DIAMETER_ERROR_IDENTITIES_DONT_MATCH"); goto out; } else {//error //We couldn't make the request, we must stop process! strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } } else { TRACE_DEBUG(INFO,"ERROR: There is no SIP-AOR AVP!'"); strcpy(result,"DIAMETER_ERROR_IDENTITIES_DONT_MATCH"); goto out; } } } else { if(sipaorhdr!=NULL) {//If we have a SIP-AOR, we want the user to check it. strcpy(result,"DIAMETER_USER_NAME_REQUIRED"); goto out; } usernamehdr=NULL; } } //We get the SIP_Server_Assignment_Type { CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.SIP_Server_Assignment_Type, &avp) ); CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr ) ); assignment_type=avphdr->avp_value->i32; } //We get SIP_User_Data_Already_Available AVP { CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.SIP_User_Data_Already_Available, &avp) ); CHECK_FCT( fd_msg_avp_hdr( avp, &sipuserdataalreadyavailable ) ); } if(assignment_type==1 || assignment_type==2) {//registration & re-registration if(count_avp(qry,CODE_SIP_AOR,0)==1) { if(sipuserdataalreadyavailable->avp_value->i32==0) {//Data not available, we must provide it ret=add_user_datatype(sipaorhdr->avp_value->os.data, sipaorhdr->avp_value->os.len,ans); if(ret==0) { //We found and added datatype got_datatype=1; } else if(ret==1) { //No data type was found got_datatype=0; } else {//error //We couldn't make the request, we must stop process! strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } } strcpy(result,"DIAMETER_SUCCESS"); goto out; } else {//There is more than 1 SIP-AOR AVP strcpy(result,"DIAMETER_AVP_OCCURS_TOO_MANY_TIMES"); goto out; } } else if(assignment_type==3) {//Unregistered user //TODO:place user unknown here! if(count_avp(qry,CODE_SIP_AOR,0)==1) { if(sipuserdataalreadyavailable->avp_value->i32==0) {//Data not available, we must provide it if(got_datatype==1) { ret=add_user_datatype(sipaorhdr->avp_value->os.data, sipaorhdr->avp_value->os.len,ans); if(ret==0) { //We found and added datatype got_datatype=1; } else if(ret==1) { //No data type was found got_datatype=0; } else {//error //We couldn't make the request, we must stop process! strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } } } strcpy(result,"DIAMETER_SUCCESS"); goto out; } else {//There is more than 1 SIP-AOR AVP strcpy(result,"DIAMETER_AVP_OCCURS_TOO_MANY_TIMES"); goto out; } if(sipuserdataalreadyavailable->avp_value->i32==0) {//Data not available, we must provide it if(got_datatype==1) { ret=add_user_datatype(sipaorhdr->avp_value->os.data, sipaorhdr->avp_value->os.len,ans); if(ret==0) { //We found and added datatype got_datatype=1; } else if(ret==1) { //No data type was found got_datatype=0; } else {//error //We couldn't make the request, we must stop process! strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } } } CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.SIP_Server_URI, &avp) ); if(avp!=NULL) { CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr )); set_real_sipserver_uri(usernamehdr->avp_value->os.data, usernamehdr->avp_value->os.len, avphdr->avp_value->os.data,avphdr->avp_value->os.len); strcpy(result,"DIAMETER_SUCCESS"); goto out; } else { TRACE_DEBUG(INFO,"There is no SIP_Server_URI AVP in this Unregistered User Request!"); strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } } else if(assignment_type==4 || assignment_type==5 || assignment_type==11 || assignment_type==8) {//Unregistered user if(got_datatype==1) { if(sipuserdataalreadyavailable->avp_value->i32==0) {//Data not available, we must provide it ret=add_user_datatype(sipaorhdr->avp_value->os.data, sipaorhdr->avp_value->os.len,ans); if(ret==0) { //We found and added datatype got_datatype=1; } else if(ret==1) { //No data type was found got_datatype=0; } else {//error //We couldn't make the request, we must stop process! strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } } } if(sipaorhdr==NULL) { //We don't have any SIP-AOR to unregister, this is strange!' TRACE_DEBUG(INFO, "There was no SIP-AOR in this request, we can't proceed request!'"); strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } else { //TODO: unregister SIP-Server-URI for all SIP-AOR } strcpy(result,"DIAMETER_SUCCESS"); goto out; } else if(assignment_type==6 || assignment_type==7) { CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.SIP_Server_URI, &avp) ); if(avp!=NULL) { CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr )); //TODO: set SIP server URI for each AOR //TODO: unregister all SIP-AOR provided //set_real_sipserver_uri(usernamehdr->avp_value->os.data, usernamehdr->avp_value->os.len, avphdr->avp_value->os.data,avphdr->avp_value->os.len); strcpy(result,"DIAMETER_SUCCESS"); goto out; } else { //TODO: unregister all SIP-AOR provided //TODO: clear sip server uri in database for the sip-aor TRACE_DEBUG(INFO,"There is no SIP_Server_URI AVP in this Deregistration User Request! We just unregister SIP-AOR"); strcpy(result,"DIAMETER_SUCCESS_SERVER_NAME_NOT_STORED"); goto out; } } else if(assignment_type==0) { CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.SIP_Server_URI, &avp) ); if(avp!=NULL) { unsigned char * sipserver_uri; size_t sipserverurilen; ret=get_sipserver_uri(sipaorhdr->avp_value->os.data, sipaorhdr->avp_value->os.len, &sipserver_uri, &sipserverurilen); if(ret==0) {//found CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr )); if(strncmp((char *)avphdr->avp_value->os.data,(char *)sipserver_uri,sipserverurilen)) { if(got_datatype==1) { if(sipuserdataalreadyavailable->avp_value->i32==0) {//Data not available, we must provide it ret=add_user_datatype(sipaorhdr->avp_value->os.data, sipaorhdr->avp_value->os.len,ans); if(ret==0) { //We found and added datatype got_datatype=1; } else if(ret==1) { //No data type was found got_datatype=0; } else {//error //We couldn't make the request, we must stop process! strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } } } } else {//error TRACE_DEBUG(FULL,"SIP_Server_URI is different from the one in database"); strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } } else { TRACE_DEBUG(FULL,"SIP_Server_URI is different from the one in database"); strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } //set_real_sipserver_uri(usernamehdr->avp_value->os.data, usernamehdr->avp_value->os.len, avphdr->avp_value->os.data,avphdr->avp_value->os.len); strcpy(result,"DIAMETER_SUCCESS"); goto out; } else { TRACE_DEBUG(INFO, "There was no SIP_Server_URI in this request, we can't proceed request!'"); strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } } else if(assignment_type==9 || assignment_type==10) { if(count_avp(qry, CODE_SIP_AOR,0)==1) { //TODO: remove SIP-server URI for sip_aor //TODO: unregister it strcpy(result,"DIAMETER_SUCCESS"); goto out; } else {//There is more than 1 SIP-AOR AVP strcpy(result,"DIAMETER_AVP_OCCURS_TOO_MANY_TIMES"); goto out; } } out: CHECK_FCT( fd_msg_rescode_set( ans, result, NULL, NULL, 1 ) ); //fd_msg_dump_walk(INFO,ans); CHECK_FCT( fd_msg_send( msg, NULL, NULL )); return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_sip/tools/000077500000000000000000000000001333553357400240455ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_sip/tools/CMakeLists.txt000066400000000000000000000005361333553357400266110ustar00rootroot00000000000000# Utilities for app_sip PROJECT("Diameter SIP Application (RFC4740) tools" C) ADD_EXECUTABLE(freediameter-sip-rtr app_sip_rtr.c) ADD_EXECUTABLE(freediameter-sip-ppr app_sip_ppr.c) #### ## INSTALL section ## INSTALL(TARGETS freediameter-sip-rtr freediameter-sip-ppr RUNTIME DESTINATION ${INSTALL_DAEMON_SUFFIX} COMPONENT freeDiameter-sip-server) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_sip/tools/app_sip_ppr.c000066400000000000000000000135331333553357400265320ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ // This file is separated from the source code because it is a separate command which will call push profile function in Diameter-SIP #include #include #include #include #include typedef int SOCKET; typedef struct sockaddr_in SOCKADDR_IN; typedef struct sockaddr SOCKADDR; #include #include #include #include struct pprsipaor { char username[200]; char datatype1[255]; char datatype2[255]; char datatype3[255]; int accounting; }; int main (int argc, char **argv) { SOCKET sock; SOCKADDR_IN sin; struct pprsipaor pprsip; int numdatatype=0,i=0; int port=667; sock = socket(AF_INET, SOCK_STREAM, 0); sin.sin_addr.s_addr = inet_addr("127.0.0.1"); sin.sin_family = AF_INET; //We initialize the structure pprsip.username[0]='\0'; pprsip.datatype1[0]='\0'; pprsip.datatype2[0]='\0'; pprsip.datatype3[0]='\0'; pprsip.accounting=0; //Start of arguments check if(argc<3) { fprintf(stderr,"Missing arguments! You must at least provide a username.\n"); return 1; } for (i=1;i254) { fprintf(stderr,"User-data type is too long!\n"); } else { if(numdatatype<3) { switch(numdatatype) { case 0: strcpy(pprsip.datatype1,argv[i]); break; case 1: strcpy(pprsip.datatype2,argv[i]); break; case 2: strcpy(pprsip.datatype3,argv[i]); break; } numdatatype++; } else { fprintf(stderr,"You can not provide more than 3 User-data type at the same time!\n"); break; } } i=j+1; } else { //We have a new argument i--; break; } } } else if(strcmp(argv[i],"-a")==0) { pprsip.accounting=1; } else if(strcmp(argv[i],"-p")==0) { if(sscanf(argv[i+1],"%d", &port)!=1) { fprintf(stderr,"Incorrect port number!\n"); return 1; } i++; } } else { fprintf(stderr,"Unknown argument: %s\n",argv[i]); i++; } } //We set the port number sin.sin_port = htons(port); //We want a username if(strlen(pprsip.username)==0) { fprintf(stderr,"You must provide a username!\n"); return 1; } fprintf(stderr,"%d!\n",port); /* //DEBUG fprintf(stderr,"*%s*\n",pprsip.username); fprintf(stderr,"*%s*\n",pprsip.datatype1); fprintf(stderr,"*%s*\n",pprsip.datatype2); fprintf(stderr,"*%s*\n",pprsip.datatype3); fprintf(stderr,"*%d*\n",pprsip.accounting); return 0; */ //TODO: check args if(!connect(sock, (SOCKADDR*)&sin, sizeof(sin))) { fprintf(stderr,"Connexion succeed!\n"); if(send(sock, &pprsip, sizeof(struct pprsipaor), 0)) fprintf(stderr,"sent OK!\n"); else fprintf(stderr,"not sent\n"); } else { fprintf(stderr,"Unable to connect\n"); } close(sock); return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_sip/tools/app_sip_rtr.c000066400000000000000000000163321333553357400265400ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ // This file is separated from the source code because it is a separate command which will call registration termination function in Diameter-SIP #include #include #include #include #include typedef int SOCKET; typedef struct sockaddr_in SOCKADDR_IN; typedef struct sockaddr SOCKADDR; #include #include #include #include struct rtrsipaor { char username[200]; char sip_aor1[200]; char sip_aor2[200]; char sip_aor3[200]; char strreason[200]; char desthost[200]; int reason; }; int main (int argc, char **argv) { SOCKET sock; SOCKADDR_IN sin; struct rtrsipaor rtrsip; int numaor=0,i=0; int port=666; sock = socket(AF_INET, SOCK_STREAM, 0); sin.sin_addr.s_addr = inet_addr("127.0.0.1"); sin.sin_family = AF_INET; //We initialize the structure rtrsip.username[0]='\0'; rtrsip.sip_aor1[0]='\0'; rtrsip.sip_aor2[0]='\0'; rtrsip.sip_aor3[0]='\0'; rtrsip.strreason[0]='\0'; rtrsip.desthost[0]='\0'; rtrsip.reason=-1; //Start of arguments check if(argc<3) { fprintf(stderr,"Missing arguments! You must at least provide a username.\n"); return 1; } for (i=1;i199) { fprintf(stderr,"SIP-AOR is too long!\n"); } else if(strncmp(argv[i],"sip",3)!=0) { //Bad format of SIP-AOR fprintf(stderr,"A SIP-AOR must start by 'sip:' or 'sips:'. Aborting...\n"); return 1; } else { if(numaor<3) { switch(numaor) { case 0: strcpy(rtrsip.sip_aor1,argv[i]); break; case 1: strcpy(rtrsip.sip_aor2,argv[i]); break; case 2: strcpy(rtrsip.sip_aor3,argv[i]); break; } numaor++; } else { fprintf(stderr,"You can not provide more than 3 SIP-AOR at the same time!\n"); break; } } i=j+1; } else { //We have a new argument i--; break; } } } else if(strcmp(argv[i],"-r")==0) { if(strlen(argv[i+1])>199) { fprintf(stderr,"Deregistration reason is too long!\n"); } else { strcpy(rtrsip.strreason,argv[i+1]); } i++; } else if(strcmp(argv[i],"-h")==0) { //Remote SIP Server if(strlen(argv[i+1])>199) { fprintf(stderr,"Host is too long!\n"); } else if(strlen(argv[i+1])<5) { fprintf(stderr,"Host is too short!\n"); } else { strcpy(rtrsip.desthost,argv[i+1]); } i++; } else if(strcmp(argv[i],"-pt")==0) { //Permanent Termination rtrsip.reason=0; } else if(strcmp(argv[i],"-nssa")==0) { //New SIP Server Assigned rtrsip.reason=1; } else if(strcmp(argv[i],"-ssc")==0) { //SIP Server Change rtrsip.reason=2; } else if(strcmp(argv[i],"-rss")==0) { //Remote SIP Server rtrsip.reason=3; } else if(strcmp(argv[i],"-p")==0) { if(sscanf(argv[i+1],"%d", &port)!=1) { fprintf(stderr,"Incorrect port number!\n"); return 1; } i++; } else { fprintf(stderr,"Unknown argument: %s\n",argv[i]); } } else { fprintf(stderr,"Unknown argument: %s\n",argv[i]); i++; } } //If no SIP-AOR provided, we remove all if(numaor<1) { fprintf(stderr,"All SIP-AOR of %s will be deregistrated.\n",rtrsip.username); } //We want a username if(strlen(rtrsip.username)==0) { fprintf(stderr,"You must provide a username!\n"); return 1; } if(rtrsip.desthost[0]=='\0') { fprintf(stderr,"You must provide the hostname of SIP-Server!\n"); return 1; } //We set the port number sin.sin_port = htons(port); /* fprintf(stderr,"*%s*\n",rtrsip.username); fprintf(stderr,"*%s*\n",rtrsip.sip_aor1); fprintf(stderr,"*%s*\n",rtrsip.sip_aor2); fprintf(stderr,"*%s*\n",rtrsip.sip_aor3); fprintf(stderr,"*%d*\n",rtrsip.reason); fprintf(stderr,"*%s*\n",rtrsip.strreason); //return 0; */ //TODO: check args if(!connect(sock, (SOCKADDR*)&sin, sizeof(sin))) { fprintf(stderr,"Connexion succeed!\n"); if(send(sock, &rtrsip, sizeof(struct rtrsipaor), 0)) fprintf(stderr,"sent OK!\n"); else fprintf(stderr,"not sent\n"); } else { fprintf(stderr,"Unable to connect\n"); } close(sock); return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/app_sip/userauthorization.c000066400000000000000000000235361333553357400266610ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ #include "app_sip.h" int app_sip_UAR_cb( struct msg ** msg, struct avp * paramavp, struct session * sess, void * opaque, enum disp_action * act) { TRACE_ENTRY("%p %p %p %p", msg, paramavp, sess, act); struct msg *ans, *qry; struct avp *avp, *groupedavp=NULL; struct avp_hdr *avphdr, *sipaorhdr, *visitednethdr, *usernamehdr; union avp_value value; int ret=0, hascap=0; //Result_Code to return in the answer char result[55]; if (msg == NULL) return EINVAL; // Create answer header qry = *msg; CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, msg, 0 ) ); ans = *msg; //Add the Auth-Application-Id { CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Application_Id, 0, &avp ) ); value.i32 = 6; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( ans, MSG_BRW_LAST_CHILD, avp) ); } // Add the Auth-Session-State AVP { CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.Auth_Session_State, &avp) ); CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr ) ); CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Session_State, 0, &avp ) ); CHECK_FCT( fd_msg_avp_setvalue( avp, avphdr->avp_value ) ); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); } //Retrieve SIP-AOR { CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.SIP_AOR, &avp) ); CHECK_FCT( fd_msg_avp_hdr( avp, &sipaorhdr ) ); } //We check if we have a User-Name AVP { CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.User_Name, &avp) ); if(avp!=NULL) { CHECK_FCT( fd_msg_avp_hdr( avp, &usernamehdr ) ); ret=get_password(usernamehdr->avp_value->os.data, usernamehdr->avp_value->os.len, NULL); if(ret==1) {//not found strcpy(result,"DIAMETER_ERROR_USER_UNKNOWN"); goto out; } else if(ret==2) {//error //We couldn't make the request, we must stop process! strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } else if(ret==0) {//found //We must check that this user can use this SIP-AOR ret=check_sipaor(usernamehdr->avp_value->os.data, usernamehdr->avp_value->os.len, (const char *)sipaorhdr->avp_value->os.data,sipaorhdr->avp_value->os.len); if(ret==0) { //The SIP-AOR and Username are ok! } else if(ret==1) {//not found strcpy(result,"DIAMETER_ERROR_IDENTITIES_DONT_MATCH"); goto out; } else {//error //We couldn't make the request, we must stop process! strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } } } } //We check if we have a SIP-Visited-Network-Id AVP { CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.SIP_Visited_Network_Id, &avp) ); if(avp!=NULL) { CHECK_FCT( fd_msg_avp_hdr( avp, &visitednethdr ) ); } else visitednethdr=NULL; } //We check if we have a SIP_User_Authorization_Type { int auth_type; CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.SIP_User_Authorization_Type, &avp) ); if(avp!=NULL) { CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr ) ); auth_type=avphdr->avp_value->i32; if(auth_type==0 || auth_type==2) { if(visitednethdr!=NULL) { /* If there is a SIP-Visited-Network-Id AVP in the Diameter UAR message, and the SIP-User-Authorization-Type AVP value received in the Diameter UAR message is set to REGISTRATION or REGISTRATION& CAPABILITIES, then the Diameter server SHOULD verify whether the user is allowed to roam into the network specified in the SIP-Visited-Network-Id AVP in the Diameter UAR message. If the user is not allowed to roam into that network, the Diameter AAA server MUST set the Result-Code AVP value in the Diameter UAA message to DIAMETER_ERROR_ROAMING_NOT_ALLOWED. */ ret=allow_roaming(usernamehdr->avp_value->os.data, usernamehdr->avp_value->os.len, (const char *)visitednethdr->avp_value->os.data,visitednethdr->avp_value->os.len); if(ret==0) { //This user can come in this network } else if(ret==1) { strcpy(result,"DIAMETER_ERROR_ROAMING_NOT_ALLOWED"); goto out; } else { strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } } /* If the SIP-User-Authorization-Type AVP value received in the Diameter UAR message is set to REGISTRATION or REGISTRATION&CAPABILITIES, then the Diameter server SHOULD verify whether the SIP-AOR AVP value is authorized to register in the Home Realm. Where the SIP AOR is not authorized to register in the Home Realm, the Diameter server MUST set the Result-Code AVP to DIAMETER_AUTHORIZATION_REJECTED and send it in a Diameter UAA message. */ ret=exist_username(sipaorhdr->avp_value->os.data, sipaorhdr->avp_value->os.len); if(ret==0) { //The SIP_AOR exists in this realm } else if(ret==1) { strcpy(result,"DIAMETER_AUTHORIZATION_REJECTED"); goto out; } else { strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } } } else auth_type=0; //Registration only (default value if absent) //Let's look for the SIP_Server_URI' unsigned char *sipserver_uri; size_t sipserverurilen; ret=get_sipserver_uri(sipaorhdr->avp_value->os.data, sipaorhdr->avp_value->os.len, &sipserver_uri, &sipserverurilen); if(ret==0) {//We know a SIP Server so we must provide it //We only add this AVP when we have registration or deregistration if(auth_type==0 ||auth_type==1) { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Server_URI, 0, &avp ) ); value.os.data=sipserver_uri; value.os.len=sipserverurilen; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); } } else if(ret==1) { sipserver_uri=NULL; sipserverurilen=0; } else { strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } //If we have a REGISTRATION or REGISTRATION & CAPABILITIES if(auth_type==0 ||auth_type==2) { //Adding SIP-Server-Capabilities CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Server_Capabilities, 0, &groupedavp ) ); ret=get_sipserver_cap(sipaorhdr->avp_value->os.data, sipaorhdr->avp_value->os.len,&groupedavp); if(ret==0) { CHECK_FCT( fd_msg_avp_add ( ans, MSG_BRW_LAST_CHILD, groupedavp) ); hascap=1; } else if(ret==1) { hascap=0; } else { CHECK_FCT( fd_msg_free( groupedavp ) ); strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } } if(auth_type==0) {//Registration if(sipserver_uri==NULL) { strcpy(result,"DIAMETER_FIRST_REGISTRATION"); } else { if(hascap==1) { strcpy(result,"DIAMETER_SERVER_SELECTION"); } else { //We free the Capabilities AVP because we didn't found any' if(groupedavp!=NULL) CHECK_FCT( fd_msg_free( groupedavp ) ); strcpy(result,"DIAMETER_SUBSEQUENT_REGISTRATION"); } } } else if(auth_type==2) {//Registration & Capabilities //We let the groupedavp in the message even if there is no capabilities if(hascap==0) { CHECK_FCT( fd_msg_avp_add ( ans, MSG_BRW_LAST_CHILD, groupedavp) ); } strcpy(result,"DIAMETER_SUCCESS"); } else if(auth_type==1) {//Deregistration if(sipserver_uri==NULL) { strcpy(result,"DIAMETER_ERROR_IDENTITY_NOT_REGISTERED"); } else { strcpy(result,"DIAMETER_SUCCESS"); } } else {//We should never be here!! strcpy(result,"DIAMETER_UNABLE_TO_COMPLY"); goto out; } } out: CHECK_FCT( fd_msg_rescode_set( ans, result, NULL, NULL, 1 ) ); //fd_msg_dump_walk(INFO,ans); CHECK_FCT( fd_msg_send( msg, NULL, NULL )); return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_interactive/000077500000000000000000000000001333553357400244035ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_interactive/CMakeLists.txt000066400000000000000000000045711333553357400271520ustar00rootroot00000000000000# The dbg_interactive extension PROJECT("Interactive debug facility based on SWIG" C) # This module is using Python SET(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0) FIND_PACKAGE(PythonLibs) INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}) ##### # Wrapper to fD in python FIND_PACKAGE(SWIG REQUIRED) INCLUDE(${SWIG_USE_FILE}) SET(CMAKE_SWIG_FLAGS -castmode -threads) # Add the dependencies for re-swig-ing the file SET(SWIG_MODULE_fDpy_EXTRA_DEPS ${CMAKE_BINARY_DIR}/include/freeDiameter/freeDiameter-host.h ${CMAKE_SOURCE_DIR}/include/freeDiameter/libfdcore.h ${CMAKE_SOURCE_DIR}/include/freeDiameter/libfdproto.h lists.i dictionary.i sessions.i routing.i messages.i dispatch.i queues.i peers.i events.i endpoints.i posix.i hooks.i ) SET_SOURCE_FILES_PROPERTIES(dbg_interactive.i PROPERTIES SWIG_MODULE_NAME fDpy) # The following code is inspired from SWIG_ADD_MODULE, but we do only what we need SWIG_MODULE_INITIALIZE(fDpy python) SWIG_ADD_SOURCE_TO_MODULE(fDpy swig_generated_sources "dbg_interactive.i") # In order to avoid shipping the python file that contains the shadow class definitions, # we transform this file in a C-style string and compile it within our software. # We use for this purpose xxd tool provided with vim package. FIND_PROGRAM(XXD_EXECUTABLE xxd) # To avoid the dependency, simply compile it if not provided if (NOT XXD_EXECUTABLE) SET_SOURCE_FILES_PROPERTIES(helper/xxd.c PROPERTIES COMPILE_DEFINITIONS UNIX) ADD_EXECUTABLE(xxd helper/xxd.c) SET(XXD_EXECUTABLE xxd) endif (NOT XXD_EXECUTABLE) # And now the magic command ADD_CUSTOM_COMMAND( OUTPUT "fDpy-inc.c" COMMAND "${XXD_EXECUTABLE}" ARGS "-i" "fDpy.py" "fDpy-inc.c" MAIN_DEPENDENCY "${swig_extra_generated_files}" COMMENT "Shadow definitions") # Ensure that the generated source files are removed GET_DIRECTORY_PROPERTY(swig_extra_clean_files ADDITIONAL_MAKE_CLEAN_FILES) SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${swig_extra_clean_files};${swig_generated_sources};fDpy-inc.c") ##### # Extension that embeds the python interpreter FD_ADD_EXTENSION(dbg_interactive dbg_interactive.c ${swig_generated_sources} fDpy-inc.c) TARGET_LINK_LIBRARIES(dbg_interactive ${PYTHON_LIBRARIES}) #### ## INSTALL section ## INSTALL(TARGETS dbg_interactive LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-debug-tools) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_interactive/dbg_interactive.c000066400000000000000000000115611333553357400277040ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include #include #include /* wrapper generated by SWIG */ #if PY_VERSION_HEX >= 0x03000000 extern void PyInit__fDpy(void); #define WRAPPER_INIT PyInit__fDpy() #else /* PY_VERSION_HEX */ extern void init_fDpy(void); #define WRAPPER_INIT init_fDpy() #endif /* PY_VERSION_HEX */ /* The string created in the shadow proxy C string file */ extern unsigned char fDpy_py[]; extern unsigned int fDpy_py_len; /* Run an interactive interpreter in a separate thread */ static pthread_t pyinterp = (pthread_t)NULL; static void * myinterp (void * arg) { char * dum[3] = { "", arg, NULL }; TRACE_ENTRY("%p", arg); fd_log_threadname ( "fDpy" ); CHECK_FCT_DO(fd_core_waitstartcomplete(), goto end); if (arg) { fd_log_debug("Starting python interpreter with a script file [experimental]."); Py_Main(2, dum); } else { if (!isatty(fileno(stdin)) || !isatty(fileno(stdout))) { TRACE_ERROR("[dbg_interactive]: this extension requires freeDiameter to be run from a console terminal!"); goto end; } printf("Starting interactive python interpreter [experimental].\n"); printf("Please use Ctrl-D to exit.\n"); printf("Example syntax:\n"); printf(" >>> print cvar.fd_g_config.cnf_diamid\n"); printf(" '%s'\n", fd_g_config->cnf_diamid); Py_Main(1, dum); printf("Python interpreter has exited...\n"); } end: /* Upon exit, issue the order of terminating to fD, if the interpreter was started without a file */ if (!arg) { (void)fd_core_shutdown(); } return NULL; } /* Register the callbacks to the daemon */ static int di_main(char * conffile) { char * shadow_hlp = NULL; int mustfree = 0; TRACE_ENTRY("%p", conffile); Py_InitializeEx(0); WRAPPER_INIT; /* Small hack to avoid duplicating the string, we replace the last char by a \0. It works if the python file is terminated with several \n */ if ( (fDpy_py[fDpy_py_len - 2] == '\n') && (fDpy_py[fDpy_py_len - 1] == '\n')) { fDpy_py[fDpy_py_len - 1] = '\0'; shadow_hlp = (char *)&fDpy_py[0]; } else { CHECK_MALLOC(shadow_hlp = malloc(fDpy_py_len + 1)); memcpy(shadow_hlp, fDpy_py, fDpy_py_len); shadow_hlp[fDpy_py_len] = '\0'; mustfree=1; } PyRun_SimpleString("__file__ = \"\"\n"); PyRun_SimpleString(shadow_hlp); if (mustfree) free(shadow_hlp); CHECK_POSIX( pthread_create(&pyinterp, NULL, myinterp, conffile) ); return 0; } /* Terminate the extension */ void fd_ext_fini(void) { TRACE_ENTRY(); void * ret; /* Cleanup the python interpreter */ Py_Finalize(); pthread_join(pyinterp, &ret); return ; } /* Define the entry point function */ EXTENSION_ENTRY("dbg_interactive", di_main); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_interactive/dbg_interactive.i000066400000000000000000000155331333553357400277150ustar00rootroot00000000000000/* This interface file is processed by SWIG to create a python wrapper interface to freeDiameter framework. */ %module fDpy %begin %{ /********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ %} %{ /* This text is included in the generated wrapper verbatim */ #define SWIG #include %} /* Include standard types & functions used in freeDiameter headers */ %include //%include %include %include /* Inline functions seems to give problems to SWIG -- just remove the inline definition */ %define __inline__ %enddef /* Make some global-variables read-only (mainly to avoid warnings) */ %immutable fd_g_config; %immutable peer_state_str; #pragma SWIG nowarn=451 /***************** * Exceptions * *****************/ %{ /* This is not thread-safe etc. but it should work /most of the time/. */ static int wrapper_errno; static PyObject* wrapper_errno_py; static const char * wrapper_error_txt; /* if NULL, use strerror(errno) */ #define DI_ERROR(code, pycode, str) { \ fd_log_debug("[dbg_interactive] ERROR: %s: %s", __PRETTY_FUNCTION__, str ? str : strerror(code)); \ wrapper_errno = code; \ wrapper_errno_py = pycode; \ wrapper_error_txt = str; \ } #define DI_ERROR_MALLOC \ DI_ERROR(ENOMEM, PyExc_MemoryError, NULL) %} %exception { /* reset the errno */ wrapper_errno = 0; /* Call the function -- it will use DI_ERROR macro in case of error */ $action /* Now, test for error */ if (wrapper_errno) { const char * str = wrapper_error_txt ? wrapper_error_txt : strerror(wrapper_errno); PyObject * exc = wrapper_errno_py; if (!exc) { switch (wrapper_errno) { case ENOMEM: exc = PyExc_MemoryError; break; case EINVAL: exc = PyExc_ValueError; break; default: exc = PyExc_RuntimeError; } } SWIG_PYTHON_THREAD_BEGIN_BLOCK; PyErr_SetString(exc, str); SWIG_fail; SWIG_PYTHON_THREAD_END_BLOCK; } } /*********************************** Some types & typemaps for usability ***********************************/ %apply (char *STRING, size_t LENGTH) { ( char * string, size_t len ) }; %apply (char *STRING, size_t LENGTH) { ( uint8_t * string, size_t len ) }; /* Generic typemap for functions that create something */ %typemap(in, numinputs=0,noblock=1) SWIGTYPE ** OUTPUT (void *temp = NULL) { $1 = (void *)&temp; } %typemap(argout,noblock=1) SWIGTYPE ** OUTPUT { %append_output(SWIG_NewPointerObj(*$1, $*1_descriptor, 0)); } /* Case of the fd_*_dump functions */ %typemap(in,noblock=1,numinputs=0) (char ** buf, size_t *len, size_t *offset) ($*1_ltype temp = NULL, $*2_ltype tempn = 0) { $1 = &temp; $2 = &tempn; $3 = NULL; } %typemap(freearg,match="in") (char ** buf, size_t *len, size_t *offset) ""; %typemap(argout,noblock=1,fragment="SWIG_FromCharPtr")(char ** buf, size_t *len, size_t *offset) { if (*$1) { %append_output(SWIG_FromCharPtr(*$1)); free(*$1); } } /* Typemap to return a boolean value as output parameter */ %typemap(in, numinputs=0,noblock=1) int * BOOL_OUT (int temp) { $1 = &temp; } %typemap(argout,noblock=1) int * BOOL_OUT { PyObject * r; if (*$1) r = Py_True; else r = Py_False; Py_XINCREF(r); %append_output(r); } /* To allow passing callback functions defined in python */ %typemap(in) PyObject *PyCb { if (!$input || ($input == Py_None)) { $1 = NULL; } else { if (!PyCallable_Check($input)) { PyErr_SetString(PyExc_TypeError, "Need a callable object!"); SWIG_fail; } $1 = $input; } } %{ /* Forward declaration for the peers module */ static void fd_add_cb(struct peer_info *peer, void *data); /* This one gives problems when included from the header file */ void fd_log_va( int, const char *, va_list); void fd_log_deprecated( int level, const char *format, ... ) MARK_DEPRECATED { va_list ap; va_start(ap, format); fd_log_va(level, format, ap); va_end(ap); } %} /* Overwrite declaration to apply typemaps */ int fd_sess_fromsid ( uint8_t * string, size_t len, struct session ** OUTPUT, int * BOOL_OUT); /********************************************************* Now, create wrappers for (almost) all objects from fD API *********************************************************/ %include "freeDiameter/freeDiameter-host.h" %include "freeDiameter/libfdproto.h" %include "freeDiameter/libfdcore.h" /* Most of the functions from the API are not directly usable "as is". See the specific following files and the dbg_interactive.py.sample file for more usable python-style versions. */ %include "lists.i" %include "dictionary.i" %include "sessions.i" %include "routing.i" %include "messages.i" %include "dispatch.i" %include "queues.i" %include "peers.i" %include "events.i" %include "endpoints.i" %include "hooks.i" %include "posix.i" nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_interactive/dictionary.i000066400000000000000000000270161333553357400267300ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Do not include this directly, use dbg_interactive.i instead */ /****** DICTIONARY *********/ struct dictionary { }; %extend dictionary { dictionary() { struct dictionary * r = NULL; int ret = fd_dict_init(&r); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return r; } ~dictionary() { struct dictionary *d = self; int ret = fd_dict_fini(&d); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } return; } void dump() { char * buf = NULL; size_t len; printf("%s", fd_dict_dump(&buf, &len, NULL, $self)); free(buf); } PyObject * vendors_list() { uint32_t *list = NULL, *li; PyObject * ret; SWIG_PYTHON_THREAD_BEGIN_BLOCK; ret = PyList_New(0); list = fd_dict_get_vendorid_list($self); for (li = list; *li != 0; li++) { PyList_Append(ret, PyInt_FromLong((long)*li)); } free(list); SWIG_PYTHON_THREAD_END_BLOCK; return ret; } struct dict_object * new_obj(enum dict_object_type type, void * data, struct dict_object * parent = NULL) { struct dict_object * obj = NULL; int ret = fd_dict_new($self, type, data, parent, &obj); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return obj; } struct dict_object * search(enum dict_object_type type, int criteria, int what_by_val) { struct dict_object * obj = NULL; int ret = fd_dict_search ( $self, type, criteria, &what_by_val, &obj, ENOENT ); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return obj; } struct dict_object * search(enum dict_object_type type, int criteria, char * what_by_string) { struct dict_object * obj = NULL; int ret = fd_dict_search ( $self, type, criteria, what_by_string, &obj, ENOENT ); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return obj; } struct dict_object * search(enum dict_object_type type, int criteria, void * what) { struct dict_object * obj = NULL; int ret = fd_dict_search ( $self, type, criteria, what, &obj, ENOENT ); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return obj; } struct dict_object * error_cmd() { struct dict_object * obj = NULL; int ret = fd_dict_get_error_cmd ( $self, &obj ); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return obj; } } %nodefaultctor dict_object; struct dict_object { }; %extend dict_object { void dump() { char * buf = NULL; size_t len; printf("%s", fd_dict_dump_object(&buf, &len, NULL, $self)); free(buf); } enum dict_object_type gettype() { enum dict_object_type t; int ret = fd_dict_gettype ( $self, &t); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return 0; } return t; } struct dictionary * getdict() { struct dictionary *d; int ret = fd_dict_getdict ( $self, &d ); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return d; } /* Since casting the pointer requires intelligence, we do it here instead of giving it to SWIG */ PyObject * getval() { /* first, get the type */ enum dict_object_type t; int ret = fd_dict_gettype ( $self, &t); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } switch (t) { %define %GETVAL_CASE(TYPE,STRUCT) case TYPE: { PyObject * v = NULL; struct STRUCT * data = NULL; data = malloc(sizeof(struct STRUCT)); if (!data) { DI_ERROR_MALLOC; return NULL; } ret = fd_dict_getval($self, data); if (ret != 0) { DI_ERROR(ret, NULL, NULL); free(data); return NULL; } SWIG_PYTHON_THREAD_BEGIN_BLOCK; v = SWIG_NewPointerObj((void *)data, SWIGTYPE_p_##STRUCT, SWIG_POINTER_OWN ); Py_XINCREF(v); SWIG_PYTHON_THREAD_END_BLOCK; return v; } break %enddef %GETVAL_CASE( DICT_VENDOR, dict_vendor_data ); %GETVAL_CASE( DICT_APPLICATION, dict_application_data ); %GETVAL_CASE( DICT_TYPE, dict_type_data ); %GETVAL_CASE( DICT_ENUMVAL, dict_enumval_data ); %GETVAL_CASE( DICT_AVP, dict_avp_data ); %GETVAL_CASE( DICT_COMMAND, dict_cmd_data ); %GETVAL_CASE( DICT_RULE, dict_rule_data ); default: DI_ERROR(EINVAL, PyExc_SystemError, "Internal error: Got invalid object type"); } return NULL; } } /* The following wrapper leaks memory each time an union avp_value is assigned an octet string. TODO: fix this leak by better understanding SWIG... -- the alternative is to uncomment the "free" statements below, but then it is easy to create a segmentation fault by assigning first an integer, then an octetstring. */ %extend avp_value { /* The following hack in the proxy file allows assigning the octet string directly like this: avp_value.os = "blabla" */ %pythoncode { __swig_setmethods__["os"] = _fDpy.avp_value_os_set if _newclass:os = _swig_property(_fDpy.avp_value_os_get, _fDpy.avp_value_os_set) } void os_set(char *STRING, size_t LENGTH) { /* free($self->os.data); -- do not free, in case the previous value was not an OS */ $self->os.data = malloc(LENGTH); if (!$self->os.data) { DI_ERROR_MALLOC; return; } memcpy($self->os.data, STRING, LENGTH); $self->os.len = LENGTH; } void os_set(avp_value_os * os) { /* free($self->os.data); -- do not free, in case the previous value was not an OS */ $self->os.data = malloc(os->len); if (!$self->os.data) { DI_ERROR_MALLOC; return; } memcpy($self->os.data, os->data, os->len); $self->os.len = os->len; } }; %extend avp_value_os { void dump() { %#define LEN_MAX 20 int i, n=LEN_MAX; if ($self->len < LEN_MAX) n = $self->len; fd_log_debug("l:%u, v:[", $self->len); for (i=0; i < n; i++) fd_log_debug("%02.2X", $self->data[i]); fd_log_debug("] '%.*s%s'", n, $self->data, n == LEN_MAX ? "..." : ""); } %cstring_output_allocate_size(char ** outbuffer, size_t * outlen, free(*$1)); void as_str ( char ** outbuffer, size_t * outlen ) { char * b; if (!$self->len) { *outlen = 0; *outbuffer = NULL; return; } b = malloc($self->len); if (!b) { DI_ERROR_MALLOC; return; } memcpy(b, $self->data, $self->len); *outlen = $self->len; *outbuffer = b; } } /* Allow constructors with parameters for the dict_*_data */ %extend dict_vendor_data { dict_vendor_data(uint32_t id = 0, char * name = NULL) { struct dict_vendor_data * d = (struct dict_vendor_data *)calloc(1, sizeof(struct dict_vendor_data)); if (!d) { DI_ERROR_MALLOC; return NULL; } d->vendor_id = id; if (name) { d->vendor_name = strdup(name); if (!d->vendor_name) { DI_ERROR_MALLOC; free(d); return NULL; } } return d; } } %extend dict_application_data { dict_application_data(uint32_t id = 0, char * name = NULL) { struct dict_application_data * d = (struct dict_application_data *)calloc(1, sizeof(struct dict_application_data)); if (!d) { DI_ERROR_MALLOC; return NULL; } d->application_id = id; if (name) { d->application_name = strdup(name); if (!d->application_name) { DI_ERROR_MALLOC; free(d); return NULL; } } return d; } } %extend dict_type_data { dict_type_data(enum dict_avp_basetype base = 0, char * name = NULL) { struct dict_type_data * d = (struct dict_type_data *)calloc(1, sizeof(struct dict_type_data)); if (!d) { DI_ERROR_MALLOC; return NULL; } d->type_base = base; if (name) { d->type_name = strdup(name); if (!d->type_name) { DI_ERROR_MALLOC; free(d); return NULL; } } return d; } } %extend dict_enumval_data { dict_enumval_data(char * name = NULL, uint32_t v = 0) { struct dict_enumval_data * d = (struct dict_enumval_data *)calloc(1, sizeof(struct dict_enumval_data)); if (!d) { DI_ERROR_MALLOC; return NULL; } if (name) { d->enum_name = strdup(name); if (!d->enum_name) { DI_ERROR_MALLOC; free(d); return NULL; } } d->enum_value.u32 = v; return d; } } %extend dict_avp_data { dict_avp_data(uint32_t code = 0, char * name = NULL, enum dict_avp_basetype basetype = 0, uint32_t vendor = 0, int mandatory=0) { struct dict_avp_data * d = (struct dict_avp_data *)calloc(1, sizeof(struct dict_avp_data)); if (!d) { DI_ERROR_MALLOC; return NULL; } if (name) { d->avp_name = strdup(name); if (!d->avp_name) { DI_ERROR_MALLOC; free(d); return NULL; } } d->avp_code = code; d->avp_basetype = basetype; d->avp_vendor = vendor; if (vendor) { d->avp_flag_val |= AVP_FLAG_VENDOR; d->avp_flag_mask |= AVP_FLAG_VENDOR; } d->avp_flag_mask |= AVP_FLAG_MANDATORY; if (mandatory) d->avp_flag_val |= AVP_FLAG_MANDATORY; return d; } } %extend dict_cmd_data { dict_cmd_data(uint32_t code = 0, char * name = NULL, int request = 1) { struct dict_cmd_data * d = (struct dict_cmd_data *)calloc(1, sizeof(struct dict_cmd_data)); if (!d) { DI_ERROR_MALLOC; return NULL; } if (name) { d->cmd_name = strdup(name); if (!d->cmd_name) { DI_ERROR_MALLOC; free(d); return NULL; } } d->cmd_code = code; d->cmd_flag_mask = CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE; d->cmd_flag_val = CMD_FLAG_PROXIABLE | ( request ? CMD_FLAG_REQUEST : 0 ); return d; } } %extend dict_rule_data { dict_rule_data(struct dict_object *avp = NULL, enum rule_position pos = 0, int min = -1, int max = -1 ) { struct dict_rule_data * d = (struct dict_rule_data *)calloc(1, sizeof(struct dict_rule_data)); if (!d) { DI_ERROR_MALLOC; return NULL; } d->rule_avp = avp; d->rule_position = pos; d->rule_order = 1; d->rule_min = min; d->rule_max = max; return d; } } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_interactive/dispatch.i000066400000000000000000000123221333553357400263540ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Do not include this directly, use dbg_interactive.i instead */ /****** DISPATCH *********/ %{ /* call it (will be called from a different thread than the interpreter, when message arrives) */ static int call_the_python_dispatch_callback(struct msg **msg, struct avp *avp, struct session *session, void * pycb, enum disp_action *action) { PyObject *PyMsg, *PyAvp, *PySess; PyObject *cb, *result = NULL; int ret = 0; if (!pycb) { fd_log_debug("Internal error: missing the callback!"); return ENOTSUP; } cb = pycb; SWIG_PYTHON_THREAD_BEGIN_BLOCK; /* Convert the arguments */ PyMsg = SWIG_NewPointerObj((void *)*msg, SWIGTYPE_p_msg, 0 ); PyAvp = SWIG_NewPointerObj((void *) avp, SWIGTYPE_p_avp, 0 ); PySess = SWIG_NewPointerObj((void *) session, SWIGTYPE_p_session, 0 ); /* Call the function */ result = PyObject_CallFunction(cb, "(OOO)", PyMsg, PyAvp, PySess); /* The result is supposedly composed of: [ ret, *msg, *action ] */ if ((result == NULL) || (!PyList_Check(result)) || (PyList_Size(result) != 3)) { fd_log_debug("Error: The Python callback did not return [ ret, msg, action ]."); ret = EINVAL; goto out; } /* Convert the return values */ if (!SWIG_IsOK(SWIG_AsVal_int(PyList_GetItem(result, 0), &ret))) { fd_log_debug("Error: Cannot convert the first return value to integer."); ret = EINVAL; goto out; } if (ret) { TRACE_DEBUG(INFO, "The Python callback returned the error code %d (%s)", ret, strerror(ret)); goto out; } if (!SWIG_IsOK(SWIG_ConvertPtr(PyList_GetItem(result, 1), (void *)msg, SWIGTYPE_p_msg, SWIG_POINTER_DISOWN))) { fd_log_debug("Error: Cannot convert the second return value to message."); ret = EINVAL; goto out; } if (!SWIG_IsOK(SWIG_AsVal_int(PyList_GetItem(result, 2), (int *)action))) { fd_log_debug("Error: Cannot convert the third return value to integer."); ret = EINVAL; goto out; } TRACE_DEBUG(FULL, "Python callback return: *action = %d", *action); out: Py_XDECREF(result); SWIG_PYTHON_THREAD_END_BLOCK; return ret; } %} struct disp_hdl { }; %nodefaultctor disp_hdl; %extend disp_hdl { disp_hdl(PyObject * PyCb, enum disp_how how, struct disp_when * when) { struct disp_hdl * hdl = NULL; int ret; Py_XINCREF(PyCb); ret = fd_disp_register ( call_the_python_dispatch_callback, how, when, PyCb, &hdl ); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return hdl; } ~disp_hdl() { struct disp_hdl * hdl = self; PyObject * cb = NULL; int ret = fd_disp_unregister(&hdl, (void *)&cb); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } Py_XDECREF(cb); return; } } %extend disp_when { disp_when(struct dict_object * app = NULL, struct dict_object * command = NULL, struct dict_object * avp = NULL, struct dict_object * value = NULL) { struct disp_when * w = (struct disp_when *)calloc(1, sizeof(struct disp_when)); if (!w) { DI_ERROR_MALLOC; return NULL; } w->app = app; w->command = command; w->avp = avp; w->value = value; return w; } } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_interactive/endpoints.i000066400000000000000000000101661333553357400265640ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Do not include this directly, use dbg_interactive.i instead */ /****** ENDPOINTS *********/ %{ #include #include %} %extend fd_endpoint { fd_endpoint() { struct fd_endpoint *np = (struct fd_endpoint *)calloc(1, sizeof(struct fd_endpoint)); if (!np) { DI_ERROR_MALLOC; return NULL; } fd_list_init(&np->chain, np); return np; } fd_endpoint(const char * endpoint, uint16_t port = 0, uint32_t flags = EP_FL_CONF) { struct addrinfo hints; struct addrinfo *ai = NULL; int ret; memset(&hints, 0, sizeof(hints)); hints.ai_family= AF_UNSPEC; hints.ai_flags = AI_NUMERICHOST; ret = getaddrinfo(endpoint, NULL, &hints, &ai); if (ret) { DI_ERROR(ret, PyExc_ValueError, gai_strerror(ret)); return NULL; } if (port) { switch (ai->ai_family) { case AF_INET: ((sSA4 *)ai->ai_addr)->sin_port = htons(port); break; case AF_INET6: ((sSA6 *)ai->ai_addr)->sin6_port = htons(port); break; default: DI_ERROR(EINVAL, PyExc_RuntimeError, "Unknown family returned by getaddrinfo"); return NULL; } } struct fd_endpoint *np = (struct fd_endpoint *)calloc(1, sizeof(struct fd_endpoint)); if (!np) { DI_ERROR_MALLOC; return NULL; } fd_list_init(&np->chain, np); memcpy(&np->s.sa, ai->ai_addr, ai->ai_addrlen); freeaddrinfo(ai); np->flags = flags; return np; } ~fd_endpoint() { fd_list_unlink(&$self->chain); free($self); } /* Merge to a list */ %delobject add_merge; void add_merge(struct fd_list * eplist) { int ret; if (!eplist) { DI_ERROR(EINVAL, NULL, NULL); return; } ret = fd_ep_add_merge( eplist, &$self->s.sa, sSAlen(&$self->s.sa), $self->flags ); if (ret) { DI_ERROR(ret, NULL, NULL); return; } return; } void dump() { char * buf = NULL; size_t len; printf("%s", fd_ep_dump_one(&buf, &len, NULL, 1, $self)); free(buf); } } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_interactive/events.i000066400000000000000000000057421333553357400260710ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2011, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Do not include this directly, use dbg_interactive.i instead */ /****** EVENTS *********/ %extend fd_event { fd_event(int code, char *STRING, size_t LENGTH) { struct fd_event * fd = calloc(1, sizeof(struct fd_event)); if (!fd) { DI_ERROR_MALLOC; return NULL; } fd->code = code; fd->data = os0dup(STRING, LENGTH); if (!fd->data) { DI_ERROR_MALLOC; return NULL; }; fd->size = LENGTH; return fd; } fd_event(int code, int value) { struct fd_event * fd = calloc(1, sizeof(struct fd_event)); if (!fd) { DI_ERROR_MALLOC; return NULL; } fd->code = code; fd->data = malloc(sizeof(int)); if (!fd->data) { DI_ERROR_MALLOC; return NULL; }; *((int *)fd->data) = value; fd->size = sizeof(int); return fd; } } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_interactive/helper/000077500000000000000000000000001333553357400256625ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_interactive/helper/xxd.c000066400000000000000000000522121333553357400266330ustar00rootroot00000000000000/* fD note: This source file comes from the VIM source package. All credits go to the original authors */ /* xxd: my hexdump facility. jw * * 2.10.90 changed to word output * 3.03.93 new indent style, dumb bug inserted and fixed. * -c option, mls * 26.04.94 better option parser, -ps, -l, -s added. * 1.07.94 -r badly needs - as input file. Per default autoskip over * consecutive lines of zeroes, as unix od does. * -a shows them too. * -i dump as c-style #include "file.h" * 1.11.95 if "xxd -i" knows the filename, an 'unsigned char filename_bits[]' * array is written in correct c-syntax. * -s improved, now defaults to absolute seek, relative requires a '+'. * -r improved, now -r -s -0x... is supported. * change/suppress leading '\0' bytes. * -l n improved: stops exactly after n bytes. * -r improved, better handling of partial lines with trailing garbage. * -r improved, now -r -p works again! * -r improved, less flushing, much faster now! (that was silly) * 3.04.96 Per repeated request of a single person: autoskip defaults to off. * 15.05.96 -v added. They want to know the version. * -a fixed, to show last line inf file ends in all zeros. * -u added: Print upper case hex-letters, as preferred by unix bc. * -h added to usage message. Usage message extended. * Now using outfile if specified even in normal mode, aehem. * No longer mixing of ints and longs. May help doze people. * Added binify ioctl for same reason. (Enough Doze stress for 1996!) * 16.05.96 -p improved, removed occasional superfluous linefeed. * 20.05.96 -l 0 fixed. tried to read anyway. * 21.05.96 -i fixed. now honours -u, and prepends __ to numeric filenames. * compile -DWIN32 for NT or W95. George V. Reilly, * -v improved :-) * support --gnuish-longhorn-options * 25.05.96 MAC support added: CodeWarrior already uses ``outline'' in Types.h * which is included by MacHeaders (Axel Kielhorn). Renamed to * xxdline(). * 7.06.96 -i printed 'int' instead of 'char'. *blush* * added Bram's OS2 ifdefs... * 18.07.96 gcc -Wall @ SunOS4 is now slient. * Added osver for MSDOS/DJGPP/WIN32. * 29.08.96 Added size_t to strncmp() for Amiga. * 24.03.97 Windows NT support (Phil Hanna). Clean exit for Amiga WB (Bram) * 02.04.97 Added -E option, to have EBCDIC translation instead of ASCII * (azc10@yahoo.com) * 22.05.97 added -g (group octets) option (jcook@namerica.kla.com). * 23.09.98 nasty -p -r misfeature fixed: slightly wrong output, when -c was * missing or wrong. * 26.09.98 Fixed: 'xxd -i infile outfile' did not truncate outfile. * 27.10.98 Fixed: -g option parser required blank. * option -b added: 01000101 binary output in normal format. * 16.05.00 Added VAXC changes by Stephen P. Wall * 16.05.00 Improved MMS file and merge for VMS by Zoltan Arpadffy * * (c) 1990-1998 by Juergen Weigert (jnweiger@informatik.uni-erlangen.de) * * Small changes made afterwards by Bram Moolenaar et al. * * Distribute freely and credit me, * make money and share with me, * lose money and don't ask me. */ /* Visual Studio 2005 has 'deprecated' many of the standard CRT functions */ #if _MSC_VER >= 1400 # define _CRT_SECURE_NO_DEPRECATE # define _CRT_NONSTDC_NO_DEPRECATE #endif #if !defined(CYGWIN) && (defined(CYGWIN32) || defined(__CYGWIN__) || defined(__CYGWIN32__)) # define CYGWIN #endif #include #ifdef VAXC # include #else # include #endif #ifdef __TSC__ # define MSDOS #endif #if !defined(OS2) && defined(__EMX__) # define OS2 #endif #if defined(MSDOS) || defined(WIN32) || defined(OS2) || defined(__BORLANDC__) \ || defined(CYGWIN) # include /* for setmode() */ #else # ifdef UNIX # include # endif #endif #include #include /* for strncmp() */ #include /* for isalnum() */ #if __MWERKS__ && !defined(BEBOX) # include /* for fdopen() on MAC */ #endif #if defined(__BORLANDC__) && __BORLANDC__ <= 0x0410 && !defined(fileno) /* Missing define and prototype grabbed from the BC 4.0 */ # define fileno(f) ((f)->fd) FILE _FAR *_Cdecl _FARFUNC fdopen(int __handle, char _FAR *__type); #endif /* This corrects the problem of missing prototypes for certain functions * in some GNU installations (e.g. SunOS 4.1.x). * Darren Hiebert (sparc-sun-sunos4.1.3_U1/2.7.2.2) */ #if defined(__GNUC__) && defined(__STDC__) # ifndef __USE_FIXED_PROTOTYPES__ # define __USE_FIXED_PROTOTYPES__ # endif #endif #ifndef __USE_FIXED_PROTOTYPES__ /* * This is historic and works only if the compiler really has no prototypes: * * Include prototypes for Sun OS 4.x, when using an ANSI compiler. * FILE is defined on OS 4.x, not on 5.x (Solaris). * if __SVR4 is defined (some Solaris versions), don't include this. */ #if defined(sun) && defined(FILE) && !defined(__SVR4) && defined(__STDC__) # define __P(a) a /* excerpt from my sun_stdlib.h */ extern int fprintf __P((FILE *, char *, ...)); extern int fputs __P((char *, FILE *)); extern int _flsbuf __P((unsigned char, FILE *)); extern int _filbuf __P((FILE *)); extern int fflush __P((FILE *)); extern int fclose __P((FILE *)); extern int fseek __P((FILE *, long, int)); extern int rewind __P((FILE *)); extern void perror __P((char *)); # endif #endif extern long int strtol(); extern long int ftell(); char version[] = "xxd V1.10 27oct98 by Juergen Weigert"; #ifdef WIN32 char osver[] = " (Win32)"; #else # ifdef DJGPP char osver[] = " (dos 32 bit)"; # else # ifdef MSDOS char osver[] = " (dos 16 bit)"; # else char osver[] = ""; # endif # endif #endif #if defined(MSDOS) || defined(WIN32) || defined(OS2) # define BIN_READ(yes) ((yes) ? "rb" : "rt") # define BIN_WRITE(yes) ((yes) ? "wb" : "wt") # define BIN_CREAT(yes) ((yes) ? (O_CREAT|O_BINARY) : O_CREAT) # define BIN_ASSIGN(fp, yes) setmode(fileno(fp), (yes) ? O_BINARY : O_TEXT) # define PATH_SEP '\\' #elif defined(CYGWIN) # define BIN_READ(yes) ((yes) ? "rb" : "rt") # define BIN_WRITE(yes) ((yes) ? "wb" : "w") # define BIN_CREAT(yes) ((yes) ? (O_CREAT|O_BINARY) : O_CREAT) # define BIN_ASSIGN(fp, yes) ((yes) ? (void) setmode(fileno(fp), O_BINARY) : (void) (fp)) # define PATH_SEP '/' #else # ifdef VMS # define BIN_READ(dummy) "r" # define BIN_WRITE(dummy) "w" # define BIN_CREAT(dummy) O_CREAT # define BIN_ASSIGN(fp, dummy) fp # define PATH_SEP ']' # define FILE_SEP '.' # else # define BIN_READ(dummy) "r" # define BIN_WRITE(dummy) "w" # define BIN_CREAT(dummy) O_CREAT # define BIN_ASSIGN(fp, dummy) fp # define PATH_SEP '/' # endif #endif /* open has only to arguments on the Mac */ #if __MWERKS__ # define OPEN(name, mode, umask) open(name, mode) #else # define OPEN(name, mode, umask) open(name, mode, umask) #endif #ifdef AMIGA # define STRNCMP(s1, s2, l) strncmp(s1, s2, (size_t)l) #else # define STRNCMP(s1, s2, l) strncmp(s1, s2, l) #endif #ifndef __P # if defined(__STDC__) || defined(MSDOS) || defined(WIN32) || defined(OS2) \ || defined(__BORLANDC__) # define __P(a) a # else # define __P(a) () # endif #endif /* Let's collect some prototypes */ /* CodeWarrior is really picky about missing prototypes */ static void exit_with_usage __P((char *)); static int huntype __P((FILE *, FILE *, FILE *, char *, int, int, long)); static void xxdline __P((FILE *, char *, int)); #define TRY_SEEK /* attempt to use lseek, or skip forward by reading */ #define COLS 256 /* change here, if you ever need more columns */ #define LLEN (11 + (9*COLS-1)/1 + COLS + 2) char hexxa[] = "0123456789abcdef0123456789ABCDEF", *hexx = hexxa; /* the different hextypes known by this program: */ #define HEX_NORMAL 0 #define HEX_POSTSCRIPT 1 #define HEX_CINCLUDE 2 #define HEX_BITS 3 /* not hex a dump, but bits: 01111001 */ static void exit_with_usage(pname) char *pname; { fprintf(stderr, "Usage:\n %s [options] [infile [outfile]]\n", pname); fprintf(stderr, " or\n %s -r [-s [-]offset] [-c cols] [-ps] [infile [outfile]]\n", pname); fprintf(stderr, "Options:\n"); fprintf(stderr, " -a toggle autoskip: A single '*' replaces nul-lines. Default off.\n"); fprintf(stderr, " -b binary digit dump (incompatible with -ps,-i,-r). Default hex.\n"); fprintf(stderr, " -c cols format octets per line. Default 16 (-i: 12, -ps: 30).\n"); fprintf(stderr, " -E show characters in EBCDIC. Default ASCII.\n"); fprintf(stderr, " -g number of octets per group in normal output. Default 2.\n"); fprintf(stderr, " -h print this summary.\n"); fprintf(stderr, " -i output in C include file style.\n"); fprintf(stderr, " -l len stop after octets.\n"); fprintf(stderr, " -ps output in postscript plain hexdump style.\n"); fprintf(stderr, " -r reverse operation: convert (or patch) hexdump into binary.\n"); fprintf(stderr, " -r -s off revert with added to file positions found in hexdump.\n"); fprintf(stderr, " -s %sseek start at bytes abs. %sinfile offset.\n", #ifdef TRY_SEEK "[+][-]", "(or +: rel.) "); #else "", ""); #endif fprintf(stderr, " -u use upper case hex letters.\n"); fprintf(stderr, " -v show version: \"%s%s\".\n", version, osver); exit(1); } /* * Max. cols binary characters are decoded from the input stream per line. * Two adjacent garbage characters after evaluated data delimit valid data. * Everything up to the next newline is discarded. * * The name is historic and came from 'undo type opt h'. */ static int huntype(fpi, fpo, fperr, pname, cols, hextype, base_off) FILE *fpi, *fpo, *fperr; char *pname; int cols, hextype; long base_off; { int c, ign_garb = 1, n1 = -1, n2 = 0, n3, p = cols; long have_off = 0, want_off = 0; rewind(fpi); while ((c = getc(fpi)) != EOF) { if (c == '\r') /* Doze style input file? */ continue; /* Allow multiple spaces. This doesn't work when there is normal text * after the hex codes in the last line that looks like hex, thus only * use it for PostScript format. */ if (hextype == HEX_POSTSCRIPT && (c == ' ' || c == '\n' || c == '\t')) continue; n3 = n2; n2 = n1; if (c >= '0' && c <= '9') n1 = c - '0'; else if (c >= 'a' && c <= 'f') n1 = c - 'a' + 10; else if (c >= 'A' && c <= 'F') n1 = c - 'A' + 10; else { n1 = -1; if (ign_garb) continue; } ign_garb = 0; if (p >= cols) { if (!hextype) { if (n1 < 0) { p = 0; continue; } want_off = (want_off << 4) | n1; continue; } else p = 0; } if (base_off + want_off != have_off) { fflush(fpo); #ifdef TRY_SEEK c = fseek(fpo, base_off + want_off - have_off, 1); if (c >= 0) have_off = base_off + want_off; #endif if (base_off + want_off < have_off) { fprintf(fperr, "%s: sorry, cannot seek backwards.\n", pname); return 5; } for (; have_off < base_off + want_off; have_off++) putc(0, fpo); } if (n2 >= 0 && n1 >= 0) { putc((n2 << 4) | n1, fpo); have_off++; want_off++; n1 = -1; if ((++p >= cols) && !hextype) { /* skip rest of line as garbage */ want_off = 0; while ((c = getc(fpi)) != '\n' && c != EOF) ; ign_garb = 1; } } else if (n1 < 0 && n2 < 0 && n3 < 0) { /* already stumbled into garbage, skip line, wait and see */ if (!hextype) want_off = 0; while ((c = getc(fpi)) != '\n' && c != EOF) ; ign_garb = 1; } } fflush(fpo); #ifdef TRY_SEEK fseek(fpo, 0L, 2); #endif fclose(fpo); fclose(fpi); return 0; } /* * Print line l. If nz is false, xxdline regards the line a line of * zeroes. If there are three or more consecutive lines of zeroes, * they are replaced by a single '*' character. * * If the output ends with more than two lines of zeroes, you * should call xxdline again with l being the last line and nz * negative. This ensures that the last line is shown even when * it is all zeroes. * * If nz is always positive, lines are never suppressed. */ static void xxdline(fp, l, nz) FILE *fp; char *l; int nz; { static char z[LLEN+1]; static int zero_seen = 0; if (!nz && zero_seen == 1) strcpy(z, l); if (nz || !zero_seen++) { if (nz) { if (nz < 0) zero_seen--; if (zero_seen == 2) fputs(z, fp); if (zero_seen > 2) fputs("*\n", fp); } if (nz >= 0 || zero_seen > 0) fputs(l, fp); if (nz) zero_seen = 0; } } /* This is an EBCDIC to ASCII conversion table */ /* from a proposed BTL standard April 16, 1979 */ static unsigned char etoa64[] = { 0040,0240,0241,0242,0243,0244,0245,0246, 0247,0250,0325,0056,0074,0050,0053,0174, 0046,0251,0252,0253,0254,0255,0256,0257, 0260,0261,0041,0044,0052,0051,0073,0176, 0055,0057,0262,0263,0264,0265,0266,0267, 0270,0271,0313,0054,0045,0137,0076,0077, 0272,0273,0274,0275,0276,0277,0300,0301, 0302,0140,0072,0043,0100,0047,0075,0042, 0303,0141,0142,0143,0144,0145,0146,0147, 0150,0151,0304,0305,0306,0307,0310,0311, 0312,0152,0153,0154,0155,0156,0157,0160, 0161,0162,0136,0314,0315,0316,0317,0320, 0321,0345,0163,0164,0165,0166,0167,0170, 0171,0172,0322,0323,0324,0133,0326,0327, 0330,0331,0332,0333,0334,0335,0336,0337, 0340,0341,0342,0343,0344,0135,0346,0347, 0173,0101,0102,0103,0104,0105,0106,0107, 0110,0111,0350,0351,0352,0353,0354,0355, 0175,0112,0113,0114,0115,0116,0117,0120, 0121,0122,0356,0357,0360,0361,0362,0363, 0134,0237,0123,0124,0125,0126,0127,0130, 0131,0132,0364,0365,0366,0367,0370,0371, 0060,0061,0062,0063,0064,0065,0066,0067, 0070,0071,0372,0373,0374,0375,0376,0377 }; int main(argc, argv) int argc; char *argv[]; { FILE *fp, *fpo; int c, e, p = 0, relseek = 1, negseek = 0, revert = 0; int cols = 0, nonzero = 0, autoskip = 0, hextype = HEX_NORMAL; int ebcdic = 0; int octspergrp = -1; /* number of octets grouped in output */ int grplen; /* total chars per octet group */ long length = -1, n = 0, seekoff = 0; char l[LLEN+1]; char *pname, *pp; #ifdef AMIGA /* This program doesn't work when started from the Workbench */ if (argc == 0) exit(1); #endif pname = argv[0]; for (pp = pname; *pp; ) if (*pp++ == PATH_SEP) pname = pp; #ifdef FILE_SEP for (pp = pname; *pp; pp++) if (*pp == FILE_SEP) { *pp = '\0'; break; } #endif while (argc >= 2) { pp = argv[1] + (!STRNCMP(argv[1], "--", 2) && argv[1][2]); if (!STRNCMP(pp, "-a", 2)) autoskip = 1 - autoskip; else if (!STRNCMP(pp, "-b", 2)) hextype = HEX_BITS; else if (!STRNCMP(pp, "-u", 2)) hexx = hexxa + 16; else if (!STRNCMP(pp, "-p", 2)) hextype = HEX_POSTSCRIPT; else if (!STRNCMP(pp, "-i", 2)) hextype = HEX_CINCLUDE; else if (!STRNCMP(pp, "-r", 2)) revert++; else if (!STRNCMP(pp, "-E", 2)) ebcdic++; else if (!STRNCMP(pp, "-v", 2)) { fprintf(stderr, "%s%s\n", version, osver); exit(0); } else if (!STRNCMP(pp, "-c", 2)) { if (pp[2] && STRNCMP("ols", pp + 2, 3)) cols = (int)strtol(pp + 2, NULL, 0); else { if (!argv[2]) exit_with_usage(pname); cols = (int)strtol(argv[2], NULL, 0); argv++; argc--; } } else if (!STRNCMP(pp, "-g", 2)) { if (pp[2] && STRNCMP("group", pp + 2, 5)) octspergrp = (int)strtol(pp + 2, NULL, 0); else { if (!argv[2]) exit_with_usage(pname); octspergrp = (int)strtol(argv[2], NULL, 0); argv++; argc--; } } else if (!STRNCMP(pp, "-s", 2)) { relseek = 0; negseek = 0; if (pp[2] && STRNCMP("kip", pp+2, 3) && STRNCMP("eek", pp+2, 3)) { #ifdef TRY_SEEK if (pp[2] == '+') relseek++; if (pp[2+relseek] == '-') negseek++; #endif seekoff = strtol(pp + 2+relseek+negseek, (char **)NULL, 0); } else { if (!argv[2]) exit_with_usage(pname); #ifdef TRY_SEEK if (argv[2][0] == '+') relseek++; if (argv[2][relseek] == '-') negseek++; #endif seekoff = strtol(argv[2] + relseek+negseek, (char **)NULL, 0); argv++; argc--; } } else if (!STRNCMP(pp, "-l", 2)) { if (pp[2] && STRNCMP("en", pp + 2, 2)) length = strtol(pp + 2, (char **)NULL, 0); else { if (!argv[2]) exit_with_usage(pname); length = strtol(argv[2], (char **)NULL, 0); argv++; argc--; } } else if (!strcmp(pp, "--")) /* end of options */ { argv++; argc--; break; } else if (pp[0] == '-' && pp[1]) /* unknown option */ exit_with_usage(pname); else break; /* not an option */ argv++; /* advance to next argument */ argc--; } if (!cols) switch (hextype) { case HEX_POSTSCRIPT: cols = 30; break; case HEX_CINCLUDE: cols = 12; break; case HEX_BITS: cols = 6; break; case HEX_NORMAL: default: cols = 16; break; } if (octspergrp < 0) switch (hextype) { case HEX_BITS: octspergrp = 1; break; case HEX_NORMAL: octspergrp = 2; break; case HEX_POSTSCRIPT: case HEX_CINCLUDE: default: octspergrp = 0; break; } if (cols < 1 || ((hextype == HEX_NORMAL || hextype == HEX_BITS) && (cols > COLS))) { fprintf(stderr, "%s: invalid number of columns (max. %d).\n", pname, COLS); exit(1); } if (octspergrp < 1) octspergrp = cols; if (argc > 3) exit_with_usage(pname); if (argc == 1 || (argv[1][0] == '-' && !argv[1][1])) BIN_ASSIGN(fp = stdin, !revert); else { if ((fp = fopen(argv[1], BIN_READ(!revert))) == NULL) { fprintf(stderr,"%s: ", pname); perror(argv[1]); return 2; } } if (argc < 3 || (argv[2][0] == '-' && !argv[2][1])) BIN_ASSIGN(fpo = stdout, revert); else { int fd; int mode = revert ? O_WRONLY : (O_TRUNC|O_WRONLY); if (((fd = OPEN(argv[2], mode | BIN_CREAT(revert), 0666)) < 0) || (fpo = fdopen(fd, BIN_WRITE(revert))) == NULL) { fprintf(stderr, "%s: ", pname); perror(argv[2]); return 3; } rewind(fpo); } if (revert) { if (hextype && (hextype != HEX_POSTSCRIPT)) { fprintf(stderr, "%s: sorry, cannot revert this type of hexdump\n", pname); return -1; } return huntype(fp, fpo, stderr, pname, cols, hextype, negseek ? -seekoff : seekoff); } if (seekoff || negseek || !relseek) { #ifdef TRY_SEEK if (relseek) e = fseek(fp, negseek ? -seekoff : seekoff, 1); else e = fseek(fp, negseek ? -seekoff : seekoff, negseek ? 2 : 0); if (e < 0 && negseek) { fprintf(stderr, "%s: sorry cannot seek.\n", pname); return 4; } if (e >= 0) seekoff = ftell(fp); else #endif { long s = seekoff; while (s--) (void)getc(fp); } } if (hextype == HEX_CINCLUDE) { if (fp != stdin) { fprintf(fpo, "unsigned char %s", isdigit((int)argv[1][0]) ? "__" : ""); for (e = 0; (c = argv[1][e]) != 0; e++) putc(isalnum(c) ? c : '_', fpo); fputs("[] = {\n", fpo); } p = 0; while ((length < 0 || p < length) && (c = getc(fp)) != EOF) { fprintf(fpo, (hexx == hexxa) ? "%s0x%02x" : "%s0X%02X", (p % cols) ? ", " : ",\n "+2*!p, c); p++; } if (p) fputs("\n};\n"+3*(fp == stdin), fpo); if (fp != stdin) { fprintf(fpo, "unsigned int %s", isdigit((int)argv[1][0]) ? "__" : ""); for (e = 0; (c = argv[1][e]) != 0; e++) putc(isalnum(c) ? c : '_', fpo); fprintf(fpo, "_len = %d;\n", p); } fclose(fp); fclose(fpo); return 0; } if (hextype == HEX_POSTSCRIPT) { p = cols; while ((length < 0 || n < length) && (e = getc(fp)) != EOF) { putchar(hexx[(e >> 4) & 0xf]); putchar(hexx[(e ) & 0xf]); n++; if (!--p) { putchar('\n'); p = cols; } } if (p < cols) putchar('\n'); fclose(fp); fclose(fpo); return 0; } /* hextype: HEX_NORMAL or HEX_BITS */ if (hextype == HEX_NORMAL) grplen = octspergrp + octspergrp + 1; /* chars per octet group */ else /* hextype == HEX_BITS */ grplen = 8 * octspergrp + 1; while ((length < 0 || n < length) && (e = getc(fp)) != EOF) { if (p == 0) { sprintf(l, "%07lx: ", n + seekoff); for (c = 9; c < LLEN; l[c++] = ' '); } if (hextype == HEX_NORMAL) { l[c = (9 + (grplen * p) / octspergrp)] = hexx[(e >> 4) & 0xf]; l[++c] = hexx[ e & 0xf]; } else /* hextype == HEX_BITS */ { int i; c = (9 + (grplen * p) / octspergrp) - 1; for (i = 7; i >= 0; i--) l[++c] = (e & (1 << i)) ? '1' : '0'; } if (ebcdic) e = (e < 64) ? '.' : etoa64[e-64]; /* When changing this update definition of LLEN above. */ l[11 + (grplen * cols - 1)/octspergrp + p] = #ifdef __MVS__ (e >= 64) #else (e > 31 && e < 127) #endif ? e : '.'; if (e) nonzero++; n++; if (++p == cols) { l[c = (11 + (grplen * cols - 1)/octspergrp + p)] = '\n'; l[++c] = '\0'; xxdline(fpo, l, autoskip ? nonzero : 1); nonzero = 0; p = 0; } } if (p) { l[c = (11 + (grplen * cols - 1)/octspergrp + p)] = '\n'; l[++c] = '\0'; xxdline(fpo, l, 1); } else if (autoskip) xxdline(fpo, l, -1); /* last chance to flush out suppressed lines */ fclose(fp); fclose(fpo); return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_interactive/hooks.i000066400000000000000000000130231333553357400256770ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Do not include this directly, use dbg_interactive.i instead */ /****** HOOKS *********/ /* Functions to handle the PMD */ %{ struct fd_hook_permsgdata { PyObject *PyPML; }; static void init_permsgdata (struct fd_hook_permsgdata * pmd) { /* The PMD is None by default */ Py_INCREF(Py_None); pmd->PyPML = Py_None; } static void fini_permsgdata (struct fd_hook_permsgdata * pmd) { Py_DECREF(pmd->PyPML); } %} struct fd_hook_data_hdl { }; %nodefaultctor fd_hook_data_hdl; %extend fd_hook_data_hdl { fd_hook_data_hdl() { struct fd_hook_data_hdl * hdl = NULL; int ret; ret = fd_hook_data_register ( sizeof(struct fd_hook_permsgdata), init_permsgdata, fini_permsgdata, &hdl ); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return hdl; } } /* Now the hook itself */ %{ static void call_the_python_hook_callback(enum fd_hook_type type, struct msg * msg, struct peer_hdr * peer, void * other, struct fd_hook_permsgdata *pmd, void * regdata) { PyObject *cb, *result = NULL; PyObject *PyType, *PyMsg, *PyPeer, *PyOther, *PyOldPmd; if (!regdata) { LOG_E("Internal error: missing the callback!"); return; } cb = regdata; SWIG_PYTHON_THREAD_BEGIN_BLOCK; /* Convert the arguments */ PyType = PyLong_FromLong(type); Py_INCREF(PyType); PyMsg = SWIG_NewPointerObj((void *) msg, SWIGTYPE_p_msg, 0 ); PyPeer = SWIG_NewPointerObj((void *) peer, SWIGTYPE_p_peer_hdr, 0 ); if (other == NULL) { PyOther=Py_None; Py_INCREF(Py_None); } else { switch (type) { case HOOK_DATA_RECEIVED: PyOther= SWIG_NewPointerObj( other, SWIGTYPE_p_fd_cnx_rcvdata, 0 ); break; case HOOK_MESSAGE_RECEIVED: case HOOK_MESSAGE_ROUTING_ERROR: case HOOK_MESSAGE_DROPPED: case HOOK_PEER_CONNECT_FAILED: PyOther= SWIG_NewPointerObj( other, SWIGTYPE_p_char, 0 ); break; case HOOK_MESSAGE_PARSING_ERROR: if (msg) { PyOther= SWIG_NewPointerObj( other, SWIGTYPE_p_char, 0 ); } else { PyOther= SWIG_NewPointerObj( other, SWIGTYPE_p_fd_cnx_rcvdata, 0 ); } break; default: /* In other cases, other should be NULL */ LOG_E("Internal error: got a value of *other"); } } if (pmd == NULL) { Py_INCREF(Py_None); PyOldPmd=Py_None; } else { PyOldPmd=pmd->PyPML; } /* Call the function */ result = PyObject_CallFunction(cb, "(OOOOO)", PyType, PyMsg, PyPeer, PyOther, PyOldPmd); SWIG_PYTHON_THREAD_END_BLOCK; if (pmd == NULL) return; Py_DECREF(pmd->PyPML); Py_INCREF(result); pmd->PyPML = result; } %} struct fd_hook_hdl { }; %nodefaultctor fd_hook_hdl; %extend fd_hook_hdl { fd_hook_hdl(uint32_t type_mask, PyObject * PyCb) { struct fd_hook_hdl *hdl; int ret; Py_XINCREF(PyCb); ret = fd_hook_register ( type_mask, call_the_python_hook_callback, PyCb, NULL, &hdl ); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return hdl; } fd_hook_hdl(uint32_t type_mask, PyObject * PyCb, struct fd_hook_data_hdl *datahdl) { struct fd_hook_hdl *hdl; int ret; Py_XINCREF(PyCb); ret = fd_hook_register ( type_mask, call_the_python_hook_callback, PyCb, datahdl, &hdl ); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return hdl; } ~fd_hook_hdl() { struct fd_hook_hdl * hdl = self; int ret = fd_hook_unregister(hdl); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } return; } } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_interactive/lists.i000066400000000000000000000110071333553357400257120ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Do not include this directly, use dbg_interactive.i instead */ /****** LISTS *********/ %extend fd_list { /* allow a parameter in the constructor, and perform the fd_list_init operation */ fd_list(void * o = NULL) { struct fd_list * li; li = (struct fd_list *) malloc(sizeof(struct fd_list)); if (!li) { DI_ERROR_MALLOC; return NULL; } fd_list_init(li, o); return li; } /* Unlink before freeing */ ~fd_list() { fd_list_unlink($self); free($self); } /* For debug, show the values of the list */ void dump() { fd_log_debug("list: %p", $self); fd_log_debug(" - next: %p", $self->next); fd_log_debug(" - prev: %p", $self->prev); fd_log_debug(" - head: %p", $self->head); fd_log_debug(" - o : %p", $self->o); } /* Insert before/after wrapper */ void insert_prev(struct fd_list * li) { fd_list_insert_before($self, li); } void insert_next(struct fd_list * li) { fd_list_insert_after($self, li); } /* Test for emptyness */ PyObject * isempty() { PyObject * ret; if (FD_IS_LIST_EMPTY($self)) ret = Py_True; else ret = Py_False; Py_XINCREF(ret); return ret; } /* Concatenate two lists */ void concat(struct fd_list * li) { fd_list_move_end($self, li); } /* Unlink without freeing */ void detach() { fd_list_unlink($self); } /* Return the list as python list of elements */ PyObject * enum_as(char * type = NULL, int dont_use_o = 0) { struct fd_list *li; swig_type_info * desttype = NULL; PyObject * rl; if ($self->head != $self) { DI_ERROR(EINVAL, NULL, "This method can only be called on the list sentinel."); return NULL; } if (type) { desttype = SWIG_TypeQuery(type); if (!desttype) { DI_ERROR(EINVAL, NULL, "Unable to resolve this type. Please check the form: 'struct blahbla *'"); return NULL; } } if (desttype == NULL) { /* fallback to fd_list */ desttype = SWIGTYPE_p_fd_list; /* in this case, don't follow the 'o' link */ dont_use_o = 1; } rl = PyList_New(0); SWIG_PYTHON_THREAD_BEGIN_BLOCK; for (li = $self->next; li != $self; li = li->next) { void * obj = NULL; if (dont_use_o || li->o == NULL) obj = li; else obj = li->o; PyList_Append(rl, SWIG_NewPointerObj(obj, desttype, 0 )); } Py_XINCREF(rl); SWIG_PYTHON_THREAD_END_BLOCK; return rl; } }; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_interactive/messages.i000066400000000000000000000365261333553357400264000ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Do not include this directly, use dbg_interactive.i instead */ /****** MESSAGES *********/ %{ struct anscb_py_layer { PyObject * cb; PyObject * expcb; PyObject * data; }; /* If a python callback was provided, it is received in cbdata */ static void anscb_python(void *cbdata, struct msg ** msg) { /* The python callback is received in cbdata */ PyObject * result, *PyMsg; struct anscb_py_layer * l = cbdata; if (!l) { fd_log_debug("Internal error! Python callback disappeared..."); return; } if (l->cb) { SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!msg || !*msg) { PyMsg = Py_None; } else { PyMsg = SWIG_NewPointerObj((void *)*msg, SWIGTYPE_p_msg, 0 ); } result = PyObject_CallFunction(l->cb, "(OO)", PyMsg, l->data); Py_XDECREF(l->cb); Py_XDECREF(l->expcb); Py_XDECREF(l->data); free(l); /* The callback is supposed to return a message or NULL */ if (!SWIG_IsOK(SWIG_ConvertPtr(result, (void *)msg, SWIGTYPE_p_msg, SWIG_POINTER_DISOWN))) { fd_log_debug("Error: Cannot convert the return value to message."); *msg = NULL; } Py_XDECREF(result); SWIG_PYTHON_THREAD_END_BLOCK; } /* else */ /* Only the timeout was specified, without a callback */ /* in this case, just delete the message */ /* it actually happens automatically when we do nothing. */ } static void expcb_python(void *cbdata, DiamId_t sentto, size_t senttolen, struct msg ** msg) { /* The python callback is received in cbdata */ PyObject * result, *PyMsg; struct anscb_py_layer * l = cbdata; if (!l) { fd_log_debug("Internal error! Python callback disappeared..."); return; } SWIG_PYTHON_THREAD_BEGIN_BLOCK; if (!msg || !*msg) { PyMsg = Py_None; } else { PyMsg = SWIG_NewPointerObj((void *)*msg, SWIGTYPE_p_msg, 0 ); } result = PyObject_CallFunction(l->expcb, "(Os#O)", PyMsg, sentto, senttolen, l->data); Py_XDECREF(l->cb); Py_XDECREF(l->expcb); Py_XDECREF(l->data); free(l); /* The callback is supposed to return a message or NULL */ if (!SWIG_IsOK(SWIG_ConvertPtr(result, (void *)msg, SWIGTYPE_p_msg, SWIG_POINTER_DISOWN))) { fd_log_debug("Error: Cannot convert the return value to message."); *msg = NULL; } Py_XDECREF(result); SWIG_PYTHON_THREAD_END_BLOCK; } %} struct msg { }; %extend msg { msg(struct dict_object * model=NULL, int flags = MSGFL_ALLOC_ETEID) { struct msg * m = NULL; int ret = fd_msg_new( model, flags, &m); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } return m; } /* construct also from a binary buffer */ msg(char * STRING, size_t LENGTH) { int ret; struct msg * m = NULL; /* First, copy the string */ unsigned char * buf = malloc(LENGTH); if (buf == NULL) { DI_ERROR_MALLOC; return NULL; } memcpy(buf, STRING, LENGTH); ret = fd_msg_parse_buffer(&buf, LENGTH, &m); if (ret != 0) { DI_ERROR(ret, NULL, NULL); free(buf); return NULL; } return m; } ~msg() { int ret = fd_msg_free($self); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } } /* SEND THE MESSAGE */ %delobject send; /* when this has been called, the msg must not be freed anymore */ void send(PyObject * PyCb = NULL, PyObject * data = NULL, PyObject * PyExpCb = NULL, unsigned int timeout = 0) { int ret; struct msg * m = $self; struct anscb_py_layer * l = NULL; if (PyCb || timeout) { l = malloc(sizeof(struct anscb_py_layer)); if (!l) { DI_ERROR_MALLOC; return; } Py_XINCREF(PyCb); Py_XINCREF(data); Py_XINCREF(PyExpCb); l->expcb = PyExpCb; l->cb = PyCb; l->data = data; } if (timeout) { struct timespec ts; (void) clock_gettime(CLOCK_REALTIME, &ts); ts.tv_sec += timeout; ret = fd_msg_send_timeout(&m, anscb_python, l, expcb_python, &ts); } else { ret = fd_msg_send(&m, PyCb ? anscb_python : NULL, l); } if (ret != 0) { DI_ERROR(ret, NULL, NULL); } } /* Create an answer */ %delobject create_answer; /* when this has been called, the original msg should not be freed anymore */ struct msg * create_answer(struct dictionary * dict = NULL, int flags = 0) { /* if dict is not provided, attempt to get it from the request model */ struct dictionary * d = dict; struct msg * m = $self; int ret; if (!d) { struct dict_object * mo = NULL; ret = fd_msg_model($self, &mo); if (ret != 0) { DI_ERROR(ret, NULL, "Error retrieving query model."); return NULL; } if (mo == NULL) { /* use the fD dictionary by default */ d = fd_g_config->cnf_dict; } else { ret = fd_dict_getdict ( mo, &d ); if (ret != 0) { DI_ERROR(ret, NULL, "Error retrieving query's dictionary."); return NULL; } } } ret = fd_msg_new_answer_from_req(d, &m, flags); if (ret != 0) { DI_ERROR(ret, NULL, "Cannot guess the dictionary to use, please provide it as parameter."); return NULL; } return m; } /* Return the first child AVP if any */ struct avp * first_child() { struct avp * a = NULL; int ret = fd_msg_browse($self, MSG_BRW_FIRST_CHILD, &a, NULL); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } return a; } /* Enumerable list of children AVP */ %newobject children; PyObject * children() { struct avp * a = NULL; PyObject * rl; int ret = fd_msg_browse($self, MSG_BRW_FIRST_CHILD, &a, NULL); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } SWIG_PYTHON_THREAD_BEGIN_BLOCK; rl = PyList_New(0); while (a) { PyList_Append(rl, SWIG_NewPointerObj((void *)a, SWIGTYPE_p_avp, 0 /* do not own the AVPs */ )); ret = fd_msg_browse(a, MSG_BRW_NEXT, &a, NULL); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } } Py_XINCREF(rl); SWIG_PYTHON_THREAD_END_BLOCK; return rl; } /* Add a new AVP */ void add_child(struct avp *DISOWN, int begin = 0) { int ret = fd_msg_avp_add ( $self, begin ? MSG_BRW_FIRST_CHILD : MSG_BRW_LAST_CHILD, DISOWN); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } } /* Search an AVP */ struct avp * search(struct dict_object * what) { struct avp * a = NULL; int ret = fd_msg_search_avp($self, what, &a); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return a; } /* Dump */ void dump (int tree = 1) { char * buf = NULL; size_t len; printf("%s", fd_msg_dump_treeview(&buf, &len, NULL, $self, NULL, 0, tree)); free(buf); } /* Model */ struct dict_object * model() { struct dict_object * m = NULL; int ret = fd_msg_model($self, &m); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return m; } /* Header */ struct msg_hdr * header() { struct msg_hdr * h = NULL; int ret = fd_msg_hdr($self, &h); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return h; } /* Get query if message is an answer */ struct msg * get_query() { struct msg * q = NULL; int ret = fd_msg_answ_getq($self, &q); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return q; } /* Get / Set routing data */ struct rt_data * get_rtd() { struct rt_data * r = NULL; int ret = fd_msg_rt_get($self, &r); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return r; } void set_rtd(struct rt_data *DISOWN) { struct rt_data * r = DISOWN; int ret = fd_msg_rt_associate($self, r); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } return; } /* Is routable? */ PyObject * is_routable() { PyObject * r; if (fd_msg_is_routable($self)) r = Py_True; else r = Py_False; Py_XINCREF(r); return r; } /* Is request? (shortcut) */ PyObject * is_request() { PyObject * r; int ret; struct msg_hdr * h; ret = fd_msg_hdr($self, &h); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } if (h->msg_flags & CMD_FLAG_REQUEST) r = Py_True; else r = Py_False; Py_XINCREF(r); return r; } /* Get the source */ %cstring_output_allocate_size(char ** outid, size_t * outlen, /* do not free */); void source(char ** outid, size_t * outlen) { int ret = fd_msg_source_get($self, outid, outlen); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return; } return; } /* Get the session */ %newobject get_session; /* it may be created or not, it is harmless because we only reclaim in ~session */ struct session *get_session(struct dictionary * dict = NULL) { struct session *s = NULL; struct dictionary * d = dict; int ret = 0; if (d == NULL) d = fd_g_config->cnf_dict; /* default: use daemon's */ ret = fd_msg_sess_get(d, $self, &s, NULL); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return s; } /* Bufferize */ %cstring_output_allocate_size(char ** outbuffer, size_t * outlen, free(*$1)); void bufferize ( char ** outbuffer, size_t * outlen ) { int ret = fd_msg_bufferize ( $self, (void *)outbuffer, outlen ); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } } /* Dictionary parsing */ %newobject parse_dict; struct fd_pei * parse_dict(struct dictionary * dict=NULL) { int ret; struct fd_pei pei, *e = NULL; struct dictionary * d = dict; memset(&pei, 0, sizeof(struct fd_pei)); if (d == NULL) d = fd_g_config->cnf_dict; /* default: use daemon's */ ret = fd_msg_parse_dict ( $self, d, &pei ); if (ret != 0) { e = malloc(sizeof(struct fd_pei)); if (!e) { DI_ERROR_MALLOC; return NULL; } memcpy(e, &pei, sizeof(struct fd_pei)); } return e; /* returns NULL when everything went OK */ } /* Rules parsing */ %newobject parse_rules; struct fd_pei * parse_rules(struct dictionary * dict=NULL) { int ret; struct fd_pei pei, *e = NULL; struct dictionary * d = dict; memset(&pei, 0, sizeof(struct fd_pei)); if (d == NULL) d = fd_g_config->cnf_dict; /* default: use daemon's */ ret = fd_msg_parse_rules ( $self, d, &pei ); if (ret != 0) { e = malloc(sizeof(struct fd_pei)); if (!e) { DI_ERROR_MALLOC; return NULL; } memcpy(e, &pei, sizeof(struct fd_pei)); } return e; /* returns NULL when everything went OK */ } /* Update the length info in header */ void update_length() { int ret = fd_msg_update_length ( $self ); if (ret) { DI_ERROR(ret, NULL, NULL); } } /* Set the result code */ void rescode_set(char * rescode = "DIAMETER_SUCCESS", char * errormsg = NULL, struct avp * optavp = NULL, int type_id = 0) { int ret = fd_msg_rescode_set( $self, rescode, errormsg, optavp, type_id ); if (ret) { DI_ERROR(ret, NULL, NULL); } } /* Add the origin */ void add_origin(int osi = 0) { int ret = fd_msg_add_origin( $self, osi ); if (ret) { DI_ERROR(ret, NULL, NULL); } } } struct avp { }; %extend avp { avp(struct dict_object * model = NULL, int flags = 0) { struct avp * a = NULL; int ret = fd_msg_avp_new( model, flags, &a); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } return a; } ~avp() { int ret = fd_msg_free($self); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } } /* Return the first child AVP if any */ struct avp * first_child() { struct avp * a = NULL; int ret = fd_msg_browse($self, MSG_BRW_FIRST_CHILD, &a, NULL); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } return a; } /* Enumerable list of children AVP */ %newobject children; PyObject * children() { struct avp * a = NULL; PyObject * rl; int ret = fd_msg_browse($self, MSG_BRW_FIRST_CHILD, &a, NULL); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } SWIG_PYTHON_THREAD_BEGIN_BLOCK; rl = PyList_New(0); while (a) { PyList_Append(rl, SWIG_NewPointerObj((void *)a, SWIGTYPE_p_avp, 0 /* the AVPs are not owned */ )); ret = fd_msg_browse(a, MSG_BRW_NEXT, &a, NULL); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } } Py_XINCREF(rl); SWIG_PYTHON_THREAD_END_BLOCK; return rl; } /* Add a new AVP */ void add_next(struct avp *avp) { int ret = fd_msg_avp_add ( $self, MSG_BRW_NEXT, avp); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } } void add_prev(struct avp *avp) { int ret = fd_msg_avp_add ( $self, MSG_BRW_PREV, avp); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } } void add_child(struct avp *DISOWN, int begin = 0) { int ret = fd_msg_avp_add ( $self, begin ? MSG_BRW_FIRST_CHILD : MSG_BRW_LAST_CHILD, DISOWN); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } } /* Get the next AVP at the same level */ struct avp * get_next() { struct avp * a = NULL; int ret = fd_msg_browse($self, MSG_BRW_NEXT, &a, NULL); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } return a; } /* Dump */ void dump (int tree = 1) { char * buf = NULL; size_t len; printf("%s", fd_msg_dump_treeview(&buf, &len, NULL, $self, NULL, 0, tree)); free(buf); } /* Model */ struct dict_object * model() { struct dict_object * m = NULL; int ret = fd_msg_model($self, &m); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return m; } /* Header */ struct avp_hdr * header() { struct avp_hdr * h = NULL; int ret = fd_msg_avp_hdr($self, &h); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return h; } /* set value */ void setval(union avp_value * val) { int ret = fd_msg_avp_setvalue ( $self, val ); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } } /* Update the length info in header */ void update_length() { int ret = fd_msg_update_length ( $self ); if (ret) { DI_ERROR(ret, NULL, NULL); } } } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_interactive/peers.i000066400000000000000000000151421333553357400256760ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Do not include this directly, use dbg_interactive.i instead */ /****** PEERS *********/ %{ static void fd_add_cb(struct peer_info *peer, void *data) { /* Callback called when the peer connection completes (or fails) */ PyObject *PyPeer, *PyFunc; PyObject *result = NULL; if (!data) { TRACE_DEBUG(INFO, "Internal error: missing callback"); return; } PyFunc = data; SWIG_PYTHON_THREAD_BEGIN_BLOCK; /* Convert the argument */ PyPeer = SWIG_NewPointerObj((void *)peer, SWIGTYPE_p_peer_info, 0 ); /* Call the function */ result = PyObject_CallFunction(PyFunc, "(O)", PyPeer); Py_XDECREF(result); Py_XDECREF(PyFunc); SWIG_PYTHON_THREAD_END_BLOCK; return; } %} %extend peer_info { peer_info () { struct peer_info *np = (struct peer_info *)calloc(1, sizeof(struct peer_info)); if (!np) { DI_ERROR_MALLOC; return NULL; } fd_list_init(&np->pi_endpoints, NULL); return np; } /* Wrapper around fd_peer_add to allow calling the python callback */ %delobject add; void add(PyObject * PyCb=NULL) { int ret; if (PyCb) { Py_XINCREF(PyCb); ret = fd_peer_add ( $self, "dbg_interactive", fd_add_cb, PyCb ); } else { ret = fd_peer_add ( $self, "dbg_interactive", NULL, NULL ); } if (ret != 0) { DI_ERROR(ret, NULL, NULL); } } } %inline %{ static struct peer_hdr * peer_search(char *STRING, size_t LENGTH) { struct peer_hdr *r = NULL; int ret = fd_peer_getbyid( STRING, LENGTH, 0, &r ); if (ret) { DI_ERROR(ret, NULL, NULL); return NULL; } return r; } %} %{ static PyObject * validate_cb_py = NULL; static PyObject * validate_cb2_py = NULL; /* C wrapper that calls validate_cb2_py */ int call_the_python_validate_callback2(struct peer_info * info) { PyObject *PyInfo; PyObject *result = NULL; int ret = 0; if (!validate_cb2_py) { fd_log_debug("Internal error: missing the callback2!"); return ENOTSUP; } SWIG_PYTHON_THREAD_BEGIN_BLOCK; /* Convert the arguments */ PyInfo = SWIG_NewPointerObj((void *)info, SWIGTYPE_p_peer_info, 0 ); /* Call the function */ result = PyObject_CallFunction(validate_cb2_py, "(O)", PyInfo); /* The result is an integer */ if ((result == NULL) || !SWIG_IsOK(SWIG_AsVal_int(result, &ret))) { fd_log_debug("Error: The Python callback did not return an integer."); ret = EINVAL; goto out; } out: Py_XDECREF(result); SWIG_PYTHON_THREAD_END_BLOCK; return ret; } /* C wrapper that calls validate_cb_py */ int call_the_python_validate_callback(struct peer_info * info, int * auth, int (**cb2)(struct peer_info *)) { PyObject *PyInfo; PyObject *result = NULL; int ret = 0; if (!validate_cb_py) { fd_log_debug("Internal error: missing the callback!"); return ENOTSUP; } SWIG_PYTHON_THREAD_BEGIN_BLOCK; /* Convert the arguments */ PyInfo = SWIG_NewPointerObj((void *)info, SWIGTYPE_p_peer_info, 0 ); /* Call the function */ result = PyObject_CallFunction(validate_cb_py, "(O)", PyInfo); /* The result is supposedly -1, 1, or a cb2 */ if (result == NULL) { fd_log_debug("Error: The Python callback did not return a value."); ret = EINVAL; goto out; } if (PyCallable_Check(result)) { if (cb2) { if (validate_cb2_py && (validate_cb2_py != result)) { fd_log_debug("Only 1 register callback2 is supported currently"); ret = ENOTSUP; goto out; } validate_cb2_py = result; *cb2 = call_the_python_validate_callback2; *auth = 1; goto out_nodec; } else { *auth = 1; goto out; /* ignore the callback since it won't be used */ } } else { /* In this case, the return value must be -1, 0, or 1 */ if (!SWIG_IsOK(SWIG_AsVal_int(result, auth))) { fd_log_debug("Error: Cannot convert the return value to integer."); ret = EINVAL; goto out; } } out: Py_XDECREF(result); out_nodec: SWIG_PYTHON_THREAD_END_BLOCK; TRACE_DEBUG(FULL, "ret=%d, *auth=%d, cb2=%p, *cb2=%p", ret, *auth, cb2, cb2 ? *cb2 : NULL); return ret; } %} %inline %{ static void peer_validate_register(PyObject * PyCb) { int ret ; if (!PyCb) { DI_ERROR(EINVAL, NULL, "The callback must be provided"); return; } if (validate_cb_py) { if (PyCb != validate_cb_py) { DI_ERROR(ENOTSUP, PyExc_RuntimeError, "Only 1 register callback is supported currently"); return; } } else { validate_cb_py = PyCb; Py_XINCREF(PyCb); } ret = fd_peer_validate_register ( call_the_python_validate_callback ); if (ret) { DI_ERROR(ret, NULL, NULL); } } %} nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_interactive/posix.i000066400000000000000000000120261333553357400257200ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2012, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Do not include this directly, use dbg_interactive.i instead */ /****** POSIX wrappers around useful functions for fD *********/ /**** MUTEX ****/ typedef struct { } pthread_mutex_t; %extend pthread_mutex_t { pthread_mutex_t() { int ret = 0; pthread_mutex_t * r = calloc(1, sizeof(pthread_mutex_t)); if (!r) { DI_ERROR_MALLOC; return NULL; } ret = pthread_mutex_init(r, NULL); if (ret) { DI_ERROR(ret, NULL, NULL); free(r); return NULL; } return r; } ~pthread_mutex_t() { int ret = 0; ret = pthread_mutex_destroy($self); if (ret) { DI_ERROR(ret, NULL, NULL); return; } free($self); return; } void lock() { int ret = pthread_mutex_lock($self); if (ret) { DI_ERROR(ret, NULL, NULL); } } void unlock() { int ret = pthread_mutex_unlock($self); if (ret) { DI_ERROR(ret, NULL, NULL); } } } /**** CONDVAR ****/ typedef struct { } pthread_cond_t; %extend pthread_cond_t { pthread_cond_t() { int ret = 0; pthread_cond_t * r = calloc(1, sizeof(pthread_cond_t)); if (!r) { DI_ERROR_MALLOC; return NULL; } ret = pthread_cond_init(r, NULL); if (ret) { DI_ERROR(ret, NULL, NULL); free(r); return NULL; } return r; } ~pthread_cond_t() { int ret = 0; ret = pthread_cond_destroy($self); if (ret) { DI_ERROR(ret, NULL, NULL); return; } free($self); return; } void signal() { int ret = pthread_cond_signal($self); if (ret) { DI_ERROR(ret, NULL, NULL); } } void broadcast() { int ret = pthread_cond_broadcast($self); if (ret) { DI_ERROR(ret, NULL, NULL); } } void wait(pthread_mutex_t * mutex) { int ret = pthread_cond_wait($self, mutex); if (ret) { DI_ERROR(ret, NULL, NULL); } } void timedwait(pthread_mutex_t * mutex, long seconds) { struct timespec ts; int ret; clock_gettime(CLOCK_REALTIME, &ts); ts.tv_sec += seconds; ret = pthread_cond_timedwait($self, mutex, &ts); if (ret && (ret != ETIMEDOUT)) { DI_ERROR(ret, NULL, NULL); } } } /**** RWLOCK ****/ typedef struct { } pthread_rwlock_t; %extend pthread_rwlock_t { pthread_rwlock_t() { int ret = 0; pthread_rwlock_t * r = calloc(1, sizeof(pthread_rwlock_t)); if (!r) { DI_ERROR_MALLOC; return NULL; } ret = pthread_rwlock_init(r, NULL); if (ret) { DI_ERROR(ret, NULL, NULL); free(r); return NULL; } return r; } ~pthread_rwlock_t() { int ret = 0; ret = pthread_rwlock_destroy($self); if (ret) { DI_ERROR(ret, NULL, NULL); return; } free($self); return; } void rdlock() { int ret = pthread_rwlock_rdlock($self); if (ret) { DI_ERROR(ret, NULL, NULL); } } void wrlock() { int ret = pthread_rwlock_wrlock($self); if (ret) { DI_ERROR(ret, NULL, NULL); } } void unlock() { int ret = pthread_rwlock_unlock($self); if (ret) { DI_ERROR(ret, NULL, NULL); } } } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_interactive/queues.i000066400000000000000000000131461333553357400260710ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Do not include this directly, use dbg_interactive.i instead */ /****** FIFO QUEUES *********/ struct fifo { }; %extend fifo { fifo(int max = 0) { struct fifo * q = NULL; int ret = fd_fifo_new(&q, max); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return q; } ~fifo() { struct fifo *q = self; fd_fifo_del(&q); } /* Move all elements to another queue */ void move(struct fifo * to) { int ret = fd_fifo_move($self, to, NULL); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } } /* Get the length of the queue (nb elements) */ int length() { return fd_fifo_length ( $self ) ; } /* Is the threashold function useful here? TODO... */ /* Post an item */ void post(PyObject * item, char * type = NULL) { int ret; if (type) { void * real_obj = NULL; swig_type_info * desttype = NULL; desttype = SWIG_TypeQuery(type); if (!desttype) { DI_ERROR(EINVAL, NULL, "Unable to resolve this type. Please check the form: 'struct blahbla *'"); return; } /* Now, get the "real" value under the shadow umbrella */ ret = SWIG_ConvertPtr(item, &real_obj, desttype, SWIG_POINTER_DISOWN ); if (!SWIG_IsOK(ret)) { DI_ERROR(EINVAL, SWIG_ErrorType(ret), "Unable to convert the item to given type"); return; } ret = fd_fifo_post($self, &real_obj); } else { PyObject * i = item; Py_XINCREF(i); ret = fd_fifo_post($self, &i); } if (ret != 0) { DI_ERROR(ret, NULL, NULL); } } /* Get (blocking) */ PyObject * get(char * type = NULL) { int ret; PyObject * i = NULL; void * obj = NULL; swig_type_info * desttype = NULL; if (type) { desttype = SWIG_TypeQuery(type); if (!desttype) { DI_ERROR(EINVAL, NULL, "Unable to resolve this type. Please check the form: 'struct blahbla *'"); return NULL; } } ret = fd_fifo_get($self, &obj); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } if (type) { return SWIG_NewPointerObj(obj, desttype, 0 ); } else { i = obj; return i; } } /* TryGet (non-blocking, returns None on empty queue) */ PyObject * tryget(char * type = NULL) { int ret; PyObject * i = NULL; void * obj = NULL; swig_type_info * desttype = NULL; if (type) { desttype = SWIG_TypeQuery(type); if (!desttype) { DI_ERROR(EINVAL, NULL, "Unable to resolve this type. Please check the form: 'struct blahbla *'"); return NULL; } } ret = fd_fifo_tryget($self, &obj); if (ret == EWOULDBLOCK) { Py_INCREF(Py_None); return Py_None; } if (ret != 0) { DI_ERROR(ret, NULL, NULL); } if (type) { return SWIG_NewPointerObj(obj, desttype, 0 ); } else { i = obj; return i; } } /* TimedGet (blocking for a while) */ PyObject * timedget(long seconds, char * type = NULL) { int ret; PyObject * i = NULL; struct timespec ts; void * obj = NULL; swig_type_info * desttype = NULL; if (type) { desttype = SWIG_TypeQuery(type); if (!desttype) { DI_ERROR(EINVAL, NULL, "Unable to resolve this type. Please check the form: 'struct blahbla *'"); return NULL; } } clock_gettime(CLOCK_REALTIME, &ts); ts.tv_sec += seconds; ret = fd_fifo_timedget($self, &obj, &ts); if (ret == ETIMEDOUT) { Py_INCREF(Py_None); return Py_None; } if (ret != 0) { DI_ERROR(ret, NULL, NULL); } if (type) { return SWIG_NewPointerObj(obj, desttype, 0 ); } else { i = obj; return i; } } } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_interactive/routing.i000066400000000000000000000163021333553357400262460ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Do not include this directly, use dbg_interactive.i instead */ /****** ROUTING *********/ struct rt_data { }; %extend rt_data { rt_data() { struct rt_data * r = NULL; int ret = fd_rtd_init(&r); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return r; } ~rt_data() { struct rt_data *r = self; fd_rtd_free(&r); } %apply (char *STRING, int LENGTH) { (char * peerid, size_t peeridlen) }; %apply (char *STRING, int LENGTH) { (char * realm, size_t realmlen) }; void add(char * peerid, size_t peeridlen, char * realm, size_t realmlen) { int ret = fd_rtd_candidate_add($self, peerid, peeridlen, realm, realmlen); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } } void remove(char * STRING, size_t LENGTH) { fd_rtd_candidate_del($self, (os0_t)STRING, LENGTH); } int error(char * peerid, size_t peeridlen, char * STRING, size_t LENGTH, uint32_t rcode) { int n; int ret = fd_rtd_error_add($self, peerid, peeridlen, (os0_t)STRING, LENGTH, rcode, NULL, &n); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } return n; } struct fd_list * extract(int score = 0) { struct fd_list * li = NULL; fd_rtd_candidate_extract($self, &li, score); return li; } } %extend rtd_candidate { void dump() { fd_log_debug("candidate %p", $self); fd_log_debug(" id : %s", $self->diamid); fd_log_debug(" rlm: %s", $self->realm); fd_log_debug(" sc : %d", $self->score); } } %{ /* call it (will be called from a different thread than the interpreter, when message arrives) */ static int call_the_python_rt_fwd_callback(void * pycb, struct msg **msg) { PyObject *PyMsg; PyObject *cb, *result = NULL; int ret = 0; if (!pycb) { fd_log_debug("Internal error: missing the callback!"); return ENOTSUP; } cb = pycb; SWIG_PYTHON_THREAD_BEGIN_BLOCK; /* Convert the arguments */ PyMsg = SWIG_NewPointerObj((void *)*msg, SWIGTYPE_p_msg, 0 ); /* Call the function */ result = PyObject_CallFunction(cb, "(O)", PyMsg); /* The result is supposedly composed of: [ ret, *msg ] */ if ((result == NULL) || (!PyList_Check(result)) || (PyList_Size(result) != 2)) { fd_log_debug("Error: The Python callback did not return [ ret, msg ]."); ret = EINVAL; goto out; } /* Convert the return values */ if (!SWIG_IsOK(SWIG_AsVal_int(PyList_GetItem(result, 0), &ret))) { fd_log_debug("Error: Cannot convert the first return value to integer."); ret = EINVAL; goto out; } if (ret) { TRACE_DEBUG(INFO, "The Python callback returned the error code %d (%s)", ret, strerror(ret)); goto out; } if (!SWIG_IsOK(SWIG_ConvertPtr(PyList_GetItem(result, 1), (void *)msg, SWIGTYPE_p_msg, SWIG_POINTER_DISOWN))) { fd_log_debug("Error: Cannot convert the second return value to message."); ret = EINVAL; goto out; } out: Py_XDECREF(result); SWIG_PYTHON_THREAD_END_BLOCK; return ret; } %} struct fd_rt_fwd_hdl { }; %extend fd_rt_fwd_hdl{ fd_rt_fwd_hdl(PyObject * PyCb, enum fd_rt_fwd_dir dir) { struct fd_rt_fwd_hdl * r = NULL; int ret; Py_XINCREF(PyCb); ret = fd_rt_fwd_register( call_the_python_rt_fwd_callback, PyCb, dir, &r ); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return r; } ~fd_rt_fwd_hdl() { PyObject * func; int ret = fd_rt_fwd_unregister ( $self, (void *) &func ); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return; } Py_XDECREF(func); return; } } %{ /* call it (will be called from a different thread than the interpreter, when message arrives) */ static int call_the_python_rt_out_callback(void * pycb, struct msg **msg, struct fd_list * candidates) { PyObject *PyMsg, *PyCands; PyObject *cb, *result = NULL; int ret = 0; if (!pycb) { fd_log_debug("Internal error: missing the callback!"); return ENOTSUP; } cb = pycb; SWIG_PYTHON_THREAD_BEGIN_BLOCK; /* Convert the arguments */ PyMsg = SWIG_NewPointerObj((void *)*msg, SWIGTYPE_p_msg, 0 ); PyCands = SWIG_NewPointerObj((void *)candidates, SWIGTYPE_p_fd_list, 0 ); /* Call the function */ result = PyObject_CallFunction(cb, "(OO)", PyMsg, PyCands); /* The result is supposedly composed of: [ ret, *msg ] */ if (result == NULL){ fd_log_debug("Error: The Python callback raised an exception."); ret = EINVAL; goto out; } /* Convert the return values */ if (!SWIG_IsOK(SWIG_AsVal_int(result, &ret))) { fd_log_debug("Error: Cannot convert the return value to integer."); ret = EINVAL; goto out; } out: Py_XDECREF(result); SWIG_PYTHON_THREAD_END_BLOCK; return ret; } %} struct fd_rt_out_hdl { }; %extend fd_rt_out_hdl{ fd_rt_out_hdl(PyObject * PyCb, int priority = 0) { struct fd_rt_out_hdl * r = NULL; int ret; Py_XINCREF(PyCb); ret = fd_rt_out_register( call_the_python_rt_out_callback, PyCb, priority, &r ); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return r; } ~fd_rt_out_hdl() { PyObject * func; int ret = fd_rt_out_unregister ( $self, (void *) &func ); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return; } Py_XDECREF(func); return; } } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_interactive/sessions.i000066400000000000000000000142741333553357400264330ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Do not include this directly, use dbg_interactive.i instead */ /****** SESSIONS *********/ %{ struct sess_state { PyObject * pystate; }; /* call it (might be called from a different thread than the interpreter, when session times out) */ static void call_the_python_cleanup_callback(struct sess_state * state, os0_t sid, void * cb) { PyObject *result; if (!cb) { fd_log_debug("Internal error: missing callback object!"); return; } /* Call the function */ SWIG_PYTHON_THREAD_BEGIN_BLOCK; result = PyObject_CallFunction((PyObject *)cb, "(Os)", state, sid); Py_XDECREF(result); SWIG_PYTHON_THREAD_END_BLOCK; return; } %} struct session_handler { }; %nodefaultctor session_handler; %extend session_handler { session_handler(PyObject * PyCb) { struct session_handler * hdl = NULL; int ret; Py_XINCREF(PyCb); ret = fd_sess_handler_create ( &hdl, call_the_python_cleanup_callback, NULL, PyCb ); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return hdl; } ~session_handler() { struct session_handler * hdl = self; PyObject * cb = NULL; int ret = fd_sess_handler_destroy(&hdl, (void *)&cb); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } /* Now free the callback */ Py_XDECREF(cb); return; } void dump() { char * buf = NULL; size_t len; printf("%s", fd_sess_dump_hdl(&buf, &len, NULL, $self)); free(buf); } } struct session { }; %extend session { /* The first two versions create a new session string. The third one allow to use an existing string. */ session() { int ret; struct session * s = NULL; ret = fd_sess_new(&s, fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len, (os0_t)"dbg_interactive", CONSTSTRLEN("dbg_interactive")); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return s; } session(char * diamid, char * STRING, size_t LENGTH) { int ret; struct session * s = NULL; ret = fd_sess_new(&s, diamid, 0, (os0_t)STRING, LENGTH); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } return s; } session(char * STRING, size_t LENGTH) { int ret, n; struct session * s = NULL; ret = fd_sess_fromsid((os0_t)STRING, LENGTH, &s, &n); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } /* When defining n as OUTPUT parameter, we get something strange... Use fd_sess_fromsid if you need it */ #if 0 if (n) { fd_log_debug("A new session has been created"); } else { fd_log_debug("A session with same id already existed"); } #endif /* 0 */ return s; } ~session() { struct session * s = self; int ret = fd_sess_reclaim(&s); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } return; } %cstring_output_allocate_size(char ** outsid, size_t * sidlen, /* do not free */); void getsid(char ** outsid, size_t * sidlen) { int ret; ret = fd_sess_getsid( $self, (void *)outsid, sidlen); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return; } return; } void settimeout(long seconds) { struct timespec timeout; int ret; clock_gettime(CLOCK_REALTIME, &timeout); timeout.tv_sec += seconds; ret = fd_sess_settimeout( $self, &timeout ); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } } void dump() { char * buf = NULL; size_t len = 0; printf("%s", fd_sess_dump(&buf, &len, NULL, $self, 1) ); free(buf); } void store(struct session_handler * handler, PyObject * DISOWN) { int ret; struct sess_state * st = NULL; st = malloc(sizeof(struct sess_state)); st->pystate = DISOWN; Py_XINCREF(DISOWN); ret = fd_sess_state_store(handler, $self, (void *) &st); if (ret != 0) { DI_ERROR(ret, NULL, NULL); } } %newobject retrieve; PyObject * retrieve(struct session_handler * handler) { int ret; struct sess_state * st = NULL; PyObject * state = NULL; ret = fd_sess_state_retrieve(handler, $self, (void *) &st); if (ret != 0) { DI_ERROR(ret, NULL, NULL); return NULL; } if (st == NULL) { Py_INCREF(Py_None); return Py_None; } state = st->pystate; free(st); return state; } } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_monitor/000077500000000000000000000000001333553357400235555ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_monitor/CMakeLists.txt000066400000000000000000000003641333553357400263200ustar00rootroot00000000000000# Monitoring extension PROJECT("Monitor extension" C) FD_ADD_EXTENSION(dbg_monitor dbg_monitor.c) #### ## INSTALL section ## INSTALL(TARGETS dbg_monitor LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-debug-tools) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_monitor/dbg_monitor.c000066400000000000000000000161561333553357400262350ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Monitoring extension: - periodically display queues and peers information - upon SIGUSR2, display additional debug information */ #include #include #ifndef MONITOR_SIGNAL #define MONITOR_SIGNAL SIGUSR2 #endif /* MONITOR_SIGNAL */ static int monitor_main(char * conffile); EXTENSION_ENTRY("dbg_monitor", monitor_main); /* Display information about a queue */ static void display_info(char * queue_desc, char * peer, int current_count, int limit_count, int highest_count, long long total_count, struct timespec * total, struct timespec * blocking, struct timespec * last) { long long us = (total->tv_sec * 1000000) + (total->tv_nsec / 1000); long double throughput = (long double)total_count * 1000000; throughput /= us; if (peer) { TRACE_DEBUG(INFO, "'%s'@'%s': cur:%d/%d, h:%d, T:%lld in %ld.%06lds (%.2LFitems/s), blocked:%ld.%06lds, last processing:%ld.%06lds", queue_desc, peer, current_count, limit_count, highest_count, total_count, total->tv_sec, total->tv_nsec/1000, throughput, blocking->tv_sec, blocking->tv_nsec/1000, last->tv_sec, last->tv_nsec/1000); } else { TRACE_DEBUG(INFO, "Global '%s': cur:%d/%d, h:%d, T:%lld in %ld.%06lds (%.2LFitems/s), blocked:%ld.%06lds, last processing:%ld.%06lds", queue_desc, current_count, limit_count, highest_count, total_count, total->tv_sec, total->tv_nsec/1000, throughput, blocking->tv_sec, blocking->tv_nsec/1000, last->tv_sec, last->tv_nsec/1000); } } /* Thread to display periodical debug information */ static pthread_t thr; static void * mn_thr(void * arg) { int i = 0; fd_log_threadname("Monitor thread"); char * buf = NULL; size_t len; /* Loop */ while (1) { int current_count, limit_count, highest_count; long long total_count; struct timespec total, blocking, last; struct fd_list * li; #ifdef DEBUG for (i++; i % 30; i++) { fd_log_debug("[dbg_monitor] %ih%*im%*is", i/3600, 2, (i/60) % 60 , 2, i%60); /* This makes it easier to detect inactivity periods in the log file */ sleep(1); } #else /* DEBUG */ sleep(3599); /* 1 hour */ #endif /* DEBUG */ TRACE_DEBUG(INFO, "[dbg_monitor] Dumping queues statistics"); CHECK_FCT_DO( fd_stat_getstats(STAT_G_LOCAL, NULL, ¤t_count, &limit_count, &highest_count, &total_count, &total, &blocking, &last), ); display_info("Local delivery", NULL, current_count, limit_count, highest_count, total_count, &total, &blocking, &last); CHECK_FCT_DO( fd_stat_getstats(STAT_G_INCOMING, NULL, ¤t_count, &limit_count, &highest_count, &total_count, &total, &blocking, &last), ); display_info("Total received", NULL, current_count, limit_count, highest_count, total_count, &total, &blocking, &last); CHECK_FCT_DO( fd_stat_getstats(STAT_G_OUTGOING, NULL, ¤t_count, &limit_count, &highest_count, &total_count, &total, &blocking, &last), ); display_info("Total sending", NULL, current_count, limit_count, highest_count, total_count, &total, &blocking, &last); CHECK_FCT_DO( pthread_rwlock_rdlock(&fd_g_peers_rw), /* continue */ ); for (li = fd_g_peers.next; li != &fd_g_peers; li = li->next) { struct peer_hdr * p = (struct peer_hdr *)li->o; TRACE_DEBUG(INFO, "%s", fd_peer_dump(&buf, &len, NULL, p, 1)); CHECK_FCT_DO( fd_stat_getstats(STAT_P_PSM, p, ¤t_count, &limit_count, &highest_count, &total_count, &total, &blocking, &last), ); display_info("Events, incl. recept", p->info.pi_diamid, current_count, limit_count, highest_count, total_count, &total, &blocking, &last); CHECK_FCT_DO( fd_stat_getstats(STAT_P_TOSEND, p, ¤t_count, &limit_count, &highest_count, &total_count, &total, &blocking, &last), ); display_info("Outgoing", p->info.pi_diamid, current_count, limit_count, highest_count, total_count, &total, &blocking, &last); } CHECK_FCT_DO( pthread_rwlock_unlock(&fd_g_peers_rw), /* continue */ ); TRACE_DEBUG(INFO, "[dbg_monitor] Dumping servers information"); TRACE_DEBUG(INFO, "%s", fd_servers_dump(&buf, &len, NULL, 1)); sleep(1); } free(buf); return NULL; } /* Function called on receipt of MONITOR_SIGNAL */ static void got_sig() { char * buf = NULL; size_t len; TRACE_DEBUG(INFO, "[dbg_monitor] Dumping config information"); TRACE_DEBUG(INFO, "%s", fd_conf_dump(&buf, &len, NULL)); TRACE_DEBUG(INFO, "[dbg_monitor] Dumping extensions information"); TRACE_DEBUG(INFO, "%s", fd_ext_dump(&buf, &len, NULL)); TRACE_DEBUG(INFO, "[dbg_monitor] Dumping dictionary information"); TRACE_DEBUG(INFO, "%s", fd_dict_dump(&buf, &len, NULL, fd_g_config->cnf_dict)); free(buf); } /* Entry point */ static int monitor_main(char * conffile) { TRACE_ENTRY("%p", conffile); /* Catch signal SIGUSR1 */ CHECK_FCT( fd_event_trig_regcb(MONITOR_SIGNAL, "dbg_monitor", got_sig)); CHECK_POSIX( pthread_create( &thr, NULL, mn_thr, NULL ) ); return 0; } /* Cleanup */ void fd_ext_fini(void) { TRACE_ENTRY(); CHECK_FCT_DO( fd_thr_term(&thr), /* continue */ ); return ; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_msg_dumps/000077500000000000000000000000001333553357400240645ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_msg_dumps/CMakeLists.txt000066400000000000000000000003511333553357400266230ustar00rootroot00000000000000PROJECT("Messages dump extension" C) FD_ADD_EXTENSION(dbg_msg_dumps dbg_msg_dumps.c) #### ## INSTALL section ## INSTALL(TARGETS dbg_msg_dumps LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-debug-tools) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_msg_dumps/Makefile.am000066400000000000000000000010701333553357400261160ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in extlib_LTLIBRARIES = dbg_msg_dumps.la dbg_msg_dumps_la_SOURCES = \ dbg_msg_dumps.c dbg_msg_dumps_la_DEPENDENCIES = \ $(top_srcdir)/libfdcore/libfdcore.la \ $(top_srcdir)/libfdproto/libfdproto.la dbg_msg_dumps_la_LIBADD = \ $(top_srcdir)/libfdcore/libfdcore.la \ $(top_srcdir)/libfdproto/libfdproto.la AM_LDFLAGS = \ -module -avoid-version -shared AM_CPPFLAGS = \ -I$(top_srcdir)/include AM_CFLAGS = \ -Wall -Werror MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_msg_dumps/dbg_msg_dumps.c000066400000000000000000000345121333553357400270470ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* This extension uses the hooks mechanism to display the full content of received and sent messages, for learning & debugging purpose. Do NOT use this extension in production environment because it will slow down all operation. */ /* You can add a configuration parameter on the LoadExtension line, e.g. LoadExtension="dbg_msg_dump.fdx":"0x149"; The value is an hexadecimal value with the following bits meaning: */ #define HK_ERRORS_QUIET 0x0001 /* errors are not dumped -- removes the default handling as well */ #define HK_ERRORS_COMPACT 0x0002 /* errors in compact mode */ #define HK_ERRORS_FULL 0x0004 /* errors in full mode (1 line with all the data) */ #define HK_ERRORS_TREE 0x0008 /* errors in treeview mode (message split over multiple lines) */ #define HK_SNDRCV_QUIET 0x0010 /* send+rcv are not dumped -- removes the default handling as well */ #define HK_SNDRCV_COMPACT 0x0020 /* send+rcv in compact mode */ #define HK_SNDRCV_FULL 0x0040 /* send+rcv in full mode */ #define HK_SNDRCV_TREE 0x0080 /* send+rcv in tree mode */ #define HK_ROUTING_QUIET 0x0100 /* routing decisions are not dumped -- removes the default handling as well */ #define HK_ROUTING_COMPACT 0x0200 /* routing decisions in compact mode */ #define HK_ROUTING_FULL 0x0400 /* routing decisions in full mode */ #define HK_ROUTING_TREE 0x0800 /* routing decisions in tree mode */ #define HK_PEERS_QUIET 0x1000 /* peers connections events are not dumped -- removes the default handling as well */ #define HK_PEERS_COMPACT 0x2000 /* peers connections events in compact mode */ #define HK_PEERS_FULL 0x4000 /* peers connections events in full mode */ #define HK_PEERS_TREE 0x8000 /* peers connections events in tree mode */ /* Default value is HK_ERRORS_TREE + HK_SNDRCV_TREE + HK_PEERS_TREE */ #include static struct fd_hook_hdl *md_hdl[4] = {NULL,NULL,NULL,NULL}; static uint32_t dump_level = HK_ERRORS_TREE | HK_SNDRCV_TREE | HK_PEERS_TREE; /* default */ static char * buf = NULL; static size_t len; static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; /* The callback called when messages are received and sent */ static void md_hook_cb_tree(enum fd_hook_type type, struct msg * msg, struct peer_hdr * peer, void * other, struct fd_hook_permsgdata *pmd, void * regdata) { char * peer_name = peer ? peer->info.pi_diamid : ""; CHECK_POSIX_DO( pthread_mutex_lock(&mtx), ); if (msg) { CHECK_MALLOC_DO( fd_msg_dump_treeview(&buf, &len, NULL, msg, fd_g_config->cnf_dict, (type == HOOK_MESSAGE_PARSING_ERROR) ? 0 : 1, 1), { LOG_E("Error while dumping a message"); pthread_mutex_unlock(&mtx); return; } ); } switch (type) { /* errors */ case HOOK_MESSAGE_FAILOVER: LOG_E("FAILOVER from '%s':", peer_name); LOG_SPLIT(FD_LOG_ERROR, " ", buf, NULL); break; case HOOK_MESSAGE_PARSING_ERROR: if (msg) { DiamId_t id = NULL; if (!fd_msg_source_get( msg, &id, NULL )) id = (DiamId_t)""; if (!id) id = (DiamId_t)""; LOG_E("PARSING ERROR: '%s' from '%s': ", (char *)other, (char *)id); LOG_SPLIT(FD_LOG_ERROR, " ", buf, NULL); } else { struct fd_cnx_rcvdata *rcv_data = other; CHECK_MALLOC_DO(fd_dump_extend_hexdump(&buf, &len, NULL, rcv_data->buffer, rcv_data->length, 0, 0), break); LOG_E("PARSING ERROR: %zdB msg from '%s': %s", rcv_data->length, peer_name, buf); } break; case HOOK_MESSAGE_ROUTING_ERROR: LOG_E("ROUTING ERROR '%s' for: ", (char *)other); LOG_SPLIT(FD_LOG_ERROR, " ", buf, NULL); break; case HOOK_MESSAGE_DROPPED: LOG_E("DROPPED '%s'", (char *)other); LOG_SPLIT(FD_LOG_ERROR, " ", buf, NULL); break; /* send receive */ case HOOK_MESSAGE_RECEIVED: LOG_N("RCV from '%s':", peer_name); LOG_SPLIT(FD_LOG_NOTICE, " ", buf, NULL); break; case HOOK_MESSAGE_SENT: LOG_N("SND to '%s':", peer_name); LOG_SPLIT(FD_LOG_NOTICE, " ", buf, NULL); break; /* routing */ case HOOK_MESSAGE_LOCAL: LOG_N("ISSUED:"); LOG_SPLIT(FD_LOG_NOTICE, " ", buf, NULL); break; case HOOK_MESSAGE_ROUTING_FORWARD: LOG_N("FORWARDING: %s", buf); LOG_SPLIT(FD_LOG_NOTICE, " ", buf, NULL); break; case HOOK_MESSAGE_ROUTING_LOCAL: LOG_N("DISPATCHING: %s", buf); LOG_SPLIT(FD_LOG_NOTICE, " ", buf, NULL); break; /* peers */ case HOOK_PEER_CONNECT_FAILED: LOG_N("CONNECT FAILED to %s: %s", peer_name, (char *)other); break; case HOOK_PEER_CONNECT_SUCCESS: { char protobuf[40]; if (peer) { CHECK_FCT_DO(fd_peer_cnx_proto_info(peer, protobuf, sizeof(protobuf)), break ); } else { protobuf[0] = '-'; protobuf[1] = '\0'; } LOG_N("CONNECTED TO '%s' (%s):", peer_name, protobuf); LOG_SPLIT(FD_LOG_NOTICE, " ", buf, NULL); } break; /* Not handled */ default: break; } CHECK_POSIX_DO( pthread_mutex_unlock(&mtx), ); } static void md_hook_cb_full(enum fd_hook_type type, struct msg * msg, struct peer_hdr * peer, void * other, struct fd_hook_permsgdata *pmd, void * regdata) { char * peer_name = peer ? peer->info.pi_diamid : ""; CHECK_POSIX_DO( pthread_mutex_lock(&mtx), ); if (msg) { CHECK_MALLOC_DO( fd_msg_dump_full(&buf, &len, NULL, msg, fd_g_config->cnf_dict, (type == HOOK_MESSAGE_PARSING_ERROR) ? 0 : 1, 1), { LOG_E("Error while dumping a message"); pthread_mutex_unlock(&mtx); return; } ); } switch (type) { /* errors */ case HOOK_MESSAGE_FAILOVER: LOG_E("FAILOVER from '%s': %s", peer_name, buf); break; case HOOK_MESSAGE_PARSING_ERROR: if (msg) { DiamId_t id = NULL; if (!fd_msg_source_get( msg, &id, NULL )) id = (DiamId_t)""; if (!id) id = (DiamId_t)""; LOG_E("PARSING ERROR: '%s' from '%s': %s", (char *)other, (char *)id, buf); } else { struct fd_cnx_rcvdata *rcv_data = other; CHECK_MALLOC_DO(fd_dump_extend_hexdump(&buf, &len, NULL, rcv_data->buffer, rcv_data->length, 0, 0), break); LOG_E("PARSING ERROR: %zdB msg from '%s': %s", rcv_data->length, peer_name, buf); } break; case HOOK_MESSAGE_ROUTING_ERROR: LOG_E("ROUTING ERROR '%s' for: %s", (char *)other, buf); break; case HOOK_MESSAGE_DROPPED: LOG_E("DROPPED '%s' %s", (char *)other, buf); break; /* send receive */ case HOOK_MESSAGE_RECEIVED: LOG_N("RCV from '%s': %s", peer_name, buf); break; case HOOK_MESSAGE_SENT: LOG_N("SND to '%s': %s", peer_name, buf); break; /* routing */ case HOOK_MESSAGE_LOCAL: LOG_N("ISSUED: %s", buf); break; case HOOK_MESSAGE_ROUTING_FORWARD: LOG_N("FORWARDING: %s", buf); break; case HOOK_MESSAGE_ROUTING_LOCAL: LOG_N("DISPATCHING: %s", buf); break; /* peers */ case HOOK_PEER_CONNECT_FAILED: LOG_N("CONNECT FAILED to %s: %s", peer_name, (char *)other); break; case HOOK_PEER_CONNECT_SUCCESS: { char protobuf[40]; if (peer) { CHECK_FCT_DO(fd_peer_cnx_proto_info(peer, protobuf, sizeof(protobuf)), break ); } else { protobuf[0] = '-'; protobuf[1] = '\0'; } LOG_N("CONNECTED TO '%s' (%s): %s", peer_name, protobuf, buf); } break; /* Not handled */ default: break; } CHECK_POSIX_DO( pthread_mutex_unlock(&mtx), ); } static void md_hook_cb_compact(enum fd_hook_type type, struct msg * msg, struct peer_hdr * peer, void * other, struct fd_hook_permsgdata *pmd, void * regdata) { char * peer_name = peer ? peer->info.pi_diamid : ""; CHECK_POSIX_DO( pthread_mutex_lock(&mtx), ); if (msg) { CHECK_MALLOC_DO( fd_msg_dump_summary(&buf, &len, NULL, msg, fd_g_config->cnf_dict, 0, 0), { LOG_E("Error while dumping a message"); pthread_mutex_unlock(&mtx); return; } ); } switch (type) { /* errors */ case HOOK_MESSAGE_FAILOVER: LOG_E("FAILOVER from '%s': %s", peer_name, buf); break; case HOOK_MESSAGE_PARSING_ERROR: if (msg) { DiamId_t id = NULL; if (!fd_msg_source_get( msg, &id, NULL )) id = (DiamId_t)""; if (!id) id = (DiamId_t)""; LOG_E("PARSING ERROR: '%s' from '%s': %s", (char *)other, (char *)id, buf); } else { struct fd_cnx_rcvdata *rcv_data = other; CHECK_MALLOC_DO(fd_dump_extend_hexdump(&buf, &len, NULL, rcv_data->buffer, rcv_data->length, 0, 0), break); LOG_E("PARSING ERROR: %zdB msg from '%s': %s", rcv_data->length, peer_name, buf); } break; case HOOK_MESSAGE_ROUTING_ERROR: LOG_E("ROUTING ERROR '%s' for: %s", (char *)other, buf); break; case HOOK_MESSAGE_DROPPED: LOG_E("DROPPED '%s' %s", (char *)other, buf); break; /* send receive */ case HOOK_MESSAGE_RECEIVED: LOG_N("RCV from '%s': %s", peer_name, buf); break; case HOOK_MESSAGE_SENT: LOG_N("SND to '%s': %s", peer_name, buf); break; /* routing */ case HOOK_MESSAGE_LOCAL: LOG_N("ISSUED: %s", buf); break; case HOOK_MESSAGE_ROUTING_FORWARD: LOG_N("FORWARDING: %s", buf); break; case HOOK_MESSAGE_ROUTING_LOCAL: LOG_N("DISPATCHING: %s", buf); break; /* peers */ case HOOK_PEER_CONNECT_FAILED: LOG_N("CONNECT FAILED to %s: %s", peer_name, (char *)other); break; case HOOK_PEER_CONNECT_SUCCESS: { char protobuf[40]; if (peer) { CHECK_FCT_DO(fd_peer_cnx_proto_info(peer, protobuf, sizeof(protobuf)), break ); } else { protobuf[0] = '-'; protobuf[1] = '\0'; } LOG_N("CONNECTED TO '%s' (%s)", peer_name, protobuf); } break; /* Not handled */ default: break; } CHECK_POSIX_DO( pthread_mutex_unlock(&mtx), ); } static void md_hook_cb_quiet(enum fd_hook_type type, struct msg * msg, struct peer_hdr * peer, void * other, struct fd_hook_permsgdata *pmd, void * regdata) { } /* Entry point */ static int md_main(char * conffile) { uint32_t mask_errors, mask_sndrcv, mask_routing, mask_peers; uint32_t mask_quiet, mask_compact, mask_full, mask_tree; TRACE_ENTRY("%p", conffile); if (conffile != NULL) { char * endp; dump_level = (uint32_t)strtoul(conffile, &endp, 16); CHECK_PARAMS_DO( *endp == '\0', { LOG_E("Configuration parameter must be in the form \"0xNNNN\""); return EINVAL; }); } mask_errors = HOOK_MASK( HOOK_MESSAGE_FAILOVER, HOOK_MESSAGE_PARSING_ERROR, HOOK_MESSAGE_ROUTING_ERROR, HOOK_MESSAGE_DROPPED ); mask_sndrcv = HOOK_MASK( HOOK_MESSAGE_RECEIVED, HOOK_MESSAGE_SENT ); mask_routing= HOOK_MASK( HOOK_MESSAGE_LOCAL, HOOK_MESSAGE_ROUTING_FORWARD, HOOK_MESSAGE_ROUTING_LOCAL ); mask_peers = HOOK_MASK( HOOK_PEER_CONNECT_FAILED, HOOK_PEER_CONNECT_SUCCESS ); mask_quiet = (dump_level & HK_ERRORS_QUIET) ? mask_errors : 0; mask_quiet |= (dump_level & HK_SNDRCV_QUIET) ? mask_sndrcv : 0; mask_quiet |= (dump_level & HK_ROUTING_QUIET) ? mask_routing : 0; mask_quiet |= (dump_level & HK_PEERS_QUIET) ? mask_peers : 0; mask_compact = (dump_level & HK_ERRORS_COMPACT) ? mask_errors : 0; mask_compact |= (dump_level & HK_SNDRCV_COMPACT) ? mask_sndrcv : 0; mask_compact |= (dump_level & HK_ROUTING_COMPACT) ? mask_routing : 0; mask_compact |= (dump_level & HK_PEERS_COMPACT) ? mask_peers : 0; mask_full = (dump_level & HK_ERRORS_FULL) ? mask_errors : 0; mask_full |= (dump_level & HK_SNDRCV_FULL) ? mask_sndrcv : 0; mask_full |= (dump_level & HK_ROUTING_FULL) ? mask_routing : 0; mask_full |= (dump_level & HK_PEERS_FULL) ? mask_peers : 0; mask_tree = (dump_level & HK_ERRORS_TREE) ? mask_errors : 0; mask_tree |= (dump_level & HK_SNDRCV_TREE) ? mask_sndrcv : 0; mask_tree |= (dump_level & HK_ROUTING_TREE) ? mask_routing : 0; mask_tree |= (dump_level & HK_PEERS_TREE) ? mask_peers : 0; if (mask_quiet) { CHECK_FCT( fd_hook_register( mask_quiet, md_hook_cb_quiet, NULL, NULL, &md_hdl[0]) ); } if (mask_compact) { CHECK_FCT( fd_hook_register( mask_compact, md_hook_cb_compact, NULL, NULL, &md_hdl[1]) ); } if (mask_full) { CHECK_FCT( fd_hook_register( mask_full, md_hook_cb_full, NULL, NULL, &md_hdl[2]) ); } if (mask_tree) { CHECK_FCT( fd_hook_register( mask_tree, md_hook_cb_tree, NULL, NULL, &md_hdl[3]) ); } return 0; } /* Cleanup */ void fd_ext_fini(void) { TRACE_ENTRY(); if (md_hdl[0]) { CHECK_FCT_DO( fd_hook_unregister( md_hdl[0] ), ); } if (md_hdl[1]) { CHECK_FCT_DO( fd_hook_unregister( md_hdl[1] ), ); } if (md_hdl[2]) { CHECK_FCT_DO( fd_hook_unregister( md_hdl[2] ), ); } if (md_hdl[2]) { CHECK_FCT_DO( fd_hook_unregister( md_hdl[3] ), ); } return ; } EXTENSION_ENTRY("dbg_msg_dumps", md_main); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_msg_timings/000077500000000000000000000000001333553357400244065ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_msg_timings/CMakeLists.txt000066400000000000000000000004151333553357400271460ustar00rootroot00000000000000# Messages timing extension PROJECT("Messages timing extension" C) FD_ADD_EXTENSION(dbg_msg_timings dbg_msg_timings.c) #### ## INSTALL section ## INSTALL(TARGETS dbg_msg_timings LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-debug-tools) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_msg_timings/dbg_msg_timings.c000066400000000000000000000134331333553357400277120ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* This extension uses the hooks mechanism to compute some timing information related to messages */ #include struct fd_hook_permsgdata { struct timespec received_on; struct timespec sent_on; }; static struct fd_hook_data_hdl *mt_data_hdl = NULL; static struct fd_hook_hdl *mt_hdl = NULL; /* The callback called when messages are received and sent */ static void mt_hook_cb(enum fd_hook_type type, struct msg * msg, struct peer_hdr * peer, void * other, struct fd_hook_permsgdata *pmd, void * regdata) { struct msg_hdr * hdr; char * buf = NULL; size_t len; ASSERT(pmd); if (type == HOOK_DATA_RECEIVED) { /* We just store the timestamp it was received on */ (void)clock_gettime(CLOCK_REALTIME, &pmd->received_on); return; } ASSERT(msg); /* Check if this message is request or answer */ CHECK_FCT_DO( fd_msg_hdr(msg, &hdr), return); if (type == HOOK_MESSAGE_RECEIVED) { ASSERT(pmd->received_on.tv_sec); /* otherwise it means the HOOK_DATA_RECEIVED hook was not trigged for this message */ if (hdr->msg_flags & CMD_FLAG_REQUEST) { /* We have received a new request, nothing special to do */ } else { /* This is an answer, check how long it took to get it */ struct fd_hook_permsgdata *qpmd = fd_hook_get_request_pmd(mt_data_hdl, msg); struct timespec delay; ASSERT(qpmd); /* If we do not have it, we must find out why */ ASSERT(qpmd->sent_on.tv_sec); /* same, would mean the HOOK_MESSAGE_SENT hook was not trigged */ TS_DIFFERENCE( &delay, &qpmd->sent_on, &pmd->received_on ); CHECK_MALLOC_DO( fd_msg_dump_summary(&buf, &len, NULL, msg, NULL, 0, 1), return ); LOG_N("[TIMING] RCV ANS %ld.%06ld sec <-'%s': %s", (long)delay.tv_sec, delay.tv_nsec / 1000, peer ? peer->info.pi_diamid : "", buf); } } else if (type == HOOK_MESSAGE_SENT) { DiamId_t source = NULL; (void)clock_gettime(CLOCK_REALTIME, &pmd->sent_on); /* Is this a forwarded message ? */ CHECK_FCT_DO( fd_msg_source_get(msg, &source, NULL), return ); if (source) { struct timespec delay; ASSERT(pmd->received_on.tv_sec); TS_DIFFERENCE( &delay, &pmd->received_on, &pmd->sent_on ); CHECK_MALLOC_DO( fd_msg_dump_summary(&buf, &len, NULL, msg, NULL, 0, 1), return ); LOG_N("[TIMING] FWD %ld.%06ld sec '%s'->'%s': %s", (long)delay.tv_sec, delay.tv_nsec / 1000, source, peer ? peer->info.pi_diamid : "", buf); } else if (hdr->msg_flags & CMD_FLAG_REQUEST) { /* We are sending a request issued locally, nothing special to log */ } else { /* We have generated an anwer, log the time it took since the corresponding request was received */ struct fd_hook_permsgdata *qpmd = fd_hook_get_request_pmd(mt_data_hdl, msg); if (qpmd->received_on.tv_sec) { struct timespec delay; TS_DIFFERENCE( &delay, &qpmd->received_on, &pmd->sent_on ); CHECK_MALLOC_DO( fd_msg_dump_summary(&buf, &len, NULL, msg, NULL, 0, 1), return ); LOG_N("[TIMING] ANS %ld.%06ld sec ->'%s': %s", (long)delay.tv_sec, delay.tv_nsec / 1000, peer ? peer->info.pi_diamid : "", buf); } } } free(buf); } /* Entry point */ static int mt_main(char * conffile) { TRACE_ENTRY("%p", conffile); CHECK_FCT( fd_hook_data_register( sizeof(struct fd_hook_permsgdata), NULL, NULL, &mt_data_hdl ) ); CHECK_FCT( fd_hook_register( HOOK_MASK( HOOK_MESSAGE_RECEIVED, HOOK_MESSAGE_SENT, HOOK_DATA_RECEIVED ), mt_hook_cb, NULL, mt_data_hdl, &mt_hdl) ); return 0; } /* Cleanup */ void fd_ext_fini(void) { TRACE_ENTRY(); CHECK_FCT_DO( fd_hook_unregister( mt_hdl ), ); return ; } EXTENSION_ENTRY("dbg_msg_timing", mt_main); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_rt/000077500000000000000000000000001333553357400225135ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_rt/CMakeLists.txt000066400000000000000000000004121333553357400252500ustar00rootroot00000000000000# The rt_debug extension PROJECT("Routing module debug extension" C) # Compile as a module FD_ADD_EXTENSION(dbg_rt dbg_rt.c) #### ## INSTALL section ## INSTALL(TARGETS dbg_rt LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-debug-tools) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dbg_rt/dbg_rt.c000066400000000000000000000102001333553357400241110ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* * Debug-only extension for routing module; * displays state information at the end of routing information process. */ #include static struct fd_rt_fwd_hdl * fwd_hdl = NULL; static struct fd_rt_out_hdl * out_hdl = NULL; /* Proxying debug callback */ static int dbgrt_fwd_cb(void * cbdata, struct msg ** msg) { char * buf = NULL; size_t buflen; TRACE_ENTRY("%p %p", cbdata, msg); LOG_D("[dbg_rt] FWD routing message: %p", msg ? *msg : NULL); if (msg) { CHECK_MALLOC( fd_msg_dump_treeview(&buf, &buflen, NULL, *msg, NULL, 0, 1) ); LOG_D("%s", buf); } free(buf); return 0; } /* Path selection debug callback */ static int dbgrt_out_cb(void * cbdata, struct msg ** pmsg, struct fd_list * candidates) { struct fd_list * li; struct msg * msg = *pmsg; char * buf = NULL; size_t buflen; TRACE_ENTRY("%p %p %p", cbdata, msg, candidates); LOG_D("[dbg_rt] OUT routing message: %p", msg); CHECK_MALLOC( fd_msg_dump_treeview(&buf, &buflen, NULL, msg, NULL, 0, 1) ); LOG_D("%s", buf); LOG_D("[dbg_rt] Current list of candidates (%p): (score - id)", msg); for (li = candidates->next; li != candidates; li = li->next) { struct rtd_candidate *c = (struct rtd_candidate *) li; LOG_D("[dbg_rt] %d -\t%s", c->score, c->diamid); } return 0; } /* Register the callbacks to the daemon */ static int dbgrt_main(char * conffile) { TRACE_ENTRY("%p", conffile); CHECK_FCT( fd_rt_fwd_register ( dbgrt_fwd_cb, NULL, RT_FWD_ALL, &fwd_hdl ) ); CHECK_FCT( fd_rt_out_register ( dbgrt_out_cb, NULL, -1 /* so that it is called late */, &out_hdl ) ); return 0; } /* Cleanup the callbacks */ void fd_ext_fini(void) { TRACE_ENTRY(); /* Unregister the modules */ CHECK_FCT_DO( fd_rt_fwd_unregister ( fwd_hdl, NULL ), /* continue */ ); CHECK_FCT_DO( fd_rt_out_unregister ( out_hdl, NULL ), /* continue */ ); return ; } /* Define the entry point function */ EXTENSION_ENTRY("dbg_rt", dbgrt_main); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_dcca/000077500000000000000000000000001333553357400231475ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_dcca/CMakeLists.txt000066400000000000000000000005101333553357400257030ustar00rootroot00000000000000# The dict_dcca extension PROJECT("Diameter DCCA (Diameter Credit Control Application ) dictionary definitions" C) # Compile as a module FD_ADD_EXTENSION(dict_dcca dict_dcca.c) #### ## INSTALL section ## INSTALL(TARGETS dict_dcca LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-dictionary-rfc4006) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_dcca/Makefile.am000066400000000000000000000010441333553357400252020ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in extlib_LTLIBRARIES = dict_dcca.la dict_dcca_la_SOURCES = \ dict_dcca.c dict_dcca_la_DEPENDENCIES = \ $(top_srcdir)/libfdcore/libfdcore.la \ $(top_srcdir)/libfdproto/libfdproto.la dict_dcca_la_LIBADD = \ $(top_srcdir)/libfdcore/libfdcore.la \ $(top_srcdir)/libfdproto/libfdproto.la AM_LDFLAGS = \ -module -avoid-version -shared AM_CPPFLAGS = \ -I$(top_srcdir)/include AM_CFLAGS = \ -Wall -Werror MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_dcca/dict_dcca.c000066400000000000000000001575041333553357400252240ustar00rootroot00000000000000/**************** Contributed by: Konstantin Chekushin and Thomas Klausner License: same as freeDiameter ****************/ /* * Dictionary definitions of objects specified in DCCA (rfc4006). */ #include /* The content of this file follows the same structure as dict_base_proto.c */ #define CHECK_dict_new( _type, _data, _parent, _ref ) \ CHECK_FCT( fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref)) ); #define CHECK_dict_search( _type, _criteria, _what, _result ) \ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); struct local_rules_definition { char *avp_name; enum rule_position position; int min; int max; }; #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) #define PARSE_loc_rules( _rulearray, _parent) { \ int __ar; \ for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ struct dict_rule_data __data = { NULL, \ (_rulearray)[__ar].position, \ 0, \ (_rulearray)[__ar].min, \ (_rulearray)[__ar].max}; \ __data.rule_order = RULE_ORDER(__data.rule_position); \ CHECK_FCT( fd_dict_search( \ fd_g_config->cnf_dict, \ DICT_AVP, \ AVP_BY_NAME, \ (_rulearray)[__ar].avp_name, \ &__data.rule_avp, 0 ) ); \ if ( !__data.rule_avp ) { \ TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_name ); \ return ENOENT; \ } \ CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL), \ { \ TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \ (_rulearray)[__ar].avp_name ); \ return EINVAL; \ } ); \ } \ } #define enumval_def_u32( _val_, _str_ ) \ { _str_, { .u32 = _val_ }} #define enumval_def_os( _len_, _val_, _str_ ) \ { _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}} static int dict_dcca_entry(char * conffile) { struct dict_object * dcca; TRACE_ENTRY("%p", conffile); /* Applications section */ { #if 0 /* modified by acetcom */ /* DCCA */ { struct dict_application_data data = { 4, "Diameter Credit Control Application" }; CHECK_dict_new( DICT_APPLICATION, &data, NULL, &dcca); } #else /* Create the vendors */ { struct dict_vendor_data vendor_data = { 10415, "3GPP" }; CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data, NULL, NULL)); } { struct dict_object * vendor; CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_VENDOR, VENDOR_BY_NAME, "3GPP", &vendor, ENOENT)); struct dict_application_data app_data = { 16777238, "Gx" }; CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_APPLICATION, &app_data, vendor, &dcca)); } #endif /* end of modification */ } /* Result codes */ { struct dict_object *ResultCodeType; CHECK_dict_search(DICT_TYPE, TYPE_BY_NAME, "Enumerated*(Result-Code)", &ResultCodeType); { struct dict_enumval_data error_code = {"END_USER_SERVICE_DENIED", { .u32 = 4010}}; CHECK_dict_new(DICT_ENUMVAL, &error_code, ResultCodeType, NULL); } { struct dict_enumval_data error_code = {"CREDIT_CONTROL_NOT_APPLICABLE", { .u32 = 4011}}; CHECK_dict_new(DICT_ENUMVAL, &error_code, ResultCodeType, NULL); } { struct dict_enumval_data error_code = {"CREDIT_LIMIT_REACHED", { .u32 = 4012}}; CHECK_dict_new(DICT_ENUMVAL, &error_code, ResultCodeType, NULL); } { struct dict_enumval_data error_code = {"USER_UNKNOWN", { .u32 = 5030}}; CHECK_dict_new(DICT_ENUMVAL, &error_code, ResultCodeType, NULL); } { struct dict_enumval_data error_code = {"RATING_FAILED", { .u32 = 5031}}; CHECK_dict_new(DICT_ENUMVAL, &error_code, ResultCodeType, NULL); } } /* AVP section */ { struct dict_object * Address_type; struct dict_object * UTF8String_type; struct dict_object * DiameterIdentity_type; struct dict_object * DiameterURI_type; struct dict_object * Time_type; struct dict_object * IPFilterRule_type; CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Address", &Address_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterIdentity", &DiameterIdentity_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterURI", &DiameterURI_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Time", &Time_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "IPFilterRule", &IPFilterRule_type); /* CC-Correlation-Id */ { /* OctetString. */ struct dict_avp_data data = { 411, /* Code */ 0, /* Vendor */ "CC-Correlation-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* CC-Input-Octets */ { /* Unsigned64. */ struct dict_avp_data data = { 412, /* Code */ 0, /* Vendor */ "CC-Input-Octets", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* CC-Output-Octets */ { /* Unsigned64. */ struct dict_avp_data data = { 414, /* Code */ 0, /* Vendor */ "CC-Output-Octets", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* CC-Request-Number */ { /* Unsigned32. */ struct dict_avp_data data = { 415, /* Code */ 0, /* Vendor */ "CC-Request-Number", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* CC-Request-Type */ { /* Enumerated. */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(CC-Request-Type)", NULL, NULL, NULL }; struct dict_enumval_data t_1 = { "INITIAL_REQUEST", { .i32 = 1 }}; struct dict_enumval_data t_2 = { "UPDATE_REQUEST", { .i32 = 2 }}; struct dict_enumval_data t_3 = { "TERMINATION_REQUEST", { .i32 = 3 }}; struct dict_enumval_data t_4 = { "EVENT_REQUEST", { .i32 = 4 }}; struct dict_avp_data data = { 416, /* Code */ 0, /* Vendor */ "CC-Request-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_4 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* CC-Service-Specific-Units */ { /* Unsigned64. */ struct dict_avp_data data = { 417, /* Code */ 0, /* Vendor */ "CC-Service-Specific-Units", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* CC-Session-Failover */ { /* Enumerated. */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(CC-Session-Failover)" , NULL, NULL, NULL }; struct dict_enumval_data t_1 = { "FAILOVER_NOT_SUPPORTED", { .i32 = 0 }}; struct dict_enumval_data t_2 = { "FAILOVER_SUPPORTED", { .i32 = 1 }}; struct dict_avp_data data = { 418, /* Code */ 0, /* Vendor */ "CC-Session-Failover", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* CC-Sub-Session-Id */ { /* Unsigned64. */ struct dict_avp_data data = { 419, /* Code */ 0, /* Vendor */ "CC-Sub-Session-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* CC-Time */ { /* Unsigned32. */ struct dict_avp_data data = { 420, /* Code */ 0, /* Vendor */ "CC-Time", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* CC-Total-Octets */ { /* Unsigned64. */ struct dict_avp_data data = { 421, /* Code */ 0, /* Vendor */ "CC-Total-Octets", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* CC-Unit-Type */ { /* Enumerated. */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(CC-Unit-Type)" , NULL, NULL, NULL }; struct dict_enumval_data t_1 = { "TIME", { .i32 = 0 }}; struct dict_enumval_data t_2 = { "MONEY", { .i32 = 1 }}; struct dict_enumval_data t_3 = { "TOTAL-OCTETS", { .i32 = 2 }}; struct dict_enumval_data t_4 = { "INPUT-OCTETS", { .i32 = 3 }}; struct dict_enumval_data t_5 = { "OUTPUT-OCTETS", { .i32 = 4 }}; struct dict_enumval_data t_6 = { "SERVICE-SPECIFIC-UNITS", { .i32 = 5 }}; struct dict_avp_data data = { 454, /* Code */ 0, /* Vendor */ "CC-Unit-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_4 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_5 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_6 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Check-Balance-Result */ { /* Enumerated. */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Check-Balance-Result)" , NULL, NULL, NULL }; struct dict_enumval_data t_1 = { "ENOUGH_CREDIT", { .i32 = 0 }}; struct dict_enumval_data t_2 = { "NO_CREDIT", { .i32 = 1 }}; struct dict_avp_data data = { 422, /* Code */ 0, /* Vendor */ "Check-Balance-Result", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Cost-Unit */ { /* UTF8String. */ struct dict_avp_data data = { 424, /* Code */ 0, /* Vendor */ "Cost-Unit", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Credit-Control */ { /* Enumerated. */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Credit-Control)" , NULL, NULL, NULL }; struct dict_enumval_data t_1 = { "CREDIT_AUTHORIZATION", { .i32 = 0 }}; struct dict_enumval_data t_2 = { "RE_AUTHORIZATION", { .i32 = 1 }}; struct dict_avp_data data = { 426, /* Code */ 0, /* Vendor */ "Credit-Control", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_1, type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2, type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Credit-Control-Failure-Handling */ { /* Enumerated. */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Credit-Control-Failure-Handling)" , NULL, NULL, NULL }; struct dict_enumval_data t_1 = { "TERMINATE", { .i32 = 0 }}; struct dict_enumval_data t_2 = { "CONTINUE", { .i32 = 1 }}; struct dict_enumval_data t_3 = { "RETRY_AND_TERMINATE", { .i32 = 2 }}; struct dict_avp_data data = { 427, /* Code */ 0, /* Vendor */ "Credit-Control-Failure-Handling", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Currency-Code */ { /* Unsigned32. */ struct dict_avp_data data = { 425, /* Code */ 0, /* Vendor */ "Currency-Code", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Direct-Debiting-Failure-Handling */ { /* Enumerated. */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Direct-Debiting-Failure-Handling)" , NULL, NULL, NULL }; struct dict_enumval_data t_1 = { "TERMINATE_OR_BUFFER", { .i32 = 0 }}; struct dict_enumval_data t_2 = { "CONTINUE", { .i32 = 1 }}; struct dict_avp_data data = { 428, /* Code */ 0, /* Vendor */ "Direct-Debiting-Failure-Handling", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Exponent */ { /* Integer32. */ struct dict_avp_data data = { 429, /* Code */ 0, /* Vendor */ "Exponent", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Final-Unit-Action */ { /* Enumerated. */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Final-Unit-Action)" , NULL, NULL, NULL }; struct dict_enumval_data t_1 = { "TERMINATE", { .i32 = 0 }}; struct dict_enumval_data t_2 = { "REDIRECT", { .i32 = 1 }}; struct dict_enumval_data t_3 = { "RESTRICT_ACCESS", { .i32 = 2 }}; struct dict_avp_data data = { 449, /* Code */ 0, /* Vendor */ "Final-Unit-Action", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* G-S-U-Pool-Identifier */ { /* Unsigned32. */ struct dict_avp_data data = { 453, /* Code */ 0, /* Vendor */ "G-S-U-Pool-Identifier", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Multiple-Services-Indicator */ { /* Enumerated. */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Multiple-Services-Indicator)" , NULL, NULL, NULL }; struct dict_enumval_data t_1 = { "MULTIPLE_SERVICES_NOT_SUPPORTED", { .i32 = 0 }}; struct dict_enumval_data t_2 = { "MULTIPLE_SERVICES_SUPPORTED", { .i32 = 1 }}; struct dict_avp_data data = { 455, /* Code */ 0, /* Vendor */ "Multiple-Services-Indicator", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Rating-Group */ { /* Unsigned32. */ struct dict_avp_data data = { 432, /* Code */ 0, /* Vendor */ "Rating-Group", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Redirect-Address-Type */ { /* Enumerated. */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Redirect-Address-Type)" , NULL, NULL, NULL }; struct dict_enumval_data t_1 = { "IPV4_ADDRESS", { .i32 = 0 }}; struct dict_enumval_data t_2 = { "IPV6_ADDRESS", { .i32 = 1 }}; struct dict_enumval_data t_3 = { "URL", { .i32 = 2 }}; struct dict_enumval_data t_4 = { "SIP_URI", { .i32 = 3 }}; struct dict_avp_data data = { 433, /* Code */ 0, /* Vendor */ "Redirect-Address-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_4 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Redirect-Server-Address */ { /* UTF8String. */ struct dict_avp_data data = { 435, /* Code */ 0, /* Vendor */ "Redirect-Server-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Requested-Action */ { /* Enumerated. */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Requested-Action)" , NULL, NULL, NULL }; struct dict_enumval_data t_1 = { "DIRECT_DEBITING", { .i32 = 0 }}; struct dict_enumval_data t_2 = { "REFUND_ACCOUNT", { .i32 = 1 }}; struct dict_enumval_data t_3 = { "CHECK_BALANCE", { .i32 = 2 }}; struct dict_enumval_data t_4 = { "PRICE_ENQUIRY", { .i32 = 3 }}; struct dict_avp_data data = { 436, /* Code */ 0, /* Vendor */ "Requested-Action", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_4 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Restriction-Filter-Rule */ { /* IPFiltrRule. */ struct dict_avp_data data = { 438, /* Code */ 0, /* Vendor */ "Restriction-Filter-Rule", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , IPFilterRule_type, NULL); } /*Service-Context-Id */ { /* UTF8String. */ struct dict_avp_data data = { 461, /* Code */ 0, /* Vendor */ "Service-Context-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Service-Identifier */ { /* Unsigned32. */ struct dict_avp_data data = { 439, /* Code */ 0, /* Vendor */ "Service-Identifier", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Service-Parameter-Type */ { /* Unsigned32. */ struct dict_avp_data data = { 441, /* Code */ 0, /* Vendor */ "Service-Parameter-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Service-Parameter-Value */ { /* OctetString. */ struct dict_avp_data data = { 442, /* Code */ 0, /* Vendor */ "Service-Parameter-Value", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Subscription-Id-Data */ { /* UTF8String. */ struct dict_avp_data data = { 444, /* Code */ 0, /* Vendor */ "Subscription-Id-Data", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Subscription-Id-Type */ { /* Enumerated. */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Subscription-Id-Type)" , NULL, NULL, NULL }; struct dict_enumval_data t_1 = { "END_USER_E164", { .i32 = 0 }}; struct dict_enumval_data t_2 = { "END_USER_IMSI", { .i32 = 1 }}; struct dict_enumval_data t_3 = { "END_USER_SIP_URI", { .i32 = 2 }}; struct dict_enumval_data t_4 = { "END_USER_NAI", { .i32 = 3 }}; struct dict_avp_data data = { 450, /* Code */ 0, /* Vendor */ "Subscription-Id-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_4 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Tariff-Change-Usage */ { /* Enumerated. */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Tariff-Change-Usage)" , NULL, NULL, NULL }; struct dict_enumval_data t_1 = { "UNIT_BEFORE_TARIFF_CHANGE", { .i32 = 0 }}; struct dict_enumval_data t_2 = { "UNIT_AFTER_TARIFF_CHANGE", { .i32 = 1 }}; struct dict_enumval_data t_3 = { "UNIT_INDETERMINATE", { .i32 = 2 }}; struct dict_avp_data data = { 452, /* Code */ 0, /* Vendor */ "Tariff-Change-Usage", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Tariff-Time-Change */ { /* Time. */ struct dict_avp_data data = { 451, /* Code */ 0, /* Vendor */ "Tariff-Time-Change", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Time_type, NULL); } /* User-Equipment-Info-Type */ { /* Enumerated. */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(User-Equipment-Info-Type)" , NULL, NULL, NULL }; struct dict_enumval_data t_1 = { "IMEISV", { .i32 = 0 }}; struct dict_enumval_data t_2 = { "MAC", { .i32 = 1 }}; struct dict_enumval_data t_3 = { "EUI64", { .i32 = 2 }}; struct dict_avp_data data = { 459, /* Code */ 0, /* Vendor */ "User-Equipment-Info-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* User-Equipment-Info-Value */ { /* OctetString. */ struct dict_avp_data data = { 460, /* Code */ 0, /* Vendor */ "User-Equipment-Info-Value", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Value-Digits */ { /* Integer64. */ struct dict_avp_data data = { 447, /* Code */ 0, /* Vendor */ "Value-Digits", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Validity-Time */ { /* Unsigned32. */ struct dict_avp_data data = { 448, /* Code */ 0, /* Vendor */ "Validity-Time", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Grouped AVPs below since they have dependencies on types above */ /* Redirect-Server */ { /* Grouped */ struct dict_object * avp; struct dict_avp_data data = { 434, /* Code */ 0, /* Vendor */ "Redirect-Server", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Redirect-Address-Type", RULE_REQUIRED, -1, 1 }, { "Redirect-Server-Address", RULE_REQUIRED, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* Service-Parameter-Info */ { /* Grouped */ struct dict_object * avp; struct dict_avp_data data = { 440, /* Code */ 0, /* Vendor */ "Service-Parameter-Info", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Service-Parameter-Type", RULE_REQUIRED, -1, 1 }, { "Service-Parameter-Value", RULE_REQUIRED, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* Subscription-Id */ { /* Grouped */ struct dict_object * avp; struct dict_avp_data data = { 443, /* Code */ 0, /* Vendor */ "Subscription-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Subscription-Id-Type", RULE_REQUIRED, -1, 1 }, { "Subscription-Id-Data", RULE_REQUIRED, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* Unit-Value */ { /* Grouped */ struct dict_object * avp; struct dict_avp_data data = { 445, /* Code */ 0, /* Vendor */ "Unit-Value", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Value-Digits", RULE_REQUIRED, -1, 1 }, { "Exponent", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* User-Equipment-Info */ { /* Grouped */ struct dict_object * avp; struct dict_avp_data data = { 458, /* Code */ 0, /* Vendor */ "User-Equipment-Info", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "User-Equipment-Info-Type", RULE_REQUIRED, -1, 1 }, { "User-Equipment-Info-Value", RULE_REQUIRED, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* grouped AVPs using grouped AVPs */ /* CC-Money */ { /* Grouped */ struct dict_object * avp; struct dict_avp_data data = { 413, /* Code */ 0, /* Vendor */ "CC-Money", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Unit-Value", RULE_REQUIRED, -1, 1 }, { "Currency-Code", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* Cost-Information */ { /* Grouped */ struct dict_object * avp; struct dict_avp_data data = { 423, /* Code */ 0, /* Vendor */ "Cost-Information", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Unit-Value", RULE_REQUIRED, -1, 1 }, { "Currency-Code", RULE_REQUIRED, -1, 1 }, { "Cost-Unit", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* Final-Unit-Indication */ { /* Grouped */ struct dict_object * avp; struct dict_avp_data data = { 430, /* Code */ 0, /* Vendor */ "Final-Unit-Indication", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Final-Unit-Action", RULE_REQUIRED, -1, 1 }, { "Restriction-Filter-Rule", RULE_OPTIONAL, -1, -1 }, { "Filter-Id", RULE_OPTIONAL, -1, -1 }, { "Redirect-Server", RULE_OPTIONAL, -1, 1 }, }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* Granted-Service-Unit */ { /* Grouped */ struct dict_object * avp; struct dict_avp_data data = { 431, /* Code */ 0, /* Vendor */ "Granted-Service-Unit", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Tariff-Time-Change", RULE_OPTIONAL, -1, 1 }, { "CC-Time", RULE_OPTIONAL, -1, 1 }, { "CC-Money", RULE_OPTIONAL, -1, 1 }, { "CC-Total-Octets", RULE_OPTIONAL, -1, 1 }, { "CC-Input-Octets", RULE_OPTIONAL, -1, 1 }, { "CC-Output-Octets", RULE_OPTIONAL, -1, 1 }, { "CC-Service-Specific-Units", RULE_OPTIONAL, -1, 1 } /* plus any additional AVPs { "AVP", RULE_OPTIONAL, -1, -1 } */ }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* G-S-U-Pool-Reference */ { /* Grouped */ struct dict_object * avp; struct dict_avp_data data = { 457, /* Code */ 0, /* Vendor */ "G-S-U-Pool-Reference", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "G-S-U-Pool-Identifier", RULE_REQUIRED, -1, 1 }, { "CC-Unit-Type", RULE_REQUIRED, -1, 1 }, { "Unit-Value", RULE_REQUIRED, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* Requested-Service-Unit */ { /* Grouped */ struct dict_object * avp; struct dict_avp_data data = { 437, /* Code */ 0, /* Vendor */ "Requested-Service-Unit", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "CC-Time", RULE_OPTIONAL, -1, 1 }, { "CC-Money", RULE_OPTIONAL, -1, 1 }, { "CC-Total-Octets", RULE_OPTIONAL, -1, 1 }, { "CC-Input-Octets", RULE_OPTIONAL, -1, 1 }, { "CC-Output-Octets", RULE_OPTIONAL, -1, 1 }, { "CC-Service-Specific-Units", RULE_OPTIONAL, -1, 1 } /* plus any additional AVPs { "AVP", RULE_OPTIONAL, -1, -1 } */ }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* Used-Service-Unit */ { /* Grouped */ struct dict_object * avp; struct dict_avp_data data = { 446, /* Code */ 0, /* Vendor */ "Used-Service-Unit", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Tariff-Change-Usage", RULE_OPTIONAL, -1, 1 }, { "CC-Time", RULE_OPTIONAL, -1, 1 }, { "CC-Money", RULE_OPTIONAL, -1, 1 }, { "CC-Total-Octets", RULE_OPTIONAL, -1, 1 }, { "CC-Input-Octets", RULE_OPTIONAL, -1, 1 }, { "CC-Output-Octets", RULE_OPTIONAL, -1, 1 }, { "CC-Service-Specific-Units", RULE_OPTIONAL, -1, 1 } /* plus any additional AVPs { "AVP", RULE_OPTIONAL, -1, -1 } */ }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* at least three levels of grouping */ /* Multiple-Services-Credit-Control */ { /* Grouped */ struct dict_object * avp; struct dict_avp_data data = { 456, /* Code */ 0, /* Vendor */ "Multiple-Services-Credit-Control", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Granted-Service-Unit", RULE_OPTIONAL, -1, 1 }, { "Requested-Service-Unit", RULE_OPTIONAL, -1, 1 }, { "Used-Service-Unit", RULE_OPTIONAL, -1, -1 }, { "Tariff-Change-Usage", RULE_OPTIONAL, -1, 1 }, { "Service-Identifier", RULE_OPTIONAL, -1, -1 }, { "Rating-Group", RULE_OPTIONAL, -1, 1 }, { "G-S-U-Pool-Reference", RULE_OPTIONAL, -1, -1 }, { "Validity-Time", RULE_OPTIONAL, -1, 1 }, { "Result-Code", RULE_OPTIONAL, -1, 1 }, { "Final-Unit-Indication", RULE_OPTIONAL, -1, 1 } /* plus any additional AVPs { "AVP", RULE_OPTIONAL, -1, -1 } */ }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } } /* Commands section */ { /* Credit-Control-Request (CCR) Command */ { /* From RFC 4006: 3.1. Credit-Control-Request (CCR) Command The Credit-Control-Request message (CCR) is indicated by the command-code field being set to 272 and the 'R' bit being set in the Command Flags field. It is used between the Diameter credit-control client and the credit-control server to request credit authorization for a given service. The Auth-Application-Id MUST be set to the value 4, indicating the Diameter credit-control application. Message Format ::= < Diameter Header: 272, REQ, PXY > < Session-Id > { Origin-Host } { Origin-Realm } { Destination-Realm } { Auth-Application-Id } { Service-Context-Id } { CC-Request-Type } { CC-Request-Number } [ Destination-Host ] [ User-Name ] [ CC-Sub-Session-Id ] [ Acct-Multi-Session-Id ] [ Origin-State-Id ] [ Event-Timestamp ] *[ Subscription-Id ] [ Service-Identifier ] [ Termination-Cause ] [ Requested-Service-Unit ] [ Requested-Action ] *[ Used-Service-Unit ] [ Multiple-Services-Indicator ] *[ Multiple-Services-Credit-Control ] *[ Service-Parameter-Info ] [ CC-Correlation-Id ] [ User-Equipment-Info ] *[ Proxy-Info ] *[ Route-Record ] *[ AVP ] 10.1. Credit-Control AVP Table The table in this section is used to represent which credit-control applications specific AVPs defined in this document are to be present in the credit-control messages. +-----------+ | Command | | Code | |-----+-----+ Attribute Name | CCR | CCA | ------------------------------|-----+-----+ Acct-Multi-Session-Id | 0-1 | 0-1 | Auth-Application-Id | 1 | 1 | CC-Correlation-Id | 0-1 | 0 | CC-Session-Failover | 0 | 0-1 | CC-Request-Number | 1 | 1 | CC-Request-Type | 1 | 1 | CC-Sub-Session-Id | 0-1 | 0-1 | Check-Balance-Result | 0 | 0-1 | Cost-Information | 0 | 0-1 | Credit-Control-Failure- | 0 | 0-1 | Handling | | | Destination-Host | 0-1 | 0 | Destination-Realm | 1 | 0 | Direct-Debiting-Failure- | 0 | 0-1 | Handling | | | Event-Timestamp | 0-1 | 0-1 | Failed-AVP | 0 | 0+ | Final-Unit-Indication | 0 | 0-1 | Granted-Service-Unit | 0 | 0-1 | Multiple-Services-Credit- | 0+ | 0+ | Control | | | Multiple-Services-Indicator | 0-1 | 0 | Origin-Host | 1 | 1 | Origin-Realm | 1 | 1 | Origin-State-Id | 0-1 | 0-1 | Proxy-Info | 0+ | 0+ | Redirect-Host | 0 | 0+ | Redirect-Host-Usage | 0 | 0-1 | Redirect-Max-Cache-Time | 0 | 0-1 | Requested-Action | 0-1 | 0 | Requested-Service-Unit | 0-1 | 0 | Route-Record | 0+ | 0+ | Result-Code | 0 | 1 | Service-Context-Id | 1 | 0 | Service-Identifier | 0-1 | 0 | Service-Parameter-Info | 0+ | 0 | Session-Id | 1 | 1 | Subscription-Id | 0+ | 0 | Termination-Cause | 0-1 | 0 | User-Equipment-Info | 0-1 | 0 | Used-Service-Unit | 0+ | 0 | User-Name | 0-1 | 0-1 | Validity-Time | 0 | 0-1 | ------------------------------|-----+-----+ */ struct dict_object * cmd; struct dict_cmd_data data = { 272, /* Code */ "Credit-Control-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 }, { "Origin-Host", RULE_REQUIRED, -1, 1 }, { "Origin-Realm", RULE_REQUIRED, -1, 1 }, { "Destination-Realm", RULE_REQUIRED, -1, 1 }, { "Auth-Application-Id", RULE_REQUIRED, -1, 1 }, { "Service-Context-Id", RULE_OPTIONAL, -1, 1 }, { "CC-Request-Type", RULE_REQUIRED, -1, 1 }, { "CC-Request-Number", RULE_REQUIRED, -1, 1 }, { "Destination-Host", RULE_OPTIONAL, -1, 1 }, { "User-Name", RULE_OPTIONAL, -1, 1 }, { "CC-Sub-Session-Id", RULE_OPTIONAL, -1, 1 }, { "Acct-Multi-Session-Id", RULE_OPTIONAL, -1, 1 }, { "Origin-State-Id", RULE_OPTIONAL, -1, 1 }, { "Event-Timestamp", RULE_OPTIONAL, -1, 1 }, { "Subscription-Id", RULE_OPTIONAL, -1, -1 }, { "Service-Identifier", RULE_OPTIONAL, -1, 1 }, { "Termination-Cause", RULE_OPTIONAL, -1, 1 }, { "Requested-Service-Unit", RULE_OPTIONAL, -1, 1 }, { "Requested-Action", RULE_OPTIONAL, -1, 1 }, { "Used-Service-Unit", RULE_OPTIONAL, -1, -1 }, { "Multiple-Services-Indicator", RULE_OPTIONAL, -1, 1 }, { "Multiple-Services-Credit-Control", RULE_OPTIONAL, -1, -1 }, { "Service-Parameter-Info", RULE_OPTIONAL, -1, -1 }, { "CC-Correlation-Id", RULE_OPTIONAL, -1, 1 }, { "User-Equipment-Info", RULE_OPTIONAL, -1, 1 }, { "Proxy-Info", RULE_OPTIONAL, -1, -1 }, { "Route-Record", RULE_OPTIONAL, -1, -1 } /* plus any additional AVPs { "AVP", RULE_OPTIONAL, -1, -1 } */ }; CHECK_dict_new( DICT_COMMAND, &data, dcca, &cmd); PARSE_loc_rules( rules, cmd ); } /* Credit-Control-Answer (CCA) Command */ { /* From RFC 4006: 3.2. Credit-Control-Answer (CCA) Command The Credit-Control-Answer message (CCA) is indicated by the command- code field being set to 272 and the 'R' bit being cleared in the Command Flags field. It is used between the credit-control server and the Diameter credit-control client to acknowledge a Credit- Control-Request command. Message Format ::= < Diameter Header: 272, PXY > < Session-Id > { Result-Code } { Origin-Host } { Origin-Realm } { Auth-Application-Id } { CC-Request-Type } { CC-Request-Number } [ User-Name ] [ CC-Session-Failover ] [ CC-Sub-Session-Id ] [ Acct-Multi-Session-Id ] [ Origin-State-Id ] [ Event-Timestamp ] [ Granted-Service-Unit ] *[ Multiple-Services-Credit-Control ] [ Cost-Information] [ Final-Unit-Indication ] [ Check-Balance-Result ] [ Credit-Control-Failure-Handling ] [ Direct-Debiting-Failure-Handling ] [ Validity-Time] *[ Redirect-Host] [ Redirect-Host-Usage ] [ Redirect-Max-Cache-Time ] *[ Proxy-Info ] *[ Route-Record ] *[ Failed-AVP ] *[ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 272, /* Code */ "Credit-Control-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 }, { "Result-Code", RULE_OPTIONAL, -1, 1 }, { "Origin-Host", RULE_REQUIRED, -1, 1 }, { "Origin-Realm", RULE_REQUIRED, -1, 1 }, { "Auth-Application-Id", RULE_REQUIRED, -1, 1 }, { "CC-Request-Type", RULE_REQUIRED, -1, 1 }, { "CC-Request-Number", RULE_REQUIRED, -1, 1 }, { "User-Name", RULE_OPTIONAL, -1, 1 }, { "CC-Session-Failover", RULE_OPTIONAL, -1, 1 }, { "CC-Sub-Session-Id", RULE_OPTIONAL, -1, 1 }, { "Acct-Multi-Session-Id", RULE_OPTIONAL, -1, 1 }, { "Origin-State-Id", RULE_OPTIONAL, -1, 1 }, { "Event-Timestamp", RULE_OPTIONAL, -1, 1 }, { "Granted-Service-Unit", RULE_OPTIONAL, -1, 1 }, { "Multiple-Services-Credit-Control", RULE_OPTIONAL, -1, -1 }, { "Cost-Information", RULE_OPTIONAL, -1, 1 }, { "Final-Unit-Indication", RULE_OPTIONAL, -1, 1 }, { "Check-Balance-Result", RULE_OPTIONAL, -1, 1 }, { "Credit-Control-Failure-Handling", RULE_OPTIONAL, -1, 1 }, { "Direct-Debiting-Failure-Handling", RULE_OPTIONAL, -1, 1 }, { "Validity-Time", RULE_OPTIONAL, -1, 1 }, { "Redirect-Host", RULE_OPTIONAL, -1, -1 }, { "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 }, { "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 }, { "Proxy-Info", RULE_OPTIONAL, -1, -1 }, { "Route-Record", RULE_OPTIONAL, -1, -1 }, { "Failed-AVP", RULE_OPTIONAL, -1, -1 } /* plus any additional AVPs { "AVP", RULE_OPTIONAL, -1, -1 } */ }; CHECK_dict_new( DICT_COMMAND, &data, dcca, &cmd); PARSE_loc_rules( rules, cmd ); } } LOG_D( "Extension 'Dictionary definitions for DCCA (rfc4006)' initialized"); return 0; } /* needs dict_nasreq for Filter-Id */ EXTENSION_ENTRY("dict_dcca", dict_dcca_entry, "dict_nasreq"); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_dcca_3gpp/000077500000000000000000000000001333553357400241005ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_dcca_3gpp/CMakeLists.txt000066400000000000000000000005571333553357400266470ustar00rootroot00000000000000# The dict_dcca_3gpp extension PROJECT("Diameter DCCA (Diameter Credit Control Application) 3GPP dictionary definitions" C) # Compile as a module FD_ADD_EXTENSION(dict_dcca_3gpp dict_dcca_3gpp.c) #### ## INSTALL section ## INSTALL(TARGETS dict_dcca_3gpp LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-dictionary-rfc4006-extension-3gpp) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_dcca_3gpp/Makefile.am000066400000000000000000000010751333553357400261370ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in extlib_LTLIBRARIES = dict_dcca_3gpp.la dict_dcca_3gpp_la_SOURCES = \ dict_dcca_3gpp.c dict_dcca_3gpp_la_DEPENDENCIES = \ $(top_srcdir)/libfdcore/libfdcore.la \ $(top_srcdir)/libfdproto/libfdproto.la dict_dcca_3gpp_la_LIBADD = \ $(top_srcdir)/libfdcore/libfdcore.la \ $(top_srcdir)/libfdproto/libfdproto.la AM_LDFLAGS = \ -module -avoid-version -shared AM_CPPFLAGS = \ -I$(top_srcdir)/include AM_CFLAGS = \ -Wall -Werror MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_dcca_3gpp/dict_dcca_3gpp.c000066400000000000000000013546711333553357400271130ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Thomas Klausner * * * * Copyright (c) 2013, Thomas Klausner * * All rights reserved. * * * * Written under contract by nfotex IT GmbH, http://nfotex.com/ * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * *********************************************************************************************************/ /* * Dictionary definitions for objects specified for DCCA by 3GPP. * * This extensions contains a lot of AVPs from various 3GPP standards * documents, and some rules for the grouped AVPs described therein. * * This extension does not contain ALL AVPs described by 3GPP, but * quite a big number of them. * * When extending the AVPs, please edit dict_dcca_3gpp.org instead and * create pastable code with contrib/tools/org_to_fd.pl. * * Some points of consideration: * 1. This dictionary could be split up per document. * * + pro: you can only load the AVPs/Rules you're interested in -> * smaller memory size * * - con: the documents use AVPs from each other A LOT, so setting the * dependencies correctly will be annoying * * - con: you need to load all of them as extensions * * 2. This dictionary contains ONE AVP in the "3GPP2" vendor space, * since I found it wasteful to write a separate dictionary just for * one AVP. Also, it is defined in a 3GPP document. * * 3. While there are quite a number of rules here already, many more * are missing. I've only added rules for those grouped AVPs or * commands in which I was concretely interested so far; many more * will need to be added to make this complete. * * That being said, I hope this will be useful for you. * */ /* * Some comments on the 3GPP Standards documents themselves: * * 1. It would be good if 29.061 was reviewed to check for each AVP if * it is Mandatory or not. The data currently in the document does not * match what was in the previous version of the freeDiameter * extension (the one that existedbefore I rewrote it) or what I saw * so far. IIRC, even the table and the document contradict each * other. The AVP table is also missing an entry for * "External-Identifier", 28. * * 2. 29.140 has conflicting AVP names with other documents: * - Sequence-Number is also in 32.329 * - Recipient-Address is also in 32.299 * - Status is also in 32.299 * * 3. 29.229 has name conflict with 29.329 about User-Data (different * AVP code 702, instead of 606) -- the weird thing is, the latter * uses some AVPs from the former, but not this one. */ #include /* The content of this file follows the same structure as dict_base_proto.c */ #define CHECK_dict_new( _type, _data, _parent, _ref ) \ CHECK_FCT( fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref)) ); #define CHECK_dict_search( _type, _criteria, _what, _result ) \ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); struct local_rules_definition { struct dict_avp_request avp_vendor_plus_name; enum rule_position position; int min; int max; }; #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) /* Attention! This version of the macro uses AVP_BY_NAME_AND_VENDOR, in contrast to most other copies! */ #define PARSE_loc_rules( _rulearray, _parent) { \ int __ar; \ for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ struct dict_rule_data __data = { NULL, \ (_rulearray)[__ar].position, \ 0, \ (_rulearray)[__ar].min, \ (_rulearray)[__ar].max}; \ __data.rule_order = RULE_ORDER(__data.rule_position); \ CHECK_FCT( fd_dict_search( \ fd_g_config->cnf_dict, \ DICT_AVP, \ AVP_BY_NAME_AND_VENDOR, \ &(_rulearray)[__ar].avp_vendor_plus_name, \ &__data.rule_avp, 0 ) ); \ if ( !__data.rule_avp ) { \ TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_vendor_plus_name.avp_name); \ return ENOENT; \ } \ CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL), \ { \ TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \ (_rulearray)[__ar].avp_vendor_plus_name.avp_name); \ return EINVAL; \ } ); \ } \ } #define enumval_def_u32( _val_, _str_ ) \ { _str_, { .u32 = _val_ }} #define enumval_def_os( _len_, _val_, _str_ ) \ { _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}} static int dict_dcca_3gpp_entry(char * conffile) { /* Applications section */ { /* Create the vendors */ #if 0 /* modified by acetcom */ { struct dict_vendor_data vendor_data = { 10415, "3GPP" }; CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data, NULL, NULL)); } #endif /* end of modification */ { struct dict_vendor_data vendor_data = { 5535, "3GPP2" }; CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data, NULL, NULL)); } { struct dict_vendor_data vendor_data = { 13019, "ETSI" }; CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data, NULL, NULL)); } { struct dict_object * vendor; CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_VENDOR, VENDOR_BY_NAME, "3GPP", &vendor, ENOENT)); struct dict_application_data app_data = { 16777216, "Cx" }; CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_APPLICATION, &app_data, vendor, NULL)); } { struct dict_object * vendor; CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_VENDOR, VENDOR_BY_NAME, "3GPP", &vendor, ENOENT)); struct dict_application_data app_data = { 16777236, "Rx" }; CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_APPLICATION, &app_data, vendor, NULL)); } #if 0 /* modified by acetcom */ { struct dict_object * vendor; CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_VENDOR, VENDOR_BY_NAME, "3GPP", &vendor, ENOENT)); struct dict_application_data app_data = { 16777238, "Gx" }; CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_APPLICATION, &app_data, vendor, NULL)); } #endif /* end of modification */ } struct dict_object * Address_type; struct dict_object * DiameterIdentity_type; struct dict_object * DiameterURI_type; struct dict_object * IPFilterRule_type; struct dict_object * Time_type; struct dict_object * UTF8String_type; CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Address", &Address_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterIdentity", &DiameterIdentity_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterURI", &DiameterURI_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "IPFilterRule", &IPFilterRule_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Time", &Time_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type); /* The following is created automatically. Do not modify. */ /* Changes will be lost during the next update. Modify the source org file instead. */ /* 3GPP 29.061-c00 (12.0.0 2012.12.20) */ /* 3GPP 29.061 is not very clear and self-inconsistent about M */ /* for this reason, other sources are assumed more trustworthy */ /* M inconsistently specified */ /* 3GPP-IMSI */ { struct dict_avp_data data = { 1, /* Code */ 10415, /* Vendor */ "3GPP-IMSI", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* 29.061 says OctetString; dumps say UInt32; manually changed */ /* 29.061 says MUST NOT M; dumps say MUST */ /* 3GPP-Charging-Id */ { struct dict_avp_data data = { 2, /* Code */ 10415, /* Vendor */ "3GPP-Charging-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* 29.061 says MUST NOT M; dumps say MUST */ /* 3GPP-PDP-Type */ { struct dict_avp_data data = { 3, /* Code */ 10415, /* Vendor */ "3GPP-PDP-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(3GPP-PDP-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* 3GPP-CG-Address */ { struct dict_avp_data data = { 4, /* Code */ 10415, /* Vendor */ "3GPP-CG-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* 29.061 says MUST NOT M; old contrib/3gpp says MUST */ /* 3GPP-GPRS-Negotiated-QoS-Profile */ { struct dict_avp_data data = { 5, /* Code */ 10415, /* Vendor */ "3GPP-GPRS-Negotiated-QoS-Profile", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* M inconsistently specified; old contrib/3gg says MUST NOT */ /* 3GPP-SGSN-Address */ { struct dict_avp_data data = { 6, /* Code */ 10415, /* Vendor */ "3GPP-SGSN-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* 3GPP-GGSN-Address */ { struct dict_avp_data data = { 7, /* Code */ 10415, /* Vendor */ "3GPP-GGSN-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* 29.061 says MUST NOT M; dumps say MUST */ /* 3GPP-IMSI-MCC-MNC */ { struct dict_avp_data data = { 8, /* Code */ 10415, /* Vendor */ "3GPP-IMSI-MCC-MNC", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* 29.061 says MUST NOT M; old contrib/3gpp says MUST */ /* 3GPP-GGSN-MCC-MNC */ { struct dict_avp_data data = { 9, /* Code */ 10415, /* Vendor */ "3GPP-GGSN-MCC-MNC", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* 29.061 says MUST NOT M; old contrib/3gpp says MUST */ /* 3GPP-NSAPI */ { struct dict_avp_data data = { 10, /* Code */ 10415, /* Vendor */ "3GPP-NSAPI", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* added manually, missing in AVP table */ /* 3GPP-Session-Stop-Indicator */ { struct dict_avp_data data = { 11, /* Code */ 10415, /* Vendor */ "3GPP-Session-Stop-Indicator", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* 29.061 says MUST NOT M; old contrib/3gpp says MUST */ /* 3GPP-Selection-Mode */ { struct dict_avp_data data = { 12, /* Code */ 10415, /* Vendor */ "3GPP-Selection-Mode", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* 29.061 says MUST NOT M; old contrib/3gpp says MUST */ /* 3GPP-Charging-Characteristics */ { struct dict_avp_data data = { 13, /* Code */ 10415, /* Vendor */ "3GPP-Charging-Characteristics", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* 29.061 says MUST NOT M; old contrib/3gpp says MUST */ /* 3GPP-CG-IPv6-Address */ { struct dict_avp_data data = { 14, /* Code */ 10415, /* Vendor */ "3GPP-CG-IPv6-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* M inconsistently specified */ /* 29.061 says MUST NOT M; old contrib/3gpp says MUST */ /* 3GPP-SGSN-Ipv6-Address */ { struct dict_avp_data data = { 15, /* Code */ 10415, /* Vendor */ "3GPP-SGSN-Ipv6-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* 29.061 says MUST NOT M; old contrib/3gpp says MUST */ /* 3GPP-GGSN-IPv6-Address */ { struct dict_avp_data data = { 16, /* Code */ 10415, /* Vendor */ "3GPP-GGSN-IPv6-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* 29.061 says MUST NOT M; old contrib/3gpp says MUST */ /* 3GPP-IPv6-DNS-Servers */ { struct dict_avp_data data = { 17, /* Code */ 10415, /* Vendor */ "3GPP-IPv6-DNS-Servers", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* 29.061 says MUST NOT M; old contrib/3gpp says MUST */ /* 3GPP-SGSN-MCC-MNC */ { struct dict_avp_data data = { 18, /* Code */ 10415, /* Vendor */ "3GPP-SGSN-MCC-MNC", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* M inconsistently specified */ /* 3GPP-IMEISV */ { struct dict_avp_data data = { 20, /* Code */ 10415, /* Vendor */ "3GPP-IMEISV", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* M inconsistently specified */ /* 3GPP-RAT-Type */ { struct dict_avp_data data = { 21, /* Code */ 10415, /* Vendor */ "3GPP-RAT-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* M inconsistently specified */ /* 3GPP-User-Location-Info */ { struct dict_avp_data data = { 22, /* Code */ 10415, /* Vendor */ "3GPP-User-Location-Info", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* M inconsistently specified */ /* 3GPP-MS-TimeZone */ { struct dict_avp_data data = { 23, /* Code */ 10415, /* Vendor */ "3GPP-MS-TimeZone", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* 3GPP-CAMEL-Charging-Info */ { struct dict_avp_data data = { 24, /* Code */ 10415, /* Vendor */ "3GPP-CAMEL-Charging-Info", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* 3GPP-Packet-Filter */ { struct dict_avp_data data = { 25, /* Code */ 10415, /* Vendor */ "3GPP-Packet-Filter", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* 3GPP-Negotiated-DSCP */ { struct dict_avp_data data = { 26, /* Code */ 10415, /* Vendor */ "3GPP-Negotiated-DSCP", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* 3GPP-Allocate-IP-Type */ { struct dict_avp_data data = { 27, /* Code */ 10415, /* Vendor */ "3GPP-Allocate-IP-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* added manually, missing in AVP table */ /* External-Identifier */ { struct dict_avp_data data = { 28, /* Code */ 10415, /* Vendor */ "External-Identifier", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* TMGI */ { struct dict_avp_data data = { 900, /* Code */ 10415, /* Vendor */ "TMGI", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Required-MBMS-Bearer-Capabilities */ { struct dict_avp_data data = { 901, /* Code */ 10415, /* Vendor */ "Required-MBMS-Bearer-Capabilities", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* MBMS-StartStop-Indication */ { struct dict_avp_data data = { 902, /* Code */ 10415, /* Vendor */ "MBMS-StartStop-Indication", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(MBMS-StartStop-Indication)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* MBMS-Service-Area */ { struct dict_avp_data data = { 903, /* Code */ 10415, /* Vendor */ "MBMS-Service-Area", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* MBMS-Session-Duration */ { struct dict_avp_data data = { 904, /* Code */ 10415, /* Vendor */ "MBMS-Session-Duration", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Alternative-APN */ { struct dict_avp_data data = { 905, /* Code */ 10415, /* Vendor */ "Alternative-APN", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* MBMS-Service-Type */ { struct dict_avp_data data = { 906, /* Code */ 10415, /* Vendor */ "MBMS-Service-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(MBMS-Service-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* MBMS-2G-3G-Indicator */ { struct dict_avp_data data = { 907, /* Code */ 10415, /* Vendor */ "MBMS-2G-3G-Indicator", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(MBMS-2G-3G-Indicator)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* MBMS-Session-Identity */ { struct dict_avp_data data = { 908, /* Code */ 10415, /* Vendor */ "MBMS-Session-Identity", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* RAI */ { struct dict_avp_data data = { 909, /* Code */ 10415, /* Vendor */ "RAI", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Additional-MBMS-Trace-Info */ { struct dict_avp_data data = { 910, /* Code */ 10415, /* Vendor */ "Additional-MBMS-Trace-Info", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* MBMS-Time-To-Data-Transfer */ { struct dict_avp_data data = { 911, /* Code */ 10415, /* Vendor */ "MBMS-Time-To-Data-Transfer", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* MBMS-Session-Repetition-Number */ { struct dict_avp_data data = { 912, /* Code */ 10415, /* Vendor */ "MBMS-Session-Repetition-Number", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* MBMS-Required-QoS */ { struct dict_avp_data data = { 913, /* Code */ 10415, /* Vendor */ "MBMS-Required-QoS", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* MBMS-Counting-Information */ { struct dict_avp_data data = { 914, /* Code */ 10415, /* Vendor */ "MBMS-Counting-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(MBMS-Counting-Information)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* MBMS-User-Data-Mode-Indication */ { struct dict_avp_data data = { 915, /* Code */ 10415, /* Vendor */ "MBMS-User-Data-Mode-Indication", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(MBMS-User-Data-Mode-Indication)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* MBMS-GGSN-Address */ { struct dict_avp_data data = { 916, /* Code */ 10415, /* Vendor */ "MBMS-GGSN-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* MBMS-GGSN-IPv6-Address */ { struct dict_avp_data data = { 917, /* Code */ 10415, /* Vendor */ "MBMS-GGSN-IPv6-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* MBMS-BMSC-SSM-IP-Address */ { struct dict_avp_data data = { 918, /* Code */ 10415, /* Vendor */ "MBMS-BMSC-SSM-IP-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* MBMS-BMSC-SSM-IPv6-Address */ { struct dict_avp_data data = { 919, /* Code */ 10415, /* Vendor */ "MBMS-BMSC-SSM-IPv6-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* MBMS-Flow-Identifier */ { struct dict_avp_data data = { 920, /* Code */ 10415, /* Vendor */ "MBMS-Flow-Identifier", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* CN-IP-Multicast-Distribution */ { struct dict_avp_data data = { 921, /* Code */ 10415, /* Vendor */ "CN-IP-Multicast-Distribution", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(CN-IP-Multicast-Distribution)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* MBMS-HC-Indicator */ { struct dict_avp_data data = { 922, /* Code */ 10415, /* Vendor */ "MBMS-HC-Indicator", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(MBMS-HC-Indicator)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* 3GPP 29.140-700 (7.0.0 2007.07.05) */ /* Served-User-Identity */ { struct dict_avp_data data = { 1100, /* Code */ 10415, /* Vendor */ "Served-User-Identity", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* reuses: MSISDN */ /* VASP-ID */ { struct dict_avp_data data = { 1101, /* Code */ 10415, /* Vendor */ "VASP-ID", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* VAS-ID */ { struct dict_avp_data data = { 1102, /* Code */ 10415, /* Vendor */ "VAS-ID", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Trigger-Event */ { struct dict_avp_data data = { 1103, /* Code */ 10415, /* Vendor */ "Trigger-Event", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Trigger-Event)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* reuses: 3GPP-IMSI */ /* Sender-Address */ { struct dict_avp_data data = { 1104, /* Code */ 10415, /* Vendor */ "Sender-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Initial-Recipient-Address */ { struct dict_avp_data data = { 1105, /* Code */ 10415, /* Vendor */ "Initial-Recipient-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Result-Recipient-Address */ { struct dict_avp_data data = { 1106, /* Code */ 10415, /* Vendor */ "Result-Recipient-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* conflicts with one in (more common) 32.329 */ /* Sequence-Number-29.140 */ { struct dict_avp_data data = { 1107, /* Code */ 10415, /* Vendor */ "Sequence-Number-29.140", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* conflicts with one in (more common) 32.299 */ /* Recipient-Address-29.140 */ { struct dict_avp_data data = { 1108, /* Code */ 10415, /* Vendor */ "Recipient-Address-29.140", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Routeing-Address */ { struct dict_avp_data data = { 1109, /* Code */ 10415, /* Vendor */ "Routeing-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Originating-Interface */ { struct dict_avp_data data = { 1110, /* Code */ 10415, /* Vendor */ "Originating-Interface", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Originating-Interface)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Delivery-Report */ { struct dict_avp_data data = { 1111, /* Code */ 10415, /* Vendor */ "Delivery-Report", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Delivery-Report)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Read-Reply */ { struct dict_avp_data data = { 1112, /* Code */ 10415, /* Vendor */ "Read-Reply", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Read-Reply)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Sender-Visibility */ { struct dict_avp_data data = { 1113, /* Code */ 10415, /* Vendor */ "Sender-Visibility", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Sender-Visibility)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Service-Key */ { struct dict_avp_data data = { 1114, /* Code */ 10415, /* Vendor */ "Service-Key", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Billing-Information */ { struct dict_avp_data data = { 1115, /* Code */ 10415, /* Vendor */ "Billing-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* conflicts with one in (more common) 32.299 */ /* Status-29.140 */ { struct dict_avp_data data = { 1116, /* Code */ 10415, /* Vendor */ "Status-29.140", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Status-Code */ { struct dict_avp_data data = { 1117, /* Code */ 10415, /* Vendor */ "Status-Code", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Status-Text */ { struct dict_avp_data data = { 1118, /* Code */ 10415, /* Vendor */ "Status-Text", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Routeing-Address-Resolution */ { struct dict_avp_data data = { 1119, /* Code */ 10415, /* Vendor */ "Routeing-Address-Resolution", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Routeing-Address-Resolution)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* 3GPP 29.173-c00 (12.0.0 2013.03.13) */ /* LMSI */ { struct dict_avp_data data = { 2400, /* Code */ 10415, /* Vendor */ "LMSI", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Serving-Node */ { struct dict_avp_data data = { 2401, /* Code */ 10415, /* Vendor */ "Serving-Node", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* MME-Name */ { struct dict_avp_data data = { 2402, /* Code */ 10415, /* Vendor */ "MME-Name", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, DiameterIdentity_type, NULL); }; /* MSC-Number */ { struct dict_avp_data data = { 2403, /* Code */ 10415, /* Vendor */ "MSC-Number", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* LCS-Capabilities-Sets */ { struct dict_avp_data data = { 2404, /* Code */ 10415, /* Vendor */ "LCS-Capabilities-Sets", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* GMLC-Address */ { struct dict_avp_data data = { 2405, /* Code */ 10415, /* Vendor */ "GMLC-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* Additional-Serving-Node */ { struct dict_avp_data data = { 2406, /* Code */ 10415, /* Vendor */ "Additional-Serving-Node", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* PPR-Address */ { struct dict_avp_data data = { 2407, /* Code */ 10415, /* Vendor */ "PPR-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* MME-Realm */ { struct dict_avp_data data = { 2408, /* Code */ 10415, /* Vendor */ "MME-Realm", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, DiameterIdentity_type, NULL); }; /* SGSN-Name */ { struct dict_avp_data data = { 2409, /* Code */ 10415, /* Vendor */ "SGSN-Name", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, DiameterIdentity_type, NULL); }; /* SGSN-Realm */ { struct dict_avp_data data = { 2410, /* Code */ 10415, /* Vendor */ "SGSN-Realm", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, DiameterIdentity_type, NULL); }; /* 3GPP 29.210-670 (6.7.0 2006-12-18) */ /* PDP-Session-Operation */ { struct dict_avp_data data = { 1015, /* Code */ 10415, /* Vendor */ "PDP-Session-Operation", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(PDP-Session-Operation)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* 3GPP 29.212-c00 (12.0.0 2013.03.15) */ /* Gx-specific */ /* ADC-Revalidation-Time */ { struct dict_avp_data data = { 2801, /* Code */ 10415, /* Vendor */ "ADC-Revalidation-Time", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* ADC-Rule-Install */ { struct dict_avp_data data = { 1092, /* Code */ 10415, /* Vendor */ "ADC-Rule-Install", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* ADC-Rule-Remove */ { struct dict_avp_data data = { 1093, /* Code */ 10415, /* Vendor */ "ADC-Rule-Remove", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* ADC-Rule-Definition */ { struct dict_avp_data data = { 1094, /* Code */ 10415, /* Vendor */ "ADC-Rule-Definition", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* ADC-Rule-Base-Name */ { struct dict_avp_data data = { 1095, /* Code */ 10415, /* Vendor */ "ADC-Rule-Base-Name", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* ADC-Rule-Name */ { struct dict_avp_data data = { 1096, /* Code */ 10415, /* Vendor */ "ADC-Rule-Name", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* ADC-Rule-Report */ { struct dict_avp_data data = { 1097, /* Code */ 10415, /* Vendor */ "ADC-Rule-Report", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Application-Detection-Information */ { struct dict_avp_data data = { 1098, /* Code */ 10415, /* Vendor */ "Application-Detection-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Access-Network-Charging-Identifier-Gx */ { struct dict_avp_data data = { 1022, /* Code */ 10415, /* Vendor */ "Access-Network-Charging-Identifier-Gx", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Allocation-Retention-Priority */ { struct dict_avp_data data = { 1034, /* Code */ 10415, /* Vendor */ "Allocation-Retention-Priority", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* AN-GW-Address */ { struct dict_avp_data data = { 1050, /* Code */ 10415, /* Vendor */ "AN-GW-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* APN-Aggregate-Max-Bitrate-DL */ { struct dict_avp_data data = { 1040, /* Code */ 10415, /* Vendor */ "APN-Aggregate-Max-Bitrate-DL", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* APN-Aggregate-Max-Bitrate-UL */ { struct dict_avp_data data = { 1041, /* Code */ 10415, /* Vendor */ "APN-Aggregate-Max-Bitrate-UL", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Bearer-Control-Mode */ { struct dict_avp_data data = { 1023, /* Code */ 10415, /* Vendor */ "Bearer-Control-Mode", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Bearer-Control-Mode)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Bearer-Identifier */ { struct dict_avp_data data = { 1020, /* Code */ 10415, /* Vendor */ "Bearer-Identifier", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Bearer-Operation */ { struct dict_avp_data data = { 1021, /* Code */ 10415, /* Vendor */ "Bearer-Operation", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Bearer-Operation)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Bearer-Usage */ { struct dict_avp_data data = { 1000, /* Code */ 10415, /* Vendor */ "Bearer-Usage", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Bearer-Usage)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Charging-Rule-Install */ { struct dict_avp_data data = { 1001, /* Code */ 10415, /* Vendor */ "Charging-Rule-Install", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Charging-Rule-Remove */ { struct dict_avp_data data = { 1002, /* Code */ 10415, /* Vendor */ "Charging-Rule-Remove", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Charging-Rule-Definition */ { struct dict_avp_data data = { 1003, /* Code */ 10415, /* Vendor */ "Charging-Rule-Definition", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Charging-Rule-Base-Name */ { struct dict_avp_data data = { 1004, /* Code */ 10415, /* Vendor */ "Charging-Rule-Base-Name", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Charging-Rule-Name */ { struct dict_avp_data data = { 1005, /* Code */ 10415, /* Vendor */ "Charging-Rule-Name", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Charging-Rule-Report */ { struct dict_avp_data data = { 1018, /* Code */ 10415, /* Vendor */ "Charging-Rule-Report", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Charging-Correlation-Indicator */ { struct dict_avp_data data = { 1073, /* Code */ 10415, /* Vendor */ "Charging-Correlation-Indicator", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Charging-Correlation-Indicator)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* CoA-IP-Address */ { struct dict_avp_data data = { 1035, /* Code */ 10415, /* Vendor */ "CoA-IP-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* CoA-Information */ { struct dict_avp_data data = { 1039, /* Code */ 10415, /* Vendor */ "CoA-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* CSG-Information-Reporting */ { struct dict_avp_data data = { 1071, /* Code */ 10415, /* Vendor */ "CSG-Information-Reporting", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(CSG-Information-Reporting)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Default-EPS-Bearer-QoS */ { struct dict_avp_data data = { 1049, /* Code */ 10415, /* Vendor */ "Default-EPS-Bearer-QoS", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Event-Report-Indication */ { struct dict_avp_data data = { 1033, /* Code */ 10415, /* Vendor */ "Event-Report-Indication", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Event-Trigger */ { struct dict_avp_data data = { 1006, /* Code */ 10415, /* Vendor */ "Event-Trigger", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Event-Trigger)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Flow-Direction */ { struct dict_avp_data data = { 1080, /* Code */ 10415, /* Vendor */ "Flow-Direction", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Flow-Direction)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Flow-Information */ { struct dict_avp_data data = { 1058, /* Code */ 10415, /* Vendor */ "Flow-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Flow-Label */ { struct dict_avp_data data = { 1057, /* Code */ 10415, /* Vendor */ "Flow-Label", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* IP-CAN-Type */ { struct dict_avp_data data = { 1027, /* Code */ 10415, /* Vendor */ "IP-CAN-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(IP-CAN-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Guaranteed-Bitrate-DL */ { struct dict_avp_data data = { 1025, /* Code */ 10415, /* Vendor */ "Guaranteed-Bitrate-DL", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Guaranteed-Bitrate-UL */ { struct dict_avp_data data = { 1026, /* Code */ 10415, /* Vendor */ "Guaranteed-Bitrate-UL", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* HeNB-Local-IP-Address */ { struct dict_avp_data data = { 2804, /* Code */ 10415, /* Vendor */ "HeNB-Local-IP-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* Metering-Method */ { struct dict_avp_data data = { 1007, /* Code */ 10415, /* Vendor */ "Metering-Method", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Metering-Method)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Monitoring-Key */ { struct dict_avp_data data = { 1066, /* Code */ 10415, /* Vendor */ "Monitoring-Key", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Mute-Notification */ { struct dict_avp_data data = { 2809, /* Code */ 10415, /* Vendor */ "Mute-Notification", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Mute-Notification)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Monitoring-Time */ { struct dict_avp_data data = { 2810, /* Code */ 10415, /* Vendor */ "Monitoring-Time", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* Network-Request-Support */ { struct dict_avp_data data = { 1024, /* Code */ 10415, /* Vendor */ "Network-Request-Support", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Network-Request-Support)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Offline */ { struct dict_avp_data data = { 1008, /* Code */ 10415, /* Vendor */ "Offline", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Offline)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Online */ { struct dict_avp_data data = { 1009, /* Code */ 10415, /* Vendor */ "Online", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Online)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Packet-Filter-Content */ { struct dict_avp_data data = { 1059, /* Code */ 10415, /* Vendor */ "Packet-Filter-Content", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, IPFilterRule_type, NULL); }; /* Packet-Filter-Identifier */ { struct dict_avp_data data = { 1060, /* Code */ 10415, /* Vendor */ "Packet-Filter-Identifier", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Packet-Filter-Information */ { struct dict_avp_data data = { 1061, /* Code */ 10415, /* Vendor */ "Packet-Filter-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Packet-Filter-Operation */ { struct dict_avp_data data = { 1062, /* Code */ 10415, /* Vendor */ "Packet-Filter-Operation", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Packet-Filter-Operation)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Packet-Filter-Usage */ { struct dict_avp_data data = { 1072, /* Code */ 10415, /* Vendor */ "Packet-Filter-Usage", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Packet-Filter-Usage)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* PDN-Connection-ID */ { struct dict_avp_data data = { 1065, /* Code */ 10415, /* Vendor */ "PDN-Connection-ID", /* Name */ AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Precedence */ { struct dict_avp_data data = { 1010, /* Code */ 10415, /* Vendor */ "Precedence", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Pre-emption-Capability */ { struct dict_avp_data data = { 1047, /* Code */ 10415, /* Vendor */ "Pre-emption-Capability", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Pre-emption-Capability)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Pre-emption-Vulnerability */ { struct dict_avp_data data = { 1048, /* Code */ 10415, /* Vendor */ "Pre-emption-Vulnerability", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Pre-emption-Vulnerability)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Priority-Level */ { struct dict_avp_data data = { 1046, /* Code */ 10415, /* Vendor */ "Priority-Level", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Redirect-Information */ { struct dict_avp_data data = { 1085, /* Code */ 10415, /* Vendor */ "Redirect-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Redirect-Support */ { struct dict_avp_data data = { 1086, /* Code */ 10415, /* Vendor */ "Redirect-Support", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Redirect-Support)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Reporting-Level */ { struct dict_avp_data data = { 1011, /* Code */ 10415, /* Vendor */ "Reporting-Level", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Reporting-Level)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Routing-Filter */ { struct dict_avp_data data = { 1078, /* Code */ 10415, /* Vendor */ "Routing-Filter", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Routing-IP-Address */ { struct dict_avp_data data = { 1079, /* Code */ 10415, /* Vendor */ "Routing-IP-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* Routing-Rule-Definition */ { struct dict_avp_data data = { 1076, /* Code */ 10415, /* Vendor */ "Routing-Rule-Definition", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Routing-Rule-Identifier */ { struct dict_avp_data data = { 1077, /* Code */ 10415, /* Vendor */ "Routing-Rule-Identifier", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Routing-Rule-Install */ { struct dict_avp_data data = { 1081, /* Code */ 10415, /* Vendor */ "Routing-Rule-Install", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Routing-Rule-Remove */ { struct dict_avp_data data = { 1075, /* Code */ 10415, /* Vendor */ "Routing-Rule-Remove", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* PCC-Rule-Status */ { struct dict_avp_data data = { 1019, /* Code */ 10415, /* Vendor */ "PCC-Rule-Status", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(PCC-Rule-Status)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Session-Release-Cause */ { struct dict_avp_data data = { 1045, /* Code */ 10415, /* Vendor */ "Session-Release-Cause", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Session-Release-Cause)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* TDF-Information */ { struct dict_avp_data data = { 1087, /* Code */ 10415, /* Vendor */ "TDF-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* TDF-Application-Identifier */ { struct dict_avp_data data = { 1088, /* Code */ 10415, /* Vendor */ "TDF-Application-Identifier", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* TDF-Application-Instance-Identifier */ { struct dict_avp_data data = { 2802, /* Code */ 10415, /* Vendor */ "TDF-Application-Instance-Identifier", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* TDF-Destination-Host */ { struct dict_avp_data data = { 1089, /* Code */ 10415, /* Vendor */ "TDF-Destination-Host", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, DiameterIdentity_type, NULL); }; /* TDF-Destination-Realm */ { struct dict_avp_data data = { 1090, /* Code */ 10415, /* Vendor */ "TDF-Destination-Realm", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, DiameterIdentity_type, NULL); }; /* TDF-IP-Address */ { struct dict_avp_data data = { 1091, /* Code */ 10415, /* Vendor */ "TDF-IP-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* QoS-Class-Identifier */ { struct dict_avp_data data = { 1028, /* Code */ 10415, /* Vendor */ "QoS-Class-Identifier", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(QoS-Class-Identifier)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* QoS-Information */ { struct dict_avp_data data = { 1016, /* Code */ 10415, /* Vendor */ "QoS-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* QoS-Negotiation */ { struct dict_avp_data data = { 1029, /* Code */ 10415, /* Vendor */ "QoS-Negotiation", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(QoS-Negotiation)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* QoS-Upgrade */ { struct dict_avp_data data = { 1030, /* Code */ 10415, /* Vendor */ "QoS-Upgrade", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(QoS-Upgrade)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* PS-to-CS-Session-Continuity */ { struct dict_avp_data data = { 1099, /* Code */ 10415, /* Vendor */ "PS-to-CS-Session-Continuity", /* Name */ AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(PS-to-CS-Session-Continuity)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Resource-Allocation-Notification */ { struct dict_avp_data data = { 1063, /* Code */ 10415, /* Vendor */ "Resource-Allocation-Notification", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Resource-Allocation-Notification)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Rule-Failure-Code */ { struct dict_avp_data data = { 1031, /* Code */ 10415, /* Vendor */ "Rule-Failure-Code", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Rule-Failure-Code)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Security-Parameter-Index */ { struct dict_avp_data data = { 1056, /* Code */ 10415, /* Vendor */ "Security-Parameter-Index", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* TFT-Filter */ { struct dict_avp_data data = { 1012, /* Code */ 10415, /* Vendor */ "TFT-Filter", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, IPFilterRule_type, NULL); }; /* TFT-Packet-Filter-Information */ { struct dict_avp_data data = { 1013, /* Code */ 10415, /* Vendor */ "TFT-Packet-Filter-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* ToS-Traffic-Class */ { struct dict_avp_data data = { 1014, /* Code */ 10415, /* Vendor */ "ToS-Traffic-Class", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Tunnel-Header-Filter */ { struct dict_avp_data data = { 1036, /* Code */ 10415, /* Vendor */ "Tunnel-Header-Filter", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, IPFilterRule_type, NULL); }; /* Tunnel-Header-Length */ { struct dict_avp_data data = { 1037, /* Code */ 10415, /* Vendor */ "Tunnel-Header-Length", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Tunnel-Information */ { struct dict_avp_data data = { 1038, /* Code */ 10415, /* Vendor */ "Tunnel-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* RAT-Type */ { struct dict_avp_data data = { 1032, /* Code */ 10415, /* Vendor */ "RAT-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(RAT-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Revalidation-Time */ { struct dict_avp_data data = { 1042, /* Code */ 10415, /* Vendor */ "Revalidation-Time", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* Rule-Activation-Time */ { struct dict_avp_data data = { 1043, /* Code */ 10415, /* Vendor */ "Rule-Activation-Time", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* UDP-Source-Port */ { struct dict_avp_data data = { 2806, /* Code */ 10415, /* Vendor */ "UDP-Source-Port", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* UE-Local-IP-Address */ { struct dict_avp_data data = { 2805, /* Code */ 10415, /* Vendor */ "UE-Local-IP-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* Usage-Monitoring-Information */ { struct dict_avp_data data = { 1067, /* Code */ 10415, /* Vendor */ "Usage-Monitoring-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Rule-Deactivation-Time */ { struct dict_avp_data data = { 1044, /* Code */ 10415, /* Vendor */ "Rule-Deactivation-Time", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* Usage-Monitoring-Level */ { struct dict_avp_data data = { 1068, /* Code */ 10415, /* Vendor */ "Usage-Monitoring-Level", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Usage-Monitoring-Level)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Usage-Monitoring-Report */ { struct dict_avp_data data = { 1069, /* Code */ 10415, /* Vendor */ "Usage-Monitoring-Report", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Usage-Monitoring-Report)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Usage-Monitoring-Support */ { struct dict_avp_data data = { 1070, /* Code */ 10415, /* Vendor */ "Usage-Monitoring-Support", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Usage-Monitoring-Support)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Gxx-specific */ /* QoS-Rule-Install */ { struct dict_avp_data data = { 1051, /* Code */ 10415, /* Vendor */ "QoS-Rule-Install", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* QoS-Rule-Remove */ { struct dict_avp_data data = { 1052, /* Code */ 10415, /* Vendor */ "QoS-Rule-Remove", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* QoS-Rule-Definition */ { struct dict_avp_data data = { 1053, /* Code */ 10415, /* Vendor */ "QoS-Rule-Definition", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* QoS-Rule-Name */ { struct dict_avp_data data = { 1054, /* Code */ 10415, /* Vendor */ "QoS-Rule-Name", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* QoS-Rule-Base-Name */ { struct dict_avp_data data = { 1074, /* Code */ 10415, /* Vendor */ "QoS-Rule-Base-Name", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* QoS-Rule-Report */ { struct dict_avp_data data = { 1055, /* Code */ 10415, /* Vendor */ "QoS-Rule-Report", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Session-Linking-Indicator */ { struct dict_avp_data data = { 1064, /* Code */ 10415, /* Vendor */ "Session-Linking-Indicator", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Session-Linking-Indicator)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* S15-specific */ /* CS-Service-Qos-Request-Identifier */ { struct dict_avp_data data = { 2807, /* Code */ 10415, /* Vendor */ "CS-Service-Qos-Request-Identifier", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* CS-Service-QoS-Request-Operation */ { struct dict_avp_data data = { 2808, /* Code */ 10415, /* Vendor */ "CS-Service-QoS-Request-Operation", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(CS-Service-QoS-Request-Operation)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* 3GPP 29.214-b80 (11.8.0 2013.03.15) */ /* Abort-Cause */ { struct dict_avp_data data = { 500, /* Code */ 10415, /* Vendor */ "Abort-Cause", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Abort-Cause)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Access-Network-Charging-Address */ { struct dict_avp_data data = { 501, /* Code */ 10415, /* Vendor */ "Access-Network-Charging-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* Access-Network-Charging-Identifier */ { struct dict_avp_data data = { 502, /* Code */ 10415, /* Vendor */ "Access-Network-Charging-Identifier", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Access-Network-Charging-Identifier-Value */ { struct dict_avp_data data = { 503, /* Code */ 10415, /* Vendor */ "Access-Network-Charging-Identifier-Value", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Acceptable-Service-Info */ { struct dict_avp_data data = { 526, /* Code */ 10415, /* Vendor */ "Acceptable-Service-Info", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* AF-Application-Identifier */ { struct dict_avp_data data = { 504, /* Code */ 10415, /* Vendor */ "AF-Application-Identifier", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* AF-Charging-Identifier */ { struct dict_avp_data data = { 505, /* Code */ 10415, /* Vendor */ "AF-Charging-Identifier", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Application-Service-Provider-Identity */ { struct dict_avp_data data = { 532, /* Code */ 10415, /* Vendor */ "Application-Service-Provider-Identity", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Codec-Data */ { struct dict_avp_data data = { 524, /* Code */ 10415, /* Vendor */ "Codec-Data", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Flow-Description */ { struct dict_avp_data data = { 507, /* Code */ 10415, /* Vendor */ "Flow-Description", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, IPFilterRule_type, NULL); }; /* Flow-Number */ { struct dict_avp_data data = { 509, /* Code */ 10415, /* Vendor */ "Flow-Number", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Flows */ { struct dict_avp_data data = { 510, /* Code */ 10415, /* Vendor */ "Flows", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Flow-Status */ { struct dict_avp_data data = { 511, /* Code */ 10415, /* Vendor */ "Flow-Status", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Flow-Status)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Flow-Usage */ { struct dict_avp_data data = { 512, /* Code */ 10415, /* Vendor */ "Flow-Usage", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Flow-Usage)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Service-URN */ { struct dict_avp_data data = { 525, /* Code */ 10415, /* Vendor */ "Service-URN", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Specific-Action */ { struct dict_avp_data data = { 513, /* Code */ 10415, /* Vendor */ "Specific-Action", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Specific-Action)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Max-Requested-Bandwidth-DL */ { struct dict_avp_data data = { 515, /* Code */ 10415, /* Vendor */ "Max-Requested-Bandwidth-DL", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Max-Requested-Bandwidth-UL */ { struct dict_avp_data data = { 516, /* Code */ 10415, /* Vendor */ "Max-Requested-Bandwidth-UL", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Media-Component-Description */ { struct dict_avp_data data = { 517, /* Code */ 10415, /* Vendor */ "Media-Component-Description", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Media-Component-Number */ { struct dict_avp_data data = { 518, /* Code */ 10415, /* Vendor */ "Media-Component-Number", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Media-Sub-Component */ { struct dict_avp_data data = { 519, /* Code */ 10415, /* Vendor */ "Media-Sub-Component", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Media-Type */ { struct dict_avp_data data = { 520, /* Code */ 10415, /* Vendor */ "Media-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Media-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* MPS-Identifier */ { struct dict_avp_data data = { 528, /* Code */ 10415, /* Vendor */ "MPS-Identifier", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Min-Requested-Bandwidth-DL */ { struct dict_avp_data data = { 534, /* Code */ 10415, /* Vendor */ "Min-Requested-Bandwidth-DL", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Min-Requested-Bandwidth-UL */ { struct dict_avp_data data = { 535, /* Code */ 10415, /* Vendor */ "Min-Requested-Bandwidth-UL", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* RR-Bandwidth */ { struct dict_avp_data data = { 521, /* Code */ 10415, /* Vendor */ "RR-Bandwidth", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* RS-Bandwidth */ { struct dict_avp_data data = { 522, /* Code */ 10415, /* Vendor */ "RS-Bandwidth", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Service-Info-Status */ { struct dict_avp_data data = { 527, /* Code */ 10415, /* Vendor */ "Service-Info-Status", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Service-Info-Status)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* SIP-Forking-Indication */ { struct dict_avp_data data = { 523, /* Code */ 10415, /* Vendor */ "SIP-Forking-Indication", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(SIP-Forking-Indication)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Sponsor-Identity */ { struct dict_avp_data data = { 531, /* Code */ 10415, /* Vendor */ "Sponsor-Identity", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Sponsored-Connectivity-Data */ { struct dict_avp_data data = { 530, /* Code */ 10415, /* Vendor */ "Sponsored-Connectivity-Data", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* AF-Signalling-Protocol */ { struct dict_avp_data data = { 529, /* Code */ 10415, /* Vendor */ "AF-Signalling-Protocol", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(AF-Signalling-Protocol)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Required-Access-Info */ { struct dict_avp_data data = { 536, /* Code */ 10415, /* Vendor */ "Required-Access-Info", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Required-Access-Info)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Rx-Request-Type */ { struct dict_avp_data data = { 533, /* Code */ 10415, /* Vendor */ "Rx-Request-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Rx-Request-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* IP-Domain-Id */ { struct dict_avp_data data = { 537, /* Code */ 10415, /* Vendor */ "IP-Domain-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* 3GPP 29.229-b20 (11.2.0 2012.12.21) */ /* Associated-Identities */ { struct dict_avp_data data = { 632, /* Code */ 10415, /* Vendor */ "Associated-Identities", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Associated-Registered-Identities */ { struct dict_avp_data data = { 647, /* Code */ 10415, /* Vendor */ "Associated-Registered-Identities", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Call-ID-SIP-Header */ { struct dict_avp_data data = { 643, /* Code */ 10415, /* Vendor */ "Call-ID-SIP-Header", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Charging-Information */ { struct dict_avp_data data = { 618, /* Code */ 10415, /* Vendor */ "Charging-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Confidentiality-Key */ { struct dict_avp_data data = { 625, /* Code */ 10415, /* Vendor */ "Confidentiality-Key", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Contact */ { struct dict_avp_data data = { 641, /* Code */ 10415, /* Vendor */ "Contact", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Deregistration-Reason */ { struct dict_avp_data data = { 615, /* Code */ 10415, /* Vendor */ "Deregistration-Reason", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Digest-Algorithm */ { struct dict_avp_data data = { 111, /* Code */ 10415, /* Vendor */ "Digest-Algorithm", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Digest-HA1 */ { struct dict_avp_data data = { 121, /* Code */ 10415, /* Vendor */ "Digest-HA1", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Digest-QoP */ { struct dict_avp_data data = { 110, /* Code */ 10415, /* Vendor */ "Digest-QoP", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Digest-Realm */ { struct dict_avp_data data = { 104, /* Code */ 10415, /* Vendor */ "Digest-Realm", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Feature-List */ { struct dict_avp_data data = { 630, /* Code */ 10415, /* Vendor */ "Feature-List", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Feature-List-ID */ { struct dict_avp_data data = { 629, /* Code */ 10415, /* Vendor */ "Feature-List-ID", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* From-SIP-Header */ { struct dict_avp_data data = { 644, /* Code */ 10415, /* Vendor */ "From-SIP-Header", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Identity-with-Emergency-Registration */ { struct dict_avp_data data = { 651, /* Code */ 10415, /* Vendor */ "Identity-with-Emergency-Registration", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Integrity-Key */ { struct dict_avp_data data = { 626, /* Code */ 10415, /* Vendor */ "Integrity-Key", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* LIA-Flags */ { struct dict_avp_data data = { 653, /* Code */ 10415, /* Vendor */ "LIA-Flags", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Loose-Route-Indication */ { struct dict_avp_data data = { 638, /* Code */ 10415, /* Vendor */ "Loose-Route-Indication", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Loose-Route-Indication)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Mandatory-Capability */ { struct dict_avp_data data = { 604, /* Code */ 10415, /* Vendor */ "Mandatory-Capability", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Multiple-Registration-Indication */ { struct dict_avp_data data = { 648, /* Code */ 10415, /* Vendor */ "Multiple-Registration-Indication", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Multiple-Registration-Indication)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Optional-Capability */ { struct dict_avp_data data = { 605, /* Code */ 10415, /* Vendor */ "Optional-Capability", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Originating-Request */ { struct dict_avp_data data = { 633, /* Code */ 10415, /* Vendor */ "Originating-Request", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Originating-Request)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Path */ { struct dict_avp_data data = { 640, /* Code */ 10415, /* Vendor */ "Path", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Primary-Charging-Collection-Function-Name */ { struct dict_avp_data data = { 621, /* Code */ 10415, /* Vendor */ "Primary-Charging-Collection-Function-Name", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, DiameterURI_type, NULL); }; /* Primary-Event-Charging-Function-Name */ { struct dict_avp_data data = { 619, /* Code */ 10415, /* Vendor */ "Primary-Event-Charging-Function-Name", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, DiameterURI_type, NULL); }; /* Priviledged-Sender-Indication */ { struct dict_avp_data data = { 652, /* Code */ 10415, /* Vendor */ "Priviledged-Sender-Indication", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Priviledged-Sender-Indication)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Public-Identity */ { struct dict_avp_data data = { 601, /* Code */ 10415, /* Vendor */ "Public-Identity", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Reason-Code */ { struct dict_avp_data data = { 616, /* Code */ 10415, /* Vendor */ "Reason-Code", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Reason-Code)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Reason-Info */ { struct dict_avp_data data = { 617, /* Code */ 10415, /* Vendor */ "Reason-Info", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Record-Route */ { struct dict_avp_data data = { 646, /* Code */ 10415, /* Vendor */ "Record-Route", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Restoration-Info */ { struct dict_avp_data data = { 649, /* Code */ 10415, /* Vendor */ "Restoration-Info", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SCSCF-Restoration-Info */ { struct dict_avp_data data = { 639, /* Code */ 10415, /* Vendor */ "SCSCF-Restoration-Info", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SIP-Auth-Data-Item */ { struct dict_avp_data data = { 612, /* Code */ 10415, /* Vendor */ "SIP-Auth-Data-Item", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SIP-Authenticate */ { struct dict_avp_data data = { 609, /* Code */ 10415, /* Vendor */ "SIP-Authenticate", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SIP-Authentication-Context */ { struct dict_avp_data data = { 611, /* Code */ 10415, /* Vendor */ "SIP-Authentication-Context", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SIP-Authentication-Scheme */ { struct dict_avp_data data = { 608, /* Code */ 10415, /* Vendor */ "SIP-Authentication-Scheme", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* SIP-Authorization */ { struct dict_avp_data data = { 610, /* Code */ 10415, /* Vendor */ "SIP-Authorization", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SIP-Digest-Authenticate */ { struct dict_avp_data data = { 635, /* Code */ 10415, /* Vendor */ "SIP-Digest-Authenticate", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SIP-Item-Number */ { struct dict_avp_data data = { 613, /* Code */ 10415, /* Vendor */ "SIP-Item-Number", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SIP-Number-Auth-Items */ { struct dict_avp_data data = { 607, /* Code */ 10415, /* Vendor */ "SIP-Number-Auth-Items", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Secondary-Charging-Collection-Function-Name */ { struct dict_avp_data data = { 622, /* Code */ 10415, /* Vendor */ "Secondary-Charging-Collection-Function-Name", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, DiameterURI_type, NULL); }; /* Secondary-Event-Charging-Function-Name */ { struct dict_avp_data data = { 620, /* Code */ 10415, /* Vendor */ "Secondary-Event-Charging-Function-Name", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, DiameterURI_type, NULL); }; /* Server-Assignment-Type */ { struct dict_avp_data data = { 614, /* Code */ 10415, /* Vendor */ "Server-Assignment-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Server-Assignment-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Server-Capabilities */ { struct dict_avp_data data = { 603, /* Code */ 10415, /* Vendor */ "Server-Capabilities", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Server-Name */ { struct dict_avp_data data = { 602, /* Code */ 10415, /* Vendor */ "Server-Name", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Session-Priority */ { struct dict_avp_data data = { 650, /* Code */ 10415, /* Vendor */ "Session-Priority", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Session-Priority)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Subscription-Info */ { struct dict_avp_data data = { 642, /* Code */ 10415, /* Vendor */ "Subscription-Info", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Supported-Applications */ { struct dict_avp_data data = { 631, /* Code */ 10415, /* Vendor */ "Supported-Applications", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Supported-Features */ { struct dict_avp_data data = { 628, /* Code */ 10415, /* Vendor */ "Supported-Features", /* Name */ AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* To-SIP-Header */ { struct dict_avp_data data = { 645, /* Code */ 10415, /* Vendor */ "To-SIP-Header", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* UAR-Flags */ { struct dict_avp_data data = { 637, /* Code */ 10415, /* Vendor */ "UAR-Flags", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* User-Authorization-Type */ { struct dict_avp_data data = { 623, /* Code */ 10415, /* Vendor */ "User-Authorization-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(User-Authorization-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* User-Data */ { struct dict_avp_data data = { 606, /* Code */ 10415, /* Vendor */ "User-Data", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* User-Data-Already-Available */ { struct dict_avp_data data = { 624, /* Code */ 10415, /* Vendor */ "User-Data-Already-Available", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(User-Data-Already-Available)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Visited-Network-Identifier */ { struct dict_avp_data data = { 600, /* Code */ 10415, /* Vendor */ "Visited-Network-Identifier", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Wildcarded-Public-Identity */ { struct dict_avp_data data = { 634, /* Code */ 10415, /* Vendor */ "Wildcarded-Public-Identity", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* 3GPP 32.299-b60 (11.6.0 2012.12.21) */ /* AF-Correlation-Information */ { struct dict_avp_data data = { 1276, /* Code */ 10415, /* Vendor */ "AF-Correlation-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Access-Network-Information */ { struct dict_avp_data data = { 1263, /* Code */ 10415, /* Vendor */ "Access-Network-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Access-Transfer-Information */ { struct dict_avp_data data = { 2709, /* Code */ 10415, /* Vendor */ "Access-Transfer-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Access-Transfer-Type */ { struct dict_avp_data data = { 2710, /* Code */ 10415, /* Vendor */ "Access-Transfer-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Access-Transfer-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Account-Expiration */ { struct dict_avp_data data = { 2309, /* Code */ 10415, /* Vendor */ "Account-Expiration", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* Accumulated-Cost */ { struct dict_avp_data data = { 2052, /* Code */ 10415, /* Vendor */ "Accumulated-Cost", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Adaptations */ { struct dict_avp_data data = { 1217, /* Code */ 10415, /* Vendor */ "Adaptations", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Adaptations)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Additional-Content-Information */ { struct dict_avp_data data = { 1207, /* Code */ 10415, /* Vendor */ "Additional-Content-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Additional-Type-Information */ { struct dict_avp_data data = { 1205, /* Code */ 10415, /* Vendor */ "Additional-Type-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Address-Data */ { struct dict_avp_data data = { 897, /* Code */ 10415, /* Vendor */ "Address-Data", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Address-Domain */ { struct dict_avp_data data = { 898, /* Code */ 10415, /* Vendor */ "Address-Domain", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Address-Type */ { struct dict_avp_data data = { 899, /* Code */ 10415, /* Vendor */ "Address-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Address-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Addressee-Type */ { struct dict_avp_data data = { 1208, /* Code */ 10415, /* Vendor */ "Addressee-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Addressee-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Alternate-Charged-Party-Address */ { struct dict_avp_data data = { 1280, /* Code */ 10415, /* Vendor */ "Alternate-Charged-Party-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* AoC-Cost-Information */ { struct dict_avp_data data = { 2053, /* Code */ 10415, /* Vendor */ "AoC-Cost-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* AoC-Format */ { struct dict_avp_data data = { 2310, /* Code */ 10415, /* Vendor */ "AoC-Format", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(AoC-Format)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* AoC-Information */ { struct dict_avp_data data = { 2054, /* Code */ 10415, /* Vendor */ "AoC-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* AoC-Request-Type */ { struct dict_avp_data data = { 2055, /* Code */ 10415, /* Vendor */ "AoC-Request-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(AoC-Request-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* AoC-Service */ { struct dict_avp_data data = { 2311, /* Code */ 10415, /* Vendor */ "AoC-Service", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* AoC-Service-Obligatory-Type */ { struct dict_avp_data data = { 2312, /* Code */ 10415, /* Vendor */ "AoC-Service-Obligatory-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(AoC-Service-Obligatory-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* AoC-Service-Type */ { struct dict_avp_data data = { 2313, /* Code */ 10415, /* Vendor */ "AoC-Service-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(AoC-Service-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* AoC-Subscription-Information */ { struct dict_avp_data data = { 2314, /* Code */ 10415, /* Vendor */ "AoC-Subscription-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Applic-ID */ { struct dict_avp_data data = { 1218, /* Code */ 10415, /* Vendor */ "Applic-ID", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Application-Server */ { struct dict_avp_data data = { 836, /* Code */ 10415, /* Vendor */ "Application-Server", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Application-Server-Information */ { struct dict_avp_data data = { 850, /* Code */ 10415, /* Vendor */ "Application-Server-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Application-provided-Called-Party-Address */ { struct dict_avp_data data = { 837, /* Code */ 10415, /* Vendor */ "Application-provided-Called-Party-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Associated-Party-Address */ { struct dict_avp_data data = { 2035, /* Code */ 10415, /* Vendor */ "Associated-Party-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Associated-URI */ { struct dict_avp_data data = { 856, /* Code */ 10415, /* Vendor */ "Associated-URI", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Aux-Applic-Info */ { struct dict_avp_data data = { 1219, /* Code */ 10415, /* Vendor */ "Aux-Applic-Info", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Base-Time-Interval */ { struct dict_avp_data data = { 1265, /* Code */ 10415, /* Vendor */ "Base-Time-Interval", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Bearer-Service */ { struct dict_avp_data data = { 854, /* Code */ 10415, /* Vendor */ "Bearer-Service", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* CG-Address */ { struct dict_avp_data data = { 846, /* Code */ 10415, /* Vendor */ "CG-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* CSG-Access-Mode */ { struct dict_avp_data data = { 2317, /* Code */ 10415, /* Vendor */ "CSG-Access-Mode", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(CSG-Access-Mode)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* CSG-Membership-Indication */ { struct dict_avp_data data = { 2318, /* Code */ 10415, /* Vendor */ "CSG-Membership-Indication", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(CSG-Membership-Indication)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* CUG-Information */ { struct dict_avp_data data = { 2304, /* Code */ 10415, /* Vendor */ "CUG-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Called-Asserted-Identity */ { struct dict_avp_data data = { 1250, /* Code */ 10415, /* Vendor */ "Called-Asserted-Identity", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Called-Party-Address */ { struct dict_avp_data data = { 832, /* Code */ 10415, /* Vendor */ "Called-Party-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Calling-Party-Address */ { struct dict_avp_data data = { 831, /* Code */ 10415, /* Vendor */ "Calling-Party-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Carrier-Select-Routing-Information */ { struct dict_avp_data data = { 2023, /* Code */ 10415, /* Vendor */ "Carrier-Select-Routing-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Cause-Code */ { struct dict_avp_data data = { 861, /* Code */ 10415, /* Vendor */ "Cause-Code", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Change-Condition */ { struct dict_avp_data data = { 2037, /* Code */ 10415, /* Vendor */ "Change-Condition", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Change-Time */ { struct dict_avp_data data = { 2038, /* Code */ 10415, /* Vendor */ "Change-Time", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* Charge-Reason-Code */ { struct dict_avp_data data = { 2118, /* Code */ 10415, /* Vendor */ "Charge-Reason-Code", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Charge-Reason-Code)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Charged-Party */ { struct dict_avp_data data = { 857, /* Code */ 10415, /* Vendor */ "Charged-Party", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Charging-Characteristics-Selection-Mode */ { struct dict_avp_data data = { 2066, /* Code */ 10415, /* Vendor */ "Charging-Characteristics-Selection-Mode", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Charging-Characteristics-Selection-Mode)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Class-Identifier */ { struct dict_avp_data data = { 1214, /* Code */ 10415, /* Vendor */ "Class-Identifier", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Class-Identifier)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Client-Address */ { struct dict_avp_data data = { 2018, /* Code */ 10415, /* Vendor */ "Client-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* Content-Class */ { struct dict_avp_data data = { 1220, /* Code */ 10415, /* Vendor */ "Content-Class", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Content-Class)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Content-Disposition */ { struct dict_avp_data data = { 828, /* Code */ 10415, /* Vendor */ "Content-Disposition", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Content-Length */ { struct dict_avp_data data = { 827, /* Code */ 10415, /* Vendor */ "Content-Length", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Content-Size */ { struct dict_avp_data data = { 1206, /* Code */ 10415, /* Vendor */ "Content-Size", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Content-Type */ { struct dict_avp_data data = { 826, /* Code */ 10415, /* Vendor */ "Content-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Current-Tariff */ { struct dict_avp_data data = { 2056, /* Code */ 10415, /* Vendor */ "Current-Tariff", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* DRM-Content */ { struct dict_avp_data data = { 1221, /* Code */ 10415, /* Vendor */ "DRM-Content", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(DRM-Content)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Data-Coding-Scheme */ { struct dict_avp_data data = { 2001, /* Code */ 10415, /* Vendor */ "Data-Coding-Scheme", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Deferred-Location-Event-Type */ { struct dict_avp_data data = { 1230, /* Code */ 10415, /* Vendor */ "Deferred-Location-Event-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Delivery-Report-Requested */ { struct dict_avp_data data = { 1216, /* Code */ 10415, /* Vendor */ "Delivery-Report-Requested", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Delivery-Report-Requested)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Destination-Interface */ { struct dict_avp_data data = { 2002, /* Code */ 10415, /* Vendor */ "Destination-Interface", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Diagnostics */ { struct dict_avp_data data = { 2039, /* Code */ 10415, /* Vendor */ "Diagnostics", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Domain-Name */ { struct dict_avp_data data = { 1200, /* Code */ 10415, /* Vendor */ "Domain-Name", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Dynamic-Address-Flag */ { struct dict_avp_data data = { 2051, /* Code */ 10415, /* Vendor */ "Dynamic-Address-Flag", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Dynamic-Address-Flag)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Dynamic-Address-Flag-Extension */ { struct dict_avp_data data = { 2068, /* Code */ 10415, /* Vendor */ "Dynamic-Address-Flag-Extension", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Dynamic-Address-Flag-Extension)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Early-Media-Description */ { struct dict_avp_data data = { 1272, /* Code */ 10415, /* Vendor */ "Early-Media-Description", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Envelope */ { struct dict_avp_data data = { 1266, /* Code */ 10415, /* Vendor */ "Envelope", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Envelope-End-Time */ { struct dict_avp_data data = { 1267, /* Code */ 10415, /* Vendor */ "Envelope-End-Time", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* Envelope-Reporting */ { struct dict_avp_data data = { 1268, /* Code */ 10415, /* Vendor */ "Envelope-Reporting", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Envelope-Reporting)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Envelope-Start-Time */ { struct dict_avp_data data = { 1269, /* Code */ 10415, /* Vendor */ "Envelope-Start-Time", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* Event */ { struct dict_avp_data data = { 825, /* Code */ 10415, /* Vendor */ "Event", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Event-Charging-TimeStamp */ { struct dict_avp_data data = { 1258, /* Code */ 10415, /* Vendor */ "Event-Charging-TimeStamp", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* Event-Type */ { struct dict_avp_data data = { 823, /* Code */ 10415, /* Vendor */ "Event-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Expires */ { struct dict_avp_data data = { 888, /* Code */ 10415, /* Vendor */ "Expires", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* File-Repair-Supported */ { struct dict_avp_data data = { 1224, /* Code */ 10415, /* Vendor */ "File-Repair-Supported", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(File-Repair-Supported)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* From-Address */ { struct dict_avp_data data = { 2708, /* Code */ 10415, /* Vendor */ "From-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* GGSN-Address */ { struct dict_avp_data data = { 847, /* Code */ 10415, /* Vendor */ "GGSN-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* IMS-Application-Reference-Identifier */ { struct dict_avp_data data = { 2601, /* Code */ 10415, /* Vendor */ "IMS-Application-Reference-Identifier", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* IMS-Charging-Identifier */ { struct dict_avp_data data = { 841, /* Code */ 10415, /* Vendor */ "IMS-Charging-Identifier", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* IMS-Communication-Service-Identifier */ { struct dict_avp_data data = { 1281, /* Code */ 10415, /* Vendor */ "IMS-Communication-Service-Identifier", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* IMS-Emergency-Indicator */ { struct dict_avp_data data = { 2322, /* Code */ 10415, /* Vendor */ "IMS-Emergency-Indicator", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(IMS-Emergency-Indicator)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* IMS-Information */ { struct dict_avp_data data = { 876, /* Code */ 10415, /* Vendor */ "IMS-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* IMSI-Unauthenticated-Flag */ { struct dict_avp_data data = { 2308, /* Code */ 10415, /* Vendor */ "IMSI-Unauthenticated-Flag", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(IMSI-Unauthenticated-Flag)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* IP-Realm-Default-Indication */ { struct dict_avp_data data = { 2603, /* Code */ 10415, /* Vendor */ "IP-Realm-Default-Indication", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(IP-Realm-Default-Indication)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Incoming-Trunk-Group-Id */ { struct dict_avp_data data = { 852, /* Code */ 10415, /* Vendor */ "Incoming-Trunk-Group-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Incremental-Cost */ { struct dict_avp_data data = { 2062, /* Code */ 10415, /* Vendor */ "Incremental-Cost", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Initial-IMS-Charging-Identifier */ { struct dict_avp_data data = { 2321, /* Code */ 10415, /* Vendor */ "Initial-IMS-Charging-Identifier", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Inter-Operator-Identifier */ { struct dict_avp_data data = { 838, /* Code */ 10415, /* Vendor */ "Inter-Operator-Identifier", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Interface-Id */ { struct dict_avp_data data = { 2003, /* Code */ 10415, /* Vendor */ "Interface-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Interface-Port */ { struct dict_avp_data data = { 2004, /* Code */ 10415, /* Vendor */ "Interface-Port", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Interface-Text */ { struct dict_avp_data data = { 2005, /* Code */ 10415, /* Vendor */ "Interface-Text", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Interface-Type */ { struct dict_avp_data data = { 2006, /* Code */ 10415, /* Vendor */ "Interface-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Interface-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* LCS-APN */ { struct dict_avp_data data = { 1231, /* Code */ 10415, /* Vendor */ "LCS-APN", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* LCS-Client-Dialed-By-MS */ { struct dict_avp_data data = { 1233, /* Code */ 10415, /* Vendor */ "LCS-Client-Dialed-By-MS", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* LCS-Client-External-ID */ { struct dict_avp_data data = { 1234, /* Code */ 10415, /* Vendor */ "LCS-Client-External-ID", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* LCS-Client-Id */ { struct dict_avp_data data = { 1232, /* Code */ 10415, /* Vendor */ "LCS-Client-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* LCS-Client-Name */ { struct dict_avp_data data = { 1235, /* Code */ 10415, /* Vendor */ "LCS-Client-Name", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* LCS-Client-Type */ { struct dict_avp_data data = { 1241, /* Code */ 10415, /* Vendor */ "LCS-Client-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(LCS-Client-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* LCS-Data-Coding-Scheme */ { struct dict_avp_data data = { 1236, /* Code */ 10415, /* Vendor */ "LCS-Data-Coding-Scheme", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* LCS-Format-Indicator */ { struct dict_avp_data data = { 1237, /* Code */ 10415, /* Vendor */ "LCS-Format-Indicator", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(LCS-Format-Indicator)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* LCS-Information */ { struct dict_avp_data data = { 878, /* Code */ 10415, /* Vendor */ "LCS-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* LCS-Name-String */ { struct dict_avp_data data = { 1238, /* Code */ 10415, /* Vendor */ "LCS-Name-String", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* LCS-Requestor-Id */ { struct dict_avp_data data = { 1239, /* Code */ 10415, /* Vendor */ "LCS-Requestor-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* LCS-Requestor-Id-String */ { struct dict_avp_data data = { 1240, /* Code */ 10415, /* Vendor */ "LCS-Requestor-Id-String", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Local-GW-Inserted-Indication */ { struct dict_avp_data data = { 2604, /* Code */ 10415, /* Vendor */ "Local-GW-Inserted-Indication", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Local-GW-Inserted-Indication)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Local-Sequence-Number */ { struct dict_avp_data data = { 2063, /* Code */ 10415, /* Vendor */ "Local-Sequence-Number", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Location-Estimate */ { struct dict_avp_data data = { 1242, /* Code */ 10415, /* Vendor */ "Location-Estimate", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Location-Estimate-Type */ { struct dict_avp_data data = { 1243, /* Code */ 10415, /* Vendor */ "Location-Estimate-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Location-Estimate-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Location-Type */ { struct dict_avp_data data = { 1244, /* Code */ 10415, /* Vendor */ "Location-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Low-Balance-Indication */ { struct dict_avp_data data = { 2020, /* Code */ 10415, /* Vendor */ "Low-Balance-Indication", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Low-Balance-Indication)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Low-Priority-Indicator */ { struct dict_avp_data data = { 2602, /* Code */ 10415, /* Vendor */ "Low-Priority-Indicator", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Low-Priority-Indicator)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* MBMSGW-Address */ { struct dict_avp_data data = { 2307, /* Code */ 10415, /* Vendor */ "MBMSGW-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* MBMS-Information */ { struct dict_avp_data data = { 880, /* Code */ 10415, /* Vendor */ "MBMS-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* MBMS-User-Service-Type */ { struct dict_avp_data data = { 1225, /* Code */ 10415, /* Vendor */ "MBMS-User-Service-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(MBMS-User-Service-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* MM-Content-Type */ { struct dict_avp_data data = { 1203, /* Code */ 10415, /* Vendor */ "MM-Content-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* MMBox-Storage-Requested */ { struct dict_avp_data data = { 1248, /* Code */ 10415, /* Vendor */ "MMBox-Storage-Requested", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(MMBox-Storage-Requested)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* MMS-Information */ { struct dict_avp_data data = { 877, /* Code */ 10415, /* Vendor */ "MMS-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* MMTel-Information */ { struct dict_avp_data data = { 2030, /* Code */ 10415, /* Vendor */ "MMTel-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* MMTel-SService-Type */ { struct dict_avp_data data = { 2031, /* Code */ 10415, /* Vendor */ "MMTel-SService-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Media-Initiator-Flag */ { struct dict_avp_data data = { 882, /* Code */ 10415, /* Vendor */ "Media-Initiator-Flag", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Media-Initiator-Flag)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Media-Initiator-Party */ { struct dict_avp_data data = { 1288, /* Code */ 10415, /* Vendor */ "Media-Initiator-Party", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Message-Body */ { struct dict_avp_data data = { 889, /* Code */ 10415, /* Vendor */ "Message-Body", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Message-Class */ { struct dict_avp_data data = { 1213, /* Code */ 10415, /* Vendor */ "Message-Class", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Message-ID */ { struct dict_avp_data data = { 1210, /* Code */ 10415, /* Vendor */ "Message-ID", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Message-Size */ { struct dict_avp_data data = { 1212, /* Code */ 10415, /* Vendor */ "Message-Size", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Message-Type */ { struct dict_avp_data data = { 1211, /* Code */ 10415, /* Vendor */ "Message-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Message-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* NNI-Information */ { struct dict_avp_data data = { 2703, /* Code */ 10415, /* Vendor */ "NNI-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* NNI-Type */ { struct dict_avp_data data = { 2704, /* Code */ 10415, /* Vendor */ "NNI-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(NNI-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Neighbour-Node-Address */ { struct dict_avp_data data = { 2705, /* Code */ 10415, /* Vendor */ "Neighbour-Node-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* Next-Tariff */ { struct dict_avp_data data = { 2057, /* Code */ 10415, /* Vendor */ "Next-Tariff", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Node-Functionality */ { struct dict_avp_data data = { 862, /* Code */ 10415, /* Vendor */ "Node-Functionality", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Node-Functionality)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Node-Id */ { struct dict_avp_data data = { 2064, /* Code */ 10415, /* Vendor */ "Node-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Number-Of-Diversions */ { struct dict_avp_data data = { 2034, /* Code */ 10415, /* Vendor */ "Number-Of-Diversions", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Number-Of-Messages-Sent */ { struct dict_avp_data data = { 2019, /* Code */ 10415, /* Vendor */ "Number-Of-Messages-Sent", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Number-Of-Participants */ { struct dict_avp_data data = { 885, /* Code */ 10415, /* Vendor */ "Number-Of-Participants", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Number-Of-Received-Talk-Bursts */ { struct dict_avp_data data = { 1282, /* Code */ 10415, /* Vendor */ "Number-Of-Received-Talk-Bursts", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Number-Of-Talk-Bursts */ { struct dict_avp_data data = { 1283, /* Code */ 10415, /* Vendor */ "Number-Of-Talk-Bursts", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Number-Portability-Routing-Information */ { struct dict_avp_data data = { 2024, /* Code */ 10415, /* Vendor */ "Number-Portability-Routing-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Offline-Charging */ { struct dict_avp_data data = { 1278, /* Code */ 10415, /* Vendor */ "Offline-Charging", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Online-Charging-Flag */ { struct dict_avp_data data = { 2303, /* Code */ 10415, /* Vendor */ "Online-Charging-Flag", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Online-Charging-Flag)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Originating-IOI */ { struct dict_avp_data data = { 839, /* Code */ 10415, /* Vendor */ "Originating-IOI", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Originator */ { struct dict_avp_data data = { 864, /* Code */ 10415, /* Vendor */ "Originator", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Originator)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Originator-Address */ { struct dict_avp_data data = { 886, /* Code */ 10415, /* Vendor */ "Originator-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Originator-Interface */ { struct dict_avp_data data = { 2009, /* Code */ 10415, /* Vendor */ "Originator-Interface", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Originator-Received-Address */ { struct dict_avp_data data = { 2027, /* Code */ 10415, /* Vendor */ "Originator-Received-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Originator-SCCP-Address */ { struct dict_avp_data data = { 2008, /* Code */ 10415, /* Vendor */ "Originator-SCCP-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* Outgoing-Session-Id */ { struct dict_avp_data data = { 2320, /* Code */ 10415, /* Vendor */ "Outgoing-Session-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Outgoing-Trunk-Group-Id */ { struct dict_avp_data data = { 853, /* Code */ 10415, /* Vendor */ "Outgoing-Trunk-Group-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* PDG-Address */ { struct dict_avp_data data = { 895, /* Code */ 10415, /* Vendor */ "PDG-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* PDG-Charging-Id */ { struct dict_avp_data data = { 896, /* Code */ 10415, /* Vendor */ "PDG-Charging-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* PDN-Connection-Charging-ID */ { struct dict_avp_data data = { 2050, /* Code */ 10415, /* Vendor */ "PDN-Connection-Charging-ID", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* PDP-Address */ { struct dict_avp_data data = { 1227, /* Code */ 10415, /* Vendor */ "PDP-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* PDP-Address-Prefix-Length */ { struct dict_avp_data data = { 2606, /* Code */ 10415, /* Vendor */ "PDP-Address-Prefix-Length", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* PDP-Context-Type */ { struct dict_avp_data data = { 1247, /* Code */ 10415, /* Vendor */ "PDP-Context-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(PDP-Context-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* PS-Append-Free-Format-Data */ { struct dict_avp_data data = { 867, /* Code */ 10415, /* Vendor */ "PS-Append-Free-Format-Data", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(PS-Append-Free-Format-Data)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* PS-Free-Format-Data */ { struct dict_avp_data data = { 866, /* Code */ 10415, /* Vendor */ "PS-Free-Format-Data", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* PS-Furnish-Charging-Information */ { struct dict_avp_data data = { 865, /* Code */ 10415, /* Vendor */ "PS-Furnish-Charging-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* PS-Information */ { struct dict_avp_data data = { 874, /* Code */ 10415, /* Vendor */ "PS-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Participant-Access-Priority */ { struct dict_avp_data data = { 1259, /* Code */ 10415, /* Vendor */ "Participant-Access-Priority", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Participant-Access-Priority)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Participant-Action-Type */ { struct dict_avp_data data = { 2049, /* Code */ 10415, /* Vendor */ "Participant-Action-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Participant-Action-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Participant-Group */ { struct dict_avp_data data = { 1260, /* Code */ 10415, /* Vendor */ "Participant-Group", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Participants-Involved */ { struct dict_avp_data data = { 887, /* Code */ 10415, /* Vendor */ "Participants-Involved", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* PoC-Change-Condition */ { struct dict_avp_data data = { 1261, /* Code */ 10415, /* Vendor */ "PoC-Change-Condition", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(PoC-Change-Condition)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* PoC-Change-Time */ { struct dict_avp_data data = { 1262, /* Code */ 10415, /* Vendor */ "PoC-Change-Time", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* PoC-Controlling-Address */ { struct dict_avp_data data = { 858, /* Code */ 10415, /* Vendor */ "PoC-Controlling-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* PoC-Event-Type */ { struct dict_avp_data data = { 2025, /* Code */ 10415, /* Vendor */ "PoC-Event-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(PoC-Event-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* PoC-Group-Name */ { struct dict_avp_data data = { 859, /* Code */ 10415, /* Vendor */ "PoC-Group-Name", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* PoC-Information */ { struct dict_avp_data data = { 879, /* Code */ 10415, /* Vendor */ "PoC-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* PoC-Server-Role */ { struct dict_avp_data data = { 883, /* Code */ 10415, /* Vendor */ "PoC-Server-Role", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(PoC-Server-Role)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* PoC-Session-Id */ { struct dict_avp_data data = { 1229, /* Code */ 10415, /* Vendor */ "PoC-Session-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* PoC-Session-Initiation-type */ { struct dict_avp_data data = { 1277, /* Code */ 10415, /* Vendor */ "PoC-Session-Initiation-type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(PoC-Session-Initiation-type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* PoC-Session-Type */ { struct dict_avp_data data = { 884, /* Code */ 10415, /* Vendor */ "PoC-Session-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(PoC-Session-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* PoC-User-Role */ { struct dict_avp_data data = { 1252, /* Code */ 10415, /* Vendor */ "PoC-User-Role", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* PoC-User-Role-IDs */ { struct dict_avp_data data = { 1253, /* Code */ 10415, /* Vendor */ "PoC-User-Role-IDs", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* PoC-User-Role-info-Units */ { struct dict_avp_data data = { 1254, /* Code */ 10415, /* Vendor */ "PoC-User-Role-info-Units", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(PoC-User-Role-info-Units)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Positioning-Data */ { struct dict_avp_data data = { 1245, /* Code */ 10415, /* Vendor */ "Positioning-Data", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Preferred-AoC-Currency */ { struct dict_avp_data data = { 2315, /* Code */ 10415, /* Vendor */ "Preferred-AoC-Currency", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Priority */ { struct dict_avp_data data = { 1209, /* Code */ 10415, /* Vendor */ "Priority", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Priority)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Quota-Consumption-Time */ { struct dict_avp_data data = { 881, /* Code */ 10415, /* Vendor */ "Quota-Consumption-Time", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Quota-Holding-Time */ { struct dict_avp_data data = { 871, /* Code */ 10415, /* Vendor */ "Quota-Holding-Time", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Rate-Element */ { struct dict_avp_data data = { 2058, /* Code */ 10415, /* Vendor */ "Rate-Element", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Read-Reply-Report-Requested */ { struct dict_avp_data data = { 1222, /* Code */ 10415, /* Vendor */ "Read-Reply-Report-Requested", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Read-Reply-Report-Requested)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Real-Time-Tariff-Information */ { struct dict_avp_data data = { 2305, /* Code */ 10415, /* Vendor */ "Real-Time-Tariff-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Received-Talk-Burst-Time */ { struct dict_avp_data data = { 1284, /* Code */ 10415, /* Vendor */ "Received-Talk-Burst-Time", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Received-Talk-Burst-Volume */ { struct dict_avp_data data = { 1285, /* Code */ 10415, /* Vendor */ "Received-Talk-Burst-Volume", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Recipient-Address */ { struct dict_avp_data data = { 1201, /* Code */ 10415, /* Vendor */ "Recipient-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Recipient-Info */ { struct dict_avp_data data = { 2026, /* Code */ 10415, /* Vendor */ "Recipient-Info", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Recipient-Received-Address */ { struct dict_avp_data data = { 2028, /* Code */ 10415, /* Vendor */ "Recipient-Received-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Recipient-SCCP-Address */ { struct dict_avp_data data = { 2010, /* Code */ 10415, /* Vendor */ "Recipient-SCCP-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* Refund-Information */ { struct dict_avp_data data = { 2022, /* Code */ 10415, /* Vendor */ "Refund-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Relationship-Mode */ { struct dict_avp_data data = { 2706, /* Code */ 10415, /* Vendor */ "Relationship-Mode", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Relationship-Mode)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Remaining-Balance */ { struct dict_avp_data data = { 2021, /* Code */ 10415, /* Vendor */ "Remaining-Balance", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Reply-Applic-ID */ { struct dict_avp_data data = { 1223, /* Code */ 10415, /* Vendor */ "Reply-Applic-ID", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Reply-Path-Requested */ { struct dict_avp_data data = { 2011, /* Code */ 10415, /* Vendor */ "Reply-Path-Requested", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Reply-Path-Requested)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Reporting-Reason */ { struct dict_avp_data data = { 872, /* Code */ 10415, /* Vendor */ "Reporting-Reason", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Reporting-Reason)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Requested-Party-Address */ { struct dict_avp_data data = { 1251, /* Code */ 10415, /* Vendor */ "Requested-Party-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Role-Of-Node */ { struct dict_avp_data data = { 829, /* Code */ 10415, /* Vendor */ "Role-Of-Node", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Role-Of-Node)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Route-Header-Received */ { struct dict_avp_data data = { 3403, /* Code */ 10415, /* Vendor */ "Route-Header-Received", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Route-Header-Transmitted */ { struct dict_avp_data data = { 3404, /* Code */ 10415, /* Vendor */ "Route-Header-Transmitted", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* IMS-Visited-Network-Identifier */ { struct dict_avp_data data = { 2713, /* Code */ 10415, /* Vendor */ "IMS-Visited-Network-Identifier", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Instance-Id */ { struct dict_avp_data data = { 3402, /* Code */ 10415, /* Vendor */ "Instance-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* SDP-Answer-Timestamp */ { struct dict_avp_data data = { 1275, /* Code */ 10415, /* Vendor */ "SDP-Answer-Timestamp", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* SDP-Media-Component */ { struct dict_avp_data data = { 843, /* Code */ 10415, /* Vendor */ "SDP-Media-Component", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SDP-Media-Description */ { struct dict_avp_data data = { 845, /* Code */ 10415, /* Vendor */ "SDP-Media-Description", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* SDP-Media-Name */ { struct dict_avp_data data = { 844, /* Code */ 10415, /* Vendor */ "SDP-Media-Name", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* SDP-Offer-Timestamp */ { struct dict_avp_data data = { 1274, /* Code */ 10415, /* Vendor */ "SDP-Offer-Timestamp", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* SDP-Session-Description */ { struct dict_avp_data data = { 842, /* Code */ 10415, /* Vendor */ "SDP-Session-Description", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* SDP-TimeStamps */ { struct dict_avp_data data = { 1273, /* Code */ 10415, /* Vendor */ "SDP-TimeStamps", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SDP-Type */ { struct dict_avp_data data = { 2036, /* Code */ 10415, /* Vendor */ "SDP-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(SDP-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* SGSN-Address */ { struct dict_avp_data data = { 1228, /* Code */ 10415, /* Vendor */ "SGSN-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* SGW-Address */ { struct dict_avp_data data = { 2067, /* Code */ 10415, /* Vendor */ "SGW-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* SGW-Change */ { struct dict_avp_data data = { 2065, /* Code */ 10415, /* Vendor */ "SGW-Change", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(SGW-Change)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* SIP-Method */ { struct dict_avp_data data = { 824, /* Code */ 10415, /* Vendor */ "SIP-Method", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* SIP-Request-Timestamp */ { struct dict_avp_data data = { 834, /* Code */ 10415, /* Vendor */ "SIP-Request-Timestamp", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* SIP-Request-Timestamp-Fraction */ { struct dict_avp_data data = { 2301, /* Code */ 10415, /* Vendor */ "SIP-Request-Timestamp-Fraction", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SIP-Response-Timestamp */ { struct dict_avp_data data = { 835, /* Code */ 10415, /* Vendor */ "SIP-Response-Timestamp", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* SIP-Response-Timestamp-Fraction */ { struct dict_avp_data data = { 2302, /* Code */ 10415, /* Vendor */ "SIP-Response-Timestamp-Fraction", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SM-Discharge-Time */ { struct dict_avp_data data = { 2012, /* Code */ 10415, /* Vendor */ "SM-Discharge-Time", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* SM-Message-Type */ { struct dict_avp_data data = { 2007, /* Code */ 10415, /* Vendor */ "SM-Message-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(SM-Message-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* SM-Protocol-ID */ { struct dict_avp_data data = { 2013, /* Code */ 10415, /* Vendor */ "SM-Protocol-ID", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SM-Service-Type */ { struct dict_avp_data data = { 2029, /* Code */ 10415, /* Vendor */ "SM-Service-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(SM-Service-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* SM-Status */ { struct dict_avp_data data = { 2014, /* Code */ 10415, /* Vendor */ "SM-Status", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SM-User-Data-Header */ { struct dict_avp_data data = { 2015, /* Code */ 10415, /* Vendor */ "SM-User-Data-Header", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SMS-Information */ { struct dict_avp_data data = { 2000, /* Code */ 10415, /* Vendor */ "SMS-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SMS-Node */ { struct dict_avp_data data = { 2016, /* Code */ 10415, /* Vendor */ "SMS-Node", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(SMS-Node)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* SMSC-Address */ { struct dict_avp_data data = { 2017, /* Code */ 10415, /* Vendor */ "SMSC-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* Scale-Factor */ { struct dict_avp_data data = { 2059, /* Code */ 10415, /* Vendor */ "Scale-Factor", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Served-Party-IP-Address */ { struct dict_avp_data data = { 848, /* Code */ 10415, /* Vendor */ "Served-Party-IP-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* Service-Data-Container */ { struct dict_avp_data data = { 2040, /* Code */ 10415, /* Vendor */ "Service-Data-Container", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Service-Id */ { struct dict_avp_data data = { 855, /* Code */ 10415, /* Vendor */ "Service-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Service-Information */ { struct dict_avp_data data = { 873, /* Code */ 10415, /* Vendor */ "Service-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Service-Mode */ { struct dict_avp_data data = { 2032, /* Code */ 10415, /* Vendor */ "Service-Mode", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Service-Specific-Data */ { struct dict_avp_data data = { 863, /* Code */ 10415, /* Vendor */ "Service-Specific-Data", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Service-Specific-Info */ { struct dict_avp_data data = { 1249, /* Code */ 10415, /* Vendor */ "Service-Specific-Info", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Service-Specific-Type */ { struct dict_avp_data data = { 1257, /* Code */ 10415, /* Vendor */ "Service-Specific-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Serving-Node-Type */ { struct dict_avp_data data = { 2047, /* Code */ 10415, /* Vendor */ "Serving-Node-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Serving-Node-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Session-Direction */ { struct dict_avp_data data = { 2707, /* Code */ 10415, /* Vendor */ "Session-Direction", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Session-Direction)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Start-Time */ { struct dict_avp_data data = { 2041, /* Code */ 10415, /* Vendor */ "Start-Time", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* Status */ { struct dict_avp_data data = { 2702, /* Code */ 10415, /* Vendor */ "Status", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Status)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Stop-Time */ { struct dict_avp_data data = { 2042, /* Code */ 10415, /* Vendor */ "Stop-Time", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* Submission-Time */ { struct dict_avp_data data = { 1202, /* Code */ 10415, /* Vendor */ "Submission-Time", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* Subscriber-Role */ { struct dict_avp_data data = { 2033, /* Code */ 10415, /* Vendor */ "Subscriber-Role", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Subscriber-Role)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Supplementary-Service */ { struct dict_avp_data data = { 2048, /* Code */ 10415, /* Vendor */ "Supplementary-Service", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Talk-Burst-Exchange */ { struct dict_avp_data data = { 1255, /* Code */ 10415, /* Vendor */ "Talk-Burst-Exchange", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Talk-Burst-Time */ { struct dict_avp_data data = { 1286, /* Code */ 10415, /* Vendor */ "Talk-Burst-Time", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Talk-Burst-Volume */ { struct dict_avp_data data = { 1287, /* Code */ 10415, /* Vendor */ "Talk-Burst-Volume", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Tariff-Information */ { struct dict_avp_data data = { 2060, /* Code */ 10415, /* Vendor */ "Tariff-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Tariff-XML */ { struct dict_avp_data data = { 2306, /* Code */ 10415, /* Vendor */ "Tariff-XML", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Terminating-IOI */ { struct dict_avp_data data = { 840, /* Code */ 10415, /* Vendor */ "Terminating-IOI", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Time-First-Usage */ { struct dict_avp_data data = { 2043, /* Code */ 10415, /* Vendor */ "Time-First-Usage", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* Time-Last-Usage */ { struct dict_avp_data data = { 2044, /* Code */ 10415, /* Vendor */ "Time-Last-Usage", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* Time-Quota-Mechanism */ { struct dict_avp_data data = { 1270, /* Code */ 10415, /* Vendor */ "Time-Quota-Mechanism", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Time-Quota-Threshold */ { struct dict_avp_data data = { 868, /* Code */ 10415, /* Vendor */ "Time-Quota-Threshold", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Time-Quota-Type */ { struct dict_avp_data data = { 1271, /* Code */ 10415, /* Vendor */ "Time-Quota-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Time-Quota-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Time-Stamps */ { struct dict_avp_data data = { 833, /* Code */ 10415, /* Vendor */ "Time-Stamps", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Time-Usage */ { struct dict_avp_data data = { 2045, /* Code */ 10415, /* Vendor */ "Time-Usage", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Token-Text */ { struct dict_avp_data data = { 1215, /* Code */ 10415, /* Vendor */ "Token-Text", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Traffic-Data-Volumes */ { struct dict_avp_data data = { 2046, /* Code */ 10415, /* Vendor */ "Traffic-Data-Volumes", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Transcoder-Inserted-Indication */ { struct dict_avp_data data = { 2605, /* Code */ 10415, /* Vendor */ "Transcoder-Inserted-Indication", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Transcoder-Inserted-Indication)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Transit-IOI-List */ { struct dict_avp_data data = { 2701, /* Code */ 10415, /* Vendor */ "Transit-IOI-List", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Trigger */ { struct dict_avp_data data = { 1264, /* Code */ 10415, /* Vendor */ "Trigger", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Trigger-Type */ { struct dict_avp_data data = { 870, /* Code */ 10415, /* Vendor */ "Trigger-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Trigger-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Trunk-Group-Id */ { struct dict_avp_data data = { 851, /* Code */ 10415, /* Vendor */ "Trunk-Group-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Type-Number */ { struct dict_avp_data data = { 1204, /* Code */ 10415, /* Vendor */ "Type-Number", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Type-Number)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Unit-Cost */ { struct dict_avp_data data = { 2061, /* Code */ 10415, /* Vendor */ "Unit-Cost", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Unit-Quota-Threshold */ { struct dict_avp_data data = { 1226, /* Code */ 10415, /* Vendor */ "Unit-Quota-Threshold", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* User-CSG-Information */ { struct dict_avp_data data = { 2319, /* Code */ 10415, /* Vendor */ "User-CSG-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* User-Participating-Type */ { struct dict_avp_data data = { 1279, /* Code */ 10415, /* Vendor */ "User-Participating-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(User-Participating-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* User-Session-Id */ { struct dict_avp_data data = { 830, /* Code */ 10415, /* Vendor */ "User-Session-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Volume-Quota-Threshold */ { struct dict_avp_data data = { 869, /* Code */ 10415, /* Vendor */ "Volume-Quota-Threshold", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* WAG-Address */ { struct dict_avp_data data = { 890, /* Code */ 10415, /* Vendor */ "WAG-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* WAG-PLMN-Id */ { struct dict_avp_data data = { 891, /* Code */ 10415, /* Vendor */ "WAG-PLMN-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* WLAN-Information */ { struct dict_avp_data data = { 875, /* Code */ 10415, /* Vendor */ "WLAN-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* WLAN-Radio-Container */ { struct dict_avp_data data = { 892, /* Code */ 10415, /* Vendor */ "WLAN-Radio-Container", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* WLAN-Session-Id */ { struct dict_avp_data data = { 1246, /* Code */ 10415, /* Vendor */ "WLAN-Session-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* WLAN-Technology */ { struct dict_avp_data data = { 893, /* Code */ 10415, /* Vendor */ "WLAN-Technology", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* WLAN-UE-Local-IPAddress */ { struct dict_avp_data data = { 894, /* Code */ 10415, /* Vendor */ "WLAN-UE-Local-IPAddress", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* 3GPP 29.272-c00 (12.0.0 2013.03.13) */ /* Subscription-Data */ { struct dict_avp_data data = { 1400, /* Code */ 10415, /* Vendor */ "Subscription-Data", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Terminal-Information */ { struct dict_avp_data data = { 1401, /* Code */ 10415, /* Vendor */ "Terminal-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* IMEI */ { struct dict_avp_data data = { 1402, /* Code */ 10415, /* Vendor */ "IMEI", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Software-Version */ { struct dict_avp_data data = { 1403, /* Code */ 10415, /* Vendor */ "Software-Version", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* QoS-Subscribed */ { struct dict_avp_data data = { 1404, /* Code */ 10415, /* Vendor */ "QoS-Subscribed", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* ULR-Flags */ { struct dict_avp_data data = { 1405, /* Code */ 10415, /* Vendor */ "ULR-Flags", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* ULA-Flags */ { struct dict_avp_data data = { 1406, /* Code */ 10415, /* Vendor */ "ULA-Flags", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Visited-PLMN-Id */ { struct dict_avp_data data = { 1407, /* Code */ 10415, /* Vendor */ "Visited-PLMN-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Requested-EUTRAN-Authentication-Info */ { struct dict_avp_data data = { 1408, /* Code */ 10415, /* Vendor */ "Requested-EUTRAN-Authentication-Info", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Requested-UTRAN-GERAN-Authentication-Info */ { struct dict_avp_data data = { 1409, /* Code */ 10415, /* Vendor */ "Requested-UTRAN-GERAN-Authentication-Info", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Number-Of-Requested-Vectors */ { struct dict_avp_data data = { 1410, /* Code */ 10415, /* Vendor */ "Number-Of-Requested-Vectors", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Re-Synchronization-Info */ { struct dict_avp_data data = { 1411, /* Code */ 10415, /* Vendor */ "Re-Synchronization-Info", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Immediate-Response-Preferred */ { struct dict_avp_data data = { 1412, /* Code */ 10415, /* Vendor */ "Immediate-Response-Preferred", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Authentication-Info */ { struct dict_avp_data data = { 1413, /* Code */ 10415, /* Vendor */ "Authentication-Info", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* E-UTRAN-Vector */ { struct dict_avp_data data = { 1414, /* Code */ 10415, /* Vendor */ "E-UTRAN-Vector", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* UTRAN-Vector */ { struct dict_avp_data data = { 1415, /* Code */ 10415, /* Vendor */ "UTRAN-Vector", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* GERAN-Vector */ { struct dict_avp_data data = { 1416, /* Code */ 10415, /* Vendor */ "GERAN-Vector", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Network-Access-Mode */ { struct dict_avp_data data = { 1417, /* Code */ 10415, /* Vendor */ "Network-Access-Mode", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Network-Access-Mode)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* HPLMN-ODB */ { struct dict_avp_data data = { 1418, /* Code */ 10415, /* Vendor */ "HPLMN-ODB", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Item-Number */ { struct dict_avp_data data = { 1419, /* Code */ 10415, /* Vendor */ "Item-Number", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Cancellation-Type */ { struct dict_avp_data data = { 1420, /* Code */ 10415, /* Vendor */ "Cancellation-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Cancellation-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* DSR-Flags */ { struct dict_avp_data data = { 1421, /* Code */ 10415, /* Vendor */ "DSR-Flags", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* DSA-Flags */ { struct dict_avp_data data = { 1422, /* Code */ 10415, /* Vendor */ "DSA-Flags", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Context-Identifier */ { struct dict_avp_data data = { 1423, /* Code */ 10415, /* Vendor */ "Context-Identifier", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Subscriber-Status */ { struct dict_avp_data data = { 1424, /* Code */ 10415, /* Vendor */ "Subscriber-Status", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Subscriber-Status)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Operator-Determined-Barring */ { struct dict_avp_data data = { 1425, /* Code */ 10415, /* Vendor */ "Operator-Determined-Barring", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Access-Restriction-Data */ { struct dict_avp_data data = { 1426, /* Code */ 10415, /* Vendor */ "Access-Restriction-Data", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* APN-OI-Replacement */ { struct dict_avp_data data = { 1427, /* Code */ 10415, /* Vendor */ "APN-OI-Replacement", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* All-APN-Configurations-Included-Indicator */ { struct dict_avp_data data = { 1428, /* Code */ 10415, /* Vendor */ "All-APN-Configurations-Included-Indicator", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(All-APN-Configurations-Included-Indicator)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* APN-Configuration-Profile */ { struct dict_avp_data data = { 1429, /* Code */ 10415, /* Vendor */ "APN-Configuration-Profile", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* APN-Configuration */ { struct dict_avp_data data = { 1430, /* Code */ 10415, /* Vendor */ "APN-Configuration", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* EPS-Subscribed-QoS-Profile */ { struct dict_avp_data data = { 1431, /* Code */ 10415, /* Vendor */ "EPS-Subscribed-QoS-Profile", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* VPLMN-Dynamic-Address-Allowed */ { struct dict_avp_data data = { 1432, /* Code */ 10415, /* Vendor */ "VPLMN-Dynamic-Address-Allowed", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(VPLMN-Dynamic-Address-Allowed)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* STN-SR */ { struct dict_avp_data data = { 1433, /* Code */ 10415, /* Vendor */ "STN-SR", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Alert-Reason */ { struct dict_avp_data data = { 1434, /* Code */ 10415, /* Vendor */ "Alert-Reason", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Alert-Reason)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* AMBR */ { struct dict_avp_data data = { 1435, /* Code */ 10415, /* Vendor */ "AMBR", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* CSG-Subscription-Data */ { struct dict_avp_data data = { 1436, /* Code */ 10415, /* Vendor */ "CSG-Subscription-Data", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* CSG-Id */ { struct dict_avp_data data = { 1437, /* Code */ 10415, /* Vendor */ "CSG-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* PDN-GW-Allocation-Type */ { struct dict_avp_data data = { 1438, /* Code */ 10415, /* Vendor */ "PDN-GW-Allocation-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(PDN-GW-Allocation-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Expiration-Date */ { struct dict_avp_data data = { 1439, /* Code */ 10415, /* Vendor */ "Expiration-Date", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* RAT-Frequency-Selection-Priority-ID */ { struct dict_avp_data data = { 1440, /* Code */ 10415, /* Vendor */ "RAT-Frequency-Selection-Priority-ID", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* IDA-Flags */ { struct dict_avp_data data = { 1441, /* Code */ 10415, /* Vendor */ "IDA-Flags", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* PUA-Flags */ { struct dict_avp_data data = { 1442, /* Code */ 10415, /* Vendor */ "PUA-Flags", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* NOR-Flags */ { struct dict_avp_data data = { 1443, /* Code */ 10415, /* Vendor */ "NOR-Flags", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* User-Id */ { struct dict_avp_data data = { 1444, /* Code */ 10415, /* Vendor */ "User-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Equipment-Status */ { struct dict_avp_data data = { 1445, /* Code */ 10415, /* Vendor */ "Equipment-Status", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Equipment-Status)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Regional-Subscription-Zone-Code */ { struct dict_avp_data data = { 1446, /* Code */ 10415, /* Vendor */ "Regional-Subscription-Zone-Code", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* RAND */ { struct dict_avp_data data = { 1447, /* Code */ 10415, /* Vendor */ "RAND", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* XRES */ { struct dict_avp_data data = { 1448, /* Code */ 10415, /* Vendor */ "XRES", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* AUTN */ { struct dict_avp_data data = { 1449, /* Code */ 10415, /* Vendor */ "AUTN", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* KASME */ { struct dict_avp_data data = { 1450, /* Code */ 10415, /* Vendor */ "KASME", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Trace-Collection-Entity */ { struct dict_avp_data data = { 1452, /* Code */ 10415, /* Vendor */ "Trace-Collection-Entity", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* Kc */ { struct dict_avp_data data = { 1453, /* Code */ 10415, /* Vendor */ "Kc", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SRES */ { struct dict_avp_data data = { 1454, /* Code */ 10415, /* Vendor */ "SRES", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* PDN-Type */ { struct dict_avp_data data = { 1456, /* Code */ 10415, /* Vendor */ "PDN-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(PDN-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Roaming-Restricted-Due-To-Unsupported-Feature */ { struct dict_avp_data data = { 1457, /* Code */ 10415, /* Vendor */ "Roaming-Restricted-Due-To-Unsupported-Feature", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Roaming-Restricted-Due-To-Unsupported-Feature)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Trace-Data */ { struct dict_avp_data data = { 1458, /* Code */ 10415, /* Vendor */ "Trace-Data", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Trace-Reference */ { struct dict_avp_data data = { 1459, /* Code */ 10415, /* Vendor */ "Trace-Reference", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Trace-Depth */ { struct dict_avp_data data = { 1462, /* Code */ 10415, /* Vendor */ "Trace-Depth", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Trace-Depth)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Trace-NE-Type-List */ { struct dict_avp_data data = { 1463, /* Code */ 10415, /* Vendor */ "Trace-NE-Type-List", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Trace-Interface-List */ { struct dict_avp_data data = { 1464, /* Code */ 10415, /* Vendor */ "Trace-Interface-List", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Trace-Event-List */ { struct dict_avp_data data = { 1465, /* Code */ 10415, /* Vendor */ "Trace-Event-List", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* OMC-Id */ { struct dict_avp_data data = { 1466, /* Code */ 10415, /* Vendor */ "OMC-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* GPRS-Subscription-Data */ { struct dict_avp_data data = { 1467, /* Code */ 10415, /* Vendor */ "GPRS-Subscription-Data", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Complete-Data-List-Included-Indicator */ { struct dict_avp_data data = { 1468, /* Code */ 10415, /* Vendor */ "Complete-Data-List-Included-Indicator", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Complete-Data-List-Included-Indicator)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* PDP-Context */ { struct dict_avp_data data = { 1469, /* Code */ 10415, /* Vendor */ "PDP-Context", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* PDP-Type */ { struct dict_avp_data data = { 1470, /* Code */ 10415, /* Vendor */ "PDP-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* 3GPP2-MEID */ { struct dict_avp_data data = { 1471, /* Code */ 10415, /* Vendor */ "3GPP2-MEID", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Specific-APN-Info */ { struct dict_avp_data data = { 1472, /* Code */ 10415, /* Vendor */ "Specific-APN-Info", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* LCS-Info */ { struct dict_avp_data data = { 1473, /* Code */ 10415, /* Vendor */ "LCS-Info", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* GMLC-Number */ { struct dict_avp_data data = { 1474, /* Code */ 10415, /* Vendor */ "GMLC-Number", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* LCS-PrivacyException */ { struct dict_avp_data data = { 1475, /* Code */ 10415, /* Vendor */ "LCS-PrivacyException", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SS-Code */ { struct dict_avp_data data = { 1476, /* Code */ 10415, /* Vendor */ "SS-Code", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SS-Status */ { struct dict_avp_data data = { 1477, /* Code */ 10415, /* Vendor */ "SS-Status", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Notification-To-UE-User */ { struct dict_avp_data data = { 1478, /* Code */ 10415, /* Vendor */ "Notification-To-UE-User", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Notification-To-UE-User)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* External-Client */ { struct dict_avp_data data = { 1479, /* Code */ 10415, /* Vendor */ "External-Client", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Client-Identity */ { struct dict_avp_data data = { 1480, /* Code */ 10415, /* Vendor */ "Client-Identity", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* GMLC-Restriction */ { struct dict_avp_data data = { 1481, /* Code */ 10415, /* Vendor */ "GMLC-Restriction", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(GMLC-Restriction)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* PLMN-Client */ { struct dict_avp_data data = { 1482, /* Code */ 10415, /* Vendor */ "PLMN-Client", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(PLMN-Client)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Service-Type */ { struct dict_avp_data data = { 1483, /* Code */ 10415, /* Vendor */ "Service-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* ServiceTypeIdentity */ { struct dict_avp_data data = { 1484, /* Code */ 10415, /* Vendor */ "ServiceTypeIdentity", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* MO-LR */ { struct dict_avp_data data = { 1485, /* Code */ 10415, /* Vendor */ "MO-LR", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Teleservice-List */ { struct dict_avp_data data = { 1486, /* Code */ 10415, /* Vendor */ "Teleservice-List", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* TS-Code */ { struct dict_avp_data data = { 1487, /* Code */ 10415, /* Vendor */ "TS-Code", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Call-Barring-Infor-List */ { struct dict_avp_data data = { 1488, /* Code */ 10415, /* Vendor */ "Call-Barring-Infor-List", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SGSN-Number */ { struct dict_avp_data data = { 1489, /* Code */ 10415, /* Vendor */ "SGSN-Number", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* IDR-Flags */ { struct dict_avp_data data = { 1490, /* Code */ 10415, /* Vendor */ "IDR-Flags", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* ICS-Indicator */ { struct dict_avp_data data = { 1491, /* Code */ 10415, /* Vendor */ "ICS-Indicator", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(ICS-Indicator)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* IMS-Voice-Over-PS-Sessions-Supported */ { struct dict_avp_data data = { 1492, /* Code */ 10415, /* Vendor */ "IMS-Voice-Over-PS-Sessions-Supported", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(IMS-Voice-Over-PS-Sessions-Supported)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Homogeneous-Support-of-IMS-Voice-Over-PS-Sessions */ { struct dict_avp_data data = { 1493, /* Code */ 10415, /* Vendor */ "Homogeneous-Support-of-IMS-Voice-Over-PS-Sessions", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Homogeneous-Support-of-IMS-Voice-Over-PS-Sessions)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Last-UE-Activity-Time */ { struct dict_avp_data data = { 1494, /* Code */ 10415, /* Vendor */ "Last-UE-Activity-Time", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* EPS-User-State */ { struct dict_avp_data data = { 1495, /* Code */ 10415, /* Vendor */ "EPS-User-State", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* EPS-Location-Information */ { struct dict_avp_data data = { 1496, /* Code */ 10415, /* Vendor */ "EPS-Location-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* MME-User-State */ { struct dict_avp_data data = { 1497, /* Code */ 10415, /* Vendor */ "MME-User-State", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SGSN-User-State */ { struct dict_avp_data data = { 1498, /* Code */ 10415, /* Vendor */ "SGSN-User-State", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* User-State */ { struct dict_avp_data data = { 1499, /* Code */ 10415, /* Vendor */ "User-State", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(User-State)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* MME-LocationInformation */ { struct dict_avp_data data = { 1600, /* Code */ 10415, /* Vendor */ "MME-LocationInformation", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SGSN-Location-Information */ { struct dict_avp_data data = { 1601, /* Code */ 10415, /* Vendor */ "SGSN-Location-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* E-UTRAN-Cell-Global-Identity */ { struct dict_avp_data data = { 1602, /* Code */ 10415, /* Vendor */ "E-UTRAN-Cell-Global-Identity", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Tracking-Area-Identity */ { struct dict_avp_data data = { 1603, /* Code */ 10415, /* Vendor */ "Tracking-Area-Identity", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Cell-Global-Identity */ { struct dict_avp_data data = { 1604, /* Code */ 10415, /* Vendor */ "Cell-Global-Identity", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Routing-Area-Identity */ { struct dict_avp_data data = { 1605, /* Code */ 10415, /* Vendor */ "Routing-Area-Identity", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Location-Area-Identity */ { struct dict_avp_data data = { 1606, /* Code */ 10415, /* Vendor */ "Location-Area-Identity", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Service-Area-Identity */ { struct dict_avp_data data = { 1607, /* Code */ 10415, /* Vendor */ "Service-Area-Identity", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Geographical-Information */ { struct dict_avp_data data = { 1608, /* Code */ 10415, /* Vendor */ "Geographical-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Geodetic-Information */ { struct dict_avp_data data = { 1609, /* Code */ 10415, /* Vendor */ "Geodetic-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Current-Location-Retrieved */ { struct dict_avp_data data = { 1610, /* Code */ 10415, /* Vendor */ "Current-Location-Retrieved", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Current-Location-Retrieved)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Age-Of-Location-Information */ { struct dict_avp_data data = { 1611, /* Code */ 10415, /* Vendor */ "Age-Of-Location-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Active-APN */ { struct dict_avp_data data = { 1612, /* Code */ 10415, /* Vendor */ "Active-APN", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Error-Diagnostic */ { struct dict_avp_data data = { 1614, /* Code */ 10415, /* Vendor */ "Error-Diagnostic", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Error-Diagnostic)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Ext-PDP-Address */ { struct dict_avp_data data = { 1621, /* Code */ 10415, /* Vendor */ "Ext-PDP-Address", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Address_type, NULL); }; /* UE-SRVCC-Capability */ { struct dict_avp_data data = { 1615, /* Code */ 10415, /* Vendor */ "UE-SRVCC-Capability", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(UE-SRVCC-Capability)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* MPS-Priority */ { struct dict_avp_data data = { 1616, /* Code */ 10415, /* Vendor */ "MPS-Priority", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* VPLMN-LIPA-Allowed */ { struct dict_avp_data data = { 1617, /* Code */ 10415, /* Vendor */ "VPLMN-LIPA-Allowed", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(VPLMN-LIPA-Allowed)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* LIPA-Permission */ { struct dict_avp_data data = { 1618, /* Code */ 10415, /* Vendor */ "LIPA-Permission", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(LIPA-Permission)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Subscribed-Periodic-RAU-TAU-Timer */ { struct dict_avp_data data = { 1619, /* Code */ 10415, /* Vendor */ "Subscribed-Periodic-RAU-TAU-Timer", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Ext-PDP-Type */ { struct dict_avp_data data = { 1620, /* Code */ 10415, /* Vendor */ "Ext-PDP-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SIPTO-Permission */ { struct dict_avp_data data = { 1613, /* Code */ 10415, /* Vendor */ "SIPTO-Permission", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(SIPTO-Permission)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* MDT-Configuration */ { struct dict_avp_data data = { 1622, /* Code */ 10415, /* Vendor */ "MDT-Configuration", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Job-Type */ { struct dict_avp_data data = { 1623, /* Code */ 10415, /* Vendor */ "Job-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Job-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Area-Scope */ { struct dict_avp_data data = { 1624, /* Code */ 10415, /* Vendor */ "Area-Scope", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* List-Of-Measurements */ { struct dict_avp_data data = { 1625, /* Code */ 10415, /* Vendor */ "List-Of-Measurements", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Reporting-Trigger */ { struct dict_avp_data data = { 1626, /* Code */ 10415, /* Vendor */ "Reporting-Trigger", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Report-Interval */ { struct dict_avp_data data = { 1627, /* Code */ 10415, /* Vendor */ "Report-Interval", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Report-Interval)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Report-Amount */ { struct dict_avp_data data = { 1628, /* Code */ 10415, /* Vendor */ "Report-Amount", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Report-Amount)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Event-Threshold-RSRP */ { struct dict_avp_data data = { 1629, /* Code */ 10415, /* Vendor */ "Event-Threshold-RSRP", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Event-Threshold-RSRQ */ { struct dict_avp_data data = { 1630, /* Code */ 10415, /* Vendor */ "Event-Threshold-RSRQ", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Logging-Interval */ { struct dict_avp_data data = { 1631, /* Code */ 10415, /* Vendor */ "Logging-Interval", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Logging-Interval)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Logging-Duration */ { struct dict_avp_data data = { 1632, /* Code */ 10415, /* Vendor */ "Logging-Duration", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Logging-Duration)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Relay-Node-Indicator */ { struct dict_avp_data data = { 1633, /* Code */ 10415, /* Vendor */ "Relay-Node-Indicator", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Relay-Node-Indicator)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* MDT-User-Consent */ { struct dict_avp_data data = { 1634, /* Code */ 10415, /* Vendor */ "MDT-User-Consent", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(MDT-User-Consent)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* PUR-Flags */ { struct dict_avp_data data = { 1635, /* Code */ 10415, /* Vendor */ "PUR-Flags", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Subscribed-VSRVCC */ { struct dict_avp_data data = { 1636, /* Code */ 10415, /* Vendor */ "Subscribed-VSRVCC", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Subscribed-VSRVCC)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Equivalent-PLMN-List */ { struct dict_avp_data data = { 1637, /* Code */ 10415, /* Vendor */ "Equivalent-PLMN-List", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* CLR-Flags */ { struct dict_avp_data data = { 1638, /* Code */ 10415, /* Vendor */ "CLR-Flags", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* UVR-Flags */ { struct dict_avp_data data = { 1639, /* Code */ 10415, /* Vendor */ "UVR-Flags", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* UVA-Flags */ { struct dict_avp_data data = { 1640, /* Code */ 10415, /* Vendor */ "UVA-Flags", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* VPLMN-CSG-Subscription-Data */ { struct dict_avp_data data = { 1641, /* Code */ 10415, /* Vendor */ "VPLMN-CSG-Subscription-Data", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Time-Zone */ { struct dict_avp_data data = { 1642, /* Code */ 10415, /* Vendor */ "Time-Zone", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* A-MSISDN */ { struct dict_avp_data data = { 1643, /* Code */ 10415, /* Vendor */ "A-MSISDN", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* MME-Number-for-MT-SMS */ { struct dict_avp_data data = { 1645, /* Code */ 10415, /* Vendor */ "MME-Number-for-MT-SMS", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SMS-Register-Request */ { struct dict_avp_data data = { 1648, /* Code */ 10415, /* Vendor */ "SMS-Register-Request", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(SMS-Register-Request)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Local-Time-Zone */ { struct dict_avp_data data = { 1649, /* Code */ 10415, /* Vendor */ "Local-Time-Zone", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Daylight-Saving-Time */ { struct dict_avp_data data = { 1650, /* Code */ 10415, /* Vendor */ "Daylight-Saving-Time", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Daylight-Saving-Time)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Subscription-Data-Flags */ { struct dict_avp_data data = { 1654, /* Code */ 10415, /* Vendor */ "Subscription-Data-Flags", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Measurement-Period-UMTS */ { struct dict_avp_data data = { 1655, /* Code */ 10415, /* Vendor */ "Measurement-Period-UMTS", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Measurement-Period-UMTS)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Measurement-Period-LTE */ { struct dict_avp_data data = { 1656, /* Code */ 10415, /* Vendor */ "Measurement-Period-LTE", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Measurement-Period-LTE)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Collection-Period-RRM-LTE */ { struct dict_avp_data data = { 1657, /* Code */ 10415, /* Vendor */ "Collection-Period-RRM-LTE", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Collection-Period-RRM-LTE)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Collection-Period-RRM-UMTS */ { struct dict_avp_data data = { 1658, /* Code */ 10415, /* Vendor */ "Collection-Period-RRM-UMTS", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Collection-Period-RRM-UMTS)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Positioning-Method */ { struct dict_avp_data data = { 1659, /* Code */ 10415, /* Vendor */ "Positioning-Method", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Measurement-Quantity */ { struct dict_avp_data data = { 1660, /* Code */ 10415, /* Vendor */ "Measurement-Quantity", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Event-Threshold-Event-1F */ { struct dict_avp_data data = { 1661, /* Code */ 10415, /* Vendor */ "Event-Threshold-Event-1F", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Event-Threshold-Event-1I */ { struct dict_avp_data data = { 1662, /* Code */ 10415, /* Vendor */ "Event-Threshold-Event-1I", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* 3GPP 29.329-b50 (11.5.0 2012.12.21) */ /* User-Identity */ { struct dict_avp_data data = { 700, /* Code */ 10415, /* Vendor */ "User-Identity", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* MSISDN */ { struct dict_avp_data data = { 701, /* Code */ 10415, /* Vendor */ "MSISDN", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Name conflict with 29.229 User-Data (606), renamed */ /* User-Data-29.329 */ { struct dict_avp_data data = { 702, /* Code */ 10415, /* Vendor */ "User-Data-29.329", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Data-Reference */ { struct dict_avp_data data = { 703, /* Code */ 10415, /* Vendor */ "Data-Reference", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Data-Reference)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Service-Indication */ { struct dict_avp_data data = { 704, /* Code */ 10415, /* Vendor */ "Service-Indication", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Subs-Req-Type */ { struct dict_avp_data data = { 705, /* Code */ 10415, /* Vendor */ "Subs-Req-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Subs-Req-Type)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Requested-Domain */ { struct dict_avp_data data = { 706, /* Code */ 10415, /* Vendor */ "Requested-Domain", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Requested-Domain)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Current-Location */ { struct dict_avp_data data = { 707, /* Code */ 10415, /* Vendor */ "Current-Location", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Current-Location)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Identity-Set */ { struct dict_avp_data data = { 708, /* Code */ 10415, /* Vendor */ "Identity-Set", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Identity-Set)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Expiry-Time */ { struct dict_avp_data data = { 709, /* Code */ 10415, /* Vendor */ "Expiry-Time", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* Send-Data-Indication */ { struct dict_avp_data data = { 710, /* Code */ 10415, /* Vendor */ "Send-Data-Indication", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Send-Data-Indication)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* in 29.229 */ /* Server-Name */ /* Supported-Features */ /* Feature-List-ID */ /* Feature-List */ /* Supported-Applications */ /* Public-Identity */ /* DSAI-Tag */ { struct dict_avp_data data = { 711, /* Code */ 10415, /* Vendor */ "DSAI-Tag", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* in 29.229 */ /* Wildcarded-Public-Identity */ /* Wildcarded-IMPU */ { struct dict_avp_data data = { 636, /* Code */ 10415, /* Vendor */ "Wildcarded-IMPU", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* in 29.229 */ /* Session-Priority */ /* One-Time-Notification */ { struct dict_avp_data data = { 712, /* Code */ 10415, /* Vendor */ "One-Time-Notification", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(One-Time-Notification)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Requested-Nodes */ { struct dict_avp_data data = { 713, /* Code */ 10415, /* Vendor */ "Requested-Nodes", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Serving-Node-Indication */ { struct dict_avp_data data = { 714, /* Code */ 10415, /* Vendor */ "Serving-Node-Indication", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "3GPP/Enumerated(Serving-Node-Indication)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* Repository-Data-ID */ { struct dict_avp_data data = { 715, /* Code */ 10415, /* Vendor */ "Repository-Data-ID", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Sequence-Number */ { struct dict_avp_data data = { 716, /* Code */ 10415, /* Vendor */ "Sequence-Number", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* UDR-Flags */ { struct dict_avp_data data = { 719, /* Code */ 10415, /* Vendor */ "UDR-Flags", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* OMA DDS Charging_Data V1.0 20110201-A */ /* Application-Server-Id */ { struct dict_avp_data data = { 2101, /* Code */ 10415, /* Vendor */ "Application-Server-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Application-Service-Type */ { struct dict_avp_data data = { 2102, /* Code */ 10415, /* Vendor */ "Application-Service-Type", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Application-Session-Id */ { struct dict_avp_data data = { 2103, /* Code */ 10415, /* Vendor */ "Application-Session-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Content-ID */ { struct dict_avp_data data = { 2116, /* Code */ 10415, /* Vendor */ "Content-ID", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Content-provider-ID */ { struct dict_avp_data data = { 2117, /* Code */ 10415, /* Vendor */ "Content-provider-ID", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* DCD-Information */ { struct dict_avp_data data = { 2115, /* Code */ 10415, /* Vendor */ "DCD-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Delivery-Status */ { struct dict_avp_data data = { 2104, /* Code */ 10415, /* Vendor */ "Delivery-Status", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* IM-Information */ { struct dict_avp_data data = { 2110, /* Code */ 10415, /* Vendor */ "IM-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Number-Of-Messages-Successfully-Exploded */ { struct dict_avp_data data = { 2111, /* Code */ 10415, /* Vendor */ "Number-Of-Messages-Successfully-Exploded", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Number-Of-Messages-Successfully-Sent */ { struct dict_avp_data data = { 2112, /* Code */ 10415, /* Vendor */ "Number-Of-Messages-Successfully-Sent", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Service-Generic-Information */ { struct dict_avp_data data = { 1256, /* Code */ 10415, /* Vendor */ "Service-Generic-Information", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Total-Number-Of-Messages-Exploded */ { struct dict_avp_data data = { 2113, /* Code */ 10415, /* Vendor */ "Total-Number-Of-Messages-Exploded", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Total-Number-Of-Messages-Sent */ { struct dict_avp_data data = { 2114, /* Code */ 10415, /* Vendor */ "Total-Number-Of-Messages-Sent", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /*****************************************************/ /* end of generated data, rules below added manually */ /*****************************************************/ /* 3GPP2-BSID */ { struct dict_avp_data data = { 9010, /* Code */ 5535, /* Vendor */ "3GPP2-BSID", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ /* XXX: guessed */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* 29.212 */ { struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 10415; vpa.avp_name = "Allocation-Retention-Priority"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Priority-Level" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Pre-emption-Capability" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Pre-emption-Vulnerability" }, RULE_OPTIONAL, -1, 1 }, }; PARSE_loc_rules(rules, rule_avp); } { struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 10415; vpa.avp_name = "QoS-Information"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "QoS-Class-Identifier" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Max-Requested-Bandwidth-UL" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Max-Requested-Bandwidth-DL" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Guaranteed-Bitrate-UL" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Guaranteed-Bitrate-DL" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Bearer-Identifier" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Allocation-Retention-Priority" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "APN-Aggregate-Max-Bitrate-UL" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "APN-Aggregate-Max-Bitrate-DL" }, RULE_OPTIONAL, -1, 1 }, }; PARSE_loc_rules(rules, rule_avp); } /* 32.299 */ { /* additional allowed AVPs */ struct dict_object *ccr; CHECK_dict_search(DICT_COMMAND, CMD_BY_NAME, "Credit-Control-Request", &ccr); struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "AoC-Request-Type"}, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Service-Information"}, RULE_OPTIONAL, -1, 1 }, }; PARSE_loc_rules(rules, ccr); } { /* additional allowed AVPs */ struct dict_object *ccr; CHECK_dict_search(DICT_COMMAND, CMD_BY_NAME, "Credit-Control-Answer", &ccr); struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Low-Balance-Indication"}, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Remaining-Balance"}, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Service-Information"}, RULE_OPTIONAL, -1, 1 }, }; PARSE_loc_rules(rules, ccr); } { struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 10415; vpa.avp_name = "Application-Server-Information"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Application-Server" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Application-provided-Called-Party-Address" }, RULE_OPTIONAL, -1, -1 }, }; PARSE_loc_rules(rules, rule_avp); } { struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 10415; vpa.avp_name = "Envelope"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Envelope-Start-Time" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Envelope-End-Time" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 0, .avp_name = "CC-Total-Octets" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 0, .avp_name = "CC-Input-Octets" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 0, .avp_name = "CC-Output-Octets" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 0, .avp_name = "CC-Service-Specific-Units" }, RULE_OPTIONAL, -1, 1 }, }; PARSE_loc_rules(rules, rule_avp); } { struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 10415; vpa.avp_name = "Event-Type"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "SIP-Method" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Event" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Expires" }, RULE_OPTIONAL, -1, 1 }, }; PARSE_loc_rules(rules, rule_avp); } { struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 10415; vpa.avp_name = "IMS-Information"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Event-Type" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Role-Of-Node" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Node-Functionality" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "User-Session-Id" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Outgoing-Session-Id" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Session-Priority" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Calling-Party-Address" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Called-Party-Address" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Called-Asserted-Identity" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Number-Portability-Routing-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Carrier-Select-Routing-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Alternate-Charged-Party-Address" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Requested-Party-Address" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Associated-URI" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Time-Stamps" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Application-Server-Information" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Inter-Operator-Identifier" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Transit-IOI-List" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "IMS-Charging-Identifier" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SDP-Session-Description" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "SDP-Media-Component" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Served-Party-IP-Address" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Server-Capabilities" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Trunk-Group-Id" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Bearer-Service" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Service-Id" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Service-Specific-Info" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Message-Body" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Cause-Code" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Access-Network-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Early-Media-Description" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "IMS-Communication-Service-Identifier" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "IMS-Application-Reference-Identifier" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Online-Charging-Flag" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Real-Time-Tariff-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Account-Expiration" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Initial-IMS-Charging-Identifier" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "NNI-Information" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "From-Address" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "IMS-Emergency-Indicator" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Access-Transfer-Information" }, RULE_OPTIONAL, -1, -1 }, }; PARSE_loc_rules(rules, rule_avp); } { struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 10415; vpa.avp_name = "MMS-Information"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Originator-Address" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Recipient-Address" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Submission-Time" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "MM-Content-Type" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Priority" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Message-ID" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Message-Type" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Message-Size" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Message-Class" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Delivery-Report-Requested" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Read-Reply-Report-Requested" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "MMBox-Storage-Requested" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Applic-ID" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Reply-Applic-ID" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Aux-Applic-Info" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Content-Class" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "DRM-Content" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Adaptations" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "VASP-ID" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "VAS-ID" }, RULE_OPTIONAL, -1, 1 }, }; PARSE_loc_rules(rules, rule_avp); } { /* Multiple-Services-Credit-Control */ /* additional allowed AVPs */ struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 0; vpa.avp_name = "Multiple-Services-Credit-Control"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Time-Quota-Threshold" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Volume-Quota-Threshold" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Unit-Quota-Threshold" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Quota-Holding-Time" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Quota-Consumption-Time" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Reporting-Reason" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Trigger" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "PS-Furnish-Charging-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Refund-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "AF-Correlation-Information" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Envelope" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Envelope-Reporting" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Time-Quota-Mechanism" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Service-Specific-Info" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "QoS-Information" }, RULE_OPTIONAL, -1, 1 }, }; PARSE_loc_rules(rules, rule_avp); } { /* Used-Service-Unit */ /* additional allowed AVPs */ struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 0; vpa.avp_name = "Used-Service-Unit"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Reporting-Reason" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Event-Charging-TimeStamp" }, RULE_OPTIONAL, -1, -1 }, }; PARSE_loc_rules(rules, rule_avp); } { struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 10415; vpa.avp_name = "Offline-Charging"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Quota-Consumption-Time" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Time-Quota-Mechanism" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Envelope-Reporting" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 0, .avp_name = "Multiple-Services-Credit-Control" }, RULE_OPTIONAL, -1, -1 }, }; PARSE_loc_rules(rules, rule_avp); } { struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 10415; vpa.avp_name = "Originator-Address"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Address-Type" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Address-Data" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Address-Domain" }, RULE_OPTIONAL, -1, 1 }, }; PARSE_loc_rules(rules, rule_avp); } { struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 10415; vpa.avp_name = "PS-Furnish-Charging-Information"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "3GPP-Charging-Id" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "PS-Free-Format-Data" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "PS-Append-Free-Format-Data" }, RULE_OPTIONAL, -1, 1 }, }; PARSE_loc_rules(rules, rule_avp); } { struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 10415; vpa.avp_name = "PS-Information"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "3GPP-Charging-Id" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "PDN-Connection-Charging-ID" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Node-Id" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP-PDP-Type" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "PDP-Address" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "PDP-Address-Prefix-Length" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Dynamic-Address-Flag" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Dynamic-Address-Flag-Extension" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "QoS-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SGSN-Address" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "GGSN-Address" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "SGW-Address" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "CG-Address" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Serving-Node-Type" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SGW-Change" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP-IMSI-MCC-MNC" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "IMSI-Unauthenticated-Flag" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP-GGSN-MCC-MNC" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP-NSAPI" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 0, .avp_name = "Called-Station-Id" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP-Session-Stop-Indicator" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP-Selection-Mode" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP-Charging-Characteristics" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Charging-Characteristics-Selection-Mode" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP-SGSN-MCC-MNC" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP-MS-TimeZone" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Charging-Rule-Base-Name" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP-User-Location-Info" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "User-CSG-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 5535, .avp_name = "3GPP2-BSID" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP-RAT-Type" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "PS-Furnish-Charging-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "PDP-Context-Type" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Offline-Charging" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Traffic-Data-Volumes" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Service-Data-Container" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 0, .avp_name = "User-Equipment-Info" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Terminal-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Start-Time" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Stop-Time" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Change-Condition" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Diagnostics" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Low-Priority-Indicator" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "MME-Number-for-MT-SMS" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "MME-Name" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "MME-Realm" }, RULE_OPTIONAL, -1, 1 }, }; PARSE_loc_rules(rules, rule_avp); } { struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 10415; vpa.avp_name = "Recipient-Address"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Address-Type" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Address-Data" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Address-Domain" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Addressee-Type" }, RULE_OPTIONAL, -1, 1 }, }; PARSE_loc_rules(rules, rule_avp); } { struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 10415; vpa.avp_name = "SDP-Media-Component"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "SDP-Media-Name" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SDP-Media-Description" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Local-GW-Inserted-Indication" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "IP-Realm-Default-Indication" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Transcoder-Inserted-Indication" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Media-Initiator-Flag" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Media-Initiator-Party" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP-Charging-Id" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Access-Network-Charging-Identifier-Value" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SDP-Type" }, RULE_OPTIONAL, -1, 1 }, }; PARSE_loc_rules(rules, rule_avp); } { struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 10415; vpa.avp_name = "Service-Information"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { { .avp_vendor = 0, .avp_name = "Subscription-Id" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "AoC-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "PS-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "WLAN-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "IMS-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "MMS-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "LCS-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "PoC-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "MBMS-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SMS-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "MMTel-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Service-Generic-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "IM-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "DCD-Information" }, RULE_OPTIONAL, -1, 1 }, }; PARSE_loc_rules(rules, rule_avp); } { struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 10415; vpa.avp_name = "SMS-Information"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "SMS-Node" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Client-Address" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Originator-SCCP-Address" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SMSC-Address" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Data-Coding-Scheme" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SM-Discharge-Time" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SM-Message-Type" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Originator-Interface" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SM-Protocol-ID" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Reply-Path-Requested" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SM-Status" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SM-User-Data-Header" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Number-Of-Messages-Sent" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Recipient-Info" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Originator-Received-Address" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SM-Service-Type" }, RULE_OPTIONAL, -1, 1 }, }; PARSE_loc_rules(rules, rule_avp); } { struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 10415; vpa.avp_name = "Time-Quota-Mechanism"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Time-Quota-Type" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Base-Time-Interval" }, RULE_REQUIRED, -1, 1 }, }; PARSE_loc_rules(rules, rule_avp); } { struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 10415; vpa.avp_name = "Time-Stamps"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "SIP-Request-Timestamp" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SIP-Response-Timestamp" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SIP-Request-Timestamp-Fraction" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SIP-Response-Timestamp-Fraction" }, RULE_OPTIONAL, -1, 1 }, }; PARSE_loc_rules(rules, rule_avp); } /* OMA */ { struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 10415; vpa.avp_name = "DCD-Information"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Content-ID" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Content-provider-ID" }, RULE_OPTIONAL, -1, 1 }, }; PARSE_loc_rules(rules, rule_avp); } { struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 10415; vpa.avp_name = "IM-Information"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Total-Number-Of-Messages-Sent" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Total-Number-Of-Messages-Exploded" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Number-Of-Messages-Successfully-Sent" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Number-Of-Messages-Successfully-Exploded" }, RULE_OPTIONAL, -1, 1 }, }; PARSE_loc_rules(rules, rule_avp); } { struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 10415; vpa.avp_name = "Service-Generic-Information"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Application-Server-Id" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Application-Service-Type" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Application-Session-Id" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Delivery-Status" }, RULE_OPTIONAL, -1, 1 }, }; PARSE_loc_rules(rules, rule_avp); } /* Reservation-Priority */ { struct dict_avp_data data = { 458, /* Code */ 13019, /* Vendor */ "Reservation-Priority", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Logical-Access-ID */ { struct dict_avp_data data = { 302, /* Code */ 13019, /* Vendor */ "Logical-Access-ID", /* Name */ AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Physical-Access-ID */ { struct dict_avp_data data = { 313, /* Code */ 13019, /* Vendor */ "Physical-Access-ID", /* Name */ AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* Command section */ { struct dict_object* app; CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_APPLICATION, APPLICATION_BY_NAME, "Cx", &app, ENOENT)); /* User-Authorization-Request (UAR) Command */ { struct dict_object* cmd_uar; struct dict_cmd_data data = { 300, /* Code */ "3GPP/User-Authorization-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { { .avp_name = "Session-Id" }, RULE_FIXED_HEAD, -1, 1 }, { { .avp_name = "Vendor-Specific-Application-Id" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Auth-Session-State" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Host" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Destination-Host" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Destination-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "User-Name" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Supported-Features" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Public-Identity" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Visited-Network-Identifier" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "User-Authorization-Type" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "UAR-Flags" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Proxy-Info" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Route-Record" }, RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new(DICT_COMMAND, &data, app, &cmd_uar); PARSE_loc_rules(rules, cmd_uar); } /* User-Authorization-Answer (UAA) Command */ { struct dict_object* cmd_uaa; struct dict_cmd_data data = { 300, /* Code */ "3GPP/User-Authorization-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { { .avp_name = "Session-Id" }, RULE_FIXED_HEAD, -1, 1 }, { { .avp_name = "Vendor-Specific-Application-Id" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Result-Code" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Experimental-Result" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Auth-Session-State" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Host" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Supported-Features" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Server-Name" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Server-Capabilities" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Failed-AVP" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Proxy-Info" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Route-Record" }, RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new(DICT_COMMAND, &data, app, &cmd_uaa); PARSE_loc_rules(rules, cmd_uaa); } /* Location-Info-Request (LIR) Command */ { struct dict_object* cmd_lir; struct dict_cmd_data data = { 302, /* Code */ "3GPP/Location-Info-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { { .avp_name = "Session-Id" }, RULE_FIXED_HEAD, -1, 1 }, { { .avp_name = "Vendor-Specific-Application-Id" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Auth-Session-State" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Host" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Destination-Host" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Destination-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Originating-Request" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Supported-Features" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Public-Identity" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "User-Authorization-Type" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Session-Priority" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Proxy-Info" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Route-Record" }, RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new(DICT_COMMAND, &data, app, &cmd_lir); PARSE_loc_rules(rules, cmd_lir); } /* Location-Info-Answer (LIA) Command */ { struct dict_object* cmd_lia; struct dict_cmd_data data = { 302, /* Code */ "3GPP/Location-Info-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { { .avp_name = "Session-Id" }, RULE_FIXED_HEAD, -1, 1 }, { { .avp_name = "Vendor-Specific-Application-Id" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Result-Code" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Experimental-Result" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Auth-Session-State" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Host" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Supported-Features" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Server-Name" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Server-Capabilities" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Wildcarded-Public-Identity" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "LIA-Flags" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Failed-AVP" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Proxy-Info" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Route-Record" }, RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new(DICT_COMMAND, &data, app, &cmd_lia); PARSE_loc_rules(rules, cmd_lia); } /* Multimedia-Auth-Request (MAR) Command */ { struct dict_object* cmd_mar; struct dict_cmd_data data = { 303, /* Code */ "3GPP/Multimedia-Auth-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { { .avp_name = "Session-Id" }, RULE_FIXED_HEAD, -1, 1 }, { { .avp_name = "Vendor-Specific-Application-Id" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Auth-Session-State" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Host" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Destination-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Destination-Host" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "User-Name" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Supported-Features" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Public-Identity" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SIP-Auth-Data-Item" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SIP-Number-Auth-Items" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Server-Name" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Proxy-Info" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Route-Record" }, RULE_OPTIONAL, -1, -1 }, }; CHECK_dict_new(DICT_COMMAND, &data, app, &cmd_mar); PARSE_loc_rules(rules, cmd_mar); } /* Multimedia-Auth-Answer (MAA) Command */ { struct dict_object* cmd_maa; struct dict_cmd_data data = { 303, /* Code */ "3GPP/Multimedia-Auth-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { { .avp_name = "Session-Id" }, RULE_FIXED_HEAD, -1, 1 }, { { .avp_name = "Vendor-Specific-Application-Id" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Result-Code" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Experimental-Result" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Auth-Session-State" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Host" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "User-Name" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Supported-Features" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Public-Identity" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SIP-Number-Auth-Items" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SIP-Auth-Data-Item" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Failed-AVP" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Proxy-Info" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Route-Record" }, RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new(DICT_COMMAND, &data, app, &cmd_maa); PARSE_loc_rules(rules, cmd_maa); } /* Server-Assignment-Request (SAR) Command */ { struct dict_object* cmd_sar; struct dict_cmd_data data = { 301, /* Code */ "3GPP/Server-Assignment-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { { .avp_name = "Session-Id" }, RULE_FIXED_HEAD, -1, 1 }, { { .avp_name = "Vendor-Specific-Application-Id" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Auth-Session-State" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Host" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Destination-Host" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Destination-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "User-Name" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Supported-Features" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Public-Identity" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Wildcarded-Public-Identity" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Server-Name" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Server-Assignment-Type" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "User-Data-Already-Available" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SCSCF-Restoration-Info" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Multiple-Registration-Indication" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Session-Priority" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Proxy-Info" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Route-Record" }, RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new(DICT_COMMAND, &data, app, &cmd_sar); PARSE_loc_rules(rules, cmd_sar); } /* Server-Assignment-Answer (SAA) Command */ { struct dict_object* cmd_saa; struct dict_cmd_data data = { 301, /* Code */ "3GPP/Server-Assignment-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { { .avp_name = "Session-Id" }, RULE_FIXED_HEAD, -1, 1 }, { { .avp_name = "Vendor-Specific-Application-Id" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Result-Code" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Experimental-Result" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Auth-Session-State" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Host" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "User-Name" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Supported-Features" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "User-Data" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Charging-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Associated-Identities" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Loose-Route-Indication" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SCSCF-Restoration-Info" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Associated-Registered-Identities" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Server-Name" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Wildcarded-Public-Identity" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Priviledged-Sender-Indication" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Failed-AVP" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Proxy-Info" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Route-Record" }, RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new(DICT_COMMAND, &data, app, &cmd_saa); PARSE_loc_rules(rules, cmd_saa); } /* Registration-Termination-Request (RTR) Command */ { struct dict_object* cmd_rtr; struct dict_cmd_data data = { 304, /* Code */ "3GPP/Registration-Termination-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { { .avp_name = "Session-Id" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Vendor-Specific-Application-Id" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Auth-Session-State" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Host" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Destination-Host" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Destination-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "User-Name" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Associated-Identities" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Supported-Features" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Public-Identity" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Deregistration-Reason" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Proxy-Info" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Route-Record" }, RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new(DICT_COMMAND, &data, app, &cmd_rtr); PARSE_loc_rules(rules, cmd_rtr); } /* Registration-Termination-Answer (RTA) Command */ { struct dict_object* cmd_rta; struct dict_cmd_data data = { 304, /* Code */ "3GPP/Registration-Termination-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { { .avp_name = "Session-Id" }, RULE_FIXED_HEAD, -1, 1 }, { { .avp_name = "Vendor-Specific-Application-Id" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Result-Code" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Experimental-Result" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Auth-Session-State" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Host" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Associated-Identities" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Supported-Features" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Identity-with-Emergency-Registration" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Failed-AVP" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Proxy-Info" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Route-Record" }, RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new(DICT_COMMAND, &data, app, &cmd_rta); PARSE_loc_rules(rules, cmd_rta); } /* Push-Profile-Request (PPR) Command */ { struct dict_object* cmd_ppr; struct dict_cmd_data data = { 305, /* Code */ "3GPP/Push-Profile-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { { .avp_name = "Session-Id" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Vendor-Specific-Application-Id" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Auth-Session-State" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Host" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Destination-Host" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Destination-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "User-Name" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Supported-Features" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "User-Data" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Charging-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SIP-Auth-Data-Item" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Proxy-Info" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Route-Record" }, RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new(DICT_COMMAND, &data, app, &cmd_ppr); PARSE_loc_rules(rules, cmd_ppr); } /* Push-Profile-Answer (PPA) Command */ { struct dict_object* cmd_ppa; struct dict_cmd_data data = { 305, /* Code */ "3GPP/Push-Profile-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { { .avp_name = "Session-Id" }, RULE_FIXED_HEAD, -1, 1 }, { { .avp_name = "Vendor-Specific-Application-Id" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Result-Code" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Experimental-Result" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Auth-Session-State" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Host" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Supported-Features" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Failed-AVP" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Proxy-Info" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Route-Record" }, RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new(DICT_COMMAND, &data, app, &cmd_ppa); PARSE_loc_rules(rules, cmd_ppa); } } struct dict_object* rx; CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_APPLICATION, APPLICATION_BY_NAME, "Rx", &rx, ENOENT)); /* AA-Request (AAR) Command */ { struct dict_object * cmd; struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "AF-Application-Identifier" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Media-Component-Description" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Service-Info-Status" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "AF-Charging-Identifier" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SIP-Forking-Indication" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Specific-Action" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Subscription-Id" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Supported-Features" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 13019, .avp_name = "Reservation-Priority" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Called-Station-Id" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Service-URN" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Sponsored-Connectivity-Data" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "MPS-Identifier" }, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "AA-Request", &cmd); PARSE_loc_rules( rules, cmd ); } /* AA-Answer (AAA) Command */ { struct dict_object * cmd; struct local_rules_definition rules[] = { { { .avp_name = "Experimental-Result" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Access-Network-Charging-Identifier" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Access-Network-Charging-Address" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Acceptable-Service-Info" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "IP-CAN-Type" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "RAT-Type" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Flows" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Supported-Features" }, RULE_OPTIONAL, -1, -1 } }; CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "AA-Answer", &cmd); PARSE_loc_rules( rules, cmd ); } /* Re-Auth-Request (RAR) Command - Extension for Rx */ { struct dict_object * cmd; struct local_rules_definition rules[] = { #if 0 /* modified by acetcom */ { { .avp_vendor = 10415, .avp_name = "Specific-Action" }, RULE_REQUIRED, -1, 1 }, #endif { { .avp_vendor = 10415, .avp_name = "Access-Network-Charging-Identifier" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Access-Network-Charging-Address" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Flows" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Subscription-Id" }, RULE_OPTIONAL, -1, -1 }, #if 0 /* modified by acetcom */ { { .avp_vendor = 10415, .avp_name = "Abort-Cause" }, RULE_REQUIRED, -1, 1 }, #endif { { .avp_vendor = 10415, .avp_name = "IP-CAN-Type" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "RAT-Type" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Sponsored-Connectivity-Data" }, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Re-Auth-Request", &cmd); PARSE_loc_rules( rules, cmd ); } /* Re-Auth-Answer (RAA) Command - Extension for Rx */ { struct dict_object * cmd; struct local_rules_definition rules[] = { { { .avp_name = "Experimental-Result" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Media-Component-Description" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Service-URN" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Redirect-Max-Cache-Time" }, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Re-Auth-Answer", &cmd); PARSE_loc_rules( rules, cmd ); } /* Session-Termination-Answer (STA) Command - Extension for Rx */ { struct dict_object * cmd; struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Sponsored-Connectivity-Data" }, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Session-Termination-Answer", &cmd); PARSE_loc_rules( rules, cmd ); } /* Abort-Session-Request (ASR) Command - Extension for Rx */ { struct dict_object * cmd; struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Abort-Cause" }, RULE_REQUIRED, -1, 1 } }; CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Abort-Session-Request", &cmd); PARSE_loc_rules( rules, cmd ); } /* Re-Auth-Request (RAR) Command - Extension for Gx */ { struct dict_object * cmd; struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Session-Release-Cause" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Event-Trigger" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Event-Report-Indication" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Charging-Rule-Remove" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Charging-Rule-Install" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Default-EPS-Bearer-QoS" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "QoS-Information" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Revalidation-Time" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Usage-Monitoring-Information" }, RULE_OPTIONAL, -1, -1 } }; CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Re-Auth-Request", &cmd); PARSE_loc_rules( rules, cmd ); } /* Re-Auth-Answer (RAA) Command - Extension for Gx */ { struct dict_object * cmd; struct local_rules_definition rules[] = { { { .avp_name = "Experimental-Result" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "IP-CAN-Type" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "RAT-Type" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "AN-GW-Address" }, RULE_OPTIONAL, -1, 2 }, { { .avp_vendor = 10415, .avp_name = "3GPP-SGSN-MCC-MNC" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP-SGSN-Address" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP-SGSN-Ipv6-Address" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "RAI" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP-User-Location-Info" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP-MS-TimeZone" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Charging-Rule-Report" }, RULE_OPTIONAL, -1, -1 } }; CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Re-Auth-Answer", &cmd); PARSE_loc_rules( rules, cmd ); } /* Credit-Control-Request (CCR) Command - Extension for Gx */ { struct dict_object * cmd; struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Supported-Features" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Network-Request-Support" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Packet-Filter-Information" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Packet-Filter-Operation" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Bearer-Identifier" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Bearer-Operation" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Framed-IP-Address" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Framed-IPv6-Prefix" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "IP-CAN-Type" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP-RAT-Type" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "RAT-Type" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "QoS-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "QoS-Negotiation" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "QoS-Upgrade" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Default-EPS-Bearer-QoS" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "AN-GW-Address" }, RULE_OPTIONAL, -1, 2 }, { { .avp_vendor = 10415, .avp_name = "3GPP-SGSN-MCC-MNC" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP-SGSN-Address" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP-SGSN-Ipv6-Address" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "RAI" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP-User-Location-Info" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP-MS-TimeZone" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Called-Station-Id" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "PDN-Connection-ID" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Bearer-Usage" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Online" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Offline" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "TFT-Packet-Filter-Information" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Charging-Rule-Report" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Event-Trigger" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Event-Report-Indication" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Access-Network-Charging-Address" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Access-Network-Charging-Identifier-Gx" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "CoA-Information" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Usage-Monitoring-Information" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Routing-Rule-Install" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Routing-Rule-Remove" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 13019, .avp_name = "Logical-Access-ID" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 13019, .avp_name = "Physical-Access-ID" }, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Credit-Control-Request", &cmd); PARSE_loc_rules( rules, cmd ); } /* Credit-Control-Answer (CCA) Command - Extension for Gx */ { struct dict_object * cmd; struct local_rules_definition rules[] = { { { .avp_name = "Experimental-Result" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Supported-Features" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Bearer-Control-Mode" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Event-Trigger" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Event-Report-Indication" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Charging-Rule-Remove" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Charging-Rule-Install" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Charging-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Online" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Offline" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "QoS-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Revalidation-Time" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Default-EPS-Bearer-QoS" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Bearer-Usage" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Usage-Monitoring-Information" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "CSG-Information-Reporting" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "User-CSG-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Error-Message" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Error-Reporting-Host" }, RULE_OPTIONAL, -1, 1 } }; CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Credit-Control-Answer", &cmd); PARSE_loc_rules( rules, cmd ); } LOG_D( "Extension 'Dictionary definitions for DCCA 3GPP' initialized"); return 0; } EXTENSION_ENTRY("dict_dcca_3gpp", dict_dcca_3gpp_entry, "dict_dcca"); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_dcca_3gpp/dict_dcca_3gpp.org000066400000000000000000003521701333553357400274470ustar00rootroot00000000000000| Attribute Name | Code | Section defined | Value Type | MUST | MAY | SHLD NOT | MUST NOT | Encr | | # 3GPP 29.061-c00 (12.0.0 2012.12.20) | | | | | | | | | | # 3GPP 29.061 is not very clear and self-inconsistent about M | | | | | | | | | | # for this reason, other sources are assumed more trustworthy | | | | | | | | | | # M inconsistently specified | | | | | | | | | | 3GPP-IMSI | 1 | 16.4.7 | UTF8String | M,V | P | | | | | # 29.061 says OctetString; dumps say UInt32; manually changed | | | | | | | | | | # 29.061 says MUST NOT M; dumps say MUST | | | | | | | | | | 3GPP-Charging-Id | 2 | 16.4.7 | Unsigned32 | M,V | P | | | | | # 29.061 says MUST NOT M; dumps say MUST | | | | | | | | | | 3GPP-PDP-Type | 3 | 16.4.7 | Enumerated | M,V | P | | | | | 3GPP-CG-Address | 4 | 16.4.7 | OctetString | V | P | | M | | | # 29.061 says MUST NOT M; old contrib/3gpp says MUST | | | | | | | | | | 3GPP-GPRS-Negotiated-QoS-Profile | 5 | 16.4.7 | UTF8String | M,V | P | | | | | # M inconsistently specified; old contrib/3gg says MUST NOT | | | | | | | | | | 3GPP-SGSN-Address | 6 | 16.4.7 | OctetString | V | P | | M | | | 3GPP-GGSN-Address | 7 | 16.4.7 | OctetString | V | P | | M | | | # 29.061 says MUST NOT M; dumps say MUST | | | | | | | | | | 3GPP-IMSI-MCC-MNC | 8 | 16.4.7 | UTF8String | M,V | P | | | | | # 29.061 says MUST NOT M; old contrib/3gpp says MUST | | | | | | | | | | 3GPP-GGSN-MCC-MNC | 9 | 16.4.7 | UTF8String | M,V | P | | | | | # 29.061 says MUST NOT M; old contrib/3gpp says MUST | | | | | | | | | | 3GPP-NSAPI | 10 | 16.4.7 | OctetString | M,V | P | | | | | # added manually, missing in AVP table | | | | | | | | | | 3GPP-Session-Stop-Indicator | 11 | 16.4.7 | OctetString | V | P | | M | | | # 29.061 says MUST NOT M; old contrib/3gpp says MUST | | | | | | | | | | 3GPP-Selection-Mode | 12 | 16.4.7 | UTF8String | M,V | P | | | | | # 29.061 says MUST NOT M; old contrib/3gpp says MUST | | | | | | | | | | 3GPP-Charging-Characteristics | 13 | 16.4.7 | UTF8String | M,V | P | | | | | # 29.061 says MUST NOT M; old contrib/3gpp says MUST | | | | | | | | | | 3GPP-CG-IPv6-Address | 14 | 16.4.7 | OctetString | M,V | P | | | | | # M inconsistently specified | | | | | | | | | | # 29.061 says MUST NOT M; old contrib/3gpp says MUST | | | | | | | | | | 3GPP-SGSN-IPv6-Address | 15 | 16.4.7 | OctetString | M,V | P | | | | | # 29.061 says MUST NOT M; old contrib/3gpp says MUST | | | | | | | | | | 3GPP-GGSN-IPv6-Address | 16 | 16.4.7 | OctetString | M,V | P | | | | | # 29.061 says MUST NOT M; old contrib/3gpp says MUST | | | | | | | | | | 3GPP-IPv6-DNS-Servers | 17 | 16.4.7 | OctetString | M,V | P | | | | | # 29.061 says MUST NOT M; old contrib/3gpp says MUST | | | | | | | | | | 3GPP-SGSN-MCC-MNC | 18 | 16.4.7 | UTF8String | M,V | P | | | | | # M inconsistently specified | | | | | | | | | | 3GPP-IMEISV | 20 | 16.4.7 | OctetString | M,V | P | | | | | # M inconsistently specified | | | | | | | | | | 3GPP-RAT-Type | 21 | 16.4.7 | OctetString | M,V | P | | | | | # M inconsistently specified | | | | | | | | | | 3GPP-User-Location-Info | 22 | 16.4.7 | OctetString | M,V | P | | | | | # M inconsistently specified | | | | | | | | | | 3GPP-MS-TimeZone | 23 | 16.4.7 | OctetString | M,V | P | | | | | 3GPP-CAMEL-Charging-Info | 24 | 16.4.7 | OctetString | V | P | | M | | | 3GPP-Packet-Filter | 25 | 16.4.7 | OctetString | V | P | | M | | | 3GPP-Negotiated-DSCP | 26 | 16.4.7 | OctetString | V | P | | M | | | 3GPP-Allocate-IP-Type | 27 | 16.4.7 | OctetString | V | P | | M | | | # added manually, missing in AVP table | | | | | | | | | | External-Identifier | 28 | 16.4.7 | OctetString | V | P | | M | | | TMGI | 900 | 17.07.02 | OctetString | M,V | P | | | | | Required-MBMS-Bearer-Capabilities | 901 | 17.07.03 | UTF8String | M,V | P | | | | | MBMS-StartStop-Indication | 902 | 17.07.05 | Enumerated | M,V | P | | | | | MBMS-Service-Area | 903 | 17.07.06 | OctetString | M,V | P | | | | | MBMS-Session-Duration | 904 | 17.07.07 | OctetString | M,V | P | | | | | Alternative-APN | 905 | 17.07.08 | UTF8String | M,V | P | | | | | MBMS-Service-Type | 906 | 17.07.09 | Enumerated | M,V | P | | | | | MBMS-2G-3G-Indicator | 907 | 17.07.10 | Enumerated | M,V | P | | | | | MBMS-Session-Identity | 908 | 17.07.11 | OctetString | M.V | P | | | | | RAI | 909 | 17.07.12 | UTF8String | M,V | P | | | | | Additional-MBMS-Trace-Info | 910 | 17.07.13 | OctetString | M,V | P | | | | | MBMS-Time-To-Data-Transfer | 911 | 17.07.14 | OctetString | M,V | P | | | | | MBMS-Session-Repetition-Number | 912 | 17.07.15 | OctetString | M.V | P | | | | | MBMS-Required-QoS | 913 | 17.07.16 | UTF8String | M.V | P | | | | | MBMS-Counting-Information | 914 | 17.07.17 | Enumerated | M.V | P | | | | | MBMS-User-Data-Mode-Indication | 915 | 17.07.18 | Enumerated | M.V | P | | | | | MBMS-GGSN-Address | 916 | 17.07.19 | OctetString | M.V | P | | | | | MBMS-GGSN-IPv6-Address | 917 | 17.07.20 | OctetString | M.V | P | | | | | MBMS-BMSC-SSM-IP-Address | 918 | 17.07.21 | OctetString | M.V | P | | | | | MBMS-BMSC-SSM-IPv6-Address | 919 | 17.07.22 | OctetString | M.V | P | | | | | MBMS-Flow-Identifier | 920 | 17.7.23 | OctetString | M,V | P | | | | | CN-IP-Multicast-Distribution | 921 | 17.7.24 | Enumerated | M,V | P | | | | | MBMS-HC-Indicator | 922 | 17.7.25 | Enumerated | M,V | P | | | | | # 3GPP 29.140-700 (7.0.0 2007.07.05) | | | | | | | | | | Served-User-Identity | 1100 | 6.3.1 | Grouped | M,V | | | | N | | # reuses: MSISDN | 701 | 6.3.2 | OctetString | M,V | | | | N | | VASP-ID | 1101 | 6.3.3 | UTF8String | M,V | | | | N | | VAS-ID | 1102 | 6.3.4 | UTF8String | M,V | | | | N | | Trigger-Event | 1103 | 6.3.5 | Enumerated | M,V | | | | N | | # reuses: 3GPP-IMSI | 1 | 6.3.6 | UTF8String | M,V | | | | N | | Sender-Address | 1104 | 6.3.7 | UTF8String | M,V | | | | N | | Initial-Recipient-Address | 1105 | 6.3.8 | Grouped | M,V | | | | N | | Result-Recipient-Address | 1106 | 6.3.9 | Grouped | M,V | | | | N | | # conflicts with one in (more common) 32.329 | | | | | | | | | | Sequence-Number-29.140 | 1107 | 6.3.10 | Unsigned32 | M,V | | | | N | | # conflicts with one in (more common) 32.299 | | | | | | | | | | Recipient-Address-29.140 | 1108 | 6.3.11 | UTF8String | M,V | | | | N | | Routeing-Address | 1109 | 6.3.12 | UTF8String | M,V | | | | N | | Originating-Interface | 1110 | 6.3.13 | Enumerated | M,V | | | | N | | Delivery-Report | 1111 | 6.3.14 | Enumerated | M,V | | | | N | | Read-Reply | 1112 | 6.3.15 | Enumerated | M,V | | | | N | | Sender-Visibility | 1113 | 6.3.16 | Enumerated | M,V | | | | N | | Service-Key | 1114 | 6.3.17 | UTF8String | M,V | | | | N | | Billing-Information | 1115 | 6.3.18 | UTF8String | M,V | | | | N | | # conflicts with one in (more common) 32.299 | | | | | | | | | | Status-29.140 | 1116 | 6.3.19 | Grouped | M,V | | | | N | | Status-Code | 1117 | 6.3.20 | UTF8String | M,V | | | | N | | Status-Text | 1118 | 6.3.21 | UTF8String | M,V | | | | N | | Routeing-Address-Resolution | 1119 | 6.3.22 | Enumerated | M,V | | | | N | | # 3GPP 29.173-c00 (12.0.0 2013.03.13) | | | | | | | | | | LMSI | 2400 | 6.4.2 | OctetString | M,V | | | | N | | Serving-Node | 2401 | 6.4.3 | Grouped | M,V | | | | N | | MME-Name | 2402 | 6.4.4 | DiameterIdentity | M,V | | | | N | | MSC-Number | 2403 | 6.4.5 | OctetString | M,V | | | | N | | LCS-Capabilities-Sets | 2404 | 6.4.6 | Unsigned32 | M,V | | | | N | | GMLC-Address | 2405 | 6.4.7 | Address | M,V | | | | N | | Additional-Serving-Node | 2406 | 6.4.8 | Grouped | M,V | | | | N | | PPR-Address | 2407 | 6.4.9 | Address | M,V | | | | N | | MME-Realm | 2408 | 6.4.12 | DiameterIdentity | V | | | M | N | | SGSN-Name | 2409 | 6.4.13 | DiameterIdentity | V | | | M | N | | SGSN-Realm | 2410 | 6.4.14 | DiameterIdentity | V | | | M | N | | # 3GPP 29.210-670 (6.7.0 2006-12-18) | | | | | | | | | | PDP-Session-Operation | 1015 | 5.2.21 | Enumerated | M,V | P | | | Y | | # 3GPP 29.212-c00 (12.0.0 2013.03.15) | | | | | | | | | | # Gx-specific | | | | | | | | | | ADC-Revalidation-Time | 2801 | 5.3.93 | Time | V | P | | M | Y | | ADC-Rule-Install | 1092 | 5.3.85 | Grouped | V | P | | M | Y | | ADC-Rule-Remove | 1093 | 5.3.86 | Grouped | V | P | | M | Y | | ADC-Rule-Definition | 1094 | 5.3.87 | Grouped | V | P | | M | Y | | ADC-Rule-Base-Name | 1095 | 5.3.88 | UTF8String | V | P | | M | Y | | ADC-Rule-Name | 1096 | 5.3.89 | OctetString | V | P | | M | Y | | ADC-Rule-Report | 1097 | 5.3.90 | Grouped | V | P | | M | Y | | Application-Detection-Information | 1098 | 5.3.91 | Grouped | V | P | | M | Y | | Access-Network-Charging-Identifier-Gx | 1022 | 5.3.22 | Grouped | M,V | P | | | Y | | Allocation-Retention-Priority | 1034 | 5.3.32 | Grouped | V | P | | M | Y | | AN-GW-Address | 1050 | 5.3.49 | Address | V | P | | M | Y | | APN-Aggregate-Max-Bitrate-DL | 1040 | 5.3.39 | Unsigned32 | V | P | | M | Y | | APN-Aggregate-Max-Bitrate-UL | 1041 | 5.3.40 | Unsigned32 | V | P | | M | Y | | Bearer-Control-Mode | 1023 | 5.3.23 | Enumerated | M,V | P | | | Y | | Bearer-Identifier | 1020 | 5.3.20 | OctetString | M,V | P | | | Y | | Bearer-Operation | 1021 | 5.3.21 | Enumerated | M,V | P | | | Y | | Bearer-Usage | 1000 | 5.3.1 | Enumerated | M,V | P | | | Y | | Charging-Rule-Install | 1001 | 5.3.2 | Grouped | M,V | P | | | Y | | Charging-Rule-Remove | 1002 | 5.3.3 | Grouped | M,V | P | | | Y | | Charging-Rule-Definition | 1003 | 5.3.4 | Grouped | M,V | P | | | Y | | Charging-Rule-Base-Name | 1004 | 5.3.5 | UTF8String | M,V | P | | | Y | | Charging-Rule-Name | 1005 | 5.3.6 | OctetString | M,V | P | | | Y | | Charging-Rule-Report | 1018 | 5.3.18 | Grouped | M,V | P | | | Y | | Charging-Correlation-Indicator | 1073 | 5.3.67 | Enumerated | V | P | | M | Y | | CoA-IP-Address | 1035 | 5.3.33 | Address | V | P | | M | Y | | CoA-Information | 1039 | 5.3.37 | Grouped | V | P | | M | Y | | CSG-Information-Reporting | 1071 | 5.3.64 | Enumerated | V | P | | M | Y | | Default-EPS-Bearer-QoS | 1049 | 5.3.48 | Grouped | V | P | | M | Y | | Event-Report-Indication | 1033 | 5.3.30 | Grouped | V | P | | M | Y | | Event-Trigger | 1006 | 5.3.7 | Enumerated | M,V | P | | | Y | | Flow-Direction | 1080 | 5.3.65 | Enumerated | V | P | | M | Y | | Flow-Information | 1058 | 5.3.53 | Grouped | V | P | | M | Y | | Flow-Label | 1057 | 5.3.52 | OctetString | V | P | | M | Y | | IP-CAN-Type | 1027 | 5.3.27 | Enumerated | M,V | P | | | Y | | Guaranteed-Bitrate-DL | 1025 | 5.3.25 | Unsigned32 | M,V | P | | | Y | | Guaranteed-Bitrate-UL | 1026 | 5.3.26 | Unsigned32 | M,V | P | | | Y | | HeNB-Local-IP-Address | 2804 | 5.3.95 | Address | V | P | | M | Y | | Metering-Method | 1007 | 5.3.8 | Enumerated | M,V | P | | | Y | | Monitoring-Key | 1066 | 5.3.59 | OctetString | V | P | | M | Y | | Mute-Notification | 2809 | 5.3.98 | Enumerated | V | P | | M | Y | | Monitoring-Time | 2810 | 5.3.99 | Time | V | P | | M | Y | | Network-Request-Support | 1024 | 5.3.24 | Enumerated | M,V | P | | | Y | | Offline | 1008 | 5.3.9 | Enumerated | M,V | P | | | Y | | Online | 1009 | 5.3.10 | Enumerated | M,V | P | | | Y | | Packet-Filter-Content | 1059 | 5.3.54 | IPFilterRule | V | P | | M | Y | | Packet-Filter-Identifier | 1060 | 5.3.55 | OctetString | V | P | | M | Y | | Packet-Filter-Information | 1061 | 5.3.56 | Grouped | V | P | | M | Y | | Packet-Filter-Operation | 1062 | 5.3.57 | Enumerated | V | P | | M | Y | | Packet-Filter-Usage | 1072 | 5.3.66 | Enumerated | V | P | | M | Y | | PDN-Connection-ID | 1065 | 5.3.58 | OctetString | V | P | | | Y | | Precedence | 1010 | 5.3.11 | Unsigned32 | M,V | P | | | Y | | Pre-emption-Capability | 1047 | 5.3.46 | Enumerated | V | P | | M | Y | | Pre-emption-Vulnerability | 1048 | 5.3.47 | Enumerated | V | P | | M | Y | | Priority-Level | 1046 | 5.3.45 | Unsigned32 | V | P | | M | Y | | Redirect-Information | 1085 | 5.3.82 | Grouped | V | P | | M | Y | | Redirect-Support | 1086 | 5.3.83 | Enumerated | V | P | | M | Y | | Reporting-Level | 1011 | 5.3.12 | Enumerated | M,V | P | | | Y | | Routing-Filter | 1078 | 5.3.72 | Grouped | V | P | | M | Y | | Routing-IP-Address | 1079 | 5.3.73 | Address | V | P | | M | Y | | Routing-Rule-Definition | 1076 | 5.3.70 | Grouped | V | P | | M | Y | | Routing-Rule-Identifier | 1077 | 5.3.71 | OctetString | V | P | | M | Y | | Routing-Rule-Install | 1081 | 5.3.68 | Grouped | V | P | | M | Y | | Routing-Rule-Remove | 1075 | 5.3.69 | Grouped | V | P | | M | Y | | PCC-Rule-Status | 1019 | 5.3.19 | Enumerated | M,V | P | | | Y | | Session-Release-Cause | 1045 | 5.3.44 | Enumerated | M,V | P | | | Y | | TDF-Information | 1087 | 5.3.78 | Grouped | V | P | | M | Y | | TDF-Application-Identifier | 1088 | 5.3.77 | OctetString | V | P | | M | Y | | TDF-Application-Instance-Identifier | 2802 | 5.3.92 | OctetString | V | P | | M | Y | | TDF-Destination-Host | 1089 | 5.3.80 | DiameterIdentity | V | P | | M | Y | | TDF-Destination-Realm | 1090 | 5.3.79 | DiameterIdentity | V | P | | M | Y | | TDF-IP-Address | 1091 | 5.3.81 | Address | V | P | | M | Y | | QoS-Class-Identifier | 1028 | 5.3.17 | Enumerated | M,V | P | | | Y | | QoS-Information | 1016 | 5.3.16 | Grouped | M.V | P | | | Y | | QoS-Negotiation | 1029 | 5.3.28 | Enumerated | M,V | P | | | Y | | QoS-Upgrade | 1030 | 5.3.29 | Enumerated | M.V | P | | | Y | | PS-to-CS-Session-Continuity | 1099 | 5.3.84 | Enumerated | V | P | | | Y | | Resource-Allocation-Notification | 1063 | 5.3.50 | Enumerated | V | P | | M | Y | | Rule-Failure-Code | 1031 | 5.3.38 | Enumerated | M.V | P | | | Y | | Security-Parameter-Index | 1056 | 5.3.51 | OctetString | V | P | | M | Y | | TFT-Filter | 1012 | 5.3.13 | IPFilterRule | M,V | P | | | Y | | TFT-Packet-Filter-Information | 1013 | 5.3.14 | Grouped | M,V | P | | | Y | | ToS-Traffic-Class | 1014 | 5.3.15 | OctetString | M,V | P | | | Y | | Tunnel-Header-Filter | 1036 | 5.3.34 | IPFilterRule | V | P | | M | Y | | Tunnel-Header-Length | 1037 | 5.3.35 | Unsigned32 | V | P | | M | Y | | Tunnel-Information | 1038 | 5.3.36 | Grouped | V | P | | M | Y | | RAT-Type | 1032 | 5.3.31 | Enumerated | V | P | | M | Y | | Revalidation-Time | 1042 | 5.3.41 | Time | M,V | P | | | Y | | Rule-Activation-Time | 1043 | 5.3.42 | Time | M,V | P | | | Y | | UDP-Source-Port | 2806 | 5.3.97 | Unsigned32 | V | P | | M | Y | | UE-Local-IP-Address | 2805 | 5.3.96 | Address | V | P | | M | Y | | Usage-Monitoring-Information | 1067 | 5.3.60 | Grouped | V | P | | M | Y | | Rule-Deactivation-Time | 1044 | 5.3.43 | Time | M,V | P | | | Y | | Usage-Monitoring-Level | 1068 | 5.3.61 | Enumerated | V | P | | M | Y | | Usage-Monitoring-Report | 1069 | 5.3.62 | Enumerated | V | P | | M | Y | | Usage-Monitoring-Support | 1070 | 5.3.63 | Enumerated | V | P | | M | Y | | # Gxx-specific | | | | | | | | | | QoS-Rule-Install | 1051 | 5a.3.1 | Grouped | M,V | P | | | Y | | QoS-Rule-Remove | 1052 | 5a.3.2 | Grouped | M,V | P | | | Y | | QoS-Rule-Definition | 1053 | 5a.3.3 | Grouped | M,V | P | | | Y | | QoS-Rule-Name | 1054 | 5a.3.4 | OctetString | M,V | P | | | Y | | QoS-Rule-Base-Name | 1074 | 5a.3.7 | UTF8String | V | P | | M | Y | | QoS-Rule-Report | 1055 | 5a.3.5 | Grouped | M,V | P | | | Y | | Session-Linking-Indicator | 1064 | 5a.3.6 | Enumerated | M,V | P | | | Y | | # S15-specific | | | | | | | | | | CS-Service-Qos-Request-Identifier | 2807 | E.6.3.2 | OctetString | M,V | P | | | Y | | CS-Service-QoS-Request-Operation | 2808 | E.6.3.3 | Enumerated | M.V | P | | | Y | | # 3GPP 29.214-b80 (11.8.0 2013.03.15) | | | | | | | | | | Abort-Cause | 500 | 5.3.1 | Enumerated | M,V | P | | | Y | | Access-Network-Charging-Address | 501 | 5.3.2 | Address | M,V | P | | | Y | | Access-Network-Charging-Identifier | 502 | 5.3.3 | Grouped | M,V | P | | | Y | | Access-Network-Charging-Identifier-Value | 503 | 5.3.4 | OctetString | M,V | P | | | Y | | Acceptable-Service-Info | 526 | 5.3.24 | Grouped | M,V | P | | | Y | | AF-Application-Identifier | 504 | 5.3.5 | OctetString | M,V | P | | | Y | | AF-Charging-Identifier | 505 | 5.3.6 | OctetString | M,V | P | | | Y | | Application-Service-Provider-Identity | 532 | 5.3.29 | UTF8String | V | P | | M | Y | | Codec-Data | 524 | 5.3.7 | OctetString | M,V | P | | | Y | | Flow-Description | 507 | 5.3.8 | IPFilterRule | M,V | P | | | Y | | Flow-Number | 509 | 5.3.9 | Unsigned32 | M,V | P | | | Y | | Flows | 510 | 5.3.10 | Grouped | M,V | P | | | Y | | Flow-Status | 511 | 5.3.11 | Enumerated | M,V | P | | | Y | | Flow-Usage | 512 | 5.3.12 | Enumerated | M,V | P | | | Y | | Service-URN | 525 | 5.3.23 | OctetString | M,V | P | | | Y | | Specific-Action | 513 | 5.3.13 | Enumerated | M,V | P | | | Y | | Max-Requested-Bandwidth-DL | 515 | 5.3.14 | Unsigned32 | M,V | P | | | Y | | Max-Requested-Bandwidth-UL | 516 | 5.3.15 | Unsigned32 | M,V | P | | | Y | | Media-Component-Description | 517 | 5.3.16 | Grouped | M,V | P | | | Y | | Media-Component-Number | 518 | 5.3.17 | Unsigned32 | M,V | P | | | Y | | Media-Sub-Component | 519 | 5.3.18 | Grouped | M,V | P | | | Y | | Media-Type | 520 | 5.3.19 | Enumerated | M,V | P | | | Y | | MPS-Identifier | 528 | 5.3.30 | OctetString | V | P | | M | Y | | Min-Requested-Bandwidth-DL | 534 | 5.3.32 | Unsigned32 | V | P | | M | Y | | Min-Requested-Bandwidth-UL | 535 | 5.3.33 | Unsigned32 | V | P | | M | Y | | RR-Bandwidth | 521 | 5.3.20 | Unsigned32 | M,V | P | | | Y | | RS-Bandwidth | 522 | 5.3.21 | Unsigned32 | M,V | P | | | Y | | Service-Info-Status | 527 | 5.3.25 | Enumerated | M,V | P | | | Y | | SIP-Forking-Indication | 523 | 5.3.22 | Enumerated | M,V | P | | | Y | | Sponsor-Identity | 531 | 5.3.28 | UTF8String | V | P | | M | Y | | Sponsored-Connectivity-Data | 530 | 5.3.27 | Grouped | V | P | | M | Y | | AF-Signalling-Protocol | 529 | 5.3.26 | Enumerated | V | P | | M | Y | | Required-Access-Info | 536 | 5.3.34 | Enumerated | V | P | | M | Y | | Rx-Request-Type | 533 | 5.3.31 | Enumerated | V | P | | M | Y | | IP-Domain-Id | 537 | 5.3.35 | OctetString | V | P | | M | Y | | # 3GPP 29.229-b20 (11.2.0 2012.12.21) | | | | | | | | | | Associated-Identities | 632 | 6.3.33 | Grouped | V | | | M | N | | Associated-Registered-Identities | 647 | 6.3.50 | Grouped | V | | | M | N | | Call-ID-SIP-Header | 643 | 6.3.49.1 | OctetString | V | | | M | N | | Charging-Information | 618 | 6.3.19 | Grouped | M,V | | | | N | | Confidentiality-Key | 625 | 6.3.27 | OctetString | M,V | | | | N | | Contact | 641 | 6.3.48 | OctetString | V | | | M | N | | Deregistration-Reason | 615 | 6.3.16 | Grouped | M,V | | | | N | | Digest-Algorithm | 111 | 6.3.39 | UTF8String | M | | | V | N | | Digest-HA1 | 121 | 6.3.41 | UTF8String | M | | | V | N | | Digest-QoP | 110 | 6.3.40 | UTF8String | M | | | V | N | | Digest-Realm | 104 | 6.3.37 | UTF8String | M | | | V | N | | Feature-List | 630 | 6.3.31 | Unsigned32 | V | | | M | N | | Feature-List-ID | 629 | 6.3.30 | Unsigned32 | V | | | M | N | | From-SIP-Header | 644 | 6.3.49.2 | OctetString | V | | | M | N | | Identity-with-Emergency-Registration | 651 | 6.3.57 | Grouped | V | | | M | N | | Integrity-Key | 626 | 6.3.28 | OctetString | M,V | | | | N | | LIA-Flags | 653 | 6.3.59 | Unsigned32 | V | | | M | N | | Loose-Route-Indication | 638 | 6.3.45 | Enumerated | V | | | M | N | | Mandatory-Capability | 604 | 6.3.5 | Unsigned32 | M,V | | | | N | | Multiple-Registration-Indication | 648 | 6.3.51 | Enumerated | V | | | M | N | | Optional-Capability | 605 | 6.3.6 | Unsigned32 | M,V | | | | N | | Originating-Request | 633 | 6.3.34 | Enumerated | M,V | | | | N | | Path | 640 | 6.3.47 | OctetString | V | | | M | N | | Primary-Charging-Collection-Function-Name | 621 | 6.3.22 | DiameterURI | M,V | | | | N | | Primary-Event-Charging-Function-Name | 619 | 6.3.20 | DiameterURI | M,V | | | | N | | Priviledged-Sender-Indication | 652 | 6.3.58 | Enumerated | V | | | M | N | | Public-Identity | 601 | 6.3.2 | UTF8String | M,V | | | | N | | Reason-Code | 616 | 6.3.17 | Enumerated | M,V | | | | N | | Reason-Info | 617 | 6.3.18 | UTF8String | M,V | | | | N | | Record-Route | 646 | 6.3.49.4 | OctetString | V | | | M | N | | Restoration-Info | 649 | 6.3.52 | Grouped | V | | | M | N | | SCSCF-Restoration-Info | 639 | 6.3.46 | Grouped | V | | | M | N | | SIP-Auth-Data-Item | 612 | 6.3.13 | Grouped | M,V | | | | N | | SIP-Authenticate | 609 | 6.3.10 | OctetString | M,V | | | | N | | SIP-Authentication-Context | 611 | 6.3.12 | OctetString | M,V | | | | N | | SIP-Authentication-Scheme | 608 | 6.3.9 | UTF8String | M,V | | | | N | | SIP-Authorization | 610 | 6.3.11 | OctetString | M,V | | | | N | | SIP-Digest-Authenticate | 635 | 6.3.36 | Grouped | V | | | M | N | | SIP-Item-Number | 613 | 6.3.14 | Unsigned32 | M,V | | | | N | | SIP-Number-Auth-Items | 607 | 6.3.8 | Unsigned32 | M,V | | | | N | | Secondary-Charging-Collection-Function-Name | 622 | 6.3.23 | DiameterURI | M,V | | | | N | | Secondary-Event-Charging-Function-Name | 620 | 6.3.21 | DiameterURI | M,V | | | | N | | Server-Assignment-Type | 614 | 6.3.15 | Enumerated | M,V | | | | N | | Server-Capabilities | 603 | 6.3.4 | Grouped | M,V | | | | N | | Server-Name | 602 | 6.3.3 | UTF8String | M,V | | | | N | | Session-Priority | 650 | 6.3.56 | Enumerated | V | | | M | N | | Subscription-Info | 642 | 6.3.49 | Grouped | V | | | M | N | | Supported-Applications | 631 | 6.3.32 | Grouped | V | | | M | N | | Supported-Features | 628 | 6.3.29 | Grouped | V | M | | | N | | To-SIP-Header | 645 | 6.3.49.3 | OctetString | V | | | M | N | | UAR-Flags | 637 | 6.3.44 | Unsigned32 | V | | | M | N | | User-Authorization-Type | 623 | 6.3.24 | Enumerated | M,V | | | | N | | User-Data | 606 | 6.3.7 | OctetString | M,V | | | | N | | User-Data-Already-Available | 624 | 6.3.26 | Enumerated | M,V | | | | N | | Visited-Network-Identifier | 600 | 6.3.1 | OctetString | M,V | | | | N | | Wildcarded-Public-Identity | 634 | 6.3.35 | UTF8String | V | | | M | N | | # 3GPP 32.299-b60 (11.6.0 2012.12.21) | | | | | | | | | | AF-Correlation-Information | 1276 | | Grouped | M,V | P | | | N | | Access-Network-Information | 1263 | | OctetString | M,V | P | | | N | | Access-Transfer-Information | 2709 | | Grouped | M,V | P | | | N | | Access-Transfer-Type | 2710 | | Enumerated | M,V | P | | | N | | Account-Expiration | 2309 | | Time | M,V | P | | | N | | Accumulated-Cost | 2052 | | Grouped | M,V | P | | | N | | Adaptations | 1217 | | Enumerated | M,V | P | | | N | | Additional-Content-Information | 1207 | | Grouped | M,V | P | | | N | | Additional-Type-Information | 1205 | | UTF8String | M,V | P | | | N | | Address-Data | 897 | | UTF8String | M,V | P | | | N | | Address-Domain | 898 | | Grouped | M,V | P | | | N | | Address-Type | 899 | | Enumerated | M,V | P | | | N | | Addressee-Type | 1208 | | Enumerated | M,V | P | | | N | | Alternate-Charged-Party-Address | 1280 | | UTF8String | V.M | P | | | N | | AoC-Cost-Information | 2053 | | Grouped | M,V | P | | | N | | AoC-Format | 2310 | | Enumerated | M,V | P | | | N | | AoC-Information | 2054 | | Grouped | V.M | P | | | N | | AoC-Request-Type | 2055 | | Enumerated | V.M | P | | | N | | AoC-Service | 2311 | | Grouped | M,V | P | | | N | | AoC-Service-Obligatory-Type | 2312 | | Enumerated | M,V | P | | | N | | AoC-Service-Type | 2313 | | Enumerated | M,V | P | | | N | | AoC-Subscription-Information | 2314 | | Grouped | M,V | P | | | N | | Applic-ID | 1218 | | UTF8String | M,V | P | | | N | | Application-Server | 836 | | UTF8String | M,V | P | | | N | | Application-Server-Information | 850 | | Grouped | M,V | P | | | N | | Application-Provided-Called-Party-Address | 837 | | UTF8String | M,V | P | | | N | | Associated-Party-Address | 2035 | | UTF8String | M,V | P | | | N | | Associated-URI | 856 | | UTF8String | M,V | P | | | N | | Aux-Applic-Info | 1219 | | UTF8String | M,V | P | | | N | | Base-Time-Interval | 1265 | | Unsigned32 | M,V | P | | | N | | Bearer-Service | 854 | | OctetString | M,V | P | | | N | | CG-Address | 846 | | Address | M,V | P | | | Y | | CSG-Access-Mode | 2317 | | Enumerated | M,V | P | | | N | | CSG-Membership-Indication | 2318 | | Enumerated | M,V | P | | | N | | CUG-Information | 2304 | | OctetString | M,V | P | | | N | | Called-Asserted-Identity | 1250 | | UTF8String | M,V | P | | | N | | Called-Party-Address | 832 | | UTF8String | M,V | P | | | N | | Calling-Party-Address | 831 | | UTF8String | M,V | P | | | N | | Carrier-Select-Routing-Information | 2023 | | UTF8String | M,V | P | | | N | | Cause-Code | 861 | | Integer32 | M,V | P | | | N | | Change-Condition | 2037 | | Integer32 | M,V | P | | | N | | Change-Time | 2038 | | Time | M,V | P | | | N | | Charge-Reason-Code | 2118 | | Enumerated | M,V | P | | | N | | Charged-Party | 857 | | UTF8String | M,V | P | | | N | | Charging-Characteristics-Selection-Mode | 2066 | | Enumerated | M,V | P | | | N | | Class-Identifier | 1214 | | Enumerated | M,V | P | | | N | | Client-Address | 2018 | | Address | M,V | P | | | N | | Content-Class | 1220 | | Enumerated | M,V | P | | | N | | Content-Disposition | 828 | | UTF8String | M,V | P | | | N | | Content-Length | 827 | | Unsigned32 | M,V | P | | | N | | Content-Size | 1206 | | Unsigned32 | M,V | P | | | N | | Content-Type | 826 | | UTF8String | M,V | P | | | N | | Current-Tariff | 2056 | | Grouped | M,V | P | | | N | | DRM-Content | 1221 | | Enumerated | M,V | P | | | N | | Data-Coding-Scheme | 2001 | | Integer32 | M,V | P | | | N | | Deferred-Location-Event-Type | 1230 | | UTF8String | M,V | P | | | N | | Delivery-Report-Requested | 1216 | | Enumerated | M,V | P | | | N | | Destination-Interface | 2002 | | Grouped | M,V | P | | | N | | Diagnostics | 2039 | | Integer32 | M,V | P | | | N | | Domain-Name | 1200 | | UTF8String | M,V | P | | | N | | Dynamic-Address-Flag | 2051 | | Enumerated | M,V | P | | | N | | Dynamic-Address-Flag-Extension | 2068 | | Enumerated | M,V | P | | | N | | Early-Media-Description | 1272 | | Grouped | M,V | P | | | N | | Envelope | 1266 | | Grouped | M,V | P | | | N | | Envelope-End-Time | 1267 | | Time | M,V | P | | | N | | Envelope-Reporting | 1268 | | Enumerated | M,V | P | | | N | | Envelope-Start-Time | 1269 | | Time | M,V | P | | | N | | Event | 825 | | UTF8String | M,V | P | | | N | | Event-Charging-TimeStamp | 1258 | | Time | M,V | P | | | N | | Event-Type | 823 | | Grouped | M,V | P | | | N | | Expires | 888 | | Unsigned32 | M,V | P | | | N | | File-Repair-Supported | 1224 | | Enumerated | M,V | P | | | Y | | From-Address | 2708 | | UTF8String | M,V | P | | | N | | GGSN-Address | 847 | | Address | M,V | P | | | N | | IMS-Application-Reference-Identifier | 2601 | | UTF8String | M,V | P | | | N | | IMS-Charging-Identifier | 841 | | UTF8String | M,V | P | | | N | | IMS-Communication-Service-Identifier | 1281 | | UTF8String | M,V | P | | | N | | IMS-Emergency-Indicator | 2322 | | Enumerated | M,V | P | | | N | | IMS-Information | 876 | | Grouped | M,V | P | | | N | | IMSI-Unauthenticated-Flag | 2308 | | Enumerated | M,V | P | | | N | | IP-Realm-Default-Indication | 2603 | | Enumerated | M,V | P | | | N | | Incoming-Trunk-Group-Id | 852 | | UTF8String | M,V | P | | | N | | Incremental-Cost | 2062 | | Grouped | M,V | P | | | N | | Initial-IMS-Charging-Identifier | 2321 | | UTF8String | M,V | P | | | N | | Inter-Operator-Identifier | 838 | | Grouped | M,V | P | | | N | | Interface-Id | 2003 | | UTF8String | M,V | P | | | N | | Interface-Port | 2004 | | UTF8String | M,V | P | | | N | | Interface-Text | 2005 | | UTF8String | M,V | P | | | N | | Interface-Type | 2006 | | Enumerated | M,V | P | | | N | | LCS-APN | 1231 | | UTF8String | M,V | P | | | N | | LCS-Client-Dialed-By-MS | 1233 | | UTF8String | M,V | P | | | N | | LCS-Client-External-ID | 1234 | | UTF8String | M,V | P | | | N | | LCS-Client-Id | 1232 | | Grouped | M,V | P | | | N | | LCS-Client-Name | 1235 | | Grouped | M,V | P | | | N | | LCS-Client-Type | 1241 | | Enumerated | M,V | P | | | N | | LCS-Data-Coding-Scheme | 1236 | | UTF8String | M,V | P | | | N | | LCS-Format-Indicator | 1237 | | Enumerated | M,V | P | | | N | | LCS-Information | 878 | | Grouped | M,V | P | | | N | | LCS-Name-String | 1238 | | UTF8String | M,V | P | | | N | | LCS-Requestor-Id | 1239 | | Grouped | M,V | P | | | N | | LCS-Requestor-Id-String | 1240 | | UTF8String | M,V | P | | | N | | Local-GW-Inserted-Indication | 2604 | | Enumerated | M,V | P | | | N | | Local-Sequence-Number | 2063 | | Unsigned32 | M,V | P | | | N | | Location-Estimate | 1242 | | OctetString | M,V | P | | | N | | Location-Estimate-Type | 1243 | | Enumerated | M,V | P | | | N | | Location-Type | 1244 | | Grouped | M,V | P | | | N | | Low-Balance-Indication | 2020 | | Enumerated | M,V | P | | | N | | Low-Priority-Indicator | 2602 | | Enumerated | M,V | P | | | N | | MBMS GW-Address | 2307 | | Address | M,V | P | | | N | | MBMS-Information | 880 | | Grouped | M,V | P | | | N | | MBMS-User-Service-Type | 1225 | | Enumerated | M,V | P | | | Y | | MM-Content-Type | 1203 | | Grouped | M,V | P | | | N | | MMBox-Storage-Requested | 1248 | | Enumerated | M,V | P | | | N | | MMS-Information | 877 | | Grouped | M,V | P | | | N | | MMTel-Information | 2030 | | Grouped | M,V | P | | | N | | MMTel-SService-Type | 2031 | | Unsigned32 | M,V | P | | | N | | Media-Initiator-Flag | 882 | | Enumerated | M,V | P | | | N | | Media-Initiator-Party | 1288 | | UTF8String | M,V | P | | | N | | Message-Body | 889 | | Grouped | M,V | P | | | N | | Message-Class | 1213 | | Grouped | M,V | P | | | N | | Message-ID | 1210 | | UTF8String | M,V | P | | | N | | Message-Size | 1212 | | Unsigned32 | M,V | P | | | N | | Message-Type | 1211 | | Enumerated | M,V | P | | | N | | NNI-Information | 2703 | | Grouped | M,V | P | | | N | | NNI-Type | 2704 | | Enumerated | M,V | P | | | N | | Neighbour-Node-Address | 2705 | | Address | M,V | P | | | N | | Next-Tariff | 2057 | | Grouped | V/M | P | | | N | | Node-Functionality | 862 | | Enumerated | M,V | P | | | N | | Node-Id | 2064 | | UTF8String | M,V | P | | | N | | Number-Of-Diversions | 2034 | | Unsigned32 | M,V | P | | | N | | Number-Of-Messages-Sent | 2019 | | Unsigned32 | M,V | P | | | N | | Number-Of-Participants | 885 | | Unsigned32 | M,V | P | | | N | | Number-Of-Received-Talk-Bursts | 1282 | | Unsigned32 | M,V | P | | | N | | Number-Of-Talk-Bursts | 1283 | | Unsigned32 | M,V | P | | | N | | Number-Portability-Routing-Information | 2024 | | UTF8String | M,V | P | | | N | | Offline-Charging | 1278 | | Grouped | M,V | P | | | N | | Online-Charging-Flag | 2303 | | Enumerated | M,V | P | | | N | | Originating-IOI | 839 | | UTF8String | M,V | P | | | N | | Originator | 864 | | Enumerated | M,V | P | | | N | | Originator-Address | 886 | | Grouped | M,V | P | | | N | | Originator-Interface | 2009 | | Grouped | M,V | P | | | N | | Originator-Received-Address | 2027 | | Grouped | M,V | P | | | N | | Originator-SCCP-Address | 2008 | | Address | M,V | P | | | N | | Outgoing-Session-Id | 2320 | | UTF8String | M,V | P | | | N | | Outgoing-Trunk-Group-Id | 853 | | UTF8String | M,V | P | | | N | | PDG-Address | 895 | | Address | M,V | P | | | N | | PDG-Charging-Id | 896 | | Unsigned32 | M,V | P | | | N | | PDN-Connection-Charging-ID | 2050 | | Unsigned32 | M,V | P | | | N | | PDP-Address | 1227 | | Address | M,V | P | | | Y | | PDP-Address-Prefix-Length | 2606 | | Unsigned32 | M,V | P | | | Y | | PDP-Context-Type | 1247 | | Enumerated | M,V | P | | | N | | PS-Append-Free-Format-Data | 867 | | Enumerated | M,V | P | | | N | | PS-Free-Format-Data | 866 | | OctetString | M,V | P | | | N | | PS-Furnish-Charging-Information | 865 | | Grouped | M,V | P | | | N | | PS-Information | 874 | | Grouped | M,V | P | | | N | | Participant-Access-Priority | 1259 | | Enumerated | M,V | P | | | N | | Participant-Action-Type | 2049 | | Enumerated | M,V | P | | | N | | Participant-Group | 1260 | | Grouped | M,V | P | | | N | | Participants-Involved | 887 | | UTF8String | M,V | P | | | N | | PoC-Change-Condition | 1261 | | Enumerated | M,V | P | | | N | | PoC-Change-Time | 1262 | | Time | M,V | P | | | N | | PoC-Controlling-Address | 858 | | UTF8String | M,V | P | | | N | | PoC-Event-Type | 2025 | | Enumerated | M,V | P | | | N | | PoC-Group-Name | 859 | | UTF8String | M,V | P | | | N | | PoC-Information | 879 | | Grouped | M,V | P | | | N | | PoC-Server-Role | 883 | | Enumerated | M,V | P | | | N | | PoC-Session-Id | 1229 | | UTF8String | M,V | P | | | N | | PoC-Session-Initiation-type | 1277 | | Enumerated | M,V | P | | | N | | PoC-Session-Type | 884 | | Enumerated | M,V | P | | | N | | PoC-User-Role | 1252 | | Grouped | M,V | P | | | N | | PoC-User-Role-IDs | 1253 | | UTF8String | M,V | P | | | N | | PoC-User-Role-info-Units | 1254 | | Enumerated | M,V | P | | | N | | Positioning-Data | 1245 | | UTF8String | M,V | P | | | N | | Preferred-AoC-Currency | 2315 | | Unsigned32 | M,V | P | | | N | | Priority | 1209 | | Enumerated | M,V | P | | | N | | Quota-Consumption-Time | 881 | | Unsigned32 | M,V | P | | | N | | Quota-Holding-Time | 871 | | Unsigned32 | M,V | P | | | N | | Rate-Element | 2058 | | Grouped | M,V | P | | | N | | Read-Reply-Report-Requested | 1222 | | Enumerated | M,V | P | | | N | | Real-Time-Tariff-Information | 2305 | | Grouped | M,V | P | | | N | | Received-Talk-Burst-Time | 1284 | | Unsigned32 | M,V | P | | | N | | Received-Talk-Burst-Volume | 1285 | | Unsigned32 | M,V | P | | | N | | Recipient-Address | 1201 | | Grouped | M,V | P | | | N | | Recipient-Info | 2026 | | Grouped | M,V | P | | | N | | Recipient-Received-Address | 2028 | | Grouped | M,V | P | | | N | | Recipient-SCCP-Address | 2010 | | Address | M,V | P | | | N | | Refund-Information | 2022 | | OctetString | M,V | P | | | N | | Relationship-Mode | 2706 | | Enumerated | M,V | P | | | N | | Remaining-Balance | 2021 | | Grouped | M,V | P | | | N | | Reply-Applic-ID | 1223 | | UTF8String | M,V | P | | | N | | Reply-Path-Requested | 2011 | | Enumerated | M,V | P | | | N | | Reporting-Reason | 872 | | Enumerated | M,V | P | | | N | | Requested-Party-Address | 1251 | | UTF8String | M,V | P | | | N | | Role-Of-Node | 829 | | Enumerated | M,V | P | | | N | | SDP-Answer-Timestamp | 1275 | | Time | M,V | P | | | N | | SDP-Media-Component | 843 | | Grouped | M,V | P | | | N | | SDP-Media-Description | 845 | | UTF8String | M,V | P | | | N | | SDP-Media-Name | 844 | | UTF8String | M,V | P | | | N | | SDP-Offer-Timestamp | 1274 | | Time | M,V | P | | | N | | SDP-Session-Description | 842 | | UTF8String | M,V | P | | | N | | SDP-TimeStamps | 1273 | | Grouped | M,V | P | | | N | | SDP-Type | 2036 | | Enumerated | M,V | P | | | N | | SGSN-Address | 1228 | | Address | M,V | P | | | N | | SGW-Address | 2067 | | Address | M,V | P | | | N | | SGW-Change | 2065 | | Enumerated | M,V | P | | | N | | SIP-Method | 824 | | UTF8String | M,V | P | | | N | | SIP-Request-Timestamp | 834 | | Time | M,V | P | | | N | | SIP-Request-Timestamp-Fraction | 2301 | | Unsigned32 | M,V | P | | | N | | SIP-Response-Timestamp | 835 | | Time | M,V | P | | | N | | SIP-Response-Timestamp-Fraction | 2302 | | Unsigned32 | M,V | P | | | N | | SM-Discharge-Time | 2012 | | Time | M,V | P | | | N | | SM-Message-Type | 2007 | | Enumerated | M,V | P | | | N | | SM-Protocol-ID | 2013 | | OctetString | M,V | P | | | N | | SM-Service-Type | 2029 | | Enumerated | M,V | P | | | N | | SM-Status | 2014 | | OctetString | M,V | P | | | N | | SM-User-Data-Header | 2015 | | OctetString | M,V | P | | | N | | SMS-Information | 2000 | | Grouped | M,V | P | | | N | | SMS-Node | 2016 | | Enumerated | M,V | P | | | N | | SMSC-Address | 2017 | | Address | M,V | P | | | N | | Scale-Factor | 2059 | | Grouped | M,V | P | | | N | | Served-Party-IP-Address | 848 | | Address | M,V | P | | | N | | Service-Data-Container | 2040 | | Grouped | M,V | P | | | N | | Service-Id | 855 | | UTF8String | M,V | P | | | N | | Service-Information | 873 | | Grouped | M,V | P | | | N | | Service-Mode | 2032 | | Unsigned32 | M,V | P | | | N | | Service-Specific-Data | 863 | | UTF8String | M,V | P | | | N | | Service-Specific-Info | 1249 | | Grouped | M,V | P | | | N | | Service-Specific-Type | 1257 | | Unsigned32 | M,V | P | | | N | | Serving-Node-Type | 2047 | | Enumerated | M,V | P | | | N | | Session-Direction | 2707 | | Enumerated | M,V | P | | | N | | Start-Time | 2041 | | Time | M,V | P | | | N | | Status | 2702 | | Enumerated | M,V | P | | | N | | Stop-Time | 2042 | | Time | M,V | P | | | N | | Submission-Time | 1202 | | Time | M,V | P | | | N | | Subscriber-Role | 2033 | | Enumerated | M,V | P | | | N | | Supplementary-Service | 2048 | | Grouped | M,V | P | | | N | | Talk-Burst-Exchange | 1255 | | Grouped | M,V | P | | | N | | Talk-Burst-Time | 1286 | | Unsigned32 | M,V | P | | | N | | Talk-Burst-Volume | 1287 | | Unsigned32 | M,V | P | | | N | | Tariff-Information | 2060 | | Grouped | M,V | P | | | N | | Tariff-XML | 2306 | | UTF8String | M,V | P | | | N | | Terminating-IOI | 840 | | UTF8String | M,V | P | | | N | | Time-First-Usage | 2043 | | Time | M,V | P | | | N | | Time-Last-Usage | 2044 | | Time | M,V | P | | | N | | Time-Quota-Mechanism | 1270 | | Grouped | M,V | P | | | N | | Time-Quota-Threshold | 868 | | Unsigned32 | M,V | P | | | N | | Time-Quota-Type | 1271 | | Enumerated | M,V | P | | | N | | Time-Stamps | 833 | | Grouped | M,V | P | | | N | | Time-Usage | 2045 | | Unsigned32 | M,V | P | | | N | | Token-Text | 1215 | | UTF8String | M,V | P | | | N | | Traffic-Data-Volumes | 2046 | | Grouped | M,V | P | | | N | | Transcoder-Inserted-Indication | 2605 | | Enumerated | M,V | P | | | N | | Transit-IOI-List | 2701 | | UTF8String | M,V | P | | | N | | Trigger | 1264 | | Grouped | M,V | P | | | N | | Trigger-Type | 870 | | Enumerated | M,V | P | | | N | | Trunk-Group-Id | 851 | | Grouped | M,V | P | | | N | | Type-Number | 1204 | | Enumerated | M,V | P | | | N | | Unit-Cost | 2061 | | Grouped | M,V | P | | | N | | Unit-Quota-Threshold | 1226 | | Unsigned32 | M,V | P | | | N | | User-CSG-Information | 2319 | | Grouped | M,V | P | | | N | | User-Participating-Type | 1279 | | Enumerated | M,V | P | | | N | | User-Session-Id | 830 | | UTF8String | M,V | P | | | N | | Volume-Quota-Threshold | 869 | | Unsigned32 | M,V | P | | | N | | WAG-Address | 890 | | Address | M,V | P | | | N | | WAG-PLMN-Id | 891 | | OctetString | M,V | P | | | N | | WLAN-Information | 875 | | Grouped | M,V | P | | | N | | WLAN-Radio-Container | 892 | | Grouped | M,V | P | | | N | | WLAN-Session-Id | 1246 | | UTF8String | M,V | P | | | N | | WLAN-Technology | 893 | | Unsigned32 | M,V | P | | | N | | WLAN-UE-Local-IPAddress | 894 | | Address | M,V | P | | | N | | # 3GPP 29.272-c00 (12.0.0 2013.03.13) | | | | | | | | | | Subscription-Data | 1400 | 7.3.2 | Grouped | M,V | | | | N | | Terminal-Information | 1401 | 7.3.3 | Grouped | M,V | | | | N | | IMEI | 1402 | 7.3.4 | UTF8String | M,V | | | | N | | Software-Version | 1403 | 7.3.5 | UTF8String | M,V | | | | N | | QoS-Subscribed | 1404 | 7.3.77 | OctetString | M,V | | | | N | | ULR-Flags | 1405 | 7.3.7 | Unsigned32 | M,V | | | | N | | ULA-Flags | 1406 | 7.3.8 | Unsigned32 | M,V | | | | N | | Visited-PLMN-Id | 1407 | 7.3.9 | OctetString | M,V | | | | N | | Requested-EUTRAN-Authentication-Info | 1408 | 7.3.11 | Grouped | M,V | | | | N | | Requested-UTRAN- GERAN-Authentication-Info | 1409 | 7.3.12 | Grouped | M,V | | | | N | | Number-Of-Requested-Vectors | 1410 | 7.3.14 | Unsigned32 | M,V | | | | N | | Re-Synchronization-Info | 1411 | 7.3.15 | OctetString | M,V | | | | N | | Immediate-Response-Preferred | 1412 | 7.3.16 | Unsigned32 | M,V | | | | N | | Authentication-Info | 1413 | 7.3.17 | Grouped | M,V | | | | N | | E-UTRAN-Vector | 1414 | 7.3.18 | Grouped | M,V | | | | N | | UTRAN-Vector | 1415 | 7.3.19 | Grouped | M,V | | | | N | | GERAN-Vector | 1416 | 7.3.20 | Grouped | M,V | | | | N | | Network-Access-Mode | 1417 | 7.3.21 | Enumerated | M,V | | | | N | | HPLMN-ODB | 1418 | 7.3.22 | Unsigned32 | M,V | | | | N | | Item-Number | 1419 | 7.3.23 | Unsigned32 | M,V | | | | N | | Cancellation-Type | 1420 | 7.3.24 | Enumerated | M,V | | | | N | | DSR-Flags | 1421 | 7.3.25 | Unsigned32 | M,V | | | | N | | DSA-Flags | 1422 | 7.3.26 | Unsigned32 | M,V | | | | N | | Context-Identifier | 1423 | 7.3.27 | Unsigned32 | M,V | | | | N | | Subscriber-Status | 1424 | 7.3.29 | Enumerated | M,V | | | | N | | Operator-Determined-Barring | 1425 | 7.3.30 | Unsigned32 | M,V | | | | N | | Access-Restriction-Data | 1426 | 7.3.31 | Unsigned32 | M,V | | | | N | | APN-OI-Replacement | 1427 | 7.3.32 | UTF8String | M,V | | | | N | | All-APN-Configurations-Included-Indicator | 1428 | 7.3.33 | Enumerated | M,V | | | | N | | APN-Configuration-Profile | 1429 | 7.3.34 | Grouped | M,V | | | | N | | APN-Configuration | 1430 | 7.3.35 | Grouped | M,V | | | | N | | EPS-Subscribed-QoS-Profile | 1431 | 7.3.37 | Grouped | M,V | | | | N | | VPLMN-Dynamic-Address-Allowed | 1432 | 7.3.38 | Enumerated | M,V | | | | N | | STN-SR | 1433 | 7.3.39 | OctetString | M,V | | | | N | | Alert-Reason | 1434 | 7.3.83 | Enumerated | M,V | | | | N | | AMBR | 1435 | 7.3.41 | Grouped | M,V | | | | N | | CSG-Subscription-Data | 1436 | 7.3.78 | Grouped | M. V | | | | N | | CSG-Id | 1437 | 7.3.79 | Unsigned32 | M,V | | | | N | | PDN-GW-Allocation-Type | 1438 | 7.3.44 | Enumerated | M,V | | | | N | | Expiration-Date | 1439 | 7.3.80 | Time | M,V | | | | N | | RAT-Frequency-Selection-Priority-ID | 1440 | 7.3.46 | Unsigned32 | M,V | | | | N | | IDA-Flags | 1441 | 7.3.47 | Unsigned32 | M,V | | | | N | | PUA-Flags | 1442 | 7.3.48 | Unsigned32 | M,V | | | | N | | NOR-Flags | 1443 | 7.3.49 | Unsigned32 | M,V | | | | N | | User-Id | 1444 | 7.3.50 | UTF8String | V | | | M | N | | Equipment-Status | 1445 | 7.3.51 | Enumerated | M,V | | | | N | | Regional-Subscription-Zone-Code | 1446 | 7.3.52 | OctetString | M,V | | | | N | | RAND | 1447 | 7.3.53 | OctetString | M,V | | | | N | | XRES | 1448 | 7.3.54 | OctetString | M,V | | | | N | | AUTN | 1449 | 7.3.55 | OctetString | M,V | | | | N | | KASME | 1450 | 7.3.56 | OctetString | M,V | | | | N | | Trace-Collection-Entity | 1452 | 7.3.98 | Address | M,V | | | | N | | Kc | 1453 | 7.3.59 | OctetString | M,V | | | | N | | SRES | 1454 | 7.3.60 | OctetString | M,V | | | | N | | PDN-Type | 1456 | 7.3.62 | Enumerated | M,V | | | | N | | Roaming-Restricted-Due-To-Unsupported-Feature | 1457 | 7.3.81 | Enumerated | M,V | | | | N | | Trace-Data | 1458 | 7.3.63 | Grouped | M,V | | | | N | | Trace-Reference | 1459 | 7.3.64 | OctetString | M,V | | | | N | | Trace-Depth | 1462 | 7.3.67 | Enumerated | M,V | | | | N | | Trace-NE-Type-List | 1463 | 7.3.68 | OctetString | M,V | | | | N | | Trace-Interface-List | 1464 | 7.3.69 | OctetString | M,V | | | | N | | Trace-Event-List | 1465 | 7.3.70 | OctetString | M,V | | | | N | | OMC-Id | 1466 | 7.3.71 | OctetString | M,V | | | | N | | GPRS-Subscription-Data | 1467 | 7.3.72 | Grouped | M,V | | | | N | | Complete-Data-List-Included-Indicator | 1468 | 7.3.73 | Enumerated | M,V | | | | N | | PDP-Context | 1469 | 7.3.74 | Grouped | M,V | | | | N | | PDP-Type | 1470 | 7.3.75 | OctetString | M,V | | | | N | | 3GPP2-MEID | 1471 | 7.3.6 | OctetString | M,V | | | | N | | Specific-APN-Info | 1472 | 7.3.82 | Grouped | M,V | | | | N | | LCS-Info | 1473 | 7.3.84 | Grouped | M,V | | | | N | | GMLC-Number | 1474 | 7.3.85 | OctetString | M,V | | | | N | | LCS-PrivacyException | 1475 | 7.3.86 | Grouped | M,V | | | | N | | SS-Code | 1476 | 7.3.87 | OctetString | M,V | | | | N | | SS-Status | 1477 | 7.3.88 | Grouped | M,V | | | | N | | Notification-To-UE-User | 1478 | 7.3.89 | Enumerated | M,V | | | | N | | External-Client | 1479 | 7.3.90 | Grouped | M,V | | | | N | | Client-Identity | 1480 | 7.3.91 | OctetString | M,V | | | | N | | GMLC-Restriction | 1481 | 7.3.92 | Enumerated | M,V | | | | N | | PLMN-Client | 1482 | 7.3.93 | Enumerated | M,V | | | | N | | Service-Type | 1483 | 7.3.94 | Grouped | M,V | | | | N | | ServiceTypeIdentity | 1484 | 7.3.95 | Unsigned32 | M,V | | | | N | | MO-LR | 1485 | 7.3.96 | Grouped | M,V | | | | N | | Teleservice-List | 1486 | 7.3.99 | Grouped | M,V | | | | N | | TS-Code | 1487 | 7.3.100 | OctetString | M,V | | | | N | | Call-Barring-Infor-List | 1488 | 7.3.101 | Grouped | M,V | | | | N | | SGSN-Number | 1489 | 7.3.102 | OctetString | M,V | | | | N | | IDR-Flags | 1490 | 7.3.103 | Unsigned32 | M,V | | | | N | | ICS-Indicator | 1491 | 7.3.104 | Enumerated | V | | | M | N | | IMS-Voice-Over-PS-Sessions-Supported | 1492 | 7.3.106 | Enumerated | V | | | M | N | | Homogeneous-Support-of-IMS-Voice-Over-PS-Sessions | 1493 | 7.3.107 | Enumerated | V | | | M | N | | Last-UE-Activity-Time | 1494 | 7.3.108 | Time | V | | | M | N | | EPS-User-State | 1495 | 7.3.110 | Grouped | V | | | M | N | | EPS-Location-Information | 1496 | 7.3.111 | Grouped | V | | | M | N | | MME-User-State | 1497 | 7.3.112 | Grouped | V | | | M | N | | SGSN-User-State | 1498 | 7.3.113 | Grouped | V | | | M | N | | User-State | 1499 | 7.3.114 | Enumerated | V | | | M | N | | MME-Location Information | 1600 | 7.3.115 | Grouped | V | | | M | N | | SGSN-Location-Information | 1601 | 7.3.116 | Grouped | V | | | M | N | | E-UTRAN-Cell-Global-Identity | 1602 | 7.3.117 | OctetString | V | | | M | N | | Tracking-Area-Identity | 1603 | 7.3.118 | OctetString | V | | | M | N | | Cell-Global-Identity | 1604 | 7.3.119 | OctetString | V | | | M | N | | Routing-Area-Identity | 1605 | 7.3.120 | OctetString | V | | | M | N | | Location-Area-Identity | 1606 | 7.3.121 | OctetString | V | | | M | N | | Service-Area-Identity | 1607 | 7.3.122 | OctetString | V | | | M | N | | Geographical-Information | 1608 | 7.3.123 | OctetString | V | | | M | N | | Geodetic-Information | 1609 | 7.3.124 | OctetString | V | | | M | N | | Current-Location-Retrieved | 1610 | 7.3.125 | Enumerated | V | | | M | N | | Age-Of-Location-Information | 1611 | 7.3.126 | Unsigned32 | V | | | M | N | | Active-APN | 1612 | 7.3.127 | Grouped | V | | | M | N | | Error-Diagnostic | 1614 | 7.3.128 | Enumerated | V | | | M | N | | Ext-PDP-Address | 1621 | 7.3.129 | Address | V | | | M | N | | UE-SRVCC-Capability | 1615 | 7.3.130 | Enumerated | V | | | M | N | | MPS-Priority | 1616 | 7.3.131 | Unsigned32 | V | | | M | N | | VPLMN-LIPA-Allowed | 1617 | 7.3.132 | Enumerated | V | | | M | N | | LIPA-Permission | 1618 | 7.3.133 | Enumerated | V | | | M | N | | Subscribed-Periodic-RAU-TAU-Timer | 1619 | 7.3.134 | Unsigned32 | V | | | M | N | | Ext-PDP-Type | 1620 | 7.3.75A | OctetString | V | | | M | N | | SIPTO-Permission | 1613 | 7.3.135 | Enumerated | V | | | M | N | | MDT-Configuration | 1622 | 7.3.136 | Grouped | V | | | M | N | | Job-Type | 1623 | 7.3.137 | Enumerated | V | | | M | N | | Area-Scope | 1624 | 7.3.138 | Grouped | V | | | M | N | | List-Of-Measurements | 1625 | 7.3.139 | Unsigned32 | V | | | M | N | | Reporting-Trigger | 1626 | 7.3.140 | Unsigned32 | V | | | M | N | | Report-Interval | 1627 | 7.3.141 | Enumerated | V | | | M | N | | Report-Amount | 1628 | 7.3.142 | Enumerated | V | | | M | N | | Event-Threshold-RSRP | 1629 | 7.3.143 | Unsigned32 | V | | | M | N | | Event-Threshold-RSRQ | 1630 | 7.3.144 | Unsigned32 | V | | | M | N | | Logging-Interval | 1631 | 7.3.145 | Enumerated | V | | | M | N | | Logging-Duration | 1632 | 7.3.146 | Enumerated | V | | | M | N | | Relay-Node-Indicator | 1633 | 7.3.147 | Enumerated | V | | | M | N | | MDT-User-Consent | 1634 | 7.3.148 | Enumerated | V | | | M | N | | PUR-Flags | 1635 | 7.3.149 | Unsigned32 | V | | | M | N | | Subscribed-VSRVCC | 1636 | 7.3.150 | Enumerated | V | | | M | N | | Equivalent-PLMN-List | 1637 | 7.3.151 | Grouped | V | | | M | N | | CLR-Flags | 1638 | 7.3.152 | Unsigned32 | V | | | M | N | | UVR-Flags | 1639 | 7.3.153 | Unsigned32 | M,V | | | | N | | UVA-Flags | 1640 | 7.3.154 | Unsigned32 | M,V | | | | N | | VPLMN-CSG-Subscription-Data | 1641 | 7.3.155 | Grouped | M,V | | | | N | | Time-Zone | 1642 | 7.3.163 | UTF8String | V | | | M | N | | A-MSISDN | 1643 | 7.3.157 | OctetString | V | | | M | N | | MME-Number-for-MT-SMS | 1645 | 7.3.159 | OctetString | V | | | M | N | | SMS-Register-Request | 1648 | 7.3.162 | Enumerated | V | | | M | N | | Local-Time-Zone | 1649 | 7.3.156 | Grouped | V | | | M | N | | Daylight-Saving-Time | 1650 | 7.3.164 | Enumerated | V | | | M | N | | Subscription-Data-Flags | 1654 | 7.3.165 | Unsigned32 | V | | | M | N | | Measurement-Period-UMTS | 1655 | 7.3.166 | Enumerated | V | | | M | N | | Measurement-Period-LTE | 1656 | 7.3.167 | Enumerated | V | | | M | N | | Collection-Period-RRM-LTE | 1657 | 7.3.168 | Enumerated | V | | | M | N | | Collection-Period-RRM-UMTS | 1658 | 7.3.169 | Enumerated | V | | | M | N | | Positioning-Method | 1659 | 7.3.170 | OctetString | V | | | M | N | | Measurement-Quantity | 1660 | 7.3.171 | OctetString | V | | | M | N | | Event-Threshold-Event-1F | 1661 | 7.3.172 | Integer32 | V | | | M | N | | Event-Threshold-Event-1I | 1662 | 7.3.173 | Integer32 | V | | | M | N | | # 3GPP 29.329-b50 (11.5.0 2012.12.21) | | | | | | | | | | User-Identity | 700 | 6.3.1 | Grouped | M,V | | | | N | | MSISDN | 701 | 6.3.2 | OctetString | M,V | | | | N | | # Name conflict with 29.229 User-Data (606), renamed | | | | | | | | | | User-Data-29.329 | 702 | 6.3.3 | OctetString | M,V | | | | N | | Data-Reference | 703 | 6.3.4 | Enumerated | M,V | | | | N | | Service-Indication | 704 | 6.3.5 | OctetString | M,V | | | | N | | Subs-Req-Type | 705 | 6.3.6 | Enumerated | M,V | | | | N | | Requested-Domain | 706 | 6.3.7 | Enumerated | M,V | | | | N | | Current-Location | 707 | 6.3.8 | Enumerated | M,V | | | | N | | Identity-Set | 708 | 6.3.10 | Enumerated | V | | | M | N | | Expiry-Time | 709 | 6.3.16 | Time | V | | | M | N | | Send-Data-Indication | 710 | 6.3.17 | Enumerated | V | | | M | N | | # in 29.229 | | | | | | | | | | # Server-Name | 602 | 6.3.9 | UTF8String | M,V | | | | N | | # Supported-Features | 628 | 6.3.11 | Grouped | V | M | | | N | | # Feature-List-ID | 629 | 6.3.12 | Unsigned32 | V | | | M | N | | # Feature-List | 630 | 6.3.13 | Unsigned32 | V | | | M | N | | # Supported-Applications | 631 | 6.3.14 | Grouped | V | | | M | N | | # Public-Identity | 601 | 6.3.15 | UTF8String | M,V | | | | N | | DSAI-Tag | 711 | 6.3.18 | OctetString | M,V | | | | N | | # in 29.229 | | | | | | | | | | # Wildcarded-Public-Identity | 634 | 6.3.19 | UTF8String | V | | | M | N | | Wildcarded-IMPU | 636 | 6.3.20 | UTF8String | V | | | M | N | | # in 29.229 | | | | | | | | | | # Session-Priority | 650 | 6.3.21 | Enumerated | V | | | M | N | | One-Time-Notification | 712 | 6.3.22 | Enumerated | V | | | M | N | | Requested-Nodes | 713 | 6.3.7A | Unsigned32 | V | | | M | N | | Serving-Node-Indication | 714 | 6.3.23 | Enumerated | V | | | M | N | | Repository-Data-ID | 715 | 6.3.24 | Grouped | V | | | M | N | | Sequence-Number | 716 | 6.3.25 | Unsigned32 | V | | | M | N | | UDR-Flags | 719 | 6.3.28 | Unsigned32 | V | | | M | N | | # OMA DDS Charging_Data V1.0 20110201-A | | | | | | | | | | Application-Server-Id | 2101 | 8.4 | UTF8String | M,V | | | | Y | | Application-Service-Type | 2102 | 8.4 | UTF8String | M,V | | | | Y | | Application-Session-Id | 2103 | 8.4 | UTF8String | M,V | | | | Y | | Content-ID | 2116 | 8.4 | UTF8String | M,V | | | | Y | | Content-provider-ID | 2117 | 8.4 | UTF8String | M,V | | | | Y | | DCD-Information | 2115 | 8.5.5 | Grouped | M,V | | | | Y | | Delivery-Status | 2104 | 8.4 | UTF8String | M,V | | | | Y | | IM-Information | 2110 | 8.5.6 | Grouped | M,V | | | | Y | | Number-Of-Messages-Successfully-Exploded | 2111 | 8.4 | Unsigned32 | M,V | | | | Y | | Number-Of-Messages-Successfully-Sent | 2112 | 8.4 | Unsigned32 | M,V | | | | Y | | Service-Generic-Information | 1256 | 8.5.10 | Grouped | M,V | | | | Y | | Total-Number-Of-Messages-Exploded | 2113 | 8.4 | Unsigned32 | M,V | | | | Y | | Total-Number-Of-Messages-Sent | 2114 | 8.4 | Unsigned32 | M,V | | | | Y | nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_dcca_starent/000077500000000000000000000000001333553357400247075ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_dcca_starent/CMakeLists.txt000066400000000000000000000006031333553357400274460ustar00rootroot00000000000000# The dict_dcca_starent extension PROJECT("Diameter DCCA (Diameter Credit Control Application) Starent dictionary definitions " C) # Compile as a module FD_ADD_EXTENSION(dict_dcca_starent dict_dcca_starent.c) #### ## INSTALL section ## INSTALL(TARGETS dict_dcca_starent LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-dictionary-rfc4006-extension-starent) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_dcca_starent/dict_dcca_starent.c000066400000000000000000000352161333553357400305170ustar00rootroot00000000000000/* * Dictionary definitions of objects specified in DCCA by Starent. */ #include /* The content of this file follows the same structure as dict_base_proto.c */ #define CHECK_dict_new( _type, _data, _parent, _ref ) \ CHECK_FCT( fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref)) ); #define CHECK_dict_search( _type, _criteria, _what, _result ) \ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); struct local_rules_definition { char *avp_name; enum rule_position position; int min; int max; }; #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) /* Attention! This version of the macro uses AVP_BY_NAME_ALL_VENDORS, in contrast to most other copies! */ #define PARSE_loc_rules( _rulearray, _parent) { \ int __ar; \ for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ struct dict_rule_data __data = { NULL, \ (_rulearray)[__ar].position, \ 0, \ (_rulearray)[__ar].min, \ (_rulearray)[__ar].max}; \ __data.rule_order = RULE_ORDER(__data.rule_position); \ CHECK_FCT( fd_dict_search( \ fd_g_config->cnf_dict, \ DICT_AVP, \ AVP_BY_NAME_ALL_VENDORS, \ (_rulearray)[__ar].avp_name, \ &__data.rule_avp, 0 ) ); \ if ( !__data.rule_avp ) { \ TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_name ); \ return ENOENT; \ } \ CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL), \ { \ TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \ (_rulearray)[__ar].avp_name ); \ return EINVAL; \ } ); \ } \ } #define enumval_def_u32( _val_, _str_ ) \ { _str_, { .u32 = _val_ }} #define enumval_def_os( _len_, _val_, _str_ ) \ { _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}} static int dict_dcca_starent_entry(char * conffile) { /* Applications section */ { /* Create the vendors */ { struct dict_vendor_data vendor_data = { 8164, "Starent" }; CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data, NULL, NULL)); } } struct dict_object * Address_type; struct dict_object * DiameterIdentity_type; struct dict_object * DiameterURI_type; struct dict_object * IPFilterRule_type; struct dict_object * Time_type; struct dict_object * UTF8String_type; CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Address", &Address_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterIdentity", &DiameterIdentity_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterURI", &DiameterURI_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "IPFilterRule", &IPFilterRule_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Time", &Time_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type); /* The following is created automatically. Do not modify. */ /* Changes will be lost during the next update. Modify the source org file instead. */ /* Cisco ASR 5000 Series AAA Interface */ /* Administration and Reference */ /* Release 8.x and 9.0 */ /* Last Updated June 30, 2010 */ /* updated using v15 docs from Jan 2014 */ /* www.cisco.com/c/dam/en/us/td/docs/wireless/asr_5000/15-0/15-0-AAA-Reference.pdf */ /* SN-Volume-Quota-Threshold */ { struct dict_avp_data data = { 501, /* Code */ 8164, /* Vendor */ "SN-Volume-Quota-Threshold", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SN-Unit-Quota-Threshold */ { struct dict_avp_data data = { 502, /* Code */ 8164, /* Vendor */ "SN-Unit-Quota-Threshold", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SN-Time-Quota-Threshold */ { struct dict_avp_data data = { 503, /* Code */ 8164, /* Vendor */ "SN-Time-Quota-Threshold", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SN-Total-Used-Service-Unit */ { struct dict_avp_data data = { 504, /* Code */ 8164, /* Vendor */ "SN-Total-Used-Service-Unit", /* Name */ AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SN-Absolute-Validity-Time */ { struct dict_avp_data data = { 505, /* Code */ 8164, /* Vendor */ "SN-Absolute-Validity-Time", /* Name */ AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* SN-Bandwidth-Control */ { struct dict_avp_data data = { 512, /* Code */ 8164, /* Vendor */ "SN-Bandwidth-Control", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Starent/Enumerated(SN-Bandwidth-Control)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* SN-Transparent-Data */ { struct dict_avp_data data = { 513, /* Code */ 8164, /* Vendor */ "SN-Transparent-Data", /* Name */ AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SN-Traffic-Policy */ { struct dict_avp_data data = { 514, /* Code */ 8164, /* Vendor */ "SN-Traffic-Policy", /* Name */ AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* SN-Firewall-Policy */ { struct dict_avp_data data = { 515, /* Code */ 8164, /* Vendor */ "SN-Firewall-Policy", /* Name */ AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* SN-Usage-Monitoring-Control */ { struct dict_avp_data data = { 517, /* Code */ 8164, /* Vendor */ "SN-Usage-Monitoring-Control", /* Name */ AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SN-Monitoring-Key */ { struct dict_avp_data data = { 518, /* Code */ 8164, /* Vendor */ "SN-Monitoring-Key", /* Name */ AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SN-Usage-Volume */ { struct dict_avp_data data = { 519, /* Code */ 8164, /* Vendor */ "SN-Usage-Volume", /* Name */ AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SN-Service-Flow-Detection */ { struct dict_avp_data data = { 520, /* Code */ 8164, /* Vendor */ "SN-Service-Flow-Detection", /* Name */ AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Starent/Enumerated(SN-Service-Flow-Detection)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* SN-Usage-Monitoring */ { struct dict_avp_data data = { 521, /* Code */ 8164, /* Vendor */ "SN-Usage-Monitoring", /* Name */ AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Starent/Enumerated(SN-Usage-Monitoring)", NULL, NULL, NULL }; CHECK_dict_new(DICT_TYPE, &tdata, NULL, &type); CHECK_dict_new(DICT_AVP, &data, type, NULL); }; /* SN-Session-Start-Indicator */ { struct dict_avp_data data = { 522, /* Code */ 8164, /* Vendor */ "SN-Session-Start-Indicator", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SN-Phase0-PSAPName */ { struct dict_avp_data data = { 523, /* Code */ 8164, /* Vendor */ "SN-Phase0-PSAPName", /* Name */ AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* SN-Charging-Id */ { struct dict_avp_data data = { 525, /* Code */ 8164, /* Vendor */ "SN-Charging-Id", /* Name */ AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SN-Remaining-Service-Unit */ { struct dict_avp_data data = { 526, /* Code */ 8164, /* Vendor */ "SN-Remaining-Service-Unit", /* Name */ AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SN-Service-Start-Timestamp */ { struct dict_avp_data data = { 527, /* Code */ 8164, /* Vendor */ "SN-Service-Start-Timestamp", /* Name */ AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, Time_type, NULL); }; /* SN-Rulebase-Id */ { struct dict_avp_data data = { 528, /* Code */ 8164, /* Vendor */ "SN-Rulebase-Id", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* SN-CF-Policy-ID */ { struct dict_avp_data data = { 529, /* Code */ 8164, /* Vendor */ "SN-CF-Policy-ID", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SN-Charging-Collection-Function-Name */ { struct dict_avp_data data = { 530, /* Code */ 8164, /* Vendor */ "SN-Charging-Collection-Function-Name", /* Name */ AVP_FLAG_VENDOR, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, UTF8String_type, NULL); }; /* SN-Fast-Reauth-Username */ { struct dict_avp_data data = { 11010, /* Code */ 8164, /* Vendor */ "SN-Fast-Reauth-Username", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* SN-Pseudonym-Username */ { struct dict_avp_data data = { 11011, /* Code */ 8164, /* Vendor */ "SN-Pseudonym-Username", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); }; /* Rules section */ /* SN-Remaining-Service-Unit */ { struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 8164; vpa.avp_name = "SN-Remaining-Service-Unit"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { "Tariff-Change-Usage", RULE_OPTIONAL, -1, 1 }, { "CC-Time", RULE_OPTIONAL, -1, 1 }, { "CC-Total-Octets", RULE_OPTIONAL, -1, 1 }, { "CC-Input-Octets", RULE_OPTIONAL, -1, 1 }, { "CC-Output-Octets", RULE_OPTIONAL, -1, 1 }, { "CC-Service-Specific-Units", RULE_OPTIONAL, -1, 1 }, { "Reporting-Reason", RULE_OPTIONAL, -1, 1 } }; PARSE_loc_rules( rules, rule_avp ); } /* SN-Total-Used-Service-Unit */ { struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 8164; vpa.avp_name = "SN-Total-Used-Service-Unit"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { "Tariff-Change-Usage", RULE_OPTIONAL, -1, 1 }, { "CC-Time", RULE_OPTIONAL, -1, 1 }, { "CC-Total-Octets", RULE_OPTIONAL, -1, 1 }, { "CC-Input-Octets", RULE_OPTIONAL, -1, 1 }, { "CC-Output-Octets", RULE_OPTIONAL, -1, 1 }, { "CC-Service-Specific-Units", RULE_OPTIONAL, -1, 1 }, { "Reporting-Reason", RULE_OPTIONAL, -1, 1 } }; PARSE_loc_rules( rules, rule_avp ); } /* SN-Usage-Monitoring-Control */ { struct dict_object *rule_avp; struct dict_avp_request vpa; vpa.avp_vendor = 8164; vpa.avp_name = "SN-Usage-Monitoring-Control"; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_AND_VENDOR, &vpa, &rule_avp); struct local_rules_definition rules[] = { { "SN-Monitoring-Key", RULE_OPTIONAL, -1, 1 }, { "SN-Usage-Monitoring", RULE_OPTIONAL, -1, 1 }, { "SN-Usage-Volume", RULE_OPTIONAL, -1, 1 }, }; PARSE_loc_rules( rules, rule_avp ); } LOG_D( "Extension 'Dictionary definitions for DCCA Starent' initialized"); return 0; } EXTENSION_ENTRY("dict_dcca_starent", dict_dcca_starent_entry, "dict_dcca_3gpp"); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_dcca_starent/dict_dcca_starent.org000066400000000000000000000121301333553357400310520ustar00rootroot00000000000000| Attribute Name | Code | Section defined | Value Type | MUST | MAY | SHLD NOT | MUST NOT | Encr | | # Cisco ASR 5000 Series AAA Interface | | | | | | | | | | # Administration and Reference | | | | | | | | | | # Release 8.x and 9.0 | | | | | | | | | | # Last Updated June 30, 2010 | | | | | | | | | | # updated using v15 docs from Jan 2014 | | | | | | | | | | # www.cisco.com/c/dam/en/us/td/docs/wireless/asr_5000/15-0/15-0-AAA-Reference.pdf | | | | | | | | | | SN-Volume-Quota-Threshold | 501 | | Unsigned32 | M,V | | | | | | SN-Unit-Quota-Threshold | 502 | | Unsigned32 | M,V | | | | | | SN-Time-Quota-Threshold | 503 | | Unsigned32 | M,V | | | | | | SN-Total-Used-Service-Unit | 504 | | Grouped | V | | | | | | SN-Absolute-Validity-Time | 505 | | Time | V | | | | | | SN-Bandwidth-Control | 512 | | Enumerated | M,V | | | | | | SN-Transparent-Data | 513 | | OctetString | V | | | | | | SN-Traffic-Policy | 514 | | UTF8String | V | | | | | | SN-Firewall-Policy | 515 | | UTF8String | V | | | | | | SN-Usage-Monitoring-Control | 517 | | Grouped | V | | | | | | SN-Monitoring-Key | 518 | | Unsigned32 | V | | | | | | SN-Usage-Volume | 519 | | Unsigned64 | V | | | | | | SN-Service-Flow-Detection | 520 | | Enumerated | V | | | | | | SN-Usage-Monitoring | 521 | | Enumerated | V | | | | | | SN-Session-Start-Indicator | 522 | | OctetString | M,V | | | | | | SN-Phase0-PSAPName | 523 | | UTF8String | V | | | | | | SN-Charging-Id | 525 | | OctetString | V | | | | | | SN-Remaining-Service-Unit | 526 | | Grouped | V | | | | | | SN-Service-Start-Timestamp | 527 | | Time | V | | | | | | SN-Rulebase-Id | 528 | | UTF8String | M,V | | | | | | SN-CF-Policy-ID | 529 | | Unsigned32 | M,V | | | | | | SN-Charging-Collection-Function-Name | 530 | | UTF8String | V | | | | | | SN-Fast-Reauth-Username | 11010 | | OctetString | M,V | | | | | | SN-Pseudonym-Username | 11011 | | OctetString | M,V | | | | | nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_eap/000077500000000000000000000000001333553357400230225ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_eap/CMakeLists.txt000066400000000000000000000004461333553357400255660ustar00rootroot00000000000000# The dict_eap extension PROJECT("Diameter EAP (RFC4072) dictionary definitions" C) # Compile as a module FD_ADD_EXTENSION(dict_eap dict_eap.c) #### ## INSTALL section ## INSTALL(TARGETS dict_eap LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-dictionary-RFC4072) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_eap/dict_eap.c000066400000000000000000000543111333553357400247420ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* * Dictionary definitions of objects specified in Diameter EAP application (RFC4072). */ #include /* The content of this file follows the same structure as dict_base_proto.c */ #define CHECK_dict_new( _type, _data, _parent, _ref ) \ CHECK_FCT( fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref)) ); #define CHECK_dict_search( _type, _criteria, _what, _result ) \ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); struct local_rules_definition { char *avp_name; enum rule_position position; int min; int max; }; #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) #define PARSE_loc_rules( _rulearray, _parent) { \ int __ar; \ for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ struct dict_rule_data __data = { NULL, \ (_rulearray)[__ar].position, \ 0, \ (_rulearray)[__ar].min, \ (_rulearray)[__ar].max}; \ __data.rule_order = RULE_ORDER(__data.rule_position); \ CHECK_FCT( fd_dict_search( \ fd_g_config->cnf_dict, \ DICT_AVP, \ AVP_BY_NAME, \ (_rulearray)[__ar].avp_name, \ &__data.rule_avp, 0 ) ); \ if ( !__data.rule_avp ) { \ TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_name ); \ return ENOENT; \ } \ CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL), \ { \ TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \ (_rulearray)[__ar].avp_name ); \ return EINVAL; \ } ); \ } \ } #define enumval_def_u32( _val_, _str_ ) \ { _str_, { .u32 = _val_ }} #define enumval_def_os( _len_, _val_, _str_ ) \ { _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}} static int deap_entry(char * conffile) { struct dict_object * eap; TRACE_ENTRY("%p", conffile); /* Applications section */ { /* EAP (RFC 4072) */ { struct dict_application_data data = { 5, "Diameter Extensible Authentication Protocol (EAP) Application" }; CHECK_dict_new( DICT_APPLICATION, &data , NULL, &eap); } } /* AVP section */ { /* EAP-Payload */ { /* The EAP-Payload AVP (AVP Code 462) is of type OctetString and is used to encapsulate the actual EAP packet that is being exchanged between the EAP client and the home Diameter server. */ struct dict_avp_data data = { 462, /* Code */ 0, /* Vendor */ "EAP-Payload", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* EAP-Reissued-Payload */ { /* The EAP-Reissued-Payload AVP (AVP Code 463) is of type OctetString. */ struct dict_avp_data data = { 463, /* Code */ 0, /* Vendor */ "EAP-Reissued-Payload", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* EAP-Master-Session-Key */ { /* The EAP-Master-Session-Key AVP (AVP Code 464) is of type OctetString. It contains keying material for protecting the communications between the user and the NAS. Exactly how this keying material is used depends on the link layer in question, and is beyond the scope of this document. */ struct dict_avp_data data = { 464, /* Code */ 0, /* Vendor */ "EAP-Master-Session-Key", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* EAP-Key-Name */ { /* The EAP-Key-Name AVP (Radius Attribute Type 102) is of type OctetString. It contains an opaque key identifier (name) generated by the EAP method. Exactly how this name is used depends on the link layer in question, and is beyond the scope of this document (see [EAPKey] for more discussion). Note that not all link layers use this name, and currently most EAP methods do not generate it. Since the NAS operates in pass-through mode, it cannot know the Key-Name before receiving it from the AAA server. As a result, a Key-Name AVP sent in a Diameter-EAP-Request MUST NOT contain any data. A home Diameter server receiving a Diameter-EAP-Request with a Key-Name AVP with non-empty data MUST silently discard the AVP. In addition, the home Diameter server SHOULD include this AVP in Diameter-EAP-Response only if an empty EAP-Key-Name AVP was present in Diameter-EAP-Request. */ struct dict_avp_data data = { 102, /* Code */ 0, /* Vendor */ "EAP-Key-Name", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Accounting-EAP-Auth-Method */ { /* The Accounting-EAP-Auth-Method AVP (AVP Code 465) is of type Unsigned64. In case of expanded types [EAP, Section 5.7], this AVP contains the value ((Vendor-Id * 2^32) + Vendor-Type). */ struct dict_avp_data data = { 465, /* Code */ 0, /* Vendor */ "Accounting-EAP-Auth-Method", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } } /********************/ /* Commands section */ /********************/ { /* To avoid defining global variables for all the AVP that we use here, we do search the dictionary in each sub-block. * This is far from optimal, but the code is clearer like this, and the time it requires at execution is not noticeable. */ /* Diameter-EAP-Request (DER) Command */ { /* The Diameter-EAP-Request (DER) command, indicated by the Command-Code field set to 268 and the 'R' bit set in the Command Flags field, is sent by a Diameter client to a Diameter server, and conveys an EAP-Response from the EAP client. The Diameter-EAP-Request MUST contain one EAP-Payload AVP containing the actual EAP payload. An EAP-Payload AVP with no data MAY be sent to the Diameter server to initiate an EAP authentication session. The DER message MAY be the result of a multi-round authentication exchange that occurs when the DEA is received with the Result-Code AVP set to DIAMETER_MULTI_ROUND_AUTH [BASE]. A subsequent DER message MUST include any State AVPs [NASREQ] that were present in the DEA. For re-authentication, it is recommended that the Identity request be skipped in order to reduce the number of authentication round trips. This is only possible when the user's identity is already known by the home Diameter server. Message format ::= < Diameter Header: 268, REQ, PXY > < Session-Id > { Auth-Application-Id } { Origin-Host } { Origin-Realm } { Destination-Realm } { Auth-Request-Type } [ Destination-Host ] [ NAS-Identifier ] [ NAS-IP-Address ] [ NAS-IPv6-Address ] [ NAS-Port ] [ NAS-Port-Id ] [ NAS-Port-Type ] [ Origin-State-Id ] [ Port-Limit ] [ User-Name ] { EAP-Payload } [ EAP-Key-Name ] [ Service-Type ] [ State ] [ Authorization-Lifetime ] [ Auth-Grace-Period ] [ Auth-Session-State ] [ Callback-Number ] [ Called-Station-Id ] [ Calling-Station-Id ] [ Originating-Line-Info ] [ Connect-Info ] * [ Framed-Compression ] [ Framed-Interface-Id ] [ Framed-IP-Address ] * [ Framed-IPv6-Prefix ] [ Framed-IP-Netmask ] [ Framed-MTU ] [ Framed-Protocol ] * [ Tunneling ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 268, /* Code */ "Diameter-EAP-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } ,{ "Auth-Request-Type", RULE_REQUIRED, -1, 1 } ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Identifier", RULE_OPTIONAL, -1, 1 } ,{ "NAS-IP-Address", RULE_OPTIONAL, -1, 1 } ,{ "NAS-IPv6-Address", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Port", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Port-Id", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Port-Type", RULE_OPTIONAL, -1, 1 } ,{ "Origin-State-Id", RULE_OPTIONAL, -1, 1 } ,{ "Port-Limit", RULE_OPTIONAL, -1, 1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "EAP-Payload", RULE_REQUIRED, -1, 1 } ,{ "EAP-Key-Name", RULE_OPTIONAL, -1, 1 } ,{ "Service-Type", RULE_OPTIONAL, -1, 1 } ,{ "State", RULE_OPTIONAL, -1, 1 } ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Session-State", RULE_OPTIONAL, -1, 1 } ,{ "Callback-Number", RULE_OPTIONAL, -1, 1 } ,{ "Called-Station-Id", RULE_OPTIONAL, -1, 1 } ,{ "Calling-Station-Id", RULE_OPTIONAL, -1, 1 } ,{ "Originating-Line-Info", RULE_OPTIONAL, -1, 1 } ,{ "Connect-Info", RULE_OPTIONAL, -1, 1 } ,{ "Framed-Compression", RULE_OPTIONAL, -1,-1 } ,{ "Framed-Interface-Id", RULE_OPTIONAL, -1, 1 } ,{ "Framed-IP-Address", RULE_OPTIONAL, -1, 1 } ,{ "Framed-IPv6-Prefix", RULE_OPTIONAL, -1,-1 } ,{ "Framed-IP-Netmask", RULE_OPTIONAL, -1, 1 } ,{ "Framed-MTU", RULE_OPTIONAL, -1, 1 } ,{ "Framed-Protocol", RULE_OPTIONAL, -1, 1 } ,{ "Tunneling", RULE_OPTIONAL, -1,-1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1,-1 } ,{ "Route-Record", RULE_OPTIONAL, -1,-1 } }; CHECK_dict_new( DICT_COMMAND, &data , eap, &cmd); PARSE_loc_rules( rules, cmd ); } /* Diameter-EAP-Answer (DEA) Command */ { /* The Diameter-EAP-Answer (DEA) message, indicated by the Command-Code field set to 268 and the 'R' bit cleared in the Command Flags field, is sent by the Diameter server to the client for one of the following reasons: 1. The message is part of a multi-round authentication exchange, and the server is expecting a subsequent Diameter-EAP-Request. This is indicated by setting the Result-Code to DIAMETER_MULTI_ROUND_AUTH, and MAY include zero or more State AVPs. 2. The EAP client has been successfully authenticated and authorized, in which case the message MUST include the Result-Code AVP indicating success, and SHOULD include an EAP-Payload of type EAP-Success. This event MUST cause the access device to provide service to the EAP client. 3. The EAP client has not been successfully authenticated and/or authorized, and the Result-Code AVP is set to indicate failure. This message SHOULD include an EAP-Payload, but this AVP is not used to determine whether service is to be provided. If the message from the Diameter client included a request for authorization, a successful response MUST include the authorization AVPs that are relevant to the service being provided. Message format ::= < Diameter Header: 268, PXY > < Session-Id > { Auth-Application-Id } { Auth-Request-Type } { Result-Code } { Origin-Host } { Origin-Realm } [ User-Name ] [ EAP-Payload ] [ EAP-Reissued-Payload ] [ EAP-Master-Session-Key ] [ EAP-Key-Name ] [ Multi-Round-Time-Out ] [ Accounting-EAP-Auth-Method ] [ Service-Type ] * [ Class ] * [ Configuration-Token ] [ Acct-Interim-Interval ] [ Error-Message ] [ Error-Reporting-Host ] * [ Failed-AVP ] [ Idle-Timeout ] [ Authorization-Lifetime ] [ Auth-Grace-Period ] [ Auth-Session-State ] [ Re-Auth-Request-Type ] [ Session-Timeout ] [ State ] * [ Reply-Message ] [ Origin-State-Id ] * [ Filter-Id ] [ Port-Limit ] [ Callback-Id ] [ Callback-Number ] [ Framed-Appletalk-Link ] * [ Framed-Appletalk-Network ] [ Framed-Appletalk-Zone ] * [ Framed-Compression ] [ Framed-Interface-Id ] [ Framed-IP-Address ] * [ Framed-IPv6-Prefix ] [ Framed-IPv6-Pool ] * [ Framed-IPv6-Route ] [ Framed-IP-Netmask ] * [ Framed-Route ] [ Framed-Pool ] [ Framed-IPX-Network ] [ Framed-MTU ] [ Framed-Protocol ] [ Framed-Routing ] * [ NAS-Filter-Rule ] * [ QoS-Filter-Rule ] * [ Tunneling ] * [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Max-Cache-Time ] * [ Proxy-Info ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 268, /* Code */ "Diameter-EAP-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Auth-Request-Type", RULE_REQUIRED, -1, 1 } ,{ "Result-Code", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "EAP-Payload", RULE_OPTIONAL, -1, 1 } ,{ "EAP-Reissued-Payload", RULE_OPTIONAL, -1, 1 } ,{ "EAP-Master-Session-Key", RULE_OPTIONAL, -1, 1 } ,{ "EAP-Key-Name", RULE_OPTIONAL, -1, 1 } ,{ "Multi-Round-Time-Out", RULE_OPTIONAL, -1, 1 } ,{ "Accounting-EAP-Auth-Method", RULE_OPTIONAL, -1, 1 } ,{ "Service-Type", RULE_OPTIONAL, -1, 1 } ,{ "Class", RULE_OPTIONAL, -1,-1 } ,{ "Configuration-Token", RULE_OPTIONAL, -1,-1 } ,{ "Acct-Interim-Interval", RULE_OPTIONAL, -1, 1 } ,{ "Error-Message", RULE_OPTIONAL, -1, 1 } ,{ "Error-Reporting-Host", RULE_OPTIONAL, -1, 1 } ,{ "Failed-AVP", RULE_OPTIONAL, -1,-1 } ,{ "Idle-Timeout", RULE_OPTIONAL, -1, 1 } ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Session-State", RULE_OPTIONAL, -1, 1 } ,{ "Re-Auth-Request-Type", RULE_OPTIONAL, -1, 1 } ,{ "Session-Timeout", RULE_OPTIONAL, -1, 1 } ,{ "State", RULE_OPTIONAL, -1, 1 } ,{ "Reply-Message", RULE_OPTIONAL, -1,-1 } ,{ "Origin-State-Id", RULE_OPTIONAL, -1, 1 } ,{ "Filter-Id", RULE_OPTIONAL, -1,-1 } ,{ "Port-Limit", RULE_OPTIONAL, -1, 1 } ,{ "Callback-Id", RULE_OPTIONAL, -1, 1 } ,{ "Callback-Number", RULE_OPTIONAL, -1, 1 } ,{ "Framed-AppleTalk-Link", RULE_OPTIONAL, -1, 1 } ,{ "Framed-AppleTalk-Network", RULE_OPTIONAL, -1,-1 } ,{ "Framed-AppleTalk-Zone", RULE_OPTIONAL, -1, 1 } ,{ "Framed-Compression", RULE_OPTIONAL, -1,-1 } ,{ "Framed-Interface-Id", RULE_OPTIONAL, -1, 1 } ,{ "Framed-IP-Address", RULE_OPTIONAL, -1, 1 } ,{ "Framed-IPv6-Prefix", RULE_OPTIONAL, -1,-1 } ,{ "Framed-IPv6-Pool", RULE_OPTIONAL, -1, 1 } ,{ "Framed-IPv6-Route", RULE_OPTIONAL, -1,-1 } ,{ "Framed-IP-Netmask", RULE_OPTIONAL, -1, 1 } ,{ "Framed-Route", RULE_OPTIONAL, -1,-1 } ,{ "Framed-Pool", RULE_OPTIONAL, -1, 1 } ,{ "Framed-IPX-Network", RULE_OPTIONAL, -1, 1 } ,{ "Framed-MTU", RULE_OPTIONAL, -1, 1 } ,{ "Framed-Protocol", RULE_OPTIONAL, -1, 1 } ,{ "Framed-Routing", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Filter-Rule", RULE_OPTIONAL, -1,-1 } ,{ "QoS-Filter-Rule", RULE_OPTIONAL, -1,-1 } ,{ "Tunneling", RULE_OPTIONAL, -1,-1 } ,{ "Redirect-Host", RULE_OPTIONAL, -1,-1 } ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1,-1 } }; CHECK_dict_new( DICT_COMMAND, &data , eap, &cmd); PARSE_loc_rules( rules, cmd ); } /* Accounting-Request */ { /* Add additional rules of the ABNF (compared to Base definition): Attribute Name | ACR | ACA | ---------------------------------------|-----+-----+ Accounting-EAP-Auth-Method | 0+ | 0 | */ struct dict_object * cmd; struct local_rules_definition rules[] = { { "Accounting-EAP-Auth-Method", RULE_OPTIONAL, -1,-1 } }; CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Accounting-Request", &cmd); PARSE_loc_rules( rules, cmd ); } } LOG_D( "Extension 'Dictionary definitions for EAP' initialized"); return 0; } EXTENSION_ENTRY("dict_eap", deap_entry, "dict_nasreq"); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_legacy_xml/000077500000000000000000000000001333553357400244015ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_legacy_xml/CMakeLists.txt000066400000000000000000000015771333553357400271530ustar00rootroot00000000000000# The dict_legacy_xml extension PROJECT("Legacy XML dictionary files support" C) # Parser files BISON_FILE(dict_lxml.y) FLEX_FILE(dict_lxml.l) SET_SOURCE_FILES_PROPERTIES(lex.dict_lxml.c dict_lxml.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}") # We use LibXml2 (from GNOME) to parse XML files FIND_PACKAGE(LibXml2 REQUIRED) # List of source files SET( DICT_LXML_SRC dict_lxml.c dict_lxml_xml.c dict_lxml.h lex.dict_lxml.c dict_lxml.tab.c dict_lxml.tab.h ) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) # Compile these files as a freeDiameter extension FD_ADD_EXTENSION(dict_legacy_xml ${DICT_LXML_SRC}) TARGET_LINK_LIBRARIES(dict_legacy_xml ${LIBXML2_LIBRARIES} ) #### ## INSTALL section ## INSTALL(TARGETS dict_legacy_xml LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-dictionary-legacy) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_legacy_xml/dict_lxml.c000066400000000000000000000051351333553357400265300ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2011, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* * Legacy XML dictionary files support for freeDiameter. */ #include "dict_lxml.h" /* entry point */ static int dict_lxml_entry(char * conffile) { TRACE_ENTRY("%p", conffile); /* Parse the configuration file -- everything happens there */ CHECK_FCT( dict_lxml_handle(conffile) ); /* We're done */ return 0; } EXTENSION_ENTRY("dict_legacy_xml", dict_lxml_entry); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_legacy_xml/dict_lxml.h000066400000000000000000000052121333553357400265310ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2011, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Header file for the dict_legacy_xml extension. * * See the dict_legacy_xml.conf.sample file for the format of the configuration file. */ /* FreeDiameter's common include file */ #include /* Parse the configuration file */ int dict_lxml_handle(char * conffile); /* Parse an XML file and return the number of dictionary objects or -1 on error */ int dict_lxml_parse(char * xmlfilename); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_legacy_xml/dict_lxml.l000066400000000000000000000070641333553357400265440ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Tokenizer * */ %{ #include "dict_lxml.h" /* Include yacc tokens definitions */ #include "dict_lxml.tab.h" /* Update the column information */ #define YY_USER_ACTION { \ yylloc->first_column = yylloc->last_column + 1; \ yylloc->last_column = yylloc->first_column + yyleng - 1; \ } /* Avoid warning with newer flex */ #define YY_NO_INPUT %} qstring \"[^\"\n]*\" %option bison-bridge bison-locations %option noyywrap %option nounput %% /* Update the line count */ \n { yylloc->first_line++; yylloc->last_line++; yylloc->last_column=0; } /* Eat all spaces but not new lines */ ([[:space:]]{-}[\n])+ ; /* Eat all comments */ #.*$ ; /* Recognize quoted strings */ {qstring} { /* Match a quoted string. */ CHECK_MALLOC_DO( yylval->string = strdup(yytext+1), { TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s", yytext, strerror(errno)); return LEX_ERROR; /* trig an error in yacc parser */ } ); yylval->string[strlen(yytext) - 2] = '\0'; return QSTRING; } /* Valid single characters for yyparse */ [;] { return yytext[0]; } /* Unrecognized sequence, if it did not match any previous pattern */ [^[:space:]\";\n]+ { fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); return LEX_ERROR; } %% nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_legacy_xml/dict_lxml.y000066400000000000000000000116021333553357400265520ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Yacc extension's configuration parser. * See doc/dict_legacy_xml.conf.sample for configuration file format */ /* For development only : */ %debug %error-verbose /* The parser receives the configuration file filename as parameter */ %parse-param {char * conffile} /* Keep track of location */ %locations %pure-parser %{ #include "dict_lxml.h" #include "dict_lxml.tab.h" /* bison is not smart enough to define the YYLTYPE before including this code, so... */ /* Forward declaration */ int yyparse(char * conffile); static int nb_files = 0; static int nb_dict = 0; /* Parse the configuration file */ int dict_lxml_handle(char * conffile) { extern FILE * dict_lxmlin; int ret; TRACE_ENTRY("%p", conffile); TRACE_DEBUG (FULL, "Parsing configuration file: %s...", conffile); dict_lxmlin = fopen(conffile, "r"); if (dict_lxmlin == NULL) { ret = errno; fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret)); TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file."); return ret; } ret = yyparse(conffile); fclose(dict_lxmlin); if (ret != 0) { TRACE_DEBUG (INFO, "Unable to parse the configuration file."); return EINVAL; } else { TRACE_DEBUG(FULL, "%d XML dictionary files parsed successfully, %d dictionary objects added.", nb_files, nb_dict); } return 0; } /* The Lex parser prototype */ int dict_lxmllex(YYSTYPE *lvalp, YYLTYPE *llocp); /* Function to report the errors */ void yyerror (YYLTYPE *ploc, char * conffile, char const *s) { TRACE_DEBUG(INFO, "Error in configuration parsing"); if (ploc->first_line != ploc->last_line) fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); else if (ploc->first_column != ploc->last_column) fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); else fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); } %} /* Values returned by lex for token */ %union { char *string; /* The string is allocated by strdup in lex.*/ } /* In case of error in the lexical analysis */ %token LEX_ERROR /* A (de)quoted string (malloc'd in lex parser; it must be freed after use) */ %token QSTRING /* -------------------------------------- */ %% /* The grammar definition */ conffile: /* empty grammar is OK */ | conffile xmlfile ; /* a RULE entry */ xmlfile: QSTRING ';' { int ret = dict_lxml_parse($1); if (ret < 0) { yyerror (&yylloc, conffile, "An error occurred while parsing a file, aborting..."); YYERROR; } nb_files++; nb_dict += ret; } ; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_legacy_xml/dict_lxml_xml.c000066400000000000000000001566341333553357400274230ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "dict_lxml.h" /* The internal freeDiameter dictionary has strong dependency relations between the different objects, as follow: vendor / \ application \ / \ | command \ | | type | | / \ | \ enumval \ | \ avp \ _____/ \ / rule It means an AVP cannot be defined unless the parent TYPE has already been defined, in turn depending on parent APPLICATION, etc. (top-to-bottom dependencies on the graph) On the other hand, the hierarchy of the XML format described in draft-frascone-xml-dictionary-00 does not enforce most of these dependencies, the structure is as follows: vendor application / | \ command | avp / type \ rule enumval (in addition if DTD validation was performed, command and avp refer to vendor, avp refers to type, but we do not do it for larger compatibility -- we just report when errors are found) As a consequence of this difference, it is impossible to parse the XML tree and create the dictionary objects in freeDiameter in only 1 pass. To avoid parsing the tree several times, we use a temporary structure in memory to contain all the data from the XML file, and when the parsing is complete we store all the objects in the dictionary. */ /* We use the SAX interface of libxml2 (from GNOME) to parse the XML file. */ #include /*******************************************/ /* Helper functions */ static int xmltoint(xmlChar * xmlinteger, uint32_t * conv) { TRACE_ENTRY("%p %p", xmlinteger, conv); /* Attempt at converting the string to an integer */ if (sscanf((char *)xmlinteger, "%u", conv) != 1) { TRACE_DEBUG(INFO, "Unable to convert '%s' to integer.", (char *)xmlinteger) return EINVAL; } return 0; } /******************************************* The temporary structure that is being built when the XML file is parsed *******************************************/ /* VENDOR */ struct t_vend { struct fd_list chain; /* link in the t_dictionary->vendors */ uint32_t id; uint8_t * name; }; static int new_vendor(struct fd_list * parent, xmlChar * xmlid, xmlChar * xmlname) { struct t_vend * new; uint32_t id = 0; TRACE_ENTRY("%p %p %p", parent, xmlid, xmlname); CHECK_PARAMS( parent && xmlid && xmlname ); CHECK_FCT( xmltoint(xmlid, &id) ); CHECK_MALLOC( new = malloc(sizeof(struct t_vend)) ); memset(new, 0, sizeof(struct t_vend)); fd_list_init(&new->chain, NULL); new->id = id; CHECK_MALLOC( new->name = (uint8_t *)strdup((char *)xmlname) ); fd_list_insert_before(parent, &new->chain); return 0; } static void dump_vendor(struct t_vend * v) { fd_log_debug(" Vendor %d:'%s'", v->id, (char *)v->name); } static void del_vendor_contents(struct t_vend * v) { TRACE_ENTRY("%p", v); free(v->name); } /* RULE */ struct t_rule { struct fd_list chain; /* link in either t_cmd or t_avp */ uint8_t * avpname; int max; int min; }; static int new_rule(struct fd_list * parent, xmlChar * xmlname, /* position is never used */ xmlChar * xmlmaximum, xmlChar * xmlminimum) { struct t_rule * new; uint32_t min, max; TRACE_ENTRY("%p %p %p %p", parent, xmlname, xmlmaximum, xmlminimum); CHECK_PARAMS( parent && xmlname ); CHECK_MALLOC( new = malloc(sizeof(struct t_rule)) ); memset(new, 0, sizeof(struct t_rule)); fd_list_init(&new->chain, NULL); if (xmlminimum) { CHECK_FCT( xmltoint(xmlminimum, &min) ); new->min = (int) min; } else { new->min = -1; } if (xmlmaximum) { CHECK_FCT( xmltoint(xmlmaximum, &max) ); new->max = (int) max; } else { new->max = -1; } CHECK_MALLOC( new->avpname = (uint8_t *)strdup((char *)xmlname) ); fd_list_insert_before(parent, &new->chain); return 0; } static void dump_rule(struct t_rule * r, char * prefix) { fd_log_debug("%s ", prefix); if (r->min != -1) fd_log_debug("m:%d ", r->min); if (r->max != -1) fd_log_debug("M:%d ", r->max); fd_log_debug("%s", (char *)r->avpname); } static void del_rule_contents(struct t_rule * r) { TRACE_ENTRY("%p",r); free(r->avpname); } /* COMMAND */ struct t_cmd { struct fd_list chain; /* link in t_appl->commands */ uint32_t code; uint8_t * name; uint8_t flags; uint8_t fmask; struct fd_list reqrules_fixed; /* list of t_rule */ struct fd_list reqrules_required; /* list of t_rule */ struct fd_list reqrules_optional; /* list of t_rule */ struct fd_list ansrules_fixed; /* list of t_rule */ struct fd_list ansrules_required; /* list of t_rule */ struct fd_list ansrules_optional; /* list of t_rule */ }; static int new_cmd(struct fd_list * parent, xmlChar * xmlcode, xmlChar * xmlname /*, ignore the vendor id because we don't use it */, xmlChar * xmlpbit, struct t_cmd **ret) { struct t_cmd * new; uint32_t code; uint32_t flag = 0; uint32_t fmask = 0; TRACE_ENTRY("%p %p %p %p", parent, xmlcode, xmlname, xmlpbit); CHECK_PARAMS( parent && xmlcode && xmlname ); CHECK_FCT( xmltoint(xmlcode, &code) ); if (xmlpbit) { uint32_t val; CHECK_FCT( xmltoint(xmlpbit, &val) ); fmask |= CMD_FLAG_PROXIABLE; if (val) flag |= CMD_FLAG_PROXIABLE; } CHECK_MALLOC( new = malloc(sizeof(struct t_cmd)) ); memset(new, 0, sizeof(struct t_cmd)); fd_list_init(&new->chain, NULL); new->code = code; CHECK_MALLOC( new->name = (uint8_t *)strdup((char *)xmlname) ); new->flags = flag; new->fmask = fmask; fd_list_init(&new->reqrules_fixed, NULL); fd_list_init(&new->reqrules_required, NULL); fd_list_init(&new->reqrules_optional, NULL); fd_list_init(&new->ansrules_fixed, NULL); fd_list_init(&new->ansrules_required, NULL); fd_list_init(&new->ansrules_optional, NULL); fd_list_insert_before(parent, &new->chain); *ret = new; return 0; } static void dump_cmd(struct t_cmd * c) { struct fd_list * li; fd_log_debug(" Command %d %s: %s", c->code, c->fmask ? ( c->flags ? "[P=1]" : "[P=0]") : "", c->name); for (li = c->reqrules_fixed.next; li != &c->reqrules_fixed; li = li->next) dump_rule((struct t_rule *)li, " Request fixed AVP:"); for (li = c->reqrules_required.next; li != &c->reqrules_required; li = li->next) dump_rule((struct t_rule *)li, " Request required AVP:"); for (li = c->reqrules_optional.next; li != &c->reqrules_optional; li = li->next) dump_rule((struct t_rule *)li, " Request optional AVP:"); for (li = c->ansrules_fixed.next; li != &c->ansrules_fixed; li = li->next) dump_rule((struct t_rule *)li, " Answer fixed AVP:"); for (li = c->ansrules_required.next; li != &c->ansrules_required; li = li->next) dump_rule((struct t_rule *)li, " Answer required AVP:"); for (li = c->ansrules_optional.next; li != &c->ansrules_optional; li = li->next) dump_rule((struct t_rule *)li, " Answer optional AVP:"); } static void del_cmd_contents(struct t_cmd * c) { TRACE_ENTRY("%p", c); free(c->name); while (!FD_IS_LIST_EMPTY(&c->reqrules_fixed)) { struct fd_list * li = c->reqrules_fixed.next; fd_list_unlink(li); del_rule_contents((struct t_rule *)li); free(li); } while (!FD_IS_LIST_EMPTY(&c->reqrules_required)) { struct fd_list * li = c->reqrules_required.next; fd_list_unlink(li); del_rule_contents((struct t_rule *)li); free(li); } while (!FD_IS_LIST_EMPTY(&c->reqrules_optional)) { struct fd_list * li = c->reqrules_optional.next; fd_list_unlink(li); del_rule_contents((struct t_rule *)li); free(li); } while (!FD_IS_LIST_EMPTY(&c->ansrules_fixed)) { struct fd_list * li = c->ansrules_fixed.next; fd_list_unlink(li); del_rule_contents((struct t_rule *)li); free(li); } while (!FD_IS_LIST_EMPTY(&c->ansrules_required)) { struct fd_list * li = c->ansrules_required.next; fd_list_unlink(li); del_rule_contents((struct t_rule *)li); free(li); } while (!FD_IS_LIST_EMPTY(&c->ansrules_optional)) { struct fd_list * li = c->ansrules_optional.next; fd_list_unlink(li); del_rule_contents((struct t_rule *)li); free(li); } } /* TYPE */ struct t_typedefn { struct fd_list chain; /* link in t_appl->types */ uint8_t * name; uint8_t * parent_name; }; static int new_type(struct fd_list * parent, xmlChar * xmlname, xmlChar * xmlparent /*, xmlChar * xmldescription -- ignore */) { struct t_typedefn * new; TRACE_ENTRY("%p %p %p", parent, xmlname, xmlparent); CHECK_PARAMS( parent && xmlname ); CHECK_MALLOC( new = malloc(sizeof(struct t_typedefn)) ); memset(new, 0, sizeof(struct t_typedefn)); fd_list_init(&new->chain, NULL); CHECK_MALLOC( new->name = (uint8_t *)strdup((char *)xmlname) ); if (xmlparent) { CHECK_MALLOC( new->parent_name = (uint8_t *)strdup((char *)xmlparent) ); } fd_list_insert_before(parent, &new->chain); return 0; } static void dump_type(struct t_typedefn * t) { fd_log_debug(" Type %s%s%s%s", (char *)t->name, t->parent_name ? "(parent: " : "", t->parent_name ? (char *)t->parent_name : "", t->parent_name ? ")" : ""); } static void del_type_contents(struct t_typedefn * t) { TRACE_ENTRY("%p", t); free(t->name); free(t->parent_name); } /* TYPE INSIDE AVP */ struct t_avptype { struct fd_list chain; /* link in t_avp->type */ uint8_t * type_name; }; static int new_avptype(struct fd_list * parent, xmlChar * xmlname) { struct t_avptype * new; TRACE_ENTRY("%p %p", parent, xmlname); CHECK_PARAMS( parent && xmlname ); CHECK_MALLOC( new = malloc(sizeof(struct t_avptype)) ); memset(new, 0, sizeof(struct t_avptype)); fd_list_init(&new->chain, NULL); CHECK_MALLOC( new->type_name = (uint8_t *)strdup((char *)xmlname) ); fd_list_insert_before(parent, &new->chain); return 0; } static void dump_avptype(struct t_avptype * t) { fd_log_debug(" data type: %s", t->type_name); } static void del_avptype_contents(struct t_avptype * t) { TRACE_ENTRY("%p", t); free(t->type_name); } /* ENUM */ struct t_enum { struct fd_list chain; /* link in t_avp->enums */ uint32_t code; uint8_t * name; }; static int new_enum(struct fd_list * parent, xmlChar * xmlcode, xmlChar * xmlname) { struct t_enum * new; uint32_t code = 0; TRACE_ENTRY("%p %p %p", parent, xmlcode, xmlname); CHECK_PARAMS( parent && xmlcode && xmlname ); CHECK_FCT( xmltoint(xmlcode, &code) ); CHECK_MALLOC( new = malloc(sizeof(struct t_enum)) ); memset(new, 0, sizeof(struct t_enum)); fd_list_init(&new->chain, NULL); new->code = code; CHECK_MALLOC( new->name = (uint8_t *)strdup((char *)xmlname) ); fd_list_insert_before(parent, &new->chain); return 0; } static void dump_enum(struct t_enum * e) { fd_log_debug(" Value: %d == %s", e->code, e->name); } static void del_enum_contents(struct t_enum * e) { TRACE_ENTRY("%p", e); free(e->name); } /* AVP */ struct t_avp { struct fd_list chain; /* link in t_appl->avps */ uint32_t code; uint8_t * name; uint8_t flags; uint8_t fmask; uint32_t vendor; struct fd_list type; /* list of t_avptype -- there must be at max 1 item in the list */ struct fd_list enums; /* list of t_enum */ struct fd_list grouped_fixed; /* list of t_rule */ struct fd_list grouped_required; /* list of t_rule */ struct fd_list grouped_optional; /* list of t_rule */ }; static int new_avp(struct fd_list * parent, xmlChar * xmlcode, xmlChar * xmlname, xmlChar * xmlmandatory, xmlChar * xmlvendor, struct t_avp **ret) { /* we ignore description, may-encrypt, protected, ... */ struct t_avp * new; uint32_t code; uint32_t vendor = 0; uint32_t flag = 0; uint32_t fmask = 0; TRACE_ENTRY("%p %p %p %p %p", parent, xmlcode, xmlname, xmlmandatory, xmlvendor); CHECK_PARAMS( parent && xmlcode && xmlname ); CHECK_FCT( xmltoint(xmlcode, &code) ); if (xmlmandatory && !strcasecmp((char *)xmlmandatory, "must")) { flag |= AVP_FLAG_MANDATORY; fmask |= AVP_FLAG_MANDATORY; } if (xmlvendor) { CHECK_FCT( xmltoint(xmlvendor, &vendor) ); if (vendor) flag |= AVP_FLAG_VENDOR; fmask |= AVP_FLAG_VENDOR; } CHECK_MALLOC( new = malloc(sizeof(struct t_avp)) ); memset(new, 0, sizeof(struct t_avp)); fd_list_init(&new->chain, NULL); new->code = code; CHECK_MALLOC( new->name = (uint8_t *)strdup((char *)xmlname) ); new->flags = flag; new->fmask = fmask; new->vendor= vendor; fd_list_init(&new->type, NULL); fd_list_init(&new->enums, NULL); fd_list_init(&new->grouped_fixed, NULL); fd_list_init(&new->grouped_required, NULL); fd_list_init(&new->grouped_optional, NULL); fd_list_insert_before(parent, &new->chain); *ret = new; return 0; } static void dump_avp(struct t_avp * a) { struct fd_list * li; fd_log_debug(" AVP %d %s%s: %s", a->code, a->fmask & AVP_FLAG_MANDATORY ? ( a->flags & AVP_FLAG_MANDATORY ? "[M=1]" : "[M=0]") : "", a->fmask & AVP_FLAG_VENDOR ? ( a->flags & AVP_FLAG_VENDOR ? "[V=1]" : "[V=0]") : "", a->name); if (a->fmask & AVP_FLAG_VENDOR) fd_log_debug(" vendor: %d", a->vendor); for (li = a->type.next; li != &a->type; li = li->next) dump_avptype((struct t_avptype *)li); for (li = a->enums.next; li != &a->enums; li = li->next) dump_enum((struct t_enum *)li); for (li = a->grouped_fixed.next; li != &a->grouped_fixed; li = li->next) dump_rule((struct t_rule *)li, " Grouped, fixed AVP:"); for (li = a->grouped_required.next; li != &a->grouped_required; li = li->next) dump_rule((struct t_rule *)li, " Grouped, required AVP:"); for (li = a->grouped_optional.next; li != &a->grouped_optional; li = li->next) dump_rule((struct t_rule *)li, " Grouped, optional AVP:"); } static void del_avp_contents(struct t_avp * a) { TRACE_ENTRY("%p", a); free(a->name); while (!FD_IS_LIST_EMPTY(&a->type)) { struct fd_list * li = a->type.next; fd_list_unlink(li); del_avptype_contents((struct t_avptype *)li); free(li); } while (!FD_IS_LIST_EMPTY(&a->enums)) { struct fd_list * li = a->enums.next; fd_list_unlink(li); del_enum_contents((struct t_enum *)li); free(li); } while (!FD_IS_LIST_EMPTY(&a->grouped_fixed)) { struct fd_list * li = a->grouped_fixed.next; fd_list_unlink(li); del_rule_contents((struct t_rule *)li); free(li); } while (!FD_IS_LIST_EMPTY(&a->grouped_required)) { struct fd_list * li = a->grouped_required.next; fd_list_unlink(li); del_rule_contents((struct t_rule *)li); free(li); } while (!FD_IS_LIST_EMPTY(&a->grouped_optional)) { struct fd_list * li = a->grouped_optional.next; fd_list_unlink(li); del_rule_contents((struct t_rule *)li); free(li); } } /* APPLICATION */ struct t_appl { struct fd_list chain; /* link in the t_dictionary->base_and_applications, the sentinel corresponds to "base" */ uint32_t id; uint8_t * name; struct fd_list commands; /* list of t_cmd */ struct fd_list types; /* list of t_typedefn */ struct fd_list avps; /* list of t_avp */ }; static int new_appl(struct fd_list * parent, xmlChar * xmlid, xmlChar * xmlname /* We ignore the URI */, struct t_appl **ret) { struct t_appl * new; uint32_t id = 0; TRACE_ENTRY("%p %p %p", parent, xmlid, xmlname); CHECK_PARAMS( parent && xmlid && xmlname ); CHECK_FCT( xmltoint(xmlid, &id) ); CHECK_MALLOC( new = malloc(sizeof(struct t_appl)) ); memset(new, 0, sizeof(struct t_appl)); fd_list_init(&new->chain, NULL); new->id = id; CHECK_MALLOC( new->name = (uint8_t *)strdup((char *)xmlname) ); fd_list_init(&new->commands, NULL); fd_list_init(&new->types, NULL); fd_list_init(&new->avps, NULL); fd_list_insert_before(parent, &new->chain); *ret = new; return 0; } static void dump_appl(struct t_appl * a) { struct fd_list * li; fd_log_debug(" Application %d: %s", a->id, a->name); for (li = a->commands.next; li != &a->commands; li = li->next) dump_cmd((struct t_cmd *)li); for (li = a->types.next; li != &a->types; li = li->next) dump_type((struct t_typedefn *)li); for (li = a->avps.next; li != &a->avps; li = li->next) dump_avp((struct t_avp *)li); } static void del_appl_contents(struct t_appl * a) { TRACE_ENTRY("%p", a); free(a->name); while (!FD_IS_LIST_EMPTY(&a->commands)) { struct fd_list * li = a->commands.next; fd_list_unlink(li); del_cmd_contents((struct t_cmd *)li); free(li); } while (!FD_IS_LIST_EMPTY(&a->types)) { struct fd_list * li = a->types.next; fd_list_unlink(li); del_type_contents((struct t_typedefn *)li); free(li); } while (!FD_IS_LIST_EMPTY(&a->avps)) { struct fd_list * li = a->avps.next; fd_list_unlink(li); del_avp_contents((struct t_avp *)li); free(li); } } /* DICTIONARY */ struct t_dictionary { struct fd_list vendors; struct t_appl base_and_applications; }; static void dump_dict(struct t_dictionary * d) { struct fd_list * li; for (li = d->vendors.next; li != &d->vendors; li = li->next) dump_vendor((struct t_vend *)li); dump_appl(&d->base_and_applications); for (li = d->base_and_applications.chain.next; li != &d->base_and_applications.chain; li = li->next) dump_appl((struct t_appl *)li); } static void del_dict_contents(struct t_dictionary * d) { TRACE_ENTRY("%p", d); while (!FD_IS_LIST_EMPTY(&d->vendors)) { struct fd_list * li = d->vendors.next; fd_list_unlink(li); del_vendor_contents((struct t_vend *)li); free(li); } while (!FD_IS_LIST_EMPTY(&d->base_and_applications.chain)) { struct fd_list * li = d->base_and_applications.chain.next; fd_list_unlink(li); del_appl_contents((struct t_appl *)li); free(li); } d->base_and_applications.name = NULL; del_appl_contents(&d->base_and_applications); } /*********************************************/ /* The states for the SAX parser, corresponding roughly to the expected structure of the XML file. We use the states mostly to validate the XML file. */ enum state { INIT = 0, START, /* In "dictionary" */ IN_VENDOR, IN_APPLICATION, /* note that "base" is equivalent to "application" for our state machine */ IN_COMMAND, IN_REQRULES, IN_REQRULES_FIXED, IN_REQRULES_REQUIRED, IN_REQRULES_OPTIONAL, IN_ANSRULES, IN_ANSRULES_FIXED, IN_ANSRULES_REQUIRED, IN_ANSRULES_OPTIONAL, IN_TYPEDEFN, IN_AVP, IN_AVP_TYPE, IN_AVP_ENUM, IN_AVP_GROUPED, IN_AVP_GROUPED_FIXED, IN_AVP_GROUPED_REQUIRED, IN_AVP_GROUPED_OPTIONAL }; /* The context passed to the SAX parser */ struct parser_ctx { enum state state; /* the current state */ int error_depth; /* if non 0, we are in an unexpected element, wait until the count goes back to 0 to resume normal parsing. */ struct t_dictionary dict; /* The dictionary being built */ struct t_appl * cur_app; struct t_cmd * cur_cmd; struct t_avp * cur_avp; char * xmlfilename; /* Name of the file, for error messages */ }; /* Find an attribute with given name in the list */ static void get_attr(const xmlChar ** atts_array, const char * attr_name, xmlChar ** attr_val) { int i; *attr_val = NULL; if (atts_array == NULL) return; for (i=0; atts_array[i] != NULL; i+=2) { if (!strcasecmp((char *)atts_array[i], attr_name)) { /* found */ *attr_val = (xmlChar *)atts_array[i+1]; return; } } /* not found */ return; } /* The following macro avoids duplicating a lot of code in the state machine */ #define ADD_RULE( _parent_list ) { \ xmlChar *xname, *xmin, *xmax; \ /* We are expecting an tag at this point */ \ if (strcasecmp((char *)name, "avprule")) \ goto xml_tree_error; \ /* Search the expected attributes */ \ get_attr(atts, "name", &xname); \ get_attr(atts, "maximum", &xmax); \ get_attr(atts, "minimum", &xmin); \ /* Check the mandatory name is here */ \ CHECK_PARAMS_DO(xname, \ { TRACE_DEBUG(INFO, "Invalid 'avprule' tag found without 'name' attribute."); goto xml_tree_error; } ); \ /* Create the rule and add into the parent list */ \ CHECK_FCT_DO( new_rule((_parent_list), xname, xmax, xmin),\ { TRACE_DEBUG(INFO, "An error occurred while parsing an avprule tag. Entry ignored."); goto xml_tree_error; } ); \ /* Done. we don't change the state */ \ } /* The function called on each XML element start tag (startElementSAXFunc) */ static void SAXstartelem (void * ctx, const xmlChar * name, const xmlChar ** atts) { struct parser_ctx * data = ctx; TRACE_ENTRY("%p %p %p", ctx, name, atts); CHECK_PARAMS_DO( ctx && name, { return; } ); TRACE_DEBUG(CALL, "Tag: <%s>", (char *)name); if (data->error_depth) /* we are in an unknown element, just skip until it is closed */ goto xml_tree_error; switch (data->state) { case INIT: /* we are just starting. We only expect a tag, reject anything else. */ if (strcasecmp((char *)name, "dictionary")) goto xml_tree_error; data->state = START; break; case START: /* We are in Valid tags are: , , */ if (!strcasecmp((char *)name, "vendor")) { xmlChar *xid, *xname; get_attr(atts, "id", &xid); get_attr(atts, "name", &xname); /* id and name are required */ CHECK_PARAMS_DO(xid && xname, { TRACE_DEBUG(INFO, "Invalid 'vendor' tag found without 'id' or 'name' attribute."); goto xml_tree_error; } ); CHECK_FCT_DO( new_vendor(&data->dict.vendors, xid, xname), { TRACE_DEBUG(INFO, "An error occurred while parsing a vendor tag. Entry ignored."); goto xml_tree_error; } ) data->state = IN_VENDOR; break; } if (!strcasecmp((char *)name, "base")) { /* we don't care for the 'uri' attribute */ data->cur_app = &data->dict.base_and_applications; data->state = IN_APPLICATION; break; } if (!strcasecmp((char *)name, "application")) { /* we don't care for the 'uri' attribute */ xmlChar *xid, *xname; char buf[50]; get_attr(atts, "id", &xid); get_attr(atts, "name", &xname); CHECK_PARAMS_DO(xid, { TRACE_DEBUG(INFO, "Invalid 'application' tag found without 'id' attribute."); goto xml_tree_error; } ); /* Name is optional, if not provided we create a name */ if (!xname) { snprintf(buf, sizeof(buf), "Application %s", xid); xname = (xmlChar *)buf; } CHECK_FCT_DO( new_appl(&data->dict.base_and_applications.chain, xid, xname, &data->cur_app), { TRACE_DEBUG(INFO, "An error occurred while parsing an application tag. Entry ignored."); goto xml_tree_error; } ) data->state = IN_APPLICATION; break; } /* Other tags are errors */ goto xml_tree_error; case IN_VENDOR: /* nothing is allowed inside */ goto xml_tree_error; case IN_APPLICATION: /* We are in or Valid tags are: , , */ if (!strcasecmp((char *)name, "command")) { /* we don't care for the 'vendor-id' attribute. */ xmlChar *xcode, *xname, *xpbit; get_attr(atts, "code", &xcode); get_attr(atts, "name", &xname); get_attr(atts, "pbit", &xpbit); /* code and name are required */ CHECK_PARAMS_DO(xcode && xname, { TRACE_DEBUG(INFO, "Invalid 'command' tag found without 'code' or 'name' attribute."); goto xml_tree_error; } ); CHECK_FCT_DO( new_cmd( &data->cur_app->commands, xcode, xname, xpbit, &data->cur_cmd), { TRACE_DEBUG(INFO, "An error occurred while parsing a command tag. Entry ignored."); goto xml_tree_error; } ) data->state = IN_COMMAND; break; } if (!strcasecmp((char *)name, "typedefn")) { /* we don't care for the 'description' attribute. */ xmlChar *xname, *xparent; get_attr(atts, "type-name", &xname); get_attr(atts, "type-parent", &xparent); /* name is required */ CHECK_PARAMS_DO(xname, { TRACE_DEBUG(INFO, "Invalid 'typedefn' tag found without 'name' attribute."); goto xml_tree_error; } ); CHECK_FCT_DO( new_type( &data->cur_app->types, xname, xparent), { TRACE_DEBUG(INFO, "An error occurred while parsing a typedefn tag. Entry ignored."); goto xml_tree_error; } ) data->state = IN_TYPEDEFN; break; } if (!strcasecmp((char *)name, "avp")) { /* we don't care for the description, may-encrypt, and protected attributes */ xmlChar *xname, *xcode, *xmandatory, *xvendor; get_attr(atts, "name", &xname); get_attr(atts, "code", &xcode); get_attr(atts, "mandatory", &xmandatory); get_attr(atts, "vendor-id", &xvendor); /* code and name are required */ CHECK_PARAMS_DO(xcode && xname, { TRACE_DEBUG(INFO, "Invalid 'avp' tag found without 'code' or 'name' attribute."); goto xml_tree_error; } ); CHECK_FCT_DO( new_avp(&data->cur_app->avps, xcode, xname, xmandatory, xvendor, &data->cur_avp), { TRACE_DEBUG(INFO, "An error occurred while parsing an avp tag. Entry ignored."); goto xml_tree_error; } ) data->state = IN_AVP; break; } /* Other tags are errors */ goto xml_tree_error; case IN_COMMAND: /* We are in Valid tags are: , */ if (!strcasecmp((char *)name, "requestrules")) { data->state = IN_REQRULES; break; } if (!strcasecmp((char *)name, "answerrules")) { data->state = IN_ANSRULES; break; } /* Other tags are errors */ goto xml_tree_error; case IN_REQRULES: /* We are in Valid tags are: , , */ if (!strcasecmp((char *)name, "fixed")) { data->state = IN_REQRULES_FIXED; break; } if (!strcasecmp((char *)name, "required")) { data->state = IN_REQRULES_REQUIRED; break; } if (!strcasecmp((char *)name, "optional")) { data->state = IN_REQRULES_OPTIONAL; break; } /* Other tags are errors */ goto xml_tree_error; case IN_ANSRULES: /* We are in Valid tags are: , , */ if (!strcasecmp((char *)name, "fixed")) { data->state = IN_ANSRULES_FIXED; break; } if (!strcasecmp((char *)name, "required")) { data->state = IN_ANSRULES_REQUIRED; break; } if (!strcasecmp((char *)name, "optional")) { data->state = IN_ANSRULES_OPTIONAL; break; } /* Other tags are errors */ goto xml_tree_error; case IN_REQRULES_FIXED: /* We are in Valid tags are: */ ADD_RULE( &data->cur_cmd->reqrules_fixed ); break; case IN_REQRULES_REQUIRED: ADD_RULE( &data->cur_cmd->reqrules_required ); break; case IN_REQRULES_OPTIONAL: ADD_RULE( &data->cur_cmd->reqrules_optional ); break; case IN_ANSRULES_FIXED: ADD_RULE( &data->cur_cmd->ansrules_fixed ); break; case IN_ANSRULES_REQUIRED: ADD_RULE( &data->cur_cmd->ansrules_required ); break; case IN_ANSRULES_OPTIONAL: ADD_RULE( &data->cur_cmd->ansrules_optional ); break; case IN_TYPEDEFN: /* nothing is allowed inside */ goto xml_tree_error; case IN_AVP: /* We are in Valid tags are: , , */ if (!strcasecmp((char *)name, "type")) { xmlChar *xname; get_attr(atts, "type-name", &xname); /* name is required */ CHECK_PARAMS_DO(xname, { TRACE_DEBUG(INFO, "Invalid 'type' tag found without 'name' attribute."); goto xml_tree_error; } ); /* Check there is only 1 type */ if (!FD_IS_LIST_EMPTY(&data->cur_avp->type)) { TRACE_DEBUG(INFO, "Multiple 'type' tags found for AVP."); goto xml_tree_error; } /* Add the new type */ CHECK_FCT_DO( new_avptype(&data->cur_avp->type, xname), { TRACE_DEBUG(INFO, "An error occurred while parsing a type tag. Entry ignored."); goto xml_tree_error; } ) data->state = IN_AVP_TYPE; break; } if (!strcasecmp((char *)name, "enum")) { xmlChar *xcode, *xname; get_attr(atts, "code", &xcode); get_attr(atts, "name", &xname); /* code and name are required */ CHECK_PARAMS_DO(xcode && xname, { TRACE_DEBUG(INFO, "Invalid 'enum' tag found without 'code' or 'name' attribute."); goto xml_tree_error; } ); CHECK_FCT_DO( new_enum(&data->cur_avp->enums, xcode, xname), { TRACE_DEBUG(INFO, "An error occurred while parsing a command tag. Entry ignored."); goto xml_tree_error; } ) data->state = IN_AVP_ENUM; break; } if (!strcasecmp((char *)name, "grouped")) { /* no attribute for this one */ data->state = IN_AVP_GROUPED; break; } /* Other tags are errors */ goto xml_tree_error; case IN_AVP_TYPE: /* nothing is allowed inside */ goto xml_tree_error; case IN_AVP_ENUM: /* nothing is allowed inside */ goto xml_tree_error; case IN_AVP_GROUPED: /* We are in Valid tags are: , , */ if (!strcasecmp((char *)name, "fixed")) { data->state = IN_AVP_GROUPED_FIXED; break; } if (!strcasecmp((char *)name, "required")) { data->state = IN_AVP_GROUPED_REQUIRED; break; } if (!strcasecmp((char *)name, "optional")) { data->state = IN_AVP_GROUPED_OPTIONAL; break; } /* Other tags are errors */ goto xml_tree_error; case IN_AVP_GROUPED_FIXED: /* We are in Valid tags are: */ ADD_RULE( &data->cur_avp->grouped_fixed ); break; case IN_AVP_GROUPED_REQUIRED: ADD_RULE( &data->cur_avp->grouped_required ); break; case IN_AVP_GROUPED_OPTIONAL: ADD_RULE( &data->cur_avp->grouped_optional ); break; default: TRACE_DEBUG(INFO, "Internal parsing error, unexpected state %d.", data->state); } return; xml_tree_error: if (!data->error_depth) { TRACE_DEBUG(INFO, "Unexpected XML element found: '%s'. Ignoring...", name); } data->error_depth += 1; if (data->cur_app || data->cur_cmd || data->cur_avp) { TRACE_DEBUG(INFO, "Error encountered while parsing tag of:"); if (data->cur_app) fd_log_debug(" Application: '%s'", data->cur_app->name); if (data->cur_cmd) fd_log_debug(" Command : '%s'", data->cur_cmd->name); if (data->cur_avp) fd_log_debug(" AVP : '%s'", data->cur_avp->name); } return; } /* The function called on each XML element end tag (endElementSAXFunc) */ static void SAXendelem (void * ctx, const xmlChar * name) { struct parser_ctx * data = ctx; TRACE_ENTRY("%p %p", ctx, name); CHECK_PARAMS_DO( ctx && name, { return; } ); TRACE_DEBUG(CALL, "Tag: ", (char *)name); if (data->error_depth) { /* we are recovering from an erroneous element */ data->error_depth -= 1; return; } switch (data->state) { case INIT: goto state_machine_error; case START: if (strcasecmp((char *)name, "dictionary")) goto state_machine_error; data->state = 0; break; case IN_VENDOR: if (strcasecmp((char *)name, "vendor")) goto state_machine_error; data->state = START; break; case IN_APPLICATION: if (strcasecmp((char *)name, "base") && strcasecmp((char *)name, "application")) goto state_machine_error; data->cur_app = NULL; data->state = START; break; case IN_COMMAND: if (strcasecmp((char *)name, "command")) goto state_machine_error; data->cur_cmd = NULL; data->state = IN_APPLICATION; break; case IN_REQRULES: if (strcasecmp((char *)name, "requestrules")) goto state_machine_error; data->state = IN_COMMAND; break; case IN_REQRULES_FIXED: if (!strcasecmp((char *)name, "avprule")) /* we don't have a special state for these, just ignore */ return; if (strcasecmp((char *)name, "fixed")) goto state_machine_error; data->state = IN_REQRULES; break; case IN_REQRULES_REQUIRED: if (!strcasecmp((char *)name, "avprule")) /* we don't have a special state for these, just ignore */ return; if (strcasecmp((char *)name, "required")) goto state_machine_error; data->state = IN_REQRULES; break; case IN_REQRULES_OPTIONAL: if (!strcasecmp((char *)name, "avprule")) /* we don't have a special state for these, just ignore */ return; if (strcasecmp((char *)name, "optional")) goto state_machine_error; data->state = IN_REQRULES; break; case IN_ANSRULES: if (strcasecmp((char *)name, "answerrules")) goto state_machine_error; data->state = IN_COMMAND; break; case IN_ANSRULES_FIXED: if (!strcasecmp((char *)name, "avprule")) /* we don't have a special state for these, just ignore */ return; if (strcasecmp((char *)name, "fixed")) goto state_machine_error; data->state = IN_ANSRULES; break; case IN_ANSRULES_REQUIRED: if (!strcasecmp((char *)name, "avprule")) /* we don't have a special state for these, just ignore */ return; if (strcasecmp((char *)name, "required")) goto state_machine_error; data->state = IN_ANSRULES; break; case IN_ANSRULES_OPTIONAL: if (!strcasecmp((char *)name, "avprule")) /* we don't have a special state for these, just ignore */ return; if (strcasecmp((char *)name, "optional")) goto state_machine_error; data->state = IN_ANSRULES; break; case IN_TYPEDEFN: if (strcasecmp((char *)name, "typedefn")) goto state_machine_error; data->state = IN_APPLICATION; break; case IN_AVP: if (strcasecmp((char *)name, "avp")) goto state_machine_error; data->cur_avp = NULL; data->state = IN_APPLICATION; break; case IN_AVP_TYPE: if (strcasecmp((char *)name, "type")) goto state_machine_error; data->state = IN_AVP; break; case IN_AVP_ENUM: if (strcasecmp((char *)name, "enum")) goto state_machine_error; data->state = IN_AVP; break; case IN_AVP_GROUPED: if (strcasecmp((char *)name, "grouped")) goto state_machine_error; data->state = IN_AVP; break; case IN_AVP_GROUPED_FIXED: if (!strcasecmp((char *)name, "avprule")) /* we don't have a special state for these, just ignore */ return; if (strcasecmp((char *)name, "fixed")) goto state_machine_error; data->state = IN_AVP_GROUPED; break; case IN_AVP_GROUPED_REQUIRED: if (!strcasecmp((char *)name, "avprule")) return; if (strcasecmp((char *)name, "required")) goto state_machine_error; data->state = IN_AVP_GROUPED; break; case IN_AVP_GROUPED_OPTIONAL: if (!strcasecmp((char *)name, "avprule")) return; if (strcasecmp((char *)name, "optional")) goto state_machine_error; data->state = IN_AVP_GROUPED; break; default: TRACE_DEBUG(INFO, "Internal parsing error, unexpected state %d.", data->state); } return; state_machine_error: TRACE_DEBUG(INFO, "Internal parsing error, ignored [state %d, closing tag '%s'].", data->state, name); return; } /* The SAX parser sends a warning, error, fatalerror -- do we need these ? static void SAXwarning (void * ctx, const char * msg, ...) { } static void SAXerror (void * ctx, const char * msg, ...) { } static void SAXfatal (void * ctx, const char * msg, ...) { } */ /*********************************************/ /* 2nd pass: from memory to fD dictionary */ /*********************************************/ /* Find or create a vendor */ static int vend_to_fD(struct t_vend * v, struct dictionary * fD_dict, struct dict_object ** fd_v, int * nb_added) { int ret; struct dict_object * prev = NULL; struct dict_vendor_data vd; TRACE_ENTRY("%p %p %p %p", v, fD_dict, fd_v, nb_added); CHECK_PARAMS(v && fD_dict); /* Prepare the data in fD's format */ memset(&vd, 0, sizeof(vd)); vd.vendor_id = v->id; vd.vendor_name = (char *)v->name; /* Create or search in the dictionary */ ret = fd_dict_new ( fD_dict, DICT_VENDOR, &vd, NULL, &prev ); if (fd_v) *fd_v = prev; if (ret == EEXIST) { /* Conflict with existing entry */ CHECK_FCT( fd_dict_getval(prev, &vd) ); TRACE_DEBUG(INFO, "[dict_legacy_xml] Warning: Conflicting entry."); TRACE_DEBUG(INFO, "[dict_legacy_xml] New entry (ignored): %u - '%s'", v->id, (char *)v->name); TRACE_DEBUG(INFO, "[dict_legacy_xml] Old entry : %u - '%s'", vd.vendor_id, vd.vendor_name); return 0; } else { /* other errors are stoppers */ CHECK_FCT(ret); } /* Update count */ if (nb_added) *nb_added += 1; /* Done */ return 0; } /* Find the base fD type from a type name */ static int resolve_base_type(struct dictionary * fD_dict, uint8_t * type_name, enum dict_avp_basetype * basetype, struct dict_object **type) { int ret; struct dict_type_data td; struct dict_object *t; TRACE_ENTRY("%p, %p %p", fD_dict, type_name, basetype); CHECK_PARAMS( fD_dict && type_name && basetype ); /* First, check if the type is already in the dictionary */ ret = fd_dict_search ( fD_dict, DICT_TYPE, TYPE_BY_NAME, type_name, &t, ENOENT); switch (ret) { case 0: /* the type is already in the dictionary */ CHECK_FCT( fd_dict_getval(t, &td) ); *basetype = td.type_base; if (type) *type = t; return 0; case ENOENT: /* We did not find it, it is maybe normal */ break; default: /* An unexpected error occurred */ CHECK_FCT(ret); } /* at this point we did not find the type in the dictionary */ #define PREDEF_TYPES( _typename_, _basetype_ ) \ if (!strcasecmp((char *)type_name, (_typename_))) { \ *basetype = (_basetype_); \ return 0; \ } PREDEF_TYPES( "OctetString", AVP_TYPE_OCTETSTRING ); PREDEF_TYPES( "Integer32", AVP_TYPE_INTEGER32 ); PREDEF_TYPES( "Integer64", AVP_TYPE_INTEGER64 ); PREDEF_TYPES( "Unsigned32", AVP_TYPE_UNSIGNED32 ); PREDEF_TYPES( "Enumerated", AVP_TYPE_UNSIGNED32 ); PREDEF_TYPES( "Unsigned64", AVP_TYPE_UNSIGNED64 ); PREDEF_TYPES( "Float32", AVP_TYPE_FLOAT32 ); PREDEF_TYPES( "Float64", AVP_TYPE_FLOAT64 ); /* When we reach this point, we have not yet found this type anywhere. */ TODO("Type not found. Maybe search in whole xmldictionary if it is defined later?"); TRACE_DEBUG(INFO, "The type '%s' could not be resolved. Please check it is defined before use.", type_name); return ENOENT; } /* Find or create a type. */ static int typdefn_to_fD(struct t_typedefn * t, struct dictionary * fD_dict, struct dict_object * fd_appl, struct dict_object ** fd_t, int * nb_added) { int ret; struct dict_object * prev = NULL; struct dict_type_data td; TRACE_ENTRY("%p %p %p %p %p", t, fD_dict, fd_appl, fd_t, nb_added); CHECK_PARAMS(t && fD_dict); /* Prepare the data in fD's format */ memset(&td, 0, sizeof(td)); td.type_name = (char *)t->name; /* infer td.type_base from t->parent_name */ CHECK_FCT( resolve_base_type(fD_dict, t->parent_name, &td.type_base, NULL) ); /* Create or search in the dictionary */ ret = fd_dict_new ( fD_dict, DICT_TYPE, &td, fd_appl, &prev ); if (fd_t) *fd_t = prev; if (ret == EEXIST) { /* Conflict with existing entry */ enum dict_avp_basetype xmlbt = td.type_base; extern const char * type_base_name[]; /* in libfreeDiameter/dictionary.c */ CHECK_FCT( fd_dict_getval(prev, &td) ); TRACE_DEBUG(INFO, "[dict_legacy_xml] Warning: Conflicting entry."); TRACE_DEBUG(INFO, "[dict_legacy_xml] New entry (ignored): '%s' (%d - %s)", t->name, xmlbt, type_base_name[xmlbt] ); TRACE_DEBUG(INFO, "[dict_legacy_xml] Old entry : '%s' (%d - %s)", td.type_name, td.type_base, type_base_name[td.type_base]); return 0; } else { /* other errors are stoppers */ CHECK_FCT(ret); } /* Update count */ if (nb_added) *nb_added += 1; /* Done */ return 0; } /* Process one list of rules */ static int rules_to_fD_onelist(struct dictionary * fD_dict, struct dict_object * parent, enum rule_position position, struct fd_list * list, int * nb_added) { struct dict_rule_data rd; struct fd_list * li; int order = 0; int ret; TRACE_ENTRY("%p %p %d %p %p", fD_dict, parent, position, list, nb_added); CHECK_PARAMS(fD_dict && parent && position && list); for (li = list->next; li != list; li = li->next) { struct t_rule * r = (struct t_rule *)li; /* The [AVP] rule in all ABNF definitions is implicit in freeDiameter, skip it */ if (!strcmp((char *)r->avpname, "AVP")) continue; /* Prepare rule data */ memset(&rd, 0, sizeof(rd)); rd.rule_position = position; rd.rule_order = ++order; /* actually only used for fixed rules, but no harm for others */ rd.rule_min = r->min; rd.rule_max = r->max; /* Resolve the AVP */ ret = fd_dict_search(fD_dict, DICT_AVP, AVP_BY_NAME_ALL_VENDORS, r->avpname, &rd.rule_avp, ENOENT); if (ret == ENOENT) { TRACE_DEBUG(INFO, "[dict_legacy_xml] Error: AVP '%s' used in a rule before being defined.", r->avpname); } CHECK_FCT(ret); /* Now create the new rule */ CHECK_FCT_DO( ret = fd_dict_new ( fD_dict, DICT_RULE, &rd, parent, NULL ), { TRACE_DEBUG(INFO, "Error creating rule for sub-AVP '%s'", r->avpname); return ret; } ); if (nb_added) *nb_added += 1; } return 0; } /* Process lists of rules */ static int rules_to_fD(struct dictionary * fD_dict, struct dict_object * parent, struct fd_list * fixed, struct fd_list * required, struct fd_list * optional, int * nb_added) { int ret; TRACE_ENTRY("%p %p %p %p %p %p", fD_dict, parent, fixed, required, optional, nb_added); /* Process the rules */ CHECK_FCT_DO( ret = rules_to_fD_onelist(fD_dict, parent, RULE_FIXED_HEAD, fixed, nb_added), { TRACE_DEBUG(INFO, "Error processing FIXED rules"); return ret; } ); CHECK_FCT_DO( ret = rules_to_fD_onelist(fD_dict, parent, RULE_REQUIRED, required, nb_added), { TRACE_DEBUG(INFO, "Error processing REQUIRED rules"); return ret; } ); CHECK_FCT_DO( ret = rules_to_fD_onelist(fD_dict, parent, RULE_OPTIONAL, optional, nb_added), { TRACE_DEBUG(INFO, "Error processing OPTIONAL rules"); return ret; } ); return 0; } /* Find or create an AVP (and dependent objects) */ static int avp_to_fD(struct t_avp * a, struct dictionary * fD_dict, struct dict_object * fd_appl, struct dict_object ** fd_a, int * nb_added) { int ret; struct dict_object * prev = NULL, *type = NULL; struct dict_avp_data ad; struct fd_list * li; TRACE_ENTRY("%p %p %p %p %p", a, fD_dict, fd_appl, fd_a, nb_added); CHECK_PARAMS(a && fD_dict); /* Prepare the data in fD's format */ memset(&ad, 0, sizeof(ad)); ad.avp_code = a->code; ad.avp_vendor = a->vendor; ad.avp_name = (char *)a->name; ad.avp_flag_mask = a->fmask | AVP_FLAG_VENDOR; ad.avp_flag_val = a->flags; if (!FD_IS_LIST_EMPTY(&a->type)) { /* special exception: we use per-AVP enumerated types in fD */ if (!strcasecmp("Enumerated", (char *)((struct t_avptype *)a->type.next)->type_name)) goto enumerated; /* Let's allow "Unsigned32" instead of "Enumerated" also... */ if ((!FD_IS_LIST_EMPTY(&a->enums)) && (!strcasecmp("Unsigned32", (char *)((struct t_avptype *)a->type.next)->type_name))) goto enumerated; /* The type was explicitly specified, resolve it */ CHECK_FCT( resolve_base_type(fD_dict, ((struct t_avptype *)a->type.next)->type_name, &ad.avp_basetype, &type) ); } else { /* The type was not specified, try to infer it from provided data */ if ( !FD_IS_LIST_EMPTY(&a->grouped_optional) || !FD_IS_LIST_EMPTY(&a->grouped_required) || !FD_IS_LIST_EMPTY(&a->grouped_fixed) ) { /* The AVP has rules, it is a grouped AVP */ CHECK_PARAMS_DO( FD_IS_LIST_EMPTY(&a->enums), { TRACE_DEBUG(INFO, "Conflict: The AVP '%s' has both enum values and rules.", ad.avp_name); return EINVAL; } ); ad.avp_basetype = AVP_TYPE_GROUPED; } else { /* It should be an enumerated AVP... */ if (FD_IS_LIST_EMPTY(&a->enums)) { TRACE_DEBUG(INFO, "Error: Missing type information for AVP '%s'", ad.avp_name); return EINVAL; } else { /* We create a new type to hold the enumerated values -- fD specifics */ char typename[256]; struct dict_type_data tdata; enumerated: snprintf(typename, sizeof(typename), "Enumerated*(%s)", ad.avp_name); memset(&tdata, 0, sizeof(tdata)); tdata.type_base = AVP_TYPE_UNSIGNED32; tdata.type_name = &typename[0]; CHECK_FCT( fd_dict_new ( fD_dict, DICT_TYPE, &tdata, fd_appl, &type ) ); if (nb_added) *nb_added += 1; ad.avp_basetype = AVP_TYPE_UNSIGNED32; } } } /* At this point, ad.avp_basetype is defined and type might also be */ /* Create or search in the dictionary */ ret = fd_dict_new ( fD_dict, DICT_AVP, &ad, type, &prev ); if (fd_a) *fd_a = prev; if (ret == EEXIST) { /* Conflict with existing entry */ CHECK_FCT( fd_dict_getval(prev, &ad) ); TRACE_DEBUG(INFO, "[dict_legacy_xml] Warning: Conflicting entry."); TRACE_DEBUG(INFO, "[dict_legacy_xml] New entry (ignored): %u - '%s'", a->code, (char *)a->name); TRACE_DEBUG(INFO, "[dict_legacy_xml] Old entry : %u - '%s'", ad.avp_code, ad.avp_name); goto inside; } else { /* other errors are stoppers */ CHECK_FCT(ret); } /* Update count */ if (nb_added) *nb_added += 1; inside: /* Now, the inner elements, if any */ if ( (!FD_IS_LIST_EMPTY(&a->enums)) && (ad.avp_basetype != AVP_TYPE_UNSIGNED32)) { TRACE_DEBUG(INFO, "AVP '%s' type is not an Unsigned32 but it has enum values (invalid in this extension).", ad.avp_name); return EINVAL; } /* In case of enumeration, define the enum values */ for (li = a->enums.next; li != &a->enums; li = li->next) { struct t_enum * e = (struct t_enum *)li; struct dict_enumval_data ed; memset(&ed, 0, sizeof(ed)); ed.enum_name = (char *)e->name; ed.enum_value.u32 = e->code; CHECK_FCT_DO( ret = fd_dict_new ( fD_dict, DICT_ENUMVAL, &ed, type, NULL ), { TRACE_DEBUG(INFO, "Error defining constant value '%s' for AVP '%s': %s", ed.enum_name, ad.avp_name, strerror(ret)); return ret; } ); if (nb_added) *nb_added += 1; } /* In case of grouped AVP, check the type is really grouped */ if ( !FD_IS_LIST_EMPTY(&a->grouped_optional) || !FD_IS_LIST_EMPTY(&a->grouped_required) || !FD_IS_LIST_EMPTY(&a->grouped_fixed) ) { CHECK_PARAMS_DO( ad.avp_basetype == AVP_TYPE_GROUPED, { TRACE_DEBUG(INFO, "Got rules for non-grouped AVP '%s'", ad.avp_name); return EINVAL;} ); CHECK_FCT_DO( ret = rules_to_fD(fD_dict, prev, &a->grouped_fixed, &a->grouped_required, &a->grouped_optional, nb_added), { TRACE_DEBUG(INFO, "Error processing rules for AVP '%s': %s", ad.avp_name, strerror(ret)); return ret; } ); } /* done! */ return 0; } /* Find or create a command. */ static int cmd_to_fD(struct t_cmd * c, struct dictionary * fD_dict, struct dict_object * fd_appl, struct dict_object ** fd_req, int * nb_added) { int ret; struct dict_object * req = NULL, *ans = NULL; struct dict_cmd_data cd; char cmdname[512]; TRACE_ENTRY("%p %p %p %p %p", c, fD_dict, fd_appl, fd_req, nb_added); CHECK_PARAMS(c && fD_dict); /* Prepare the request data in fD's format */ memset(&cd, 0, sizeof(cd)); cd.cmd_code = c->code; snprintf(cmdname, sizeof(cmdname), "%s-Request", (char *)c->name); cd.cmd_name = &cmdname[0]; cd.cmd_flag_mask = c->fmask | CMD_FLAG_REQUEST | CMD_FLAG_ERROR; cd.cmd_flag_val = c->flags | CMD_FLAG_REQUEST; /* Create or search in the dictionary */ ret = fd_dict_new ( fD_dict, DICT_COMMAND, &cd, fd_appl, &req ); if (fd_req) *fd_req = req; if (ret == EEXIST) { struct dict_cmd_data prevcd; /* Conflict with existing entry */ CHECK_FCT( fd_dict_getval(req, &prevcd) ); TRACE_DEBUG(INFO, "[dict_legacy_xml] Warning: Conflicting entry."); TRACE_DEBUG(INFO, "[dict_legacy_xml] New entry (ignored): %u - '%s'", cd.cmd_code, cd.cmd_name); TRACE_DEBUG(INFO, "[dict_legacy_xml] Old entry : %u - '%s'", prevcd.cmd_code, prevcd.cmd_name); goto answer; } else { /* other errors are stoppers */ CHECK_FCT(ret); } /* Update count */ if (nb_added) *nb_added += 1; answer: /* update data for the answer */ snprintf(cmdname, sizeof(cmdname), "%s-Answer", (char *)c->name); cd.cmd_flag_val &= ~CMD_FLAG_REQUEST; cd.cmd_flag_mask &= ~CMD_FLAG_ERROR; ret = fd_dict_new ( fD_dict, DICT_COMMAND, &cd, fd_appl, &ans ); if (ret == EEXIST) { struct dict_cmd_data prevcd; /* Conflict with existing entry */ CHECK_FCT( fd_dict_getval(ans, &prevcd) ); TRACE_DEBUG(INFO, "[dict_legacy_xml] Warning: Conflicting entry."); TRACE_DEBUG(INFO, "[dict_legacy_xml] New entry (ignored): %u - '%s'", cd.cmd_code, cd.cmd_name); TRACE_DEBUG(INFO, "[dict_legacy_xml] Old entry : %u - '%s'", prevcd.cmd_code, prevcd.cmd_name); goto rules; } else { /* other errors are stoppers */ CHECK_FCT(ret); } /* Update count */ if (nb_added) *nb_added += 1; rules: /* Now process the rules inside the command */ CHECK_FCT_DO( ret = rules_to_fD(fD_dict, req, &c->reqrules_fixed, &c->reqrules_required, &c->reqrules_optional, nb_added), { TRACE_DEBUG(INFO, "Error converting data from request rules: %s", strerror(ret)); return ret; } ); CHECK_FCT_DO( ret = rules_to_fD(fD_dict, ans, &c->ansrules_fixed, &c->ansrules_required, &c->ansrules_optional, nb_added), { TRACE_DEBUG(INFO, "Error converting data from answer rules: %s", strerror(ret)); return ret; } ); /* Done */ return 0; } /* Find or create an application (and dependent objects) */ static int appl_to_fD(struct t_appl * a, struct dictionary * fD_dict, struct dict_object ** fd_a, int * nb_added) { int ret; struct dict_object * prev = NULL; struct dict_application_data ad; struct fd_list * li; TRACE_ENTRY("%p %p %p %p", a, fD_dict, fd_a, nb_added); CHECK_PARAMS(a && fD_dict); if (a->id) { /* skip app 0 */ /* Prepare the data in fD's format */ memset(&ad, 0, sizeof(ad)); ad.application_id = a->id; ad.application_name = (char *)a->name; /* Create or search in the dictionary */ ret = fd_dict_new ( fD_dict, DICT_APPLICATION, &ad, NULL /* we don't have a parent vendor in XML files, so currently everything links to no vendor */, &prev ); if (fd_a) *fd_a = prev; if (ret == EEXIST) { /* Conflict with existing entry */ CHECK_FCT( fd_dict_getval(prev, &ad) ); TRACE_DEBUG(INFO, "[dict_legacy_xml] Warning: Conflicting entry."); TRACE_DEBUG(INFO, "[dict_legacy_xml] New entry (ignored): %u - '%s'", a->id, (char *)a->name); TRACE_DEBUG(INFO, "[dict_legacy_xml] Old entry : %u - '%s'", ad.application_id, ad.application_name); goto inside; } else { /* other errors are stoppers */ CHECK_FCT(ret); } /* Update count */ if (nb_added) *nb_added += 1; } inside: /* Now, the inner elements */ /* First, define all the types */ for (li = a->types.next; li != &a->types; li = li->next) { CHECK_FCT_DO( ret = typdefn_to_fD((struct t_typedefn *)li, fD_dict, prev, NULL, nb_added), { TRACE_DEBUG(INFO, "Error converting data from typedefn '%s': %s", ((struct t_typedefn *)li)->name, strerror(ret)); return ret; } ); } /* Then, AVPs, enums, and grouped AVP rules */ for (li = a->avps.next; li != &a->avps; li = li->next) { CHECK_FCT_DO( ret = avp_to_fD((struct t_avp *)li, fD_dict, prev, NULL, nb_added), { TRACE_DEBUG(INFO, "Error converting data from AVP '%s': %s", ((struct t_avp *)li)->name, strerror(ret)); return ret; } ); } /* Finally, the commands and rules */ for (li = a->commands.next; li != &a->commands; li = li->next) { CHECK_FCT_DO( ret = cmd_to_fD((struct t_cmd *)li, fD_dict, prev, NULL, nb_added), { TRACE_DEBUG(INFO, "Error converting data from command '%s': %s", ((struct t_cmd *)li)->name, strerror(ret)); return ret; } ); } /* done! */ return 0; } static int dict_to_fD(struct dictionary * fD_dict, struct t_dictionary * xmldict, int * nb_added) { struct fd_list * li; int ret; TRACE_ENTRY("%p %p %p", fD_dict, xmldict, nb_added); CHECK_PARAMS(fD_dict && xmldict && nb_added); *nb_added = 0; /* Create all the vendors */ for (li = xmldict->vendors.next; li != &xmldict->vendors; li = li->next) { CHECK_FCT_DO( ret = vend_to_fD((struct t_vend *)li, fD_dict, NULL, nb_added), { TRACE_DEBUG(INFO, "Error converting data from vendor '%s': %s", ((struct t_vend *)li)->name, strerror(ret)); return ret; } ); } /* Now, process each application */ CHECK_FCT_DO( ret = appl_to_fD(&xmldict->base_and_applications, fD_dict, NULL, nb_added), { TRACE_DEBUG(INFO, "Error converting data from Base application: %s", strerror(ret)); return ret; } ); for (li = xmldict->base_and_applications.chain.next; li != &xmldict->base_and_applications.chain; li = li->next) { CHECK_FCT_DO( ret = appl_to_fD((struct t_appl *) li, fD_dict, NULL, nb_added), { TRACE_DEBUG(INFO, "Error converting data from application '%s': %s", ((struct t_appl *)li)->name, strerror(ret)); return ret; } ); } /* Complete! */ return 0; } /*********************************************/ int dict_lxml_parse(char * xmlfilename) { xmlSAXHandler handler; struct parser_ctx data; int ret; TRACE_ENTRY("%p", xmlfilename); CHECK_PARAMS_DO(xmlfilename, { return -1; } ); TRACE_DEBUG(FULL, "Parsing next XML file: %s...", xmlfilename); /* Initialize the parser */ memset(&handler, 0, sizeof(handler)); handler.startElement = SAXstartelem; handler.endElement = SAXendelem; /* Initialize the data */ memset(&data, 0, sizeof(data)); fd_list_init( &data.dict.vendors, NULL ); fd_list_init( &data.dict.base_and_applications.chain, NULL ); data.dict.base_and_applications.name = (uint8_t *)"[Diameter Base Protocol]"; fd_list_init( &data.dict.base_and_applications.commands, NULL ); fd_list_init( &data.dict.base_and_applications.types, NULL ); fd_list_init( &data.dict.base_and_applications.avps, NULL ); data.xmlfilename = xmlfilename; /* Parse the file */ ret = xmlSAXUserParseFile(&handler, &data, xmlfilename); if (ret < 0) { TRACE_DEBUG(INFO, "An error occurred while parsing %s, aborting.", xmlfilename); del_dict_contents(&data.dict); return -1; } TRACE_DEBUG(FULL, "XML file parsing, 1st pass completed."); if (TRACE_BOOL(ANNOYING)) { dump_dict(&data.dict); } /* Now, convert all the objects from the temporary tree into the freeDiameter dictionary */ CHECK_FCT_DO( dict_to_fD(fd_g_config->cnf_dict, &data.dict, &ret), { TRACE_DEBUG(INFO, "Error while converting data read from file '%s'", xmlfilename); del_dict_contents(&data.dict); return -1; } ); TRACE_DEBUG(FULL, "Conversion from '%s' to freeDiameter internal format complete.", xmlfilename); /* Done */ del_dict_contents(&data.dict); return ret; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_mip6a/000077500000000000000000000000001333553357400232715ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_mip6a/CMakeLists.txt000066400000000000000000000004661333553357400260370ustar00rootroot00000000000000# The dict_mip6a extension PROJECT("Diameter Mobile IPv6 Auth (MIP6A) Dictionary Definitions" C) # Compile as a module FD_ADD_EXTENSION(dict_mip6a dict_mip6a.c) #### ## INSTALL section ## INSTALL(TARGETS dict_mip6a LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-dictionary-mip6) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_mip6a/dict_mip6a.c000066400000000000000000001020351333553357400254550ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Francois Bard * * * * Copyright (c) 2010, Teraoka Laboratory, Keio University * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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 following table complete the one in RFC 5778, page 18. The AVPs are implemented below following the order of this table. We try to keep the structure of the grouped AVP by declaring the contained AVPs just before the grouped AVP they depend on. The number of '+' indicates the depth of the contained AVP. DEPTH NAME AVP RFC TYPE NOTES MIP6-Feature-Vector 124 5447 Unsigned64 User-Name 1 3588 UTF8String Service-Selection 493 5778 UTF8String MIP-MN-AAA-SPI 341 5778 Unsigned32 + MIP-Home-Agent-Address 334 4004 Address ++ Destination-Host 293 3588 DiameterIdentity ++ Destination-Realm 283 3588 DiameterIdentity + MIP-Home-Agent-Host 348 4004 Grouped + MIP6-Home-Link-Prefix 125 5447 OctetString MIP6-Agent-Info 486 5447 Grouped + MIP-Replay-Mode 346 4004 Enumerated + MIP-Algorithm-Type 345 4004 Enumerated + MIP-MN-HA-SPI 491 5778 Unsigned32 + MIP-MSA-Lifetime 367 4004 Unsigned32 + MIP-Session-Key 343 4004 OctetString MIP-MN-HA-MSA 492 5778 Grouped different from MIP-MN-to-HA-MSA (331) MIP-Mobile-Node-Address 333 4004 Address MIP-Careof-Address 487 5778 Address MIP-Authenticator 488 5778 OctetString MIP-MAC-Mobility-Data 489 5778 OctetString MIP-Timestamp 490 5778 OctetString Chargeable-User-Identity 89 5778 OctetString MIP6-Auth-Mode 494 5778 Enumerated QoS AVPs (RFC 5777 - implemented in the corresponding dictionary) QoS-Capability 578 5777 Grouped QoS-Resources 508 5777 Grouped ACCOUNTING AVPs (section 6.21) Accounting-Input-Octets 363 4004, 4005 Unsigned64 Accounting-Output-Octets 364 4004, 4005 Unsigned64 Accounting-Input-Packets 365 4004, 4005 Unsigned64 Accounting-Output-Packets 366 4004, 4005 Unsigned64 Acct-Multi-Session-Id 50 3588 UTF8String Acct-Session-Time 46 2866, 4004 Unsigned32 MIP6-Feature-Vector ---------------------------------- MIP-Mobile-Node-Address ---------------------------------- MIP6-Agent-Info ---------------------------------- Chargeable-User-Identity ---------------------------------- Service-Selection ---------------------------------- QoS-Resources ---------------------------------- QoS-Capability ---------------------------------- MIP-Careof-Address ---------------------------------- RADIUS AVPs (contained in the MIR/MIA) NAS-Identifier 32 2865 radius (see avp) NAS-IP-Address 4 2865 radius (see avp) NAS-IPv6-Address 95 3162 radius (see avp) NAS-Port-Type 61 2865 radius (see avp) Called-Station-Id 30 2865 radius (see avp) Calling-Station-Id 31 2865 radius (see avp) */ /**************************************************************************************************************************************** * * * This table is a copy of the registry named "MIP6 Authentication Mode Registry" and managed by IANA. * * source : http://www.iana.org/assignments/aaa-parameters/aaa-parameters.txt * * up to date on october 2010 * * * * Value Token Reference * * 0 Reserved [RFC5778] * * 1 MIP6_AUTH_MN_AAA [RFC5778] * * 2-4294967295 Unassigned * * * ****************************************************************************************************************************************/ /* NOTES check for omissions ! */ #include #define CHECK_dict_new( _type, _data, _parent, _ref ) \ CHECK_FCT( fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref)) ); #define CHECK_dict_search( _type, _criteria, _what, _result ) \ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); struct local_rules_definition { char *avp_name; enum rule_position position; int min; int max; }; #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) #define PARSE_loc_rules( _rulearray, _parent) { \ int __ar; \ for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ struct dict_rule_data __data = { NULL, \ (_rulearray)[__ar].position, \ 0, \ (_rulearray)[__ar].min, \ (_rulearray)[__ar].max}; \ __data.rule_order = RULE_ORDER(__data.rule_position); \ CHECK_FCT( fd_dict_search( \ fd_g_config->cnf_dict, \ DICT_AVP, \ AVP_BY_NAME, \ (_rulearray)[__ar].avp_name, \ &__data.rule_avp, 0 ) ); \ if ( !__data.rule_avp ) { \ TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_name ); \ return ENOENT; \ } \ CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL), \ { \ TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \ (_rulearray)[__ar].avp_name ); \ return EINVAL; \ } ); \ } \ } #define enumval_def_u32( _val_, _str_ ) \ { _str_, { .u32 = _val_ }} #define enumval_def_os( _len_, _val_, _str_ ) \ { _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}} /* Defines if there are any */ //New Result-Code for MIP (RFC5778, Section 7.*) #define DIAMETER_SUCCESS_RELOCATE_HA 2009 #define DIAMETER_ERROR_MIP6_AUTH_MODE 5041 //Others #define MIP6_AUTH_MN_AAA 1 /* Dictionary */ int dict_mip6a_init(char * conffile) { struct dict_object * mip6a; { struct dict_application_data data = { 8, "Diameter Mobile IPv6 Auth (MIP6A) Application" }; CHECK_dict_new( DICT_APPLICATION, &data , NULL, &mip6a); } /***************/ /* AVP section */ /***************/ { /* Loading all the derived data formats */ struct dict_object * Address_type; struct dict_object * UTF8String_type; struct dict_object * DiameterIdentity_type; struct dict_object * DiameterURI_type; struct dict_object * Time_type; CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Address", &Address_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterIdentity", &DiameterIdentity_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterURI", &DiameterURI_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Time", &Time_type); /////////////////////////////////////////// /* AVPs for Mobile IPv6 Auth Application */ /////////////////////////////////////////// /* MIP6-Feature-Vector - RFC 5447 */ { /* */ struct dict_avp_data data = { 124, /* Code */ 0, /* Vendor */ "MIP6-Feature-Vector", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* User-Name - RFC 3588 */ /* Implemented in the base protocol */ /* Service-Selection - RFC 5778 */ { /* */ struct dict_avp_data data = { 493, /* Code */ 0, /* Vendor */ "Service-Selection", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* MIP-MN-AAA-SPI - RFC 5778 */ { /* */ struct dict_avp_data data = { 341, /* Code */ 0, /* Vendor */ "MIP-MN-AAA-SPI", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Destination-Host - Base Protocol */ /* Implemented in the base protocol */ /* Destination-Realm - Base Protocol */ /* Implemented in the base protocol */ /* MIP-Home-Agent-Address - RFC 4004 */ { /* */ struct dict_avp_data data = { 334, /* Code */ 0, /* Vendor */ "MIP-Home-Agent-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); } /* MIP-Home-Agent-Host - RFC 4004 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 348, /* Code */ 0, /* Vendor */ "MIP-Home-Agent-Host", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Destination-Realm", RULE_REQUIRED, -1, 1 } ,{ "Destination-Host", RULE_REQUIRED, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* MIP6-Home-Link-Prefix - RFC 5447 */ { /* */ struct dict_avp_data data = { 125, /* Code */ 0, /* Vendor */ "MIP6-Home-Link-Prefix", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* MIP6-Agent-Info - RFC 5447*/ { /* */ struct dict_object * avp; struct dict_avp_data data = { 486, /* Code */ 0, /* Vendor */ "MIP6-Agent-Info", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "MIP-Home-Agent-Address", RULE_OPTIONAL, -1, 2 } ,{ "MIP-Home-Agent-Host", RULE_OPTIONAL, -1, 1 } ,{ "MIP6-Home-Link-Prefix", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* MIP-Replay-Mode - RFC 5778 & 4004 */ { /* */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(MIP-Replay-Mode)", NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "None", { .i32 = 1 }}; struct dict_enumval_data t_1 = { "Timestamp", { .i32 = 2 }}; struct dict_avp_data data = { 346, /* Code */ 0, /* Vendor */ "MIP-Replay-Mode", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* MIP-Algorithm-Type - RFC 5778 & 4004 */ { /* */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(MIP-Algorithm-Type)", NULL, NULL, NULL }; struct dict_enumval_data t_2 = { "HMAC-SHA-1 [HMAC]", { .i32 = 2 }}; struct dict_avp_data data = { 345, /* Code */ 0, /* Vendor */ "MIP-Algorithm-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* MIP-MN-HA-SPI - RFC 5778 */ { /* */ struct dict_avp_data data = { 491, /* Code */ 0, /* Vendor */ "MIP-MN-HA-SPI", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* MIP-MSA-Lifetime - RFC 4004 */ { /* */ struct dict_avp_data data = { 367, /* Code */ 0, /* Vendor */ "MIP-MSA-Lifetime", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* MIP-Session-Key - RFC 5778 */ { /* */ struct dict_avp_data data = { 343, /* Code */ 0, /* Vendor */ "MIP-Session-Key", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* MIP-MN-HA-MSA - RFC 5778 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 492, /* Code */ 0, /* Vendor */ "MIP-MN-HA-MSA", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "MIP-Session-Key", RULE_REQUIRED, -1, 1 } ,{ "MIP-MSA-Lifetime", RULE_REQUIRED, -1, 1 } ,{ "MIP-MN-HA-SPI", RULE_OPTIONAL, -1, 1 } ,{ "MIP-Algorithm-Type", RULE_OPTIONAL, -1, 1 } ,{ "MIP-Replay-Mode", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* MIP-Mobile-Node-Address - RFC 4004 */ { /* */ struct dict_avp_data data = { 333, /* Code */ 0, /* Vendor */ "MIP-Mobile-Node-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); } /* MIP-Careof-Address - RFC 5778 */ { /* */ struct dict_avp_data data = { 487, /* Code */ 0, /* Vendor */ "MIP-Careof-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); } /* MIP-Authenticator - RFC 5778 */ { /* */ struct dict_avp_data data = { 488, /* Code */ 0, /* Vendor */ "MIP-Authenticator", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* MIP-MAC-Mobility-Data - RFC 5778 */ { /* */ struct dict_avp_data data = { 489, /* Code */ 0, /* Vendor */ "MIP-MAC-Mobility-Data", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* MIP-Timestamp - RFC 5778 */ { /* */ struct dict_avp_data data = { 490, /* Code */ 0, /* Vendor */ "MIP-Timestamp", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Chargeable-User-Identity - RFC 5778 */ { /* */ struct dict_avp_data data = { 89, /* Code */ 0, /* Vendor */ "Chargeable-User-Identity", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* MIP6-Auth-Mode - RFC 5778 */ { /* */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(MIP6-Auth-Mode)", NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "None", { .i32 = MIP6_AUTH_MN_AAA }}; struct dict_avp_data data = { 494, /* Code */ 0, /* Vendor */ "MIP6-Auth-Mode", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } ////////////// /* QoS AVPs */ ////////////// /* QoS-Capability */ /* Implemented in RFC 5777 */ /* QoS-Resources */ /* Implemented in RFC 5777 */ ///////////////////// /* Accounting AVPs */ ///////////////////// /* Accounting-Input-Octets - RFC 4004 */ { /* */ struct dict_avp_data data = { 363, /* Code */ 0, /* Vendor */ "Accounting-Input-Octets", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Accounting-Output-Octets - RFC 4004 */ { /* */ struct dict_avp_data data = { 364, /* Code */ 0, /* Vendor */ "Accounting-Output-Octets", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Accounting-Input-Packets - RFC 4004 */ { /* */ struct dict_avp_data data = { 365, /* Code */ 0, /* Vendor */ "Accounting-Input-Packets", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Accounting-Output-Packets - RFC 4004 */ { /* */ struct dict_avp_data data = { 366, /* Code */ 0, /* Vendor */ "Accounting-Output-Packets", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Acct-Multi-Session-Id - RFC 3588 */ /* Implemented in the base protocol */ /* Acct-Session-Time - RFC 4004 */ { /* */ struct dict_avp_data data = { 46, /* Code */ 0, /* Vendor */ "Acct-Session-Time", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } ///////////////////////////////////// /* Radius AVPs - used in MIR & MIA */ ///////////////////////////////////// /* We used the following correspondences for determining the type of the Radius AVPs Radius Diameter text UTF8Sting string OctetString address Address integer Unsigned32 time Time */ /* NAS-Identifier 32 3575 */ { /* string -> OctetString */ struct dict_avp_data data = { 32, /* Code */ 0, /* Vendor */ "NAS-Identifier", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* NAS-IP-Address 4 3575 */ { /* address -> Address */ struct dict_avp_data data = { 4, /* Code */ 0, /* Vendor */ "NAS-IP-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); } /* NAS-IPv6-Address 95 3162 */ { /* address -> Address */ struct dict_avp_data data = { 95, /* Code */ 0, /* Vendor */ "NAS-IPv6-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); } /* NAS-Port-Type 61 2865 */ { /* integer -> Unsigned32 Value The Value field is four octets. "Virtual" refers to a connection to the NAS via some transport protocol, instead of through a physical port. For example, if a user telnetted into a NAS to authenticate himself as an Outbound-User, the Access-Request might include NAS-Port-Type = Virtual as a hint to the RADIUS server that the user was not on a physical port. 0 Async 1 Sync 2 ISDN Sync 3 ISDN Async V.120 4 ISDN Async V.110 5 Virtual 6 PIAFS 7 HDLC Clear Channel 8 X.25 9 X.75 10 G.3 Fax 11 SDSL - Symmetric DSL 12 ADSL-CAP - Asymmetric DSL, Carrierless Amplitude Phase Modulation 13 ADSL-DMT - Asymmetric DSL, Discrete Multi-Tone 14 IDSL - ISDN Digital Subscriber Line 15 Ethernet 16 xDSL - Digital Subscriber Line of unknown type 17 Cable 18 Wireless - Other 19 Wireless - IEEE 802.11 PIAFS is a form of wireless ISDN commonly used in Japan, and stands for PHS (Personal Handyphone System) Internet Access Forum Standard (PIAFS). */ struct dict_avp_data data = { 61, /* Code */ 0, /* Vendor */ "NAS-Port-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Called-Station-Id 30 2865 */ { /* string -> OctetString */ struct dict_avp_data data = { 30, /* Code */ 0, /* Vendor */ "Called-Station-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Calling-Station-Id 31 2865 */ { /* string -> OctetString */ struct dict_avp_data data = { 31, /* Code */ 0, /* Vendor */ "Calling-Station-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } } /*******************/ /* Command section */ /*******************/ { /* MIP6-Request (MIR) */ { /* The MIP6-Request (MIR), indicated by the Command-Code field set to 325 and the 'R' bit set in the Command Flags field, is sent by the HA, acting as a Diameter client, in order to request the authentication and authorization of an MN. Although the HA provides the Diameter server with replay protection- related information, the HA is responsible for the replay protection. The message format is shown below. ::= < Diameter Header: 325, REQ, PXY > < Session-ID > { Auth-Application-Id } { User-Name } { Destination-Realm } { Origin-Host } { Origin-Realm } { Auth-Request-Type } [ Destination-Host ] [ Origin-State-Id ] [ NAS-Identifier ] [ NAS-IP-Address ] [ NAS-IPv6-Address ] [ NAS-Port-Type ] [ Called-Station-Id ] [ Calling-Station-Id ] [ MIP6-Feature-Vector ] { MIP6-Auth-Mode } [ MIP-MN-AAA-SPI ] [ MIP-MN-HA-SPI ] 1*2{ MIP-Mobile-Node-Address } { MIP6-Agent-Info } { MIP-Careof-Address } [ MIP-Authenticator ] [ MIP-MAC-Mobility-Data ] [ MIP-Timestamp ] [ QoS-Capability ] * [ QoS-Resources ] [ Chargeable-User-Identity ] [ Service-Selection ] [ Authorization-Lifetime ] [ Auth-Session-State ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] If the MN is both authenticated and authorized for the mobility service, then the Auth-Request-Type AVP is set to the value AUTHORIZE_AUTHENTICATE. This is the case when the MIP6-Auth-Mode is set to the value MIP6_AUTH_MN_AAA. */ struct dict_object * cmd; struct dict_cmd_data data = { 325, /* Code */ "MIP6-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "User-Name", RULE_REQUIRED, -1, 1 } ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Auth-Request-Type", RULE_REQUIRED, -1, 1 } ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } ,{ "Origin-State-Id", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Identifier", RULE_OPTIONAL, -1, 1 } ,{ "NAS-IP-Address", RULE_OPTIONAL, -1, 1 } ,{ "NAS-IPv6-Address", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Port-Type", RULE_OPTIONAL, -1, 1 } ,{ "Called-Station-Id", RULE_OPTIONAL, -1, 1 } ,{ "Calling-Station-Id", RULE_OPTIONAL, -1, 1 } ,{ "MIP6-Feature-Vector", RULE_OPTIONAL, -1, 1 } ,{ "MIP6-Auth-Mode", RULE_OPTIONAL, -1, 1 } ,{ "MIP-MN-AAA-SPI", RULE_OPTIONAL, -1, 1 } ,{ "MIP-MN-HA-SPI", RULE_OPTIONAL, -1, 1 } ,{ "MIP-Mobile-Node-Address", RULE_OPTIONAL, 1, 2 } ,{ "MIP6-Agent-Info", RULE_OPTIONAL, -1, 1 } ,{ "MIP-Careof-Address", RULE_OPTIONAL, -1, 1 } ,{ "MIP-Authenticator", RULE_OPTIONAL, -1, 1 } ,{ "MIP-MAC-Mobility-Data", RULE_OPTIONAL, -1, 1 } ,{ "MIP-Timestamp", RULE_OPTIONAL, -1, 1 } ,{ "QoS-Capability", RULE_OPTIONAL, -1, 1 } ,{ "QoS-Resources", RULE_OPTIONAL, -1, -1 } ,{ "Chargeable-User-Identity", RULE_OPTIONAL, -1, 1 } ,{ "Service-Selection", RULE_OPTIONAL, -1, 1 } ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Session-State", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data, mip6a, &cmd); PARSE_loc_rules( rules, cmd ); } /* MIP6-Answer (MIA) */ { /* The MIP6-Answer (MIA) message, indicated by the Command-Code field set to 325 and the 'R' bit cleared in the Command Flags field, is sent by the Diameter server in response to the MIP6-Request message. The User-Name AVP MAY be included in the MIA if it is present in the MIR. The Result-Code AVP MAY contain one of the values defined in Section 7, in addition to the values defined in [RFC3588]. An MIA message with the Result-Code AVP set to DIAMETER_SUCCESS MUST include the MIP-Mobile-Node-Address AVP. The message format is shown below. ::= < Diameter Header: 325, PXY > < Session-Id > { Auth-Application-Id } { Result-Code } { Origin-Host } { Origin-Realm } { Auth-Request-Type } [ User-Name ] [ Authorization-Lifetime ] [ Auth-Session-State ] [ Error-Message ] [ Error-Reporting-Host ] [ Re-Auth-Request-Type ] [ MIP6-Feature-Vector ] [ MIP6-Agent-Info ] *2[ MIP-Mobile-Node-Address ] [ MIP-MN-HA-MSA ] * [ QoS-Resources ] [ Chargeable-User-Identity ] [ Service-Selection ] [ Origin-State-Id ] * [ Proxy-Info ] * [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Max-Cache-Time ] * [ Failed-AVP ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 325, /* Code */ "MIP6-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Result-Code", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Auth-Request-Type", RULE_REQUIRED, -1, 1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Session-State", RULE_OPTIONAL, -1, 1 } ,{ "Error-Message", RULE_OPTIONAL, -1, 1 } ,{ "Error-Reporting-Host", RULE_OPTIONAL, -1, 1 } ,{ "Re-Auth-Request-Type", RULE_OPTIONAL, -1, 1 } ,{ "MIP6-Feature-Vector", RULE_OPTIONAL, -1, 1 } ,{ "MIP6-Agent-Info", RULE_OPTIONAL, -1, 1 } ,{ "MIP-Mobile-Node-Address", RULE_OPTIONAL, -1, 2 } ,{ "MIP-MN-HA-MSA", RULE_OPTIONAL, -1, 1 } ,{ "QoS-Resources", RULE_OPTIONAL, -1, -1 } ,{ "Chargeable-User-Identity", RULE_OPTIONAL, -1, 1 } ,{ "Service-Selection", RULE_OPTIONAL, -1, 1 } ,{ "Origin-State-Id", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Redirect-Host", RULE_OPTIONAL, -1, -1 } ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 } ,{ "Failed-AVP", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data, mip6a, &cmd); PARSE_loc_rules( rules, cmd ); } } LOG_D( "Dictionary Extension 'Diameter Mobile IPv6 Auth (MIP6A)' initialized"); return 0; } EXTENSION_ENTRY("dict_mip6a", dict_mip6a_init, "dict_rfc5777"); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_mip6i/000077500000000000000000000000001333553357400233015ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_mip6i/CMakeLists.txt000066400000000000000000000004641333553357400260450ustar00rootroot00000000000000# The dict_mip6i extension PROJECT("Diameter Mobile IPv6 IKE (MIP6I) Dictionary Definition" C) # Compile as a module FD_ADD_EXTENSION(dict_mip6i dict_mip6i.c) #### ## INSTALL section ## INSTALL(TARGETS dict_mip6i LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-dictionary-mip6) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_mip6i/Makefile.am000066400000000000000000000010511333553357400253320ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in extlib_LTLIBRARIES = dict_mip6i.la dict_mip6i_la_SOURCES = \ dict_mip6i.c dict_mip6i_la_DEPENDENCIES = \ $(top_srcdir)/libfdcore/libfdcore.la \ $(top_srcdir)/libfdproto/libfdproto.la dict_mip6i_la_LIBADD = \ $(top_srcdir)/libfdcore/libfdcore.la \ $(top_srcdir)/libfdproto/libfdproto.la AM_LDFLAGS = \ -module -avoid-version -shared AM_CPPFLAGS = \ -I$(top_srcdir)/include AM_CFLAGS = \ -Wall -Werror MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_mip6i/dict_mip6i.c000066400000000000000000001051741333553357400255040ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Francois Bard * * * * Copyright (c) 2010, Teraoka Laboratory, Keio University * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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 following table complete the one in RFC 5778, page 18. The AVPs are implemented below following the order of this table. We try to keep the structure of the grouped AVP by declaring the contained AVPs just before the grouped AVP they depend on. The number of '+' indicates the depth of the contained AVP. DEPTH NAME AVP RFC TYPE NOTES MIP6-Feature-Vector 124 5447 Unsigned64 MIP-Mobile-Node-Address 333 4004 Address + MIP-Home-Agent-Address 334 4004 Address ++ Destination-Host 293 3588 DiameterIdentity ++ Destination-Realm 283 3588 DiameterIdentity + MIP-Home-Agent-Host 348 4004 Grouped + MIP6-Home-Link-Prefix 125 5447 OctetString MIP6-Agent-Info 486 5447 Grouped User-Name 1 3588 UTF8String Service-Selection 493 5778 UTF8String + MIP-Replay-Mode 346 4004 Enumerated + MIP-Algorithm-Type 345 4004 Enumerated + MIP-MN-HA-SPI 491 5778 Unsigned32 + MIP-MSA-Lifetime 367 4004 Unsigned32 + MIP-Session-Key 343 4004 OctetString MIP-MN-HA-MSA 492 5778 Grouped different from MIP-MN-to-HA-MSA (331) Chargeable-User-Identity 89 5778 OctetString QoS AVPs (RFC 5777 - implemented in the corresponding dictionary) QoS-Capability 578 5777 Grouped QoS-Resources 508 5777 Grouped ACCOUNTING AVPs (section 6.21) Accounting-Input-Octets 363 4004, 4005 Unsigned64 Accounting-Output-Octets 364 4004, 4005 Unsigned64 Accounting-Input-Packets 365 4004, 4005 Unsigned64 Accounting-Output-Packets 366 4004, 4005 Unsigned64 Acct-Multi-Session-Id 50 3588 UTF8String Acct-Session-Time 46 2866, 4004 Unsigned32 MIP6-Feature-Vector ---------------------------------- MIP-Mobile-Node-Address ---------------------------------- MIP6-Agent-Info ---------------------------------- Chargeable-User-Identity ---------------------------------- Service-Selection ---------------------------------- QoS-Resources ---------------------------------- QoS-Capability ---------------------------------- MIP-Careof-Address 487 5778 Address needed (appears in MIR/MIA) REST OF THE AVPs IN THE MIR & MIA EXCLUDING *[AVP] (as written on page 19 of RFC 5778) MIP6-Request Session-ID 263 3588 Auth-Application-Id 258 3588 User-Name 1 3588 Destination-Realm 283 3588 Origin-Host 264 3588 Origin-Realm 296 3588 Auth-Request-Type 274 3588 Origin-State-Id 278 3588 NAS-Identifier 32 2865 radius (see avp) needed (radius) NAS-IP-Address 4 2865 radius (see avp) needed (radius) NAS-IPv6-Address 95 3162 radius (see avp) needed (radius) NAS-Port-Type 61 2865 radius (see avp) needed (radius) Called-Station-Id 30 2865 radius (see avp) needed (radius) Calling-Station-Id 31 2865 radius (see avp) needed (radius) MIP6-Feature-Vector ------------ MIP6-Auth-Mode 494 5778 Enumerated needed (mip6a) MIP-MN-AAA-SPI 341 5778 Unsigned32 needed (mip6a) MIP-MN-HA-SPI ------------ MIP-Mobile-Node-Address ------------ MIP6-Agent-Info ------------ MIP-Careof-Address ------------ MIP-Authenticator 488 5778 OctetString needed (mip6a) MIP-MAC-Mobility-Data 489 5778 OctetString needed (mip6a) MIP-Timestamp 490 5778 OctetString needed (mip6a) QoS-Capability ------------ QoS-Resources ------------ Chargeable-User-Identity ------------ Service-Selection ------------ Authorization-Lifetime 291 3588 Auth-Session-State 277 3588 Proxy-Info 284 3588 Route-Record 282 3588 MIP6-Answer - All of them are already implemented as base protocol AVPs or implemented earlier. */ /**************************************************************************************************************************************** * * * This table is a copy of the registry named "MIP6 Authentication Mode Registry" and managed by IANA. * * source : http://www.iana.org/assignments/aaa-parameters/aaa-parameters.txt * * up to date on october 2010 * * * * Value Token Reference * * 0 Reserved [RFC5778] * * 1 MIP6_AUTH_MN_AAA [RFC5778] * * 2-4294967295 Unassigned * * * ****************************************************************************************************************************************/ /* NOTES check for omissions ! */ #include #define CHECK_dict_new( _type, _data, _parent, _ref ) \ CHECK_FCT( fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref)) ); #define CHECK_dict_search( _type, _criteria, _what, _result ) \ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); struct local_rules_definition { char *avp_name; enum rule_position position; int min; int max; }; #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) #define PARSE_loc_rules( _rulearray, _parent) { \ int __ar; \ for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ struct dict_rule_data __data = { NULL, \ (_rulearray)[__ar].position, \ 0, \ (_rulearray)[__ar].min, \ (_rulearray)[__ar].max}; \ __data.rule_order = RULE_ORDER(__data.rule_position); \ CHECK_FCT( fd_dict_search( \ fd_g_config->cnf_dict, \ DICT_AVP, \ AVP_BY_NAME, \ (_rulearray)[__ar].avp_name, \ &__data.rule_avp, 0 ) ); \ if ( !__data.rule_avp ) { \ TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_name ); \ return ENOENT; \ } \ CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL), \ { \ TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \ (_rulearray)[__ar].avp_name ); \ return EINVAL; \ } ); \ } \ } #define enumval_def_u32( _val_, _str_ ) \ { _str_, { .u32 = _val_ }} #define enumval_def_os( _len_, _val_, _str_ ) \ { _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}} /* Defines if there are any */ //New Result-Code for MIP (RFC5778, Section 7.*) #define DIAMETER_SUCCESS_RELOCATE_HA 2009 #define DIAMETER_ERROR_MIP6_AUTH_MODE 5041 //others #define MIP6_AUTH_MN_AAA 1 /* Dictionary */ int dict_mip6i_init(char * conffile) { struct dict_object * mip6i; { struct dict_application_data data = { 7, "Diameter Mobile IPv6 IKE (MIP6I) Application" }; CHECK_dict_new( DICT_APPLICATION, &data , NULL, &mip6i); } /***************/ /* AVP section */ /***************/ { /* Loading all the derived data formats */ struct dict_object * Address_type; struct dict_object * UTF8String_type; struct dict_object * DiameterIdentity_type; struct dict_object * DiameterURI_type; struct dict_object * Time_type; CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Address", &Address_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterIdentity", &DiameterIdentity_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterURI", &DiameterURI_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Time", &Time_type); /* MIP6-Feature-Vector - RFC 5447 */ { /* */ struct dict_avp_data data = { 124, /* Code */ 0, /* Vendor */ "MIP6-Feature-Vector", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* MIP-Mobile-Node-Address - RFC 4004 */ { /* */ struct dict_avp_data data = { 333, /* Code */ 0, /* Vendor */ "MIP-Mobile-Node-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); } /* MIP-Home-Agent-Address - RFC 4004 */ { /* */ struct dict_avp_data data = { 334, /* Code */ 0, /* Vendor */ "MIP-Home-Agent-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); } /* Destination-Host - Base Protocol */ /* Implemented in the base protocol */ /* Destination-Realm - Base Protocol */ /* Implemented in the base protocol */ /* MIP-Home-Agent-Host - RFC 4004 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 348, /* Code */ 0, /* Vendor */ "MIP-Home-Agent-Host", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Destination-Realm", RULE_REQUIRED, -1, 1 } ,{ "Destination-Host", RULE_REQUIRED, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* MIP6-Home-Link-Prefix - RFC 5447 */ { /* */ struct dict_avp_data data = { 125, /* Code */ 0, /* Vendor */ "MIP6-Home-Link-Prefix", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* MIP6-Agent-Info - RFC 5447 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 486, /* Code */ 0, /* Vendor */ "MIP6-Agent-Info", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "MIP-Home-Agent-Address", RULE_OPTIONAL, -1, 2 } ,{ "MIP-Home-Agent-Host", RULE_OPTIONAL, -1, 1 } ,{ "MIP6-Home-Link-Prefix", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* User-Name - RFC 3588 */ /* Implemented in the base protocol */ /* Service-Selection - RFC 5778 */ { /* */ struct dict_avp_data data = { 493, /* Code */ 0, /* Vendor */ "Service-Selection", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* MIP-Replay-Mode - RFC 5778 */ { /* */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(MIP-Replay-Mode)" , NULL, NULL, NULL }; struct dict_enumval_data t_1 = { "None", { .i32 = 1 }}; struct dict_enumval_data t_2 = { "Timestamp", { .i32 = 2 }}; struct dict_avp_data data = { 346, /* Code */ 0, /* Vendor */ "MIP-Replay-Mode", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* MIP-Algorithm-Type - RFC 5778 */ { /* The MIP-Algorithm-Type AVP (AVP Code 345) is of type Enumerated and contains the Algorithm identifier for the associated Mobile IPv6 MN-HA Authentication Option. The Diameter server selects the algorithm type. Existing algorithm types are defined in [RFC4004] that also fulfill current RFC 4285 requirements. This AVP is reused from [RFC4004]. */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(MIP-Algorithm-Type)" , NULL, NULL, NULL }; struct dict_enumval_data t_2 = { "HMAC-SHA-1 [HMAC]", { .i32 = 2 }}; struct dict_avp_data data = { 345, /* Code */ 0, /* Vendor */ "MIP-Algorithm-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* MIP-MN-HA-SPI - RFC 5778 */ { /* */ struct dict_avp_data data = { 491, /* Code */ 0, /* Vendor */ "MIP-MN-HA-SPI", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* MIP-MSA-Lifetime - RFC 5778 */ { /* */ struct dict_avp_data data = { 367, /* Code */ 0, /* Vendor */ "MIP-MSA-Lifetime", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* MIP-Session-Key - RFC 5778 */ { /* */ struct dict_avp_data data = { 343, /* Code */ 0, /* Vendor */ "MIP-Session-Key", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* MIP-MN-HA-MSA - RFC 5778 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 492, /* Code */ 0, /* Vendor */ "MIP-MN-HA-MSA", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "MIP-Session-Key", RULE_REQUIRED, -1, 1 } ,{ "MIP-MSA-Lifetime", RULE_REQUIRED, -1, 1 } ,{ "MIP-MN-HA-SPI", RULE_OPTIONAL, -1, 1 } ,{ "MIP-Algorithm-Type", RULE_OPTIONAL, -1, 1 } ,{ "MIP-Replay-Mode", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* Chargeable-User-Identity - RFC 5778 */ { /* */ struct dict_avp_data data = { 89, /* Code */ 0, /* Vendor */ "Chargeable-User-Identity", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } ////////////// /* QoS AVPs */ ////////////// /* QoS-Capability */ /* Implemented in RFC 5777 */ /* QoS-Resources */ /* Implemented in RFC 5777 */ ///////////////////// /* Accounting AVPs */ ///////////////////// /* Accounting-Input-Octets - RFC 4004 */ { /* */ struct dict_avp_data data = { 363, /* Code */ 0, /* Vendor */ "Accounting-Input-Octets", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Accounting-Output-Octets - RFC 4004 */ { /* */ struct dict_avp_data data = { 364, /* Code */ 0, /* Vendor */ "Accounting-Output-Octets", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Accounting-Input-Packets - RFC 4004 */ { /* */ struct dict_avp_data data = { 365, /* Code */ 0, /* Vendor */ "Accounting-Input-Packets", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Accounting-Output-Packets - RFC 4004 */ { /* */ struct dict_avp_data data = { 366, /* Code */ 0, /* Vendor */ "Accounting-Output-Packets", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Acct-Multi-Session-Id - RFC 3588 */ /* Implemented in the base protocol */ /* Acct-Session-Time - RFC 4004 */ { /* */ struct dict_avp_data data = { 46, /* Code */ 0, /* Vendor */ "Acct-Session-Time", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* MIP-Careof-Address - RFC 5778 */ { /* This AVP is needed in MIP6I at least for implementation reasons (it appears in a command) */ struct dict_avp_data data = { 487, /* Code */ 0, /* Vendor */ "MIP-Careof-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); } ///////////////////////////////////// /* Radius AVPs used in MIR & MIA */ ///////////////////////////////////// /* We used the following correspondences for determining the type of the Radius AVPs Radius Diameter text UTF8Sting string OctetString address Address integer Unsigned32 time Time */ /* NAS-Identifier 32 3575 */ { /* string -> OctetString */ struct dict_avp_data data = { 32, /* Code */ 0, /* Vendor */ "NAS-Identifier", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* NAS-IP-Address 4 3575 */ { /* address -> Address */ struct dict_avp_data data = { 4, /* Code */ 0, /* Vendor */ "NAS-IP-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); } /* NAS-IPv6-Address 95 3162 */ { /* address -> Address */ struct dict_avp_data data = { 95, /* Code */ 0, /* Vendor */ "NAS-IPv6-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); } /* NAS-Port-Type 61 2865 */ { /* integer -> Unsigned32 Value The Value field is four octets. "Virtual" refers to a connection to the NAS via some transport protocol, instead of through a physical port. For example, if a user telnetted into a NAS to authenticate himself as an Outbound-User, the Access-Request might include NAS-Port-Type = Virtual as a hint to the RADIUS server that the user was not on a physical port. 0 Async 1 Sync 2 ISDN Sync 3 ISDN Async V.120 4 ISDN Async V.110 5 Virtual 6 PIAFS 7 HDLC Clear Channel 8 X.25 9 X.75 10 G.3 Fax 11 SDSL - Symmetric DSL 12 ADSL-CAP - Asymmetric DSL, Carrierless Amplitude Phase Modulation 13 ADSL-DMT - Asymmetric DSL, Discrete Multi-Tone 14 IDSL - ISDN Digital Subscriber Line 15 Ethernet 16 xDSL - Digital Subscriber Line of unknown type 17 Cable 18 Wireless - Other 19 Wireless - IEEE 802.11 PIAFS is a form of wireless ISDN commonly used in Japan, and stands for PHS (Personal Handyphone System) Internet Access Forum Standard (PIAFS). */ struct dict_avp_data data = { 61, /* Code */ 0, /* Vendor */ "NAS-Port-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Called-Station-Id 30 2865 */ { /* string -> OctetString */ struct dict_avp_data data = { 30, /* Code */ 0, /* Vendor */ "Called-Station-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Calling-Station-Id 31 2865 */ { /* string -> OctetString */ struct dict_avp_data data = { 31, /* Code */ 0, /* Vendor */ "Calling-Station-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /////////////////////////////////////////////////////////// /* REST OF THE AVP IN THE MIR AND MIA EXCLUDING *[AVP] */ /////////////////////////////////////////////////////////// /* MIP6-Auth-Mode - RFC 5778 */ { /* */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(MIP6-Auth-Mode)", NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "None", { .i32 = MIP6_AUTH_MN_AAA }}; struct dict_avp_data data = { 494, /* Code */ 0, /* Vendor */ "MIP6-Auth-Mode", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* MIP-MN-AAA-SPI - RFC 5778 */ { /* */ struct dict_avp_data data = { 341, /* Code */ 0, /* Vendor */ "MIP-MN-AAA-SPI", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* MIP-Authenticator - RFC 5778 */ { /* */ struct dict_avp_data data = { 488, /* Code */ 0, /* Vendor */ "MIP-Authenticator", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* MIP-MAC-Mobility-Data - RFC 5778 */ { /* */ struct dict_avp_data data = { 489, /* Code */ 0, /* Vendor */ "MIP-MAC-Mobility-Data", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* MIP-Timestamp - RFC 5778 */ { /* */ struct dict_avp_data data = { 490, /* Code */ 0, /* Vendor */ "MIP-Timestamp", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } } /*******************/ /* Command section */ /*******************/ { /* Diameter-EAP-Request (DER) */ /* Defined in dict_eap */ /* Diameter-EAP-Answer (DEA) - COPIED FROM dict_eap.c, SEE IT FOR MORE REFERENCE */ /* Defined in dict_eap */ /* MIP6-Request (MIR) */ { /* The MIP6-Request (MIR), indicated by the Command-Code field set to 325 and the 'R' bit set in the Command Flags field, is sent by the HA, acting as a Diameter client, in order to request the authentication and authorization of an MN. Although the HA provides the Diameter server with replay protection- related information, the HA is responsible for the replay protection. The message format is shown below. ::= < Diameter Header: 325, REQ, PXY > < Session-ID > { Auth-Application-Id } { User-Name } { Destination-Realm } { Origin-Host } { Origin-Realm } { Auth-Request-Type } [ Destination-Host ] [ Origin-State-Id ] [ NAS-Identifier ] [ NAS-IP-Address ] [ NAS-IPv6-Address ] [ NAS-Port-Type ] [ Called-Station-Id ] [ Calling-Station-Id ] [ MIP6-Feature-Vector ] { MIP6-Auth-Mode } [ MIP-MN-AAA-SPI ] [ MIP-MN-HA-SPI ] 1*2{ MIP-Mobile-Node-Address } { MIP6-Agent-Info } { MIP-Careof-Address } [ MIP-Authenticator ] [ MIP-MAC-Mobility-Data ] [ MIP-Timestamp ] [ QoS-Capability ] * [ QoS-Resources ] [ Chargeable-User-Identity ] [ Service-Selection ] [ Authorization-Lifetime ] [ Auth-Session-State ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] If the MN is both authenticated and authorized for the mobility service, then the Auth-Request-Type AVP is set to the value AUTHORIZE_AUTHENTICATE. This is the case when the MIP6-Auth-Mode is set to the value MIP6_AUTH_MN_AAA. */ struct dict_object * cmd; struct dict_cmd_data data = { 325, /* Code */ "MIP6-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "User-Name", RULE_REQUIRED, -1, 1 } ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Auth-Request-Type", RULE_REQUIRED, -1, 1 } ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } ,{ "Origin-State-Id", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Identifier", RULE_OPTIONAL, -1, 1 } ,{ "NAS-IP-Address", RULE_OPTIONAL, -1, 1 } ,{ "NAS-IPv6-Address", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Port-Type", RULE_OPTIONAL, -1, 1 } ,{ "Called-Station-Id", RULE_OPTIONAL, -1, 1 } ,{ "Calling-Station-Id", RULE_OPTIONAL, -1, 1 } ,{ "MIP6-Feature-Vector", RULE_OPTIONAL, -1, 1 } ,{ "MIP6-Auth-Mode", RULE_OPTIONAL, -1, 1 } ,{ "MIP-MN-AAA-SPI", RULE_OPTIONAL, -1, 1 } ,{ "MIP-MN-HA-SPI", RULE_OPTIONAL, -1, 1 } ,{ "MIP-Mobile-Node-Address", RULE_OPTIONAL, 1, 2 } ,{ "MIP6-Agent-Info", RULE_OPTIONAL, -1, 1 } ,{ "MIP-Careof-Address", RULE_OPTIONAL, -1, 1 } ,{ "MIP-Authenticator", RULE_OPTIONAL, -1, 1 } ,{ "MIP-MAC-Mobility-Data", RULE_OPTIONAL, -1, 1 } ,{ "MIP-Timestamp", RULE_OPTIONAL, -1, 1 } ,{ "QoS-Capability", RULE_OPTIONAL, -1, 1 } ,{ "QoS-Resources", RULE_OPTIONAL, -1, -1 } ,{ "Chargeable-User-Identity", RULE_OPTIONAL, -1, 1 } ,{ "Service-Selection", RULE_OPTIONAL, -1, 1 } ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Session-State", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data, mip6i, &cmd); PARSE_loc_rules( rules, cmd ); } /* MIP6-Answer (MIA) */ { /* The MIP6-Answer (MIA) message, indicated by the Command-Code field set to 325 and the 'R' bit cleared in the Command Flags field, is sent by the Diameter server in response to the MIP6-Request message. The User-Name AVP MAY be included in the MIA if it is present in the MIR. The Result-Code AVP MAY contain one of the values defined in Section 7, in addition to the values defined in [RFC3588]. An MIA message with the Result-Code AVP set to DIAMETER_SUCCESS MUST include the MIP-Mobile-Node-Address AVP. The message format is shown below. ::= < Diameter Header: 325, PXY > < Session-Id > { Auth-Application-Id } { Result-Code } { Origin-Host } { Origin-Realm } { Auth-Request-Type } [ User-Name ] [ Authorization-Lifetime ] [ Auth-Session-State ] [ Error-Message ] [ Error-Reporting-Host ] [ Re-Auth-Request-Type ] [ MIP6-Feature-Vector ] [ MIP6-Agent-Info ] *2[ MIP-Mobile-Node-Address ] [ MIP-MN-HA-MSA ] * [ QoS-Resources ] [ Chargeable-User-Identity ] [ Service-Selection ] [ Origin-State-Id ] * [ Proxy-Info ] * [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Max-Cache-Time ] * [ Failed-AVP ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 325, /* Code */ "MIP6-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Result-Code", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Auth-Request-Type", RULE_REQUIRED, -1, 1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Session-State", RULE_OPTIONAL, -1, 1 } ,{ "Error-Message", RULE_OPTIONAL, -1, 1 } ,{ "Error-Reporting-Host", RULE_OPTIONAL, -1, 1 } ,{ "Re-Auth-Request-Type", RULE_OPTIONAL, -1, 1 } ,{ "MIP6-Feature-Vector", RULE_OPTIONAL, -1, 1 } ,{ "MIP6-Agent-Info", RULE_OPTIONAL, -1, 1 } ,{ "MIP-Mobile-Node-Address", RULE_OPTIONAL, -1, 2 } ,{ "MIP-MN-HA-MSA", RULE_OPTIONAL, -1, 1 } ,{ "QoS-Resources", RULE_OPTIONAL, -1, -1 } ,{ "Chargeable-User-Identity", RULE_OPTIONAL, -1, 1 } ,{ "Service-Selection", RULE_OPTIONAL, -1, 1 } ,{ "Origin-State-Id", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Redirect-Host", RULE_OPTIONAL, -1, -1 } ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 } ,{ "Failed-AVP", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data, mip6i, &cmd); PARSE_loc_rules( rules, cmd ); } } LOG_D( "Dictionary Extension 'Diameter Mobile IPv6 IKE (MIP6I)' initialized"); return 0; } EXTENSION_ENTRY("dict_mip6i", dict_mip6i_init, "dict_rfc5777"); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_nas_mipv6/000077500000000000000000000000001333553357400241575ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_nas_mipv6/CMakeLists.txt000066400000000000000000000005011333553357400267130ustar00rootroot00000000000000# The dict_nas_mipv6 extension PROJECT("MIPv6 NAS-to-HAAA Interaction Dictionary Definition" C) # Compile as a module FD_ADD_EXTENSION(dict_nas_mipv6 dict_nas_mipv6.c) #### ## INSTALL section ## INSTALL(TARGETS dict_nas_mipv6 LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-dictionary-mip6) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_nas_mipv6/Makefile.am000066400000000000000000000010751333553357400262160ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in extlib_LTLIBRARIES = dict_nas_mipv6.la dict_nas_mipv6_la_SOURCES = \ dict_nas_mipv6.c dict_nas_mipv6_la_DEPENDENCIES = \ $(top_srcdir)/libfdcore/libfdcore.la \ $(top_srcdir)/libfdproto/libfdproto.la dict_nas_mipv6_la_LIBADD = \ $(top_srcdir)/libfdcore/libfdcore.la \ $(top_srcdir)/libfdproto/libfdproto.la AM_LDFLAGS = \ -module -avoid-version -shared AM_CPPFLAGS = \ -I$(top_srcdir)/include AM_CFLAGS = \ -Wall -Werror MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_nas_mipv6/dict_nas_mipv6.c000066400000000000000000000207401333553357400272330ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Francois Bard * * * * Copyright (c) 2010, Teraoka Laboratory, Keio University * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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 following table lists the AVPs needed for the NAS to HAAA server interaction. We try to keep the structure of the grouped AVP by declaring the contained AVPs just before the grouped AVP they depend on. The number of '+' indicates the depth of the contained AVP. DEPTH NAME AVP CODE RFC TYPE IMPLEMENTED NOTES MIP6-Feature-Vector 124 5447 Unsigned64 yes + MIP-Home-Agent-Address 334 4004 Address not yet ++ Destination-Host 293 3588 DiameterIdentity no (Base) ++ Destination-Realm 283 3588 DiameterIdentity no (Base) + MIP-Home-Agent-Host 348 4004 Grouped not yet + MIP6-Home-Link-Prefix 125 5447 OctetString yes MIP6-Agent-Info 486 5447 Grouped yes */ #include /* The content of this file follows the same structure as dict_base_proto.c */ #define CHECK_dict_new( _type, _data, _parent, _ref ) \ CHECK_FCT( fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref)) ); #define CHECK_dict_search( _type, _criteria, _what, _result ) \ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); struct local_rules_definition { char *avp_name; enum rule_position position; int min; int max; }; #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) #define PARSE_loc_rules( _rulearray, _parent) { \ int __ar; \ for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ struct dict_rule_data __data = { NULL, \ (_rulearray)[__ar].position, \ 0, \ (_rulearray)[__ar].min, \ (_rulearray)[__ar].max}; \ __data.rule_order = RULE_ORDER(__data.rule_position); \ CHECK_FCT( fd_dict_search( \ fd_g_config->cnf_dict, \ DICT_AVP, \ AVP_BY_NAME, \ (_rulearray)[__ar].avp_name, \ &__data.rule_avp, 0 ) ); \ if ( !__data.rule_avp ) { \ TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_name ); \ return ENOENT; \ } \ CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL), \ { \ TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \ (_rulearray)[__ar].avp_name ); \ return EINVAL; \ } ); \ } \ } #define enumval_def_u32( _val_, _str_ ) \ { _str_, { .u32 = _val_ }} #define enumval_def_os( _len_, _val_, _str_ ) \ { _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}} /* Defines if there are any */ /* Define Flags for MIP6-Feature-Vector*/ #define MIP6_INTEGRATED 0x0000000000000001 #define LOCAL_HOME_AGENT_ASSIGNMENT 0x0000000000000002 /* Dictionary */ int dict_nas_mipv6_init(char * conffile) { struct dict_object * nas_mipv6; { struct dict_application_data data = { 5447, "MIPv6 NAS-to-HAAA Interaction" }; CHECK_dict_new( DICT_APPLICATION, &data , NULL, &nas_mipv6); } /* AVP section */ { /* Loading the derived data formats */ struct dict_object * Address_type; CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Address", &Address_type); /* MIP6-Feature-Vector */ { /* */ struct dict_avp_data data = { 124, /* Code */ 0, /* Vendor */ "MIP6-Feature-Vector", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* MIP-Home-Agent-Address - RFC 4004 */ { /* */ struct dict_avp_data data = { 334, /* Code */ 0, /* Vendor */ "MIP-Home-Agent-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); } /* Destination-Host - Base Protocol */ /* Destination-Realm - Base Protocol */ /* MIP-Home-Agent-Host - RFC 4004 */ { /* The MIP-Home-Agent-Host AVP (AVP Code 348) is of type Grouped and contains the identity of the assigned Home Agent. If the MIP-Home- Agent-Host AVP is present in the AMR, the AAAH MUST copy it into the HAR. MIP-Home-Agent-Host ::= < AVP Header: 348 > { Destination-Realm } { Destination-Host } * [ AVP ] */ struct dict_object * avp; struct dict_avp_data data = { 348, /* Code */ 0, /* Vendor */ "MIP-Home-Agent-Host", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Destination-Realm", RULE_REQUIRED, -1, 1 } ,{ "Destination-Host", RULE_REQUIRED, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* MIP6-Home-Link-Prefix */ { /* */ struct dict_avp_data data = { 125, /* Code */ 0, /* Vendor */ "MIP6-Home-Link-Prefix", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* MIP6-Agent-Info */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 486, /* Code */ 0, /* Vendor */ "MIP6-Agent-Info", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "MIP-Home-Agent-Address", RULE_OPTIONAL, -1, 2 } ,{ "MIP-Home-Agent-Host", RULE_OPTIONAL, -1, 1 } ,{ "MIP6-Home-Link-Prefix", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } } LOG_D( "Dictionary Extension 'MIPv6 NAS-to-HAAA Interaction' initialized"); return 0; } EXTENSION_ENTRY("dict_nas_mipv6", dict_nas_mipv6_init); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_nasreq/000077500000000000000000000000001333553357400235465ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_nasreq/CMakeLists.txt000066400000000000000000000004651333553357400263130ustar00rootroot00000000000000# The dict_nasreq extension PROJECT("Diameter NASREQ (RFC4005) dictionary definitions" C) # Compile as a module FD_ADD_EXTENSION(dict_nasreq dict_nasreq.c) #### ## INSTALL section ## INSTALL(TARGETS dict_nasreq LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-dictionary-RFC4005) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_nasreq/Makefile.am000066400000000000000000000010561333553357400256040ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in extlib_LTLIBRARIES = dict_nasreq.la dict_nasreq_la_SOURCES = \ dict_nasreq.c dict_nasreq_la_DEPENDENCIES = \ $(top_srcdir)/libfdcore/libfdcore.la \ $(top_srcdir)/libfdproto/libfdproto.la dict_nasreq_la_LIBADD = \ $(top_srcdir)/libfdcore/libfdcore.la \ $(top_srcdir)/libfdproto/libfdproto.la AM_LDFLAGS = \ -module -avoid-version -shared AM_CPPFLAGS = \ -I$(top_srcdir)/include AM_CFLAGS = \ -Wall -Werror MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_nasreq/dict_nasreq.c000066400000000000000000004550011333553357400262130ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* * Dictionary definitions of objects specified in Diameter NASREQ (RFC4005). */ #include /* The content of this file follows the same structure as dict_base_proto.c */ #define CHECK_dict_new( _type, _data, _parent, _ref ) \ CHECK_FCT( fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref)) ); #define CHECK_dict_search( _type, _criteria, _what, _result ) \ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); struct local_rules_definition { char *avp_name; enum rule_position position; int min; int max; }; #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) #define PARSE_loc_rules( _rulearray, _parent) { \ int __ar; \ for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ struct dict_rule_data __data = { NULL, \ (_rulearray)[__ar].position, \ 0, \ (_rulearray)[__ar].min, \ (_rulearray)[__ar].max}; \ __data.rule_order = RULE_ORDER(__data.rule_position); \ CHECK_FCT( fd_dict_search( \ fd_g_config->cnf_dict, \ DICT_AVP, \ AVP_BY_NAME, \ (_rulearray)[__ar].avp_name, \ &__data.rule_avp, 0 ) ); \ if ( !__data.rule_avp ) { \ TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_name ); \ return ENOENT; \ } \ CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL), \ { \ TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \ (_rulearray)[__ar].avp_name ); \ return EINVAL; \ } ); \ } \ } #define enumval_def_u32( _val_, _str_ ) \ { _str_, { .u32 = _val_ }} #define enumval_def_os( _len_, _val_, _str_ ) \ { _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}} static int dnr_entry(char * conffile) { struct dict_object * nasreq; TRACE_ENTRY("%p", conffile); /* No Vendors definitions */ /* Applications section */ { /* NASREQ (RFC 4005) */ { struct dict_application_data data = { 1, "Diameter Network Access Server Application" }; CHECK_dict_new( DICT_APPLICATION, &data, NULL, &nasreq); } } /* Derived AVP types section */ { /* QoSFilterRule */ { /* The QosFilterRule format is derived from the OctetString AVP Base Format. It uses the ASCII charset. Packets may be marked or metered based on the following information: Direction (in or out) Source and destination IP address (possibly masked) Protocol Source and destination port (lists or ranges) DSCP values (no mask or range) Rules for the appropriate direction are evaluated in order; the first matched rule terminates the evaluation. Each packet is evaluated once. If no rule matches, the packet is treated as best effort. An access device unable to interpret or apply a QoS rule SHOULD NOT terminate the session. QoSFilterRule filters MUST follow the following format: action dir proto from src to dst [options] tag - Mark packet with a specific DSCP [DIFFSERV]. The DSCP option MUST be included. meter - Meter traffic. The metering options MUST be included. dir The format is as described under IPFilterRule. proto The format is as described under IPFilterRule. src and dst The format is as described under IPFilterRule. options: DSCP Color values as defined in [DIFFSERV]. Exact matching of DSCP values is required (no masks or ranges). metering The metering option provides Assured Forwarding, as defined in [DIFFSERVAF], and MUST be present if the action is set to meter. The rate option is the throughput, in bits per second, used by the access device to mark packets. Traffic over the rate is marked with the color_over codepoint, and traffic under the rate is marked with the color_under codepoint. The color_under and color_over options contain the drop preferences and MUST conform to the recommended codepoint keywords described in [DIFFSERVAF] (e.g., AF13). The metering option also supports the strict limit on traffic required by Expedited Forwarding, as defined in [DIFFSERVEF]. The color_over option may contain the keyword "drop" to prevent forwarding of traffic that exceeds the rate parameter. The rule syntax is a modified subset of ipfw(8) from FreeBSD, and the ipfw.c code may provide a useful base for implementations. */ struct dict_type_data data = { AVP_TYPE_OCTETSTRING, "QoSFilterRule" , NULL , NULL }; CHECK_dict_new( DICT_TYPE, &data , NULL, NULL); } } /* AVP section */ { struct dict_object * UTF8String_type; struct dict_object * IPFilterRule_type; struct dict_object * QoSFilterRule_type; CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "IPFilterRule", &IPFilterRule_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "QoSFilterRule", &QoSFilterRule_type); /******************************** * NAS Session AVPs * ********************************/ /* NAS-Port */ { /* The NAS-Port AVP (AVP Code 5) is of type Unsigned32 and contains the physical or virtual port number of the NAS which is authenticating the user. Note that "port" is meant in its sense as a service connection on the NAS, not as an IP protocol identifier. Either NAS-Port or NAS-Port-Id (AVP Code 87) SHOULD be present in AA-Request (AAR) commands if the NAS differentiates among its ports. */ struct dict_avp_data data = { 5, /* Code */ 0, /* Vendor */ "NAS-Port", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* NAS-Port-Id */ { /* The NAS-Port-Id AVP (AVP Code 87) is of type UTF8String and consists of ASCII text identifying the port of the NAS authenticating the user. Note that "port" is meant in its sense as a service connection on the NAS, not as an IP protocol identifier. Either NAS-Port or NAS-Port-Id SHOULD be present in AA-Request (AAR) commands if the NAS differentiates among its ports. NAS-Port-Id is intended for use by NASes that cannot conveniently number their ports. */ struct dict_avp_data data = { 87, /* Code */ 0, /* Vendor */ "NAS-Port-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* NAS-Port-Type */ { /* The NAS-Port-Type AVP (AVP Code 61) is of type Enumerated and contains the type of the port on which the NAS is authenticating the user. This AVP SHOULD be present if the NAS uses the same NAS-Port number ranges for different service types concurrently. The supported values are defined in [RADIUSTypes]. The following list is informational and subject to change by the IANA. http://www.iana.org/assignments/radius-types Sub-registry: Values for RADIUS Attribute 61, NAS-Port-Type Reference: [RFC2865] Extract on 2009.06.01: 0 Async [RFC2865] 1 Sync [RFC2865] 2 ISDN Sync [RFC2865] 3 ISDN Async V.120 [RFC2865] 4 ISDN Async V.110 [RFC2865] 5 Virtual [RFC2865] 6 PIAFS [RFC2865] 7 HDLC Clear Channel [RFC2865] 8 X.25 [RFC2865] 9 X.75 [RFC2865] 10 G.3 Fax [RFC2865] 11 SDSL - Symmetric DSL [RFC2865] 12 ADSL-CAP - Asymmetric DSL, Carrierless Amplitude Phase Modulation [RFC2865] 13 ADSL-DMT - Asymmetric DSL, Discrete Multi-Tone [RFC2865] 14 IDSL - ISDN Digital Subscriber Line [RFC2865] 15 Ethernet [RFC2865] 16 xDSL - Digital Subscriber Line of unknown type [RFC2865] 17 Cable [RFC2865] 18 Wireless - Other [RFC2865] 19 Wireless - IEEE 802.11 [RFC2865] 20 Token-Ring [RFC3580] 21 FDDI [RFC3580] 22 Wireless - CDMA2000 [McCann] 23 Wireless - UMTS [McCann] 24 Wireless - 1X-EV [McCann] 25 IAPP [IEEE 802.11F][Kerry] 26 FTTP - Fiber to the Premises [Nyce] 27 Wireless - IEEE 802.16 [IEEE 802.16] 12 December 2006 28 Wireless - IEEE 802.20 [IEEE 802.20] 12 December 2006 29 Wireless - IEEE 802.22 [IEEE 802.22] 12 December 2006 30 PPPoA - PPP over ATM [RFC4603] 31 PPPoEoA - PPP over Ethernet over ATM [RFC4603] 32 PPPoEoE - PPP over Ethernet over Ethernet [RFC4603] 33 PPPoEoVLAN - PPP over Ethernet over VLAN [RFC4603] 34 PPPoEoQinQ - PPP over Ethernet over IEEE 802.1QinQ [RFC4603] 35 xPON - Passive Optical Network [Hublet][Yan] 19 June 2007 */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(NAS-Port-Type)" , NULL, NULL}; struct dict_enumval_data tvals[] = { enumval_def_u32( 0, "Async [RFC2865]"), enumval_def_u32( 1, "Sync [RFC2865]"), enumval_def_u32( 2, "ISDN Sync [RFC2865]"), enumval_def_u32( 3, "ISDN Async V.120 [RFC2865]"), enumval_def_u32( 4, "ISDN Async V.110 [RFC2865]"), enumval_def_u32( 5, "Virtual [RFC2865]"), enumval_def_u32( 6, "PIAFS [RFC2865]"), enumval_def_u32( 7, "HDLC Clear Channel [RFC2865]"), enumval_def_u32( 8, "X.25 [RFC2865]"), enumval_def_u32( 9, "X.75 [RFC2865]"), enumval_def_u32(10, "G.3 Fax [RFC2865]"), enumval_def_u32(11, "SDSL - Symmetric DSL [RFC2865]"), enumval_def_u32(12, "ADSL-CAP - Asymmetric DSL, Carrierless Amplitude Phase Modulation [RFC2865]"), enumval_def_u32(13, "ADSL-DMT - Asymmetric DSL, Discrete Multi-Tone [RFC2865]"), enumval_def_u32(14, "IDSL - ISDN Digital Subscriber Line [RFC2865]"), enumval_def_u32(15, "Ethernet [RFC2865]"), enumval_def_u32(16, "xDSL - Digital Subscriber Line of unknown type [RFC2865]"), enumval_def_u32(17, "Cable [RFC2865]"), enumval_def_u32(18, "Wireless - Other [RFC2865]"), enumval_def_u32(19, "Wireless - IEEE 802.11 [RFC2865]"), enumval_def_u32(20, "Token-Ring [RFC3580]"), enumval_def_u32(21, "FDDI [RFC3580]"), enumval_def_u32(22, "Wireless - CDMA2000 [McCann]"), enumval_def_u32(23, "Wireless - UMTS [McCann]"), enumval_def_u32(24, "Wireless - 1X-EV [McCann]"), enumval_def_u32(25, "IAPP [IEEE 802.11F][Kerry]"), enumval_def_u32(26, "FTTP - Fiber to the Premises [Nyce]"), enumval_def_u32(27, "Wireless - IEEE 802.16 [IEEE 802.16]"), enumval_def_u32(28, "Wireless - IEEE 802.20 [IEEE 802.20]"), enumval_def_u32(29, "Wireless - IEEE 802.22 [IEEE 802.22]"), enumval_def_u32(30, "PPPoA - PPP over ATM [RFC4603]"), enumval_def_u32(31, "PPPoEoA - PPP over Ethernet over ATM [RFC4603]"), enumval_def_u32(32, "PPPoEoE - PPP over Ethernet over Ethernet [RFC4603]"), enumval_def_u32(33, "PPPoEoVLAN - PPP over Ethernet over VLAN [RFC4603]"), enumval_def_u32(34, "PPPoEoQinQ - PPP over Ethernet over IEEE 802.1QinQ [RFC4603]"), enumval_def_u32(35, "xPON - Passive Optical Network [Hublet][Yan]") }; struct dict_avp_data data = { 61, /* Code */ 0, /* Vendor */ "NAS-Port-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; int i; /* Create the Enumerated type, enumerated values, and the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) { CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL); } CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Called-Station-Id */ { /* The Called-Station-Id AVP (AVP Code 30) is of type UTF8String and allows the NAS to send the ASCII string describing the layer 2 address the user contacted in the request. For dialup access, this can be a phone number obtained by using Dialed Number Identification (DNIS) or a similar technology. Note that this may be different from the phone number the call comes in on. For use with IEEE 802 access, the Called-Station-Id MAY contain a MAC address formatted as described in [RAD802.1X]. It SHOULD only be present in authentication and/or authorization requests. If the Auth-Request-Type AVP is set to authorization-only and the User-Name AVP is absent, the Diameter Server MAY perform authorization based on this field. This can be used by a NAS to request whether a call should be answered based on the DNIS. */ struct dict_avp_data data = { 30, /* Code */ 0, /* Vendor */ "Called-Station-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Calling-Station-Id */ { /* The Calling-Station-Id AVP (AVP Code 31) is of type UTF8String and allows the NAS to send the ASCII string describing the layer 2 address from which the user connected in the request. For dialup access, this is the phone number the call came from, using Automatic Number Identification (ANI) or a similar technology. For use with IEEE 802 access, the Calling-Station-Id AVP MAY contain a MAC address, formated as described in [RAD802.1X]. It SHOULD only be present in authentication and/or authorization requests. If the Auth-Request-Type AVP is set to authorization-only and the User-Name AVP is absent, the Diameter Server MAY perform authorization based on this field. This can be used by a NAS to request whether a call should be answered based on the layer 2 address (ANI, MAC Address, etc.) */ struct dict_avp_data data = { 31, /* Code */ 0, /* Vendor */ "Calling-Station-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Connect-Info */ { /* The Connect-Info AVP (AVP Code 77) is of type UTF8String and is sent in the AA-Request message or ACR STOP message. When sent in the Access-Request, it indicates the nature of the user's connection. The connection speed SHOULD be included at the beginning of the first Connect-Info AVP in the message. If the transmit and receive connection speeds differ, both may be included in the first AVP with the transmit speed listed first (the speed the NAS modem transmits at), then a slash (/), then the receive speed, and then other optional information. For example: "28800 V42BIS/LAPM" or "52000/31200 V90" More than one Connect-Info attribute may be present in an Accounting-Request packet to accommodate expected efforts by the ITU to have modems report more connection information in a standard format that might exceed 252 octets. If sent in the ACR STOP, this attribute may summarize statistics relating to session quality. For example, in IEEE 802.11, the Connect-Info attribute may contain information on the number of link layer retransmissions. The exact format of this attribute is implementation specific. */ struct dict_avp_data data = { 77, /* Code */ 0, /* Vendor */ "Connect-Info", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Originating-Line-Info */ { /* The Originating-Line-Info AVP (AVP Code 94) is of type OctetString and is sent by the NAS system to convey information about the origin of the call from an SS7 system. The originating line information (OLI) element indicates the nature and/or characteristics of the line from which a call originated (e.g., pay phone, hotel, cellular). Telephone companies are starting to offer OLI to their customers as an option over Primary Rate Interface (PRI). Internet Service Providers (ISPs) can use OLI in addition to Called-Station-Id and Calling-Station-Id attributes to differentiate customer calls and to define different services. The Value field contains two octets (00 - 99). ANSI T1.113 and BELLCORE 394 can be used for additional information about these values and their use. For more information on current assignment values, see [http://www.nanpa.com/number_resource_info/ani_ii_assignments.html]. */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_OCTETSTRING, "Enumerated*(Originating-Line-Info)" , NULL, NULL}; struct dict_enumval_data tvals[] = { enumval_def_os( 2, "00", "Plain Old Telephone Service (POTS)"), enumval_def_os( 2, "01", "Multiparty Line (more than 2)"), enumval_def_os( 2, "02", "ANI Failure"), enumval_def_os( 2, "06", "Station Level Rating"), enumval_def_os( 2, "07", "Special Operator Handling Required"), enumval_def_os( 2, "20", "Automatic Identified Outward Dialing (AIOD)"), enumval_def_os( 2, "23", "Coin or Non-Coin"), enumval_def_os( 2, "24", "Toll Free Service (Non-Pay Origination)"), enumval_def_os( 2, "25", "Toll Free Service (Pay Origination)"), enumval_def_os( 2, "27", "Toll Free Service (Coin Control Origination)"), enumval_def_os( 2, "29", "Prison/Inmate Service"), enumval_def_os( 2, "30", "Intercept (Blank)"), enumval_def_os( 2, "31", "Intercept (Trouble)"), enumval_def_os( 2, "32", "Intercept (Regular)"), enumval_def_os( 2, "34", "Telco Operator Handled Call"), enumval_def_os( 2, "52", "Outward Wide Area Telecommunications Service (OUTWATS)"), enumval_def_os( 2, "60", "Telecommunications Relay Service (TRS)(Unrestricted)"), enumval_def_os( 2, "61", "Cellular/Wireless PCS (Type 1)"), enumval_def_os( 2, "62", "Cellular/Wireless PCS (Type 2)"), enumval_def_os( 2, "63", "Cellular/Wireless PCS (Roaming)"), enumval_def_os( 2, "66", "TRS (Hotel)"), enumval_def_os( 2, "67", "TRS (Restricted)"), enumval_def_os( 2, "70", "Pay Station, No Coin Control"), enumval_def_os( 2, "93", "Access for Private Virtual Network Service") }; struct dict_avp_data data = { 94, /* Code */ 0, /* Vendor */ "Originating-Line-Info", /* Name */ AVP_FLAG_VENDOR, /* Fixed flags */ 0, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; int i; /* Create the Enumerated type, enumerated values, and the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) { CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL); } CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Reply-Message */ { /* The Reply-Message AVP (AVP Code 18) is of type UTF8String and contains text that MAY be displayed to the user. When used in an AA-Answer message with a successful Result-Code AVP, it indicates success. When found in an AAA message with a Result-Code other than DIAMETER_SUCCESS, the AVP contains a failure message. The Reply-Message AVP MAY indicate dialog text to prompt the user before another AA-Request attempt. When used in an AA-Answer with a Result-Code of DIAMETER_MULTI_ROUND_AUTH or in an Re-Auth-Request message, it MAY contain a dialog text to prompt the user for a response. Multiple Reply-Messages MAY be included, and if any are displayed, they MUST be displayed in the same order as they appear in the Diameter message. */ struct dict_avp_data data = { 18, /* Code */ 0, /* Vendor */ "Reply-Message", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /******************************** * NAS Authentication AVPs * ********************************/ /* User-Password */ { /* The User-Password AVP (AVP Code 2) is of type OctetString and contains the password of the user to be authenticated, or the user's input in a multi-round authentication exchange. The User-Password AVP contains a user password or one-time password and therefore represents sensitive information. As required in [BASE], Diameter messages are encrypted by using IPsec or TLS. Unless this AVP is used for one-time passwords, the User-Password AVP SHOULD NOT be used in untrusted proxy environments without encrypting it by using end-to-end security techniques, such as the proposed CMS Security [DiamCMS]. The clear-text password (prior to encryption) MUST NOT be longer than 128 bytes in length. */ struct dict_avp_data data = { 2, /* Code */ 0, /* Vendor */ "User-Password", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Password-Retry */ { /* The Password-Retry AVP (AVP Code 75) is of type Unsigned32 and MAY be included in the AA-Answer if the Result-Code indicates an authentication failure. The value of this AVP indicates how many authentication attempts a user is permitted before being disconnected. This AVP is primarily intended for use when the Framed-Protocol AVP (see section 6.10.1) is set to ARAP. */ struct dict_avp_data data = { 75, /* Code */ 0, /* Vendor */ "Password-Retry", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Prompt */ { /* The Prompt AVP (AVP Code 76) is of type Enumerated and MAY be present in the AA-Answer message. When present, it is used by the NAS to determine whether the user's response, when entered, should be echoed. The supported values are listed in http://www.iana.org/assignments/radius-types Sub-registry: Values for RADIUS Attribute 76, Prompt Reference: [RFC2869] */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Prompt)" , NULL, NULL}; struct dict_enumval_data tvals[] = { enumval_def_u32( 0, "No Echo [RFC2869]"), enumval_def_u32( 1, "Echo [RFC2869]") }; struct dict_avp_data data = { 76, /* Code */ 0, /* Vendor */ "Prompt", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; int i; /* Create the Enumerated type, enumerated values, and the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) { CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL); } CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* CHAP-Algorithm */ { /* The CHAP-Algorithm AVP (AVP Code 403) is of type Enumerated and contains the algorithm identifier used in the computation of the CHAP response [PPPCHAP]. The following values are currently supported: CHAP with MD5 5 The CHAP response is computed by using the procedure described in [PPPCHAP]. This algorithm requires that the CHAP-Response AVP MUST be present in the CHAP-Auth AVP. */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(CHAP-Algorithm)" , NULL, NULL}; struct dict_enumval_data tvals[] = { enumval_def_u32( 5, "CHAP with MD5") }; struct dict_avp_data adata = { 403, /* Code */ 0, /* Vendor */ "CHAP-Algorithm", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; int i; CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) { CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL); } CHECK_dict_new( DICT_AVP, &adata , type, NULL); } /* CHAP-Ident */ { /* The CHAP-Ident AVP (AVP Code 404) is of type OctetString and contains the 1 octet CHAP Identifier used in the computation of the CHAP response [PPPCHAP]. */ struct dict_avp_data adata = { 404, /* Code */ 0, /* Vendor */ "CHAP-Ident", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &adata , NULL, NULL); } /* CHAP-Response */ { /* The CHAP-Response AVP (AVP Code 405) is of type OctetString and contains the 16 octet authentication data provided by the user in response to the CHAP challenge [PPPCHAP]. */ struct dict_avp_data adata = { 405, /* Code */ 0, /* Vendor */ "CHAP-Response", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &adata , NULL, NULL); } /* CHAP-Auth */ { /* The CHAP-Auth AVP (AVP Code 402) is of type Grouped and contains the information necessary to authenticate a user using the PPP Challenge-Handshake Authentication Protocol (CHAP) [PPPCHAP]. If the CHAP-Auth AVP is found in a message, the CHAP-Challenge AVP MUST be present as well. The optional AVPs containing the CHAP response depend upon the value of the CHAP-Algorithm AVP. The grouped AVP has the following ABNF grammar: CHAP-Auth ::= < AVP Header: 402 > { CHAP-Algorithm } { CHAP-Ident } [ CHAP-Response ] * [ AVP ] */ struct dict_object * avp; struct dict_avp_data data = { 402, /* Code */ 0, /* Vendor */ "CHAP-Auth", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "CHAP-Algorithm", RULE_REQUIRED, -1, 1 } ,{ "CHAP-Ident", RULE_REQUIRED, -1, 1 } ,{ "CHAP-Response", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* CHAP-Challenge */ { /* The CHAP-Challenge AVP (AVP Code 60) is of type OctetString and contains the CHAP Challenge sent by the NAS to the CHAP peer [PPPCHAP]. */ struct dict_avp_data data = { 60, /* Code */ 0, /* Vendor */ "CHAP-Challenge", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* ARAP-Password */ { /* The ARAP-Password AVP (AVP Code 70) is of type OctetString and is only present when the Framed-Protocol AVP (see section 6.10.1) is included in the message and is set to ARAP. This AVP MUST NOT be present if either the User-Password or the CHAP-Auth AVP is present. See [RADIUSExt] for more information on the contents of this AVP. */ struct dict_avp_data data = { 70, /* Code */ 0, /* Vendor */ "ARAP-Password", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* ARAP-Challenge-Response */ { /* The ARAP-Challenge-Response AVP (AVP Code 84) is of type OctetString and is only present when the Framed-Protocol AVP (see section 6.10.1) is included in the message and is set to ARAP. This AVP contains an 8 octet response to the dial-in client's challenge. The RADIUS server calculates this value by taking the dial-in client's challenge from the high-order 8 octets of the ARAP-Password AVP and performing DES encryption on this value with the authenticating user's password as the key. If the user's password is fewer than 8 octets in length, the password is padded at the end with NULL octets to a length of 8 before it is used as a key. */ struct dict_avp_data data = { 84, /* Code */ 0, /* Vendor */ "ARAP-Challenge-Response", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* ARAP-Security */ { /* The ARAP-Security AVP (AVP Code 73) is of type Unsigned32 and MAY be present in the AA-Answer message if the Framed-Protocol AVP (see section 6.10.1) is set to the value of ARAP, and the Result-Code AVP is set to DIAMETER_MULTI_ROUND_AUTH. See [RADIUSExt] for more information on the format of this AVP. */ struct dict_avp_data data = { 73, /* Code */ 0, /* Vendor */ "ARAP-Security", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* ARAP-Security-Data */ { /* The ARAP-Security-Data AVP (AVP Code 74) is of type OctetString and MAY be present in the AA-Request or AA-Answer message if the Framed-Protocol AVP is set to the value of ARAP, and the Result-Code AVP is set to DIAMETER_MULTI_ROUND_AUTH. This AVP contains the security module challenge or response associated with the ARAP Security Module specified in ARAP-Security. */ struct dict_avp_data data = { 74, /* Code */ 0, /* Vendor */ "ARAP-Security-Data", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /******************************** * NAS Authorization AVPs * ********************************/ /* Service-Type */ { /* The Service-Type AVP (AVP Code 6) is of type Enumerated and contains the type of service the user has requested or the type of service to be provided. One such AVP MAY be present in an authentication and/or authorization request or response. A NAS is not required to implement all of these service types. It MUST treat unknown or unsupported Service-Types received in a response as a failure and end the session with a DIAMETER_INVALID_AVP_VALUE Result-Code. When used in a request, the Service-Type AVP SHOULD be considered a hint to the server that the NAS believes the user would prefer the kind of service indicated. The server is not required to honor the hint. Furthermore, if the service specified by the server is supported, but not compatible with the current mode of access, the NAS MUST fail to start the session. The NAS MUST also generate the appropriate error message(s). The following values have been defined for the Service-Type AVP. The complete list of defined values can be found in [RADIUS] and [RADIUSTypes]. Registry Name: Radius Attribute Values Reference: [RFC2865][RFC3575] Sub-registry: Values for RADIUS Attribute 6, Service-Type Reference: [RFC2865][RFC3575] 1 Login 2 Framed 3 Callback Login 4 Callback Framed 5 Outbound 6 Administrative 7 NAS Prompt 8 Authenticate Only 9 Callback NAS Prompt 10 Call Check 11 Callback Administrative 12 Voice [Chiba] 13 Fax [Chiba] 14 Modem Relay [Chiba] 15 IAPP-Register [IEEE 802.11f][Kerry] 16 IAPP-AP-Check [IEEE 802.11f][Kerry] 17 Authorize Only [RFC3576] The following values are further qualified: Login 1 The user should be connected to a host. The message MAY include additional AVPs defined in sections 6.16 or 6.17. Framed 2 A Framed Protocol, such as PPP or SLIP, should be started for the User. The message MAY include additional AVPs defined in section 6.10, or section 7 for tunneling services. Callback Login 3 The user should be disconnected and called back, then connected to a host. The message MAY include additional AVPs defined in this section. Callback Framed 4 The user should be disconnected and called back, and then a Framed Protocol, such as PPP or SLIP, should be started for the User. The message MAY include additional AVPs defined in section 6.10, or in section 7 for tunneling services. */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Service-Type)" , NULL, NULL}; struct dict_enumval_data tvals[] = { enumval_def_u32( 1, "Login"), enumval_def_u32( 2, "Framed"), enumval_def_u32( 3, "Callback Login"), enumval_def_u32( 4, "Callback Framed"), enumval_def_u32( 5, "Outbound"), enumval_def_u32( 6, "Administrative"), enumval_def_u32( 7, "NAS Prompt"), enumval_def_u32( 8, "Authenticate Only"), enumval_def_u32( 9, "Callback NAS Prompt"), enumval_def_u32(10, "Call Check"), enumval_def_u32(11, "Callback Administrative"), enumval_def_u32(12, "Voice [Chiba]"), enumval_def_u32(13, "Fax [Chiba]"), enumval_def_u32(14, "Modem Relay [Chiba]"), enumval_def_u32(15, "IAPP-Register [IEEE 802.11f][Kerry]"), enumval_def_u32(16, "IAPP-AP-Check [IEEE 802.11f][Kerry]"), enumval_def_u32(17, "Authorize Only [RFC3576]") }; struct dict_avp_data data = { 6, /* Code */ 0, /* Vendor */ "Service-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; int i; /* Create the Enumerated type, enumerated values, and the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) { CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL); } CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Callback-Number */ { /* The Callback-Number AVP (AVP Code 19) is of type UTF8String and contains a dialing string to be used for callback. It MAY be used in an authentication and/or authorization request as a hint to the server that a Callback service is desired, but the server is not required to honor the hint in the corresponding response. */ struct dict_avp_data data = { 19, /* Code */ 0, /* Vendor */ "Callback-Number", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Callback-Id */ { /* The Callback-Id AVP (AVP Code 20) is of type UTF8String and contains the name of a place to be called, to be interpreted by the NAS. This AVP MAY be present in an authentication and/or authorization response. This AVP is not roaming-friendly as it assumes that the Callback-Id is configured on the NAS. Using the Callback-Number AVP therefore preferable. */ struct dict_avp_data data = { 20, /* Code */ 0, /* Vendor */ "Callback-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Idle-Timeout */ { /* The Idle-Timeout AVP (AVP Code 28) is of type Unsigned32 and sets the maximum number of consecutive seconds of idle connection allowable to the user before termination of the session or before a prompt is issued. The default is none, or system specific. */ struct dict_avp_data data = { 28, /* Code */ 0, /* Vendor */ "Idle-Timeout", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Port-Limit */ { /* The Port-Limit AVP (AVP Code 62) is of type Unsigned32 and sets the maximum number of ports the NAS provides to the user. It MAY be used in an authentication and/or authorization request as a hint to the server that multilink PPP [PPPMP] service is desired, but the server is not required to honor the hint in the corresponding response. */ struct dict_avp_data data = { 62, /* Code */ 0, /* Vendor */ "Port-Limit", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* NAS-Filter-Rule */ { /* The NAS-Filter-Rule AVP (AVP Code 400) is of type IPFilterRule and provides filter rules that need to be configured on the NAS for the user. One or more of these AVPs MAY be present in an authorization response. */ struct dict_avp_data data = { 400, /* Code */ 0, /* Vendor */ "NAS-Filter-Rule", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , IPFilterRule_type, NULL); } /* Filter-Id */ { /* The Filter-Id AVP (AVP Code 11) is of type UTF8String and contains the name of the filter list for this user. Zero or more Filter-Id AVPs MAY be sent in an authorization answer. Identifying a filter list by name allows the filter to be used on different NASes without regard to filter-list implementation details. However, this AVP is not roaming friendly, as filter naming differs from one service provider to another. In non-RADIUS environments, it is RECOMMENDED that the NAS-Filter- Rule AVP be used instead. */ struct dict_avp_data data = { 11, /* Code */ 0, /* Vendor */ "Filter-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Configuration-Token */ { /* The Configuration-Token AVP (AVP Code 78) is of type OctetString and is sent by a Diameter Server to a Diameter Proxy Agent or Translation Agent in an AA-Answer command to indicate a type of user profile to be used. It should not be sent to a Diameter Client (NAS). The format of the Data field of this AVP is site specific. */ struct dict_avp_data data = { 78, /* Code */ 0, /* Vendor */ "Configuration-Token", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* QoS-Filter-Rule */ { /* The QoS-Filter-Rule AVP (AVP Code 407) is of type QoSFilterRule and provides QoS filter rules that need to be configured on the NAS for the user. One or more such AVPs MAY be present in an authorization response. */ struct dict_avp_data data = { 407, /* Code */ 0, /* Vendor */ "QoS-Filter-Rule", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , QoSFilterRule_type, NULL); } /*** Framed Access Authorization AVPs ***/ /* Framed-Protocol */ { /* The Framed-Protocol AVP (AVP Code 7) is of type Enumerated and contains the framing to be used for framed access. This AVP MAY be present in both requests and responses. The supported values are listed in [RADIUSTypes]. Sub-registry: Values for RADIUS Attribute 7, Framed-Protocol Reference: [RFC2865] */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Framed-Protocol)" , NULL, NULL}; struct dict_enumval_data tvals[] = { enumval_def_u32( 1, "PPP"), enumval_def_u32( 2, "SLIP"), enumval_def_u32( 3, "AppleTalk Remote Access Protocol (ARAP)"), enumval_def_u32( 4, "Gandalf proprietary SingleLink/MultiLink protocol"), enumval_def_u32( 5, "Xylogics proprietary IPX/SLIP"), enumval_def_u32( 6, "X.75 Synchronous"), enumval_def_u32( 7, "GPRS PDP Context [Moore]") }; struct dict_avp_data data = { 7, /* Code */ 0, /* Vendor */ "Framed-Protocol", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; int i; /* Create the Enumerated type, enumerated values, and the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) { CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL); } CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Framed-Routing */ { /* The Framed-Routing AVP (AVP Code 10) is of type Enumerated and contains the routing method for the user when the user is a router to a network. This AVP SHOULD only be present in authorization responses. The supported values are listed in [RADIUSTypes]. Sub-registry: Values for RADIUS Attribute 10, Framed-Routing Reference: [RFC2865] */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Framed-Routing)" , NULL, NULL}; struct dict_enumval_data tvals[] = { enumval_def_u32( 0, "None"), enumval_def_u32( 1, "Send routing packets"), enumval_def_u32( 2, "Listen for routing packets"), enumval_def_u32( 3, "Send and Listen") }; struct dict_avp_data data = { 10, /* Code */ 0, /* Vendor */ "Framed-Routing", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; int i; /* Create the Enumerated type, enumerated values, and the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) { CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL); } CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Framed-MTU */ { /* The Framed-MTU AVP (AVP Code 12) is of type Unsigned32 and contains the Maximum Transmission Unit to be configured for the user, when it is not negotiated by some other means (such as PPP). This AVP SHOULD only be present in authorization responses. The MTU value MUST be in the range from 64 to 65535. */ struct dict_avp_data data = { 12, /* Code */ 0, /* Vendor */ "Framed-MTU", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Framed-Compression */ { /* The Framed-Compression AVP (AVP Code 13) is of type Enumerated and contains the compression protocol to be used for the link. It MAY be used in an authorization request as a hint to the server that a specific compression type is desired, but the server is not required to honor the hint in the corresponding response. More than one compression protocol AVP MAY be sent. The NAS is responsible for applying the proper compression protocol to the appropriate link traffic. The supported values are listed in [RADIUSTypes]. Sub-registry: Values for RADIUS Attribute 13, Framed-Compression Reference: [RFC2865] */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Framed-Compression)" , NULL, NULL}; struct dict_enumval_data tvals[] = { enumval_def_u32( 0, "None"), enumval_def_u32( 1, "VJ TCP/IP header compression"), enumval_def_u32( 2, "IPX header compression"), enumval_def_u32( 3, "Stac-LZS compression") }; struct dict_avp_data data = { 13, /* Code */ 0, /* Vendor */ "Framed-Compression", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; int i; /* Create the Enumerated type, enumerated values, and the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) { CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL); } CHECK_dict_new( DICT_AVP, &data , type, NULL); } /*** IP Access Authorization AVPs ***/ /* Framed-IP-Address */ { /* The Framed-IP-Address AVP (AVP Code 8) [RADIUS] is of type OctetString and contains an IPv4 address of the type specified in the attribute value to be configured for the user. It MAY be used in an authorization request as a hint to the server that a specific address is desired, but the server is not required to honor the hint in the corresponding response. Two values have special significance: 0xFFFFFFFF and 0xFFFFFFFE. The value 0xFFFFFFFF indicates that the NAS should allow the user to select an address (i.e., negotiated). The value 0xFFFFFFFE indicates that the NAS should select an address for the user (e.g., assigned from a pool of addresses kept by the NAS). */ struct dict_avp_data data = { 8, /* Code */ 0, /* Vendor */ "Framed-IP-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Framed-IP-Netmask */ { /* The Framed-IP-Netmask AVP (AVP Code 9) is of type OctetString and contains the four octets of the IPv4 netmask to be configured for the user when the user is a router to a network. It MAY be used in an authorization request as a hint to the server that a specific netmask is desired, but the server is not required to honor the hint in the corresponding response. This AVP MUST be present in a response if the request included this AVP with a value of 0xFFFFFFFF. */ struct dict_avp_data data = { 9, /* Code */ 0, /* Vendor */ "Framed-IP-Netmask", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Framed-Route */ { /* The Framed-Route AVP (AVP Code 22) is of type UTF8String and contains the ASCII routing information to be configured for the user on the NAS. Zero or more of these AVPs MAY be present in an authorization response. The string MUST contain a destination prefix in dotted quad form optionally followed by a slash and a decimal length specifier stating how many high-order bits of the prefix should be used. This is followed by a space, a gateway address in dotted quad form, a space, and one or more metrics separated by spaces; for example, "192.168.1.0/24 192.168.1.1 1". The length specifier may be omitted, in which case it should default to 8 bits for class A prefixes, to 16 bits for class B prefixes, and to 24 bits for class C prefixes; for example, "192.168.1.0 192.168.1.1 1". Whenever the gateway address is specified as "0.0.0.0" the IP address of the user SHOULD be used as the gateway address. */ struct dict_avp_data data = { 22, /* Code */ 0, /* Vendor */ "Framed-Route", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Framed-Pool */ { /* The Framed-Pool AVP (AVP Code 88) is of type OctetString and contains the name of an assigned address pool that SHOULD be used to assign an address for the user. If a NAS does not support multiple address pools, the NAS SHOULD ignore this AVP. Address pools are usually used for IP addresses but can be used for other protocols if the NAS supports pools for those protocols. Although specified as type OctetString for compatibility with RADIUS [RADIUSExt], the encoding of the Data field SHOULD also conform to the rules for the UTF8String Data Format. */ struct dict_avp_data data = { 88, /* Code */ 0, /* Vendor */ "Framed-Pool", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Framed-Interface-Id */ { /* The Framed-Interface-Id AVP (AVP Code 96) is of type Unsigned64 and contains the IPv6 interface identifier to be configured for the user. It MAY be used in authorization requests as a hint to the server that a specific interface id is desired, but the server is not required to honor the hint in the corresponding response. */ struct dict_avp_data data = { 96, /* Code */ 0, /* Vendor */ "Framed-Interface-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Framed-IPv6-Prefix */ { /* The Framed-IPv6-Prefix AVP (AVP Code 97) is of type OctetString and contains the IPv6 prefix to be configured for the user. One or more AVPs MAY be used in authorization requests as a hint to the server that specific IPv6 prefixes are desired, but the server is not required to honor the hint in the corresponding response. */ struct dict_avp_data data = { 97, /* Code */ 0, /* Vendor */ "Framed-IPv6-Prefix", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Framed-IPv6-Route */ { /* The Framed-IPv6-Route AVP (AVP Code 99) is of type UTF8String and contains the ASCII routing information to be configured for the user on the NAS. Zero or more of these AVPs MAY be present in an authorization response. The string MUST contain an IPv6 address prefix followed by a slash and a decimal length specifier stating how many high order bits of the prefix should be used. This is followed by a space, a gateway address in hexadecimal notation, a space, and one or more metrics separated by spaces; for example, "2000:0:0:106::/64 2000::106:a00:20ff:fe99:a998 1". Whenever the gateway address is the IPv6 unspecified address, the IP address of the user SHOULD be used as the gateway address, such as in: "2000:0:0:106::/64 :: 1". */ struct dict_avp_data data = { 99, /* Code */ 0, /* Vendor */ "Framed-IPv6-Route", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Framed-IPv6-Pool */ { /* The Framed-IPv6-Pool AVP (AVP Code 100) is of type OctetString and contains the name of an assigned pool that SHOULD be used to assign an IPv6 prefix for the user. If the access device does not support multiple prefix pools, it MUST ignore this AVP. Although specified as type OctetString for compatibility with RADIUS [RADIUSIPv6], the encoding of the Data field SHOULD also conform to the rules for the UTF8String Data Format. */ struct dict_avp_data data = { 100, /* Code */ 0, /* Vendor */ "Framed-IPv6-Pool", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /*** IPX Access ***/ /* Framed-IPX-Network */ { /* The Framed-IPX-Network AVP (AVP Code 23) is of type Unsigned32 and contains the IPX Network number to be configured for the user. It MAY be used in an authorization request as a hint to the server that a specific address is desired, but the server is not required to honor the hint in the corresponding response. Two addresses have special significance: 0xFFFFFFFF and 0xFFFFFFFE. The value 0xFFFFFFFF indicates that the NAS should allow the user to select an address (i.e., Negotiated). The value 0xFFFFFFFE indicates that the NAS should select an address for the user (e.g., assign it from a pool of one or more IPX networks kept by the NAS). */ struct dict_avp_data data = { 23, /* Code */ 0, /* Vendor */ "Framed-IPX-Network", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /*** AppleTalk Network Access ***/ /* Framed-AppleTalk-Link */ { /* The Framed-AppleTalk-Link AVP (AVP Code 37) is of type Unsigned32 and contains the AppleTalk network number that should be used for the serial link to the user, which is another AppleTalk router. This AVP MUST only be present in an authorization response and is never used when the user is not another router. Despite the size of the field, values range from 0 to 65,535. The special value of 0 indicates an unnumbered serial link. A value of 1 to 65,535 means that the serial line between the NAS and the user should be assigned that value as an AppleTalk network number. */ struct dict_avp_data data = { 37, /* Code */ 0, /* Vendor */ "Framed-AppleTalk-Link", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Framed-AppleTalk-Network */ { /* The Framed-AppleTalk-Network AVP (AVP Code 38) is of type Unsigned32 and contains the AppleTalk Network number that the NAS should probe to allocate an AppleTalk node for the user. This AVP MUST only be present in an authorization response and is never used when the user is not another router. Multiple instances of this AVP indicate that the NAS may probe, using any of the network numbers specified. Despite the size of the field, values range from 0 to 65,535. The special value 0 indicates that the NAS should assign a network for the user, using its default cable range. A value between 1 and 65,535 (inclusive) indicates to the AppleTalk Network that the NAS should probe to find an address for the user. */ struct dict_avp_data data = { 38, /* Code */ 0, /* Vendor */ "Framed-AppleTalk-Network", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Framed-AppleTalk-Zone */ { /* The Framed-AppleTalk-Zone AVP (AVP Code 39) is of type OctetString and contains the AppleTalk Default Zone to be used for this user. This AVP MUST only be present in an authorization response. Multiple instances of this AVP in the same message are not allowed. The codification of this field's allowed range is outside the scope of this specification. */ struct dict_avp_data data = { 39, /* Code */ 0, /* Vendor */ "Framed-AppleTalk-Zone", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /*** AppleTalk Remote Access [RFC2869] ***/ /* ARAP-Features */ { /* The ARAP-Features AVP (AVP Code 71) is of type OctetString and MAY be present in the AA-Accept message if the Framed-Protocol AVP is set to the value of ARAP. See [RADIUSExt] for more information about the format of this AVP. */ struct dict_avp_data data = { 71, /* Code */ 0, /* Vendor */ "ARAP-Features", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* ARAP-Zone-Access */ { /* The ARAP-Zone-Access AVP (AVP Code 72) is of type Enumerated and MAY be present in the AA-Accept message if the Framed-Protocol AVP is set to the value of ARAP. The supported values are listed in [RADIUSTypes] and defined in [RADIUSExt]. Sub-registry: Values for RADIUS Attribute 72, ARAP-Zone-Access Reference: [RFC2869] */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(ARAP-Zone-Access)" , NULL, NULL}; struct dict_enumval_data tvals[] = { enumval_def_u32( 1, "Only allow access to default zone [RFC2869]"), enumval_def_u32( 2, "Use zone filter inclusively [RFC2869]"), enumval_def_u32( 3, "Not used [RFC2869]"), enumval_def_u32( 4, "Use zone filter exclusively [RFC2869]") }; struct dict_avp_data data = { 72, /* Code */ 0, /* Vendor */ "ARAP-Zone-Access", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; int i; /* Create the Enumerated type, enumerated values, and the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) { CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL); } CHECK_dict_new( DICT_AVP, &data , type, NULL); } /*** Non-Framed Access Authorization AVPs ***/ /* Login-IP-Host */ { /* The Login-IP-Host AVP (AVP Code 14) [RADIUS] is of type OctetString and contains the IPv4 address of a host with which to connect the user when the Login-Service AVP is included. It MAY be used in an AA-Request command as a hint to the Diameter Server that a specific host is desired, but the Diameter Server is not required to honor the hint in the AA-Answer. Two addresses have special significance: all ones and 0. The value of all ones indicates that the NAS SHOULD allow the user to select an address. The value 0 indicates that the NAS SHOULD select a host to connect the user to. */ struct dict_object *type; uint32_t allzeros = 0; uint32_t allones = (uint32_t) -1; struct dict_type_data tdata = { AVP_TYPE_OCTETSTRING, "Enumerated(Login-IP-Host)" , NULL, NULL}; struct dict_enumval_data tvals[] = { enumval_def_os( 4, &allzeros, "(0) NAS selects the host"), enumval_def_os( 4, &allones , "(1) User selects the address") }; struct dict_avp_data data = { 14, /* Code */ 0, /* Vendor */ "Login-IP-Host", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; int i; /* Create the Enumerated type, enumerated values, and the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) { CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL); } CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Login-IPv6-Host */ { /* The Login-IPv6-Host AVP (AVP Code 98) [RADIUSIPv6] is of type OctetString and contains the IPv6 address of a host with which to connect the user when the Login-Service AVP is included. It MAY be used in an AA-Request command as a hint to the Diameter Server that a specific host is desired, but the Diameter Server is not required to honor the hint in the AA-Answer. Two addresses have special significance: 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF and 0. The value 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF indicates that the NAS SHOULD allow the user to select an address. The value 0 indicates that the NAS SHOULD select a host to connect the user to. */ struct dict_object *type; unsigned char allzeros[16]; unsigned char allones[16]; struct dict_type_data tdata = { AVP_TYPE_OCTETSTRING, "Enumerated(Login-IPv6-Host)" , NULL, NULL}; struct dict_enumval_data tvals[] = { enumval_def_os( 16, &allzeros, "(0) NAS selects the host"), enumval_def_os( 16, &allones , "(1) User selects the address") }; struct dict_avp_data data = { 98, /* Code */ 0, /* Vendor */ "Login-IPv6-Host", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; int i; memset(allzeros, 0, sizeof(allzeros)); memset(allones, 0xff, sizeof(allones)); /* Create the Enumerated type, enumerated values, and the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) { CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL); } CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Login-Service */ { /* The Login-Service AVP (AVP Code 15) is of type Enumerated and contains the service that should be used to connect the user to the login host. This AVP SHOULD only be present in authorization responses. The supported values are listed in [RADIUSTypes]. Sub-registry: Values for RADIUS Attribute 15, Login-Service Reference: [RFC2865] */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Login-Service)" , NULL, NULL}; struct dict_enumval_data tvals[] = { enumval_def_u32( 0, "Telnet"), enumval_def_u32( 1, "Rlogin"), enumval_def_u32( 2, "TCP Clear"), enumval_def_u32( 3, "PortMaster (proprietary)"), enumval_def_u32( 4, "LAT"), enumval_def_u32( 5, "X25-PAD"), enumval_def_u32( 6, "X25-T3POS"), enumval_def_u32( 8, "TCP Clear Quiet (suppresses any NAS-generated connect string)") }; struct dict_avp_data data = { 15, /* Code */ 0, /* Vendor */ "Login-Service", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; int i; /* Create the Enumerated type, enumerated values, and the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) { CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL); } CHECK_dict_new( DICT_AVP, &data , type, NULL); } /*** TCP Services ***/ /* Login-TCP-Port */ { /* The Login-TCP-Port AVP (AVP Code 16) is of type Unsigned32 and contains the TCP port with which the user is to be connected when the Login-Service AVP is also present. This AVP SHOULD only be present in authorization responses. The value MUST NOT be greater than 65,535. */ struct dict_avp_data data = { 16, /* Code */ 0, /* Vendor */ "Login-TCP-Port", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /*** LAT Services ***/ /* Login-LAT-Service */ { /* The Login-LAT-Service AVP (AVP Code 34) is of type OctetString and contains the system with which the user is to be connected by LAT. It MAY be used in an authorization request as a hint to the server that a specific service is desired, but the server is not required to honor the hint in the corresponding response. This AVP MUST only be present in the response if the Login-Service AVP states that LAT is desired. Administrators use this service attribute when dealing with clustered systems, such as a VAX or Alpha cluster. In these environments, several different time-sharing hosts share the same resources (disks, printers, etc.), and administrators often configure each host to offer access (service) to each of the shared resources. In this case, each host in the cluster advertises its services through LAT broadcasts. Sophisticated users often know which service providers (machines) are faster and tend to use a node name when initiating a LAT connection. Some administrators want particular users to use certain machines as a primitive form of load balancing (although LAT knows how to do load balancing itself). The String field contains the identity of the LAT service to use. The LAT Architecture allows this string to contain $ (dollar), - (hyphen), . (period), _ (underscore), numerics, upper- and lowercase alphabetics, and the ISO Latin-1 character set extension [ISOLatin]. All LAT string comparisons are case insensitive. */ struct dict_avp_data data = { 34, /* Code */ 0, /* Vendor */ "Login-LAT-Service", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Login-LAT-Node */ { /* The Login-LAT-Node AVP (AVP Code 35) is of type OctetString and contains the Node with which the user is to be automatically connected by LAT. It MAY be used in an authorization request as a hint to the server that a specific LAT node is desired, but the server is not required to honor the hint in the corresponding response. This AVP MUST only be present in a response if the Login- Service-Type AVP is set to LAT. The String field contains the identity of the LAT service to use. The LAT Architecture allows this string to contain $ (dollar), - (hyphen), . (period), _ (underscore), numerics, upper- and lowercase alphabetics, and the ISO Latin-1 character set extension [ISOLatin]. All LAT string comparisons are case insensitive. */ struct dict_avp_data data = { 35, /* Code */ 0, /* Vendor */ "Login-LAT-Node", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Login-LAT-Group */ { /* The Login-LAT-Group AVP (AVP Code 36) is of type OctetString and contains a string identifying the LAT group codes this user is authorized to use. It MAY be used in an authorization request as a hint to the server that a specific group is desired, but the server is not required to honor the hint in the corresponding response. This AVP MUST only be present in a response if the Login-Service-Type AVP is set to LAT. LAT supports 256 different group codes, which LAT uses as a form of access rights. LAT encodes the group codes as a 256-bit bitmap. Administrators can assign one or more of the group code bits at the LAT service provider; it will only accept LAT connections that have these group codes set in the bitmap. The administrators assign a bitmap of authorized group codes to each user. LAT gets these from the operating system and uses them in its requests to the service providers. The codification of the range of allowed usage of this field is outside the scope of this specification. */ struct dict_avp_data data = { 36, /* Code */ 0, /* Vendor */ "Login-LAT-Group", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Login-LAT-Port */ { /* The Login-LAT-Port AVP (AVP Code 63) is of type OctetString and contains the Port with which the user is to be connected by LAT. It MAY be used in an authorization request as a hint to the server that a specific port is desired, but the server is not required to honor the hint in the corresponding response. This AVP MUST only be present in a response if the Login-Service-Type AVP is set to LAT. The String field contains the identity of the LAT service to use. The LAT Architecture allows this string to contain $ (dollar), - (hyphen), . (period), _ (underscore), numerics, upper- and lower-case alphabetics, and the ISO Latin-1 character set extension [ISOLatin]. All LAT string comparisons are case insensitive. */ struct dict_avp_data data = { 63, /* Code */ 0, /* Vendor */ "Login-LAT-Port", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /******************************** * NAS Tunneling AVPs * ********************************/ /* Tunnel-Type */ { /* The Tunnel-Type AVP (AVP Code 64) is of type Enumerated and contains the tunneling protocol(s) to be used (in the case of a tunnel initiator) or in use (in the case of a tunnel terminator). It MAY be used in an authorization request as a hint to the server that a specific tunnel type is desired, but the server is not required to honor the hint in the corresponding response. The Tunnel-Type AVP SHOULD also be included in Accounting-Request messages. A tunnel initiator is not required to implement any of these tunnel types. If a tunnel initiator receives a response that contains only unknown or unsupported Tunnel-Types, the tunnel initiator MUST behave as though a response were received with the Result-Code indicating a failure. The supported values are listed in [RADIUSTypes]. Sub-registry: Values for RADIUS Attribute 64, Tunnel-Type Reference: [RFC2868] */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Tunnel-Type)" , NULL, NULL}; struct dict_enumval_data tvals[] = { enumval_def_u32( 1, "Point-to-Point Tunneling Protocol (PPTP) [RFC2868]"), enumval_def_u32( 2, "Layer Two Forwarding (L2F) [RFC2868]"), enumval_def_u32( 3, "Layer Two Tunneling Protocol (L2TP) [RFC2868]"), enumval_def_u32( 4, "Ascend Tunnel Management Protocol (ATMP) [RFC2868]"), enumval_def_u32( 5, "Virtual Tunneling Protocol (VTP) [RFC2868]"), enumval_def_u32( 6, "IP Authentication Header in the Tunnel-mode (AH) [RFC2868]"), enumval_def_u32( 7, "IP-in-IP Encapsulation (IP-IP) [RFC2868]"), enumval_def_u32( 8, "Minimal IP-in-IP Encapsulation (MIN-IP-IP) [RFC2868]"), enumval_def_u32( 9, "IP Encapsulating Security Payload in the Tunnel-mode (ESP) [RFC2868]"), enumval_def_u32(10, "Generic Route Encapsulation (GRE) [RFC2868]"), enumval_def_u32(11, "Bay Dial Virtual Services (DVS) [RFC2868]"), enumval_def_u32(12, "IP-in-IP Tunneling [RFC2868]"), enumval_def_u32(13, "Virtual LANs (VLAN) [RFC3580]") }; struct dict_avp_data adata = { 64, /* Code */ 0, /* Vendor */ "Tunnel-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; int i; CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) { CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL); } CHECK_dict_new( DICT_AVP, &adata , type, NULL); } /* Tunnel-Medium-Type */ { /* The Tunnel-Medium-Type AVP (AVP Code 65) is of type Enumerated and contains the transport medium to use when creating a tunnel for protocols (such as L2TP) that can operate over multiple transports. It MAY be used in an authorization request as a hint to the server that a specific medium is desired, but the server is not required to honor the hint in the corresponding response. The supported values are listed in [RADIUSTypes]. Sub-registry: Values for RADIUS Attribute 65, Tunnel-Medium-Type Reference: [RFC2868] */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Tunnel-Medium-Type)" , NULL, NULL}; struct dict_enumval_data tvals[] = { enumval_def_u32( 1, "IPv4 (IP version 4) [RFC2868]"), enumval_def_u32( 2, "IPv6 (IP version 6) [RFC2868]"), enumval_def_u32( 3, "NSAP [RFC2868]"), enumval_def_u32( 4, "HDLC (8-bit multidrop) [RFC2868]"), enumval_def_u32( 5, "BBN 1822 [RFC2868]"), enumval_def_u32( 6, "802 (includes all 802 media plus Ethernet \"canonical format\") [RFC2868]"), enumval_def_u32( 7, "E.163 (POTS) [RFC2868]"), enumval_def_u32( 8, "E.164 (SMDS, Frame Relay, ATM) [RFC2868]"), enumval_def_u32( 9, "F.69 (Telex) [RFC2868]"), enumval_def_u32(10, "X.121 (X.25, Frame Relay) [RFC2868]"), enumval_def_u32(11, "IPX [RFC2868]"), enumval_def_u32(12, "Appletalk [RFC2868]"), enumval_def_u32(13, "Decnet IV [RFC2868]"), enumval_def_u32(14, "Banyan Vines [RFC2868]"), enumval_def_u32(15, "E.164 with NSAP format subaddress [RFC2868]") }; struct dict_avp_data adata = { 65, /* Code */ 0, /* Vendor */ "Tunnel-Medium-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; int i; CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) { CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL); } CHECK_dict_new( DICT_AVP, &adata , type, NULL); } /* Tunnel-Client-Endpoint */ { /* The Tunnel-Client-Endpoint AVP (AVP Code 66) is of type UTF8String and contains the address of the initiator end of the tunnel. It MAY be used in an authorization request as a hint to the server that a specific endpoint is desired, but the server is not required to honor the hint in the corresponding response. This AVP SHOULD be included in the corresponding Accounting-Request messages, in which case it indicates the address from which the tunnel was initiated. This AVP, along with the Tunnel-Server- Endpoint and Session-Id AVP [BASE], MAY be used to provide a globally unique means to identify a tunnel for accounting and auditing purposes. If Tunnel-Medium-Type is IPv4 (1), then this string is either the fully qualified domain name (FQDN) of the tunnel client machine, or a "dotted-decimal" IP address. Implementations MUST support the dotted-decimal format and SHOULD support the FQDN format for IP addresses. If Tunnel-Medium-Type is IPv6 (2), then this string is either the FQDN of the tunnel client machine, or a text representation of the address in either the preferred or alternate form [IPv6Addr]. Conforming implementations MUST support the preferred form and SHOULD support both the alternate text form and the FQDN format for IPv6 addresses. If Tunnel-Medium-Type is neither IPv4 nor IPv6, then this string is a tag referring to configuration data local to the Diameter client that describes the interface or medium-specific client address to use. */ struct dict_avp_data adata = { 66, /* Code */ 0, /* Vendor */ "Tunnel-Client-Endpoint", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &adata , UTF8String_type, NULL); } /* Tunnel-Server-Endpoint */ { /* The Tunnel-Server-Endpoint AVP (AVP Code 67) is of type UTF8String and contains the address of the server end of the tunnel. It MAY be used in an authorization request as a hint to the server that a specific endpoint is desired, but the server is not required to honor the hint in the corresponding response. This AVP SHOULD be included in the corresponding Accounting-Request messages, in which case it indicates the address from which the tunnel was initiated. This AVP, along with the Tunnel-Client- Endpoint and Session-Id AVP [BASE], MAY be used to provide a globally unique means to identify a tunnel for accounting and auditing purposes. If Tunnel-Medium-Type is IPv4 (1), then this string is either the fully qualified domain name (FQDN) of the tunnel server machine, or a "dotted-decimal" IP address. Implementations MUST support the dotted-decimal format and SHOULD support the FQDN format for IP addresses. If Tunnel-Medium-Type is IPv6 (2), then this string is either the FQDN of the tunnel server machine, or a text representation of the address in either the preferred or alternate form [IPv6Addr]. Implementations MUST support the preferred form and SHOULD support both the alternate text form and the FQDN format for IPv6 addresses. If Tunnel-Medium-Type is not IPv4 or IPv6, this string is a tag referring to configuration data local to the Diameter client that describes the interface or medium-specific server address to use. */ struct dict_avp_data adata = { 67, /* Code */ 0, /* Vendor */ "Tunnel-Server-Endpoint", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &adata , UTF8String_type, NULL); } /* Tunnel-Password */ { /* The Tunnel-Password AVP (AVP Code 69) is of type OctetString and may contain a password to be used to authenticate to a remote server. The Tunnel-Password AVP contains sensitive information. This value is not protected in the same manner as RADIUS [RADTunnels]. As required in [BASE], Diameter messages are encrypted by using IPsec or TLS. The Tunnel-Password AVP SHOULD NOT be used in untrusted proxy environments without encrypting it by using end-to-end security techniques, such as CMS Security [DiamCMS]. */ struct dict_avp_data adata = { 69, /* Code */ 0, /* Vendor */ "Tunnel-Password", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &adata , NULL, NULL); } /* Tunnel-Private-Group-Id */ { /* The Tunnel-Private-Group-Id AVP (AVP Code 81) is of type OctetString and contains the group Id for a particular tunneled session. The Tunnel-Private-Group-Id AVP MAY be included in an authorization request if the tunnel initiator can predetermine the group resulting from a particular connection. It SHOULD be included in the authorization response if this tunnel session is to be treated as belonging to a particular private group. Private groups may be used to associate a tunneled session with a particular group of users. For example, it MAY be used to facilitate routing of unregistered IP addresses through a particular interface. This AVP SHOULD be included in the Accounting-Request messages that pertain to the tunneled session. */ struct dict_avp_data adata = { 81, /* Code */ 0, /* Vendor */ "Tunnel-Private-Group-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &adata , NULL, NULL); } /* Tunnel-Assignment-Id */ { /* The Tunnel-Assignment-Id AVP (AVP Code 82) is of type OctetString and is used to indicate to the tunnel initiator the particular tunnel to which a session is to be assigned. Some tunneling protocols, such as [PPTP] and [L2TP], allow for sessions between the same two tunnel endpoints to be multiplexed over the same tunnel and also for a given session to use its own dedicated tunnel. This attribute provides a mechanism for Diameter to inform the tunnel initiator (e.g., PAC, LAC) whether to assign the session to a multiplexed tunnel or to a separate tunnel. Furthermore, it allows for sessions sharing multiplexed tunnels to be assigned to different multiplexed tunnels. A particular tunneling implementation may assign differing characteristics to particular tunnels. For example, different tunnels may be assigned different QoS parameters. Such tunnels may be used to carry either individual or multiple sessions. The Tunnel-Assignment-Id attribute thus allows the Diameter server to indicate that a particular session is to be assigned to a tunnel providing an appropriate level of service. It is expected that any QoS-related Diameter tunneling attributes defined in the future accompanying this one will be associated by the tunnel initiator with the Id given by this attribute. In the meantime, any semantic given to a particular Id string is a matter left to local configuration in the tunnel initiator. The Tunnel-Assignment-Id AVP is of significance only to Diameter and the tunnel initiator. The Id it specifies is only intended to be of local use to Diameter and the tunnel initiator. The Id assigned by the tunnel initiator is not conveyed to the tunnel peer. This attribute MAY be included in authorization responses. The tunnel initiator receiving this attribute MAY choose to ignore it and to assign the session to an arbitrary multiplexed or non-multiplexed tunnel between the desired endpoints. This AVP SHOULD also be included in the Accounting-Request messages pertaining to the tunneled session. If a tunnel initiator supports the Tunnel-Assignment-Id AVP, then it should assign a session to a tunnel in the following manner: - If this AVP is present and a tunnel exists between the specified endpoints with the specified Id, then the session should be assigned to that tunnel. - If this AVP is present and no tunnel exists between the specified endpoints with the specified Id, then a new tunnel should be established for the session and the specified Id should be associated with the new tunnel. - If this AVP is not present, then the session is assigned to an unnamed tunnel. If an unnamed tunnel does not yet exist between the specified endpoints, then it is established and used for this session and for subsequent ones established without the Tunnel-Assignment-Id attribute. A tunnel initiator MUST NOT assign a session for which a Tunnel-Assignment-Id AVP was not specified to a named tunnel (i.e., one that was initiated by a session specifying this AVP). Note that the same Id may be used to name different tunnels if these tunnels are between different endpoints. */ struct dict_avp_data adata = { 82, /* Code */ 0, /* Vendor */ "Tunnel-Assignment-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &adata , NULL, NULL); } /* Tunnel-Preference */ { /* The Tunnel-Preference AVP (AVP Code 83) is of type Unsigned32 and is used to identify the relative preference assigned to each tunnel when more than one set of tunneling AVPs is returned within separate Grouped-AVP AVPs. It MAY be used in an authorization request as a hint to the server that a specific preference is desired, but the server is not required to honor the hint in the corresponding response. For example, suppose that AVPs describing two tunnels are returned by the server, one with a Tunnel-Type of PPTP and the other with a Tunnel-Type of L2TP. If the tunnel initiator supports only one of the Tunnel-Types returned, it will initiate a tunnel of that type. If, however, it supports both tunnel protocols, it SHOULD use the value of the Tunnel-Preference AVP to decide which tunnel should be started. The tunnel with the lowest numerical value in the Value field of this AVP SHOULD be given the highest preference. The values assigned to two or more instances of the Tunnel-Preference AVP within a given authorization response MAY be identical. In this case, the tunnel initiator SHOULD use locally configured metrics to decide which set of AVPs to use. */ struct dict_avp_data adata = { 83, /* Code */ 0, /* Vendor */ "Tunnel-Preference", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &adata , NULL, NULL); } /* Tunnel-Client-Auth-Id */ { /* The Tunnel-Client-Auth-Id AVP (AVP Code 90) is of type UTF8String and specifies the name used by the tunnel initiator during the authentication phase of tunnel establishment. It MAY be used in an authorization request as a hint to the server that a specific preference is desired, but the server is not required to honor the hint in the corresponding response. This AVP MUST be present in the authorization response if an authentication name other than the default is desired. This AVP SHOULD be included in the Accounting- Request messages pertaining to the tunneled session. */ struct dict_avp_data adata = { 90, /* Code */ 0, /* Vendor */ "Tunnel-Client-Auth-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &adata , UTF8String_type, NULL); } /* Tunnel-Server-Auth-Id */ { /* The Tunnel-Server-Auth-Id AVP (AVP Code 91) is of type UTF8String and specifies the name used by the tunnel terminator during the authentication phase of tunnel establishment. It MAY be used in an authorization request as a hint to the server that a specific preference is desired, but the server is not required to honor the hint in the corresponding response. This AVP MUST be present in the authorization response if an authentication name other than the default is desired. This AVP SHOULD be included in the Accounting- Request messages pertaining to the tunneled session. */ struct dict_avp_data adata = { 91, /* Code */ 0, /* Vendor */ "Tunnel-Server-Auth-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &adata , UTF8String_type, NULL); } /* Tunneling */ { /* The Tunneling AVP (AVP Code 401) is of type Grouped and contains the following AVPs, used to describe a compulsory tunnel service: [RADTunnels], [RADTunlAcct]. Its data field has the following ABNF grammar: Tunneling ::= < AVP Header: 401 > { Tunnel-Type } { Tunnel-Medium-Type } { Tunnel-Client-Endpoint } { Tunnel-Server-Endpoint } [ Tunnel-Preference ] [ Tunnel-Client-Auth-Id ] [ Tunnel-Server-Auth-Id ] [ Tunnel-Assignment-Id ] [ Tunnel-Password ] [ Tunnel-Private-Group-Id ] */ struct dict_object * avp; struct dict_avp_data data = { 401, /* Code */ 0, /* Vendor */ "Tunneling", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Tunnel-Type", RULE_REQUIRED, -1, 1 } ,{ "Tunnel-Medium-Type", RULE_OPTIONAL, -1, 1 } ,{ "Tunnel-Client-Endpoint", RULE_OPTIONAL, -1, 1 } ,{ "Tunnel-Server-Endpoint", RULE_OPTIONAL, -1, 1 } ,{ "Tunnel-Preference", RULE_OPTIONAL, -1, 1 } ,{ "Tunnel-Client-Auth-Id", RULE_OPTIONAL, -1, 1 } ,{ "Tunnel-Server-Auth-Id", RULE_OPTIONAL, -1, 1 } ,{ "Tunnel-Assignment-Id", RULE_OPTIONAL, -1, 1 } ,{ "Tunnel-Password", RULE_OPTIONAL, -1, 1 } ,{ "Tunnel-Private-Group-Id", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /******************************** * NAS Accounting AVPs * ********************************/ /* Accounting-Input-Octets */ { /* The Accounting-Input-Octets AVP (AVP Code 363) is of type Unsigned64 and contains the number of octets received from the user. For NAS usage, this AVP indicates how many octets have been received from the port in the course of this session. It can only be present in ACR messages with an Accounting-Record-Type of INTERIM_RECORD or STOP_RECORD. */ struct dict_avp_data data = { 363, /* Code */ 0, /* Vendor */ "Accounting-Input-Octets", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Accounting-Output-Octets */ { /* The Accounting-Output-Octets AVP (AVP Code 364) is of type Unsigned64 and contains the number of octets sent to the user. For NAS usage, this AVP indicates how many octets have been sent to the port in the course of this session. It can only be present in ACR messages with an Accounting-Record-Type of INTERIM_RECORD or STOP_RECORD. */ struct dict_avp_data data = { 364, /* Code */ 0, /* Vendor */ "Accounting-Output-Octets", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Accounting-Input-Packets */ { /* The Accounting-Input-Packets (AVP Code 365) is of type Unsigned64 and contains the number of packets received from the user. For NAS usage, this AVP indicates how many packets have been received from the port over the course of a session being provided to a Framed User. It can only be present in ACR messages with an Accounting- Record-Type of INTERIM_RECORD or STOP_RECORD. */ struct dict_avp_data data = { 365, /* Code */ 0, /* Vendor */ "Accounting-Input-Packets", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Accounting-Output-Packets */ { /* The Accounting-Output-Packets (AVP Code 366) is of type Unsigned64 and contains the number of IP packets sent to the user. For NAS usage, this AVP indicates how many packets have been sent to the port over the course of a session being provided to a Framed User. It can only be present in ACR messages with an Accounting- Record-Type of INTERIM_RECORD or STOP_RECORD. */ struct dict_avp_data data = { 366, /* Code */ 0, /* Vendor */ "Accounting-Output-Packets", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Acct-Session-Time */ { /* The Acct-Session-Time AVP (AVP Code 46) is of type Unsigned32 and indicates the length of the current session in seconds. It can only be present in ACR messages with an Accounting-Record-Type of INTERIM_RECORD or STOP_RECORD. */ struct dict_avp_data data = { 46, /* Code */ 0, /* Vendor */ "Acct-Session-Time", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Acct-Authentic */ { /* The Acct-Authentic AVP (AVP Code 45) is of type Enumerated and specifies how the user was authenticated. The supported values are listed in [RADIUSTypes]. Sub-registry: Values for RADIUS Attribute 45, Acct-Authentic Reference: [RFC2866] */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Acct-Authentic)" , NULL, NULL}; struct dict_enumval_data tvals[] = { enumval_def_u32( 1, "RADIUS"), enumval_def_u32( 2, "Local"), enumval_def_u32( 3, "Remote"), enumval_def_u32( 4, "Diameter") }; struct dict_avp_data data = { 45, /* Code */ 0, /* Vendor */ "Acct-Authentic", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; int i; /* Create the Enumerated type, enumerated values, and the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) { CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL); } CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Accounting-Auth-Method */ { /* The Accounting-Auth-Method AVP (AVP Code 406) is of type Enumerated. A NAS MAY include this AVP in an Accounting-Request message to indicate the method used to authenticate the user. (Note that this is equivalent to the RADIUS MS-Acct-Auth-Type VSA attribute). The following values are defined: 1 PAP 2 CHAP 3 MS-CHAP-1 4 MS-CHAP-2 5 EAP 7 None */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Accounting-Auth-Method)" , NULL, NULL}; struct dict_enumval_data tvals[] = { enumval_def_u32( 1, "PAP"), enumval_def_u32( 2, "CHAP"), enumval_def_u32( 3, "MS-CHAP-1"), enumval_def_u32( 4, "MS-CHAP-2"), enumval_def_u32( 5, "EAP"), enumval_def_u32( 7, "None") }; struct dict_avp_data data = { 406, /* Code */ 0, /* Vendor */ "Accounting-Auth-Method", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; int i; /* Create the Enumerated type, enumerated values, and the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) { CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL); } CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Acct-Delay-Time */ { /* The Acct-Delay-Time AVP (AVP Code 41) is of type Unsigned32 and indicates the number of seconds the Diameter client has been trying to send the Accounting-Request (ACR). The accounting server may subtract this value from the time when the ACR arrives at the server to calculate the approximate time of the event that caused the ACR to be generated. This AVP is not used for retransmissions at the transport level (TCP or SCTP). Rather, it may be used when an ACR command cannot be transmitted because there is no appropriate peer to transmit it to or was rejected because it could not be delivered. In these cases, the command MAY be buffered and transmitted later, when an appropriate peer-connection is available or after sufficient time has passed that the destination-host may be reachable and operational. If the ACR is resent in this way, the Acct-Delay-Time AVP SHOULD be included. The value of this AVP indicates the number of seconds that elapsed between the time of the first attempt at transmission and the current attempt. */ struct dict_avp_data data = { 41, /* Code */ 0, /* Vendor */ "Acct-Delay-Time", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Acct-Link-Count */ { /* The Acct-Link-Count AVP (AVP Code 51) is of type Unsigned32 and indicates the total number of links that have been active (current or closed) in a given multilink session at the time the accounting record is generated. This AVP MAY be included in Accounting-Requests for any session that may be part of a multilink service. The Acct-Link-Count AVP may be used to make it easier for an accounting server to know when it has all the records for a given multilink service. When the number of Accounting-Requests received with Accounting-Record-Type = STOP_RECORD and with the same Acct- Multi-Session-Id and unique Session-Ids equals the largest value of Acct-Link-Count seen in those Accounting-Requests, all STOP_RECORD Accounting-Requests for that multilink service have been received. The following example, showing eight Accounting-Requests, illustrates how the Acct-Link-Count AVP is used. In the table below, only the relevant AVPs are shown, although additional AVPs containing accounting information will be present in the Accounting-Requests. Acct-Multi- Accounting- Acct- Session-Id Session-Id Record-Type Link-Count -------------------------------------------------------- "...10" "...10" START_RECORD 1 "...10" "...11" START_RECORD 2 "...10" "...11" STOP_RECORD 2 "...10" "...12" START_RECORD 3 "...10" "...13" START_RECORD 4 "...10" "...12" STOP_RECORD 4 "...10" "...13" STOP_RECORD 4 "...10" "...10" STOP_RECORD 4 */ struct dict_avp_data data = { 51, /* Code */ 0, /* Vendor */ "Acct-Link-Count", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Acct-Tunnel-Connection */ { /* The Acct-Tunnel-Connection AVP (AVP Code 68) is of type OctetString and contains the identifier assigned to the tunnel session. This AVP, along with the Tunnel-Client-Endpoint and Tunnel-Server-Endpoint AVPs, may be used to provide a means to uniquely identify a tunnel session for auditing purposes. The format of the identifier in this AVP depends upon the value of the Tunnel-Type AVP. For example, to identify an L2TP tunnel connection fully, the L2TP Tunnel Id and Call Id might be encoded in this field. The exact encoding of this field is implementation dependent. */ struct dict_avp_data data = { 68, /* Code */ 0, /* Vendor */ "Acct-Tunnel-Connection", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Acct-Tunnel-Packets-Lost */ { /* The Acct-Tunnel-Packets-Lost AVP (AVP Code 86) is of type Unsigned32 and contains the number of packets lost on a given link. */ struct dict_avp_data data = { 86, /* Code */ 0, /* Vendor */ "Acct-Tunnel-Packets-Lost", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /*********************************** * Compatibility with RADIUS AVPs * ***********************************/ /* NAS-Identifier */ { /* The NAS-Identifier AVP (AVP Code 32) [RADIUS] is of type UTF8String and contains the identity of the NAS providing service to the user. This AVP SHOULD only be added by a RADIUS/Diameter Translation Agent. When this AVP is present, the Origin-Host AVP identifies the NAS providing service to the user. In RADIUS it would be possible for a rogue NAS to forge the NAS- Identifier attribute. Diameter/RADIUS translation agents SHOULD attempt to check a received NAS-Identifier attribute against the source address of the RADIUS packet, by doing an A/AAAA RR query. If the NAS-Identifier attribute contains an FQDN, then such a query would resolve to an IP address matching the source address. However, the NAS-Identifier attribute is not required to contain an FQDN, so such a query could fail. If it fails, an error should be logged, but no action should be taken, other than a reverse lookup on the source address and insert the resulting FQDN into the Route-Record AVP. Diameter agents and servers SHOULD check whether a NAS-Identifier AVP corresponds to an entry in the Route-Record AVP. If no match is found, then an error is logged, but no other action is taken. */ struct dict_avp_data data = { 32, /* Code */ 0, /* Vendor */ "NAS-Identifier", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* NAS-IP-Address */ { /* The NAS-IP-Address AVP (AVP Code 4) [RADIUS] is of type OctetString and contains the IP Address of the NAS providing service to the user. This AVP SHOULD only be added by a RADIUS/Diameter Translation Agent. When this AVP is present, the Origin-Host AVP identifies the NAS providing service to the user. In RADIUS it would be possible for a rogue NAS to forge the NAS-IP- Address attribute value. Diameter/RADIUS translation agents MUST check a received NAS-IP-Address or NAS-IPv6-Address attribute against the source address of the RADIUS packet. If they do not match and the Diameter/RADIUS translation agent does not know whether the packet was sent by a RADIUS proxy or NAS (e.g., no Proxy-State attribute), then by default it is assumed that the source address corresponds to a RADIUS proxy, and that the NAS Address is behind that proxy, potentially with some additional RADIUS proxies in between. The Diameter/RADIUS translation agent MUST insert entries in the Route-Record AVP corresponding to the apparent route. This implies doing a reverse lookup on the source address and NAS-IP- Address or NAS-IPv6-Address attributes to determine the corresponding FQDNs. If the source address and the NAS-IP-Address or NAS-IPv6-Address do not match, and the Diameter/RADIUS translation agent knows that it is talking directly to the NAS (e.g., there are no RADIUS proxies between it and the NAS), then the error should be logged, and the packet MUST be discarded. Diameter agents and servers MUST check whether the NAS-IP-Address AVP corresponds to an entry in the Route-Record AVP. This is done by doing a reverse lookup (PTR RR) for the NAS-IP-Address to retrieve the corresponding FQDN, and by checking for a match with the Route- Record AVP. If no match is found, then an error is logged, but no other action is taken. */ struct dict_avp_data data = { 4, /* Code */ 0, /* Vendor */ "NAS-IP-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* NAS-IPv6-Address */ { /* The NAS-IPv6-Address AVP (AVP Code 95) [RADIUSIPv6] is of type OctetString and contains the IPv6 Address of the NAS providing service to the user. This AVP SHOULD only be added by a RADIUS/Diameter Translation Agent. When this AVP is present, the Origin-Host AVP identifies the NAS providing service to the user. In RADIUS it would be possible for a rogue NAS to forge the NAS- IPv6-Address attribute. Diameter/RADIUS translation agents MUST check a received NAS-IPv6-Address attribute against the source address of the RADIUS packet. If they do not match and the Diameter/RADIUS translation agent does not know whether the packet was sent by a RADIUS proxy or NAS (e.g., no Proxy-State attribute), then by default it is assumed that the source address corresponds to a RADIUS proxy, and that the NAS-IPv6-Address is behind that proxy, potentially with some additional RADIUS proxies in between. The Diameter/RADIUS translation agent MUST insert entries in the Route- Record AVP corresponding to the apparent route. This implies doing a reverse lookup on the source address and NAS-IPv6-Address attributes to determine the corresponding FQDNs. If the source address and the NAS-IPv6-Address do not match, and the Diameter/RADIUS translation agent knows that it is talking directly to the NAS (e.g., there are no RADIUS proxies between it and the NAS), then the error should be logged, and the packet MUST be discarded. Diameter agents and servers MUST check whether the NAS-IPv6-Address AVP corresponds to an entry in the Route-Record AVP. This is done by doing a reverse lookup (PTR RR) for the NAS-IPv6-Address to retrieve the corresponding FQDN, and by checking for a match with the Record- Route AVP. If no match is found, then an error is logged, but no other action is taken. */ struct dict_avp_data data = { 95, /* Code */ 0, /* Vendor */ "NAS-IPv6-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* State */ { /* The State AVP (AVP Code 24) [RADIUS] is of type OctetString and has two uses in the Diameter NAS application. The State AVP MAY be sent by a Diameter Server to a NAS in an AA- Response command that contains a Result-Code of DIAMETER_MULTI_ROUND_AUTH. If so, the NAS MUST return it unmodified in the subsequent AA-Request command. The State AVP MAY also be sent by a Diameter Server to a NAS in an AA-Response command that also includes a Termination-Action AVP with the value of AA-REQUEST. If the NAS performs the Termination-Action by sending a new AA-Request command upon termination of the current service, it MUST return the State AVP unmodified in the new request command. In either usage, the NAS MUST NOT interpret the AVP locally. Usage of the State AVP is implementation dependent. */ struct dict_avp_data data = { 24, /* Code */ 0, /* Vendor */ "State", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Termination-Cause mapping */ { struct dict_object *type; struct dict_enumval_data tvals[] = { enumval_def_u32(11, "[RADIUS] User Request"), enumval_def_u32(12, "[RADIUS] Lost Carrier"), enumval_def_u32(13, "[RADIUS] Lost Service"), enumval_def_u32(14, "[RADIUS] Idle Timeout"), enumval_def_u32(15, "[RADIUS] Session Timeout"), enumval_def_u32(16, "[RADIUS] Admin Reset"), enumval_def_u32(17, "[RADIUS] Admin Reboot"), enumval_def_u32(18, "[RADIUS] Port Error"), enumval_def_u32(19, "[RADIUS] NAS Error"), enumval_def_u32(20, "[RADIUS] NAS Request"), enumval_def_u32(21, "[RADIUS] NAS Reboot"), enumval_def_u32(22, "[RADIUS] Port Unneeded"), enumval_def_u32(23, "[RADIUS] Port Preempted"), enumval_def_u32(24, "[RADIUS] Port Suspended"), enumval_def_u32(25, "[RADIUS] Service Unavailable"), enumval_def_u32(26, "[RADIUS] Callback"), enumval_def_u32(27, "[RADIUS] User Error"), enumval_def_u32(28, "[RADIUS] Host Request"), enumval_def_u32(29, "[RADIUS] Supplicant Restart"), enumval_def_u32(30, "[RADIUS] Reauthentication Failure"), enumval_def_u32(31, "[RADIUS] Port Reinit"), enumval_def_u32(32, "[RADIUS] Port Disabled") }; int i; CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Enumerated(Termination-Cause)", &type); for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) { CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL); } } /* Origin-AAA-Protocol */ { /* The Origin-AAA-Protocol AVP (AVP Code 408) is of the type Enumerated and should be inserted in a Diameter message translated by a gateway system from another AAA protocol, such as RADIUS. It identifies the source protocol of the message to the Diameter system receiving the message. The supported values are: 1 RADIUS */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(Origin-AAA-Protocol)" , NULL, NULL}; struct dict_enumval_data tvals[] = { enumval_def_u32( 1, "RADIUS") }; struct dict_avp_data data = { 408, /* Code */ 0, /* Vendor */ "Origin-AAA-Protocol", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; int i; /* Create the Enumerated type, enumerated values, and the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) { CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL); } CHECK_dict_new( DICT_AVP, &data , type, NULL); } } /********************/ /* Commands section */ /********************/ { /* To avoid defining global variables for all the AVP that we use here, we do search the dictionary in each sub-block. * This is far from optimal, but the code is clearer like this, and the time it requires at execution is not noticeable. */ /* AA-Request (AAR) Command */ { /* The AA-Request (AAR), which is indicated by setting the Command-Code field to 265 and the 'R' bit in the Command Flags field, is used to request authentication and/or authorization for a given NAS user. The type of request is identified through the Auth-Request-Type AVP [BASE]. The recommended value for most RADIUS interoperabily situations is AUTHORIZE_AUTHENTICATE. If Authentication is requested, the User-Name attribute SHOULD be present, as well as any additional authentication AVPs that would carry the password information. A request for authorization SHOULD only include the information from which the authorization will be performed, such as the User-Name, Called-Station-Id, or Calling- Station-Id AVPs. All requests SHOULD contain AVPs uniquely identifying the source of the call, such as Origin-Host and NAS-Port. Certain networks MAY use different AVPs for authorization purposes. A request for authorization will include some AVPs defined in section 6. It is possible for a single session to be authorized first and then for an authentication request to follow. This AA-Request message MAY be the result of a multi-round authentication exchange, which occurs when the AA-Answer message is received with the Result-Code AVP set to DIAMETER_MULTI_ROUND_AUTH. A subsequent AAR message SHOULD be sent, with the User-Password AVP that includes the user's response to the prompt, and MUST include any State AVPs that were present in the AAA message. Message Format ::= < Diameter Header: 265, REQ, PXY > < Session-Id > { Auth-Application-Id } { Origin-Host } { Origin-Realm } { Destination-Realm } { Auth-Request-Type } [ Destination-Host ] [ NAS-Identifier ] [ NAS-IP-Address ] [ NAS-IPv6-Address ] [ NAS-Port ] [ NAS-Port-Id ] [ NAS-Port-Type ] [ Origin-AAA-Protocol ] [ Origin-State-Id ] [ Port-Limit ] [ User-Name ] [ User-Password ] [ Service-Type ] [ State ] [ Authorization-Lifetime ] [ Auth-Grace-Period ] [ Auth-Session-State ] [ Callback-Number ] [ Called-Station-Id ] [ Calling-Station-Id ] [ Originating-Line-Info ] [ Connect-Info ] [ CHAP-Auth ] [ CHAP-Challenge ] * [ Framed-Compression ] [ Framed-Interface-Id ] [ Framed-IP-Address ] * [ Framed-IPv6-Prefix ] [ Framed-IP-Netmask ] [ Framed-MTU ] [ Framed-Protocol ] [ ARAP-Password ] [ ARAP-Security ] * [ ARAP-Security-Data ] * [ Login-IP-Host ] * [ Login-IPv6-Host ] [ Login-LAT-Group ] [ Login-LAT-Node ] [ Login-LAT-Port ] [ Login-LAT-Service ] * [ Tunneling ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 265, /* Code */ "AA-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } ,{ "Auth-Request-Type", RULE_OPTIONAL, -1, 1 } ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Identifier", RULE_OPTIONAL, -1, 1 } ,{ "NAS-IP-Address", RULE_OPTIONAL, -1, 1 } ,{ "NAS-IPv6-Address", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Port", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Port-Id", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Port-Type", RULE_OPTIONAL, -1, 1 } ,{ "Origin-AAA-Protocol", RULE_OPTIONAL, -1, 1 } ,{ "Origin-State-Id", RULE_OPTIONAL, -1, 1 } ,{ "Port-Limit", RULE_OPTIONAL, -1, 1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "User-Password", RULE_OPTIONAL, -1, 1 } ,{ "Service-Type", RULE_OPTIONAL, -1, 1 } ,{ "State", RULE_OPTIONAL, -1, 1 } ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Session-State", RULE_OPTIONAL, -1, 1 } ,{ "Callback-Number", RULE_OPTIONAL, -1, 1 } ,{ "Called-Station-Id", RULE_OPTIONAL, -1, 1 } ,{ "Calling-Station-Id", RULE_OPTIONAL, -1, 1 } ,{ "Originating-Line-Info", RULE_OPTIONAL, -1, 1 } ,{ "Connect-Info", RULE_OPTIONAL, -1, 1 } ,{ "CHAP-Auth", RULE_OPTIONAL, -1, 1 } ,{ "CHAP-Challenge", RULE_OPTIONAL, -1, 1 } ,{ "Framed-Compression", RULE_OPTIONAL, -1,-1 } ,{ "Framed-Interface-Id", RULE_OPTIONAL, -1, 1 } ,{ "Framed-IP-Address", RULE_OPTIONAL, -1, 1 } ,{ "Framed-IPv6-Prefix", RULE_OPTIONAL, -1,-1 } ,{ "Framed-IP-Netmask", RULE_OPTIONAL, -1, 1 } ,{ "Framed-MTU", RULE_OPTIONAL, -1, 1 } ,{ "Framed-Protocol", RULE_OPTIONAL, -1, 1 } ,{ "ARAP-Password", RULE_OPTIONAL, -1, 1 } ,{ "ARAP-Security", RULE_OPTIONAL, -1, 1 } ,{ "ARAP-Security-Data", RULE_OPTIONAL, -1,-1 } ,{ "Login-IP-Host", RULE_OPTIONAL, -1,-1 } ,{ "Login-IPv6-Host", RULE_OPTIONAL, -1,-1 } ,{ "Login-LAT-Group", RULE_OPTIONAL, -1, 1 } ,{ "Login-LAT-Node", RULE_OPTIONAL, -1, 1 } ,{ "Login-LAT-Port", RULE_OPTIONAL, -1, 1 } ,{ "Login-LAT-Service", RULE_OPTIONAL, -1, 1 } ,{ "Tunneling", RULE_OPTIONAL, -1,-1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1,-1 } ,{ "Route-Record", RULE_OPTIONAL, -1,-1 } }; CHECK_dict_new( DICT_COMMAND, &data , nasreq, &cmd); PARSE_loc_rules( rules, cmd ); } /* AA-Answer (AAA) Command */ { /* The AA-Answer (AAA) message is indicated by setting the Command-Code field to 265 and clearing the 'R' bit in the Command Flags field. It is sent in response to the AA-Request (AAR) message. If authorization was requested, a successful response will include the authorization AVPs appropriate for the service being provided, as defined in section 6. For authentication exchanges requiring more than a single round trip, the server MUST set the Result-Code AVP to DIAMETER_MULTI_ROUND_AUTH. An AAA message with this result code MAY include one Reply-Message or more and MAY include zero or one State AVPs. If the Reply-Message AVP was present, the network access server SHOULD send the text to the user's client to display to the user, instructing the client to prompt the user for a response. For example, this capability can be achieved in PPP via PAP. If the access client is unable to prompt the user for a new response, it MUST treat the AA-Answer (AAA) with the Reply-Message AVP as an error and deny access. Message Format ::= < Diameter Header: 265, PXY > < Session-Id > { Auth-Application-Id } { Auth-Request-Type } { Result-Code } { Origin-Host } { Origin-Realm } [ User-Name ] [ Service-Type ] * [ Class ] * [ Configuration-Token ] [ Acct-Interim-Interval ] [ Error-Message ] [ Error-Reporting-Host ] * [ Failed-AVP ] [ Idle-Timeout ] [ Authorization-Lifetime ] [ Auth-Grace-Period ] [ Auth-Session-State ] [ Re-Auth-Request-Type ] [ Multi-Round-Time-Out ] [ Session-Timeout ] [ State ] * [ Reply-Message ] [ Origin-AAA-Protocol ] [ Origin-State-Id ] * [ Filter-Id ] [ Password-Retry ] [ Port-Limit ] [ Prompt ] [ ARAP-Challenge-Response ] [ ARAP-Features ] [ ARAP-Security ] * [ ARAP-Security-Data ] [ ARAP-Zone-Access ] [ Callback-Id ] [ Callback-Number ] [ Framed-Appletalk-Link ] * [ Framed-Appletalk-Network ] [ Framed-Appletalk-Zone ] * [ Framed-Compression ] [ Framed-Interface-Id ] [ Framed-IP-Address ] * [ Framed-IPv6-Prefix ] [ Framed-IPv6-Pool ] * [ Framed-IPv6-Route ] [ Framed-IP-Netmask ] * [ Framed-Route ] [ Framed-Pool ] [ Framed-IPX-Network ] [ Framed-MTU ] [ Framed-Protocol ] [ Framed-Routing ] * [ Login-IP-Host ] * [ Login-IPv6-Host ] [ Login-LAT-Group ] [ Login-LAT-Node ] [ Login-LAT-Port ] [ Login-LAT-Service ] [ Login-Service ] [ Login-TCP-Port ] * [ NAS-Filter-Rule ] * [ QoS-Filter-Rule ] * [ Tunneling ] * [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Max-Cache-Time ] * [ Proxy-Info ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 265, /* Code */ "AA-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Auth-Request-Type", RULE_REQUIRED, -1, 1 } ,{ "Result-Code", RULE_OPTIONAL, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "Service-Type", RULE_OPTIONAL, -1, 1 } ,{ "Class", RULE_OPTIONAL, -1,-1 } ,{ "Configuration-Token", RULE_OPTIONAL, -1,-1 } ,{ "Acct-Interim-Interval", RULE_OPTIONAL, -1, 1 } ,{ "Error-Message", RULE_OPTIONAL, -1, 1 } ,{ "Error-Reporting-Host", RULE_OPTIONAL, -1, 1 } ,{ "Failed-AVP", RULE_OPTIONAL, -1,-1 } ,{ "Idle-Timeout", RULE_OPTIONAL, -1, 1 } ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Session-State", RULE_OPTIONAL, -1, 1 } ,{ "Re-Auth-Request-Type", RULE_OPTIONAL, -1, 1 } ,{ "Multi-Round-Time-Out", RULE_OPTIONAL, -1, 1 } ,{ "Session-Timeout", RULE_OPTIONAL, -1, 1 } ,{ "State", RULE_OPTIONAL, -1, 1 } ,{ "Reply-Message", RULE_OPTIONAL, -1,-1 } ,{ "Origin-AAA-Protocol", RULE_OPTIONAL, -1, 1 } ,{ "Origin-State-Id", RULE_OPTIONAL, -1, 1 } ,{ "Filter-Id", RULE_OPTIONAL, -1,-1 } ,{ "Password-Retry", RULE_OPTIONAL, -1, 1 } ,{ "Port-Limit", RULE_OPTIONAL, -1, 1 } ,{ "Prompt", RULE_OPTIONAL, -1, 1 } ,{ "ARAP-Challenge-Response", RULE_OPTIONAL, -1, 1 } ,{ "ARAP-Features", RULE_OPTIONAL, -1, 1 } ,{ "ARAP-Security", RULE_OPTIONAL, -1, 1 } ,{ "ARAP-Security-Data", RULE_OPTIONAL, -1,-1 } ,{ "ARAP-Zone-Access", RULE_OPTIONAL, -1, 1 } ,{ "Callback-Id", RULE_OPTIONAL, -1, 1 } ,{ "Callback-Number", RULE_OPTIONAL, -1, 1 } ,{ "Framed-AppleTalk-Link", RULE_OPTIONAL, -1, 1 } ,{ "Framed-AppleTalk-Network", RULE_OPTIONAL, -1,-1 } ,{ "Framed-AppleTalk-Zone", RULE_OPTIONAL, -1, 1 } ,{ "Framed-Compression", RULE_OPTIONAL, -1,-1 } ,{ "Framed-Interface-Id", RULE_OPTIONAL, -1,-1 } ,{ "Framed-IP-Address", RULE_OPTIONAL, -1, 1 } ,{ "Framed-IPv6-Prefix", RULE_OPTIONAL, -1,-1 } ,{ "Framed-IPv6-Pool", RULE_OPTIONAL, -1, 1 } ,{ "Framed-IPv6-Route", RULE_OPTIONAL, -1,-1 } ,{ "Framed-IP-Netmask", RULE_OPTIONAL, -1,-1 } ,{ "Framed-Route", RULE_OPTIONAL, -1,-1 } ,{ "Framed-Pool", RULE_OPTIONAL, -1, 1 } ,{ "Framed-IPX-Network", RULE_OPTIONAL, -1, 1 } ,{ "Framed-MTU", RULE_OPTIONAL, -1, 1 } ,{ "Framed-Protocol", RULE_OPTIONAL, -1, 1 } ,{ "Framed-Routing", RULE_OPTIONAL, -1, 1 } ,{ "Login-IP-Host", RULE_OPTIONAL, -1,-1 } ,{ "Login-IPv6-Host", RULE_OPTIONAL, -1,-1 } ,{ "Login-LAT-Group", RULE_OPTIONAL, -1, 1 } ,{ "Login-LAT-Node", RULE_OPTIONAL, -1, 1 } ,{ "Login-LAT-Port", RULE_OPTIONAL, -1, 1 } ,{ "Login-LAT-Service", RULE_OPTIONAL, -1, 1 } ,{ "Login-Service", RULE_OPTIONAL, -1, 1 } ,{ "Login-TCP-Port", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Filter-Rule", RULE_OPTIONAL, -1,-1 } ,{ "QoS-Filter-Rule", RULE_OPTIONAL, -1,-1 } ,{ "Tunneling", RULE_OPTIONAL, -1,-1 } ,{ "Redirect-Host", RULE_OPTIONAL, -1,-1 } ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1,-1 } }; CHECK_dict_new( DICT_COMMAND, &data , nasreq, &cmd); PARSE_loc_rules( rules, cmd ); } /* Re-Auth-Request */ { /* Add additional rules of the ABNF (compared to Base definition): ::= < Diameter Header: 258, REQ, PXY > < Session-Id > { Origin-Host } { Origin-Realm } { Destination-Realm } { Destination-Host } { Auth-Application-Id } { Re-Auth-Request-Type } [ User-Name ] [ Origin-AAA-Protocol ] [ Origin-State-Id ] [ NAS-Identifier ] [ NAS-IP-Address ] [ NAS-IPv6-Address ] [ NAS-Port ] [ NAS-Port-Id ] [ NAS-Port-Type ] [ Service-Type ] [ Framed-IP-Address ] [ Framed-IPv6-Prefix ] [ Framed-Interface-Id ] [ Called-Station-Id ] [ Calling-Station-Id ] [ Originating-Line-Info ] [ Acct-Session-Id ] [ Acct-Multi-Session-Id ] [ State ] * [ Class ] [ Reply-Message ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct local_rules_definition rules[] = { { "Origin-AAA-Protocol", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Identifier", RULE_OPTIONAL, -1, 1 } ,{ "NAS-IP-Address", RULE_OPTIONAL, -1, 1 } ,{ "NAS-IPv6-Address", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Port", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Port-Id", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Port-Type", RULE_OPTIONAL, -1, 1 } ,{ "Service-Type", RULE_OPTIONAL, -1, 1 } ,{ "Framed-IP-Address", RULE_OPTIONAL, -1, 1 } ,{ "Framed-IPv6-Prefix", RULE_OPTIONAL, -1, 1 } ,{ "Framed-Interface-Id", RULE_OPTIONAL, -1, 1 } ,{ "Called-Station-Id", RULE_OPTIONAL, -1, 1 } ,{ "Calling-Station-Id", RULE_OPTIONAL, -1, 1 } ,{ "Originating-Line-Info", RULE_OPTIONAL, -1, 1 } ,{ "Acct-Session-Id", RULE_OPTIONAL, -1, 1 } ,{ "Acct-Multi-Session-Id", RULE_OPTIONAL, -1, 1 } ,{ "State", RULE_OPTIONAL, -1, 1 } ,{ "Class", RULE_OPTIONAL, -1,-1 } ,{ "Reply-Message", RULE_OPTIONAL, -1,-1 } }; CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Re-Auth-Request", &cmd); PARSE_loc_rules( rules, cmd ); } /* Re-Auth-Answer */ { /* Add additional rules of the ABNF (compared to Base definition): ::= < Diameter Header: 258, PXY > < Session-Id > { Result-Code } { Origin-Host } { Origin-Realm } [ User-Name ] [ Origin-AAA-Protocol ] [ Origin-State-Id ] [ Error-Message ] [ Error-Reporting-Host ] * [ Failed-AVP ] * [ Redirected-Host ] [ Redirected-Host-Usage ] [ Redirected-Host-Cache-Time ] [ Service-Type ] * [ Configuration-Token ] [ Idle-Timeout ] [ Authorization-Lifetime ] [ Auth-Grace-Period ] [ Re-Auth-Request-Type ] [ State ] * [ Class ] * [ Reply-Message ] [ Prompt ] * [ Proxy-Info ] * [ AVP ] */ struct dict_object * cmd; struct local_rules_definition rules[] = { { "Origin-AAA-Protocol", RULE_OPTIONAL, -1, 1 } ,{ "Service-Type", RULE_OPTIONAL, -1, 1 } ,{ "Configuration-Token", RULE_OPTIONAL, -1,-1 } ,{ "Idle-Timeout", RULE_OPTIONAL, -1, 1 } ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 } ,{ "Re-Auth-Request-Type", RULE_OPTIONAL, -1, 1 } ,{ "State", RULE_OPTIONAL, -1, 1 } ,{ "Class", RULE_OPTIONAL, -1,-1 } ,{ "Reply-Message", RULE_OPTIONAL, -1,-1 } ,{ "Prompt", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Re-Auth-Answer", &cmd); PARSE_loc_rules( rules, cmd ); } /* Session-Termination-Request */ { /* Add additional rules of the ABNF (compared to Base definition): ::= < Diameter Header: 275, REQ, PXY > < Session-Id > { Origin-Host } { Origin-Realm } { Destination-Realm } { Auth-Application-Id } { Termination-Cause } [ User-Name ] [ Destination-Host ] * [ Class ] [ Origin-AAA-Protocol ] [ Origin-State-Id ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct local_rules_definition rules[] = { { "Origin-AAA-Protocol", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Session-Termination-Request", &cmd); PARSE_loc_rules( rules, cmd ); } /* Session-Termination-Answer */ { /* Add additional rules of the ABNF (compared to Base definition): ::= < Diameter Header: 275, PXY > < Session-Id > { Result-Code } { Origin-Host } { Origin-Realm } [ User-Name ] * [ Class ] [ Error-Message ] [ Error-Reporting-Host ] * [ Failed-AVP ] [ Origin-AAA-Protocol ] [ Origin-State-Id ] * [ Redirect-Host ] [ Redirect-Host-Usase ] [ Redirect-Max-Cache-Time ] * [ Proxy-Info ] * [ AVP ] */ struct dict_object * cmd; struct local_rules_definition rules[] = { { "Origin-AAA-Protocol", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Session-Termination-Answer", &cmd); PARSE_loc_rules( rules, cmd ); } /* Abort-Session-Request */ { /* Add additional rules of the ABNF (compared to Base definition): ::= < Diameter Header: 274, REQ, PXY > < Session-Id > { Origin-Host } { Origin-Realm } { Destination-Realm } { Destination-Host } { Auth-Application-Id } [ User-Name ] [ Origin-AAA-Protocol ] [ Origin-State-Id ] [ NAS-Identifier ] [ NAS-IP-Address ] [ NAS-IPv6-Address ] [ NAS-Port ] [ NAS-Port-Id ] [ NAS-Port-Type ] [ Service-Type ] [ Framed-IP-Address ] [ Framed-IPv6-Prefix ] [ Framed-Interface-Id ] [ Called-Station-Id ] [ Calling-Station-Id ] [ Originating-Line-Info ] [ Acct-Session-Id ] [ Acct-Multi-Session-Id ] [ State ] * [ Class ] * [ Reply-Message ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct local_rules_definition rules[] = { { "Origin-AAA-Protocol", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Identifier", RULE_OPTIONAL, -1, 1 } ,{ "NAS-IP-Address", RULE_OPTIONAL, -1, 1 } ,{ "NAS-IPv6-Address", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Port", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Port-Id", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Port-Type", RULE_OPTIONAL, -1, 1 } ,{ "Service-Type", RULE_OPTIONAL, -1, 1 } ,{ "Framed-IP-Address", RULE_OPTIONAL, -1, 1 } ,{ "Framed-IPv6-Prefix", RULE_OPTIONAL, -1, 1 } ,{ "Framed-Interface-Id", RULE_OPTIONAL, -1, 1 } ,{ "Called-Station-Id", RULE_OPTIONAL, -1, 1 } ,{ "Calling-Station-Id", RULE_OPTIONAL, -1, 1 } ,{ "Originating-Line-Info", RULE_OPTIONAL, -1, 1 } ,{ "Acct-Session-Id", RULE_OPTIONAL, -1, 1 } ,{ "Acct-Multi-Session-Id", RULE_OPTIONAL, -1, 1 } ,{ "State", RULE_OPTIONAL, -1, 1 } ,{ "Class", RULE_OPTIONAL, -1,-1 } ,{ "Reply-Message", RULE_OPTIONAL, -1,-1 } }; CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Abort-Session-Request", &cmd); PARSE_loc_rules( rules, cmd ); } /* Abort-Session-Answer */ { /* Add additional rules of the ABNF (compared to Base definition): ::= < Diameter Header: 274, PXY > < Session-Id > { Result-Code } { Origin-Host } { Origin-Realm } [ User-Name ] [ Origin-AAA-Protocol ] [ Origin-State-Id ] [ State] [ Error-Message ] [ Error-Reporting-Host ] * [ Failed-AVP ] * [ Redirected-Host ] [ Redirected-Host-Usage ] [ Redirected-Max-Cache-Time ] * [ Proxy-Info ] * [ AVP ] */ struct dict_object * cmd; struct local_rules_definition rules[] = { { "Origin-AAA-Protocol", RULE_OPTIONAL, -1, 1 } ,{ "State", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Abort-Session-Answer", &cmd); PARSE_loc_rules( rules, cmd ); } /* Accounting-Request */ { /* Add additional rules of the ABNF (compared to Base definition): ::= < Diameter Header: 271, REQ, PXY > < Session-Id > { Origin-Host } { Origin-Realm } { Destination-Realm } { Accounting-Record-Type } { Accounting-Record-Number } [ Acct-Application-Id ] [ Vendor-Specific-Application-Id ] [ User-Name ] [ Accounting-Sub-Session-Id ] [ Acct-Session-Id ] [ Acct-Multi-Session-Id ] [ Origin-AAA-Protocol ] [ Origin-State-Id ] [ Destination-Host ] [ Event-Timestamp ] [ Acct-Delay-Time ] [ NAS-Identifier ] [ NAS-IP-Address ] [ NAS-IPv6-Address ] [ NAS-Port ] [ NAS-Port-Id ] [ NAS-Port-Type ] * [ Class ] [ Service-Type ] [ Termination-Cause ] [ Accounting-Input-Octets ] [ Accounting-Input-Packets ] [ Accounting-Output-Octets ] [ Accounting-Output-Packets ] [ Acct-Authentic ] [ Accounting-Auth-Method ] [ Acct-Link-Count ] [ Acct-Session-Time ] [ Acct-Tunnel-Connection ] [ Acct-Tunnel-Packets-Lost ] [ Callback-Id ] [ Callback-Number ] [ Called-Station-Id ] [ Calling-Station-Id ] * [ Connection-Info ] [ Originating-Line-Info ] [ Authorization-Lifetime ] [ Session-Timeout ] [ Idle-Timeout ] [ Port-Limit ] [ Accounting-Realtime-Required ] [ Acct-Interim-Interval ] * [ Filter-Id ] * [ NAS-Filter-Rule ] * [ Qos-Filter-Rule ] [ Framed-AppleTalk-Link ] [ Framed-AppleTalk-Network ] [ Framed-AppleTalk-Zone ] [ Framed-Compression ] [ Framed-Interface-Id ] [ Framed-IP-Address ] [ Framed-IP-Netmask ] * [ Framed-IPv6-Prefix ] [ Framed-IPv6-Pool ] * [ Framed-IPv6-Route ] [ Framed-IPX-Network ] [ Framed-MTU ] [ Framed-Pool ] [ Framed-Protocol ] * [ Framed-Route ] [ Framed-Routing ] * [ Login-IP-Host ] * [ Login-IPv6-Host ] [ Login-LAT-Group ] [ Login-LAT-Node ] [ Login-LAT-Port ] [ Login-LAT-Service ] [ Login-Service ] [ Login-TCP-Port ] * [ Tunneling ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct local_rules_definition rules[] = { { "Origin-AAA-Protocol", RULE_OPTIONAL, -1, 1 } ,{ "Acct-Delay-Time", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Identifier", RULE_OPTIONAL, -1, 1 } ,{ "NAS-IP-Address", RULE_OPTIONAL, -1, 1 } ,{ "NAS-IPv6-Address", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Port", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Port-Id", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Port-Type", RULE_OPTIONAL, -1, 1 } ,{ "Class", RULE_OPTIONAL, -1,-1 } ,{ "Service-Type", RULE_OPTIONAL, -1, 1 } ,{ "Termination-Cause", RULE_OPTIONAL, -1, 1 } ,{ "Accounting-Input-Octets", RULE_OPTIONAL, -1, 1 } ,{ "Accounting-Input-Packets", RULE_OPTIONAL, -1, 1 } ,{ "Accounting-Output-Octets", RULE_OPTIONAL, -1, 1 } ,{ "Accounting-Output-Packets", RULE_OPTIONAL, -1, 1 } ,{ "Acct-Authentic", RULE_OPTIONAL, -1, 1 } ,{ "Accounting-Auth-Method", RULE_OPTIONAL, -1, 1 } ,{ "Acct-Link-Count", RULE_OPTIONAL, -1, 1 } ,{ "Acct-Session-Time", RULE_OPTIONAL, -1, 1 } ,{ "Acct-Tunnel-Connection", RULE_OPTIONAL, -1, 1 } ,{ "Acct-Tunnel-Packets-Lost", RULE_OPTIONAL, -1, 1 } ,{ "Callback-Id", RULE_OPTIONAL, -1, 1 } ,{ "Callback-Number", RULE_OPTIONAL, -1, 1 } ,{ "Called-Station-Id", RULE_OPTIONAL, -1, 1 } ,{ "Calling-Station-Id", RULE_OPTIONAL, -1, 1 } ,{ "Connect-Info", RULE_OPTIONAL, -1,-1 } ,{ "Originating-Line-Info", RULE_OPTIONAL, -1, 1 } ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 } ,{ "Session-Timeout", RULE_OPTIONAL, -1, 1 } ,{ "Idle-Timeout", RULE_OPTIONAL, -1, 1 } ,{ "Port-Limit", RULE_OPTIONAL, -1, 1 } ,{ "Filter-Id", RULE_OPTIONAL, -1,-1 } ,{ "NAS-Filter-Rule", RULE_OPTIONAL, -1,-1 } ,{ "QoS-Filter-Rule", RULE_OPTIONAL, -1,-1 } ,{ "Framed-AppleTalk-Link", RULE_OPTIONAL, -1, 1 } ,{ "Framed-AppleTalk-Network", RULE_OPTIONAL, -1, 1 } ,{ "Framed-AppleTalk-Zone", RULE_OPTIONAL, -1, 1 } ,{ "Framed-Compression", RULE_OPTIONAL, -1, 1 } ,{ "Framed-Interface-Id", RULE_OPTIONAL, -1, 1 } ,{ "Framed-IP-Address", RULE_OPTIONAL, -1, 1 } ,{ "Framed-IPv6-Prefix", RULE_OPTIONAL, -1,-1 } ,{ "Framed-IPv6-Pool", RULE_OPTIONAL, -1, 1 } ,{ "Framed-IPv6-Route", RULE_OPTIONAL, -1,-1 } ,{ "Framed-IP-Netmask", RULE_OPTIONAL, -1, 1 } ,{ "Framed-Route", RULE_OPTIONAL, -1,-1 } ,{ "Framed-Pool", RULE_OPTIONAL, -1, 1 } ,{ "Framed-IPX-Network", RULE_OPTIONAL, -1, 1 } ,{ "Framed-MTU", RULE_OPTIONAL, -1, 1 } ,{ "Framed-Protocol", RULE_OPTIONAL, -1, 1 } ,{ "Framed-Routing", RULE_OPTIONAL, -1, 1 } ,{ "Login-IP-Host", RULE_OPTIONAL, -1,-1 } ,{ "Login-IPv6-Host", RULE_OPTIONAL, -1,-1 } ,{ "Login-LAT-Group", RULE_OPTIONAL, -1, 1 } ,{ "Login-LAT-Node", RULE_OPTIONAL, -1, 1 } ,{ "Login-LAT-Port", RULE_OPTIONAL, -1, 1 } ,{ "Login-LAT-Service", RULE_OPTIONAL, -1, 1 } ,{ "Login-Service", RULE_OPTIONAL, -1, 1 } ,{ "Login-TCP-Port", RULE_OPTIONAL, -1, 1 } ,{ "Tunneling", RULE_OPTIONAL, -1,-1 } }; CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Accounting-Request", &cmd); PARSE_loc_rules( rules, cmd ); } /* Accounting-Answer */ { /* Add additional rules of the ABNF (compared to Base definition): ::= < Diameter Header: 271, PXY > < Session-Id > { Result-Code } { Origin-Host } { Origin-Realm } { Accounting-Record-Type } { Accounting-Record-Number } [ Acct-Application-Id ] [ Vendor-Specific-Application-Id ] [ User-Name ] [ Accounting-Sub-Session-Id ] [ Acct-Session-Id ] [ Acct-Multi-Session-Id ] [ Event-Timestamp ] [ Error-Message ] [ Error-Reporting-Host ] * [ Failed-AVP ] [ Origin-AAA-Protocol ] [ Origin-State-Id ] [ NAS-Identifier ] [ NAS-IP-Address ] [ NAS-IPv6-Address ] [ NAS-Port ] [ NAS-Port-Id ] [ NAS-Port-Type ] [ Service-Type ] [ Termination-Cause ] [ Accounting-Realtime-Required ] [ Acct-Interim-Interval ] * [ Class ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct local_rules_definition rules[] = { { "Origin-AAA-Protocol", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Identifier", RULE_OPTIONAL, -1, 1 } ,{ "NAS-IP-Address", RULE_OPTIONAL, -1, 1 } ,{ "NAS-IPv6-Address", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Port", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Port-Id", RULE_OPTIONAL, -1, 1 } ,{ "NAS-Port-Type", RULE_OPTIONAL, -1, 1 } ,{ "Service-Type", RULE_OPTIONAL, -1, 1 } ,{ "Termination-Cause", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_search( DICT_COMMAND, CMD_BY_NAME, "Accounting-Answer", &cmd); PARSE_loc_rules( rules, cmd ); } } LOG_D( "Extension 'Dictionary definitions for NASREQ' initialized"); return 0; } EXTENSION_ENTRY("dict_nasreq", dnr_entry); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_rfc5777/000077500000000000000000000000001333553357400233615ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_rfc5777/CMakeLists.txt000066400000000000000000000005371333553357400261260ustar00rootroot00000000000000# The dict_rfc5777 extension PROJECT("Traffic Classification and Quality of Service (QoS) Attributes for Diameter (RFC 5777)" C) # Compile as a module FD_ADD_EXTENSION(dict_rfc5777 dict_rfc5777.c) #### ## INSTALL section ## INSTALL(TARGETS dict_rfc5777 LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-dictionary-RFC5777) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_rfc5777/Makefile.am000066400000000000000000000010631333553357400254150ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in extlib_LTLIBRARIES = dict_rfc5777.la dict_rfc5777_la_SOURCES = \ dict_rfc5777.c dict_rfc5777_la_DEPENDENCIES = \ $(top_srcdir)/libfdcore/libfdcore.la \ $(top_srcdir)/libfdproto/libfdproto.la dict_rfc5777_la_LIBADD = \ $(top_srcdir)/libfdcore/libfdcore.la \ $(top_srcdir)/libfdproto/libfdproto.la AM_LDFLAGS = \ -module -avoid-version -shared AM_CPPFLAGS = \ -I$(top_srcdir)/include AM_CFLAGS = \ -Wall -Werror MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_rfc5777/dict_rfc5777.c000066400000000000000000002110301333553357400256310ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Francois Bard * * * * Copyright (c) 2010, Teraoka Laboratory, Keio University * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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 following table complete the one in RFC 5777. The AVPs are implemented in the order of the table. We try to keep the structure of the grouped AVP by declaring the contained AVPs just before the grouped AVP they depend on. The number of '+' indicates the depth of the contained AVP. DEPTH NAME AVP RFC TYPE NOTES ++ Vendor-Id 266 3588 Unsigned32 ++ QoS-Profile-Id 573 5777 Unsigned32 + QoS-Profile-Template 574 5777 Grouped QoS-Capability 578 5777 Grouped +++ QoS-Parameters 576 5777 Grouped no specific AVPs? see RFC 5624 +++ QoS-Profile-Template -------------------------------- +++ Treatment-Action 572 5777 Enumerated Type is Enumerated. See Errata 2334 for RFC5777 ++ Excess-Treatment 577 5777 Grouped ++ QoS-Parameters -------------------------------- ++ QoS-Profile-Template -------------------------------- ++ QoS-Semantics 575 5777 Enumerated ++ Treatment-Action -------------------------------- +++ Timezone-Offset 571 5777 Integer32 +++ Timezone-Flag 570 5777 Enumerated +++ Absolute-End-Fractional-Seconds 569 5777 Unsigned32 +++ Absolute-End-Time 568 5777 Time +++ Absolute-Start-Fractional-Seconds 567 5777 Unsigned32 +++ Absolute-Start-Time 566 5777 Time +++ Month-Of-Year-Mask 565 5777 Unsigned32 +++ Day-Of-Month-Mask 564 5777 Unsigned32 +++ Day-Of-Week-Mask 563 5777 Unsigned32 +++ Time-Of-Day-End 562 5777 Unsigned32 +++ Time-Of-Day-Start 561 5777 Unsigned32 ++ Time-Of-Day-Condition 560 5777 Grouped Some AVPs were omitted. See Errata 2333 for RFC5777 +++++ High-User-Priority 559 5777 Unsigned32 +++++ Low-User-Priority 558 5777 Unsigned32 ++++ User-Priority-Range 557 5777 Grouped +++++ S-VID-Start 553 5777 Unsigned32 +++++ S-VID-End 554 5777 Unsigned32 +++++ C-VID-Start 555 5777 Unsigned32 +++++ C-VID-End 556 5777 Unsigned32 ++++ VLAN-ID-Range 552 5777 Grouped +++++ ETH-SAP 551 5777 OctetString +++++ ETH-Ether-Type 550 5777 OctetString ++++ ETH-Proto-Type 549 5777 Grouped +++ ETH-Option 548 5777 Grouped ++++ Negated 517 5777 Enumerated ++++ ICMP-Code 547 5777 Integer32 Changed from Enumerated for implementation reason. See AVP for details. ++++ ICMP-Type-Number 546 5777 Enumerated +++ ICMP-Type 545 5777 Grouped ++++ Negated -------------------------------- ++++ TCP-Flag-Type 544 5777 Unsigned32 +++ TCP-Flags 543 5777 Grouped ++++ TCP-Option-Type 541 5777 Enumerated ++++ TCP-Option-Value 542 5777 OctetString ++++ Negated -------------------------------- +++ TCP-Option 540 5777 Grouped ++++ IP-Option-Type 538 5777 Enumerated ++++ IP-Option-Value 539 5777 OctetString ++++ Negated -------------------------------- +++ IP-Option 537 5777 Grouped +++ Fragmentation-Flag 536 5777 Enumerated +++ Diffserv-Code-Point 535 5777 Enumerated ++++ IP-Address 518 5777 Address +++++ IP-Address-Start 520 5777 Address +++++ IP-Address-End 521 5777 Address ++++ IP-Address-Range 519 5777 Grouped +++++ IP-Address -------------------------------- +++++ IP-Mask-Bit-Mask-Width 523 5777 Unsigned32 Name is IP-Mask-Bit-Mask-Width. See Errata 2335 for RFC5777 ++++ IP-Address-Mask 522 5777 Grouped ++++ MAC-Address 524 5777 OctetString +++++ MAC-Address -------------------------------- +++++ MAC-Address-Mask-Pattern 526 5777 OctetString ++++ MAC-Address-Mask 525 5777 Grouped ++++ EUI64-Address 527 5777 OctetString +++++ EUI64-Address -------------------------------- +++++ EUI64-Address-Mask-Pattern 529 5777 OctetString ++++ EUI64-Address-Mask 528 5777 Grouped ++++ Port 530 5777 Integer32 +++++ Port-Start 532 5777 Integer32 +++++ Port-End 533 5777 Integer32 ++++ Port-Range 531 5777 Grouped ++++ Negated -------------------------------- ++++ Use-Assigned-Address 534 5777 Enumerated +++ From-Spec 515 5777 Grouped ++++ ------------------------------------------------------------------------ ++++ -----------------same dependencies as From-Spec------------------------- ++++ ------------------------------------------------------------------------ +++ To-Spec 516 5777 Grouped +++ Direction 514 5777 Enumerated +++ Protocol 513 5777 Enumerated +++ Classifier-ID 512 5777 OctetString ++ Classifier 511 5777 Grouped ++ Filter-Rule-Precedence 510 5777 Unsigned32 + Filter-Rule 509 5777 Grouped careful if we have to change vendor specifics or such. QoS-Resources 508 5777 Grouped */ /**************************************************************************************************************************************** * * * This table contains the Enumerated AVPs whose values are managed by the IANA. * * * * Note : The ICMP-Code AVP (AVP Code 547) has been changed to type Integer32. See AVP for details * * * * AVP NAME LAST UPDATED LAST CHECKED SOURCE * * 546 ICMP-Type-Number 2010-04-22 2010-07-02 http://www.iana.org/assignments/icmp-parameters * * 541 TCP-Option-Type 2010-06-22 2010-07-02 http://www.iana.org/assignments/tcp-parameters/tcp-parameters.txt * * 538 IP-Option-Type 2007-02-15 2010-07-02 http://www.iana.org/assignments/ip-parameters * * 535 Diffserv-Code-Point 2010-05-11 2010-07-02 http://www.iana.org/assignments/dscp-registry/dscp-registry.txt * * 513 Protocol 2004-01-26 2010-07-02 http://www.iana.org/assignments/ips-protocols * * * ****************************************************************************************************************************************/ /* NOTES Sections 10.2 and 10.3 of the RFC5777 have been ignored */ #include /* The content of this file follows the same structure as dict_base_proto.c */ #define CHECK_dict_new( _type, _data, _parent, _ref ) \ CHECK_FCT( fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref)) ); #define CHECK_dict_search( _type, _criteria, _what, _result ) \ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); struct local_rules_definition { char *avp_name; enum rule_position position; int min; int max; }; #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) #define PARSE_loc_rules( _rulearray, _parent) { \ int __ar; \ for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ struct dict_rule_data __data = { NULL, \ (_rulearray)[__ar].position, \ 0, \ (_rulearray)[__ar].min, \ (_rulearray)[__ar].max}; \ __data.rule_order = RULE_ORDER(__data.rule_position); \ CHECK_FCT( fd_dict_search( \ fd_g_config->cnf_dict, \ DICT_AVP, \ AVP_BY_NAME, \ (_rulearray)[__ar].avp_name, \ &__data.rule_avp, 0 ) ); \ if ( !__data.rule_avp ) { \ TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_name ); \ return ENOENT; \ } \ CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL), \ { \ TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \ (_rulearray)[__ar].avp_name ); \ return EINVAL; \ } ); \ } \ } #define enumval_def_u32( _val_, _str_ ) \ { _str_, { .u32 = _val_ }} #define enumval_def_os( _len_, _val_, _str_ ) \ { _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}} /* Defines if there are any */ // No result-Code or values to define in RFC5777, we proceed /* Dictionary */ int dict_rfc5777_init(char * conffile) { struct dict_object * rfc5777; { struct dict_application_data data = { 5777, "Traffic Classification and Quality of Service (QoS) Attributes for Diameter (RFC 5777)" }; CHECK_dict_new( DICT_APPLICATION, &data , NULL, &rfc5777); } /* AVP section */ { /* Loading the derived data formats */ struct dict_object * Address_type; struct dict_object * Time_type; CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Address", &Address_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Time", &Time_type); /* Vendor_Id - RFC 3588 */ /* Implemented in the base protocol */ /* QoS-Profile-Id - RFC 5777 */ { /* */ struct dict_avp_data data = { 573, /* Code */ 0, /* Vendor */ "QoS-Profile-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* QoS-Profile-Template - RFC 5777 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 574, /* Code */ 0, /* Vendor */ "QoS-Profile-Template", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Vendor-Id", RULE_REQUIRED, -1, 1 } ,{ "QoS-Profile-Id", RULE_REQUIRED, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* QoS-Capability - RFC 5777 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 578, /* Code */ 0, /* Vendor */ "QoS-Capability", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "QoS-Profile-Template", RULE_REQUIRED, -1, -1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* QoS-Parameters - RFC 5777 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 576, /* Code */ 0, /* Vendor */ "QoS-Parameters", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { //empty?? }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* QoS-Profile-Template - RFC 5777 */ /* Implemented higher */ /* Treatment-Action - RFC 5777 */ { /* */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Treatment-Action)" , NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "drop", { .i32 = 0 }}; struct dict_enumval_data t_1 = { "shape", { .i32 = 1 }}; struct dict_enumval_data t_2 = { "mark", { .i32 = 2 }}; struct dict_enumval_data t_3 = { "permit", { .i32 = 3 }}; struct dict_avp_data data = { 572, /* Code */ 0, /* Vendor */ "Treatment-Action", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Excess-Treatment - RFC 5777 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 577, /* Code */ 0, /* Vendor */ "Excess-Treatment", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Treatment-Action", RULE_REQUIRED, -1, 1 } ,{ "QoS-Profile-Template", RULE_OPTIONAL, -1, 1 } ,{ "QoS-Parameters", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* QoS-Parameters - RFC 5777 */ /* Implemented higher */ /* QoS-Profile-Template - RFC 5777 */ /* Implemented higher */ /* QoS-Semantics - RFC 5777 */ { /* */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(QoS-Semantics)" , NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "QoS-Desired", { .i32 = 0 }}; struct dict_enumval_data t_1 = { "QoS-Available", { .i32 = 1 }}; struct dict_enumval_data t_2 = { "QoS-Delivered", { .i32 = 2 }}; struct dict_enumval_data t_3 = { "Minimum-QoS", { .i32 = 3 }}; struct dict_enumval_data t_4 = { "QoS-Authorized", { .i32 = 4 }}; struct dict_avp_data data = { 575, /* Code */ 0, /* Vendor */ "QoS-Semantics", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_4 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Treatment-Action - RFC 5777 */ /* Implemented higher */ /* Timezone-Offset - RFC 5777 */ { /* */ struct dict_avp_data data = { 571, /* Code */ 0, /* Vendor */ "Timezone-Offset", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Timezone-Flag - RFC 5777 */ { /* */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Timezone-Flag)" , NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "UTC", { .i32 = 0 }}; struct dict_enumval_data t_1 = { "LOCAL", { .i32 = 1 }}; struct dict_enumval_data t_2 = { "OFFSET", { .i32 = 2 }}; struct dict_avp_data data = { 570, /* Code */ 0, /* Vendor */ "Timezone-Flag", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Absolute-End-Fractional-Seconds - RFC 5777 */ { /* */ struct dict_avp_data data = { 569, /* Code */ 0, /* Vendor */ "Absolute-End-Fractional-Seconds", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Absolute-End-Time - RFC 5777 */ { /* */ struct dict_avp_data data = { 568, /* Code */ 0, /* Vendor */ "Absolute-End-Time", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Time_type, NULL); } /* Absolute-Start-Fractional-Seconds - RFC 5777 */ { /* */ struct dict_avp_data data = { 567, /* Code */ 0, /* Vendor */ "Absolute-Start-Fractional-Seconds", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Absolute-Start-Time - RFC 5777 */ { /* */ struct dict_avp_data data = { 566, /* Code */ 0, /* Vendor */ "Absolute-Start-Time", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Time_type, NULL); } /* Month-Of-Year-Mask - RFC 5777 */ { /* */ struct dict_avp_data data = { 565, /* Code */ 0, /* Vendor */ "Month-Of-Year-Mask", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Day-Of-Month-Mask - RFC 5777 */ { /* */ struct dict_avp_data data = { 564, /* Code */ 0, /* Vendor */ "Day-Of-Month-Mask", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Day-Of-Week-Mask - RFC 5777 */ { /* */ struct dict_avp_data data = { 563, /* Code */ 0, /* Vendor */ "Day-Of-Week-Mask", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Time-Of-Day-End - RFC 5777 */ { /* */ struct dict_avp_data data = { 562, /* Code */ 0, /* Vendor */ "Time-Of-Day-End", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Time-Of-Day-Start - RFC 5777 */ { /* */ struct dict_avp_data data = { 561, /* Code */ 0, /* Vendor */ "Time-Of-Day-Start", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Time-Of-Day-Condition - RFC 5777 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 560, /* Code */ 0, /* Vendor */ "Time-Of-Day-Condition", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Time-Of-Day-Start", RULE_OPTIONAL, -1, 1 } ,{ "Time-Of-Day-End", RULE_OPTIONAL, -1, 1 } ,{ "Day-Of-Week-Mask", RULE_OPTIONAL, -1, 1 } ,{ "Day-Of-Month-Mask", RULE_OPTIONAL, -1, 1 } ,{ "Month-Of-Year-Mask", RULE_OPTIONAL, -1, 1 } ,{ "Absolute-Start-Time", RULE_OPTIONAL, -1, 1 } ,{ "Absolute-End-Time", RULE_OPTIONAL, -1, 1 } ,{ "Timezone-Flag", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* High-User-Priority - RFC 5777*/ { /* */ struct dict_avp_data data = { 559, /* Code */ 0, /* Vendor */ "High-User-Priority", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Low-User-Priority - RFC 5777 */ { /* */ struct dict_avp_data data = { 558, /* Code */ 0, /* Vendor */ "Low-User-Priority", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* User-Priority-Range - RFC 5777 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 557, /* Code */ 0, /* Vendor */ "User-Priority-Range", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Low-User-Priority", RULE_OPTIONAL, -1, -1 } ,{ "High-User-Priority", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* S-VID-Start - RFC 5777 */ { /* */ struct dict_avp_data data = { 553, /* Code */ 0, /* Vendor */ "S-VID-Start", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* S-VID-End - RFC 5777 */ { /* */ struct dict_avp_data data = { 554, /* Code */ 0, /* Vendor */ "S-VID-End", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* C-VID-Start - RFC 5777 */ { /* */ struct dict_avp_data data = { 555, /* Code */ 0, /* Vendor */ "C-VID-Start", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* C-VID-End - RFC 5777 */ { /* */ struct dict_avp_data data = { 556, /* Code */ 0, /* Vendor */ "C-VID-End", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* VLAN-ID-Range - RFC 5777 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 552, /* Code */ 0, /* Vendor */ "VLAN-ID-Range", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "S-VID-Start", RULE_OPTIONAL, -1, 1 } ,{ "S-VID-End", RULE_OPTIONAL, -1, 1 } ,{ "C-VID-Start", RULE_OPTIONAL, -1, 1 } ,{ "C-VID-End", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* ETH-SAP - RFC 5777 */ { /* */ struct dict_avp_data data = { 551, /* Code */ 0, /* Vendor */ "ETH-SAP", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* ETH-Ether-Type - RFC 5777 */ { /* */ struct dict_avp_data data = { 550, /* Code */ 0, /* Vendor */ "ETH-Ether-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* ETH-Proto-Type - RFC 5777 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 549, /* Code */ 0, /* Vendor */ "ETH-Proto-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "ETH-Ether-Type", RULE_OPTIONAL, -1, -1 } ,{ "ETH-SAP", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* ETH-Option - RFC 5777 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 548, /* Code */ 0, /* Vendor */ "ETH-Option", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "ETH-Proto-Type", RULE_REQUIRED, -1, 1 } ,{ "VLAN-ID-Range", RULE_OPTIONAL, -1, -1 } ,{ "User-Priority-Range", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* Negated - RFC 5777 */ { /* */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Negated)" , NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "False", { .i32 = 0 }}; struct dict_enumval_data t_1 = { "True", { .i32 = 1 }}; struct dict_avp_data data = { 517, /* Code */ 0, /* Vendor */ "Negated", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* ICMP-Code - RFC 5777 */ { /* Here is what the RFC 5777 says : The ICMP-Code AVP (AVP Code 547) is of type Enumerated and the values are managed by IANA under the ICMP Type Numbers registry as defined in [RFC2780]. The problem is (please refer to http://www.iana.org/assignments/icmp-parameters ) : Many of the ICMP types (AVP 456, see next AVP) have a "code" field (defined in this AVP). It means that the enum values defined in the current ICMP-Code AVP are not constants. We take the liberty of changing the Type of this AVP. NEW TYPE : Integer32 */ struct dict_avp_data data = { 547, /* Code */ 0, /* Vendor */ "ICMP-Code", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* ICMP-Type-Number - RFC 5777 */ { /* The ICMP-Type-Number AVP (AVP Code 546) is of type Enumerated and the values are managed by IANA under the ICMP Type Numbers registry as defined in [RFC2780]. The RFC2780 then redirect us to the IANA. The Values have been copied from the following page : http://www.iana.org/assignments/icmp-parameters Last updated : 2010-04-22 */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(ICMP-Type-Number)" , NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "Echo Reply", { .i32 = 0 }}; struct dict_enumval_data t_3 = { "Destination Unreachable", { .i32 = 3 }}; struct dict_enumval_data t_4 = { "Source Quench", { .i32 = 4 }}; struct dict_enumval_data t_5 = { "Redirect", { .i32 = 5 }}; struct dict_enumval_data t_6 = { "Alternate Host Address", { .i32 = 6 }}; struct dict_enumval_data t_8 = { "Echo", { .i32 = 8 }}; struct dict_enumval_data t_9 = { "Router Advertisement", { .i32 = 9 }}; struct dict_enumval_data t_10 = { "Router Solicitation", { .i32 = 10 }}; struct dict_enumval_data t_11 = { "Time Exceeded", { .i32 = 11 }}; struct dict_enumval_data t_12 = { "Parameter Problem", { .i32 = 12 }}; struct dict_enumval_data t_13 = { "Timestamp", { .i32 = 13 }}; struct dict_enumval_data t_14 = { "Timestamp Reply", { .i32 = 14 }}; struct dict_enumval_data t_15 = { "Information Request", { .i32 = 15 }}; struct dict_enumval_data t_16 = { "Information Reply", { .i32 = 16 }}; struct dict_enumval_data t_17 = { "Address Mask Request", { .i32 = 17 }}; struct dict_enumval_data t_18 = { "Address Mask Reply", { .i32 = 18 }}; struct dict_enumval_data t_30 = { "Traceroute", { .i32 = 30 }}; struct dict_enumval_data t_31 = { "Datagram Conversion Error", { .i32 = 31 }}; struct dict_enumval_data t_32 = { "Mobile Host Redirect", { .i32 = 32 }}; struct dict_enumval_data t_33 = { "IPv6 Where-Are-You", { .i32 = 33 }}; struct dict_enumval_data t_34 = { "IPv6 I-Am-Here", { .i32 = 34 }}; struct dict_enumval_data t_35 = { "Mobile Registration Request", { .i32 = 35 }}; struct dict_enumval_data t_36 = { "Mobile Registration Reply ", { .i32 = 36 }}; struct dict_enumval_data t_37 = { "Domain Name Request", { .i32 = 37 }}; struct dict_enumval_data t_38 = { "Domain Name Reply", { .i32 = 38 }}; struct dict_enumval_data t_39 = { "SKIP", { .i32 = 39 }}; struct dict_enumval_data t_40 = { "Photuris", { .i32 = 40 }}; struct dict_enumval_data t_41 = { "ICMP messages utilized by experimental mobility protocols such as Seamoby",{ .i32 = 41 }}; struct dict_avp_data data = { 546, /* Code */ 0, /* Vendor */ "ICMP-Type-Number", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_4 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_5 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_6 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_8 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_9 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_10 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_11 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_12 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_13 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_14 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_15 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_16 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_17 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_18 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_30 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_31 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_32 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_33 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_34 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_35 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_36 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_37 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_38 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_39 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_40 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_41 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* ICMP-Type - RFC 5777 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 545, /* Code */ 0, /* Vendor */ "ICMP-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "ICMP-Type-Number", RULE_REQUIRED, -1, 1 } ,{ "ICMP-Code", RULE_OPTIONAL, -1, -1 } ,{ "Negated", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* Negated - RFC 5777 */ /* Implemented higher */ /* TCP-Flag-Type - RFC 5777 */ { /* */ struct dict_avp_data data = { 544, /* Code */ 0, /* Vendor */ "TCP-Flag-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* TCP-Flags - RFC 5777 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 543, /* Code */ 0, /* Vendor */ "TCP-Flags", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "TCP-Flag-Type", RULE_REQUIRED, -1, 1 } ,{ "Negated", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* TCP-Option-Type - RFC 5777 */ { /* The TCP-Option-Type AVP (AVP Code 541) is of type Enumerated and the values are managed by IANA under the TCP Option Numbers registry as defined in [RFC2780]. The RFC2780 then redirect us to the IANA. The Values have been copied from the following page : http://www.iana.org/assignments/tcp-parameters/tcp-parameters.txt Last updated : 2010-06-22 */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(TCP-Option-Type)" , NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "End of Option List", { .i32 = 0 }}; struct dict_enumval_data t_1 = { "No-Operation", { .i32 = 1 }}; struct dict_enumval_data t_2 = { "Maximum Segment Size", { .i32 = 2 }}; struct dict_enumval_data t_3 = { "WSOPT - Window Scale", { .i32 = 3 }}; struct dict_enumval_data t_4 = { "SACK Permitted", { .i32 = 4 }}; struct dict_enumval_data t_5 = { "SACK", { .i32 = 5 }}; struct dict_enumval_data t_6 = { "Echo", { .i32 = 6 }}; struct dict_enumval_data t_7 = { "Echo Reply", { .i32 = 7 }}; struct dict_enumval_data t_8 = { "TSOPT - Time Stamp Option", { .i32 = 8 }}; struct dict_enumval_data t_9 = { "Partial Order Connection Permitted", { .i32 = 9 }}; struct dict_enumval_data t_10 = { "Partial Order Service Profile", { .i32 = 10 }}; struct dict_enumval_data t_11 = { "CC", { .i32 = 11 }}; struct dict_enumval_data t_12 = { "CC.NEW", { .i32 = 12 }}; struct dict_enumval_data t_13 = { "CC.ECHO", { .i32 = 13 }}; struct dict_enumval_data t_14 = { "TCP Alternate Checksum Request", { .i32 = 14 }}; struct dict_enumval_data t_15 = { "TCP Alternate Checksum Data", { .i32 = 15 }}; struct dict_enumval_data t_16 = { "Skeeter", { .i32 = 16 }}; struct dict_enumval_data t_17 = { "Bubba", { .i32 = 17 }}; struct dict_enumval_data t_18 = { "Trailer Checksum Option", { .i32 = 18 }}; struct dict_enumval_data t_19 = { "MD5 Signature Option", { .i32 = 19 }}; struct dict_enumval_data t_20 = { "SCPS Capabilities", { .i32 = 20 }}; struct dict_enumval_data t_21 = { "Selective Negative Acknowledgements",{ .i32 = 21 }}; struct dict_enumval_data t_22 = { "Record Boundaries", { .i32 = 22 }}; struct dict_enumval_data t_23 = { "Corruption experienced", { .i32 = 23 }}; struct dict_enumval_data t_24 = { "SNAP", { .i32 = 24 }}; struct dict_enumval_data t_26 = { "TCP Compression Filter", { .i32 = 26 }}; struct dict_enumval_data t_27 = { "Quick-Start Response", { .i32 = 27 }}; struct dict_enumval_data t_28 = { "User Timeout Option", { .i32 = 28 }}; struct dict_enumval_data t_29 = { "TCP Authentication Option (TCP-AO)", { .i32 = 29 }}; struct dict_avp_data data = { 541, /* Code */ 0, /* Vendor */ "TCP-Option-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_4 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_5 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_6 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_7 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_8 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_9 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_10 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_11 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_12 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_13 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_14 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_15 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_16 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_17 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_18 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_19 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_20 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_21 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_22 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_23 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_24 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_26 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_27 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_28 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_29 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* TCP-Option-Value - RFC 5777 */ { /* */ struct dict_avp_data data = { 542, /* Code */ 0, /* Vendor */ "TCP-Option-Value", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Negated - RFC 5777 */ /* Implemented higher */ /* TCP-Option - RFC 5777 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 540, /* Code */ 0, /* Vendor */ "TCP-Option", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "TCP-Option-Type", RULE_REQUIRED, -1, 1 } ,{ "TCP-Option-Value", RULE_OPTIONAL, -1, -1 } ,{ "Negated", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* IP-Option-Type - RFC 5777 */ { /* The IP-Option-Type AVP (AVP Code 538) is of type Enumerated and the values are managed by IANA under the IP Option Numbers registry as defined in [RFC2780]. The RFC2780 then redirect us to the IANA. The Values have been copied from the following page : http://www.iana.org/assignments/ip-parameters Last updated : 2007-02-15 */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(IP-Option-Type)" , NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "End of Options List [RFC791,JBP]", { .i32 = 0 }}; struct dict_enumval_data t_1 = { "No Operation [RFC791,JBP]", { .i32 = 1 }}; struct dict_enumval_data t_2 = { "Security [RFC1108]", { .i32 = 2 }}; struct dict_enumval_data t_3 = { "Loose Source Route [RFC791,JBP]", { .i32 = 3 }}; struct dict_enumval_data t_4 = { "Time Stamp [RFC791,JBP]", { .i32 = 4 }}; struct dict_enumval_data t_5 = { "Extended Security [RFC1108]", { .i32 = 5 }}; struct dict_enumval_data t_6 = { "Commercial Security [???]", { .i32 = 6 }}; struct dict_enumval_data t_7 = { "Record Route [RFC791,JBP]", { .i32 = 7 }}; struct dict_enumval_data t_8 = { "Stream ID [RFC791,JBP]", { .i32 = 8 }}; struct dict_enumval_data t_9 = { "Strict Source Route [RFC791,JBP]", { .i32 = 9 }}; struct dict_enumval_data t_10 = { "Experimental Measurement [ZSu]", { .i32 = 10 }}; struct dict_enumval_data t_11 = { "MTU Probe [RFC1191]*", { .i32 = 11 }}; struct dict_enumval_data t_12 = { "MTU Reply [RFC1191]*", { .i32 = 12 }}; struct dict_enumval_data t_13 = { "Experimental Flow Control [Finn]", { .i32 = 13 }}; struct dict_enumval_data t_14 = { "Expermental Access Control [Estrin]", { .i32 = 14 }}; struct dict_enumval_data t_15 = { "??? [VerSteeg]", { .i32 = 15 }}; struct dict_enumval_data t_16 = { "IMI Traffic Descriptor [Lee]", { .i32 = 16 }}; struct dict_enumval_data t_17 = { "Extended Internet Protocol[RFC1385]", { .i32 = 17 }}; struct dict_enumval_data t_18 = { "Traceroute [RFC1393]", { .i32 = 18 }}; struct dict_enumval_data t_19 = { "Address Extension [Ullmann IPv7]", { .i32 = 19 }}; struct dict_enumval_data t_20 = { "Router Alert [RFC2113]", { .i32 = 20 }}; struct dict_enumval_data t_21 = { "Selective Directed Broadcast[Graff]", { .i32 = 21 }}; struct dict_enumval_data t_23 = { "Dynamic Packet State [Malis]", { .i32 = 23 }}; struct dict_enumval_data t_24 = { "Upstream Multicast Pkt. [Farinacci]", { .i32 = 24 }}; struct dict_enumval_data t_25 = { "Quick-Start [RFC4782]", { .i32 = 25 }}; struct dict_avp_data data = { 538, /* Code */ 0, /* Vendor */ "IP-Option-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_4 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_5 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_6 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_7 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_8 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_9 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_10 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_11 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_12 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_13 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_14 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_15 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_16 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_17 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_18 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_19 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_20 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_21 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_23 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_24 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_25 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* IP-Option-Value - RFC 5777 */ { /* */ struct dict_avp_data data = { 539, /* Code */ 0, /* Vendor */ "IP-Option-Value", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Negated - RFC 5777 */ /* Implemented higher */ /* IP-Option - RFC 5777 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 537, /* Code */ 0, /* Vendor */ "IP-Option", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "IP-Option-Type", RULE_REQUIRED, -1, 1 } ,{ "IP-Option-Value", RULE_OPTIONAL, -1, -1 } ,{ "Negated", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* Fragmentation-Flag - RFC 5777 */ { /* */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Fragmentation-Flag)" , NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "DF", { .i32 = 0 }}; struct dict_enumval_data t_1 = { "MF", { .i32 = 1 }}; struct dict_avp_data data = { 536, /* Code */ 0, /* Vendor */ "Fragmentation-Flag", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Diffserv-Code-Point - RFC 5777 */ { /* The Diffserv-Code-Point AVP (AVP Code 535) is of type Enumerated and specifies the Differentiated Services Field Codepoints to match in the IP header. The values are managed by IANA under the Differentiated Services Field Codepoints registry as defined in [RFC2474]. The RFC2474 then redirect us to the IANA. The Values have been copied from the following page : http://www.iana.org/assignments/dscp-registry/dscp-registry.txt Last updated in code : 2010-05-11 */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Diffserv-Code-Point)" , NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "CS0", { .i32 = 0 }}; struct dict_enumval_data t_8 = { "CS1", { .i32 = 8 }}; struct dict_enumval_data t_16 = { "CS2", { .i32 = 16 }}; struct dict_enumval_data t_24 = { "CS3", { .i32 = 24 }}; struct dict_enumval_data t_32 = { "CS4", { .i32 = 32 }}; struct dict_enumval_data t_40 = { "CS5", { .i32 = 40 }}; struct dict_enumval_data t_48 = { "CS6", { .i32 = 48 }}; struct dict_enumval_data t_56 = { "CS7", { .i32 = 56 }}; struct dict_enumval_data t_10 = { "AF11", { .i32 = 10 }}; struct dict_enumval_data t_12 = { "AF12", { .i32 = 12 }}; struct dict_enumval_data t_14 = { "AF13", { .i32 = 14 }}; struct dict_enumval_data t_18 = { "AF21", { .i32 = 18 }}; struct dict_enumval_data t_20 = { "AF22", { .i32 = 20 }}; struct dict_enumval_data t_22 = { "AF23", { .i32 = 22 }}; struct dict_enumval_data t_26 = { "AF31", { .i32 = 26 }}; struct dict_enumval_data t_28 = { "AF32", { .i32 = 28 }}; struct dict_enumval_data t_30 = { "AF33", { .i32 = 30 }}; struct dict_enumval_data t_34 = { "AF41", { .i32 = 34 }}; struct dict_enumval_data t_36 = { "AF42", { .i32 = 36 }}; struct dict_enumval_data t_38 = { "AF43", { .i32 = 38 }}; struct dict_enumval_data t_46 = { "EF PHB", { .i32 = 46 }}; struct dict_enumval_data t_44 = { "VOICE-ADMIT", { .i32 = 44 }}; struct dict_avp_data data = { 535, /* Code */ 0, /* Vendor */ "Diffserv-Code-Point", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_8 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_16 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_24 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_32 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_40 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_48 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_56 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_10 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_12 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_14 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_18 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_20 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_22 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_26 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_28 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_30 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_34 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_36 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_38 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_46 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_44 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* IP-Address - RFC 5777 */ { /* */ struct dict_avp_data data = { 518, /* Code */ 0, /* Vendor */ "IP-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); } /* IP-Address-Start - RFC 5777 */ { /* */ struct dict_avp_data data = { 520, /* Code */ 0, /* Vendor */ "IP-Address-Start", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); } /* IP-Address-End - RFC 5777 */ { /* */ struct dict_avp_data data = { 521, /* Code */ 0, /* Vendor */ "IP-Address-End", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); } /* IP-Address-Range - RFC 5777 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 519, /* Code */ 0, /* Vendor */ "IP-Address-Range", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "IP-Address-Start", RULE_OPTIONAL, -1, 1 } ,{ "IP-Address-End", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* IP-Address - RFC 5777 */ /* Implemented higher */ /* IP-Mask-Bit-Mask-Width - RFC 5777 */ { /* */ struct dict_avp_data data = { 523, /* Code */ 0, /* Vendor */ "IP-Mask-Bit-Mask-Width", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* IP-Address-Mask - RFC 5777 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 522, /* Code */ 0, /* Vendor */ "IP-Address-Mask", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "IP-Address", RULE_REQUIRED, -1, 1 } ,{ "IP-Mask-Bit-Mask-Width", RULE_REQUIRED, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* MAC-Address - RFC 5777 */ { /* */ struct dict_avp_data data = { 524, /* Code */ 0, /* Vendor */ "MAC-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* MAC-Address - RFC 5777 */ /* Implemented higher */ /* MAC-Address-Mask-Pattern - RFC 5777 */ { /* */ struct dict_avp_data data = { 526, /* Code */ 0, /* Vendor */ "MAC-Address-Mask-Pattern", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* MAC-Address-Mask - RFC 5777 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 525, /* Code */ 0, /* Vendor */ "MAC-Address-Mask", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "MAC-Address", RULE_REQUIRED, -1, 1 } ,{ "MAC-Address-Mask-Pattern", RULE_REQUIRED, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* EUI64-Address - RFC 5777 */ { /* */ struct dict_avp_data data = { 527, /* Code */ 0, /* Vendor */ "EUI64-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* EUI64-Address - RFC 5777 */ /* Implemented higher */ /* EUI64-Address-Mask-Pattern - RFC 5777 */ { /* */ struct dict_avp_data data = { 529, /* Code */ 0, /* Vendor */ "EUI64-Address-Mask-Pattern", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* EUI64-Address-Mask - RFC 5777 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 528, /* Code */ 0, /* Vendor */ "EUI64-Address-Mask", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "EUI64-Address", RULE_REQUIRED, -1, 1 } ,{ "EUI64-Address-Mask-Pattern", RULE_REQUIRED, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* Port - RFC 5777 */ { /* */ struct dict_avp_data data = { 530, /* Code */ 0, /* Vendor */ "Port", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Port-Start - RFC 5777 */ { /* */ struct dict_avp_data data = { 532, /* Code */ 0, /* Vendor */ "Port-Start", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Port-End - RFC 5777 */ { /* */ struct dict_avp_data data = { 533, /* Code */ 0, /* Vendor */ "Port-End", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Port-Range - RFC 5777 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 531, /* Code */ 0, /* Vendor */ "Port-Range", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Port-Start", RULE_OPTIONAL, -1, 1 } ,{ "Port-End", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* Negated - RFC 5777 */ /* Implemented higher */ /* Use-Assigned-Address - RFC 5777 */ { /* */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Use-Assigned-Address)" , NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "False", { .i32 = 0 }}; struct dict_enumval_data t_1 = { "True", { .i32 = 1 }}; struct dict_avp_data data = { 534, /* Code */ 0, /* Vendor */ "Use-Assigned-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* From-Spec - RFC 5777 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 515, /* Code */ 0, /* Vendor */ "From-Spec", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "IP-Address", RULE_OPTIONAL, -1, -1 } ,{ "IP-Address-Range", RULE_OPTIONAL, -1, -1 } ,{ "IP-Address-Mask", RULE_OPTIONAL, -1, -1 } ,{ "MAC-Address", RULE_OPTIONAL, -1, -1 } ,{ "MAC-Address-Mask", RULE_OPTIONAL, -1, -1 } ,{ "EUI64-Address", RULE_OPTIONAL, -1, -1 } ,{ "EUI64-Address-Mask", RULE_OPTIONAL, -1, -1 } ,{ "Port", RULE_OPTIONAL, -1, -1 } ,{ "Port-Range", RULE_OPTIONAL, -1, -1 } ,{ "Negated", RULE_OPTIONAL, -1, 1 } ,{ "Use-Assigned-Address", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* To-Spec - RFC 5777 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 516, /* Code */ 0, /* Vendor */ "To-Spec", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "IP-Address", RULE_OPTIONAL, -1, -1 } ,{ "IP-Address-Range", RULE_OPTIONAL, -1, -1 } ,{ "IP-Address-Mask", RULE_OPTIONAL, -1, -1 } ,{ "MAC-Address", RULE_OPTIONAL, -1, -1 } ,{ "MAC-Address-Mask", RULE_OPTIONAL, -1, -1 } ,{ "EUI64-Address", RULE_OPTIONAL, -1, -1 } ,{ "EUI64-Address-Mask", RULE_OPTIONAL, -1, -1 } ,{ "Port", RULE_OPTIONAL, -1, -1 } ,{ "Port-Range", RULE_OPTIONAL, -1, -1 } ,{ "Negated", RULE_OPTIONAL, -1, 1 } ,{ "Use-Assigned-Address", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* Direction - RFC 5777 */ { /* */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Direction)" , NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "IN", { .i32 = 0 }}; struct dict_enumval_data t_1 = { "OUT", { .i32 = 1 }}; struct dict_enumval_data t_2 = { "BOTH", { .i32 = 2 }}; struct dict_avp_data data = { 514, /* Code */ 0, /* Vendor */ "Direction", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Protocol - RFC 5777 */ { /* The Protocol AVP (AVP Code 513) is of type Enumerated and specifies the protocol being matched. The attributes included in the Classifier AVP MUST be consistent with the value of the Protocol AVP. Exactly zero or one Protocol AVP may be contained within a Classifier AVP. If the Protocol AVP is omitted from the classifier, then comparison of the protocol of the packet is irrelevant. The values for this AVP are managed by IANA under the Protocol Numbers registry as defined in [RFC3643]. The RFC3643 then redirects us to the IANA. The Values have been copied from the following page : http://www.iana.org/assignments/ips-protocols Last updated : 2004-01-26 */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Protocol)" , NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "Reserved", { .i32 = 0 }}; struct dict_enumval_data t_1 = { "FCIP (Fibre Channel Over TCP/IP)", { .i32 = 1 }}; struct dict_enumval_data t_2 = { "iFCP (A Protocol for Internet Fibre Channel)", { .i32 = 2 }}; struct dict_avp_data data = { 513, /* Code */ 0, /* Vendor */ "Protocol", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Classifier-ID - RFC 5777 */ { /* */ struct dict_avp_data data = { 512, /* Code */ 0, /* Vendor */ "Classifier-ID", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Classifier - RFC 5777 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 511, /* Code */ 0, /* Vendor */ "Classifier", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Classifier-ID", RULE_REQUIRED, -1, 1 } ,{ "Protocol", RULE_OPTIONAL, -1, 1 } ,{ "Direction", RULE_OPTIONAL, -1, 1 } ,{ "From-Spec", RULE_OPTIONAL, -1, -1 } ,{ "To-Spec", RULE_OPTIONAL, -1, -1 } ,{ "Diffserv-Code-Point", RULE_OPTIONAL, -1, -1 } ,{ "Fragmentation-Flag", RULE_OPTIONAL, -1, 1 } ,{ "IP-Option", RULE_OPTIONAL, -1, -1 } ,{ "TCP-Option", RULE_OPTIONAL, -1, -1 } ,{ "TCP-Flags", RULE_OPTIONAL, -1, 1 } ,{ "ICMP-Type", RULE_OPTIONAL, -1, -1 } ,{ "ETH-Option", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* Filter-Rule-Precedence - RFC 5777 */ { /* */ struct dict_avp_data data = { 510, /* Code */ 0, /* Vendor */ "Filter-Rule-Precedence", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Filter-Rule - RFC 5777 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 509, /* Code */ 0, /* Vendor */ "Filter-Rule", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Filter-Rule-Precedence", RULE_OPTIONAL, -1, 1 } ,{ "Classifier", RULE_OPTIONAL, -1, 1 } ,{ "Time-Of-Day-Condition", RULE_OPTIONAL, -1, -1 } ,{ "Treatment-Action", RULE_OPTIONAL, -1, 1 } ,{ "QoS-Semantics", RULE_OPTIONAL, -1, 1 } ,{ "QoS-Profile-Template", RULE_OPTIONAL, -1, 1 } ,{ "QoS-Parameters", RULE_OPTIONAL, -1, 1 } ,{ "Excess-Treatment", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* QoS-Resources - RFC 5777 */ { /* */ struct dict_object * avp; struct dict_avp_data data = { 508, /* Code */ 0, /* Vendor */ "QoS-Resources", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Filter-Rule", RULE_REQUIRED, -1, -1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } } LOG_D( "Dictionary Extension 'Traffic Classification and Quality of Service (QoS) Attributes for Diameter (RFC 5777)' initialized"); return 0; } EXTENSION_ENTRY("dict_rfc5777", dict_rfc5777_init); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_s6a/000077500000000000000000000000001333553357400227465ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_s6a/Makefile.am000066400000000000000000000010371333553357400250030ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in extlib_LTLIBRARIES = dict_s6a.la dict_s6a_la_SOURCES = \ dict_s6a.c dict_s6a_la_DEPENDENCIES = \ $(top_srcdir)/libfdcore/libfdcore.la \ $(top_srcdir)/libfdproto/libfdproto.la dict_s6a_la_LIBADD = \ $(top_srcdir)/libfdcore/libfdcore.la \ $(top_srcdir)/libfdproto/libfdproto.la AM_LDFLAGS = \ -module -avoid-version -shared AM_CPPFLAGS = \ -I$(top_srcdir)/include AM_CFLAGS = \ -Wall -Werror MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_s6a/dict_s6a.c000066400000000000000000000733561333553357400246240ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sukchan Lee > * * * * Copyright (c) 2017, NextEPC Group * All rights reserved. * * * * Written under contract by nfotex IT GmbH, http://nfotex.com/ * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * *********************************************************************************************************/ #include /* The content of this file follows the same structure as dict_base_proto.c */ #define CHECK_dict_new( _type, _data, _parent, _ref ) \ CHECK_FCT( fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref)) ); #define CHECK_dict_search( _type, _criteria, _what, _result ) \ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); struct local_rules_definition { struct dict_avp_request avp_vendor_plus_name; enum rule_position position; int min; int max; }; #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) /* Attention! This version of the macro uses AVP_BY_NAME_AND_VENDOR, in contrast to most other copies! */ #define PARSE_loc_rules( _rulearray, _parent) { \ int __ar; \ for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ struct dict_rule_data __data = { NULL, \ (_rulearray)[__ar].position, \ 0, \ (_rulearray)[__ar].min, \ (_rulearray)[__ar].max}; \ __data.rule_order = RULE_ORDER(__data.rule_position); \ CHECK_FCT( fd_dict_search( \ fd_g_config->cnf_dict, \ DICT_AVP, \ AVP_BY_NAME_AND_VENDOR, \ &(_rulearray)[__ar].avp_vendor_plus_name, \ &__data.rule_avp, 0 ) ); \ if ( !__data.rule_avp ) { \ TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_vendor_plus_name.avp_name); \ return ENOENT; \ } \ CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL), \ { \ TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \ (_rulearray)[__ar].avp_vendor_plus_name.avp_name); \ return EINVAL; \ } ); \ } \ } #define enumval_def_u32( _val_, _str_ ) \ { _str_, { .u32 = _val_ }} #define enumval_def_os( _len_, _val_, _str_ ) \ { _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}} int dict_s6a_init(char * conffile) { struct dict_object *s6a; TRACE_ENTRY("%p", conffile); /* Applications section */ { struct dict_object * vendor; CHECK_FCT(fd_dict_search(fd_g_config->cnf_dict, DICT_VENDOR, VENDOR_BY_NAME, "3GPP", &vendor, ENOENT)); struct dict_application_data app_data = { 16777251, "S6A" }; CHECK_FCT(fd_dict_new(fd_g_config->cnf_dict, DICT_APPLICATION, &app_data, vendor, &s6a)); } /* AVP section */ { { /* AIR-Flags AVP - 3GPP TS 29.272 #7.3.201 */ struct dict_avp_data data = { 1679, /* Code */ 10415, /* Vendor */ "AIR-Flags", /* Name */ AVP_FLAG_VENDOR |AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_VENDOR, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new(DICT_AVP, &data, NULL, NULL); } /* Terminal Information AVP - 3GPP TS 29.272 #7.3.3 */ { struct dict_object * avp; struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "IMEI" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP2-MEID" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Software-Version" }, RULE_REQUIRED, -1, 1 }, }; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Terminal-Information", &avp); PARSE_loc_rules( rules, avp ); } /* Requested-EUTRAN-Authentication-Info AVP - 3GPP TS 29.272 #7.3.11 */ { struct dict_object * avp; struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Number-Of-Requested-Vectors" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Immediate-Response-Preferred" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Re-Synchronization-Info" }, RULE_OPTIONAL, -1, 1 }, }; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Requested-EUTRAN-Authentication-Info", &avp); PARSE_loc_rules( rules, avp ); } /* Requested-UTRAN-GERAN-Authentication-Info AVP - 3GPP TS 29.272 #7.3.12 */ { struct dict_object * avp; struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Number-Of-Requested-Vectors" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Immediate-Response-Preferred" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Re-Synchronization-Info" }, RULE_OPTIONAL, -1, 1 }, }; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Requested-UTRAN-GERAN-Authentication-Info", &avp); PARSE_loc_rules( rules, avp ); } /* E-UTRAN-Vector - 3GPP TS 29.272 #7.3.18 */ { struct dict_object * avp; struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Item-Number" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "RAND" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "XRES" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "AUTN" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "KASME" }, RULE_REQUIRED, -1, 1 }, }; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "E-UTRAN-Vector", &avp); PARSE_loc_rules( rules, avp ); } /* UTRAN-Vector - 3GPP TS 29.272 #7.3.19 */ { struct dict_object * avp; struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Item-Number" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "RAND" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "XRES" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "AUTN" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Confidentiality-Key" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Integrity-Key" }, RULE_REQUIRED, -1, 1 }, }; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "UTRAN-Vector", &avp); PARSE_loc_rules( rules, avp ); } /* GERAN-Vector - 3GPP TS 29.272 #7.3.20 */ { struct dict_object * avp; struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Item-Number" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "RAND" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SRES" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Kc" }, RULE_REQUIRED, -1, 1 }, }; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "GERAN-Vector", &avp); PARSE_loc_rules( rules, avp ); } /* Authentication-Info - 3GPP TS 29.272 #7.3.17 */ { struct dict_object * avp; struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "E-UTRAN-Vector" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "UTRAN-Vector" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "GERAN-Vector" }, RULE_OPTIONAL, -1, 1 }, }; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Authentication-Info", &avp); PARSE_loc_rules( rules, avp ); } /* EPS-Subscribed-QoS-Profile AVP - 3GPP TS 29.272 #7.3.37 */ { struct dict_object * avp; struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "QoS-Class-Identifier" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Allocation-Retention-Priority" }, RULE_REQUIRED, -1, 1 }, }; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "EPS-Subscribed-QoS-Profile", &avp); PARSE_loc_rules( rules, avp ); } /* AMBR AVP - 3GPP TS 29.272 #7.3.41 */ { struct dict_object * avp; struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Max-Requested-Bandwidth-UL" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Max-Requested-Bandwidth-DL" }, RULE_REQUIRED, -1, 1 }, }; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "AMBR", &avp); PARSE_loc_rules( rules, avp ); } /* Specific-APN-Info AVP - 3GPP TS 29.272 #7.3.82 */ { struct dict_object * avp; struct local_rules_definition rules[] = { { { .avp_name = "Service-Selection" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "MIP6-Agent-Info" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Visited-Network-Identifier" }, RULE_OPTIONAL, -1, 1 }, }; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Specific-APN-Info", &avp); PARSE_loc_rules( rules, avp ); } /* APN-Configuration AVP - 3GPP TS 29.272 #7.3.35 */ { struct dict_object * avp; struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Context-Identifier" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Served-Party-IP-Address" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "PDN-Type" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Service-Selection" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "EPS-Subscribed-QoS-Profile" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "VPLMN-Dynamic-Address-Allowed" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "MIP6-Agent-Info" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Visited-Network-Identifier" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "PDN-GW-Allocation-Type" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP-Charging-Characteristics" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "AMBR" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Specific-APN-Info" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "APN-OI-Replacement" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SIPTO-Permission" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "LIPA-Permission" }, RULE_OPTIONAL, -1, 1 }, }; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "APN-Configuration", &avp); PARSE_loc_rules( rules, avp ); } /* APN-Configuration-Profile AVP - 3GPP TS 29.272 #7.3.34 */ { struct dict_object * avp; struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Context-Identifier" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "All-APN-Configurations-Included-Indicator" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "APN-Configuration" }, RULE_REQUIRED, -1, -1 }, }; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "APN-Configuration-Profile", &avp); PARSE_loc_rules( rules, avp ); } /* Subscription-Data AVP - 3GPP TS 29.272 #7.3.2 */ { struct dict_object * avp; struct local_rules_definition rules[] = { { { .avp_vendor = 10415, .avp_name = "Subscriber-Status" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "MSISDN" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "STN-SR" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "ICS-Indicator" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Network-Access-Mode" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Operator-Determined-Barring" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "HPLMN-ODB" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Regional-Subscription-Zone-Code" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Access-Restriction-Data" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "APN-OI-Replacement" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "LCS-Info" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Teleservice-List" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Call-Barring-Infor-List" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "3GPP-Charging-Characteristics" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "AMBR" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "APN-Configuration-Profile" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "RAT-Frequency-Selection-Priority-ID" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Trace-Data" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "GPRS-Subscription-Data" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "CSG-Subscription-Data" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Roaming-Restricted-Due-To-Unsupported-Feature" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Subscribed-Periodic-RAU-TAU-Timer" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "MPS-Priority" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "VPLMN-LIPA-Allowed" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Relay-Node-Indicator" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "MDT-User-Consent" }, RULE_OPTIONAL, -1, 1 }, }; CHECK_dict_search(DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Subscription-Data", &avp); PARSE_loc_rules( rules, avp ); } }; /* Command section */ { /* S6A-Update Location Request - 3GPP TS 29.272 #7.2.3 */ { struct dict_object * cmd; struct dict_cmd_data data = { 316, /* Code */ "Update-Location-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { { .avp_name = "Session-Id" }, RULE_FIXED_HEAD, -1, 1 }, { { .avp_name = "Vendor-Specific-Application-Id" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Auth-Session-State" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Host" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Destination-Host" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Destination-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "User-Name" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Supported-Features" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Terminal-Information" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "ULR-Flags" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Visited-PLMN-Id" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Equivalent-PLMN-List" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "RAT-Type" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "SGSN-Number" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Homogeneous-Support-of-IMS-Voice-Over-PS-Sessions" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Active-APN" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "UE-SRVCC-Capability" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Proxy-Info" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Route-Record" }, RULE_OPTIONAL, -1, -1 }, }; CHECK_dict_new(DICT_COMMAND, &data, s6a, &cmd); PARSE_loc_rules(rules, cmd); } /* S6A-Update Location Answer - 3GPP TS 29.272 #7.2.4 */ { struct dict_object * cmd; struct dict_cmd_data data = { 316, /* Code */ "Update-Location-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { { .avp_name = "Session-Id" }, RULE_FIXED_HEAD, -1, 1 }, { { .avp_name = "Vendor-Specific-Application-Id" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Result-Code" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Experimental-Result" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Auth-Session-State" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Host" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Error-Diagnostic" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "ULA-Flags" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Subscription-Data" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Failed-AVP" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Proxy-Info" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Route-Record" }, RULE_OPTIONAL, -1, -1 }, }; CHECK_dict_new(DICT_COMMAND, &data, s6a, &cmd); PARSE_loc_rules(rules, cmd); } /* S6A-Authentication-Information-Request - 3GPP TS 29.272 #7.2.4 */ { struct dict_object * cmd; struct dict_cmd_data data = { 318, /* Code */ "Authentication-Information-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { { .avp_name = "Session-Id" }, RULE_FIXED_HEAD, -1, 1 }, { { .avp_name = "Vendor-Specific-Application-Id" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Auth-Session-State" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Host" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Destination-Host" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Destination-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "User-Name" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Supported-Features" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Requested-EUTRAN-Authentication-Info" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Requested-UTRAN-GERAN-Authentication-Info" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Visited-PLMN-Id" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "AIR-Flags" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Proxy-Info" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Route-Record" }, RULE_OPTIONAL, -1, -1 }, }; CHECK_dict_new(DICT_COMMAND, &data, s6a, &cmd); PARSE_loc_rules(rules, cmd); } /* S6A-Authentication-Information-Answer - 3GPP TS 29.272 #7.2.6 */ { struct dict_object * cmd; struct dict_cmd_data data = { 318, /* Code */ "Authentication-Information-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { { .avp_name = "Session-Id" }, RULE_FIXED_HEAD, -1, 1 }, { { .avp_name = "Vendor-Specific-Application-Id" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Result-Code" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Experimental-Result" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Auth-Session-State" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Host" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Error-Diagnostic" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Supported-Features" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "Authentication-Info" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Failed-AVP" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Proxy-Info" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Route-Record" }, RULE_OPTIONAL, -1, -1 }, }; CHECK_dict_new(DICT_COMMAND, &data, s6a, &cmd); PARSE_loc_rules(rules, cmd); } /* Purge-UE-Request (PUR) Command - 3GPP TS 29.272 #7.2.13 */ { struct dict_object * cmd; struct dict_cmd_data data = { 321, /* Code */ "Purge-UE-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { { .avp_name = "Session-Id" }, RULE_FIXED_HEAD, -1, 1 }, { { .avp_name = "Vendor-Specific-Application-Id" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Auth-Session-State" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Host" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Destination-Host" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Destination-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "User-Name" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Supported-Features" }, RULE_OPTIONAL, -1, -1 }, { { .avp_vendor = 10415, .avp_name = "PUR-Flags" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Proxy-Info" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Route-Record" }, RULE_OPTIONAL, -1, -1 }, }; CHECK_dict_new( DICT_COMMAND, &data, s6a, &cmd); PARSE_loc_rules( rules, cmd ); } /* Purge-UE-Answer (PUA) Command - 3GPP TS 29.272 #7.2.14 */ { struct dict_object * cmd; struct dict_cmd_data data = { 321, /* Code */ "Purge-UE-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { { .avp_name = "Session-Id" }, RULE_FIXED_HEAD, -1, 1 }, { { .avp_name = "Vendor-Specific-Application-Id" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Result-Code" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Experimental-Result" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Auth-Session-State" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Host" }, RULE_REQUIRED, -1, 1 }, { { .avp_name = "Origin-Realm" }, RULE_REQUIRED, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "Error-Diagnostic" }, RULE_OPTIONAL, -1, 1 }, { { .avp_vendor = 10415, .avp_name = "PUA-Flags" }, RULE_OPTIONAL, -1, 1 }, { { .avp_name = "Failed-AVP" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Proxy-Info" }, RULE_OPTIONAL, -1, -1 }, { { .avp_name = "Route-Record" }, RULE_OPTIONAL, -1, -1 }, }; CHECK_dict_new( DICT_COMMAND, &data, s6a, &cmd); PARSE_loc_rules( rules, cmd ); } } LOG_D( "Extension 'Dictionary definitions for DCCA 3GPP S6A' initialized"); return 0; } EXTENSION_ENTRY("dict_s6a", dict_s6a_init, "dict_dcca_3gpp"); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_sip/000077500000000000000000000000001333553357400230505ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_sip/CMakeLists.txt000066400000000000000000000004461333553357400256140ustar00rootroot00000000000000# The dict_sip extension PROJECT("Diameter SIP (RFC4740) dictionary definitions" C) # Compile as a module FD_ADD_EXTENSION(dict_sip dict_sip.c) #### ## INSTALL section ## INSTALL(TARGETS dict_sip LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-dictionary-RFC4740) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/dict_sip/dict_sip.c000066400000000000000000003512261333553357400250230ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ #include /* The content of this file follows the same structure as dict_base_proto.c */ #define CHECK_dict_new( _type, _data, _parent, _ref ) \ CHECK_FCT( fd_dict_new( fd_g_config->cnf_dict, (_type), (_data), (_parent), (_ref)) ); #define CHECK_dict_search( _type, _criteria, _what, _result ) \ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, (_type), (_criteria), (_what), (_result), ENOENT) ); struct local_rules_definition { char *avp_name; enum rule_position position; int min; int max; }; #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) #define PARSE_loc_rules( _rulearray, _parent) { \ int __ar; \ for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ struct dict_rule_data __data = { NULL, \ (_rulearray)[__ar].position, \ 0, \ (_rulearray)[__ar].min, \ (_rulearray)[__ar].max}; \ __data.rule_order = RULE_ORDER(__data.rule_position); \ CHECK_FCT( fd_dict_search( \ fd_g_config->cnf_dict, \ DICT_AVP, \ AVP_BY_NAME, \ (_rulearray)[__ar].avp_name, \ &__data.rule_avp, 0 ) ); \ if ( !__data.rule_avp ) { \ TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_name ); \ return ENOENT; \ } \ CHECK_FCT_DO( fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &__data, _parent, NULL), \ { \ TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \ (_rulearray)[__ar].avp_name ); \ return EINVAL; \ } ); \ } \ } #define enumval_def_u32( _val_, _str_ ) \ { _str_, { .u32 = _val_ }} #define enumval_def_os( _len_, _val_, _str_ ) \ { _str_, { .os = { .data = (unsigned char *)_val_, .len = _len_ }}} int ds_dict_init(char * conffile) { struct dict_object * sip; { struct dict_application_data data = { 6, "Diameter Session Initiation Protocol (SIP) Application" }; CHECK_dict_new( DICT_APPLICATION, &data , NULL, &sip); } /* AVP section */ { struct dict_object * UTF8String_type; struct dict_object * DiameterURI_type; CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterURI", &DiameterURI_type); /* Digest AVPs (from RADIUS) */ /* Digest-Response */ { /* */ struct dict_avp_data data = { 103, /* Code */ 0, /* Vendor */ "Digest-Response", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Digest-Realm */ { /* */ struct dict_avp_data data = { 104, /* Code */ 0, /* Vendor */ "Digest-Realm", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Digest-Nonce */ { /* */ struct dict_avp_data data = { 105, /* Code */ 0, /* Vendor */ "Digest-Nonce", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Digest-Response-Auth */ { /* */ struct dict_avp_data data = { 106, /* Code */ 0, /* Vendor */ "Digest-Response-Auth", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Digest-Nextnonce */ { /* */ struct dict_avp_data data = { 107, /* Code */ 0, /* Vendor */ "Digest-Nextnonce", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Digest-Method */ { /* */ struct dict_avp_data data = { 108, /* Code */ 0, /* Vendor */ "Digest-Method", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Digest-URI */ { /* */ struct dict_avp_data data = { 109, /* Code */ 0, /* Vendor */ "Digest-URI", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Digest-QoP */ { /* */ struct dict_avp_data data = { 110, /* Code */ 0, /* Vendor */ "Digest-QoP", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Digest-Algorithm */ { /* */ struct dict_avp_data data = { 111, /* Code */ 0, /* Vendor */ "Digest-Algorithm", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Digest-Entity-Body-Hash */ { /* */ struct dict_avp_data data = { 112, /* Code */ 0, /* Vendor */ "Digest-Entity-Body-Hash", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Digest-CNonce */ { /* */ struct dict_avp_data data = { 113, /* Code */ 0, /* Vendor */ "Digest-CNonce", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Digest-Nonce-Count */ { /* */ struct dict_avp_data data = { 114, /* Code */ 0, /* Vendor */ "Digest-Nonce-Count", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Digest-Username */ { /* */ struct dict_avp_data data = { 115, /* Code */ 0, /* Vendor */ "Digest-Username", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Digest-Opaque */ { /* */ struct dict_avp_data data = { 116, /* Code */ 0, /* Vendor */ "Digest-Opaque", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Digest-Auth-Param */ { /* */ struct dict_avp_data data = { 117, /* Code */ 0, /* Vendor */ "Digest-Auth-Param", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Digest-AKA-Auts */ { /* */ struct dict_avp_data data = { 118, /* Code */ 0, /* Vendor */ "Digest-AKA-Auts", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Digest-Domain */ { /* */ struct dict_avp_data data = { 119, /* Code */ 0, /* Vendor */ "Digest-Domain", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Digest-Stale */ { /* */ struct dict_avp_data data = { 120, /* Code */ 0, /* Vendor */ "Digest-Stale", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Digest-HA1 */ { /* */ struct dict_avp_data data = { 121, /* Code */ 0, /* Vendor */ "Digest-HA1", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* SIP-AOR */ { /* */ struct dict_avp_data data = { 122, /* Code */ 0, /* Vendor */ "SIP-AOR", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Diameter SIP AVPs*/ /* SIP-Accounting-Server-URI*/ { /* The SIP-Accounting-Server-URI AVP (AVP Code 369) is of type DiameterURI. This AVP contains the address of a Diameter server that is able to receive SIP-session-related accounting information. */ struct dict_avp_data data = { 369, /* Code */ 0, /* Vendor */ "SIP-Accounting-Server-URI", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , DiameterURI_type, NULL); } /* SIP-Credit-Control-Server-URI */ { /* The SIP-Credit-Control-Server-URI AVP (AVP Code 370) is of type DiameterURI. This AVP contains the address of a Diameter server that is able to authorize real-time credit control usage. The Diameter Credit-Control Application [RFC4006] may be used for this purpose. */ struct dict_avp_data data = { 370, /* Code */ 0, /* Vendor */ "SIP-Credit-Control-Server-URI", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , DiameterURI_type, NULL); } /* SIP-Accounting-Information */ { /* The SIP-Accounting-Information (AVP Code 368) is of type Grouped, and contains the Diameter addresses of those nodes that are able to collect accounting information. The SIP-Accounting-Information AVP is defined as follows (per the grouped-avp-def of RFC 3588 [RFC3588]): SIP-Accounting-Information ::= < AVP Header: 368 > * [ SIP-Accounting-Server-URI ] * [ SIP-Credit-Control-Server-URI ] * [ AVP] */ struct dict_object * avp; struct dict_avp_data data = { 368, /* Code */ 0, /* Vendor */ "SIP-Accounting-Information", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "SIP-Accounting-Server-URI", RULE_OPTIONAL, -1, -1 } ,{ "SIP-Credit-Control-Server-URI", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* SIP-Server-URI */ { /* The SIP-Server-URI AVP (AVP Code 371) is of type UTF8String. This AVP contains a SIP or SIPS URI (as defined in RFC 3261 [RFC3261]) that identifies a SIP server. */ struct dict_avp_data data = { 371, /* Code */ 0, /* Vendor */ "SIP-Server-URI", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* SIP-Mandatory-Capability */ { /* The SIP-Mandatory-Capability AVP (AVP Code 373) is of type Unsigned32. The value represents a certain capability (or set of capabilities) that have to be fulfilled by the SIP server allocated to the user. The semantics of the different values are not standardized, as it is a matter of the administrative network to allocate its own semantics within its own network. Each value has to represent a single capability within the administrative network. */ struct dict_avp_data data = { 373, /* Code */ 0, /* Vendor */ "SIP-Mandatory-Capability", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* SIP-Optional-Capability */ { /* The SIP-Optional-Capability AVP (AVP Code 374) is of type Unsigned32. The value represents a certain capability (or set of capabilities) that, optionally, may be fulfilled by the SIP server allocated to the user. The semantics of the different values are not standardized, as it is a matter of the administrative network to allocate its own semantics within its own network. Each value has to represent a single capability within the administrative network. */ struct dict_avp_data data = { 374, /* Code */ 0, /* Vendor */ "SIP-Optional-Capability", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* SIP-Server-Capabilities */ { /* The SIP-Server-Capabilities AVP (AVP Code 372) is of type Grouped. The Diameter indicates in this AVP the requirements for a particular SIP capability, so that the Diameter client (SIP server) is able to select another appropriate SIP server to serve the user. The SIP-Server-Capabilities AVP allows a Diameter client (SIP server) to select another SIP server for triggering or executing services to the user. A user may have enabled some services that require the implementation of certain capabilities in the SIP server that triggers or executes those services. For example, the SIP server that triggers or executes services to this user may need to implement SIP servlets [JSR-000116], Call Processing Language (CPL) [RFC3880], or any other kind of capability. Or perhaps that user belongs to a premium users group that has a certain stringent quality-of-service agreement that requires a fast SIP server. The capabilities required or recommended to a given user are conveyed in the SIP-Server-Capabilities AVP. When it receives them, the Diameter client (SIP server) that does the SIP server selection needs to have the means to find out available SIP servers that meet the required or optional capabilities. Such means are outside the scope of this specification. Note that the SIP-Server-Capabilities AVP assists the Diameter client (SIP server) to produce a subset of all the available SIP servers to be allocated to the user in the Home Realm; this is the subset that conforms the requirements of capabilities on a per-user basis. Typically this subset will be formed of more than a single SIP server, so once the subset of those SIP servers is identified, it is possible that several instances of these SIP servers exist, in which case the Diameter client (SIP server) should choose one particular SIP server to execute and trigger services to this user. It is expected that at this point the SIP server (Diameter client) will follow the procedures of RFC 3263 [RFC3263] to allocate one SIP server to the user. The SIP-Server-Capabilities AVP is defined as follows (per the grouped-avp-def of RFC 3588 [RFC3588]): SIP-Server-Capabilities ::= < AVP Header: 372 > * [ SIP-Mandatory-Capability ] * [ SIP-Optional-Capability ] * [ SIP-Server-URI ] * [ AVP ] */ struct dict_object * avp; struct dict_avp_data data = { 372, /* Code */ 0, /* Vendor */ "SIP-Server-Capabilities", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "SIP-Mandatory-Capability", RULE_OPTIONAL, -1, -1 } ,{ "SIP-Optional-Capability", RULE_OPTIONAL, -1, -1 } ,{ "SIP-Server-URI", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* SIP-Server-Assignment-Type */ { /* The SIP-Server-Assignment-Type AVP (AVP Code 375) is of type Enumerated and indicates the type of server update being performed in a Diameter Server-Assignment-Request (SAR) operation. The following values are defined: o NO_ASSIGNMENT (0) The Diameter client uses this value to request the user profile of a SIP AOR, without affecting the registration state of that identity. o REGISTRATION (1) First SIP registration of a SIP AOR. o RE_REGISTRATION (2) Subsequent SIP registration of a SIP AOR. o UNREGISTERED_USER (3) The SIP server has received a SIP request (e.g., SIP INVITE) addressed for a SIP AOR that is not registered. o TIMEOUT_DEREGISTRATION (4) The SIP registration timer of an identity has expired. o USER_DEREGISTRATION (5) The SIP server has received a request to deregister a SIP AOR. o TIMEOUT_DEREGISTRATION_STORE_SERVER_NAME (6) The SIP registration timer of an identity has expired. The SIP server keeps the user data stored and requests the Diameter server to store the SIP server address. o USER_DEREGISTRATION_STORE_SERVER_NAME (7) The SIP server has received a user-initiated deregistration request. The SIP server keeps the user data stored and requests the Diameter server to store the SIP server address. o ADMINISTRATIVE_DEREGISTRATION (8) The SIP server, due to administrative reasons, has deregistered a SIP AOR. o AUTHENTICATION_FAILURE (9) The authentication of a user has failed. o AUTHENTICATION_TIMEOUT (10) The authentication timer has expired. o DEREGISTRATION_TOO_MUCH_DATA (11) The SIP server has requested user profile information from the Diameter server and has received a volume of data higher than it can accept. */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(SIP-Server-Assignment-Type)" , NULL, NULL}; struct dict_enumval_data tvals[] = { enumval_def_u32( 0, "NO_ASSIGNMENT"), enumval_def_u32( 1, "REGISTRATION"), enumval_def_u32( 2, "RE_REGISTRATION"), enumval_def_u32( 3, "UNREGISTERED_USER"), enumval_def_u32( 4, "TIMEOUT_DEREGISTRATION"), enumval_def_u32( 5, "USER_DEREGISTRATION"), enumval_def_u32( 6, "TIMEOUT_DEREGISTRATION_STORE_SERVER_NAME"), enumval_def_u32( 7, "USER_DEREGISTRATION_STORE_SERVER_NAME"), enumval_def_u32( 8, "ADMINISTRATIVE_DEREGISTRATION"), enumval_def_u32( 9, "AUTHENTICATION_FAILURE"), enumval_def_u32( 10, "AUTHENTICATION_TIMEOUT"), enumval_def_u32( 11, "DEREGISTRATION_TOO_MUCH_DATA") }; struct dict_avp_data data = { 375, /* Code */ 0, /* Vendor */ "SIP-Server-Assignment-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; int i; /* Create the Enumerated type, enumerated values, and the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) { CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL); } CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* SIP-Authenticate */ { /* The SIP-Authenticate AVP (AVP Code 379) is of type Grouped and contains a reconstruction of either the SIP WWW-Authenticate or Proxy-Authentication header fields specified in RFC 2617 [RFC2617] for the HTTP Digest authentication scheme. Additionally, the AVP may include a Digest-HA1 AVP that contains H(A1) (as defined in RFC 2617 [RFC2617]). H(A1) allows the Diameter client to create an expected response and compare it with the Digest response received from the SIP UA. The SIP-Authenticate AVP is defined as follows (per the grouped-avp-def of RFC 3588 [RFC3588]): SIP-Authenticate ::= < AVP Header: 379 > { Digest-Realm } { Digest-Nonce } [ Digest-Domain ] [ Digest-Opaque ] [ Digest-Stale ] [ Digest-Algorithm ] [ Digest-QoP ] [ Digest-HA1] * [ Digest-Auth-Param ] * [ AVP ] */ struct dict_object * avp; struct dict_avp_data data = { 379, /* Code */ 0, /* Vendor */ "SIP-Authenticate", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Digest-Realm", RULE_REQUIRED, -1, 1 } ,{ "Digest-Nonce", RULE_REQUIRED, -1, 1 } ,{ "Digest-Domain", RULE_OPTIONAL, -1, 1 } ,{ "Digest-Opaque", RULE_OPTIONAL, -1, 1 } ,{ "Digest-Stale", RULE_OPTIONAL, -1, 1 } ,{ "Digest-Algorithm", RULE_OPTIONAL, -1, 1 } ,{ "Digest-QoP", RULE_OPTIONAL, -1, 1 } ,{ "Digest-HA1", RULE_OPTIONAL, -1, 1 } ,{ "Digest-Auth-Param", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* SIP-Authorization */ { /* The SIP-Authorization AVP (AVP Code 380) is of type Grouped and contains a reconstruction of either the SIP Authorization or Proxy-Authorization header fields specified in RFC 2617 [RFC2617] for the HTTP Digest authentication scheme. The SIP-Authorization AVP is defined as follows (per the grouped-avp-def of RFC 3588 [RFC3588]): SIP-Authorization ::= < AVP Header: 380 > { Digest-Username } { Digest-Realm } { Digest-Nonce } { Digest-URI } { Digest-Response } [ Digest-Algorithm ] [ Digest-CNonce ] [ Digest-Opaque ] [ Digest-QoP ] [ Digest-Nonce-Count ] [ Digest-Method] [ Digest-Entity-Body-Hash ] * [ Digest-Auth-Param ] * [ AVP ] */ struct dict_object * avp; struct dict_avp_data data = { 380, /* Code */ 0, /* Vendor */ "SIP-Authorization", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Digest-Username", RULE_REQUIRED, -1, 1 } ,{ "Digest-Realm", RULE_REQUIRED, -1, 1 } ,{ "Digest-Nonce", RULE_REQUIRED, -1, 1 } ,{ "Digest-URI", RULE_REQUIRED, -1, 1 } ,{ "Digest-Response", RULE_REQUIRED, -1, 1 } ,{ "Digest-Algorithm", RULE_OPTIONAL, -1, 1 } ,{ "Digest-CNonce", RULE_OPTIONAL, -1, 1 } ,{ "Digest-Opaque", RULE_OPTIONAL, -1, 1 } ,{ "Digest-QoP", RULE_OPTIONAL, -1, 1 } ,{ "Digest-Nonce-Count", RULE_OPTIONAL, -1, 1 } ,{ "Digest-Method", RULE_OPTIONAL, -1, 1 } ,{ "Digest-Entity-Body-Hash", RULE_OPTIONAL, -1, 1 } ,{ "Digest-Auth-Param", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* SIP-Authentication-Info */ { /* The SIP-Authentication-Info AVP (AVP Code 381) is of type Grouped and contains a reconstruction of the SIP Authentication-Info header specified in RFC 2617 [RFC2617] for the HTTP Digest authentication scheme. The SIP-Authentication-Info AVP is defined as follows (per the grouped-avp-def of RFC 3588 [RFC3588]): SIP-Authentication-Info ::= < AVP Header: 381 > [ Digest-Nextnonce ] [ Digest-QoP ] [ Digest-Response-Auth ] [ Digest-CNonce ] [ Digest-Nonce-Count ] * [ AVP ] Note that, in some cases, the Digest-Response-Auth AVP cannot be calculated at the Diameter server, but has to be calculated at the Diameter client (SIP server). For example, if the value of the quality of protection (qop) parameter in Digest is set to "auth-int", then the response-digest (rspauth parameter value in Digest) is calculated with the hash of the body of the SIP response, which is not available at the Diameter server. In this case, the Diameter client (SIP server) must calculate the response-digest once the body of the SIP response is calculated. Therefore, a value of "auth-int" in the Digest-QoP AVP of the SIP-Authentication-Info AVP indicates that the Diameter client (SIP server) MUST compute the Digest "rspauth" parameter value at the Diameter client (SIP server). */ struct dict_object * avp; struct dict_avp_data data = { 381, /* Code */ 0, /* Vendor */ "SIP-Authentication-Info", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Digest-Nextnonce", RULE_OPTIONAL, -1, 1 } ,{ "Digest-QoP", RULE_OPTIONAL, -1, 1 } ,{ "Digest-Response-Auth", RULE_OPTIONAL, -1, 1 } ,{ "Digest-CNonce", RULE_OPTIONAL, -1, 1 } ,{ "Digest-Nonce-Count", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* SIP-Authentication-Scheme */ { /* The SIP-Authentication-Scheme AVP (AVP Code 377) is of type Enumerated and indicates the authentication scheme used in the authentication of SIP services. RFC 2617 identifies this value as an "auth-scheme" (see Section 1.2 of RFC 2617 [RFC2617]). The only currently defined value is: o DIGEST (0) to indicate HTTP Digest authentication as specified in RFC 2617 [RFC2617] Section 3.2.1. Derivative work is also considered Digest authentication scheme, as long as the "auth-scheme" is identified as Digest in the SIP headers carrying the HTTP authentication. This includes, e.g., the HTTP Digest authentication using AKA [RFC3310]. Each HTTP Digest directive (parameter) is transported in a corresponding AVP, whose name follows the pattern Digest-*. The Digest-* AVPs are RADIUS attributes imported from the RADIUS Extension for Digest Authentication [RFC4590] namespace, allowing a smooth transition between RADIUS and Diameter applications supporting SIP. The Diameter SIP application goes a step further by grouping the Digest-* AVPs into the SIP-Authenticate, SIP-Authorization, and SIP-Authentication-Info grouped AVPs that correspond to the SIP WWW- Authenticate/Proxy-Authentication, Authorization/Proxy-Authorization, and Authentication-Info headers fields, respectively. Note: Due to the fact that HTTP Digest authentication [RFC2617] is the only mandatory authentication mechanism in SIP, this memo only provides support for HTTP Digest authentication and derivative work such as HTTP Digest authentication using AKA [RFC3310]. Extensions to this memo can register new values and new AVPs to provide support for other authentication schemes or extensions to HTTP Digest authentication. Note: Although RFC 2617 [RFC2617] defines the Basic and Digest schemes for authenticating HTTP requests, RFC 3261 [RFC3261] only imports HTTP Digest as a mechanism to provide authentication in SIP. Due to syntactic requirements, HTTP Digest authentication has to escape quote characters in contents of HTTP Digest directives. When translating directives into Digest-* AVPs, the Diameter client or server removes the surrounding quotes where present, as required by the syntax of the Digest-* attributes defined in the "RADIUS Extension for Digest Authentication" [RFC4590]. */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(SIP-Authentication-Scheme)" , NULL, NULL}; struct dict_enumval_data tvals[] = { enumval_def_u32( 0, "DIGEST") }; struct dict_avp_data data = { 377, /* Code */ 0, /* Vendor */ "SIP-Authentication-Scheme", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; int i; /* Create the Enumerated type, enumerated values, and the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) { CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL); } CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* SIP-Item-Number */ { /* The SIP-Item-Number (AVP Code 378) is of type Unsigned32 and is included in a SIP-Auth-Data-Item grouped AVP in circumstances where there are multiple occurrences of SIP-Auth-Data-Item AVPs and the order of processing is relevant. The AVP indicates the order in which the Grouped SIP-Auth-Data-Item should be processed. Lower values of the SIP-Item-Number AVP indicate that the whole SIP-Auth-Data-Item SHOULD be processed before other SIP-Auth-Data-Item AVPs that contain higher values in the SIP-Item-Number AVP. */ struct dict_avp_data data = { 378, /* Code */ 0, /* Vendor */ "SIP-Item-Number", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* SIP-Auth-Data-Item */ { /* The SIP-Auth-Data-Item (AVP Code 376) is of type Grouped and contains the authentication and/or authorization information pertaining to a user. When the Diameter server uses the grouped SIP-Auth-Data-Item AVP to include a SIP-Authenticate AVP, the Diameter server MUST send a maximum of one authentication data item (e.g., in case the SIP request contained several credentials). Section 11 contains a detailed discussion and normative text of the case when a SIP request contains several credentials. The SIP-Auth-Data-Item AVP is defined as follows (per the grouped-avp-def of RFC 3588 [RFC3588]): SIP-Auth-Data-Item ::= < AVP Header: 376 > { SIP-Authentication-Scheme } [ SIP-Item-Number ] [ SIP-Authenticate ] [ SIP-Authorization ] [ SIP-Authentication-Info ] * [ AVP ] */ struct dict_object * avp; struct dict_avp_data data = { 376, /* Code */ 0, /* Vendor */ "SIP-Auth-Data-Item", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "SIP-Authentication-Scheme",RULE_REQUIRED, -1, 1 } ,{ "SIP-Item-Number", RULE_OPTIONAL, -1, 1 } ,{ "SIP-Authenticate", RULE_OPTIONAL, -1, 1 } ,{ "SIP-Authorization", RULE_OPTIONAL, -1, 1 } ,{ "SIP-Authentication-Info", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* SIP-Number-Auth-Items */ { /* The SIP-Number-Auth-Items AVP (AVP Code 382) is of type Unsigned32 and indicates the number of authentication and/or authorization credentials that the Diameter server included in a Diameter message. When the AVP is present in a request, it indicates the number of SIP-Auth-Data-Items the Diameter client is requesting. This can be used, for instance, when the SIP server is requesting several pre-calculated authentication credentials. In the answer message, the SIP-Number-Auth-Items AVP indicates the actual number of items that the Diameter server included. */ struct dict_avp_data data = { 382, /* Code */ 0, /* Vendor */ "SIP-Number-Auth-Items", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* SIP-Reason-Code */ { /* The SIP-Reason-Code AVP (AVP Code 384) is of type Enumerated and defines the reason for the network initiated deregistration. The following values are defined: o PERMANENT_TERMINATION (0) o NEW_SIP_SERVER_ASSIGNED (1) o SIP_SERVER_CHANGE (2) o REMOVE_SIP_SERVER (3) */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(SIP-Reason-Code)" , NULL, NULL}; struct dict_enumval_data tvals[] = { enumval_def_u32( 0, "PERMANENT_TERMINATION"), enumval_def_u32( 1, "NEW_SIP_SERVER_ASSIGNED"), enumval_def_u32( 2, "SIP_SERVER_CHANGE"), enumval_def_u32( 3, "REMOVE_SIP_SERVER") }; struct dict_avp_data data = { 384, /* Code */ 0, /* Vendor */ "SIP-Reason-Code", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; int i; /* Create the Enumerated type, enumerated values, and the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) { CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL); } CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* SIP-Reason-Info */ { /* The SIP-Reason-Info AVP (AVP Code 385) is of type UTF8String and contains textual information that can be rendered to the user, about the reason for a deregistration. */ struct dict_avp_data data = { 385, /* Code */ 0, /* Vendor */ "SIP-Reason-Info", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* SIP-Deregistration-Reason */ { /* The SIP-Deregistration-Reason AVP (AVP Code 383) is of type Grouped and indicates the reason for a deregistration operation. The SIP-Deregistration-Reason AVP is defined as follows (per the grouped-avp-def of RFC 3588 [RFC3588]): SIP-Deregistration-Reason ::= < AVP Header: 383 > { SIP-Reason-Code } [ SIP-Reason-Info ] * [ AVP ] */ struct dict_object * avp; struct dict_avp_data data = { 383, /* Code */ 0, /* Vendor */ "SIP-Deregistration-Reason", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "SIP-Reason-Code", RULE_REQUIRED, -1, 1 } ,{ "SIP-Reason-Info", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* SIP-Visited-Network-Id */ { /* The SIP-Visited-Network-Id AVP (AVP Code 386) is of type UTF8String. This AVP contains an identifier that helps the home network identify the visited network (e.g., the visited network domain name), in order to authorize roaming to that visited network. */ struct dict_avp_data data = { 386, /* Code */ 0, /* Vendor */ "SIP-Visited-Network-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* SIP-User-Authorization-Type */ { /* The SIP-User-Authorization-Type AVP (AVP Code 387) is of type Enumerated and indicates the type of user authorization being performed in a User Authorization operation, i.e., the Diameter User-Authorization-Request (UAR) command. The following values are defined: o REGISTRATION (0) This value is used for initial registration or re-registration. This is the default value. o DEREGISTRATION (1) This value is used for deregistration. o REGISTRATION_AND_CAPABILITIES (2) This value is used for initial registration or re-registration when the SIP server explicitly requests the Diameter server to get capability information. This capability information helps the SIP server to allocate another SIP server to serve the user. */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(SIP-User-Authorization-Type)" , NULL, NULL}; struct dict_enumval_data tvals[] = { enumval_def_u32( 0, "REGISTRATION"), enumval_def_u32( 1, "DEREGISTRATION"), enumval_def_u32( 2, "REGISTRATION_AND_CAPABILITIES") }; struct dict_avp_data data = { 387, /* Code */ 0, /* Vendor */ "SIP-User-Authorization-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; int i; /* Create the Enumerated type, enumerated values, and the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) { CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL); } CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* SIP-Supported-User-Data-Type */ { /* The SIP-Supported-User-Data-Type AVP (AVP Code 388) is of type UTF8String and contains a string that identifies the type of supported user data (user profile, see SIP-User-Data AVP (Section 9.12)) supported in the node. The AVP can be repeated, if the SIP server supports several user data types. In case of repetition, the Diameter client should order the different instances of this AVP according to its preferences. When the Diameter client inserts this AVP in a SAR message, it allows the Diameter client to provide an indication to the Diameter server of the types of user data supported by the SIP server. The Diameter server, upon inspection of these AVPs, will return a suitable SIP-User-Data AVP (Section 9.12) of the type indicated in the SIP-User-Data-Type AVP (Section 9.12.1). */ struct dict_avp_data data = { 388, /* Code */ 0, /* Vendor */ "SIP-Supported-User-Data-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* SIP-User-Data-Type */ { /* The SIP-User-Data-Type AVP (AVP Code 390) is of type UTF8String and contains a string that identifies the type of user data included in the SIP-User-Data-Type AVP (Section 9.12). This document does not specify a convention to characterize the type of user data contained in the SIP-User-Data-Type AVP (Section 9.12). It is believed that in most cases this feature will be used in environments controlled by a network administrator who can configure both the client and server to assign the same value type at the client and server. It is also RECOMMENDED that organizations developing their own profile of SIP-User-Data-Type AVP (Section 9.12) allocate a type based on their canonical DNS name. For instance, organization "example.com" can define several types of SIP-User-Data and allocate the types "type1.dsa.example.com", "type2.dsa.example.com", and so on. This convention will avoid a clash in the allocation of types of SIP-User-Data-Type AVP (Section 9.12). */ struct dict_avp_data data = { 390, /* Code */ 0, /* Vendor */ "SIP-User-Data-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* SIP-User-Data-Contents */ { /* The SIP-User-Data-Contents AVP (AVP Code 391) is of type OctetString. The Diameter peers do not need to understand the value of this AVP. The AVP contains the user profile data required for a SIP server to give service to the user. */ struct dict_avp_data data = { 391, /* Code */ 0, /* Vendor */ "SIP-User-Data-Contents", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* SIP-User-Data */ { /* The SIP-User-Data AVP (AVP Code 389) is of type Grouped. This AVP allows the Diameter server to transport user-specific data, such as a user profile, to the SIP server (in the Diameter client). The Diameter server selects a type of user data that is understood by the SIP server in the Diameter client, and has been indicated in a SIP-Supported-User-Data-Type AVP. In case the Diameter client indicated support for several types of user data, the Diameter server SHOULD choose the first type supported by the client. The SIP-User-Data grouped AVP contains a SIP-User-Data-Type AVP that indicates the type of user data included in the SIP-User-Data-Contents-AVP. The SIP-User-Data AVP is defined as follows (per the grouped-avp-def of RFC 3588 [RFC3588]): SIP-User-Data ::= < AVP Header: 389 > { SIP-User-Data-Type } { SIP-User-Data-Contents } * [ AVP ] */ struct dict_object * avp; struct dict_avp_data data = { 389, /* Code */ 0, /* Vendor */ "SIP-User-Data", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "SIP-User-Data-Type", RULE_REQUIRED, -1, 1 } ,{ "SIP-User-Data-Contents", RULE_REQUIRED, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* SIP-User-Data-Already-Available */ { /* The SIP-User-Data-Already-Available AVP (AVP Code 392) is of type Enumerated and gives an indication to the Diameter server about whether the Diameter client (SIP server) already received the portion of the user profile needed in order to serve the user. The following values are defined: o USER_DATA_NOT_AVAILABLE (0) The Diameter client (SIP server) does not have the data that it needs to serve the user. o USER_DATA_ALREADY_AVAILABLE (1) The Diameter client (SIP server) already has received the data that it needs to serve the user. */ struct dict_object *type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated(SIP-User-Data-Already-Available)" , NULL, NULL}; struct dict_enumval_data tvals[] = { enumval_def_u32( 0, "USER_DATA_NOT_AVAILABLE"), enumval_def_u32( 1, "USER_DATA_ALREADY_AVAILABLE") }; struct dict_avp_data data = { 392, /* Code */ 0, /* Vendor */ "SIP-User-Data-Already-Available", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; int i; /* Create the Enumerated type, enumerated values, and the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); for (i = 0; i < sizeof(tvals) / sizeof(tvals[0]); i++) { CHECK_dict_new( DICT_ENUMVAL, &tvals[i], type, NULL); } CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* SIP-Method */ { /* The SIP-Method-AVP (AVP Code 393) is of type UTF8String and contains the method of the SIP request that triggered the Diameter message. The Diameter server MUST use this AVP solely for authorization of SIP requests, and MUST NOT use it to compute the Digest authentication. To compute the Digest authentication, the Diameter server MUST use the Digest-Method AVP instead. */ struct dict_avp_data data = { 393, /* Code */ 0, /* Vendor */ "SIP-Method", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Complement of Result-Code AVP values */ { struct dict_object * resultcode_data_type; CHECK_dict_search(DICT_TYPE,TYPE_BY_NAME,"Enumerated*(Result-Code)",&resultcode_data_type); { /* Success */ { /* 2003 */ { /* The user was not previously registered. The Diameter server has now authorized the registration. */ struct dict_enumval_data error_code = { "DIAMETER_FIRST_REGISTRATION", { .u32 = 2003 }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL); } /* 2004 */ { /* The user is already registered. The Diameter server has now authorized the re-registration. */ struct dict_enumval_data error_code = { "DIAMETER_SUBSEQUENT_REGISTRATION", { .u32 = 2004 }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL); } /* 2005 */ { struct dict_enumval_data error_code = { "DIAMETER_UNREGISTERED_SERVICE", { .u32 = 2005 }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL); } /* 2006 */ { struct dict_enumval_data error_code = { "DIAMETER_SUCCESS_SERVER_NAME_NOT_STORED", { .u32 = 2006 }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL); } /* 2007 */ { struct dict_enumval_data error_code = { "DIAMETER_SERVER_SELECTION", { .u32 = 2007 }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL); } /* 2008 */ { struct dict_enumval_data error_code = { "DIAMETER_SUCCESS_AUTH_SENT_SERVER_NOT_STORED", { .u32 = 2008 }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL); } } /* Transient Failures */ { /* 4013 */ { struct dict_enumval_data error_code = { "DIAMETER_USER_NAME_REQUIRED", { .u32 = 4013 }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL); } } /* Permanent Failures */ { /* 5032 */ { struct dict_enumval_data error_code = { "DIAMETER_ERROR_USER_UNKNOWN", { .u32 = 5032 }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL); } /* 5033 */ { struct dict_enumval_data error_code = { "DIAMETER_ERROR_IDENTITIES_DONT_MATCH", { .u32 = 5033 }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL); } /* 5034 */ { struct dict_enumval_data error_code = { "DIAMETER_ERROR_IDENTITY_NOT_REGISTERED", { .u32 = 5034 }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL); } /* 5035 */ { struct dict_enumval_data error_code = { "DIAMETER_ERROR_ROAMING_NOT_ALLOWED", { .u32 = 5035 }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL); } /* 5036 */ { struct dict_enumval_data error_code = { "DIAMETER_ERROR_IDENTITY_ALREADY_REGISTERED", { .u32 = 5036 }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL); } /* 5037 */ { struct dict_enumval_data error_code = { "DIAMETER_ERROR_AUTH_SCHEME_NOT_SUPPORTED", { .u32 = 5037 }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL); } /* 5038 */ { struct dict_enumval_data error_code = { "DIAMETER_ERROR_IN_ASSIGNMENT_TYPE", { .u32 = 5038 }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL); } /* 5039 */ { struct dict_enumval_data error_code = { "DIAMETER_ERROR_TOO_MUCH_DATA", { .u32 = 5039 }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL); } /* 5040 */ { struct dict_enumval_data error_code = { "DIAMETER_ERROR_NOT SUPPORTED_USER_DATA", { .u32 = 5040 }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , resultcode_data_type, NULL); } } } } } /* Command section */ { /* User-Authorization-Request (UAR) Command */ { /* The User-Authorization-Request (UAR) is indicated by the Command-Code set to 283 and the Command Flags' 'R' bit set. The Diameter client in a SIP server sends this command to the Diameter server to request authorization for the SIP User Agent to route a SIP REGISTER request. Because the SIP REGISTER request implicitly carries a permission to bind an AOR to a contact address, the Diameter client uses the Diameter UAR as a first authorization request towards the Diameter server to authorize the registration. For instance, the Diameter server can verify that the AOR is a legitimate user of the realm. The Diameter client in the SIP server requests authorization for one of the possible values defined in the SIP-User-Authorization-Type AVP (Section 9.10). The user name used for authentication of the user is conveyed in a User-Name AVP (defined in the Diameter base protocol, RFC 3588 [RFC3588]). The location of the authentication user name in the SIP REGISTER request varies depending on the authentication mechanism. When the authentication mechanism is HTTP Digest as defined in RFC 2617 [RFC2617], the authentication user name is found in the "username" directive of the SIP Authorization header field value. This Diameter SIP application only provides support for HTTP Digest authentication in SIP; other authentication mechanisms are not currently supported. The SIP or SIPS URI to be registered is conveyed in the SIP-AOR AVP (Section 9.8). Typically this SIP or SIPS URI is found in the To header field value of the SIP REGISTER request that triggered the Diameter UAR message. The SIP-Visited-Network-Id AVP indicates the network that is providing SIP services (e.g., SIP proxy functionality or any other kind of services) to the SIP User Agent. The Message Format of the UAR command is as follows: ::= < Diameter Header: 283, REQ, PXY > < Session-Id > { Auth-Application-Id } { Auth-Session-State } { Origin-Host } { Origin-Realm } { Destination-Realm } { SIP-AOR } [ Destination-Host ] [ User-Name ] [ SIP-Visited-Network-Id ] [ SIP-User-Authorization-Type ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 283, /* Code */ "User-Authorization-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } ,{ "SIP-AOR", RULE_REQUIRED, -1, 1 } ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "SIP-Visited-Network-Id", RULE_OPTIONAL, -1, 1 } ,{ "SIP-User-Authorization-Type", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd); PARSE_loc_rules( rules, cmd ); } /* User-Authorization-Answer (UAA) Command */ { /* The User-Authorization-Answer (UAA) is indicated by the Command-Code set to 283 and the Command Flags' 'R' bit cleared. The Diameter server sends this command in response to a previously received Diameter User-Authorization-Request (UAR) command. The Diameter server indicates the result of the requested registration authorization. Additionally, the Diameter server may indicate a collection of SIP capabilities that assists the Diameter client to select a SIP proxy to the AOR under registration. In addition to the values already defined in RFC 3588 [RFC3588], the Result-Code AVP may contain one of the values defined in Section 10.1. Whenever the Diameter server fails to process the Diameter UAR message, it MUST stop processing and return the relevant error in the Diameter UAA message. When there is success in the process, the Diameter server MUST set the code to DIAMETER_SUCCESS in the Diameter UAA message. If the Diameter server requires a User-Name AVP value to process the Diameter UAR request, but the Diameter UAR message did not contain a User-Name AVP value, the Diameter server MUST set the Result-Code AVP value to DIAMETER_USER_NAME_REQUIRED (see Section 10.1.2) and return it in a Diameter UAA message. Upon reception of this Diameter UAA message with the Result-Code AVP value set to DIAMETER_USER_NAME_REQUIRED, the SIP server typically requests authentication by sending a SIP 401 (Unauthorized) or SIP 407 (Proxy Authentication Required) response back to the originator. When the authorization procedure succeeds, the Diameter server constructs a User-Authorization-Answer (UAA) message that MUST include (1) the address of the SIP server already assigned to the user name, (2) the capabilities needed by the SIP server (Diameter client) to select another SIP server for the user, or (3) a combination of the previous two options. If the Diameter server is already aware of a SIP server allocated to the user, the Diameter UAA message contains the address of that SIP server. The Diameter UAA message contains the capabilities required by a SIP server to trigger and execute services. It is required that these capabilities are present in the Diameter UAA message due to the possibility that the Diameter client (in the SIP server) allocates a different SIP server to trigger and execute services for that particular user. If a User-Name AVP is present in the Diameter UAR message, then the Diameter server MUST verify the existence of the user in the realm, i.e., the User-Name AVP value is a valid user within that realm. If the Diameter server does not recognize the user name received in the User-Name AVP, the Diameter server MUST build a Diameter User- Authorization-Answer (UAA) message and MUST set the Result-Code AVP to DIAMETER_ERROR_USER_UNKNOWN. If a User-Name AVP is present in the Diameter UAR message, then the Diameter server MUST authorize that User-Name AVP value is able to register the SIP or SIPS URI included in the SIP-AOR AVP. If this authorization fails, the Diameter server must set the Result-Code AVP to DIAMETER_ERROR_IDENTITIES_DONT_MATCH and send it in a Diameter User-Authorization-Answer (UAA) message. Note: Correlation between User-Name and SIP-AOR AVP values is required in order to avoid registration of a SIP-AOR allocated to another user. If there is a SIP-Visited-Network-Id AVP in the Diameter UAR message, and the SIP-User-Authorization-Type AVP value received in the Diameter UAR message is set to REGISTRATION or REGISTRATION& CAPABILITIES, then the Diameter server SHOULD verify whether the user is allowed to roam into the network specified in the SIP-Visited-Network-Id AVP in the Diameter UAR message. If the user is not allowed to roam into that network, the Diameter AAA server MUST set the Result-Code AVP value in the Diameter UAA message to DIAMETER_ERROR_ROAMING_NOT_ALLOWED. If the SIP-User-Authorization-Type AVP value received in the Diameter UAR message is set to REGISTRATION or REGISTRATION&CAPABILITIES, then the Diameter server SHOULD verify whether the SIP-AOR AVP value is authorized to register in the Home Realm. Where the SIP AOR is not authorized to register in the Home Realm, the Diameter server MUST set the Result-Code AVP to DIAMETER_AUTHORIZATION_REJECTED and send it in a Diameter UAA message. When the SIP-User-Authorization-Type AVP is not present in the Diameter UAR message, or when it is present and its value is set to REGISTRATION, then: o If the Diameter server is not aware of any previous registration of the user name (including registrations of other SIP AORs allocated to the same user name), then the Diameter server does not know of any SIP server allocated to the user. In this case, the Diameter server MUST set the Result-Code AVP value to DIAMETER_FIRST_REGISTRATION in the Diameter UAA message, and the Diameter server SHOULD include the required SIP server capabilities in the SIP-Server-Capabilities AVP value in the Diameter UAA message. The SIP-Server-Capabilities AVP assists the Diameter client (SIP server) to select an appropriate SIP server for the user, according to the required capabilities. o In some cases, the Diameter server is aware of a previously assigned SIP server for the same or different SIP AORs allocated to the same user name. In these cases, re-assignment of a new SIP server may or may not be needed, depending on the capabilities of the SIP server. The Diameter server MUST always include the allocated SIP server URI in the SIP-Server-URI AVP of the UAA message. If the Diameter server does not return the SIP capabilities, the Diameter server MUST set the Result-Code AVP in the Diameter UAA message to DIAMETER_SUBSEQUENT_REGISTRATION. Otherwise (i.e., if the Diameter server includes a SIP-Server-Capabilities AVP), then the Diameter server MUST set the Result-Code AVP in the Diameter UAA message to DIAMETER_SERVER_SELECTION. Then the Diameter client determines, based on the received information, whether it needs to select a new SIP server. When the SIP-User-Authorization-Type AVP value received in the Diameter UAR message is set to REGISTRATION&CAPABILITIES, then Diameter Server MUST return the list of capabilities in the SIP-Server-Capabilities AVP value of the Diameter UAA message, it MUST set the Result-Code to DIAMETER_SUCCESS, and it MUST NOT return a SIP-Server-URI AVP. The SIP-Server-Capabilities AVP enables the SIP server (Diameter client) to select another appropriate SIP server for invoking and executing services for the user, depending on the required capabilities. The Diameter server MAY leave the list of capabilities empty to indicate that any SIP server can be selected. When the SIP-User-Authorization-Type AVP value received in the Diameter UAR message is set to DEREGISTRATION, then: o If the Diameter server is aware of a SIP server assigned to the SIP AOR under deregistration, the Diameter server MUST set the Result-Code AVP to DIAMETER_SUCCESS and MUST set the SIP-Server-URI AVP value to the known SIP server, and return them in the Diameter UAA message. o If the Diameter server is not aware of a SIP server assigned to the SIP AOR under deregistration, then the Diameter server MUST set the Result-Code AVP in the Diameter UAA message to DIAMETER_ERROR_IDENTITY_NOT_REGISTERED. The Message Format of the UAA command is as follows: ::= < Diameter Header: 283, PXY > < Session-Id > { Auth-Application-Id } { Auth-Session-State } { Result-Code } { Origin-Host } { Origin-Realm } [ SIP-Server-URI ] [ SIP-Server-Capabilities ] [ Authorization-Lifetime ] [ Auth-Grace-Period ] [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Max-Cache-Time ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 283, /* Code */ "User-Authorization-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } ,{ "Result-Code", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "SIP-Server-URI", RULE_OPTIONAL, -1, 1 } ,{ "SIP-Server-Capabilities", RULE_OPTIONAL, -1, 1 } ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Host", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd); PARSE_loc_rules( rules, cmd ); } /* Multimedia-Auth-Request (MAR) Command */ { /* The Multimedia-Auth-Request (MAR) command is indicated by the Command-Code set to 286 and the Command Flags' 'R' bit set. The Diameter client in a SIP server sends this command to the Diameter server to request that the Diameter server authenticate and authorize a user attempt to use some SIP service (in this context, SIP service can be something as simple as a SIP subscription or using the proxy services for a SIP request). The MAR command may also register the SIP server's own URI to the Diameter server, so that future LIR/LIA messages can return this URI. If the SIP server is acting as a SIP registrar (see examples in Sections 6.2 and 6.3), its Diameter client MUST include a SIP- Server-URI AVP in the MAR command. In any other cases (see example in Section 6.4), its Diameter client MUST NOT include a SIP-Server- URI AVP in the MAR command. The SIP-Method AVP MUST include the SIP method name of the SIP request that triggered this Diameter MAR message. The Diameter server can use this AVP to authorize some SIP requests depending on the method. The Diameter MAR message MUST include a SIP-AOR AVP. The SIP-AOR AVP indicates the target of the SIP request. The value of the AVP is extracted from different places in SIP request, depending on the semantics of the SIP request. For SIP REGISTER messages the SIP-AOR AVP value indicates the intended public user identity under registration, and it is the SIP or SIPS URI populated in the To header field value (addr-spec as per RFC 3261 [RFC3261]) of the SIP REGISTER request. For other types of SIP requests, such as INVITE, SUBSCRIBE, MESSAGE, etc., the SIP-AOR AVP value indicates the intended destination of the request. This is typically populated in the Request-URI of the SIP request. Extracting the SIP-AOR AVP value from the proper SIP header field is the Diameter client's responsibility. Extensions to SIP (new SIP methods or new semantics) may require the SIP-AOR to be extracted from other parts of the request. If the SIP request includes some sort of authentication information, the Diameter client MUST include the user name, extracted from the authentication information of the SIP request, in the User-Name AVP value. The Message Format of the MAR command is as follows: ::= < Diameter Header: 286, REQ, PXY > < Session-Id > { Auth-Application-Id } { Auth-Session-State } { Origin-Host } { Origin-Realm } { Destination-Realm } { SIP-AOR } { SIP-Method } [ Destination-Host ] [ User-Name ] [ SIP-Server-URI ] [ SIP-Number-Auth-Items ] [ SIP-Auth-Data-Item ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 286, /* Code */ "Multimedia-Auth-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } ,{ "SIP-AOR", RULE_REQUIRED, -1, 1 } ,{ "SIP-Method", RULE_REQUIRED, -1, 1 } ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "SIP-Server-URI", RULE_OPTIONAL, -1, 1 } ,{ "SIP-Number-Auth-Items", RULE_OPTIONAL, -1, 1 } ,{ "SIP-Auth-Data-Item", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd); PARSE_loc_rules( rules, cmd ); } /* Multimedia-Auth-Answer (MAA) Command */ { /* The Multimedia-Auth-Answer (MAA) is indicated by the Command-Code set to 286 and the Command Flags' 'R' bit cleared. The Diameter server sends this command in response to a previously received Diameter Multimedia-Auth-Request (MAR) command. In addition to the values already defined in RFC 3588 [RFC3588], the Result-Code AVP may contain one of the values defined in Section 10.1. If the Diameter server requires a User-Name AVP value to process the Diameter MAR request, but the Diameter MAR message did not contain a User-Name AVP value, the Diameter server MUST set the Result-Code AVP value to DIAMETER_USER_NAME_REQUIRED (see Section 10.1.2) and return it in a Diameter MAA message. The Diameter server MAY include a SIP-Number-Auth-Items AVP and one or more SIP-Auth-Data-Item AVPs with authentication information (e.g., a challenge). Upon reception of this Diameter MAA message with the Result-Code AVP value set to DIAMETER_USER_NAME_REQUIRED, the SIP server typically requests authentication by generating a SIP 401 (Unauthorized) or SIP 407 (Proxy Authentication Required) response back to the originator. If the User-Name AVP is present in the Diameter MAR message, the Diameter server MUST verify the existence of the user in the realm, i.e., the User-Name AVP value is a valid user within that realm. If the Diameter server does not recognize the user name received in the User-Name AVP, the Diameter server MUST build a Diameter Multimedia-Auth-Answer (MAA) message and MUST set the Result-Code AVP to DIAMETER_ERROR_USER_UNKNOWN. If the SIP-Methods AVP value of the Diameter MAR message is set to REGISTER and a User-Name AVP is present, then the Diameter server MUST authorize that User-Name AVP value is able to use the URI included in the SIP-AOR AVP. If this authorization fails, the Diameter server must set the Result-Code AVP to DIAMETER_ERROR_IDENTITIES_DONT_MATCH and send it in a Diameter Multimedia-Auth-Answer (MAA) message. Note: Correlation between User-Name and SIP-AOR AVP values is only required for SIP REGISTER request, to prevent a user from registering a SIP-AOR allocated to another user. In other types of SIP requests (e.g., INVITE), the SIP-AOR indicates the intended destination of the request, rather than the originator of it. The Diameter server MUST verify whether the authentication scheme (SIP-Authentication-Scheme AVP value) indicated in the grouped SIP-Auth-Data-Item AVP is supported or not. If that authentication scheme is not supported, then the Diameter server MUST set the Result-Code AVP to DIAMETER_ERROR_AUTH_SCHEME_NOT_SUPPORTED and send it in a Diameter Multimedia-Auth-Answer (MAA) message. If the SIP-Number-Auth-Items AVP is present in the Diameter MAR message, it indicates the number of authentication data items that the Diameter client is requesting. It is RECOMMENDED that the Diameter server, when building the Diameter MAA message, includes a number of SIP-Auth-Data-Item AVPs that are a subset of the authentication data items requested by the Diameter client in the SIP-Number-Auth-Items AVP value of the Diameter MAR message. If the SIP-Server-URI AVP is present in the Diameter MAR message, then the Diameter server MUST compare the stored SIP server (assigned to the user) with the SIP-Server-URI AVP value (received in the Diameter MAR message). If they don't match, the Diameter server MUST temporarily save the newly received SIP server assigned to the user, and MUST set an "authentication pending" flag for the user. If they match, the Diameter server shall clear the "authentication pending" flag for the user. In any other situation, if there is a success in processing the Diameter MAR command and the Diameter server stored the SIP-Server-URI, the Diameter server MUST set the Result-Code AVP value to DIAMETER_SUCCESS and return it in a Diameter MAA message. If there is a success in processing the Diameter MAR command, but the Diameter server does not store the SIP-Server-URI because the AVP was not present in the Diameter MAR command, then the Diameter server MUST set the Result-Code AVP value to either: 1. DIAMETER_SUCCESS_AUTH_SENT_SERVER_NOT_STORED, if the Diameter server is sending authentication credentials to create a challenge. 2. DIAMETER_SUCCESS_SERVER_NAME_NOT_STORED, if the Diameter server successfully authenticated the user and authorized the SIP server to proceed with the SIP request. Otherwise, the Diameter server MUST set the Result-Code AVP value to DIAMETER_UNABLE_TO_COMPLY, and it MUST NOT include any SIP-Auth-Data-Item AVP. The Message Format of the MAA command is as follows: ::= < Diameter Header: 286, PXY > < Session-Id > { Auth-Application-Id } { Result-Code } { Auth-Session-State } { Origin-Host } { Origin-Realm } [ User-Name ] [ SIP-AOR ] [ SIP-Number-Auth-Items ] * [ SIP-Auth-Data-Item ] [ Authorization-Lifetime ] [ Auth-Grace-Period ] [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Max-Cache-Time ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 286, /* Code */ "Multimedia-Auth-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Result-Code", RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "SIP-AOR", RULE_OPTIONAL, -1, 1 } ,{ "SIP-Number-Auth-Items", RULE_OPTIONAL, -1, 1 } ,{ "SIP-Auth-Data-Item", RULE_OPTIONAL, -1, -1 } ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Host", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd); PARSE_loc_rules( rules, cmd ); } /* Server-Assignment-Request (SAR) Command */ { /* The Server-Assignment-Request (SAR) command is indicated by the Command-Code set to 284 and the Command Flags' 'R' bit set. The Diameter client in a SIP server sends this command to the Diameter server to indicate the completion of the authentication process and to request that the Diameter server store the URI of the SIP server that is currently serving the user. The main functions of the Diameter SAR command are to inform the Diameter server of the URI of the SIP server allocated to the user, and to store or clear it from the Diameter server. Additionally, the Diameter client can request to download the user profile or part of it. During the registration procedure, a SIP server becomes assigned to the user. The Diameter client in the assigned SIP server MUST include its own URI in the SIP-Server-URI AVP of the Server-Assignment-Request (SAR) Diameter message and send it to the Diameter server. The Diameter server then becomes aware of the allocation of the SIP server to the user name and the server's URI. The Diameter client in the SIP server MAY send a Diameter SAR message because of other reasons. These reasons are identified in the SIP-Server-Assignment-Type AVP (Section 9.4) value. For instance, a Diameter client in a SIP server may contact the Diameter server to request deregistration of a user, to inform the Diameter server of an authentication failure, or just to download the user profile. For a complete description of all the SIP-Server-Assignment-Type AVP values, see Section 9.4. Typically the reception of a SIP REGISTER request in a SIP server will trigger the Diameter client in the SIP server to send the Diameter SAR message. However, if a SIP server is receiving other SIP request, such as INVITE, and the SIP server does not have the user profile, the Diameter client in the SIP server may send the Diameter SAR message to the Diameter server in order to download the user profile and make the Diameter server aware of the SIP server assigned to the user. The user profile is an important piece of information that dictates the behavior of the SIP server when triggering or providing services for the user. Typically the user profile is divided into: o Services to be rendered to the user when the user is registered and initiates a SIP request. o Services to be rendered to the user when the user is registered and a SIP request destined to that user arrives to the SIP proxy. o Services to be rendered to the user when the user is not registered and a SIP request destined to that user arrives to the SIP proxy. The SIP-Server-Assignment-Type AVP indicates the reason why the Diameter client (SIP server) contacted the Diameter server. If the Diameter client sets the SIP-Server-Assignment-Type AVP value to REGISTRATION, RE_REGISTRATION, UNREGISTERED_USER, NO_ASSIGNMENT, AUTHENTICATION_FAILURE or AUTHENTICATION_TIMEOUT, the Diameter client MUST include exactly one SIP-AOR AVP in the Diameter SAR message. The SAR message MAY contain zero or more SIP-Supported-User-Data-Type AVPs. Each of them contains a type of user data understood by the SIP server. This allows the Diameter client to provide an indication to the Diameter server of the different format of user data understood by the SIP server. The Diameter server uses this information to select one or more SIP-User-Data AVPs that will be included in the SAA message. The Message Format of the SAR command is as follows: ::= < Diameter Header: 284, REQ, PXY > < Session-Id > { Auth-Application-Id } { Auth-Session-State } { Origin-Host } { Origin-Realm } { Destination-Realm } { SIP-Server-Assignment-Type } { SIP-User-Data-Already-Available } [ Destination-Host ] [ User-Name ] [ SIP-Server-URI ] * [ SIP-Supported-User-Data-Type ] * [ SIP-AOR ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 284, /* Code */ "Server-Assignment-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } ,{ "SIP-Server-Assignment-Type", RULE_REQUIRED, -1, 1 } ,{ "SIP-User-Data-Already-Available", RULE_REQUIRED, -1, 1 } ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "SIP-Server-URI", RULE_OPTIONAL, -1, 1 } ,{ "SIP-Supported-User-Data-Type", RULE_OPTIONAL, -1, -1 } ,{ "SIP-AOR", RULE_OPTIONAL, -1, -1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd); PARSE_loc_rules( rules, cmd ); } /* Server-Assignment-Answer (SAA) Command */ { /* The Server-Assignment-Answer (SAA) is indicated by the Command-Code set to 284 and the Command Flags' 'R' bit cleared. The Diameter server sends this command in response to a previously received Diameter Server-Assignment-Request (SAR) command. The response may include the user profile or part of it, if requested. In addition to the values already defined in RFC 3588 [RFC3588], the Result-Code AVP may contain one of the values defined in Section 10.1. The Result-Code AVP value in the Diameter SAA message may indicate a success or an error in the execution of the Diameter SAR command. If Result-Code AVP value in the Diameter SAA message does not contain an error code, the SAA message MAY include one or more SIP-User-Data AVPs that typically contain the profile of the user, indicating services that the SIP server can provide to that user. The Diameter server MAY include one or more SIP-Supported-User-Data-Type AVPs, each one identifying a type of user data format supported in the Diameter server. If there is not a common supported user data type between the Diameter client and the Diameter server, the Diameter server SHOULD declare its list of supported user data types by including one or more SIP-Supported-User-Data-Type AVPs in a Diameter SAA message. This indication is merely for debugging reasons, since there is not a fallback mechanism that allows the Diameter client to retrieve the profile in a supported format. If the Diameter server requires a User-Name AVP value to process the Diameter SAR request, but the Diameter SAR message did not contain a User-Name AVP value, the Diameter server MUST set the Result-Code AVP value to DIAMETER_USER_NAME_REQUIRED (see Section 10.1.2) and return it in a Diameter SAA message. Upon reception of this Diameter SAA message with the Result-Code AVP value set to DIAMETER_USER_NAME_REQUIRED, the SIP server typically requests authentication by generating a SIP 401 (Unauthorized) or SIP 407 (Proxy Authentication Required) response back to the originator. If the User-Name AVP is included in the Diameter SAR message, upon reception of the Diameter SAR message, the Diameter server MUST verify the existence of the user in the realm, i.e., the User-Name AVP value is a valid user within that realm. If the Diameter server does not recognize the user name received in the User-Name AVP, the Diameter server MUST build a Diameter Server-Assignment-Answer (SAA) message and MUST set the Result-Code AVP to DIAMETER_ERROR_USER_UNKNOWN. Then the Diameter server MUST authorize that User-Name AVP value is a valid authentication name for the SIP or SIPS URI included in the SIP-AOR AVP of the Diameter SAR message. If this authorization fails, the Diameter server must set the Result-Code AVP to DIAMETER_ERROR_IDENTITIES_DONT_MATCH and send it in a Diameter Server-Assignment-Answer (SAA) message. After successful execution of the Diameter SAR command, the Diameter server MUST clear the "authentication pending" flag and SHOULD move the temporarily stored SIP server URI to permanent storage. The actions of the Diameter server upon reception of the Diameter SAR message depend on the value of the SIP-Server-Assignment-Type: o If the SIP-Server-Assignment-Type AVP value in the Diameter SAR message is set to REGISTRATION or RE_REGISTRATION, the Diameter server SHOULD verify that there is only one SIP-AOR AVP. Otherwise, the Diameter server MUST answer with a Diameter SAA message with the Result-Code AVP value set to DIAMETER_AVP_OCCURS_TOO_MANY_TIMES and MUST NOT include any SIP-User-Data AVP. If there is only one SIP-AOR AVP and if the SIP-User-Data-Already-Available AVP value is set to USER_DATA_NOT_AVAILABLE, then the Diameter server SHOULD include one or more user profile data with the SIP or SIPS URI (SIP-AOR AVP) and all other SIP identities associated with that AVP in the SIP-User-Data AVP value of the Diameter SAA message. On selecting the type of user data, the Diameter server SHOULD take into account the supported formats at the SIP server (SIP-Supported-User-Data-Type AVP in the SAR message) and the local policy. Additionally, the Diameter server MUST set the Result-Code AVP value to DIAMETER_SUCCESS in the Diameter SAA message. The Diameter server considers the SIP AOR authenticated and registered. o If the SIP-Server-Assignment-Type AVP value in the Diameter SAR message is set to UNREGISTERED_USER, then the Diameter server MUST store the SIP server address included in the SIP-Server-URI AVP value. The Diameter server will return the SIP server address in Diameter Location-Info-Answer (LIA) messages. If the SIP-User-Data-Already-Available AVP value is set to USER_DATA_NOT_AVAILABLE, then the Diameter server SHOULD include one or more user profile data associated with the SIP or SIPS URI (SIP-AOR AVP) and associated identities in the SIP-User-Data AVP value of the Diameter SAA message. On selecting the type of user data, the Diameter server SHOULD take into account the supported formats at the SIP server (SIP-Supported-User-Data-Type AVP in the SAR message) and the local policy. The Diameter server MUST set the Result-Code AVP value to DIAMETER_SUCCESS. The Diameter server considers the SIP AOR UNREGISTERED, but with a SIP server allocated to trigger and provide services for unregistered users. Note that in case of UNREGISTERED_USER (SIP-Server-Assignment-Type AVP), the Diameter server MUST verify that there is only one SIP-AOR AVP. Otherwise, the Diameter server MUST answer the Diameter SAR message with a Diameter SAA message, and it MUST set the Result-Code AVP value to DIAMETER_AVP_OCCURS_TOO_MANY_TIMES and MUST NOT include any SIP-User-Data AVP. If the User-Name AVP was not present in the Diameter SAR message and the SIP-AOR is not known for the Diameter server, the Diameter server MUST NOT include a User-Name AVP in the Diameter SAA message and MUST set the Result-Code AVP value to DIAMETER_ERROR_USER_UNKNOWN. o If the SIP-Server-Assignment-Type AVP value in the Diameter SAR message is set to TIMEOUT_DEREGISTRATION, USER_DEREGISTRATION, DEREGISTRATION_TOO_MUCH_DATA, or ADMINISTRATIVE_DEREGISTRATION, the Diameter server MUST clear the SIP server address associated with all SIP AORs indicated in each of the SIP-AOR AVP values included in the Diameter SAR message. The Diameter server considers all of these SIP AORs as not registered. The Diameter server MUST set the Result-Code AVP value to DIAMETER_SUCCESS in the Diameter SAA message. o If the SIP-Server-Assignment-Type AVP value in the Diameter SAR message is set to TIMEOUT_DEREGISTRATION_STORE_SERVER_NAME or USER_DEREGISTRATION_STORE_SERVER_NAME, the Diameter server MAY keep the SIP server address associated with the SIP AORs included in the SIP-AOR AVP values of the Diameter SAR message, even though the SIP AORs become unregistered. This feature allows a SIP server to request that the Diameter server remain an assigned SIP server for those SIP AORs (SIP-AOR AVP values) allocated to the same user name, and avoid SIP server assignment. The Diameter server MUST consider all these SIP AORs as not registered. If the Diameter server honors the request of the Diameter client (SIP server) to remain as an allocated SIP server, then the Diameter server MUST keep the SIP server assigned to those SIP AORs allocated to the username and MUST set the Result-Code AVP value to DIAMETER_SUCCESS in the Diameter SAA message. Otherwise, when the Diameter server does not honor the request of the Diameter client (SIP server) to remain as an allocated SIP server, the Diameter server MUST clear the SIP server name assigned to those SIP AORs and it MUST set the Result-Code AVP value to DIAMETER_SUCCESS_SERVER_NAME_NOT_STORED in the Diameter SAA message. o If the SIP-Server-Assignment-Type AVP value in the Diameter SAR message is set to NO_ASSIGNMENT, the Diameter server SHOULD first verify that the SIP-Server-URI AVP value in the Diameter SAR message is the same URI as the one assigned to the SIP-AOR AVP value. If they differ, then the Diameter server MUST set the Result-Code AVP value to DIAMETER_UNABLE_TO_COMPLY in the Diameter SAA message. Otherwise, if the SIP-User-Data-Already-Available AVP value is set to USER_DATA_NOT_AVAILABLE, then the Diameter server SHOULD include the user profile data with the SIP or SIPS URI (SIP-AOR AVP) and all other SIP identities associated with that AVP in the SIP-User-Data AVP value of the Diameter SAA message. On selecting the type of user data, the Diameter server SHOULD take into account the supported formats at the SIP server (SIP-Supported-User-Data-Type AVP in the SAR message) and the local policy. o If the SIP-Server-Assignment-Type AVP value in the Diameter SAR message is set to AUTHENTICATION_FAILURE or AUTHENTICATION_TIMEOUT, the Diameter server MUST verify that there is exactly one SIP-AOR AVP in the Diameter SAR message. If the number of occurrences of the SIP-AOR AVP is not exactly one, the Diameter server MUST set the Result-Code AVP value to DIAMETER_AVP_OCCURS_TOO_MANY_TIMES in the Diameter SAA message, and SHOULD not take further actions. If there is exactly one SIP-AOR AVP in the Diameter SAR message, the Diameter server MUST clear the address of the SIP server assigned to the SIP AOR allocated to the user name, and the Diameter server MUST set the Result-Code AVP value to DIAMETER_SUCCESS in the Diameter SAA message. The Diameter server MUST consider the SIP AOR as not registered. The Message Format of the SAA command is as follows: ::= < Diameter Header: 284, PXY > < Session-Id > { Auth-Application-Id } { Result-Code } { Auth-Session-State } { Origin-Host } { Origin-Realm } * [ SIP-User-Data ] [ SIP-Accounting-Information ] * [ SIP-Supported-User-Data-Type ] [ User-Name ] [ Auth-Grace-Period ] [ Authorization-Lifetime ] [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Max-Cache-Time ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 284, /* Code */ "Server-Assignment-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Result-Code", RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "SIP-User-Data", RULE_OPTIONAL, -1, -1 } ,{ "SIP-Accounting-Information", RULE_OPTIONAL, -1, 1 } ,{ "SIP-Supported-User-Data-Type", RULE_OPTIONAL, -1, -1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 } ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Host", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd); PARSE_loc_rules( rules, cmd ); } /* Location-Info-Request (LIR) Command */ { /* The Location-Info-Request (LIR) is indicated by the Command-Code set to 285 and the Command Flags' 'R' bit set. The Diameter client in a SIP server sends this command to the Diameter server to request routing information, e.g., the URI of the SIP server assigned to the SIP-AOR AVP value allocated to the users. The Message Format of the LIR command is as follows: ::= < Diameter Header: 285, REQ, PXY > < Session-Id > { Auth-Application-Id } { Auth-Session-State } { Origin-Host } { Origin-Realm } { Destination-Realm } { SIP-AOR } [ Destination-Host ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 285, /* Code */ "Location-Info-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } ,{ "SIP-AOR", RULE_REQUIRED, -1, 1 } ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd); PARSE_loc_rules( rules, cmd ); } /* Location-Info-Answer (LIA) Command */ { /* The Location-Info-Answer (LIA) is indicated by the Command-Code set to 285 and the Command Flags' 'R' bit cleared. The Diameter server sends this command in response to a previously received Diameter Location-Info-Request (LIR) command. In addition to the values already defined in RFC 3588 [RFC3588], the Result-Code AVP may contain one of the values defined in Section 10.1. When the Diameter server finds an error in processing the Diameter LIR message, the Diameter server MUST stop the process of the message and answer with a Diameter LIA message that includes the appropriate error code in the Result-Code AVP value. When there is no error, the Diameter server MUST set the Result-Code AVP value to DIAMETER_SUCCESS in the Diameter LIA message. One of the errors that the Diameter server may find is that the SIP-AOR AVP value is not a valid user in the realm. In such cases, the Diameter server MUST set the Result-Code AVP value to DIAMETER_ERROR_USER_UNKNOWN and return it in a Diameter LIA message. If the Diameter server cannot process the Diameter LIR command, e.g., due to a database error, the Diameter server MUST set the Result-Code AVP value to DIAMETER_UNABLE_TO_COMPLY and return it in a Diameter LIA message. The Diameter server MUST NOT include any SIP-Server-URI or SIP-Server-Capabilities AVP in the Diameter LIA message. The Diameter server may or may not be aware of a SIP server assigned to the SIP-AOR AVP value included in the Diameter LIR message. If the Diameter server is aware of a SIP server allocated to that particular user, the Diameter server MUST include the URI of such SIP server in the SIP-Server-URI AVP and return it in a Diameter LIA message. This is typically the situation when the user is either registered, or unregistered but a SIP server is still assigned to the user. When the Diameter server is not aware of a SIP server allocated to the user (typically the case when the user unregistered), the Result-Code AVP value in the Diameter LIA message depends on whether the Diameter server is aware that the user has services defined for unregistered users: o Those users who have services defined for unregistered users may require the allocation of a SIP server to trigger and perhaps execute those services. Therefore, when the Diameter server is not aware of an assigned SIP server, but the user has services defined for unregistered users, the Diameter server MUST set the Result-Code AVP value to DIAMETER_UNREGISTERED_SERVICE and return it in a Diameter LIA message. The Diameter server MAY also include a SIP-Server-Capabilities AVP to facilitate the SIP server (Diameter client) with the selection of an appropriate SIP server with the required capabilities. Absence of the SIP-Server- Capabilities AVP indicates to the SIP server (Diameter client) that any SIP server is suitable to be allocated for the user. o Those users who do not have service defined for unregistered users do not require further processing. The Diameter server MUST set the Result-Code AVP value to DIAMETER_ERROR_IDENTITY_NOT_REGISTERED and return it to the Diameter client in a Diameter LIA message. The SIP server (Diameter client) may return the appropriate SIP response (e.g., 480 (Temporarily unavailable)) to the original SIP request. The Message Format of the LIA command is as follows: ::= < Diameter Header: 285, PXY > < Session-Id > { Auth-Application-Id } { Result-Code } { Auth-Session-State } { Origin-Host } { Origin-Realm } [ SIP-Server-URI ] [ SIP-Server-Capabilities ] [ Auth-Grace-Period ] [ Authorization-Lifetime ] [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Max-Cache-Time ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 285, /* Code */ "Location-Info-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Result-Code", RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "SIP-Server-URI", RULE_OPTIONAL, -1, 1 } ,{ "SIP-Server-Capabilities", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 } ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Host", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd); PARSE_loc_rules( rules, cmd ); } /* Registration-Termination-Request (RTR) Command */ { /* The Registration-Termination-Request (RTR) command is indicated by the Command-Code set to 287 and the Command Flags' 'R' bit set. The Diameter server sends this command to the Diameter client in a SIP server to indicate to the SIP server that one or more SIP AORs have to be deregistered. The command allows an operator to administratively cancel the registration of a user from a centralized Diameter server. The Diameter server has the capability to initiate the deregistration of a user and inform the SIP server by means of the Diameter RTR command. The Diameter server can decide whether only one SIP AOR is going to be deregistered, a list of SIP AORs, or all the SIP AORs allocated to the user. The absence of a SIP-AOR AVP in the Diameter RTR message indicates that all the SIP AORs allocated to the user identified by the User-Name AVP are being deregistered. The Diameter server MUST include a SIP-Deregistration-Reason AVP value to indicate the reason for the deregistration. The Message Format of the RTR command is as follows: ::= < Diameter Header: 287, REQ, PXY > < Session-Id > { Auth-Application-Id } { Auth-Session-State } { Origin-Host } { Origin-Realm } { Destination-Host } { SIP-Deregistration-Reason } [ Destination-Realm ] [ User-Name ] * [ SIP-AOR ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 287, /* Code */ "Registration-Termination-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Destination-Host", RULE_REQUIRED, -1, 1 } ,{ "SIP-Deregistration-Reason",RULE_REQUIRED, -1, 1 } ,{ "Destination-Realm", RULE_OPTIONAL, -1, 1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "SIP-AOR", RULE_REQUIRED, -1, -1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd); PARSE_loc_rules( rules, cmd ); } /* Registration-Termination-Answer (RTA) Command */ { /* The Registration-Termination-Answer (RTA) is indicated by the Command-Code set to 287 and the Command Flags' 'R' bit cleared. The Diameter client sends this command in response to a previously received Diameter Registration-Termination-Request (RTR) command. In addition to the values already defined in RFC 3588 [RFC3588], the Result-Code AVP may contain one of the values defined in Section 10.1. If the SIP server (Diameter client) requires a User-Name AVP value to process the Diameter RTR request, but the Diameter RTR message did not contain a User-Name AVP value, the Diameter client MUST set the Result-Code AVP value to DIAMETER_USER_NAME_REQUIRED (see Section 10.1.2) and return it in a Diameter RTA message. The SIP server (Diameter client) applies the administrative deregistration to each of the URIs included in each of the SIP-AOR AVP values, or, if there is no SIP-AOR AVP present in the Diameter RTR request, to all the URIs allocated to the User-Name AVP value. The value of the SIP-Deregistration-Reason AVP in the Diameter RTR command has an effect on the actions performed at the SIP server (Diameter client): o If the value is set to PERMANENT_TERMINATION, then the user has terminated his/her registration to the realm. If informing the interested parties (e.g., subscribers to the "reg" event [RFC3680]) about the administrative deregistration is supported through SIP procedures, the SIP server (Diameter client) will do so. The Diameter Client in the SIP Server SHOULD NOT request a new user registration. The SIP server clears the registration state of the deregistered AORs. o If the value is set to NEW_SIP_SERVER_ASSIGNED, the Diameter server informs the SIP server (Diameter client) that a new SIP server has been allocated to the user, due to some reason. The SIP server, if supported through SIP procedures, will inform the interested parties (e.g., subscribers to the "reg" event [RFC3680]) about the administrative deregistration at this SIP server. The Diameter client in the SIP server SHOULD NOT request a new user registration. The SIP server clears the registration state of the deregistered SIP AORs. o If the value is set to SIP_SERVER_CHANGE, the Diameter server informs the SIP server (Diameter client) that a new SIP server has to be allocated to the user, e.g., due to user's capabilities requiring a new SIP server, or not enough resources in the current SIP server. If informing the interested parties about the administrative deregistration is supported through SIP procedures (e.g., subscriptions to the "reg" event [RFC3680]), the SIP server will do so. The Diameter client in the SIP Server SHOULD NOT request a new user registration. The SIP server clears the registration state of the deregistered SIP AORs. o If the value is set to REMOVE_SIP_SERVER, the Diameter server informs the SIP server (Diameter client) that the SIP server will no longer be bound in the Diameter server with that user. The SIP server can delete all data related to the user. The Message Format of the RTA command is as follows: ::= < Diameter Header: 287, PXY > < Session-Id > { Auth-Application-Id } { Result-Code } { Auth-Session-State } { Origin-Host } { Origin-Realm } [ Authorization-Lifetime ] [ Auth-Grace-Period ] [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Max-Cache-Time ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 287, /* Code */ "Registration-Termination-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Result-Code", RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Host", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd); PARSE_loc_rules( rules, cmd ); } /* Push-Profile-Request (PPR) Command */ { /* The Push-Profile-Request (PPR) command is indicated by the Command-Code set to 288 and the Command Flags' 'R' bit set. The Diameter server sends this command to the Diameter client in a SIP server to update either the user profile of an already registered user in that SIP server or the SIP accounting information. This allows an operator to modify the data of a user profile or the accounting information and push it to the SIP server where the user is registered. Each user has a user profile associated with him/her and other accounting information. The profile or the accounting information may change with time, e.g., due to addition of new services to the user. When the user profile or the accounting information changes, the Diameter server sends a Diameter Push-Profile-Request (PPR) command to the Diameter client in a SIP server, in order to start applying those new services. A PPR command MAY contain a SIP-Accounting-Information AVP that updates the addresses of the accounting servers. Changes in the addresses of the accounting servers take effect immediately. The Diameter client SHOULD close any existing accounting session with the existing server and start providing accounting information to the newly acquired accounting server. A PPR command MAY contain zero or more SIP-User-Data AVP values containing the new user profile. On selecting the type of user data, the Diameter server SHOULD take into account the supported formats at the SIP server (SIP-Supported-User-Data-Type AVP sent in a previous SAR message) and the local policy. The User-Name AVP indicates the user to whom the profile is applicable. The Message Format of the PPR command is as follows: ::= < Diameter Header: 288, REQ, PXY > < Session-Id > { Auth-Application-Id } { Auth-Session-State } { Origin-Host } { Origin-Realm } { Destination-Realm } { User-Name } * [ SIP-User-Data ] [ SIP-Accounting-Information ] [ Destination-Host ] [ Authorization-Lifetime ] [ Auth-Grace-Period ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 288, /* Code */ "Push-Profile-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } ,{ "User-Name", RULE_REQUIRED, -1, 1 } ,{ "SIP-User-Data", RULE_OPTIONAL, -1, -1 } ,{ "SIP-Accounting-Information", RULE_OPTIONAL, -1, 1 } ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } ,{ "Authorization-Lifetime", RULE_OPTIONAL, -1, 1 } ,{ "Auth-Grace-Period", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd); PARSE_loc_rules( rules, cmd ); } /* Push-Profile-Answer (PPA) Command */ { /* The Push-Profile-Answer (PPA) is indicated by the Command-Code set to 288 and the Command Flags' 'R' bit cleared. The Diameter client sends this command in response to a previously received Diameter Push-Profile-Request (PPR) command. In addition to the values already defined in RFC 3588 [RFC3588], the Result-Code AVP may contain one of the values defined in Section 10.1. If there is no error when processing the received Diameter PPR message, the SIP server (Diameter client) MUST download the received user profile from the SIP-User-Data AVP values in the Diameter PPR message and store it associated with the user specified in the User-Name AVP value. If the SIP server does not recognize or does not support some of the data transferred in the SIP-User-Data AVP values, the Diameter client in the SIP server MUST return a Diameter PPA message that includes a Result-Code AVP set to the value DIAMETER_ERROR_NOT_SUPPORTED_USER_DATA. If the SIP server (Diameter client) receives a Diameter PPR message with a User-Name AVP that is unknown, the Diameter client MUST set the Result-Code AVP value to DIAMETER_ERROR_USER_UNKNOWN and MUST return it to the Diameter server in a Diameter PPA message. If the SIP server (Diameter client) receives in the SIP-User-Data-Content AVP value (of the grouped SIP-User-Data AVP) more data than it can accept, it MUST set the Result-Code AVP value to DIAMETER_ERROR_TOO_MUCH_DATA and MUST return it to the Diameter server in a Diameter PPA message. The SIP server MUST NOT override the existing user profile with the one received in the PPR message. If the Diameter server receives the Result-Code AVP value set to DIAMETER_ERROR_TOO_MUCH_DATA in a Diameter PPA message, it SHOULD force a new re-registration of the user by sending to the Diameter client a Diameter Registration-Termination-Request (RTR) with the SIP-Deregistration-Reason AVP value set to SIP_SERVER_CHANGE. This will force a re-registration of the user and will trigger a selection of a new SIP server. If the Diameter client is not able to honor the command, for any other reason, it MUST set the Result-Code AVP value to DIAMETER_UNABLE_TO_COMPLY and it MUST return it in a Diameter PPA message. The Message Format of the PPA command is as follows: ::= < Diameter Header: 288, PXY > < Session-Id > { Auth-Application-Id } { Result-Code } { Auth-Session-State } { Origin-Host } { Origin-Realm } [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Max-Cache-Time ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 288, /* Code */ "Push-Profile-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Result-Code", RULE_REQUIRED, -1, 1 } ,{ "Auth-Session-State", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Redirect-Host", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1, -1 } ,{ "Route-Record", RULE_OPTIONAL, -1, -1 } }; CHECK_dict_new( DICT_COMMAND, &data , sip, &cmd); PARSE_loc_rules( rules, cmd ); } } LOG_D( "Extension 'Dictionary definitions for SIP' initialized"); return 0; } EXTENSION_ENTRY("dict_sip", ds_dict_init); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_busypeers/000077500000000000000000000000001333553357400240005ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_busypeers/CMakeLists.txt000066400000000000000000000014171333553357400265430ustar00rootroot00000000000000# The rt_busypeer extension PROJECT("Handling of TOO_BUSY messages and relay timeout capability routing extension" C) # Parser files BISON_FILE(rtbusy_conf.y) FLEX_FILE(rtbusy_conf.l) SET_SOURCE_FILES_PROPERTIES(lex.rtbusy_conf.c rtbusy_conf.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}") # List of source files SET( RTBUSY_SRC rtbusy.c rtbusy.h lex.rtbusy_conf.c rtbusy_conf.tab.c rtbusy_conf.tab.h ) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) # Compile these files as a freeDiameter extension FD_ADD_EXTENSION(rt_busypeers ${RTBUSY_SRC}) #### ## INSTALL section ## # We install with the daemon component because it is a base feature. INSTALL(TARGETS rt_busypeers LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-daemon) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_busypeers/rtbusy.c000066400000000000000000000242211333553357400254750ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2015, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* See doc/rt_busypeers.conf.sample for more details about the features of this extension */ #include "rtbusy.h" /* The configuration structure */ struct rtbusy_conf rtbusy_conf; static struct fd_rt_fwd_hdl * rt_busy_hdl = NULL; static void rtbusy_expirecb(void * data, DiamId_t sentto, size_t senttolen, struct msg ** req); /* The function that does the actual work */ int rt_busy_process_busy(struct msg ** pmsg, int is_req, DiamId_t sentto, size_t senttolen, union avp_value *oh) { struct msg * qry = NULL; struct rt_data * rtd = NULL; struct fd_list * candidates = NULL; int sendingattempts; int resend = 1; TRACE_ENTRY("%p(%p) %d %p %p", pmsg, pmsg?*pmsg:NULL, is_req, sentto, oh); if (is_req) { qry = *pmsg; } else { CHECK_FCT( fd_msg_answ_getq( *pmsg, &qry ) ); } CHECK_FCT( fd_msg_rt_get ( qry, &rtd ) ); ASSERT(rtd); /* rtd is the routing data associated with the query that was sent */ /* Store the error in this routing data, this avoids sending the message to the same peer again */ CHECK_FCT( fd_rtd_error_add(rtd, sentto, senttolen, (uint8_t *)(oh ? (DiamId_t)oh->os.data : fd_g_config->cnf_diamid), oh ? oh->os.len : fd_g_config->cnf_diamid_len , ER_DIAMETER_TOO_BUSY, &candidates, &sendingattempts) ); /* Now we need to decide if we re-send this query to a different peer or return an error to upstream */ /* First, are we exceeding the allowed attempts? */ if (rtbusy_conf.RetryMaxPeers != 0) { if (sendingattempts >= rtbusy_conf.RetryMaxPeers) { TRACE_DEBUG(FULL, "Maximum number of sending attempts reached for message %p, returning an error upstream", qry); resend = 0; } } if (resend) { /* Check if we have any valid candidate left for sending the message. This may not be 100% accurate but there should not be any situation where this is actually an issue. */ if (FD_IS_LIST_EMPTY(candidates)) { resend = 0; } else { struct rtd_candidate * first = candidates->next->o; if (first->score < 0) /* No more candidate available */ resend = 0; } } /* Ok, now act on the message, we know what to do */ if (resend) { if (!is_req) { /* We must free the answer we received, and send the query again */ CHECK_FCT( fd_msg_answ_detach(*pmsg) ); CHECK_FCT( fd_msg_free(*pmsg) ); *pmsg = qry; } /* Send the query again. We need to re-associate the expirecb which was cleaned, if it is used */ if (rtbusy_conf.RelayTimeout) { char *buf = NULL; size_t len; struct timespec expire; CHECK_SYS( clock_gettime(CLOCK_REALTIME, &expire) ); expire.tv_sec += rtbusy_conf.RelayTimeout/1000 + ((expire.tv_nsec + (1000000LL * (rtbusy_conf.RelayTimeout % 1000))) / 1000000000LL); expire.tv_nsec = (expire.tv_nsec + (1000000LL * (rtbusy_conf.RelayTimeout % 1000))) % 1000000000LL; CHECK_MALLOC_DO( fd_msg_dump_full(&buf, &len, NULL, *pmsg, fd_g_config->cnf_dict, 0, 1), /* nothing */); TRACE_ERROR( "No answer received for message from peer '%.*s' before timeout (%dms), re-sending: %s", (int)senttolen, sentto, rtbusy_conf.RelayTimeout, buf); free(buf); CHECK_FCT( fd_msg_send_timeout( pmsg, NULL, NULL, rtbusy_expirecb, &expire ) ); } else { CHECK_FCT( fd_msg_send(pmsg, NULL, NULL) ); } } else { if (is_req) { char *buf = NULL; size_t len; CHECK_MALLOC_DO( fd_msg_dump_full(&buf, &len, NULL, *pmsg, fd_g_config->cnf_dict, 0, 1), /* nothing */); TRACE_ERROR( "No answer received for message from peer '%.*s' before timeout (%dms), giving up and sending error reply: %s", (int)senttolen, sentto, rtbusy_conf.RelayTimeout, buf); free(buf); /* We must create an answer */ CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, pmsg, MSGFL_ANSW_ERROR ) ); CHECK_FCT( fd_msg_rescode_set(*pmsg, "DIAMETER_TOO_BUSY", "[rt_busypeers] Timeout reached while waiting for an answer", NULL, 1 ) ); CHECK_FCT( fd_msg_send(pmsg, NULL, NULL) ); } /* Otherwise, we have nothing to do at all, the answer will be forwarded upstream as part of the normal processing */ } return 0; } /* Callback called on expiry of the timeout timer */ static void rtbusy_expirecb(void * data, DiamId_t sentto, size_t senttolen, struct msg ** preq) { CHECK_FCT_DO( rt_busy_process_busy(preq, 1, sentto, senttolen, NULL), /* continue */ ); } /* the routing callback that handles all the tasks of this extension */ static int rtbusy_fwd_cb(void * cbdata, struct msg ** pmsg) { struct msg_hdr * hdr; struct avp * avp; union avp_value *a_rc = NULL, *a_oh = NULL; DiamId_t sentto = NULL; size_t senttolen; /* Get the header of the message */ CHECK_FCT( fd_msg_hdr(*pmsg, &hdr) ); /* If the message is a request, we only associate the timeout */ if (hdr->msg_flags & CMD_FLAG_REQUEST) { struct timespec expire; CHECK_SYS( clock_gettime(CLOCK_REALTIME, &expire) ); expire.tv_sec += rtbusy_conf.RelayTimeout/1000 + ((expire.tv_nsec + (1000000LL * (rtbusy_conf.RelayTimeout % 1000))) / 1000000000LL); expire.tv_nsec = (expire.tv_nsec + (1000000LL * (rtbusy_conf.RelayTimeout % 1000))) % 1000000000LL; CHECK_FCT( fd_msg_anscb_associate( *pmsg, NULL, NULL, rtbusy_expirecb, &expire ) ); return 0; } /* From this point, the message is an answer; we need to check if the E flag is set and if the Result-Code is DIAMETER_TOO_BUSY */ if (!(hdr->msg_flags & CMD_FLAG_ERROR)) { /* This answer does not have the E flag, no need to process further */ return 0; } CHECK_FCT( fd_msg_source_get( *pmsg, &sentto, &senttolen ) ); /* Now get the AVPs we are interested in */ CHECK_FCT( fd_msg_browse(*pmsg, MSG_BRW_FIRST_CHILD, &avp, NULL) ); while (avp) { struct avp_hdr * ahdr; CHECK_FCT( fd_msg_avp_hdr( avp, &ahdr ) ); if (! (ahdr->avp_flags & AVP_FLAG_VENDOR)) { switch (ahdr->avp_code) { case AC_ORIGIN_HOST: /* Parse this AVP */ CHECK_FCT( fd_msg_parse_dict ( avp, fd_g_config->cnf_dict, NULL ) ); ASSERT( ahdr->avp_value ); a_oh = ahdr->avp_value; break; case AC_RESULT_CODE: /* Parse this AVP */ CHECK_FCT( fd_msg_parse_dict ( avp, fd_g_config->cnf_dict, NULL ) ); ASSERT( ahdr->avp_value ); a_rc = ahdr->avp_value; if (a_rc->u32 != ER_DIAMETER_TOO_BUSY) { /* It is not a TOO_BUSY error, we don't do anything */ goto out; } break; } if (a_rc && a_oh) break; } /* Go to next AVP */ CHECK_FCT( fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL) ); } /* Check we have received the necessary information */ if (!a_rc) { TRACE_ERROR( "Invalid Diameter answer without a Result-Code AVP, rt_busypeer module gave up processing"); goto out; } if (!a_oh) { TRACE_ERROR( "Invalid Diameter answer without an Origin-Host AVP, rt_busypeer module gave up processing"); goto out; } /* Pass this error to the function that processes BUSY status */ CHECK_FCT( rt_busy_process_busy(pmsg, 0, sentto, senttolen, a_oh) ); out: return 0; } /* entry point */ static int rtbusy_entry(char * conffile) { enum fd_rt_fwd_dir dir = RT_FWD_ANS; TRACE_ENTRY("%p", conffile); /* Initialize the configuration */ memset(&rtbusy_conf, 0, sizeof(rtbusy_conf)); /* Parse the configuration file */ CHECK_FCT( rtbusy_conf_handle(conffile) ); if (rtbusy_conf.SkipTooBusyErrors && !rtbusy_conf.RelayTimeout) { TRACE_NOTICE("[rt_busypeers] Configuration file does not specify any behavior (no effect)!"); return 0; } if (rtbusy_conf.SkipTooBusyErrors) dir = RT_FWD_REQ; /* in this case, RelayTimeout is not 0 */ else if (rtbusy_conf.RelayTimeout) dir = RT_FWD_ALL; /* Register the callback */ CHECK_FCT( fd_rt_fwd_register ( rtbusy_fwd_cb, NULL, dir, &rt_busy_hdl ) ); /* We're done */ return 0; } /* Unload */ void fd_ext_fini(void) { TRACE_ENTRY(); /* Unregister the cb */ if (rt_busy_hdl) CHECK_FCT_DO( fd_rt_fwd_unregister ( rt_busy_hdl, NULL), /* continue */); /* Done */ return ; } EXTENSION_ENTRY("rt_busypeers", rtbusy_entry); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_busypeers/rtbusy.h000066400000000000000000000052011333553357400254770ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* * See the rt_busypeers.conf.sample file for the format of the configuration file. */ /* FreeDiameter's common include file */ #include /* Parse the configuration file */ int rtbusy_conf_handle(char * conffile); /* The configuration structure */ extern struct rtbusy_conf { int SkipTooBusyErrors; int RetryDistantPeers; int RetryMaxPeers; int RelayTimeout; } rtbusy_conf; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_busypeers/rtbusy_conf.l000066400000000000000000000075451333553357400265250ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Tokenizer * */ %{ #include "rtbusy.h" #include "rtbusy_conf.tab.h" /* Update the column information */ #define YY_USER_ACTION { \ yylloc->first_column = yylloc->last_column + 1; \ yylloc->last_column = yylloc->first_column + yyleng - 1; \ } /* Avoid warning with newer flex */ #define YY_NO_INPUT %} qstring \"[^\"\n]*\" %option bison-bridge bison-locations %option noyywrap %option nounput %% /* Update the line count */ \n { yylloc->first_line++; yylloc->last_line++; yylloc->last_column=0; } /* Eat all spaces but not new lines */ ([[:space:]]{-}[\n])+ ; /* Eat all comments */ #.*$ ; /* Recognize any integer */ [-]?[[:digit:]]+ { /* Convert this to an integer value */ int ret=0; ret = sscanf(yytext, "%i", &yylval->integer); if (ret != 1) { /* No matching: an error occurred */ TRACE_ERROR("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); return LEX_ERROR; /* trig an error in yacc parser */ /* Maybe we could REJECT instead of failing here? */ } return INTEGER; } /* The key words */ (?i:"SkipTooBusyErrors") { return SKIPTOOBUSYERRORS; } (?i:"RetryDistantPeers") { return RETRYDISTANTPEERS; } (?i:"RetryMaxPeers") { return RETRYMAXPEERS; } (?i:"RelayTimeout") { return RELAYTIMEOUT; } /* Valid single characters for yyparse */ [=;] { return yytext[0]; } /* Unrecognized sequence, if it did not match any previous pattern */ [^[:space:]=;\n]+ { TRACE_ERROR("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); return LEX_ERROR; } %% nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_busypeers/rtbusy_conf.y000066400000000000000000000121411333553357400265260ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Yacc extension's configuration parser. */ /* For development only : */ %debug %error-verbose /* The parser receives the configuration file filename as parameter */ %parse-param {char * conffile} /* Keep track of location */ %locations %pure-parser %{ #include "rtbusy.h" #include "rtbusy_conf.tab.h" /* Forward declaration */ int yyparse(char * conffile); /* Parse the configuration file */ int rtbusy_conf_handle(char * conffile) { extern FILE * rtbusy_confin; int ret; TRACE_ENTRY("%p", conffile); TRACE_DEBUG (FULL, "Parsing configuration file: %s...", conffile); rtbusy_confin = fopen(conffile, "r"); if (rtbusy_confin == NULL) { ret = errno; TRACE_ERROR("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret)); return ret; } ret = yyparse(conffile); fclose(rtbusy_confin); if (ret != 0) { TRACE_ERROR( "Unable to parse the configuration file."); return EINVAL; } else { TRACE_DEBUG(FULL, "[rt_busypeers] Configuration: %d-%d-%d-%d.", rtbusy_conf.SkipTooBusyErrors, rtbusy_conf.RetryDistantPeers, rtbusy_conf.RetryMaxPeers, rtbusy_conf.RelayTimeout); } return 0; } /* The Lex parser prototype */ int rtbusy_conflex(YYSTYPE *lvalp, YYLTYPE *llocp); /* Function to report the errors */ void yyerror (YYLTYPE *ploc, char * conffile, char const *s) { TRACE_DEBUG(INFO, "Error in configuration parsing"); if (ploc->first_line != ploc->last_line) fd_log_error("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); else if (ploc->first_column != ploc->last_column) fd_log_error("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); else fd_log_error("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); } %} /* Values returned by lex for token */ %union { int integer; } /* In case of error in the lexical analysis */ %token LEX_ERROR /* A (de)quoted string (malloc'd in lex parser; it must be freed after use) */ %token INTEGER /* Tokens */ %token SKIPTOOBUSYERRORS %token RETRYDISTANTPEERS %token RETRYMAXPEERS %token RELAYTIMEOUT /* -------------------------------------- */ %% /* The grammar definition */ conffile: /* empty is OK */ | conffile toobusy | conffile distant | conffile maxretry | conffile timeout | conffile errors { yyerror(&yylloc, conffile, "An error occurred while parsing the configuration file"); return EINVAL; } ; /* Lexical or syntax error */ errors: LEX_ERROR | error ; toobusy: SKIPTOOBUSYERRORS ';' { rtbusy_conf.SkipTooBusyErrors=1; } ; distant: RETRYDISTANTPEERS ';' { rtbusy_conf.RetryDistantPeers=1; } ; maxretry: RETRYMAXPEERS '=' INTEGER ';' { rtbusy_conf.RetryMaxPeers=$3; } ; timeout: RELAYTIMEOUT '=' INTEGER ';' { rtbusy_conf.RelayTimeout=$3; } ; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_default/000077500000000000000000000000001333553357400234035ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_default/CMakeLists.txt000066400000000000000000000022101333553357400261360ustar00rootroot00000000000000# The rt_default extension PROJECT("Configurable routing extension" C) # Check if REG_STARTEND is provided on the host SET(CHECK_REG_STARTEND_SOURCE_CODE " #include #include int main() { return regexec(NULL, NULL, 0, NULL, REG_STARTEND); } ") CHECK_C_SOURCE_COMPILES("${CHECK_REG_STARTEND_SOURCE_CODE}" HAVE_REG_STARTEND) # Generate the host.h file CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/rt_default-host.h.in ${CMAKE_CURRENT_BINARY_DIR}/rt_default-host.h) # Parser files BISON_FILE(rtd_conf.y) FLEX_FILE(rtd_conf.l) SET_SOURCE_FILES_PROPERTIES(lex.rtd_conf.c rtd_conf.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}") # List of source files SET( RT_DEFAULT_SRC rt_default.c rt_default.h lex.rtd_conf.c rtd_conf.tab.c rtd_conf.tab.h rtd_rules.c ) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) # Compile these files as a freeDiameter extension FD_ADD_EXTENSION(rt_default ${RT_DEFAULT_SRC}) #### ## INSTALL section ## # We install with the daemon component because it is a base feature. INSTALL(TARGETS rt_default LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-daemon) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_default/rt_default-host.h.in000066400000000000000000000045601333553357400272720ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2011, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Configuration from compile-time */ #ifndef RTD_IS_CONFIG #define RTD_IS_CONFIG #cmakedefine HAVE_REG_STARTEND #endif /* RTD_IS_CONFIG */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_default/rt_default.c000066400000000000000000000066451333553357400257130ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* * Configurable routing of messages for freeDiameter. */ #include "rt_default.h" /* The callback called on new messages */ static int rtd_out(void * cbdata, struct msg ** pmsg, struct fd_list * candidates) { struct msg * msg = *pmsg; TRACE_ENTRY("%p %p %p", cbdata, msg, candidates); CHECK_PARAMS(msg && candidates); /* Simply pass it to the appropriate function */ if (FD_IS_LIST_EMPTY(candidates)) { return 0; } else { return rtd_process( msg, candidates ); } } /* handler */ static struct fd_rt_out_hdl * rtd_hdl = NULL; /* entry point */ static int rtd_entry(char * conffile) { TRACE_ENTRY("%p", conffile); /* Initialize the repo */ CHECK_FCT( rtd_init() ); /* Parse the configuration file */ CHECK_FCT( rtd_conf_handle(conffile) ); #if 0 /* Dump the rules */ rtd_dump(); #endif /* 0 */ /* Register the callback */ CHECK_FCT( fd_rt_out_register( rtd_out, NULL, 5, &rtd_hdl ) ); /* We're done */ return 0; } /* Unload */ void fd_ext_fini(void) { TRACE_ENTRY(); /* Unregister the cb */ CHECK_FCT_DO( fd_rt_out_unregister ( rtd_hdl, NULL ), /* continue */ ); /* Destroy the data */ rtd_fini(); /* Done */ return ; } EXTENSION_ENTRY("rt_default", rtd_entry); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_default/rt_default.h000066400000000000000000000065161333553357400257150ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2011, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Header file for the rt_default extension. * * See the rt_default.conf.sample file for the format of the configuration file. */ /* FreeDiameter's common include file */ #include /* Host configuration for this specific extension */ #include /* Parse the configuration file */ int rtd_conf_handle(char * conffile); /* Initialize the rules repository */ int rtd_init(void); /* Destroy the rules repository */ void rtd_fini(void); /* Some constants definitions */ enum rtd_crit_type { RTD_CRI_ALL = 0, RTD_CRI_OH, RTD_CRI_OR, RTD_CRI_DH, RTD_CRI_DR, RTD_CRI_UN, RTD_CRI_SI, RTD_CRI_MAX }; enum rtd_targ_type { RTD_TAR_ID = 0, RTD_TAR_REALM, RTD_TAR_MAX }; #define RTD_CRIT_REG 0x1 #define RTD_TARG_REG 0x2 /* Add a rule */ int rtd_add(enum rtd_crit_type ct, char * criteria, enum rtd_targ_type tt, char * target, int score, int flags); /* Process a message & peer list through the rules repository, updating the scores */ int rtd_process( struct msg * msg, struct fd_list * candidates ); /* For debug: dump the rule repository */ void rtd_dump(void); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_default/rtd_conf.l000066400000000000000000000130731333553357400253620ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Tokenizer * */ %{ #include "rt_default.h" /* Include yacc tokens definitions */ #include "rtd_conf.tab.h" /* Update the column information */ #define YY_USER_ACTION { \ yylloc->first_column = yylloc->last_column + 1; \ yylloc->last_column = yylloc->first_column + yyleng - 1; \ } /* Avoid warning with newer flex */ #define YY_NO_INPUT %} qstring \"[^\"\n]*\" %option bison-bridge bison-locations %option noyywrap %option nounput %% /* Update the line count */ \n { yylloc->first_line++; yylloc->last_line++; yylloc->last_column=0; } /* Eat all spaces but not new lines */ ([[:space:]]{-}[\n])+ ; /* Eat all comments */ #.*$ ; /* Recognize any integer */ [-]?[[:digit:]]+ { /* Convert this to an integer value */ int ret=0; ret = sscanf(yytext, "%i", &yylval->integer); if (ret != 1) { /* No matching: an error occurred */ fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); return LEX_ERROR; /* trig an error in yacc parser */ /* Maybe we could REJECT instead of failing here? */ } return INTEGER; } /* In addition, recognize some constant names as integers also */ (?i:"NO_DELIVERY") { yylval->integer = FD_SCORE_NO_DELIVERY; return INTEGER; } (?i:"DEFAULT") { yylval->integer = FD_SCORE_DEFAULT; return INTEGER; } (?i:"DEFAULT_REALM") { yylval->integer = FD_SCORE_DEFAULT_REALM; return INTEGER; } (?i:"REALM") { yylval->integer = FD_SCORE_REALM; return INTEGER; } (?i:"REDIR_HOST") { yylval->integer = FD_SCORE_REDIR_HOST; return INTEGER; } (?i:"REDIR_APP") { yylval->integer = FD_SCORE_REDIR_APP; return INTEGER; } (?i:"REDIR_REALM") { yylval->integer = FD_SCORE_REDIR_REALM; return INTEGER; } (?i:"REDIR_REALM_APP") { yylval->integer = FD_SCORE_REDIR_REALM_APP; return INTEGER; } (?i:"REDIR_USER") { yylval->integer = FD_SCORE_REDIR_USER; return INTEGER; } (?i:"REDIR_SESSION") { yylval->integer = FD_SCORE_REDIR_SESSION; return INTEGER; } (?i:"FINALDEST") { yylval->integer = FD_SCORE_FINALDEST; return INTEGER; } /* Recognize bracketed quoted strings */ [[]{qstring}[]] { /* Match a quoted string containing a regex */ CHECK_MALLOC_DO( yylval->string = strdup(yytext+2), { TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s", yytext, strerror(errno)); return LEX_ERROR; /* trig an error in yacc parser */ } ); yylval->string[strlen(yytext) - 4] = '\0'; return BQSTRING; } /* Recognize quoted strings */ {qstring} { /* Match a quoted string. */ CHECK_MALLOC_DO( yylval->string = strdup(yytext+1), { TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s", yytext, strerror(errno)); return LEX_ERROR; /* trig an error in yacc parser */ } ); yylval->string[strlen(yytext) - 2] = '\0'; return QSTRING; } /* The key words */ (?i:"oh") { return OH; } (?i:"or") { return OR; } (?i:"dh") { return DH; } (?i:"dr") { return DR; } (?i:"un") { return UN; } (?i:"si") { return SI; } (?i:"rlm") { return REALM; } /* Valid single characters for yyparse */ [*:=+-;] { return yytext[0]; } /* Unrecognized sequence, if it did not match any previous pattern */ [^[:space:]\"*:=+;\n]+ { fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); return LEX_ERROR; } %% nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_default/rtd_conf.y000066400000000000000000000161051333553357400253760ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Yacc extension's configuration parser. * See doc/rt_default.conf.sample for configuration file format */ /* For development only : */ %debug %error-verbose /* The parser receives the configuration file filename as parameter */ %parse-param {char * conffile} /* Keep track of location */ %locations %pure-parser %{ #include "rt_default.h" #include "rtd_conf.tab.h" /* bison is not smart enough to define the YYLTYPE before including this code, so... */ /* Forward declaration */ int yyparse(char * conffile); static int rules_added = 0; /* Parse the configuration file */ int rtd_conf_handle(char * conffile) { extern FILE * rtd_confin; int ret; TRACE_ENTRY("%p", conffile); TRACE_DEBUG (FULL, "Parsing configuration file: %s...", conffile); rtd_confin = fopen(conffile, "r"); if (rtd_confin == NULL) { ret = errno; fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret)); TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file."); return ret; } ret = yyparse(conffile); fclose(rtd_confin); if (ret != 0) { TRACE_DEBUG (INFO, "Unable to parse the configuration file."); return EINVAL; } else { TRACE_DEBUG(FULL, "Added %d RULES routing entries successfully.", rules_added); } return 0; } /* The Lex parser prototype */ int rtd_conflex(YYSTYPE *lvalp, YYLTYPE *llocp); /* Function to report the errors */ void yyerror (YYLTYPE *ploc, char * conffile, char const *s) { TRACE_DEBUG(INFO, "Error in configuration parsing"); if (ploc->first_line != ploc->last_line) fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); else if (ploc->first_column != ploc->last_column) fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); else fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); } %} /* Values returned by lex for token */ %union { int integer; /* Store integer values */ char *string; /* The string is allocated by strdup in lex.*/ struct { char * str; int regex; } tstring; /* typed string */ struct { char * str; int regex; enum rtd_crit_type type; } criteria; struct { char * str; int regex; enum rtd_targ_type type; } target; } /* In case of error in the lexical analysis */ %token LEX_ERROR /* A (de)quoted string (malloc'd in lex parser; it must be freed after use) */ %token QSTRING /* A (de)bracket-quoted string (malloc'd in lex parser; it must be freed after use): ["blahblah"] */ %token BQSTRING /* An integer value */ %token INTEGER /* The types for this gramar */ %type TSTRING %type CRITERIA %type TARGET %type EXPR_INT /* Tokens */ %token OH %token OR %token DH %token DR %token UN %token SI %token REALM /* -------------------------------------- */ %% /* The grammar definition */ conffile: /* empty grammar is OK */ | conffile rule ; /* a RULE entry */ rule: CRITERIA ':' TARGET '+' '=' EXPR_INT ';' { int flag = 0; if ($1.regex) flag |= RTD_CRIT_REG; if ($3.regex) flag |= RTD_TARG_REG; /* Add this rule to the repository */ CHECK_FCT_DO( rtd_add($1.type, $1.str, $3.type, $3.str, $6, flag), { yyerror (&yylloc, conffile, "An error occurred while adding a rule, aborting..."); YYERROR; } ); rules_added++; } ; /* QSTRING and BQSTRING are equivalent in the grammar */ TSTRING: QSTRING { $$.str = $1; $$.regex = 0; } | BQSTRING { $$.str = $1; $$.regex = 1; } ; /* Details of the CRITERIA type */ CRITERIA: '*' { $$.str = NULL; $$.regex = 0; $$.type = RTD_CRI_ALL; } | OH '=' TSTRING { $$.str = $3.str; $$.regex =$3.regex; $$.type = RTD_CRI_OH; } | OR '=' TSTRING { $$.str = $3.str; $$.regex =$3.regex; $$.type = RTD_CRI_OR; } | DH '=' TSTRING { $$.str = $3.str; $$.regex =$3.regex; $$.type = RTD_CRI_DH; } | DR '=' TSTRING { $$.str = $3.str; $$.regex =$3.regex; $$.type = RTD_CRI_DR; } | UN '=' TSTRING { $$.str = $3.str; $$.regex =$3.regex; $$.type = RTD_CRI_UN; } | SI '=' TSTRING { $$.str = $3.str; $$.regex =$3.regex; $$.type = RTD_CRI_SI; } ; /* Details of the TARGET type */ TARGET: TSTRING { $$.str = $1.str; $$.regex =$1.regex; $$.type = RTD_TAR_ID; } | REALM '=' TSTRING { $$.str = $3.str; $$.regex =$3.regex; $$.type = RTD_TAR_REALM; } ; /* An expression that has an integer value; we allow + and - operators cause it is convenient */ EXPR_INT: INTEGER { $$ = $1; } | EXPR_INT '+' INTEGER { $$ = $1 + $3; } | EXPR_INT '-' INTEGER { $$ = $1 - $3; } ; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_default/rtd_rules.c000066400000000000000000000452721333553357400255640ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "rt_default.h" /* The regular expressions header */ #include /* We will search for each candidate peer all the rules that are defined, and check which one applies to the message * Therefore our repository is organized hierarchicaly. * At the top level, we have two lists of TARGETS (one for IDENTITY, one for REALM), ordered as follow: * - first, the TARGETS defined with a regular expression. We will try matching all regexp to all candidates in the list. * - then, the TARGETS defined by a plain text. We don't have to compare the whole list to each candidate since the list is ordered. * * Under each TARGET element, we have the list of RULES that are defined for this target, ordered by CRITERIA type, then is_regex, then string value. * * Note: Except during configuration parsing and module termination, the lists are only ever accessed read-only, so we do not need a lock. */ /* Structure to hold the data that is used for matching. */ struct match_data { int is_regex; /* determines how the string is matched */ char *plain; /* match this value with strcasecmp if is_regex is false. The string is allocated by the lex tokenizer, must be freed at the end. */ regex_t preg; /* match with regexec if is_regex is true. regfree must be called at the end. A copy of the original string is anyway saved in plain. */ }; /* The sentinels for the TARGET lists */ static struct fd_list TARGETS[RTD_TAR_MAX]; /* Structure of a TARGET element */ struct target { struct fd_list chain; /* link in the top-level list */ struct match_data md; /* the data to determine if the current candidate matches this element */ struct fd_list rules[RTD_CRI_MAX]; /* Sentinels for the lists of rules applying to this target. One list per rtd_crit_type */ /* note : we do not need the rtd_targ_type here, it is implied by the root of the list this target element is attached to */ }; /* Structure of a RULE element */ struct rule { struct fd_list chain; /* link in the parent target list */ struct match_data md; /* the data that the criteria must match, -- ignored for RTD_CRI_ALL */ int score; /* The score added to the candidate, if the message matches this criteria */ /* The type of rule depends on the sentinel */ }; /*********************************************************************/ /* Compile a regular expression pattern */ static int compile_regex( regex_t * preg, char * str ) { int err; /* Compile the regular expression */ err = regcomp(preg, str, REG_EXTENDED | REG_NOSUB); if (err != 0) { char * buf; size_t bl; /* Error while compiling the regex */ TRACE_DEBUG(INFO, "Error while compiling the regular expression '%s':", str); /* Get the error message size */ bl = regerror(err, preg, NULL, 0); /* Alloc the buffer for error message */ CHECK_MALLOC( buf = malloc(bl) ); /* Get the error message content */ regerror(err, preg, buf, bl); TRACE_DEBUG(INFO, "\t%s", buf); /* Free the buffer, return the error */ free(buf); return EINVAL; } return 0; } /* Create a target item and initialize its content */ static struct target * new_target(char * str, int regex) { int i; struct target *new = NULL; CHECK_MALLOC_DO( new = malloc(sizeof(struct target)), return NULL ); memset(new, 0, sizeof(struct target)); fd_list_init(&new->chain, new); new->md.plain = str; new->md.is_regex = regex; if (regex) { CHECK_FCT_DO( compile_regex(&new->md.preg, str), { free(new); return NULL; } ); } for (i = 0; i < RTD_CRI_MAX; i++) { fd_list_init(&new->rules[i], new); } return new; } /* Create a rule item and initialize its content; return NULL in case of error */ static struct rule * new_rule(char * str, int regex, int score) { struct rule *new = NULL; CHECK_MALLOC_DO( new = malloc(sizeof(struct rule)), return NULL ); memset(new, 0, sizeof(struct rule)); fd_list_init(&new->chain, new); new->md.plain = str; new->md.is_regex = regex; if (regex) { CHECK_FCT_DO( compile_regex(&new->md.preg, str), { free(new); return NULL; } ); } new->score = score; return new; } /* Debug functions */ static void dump_rule(int indent, struct rule * rule) { fd_log_debug("%*s%s%s%s += %d", indent, "", rule->md.is_regex ? "[" : "'", rule->md.plain, rule->md.is_regex ? "]" : "'", rule->score); } static void dump_target(int indent, struct target * target) { int i; fd_log_debug("%*s%s%s%s :", indent, "", target->md.is_regex ? "[" : "'", target->md.plain ?: "(empty)", target->md.is_regex ? "]" : "'"); for (i = 0; i < RTD_CRI_MAX; i++) { if (! FD_IS_LIST_EMPTY(&target->rules[i])) { struct fd_list * li; fd_log_debug("%*s rules[%d]:", indent, "", i); for (li = target->rules[i].next; li != &target->rules[i]; li = li->next) { dump_rule(indent + 3, (struct rule *)li); } } } } static void clear_md(struct match_data * md) { /* delete the string */ if (md->plain) { free(md->plain); md->plain = NULL; } /* delete the preg if needed */ if (md->is_regex) { regfree(&md->preg); md->is_regex = 0; } } /* Destroy a rule item */ static void del_rule(struct rule * del) { /* Unlink this rule */ fd_list_unlink(&del->chain); /* Delete the match data */ clear_md(&del->md); free(del); } /* Destroy a target item, and all its rules */ static void del_target(struct target * del) { int i; /* Unlink this target */ fd_list_unlink(&del->chain); /* Delete the match data */ clear_md(&del->md); /* Delete the children rules */ for (i = 0; i < RTD_CRI_MAX; i++) { while (! FD_IS_LIST_EMPTY(&del->rules[i]) ) { del_rule((struct rule *)(del->rules[i].next)); } } free(del); } /* Compare a string with a match_data value. *res contains the result of the comparison (always >0 for regex non-match situations) */ static int compare_match(char * str, size_t len, struct match_data * md, int * res) { int err; CHECK_PARAMS( str && md && res ); /* Plain strings: we compare with strncasecmp */ if (md->is_regex == 0) { *res = strncasecmp(str, md->plain, len); return 0; } /* Regexp */ *res = 1; #ifdef HAVE_REG_STARTEND { regmatch_t pmatch[1]; memset(pmatch, 0, sizeof(pmatch)); pmatch[0].rm_so = 0; pmatch[0].rm_eo = len; err = regexec(&md->preg, str, 0, pmatch, REG_STARTEND); } #else /* HAVE_REG_STARTEND */ { /* We have to create a copy of the string in this case */ char *mystrcpy; CHECK_MALLOC( mystrcpy = os0dup(str, len) ); err = regexec(&md->preg, mystrcpy, 0, NULL, 0); free(mystrcpy); } #endif /* HAVE_REG_STARTEND */ /* Now check the result */ if (err == 0) { /* We have a match */ *res = 0; return 0; } if (err == REG_NOMATCH) { *res = 1; return 0; } /* In other cases, we have an error */ { char * buf; size_t bl; /* Error while compiling the regex */ TRACE_DEBUG(INFO, "Error while executing the regular expression '%s':", md->plain); /* Get the error message size */ bl = regerror(err, &md->preg, NULL, 0); /* Alloc the buffer for error message */ CHECK_MALLOC( buf = malloc(bl) ); /* Get the error message content */ regerror(err, &md->preg, buf, bl); TRACE_DEBUG(INFO, "\t%s", buf); /* Free the buffer, return the error */ free(buf); } return (err == REG_ESPACE) ? ENOMEM : EINVAL; } /* Search in list (targets or rules) the next matching item for octet string str(len). Returned in next_match, or *next_match == NULL if no more match. Re-enter with same next_match for the next one. */ static int get_next_match(struct fd_list * list, char * str, size_t len, struct fd_list ** next_match) { struct fd_list * li; TRACE_ENTRY("%p %p %zd %p", list, str, len, next_match); CHECK_PARAMS(list && str && len && next_match); if (*next_match) li = (*next_match)->next; else li = list->next; /* Initialize the return value */ *next_match = NULL; for ( ; li != list; li = li->next) { int cmp; struct { struct fd_list chain; struct match_data md; } * next_item = (void *)li; /* Check if the string matches this next item */ CHECK_FCT( compare_match(str, len, &next_item->md, &cmp) ); if (cmp == 0) { /* matched! */ *next_match = li; return 0; } if (cmp < 0) /* we can stop searching */ break; } /* We're done with the list */ return 0; } static struct dict_object * AVP_MODELS[RTD_CRI_MAX]; /*********************************************************************/ /* Prepare the module */ int rtd_init(void) { int i; TRACE_ENTRY(); for (i = 0; i < RTD_TAR_MAX; i++) { fd_list_init(&TARGETS[i], NULL); } for (i = 1; i < RTD_CRI_MAX; i++) { switch (i) { case RTD_CRI_OH: CHECK_FCT( fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Host", &AVP_MODELS[i], ENOENT )); break; case RTD_CRI_OR: CHECK_FCT( fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Realm", &AVP_MODELS[i], ENOENT )); break; case RTD_CRI_DH: CHECK_FCT( fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Host", &AVP_MODELS[i], ENOENT )); break; case RTD_CRI_DR: CHECK_FCT( fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Realm", &AVP_MODELS[i], ENOENT )); break; case RTD_CRI_UN: CHECK_FCT( fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "User-Name", &AVP_MODELS[i], ENOENT )); break; case RTD_CRI_SI: CHECK_FCT( fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Session-Id", &AVP_MODELS[i], ENOENT )); break; default: TRACE_DEBUG(INFO, "Missing definition in extension initializer"); ASSERT( 0 ); return EINVAL; } } return 0; } /* Destroy the module's data */ void rtd_fini(void) { int i; TRACE_ENTRY(); for (i = 0; i < RTD_TAR_MAX; i++) { while (!FD_IS_LIST_EMPTY(&TARGETS[i])) { del_target((struct target *) TARGETS[i].next); } } } /* Add a new rule in the repository. this is called when the configuration file is being parsed */ int rtd_add(enum rtd_crit_type ct, char * criteria, enum rtd_targ_type tt, char * target, int score, int flags) { struct fd_list * target_suiv = NULL; struct fd_list * rule_suiv = NULL; struct target * trg = NULL; struct rule * rul = NULL; TRACE_ENTRY("%d %p %d %p %d %x", ct, criteria, tt, target, score, flags); CHECK_PARAMS((ct < RTD_CRI_MAX) && ((ct == RTD_CRI_ALL) || criteria) && (tt < RTD_TAR_MAX) && target); /* First, search in the TARGET list if we already have this target */ for (target_suiv = TARGETS[tt].next; target_suiv != &TARGETS[tt]; target_suiv = target_suiv->next) { int cmp; struct target * cur = (struct target *)target_suiv; if (flags & RTD_TARG_REG) { /* We are adding a regexp, it is saved in the list before the plain expressions */ if (cur->md.is_regex == 0) break; } else { /* We are adding a plain expression, save it after all regexps */ if (cur->md.is_regex != 0) continue; } /* At this point, the type is the same, so compare the plain string value */ cmp = strcmp(cur->md.plain, target); if (cmp < 0) continue; if (cmp == 0) /* We already have a target with the same string */ trg = cur; break; } if (trg) { /* Ok, we can free the target string, we will use the previously allocated one */ free(target); } else { CHECK_MALLOC( trg = new_target(target, flags & RTD_TARG_REG) ); fd_list_insert_before( target_suiv, &trg->chain ); } /* Now, search for the rule position in this target's list */ if (ct == RTD_CRI_ALL) { /* Special case: we don't have a criteria -- always create a rule element */ CHECK_MALLOC( rul = new_rule(NULL, 0, score) ); fd_list_insert_before( &trg->rules[RTD_CRI_ALL], &rul->chain ); } else { for (rule_suiv = trg->rules[ct].next; rule_suiv != &trg->rules[ct]; rule_suiv = rule_suiv->next) { int cmp; struct rule * cur = (struct rule *)rule_suiv; if (flags & RTD_CRIT_REG) { /* We are adding a regexp, it is saved in the list before the plain expressions */ if (cur->md.is_regex == 0) break; } else { /* We are adding a plain expression, save it after all regexps */ if (cur->md.is_regex != 0) continue; } /* At this point, the type is the same, so compare the plain string value */ cmp = strcmp(cur->md.plain, criteria); if (cmp < 0) continue; if (cmp == 0) /* We already have a target with the same string */ rul = cur; break; } if (rul) { /* Ok, we can free the target string, we will use the previously allocated one */ free(criteria); TRACE_DEBUG(INFO, "Warning: duplicate rule (%s : %s) found, merging score...", rul->md.plain, trg->md.plain); rul->score += score; } else { CHECK_MALLOC( rul = new_rule(criteria, flags & RTD_CRIT_REG, score) ); fd_list_insert_before( rule_suiv, &rul->chain ); } } return 0; } /* Check if a message and list of eligible candidate match any of our rules, and update its score according to it. */ int rtd_process( struct msg * msg, struct fd_list * candidates ) { struct fd_list * li; struct { enum { NOT_RESOLVED_YET = 0, NOT_FOUND, FOUND } status; union avp_value * avp; } parsed_msg_avp[RTD_CRI_MAX]; TRACE_ENTRY("%p %p", msg, candidates); CHECK_PARAMS(msg && candidates); /* We delay looking for the AVPs in the message until we really need them. Another approach would be to parse the message once and save all needed AVPs. */ memset(parsed_msg_avp, 0, sizeof(parsed_msg_avp)); /* For each candidate in the list */ for (li = candidates->next; li != candidates; li = li->next) { struct rtd_candidate * cand = (struct rtd_candidate *)li; int i; struct { char * str; size_t len; } cand_data[RTD_TAR_MAX] = { { cand->diamid, strlen(cand->diamid) }, { cand->realm, strlen(cand->realm) } }; for (i = 0; i < RTD_TAR_MAX; i++) { /* Search the next rule matching this candidate in the i-th target list */ struct target * target = NULL; do { int j; struct fd_list * l; struct rule * r; CHECK_FCT ( get_next_match( &TARGETS[i], cand_data[i].str, cand_data[i].len, (void *)&target) ); if (!target) break; /* First, apply all rules of criteria RTD_CRI_ALL */ for ( l = target->rules[RTD_CRI_ALL].next; l != &target->rules[RTD_CRI_ALL]; l = l->next ) { r = (struct rule *)l; cand->score += r->score; TRACE_DEBUG(ANNOYING, "Applied rule {'*' : '%s' += %d} to candidate '%s'", target->md.plain, r->score, cand->diamid); } /* The target is matching this candidate, check if there are additional rules criteria matching this message. */ for ( j = 1; j < RTD_CRI_MAX; j++ ) { if ( ! FD_IS_LIST_EMPTY(&target->rules[j]) ) { /* if needed, find the required data in the message */ if (parsed_msg_avp[j].status == NOT_RESOLVED_YET) { struct avp * avp = NULL; /* Search for the AVP in the message */ CHECK_FCT( fd_msg_search_avp ( msg, AVP_MODELS[j], &avp ) ); if (avp == NULL) { parsed_msg_avp[j].status = NOT_FOUND; } else { struct avp_hdr * ahdr = NULL; CHECK_FCT( fd_msg_avp_hdr ( avp, &ahdr ) ); if (ahdr->avp_value == NULL) { /* This should not happen, but anyway let's just ignore it */ parsed_msg_avp[j].status = NOT_FOUND; } else { /* OK, we got the AVP */ parsed_msg_avp[j].status = FOUND; parsed_msg_avp[j].avp = ahdr->avp_value; } } } /* If we did not find the data for these rules in the message, just skip the series */ if (parsed_msg_avp[j].status == NOT_FOUND) { TRACE_DEBUG(ANNOYING, "Skipping series of rules %d of target '%s', criteria absent from the message", j, target->md.plain); continue; } /* OK, we can now check if one of our rule's criteria match the message content */ r = NULL; do { CHECK_FCT ( get_next_match( &target->rules[j], (char *) /* is this cast safe? */ parsed_msg_avp[j].avp->os.data, parsed_msg_avp[j].avp->os.len, (void *)&r) ); if (!r) break; cand->score += r->score; TRACE_DEBUG(ANNOYING, "Applied rule {'%s' : '%s' += %d} to candidate '%s'", r->md.plain, target->md.plain, r->score, cand->diamid); } while (1); } } } while (1); } } return 0; } void rtd_dump(void) { int i; fd_log_debug("[rt_default] Dumping rules repository..."); for (i = 0; i < RTD_TAR_MAX; i++) { if (!FD_IS_LIST_EMPTY( &TARGETS[i] )) { struct fd_list * li; fd_log_debug(" Targets list %d:", i); for (li = TARGETS[i].next; li != &TARGETS[i]; li = li->next) { dump_target(4, (struct target *)li); } } } fd_log_debug("[rt_default] End of dump"); } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_ereg/000077500000000000000000000000001333553357400227015ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_ereg/CMakeLists.txt000066400000000000000000000021361333553357400254430ustar00rootroot00000000000000# The rt_ereg extension PROJECT("Regular expression matching based routing extension" C) # Check if REG_STARTEND is provided on the host SET(CHECK_REG_STARTEND_SOURCE_CODE " #include #include int main() { return regexec(NULL, NULL, 0, NULL, REG_STARTEND); } ") CHECK_C_SOURCE_COMPILES("${CHECK_REG_STARTEND_SOURCE_CODE}" HAVE_REG_STARTEND) IF (HAVE_REG_STARTEND) ADD_DEFINITIONS(-DHAVE_REG_STARTEND) ENDIF (HAVE_REG_STARTEND) # Parser files BISON_FILE(rtereg_conf.y) FLEX_FILE(rtereg_conf.l) SET_SOURCE_FILES_PROPERTIES(lex.rtereg_conf.c rtereg_conf.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}") # List of source files SET( RTEREG_SRC rtereg.c rtereg.h lex.rtereg_conf.c rtereg_conf.tab.c rtereg_conf.tab.h ) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) # Compile these files as a freeDiameter extension FD_ADD_EXTENSION(rt_ereg ${RTEREG_SRC}) #### ## INSTALL section ## # We install with the daemon component because it is a base feature. INSTALL(TARGETS rt_ereg LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-daemon) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_ereg/rtereg.c000066400000000000000000000155021333553357400243400ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* * This extension allows to perform some pattern-matching on an AVP * and send the message to a server accordingly. * See rt_ereg.conf.sample file for the format of the configuration file. */ #include "rtereg.h" /* The configuration structure */ struct rtereg_conf rtereg_conf; #ifndef HAVE_REG_STARTEND static char * buf = NULL; static size_t bufsz; static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; #endif /* HAVE_REG_STARTEND */ static int proceed(char * value, size_t len, struct fd_list * candidates) { int i; for (i = 0; i < rtereg_conf.rules_nb; i++) { /* Does this pattern match the value? */ struct rtereg_rule * r = &rtereg_conf.rules[i]; int err = 0; struct fd_list * c; TRACE_DEBUG(ANNOYING, "Attempt pattern matching of '%.*s' with rule '%s'", (int)len, value, r->pattern); #ifdef HAVE_REG_STARTEND { regmatch_t pmatch[1]; memset(pmatch, 0, sizeof(pmatch)); pmatch[0].rm_so = 0; pmatch[0].rm_eo = len; err = regexec(&r->preg, value, 0, pmatch, REG_STARTEND); } #else /* HAVE_REG_STARTEND */ { /* We have a 0-terminated string */ err = regexec(&r->preg, value, 0, NULL, 0); } #endif /* HAVE_REG_STARTEND */ if (err == REG_NOMATCH) continue; if (err != 0) { char * errstr; size_t bl; /* Error while compiling the regex */ TRACE_DEBUG(INFO, "Error while executing the regular expression '%s':", r->pattern); /* Get the error message size */ bl = regerror(err, &r->preg, NULL, 0); /* Alloc the buffer for error message */ CHECK_MALLOC( errstr = malloc(bl) ); /* Get the error message content */ regerror(err, &r->preg, errstr, bl); TRACE_DEBUG(INFO, "\t%s", errstr); /* Free the buffer, return the error */ free(errstr); return (err == REG_ESPACE) ? ENOMEM : EINVAL; } /* From this point, the expression matched the AVP value */ TRACE_DEBUG(FULL, "[rt_ereg] Match: '%s' to value '%.*s' => '%s' += %d", r->pattern, (int)len, value, r->server, r->score); for (c = candidates->next; c != candidates; c = c->next) { struct rtd_candidate * cand = (struct rtd_candidate *)c; if (strcmp(r->server, cand->diamid) == 0) { cand->score += r->score; break; } } }; return 0; } /* The callback called on new messages */ static int rtereg_out(void * cbdata, struct msg ** pmsg, struct fd_list * candidates) { struct msg * msg = *pmsg; struct avp * avp = NULL; TRACE_ENTRY("%p %p %p", cbdata, msg, candidates); CHECK_PARAMS(msg && candidates); /* Check if it is worth processing the message */ if (FD_IS_LIST_EMPTY(candidates)) { return 0; } /* Now search the AVP in the message */ CHECK_FCT( fd_msg_search_avp ( msg, rtereg_conf.avp, &avp ) ); if (avp != NULL) { struct avp_hdr * ahdr = NULL; CHECK_FCT( fd_msg_avp_hdr ( avp, &ahdr ) ); if (ahdr->avp_value != NULL) { #ifndef HAVE_REG_STARTEND int ret; /* Lock the buffer */ CHECK_POSIX( pthread_mutex_lock(&mtx) ); /* Augment the buffer if needed */ if (ahdr->avp_value->os.len >= bufsz) { CHECK_MALLOC_DO( buf = realloc(buf, ahdr->avp_value->os.len + 1), { pthread_mutex_unlock(&mtx); return ENOMEM; } ); } /* Copy the AVP value */ memcpy(buf, ahdr->avp_value->os.data, ahdr->avp_value->os.len); buf[ahdr->avp_value->os.len] = '\0'; /* Now apply the rules */ ret = proceed(buf, ahdr->avp_value->os.len, candidates); CHECK_POSIX(pthread_mutex_unlock(&mtx)); CHECK_FCT(ret); #else /* HAVE_REG_STARTEND */ CHECK_FCT( proceed((char *) ahdr->avp_value->os.data, ahdr->avp_value->os.len, candidates) ); #endif /* HAVE_REG_STARTEND */ } } return 0; } /* handler */ static struct fd_rt_out_hdl * rtereg_hdl = NULL; /* entry point */ static int rtereg_entry(char * conffile) { TRACE_ENTRY("%p", conffile); /* Initialize the configuration */ memset(&rtereg_conf, 0, sizeof(rtereg_conf)); /* Parse the configuration file */ CHECK_FCT( rtereg_conf_handle(conffile) ); /* Register the callback */ CHECK_FCT( fd_rt_out_register( rtereg_out, NULL, 1, &rtereg_hdl ) ); /* We're done */ return 0; } /* Unload */ void fd_ext_fini(void) { int i; TRACE_ENTRY(); /* Unregister the cb */ CHECK_FCT_DO( fd_rt_out_unregister ( rtereg_hdl, NULL ), /* continue */ ); /* Destroy the data */ if (rtereg_conf.rules) for (i = 0; i < rtereg_conf.rules_nb; i++) { free(rtereg_conf.rules[i].pattern); free(rtereg_conf.rules[i].server); regfree(&rtereg_conf.rules[i].preg); } free(rtereg_conf.rules); #ifndef HAVE_REG_STARTEND free(buf); #endif /* HAVE_REG_STARTEND */ /* Done */ return ; } EXTENSION_ENTRY("rt_ereg", rtereg_entry); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_ereg/rtereg.h000066400000000000000000000060431333553357400243450ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2011, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* * See the rt_ereg.conf.sample file for the format of the configuration file. */ /* FreeDiameter's common include file */ #include #include /* Parse the configuration file */ int rtereg_conf_handle(char * conffile); struct rtereg_rule { char * pattern; /* The pattern we try to match the AVP value to */ regex_t preg; /* compiled regex */ char * server; /* The peer that gets its score raised in case of match */ int score; /* The relative value that is added to the peer's score */ }; /* The configuration structure */ extern struct rtereg_conf { int rules_nb; /* Number of rules in the configuration */ struct rtereg_rule *rules; /* The array of rules */ struct dict_object * avp; /* cache the dictionary object that we are searching */ } rtereg_conf; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_ereg/rtereg_conf.l000066400000000000000000000101161333553357400253520ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Tokenizer * */ %{ #include "rtereg.h" /* Include yacc tokens definitions */ #include "rtereg_conf.tab.h" /* Update the column information */ #define YY_USER_ACTION { \ yylloc->first_column = yylloc->last_column + 1; \ yylloc->last_column = yylloc->first_column + yyleng - 1; \ } /* Avoid warning with newer flex */ #define YY_NO_INPUT %} qstring \"[^\"\n]*\" %option bison-bridge bison-locations %option noyywrap %option nounput %% /* Update the line count */ \n { yylloc->first_line++; yylloc->last_line++; yylloc->last_column=0; } /* Eat all spaces but not new lines */ ([[:space:]]{-}[\n])+ ; /* Eat all comments */ #.*$ ; /* Recognize quoted strings */ {qstring} { /* Match a quoted string. */ CHECK_MALLOC_DO( yylval->string = strdup(yytext+1), { TRACE_DEBUG(INFO, "Unable to copy the string '%s': %s", yytext, strerror(errno)); return LEX_ERROR; /* trig an error in yacc parser */ } ); yylval->string[strlen(yytext) - 2] = '\0'; return QSTRING; } /* Recognize any integer */ [-]?[[:digit:]]+ { /* Convert this to an integer value */ int ret=0; ret = sscanf(yytext, "%i", &yylval->integer); if (ret != 1) { /* No matching: an error occurred */ fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); return LEX_ERROR; /* trig an error in yacc parser */ /* Maybe we could REJECT instead of failing here? */ } return INTEGER; } /* The key words */ (?i:"AVP") { return AVP; } /* Valid single characters for yyparse */ [=:;+-] { return yytext[0]; } /* Unrecognized sequence, if it did not match any previous pattern */ [^[:space:]\":=+;\n]+ { fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); return LEX_ERROR; } %% nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_ereg/rtereg_conf.y000066400000000000000000000153511333553357400253750ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Yacc extension's configuration parser. */ /* For development only : */ %debug %error-verbose /* The parser receives the configuration file filename as parameter */ %parse-param {char * conffile} /* Keep track of location */ %locations %pure-parser %{ #include "rtereg.h" #include "rtereg_conf.tab.h" /* bison is not smart enough to define the YYLTYPE before including this code, so... */ /* Forward declaration */ int yyparse(char * conffile); /* Parse the configuration file */ int rtereg_conf_handle(char * conffile) { extern FILE * rtereg_confin; int ret; TRACE_ENTRY("%p", conffile); TRACE_DEBUG (FULL, "Parsing configuration file: %s...", conffile); rtereg_confin = fopen(conffile, "r"); if (rtereg_confin == NULL) { ret = errno; fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret)); TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file."); return ret; } ret = yyparse(conffile); fclose(rtereg_confin); if (ret != 0) { TRACE_DEBUG (INFO, "Unable to parse the configuration file."); return EINVAL; } else { TRACE_DEBUG(FULL, "[rt-ereg] Added %d rules successfully.", rtereg_conf.rules_nb); } return 0; } /* The Lex parser prototype */ int rtereg_conflex(YYSTYPE *lvalp, YYLTYPE *llocp); /* Function to report the errors */ void yyerror (YYLTYPE *ploc, char * conffile, char const *s) { TRACE_DEBUG(INFO, "Error in configuration parsing"); if (ploc->first_line != ploc->last_line) fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); else if (ploc->first_column != ploc->last_column) fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); else fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); } %} /* Values returned by lex for token */ %union { char *string; /* The string is allocated by strdup in lex.*/ int integer; } /* In case of error in the lexical analysis */ %token LEX_ERROR /* A (de)quoted string (malloc'd in lex parser; it must be freed after use) */ %token QSTRING %token INTEGER /* Tokens */ %token AVP /* -------------------------------------- */ %% /* The grammar definition */ conffile: rules avp rules ; /* a server entry */ avp: AVP '=' QSTRING ';' { if (rtereg_conf.avp != NULL) { yyerror(&yylloc, conffile, "Only one AVP can be specified"); YYERROR; } CHECK_FCT_DO( fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, $3, &rtereg_conf.avp, ENOENT ), { TRACE_DEBUG(INFO, "Unable to find '%s' AVP in the loaded dictionaries.", $3); yyerror (&yylloc, conffile, "Invalid AVP value."); YYERROR; } ); /* Now check the type */ { struct dict_avp_data data; CHECK_FCT( fd_dict_getval( rtereg_conf.avp, &data) ); CHECK_PARAMS_DO (data.avp_basetype == AVP_TYPE_OCTETSTRING, { TRACE_DEBUG(INFO, "'%s' AVP in not an OCTETSTRING AVP (%d).", $3, data.avp_basetype); yyerror (&yylloc, conffile, "AVP in not an OCTETSTRING type."); YYERROR; } ); } } ; rules: /* empty OK */ | rules rule ; rule: QSTRING ':' QSTRING '+' '=' INTEGER ';' { struct rtereg_rule * new; int err; /* Add new rule in the array */ rtereg_conf.rules_nb += 1; CHECK_MALLOC_DO(rtereg_conf.rules = realloc(rtereg_conf.rules, rtereg_conf.rules_nb * sizeof(struct rtereg_rule)), { yyerror (&yylloc, conffile, "Not enough memory to store the configuration..."); YYERROR; } ); new = &rtereg_conf.rules[rtereg_conf.rules_nb - 1]; new->pattern = $1; new->server = $3; new->score = $6; /* Attempt to compile the regex */ CHECK_FCT_DO( err=regcomp(&new->preg, new->pattern, REG_EXTENDED | REG_NOSUB), { char * buf; size_t bl; /* Error while compiling the regex */ TRACE_DEBUG(INFO, "Error while compiling the regular expression '%s':", new->pattern); /* Get the error message size */ bl = regerror(err, &new->preg, NULL, 0); /* Alloc the buffer for error message */ CHECK_MALLOC( buf = malloc(bl) ); /* Get the error message content */ regerror(err, &new->preg, buf, bl); TRACE_DEBUG(INFO, "\t%s", buf); /* Free the buffer, return the error */ free(buf); yyerror (&yylloc, conffile, "Invalid regular expression."); YYERROR; } ); } ; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_ignore_dh/000077500000000000000000000000001333553357400237155ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_ignore_dh/CMakeLists.txt000066400000000000000000000010711333553357400264540ustar00rootroot00000000000000# The rt_ignore_dh extension PROJECT("Routing extension that removes Destination-Host from messages and restores from Proxy-Info for answers" C) # List of source files SET(RT_IGNORE_DH_SRC rt_ignore_dh.c ) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) # Compile these files as a freeDiameter extension FD_ADD_EXTENSION(rt_ignore_dh ${RT_IGNORE_DH_SRC}) #### ## INSTALL section ## # We install with the daemon component because it is a base feature. INSTALL(TARGETS rt_ignore_dh LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-daemon) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_ignore_dh/rt_ignore_dh.c000066400000000000000000000223711333553357400265310ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Thomas Klausner * * * * Copyright (c) 2013, Thomas Klausner * * All rights reserved. * * * * Written under contract by nfotex IT GmbH, http://nfotex.com/ * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * *********************************************************************************************************/ #include /* * Remove Destination-Hosts, putting it into Proxy-Info, and restore it to * Origin-Host for answers. */ struct dict_object * dh_avp_do; /* cache the Destination-Host dictionary object */ struct dict_object * oh_avp_do; /* cache the Origin-Host dictionary object */ struct dict_object * ph_avp_do; /* cache the Proxy-Host dictionary object */ struct dict_object * pi_avp_do; /* cache the Proxy-Info dictionary object */ struct dict_object * ps_avp_do; /* cache the Proxy-State dictionary object */ static int restore_origin_host(struct msg **msg) { struct avp *avp, *child; struct avp *oh_avp = NULL; struct avp *pi_avp = NULL; void *ps, *new_oh; size_t ps_len, new_oh_len = 0; union avp_value val; ps = new_oh = NULL; CHECK_FCT(fd_msg_browse(*msg, MSG_BRW_FIRST_CHILD, &avp, NULL)); /* look for Origin-Host and Proxy-Info matching this host */ while (avp && (!oh_avp || !pi_avp)) { struct avp_hdr * ahdr; int match = 0; CHECK_FCT(fd_msg_avp_hdr(avp, &ahdr)); if (!(ahdr->avp_flags & AVP_FLAG_VENDOR)) { switch (ahdr->avp_code) { case AC_ORIGIN_HOST: oh_avp = avp; CHECK_FCT(fd_msg_parse_dict(oh_avp, fd_g_config->cnf_dict, NULL)); break; case AC_PROXY_INFO: ps = NULL; ps_len = 0; CHECK_FCT(fd_msg_parse_dict(avp, fd_g_config->cnf_dict, NULL)); CHECK_FCT(fd_msg_browse(avp, MSG_BRW_FIRST_CHILD, &child, NULL)); while (child && (!match || !ps)) { struct avp_hdr *chdr; CHECK_FCT(fd_msg_avp_hdr(child, &chdr)); if (!(chdr->avp_flags & AVP_FLAG_VENDOR)) { switch (chdr->avp_code) { case AC_PROXY_HOST: if (fd_os_cmp(chdr->avp_value->os.data, chdr->avp_value->os.len, fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len) == 0) { match = 1; } break; case AC_PROXY_STATE: ps = chdr->avp_value->os.data; ps_len = chdr->avp_value->os.len; break; default: break; } } CHECK_FCT(fd_msg_browse(child, MSG_BRW_NEXT, &child, NULL)); } if (match && ps) { new_oh = ps; new_oh_len = ps_len; pi_avp = avp; } break; default: break; } } CHECK_FCT(fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL)); } if (!pi_avp) return 0; memset(&val, 0, sizeof(val)); val.os.data = new_oh; val.os.len = new_oh_len; if (!oh_avp) { TRACE_ERROR("Message contained no Origin-Host"); } else { CHECK_FCT(fd_msg_avp_setvalue(oh_avp, &val)); } fd_msg_free((msg_or_avp*)pi_avp); fd_log_debug("Restored Origin-Host '%.*s' from Proxy-Info", (int)new_oh_len, (char *)new_oh); return 0; } static int stow_destination_host(struct msg **msg) { struct avp * avp = NULL; struct avp * ph_avp = NULL; struct avp * pi_avp = NULL; struct avp * ps_avp = NULL; /* Look for the Destination-Host AVP in the message */ CHECK_FCT(fd_msg_search_avp(*msg, dh_avp_do, &avp)); if (avp != NULL) { struct avp_hdr * ahdr = NULL; union avp_value val; CHECK_FCT(fd_msg_avp_hdr(avp, &ahdr)); if (ahdr->avp_value != NULL) { /* add Proxy-Info->{Proxy-Host, Proxy-State} using Destination-Host information */ CHECK_FCT(fd_msg_avp_new(ph_avp_do, 0, &ph_avp)); memset(&val, 0, sizeof(val)); val.os.data = (uint8_t *)(fd_g_config->cnf_diamid); val.os.len = fd_g_config->cnf_diamid_len; CHECK_FCT(fd_msg_avp_setvalue(ph_avp, &val)); CHECK_FCT(fd_msg_avp_new(ps_avp_do, 0, &ps_avp)); memset(&val, 0, sizeof(val)); val.os.data = ahdr->avp_value->os.data; val.os.len = ahdr->avp_value->os.len; CHECK_FCT(fd_msg_avp_setvalue(ps_avp, &val)); CHECK_FCT(fd_msg_avp_new(pi_avp_do, 0, &pi_avp)); CHECK_FCT(fd_msg_avp_add(pi_avp, MSG_BRW_LAST_CHILD, ph_avp)); CHECK_FCT(fd_msg_avp_add(pi_avp, MSG_BRW_LAST_CHILD, ps_avp)); /* remove Destination-Host from message */ fd_msg_free((msg_or_avp*)avp); /* add Proxy-Info */ CHECK_FCT(fd_msg_avp_add(*msg, MSG_BRW_LAST_CHILD, pi_avp)); fd_log_debug("Stowed Destination-Host '%.*s' into Proxy-Info", (int)val.os.len, (const char *)val.os.data); } } return 0; } /* The callback for putting Destination-Host into Proxy-Info and restoring it on the way back */ static int rt_ignore_destination_host(void * cbdata, struct msg **msg) { struct msg_hdr * hdr; int ret; TRACE_ENTRY("%p %p", cbdata, msg); CHECK_PARAMS(msg && *msg); /* Read the message header */ CHECK_FCT(fd_msg_hdr(*msg, &hdr)); if (hdr->msg_flags & CMD_FLAG_REQUEST) { ret = stow_destination_host(msg); } else { ret = restore_origin_host(msg); } return ret; } /* handler */ static struct fd_rt_fwd_hdl * rt_ignore_destination_host_hdl = NULL; /* entry point */ static int rt_ignore_destination_host_entry(char * conffile) { CHECK_FCT_DO(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Host", &dh_avp_do, ENOENT), { TRACE_ERROR("Unable to find 'Destination-Host' AVP in the loaded dictionaries."); }); CHECK_FCT_DO(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Host", &oh_avp_do, ENOENT), { TRACE_ERROR("Unable to find 'Origin-Host' AVP in the loaded dictionaries."); }); CHECK_FCT_DO(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Proxy-Host", &ph_avp_do, ENOENT), { TRACE_ERROR("Unable to find 'Proxy-Host' AVP in the loaded dictionaries."); }); CHECK_FCT_DO(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Proxy-Info", &pi_avp_do, ENOENT), { TRACE_ERROR("Unable to find 'Proxy-Info' AVP in the loaded dictionaries."); }); CHECK_FCT_DO(fd_dict_search(fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Proxy-State", &ps_avp_do, ENOENT), { TRACE_ERROR("Unable to find 'Proxy-State' AVP in the loaded dictionaries."); }); /* Register the callback */ CHECK_FCT(fd_rt_fwd_register(rt_ignore_destination_host, NULL, RT_FWD_ALL, &rt_ignore_destination_host_hdl)); TRACE_DEBUG(INFO, "Extension 'Ignore Destination Host' initialized"); return 0; } /* Unload */ void fd_ext_fini(void) { /* Unregister the callbacks */ CHECK_FCT_DO(fd_rt_fwd_unregister(rt_ignore_destination_host_hdl, NULL), /* continue */); return ; } EXTENSION_ENTRY("rt_ignore_destination_host", rt_ignore_destination_host_entry); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_load_balance/000077500000000000000000000000001333553357400243435ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_load_balance/CMakeLists.txt000066400000000000000000000011121333553357400270760ustar00rootroot00000000000000# The rt_load_balance extension PROJECT("Routing extension splits requests evenly over multiple hosts, using current load as routing indicator" C) # List of source files SET(RT_LOAD_BALANCE_SRC rt_load_balance.c ) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) # Compile these files as a freeDiameter extension FD_ADD_EXTENSION(rt_load_balance ${RT_LOAD_BALANCE_SRC}) #### ## INSTALL section ## # We install with the daemon component because it is a base feature. INSTALL(TARGETS rt_load_balance LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-daemon) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_load_balance/rt_load_balance.c000066400000000000000000000121231333553357400275770ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Thomas Klausner * * * * Copyright (c) 2013, 2014 Thomas Klausner * * All rights reserved. * * * * Written under contract by nfotex IT GmbH, http://nfotex.com/ * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * *********************************************************************************************************/ #include /* * Load balancing extension. Send request to least-loaded node. */ /* The callback for load balancing the requests across the peers */ static int rt_load_balancing(void * cbdata, struct msg ** pmsg, struct fd_list * candidates) { struct fd_list *lic; struct msg * msg = *pmsg; TRACE_ENTRY("%p %p %p", cbdata, msg, candidates); CHECK_PARAMS(msg && candidates); /* Check if it is worth processing the message */ if (FD_IS_LIST_EMPTY(candidates)) return 0; /* load balancing */ for (lic = candidates->next; lic != candidates; lic = lic->next) { struct rtd_candidate * cand = (struct rtd_candidate *) lic; struct peer_hdr *peer; long to_receive, to_send, load; int score; CHECK_FCT(fd_peer_getbyid(cand->diamid, cand->diamidlen, 0, &peer)); CHECK_FCT(fd_peer_get_load_pending(peer, &to_receive, &to_send)); load = to_receive + to_send; /* other routing mechanisms need to add to the * appropriate entries so their base value is high * enough that they are considered */ /* logarithmic scaling */ int load_log = 0; while (load > 0) { load_log++; load /= 2; } score = cand->score; cand->score -= load_log; TRACE_DEBUG(FULL, "evaluated peer `%.*s', score was %d, now %d", (int)cand->diamidlen, cand->diamid, score, cand->score); } return 0; } /* handler */ static struct fd_rt_out_hdl * rt_load_balancing_hdl = NULL; /* entry point */ static int rt_load_balance_entry(char * conffile) { /* Register the callback */ CHECK_FCT(fd_rt_out_register(rt_load_balancing, NULL, 10, &rt_load_balancing_hdl)); TRACE_DEBUG(INFO, "Extension 'Load Balancing' initialized"); return 0; } /* Unload */ void fd_ext_fini(void) { /* Unregister the callbacks */ CHECK_FCT_DO(fd_rt_out_unregister(rt_load_balancing_hdl, NULL), /* continue */); return ; } EXTENSION_ENTRY("rt_load_balance", rt_load_balance_entry); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_randomize/000077500000000000000000000000001333553357400237475ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_randomize/CMakeLists.txt000066400000000000000000000011101333553357400265000ustar00rootroot00000000000000# The rt_randomize extension PROJECT("Routing extension randomly increases the routing count for one of the highest-rated hosts, if there are multiple ones" C) # List of source files SET(RT_RANDOMIZE_SRC rt_randomize.c ) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) # Compile these files as a freeDiameter extension FD_ADD_EXTENSION(rt_randomize ${RT_RANDOMIZE_SRC}) #### ## INSTALL section ## # We install with the daemon component because it is a base feature. INSTALL(TARGETS rt_randomize LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-daemon) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_randomize/rt_randomize.c000066400000000000000000000121541333553357400266130ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Thomas Klausner * * * * Copyright (c) 2014 Thomas Klausner * * All rights reserved. * * * * Written under contract by nfotex IT GmbH, http://nfotex.com/ * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * *********************************************************************************************************/ #include /* * Load balancing extension. If there are multiple highest-rated hosts with the same score, * randomly increase the score of one of them. */ #include static unsigned int seed; static int rt_randomizing(void * cbdata, struct msg ** pmsg, struct fd_list * candidates) { struct fd_list *lic; struct msg * msg = *pmsg; int max_score = -1; int max_score_count = 0; TRACE_ENTRY("%p %p %p", cbdata, msg, candidates); CHECK_PARAMS(msg && candidates); /* Check if it is worth processing the message */ if (FD_IS_LIST_EMPTY(candidates)) return 0; /* find out maximal score and how many candidates have it */ for (lic = candidates->next; lic != candidates; lic = lic->next) { struct rtd_candidate * cand = (struct rtd_candidate *) lic; if (max_score < cand->score) { max_score = cand->score; max_score_count = 1; } else if (cand->score == max_score) { max_score_count++; } } /* if there is more than one with positive score, randomly increase one of their scores by one */ if (max_score >= 0 && max_score_count > 1) { int lucky_candidate = rand_r(&seed) % max_score_count; int i = 0; for (lic = candidates->next; lic != candidates; lic = lic->next) { struct rtd_candidate * cand = (struct rtd_candidate *) lic; if (cand->score == max_score) { if (i == lucky_candidate) { cand->score++; break; } i++; } } } return 0; } /* handler */ static struct fd_rt_out_hdl * rt_randomizing_hdl = NULL; /* entry point */ static int rt_randomize_entry(char * conffile) { /* Register the callback */ CHECK_FCT(fd_rt_out_register(rt_randomizing, NULL, 4, &rt_randomizing_hdl)); seed = (unsigned int)time(NULL); TRACE_DEBUG(INFO, "Extension 'Randomizing' initialized"); return 0; } /* Unload */ void fd_ext_fini(void) { /* Unregister the callbacks */ CHECK_FCT_DO(fd_rt_out_unregister(rt_randomizing_hdl, NULL), /* continue */); return ; } EXTENSION_ENTRY("rt_randomize", rt_randomize_entry); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_redirect/000077500000000000000000000000001333553357400235605ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_redirect/CMakeLists.txt000066400000000000000000000006171333553357400263240ustar00rootroot00000000000000# The rt_redirect extension PROJECT("Diameter Redirect messages support" C) SET(RT_REDIR_SRC rt_redir.h rt_redir.c redir_entries.c redir_expiry.c redir_fwd.c redir_out.c uthash.h ) # Compile as a module FD_ADD_EXTENSION(rt_redirect ${RT_REDIR_SRC}) #### ## INSTALL section ## INSTALL(TARGETS rt_redirect LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-daemon) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_redirect/redir_entries.c000066400000000000000000000327341333553357400265730ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Authors: Sebastien Decugis * * and Thomas Klausner * * * * Copyright (c) 2011, 2014, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "rt_redir.h" #include "uthash.h" /* The array with all entries ordered by their data */ struct redir_line redirects_usages[H_U_MAX + 1]; /* for symmetry reasons, hash tables for all types exist, but only ALL_SESSION and ALL_USER will be used */ struct redir_entry *redirect_hash_table[H_U_MAX+1]; /* Initialize the array */ int redir_entry_init() { int i; TRACE_ENTRY(""); /* redirects_usages */ memset(&redirects_usages, 0, sizeof(redirects_usages)); for (i = 0; i <= H_U_MAX; i++) { /* only one of the two will be used for each type, but initialize both to be on the safe side */ /* initialize list */ CHECK_POSIX( pthread_rwlock_init( &redirects_usages[i].lock, NULL) ); fd_list_init( &redirects_usages[i].sentinel, &redirects_usages[i] ); /* initialize hash table */ redirect_hash_table[i] = NULL; } /* initialize the scores */ redirects_usages[ DONT_CACHE ].score = FD_SCORE_REDIR_ONCE; redirects_usages[ ALL_SESSION ].score = FD_SCORE_REDIR_SESSION; redirects_usages[ ALL_REALM ].score = FD_SCORE_REDIR_REALM; redirects_usages[ REALM_AND_APPLICATION ].score = FD_SCORE_REDIR_REALM_APP; redirects_usages[ ALL_APPLICATION ].score = FD_SCORE_REDIR_APP; redirects_usages[ ALL_HOST ].score = FD_SCORE_REDIR_HOST; redirects_usages[ ALL_USER ].score = FD_SCORE_REDIR_USER; return 0; } int redir_entry_fini() { int i; struct redir_entry *current_entry, *tmp; /* Empty all entries */ CHECK_POSIX_DO( pthread_mutex_lock(&redir_exp_peer_lock), ); for (i = 0; i <= H_U_MAX; i++) { CHECK_POSIX_DO( pthread_rwlock_wrlock( &redirects_usages[i].lock), ); switch(i) { case ALL_SESSION: case ALL_USER: HASH_ITER(hh, redirect_hash_table[i], current_entry, tmp) { HASH_DEL(redirect_hash_table[i], current_entry); CHECK_FCT_DO( redir_entry_destroy(current_entry), ); } break; default: while (!FD_IS_LIST_EMPTY(&redirects_usages[i].sentinel)) { struct redir_entry * e = redirects_usages[i].sentinel.next->o; fd_list_unlink(&e->redir_list); CHECK_FCT_DO( redir_entry_destroy(e), ); } } CHECK_POSIX_DO( pthread_rwlock_unlock( &redirects_usages[i].lock), ); CHECK_POSIX_DO( pthread_rwlock_destroy( &redirects_usages[i].lock), ); } CHECK_POSIX_DO( pthread_mutex_unlock(&redir_exp_peer_lock), ); return 0; } /* Create a new redir_entry and add the correct data */ int redir_entry_new(struct redir_entry ** e, struct fd_list * targets, uint32_t rhu, struct msg * qry, DiamId_t nh, size_t nhlen, os0_t oh, size_t ohlen) { struct redir_entry * entry = NULL; os0_t s; size_t l; TRACE_ENTRY("%p %p %d %p %p %zd %p %zd", e, targets, rhu, qry, nh, nhlen, oh, ohlen) ASSERT(e && targets && (rhu <= H_U_MAX) && qry && nh && nhlen && oh && ohlen); CHECK_MALLOC( entry = malloc(sizeof(struct redir_entry)) ); memset(entry, 0, sizeof(struct redir_entry)); entry->eyec = REDIR_ENTRY_EYEC; CHECK_MALLOC( entry->from.s = os0dup(nh, nhlen) ); entry->from.l = nhlen; fd_list_init(&entry->target_peers_list, entry); fd_list_move_end(&entry->target_peers_list, targets); fd_list_init(&entry->exp_list, entry); entry->type = rhu; /* list entry for putting into redirects_usage; also doubles as pointer into that list so it can be removed easily */ fd_list_init(&entry->redir_list, entry); /* finally initialize the data */ switch (rhu) { case DONT_CACHE: entry->data.message.msg = qry; break; case ALL_SESSION: { /* There is a good chance that the session is already cached in the message, so retrieve it */ struct session * sess; CHECK_FCT( fd_msg_sess_get(fd_g_config->cnf_dict, qry, &sess, NULL) ); if (!sess) { TRACE_DEBUG(INFO, "Received a Redirect indication with usage ALL_SESSION but no Session-Id AVP in the message, defaulting to DONT_CACHE"); entry->type = DONT_CACHE; entry->data.message.msg = qry; break; } CHECK_FCT( fd_sess_getsid(sess, &s, &l) ); CHECK_MALLOC( entry->data.session.s = os0dup(s, l) ); entry->data.session.l = l; } break; case ALL_REALM: { /* Search the Destination-Realm of the message */ struct avp * dr; struct avp_hdr * ahdr; CHECK_FCT( fd_msg_search_avp(qry, redir_dict_dr, &dr) ); if (!dr) { TRACE_DEBUG(INFO, "Received a Redirect indication with usage ALL_REALM but no Destination-Realm AVP in the message, defaulting to DONT_CACHE"); entry->type = DONT_CACHE; entry->data.message.msg = qry; break; } CHECK_FCT( fd_msg_avp_hdr( dr, &ahdr ) ); CHECK_MALLOC( entry->data.realm.s = os0dup(ahdr->avp_value->os.data, ahdr->avp_value->os.len) ); entry->data.realm.l = ahdr->avp_value->os.len; } break; case REALM_AND_APPLICATION: { /* Search the Destination-Realm of the message */ struct avp * dr; struct avp_hdr * ahdr; CHECK_FCT( fd_msg_search_avp(qry, redir_dict_dr, &dr) ); if (!dr) { TRACE_DEBUG(INFO, "Received a Redirect indication with usage REALM_AND_APPLICATION but no Destination-Realm AVP in the message, defaulting to DONT_CACHE"); entry->type = DONT_CACHE; entry->data.message.msg = qry; break; } CHECK_FCT( fd_msg_avp_hdr( dr, &ahdr ) ); CHECK_MALLOC( entry->data.realm_app.s = os0dup(ahdr->avp_value->os.data, ahdr->avp_value->os.len) ); entry->data.realm_app.l = ahdr->avp_value->os.len; } /* and then the application */ { struct msg_hdr * hdr; CHECK_FCT( fd_msg_hdr(qry, &hdr) ); entry->data.realm_app.a = hdr->msg_appl; } break; case ALL_APPLICATION: { struct msg_hdr * hdr; CHECK_FCT( fd_msg_hdr(qry, &hdr) ); entry->data.app.a = hdr->msg_appl; } break; case ALL_HOST: CHECK_MALLOC( entry->data.host.s = os0dup(oh, ohlen) ); entry->data.host.l = ohlen; break; case ALL_USER: { /* Search the User-Name of the message */ struct avp * un; struct avp_hdr * ahdr; CHECK_FCT( fd_msg_search_avp(qry, redir_dict_un, &un) ); if (!un) { TRACE_DEBUG(INFO, "Received a Redirect indication with usage ALL_USER but no User-Name AVP in the message, defaulting to DONT_CACHE"); entry->type = DONT_CACHE; entry->data.message.msg = qry; break; } CHECK_FCT( fd_msg_avp_hdr( un, &ahdr ) ); CHECK_MALLOC( entry->data.user.s = os0dup(ahdr->avp_value->os.data, ahdr->avp_value->os.len) ); entry->data.user.l = ahdr->avp_value->os.len; } break; default: ASSERT(0); return EINVAL; } /* We're done */ *e = entry; return 0; } /* Compares two pointers (DONT_CACHE) */ static int compare_entries_ptr(union matchdata * d1, union matchdata * d2) { unsigned long v1 = (unsigned long) d1->message.msg; unsigned long v2 = (unsigned long) d2->message.msg; if (v1 > v2) return 1; if (v1 < v2) return -1; return 0; } /* Compare two applications (REALM_AND_APPLICATION and ALL_APPLICATION) */ static int compare_entries_appl(union matchdata * d1, union matchdata * d2) { if (d1->app.a > d2->app.a) return 1; if (d1->app.a < d2->app.a) return -1; return 0; } /* Compare two strings (ALL_SESSION, ALL_REALM, ALL_HOST, ALL_USER) */ static int compare_entries_ostr(union matchdata * d1, union matchdata * d2) { return fd_os_cmp(d1->session.s, d1->session.l, d2->session.s, d2->session.l); } /* The array of callbacks */ int (*redir_entry_cmp_key[H_U_MAX +1])(union matchdata * , union matchdata * ) = { compare_entries_ptr, /* DONT_CACHE */ compare_entries_ostr, /* ALL_SESSION */ compare_entries_ostr, /* ALL_REALM */ compare_entries_appl, /* REALM_AND_APPLICATION */ compare_entries_appl, /* ALL_APPLICATION */ compare_entries_ostr, /* ALL_HOST */ compare_entries_ostr /* ALL_USER */ }; /* Link the newly created entry into the correct redirects_usages list. The mutex must be held */ int redir_entry_insert(struct redir_entry * e) { struct fd_list * li; struct redir_entry * r = NULL; TRACE_ENTRY("%p", e); CHECK_PARAMS(e && (e->eyec == REDIR_ENTRY_EYEC)); /* Write-Lock the line */ CHECK_POSIX( pthread_rwlock_wrlock( RWLOCK_REDIR(e) ) ); switch (e->type) { case ALL_SESSION: HASH_FIND(hh, redirect_hash_table[e->type], e->data.session.s, e->data.session.l, r); if (r) { /* previously existing entry, delete it from hash and free it */ HASH_DELETE(hh, redirect_hash_table[e->type], r); CHECK_FCT_DO( redir_entry_destroy(r), ); } HASH_ADD_KEYPTR(hh, redirect_hash_table[e->type], e->data.session.s, e->data.session.l, e); break; case ALL_USER: HASH_FIND(hh, redirect_hash_table[e->type], e->data.user.s, e->data.user.l, r); if (r) { /* previously existing entry, delete it from hash and free it */ HASH_DELETE(hh, redirect_hash_table[e->type], r); CHECK_FCT_DO( redir_entry_destroy(r), ); } HASH_ADD_KEYPTR(hh, redirect_hash_table[e->type], e->data.user.s, e->data.user.l, e); break; default: for (li = redirects_usages[e->type].sentinel.next; li != &redirects_usages[e->type].sentinel; li = li->next) { struct redir_entry * n = li->o; int cmp = redir_entry_cmp_key[e->type](&e->data, &n->data); if (cmp <= 0) break; } fd_list_insert_before(li, &e->redir_list); break; } /* unLock the line */ CHECK_POSIX( pthread_rwlock_unlock( RWLOCK_REDIR(e) ) ); return 0; } /* Destroy -- the exp_peer_lock must be held when this function is called */ int redir_entry_destroy(struct redir_entry * e) { struct redir_entry *match; TRACE_ENTRY("%p", e); CHECK_PARAMS(e && (e->eyec == REDIR_ENTRY_EYEC)); switch (e->type) { case ALL_SESSION: /* If the entry is in the hash table, lock the rwlock also */ HASH_FIND(hh, redirect_hash_table[e->type], e->data.session.s, e->data.session.l, match); if (match) { /* TODO: check if e == match? */ CHECK_POSIX( pthread_rwlock_wrlock( RWLOCK_REDIR(e) ) ); HASH_DELETE(hh, redirect_hash_table[e->type], match); CHECK_POSIX( pthread_rwlock_unlock( RWLOCK_REDIR(e) ) ); } break; case ALL_USER: /* If the entry is in the hash table, lock the rwlock also */ HASH_FIND(hh, redirect_hash_table[e->type], e->data.user.s, e->data.user.l, match); if (match) { /* TODO: check if e == match? */ CHECK_POSIX( pthread_rwlock_wrlock( RWLOCK_REDIR(e) ) ); HASH_DELETE(hh, redirect_hash_table[e->type], match); CHECK_POSIX( pthread_rwlock_unlock( RWLOCK_REDIR(e) ) ); } break; default: /* If the entry is linked, lock the rwlock also */ if (!FD_IS_LIST_EMPTY(&e->redir_list)) { CHECK_POSIX( pthread_rwlock_wrlock( RWLOCK_REDIR(e) ) ); fd_list_unlink(&e->redir_list); CHECK_POSIX( pthread_rwlock_unlock( RWLOCK_REDIR(e) ) ); } break; } /* Now unlink from other list */ fd_list_unlink(&e->exp_list); /* Empty the targets list */ while (!FD_IS_LIST_EMPTY(&e->target_peers_list)) { struct redir_host * h = (struct redir_host *)e->target_peers_list.next->o; fd_list_unlink(&h->chain); free(h->id); free(h); } /* Now we can destroy the data safely */ switch (e->type) { case DONT_CACHE: /* nothing special */ break; case ALL_SESSION: free(e->data.session.s); break; case ALL_REALM: free(e->data.realm.s); break; case REALM_AND_APPLICATION: free(e->data.realm_app.s); break; case ALL_APPLICATION: break; case ALL_HOST: free(e->data.host.s); break; case ALL_USER: free(e->data.user.s); break; default: TRACE_DEBUG(INFO, "Invalid redirect type was saved"); ASSERT(0); return EINVAL; } free(e->from.s); free(e); return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_redirect/redir_expiry.c000066400000000000000000000122401333553357400264300ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2015, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "rt_redir.h" /* Expiration management */ /* Entries by their ascending expiration date, to accelerate the work of the expire thread */ static struct fd_list expire_list = FD_LIST_INITIALIZER(expire_list); static pthread_cond_t exp_cnd = PTHREAD_COND_INITIALIZER; pthread_mutex_t redir_exp_peer_lock = PTHREAD_MUTEX_INITIALIZER; /* The thread that handles expired entries cleanup. */ void * redir_exp_thr_fct(void * arg) { fd_log_threadname ( "Redirects/expire" ); TRACE_ENTRY( "" ); CHECK_POSIX_DO( pthread_mutex_lock(&redir_exp_peer_lock), goto fatal_error ); pthread_cleanup_push( fd_cleanup_mutex, &redir_exp_peer_lock ); do { struct timespec now; struct redir_entry * first; again: /* Check if there are expiring entries available */ if (FD_IS_LIST_EMPTY(&expire_list)) { /* Just wait for a change or cancelation */ CHECK_POSIX_DO( pthread_cond_wait( &exp_cnd, &redir_exp_peer_lock ), break /* this might not pop the cleanup handler, but since we ASSERT(0), it is not the big issue... */ ); /* Restart the loop on wakeup */ goto again; } /* Get the pointer to the entry that expires first */ first = (struct redir_entry *)(expire_list.next->o); /* Get the current time */ CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &now), break ); /* If first session is not expired, we just wait until it happens */ if ( TS_IS_INFERIOR( &now, &first->timeout ) ) { CHECK_POSIX_DO2( pthread_cond_timedwait( &exp_cnd, &redir_exp_peer_lock, &first->timeout ), ETIMEDOUT, /* ETIMEDOUT is a normal error, continue */, /* on other error, */ break ); /* on wakeup, loop */ goto again; } /* Now, the first entry in the list is expired; destroy it */ CHECK_FCT_DO( redir_entry_destroy( first ), break ); } while (1); pthread_cleanup_pop( 0 ); CHECK_POSIX_DO( pthread_mutex_unlock(&redir_exp_peer_lock), ); fatal_error: TRACE_DEBUG(INFO, "A system error occurred in redirect module! Expiry thread is terminating..."); ASSERT(0); return NULL; } /* Sets the timeout value & link in expiry list. The mutex must be held on calling */ int redir_exp_set(struct redir_entry * e, uint32_t duration) { struct fd_list * li; TRACE_ENTRY("%p %d", e, duration); CHECK_PARAMS(e && (e->eyec == REDIR_ENTRY_EYEC) && duration ); /* Unlink in case it was already set before */ fd_list_unlink(&e->exp_list); /* Get current time */ CHECK_SYS( clock_gettime(CLOCK_REALTIME, &e->timeout) ); /* Add the duration */ e->timeout.tv_sec += duration; /* now search the next element in the list */ for (li = expire_list.next; li != &expire_list; li = li->next) { struct redir_entry * n = li->o; if ( TS_IS_INFERIOR( &e->timeout, &n->timeout ) ) break; } /* Insert before this element */ fd_list_insert_before(li, &e->exp_list); /* Signal the expiry thread if needed */ if (e->exp_list.prev == &expire_list) { /* it is the first element */ CHECK_POSIX( pthread_cond_signal(&exp_cnd) ); } /* Done */ return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_redirect/redir_fwd.c000066400000000000000000000227661333553357400257060ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2015, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "rt_redir.h" /* This structure contains the data to keep when a new peer's connection is attempted (for later) */ struct redir_task { struct msg * answer; /* the message that was being processed */ uint32_t rhu; /* Redirect-Host-Usage value */ uint32_t rmct; /* Redirect-Max-Cache-Time value */ struct fd_list rh; /* the list of Redirect-Hosts */ }; /* Received answers FWD callback */ int redir_fwd_cb(void * cbdata, struct msg ** msg) { struct msg * m, * q; struct rt_data *rtd; struct msg_hdr * hdr; union avp_value *a_rc = NULL, *a_rhu = NULL, *a_rmct = NULL, *a_oh = NULL; int known = 0, actives = 0; struct fd_list * li; struct avp * avp; struct redir_task task = { .answer = NULL, .rhu = 0, .rmct = 0, .rh = FD_LIST_INITIALIZER(task.rh) }; DiamId_t nh; size_t nhlen; int nbrh = 0; struct redir_entry * entry; TRACE_ENTRY("%p %p", cbdata, msg); CHECK_PARAMS(msg && *msg); m = *msg; /* First get the header */ CHECK_FCT( fd_msg_hdr(m, &hdr) ); /* Check if we have an error */ ASSERT(!(hdr->msg_flags & CMD_FLAG_REQUEST)); if (!(hdr->msg_flags & CMD_FLAG_ERROR)) { /* This answer does not have the E flag, no need to process further */ return 0; } /* Now get the AVPs we are interested in */ CHECK_FCT( fd_msg_browse(m, MSG_BRW_FIRST_CHILD, &avp, NULL) ); while (avp) { struct avp_hdr * ahdr; CHECK_FCT( fd_msg_avp_hdr( avp, &ahdr ) ); if (! (ahdr->avp_flags & AVP_FLAG_VENDOR)) { switch (ahdr->avp_code) { case AC_ORIGIN_HOST: /* Parse this AVP */ CHECK_FCT( fd_msg_parse_dict ( avp, fd_g_config->cnf_dict, NULL ) ); ASSERT( ahdr->avp_value ); a_oh = ahdr->avp_value; break; case AC_RESULT_CODE: /* Parse this AVP */ CHECK_FCT( fd_msg_parse_dict ( avp, fd_g_config->cnf_dict, NULL ) ); ASSERT( ahdr->avp_value ); a_rc = ahdr->avp_value; if (a_rc->u32 != ER_DIAMETER_REDIRECT_INDICATION) { /* It is not a REDIRECT error, we don't do anything */ goto out; } break; case AC_REDIRECT_HOST: { struct redir_host * h = NULL; DiamId_t id = NULL; size_t len = 0; int secure = 0; uint16_t port = 0; int l4 = 0; char proto = 0; /* Parse this AVP */ CHECK_FCT( fd_msg_parse_dict ( avp, fd_g_config->cnf_dict, NULL ) ); ASSERT( ahdr->avp_value ); nbrh++; CHECK_FCT_DO( fd_os_parse_DiameterURI(ahdr->avp_value->os.data, ahdr->avp_value->os.len, &id, &len, &secure, &port, &l4, &proto), { TRACE_DEBUG(INFO, "Received an invalid Redirect-Host AVP value ('%.*s'), ignored", (int)ahdr->avp_value->os.len, ahdr->avp_value->os.data); break; } ); /* Now check if the transport & protocol are supported */ if (proto && (proto != 'd')) { TRACE_DEBUG(FULL, "Ignored unsupported non-Diameter Redirect-Host AVP (%.*s)", (int)ahdr->avp_value->os.len, ahdr->avp_value->os.data); free(id); break; } if (l4 && (l4 == IPPROTO_UDP)) { TRACE_DEBUG(FULL, "Ignored unsupported UDP Redirect-Host AVP (%.*s)", (int)ahdr->avp_value->os.len, ahdr->avp_value->os.data); free(id); break; } /* It looks OK, save this entry. */ CHECK_MALLOC( h = malloc(sizeof(struct redir_host)) ); memset(h, 0, sizeof(struct redir_host)); fd_list_init(&h->chain, h); h->id = id; h->len = len; /* later: secure, port */ /* The list is kept ordered by id so that it is faster to compare to candidates later */ for (li = task.rh.next; li != &task.rh; li = li->next) { struct redir_host * nhost = li->o; if ( fd_os_cmp(id, len, nhost->id, nhost->len) <= 0 ) break; } fd_list_insert_before(li, &h->chain); } break; case AC_REDIRECT_HOST_USAGE: /* Parse this AVP */ CHECK_FCT( fd_msg_parse_dict ( avp, fd_g_config->cnf_dict, NULL ) ); ASSERT( ahdr->avp_value ); a_rhu = ahdr->avp_value; if (a_rhu->u32 > H_U_MAX) { TRACE_DEBUG(INFO, "Received unsupported Redirect-Host-Usage value (%d), defaulting to DONT_CACHE", a_rhu->u32); } else { task.rhu = a_rhu->u32; } break; case AC_REDIRECT_MAX_CACHE_TIME: /* Parse this AVP */ CHECK_FCT( fd_msg_parse_dict ( avp, fd_g_config->cnf_dict, NULL ) ); ASSERT( ahdr->avp_value ); a_rmct = ahdr->avp_value; task.rmct = a_rmct->u32; break; } } /* Go to next AVP */ CHECK_FCT( fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL) ); } /* Check we have received the necessary information */ if (!a_rc) { TRACE_DEBUG(FULL, "Invalid Diameter answer without a Result-Code AVP, Redirect module gave up"); goto out; } if (!a_oh) { TRACE_DEBUG(FULL, "Invalid Diameter answer without an Origin-Host AVP, Redirect module gave up"); goto out; } if (FD_IS_LIST_EMPTY(&task.rh)) { TRACE_DEBUG(FULL, "Diameter answer with a DIAMETER_REDIRECT_INDICATION Result-Code AVP but no valid/supported Redirect-Host AVP, Redirect module gave up"); goto out; } if (a_rhu && (task.rhu != DONT_CACHE) && !a_rmct) { TRACE_DEBUG(FULL, "Invalid Diameter Redirect answer with a Redirect-Host-Usage AVP but no Redirect-Max-Cache-Time, Redirect module gave up"); goto out; } /* It looks like we can process the Redirect indication */ /* Search for the peers we already know */ for (li = task.rh.next; li != &task.rh; li = li->next) { struct redir_host * h = li->o; struct peer_hdr * peer; CHECK_FCT( fd_peer_getbyid( h->id, h->len, 1, &peer ) ); if (peer) { known ++; memcpy(h->id, peer->info.pi_diamid, h->len); /* Overwrite the case so we can search case-sensitive from here on */ if (fd_peer_get_state(peer) == STATE_OPEN) { actives ++; } } } TRACE_DEBUG(FULL, "Redirect module: received %d Redirect-Hosts, %d are known peers, %d have an OPEN connection", nbrh, known, actives); /* in this version, we only redirect when there are known active peers. TODO: add new peers via fd_peer_add when no active peer is available */ if (!actives) { TRACE_DEBUG(INFO, "Unable to comply to Redirect indication: none of the peers included is in OPEN state"); goto out; } /* From this point, we will re-send the query to a different peer, so stop forwarding the answer here */ *msg = NULL; /* Get the query's routing data & add the new error */ CHECK_FCT( fd_msg_answ_getq(m, &q) ); CHECK_FCT( fd_msg_rt_get(q, &rtd) ); CHECK_FCT( fd_msg_source_get( m, &nh, &nhlen ) ); CHECK_FCT( fd_rtd_error_add(rtd, nh, nhlen, a_oh->os.data, a_oh->os.len, a_rc->u32, NULL, NULL) ); /* Create a redir_rule */ CHECK_FCT( redir_entry_new(&entry, &task.rh, task.rhu, q, nh, nhlen, a_oh->os.data, a_oh->os.len) ); CHECK_POSIX( pthread_mutex_lock(&redir_exp_peer_lock) ); /* Insert in the split list */ CHECK_FCT( redir_entry_insert(entry) ); /* Set the expiry */ CHECK_FCT( redir_exp_set(entry, task.rmct ?: DEFAULT_EXPIRE_TIME) ); CHECK_POSIX( pthread_mutex_unlock(&redir_exp_peer_lock) ); /* Now we can get rid of the received answer and send again the query. */ CHECK_FCT( fd_msg_answ_detach(m) ); CHECK_FCT( fd_msg_free(m) ); /* Send it */ CHECK_FCT( fd_msg_send(&q, NULL, NULL) ); /* Done! */ out: while (!FD_IS_LIST_EMPTY(&task.rh)) { struct redir_host * h = task.rh.next->o; fd_list_unlink(&h->chain); free(h->id); free(h); } return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_redirect/redir_out.c000066400000000000000000000255521333553357400257310ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Authors: Sebastien Decugis * * and Thomas Klausner * * * * Copyright (c) 2013, 2014, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "rt_redir.h" /* Find the data pertinent to a type in the input data */ static int get_data_to_match(enum redir_h_u type, struct msg *msg, union matchdata * data, int * nodata) { TRACE_ENTRY("%d %p %p %p", type, msg, data, nodata); /* Initialize the data area */ memset(data, 0, sizeof(union matchdata)); *nodata = 0; /* Now, find the appropriate information, depending on type */ switch (type) { case DONT_CACHE: data->message.msg = msg; break; case ALL_SESSION: { /* Get the sid from the message */ struct session * sess; CHECK_FCT( fd_msg_sess_get(fd_g_config->cnf_dict, msg, &sess, NULL) ); if (!sess) { TRACE_DEBUG(ANNOYING, "Message %p cannot match any ALL_SESSION rule since it does not have a Session-Id", msg); *nodata = 1; } else { CHECK_FCT( fd_sess_getsid(sess, &data->session.s, &data->session.l) ); } } break; case ALL_REALM: { /* Search the Destination-Realm in the message */ struct avp * dr; CHECK_FCT( fd_msg_search_avp(msg, redir_dict_dr, &dr) ); if (!dr) { TRACE_DEBUG(ANNOYING, "Message %p cannot match any ALL_REALM rule since it does not have a Destination-Realm", msg); *nodata = 1; } else { struct avp_hdr * ahdr; CHECK_FCT( fd_msg_avp_hdr( dr, &ahdr ) ); data->realm.s = ahdr->avp_value->os.data; data->realm.l = ahdr->avp_value->os.len; } } break; case REALM_AND_APPLICATION: { /* Search the Destination-Realm of the message */ struct avp * dr; CHECK_FCT( fd_msg_search_avp(msg, redir_dict_dr, &dr) ); if (!dr) { TRACE_DEBUG(ANNOYING, "Message %p cannot match any REALM_AND_APPLICATION rule since it does not have a Destination-Realm", msg); *nodata = 1; } else { struct avp_hdr * ahdr; CHECK_FCT( fd_msg_avp_hdr( dr, &ahdr ) ); data->realm_app.s = ahdr->avp_value->os.data; data->realm_app.l = ahdr->avp_value->os.len; /* and then the application */ { struct msg_hdr * hdr; CHECK_FCT( fd_msg_hdr(msg, &hdr) ); data->realm_app.a = hdr->msg_appl; /* Should we forbid application 0? */ } } } break; case ALL_APPLICATION: { /* Retrieve the application from the message */ struct msg_hdr * hdr; CHECK_FCT( fd_msg_hdr(msg, &hdr) ); data->app.a = hdr->msg_appl; } break; case ALL_HOST: /* This is more complex, we need to match with all candidates in each rule, it'll be done later */ break; case ALL_USER: { /* Search the User-Name of the message */ struct avp * un; CHECK_FCT( fd_msg_search_avp(msg, redir_dict_un, &un) ); if (!un) { TRACE_DEBUG(ANNOYING, "Message %p cannot match any ALL_USER rule since it does not have a User-Name", msg); *nodata = 1; } else { struct avp_hdr * ahdr; CHECK_FCT( fd_msg_avp_hdr( un, &ahdr ) ); data->user.s = ahdr->avp_value->os.data; data->user.l = ahdr->avp_value->os.len; } } break; default: ASSERT(0); return EINVAL; } return 0; } /* Apply the score from a rule if the candidate list is appropriate */ static int apply_rule(struct redir_entry * e, struct msg * msg, struct fd_list * candidates) { struct fd_list * lic, *lirh; struct rtd_candidate * c_oh = NULL; int cmp; TRACE_ENTRY("%p %p %p", e, msg, candidates); ASSERT( e && msg && candidates ); if (FD_IS_LIST_EMPTY(candidates)) { TRACE_DEBUG(ANNOYING, "Skip Redirect rule since candidates list is empty"); return 0; } /* Now search common peers between e->target_peers_list and candidates */ TRACE_DEBUG(ANNOYING, "Message %p matches a Redirect rule (t:%d, @%p), processing candidates list", msg, e->type, e); /* First, decrease the score of the host that we received the previous Redirect from, in case it is in the list */ for (lic = candidates->next; lic != candidates; lic = lic->next) { struct rtd_candidate * cand = (struct rtd_candidate *) lic; /* Special case: ALL_HOST rules: we decrease the score of the Origin-Host if present */ if (e->type == ALL_HOST) { cmp = fd_os_almostcasesrch(cand->diamid, cand->diamidlen, e->data.host.s, e->data.host.l, NULL); if (!cmp) { TRACE_DEBUG(FULL, "Redirect msg %p: peer '%.*s' += %d (previous ALL_HOST Redirect originated from this peer)", msg, (int)cand->diamidlen, cand->diamid, FD_SCORE_SENT_REDIRECT); cand->score += FD_SCORE_SENT_REDIRECT; c_oh = cand; continue; } } cmp = fd_os_cmp(cand->diamid, cand->diamidlen, e->from.s, e->from.l); if (!cmp) { TRACE_DEBUG(FULL, "Redirect msg %p: peer '%.*s' += %d (previous Redirect received from this peer)", msg, (int)cand->diamidlen, cand->diamid, FD_SCORE_SENT_REDIRECT); cand->score += FD_SCORE_SENT_REDIRECT; } } if ((e->type == ALL_HOST) && (c_oh == NULL)) { /* The rule does not apply, we're done */ return 0; } /* for each candidate, if it is found in the target_peers list, we add the rule's score to this candidate */ for (lic = candidates->next; lic != candidates; lic = lic->next) { /* the candidates list is not guaranteed to be ordered at this time, so we cannot avoid the two imbricated loops */ struct rtd_candidate * cand = (struct rtd_candidate *) lic; /* Is this candidate in the "Redirect-Host" list ? We must search caseinsentive here. */ for (lirh = e->target_peers_list.next; lirh != &e->target_peers_list; lirh = lirh->next) { struct redir_host * host = lirh->o; int cont; cmp = fd_os_almostcasesrch( cand->diamid, cand->diamidlen, host->id, host->len, &cont ); if (cmp == 0) { TRACE_DEBUG(FULL, "Redirect msg %p: peer '%.*s' += %d (rule t:%d @%p)", msg, (int)cand->diamidlen, cand->diamid, redirects_usages[e->type].score, e->type, e); cand->score += redirects_usages[e->type].score; break; } if (!cont) break; } } return 0; } static int redir_exist_for_type(int rule_type) { int ret; switch(rule_type) { case ALL_SESSION: case ALL_USER: ret = redirect_hash_table[rule_type] != NULL; break; default: ret = !FD_IS_LIST_EMPTY(&redirects_usages[rule_type].sentinel); break; } return ret; } static int match_message(int rule_type, struct msg *msg, union matchdata *data, struct fd_list * candidates) { struct fd_list * li; struct redir_entry * e = NULL; int ret = 0; switch(rule_type) { case ALL_SESSION: HASH_FIND(hh, redirect_hash_table[rule_type], data->session.s, data->session.l, e); if (e) { /* This message matches a rule, apply */ CHECK_FCT_DO( ret = apply_rule(e, msg, candidates), break ); } break; case ALL_USER: HASH_FIND(hh, redirect_hash_table[rule_type], data->user.s, data->user.l, e); if (e) { /* This message matches a rule, apply */ CHECK_FCT_DO( ret = apply_rule(e, msg, candidates), break ); } break; default: /* Attempt each rule we have stored */ for (li = redirects_usages[rule_type].sentinel.next; li != &redirects_usages[rule_type].sentinel; li = li->next) { e = li->o; /* Does it match ? */ if (rule_type != ALL_HOST) { /* this one is an exception, we handle it separately */ int cmp = redir_entry_cmp_key[rule_type](data, &e->data); if (cmp > 0) continue; if (cmp < 0) break; } /* This rule matches (or we are in ALL_HOST), apply */ CHECK_FCT_DO( ret = apply_rule(e, msg, candidates), break ); /* If this was a DONT_CACHE rule, we unlink it, so that it will not be used again */ if (rule_type == DONT_CACHE) { li = li->prev; fd_list_unlink( li->next ); /* We cannot delete here without taking the mutex, which would mean we have first to release the lock... just let expiry garbage collect the rule */ } } } return ret; } /* OUT callback */ int redir_out_cb(void * cbdata, struct msg ** pmsg, struct fd_list * candidates) { int i, ret = 0; struct msg * msg = *pmsg; TRACE_ENTRY("%p %p %p", cbdata, msg, candidates); for (i = 0; i <= H_U_MAX; i++) { /* Lock the line. We write lock in case of DONT_CACHE so we can directly unlink the entry. read in other cases is sufficient */ if (i == DONT_CACHE) { CHECK_POSIX( pthread_rwlock_wrlock( &redirects_usages[i].lock ) ); } else { CHECK_POSIX( pthread_rwlock_rdlock( &redirects_usages[i].lock ) ); } if (redir_exist_for_type(i)) { union matchdata data; int nodata; /* The message does not allow to apply this rule, skip */ /* Retrieve the data that may match in the message */ CHECK_FCT_DO( ret = get_data_to_match(i, msg, &data, &nodata), goto out ); /* If data found for this type of rule, then try matching it */ if (!nodata) ret = match_message(i, msg, &data, candidates); } out: CHECK_POSIX( pthread_rwlock_unlock( &redirects_usages[i].lock ) ); if (ret) return ret; } return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_redirect/rt_redir.c000066400000000000000000000074511333553357400255450ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Authors: Sebastien Decugis * * and Thomas Klausner * * * * Copyright (c) 2011, 2014, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "rt_redir.h" struct dict_object * redir_dict_dr = NULL; struct dict_object * redir_dict_un = NULL; static struct fd_rt_fwd_hdl * fwd_hdl = NULL; static struct fd_rt_out_hdl * out_hdl = NULL; static pthread_t exp_thr = (pthread_t)NULL; /* Initialize the module */ static int redir_entry(char * conffile) { TRACE_ENTRY(""); /* Dictionary objects */ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Realm", &redir_dict_dr, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "User-Name", &redir_dict_un, ENOENT) ); /* Initialize the entries array */ CHECK_FCT( redir_entry_init() ); /* Start the expire thread */ CHECK_POSIX( pthread_create( &exp_thr, NULL, redir_exp_thr_fct, NULL ) ); /* Register the callback that receives the answers and processes when it contains a Redirect indication. */ CHECK_FCT( fd_rt_fwd_register ( redir_fwd_cb, NULL, RT_FWD_ANS, &fwd_hdl ) ); /* Register the callback that applies the saved Redirect rules to outgoing messages. */ CHECK_FCT( fd_rt_out_register ( redir_out_cb, NULL, 10, &out_hdl ) ); return 0; } EXTENSION_ENTRY("rt_redirect", redir_entry); /* And terminate it */ void fd_ext_fini(void) { /* Unregister the callbacks */ if (fwd_hdl) { CHECK_FCT_DO( fd_rt_fwd_unregister(fwd_hdl, NULL), ); } if (out_hdl) { CHECK_FCT_DO( fd_rt_out_unregister(out_hdl, NULL), ); } /* Stop the expiry thread */ CHECK_FCT_DO( fd_thr_term(&exp_thr), ); /* Empty all entries */ redir_entry_fini(); return; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_redirect/rt_redir.h000066400000000000000000000146461333553357400255560ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis and * * Thomas Klausner * * * * Copyright (c) 2013, 2014, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Diameter Redirect management */ #include #include "uthash.h" /* There are 2 locks in this module. The priority is established as follow to avoid deadlocks: exp_peer mutex > usages rwlock. (e.g., the rwlock can be taken while holding the mutex, but not the other way) */ /* The types of redirects (from Redirect-Host-Usage AVP value) */ enum redir_h_u { DONT_CACHE = 0, ALL_SESSION, ALL_REALM, REALM_AND_APPLICATION, ALL_APPLICATION, ALL_HOST, ALL_USER }; #define H_U_MAX ALL_USER /* Eye catcher */ #define REDIR_ENTRY_EYEC 0x43D14E74 /* Expiration time set for DONT_CACHE tasks, so that the entry is found when the code is called back */ #define DEFAULT_EXPIRE_TIME 10 /* seconds */ /* Structure to store a parsed Redirect-Host */ struct redir_host { struct fd_list chain; DiamId_t id; /* malloc'd */ size_t len; /* We don't use the following yet because we don't support dynamic new connections int secure; uint16_t port; int l4; char proto; */ }; /* Rule data that is stored depending on Redirect-Host-Usage value */ union matchdata { /* DONT_CACHE */ struct { struct msg * msg; /* The query message for which this rule was created */ } message; /* ALL_SESSION */ struct { os0_t s; /* sid */ size_t l; } session; /* ALL_REALM */ struct { os0_t s; /* Destination-Realm AVP data */ size_t l; } realm; /* REALM_AND_APPLICATION */ struct { application_id_t a; /* message's application */ os0_t s; /* Destination-Realm AVP data */ size_t l; } realm_app; /* ALL_APPLICATION */ struct { application_id_t a; /* message's application */ } app; /* ALL_HOST */ struct { os0_t s; /* the Origin-Host of the Redirect message (which may be the next hop or not) */ size_t l; } host; /* ALL_USER */ struct { os0_t s; /* User-Name AVP data */ size_t l; } user; }; /* Structure to store a Redirect indication */ struct redir_entry { uint32_t eyec; /* must be REDIR_ENTRY_EYEC, used for debug only */ struct { os0_t s; /* alloc'd, must be freed */ size_t l; } from; /* whom this rule was received from (next hop) ? */ struct fd_list target_peers_list; /* The list of Redirect-Hosts for this entry */ struct timespec timeout; /* When does this entry expire? */ struct fd_list exp_list; /* chain in the expire_list list, ordered by expiration date, protected by exp_peer_lock */ enum redir_h_u type; /* Type of this entry */ struct fd_list redir_list; /* link in redirects_usages lists. Lists are ordered by the data value. Protected by rw locks */ union matchdata data; /* The strings are duplicated & must be freed in this structure */ UT_hash_handle hh; /* magic entry for hash table */ }; /* The array where the redir_entries are stored */ struct redir_line { enum fd_rt_out_score score; pthread_rwlock_t lock; /* protect the list */ struct fd_list sentinel; /* list of redir_entry, the "o" field of the sentinel points to the redir_line entry */ }; extern struct redir_line redirects_usages[]; /* the hash table where entries are stored for ALL_SESSION and ALL_USER */ extern struct redir_entry *redirect_hash_table[]; /* Accelerator to the line lock */ #define RWLOCK_REDIR( _entry ) ( &(redirects_usages[(_entry)->type].lock) ) /* Lock that must be owned before calling some functions */ extern pthread_mutex_t redir_exp_peer_lock; /* Dictionary cached objects */ extern struct dict_object * redir_dict_dr; extern struct dict_object * redir_dict_un; /* Functions on redir_entry */ int redir_entry_init(); int redir_entry_fini(); int redir_entry_new(struct redir_entry ** e, struct fd_list * targets, uint32_t rhu, struct msg * qry, DiamId_t nh, size_t nhlen, os0_t oh, size_t ohlen); extern int (*redir_entry_cmp_key[])(union matchdata * , union matchdata *); /* compare functions */ int redir_entry_insert(struct redir_entry * e); int redir_entry_destroy(struct redir_entry * e); /* Functions for expiry */ void * redir_exp_thr_fct(void * arg); int redir_exp_set(struct redir_entry * e, uint32_t duration); /* Forward cb */ int redir_fwd_cb(void * cbdata, struct msg ** msg); /* Out callback */ int redir_out_cb(void * cbdata, struct msg ** pmsg, struct fd_list * candidates); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/rt_redirect/uthash.h000066400000000000000000001660751333553357400252440ustar00rootroot00000000000000/* Copyright (c) 2003-2013, Troy D. Hanson http://troydhanson.github.com/uthash/ All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 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. */ #ifndef UTHASH_H #define UTHASH_H #include /* memcmp,strlen */ #include /* ptrdiff_t */ #include /* exit() */ /* These macros use decltype or the earlier __typeof GNU extension. As decltype is only available in newer compilers (VS2010 or gcc 4.3+ when compiling c++ source) this code uses whatever method is needed or, for VS2008 where neither is available, uses casting workarounds. */ #ifdef _MSC_VER /* MS compiler */ #if _MSC_VER >= 1600 && defined(__cplusplus) /* VS2010 or newer in C++ mode */ #define DECLTYPE(x) (decltype(x)) #else /* VS2008 or older (or VS2010 in C mode) */ #define NO_DECLTYPE #define DECLTYPE(x) #endif #else /* GNU, Sun and other compilers */ #define DECLTYPE(x) (__typeof(x)) #endif #ifdef NO_DECLTYPE #define DECLTYPE_ASSIGN(dst,src) \ do { \ char **_da_dst = (char**)(&(dst)); \ *_da_dst = (char*)(src); \ } while(0) #else #define DECLTYPE_ASSIGN(dst,src) \ do { \ (dst) = DECLTYPE(dst)(src); \ } while(0) #endif /* a number of the hash function use uint32_t which isn't defined on win32 */ #ifdef _MSC_VER typedef unsigned int uint32_t; typedef unsigned char uint8_t; #else #include /* uint32_t */ #endif #define UTHASH_VERSION 1.9.8 #ifndef uthash_fatal #define uthash_fatal(msg) exit(-1) /* fatal error (out of memory,etc) */ #endif #ifndef uthash_malloc #define uthash_malloc(sz) malloc(sz) /* malloc fcn */ #endif #ifndef uthash_free #define uthash_free(ptr,sz) free(ptr) /* free fcn */ #endif #ifndef uthash_noexpand_fyi #define uthash_noexpand_fyi(tbl) /* can be defined to log noexpand */ #endif #ifndef uthash_expand_fyi #define uthash_expand_fyi(tbl) /* can be defined to log expands */ #endif /* initial number of buckets */ #define HASH_INITIAL_NUM_BUCKETS 32 /* initial number of buckets */ #define HASH_INITIAL_NUM_BUCKETS_LOG2 5 /* lg2 of initial number of buckets */ #define HASH_BKT_CAPACITY_THRESH 10 /* expand when bucket count reaches */ /* calculate the element whose hash handle address is hhe */ #define ELMT_FROM_HH(tbl,hhp) ((void*)(((char*)(hhp)) - ((tbl)->hho))) #define HASH_FIND(hh,head,keyptr,keylen,out) \ do { \ unsigned _hf_bkt,_hf_hashv; \ out=NULL; \ if (head) { \ HASH_FCN(keyptr,keylen, (head)->hh.tbl->num_buckets, _hf_hashv, _hf_bkt); \ if (HASH_BLOOM_TEST((head)->hh.tbl, _hf_hashv)) { \ HASH_FIND_IN_BKT((head)->hh.tbl, hh, (head)->hh.tbl->buckets[ _hf_bkt ], \ keyptr,keylen,out); \ } \ } \ } while (0) #ifdef HASH_BLOOM #define HASH_BLOOM_BITLEN (1ULL << HASH_BLOOM) #define HASH_BLOOM_BYTELEN (HASH_BLOOM_BITLEN/8) + ((HASH_BLOOM_BITLEN%8) ? 1:0) #define HASH_BLOOM_MAKE(tbl) \ do { \ (tbl)->bloom_nbits = HASH_BLOOM; \ (tbl)->bloom_bv = (uint8_t*)uthash_malloc(HASH_BLOOM_BYTELEN); \ if (!((tbl)->bloom_bv)) { uthash_fatal( "out of memory"); } \ memset((tbl)->bloom_bv, 0, HASH_BLOOM_BYTELEN); \ (tbl)->bloom_sig = HASH_BLOOM_SIGNATURE; \ } while (0) #define HASH_BLOOM_FREE(tbl) \ do { \ uthash_free((tbl)->bloom_bv, HASH_BLOOM_BYTELEN); \ } while (0) #define HASH_BLOOM_BITSET(bv,idx) (bv[(idx)/8] |= (1U << ((idx)%8))) #define HASH_BLOOM_BITTEST(bv,idx) (bv[(idx)/8] & (1U << ((idx)%8))) #define HASH_BLOOM_ADD(tbl,hashv) \ HASH_BLOOM_BITSET((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1))) #define HASH_BLOOM_TEST(tbl,hashv) \ HASH_BLOOM_BITTEST((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1))) #else #define HASH_BLOOM_MAKE(tbl) #define HASH_BLOOM_FREE(tbl) #define HASH_BLOOM_ADD(tbl,hashv) #define HASH_BLOOM_TEST(tbl,hashv) (1) #define HASH_BLOOM_BYTELEN 0 #endif #define HASH_MAKE_TABLE(hh,head) \ do { \ (head)->hh.tbl = (UT_hash_table*)uthash_malloc( \ sizeof(UT_hash_table)); \ if (!((head)->hh.tbl)) { uthash_fatal( "out of memory"); } \ memset((head)->hh.tbl, 0, sizeof(UT_hash_table)); \ (head)->hh.tbl->tail = &((head)->hh); \ (head)->hh.tbl->num_buckets = HASH_INITIAL_NUM_BUCKETS; \ (head)->hh.tbl->log2_num_buckets = HASH_INITIAL_NUM_BUCKETS_LOG2; \ (head)->hh.tbl->hho = (char*)(&(head)->hh) - (char*)(head); \ (head)->hh.tbl->buckets = (UT_hash_bucket*)uthash_malloc( \ HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket)); \ if (! (head)->hh.tbl->buckets) { uthash_fatal( "out of memory"); } \ memset((head)->hh.tbl->buckets, 0, \ HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket)); \ HASH_BLOOM_MAKE((head)->hh.tbl); \ (head)->hh.tbl->signature = HASH_SIGNATURE; \ } while(0) #define HASH_ADD(hh,head,fieldname,keylen_in,add) \ HASH_ADD_KEYPTR(hh,head,&((add)->fieldname),keylen_in,add) #define HASH_REPLACE(hh,head,fieldname,keylen_in,add,replaced) \ do { \ replaced=NULL; \ HASH_FIND(hh,head,&((add)->fieldname),keylen_in,replaced); \ if (replaced!=NULL) { \ HASH_DELETE(hh,head,replaced); \ }; \ HASH_ADD(hh,head,fieldname,keylen_in,add); \ } while(0) #define HASH_ADD_KEYPTR(hh,head,keyptr,keylen_in,add) \ do { \ unsigned _ha_bkt; \ (add)->hh.next = NULL; \ (add)->hh.key = (char*)keyptr; \ (add)->hh.keylen = (unsigned)keylen_in; \ if (!(head)) { \ head = (add); \ (head)->hh.prev = NULL; \ HASH_MAKE_TABLE(hh,head); \ } else { \ (head)->hh.tbl->tail->next = (add); \ (add)->hh.prev = ELMT_FROM_HH((head)->hh.tbl, (head)->hh.tbl->tail); \ (head)->hh.tbl->tail = &((add)->hh); \ } \ (head)->hh.tbl->num_items++; \ (add)->hh.tbl = (head)->hh.tbl; \ HASH_FCN(keyptr,keylen_in, (head)->hh.tbl->num_buckets, \ (add)->hh.hashv, _ha_bkt); \ HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt],&(add)->hh); \ HASH_BLOOM_ADD((head)->hh.tbl,(add)->hh.hashv); \ HASH_EMIT_KEY(hh,head,keyptr,keylen_in); \ HASH_FSCK(hh,head); \ } while(0) #define HASH_TO_BKT( hashv, num_bkts, bkt ) \ do { \ bkt = ((hashv) & ((num_bkts) - 1)); \ } while(0) /* delete "delptr" from the hash table. * "the usual" patch-up process for the app-order doubly-linked-list. * The use of _hd_hh_del below deserves special explanation. * These used to be expressed using (delptr) but that led to a bug * if someone used the same symbol for the head and deletee, like * HASH_DELETE(hh,users,users); * We want that to work, but by changing the head (users) below * we were forfeiting our ability to further refer to the deletee (users) * in the patch-up process. Solution: use scratch space to * copy the deletee pointer, then the latter references are via that * scratch pointer rather than through the repointed (users) symbol. */ #define HASH_DELETE(hh,head,delptr) \ do { \ unsigned _hd_bkt; \ struct UT_hash_handle *_hd_hh_del; \ if ( ((delptr)->hh.prev == NULL) && ((delptr)->hh.next == NULL) ) { \ uthash_free((head)->hh.tbl->buckets, \ (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \ HASH_BLOOM_FREE((head)->hh.tbl); \ uthash_free((head)->hh.tbl, sizeof(UT_hash_table)); \ head = NULL; \ } else { \ _hd_hh_del = &((delptr)->hh); \ if ((delptr) == ELMT_FROM_HH((head)->hh.tbl,(head)->hh.tbl->tail)) { \ (head)->hh.tbl->tail = \ (UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) + \ (head)->hh.tbl->hho); \ } \ if ((delptr)->hh.prev) { \ ((UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) + \ (head)->hh.tbl->hho))->next = (delptr)->hh.next; \ } else { \ DECLTYPE_ASSIGN(head,(delptr)->hh.next); \ } \ if (_hd_hh_del->next) { \ ((UT_hash_handle*)((ptrdiff_t)_hd_hh_del->next + \ (head)->hh.tbl->hho))->prev = \ _hd_hh_del->prev; \ } \ HASH_TO_BKT( _hd_hh_del->hashv, (head)->hh.tbl->num_buckets, _hd_bkt); \ HASH_DEL_IN_BKT(hh,(head)->hh.tbl->buckets[_hd_bkt], _hd_hh_del); \ (head)->hh.tbl->num_items--; \ } \ HASH_FSCK(hh,head); \ } while (0) /* convenience forms of HASH_FIND/HASH_ADD/HASH_DEL */ #define HASH_FIND_STR(head,findstr,out) \ HASH_FIND(hh,head,findstr,strlen(findstr),out) #define HASH_ADD_STR(head,strfield,add) \ HASH_ADD(hh,head,strfield,strlen(add->strfield),add) #define HASH_REPLACE_STR(head,strfield,add,replaced) \ HASH_REPLACE(hh,head,strfield,strlen(add->strfield),add,replaced) #define HASH_FIND_INT(head,findint,out) \ HASH_FIND(hh,head,findint,sizeof(int),out) #define HASH_ADD_INT(head,intfield,add) \ HASH_ADD(hh,head,intfield,sizeof(int),add) #define HASH_REPLACE_INT(head,intfield,add,replaced) \ HASH_REPLACE(hh,head,intfield,sizeof(int),add,replaced) #define HASH_FIND_PTR(head,findptr,out) \ HASH_FIND(hh,head,findptr,sizeof(void *),out) #define HASH_ADD_PTR(head,ptrfield,add) \ HASH_ADD(hh,head,ptrfield,sizeof(void *),add) #define HASH_REPLACE_PTR(head,ptrfield,add) \ HASH_REPLACE(hh,head,ptrfield,sizeof(void *),add,replaced) #define HASH_DEL(head,delptr) \ HASH_DELETE(hh,head,delptr) /* HASH_FSCK checks hash integrity on every add/delete when HASH_DEBUG is defined. * This is for uthash developer only; it compiles away if HASH_DEBUG isn't defined. */ #ifdef HASH_DEBUG #define HASH_OOPS(...) do { fprintf(stderr,__VA_ARGS__); exit(-1); } while (0) #define HASH_FSCK(hh,head) \ do { \ unsigned _bkt_i; \ unsigned _count, _bkt_count; \ char *_prev; \ struct UT_hash_handle *_thh; \ if (head) { \ _count = 0; \ for( _bkt_i = 0; _bkt_i < (head)->hh.tbl->num_buckets; _bkt_i++) { \ _bkt_count = 0; \ _thh = (head)->hh.tbl->buckets[_bkt_i].hh_head; \ _prev = NULL; \ while (_thh) { \ if (_prev != (char*)(_thh->hh_prev)) { \ HASH_OOPS("invalid hh_prev %p, actual %p\n", \ _thh->hh_prev, _prev ); \ } \ _bkt_count++; \ _prev = (char*)(_thh); \ _thh = _thh->hh_next; \ } \ _count += _bkt_count; \ if ((head)->hh.tbl->buckets[_bkt_i].count != _bkt_count) { \ HASH_OOPS("invalid bucket count %d, actual %d\n", \ (head)->hh.tbl->buckets[_bkt_i].count, _bkt_count); \ } \ } \ if (_count != (head)->hh.tbl->num_items) { \ HASH_OOPS("invalid hh item count %d, actual %d\n", \ (head)->hh.tbl->num_items, _count ); \ } \ /* traverse hh in app order; check next/prev integrity, count */ \ _count = 0; \ _prev = NULL; \ _thh = &(head)->hh; \ while (_thh) { \ _count++; \ if (_prev !=(char*)(_thh->prev)) { \ HASH_OOPS("invalid prev %p, actual %p\n", \ _thh->prev, _prev ); \ } \ _prev = (char*)ELMT_FROM_HH((head)->hh.tbl, _thh); \ _thh = ( _thh->next ? (UT_hash_handle*)((char*)(_thh->next) + \ (head)->hh.tbl->hho) : NULL ); \ } \ if (_count != (head)->hh.tbl->num_items) { \ HASH_OOPS("invalid app item count %d, actual %d\n", \ (head)->hh.tbl->num_items, _count ); \ } \ } \ } while (0) #else #define HASH_FSCK(hh,head) #endif /* When compiled with -DHASH_EMIT_KEYS, length-prefixed keys are emitted to * the descriptor to which this macro is defined for tuning the hash function. * The app can #include to get the prototype for write(2). */ #ifdef HASH_EMIT_KEYS #define HASH_EMIT_KEY(hh,head,keyptr,fieldlen) \ do { \ unsigned _klen = fieldlen; \ write(HASH_EMIT_KEYS, &_klen, sizeof(_klen)); \ write(HASH_EMIT_KEYS, keyptr, fieldlen); \ } while (0) #else #define HASH_EMIT_KEY(hh,head,keyptr,fieldlen) #endif /* default to Jenkin's hash unless overridden e.g. DHASH_FUNCTION=HASH_SAX */ #ifdef HASH_FUNCTION #define HASH_FCN HASH_FUNCTION #else #define HASH_FCN HASH_JEN #endif /* The Bernstein hash function, used in Perl prior to v5.6 */ #define HASH_BER(key,keylen,num_bkts,hashv,bkt) \ do { \ unsigned _hb_keylen=keylen; \ char *_hb_key=(char*)(key); \ (hashv) = 0; \ while (_hb_keylen--) { (hashv) = ((hashv) * 33) + *_hb_key++; } \ bkt = (hashv) & (num_bkts-1); \ } while (0) /* SAX/FNV/OAT/JEN hash functions are macro variants of those listed at * http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx */ #define HASH_SAX(key,keylen,num_bkts,hashv,bkt) \ do { \ unsigned _sx_i; \ char *_hs_key=(char*)(key); \ hashv = 0; \ for(_sx_i=0; _sx_i < keylen; _sx_i++) \ hashv ^= (hashv << 5) + (hashv >> 2) + _hs_key[_sx_i]; \ bkt = hashv & (num_bkts-1); \ } while (0) #define HASH_FNV(key,keylen,num_bkts,hashv,bkt) \ do { \ unsigned _fn_i; \ char *_hf_key=(char*)(key); \ hashv = 2166136261UL; \ for(_fn_i=0; _fn_i < keylen; _fn_i++) \ hashv = (hashv * 16777619) ^ _hf_key[_fn_i]; \ bkt = hashv & (num_bkts-1); \ } while(0) #define HASH_OAT(key,keylen,num_bkts,hashv,bkt) \ do { \ unsigned _ho_i; \ char *_ho_key=(char*)(key); \ hashv = 0; \ for(_ho_i=0; _ho_i < keylen; _ho_i++) { \ hashv += _ho_key[_ho_i]; \ hashv += (hashv << 10); \ hashv ^= (hashv >> 6); \ } \ hashv += (hashv << 3); \ hashv ^= (hashv >> 11); \ hashv += (hashv << 15); \ bkt = hashv & (num_bkts-1); \ } while(0) #define HASH_JEN_MIX(a,b,c) \ do { \ a -= b; a -= c; a ^= ( c >> 13 ); \ b -= c; b -= a; b ^= ( a << 8 ); \ c -= a; c -= b; c ^= ( b >> 13 ); \ a -= b; a -= c; a ^= ( c >> 12 ); \ b -= c; b -= a; b ^= ( a << 16 ); \ c -= a; c -= b; c ^= ( b >> 5 ); \ a -= b; a -= c; a ^= ( c >> 3 ); \ b -= c; b -= a; b ^= ( a << 10 ); \ c -= a; c -= b; c ^= ( b >> 15 ); \ } while (0) #define HASH_JEN(key,keylen,num_bkts,hashv,bkt) \ do { \ unsigned _hj_i,_hj_j,_hj_k; \ unsigned char *_hj_key=(unsigned char*)(key); \ hashv = 0xfeedbeef; \ _hj_i = _hj_j = 0x9e3779b9; \ _hj_k = (unsigned)keylen; \ while (_hj_k >= 12) { \ _hj_i += (_hj_key[0] + ( (unsigned)_hj_key[1] << 8 ) \ + ( (unsigned)_hj_key[2] << 16 ) \ + ( (unsigned)_hj_key[3] << 24 ) ); \ _hj_j += (_hj_key[4] + ( (unsigned)_hj_key[5] << 8 ) \ + ( (unsigned)_hj_key[6] << 16 ) \ + ( (unsigned)_hj_key[7] << 24 ) ); \ hashv += (_hj_key[8] + ( (unsigned)_hj_key[9] << 8 ) \ + ( (unsigned)_hj_key[10] << 16 ) \ + ( (unsigned)_hj_key[11] << 24 ) ); \ \ HASH_JEN_MIX(_hj_i, _hj_j, hashv); \ \ _hj_key += 12; \ _hj_k -= 12; \ } \ hashv += keylen; \ switch ( _hj_k ) { \ case 11: hashv += ( (unsigned)_hj_key[10] << 24 ); \ case 10: hashv += ( (unsigned)_hj_key[9] << 16 ); \ case 9: hashv += ( (unsigned)_hj_key[8] << 8 ); \ case 8: _hj_j += ( (unsigned)_hj_key[7] << 24 ); \ case 7: _hj_j += ( (unsigned)_hj_key[6] << 16 ); \ case 6: _hj_j += ( (unsigned)_hj_key[5] << 8 ); \ case 5: _hj_j += _hj_key[4]; \ case 4: _hj_i += ( (unsigned)_hj_key[3] << 24 ); \ case 3: _hj_i += ( (unsigned)_hj_key[2] << 16 ); \ case 2: _hj_i += ( (unsigned)_hj_key[1] << 8 ); \ case 1: _hj_i += _hj_key[0]; \ } \ HASH_JEN_MIX(_hj_i, _hj_j, hashv); \ bkt = hashv & (num_bkts-1); \ } while(0) /* The Paul Hsieh hash function */ #undef get16bits #if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \ || defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__) #define get16bits(d) (*((const uint16_t *) (d))) #endif #if !defined (get16bits) #define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8) \ +(uint32_t)(((const uint8_t *)(d))[0]) ) #endif #define HASH_SFH(key,keylen,num_bkts,hashv,bkt) \ do { \ unsigned char *_sfh_key=(unsigned char*)(key); \ uint32_t _sfh_tmp, _sfh_len = keylen; \ \ int _sfh_rem = _sfh_len & 3; \ _sfh_len >>= 2; \ hashv = 0xcafebabe; \ \ /* Main loop */ \ for (;_sfh_len > 0; _sfh_len--) { \ hashv += get16bits (_sfh_key); \ _sfh_tmp = (uint32_t)(get16bits (_sfh_key+2)) << 11 ^ hashv; \ hashv = (hashv << 16) ^ _sfh_tmp; \ _sfh_key += 2*sizeof (uint16_t); \ hashv += hashv >> 11; \ } \ \ /* Handle end cases */ \ switch (_sfh_rem) { \ case 3: hashv += get16bits (_sfh_key); \ hashv ^= hashv << 16; \ hashv ^= (uint32_t)(_sfh_key[sizeof (uint16_t)] << 18); \ hashv += hashv >> 11; \ break; \ case 2: hashv += get16bits (_sfh_key); \ hashv ^= hashv << 11; \ hashv += hashv >> 17; \ break; \ case 1: hashv += *_sfh_key; \ hashv ^= hashv << 10; \ hashv += hashv >> 1; \ } \ \ /* Force "avalanching" of final 127 bits */ \ hashv ^= hashv << 3; \ hashv += hashv >> 5; \ hashv ^= hashv << 4; \ hashv += hashv >> 17; \ hashv ^= hashv << 25; \ hashv += hashv >> 6; \ bkt = hashv & (num_bkts-1); \ } while(0) #ifdef HASH_USING_NO_STRICT_ALIASING /* The MurmurHash exploits some CPU's (x86,x86_64) tolerance for unaligned reads. * For other types of CPU's (e.g. Sparc) an unaligned read causes a bus error. * MurmurHash uses the faster approach only on CPU's where we know it's safe. * * Note the preprocessor built-in defines can be emitted using: * * gcc -m64 -dM -E - < /dev/null (on gcc) * cc -## a.c (where a.c is a simple test file) (Sun Studio) */ #if (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86)) #define MUR_GETBLOCK(p,i) p[i] #else /* non intel */ #define MUR_PLUS0_ALIGNED(p) (((unsigned long)p & 0x3) == 0) #define MUR_PLUS1_ALIGNED(p) (((unsigned long)p & 0x3) == 1) #define MUR_PLUS2_ALIGNED(p) (((unsigned long)p & 0x3) == 2) #define MUR_PLUS3_ALIGNED(p) (((unsigned long)p & 0x3) == 3) #define WP(p) ((uint32_t*)((unsigned long)(p) & ~3UL)) #if (defined(__BIG_ENDIAN__) || defined(SPARC) || defined(__ppc__) || defined(__ppc64__)) #define MUR_THREE_ONE(p) ((((*WP(p))&0x00ffffff) << 8) | (((*(WP(p)+1))&0xff000000) >> 24)) #define MUR_TWO_TWO(p) ((((*WP(p))&0x0000ffff) <<16) | (((*(WP(p)+1))&0xffff0000) >> 16)) #define MUR_ONE_THREE(p) ((((*WP(p))&0x000000ff) <<24) | (((*(WP(p)+1))&0xffffff00) >> 8)) #else /* assume little endian non-intel */ #define MUR_THREE_ONE(p) ((((*WP(p))&0xffffff00) >> 8) | (((*(WP(p)+1))&0x000000ff) << 24)) #define MUR_TWO_TWO(p) ((((*WP(p))&0xffff0000) >>16) | (((*(WP(p)+1))&0x0000ffff) << 16)) #define MUR_ONE_THREE(p) ((((*WP(p))&0xff000000) >>24) | (((*(WP(p)+1))&0x00ffffff) << 8)) #endif #define MUR_GETBLOCK(p,i) (MUR_PLUS0_ALIGNED(p) ? ((p)[i]) : \ (MUR_PLUS1_ALIGNED(p) ? MUR_THREE_ONE(p) : \ (MUR_PLUS2_ALIGNED(p) ? MUR_TWO_TWO(p) : \ MUR_ONE_THREE(p)))) #endif #define MUR_ROTL32(x,r) (((x) << (r)) | ((x) >> (32 - (r)))) #define MUR_FMIX(_h) \ do { \ _h ^= _h >> 16; \ _h *= 0x85ebca6b; \ _h ^= _h >> 13; \ _h *= 0xc2b2ae35l; \ _h ^= _h >> 16; \ } while(0) #define HASH_MUR(key,keylen,num_bkts,hashv,bkt) \ do { \ const uint8_t *_mur_data = (const uint8_t*)(key); \ const int _mur_nblocks = (keylen) / 4; \ uint32_t _mur_h1 = 0xf88D5353; \ uint32_t _mur_c1 = 0xcc9e2d51; \ uint32_t _mur_c2 = 0x1b873593; \ uint32_t _mur_k1 = 0; \ const uint8_t *_mur_tail; \ const uint32_t *_mur_blocks = (const uint32_t*)(_mur_data+_mur_nblocks*4); \ int _mur_i; \ for(_mur_i = -_mur_nblocks; _mur_i; _mur_i++) { \ _mur_k1 = MUR_GETBLOCK(_mur_blocks,_mur_i); \ _mur_k1 *= _mur_c1; \ _mur_k1 = MUR_ROTL32(_mur_k1,15); \ _mur_k1 *= _mur_c2; \ \ _mur_h1 ^= _mur_k1; \ _mur_h1 = MUR_ROTL32(_mur_h1,13); \ _mur_h1 = _mur_h1*5+0xe6546b64; \ } \ _mur_tail = (const uint8_t*)(_mur_data + _mur_nblocks*4); \ _mur_k1=0; \ switch((keylen) & 3) { \ case 3: _mur_k1 ^= _mur_tail[2] << 16; \ case 2: _mur_k1 ^= _mur_tail[1] << 8; \ case 1: _mur_k1 ^= _mur_tail[0]; \ _mur_k1 *= _mur_c1; \ _mur_k1 = MUR_ROTL32(_mur_k1,15); \ _mur_k1 *= _mur_c2; \ _mur_h1 ^= _mur_k1; \ } \ _mur_h1 ^= (keylen); \ MUR_FMIX(_mur_h1); \ hashv = _mur_h1; \ bkt = hashv & (num_bkts-1); \ } while(0) #endif /* HASH_USING_NO_STRICT_ALIASING */ /* key comparison function; return 0 if keys equal */ #define HASH_KEYCMP(a,b,len) memcmp(a,b,len) /* iterate over items in a known bucket to find desired item */ #define HASH_FIND_IN_BKT(tbl,hh,head,keyptr,keylen_in,out) \ do { \ if (head.hh_head) DECLTYPE_ASSIGN(out,ELMT_FROM_HH(tbl,head.hh_head)); \ else out=NULL; \ while (out) { \ if ((out)->hh.keylen == keylen_in) { \ if ((HASH_KEYCMP((out)->hh.key,keyptr,keylen_in)) == 0) break; \ } \ if ((out)->hh.hh_next) DECLTYPE_ASSIGN(out,ELMT_FROM_HH(tbl,(out)->hh.hh_next)); \ else out = NULL; \ } \ } while(0) /* add an item to a bucket */ #define HASH_ADD_TO_BKT(head,addhh) \ do { \ head.count++; \ (addhh)->hh_next = head.hh_head; \ (addhh)->hh_prev = NULL; \ if (head.hh_head) { (head).hh_head->hh_prev = (addhh); } \ (head).hh_head=addhh; \ if (head.count >= ((head.expand_mult+1) * HASH_BKT_CAPACITY_THRESH) \ && (addhh)->tbl->noexpand != 1) { \ HASH_EXPAND_BUCKETS((addhh)->tbl); \ } \ } while(0) /* remove an item from a given bucket */ #define HASH_DEL_IN_BKT(hh,head,hh_del) \ (head).count--; \ if ((head).hh_head == hh_del) { \ (head).hh_head = hh_del->hh_next; \ } \ if (hh_del->hh_prev) { \ hh_del->hh_prev->hh_next = hh_del->hh_next; \ } \ if (hh_del->hh_next) { \ hh_del->hh_next->hh_prev = hh_del->hh_prev; \ } /* Bucket expansion has the effect of doubling the number of buckets * and redistributing the items into the new buckets. Ideally the * items will distribute more or less evenly into the new buckets * (the extent to which this is true is a measure of the quality of * the hash function as it applies to the key domain). * * With the items distributed into more buckets, the chain length * (item count) in each bucket is reduced. Thus by expanding buckets * the hash keeps a bound on the chain length. This bounded chain * length is the essence of how a hash provides constant time lookup. * * The calculation of tbl->ideal_chain_maxlen below deserves some * explanation. First, keep in mind that we're calculating the ideal * maximum chain length based on the *new* (doubled) bucket count. * In fractions this is just n/b (n=number of items,b=new num buckets). * Since the ideal chain length is an integer, we want to calculate * ceil(n/b). We don't depend on floating point arithmetic in this * hash, so to calculate ceil(n/b) with integers we could write * * ceil(n/b) = (n/b) + ((n%b)?1:0) * * and in fact a previous version of this hash did just that. * But now we have improved things a bit by recognizing that b is * always a power of two. We keep its base 2 log handy (call it lb), * so now we can write this with a bit shift and logical AND: * * ceil(n/b) = (n>>lb) + ( (n & (b-1)) ? 1:0) * */ #define HASH_EXPAND_BUCKETS(tbl) \ do { \ unsigned _he_bkt; \ unsigned _he_bkt_i; \ struct UT_hash_handle *_he_thh, *_he_hh_nxt; \ UT_hash_bucket *_he_new_buckets, *_he_newbkt; \ _he_new_buckets = (UT_hash_bucket*)uthash_malloc( \ 2 * tbl->num_buckets * sizeof(struct UT_hash_bucket)); \ if (!_he_new_buckets) { uthash_fatal( "out of memory"); } \ memset(_he_new_buckets, 0, \ 2 * tbl->num_buckets * sizeof(struct UT_hash_bucket)); \ tbl->ideal_chain_maxlen = \ (tbl->num_items >> (tbl->log2_num_buckets+1)) + \ ((tbl->num_items & ((tbl->num_buckets*2)-1)) ? 1 : 0); \ tbl->nonideal_items = 0; \ for(_he_bkt_i = 0; _he_bkt_i < tbl->num_buckets; _he_bkt_i++) \ { \ _he_thh = tbl->buckets[ _he_bkt_i ].hh_head; \ while (_he_thh) { \ _he_hh_nxt = _he_thh->hh_next; \ HASH_TO_BKT( _he_thh->hashv, tbl->num_buckets*2, _he_bkt); \ _he_newbkt = &(_he_new_buckets[ _he_bkt ]); \ if (++(_he_newbkt->count) > tbl->ideal_chain_maxlen) { \ tbl->nonideal_items++; \ _he_newbkt->expand_mult = _he_newbkt->count / \ tbl->ideal_chain_maxlen; \ } \ _he_thh->hh_prev = NULL; \ _he_thh->hh_next = _he_newbkt->hh_head; \ if (_he_newbkt->hh_head) _he_newbkt->hh_head->hh_prev = \ _he_thh; \ _he_newbkt->hh_head = _he_thh; \ _he_thh = _he_hh_nxt; \ } \ } \ uthash_free( tbl->buckets, tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \ tbl->num_buckets *= 2; \ tbl->log2_num_buckets++; \ tbl->buckets = _he_new_buckets; \ tbl->ineff_expands = (tbl->nonideal_items > (tbl->num_items >> 1)) ? \ (tbl->ineff_expands+1) : 0; \ if (tbl->ineff_expands > 1) { \ tbl->noexpand=1; \ uthash_noexpand_fyi(tbl); \ } \ uthash_expand_fyi(tbl); \ } while(0) /* This is an adaptation of Simon Tatham's O(n log(n)) mergesort */ /* Note that HASH_SORT assumes the hash handle name to be hh. * HASH_SRT was added to allow the hash handle name to be passed in. */ #define HASH_SORT(head,cmpfcn) HASH_SRT(hh,head,cmpfcn) #define HASH_SRT(hh,head,cmpfcn) \ do { \ unsigned _hs_i; \ unsigned _hs_looping,_hs_nmerges,_hs_insize,_hs_psize,_hs_qsize; \ struct UT_hash_handle *_hs_p, *_hs_q, *_hs_e, *_hs_list, *_hs_tail; \ if (head) { \ _hs_insize = 1; \ _hs_looping = 1; \ _hs_list = &((head)->hh); \ while (_hs_looping) { \ _hs_p = _hs_list; \ _hs_list = NULL; \ _hs_tail = NULL; \ _hs_nmerges = 0; \ while (_hs_p) { \ _hs_nmerges++; \ _hs_q = _hs_p; \ _hs_psize = 0; \ for ( _hs_i = 0; _hs_i < _hs_insize; _hs_i++ ) { \ _hs_psize++; \ _hs_q = (UT_hash_handle*)((_hs_q->next) ? \ ((void*)((char*)(_hs_q->next) + \ (head)->hh.tbl->hho)) : NULL); \ if (! (_hs_q) ) break; \ } \ _hs_qsize = _hs_insize; \ while ((_hs_psize > 0) || ((_hs_qsize > 0) && _hs_q )) { \ if (_hs_psize == 0) { \ _hs_e = _hs_q; \ _hs_q = (UT_hash_handle*)((_hs_q->next) ? \ ((void*)((char*)(_hs_q->next) + \ (head)->hh.tbl->hho)) : NULL); \ _hs_qsize--; \ } else if ( (_hs_qsize == 0) || !(_hs_q) ) { \ _hs_e = _hs_p; \ _hs_p = (UT_hash_handle*)((_hs_p->next) ? \ ((void*)((char*)(_hs_p->next) + \ (head)->hh.tbl->hho)) : NULL); \ _hs_psize--; \ } else if (( \ cmpfcn(DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_p)), \ DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_q))) \ ) <= 0) { \ _hs_e = _hs_p; \ _hs_p = (UT_hash_handle*)((_hs_p->next) ? \ ((void*)((char*)(_hs_p->next) + \ (head)->hh.tbl->hho)) : NULL); \ _hs_psize--; \ } else { \ _hs_e = _hs_q; \ _hs_q = (UT_hash_handle*)((_hs_q->next) ? \ ((void*)((char*)(_hs_q->next) + \ (head)->hh.tbl->hho)) : NULL); \ _hs_qsize--; \ } \ if ( _hs_tail ) { \ _hs_tail->next = ((_hs_e) ? \ ELMT_FROM_HH((head)->hh.tbl,_hs_e) : NULL); \ } else { \ _hs_list = _hs_e; \ } \ _hs_e->prev = ((_hs_tail) ? \ ELMT_FROM_HH((head)->hh.tbl,_hs_tail) : NULL); \ _hs_tail = _hs_e; \ } \ _hs_p = _hs_q; \ } \ _hs_tail->next = NULL; \ if ( _hs_nmerges <= 1 ) { \ _hs_looping=0; \ (head)->hh.tbl->tail = _hs_tail; \ DECLTYPE_ASSIGN(head,ELMT_FROM_HH((head)->hh.tbl, _hs_list)); \ } \ _hs_insize *= 2; \ } \ HASH_FSCK(hh,head); \ } \ } while (0) /* This function selects items from one hash into another hash. * The end result is that the selected items have dual presence * in both hashes. There is no copy of the items made; rather * they are added into the new hash through a secondary hash * hash handle that must be present in the structure. */ #define HASH_SELECT(hh_dst, dst, hh_src, src, cond) \ do { \ unsigned _src_bkt, _dst_bkt; \ void *_last_elt=NULL, *_elt; \ UT_hash_handle *_src_hh, *_dst_hh, *_last_elt_hh=NULL; \ ptrdiff_t _dst_hho = ((char*)(&(dst)->hh_dst) - (char*)(dst)); \ if (src) { \ for(_src_bkt=0; _src_bkt < (src)->hh_src.tbl->num_buckets; _src_bkt++) { \ for(_src_hh = (src)->hh_src.tbl->buckets[_src_bkt].hh_head; \ _src_hh; \ _src_hh = _src_hh->hh_next) { \ _elt = ELMT_FROM_HH((src)->hh_src.tbl, _src_hh); \ if (cond(_elt)) { \ _dst_hh = (UT_hash_handle*)(((char*)_elt) + _dst_hho); \ _dst_hh->key = _src_hh->key; \ _dst_hh->keylen = _src_hh->keylen; \ _dst_hh->hashv = _src_hh->hashv; \ _dst_hh->prev = _last_elt; \ _dst_hh->next = NULL; \ if (_last_elt_hh) { _last_elt_hh->next = _elt; } \ if (!dst) { \ DECLTYPE_ASSIGN(dst,_elt); \ HASH_MAKE_TABLE(hh_dst,dst); \ } else { \ _dst_hh->tbl = (dst)->hh_dst.tbl; \ } \ HASH_TO_BKT(_dst_hh->hashv, _dst_hh->tbl->num_buckets, _dst_bkt); \ HASH_ADD_TO_BKT(_dst_hh->tbl->buckets[_dst_bkt],_dst_hh); \ (dst)->hh_dst.tbl->num_items++; \ _last_elt = _elt; \ _last_elt_hh = _dst_hh; \ } \ } \ } \ } \ HASH_FSCK(hh_dst,dst); \ } while (0) #define HASH_CLEAR(hh,head) \ do { \ if (head) { \ uthash_free((head)->hh.tbl->buckets, \ (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket)); \ HASH_BLOOM_FREE((head)->hh.tbl); \ uthash_free((head)->hh.tbl, sizeof(UT_hash_table)); \ (head)=NULL; \ } \ } while(0) #define HASH_OVERHEAD(hh,head) \ (size_t)((((head)->hh.tbl->num_items * sizeof(UT_hash_handle)) + \ ((head)->hh.tbl->num_buckets * sizeof(UT_hash_bucket)) + \ (sizeof(UT_hash_table)) + \ (HASH_BLOOM_BYTELEN))) #ifdef NO_DECLTYPE #define HASH_ITER(hh,head,el,tmp) \ for((el)=(head), (*(char**)(&(tmp)))=(char*)((head)?(head)->hh.next:NULL); \ el; (el)=(tmp),(*(char**)(&(tmp)))=(char*)((tmp)?(tmp)->hh.next:NULL)) #else #define HASH_ITER(hh,head,el,tmp) \ for((el)=(head),(tmp)=DECLTYPE(el)((head)?(head)->hh.next:NULL); \ el; (el)=(tmp),(tmp)=DECLTYPE(el)((tmp)?(tmp)->hh.next:NULL)) #endif /* obtain a count of items in the hash */ #define HASH_COUNT(head) HASH_CNT(hh,head) #define HASH_CNT(hh,head) ((head)?((head)->hh.tbl->num_items):0) typedef struct UT_hash_bucket { struct UT_hash_handle *hh_head; unsigned count; /* expand_mult is normally set to 0. In this situation, the max chain length * threshold is enforced at its default value, HASH_BKT_CAPACITY_THRESH. (If * the bucket's chain exceeds this length, bucket expansion is triggered). * However, setting expand_mult to a non-zero value delays bucket expansion * (that would be triggered by additions to this particular bucket) * until its chain length reaches a *multiple* of HASH_BKT_CAPACITY_THRESH. * (The multiplier is simply expand_mult+1). The whole idea of this * multiplier is to reduce bucket expansions, since they are expensive, in * situations where we know that a particular bucket tends to be overused. * It is better to let its chain length grow to a longer yet-still-bounded * value, than to do an O(n) bucket expansion too often. */ unsigned expand_mult; } UT_hash_bucket; /* random signature used only to find hash tables in external analysis */ #define HASH_SIGNATURE 0xa0111fe1 #define HASH_BLOOM_SIGNATURE 0xb12220f2 typedef struct UT_hash_table { UT_hash_bucket *buckets; unsigned num_buckets, log2_num_buckets; unsigned num_items; struct UT_hash_handle *tail; /* tail hh in app order, for fast append */ ptrdiff_t hho; /* hash handle offset (byte pos of hash handle in element */ /* in an ideal situation (all buckets used equally), no bucket would have * more than ceil(#items/#buckets) items. that's the ideal chain length. */ unsigned ideal_chain_maxlen; /* nonideal_items is the number of items in the hash whose chain position * exceeds the ideal chain maxlen. these items pay the penalty for an uneven * hash distribution; reaching them in a chain traversal takes >ideal steps */ unsigned nonideal_items; /* ineffective expands occur when a bucket doubling was performed, but * afterward, more than half the items in the hash had nonideal chain * positions. If this happens on two consecutive expansions we inhibit any * further expansion, as it's not helping; this happens when the hash * function isn't a good fit for the key domain. When expansion is inhibited * the hash will still work, albeit no longer in constant time. */ unsigned ineff_expands, noexpand; uint32_t signature; /* used only to find hash tables in external analysis */ #ifdef HASH_BLOOM uint32_t bloom_sig; /* used only to test bloom exists in external analysis */ uint8_t *bloom_bv; char bloom_nbits; #endif } UT_hash_table; typedef struct UT_hash_handle { struct UT_hash_table *tbl; void *prev; /* prev element in app order */ void *next; /* next element in app order */ struct UT_hash_handle *hh_prev; /* previous hh in bucket order */ struct UT_hash_handle *hh_next; /* next hh in bucket order */ void *key; /* ptr to enclosing struct's key */ unsigned keylen; /* enclosing struct's key len */ unsigned hashv; /* result of hash-fcn(key) */ } UT_hash_handle; #endif /* UTHASH_H */ nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_acct/000077500000000000000000000000001333553357400232235ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_acct/CMakeLists.txt000066400000000000000000000003701333553357400257630ustar00rootroot00000000000000# The test_acct extension PROJECT("Accounting dummy server" C) FD_ADD_EXTENSION(test_acct test_acct.c) #### ## INSTALL section ## INSTALL(TARGETS test_acct LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-debug-tools) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_acct/test_acct.c000066400000000000000000000142171333553357400253450ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* This extension simply receives ACR and sends positive ACA after displaying the content, but does not commit the data to any storage */ #include static struct { struct dict_object * Accounting_Record_Number; struct dict_object * Accounting_Record_Type; } tac_dict; /* Callback for incoming Base Accounting application messages */ static int tac_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * data, enum disp_action * act) { struct msg_hdr *hdr = NULL; TRACE_ENTRY("%p %p %p %p", msg, avp, sess, act); if (msg == NULL) return EINVAL; /* Check what we received */ CHECK_FCT( fd_msg_hdr(*msg, &hdr) ); if (hdr->msg_flags & CMD_FLAG_REQUEST) { /* It was a request, create an answer */ struct msg *ans, *qry; struct avp * a = NULL; struct avp_hdr * h = NULL; os0_t s; size_t sl; qry = *msg; /* Create the answer message, including the Session-Id AVP */ CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, msg, 0 ) ); ans = *msg; /* Set the Origin-Host, Origin-Realm, Result-Code AVPs */ CHECK_FCT( fd_msg_rescode_set( ans, "DIAMETER_SUCCESS", NULL, NULL, 1 ) ); fd_log_debug("--------------Received the following Accounting message:--------------"); CHECK_FCT( fd_sess_getsid ( sess, &s, &sl ) ); fd_log_debug("Session: %.*s", (int)sl, s); /* The AVPs that we copy in the answer */ CHECK_FCT( fd_msg_search_avp ( qry, tac_dict.Accounting_Record_Type, &a) ); if (a) { CHECK_FCT( fd_msg_avp_hdr( a, &h ) ); fd_log_debug("Accounting-Record-Type: %d (%s)", h->avp_value->u32, /* it would be better to search this in the dictionary, but it is only for debug, so ok */ (h->avp_value->u32 == 1) ? "EVENT_RECORD" : (h->avp_value->u32 == 2) ? "START_RECORD" : (h->avp_value->u32 == 3) ? "INTERIM_RECORD" : (h->avp_value->u32 == 4) ? "STOP_RECORD" : "" ); CHECK_FCT( fd_msg_avp_new ( tac_dict.Accounting_Record_Type, 0, &a ) ); CHECK_FCT( fd_msg_avp_setvalue( a, h->avp_value ) ); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, a ) ); } CHECK_FCT( fd_msg_search_avp ( qry, tac_dict.Accounting_Record_Number, &a) ); if (a) { CHECK_FCT( fd_msg_avp_hdr( a, &h ) ); fd_log_debug("Accounting-Record-Number: %d", h->avp_value->u32); CHECK_FCT( fd_msg_avp_new ( tac_dict.Accounting_Record_Number, 0, &a ) ); CHECK_FCT( fd_msg_avp_setvalue( a, h->avp_value ) ); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, a ) ); } /* We may also dump other data from the message, such as Accounting session Id, number of packets, ... */ fd_log_debug("----------------------------------------------------------------------"); /* Send the answer */ CHECK_FCT( fd_msg_send( msg, NULL, NULL ) ); } else { /* We received an answer message, just discard it */ CHECK_FCT( fd_msg_free( *msg ) ); *msg = NULL; } return 0; } /* entry point: register handler for Base Accounting messages in the daemon */ static int tac_entry(char * conffile) { struct disp_when data; TRACE_ENTRY("%p", conffile); memset(&tac_dict, 0, sizeof(tac_dict)); memset(&data, 0, sizeof(data)); /* Initialize the dictionary objects we use */ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_APPLICATION, APPLICATION_BY_NAME, "Diameter Base Accounting", &data.app, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Accounting-Record-Number", &tac_dict.Accounting_Record_Number, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Accounting-Record-Type", &tac_dict.Accounting_Record_Type, ENOENT) ); /* Register the dispatch callback */ CHECK_FCT( fd_disp_register( tac_cb, DISP_HOW_APPID, &data, NULL, NULL ) ); /* Advertise the support for the Diameter Base Accounting application in the peer */ CHECK_FCT( fd_disp_app_support ( data.app, NULL, 0, 1 ) ); return 0; } EXTENSION_ENTRY("test_acct", tac_entry); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_app/000077500000000000000000000000001333553357400230715ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_app/CMakeLists.txt000066400000000000000000000011331333553357400256270ustar00rootroot00000000000000# The test_app extension PROJECT("Test Diameter Application" C) # Parser files BISON_FILE(ta_conf.y) FLEX_FILE(ta_conf.l) SET_SOURCE_FILES_PROPERTIES(lex.ta_conf.c ta_conf.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}") # List of source files SET( APP_TEST_SRC test_app.h test_app.c lex.ta_conf.c ta_conf.tab.c ta_conf.tab.h ta_dict.c ta_cli.c ta_bench.c ta_serv.c ) # Compile as a module FD_ADD_EXTENSION(test_app ${APP_TEST_SRC}) #### ## INSTALL section ## INSTALL(TARGETS test_app LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-debug-tools) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_app/ta_bench.c000066400000000000000000000261761333553357400250140ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2015, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Create and send a message, and receive it */ #include "test_app.h" #include #ifndef __APPLE__ /* they deprecated the semaphore there... */ #include #define my_sem_t sem_t #define my_sem_init sem_init #define my_sem_destroy sem_destroy #define my_sem_timedwait sem_timedwait #define my_sem_post sem_post #else // on APPLE #include #include #define my_sem_t dispatch_semaphore_t static int my_sem_init(my_sem_t * s, int pshared, unsigned int value ) { *s = dispatch_semaphore_create(value); if (*s == NULL) return ENOMEM; return 0; } static int my_sem_destroy(my_sem_t *s) { dispatch_release(*s); *s = NULL; return 0; } static int my_sem_timedwait(my_sem_t * s, struct timespec *ts) { struct timespec tsn; int64_t nsec; dispatch_time_t when; CHECK_SYS( clock_gettime(CLOCK_REALTIME, &tsn) ); nsec = (ts->tv_sec * 1000000000) + ts->tv_nsec - (tsn.tv_sec * 1000000000) - tsn.tv_nsec; when = dispatch_time ( DISPATCH_TIME_NOW, nsec ); return dispatch_semaphore_wait ( *s, when ) ? ETIMEDOUT : 0; } static int my_sem_post(my_sem_t *s) { dispatch_semaphore_signal(*s); return 0; } #endif // APPLE struct ta_mess_info { int32_t randval; /* a random value to store in Test-AVP */ struct timespec ts; /* Time of sending the message */ }; static my_sem_t ta_sem; /* To handle the concurrency */ /* Cb called when an answer is received */ static void ta_cb_ans(void * data, struct msg ** msg) { struct ta_mess_info * mi = (struct ta_mess_info *)data; struct timespec ts; struct avp * avp; struct avp_hdr * hdr; unsigned long dur; CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &ts), return ); /* Value of Result Code */ CHECK_FCT_DO( fd_msg_search_avp ( *msg, ta_res_code, &avp), return ); if (avp) { CHECK_FCT_DO( fd_msg_avp_hdr( avp, &hdr ), return ); } if (!avp || !hdr || hdr->avp_value->i32 != 2001) { /* error */ CHECK_POSIX_DO( pthread_mutex_lock(&ta_conf->stats_lock), ); ta_conf->stats.nb_errs++; CHECK_POSIX_DO( pthread_mutex_unlock(&ta_conf->stats_lock), ); goto end; } /* Check value of Test-AVP */ CHECK_FCT_DO( fd_msg_search_avp ( *msg, ta_avp, &avp), return ); if (avp) { CHECK_FCT_DO( fd_msg_avp_hdr( avp, &hdr ), return ); ASSERT(hdr->avp_value->i32 == mi->randval); } /* Compute how long it took */ dur = ((ts.tv_sec - mi->ts.tv_sec) * 1000000) + ((ts.tv_nsec - mi->ts.tv_nsec) / 1000); /* Add this value to the stats */ CHECK_POSIX_DO( pthread_mutex_lock(&ta_conf->stats_lock), ); if (ta_conf->stats.nb_recv) { /* Ponderate in the avg */ ta_conf->stats.avg = (ta_conf->stats.avg * ta_conf->stats.nb_recv + dur) / (ta_conf->stats.nb_recv + 1); /* Min, max */ if (dur < ta_conf->stats.shortest) ta_conf->stats.shortest = dur; if (dur > ta_conf->stats.longest) ta_conf->stats.longest = dur; } else { ta_conf->stats.shortest = dur; ta_conf->stats.longest = dur; ta_conf->stats.avg = dur; } ta_conf->stats.nb_recv++; CHECK_POSIX_DO( pthread_mutex_unlock(&ta_conf->stats_lock), ); end: /* Free the message */ CHECK_FCT_DO(fd_msg_free(*msg), ); *msg = NULL; free(mi); /* Post the semaphore */ CHECK_SYS_DO( my_sem_post(&ta_sem), ); return; } /* Create a test message */ static void ta_bench_test_message() { struct msg * req = NULL; struct avp * avp; union avp_value val; struct ta_mess_info * mi = NULL; TRACE_DEBUG(FULL, "Creating a new message for sending."); /* Create the request */ CHECK_FCT_DO( fd_msg_new( ta_cmd_r, MSGFL_ALLOC_ETEID, &req ), goto out ); /* Create a new session */ #define TEST_APP_SID_OPT "app_testb" CHECK_FCT_DO( fd_msg_new_session( req, (os0_t)TEST_APP_SID_OPT, CONSTSTRLEN(TEST_APP_SID_OPT) ), goto out ); /* Create the random value to store with the session */ mi = malloc(sizeof(struct ta_mess_info)); if (mi == NULL) { fd_log_debug("malloc failed: %s", strerror(errno)); goto out; } mi->randval = (int32_t)random(); /* Now set all AVPs values */ /* Set the Destination-Realm AVP */ { CHECK_FCT_DO( fd_msg_avp_new ( ta_dest_realm, 0, &avp ), goto out ); val.os.data = (unsigned char *)(ta_conf->dest_realm); val.os.len = strlen(ta_conf->dest_realm); CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); } /* Set the Destination-Host AVP if needed*/ if (ta_conf->dest_host) { CHECK_FCT_DO( fd_msg_avp_new ( ta_dest_host, 0, &avp ), goto out ); val.os.data = (unsigned char *)(ta_conf->dest_host); val.os.len = strlen(ta_conf->dest_host); CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); } /* Set Origin-Host & Origin-Realm */ CHECK_FCT_DO( fd_msg_add_origin ( req, 0 ), goto out ); /* Set the User-Name AVP if needed*/ if (ta_conf->user_name) { CHECK_FCT_DO( fd_msg_avp_new ( ta_user_name, 0, &avp ), goto out ); val.os.data = (unsigned char *)(ta_conf->user_name); val.os.len = strlen(ta_conf->user_name); CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); } /* Set the Test-AVP AVP */ { CHECK_FCT_DO( fd_msg_avp_new ( ta_avp, 0, &avp ), goto out ); val.i32 = mi->randval; CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); } CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &mi->ts), goto out ); /* Send the request */ CHECK_FCT_DO( fd_msg_send( &req, ta_cb_ans, mi ), goto out ); /* Increment the counter */ CHECK_POSIX_DO( pthread_mutex_lock(&ta_conf->stats_lock), ); ta_conf->stats.nb_sent++; CHECK_POSIX_DO( pthread_mutex_unlock(&ta_conf->stats_lock), ); out: return; } /* The function called when the signal is received */ static void ta_bench_start() { struct timespec end_time, now; struct ta_stats start, end; int nsec = 0; /* Save the initial stats */ CHECK_POSIX_DO( pthread_mutex_lock(&ta_conf->stats_lock), ); memcpy(&start, &ta_conf->stats, sizeof(struct ta_stats)); CHECK_POSIX_DO( pthread_mutex_unlock(&ta_conf->stats_lock), ); /* We will run for ta_conf->bench_duration seconds */ LOG_N("Starting benchmark client, %ds", ta_conf->bench_duration); CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &end_time), ); end_time.tv_sec += ta_conf->bench_duration; /* Now loop until timeout is reached */ do { /* Do not create more that NB_CONCURRENT_MESSAGES in paralel */ int ret = my_sem_timedwait(&ta_sem, &end_time); if (ret == -1) { ret = errno; if (ret != ETIMEDOUT) { CHECK_POSIX_DO(ret, ); /* Just to log it */ } break; } /* Update the current time */ CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &now), ); if (!TS_IS_INFERIOR(&now, &end_time)) break; /* Create and send a new test message */ ta_bench_test_message(); } while (1); do { CHECK_POSIX_DO( pthread_mutex_lock(&ta_conf->stats_lock), ); CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &now), ); /* Re-read the time because we might have spent some time wiating for the mutex */ memcpy(&end, &ta_conf->stats, sizeof(struct ta_stats)); CHECK_POSIX_DO( pthread_mutex_unlock(&ta_conf->stats_lock), ); /* Now, display the statistics */ LOG_N( "------- app_test Benchmark results, end sending +%ds ---------", nsec); if (now.tv_nsec >= end_time.tv_nsec) { LOG_N( " Executing for: %d.%06ld sec", (int)(now.tv_sec + ta_conf->bench_duration - end_time.tv_sec), (long)(now.tv_nsec - end_time.tv_nsec) / 1000); } else { LOG_N( " Executing for: %d.%06ld sec", (int)(now.tv_sec + ta_conf->bench_duration - 1 - end_time.tv_sec), (long)(now.tv_nsec + 1000000000 - end_time.tv_nsec) / 1000); } LOG_N( " %llu messages sent", end.nb_sent - start.nb_sent); LOG_N( " %llu error(s) received", end.nb_errs - start.nb_errs); LOG_N( " %llu answer(s) received", end.nb_recv - start.nb_recv); LOG_N( " Overall:"); LOG_N( " fastest: %ld.%06ld sec.", end.shortest / 1000000, end.shortest % 1000000); LOG_N( " slowest: %ld.%06ld sec.", end.longest / 1000000, end.longest % 1000000); LOG_N( " Average: %ld.%06ld sec.", end.avg / 1000000, end.avg % 1000000); LOG_N( " Throughput: %llu messages / sec", (end.nb_recv - start.nb_recv) / (( now.tv_sec + ta_conf->bench_duration - end_time.tv_sec ) + ((now.tv_nsec - end_time.tv_nsec) / 1000000000))); LOG_N( "-------------------------------------"); nsec ++; sleep(1); } while ( (end.nb_sent - start.nb_sent) > (end.nb_errs - start.nb_errs) + (end.nb_recv - start.nb_recv) ); LOG_N( "--------------- Test Complete --------------"); } int ta_bench_init(void) { CHECK_SYS( my_sem_init( &ta_sem, 0, ta_conf->bench_concur) ); CHECK_FCT( fd_event_trig_regcb(ta_conf->signal, "test_app.bench", ta_bench_start ) ); return 0; } void ta_bench_fini(void) { // CHECK_FCT_DO( fd_sig_unregister(ta_conf->signal), /* continue */ ); CHECK_SYS_DO( my_sem_destroy(&ta_sem), ); return; }; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_app/ta_cli.c000066400000000000000000000234221333553357400244730ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2015, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Create and send a message, and receive it */ /* Note that we use both sessions and the argument to answer callback to pass the same value. * This is just for the purpose of checking everything went OK. */ #include "test_app.h" #include static struct session_handler * ta_cli_reg = NULL; struct sess_state { int32_t randval; /* a random value to store in Test-AVP */ struct timespec ts; /* Time of sending the message */ } ; /* Cb called when an answer is received */ static void ta_cb_ans(void * data, struct msg ** msg) { struct sess_state * mi = NULL; struct timespec ts; struct session * sess; struct avp * avp; struct avp_hdr * hdr; unsigned long dur; int error = 0; CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &ts), return ); /* Search the session, retrieve its data */ { int new; CHECK_FCT_DO( fd_msg_sess_get(fd_g_config->cnf_dict, *msg, &sess, &new), return ); ASSERT( new == 0 ); CHECK_FCT_DO( fd_sess_state_retrieve( ta_cli_reg, sess, &mi ), return ); ASSERT( (void *)mi == data ); } /* Now log content of the answer */ fprintf(stderr, "RECV "); /* Value of Test-AVP */ CHECK_FCT_DO( fd_msg_search_avp ( *msg, ta_avp, &avp), return ); if (avp) { CHECK_FCT_DO( fd_msg_avp_hdr( avp, &hdr ), return ); if (hdr->avp_value->i32 == mi->randval) { fprintf(stderr, "%x (%s) ", hdr->avp_value->i32, "Ok"); } else { fprintf(stderr, "%x (%s) ", hdr->avp_value->i32, "PROBLEM"); error++; } } else { fprintf(stderr, "no_Test-AVP "); error++; } /* Value of Result Code */ CHECK_FCT_DO( fd_msg_search_avp ( *msg, ta_res_code, &avp), return ); if (avp) { CHECK_FCT_DO( fd_msg_avp_hdr( avp, &hdr ), return ); fprintf(stderr, "Status: %d ", hdr->avp_value->i32); if (hdr->avp_value->i32 != 2001) error++; } else { fprintf(stderr, "no_Result-Code "); error++; } /* Value of Origin-Host */ CHECK_FCT_DO( fd_msg_search_avp ( *msg, ta_origin_host, &avp), return ); if (avp) { CHECK_FCT_DO( fd_msg_avp_hdr( avp, &hdr ), return ); fprintf(stderr, "From '%.*s' ", (int)hdr->avp_value->os.len, hdr->avp_value->os.data); } else { fprintf(stderr, "no_Origin-Host "); error++; } /* Value of Origin-Realm */ CHECK_FCT_DO( fd_msg_search_avp ( *msg, ta_origin_realm, &avp), return ); if (avp) { CHECK_FCT_DO( fd_msg_avp_hdr( avp, &hdr ), return ); fprintf(stderr, "('%.*s') ", (int)hdr->avp_value->os.len, hdr->avp_value->os.data); } else { fprintf(stderr, "no_Origin-Realm "); error++; } CHECK_POSIX_DO( pthread_mutex_lock(&ta_conf->stats_lock), ); dur = ((ts.tv_sec - mi->ts.tv_sec) * 1000000) + ((ts.tv_nsec - mi->ts.tv_nsec) / 1000); if (ta_conf->stats.nb_recv) { /* Ponderate in the avg */ ta_conf->stats.avg = (ta_conf->stats.avg * ta_conf->stats.nb_recv + dur) / (ta_conf->stats.nb_recv + 1); /* Min, max */ if (dur < ta_conf->stats.shortest) ta_conf->stats.shortest = dur; if (dur > ta_conf->stats.longest) ta_conf->stats.longest = dur; } else { ta_conf->stats.shortest = dur; ta_conf->stats.longest = dur; ta_conf->stats.avg = dur; } if (error) ta_conf->stats.nb_errs++; else ta_conf->stats.nb_recv++; CHECK_POSIX_DO( pthread_mutex_unlock(&ta_conf->stats_lock), ); /* Display how long it took */ if (ts.tv_nsec > mi->ts.tv_nsec) { fprintf(stderr, "in %d.%06ld sec", (int)(ts.tv_sec - mi->ts.tv_sec), (long)(ts.tv_nsec - mi->ts.tv_nsec) / 1000); } else { fprintf(stderr, "in %d.%06ld sec", (int)(ts.tv_sec + 1 - mi->ts.tv_sec), (long)(1000000000 + ts.tv_nsec - mi->ts.tv_nsec) / 1000); } fprintf(stderr, "\n"); fflush(stderr); /* Free the message */ CHECK_FCT_DO(fd_msg_free(*msg), return); *msg = NULL; free(mi); return; } /* Create a test message */ static void ta_cli_test_message() { struct msg * req = NULL; struct avp * avp; union avp_value val; struct sess_state * mi = NULL, *svg; struct session *sess = NULL; TRACE_DEBUG(FULL, "Creating a new message for sending."); /* Create the request */ CHECK_FCT_DO( fd_msg_new( ta_cmd_r, MSGFL_ALLOC_ETEID, &req ), goto out ); /* Create a new session */ #define TEST_APP_SID_OPT "app_test" CHECK_FCT_DO( fd_msg_new_session( req, (os0_t)TEST_APP_SID_OPT, CONSTSTRLEN(TEST_APP_SID_OPT) ), goto out ); CHECK_FCT_DO( fd_msg_sess_get(fd_g_config->cnf_dict, req, &sess, NULL), goto out ); /* Create the random value to store with the session */ mi = malloc(sizeof(struct sess_state)); if (mi == NULL) { fd_log_debug("malloc failed: %s", strerror(errno)); goto out; } mi->randval = (int32_t)random(); /* Now set all AVPs values */ /* Set the Destination-Realm AVP */ { CHECK_FCT_DO( fd_msg_avp_new ( ta_dest_realm, 0, &avp ), goto out ); val.os.data = (unsigned char *)(ta_conf->dest_realm); val.os.len = strlen(ta_conf->dest_realm); CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); } /* Set the Destination-Host AVP if needed*/ if (ta_conf->dest_host) { CHECK_FCT_DO( fd_msg_avp_new ( ta_dest_host, 0, &avp ), goto out ); val.os.data = (unsigned char *)(ta_conf->dest_host); val.os.len = strlen(ta_conf->dest_host); CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); } /* Set Origin-Host & Origin-Realm */ CHECK_FCT_DO( fd_msg_add_origin ( req, 0 ), goto out ); /* Set the User-Name AVP if needed*/ if (ta_conf->user_name) { CHECK_FCT_DO( fd_msg_avp_new ( ta_user_name, 0, &avp ), goto out ); val.os.data = (unsigned char *)(ta_conf->user_name); val.os.len = strlen(ta_conf->user_name); CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); } /* Set the Test-AVP AVP */ { CHECK_FCT_DO( fd_msg_avp_new ( ta_avp, 0, &avp ), goto out ); val.i32 = mi->randval; CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); } /* Set the Test-Payload-AVP AVP */ if (ta_conf->long_avp_id) { int l; CHECK_FCT_DO( fd_msg_avp_new ( ta_avp_long, 0, &avp ), goto out ); CHECK_MALLOC_DO( val.os.data = malloc(ta_conf->long_avp_len), goto out); val.os.len = ta_conf->long_avp_len; for (l=0; l < ta_conf->long_avp_len; l++) val.os.data[l]=l; CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), goto out ); free(val.os.data); CHECK_FCT_DO( fd_msg_avp_add( req, MSG_BRW_LAST_CHILD, avp ), goto out ); } CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &mi->ts), goto out ); /* Keep a pointer to the session data for debug purpose, in real life we would not need it */ svg = mi; /* Store this value in the session */ CHECK_FCT_DO( fd_sess_state_store ( ta_cli_reg, sess, &mi ), goto out ); /* Log sending the message */ fprintf(stderr, "SEND %x to '%s' (%s)\n", svg->randval, ta_conf->dest_realm, ta_conf->dest_host?:"-" ); fflush(stderr); /* Send the request */ CHECK_FCT_DO( fd_msg_send( &req, ta_cb_ans, svg ), goto out ); /* Increment the counter */ CHECK_POSIX_DO( pthread_mutex_lock(&ta_conf->stats_lock), ); ta_conf->stats.nb_sent++; CHECK_POSIX_DO( pthread_mutex_unlock(&ta_conf->stats_lock), ); out: return; } int ta_cli_init(void) { CHECK_FCT( fd_sess_handler_create(&ta_cli_reg, (void *)free, NULL, NULL) ); CHECK_FCT( fd_event_trig_regcb(ta_conf->signal, "test_app.cli", ta_cli_test_message ) ); return 0; } void ta_cli_fini(void) { // CHECK_FCT_DO( fd_sig_unregister(ta_conf->signal), /* continue */ ); CHECK_FCT_DO( fd_sess_handler_destroy(&ta_cli_reg, NULL), /* continue */ ); return; }; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_app/ta_conf.l000066400000000000000000000121341333553357400246600ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Lex extension's configuration parser. * * The configuration file contains a default priority, and a list of peers with optional overwite priority. * -- see the app_test.conf.sample file for more detail. */ %{ #include "test_app.h" /* Include yacc tokens definitions */ #include "ta_conf.tab.h" /* Update the column information */ #define YY_USER_ACTION { \ yylloc->first_column = yylloc->last_column + 1; \ yylloc->last_column = yylloc->first_column + yyleng - 1; \ } /* Avoid warning with newer flex */ #define YY_NO_INPUT %} %option bison-bridge bison-locations %option noyywrap %option nounput %% /* Update the line count */ \n { yylloc->first_line++; yylloc->last_line++; yylloc->last_column=0; } /* Eat all spaces but not new lines */ ([[:space:]]{-}[\n])+ ; /* Eat all comments */ #.*$ ; /* Recognize any integer */ [-]?[[:digit:]]+ { /* Convert this to an integer value */ int ret=0; ret = sscanf(yytext, "%i", &yylval->integer); if (ret != 1) { /* No matching: an error occurred */ fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); return LEX_ERROR; /* trig an error in yacc parser */ /* Maybe we could REJECT instead of failing here? */ } return INTEGER; } /* Recognize quoted strings -- we do not support escaped \" in the string currently. */ \"[^\"]+\" { /* Match a quoted string. Let's be very permissive. */ yylval->string = strdup(yytext+1); if (!yylval->string) { fd_log_debug("Unable to copy the string '%s': %s", yytext, strerror(errno)); TRACE_DEBUG(INFO, "strdup failed"); return LEX_ERROR; /* trig an error in yacc parser */ } yylval->string[strlen(yytext) - 2] = '\0'; return QSTRING; } /* Recognize the tokens */ (?i:"vendor-id") { return VENDOR_ID; } (?i:"appli-id") { return APPLI_ID; } (?i:"cmd-id") { return CMD_ID; } (?i:"avp-id") { return AVP_ID; } (?i:"long-avp-id") { return LONG_AVP_ID; } (?i:"long-avp-len") { return LONG_AVP_LEN; } (?i:"mode") { return MODE; } (?i:"server") { yylval->integer = MODE_SERV; return INTEGER; } (?i:"client") { yylval->integer = MODE_CLI; return INTEGER; } (?i:"both") { yylval->integer = MODE_SERV | MODE_CLI; return INTEGER; } (?i:"dest-realm") { return DEST_REALM; } (?i:"dest-host") { return DEST_HOST; } (?i:"user-name") { return USER_NAME; } (?i:"Signal") { return SIGNAL; } (?i:"Benchmark") { return BENCH; } /* Valid single characters for yyparse */ [=;] { return yytext[0]; } /* Unrecognized sequence, if it did not match any previous pattern */ [^[:space:]"*=>;\n]+ { fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); return LEX_ERROR; } %% nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_app/ta_conf.y000066400000000000000000000144131333553357400246770ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Yacc extension's configuration parser. * See doc/app_test.conf.sample for configuration file format */ /* For development only : */ %debug %error-verbose /* The parser receives the configuration file filename as parameter */ %parse-param {char * conffile} /* Keep track of location */ %locations %pure-parser %{ #include "test_app.h" #include "ta_conf.tab.h" /* bison is not smart enough to define the YYLTYPE before including this code, so... */ #include #include /* Forward declaration */ int yyparse(char * conffile); /* Parse the configuration file */ int ta_conf_handle(char * conffile) { extern FILE * ta_confin; int ret; TRACE_ENTRY("%p", conffile); TRACE_DEBUG (FULL, "Parsing configuration file: %s...", conffile); ta_confin = fopen(conffile, "r"); if (ta_confin == NULL) { ret = errno; fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret)); TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file."); return ret; } ret = yyparse(conffile); fclose(ta_confin); if (ret != 0) { TRACE_DEBUG (INFO, "Unable to parse the configuration file."); return EINVAL; } return 0; } /* The Lex parser prototype */ int ta_conflex(YYSTYPE *lvalp, YYLTYPE *llocp); /* Function to report the errors */ void yyerror (YYLTYPE *ploc, char * conffile, char const *s) { TRACE_DEBUG(INFO, "Error in configuration parsing"); if (ploc->first_line != ploc->last_line) fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); else if (ploc->first_column != ploc->last_column) fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); else fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); } %} /* Values returned by lex for token */ %union { char *string; /* The string is allocated by strdup in lex.*/ int integer; /* Store integer values */ } /* In case of error in the lexical analysis */ %token LEX_ERROR /* Key words */ %token VENDOR_ID %token APPLI_ID %token CMD_ID %token AVP_ID %token LONG_AVP_ID %token LONG_AVP_LEN %token MODE %token DEST_REALM %token DEST_HOST %token USER_NAME %token SIGNAL %token BENCH /* Tokens and types for routing table definition */ /* A (de)quoted string (malloc'd in lex parser; it must be freed after use) */ %token QSTRING /* An integer value */ %token INTEGER /* -------------------------------------- */ %% /* The grammar definition */ conffile: /* empty grammar is OK */ | conffile vendor | conffile appli | conffile cmd | conffile avp | conffile long_avp_id | conffile long_avp_len | conffile mode | conffile dstrealm | conffile dsthost | conffile usrname | conffile signal | conffile bench ; vendor: VENDOR_ID '=' INTEGER ';' { ta_conf->vendor_id = $3; } ; appli: APPLI_ID '=' INTEGER ';' { ta_conf->appli_id = $3; } ; cmd: CMD_ID '=' INTEGER ';' { ta_conf->cmd_id = $3; } ; avp: AVP_ID '=' INTEGER ';' { ta_conf->avp_id = $3; } ; long_avp_id: LONG_AVP_ID '=' INTEGER ';' { ta_conf->long_avp_id = $3; } ; long_avp_len: LONG_AVP_LEN '=' INTEGER ';' { ta_conf->long_avp_len = $3; } ; mode: MODE '=' INTEGER ';' { ta_conf->mode = $3 | (ta_conf->mode & ~3); /* overwrite the 2 lsb */ } ; bench: BENCH ';' { ta_conf->mode |= MODE_BENCH; } | BENCH INTEGER INTEGER ';' { ta_conf->mode |= MODE_BENCH; ta_conf->bench_duration = $2; ta_conf->bench_concur = $3; } ; dstrealm: DEST_REALM '=' QSTRING ';' { free(ta_conf->dest_realm); ta_conf->dest_realm = $3; } ; dsthost: DEST_HOST '=' QSTRING ';' { free(ta_conf->dest_host); ta_conf->dest_host = $3; } ; usrname: USER_NAME '=' QSTRING ';' { free(ta_conf->user_name); ta_conf->user_name = $3; } ; signal: SIGNAL '=' INTEGER ';' { ta_conf->signal = $3; } ; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_app/ta_dict.c000066400000000000000000000163571333553357400246600ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Install the dictionary objects */ #include "test_app.h" struct dict_object * ta_vendor = NULL; struct dict_object * ta_appli = NULL; struct dict_object * ta_cmd_r = NULL; struct dict_object * ta_cmd_a = NULL; struct dict_object * ta_avp = NULL; struct dict_object * ta_avp_long = NULL; struct dict_object * ta_sess_id = NULL; struct dict_object * ta_origin_host = NULL; struct dict_object * ta_origin_realm = NULL; struct dict_object * ta_dest_host = NULL; struct dict_object * ta_dest_realm = NULL; struct dict_object * ta_user_name = NULL; struct dict_object * ta_res_code = NULL; int ta_dict_init(void) { TRACE_DEBUG(FULL, "Initializing the dictionary for test"); /* Create the Test Vendor */ { struct dict_vendor_data data; data.vendor_id = ta_conf->vendor_id; data.vendor_name = "app_test vendor"; CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_VENDOR, &data, NULL, &ta_vendor)); } /* Create the Test Application */ { struct dict_application_data data; data.application_id = ta_conf->appli_id; data.application_name = "app_test application"; CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_APPLICATION, &data, ta_vendor, &ta_appli)); } /* Create the Test-Request & Test-Answer commands */ { struct dict_cmd_data data; data.cmd_code = ta_conf->cmd_id; data.cmd_name = "Test-Request"; data.cmd_flag_mask = CMD_FLAG_PROXIABLE | CMD_FLAG_REQUEST; data.cmd_flag_val = CMD_FLAG_PROXIABLE | CMD_FLAG_REQUEST; CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_COMMAND, &data, ta_appli, &ta_cmd_r)); data.cmd_name = "Test-Answer"; data.cmd_flag_val = CMD_FLAG_PROXIABLE; CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_COMMAND, &data, ta_appli, &ta_cmd_a)); } /* Create the Test AVP */ { struct dict_avp_data data; data.avp_code = ta_conf->avp_id; data.avp_vendor = ta_conf->vendor_id; data.avp_name = "Test-AVP"; data.avp_flag_mask = AVP_FLAG_VENDOR; data.avp_flag_val = AVP_FLAG_VENDOR; data.avp_basetype = AVP_TYPE_INTEGER32; CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_AVP, &data, NULL, &ta_avp)); } /* Create the Test Payload AVP */ if (ta_conf->long_avp_id) { struct dict_avp_data data; data.avp_code = ta_conf->long_avp_id; data.avp_vendor = ta_conf->vendor_id; data.avp_name = "Test-Payload-AVP"; data.avp_flag_mask = AVP_FLAG_VENDOR; data.avp_flag_val = AVP_FLAG_VENDOR; data.avp_basetype = AVP_TYPE_OCTETSTRING; CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_AVP, &data, NULL, &ta_avp_long)); } /* Now resolve some other useful AVPs */ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Session-Id", &ta_sess_id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Host", &ta_origin_host, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Realm", &ta_origin_realm, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Host", &ta_dest_host, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Realm", &ta_dest_realm, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "User-Name", &ta_user_name, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Result-Code", &ta_res_code, ENOENT) ); /* Create the rules for Test-Request and Test-Answer */ { struct dict_rule_data data; data.rule_min = 1; data.rule_max = 1; /* Session-Id is in first position */ data.rule_avp = ta_sess_id; data.rule_position = RULE_FIXED_HEAD; data.rule_order = 1; CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &data, ta_cmd_r, NULL)); CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &data, ta_cmd_a, NULL)); data.rule_position = RULE_REQUIRED; /* Test-AVP is mandatory */ data.rule_avp = ta_avp; CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &data, ta_cmd_r, NULL)); CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &data, ta_cmd_a, NULL)); /* idem for Origin Host and Realm */ data.rule_avp = ta_origin_host; CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &data, ta_cmd_r, NULL)); CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &data, ta_cmd_a, NULL)); data.rule_avp = ta_origin_realm; CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &data, ta_cmd_r, NULL)); CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &data, ta_cmd_a, NULL)); /* And Result-Code is mandatory for answers only */ data.rule_avp = ta_res_code; CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &data, ta_cmd_a, NULL)); /* And Destination-Realm for requests only */ data.rule_avp = ta_dest_realm; CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &data, ta_cmd_r, NULL)); /* And Destination-Host optional for requests only */ data.rule_position = RULE_OPTIONAL; data.rule_min = 0; data.rule_avp = ta_dest_host; CHECK_FCT(fd_dict_new( fd_g_config->cnf_dict, DICT_RULE, &data, ta_cmd_r, NULL)); } return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_app/ta_serv.c000066400000000000000000000126701333553357400247060ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Install the dispatch callbacks */ #include "test_app.h" static struct disp_hdl * ta_hdl_fb = NULL; /* handler for fallback cb */ static struct disp_hdl * ta_hdl_tr = NULL; /* handler for Test-Request req cb */ /* Default callback for the application. */ static int ta_fb_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act) { /* This CB should never be called */ TRACE_ENTRY("%p %p %p %p", msg, avp, sess, act); fd_log_debug("Unexpected message received!"); return ENOTSUP; } /* Callback for incoming Test-Request messages */ static int ta_tr_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act) { struct msg *ans, *qry; struct avp * a; TRACE_ENTRY("%p %p %p %p", msg, avp, sess, act); if (msg == NULL) return EINVAL; /* Value of Origin-Host */ if (! (ta_conf->mode & MODE_BENCH)) { fprintf(stderr, "ECHO Test-Request received from "); CHECK_FCT( fd_msg_search_avp ( *msg, ta_origin_host, &a) ); if (a) { struct avp_hdr * hdr; CHECK_FCT( fd_msg_avp_hdr( a, &hdr ) ); fprintf(stderr, "'%.*s'", (int)hdr->avp_value->os.len, hdr->avp_value->os.data); } else { fprintf(stderr, "no_Origin-Host"); } fprintf(stderr, ", replying...\n"); } /* Create answer header */ qry = *msg; CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, msg, 0 ) ); ans = *msg; /* Set the Test-AVP AVP */ { struct avp * src = NULL; struct avp_hdr * hdr = NULL; CHECK_FCT( fd_msg_search_avp ( qry, ta_avp, &src) ); CHECK_FCT( fd_msg_avp_hdr( src, &hdr ) ); CHECK_FCT( fd_msg_avp_new ( ta_avp, 0, &avp ) ); CHECK_FCT( fd_msg_avp_setvalue( avp, hdr->avp_value ) ); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); } /* Set the Test-Payload-AVP AVP */ if (ta_conf->long_avp_id) { struct avp * src = NULL; struct avp_hdr * hdr = NULL; CHECK_FCT( fd_msg_search_avp ( qry, ta_avp_long, &src) ); CHECK_FCT( fd_msg_avp_hdr( src, &hdr ) ); CHECK_FCT( fd_msg_avp_new ( ta_avp_long, 0, &avp ) ); CHECK_FCT( fd_msg_avp_setvalue( avp, hdr->avp_value ) ); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); } /* Set the Origin-Host, Origin-Realm, Result-Code AVPs */ CHECK_FCT( fd_msg_rescode_set( ans, "DIAMETER_SUCCESS", NULL, NULL, 1 ) ); /* Send the answer */ CHECK_FCT( fd_msg_send( msg, NULL, NULL ) ); /* Add this value to the stats */ CHECK_POSIX_DO( pthread_mutex_lock(&ta_conf->stats_lock), ); ta_conf->stats.nb_echoed++; CHECK_POSIX_DO( pthread_mutex_unlock(&ta_conf->stats_lock), ); return 0; } int ta_serv_init(void) { struct disp_when data; TRACE_DEBUG(FULL, "Initializing dispatch callbacks for test"); memset(&data, 0, sizeof(data)); data.app = ta_appli; data.command = ta_cmd_r; /* fallback CB if command != Test-Request received */ CHECK_FCT( fd_disp_register( ta_fb_cb, DISP_HOW_APPID, &data, NULL, &ta_hdl_fb ) ); /* Now specific handler for Test-Request */ CHECK_FCT( fd_disp_register( ta_tr_cb, DISP_HOW_CC, &data, NULL, &ta_hdl_tr ) ); return 0; } void ta_serv_fini(void) { if (ta_hdl_fb) { (void) fd_disp_unregister(&ta_hdl_fb, NULL); } if (ta_hdl_tr) { (void) fd_disp_unregister(&ta_hdl_tr, NULL); } return; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_app/test_app.c000066400000000000000000000206441333553357400250620ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* * Test application for freeDiameter. */ #include "test_app.h" /* Initialize the configuration */ struct ta_conf * ta_conf = NULL; static struct ta_conf _conf; static pthread_t ta_stats_th = (pthread_t)NULL; static int ta_conf_init(void) { ta_conf = &_conf; memset(ta_conf, 0, sizeof(struct ta_conf)); /* Set the default values */ ta_conf->vendor_id = 999999; /* Dummy value */ ta_conf->appli_id = 0xffffff; /* dummy value */ ta_conf->cmd_id = 0xfffffe; /* Experimental */ ta_conf->avp_id = 0xffffff; /* dummy value */ ta_conf->long_avp_len = 5000; ta_conf->mode = MODE_SERV | MODE_CLI; ta_conf->dest_realm = strdup(fd_g_config->cnf_diamrlm); ta_conf->dest_host = NULL; ta_conf->signal = TEST_APP_DEFAULT_SIGNAL; ta_conf->bench_concur = 100; ta_conf->bench_duration = 10; /* Initialize the mutex */ CHECK_POSIX( pthread_mutex_init(&ta_conf->stats_lock, NULL) ); return 0; } static void ta_conf_dump(void) { if (!TRACE_BOOL(INFO)) return; fd_log_debug( "------- app_test configuration dump: ---------"); fd_log_debug( " Vendor Id .......... : %u", ta_conf->vendor_id); fd_log_debug( " Application Id ..... : %u", ta_conf->appli_id); fd_log_debug( " Command Id ......... : %u", ta_conf->cmd_id); fd_log_debug( " AVP Id ............. : %u", ta_conf->avp_id); fd_log_debug( " Long AVP Id ........ : %u", ta_conf->long_avp_id); fd_log_debug( " Long AVP len ....... : %zu", ta_conf->long_avp_len); fd_log_debug( " Mode ............... : %s%s%s", ta_conf->mode & MODE_SERV ? "Serv" : "", ta_conf->mode & MODE_CLI ? "Cli" : "", ta_conf->mode & MODE_BENCH ? " (Benchmark)" : ""); fd_log_debug( " Destination Realm .. : %s", ta_conf->dest_realm ?: "- none -"); fd_log_debug( " Destination Host ... : %s", ta_conf->dest_host ?: "- none -"); fd_log_debug( " Signal ............. : %i", ta_conf->signal); fd_log_debug( "------- /app_test configuration dump ---------"); } /* Function to display statistics periodically */ static void * ta_stats(void * arg) { struct timespec start, now; struct ta_stats copy; /* Get the start time */ CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &start), ); /* Now, loop until canceled */ while (1) { /* Display statistics every XX seconds */ sleep(ta_conf->bench_duration + 3); /* Now, get the current stats */ CHECK_POSIX_DO( pthread_mutex_lock(&ta_conf->stats_lock), ); memcpy(©, &ta_conf->stats, sizeof(struct ta_stats)); CHECK_POSIX_DO( pthread_mutex_unlock(&ta_conf->stats_lock), ); /* Get the current execution time */ CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &now), ); /* Now, display everything */ fd_log_debug( "------- app_test statistics ---------"); if (now.tv_nsec >= start.tv_nsec) { fd_log_debug( " Executing for: %d.%06ld sec", (int)(now.tv_sec - start.tv_sec), (long)(now.tv_nsec - start.tv_nsec) / 1000); } else { fd_log_debug( " Executing for: %d.%06ld sec", (int)(now.tv_sec - 1 - start.tv_sec), (long)(now.tv_nsec + 1000000000 - start.tv_nsec) / 1000); } if (ta_conf->mode & MODE_SERV) { fd_log_debug( " Server: %llu message(s) echoed", copy.nb_echoed); } if (ta_conf->mode & MODE_CLI) { fd_log_debug( " Client:"); fd_log_debug( " %llu message(s) sent", copy.nb_sent); fd_log_debug( " %llu error(s) received", copy.nb_errs); fd_log_debug( " %llu answer(s) received", copy.nb_recv); fd_log_debug( " fastest: %ld.%06ld sec.", copy.shortest / 1000000, copy.shortest % 1000000); fd_log_debug( " slowest: %ld.%06ld sec.", copy.longest / 1000000, copy.longest % 1000000); fd_log_debug( " Average: %ld.%06ld sec.", copy.avg / 1000000, copy.avg % 1000000); } fd_log_debug( "-------------------------------------"); } return NULL; /* never called */ } static struct fd_hook_hdl * hookhdl[2] = { NULL, NULL }; static void ta_hook_cb_silent(enum fd_hook_type type, struct msg * msg, struct peer_hdr * peer, void * other, struct fd_hook_permsgdata *pmd, void * regdata) { } static void ta_hook_cb_oneline(enum fd_hook_type type, struct msg * msg, struct peer_hdr * peer, void * other, struct fd_hook_permsgdata *pmd, void * regdata) { char * buf = NULL; size_t len; CHECK_MALLOC_DO( fd_msg_dump_summary(&buf, &len, NULL, msg, NULL, 0, 0), { LOG_E("Error while dumping a message"); return; } ); LOG_N("{%d} %s: %s", type, (char *)other ?:"", buf ?:""); free(buf); } /* entry point */ static int ta_entry(char * conffile) { TRACE_ENTRY("%p", conffile); /* Initialize configuration */ CHECK_FCT( ta_conf_init() ); /* Parse configuration file */ if (conffile != NULL) { CHECK_FCT( ta_conf_handle(conffile) ); } TRACE_DEBUG(INFO, "Extension Test_App initialized with configuration: '%s'", conffile); ta_conf_dump(); /* Install objects definitions for this test application */ CHECK_FCT( ta_dict_init() ); /* Install the handlers for incoming messages */ if (ta_conf->mode & MODE_SERV) { CHECK_FCT( ta_serv_init() ); } /* Start the signal handler thread */ if (ta_conf->mode & MODE_CLI) { if (ta_conf->mode & MODE_BENCH) { CHECK_FCT( ta_bench_init() ); } else { CHECK_FCT( ta_cli_init() ); } } /* Advertise the support for the test application in the peer */ CHECK_FCT( fd_disp_app_support ( ta_appli, ta_vendor, 1, 0 ) ); if (ta_conf->mode & MODE_BENCH) { /* Register an empty hook to disable the default handling */ CHECK_FCT( fd_hook_register( HOOK_MASK( HOOK_DATA_RECEIVED, HOOK_MESSAGE_RECEIVED, HOOK_MESSAGE_LOCAL, HOOK_MESSAGE_SENT, HOOK_MESSAGE_ROUTING_FORWARD, HOOK_MESSAGE_ROUTING_LOCAL ), ta_hook_cb_silent, NULL, NULL, &hookhdl[0]) ); CHECK_FCT( fd_hook_register( HOOK_MASK( HOOK_MESSAGE_ROUTING_ERROR, HOOK_MESSAGE_DROPPED ), ta_hook_cb_oneline, NULL, NULL, &hookhdl[1]) ); } /* Start the statistics thread */ CHECK_POSIX( pthread_create(&ta_stats_th, NULL, ta_stats, NULL) ); return 0; } /* Unload */ void fd_ext_fini(void) { if (ta_conf->mode & MODE_CLI) ta_cli_fini(); if (ta_conf->mode & MODE_SERV) ta_serv_fini(); if (hookhdl[0]) fd_hook_unregister( hookhdl[0] ); if (hookhdl[1]) fd_hook_unregister( hookhdl[1] ); CHECK_FCT_DO( fd_thr_term(&ta_stats_th), ); CHECK_POSIX_DO( pthread_mutex_destroy(&ta_conf->stats_lock), ); } EXTENSION_ENTRY("test_app", ta_entry); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_app/test_app.h000066400000000000000000000112671333553357400250700ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Header file for the app_test extension. * * This extension provides a way to send configurable messages on the network * * See the app_test.conf.sample file for the format of the configuration file. */ #include #include #ifndef TEST_APP_DEFAULT_SIGNAL #define TEST_APP_DEFAULT_SIGNAL SIGUSR1 #endif /* TEST_APP_DEFAULT_SIGNAL */ /* Mode for the extension */ #define MODE_SERV 0x1 #define MODE_CLI 0x2 #define MODE_BENCH 0x4 /* The module configuration */ struct ta_conf { uint32_t vendor_id; /* default 999999 */ uint32_t appli_id; /* default 123456 */ uint32_t cmd_id; /* default 234567 */ uint32_t avp_id; /* default 345678 */ uint32_t long_avp_id; /* default 0 */ size_t long_avp_len; /* default 5000 */ int mode; /* default MODE_SERV | MODE_CLI */ char * dest_realm; /* default local realm */ char * dest_host; /* default NULL */ char * user_name; /* default NULL */ int signal; /* default TEST_APP_DEFAULT_SIGNAL */ int bench_concur; /* default 100 */ int bench_duration; /* default 10 */ struct ta_stats { unsigned long long nb_echoed; /* server */ unsigned long long nb_sent; /* client */ unsigned long long nb_recv; /* client */ unsigned long long nb_errs; /* client */ unsigned long shortest; /* fastest answer, in microseconds */ unsigned long longest; /* slowest answer, in microseconds */ unsigned long avg; /* average answer time, in microseconds */ } stats; pthread_mutex_t stats_lock; }; extern struct ta_conf * ta_conf; /* Parse the configuration file */ int ta_conf_handle(char * conffile); /* Handle incoming messages (server) */ int ta_serv_init(void); void ta_serv_fini(void); /* Create outgoing message (client) */ int ta_cli_init(void); void ta_cli_fini(void); /* Benchmark flavour */ int ta_bench_init(void); void ta_bench_fini(void); /* Initialize dictionary definitions */ int ta_dict_init(void); /* Some global variables for dictionary */ extern struct dict_object * ta_vendor; extern struct dict_object * ta_appli; extern struct dict_object * ta_cmd_r; extern struct dict_object * ta_cmd_a; extern struct dict_object * ta_avp; extern struct dict_object * ta_avp_long; extern struct dict_object * ta_sess_id; extern struct dict_object * ta_origin_host; extern struct dict_object * ta_origin_realm; extern struct dict_object * ta_dest_host; extern struct dict_object * ta_dest_realm; extern struct dict_object * ta_user_name; extern struct dict_object * ta_res_code; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_netemul/000077500000000000000000000000001333553357400237625ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_netemul/CMakeLists.txt000066400000000000000000000020221333553357400265160ustar00rootroot00000000000000# The test_netemul extension PROJECT("Simple Diameter network emulator proxy extension (latency, PDV, duplicates)" C) # Parser files BISON_FILE(test_netemul.y) FLEX_FILE(test_netemul.l) SET_SOURCE_FILES_PROPERTIES(lex.test_netemul.c test_netemul.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}") # List of source files SET( TNEMUL_SRC test_netemul.c test_netemul.h lex.test_netemul.c test_netemul.tab.c test_netemul.tab.h tne_process.c ) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) # Compile these files as a freeDiameter extension FD_ADD_EXTENSION(test_netemul ${TNEMUL_SRC}) # math functions CHECK_FUNCTION_EXISTS (sqrt HAVE_SQRT) IF (HAVE_SQRT) SET(MATH_LIBS "") ELSE (HAVE_SQRT) CHECK_LIBRARY_EXISTS (m sqrt "" HAVE_LIBM) IF (HAVE_LIBM) SET(MATH_LIBS "-lm") ENDIF (HAVE_LIBM) ENDIF (HAVE_SQRT) TARGET_LINK_LIBRARIES(test_netemul ${MATH_LIBS}) #### ## INSTALL section ## INSTALL(TARGETS test_netemul LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-debug-tools) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_netemul/test_netemul.c000066400000000000000000000074031333553357400266420ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2011, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* * This extension provides a simple Diameter network emulator mechanism. * It allows the introduction of delays and duplicates of Diameter messages. * See test_netemul.conf.sample file for the format of the configuration file. */ #include "test_netemul.h" /* The configuration structure */ struct tne_conf tne_conf; /* Proxying callback */ static int tne_fwd_cb(void * cbdata, struct msg ** msg) { struct msg * m; TRACE_ENTRY("%p %p", cbdata, msg); m = *msg; *msg = NULL; TRACE_DEBUG(FULL, "[tne] Processing message %p", m); CHECK_FCT( tne_process_message(m) ); return 0; } static struct fd_rt_fwd_hdl * fwd_hdl = NULL; /* Register the callbacks to the daemon */ static int tne_main(char * conffile) { TRACE_ENTRY("%p", conffile); /* Initialize the configuration */ memset(&tne_conf, 0, sizeof(tne_conf)); tne_conf.lat_avg = 500; tne_conf.lat_dev = 20; tne_conf.dupl_proba = 1E-2; /* Parse the configuration file */ CHECK_FCT( tne_conf_handle(conffile) ); /* Initialize the process module */ CHECK_FCT( tne_process_init() ); /* Now, register the proxying callback */ CHECK_FCT( fd_rt_fwd_register ( tne_fwd_cb, NULL, RT_FWD_REQ, &fwd_hdl ) ); return 0; } /* Cleanup the callbacks */ void fd_ext_fini(void) { TRACE_ENTRY(); /* Unregister the module */ CHECK_FCT_DO( fd_rt_fwd_unregister ( fwd_hdl, NULL ), /* continue */ ); /* Destroy the process thread */ CHECK_FCT_DO( tne_process_fini ( ), /* continue */ ); return ; } /* Define the entry point function */ EXTENSION_ENTRY("test_netemul", tne_main); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_netemul/test_netemul.h000066400000000000000000000054701333553357400266510ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2011, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* * See the test_netemul.conf.sample file for the format of the configuration file. */ /* FreeDiameter's common include file */ #include /* Parse the configuration file */ int tne_conf_handle(char * conffile); /* The configuration structure */ extern struct tne_conf { unsigned long lat_avg; /* in milliseconds */ unsigned int lat_dev; /* between 0 and 100 */ float dupl_proba; } tne_conf; /* Apply the configured process to the message, then send it. */ int tne_process_message(struct msg * msg); int tne_process_init(); int tne_process_fini(); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_netemul/test_netemul.l000066400000000000000000000105451333553357400266540ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Tokenizer */ %{ #include "test_netemul.h" /* Include yacc tokens definitions */ #include "test_netemul.tab.h" /* Update the column information */ #define YY_USER_ACTION { \ yylloc->first_column = yylloc->last_column + 1; \ yylloc->last_column = yylloc->first_column + yyleng - 1; \ } /* Avoid warning with newer flex */ #define YY_NO_INPUT %} %option bison-bridge bison-locations %option noyywrap %option nounput %% /* Update the line count */ \n { yylloc->first_line++; yylloc->last_line++; yylloc->last_column=0; } /* Eat all spaces but not new lines */ ([[:space:]]{-}[\n])+ ; /* Eat all comments */ #.*$ ; /* Recognize floats */ [[:digit:]]+"."[[:digit:]]* { /* Convert this to an integer value */ int ret=0; ret = sscanf(yytext, "%f", &yylval->decimal); if (ret != 1) { /* No matching: an error occurred */ fd_log_debug("Unable to convert the value '%s' to a valid float: %s", yytext, strerror(errno)); return LEX_ERROR; /* trig an error in yacc parser */ /* Maybe we could REJECT instead of failing here? */ } return FLOAT; } /* Recognize simple integers */ [[:digit:]]+ { /* Convert this to an integer value */ int ret=0; ret = sscanf(yytext, "%lu", &yylval->ulong); if (ret != 1) { /* No matching: an error occurred */ fd_log_debug("Unable to convert the value '%s' to a valid long: %s", yytext, strerror(errno)); return LEX_ERROR; /* trig an error in yacc parser */ /* Maybe we could REJECT instead of failing here? */ } return ULONG; } /* The key words */ (?i:"latency_average") { return LATENCY_AVERAGE; } (?i:"latency_deviation") { return LATENCY_DEVIATION; } (?i:"dupl_proba") { return DUPL_PROBA; } (?i:"ms") { return UNIT_MSEC; } (?i:"s") { return UNIT_SEC; } /* Valid single characters for yyparse */ [=;%/] { return yytext[0]; } /* Unrecognized sequence, if it did not match any previous pattern */ [^[:space:][:digit:]=;%/\n]+ { fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); return LEX_ERROR; } %% nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_netemul/test_netemul.y000066400000000000000000000125101333553357400266630ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Yacc extension's configuration parser. */ /* For development only : */ %debug %error-verbose /* The parser receives the configuration file filename as parameter */ %parse-param {char * conffile} /* Keep track of location */ %locations %pure-parser %{ #include "test_netemul.h" #include "test_netemul.tab.h" /* YYLTYPE */ /* Forward declaration */ int yyparse(char * conffile); /* Parse the configuration file */ int tne_conf_handle(char * conffile) { extern FILE * test_netemulin; int ret; TRACE_ENTRY("%p", conffile); TRACE_DEBUG (FULL, "Parsing configuration file: %s...", conffile); test_netemulin = fopen(conffile, "r"); if (test_netemulin == NULL) { ret = errno; fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret)); TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file."); return ret; } ret = yyparse(conffile); fclose(test_netemulin); if (ret != 0) { TRACE_DEBUG (INFO, "Unable to parse the configuration file."); return EINVAL; } else { TRACE_DEBUG(FULL, "[test_netemul] latency: %lu ms (var:%u%%) duplicates: %G probability.", tne_conf.lat_avg, tne_conf.lat_dev, tne_conf.dupl_proba); } return 0; } /* The Lex parser prototype */ int test_netemullex(YYSTYPE *lvalp, YYLTYPE *llocp); /* Function to report the errors */ void yyerror (YYLTYPE *ploc, char * conffile, char const *s) { TRACE_DEBUG(INFO, "Error in configuration parsing"); if (ploc->first_line != ploc->last_line) fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); else if (ploc->first_column != ploc->last_column) fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); else fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); } %} /* Values returned by lex for token */ %union { unsigned long ulong; float decimal; } /* In case of error in the lexical analysis */ %token LEX_ERROR %token ULONG %token FLOAT /* Tokens */ %token LATENCY_AVERAGE %token LATENCY_DEVIATION %token DUPL_PROBA %token UNIT_SEC %token UNIT_MSEC /* -------------------------------------- */ %% /* The grammar definition */ conffile: /* empty */ | conffile latency_average | conffile latency_deviation | conffile dupl_proba ; /* a server entry */ latency_average: LATENCY_AVERAGE '=' ULONG UNIT_SEC ';' { tne_conf.lat_avg = $3 * 1000; } | LATENCY_AVERAGE '=' ULONG UNIT_MSEC ';' { tne_conf.lat_avg = $3; } ; latency_deviation: LATENCY_DEVIATION '=' ULONG '%' ';' { tne_conf.lat_dev = (int)$3; if ((tne_conf.lat_dev < 0) || (tne_conf.lat_dev > 100)) { yyerror (&yylloc, conffile, "Latency_Deviation must be comprised between 0 and 100."); YYERROR; } } ; dupl_proba: DUPL_PROBA '=' ULONG ';' { tne_conf.dupl_proba = (float) $3; } | DUPL_PROBA '=' FLOAT ';' { tne_conf.dupl_proba = $3; } | DUPL_PROBA '=' ULONG '/' ULONG ';' { tne_conf.dupl_proba = ((float)$3) / ((float)$5) ; } ; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_netemul/tne_process.c000066400000000000000000000247461333553357400264670ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "test_netemul.h" #include /* This file implements the real processing of the message. The entry point is tne_process_message(). First, the duplicate filter is applied: with the configured probability, a copy of the message is created. Then, with the tenth probability, a second copy is created, and so on, until the random value tells not to create a copy. The original message + all copies are stored in a list, for next step. Second step is the latency filter. For each message in the list, a latency value is randomly generated (with a lognormal shape of the random distribution) and stored in the list. Finally, when the latency time is over, the message is sent. */ static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t cnd = PTHREAD_COND_INITIALIZER; static pthread_t thr = (pthread_t)NULL; /* The lists below are all protected by the same mutex mtx */ static struct fd_list input = FD_LIST_INITIALIZER(input); /* messages received from network */ static struct fd_list forlat = FD_LIST_INITIALIZER(forlat); /* messages after duplicate filter */ static struct fd_list waitlist = FD_LIST_INITIALIZER(waitlist); /* messages waiting for sending */ struct process_item { struct fd_list chain; /* link into one of the lists. "o" points to the message. */ struct timespec ts; /* when the message must be sent */ }; /******************************************************************/ /* helper functions */ /* Process all pi in input list and queue in forlat, duplicating when needed */ static int do_duplicates() { TRACE_ENTRY(""); while (!FD_IS_LIST_EMPTY(&input)) { struct msg * m; struct process_item * pi = (struct process_item *)(input.next); /* Take out this pi from input */ fd_list_unlink(&pi->chain); /* store it in forlat */ fd_list_insert_before(&forlat, &pi->chain); /* Duplicate eventually, unless deactivated */ if (tne_conf.dupl_proba != 0.0) { DiamId_t src; size_t srclen; /* Pick a random value in [0, 1] */ double my_rand = drand48(); m = pi->chain.o; CHECK_FCT( fd_msg_source_get(m, &src, &srclen) ); while (my_rand < (double) tne_conf.dupl_proba) { /* create the duplicate */ struct process_item * npi; struct msg * nm; struct msg_hdr * nh; unsigned char * buf; size_t len; /* Duplicate the message */ CHECK_FCT( fd_msg_bufferize(m, &buf, &len) ); CHECK_FCT( fd_msg_parse_buffer(&buf, len, &nm) ); CHECK_FCT( fd_msg_source_set(nm, src, srclen) ); CHECK_FCT( fd_msg_hdr(nm, &nh) ); nh->msg_flags |= CMD_FLAG_RETRANSMIT; /* Add the 'T' flag */ TRACE_DEBUG(FULL, "[tne] Duplicated message %p as %p", m, nm); /* Duplicate the pi */ CHECK_MALLOC( npi = malloc(sizeof(struct process_item)) ); memset(npi, 0, sizeof(struct process_item)); fd_list_init(&npi->chain, nm); memcpy(&npi->ts, &pi->ts, sizeof(struct timespec)); /* Enqueue the candidate in forlat */ fd_list_insert_before(&forlat, &npi->chain); /* loop for another duplicate */ if (!my_rand) break; /* otherwise, infinite loop */ my_rand *= 10.0; } } } /* Done */ return 0; } /* Generate a random value with a normal distribution, mean 0, variance 1 */ /* Using Box-Muller algo from Numerical Recipes in C++, 2nd Ed. */ static double get_rand_norm() { double ru1, ru2; /* two random uniform values in -1..1 */ double rsq; /* ru1^2 + ru2^2, to ensure we are in the circle */ /* Get our appropriate 2 random uniform values */ do { ru1 = 2.0 * drand48() - 1.0; ru2 = 2.0 * drand48() - 1.0; rsq = ru1 * ru1 + ru2 * ru2; } while ((rsq >= 1.0) || (rsq == 0.0)); /* Do the Box-Muller transform -- we don't use the 2nd value generated */ return ru1 * sqrt( -2.0 * log(rsq) / rsq ); } /* Return the latency to add, in ms. */ static __inline__ unsigned long get_latency() { unsigned long lat = tne_conf.lat_avg; if (tne_conf.lat_dev) { /* We randomize the value to add */ double rn; rn = get_rand_norm(); /* this is normal random value with mean = 0 and variance = 1 */ rn = rn * ((double)tne_conf.lat_dev) / 100.0; /* now the variance is lat_dev */ rn = exp(rn); /* and now, we have a lognormal random value, with geometric mean = 1 */ lat = (unsigned long)(rn * (double)lat); /* Apply to our mean latency */ } return lat; } /* Process all pi in forlat and add a random latency, then requeue in order into waitlist */ static int do_latency() { TRACE_ENTRY(""); while (!FD_IS_LIST_EMPTY(&forlat)) { struct process_item * pi = (struct process_item *)(forlat.next); struct fd_list * li; /* Take out this pi from forlat */ fd_list_unlink(&pi->chain); /* If there is a latency to add */ if (tne_conf.lat_avg) { unsigned long l = get_latency(); TRACE_DEBUG(FULL, "[tne] Set %lu ms latency for %p", l, pi->chain.o); pi->ts.tv_sec += l / 1000; l %= 1000; pi->ts.tv_nsec += l * 1000000; if (pi->ts.tv_nsec >= 1000000000) { pi->ts.tv_sec += 1; pi->ts.tv_nsec -= 1000000000; } } for (li = waitlist.prev; li != &waitlist; li=li->prev) { struct process_item * p = (struct process_item *)li; if (TS_IS_INFERIOR( &p->ts, &pi->ts )) break; /* we must insert after this one */ } /* store it */ fd_list_insert_after(li, &pi->chain); } /* Done */ return 0; } /* Send all messages in waitlist that have passed their latency period */ static int send_all_ready() { struct timespec now; TRACE_ENTRY(""); CHECK_SYS( clock_gettime(CLOCK_REALTIME, &now) ); while (!FD_IS_LIST_EMPTY(&waitlist)) { struct msg * m; struct process_item * pi = (struct process_item *)(waitlist.next); if (!TS_IS_INFERIOR( &pi->ts, &now)) break; /* We sent already all we could */ /* Take out this pi and send the message */ fd_list_unlink(&pi->chain); m = pi->chain.o; free(pi); TRACE_DEBUG(FULL, "[tne] Sending now %p", m); CHECK_FCT( fd_msg_send(&m, NULL, NULL) ); } return 0; } /******************************************************************/ /* the processing thread */ static void * tne_process_th(void * arg) { TRACE_ENTRY("%p", arg); /* Name the thread */ fd_log_threadname ( "test_netemul/process" ); CHECK_POSIX_DO( pthread_mutex_lock(&mtx), goto error ); pthread_cleanup_push( fd_cleanup_mutex, &mtx ); /* The loop */ while (1) { /* First, test if we are canceled */ pthread_testcancel(); /* Send all messages that are ready (free resources before using new ones) */ CHECK_FCT_DO( send_all_ready(), break ); /* Now process the new messages in input list for duplicate filter */ CHECK_FCT_DO( do_duplicates(), break ); /* Now compute the latency for each new item */ CHECK_FCT_DO( do_latency(), break ); /* Now, wait then loop */ if (FD_IS_LIST_EMPTY(&waitlist)) { CHECK_POSIX_DO( pthread_cond_wait(&cnd, &mtx), break ); } else { CHECK_POSIX_DO2( pthread_cond_timedwait(&cnd, &mtx, &((struct process_item *)(waitlist.next))->ts), ETIMEDOUT, /* ETIMEDOUT is a normal return value, continue */, /* on other error, */ break ); } /* loop */ } pthread_cleanup_pop( 0 ); CHECK_POSIX_DO( pthread_mutex_unlock(&mtx), ); error: TRACE_DEBUG(INFO, "A fatal error occurred in test_netemul/process thread!"); ASSERT(0); CHECK_FCT_DO(fd_core_shutdown(), ); return NULL; } /******************************************************************/ /* functions visible from outside this file */ int tne_process_init() { CHECK_POSIX( pthread_create(&thr, NULL, tne_process_th, NULL) ); #if 0 /* debug */ int i; for (i=0; i< 20; i++) { printf("LAT: %lu\n", get_latency()); } #endif /* 0 */ return 0; } int tne_process_fini() { CHECK_FCT( fd_thr_term(&thr) ); return 0; } int tne_process_message(struct msg * msg) { struct process_item * pi; TRACE_ENTRY("%p", msg); /* Create a new pi for this message */ CHECK_MALLOC( pi = malloc(sizeof(struct process_item)) ); memset(pi, 0, sizeof(struct process_item)); fd_list_init(&pi->chain, msg); CHECK_SYS(clock_gettime(CLOCK_REALTIME, &pi->ts)); /* Store it in the input list */ CHECK_POSIX( pthread_mutex_lock(&mtx) ); fd_list_insert_before(&input, &pi->chain); CHECK_POSIX( pthread_mutex_unlock(&mtx) ); /* Wake up the process thread so that it processes the message */ CHECK_POSIX( pthread_cond_signal(&cnd) ); /* done */ return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_rt_any/000077500000000000000000000000001333553357400236055ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_rt_any/CMakeLists.txt000066400000000000000000000004421333553357400263450ustar00rootroot00000000000000# The test_rt_any extension PROJECT("Random routing extension (for tests)" C) # Compile as a module FD_ADD_EXTENSION(test_rt_any test_rt_any.c) #### ## INSTALL section ## INSTALL(TARGETS test_rt_any LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-debug-tools) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_rt_any/test_rt_any.c000066400000000000000000000064161333553357400263130ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* * Test-only extension for routing: gives a random positive score to any candidate peer. */ #include #include /* The callback */ static int tra_out_cb(void * cbdata, struct msg ** pmsg, struct fd_list * candidates) { struct msg * msg = *pmsg; struct fd_list * li; TRACE_ENTRY("%p %p %p", cbdata, msg, candidates); for (li = candidates->next; li != candidates; li = li->next) { struct rtd_candidate *c = (struct rtd_candidate *) li; c->score = (int)lrand48(); } return 0; } static struct fd_rt_out_hdl * out_hdl = NULL; /* Register the callbacks to the daemon */ static int tra_main(char * conffile) { TRACE_ENTRY("%p", conffile); CHECK_FCT( fd_rt_out_register ( tra_out_cb, NULL, 0 /* we call it late so that it replaces previous scores */, &out_hdl ) ); return 0; } /* Cleanup the callbacks */ void fd_ext_fini(void) { TRACE_ENTRY(); CHECK_FCT_DO( fd_rt_out_unregister ( out_hdl, NULL ), /* continue */ ); return ; } /* Define the entry point function */ EXTENSION_ENTRY("test_rt_any", tra_main); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_sip/000077500000000000000000000000001333553357400231045ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_sip/CMakeLists.txt000066400000000000000000000011361333553357400256450ustar00rootroot00000000000000# The test_sip extension PROJECT("Diameter-SIP client Test Application (RFC4740)" C) FIND_PACKAGE(MySQL REQUIRED) INCLUDE_DIRECTORIES(${MySQL_INCLUDE_DIR}) # List of source files SET( TEST_SIP_SRC test_sip.c test_sip.h multimediaauth.c locationinfo.c locationinfosl.c registrationtermination.c userauthorization.c serverassignment.c ) # Compile as a module FD_ADD_EXTENSION(test_sip ${TEST_SIP_SRC}) TARGET_LINK_LIBRARIES(test_sip ${MySQL_LIBRARIES}) #### ## INSTALL section ## INSTALL(TARGETS test_sip LIBRARY DESTINATION ${INSTALL_EXTENSIONS_SUFFIX} COMPONENT freeDiameter-debug-tools) nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_sip/locationinfo.c000066400000000000000000000113711333553357400257370ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ #include "test_sip.h" //Called to send a LIR int test_sip_LIR_cb() { struct dict_object * lir_model=NULL; struct msg * message=NULL; struct avp *avp=NULL; union avp_value value; //Fake values START char *sip_aor="sip:aw-lappy@tera.ics.keio.ac.jp"; size_t aor_len=strlen(sip_aor); char *destination_realm="tera.ics.keio.ac.jp"; size_t destination_realmlen=strlen(destination_realm); char *destination_host="suika.tera.ics.keio.ac.jp"; size_t destination_hostlen=strlen(destination_host); //Fake values STOP //Create the base message for an RTR CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Location-Info-Request", &lir_model, ENOENT) ); CHECK_FCT( fd_msg_new (lir_model, 0, &message)); // Create a new session { CHECK_FCT( fd_msg_new_session( message, (os0_t)"appsip", CONSTSTRLEN("appsip") ) ); } //Add the Auth-Application-Id { CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Application_Id, 0, &avp ) ); value.i32 = 6; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( message, MSG_BRW_LAST_CHILD, avp) ); } //Auth_Session_State { CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Session_State, 0, &avp ) ); value.i32=1; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } //Origin_Host & Origin_Realm CHECK_FCT( fd_msg_add_origin ( message, 0 )); //Destination_Host { CHECK_FCT( fd_msg_avp_new ( sip_dict.Destination_Host, 0, &avp ) ); value.os.data=(unsigned char *)destination_host; value.os.len=destination_hostlen; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } //Destination_Realm { CHECK_FCT( fd_msg_avp_new ( sip_dict.Destination_Realm, 0, &avp ) ); value.os.data=(unsigned char *)destination_realm; value.os.len=destination_realmlen; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } //SIP_AOR { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_AOR, 0, &avp ) ); value.os.data=(unsigned char *)sip_aor; value.os.len=aor_len; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } CHECK_FCT( fd_msg_send( &message, NULL, NULL )); return 0; } int test_sip_LIA_cb( struct msg ** msg, struct avp * paramavp, struct session * sess, void * opaque, enum disp_action * act) { return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_sip/locationinfosl.c000066400000000000000000000114001333553357400262670ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ #include "test_sip.h" //Called to send a LIR int test_sipSL_LIR_cb() { struct dict_object * lir_model=NULL; struct msg * message=NULL; struct avp *avp=NULL; union avp_value value; //Fake values START char *sip_aor="sip:aw-lappy@tera.ics.keio.ac.jp"; size_t aor_len=strlen(sip_aor); char *destination_realm="tera.ics.keio.ac.jp"; size_t destination_realmlen=strlen(destination_realm); char *destination_host="biwa.tera.ics.keio.ac.jp"; size_t destination_hostlen=strlen(destination_host); //Fake values STOP //Create the base message for an RTR CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Location-Info-Request", &lir_model, ENOENT) ); CHECK_FCT( fd_msg_new (lir_model, 0, &message)); // Create a new session { CHECK_FCT( fd_msg_new_session( message, (os0_t)"appsip", CONSTSTRLEN("appsip") ) ); } //Add the Auth-Application-Id { CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Application_Id, 0, &avp ) ); value.i32 = 6; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( message, MSG_BRW_LAST_CHILD, avp) ); } //Auth_Session_State { CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Session_State, 0, &avp ) ); value.i32=1; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } //Origin_Host & Origin_Realm CHECK_FCT( fd_msg_add_origin ( message, 0 )); //Destination_Host { CHECK_FCT( fd_msg_avp_new ( sip_dict.Destination_Host, 0, &avp ) ); value.os.data=(unsigned char *)destination_host; value.os.len=destination_hostlen; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } //Destination_Realm { CHECK_FCT( fd_msg_avp_new ( sip_dict.Destination_Realm, 0, &avp ) ); value.os.data=(unsigned char *)destination_realm; value.os.len=destination_realmlen; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } //SIP_AOR { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_AOR, 0, &avp ) ); value.os.data=(unsigned char *)sip_aor; value.os.len=aor_len; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } CHECK_FCT( fd_msg_send( &message, NULL, NULL )); return 0; } int test_sipSL_LIA_cb( struct msg ** msg, struct avp * paramavp, struct session * sess, void * opaque, enum disp_action * act) { return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_sip/multimediaauth.c000066400000000000000000000632031333553357400262700ustar00rootroot00000000000000/******************************************************************************************************** * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * ********************************************************************************************************/ #include "test_sip.h" int test_sip_MAA_cb( struct msg ** msg, struct avp * paramavp, struct session * sess, void * opaque, enum disp_action * act) { /* struct msg *ans, *qry; struct avp *avp, *a2, *authdataitem; struct msg_hdr * header = NULL; struct avp_hdr * avphdr=NULL, *avpheader=NULL, *avpheader_auth=NULL,*digestheader=NULL; union avp_value val; int found_cnonce=0; struct avp * tempavp=NULL,*sipAuthentication=NULL,*sipAuthenticate=NULL; char * result; char password[51]; int idx=0, idx2=0, number_of_auth_items=0,i=0; //Flags and variables for Database int sipurinotstored=0, authenticationpending=0, querylen=0, usernamelen=0; char *query=NULL,*username=NULL; //The nonce we will store and retrieve in session struct ds_nonce *storednonce=NULL; TRACE_ENTRY("%p %p %p %p", msg, avp, sess, act); if (msg == NULL) return EINVAL; // Create answer header qry = *msg; CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, msg, 0 ) ); ans = *msg; // Add the appropriate command code & Auth-Application-Id { CHECK_FCT( fd_msg_hdr ( *msg, &header ) ); header->msg_flags = CMD_FLAG_PROXIABLE; header->msg_code = 286; header->msg_appl = 6; // Add the Auth-Application-Id { CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Application_Id, 0, &avp ) ); ASSERT(avp); val.i32 = header->msg_appl; CHECK_FCT( fd_msg_avp_setvalue ( avp, &val ) ); CHECK_FCT( fd_msg_avp_add ( ans, MSG_BRW_LAST_CHILD, avp) ); } } // Add the Auth-Session-State AVP { CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.Auth_Session_State, &avp) ); CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr ) ); CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Session_State, 0, &avp ) ); CHECK_FCT( fd_msg_avp_setvalue( avp, avphdr->avp_value ) ); CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, avp ) ); } // Check if method is REGISTER then User-Name must be present { CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.SIP_Method, &avp) ); CHECK_FCT( fd_msg_avp_hdr( avp, &avpheader )); char *method=NULL; CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.User_Name, &avp) ); if(avp!=NULL) { int not_found=1; MYSQL_RES *res=NULL; MYSQL_ROW row; CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr ) ); //We allocate the double size of username because at worst it can be all quotes username=malloc(avphdr->avp_value->os.len*2+1); //We purify username not to have forbidden characters usernamelen=mysql_real_escape_string(conn, username, avphdr->avp_value->os.data, avphdr->avp_value->os.len); if((strncmp(avpheader->avp_value->os.data,"REGISTER",avpheader->avp_value->os.len)==0)) { not_found=1; //We copy username in query querylen=SQL_GETPASSWORD_LEN + usernamelen; query = malloc(querylen+2); snprintf(query, querylen+1, SQL_GETPASSWORD, username); //We make the query request_mysql(query); res=mysql_use_result(conn); if(res==NULL) { //We couldn't make the request result="DIAMETER_UNABLE_TO_COMPLY"; goto out; } while ((row = mysql_fetch_row(res)) != NULL) { if(row[0]!="") { strcpy(password,row[0]); not_found=0; break; } } mysql_free_result(res); free(query); if(not_found) { TRACE_DEBUG(FULL,"The user %s doesn't exist!",username); result="DIAMETER_ERROR_USER_UNKNOWN"; free(username); goto out; } //Now that we know the user exist, we get the list of AOR owned by this user querylen=SQL_GETSIPAOR_LEN + usernamelen; query = malloc(querylen+2); snprintf(query, querylen+1, SQL_GETSIPAOR, username); //We make the query request_mysql(query); res=mysql_use_result(conn); if(res==NULL) { //We couldn't make the request result="DIAMETER_UNABLE_TO_COMPLY"; goto out; } //We retrieve the SIP-AOR from AVP to check if the user can us it CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.SIP_AOR, &avp) ); CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr ) ); not_found=1; while ((row = mysql_fetch_row(res)) != NULL) { if(strncmp(avphdr->avp_value->os.data,row[0],avphdr->avp_value->os.len)==0) { not_found=0; break; } } mysql_free_result(res); free(query); if(not_found) { TRACE_DEBUG(FULL,"The user %s can't use this SIP-AOR!",username); result="DIAMETER_ERROR_IDENTITIES_DONT_MATCH"; free(username); goto out; } } CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.SIP_Server_URI, &avp) ); CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr )); if(avphdr!=NULL) { char *sipuri=NULL; int sipurilen=0; //We allocate the double size of SIP-URI because at worst it can be all quotes sipuri=malloc(avphdr->avp_value->os.len*2+1); //We purify SIP-URI not to have forbidden characters sipurilen=mysql_real_escape_string(conn, sipuri, avphdr->avp_value->os.data, avphdr->avp_value->os.len); //We get the SIP-URI assignated to the user querylen=SQL_GETSIPURI_LEN + usernamelen; query = malloc(querylen+2); snprintf(query, querylen+1, SQL_GETSIPURI, username); //We make the query request_mysql(query); res=mysql_use_result(conn); if(res==NULL) { //We couldn't make the request result="DIAMETER_UNABLE_TO_COMPLY"; goto out; } not_found=1; while ((row = mysql_fetch_row(res)) != NULL) { if(strncmp(avphdr->avp_value->os.data,row[0],avphdr->avp_value->os.len)==0) { not_found=0; break; } } mysql_free_result(res); free(query); if(not_found) { //We update the SIP_URI for the user and we flag "authentication in progress" querylen=SQL_SETSIPURI_LEN + usernamelen + sipurilen; query = malloc(querylen+2); snprintf(query, querylen+1, SQL_SETSIPURI, sipuri, username); //We make the query request_mysql(query); free(query); authenticationpending=1; } free(sipuri); } else sipurinotstored=1; } else { result="DIAMETER_USER_NAME_REQUIRED"; goto out; } free(method); } //TODO: remove loop for authdataitem because RFC say only one (wait for answer from Garcia) // How many Auth Data Items? CHECK_FCT( fd_msg_search_avp ( qry, sip_dict.SIP_Number_Auth_Items, &avp) ); CHECK_FCT( fd_msg_avp_hdr( avp, &avpheader ) ); if(avp!=NULL) { CHECK_FCT(fd_msg_search_avp ( qry, sip_dict.SIP_Auth_Data_Item, &avp)); CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr ) ); if(avp!=NULL) { //First is Authentication Scheme CHECK_FCT(fd_msg_browse ( avp, MSG_BRW_FIRST_CHILD, &avp, NULL) ); CHECK_FCT( fd_msg_avp_hdr( avp, &avphdr ) ); //Digest-Authentication? if(avphdr->avp_value->i32==0) { for(idx=0;idxavp_value->i32;idx++) { //We look for SIP Auth items CHECK_FCT(fd_msg_browse ( avp, MSG_BRW_WALK, &avp, NULL) ); if(avp!=NULL) { CHECK_FCT( fd_msg_avp_hdr( avp,&avphdr )); if(avphdr->avp_code==380) //We only create Auth-Data-Item to answer Auth-Data-Item { // Add the Auth-Data-Item AVP CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Auth_Data_Item, 0, &authdataitem ) ); // Add the Authentication Scheme AVP { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Authentication_Scheme, 0, &a2 ) ); val.i32=0; //We only know Digest Authentication CHECK_FCT( fd_msg_avp_setvalue( a2, &val ) ); CHECK_FCT( fd_msg_avp_add( authdataitem, MSG_BRW_LAST_CHILD, a2 ) ); } //We need to know if there is a Cnonce attribute (only in the second MAR request) //CHECK_FCT(fd_msg_browse ( avp, MSG_BRW_WALK, &avp, NULL) ); CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_CNonce, &a2 )); if(a2!=NULL) found_cnonce=1; else found_cnonce=0; if(!found_cnonce) { // We are in the case of first access request so we need to challenge the user. TRACE_DEBUG(FULL,"First Authorization in progress..."); // Create a new session //this create a new session Id !!! //CHECK_FCT_DO( fd_sess_new( &sess, fd_g_config->cnf_diamid, "test_sip", 7), goto out ); // Create the SIP-Authenticate AVP { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Authenticate, 0, &sipAuthenticate ) ); } // Add the Digest QOP AVP { CHECK_FCT( fd_msg_avp_new ( sip_dict.Digest_QOP, 0, &a2 ) ); val.os.data="auth"; val.os.len=strlen(val.os.data); CHECK_FCT( fd_msg_avp_setvalue( a2, &val ) ); CHECK_FCT( fd_msg_avp_add( sipAuthenticate, MSG_BRW_LAST_CHILD, a2 ) ); } // Add the Digest Nonce AVP { uint8_t buffer[NONCE_SIZE]; char nonce[NONCE_SIZE * 2 + 1]; gcry_create_nonce ((uint8_t *)buffer, sizeof(buffer)); for(i=0;inonce=malloc(NONCE_SIZE*2+1)); memcpy(storednonce->nonce,(char *)nonce,NONCE_SIZE*2+1); CHECK_FCT( fd_sess_state_store ( ds_sess_hdl, sess, &storednonce )); val.os.data=nonce; val.os.len=NONCE_SIZE * 2; CHECK_FCT( fd_msg_avp_setvalue( a2, &val ) ); CHECK_FCT( fd_msg_avp_add( sipAuthenticate, MSG_BRW_LAST_CHILD, a2 ) ); } // Add the Digest Algorithm AVP { CHECK_FCT( fd_msg_avp_new ( sip_dict.Digest_Algorithm, 0, &a2 ) ); val.os.data="MD5"; val.os.len=strlen(val.os.data); CHECK_FCT( fd_msg_avp_setvalue( a2, &val ) ); CHECK_FCT( fd_msg_avp_add( sipAuthenticate, MSG_BRW_LAST_CHILD, a2 ) ); } // Add the Digest Realm AVP { tempavp=avp; avpheader_auth=walk_digest(tempavp, 104); if(avpheader_auth!=NULL) { CHECK_FCT( fd_msg_avp_new ( sip_dict.Digest_Realm, 0, &a2 ) ); CHECK_FCT( fd_msg_avp_setvalue( a2, avpheader_auth->avp_value ) ); CHECK_FCT( fd_msg_avp_add( sipAuthenticate, MSG_BRW_LAST_CHILD, a2 ) ); } } //We add SIP Authenticate to Auth Data Item CHECK_FCT( fd_msg_avp_add( authdataitem, MSG_BRW_LAST_CHILD, sipAuthenticate ) ); //We add Auth Data Item to Answer CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, authdataitem ) ); number_of_auth_items++; if(sipurinotstored) result="DIAMETER_SUCCESS_AUTH_SENT_SERVER_NOT_STORED"; else result="DIAMETER_MULTI_ROUND_AUTH"; found_cnonce=0; } else { // We are in the case of access request after challenge so we need to check credentials. TRACE_DEBUG(FULL,"Authentication after challenge"); // Search the session, retrieve its data { //int new=0; //TRACE_DEBUG(FULL,"new: *%d*",new); //ASSERT( new == 0 ); CHECK_FCT( fd_sess_state_retrieve( ds_sess_hdl, sess, &storednonce )); if(storednonce ==NULL) { result="DIAMETER_UNABLE_TO_COMPLY"; if(username!=NULL) free(username); goto out; } } // Create the SIP-Authentication-Info AVP { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Authentication_Info, 0, &sipAuthentication ) ); } // Add the Digest response Auth AVP { //uint8_t bufferresp[DIGEST_LEN]; //char response[DIGEST_LEN*2+1]; int i=0; //We extract all the data we need tempavp=avp; char * digest_username=NULL, *digest_uri=NULL, *digest_response=NULL, *digest_realm=NULL, *digest_nonce=NULL, *digest_method=NULL, *digest_qop=NULL, *digest_algorithm=NULL, *digest_cnonce=NULL, *digest_noncecount=NULL; CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_Nonce, &a2 )); if(a2!=NULL) { CHECK_FCT( fd_msg_avp_hdr( a2, &digestheader ) ); if(digestheader!=NULL) { digest_nonce = malloc(digestheader->avp_value->os.len + 1); memcpy(digest_nonce, digestheader->avp_value->os.data, digestheader->avp_value->os.len); digest_nonce[digestheader->avp_value->os.len]='\0'; TRACE_DEBUG(FULL,"Element:*%s*",digest_nonce); TRACE_DEBUG(FULL,"Stored Nonce:*%s*",storednonce->nonce); if(strcmp(digest_nonce,storednonce->nonce)!=0) { free(digest_nonce); free(storednonce->nonce); free(storednonce); result="DIAMETER_UNABLE_TO_COMPLY"; if(username!=NULL) free(username); goto out; } } } CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_Response, &a2 )); if(a2!=NULL) { CHECK_FCT( fd_msg_avp_hdr( a2, &digestheader ) ); if(digestheader!=NULL) { digest_response = malloc(digestheader->avp_value->os.len + 1); memcpy(digest_response, digestheader->avp_value->os.data, digestheader->avp_value->os.len); digest_response[digestheader->avp_value->os.len]='\0'; TRACE_DEBUG(FULL,"Element:*%s*",digest_response); } } CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_Realm, &a2 )); if(a2!=NULL) { CHECK_FCT( fd_msg_avp_hdr( a2, &digestheader ) ); if(digestheader!=NULL) { digest_realm = malloc(digestheader->avp_value->os.len + 1); memcpy(digest_realm, digestheader->avp_value->os.data, digestheader->avp_value->os.len); digest_realm[digestheader->avp_value->os.len]='\0'; TRACE_DEBUG(FULL,"Element:*%s*",digest_realm); } } CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_Method, &a2 )); if(a2!=NULL) { CHECK_FCT( fd_msg_avp_hdr( a2, &digestheader ) ); if(digestheader!=NULL) { digest_method = malloc(digestheader->avp_value->os.len + 1); memcpy(digest_method, digestheader->avp_value->os.data, digestheader->avp_value->os.len); digest_method[digestheader->avp_value->os.len]='\0'; TRACE_DEBUG(FULL,"Element:*%s*",digest_method); } } else digest_method=""; CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_URI, &a2 )); if(a2!=NULL) { CHECK_FCT( fd_msg_avp_hdr( a2, &digestheader ) ); if(digestheader!=NULL) { digest_uri = malloc(digestheader->avp_value->os.len + 1); memcpy(digest_uri, digestheader->avp_value->os.data, digestheader->avp_value->os.len); digest_uri[digestheader->avp_value->os.len]='\0'; TRACE_DEBUG(FULL,"Element:*%s*",digest_uri); } } CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_QOP, &a2 )); if(a2!=NULL) { CHECK_FCT( fd_msg_avp_hdr( a2, &digestheader ) ); if(digestheader!=NULL) { digest_qop = malloc(digestheader->avp_value->os.len + 1); memcpy(digest_qop, digestheader->avp_value->os.data, digestheader->avp_value->os.len); digest_qop[digestheader->avp_value->os.len]='\0'; TRACE_DEBUG(FULL,"Element:*%s*",digest_qop); } } else digest_qop=NULL; CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_Algorithm, &a2 )); if(a2!=NULL) { CHECK_FCT( fd_msg_avp_hdr( a2, &digestheader ) ); if(digestheader!=NULL) { digest_algorithm = malloc(digestheader->avp_value->os.len + 1); memcpy(digest_algorithm, digestheader->avp_value->os.data, digestheader->avp_value->os.len); digest_algorithm[digestheader->avp_value->os.len]='\0'; TRACE_DEBUG(FULL,"Element:*%s*",digest_algorithm); } } else digest_algorithm=NULL; CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_CNonce, &a2 )); if(a2!=NULL) { CHECK_FCT( fd_msg_avp_hdr( a2, &digestheader ) ); if(digestheader!=NULL) { digest_cnonce = malloc(digestheader->avp_value->os.len + 1); memcpy(digest_cnonce, digestheader->avp_value->os.data, digestheader->avp_value->os.len); digest_cnonce[digestheader->avp_value->os.len]='\0'; TRACE_DEBUG(FULL,"Element:*%s*",digest_cnonce); } } else digest_cnonce=""; CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_Nonce_Count, &a2 )); if(a2!=NULL) { CHECK_FCT( fd_msg_avp_hdr( a2, &digestheader ) ); if(digestheader!=NULL) { digest_noncecount = malloc(digestheader->avp_value->os.len + 1); memcpy(digest_noncecount, digestheader->avp_value->os.data, digestheader->avp_value->os.len); digest_noncecount[digestheader->avp_value->os.len]='\0'; TRACE_DEBUG(FULL,"Element:*%s*",digest_noncecount); } } else digest_noncecount=""; CHECK_FCT(fd_avp_search_avp (avp, sip_dict.Digest_Username, &a2 )); if(a2!=NULL) { CHECK_FCT( fd_msg_avp_hdr( a2, &digestheader ) ); if(digestheader!=NULL) { digest_username = malloc(digestheader->avp_value->os.len + 1); memcpy(digest_username, digestheader->avp_value->os.data, digestheader->avp_value->os.len); digest_username[digestheader->avp_value->os.len]='\0'; TRACE_DEBUG(FULL,"Element:*%s*",digest_username); } } //TODO: replace by authentication function HASHHEX HA1; HASHHEX HA2 = ""; HASHHEX response, responseauth; DigestCalcHA1(digest_algorithm, digest_username, digest_realm, password, digest_nonce,digest_cnonce, HA1); DigestCalcResponse(HA1, digest_nonce, digest_noncecount, digest_cnonce, digest_qop,digest_method, digest_uri, HA2, response); // We check that the Digest-Response is the same (UA, Diameter) if(strcmp(response,digest_response)!=0) { TRACE_DEBUG(FULL,"Response calculated by Diameter server:%s",response); TRACE_DEBUG(FULL,"Response calculated by UA:%s",digest_response); TRACE_DEBUG(INFO,"Digest-Response does not match!"); result="DIAMETER_UNABLE_TO_COMPLY"; free(digest_algorithm); free(digest_cnonce); free(digest_nonce); free(digest_noncecount); free(digest_method); free(digest_username); free(digest_uri); free(digest_qop); free(digest_response); free(digest_realm); free(storednonce->nonce); free(storednonce); if(username!=NULL) free(username); goto out; } //We calculate Digest_Response_Auth DigestCalcResponseAuth(HA1, digest_nonce, digest_noncecount, digest_cnonce, digest_qop,digest_method, digest_uri, HA2, responseauth); TRACE_DEBUG(FULL,"Response calculated by Diameter server:%s",response); TRACE_DEBUG(FULL,"Response calculated by UA:%s",digest_response); if(strcmp(digest_qop,"auth-int")==0) { //Digest-HA1 MUST be used instead of Digest-Response-Auth if Digest-Qop is 'auth-int'. CHECK_FCT( fd_msg_avp_new ( sip_dict.Digest_HA1, 0, &a2 ) ); val.os.data=HA1; val.os.len=HASHHEXLEN+1; CHECK_FCT( fd_msg_avp_setvalue( a2, &val ) ); CHECK_FCT( fd_msg_avp_add( sipAuthentication, MSG_BRW_LAST_CHILD, a2 ) ); } else { //Digest-Response-Auth MUST be used instead of Digest-HA1 if Digest-Qop is 'auth'. CHECK_FCT( fd_msg_avp_new ( sip_dict.Digest_Response_Auth, 0, &a2 ) ); val.os.data=responseauth; val.os.len=DIGEST_LEN*2; CHECK_FCT( fd_msg_avp_setvalue( a2, &val ) ); CHECK_FCT( fd_msg_avp_add( sipAuthentication, MSG_BRW_LAST_CHILD, a2 ) ); } free(digest_algorithm); free(digest_cnonce); free(digest_nonce); free(digest_noncecount); free(digest_method); free(digest_username); free(digest_uri); free(digest_qop); free(digest_response); free(digest_realm); free(storednonce->nonce); free(storednonce); number_of_auth_items++; } //We add SIP Authentication-Info to Auth Data Item CHECK_FCT( fd_msg_avp_add( authdataitem, MSG_BRW_LAST_CHILD, sipAuthentication ) ); //We add Auth Data Item to Answer CHECK_FCT( fd_msg_avp_add( ans, MSG_BRW_LAST_CHILD, authdataitem ) ); if(username!=NULL && authenticationpending) { //We clear the flag "authentication pending" querylen=SQL_CLEARFLAG_LEN + usernamelen; query = malloc(querylen+2); snprintf(query, querylen+1, SQL_CLEARFLAG, username); //We make the query request_mysql(query); free(query); } if(sipurinotstored) result="DIAMETER_SUCCESS_SERVER_NAME_NOT_STORED"; else result="DIAMETER_SUCCESS"; found_cnonce=0; } } } else TRACE_DEBUG(INFO,"No auth data items!"); } //Add SIP_Number_Auth_Items AVP { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Number_Auth_Items, 0, &avp ) ); val.i32 = number_of_auth_items; CHECK_FCT( fd_msg_avp_setvalue ( avp, &val ) ); CHECK_FCT( fd_msg_avp_add ( ans, MSG_BRW_LAST_CHILD, avp) ); } } else { TRACE_DEBUG(INFO,"We only support DIGEST for now, unable to comply"); result="DIAMETER_ERROR_AUTH_SCHEME_NOT_SUPPORTED"; if(username!=NULL) free(username); goto out; } } } else { //TODO: remove this because Number_Auth_Items is not compulsory TRACE_DEBUG(FULL,"Number-Auth-Items is not included."); result="DIAMETER_UNABLE_TO_COMPLY"; if(username!=NULL) free(username); goto out; } if(username!=NULL) free(username); out: // Set the Origin-Host, Origin-Realm, Result-Code AVPs CHECK_FCT( fd_msg_rescode_set( ans, result, NULL, NULL, 1 ) ); // Send the answer CHECK_FCT( fd_msg_send( msg, NULL, NULL ) ); */ return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_sip/registrationtermination.c000066400000000000000000000047141333553357400302420ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ #include "test_sip.h" int test_sip_RTR_cb( struct msg ** msg, struct avp * paramavp, struct session * sess, void * opaque, enum disp_action * act) { return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_sip/serverassignment.c000066400000000000000000000142461333553357400266560ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ #include "test_sip.h" //Called to send a UAR int test_sip_SAR_cb() { struct dict_object * sar_model=NULL; struct msg * message=NULL; struct avp *avp=NULL; union avp_value value; //Fake values START char *sip_aor="sip:aw-lappy@tera.ics.keio.ac.jp"; size_t aor_len=strlen(sip_aor); char *destination_realm="tera.ics.keio.ac.jp"; size_t destination_realmlen=strlen(destination_realm); char *destination_host="suika.tera.ics.keio.ac.jp"; size_t destination_hostlen=strlen(destination_host); char *username="aw-lappy"; size_t usernamelen=strlen(username); char *sipserveruri="sip:ichigo@tera.ics.keio.ac.jp"; size_t sipserverurilen=strlen(sipserveruri); // char *visitednetwork="Pink"; //size_t visitednetworklen=strlen(visitednetwork); //int registrationtype = 2; int data_already_available=0; int assignment_type=0; //Fake values STOP //Create the base message for an RTR CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Server-Assignment-Request", &sar_model, ENOENT) ); CHECK_FCT( fd_msg_new (sar_model, 0, &message)); // Create a new session { CHECK_FCT( fd_msg_new_session( message, (os0_t)"appsip", CONSTSTRLEN("appsip") ) ); } //Add the Auth-Application-Id { CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Application_Id, 0, &avp ) ); value.i32 = 6; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( message, MSG_BRW_LAST_CHILD, avp) ); } //Auth_Session_State { CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Session_State, 0, &avp ) ); value.i32=1; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } //Origin_Host & Origin_Realm CHECK_FCT( fd_msg_add_origin ( message, 0 )); //Destination_Host { CHECK_FCT( fd_msg_avp_new ( sip_dict.Destination_Host, 0, &avp ) ); value.os.data=(unsigned char *)destination_host; value.os.len=destination_hostlen; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } //Destination_Realm { CHECK_FCT( fd_msg_avp_new ( sip_dict.Destination_Realm, 0, &avp ) ); value.os.data=(unsigned char *)destination_realm; value.os.len=destination_realmlen; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } //SIP_AOR { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_AOR, 0, &avp ) ); value.os.data=(unsigned char *)sip_aor; value.os.len=aor_len; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } //Username { CHECK_FCT( fd_msg_avp_new ( sip_dict.User_Name, 0, &avp ) ); value.os.data=(unsigned char *)username; value.os.len=usernamelen; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } //SIP_User_Data_Already_Available { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_User_Data_Already_Available, 0, &avp ) ); value.i32=data_already_available; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } //SIP_Server_Assignment_Type; { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Server_Assignment_Type, 0, &avp ) ); value.i32=assignment_type; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } //SIP_server_uri { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Server_URI, 0, &avp ) ); value.os.data=(unsigned char *)sipserveruri; value.os.len=sipserverurilen; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } CHECK_FCT( fd_msg_send( &message, NULL, NULL )); return 0; } int test_sip_SAA_cb( struct msg ** msg, struct avp * paramavp, struct session * sess, void * opaque, enum disp_action * act) { return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_sip/test_sip.c000066400000000000000000000323241333553357400251060ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ #include"test_sip.h" struct disp_hdl * test_sip_MAR_hdl=NULL; struct disp_hdl * test_sip_LIR_hdl=NULL; struct disp_hdl * test_sip_UAR_hdl=NULL; struct disp_hdl * test_sip_SAR_hdl=NULL; struct disp_hdl * test_sip_PPA_hdl=NULL; struct disp_hdl * test_sip_RTA_hdl=NULL; struct disp_hdl * test_sip_MAA_hdl=NULL; struct disp_hdl * test_sip_LIA_hdl=NULL; struct disp_hdl * test_sip_UAA_hdl=NULL; struct disp_hdl * test_sip_SAA_hdl=NULL; struct disp_hdl * test_sip_PPR_hdl=NULL; struct disp_hdl * test_sip_RTR_hdl=NULL; struct disp_hdl * test_sip_default_hdl=NULL; //configuration stucture struct ts_conf * ts_conf=NULL; static struct ts_conf test_sip_conf; //dictionary of SIP struct sip_dict sip_dict; int test_sip_default_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act) { TRACE_ENTRY("%p %p %p %p", msg, avp, sess, act); return 0; } /* void dump_config() { TRACE_DEBUG(FULL,"***Configuration of TEST Diameter-SIP extension***"); TRACE_DEBUG(FULL,"# username: *%s*",ts_conf->username); TRACE_DEBUG(FULL,"# password: *%s*",ts_conf->password); TRACE_DEBUG(FULL,"# sip_aor: *%s*",ts_conf->sip_aor); TRACE_DEBUG(FULL,"# destination_realm: *%s*",ts_conf->destination_realm); TRACE_DEBUG(FULL,"# destination_sip: *%s*",ts_conf->destination_sip); TRACE_DEBUG(FULL,"***End of TEST Diameter-SIP configuration extension***"); } */ static int ts_conf_init(void) { ts_conf=&test_sip_conf; //memset(app_sip_conf, 0, sizeof(struct ts_conf)); return 0; } /* entry point */ int ts_entry(char * conffile) { TRACE_ENTRY("%p", conffile); struct dict_object * app=NULL; struct disp_when data; //TODO: activate again configuration file CHECK_FCT( ts_conf_init() ); /* Initialize configuration //CHECK_FCT( ts_conf_init() ); //We parse the configuration file if (conffile != NULL) { CHECK_FCT( ts_conf_handle(conffile) ); } else { TRACE_DEBUG(INFO, "We need a configuration file for Diameter-SIP extension. See doc/ for an example."); } //We can dump the configuration extracted from app_sip.conf dump_config(); */ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_APPLICATION, APPLICATION_BY_NAME, "Diameter Session Initiation Protocol (SIP) Application", &app, ENOENT) ); CHECK_FCT( fd_disp_app_support ( app, NULL, 1, 0 ) ); //We set useful AVPs CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Auth-Session-State", &sip_dict.Auth_Session_State, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Auth-Application-Id", &sip_dict.Auth_Application_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Host", &sip_dict.Destination_Host, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Realm", &sip_dict.Destination_Realm, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Session-Id", &sip_dict.Session_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Redirect-Host", &sip_dict.Redirect_Host, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Redirect-Host-Usage", &sip_dict.Redirect_Host_Usage, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Auth-Data-Item", &sip_dict.SIP_Auth_Data_Item, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Authorization", &sip_dict.SIP_Authorization, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Authenticate", &sip_dict.SIP_Authenticate, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Number-Auth-Items", &sip_dict.SIP_Number_Auth_Items, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Authentication-Scheme", &sip_dict.SIP_Authentication_Scheme, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Authentication-Info", &sip_dict.SIP_Authentication_Info, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Server-URI", &sip_dict.SIP_Server_URI, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Server-Capabilities", &sip_dict.SIP_Server_Capabilities, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Mandatory-Capability", &sip_dict.SIP_Mandatory_Capability, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Optional-Capability", &sip_dict.SIP_Optional_Capability, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Method", &sip_dict.SIP_Method, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-AOR", &sip_dict.SIP_AOR, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Deregistration-Reason", &sip_dict.SIP_Deregistration_Reason, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Reason-Code", &sip_dict.SIP_Reason_Code, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Reason-Info", &sip_dict.SIP_Reason_Info, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Accounting-Information", &sip_dict.SIP_Accounting_Information, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Accounting-Server-URI", &sip_dict.SIP_Accounting_Server_URI, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Credit-Control-Server-URI", &sip_dict.SIP_Credit_Control_Server_URI, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Server-Assignment-Type", &sip_dict.SIP_Server_Assignment_Type, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Item-Number", &sip_dict.SIP_Item_Number, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-User-Authorization-Type", &sip_dict.SIP_User_Authorization_Type, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Supported-User-Data-Type", &sip_dict.SIP_Supported_User_Data_Type, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-User-Data", &sip_dict.SIP_User_Data, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-User-Data-Type", &sip_dict.SIP_User_Data_Type, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-User-Data-Contents", &sip_dict.SIP_User_Data_Contents, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-User-Data-Already-Available", &sip_dict.SIP_User_Data_Already_Available, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "SIP-Visited-Network-Id", &sip_dict.SIP_Visited_Network_Id, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Realm", &sip_dict.Digest_Realm, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-URI", &sip_dict.Digest_URI, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Nonce", &sip_dict.Digest_Nonce, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-CNonce", &sip_dict.Digest_CNonce, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Method", &sip_dict.Digest_Method, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Nonce-Count", &sip_dict.Digest_Nonce_Count, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Realm", &sip_dict.Digest_Realm, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Response", &sip_dict.Digest_Response, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Response-Auth", &sip_dict.Digest_Response_Auth, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Username", &sip_dict.Digest_Username, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-Algorithm", &sip_dict.Digest_Algorithm, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-QoP", &sip_dict.Digest_QOP, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "User-Name", &sip_dict.User_Name, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Digest-HA1", &sip_dict.Digest_HA1, ENOENT) ); //Register Application memset(&data, 0, sizeof(data)); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_APPLICATION, APPLICATION_BY_NAME, "Diameter Session Initiation Protocol (SIP) Application", &data.app, ENOENT) ); //**Command Codes /**/ //MAA CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Multimedia-Auth-Answer", &data.command, ENOENT) ); CHECK_FCT( fd_disp_register( test_sip_MAA_cb, DISP_HOW_CC, &data, NULL, &test_sip_MAA_hdl ) ); //UAA CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "User-Authorization-Answer", &data.command, ENOENT) ); CHECK_FCT( fd_disp_register( test_sip_UAA_cb, DISP_HOW_CC, &data, NULL, &test_sip_UAA_hdl ) ); //RTR CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Registration-Termination-Request", &data.command, ENOENT) ); CHECK_FCT( fd_disp_register( test_sip_RTR_cb, DISP_HOW_CC, &data, NULL, &test_sip_RTR_hdl ) ); //LIA CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Location-Info-Answer", &data.command, ENOENT) ); CHECK_FCT( fd_disp_register( test_sip_LIA_cb, DISP_HOW_CC, &data, NULL, &test_sip_LIA_hdl ) ); //LIA CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Server-Assignment-Answer", &data.command, ENOENT) ); CHECK_FCT( fd_disp_register( test_sip_SAA_cb, DISP_HOW_CC, &data, NULL, &test_sip_SAA_hdl ) ); //Callback for unexpected messages CHECK_FCT( fd_disp_register( test_sip_default_cb, DISP_HOW_APPID, &data, NULL, &test_sip_default_hdl ) ); /* //We start database connection if(start_mysql_connection()) return 1; */ //CHECK_FCT( fd_event_trig_regcb(30, "test_sip", (void *)test_sipSL_LIR_cb ) ); CHECK_FCT( fd_event_trig_regcb(30, "test_sip", (void *)test_sip_SAR_cb ) ); CHECK_FCT( fd_event_trig_regcb(31, "test_sip", (void *)test_sip_LIR_cb ) ); return 0; } //Cleanup callback void fd_ext_fini(void) { /* if (test_sip_MAR_cb) { (void) fd_disp_unregister(&test_sip_MAR_hdl); CHECK_FCT_DO( fd_sess_handler_destroy(&ts_sess_hdl),return); } */ //We close database connection //close_mysql_connection(); TRACE_ENTRY(); return ; } EXTENSION_ENTRY("test_sip", ts_entry, "dict_sip"); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_sip/test_sip.h000066400000000000000000000134121333553357400251100ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ #include #include #include #include #include GCC_DIAG_OFF("-Wdeprecated-declarations") #include GCC_DIAG_ON("-Wdeprecated-declarations") #include #include /* The module configuration */ struct ts_conf { char * destination_sip; char * destination_realm; char * username; char * password; char * sip_aor; }; extern struct ts_conf * ts_conf; //Storage for some useful AVPs struct sip_dict{ struct dict_object * Auth_Session_State; struct dict_object * Auth_Application_Id; struct dict_object * Destination_Host; struct dict_object * User_Name; struct dict_object * Session_Id; struct dict_object * Redirect_Host; struct dict_object * Redirect_Host_Usage; struct dict_object * SIP_Auth_Data_Item; struct dict_object * SIP_Accounting_Information; struct dict_object * SIP_Accounting_Server_URI; struct dict_object * SIP_Credit_Control_Server_URI; struct dict_object * SIP_Server_Assignment_Type; struct dict_object * SIP_Item_Number; struct dict_object * SIP_User_Authorization_Type; struct dict_object * SIP_Supported_User_Data_Type; struct dict_object * SIP_User_Data; struct dict_object * SIP_User_Data_Type; struct dict_object * SIP_User_Data_Contents; struct dict_object * SIP_User_Data_Already_Available; struct dict_object * SIP_Visited_Network_Id; struct dict_object * SIP_Authorization; struct dict_object * SIP_Authenticate; struct dict_object * SIP_Number_Auth_Items; struct dict_object * SIP_Authentication_Scheme; struct dict_object * SIP_Authentication_Info; struct dict_object * SIP_Server_URI; struct dict_object * SIP_Server_Capabilities; struct dict_object * SIP_Mandatory_Capability; struct dict_object * SIP_Optional_Capability; struct dict_object * SIP_Method; struct dict_object * SIP_AOR; struct dict_object * SIP_Deregistration_Reason; struct dict_object * SIP_Reason_Code; struct dict_object * SIP_Reason_Info; struct dict_object * Digest_URI; struct dict_object * Digest_Nonce; struct dict_object * Digest_Nonce_Count; struct dict_object * Digest_CNonce; struct dict_object * Digest_Realm; struct dict_object * Digest_Response; struct dict_object * Digest_Response_Auth; struct dict_object * Digest_Username; struct dict_object * Digest_Method; struct dict_object * Digest_QOP; struct dict_object * Digest_Algorithm; struct dict_object * Digest_HA1; struct dict_object * Destination_Realm; }; extern struct sip_dict sip_dict; extern struct session_handler * ts_sess_hdl; int ts_entry(); void fd_ext_fini(void); int test_sip_LIR_cb(); int test_sip_UAR_cb(); int test_sip_SAR_cb(); int test_sipSL_LIR_cb(); int test_sip_default_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act); int test_sip_MAA_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act); int test_sip_RTR_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act); int test_sip_UAA_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act); int test_sip_LIA_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act); int test_sip_SAA_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act); int test_sipSL_LIA_cb( struct msg ** msg, struct avp * avp, struct session * sess, void * opaque, enum disp_action * act); nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_sip/test_sip.l000066400000000000000000000110521333553357400251120ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * Based on ta_conf.l (Sebastien Decugis ) * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ %{ #include "test_sip.h" /* Include yacc tokens definitions */ #include "test_sip.tab.h" /* Update the column information */ #define YY_USER_ACTION { \ yylloc->first_column = yylloc->last_column + 1; \ yylloc->last_column = yylloc->first_column + yyleng - 1; \ } /* Avoid warning with newer flex */ #define YY_NO_INPUT %} %option bison-bridge bison-locations %option noyywrap %option nounput %% /* Update the line count */ \n { yylloc->first_line++; yylloc->last_line++; yylloc->last_column=0; } /* Eat all spaces but not new lines */ ([[:space:]]{-}[\n])+ ; /* Eat all comments */ #.*$ ; /* Recognize any integer */ [-]?[[:digit:]]+ { /* Convert this to an integer value */ int ret=0; ret = sscanf(yytext, "%i", &yylval->integer); if (ret != 1) { /* No matching: an error occurred */ fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); return LEX_ERROR; /* trig an error in yacc parser */ /* Maybe we could REJECT instead of failing here? */ } return INTEGER; } /* Recognize quoted strings -- we do not support escaped \" in the string currently. */ \"[^\"]+\" { /* Match a quoted string. Let's be very permissive. */ yylval->string = strdup(yytext+1); if (!yylval->string) { fd_log_debug("Unable to copy the string '%s': %s", yytext, strerror(errno)); TRACE_DEBUG(INFO, "strdup failed"); return LEX_ERROR; /* trig an error in yacc parser */ } yylval->string[strlen(yytext) - 2] = '\0'; return QSTRING; } /* Recognize the tokens */ (?i:"username") { return TESTSIP_USERNAME; } (?i:"password") { return TESTSIP_PASSWORD; } (?i:"sip_aor") { return TESTSIP_SIPAOR; } (?i:"destination_realm") { return TESTSIP_DESTREALM; } (?i:"destination_sip") { return TESTSIP_DESTSIP; } /* Valid single characters for yyparse */ [=;] { return yytext[0]; } /* Unrecognized sequence, if it did not match any previous pattern */ [^[:space:]"*=>;\n]+ { fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); return LEX_ERROR; } %% nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_sip/test_sip.y000066400000000000000000000130211333553357400251250ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * Based on ta_conf.y (Sebastien Decugis ) * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ /* For development only : */ %debug %error-verbose /* The parser receives the configuration file filename as parameter */ %parse-param {char * conffile} /* Keep track of location */ %locations %pure-parser %{ #include "test_sip.h" #include "test_sip.tab.h" /* bison is not smart enough to define the YYLTYPE before including this code, so... */ #include #include /* Forward declaration */ int yyparse(char * conffile); /* Parse the configuration file */ int ts_conf_handle(char * conffile) { extern FILE * test_sipin; int ret; TRACE_ENTRY("%p", conffile); TRACE_DEBUG (FULL, "Parsing configuration file: %s...", conffile); test_sipin = fopen(conffile, "r"); if (test_sipin == NULL) { ret = errno; fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret)); TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file."); return ret; } ret = yyparse(conffile); fclose(test_sipin); if (ret != 0) { TRACE_DEBUG (INFO, "Unable to parse the configuration file."); return EINVAL; } return 0; } /* The Lex parser prototype */ int test_sipflex(YYSTYPE *lvalp, YYLTYPE *llocp); /* Function to report the errors */ void yyerror (YYLTYPE *ploc, char * conffile, char const *s) { TRACE_DEBUG(INFO, "Error in configuration parsing"); if (ploc->first_line != ploc->last_line) fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); else if (ploc->first_column != ploc->last_column) fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s); else fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s); } %} /* Values returned by lex for token */ %union { char *string; /* The string is allocated by strdup in lex.*/ int integer; /* Store integer values */ } /* In case of error in the lexical analysis */ %token LEX_ERROR /* Key words */ %token TESTSIP_DESTREALM %token TESTSIP_DESTSIP %token TESTSIP_PASSWORD %token TESTSIP_SIPAOR %token TESTSIP_USERNAME /* Tokens and types for routing table definition */ /* A (de)quoted string (malloc'd in lex parser; it must be freed after use) */ %token QSTRING /* An integer value */ %token INTEGER /* -------------------------------------- */ %% /* The grammar definition */ conffile: /* empty grammar is OK */ | conffile destination_realm | conffile destination_sip | conffile username | conffile password | conffile sip_aor ; destination_realm: TESTSIP_DESTREALM '=' QSTRING ';' { free(ts_conf->destination_realm); ts_conf->destination_realm = $3; } ; destination_sip: TESTSIP_DESTSIP '=' QSTRING ';' { free(ts_conf->destination_sip); ts_conf->destination_sip = $3; } ; username: TESTSIP_USERNAME '=' QSTRING ';' { free(ts_conf->username); ts_conf->username = $3; } ; password: TESTSIP_PASSWORD '=' QSTRING ';' { free(ts_conf->password); ts_conf->password = $3; } ; sip_aor: TESTSIP_SIPAOR '=' QSTRING ';' { free(ts_conf->sip_aor); ts_conf->sip_aor = $3; } ; nextepc-0.3.10/lib/freeDiameter-1.2.1/extensions/test_sip/userauthorization.c000066400000000000000000000133741333553357400270570ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Alexandre Westfahl * * * * Copyright (c) 2010, Alexandre Westfahl, Teraoka Laboratory (Keio University), and the WIDE Project. * * * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the Teraoka Laboratory nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of Teraoka Laboratory * * * * * * 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. * *********************************************************************************************************/ #include "test_sip.h" //Called to send a UAR int test_sip_UAR_cb() { struct dict_object * uar_model=NULL; struct msg * message=NULL; struct avp *avp=NULL; union avp_value value; //Fake values START char *sip_aor="sip:aw-lappy@tera.ics.keio.ac.jp"; size_t aor_len=strlen(sip_aor); char *destination_realm="tera.ics.keio.ac.jp"; size_t destination_realmlen=strlen(destination_realm); char *destination_host="suika.tera.ics.keio.ac.jp"; size_t destination_hostlen=strlen(destination_host); char *username="aw-lappy"; size_t usernamelen=strlen(username); char *visitednetwork="Pink"; size_t visitednetworklen=strlen(visitednetwork); int registrationtype = 2; //Fake values STOP //Create the base message for an RTR CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "User-Authorization-Request", &uar_model, ENOENT) ); CHECK_FCT( fd_msg_new (uar_model, 0, &message)); // Create a new session { CHECK_FCT( fd_msg_new_session( message, (os0_t)"appsip", CONSTSTRLEN("appsip") ) ); } //Add the Auth-Application-Id { CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Application_Id, 0, &avp ) ); value.i32 = 6; CHECK_FCT( fd_msg_avp_setvalue ( avp, &value ) ); CHECK_FCT( fd_msg_avp_add ( message, MSG_BRW_LAST_CHILD, avp) ); } //Auth_Session_State { CHECK_FCT( fd_msg_avp_new ( sip_dict.Auth_Session_State, 0, &avp ) ); value.i32=1; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } //Origin_Host & Origin_Realm CHECK_FCT( fd_msg_add_origin ( message, 0 )); //Destination_Host { CHECK_FCT( fd_msg_avp_new ( sip_dict.Destination_Host, 0, &avp ) ); value.os.data=(unsigned char *)destination_host; value.os.len=destination_hostlen; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } //Destination_Realm { CHECK_FCT( fd_msg_avp_new ( sip_dict.Destination_Realm, 0, &avp ) ); value.os.data=(unsigned char *)destination_realm; value.os.len=destination_realmlen; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } //SIP_AOR { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_AOR, 0, &avp ) ); value.os.data=(unsigned char *)sip_aor; value.os.len=aor_len; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } //Username { CHECK_FCT( fd_msg_avp_new ( sip_dict.User_Name, 0, &avp ) ); value.os.data=(unsigned char *)username; value.os.len=usernamelen; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } //Visited Network { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_Visited_Network_Id, 0, &avp ) ); value.os.data=(unsigned char *)visitednetwork; value.os.len=visitednetworklen; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } //Authorization Type { CHECK_FCT( fd_msg_avp_new ( sip_dict.SIP_User_Authorization_Type, 0, &avp ) ); value.i32=registrationtype; CHECK_FCT( fd_msg_avp_setvalue( avp, &value ) ); CHECK_FCT( fd_msg_avp_add( message, MSG_BRW_LAST_CHILD, avp ) ); } CHECK_FCT( fd_msg_send( &message, NULL, NULL )); return 0; } int test_sip_UAA_cb( struct msg ** msg, struct avp * paramavp, struct session * sess, void * opaque, enum disp_action * act) { return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/freeDiameterd/000077500000000000000000000000001333553357400216135ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/freeDiameterd/CMakeLists.txt000066400000000000000000000011561333553357400243560ustar00rootroot00000000000000# The subproject name Project("freeDiameter simple daemon" C) # Since it uses the libfdcore.h, it needs the include dependencies INCLUDE_DIRECTORIES(${LFDCORE_INCLUDES}) # Build the executable ADD_EXECUTABLE(freeDiameterd main.c) # The version SET_TARGET_PROPERTIES(freeDiameterd PROPERTIES VERSION ${FD_PROJECT_VERSION_MAJOR}.${FD_PROJECT_VERSION_MINOR}.${FD_PROJECT_VERSION_REV}) # The link command TARGET_LINK_LIBRARIES(freeDiameterd libfdproto libfdcore ${GNUTLS_LIBRARIES}) #### ## INSTALL section ## INSTALL(TARGETS freeDiameterd RUNTIME DESTINATION ${INSTALL_DAEMON_SUFFIX} COMPONENT freeDiameter-daemon) nextepc-0.3.10/lib/freeDiameter-1.2.1/freeDiameterd/main.c000066400000000000000000000230741333553357400227110ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2015, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include #include #include #include #include /* forward declarations */ static int main_cmdline(int argc, char *argv[]); static void * catch_signals(void * arg); static pthread_t signals_thr; static char *conffile = NULL; static int gnutls_debug = 0; /* gnutls debug */ static void fd_gnutls_debug(int level, const char * str) { fd_log_debug(" [gnutls:%d] %s", level, str); } /* freeDiameter starting point */ int main(int argc, char * argv[]) { int ret; sigset_t sig_all; /* Block all signals from the current thread and all its future children -- we will catch everything in catch_signals */ sigfillset(&sig_all); ret = pthread_sigmask(SIG_BLOCK, &sig_all, NULL); ASSERT(ret == 0); /* Parse the command-line */ ret = main_cmdline(argc, argv); if (ret != 0) { return ret; } /* Initialize the core library */ ret = fd_core_initialize(); if (ret != 0) { fprintf(stderr, "An error occurred during freeDiameter core library initialization.\n"); return ret; } /* Set gnutls debug level ? */ if (gnutls_debug) { gnutls_global_set_log_function((gnutls_log_func)fd_gnutls_debug); gnutls_global_set_log_level (gnutls_debug); TRACE_DEBUG(INFO, "Enabled GNUTLS debug at level %d", gnutls_debug); } /* Parse the configuration file */ CHECK_FCT_DO( fd_core_parseconf(conffile), goto error ); /* Start the servers */ CHECK_FCT_DO( fd_core_start(), goto error ); /* Allow SIGINT and SIGTERM from this point to terminate the application */ CHECK_POSIX_DO( pthread_create(&signals_thr, NULL, catch_signals, NULL), goto error ); TRACE_DEBUG(INFO, FD_PROJECT_BINARY " daemon initialized."); /* Now, just wait for termination */ CHECK_FCT( fd_core_wait_shutdown_complete() ); /* Just in case it was not the result of a signal, we cancel signals_thr */ fd_thr_term(&signals_thr); return 0; error: CHECK_FCT_DO( fd_core_shutdown(), ); CHECK_FCT( fd_core_wait_shutdown_complete() ); fd_thr_term(&signals_thr); return -1; } /* Display package version */ static void main_version_core(void) { printf("%s, version %s\n", FD_PROJECT_NAME, fd_core_version); } /* Display package version and general info */ static void main_version(void) { main_version_core(); printf( "%s\n", FD_PROJECT_COPYRIGHT); printf( "\nSee " FD_PROJECT_NAME " homepage at http://www.freediameter.net/\n" " for information, updates and bug reports on this software.\n"); } /* Print command-line options */ static void main_help( void ) { main_version_core(); printf( " This daemon is an implementation of the Diameter protocol\n" " used for Authentication, Authorization, and Accounting (AAA).\n"); printf("\nUsage: " FD_PROJECT_BINARY " [OPTIONS]...\n"); printf( " -h, --help Print help and exit\n" " -V, --version Print version and exit\n" " -c, --config=filename Read configuration from this file instead of the \n" " default location (" DEFAULT_CONF_PATH "/" FD_DEFAULT_CONF_FILENAME ").\n"); printf( "\nDebug:\n" " These options are mostly useful for developers\n" " -l, --dbglocale Set the locale for error messages\n" " -d, --debug Increase verbosity of debug messages if default logger is used\n" " -q, --quiet Decrease verbosity if default logger is used\n" " -f, --dbg_func Enable all traces within the function \n" " -F, --dbg_file Enable all traces within the file (basename match)\n" " --dbg_gnutls Enable GNU TLS debug at level \n" ); } /* Parse the command-line */ static int main_cmdline(int argc, char *argv[]) { int c; int option_index = 0; char * locale; struct option long_options[] = { { "help", no_argument, NULL, 'h' }, { "version", no_argument, NULL, 'V' }, { "config", required_argument, NULL, 'c' }, { "debug", no_argument, NULL, 'd' }, { "quiet", no_argument, NULL, 'q' }, { "dbglocale", optional_argument, NULL, 'l' }, { "dbg_func", required_argument, NULL, 'f' }, { "dbg_file", required_argument, NULL, 'F' }, { "dbg_gnutls", required_argument, NULL, 'g' }, { NULL, 0, NULL, 0 } }; /* Loop on arguments */ while (1) { c = getopt_long (argc, argv, "hVc:dql:f:F:g:", long_options, &option_index); if (c == -1) break; /* Exit from the loop. */ switch (c) { case 'h': /* Print help and exit. */ main_help(); exit(0); case 'V': /* Print version and exit. */ main_version(); exit(0); case 'c': /* Read configuration from this file instead of the default location.. */ if (optarg == NULL ) { fprintf(stderr, "Missing argument with --config directive\n"); return EINVAL; } conffile = optarg; break; case 'l': /* Change the locale. */ locale = setlocale(LC_ALL, optarg?:""); if (!locale) { fprintf(stderr, "Unable to set locale (%s)\n", optarg); return EINVAL; } break; case 'd': /* Increase verbosity of debug messages. */ fd_g_debug_lvl--; break; case 'f': /* Full debug for the function with this name. */ #ifdef DEBUG fd_debug_one_function = optarg; fd_g_debug_lvl = FD_LOG_DEBUG; #else /* DEBUG */ fprintf(stderr, "Error: must compile with DEBUG support to use --dbg_func feature!\n"); return EINVAL; #endif /* DEBUG */ break; case 'F': /* Full debug for the file with this name. */ #ifdef DEBUG fd_debug_one_file = basename(optarg); fd_g_debug_lvl = FD_LOG_DEBUG; #else /* DEBUG */ fprintf(stderr, "Error: must compile with DEBUG support to use --dbg_file feature!\n"); return EINVAL; #endif /* DEBUG */ break; case 'g': /* Set a debug level and function for GNU TLS calls. */ gnutls_debug = (int)atoi(optarg); break; case 'q': /* Decrease verbosity then remove debug messages. */ fd_g_debug_lvl++; break; case '?': /* Invalid option. */ /* `getopt_long' already printed an error message. */ fprintf(stderr, "getopt_long found an invalid character\n"); return EINVAL; default: /* bug: option not considered. */ fprintf(stderr, "A command-line option is missing in parser: %c\n", c); ASSERT(0); return EINVAL; } } return 0; } /* Handle some signals */ static void * catch_signals(void * arg) { sigset_t ss; fd_log_threadname ( "signals catcher" ); sigemptyset(&ss); /* Signals that terminate the daemon */ sigaddset(&ss, SIGTERM); sigaddset(&ss, SIGINT); /* Signals that send an event */ sigaddset(&ss, SIGUSR1); sigaddset(&ss, SIGUSR2); /* We unblock all other signals, so that their default handler is used (such as SIGTSTP) */ CHECK_SYS_DO( pthread_sigmask( SIG_SETMASK, &ss, NULL ), goto out ); /* Now loop on the reception of the signal */ while (1) { int sig, *ps; /* Wait to receive the next signal */ CHECK_POSIX_DO( sigwait(&ss, &sig), break ); TRACE_DEBUG(FULL, "Signal %d caught", sig); switch (sig) { case SIGUSR1: case SIGUSR2: CHECK_MALLOC_DO( ps = malloc(sizeof(int)), goto out); *ps = sig; CHECK_FCT_DO( fd_event_send(fd_g_config->cnf_main_ev, FDEV_TRIGGER, sizeof(int), ps), goto out ); break; case SIGINT: case SIGTERM: CHECK_FCT_DO( fd_core_shutdown(), goto out ); } } out: /* Better way to handle this ? */ ASSERT(0); return NULL; } nextepc-0.3.10/lib/freeDiameter-1.2.1/include/000077500000000000000000000000001333553357400204765ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/include/freeDiameter/000077500000000000000000000000001333553357400230725ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/include/freeDiameter/CMakeLists.txt000066400000000000000000000235421333553357400256400ustar00rootroot00000000000000#CMake configuration for freeDiameter include directory Project("freeDiameter includes directory" C) ######################## # Configurable parameters # Disable SCTP support completely ? OPTION(DISABLE_SCTP "Disable SCTP support?" OFF) IF (NOT DISABLE_SCTP) OPTION(DEBUG_SCTP "Verbose SCTP (for debug)?" OFF) OPTION(SCTP_USE_MAPPED_ADDRESSES "Use v6-mapped v4 addresses in SCTP (workaround some SCTP limitations)?" OFF) ENDIF (NOT DISABLE_SCTP) # Find TODO items in the code easily ? OPTION(ERRORS_ON_TODO "(development) Generate compilation errors on TODO items ?" OFF) # In DEBUG mode, each log can contain pid, calling function and file for easy debug. Set to ON to display this information. OPTION(DEBUG_WITH_META "Show calling location in logs?" OFF) # Create the absolute path for searching extensions SET(DEFAULT_EXTENSIONS_PATH ${CMAKE_INSTALL_PREFIX}/${INSTALL_EXTENSIONS_SUFFIX}) # IDNA considerations OPTION(DIAMID_IDNA_IGNORE "Ignore completely invalid characters in Diameter Identities (process blindly)?" OFF) IF (NOT DIAMID_IDNA_IGNORE) OPTION (DIAMID_IDNA_REJECT "Reject internationalized Diameter Identities, do not attempt to convert it (stringprep) ?" OFF) ENDIF (NOT DIAMID_IDNA_IGNORE) # Disable expiration of connections with dynamically connected peers as per RFC 3539 ? (default is enabled) # Note: if someone needs, we could also make the delay configurable here... OPTION(DISABLE_PEER_EXPIRY "Disable RFC3539 Peers Connections Expiration after inactivity?" OFF) # The following workaround increases compatibility with some implementations without breaking anything in freeDiameter, # so it can be enabled without risk. We keep it disabled by default anyway for those people who use freeDiameter to check the # compliancy of their implementation with the Diameter RFC... OPTION(WORKAROUND_ACCEPT_INVALID_VSAI "Do not reject a CER/CEA with a Vendor-Specific-Application-Id AVP containing both Auth- and Acct- application AVPs?" OFF) MARK_AS_ADVANCED(DISABLE_SCTP DEBUG_SCTP SCTP_USE_MAPPED_ADDRESSES ERRORS_ON_TODO DEBUG_WITH_META DIAMID_IDNA_IGNORE DIAMID_IDNA_REJECT DISABLE_PEER_EXPIRY WORKAROUND_ACCEPT_INVALID_VSAI) ######################## ### System checks part INCLUDE (CheckLibraryExists) INCLUDE (CheckFunctionExists) INCLUDE (CheckIncludeFiles) INCLUDE (CheckSymbolExists) INCLUDE (CheckCSourceCompiles) INCLUDE (TestBigEndian) ### System checks -- mandatory support # We need the getopt_long function CHECK_FUNCTION_EXISTS (getopt_long HAVE_LONG_OPTIONS) IF (NOT HAVE_LONG_OPTIONS) MESSAGE(SEND_ERROR "The getopt_long function is not found, please add needed library in build system") ENDIF (NOT HAVE_LONG_OPTIONS) # getifaddrs ? CHECK_FUNCTION_EXISTS (getifaddrs HAVE_GETIFADDRS) IF (NOT HAVE_GETIFADDRS) MESSAGE(SEND_ERROR "The getifaddrs function is currently required by freeDiameter.") ENDIF (NOT HAVE_GETIFADDRS) ### System checks -- for freeDiameter-host.h # Check byte ordering TEST_BIG_ENDIAN(HOST_BIG_ENDIAN) # Check if ntohll is provided on the system CHECK_SYMBOL_EXISTS(ntohll netinet/in.h HAVE_NTOHLL) # malloc.h ? CHECK_INCLUDE_FILES (malloc.h HAVE_MALLOC_H) # strndup ? Missing on OS X CHECK_FUNCTION_EXISTS (strndup HAVE_STRNDUP) ### System checks -- for includes / link # pthreads INCLUDE(FindThreads) SET(CMAKE_THREAD_LIBS_INIT ${CMAKE_THREAD_LIBS_INIT} PARENT_SCOPE) # clock_gettime SET(HAVE_CLOCK_GETTIME "") CHECK_FUNCTION_EXISTS (clock_gettime HAVE_NATIVE_CLOCK_GETTIME) IF (HAVE_NATIVE_CLOCK_GETTIME) SET(CLOCK_GETTIME_LIBS "") SET(HAVE_CLOCK_GETTIME 1) ELSE (HAVE_NATIVE_CLOCK_GETTIME) CHECK_LIBRARY_EXISTS (rt clock_gettime "" HAVE_LIBRT) IF (HAVE_LIBRT) SET(CLOCK_GETTIME_LIBS "-lrt") SET(HAVE_CLOCK_GETTIME 1) ELSE (HAVE_LIBRT) CHECK_LIBRARY_EXISTS (posix4 clock_gettime "" HAVE_LIBPOSIX4) IF (HAVE_LIBPOSIX4) SET(CLOCK_GETTIME_LIBS "-lposix4") SET(HAVE_CLOCK_GETTIME 1) ENDIF (HAVE_LIBPOSIX4) ENDIF (HAVE_LIBRT) ENDIF (HAVE_NATIVE_CLOCK_GETTIME) SET(CLOCK_GETTIME_LIBS ${CLOCK_GETTIME_LIBS} PARENT_SCOPE) # dlopen and dlclose: CMAKE_DL_LIBS # We need the sctp_connectx function among others # We need the IPPROTO_SCTP symbol from sys/socket.h, netinet/in.h or netinet/sctp.h IF(NOT DISABLE_SCTP) CHECK_FUNCTION_EXISTS(sctp_connectx HAVE_NATIVE_SCTP) IF(NOT HAVE_NATIVE_SCTP) FIND_PACKAGE(SCTP REQUIRED) ENDIF(NOT HAVE_NATIVE_SCTP) # Now check the number of args of this function, since it changed between Ubuntu 9.04 and 9.10 SET(CHECK_SCTP_CONNECTX_4_ARGS_SOURCE_CODE " #include #include int main() { return sctp_connectx(0, NULL, 0, NULL); } ") SET(CMAKE_REQUIRED_INCLUDES ${SCTP_INCLUDE_DIR}) SET(CMAKE_REQUIRED_LIBRARIES ${SCTP_LIBRARIES}) CHECK_C_SOURCE_COMPILES("${CHECK_SCTP_CONNECTX_4_ARGS_SOURCE_CODE}" SCTP_CONNECTX_4_ARGS) ELSE (NOT DISABLE_SCTP) MESSAGE(STATUS "Disabled SCTP support.") ENDIF(NOT DISABLE_SCTP) SET(SCTP_INCLUDE_DIR ${SCTP_INCLUDE_DIR} PARENT_SCOPE) SET(SCTP_LIBRARIES ${SCTP_LIBRARIES} PARENT_SCOPE) # IDNA process: we use libidn from GNU (unless the function & header files are included in libc) IF(NOT DIAMID_IDNA_IGNORE AND NOT DIAMID_IDNA_REJECT) FIND_PACKAGE(IDNA) SET(CHECK_IDNA_SOURCE_CODE " #include int main() { return idna_to_ascii_8z(NULL, NULL, 0); } ") SET(CMAKE_REQUIRED_INCLUDES ${IDNA_INCLUDE_DIR}) SET(CMAKE_REQUIRED_LIBRARIES ${IDNA_LIBRARIES}) CHECK_C_SOURCE_COMPILES("${CHECK_IDNA_SOURCE_CODE}" HAS_IDNA_SUPPORT) IF(NOT HAS_IDNA_SUPPORT) MESSAGE(SEND_ERROR "Unable to find idna.h header or idna_to_ascii_8z function, please install libidn-dev or equivalent, or set DIAMID_IDNA_IGNORE or DIAMID_IDNA_REJECT") ENDIF(NOT HAS_IDNA_SUPPORT) ELSE (NOT DIAMID_IDNA_IGNORE AND NOT DIAMID_IDNA_REJECT) MESSAGE(STATUS "Non-default Internationalized Domain Names (IDN) behavior selected (no stringprep).") ENDIF(NOT DIAMID_IDNA_IGNORE AND NOT DIAMID_IDNA_REJECT) SET(IDNA_INCLUDE_DIR ${IDNA_INCLUDE_DIR} PARENT_SCOPE) SET(IDNA_LIBRARIES ${IDNA_LIBRARIES} PARENT_SCOPE) # Require GNU TLS for building the library FIND_PACKAGE(GnuTLS REQUIRED) SET(GNUTLS_INCLUDE_DIR ${GNUTLS_INCLUDE_DIR} PARENT_SCOPE) SET(GNUTLS_LIBRARIES ${GNUTLS_LIBRARIES} PARENT_SCOPE) find_path(GCRYPT_INCLUDE_DIR NAMES gcrypt.h) If ( NOT GCRYPT_INCLUDE_DIR ) MESSAGE(SEND_ERROR "Unable to find gcrypt.h, please install libgcrypt-dev or equivalent") Endif ( NOT GCRYPT_INCLUDE_DIR ) MARK_AS_ADVANCED(GCRYPT_INCLUDE_DIR) SET(GCRYPT_INCLUDE_DIR ${GCRYPT_INCLUDE_DIR} PARENT_SCOPE) # Also we need libgcrypt to... display its version :( find_library(GCRYPT_LIBRARY NAMES gcrypt ) If ( NOT GCRYPT_LIBRARY ) MESSAGE(SEND_ERROR "Unable to find libgcrypt, please install libgcrypt or equivalent") Endif ( NOT GCRYPT_LIBRARY ) SET(GCRYPT_LIBRARY ${GCRYPT_LIBRARY} PARENT_SCOPE) # Check if AI_ADDRCONFIG is available on the system CHECK_SYMBOL_EXISTS(AI_ADDRCONFIG "netdb.h" HAVE_AI_ADDRCONFIG) # Check if barriers are available (for test_fifo) SET(CMAKE_REQUIRED_INCLUDES "pthread.h") SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_THREAD_LIBS_INIT}) CHECK_FUNCTION_EXISTS (pthread_barrier_wait HAVE_PTHREAD_BAR) SET(HAVE_PTHREAD_BAR ${HAVE_PTHREAD_BAR} PARENT_SCOPE) ########################## # Additional hg version when relevant, stored in version.h if (EXISTS "${CMAKE_SOURCE_DIR}/.hg") # Search for hg binary to use FIND_PROGRAM(HGCOMMAND hg) if (HGCOMMAND) # Ok, add the custom target so that hg is executed at every build ADD_CUSTOM_TARGET(version_information COMMAND ${CMAKE_COMMAND} -D HGCOMMAND="${HGCOMMAND}" -D SRC="${CMAKE_CURRENT_SOURCE_DIR}/version.h.in" -D DST="${CMAKE_CURRENT_BINARY_DIR}/version.h" -P "${CMAKE_SOURCE_DIR}/cmake/Modules/GetVersionWithHg.cmake" DEPENDS "${CMAKE_SOURCE_DIR}/.hg/dirstate" WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMENT "Retrieving version of the hg repository" ) else (HGCOMMAND) # Display at least "unknown" rev in this case SET(FD_PROJECT_VERSION_HG "unknown") CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h) ADD_CUSTOM_TARGET(version_information DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/version.h) endif(HGCOMMAND) else (EXISTS "${CMAKE_SOURCE_DIR}/.hg") # We use the pure version number without extension CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/version.h) ADD_CUSTOM_TARGET(version_information DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/version.h) endif (EXISTS "${CMAKE_SOURCE_DIR}/.hg") ########################## # LFDPROTO_LIBS = libraries required by the libfdproto. SET(LFDPROTO_LIBS ${CLOCK_GETTIME_LIBS} ${CMAKE_THREAD_LIBS_INIT} ${IDNA_LIBRARIES} PARENT_SCOPE) # And includes paths SET(LFDPROTO_INCLUDES ${IDNA_INCLUDE_DIR} PARENT_SCOPE) # Dependencies: the libraries required by any code linking to libfdproto. SET(LFDPROTO_LINK_INTERFACES ${CMAKE_THREAD_LIBS_INIT} PARENT_SCOPE) # LFDCORE_LIBS = libraries required by the libfdcore (in addition to libfdproto and its dependencies) SET(LFDCORE_LIBS ${CLOCK_GETTIME_LIBS} ${CMAKE_DL_LIBS} ${SCTP_LIBRARIES} ${GCRYPT_LIBRARY} ${GNUTLS_LIBRARIES} PARENT_SCOPE) # And includes paths SET(LFDCORE_INCLUDES ${SCTP_INCLUDE_DIR} ${GNUTLS_INCLUDE_DIR} ${GCRYPT_INCLUDE_DIR} PARENT_SCOPE) # And dependencies SET(LFDCORE_LINK_INTERFACES "" PARENT_SCOPE) # We don't force other libraries, the programs will link with what it needs # (such as libgnutls if it uses GNUTLS_DEBUG() macro # or libfdproto if it uses some of its interfaces directly) # See freeDiameterd/CMakeLists.txt for an example. ########################## # Generate the host.h file CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/freeDiameter-host.h.in ${CMAKE_CURRENT_BINARY_DIR}/freeDiameter-host.h) #### ## INSTALL section ## # The headers from this directory are required to develop new extensions for freeDiameter. INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/freeDiameter-host.h libfdproto.h libfdcore.h extension.h DESTINATION ${INSTALL_HEADERS_SUFFIX} COMPONENT freeDiameter-dev) nextepc-0.3.10/lib/freeDiameter-1.2.1/include/freeDiameter/extension.h000066400000000000000000000065471333553357400252730ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #ifndef _EXTENSION_H #define _EXTENSION_H #ifdef __cplusplus extern "C" { #endif /* Include definition of freeDiameter API */ #include #include /* Macro that define the entry point of the extension */ #define EXTENSION_ENTRY(_name, _function, _depends...) \ const char *fd_ext_depends[] = { _name , ## _depends , NULL }; \ static int extension_loaded = 0; \ int fd_ext_init(int major, int minor, char * conffile) { \ if ((major != FD_PROJECT_VERSION_MAJOR) \ || (minor != FD_PROJECT_VERSION_MINOR)) { \ TRACE_ERROR("This extension (" _name ") was compiled for a different version of freeDiameter."); \ TRACE_DEBUG(INFO, "daemon %d.%d != ext %d.%d", \ major, minor, \ FD_PROJECT_VERSION_MAJOR, FD_PROJECT_VERSION_MINOR); \ return EINVAL; \ } \ if (extension_loaded) { \ TRACE_ERROR("Extension (" _name ") cannot be loaded twice!"); \ return ENOTSUP; \ } \ extension_loaded++; \ return (_function)(conffile); \ } #ifdef __cplusplus } #endif #endif /* _EXTENSION_H */ nextepc-0.3.10/lib/freeDiameter-1.2.1/include/freeDiameter/freeDiameter-host.h.in000066400000000000000000000104611333553357400272210ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2015, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Configuration from compile-time */ #ifndef FD_IS_CONFIG #define FD_IS_CONFIG #ifdef __cplusplus extern "C" { #endif #cmakedefine HAVE_NTOHLL #cmakedefine HAVE_MALLOC_H #cmakedefine HAVE_SIGNALENT_H #cmakedefine HAVE_AI_ADDRCONFIG #cmakedefine HAVE_CLOCK_GETTIME #cmakedefine HAVE_STRNDUP #cmakedefine HAVE_PTHREAD_BAR #cmakedefine HOST_BIG_ENDIAN @HOST_BIG_ENDIAN@ #cmakedefine DISABLE_SCTP #cmakedefine DEBUG_SCTP #cmakedefine DEBUG_WITH_META #cmakedefine SCTP_USE_MAPPED_ADDRESSES #cmakedefine SCTP_CONNECTX_4_ARGS #cmakedefine SKIP_DLCLOSE #cmakedefine DIAMID_IDNA_IGNORE #cmakedefine DIAMID_IDNA_REJECT #cmakedefine DISABLE_PEER_EXPIRY #cmakedefine WORKAROUND_ACCEPT_INVALID_VSAI #cmakedefine GNUTLS_VERSION_210 #cmakedefine GNUTLS_VERSION_212 #cmakedefine GNUTLS_VERSION_300 #cmakedefine GNUTLS_VERSION_310 #cmakedefine ERRORS_ON_TODO #cmakedefine DEBUG #cmakedefine FD_PROJECT_BINARY "@FD_PROJECT_BINARY@" #cmakedefine FD_PROJECT_NAME "@FD_PROJECT_NAME@" #cmakedefine FD_PROJECT_VERSION_MAJOR @FD_PROJECT_VERSION_MAJOR@ #ifndef FD_PROJECT_VERSION_MAJOR # define FD_PROJECT_VERSION_MAJOR 0 #endif /*FD_PROJECT_VERSION_MAJOR*/ #cmakedefine FD_PROJECT_VERSION_MINOR @FD_PROJECT_VERSION_MINOR@ #ifndef FD_PROJECT_VERSION_MINOR # define FD_PROJECT_VERSION_MINOR 0 #endif /*FD_PROJECT_VERSION_MINOR*/ #cmakedefine FD_PROJECT_VERSION_REV @FD_PROJECT_VERSION_REV@ #ifndef FD_PROJECT_VERSION_REV # define FD_PROJECT_VERSION_REV 0 #endif /*FD_PROJECT_VERSION_REV*/ #cmakedefine FD_PROJECT_VERSION_API @FD_PROJECT_VERSION_API@ #ifndef FD_PROJECT_VERSION_API # define FD_PROJECT_VERSION_API 0 #endif /*FD_PROJECT_VERSION_API*/ #cmakedefine FD_PROJECT_COPYRIGHT "@FD_PROJECT_COPYRIGHT@" #cmakedefine DEFAULT_CONF_PATH "@DEFAULT_CONF_PATH@" #cmakedefine DEFAULT_EXTENSIONS_PATH "@DEFAULT_EXTENSIONS_PATH@" #ifndef FD_DEFAULT_CONF_FILENAME #define FD_DEFAULT_CONF_FILENAME "freeDiameter.conf" #endif /* FD_DEFAULT_CONF_FILENAME */ /* Maximum number of hooks handlers that can be registered. Make this compilation option if needed */ #define FD_HOOK_HANDLE_LIMIT 5 #ifdef __cplusplus } #endif #endif /* FD_IS_CONFIG */ nextepc-0.3.10/lib/freeDiameter-1.2.1/include/freeDiameter/freeDiameter-host.hin000066400000000000000000000004001333553357400271330ustar00rootroot00000000000000#ifndef __FD_HOST_H__ #define __FD_HOST_H__ #undef PACKAGE #undef PACKAGE_BUGREPORT #undef PACKAGE_NAME #undef PACKAGE_STRING #undef PACKAGE_TARNAME #undef PACKAGE_URL #undef PACKAGE_VERSION #undef VERSION #include "config.h" #endif /* __FD_HOST_H__ */ nextepc-0.3.10/lib/freeDiameter-1.2.1/include/freeDiameter/libfdcore.h000066400000000000000000001646721333553357400252140ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2016, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #ifndef _LIBFDCORE_H #define _LIBFDCORE_H #ifdef __cplusplus extern "C" { #endif #include #include #include /* GNUTLS version */ #ifndef GNUTLS_VERSION #define GNUTLS_VERSION LIBGNUTLS_VERSION #endif /* GNUTLS_VERSION */ /* GNUTLS calls debug level */ #ifndef GNUTLS_DBG_LEVEL #define GNUTLS_DBG_LEVEL ANNOYING #endif /* GNUTLS_DBG_LEVEL */ /* Check the return value of a GNUTLS function, log and propagate */ #define CHECK_GNUTLS_GEN( faillevel, __call__, __fallback__ ) { \ CHECK_PRELUDE(__call__); \ if (__ret__ < 0) { \ LOG(faillevel, "TLS ERROR: in '%s' :\t%s", #__call__ , gnutls_strerror(__ret__)); \ __fallback__; \ } \ } /* we use this macro to help debugging gnutls usage issues -- just change the content to display what you need */ #define GNUTLS_TRACE( __call__) { \ TRACE_CALL("Check: %s", #__call__ ); \ (__call__); \ } #ifndef EXCLUDE_DEPRECATED /* Macro for transition, replace with CHECK_GNUTLS_GEN */ #define CHECK_GNUTLS_DO( __call__, __fallback__ ) \ CHECK_GNUTLS_GEN( FD_LOG_ERROR, __call__, __fallback__ ) #endif /* EXCLUDE_DEPRECATED */ /*============================================================*/ /* INITIALIZATION */ /*============================================================*/ /* Initialize the libfdcore internals. This also initializes libfdproto */ int fd_core_initialize(void); /* A string describing the version of the library */ extern const char fd_core_version[]; /* Parse the freeDiameter.conf configuration file, load the extensions */ int fd_core_parseconf(const char * conffile); /* Start the server & client threads */ int fd_core_start(void); /* Block until the framework has completed its initialization -- useful for extensions */ int fd_core_waitstartcomplete(void); /* Initialize shutdown of the framework */ int fd_core_shutdown(void); /* Wait for the shutdown to be complete -- this should always be called after fd_core_shutdown */ int fd_core_wait_shutdown_complete(void); /*============================================================*/ /* CONFIG */ /*============================================================*/ /* Structure to hold the configuration of the freeDiameter daemon */ #define EYEC_CONFIG 0xC011F16 struct fd_config { int cnf_eyec; /* Eye catcher: EYEC_CONFIG */ const char *cnf_file; /* Configuration file to parse, default is DEFAULT_CONF_FILE */ DiamId_t cnf_diamid; /* Diameter Identity of the local peer (FQDN -- ASCII) */ size_t cnf_diamid_len;/* cached length of the previous string */ DiamId_t cnf_diamrlm; /* Diameter realm of the local peer, default to realm part of cnf_diamid */ size_t cnf_diamrlm_len;/* length of the previous string */ unsigned int cnf_timer_tc; /* The value in seconds of the default Tc timer */ unsigned int cnf_timer_tw; /* The value in seconds of the default Tw timer */ uint16_t cnf_port; /* the local port for legacy Diameter (default: 3868) in host byte order */ uint16_t cnf_port_tls; /* the local port for Diameter/TLS (default: 5868) in host byte order */ uint16_t cnf_port_3436; /* Open an additional server port to listen to old TLS/SCTP clients (RFC3436, freeDiameter versions < 1.2.0) */ uint16_t cnf_sctp_str; /* default max number of streams for SCTP associations (def: 30) */ struct fd_list cnf_endpoints; /* the local endpoints to bind the server to. list of struct fd_endpoint. default is empty (bind all). After servers are started, this is the actual list of endpoints including port information. */ int cnf_thr_srv; /* Number of threads per servers handling the connection state machines */ struct fd_list cnf_apps; /* Applications locally supported (except relay, see flags). Use fd_disp_app_support to add one. list of struct fd_app. */ uint16_t cnf_dispthr; /* Number of dispatch threads to create */ struct { unsigned no_fwd : 1; /* the peer does not relay messages (0xffffff app id) */ unsigned no_ip4 : 1; /* disable IP */ unsigned no_ip6 : 1; /* disable IPv6 */ unsigned no_tcp : 1; /* disable use of TCP */ unsigned no_sctp: 1; /* disable the use of SCTP */ unsigned pr_tcp : 1; /* prefer TCP over SCTP */ unsigned tls_alg: 1; /* TLS algorithm for initiated cnx. 0: separate port. 1: inband-security (old) */ } cnf_flags; struct { int tls_disabled; /* Credentials parameters (backup) */ char * cert_file; char * key_file; char * ca_file; int ca_file_nr; char * crl_file; char * prio_string; unsigned int dh_bits; char * dh_file; /* GNUTLS parameters */ gnutls_priority_t prio_cache; gnutls_dh_params_t dh_cache; /* GNUTLS server credential(s) */ gnutls_certificate_credentials_t credentials; /* contains local cert + trust anchors */ #ifdef GNUTLS_VERSION_300 gnutls_x509_trust_list_t trustlist; /* the logic to check local certificate has changed */ #endif /* GNUTLS_VERSION_300 */ } cnf_sec_data; uint32_t cnf_orstateid; /* The value to use in Origin-State-Id, default to random value */ struct dictionary *cnf_dict; /* pointer to the global dictionary */ struct fifo *cnf_main_ev; /* events for the daemon's main (struct fd_event items) */ }; extern struct fd_config *fd_g_config; /* The pointer to access the global configuration, initalized in main */ /*============================================================*/ /* PEERS */ /*============================================================*/ /* States of a peer */ enum peer_state { /* Stable states */ STATE_NEW = 0, /* The peer has been just been created, PSM thread not started yet */ STATE_OPEN, /* Connexion established */ /* Peer state machine */ STATE_CLOSED, /* No connection established, will re-attempt after TcTimer. */ STATE_CLOSING, /* the connection is being shutdown (DPR/DPA in progress) */ STATE_WAITCNXACK, /* Attempting to establish transport-level connection */ STATE_WAITCNXACK_ELEC, /* Received a CER from this same peer on an incoming connection (other peer object), while we were waiting for cnx ack */ STATE_WAITCEA, /* Connection established, CER sent, waiting for CEA */ /* STATE_WAITRETURNS_ELEC, */ /* This state is not stable and therefore deprecated: We have sent a CER on our initiated connection, and received a CER from the remote peer on another connection. Election. If we win the election, we must disconnect the initiated connection and send a CEA on the other => we go to OPEN state. If we lose, we disconnect the other connection (receiver) and fallback to WAITCEA state. */ STATE_OPEN_HANDSHAKE, /* TLS Handshake and validation are in progress in open state -- we use it only for debug purpose, it is never displayed */ /* Failover state machine */ STATE_SUSPECT, /* A DWR was sent and not answered within TwTime. Failover in progress. */ STATE_REOPEN, /* Connection has been re-established, waiting for 3 DWR/DWA exchanges before putting back to service */ /* Ordering issues with multistream & state machine. -- see top of p_psm.c for explanation */ STATE_OPEN_NEW, /* after CEA is sent, until a new message is received. Force ordering in this state */ STATE_CLOSING_GRACE, /* after DPA is sent or received, give a short delay for messages in the pipe to be received. */ /* Error state */ STATE_ZOMBIE /* The PSM thread is not running anymore; it must be re-started or peer should be deleted. */ #define STATE_MAX STATE_ZOMBIE }; /* The following macro is called in freeDiameter/p_psm.c */ #define DECLARE_STATE_STR() \ const char *peer_state_str[] = { \ "STATE_NEW" \ , "STATE_OPEN" \ , "STATE_CLOSED" \ , "STATE_CLOSING" \ , "STATE_WAITCNXACK" \ , "STATE_WAITCNXACK_ELEC" \ , "STATE_WAITCEA" \ , "STATE_OPEN_HANDSHAKE" \ , "STATE_SUSPECT" \ , "STATE_REOPEN" \ , "STATE_OPEN_NEW" \ , "STATE_CLOSING_GRACE" \ , "STATE_ZOMBIE" \ }; extern const char *peer_state_str[]; #define STATE_STR(state) \ (((unsigned)(state)) <= STATE_MAX ? peer_state_str[((unsigned)(state)) ] : "") /* Constants for the peer_info structure below */ #define PI_P3_DEFAULT 0 /* Use any available protocol */ #define PI_P3_IP 1 /* Use only IP to connect to this peer */ #define PI_P3_IPv6 2 /* resp, IPv6 */ #define PI_P4_DEFAULT 0 /* Attempt any available protocol */ #define PI_P4_TCP 1 /* Only use TCP */ #define PI_P4_SCTP 2 /* Only use SCTP */ #define PI_ALGPREF_SCTP 0 /* SCTP is attempted first (default) */ #define PI_ALGPREF_TCP 1 /* TCP is attempted first */ #define PI_SEC_DEFAULT 0 /* New TLS security (handshake after connection, protecting also CER/CEA) */ #define PI_SEC_NONE 1 /* Transparent security with this peer (IPsec) */ #define PI_SEC_TLS_OLD 2 /* Old TLS security (use Inband-Security-Id AVP during CER/CEA) */ /* Set sec = 3 to authorize use of (Inband-Security-Id == NONE) with this peer, sec = 2 only authorizing TLS */ #define PI_SCTPSEC_DEF 0 /* Use DTLS over SCTP to connect to this peer (default) */ #define PI_SCTPSEC_3436 1 /* Use TLS over SCTP to connect to this peer (RFC3436) */ #define PI_EXP_NONE 0 /* the peer entry does not expire */ #define PI_EXP_INACTIVE 1 /* the peer entry expires (i.e. is deleted) after pi_lft seconds without activity */ #define PI_PRST_NONE 0 /* the peer entry is deleted after disconnection / error */ #define PI_PRST_ALWAYS 1 /* the peer entry is persistant (will be kept as ZOMBIE in case of error) */ /* Information about a remote peer */ struct peer_info { DiamId_t pi_diamid; /* (supposedly) UTF-8, \0 terminated. The Diameter Identity of the remote peer. */ size_t pi_diamidlen; /* cached length of pi_diamid */ struct { struct { unsigned pro3 :2; /* PI_P3_* */ unsigned pro4 :2; /* PI_P4_* */ unsigned alg :1; /* PI_ALGPREF_* */ unsigned sec :2; /* PI_SEC_* */ unsigned sctpsec :1; /* PI_SCTPSEC_* */ unsigned exp :1; /* PI_EXP_* */ unsigned persist :1; /* PI_PRST_* */ } pic_flags; /* Flags influencing the connection to the remote peer */ DiamId_t pic_realm; /* If configured, the daemon will check the received realm in CER/CEA matches this. */ uint16_t pic_port; /* port to connect to. 0: default. */ uint32_t pic_lft; /* lifetime of this peer when inactive (see pic_flags.exp definition) */ int pic_tctimer; /* use this value for TcTimer instead of global, if != 0 */ int pic_twtimer; /* use this value for TwTimer instead of global, if != 0 */ char * pic_priority; /* Priority string for GnuTLS if we don't use the default */ } config; /* Configured data (static for this peer entry) */ struct { /* enum peer_state pir_state; */ /* Since 1.1.0, read the state with fd_peer_getstate(peer). */ DiamId_t pir_realm; /* The received realm in CER/CEA. */ size_t pir_realmlen; /* length of the realm */ uint32_t pir_vendorid; /* Content of the Vendor-Id AVP, or 0 by default */ uint32_t pir_orstate; /* Origin-State-Id value */ os0_t pir_prodname; /* copy of Product-Name AVP (\0 terminated) */ uint32_t pir_firmrev; /* Content of the Firmware-Revision AVP */ int pir_relay; /* The remote peer advertized the relay application */ struct fd_list pir_apps; /* applications advertised by the remote peer, except relay (pi_flags.relay) */ int pir_isi; /* Inband-Security-Id advertised (PI_SEC_* bits) */ uint32_t pir_lastDC; /* The last Disconnect-Cause value received */ int pir_proto; /* The L4 protocol currently used with the peer (IPPROTO_TCP or IPPROTO_SCTP) */ const gnutls_datum_t *pir_cert_list; /* The (valid) credentials that the peer has presented, or NULL if TLS is not used */ /* This is inspired from http://www.gnu.org/software/gnutls/manual/gnutls.html#ex_003ax509_002dinfo see there for example of using this data */ unsigned int pir_cert_list_size; /* Number of certificates in the list */ } runtime; /* Data populated after connection, may change between 2 connections -- not used by fd_peer_add */ struct fd_list pi_endpoints; /* Endpoint(s) of the remote peer (configured, discovered, or advertized). list of struct fd_endpoint. DNS resolved if empty. */ }; struct peer_hdr { struct fd_list chain; /* Link into the list of all the peers, ordered by their Diameter Id (fd_os_cmp) */ struct peer_info info; /* The public data */ /* This header is followed by more data in the private peer structure definition */ }; /* the global list of peers. Since we are not expecting so many connections, we don't use a hash, but it might be changed. The list items are peer_hdr structures (actually, fd_peer, but the cast is OK) */ extern struct fd_list fd_g_peers; extern pthread_rwlock_t fd_g_peers_rw; /* protect the list */ /* * FUNCTION: fd_peer_add * * PARAMETERS: * info : Information to create the peer. * orig_dbg : A string indicating the origin of the peer information, for debug (ex: conf, redirect, ...) * cb : optional, a callback to call (once) when the peer connection is established or failed * cb_data : opaque data to pass to the callback. * * DESCRIPTION: * Add a peer to the list of peers to which the daemon must maintain a connexion. * * The content of info parameter is copied, except for the list of endpoints if * not empty, which is simply moved into the created object. It means that the list * items must have been malloc'd, so that they can be freed. * * If cb is not null, the callback is called when the connection is in OPEN state or * when an error has occurred. The callback should use the pi_state information to * determine which one it is. If the first parameter of the called callback is NULL, it * means that the peer is being destroyed before attempt success / failure. * cb is called to allow freeing cb_data in * this case. * * The orig_dbg string is only useful for easing debug, and can be left to NULL. * * RETURN VALUE: * 0 : The peer is added. * EINVAL : A parameter is invalid. * EEXIST : A peer with the same Diameter-Id is already in the list. * (other standard errors may be returned, too, with their standard meaning. Example: * ENOMEM : Memory allocation for the new object element failed.) */ int fd_peer_add ( struct peer_info * info, const char * orig_dbg, void (*cb)(struct peer_info *, void *), void * cb_data ); /* * FUNCTION: fd_peer_getbyid * * PARAMETERS: * diamid : an UTF8 string describing the diameter Id of the peer to seek * diamidlen : length of the diamid * igncase : perform an almost-case-insensitive search? (slower) * peer : The peer is stored here if it exists. * * DESCRIPTION: * Search a peer by its Diameter-Id. * * RETURN VALUE: * 0 : *peer has been updated (to NULL if the peer is not found). * !0 : An error occurred. */ int fd_peer_getbyid( DiamId_t diamid, size_t diamidlen, int igncase, struct peer_hdr ** peer ); /* * FUNCTION: fd_peer_get_state * * PARAMETERS: * peer : The peer which state to read * * DESCRIPTION: * Returns the current state of the peer. * * RETURN VALUE: * -1 : peer is invalid * >=0 : the state of the peer at the time of reading. */ int fd_peer_get_state(struct peer_hdr *peer); /* * FUNCTION: fd_peer_cnx_proto_info * * PARAMETERS: * peer : The peer which information to be read * buf : Where to store the protocol information * len : available space in bug * * DESCRIPTION: * Creates a string describing the current connection to this peer, e.g.: "TCP,TLS,soc#3". * * RETURN VALUE: * 0 : buffer was written * >=0 : error code. */ int fd_peer_cnx_proto_info(struct peer_hdr *peer, char * buf, size_t len); /* * FUNCTION: fd_peer_get_load_pending * * PARAMETERS: * peer : The peer which load to read * to_receive : (out) number of requests sent to this peer without matching answer yet. * to_send : (out) number of requests received from this peer and not yet answered. * * DESCRIPTION: * Returns the current number of requests sent to this peer * that have not been answered yet. This is an empirical indication * of the workload of this peer. * * RETURN VALUE: * 0 : The load parameter has been updated. (it should have a positive value always) * !0 : An error occurred */ int fd_peer_get_load_pending(struct peer_hdr *peer, long * to_receive, long * to_send); /* * FUNCTION: fd_peer_validate_register * * PARAMETERS: * peer_validate : Callback as defined below. * * DESCRIPTION: * Add a callback to authorize / reject incoming peer connections. * All registered callbacks are called until a callback sets auth = -1 or auth = 1. * If no callback returns a clear decision, the default behavior is applied (reject unknown connections) * The callbacks are called in FILO order of their registration. * * RETURN VALUE: * 0 : The callback is added. * !0 : An error occurred. */ int fd_peer_validate_register ( int (*peer_validate)(struct peer_info * /* info */, int * /* auth */, int (**cb2)(struct peer_info *)) ); /* * CALLBACK: peer_validate * * PARAMETERS: * info : Structure containing information about the peer attempting the connection. * auth : Store there the result if the peer is accepted (1), rejected (-1), or unknown (0). * cb2 : If != NULL and in case of PI_SEC_TLS_OLD, another callback to call after handshake (if auth = 1). * * DESCRIPTION: * This callback is called when a new connection is being established from an unknown peer, * after the CER is received. An extension must register such callback with peer_validate_register. * * The callback can learn if the peer has sent Inband-Security-Id AVPs in runtime.pir_isi fields. * It can also learn if a handshake has already been performed in runtime.pir_cert_list field. * The callback must set the value of config.pic_flags.sec appropriately to allow a connection without TLS. * * If the old TLS mechanism is used, * the extension may also need to check the credentials provided during the TLS * exchange (remote certificate). For this purpose, it may set the address of a new callback * to be called once the handshake is completed. This new callback receives the information * structure as parameter (with pir_cert_list set) and returns 0 if the credentials are correct, * or an error code otherwise. If the error code is received, the connection is closed and the * peer is destroyed. * Note that freeDiameter already achieves some usual checks. The callback may be used to enforce * additional restrictions. * * RETURN VALUE: * 0 : The authorization decision has been written in the location pointed by auth. * !0 : An error occurred. */ /*============================================================*/ /* MESSAGES */ /*============================================================*/ /* * FUNCTION: fd_msg_send, fd_msg_send_timeout * * PARAMETERS: * pmsg : Location of the message to be sent on the network (set to NULL on function return to avoid double deletion). * anscb : A callback to be called when corresponding answer is received, when sending a request (not used with answers) * anscb_data : opaque data to be passed back to the anscb (or expirecb) when it is called. * expirecb : (only for fd_msg_send_timeout) If the request did not get an answer before timeout, this callback is called. * timeout : (only for fd_msg_send_timeout) sets the absolute time until when to wait for an answer. Past this time, * the expirecb is called with the request and the answer will be discarded if received later. * * DESCRIPTION: * Sends a message on the network. (actually simply queues it in a global queue, to be picked by a daemon's thread) * For requests, the end-to-end id must be set (see fd_msg_get_eteid / MSGFL_ALLOC_ETEID). * For answers, the message must be created with function fd_msg_new_answer_from_req. * * The routing module will handle sending to the correct peer, usually based on the Destination-Realm / Destination-Host AVP. * * If the msg is a request, there are two ways of receiving the answer: * - either having registered a callback in the dispatch module (see fd_disp_register) * - or provide a anscb callback here. If such callback is provided, it is called before the dispatch callbacks. * The prototype for this anscb callback function is: * void anscb(void * data, struct msg ** answer) * where: * data : opaque data that was registered along with the callback. * answer : location of the pointer to the answer. * note1: on function return, if *answer is not NULL, the message is passed to the dispatch module for regular callbacks. * otherwise, the callback must take care of freeing the message (fd_msg_free). * note2: the opaque data is not freed by the daemon in any case, extensions should ensure clean handling in fd_ext_fini. * * If no callback is registered to handle an answer, the message is discarded and an error is logged. * * fd_msg_send_timeout is similar to fd_msg_send, except that it takes two additional arguments "expirecb" and "timeout". * If the message parameter is an answer, there is no difference with fd_msg_send. * Otherwise, if the corresponding answer (or error) is received before the timeout date elapses, everything occurs as with fd_msg_send. * Otherwise, the request is removed from the queue (meaning the matching answer will be discarded upon reception) and passed to the expirecb * function. Upon return, if the *msg parameter is not NULL, it is freed (not passed to other callbacks). * expirecb is called in a dedicated thread. * * The prototype for the expirecb callback function is: * void expirecb(void * data, struct peer_hdr * sentto, struct msg ** request) * where: * data : opaque data that was registered along with the callback. * sentto : pointer to the peer to which the message was sent and no answer received within timeout. * request: location of the pointer to the request that was not answered. * * RETURN VALUE: * 0 : The message has been queued for sending (sending may fail asynchronously). * EINVAL : A parameter is invalid (ex: anscb provided but message is not a request). * ... */ int fd_msg_send ( struct msg ** pmsg, void (*anscb)(void *, struct msg **), void * data ); int fd_msg_send_timeout ( struct msg ** pmsg, void (*anscb)(void *, struct msg **), void * data, void (*expirecb)(void *, DiamId_t, size_t, struct msg **), const struct timespec *timeout ); /* * FUNCTION: fd_msg_rescode_set * * PARAMETERS: * msg : A msg object -- it must be an answer. * rescode : The name of the returned error code (ex: "DIAMETER_INVALID_AVP") * errormsg : (optional) human-readable error message to put in Error-Message AVP * optavp : (optional) If provided, the content will be put inside a Failed-AVP * type_id : 0 => nothing; 1 => adds Origin-Host and Origin-Realm with local info. 2=> adds Error-Reporting-Host. * * DESCRIPTION: * This function adds a Result-Code AVP to a message, and optionally * - sets the 'E' error flag in the header, * - adds Error-Message, Error-Reporting-Host and Failed-AVP AVPs. * * RETURN VALUE: * 0 : Operation complete. * !0 : an error occurred. */ int fd_msg_rescode_set( struct msg * msg, char * rescode, char * errormsg, struct avp * optavp, int type_id ); /* Add Origin-Host, Origin-Realm, (if osi) Origin-State-Id AVPS at the end of the message */ int fd_msg_add_origin ( struct msg * msg, int osi ); /* Generate a new Session-Id and add it at the beginning of the message (opt is added at the end of the sid if provided) */ int fd_msg_new_session( struct msg * msg, os0_t opt, size_t optlen ); /* Parse a message against our dictionary, return 0 in case of success. log parsing error & return error code in case of failure in parsing. In addition, if the error code is EBADMSG (the message does not follow our dictionary) if *msg was a request, *msg is NULL and *error contains the error message ready to send back on return if *msg was an answer, *msg is untouched and *error==*msg if *msg was an error message, *error is null otherwise */ int fd_msg_parse_or_error( struct msg ** msg, struct msg **error ); /*============================================================*/ /* DISPATCH */ /*============================================================*/ /* * FUNCTION: fd_disp_app_support * * PARAMETERS: * app : The dictionary object corresponding to the Application. * vendor : (Optional) the dictionary object of a Vendor to claim support in Vendor-Specific-Application-Id * auth : Support auth app part. * acct : Support acct app part. * * DESCRIPTION: * Registers an application to be advertized in CER/CEA exchanges. * Messages with an application-id matching a registered value are passed to the dispatch module, * while other messages are simply relayed or an error is returned (if local node does not relay) * * RETURN VALUE: * 0 : The application support is registered. * EINVAL : A parameter is invalid. */ int fd_disp_app_support ( struct dict_object * app, struct dict_object * vendor, int auth, int acct ); /* Note: if we want to support capabilities updates, we'll have to add possibility to remove an app as well... */ /*============================================================*/ /* ROUTING */ /*============================================================*/ /* This file contains the definitions of types and functions involved in the routing decisions in freeDiameter, * and that can be called by extensions. * * Three different type of messages must be distinguished: * - Messages received, and the peer is final recipient (IN messages) * - Messages received, and the peer is not final recipient (FWD messages) * - Message is locally generated (OUT messages) * * There are three global message queues (in queues.c) and also peers-specific queues (in struct fd_peer). * * (*) IN messages processing details: * - the message is received from the remote peer, a FDEVP_CNX_MSG_RECV event is generated for the peer. * - the PSM thread parses the buffer, does some verifications, handles non routable messages (fd_msg_is_routable) * - routable messages are queued in the fd_g_incoming global queue. * - a thread (routing-in) picks the message and takes the decision if it is handled locally or forwarded, * based on local capabilities (registered by extensions with fd_disp_app_support). * - If the message is handled locally, it is queued in fd_g_local. * - Another thread (dispatch.c) will handle this message and pass it to registered callbacks (see fd_disp_register in libfreeDiameter.h). * * (*) FWD messages details: * - The process is the same as for IN messages, until the routing-in threads makes its decision that the message is not handled locally. * - If the local peer does not relay message, an error DIAMETER_APPLICATION_UNSUPPORTED is returned. * - All callbacks registered with fd_rt_fwd_register are called for the message (see below). * - these callbacks will typically do proxying work. Note that adding the route-record is handled by the daemon. * - Once all callbacks have been called, the message is queued in the global fd_g_outgoing queue. * - The remaining processing is the same as for OUT messages, as described below. * * (*) OUT messages details: * - The message are picked from fd_g_outgoing (they are queued there as result of forwarding process or call to fd_msg_send.) * - The (routing-out) thread builds a list of possible destinations for the message, as follow: * - create a list of all known peers in the "OPEN" state. * - remove from that list all peers that are in a Route-Record AVP of the message, to avoid routing loops. * - remove also all peers that have previously replied an error message for this message. * - If the list is empty, create an error UNABLE_TO_DELIVER (note: should we trig dynamic discovery here???) and reply. * - Otherwise, call all callbacks registered by function fd_rt_out_register, with the list of peers and the message. * - Order the resulting list of peers by score (see below), and sent the message to the peer with highest (positive) score. * - in case the peer is no longer in the "OPEN" state, send the message to the second peer in the list. * - if no peer is in OPEN state anymore, restart the process of creating the list. * - Once a peer has been selected, the message is queued into that peer's outgoing queue. * * The following functions allow an extension to register or remove a callback as described above. */ /********** Forwarding callbacks: for Proxy operations ***********/ /* Handle to registered callback */ struct fd_rt_fwd_hdl; /* Message direction for the callback */ enum fd_rt_fwd_dir { RT_FWD_REQ = 1, /* The callback will be called on forwarded requests only */ RT_FWD_ALL = 2, /* The callback will be called on all forwarded messages (requests and answers )*/ RT_FWD_ANS = 3 /* The callback will be called on answers and errors only */ }; /* * FUNCTION: fd_rt_fwd_register * * PARAMETERS: * rt_fwd_cb : The callback function to register (see prototype below). * cbdata : Pointer to pass to the callback when it is called. The data is opaque to the daemon. * dir : One of the RT_FWD_* directions defined above. * handler : On success, a handler to the registered callback is stored here. * This handler will be used to unregister the cb. * * DESCRIPTION: * Register a new callback for forwarded messages. See explanations above. * Note that there is no guaranteed order for the callbacks calls. * * RETURN VALUE: * 0 : The callback is registered. * EINVAL : A parameter is invalid. * ENOMEM : Not enough memory to complete the operation */ int fd_rt_fwd_register ( int (*rt_fwd_cb)(void * cbdata, struct msg ** msg), void * cbdata, enum fd_rt_fwd_dir dir, struct fd_rt_fwd_hdl ** handler ); /* * CALLBACK: rt_fwd_cb * * PARAMETERS: * data : pointer to some data that was passed when the callback was registered (optional). * msg : The message that is being forwarded. * * DESCRIPTION: * This callback is called when a message is forwarded to another peer. It may for example add a Proxy-Info AVP. * The callback may also choose to handle the message in a more complex form. In that case, it must set *msg = NULL * and handle it differently. In such case, the forwarding thread will stop processing this message. * * RETURN VALUE: * 0 : Operation complete. * !0 : An error occurred -- will result in daemon's termination. */ /* * FUNCTION: fd_rt_fwd_unregister * * PARAMETERS: * handler : The handler of the callback that must be unregistered. * cbdata : Will receive the data registered with the callback, that can be freed if needed. * * DESCRIPTION: * Removes a callback from the list of registered callbacks. * * RETURN VALUE: * 0 : The callback is unregistered. * EINVAL : A parameter is invalid. */ int fd_rt_fwd_unregister ( struct fd_rt_fwd_hdl * handler, void ** cbdata ); /********** Out callbacks: for next hop routing decision operations ***********/ /* Handle to registered callback */ struct fd_rt_out_hdl; enum fd_rt_out_score { FD_SCORE_NO_DELIVERY = -70, /* We should not send this message to this candidate */ FD_SCORE_SENT_REDIRECT = -60, /* If this peer previously sent a Redirect indication that applies to this message */ FD_SCORE_INI = -2, /* All candidates are initialized with this value */ FD_SCORE_LOAD_BALANCE = 1, /* Use this to differentiate between several peers with the same score */ FD_SCORE_DEFAULT = 5, /* The peer is a default route for all messages */ FD_SCORE_DEFAULT_REALM = 10, /* The peer is a default route for this realm */ FD_SCORE_REALM = 15, /* The peer belongs to Destination-Realm of the message */ FD_SCORE_REDIR_HOST = 25, /* If there is a redirect rule with ALL_HOST for these message and peer */ FD_SCORE_REDIR_APP = 30, /* If there is a redirect rule with ALL_APPLICATION for these message and peer */ FD_SCORE_REDIR_REALM = 35, /* If there is a redirect rule with ALL_REALM for these message and peer */ FD_SCORE_REDIR_REALM_APP = 40, /* If there is a redirect rule with REALM_AND_APPLICATION for these message and peer */ FD_SCORE_REDIR_USER = 45, /* If there is a redirect rule with ALL_USER for these message and peer */ FD_SCORE_REDIR_SESSION = 50, /* If there is a redirect rule with ALL_SESSION for these message and peer */ FD_SCORE_REDIR_ONCE = 55, /* If there is a redirect rule with DONT_CACHE for these message and peer */ FD_SCORE_FINALDEST = 100 /* If the peer is the final recipient of the message (i.e. matching Destination-Host), it receives a big score. */ }; /* * FUNCTION: fd_rt_out_register * * PARAMETERS: * rt_out_cb : The callback function to register (see prototype below). * cbdata : Pointer to pass to the callback when it is called. The data is opaque to the daemon. * priority : Order for calling this callback. The callbacks are called in reverse priority order (higher priority = called sooner). * handler : On success, a handler to the registered callback is stored here. * This handler will be used to unregister the cb. * * DESCRIPTION: * Register a new callback to handle OUT routing decisions. See explanations above. * * RETURN VALUE: * 0 : The callback is registered. * EINVAL : A parameter is invalid. * ENOMEM : Not enough memory to complete the operation */ int fd_rt_out_register ( int (*rt_out_cb)(void * cbdata, struct msg ** pmsg, struct fd_list * candidates), void * cbdata, int priority, struct fd_rt_out_hdl ** handler ); /* * CALLBACK: rt_out_cb * * PARAMETERS: * cbdata : pointer to some data that was registered with the callback. * pmsg : pointer to the message that must be sent. upon return if *msg is NULL, the processing stops and the message is not sent. * list : The list of peers to which the message may be sent to, as returned by fd_rtd_candidate_extract * * DESCRIPTION: * This callback must attribute a score (preferably from FD_SCORE_*) to each candidate peer in the list. * Once all registered callbacks have been called, the message is sent to the candidate with the highest score. * Note that each callback must *add* its locally-attributed score to the candidate current "score" parameter, not replace it! * Note also that this callback must be re-entrant since it may be called by several threads at the same time * (for different messages) * * RETURN VALUE: * 0 : Operation complete. * !0 : An error occurred. */ /* * FUNCTION: fd_rt_out_unregister * * PARAMETERS: * handler : The handler of the callback that must be unregistered. * cbdata : Will receive the data registered with the callback, that can be freed if needed. * * DESCRIPTION: * Removes a callback from the list of registered callbacks. * * RETURN VALUE: * 0 : The callback is unregistered. * EINVAL : A parameter is invalid. */ int fd_rt_out_unregister ( struct fd_rt_out_hdl * handler, void ** cbdata ); /*============================================================*/ /* EVENTS */ /*============================================================*/ struct fd_event { int code; /* codespace depends on the queue */ size_t size; void *data; }; /* Daemon's codespace: 1000->1999 (1500->1999 defined in fdcore-internal.h) */ enum { FDEV_TERMINATE_INT= 1000 /* request to terminate. DO NOT USE. Use fd_core_shutdown() instead. */ ,FDEV_TRIGGER /* Trigger available for extensions. size is sizeof(int), data is int * */ }; int fd_event_send(struct fifo *queue, int code, size_t datasz, void * data); int fd_event_get(struct fifo *queue, int * code, size_t * datasz, void ** data); int fd_event_timedget(struct fifo *queue, struct timespec * timeout, int timeoutcode, int * code, size_t * datasz, void ** data); void fd_event_destroy(struct fifo **queue, void (*free_cb)(void * data)); const char * fd_ev_str(int event); /* for extensions */ int fd_event_trig_regcb(int trigger_val, const char * module, void (*cb)(void)); #ifndef SWIG DECLARE_FD_DUMP_PROTOTYPE(fd_event_trig_dump); /* The "old" FD_EV_DUMP_* events are replaced with direct calls to the following dump functions */ DECLARE_FD_DUMP_PROTOTYPE(fd_conf_dump); DECLARE_FD_DUMP_PROTOTYPE(fd_ext_dump); #else /* SWIG */ DECLARE_FD_DUMP_PROTOTYPE_simple(fd_event_trig_dump); DECLARE_FD_DUMP_PROTOTYPE_simple(fd_conf_dump); DECLARE_FD_DUMP_PROTOTYPE_simple(fd_ext_dump); #endif /* SWIG */ DECLARE_FD_DUMP_PROTOTYPE(fd_servers_dump, int details); DECLARE_FD_DUMP_PROTOTYPE(fd_peer_dump_list, int details); DECLARE_FD_DUMP_PROTOTYPE(fd_peer_dump, struct peer_hdr * p, int details); /*============================================================*/ /* ENDPOINTS */ /*============================================================*/ struct fd_endpoint { struct fd_list chain; /* link in cnf_endpoints list */ union { sSS ss; /* the socket information. List is always ordered by ss value (memcmp) -- see fd_ep_add_merge */ sSA4 sin; sSA6 sin6; sSA sa; } #ifdef SWIG /* nested anonymous unions are not supported yet */ s #endif /* SWIG */ ; #define EP_FL_CONF (1 << 0) /* This endpoint is statically configured in a configuration file */ #define EP_FL_DISC (1 << 1) /* This endpoint was resolved from the Diameter Identity or other DNS query */ #define EP_FL_ADV (1 << 2) /* This endpoint was advertized in Diameter CER/CEA exchange */ #define EP_FL_LL (1 << 3) /* Lower layer mechanism provided this endpoint */ #define EP_FL_PRIMARY (1 << 4) /* This endpoint is primary in a multihomed SCTP association */ #define EP_ACCEPTALL (1 << 15) /* This flag allows bypassing the address filter in fd_ep_add_merge. */ uint32_t flags; /* Additional information about the endpoint */ /* To add: a validity timestamp for DNS records ? How do we retrieve this lifetime from DNS ? */ }; int fd_ep_add_merge( struct fd_list * list, sSA * sa, socklen_t sl, uint32_t flags ); int fd_ep_filter( struct fd_list * list, uint32_t flags ); int fd_ep_filter_family( struct fd_list * list, int af ); int fd_ep_clearflags( struct fd_list * list, uint32_t flags ); DECLARE_FD_DUMP_PROTOTYPE(fd_ep_dump_one, int preamble, struct fd_endpoint * ep ); DECLARE_FD_DUMP_PROTOTYPE(fd_ep_dump, int preamble, int indent, struct fd_list * eps ); /*============================================================*/ /* APPLICATIONS IDs */ /*============================================================*/ struct fd_app { struct fd_list chain; /* link in cnf_apps list. List ordered by appid. */ struct { unsigned auth : 1; unsigned acct : 1; } flags; vendor_id_t vndid; /* if not 0, Vendor-Specific-App-Id AVP will be used */ application_id_t appid; /* The identifier of the application */ }; int fd_app_merge(struct fd_list * list, application_id_t aid, vendor_id_t vid, int auth, int acct); int fd_app_check(struct fd_list * list, application_id_t aid, struct fd_app **detail); int fd_app_check_common(struct fd_list * list1, struct fd_list * list2, int * common_found); int fd_app_empty(struct fd_list * list); /*============================================================*/ /* MONITORING */ /*============================================================*/ /* These functions allow an extension to collect state information about the * framework, as well as being hooked at some key checkpoints in the processing * for logging or statistics purpose. */ /* CALLBACK: fd_hook_cb * * PARAMETERS: * type : The type of hook that triggered this call, in case same cb is registered for several hooks. * msg : If relevant, the pointer to the message triggering the call. NULL otherwise. * peer : If relevant, the pointer to the peer associated with the call. NULL otherwise. * other : For some callbacks, the remaining information is passed in this parameter. See each hook detail. * permsgdata : Structure associated with a given message, across several hooks. * A different structure is associated with requests and corresponding answers. * See fd_hook_data_hdl below for details. * If no fd_hook_data_hdl is registered with this callback, this parameter is always NULL * regdata : Data pointer stored at registration, opaque for the framework. * * DESCRIPTION: * When such callback is registered with fd_hook_register function, it will be called on matching events with * the parameters as described in the list of fd_hook_type below. One can use this mechanism for e.g.: * - log completely the messages for safety / backup * - create statistics information on the throughput * - ... * * IMPORTANT: the callback MUST NOT change the memory pointed by the different parameters (peer, message, ...) * * RETURN VALUE: * none. */ /* The available hooks in the framework */ enum fd_hook_type { HOOK_DATA_RECEIVED = 0, /* Hook called as soon as a message has been received from the network, after TLS & boundary processing. - {msg} is NULL. - {peer} is NULL. - {other} is a pointer to a struct fd_cnx_rcvdata containing the received buffer. - {permsgdata} points to either a new empty structure allocated for this message (cf. fd_hook_data_hdl), or NULL if no hdl is registered. */ HOOK_MESSAGE_RECEIVED, /* Hook called when a message has been received and the structure has been parsed successfully (list of AVPs). - {msg} points to the parsed message. At this time, the objects have not been dictionary resolved. If you try to call fd_msg_parse_dict, it will slow down the operation of a relay agent. - {peer} is set if the message is received from a peer's connection, and NULL if the message is from a new client connected and not yet identified - {other} is NULL, or a char * identifying the connection when {peer} is null. - {permsgdata} points to either a new empty structure allocated for this message or the one passed to HOOK_DATA_RECEIVED if used. */ HOOK_MESSAGE_LOCAL, /* Hook called when a request message has been created locally by an extension and is being sent. - {msg} points to the message. - {peer} is NULL - {other} is NULL - {permsgdata} points to a new empty structure allocated for this request (cf. fd_hook_data_hdl) */ HOOK_MESSAGE_SENDING, /* Hook called when a message is about to be sent to a peer. The message pointer cannot be modified here, but the content of the message could still be changed (for example add or remove some AVP. This is the last chance. - {msg} points to the message. Some objects may not have been dictionary resolved. If you try to call fd_msg_parse_dict, it will slow down the operation of the instance. - {peer} is the one the message is being sent to. - {other} is NULL. - {permsgdata} points to existing structure if any, or a new structure otherwise. */ HOOK_MESSAGE_SENT, /* Hook called when a message has been sent to a peer. The message might be freed as soon as the hook function returns, so it is not safe to store the pointer for asynchronous processing. - {msg} points to the sent message. Again, the objects may not have been dictionary resolved. If you try to call fd_msg_parse_dict, it will slow down the operation of a relay agent. - {peer} is set if the message is sent to a peer's connection, and NULL if the message is sent to a new client connected and not yet identified, or being rejected - {other} is NULL. - {permsgdata} points to existing structure if any, or a new structure otherwise. */ HOOK_MESSAGE_FAILOVER, /* Hook called when a message that was sent to a peer is being requeued, because e.g. the connection was torn down. In that case the message will go again through the routing process. - {msg} points to the corresponding request message (the answer is discarded). Again, the objects may not have been dictionary resolved. If you try to call fd_msg_parse_dict, it might slow down the operation of a relay agent, although this hook is not on the normal execution path. - {peer} is the peer this message was previously sent to. - {other} is NULL. - {permsgdata} points to existing structure if any, or a new structure otherwise. */ HOOK_MESSAGE_PARSING_ERROR, /* Hook called when a message being processed cannot be parsed successfully. - {msg} points to the message if buffer was parsed successfully, or NULL otherwise. You should not call fd_msg_parse_dict on this in any case. - {peer} is NULL or the peer that received the message. If NULL and the message is not NULL, you can still retrieve the source from the message itself. - {other} is a char * pointer to the error message (human-readable) if {msg} is not NULL, a pointer to struct fd_cnx_rcvdata containing the received buffer otherwise. - {permsgdata} points to existing structure associated with this message (or new structure if no previous hook was registered). */ HOOK_MESSAGE_ROUTING_ERROR, /* Hook called when a message being processed by the routing thread meets an error such as no remaining available peer for sending, based on routing callbacks decisions (maybe after retries). - {msg} points to the message. Again, the objects may not have been dictionary resolved. If you try to call fd_msg_parse_dict, it might slow down the operation of a relay agent, although this hook is not on the normal execution path. - {peer} is NULL. - {other} is a char * pointer to the error message (human-readable). - {permsgdata} points to existing structure associated with this message (or new structure if no previous hook was registered). */ HOOK_MESSAGE_ROUTING_FORWARD, /* Hook called when a received message is deemed to be not handled locally by the routing_dispatch process. The decision of knowing which peer it will be sent to is not made yet (or if an error will be returned). The hook is trigged before the callbacks registered with fd_rt_fwd_register are called. - {msg} points to the message. Again, the objects may not have been dictionary resolved. If you try to call fd_msg_parse_dict, it will slow down the operation of a relay agent. - {peer} is NULL. - {other} is NULL. - {permsgdata} points to existing structure associated with this message (or new structure if no previous hook was registered). */ HOOK_MESSAGE_ROUTING_LOCAL, /* Hook called when a received message is handled locally by the routing_dispatch process (i.e., not forwarded). The hook is trigged before the callbacks registered with fd_disp_register are called. - {msg} points to the message. Here, the message has been already parsed completely & successfully. - {peer} is NULL. - {other} is NULL. - {permsgdata} points to existing structure associated with this message (or new structure if no previous hook was registered). */ HOOK_MESSAGE_DROPPED, /* Hook called when a message is being discarded by the framework because of some error condition (normal or abnormal). It is probably a good idea to log this for analysis / backup. - {msg} points to the message, which will be freed as soon as the hook returns. - {peer} may be NULL or a peer related to the event. - {other} is a char * pointer to the error message (human-readable). - {permsgdata} points to existing structure associated with this message (or new structure if no previous hook was registered). */ HOOK_PEER_CONNECT_FAILED, /* Hook called when a connection attempt to/from a remote peer has failed. This hook is also called when the peer was in OPEN state and the connection is broken. - {msg} may be NULL (lower layer error, e.g. connection timeout) or points to a message showing the error (either invalid incoming message, or the CEA message sent or received with an error code). - {peer} may be NULL for incoming requests from unknown peers being rejected, otherwise it points to the peer structure associated with the attempt. - {other} is a char * pointer to the error message (human-readable). - {permsgdata} is always NULL for this hook. */ HOOK_PEER_CONNECT_SUCCESS, /* Hook called when a connection attempt to/from a remote peer has succeeded (the peer moves to OPEN_HANDSHAKE or OPEN state). In case of deprecated TLS handshake after the CER/CEA exchange, this hook can still be followed by HOOK_PEER_CONNECT_FAILED if TLS handshake fails. - {msg} points to the CEA message sent or received (with a success code) -- in case it is sent, you can always get access to the matching CER. - {peer} points to the peer structure. - {other} is NULL. - {permsgdata} is always NULL for this hook. */ HOOK_MESSAGE_PARSING_ERROR2, /* Hook called after an error message has been generated due to a dictionary parsing error. - {msg} points to the error message that has been generated. - {peer} is NULL. You can still retrieve the source from the message itself. - {other} is NULL - {permsgdata} points to existing structure associated with this message (or new structure if no previous hook was registered). Use this hook if you need to populate more data in the error being returned, from the error message. (e.g. some AVP need to be added to replies even if error case. */ #define HOOK_LAST HOOK_MESSAGE_PARSING_ERROR2 }; /* Type of the {permsgdata} pointer. It is up to each extension to define its own structure. This is opaque for the framework. */ struct fd_hook_permsgdata; /* A handle that will be associated with the extension, and with the permsgdata structures. */ struct fd_hook_data_hdl; /* The following structure is what is passed to the HOOK_DATA_RECEIVED hook */ struct fd_cnx_rcvdata { size_t length; uint8_t * buffer; /* internal note: the buffer is padded with a struct fd_msg_pmdl, not accounted for in length */ }; /* Function to register a new fd_hook_data_hdl. Should be called by your extension init function. * The arguments are the functions called to initialize a new fd_hook_permsgdata and to free this structure when the corresponding message is being freed. */ /* * FUNCTION: fd_hook_data_register * * PARAMETERS: * permsgdata_size : the size of the fd_hook_permsgdata structure. * permsgdata_init_cb : function called to initialize a new fd_hook_permsgdata structure, when a hook will be called for a message that does not have such structure yet. * The memory is already allocated and blanked, so you can pass NULL if no further handling is required. * permsgdata_fini_cb : function called when a message is being disposed. It should free the resources associated with the fd_hook_permsgdata. * You can pass NULL if no special handling is required. The memory of the permsgdata structure itself will be freed by the framework. * new_handle : On success, a handler to the registered callback is stored here. * This handler will be used to unregister the cb. * * DESCRIPTION: * Register a new fd_hook_data_hdl. This handle is used during hooks registration (see below) in order to associate data with the messages, to allow keeping tracking of the message easily. * Note that these handlers are statically allocated and cannot be unregistered. FD_HOOK_HANDLE_LIMIT handlers can be registered at maximum (recompile libfdproto if you change this value) * * RETURN VALUE: * 0 : The callback is registered. * EINVAL : A parameter is invalid. * ENOSPC : Too many handles already registered. You may need to increase the limit in the code. */ int fd_hook_data_register( size_t permsgdata_size, void (*permsgdata_init_cb) (struct fd_hook_permsgdata *), void (*permsgdata_fini_cb) (struct fd_hook_permsgdata *), struct fd_hook_data_hdl **new_handle ); /* A handler associated with a registered hook callback (for cleanup) */ struct fd_hook_hdl; /* Helper for building a mask of hooks for registration */ #define HOOK_MASK(hooklist...) fd_hook_mask_helper(0, ## hooklist, -1) /* * FUNCTION: fd_hook_register * * PARAMETERS: * type_mask : A bitmask of fd_hook_type bits for which this cb is registered, e.g. HOOK_MASK( HOOK_MESSAGE_RECEIVED, HOOK_MESSAGE_SENT ) * fd_hook_cb : The callback function to register (see prototype above). * regdata : Pointer to pass to the callback when it is called. The data is opaque to the daemon. * data_hdl : If permsgdata is requested for the hooks, a handler registered with fd_hook_data_register. NULL otherwise. * handler : On success, a handler to the registered callback is stored here. * This handler can be used to unregister the cb. * * DESCRIPTION: * Register a new hook in the framework. See explanations above. * * RETURN VALUE: * 0 : The callback is registered. * EEXIST : Another callback is already registered for this type of hook (HOOK_DATA_RECEIVED). * EINVAL : A parameter is invalid. * ENOMEM : Not enough memory to complete the operation */ int fd_hook_register ( uint32_t type_mask, void (*fd_hook_cb)(enum fd_hook_type type, struct msg * msg, struct peer_hdr * peer, void * other, struct fd_hook_permsgdata *pmd, void * regdata), void *regdata, struct fd_hook_data_hdl *data_hdl, struct fd_hook_hdl ** handler ); /* Remove a hook registration */ int fd_hook_unregister( struct fd_hook_hdl * handler ); /* Use the following function to retrieve any pmd structure associated with a request matching the current answer. Returns NULL in case of error / no such structure */ struct fd_hook_permsgdata * fd_hook_get_request_pmd(struct fd_hook_data_hdl *data_hdl, struct msg * answer); /* The following is used by HOOK_MASK macro */ uint32_t fd_hook_mask_helper(int dummy, ...); /*============================================================*/ /* * The following allows an extension to retrieve stat information on the different fifo queues involved in the freeDiameter framework. * There are three global queues, plus per-peer queues. * This information can be used to build SNMP-like data for example, or quickly get a status of the framework to find the loaded path of execution / bottlenecks. */ enum fd_stat_type { /* For the following, no peer is associated with the stat */ STAT_G_LOCAL= 1, /* Get statistics for the global queue of messages processed by local extensions */ STAT_G_INCOMING, /* Get statistics for the global queue of received messages to be processed by routing_in thread */ STAT_G_OUTGOING, /* Get statistics for the global queue of messages to be processed by routing_out thread */ /* For the following, the peer must be provided */ STAT_P_PSM, /* Peer state machine queue (events to be processed for this peer, including received messages) */ STAT_P_TOSEND, /* Queue of messages for sending to this peer */ }; /* * FUNCTION: fd_stat_getstats * * PARAMETERS: * stat : Which queue is being queried * peer : (depending on the stat parameter) which peer is being queried * current_count : (out) The number of items in the queue currently * limit_count : (out) The max number of items the queue accepts before becoming blocking -- 0 means no max. * highest_count : (out) The highest count the queue has reached since startup * total_count : (out) Total number of items that this queue has processed (always growing, use deltas for monitoring) * total : (out) Cumulated time all items spent in this queue, including blocking time (always growing, use deltas for monitoring) * blocking : (out) Cumulated time threads trying to post new items were blocked (queue full). * last : (out) For the last element retrieved from the queue, how long it took between posting (including blocking) and poping * * DESCRIPTION: * Get statistics information about a given queue. * Any of the (out) parameters can be NULL if not requested. * * RETURN VALUE: * 0 : The callback is registered. * EINVAL : A parameter is invalid. */ int fd_stat_getstats(enum fd_stat_type stat, struct peer_hdr * peer, int * current_count, int * limit_count, int * highest_count, long long * total_count, struct timespec * total, struct timespec * blocking, struct timespec * last); /*============================================================*/ /* EOF */ /*============================================================*/ #ifdef __cplusplus } #endif #endif /* _LIBFDCORE_H */ nextepc-0.3.10/lib/freeDiameter-1.2.1/include/freeDiameter/libfdproto.h000066400000000000000000003722341333553357400254220ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2015, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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 S_OUT OF THE USE OF THIS SOFTWARE, EVEN IF * * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * *********************************************************************************************************/ /* This file contains the definitions of functions and types used by the libfreeDiameter library. * * This library is meant to be used by both the freeDiameter daemon and its extensions. * It provides the tools to manipulate Diameter messages and related data. * This file should always be included as #include * * If any change is made to this file, you must increment the FD_PROJECT_VERSION_API version. * * The file contains the following parts: * DEBUG * MACROS * OCTET STRINGS * THREADS * LISTS * DICTIONARY * SESSIONS * MESSAGES * DISPATCH * QUEUES */ #ifndef _LIBFDPROTO_H #define _LIBFDPROTO_H #ifdef __cplusplus extern "C" { #endif #ifndef FD_IS_CONFIG #error "You must include 'freeDiameter-host.h' before this file." #endif /* FD_IS_CONFIG */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* for basename */ #ifdef SWIG #define _ATTRIBUTE_PRINTFLIKE_(_f,_v) #else #define _ATTRIBUTE_PRINTFLIKE_(_f,_v) __attribute__ ((format (printf, _f, _v))) #endif /* SWIG */ /* Remove some deprecated warnings from some gnutls versions, when possible */ #if defined(__GNUC__) # define GCC_DIAG_DO_PRAGMA(x) _Pragma (#x) # define GCC_DIAG_PRAGMA(x) GCC_DIAG_DO_PRAGMA(GCC diagnostic x) # if ((__GNUC__ * 100) + __GNUC_MINOR__) >= 406 /* 4.6.x */ # define GCC_DIAG_OFF(x) GCC_DIAG_PRAGMA(push) \ GCC_DIAG_PRAGMA(ignored x) # define GCC_DIAG_ON(x) GCC_DIAG_PRAGMA(pop) # else /* older */ # define GCC_DIAG_OFF(x) GCC_DIAG_PRAGMA(ignored x) # define GCC_DIAG_ON(x) GCC_DIAG_PRAGMA(warning x) # endif #else # define GCC_DIAG_OFF(x) # define GCC_DIAG_ON(x) #endif /*============================================================*/ /* CONSTANTS */ /*============================================================*/ #define DIAMETER_PORT 3868 #define DIAMETER_SECURE_PORT 5868 /*============================================================*/ /* INIT */ /*============================================================*/ /* This function must be called first, before any call to another library function */ int fd_libproto_init(void); /* note if you are using libfdcore, it handles this already */ /* Call this one when the application terminates, to destroy internal threads */ void fd_libproto_fini(void); /* Retrieve the version of the binary */ extern const char fd_libproto_version[]; /*============================================================*/ /* DEBUG */ /*============================================================*/ /* * FUNCTION: fd_log * * PARAMETERS: * loglevel : Integer, how important the message is. Valid values are macros FD_LOG_* * format : Same format string as in the printf function * ... : Same list as printf * * DESCRIPTION: * Write information to log. * The format and arguments may contain UTF-8 encoded data. The * output medium is expected to support this encoding. * * RETURN VALUE: * None. */ void fd_log ( int, const char *, ... ) _ATTRIBUTE_PRINTFLIKE_(2,3); #ifndef SWIG void fd_log_va( int, const char *, va_list); #endif /* SWIG */ /* these are internal objects of the debug facility, might be useful to control the behavior from outside */ extern pthread_mutex_t fd_log_lock; extern char * fd_debug_one_function; extern char * fd_debug_one_file; /* * FUNCTION: fd_log_threadname * * PARAMETERS: * name : \0-terminated string containing a name to identify the current thread. * * DESCRIPTION: * Name the current thread, useful for debugging multi-threaded problems. * * This function assumes that a global thread-specific key called "fd_log_thname" exists * in the address space of the current process. * * RETURN VALUE: * None. */ void fd_log_threadname ( const char * name ); extern pthread_key_t fd_log_thname; /* * FUNCTION: fd_log_time * * PARAMETERS: * ts : The timestamp to log, or NULL for "now" * buf : An array where the time must be stored * len : size of the buffer * incl_date : The day of year is included in the output * incl_ms : millisecond value is included in the output * * DESCRIPTION: * Writes the timestamp (in human readable format) in a buffer. * * RETURN VALUE: * pointer to buf. */ char * fd_log_time ( struct timespec * ts, char * buf, size_t len, int incl_date, int incl_ms ); /* * FUNCTION: fd_log_handler_register * MACRO: * * PARAMETERS: * loglevel : priority of the message * format : Same format string as in the printf function * va_list : Argument list * * DESCRIPTION: * Register an external method for logging purposes. * * RETURN VALUE: * int : Success or failure */ int fd_log_handler_register ( void (*logger)(int loglevel, const char * format, va_list args) ); /* * FUNCTION: fd_log_handler_unregister * MACRO: * * PARAMETERS: * * DESCRIPTION: * Unregister the external logging function. * * RETURN VALUE: * int : Success or failure */ int fd_log_handler_unregister ( void ); /* All dump functions follow this same prototype: * PARAMETERS: * buf : *buf can be NULL on entry, it will be malloc'd. Otherwise it is realloc'd if needed. * len : the current size of the buffer (in/out) * offset: (optional) if provided, starts writing dump at offset in the buffer, and updated upon exit. if NULL, starts at offset O. * * RETURN VALUE: * *buf upon success, NULL upon failure. * * REMARKS: * - After the buffer has been used, it should be freed. * - Depending on the function, the created string may be multi-line. However, it should never be terminated with a '\n'. */ #define DECLARE_FD_DUMP_PROTOTYPE( function_name, args... ) \ char * function_name(char ** buf, size_t *len, size_t *offset, ##args) #ifdef SWIG #define DECLARE_FD_DUMP_PROTOTYPE_simple( function_name ) \ char * function_name(char ** buf, size_t *len, size_t *offset) #endif /* SWIG */ /* Helper functions for the *dump functions that add into a buffer */ DECLARE_FD_DUMP_PROTOTYPE( fd_dump_extend, const char * format, ... ) _ATTRIBUTE_PRINTFLIKE_(4,5); DECLARE_FD_DUMP_PROTOTYPE( fd_dump_extend_hexdump, uint8_t *data, size_t datalen, size_t trunc, size_t wrap ); /* Some helpers macro for writing such *_dump routine */ #define FD_DUMP_STD_PARAMS buf, len, offset #define FD_DUMP_HANDLE_OFFSET() size_t o = 0; if (!offset) offset = &o; if (buf && (*buf) && !(*offset)) **buf='\0' #define FD_DUMP_HANDLE_TRAIL() while ((*buf) && (*offset > 0) && ((*buf)[*offset - 1] == '\n')) { *offset -= 1; (*buf)[*offset] = '\0'; } /*============================================================*/ /* DEBUG MACROS */ /*============================================================*/ #ifndef ASSERT #define ASSERT(x) assert(x) #endif /* ASSERT */ /* log levels definitions, that are passed to the logger */ #define FD_LOG_ANNOYING 0 /* very verbose loops and such "overkill" traces. Only active when the framework is compiled in DEBUG mode. */ #define FD_LOG_DEBUG 1 /* Get a detailed sense of what is going on in the framework. Use this level for normal debug */ #define FD_LOG_NOTICE 3 /* Normal execution states worth noting */ #define FD_LOG_ERROR 5 /* Recoverable or expected error conditions */ #define FD_LOG_FATAL 6 /* Unrecoverable error, e.g. malloc fail, etc. that requires the framework to shutdown */ /* The level used by the default logger, can be changed by command-line arguments. Ignored for other loggers. */ extern int fd_g_debug_lvl; /* Some portability code to get nice function name in __PRETTY_FUNCTION__ */ #if (!defined( __func__)) && (__STDC_VERSION__ < 199901L) # if __GNUC__ >= 2 # define __func__ __FUNCTION__ # else /* __GNUC__ >= 2 */ # define __func__ "" # endif /* __GNUC__ >= 2 */ #endif /*(!defined( __func__)) && (__STDC_VERSION__ < 199901L) */ #ifndef __PRETTY_FUNCTION__ #define __PRETTY_FUNCTION__ __func__ #endif /* __PRETTY_FUNCTION__ */ /* A version of __FILE__ without the full path. This is specific to each C file being compiled */ static char * file_bname = NULL; static char * file_bname_init(char * full) { file_bname = basename(full); return file_bname; } #define __STRIPPED_FILE__ (file_bname ?: file_bname_init((char *)__FILE__)) /* In DEBUG mode, we add meta-information along each trace. This makes multi-threading problems easier to debug. */ #if (defined(DEBUG) && defined(DEBUG_WITH_META)) # define STD_TRACE_FMT_STRING "pid:%s in %s@%s:%d: " # define STD_TRACE_FMT_ARGS , ((char *)pthread_getspecific(fd_log_thname) ?: "unnamed"), __PRETTY_FUNCTION__, __STRIPPED_FILE__, __LINE__ #else /* DEBUG && DEBUG_WITH_META */ # define STD_TRACE_FMT_STRING "" # define STD_TRACE_FMT_ARGS #endif /* DEBUG && DEBUG_WITH_META */ /************************* The general debug macro *************************/ #define LOG(printlevel,format,args... ) \ fd_log((printlevel), STD_TRACE_FMT_STRING format STD_TRACE_FMT_ARGS, ## args) /* * Use the following macros in the code to get traces with location & pid in debug mode: */ #ifdef DEBUG # define LOG_A(format,args... ) \ do { if ((fd_debug_one_function && !strcmp(fd_debug_one_function, __PRETTY_FUNCTION__)) \ || (fd_debug_one_file && !strcmp(fd_debug_one_file, __STRIPPED_FILE__) ) ) { \ LOG(FD_LOG_DEBUG,"[DBG_MATCH] " format,##args); \ } else { \ LOG(FD_LOG_ANNOYING,format,##args); \ } } while (0) #else /* DEBUG */ # define LOG_A(format,args... ) /* not defined in release */ #endif /* DEBUG */ /* Debug information useful to follow in detail what is going on */ #define LOG_D(format,args... ) \ LOG(FD_LOG_DEBUG, format, ##args) /* Report a normal message that is useful for normal admin monitoring */ #define LOG_N(format,args... ) \ LOG(FD_LOG_NOTICE, format,##args) /* Report an error */ #define LOG_E(format,args... ) \ LOG(FD_LOG_ERROR, format, ##args) /* Report a fatal error */ #define LOG_F(format,args... ) \ LOG(FD_LOG_FATAL, format, ##args) /************* Derivatives ************/ /* Trace a binary buffer content */ #define LOG_BUFFER(printlevel, prefix, buf, bufsz, suffix ) { \ int __i; \ size_t __sz = (size_t)(bufsz); \ uint8_t * __buf = (uint8_t *)(buf); \ char __strbuf[1024+1]; \ for (__i = 0; (__i < __sz) && (__i<(sizeof(__strbuf)/2)); __i++) { \ sprintf(__strbuf + (2 * __i), "%02hhx", __buf[__i]); \ } \ fd_log(printlevel, STD_TRACE_FMT_STRING "%s%s%s" STD_TRACE_FMT_ARGS, \ (prefix), __strbuf, (suffix)); \ } /* Split a multi-line buffer into separate calls to the LOG function. */ #define LOG_SPLIT(printlevel, per_line_prefix, mlbuf, per_line_suffix ) { \ char * __line = (mlbuf), *__next; \ char * __p = (per_line_prefix), *__s = (per_line_suffix); \ while ((__next = strchr(__line, '\n')) != NULL) { \ LOG(printlevel, "%s%.*s%s", __p ?:"", (int)(__next - __line), __line, __s ?:""); \ __line = __next + 1; \ } \ LOG(printlevel, "%s%s%s", __p ?:"", __line, __s ?:""); \ } /* Helper for function entry -- for very detailed trace of the execution */ #define TRACE_ENTRY(_format,_args... ) \ LOG_A("[enter] %s(" _format ") {" #_args "}", __PRETTY_FUNCTION__, ##_args ); /* Helper for debugging by adding traces -- for debuging a specific location of the code */ #define TRACE_HERE() \ LOG_F(" -- debug checkpoint %d -- ", fd_breakhere()); int fd_breakhere(void); /* Helper for tracing the CHECK_* macros below -- very very verbose code execution! */ #define TRACE_CALL( str... ) \ LOG_A( str ) /* For development only, to keep track of TODO locations in the code */ #ifndef ERRORS_ON_TODO # define TODO( _msg, _args... ) \ LOG_F( "TODO: " _msg , ##_args); #else /* ERRORS_ON_TODO */ # define TODO( _msg, _args... ) \ "TODO" = _msg ## _args; /* just a stupid compilation error to spot the todo */ #endif /* ERRORS_ON_TODO */ /*============================================================*/ /* ERROR CHECKING MACRO */ /*============================================================*/ /* Macros to check a return value and branch out in case of error. * These macro additionally provide the logging information. * * The name "__ret__" is always available in the __fallback__ parameter and contains the error code. */ #define CHECK_PRELUDE(__call__) \ int __ret__; \ TRACE_CALL("Check: %s", #__call__ ); \ __ret__ = (__call__) #define DEFAULT_FB return __ret__; /* System check: error case if < 0, error value in errno */ #define CHECK_SYS_GEN( faillevel, __call__, __fallback__ ) { \ CHECK_PRELUDE(__call__); \ if (__ret__ < 0) { \ __ret__ = errno; \ LOG(faillevel, "ERROR: in '%s' :\t%s", #__call__ , strerror(__ret__)); \ __fallback__; \ } \ } /* Check the return value of a function and execute fallback in case of error or special value */ #define CHECK_FCT_GEN2( faillevel, __call__, __speval__, __fallback1__, __fallback2__ ) { \ CHECK_PRELUDE(__call__); \ if (__ret__ != 0) { \ if (__ret__ == (__speval__)) { \ __fallback1__; \ } else { \ LOG(faillevel, "ERROR: in '%s' :\t%s", #__call__ , strerror(__ret__)); \ __fallback2__; \ } \ } \ } /* Check the return value of a function and execute fallback in case of error (return value different from 0) */ #define CHECK_FCT_GEN( faillevel, __call__, __fallback__) \ CHECK_FCT_GEN2( faillevel, (__call__), 0, , (__fallback__) ) /* Check that a memory allocator did not return NULL, otherwise log an error and execute fallback */ #define CHECK_MALLOC_GEN( faillevel, __call__, __fallback__ ) { \ void * __ptr__; \ TRACE_CALL("Check: %s", #__call__ ); \ __ptr__ = (void *)(__call__); \ if (__ptr__ == NULL) { \ int __ret__ = errno; \ LOG(faillevel, "ERROR: in '%s' :\t%s", #__call__ , strerror(__ret__)); \ __fallback__; \ } \ } /* Check parameters at function entry, execute fallback on error */ #define CHECK_PARAMS_GEN( faillevel, __bool__, __fallback__ ) { \ TRACE_CALL("Check: %s", #__bool__ ); \ if ( ! (__bool__) ) { \ int __ret__ = EINVAL; \ LOG(faillevel, "ERROR: invalid parameter '%s'", #__bool__ ); \ __fallback__; \ } \ } /*============================================================*/ /* COMPATIBILITY MACROS, TO BE REMOVED */ /*============================================================*/ /* Redefine the old macros for transition of the code */ #ifndef EXCLUDE_DEPRECATED #define MARK_DEPRECATED /* __attribute__ ((deprecated)) */ enum old_levels { NONE = 0, INFO = 1, FULL = 2, ANNOYING = 4, FCTS = 6, CALL = 9 } MARK_DEPRECATED; static __inline__ int old_TRACE_BOOL( enum old_levels level, const char * file, const char * func ) MARK_DEPRECATED { if ((fd_debug_one_function && !strcmp(fd_debug_one_function, func)) || (fd_debug_one_file && !strcmp(fd_debug_one_file, file) )) return 2; /* Level override */ if ((int)level <= fd_g_debug_lvl) return 1; /* Normal level */ return 0; /* No trace */ } #define TRACE_BOOL(level) old_TRACE_BOOL((level), __STRIPPED_FILE__, __PRETTY_FUNCTION__) #ifndef SWIG static __inline__ void fd_log_deprecated( int level, const char *format, ... ) MARK_DEPRECATED { va_list ap; va_start(ap, format); fd_log_va(level, format, ap); va_end(ap); } #else /* SWIG */ void fd_log_deprecated( int level, const char *format, ... ); #endif /* SWIG */ static __inline__ void replace_me() MARK_DEPRECATED { } #define TRACE_BUFFER(...) replace_me(); #define TRACE_NOTICE(...) replace_me(); /* Use the LOG_* instead, or use the new *_dump functions when dumping an object */ #define fd_log_debug(format,args...) fd_log_deprecated(FD_LOG_DEBUG, format, ## args) #define fd_log_notice(format,args...) fd_log_deprecated(FD_LOG_NOTICE, format, ## args) #define fd_log_error(format,args...) fd_log_deprecated(FD_LOG_ERROR, format, ## args) /* old macro for traces. To be replaced by appropriate LOG_* macros. */ # define TRACE_DEBUG(oldlevel, format,args... ) { \ int __l__; \ if ((__l__ = TRACE_BOOL(oldlevel))) { \ if (oldlevel <= NONE) { LOG_E(format,##args); } \ else if (oldlevel <= INFO) { LOG_N(format,##args); } \ else if (__l__ == 2) { LOG_N(format,##args); } \ else if (oldlevel <= FULL) { LOG_D(format,##args); } \ else { LOG_A(format,##args); } \ } } /* the following macro must be replaced with LOG_E or LOG_F */ # define TRACE_ERROR LOG_E /* The following macros are missing the faillevel information, which indicates at what log level the error case should be displayed. */ # define CHECK_SYS_DO( __call__, __fallback__ ) { \ CHECK_PRELUDE(__call__); \ if (__ret__ < 0) { \ __ret__ = errno; \ TRACE_ERROR("ERROR: in '%s' :\t%s", #__call__ , strerror(__ret__)); \ __fallback__; \ } \ } # define CHECK_SYS( __call__ ) \ CHECK_SYS_DO( (__call__), return __ret__ ) # define CHECK_POSIX_DO2( __call__, __speval__, __fallback1__, __fallback2__ ) { \ CHECK_PRELUDE(__call__); \ if (__ret__ != 0) { \ if (__ret__ == (__speval__)) { \ __fallback1__; \ } else { \ TRACE_ERROR("ERROR: in '%s' :\t%s", #__call__ , strerror(__ret__)); \ __fallback2__; \ } \ } \ } # define CHECK_POSIX_DO( __call__, __fallback__ ) \ CHECK_POSIX_DO2( (__call__), 0, , __fallback__ ) # define CHECK_POSIX( __call__ ) \ CHECK_POSIX_DO( (__call__), return __ret__ ) # define CHECK_MALLOC_DO( __call__, __fallback__ ) { \ void * __ptr__; \ TRACE_CALL("Check: %s", #__call__ ); \ __ptr__ = (void *)(__call__); \ if (__ptr__ == NULL) { \ int __ret__ = errno; \ TRACE_ERROR("ERROR: in '%s' :\t%s", #__call__ , strerror(__ret__)); \ __fallback__; \ } \ } # define CHECK_MALLOC( __call__ ) \ CHECK_MALLOC_DO( (__call__), return __ret__ ) # define CHECK_PARAMS_DO( __bool__, __fallback__ ) { \ TRACE_CALL("Check: %s", #__bool__ ); \ if ( ! (__bool__) ) { \ int __ret__ = EINVAL; \ TRACE_ERROR("ERROR: Invalid parameter '%s', %d", #__bool__, __ret__ ); \ __fallback__; \ } \ } # define CHECK_PARAMS( __bool__ ) \ CHECK_PARAMS_DO( (__bool__), return __ret__ ) # define CHECK_FCT_DO CHECK_POSIX_DO # define CHECK_FCT CHECK_POSIX #endif /* EXCLUDE_DEPRECATED */ /*============================================================*/ /* Optimized code: remove all debugging code */ /*============================================================*/ #ifdef STRIP_DEBUG_CODE #undef LOG_D #undef LOG_N #undef LOG_E #undef LOG_F #undef LOG_BUFFER #define LOG_D(format,args... ) /* noop */ #define LOG_N(format,args...) fd_log(FD_LOG_NOTICE, format, ## args) #define LOG_E(format,args...) fd_log(FD_LOG_ERROR, format, ## args) #define LOG_F(format,args...) fd_log(FD_LOG_FATAL, format, ## args) #define LOG_BUFFER(printlevel, level, prefix, buf, bufsz, suffix ) { \ if (printlevel > FD_LOG_DEBUG) { \ int __i; \ size_t __sz = (size_t)(bufsz); \ uint8_t * __buf = (uint8_t *)(buf); \ char * __strbuf[1024+1]; \ for (__i = 0; (__i < __sz) && (__i<(sizeof(__strbuf)/2); __i++) { \ sprintf(__strbuf + (2 * __i), "%02.2hhx", __buf[__i]); \ } \ fd_log(printlevel, prefix"%s"suffix, __strbuf); \ } #endif /* STRIP_DEBUG_CODE */ /*============================================================*/ /* OTHER MACROS */ /*============================================================*/ /* helper macros (pre-processor hacks to allow macro arguments) */ #define __tostr( arg ) #arg #define _stringize( arg ) __tostr( arg ) #define __agr( arg1, arg2 ) arg1 ## arg2 #define _aggregate( arg1, arg2 ) __agr( arg1, arg2 ) /* Some aliases to socket addresses structures */ #define sSS struct sockaddr_storage #define sSA struct sockaddr #define sSA4 struct sockaddr_in #define sSA6 struct sockaddr_in6 /* The sockaddr length of a sSS structure */ #define sSAlen( _sa_ ) \ ( (socklen_t) ( (((sSA *)_sa_)->sa_family == AF_INET) ? (sizeof(sSA4)) : \ ((((sSA *)_sa_)->sa_family == AF_INET6) ? (sizeof(sSA6)) : \ 0 ) ) ) #define sSAport( _sa_ ) \ ( (socklen_t) ( (((sSA *)_sa_)->sa_family == AF_INET) ? (((sSA4 *)(_sa_))->sin_port) : \ ((((sSA *)_sa_)->sa_family == AF_INET6) ? (((sSA6 *)(_sa_))->sin6_port) : \ 0 ) ) ) DECLARE_FD_DUMP_PROTOTYPE(fd_sa_dump, sSA * sa, int flags); #define sSA_DUMP_STRLEN (INET6_ADDRSTRLEN + 1 + 32 + 2) void fd_sa_sdump_numeric(char * buf /* must be at least sSA_DUMP_STRLEN */, sSA * sa); /* A l4 protocol name (TCP / SCTP) */ #ifdef DISABLE_SCTP #define IPPROTO_NAME( _proto ) \ (((_proto) == IPPROTO_TCP) ? "TCP" : \ "Unknown") #else /* DISABLE_SCTP */ #define IPPROTO_NAME( _proto ) \ ( ((_proto) == IPPROTO_TCP) ? "TCP" : \ (((_proto) == IPPROTO_SCTP) ? "SCTP" : \ "Unknown")) #endif /* DISABLE_SCTP */ /* Define the value of IP loopback address */ #ifndef INADDR_LOOPBACK #define INADDR_LOOPBACK inet_addr("127.0.0.1") #endif /* INADDR_LOOPBACK */ #ifndef INADDR_BROADCAST #define INADDR_BROADCAST ((in_addr_t) 0xffffffff) #endif /* INADDR_BROADCAST */ /* An IP equivalent to IN6_IS_ADDR_LOOPBACK */ #ifndef IN_IS_ADDR_LOOPBACK #define IN_IS_ADDR_LOOPBACK(a) \ ((((long int) (a)->s_addr) & ntohl(0xff000000)) == ntohl(0x7f000000)) #endif /* IN_IS_ADDR_LOOPBACK */ /* An IP equivalent to IN6_IS_ADDR_UNSPECIFIED */ #ifndef IN_IS_ADDR_UNSPECIFIED #define IN_IS_ADDR_UNSPECIFIED(a) \ (((long int) (a)->s_addr) == 0x00000000) #endif /* IN_IS_ADDR_UNSPECIFIED */ /* create a V4MAPPED address */ #define IN6_ADDR_V4MAP( a6, a4 ) { \ ((uint32_t *)(a6))[0] = 0; \ ((uint32_t *)(a6))[1] = 0; \ ((uint32_t *)(a6))[2] = htonl(0xffff); \ ((uint32_t *)(a6))[3] = (uint32_t)(a4); \ } /* Retrieve a v4 value from V4MAPPED address ( takes a s6_addr as param) */ #define IN6_ADDR_V4UNMAP( a6 ) \ (((in_addr_t *)(a6))[3]) /* We provide macros to convert 64 bit values to and from network byte-order, on systems where it is not already provided. */ #ifndef HAVE_NTOHLL /* Defined by the cmake step, if the ntohll symbol is defined on the system */ # if HOST_BIG_ENDIAN /* In big-endian systems, we don't have to change the values, since the order is the same as network */ # define ntohll(x) (x) # define htonll(x) (x) # else /* HOST_BIG_ENDIAN */ /* For these systems, we must reverse the bytes. Use ntohl and htonl on sub-32 blocs, and inverse these blocs. */ # define ntohll(x) (typeof (x))( (((uint64_t)ntohl( (uint32_t)(x))) << 32 ) | ((uint64_t) ntohl( ((uint64_t)(x)) >> 32 ))) # define htonll(x) (typeof (x))( (((uint64_t)htonl( (uint32_t)(x))) << 32 ) | ((uint64_t) htonl( ((uint64_t)(x)) >> 32 ))) # endif /* HOST_BIG_ENDIAN */ #endif /* HAVE_NTOHLL */ /* This macro will give the next multiple of 4 for an integer (used for padding sizes of AVP). */ #define PAD4(_x) ((_x) + ( (4 - (_x)) & 3 ) ) /* Useful to display any value as (safe) ASCII (will garbage UTF-8 output...) */ #define ASCII(_c) ( ((_c < 32) || (_c > 127)) ? ( _c ? '?' : ' ' ) : _c ) /* Compare timespec structures */ #define TS_IS_INFERIOR( ts1, ts2 ) \ ( ((ts1)->tv_sec < (ts2)->tv_sec ) \ || (((ts1)->tv_sec == (ts2)->tv_sec ) && ((ts1)->tv_nsec < (ts2)->tv_nsec) )) /* Compute diff between two timespecs (pointers) */ #define TS_DIFFERENCE( tsdiff, tsstart, tsend ) { \ if ((tsend)->tv_nsec < (tsstart)->tv_nsec ) { \ (tsdiff)->tv_sec = (tsend)->tv_sec - (tsstart)->tv_sec - 1; \ (tsdiff)->tv_nsec = (tsend)->tv_nsec + 1000000000 - (tsstart)->tv_nsec; \ } else { \ (tsdiff)->tv_sec = (tsend)->tv_sec - (tsstart)->tv_sec; \ (tsdiff)->tv_nsec = (tsend)->tv_nsec - (tsstart)->tv_nsec; \ }} /* This gives a good size for buffered reads */ #ifndef BUFSIZ #define BUFSIZ 96 #endif /* BUFSIZ */ /* This gives the length of a const string */ #define CONSTSTRLEN( str ) (sizeof(str) - 1) /*============================================================*/ /* PORTABILITY */ /*============================================================*/ #ifndef HAVE_CLOCK_GETTIME #define CLOCK_REALTIME 0 #include int clock_gettime(int clk_id, struct timespec* ts); #endif /* HAVE_CLOCK_GETTIME */ #ifndef HAVE_STRNDUP char * strndup (char *str, size_t len); #endif /* HAVE_STRNDUP */ /*============================================================*/ /* BINARY STRINGS */ /*============================================================*/ /* Compute a hash value of a binary string. The hash must remain local to this machine, there is no guarantee that same input will give same output on a different system (endianness) */ uint32_t fd_os_hash ( uint8_t * string, size_t len ); /* This type used for binary strings that contain no \0 except as their last character. It means some string operations can be used on it. */ typedef uint8_t * os0_t; /* Same as strdup but for os0_t strings */ os0_t os0dup_int(os0_t s, size_t l); #define os0dup( _s, _l) (void *)os0dup_int((os0_t)(_s), _l) /* Check that an octet string value can be used as os0_t */ static __inline__ int fd_os_is_valid_os0(uint8_t * os, size_t oslen) { /* The only situation where it is not valid is when it contains a \0 inside the octet string */ return (memchr(os, '\0', oslen) == NULL); } /* The following type denotes a verified DiameterIdentity value (that contains only pure letters, digits, hyphen, dot) */ typedef char * DiamId_t; /* Maximum length of a hostname we accept */ #ifndef HOST_NAME_MAX #define HOST_NAME_MAX 512 #endif /* HOST_NAME_MAX */ /* Check if a binary string contains a valid Diameter Identity value. rfc3588 states explicitely that such a Diameter Identity consists only of ASCII characters. */ int fd_os_is_valid_DiameterIdentity(uint8_t * os, size_t ossz); /* The following function validates a string as a Diameter Identity or applies the IDNA transformation on it if *inoutsz is != 0 on entry, *id may not be \0-terminated. memory has the following meaning: 0: *id can be realloc'd. 1: *id must be malloc'd on output (was static) */ int fd_os_validate_DiameterIdentity(char ** id, size_t * inoutsz, int memory); /* Create an order relationship for binary strings (not needed to be \0 terminated). It does NOT mimic strings relationships so that it is more efficient. It is case sensitive. (the strings are actually first ordered by their lengh, then by their bytes contents) returns: -1 if os1 < os2; +1 if os1 > os2; 0 if they are equal */ int fd_os_cmp_int(os0_t os1, size_t os1sz, os0_t os2, size_t os2sz); #define fd_os_cmp(_o1, _l1, _o2, _l2) fd_os_cmp_int((os0_t)(_o1), _l1, (os0_t)(_o2), _l2) /* A roughly case-insensitive variant, which actually only compares ASCII chars (0-127) in a case-insentitive maneer -- it does not support locales where a lowercase letter uses more space than upper case, such as -> ss It is slower than fd_os_cmp. Note that the result is NOT the same as strcasecmp !!! This function gives the same order as fd_os_cmp, except when it finds 2 strings to be equal. However this is not always sufficient: for example fd_os_cmp gives: "Ac" < "aB" < "aa" if you attempt to fd_os_almostcasesrch "Aa" you will actually have to go past "aB" which is > "Aa". Therefore you can use the maybefurther parameter. This parameter is 1 on return if os1 may have been stored further that os2 (assuming os2 values are ordered by fd_os_cmp) and 0 if we are sure that it is not the case. When looping through a list of fd_os_cmp classified values, this parameter must be used to stop looping, in addition to the comp result. */ int fd_os_almostcasesrch_int(uint8_t * os1, size_t os1sz, uint8_t * os2, size_t os2sz, int * maybefurther); #define fd_os_almostcasesrch(_o1, _l1, _o2, _l2, _mb) fd_os_almostcasesrch_int((os0_t)(_o1), _l1, (os0_t)(_o2), _l2, _mb) /* Analyze a DiameterURI and return its components. Return EINVAL if the URI is not valid. *diamid is malloc'd on function return and must be freed (it is processed by fd_os_validate_DiameterIdentity). *secure is 0 (no security) or 1 (security enabled) on return. *port is 0 (default) or a value in host byte order on return. *transport is 0 (default) or IPPROTO_* on return. *proto is 0 (default) or 'd' (diameter), 'r' (radius), or 't' (tacacs+) on return. */ int fd_os_parse_DiameterURI(uint8_t * uri, size_t urisz, DiamId_t * diamid, size_t * diamidlen, int * secure, uint16_t * port, int * transport, char *proto); /*============================================================*/ /* THREADS */ /*============================================================*/ /* Terminate a thread */ static __inline__ int fd_thr_term(pthread_t * th) { void * th_ret = NULL; CHECK_PARAMS(th); /* Test if it was already terminated */ if (*th == (pthread_t)NULL) return 0; /* Cancel the thread if it is still running - ignore error if it was already terminated */ (void) pthread_cancel(*th); /* Then join the thread */ CHECK_POSIX( pthread_join(*th, &th_ret) ); if (th_ret == PTHREAD_CANCELED) { TRACE_DEBUG(ANNOYING, "The thread %p was canceled", (void *)*th); } else { TRACE_DEBUG(CALL, "The thread %p returned %p", (void *)*th, th_ret); } /* Clean the location */ *th = (pthread_t)NULL; return 0; } /************* Cancelation cleanup handlers for common objects *************/ static __inline__ void fd_cleanup_mutex( void * mutex ) { CHECK_POSIX_DO( pthread_mutex_unlock((pthread_mutex_t *)mutex), /* */); } static __inline__ void fd_cleanup_rwlock( void * rwlock ) { CHECK_POSIX_DO( pthread_rwlock_unlock((pthread_rwlock_t *)rwlock), /* */); } static __inline__ void fd_cleanup_buffer( void * buffer ) { free(buffer); } static __inline__ void fd_cleanup_socket(void * sockptr) { if (sockptr && (*(int *)sockptr > 0)) { CHECK_SYS_DO( close(*(int *)sockptr), /* ignore */ ); *(int *)sockptr = -1; } } /*============================================================*/ /* LISTS */ /*============================================================*/ /* The following structure represents a chained list element */ struct fd_list { struct fd_list *next; /* next element in the list */ struct fd_list *prev; /* previous element in the list */ struct fd_list *head; /* head of the list */ void *o; /* additional pointer, used for any purpose (ex: start of the parent object) */ }; /* Initialize a list element */ #define FD_LIST_INITIALIZER( _list_name ) \ { .next = & _list_name, .prev = & _list_name, .head = & _list_name, .o = NULL } #define FD_LIST_INITIALIZER_O( _list_name, _obj ) \ { .next = & _list_name, .prev = & _list_name, .head = & _list_name, .o = _obj } void fd_list_init ( struct fd_list * list, void * obj ); /* Return boolean, true if the list is empty */ #define FD_IS_LIST_EMPTY( _list ) ((((struct fd_list *)(_list))->head == (_list)) && (((struct fd_list *)(_list))->next == (_list))) /* Insert an item in a list at known position */ void fd_list_insert_after ( struct fd_list * ref, struct fd_list * item ); void fd_list_insert_before ( struct fd_list * ref, struct fd_list * item ); /* Move all elements from a list at the end of another */ void fd_list_move_end(struct fd_list * ref, struct fd_list * senti); /* Insert an item in an ordered list -- ordering function must be provided. If duplicate object found, EEXIST and it is returned in ref_duplicate */ int fd_list_insert_ordered( struct fd_list * head, struct fd_list * item, int (*cmp_fct)(void *, void *), void ** ref_duplicate); /* Unlink an item from a list */ void fd_list_unlink ( struct fd_list * item ); /*============================================================*/ /* DICTIONARY */ /*============================================================*/ /* Structure that contains the complete dictionary definitions */ struct dictionary; /* Structure that contains a dictionary object */ struct dict_object; /* Types of object in the dictionary. */ enum dict_object_type { DICT_VENDOR = 1, /* Vendor */ DICT_APPLICATION, /* Diameter Application */ DICT_TYPE, /* AVP data type */ DICT_ENUMVAL, /* Named constant (value of an enumerated AVP type) */ DICT_AVP, /* AVP */ DICT_COMMAND, /* Diameter Command */ DICT_RULE /* a Rule for AVP in command or grouped AVP */ #define DICT_TYPE_MAX DICT_RULE }; /* Initialize a dictionary */ int fd_dict_init(struct dictionary ** dict); /* Destroy a dictionary */ int fd_dict_fini(struct dictionary ** dict); /* * FUNCTION: fd_dict_new * * PARAMETERS: * dict : Pointer to the dictionnary where the object is created * type : What kind of object must be created * data : pointer to the data for the object. * type parameter is used to determine the type of data (see below for detail). * parent : a reference to a parent object, if needed. * ref : upon successful creation, reference to new object is stored here if !null. * * DESCRIPTION: * Create a new object in the dictionary. * See following object sections in this header file for more information on data and parent parameters format. * * RETURN VALUE: * 0 : The object is created in the dictionary. * EINVAL : A parameter is invalid. * EEXIST : This object is already defined in the dictionary (with conflicting data). * If "ref" is not NULL, it points to the existing element on return. * (other standard errors may be returned, too, with their standard meaning. Example: * ENOMEM : Memory allocation for the new object element failed.) */ int fd_dict_new ( struct dictionary * dict, enum dict_object_type type, void * data, struct dict_object * parent, struct dict_object ** ref ); /* * FUNCTION: fd_dict_search * * PARAMETERS: * dict : Pointer to the dictionnary where the object is searched * type : type of object that is being searched * criteria : how the object must be searched. See object-related sections below for more information. * what : depending on criteria, the data that must be searched. * result : On successful return, pointer to the object is stored here. * retval : this value is returned if the object is not found and result is not NULL. * * DESCRIPTION: * Perform a search in the dictionary. * See the object-specific sections below to find how to look for each objects. * If the "result" parameter is NULL, the function is used to check if an object is in the dictionary. * Otherwise, a reference to the object is stored in result if found. * If result is not NULL and the object is not found, retval is returned (should be 0 or ENOENT usually) * * RETURN VALUE: * 0 : The object has been found in the dictionary, or *result is NULL. * EINVAL : A parameter is invalid. * ENOENT : No matching object has been found, and result was NULL. */ int fd_dict_search ( struct dictionary * dict, enum dict_object_type type, int criteria, const void * what, struct dict_object ** result, int retval ); /* Special case: get the generic error command object */ int fd_dict_get_error_cmd(struct dictionary * dict, struct dict_object ** obj); /* * FUNCTION: fd_dict_getval * * PARAMETERS: * object : Pointer to a dictionary object. * data : pointer to a structure to hold the data for the object. * The type is the same as "data" parameter in fd_dict_new function. * * DESCRIPTION: * Retrieve content of a dictionary object. * See following object sections in this header file for more information on data and parent parameters format. * * RETURN VALUE: * 0 : The content of the object has been retrieved. * EINVAL : A parameter is invalid. */ int fd_dict_getval ( struct dict_object * object, void * val); int fd_dict_gettype ( struct dict_object * object, enum dict_object_type * type); int fd_dict_getdict ( struct dict_object * object, struct dictionary ** dict); /* Debug functions */ DECLARE_FD_DUMP_PROTOTYPE(fd_dict_dump_object, struct dict_object * obj); DECLARE_FD_DUMP_PROTOTYPE(fd_dict_dump, struct dictionary * dict); /* Function to access full contents of the dictionary, see doc in dictionary.c */ int fd_dict_getlistof(int criteria, void * parent, struct fd_list ** sentinel); /* Function to remove an entry from the dictionary. This cannot be used if the object has children (for example a vendor with vendor-specific AVPs). In such case, the children must be removed first. */ int fd_dict_delete(struct dict_object * obj); /* *************************************************************************** * * Vendor object * * These types are used to manage vendors in the dictionary * *************************************************************************** */ /* Type to hold a Vendor ID: "SMI Network Management Private Enterprise Codes" (RFC3232) */ typedef uint32_t vendor_id_t; /* Type to hold data associated to a vendor */ struct dict_vendor_data { vendor_id_t vendor_id; /* ID of a vendor */ char * vendor_name; /* The name of this vendor */ }; /* The criteria for searching a vendor object in the dictionary */ enum { VENDOR_BY_ID = 10, /* "what" points to a vendor_id_t */ VENDOR_BY_NAME, /* "what" points to a char * */ VENDOR_OF_APPLICATION, /* "what" points to a struct dict_object containing an application (see below) */ VENDOR_OF_AVP, /* "what" points to a struct dict_object containing an avp (see below) */ }; /*** * API usage : Note: the value of "vendor_name" is copied when the object is created, and the string may be disposed afterwards. On the other side, when value is retrieved with dict_getval, the string is not copied and MUST NOT be freed. It will be freed automatically along with the object itself with call to dict_fini later. - fd_dict_new: The "parent" parameter is not used for vendors. Sample code to create a vendor: { int ret; struct dict_object * myvendor; struct dict_vendor_data myvendordata = { 23455, "my vendor name" }; -- just an example... ret = fd_dict_new ( dict, DICT_VENDOR, &myvendordata, NULL, &myvendor ); } - fd_dict_search: Sample codes to look for a vendor object, by its id or name: { int ret; struct dict_object * vendor_found; vendor_id_t vendorid = 23455; ret = fd_dict_search ( dict, DICT_VENDOR, VENDOR_BY_ID, &vendorid, &vendor_found, ENOENT); - or - ret = fd_dict_search ( dict, DICT_VENDOR, VENDOR_BY_NAME, "my vendor name", &vendor_found, ENOENT); } - fd_dict_getval: Sample code to retrieve the data from a vendor object: { int ret; struct dict_object * myvendor; struct dict_vendor_data myvendordata; ret = fd_dict_search ( dict, DICT_VENDOR, VENDOR_BY_NAME, "my vendor name", &myvendor, ENOENT); ret = fd_dict_getval ( myvendor, &myvendordata ); printf("my vendor id: %d\n", myvendordata.vendor_id ); } */ /* Special function: */ uint32_t * fd_dict_get_vendorid_list(struct dictionary * dict); /* *************************************************************************** * * Application object * * These types are used to manage Diameter applications in the dictionary * *************************************************************************** */ /* Type to hold a Diameter application ID: IANA assigned value for this application. */ typedef uint32_t application_id_t; /* Type to hold data associated to an application */ struct dict_application_data { application_id_t application_id; /* ID of the application */ char * application_name; /* The name of this application */ }; /* The criteria for searching an application object in the dictionary */ enum { APPLICATION_BY_ID = 20, /* "what" points to a application_id_t */ APPLICATION_BY_NAME, /* "what" points to a char * */ APPLICATION_OF_TYPE, /* "what" points to a struct dict_object containing a type object (see below) */ APPLICATION_OF_COMMAND /* "what" points to a struct dict_object containing a command (see below) */ }; /*** * API usage : The "parent" parameter of dict_new may point to a vendor object to inform of what vendor defines the application. for standard-track applications, the "parent" parameter should be NULL. The vendor associated to an application is retrieved with VENDOR_OF_APPLICATION search criteria on vendors. - fd_dict_new: Sample code for application creation: { int ret; struct dict_object * vendor; struct dict_object * appl; struct dict_vendor_data vendor_data = { 23455, "my vendor name" }; struct dict_application_data app_data = { 9789, "my vendor's application" }; ret = fd_dict_new ( dict, DICT_VENDOR, &vendor_data, NULL, &vendor ); ret = fd_dict_new ( dict, DICT_APPLICATION, &app_data, vendor, &appl ); } - fd_dict_search: Sample code to retrieve the vendor of an application { int ret; struct dict_object * vendor, * appli; ret = fd_dict_search ( dict, DICT_APPLICATION, APPLICATION_BY_NAME, "my vendor's application", &appli, ENOENT); ret = fd_dict_search ( dict, DICT_VENDOR, VENDOR_OF_APPLICATION, appli, &vendor, ENOENT); } - fd_dict_getval: Sample code to retrieve the data from an application object: { int ret; struct dict_object * appli; struct dict_application_data appl_data; ret = fd_dict_search ( dict, DICT_APPLICATION, APPLICATION_BY_NAME, "my vendor's application", &appli, ENOENT); ret = fd_dict_getval ( appli, &appl_data ); printf("my application id: %s\n", appl_data.application_id ); } */ /* *************************************************************************** * * Type object * * These types are used to manage AVP data types in the dictionary * *************************************************************************** */ /* Type to store any AVP value */ union avp_value { struct { uint8_t *data; /* bytes buffer */ size_t len; /* length of the data buffer */ } os; /* Storage for an octet string */ int32_t i32; /* integer 32 */ int64_t i64; /* integer 64 */ uint32_t u32; /* unsigned 32 */ uint64_t u64; /* unsigned 64 */ float f32; /* float 32 */ double f64; /* float 64 */ }; /* These are the basic AVP types defined in RFC3588bis */ enum dict_avp_basetype { AVP_TYPE_GROUPED, AVP_TYPE_OCTETSTRING, AVP_TYPE_INTEGER32, AVP_TYPE_INTEGER64, AVP_TYPE_UNSIGNED32, AVP_TYPE_UNSIGNED64, AVP_TYPE_FLOAT32, AVP_TYPE_FLOAT64 #define AVP_TYPE_MAX AVP_TYPE_FLOAT64 }; /* Callbacks that can be associated with a derived type to easily interpret the AVP value. */ /* * CALLBACK: dict_avpdata_interpret * * PARAMETERS: * val : Pointer to the AVP value that must be interpreted. * interpreted : The result of interpretation is stored here. The format and meaning depends on each type. * * DESCRIPTION: * This callback can be provided with a derived type in order to facilitate the interpretation of formated data. * For example, when an AVP of type "Address" is received, it can be used to convert the octetstring into a struct sockaddr. * This callback is not called directly, but through the message's API msg_avp_value_interpret function. * * RETURN VALUE: * 0 : Operation complete. * !0 : An error occurred, the error code is returned. */ typedef int (*dict_avpdata_interpret) (union avp_value * value, void * interpreted); /* * CALLBACK: dict_avpdata_encode * * PARAMETERS: * data : The formated data that must be stored in the AVP value. * val : Pointer to the AVP value storage area where the data must be stored. * * DESCRIPTION: * This callback can be provided with a derived type in order to facilitate the encoding of formated data. * For example, it can be used to convert a struct sockaddr in an AVP value of type Address. * This callback is not called directly, but through the message's API msg_avp_value_encode function. * If the callback is defined for an OctetString based type, the created string must be malloc'd. free will be called * automatically later. * * RETURN VALUE: * 0 : Operation complete. * !0 : An error occurred, the error code is returned. */ typedef int (*dict_avpdata_encode) (void * data, union avp_value * val); /* * CALLBACK: dict_avpdata_check * * PARAMETERS: * val : Pointer to the AVP value that was received and needs to be sanity checked. * data : a parameter stored in the type structure (to enable more generic check functions) * error_msg: upon erroneous value, a string describing the error can be returned here (it will be strcpy by caller). This description will be returned in the error message, if any. * * DESCRIPTION: * This callback can be provided with a derived type in order to improve the operation of the * fd_msg_parse_dict function. When this callback is present, the value of the AVP that has * been parsed is passed to this function for finer granularity check. For example for some * speccific AVP, the format of an OCTETSTRING value can be further checked, or the * interger value can be verified. * * RETURN VALUE: * 0 : The value is valid. * !0 : An error occurred, the error code is returned. It is advised to return EINVAL on incorrect val */ typedef int (*dict_avpdata_check) (void * data, union avp_value * val, char ** error_msg); /* Type to hold data associated to a derived AVP data type */ struct dict_type_data { enum dict_avp_basetype type_base; /* How the data of such AVP must be interpreted */ char * type_name; /* The name of this type */ dict_avpdata_interpret type_interpret;/* cb to convert the AVP value in more comprehensive format (or NULL) */ dict_avpdata_encode type_encode; /* cb to convert formatted data into an AVP value (or NULL) */ DECLARE_FD_DUMP_PROTOTYPE((*type_dump), union avp_value * val); /* cb called by fd_msg_dump_* for this type of data (if != NULL). Returned string must be freed. */ dict_avpdata_check type_check; void * type_check_param; }; /* The criteria for searching a type object in the dictionary */ enum { TYPE_BY_NAME = 30, /* "what" points to a char * */ TYPE_OF_ENUMVAL, /* "what" points to a struct dict_object containing an enumerated constant (DICT_ENUMVAL, see below). */ TYPE_OF_AVP /* "what" points to a struct dict_object containing an AVP object. */ }; /**** Callbacks defined in libfdproto/dictionary_functions.c file -- see that file for usage. */ /* Convert an Address type AVP into a struct sockaddr_storage */ int fd_dictfct_Address_encode(void * data, union avp_value * avp_value); int fd_dictfct_Address_interpret(union avp_value * avp_value, void * interpreted); DECLARE_FD_DUMP_PROTOTYPE(fd_dictfct_Address_dump, union avp_value * avp_value); /* Display the content of an AVP of type UTF8String in the log file */ DECLARE_FD_DUMP_PROTOTYPE(fd_dictfct_UTF8String_dump, union avp_value * avp_value); /* For Time AVPs, map with time_t value directly */ int fd_dictfct_Time_encode(void * data, union avp_value * avp_value); int fd_dictfct_Time_interpret(union avp_value * avp_value, void * interpreted); DECLARE_FD_DUMP_PROTOTYPE(fd_dictfct_Time_dump, union avp_value * avp_value); /* For string AVP, the following type_check function provides simple basic check for specific characters presence, e.g. use "@." for trivial email address check */ int fd_dictfct_CharInOS_check(void * data, union avp_value * val, char ** error_msg); /****/ /*** * API usage : - fd_dict_new: The "parent" parameter may point to an application object, when a type is defined by a Diameter application. Sample code: { int ret; struct dict_object * mytype; struct dict_type_data mytypedata = { AVP_TYPE_OCTETSTRING, "Address", NULL, NULL }; ret = fd_dict_new ( dict, DICT_TYPE, &mytypedata, NULL, &mytype ); } - fd_dict_search: Sample code: { int ret; struct dict_object * address_type; ret = fd_dict_search ( dict, DICT_TYPE, TYPE_BY_NAME, "Address", &address_type, ENOENT); } */ /* *************************************************************************** * * Enumerated values object * * These types are used to manage named constants of some AVP, * for enumerated types. freeDiameter allows constants for types others than Unsigned32 * *************************************************************************** */ /* Type to hold data of named constants for AVP */ struct dict_enumval_data { char * enum_name; /* The name of this constant */ union avp_value enum_value; /* Value of the constant. Union term depends on parent type's base type. */ }; /* The criteria for searching a constant in the dictionary */ enum { ENUMVAL_BY_STRUCT = 40, /* "what" points to a struct dict_enumval_request as defined below */ ENUMVAL_BY_NAME, /* This cannot be used for researches */ ENUMVAL_BY_VALUE /* This cannot be used for researches */ }; struct dict_enumval_request { /* Identifier of the parent type, one of the following must not be NULL */ struct dict_object *type_obj; char * type_name; /* Search criteria for the constant */ struct dict_enumval_data search; /* search.enum_value is used only if search.enum_name == NULL */ }; /*** * API usage : - fd_dict_new: The "parent" parameter must point to a derived type object. Sample code to create a type "Boolean" with two constants "True" and "False": { int ret; struct dict_object * type_boolean; struct dict_type_data type_boolean_data = { AVP_TYPE_INTEGER32, "Boolean", NULL, NULL }; struct dict_enumval_data boolean_false = { .enum_name="False", .enum_value.i32 = 0 }; struct dict_enumval_data boolean_true = { .enum_name="True", .enum_value.i32 = -1 }; ret = fd_dict_new ( dict, DICT_TYPE, &type_boolean_data, NULL, &type_boolean ); ret = fd_dict_new ( dict, DICT_ENUMVAL, &boolean_false, type_boolean, NULL ); ret = fd_dict_new ( dict, DICT_ENUMVAL, &boolean_true , type_boolean, NULL ); } - fd_dict_search: Sample code to look for a constant name, by its value: { int ret; struct dict_object * value_found; struct dict_enumval_request boolean_by_value = { .type_name = "Boolean", .search.enum_name=NULL, .search.enum_value.i32 = -1 }; ret = fd_dict_search ( dict, DICT_ENUMVAL, ENUMVAL_BY_STRUCT, &boolean_by_value, &value_found, ENOENT); } - fd_dict_getval: Sample code to retrieve the data from a constant object: { int ret; struct dict_object * value_found; struct dict_enumval_data boolean_data = NULL; struct dict_enumval_request boolean_by_value = { .type_name = "Boolean", .search.enum_name=NULL, .search.enum_value.i32 = 0 }; ret = fd_dict_search ( dict, DICT_ENUMVAL, ENUMVAL_BY_STRUCT, &boolean_by_value, &value_found, ENOENT); ret = fd_dict_getval ( value_found, &boolean_data ); printf(" Boolean with value 0: %s", boolean_data.enum_name ); } */ /* *************************************************************************** * * AVP object * * These objects are used to manage AVP definitions in the dictionary * *************************************************************************** */ /* Type to hold an AVP code. For vendor 0, these codes are assigned by IANA. Otherwise, it is managed by the vendor */ typedef uint32_t avp_code_t; /* Values of AVP flags */ #define AVP_FLAG_VENDOR 0x80 #define AVP_FLAG_MANDATORY 0x40 #define AVP_FLAG_RESERVED3 0x20 #define AVP_FLAG_RESERVED4 0x10 #define AVP_FLAG_RESERVED5 0x08 #define AVP_FLAG_RESERVED6 0x04 #define AVP_FLAG_RESERVED7 0x02 #define AVP_FLAG_RESERVED8 0x01 /* For dumping flags and values */ #define DUMP_AVPFL_str "%c%c%s%s%s%s%s%s" #define DUMP_AVPFL_val(_val) (_val & AVP_FLAG_VENDOR)?'V':'-' , (_val & AVP_FLAG_MANDATORY)?'M':'-', \ (_val & AVP_FLAG_RESERVED3)?"3":"", (_val & AVP_FLAG_RESERVED4)?"4":"", \ (_val & AVP_FLAG_RESERVED5)?"5":"", (_val & AVP_FLAG_RESERVED6)?"6":"", (_val & AVP_FLAG_RESERVED7)?"7":"", (_val & AVP_FLAG_RESERVED8)?"8":"" /* Type to hold data associated to an avp */ struct dict_avp_data { avp_code_t avp_code; /* Code of the avp */ vendor_id_t avp_vendor; /* Vendor of the AVP, or 0 */ char * avp_name; /* Name of this AVP */ uint8_t avp_flag_mask; /* Mask of fixed AVP flags */ uint8_t avp_flag_val; /* Values of the fixed flags */ enum dict_avp_basetype avp_basetype; /* Basic type of data found in the AVP */ }; /* The criteria for searching an avp object in the dictionary */ enum { AVP_BY_CODE = 50, /* "what" points to an avp_code_t, vendor is always 0 */ AVP_BY_NAME, /* "what" points to a char *, vendor is always 0 */ AVP_BY_NAME_ALL_VENDORS,/* "what" points to a string. Might be quite slow... */ AVP_BY_STRUCT, /* "what" points to a struct dict_avp_request_ex (see below) */ /* kept for backward compatibility, better use AVP_BY_STRUCT above instead */ AVP_BY_CODE_AND_VENDOR, /* "what" points to a struct dict_avp_request (see below), where avp_vendor and avp_code are set */ AVP_BY_NAME_AND_VENDOR /* "what" points to a struct dict_avp_request (see below), where avp_vendor and avp_name are set */ }; /* Struct used for some researchs */ struct dict_avp_request_ex { struct { /* Only one of the following fields must be set. */ struct dict_object * vendor; /* most efficient if already known, set to NULL to ignore */ vendor_id_t vendor_id; /* set to 0 to ignore -- prefer AVP_BY_CODE or AVP_BY_NAME for vendor 0 */ const char * vendor_name; /* set to NULL to ignore */ } avp_vendor; struct { /* Only one of the following fields must be set */ avp_code_t avp_code; /* set to 0 to ignore */ const char * avp_name; /* set to NULL to ignore */ } avp_data; }; struct dict_avp_request { vendor_id_t avp_vendor; avp_code_t avp_code; char * avp_name; }; /*** * API usage : If "parent" parameter is not NULL during AVP creation, it must point to a DICT_TYPE object. The extended type is then attached to the AVP. In case where it is an enumerated type, the value of AVP is automatically interpreted in debug messages, and in message checks. The derived type of an AVP can be retrieved with: dict_search ( DICT_TYPE, TYPE_OF_AVP, avp, ... ) To create the rules (ABNF) for children of Grouped AVP, see the DICT_RULE related part. - fd_dict_new: Sample code for AVP creation: { int ret; struct dict_object * user_name_avp; struct dict_object * boolean_type; struct dict_object * sample_boolean_avp; struct dict_avp_data user_name_data = { 1, // code 0, // vendor "User-Name", // name AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, // fixed mask: V and M values must always be defined as follow. other flags can be set or cleared AVP_FLAG_MANDATORY, // the V flag must be cleared, the M flag must be set. AVP_TYPE_OCTETSTRING // User-Name AVP contains OctetString data (further precision such as UTF8String can be given with a parent derived type) }; struct dict_avp_data sample_boolean_data = { 31337, 23455, "Sample-Boolean", AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, AVP_FLAG_VENDOR, AVP_TYPE_INTEGER32 // This MUST be the same as parent type's }; -- Create an AVP with a base type -- ret = fd_dict_new ( dict, DICT_AVP, &user_name_data, NULL, &user_name_avp ); -- Create an AVP with a derived type -- ret = fd_dict_search ( dict, DICT_TYPE, TYPE_BY_NAME, "Boolean", &boolean_type, ENOENT); ret = fd_dict_new ( dict, DICT_AVP, &sample_boolean_data , boolean_type, &sample_boolean_avp ); } - fd_dict_search: Sample code to look for an AVP { int ret; struct dict_object * avp_username; struct dict_object * avp_sampleboolean; struct dict_avp_request avpvendorboolean = { .avp_vendor = 23455, .avp_name = "Sample-Boolean" }; ret = fd_dict_search ( dict, DICT_AVP, AVP_BY_NAME, "User-Name", &avp_username, ENOENT); ret = fd_dict_search ( dict, DICT_AVP, AVP_BY_NAME_AND_VENDOR, &avpvendorboolean, &avp_sampleboolean, ENOENT); -- this would also work, but be slower, because it has to search all vendor dictionaries -- ret = fd_dict_search ( dict, DICT_AVP, AVP_BY_NAME_ALL_VENDORS, "Sample-Boolean", &avp_sampleboolean, ENOENT); } - fd_dict_getval: Sample code to retrieve the data from an AVP object: { int ret; struct dict_object * avp_username; struct dict_avp_data user_name_data; ret = fd_dict_search ( dict, DICT_AVP, AVP_BY_NAME, "User-Name", &avp_username, ENOENT); ret = fd_dict_getval ( avp_username, &user_name_data ); printf("User-Name code: %d\n", user_name_data.avp_code ); } */ /* *************************************************************************** * * Command object * * These types are used to manage commands objects in the dictionary * *************************************************************************** */ /* Type to hold a Diameter command code: IANA assigned values. 0x0-0x7fffff=standard, 0x800000-0xfffffd=vendors, 0xfffffe-0xffffff=experimental */ typedef uint32_t command_code_t; /* Values of command flags */ #define CMD_FLAG_REQUEST 0x80 #define CMD_FLAG_PROXIABLE 0x40 #define CMD_FLAG_ERROR 0x20 #define CMD_FLAG_RETRANSMIT 0x10 #define CMD_FLAG_RESERVED5 0x08 #define CMD_FLAG_RESERVED6 0x04 #define CMD_FLAG_RESERVED7 0x02 #define CMD_FLAG_RESERVED8 0x01 /* For dumping flags and values */ #define DUMP_CMDFL_str "%c%c%c%c%s%s%s%s" #define DUMP_CMDFL_val(_val) (_val & CMD_FLAG_REQUEST)?'R':'-' , (_val & CMD_FLAG_PROXIABLE)?'P':'-' , (_val & CMD_FLAG_ERROR)?'E':'-' , (_val & CMD_FLAG_RETRANSMIT)?'T':'-', \ (_val & CMD_FLAG_RESERVED5)?"5":"", (_val & CMD_FLAG_RESERVED6)?"6":"", (_val & CMD_FLAG_RESERVED7)?"7":"", (_val & CMD_FLAG_RESERVED8)?"8":"" /* Type to hold data associated to a command */ struct dict_cmd_data { command_code_t cmd_code; /* code of the command */ char * cmd_name; /* Name of the command */ uint8_t cmd_flag_mask; /* Mask of fixed-value flags */ uint8_t cmd_flag_val; /* values of the fixed flags */ }; /* The criteria for searching an avp object in the dictionary */ enum { CMD_BY_NAME = 60, /* "what" points to a char * */ CMD_BY_CODE_R, /* "what" points to a command_code_t. The "Request" command is returned. */ CMD_BY_CODE_A, /* "what" points to a command_code_t. The "Answer" command is returned. */ CMD_ANSWER /* "what" points to a struct dict_object of a request command. The corresponding "Answer" command is returned. */ }; /*** * API usage : The "parent" parameter of dict_new may point to an application object to inform of what application defines the command. The application associated to a command is retrieved with APPLICATION_OF_COMMAND search criteria on applications. To create the rules for children of commands, see the DICT_RULE related part. Note that the "Request" and "Answer" commands are two independant objects. This allows to have different rules for each. - fd_dict_new: Sample code for command creation: { int ret; struct dict_object * cer; struct dict_object * cea; struct dict_cmd_data ce_data = { 257, // code "Capabilities-Exchange-Request", // name CMD_FLAG_REQUEST, // mask CMD_FLAG_REQUEST // value. Only the "R" flag is constrained here, set. }; ret = fd_dict_new (dict, DICT_COMMAND, &ce_data, NULL, &cer ); ce_data.cmd_name = "Capabilities-Exchange-Answer"; ce_data.cmd_flag_val = 0; // Same constraint on "R" flag, but this time it must be cleared. ret = fd_dict_new ( dict, DICT_COMMAND, &ce_data, NULL, &cea ); } - fd_dict_search: Sample code to look for a command { int ret; struct dict_object * cer, * cea; command_code_t code = 257; ret = fd_dict_search ( dict, DICT_COMMAND, CMD_BY_NAME, "Capabilities-Exchange-Request", &cer, ENOENT); ret = fd_dict_search ( dict, DICT_COMMAND, CMD_BY_CODE_R, &code, &cer, ENOENT); } - fd_dict_getval: Sample code to retrieve the data from a command object: { int ret; struct dict_object * cer; struct dict_object * cea; struct dict_cmd_data cea_data; ret = fd_dict_search ( dict, DICT_COMMAND, CMD_BY_NAME, "Capabilities-Exchange-Request", &cer, ENOENT); ret = fd_dict_search ( dict, DICT_COMMAND, CMD_ANSWER, cer, &cea, ENOENT); ret = fd_dict_getval ( cea, &cea_data ); printf("Answer to CER: %s\n", cea_data.cmd_name ); } */ /* *************************************************************************** * * Rule object * * These objects are used to manage rules in the dictionary (ABNF implementation) * This is used for checking messages validity (more powerful than a DTD) * *************************************************************************** */ /* This defines the kind of rule that is defined */ enum rule_position { RULE_FIXED_HEAD = 1, /* The AVP must be at the head of the group. The rule_order field is used to specify the position. */ RULE_REQUIRED, /* The AVP must be present in the parent, but its position is not defined. */ RULE_OPTIONAL, /* The AVP may be present in the message. Used to specify a max number of occurences for example */ RULE_FIXED_TAIL /* The AVP must be at the end of the group. The rule_order field is used to specify the position. */ }; /* Content of a RULE object data */ struct dict_rule_data { struct dict_object *rule_avp; /* Pointer to the AVP object that is concerned by this rule */ enum rule_position rule_position; /* The position in which the rule_avp must appear in the parent */ unsigned rule_order; /* for RULE_FIXED_* rules, the place. 1,2,3.. for HEAD rules; ...,3,2,1 for TAIL rules. */ int rule_min; /* Minimum number of occurences. -1 means "default": 0 for optional rules, 1 for other rules */ int rule_max; /* Maximum number of occurences. -1 means no maximum. 0 means the AVP is forbidden. */ }; /* The criteria for searching a rule in the dictionary */ enum { RULE_BY_AVP_AND_PARENT = 70 /* "what" points to a struct dict_rule_request -- see below. This is used to query "what is the rule for this AVP in this group?" */ }; /* Structure for querying the dictionary about a rule */ struct dict_rule_request { struct dict_object *rule_parent; /* The grouped avp or command to which the rule apply */ struct dict_object *rule_avp; /* The AVP concerned by this rule */ }; /*** * API usage : The "parent" parameter can not be NULL. It points to the object (grouped avp or command) to which this rule apply (i.e. for which the ABNF is defined). - fd_dict_new: Sample code for rule creation. Let's create the Proxy-Info grouped AVP for example. { int ret; struct dict_object * proxy_info_avp; struct dict_object * proxy_host_avp; struct dict_object * proxy_state_avp; struct dict_object * diameteridentity_type; struct dict_rule_data rule_data; struct dict_type_data di_type_data = { AVP_TYPE_OCTETSTRING, "DiameterIdentity", NULL, NULL }; struct dict_avp_data proxy_info_data = { 284, 0, "Proxy-Info", AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, AVP_FLAG_MANDATORY, AVP_TYPE_GROUPED }; struct dict_avp_data proxy_host_data = { 280, 0, "Proxy-Host", AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, AVP_FLAG_MANDATORY, AVP_TYPE_OCTETSTRING }; struct dict_avp_data proxy_state_data = { 33, 0, "Proxy-State",AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, AVP_FLAG_MANDATORY, AVP_TYPE_OCTETSTRING }; -- Create the parent AVP ret = fd_dict_new ( dict, DICT_AVP, &proxy_info_data, NULL, &proxy_info_avp ); -- Create the first child AVP. ret = fd_dict_new ( dict, DICT_TYPE, &di_type_data, NULL, &diameteridentity_type ); ret = fd_dict_new ( dict, DICT_AVP, &proxy_host_data, diameteridentity_type, &proxy_host_avp ); -- Create the other child AVP ret = fd_dict_new ( dict, DICT_AVP, &proxy_state_data, NULL, &proxy_state_avp ); -- Now we can create the rules. Both children AVP are mandatory. rule_data.rule_position = RULE_REQUIRED; rule_data.rule_min = -1; rule_data.rule_max = -1; rule_data.rule_avp = proxy_host_avp; ret = fd_dict_new ( dict, DICT_RULE, &rule_data, proxy_info_avp, NULL ); rule_data.rule_avp = proxy_state_avp; ret = fd_dict_new ( dict, DICT_RULE, &rule_data, proxy_info_avp, NULL ); } - fd_dict_search and fd_dict_getval are similar to previous examples. */ /* Define some hard-coded values */ /* Application */ #define AI_RELAY 0xffffffff /* Commands Codes */ #define CC_CAPABILITIES_EXCHANGE 257 #define CC_RE_AUTH 258 #define CC_ACCOUNTING 271 #define CC_ABORT_SESSION 274 #define CC_SESSION_TERMINATION 275 #define CC_DEVICE_WATCHDOG 280 #define CC_DISCONNECT_PEER 282 /* AVPs (Vendor 0) */ #define AC_USER_NAME 1 #define AC_PROXY_STATE 33 #define AC_HOST_IP_ADDRESS 257 #define AC_AUTH_APPLICATION_ID 258 #define AC_ACCT_APPLICATION_ID 259 #define AC_VENDOR_SPECIFIC_APPLICATION_ID 260 #define AC_REDIRECT_HOST_USAGE 261 #define AC_REDIRECT_MAX_CACHE_TIME 262 #define AC_SESSION_ID 263 #define AC_ORIGIN_HOST 264 #define AC_SUPPORTED_VENDOR_ID 265 #define AC_VENDOR_ID 266 #define AC_FIRMWARE_REVISION 267 #define AC_RESULT_CODE 268 #define AC_PRODUCT_NAME 269 #define AC_DISCONNECT_CAUSE 273 #define ACV_DC_REBOOTING 0 #define ACV_DC_BUSY 1 #define ACV_DC_NOT_FRIEND 2 #define AC_ORIGIN_STATE_ID 278 #define AC_FAILED_AVP 279 #define AC_PROXY_HOST 280 #define AC_ERROR_MESSAGE 281 #define AC_ROUTE_RECORD 282 #define AC_DESTINATION_REALM 283 #define AC_PROXY_INFO 284 #define AC_REDIRECT_HOST 292 #define AC_DESTINATION_HOST 293 #define AC_ERROR_REPORTING_HOST 294 #define AC_ORIGIN_REALM 296 #define AC_INBAND_SECURITY_ID 299 #define ACV_ISI_NO_INBAND_SECURITY 0 #define ACV_ISI_TLS 1 /* Error codes from Base protocol (reference: http://www.iana.org/assignments/aaa-parameters/aaa-parameters.xml#aaa-parameters-4) Note that currently, rfc3588bis-26 has some different values for some of these */ #define ER_DIAMETER_MULTI_ROUND_AUTH 1001 #define ER_DIAMETER_SUCCESS 2001 #define ER_DIAMETER_LIMITED_SUCCESS 2002 #define ER_DIAMETER_COMMAND_UNSUPPORTED 3001 /* 5019 ? */ #define ER_DIAMETER_UNABLE_TO_DELIVER 3002 #define ER_DIAMETER_REALM_NOT_SERVED 3003 #define ER_DIAMETER_TOO_BUSY 3004 #define ER_DIAMETER_LOOP_DETECTED 3005 #define ER_DIAMETER_REDIRECT_INDICATION 3006 #define ER_DIAMETER_APPLICATION_UNSUPPORTED 3007 #define ER_DIAMETER_INVALID_HDR_BITS 3008 /* 5020 ? */ #define ER_DIAMETER_INVALID_AVP_BITS 3009 /* 5021 ? */ #define ER_DIAMETER_UNKNOWN_PEER 3010 /* 5018 ? */ #define ER_DIAMETER_AUTHENTICATION_REJECTED 4001 #define ER_DIAMETER_OUT_OF_SPACE 4002 #define ER_ELECTION_LOST 4003 #define ER_DIAMETER_AVP_UNSUPPORTED 5001 #define ER_DIAMETER_UNKNOWN_SESSION_ID 5002 #define ER_DIAMETER_AUTHORIZATION_REJECTED 5003 #define ER_DIAMETER_INVALID_AVP_VALUE 5004 #define ER_DIAMETER_MISSING_AVP 5005 #define ER_DIAMETER_RESOURCES_EXCEEDED 5006 #define ER_DIAMETER_CONTRADICTING_AVPS 5007 #define ER_DIAMETER_AVP_NOT_ALLOWED 5008 #define ER_DIAMETER_AVP_OCCURS_TOO_MANY_TIMES 5009 #define ER_DIAMETER_NO_COMMON_APPLICATION 5010 #define ER_DIAMETER_UNSUPPORTED_VERSION 5011 #define ER_DIAMETER_UNABLE_TO_COMPLY 5012 #define ER_DIAMETER_INVALID_BIT_IN_HEADER 5013 /* 3011 ? */ #define ER_DIAMETER_INVALID_AVP_LENGTH 5014 #define ER_DIAMETER_INVALID_MESSAGE_LENGTH 5015 /* 3012 ? */ #define ER_DIAMETER_INVALID_AVP_BIT_COMBO 5016 /* deprecated? */ #define ER_DIAMETER_NO_COMMON_SECURITY 5017 /*============================================================*/ /* SESSIONS */ /*============================================================*/ /* Modules that want to associate a state with a Session-Id must first register a handler of this type */ struct session_handler; /* This opaque structure represents a session associated with a Session-Id */ struct session; /* The state information that a module associate with a session -- each module defines its own data format */ struct sess_state; /* declare this in your own extension */ typedef DECLARE_FD_DUMP_PROTOTYPE((*session_state_dump), struct sess_state * st); /* The following function must be called to activate the session expiry mechanism */ int fd_sess_start(void); /* * FUNCTION: fd_sess_handler_create * * PARAMETERS: * handler : location where the new handler must be stored. * cleanup : a callback function that must be called when the session with associated data is destroyed. * dumper : if not NULL, will be called during fd_sess_dump to display the data associated with a session. NULL otherwise. * opaque : A pointer that is passed to the cleanup callback -- the content is never examined by the framework. * * DESCRIPTION: * Create a new session handler. This is needed by a module to associate a state with a session object. * The cleanup handler is called when the session timeout expires, or fd_sess_destroy is called. It must free * the state associated with the session, and eventually trig other actions (send a STR, ...). * * RETURN VALUE: * 0 : The new handler has been created. * EINVAL : A parameter is invalid. * ENOMEM : Not enough memory to complete the operation */ int fd_sess_handler_create ( struct session_handler ** handler, void (*cleanup)(struct sess_state * state, os0_t sid, void * opaque), session_state_dump dumper, void * opaque ); /* * FUNCTION: fd_sess_handler_destroy * * PARAMETERS: * handler : location of an handler created by fd_sess_handler_create. * opaque : the opaque pointer registered with the callback is restored here (if ! NULL). * * DESCRIPTION: * This destroys a session handler (typically called when an application is shutting down). * If sessions states are registered with this handler, the cleanup callback is called on them. * * RETURN VALUE: * 0 : The handler was destroyed. * EINVAL : A parameter is invalid. * ENOMEM : Not enough memory to complete the operation */ int fd_sess_handler_destroy ( struct session_handler ** handler, void **opaque ); /* * FUNCTION: fd_sess_new * * PARAMETERS: * session : The location where the session object will be created upon success. * diamid : a Diameter Identity, or NULL. * diamidlen : if diamid is \0-terminated, this can be 0. Otherwise, the length of diamid. * opt : Additional string, or NULL. Usage is described below. * optlen : if opt is \0-terminated, this can be 0. Otherwise, the length of opt. * * DESCRIPTION: * Create a new session object. The Session-Id string associated with this session is generated as follow: * If diamId parameter is provided, the string is created according to the RFC: ;;[;opt] where * diamId is a Diameter Identity. * high32 and low32 are the parts of a monotonic 64 bits counter initialized to (time, 0) at startup. * opt is an optional string that can be concatenated to the identifier. * If diamId is NULL, the string is exactly the content of opt. * * RETURN VALUE: * 0 : The session is created, the initial msg refcount is 1. * EINVAL : A parameter is invalid. * EALREADY : A session with the same name already exists (returned in *session), the msg refcount is increased. * ENOMEM : Not enough memory to complete the operation */ int fd_sess_new ( struct session ** session, DiamId_t diamid, size_t diamidlen, uint8_t * opt, size_t optlen ); /* * FUNCTION: fd_sess_fromsid * * PARAMETERS: * sid : pointer to a string containing a Session-Id (should be UTF-8). * len : length of the sid string (which does not need to be '\0'-terminated) * session : On success, pointer to the session object created / retrieved. * isnew : if not NULL, set to 1 on return if the session object has been created, 0 if it was simply retrieved. * * DESCRIPTION: * Retrieve a session object from a Session-Id string. In case no session object was previously existing with this * id, a new object is silently created (equivalent to fd_sess_new with flag SESSION_NEW_FULL). * * RETURN VALUE: * 0 : The session parameter has been updated. * EINVAL : A parameter is invalid. * ENOMEM : Not enough memory to complete the operation */ int fd_sess_fromsid ( uint8_t * sid, size_t len, struct session ** session, int * isnew); /* only use the following in specific situations, e.g. app_radgw extension. They are normally handled by the framework only */ int fd_sess_fromsid_msg ( uint8_t * sid, size_t len, struct session ** session, int * isnew); int fd_sess_ref_msg ( struct session * session ); /* * FUNCTION: fd_sess_getsid * * PARAMETERS: * session : Pointer to a session object. * sid : On success, the location of the sid is stored here. * * DESCRIPTION: * Retrieve the session identifier (Session-Id) corresponding to a session object. * The returned sid is a \0-terminated binary string which might be UTF-8 (but there is no guarantee in the framework). * It may be used for example to set the value of an AVP. * Note that the sid string is not copied, just its reference... do not free it! * * RETURN VALUE: * 0 : The sid & len parameters have been updated. * EINVAL : A parameter is invalid. */ int fd_sess_getsid ( struct session * session, os0_t * sid, size_t * sidlen ); /* * FUNCTION: fd_sess_settimeout * * PARAMETERS: * session : The session for which to set the timeout. * timeout : The date when the session times out. * * DESCRIPTION: * Set the lifetime for a given session object. This function may be * called several times on the same object to update the timeout value. * When the timeout date is reached, the cleanup handler of each * module that registered data with this session is called, then the * session is cleared. * * There is a possible race condition between cleanup of the session * and use of its data; applications should ensure that they are not * using data from a session that is about to expire / expired. * * RETURN VALUE: * 0 : The session timeout has been updated. * EINVAL : A parameter is invalid. */ int fd_sess_settimeout( struct session * session, const struct timespec * timeout ); /* * FUNCTION: fd_sess_destroy * * PARAMETERS: * session : Pointer to a session object. * * DESCRIPTION: * Destroys all associated states of a session, if any. * Equivalent to a session timeout expired, but the effect is immediate. * The session itself is marked as deleted, and will be freed when it is not referenced * by any message anymore. * * RETURN VALUE: * 0 : The session no longer exists. * EINVAL : A parameter is invalid. */ int fd_sess_destroy ( struct session ** session ); /* * FUNCTION: fd_sess_reclaim * * PARAMETERS: * session : Pointer to a session object. * * DESCRIPTION: * Equivalent to fd_sess_destroy, only if no session_state is associated with the session. * Otherwise, this function has no effect (except that it sets *session to NULL). * * RETURN VALUE: * 0 : The session was reclaimed. * EINVAL : A parameter is invalid. */ int fd_sess_reclaim ( struct session ** session ); /* * FUNCTION: fd_sess_state_store * * PARAMETERS: * handler : The handler with which the state is registered. * session : The session object with which the state is registered. * state : An application state (opaque data) to store with the session. * * DESCRIPTION: * Stores an application state with a session. This state can later be retrieved * with fd_sess_state_retrieve, or implicitly in the cleanup handler when the session * is destroyed. * * RETURN VALUE: * 0 : The state has been stored. * EINVAL : A parameter is invalid. * EALREADY : Data was already associated with this session and client. * ENOMEM : Not enough memory to complete the operation */ int fd_sess_state_store ( struct session_handler * handler, struct session * session, struct sess_state ** state ); /* * FUNCTION: fd_sess_state_retrieve * * PARAMETERS: * handler : The handler with which the state was registered. * session : The session object with which the state was registered. * state : Location where the state must be saved if it is found. * * DESCRIPTION: * Retrieves a state saved by fd_sess_state_store. * After this function has been called, the state is no longer associated with * the session. A new call to fd_sess_state_store must be performed in order to * store again the data with the session. * * RETURN VALUE: * 0 : *state is updated (NULL or points to the state if it was found). * EINVAL : A parameter is invalid. */ int fd_sess_state_retrieve ( struct session_handler * handler, struct session * session, struct sess_state ** state ); /* For debug */ DECLARE_FD_DUMP_PROTOTYPE(fd_sess_dump, struct session * session, int with_states); DECLARE_FD_DUMP_PROTOTYPE(fd_sess_dump_hdl, struct session_handler * handler); /* For statistics / monitoring: get the number of struct session in memory */ int fd_sess_getcount(uint32_t *cnt); /*============================================================*/ /* ROUTING */ /*============================================================*/ /* The following functions are helpers for the routing module. The routing data is stored in the message itself. */ /* Structure that contains the routing data for a message */ struct rt_data; /* Following functions are helpers to create the routing data of a message */ int fd_rtd_init(struct rt_data ** rtd); void fd_rtd_free(struct rt_data ** rtd); /* Add a peer to the candidates list. */ int fd_rtd_candidate_add(struct rt_data * rtd, DiamId_t peerid, size_t peeridlen, DiamId_t realm, size_t realmlen); /* Remove a peer from the candidates (if it is found). The search is case-insensitive. */ void fd_rtd_candidate_del(struct rt_data * rtd, uint8_t * id, size_t idsz); /* Extract the list of valid candidates, and initialize their scores to 0 */ void fd_rtd_candidate_extract(struct rt_data * rtd, struct fd_list ** candidates, int ini_score); /* If a peer returned a protocol error for this message, save it so that we don't try to send it there again. Optionally retrieve the current list of candidates. */ int fd_rtd_error_add(struct rt_data * rtd, DiamId_t sentto, size_t senttolen, uint8_t * origin, size_t originsz, uint32_t rcode, struct fd_list ** candidates, int * sendingattemtps); /* Only retrieve the number of times this message has been processed by the routing-out mechanism (i.e. number of times it was failed over) */ int fd_rtd_get_nb_attempts(struct rt_data * rtd, int * sendingattemtps); /* The extracted list items have the following structure: */ struct rtd_candidate { struct fd_list chain; /* link in the list returned by the previous fcts */ DiamId_t diamid; /* the diameter Id of the peer */ size_t diamidlen; /* cached size of the diamid string */ DiamId_t realm; /* the diameter realm of the peer */ size_t realmlen; /* cached size of realm */ int score; /* the current routing score for this peer, see fd_rt_out_register definition for details */ }; /* Reorder the list of peers by score */ int fd_rtd_candidate_reorder(struct fd_list * candidates); /* Note : it is fine for a callback to add a new entry in the candidates list after the list has been extracted. The diamid must then be malloc'd. */ /* Beware that this could lead to routing loops */ /*============================================================*/ /* MESSAGES */ /*============================================================*/ /* The following types are opaque */ struct msg; /* A message: command with children AVPs (possibly grand children) */ struct avp; /* AVP object */ /* Some details about chaining: * * A message is made of a header ( msg ) and 0 or more AVPs ( avp ). * The structure is a kind of tree, where some AVPs (grouped AVPs) can contain other AVPs. * Example: * msg * |-avp * |-gavp * | |-avp * | |-avp * | \-avp * |-avp * \-avp * */ /* The following type is used to point to either a msg or an AVP */ typedef void msg_or_avp; /* The Diameter protocol version */ #define DIAMETER_VERSION 1 /* In the two following types, some fields are marked (READONLY). * This means that the content of these fields will be overwritten by the daemon so modifying it is useless. */ /* The following structure represents the header of a message. All data is in host byte order. */ struct msg_hdr { uint8_t msg_version; /* (READONLY) Version of Diameter: must be DIAMETER_VERSION. */ uint32_t msg_length; /* (READONLY)(3 bytes) indicates the length of the message */ uint8_t msg_flags; /* Message flags: CMD_FLAG_* */ command_code_t msg_code; /* (3 bytes) the command-code. See dictionary-api.h for more detail */ application_id_t msg_appl; /* The application issuing this message */ uint32_t msg_hbhid; /* The Hop-by-Hop identifier of the message */ uint32_t msg_eteid; /* The End-to-End identifier of the message */ }; /* The following structure represents the visible content of an AVP. All data is in host byte order. */ struct avp_hdr { avp_code_t avp_code; /* the AVP Code */ uint8_t avp_flags; /* AVP_FLAG_* flags */ uint32_t avp_len; /* (READONLY)(Only 3 bytes are used) the length of the AVP as described in the RFC */ vendor_id_t avp_vendor; /* Only used if AVP_FLAG_VENDOR is present */ union avp_value *avp_value; /* pointer to the value of the AVP. NULL means that the value is not set / not understood. One should not directly change this value. Use the msg_avp_setvalue function instead. The content of the pointed structure can be changed directly, with this restriction: if the AVP is an OctetString, and you change the value of the pointer avp_value->os.data, then you must call free() on the previous value, and the new one must be free()-able. */ }; /* The following enum is used to browse inside message hierarchy (msg, gavp, avp) */ enum msg_brw_dir { MSG_BRW_NEXT = 1, /* Get the next element at the same level, or NULL if this is the last element. */ MSG_BRW_PREV, /* Get the previous element at the same level, or NULL if this is the first element. */ MSG_BRW_FIRST_CHILD, /* Get the first child AVP of this element, if any. */ MSG_BRW_LAST_CHILD, /* Get the last child AVP of this element, if any. */ MSG_BRW_PARENT, /* Get the parent element of this element, if any. Only the msg_t object has no parent. */ MSG_BRW_WALK /* This is equivalent to FIRST_CHILD or NEXT or PARENT->next, first that is not NULL. Use this to walk inside all AVPs. */ }; /* Some flags used in the functions below */ #define AVPFL_SET_BLANK_VALUE 0x01 /* When creating an AVP, initialize its value to a blank area */ #define AVPFL_SET_RAWDATA_FROM_AVP 0x02 /* When creating an AVP, initialize its rawdata area from an existing AVP -- it is only blank padding (for error reporting) */ #define AVPFL_MAX AVPFL_SET_RAWDATA_FROM_AVP /* The biggest valid flag value */ #define MSGFL_ALLOC_ETEID 0x01 /* When creating a message, a new end-to-end ID is allocated and set in the message */ #define MSGFL_ANSW_ERROR 0x02 /* When creating an answer message, set the 'E' bit and use the generic error ABNF instead of command-specific ABNF */ #define MSGFL_ANSW_NOSID 0x04 /* When creating an answer message, do not add the Session-Id even if present in request */ #define MSGFL_ANSW_NOPROXYINFO 0x08 /* When creating an answer message, do not add the Proxy-Info AVPs presents in request */ #define MSGFL_MAX MSGFL_ANSW_NOPROXYINFO /* The biggest valid flag value */ /**************************************************/ /* Message creation, manipulation, disposal */ /**************************************************/ /* * FUNCTION: fd_msg_avp_new * * PARAMETERS: * model : Pointer to a DICT_AVP dictionary object describing the avp to create, or NULL if flags are used. * flags : Flags to use in creation (AVPFL_*, see above). * avp : Upon success, pointer to the new avp is stored here. It points to reference AVP upon function call when flags are used. * * DESCRIPTION: * Create a new AVP instance. * * RETURN VALUE: * 0 : The AVP is created. * EINVAL : A parameter is invalid. * (other standard errors may be returned, too, with their standard meaning. Example: * ENOMEM : Memory allocation for the new avp failed.) */ int fd_msg_avp_new ( struct dict_object * model, int flags, struct avp ** avp ); /* * FUNCTION: fd_msg_new * * PARAMETERS: * model : Pointer to a DICT_COMMAND dictionary object describing the message to create, or NULL. * flags : combination of MSGFL_* flags. * msg : Upon success, pointer to the new message is stored here. * * DESCRIPTION: * Create a new empty Diameter message. * * RETURN VALUE: * 0 : The message is created. * EINVAL : A parameter is invalid. * (other standard errors may be returned, too, with their standard meaning. Example: * ENOMEM : Memory allocation for the new message failed.) */ int fd_msg_new ( struct dict_object * model, int flags, struct msg ** msg ); /* * FUNCTION: msg_new_answer_from_req * * PARAMETERS: * dict : Pointer to the dictionary containing the model of the query. * msg : The location of the query on function call. Updated by the location of answer message on return. * flag : Pass MSGFL_ANSW_ERROR to indicate if the answer is an error message (will set the 'E' bit) * : See other MSGFL_ANSW_* definition above for other flags. * * DESCRIPTION: * This function creates the empty answer message corresponding to a request. * The header is set properly (R flag, ccode, appid, hbhid, eteid) * The Session-Id AVP is copied if present. * The calling code should usually call fd_msg_rescode_set function on the answer. * Upon return, the original query may be retrieved by calling fd_msg_answ_getq on the message. * * RETURN VALUE: * 0 : Operation complete. * !0 : an error occurred. */ int fd_msg_new_answer_from_req ( struct dictionary * dict, struct msg ** msg, int flag ); /* * FUNCTION: fd_msg_browse * * PARAMETERS: * reference : Pointer to a struct msg or struct avp. * dir : Direction for browsing * found : If not NULL, updated with the element that has been found, if any, or NULL if no element was found / an error occurred. * depth : If not NULL, points to an integer representing the "depth" of this object in the tree. This is a relative value, updated on return. * * DESCRIPTION: * Explore the content of a message object (hierarchy). If "found" is null, only error checking is performed. * If "depth" is provided, it is updated as follow on successful function return: * - not modified for MSG_BRW_NEXT and MSG_BRW_PREV. * - *depth = *depth + 1 for MSG_BRW_FIRST_CHILD and MSG_BRW_LAST_CHILD. * - *depth = *depth - 1 for MSG_BRW_PARENT. * - *depth = *depth + X for MSG_BRW_WALK, with X between 1 (returned the 1st child) and -N (returned the Nth parent's next). * * RETURN VALUE: * 0 : found has been updated (if non NULL). * EINVAL : A parameter is invalid. * ENOENT : No element has been found where requested, and "found" was NULL (otherwise, *found is set to NULL and 0 is returned). */ int fd_msg_browse_internal ( msg_or_avp * reference, enum msg_brw_dir dir, msg_or_avp ** found, int * depth ); /* Macro to avoid having to cast the third parameter everywhere */ #define fd_msg_browse( ref, dir, found, depth ) \ fd_msg_browse_internal( (ref), (dir), (void *)(found), (depth) ) /* * FUNCTION: fd_msg_avp_add * * PARAMETERS: * reference : Pointer to a valid msg or avp. * dir : location where the new AVP should be inserted, relative to the reference. MSG_BRW_PARENT and MSG_BRW_WALK are not valid. * avp : pointer to the AVP object that must be inserted. * * DESCRIPTION: * Adds an AVP into an object that can contain it: grouped AVP or message. * Note that the added AVP will be freed at the same time as the object it is added to, * so it should not be freed after the call to this function. * * RETURN VALUE: * 0 : The AVP has been added. * EINVAL : A parameter is invalid. */ int fd_msg_avp_add ( msg_or_avp * reference, enum msg_brw_dir dir, struct avp *avp); /* * FUNCTION: fd_msg_search_avp * * PARAMETERS: * msg : The message structure in which to search the AVP. * what : The dictionary model of the AVP to search. * avp : location where the AVP reference is stored if found. * * DESCRIPTION: * Search the first top-level AVP of a given model inside a message. * Note: only the first instance of the AVP is returned by this function. * Note: only top-level AVPs are searched, not inside grouped AVPs. * Use msg_browse if you need more advanced research features. * * RETURN VALUE: * 0 : The AVP has been found. * EINVAL : A parameter is invalid. * ENOENT : No AVP has been found, and "avp" was NULL (otherwise, *avp is set to NULL and 0 returned). */ int fd_msg_search_avp ( struct msg * msg, struct dict_object * what, struct avp ** avp ); /* * FUNCTION: fd_msg_free * * PARAMETERS: * object : pointer to the message or AVP object that must be unlinked and freed. * * DESCRIPTION: * Unlink and free a message or AVP object and its children. * If the object is an AVP linked into a message, the AVP is removed before being freed. * * RETURN VALUE: * 0 : The message has been freed. * EINVAL : A parameter is invalid. */ int fd_msg_free ( msg_or_avp * object ); /***************************************/ /* Dump functions */ /***************************************/ /* * FUNCTION: fd_msg_dump_* * * PARAMETERS: * see definition of DECLARE_FD_DUMP_PROTOTYPE, * obj : A msg or avp object to dump. * dict : the dictionary to use if parsing is requested (optional) * force_parsing: by default these functions do not parse the object but dump hexa values in that case. * use !0 to force parsing. If parsing fails, the hexa dump is still provided. * recurse : allow the function to go through the children objects if any to dump more information. might require parsing. * * DESCRIPTION: * These functions dump the content of a message or avp into a buffer * either recursively or only the object itself. * * RETURN VALUE: * - see DECLARE_FD_DUMP_PROTOTYPE, */ /* one-line dump with only short information */ DECLARE_FD_DUMP_PROTOTYPE( fd_msg_dump_summary, msg_or_avp *obj, struct dictionary *dict, int force_parsing, int recurse ); /* one-line dump with all the contents of the message */ DECLARE_FD_DUMP_PROTOTYPE( fd_msg_dump_full, msg_or_avp *obj, struct dictionary *dict, int force_parsing, int recurse ); /* multi-line human-readable dump similar to wireshark output */ DECLARE_FD_DUMP_PROTOTYPE( fd_msg_dump_treeview, msg_or_avp *obj, struct dictionary *dict, int force_parsing, int recurse ); /*********************************************/ /* Message metadata management functions */ /*********************************************/ /* * FUNCTION: fd_msg_model * * PARAMETERS: * reference : Pointer to a valid msg or avp. * model : on success, pointer to the dictionary model of this command or AVP. NULL if the model is unknown. * * DESCRIPTION: * Retrieve the dictionary object describing this message or avp. If the object is unknown or the fd_msg_parse_dict has not been called, * *model is set to NULL. * * RETURN VALUE: * 0 : The model has been set. * EINVAL : A parameter is invalid. */ int fd_msg_model ( msg_or_avp * reference, struct dict_object ** model ); /* * FUNCTION: fd_msg_hdr * * PARAMETERS: * msg : Pointer to a valid message object. * pdata : Upon success, pointer to the msg_hdr structure of this message. The fields may be modified. * * DESCRIPTION: * Retrieve location of modifiable section of a message. * * RETURN VALUE: * 0 : The location has been written. * EINVAL : A parameter is invalid. */ int fd_msg_hdr ( struct msg *msg, struct msg_hdr ** pdata ); /* * FUNCTION: fd_msg_avp_hdr * * PARAMETERS: * avp : Pointer to a valid avp object. * pdata : Upon success, pointer to the avp_hdr structure of this avp. The fields may be modified. * * DESCRIPTION: * Retrieve location of modifiable data of an avp. * * RETURN VALUE: * 0 : The location has been written. * EINVAL : A parameter is invalid. */ int fd_msg_avp_hdr ( struct avp *avp, struct avp_hdr ** pdata ); /* * FUNCTION: fd_msg_answ_associate, fd_msg_answ_getq, fd_msg_answ_detach * * PARAMETERS: * answer : the received answer message * query : the corresponding query that had been sent * * DESCRIPTION: * fd_msg_answ_associate associates a query msg with the received answer. * Query is retrieved with fd_msg_answ_getq. * If answer message is freed, the query is also freed. * If the msg_answ_detach function is called, the association is removed. * This is meant to be called from the daemon only. * * RETURN VALUE: * 0 : ok * EINVAL: a parameter is invalid */ int fd_msg_answ_associate( struct msg * answer, struct msg * query ); int fd_msg_answ_getq ( struct msg * answer, struct msg ** query ); int fd_msg_answ_detach ( struct msg * answer ); /* * FUNCTION: fd_msg_anscb_associate, fd_msg_anscb_get * * PARAMETERS: * msg : the request message * anscb : the callback to associate with the message * data : the data to pass to the callback * expirecb : the expiration callback to associate with the message * timeout : (optional, use NULL if no timeout) a timeout associated with calling the cb. * * DESCRIPTION: * Associate or retrieve callbacks with an message. * This is meant to be called from the daemon only. * * RETURN VALUE: * 0 : ok * EINVAL: a parameter is invalid */ int fd_msg_anscb_associate( struct msg * msg, void ( *anscb)(void *, struct msg **), void * data, void (*expirecb)(void *, DiamId_t, size_t, struct msg **), const struct timespec *timeout ); int fd_msg_anscb_get( struct msg * msg, void (**anscb)(void *, struct msg **), void (**expirecb)(void *, DiamId_t, size_t, struct msg **), void ** data ); int fd_msg_anscb_reset(struct msg * msg, int clear_anscb, int clear_expirecb); struct timespec *fd_msg_anscb_gettimeout( struct msg * msg ); /* returns NULL or a valid non-0 timespec */ /* * FUNCTION: fd_msg_rt_associate, fd_msg_rt_get * * PARAMETERS: * msg : the query message to be sent * list : the ordered list of possible next-peers * * DESCRIPTION: * Associate a routing list with a query, and retrieve it. * If the message is freed, the list is also freed. * * RETURN VALUE: * 0 : ok * EINVAL: a parameter is invalid */ int fd_msg_rt_associate( struct msg * msg, struct rt_data * rtd ); int fd_msg_rt_get ( struct msg * msg, struct rt_data ** rtd ); /* * FUNCTION: fd_msg_is_routable * * PARAMETERS: * msg : A msg object. * * DESCRIPTION: * This function returns a boolean telling if a given message is routable in the Diameter network, * or if it is a local link message only (ex: CER/CEA, DWR/DWA, ...). * * RETURN VALUE: * 0 : The message is not routable / an error occurred. * 1 : The message is routable. */ int fd_msg_is_routable ( struct msg * msg ); /* * FUNCTION: fd_msg_source_(g/s)et * * PARAMETERS: * msg : A msg object. * diamid,len : The diameter id of the peer from which this message was received. * dict : a dictionary with definition of Route-Record AVP (for fd_msg_source_setrr) * * DESCRIPTION: * Store or retrieve the diameted id of the peer from which this message was received. * Will be used for example by the routing module to add the Route-Record AVP in forwarded requests, * or to direct answers to the appropriate peer. * * RETURN VALUE: * 0 : Operation complete. * !0 : an error occurred. */ int fd_msg_source_set( struct msg * msg, DiamId_t diamid, size_t diamidlen ); int fd_msg_source_setrr( struct msg * msg, DiamId_t diamid, size_t diamidlen, struct dictionary * dict ); int fd_msg_source_get( struct msg * msg, DiamId_t *diamid, size_t * diamidlen ); /* * FUNCTION: fd_msg_eteid_get * * PARAMETERS: * - * * DESCRIPTION: * Get a new unique end-to-end id value for the local peer. * * RETURN VALUE: * The new assigned value. No error code is defined. */ uint32_t fd_msg_eteid_get ( void ); /* * FUNCTION: fd_msg_sess_get * * PARAMETERS: * dict : the dictionary that contains the Session-Id AVP definition * msg : A valid message. * session : Location to store the session pointer when retrieved. * isnew : Indicates if the session has been created. * * DESCRIPTION: * This function retrieves or creates the session object corresponding to a message. * If the message does not contain a Session-Id AVP, *session == NULL on return. * Note that the Session-Id AVP must never be modified after created in a message. * * RETURN VALUE: * 0 : success * !0 : standard error code. */ int fd_msg_sess_get(struct dictionary * dict, struct msg * msg, struct session ** session, int * isnew); /* This one is used by the libfdcore, you should use fd_msg_new_session rather than fd_sess_new, when possible */ int fd_msg_sess_set(struct msg * msg, struct session * session); /* Helper for the hooks mechanism, for use from libfdcore */ struct fd_msg_pmdl { struct fd_list sentinel; /* if the sentinel.o field is NULL, the structure is not initialized. Otherwise it points to the cleanup function in libfdcore. */ pthread_mutex_t lock; }; struct fd_msg_pmdl * fd_msg_pmdl_get(struct msg * msg); /***************************************/ /* Manage AVP values */ /***************************************/ /* * FUNCTION: fd_msg_avp_setvalue * * PARAMETERS: * avp : Pointer to a valid avp object with a NULL avp_value pointer. The model must be known. * value : pointer to an avp_value. The content will be COPIED into the internal storage area. * If data type is an octetstring, the data is also copied. * If value is a NULL pointer, the previous data is erased and value is unset in the AVP. * * DESCRIPTION: * Initialize the avp_value field of an AVP header. * * RETURN VALUE: * 0 : The avp_value pointer has been set. * EINVAL : A parameter is invalid. */ int fd_msg_avp_setvalue ( struct avp *avp, union avp_value *value ); /* * FUNCTION: fd_msg_avp_value_encode * * PARAMETERS: * avp : Pointer to a valid avp object with a NULL avp_value. The model must be known. * data : Pointer to the data that must be encoded as AVP value and stored in the AVP. * This is only valid for AVPs of derived type for which type_data_encode callback is set. (ex: Address type) * * DESCRIPTION: * Initialize the avp_value field of an AVP object from formatted data, using the AVP's type "type_data_encode" callback. * * RETURN VALUE: * 0 : The avp_value has been set. * EINVAL : A parameter is invalid. * ENOTSUP : There is no appropriate callback registered with this AVP's type. */ int fd_msg_avp_value_encode ( void *data, struct avp *avp ); /* * FUNCTION: fd_msg_avp_value_interpret * * PARAMETERS: * avp : Pointer to a valid avp object with a non-NULL avp_value value. * data : Upon success, formatted interpretation of the AVP value is stored here. * * DESCRIPTION: * Interpret the content of an AVP of Derived type and store the result in data pointer. The structure * of the data pointer is dependent on the AVP type. This function calls the "type_data_interpret" callback * of the type. * * RETURN VALUE: * 0 : The avp_value has been set. * EINVAL : A parameter is invalid. * ENOTSUP : There is no appropriate callback registered with this AVP's type. */ int fd_msg_avp_value_interpret ( struct avp *avp, void *data ); /***************************************/ /* Message parsing functions */ /***************************************/ /* * FUNCTION: fd_msg_bufferize * * PARAMETERS: * msg : A valid msg object. All AVPs must have a value set. * buffer : Upon success, this points to a buffer (malloc'd) containing the message ready for network transmission (or security transformations). * The buffer may be freed after use. * len : if not NULL, the size of the buffer is written here. In any case, this size is updated in the msg header. * * DESCRIPTION: * Renders a message in memory as a buffer that can be sent over the network to the next peer. * * RETURN VALUE: * 0 : The location has been written. * EINVAL : The buffer does not contain a valid Diameter message. * ENOMEM : Unable to allocate enough memory to create the buffer object. */ int fd_msg_bufferize ( struct msg * msg, uint8_t ** buffer, size_t * len ); /* * FUNCTION: fd_msg_parse_buffer * * PARAMETERS: * buffer : Pointer to a buffer containing a message received from the network. * buflen : the size in bytes of the buffer. * msg : Upon success, this points to a valid msg object. No AVP value is resolved in this object, nor grouped AVP. * * DESCRIPTION: * This function parses a buffer an creates a msg object to represent the structure of the message. * Since no dictionary lookup is performed, the values of the AVPs are not interpreted. To interpret the values, * the returned message object must be passed to fd_msg_parse_dict function. * The buffer pointer is saved inside the message and will be freed when not needed anymore. * * RETURN VALUE: * 0 : The location has been written. * ENOMEM : Unable to allocate enough memory to create the msg object. * EBADMSG : The buffer does not contain a valid Diameter message (or is truncated). * EINVAL : A parameter is invalid. */ int fd_msg_parse_buffer ( uint8_t ** buffer, size_t buflen, struct msg ** msg ); /* Parsing Error Information structure */ struct fd_pei { char * pei_errcode; /* name of the error code to use */ struct avp * pei_avp; /* pointer to invalid (in original message) or missing AVP (to be freed) */ int pei_avp_free; /* Set to 1 if the pei_avp must be freed */ char * pei_message; /* Overwrite default message if needed */ int pei_protoerr; /* do we set the 'E' bit in the error message ? */ }; /* * FUNCTION: fd_msg_parse_dict * * PARAMETERS: * object : A msg or AVP object as returned by fd_msg_parse_buffer. * dict : the dictionary containing the objects definitions to use for resolving all AVPs. * error_info : If not NULL, will contain the detail about error upon return. May be used to generate an error reply. * * DESCRIPTION: * This function looks up for the command and each children AVP definitions in the dictionary. * If the dictionary definition is found, avp_model is set and the value of the AVP is interpreted accordingly and: * - for grouped AVPs, the children AVP are created and interpreted also. * - for numerical AVPs, the value is converted to host byte order and saved in the avp_value field. * - for octetstring AVPs, the string is copied into a new buffer and its address is saved in avp_value. * If the dictionary definition is not found, avp_model is set to NULL and * the content of the AVP is saved as an octetstring in an internal structure. avp_value is NULL. * As a result, after this function has been called, there is no more dependency of the msg object to the message buffer, that is freed. * * RETURN VALUE: * 0 : The message has been fully parsed as described. * EINVAL : The msg parameter is invalid for this operation. * ENOMEM : Unable to allocate enough memory to complete the operation. * ENOTSUP : No dictionary definition for the command or one of the mandatory AVP was found. */ int fd_msg_parse_dict ( msg_or_avp * object, struct dictionary * dict, struct fd_pei * error_info ); /* * FUNCTION: fd_msg_parse_rules * * PARAMETERS: * object : A msg or grouped avp object that must be verified. * dict : The dictionary containing the rules definitions. * error_info : If not NULL, the first problem information will be saved here. * * DESCRIPTION: * Check that the children of the object do not conflict with the dictionary rules (ABNF compliance). * * RETURN VALUE: * 0 : The message has been fully parsed and complies to the defined rules. * EBADMSG : A conflict was detected, or a mandatory AVP is unknown in the dictionary. * EINVAL : The msg or avp object is invalid for this operation. * ENOMEM : Unable to allocate enough memory to complete the operation. */ int fd_msg_parse_rules ( msg_or_avp * object, struct dictionary * dict, struct fd_pei * error_info); /* * FUNCTION: fd_msg_update_length * * PARAMETERS: * object : Pointer to a valid msg or avp. * * DESCRIPTION: * Update the length field of the object passed as parameter. * As a side effect, all children objects are also updated. Therefore, all avp_value fields of * the children AVPs must be set, or an error will occur. * * RETURN VALUE: * 0 : The size has been recomputed. * EINVAL : A parameter is invalid. */ int fd_msg_update_length ( msg_or_avp * object ); /*============================================================*/ /* DISPATCH */ /*============================================================*/ /* Dispatch module (passing incoming messages to extensions registered callbacks) * is split between the library and the daemon. * * The library provides the support for associating dispatch callbacks with * dictionary objects. * * The daemon is responsible for calling the callbacks for a message when appropriate. * * * The dispatch module has two main roles: * - help determine if a message can be handled locally (during the routing step) * This decision involves only the application-id of the message. * - pass the message to the callback(s) that will handle it (during the dispatch step) * * The first role is handled by the daemon. * * About the second, these are the possibilities for registering a dispatch callback: * * -> For All messages. * This callback is called for all messages that are handled locally. This should be used only * for debug purpose. * * -> by AVP value (constants only). * This callback will be called when a message is received and contains an AVP with a specified enumerated value. * * -> by AVP. * This callback will be called when the received message contains a certain AVP. * * -> by command-code. * This callback will be called when the message is a specific command (and 'R' flag). * * -> by application. * This callback will be called when the message has a specific application-id. * * ( by vendor: would this be useful? it may be added later) */ enum disp_how { DISP_HOW_ANY = 1, /* Any message. This should be only used for debug. */ DISP_HOW_APPID, /* Any message with the specified application-id */ DISP_HOW_CC, /* Messages of the specified command-code (request or answer). App id may be specified. */ DISP_HOW_AVP, /* Messages containing a specific AVP. Command-code and App id may be specified. */ DISP_HOW_AVP_ENUMVAL /* Messages containing a specific AVP with a specific enumerated value. Command-code and App id may be specified. */ }; /* * Several criteria may be selected at the same time, for example command-code AND application id. * * If several callbacks are registered for the same object, they are called in the order they were registered. * The order in which the callbacks are called is: * DISP_HOW_ANY * DISP_HOW_AVP_ENUMVAL & DISP_HOW_AVP * DISP_HOW_CC * DISP_HOW_APPID */ /* When a callback is registered, a "when" argument is passed in addition to the disp_how value, * to specify which values the criteria must match. */ struct disp_when { struct dict_object * app; struct dict_object * command; struct dict_object * avp; struct dict_object * value; }; /* Note that all the dictionary objects should really belong to the same dictionary! * * Here is the details on this "when" argument, depending on the disp_how value. * * DISP_HOW_ANY. * In this case, "when" must be NULL. * * DISP_HOW_APPID. * Only the "app_id" field must be set, other fields are ignored. It points to a dictionary object of type DICT_APPLICATION. * * DISP_HOW_CC. * The "command" field must be defined and point to a dictionary object of type DICT_COMMAND. * The "app_id" may be also set. In the case it is set, it restricts the callback to be called only with this command-code and app id. * The other fields are ignored. * * DISP_HOW_AVP. * The "avp" field of the structure must be set and point to a dictionary object of type DICT_AVP. * The "app_id" field may be set to restrict the messages matching to a specific app id. * The "command" field may also be set to a valid DICT_COMMAND object. * The content of the "value" field is ignored. * * DISP_HOW_AVP_ENUMVAL. * All fields have the same constraints and meaning as in DISP_REG_AVP. In addition, the "value" field must be set * and points to a valid DICT_ENUMVAL object. * * Here is a sumary of the fields: ( M : must be set; m : may be set; 0 : ignored ) * field: app_id command avp value * APPID : M 0 0 0 * CC : m M 0 0 * AVP : m m M 0 * ENUMVA: m m M M */ enum disp_action { DISP_ACT_CONT, /* The next handler should be called, unless *msg == NULL. */ DISP_ACT_SEND, /* The updated message must be sent. No further callback is called. */ DISP_ACT_ERROR /* An error must be created and sent as a reply -- not valid for callbacks, only for fd_msg_dispatch. */ }; /* The callbacks that are registered have the following prototype: * int dispatch_callback( struct msg ** msg, struct avp * avp, struct session * session, enum disp_action * action ); * * CALLBACK: dispatch_callback * * PARAMETERS: * msg : the received message on function entry. may be updated to answer on return (see description) * avp : for callbacks registered with DISP_HOW_AVP or DISP_HOW_AVP_ENUMVAL, direct link to the triggering AVP. * session : if the message contains a Session-Id AVP, the corresponding session object, NULL otherwise. * opaque : An opaque pointer that is registered along the session handler. * action : upon return, this tells the daemon what to do next. * * DESCRIPTION: * Called when a received message matchs the condition for which the callback was registered. * This callback may do any kind of processing on the message, including: * - create an answer for a request. * - proxy a request or message, add / remove the Proxy-Info AVP, then forward the message. * - update a routing table or start a connection with a new peer, then forward the message. * - ... * * When *action == DISP_ACT_SEND on callback return, the msg pointed by *msg is passed to the routing module for sending. * When *action == DISP_ACT_CONT, the next registered callback is called. * When the last callback gives also DISP_ACT_CONT action value, a default handler is called. It's behavior is as follow: * - if the message is an answer, it is discarded. * - if the message is a request, it is passed again to the routing stack, and marked as non-local handling. * * RETURN VALUE: * 0 : The callback executed successfully and updated *action appropriately. * !0 : standard errors. In case of error, the message is discarded. */ /* This structure represents a handler for a registered callback, allowing its de-registration */ struct disp_hdl; /* * FUNCTION: fd_disp_register * * PARAMETERS: * cb : The callback function to register (see dispatch_callback description above). * how : How the callback must be registered. * when : Values that must match, depending on the how argument. * opaque : A pointer that is passed back to the handler. The content is not interpreted by the framework. * handle : On success, a handler to the registered callback is stored here if not NULL. * This handler can be used to unregister the cb. * * DESCRIPTION: * Register a new callback to handle messages delivered locally. * * RETURN VALUE: * 0 : The callback is registered. * EINVAL : A parameter is invalid. * ENOMEM : Not enough memory to complete the operation */ int fd_disp_register ( int (*cb)( struct msg **, struct avp *, struct session *, void *, enum disp_action *), enum disp_how how, struct disp_when * when, void * opaque, struct disp_hdl ** handle ); /* * FUNCTION: fd_disp_unregister * * PARAMETERS: * handle : Location of the handle of the callback that must be unregistered. * opaque : If not NULL, the opaque data that was registered is restored here. * * DESCRIPTION: * Removes a callback previously registered by fd_disp_register. * * RETURN VALUE: * 0 : The callback is unregistered. * EINVAL : A parameter is invalid. */ int fd_disp_unregister ( struct disp_hdl ** handle, void ** opaque ); /* Destroy all handlers */ void fd_disp_unregister_all ( void ); /* * FUNCTION: fd_msg_dispatch * * PARAMETERS: * msg : A msg object that have already been fd_msg_parse_dict. * session : The session corresponding to this object, if any. * action : Upon return, the action that must be taken on the message * error_code : Upon return with action == DISP_ACT_ERROR, contains the error (such as "DIAMETER_UNABLE_TO_COMPLY") * drop_reason : if set on return, the message must be freed for this reason. * drop_msg : if drop_reason is set, this points to the message to be freed while *msg is NULL. * * DESCRIPTION: * Call all handlers registered for a given message. * The session must have already been resolved on entry. * The msg pointed may be updated during this process. * Upon return, the action parameter points to what must be done next. * * RETURN VALUE: * 0 : Success. * EINVAL : A parameter is invalid. * (other errors) */ int fd_msg_dispatch ( struct msg ** msg, struct session * session, enum disp_action *action, char ** error_code, char ** drop_reason, struct msg ** drop_msg ); /*============================================================*/ /* QUEUES */ /*============================================================*/ /* Management of FIFO queues of elements */ /* A queue is an opaque object */ struct fifo; /* * FUNCTION: fd_fifo_new * * PARAMETERS: * queue : Upon success, a pointer to the new queue is saved here. * max : max number of items in the queue. Above this number, adding a new item becomes a * blocking operation. Use 0 to disable this maximum. * * DESCRIPTION: * Create a new empty queue. * * RETURN VALUE : * 0 : The queue has been initialized successfully. * EINVAL : The parameter is invalid. * ENOMEM : Not enough memory to complete the creation. */ int fd_fifo_new ( struct fifo ** queue, int max ); /* * FUNCTION: fd_fifo_del * * PARAMETERS: * queue : Pointer to an empty queue to delete. * * DESCRIPTION: * Destroys a queue. This is only possible if no thread is waiting for an element, * and the queue is empty. * * RETURN VALUE: * 0 : The queue has been destroyed successfully. * EINVAL : The parameter is invalid. */ int fd_fifo_del ( struct fifo ** queue ); /* * FUNCTION: fd_fifo_move * * PARAMETERS: * oldq : Location of a FIFO that is to be emptied. * newq : A FIFO that will receive the old data. * loc_update : if non NULL, a place to store the pointer to new FIFO atomically with the move. * * DESCRIPTION: * Empties a queue and move its content to another one atomically. * * RETURN VALUE: * 0 : The queue has been destroyed successfully. * EINVAL : A parameter is invalid. */ int fd_fifo_move ( struct fifo * oldq, struct fifo * newq, struct fifo ** loc_update ); /* * FUNCTION: fd_fifo_getstats * * PARAMETERS: * queue : The queue from which to retrieve the information. * current_count : How many items in the queue at the time of execution. This changes each time an item is pushed or poped. * limit_count : The maximum number of items allowed in this queue. This is specified during queue creation. * highest_count : The maximum number of items this queue has contained. This enables to see if limit_count count was reached. * total_count : the total number of items that went through the queue (already pop'd). Always increasing. * total : Cumulated time all items spent in this queue, including blocking time (always growing, use deltas for monitoring) * blocking : Cumulated time threads trying to post new items were blocked (queue full). * last : For the last element retrieved from the queue, how long it take between posting (including blocking) and poping * * DESCRIPTION: * Retrieve the timing information associated with a queue, for monitoring purpose. * * RETURN VALUE: * 0 : The statistics have been updated. * EINVAL : A parameter is invalid. */ int fd_fifo_getstats( struct fifo * queue, int * current_count, int * limit_count, int * highest_count, long long * total_count, struct timespec * total, struct timespec * blocking, struct timespec * last); /* * FUNCTION: fd_fifo_length * * PARAMETERS: * queue : The queue from which to retrieve the number of elements. * * DESCRIPTION: * Retrieve the number of elements in a queue, without error checking. * * RETURN VALUE: * The number of items currently queued. */ int fd_fifo_length ( struct fifo * queue ); /* * FUNCTION: fd_fifo_setthrhd * * PARAMETERS: * queue : The queue for which the thresholds are being set. * data : An opaque pointer that is passed to h_cb and l_cb callbacks. * high : The high-level threshold. If the number of elements in the queue increase to this value, h_cb is called. * h_cb : if not NULL, a callback to call when the queue lengh is bigger than "high". * low : The low-level threshold. Must be < high. * l_cb : If the number of elements decrease to low, this callback is called. * * DESCRIPTION: * This function allows to adjust the number of producer / consumer threads of a queue. * If the consumer are slower than the producers, the number of elements in the queue increase. * By setting a "high" value, we allow a callback to be called when this number is too high. * The typical use would be to create an additional consumer thread in this callback. * If the queue continues to grow, the callback will be called again when the length is 2 * high, then 3*high, ... N * high * (the callback itself should implement a limit on the number of consumers that can be created) * When the queue starts to decrease, and the number of elements go under ((N - 1) * high + low, the l_cb callback is called * and would typially stop one of the consumer threads. If the queue continues to reduce, l_cb is again called at (N-2)*high + low, * and so on. * * Since there is no destructor for the data pointer, if cleanup operations are required, they should be performed in * l_cb when the length of the queue is becoming < low. * * Note that the callbacks are called synchronously, during fd_fifo_post or fd_fifo_get. Their operation should be quick. * * RETURN VALUE: * 0 : The thresholds have been set * EINVAL : A parameter is invalid. */ int fd_fifo_setthrhd ( struct fifo * queue, void * data, uint16_t high, void (*h_cb)(struct fifo *, void **), uint16_t low, void (*l_cb)(struct fifo *, void **) ); /* * FUNCTION: fd_fifo_post * * PARAMETERS: * queue : The queue in which the element must be posted. * item : The element that is put in the queue. * * DESCRIPTION: * An element is added in a queue. Elements are retrieved from the queue in FIFO order * with the fd_fifo_get, fd_fifo_tryget, or fd_fifo_timedget functions. * * RETURN VALUE: * 0 : The element is queued. * EINVAL : A parameter is invalid. * ENOMEM : Not enough memory to complete the operation. */ int fd_fifo_post_int ( struct fifo * queue, void ** item ); #define fd_fifo_post(queue, item) \ fd_fifo_post_int((queue), (void *)(item)) /* Similar function but does not block. It can cause the number of items in the queue to exceed the maximum set. Do not use for normal operation, only for failure recovery for example. */ int fd_fifo_post_noblock( struct fifo * queue, void ** item ); /* * FUNCTION: fd_fifo_get * * PARAMETERS: * queue : The queue from which the first element must be retrieved. * item : On return, the first element of the queue is stored here. * * DESCRIPTION: * This function retrieves the first element from a queue. If the queue is empty, the function will block the * thread until a new element is posted to the queue, or until the thread is canceled (in which case the * function does not return). * * RETURN VALUE: * 0 : A new element has been retrieved. * EINVAL : A parameter is invalid. */ int fd_fifo_get_int ( struct fifo * queue, void ** item ); #define fd_fifo_get(queue, item) \ fd_fifo_get_int((queue), (void *)(item)) /* * FUNCTION: fd_fifo_tryget * * PARAMETERS: * queue : The queue from which the element must be retrieved. * item : On return, the first element of the queue is stored here. * * DESCRIPTION: * This function is similar to fd_fifo_get, except that it will not block if * the queue is empty, but return EWOULDBLOCK instead. * * RETURN VALUE: * 0 : A new element has been retrieved. * EINVAL : A parameter is invalid. * EWOULDBLOCK : The queue was empty. */ int fd_fifo_tryget_int ( struct fifo * queue, void ** item ); #define fd_fifo_tryget(queue, item) \ fd_fifo_tryget_int((queue), (void *)(item)) /* * FUNCTION: fd_fifo_timedget * * PARAMETERS: * queue : The queue from which the element must be retrieved. * item : On return, the element is stored here. * abstime : the absolute time until which we allow waiting for an item. * * DESCRIPTION: * This function is similar to fd_fifo_get, except that it will block if the queue is empty * only until the absolute time abstime (see pthread_cond_timedwait for + info). * If the queue is still empty when the time expires, the function returns ETIMEDOUT * * RETURN VALUE: * 0 : A new item has been retrieved. * EINVAL : A parameter is invalid. * ETIMEDOUT : The time out has passed and no item has been received. */ int fd_fifo_timedget_int ( struct fifo * queue, void ** item, const struct timespec *abstime ); #define fd_fifo_timedget(queue, item, abstime) \ fd_fifo_timedget_int((queue), (void *)(item), (abstime)) /* * FUNCTION: fd_fifo_select * * PARAMETERS: * queue : The queue to test. * abstime : the absolute time until which we can block waiting for an item. If NULL, the function returns immediatly. * * DESCRIPTION: * This function is similar to select(), it waits for data to be available in the queue * until the abstime is expired. * Upon function entry, even if abstime is already expired the data availability is tested. * * RETURN VALUE: * 0 : timeout expired without available data. * <0 : An error occurred (e.g., -EINVAL...) * >0 : data is available. The next call to fd_fifo_get will not block. */ int fd_fifo_select ( struct fifo * queue, const struct timespec *abstime ); /* Dump a fifo list and optionally its inner elements -- beware of deadlocks! */ typedef DECLARE_FD_DUMP_PROTOTYPE((*fd_fifo_dump_item_cb), void * item); /* This function should be 1 line if possible, or use indent level. Ends with '\n' */ DECLARE_FD_DUMP_PROTOTYPE(fd_fifo_dump, char * name, struct fifo * queue, fd_fifo_dump_item_cb dump_item); #ifdef __cplusplus } #endif #endif /* _LIBFDPROTO_H */ nextepc-0.3.10/lib/freeDiameter-1.2.1/include/freeDiameter/version.h.in000066400000000000000000000002711333553357400253350ustar00rootroot00000000000000/* Following variable is expended at build time based on the result of "hg id" command */ #cmakedefine FD_PROJECT_VERSION_HG #define FD_PROJECT_VERSION_HG_VAL "@FD_PROJECT_VERSION_HG@" nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/000077500000000000000000000000001333553357400210045ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/CMakeLists.txt000066400000000000000000000034301333553357400235440ustar00rootroot00000000000000# The subproject name Project("freeDiameter core library" C) # Configuration for newer cmake cmake_policy(VERSION 2.6) if (POLICY CMP0022) cmake_policy(SET CMP0022 OLD) endif (POLICY CMP0022) # Configuration parser BISON_FILE(fdd.y) FLEX_FILE(fdd.l) SET_SOURCE_FILES_PROPERTIES(lex.fdd.c fdd.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}") # List of source files SET(FDCORE_SRC fdcore-internal.h apps.c cnxctx.h config.c core.c cnxctx.c endpoints.c events.c extensions.c fifo_stats.c hooks.c dict_base_proto.c messages.c queues.c peers.c p_ce.c p_cnx.c p_dw.c p_dp.c p_expiry.c p_out.c p_psm.c p_sr.c routing_dispatch.c server.c tcp.c version.c ) IF(NOT DISABLE_SCTP) SET(FDCORE_SRC ${FDCORE_SRC} sctp.c sctp3436.c) ENDIF(NOT DISABLE_SCTP) SET(FDCORE_GEN_SRC lex.fdd.c fdd.tab.c fdd.tab.h ) # Save the list of files for the tests SET(FDCORE_SRC ${FDCORE_SRC} PARENT_SCOPE) SET(FDCORE_GEN_SRC ${FDCORE_GEN_SRC} PARENT_SCOPE) # Include path INCLUDE_DIRECTORIES(${LFDCORE_INCLUDES}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) # Build the executable ADD_LIBRARY(libfdcore SHARED ${FDCORE_SRC} ${FDCORE_GEN_SRC}) ADD_DEPENDENCIES(libfdcore version_information) # Avoid the liblib name, and set the version SET_TARGET_PROPERTIES(libfdcore PROPERTIES OUTPUT_NAME "fdcore" SOVERSION ${FD_PROJECT_VERSION_API} VERSION ${FD_PROJECT_VERSION_MAJOR}.${FD_PROJECT_VERSION_MINOR}.${FD_PROJECT_VERSION_REV} LINK_INTERFACE_LIBRARIES "${LFDCORE_LINK_INTERFACES}") # The library itself needs other libraries LINK_DIRECTORIES(${CURRENT_BINARY_DIR}/../libfdproto) TARGET_LINK_LIBRARIES(libfdcore libfdproto ${LFDCORE_LIBS}) #### ## INSTALL section ## INSTALL(TARGETS libfdcore LIBRARY DESTINATION ${INSTALL_LIBRARY_SUFFIX} COMPONENT freeDiameter-common) nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/Makefile.am000066400000000000000000000015541333553357400230450ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in pkglib_LTLIBRARIES = libfdcore.la libfdcore_la_SOURCES = \ fdcore-internal.h \ apps.c cnxctx.h config.c core.c cnxctx.c endpoints.c events.c \ extensions.c fifo_stats.c hooks.c dict_base_proto.c messages.c \ queues.c peers.c p_ce.c p_cnx.c p_dw.c p_dp.c p_expiry.c \ p_out.c p_psm.c p_sr.c routing_dispatch.c server.c tcp.c \ fdd.tab.y lex.fdd.l version.c libfdcore_la_DEPENDENCIES = \ $(top_srcdir)/libfdproto/libfdproto.la libfdcore_la_LIBADD = \ $(top_srcdir)/libfdproto/libfdproto.la if SCTP libfdcore_la_SOURCES += sctp.c sctp3436.c endif AM_YFLAGS = -p fdd -d AM_LFLAGS = -p -Cem -Pfdd BUILT_SOURCES = fdd.tab.h AM_LDFLAGS = \ -version-info @LIBVERSION@ AM_CPPFLAGS = \ -I$(top_srcdir)/include AM_CFLAGS = MAINTAINERCLEANFILES = version.h fdd.c Makefile.in MOSTLYCLEANFILES = *.stackdump nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/apps.c000066400000000000000000000116131333553357400221150ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2011, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" /* Merge information into a list of apps */ int fd_app_merge(struct fd_list * list, application_id_t aid, vendor_id_t vid, int auth, int acct) { struct fd_list * li; int skip = 0; /* List is ordered by appid. Avoid duplicates */ for (li = list; li->next != list; li = li->next) { struct fd_app * na = (struct fd_app *)(li->next); if (na->appid < aid) continue; if (na->appid > aid) break; /* Otherwise, we merge with existing entry -- ignore vendor id in this case */ skip = 1; if (auth) na->flags.auth = 1; if (acct) na->flags.acct = 1; break; } if (!skip) { struct fd_app * new = NULL; CHECK_MALLOC( new = malloc(sizeof(struct fd_app)) ); memset(new, 0, sizeof(struct fd_app)); fd_list_init(&new->chain, NULL); new->flags.auth = (auth ? 1 : 0); new->flags.acct = (acct ? 1 : 0); new->vndid = vid; new->appid = aid; fd_list_insert_after(li, &new->chain); } return 0; } /* Check if a given application id is in a list */ int fd_app_check(struct fd_list * list, application_id_t aid, struct fd_app **detail) { struct fd_list * li; TRACE_ENTRY("%p %d %p", list, aid, detail); CHECK_PARAMS(list && detail); *detail = NULL; /* Search in the list */ for (li = list->next; li != list; li = li->next) { struct fd_app * a = (struct fd_app *)li; if (a->appid < aid) continue; if (a->appid == aid) *detail = a; break; } return 0; } /* Check if two lists have at least one common application */ int fd_app_check_common(struct fd_list * list1, struct fd_list * list2, int * common_found) { struct fd_list * li1, *li2; TRACE_ENTRY("%p %p %p", list1, list2, common_found); CHECK_PARAMS( list1 && list2 && common_found ); /* Both lists are ordered, so advance both pointers at the same time */ for (li1 = list1->next, li2 = list2->next; (li1 != list1) && (li2 != list2); ) { struct fd_app * a1 = (struct fd_app *)li1, *a2 = (struct fd_app *)li2; if (a1->appid < a2->appid) { li1 = li1->next; continue; } if (a1->appid > a2->appid) { li2 = li2->next; continue; } /* They are equal, compare the applications */ if ((a1->flags.auth && a2->flags.auth) || (a1->flags.acct && a2->flags.acct)) { /* found! */ *common_found = 1; return 0; } /* This application is not common, advance both lists */ li1 = li1->next; li2 = li2->next; } /* We did not find a common app */ *common_found = 0; return 0; } /* Remove the apps from a list */ int fd_app_empty(struct fd_list * list) { TRACE_ENTRY("%p", list); CHECK_PARAMS( list ); while (!FD_IS_LIST_EMPTY(list)) { struct fd_list * li = list->next; fd_list_unlink(li); free(li); } return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/cnxctx.c000066400000000000000000002027271333553357400224710ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2015, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" #include "cnxctx.h" #include #include /* for getifaddrs */ #include /* writev */ /* The maximum size of Diameter message we accept to receive (<= 2^24) to avoid too big mallocs in case of trashed headers */ #ifndef DIAMETER_MSG_SIZE_MAX #define DIAMETER_MSG_SIZE_MAX 65535 /* in bytes */ #endif /* DIAMETER_MSG_SIZE_MAX */ /* Connections contexts (cnxctx) in freeDiameter are wrappers around the sockets and TLS operations . * They are used to hide the details of the processing to the higher layers of the daemon. * They are always oriented on connections (TCP or SCTP), connectionless modes (UDP or SCTP) are not supported. */ /* Lifetime of a cnxctx object: * 1) Creation * a) a server socket: * - create the object with fd_cnx_serv_tcp or fd_cnx_serv_sctp * - start listening incoming connections: fd_cnx_serv_listen * - accept new clients with fd_cnx_serv_accept. * b) a client socket: * - connect to a remote server with fd_cnx_cli_connect * * 2) Initialization * - if TLS is started first, call fd_cnx_handshake * - otherwise to receive clear messages, call fd_cnx_start_clear. fd_cnx_handshake can be called later. * * 3) Usage * - fd_cnx_receive, fd_cnx_send : exchange messages on this connection (send is synchronous, receive is not, but blocking). * - fd_cnx_recv_setaltfifo : when a message is received, the event is sent to an external fifo list. fd_cnx_receive does not work when the alt_fifo is set. * - fd_cnx_getid : retrieve a descriptive string for the connection (for debug) * - fd_cnx_getremoteid : identification of the remote peer (IP address or fqdn) * - fd_cnx_getcred : get the remote peer TLS credentials, after handshake * * 4) End * - fd_cnx_destroy */ /*******************************************/ /* Creation of a connection object */ /*******************************************/ /* Initialize a context structure */ static struct cnxctx * fd_cnx_init(int full) { struct cnxctx * conn = NULL; TRACE_ENTRY("%d", full); CHECK_MALLOC_DO( conn = malloc(sizeof(struct cnxctx)), return NULL ); memset(conn, 0, sizeof(struct cnxctx)); if (full) { CHECK_FCT_DO( fd_fifo_new ( &conn->cc_incoming, 5 ), return NULL ); } return conn; } #define CC_ID_HDR "{----} " /* Create and bind a server socket to the given endpoint and port */ struct cnxctx * fd_cnx_serv_tcp(uint16_t port, int family, struct fd_endpoint * ep) { struct cnxctx * cnx = NULL; sSS dummy; sSA * sa = (sSA *) &dummy; TRACE_ENTRY("%hu %d %p", port, family, ep); CHECK_PARAMS_DO( port, return NULL ); CHECK_PARAMS_DO( ep || family, return NULL ); CHECK_PARAMS_DO( (! family) || (family == AF_INET) || (family == AF_INET6), return NULL ); CHECK_PARAMS_DO( (! ep) || (ep->ss.ss_family == AF_INET) || (ep->ss.ss_family == AF_INET6), return NULL ); CHECK_PARAMS_DO( (! ep) || (!family) || (ep->ss.ss_family == family), return NULL ); /* The connection object */ CHECK_MALLOC_DO( cnx = fd_cnx_init(0), return NULL ); /* Prepare the socket address information */ if (ep) { memcpy(sa, &ep->ss, sizeof(sSS)); } else { memset(&dummy, 0, sizeof(dummy)); sa->sa_family = family; } if (sa->sa_family == AF_INET) { ((sSA4 *)sa)->sin_port = htons(port); cnx->cc_family = AF_INET; } else { ((sSA6 *)sa)->sin6_port = htons(port); cnx->cc_family = AF_INET6; } /* Create the socket */ CHECK_FCT_DO( fd_tcp_create_bind_server( &cnx->cc_socket, sa, sSAlen(sa) ), goto error ); /* Generate the name for the connection object */ { char addrbuf[INET6_ADDRSTRLEN]; int rc; rc = getnameinfo(sa, sSAlen(sa), addrbuf, sizeof(addrbuf), NULL, 0, NI_NUMERICHOST); if (rc) snprintf(addrbuf, sizeof(addrbuf), "[err:%s]", gai_strerror(rc)); snprintf(cnx->cc_id, sizeof(cnx->cc_id), CC_ID_HDR "TCP srv [%s]:%hu (%d)", addrbuf, port, cnx->cc_socket); } cnx->cc_proto = IPPROTO_TCP; return cnx; error: fd_cnx_destroy(cnx); return NULL; } /* Same function for SCTP, with a list of local endpoints to bind to */ struct cnxctx * fd_cnx_serv_sctp(uint16_t port, struct fd_list * ep_list) { #ifdef DISABLE_SCTP TRACE_DEBUG(INFO, "This function should never been called when SCTP is disabled..."); ASSERT(0); CHECK_FCT_DO( ENOTSUP, ); return NULL; #else /* DISABLE_SCTP */ struct cnxctx * cnx = NULL; TRACE_ENTRY("%hu %p", port, ep_list); CHECK_PARAMS_DO( port, return NULL ); /* The connection object */ CHECK_MALLOC_DO( cnx = fd_cnx_init(0), return NULL ); if (fd_g_config->cnf_flags.no_ip6) { cnx->cc_family = AF_INET; } else { cnx->cc_family = AF_INET6; /* can create socket for both IP and IPv6 */ } /* Create the socket */ CHECK_FCT_DO( fd_sctp_create_bind_server( &cnx->cc_socket, cnx->cc_family, ep_list, port ), goto error ); /* Generate the name for the connection object */ snprintf(cnx->cc_id, sizeof(cnx->cc_id), CC_ID_HDR "SCTP srv :%hu (%d)", port, cnx->cc_socket); cnx->cc_proto = IPPROTO_SCTP; return cnx; error: fd_cnx_destroy(cnx); return NULL; #endif /* DISABLE_SCTP */ } /* Allow clients to connect on the server socket */ int fd_cnx_serv_listen(struct cnxctx * conn) { CHECK_PARAMS( conn ); switch (conn->cc_proto) { case IPPROTO_TCP: CHECK_FCT(fd_tcp_listen(conn->cc_socket)); break; #ifndef DISABLE_SCTP case IPPROTO_SCTP: CHECK_FCT(fd_sctp_listen(conn->cc_socket)); break; #endif /* DISABLE_SCTP */ default: CHECK_PARAMS(0); } return 0; } /* Accept a client (blocking until a new client connects) -- cancelable */ struct cnxctx * fd_cnx_serv_accept(struct cnxctx * serv) { struct cnxctx * cli = NULL; sSS ss; socklen_t ss_len = sizeof(ss); int cli_sock = 0; TRACE_ENTRY("%p", serv); CHECK_PARAMS_DO(serv, return NULL); /* Accept the new connection -- this is blocking until new client enters or until cancellation */ CHECK_SYS_DO( cli_sock = accept(serv->cc_socket, (sSA *)&ss, &ss_len), return NULL ); CHECK_MALLOC_DO( cli = fd_cnx_init(1), { shutdown(cli_sock, SHUT_RDWR); close(cli_sock); return NULL; } ); cli->cc_socket = cli_sock; cli->cc_family = serv->cc_family; cli->cc_proto = serv->cc_proto; /* Set the timeout */ fd_cnx_s_setto(cli->cc_socket); /* Generate the name for the connection object */ { char addrbuf[INET6_ADDRSTRLEN]; char portbuf[10]; int rc; rc = getnameinfo((sSA *)&ss, ss_len, addrbuf, sizeof(addrbuf), portbuf, sizeof(portbuf), NI_NUMERICHOST | NI_NUMERICSERV); if (rc) { snprintf(addrbuf, sizeof(addrbuf), "[err:%s]", gai_strerror(rc)); portbuf[0] = '\0'; } /* Numeric values for debug... */ snprintf(cli->cc_id, sizeof(cli->cc_id), CC_ID_HDR "%s from [%s]:%s (%d<-%d)", IPPROTO_NAME(cli->cc_proto), addrbuf, portbuf, serv->cc_socket, cli->cc_socket); /* ...Name for log messages */ rc = getnameinfo((sSA *)&ss, ss_len, cli->cc_remid, sizeof(cli->cc_remid), NULL, 0, NI_NUMERICHOST); if (rc) snprintf(cli->cc_remid, sizeof(cli->cc_remid), "[err:%s]", gai_strerror(rc)); } LOG_D("Incoming connection: '%s' <- '%s' {%s}", fd_cnx_getid(serv), cli->cc_remid, cli->cc_id); #ifndef DISABLE_SCTP /* SCTP-specific handlings */ if (cli->cc_proto == IPPROTO_SCTP) { /* Retrieve the number of streams */ CHECK_FCT_DO( fd_sctp_get_str_info( cli->cc_socket, &cli->cc_sctp_para.str_in, &cli->cc_sctp_para.str_out, NULL ), {fd_cnx_destroy(cli); return NULL;} ); if (cli->cc_sctp_para.str_out < cli->cc_sctp_para.str_in) cli->cc_sctp_para.pairs = cli->cc_sctp_para.str_out; else cli->cc_sctp_para.pairs = cli->cc_sctp_para.str_in; LOG_A( "%s : client '%s' (SCTP:%d, %d/%d streams)", fd_cnx_getid(serv), fd_cnx_getid(cli), cli->cc_socket, cli->cc_sctp_para.str_in, cli->cc_sctp_para.str_out); } #endif /* DISABLE_SCTP */ return cli; } /* Client side: connect to a remote server -- cancelable */ struct cnxctx * fd_cnx_cli_connect_tcp(sSA * sa /* contains the port already */, socklen_t addrlen) { int sock = 0; struct cnxctx * cnx = NULL; char sa_buf[sSA_DUMP_STRLEN]; TRACE_ENTRY("%p %d", sa, addrlen); CHECK_PARAMS_DO( sa && addrlen, return NULL ); fd_sa_sdump_numeric(sa_buf, sa); LOG_D("Connecting to TCP %s...", sa_buf); /* Create the socket and connect, which can take some time and/or fail */ { int ret = fd_tcp_client( &sock, sa, addrlen ); if (ret != 0) { LOG_D("TCP connection to %s failed: %s", sa_buf, strerror(ret)); return NULL; } } /* Once the socket is created successfuly, prepare the remaining of the cnx */ CHECK_MALLOC_DO( cnx = fd_cnx_init(1), { shutdown(sock, SHUT_RDWR); close(sock); return NULL; } ); cnx->cc_socket = sock; cnx->cc_family = sa->sa_family; cnx->cc_proto = IPPROTO_TCP; /* Set the timeout */ fd_cnx_s_setto(cnx->cc_socket); /* Generate the names for the object */ { int rc; snprintf(cnx->cc_id, sizeof(cnx->cc_id), CC_ID_HDR "TCP,#%d->%s", cnx->cc_socket, sa_buf); /* ...Name for log messages */ rc = getnameinfo(sa, addrlen, cnx->cc_remid, sizeof(cnx->cc_remid), NULL, 0, NI_NUMERICHOST); if (rc) snprintf(cnx->cc_remid, sizeof(cnx->cc_remid), "[err:%s]", gai_strerror(rc)); } LOG_A("TCP connection to %s succeed (socket:%d).", sa_buf, sock); return cnx; } /* Same for SCTP, accepts a list of remote addresses to connect to (see sctp_connectx for how they are used) */ struct cnxctx * fd_cnx_cli_connect_sctp(int no_ip6, uint16_t port, struct fd_list * list) { #ifdef DISABLE_SCTP TRACE_DEBUG(INFO, "This function should never be called when SCTP is disabled..."); ASSERT(0); CHECK_FCT_DO( ENOTSUP, ); return NULL; #else /* DISABLE_SCTP */ int sock = 0; struct cnxctx * cnx = NULL; char sa_buf[sSA_DUMP_STRLEN]; sSS primary; TRACE_ENTRY("%p", list); CHECK_PARAMS_DO( list && !FD_IS_LIST_EMPTY(list), return NULL ); fd_sa_sdump_numeric(sa_buf, &((struct fd_endpoint *)(list->next))->sa); LOG_D("Connecting to SCTP %s:%hu...", sa_buf, port); { int ret = fd_sctp_client( &sock, no_ip6, port, list ); if (ret != 0) { LOG_D("SCTP connection to [%s,...] failed: %s", sa_buf, strerror(ret)); return NULL; } } /* Once the socket is created successfuly, prepare the remaining of the cnx */ CHECK_MALLOC_DO( cnx = fd_cnx_init(1), { shutdown(sock, SHUT_RDWR); close(sock); return NULL; } ); cnx->cc_socket = sock; cnx->cc_family = no_ip6 ? AF_INET : AF_INET6; cnx->cc_proto = IPPROTO_SCTP; /* Set the timeout */ fd_cnx_s_setto(cnx->cc_socket); /* Retrieve the number of streams and primary address */ CHECK_FCT_DO( fd_sctp_get_str_info( sock, &cnx->cc_sctp_para.str_in, &cnx->cc_sctp_para.str_out, &primary ), goto error ); if (cnx->cc_sctp_para.str_out < cnx->cc_sctp_para.str_in) cnx->cc_sctp_para.pairs = cnx->cc_sctp_para.str_out; else cnx->cc_sctp_para.pairs = cnx->cc_sctp_para.str_in; fd_sa_sdump_numeric(sa_buf, (sSA *)&primary); /* Generate the names for the object */ { int rc; snprintf(cnx->cc_id, sizeof(cnx->cc_id), CC_ID_HDR "SCTP,#%d->%s", cnx->cc_socket, sa_buf); /* ...Name for log messages */ rc = getnameinfo((sSA *)&primary, sSAlen(&primary), cnx->cc_remid, sizeof(cnx->cc_remid), NULL, 0, NI_NUMERICHOST); if (rc) snprintf(cnx->cc_remid, sizeof(cnx->cc_remid), "[err:%s]", gai_strerror(rc)); } LOG_A("SCTP connection to %s succeed (socket:%d, %d/%d streams).", sa_buf, sock, cnx->cc_sctp_para.str_in, cnx->cc_sctp_para.str_out); return cnx; error: fd_cnx_destroy(cnx); return NULL; #endif /* DISABLE_SCTP */ } /* Return a string describing the connection, for debug */ char * fd_cnx_getid(struct cnxctx * conn) { CHECK_PARAMS_DO( conn, return "" ); return conn->cc_id; } /* Return the protocol of a connection */ int fd_cnx_getproto(struct cnxctx * conn) { CHECK_PARAMS_DO( conn, return 0 ); return conn->cc_proto; } /* Set the hostname to check during handshake */ void fd_cnx_sethostname(struct cnxctx * conn, DiamId_t hn) { CHECK_PARAMS_DO( conn, return ); conn->cc_tls_para.cn = hn; } /* We share a lock with many threads but we hold it only very short time so it is OK */ static pthread_mutex_t state_lock = PTHREAD_MUTEX_INITIALIZER; uint32_t fd_cnx_getstate(struct cnxctx * conn) { uint32_t st; CHECK_POSIX_DO( pthread_mutex_lock(&state_lock), { ASSERT(0); } ); st = conn->cc_state; CHECK_POSIX_DO( pthread_mutex_unlock(&state_lock), { ASSERT(0); } ); return st; } int fd_cnx_teststate(struct cnxctx * conn, uint32_t flag) { uint32_t st; CHECK_POSIX_DO( pthread_mutex_lock(&state_lock), { ASSERT(0); } ); st = conn->cc_state; CHECK_POSIX_DO( pthread_mutex_unlock(&state_lock), { ASSERT(0); } ); return st & flag; } void fd_cnx_update_id(struct cnxctx * conn) { if (conn->cc_state & CC_STATUS_CLOSING) conn->cc_id[1] = 'C'; else conn->cc_id[1] = '-'; if (conn->cc_state & CC_STATUS_ERROR) conn->cc_id[2] = 'E'; else conn->cc_id[2] = '-'; if (conn->cc_state & CC_STATUS_SIGNALED) conn->cc_id[3] = 'S'; else conn->cc_id[3] = '-'; if (conn->cc_state & CC_STATUS_TLS) conn->cc_id[4] = 'T'; else conn->cc_id[4] = '-'; } void fd_cnx_addstate(struct cnxctx * conn, uint32_t orstate) { CHECK_POSIX_DO( pthread_mutex_lock(&state_lock), { ASSERT(0); } ); conn->cc_state |= orstate; fd_cnx_update_id(conn); CHECK_POSIX_DO( pthread_mutex_unlock(&state_lock), { ASSERT(0); } ); } void fd_cnx_setstate(struct cnxctx * conn, uint32_t abstate) { CHECK_POSIX_DO( pthread_mutex_lock(&state_lock), { ASSERT(0); } ); conn->cc_state = abstate; fd_cnx_update_id(conn); CHECK_POSIX_DO( pthread_mutex_unlock(&state_lock), { ASSERT(0); } ); } /* Return the TLS state of a connection */ int fd_cnx_getTLS(struct cnxctx * conn) { CHECK_PARAMS_DO( conn, return 0 ); return fd_cnx_teststate(conn, CC_STATUS_TLS); } /* Mark the connection to tell if OOO delivery is permitted (only for SCTP) */ int fd_cnx_unordered_delivery(struct cnxctx * conn, int is_allowed) { CHECK_PARAMS( conn ); conn->cc_sctp_para.unordered = is_allowed; return 0; } /* Return true if the connection supports unordered delivery of messages */ int fd_cnx_is_unordered_delivery_supported(struct cnxctx * conn) { CHECK_PARAMS_DO( conn, return 0 ); #ifndef DISABLE_SCTP if (conn->cc_proto == IPPROTO_SCTP) return (conn->cc_sctp_para.str_out > 1); #endif /* DISABLE_SCTP */ return 0; } /* Get the list of endpoints (IP addresses) of the local and remote peers on this connection */ int fd_cnx_getremoteeps(struct cnxctx * conn, struct fd_list * eps) { TRACE_ENTRY("%p %p", conn, eps); CHECK_PARAMS(conn && eps); /* Check we have a full connection object, not a listening socket (with no remote) */ CHECK_PARAMS( conn->cc_incoming ); /* Retrieve the peer endpoint(s) of the connection */ switch (conn->cc_proto) { case IPPROTO_TCP: { sSS ss; socklen_t sl; CHECK_FCT(fd_tcp_get_remote_ep(conn->cc_socket, &ss, &sl)); CHECK_FCT(fd_ep_add_merge( eps, (sSA *)&ss, sl, EP_FL_LL | EP_FL_PRIMARY )); } break; #ifndef DISABLE_SCTP case IPPROTO_SCTP: { CHECK_FCT(fd_sctp_get_remote_ep(conn->cc_socket, eps)); } break; #endif /* DISABLE_SCTP */ default: CHECK_PARAMS(0); } return 0; } /* Get a string describing the remote peer address (ip address or fqdn) */ char * fd_cnx_getremoteid(struct cnxctx * conn) { CHECK_PARAMS_DO( conn, return "" ); return conn->cc_remid; } static int fd_cnx_may_dtls(struct cnxctx * conn); /* Get a short string representing the connection */ int fd_cnx_proto_info(struct cnxctx * conn, char * buf, size_t len) { CHECK_PARAMS( conn ); if (fd_cnx_teststate(conn, CC_STATUS_TLS)) { snprintf(buf, len, "%s,%s,soc#%d", IPPROTO_NAME(conn->cc_proto), fd_cnx_may_dtls(conn) ? "DTLS" : "TLS", conn->cc_socket); } else { snprintf(buf, len, "%s,soc#%d", IPPROTO_NAME(conn->cc_proto), conn->cc_socket); } return 0; } /* Retrieve a list of all IP addresses of the local system from the kernel, using getifaddrs */ int fd_cnx_get_local_eps(struct fd_list * list) { struct ifaddrs *iflist, *cur; CHECK_SYS(getifaddrs(&iflist)); for (cur = iflist; cur != NULL; cur = cur->ifa_next) { if (cur->ifa_flags & IFF_LOOPBACK) continue; if (cur->ifa_addr == NULL) /* may happen with ppp interfaces */ continue; if (fd_g_config->cnf_flags.no_ip4 && (cur->ifa_addr->sa_family == AF_INET)) continue; if (fd_g_config->cnf_flags.no_ip6 && (cur->ifa_addr->sa_family == AF_INET6)) continue; CHECK_FCT(fd_ep_add_merge( list, cur->ifa_addr, sSAlen(cur->ifa_addr), EP_FL_LL )); } freeifaddrs(iflist); return 0; } /**************************************/ /* Use of a connection object */ /**************************************/ /* An error occurred on the socket */ void fd_cnx_markerror(struct cnxctx * conn) { TRACE_ENTRY("%p", conn); CHECK_PARAMS_DO( conn, goto fatal ); TRACE_DEBUG(FULL, "Error flag set for socket %d (%s, %s)", conn->cc_socket, conn->cc_id, conn->cc_remid); /* Mark the error */ fd_cnx_addstate(conn, CC_STATUS_ERROR); /* Report the error if not reported yet, and not closing */ if (!fd_cnx_teststate(conn, CC_STATUS_CLOSING | CC_STATUS_SIGNALED )) { TRACE_DEBUG(FULL, "Sending FDEVP_CNX_ERROR event"); CHECK_FCT_DO( fd_event_send( fd_cnx_target_queue(conn), FDEVP_CNX_ERROR, 0, NULL), goto fatal); fd_cnx_addstate(conn, CC_STATUS_SIGNALED); } return; fatal: /* An unrecoverable error occurred, stop the daemon */ ASSERT(0); CHECK_FCT_DO(fd_core_shutdown(), ); } /* Set the timeout option on the socket */ void fd_cnx_s_setto(int sock) { struct timeval tv; /* Set a timeout on the socket so that in any case we are not stuck waiting for something */ memset(&tv, 0, sizeof(tv)); tv.tv_usec = 100000L; /* 100ms, to react quickly to head-of-the-line blocking. */ CHECK_SYS_DO( setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(tv)), ); CHECK_SYS_DO( setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO, &tv, sizeof(tv)), ); } #ifdef GNUTLS_VERSION_300 /* The pull_timeout function for gnutls */ static int fd_cnx_s_select (struct cnxctx * conn, unsigned int ms) { fd_set rfds; struct timeval tv; FD_ZERO (&rfds); FD_SET (conn->cc_socket, &rfds); tv.tv_sec = ms / 1000; tv.tv_usec = (ms * 1000) % 1000000; return select (conn->cc_socket + 1, &rfds, NULL, NULL, &tv); } #endif /* GNUTLS_VERSION_300 */ /* A recv-like function, taking a cnxctx object instead of socket as entry. We use it to quickly react to timeouts without traversing GNUTLS wrapper each time */ ssize_t fd_cnx_s_recv(struct cnxctx * conn, void *buffer, size_t length) { ssize_t ret = 0; int timedout = 0; again: ret = recv(conn->cc_socket, buffer, length, 0); /* Handle special case of timeout / interrupts */ if ((ret < 0) && ((errno == EAGAIN) || (errno == EINTR))) { pthread_testcancel(); if (! fd_cnx_teststate(conn, CC_STATUS_CLOSING )) goto again; /* don't care, just ignore */ if (!timedout) { timedout ++; /* allow for one timeout while closing */ goto again; } } /* Mark the error */ if (ret <= 0) { CHECK_SYS_DO(ret, /* continue, this is only used to log the error here */); fd_cnx_markerror(conn); } return ret; } /* Send */ static ssize_t fd_cnx_s_sendv(struct cnxctx * conn, const struct iovec * iov, int iovcnt) { ssize_t ret = 0; struct timespec ts, now; CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &ts), return -1 ); again: ret = writev(conn->cc_socket, iov, iovcnt); /* Handle special case of timeout */ if ((ret < 0) && ((errno == EAGAIN) || (errno == EINTR))) { ret = -errno; pthread_testcancel(); /* Check how much time we were blocked for this sending. */ CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &now), return -1 ); if ( ((now.tv_sec - ts.tv_sec) * 1000 + ((now.tv_nsec - ts.tv_nsec) / 1000000L)) > MAX_HOTL_BLOCKING_TIME) { LOG_D("Unable to send any data for %dms, closing the connection", MAX_HOTL_BLOCKING_TIME); } else if (! fd_cnx_teststate(conn, CC_STATUS_CLOSING )) { goto again; /* don't care, just ignore */ } /* propagate the error */ errno = -ret; ret = -1; CHECK_SYS_DO(ret, /* continue */); } /* Mark the error */ if (ret <= 0) fd_cnx_markerror(conn); return ret; } /* Send, for older GNUTLS */ #ifndef GNUTLS_VERSION_212 static ssize_t fd_cnx_s_send(struct cnxctx * conn, const void *buffer, size_t length) { struct iovec iov; iov.iov_base = (void *)buffer; iov.iov_len = length; return fd_cnx_s_sendv(conn, &iov, 1); } #endif /* GNUTLS_VERSION_212 */ #define ALIGNOF(t) ((char *)(&((struct { char c; t _h; } *)0)->_h) - (char *)0) /* Could use __alignof__(t) on some systems but this is more portable probably */ #define PMDL_PADDED(len) ( ((len) + ALIGNOF(struct fd_msg_pmdl) - 1) & ~(ALIGNOF(struct fd_msg_pmdl) - 1) ) size_t fd_msg_pmdl_sizewithoverhead(size_t datalen) { return PMDL_PADDED(datalen) + sizeof(struct fd_msg_pmdl); } struct fd_msg_pmdl * fd_msg_pmdl_get_inbuf(uint8_t * buf, size_t datalen) { return (struct fd_msg_pmdl *)(buf + PMDL_PADDED(datalen)); } static int fd_cnx_init_msg_buffer(uint8_t * buffer, size_t expected_len, struct fd_msg_pmdl ** pmdl) { *pmdl = fd_msg_pmdl_get_inbuf(buffer, expected_len); fd_list_init(&(*pmdl)->sentinel, NULL); CHECK_POSIX(pthread_mutex_init(&(*pmdl)->lock, NULL) ); return 0; } static uint8_t * fd_cnx_alloc_msg_buffer(size_t expected_len, struct fd_msg_pmdl ** pmdl) { uint8_t * ret = NULL; CHECK_MALLOC_DO( ret = malloc( fd_msg_pmdl_sizewithoverhead(expected_len) ), return NULL ); CHECK_FCT_DO( fd_cnx_init_msg_buffer(ret, expected_len, pmdl), {free(ret); return NULL;} ); return ret; } #ifndef DISABLE_SCTP /* WE use this function only in SCTP code */ static uint8_t * fd_cnx_realloc_msg_buffer(uint8_t * buffer, size_t expected_len, struct fd_msg_pmdl ** pmdl) { uint8_t * ret = NULL; CHECK_MALLOC_DO( ret = realloc( buffer, fd_msg_pmdl_sizewithoverhead(expected_len) ), return NULL ); CHECK_FCT_DO( fd_cnx_init_msg_buffer(ret, expected_len, pmdl), {free(ret); return NULL;} ); return ret; } #endif /* DISABLE_SCTP */ static void free_rcvdata(void * arg) { struct fd_cnx_rcvdata * data = arg; struct fd_msg_pmdl * pmdl = fd_msg_pmdl_get_inbuf(data->buffer, data->length); (void) pthread_mutex_destroy(&pmdl->lock); free(data->buffer); } /* Receiver thread (TCP & noTLS) : incoming message is directly saved into the target queue */ static void * rcvthr_notls_tcp(void * arg) { struct cnxctx * conn = arg; TRACE_ENTRY("%p", arg); CHECK_PARAMS_DO(conn && (conn->cc_socket > 0), goto out); /* Set the thread name */ { char buf[48]; snprintf(buf, sizeof(buf), "Receiver (%d) TCP/noTLS)", conn->cc_socket); fd_log_threadname ( buf ); } ASSERT( conn->cc_proto == IPPROTO_TCP ); ASSERT( ! fd_cnx_teststate(conn, CC_STATUS_TLS ) ); ASSERT( fd_cnx_target_queue(conn) ); /* Receive from a TCP connection: we have to rebuild the message boundaries */ do { uint8_t header[4]; struct fd_cnx_rcvdata rcv_data; struct fd_msg_pmdl *pmdl=NULL; ssize_t ret = 0; size_t received = 0; do { ret = fd_cnx_s_recv(conn, &header[received], sizeof(header) - received); if (ret <= 0) { goto out; /* Stop the thread, the event was already sent */ } received += ret; if (header[0] != DIAMETER_VERSION) break; /* No need to wait for 4 bytes in this case */ } while (received < sizeof(header)); rcv_data.length = ((size_t)header[1] << 16) + ((size_t)header[2] << 8) + (size_t)header[3]; /* Check the received word is a valid begining of a Diameter message */ if ((header[0] != DIAMETER_VERSION) /* defined in */ || (rcv_data.length > DIAMETER_MSG_SIZE_MAX)) { /* to avoid too big mallocs */ /* The message is suspect */ LOG_E( "Received suspect header [ver: %d, size: %zd] from '%s', assuming disconnection", (int)header[0], rcv_data.length, conn->cc_remid); fd_cnx_markerror(conn); goto out; /* Stop the thread, the recipient of the event will cleanup */ } /* Ok, now we can really receive the data */ CHECK_MALLOC_DO( rcv_data.buffer = fd_cnx_alloc_msg_buffer( rcv_data.length, &pmdl ), goto fatal ); memcpy(rcv_data.buffer, header, sizeof(header)); while (received < rcv_data.length) { pthread_cleanup_push(free_rcvdata, &rcv_data); /* In case we are canceled, clean the partialy built buffer */ ret = fd_cnx_s_recv(conn, rcv_data.buffer + received, rcv_data.length - received); pthread_cleanup_pop(0); if (ret <= 0) { free_rcvdata(&rcv_data); goto out; } received += ret; } fd_hook_call(HOOK_DATA_RECEIVED, NULL, NULL, &rcv_data, pmdl); /* We have received a complete message, pass it to the daemon */ CHECK_FCT_DO( fd_event_send( fd_cnx_target_queue(conn), FDEVP_CNX_MSG_RECV, rcv_data.length, rcv_data.buffer), { free_rcvdata(&rcv_data); goto fatal; } ); } while (conn->cc_loop); out: TRACE_DEBUG(FULL, "Thread terminated"); return NULL; fatal: /* An unrecoverable error occurred, stop the daemon */ CHECK_FCT_DO(fd_core_shutdown(), ); goto out; } #ifndef DISABLE_SCTP /* Receiver thread (SCTP & noTLS) : incoming message is directly saved into cc_incoming, no need to care for the stream ID */ static void * rcvthr_notls_sctp(void * arg) { struct cnxctx * conn = arg; struct fd_cnx_rcvdata rcv_data; int event; TRACE_ENTRY("%p", arg); CHECK_PARAMS_DO(conn && (conn->cc_socket > 0), goto fatal); /* Set the thread name */ { char buf[48]; snprintf(buf, sizeof(buf), "Receiver (%d) SCTP/noTLS)", conn->cc_socket); fd_log_threadname ( buf ); } ASSERT( conn->cc_proto == IPPROTO_SCTP ); ASSERT( ! fd_cnx_teststate(conn, CC_STATUS_TLS ) ); ASSERT( fd_cnx_target_queue(conn) ); do { struct fd_msg_pmdl *pmdl=NULL; CHECK_FCT_DO( fd_sctp_recvmeta(conn, NULL, &rcv_data.buffer, &rcv_data.length, &event), goto fatal ); if (event == FDEVP_CNX_ERROR) { fd_cnx_markerror(conn); goto out; } if (event == FDEVP_CNX_SHUTDOWN) { /* Just ignore the notification for now, we will get another error later anyway */ continue; } if (event == FDEVP_CNX_MSG_RECV) { CHECK_MALLOC_DO( rcv_data.buffer = fd_cnx_realloc_msg_buffer(rcv_data.buffer, rcv_data.length, &pmdl), goto fatal ); fd_hook_call(HOOK_DATA_RECEIVED, NULL, NULL, &rcv_data, pmdl); } CHECK_FCT_DO( fd_event_send( fd_cnx_target_queue(conn), event, rcv_data.length, rcv_data.buffer), goto fatal ); } while (conn->cc_loop || (event != FDEVP_CNX_MSG_RECV)); out: TRACE_DEBUG(FULL, "Thread terminated"); return NULL; fatal: /* An unrecoverable error occurred, stop the daemon */ CHECK_FCT_DO(fd_core_shutdown(), ); goto out; } #endif /* DISABLE_SCTP */ /* Start receving messages in clear (no TLS) on the connection */ int fd_cnx_start_clear(struct cnxctx * conn, int loop) { TRACE_ENTRY("%p %i", conn, loop); CHECK_PARAMS( conn && fd_cnx_target_queue(conn) && (!fd_cnx_teststate(conn, CC_STATUS_TLS)) && (!conn->cc_loop)); /* Release resources in case of a previous call was already made */ CHECK_FCT_DO( fd_thr_term(&conn->cc_rcvthr), /* continue */); /* Save the loop request */ conn->cc_loop = loop; switch (conn->cc_proto) { case IPPROTO_TCP: /* Start the tcp_notls thread */ CHECK_POSIX( pthread_create( &conn->cc_rcvthr, NULL, rcvthr_notls_tcp, conn ) ); break; #ifndef DISABLE_SCTP case IPPROTO_SCTP: /* Start the tcp_notls thread */ CHECK_POSIX( pthread_create( &conn->cc_rcvthr, NULL, rcvthr_notls_sctp, conn ) ); break; #endif /* DISABLE_SCTP */ default: TRACE_DEBUG(INFO, "Unknown protocol: %d", conn->cc_proto); ASSERT(0); return ENOTSUP; } return 0; } /* Returns 0 on error, received data size otherwise (always >= 0). This is not used for DTLS-protected associations. */ static ssize_t fd_tls_recv_handle_error(struct cnxctx * conn, gnutls_session_t session, void * data, size_t sz) { ssize_t ret; again: CHECK_GNUTLS_DO( ret = gnutls_record_recv(session, data, sz), { switch (ret) { case GNUTLS_E_REHANDSHAKE: if (!fd_cnx_teststate(conn, CC_STATUS_CLOSING)) { CHECK_GNUTLS_DO( ret = gnutls_handshake(session), { if (TRACE_BOOL(INFO)) { fd_log_debug("TLS re-handshake failed on socket %d (%s) : %s", conn->cc_socket, conn->cc_id, gnutls_strerror(ret)); } goto end; } ); } case GNUTLS_E_AGAIN: case GNUTLS_E_INTERRUPTED: if (!fd_cnx_teststate(conn, CC_STATUS_CLOSING)) goto again; TRACE_DEBUG(FULL, "Connection is closing, so abord gnutls_record_recv now."); break; case GNUTLS_E_UNEXPECTED_PACKET_LENGTH: /* The connection is closed */ TRACE_DEBUG(FULL, "Got 0 size while reading the socket, probably connection closed..."); break; default: if (gnutls_error_is_fatal (ret) == 0) { LOG_N("Ignoring non-fatal GNU TLS error: %s", gnutls_strerror (ret)); goto again; } LOG_E("Fatal GNUTLS error: %s", gnutls_strerror (ret)); } } ); if (ret == 0) CHECK_GNUTLS_DO( gnutls_bye(session, GNUTLS_SHUT_RDWR), ); end: if (ret <= 0) fd_cnx_markerror(conn); return ret; } /* Wrapper around gnutls_record_send to handle some error codes. This is also used for DTLS-protected associations */ static ssize_t fd_tls_send_handle_error(struct cnxctx * conn, gnutls_session_t session, void * data, size_t sz) { ssize_t ret; struct timespec ts, now; CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &ts), return -1 ); again: CHECK_GNUTLS_DO( ret = gnutls_record_send(session, data, sz), { pthread_testcancel(); switch (ret) { case GNUTLS_E_REHANDSHAKE: if (!fd_cnx_teststate(conn, CC_STATUS_CLOSING)) { CHECK_GNUTLS_DO( ret = gnutls_handshake(session), { if (TRACE_BOOL(INFO)) { fd_log_debug("TLS re-handshake failed on socket %d (%s) : %s", conn->cc_socket, conn->cc_id, gnutls_strerror(ret)); } goto end; } ); } case GNUTLS_E_AGAIN: case GNUTLS_E_INTERRUPTED: CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &now), return -1 ); if ( ((now.tv_sec - ts.tv_sec) * 1000 + ((now.tv_nsec - ts.tv_nsec) / 1000000L)) > MAX_HOTL_BLOCKING_TIME) { LOG_D("Unable to send any data for %dms, closing the connection", MAX_HOTL_BLOCKING_TIME); } else if (! fd_cnx_teststate(conn, CC_STATUS_CLOSING )) { goto again; } break; default: if (gnutls_error_is_fatal (ret) == 0) { LOG_N("Ignoring non-fatal GNU TLS error: %s", gnutls_strerror (ret)); goto again; } LOG_E("Fatal GNUTLS error: %s", gnutls_strerror (ret)); } } ); end: if (ret <= 0) fd_cnx_markerror(conn); return ret; } /* The function that receives TLS data and re-builds a Diameter message -- it exits only on error or cancelation */ /* For the case of DTLS, since we are not using SCTP_UNORDERED, the messages over a single stream are ordered. Furthermore, as long as messages are shorter than the MTU [2^14 = 16384 bytes], they are delivered in a single record, as far as I understand. For larger messages, however, it is possible that pieces of messages coming from different streams can get interleaved. As a result, we do not use the following function for DTLS reception, because we use the sequence number to rebuild the messages. */ int fd_tls_rcvthr_core(struct cnxctx * conn, gnutls_session_t session) { /* No guarantee that GnuTLS preserves the message boundaries, so we re-build it as in TCP. */ do { uint8_t header[4]; struct fd_cnx_rcvdata rcv_data; struct fd_msg_pmdl *pmdl=NULL; ssize_t ret = 0; size_t received = 0; do { ret = fd_tls_recv_handle_error(conn, session, &header[received], sizeof(header) - received); if (ret <= 0) { /* The connection is closed */ goto out; } received += ret; } while (received < sizeof(header)); rcv_data.length = ((size_t)header[1] << 16) + ((size_t)header[2] << 8) + (size_t)header[3]; /* Check the received word is a valid beginning of a Diameter message */ if ((header[0] != DIAMETER_VERSION) /* defined in */ || (rcv_data.length > DIAMETER_MSG_SIZE_MAX)) { /* to avoid too big mallocs */ /* The message is suspect */ LOG_E( "Received suspect header [ver: %d, size: %zd] from '%s', assume disconnection", (int)header[0], rcv_data.length, conn->cc_remid); fd_cnx_markerror(conn); goto out; } /* Ok, now we can really receive the data */ CHECK_MALLOC( rcv_data.buffer = fd_cnx_alloc_msg_buffer( rcv_data.length, &pmdl ) ); memcpy(rcv_data.buffer, header, sizeof(header)); while (received < rcv_data.length) { pthread_cleanup_push(free_rcvdata, &rcv_data); /* In case we are canceled, clean the partialy built buffer */ ret = fd_tls_recv_handle_error(conn, session, rcv_data.buffer + received, rcv_data.length - received); pthread_cleanup_pop(0); if (ret <= 0) { free_rcvdata(&rcv_data); goto out; } received += ret; } fd_hook_call(HOOK_DATA_RECEIVED, NULL, NULL, &rcv_data, pmdl); /* We have received a complete message, pass it to the daemon */ CHECK_FCT_DO( ret = fd_event_send( fd_cnx_target_queue(conn), FDEVP_CNX_MSG_RECV, rcv_data.length, rcv_data.buffer), { free_rcvdata(&rcv_data); CHECK_FCT_DO(fd_core_shutdown(), ); return ret; } ); } while (1); out: return ENOTCONN; } /* Receiver thread (TLS & 1 stream SCTP or TCP) */ static void * rcvthr_tls_single(void * arg) { struct cnxctx * conn = arg; TRACE_ENTRY("%p", arg); CHECK_PARAMS_DO(conn && (conn->cc_socket > 0), return NULL ); /* Set the thread name */ { char buf[48]; snprintf(buf, sizeof(buf), "Receiver (%d) TLS/single stream", conn->cc_socket); fd_log_threadname ( buf ); } ASSERT( fd_cnx_teststate(conn, CC_STATUS_TLS) ); ASSERT( fd_cnx_target_queue(conn) ); /* The next function only returns when there is an error on the socket */ CHECK_FCT_DO(fd_tls_rcvthr_core(conn, conn->cc_tls_para.session), /* continue */); TRACE_DEBUG(FULL, "Thread terminated"); return NULL; } /* Prepare a gnutls session object for handshake */ int fd_tls_prepare(gnutls_session_t * session, int mode, int dtls, char * priority, void * alt_creds) { if (dtls) { LOG_E("DTLS sessions not yet supported"); return ENOTSUP; } /* Create the session context */ CHECK_GNUTLS_DO( gnutls_init (session, mode), return ENOMEM ); /* Set the algorithm suite */ if (priority) { const char * errorpos; CHECK_GNUTLS_DO( gnutls_priority_set_direct( *session, priority, &errorpos ), { TRACE_DEBUG(INFO, "Error in priority string '%s' at position: '%s'", priority, errorpos); return EINVAL; } ); } else { CHECK_GNUTLS_DO( gnutls_priority_set( *session, fd_g_config->cnf_sec_data.prio_cache ), return EINVAL ); } /* Set the credentials of this side of the connection */ CHECK_GNUTLS_DO( gnutls_credentials_set (*session, GNUTLS_CRD_CERTIFICATE, alt_creds ?: fd_g_config->cnf_sec_data.credentials), return EINVAL ); /* Request the remote credentials as well */ if (mode == GNUTLS_SERVER) { gnutls_certificate_server_set_request (*session, GNUTLS_CERT_REQUIRE); } return 0; } #ifndef GNUTLS_VERSION_300 /* Verify remote credentials after successful handshake (return 0 if OK, EINVAL otherwise) */ int fd_tls_verify_credentials(gnutls_session_t session, struct cnxctx * conn, int verbose) { int i, ret = 0; unsigned int gtret; const gnutls_datum_t *cert_list; unsigned int cert_list_size; gnutls_x509_crt_t cert; time_t now; TRACE_ENTRY("%p %d", conn, verbose); CHECK_PARAMS(conn); /* Trace the session information -- http://www.gnu.org/software/gnutls/manual/gnutls.html#Obtaining-session-information */ #ifdef DEBUG if (verbose) { const char *tmp; gnutls_kx_algorithm_t kx; gnutls_credentials_type_t cred; LOG_D("TLS Session information for connection '%s':", conn->cc_id); /* print the key exchange's algorithm name */ GNUTLS_TRACE( kx = gnutls_kx_get (session) ); GNUTLS_TRACE( tmp = gnutls_kx_get_name (kx) ); LOG_D("\t - Key Exchange: %s", tmp); /* Check the authentication type used and switch * to the appropriate. */ GNUTLS_TRACE( cred = gnutls_auth_get_type (session) ); switch (cred) { case GNUTLS_CRD_IA: LOG_D("\t - TLS/IA session"); break; case GNUTLS_CRD_PSK: /* This returns NULL in server side. */ if (gnutls_psk_client_get_hint (session) != NULL) LOG_D("\t - PSK authentication. PSK hint '%s'", gnutls_psk_client_get_hint (session)); /* This returns NULL in client side. */ if (gnutls_psk_server_get_username (session) != NULL) LOG_D("\t - PSK authentication. Connected as '%s'", gnutls_psk_server_get_username (session)); break; case GNUTLS_CRD_ANON: /* anonymous authentication */ LOG_D("\t - Anonymous DH using prime of %d bits", gnutls_dh_get_prime_bits (session)); break; case GNUTLS_CRD_CERTIFICATE: /* certificate authentication */ /* Check if we have been using ephemeral Diffie-Hellman. */ if (kx == GNUTLS_KX_DHE_RSA || kx == GNUTLS_KX_DHE_DSS) { LOG_D("\t - Ephemeral DH using prime of %d bits", gnutls_dh_get_prime_bits (session)); } break; #ifdef ENABLE_SRP case GNUTLS_CRD_SRP: LOG_D("\t - SRP session with username %s", gnutls_srp_server_get_username (session)); break; #endif /* ENABLE_SRP */ default: fd_log_debug("\t - Different type of credentials for the session (%d).", cred); break; } /* print the protocol's name (ie TLS 1.0) */ tmp = gnutls_protocol_get_name (gnutls_protocol_get_version (session)); LOG_D("\t - Protocol: %s", tmp); /* print the certificate type of the peer. ie X.509 */ tmp = gnutls_certificate_type_get_name (gnutls_certificate_type_get (session)); LOG_D("\t - Certificate Type: %s", tmp); /* print the compression algorithm (if any) */ tmp = gnutls_compression_get_name (gnutls_compression_get (session)); LOG_D("\t - Compression: %s", tmp); /* print the name of the cipher used. ie 3DES. */ tmp = gnutls_cipher_get_name (gnutls_cipher_get (session)); LOG_D("\t - Cipher: %s", tmp); /* Print the MAC algorithms name. ie SHA1 */ tmp = gnutls_mac_get_name (gnutls_mac_get (session)); LOG_D("\t - MAC: %s", tmp); } #endif /* DEBUG */ /* First, use built-in verification */ CHECK_GNUTLS_DO( gnutls_certificate_verify_peers2 (session, >ret), return EINVAL ); if (gtret) { LOG_E("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); if (gtret & GNUTLS_CERT_INVALID) LOG_E(" - The certificate is not trusted (unknown CA? expired?)"); if (gtret & GNUTLS_CERT_REVOKED) LOG_E(" - The certificate has been revoked."); if (gtret & GNUTLS_CERT_SIGNER_NOT_FOUND) LOG_E(" - The certificate hasn't got a known issuer."); if (gtret & GNUTLS_CERT_SIGNER_NOT_CA) LOG_E(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints."); if (gtret & GNUTLS_CERT_INSECURE_ALGORITHM) LOG_E(" - The certificate signature uses a weak algorithm."); return EINVAL; } /* Code from http://www.gnu.org/software/gnutls/manual/gnutls.html#Verifying-peer_0027s-certificate */ if (gnutls_certificate_type_get (session) != GNUTLS_CRT_X509) { LOG_E("TLS: Remote peer did not present a certificate, other mechanisms are not supported yet. socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); return EINVAL; } GNUTLS_TRACE( cert_list = gnutls_certificate_get_peers (session, &cert_list_size) ); if (cert_list == NULL) return EINVAL; now = time(NULL); #ifdef DEBUG char serial[40]; char dn[128]; size_t size; unsigned int algo, bits; time_t expiration_time, activation_time; LOG_D("TLS Certificate information for connection '%s' (%d certs provided):", conn->cc_id, cert_list_size); for (i = 0; i < cert_list_size; i++) { CHECK_GNUTLS_DO( gnutls_x509_crt_init (&cert), return EINVAL); CHECK_GNUTLS_DO( gnutls_x509_crt_import (cert, &cert_list[i], GNUTLS_X509_FMT_DER), return EINVAL); LOG_A(" Certificate %d info:", i); GNUTLS_TRACE( expiration_time = gnutls_x509_crt_get_expiration_time (cert) ); GNUTLS_TRACE( activation_time = gnutls_x509_crt_get_activation_time (cert) ); LOG( i ? FD_LOG_ANNOYING : FD_LOG_DEBUG, "\t - Certificate is valid since: %.24s", ctime (&activation_time)); LOG( i ? FD_LOG_ANNOYING : FD_LOG_DEBUG, "\t - Certificate expires: %.24s", ctime (&expiration_time)); /* Print the serial number of the certificate. */ size = sizeof (serial); gnutls_x509_crt_get_serial (cert, serial, &size); { int j; char buf[1024]; snprintf(buf, sizeof(buf), "\t - Certificate serial number: "); for (j = 0; j < size; j++) { snprintf(buf+strlen(buf), sizeof(buf)-strlen(buf), "%02hhx", serial[j]); } LOG( i ? FD_LOG_ANNOYING : FD_LOG_DEBUG, "%s", buf); } /* Extract some of the public key algorithm's parameters */ GNUTLS_TRACE( algo = gnutls_x509_crt_get_pk_algorithm (cert, &bits) ); LOG( i ? FD_LOG_ANNOYING : FD_LOG_DEBUG, "\t - Certificate public key: %s", gnutls_pk_algorithm_get_name (algo)); /* Print the version of the X.509 certificate. */ LOG( i ? FD_LOG_ANNOYING : FD_LOG_DEBUG, "\t - Certificate version: #%d", gnutls_x509_crt_get_version (cert)); size = sizeof (dn); GNUTLS_TRACE( gnutls_x509_crt_get_dn (cert, dn, &size) ); LOG( i ? FD_LOG_ANNOYING : FD_LOG_DEBUG, "\t - DN: %s", dn); size = sizeof (dn); GNUTLS_TRACE( gnutls_x509_crt_get_issuer_dn (cert, dn, &size) ); LOG( i ? FD_LOG_ANNOYING : FD_LOG_DEBUG, "\t - Issuer's DN: %s", dn); GNUTLS_TRACE( gnutls_x509_crt_deinit (cert) ); } #endif /* DEBUG */ /* Check validity of all the certificates */ for (i = 0; i < cert_list_size; i++) { time_t deadline; CHECK_GNUTLS_DO( gnutls_x509_crt_init (&cert), return EINVAL); CHECK_GNUTLS_DO( gnutls_x509_crt_import (cert, &cert_list[i], GNUTLS_X509_FMT_DER), return EINVAL); GNUTLS_TRACE( deadline = gnutls_x509_crt_get_expiration_time(cert) ); if ((deadline != (time_t)-1) && (deadline < now)) { LOG_E("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); LOG_E(" - The certificate %d in the chain is expired", i); ret = EINVAL; } GNUTLS_TRACE( deadline = gnutls_x509_crt_get_activation_time(cert) ); if ((deadline != (time_t)-1) && (deadline > now)) { LOG_E("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); LOG_E(" - The certificate %d in the chain is not yet activated", i); ret = EINVAL; } if ((i == 0) && (conn->cc_tls_para.cn)) { if (!gnutls_x509_crt_check_hostname (cert, conn->cc_tls_para.cn)) { LOG_E("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); LOG_E(" - The certificate hostname does not match '%s'", conn->cc_tls_para.cn); ret = EINVAL; } } GNUTLS_TRACE( gnutls_x509_crt_deinit (cert) ); } return ret; } #else /* GNUTLS_VERSION_300 */ /* Verify remote credentials DURING handshake (return gnutls status) */ int fd_tls_verify_credentials_2(gnutls_session_t session) { /* inspired from gnutls 3.x guidelines */ unsigned int status; const gnutls_datum_t *cert_list = NULL; unsigned int cert_list_size; gnutls_x509_crt_t cert; struct cnxctx * conn; int hostname_verified = 0; TRACE_ENTRY("%p", session); /* get the associated connection */ conn = gnutls_session_get_ptr (session); /* Trace the session information -- http://www.gnu.org/software/gnutls/manual/gnutls.html#Obtaining-session-information */ #ifdef DEBUG const char *tmp; gnutls_credentials_type_t cred; gnutls_kx_algorithm_t kx; int dhe, ecdh; dhe = ecdh = 0; LOG_A("TLS Session information for connection '%s':", conn->cc_id); /* print the key exchange's algorithm name */ GNUTLS_TRACE( kx = gnutls_kx_get (session) ); GNUTLS_TRACE( tmp = gnutls_kx_get_name (kx) ); LOG_D("\t- Key Exchange: %s", tmp); /* Check the authentication type used and switch * to the appropriate. */ GNUTLS_TRACE( cred = gnutls_auth_get_type (session) ); switch (cred) { case GNUTLS_CRD_IA: LOG_D("\t - TLS/IA session"); break; #ifdef ENABLE_SRP case GNUTLS_CRD_SRP: LOG_D("\t - SRP session with username %s", gnutls_srp_server_get_username (session)); break; #endif case GNUTLS_CRD_PSK: /* This returns NULL in server side. */ if (gnutls_psk_client_get_hint (session) != NULL) LOG_D("\t - PSK authentication. PSK hint '%s'", gnutls_psk_client_get_hint (session)); /* This returns NULL in client side. */ if (gnutls_psk_server_get_username (session) != NULL) LOG_D("\t - PSK authentication. Connected as '%s'", gnutls_psk_server_get_username (session)); if (kx == GNUTLS_KX_ECDHE_PSK) ecdh = 1; else if (kx == GNUTLS_KX_DHE_PSK) dhe = 1; break; case GNUTLS_CRD_ANON: /* anonymous authentication */ LOG_D("\t - Anonymous DH using prime of %d bits", gnutls_dh_get_prime_bits (session)); if (kx == GNUTLS_KX_ANON_ECDH) ecdh = 1; else if (kx == GNUTLS_KX_ANON_DH) dhe = 1; break; case GNUTLS_CRD_CERTIFICATE: /* certificate authentication */ /* Check if we have been using ephemeral Diffie-Hellman. */ if (kx == GNUTLS_KX_DHE_RSA || kx == GNUTLS_KX_DHE_DSS) dhe = 1; else if (kx == GNUTLS_KX_ECDHE_RSA || kx == GNUTLS_KX_ECDHE_ECDSA) ecdh = 1; /* Now print some info on the remote certificate */ if (gnutls_certificate_type_get (session) == GNUTLS_CRT_X509) { gnutls_datum_t cinfo; cert_list = gnutls_certificate_get_peers (session, &cert_list_size); LOG_D("\t Peer provided %d certificates.", cert_list_size); if (cert_list_size > 0) { int ret; /* we only print information about the first certificate. */ gnutls_x509_crt_init (&cert); gnutls_x509_crt_import (cert, &cert_list[0], GNUTLS_X509_FMT_DER); LOG_A("\t Certificate info:"); /* This is the preferred way of printing short information about a certificate. */ ret = gnutls_x509_crt_print (cert, GNUTLS_CRT_PRINT_ONELINE, &cinfo); if (ret == 0) { LOG_D("\t\t%s", cinfo.data); gnutls_free (cinfo.data); } if (conn->cc_tls_para.cn) { if (!gnutls_x509_crt_check_hostname (cert, conn->cc_tls_para.cn)) { LOG_E("\tTLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); LOG_E("\t - The certificate hostname does not match '%s'", conn->cc_tls_para.cn); gnutls_x509_crt_deinit (cert); return GNUTLS_E_CERTIFICATE_ERROR; } } hostname_verified = 1; gnutls_x509_crt_deinit (cert); } } break; default: LOG_E("\t - unknown session type (%d)", cred); } /* switch */ if (ecdh != 0) LOG_D("\t - Ephemeral ECDH using curve %s", gnutls_ecc_curve_get_name (gnutls_ecc_curve_get (session))); else if (dhe != 0) LOG_D("\t - Ephemeral DH using prime of %d bits", gnutls_dh_get_prime_bits (session)); /* print the protocol's name (ie TLS 1.0) */ tmp = gnutls_protocol_get_name (gnutls_protocol_get_version (session)); LOG_D("\t - Protocol: %s", tmp); /* print the certificate type of the peer. * ie X.509 */ tmp = gnutls_certificate_type_get_name (gnutls_certificate_type_get (session)); LOG_D("\t - Certificate Type: %s", tmp); /* print the compression algorithm (if any) */ tmp = gnutls_compression_get_name (gnutls_compression_get (session)); LOG_D("\t - Compression: %s", tmp); /* print the name of the cipher used. * ie 3DES. */ tmp = gnutls_cipher_get_name (gnutls_cipher_get (session)); LOG_D("\t - Cipher: %s", tmp); /* Print the MAC algorithms name. * ie SHA1 */ tmp = gnutls_mac_get_name (gnutls_mac_get (session)); LOG_D("\t - MAC: %s", tmp); #endif /* DEBUG */ /* This verification function uses the trusted CAs in the credentials * structure. So you must have installed one or more CA certificates. */ CHECK_GNUTLS_DO( gnutls_certificate_verify_peers2 (session, &status), return GNUTLS_E_CERTIFICATE_ERROR ); if (status & GNUTLS_CERT_INVALID) { LOG_E("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); if (status & GNUTLS_CERT_SIGNER_NOT_FOUND) LOG_E(" - The certificate hasn't got a known issuer."); if (status & GNUTLS_CERT_REVOKED) LOG_E(" - The certificate has been revoked."); if (status & GNUTLS_CERT_EXPIRED) LOG_E(" - The certificate has expired."); if (status & GNUTLS_CERT_NOT_ACTIVATED) LOG_E(" - The certificate is not yet activated."); } if (status & GNUTLS_CERT_INVALID) { return GNUTLS_E_CERTIFICATE_ERROR; } /* Up to here the process is the same for X.509 certificates and * OpenPGP keys. From now on X.509 certificates are assumed. This can * be easily extended to work with openpgp keys as well. */ if ((!hostname_verified) && (conn->cc_tls_para.cn)) { if (gnutls_certificate_type_get (session) != GNUTLS_CRT_X509) { LOG_E("TLS: Remote credentials are not x509, rejected on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); return GNUTLS_E_CERTIFICATE_ERROR; } CHECK_GNUTLS_DO( gnutls_x509_crt_init (&cert), return GNUTLS_E_CERTIFICATE_ERROR ); cert_list = gnutls_certificate_get_peers (session, &cert_list_size); CHECK_PARAMS_DO( cert_list, return GNUTLS_E_CERTIFICATE_ERROR ); CHECK_GNUTLS_DO( gnutls_x509_crt_import (cert, &cert_list[0], GNUTLS_X509_FMT_DER), return GNUTLS_E_CERTIFICATE_ERROR ); if (!gnutls_x509_crt_check_hostname (cert, conn->cc_tls_para.cn)) { LOG_E("TLS: Remote certificate invalid on socket %d (Remote: '%s')(Connection: '%s') :", conn->cc_socket, conn->cc_remid, conn->cc_id); LOG_E(" - The certificate hostname does not match '%s'", conn->cc_tls_para.cn); gnutls_x509_crt_deinit (cert); return GNUTLS_E_CERTIFICATE_ERROR; } gnutls_x509_crt_deinit (cert); } /* notify gnutls to continue handshake normally */ return 0; } #endif /* GNUTLS_VERSION_300 */ static int fd_cnx_may_dtls(struct cnxctx * conn) { #ifndef DISABLE_SCTP if ((conn->cc_proto == IPPROTO_SCTP) && (conn->cc_tls_para.algo == ALGO_HANDSHAKE_DEFAULT)) return 1; #endif /* DISABLE_SCTP */ return 0; } #ifndef DISABLE_SCTP static int fd_cnx_uses_dtls(struct cnxctx * conn) { return fd_cnx_may_dtls(conn) && (fd_cnx_teststate(conn, CC_STATUS_TLS)); } #endif /* DISABLE_SCTP */ /* TLS handshake a connection; no need to have called start_clear before. Reception is active if handhsake is successful */ int fd_cnx_handshake(struct cnxctx * conn, int mode, int algo, char * priority, void * alt_creds) { int dtls = 0; TRACE_ENTRY( "%p %d %d %p %p", conn, mode, algo, priority, alt_creds); CHECK_PARAMS( conn && (!fd_cnx_teststate(conn, CC_STATUS_TLS)) && ( (mode == GNUTLS_CLIENT) || (mode == GNUTLS_SERVER) ) && (!conn->cc_loop) ); /* Save the mode */ conn->cc_tls_para.mode = mode; conn->cc_tls_para.algo = algo; /* Cancel receiving thread if any -- it should already be terminated anyway, we just release the resources */ CHECK_FCT_DO( fd_thr_term(&conn->cc_rcvthr), /* continue */); /* Once TLS handshake is done, we don't stop after the first message */ conn->cc_loop = 1; dtls = fd_cnx_may_dtls(conn); /* Prepare the master session credentials and priority */ CHECK_FCT( fd_tls_prepare(&conn->cc_tls_para.session, mode, dtls, priority, alt_creds) ); /* Special case: multi-stream TLS is not natively managed in GNU TLS, we use a wrapper library */ if ((!dtls) && (conn->cc_sctp_para.pairs > 1)) { #ifdef DISABLE_SCTP ASSERT(0); CHECK_FCT( ENOTSUP ); #else /* DISABLE_SCTP */ /* Initialize the wrapper, start the demux thread */ CHECK_FCT( fd_sctp3436_init(conn) ); #endif /* DISABLE_SCTP */ } else { /* Set the transport pointer passed to push & pull callbacks */ GNUTLS_TRACE( gnutls_transport_set_ptr( conn->cc_tls_para.session, (gnutls_transport_ptr_t) conn ) ); /* Set the push and pull callbacks */ if (!dtls) { #ifdef GNUTLS_VERSION_300 GNUTLS_TRACE( gnutls_transport_set_pull_timeout_function( conn->cc_tls_para.session, (void *)fd_cnx_s_select ) ); #endif /* GNUTLS_VERSION_300 */ GNUTLS_TRACE( gnutls_transport_set_pull_function(conn->cc_tls_para.session, (void *)fd_cnx_s_recv) ); #ifndef GNUTLS_VERSION_212 GNUTLS_TRACE( gnutls_transport_set_push_function(conn->cc_tls_para.session, (void *)fd_cnx_s_send) ); #else /* GNUTLS_VERSION_212 */ GNUTLS_TRACE( gnutls_transport_set_vec_push_function(conn->cc_tls_para.session, (void *)fd_cnx_s_sendv) ); #endif /* GNUTLS_VERSION_212 */ } else { TODO("DTLS push/pull functions"); return ENOTSUP; } } /* additional initialization for gnutls 3.x */ #ifdef GNUTLS_VERSION_300 /* the verify function has already been set in the global initialization in config.c */ /* fd_tls_verify_credentials_2 uses the connection */ gnutls_session_set_ptr (conn->cc_tls_para.session, (void *) conn); if ((conn->cc_tls_para.cn != NULL) && (mode == GNUTLS_CLIENT)) { /* this might allow virtual hosting on the remote peer */ CHECK_GNUTLS_DO( gnutls_server_name_set (conn->cc_tls_para.session, GNUTLS_NAME_DNS, conn->cc_tls_para.cn, strlen(conn->cc_tls_para.cn)), /* ignore failure */); } #endif /* GNUTLS_VERSION_300 */ #ifdef GNUTLS_VERSION_310 GNUTLS_TRACE( gnutls_handshake_set_timeout( conn->cc_tls_para.session, GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT)); #endif /* GNUTLS_VERSION_310 */ /* Mark the connection as protected from here, so that the gnutls credentials will be freed */ fd_cnx_addstate(conn, CC_STATUS_TLS); /* Handshake master session */ { int ret; CHECK_GNUTLS_DO( ret = gnutls_handshake(conn->cc_tls_para.session), { if (TRACE_BOOL(INFO)) { fd_log_debug("TLS Handshake failed on socket %d (%s) : %s", conn->cc_socket, conn->cc_id, gnutls_strerror(ret)); } fd_cnx_markerror(conn); return EINVAL; } ); #ifndef GNUTLS_VERSION_300 /* Now verify the remote credentials are valid -- only simple tests here */ CHECK_FCT_DO( fd_tls_verify_credentials(conn->cc_tls_para.session, conn, 1), { CHECK_GNUTLS_DO( gnutls_bye(conn->cc_tls_para.session, GNUTLS_SHUT_RDWR), ); fd_cnx_markerror(conn); return EINVAL; }); #endif /* GNUTLS_VERSION_300 */ } /* Multi-stream TLS: handshake other streams as well */ if ((!dtls) && (conn->cc_sctp_para.pairs > 1)) { #ifndef DISABLE_SCTP /* Start reading the messages from the master session. That way, if the remote peer closed, we are not stuck inside handshake */ CHECK_FCT(fd_sctp3436_startthreads(conn, 0)); /* Resume all additional sessions from the master one. */ CHECK_FCT(fd_sctp3436_handshake_others(conn, priority, alt_creds)); /* Start decrypting the messages from all threads and queuing them in target queue */ CHECK_FCT(fd_sctp3436_startthreads(conn, 1)); #endif /* DISABLE_SCTP */ } else { /* Start decrypting the data */ if (!dtls) { CHECK_POSIX( pthread_create( &conn->cc_rcvthr, NULL, rcvthr_tls_single, conn ) ); } else { TODO("Signal the dtls_push function that multiple streams can be used from this point."); TODO("Create DTLS rcvthr (must reassembly based on seq numbers & stream id ?)"); return ENOTSUP; } } return 0; } /* Retrieve TLS credentials of the remote peer, after handshake */ int fd_cnx_getcred(struct cnxctx * conn, const gnutls_datum_t **cert_list, unsigned int *cert_list_size) { TRACE_ENTRY("%p %p %p", conn, cert_list, cert_list_size); CHECK_PARAMS( conn && fd_cnx_teststate(conn, CC_STATUS_TLS) && cert_list && cert_list_size ); /* This function only works for X.509 certificates. */ CHECK_PARAMS( gnutls_certificate_type_get (conn->cc_tls_para.session) == GNUTLS_CRT_X509 ); GNUTLS_TRACE( *cert_list = gnutls_certificate_get_peers (conn->cc_tls_para.session, cert_list_size) ); if (*cert_list == NULL) { TRACE_DEBUG(INFO, "No certificate was provided by remote peer / an error occurred."); return EINVAL; } TRACE_DEBUG( FULL, "Saved certificate chain (%d certificates) in peer structure.", *cert_list_size); return 0; } /* Receive next message. if timeout is not NULL, wait only until timeout. This function only pulls from a queue, mgr thread is filling that queue aynchrounously. */ /* if the altfifo has been set on this conn object, this function must not be called */ int fd_cnx_receive(struct cnxctx * conn, struct timespec * timeout, unsigned char **buf, size_t * len) { int ev; size_t ev_sz; void * ev_data; TRACE_ENTRY("%p %p %p %p", conn, timeout, buf, len); CHECK_PARAMS(conn && (conn->cc_socket > 0) && buf && len); CHECK_PARAMS(conn->cc_rcvthr != (pthread_t)NULL); CHECK_PARAMS(conn->cc_alt == NULL); /* Now, pull the first event */ get_next: if (timeout) { CHECK_FCT( fd_event_timedget(conn->cc_incoming, timeout, FDEVP_PSM_TIMEOUT, &ev, &ev_sz, &ev_data) ); } else { CHECK_FCT( fd_event_get(conn->cc_incoming, &ev, &ev_sz, &ev_data) ); } switch (ev) { case FDEVP_CNX_MSG_RECV: /* We got one */ *len = ev_sz; *buf = ev_data; return 0; case FDEVP_PSM_TIMEOUT: TRACE_DEBUG(FULL, "Timeout event received"); return ETIMEDOUT; case FDEVP_CNX_EP_CHANGE: /* We ignore this event */ goto get_next; case FDEVP_CNX_ERROR: TRACE_DEBUG(FULL, "Received ERROR event on the connection"); return ENOTCONN; } TRACE_DEBUG(INFO, "Received unexpected event %d (%s)", ev, fd_pev_str(ev)); return EINVAL; } /* Where the events are sent */ struct fifo * fd_cnx_target_queue(struct cnxctx * conn) { struct fifo *q; CHECK_POSIX_DO( pthread_mutex_lock(&state_lock), { ASSERT(0); } ); q = conn->cc_alt ?: conn->cc_incoming; CHECK_POSIX_DO( pthread_mutex_unlock(&state_lock), { ASSERT(0); } ); return q; } /* Set an alternate FIFO list to send FDEVP_CNX_* events to */ int fd_cnx_recv_setaltfifo(struct cnxctx * conn, struct fifo * alt_fifo) { int ret; TRACE_ENTRY( "%p %p", conn, alt_fifo ); CHECK_PARAMS( conn && alt_fifo && conn->cc_incoming ); /* The magic function does it all */ CHECK_POSIX_DO( pthread_mutex_lock(&state_lock), { ASSERT(0); } ); CHECK_FCT_DO( ret = fd_fifo_move( conn->cc_incoming, alt_fifo, &conn->cc_alt ), ); CHECK_POSIX_DO( pthread_mutex_unlock(&state_lock), { ASSERT(0); } ); return ret; } /* Send function when no multi-stream is involved, or sending on stream #0 (send() always use stream 0)*/ static int send_simple(struct cnxctx * conn, unsigned char * buf, size_t len) { ssize_t ret; size_t sent = 0; TRACE_ENTRY("%p %p %zd", conn, buf, len); do { if (fd_cnx_teststate(conn, CC_STATUS_TLS)) { CHECK_GNUTLS_DO( ret = fd_tls_send_handle_error(conn, conn->cc_tls_para.session, buf + sent, len - sent), ); } else { struct iovec iov; iov.iov_base = buf + sent; iov.iov_len = len - sent; CHECK_SYS_DO( ret = fd_cnx_s_sendv(conn, &iov, 1), ); } if (ret <= 0) return ENOTCONN; sent += ret; } while ( sent < len ); return 0; } /* Send a message -- this is synchronous -- and we assume it's never called by several threads at the same time (on the same conn), so we don't protect. */ int fd_cnx_send(struct cnxctx * conn, unsigned char * buf, size_t len) { TRACE_ENTRY("%p %p %zd", conn, buf, len); CHECK_PARAMS(conn && (conn->cc_socket > 0) && (! fd_cnx_teststate(conn, CC_STATUS_ERROR)) && buf && len); TRACE_DEBUG(FULL, "Sending %zdb %sdata on connection %s", len, fd_cnx_teststate(conn, CC_STATUS_TLS) ? "TLS-protected ":"", conn->cc_id); switch (conn->cc_proto) { case IPPROTO_TCP: CHECK_FCT( send_simple(conn, buf, len) ); break; #ifndef DISABLE_SCTP case IPPROTO_SCTP: { int dtls = fd_cnx_uses_dtls(conn); if (!dtls) { int stream = 0; if (conn->cc_sctp_para.unordered) { int limit; if (fd_cnx_teststate(conn, CC_STATUS_TLS)) limit = conn->cc_sctp_para.pairs; else limit = conn->cc_sctp_para.str_out; if (limit > 1) { conn->cc_sctp_para.next += 1; conn->cc_sctp_para.next %= limit; stream = conn->cc_sctp_para.next; } } if (stream == 0) { /* We can use default function, it sends over stream #0 */ CHECK_FCT( send_simple(conn, buf, len) ); } else { if (!fd_cnx_teststate(conn, CC_STATUS_TLS)) { struct iovec iov; iov.iov_base = buf; iov.iov_len = len; CHECK_SYS_DO( fd_sctp_sendstrv(conn, stream, &iov, 1), { fd_cnx_markerror(conn); return ENOTCONN; } ); } else { /* push the data to the appropriate session */ ssize_t ret; size_t sent = 0; ASSERT(conn->cc_sctp3436_data.array != NULL); do { CHECK_GNUTLS_DO( ret = fd_tls_send_handle_error(conn, conn->cc_sctp3436_data.array[stream].session, buf + sent, len - sent), ); if (ret <= 0) return ENOTCONN; sent += ret; } while ( sent < len ); } } } else { /* DTLS */ /* Multistream is handled at lower layer in the push/pull function */ CHECK_FCT( send_simple(conn, buf, len) ); } } break; #endif /* DISABLE_SCTP */ default: TRACE_DEBUG(INFO, "Unknown protocol: %d", conn->cc_proto); ASSERT(0); return ENOTSUP; /* or EINVAL... */ } return 0; } /**************************************/ /* Destruction of connection */ /**************************************/ /* Destroy a conn structure, and shutdown the socket */ void fd_cnx_destroy(struct cnxctx * conn) { TRACE_ENTRY("%p", conn); CHECK_PARAMS_DO(conn, return); fd_cnx_addstate(conn, CC_STATUS_CLOSING); /* Initiate shutdown of the TLS session(s): call gnutls_bye(WR), then read until error */ if (fd_cnx_teststate(conn, CC_STATUS_TLS)) { #ifndef DISABLE_SCTP int dtls = fd_cnx_uses_dtls(conn); if ((!dtls) && (conn->cc_sctp_para.pairs > 1)) { if (! fd_cnx_teststate(conn, CC_STATUS_ERROR )) { /* Bye on master session */ CHECK_GNUTLS_DO( gnutls_bye(conn->cc_tls_para.session, GNUTLS_SHUT_WR), fd_cnx_markerror(conn) ); } if (! fd_cnx_teststate(conn, CC_STATUS_ERROR ) ) { /* and other stream pairs */ fd_sctp3436_bye(conn); } if (! fd_cnx_teststate(conn, CC_STATUS_ERROR ) ) { /* Now wait for all decipher threads to terminate */ fd_sctp3436_waitthreadsterm(conn); } else { /* Abord the threads, the connection is dead already */ fd_sctp3436_stopthreads(conn); } /* Deinit gnutls resources */ fd_sctp3436_gnutls_deinit_others(conn); if (conn->cc_tls_para.session) { GNUTLS_TRACE( gnutls_deinit(conn->cc_tls_para.session) ); conn->cc_tls_para.session = NULL; } /* Destroy the wrapper (also stops the demux thread) */ fd_sctp3436_destroy(conn); } else { #endif /* DISABLE_SCTP */ /* We are TLS, but not using the sctp3436 wrapper layer */ if (! fd_cnx_teststate(conn, CC_STATUS_ERROR ) ) { /* Master session */ CHECK_GNUTLS_DO( gnutls_bye(conn->cc_tls_para.session, GNUTLS_SHUT_WR), fd_cnx_markerror(conn) ); } if (! fd_cnx_teststate(conn, CC_STATUS_ERROR ) ) { /* In this case, just wait for thread rcvthr_tls_single to terminate */ if (conn->cc_rcvthr != (pthread_t)NULL) { CHECK_POSIX_DO( pthread_join(conn->cc_rcvthr, NULL), /* continue */ ); conn->cc_rcvthr = (pthread_t)NULL; } } else { /* Cancel the receiver thread in case it did not already terminate */ CHECK_FCT_DO( fd_thr_term(&conn->cc_rcvthr), /* continue */ ); } /* Free the resources of the TLS session */ if (conn->cc_tls_para.session) { GNUTLS_TRACE( gnutls_deinit(conn->cc_tls_para.session) ); conn->cc_tls_para.session = NULL; } #ifndef DISABLE_SCTP } #endif /* DISABLE_SCTP */ } /* Terminate the thread in case it is not done yet -- is there any such case left ?*/ CHECK_FCT_DO( fd_thr_term(&conn->cc_rcvthr), /* continue */ ); /* Shut the connection down */ if (conn->cc_socket > 0) { shutdown(conn->cc_socket, SHUT_RDWR); close(conn->cc_socket); conn->cc_socket = -1; } /* Empty and destroy FIFO list */ if (conn->cc_incoming) { fd_event_destroy( &conn->cc_incoming, free ); } /* Free the object */ free(conn); /* Done! */ return; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/cnxctx.h000066400000000000000000000165031333553357400224710ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* This file contains the definitions for internal use in the connection context files */ #ifndef _CNXCTX_H #define _CNXCTX_H /* Maximum time we allow a connection to be blocked because of head-of-the-line buffers. After this delay, connection is considered in error. */ #define MAX_HOTL_BLOCKING_TIME 1000 /* ms */ /* The connection context structure */ struct cnxctx { char cc_id[60]; /* The name of this connection. the first 5 chars are reserved for flags display (cc_state). */ char cc_remid[60]; /* Id of remote peer */ int cc_socket; /* The socket object of the connection -- <=0 if no socket is created */ int cc_family; /* AF_INET or AF_INET6 (mixed) */ int cc_proto; /* IPPROTO_TCP or IPPROTO_SCTP */ uint32_t cc_state; /* True if the object is being destroyed: we don't send events anymore. access with fd_cnx_getstate() */ #define CC_STATUS_CLOSING 1 #define CC_STATUS_ERROR 2 #define CC_STATUS_SIGNALED 4 #define CC_STATUS_TLS 8 pthread_t cc_rcvthr; /* thread for receiving messages on the connection */ int cc_loop; /* tell the thread if it loops or stops after the first message is received */ struct fifo * cc_incoming; /* FIFO queue of events received on the connection, FDEVP_CNX_* */ struct fifo * cc_alt; /* alternate fifo to send FDEVP_CNX_* events to. */ /* If cc_tls == true */ struct { DiamId_t cn; /* If not NULL, remote certif will be checked to match this Common Name */ int mode; /* GNUTLS_CLIENT / GNUTLS_SERVER */ int algo; /* ALGO_HANDSHAKE_DEFAULT / ALGO_HANDSHAKE_3436 */ gnutls_session_t session; /* Session object (stream #0 in case of SCTP) */ } cc_tls_para; /* If cc_proto == SCTP */ struct { uint16_t str_out; /* Out streams */ uint16_t str_in; /* In streams */ uint16_t pairs; /* max number of pairs ( = min(in, out)) */ uint16_t next; /* # of stream the next message will be sent to */ int unordered; /* boolean telling if use of streams > 0 is permitted */ } cc_sctp_para; /* If both conditions */ struct { struct sctp3436_ctx *array; /* an array of cc_sctp_para.pairs elements -- the #0 is special (session is outside)*/ struct sr_store *sess_store; /* Session data of the master session, to resume the children sessions */ } cc_sctp3436_data; }; void fd_cnx_markerror(struct cnxctx * conn); uint32_t fd_cnx_getstate(struct cnxctx * conn); int fd_cnx_teststate(struct cnxctx * conn, uint32_t flag); void fd_cnx_addstate(struct cnxctx * conn, uint32_t orstate); void fd_cnx_setstate(struct cnxctx * conn, uint32_t abstate); struct fifo * fd_cnx_target_queue(struct cnxctx * conn); /* Socket */ ssize_t fd_cnx_s_recv(struct cnxctx * conn, void *buffer, size_t length); void fd_cnx_s_setto(int sock); /* TLS */ int fd_tls_rcvthr_core(struct cnxctx * conn, gnutls_session_t session); int fd_tls_prepare(gnutls_session_t * session, int mode, int dtls, char * priority, void * alt_creds); #ifndef GNUTLS_VERSION_300 int fd_tls_verify_credentials(gnutls_session_t session, struct cnxctx * conn, int verbose); #endif /* GNUTLS_VERSION_300 */ /* TCP */ int fd_tcp_create_bind_server( int * sock, sSA * sa, socklen_t salen ); int fd_tcp_listen( int sock ); int fd_tcp_client( int *sock, sSA * sa, socklen_t salen ); int fd_tcp_get_local_ep(int sock, sSS * ss, socklen_t *sl); int fd_tcp_get_remote_ep(int sock, sSS * ss, socklen_t *sl); #ifndef DISABLE_SCTP /* SCTP */ int fd_sctp_create_bind_server( int * sock, int family, struct fd_list * list, uint16_t port ); int fd_sctp_listen( int sock ); int fd_sctp_client( int *sock, int no_ip6, uint16_t port, struct fd_list * list ); int fd_sctp_get_local_ep(int sock, struct fd_list * list); int fd_sctp_get_remote_ep(int sock, struct fd_list * list); int fd_sctp_get_str_info( int sock, uint16_t *in, uint16_t *out, sSS *primary ); ssize_t fd_sctp_sendstrv(struct cnxctx * conn, uint16_t strid, const struct iovec *iov, int iovcnt); int fd_sctp_recvmeta(struct cnxctx * conn, uint16_t * strid, uint8_t ** buf, size_t * len, int *event); /* TLS over SCTP (multi-stream) */ struct sctp3436_ctx { struct cnxctx *parent; /* for info such as socket, conn name, event list */ uint16_t strid; /* Stream # of this session */ struct fifo *raw_recv; /* Raw data received on this stream, for demux */ struct { uint8_t *buf; size_t bufsz; size_t offset; } partial; /* If the pull function did not read the full content of first message in raw, it stores it here for next read call. */ pthread_t thr; /* Thread to decrypt raw data in this pair of streams */ gnutls_session_t session; /* TLS context using this pair of streams -- except if strid == 0, in that case session is outside the array */ }; int fd_sctp3436_init(struct cnxctx * conn); int fd_sctp3436_handshake_others(struct cnxctx * conn, char * priority, void * alt_creds); int fd_sctp3436_startthreads(struct cnxctx * conn, int others); void fd_sctp3436_bye(struct cnxctx * conn); void fd_sctp3436_waitthreadsterm(struct cnxctx * conn); void fd_sctp3436_gnutls_deinit_others(struct cnxctx * conn); void fd_sctp3436_stopthreads(struct cnxctx * conn); void fd_sctp3436_destroy(struct cnxctx * conn); #endif /* DISABLE_SCTP */ #endif /* _CNXCTX_H */ nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/config.c000066400000000000000000000635271333553357400224320ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2015, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" #include /* Configuration management */ #ifndef GNUTLS_DEFAULT_PRIORITY # define GNUTLS_DEFAULT_PRIORITY "NORMAL" #endif /* GNUTLS_DEFAULT_PRIORITY */ #ifndef GNUTLS_DEFAULT_DHBITS # define GNUTLS_DEFAULT_DHBITS 1024 #endif /* GNUTLS_DEFAULT_DHBITS */ /* Initialize the fd_g_config structure to default values -- it should already have been initialized to all-0 */ int fd_conf_init() { TRACE_ENTRY(); fd_g_config->cnf_eyec = EYEC_CONFIG; fd_g_config->cnf_timer_tc = 30; fd_g_config->cnf_timer_tw = 30; fd_g_config->cnf_port = DIAMETER_PORT; fd_g_config->cnf_port_tls = DIAMETER_SECURE_PORT; fd_g_config->cnf_sctp_str = 30; fd_g_config->cnf_thr_srv = 5; fd_g_config->cnf_dispthr = 4; fd_list_init(&fd_g_config->cnf_endpoints, NULL); fd_list_init(&fd_g_config->cnf_apps, NULL); #ifdef DISABLE_SCTP fd_g_config->cnf_flags.no_sctp = 1; #endif /* DISABLE_SCTP */ fd_g_config->cnf_orstateid = (uint32_t) time(NULL); CHECK_FCT( fd_dict_init(&fd_g_config->cnf_dict) ); CHECK_FCT( fd_fifo_new(&fd_g_config->cnf_main_ev, 0) ); /* TLS parameters */ CHECK_GNUTLS_DO( gnutls_certificate_allocate_credentials (&fd_g_config->cnf_sec_data.credentials), return ENOMEM ); CHECK_GNUTLS_DO( gnutls_dh_params_init (&fd_g_config->cnf_sec_data.dh_cache), return ENOMEM ); #ifdef GNUTLS_VERSION_300 CHECK_GNUTLS_DO( gnutls_x509_trust_list_init(&fd_g_config->cnf_sec_data.trustlist, 0), return ENOMEM ); #endif /* GNUTLS_VERSION_300 */ return 0; } DECLARE_FD_DUMP_PROTOTYPE(fd_conf_dump) { FD_DUMP_HANDLE_OFFSET(); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "freeDiameter configuration:\n"), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Default trace level .... : %+d\n", fd_g_debug_lvl), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Configuration file ..... : %s\n", fd_g_config->cnf_file), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Diameter Identity ...... : %s (l:%zi)\n", fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Diameter Realm ......... : %s (l:%zi)\n", fd_g_config->cnf_diamrlm, fd_g_config->cnf_diamrlm_len), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Tc Timer ............... : %u\n", fd_g_config->cnf_timer_tc), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Tw Timer ............... : %u\n", fd_g_config->cnf_timer_tw), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Local port ............. : %hu\n", fd_g_config->cnf_port), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Local secure port ...... : %hu\n", fd_g_config->cnf_port_tls), return NULL); if (fd_g_config->cnf_port_3436) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Local SCTP TLS port .... : %hu\n", fd_g_config->cnf_port_3436), return NULL); } CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Number of SCTP streams . : %hu\n", fd_g_config->cnf_sctp_str), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Number of clients thr .. : %d\n", fd_g_config->cnf_thr_srv), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Number of app threads .. : %hu\n", fd_g_config->cnf_dispthr), return NULL); if (FD_IS_LIST_EMPTY(&fd_g_config->cnf_endpoints)) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Local endpoints ........ : Default (use all available)\n"), return NULL); } else { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Local endpoints ........ : "), return NULL); CHECK_MALLOC_DO( fd_ep_dump( FD_DUMP_STD_PARAMS, 0, 0, &fd_g_config->cnf_endpoints ), return NULL); } if (FD_IS_LIST_EMPTY(&fd_g_config->cnf_apps)) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Local applications ..... : (none)"), return NULL); } else { struct fd_list * li = fd_g_config->cnf_apps.next; CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Local applications ..... : "), return NULL); while (li != &fd_g_config->cnf_apps) { struct fd_app * app = (struct fd_app *)li; CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "App: %u,%s%s,Vnd:%u\t", app->appid, app->flags.auth ? "Au" : "--", app->flags.acct ? "Ac" : "--", app->vndid), return NULL); li = li->next; } } CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "\n Flags : - IP ........... : %s\n", fd_g_config->cnf_flags.no_ip4 ? "DISABLED" : "Enabled"), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " - IPv6 ......... : %s\n", fd_g_config->cnf_flags.no_ip6 ? "DISABLED" : "Enabled"), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " - Relay app .... : %s\n", fd_g_config->cnf_flags.no_fwd ? "DISABLED" : "Enabled"), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " - TCP .......... : %s\n", fd_g_config->cnf_flags.no_tcp ? "DISABLED" : "Enabled"), return NULL); #ifdef DISABLE_SCTP CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " - SCTP ......... : DISABLED (at compilation)\n"), return NULL); #else /* DISABLE_SCTP */ CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " - SCTP ......... : %s\n", fd_g_config->cnf_flags.no_sctp ? "DISABLED" : "Enabled"), return NULL); #endif /* DISABLE_SCTP */ CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " - Pref. proto .. : %s\n", fd_g_config->cnf_flags.pr_tcp ? "TCP" : "SCTP"), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " - TLS method ... : %s\n", fd_g_config->cnf_flags.tls_alg ? "INBAND" : "Separate port"), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " TLS : - Certificate .. : %s\n", fd_g_config->cnf_sec_data.cert_file ?: "(NONE)"), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " - Private key .. : %s\n", fd_g_config->cnf_sec_data.key_file ?: "(NONE)"), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " - CA (trust) ... : %s (%d certs)\n", fd_g_config->cnf_sec_data.ca_file ?: "(none)", fd_g_config->cnf_sec_data.ca_file_nr), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " - CRL .......... : %s\n", fd_g_config->cnf_sec_data.crl_file ?: "(none)"), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " - Priority ..... : %s\n", fd_g_config->cnf_sec_data.prio_string ?: "(default: '" GNUTLS_DEFAULT_PRIORITY "')"), return NULL); if (fd_g_config->cnf_sec_data.dh_file) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " - DH file ...... : %s\n", fd_g_config->cnf_sec_data.dh_file), return NULL); } else { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " - DH bits ...... : %d\n", fd_g_config->cnf_sec_data.dh_bits ?: GNUTLS_DEFAULT_DHBITS), return NULL); } CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Origin-State-Id ........ : %u", fd_g_config->cnf_orstateid), return NULL); return *buf; } /* read contents of a file opened in "rb" mode and alloc this data into a gnutls_datum_t (must be freed afterwards) */ int fd_conf_stream_to_gnutls_datum(FILE * pemfile, gnutls_datum_t *out) { size_t alloc = 0; CHECK_PARAMS( pemfile && out ); memset(out, 0, sizeof(gnutls_datum_t)); do { uint8_t * realloced = NULL; size_t read = 0; if (alloc < out->size + BUFSIZ + 1) { alloc += alloc / 2 + BUFSIZ + 1; CHECK_MALLOC_DO( realloced = realloc(out->data, alloc), { free(out->data); return ENOMEM; } ) out->data = realloced; } read = fread( out->data + out->size, 1, alloc - out->size - 1, pemfile ); out->size += read; if (ferror(pemfile)) { int err = errno; TRACE_DEBUG(INFO, "An error occurred while reading file: %s", strerror(err)); return err; } } while (!feof(pemfile)); out->data[out->size] = '\0'; return 0; } #ifdef GNUTLS_VERSION_300 /* inspired from GnuTLS manual */ static int fd_conf_print_details_func (gnutls_x509_crt_t cert, gnutls_x509_crt_t issuer, gnutls_x509_crl_t crl, unsigned int verification_output) { char name[512]; char issuer_name[512]; size_t name_size; size_t issuer_name_size; if (!TRACE_BOOL(GNUTLS_DBG_LEVEL)) return 0; issuer_name_size = sizeof (issuer_name); gnutls_x509_crt_get_issuer_dn (cert, issuer_name, &issuer_name_size); name_size = sizeof (name); gnutls_x509_crt_get_dn (cert, name, &name_size); fd_log_debug("\tSubject: %s", name); fd_log_debug("\tIssuer: %s", issuer_name); if (issuer != NULL) { issuer_name_size = sizeof (issuer_name); gnutls_x509_crt_get_dn (issuer, issuer_name, &issuer_name_size); fd_log_debug("\tVerified against: %s", issuer_name); } if (crl != NULL) { issuer_name_size = sizeof (issuer_name); gnutls_x509_crl_get_issuer_dn (crl, issuer_name, &issuer_name_size); fd_log_debug("\tVerified against CRL of: %s", issuer_name); } fd_log_debug("\tVerification output: %x", verification_output); return 0; } #endif /* GNUTLS_VERSION_300 */ #ifndef GNUTLS_VERSION_300 GCC_DIAG_OFF("-Wdeprecated-declarations") #endif /* !GNUTLS_VERSION_300 */ /* Parse the configuration file (using the yacc parser) */ int fd_conf_parse() { extern FILE * fddin; const char * orig = NULL; /* Attempt to find the configuration file */ if (!fd_g_config->cnf_file) fd_g_config->cnf_file = FD_DEFAULT_CONF_FILENAME; fddin = fopen(fd_g_config->cnf_file, "r"); if ((fddin == NULL) && (*fd_g_config->cnf_file != '/')) { char * new_cnf = NULL; /* We got a relative path, attempt to add the default directory prefix */ orig = fd_g_config->cnf_file; CHECK_MALLOC( new_cnf = malloc(strlen(orig) + strlen(DEFAULT_CONF_PATH) + 2) ); /* we will not free it, but not important */ sprintf( new_cnf, DEFAULT_CONF_PATH "/%s", orig ); fd_g_config->cnf_file = new_cnf; fddin = fopen(fd_g_config->cnf_file, "r"); } if (fddin == NULL) { int ret = errno; LOG_F("Unable to open configuration file for reading; tried the following locations: %s%s%s; Error: %s", orig ?: "", orig? " and " : "", fd_g_config->cnf_file, strerror(ret)); return ret; } /* call yacc parser */ TRACE_DEBUG (FULL, "Parsing configuration file: %s", fd_g_config->cnf_file); CHECK_FCT( fddparse(fd_g_config) ); /* close the file */ fclose(fddin); /* Check that TLS private key was given */ if (! fd_g_config->cnf_sec_data.key_file) { /* If TLS is not enabled, we allow empty TLS configuration */ if ((fd_g_config->cnf_port_tls == 0) && (fd_g_config->cnf_flags.tls_alg == 0)) { LOG_N("TLS is disabled, this is *NOT* a recommended practice! Diameter protocol conveys highly sensitive information on your users."); fd_g_config->cnf_sec_data.tls_disabled = 1; } else { LOG_F( "Missing private key configuration for TLS. Please provide the TLS_cred configuration directive."); return EINVAL; } } /* Resolve hostname if not provided */ if (fd_g_config->cnf_diamid == NULL) { char buf[HOST_NAME_MAX + 1]; struct addrinfo hints, *info; int ret; /* local host name */ CHECK_SYS(gethostname(buf, sizeof(buf))); /* get FQDN */ memset(&hints, 0, sizeof hints); hints.ai_flags = AI_CANONNAME; ret = getaddrinfo(buf, NULL, &hints, &info); if (ret != 0) { TRACE_ERROR( "Error resolving local FQDN : '%s' : %s" ". Please provide Identity in configuration file.", buf, gai_strerror(ret)); return EINVAL; } fd_g_config->cnf_diamid = info->ai_canonname; CHECK_FCT( fd_os_validate_DiameterIdentity(&fd_g_config->cnf_diamid, &fd_g_config->cnf_diamid_len, 1) ); freeaddrinfo(info); } else { CHECK_FCT( fd_os_validate_DiameterIdentity(&fd_g_config->cnf_diamid, &fd_g_config->cnf_diamid_len, 0) ); } /* Handle the realm part */ if (fd_g_config->cnf_diamrlm == NULL) { char * start = NULL; /* Check the diameter identity is a fqdn */ start = strchr(fd_g_config->cnf_diamid, '.'); if ((start == NULL) || (start[1] == '\0')) { TRACE_ERROR( "Unable to extract realm from the Identity '%s'." " Please fix your Identity setting or provide Realm.", fd_g_config->cnf_diamid); return EINVAL; } fd_g_config->cnf_diamrlm = start + 1; CHECK_FCT( fd_os_validate_DiameterIdentity(&fd_g_config->cnf_diamrlm, &fd_g_config->cnf_diamrlm_len, 1) ); } else { CHECK_FCT( fd_os_validate_DiameterIdentity(&fd_g_config->cnf_diamrlm, &fd_g_config->cnf_diamrlm_len, 0) ); } /* Validate some flags */ if (fd_g_config->cnf_flags.no_ip4 && fd_g_config->cnf_flags.no_ip6) { TRACE_ERROR( "IP and IPv6 cannot be disabled at the same time."); return EINVAL; } if (fd_g_config->cnf_flags.no_tcp && fd_g_config->cnf_flags.no_sctp) { TRACE_ERROR( "TCP and SCTP cannot be disabled at the same time."); return EINVAL; } /* Validate local endpoints */ if ((!FD_IS_LIST_EMPTY(&fd_g_config->cnf_endpoints)) && (fd_g_config->cnf_flags.no_ip4 || fd_g_config->cnf_flags.no_ip6)) { struct fd_list * li; for ( li = fd_g_config->cnf_endpoints.next; li != &fd_g_config->cnf_endpoints; li = li->next) { struct fd_endpoint * ep = (struct fd_endpoint *)li; if ( (fd_g_config->cnf_flags.no_ip4 && (ep->sa.sa_family == AF_INET)) ||(fd_g_config->cnf_flags.no_ip6 && (ep->sa.sa_family == AF_INET6)) ) { char sa_buf[sSA_DUMP_STRLEN];; li = li->prev; fd_list_unlink(&ep->chain); fd_sa_sdump_numeric(sa_buf, &ep->sa); LOG_N("Info: Removing local address conflicting with the flags no_IP / no_IP6 : %s", sa_buf); free(ep); } } } /* Configure TLS default parameters */ if ((!fd_g_config->cnf_sec_data.tls_disabled) && (!fd_g_config->cnf_sec_data.prio_string)) { const char * err_pos = NULL; CHECK_GNUTLS_DO( gnutls_priority_init( &fd_g_config->cnf_sec_data.prio_cache, GNUTLS_DEFAULT_PRIORITY, &err_pos), { TRACE_ERROR("Error in priority string at position : %s", err_pos); return EINVAL; } ); } /* Verify that our certificate is valid -- otherwise remote peers will reject it */ if (!fd_g_config->cnf_sec_data.tls_disabled) { int ret = 0, i; gnutls_datum_t certfile; gnutls_x509_crt_t * certs = NULL; unsigned int cert_max = 0; /* Read the certificate file */ FILE *stream = fopen (fd_g_config->cnf_sec_data.cert_file, "rb"); if (!stream) { int err = errno; TRACE_DEBUG(INFO, "An error occurred while opening '%s': %s", fd_g_config->cnf_sec_data.cert_file, strerror(err)); return err; } CHECK_FCT( fd_conf_stream_to_gnutls_datum(stream, &certfile) ); fclose(stream); /* Import the certificate(s) */ GNUTLS_TRACE( ret = gnutls_x509_crt_list_import(NULL, &cert_max, &certfile, GNUTLS_X509_FMT_PEM, GNUTLS_X509_CRT_LIST_IMPORT_FAIL_IF_EXCEED) ); if (ret != GNUTLS_E_SHORT_MEMORY_BUFFER) { CHECK_GNUTLS_DO(ret, return EINVAL); } CHECK_MALLOC( certs = calloc(cert_max, sizeof(gnutls_x509_crt_t)) ); CHECK_GNUTLS_DO( gnutls_x509_crt_list_import(certs, &cert_max, &certfile, GNUTLS_X509_FMT_PEM, #ifdef GNUTLS_VERSION_300 GNUTLS_X509_CRT_LIST_FAIL_IF_UNSORTED #else /* GNUTLS_VERSION_300 */ 0 #endif /* GNUTLS_VERSION_300 */ ), { TRACE_ERROR("Failed to import the data from file '%s'", fd_g_config->cnf_sec_data.cert_file); free(certfile.data); return EINVAL; } ); free(certfile.data); ASSERT(cert_max >= 1); /* Now, verify the list against the local CA and CRL */ #ifdef GNUTLS_VERSION_300 /* We use the trust list for this purpose */ { unsigned int output; gnutls_x509_trust_list_verify_named_crt ( fd_g_config->cnf_sec_data.trustlist, certs[0], fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len, 0, &output, fd_conf_print_details_func); /* if this certificate is not explicitly trusted verify against CAs */ if (output != 0) { gnutls_x509_trust_list_verify_crt ( fd_g_config->cnf_sec_data.trustlist, certs, cert_max, 0, &output, fd_conf_print_details_func); } if (output & GNUTLS_CERT_INVALID) { fd_log_debug("TLS: Local certificate chain '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file); if (output & GNUTLS_CERT_SIGNER_NOT_FOUND) TRACE_ERROR(" - The certificate hasn't got a known issuer. Did you forget to specify TLS_CA ?"); if (output & GNUTLS_CERT_SIGNER_NOT_CA) TRACE_ERROR(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints."); if (output & GNUTLS_CERT_NOT_ACTIVATED) TRACE_ERROR(" - The certificate is not yet activated."); if (output & GNUTLS_CERT_EXPIRED) TRACE_ERROR(" - The certificate is expired."); return EINVAL; } /* Now check the subject matches our hostname */ if (!gnutls_x509_crt_check_hostname (certs[0], fd_g_config->cnf_diamid)) { TRACE_ERROR("TLS: The certificate owner does not match the hostname '%s'", fd_g_config->cnf_diamid); return EINVAL; } } #else /* GNUTLS_VERSION_300 */ /* GnuTLS 2.x way of checking certificates */ { gnutls_x509_crt_t * CA_list; int CA_list_length; gnutls_x509_crl_t * CRL_list; int CRL_list_length; unsigned int verify; time_t now; GNUTLS_TRACE( gnutls_certificate_get_x509_cas (fd_g_config->cnf_sec_data.credentials, &CA_list, (unsigned int *) &CA_list_length) ); GNUTLS_TRACE( gnutls_certificate_get_x509_crls (fd_g_config->cnf_sec_data.credentials, &CRL_list, (unsigned int *) &CRL_list_length) ); CHECK_GNUTLS_DO( gnutls_x509_crt_list_verify(certs, cert_max, CA_list, CA_list_length, CRL_list, CRL_list_length, 0, &verify), { TRACE_ERROR("Failed to verify the local certificate '%s' against local credentials. Please check your certificate is valid.", fd_g_config->cnf_sec_data.cert_file); return EINVAL; } ); if (verify) { fd_log_debug("TLS: Local certificate chain '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file); if (verify & GNUTLS_CERT_INVALID) TRACE_ERROR(" - The certificate is not trusted (unknown CA? expired?)"); if (verify & GNUTLS_CERT_REVOKED) TRACE_ERROR(" - The certificate has been revoked."); if (verify & GNUTLS_CERT_SIGNER_NOT_FOUND) TRACE_ERROR(" - The certificate hasn't got a known issuer."); if (verify & GNUTLS_CERT_SIGNER_NOT_CA) TRACE_ERROR(" - The certificate signer is not a CA, or uses version 1, or 3 without basic constraints."); if (verify & GNUTLS_CERT_INSECURE_ALGORITHM) TRACE_ERROR(" - The certificate signature uses a weak algorithm."); return EINVAL; } /* Check the local Identity is valid with the certificate */ if (!gnutls_x509_crt_check_hostname (certs[0], fd_g_config->cnf_diamid)) { TRACE_ERROR("TLS: Local certificate '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file); TRACE_ERROR(" - The certificate hostname does not match '%s'", fd_g_config->cnf_diamid); return EINVAL; } /* Check validity of all the certificates in the chain */ now = time(NULL); for (i = 0; i < cert_max; i++) { time_t deadline; GNUTLS_TRACE( deadline = gnutls_x509_crt_get_expiration_time(certs[i]) ); if ((deadline != (time_t)-1) && (deadline < now)) { TRACE_ERROR("TLS: Local certificate chain '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file); TRACE_ERROR(" - The certificate %d in the chain is expired", i); return EINVAL; } GNUTLS_TRACE( deadline = gnutls_x509_crt_get_activation_time(certs[i]) ); if ((deadline != (time_t)-1) && (deadline > now)) { TRACE_ERROR("TLS: Local certificate chain '%s' is invalid :", fd_g_config->cnf_sec_data.cert_file); TRACE_ERROR(" - The certificate %d in the chain is not yet activated", i); return EINVAL; } } } #endif /* GNUTLS_VERSION_300 */ /* Everything checked OK, free the certificate list */ for (i = 0; i < cert_max; i++) { GNUTLS_TRACE( gnutls_x509_crt_deinit (certs[i]) ); } free(certs); #ifdef GNUTLS_VERSION_300 /* Use certificate verification during the handshake */ gnutls_certificate_set_verify_function (fd_g_config->cnf_sec_data.credentials, fd_tls_verify_credentials_2); #endif /* GNUTLS_VERSION_300 */ } /* gnutls_certificate_set_verify_limits -- so far the default values are fine... */ /* DH */ if (!fd_g_config->cnf_sec_data.tls_disabled) { if (fd_g_config->cnf_sec_data.dh_file) { gnutls_datum_t dhparams = { NULL, 0 }; size_t alloc = 0; FILE *stream = fopen (fd_g_config->cnf_sec_data.dh_file, "rb"); if (!stream) { int err = errno; TRACE_DEBUG(INFO, "An error occurred while opening '%s': %s", fd_g_config->cnf_sec_data.dh_file, strerror(err)); return err; } do { uint8_t * realloced = NULL; size_t read = 0; if (alloc < dhparams.size + BUFSIZ + 1) { alloc += alloc / 2 + BUFSIZ + 1; CHECK_MALLOC_DO( realloced = realloc(dhparams.data, alloc), { free(dhparams.data); return ENOMEM; } ) dhparams.data = realloced; } read = fread( dhparams.data + dhparams.size, 1, alloc - dhparams.size - 1, stream ); dhparams.size += read; if (ferror(stream)) { int err = errno; TRACE_DEBUG(INFO, "An error occurred while reading '%s': %s", fd_g_config->cnf_sec_data.dh_file, strerror(err)); return err; } } while (!feof(stream)); dhparams.data[dhparams.size] = '\0'; fclose(stream); CHECK_GNUTLS_DO( gnutls_dh_params_import_pkcs3( fd_g_config->cnf_sec_data.dh_cache, &dhparams, GNUTLS_X509_FMT_PEM), { TRACE_ERROR("Error in DH bits value : %d", fd_g_config->cnf_sec_data.dh_bits ?: GNUTLS_DEFAULT_DHBITS); return EINVAL; } ); free(dhparams.data); } else { LOG_D( "Generating fresh Diffie-Hellman parameters of size %d (this takes some time)... ", fd_g_config->cnf_sec_data.dh_bits ?: GNUTLS_DEFAULT_DHBITS); CHECK_GNUTLS_DO( gnutls_dh_params_generate2( fd_g_config->cnf_sec_data.dh_cache, fd_g_config->cnf_sec_data.dh_bits ?: GNUTLS_DEFAULT_DHBITS), { TRACE_ERROR("Error in DH bits value : %d", fd_g_config->cnf_sec_data.dh_bits ?: GNUTLS_DEFAULT_DHBITS); return EINVAL; } ); } } return 0; } #ifndef GNUTLS_VERSION_300 GCC_DIAG_ON("-Wdeprecated-declarations") #endif /* !GNUTLS_VERSION_300 */ /* Destroy contents of fd_g_config structure */ int fd_conf_deinit() { TRACE_ENTRY(); if (!fd_g_config) return 0; /* Free the TLS parameters */ #ifdef GNUTLS_VERSION_300 gnutls_x509_trust_list_deinit(fd_g_config->cnf_sec_data.trustlist, 1); #endif /* GNUTLS_VERSION_300 */ gnutls_priority_deinit(fd_g_config->cnf_sec_data.prio_cache); gnutls_dh_params_deinit(fd_g_config->cnf_sec_data.dh_cache); gnutls_certificate_free_credentials(fd_g_config->cnf_sec_data.credentials); free(fd_g_config->cnf_sec_data.cert_file); fd_g_config->cnf_sec_data.cert_file = NULL; free(fd_g_config->cnf_sec_data.key_file); fd_g_config->cnf_sec_data.key_file = NULL; free(fd_g_config->cnf_sec_data.ca_file); fd_g_config->cnf_sec_data.ca_file = NULL; free(fd_g_config->cnf_sec_data.crl_file); fd_g_config->cnf_sec_data.crl_file = NULL; free(fd_g_config->cnf_sec_data.prio_string); fd_g_config->cnf_sec_data.prio_string = NULL; free(fd_g_config->cnf_sec_data.dh_file); fd_g_config->cnf_sec_data.dh_file = NULL; /* Destroy dictionary */ CHECK_FCT_DO( fd_dict_fini(&fd_g_config->cnf_dict), ); /* Destroy the main event queue */ CHECK_FCT_DO( fd_fifo_del(&fd_g_config->cnf_main_ev), ); /* Destroy the local endpoints and applications */ CHECK_FCT_DO(fd_ep_filter(&fd_g_config->cnf_endpoints, 0 ), ); CHECK_FCT_DO(fd_app_empty(&fd_g_config->cnf_apps ), ); /* Destroy the local identity */ free(fd_g_config->cnf_diamid); fd_g_config->cnf_diamid = NULL; free(fd_g_config->cnf_diamrlm); fd_g_config->cnf_diamrlm = NULL; return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/core.c000066400000000000000000000272631333553357400221120ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" GCC_DIAG_OFF("-Wdeprecated-declarations") #include GCC_DIAG_ON("-Wdeprecated-declarations") /* The static configuration structure */ static struct fd_config g_conf; struct fd_config * fd_g_config = NULL; /* gcrypt functions to support posix threads */ #ifndef GNUTLS_VERSION_210 GCRY_THREAD_OPTION_PTHREAD_IMPL; #endif /* GNUTLS_VERSION_210 */ /* Thread that process incoming events on the main queue -- and terminates the framework when requested */ static pthread_t core_runner = (pthread_t)NULL; /* Signal extensions when the framework is completely initialized (they are waiting in fd_core_waitstartcomplete()) */ static enum core_state { CORE_NOT_INIT, /* initial state */ CORE_LIBS_INIT, /* fd_core_initialize was called */ CORE_CONF_READY,/* Configuration was parsed, extensions are loaded */ CORE_RUNNING, /* Servers and clients are started, core_runner thread is running */ CORE_SHUTDOWN, /* The framework is terminating all objects */ CORE_TERM /* Shutdown complete. */ } core_state = CORE_NOT_INIT; static pthread_mutex_t core_mtx = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t core_cnd = PTHREAD_COND_INITIALIZER; static enum core_state core_state_get(void) { enum core_state cur_state; CHECK_POSIX_DO( pthread_mutex_lock( &core_mtx ), ); cur_state = core_state; CHECK_POSIX_DO( pthread_mutex_unlock( &core_mtx ), ); return cur_state; } static void core_state_set(enum core_state newstate) { CHECK_POSIX_DO( pthread_mutex_lock( &core_mtx ), ); LOG_D("Core state: %d -> %d", core_state, newstate); core_state = newstate; CHECK_POSIX_DO( pthread_cond_broadcast( &core_cnd ), ); CHECK_POSIX_DO( pthread_mutex_unlock( &core_mtx ), ); } static int core_state_wait(enum core_state waitstate) { int ret = 0; CHECK_POSIX( pthread_mutex_lock( &core_mtx )); pthread_cleanup_push( fd_cleanup_mutex, &core_mtx ); while (waitstate > core_state) { CHECK_POSIX_DO(ret = pthread_cond_wait(&core_cnd, &core_mtx), break); } pthread_cleanup_pop( 0 ); CHECK_POSIX( pthread_mutex_unlock( &core_mtx )); return ret; } static void core_shutdown(void) { LOG_N( FD_PROJECT_BINARY " framework is stopping..."); fd_log_threadname("fD Core Shutdown"); /* cleanups */ CHECK_FCT_DO( fd_servers_stop(), /* Stop accepting new connections */ ); CHECK_FCT_DO( fd_rtdisp_cleanstop(), /* Stop dispatch thread(s) after a clean loop if possible */ ); CHECK_FCT_DO( fd_peer_fini(), /* Stop all connections */ ); CHECK_FCT_DO( fd_rtdisp_fini(), /* Stop routing threads and destroy routing queues */ ); CHECK_FCT_DO( fd_ext_term(), /* Cleanup all extensions */ ); CHECK_FCT_DO( fd_rtdisp_cleanup(), /* destroy remaining handlers */ ); GNUTLS_TRACE( gnutls_global_deinit() ); CHECK_FCT_DO( fd_conf_deinit(), ); CHECK_FCT_DO( fd_event_trig_fini(), ); fd_log_debug(FD_PROJECT_BINARY " framework is terminated."); fd_libproto_fini(); } static void * core_runner_thread(void * arg) { fd_log_threadname("fD Core Runner"); core_state_wait(CORE_RUNNING); /* Handle events incoming on the main event queue */ while (1) { int code; size_t sz; void * data; CHECK_FCT_DO( fd_event_get(fd_g_config->cnf_main_ev, &code, &sz, &data), break ); switch (code) { case FDEV_TRIGGER: { int tv, *p; CHECK_PARAMS_DO( sz == sizeof(int), { TRACE_DEBUG(NONE, "Internal error: got FDEV_TRIGGER without trigger value!"); ASSERT(0); goto end; } ); p = data; tv = *p; free(p); CHECK_FCT_DO( fd_event_trig_call_cb(tv), goto end ); } break; case FDEV_TERMINATE_INT: goto end; default: TRACE_DEBUG(INFO, "Unexpected event in the main event queue (%d), ignored.", code); } } end: core_shutdown(); return NULL; } /*********************************/ /* Public interfaces */ /* Initialize the libfdcore internals. This also initializes libfdproto */ int fd_core_initialize(void) { int ret; if (core_state_get() != CORE_NOT_INIT) { fprintf(stderr, "fd_core_initialize() called more than once!\n"); return EINVAL; } /* Initialize the library -- must come first since it initializes the debug facility */ ret = fd_libproto_init(); if (ret != 0) { fprintf(stderr, "Unable to initialize libfdproto: %s\n", strerror(ret)); return ret; } /* Name this thread */ fd_log_threadname("Main"); LOG_N("libfdproto '%s' initialized.", fd_libproto_version); /* Initialize gcrypt and gnutls */ #ifndef GNUTLS_VERSION_210 GNUTLS_TRACE( (void) gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread) ); GNUTLS_TRACE( (void) gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0) ); #endif /* GNUTLS_VERSION_210 */ CHECK_GNUTLS_DO( gnutls_global_init(), return EINVAL ); if ( ! gnutls_check_version(GNUTLS_VERSION) ) { TRACE_ERROR( "The GNUTLS library is too old; found '%s', need '" GNUTLS_VERSION "'", gnutls_check_version(NULL)); return EINVAL; } else { #ifdef GNUTLS_VERSION_210 TRACE_DEBUG(INFO, "libgnutls '%s' initialized.", gnutls_check_version(NULL) ); #else /* GNUTLS_VERSION_210 */ TRACE_DEBUG(INFO, "libgnutls '%s', libgcrypt '%s', initialized.", gnutls_check_version(NULL), gcry_check_version(NULL) ); #endif /* GNUTLS_VERSION_210 */ } /* Initialize the config with default values */ memset(&g_conf, 0, sizeof(struct fd_config)); fd_g_config = &g_conf; CHECK_FCT( fd_conf_init() ); /* Add definitions of the base protocol */ CHECK_FCT( fd_dict_base_protocol(fd_g_config->cnf_dict) ); /* Initialize some modules */ CHECK_FCT( fd_hooks_init() ); CHECK_FCT( fd_queues_init() ); CHECK_FCT( fd_sess_start() ); CHECK_FCT( fd_p_expi_init() ); core_state_set(CORE_LIBS_INIT); LOG_N("libfdcore '%s' initialized.", fd_core_version); /* Next thing is to parse the config, leave this for a different function */ return 0; } static pthread_mutex_t core_lock = PTHREAD_MUTEX_INITIALIZER; /* Parse the freeDiameter.conf configuration file, load the extensions */ static int fd_core_parseconf_int(const char * conffile) { char * buf = NULL, *b; size_t len = 0, offset=0; TRACE_ENTRY("%p", conffile); /* Conf file */ if (conffile) fd_g_config->cnf_file = conffile; /* otherwise, we use the default name */ CHECK_FCT( fd_conf_parse() ); /* The following module use data from the configuration */ CHECK_FCT( fd_rtdisp_init() ); /* Now, load all dynamic extensions */ CHECK_FCT( fd_ext_load() ); /* Display configuration */ b = fd_conf_dump(&buf, &len, NULL); LOG_SPLIT(FD_LOG_NOTICE, NULL, b ?: "", NULL); /* Display extensions status */ b = fd_ext_dump(&buf, &len, NULL); LOG_SPLIT(FD_LOG_NOTICE, "Loaded extensions: ", b?:"", NULL); /* Display registered triggers for FDEV_TRIGGER */ b = fd_event_trig_dump(&buf, &len, &offset); if (!b || offset) { LOG_N("%s", b ?: "Error during triggers dump..."); } free(buf); /* Since some extensions might have modified the definitions from the dict_base_protocol, we only load the objects now */ CHECK_FCT( fd_msg_init() ); /* Ok, ready for next step */ core_state_set(CORE_CONF_READY); return 0; } int fd_core_parseconf(const char * conffile) { int ret; CHECK_POSIX( pthread_mutex_lock(&core_lock) ); ret = fd_core_parseconf_int(conffile); CHECK_POSIX( pthread_mutex_unlock(&core_lock) ); return ret; } /* For threads that would need to wait complete start of the framework (ex: in extensions) */ int fd_core_waitstartcomplete(void) { TRACE_ENTRY(""); return core_state_wait(CORE_RUNNING); } /* Start the server & client threads */ static int fd_core_start_int(void) { /* Start server threads */ CHECK_FCT( fd_servers_start() ); /* Start the peer state machines */ CHECK_FCT( fd_psm_start() ); /* Start the core runner thread that handles main events (until shutdown) */ CHECK_POSIX( pthread_create(&core_runner, NULL, core_runner_thread, NULL) ); /* Unlock threads waiting into fd_core_waitstartcomplete */ core_state_set(CORE_RUNNING); /* Ok, everything is running now... */ return 0; } int fd_core_start(void) { int ret; CHECK_POSIX( pthread_mutex_lock(&core_lock) ); ret = fd_core_start_int(); CHECK_POSIX( pthread_mutex_unlock(&core_lock) ); return ret; } /* Initialize shutdown of the framework. This is not blocking. */ int fd_core_shutdown(void) { enum core_state cur_state = core_state_get(); LOG_F("Initiating freeDiameter shutdown sequence (%d)", cur_state); if (cur_state < CORE_RUNNING) { /* Calling application must make sure the initialization is not ongoing in a separate thread... */ if (pthread_mutex_lock(&core_lock) != 0) { /* This function must not be called asynchronously from fd_core_parseconf / fd_core_start ! Please review your main app design */ ASSERT(0); return EINVAL; } core_shutdown(); core_state_set(CORE_TERM); pthread_mutex_unlock(&core_lock); } else if (cur_state == CORE_RUNNING) { core_state_set(CORE_SHUTDOWN); CHECK_FCT( fd_event_send(fd_g_config->cnf_main_ev, FDEV_TERMINATE_INT, 0, NULL) ); } /* Other case, the framework is already shutting down */ return 0; } /* Wait for the shutdown to be complete -- this must be called after fd_core_shutdown to reclaim some resources. */ int fd_core_wait_shutdown_complete(void) { enum core_state cur_state = core_state_get(); void * th_ret = NULL; CHECK_FCT(core_state_wait(CORE_SHUTDOWN)); if (cur_state == CORE_TERM) return 0; /* Just wait for core_runner_thread to complete and return gracefully */ CHECK_POSIX(pthread_join(core_runner, &th_ret)); core_state_set(CORE_TERM); return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/dict_base_proto.c000066400000000000000000003736741333553357400243340ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Diameter Base protocol definitions. */ #include "fdcore-internal.h" #include #include /* The pointer for the global dictionary (initialized from main) */ struct dictionary * fd_g_dict = NULL; #define CHECK_dict_new( _type, _data, _parent, _ref ) \ CHECK_FCT( fd_dict_new( dict, (_type), (_data), (_parent), (_ref)) ); #define CHECK_dict_search( _type, _criteria, _what, _result ) \ CHECK_FCT( fd_dict_search( dict, (_type), (_criteria), (_what), (_result), ENOENT) ); struct local_rules_definition { char *avp_name; enum rule_position position; int min; int max; }; #define RULE_ORDER( _position ) ((((_position) == RULE_FIXED_HEAD) || ((_position) == RULE_FIXED_TAIL)) ? 1 : 0 ) #define PARSE_loc_rules( _rulearray, _parent) { \ int __ar; \ for (__ar=0; __ar < sizeof(_rulearray) / sizeof((_rulearray)[0]); __ar++) { \ struct dict_rule_data __data = { NULL, \ (_rulearray)[__ar].position, \ 0, \ (_rulearray)[__ar].min, \ (_rulearray)[__ar].max}; \ __data.rule_order = RULE_ORDER(__data.rule_position); \ CHECK_FCT( fd_dict_search( \ dict, \ DICT_AVP, \ AVP_BY_NAME, \ (_rulearray)[__ar].avp_name, \ &__data.rule_avp, 0 ) ); \ if ( !__data.rule_avp ) { \ TRACE_DEBUG(INFO, "AVP Not found: '%s'", (_rulearray)[__ar].avp_name ); \ return ENOENT; \ } \ CHECK_FCT_DO( fd_dict_new( dict, DICT_RULE, &__data, _parent, NULL), \ { \ TRACE_DEBUG(INFO, "Error on rule with AVP '%s'", \ (_rulearray)[__ar].avp_name ); \ return EINVAL; \ } ); \ } \ } int fd_dict_base_protocol(struct dictionary * dict) { TRACE_ENTRY("%p", dict); CHECK_PARAMS(dict); /* Vendors section */ { /* The base RFC has no vendor information */ ; } /* Applications section */ { /* base accounting application */ { struct dict_application_data data = { 3, "Diameter Base Accounting" }; CHECK_dict_new( DICT_APPLICATION, &data, NULL, NULL); } /* relay application */ { struct dict_application_data data = { 0xffffffff, "Relay" }; #if AI_RELAY != 0xffffffff #error "AI_RELAY definition mismatch" #endif CHECK_dict_new( DICT_APPLICATION, &data , NULL, NULL); } } /* Derived AVP types section */ { /* Address */ { /* The Address format is derived from the OctetString AVP Base Format. It is a discriminated union, representing, for example a 32-bit (IPv4) [RFC791] or 128-bit (IPv6) [RFC4291] address, most significant octet first. The first two octets of the Address AVP represents the AddressType, which contains an Address Family defined in [IANAADFAM]. The AddressType is used to discriminate the content and format of the remaining octets. */ struct dict_type_data data = { AVP_TYPE_OCTETSTRING, "Address" , fd_dictfct_Address_interpret , fd_dictfct_Address_encode, fd_dictfct_Address_dump }; CHECK_dict_new( DICT_TYPE, &data , NULL, NULL); } /* Time */ { /* The Time format is derived from the OctetString AVP Base Format. The string MUST contain four octets, in the same format as the first four bytes are in the NTP timestamp format. The NTP Timestamp format is defined in chapter 3 of [RFC4330]. This represents the number of seconds since 0h on 1 January 1900 with respect to the Coordinated Universal Time (UTC). On 6h 28m 16s UTC, 7 February 2036 the time value will overflow. SNTP [RFC4330] describes a procedure to extend the time to 2104. This procedure MUST be supported by all DIAMETER nodes. */ struct dict_type_data data = { AVP_TYPE_OCTETSTRING, "Time" , fd_dictfct_Time_interpret , fd_dictfct_Time_encode, fd_dictfct_Time_dump }; CHECK_dict_new( DICT_TYPE, &data , NULL, NULL); } /* UTF8String */ { /* The UTF8String format is derived from the OctetString AVP Base Format. This is a human readable string represented using the ISO/IEC IS 10646-1 character set, encoded as an OctetString using the UTF-8 [RFC3629] transformation format described in RFC 3629. Since additional code points are added by amendments to the 10646 standard from time to time, implementations MUST be prepared to encounter any code point from 0x00000001 to 0x7fffffff. Byte sequences that do not correspond to the valid encoding of a code point into UTF-8 charset or are outside this range are prohibited. The use of control codes SHOULD be avoided. When it is necessary to represent a new line, the control code sequence CR LF SHOULD be used. The use of leading or trailing white space SHOULD be avoided. For code points not directly supported by user interface hardware or software, an alternative means of entry and display, such as hexadecimal, MAY be provided. For information encoded in 7-bit US-ASCII, the UTF-8 charset is identical to the US-ASCII charset. UTF-8 may require multiple bytes to represent a single character / code point; thus the length of an UTF8String in octets may be different from the number of characters encoded. Note that the AVP Length field of an UTF8String is measured in octets, not characters. */ struct dict_type_data data = { AVP_TYPE_OCTETSTRING, "UTF8String" , NULL , NULL , fd_dictfct_UTF8String_dump }; CHECK_dict_new( DICT_TYPE, &data , NULL, NULL); } /* DiameterIdentity */ { /* The DiameterIdentity format is derived from the OctetString AVP Base Format. DiameterIdentity = FQDN DiameterIdentity value is used to uniquely identify a Diameter node for purposes of duplicate connection and routing loop detection. The contents of the string MUST be the FQDN of the Diameter node. If multiple Diameter nodes run on the same host, each Diameter node MUST be assigned a unique DiameterIdentity. If a Diameter node can be identified by several FQDNs, a single FQDN should be picked at startup, and used as the only DiameterIdentity for that node, whatever the connection it is sent on. Note that in this document, DiameterIdentity is in ASCII form in order to be compatible with existing DNS infrastructure. See Appendix D for interactions between the Diameter protocol and Internationalized Domain Name (IDNs). */ struct dict_type_data data = { AVP_TYPE_OCTETSTRING, "DiameterIdentity" , NULL , NULL , fd_dictfct_UTF8String_dump }; CHECK_dict_new( DICT_TYPE, &data , NULL, NULL); } /* DiameterURI */ { /* The DiameterURI MUST follow the Uniform Resource Identifiers (URI) syntax [RFC3986] rules specified below: "aaa://" FQDN [ port ] [ transport ] [ protocol ] ; No transport security "aaas://" FQDN [ port ] [ transport ] [ protocol ] ; Transport security used FQDN = Fully Qualified Host Name port = ":" 1*DIGIT ; One of the ports used to listen for ; incoming connections. ; If absent, ; the default Diameter port (3868) is ; assumed. transport = ";transport=" transport-protocol ; One of the transports used to listen ; for incoming connections. If absent, ; the default SCTP [RFC2960] protocol is ; assumed. UDP MUST NOT be used when ; the aaa-protocol field is set to ; diameter. transport-protocol = ( "tcp" / "sctp" / "udp" ) protocol = ";protocol=" aaa-protocol ; If absent, the default AAA protocol ; is diameter. aaa-protocol = ( "diameter" / "radius" / "tacacs+" ) The following are examples of valid Diameter host identities: aaa://host.example.com;transport=tcp aaa://host.example.com:6666;transport=tcp aaa://host.example.com;protocol=diameter aaa://host.example.com:6666;protocol=diameter aaa://host.example.com:6666;transport=tcp;protocol=diameter aaa://host.example.com:1813;transport=udp;protocol=radius */ struct dict_type_data data = { AVP_TYPE_OCTETSTRING, "DiameterURI" , NULL , NULL , fd_dictfct_UTF8String_dump }; CHECK_dict_new( DICT_TYPE, &data , NULL, NULL); } /* Enumerated */ { /* Enumerated is derived from the Integer32 AVP Base Format. The definition contains a list of valid values and their interpretation and is described in the Diameter application introducing the AVP. */ /* We don't use a generic "Enumerated" type in freeDiameter. Instead, we define * types of the form "Enumerated()" where is replaced * by the name of the AVP to which the type applies. * Example: Enumerated(Disconnect-Cause) */ ; } /* IPFilterRule */ { /* The IPFilterRule format is derived from the OctetString AVP Base Format and uses the ASCII charset. The rule syntax is a modified subset of ipfw(8) from FreeBSD. Packets may be filtered based on the following information that is associated with it: Direction (in or out) Source and destination IP address (possibly masked) Protocol Source and destination port (lists or ranges) TCP flags IP fragment flag IP options ICMP types Rules for the appropriate direction are evaluated in order, with the first matched rule terminating the evaluation. Each packet is evaluated once. If no rule matches, the packet is dropped if the last rule evaluated was a permit, and passed if the last rule was a deny. IPFilterRule filters MUST follow the format: action dir proto from src to dst [options] (...skipped loooong explanation...) There is one kind of packet that the access device MUST always discard, that is an IP fragment with a fragment offset of one. This is a valid packet, but it only has one use, to try to circumvent firewalls. An access device that is unable to interpret or apply a deny rule MUST terminate the session. An access device that is unable to interpret or apply a permit rule MAY apply a more restrictive rule. An access device MAY apply deny rules of its own before the supplied rules, for example to protect the access device owner's infrastructure. */ struct dict_type_data data = { AVP_TYPE_OCTETSTRING, "IPFilterRule" , NULL , NULL , fd_dictfct_UTF8String_dump }; CHECK_dict_new( DICT_TYPE, &data , NULL, NULL); } } /* AVP section */ { struct dict_object * Address_type; struct dict_object * UTF8String_type; struct dict_object * DiameterIdentity_type; struct dict_object * DiameterURI_type; struct dict_object * Time_type; CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Address", &Address_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "UTF8String", &UTF8String_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterIdentity", &DiameterIdentity_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "DiameterURI", &DiameterURI_type); CHECK_dict_search( DICT_TYPE, TYPE_BY_NAME, "Time", &Time_type); /* Vendor-Id */ { /* The Vendor-Id AVP (AVP Code 266) is of type Unsigned32 and contains the IANA "SMI Network Management Private Enterprise Codes" [RFC3232] value assigned to the vendor of the Diameter device. It is envisioned that the combination of the Vendor-Id, Product-Name (Section 5.3.7) and the Firmware-Revision (Section 5.3.4) AVPs may provide useful debugging information. A Vendor-Id value of zero in the CER or CEA messages is reserved and indicates that this field is ignored. */ struct dict_avp_data data = { 266, /* Code */ #if AC_VENDOR_ID != 266 #error "AC_VENDOR_ID definition mismatch" #endif 0, /* Vendor */ "Vendor-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data, NULL, NULL); } /* Firmware-Revision */ { /* The Firmware-Revision AVP (AVP Code 267) is of type Unsigned32 and is used to inform a Diameter peer of the firmware revision of the issuing device. For devices that do not have a firmware revision (general purpose computers running Diameter software modules, for instance), the revision of the Diameter software module may be reported instead. */ struct dict_avp_data data = { 267, /* Code */ #if AC_FIRMWARE_REVISION != 267 #error "AC_FIRMWARE_REVISION definition mismatch" #endif 0, /* Vendor */ "Firmware-Revision", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ 0, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Host-IP-Address */ { /* The Host-IP-Address AVP (AVP Code 257) is of type Address and is used to inform a Diameter peer of the sender's IP address. All source addresses that a Diameter node expects to use with SCTP [RFC2960] MUST be advertised in the CER and CEA messages by including a Host-IP- Address AVP for each address. This AVP MUST ONLY be used in the CER and CEA messages. */ struct dict_avp_data data = { 257, /* Code */ #if AC_HOST_IP_ADDRESS != 257 #error "AC_HOST_IP_ADDRESS definition mismatch" #endif 0, /* Vendor */ "Host-IP-Address", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Address_type, NULL); } /* Supported-Vendor-Id */ { /* The Supported-Vendor-Id AVP (AVP Code 265) is of type Unsigned32 and contains the IANA "SMI Network Management Private Enterprise Codes" [RFC3232] value assigned to a vendor other than the device vendor but including the application vendor. This is used in the CER and CEA messages in order to inform the peer that the sender supports (a subset of) the vendor-specific AVPs defined by the vendor identified in this AVP. The value of this AVP SHOULD NOT be set to zero. Multiple instances of this AVP containing the same value SHOULD NOT be sent. */ struct dict_avp_data data = { 265, /* Code */ #if AC_SUPPORTED_VENDOR_ID != 265 #error "AC_SUPPORTED_VENDOR_ID definition mismatch" #endif 0, /* Vendor */ "Supported-Vendor-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Product-Name */ { /* The Product-Name AVP (AVP Code 269) is of type UTF8String, and contains the vendor assigned name for the product. The Product-Name AVP SHOULD remain constant across firmware revisions for the same product. */ struct dict_avp_data data = { 269, /* Code */ #if AC_PRODUCT_NAME != 269 #error "AC_PRODUCT_NAME definition mismatch" #endif 0, /* Vendor */ "Product-Name", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ 0, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Disconnect-Cause */ { /* The Disconnect-Cause AVP (AVP Code 273) is of type Enumerated. A Diameter node MUST include this AVP in the Disconnect-Peer-Request message to inform the peer of the reason for its intention to shutdown the transport connection. The following values are supported: REBOOTING 0 A scheduled reboot is imminent. Receiver of DPR with above result code MAY attempt reconnection. BUSY 1 The peer's internal resources are constrained, and it has determined that the transport connection needs to be closed. Receiver of DPR with above result code SHOULD NOT attempt reconnection. DO_NOT_WANT_TO_TALK_TO_YOU 2 The peer has determined that it does not see a need for the transport connection to exist, since it does not expect any messages to be exchanged in the near future. Receiver of DPR with above result code SHOULD NOT attempt reconnection. */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Disconnect-Cause)" , NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "REBOOTING", { .i32 = 0 }}; struct dict_enumval_data t_1 = { "BUSY", { .i32 = 1 }}; struct dict_enumval_data t_2 = { "DO_NOT_WANT_TO_TALK_TO_YOU", { .i32 = 2 }}; struct dict_avp_data data = { 273, /* Code */ #if AC_DISCONNECT_CAUSE != 273 #error "AC_DISCONNECT_CAUSE definition mismatch" #endif 0, /* Vendor */ "Disconnect-Cause", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Origin-Host */ { /* The Origin-Host AVP (AVP Code 264) is of type DiameterIdentity, and MUST be present in all Diameter messages. This AVP identifies the endpoint that originated the Diameter message. Relay agents MUST NOT modify this AVP. The value of the Origin-Host AVP is guaranteed to be unique within a single host. Note that the Origin-Host AVP may resolve to more than one address as the Diameter peer may support more than one address. This AVP SHOULD be placed as close to the Diameter header as possible. */ struct dict_avp_data data = { 264, /* Code */ #if AC_ORIGIN_HOST != 264 #error "AC_ORIGIN_HOST definition mismatch" #endif 0, /* Vendor */ "Origin-Host", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , DiameterIdentity_type, NULL); } /* Origin-Realm */ { /* The Origin-Realm AVP (AVP Code 296) is of type DiameterIdentity. This AVP contains the Realm of the originator of any Diameter message and MUST be present in all messages. This AVP SHOULD be placed as close to the Diameter header as possible. */ struct dict_avp_data data = { 296, /* Code */ #if AC_ORIGIN_REALM != 296 #error "AC_ORIGIN_REALM definition mismatch" #endif 0, /* Vendor */ "Origin-Realm", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , DiameterIdentity_type, NULL); } /* Destination-Host */ { /* The Destination-Host AVP (AVP Code 293) is of type DiameterIdentity. This AVP MUST be present in all unsolicited agent initiated messages, MAY be present in request messages, and MUST NOT be present in Answer messages. The absence of the Destination-Host AVP will cause a message to be sent to any Diameter server supporting the application within the realm specified in Destination-Realm AVP. This AVP SHOULD be placed as close to the Diameter header as possible. */ struct dict_avp_data data = { 293, /* Code */ #if AC_DESTINATION_HOST != 293 #error "AC_DESTINATION_HOST definition mismatch" #endif 0, /* Vendor */ "Destination-Host", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , DiameterIdentity_type, NULL); } /* Destination-Realm */ { /* The Destination-Realm AVP (AVP Code 283) is of type DiameterIdentity, and contains the realm the message is to be routed to. The Destination-Realm AVP MUST NOT be present in Answer messages. Diameter Clients insert the realm portion of the User-Name AVP. Diameter servers initiating a request message use the value of the Origin-Realm AVP from a previous message received from the intended target host (unless it is known a priori). When present, the Destination-Realm AVP is used to perform message routing decisions. Request messages whose ABNF does not list the Destination-Realm AVP as a mandatory AVP are inherently non-routable messages. This AVP SHOULD be placed as close to the Diameter header as possible. */ struct dict_avp_data data = { 283, /* Code */ #if AC_DESTINATION_REALM != 283 #error "AC_DESTINATION_REALM definition mismatch" #endif 0, /* Vendor */ "Destination-Realm", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , DiameterIdentity_type, NULL); } /* Route-Record */ { /* The Route-Record AVP (AVP Code 282) is of type DiameterIdentity. The identity added in this AVP MUST be the same as the one received in the Origin-Host of the Capabilities Exchange message. */ struct dict_avp_data data = { 282, /* Code */ #if AC_ROUTE_RECORD != 282 #error "AC_ROUTE_RECORD definition mismatch" #endif 0, /* Vendor */ "Route-Record", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , DiameterIdentity_type, NULL); } /* Proxy-Host */ { /* The Proxy-Host AVP (AVP Code 280) is of type DiameterIdentity. This AVP contains the identity of the host that added the Proxy-Info AVP. */ struct dict_avp_data adata = { 280, /* Code */ #if AC_PROXY_HOST != 280 #error "AC_PROXY_HOST definition mismatch" #endif 0, /* Vendor */ "Proxy-Host", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &adata , DiameterIdentity_type, NULL); } /* Proxy-State */ { /* The Proxy-State AVP (AVP Code 33) is of type OctetString, and contains state local information, and MUST be treated as opaque data. */ struct dict_avp_data adata = { 33, /* Code */ #if AC_PROXY_STATE != 33 #error "AC_PROXY_STATE definition mismatch" #endif 0, /* Vendor */ "Proxy-State", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &adata , NULL, NULL); } /* Proxy-Info */ { /* The Proxy-Info AVP (AVP Code 284) is of type Grouped. The Grouped Data field has the following ABNF grammar: Proxy-Info ::= < AVP Header: 284 > { Proxy-Host } { Proxy-State } * [ AVP ] */ struct dict_object * avp; struct dict_avp_data data = { 284, /* Code */ #if AC_PROXY_INFO != 284 #error "AC_PROXY_INFO definition mismatch" #endif 0, /* Vendor */ "Proxy-Info", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { { "Proxy-Host", RULE_REQUIRED, -1, 1 } ,{ "Proxy-State", RULE_REQUIRED, -1, 1 } }; CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* Auth-Application-Id */ { /* The Auth-Application-Id AVP (AVP Code 258) is of type Unsigned32 and is used in order to advertise support of the Authentication and Authorization portion of an application (see Section 2.4). If present in a message other than CER and CEA, the value of the Auth- Application-Id AVP MUST match the Application Id present in the Diameter message header. */ struct dict_avp_data data = { 258, /* Code */ #if AC_AUTH_APPLICATION_ID != 258 #error "AC_AUTH_APPLICATION_ID definition mismatch" #endif 0, /* Vendor */ "Auth-Application-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Acct-Application-Id */ { /* The Acct-Application-Id AVP (AVP Code 259) is of type Unsigned32 and is used in order to advertise support of the Accounting portion of an application (see Section 2.4). If present in a message other than CER and CEA, the value of the Acct-Application-Id AVP MUST match the Application Id present in the Diameter message header. */ struct dict_avp_data data = { 259, /* Code */ #if AC_ACCT_APPLICATION_ID != 259 #error "AC_ACCT_APPLICATION_ID definition mismatch" #endif 0, /* Vendor */ "Acct-Application-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Inband-Security-Id */ { /* The Inband-Security-Id AVP (AVP Code 299) is of type Unsigned32 and is used in order to advertise support of the Security portion of the application. Currently, the following values are supported, but there is ample room to add new security Ids. NO_INBAND_SECURITY 0 This peer does not support TLS. This is the default value, if the AVP is omitted. TLS 1 This node supports TLS security, as defined by [RFC4346]. */ /* Although the RFC does not specify an "Enumerated" type here, we go forward and create one. * This is the reason for the "*" in the type name */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated*(Inband-Security-Id)" , NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "NO_INBAND_SECURITY", { .u32 = ACV_ISI_NO_INBAND_SECURITY }}; struct dict_enumval_data t_1 = { "TLS", { .u32 = ACV_ISI_TLS }}; struct dict_avp_data data = { 299, /* Code */ #if AC_INBAND_SECURITY_ID != 299 #error "AC_INBAND_SECURITY_ID definition mismatch" #endif 0, /* Vendor */ "Inband-Security-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Vendor-Specific-Application-Id */ { /* The Vendor-Specific-Application-Id AVP (AVP Code 260) is of type Grouped and is used to advertise support of a vendor-specific Diameter Application. Exactly one instance of either Auth- Application-Id or Acct-Application-Id AVP MUST be present. The Application Id carried by either Auth-Application-Id or Acct- Application-Id AVP MUST comply with vendor specific Application Id assignment described in Sec 11.3. It MUST also match the Application Id present in the diameter header except when used in a CER or CEA messages. The Vendor-Id AVP is an informational AVP pertaining to the vendor who may have authorship of the vendor-specific Diameter application. It MUST NOT be used as a means of defining a completely separate vendor-specific Application Id space. This AVP MUST also be present as the first AVP in all experimental commands defined in the vendor-specific application. This AVP SHOULD be placed as close to the Diameter header as possible. AVP Format ::= < AVP Header: 260 > { Vendor-Id } [ Auth-Application-Id ] [ Acct-Application-Id ] A Vendor-Specific-Application-Id AVP MUST contain exactly one of either Auth-Application-Id or Acct-Application-Id. If a Vendor- Specific-Application-Id is received without any of these two AVPs, then the recipient SHOULD issue an answer with a Result-Code set to DIAMETER_MISSING_AVP. The answer SHOULD also include a Failed-AVP which MUST contain an example of an Auth-Application-Id AVP and an Acct-Application-Id AVP. If a Vendor-Specific-Application-Id is received that contains both Auth-Application-Id and Acct-Application-Id, then the recipient SHOULD issue an answer with Result-Code set to DIAMETER_AVP_OCCURS_TOO_MANY_TIMES. The answer SHOULD also include a Failed-AVP which MUST contain the received Auth-Application-Id AVP and Acct-Application-Id AVP. */ struct dict_object * avp; struct dict_avp_data data = { 260, /* Code */ #if AC_VENDOR_SPECIFIC_APPLICATION_ID != 260 #error "AC_VENDOR_SPECIFIC_APPLICATION_ID definition mismatch" #endif 0, /* Vendor */ "Vendor-Specific-Application-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; struct local_rules_definition rules[] = { #ifndef WORKAROUND_ACCEPT_INVALID_VSAI /* ABNF from RFC6733 */ { "Vendor-Id", RULE_REQUIRED, -1, 1 } #else /* WORKAROUND_ACCEPT_INVALID_VSAI */ /* ABNF from RFC3588 (including erratum, because original text is nonsense) */ { "Vendor-Id", RULE_REQUIRED, -1, -1} #endif /* WORKAROUND_ACCEPT_INVALID_VSAI */ ,{ "Auth-Application-Id", RULE_OPTIONAL, -1, 1 } ,{ "Acct-Application-Id", RULE_OPTIONAL, -1, 1 } }; /* Create the grouped AVP */ CHECK_dict_new( DICT_AVP, &data , NULL, &avp); PARSE_loc_rules( rules, avp ); } /* Redirect-Host */ { /* One or more of instances of this AVP MUST be present if the answer message's 'E' bit is set and the Result-Code AVP is set to DIAMETER_REDIRECT_INDICATION. Upon receiving the above, the receiving Diameter node SHOULD forward the request directly to one of the hosts identified in these AVPs. The server contained in the selected Redirect-Host AVP SHOULD be used for all messages pertaining to this session. */ struct dict_avp_data data = { 292, /* Code */ #if AC_REDIRECT_HOST != 292 #error "AC_REDIRECT_HOST definition mismatch" #endif 0, /* Vendor */ "Redirect-Host", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , DiameterURI_type, NULL); } /* Redirect-Host-Usage */ { /* The Redirect-Host-Usage AVP (AVP Code 261) is of type Enumerated. This AVP MAY be present in answer messages whose 'E' bit is set and the Result-Code AVP is set to DIAMETER_REDIRECT_INDICATION. When present, this AVP dictates how the routing entry resulting from the Redirect-Host is to be used. The following values are supported: DONT_CACHE 0 The host specified in the Redirect-Host AVP should not be cached. This is the default value. ALL_SESSION 1 All messages within the same session, as defined by the same value of the Session-ID AVP MAY be sent to the host specified in the Redirect-Host AVP. ALL_REALM 2 All messages destined for the realm requested MAY be sent to the host specified in the Redirect-Host AVP. REALM_AND_APPLICATION 3 All messages for the application requested to the realm specified MAY be sent to the host specified in the Redirect-Host AVP. ALL_APPLICATION 4 All messages for the application requested MAY be sent to the host specified in the Redirect-Host AVP. ALL_HOST 5 All messages that would be sent to the host that generated the Redirect-Host MAY be sent to the host specified in the Redirect- Host AVP. ALL_USER 6 All messages for the user requested MAY be sent to the host specified in the Redirect-Host AVP. When multiple cached routes are created by redirect indications and they differ only in redirect usage and peers to forward requests to (see Section 6.1.8), a precedence rule MUST be applied to the redirect usage values of the cached routes during normal routing to resolve contentions that may occur. The precedence rule is the order that dictate which redirect usage should be considered before any other as they appear. The order is as follows: 1. ALL_SESSION 2. ALL_USER 3. REALM_AND_APPLICATION 4. ALL_REALM 5. ALL_APPLICATION 6. ALL_HOST */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Redirect-Host-Usage)" , NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "DONT_CACHE", { .i32 = 0 }}; struct dict_enumval_data t_1 = { "ALL_SESSION", { .i32 = 1 }}; struct dict_enumval_data t_2 = { "ALL_REALM", { .i32 = 2 }}; struct dict_enumval_data t_3 = { "REALM_AND_APPLICATION", { .i32 = 3 }}; struct dict_enumval_data t_4 = { "ALL_APPLICATION", { .i32 = 4 }}; struct dict_enumval_data t_5 = { "ALL_HOST", { .i32 = 5 }}; struct dict_enumval_data t_6 = { "ALL_USER", { .i32 = 6 }}; struct dict_avp_data data = { 261, /* Code */ #if AC_REDIRECT_HOST_USAGE != 261 #error "AC_REDIRECT_HOST_USAGE definition mismatch" #endif 0, /* Vendor */ "Redirect-Host-Usage", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_4 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_5 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_6 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Redirect-Max-Cache-Time */ { /* The Redirect-Max-Cache-Time AVP (AVP Code 262) is of type Unsigned32. This AVP MUST be present in answer messages whose 'E' bit is set, the Result-Code AVP is set to DIAMETER_REDIRECT_INDICATION and the Redirect-Host-Usage AVP set to a non-zero value. This AVP contains the maximum number of seconds the peer and route table entries, created as a result of the Redirect-Host, will be cached. Note that once a host created due to a redirect indication is no longer reachable, any associated peer and routing table entries MUST be deleted. */ struct dict_avp_data data = { 262, /* Code */ #if AC_REDIRECT_MAX_CACHE_TIME != 262 #error "AC_REDIRECT_MAX_CACHE_TIME definition mismatch" #endif 0, /* Vendor */ "Redirect-Max-Cache-Time", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Result-Code */ { /* The Result-Code AVP (AVP Code 268) is of type Unsigned32 and indicates whether a particular request was completed successfully or whether an error occurred. All Diameter answer messages defined in IETF applications MUST include one Result-Code AVP. A non-successful Result-Code AVP (one containing a non 2xxx value other than DIAMETER_REDIRECT_INDICATION) MUST include the Error-Reporting-Host AVP if the host setting the Result-Code AVP is different from the identity encoded in the Origin-Host AVP. The Result-Code data field contains an IANA-managed 32-bit address space representing errors (see Section 11.4). Diameter provides the following classes of errors, all identified by the thousands digit in the decimal notation: o 1xxx (Informational) o 2xxx (Success) o 3xxx (Protocol Errors) o 4xxx (Transient Failures) o 5xxx (Permanent Failure) A non-recognized class (one whose first digit is not defined in this section) MUST be handled as a permanent failure. */ /* Although the RFC does not specify an "Enumerated" type here, we go forward and create one. * This is the reason for the "*" in the type name */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated*(Result-Code)" , NULL, NULL, NULL }; struct dict_avp_data data = { 268, /* Code */ #if AC_RESULT_CODE != 268 #error "AC_RESULT_CODE definition mismatch" #endif 0, /* Vendor */ "Result-Code", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_AVP, &data , type, NULL); /* Informational */ { /* 1001 */ { /* This informational error is returned by a Diameter server to inform the access device that the authentication mechanism being used requires multiple round trips, and a subsequent request needs to be issued in order for access to be granted. */ struct dict_enumval_data error_code = { "DIAMETER_MULTI_ROUND_AUTH", { .u32 = ER_DIAMETER_MULTI_ROUND_AUTH }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } } /* Success */ { /* 2001 */ { /* The Request was successfully completed. */ struct dict_enumval_data error_code = { "DIAMETER_SUCCESS", { .u32 = ER_DIAMETER_SUCCESS }}; #if ER_DIAMETER_SUCCESS != 2001 #error "ER_DIAMETER_SUCCESS definition mismatch" #endif CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 2002 */ { /* When returned, the request was successfully completed, but additional processing is required by the application in order to provide service to the user. */ struct dict_enumval_data error_code = { "DIAMETER_LIMITED_SUCCESS", { .u32 = ER_DIAMETER_LIMITED_SUCCESS }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } } /* Protocol Errors */ { /* 3001 -- might be changed to 5xxx soon */ { /* The Request contained a Command-Code that the receiver did not recognize or support. This MUST be used when a Diameter node receives an experimental command that it does not understand. */ struct dict_enumval_data error_code = { "DIAMETER_COMMAND_UNSUPPORTED", { .u32 = ER_DIAMETER_COMMAND_UNSUPPORTED }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 3002 */ { /* This error is given when Diameter can not deliver the message to the destination, either because no host within the realm supporting the required application was available to process the request, or because Destination-Host AVP was given without the associated Destination-Realm AVP. */ struct dict_enumval_data error_code = { "DIAMETER_UNABLE_TO_DELIVER", { .u32 = ER_DIAMETER_UNABLE_TO_DELIVER }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 3003 */ { /* The intended realm of the request is not recognized. */ struct dict_enumval_data error_code = { "DIAMETER_REALM_NOT_SERVED", { .u32 = ER_DIAMETER_REALM_NOT_SERVED }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 3004 */ { /* When returned, a Diameter node SHOULD attempt to send the message to an alternate peer. This error MUST only be used when a specific server is requested, and it cannot provide the requested service. */ struct dict_enumval_data error_code = { "DIAMETER_TOO_BUSY", { .u32 = ER_DIAMETER_TOO_BUSY }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 3005 */ { /* An agent detected a loop while trying to get the message to the intended recipient. The message MAY be sent to an alternate peer, if one is available, but the peer reporting the error has identified a configuration problem. */ struct dict_enumval_data error_code = { "DIAMETER_LOOP_DETECTED", { .u32 = ER_DIAMETER_LOOP_DETECTED }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 3006 */ { /* A redirect agent has determined that the request could not be satisfied locally and the initiator of the request should direct the request directly to the server, whose contact information has been added to the response. When set, the Redirect-Host AVP MUST be present. */ struct dict_enumval_data error_code = { "DIAMETER_REDIRECT_INDICATION", { .u32 = ER_DIAMETER_REDIRECT_INDICATION }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 3007 */ { /* A request was sent for an application that is not supported. */ struct dict_enumval_data error_code = { "DIAMETER_APPLICATION_UNSUPPORTED", { .u32 = ER_DIAMETER_APPLICATION_UNSUPPORTED }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 3008 -- will change to 5xxx soon */ { /* A request was received whose bits in the Diameter header were either set to an invalid combination, or to a value that is inconsistent with the command code's definition. */ struct dict_enumval_data error_code = { "DIAMETER_INVALID_HDR_BITS", { .u32 = ER_DIAMETER_INVALID_HDR_BITS }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 3009 -- will change to 5xxx soon */ { /* A request was received that included an AVP whose flag bits are set to an unrecognized value, or that is inconsistent with the AVP's definition. */ struct dict_enumval_data error_code = { "DIAMETER_INVALID_AVP_BITS", { .u32 = ER_DIAMETER_INVALID_AVP_BITS }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 3010 -- will change to 5xxx soon */ { /* A CER was received from an unknown peer. */ struct dict_enumval_data error_code = { "DIAMETER_UNKNOWN_PEER", { .u32 = ER_DIAMETER_UNKNOWN_PEER }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } } /* Transient Failures */ { /* 4001 */ { /* The authentication process for the user failed, most likely due to an invalid password used by the user. Further attempts MUST only be tried after prompting the user for a new password. */ struct dict_enumval_data error_code = { "DIAMETER_AUTHENTICATION_REJECTED", { .u32 = ER_DIAMETER_AUTHENTICATION_REJECTED }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 4002 */ { /* A Diameter node received the accounting request but was unable to commit it to stable storage due to a temporary lack of space. */ struct dict_enumval_data error_code = { "DIAMETER_OUT_OF_SPACE", { .u32 = ER_DIAMETER_OUT_OF_SPACE }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 4003 */ { /* The peer has determined that it has lost the election process and has therefore disconnected the transport connection. */ struct dict_enumval_data error_code = { "ELECTION_LOST", { .u32 = ER_ELECTION_LOST }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } } /* Permanent Failures */ { /* 5001 */ { /* The peer received a message that contained an AVP that is not recognized or supported and was marked with the Mandatory bit. A Diameter message with this error MUST contain one or more Failed- AVP AVP containing the AVPs that caused the failure. */ struct dict_enumval_data error_code = { "DIAMETER_AVP_UNSUPPORTED", { .u32 = ER_DIAMETER_AVP_UNSUPPORTED }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5002 */ { /* The request contained an unknown Session-Id. */ struct dict_enumval_data error_code = { "DIAMETER_UNKNOWN_SESSION_ID", { .u32 = ER_DIAMETER_UNKNOWN_SESSION_ID }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5003 */ { /* A request was received for which the user could not be authorized. This error could occur if the service requested is not permitted to the user. */ struct dict_enumval_data error_code = { "DIAMETER_AUTHORIZATION_REJECTED",{ .u32 = ER_DIAMETER_AUTHORIZATION_REJECTED }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5004 */ { /* The request contained an AVP with an invalid value in its data portion. A Diameter message indicating this error MUST include the offending AVPs within a Failed-AVP AVP. */ struct dict_enumval_data error_code = { "DIAMETER_INVALID_AVP_VALUE", { .u32 = ER_DIAMETER_INVALID_AVP_VALUE }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5005 */ { /* The request did not contain an AVP that is required by the Command Code definition. If this value is sent in the Result-Code AVP, a Failed-AVP AVP SHOULD be included in the message. The Failed-AVP AVP MUST contain an example of the missing AVP complete with the Vendor-Id if applicable. The value field of the missing AVP should be of correct minimum length and contain zeroes. */ struct dict_enumval_data error_code = { "DIAMETER_MISSING_AVP", { .u32 = ER_DIAMETER_MISSING_AVP }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5006 */ { /* A request was received that cannot be authorized because the user has already expended allowed resources. An example of this error condition is a user that is restricted to one dial-up PPP port, attempts to establish a second PPP connection. */ struct dict_enumval_data error_code = { "DIAMETER_RESOURCES_EXCEEDED", { .u32 = ER_DIAMETER_RESOURCES_EXCEEDED }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5007 */ { /* The Home Diameter server has detected AVPs in the request that contradicted each other, and is not willing to provide service to the user. The Failed-AVP AVPs MUST be present which contains the AVPs that contradicted each other. */ struct dict_enumval_data error_code = { "DIAMETER_CONTRADICTING_AVPS", { .u32 = ER_DIAMETER_CONTRADICTING_AVPS }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5008 */ { /* A message was received with an AVP that MUST NOT be present. The Failed-AVP AVP MUST be included and contain a copy of the offending AVP. */ struct dict_enumval_data error_code = { "DIAMETER_AVP_NOT_ALLOWED", { .u32 = ER_DIAMETER_AVP_NOT_ALLOWED }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5009 */ { /* A message was received that included an AVP that appeared more often than permitted in the message definition. The Failed-AVP AVP MUST be included and contain a copy of the first instance of the offending AVP that exceeded the maximum number of occurrences */ struct dict_enumval_data error_code = { "DIAMETER_AVP_OCCURS_TOO_MANY_TIMES",{ .u32 = ER_DIAMETER_AVP_OCCURS_TOO_MANY_TIMES }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5010 */ { /* This error is returned by a Diameter node that is not acting as a relay when it receives a CER which advertises a set of applications that it does not support. */ struct dict_enumval_data error_code = { "DIAMETER_NO_COMMON_APPLICATION",{ .u32 = ER_DIAMETER_NO_COMMON_APPLICATION }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5011 */ { /* This error is returned when a request was received, whose version number is unsupported. */ struct dict_enumval_data error_code = { "DIAMETER_UNSUPPORTED_VERSION", { .u32 = ER_DIAMETER_UNSUPPORTED_VERSION }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5012 */ { /* This error is returned when a request is rejected for unspecified reasons. */ struct dict_enumval_data error_code = { "DIAMETER_UNABLE_TO_COMPLY", { .u32 = ER_DIAMETER_UNABLE_TO_COMPLY }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5013 -- will change to 3xxx */ { /* This error is returned when an unrecognized bit in the Diameter header is set to one (1). */ struct dict_enumval_data error_code = { "DIAMETER_INVALID_BIT_IN_HEADER", { .u32 = ER_DIAMETER_INVALID_BIT_IN_HEADER }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5014 */ { /* The request contained an AVP with an invalid length. A Diameter message indicating this error MUST include the offending AVPs within a Failed-AVP AVP. In cases where the erroneous avp length value exceeds the message length or is less than the minimum AVP header length, it is sufficient to include the offending AVP header and a zero filled payload of the minimum required length for the payloads data type. If the AVP is a grouped AVP, the grouped AVP header with an empty payload would be sufficient to indicate the offending AVP. In the case where the offending AVP header cannot be fully decoded when avp length is less than the minimum AVP header length, it is sufficient to include an offending AVP header that is formulated by padding the incomplete AVP header with zero up to the minimum AVP header length. */ struct dict_enumval_data error_code = { "DIAMETER_INVALID_AVP_LENGTH", { .u32 = ER_DIAMETER_INVALID_AVP_LENGTH }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5015 -- will change to 3xxx */ { /* This error is returned when a request is received with an invalid message length. */ struct dict_enumval_data error_code = { "DIAMETER_INVALID_MESSAGE_LENGTH", { .u32 = ER_DIAMETER_INVALID_MESSAGE_LENGTH }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5016 */ { /* The request contained an AVP with which is not allowed to have the given value in the AVP Flags field. A Diameter message indicating this error MUST include the offending AVPs within a Failed-AVP AVP. */ struct dict_enumval_data error_code = { "DIAMETER_INVALID_AVP_BIT_COMBO", { .u32 = ER_DIAMETER_INVALID_AVP_BIT_COMBO }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } /* 5017 */ { /* This error is returned when a CER message is received, and there are no common security mechanisms supported between the peers. A Capabilities-Exchange-Answer (CEA) MUST be returned with the Result-Code AVP set to DIAMETER_NO_COMMON_SECURITY. */ struct dict_enumval_data error_code = { "DIAMETER_NO_COMMON_SECURITY", { .u32 = ER_DIAMETER_NO_COMMON_SECURITY }}; CHECK_dict_new( DICT_ENUMVAL, &error_code , type, NULL); } } } /* Error-Message */ { /* The Error-Message AVP (AVP Code 281) is of type UTF8String. It MAY accompany a Result-Code AVP as a human readable error message. The Error-Message AVP is not intended to be useful in real-time, and SHOULD NOT be expected to be parsed by network entities. */ struct dict_avp_data data = { 281, /* Code */ #if AC_ERROR_MESSAGE != 281 #error "AC_ERROR_MESSAGE definition mismatch" #endif 0, /* Vendor */ "Error-Message", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ 0, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Error-Reporting-Host */ { /* The Error-Reporting-Host AVP (AVP Code 294) is of type DiameterIdentity. This AVP contains the identity of the Diameter host that sent the Result-Code AVP to a value other than 2001 (Success), only if the host setting the Result-Code is different from the one encoded in the Origin-Host AVP. This AVP is intended to be used for troubleshooting purposes, and MUST be set when the Result- Code AVP indicates a failure. */ struct dict_avp_data data = { 294, /* Code */ #if AC_ERROR_REPORTING_HOST != 294 #error "AC_ERROR_REPORTING_HOST definition mismatch" #endif 0, /* Vendor */ "Error-Reporting-Host", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ 0, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , DiameterIdentity_type, NULL); } /* Failed-AVP */ { /* The Failed-AVP AVP (AVP Code 279) is of type Grouped and provides debugging information in cases where a request is rejected or not fully processed due to erroneous information in a specific AVP. The value of the Result-Code AVP will provide information on the reason for the Failed-AVP AVP. A Diameter message SHOULD contain only one Failed-AVP that corresponds to the error indicated by the Result-Code AVP. For practical purposes, this Failed-AVP would typically refer to the first AVP processing error that a Diameter node encounters. The possible reasons for this AVP are the presence of an improperly constructed AVP, an unsupported or unrecognized AVP, an invalid AVP value, the omission of a required AVP, the presence of an explicitly excluded AVP (see tables in Section 10), or the presence of two or more occurrences of an AVP which is restricted to 0, 1, or 0-1 occurrences. A Diameter message SHOULD contain one Failed-AVP AVP, containing the entire AVP that could not be processed successfully. If the failure reason is omission of a required AVP, an AVP with the missing AVP code, the missing vendor id, and a zero filled payload of the minimum required length for the omitted AVP will be added. If the failure reason is an invalid AVP length where the reported length is less than the minimum AVP header length or greater than the reported message length, a copy of the offending AVP header and a zero filled payload of the minimum required length SHOULD be added. In the case where the offending AVP is embedded within a grouped AVP, the Failed-AVP MAY contain the grouped AVP which in turn contains the single offending AVP. The same method MAY be employed if the grouped AVP itself is embedded in yet another grouped AVP and so on. In this case, the Failed-AVP MAY contain the grouped AVP heirarchy up to the single offending AVP. This enables the recipient to detect the location of the offending AVP when embedded in a group. AVP Format ::= < AVP Header: 279 > 1* {AVP} */ struct dict_avp_data data = { 279, /* Code */ #if AC_FAILED_AVP != 279 #error "AC_FAILED_AVP definition mismatch" #endif 0, /* Vendor */ "Failed-AVP", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Experimental-Result */ { /* The Experimental-Result AVP (AVP Code 297) is of type Grouped, and indicates whether a particular vendor-specific request was completed successfully or whether an error occurred. Its Data field has the following ABNF grammar: AVP Format Experimental-Result ::= < AVP Header: 297 > { Vendor-Id } { Experimental-Result-Code } The Vendor-Id AVP (see Section 5.3.3) in this grouped AVP identifies the vendor responsible for the assignment of the result code which follows. All Diameter answer messages defined in vendor-specific applications MUST include either one Result-Code AVP or one Experimental-Result AVP. */ struct dict_avp_data data = { 297, /* Code */ 0, /* Vendor */ "Experimental-Result", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_GROUPED /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Experimental-Result-Code */ { /* The Experimental-Result-Code AVP (AVP Code 298) is of type Unsigned32 and contains a vendor-assigned value representing the result of processing the request. It is recommended that vendor-specific result codes follow the same conventions given for the Result-Code AVP regarding the different types of result codes and the handling of errors (for non 2xxx values). */ /* Although the RFC does not specify an "Enumerated" type here, we go forward and create one. * This is the reason for the "*" in the type name. Vendors will have to define their values. */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated*(Experimental-Result-Code)" , NULL, NULL, NULL }; struct dict_avp_data data = { 298, /* Code */ 0, /* Vendor */ "Experimental-Result-Code", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Auth-Request-Type */ { /* The Auth-Request-Type AVP (AVP Code 274) is of type Enumerated and is included in application-specific auth requests to inform the peers whether a user is to be authenticated only, authorized only or both. Note any value other than both MAY cause RADIUS interoperability issues. The following values are defined: AUTHENTICATE_ONLY 1 The request being sent is for authentication only, and MUST contain the relevant application specific authentication AVPs that are needed by the Diameter server to authenticate the user. AUTHORIZE_ONLY 2 The request being sent is for authorization only, and MUST contain the application specific authorization AVPs that are necessary to identify the service being requested/offered. AUTHORIZE_AUTHENTICATE 3 The request contains a request for both authentication and authorization. The request MUST include both the relevant application specific authentication information, and authorization information necessary to identify the service being requested/ offered. */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Auth-Request-Type)" , NULL, NULL, NULL }; struct dict_enumval_data t_1 = { "AUTHENTICATE_ONLY", { .i32 = 1 }}; struct dict_enumval_data t_2 = { "AUTHORIZE_ONLY", { .i32 = 2 }}; struct dict_enumval_data t_3 = { "AUTHORIZE_AUTHENTICATE", { .i32 = 3 }}; struct dict_avp_data data = { 274, /* Code */ 0, /* Vendor */ "Auth-Request-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Session-Id */ { /* The Session-Id AVP (AVP Code 263) is of type UTF8String and is used to identify a specific session (see Section 8). All messages pertaining to a specific session MUST include only one Session-Id AVP and the same value MUST be used throughout the life of a session. When present, the Session-Id SHOULD appear immediately following the Diameter Header (see Section 3). The Session-Id MUST be globally and eternally unique, as it is meant to uniquely identify a user session without reference to any other information, and may be needed to correlate historical authentication information with accounting information. The Session-Id includes a mandatory portion and an implementation-defined portion; a recommended format for the implementation-defined portion is outlined below. (skipped, see RFC for detail) */ struct dict_avp_data data = { 263, /* Code */ #if AC_SESSION_ID != 263 #error "AC_SESSION_ID definition mismatch" #endif 0, /* Vendor */ "Session-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Authorization-Lifetime */ { /* The Authorization-Lifetime AVP (AVP Code 291) is of type Unsigned32 and contains the maximum number of seconds of service to be provided to the user before the user is to be re-authenticated and/or re- authorized. Great care should be taken when the Authorization- Lifetime value is determined, since a low, non-zero, value could create significant Diameter traffic, which could congest both the network and the agents. A value of zero (0) means that immediate re-auth is necessary by the access device. This is typically used in cases where multiple authentication methods are used, and a successful auth response with this AVP set to zero is used to signal that the next authentication method is to be immediately initiated. The absence of this AVP, or a value of all ones (meaning all bits in the 32 bit field are set to one) means no re-auth is expected. If both this AVP and the Session-Timeout AVP are present in a message, the value of the latter MUST NOT be smaller than the Authorization-Lifetime AVP. An Authorization-Lifetime AVP MAY be present in re-authorization messages, and contains the number of seconds the user is authorized to receive service from the time the re-auth answer message is received by the access device. This AVP MAY be provided by the client as a hint of the maximum lifetime that it is willing to accept. However, the server MAY return a value that is equal to, or smaller, than the one provided by the client. */ struct dict_avp_data data = { 291, /* Code */ 0, /* Vendor */ "Authorization-Lifetime", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Auth-Grace-Period */ { /* The Auth-Grace-Period AVP (AVP Code 276) is of type Unsigned32 and contains the number of seconds the Diameter server will wait following the expiration of the Authorization-Lifetime AVP before cleaning up resources for the session. */ struct dict_avp_data data = { 276, /* Code */ 0, /* Vendor */ "Auth-Grace-Period", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Auth-Session-State */ { /* The Auth-Session-State AVP (AVP Code 277) is of type Enumerated and specifies whether state is maintained for a particular session. The client MAY include this AVP in requests as a hint to the server, but the value in the server's answer message is binding. The following values are supported: STATE_MAINTAINED 0 This value is used to specify that session state is being maintained, and the access device MUST issue a session termination message when service to the user is terminated. This is the default value. NO_STATE_MAINTAINED 1 This value is used to specify that no session termination messages will be sent by the access device upon expiration of the Authorization-Lifetime. */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Auth-Session-State)" , NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "STATE_MAINTAINED", { .i32 = 0 }}; struct dict_enumval_data t_1 = { "NO_STATE_MAINTAINED", { .i32 = 1 }}; struct dict_avp_data data = { 277, /* Code */ 0, /* Vendor */ "Auth-Session-State", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Re-Auth-Request-Type */ { /* The Re-Auth-Request-Type AVP (AVP Code 285) is of type Enumerated and is included in application-specific auth answers to inform the client of the action expected upon expiration of the Authorization-Lifetime. If the answer message contains an Authorization-Lifetime AVP with a positive value, the Re-Auth-Request-Type AVP MUST be present in an answer message. The following values are defined: AUTHORIZE_ONLY 0 An authorization only re-auth is expected upon expiration of the Authorization-Lifetime. This is the default value if the AVP is not present in answer messages that include the Authorization- Lifetime. AUTHORIZE_AUTHENTICATE 1 An authentication and authorization re-auth is expected upon expiration of the Authorization-Lifetime. */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Re-Auth-Request-Type)" , NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "AUTHORIZE_ONLY", { .i32 = 0 }}; struct dict_enumval_data t_1 = { "AUTHORIZE_AUTHENTICATE", { .i32 = 1 }}; struct dict_avp_data data = { 285, /* Code */ 0, /* Vendor */ "Re-Auth-Request-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Session-Timeout */ { /* The Session-Timeout AVP (AVP Code 27) [RFC2865] is of type Unsigned32 and contains the maximum number of seconds of service to be provided to the user before termination of the session. When both the Session-Timeout and the Authorization-Lifetime AVPs are present in an answer message, the former MUST be equal to or greater than the value of the latter. A session that terminates on an access device due to the expiration of the Session-Timeout MUST cause an STR to be issued, unless both the access device and the home server had previously agreed that no session termination messages would be sent (see Section 8.11). A Session-Timeout AVP MAY be present in a re-authorization answer message, and contains the remaining number of seconds from the beginning of the re-auth. A value of zero, or the absence of this AVP, means that this session has an unlimited number of seconds before termination. This AVP MAY be provided by the client as a hint of the maximum timeout that it is willing to accept. However, the server MAY return a value that is equal to, or smaller, than the one provided by the client. */ struct dict_avp_data data = { 27, /* Code */ 0, /* Vendor */ "Session-Timeout", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* User-Name */ { /* The User-Name AVP (AVP Code 1) [RFC2865] is of type UTF8String, which contains the User-Name, in a format consistent with the NAI specification [RFC4282]. */ struct dict_avp_data data = { 1, /* Code */ 0, /* Vendor */ "User-Name", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Termination-Cause */ { /* The Termination-Cause AVP (AVP Code 295) is of type Enumerated, and is used to indicate the reason why a session was terminated on the access device. The following values are defined: DIAMETER_LOGOUT 1 The user initiated a disconnect DIAMETER_SERVICE_NOT_PROVIDED 2 This value is used when the user disconnected prior to the receipt of the authorization answer message. DIAMETER_BAD_ANSWER 3 This value indicates that the authorization answer received by the access device was not processed successfully. DIAMETER_ADMINISTRATIVE 4 The user was not granted access, or was disconnected, due to administrative reasons, such as the receipt of a Abort-Session- Request message. DIAMETER_LINK_BROKEN 5 The communication to the user was abruptly disconnected. DIAMETER_AUTH_EXPIRED 6 The user's access was terminated since its authorized session time has expired. DIAMETER_USER_MOVED 7 The user is receiving services from another access device. DIAMETER_SESSION_TIMEOUT 8 The user's session has timed out, and service has been terminated. */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Termination-Cause)" , NULL, NULL, NULL }; struct dict_enumval_data t_1 = { "DIAMETER_LOGOUT", { .i32 = 1 }}; struct dict_enumval_data t_2 = { "DIAMETER_SERVICE_NOT_PROVIDED", { .i32 = 2 }}; struct dict_enumval_data t_3 = { "DIAMETER_BAD_ANSWER", { .i32 = 3 }}; struct dict_enumval_data t_4 = { "DIAMETER_ADMINISTRATIVE", { .i32 = 4 }}; struct dict_enumval_data t_5 = { "DIAMETER_LINK_BROKEN", { .i32 = 5 }}; struct dict_enumval_data t_6 = { "DIAMETER_AUTH_EXPIRED", { .i32 = 6 }}; struct dict_enumval_data t_7 = { "DIAMETER_USER_MOVED", { .i32 = 7 }}; struct dict_enumval_data t_8 = { "DIAMETER_SESSION_TIMEOUT", { .i32 = 8 }}; struct dict_avp_data data = { 295, /* Code */ 0, /* Vendor */ "Termination-Cause", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_4 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_5 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_6 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_7 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_8 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Origin-State-Id */ { /* The Origin-State-Id AVP (AVP Code 278), of type Unsigned32, is a monotonically increasing value that is advanced whenever a Diameter entity restarts with loss of previous state, for example upon reboot. Origin-State-Id MAY be included in any Diameter message, including CER. A Diameter entity issuing this AVP MUST create a higher value for this AVP each time its state is reset. A Diameter entity MAY set Origin-State-Id to the time of startup, or it MAY use an incrementing counter retained in non-volatile memory across restarts. The Origin-State-Id, if present, MUST reflect the state of the entity indicated by Origin-Host. If a proxy modifies Origin-Host, it MUST either remove Origin-State-Id or modify it appropriately as well. Typically, Origin-State-Id is used by an access device that always starts up with no active sessions; that is, any session active prior to restart will have been lost. By including Origin-State-Id in a message, it allows other Diameter entities to infer that sessions associated with a lower Origin-State-Id are no longer active. If an access device does not intend for such inferences to be made, it MUST either not include Origin-State-Id in any message, or set its value to 0. */ struct dict_avp_data data = { 278, /* Code */ 0, /* Vendor */ "Origin-State-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Session-Binding */ { /* The Session-Binding AVP (AVP Code 270) is of type Unsigned32, and MAY be present in application-specific authorization answer messages. If present, this AVP MAY inform the Diameter client that all future application-specific re-auth messages for this session MUST be sent to the same authorization server. This AVP MAY also specify that a Session-Termination-Request message for this session MUST be sent to the same authorizing server. This field is a bit mask, and the following bits have been defined: RE_AUTH 1 When set, future re-auth messages for this session MUST NOT include the Destination-Host AVP. When cleared, the default value, the Destination-Host AVP MUST be present in all re-auth messages for this session. STR 2 When set, the STR message for this session MUST NOT include the Destination-Host AVP. When cleared, the default value, the Destination-Host AVP MUST be present in the STR message for this session. ACCOUNTING 4 When set, all accounting messages for this session MUST NOT include the Destination-Host AVP. When cleared, the default value, the Destination-Host AVP, if known, MUST be present in all accounting messages for this session. */ /* Although the RFC does not specify an "Enumerated" type here, we go forward and create one. * This is the reason for the "*" in the type name * The actual values of the AVP will not always be defined here, but at least it can be used in some cases. * ... maybe the code will be changed later to support bitfields AVP ... */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_UNSIGNED32, "Enumerated*(Session-Binding)" , NULL, NULL, NULL }; struct dict_enumval_data t_1 = { "RE_AUTH", { .u32 = 1 }}; struct dict_enumval_data t_2 = { "STR", { .u32 = 2 }}; struct dict_enumval_data t_4 = { "ACCOUNTING", { .u32 = 4 }}; struct dict_avp_data data = { 270, /* Code */ 0, /* Vendor */ "Session-Binding", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_4 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Session-Server-Failover */ { /* The Session-Server-Failover AVP (AVP Code 271) is of type Enumerated, and MAY be present in application-specific authorization answer messages that either do not include the Session-Binding AVP or include the Session-Binding AVP with any of the bits set to a zero value. If present, this AVP MAY inform the Diameter client that if a re-auth or STR message fails due to a delivery problem, the Diameter client SHOULD issue a subsequent message without the Destination-Host AVP. When absent, the default value is REFUSE_SERVICE. The following values are supported: REFUSE_SERVICE 0 If either the re-auth or the STR message delivery fails, terminate service with the user, and do not attempt any subsequent attempts. TRY_AGAIN 1 If either the re-auth or the STR message delivery fails, resend the failed message without the Destination-Host AVP present. ALLOW_SERVICE 2 If re-auth message delivery fails, assume that re-authorization succeeded. If STR message delivery fails, terminate the session. TRY_AGAIN_ALLOW_SERVICE 3 If either the re-auth or the STR message delivery fails, resend the failed message without the Destination-Host AVP present. If the second delivery fails for re-auth, assume re-authorization succeeded. If the second delivery fails for STR, terminate the session. */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Session-Server-Failover)" , NULL, NULL, NULL }; struct dict_enumval_data t_0 = { "REFUSE_SERVICE", { .i32 = 0 }}; struct dict_enumval_data t_1 = { "TRY_AGAIN", { .i32 = 1 }}; struct dict_enumval_data t_2 = { "ALLOW_SERVICE", { .i32 = 2 }}; struct dict_enumval_data t_3 = { "TRY_AGAIN_ALLOW_SERVICE", { .i32 = 3 }}; struct dict_avp_data data = { 271, /* Code */ 0, /* Vendor */ "Session-Server-Failover", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_0 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Multi-Round-Time-Out */ { /* The Multi-Round-Time-Out AVP (AVP Code 272) is of type Unsigned32, and SHOULD be present in application-specific authorization answer messages whose Result-Code AVP is set to DIAMETER_MULTI_ROUND_AUTH. This AVP contains the maximum number of seconds that the access device MUST provide the user in responding to an authentication request. */ struct dict_avp_data data = { 272, /* Code */ 0, /* Vendor */ "Multi-Round-Time-Out", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Class */ { /* The Class AVP (AVP Code 25) is of type OctetString and is used to by Diameter servers to return state information to the access device. When one or more Class AVPs are present in application-specific authorization answer messages, they MUST be present in subsequent re- authorization, session termination and accounting messages. Class AVPs found in a re-authorization answer message override the ones found in any previous authorization answer message. Diameter server implementations SHOULD NOT return Class AVPs that require more than 4096 bytes of storage on the Diameter client. A Diameter client that receives Class AVPs whose size exceeds local available storage MUST terminate the session. */ struct dict_avp_data data = { 25, /* Code */ 0, /* Vendor */ "Class", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Event-Timestamp */ { /* The Event-Timestamp (AVP Code 55) is of type Time, and MAY be included in an Accounting-Request and Accounting-Answer messages to record the time that the reported event occurred, in seconds since January 1, 1900 00:00 UTC. */ struct dict_avp_data data = { 55, /* Code */ 0, /* Vendor */ "Event-Timestamp", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , Time_type, NULL); } /* Accounting-Record-Type */ { /* The Accounting-Record-Type AVP (AVP Code 480) is of type Enumerated and contains the type of accounting record being sent. The following values are currently defined for the Accounting-Record-Type AVP: EVENT_RECORD 1 An Accounting Event Record is used to indicate that a one-time event has occurred (meaning that the start and end of the event are simultaneous). This record contains all information relevant to the service, and is the only record of the service. START_RECORD 2 An Accounting Start, Interim, and Stop Records are used to indicate that a service of a measurable length has been given. An Accounting Start Record is used to initiate an accounting session, and contains accounting information that is relevant to the initiation of the session. INTERIM_RECORD 3 An Interim Accounting Record contains cumulative accounting information for an existing accounting session. Interim Accounting Records SHOULD be sent every time a re-authentication or re-authorization occurs. Further, additional interim record triggers MAY be defined by application-specific Diameter applications. The selection of whether to use INTERIM_RECORD records is done by the Acct-Interim-Interval AVP. STOP_RECORD 4 An Accounting Stop Record is sent to terminate an accounting session and contains cumulative accounting information relevant to the existing session. */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Accounting-Record-Type)" , NULL, NULL, NULL }; struct dict_enumval_data t_1 = { "EVENT_RECORD", { .i32 = 1 }}; struct dict_enumval_data t_2 = { "START_RECORD", { .i32 = 2 }}; struct dict_enumval_data t_3 = { "INTERIM_RECORD", { .i32 = 3 }}; struct dict_enumval_data t_4 = { "STOP_RECORD", { .i32 = 4 }}; struct dict_avp_data data = { 480, /* Code */ 0, /* Vendor */ "Accounting-Record-Type", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_4 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } /* Acct-Interim-Interval */ { /* The Acct-Interim-Interval AVP (AVP Code 85) is of type Unsigned32 and is sent from the Diameter home authorization server to the Diameter client. The client uses information in this AVP to decide how and when to produce accounting records. With different values in this AVP, service sessions can result in one, two, or two+N accounting records, based on the needs of the home-organization. The following accounting record production behavior is directed by the inclusion of this AVP: 1. The omission of the Acct-Interim-Interval AVP or its inclusion with Value field set to 0 means that EVENT_RECORD, START_RECORD, and STOP_RECORD are produced, as appropriate for the service. 2. The inclusion of the AVP with Value field set to a non-zero value means that INTERIM_RECORD records MUST be produced between the START_RECORD and STOP_RECORD records. The Value field of this AVP is the nominal interval between these records in seconds. The Diameter node that originates the accounting information, known as the client, MUST produce the first INTERIM_RECORD record roughly at the time when this nominal interval has elapsed from the START_RECORD, the next one again as the interval has elapsed once more, and so on until the session ends and a STOP_RECORD record is produced. The client MUST ensure that the interim record production times are randomized so that large accounting message storms are not created either among records or around a common service start time. */ struct dict_avp_data data = { 85, /* Code */ 0, /* Vendor */ "Acct-Interim-Interval", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Accounting-Record-Number */ { /* The Accounting-Record-Number AVP (AVP Code 485) is of type Unsigned32 and identifies this record within one session. As Session-Id AVPs are globally unique, the combination of Session-Id and Accounting- Record-Number AVPs is also globally unique, and can be used in matching accounting records with confirmations. An easy way to produce unique numbers is to set the value to 0 for records of type EVENT_RECORD and START_RECORD, and set the value to 1 for the first INTERIM_RECORD, 2 for the second, and so on until the value for STOP_RECORD is one more than for the last INTERIM_RECORD. */ struct dict_avp_data data = { 485, /* Code */ 0, /* Vendor */ "Accounting-Record-Number", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED32 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Acct-Session-Id */ { /* The Acct-Session-Id AVP (AVP Code 44) is of type OctetString is only used when RADIUS/Diameter translation occurs. This AVP contains the contents of the RADIUS Acct-Session-Id attribute. */ struct dict_avp_data data = { 44, /* Code */ 0, /* Vendor */ "Acct-Session-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Acct-Multi-Session-Id */ { /* The Acct-Multi-Session-Id AVP (AVP Code 50) is of type UTF8String, following the format specified in Section 8.8. The Acct-Multi- Session-Id AVP is used to link together multiple related accounting sessions, where each session would have a unique Session-Id, but the same Acct-Multi-Session-Id AVP. This AVP MAY be returned by the Diameter server in an authorization answer, and MUST be used in all accounting messages for the given session. */ struct dict_avp_data data = { 50, /* Code */ 0, /* Vendor */ "Acct-Multi-Session-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_OCTETSTRING /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , UTF8String_type, NULL); } /* Accounting-Sub-Session-Id */ { /* The Accounting-Sub-Session-Id AVP (AVP Code 287) is of type Unsigned64 and contains the accounting sub-session identifier. The combination of the Session-Id and this AVP MUST be unique per sub- session, and the value of this AVP MUST be monotonically increased by one for all new sub-sessions. The absence of this AVP implies no sub-sessions are in use, with the exception of an Accounting-Request whose Accounting-Record-Type is set to STOP_RECORD. A STOP_RECORD message with no Accounting-Sub-Session-Id AVP present will signal the termination of all sub-sessions for a given Session-Id. */ struct dict_avp_data data = { 287, /* Code */ 0, /* Vendor */ "Accounting-Sub-Session-Id", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_UNSIGNED64 /* base type of data */ }; CHECK_dict_new( DICT_AVP, &data , NULL, NULL); } /* Accounting-Realtime-Required */ { /* The Accounting-Realtime-Required AVP (AVP Code 483) is of type Enumerated and is sent from the Diameter home authorization server to the Diameter client or in the Accounting-Answer from the accounting server. The client uses information in this AVP to decide what to do if the sending of accounting records to the accounting server has been temporarily prevented due to, for instance, a network problem. DELIVER_AND_GRANT 1 The AVP with Value field set to DELIVER_AND_GRANT means that the service MUST only be granted as long as there is a connection to an accounting server. Note that the set of alternative accounting servers are treated as one server in this sense. Having to move the accounting record stream to a backup server is not a reason to discontinue the service to the user. GRANT_AND_STORE 2 The AVP with Value field set to GRANT_AND_STORE means that service SHOULD be granted if there is a connection, or as long as records can still be stored as described in Section 9.4. This is the default behavior if the AVP isn't included in the reply from the authorization server. GRANT_AND_LOSE 3 The AVP with Value field set to GRANT_AND_LOSE means that service SHOULD be granted even if the records can not be delivered or stored. */ struct dict_object * type; struct dict_type_data tdata = { AVP_TYPE_INTEGER32, "Enumerated(Accounting-Realtime-Required)" , NULL, NULL, NULL }; struct dict_enumval_data t_1 = { "DELIVER_AND_GRANT", { .i32 = 1 }}; struct dict_enumval_data t_2 = { "GRANT_AND_STORE", { .i32 = 2 }}; struct dict_enumval_data t_3 = { "GRANT_AND_LOSE", { .i32 = 3 }}; struct dict_avp_data data = { 483, /* Code */ 0, /* Vendor */ "Accounting-Realtime-Required", /* Name */ AVP_FLAG_VENDOR | AVP_FLAG_MANDATORY, /* Fixed flags */ AVP_FLAG_MANDATORY, /* Fixed flag values */ AVP_TYPE_INTEGER32 /* base type of data */ }; /* Create the Enumerated type, and then the AVP */ CHECK_dict_new( DICT_TYPE, &tdata , NULL, &type); CHECK_dict_new( DICT_ENUMVAL, &t_1 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_2 , type, NULL); CHECK_dict_new( DICT_ENUMVAL, &t_3 , type, NULL); CHECK_dict_new( DICT_AVP, &data , type, NULL); } } /* Commands section */ { /* To avoid defining global variables for all the AVP that we use here, we do search the dictionary in each sub-block. * This is far from optimal, but the code is clearer like this, and the time it requires at execution is not noticeable. */ /* Generic message syntax when the 'E' bit is set */ { /* The 'E' (Error Bit) in the Diameter header is set when the request caused a protocol-related error (see Section 7.1.3). A message with the 'E' bit MUST NOT be sent as a response to an answer message. Note that a message with the 'E' bit set is still subjected to the processing rules defined in Section 6.2. When set, the answer message will not conform to the ABNF specification for the command, and will instead conform to the following ABNF: Message Format ::= < Diameter Header: code, ERR [PXY] > 0*1< Session-Id > { Origin-Host } { Origin-Realm } { Result-Code } [ Origin-State-Id ] [ Error-Message ] [ Error-Reporting-Host ] [ Failed-AVP ] * [ Proxy-Info ] * [ AVP ] Note that the code used in the header is the same than the one found in the request message, but with the 'R' bit cleared and the 'E' bit set. The 'P' bit in the header is set to the same value as the one found in the request message. */ struct dict_object * cmd_error; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD,0, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Result-Code", RULE_REQUIRED, -1, 1 } ,{ "Origin-State-Id", RULE_OPTIONAL, -1, 1 } ,{ "Error-Message", RULE_OPTIONAL, -1, 1 } ,{ "Error-Reporting-Host", RULE_OPTIONAL, -1, 1 } ,{ "Failed-AVP", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1,-1 } }; CHECK_FCT( fd_dict_get_error_cmd(dict, &cmd_error) ); PARSE_loc_rules( rules, cmd_error ); } /* Capabilities-Exchange-Request */ { /* The Capabilities-Exchange-Request (CER), indicated by the Command- Code set to 257 and the Command Flags' 'R' bit set, is sent to exchange local capabilities. Upon detection of a transport failure, this message MUST NOT be sent to an alternate peer. When Diameter is run over SCTP [RFC2960], which allows for connections to span multiple interfaces and multiple IP addresses, the Capabilities-Exchange-Request message MUST contain one Host-IP- Address AVP for each potential IP address that MAY be locally used when transmitting Diameter messages. Message Format ::= < Diameter Header: 257, REQ > { Origin-Host } { Origin-Realm } 1* { Host-IP-Address } { Vendor-Id } { Product-Name } [ Origin-State-Id ] * [ Supported-Vendor-Id ] * [ Auth-Application-Id ] * [ Inband-Security-Id ] * [ Acct-Application-Id ] * [ Vendor-Specific-Application-Id ] [ Firmware-Revision ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 257, /* Code */ #if CC_CAPABILITIES_EXCHANGE != 257 #error "CC_CAPABILITIES_EXCHANGE definition mismatch" #endif "Capabilities-Exchange-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_RETRANSMIT | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Host-IP-Address", RULE_REQUIRED, -1,-1 } ,{ "Vendor-Id", RULE_REQUIRED, -1, 1 } ,{ "Product-Name", RULE_REQUIRED, -1, 1 } ,{ "Origin-State-Id", RULE_OPTIONAL, -1, 1 } ,{ "Supported-Vendor-Id", RULE_OPTIONAL, -1,-1 } ,{ "Auth-Application-Id", RULE_OPTIONAL, -1,-1 } ,{ "Inband-Security-Id", RULE_OPTIONAL, -1,-1 } ,{ "Acct-Application-Id", RULE_OPTIONAL, -1,-1 } ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1,-1 } ,{ "Firmware-Revision", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_COMMAND, &data , NULL, &cmd); PARSE_loc_rules( rules, cmd ); } /* Capabilities-Exchange-Answer */ { /* The Capabilities-Exchange-Answer (CEA), indicated by the Command-Code set to 257 and the Command Flags' 'R' bit cleared, is sent in response to a CER message. When Diameter is run over SCTP [RFC2960], which allows connections to span multiple interfaces, hence, multiple IP addresses, the Capabilities-Exchange-Answer message MUST contain one Host-IP-Address AVP for each potential IP address that MAY be locally used when transmitting Diameter messages. Message Format ::= < Diameter Header: 257 > { Result-Code } { Origin-Host } { Origin-Realm } 1* { Host-IP-Address } { Vendor-Id } { Product-Name } [ Origin-State-Id ] [ Error-Message ] [ Failed-AVP ] * [ Supported-Vendor-Id ] * [ Auth-Application-Id ] * [ Inband-Security-Id ] * [ Acct-Application-Id ] * [ Vendor-Specific-Application-Id ] [ Firmware-Revision ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 257, /* Code */ #if CC_CAPABILITIES_EXCHANGE != 257 #error "CC_CAPABILITIES_EXCHANGE definition mismatch" #endif "Capabilities-Exchange-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_RETRANSMIT, /* Fixed flags */ 0 /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Result-Code", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Host-IP-Address", RULE_REQUIRED, -1,-1 } ,{ "Vendor-Id", RULE_REQUIRED, -1, 1 } ,{ "Product-Name", RULE_REQUIRED, -1, 1 } ,{ "Origin-State-Id", RULE_OPTIONAL, -1, 1 } ,{ "Error-Message", RULE_OPTIONAL, -1, 1 } ,{ "Failed-AVP", RULE_OPTIONAL, -1, 1 } ,{ "Supported-Vendor-Id", RULE_OPTIONAL, -1,-1 } ,{ "Auth-Application-Id", RULE_OPTIONAL, -1,-1 } ,{ "Inband-Security-Id", RULE_OPTIONAL, -1,-1 } ,{ "Acct-Application-Id", RULE_OPTIONAL, -1,-1 } ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1,-1 } ,{ "Firmware-Revision", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_COMMAND, &data , NULL, &cmd); PARSE_loc_rules( rules, cmd ); } /* Disconnect-Peer-Request */ { /* The Disconnect-Peer-Request (DPR), indicated by the Command-Code set to 282 and the Command Flags' 'R' bit set, is sent to a peer to inform its intentions to shutdown the transport connection. Upon detection of a transport failure, this message MUST NOT be sent to an alternate peer. Message Format ::= < Diameter Header: 282, REQ > { Origin-Host } { Origin-Realm } { Disconnect-Cause } */ struct dict_object * cmd; struct dict_cmd_data data = { 282, /* Code */ #if CC_DISCONNECT_PEER != 282 #error "CC_DISCONNECT_PEER definition mismatch" #endif "Disconnect-Peer-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_RETRANSMIT | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Disconnect-Cause", RULE_REQUIRED, -1, 1 } }; CHECK_dict_new( DICT_COMMAND, &data , NULL, &cmd); PARSE_loc_rules( rules, cmd ); } /* Disconnect-Peer-Answer */ { /* The Disconnect-Peer-Answer (DPA), indicated by the Command-Code set to 282 and the Command Flags' 'R' bit cleared, is sent as a response to the Disconnect-Peer-Request message. Upon receipt of this message, the transport connection is shutdown. Message Format ::= < Diameter Header: 282 > { Result-Code } { Origin-Host } { Origin-Realm } [ Error-Message ] [ Failed-AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 282, /* Code */ #if CC_DISCONNECT_PEER != 282 #error "CC_DISCONNECT_PEER definition mismatch" #endif "Disconnect-Peer-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_RETRANSMIT, /* Fixed flags */ 0 /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Result-Code", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Error-Message", RULE_OPTIONAL, -1, 1 } ,{ "Failed-AVP", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_COMMAND, &data , NULL, &cmd); PARSE_loc_rules( rules, cmd ); } /* Device-Watchdog-Request */ { /* The Device-Watchdog-Request (DWR), indicated by the Command-Code set to 280 and the Command Flags' 'R' bit set, is sent to a peer when no traffic has been exchanged between two peers (see Section 5.5.3). Upon detection of a transport failure, this message MUST NOT be sent to an alternate peer. Message Format ::= < Diameter Header: 280, REQ > { Origin-Host } { Origin-Realm } [ Origin-State-Id ] */ struct dict_object * cmd; struct dict_cmd_data data = { 280, /* Code */ #if CC_DEVICE_WATCHDOG != 280 #error "CC_DEVICE_WATCHDOG definition mismatch" #endif "Device-Watchdog-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_RETRANSMIT | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Origin-State-Id", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_COMMAND, &data , NULL, &cmd); PARSE_loc_rules( rules, cmd ); } /* Device-Watchdog-Answer */ { /* The Device-Watchdog-Answer (DWA), indicated by the Command-Code set to 280 and the Command Flags' 'R' bit cleared, is sent as a response to the Device-Watchdog-Request message. Message Format ::= < Diameter Header: 280 > { Result-Code } { Origin-Host } { Origin-Realm } [ Error-Message ] [ Failed-AVP ] [ Origin-State-Id ] */ struct dict_object * cmd; struct dict_cmd_data data = { 280, /* Code */ #if CC_DEVICE_WATCHDOG != 280 #error "CC_DEVICE_WATCHDOG definition mismatch" #endif "Device-Watchdog-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_RETRANSMIT, /* Fixed flags */ 0 /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Result-Code", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Error-Message", RULE_OPTIONAL, -1, 1 } ,{ "Failed-AVP", RULE_OPTIONAL, -1, 1 } ,{ "Origin-State-Id", RULE_OPTIONAL, -1, 1 } }; CHECK_dict_new( DICT_COMMAND, &data , NULL, &cmd); PARSE_loc_rules( rules, cmd ); } /* Re-Auth-Request */ { /* The Re-Auth-Request (RAR), indicated by the Command-Code set to 258 and the message flags' 'R' bit set, may be sent by any server to the access device that is providing session service, to request that the user be re-authenticated and/or re-authorized. Message Format ::= < Diameter Header: 258, REQ, PXY > < Session-Id > { Origin-Host } { Origin-Realm } { Destination-Realm } { Destination-Host } { Auth-Application-Id } { Re-Auth-Request-Type } [ User-Name ] [ Origin-State-Id ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 258, /* Code */ #if CC_RE_AUTH != 258 #error "CC_RE_AUTH definition mismatch" #endif "Re-Auth-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } ,{ "Destination-Host", RULE_REQUIRED, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Re-Auth-Request-Type", RULE_REQUIRED, -1, 1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "Origin-State-Id", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1,-1 } ,{ "Route-Record", RULE_OPTIONAL, -1,-1 } }; CHECK_dict_new( DICT_COMMAND, &data , NULL, &cmd); PARSE_loc_rules( rules, cmd ); } /* Re-Auth-Answer */ { /* The Re-Auth-Answer (RAA), indicated by the Command-Code set to 258 and the message flags' 'R' bit clear, is sent in response to the RAR. The Result-Code AVP MUST be present, and indicates the disposition of the request. A successful RAA message MUST be followed by an application-specific authentication and/or authorization message. Message Format ::= < Diameter Header: 258, PXY > < Session-Id > { Result-Code } { Origin-Host } { Origin-Realm } [ User-Name ] [ Origin-State-Id ] [ Error-Message ] [ Error-Reporting-Host ] [ Failed-AVP ] * [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Max-Cache-Time ] * [ Proxy-Info ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 258, /* Code */ #if CC_RE_AUTH != 258 #error "CC_RE_AUTH definition mismatch" #endif "Re-Auth-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Result-Code", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "Origin-State-Id", RULE_OPTIONAL, -1, 1 } ,{ "Error-Message", RULE_OPTIONAL, -1, 1 } ,{ "Error-Reporting-Host", RULE_OPTIONAL, -1, 1 } ,{ "Failed-AVP", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Host", RULE_OPTIONAL, -1,-1 } ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1,-1 } }; CHECK_dict_new( DICT_COMMAND, &data , NULL, &cmd); PARSE_loc_rules( rules, cmd ); } /* Session-Termination-Request */ { /* The Session-Termination-Request (STR), indicated by the Command-Code set to 275 and the Command Flags' 'R' bit set, is sent by the access device to inform the Diameter Server that an authenticated and/or authorized session is being terminated. Message Format ::= < Diameter Header: 275, REQ, PXY > < Session-Id > { Origin-Host } { Origin-Realm } { Destination-Realm } { Auth-Application-Id } { Termination-Cause } [ User-Name ] [ Destination-Host ] * [ Class ] [ Origin-State-Id ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 275, /* Code */ #if CC_SESSION_TERMINATION != 275 #error "CC_SESSION_TERMINATION definition mismatch" #endif "Session-Termination-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "Termination-Cause", RULE_REQUIRED, -1, 1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } ,{ "Class", RULE_OPTIONAL, -1,-1 } ,{ "Origin-State-Id", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1,-1 } ,{ "Route-Record", RULE_OPTIONAL, -1,-1 } }; CHECK_dict_new( DICT_COMMAND, &data , NULL, &cmd); PARSE_loc_rules( rules, cmd ); } /* Session-Termination-Answer */ { /* The Session-Termination-Answer (STA), indicated by the Command-Code set to 275 and the message flags' 'R' bit clear, is sent by the Diameter Server to acknowledge the notification that the session has been terminated. The Result-Code AVP MUST be present, and MAY contain an indication that an error occurred while servicing the STR. Upon sending or receipt of the STA, the Diameter Server MUST release all resources for the session indicated by the Session-Id AVP. Any intermediate server in the Proxy-Chain MAY also release any resources, if necessary. Message Format ::= < Diameter Header: 275, PXY > < Session-Id > { Result-Code } { Origin-Host } { Origin-Realm } [ User-Name ] * [ Class ] [ Error-Message ] [ Error-Reporting-Host ] [ Failed-AVP ] [ Origin-State-Id ] * [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Max-Cache-Time ] * [ Proxy-Info ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 275, /* Code */ #if CC_SESSION_TERMINATION != 275 #error "CC_SESSION_TERMINATION definition mismatch" #endif "Session-Termination-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Result-Code", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "Class", RULE_OPTIONAL, -1,-1 } ,{ "Error-Message", RULE_OPTIONAL, -1, 1 } ,{ "Error-Reporting-Host", RULE_OPTIONAL, -1, 1 } ,{ "Failed-AVP", RULE_OPTIONAL, -1, 1 } ,{ "Origin-State-Id", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Host", RULE_OPTIONAL, -1,-1 } ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1,-1 } }; CHECK_dict_new( DICT_COMMAND, &data , NULL, &cmd); PARSE_loc_rules( rules, cmd ); } /* Abort-Session-Request */ { /* The Abort-Session-Request (ASR), indicated by the Command-Code set to 274 and the message flags' 'R' bit set, may be sent by any server to the access device that is providing session service, to request that the session identified by the Session-Id be stopped. Message Format ::= < Diameter Header: 274, REQ, PXY > < Session-Id > { Origin-Host } { Origin-Realm } { Destination-Realm } { Destination-Host } { Auth-Application-Id } [ User-Name ] [ Origin-State-Id ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 274, /* Code */ #if CC_ABORT_SESSION != 274 #error "CC_ABORT_SESSION definition mismatch" #endif "Abort-Session-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } ,{ "Destination-Host", RULE_REQUIRED, -1, 1 } ,{ "Auth-Application-Id", RULE_REQUIRED, -1, 1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "Origin-State-Id", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1,-1 } ,{ "Route-Record", RULE_OPTIONAL, -1,-1 } }; CHECK_dict_new( DICT_COMMAND, &data , NULL, &cmd); PARSE_loc_rules( rules, cmd ); } /* Abort-Session-Answer */ { /* The Abort-Session-Answer (ASA), indicated by the Command-Code set to 274 and the message flags' 'R' bit clear, is sent in response to the ASR. The Result-Code AVP MUST be present, and indicates the disposition of the request. If the session identified by Session-Id in the ASR was successfully terminated, Result-Code is set to DIAMETER_SUCCESS. If the session is not currently active, Result-Code is set to DIAMETER_UNKNOWN_SESSION_ID. If the access device does not stop the session for any other reason, Result-Code is set to DIAMETER_UNABLE_TO_COMPLY. Message Format ::= < Diameter Header: 274, PXY > < Session-Id > { Result-Code } { Origin-Host } { Origin-Realm } [ User-Name ] [ Origin-State-Id ] [ Error-Message ] [ Error-Reporting-Host ] [ Failed-AVP ] * [ Redirect-Host ] [ Redirect-Host-Usage ] [ Redirect-Max-Cache-Time ] * [ Proxy-Info ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 274, /* Code */ #if CC_ABORT_SESSION != 274 #error "CC_ABORT_SESSION definition mismatch" #endif "Abort-Session-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Result-Code", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "Origin-State-Id", RULE_OPTIONAL, -1, 1 } ,{ "Error-Message", RULE_OPTIONAL, -1, 1 } ,{ "Error-Reporting-Host", RULE_OPTIONAL, -1, 1 } ,{ "Failed-AVP", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Host", RULE_OPTIONAL, -1,-1 } ,{ "Redirect-Host-Usage", RULE_OPTIONAL, -1, 1 } ,{ "Redirect-Max-Cache-Time", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1,-1 } }; CHECK_dict_new( DICT_COMMAND, &data , NULL, &cmd); PARSE_loc_rules( rules, cmd ); } /* Accounting-Request */ { /* The Accounting-Request (ACR) command, indicated by the Command-Code field set to 271 and the Command Flags' 'R' bit set, is sent by a Diameter node, acting as a client, in order to exchange accounting information with a peer. One of Acct-Application-Id and Vendor-Specific-Application-Id AVPs MUST be present. If the Vendor-Specific-Application-Id grouped AVP is present, it MUST include an Acct-Application-Id AVP. The AVP listed below SHOULD include service specific accounting AVPs, as described in Section 9.3. Message Format ::= < Diameter Header: 271, REQ, PXY > < Session-Id > { Origin-Host } { Origin-Realm } { Destination-Realm } { Accounting-Record-Type } { Accounting-Record-Number } [ Acct-Application-Id ] [ Vendor-Specific-Application-Id ] [ User-Name ] [ Destination-Host ] [ Accounting-Sub-Session-Id ] [ Acct-Session-Id ] [ Acct-Multi-Session-Id ] [ Acct-Interim-Interval ] [ Accounting-Realtime-Required ] [ Origin-State-Id ] [ Event-Timestamp ] * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 271, /* Code */ #if CC_ACCOUNTING != 271 #error "CC_ACCOUNTING definition mismatch" #endif "Accounting-Request", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE | CMD_FLAG_ERROR, /* Fixed flags */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Destination-Realm", RULE_REQUIRED, -1, 1 } ,{ "Accounting-Record-Type", RULE_REQUIRED, -1, 1 } ,{ "Accounting-Record-Number", RULE_REQUIRED, -1, 1 } ,{ "Acct-Application-Id", RULE_OPTIONAL, -1, 1 } ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "Destination-Host", RULE_OPTIONAL, -1, 1 } ,{ "Accounting-Sub-Session-Id", RULE_OPTIONAL, -1, 1 } ,{ "Acct-Session-Id", RULE_OPTIONAL, -1, 1 } ,{ "Acct-Multi-Session-Id", RULE_OPTIONAL, -1, 1 } ,{ "Acct-Interim-Interval", RULE_OPTIONAL, -1, 1 } ,{ "Accounting-Realtime-Required", RULE_OPTIONAL, -1, 1 } ,{ "Origin-State-Id", RULE_OPTIONAL, -1, 1 } ,{ "Event-Timestamp", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1,-1 } ,{ "Route-Record", RULE_OPTIONAL, -1,-1 } }; CHECK_dict_new( DICT_COMMAND, &data , NULL, &cmd); PARSE_loc_rules( rules, cmd ); } /* Accounting-Answer */ { /* The Accounting-Answer (ACA) command, indicated by the Command-Code field set to 271 and the Command Flags' 'R' bit cleared, is used to acknowledge an Accounting-Request command. The Accounting-Answer command contains the same Session-Id as the corresponding request. Only the target Diameter Server, known as the home Diameter Server, SHOULD respond with the Accounting-Answer command. One of Acct-Application-Id and Vendor-Specific-Application-Id AVPs MUST be present. If the Vendor-Specific-Application-Id grouped AVP is present, it MUST contain an Acct-Application-Id AVP. The AVP listed below SHOULD include service specific accounting AVPs, as described in Section 9.3. Message Format ::= < Diameter Header: 271, PXY > < Session-Id > { Result-Code } { Origin-Host } { Origin-Realm } { Accounting-Record-Type } { Accounting-Record-Number } [ Acct-Application-Id ] [ Vendor-Specific-Application-Id ] [ User-Name ] [ Accounting-Sub-Session-Id ] [ Acct-Session-Id ] [ Acct-Multi-Session-Id ] [ Error-Message ] [ Error-Reporting-Host ] [ Failed-AVP ] [ Acct-Interim-Interval ] [ Accounting-Realtime-Required ] [ Origin-State-Id ] [ Event-Timestamp ] * [ Proxy-Info ] * [ AVP ] */ struct dict_object * cmd; struct dict_cmd_data data = { 271, /* Code */ #if CC_ACCOUNTING != 271 #error "CC_ACCOUNTING definition mismatch" #endif "Accounting-Answer", /* Name */ CMD_FLAG_REQUEST | CMD_FLAG_PROXIABLE, /* Fixed flags */ CMD_FLAG_PROXIABLE /* Fixed flag values */ }; struct local_rules_definition rules[] = { { "Session-Id", RULE_FIXED_HEAD, -1, 1 } ,{ "Result-Code", RULE_REQUIRED, -1, 1 } ,{ "Origin-Host", RULE_REQUIRED, -1, 1 } ,{ "Origin-Realm", RULE_REQUIRED, -1, 1 } ,{ "Accounting-Record-Type", RULE_REQUIRED, -1, 1 } ,{ "Accounting-Record-Number", RULE_REQUIRED, -1, 1 } ,{ "Acct-Application-Id", RULE_OPTIONAL, -1, 1 } ,{ "Vendor-Specific-Application-Id", RULE_OPTIONAL, -1, 1 } ,{ "User-Name", RULE_OPTIONAL, -1, 1 } ,{ "Accounting-Sub-Session-Id", RULE_OPTIONAL, -1, 1 } ,{ "Acct-Session-Id", RULE_OPTIONAL, -1, 1 } ,{ "Acct-Multi-Session-Id", RULE_OPTIONAL, -1, 1 } ,{ "Error-Message", RULE_OPTIONAL, -1, 1 } ,{ "Error-Reporting-Host", RULE_OPTIONAL, -1, 1 } ,{ "Failed-AVP", RULE_OPTIONAL, -1, 1 } ,{ "Acct-Interim-Interval", RULE_OPTIONAL, -1, 1 } ,{ "Accounting-Realtime-Required", RULE_OPTIONAL, -1, 1 } ,{ "Origin-State-Id", RULE_OPTIONAL, -1, 1 } ,{ "Event-Timestamp", RULE_OPTIONAL, -1, 1 } ,{ "Proxy-Info", RULE_OPTIONAL, -1,-1 } }; CHECK_dict_new( DICT_COMMAND, &data , NULL, &cmd); PARSE_loc_rules( rules, cmd ); } } return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/endpoints.c000066400000000000000000000175611333553357400231650ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" /* Add an endpoint information in a list */ int fd_ep_add_merge( struct fd_list * list, sSA * sa, socklen_t sl, uint32_t flags ) { struct fd_endpoint * ep; struct fd_list * li; union { sSA * sa; sSA4 *sin; sSA6 *sin6; } ptr; in_port_t * port; int cmp = -1; TRACE_ENTRY("%p %p %u %x", list, sa, sl, flags); CHECK_PARAMS( list && sa && (sl <= sizeof(sSS)) ); if (list->next == NULL) { /* the list is not initialized yet, do it */ fd_list_init(list, NULL); } ptr.sa = sa; /* Filter out a bunch of invalid addresses */ switch (sa->sa_family) { case AF_INET: if (! (flags & EP_ACCEPTALL)) { if (IN_IS_ADDR_UNSPECIFIED(&ptr.sin->sin_addr) /* the next one filters both EXPERIMENTAL, BADCLASS and MULTICAST. */ || ((ntohl(ptr.sin->sin_addr.s_addr) & 0xe0000000) == 0xe0000000) || (ptr.sin->sin_addr.s_addr == INADDR_BROADCAST)) { LOG_A(" DEBUG:fd_ep_add_merge Address was ignored, not added."); return 0; } } port = &ptr.sin->sin_port; break; case AF_INET6: if (! (flags & EP_ACCEPTALL)) { if (IN6_IS_ADDR_UNSPECIFIED(&ptr.sin6->sin6_addr) || IN6_IS_ADDR_MULTICAST(&ptr.sin6->sin6_addr)) { LOG_A(" DEBUG:fd_ep_add_merge Address was ignored, not added."); return 0; } } port = &ptr.sin6->sin6_port; break; default: LOG_A(" DEBUG:fd_ep_add_merge Address family was unknown, not added."); return 0; } /* remove the ACCEPTALL flag */ flags &= ~EP_ACCEPTALL; /* Search place in the list */ for (li = list->next; li != list; li = li->next) { ep = (struct fd_endpoint *)li; in_port_t * ep_port; /* First, compare the address family */ if (ep->sa.sa_family < sa->sa_family) continue; if (ep->sa.sa_family > sa->sa_family) break; /* Then compare the address field */ switch (sa->sa_family) { case AF_INET: cmp = memcmp(&ep->sin.sin_addr, &ptr.sin->sin_addr, sizeof(struct in_addr)); ep_port = &ep->sin.sin_port; break; case AF_INET6: cmp = memcmp(&ep->sin6.sin6_addr, &ptr.sin6->sin6_addr, sizeof(struct in6_addr)); ep_port = &ep->sin6.sin6_port; break; default: ASSERT( 0 ); /* we got a different value previously in this same function */ } if (cmp < 0) continue; if (cmp > 0) break; /* Finally compare the port, only if not 0 */ if (*port == 0) break; if (*ep_port == 0) { /* save the port information in the list, and break */ *ep_port = *port; break; } if (*ep_port < *port) { cmp = -1; continue; } if (*ep_port > *port) cmp = 1; break; } if (cmp) { /* new item to be added */ CHECK_MALLOC( ep = malloc(sizeof(struct fd_endpoint)) ); memset(ep, 0, sizeof(struct fd_endpoint)); fd_list_init(&ep->chain, NULL); memcpy(&ep->ss, sa, sl); /* Insert in the list */ fd_list_insert_before(li, &ep->chain); } /* Merge the flags */ ep->flags |= flags; return 0; } /* Delete endpoints that do not have a matching flag from a list (0: delete all endpoints) */ int fd_ep_filter( struct fd_list * list, uint32_t flags ) { struct fd_list * li; TRACE_ENTRY("%p %x", list, flags); CHECK_PARAMS(list); for (li = list->next; li != list; li = li->next) { struct fd_endpoint * ep = (struct fd_endpoint *)li; if (! (ep->flags & flags)) { li = li->prev; fd_list_unlink(&ep->chain); free(ep); } } return 0; } /* Keep only endpoints of the same family as af */ int fd_ep_filter_family( struct fd_list * list, int af ) { struct fd_list * li; TRACE_ENTRY("%p %d", list, af); CHECK_PARAMS(list); for (li = list->next; li != list; li = li->next) { struct fd_endpoint * ep = (struct fd_endpoint *)li; if (ep->sa.sa_family != af) { li = li->prev; fd_list_unlink(&ep->chain); free(ep); } } return 0; } /* Reset the given flag(s) from all items in the list */ int fd_ep_clearflags( struct fd_list * list, uint32_t flags ) { struct fd_list * li; TRACE_ENTRY("%p %x", list, flags); CHECK_PARAMS(list); for (li = list->next; li != list; li = li->next) { struct fd_endpoint * ep = (struct fd_endpoint *)li; ep->flags &= ~flags; if (ep->flags == 0) { li = li->prev; fd_list_unlink(&ep->chain); free(ep); } } return 0; } DECLARE_FD_DUMP_PROTOTYPE(fd_ep_dump_one, int preamble, struct fd_endpoint * ep ) { FD_DUMP_HANDLE_OFFSET(); if (preamble) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "{ep}(@%p): ", ep), return NULL); } if (!ep) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "INVALID/NULL"), return NULL); return *buf; } CHECK_MALLOC_DO( fd_sa_dump( FD_DUMP_STD_PARAMS, &ep->sa, NI_NUMERICHOST | NI_NUMERICSERV ), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "{%s%s%s%s%s}", (ep->flags & EP_FL_CONF) ? "C" : "-", (ep->flags & EP_FL_DISC) ? "D" : "-", (ep->flags & EP_FL_ADV) ? "A" : "-", (ep->flags & EP_FL_LL) ? "L" : "-", (ep->flags & EP_FL_PRIMARY) ? "P" : "-"), return NULL); return *buf; } DECLARE_FD_DUMP_PROTOTYPE(fd_ep_dump, int preamble, int indent, struct fd_list * eps ) { struct fd_list * li; FD_DUMP_HANDLE_OFFSET(); if (preamble) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "%*s{eps}(@%p):", indent, "", eps), return NULL); } if (eps) { for (li = eps->next; li != eps; li = li->next) { struct fd_endpoint * ep = (struct fd_endpoint *)li; if (preamble) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "\n%*s", indent+1, ""), return NULL); } else if (li->prev != eps) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "\t"), return NULL); } CHECK_MALLOC_DO( fd_ep_dump_one( FD_DUMP_STD_PARAMS, preamble, ep ), return NULL); } } return *buf; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/events.c000066400000000000000000000157271333553357400224700ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" /* Events are a subset of fifo queues, with a known type */ int fd_event_send(struct fifo *queue, int code, size_t datasz, void * data) { struct fd_event * ev; CHECK_MALLOC( ev = malloc(sizeof(struct fd_event)) ); ev->code = code; ev->size = datasz; ev->data = data; CHECK_FCT( fd_fifo_post(queue, &ev) ); return 0; } int fd_event_get(struct fifo *queue, int *code, size_t *datasz, void ** data) { struct fd_event * ev; CHECK_FCT( fd_fifo_get(queue, &ev) ); if (code) *code = ev->code; if (datasz) *datasz = ev->size; if (data) *data = ev->data; free(ev); return 0; } int fd_event_timedget(struct fifo *queue, struct timespec * timeout, int timeoutcode, int *code, size_t *datasz, void ** data) { struct fd_event * ev; int ret = 0; ret = fd_fifo_timedget(queue, &ev, timeout); if (ret == ETIMEDOUT) { if (code) *code = timeoutcode; if (datasz) *datasz = 0; if (data) *data = NULL; } else { CHECK_FCT( ret ); if (code) *code = ev->code; if (datasz) *datasz = ev->size; if (data) *data = ev->data; free(ev); } return 0; } void fd_event_destroy(struct fifo **queue, void (*free_cb)(void * data)) { struct fd_event * ev; /* Purge all events, and free the associated data if any */ while (fd_fifo_tryget( *queue, &ev ) == 0) { (*free_cb)(ev->data); free(ev); } CHECK_FCT_DO( fd_fifo_del(queue), /* continue */ ); return ; } const char * fd_ev_str(int event) { switch (event) { #define case_str( _val )\ case _val : return #_val case_str(FDEV_TERMINATE_INT); case_str(FDEV_TRIGGER); default: TRACE_DEBUG(FULL, "Unknown event : %d", event); return "Unknown event"; } } /**********************************************************************/ /* Trigged events */ /* This allows extensions to register for / send triggers to other extensions */ /* It is used for example for users interactions (through signals or ...) */ /* Because the number of triggers is not expected to grow, we use a simple ordered chained list */ static pthread_rwlock_t trig_rwl = PTHREAD_RWLOCK_INITIALIZER; static struct fd_list trig_list = FD_LIST_INITIALIZER(trig_list); /* The list of triggers ordered by trigger value */ struct trig_item { struct fd_list chain; int trig_value; const char * trig_module; void (*cb)(void); }; /* Add a new entry in the trigger list */ int fd_event_trig_regcb(int trigger_val, const char * module, void (*cb)(void)) { struct trig_item * ti; struct fd_list * li; TRACE_ENTRY("%d %p %p", trigger_val, module, cb); CHECK_PARAMS( trigger_val && cb ); /* Create a new trig_item */ CHECK_MALLOC( ti = malloc(sizeof(struct trig_item)) ); memset(ti, 0, sizeof(struct trig_item)); fd_list_init(&ti->chain, ti); ti->trig_value = trigger_val; ti->trig_module = module; ti->cb = cb; /* Now insert in the list */ CHECK_POSIX( pthread_rwlock_wrlock(&trig_rwl) ); for (li = trig_list.next; li != &trig_list; li = li->next) { struct trig_item *t = li->o; if (t->trig_value >= trigger_val) break; } fd_list_insert_before(li, &ti->chain); CHECK_POSIX( pthread_rwlock_unlock(&trig_rwl) ); return 0; } DECLARE_FD_DUMP_PROTOTYPE(fd_event_trig_dump) { struct fd_list * li; FD_DUMP_HANDLE_OFFSET(); CHECK_POSIX_DO( pthread_rwlock_rdlock(&trig_rwl), ); for (li = trig_list.next; li != &trig_list; li = li->next) { struct trig_item *t = li->o; CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "{signal:%d}'%s'->%p ", t->trig_value, t->trig_module, t->cb), break); } CHECK_POSIX_DO( pthread_rwlock_unlock(&trig_rwl), ); return *buf; } static void *call_cb_detached(void * arg) { void (*cb)(void) = arg; fd_log_threadname("Trig'd callback thread"); TRACE_ENTRY("%p", arg); (*cb)(); TRACE_DEBUG(ANNOYING, "Callback %p completed", cb); return NULL; } int fd_event_trig_call_cb(int trigger_val) { struct fd_list * li; pthread_attr_t detached; pthread_t th; CHECK_POSIX( pthread_attr_init(&detached) ); CHECK_POSIX( pthread_attr_setdetachstate(&detached, PTHREAD_CREATE_DETACHED) ); CHECK_POSIX( pthread_rwlock_rdlock(&trig_rwl) ); for (li = trig_list.next; li != &trig_list; li = li->next) { struct trig_item *t = li->o; if (t->trig_value == trigger_val) { TRACE_DEBUG(FULL, "Trigger %d: Calling %p in %s", t->trig_value, t->cb, t->trig_module); CHECK_POSIX_DO( pthread_create( &th, &detached, call_cb_detached, t->cb ), break ); } if (t->trig_value > trigger_val) break; } CHECK_POSIX( pthread_rwlock_unlock(&trig_rwl) ); return 0; } int fd_event_trig_fini(void) { TRACE_ENTRY(""); CHECK_POSIX( pthread_rwlock_wrlock(&trig_rwl) ); while (!FD_IS_LIST_EMPTY(&trig_list)) { struct fd_list * li = trig_list.next; fd_list_unlink(li); free(li); } CHECK_POSIX( pthread_rwlock_unlock(&trig_rwl) ); return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/extensions.c000066400000000000000000000216651333553357400233610ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" #include /* We may use libtool's later for better portability.... */ #include /* for "basename" */ /* plugins management */ /* List of extensions to load, from the configuration parsing */ struct fd_ext_info { struct fd_list chain; /* link in the list */ char *filename; /* extension filename. must be a dynamic library with fd_ext_init symbol. */ char *conffile; /* optional configuration file name for the extension */ void *handler; /* object returned by dlopen() */ const char **depends; /* names of the other extensions this one depends on (if provided) */ char *ext_name; /* points to the extension name, either inside depends, or basename(filename) */ int free_ext_name; /* must be freed if it was malloc'd */ void (*fini)(void); /* optional address of the fd_ext_fini callback */ }; /* list of extensions */ static struct fd_list ext_list = FD_LIST_INITIALIZER(ext_list); /* Add new extension */ int fd_ext_add( char * filename, char * conffile ) { struct fd_ext_info * new; TRACE_ENTRY("%p %p", filename, conffile); /* Check the filename is valid */ CHECK_PARAMS( filename ); /* Create a new object in the list */ CHECK_MALLOC( new = malloc( sizeof(struct fd_ext_info) ) ); memset(new, 0, sizeof(struct fd_ext_info)); fd_list_init(&new->chain, NULL); new->filename = filename; new->conffile = conffile; fd_list_insert_before( &ext_list, &new->chain ); TRACE_DEBUG (FULL, "Extension %s added to the list.", filename); return 0; } /* Dump the list */ DECLARE_FD_DUMP_PROTOTYPE(fd_ext_dump) { struct fd_list * li; FD_DUMP_HANDLE_OFFSET(); if (FD_IS_LIST_EMPTY(&ext_list)) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "-none-"), return NULL); } else { for (li = ext_list.next; li != &ext_list; li = li->next) { struct fd_ext_info * ext = (struct fd_ext_info *)li; CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "'%s'[%s], %sloaded%s", ext->filename, ext->conffile?:"(no config file)", ext->handler ? "" : "not ", (li->next == &ext_list) ? "":"\n"), return NULL); } } return *buf; } /* Check the dependencies. The object must have been dlopened already. */ static int check_dependencies(struct fd_ext_info * ext) { int i = 1; TRACE_ENTRY( "%p", ext ); /* Attempt to resolve the dependency array */ ext->depends = dlsym( ext->handler, "fd_ext_depends" ); if (!ext->depends) { /* Duplicate the filename */ char * tmp = strdup(ext->filename); ext->ext_name = strdup(basename(tmp)); free(tmp); ext->free_ext_name = 1; TRACE_DEBUG(FULL, "Old extension's [%s] API: missing dependencies (ignored)", ext->ext_name); return 0; } ext->ext_name = (char *)ext->depends[0]; TRACE_DEBUG(FULL, "Checking dependencies for '%s'...", ext->ext_name); while (ext->depends[i]) { struct fd_list * li; for (li = ext_list.next; li != &ext->chain; li = li->next) { struct fd_ext_info * e = (struct fd_ext_info *)li; if (!strcasecmp(e->ext_name, ext->depends[i])) { /* the dependency was already loaded */ break; } } if (li == &ext->chain) { /* the dependency was not found */ LOG_F("Error: extension [%s] depends on [%s] which was not loaded first. Please fix your configuration file.", ext->ext_name, ext->depends[i]); return ESRCH; } i++; } /* All dependencies resolved successfully */ return 0; } /* Load all extensions in the list */ int fd_ext_load() { int ret; int (*fd_ext_init)(int, int, char *) = NULL; struct fd_list * li; TRACE_ENTRY(); /* Loop on all extensions */ for (li = ext_list.next; li != &ext_list; li = li->next) { struct fd_ext_info * ext = (struct fd_ext_info *)li; LOG_D( "Loading : %s", ext->filename); /* Load the extension */ #ifndef DEBUG ext->handler = dlopen(ext->filename, RTLD_LAZY | RTLD_GLOBAL); #else /* DEBUG */ /* We resolve symbols immediatly so it's easier to find problems in ABI */ ext->handler = dlopen(ext->filename, RTLD_NOW | RTLD_GLOBAL); #endif /* DEBUG */ if (ext->handler == NULL) { /* An error occured */ LOG_F("Loading of extension %s failed: %s", ext->filename, dlerror()); ext->handler = dlopen(ext->filename, RTLD_LAZY | RTLD_GLOBAL); if (ext->handler) { if (!check_dependencies(ext)) { LOG_F("In addition, not all declared dependencies are satisfied (Internal Error!)"); } } return EINVAL; } /* Check if declared dependencies are satisfied. */ CHECK_FCT( check_dependencies(ext) ); /* Resolve the entry point of the extension */ fd_ext_init = ( int (*) (int, int, char *) )dlsym( ext->handler, "fd_ext_init" ); if (fd_ext_init == NULL) { /* An error occured */ TRACE_ERROR("Unable to resolve symbol 'fd_ext_init' for extension %s: %s", ext->filename, dlerror()); return EINVAL; } /* Resolve the exit point of the extension, which is optional for extensions */ ext->fini = ( void (*) (void) )dlsym( ext->handler, "fd_ext_fini" ); if (ext->fini == NULL) { /* Not provided */ TRACE_DEBUG (FULL, "Extension [%s] has no fd_ext_fini function.", ext->filename); } else { /* Provided */ TRACE_DEBUG (FULL, "Extension [%s] fd_ext_fini has been resolved successfully.", ext->filename); } /* Now call the entry point to initialize the extension */ ret = (*fd_ext_init)( FD_PROJECT_VERSION_MAJOR, FD_PROJECT_VERSION_MINOR, ext->conffile ); if (ret != 0) { /* The extension was unable to load cleanly */ TRACE_ERROR("Extension %s returned an error during initialization: %s", ext->filename, strerror(ret)); return ret; } /* Proceed to the next extension */ } LOG_N("All extensions loaded."); /* We have finished. */ return 0; } /* Now unload the extensions and free the memory */ int fd_ext_term( void ) { TRACE_ENTRY(); /* Loop on all extensions, in FIFO order */ while (!FD_IS_LIST_EMPTY(&ext_list)) { struct fd_list * li = ext_list.next; struct fd_ext_info * ext = (struct fd_ext_info *)li; /* Unlink this element from the list */ fd_list_unlink(li); /* Call the exit point of the extension, if it was resolved */ if (ext->fini != NULL) { TRACE_DEBUG (FULL, "Calling [%s]->fd_ext_fini function.", ext->ext_name ?: ext->filename); (*ext->fini)(); } #ifndef SKIP_DLCLOSE /* Now unload the extension */ if (ext->handler) { TRACE_DEBUG (FULL, "Unloading %s", ext->ext_name ?: ext->filename); if ( dlclose(ext->handler) != 0 ) { TRACE_DEBUG (INFO, "Unloading [%s] failed : %s", ext->ext_name ?: ext->filename, dlerror()); } } #endif /* SKIP_DLCLOSE */ /* Free the object and continue */ if (ext->free_ext_name) free(ext->ext_name); free(ext->filename); free(ext->conffile); free(ext); } /* We always return 0 since we would not handle an error anyway... */ return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/fdcore-internal.h000066400000000000000000000370511333553357400242370ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* This file contains the definitions for internal use in the freeDiameter core library */ #ifndef _FDCORE_INTERNAL_H #define _FDCORE_INTERNAL_H #include #include #ifdef DISABLE_SCTP #undef IPPROTO_SCTP #define IPPROTO_SCTP (2 = 4) /* some compilation error to spot the references */ #endif /* DISABLE_SCTP */ #ifndef HAVE_AI_ADDRCONFIG #define AI_ADDRCONFIG 0 /* ignore this flag at the moment */ #endif /* HAVE_AI_ADDRCONFIG */ /* Timeout for establishing a connection */ #ifndef CNX_TIMEOUT #define CNX_TIMEOUT 10 /* in seconds */ #endif /* CNX_TIMEOUT */ /* Timeout for receiving a CER after incoming connection is established */ #ifndef INCNX_TIMEOUT #define INCNX_TIMEOUT 20 /* in seconds */ #endif /* INCNX_TIMEOUT */ /* Timeout for receiving a CEA after CER is sent */ #ifndef CEA_TIMEOUT #define CEA_TIMEOUT 10 /* in seconds */ #endif /* CEA_TIMEOUT */ /* The timeout value to wait for answer to a DPR */ #ifndef DPR_TIMEOUT #define DPR_TIMEOUT 15 /* in seconds */ #endif /* DPR_TIMEOUT */ /* Delay where the connection is maintained opened to allow exchanging remaining pending answers after DPR/DPA */ #ifndef GRACE_TIMEOUT #define GRACE_TIMEOUT 1 /* in seconds */ #endif /* GRACE_TIMEOUT */ /* The Vendor-Id to advertise in CER/CEA */ #ifndef MY_VENDOR_ID #define MY_VENDOR_ID 0 /* Reserved value to tell it must be ignored */ #endif /* MY_VENDOR_ID */ /* Configuration */ int fd_conf_init(); int fd_conf_deinit(); int fd_conf_parse(); int fddparse(struct fd_config * conf); /* yacc generated */ int fd_conf_stream_to_gnutls_datum(FILE * pemfile, gnutls_datum_t *out); /* Extensions */ int fd_ext_add( char * filename, char * conffile ); int fd_ext_load(); int fd_ext_term(void); /* Messages */ int fd_msg_init(void); extern struct dict_object * fd_dict_avp_OSI; /* Origin-State-Id */ extern struct dict_object * fd_dict_cmd_CER; /* Capabilities-Exchange-Request */ extern struct dict_object * fd_dict_cmd_DWR; /* Device-Watchdog-Request */ extern struct dict_object * fd_dict_avp_DC; /* Disconnect-Cause */ extern struct dict_object * fd_dict_cmd_DPR; /* Disconnect-Peer-Request */ /* Global message queues */ extern struct fifo * fd_g_incoming; /* all messages received from other peers, except local messages (CER, ...) */ extern struct fifo * fd_g_outgoing; /* messages to be sent to other peers on the network following routing procedure */ extern struct fifo * fd_g_local; /* messages to be handled to local extensions */ /* Message queues */ int fd_queues_init(void); int fd_queues_fini(struct fifo ** queue); /* Trigged events */ int fd_event_trig_call_cb(int trigger_val); int fd_event_trig_fini(void); /* Create all the dictionary objects defined in the Diameter base RFC. */ int fd_dict_base_protocol(struct dictionary * dict); /* Routing */ int fd_rtdisp_init(void); int fd_rtdisp_cleanstop(void); int fd_rtdisp_fini(void); int fd_rtdisp_cleanup(void); /* Sentinel for the sent requests list */ struct sr_list { struct fd_list srs; /* requests ordered by hop-by-hop id */ struct fd_list exp; /* requests that have a timeout set, ordered by timeout */ long cnt; /* number of requests in the srs list */ long cnt_lost; /* number of requests that have not been answered in time. It is decremented when an unexpected answer is received, so this may not be accurate. */ pthread_mutex_t mtx; /* mutex to protect these lists */ pthread_cond_t cnd; /* cond var used by the thread that handles timeouts */ pthread_t thr; /* the thread that handles timeouts (expirecb called in separate forked threads) */ }; /* Peers */ struct fd_peer { /* The "real" definition of the peer structure */ /* The public data */ struct peer_hdr p_hdr; /* Eye catcher, EYEC_PEER */ int p_eyec; #define EYEC_PEER 0x373C9336 /* Origin of this peer object, for debug */ char *p_dbgorig; /* State of the peer, and its lock */ enum peer_state p_state; pthread_mutex_t p_state_mtx; /* Chaining in peers sublists */ struct fd_list p_actives; /* list of peers in the STATE_OPEN state -- used by routing */ struct fd_list p_expiry; /* list of expiring peers, ordered by their timeout value */ struct timespec p_exp_timer; /* Timestamp where the peer will expire; updated each time activity is seen on the peer (except DW) */ /* Some flags influencing the peer state machine */ struct { unsigned pf_responder : 1; /* The peer has been created to handle incoming connection */ unsigned pf_delete : 1; /* Destroy the peer when the connection is terminated */ unsigned pf_localterm : 1; /* If the latest DPR/DPA was initiated from this side */ unsigned pf_dw_pending : 1; /* A DWR message was sent and not answered yet */ unsigned pf_cnx_pb : 1; /* The peer was disconnected because of watchdogs; must exchange 3 watchdogs before putting back to normal */ unsigned pf_reopen_cnt : 2; /* remaining DW to be exchanged after re-established connection */ } p_flags; /* The events queue, peer state machine thread, timer for states timeouts */ struct fifo *p_events; /* The mutex of this FIFO list protects also the state and timer information */ pthread_t p_psm; struct timespec p_psm_timer; /* Outgoing message queue, and thread managing sending the messages */ struct fifo *p_tosend; pthread_t p_outthr; /* The next hop-by-hop id value for the link, only read & modified by p_outthr */ uint32_t p_hbh; /* Sent requests (for fallback), list of struct sentreq ordered by hbh */ struct sr_list p_sr; struct fifo *p_tofailover; /* Pending received requests not yet answered (count only) */ long p_reqin_count; /* We use p_state_mtx to protect this value */ /* Data for transitional states before the peer is in OPEN state */ struct { struct cnxctx * p_receiver; /* Only used in case of election */ struct msg * p_cer; /* Only used in case of election */ pthread_t p_ini_thr; /* Initiator thread for establishing a connection */ struct fd_list p_connparams; /* The list of connection attempts, see p_cnx.c */ }; /* connection context: socket and related information */ struct cnxctx *p_cnxctx; /* Callback for peer validation after the handshake */ int (*p_cb2)(struct peer_info *); /* Callback on initial connection success / failure after the peer was added */ void (*p_cb)(struct peer_info *, void *); void *p_cb_data; }; #define CHECK_PEER( _p ) \ (((_p) != NULL) && (((struct fd_peer *)(_p))->p_eyec == EYEC_PEER)) #define fd_peer_getstate(peer) fd_peer_get_state((struct peer_hdr *)(peer)) /* Events codespace for struct fd_peer->p_events */ enum { /* request to terminate this peer : disconnect, requeue all messages */ FDEVP_TERMINATE = 1500 /* A connection object has received a message. (data contains the buffer + padding + struct fd_msg_pmdl) */ ,FDEVP_CNX_MSG_RECV /* A connection object has encountered an error (disconnected). */ ,FDEVP_CNX_ERROR /* Endpoints of a connection have been changed (multihomed SCTP). */ ,FDEVP_CNX_EP_CHANGE /* The connection is being shutdown (SCTP notification). */ ,FDEVP_CNX_SHUTDOWN /* A new connection (with a CER) has been received */ ,FDEVP_CNX_INCOMING /* A new connection has been established to the remote peer (event data is the cnxctx object) */ ,FDEVP_CNX_ESTABLISHED /* A connection attempt (initiator side) has failed */ ,FDEVP_CNX_FAILED /* The PSM state is expired */ ,FDEVP_PSM_TIMEOUT }; #define CHECK_PEVENT( _e ) \ (((int)(_e) >= FDEVP_TERMINATE) && ((int)(_e) <= FDEVP_PSM_TIMEOUT)) /* The following macro is actually called in p_psm.c -- another solution would be to declare it static inline */ #define DECLARE_PEV_STR() \ const char * fd_pev_str(int event) \ { \ switch (event) { \ case_str(FDEVP_TERMINATE); \ case_str(FDEVP_CNX_MSG_RECV); \ case_str(FDEVP_CNX_ERROR); \ case_str(FDEVP_CNX_EP_CHANGE); \ case_str(FDEVP_CNX_INCOMING); \ case_str(FDEVP_CNX_ESTABLISHED); \ case_str(FDEVP_CNX_FAILED); \ case_str(FDEVP_PSM_TIMEOUT); \ } \ TRACE_DEBUG(FULL, "Unknown event : %d", event); \ return "Unknown event"; \ } const char * fd_pev_str(int event); /* The data structure for FDEVP_CNX_INCOMING event */ struct cnx_incoming { struct msg * cer; /* the CER message received on this connection */ struct cnxctx * cnx; /* The connection context */ int validate; /* The peer is new, it must be validated (by an extension) or error CEA to be sent */ }; /* Functions */ int fd_peer_fini(); int fd_peer_alloc(struct fd_peer ** ptr); int fd_peer_free(struct fd_peer ** ptr); int fd_peer_handle_newCER( struct msg ** cer, struct cnxctx ** cnx ); /* fd_peer_add declared in freeDiameter.h */ int fd_peer_validate( struct fd_peer * peer ); void fd_peer_failover_msg(struct fd_peer * peer); /* Peer expiry */ int fd_p_expi_init(void); int fd_p_expi_fini(void); int fd_p_expi_update(struct fd_peer * peer ); /* Peer state machine */ int fd_psm_start(); int fd_psm_begin(struct fd_peer * peer ); int fd_psm_terminate(struct fd_peer * peer, char * reason ); void fd_psm_abord(struct fd_peer * peer ); void fd_psm_next_timeout(struct fd_peer * peer, int add_random, int delay); int fd_psm_change_state(struct fd_peer * peer, int new_state); void fd_psm_cleanup(struct fd_peer * peer, int terminate); /* Peer out */ int fd_out_send(struct msg ** msg, struct cnxctx * cnx, struct fd_peer * peer, int update_reqin_cnt); int fd_out_start(struct fd_peer * peer); int fd_out_stop(struct fd_peer * peer); /* Initiating connections */ int fd_p_cnx_init(struct fd_peer * peer); void fd_p_cnx_abort(struct fd_peer * peer, int cleanup_all); /* Peer sent requests cache */ int fd_p_sr_store(struct sr_list * srlist, struct msg **req, uint32_t *hbhloc, uint32_t hbh_restore); int fd_p_sr_fetch(struct sr_list * srlist, uint32_t hbh, struct msg **req); int fd_p_sr_start(struct sr_list * srlist); int fd_p_sr_stop(struct sr_list * srlist); void fd_p_sr_failover(struct sr_list * srlist); /* Local Link messages (CER/CEA, DWR/DWA, DPR/DPA) */ int fd_p_ce_msgrcv(struct msg ** msg, int req, struct fd_peer * peer); int fd_p_ce_handle_newCER(struct msg ** msg, struct fd_peer * peer, struct cnxctx ** cnx, int valid); int fd_p_ce_handle_newcnx(struct fd_peer * peer, struct cnxctx * initiator); int fd_p_ce_process_receiver(struct fd_peer * peer); void fd_p_ce_clear_cnx(struct fd_peer * peer, struct cnxctx ** cnx_kept); int fd_p_dw_handle(struct msg ** msg, int req, struct fd_peer * peer); int fd_p_dw_timeout(struct fd_peer * peer); int fd_p_dw_reopen(struct fd_peer * peer); int fd_p_dp_handle(struct msg ** msg, int req, struct fd_peer * peer); int fd_p_dp_initiate(struct fd_peer * peer, char * reason); int fd_p_dp_newdelay(struct fd_peer * peer); /* Active peers -- routing process should only ever take the read lock, the write lock is managed by PSMs */ extern struct fd_list fd_g_activ_peers; extern pthread_rwlock_t fd_g_activ_peers_rw; /* protect the list */ /* Server sockets */ int fd_servers_start(); int fd_servers_stop(); /* Connection contexts -- there are also definitions in cnxctx.h for the relevant files */ struct cnxctx * fd_cnx_serv_tcp(uint16_t port, int family, struct fd_endpoint * ep); struct cnxctx * fd_cnx_serv_sctp(uint16_t port, struct fd_list * ep_list); int fd_cnx_serv_listen(struct cnxctx * conn); struct cnxctx * fd_cnx_serv_accept(struct cnxctx * serv); struct cnxctx * fd_cnx_cli_connect_tcp(sSA * sa, socklen_t addrlen); struct cnxctx * fd_cnx_cli_connect_sctp(int no_ip6, uint16_t port, struct fd_list * list); int fd_cnx_start_clear(struct cnxctx * conn, int loop); void fd_cnx_sethostname(struct cnxctx * conn, DiamId_t hn); int fd_cnx_proto_info(struct cnxctx * conn, char * buf, size_t len); #define ALGO_HANDSHAKE_DEFAULT 0 /* TLS for TCP, DTLS for SCTP */ #define ALGO_HANDSHAKE_3436 1 /* For TLS for SCTP also */ int fd_cnx_handshake(struct cnxctx * conn, int mode, int algo, char * priority, void * alt_creds); char * fd_cnx_getid(struct cnxctx * conn); int fd_cnx_getproto(struct cnxctx * conn); int fd_cnx_getTLS(struct cnxctx * conn); int fd_cnx_is_unordered_delivery_supported(struct cnxctx * conn); int fd_cnx_unordered_delivery(struct cnxctx * conn, int is_allowed); int fd_cnx_getcred(struct cnxctx * conn, const gnutls_datum_t **cert_list, unsigned int *cert_list_size); int fd_cnx_get_local_eps(struct fd_list * list); int fd_cnx_getremoteeps(struct cnxctx * conn, struct fd_list * eps); char * fd_cnx_getremoteid(struct cnxctx * conn); int fd_cnx_receive(struct cnxctx * conn, struct timespec * timeout, unsigned char **buf, size_t * len); int fd_cnx_recv_setaltfifo(struct cnxctx * conn, struct fifo * alt_fifo); /* send FDEVP_CNX_MSG_RECV event to the fifo list */ int fd_cnx_send(struct cnxctx * conn, unsigned char * buf, size_t len); void fd_cnx_destroy(struct cnxctx * conn); #ifdef GNUTLS_VERSION_300 int fd_tls_verify_credentials_2(gnutls_session_t session); #endif /* GNUTLS_VERSION_300 */ /* Internal calls of the hook mechanism */ void fd_hook_call(enum fd_hook_type type, struct msg * msg, struct fd_peer * peer, void * other, struct fd_msg_pmdl * pmdl); void fd_hook_associate(struct msg * msg, struct fd_msg_pmdl * pmdl); int fd_hooks_init(void); size_t fd_msg_pmdl_sizewithoverhead(size_t datalen); struct fd_msg_pmdl * fd_msg_pmdl_get_inbuf(uint8_t * buf, size_t datalen); #endif /* _FDCORE_INTERNAL_H */ nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/fdd.l000066400000000000000000000225301333553357400217200ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Lex configuration parser. * * This file defines the token for parsing the daemon's configuration file * Note that each extension has a separate independant configuration file. * * Note : This module is NOT thread-safe. All processing must be done from one thread only. */ %{ /* Include the daemon's header files */ #include "fdcore-internal.h" /* Include yacc tokens definitions */ #include "fdd.tab.h" /* Update the column information */ #ifdef DEBUG_LEX #define YY_USER_ACTION { \ yylloc->first_column = yylloc->last_column + 1; \ yylloc->last_column = yylloc->first_column + yyleng - 1; \ fd_log_debug( \ "(%d:%d-%d:%d) matched rule %d, length=%d, txt='%s'", \ yylloc->first_line, yylloc->first_column, \ yylloc->last_line, yylloc->last_column, \ yy_act, yyleng, yytext); \ } #else /* DEBUG_LEX */ #define YY_USER_ACTION { \ yylloc->first_column = yylloc->last_column + 1; \ yylloc->last_column = yylloc->first_column + yyleng - 1; \ } #endif /* %option noinput ? */ #define YY_NO_INPUT /* Additional for files inclusion */ #include #include #define MAX_NESTED_CONF_FILES 5 struct nested_conffiles_t { YY_BUFFER_STATE parent_level_state; glob_t filelist; int current_file; } nested_conffiles[MAX_NESTED_CONF_FILES]; int current_nested_level = 0; int globerrfct(const char *epath, int eerrno) { TRACE_ERROR("Failed to scan %s: %s", epath, strerror(eerrno)); return 1; } %} %option bison-bridge bison-locations %option noyywrap %option nounput %x in_include /* Quoted string. Multilines do not match. */ qstring \"[^\"\n]*\" %% <*>\n { /* Update the line count */ yylloc->first_line++; yylloc->last_line++; yylloc->last_column=0; } <*>([[:space:]]{-}[\n])+ ; /* Eat all spaces, not new lines */ <*>#.*$ ; /* Eat all comments */ include BEGIN(in_include); /* Following an "include" keyword */ { {qstring} { /* Name of the file to include. This is directly sent to glob. */ int globerror=0; char * buf = strdup(yytext+1); if (buf[yyleng-2] != '"') { TRACE_ERROR("Unterminated string: %s", yytext); return LEX_ERROR; } buf[yyleng-2] = '\0'; if (current_nested_level >= MAX_NESTED_CONF_FILES) { TRACE_ERROR("Too many recursion levels in configuration files includes"); return LEX_ERROR; } /* glob the include */ globerror = glob(buf, GLOB_ERR, globerrfct, &nested_conffiles[current_nested_level].filelist); if (globerror == GLOB_NOSPACE) { TRACE_ERROR("Not enough memory to parse include directive."); return LEX_ERROR; } if (globerror == GLOB_ABORTED) { TRACE_ERROR("An error was encountered in include directive."); return LEX_ERROR; } if (globerror == GLOB_NOMATCH) { globfree(&nested_conffiles[current_nested_level].filelist); goto nomatch; } if (globerror) { TRACE_ERROR("Unexpected error in glob (%d).", globerror); return LEX_ERROR; } /* We have a list of files to include. */ /* save the current buffer for returning when this include has been parsed */ nested_conffiles[current_nested_level].parent_level_state = YY_CURRENT_BUFFER; /* Start with the first match */ nested_conffiles[current_nested_level].current_file = 0; yyin = fopen( nested_conffiles[current_nested_level].filelist.gl_pathv[0], "r" ); if ( ! yyin ) { TRACE_ERROR("Error in %s: %s", nested_conffiles[current_nested_level].filelist.gl_pathv[0], strerror(errno)); return LEX_ERROR; } yy_switch_to_buffer(yy_create_buffer( yyin, YY_BUF_SIZE )); /* In case of recursive includes */ current_nested_level++; nomatch: BEGIN(INITIAL); } } <> { if (current_nested_level == 0) { /* We are at the end of parsing */ yyterminate(); } /* Otherwise we are doing an include statement */ --current_nested_level; yy_delete_buffer(YY_CURRENT_BUFFER); /* Go to next file, if any */ nested_conffiles[current_nested_level].current_file++; if ( nested_conffiles[current_nested_level].filelist.gl_pathv[nested_conffiles[current_nested_level].current_file] == NULL ) { /* We have finished with this list of includes */ globfree(&nested_conffiles[current_nested_level].filelist); yy_switch_to_buffer(nested_conffiles[current_nested_level].parent_level_state); } else { /* Proceed to next included file */ yyin = fopen( nested_conffiles[current_nested_level].filelist.gl_pathv[nested_conffiles[current_nested_level].current_file], "r" ); if ( ! yyin ) { TRACE_ERROR("Error in %s: %s", nested_conffiles[current_nested_level].filelist.gl_pathv[nested_conffiles[current_nested_level].current_file], strerror(errno)); return LEX_ERROR; } yy_switch_to_buffer(yy_create_buffer( yyin, YY_BUF_SIZE )); /* In case of recursive includes */ current_nested_level++; } } {qstring} { /* First copy the string without the quotes for use in the yacc parser */ CHECK_MALLOC_DO( yylval->string = strdup(yytext+1), /* This allocates one useless tail char but... it's easier :D */ return LEX_ERROR );/* on error, trig an error in yacc parser */ yylval->string[yyleng-2] = '\0'; /* the yacc parser will check the string is valid */ return QSTRING; } [[:digit:]]+ { /* Convert this to an integer value */ int ret = sscanf(yytext, "%i", &yylval->integer); if (ret != 1) { /* No matching: an error occurred */ TRACE_ERROR("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno)); return LEX_ERROR; /* trig an error in yacc parser */ /* Maybe we could REJECT instead of failing here? */ } return INTEGER; } /* Full words tokens (keywords) */ (?i:"Identity") { return IDENTITY; } (?i:"Realm") { return REALM; } (?i:"Port") { return PORT; } (?i:"SecPort") { return SECPORT; } /* (?i:"SctpSec3436") { return SEC3436; } */ (?i:"No_IPv6") { return NOIP6; } (?i:"No_IP") { return NOIP; } (?i:"No_TCP") { return NOTCP; } (?i:"No_SCTP") { return NOSCTP; } (?i:"Prefer_TCP") { return PREFERTCP; } (?i:"TLS_old_method") { return OLDTLS; } (?i:"SCTP_streams") { return SCTPSTREAMS; } (?i:"AppServThreads") { return APPSERVTHREADS;} (?i:"ListenOn") { return LISTENON; } (?i:"ThreadsPerServer") { return THRPERSRV; } (?i:"TcTimer") { return TCTIMER; } (?i:"TwTimer") { return TWTIMER; } (?i:"NoRelay") { return NORELAY; } (?i:"LoadExtension") { return LOADEXT; } (?i:"ConnectPeer") { return CONNPEER; } (?i:"ConnectTo") { return CONNTO; } (?i:"No_TLS") { return NOTLS; } (?i:"TLS_Cred") { return TLS_CRED; } (?i:"TLS_CA") { return TLS_CA; } (?i:"TLS_CRL") { return TLS_CRL; } (?i:"TLS_Prio") { return TLS_PRIO; } (?i:"TLS_DH_bits") { return TLS_DH_BITS; } (?i:"TLS_DH_file") { return TLS_DH_FILE; } /* Valid single characters for yyparse */ <*>[=,:;{}] { return yytext[0]; } /* Unrecognized token */ <*>[[:alnum:]]+ | /* This rule is only useful to print a complete token in error messages */ /* Unrecognized character */ <*>. { TRACE_ERROR("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext); return LEX_ERROR; } %% nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/fdd.y000066400000000000000000000450501333553357400217370ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2015, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Yacc configuration parser. * * This file defines the grammar of the configuration file. * Note that each extension has a separate independant configuration file. * * Note : This module is NOT thread-safe. All processing must be done from one thread only. */ /* For development only : */ %debug %error-verbose %parse-param {struct fd_config * conf} /* Keep track of location */ %locations %pure-parser %{ #include "fdcore-internal.h" #include "fdd.tab.h" /* bug : bison does not define the YYLTYPE before including this bloc, so... */ /* The Lex parser prototype */ int fddlex(YYSTYPE *lvalp, YYLTYPE *llocp); /* Function to report error */ void yyerror (YYLTYPE *ploc, struct fd_config * conf, char const *s) { if (ploc->first_line != ploc->last_line) { TRACE_ERROR("%s:%d.%d-%d.%d : %s", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s); } else if (ploc->first_column != ploc->last_column) { TRACE_ERROR("%s:%d.%d-%d : %s", conf->cnf_file, ploc->first_line, ploc->first_column, ploc->last_column, s); } else { TRACE_ERROR("%s:%d.%d : %s", conf->cnf_file, ploc->first_line, ploc->first_column, s); } } int got_peer_noip = 0; int got_peer_noipv6 = 0; int got_peer_notcp = 0; int got_peer_nosctp = 0; struct peer_info fddpi; %} /* Values returned by lex for token */ %union { char *string; /* The string is allocated by strdup in lex.*/ int integer; /* Store integer values */ } /* In case of error in the lexical analysis */ %token LEX_ERROR %token QSTRING %token INTEGER %type extconf %token IDENTITY %token REALM %token PORT %token SECPORT %token SEC3436 %token NOIP %token NOIP6 %token NOTCP %token NOSCTP %token PREFERTCP %token OLDTLS %token NOTLS %token SCTPSTREAMS %token APPSERVTHREADS %token LISTENON %token THRPERSRV %token TCTIMER %token TWTIMER %token NORELAY %token LOADEXT %token CONNPEER %token CONNTO %token TLS_CRED %token TLS_CA %token TLS_CRL %token TLS_PRIO %token TLS_DH_BITS %token TLS_DH_FILE /* -------------------------------------- */ %% /* The grammar definition - Sections blocs. */ conffile: /* Empty is OK -- for simplicity here, we reject in daemon later */ | conffile identity | conffile realm | conffile tctimer | conffile twtimer | conffile port | conffile secport | conffile sec3436 | conffile sctpstreams | conffile listenon | conffile thrpersrv | conffile norelay | conffile appservthreads | conffile noip | conffile noip6 | conffile notcp | conffile nosctp | conffile prefertcp | conffile oldtls | conffile loadext | conffile connpeer | conffile tls_cred | conffile tls_ca | conffile tls_crl | conffile tls_prio | conffile tls_dh | conffile errors { yyerror(&yylloc, conf, "An error occurred while parsing the configuration file"); return EINVAL; } ; /* Lexical or syntax error */ errors: LEX_ERROR | error ; identity: IDENTITY '=' QSTRING ';' { conf->cnf_diamid = $3; } ; realm: REALM '=' QSTRING ';' { conf->cnf_diamrlm = $3; } ; tctimer: TCTIMER '=' INTEGER ';' { CHECK_PARAMS_DO( ($3 > 0), { yyerror (&yylloc, conf, "Invalid value"); YYERROR; } ); conf->cnf_timer_tc = (unsigned int)$3; } ; twtimer: TWTIMER '=' INTEGER ';' { CHECK_PARAMS_DO( ($3 > 5), { yyerror (&yylloc, conf, "Invalid value"); YYERROR; } ); conf->cnf_timer_tw = (unsigned int)$3; } ; port: PORT '=' INTEGER ';' { CHECK_PARAMS_DO( ($3 >= 0) && ($3 < 1<<16), { yyerror (&yylloc, conf, "Invalid value"); YYERROR; } ); conf->cnf_port = (uint16_t)$3; } ; secport: SECPORT '=' INTEGER ';' { CHECK_PARAMS_DO( ($3 >= 0) && ($3 < 1<<16), { yyerror (&yylloc, conf, "Invalid value"); YYERROR; } ); conf->cnf_port_tls = (uint16_t)$3; } ; sec3436: SEC3436 '=' INTEGER ';' { CHECK_PARAMS_DO( ($3 >= 0) && ($3 < 1<<16), { yyerror (&yylloc, conf, "Invalid value"); YYERROR; } ); conf->cnf_port_3436 = (uint16_t)$3; } ; sctpstreams: SCTPSTREAMS '=' INTEGER ';' { CHECK_PARAMS_DO( ($3 > 0) && ($3 < 1<<16), { yyerror (&yylloc, conf, "Invalid value"); YYERROR; } ); conf->cnf_sctp_str = (uint16_t)$3; } ; listenon: LISTENON '=' QSTRING ';' { struct addrinfo hints, *ai; int ret; memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST; ret = getaddrinfo($3, NULL, &hints, &ai); if (ret) { yyerror (&yylloc, conf, gai_strerror(ret)); YYERROR; } CHECK_FCT_DO( fd_ep_add_merge( &conf->cnf_endpoints, ai->ai_addr, ai->ai_addrlen, EP_FL_CONF ), YYERROR ); freeaddrinfo(ai); free($3); } ; thrpersrv: THRPERSRV '=' INTEGER ';' { CHECK_PARAMS_DO( ($3 > 0), { yyerror (&yylloc, conf, "Invalid value"); YYERROR; } ); conf->cnf_thr_srv = $3; } ; norelay: NORELAY ';' { conf->cnf_flags.no_fwd = 1; } ; appservthreads: APPSERVTHREADS '=' INTEGER ';' { CHECK_PARAMS_DO( ($3 > 0) && ($3 < 256), { yyerror (&yylloc, conf, "Invalid value"); YYERROR; } ); conf->cnf_dispthr = (uint16_t)$3; } ; noip: NOIP ';' { if (got_peer_noipv6) { yyerror (&yylloc, conf, "No_IP conflicts with a ConnectPeer directive No_IPv6."); YYERROR; } conf->cnf_flags.no_ip4 = 1; } ; noip6: NOIP6 ';' { if (got_peer_noip) { yyerror (&yylloc, conf, "No_IP conflicts with a ConnectPeer directive No_IP."); YYERROR; } conf->cnf_flags.no_ip6 = 1; } ; notcp: NOTCP ';' { #ifdef DISABLE_SCTP yyerror (&yylloc, conf, "No_TCP cannot be specified for daemon compiled with DISABLE_SCTP option."); YYERROR; #endif if (conf->cnf_flags.no_sctp) { yyerror (&yylloc, conf, "No_TCP conflicts with No_SCTP directive." ); YYERROR; } if (got_peer_nosctp) { yyerror (&yylloc, conf, "No_TCP conflicts with a ConnectPeer directive No_SCTP."); YYERROR; } conf->cnf_flags.no_tcp = 1; } ; nosctp: NOSCTP ';' { if (conf->cnf_flags.no_tcp) { yyerror (&yylloc, conf, "No_SCTP conflicts with No_TCP directive." ); YYERROR; } if (got_peer_notcp) { yyerror (&yylloc, conf, "No_SCTP conflicts with a ConnectPeer directive No_TCP."); YYERROR; } conf->cnf_flags.no_sctp = 1; } ; prefertcp: PREFERTCP ';' { conf->cnf_flags.pr_tcp = 1; } ; oldtls: OLDTLS ';' { conf->cnf_flags.tls_alg = 1; } ; loadext: LOADEXT '=' QSTRING extconf ';' { char * fname; char * cfname; FILE * fd; /* Try and open the extension file */ fname = $3; fd = fopen(fname, "r"); if ((fd == NULL) && (*fname != '/')) { char * bkp = fname; CHECK_MALLOC_DO( fname = malloc( strlen(bkp) + strlen(DEFAULT_EXTENSIONS_PATH) + 2 ), { yyerror (&yylloc, conf, "Not enough memory"); YYERROR; } ); sprintf(fname, DEFAULT_EXTENSIONS_PATH "/%s", bkp); fd = fopen(fname, "r"); if (fd == NULL) { free(fname); fname = bkp; } else { free(bkp); } } if (fd != NULL) { fclose(fd); } /* otherwise, LD_LIBRARY_PATH will be tested by dl_open. This should not give any security issue, otherwise we can add an "else fail" here. */ /* Try and open the configuration file (optional) */ cfname = $4; if (cfname) { fd = fopen(cfname, "r"); if ((fd == NULL) && (*cfname != '/')) { char * test; CHECK_MALLOC_DO( test = malloc( strlen(cfname) + strlen(DEFAULT_CONF_PATH) + 2 ), { yyerror (&yylloc, conf, "Not enough memory"); YYERROR; } ); sprintf(test, DEFAULT_CONF_PATH "/%s", cfname); fd = fopen(test, "r"); if (fd) { free(cfname); cfname=test; } else { /* This is not an error, we allow an extension to wait for something else than a real conf file. */ free(test); } } if (fd) fclose(fd); } CHECK_FCT_DO( fd_ext_add( fname, cfname ), { yyerror (&yylloc, conf, "Error adding extension"); YYERROR; } ); } ; extconf: /* empty */ { $$ = NULL; } | ':' QSTRING { $$ = $2; } ; connpeer: { memset(&fddpi, 0, sizeof(fddpi)); fddpi.config.pic_flags.persist = PI_PRST_ALWAYS; fd_list_init( &fddpi.pi_endpoints, NULL ); } CONNPEER '=' QSTRING peerinfo ';' { fddpi.pi_diamid = $4; CHECK_FCT_DO( fd_peer_add ( &fddpi, conf->cnf_file, NULL, NULL ), { yyerror (&yylloc, conf, "Error adding ConnectPeer information"); YYERROR; } ); /* Now destroy any content in the structure */ free(fddpi.pi_diamid); free(fddpi.config.pic_realm); free(fddpi.config.pic_priority); while (!FD_IS_LIST_EMPTY(&fddpi.pi_endpoints)) { struct fd_list * li = fddpi.pi_endpoints.next; fd_list_unlink(li); free(li); } } ; peerinfo: /* empty */ | '{' peerparams '}' ; peerparams: /* empty */ | peerparams NOIP ';' { if ((conf->cnf_flags.no_ip6) || (fddpi.config.pic_flags.pro3 == PI_P3_IP)) { yyerror (&yylloc, conf, "No_IP conflicts with a No_IPv6 directive."); YYERROR; } got_peer_noip++; fddpi.config.pic_flags.pro3 = PI_P3_IPv6; } | peerparams NOIP6 ';' { if ((conf->cnf_flags.no_ip4) || (fddpi.config.pic_flags.pro3 == PI_P3_IPv6)) { yyerror (&yylloc, conf, "No_IPv6 conflicts with a No_IP directive."); YYERROR; } got_peer_noipv6++; fddpi.config.pic_flags.pro3 = PI_P3_IP; } | peerparams NOTCP ';' { #ifdef DISABLE_SCTP yyerror (&yylloc, conf, "No_TCP cannot be specified in daemon compiled with DISABLE_SCTP option."); YYERROR; #endif if ((conf->cnf_flags.no_sctp) || (fddpi.config.pic_flags.pro4 == PI_P4_TCP)) { yyerror (&yylloc, conf, "No_TCP conflicts with a No_SCTP directive."); YYERROR; } got_peer_notcp++; fddpi.config.pic_flags.pro4 = PI_P4_SCTP; } | peerparams NOSCTP ';' { if ((conf->cnf_flags.no_tcp) || (fddpi.config.pic_flags.pro4 == PI_P4_SCTP)) { yyerror (&yylloc, conf, "No_SCTP conflicts with a No_TCP directive."); YYERROR; } got_peer_nosctp++; fddpi.config.pic_flags.pro4 = PI_P4_TCP; } | peerparams PREFERTCP ';' { fddpi.config.pic_flags.alg = PI_ALGPREF_TCP; } | peerparams OLDTLS ';' { fddpi.config.pic_flags.sec |= PI_SEC_TLS_OLD; } | peerparams NOTLS ';' { fddpi.config.pic_flags.sec |= PI_SEC_NONE; } | peerparams SEC3436 ';' { fddpi.config.pic_flags.sctpsec |= PI_SCTPSEC_3436; } | peerparams REALM '=' QSTRING ';' { fddpi.config.pic_realm = $4; } | peerparams PORT '=' INTEGER ';' { CHECK_PARAMS_DO( ($4 > 0) && ($4 < 1<<16), { yyerror (&yylloc, conf, "Invalid port value"); YYERROR; } ); fddpi.config.pic_port = (uint16_t)$4; } | peerparams TCTIMER '=' INTEGER ';' { fddpi.config.pic_tctimer = $4; } | peerparams TWTIMER '=' INTEGER ';' { fddpi.config.pic_twtimer = $4; } | peerparams TLS_PRIO '=' QSTRING ';' { fddpi.config.pic_priority = $4; } | peerparams CONNTO '=' QSTRING ';' { struct addrinfo hints, *ai; int ret; int disc = 0; memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_ADDRCONFIG | AI_NUMERICHOST; ret = getaddrinfo($4, NULL, &hints, &ai); if (ret == EAI_NONAME) { /* The name was maybe not numeric, try again */ disc = EP_FL_DISC; hints.ai_flags &= ~ AI_NUMERICHOST; ret = getaddrinfo($4, NULL, &hints, &ai); } if (ret) { yyerror (&yylloc, conf, gai_strerror(ret)); YYERROR; } CHECK_FCT_DO( fd_ep_add_merge( &fddpi.pi_endpoints, ai->ai_addr, ai->ai_addrlen, EP_FL_CONF | (disc ?: EP_ACCEPTALL) ), YYERROR ); free($4); freeaddrinfo(ai); } ; tls_cred: TLS_CRED '=' QSTRING ',' QSTRING ';' { FILE * fd; fd = fopen($3, "r"); if (fd == NULL) { int ret = errno; TRACE_ERROR("Unable to open certificate file %s for reading: %s", $3, strerror(ret)); yyerror (&yylloc, conf, "Error on file name"); YYERROR; } fclose(fd); fd = fopen($5, "r"); if (fd == NULL) { int ret = errno; TRACE_ERROR("Unable to open private key file %s for reading: %s", $5, strerror(ret)); yyerror (&yylloc, conf, "Error on file name"); YYERROR; } fclose(fd); conf->cnf_sec_data.cert_file = $3; conf->cnf_sec_data.key_file = $5; CHECK_GNUTLS_DO( gnutls_certificate_set_x509_key_file( conf->cnf_sec_data.credentials, conf->cnf_sec_data.cert_file, conf->cnf_sec_data.key_file, GNUTLS_X509_FMT_PEM), { yyerror (&yylloc, conf, "Error opening certificate or private key file."); YYERROR; } ); } ; tls_ca: TLS_CA '=' QSTRING ';' { FILE * fd; fd = fopen($3, "rb"); if (fd == NULL) { int ret = errno; TRACE_ERROR("Unable to open CA file %s for reading: %s", $3, strerror(ret)); yyerror (&yylloc, conf, "Error on file name"); YYERROR; } #ifdef GNUTLS_VERSION_300 { /* We import these CA in the trust list */ gnutls_x509_crt_t * calist; unsigned int cacount; gnutls_datum_t cafile; CHECK_FCT_DO( fd_conf_stream_to_gnutls_datum(fd, &cafile), { yyerror (&yylloc, conf, "Error reading CA file."); YYERROR; } ); CHECK_GNUTLS_DO( gnutls_x509_crt_list_import2(&calist, &cacount, &cafile, GNUTLS_X509_FMT_PEM, GNUTLS_X509_CRT_LIST_FAIL_IF_UNSORTED), { yyerror (&yylloc, conf, "Error importing CA file."); YYERROR; } ); free(cafile.data); CHECK_GNUTLS_DO( gnutls_x509_trust_list_add_cas (fd_g_config->cnf_sec_data.trustlist, calist, cacount, 0), { yyerror (&yylloc, conf, "Error saving CA in trust list."); YYERROR; } ); } #endif /* GNUTLS_VERSION_300 */ fclose(fd); conf->cnf_sec_data.ca_file = $3; CHECK_GNUTLS_DO( conf->cnf_sec_data.ca_file_nr += gnutls_certificate_set_x509_trust_file( conf->cnf_sec_data.credentials, conf->cnf_sec_data.ca_file, GNUTLS_X509_FMT_PEM), { yyerror (&yylloc, conf, "Error setting CA parameters."); YYERROR; } ); } ; tls_crl: TLS_CRL '=' QSTRING ';' { FILE * fd; fd = fopen($3, "rb"); if (fd == NULL) { int ret = errno; TRACE_ERROR("Unable to open CRL file %s for reading: %s", $3, strerror(ret)); yyerror (&yylloc, conf, "Error on file name"); YYERROR; } #ifdef GNUTLS_VERSION_300 { /* We import these CRL in the trust list */ gnutls_x509_crl_t * crllist; unsigned int crlcount; gnutls_datum_t crlfile; CHECK_FCT_DO( fd_conf_stream_to_gnutls_datum(fd, &crlfile), { yyerror (&yylloc, conf, "Error reading CRL file."); YYERROR; } ); CHECK_GNUTLS_DO( gnutls_x509_crl_list_import2(&crllist, &crlcount, &crlfile, GNUTLS_X509_FMT_PEM, 0), { yyerror (&yylloc, conf, "Error importing CRL file."); YYERROR; } ); free(crlfile.data); CHECK_GNUTLS_DO( gnutls_x509_trust_list_add_crls (fd_g_config->cnf_sec_data.trustlist, crllist, crlcount, GNUTLS_TL_VERIFY_CRL, 0), { yyerror (&yylloc, conf, "Error importing CRL in trust list."); YYERROR; } ); } #endif /* GNUTLS_VERSION_300 */ fclose(fd); conf->cnf_sec_data.crl_file = $3; CHECK_GNUTLS_DO( gnutls_certificate_set_x509_crl_file( conf->cnf_sec_data.credentials, conf->cnf_sec_data.crl_file, GNUTLS_X509_FMT_PEM), { yyerror (&yylloc, conf, "Error setting CRL parameters."); YYERROR; } ); } ; tls_prio: TLS_PRIO '=' QSTRING ';' { const char * err_pos = NULL; conf->cnf_sec_data.prio_string = $3; CHECK_GNUTLS_DO( gnutls_priority_init( &conf->cnf_sec_data.prio_cache, conf->cnf_sec_data.prio_string, &err_pos), { yyerror (&yylloc, conf, "Error setting Priority parameter."); TRACE_ERROR("Error at position : %s", err_pos); YYERROR; } ); } ; tls_dh: TLS_DH_BITS '=' INTEGER ';' { conf->cnf_sec_data.dh_bits = $3; } | TLS_DH_FILE '=' QSTRING ';' { FILE * fd; free(conf->cnf_sec_data.dh_file); conf->cnf_sec_data.dh_file = $3; fd = fopen($3, "r"); if (fd == NULL) { int ret = errno; TRACE_ERROR("Unable to open DH file %s for reading: %s", $3, strerror(ret)); yyerror (&yylloc, conf, "Error on file name"); YYERROR; } fclose(fd); } ; nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/fifo_stats.c000066400000000000000000000072571333553357400233240ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" /* See include/freeDiameter/libfdcore.h for more information */ int fd_stat_getstats(enum fd_stat_type stat, struct peer_hdr * peer, int * current_count, int * limit_count, int * highest_count, long long * total_count, struct timespec * total, struct timespec * blocking, struct timespec * last) { struct fd_peer * p = (struct fd_peer *)peer; TRACE_ENTRY( "%d %p %p %p %p %p %p %p %p", stat, peer, current_count, limit_count, highest_count, total_count, total, blocking, last); switch (stat) { case STAT_G_LOCAL: { CHECK_FCT( fd_fifo_getstats(fd_g_local, current_count, limit_count, highest_count, total_count, total, blocking, last) ); } break; case STAT_G_INCOMING: { CHECK_FCT( fd_fifo_getstats(fd_g_incoming, current_count, limit_count, highest_count, total_count, total, blocking, last) ); } break; case STAT_G_OUTGOING: { CHECK_FCT( fd_fifo_getstats(fd_g_outgoing, current_count, limit_count, highest_count, total_count, total, blocking, last) ); } break; case STAT_P_PSM: { CHECK_PARAMS( CHECK_PEER( peer ) ); CHECK_FCT( fd_fifo_getstats(p->p_events, current_count, limit_count, highest_count, total_count, total, blocking, last) ); } break; case STAT_P_TOSEND: { CHECK_PARAMS( CHECK_PEER( peer ) ); CHECK_FCT( fd_fifo_getstats(p->p_tosend, current_count, limit_count, highest_count, total_count, total, blocking, last) ); } break; default: return EINVAL; } return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/hooks.c000066400000000000000000000370111333553357400222750ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2015, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" /* Structures for the fd_hook_data_hdl management */ static struct fd_hook_data_hdl { size_t pmd_size; void (*pmd_init_cb)(struct fd_hook_permsgdata *); void (*pmd_fini_cb)(struct fd_hook_permsgdata *); } HDH_array[FD_HOOK_HANDLE_LIMIT]; static int max_index = 0; static pthread_mutex_t HDH_lock = PTHREAD_MUTEX_INITIALIZER; /* The structure linked from the msg structure list */ struct pmd_list_item { struct fd_list chain; /* this list is ordered by hdl */ struct fd_hook_data_hdl * hdl; struct fd_hook_permsgdata { } pmd; /* this data belongs to the extension; we only know the size of it */ }; #define sizeof_pmd(hdl) (((size_t)&((struct pmd_list_item *)0)->pmd) + hdl->pmd_size) /* Now a hook registered by an extension */ struct fd_hook_hdl { struct fd_list chain[HOOK_LAST+1]; void (*fd_hook_cb)(enum fd_hook_type type, struct msg * msg, struct peer_hdr * peer, void * other, struct fd_hook_permsgdata *pmd, void * regdata); void *regdata; struct fd_hook_data_hdl *data_hdl; }; /* Array of those hooks */ struct { struct fd_list sentinel; pthread_rwlock_t rwlock; } HS_array[HOOK_LAST+1]; /* Initialize the array of sentinels for the hooks */ int fd_hooks_init(void) { int i; for (i=0; i <= HOOK_LAST; i++) { fd_list_init(&HS_array[i].sentinel, NULL); CHECK_POSIX( pthread_rwlock_init(&HS_array[i].rwlock, NULL) ); } return 0; } /* Get a slot in the array */ int fd_hook_data_register( size_t permsgdata_size, void (*permsgdata_init_cb) (struct fd_hook_permsgdata *), void (*permsgdata_fini_cb) (struct fd_hook_permsgdata *), struct fd_hook_data_hdl **new_handle) { int ret = ENOSPC, idx; TRACE_ENTRY("%zd %p %p %p", permsgdata_size, permsgdata_init_cb, permsgdata_fini_cb, new_handle); CHECK_PARAMS( permsgdata_size && new_handle ); CHECK_POSIX( pthread_mutex_lock(&HDH_lock) ); if (max_index < FD_HOOK_HANDLE_LIMIT) { idx = max_index++; ret = 0; } CHECK_POSIX( pthread_mutex_unlock(&HDH_lock) ); if (ret == 0) { HDH_array[idx].pmd_size = permsgdata_size; HDH_array[idx].pmd_init_cb = permsgdata_init_cb; HDH_array[idx].pmd_fini_cb = permsgdata_fini_cb; *new_handle = &HDH_array[idx]; } return ret; } /* Register a new hook callback */ int fd_hook_register ( uint32_t type_mask, void (*fd_hook_cb)(enum fd_hook_type type, struct msg * msg, struct peer_hdr * peer, void * other, struct fd_hook_permsgdata *pmd, void * regdata), void *regdata, struct fd_hook_data_hdl *data_hdl, struct fd_hook_hdl ** handler ) { struct fd_hook_hdl * newhdl = NULL; int i; TRACE_ENTRY("%x %p %p %p %p", type_mask, fd_hook_cb, regdata, data_hdl, handler); CHECK_PARAMS( fd_hook_cb && handler ); CHECK_MALLOC( newhdl = malloc(sizeof(struct fd_hook_hdl)) ); memset(newhdl, 0, sizeof(struct fd_hook_hdl)); newhdl->fd_hook_cb = fd_hook_cb; newhdl->regdata = regdata; newhdl->data_hdl = data_hdl; for (i=0; i <= HOOK_LAST; i++) { fd_list_init(&newhdl->chain[i], newhdl); if (type_mask & (1<chain[i]); CHECK_POSIX( pthread_rwlock_unlock(&HS_array[i].rwlock) ); } } *handler = newhdl; return 0; } /* free this hook callback */ int fd_hook_unregister( struct fd_hook_hdl * handler ) { int i; TRACE_ENTRY("%p", handler); CHECK_PARAMS( handler ); for (i=0; i <= HOOK_LAST; i++) { if ( ! FD_IS_LIST_EMPTY(&handler->chain[i])) { CHECK_POSIX( pthread_rwlock_wrlock(&HS_array[i].rwlock) ); fd_list_unlink(&handler->chain[i]); CHECK_POSIX( pthread_rwlock_unlock(&HS_array[i].rwlock) ); } } free(handler); return 0; } /* callback for the libfdproto to free the data associated with a message */ static void pmdl_free(struct fd_msg_pmdl *pmdl) { /* destroy all the items in the list */ while (!FD_IS_LIST_EMPTY(&pmdl->sentinel)) { struct pmd_list_item * li = (struct pmd_list_item *)(pmdl->sentinel.next); if (li->hdl->pmd_fini_cb) { (*li->hdl->pmd_fini_cb)(&li->pmd); } fd_list_unlink(&li->chain); free(li); } CHECK_POSIX_DO( pthread_mutex_destroy(&pmdl->lock), ); pmdl->sentinel.o = NULL; } /* Save the list of pmd into the message structure, as well as the callback to free this list */ void fd_hook_associate(struct msg * msg, struct fd_msg_pmdl * pmdl) { struct fd_msg_pmdl * in_msg; CHECK_PARAMS_DO( msg && pmdl, return ); in_msg = fd_msg_pmdl_get(msg); ASSERT(in_msg && (in_msg->sentinel.o == NULL)); /* error / already initialized ??? */ in_msg->sentinel.o = pmdl_free; /* Now move all items from the pmdl pointer into the initialized list */ CHECK_POSIX_DO( pthread_mutex_lock(&pmdl->lock), ); fd_list_move_end(&in_msg->sentinel, &pmdl->sentinel); CHECK_POSIX_DO( pthread_mutex_unlock(&pmdl->lock), ); pmdl_free(pmdl); /* We're done */ } /* Return the location of the permsgdata area corresponding to this handle, after eventually having created it. Return NULL in case of failure */ static struct fd_hook_permsgdata * get_or_create_pmd(struct fd_msg_pmdl *pmdl, struct fd_hook_hdl * h) { struct fd_hook_permsgdata * ret = NULL; struct fd_list * li; CHECK_POSIX_DO( pthread_mutex_lock(&pmdl->lock), ); if (pmdl->sentinel.o == NULL) { pmdl->sentinel.o = pmdl_free; } /* Search in the list for an item with the same handle. The list is ordered by this handle */ for (li=pmdl->sentinel.next; li != &pmdl->sentinel; li = li->next) { struct pmd_list_item * pli = (struct pmd_list_item *) li; if (pli->hdl == h->data_hdl) ret = &pli->pmd; if (pli->hdl >= h->data_hdl) break; } if (!ret) { /* we need to create a new one and insert before li */ struct pmd_list_item * pli; CHECK_MALLOC_DO( pli = malloc(sizeof_pmd(h->data_hdl)), ); if (pli) { memset(pli, 0, sizeof_pmd(h->data_hdl)); fd_list_init(&pli->chain, pli); pli->hdl = h->data_hdl; ret = &pli->pmd; if (h->data_hdl->pmd_init_cb) { (*h->data_hdl->pmd_init_cb)(ret); } fd_list_insert_before(li, &pli->chain); } } CHECK_POSIX_DO( pthread_mutex_unlock(&pmdl->lock), ); return ret; } struct fd_hook_permsgdata * fd_hook_get_request_pmd(struct fd_hook_data_hdl *data_hdl, struct msg * answer) { struct msg * qry; struct fd_msg_pmdl *pmdl; struct fd_hook_permsgdata * ret = NULL; struct fd_list * li; CHECK_FCT_DO( fd_msg_answ_getq(answer, &qry), return NULL ); if (!qry) return NULL; pmdl = fd_msg_pmdl_get(qry); if (!pmdl) return NULL; CHECK_POSIX_DO( pthread_mutex_lock(&pmdl->lock), ); /* Search in the list for an item with the same handle. The list is ordered by this handle */ for (li=pmdl->sentinel.next; li != &pmdl->sentinel; li = li->next) { struct pmd_list_item * pli = (struct pmd_list_item *) li; if (pli->hdl == data_hdl) ret = &pli->pmd; if (pli->hdl >= data_hdl) break; } CHECK_POSIX_DO( pthread_mutex_unlock(&pmdl->lock), ); return ret; } /* Create a mask */ uint32_t fd_hook_mask_helper(int dummy, ...) { va_list ap; uint32_t ret = 0; int next; va_start(ap, dummy); while ((next = va_arg(ap, int)) >= 0) { if (next > HOOK_LAST) break; /* invalid parameter */ ret |= (1<next) { struct fd_hook_hdl * h = (struct fd_hook_hdl *)li->o; struct fd_hook_permsgdata * pmd = NULL; /* do we need to handle pmd ? */ if (h->data_hdl && pmdl) { pmd = get_or_create_pmd(pmdl, h); } /* Now, call this callback */ (*h->fd_hook_cb)(type, msg, &peer->p_hdr, other, pmd, h->regdata); } } pthread_cleanup_pop(0); /* done */ CHECK_POSIX_DO( pthread_rwlock_unlock(&HS_array[type].rwlock), ); if (call_default) { CHECK_POSIX_DO( pthread_mutex_lock(&hook_default_mtx), ); pthread_cleanup_push( fd_cleanup_mutex, &hook_default_mtx ); /* There was no registered handler, default behavior for this hook */ switch (type) { case HOOK_DATA_RECEIVED: { struct fd_cnx_rcvdata *rcv_data = other; LOG_A("RCV: %zd bytes", rcv_data->length); break; } case HOOK_MESSAGE_RECEIVED: { CHECK_MALLOC_DO(fd_msg_dump_summary(&hook_default_buf, &hook_default_len, NULL, msg, NULL, 0, 1), break); LOG_D("RCV from '%s': %s", peer ? peer->p_hdr.info.pi_diamid : "", hook_default_buf); break; } case HOOK_MESSAGE_LOCAL: { CHECK_MALLOC_DO(fd_msg_dump_full(&hook_default_buf, &hook_default_len, NULL, msg, NULL, 0, 1), break); LOG_A("Handled to framework for sending: %s", hook_default_buf); break; } case HOOK_MESSAGE_SENDING: { LOG_A("SENDING message to '%s'", peer ? peer->p_hdr.info.pi_diamid : ""); break; } case HOOK_MESSAGE_SENT: { CHECK_MALLOC_DO(fd_msg_dump_summary(&hook_default_buf, &hook_default_len, NULL, msg, NULL, 0, 1), break); LOG_D("SENT to '%s': %s", peer ? peer->p_hdr.info.pi_diamid : "", hook_default_buf); break; } case HOOK_MESSAGE_FAILOVER: { CHECK_MALLOC_DO(fd_msg_dump_summary(&hook_default_buf, &hook_default_len, NULL, msg, NULL, 0, 1), break); LOG_D("Failing over message sent to '%s': %s", peer ? peer->p_hdr.info.pi_diamid : "", hook_default_buf); break; } case HOOK_MESSAGE_PARSING_ERROR: { if (msg) { DiamId_t id = NULL; if (fd_msg_source_get( msg, &id, NULL )) id = (DiamId_t)""; if (!id) id = (DiamId_t)""; CHECK_MALLOC_DO(fd_msg_dump_treeview(&hook_default_buf, &hook_default_len, NULL, msg, NULL, 0, 1), break); LOG_E("Parsing error: '%s' for the following message received from '%s':", (char *)other, (char *)id); LOG_SPLIT(FD_LOG_ERROR, " ", hook_default_buf, NULL); } else { struct fd_cnx_rcvdata *rcv_data = other; CHECK_MALLOC_DO(fd_dump_extend_hexdump(&hook_default_buf, &hook_default_len, NULL, rcv_data->buffer, rcv_data->length, 0, 0), break); LOG_E("Parsing error: cannot parse %zdB buffer from '%s': %s", rcv_data->length, peer ? peer->p_hdr.info.pi_diamid : "", hook_default_buf); } break; } case HOOK_MESSAGE_PARSING_ERROR2: { CHECK_MALLOC_DO(fd_msg_dump_treeview(&hook_default_buf, &hook_default_len, NULL, msg, NULL, 0, 1), break); LOG_E("Returning following message after parsing error:"); LOG_SPLIT(FD_LOG_ERROR, " ", hook_default_buf, NULL); break; } case HOOK_MESSAGE_ROUTING_ERROR: { CHECK_MALLOC_DO(fd_msg_dump_treeview(&hook_default_buf, &hook_default_len, NULL, msg, NULL, 0, 1), break); LOG_E("Routing error: '%s' for the following message:", (char *)other); LOG_SPLIT(FD_LOG_ERROR, " ", hook_default_buf, NULL); break; } case HOOK_MESSAGE_ROUTING_FORWARD: { CHECK_MALLOC_DO(fd_msg_dump_summary(&hook_default_buf, &hook_default_len, NULL, msg, NULL, 0, 1), break); LOG_D("FORWARDING: %s", hook_default_buf); break; } case HOOK_MESSAGE_ROUTING_LOCAL: { CHECK_MALLOC_DO(fd_msg_dump_summary(&hook_default_buf, &hook_default_len, NULL, msg, NULL, 0, 1), break); LOG_D("DISPATCHING: %s", hook_default_buf); break; } case HOOK_MESSAGE_DROPPED: { CHECK_MALLOC_DO(fd_msg_dump_treeview(&hook_default_buf, &hook_default_len, NULL, msg, NULL, 0, 1), break); LOG_E("Message discarded ('%s'):", (char *)other); LOG_SPLIT(FD_LOG_ERROR, " ", hook_default_buf, NULL); break; } case HOOK_PEER_CONNECT_FAILED: { if (msg) { CHECK_MALLOC_DO(fd_msg_dump_full(&hook_default_buf, &hook_default_len, NULL, msg, NULL, 0, 1), break); LOG_N("Connection to '%s' failed: '%s'; CER/CEA dump:", peer ? peer->p_hdr.info.pi_diamid : "", (char *)other); LOG_SPLIT(FD_LOG_NOTICE, " ", hook_default_buf, NULL); } else { LOG_D("Connection to '%s' failed: %s", peer ? peer->p_hdr.info.pi_diamid : "", (char *)other); } break; } case HOOK_PEER_CONNECT_SUCCESS: { DiamId_t id = NULL; if ((!fd_msg_source_get( msg, &id, NULL )) && (id == NULL)) { /* The CEA is locally issued */ fd_msg_answ_getq(msg, &msg); /* We dump the CER in that case */ } CHECK_MALLOC_DO(fd_msg_dump_full(&hook_default_buf, &hook_default_len, NULL, msg, NULL, 0, 1), break); char protobuf[40]; if (peer) { CHECK_FCT_DO(fd_peer_cnx_proto_info(&peer->p_hdr, protobuf, sizeof(protobuf)), break ); } else { protobuf[0] = '-'; protobuf[1] = '\0'; } LOG_N("Connected to '%s' (%s), remote capabilities: ", peer ? peer->p_hdr.info.pi_diamid : "", protobuf); LOG_SPLIT(FD_LOG_NOTICE, " ", hook_default_buf, NULL); break; } } pthread_cleanup_pop(0); CHECK_POSIX_DO( pthread_mutex_unlock(&hook_default_mtx), ); } } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/messages.c000066400000000000000000000374211333553357400227660ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2015, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" static struct dict_object * dict_avp_SI = NULL; /* Session-Id */ static struct dict_object * dict_avp_OH = NULL; /* Origin-Host */ static struct dict_object * dict_avp_OR = NULL; /* Origin-Realm */ static struct dict_object * dict_avp_EM = NULL; /* Error-Message */ static struct dict_object * dict_avp_ERH = NULL; /* Error-Reporting-Host */ static struct dict_object * dict_avp_FAVP= NULL; /* Failed-AVP */ static struct dict_object * dict_avp_RC = NULL; /* Result-Code */ struct dict_object * fd_dict_avp_OSI = NULL; /* Origin-State-Id */ struct dict_object * fd_dict_cmd_CER = NULL; /* Capabilities-Exchange-Request */ struct dict_object * fd_dict_cmd_DWR = NULL; /* Device-Watchdog-Request */ struct dict_object * fd_dict_avp_DC = NULL; /* Disconnect-Cause */ struct dict_object * fd_dict_cmd_DPR = NULL; /* Disconnect-Peer-Request */ /* Resolve the dictionary objects */ int fd_msg_init(void) { TRACE_ENTRY(""); /* Initialize the dictionary objects that we may use frequently */ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Session-Id", &dict_avp_SI , ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Host", &dict_avp_OH , ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Realm", &dict_avp_OR , ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-State-Id", &fd_dict_avp_OSI , ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Result-Code", &dict_avp_RC , ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Error-Message", &dict_avp_EM , ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Error-Reporting-Host", &dict_avp_ERH , ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Failed-AVP", &dict_avp_FAVP, ENOENT) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Disconnect-Cause", &fd_dict_avp_DC , ENOENT) ); CHECK_FCT( fd_dict_search ( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Capabilities-Exchange-Request", &fd_dict_cmd_CER, ENOENT ) ); CHECK_FCT( fd_dict_search ( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Device-Watchdog-Request", &fd_dict_cmd_DWR, ENOENT ) ); CHECK_FCT( fd_dict_search ( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Disconnect-Peer-Request", &fd_dict_cmd_DPR, ENOENT ) ); return 0; } /* Add Origin-Host, Origin-Realm, Origin-State-Id AVPS at the end of the message */ int fd_msg_add_origin ( struct msg * msg, int osi ) { union avp_value val; struct avp * avp_OH = NULL; struct avp * avp_OR = NULL; struct avp * avp_OSI = NULL; TRACE_ENTRY("%p", msg); CHECK_PARAMS( msg ); /* Create the Origin-Host AVP */ CHECK_FCT( fd_msg_avp_new( dict_avp_OH, 0, &avp_OH ) ); /* Set its value */ memset(&val, 0, sizeof(val)); val.os.data = (os0_t)fd_g_config->cnf_diamid; val.os.len = fd_g_config->cnf_diamid_len; CHECK_FCT( fd_msg_avp_setvalue( avp_OH, &val ) ); /* Add it to the message */ CHECK_FCT( fd_msg_avp_add( msg, MSG_BRW_LAST_CHILD, avp_OH ) ); /* Create the Origin-Realm AVP */ CHECK_FCT( fd_msg_avp_new( dict_avp_OR, 0, &avp_OR ) ); /* Set its value */ memset(&val, 0, sizeof(val)); val.os.data = (os0_t)fd_g_config->cnf_diamrlm; val.os.len = fd_g_config->cnf_diamrlm_len; CHECK_FCT( fd_msg_avp_setvalue( avp_OR, &val ) ); /* Add it to the message */ CHECK_FCT( fd_msg_avp_add( msg, MSG_BRW_LAST_CHILD, avp_OR ) ); if (osi) { /* Create the Origin-State-Id AVP */ CHECK_FCT( fd_msg_avp_new( fd_dict_avp_OSI, 0, &avp_OSI ) ); /* Set its value */ memset(&val, 0, sizeof(val)); val.u32 = fd_g_config->cnf_orstateid; CHECK_FCT( fd_msg_avp_setvalue( avp_OSI, &val ) ); /* Add it to the message */ CHECK_FCT( fd_msg_avp_add( msg, MSG_BRW_LAST_CHILD, avp_OSI ) ); } return 0; } /* Create a new Session-Id and add at the beginning of the message. */ int fd_msg_new_session( struct msg * msg, os0_t opt, size_t optlen ) { union avp_value val; struct avp * avp = NULL; struct session * sess = NULL; os0_t sid; size_t sidlen; TRACE_ENTRY("%p %p %zd", msg, opt, optlen); CHECK_PARAMS( msg ); /* Check there is not already a session in the message */ CHECK_FCT( fd_msg_sess_get(fd_g_config->cnf_dict, msg, &sess, NULL) ); CHECK_PARAMS( sess == NULL ); /* Ok, now create the session */ CHECK_FCT( fd_sess_new ( &sess, fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len, opt, optlen ) ); CHECK_FCT( fd_sess_getsid( sess, &sid, &sidlen) ); /* Create an AVP to hold it */ CHECK_FCT( fd_msg_avp_new( dict_avp_SI, 0, &avp ) ); /* Set its value */ memset(&val, 0, sizeof(val)); val.os.data = sid; val.os.len = sidlen; CHECK_FCT( fd_msg_avp_setvalue( avp, &val ) ); /* Add it to the message */ CHECK_FCT( fd_msg_avp_add( msg, MSG_BRW_FIRST_CHILD, avp ) ); /* Save the session associated with the message */ CHECK_FCT( fd_msg_sess_set( msg, sess) ); /* Done! */ return 0; } /* Add Result-Code and eventually Failed-AVP, Error-Message and Error-Reporting-Host AVPs */ int fd_msg_rescode_set( struct msg * msg, char * rescode, char * errormsg, struct avp * optavp, int type_id ) { union avp_value val; struct avp * avp_RC = NULL; struct avp * avp_EM = NULL; struct avp * avp_ERH = NULL; struct avp * avp_FAVP= NULL; uint32_t rc_val = 0; int set_e_bit=0; int std_err_msg=0; TRACE_ENTRY("%p %s %p %p %d", msg, rescode, errormsg, optavp, type_id); CHECK_PARAMS( msg && rescode ); /* Find the enum value corresponding to the rescode string, this will give the class of error */ { struct dict_object * enum_obj = NULL; struct dict_enumval_request req; memset(&req, 0, sizeof(struct dict_enumval_request)); /* First, get the enumerated type of the Result-Code AVP (this is fast, no need to cache the object) */ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_TYPE, TYPE_OF_AVP, dict_avp_RC, &(req.type_obj), ENOENT ) ); /* Now search for the value given as parameter */ req.search.enum_name = rescode; CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_ENUMVAL, ENUMVAL_BY_STRUCT, &req, &enum_obj, ENOTSUP) ); /* finally retrieve its data */ CHECK_FCT_DO( fd_dict_getval( enum_obj, &(req.search) ), return EINVAL ); /* copy the found value, we're done */ rc_val = req.search.enum_value.u32; } if (type_id == 1) { /* Add the Origin-Host and Origin-Realm AVP */ CHECK_FCT( fd_msg_add_origin ( msg, 0 ) ); } /* Create the Result-Code AVP */ CHECK_FCT( fd_msg_avp_new( dict_avp_RC, 0, &avp_RC ) ); /* Set its value */ memset(&val, 0, sizeof(val)); val.u32 = rc_val; CHECK_FCT( fd_msg_avp_setvalue( avp_RC, &val ) ); /* Add it to the message */ CHECK_FCT( fd_msg_avp_add( msg, MSG_BRW_LAST_CHILD, avp_RC ) ); if (type_id == 2) { /* Add the Error-Reporting-Host AVP */ CHECK_FCT( fd_msg_avp_new( dict_avp_ERH, 0, &avp_ERH ) ); /* Set its value */ memset(&val, 0, sizeof(val)); val.os.data = (uint8_t *)fd_g_config->cnf_diamid; val.os.len = fd_g_config->cnf_diamid_len; CHECK_FCT( fd_msg_avp_setvalue( avp_ERH, &val ) ); /* Add it to the message */ CHECK_FCT( fd_msg_avp_add( msg, MSG_BRW_LAST_CHILD, avp_ERH ) ); } /* Now add the optavp in a FailedAVP if provided */ if (optavp) { struct avp * optavp_cpy = NULL; struct avp_hdr *opt_hdr, *optcpy_hdr; struct dict_object * opt_model = NULL; int is_grouped = 0; /* Create the Failed-AVP AVP */ CHECK_FCT( fd_msg_avp_new( dict_avp_FAVP, 0, &avp_FAVP ) ); /* Was this AVP a grouped one? Best effort only here */ if (!fd_msg_model ( optavp, &opt_model ) && (opt_model != NULL)) { struct dict_avp_data dictdata; CHECK_FCT( fd_dict_getval(opt_model, &dictdata) ); if (dictdata.avp_basetype == AVP_TYPE_GROUPED) is_grouped = 1; } /* Create a new AVP with a copy of the data of the invalid or missing AVP */ optavp_cpy = optavp; if (is_grouped) { CHECK_FCT( fd_msg_avp_new( opt_model, 0, &optavp_cpy) ); } else { CHECK_FCT( fd_msg_avp_new( NULL, AVPFL_SET_BLANK_VALUE | AVPFL_SET_RAWDATA_FROM_AVP, &optavp_cpy) ); CHECK_FCT( fd_msg_avp_hdr(optavp, &opt_hdr) ); CHECK_FCT( fd_msg_avp_hdr(optavp_cpy, &optcpy_hdr) ); memcpy(optcpy_hdr, opt_hdr, sizeof(struct avp_hdr)); } /* Add the passed AVP inside it */ CHECK_FCT( fd_msg_avp_add( avp_FAVP, MSG_BRW_LAST_CHILD, optavp_cpy ) ); /* And add to the message */ CHECK_FCT( fd_msg_avp_add( msg, MSG_BRW_LAST_CHILD, avp_FAVP ) ); } /* Deal with the 'E' bit and the error message */ switch (rc_val / 1000) { case 1: /* Informational */ case 2: /* Success */ /* Nothing special here: no E bit, no error message unless one is specified */ break; case 3: /* Protocol Errors */ set_e_bit = 1; std_err_msg = 1; break; case 4: /* Transcient Failure */ case 5: /* Permanent Failure */ default: std_err_msg = 1; break; } { struct msg_hdr * hdr = NULL; CHECK_FCT( fd_msg_hdr( msg, &hdr ) ); if (set_e_bit) hdr->msg_flags |= CMD_FLAG_ERROR; else hdr->msg_flags &= ~ CMD_FLAG_ERROR; } if (std_err_msg || errormsg) { /* Add the Error-Message AVP */ CHECK_FCT( fd_msg_avp_new( dict_avp_EM, 0, &avp_EM ) ); /* Set its value */ memset(&val, 0, sizeof(val)); if (errormsg) { val.os.data = (uint8_t *)errormsg; val.os.len = strlen(errormsg); } else { val.os.data = (uint8_t *)rescode; val.os.len = strlen(rescode); } CHECK_FCT( fd_msg_avp_setvalue( avp_EM, &val ) ); /* Add it to the message */ CHECK_FCT( fd_msg_avp_add( msg, MSG_BRW_LAST_CHILD, avp_EM ) ); } return 0; } static int fd_msg_send_int( struct msg ** pmsg, void (*anscb)(void *, struct msg **), void * data, void (*expirecb)(void *, DiamId_t, size_t, struct msg **), const struct timespec *timeout ) { struct msg_hdr *hdr; DiamId_t diamid; /* Save the callback in the message, with the timeout */ CHECK_FCT( fd_msg_anscb_associate( *pmsg, anscb, data, expirecb, timeout ) ); /* If this is a new request, call the HOOK_MESSAGE_LOCAL hook */ if ( (fd_msg_hdr(*pmsg, &hdr) == 0) && (hdr->msg_flags & CMD_FLAG_REQUEST) && (fd_msg_source_get(*pmsg, &diamid, NULL) == 0) && (diamid == NULL)) { fd_hook_call(HOOK_MESSAGE_LOCAL, *pmsg, NULL, NULL, fd_msg_pmdl_get(*pmsg)); } /* Post the message in the outgoing queue */ CHECK_FCT( fd_fifo_post(fd_g_outgoing, pmsg) ); return 0; } /* Send a message and optionally register a callback for an answer */ int fd_msg_send ( struct msg ** pmsg, void (*anscb)(void *, struct msg **), void * data ) { TRACE_ENTRY("%p %p %p", pmsg, anscb, data); CHECK_PARAMS( pmsg ); return fd_msg_send_int(pmsg, anscb, data, NULL, NULL); } /* The variation of the same function with a timeout callback */ int fd_msg_send_timeout ( struct msg ** pmsg, void (*anscb)(void *, struct msg **), void * data, void (*expirecb)(void *, DiamId_t, size_t, struct msg **), const struct timespec *timeout ) { TRACE_ENTRY("%p %p %p %p %p", pmsg, anscb, data, expirecb, timeout); CHECK_PARAMS( pmsg && expirecb && timeout ); return fd_msg_send_int(pmsg, anscb, data, expirecb, timeout); } /* Parse a message against our dictionary, and in case of error log and eventually build the error reply -- returns the parsing status */ int fd_msg_parse_or_error( struct msg ** msg, struct msg **error) { int ret = 0; struct msg * m; struct msg_hdr * hdr = NULL; struct fd_pei pei; TRACE_ENTRY("%p", msg); CHECK_PARAMS(msg && *msg && error); m = *msg; *error = NULL; /* Parse the message against our dictionary */ ret = fd_msg_parse_rules ( m, fd_g_config->cnf_dict, &pei); if ((ret != EBADMSG) /* Parsing grouped AVP failed / Conflicting rule found */ && (ret != ENOTSUP)) /* Command is not supported / Mandatory AVP is not supported */ return ret; /* 0 or another error */ /* Log */ fd_hook_call(HOOK_MESSAGE_PARSING_ERROR, m, NULL, pei.pei_message ?: pei.pei_errcode, fd_msg_pmdl_get(m)); CHECK_FCT( fd_msg_hdr(m, &hdr) ); /* Now create an answer error if the message is a query */ if (hdr->msg_flags & CMD_FLAG_REQUEST) { /* Create the error message */ CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, &m, pei.pei_protoerr ? MSGFL_ANSW_ERROR : 0 ) ); /* Set the error code */ CHECK_FCT( fd_msg_rescode_set(m, pei.pei_errcode, pei.pei_message, pei.pei_avp, 1 ) ); /* free the pei AVP to avoid memory leak */ if (pei.pei_avp_free) { fd_msg_free(pei.pei_avp); } *msg = NULL; *error = m; } else { do { /* Rescue error messages */ struct avp * avp; union avp_value * rc = NULL; /* Search the Result-Code AVP */ CHECK_FCT_DO( fd_msg_browse(*msg, MSG_BRW_FIRST_CHILD, &avp, NULL), break ); while (avp) { struct avp_hdr * ahdr; CHECK_FCT_DO( fd_msg_avp_hdr( avp, &ahdr ), break ); if ((ahdr->avp_code == AC_RESULT_CODE) && (! (ahdr->avp_flags & AVP_FLAG_VENDOR)) ) { /* Parse this AVP */ ASSERT( ahdr->avp_value ); rc = ahdr->avp_value; break; } /* Go to next AVP */ CHECK_FCT_DO( fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL), break ); } if (rc) { switch (rc->u32 / 1000) { case 1: /* 1xxx : Informational */ case 2: /* 2xxx : Sucess */ /* In these cases, we want the message to validate the ABNF, so we will discard the bad message */ break; default: /* Other errors */ /* We let the application decide what to do with the message, we rescue it */ *error = m; } } } while (0); } return EBADMSG; /* We convert ENOTSUP to EBADMSG as well */ } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/p_ce.c000066400000000000000000001200421333553357400220550ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2015, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" /* This file contains code to handle Capabilities Exchange messages (CER and CEA) and election process */ /* Save a connection as peer's principal */ static int set_peer_cnx(struct fd_peer * peer, struct cnxctx **cnx) { CHECK_PARAMS( peer->p_cnxctx == NULL ); /* Save the connection in peer */ peer->p_cnxctx = *cnx; *cnx = NULL; /* Set the events to be sent to the PSM */ CHECK_FCT( fd_cnx_recv_setaltfifo(peer->p_cnxctx, peer->p_events) ); /* Read the credentials if possible */ if (fd_cnx_getTLS(peer->p_cnxctx)) { CHECK_FCT( fd_cnx_getcred(peer->p_cnxctx, &peer->p_hdr.info.runtime.pir_cert_list, &peer->p_hdr.info.runtime.pir_cert_list_size) ); } /* Read the endpoints, maybe used to reconnect to the peer later */ CHECK_FCT( fd_cnx_getremoteeps(peer->p_cnxctx, &peer->p_hdr.info.pi_endpoints) ); /* Read the protocol */ peer->p_hdr.info.runtime.pir_proto = fd_cnx_getproto(peer->p_cnxctx); return 0; } /* Delete the peer connection, and cleanup associated information */ void fd_p_ce_clear_cnx(struct fd_peer * peer, struct cnxctx ** cnx_kept) { peer->p_hdr.info.runtime.pir_cert_list = NULL; peer->p_hdr.info.runtime.pir_cert_list_size = 0; peer->p_hdr.info.runtime.pir_proto = 0; if (peer->p_cnxctx) { if (cnx_kept != NULL) { *cnx_kept = peer->p_cnxctx; } else { fd_cnx_destroy(peer->p_cnxctx); } peer->p_cnxctx = NULL; } } /* Election: compare the Diameter Ids by lexical order, return true if the election is won */ static __inline__ int election_result(struct fd_peer * peer) { int ret = (strcasecmp(peer->p_hdr.info.pi_diamid, fd_g_config->cnf_diamid) < 0); if (ret) { TRACE_DEBUG(INFO, "Election WON against peer '%s'", peer->p_hdr.info.pi_diamid); } else { TRACE_DEBUG(INFO, "Election LOST against peer '%s'", peer->p_hdr.info.pi_diamid); } return ret; } /* Add AVPs about local information in a CER or CEA */ static int add_CE_info(struct msg *msg, struct cnxctx * cnx, int isi_tls, int isi_none) { struct dict_object * dictobj = NULL; struct avp * avp = NULL; union avp_value val; struct fd_list *li; /* Add the Origin-* AVPs */ CHECK_FCT( fd_msg_add_origin ( msg, 1 ) ); /* Find the model for Host-IP-Address AVP */ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Host-IP-Address", &dictobj, ENOENT ) ); /* Add the AVP(s) -- not sure what is the purpose... We could probably only add the primary one ? */ for (li = fd_g_config->cnf_endpoints.next; li != &fd_g_config->cnf_endpoints; li = li->next) { struct fd_endpoint * ep = (struct fd_endpoint *)li; CHECK_FCT( fd_msg_avp_new ( dictobj, 0, &avp ) ); CHECK_FCT( fd_msg_avp_value_encode ( &ep->ss, avp ) ); CHECK_FCT( fd_msg_avp_add( msg, MSG_BRW_LAST_CHILD, avp ) ); } /* Vendor-Id, Product-Name, and Firmware-Revision AVPs */ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Vendor-Id", &dictobj, ENOENT ) ); CHECK_FCT( fd_msg_avp_new ( dictobj, 0, &avp ) ); val.u32 = MY_VENDOR_ID; CHECK_FCT( fd_msg_avp_setvalue( avp, &val ) ); CHECK_FCT( fd_msg_avp_add( msg, MSG_BRW_LAST_CHILD, avp ) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Product-Name", &dictobj, ENOENT ) ); CHECK_FCT( fd_msg_avp_new ( dictobj, 0, &avp ) ); val.os.data = (unsigned char *)FD_PROJECT_NAME; val.os.len = strlen(FD_PROJECT_NAME); CHECK_FCT( fd_msg_avp_setvalue( avp, &val ) ); CHECK_FCT( fd_msg_avp_add( msg, MSG_BRW_LAST_CHILD, avp ) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Firmware-Revision", &dictobj, ENOENT ) ); CHECK_FCT( fd_msg_avp_new ( dictobj, 0, &avp ) ); val.u32 = (uint32_t)(FD_PROJECT_VERSION_MAJOR * 10000 + FD_PROJECT_VERSION_MINOR * 100 + FD_PROJECT_VERSION_REV); CHECK_FCT( fd_msg_avp_setvalue( avp, &val ) ); CHECK_FCT( fd_msg_avp_add( msg, MSG_BRW_LAST_CHILD, avp ) ); /* Add the Inband-Security-Id AVP if needed */ if (isi_tls || isi_none) { CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Inband-Security-Id", &dictobj, ENOENT ) ); if (isi_none) { CHECK_FCT( fd_msg_avp_new ( dictobj, 0, &avp ) ); val.u32 = ACV_ISI_NO_INBAND_SECURITY; CHECK_FCT( fd_msg_avp_setvalue( avp, &val ) ); CHECK_FCT( fd_msg_avp_add( msg, MSG_BRW_LAST_CHILD, avp ) ); } if (isi_tls) { CHECK_FCT( fd_msg_avp_new ( dictobj, 0, &avp ) ); val.u32 = ACV_ISI_TLS; CHECK_FCT( fd_msg_avp_setvalue( avp, &val ) ); CHECK_FCT( fd_msg_avp_add( msg, MSG_BRW_LAST_CHILD, avp ) ); } } /* List of local applications */ { struct dict_object * dictobj_auth = NULL; struct dict_object * dictobj_acct = NULL; struct dict_object * dictobj_vid = NULL; CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Vendor-Specific-Application-Id", &dictobj, ENOENT ) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Vendor-Id", &dictobj_vid, ENOENT ) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Auth-Application-Id", &dictobj_auth, ENOENT ) ); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Acct-Application-Id", &dictobj_acct, ENOENT ) ); for (li = fd_g_config->cnf_apps.next; li != &fd_g_config->cnf_apps; li = li->next) { struct fd_app * a = (struct fd_app *)(li); if (a->flags.auth) { CHECK_FCT( fd_msg_avp_new ( dictobj_auth, 0, &avp ) ); val.u32 = a->appid; CHECK_FCT( fd_msg_avp_setvalue( avp, &val ) ); if (a->vndid != 0) { struct avp * avp2 = NULL; CHECK_FCT( fd_msg_avp_new ( dictobj, 0, &avp2 ) ); CHECK_FCT( fd_msg_avp_add( avp2, MSG_BRW_LAST_CHILD, avp ) ); avp = avp2; CHECK_FCT( fd_msg_avp_new ( dictobj_vid, 0, &avp2 ) ); val.u32 = a->vndid; CHECK_FCT( fd_msg_avp_setvalue( avp2, &val ) ); CHECK_FCT( fd_msg_avp_add( avp, MSG_BRW_LAST_CHILD, avp2 ) ); } CHECK_FCT( fd_msg_avp_add( msg, MSG_BRW_LAST_CHILD, avp ) ); } if (a->flags.acct) { CHECK_FCT( fd_msg_avp_new ( dictobj_acct, 0, &avp ) ); val.u32 = a->appid; CHECK_FCT( fd_msg_avp_setvalue( avp, &val ) ); if (a->vndid != 0) { struct avp * avp2 = NULL; CHECK_FCT( fd_msg_avp_new ( dictobj, 0, &avp2 ) ); CHECK_FCT( fd_msg_avp_add( avp2, MSG_BRW_LAST_CHILD, avp ) ); avp = avp2; CHECK_FCT( fd_msg_avp_new ( dictobj_vid, 0, &avp2 ) ); val.u32 = a->vndid; CHECK_FCT( fd_msg_avp_setvalue( avp2, &val ) ); CHECK_FCT( fd_msg_avp_add( avp, MSG_BRW_LAST_CHILD, avp2 ) ); } CHECK_FCT( fd_msg_avp_add( msg, MSG_BRW_LAST_CHILD, avp ) ); } } /* do not forget the relay application */ if (! fd_g_config->cnf_flags.no_fwd) { CHECK_FCT( fd_msg_avp_new ( dictobj_auth, 0, &avp ) ); val.u32 = AI_RELAY; CHECK_FCT( fd_msg_avp_setvalue( avp, &val ) ); CHECK_FCT( fd_msg_avp_add( msg, MSG_BRW_LAST_CHILD, avp ) ); } } /* Add the list of supported vendors */ { uint32_t * array = fd_dict_get_vendorid_list(fd_g_config->cnf_dict); if (array) { int i = 0; CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Supported-Vendor-Id", &dictobj, ENOENT ) ); while (array[i] != 0) { CHECK_FCT( fd_msg_avp_new ( dictobj, 0, &avp ) ); val.u32 = array[i]; CHECK_FCT( fd_msg_avp_setvalue( avp, &val ) ); CHECK_FCT( fd_msg_avp_add( msg, MSG_BRW_LAST_CHILD, avp ) ); i++; } free(array); } } return 0; } /* Remove any information saved from a previous CER/CEA exchange */ static void cleanup_remote_CE_info(struct fd_peer * peer) { /* free linked information */ free(peer->p_hdr.info.runtime.pir_realm); free(peer->p_hdr.info.runtime.pir_prodname); while (!FD_IS_LIST_EMPTY(&peer->p_hdr.info.runtime.pir_apps)) { struct fd_list * li = peer->p_hdr.info.runtime.pir_apps.next; fd_list_unlink(li); free(li); } /* note: pir_cert_list needs not be freed (belongs to gnutls) */ /* cleanup the area */ memset(&peer->p_hdr.info.runtime, 0, sizeof(peer->p_hdr.info.runtime)); /* reinit the list */ fd_list_init(&peer->p_hdr.info.runtime.pir_apps, peer); /* Remove previously advertised endpoints */ fd_ep_clearflags( &peer->p_hdr.info.pi_endpoints, EP_FL_ADV ); } /* Extract information sent by the remote peer and save it in our peer structure */ static int save_remote_CE_info(struct msg * msg, struct fd_peer * peer, struct fd_pei * error, uint32_t *rc) { struct avp * avp = NULL; cleanup_remote_CE_info(peer); CHECK_FCT( fd_msg_browse( msg, MSG_BRW_FIRST_CHILD, &avp, NULL) ); /* Loop on all AVPs and save what we are interrested into */ while (avp) { struct avp_hdr * hdr; CHECK_FCT( fd_msg_avp_hdr( avp, &hdr ) ); if (hdr->avp_flags & AVP_FLAG_VENDOR) { /* Ignore all vendor-specific AVPs in CER/CEA because we don't support any currently */ LOG_A("Ignored a vendor-specific AVP in CER / CEA"); goto next; } switch (hdr->avp_code) { case AC_RESULT_CODE: /* Result-Code */ if (hdr->avp_value == NULL) { /* This is a sanity check */ LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); ASSERT(0); /* To check if this really happens, and understand why... */ goto next; } if (rc) *rc = hdr->avp_value->u32; break; case AC_ORIGIN_HOST: /* Origin-Host */ if (hdr->avp_value == NULL) { /* This is a sanity check */ LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); ASSERT(0); /* To check if this really happens, and understand why... */ goto next; } /* We check that the value matches what we know, otherwise disconnect the peer */ if (fd_os_almostcasesrch(hdr->avp_value->os.data, hdr->avp_value->os.len, peer->p_hdr.info.pi_diamid, peer->p_hdr.info.pi_diamidlen, NULL)) { TRACE_DEBUG(INFO, "Received a message with Origin-Host set to '%.*s' while expecting '%s'", (int)hdr->avp_value->os.len, hdr->avp_value->os.data, peer->p_hdr.info.pi_diamid); error->pei_errcode = "DIAMETER_AVP_NOT_ALLOWED"; error->pei_message = "Your Origin-Host value does not match my configuration."; error->pei_avp = avp; return EINVAL; } break; case AC_ORIGIN_REALM: /* Origin-Realm */ if (hdr->avp_value == NULL) { /* This is a sanity check */ LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); ASSERT(0); /* To check if this really happens, and understand why... */ goto next; } /* In case of multiple AVPs */ if (peer->p_hdr.info.runtime.pir_realm) { TRACE_DEBUG(INFO, "Multiple instances of the Origin-Realm AVP"); error->pei_errcode = "DIAMETER_AVP_OCCURS_TOO_MANY_TIMES"; error->pei_message = "I found several Origin-Realm AVPs"; error->pei_avp = avp; return EINVAL; } /* If the octet string contains a \0 */ if (!fd_os_is_valid_DiameterIdentity(hdr->avp_value->os.data, hdr->avp_value->os.len)) { error->pei_errcode = "DIAMETER_INVALID_AVP_VALUE"; error->pei_message = "Your Origin-Realm contains invalid characters."; error->pei_avp = avp; return EINVAL; } /* Save the value */ CHECK_MALLOC( peer->p_hdr.info.runtime.pir_realm = os0dup( hdr->avp_value->os.data, hdr->avp_value->os.len ) ); peer->p_hdr.info.runtime.pir_realmlen = hdr->avp_value->os.len; break; case AC_HOST_IP_ADDRESS: /* Host-IP-Address */ if (hdr->avp_value == NULL) { /* This is a sanity check */ LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); ASSERT(0); /* To check if this really happens, and understand why... */ goto next; } { sSS ss; /* Get the sockaddr value */ memset(&ss, 0, sizeof(ss)); CHECK_FCT_DO( fd_msg_avp_value_interpret( avp, &ss), { /* in case of error, assume the AVP value was wrong */ error->pei_errcode = "DIAMETER_INVALID_AVP_VALUE"; error->pei_avp = avp; return EINVAL; } ); /* Save this endpoint in the list as advertized */ CHECK_FCT( fd_ep_add_merge( &peer->p_hdr.info.pi_endpoints, (sSA *)&ss, sizeof(sSS), EP_FL_ADV ) ); } break; case AC_VENDOR_ID: /* Vendor-Id */ if (hdr->avp_value == NULL) { /* This is a sanity check */ LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); ASSERT(0); /* To check if this really happens, and understand why... */ goto next; } /* In case of multiple AVPs */ if (peer->p_hdr.info.runtime.pir_vendorid) { TRACE_DEBUG(INFO, "Multiple instances of the Vendor-Id AVP"); error->pei_errcode = "DIAMETER_AVP_OCCURS_TOO_MANY_TIMES"; error->pei_message = "I found several Vendor-Id AVPs"; error->pei_avp = avp; return EINVAL; } peer->p_hdr.info.runtime.pir_vendorid = hdr->avp_value->u32; break; case AC_PRODUCT_NAME: /* Product-Name */ if (hdr->avp_value == NULL) { /* This is a sanity check */ LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); ASSERT(0); /* To check if this really happens, and understand why... */ goto next; } /* In case of multiple AVPs */ if (peer->p_hdr.info.runtime.pir_prodname) { TRACE_DEBUG(INFO, "Multiple instances of the Product-Name AVP"); error->pei_errcode = "DIAMETER_AVP_OCCURS_TOO_MANY_TIMES"; error->pei_message = "I found several Product-Name AVPs"; error->pei_avp = avp; return EINVAL; } CHECK_MALLOC( peer->p_hdr.info.runtime.pir_prodname = calloc( hdr->avp_value->os.len + 1, 1 ) ); memcpy(peer->p_hdr.info.runtime.pir_prodname, hdr->avp_value->os.data, hdr->avp_value->os.len); break; case AC_ORIGIN_STATE_ID: /* Origin-State-Id */ if (hdr->avp_value == NULL) { /* This is a sanity check */ LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); ASSERT(0); /* To check if this really happens, and understand why... */ goto next; } /* In case of multiple AVPs */ if (peer->p_hdr.info.runtime.pir_orstate) { TRACE_DEBUG(INFO, "Multiple instances of the Origin-State-Id AVP"); error->pei_errcode = "DIAMETER_AVP_OCCURS_TOO_MANY_TIMES"; error->pei_message = "I found several Origin-State-Id AVPs"; error->pei_avp = avp; return EINVAL; } peer->p_hdr.info.runtime.pir_orstate = hdr->avp_value->u32; break; case AC_SUPPORTED_VENDOR_ID: /* Supported-Vendor-Id */ if (hdr->avp_value == NULL) { /* This is a sanity check */ LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); ASSERT(0); /* To check if this really happens, and understand why... */ goto next; } TRACE_DEBUG(FULL, "'%s' claims support for a subset of vendor %d features.", peer->p_hdr.info.pi_diamid, hdr->avp_value->u32); /* not that it makes a difference for us... -- if an application actually needs this info, we could save it somewhere. */ break; case AC_VENDOR_SPECIFIC_APPLICATION_ID: /* Vendor-Specific-Application-Id (grouped)*/ { struct avp * inavp = NULL; vendor_id_t vid = 0; application_id_t auth_aid = 0; application_id_t acct_aid = 0; int invalid=0; /* get the first child AVP */ CHECK_FCT( fd_msg_browse(avp, MSG_BRW_FIRST_CHILD, &inavp, NULL) ); while (inavp) { struct avp_hdr * inhdr; CHECK_FCT( fd_msg_avp_hdr( inavp, &inhdr ) ); if (inhdr->avp_flags & AVP_FLAG_VENDOR) { LOG_A("Ignored a vendor AVP inside Vendor-Specific-Application-Id AVP"); goto innext; } if (inhdr->avp_value == NULL) { /* This is a sanity check */ LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); ASSERT(0); /* To check if this really happens, and understand why... */ goto innext; } switch (inhdr->avp_code) { case AC_VENDOR_ID: /* Vendor-Id */ #ifndef WORKAROUND_ACCEPT_INVALID_VSAI if (vid != 0) invalid++; /* We already had one such AVP. This is invalid according to RFC6733 but not RFC3588 (but there is an erratum) */ #endif /* WORKAROUND_ACCEPT_INVALID_VSAI */ vid = inhdr->avp_value->u32; break; case AC_AUTH_APPLICATION_ID: /* Auth-Application-Id */ if (auth_aid != 0) invalid++; /* We already had one such AVP */ #ifndef WORKAROUND_ACCEPT_INVALID_VSAI if (acct_aid != 0) invalid++; /* Only 1 *-Application-Id AVP is allowed */ #endif /* WORKAROUND_ACCEPT_INVALID_VSAI */ auth_aid = inhdr->avp_value->u32; break; case AC_ACCT_APPLICATION_ID: /* Acct-Application-Id */ if (acct_aid != 0) invalid++; /* We already had one such AVP */ #ifndef WORKAROUND_ACCEPT_INVALID_VSAI if (auth_aid != 0) invalid++; /* Only 1 *-Application-Id AVP is allowed */ #endif /* WORKAROUND_ACCEPT_INVALID_VSAI */ acct_aid = inhdr->avp_value->u32; break; /* ignore other AVPs */ } if (invalid) { TRACE_DEBUG(FULL, "Invalid Vendor-Specific-Application-Id AVP received"); error->pei_errcode = "DIAMETER_INVALID_AVP_VALUE"; error->pei_avp = avp; return EINVAL; } innext: /* Go to next in AVP */ CHECK_FCT( fd_msg_browse(inavp, MSG_BRW_NEXT, &inavp, NULL) ); } /* Add entry in the list */ if (auth_aid) { CHECK_FCT( fd_app_merge(&peer->p_hdr.info.runtime.pir_apps, auth_aid, vid, 1, 0) ); } if (acct_aid) { CHECK_FCT( fd_app_merge(&peer->p_hdr.info.runtime.pir_apps, acct_aid, vid, 0, 1) ); } } break; case AC_AUTH_APPLICATION_ID: /* Auth-Application-Id */ if (hdr->avp_value == NULL) { /* This is a sanity check */ LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); ASSERT(0); /* To check if this really happens, and understand why... */ goto next; } if (hdr->avp_value->u32 == AI_RELAY) { peer->p_hdr.info.runtime.pir_relay = 1; } else { CHECK_FCT( fd_app_merge(&peer->p_hdr.info.runtime.pir_apps, hdr->avp_value->u32, 0, 1, 0) ); } break; case AC_ACCT_APPLICATION_ID: /* Acct-Application-Id */ if (hdr->avp_value == NULL) { /* This is a sanity check */ LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); ASSERT(0); /* To check if this really happens, and understand why... */ goto next; } if (hdr->avp_value->u32 == AI_RELAY) { /* Not clear if the relay application can be inside this AVP... */ peer->p_hdr.info.runtime.pir_relay = 1; } else { CHECK_FCT( fd_app_merge(&peer->p_hdr.info.runtime.pir_apps, hdr->avp_value->u32, 0, 0, 1) ); } break; case AC_FIRMWARE_REVISION: /* Firmware-Revision */ if (hdr->avp_value == NULL) { /* This is a sanity check */ LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); ASSERT(0); /* To check if this really happens, and understand why... */ goto next; } peer->p_hdr.info.runtime.pir_firmrev = hdr->avp_value->u32; break; case AC_INBAND_SECURITY_ID: /* Inband-Security-Id */ if (hdr->avp_value == NULL) { /* This is a sanity check */ LOG_F("Ignored an AVP (code %x) with unset value in CER/CEA", hdr->avp_code); ASSERT(0); /* To check if this really happens, and understand why... */ goto next; } if (hdr->avp_value->u32 >= 32 ) { error->pei_errcode = "DIAMETER_INVALID_AVP_VALUE"; error->pei_message = "I don't support this Inband-Security-Id value (yet)."; error->pei_avp = avp; return EINVAL; } peer->p_hdr.info.runtime.pir_isi |= (1 << hdr->avp_value->u32); break; } next: /* Go to next AVP */ CHECK_FCT( fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL) ); } return 0; } /* Create a CER message for sending */ static int create_CER(struct fd_peer * peer, struct cnxctx * cnx, struct msg ** cer) { int isi_tls = 0; int isi_none = 0; /* Find CER dictionary object and create an instance */ CHECK_FCT( fd_msg_new ( fd_dict_cmd_CER, MSGFL_ALLOC_ETEID, cer ) ); /* Do we need Inband-Security-Id AVPs ? If we're already using TLS, we don't... */ if (!fd_cnx_getTLS(cnx)) { isi_none = peer->p_hdr.info.config.pic_flags.sec & PI_SEC_NONE; /* we add it even if the peer does not use the old mechanism, it is impossible to distinguish */ if (peer->p_hdr.info.config.pic_flags.sec & PI_SEC_TLS_OLD) { if (fd_g_config->cnf_sec_data.tls_disabled) { LOG_N("TLS disabled locally, so Inband-Security-Id (TLS) not included for peer %s", peer->p_hdr.info.pi_diamid); } else { isi_tls = 1; } } } /* Add the information about the local peer */ CHECK_FCT( add_CE_info(*cer, cnx, isi_tls, isi_none) ); /* Done! */ return 0; } /* Continue with the initiator side */ static int to_waitcea(struct fd_peer * peer, struct cnxctx * cnx) { /* We sent a CER on the connection, set the event queue so that we receive the CEA */ CHECK_FCT( set_peer_cnx(peer, &cnx) ); /* Change state and reset the timer */ CHECK_FCT( fd_psm_change_state(peer, STATE_WAITCEA) ); fd_psm_next_timeout(peer, 0, CEA_TIMEOUT); return 0; } /* Reject an incoming connection attempt */ static void receiver_reject(struct cnxctx ** recv_cnx, struct msg ** cer, struct fd_pei * error) { struct msg_hdr * hdr = NULL; /* Create and send the CEA with appropriate error code */ CHECK_FCT_DO( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, cer, MSGFL_ANSW_ERROR ), goto destroy ); CHECK_FCT_DO( fd_msg_rescode_set(*cer, error->pei_errcode, error->pei_message, error->pei_avp, 0 ), goto destroy ); CHECK_FCT_DO( fd_msg_hdr( *cer, &hdr ), goto destroy ); if (hdr->msg_flags & CMD_FLAG_ERROR) { /* Generic error format, just add the origin AVPs */ CHECK_FCT_DO( fd_msg_add_origin ( *cer, 1 ), goto destroy ); } else { /* Add other AVPs to be compliant with the ABNF */ CHECK_FCT_DO( add_CE_info(*cer, *recv_cnx, 0, 0), goto destroy ); } CHECK_FCT_DO( fd_out_send(cer, *recv_cnx, NULL, 0), goto destroy ); if (error->pei_avp_free) { fd_msg_free(error->pei_avp); } /* And now destroy this connection */ destroy: fd_cnx_destroy(*recv_cnx); *recv_cnx = NULL; if (*cer) { fd_hook_call(HOOK_MESSAGE_DROPPED, *cer, NULL, "An error occurred while rejecting this CER.", fd_msg_pmdl_get(*cer)); fd_msg_free(*cer); *cer = NULL; } } /* We have established a new connection to the remote peer, send CER and eventually process the election */ int fd_p_ce_handle_newcnx(struct fd_peer * peer, struct cnxctx * initiator) { struct msg * cer = NULL; /* Send CER on the new connection */ CHECK_FCT( create_CER(peer, initiator, &cer) ); CHECK_FCT( fd_out_send(&cer, initiator, peer, 0) ); /* Are we doing an election ? */ if (fd_peer_getstate(peer) == STATE_WAITCNXACK_ELEC) { if (election_result(peer)) { /* Close initiator connection */ fd_cnx_destroy(initiator); LOG_D("%s: Election lost on outgoing connection, closing and answering CEA on incoming connection.", peer->p_hdr.info.pi_diamid); /* Process with the receiver side */ CHECK_FCT( fd_p_ce_process_receiver(peer) ); } else { struct fd_pei pei; memset(&pei, 0, sizeof(pei)); pei.pei_errcode = "ELECTION_LOST"; pei.pei_message = "Please answer my CER instead, you won the election."; LOG_D("%s: Election lost on incoming connection, closing and waiting for CEA on outgoing connection.", peer->p_hdr.info.pi_diamid); /* Answer an ELECTION LOST to the receiver side */ receiver_reject(&peer->p_receiver, &peer->p_cer, &pei); CHECK_FCT( to_waitcea(peer, initiator) ); } } else { /* No election (yet) */ CHECK_FCT( to_waitcea(peer, initiator) ); } return 0; } /* We have received a Capabilities Exchange message on the peer connection */ int fd_p_ce_msgrcv(struct msg ** msg, int req, struct fd_peer * peer) { uint32_t rc = 0; int st; struct fd_pei pei; TRACE_ENTRY("%p %p", msg, peer); CHECK_PARAMS( msg && *msg && CHECK_PEER(peer) ); /* The only valid situation where we are called is in WAITCEA and we receive a CEA (we may have won an election) */ /* Note : to implement Capabilities Update, we would need to change here */ /* If it is a CER, just reply an error */ if (req) { /* Create the error message */ CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, msg, MSGFL_ANSW_ERROR ) ); /* Set the error code */ CHECK_FCT( fd_msg_rescode_set(*msg, "DIAMETER_UNABLE_TO_COMPLY", "No CER allowed in current state", NULL, 1 ) ); /* msg now contains an answer message to send back */ CHECK_FCT_DO( fd_out_send(msg, NULL, peer, 0), /* In case of error the message has already been dumped */ ); } /* If the state is not WAITCEA, just discard the message */ if (req || ((st = fd_peer_getstate(peer)) != STATE_WAITCEA)) { if (*msg) { /* In such case, just discard the message */ char buf[128]; snprintf(buf, sizeof(buf), "Received while peer state machine was in state %s.", STATE_STR(st)); fd_hook_call(HOOK_MESSAGE_DROPPED, *msg, peer, buf, fd_msg_pmdl_get(*msg)); CHECK_FCT_DO( fd_msg_free(*msg), /* continue */); *msg = NULL; } return 0; } memset(&pei, 0, sizeof(pei)); /* Save info from the CEA into the peer */ CHECK_FCT_DO( save_remote_CE_info(*msg, peer, &pei, &rc), { fd_hook_call(HOOK_PEER_CONNECT_FAILED, *msg, peer, "An error occurred while processing incoming CEA.", NULL); goto cleanup; } ); /* Check the Result-Code */ switch (rc) { case ER_DIAMETER_SUCCESS: /* Log success */ fd_hook_call(HOOK_PEER_CONNECT_SUCCESS, *msg, peer, NULL, NULL); /* Dispose of the message, we don't need it anymore */ CHECK_FCT_DO( fd_msg_free(*msg), /* continue */ ); *msg = NULL; /* No problem, we can continue */ break; case ER_DIAMETER_TOO_BUSY: /* Retry later */ fd_hook_call(HOOK_PEER_CONNECT_FAILED, *msg, peer, "Remote peer is too busy", NULL); fd_psm_cleanup(peer, 0); fd_psm_next_timeout(peer, 0, 300); return 0; case ER_ELECTION_LOST: /* Ok, just wait for a little while for the CER to be processed on the other connection. */ TRACE_DEBUG(FULL, "Peer %s replied a CEA with Result-Code AVP ELECTION_LOST, waiting for events.", peer->p_hdr.info.pi_diamid); return 0; default: /* In any other case, we abort all attempts to connect to this peer */ fd_hook_call(HOOK_PEER_CONNECT_FAILED, *msg, peer, "CEA with unexpected error code", NULL); return EINVAL; } /* Handshake if needed, start clear otherwise */ if ( ! fd_cnx_getTLS(peer->p_cnxctx) ) { int todo = peer->p_hdr.info.config.pic_flags.sec & peer->p_hdr.info.runtime.pir_isi ; /* Special case: if the peer did not send a ISI AVP */ if (peer->p_hdr.info.runtime.pir_isi == 0) todo = peer->p_hdr.info.config.pic_flags.sec; if (todo == PI_SEC_NONE) { /* Ok for clear connection */ TRACE_DEBUG(INFO, "No TLS protection negotiated with peer '%s'.", peer->p_hdr.info.pi_diamid); CHECK_FCT( fd_cnx_start_clear(peer->p_cnxctx, 1) ); } else if (fd_g_config->cnf_sec_data.tls_disabled) { LOG_E("Clear connection with remote peer '%s' is not (explicitly) allowed, and TLS is disabled. Giving up...", peer->p_hdr.info.pi_diamid); fd_hook_call(HOOK_PEER_CONNECT_FAILED, NULL, peer, "TLS is disabled and peer is not configured for IPsec", NULL); goto cleanup; } else { fd_psm_change_state(peer, STATE_OPEN_HANDSHAKE); CHECK_FCT_DO( fd_cnx_handshake(peer->p_cnxctx, GNUTLS_CLIENT, ALGO_HANDSHAKE_3436, peer->p_hdr.info.config.pic_priority, NULL), { /* Handshake failed ... */ fd_hook_call(HOOK_PEER_CONNECT_FAILED, NULL, peer, "TLS handshake failed after CER/CEA exchange", NULL); goto cleanup; } ); /* Retrieve the credentials */ CHECK_FCT( fd_cnx_getcred(peer->p_cnxctx, &peer->p_hdr.info.runtime.pir_cert_list, &peer->p_hdr.info.runtime.pir_cert_list_size) ); } } /* Move to next state */ if (peer->p_flags.pf_cnx_pb) { fd_psm_change_state(peer, STATE_REOPEN ); CHECK_FCT( fd_p_dw_reopen(peer) ); } else { fd_psm_change_state(peer, STATE_OPEN ); fd_psm_next_timeout(peer, 1, peer->p_hdr.info.config.pic_twtimer ?: fd_g_config->cnf_timer_tw); } return 0; cleanup: fd_p_ce_clear_cnx(peer, NULL); /* Send the error to the peer */ CHECK_FCT( fd_event_send(peer->p_events, FDEVP_CNX_ERROR, 0, NULL) ); return 0; } /* Handle the receiver side to go to OPEN or OPEN_NEW state (any election is resolved) */ int fd_p_ce_process_receiver(struct fd_peer * peer) { struct fd_pei pei; struct msg * msg = NULL; int isi = 0; int fatal = 0; int tls_sync=0; TRACE_ENTRY("%p", peer); CHECK_FCT_DO( set_peer_cnx(peer, &peer->p_receiver), { fd_hook_call(HOOK_PEER_CONNECT_FAILED, NULL, peer, "Error saving the incoming connection in the peer structure", NULL); return __ret__; } ); msg = peer->p_cer; peer->p_cer = NULL; memset(&pei, 0, sizeof(pei)); /* Parse the content of the received CER */ CHECK_FCT_DO( save_remote_CE_info(msg, peer, &pei, NULL), goto error_abort ); /* Validate the realm if needed */ if (peer->p_hdr.info.config.pic_realm) { size_t len = strlen(peer->p_hdr.info.config.pic_realm); if (fd_os_almostcasesrch(peer->p_hdr.info.config.pic_realm, len, peer->p_hdr.info.runtime.pir_realm, peer->p_hdr.info.runtime.pir_realmlen, NULL)) { TRACE_DEBUG(INFO, "Rejected CER from peer '%s', realm mismatch with configured value (returning DIAMETER_UNKNOWN_PEER).", peer->p_hdr.info.pi_diamid); pei.pei_errcode = "DIAMETER_UNKNOWN_PEER"; /* maybe AVP_NOT_ALLOWED would be better fit? */ goto error_abort; } } /* Save the credentials if handshake already occurred */ if ( fd_cnx_getTLS(peer->p_cnxctx) ) { CHECK_FCT( fd_cnx_getcred(peer->p_cnxctx, &peer->p_hdr.info.runtime.pir_cert_list, &peer->p_hdr.info.runtime.pir_cert_list_size) ); } /* Validate the peer if needed */ if (peer->p_flags.pf_responder) { int res = fd_peer_validate( peer ); if (res < 0) { TRACE_DEBUG(INFO, "Rejected CER from peer '%s', validation failed (returning DIAMETER_UNKNOWN_PEER).", peer->p_hdr.info.pi_diamid); pei.pei_errcode = "DIAMETER_UNKNOWN_PEER"; goto error_abort; } CHECK_FCT( res ); } /* Check if we have common applications */ if ( fd_g_config->cnf_flags.no_fwd && (! peer->p_hdr.info.runtime.pir_relay) ) { int got_common; CHECK_FCT( fd_app_check_common( &fd_g_config->cnf_apps, &peer->p_hdr.info.runtime.pir_apps, &got_common) ); if (!got_common) { TRACE_DEBUG(INFO, "No common application with peer '%s', sending DIAMETER_NO_COMMON_APPLICATION", peer->p_hdr.info.pi_diamid); pei.pei_errcode = "DIAMETER_NO_COMMON_APPLICATION"; fatal = 1; goto error_abort; } } /* Do we agree on ISI ? */ if ( ! fd_cnx_getTLS(peer->p_cnxctx) ) { /* In case of responder, the validate callback must have set the config.pic_flags.sec value already */ /* First case: we are not using old mechanism: ISI are deprecated, we ignore it. */ if ( ! (peer->p_hdr.info.config.pic_flags.sec & PI_SEC_TLS_OLD)) { /* Just check then that the peer configuration allows for IPsec protection */ if (peer->p_hdr.info.config.pic_flags.sec & PI_SEC_NONE) { isi = PI_SEC_NONE; } else { /* otherwise, we should have already been protected. Reject */ TRACE_DEBUG(INFO, "Non TLS-protected CER/CEA exchanges are not allowed with this peer, rejecting."); } } else { /* The old mechanism is allowed with this peer. Now, look into the ISI AVP values */ /* In case no ISI was present anyway: */ if (!peer->p_hdr.info.runtime.pir_isi) { TRACE_DEBUG(INFO, "Inband-Security-Id AVP is missing in received CER."); if (peer->p_hdr.info.config.pic_flags.sec & PI_SEC_NONE) { isi = PI_SEC_NONE; TRACE_DEBUG(INFO, "IPsec protection allowed by configuration, allowing this mechanism to be used."); } else { /* otherwise, we should have already been protected. Reject */ TRACE_DEBUG(INFO, "Rejecting the peer connection (please allow IPsec here or configure TLS in the remote peer)."); } } else { /* OK, the remote peer did send the ISI AVP. */ if ((peer->p_hdr.info.config.pic_flags.sec & PI_SEC_NONE) && (peer->p_hdr.info.runtime.pir_isi & PI_SEC_NONE)) { /* We have allowed IPsec */ isi = PI_SEC_NONE; } else if (fd_g_config->cnf_sec_data.tls_disabled) { /* We can agree on TLS */ TRACE_DEBUG(INFO, "Remote peer is not allowed for IPsec and TLS is disabled.");; } else if (peer->p_hdr.info.runtime.pir_isi & PI_SEC_TLS_OLD) { /* We can agree on TLS */ isi = PI_SEC_TLS_OLD; } else { TRACE_DEBUG(INFO, "Remote peer requested IPsec protection, but local configuration forbids it."); } } } /* If we did not find an agreement */ if (!isi) { TRACE_DEBUG(INFO, "No common security mechanism with '%s', sending DIAMETER_NO_COMMON_SECURITY", peer->p_hdr.info.pi_diamid); pei.pei_errcode = "DIAMETER_NO_COMMON_SECURITY"; fatal = 1; goto error_abort; } /* Do not send the ISI IPsec if we are using the new mechanism */ if ((isi == PI_SEC_NONE) && (! (peer->p_hdr.info.config.pic_flags.sec & PI_SEC_TLS_OLD))) isi = 0; } else if (peer->p_hdr.info.runtime.pir_isi & PI_SEC_TLS_OLD) { /* Seem some weird peers are sending the Inband-Security-Id AVP on the secure port... No harm */ isi = PI_SEC_TLS_OLD; } /* Reply a CEA */ CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, &msg, 0 ) ); CHECK_FCT( fd_msg_rescode_set(msg, "DIAMETER_SUCCESS", NULL, NULL, 0 ) ); CHECK_FCT( add_CE_info(msg, peer->p_cnxctx, isi & PI_SEC_TLS_OLD, isi & PI_SEC_NONE) ); /* The connection is complete, but we may still need TLS handshake */ fd_hook_call(HOOK_PEER_CONNECT_SUCCESS, msg, peer, NULL, NULL); CHECK_FCT( fd_out_send(&msg, peer->p_cnxctx, peer, 0 ) ); /* Handshake if needed */ if (isi & PI_SEC_TLS_OLD) { fd_psm_change_state(peer, STATE_OPEN_HANDSHAKE); CHECK_FCT_DO( fd_cnx_handshake(peer->p_cnxctx, GNUTLS_SERVER, ALGO_HANDSHAKE_3436, peer->p_hdr.info.config.pic_priority, NULL), { /* Handshake failed ... */ fd_hook_call(HOOK_PEER_CONNECT_FAILED, NULL, peer, "TLS handshake failed after CER/CEA exchange", NULL); goto cleanup; } ); /* Retrieve the credentials */ CHECK_FCT_DO( fd_cnx_getcred(peer->p_cnxctx, &peer->p_hdr.info.runtime.pir_cert_list, &peer->p_hdr.info.runtime.pir_cert_list_size), { /* Error ... */ fd_hook_call(HOOK_PEER_CONNECT_FAILED, NULL, peer, "Unable to retrieve remote credentials after TLS handshake", NULL); goto cleanup; } ); /* Call second validation callback if needed */ if (peer->p_cb2) { TRACE_DEBUG(FULL, "Calling second validation callback for %s", peer->p_hdr.info.pi_diamid); CHECK_FCT_DO( (*peer->p_cb2)( &peer->p_hdr.info ), { fd_hook_call(HOOK_PEER_CONNECT_FAILED, NULL, peer, "Validation callback rejected the peer after handshake", NULL); CHECK_FCT( fd_psm_terminate( peer, "DO_NOT_WANT_TO_TALK_TO_YOU" ) ); return 0; } ); } tls_sync = 1; } else { if ( ! fd_cnx_getTLS(peer->p_cnxctx) ) { TRACE_DEBUG(INFO, "No TLS protection negotiated with peer '%s'.", peer->p_hdr.info.pi_diamid); CHECK_FCT( fd_cnx_start_clear(peer->p_cnxctx, 1) ); } } /* Move to OPEN or REOPEN state */ if (peer->p_flags.pf_cnx_pb) { fd_psm_change_state(peer, STATE_REOPEN ); CHECK_FCT( fd_p_dw_reopen(peer) ); } else { if ((!tls_sync) && (fd_cnx_is_unordered_delivery_supported(peer->p_cnxctx))) { fd_psm_change_state(peer, STATE_OPEN_NEW ); /* send DWR */ CHECK_FCT( fd_p_dw_timeout(peer) ); } else { fd_psm_change_state(peer, STATE_OPEN ); fd_psm_next_timeout(peer, 1, peer->p_hdr.info.config.pic_twtimer ?: fd_g_config->cnf_timer_tw); } } return 0; error_abort: if (pei.pei_errcode) { /* Send the error */ fd_hook_call(HOOK_PEER_CONNECT_FAILED, msg, peer, pei.pei_message ?: pei.pei_errcode, NULL); receiver_reject(&peer->p_cnxctx, &msg, &pei); } else { char buf[1024]; snprintf(buf, sizeof(buf), "Unexpected error occurred while processing incoming connection from '%s'.", peer->p_hdr.info.pi_diamid); fd_hook_call(HOOK_PEER_CONNECT_FAILED, msg, peer, buf, NULL); } cleanup: if (msg) { fd_msg_free(msg); } fd_p_ce_clear_cnx(peer, NULL); /* Send the error to the peer */ CHECK_FCT( fd_event_send(peer->p_events, fatal ? FDEVP_TERMINATE : FDEVP_CNX_ERROR, 0, NULL) ); return 0; } /* We have received a CER on a new connection for this peer */ int fd_p_ce_handle_newCER(struct msg ** msg, struct fd_peer * peer, struct cnxctx ** cnx, int valid) { struct fd_pei pei; int cur_state = fd_peer_getstate(peer); memset(&pei, 0, sizeof(pei)); switch (cur_state) { case STATE_CLOSED: peer->p_receiver = *cnx; *cnx = NULL; peer->p_cer = *msg; *msg = NULL; CHECK_FCT( fd_p_ce_process_receiver(peer) ); break; case STATE_WAITCNXACK: /* Save the parameters in the peer, move to STATE_WAITCNXACK_ELEC */ peer->p_receiver = *cnx; *cnx = NULL; peer->p_cer = *msg; *msg = NULL; CHECK_FCT( fd_psm_change_state(peer, STATE_WAITCNXACK_ELEC) ); break; case STATE_WAITCEA: if (election_result(peer)) { /* Close initiator connection (was already set as principal) */ LOG_D("%s: Election lost on outgoing connection, closing and answering CEA on incoming connection.", peer->p_hdr.info.pi_diamid); fd_p_ce_clear_cnx(peer, NULL); /* and go on with the receiver side */ peer->p_receiver = *cnx; *cnx = NULL; peer->p_cer = *msg; *msg = NULL; CHECK_FCT( fd_p_ce_process_receiver(peer) ); } else { /* Answer an ELECTION LOST to the receiver side and continue */ pei.pei_errcode = "ELECTION_LOST"; pei.pei_message = "Please answer my CER instead, you won the election."; LOG_D("%s: Election lost on incoming connection, closing and waiting for CEA on outgoing connection.", peer->p_hdr.info.pi_diamid); receiver_reject(cnx, msg, &pei); } break; default: pei.pei_errcode = "DIAMETER_UNABLE_TO_COMPLY"; /* INVALID COMMAND? in case of Capabilities-Updates? */ pei.pei_message = "Invalid state to receive a new connection attempt."; LOG_E("%s: Rejecting new connection attempt while our state machine is in state '%s'", peer->p_hdr.info.pi_diamid, STATE_STR(cur_state)); receiver_reject(cnx, msg, &pei); } return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/p_cnx.c000066400000000000000000000270321333553357400222630ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" /* TODO: change the behavior to handle properly forced ordering at beginning & end of OPEN state */ /* This file contains code used by a peer state machine to initiate a connection to remote peer */ struct next_conn { struct fd_list chain; int proto; /* Protocol of the next attempt */ union { sSS ss; /* The address, only for TCP */ sSA4 sin; sSA6 sin6; }; uint16_t port; /* The port, for SCTP (included in ss for TCP) */ int dotls; /* Handshake TLS after connection ? */ }; static __inline__ void failed_connection_attempt(struct fd_peer * peer) { /* Simply remove the first item in the list if not empty */ if (! FD_IS_LIST_EMPTY(&peer->p_connparams) ) { struct fd_list * li = peer->p_connparams.next; fd_list_unlink(li); free(li); } } static void empty_connection_list(struct fd_peer * peer) { /* Remove all items */ while (!FD_IS_LIST_EMPTY(&peer->p_connparams)) { failed_connection_attempt(peer); } } static int prepare_connection_list(struct fd_peer * peer) { struct fd_list * li, *last_prio; struct next_conn * new; uint16_t port_no; /* network order */ int dotls_immediate; int count = 0; TRACE_ENTRY("%p", peer); /* Resolve peer address(es) if needed */ if (FD_IS_LIST_EMPTY(&peer->p_hdr.info.pi_endpoints)) { struct addrinfo hints, *ai, *aip; int ret; memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_ADDRCONFIG; ret = getaddrinfo(peer->p_hdr.info.pi_diamid, NULL, &hints, &ai); if (ret) { TRACE_DEBUG(INFO, "Unable to resolve address for peer '%s' (%s), aborting", peer->p_hdr.info.pi_diamid, gai_strerror(ret)); if (ret != EAI_AGAIN) fd_psm_terminate( peer, NULL ); return 0; } for (aip = ai; aip != NULL; aip = aip->ai_next) { CHECK_FCT( fd_ep_add_merge( &peer->p_hdr.info.pi_endpoints, aip->ai_addr, aip->ai_addrlen, EP_FL_DISC ) ); } freeaddrinfo(ai); } /* Remove addresses from unwanted family */ if (peer->p_hdr.info.config.pic_flags.pro3) { CHECK_FCT( fd_ep_filter_family( &peer->p_hdr.info.pi_endpoints, (peer->p_hdr.info.config.pic_flags.pro3 == PI_P3_IP) ? AF_INET : AF_INET6)); } if (fd_g_config->cnf_flags.no_ip4) { CHECK_FCT( fd_ep_filter_family( &peer->p_hdr.info.pi_endpoints, AF_INET6)); } if (fd_g_config->cnf_flags.no_ip6) { CHECK_FCT( fd_ep_filter_family( &peer->p_hdr.info.pi_endpoints, AF_INET)); } /* We don't use the alternate addresses that were sent by the remote peer */ CHECK_FCT( fd_ep_clearflags(&peer->p_hdr.info.pi_endpoints, EP_FL_ADV) ); /* Now check we have at least one address to attempt */ if (FD_IS_LIST_EMPTY(&peer->p_hdr.info.pi_endpoints)) { TRACE_DEBUG(INFO, "No address %savailable to connect to peer '%s', aborting", peer->p_hdr.info.config.pic_flags.pro3 ? "in the configured family " : "", peer->p_hdr.info.pi_diamid); fd_psm_terminate( peer, NULL ); return 0; } /* Check if we are able to communicate with this peer */ if (fd_g_config->cnf_sec_data.tls_disabled && ( peer->p_hdr.info.config.pic_flags.sec != PI_SEC_NONE)) { LOG_E("Peer '%s' not configured for No_TLS and TLS is locally disabled; giving up connection attempts", peer->p_hdr.info.pi_diamid); fd_psm_terminate( peer, NULL ); return 0; } /* Cleanup any previous list */ empty_connection_list(peer); /* Prepare the parameters */ if ((peer->p_hdr.info.config.pic_flags.sec != PI_SEC_DEFAULT) || (fd_g_config->cnf_flags.tls_alg)) { dotls_immediate = 0; port_no = htons(peer->p_hdr.info.config.pic_port ?: DIAMETER_PORT); } else { dotls_immediate = 1; port_no = htons(peer->p_hdr.info.config.pic_port ?: DIAMETER_SECURE_PORT); } last_prio = &peer->p_connparams; /* Create TCP parameters unless specified otherwise */ if ((!fd_g_config->cnf_flags.no_tcp) && (peer->p_hdr.info.config.pic_flags.pro4 != PI_P4_SCTP)) { for (li = peer->p_hdr.info.pi_endpoints.next; li != &peer->p_hdr.info.pi_endpoints; li = li->next) { struct fd_endpoint * ep = (struct fd_endpoint *)li; CHECK_MALLOC( new = malloc(sizeof(struct next_conn)) ); memset(new, 0, sizeof(struct next_conn)); fd_list_init(&new->chain, new); new->proto = IPPROTO_TCP; memcpy( &new->ss, &ep->ss, sizeof(sSS) ); switch (new->ss.ss_family) { case AF_INET: new->sin.sin_port = port_no; break; case AF_INET6: new->sin6.sin6_port = port_no; break; default: free(new); continue; /* Move to the next endpoint */ } new->dotls = dotls_immediate; /* Add the new entry to the appropriate position (conf and disc go first) */ if (ep->flags & (EP_FL_CONF | EP_FL_DISC)) { fd_list_insert_after(last_prio, &new->chain); last_prio = &new->chain; } else { fd_list_insert_before(&peer->p_connparams, &new->chain); } count++; } } /* Now, add the SCTP entry, if not disabled */ #ifndef DISABLE_SCTP if ((!fd_g_config->cnf_flags.no_sctp) && (peer->p_hdr.info.config.pic_flags.pro4 != PI_P4_TCP)) { struct next_conn * new; CHECK_MALLOC( new = malloc(sizeof(struct next_conn)) ); memset(new, 0, sizeof(struct next_conn)); fd_list_init(&new->chain, new); new->proto = IPPROTO_SCTP; new->port = ntohs(port_no); /* back to host byte order... */ new->dotls = dotls_immediate; /* Add the new entry to the appropriate position (depending on preferences) */ if ((fd_g_config->cnf_flags.pr_tcp) || (peer->p_hdr.info.config.pic_flags.alg == PI_ALGPREF_TCP)) { fd_list_insert_after(last_prio, &new->chain); } else { fd_list_insert_after(&peer->p_connparams, &new->chain); /* very first position */ } count++; } #endif /* DISABLE_SCTP */ LOG_D("Prepared %d sets of connection parameters to peer %s", count, peer->p_hdr.info.pi_diamid); return 0; } /* The thread that attempts the connection */ static void * connect_thr(void * arg) { struct fd_peer * peer = arg; struct cnxctx * cnx = NULL; struct next_conn * nc = NULL; int rebuilt = 0; int fatal_error=0; TRACE_ENTRY("%p", arg); CHECK_PARAMS_DO( CHECK_PEER(peer), return NULL ); /* Set the thread name */ { char buf[48]; snprintf(buf, sizeof(buf), "ConnTo:%s", peer->p_hdr.info.pi_diamid); fd_log_threadname ( buf ); } do { /* Rebuild the list if needed, if it is empty -- but at most once */ if (FD_IS_LIST_EMPTY(&peer->p_connparams)) { if (! rebuilt) { CHECK_FCT_DO( fatal_error = prepare_connection_list(peer), goto out ); rebuilt ++; } if (FD_IS_LIST_EMPTY(&peer->p_connparams)) { /* We encountered an error or we have looped over all the addresses of the peer. */ fd_hook_call(HOOK_PEER_CONNECT_FAILED, NULL, peer, "All connection attempts failed, will retry later", NULL); CHECK_FCT_DO( fatal_error = fd_event_send(peer->p_events, FDEVP_CNX_FAILED, 0, NULL), goto out ); return NULL; } } /* Attempt connection to the first entry */ nc = (struct next_conn *)(peer->p_connparams.next); switch (nc->proto) { case IPPROTO_TCP: cnx = fd_cnx_cli_connect_tcp((sSA *)&nc->ss, sSAlen(&nc->ss)); break; #ifndef DISABLE_SCTP case IPPROTO_SCTP: cnx = fd_cnx_cli_connect_sctp((peer->p_hdr.info.config.pic_flags.pro3 == PI_P3_IP) ? 1 : fd_g_config->cnf_flags.no_ip6, nc->port, &peer->p_hdr.info.pi_endpoints); break; #endif /* DISABLE_SCTP */ } if (cnx) break; /* Pop these parameters and continue */ failed_connection_attempt(peer); pthread_testcancel(); } while (!cnx); /* and until cancellation or all addresses attempted without success */ /* Now, we have an established connection in cnx */ pthread_cleanup_push((void *)fd_cnx_destroy, cnx); /* Set the hostname in the connection, so that handshake verifies the remote identity */ fd_cnx_sethostname(cnx,peer->p_hdr.info.pi_diamid); /* Handshake if needed (secure port) */ if (nc->dotls) { CHECK_FCT_DO( fd_cnx_handshake(cnx, GNUTLS_CLIENT, ALGO_HANDSHAKE_3436, peer->p_hdr.info.config.pic_priority, NULL), { /* Handshake failed ... */ fd_hook_call(HOOK_PEER_CONNECT_FAILED, NULL, peer, "TLS Handshake failed", NULL); fd_cnx_destroy(cnx); empty_connection_list(peer); fd_ep_filter(&peer->p_hdr.info.pi_endpoints, EP_FL_CONF); goto out_pop; } ); LOG_A("%s: TLS handshake successful.", peer->p_hdr.info.pi_diamid); } else { /* Prepare to receive the next message */ CHECK_FCT_DO( fatal_error = fd_cnx_start_clear(cnx, 0), goto out_pop ); } /* Upon success, generate FDEVP_CNX_ESTABLISHED */ CHECK_FCT_DO( fatal_error = fd_event_send(peer->p_events, FDEVP_CNX_ESTABLISHED, 0, cnx), ); out_pop: ; pthread_cleanup_pop(0); out: if (fatal_error) { /* Cleanup the connection */ if (cnx) fd_cnx_destroy(cnx); /* Generate a termination event */ CHECK_FCT_DO(fd_core_shutdown(), ); } return NULL; } /* Initiate a connection attempt to a remote peer */ int fd_p_cnx_init(struct fd_peer * peer) { TRACE_ENTRY("%p", peer); /* Start the connect thread */ CHECK_FCT( pthread_create(&peer->p_ini_thr, NULL, connect_thr, peer) ); return 0; } /* Cancel a connection attempt */ void fd_p_cnx_abort(struct fd_peer * peer, int cleanup_all) { TRACE_ENTRY("%p %d", peer, cleanup_all); CHECK_PARAMS_DO( CHECK_PEER(peer), return ); if (peer->p_ini_thr != (pthread_t)NULL) { CHECK_FCT_DO( fd_thr_term(&peer->p_ini_thr), /* continue */); failed_connection_attempt(peer); } if (cleanup_all) { empty_connection_list(peer); } } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/p_dp.c000066400000000000000000000203471333553357400221000ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" /* This file contains code to handle Disconnect Peer messages (DPR and DPA) */ /* Delay to use before next reconnect attempt */ int fd_p_dp_newdelay(struct fd_peer * peer) { int delay = peer->p_hdr.info.config.pic_tctimer ?: fd_g_config->cnf_timer_tc; switch (peer->p_hdr.info.runtime.pir_lastDC) { case ACV_DC_REBOOTING: default: /* We use TcTimer to attempt reconnection */ break; case ACV_DC_BUSY: /* No need to hammer the overloaded peer */ delay *= 10; break; case ACV_DC_NOT_FRIEND: /* He does not want to speak to us... let's retry a *lot* later maybe */ delay *= 200; break; } return delay; } /* Handle a received message */ int fd_p_dp_handle(struct msg ** msg, int req, struct fd_peer * peer) { long to_receive, to_send; TRACE_ENTRY("%p %d %p", msg, req, peer); if (req) { /* We received a DPR, save the Disconnect-Cause and go to CLOSING_GRACE or terminate the connection */ struct avp * dc; CHECK_FCT( fd_msg_search_avp ( *msg, fd_dict_avp_DC, &dc )); if (dc) { struct avp_hdr * hdr; CHECK_FCT( fd_msg_avp_hdr( dc, &hdr ) ); if (hdr->avp_value == NULL) { /* This is a sanity check */ LOG_F("BUG: Unset value in Disconnect-Cause in DPR"); ASSERT(0); /* To check if this really happens, and understand why... */ } /* save the cause */ peer->p_hdr.info.runtime.pir_lastDC = hdr->avp_value->u32; } if (TRACE_BOOL(INFO)) { if (dc) { struct dict_object * dictobj; struct dict_enumval_request er; memset(&er, 0, sizeof(er)); /* prepare the request */ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_TYPE, TYPE_OF_AVP, fd_dict_avp_DC, &er.type_obj, ENOENT ) ); er.search.enum_value.u32 = peer->p_hdr.info.runtime.pir_lastDC; /* Search the enum value */ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_ENUMVAL, ENUMVAL_BY_STRUCT, &er, &dictobj, 0 ) ); if (dictobj) { CHECK_FCT( fd_dict_getval( dictobj, &er.search ) ); TRACE_DEBUG(INFO, "Peer '%s' sent a DPR with cause: %s", peer->p_hdr.info.pi_diamid, er.search.enum_name); } else { TRACE_DEBUG(INFO, "Peer '%s' sent a DPR with unknown cause: %u", peer->p_hdr.info.pi_diamid, peer->p_hdr.info.runtime.pir_lastDC); } } else { TRACE_DEBUG(INFO, "Peer '%s' sent a DPR without Disconnect-Cause AVP", peer->p_hdr.info.pi_diamid); } } /* Now reply with a DPA */ CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, msg, 0 ) ); CHECK_FCT( fd_msg_rescode_set( *msg, "DIAMETER_SUCCESS", NULL, NULL, 1 ) ); /* Do we have pending exchanges with this peer? */ CHECK_FCT( fd_peer_get_load_pending(&peer->p_hdr, &to_receive, &to_send) ); if ((to_receive == 0) && (to_send == 0)) { /* No pending exchange, move to CLOSING directly */ CHECK_FCT( fd_psm_change_state(peer, STATE_CLOSING) ); /* Now send the DPA */ CHECK_FCT( fd_out_send( msg, NULL, peer, 0) ); /* and move to CLOSED */ fd_psm_cleanup(peer, 0); /* Reset the timer for next connection attempt -- we'll retry sooner or later depending on the disconnection cause */ fd_psm_next_timeout(peer, 1, fd_p_dp_newdelay(peer)); } else { /* We have pending exchanges, we move to CLOSING_GRACE which allows exchanges of answers but not new requests */ CHECK_FCT( fd_psm_change_state(peer, STATE_CLOSING_GRACE) ); fd_psm_next_timeout(peer, 0, GRACE_TIMEOUT); /* Now send the DPA */ CHECK_FCT( fd_out_send( msg, NULL, peer, 0) ); } } else { /* We received a DPA */ int curstate = fd_peer_getstate(peer); if (curstate != STATE_CLOSING_GRACE) { TRACE_DEBUG(INFO, "Ignoring DPA received in state %s", STATE_STR(curstate)); } /* In theory, we should control the Result-Code AVP. But since we will not go back to OPEN state here anyway, let's skip it */ /* TODO("Control Result-Code in the DPA") */ CHECK_FCT_DO( fd_msg_free( *msg ), /* continue */ ); *msg = NULL; /* Do we still have pending exchanges with this peer? */ CHECK_FCT( fd_peer_get_load_pending(&peer->p_hdr, &to_receive, &to_send) ); if ((to_receive != 0) || (to_send != 0)) { TRACE_DEBUG(INFO, "Received DPA but pending load: [%ld, %ld], giving grace delay before closing", to_receive, to_send); fd_psm_next_timeout(peer, 0, GRACE_TIMEOUT); peer->p_flags.pf_localterm = 1; } else { /* otherwise, go to CLOSING state, the psm will handle terminating the connection */ CHECK_FCT( fd_psm_change_state(peer, STATE_CLOSING) ); } } return 0; } /* Start disconnection of a peer: send DPR */ int fd_p_dp_initiate(struct fd_peer * peer, char * reason) { struct msg * msg = NULL; struct dict_object * dictobj = NULL; struct avp * avp = NULL; struct dict_enumval_request er; union avp_value val; TRACE_ENTRY("%p %p", peer, reason); /* Create a new DWR instance */ CHECK_FCT( fd_msg_new ( fd_dict_cmd_DPR, MSGFL_ALLOC_ETEID, &msg ) ); /* Add the Origin information */ CHECK_FCT( fd_msg_add_origin ( msg, 0 ) ); /* Add the Disconnect-Cause */ CHECK_FCT( fd_msg_avp_new ( fd_dict_avp_DC, 0, &avp ) ); /* Search the value in the dictionary */ memset(&er, 0, sizeof(er)); CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_TYPE, TYPE_OF_AVP, fd_dict_avp_DC, &er.type_obj, ENOENT ) ); er.search.enum_name = reason ?: "REBOOTING"; CHECK_FCT_DO( fd_dict_search( fd_g_config->cnf_dict, DICT_ENUMVAL, ENUMVAL_BY_STRUCT, &er, &dictobj, ENOENT ), { ASSERT(0); /* internal error: unknown reason */ } ); CHECK_FCT( fd_dict_getval( dictobj, &er.search ) ); /* Set the value in the AVP */ val.u32 = er.search.enum_value.u32; CHECK_FCT( fd_msg_avp_setvalue( avp, &val ) ); CHECK_FCT( fd_msg_avp_add( msg, MSG_BRW_LAST_CHILD, avp ) ); /* Save the value also in the peer */ peer->p_hdr.info.runtime.pir_lastDC = val.u32; /* Update the peer state and timer */ CHECK_FCT( fd_psm_change_state(peer, STATE_CLOSING_GRACE) ); fd_psm_next_timeout(peer, 0, DPR_TIMEOUT); /* Now send the DPR message */ CHECK_FCT_DO( fd_out_send(&msg, NULL, peer, 0), /* ignore since we are on timeout anyway */ ); return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/p_dw.c000066400000000000000000000142441333553357400221060ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" /* This file contains code to handle Device Watchdog messages (DWR and DWA) */ /* Check the value of Origin-State-Id is consistent in a DWR or DWA -- we return an error otherwise */ static int check_state_id(struct msg * msg, struct fd_peer * peer) { struct avp * osi; /* Check if the request contains the Origin-State-Id */ CHECK_FCT( fd_msg_search_avp ( msg, fd_dict_avp_OSI, &osi ) ); if (osi) { /* Check the value is consistent with the saved one */ struct avp_hdr * hdr; CHECK_FCT( fd_msg_avp_hdr( osi, &hdr ) ); if (hdr->avp_value == NULL) { /* This is a sanity check */ LOG_F("Ignored an Origin-State-Id AVP with unset value in DWR/DWA"); ASSERT(0); /* To check if this really happens, and understand why... */ } if (! peer->p_hdr.info.runtime.pir_orstate) { /* It was not already received in CER/CEA, save it now */ peer->p_hdr.info.runtime.pir_orstate = hdr->avp_value->u32; } if (peer->p_hdr.info.runtime.pir_orstate != hdr->avp_value->u32) { TRACE_DEBUG(INFO, "Received a new Origin-State-Id from peer '%s'! (%x -> %x); resetting the connection.", peer->p_hdr.info.pi_diamid, peer->p_hdr.info.runtime.pir_orstate, hdr->avp_value->u32 ); return EINVAL; } } return 0; } /* Create and send a DWR */ static int send_DWR(struct fd_peer * peer) { struct msg * msg = NULL; /* Create a new DWR instance */ CHECK_FCT( fd_msg_new ( fd_dict_cmd_DWR, MSGFL_ALLOC_ETEID, &msg ) ); /* Add the content of the message (only the origin) */ CHECK_FCT( fd_msg_add_origin ( msg, 1 ) ); /* Now send this message */ CHECK_FCT( fd_out_send(&msg, NULL, peer, 0) ); /* And mark the pending DW */ peer->p_flags.pf_dw_pending = 1; return 0; } /* Handle an incoming message */ int fd_p_dw_handle(struct msg ** msg, int req, struct fd_peer * peer) { int reset_tmr = 0; TRACE_ENTRY("%p %d %p", msg, req, peer); /* Check the value of OSI for information */ CHECK_FCT( check_state_id(*msg, peer) ); if (req) { /* If we receive a DWR, send back a DWA */ CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, msg, 0 ) ); CHECK_FCT( fd_msg_rescode_set( *msg, "DIAMETER_SUCCESS", NULL, NULL, 0 ) ); CHECK_FCT( fd_msg_add_origin ( *msg, 1 ) ); CHECK_FCT( fd_out_send( msg, peer->p_cnxctx, peer, 0) ); } else { /* Discard the DWA */ CHECK_FCT_DO( fd_msg_free(*msg), /* continue */ ); *msg = NULL; /* And clear the pending DW flag */ peer->p_flags.pf_dw_pending = 0; } /* Now update timeout */ if (req) { /* Update timeout only if we did not already send a DWR ourselves */ reset_tmr = !peer->p_flags.pf_dw_pending; } else { /* Reset the timer */ reset_tmr = 1; } if (reset_tmr) { fd_psm_next_timeout(peer, 1, peer->p_hdr.info.config.pic_twtimer ?: fd_g_config->cnf_timer_tw); } /* If we are in REOPEN state, increment the counter */ if (fd_peer_getstate(peer) == STATE_REOPEN) { peer->p_flags.pf_reopen_cnt += 1; if (peer->p_flags.pf_reopen_cnt) { /* Send a new DWR */ CHECK_FCT( send_DWR(peer) ); } else { /* Move to OPEN state */ CHECK_FCT( fd_psm_change_state(peer, STATE_OPEN) ); } } return 0; } /* Handle a timeout in the PSM (OPEN or REOPEN state only) */ int fd_p_dw_timeout(struct fd_peer * peer) { TRACE_ENTRY("%p", peer); if (peer->p_flags.pf_dw_pending) { /* We have sent a DWR and received no answer during TwTimer */ CHECK_FCT( fd_psm_change_state(peer, STATE_SUSPECT) ); fd_psm_next_timeout(peer, 0, 2 * (peer->p_hdr.info.config.pic_twtimer ?: fd_g_config->cnf_timer_tw) ); } else { /* The timeout has expired, send a DWR */ CHECK_FCT( send_DWR(peer) ); fd_psm_next_timeout(peer, 0, peer->p_hdr.info.config.pic_twtimer ?: fd_g_config->cnf_timer_tw ); } return 0; } /* Handle DW exchanges after the peer has come alive again */ int fd_p_dw_reopen(struct fd_peer * peer) { TRACE_ENTRY("%p", peer); peer->p_flags.pf_reopen_cnt = 1; peer->p_flags.pf_cnx_pb = 0; CHECK_FCT( send_DWR(peer) ); return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/p_expiry.c000066400000000000000000000164511333553357400230160ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" /* Delay for garbage collection of expired peers, in seconds */ #define GC_TIME 120 static pthread_t exp_thr = (pthread_t)NULL; static pthread_t gc_thr = (pthread_t)NULL; static struct fd_list exp_list = FD_LIST_INITIALIZER( exp_list ); static pthread_cond_t exp_cnd = PTHREAD_COND_INITIALIZER; static pthread_mutex_t exp_mtx = PTHREAD_MUTEX_INITIALIZER; static void * gc_th_fct(void * arg) { fd_log_threadname ( "Peers/garb. col." ); TRACE_ENTRY( "%p", arg ); do { struct fd_list * li, purge = FD_LIST_INITIALIZER(purge); sleep(GC_TIME); /* sleep is a cancellation point */ /* Now check in the peers list if any peer can be deleted */ CHECK_FCT_DO( pthread_rwlock_wrlock(&fd_g_peers_rw), goto error ); for (li = fd_g_peers.next; li != &fd_g_peers; li = li->next) { struct fd_peer * peer = (struct fd_peer *)li->o; if (fd_peer_getstate(peer) != STATE_ZOMBIE) continue; if (peer->p_hdr.info.config.pic_flags.persist == PI_PRST_ALWAYS) continue; /* This peer was not supposed to terminate, keep it in the list for debug */ /* Ok, the peer was expired, let's remove it */ li = li->prev; /* to avoid breaking the loop */ fd_list_unlink(&peer->p_hdr.chain); fd_list_insert_before(&purge, &peer->p_hdr.chain); } CHECK_FCT_DO( pthread_rwlock_unlock(&fd_g_peers_rw), goto error ); /* Now delete peers that are in the purge list */ while (!FD_IS_LIST_EMPTY(&purge)) { struct fd_peer * peer = (struct fd_peer *)(purge.next->o); fd_list_unlink(&peer->p_hdr.chain); TRACE_DEBUG(INFO, "Garbage Collect: delete zombie peer '%s'", peer->p_hdr.info.pi_diamid); CHECK_FCT_DO( fd_peer_free(&peer), /* Continue... what else to do ? */ ); } } while (1); error: TRACE_DEBUG(INFO, "An error occurred in peers module! GC thread is terminating..."); ASSERT(0); CHECK_FCT_DO(fd_core_shutdown(), ); return NULL; } static void * exp_th_fct(void * arg) { fd_log_threadname ( "Peers/expire" ); TRACE_ENTRY( "%p", arg ); CHECK_POSIX_DO( pthread_mutex_lock(&exp_mtx), { ASSERT(0); } ); pthread_cleanup_push( fd_cleanup_mutex, &exp_mtx ); do { struct timespec now; struct fd_peer * first; /* Check if there are expiring peers available */ if (FD_IS_LIST_EMPTY(&exp_list)) { /* Just wait for a change or cancelation */ CHECK_POSIX_DO( pthread_cond_wait( &exp_cnd, &exp_mtx ), { ASSERT(0); } ); /* Restart the loop on wakeup */ continue; } /* Get the pointer to the peer that expires first */ first = (struct fd_peer *)(exp_list.next->o); ASSERT( CHECK_PEER(first) ); /* Get the current time */ CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &now), { ASSERT(0); } ); /* If first peer is not expired, we just wait until it happens */ if ( TS_IS_INFERIOR( &now, &first->p_exp_timer ) ) { CHECK_POSIX_DO2( pthread_cond_timedwait( &exp_cnd, &exp_mtx, &first->p_exp_timer ), ETIMEDOUT, /* ETIMEDOUT is a normal return value, continue */, /* on other error, */ { ASSERT(0); } ); /* on wakeup, loop */ continue; } /* Now, the first peer in the list is expired; signal it */ fd_list_unlink( &first->p_expiry ); CHECK_FCT_DO( fd_event_send(first->p_events, FDEVP_TERMINATE, 0, "DO_NOT_WANT_TO_TALK_TO_YOU"), break ); } while (1); pthread_cleanup_pop( 1 ); TRACE_DEBUG(INFO, "An error occurred in peers module! Expiry thread is terminating..."); CHECK_FCT_DO(fd_core_shutdown(), ); return NULL; } /* Initialize peers expiry mechanism */ int fd_p_expi_init(void) { TRACE_ENTRY(); CHECK_FCT( pthread_create( &exp_thr, NULL, exp_th_fct, NULL ) ); CHECK_FCT( pthread_create( &gc_thr, NULL, gc_th_fct, NULL ) ); return 0; } /* Finish peers expiry mechanism */ int fd_p_expi_fini(void) { CHECK_FCT_DO( fd_thr_term(&exp_thr), ); CHECK_POSIX( pthread_mutex_lock(&exp_mtx) ); while (!FD_IS_LIST_EMPTY(&exp_list)) { struct fd_peer * peer = (struct fd_peer *)(exp_list.next->o); fd_list_unlink(&peer->p_expiry ); } CHECK_POSIX( pthread_mutex_unlock(&exp_mtx) ); CHECK_FCT_DO( fd_thr_term(&gc_thr), ); return 0; } /* Add / requeue a peer in the expiry list */ int fd_p_expi_update(struct fd_peer * peer ) { TRACE_ENTRY("%p", peer); CHECK_PARAMS( CHECK_PEER(peer) ); CHECK_POSIX( pthread_mutex_lock(&exp_mtx) ); fd_list_unlink(&peer->p_expiry ); /* if peer expires */ if (peer->p_hdr.info.config.pic_flags.exp) { struct fd_list * li; /* update the p_exp_timer value */ CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &peer->p_exp_timer), { ASSERT(0); } ); peer->p_exp_timer.tv_sec += peer->p_hdr.info.config.pic_lft; /* add to the expiry list in appropriate position (probably around the end) */ for (li = exp_list.prev; li != &exp_list; li = li->prev) { struct fd_peer * p = (struct fd_peer *)(li->o); if (TS_IS_INFERIOR( &p->p_exp_timer, &peer->p_exp_timer ) ) break; } fd_list_insert_after(li, &peer->p_expiry); /* signal the expiry thread if we added in first position */ if (li == &exp_list) { CHECK_POSIX( pthread_cond_signal(&exp_cnd) ); } } CHECK_POSIX( pthread_mutex_unlock(&exp_mtx) ); return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/p_out.c000066400000000000000000000200421333553357400222740ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2015, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" /* Alloc a new hbh for requests, bufferize the message and send on the connection, save in sentreq if provided */ static int do_send(struct msg ** msg, struct cnxctx * cnx, uint32_t * hbh, struct fd_peer * peer) { struct msg_hdr * hdr; int msg_is_a_req; uint8_t * buf; size_t sz; int ret; uint32_t bkp_hbh = 0; struct msg *cpy_for_logs_only; TRACE_ENTRY("%p %p %p %p", msg, cnx, hbh, peer); /* Retrieve the message header */ CHECK_FCT( fd_msg_hdr(*msg, &hdr) ); msg_is_a_req = (hdr->msg_flags & CMD_FLAG_REQUEST); if (msg_is_a_req) { CHECK_PARAMS(hbh && peer); /* Alloc the hop-by-hop id and increment the value for next message */ bkp_hbh = hdr->msg_hbhid; hdr->msg_hbhid = *hbh; *hbh = hdr->msg_hbhid + 1; } /* Create the message buffer */ CHECK_FCT(fd_msg_bufferize( *msg, &buf, &sz )); pthread_cleanup_push( free, buf ); cpy_for_logs_only = *msg; /* Save a request before sending so that there is no race condition with the answer */ if (msg_is_a_req) { CHECK_FCT_DO( ret = fd_p_sr_store(&peer->p_sr, msg, &hdr->msg_hbhid, bkp_hbh), goto out ); } /* Log the message */ fd_hook_call(HOOK_MESSAGE_SENT, cpy_for_logs_only, peer, NULL, fd_msg_pmdl_get(cpy_for_logs_only)); pthread_cleanup_push((void *)fd_msg_free, *msg /* might be NULL, no problem */); /* Send the message */ CHECK_FCT_DO( ret = fd_cnx_send(cnx, buf, sz), ); pthread_cleanup_pop(0); out: ; pthread_cleanup_pop(1); if (ret) return ret; /* Free remaining messages (i.e. answers) */ if (*msg) { CHECK_FCT( fd_msg_free(*msg) ); *msg = NULL; } return 0; } /* The code of the "out" thread */ static void * out_thr(void * arg) { struct fd_peer * peer = arg; int stop = 0; struct msg * msg; ASSERT( CHECK_PEER(peer) ); /* Set the thread name */ { char buf[48]; snprintf(buf, sizeof(buf), "OUT/%s", peer->p_hdr.info.pi_diamid); fd_log_threadname ( buf ); } /* Loop until cancelation */ while (!stop) { int ret; /* Retrieve next message to send */ CHECK_FCT_DO( fd_fifo_get(peer->p_tosend, &msg), goto error ); /* Send the message, log any error */ CHECK_FCT_DO( ret = do_send(&msg, peer->p_cnxctx, &peer->p_hbh, peer), { if (msg) { char buf[256]; snprintf(buf, sizeof(buf), "Error while sending this message: %s", strerror(ret)); fd_hook_call(HOOK_MESSAGE_DROPPED, msg, NULL, buf, fd_msg_pmdl_get(msg)); fd_msg_free(msg); } stop = 1; } ); } /* If we're here it means there was an error on the socket. We need to continue to purge the fifo & until we are canceled */ CHECK_FCT_DO( fd_event_send(peer->p_events, FDEVP_CNX_ERROR, 0, NULL), /* What do we do if it fails? */ ); /* Requeue all routable messages in the global "out" queue, until we are canceled once the PSM deals with the CNX_ERROR sent above */ while ( fd_fifo_get(peer->p_tosend, &msg) == 0 ) { if (fd_msg_is_routable(msg)) { CHECK_FCT_DO(fd_fifo_post_noblock(peer->p_tofailover, (void *)&msg), { /* fallback: destroy the message */ fd_hook_call(HOOK_MESSAGE_DROPPED, msg, NULL, "Internal error: unable to requeue this message during failover process", fd_msg_pmdl_get(msg)); CHECK_FCT_DO(fd_msg_free(msg), /* What can we do more? */) } ); } else { /* Just free it */ /* fd_hook_call(HOOK_MESSAGE_DROPPED, m, NULL, "Non-routable message freed during handover", fd_msg_pmdl_get(m)); */ CHECK_FCT_DO(fd_msg_free(msg), /* What can we do more? */) } } error: /* It is not really a connection error, but the effect is the same, we are not able to send anymore message */ CHECK_FCT_DO( fd_event_send(peer->p_events, FDEVP_CNX_ERROR, 0, NULL), /* What do we do if it fails? */ ); return NULL; } /* Wrapper to sending a message either by out thread (peer in OPEN state) or directly; cnx or peer must be provided. Flags are valid only for direct sending, not through thread (unused) */ int fd_out_send(struct msg ** msg, struct cnxctx * cnx, struct fd_peer * peer, int update_reqin_cnt) { struct msg_hdr * hdr; TRACE_ENTRY("%p %p %p", msg, cnx, peer); CHECK_PARAMS( msg && *msg && (cnx || (peer && peer->p_cnxctx))); fd_hook_call(HOOK_MESSAGE_SENDING, *msg, peer, NULL, fd_msg_pmdl_get(*msg)); if (update_reqin_cnt && peer) { CHECK_FCT( fd_msg_hdr(*msg, &hdr) ); if (!(hdr->msg_flags & CMD_FLAG_REQUEST)) { /* Update the count of pending answers to send */ CHECK_POSIX( pthread_mutex_lock(&peer->p_state_mtx) ); peer->p_reqin_count--; CHECK_POSIX( pthread_mutex_unlock(&peer->p_state_mtx) ); } } if (fd_peer_getstate(peer) == STATE_OPEN) { /* Normal case: just queue for the out thread to pick it up */ CHECK_FCT( fd_fifo_post(peer->p_tosend, msg) ); } else { int ret; uint32_t *hbh = NULL; /* In other cases, the thread is not running, so we handle the sending directly */ if (peer) hbh = &peer->p_hbh; if (!cnx) cnx = peer->p_cnxctx; /* Do send the message */ CHECK_FCT_DO( ret = do_send(msg, cnx, hbh, peer), { if (msg) { char buf[256]; snprintf(buf, sizeof(buf), "Error while sending this message: %s", strerror(ret)); fd_hook_call(HOOK_MESSAGE_DROPPED, *msg, NULL, buf, fd_msg_pmdl_get(*msg)); fd_msg_free(*msg); *msg = NULL; } } ); } return 0; } /* Start the "out" thread that picks messages in p_tosend and send them on p_cnxctx */ int fd_out_start(struct fd_peer * peer) { TRACE_ENTRY("%p", peer); CHECK_PARAMS( CHECK_PEER(peer) && (peer->p_outthr == (pthread_t)NULL) ); CHECK_POSIX( pthread_create(&peer->p_outthr, NULL, out_thr, peer) ); CHECK_FCT( fd_cnx_unordered_delivery(peer->p_cnxctx, 1) ); return 0; } /* Stop that thread */ int fd_out_stop(struct fd_peer * peer) { TRACE_ENTRY("%p", peer); CHECK_PARAMS( CHECK_PEER(peer) ); CHECK_FCT( fd_cnx_unordered_delivery(peer->p_cnxctx, 0) ); CHECK_FCT( fd_thr_term(&peer->p_outthr) ); return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/p_psm.c000066400000000000000000000773761333553357400223120ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" /* This file implement a Peer State Machine which is a mix of: - the state machine described in rfc3588bis - the state machine described in rfc3539#section-3.4 - the following observations. The delivery of Diameter messages must not always be unordered: order is important at begining and end of a connection lifetime. It means we need agility to switch between "ordering enforced" and "ordering not enforced to counter Head of the Line Blocking" modes of operation. The connection state machine represented in RFC3588 (and RFC6733) is incomplete, because it lacks the SUSPECT state and the 3 DWR/DWA exchanges (section 5.1) when the peer recovers from this state. Personnally I don't see the rationale for exchanging 3 messages (why 3?) but, if we require at least 1 DWR/DWA exchange to be always performed after the CER/CEA exchange (and initiated by the peer that sent the CEA), we have a simple way to deal with our ordering problem, as resumed below. Peers are: [i]nitiator, [r]esponder. (1) [i] SCTP connection attempt. (2) [r] accept the connection. (3) [i,r] (if secure port) DTLS handshake, close on failure. (4) [i] Send CER (5) [r] Receive CER, send CEA using stream 0, flag "unordered" cleared. [r] Immediately send a DWR after the CEA, also using stream 0, flag "unordered" cleared. [r] Move to STATE_OPEN_NEW state -- equivalent to OPEN except that all messages are sent ordered at the moment. (6) [i] receive CEA, move to OPEN state. All messages can be sent unordered in OPEN state. [i] As per normal operation, reply with DWA to the DWR. (7) [r] Upon reception of the DWA, move to OPEN state, messages can be sent unordered from this point. Note about (5) and (6): if the Diameter Identity received in CER or CEA does not match the credentials from the certificate presented during TLS handshake, we may need to specify a path of clean disconnection (not blocking the remote peer waiting for something). This proposed mechanism removes the problem of application messages received before the CEA by the initiator. Note that if the "old" inband TLS handshake is used, this handshake plays the same synchronization role than the new DWR/DWA, which becomes useless. The other time where ordering is important is by the end of connection lifetime, when one peer is shutting down the link for some reason (reboot, overload, no activity, etc...). In case of unordered delivery, we may have: - peer A sends an application message followed by a DPR. Peer B receives the DPR first and tears down the connection. Application message is lost. - Peer B sends an application message, then receives a DPR and answers a DPA. Peer A receives the DPA before the application message. The application message is lost. This situation is actually happening easily because DPR/DPA messages are very short, while application messages can be quite large. Therefore, they require much more time to deliver. I really cannot see a way to counter this effect by using the ordering of the messages, except by applying a timer (state STATE_CLOSING_GRACE). This timer can be also useful when we detect that some messages has not yet received an answer on this link, to give time to the application to complete the exchange ongoing. However, this problem must be balanced with the fact that the message that is lost will be in many cases sent again as the failover mechanism specifies. */ /* The actual declaration of peer_state_str */ DECLARE_STATE_STR(); /* Helper for next macro */ #define case_str( _val ) \ case _val : return #_val DECLARE_PEV_STR(); /************************************************************************/ /* Delayed startup */ /************************************************************************/ static int started = 0; static pthread_mutex_t started_mtx = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t started_cnd = PTHREAD_COND_INITIALIZER; /* Wait for start signal */ static int fd_psm_waitstart() { int ret = 0; TRACE_ENTRY(""); CHECK_POSIX( pthread_mutex_lock(&started_mtx) ); awake: if (!ret && !started) { pthread_cleanup_push( fd_cleanup_mutex, &started_mtx ); CHECK_POSIX_DO( ret = pthread_cond_wait(&started_cnd, &started_mtx), ); pthread_cleanup_pop( 0 ); goto awake; } CHECK_POSIX( pthread_mutex_unlock(&started_mtx) ); return ret; } /* Allow the state machines to start */ int fd_psm_start() { TRACE_ENTRY(""); CHECK_POSIX( pthread_mutex_lock(&started_mtx) ); started = 1; CHECK_POSIX( pthread_cond_broadcast(&started_cnd) ); CHECK_POSIX( pthread_mutex_unlock(&started_mtx) ); return 0; } /************************************************************************/ /* Manage the list of active peers */ /************************************************************************/ /* Enter/leave OPEN state */ static int enter_open_state(struct fd_peer * peer) { struct fd_list * li; CHECK_PARAMS( FD_IS_LIST_EMPTY(&peer->p_actives) ); /* Callback registered by the credential validator (fd_peer_validate_register) */ if (peer->p_cb2) { CHECK_FCT_DO( (*peer->p_cb2)(&peer->p_hdr.info), { TRACE_DEBUG(FULL, "Validation failed, terminating the connection"); fd_psm_terminate(peer, "DO_NOT_WANT_TO_TALK_TO_YOU" ); } ); peer->p_cb2 = NULL; return 0; } /* Insert in the active peers list */ CHECK_POSIX( pthread_rwlock_wrlock(&fd_g_activ_peers_rw) ); for (li = fd_g_activ_peers.next; li != &fd_g_activ_peers; li = li->next) { struct fd_peer * next_p = (struct fd_peer *)li->o; int cmp = fd_os_cmp(peer->p_hdr.info.pi_diamid, peer->p_hdr.info.pi_diamidlen, next_p->p_hdr.info.pi_diamid, next_p->p_hdr.info.pi_diamidlen); if (cmp < 0) break; } fd_list_insert_before(li, &peer->p_actives); CHECK_POSIX( pthread_rwlock_unlock(&fd_g_activ_peers_rw) ); /* Callback registered when the peer was added, by fd_peer_add */ if (peer->p_cb) { TRACE_DEBUG(FULL, "Calling add callback for peer %s", peer->p_hdr.info.pi_diamid); (*peer->p_cb)(&peer->p_hdr.info, peer->p_cb_data); /* TODO: do this in a separate detached thread? */ peer->p_cb = NULL; peer->p_cb_data = NULL; } /* Start the thread to handle outgoing messages */ CHECK_FCT( fd_out_start(peer) ); /* Update the expiry timer now */ CHECK_FCT( fd_p_expi_update(peer) ); return 0; } static int leave_open_state(struct fd_peer * peer, int skip_failover) { /* Remove from active peers list */ CHECK_POSIX( pthread_rwlock_wrlock(&fd_g_activ_peers_rw) ); fd_list_unlink( &peer->p_actives ); CHECK_POSIX( pthread_rwlock_unlock(&fd_g_activ_peers_rw) ); /* Stop the "out" thread */ CHECK_FCT( fd_out_stop(peer) ); /* Failover the messages */ if (!skip_failover) { fd_peer_failover_msg(peer); } return 0; } /************************************************************************/ /* Helpers for state changes */ /************************************************************************/ /* Cleanup pending events in the peer */ void fd_psm_events_free(struct fd_peer * peer) { struct fd_event * ev; /* Purge all events, and free the associated data if any */ while (fd_fifo_tryget( peer->p_events, &ev ) == 0) { switch (ev->code) { case FDEVP_CNX_ESTABLISHED: { fd_cnx_destroy(ev->data); } break; case FDEVP_TERMINATE: /* Do not free the string since it is a constant */ break; case FDEVP_CNX_INCOMING: { struct cnx_incoming * evd = ev->data; fd_hook_call(HOOK_MESSAGE_DROPPED, evd->cer, NULL, "Message discarded while cleaning peer state machine queue.", fd_msg_pmdl_get(evd->cer)); CHECK_FCT_DO( fd_msg_free(evd->cer), /* continue */); fd_cnx_destroy(evd->cnx); } default: free(ev->data); } free(ev); } } /* Read state */ int fd_peer_get_state(struct peer_hdr *peer) { int ret; struct fd_peer * p = (struct fd_peer *)peer; if (!CHECK_PEER(p)) return -1; CHECK_POSIX_DO( pthread_mutex_lock(&p->p_state_mtx), return -1 ); ret = p->p_state; CHECK_POSIX_DO( pthread_mutex_unlock(&p->p_state_mtx), return -1 ); return ret; } /* Change state */ int fd_psm_change_state(struct fd_peer * peer, int new_state) { int old; TRACE_ENTRY("%p %d(%s)", peer, new_state, STATE_STR(new_state)); CHECK_PARAMS( CHECK_PEER(peer) ); old = fd_peer_getstate(peer); if (old == new_state) return 0; LOG(((old == STATE_OPEN) || (new_state == STATE_OPEN)) ? FD_LOG_NOTICE : FD_LOG_DEBUG, "'%s'\t-> '%s'\t'%s'", STATE_STR(old), STATE_STR(new_state), peer->p_hdr.info.pi_diamid); CHECK_POSIX( pthread_mutex_lock(&peer->p_state_mtx) ); peer->p_state = new_state; CHECK_POSIX( pthread_mutex_unlock(&peer->p_state_mtx) ); if (old == STATE_OPEN) { CHECK_FCT( leave_open_state(peer, new_state == STATE_CLOSING_GRACE) ); } if (old == STATE_CLOSING_GRACE) { fd_peer_failover_msg(peer); } if (new_state == STATE_OPEN) { CHECK_FCT( enter_open_state(peer) ); } if (new_state == STATE_CLOSED) { /* Purge event list */ fd_psm_events_free(peer); /* Reset the counter of pending anwers to send */ peer->p_reqin_count = 0; /* If the peer is not persistant, we destroy it */ if (peer->p_hdr.info.config.pic_flags.persist == PI_PRST_NONE) { CHECK_FCT( fd_event_send(peer->p_events, FDEVP_TERMINATE, 0, NULL) ); } } return 0; } /* Set timeout timer of next event */ void fd_psm_next_timeout(struct fd_peer * peer, int add_random, int delay) { TRACE_DEBUG(FULL, "Peer timeout reset to %d seconds%s", delay, add_random ? " (+/- 2)" : "" ); /* Initialize the timer */ CHECK_POSIX_DO( clock_gettime( CLOCK_REALTIME, &peer->p_psm_timer ), ASSERT(0) ); if (add_random) { if (delay > 2) delay -= 2; else delay = 0; /* Add a random value between 0 and 4sec */ peer->p_psm_timer.tv_sec += random() % 4; peer->p_psm_timer.tv_nsec+= random() % 1000000000L; if (peer->p_psm_timer.tv_nsec >= 1000000000L) { peer->p_psm_timer.tv_nsec -= 1000000000L; peer->p_psm_timer.tv_sec ++; } } peer->p_psm_timer.tv_sec += delay; #ifdef SLOW_PSM /* temporary for debug */ peer->p_psm_timer.tv_sec += 10; #endif } /* Cleanup the peer */ void fd_psm_cleanup(struct fd_peer * peer, int terminate) { /* Move to CLOSED state: failover messages, stop OUT thread, unlink peer from active list */ if (fd_peer_getstate(peer) != STATE_ZOMBIE) { CHECK_FCT_DO( fd_psm_change_state(peer, STATE_CLOSED), /* continue */ ); } fd_p_cnx_abort(peer, terminate); fd_p_ce_clear_cnx(peer, NULL); if (peer->p_receiver) { fd_cnx_destroy(peer->p_receiver); peer->p_receiver = NULL; } if (terminate) { fd_psm_events_free(peer); CHECK_FCT_DO( fd_fifo_del(&peer->p_events), /* continue */ ); } } /************************************************************************/ /* The PSM thread */ /************************************************************************/ /* Cancelation cleanup : set ZOMBIE state in the peer */ void cleanup_setstate(void * arg) { struct fd_peer * peer = (struct fd_peer *)arg; CHECK_PARAMS_DO( CHECK_PEER(peer), return ); CHECK_POSIX_DO( pthread_mutex_lock(&peer->p_state_mtx), ); peer->p_state = STATE_ZOMBIE; CHECK_POSIX_DO( pthread_mutex_unlock(&peer->p_state_mtx), ); return; } /* The state machine thread (controler) */ static void * p_psm_th( void * arg ) { struct fd_peer * peer = (struct fd_peer *)arg; int created_started = started ? 1 : 0; int event; size_t ev_sz; void * ev_data; int cur_state; CHECK_PARAMS_DO( CHECK_PEER(peer), ASSERT(0) ); pthread_cleanup_push( cleanup_setstate, arg ); /* Set the thread name */ { char buf[48]; snprintf(buf, sizeof(buf), "PSM/%s", peer->p_hdr.info.pi_diamid); fd_log_threadname ( buf ); } /* The state machine starts in CLOSED state */ CHECK_POSIX_DO( pthread_mutex_lock(&peer->p_state_mtx), goto psm_end ); peer->p_state = STATE_CLOSED; CHECK_POSIX_DO( pthread_mutex_unlock(&peer->p_state_mtx), goto psm_end ); /* Wait that the PSM are authorized to start in the daemon */ CHECK_FCT_DO( fd_psm_waitstart(), goto psm_end ); /* Initialize the timer */ if (peer->p_flags.pf_responder) { fd_psm_next_timeout(peer, 0, INCNX_TIMEOUT); } else { fd_psm_next_timeout(peer, created_started, 0); } psm_loop: /* Get next event */ TRACE_DEBUG(FULL, "'%s' in state '%s' waiting for next event.", peer->p_hdr.info.pi_diamid, STATE_STR(fd_peer_getstate(peer))); CHECK_FCT_DO( fd_event_timedget(peer->p_events, &peer->p_psm_timer, FDEVP_PSM_TIMEOUT, &event, &ev_sz, &ev_data), goto psm_end ); cur_state = fd_peer_getstate(peer); if (cur_state == -1) goto psm_end; TRACE_DEBUG(FULL, "'%s'\t<-- '%s'\t(%p,%zd)\t'%s'", STATE_STR(cur_state), fd_pev_str(event), ev_data, ev_sz, peer->p_hdr.info.pi_diamid); /* Now, the action depends on the current state and the incoming event */ /* The following states are impossible */ ASSERT( cur_state != STATE_NEW ); ASSERT( cur_state != STATE_ZOMBIE ); ASSERT( cur_state != STATE_OPEN_HANDSHAKE ); /* because it should exist only between two loops */ /* Purge invalid events */ if (!CHECK_PEVENT(event)) { TRACE_DEBUG(INFO, "Invalid event received in PSM '%s' : %d", peer->p_hdr.info.pi_diamid, event); ASSERT(0); /* we should investigate this situation */ goto psm_loop; } /* Requests to terminate the peer object */ if (event == FDEVP_TERMINATE) { switch (cur_state) { case STATE_OPEN: case STATE_OPEN_NEW: case STATE_REOPEN: /* We cannot just close the connection, we have to send a DPR first */ CHECK_FCT_DO( fd_p_dp_initiate(peer, ev_data), goto psm_end ); goto psm_loop; /* case STATE_CLOSING: case STATE_CLOSING_GRACE: case STATE_WAITCNXACK: case STATE_WAITCNXACK_ELEC: case STATE_WAITCEA: case STATE_SUSPECT: case STATE_CLOSED: */ default: /* In these cases, we just cleanup the peer object (if needed) and terminate */ goto psm_end; } } /* A message was received */ if (event == FDEVP_CNX_MSG_RECV) { struct msg * msg = NULL; struct msg_hdr * hdr; struct fd_cnx_rcvdata rcv_data; struct fd_msg_pmdl * pmdl = NULL; rcv_data.buffer = ev_data; rcv_data.length = ev_sz; pmdl = fd_msg_pmdl_get_inbuf(rcv_data.buffer, rcv_data.length); /* Parse the received buffer */ CHECK_FCT_DO( fd_msg_parse_buffer( (void *)&ev_data, ev_sz, &msg), { fd_hook_call(HOOK_MESSAGE_PARSING_ERROR, NULL, peer, &rcv_data, pmdl ); free(ev_data); CHECK_FCT_DO( fd_event_send(peer->p_events, FDEVP_CNX_ERROR, 0, NULL), goto psm_reset ); goto psm_loop; } ); fd_hook_associate(msg, pmdl); CHECK_FCT_DO( fd_msg_source_set( msg, peer->p_hdr.info.pi_diamid, peer->p_hdr.info.pi_diamidlen), goto psm_end); /* If the current state does not allow receiving messages, just drop it */ if (cur_state == STATE_CLOSED) { /* In such case, just discard the message */ fd_hook_call(HOOK_MESSAGE_DROPPED, msg, peer, "Message purged from queue, peer in CLOSED state", fd_msg_pmdl_get(msg)); fd_msg_free(msg); goto psm_loop; } /* Extract the header */ CHECK_FCT_DO( fd_msg_hdr(msg, &hdr), goto psm_end ); /* If it is an answer, associate with the request or drop */ if (!(hdr->msg_flags & CMD_FLAG_REQUEST)) { struct msg * req; /* Search matching request (same hbhid) */ CHECK_FCT_DO( fd_p_sr_fetch(&peer->p_sr, hdr->msg_hbhid, &req), goto psm_end ); if (req == NULL) { fd_hook_call(HOOK_MESSAGE_DROPPED, msg, peer, "Answer received with no corresponding sent request.", fd_msg_pmdl_get(msg)); fd_msg_free(msg); goto psm_loop; } /* Associate */ CHECK_FCT_DO( fd_msg_answ_associate( msg, req ), goto psm_end ); } /* Log incoming message */ fd_hook_call(HOOK_MESSAGE_RECEIVED, msg, peer, NULL, fd_msg_pmdl_get(msg)); if (cur_state == STATE_OPEN_NEW) { /* OK, we have received something, so the connection is supposedly now in OPEN state at the remote site */ fd_psm_change_state(peer, STATE_OPEN ); } /* Now handle non-link-local messages */ if (fd_msg_is_routable(msg)) { switch (cur_state) { /* To maximize compatibility -- should not be a security issue here */ case STATE_REOPEN: case STATE_SUSPECT: case STATE_CLOSING: case STATE_CLOSING_GRACE: TRACE_DEBUG(FULL, "Accepted a message while not in OPEN state... "); /* The standard situation : */ case STATE_OPEN_NEW: case STATE_OPEN: /* We received a valid routable message, update the expiry timer */ CHECK_FCT_DO( fd_p_expi_update(peer), goto psm_end ); /* Set the message source and add the Route-Record */ CHECK_FCT_DO( fd_msg_source_setrr( msg, peer->p_hdr.info.pi_diamid, peer->p_hdr.info.pi_diamidlen, fd_g_config->cnf_dict ), goto psm_end); if ((hdr->msg_flags & CMD_FLAG_REQUEST)) { /* Mark the incoming request so that we know we have pending answers for this peer */ CHECK_POSIX_DO( pthread_mutex_lock(&peer->p_state_mtx), goto psm_end ); peer->p_reqin_count++; CHECK_POSIX_DO( pthread_mutex_unlock(&peer->p_state_mtx), goto psm_end ); } /* Requeue to the global incoming queue */ CHECK_FCT_DO(fd_fifo_post(fd_g_incoming, &msg), goto psm_end ); /* Update the peer timer (only in OPEN state) */ if ((cur_state == STATE_OPEN) && (!peer->p_flags.pf_dw_pending)) { fd_psm_next_timeout(peer, 1, peer->p_hdr.info.config.pic_twtimer ?: fd_g_config->cnf_timer_tw); } break; /* In other states, we discard the message, it is either old or invalid to send it for the remote peer */ case STATE_WAITCNXACK: case STATE_WAITCNXACK_ELEC: case STATE_WAITCEA: case STATE_CLOSED: default: { /* In such case, just discard the message */ char buf[128]; snprintf(buf, sizeof(buf), "Received while peer state machine was in state %s.", STATE_STR(cur_state)); fd_hook_call(HOOK_MESSAGE_DROPPED, msg, peer, buf, fd_msg_pmdl_get(msg)); fd_msg_free(msg); } } goto psm_loop; } /* Link-local message: They must be understood by our dictionary, otherwise we return an error */ { struct msg * error = NULL; int ret = fd_msg_parse_or_error( &msg, &error ); if (ret != EBADMSG) { CHECK_FCT_DO( ret, { char buf[256]; snprintf(buf, sizeof(buf), "%s: An unexpected error occurred while parsing a link-local message", peer->p_hdr.info.pi_diamid); fd_hook_call(HOOK_MESSAGE_DROPPED, msg, peer, buf, fd_msg_pmdl_get(msg)); fd_msg_free(msg); goto psm_end; } ); } else { if (msg == NULL) { /* Send the error back to the peer */ CHECK_FCT_DO( ret = fd_out_send(&error, NULL, peer, 0), ); if (error) { char buf[256]; /* Only if an error occurred & the message was not saved / dumped */ snprintf(buf, sizeof(buf), "%s: error sending a message", peer->p_hdr.info.pi_diamid); fd_hook_call(HOOK_MESSAGE_DROPPED, error, peer, buf, fd_msg_pmdl_get(error)); CHECK_FCT_DO( fd_msg_free(error), goto psm_end); } } else { char buf[256]; /* We received an invalid answer, let's disconnect */ snprintf(buf, sizeof(buf), "%s: Received invalid answer to Base protocol message, disconnecting...", peer->p_hdr.info.pi_diamid); fd_hook_call(HOOK_MESSAGE_DROPPED, msg, peer, buf, fd_msg_pmdl_get(msg)); CHECK_FCT_DO( fd_msg_free(msg), goto psm_end); CHECK_FCT_DO( fd_event_send(peer->p_events, FDEVP_CNX_ERROR, 0, NULL), goto psm_reset ); } goto psm_loop; } } /* Handle the LL message and update the expiry timer appropriately */ switch (hdr->msg_code) { case CC_CAPABILITIES_EXCHANGE: CHECK_FCT_DO( fd_p_ce_msgrcv(&msg, (hdr->msg_flags & CMD_FLAG_REQUEST), peer), { if (msg) CHECK_FCT_DO( fd_msg_free(msg), ); goto psm_reset; } ); break; case CC_DISCONNECT_PEER: CHECK_FCT_DO( fd_p_dp_handle(&msg, (hdr->msg_flags & CMD_FLAG_REQUEST), peer), goto psm_reset ); if (fd_peer_getstate(peer) == STATE_CLOSING) goto psm_end; break; case CC_DEVICE_WATCHDOG: CHECK_FCT_DO( fd_p_dw_handle(&msg, (hdr->msg_flags & CMD_FLAG_REQUEST), peer), goto psm_reset ); break; default: /* Unknown / unexpected / invalid message -- but validated by our dictionary */ TRACE_DEBUG(INFO, "Invalid non-routable command received: %u.", hdr->msg_code); if (hdr->msg_flags & CMD_FLAG_REQUEST) { do { /* Reply with an error code */ CHECK_FCT_DO( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, &msg, MSGFL_ANSW_ERROR ), break ); /* Set the error code */ CHECK_FCT_DO( fd_msg_rescode_set(msg, "DIAMETER_COMMAND_UNSUPPORTED", "Or maybe the P-bit or application Id are erroneous.", NULL, 1 ), break ); /* Send the answer */ CHECK_FCT_DO( fd_out_send(&msg, peer->p_cnxctx, peer, 0), break ); } while (0); } else { /* We did ASK for it ??? */ TRACE_DEBUG(INFO, "Received answer with erroneous 'is_routable' result..."); } /* Cleanup the message if not done */ if (msg) { char buf[256]; snprintf(buf, sizeof(buf), "Received un-handled non-routable command from peer '%s'.", peer->p_hdr.info.pi_diamid); fd_hook_call(HOOK_MESSAGE_DROPPED, msg, NULL, buf, fd_msg_pmdl_get(msg)); CHECK_FCT_DO( fd_msg_free(msg), /* continue */); msg = NULL; } }; /* At this point the message must have been fully handled already */ if (msg) { char buf[256]; snprintf(buf, sizeof(buf), "Internal error ('%s'): unhandled message.", peer->p_hdr.info.pi_diamid); fd_hook_call(HOOK_MESSAGE_DROPPED, msg, NULL, buf, fd_msg_pmdl_get(msg)); fd_msg_free(msg); } goto psm_loop; } /* The connection object is broken */ if (event == FDEVP_CNX_ERROR) { switch (cur_state) { case STATE_WAITCNXACK_ELEC: /* Abort the initiating side */ fd_p_cnx_abort(peer, 0); /* Process the receiver side */ CHECK_FCT_DO( fd_p_ce_process_receiver(peer), goto psm_end ); break; case STATE_WAITCEA: case STATE_OPEN: case STATE_OPEN_NEW: case STATE_REOPEN: case STATE_WAITCNXACK: case STATE_SUSPECT: default: /* Mark the connection problem */ peer->p_flags.pf_cnx_pb = 1; fd_hook_call(HOOK_PEER_CONNECT_FAILED, NULL, peer, "The connection was broken", NULL); /* Destroy the connection, restart the timer to a new connection attempt */ fd_psm_next_timeout(peer, 1, peer->p_hdr.info.config.pic_tctimer ?: fd_g_config->cnf_timer_tc); case STATE_CLOSED: goto psm_reset; case STATE_CLOSING: /* We sent a DPR so we are terminating, do not wait for DPA */ goto psm_end; case STATE_CLOSING_GRACE: if (peer->p_flags.pf_localterm) /* initiated here */ goto psm_end; fd_psm_cleanup(peer, 0); /* Reset the timer for next connection attempt */ fd_psm_next_timeout(peer, 1, fd_p_dp_newdelay(peer)); goto psm_loop; } goto psm_loop; } /* The connection notified a change in endpoints */ if (event == FDEVP_CNX_EP_CHANGE) { /* We actually don't care if we are in OPEN state here... */ /* Cleanup the remote LL and primary addresses */ CHECK_FCT_DO( fd_ep_filter( &peer->p_hdr.info.pi_endpoints, EP_FL_CONF | EP_FL_DISC | EP_FL_ADV ), /* ignore the error */); CHECK_FCT_DO( fd_ep_clearflags( &peer->p_hdr.info.pi_endpoints, EP_FL_PRIMARY ), /* ignore the error */); /* Get the new ones */ CHECK_FCT_DO( fd_cnx_getremoteeps(peer->p_cnxctx, &peer->p_hdr.info.pi_endpoints), /* ignore the error */); /* We do not support local endpoints change currently, but it could be added here if needed (refresh fd_g_config->cnf_endpoints) */ { char * buf = NULL; size_t len = 0; LOG_D("Got low layer notification (IGNORED): remote endpoint(s) changed: %s", fd_ep_dump(&buf, &len, NULL, 0, 0, &peer->p_hdr.info.pi_endpoints) ?: "error"); free(buf); } /* Done */ goto psm_loop; } /* A new connection was established and CER containing this peer id was received */ if (event == FDEVP_CNX_INCOMING) { struct cnx_incoming * params = ev_data; ASSERT(params); /* Handle the message */ CHECK_FCT_DO( fd_p_ce_handle_newCER(¶ms->cer, peer, ¶ms->cnx, params->validate), goto psm_end ); /* Cleanup if needed */ if (params->cnx) { fd_cnx_destroy(params->cnx); params->cnx = NULL; } if (params->cer) { CHECK_FCT_DO( fd_msg_free(params->cer), ); params->cer = NULL; } /* Loop */ free(ev_data); goto psm_loop; } /* A new connection has been established with the remote peer */ if (event == FDEVP_CNX_ESTABLISHED) { struct cnxctx * cnx = ev_data; /* Release the resources of the connecting thread */ CHECK_POSIX_DO( pthread_join( peer->p_ini_thr, NULL), /* ignore, it is not a big deal */); peer->p_ini_thr = (pthread_t)NULL; switch (cur_state) { case STATE_WAITCNXACK_ELEC: case STATE_WAITCNXACK: LOG_D("%s: Connection established, %s", peer->p_hdr.info.pi_diamid, fd_cnx_getid(cnx)); fd_p_ce_handle_newcnx(peer, cnx); break; default: /* Just abort the attempt and continue */ TRACE_DEBUG(FULL, "Connection attempt successful but current state is %s, closing... (too slow?)", STATE_STR(cur_state)); fd_cnx_destroy(cnx); } goto psm_loop; } /* A new connection has not been established with the remote peer */ if (event == FDEVP_CNX_FAILED) { /* Release the resources of the connecting thread */ CHECK_POSIX_DO( pthread_join( peer->p_ini_thr, NULL), /* ignore, it is not a big deal */); peer->p_ini_thr = (pthread_t)NULL; switch (cur_state) { case STATE_WAITCNXACK_ELEC: /* Abort the initiating side */ fd_p_cnx_abort(peer, 0); /* Process the receiver side */ CHECK_FCT_DO( fd_p_ce_process_receiver(peer), goto psm_end ); break; case STATE_WAITCNXACK: /* Go back to CLOSE */ fd_psm_next_timeout(peer, 1, peer->p_hdr.info.config.pic_tctimer ?: fd_g_config->cnf_timer_tc); goto psm_reset; default: /* Just ignore */ TRACE_DEBUG(FULL, "Connection attempt failed but current state is %s, ignoring...", STATE_STR(cur_state)); } goto psm_loop; } /* The timeout for the current state has been reached */ if (event == FDEVP_PSM_TIMEOUT) { switch (cur_state) { case STATE_OPEN: case STATE_REOPEN: case STATE_OPEN_NEW: CHECK_FCT_DO( fd_p_dw_timeout(peer), goto psm_end ); goto psm_loop; case STATE_CLOSED: LOG_D("%s: Connecting...", peer->p_hdr.info.pi_diamid); CHECK_FCT_DO( fd_psm_change_state(peer, STATE_WAITCNXACK), goto psm_end ); fd_psm_next_timeout(peer, 0, CNX_TIMEOUT); CHECK_FCT_DO( fd_p_cnx_init(peer), goto psm_end ); goto psm_loop; case STATE_SUSPECT: /* Mark the connection problem */ peer->p_flags.pf_cnx_pb = 1; case STATE_WAITCNXACK: case STATE_WAITCEA: fd_hook_call(HOOK_PEER_CONNECT_FAILED, NULL, peer, "Timeout while waiting for remote peer", NULL); case STATE_CLOSING: /* Destroy the connection, restart the timer to a new connection attempt */ fd_psm_next_timeout(peer, 1, peer->p_hdr.info.config.pic_tctimer ?: fd_g_config->cnf_timer_tc); goto psm_reset; case STATE_CLOSING_GRACE: /* The grace period is completed, now close */ if (peer->p_flags.pf_localterm) goto psm_end; fd_psm_cleanup(peer, 0); /* Reset the timer for next connection attempt */ fd_psm_next_timeout(peer, 1, fd_p_dp_newdelay(peer)); goto psm_loop; case STATE_WAITCNXACK_ELEC: /* Abort the initiating side */ fd_p_cnx_abort(peer, 0); /* Process the receiver side */ CHECK_FCT_DO( fd_p_ce_process_receiver(peer), goto psm_end ); goto psm_loop; default: ASSERT(0); /* implementation problem, we did not foresee this case? */ } } /* Default action : the handling has not yet been implemented. [for debug only] */ TRACE_DEBUG(INFO, "Missing handler in PSM for '%s'\t<-- '%s'", STATE_STR(cur_state), fd_pev_str(event)); psm_reset: if (peer->p_flags.pf_delete) goto psm_end; fd_psm_cleanup(peer, 0); goto psm_loop; psm_end: LOG_N("%s: Going to ZOMBIE state (no more activity)", peer->p_hdr.info.pi_diamid); fd_psm_cleanup(peer, 1); TRACE_DEBUG(INFO, "'%s'\t-> STATE_ZOMBIE (terminated)\t'%s'", STATE_STR(fd_peer_getstate(peer)), peer->p_hdr.info.pi_diamid); pthread_cleanup_pop(1); /* set STATE_ZOMBIE */ peer->p_psm = (pthread_t)NULL; pthread_detach(pthread_self()); return NULL; } /************************************************************************/ /* Functions to control the PSM */ /************************************************************************/ /* Create the PSM thread of one peer structure */ int fd_psm_begin(struct fd_peer * peer ) { TRACE_ENTRY("%p", peer); /* Check the peer and state are OK */ CHECK_PARAMS( fd_peer_getstate(peer) == STATE_NEW ); /* Create the FIFO for events */ CHECK_FCT( fd_fifo_new(&peer->p_events, 0) ); /* Create the PSM controler thread */ CHECK_POSIX( pthread_create( &peer->p_psm, NULL, p_psm_th, peer ) ); /* We're done */ return 0; } /* End the PSM (clean ending) */ int fd_psm_terminate(struct fd_peer * peer, char * reason ) { TRACE_ENTRY("%p", peer); CHECK_PARAMS( CHECK_PEER(peer) ); if (fd_peer_getstate(peer) != STATE_ZOMBIE) { CHECK_FCT( fd_event_send(peer->p_events, FDEVP_TERMINATE, 0, reason) ); } else { TRACE_DEBUG(FULL, "Peer '%s' was already terminated", peer->p_hdr.info.pi_diamid); } return 0; } /* End the PSM & cleanup the peer structure */ void fd_psm_abord(struct fd_peer * peer ) { TRACE_ENTRY("%p", peer); /* Cancel PSM thread */ CHECK_FCT_DO( fd_thr_term(&peer->p_psm), /* continue */ ); /* Cleanup the data */ fd_psm_cleanup(peer, 1); /* Destroy the event list */ CHECK_FCT_DO( fd_fifo_del(&peer->p_events), /* continue */ ); /* Remaining cleanups are performed in fd_peer_free */ return; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/p_sr.c000066400000000000000000000307611333553357400221220ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" /* Structure to store a sent request */ struct sentreq { struct fd_list chain; /* the "o" field points directly to the (new) hop-by-hop of the request (uint32_t *) */ struct msg *req; /* A request that was sent and not yet answered. */ uint32_t prevhbh;/* The value to set back in the hbh header when the message is retrieved */ struct fd_list expire; /* the list of expiring requests */ struct timespec timeout; /* Cache the expire date of the request so that the timeout thread does not need to get it each time. */ struct timespec added_on; /* the time the request was added */ }; /* Find an element in the hbh list, or the following one */ static struct fd_list * find_or_next(struct fd_list * srlist, uint32_t hbh, int * match) { struct fd_list * li; *match = 0; for (li = srlist->next; li != srlist; li = li->next) { uint32_t * nexthbh = li->o; if (*nexthbh < hbh) continue; if (*nexthbh == hbh) *match = 1; break; } return li; } /* Similar but start from the end, since we add requests in growing hbh order usually */ static struct fd_list * find_or_prev(struct fd_list * srlist, uint32_t hbh, int * match) { struct fd_list * li; *match = 0; for (li = srlist->prev; li != srlist; li = li->prev) { uint32_t * prevhbh = li->o; if (*prevhbh > hbh) continue; if (*prevhbh == hbh) *match = 1; break; } return li; } static void srl_dump(const char * text, struct fd_list * srlist) { struct fd_list * li; struct timespec now; LOG_D("%sSentReq list @%p:", text, srlist); CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &now), ); for (li = srlist->next; li != srlist; li = li->next) { struct sentreq * sr = (struct sentreq *)li; uint32_t * nexthbh = li->o; LOG_D(" - Next req (hbh:0x%x, prev:0x%x): [since %ld.%06ld sec]", *nexthbh, sr->prevhbh, (long)((now.tv_nsec >= sr->added_on.tv_nsec) ? (now.tv_sec - sr->added_on.tv_sec) : (now.tv_sec - sr->added_on.tv_sec - 1)), (long)((now.tv_nsec >= sr->added_on.tv_nsec) ? ((now.tv_nsec - sr->added_on.tv_nsec) / 1000) : ((now.tv_nsec - sr->added_on.tv_nsec + 1000000000) / 1000))); } } /* thread that handles messages expiring. The thread is started only when needed */ static void * sr_expiry_th(void * arg) { struct sr_list * srlist = arg; TRACE_ENTRY("%p", arg); CHECK_PARAMS_DO( arg, return NULL ); /* Set the thread name */ { char buf[48]; snprintf(buf, sizeof(buf), "ReqExp/%s", ((struct fd_peer *)(srlist->exp.o))->p_hdr.info.pi_diamid); fd_log_threadname ( buf ); } do { struct timespec now; struct sentreq * first; struct msg * request; struct fd_peer * sentto; void (*expirecb)(void *, DiamId_t, size_t, struct msg **); void * data; int no_error; CHECK_POSIX_DO( pthread_mutex_lock(&srlist->mtx), return NULL ); pthread_cleanup_push( fd_cleanup_mutex, &srlist->mtx ); loop: no_error = 0; /* Check if there are expiring requests available */ if (FD_IS_LIST_EMPTY(&srlist->exp)) { /* Just wait for a change or cancelation */ CHECK_POSIX_DO( pthread_cond_wait( &srlist->cnd, &srlist->mtx ), goto unlock ); /* Restart the loop on wakeup */ goto loop; } /* Get the pointer to the request that expires first */ first = (struct sentreq *)(srlist->exp.next->o); /* Get the current time */ CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &now), goto unlock ); /* If first request is not expired, we just wait until it happens */ if ( TS_IS_INFERIOR( &now, &first->timeout ) ) { CHECK_POSIX_DO2( pthread_cond_timedwait( &srlist->cnd, &srlist->mtx, &first->timeout ), ETIMEDOUT, /* ETIMEDOUT is a normal return value, continue */, /* on other error, */ goto unlock ); /* on wakeup, loop */ goto loop; } /* Now, the first request in the list is expired; remove it and call the expirecb for it */ request = first->req; sentto = first->chain.head->o; TRACE_DEBUG(FULL, "Request %x was not answered by %s within the timer delay", *((uint32_t *)first->chain.o), sentto->p_hdr.info.pi_diamid); /* Restore the hbhid */ *((uint32_t *)first->chain.o) = first->prevhbh; /* Free the sentreq information */ fd_list_unlink(&first->chain); srlist->cnt--; srlist->cnt_lost++; /* We are not waiting for this answer anymore, but the remote peer may still be processing it. */ fd_list_unlink(&first->expire); free(first); no_error = 1; unlock: ; /* pthread_cleanup_pop sometimes expands as "} ..." and the label before this cause some compilers to complain... */ pthread_cleanup_pop( 1 ); /* unlock the mutex */ if (!no_error) break; /* Retrieve callback in the message */ CHECK_FCT_DO( fd_msg_anscb_get( request, NULL, &expirecb, &data ), break); ASSERT(expirecb); /* Clean up this expirecb from the message */ CHECK_FCT_DO( fd_msg_anscb_reset( request, 0, 1 ), break); /* Call it */ (*expirecb)(data, sentto->p_hdr.info.pi_diamid, sentto->p_hdr.info.pi_diamidlen, &request); /* If the callback did not dispose of the message, do it now */ if (request) { fd_hook_call(HOOK_MESSAGE_DROPPED, request, NULL, "Expiration period completed without an answer, and the expiry callback did not dispose of the message.", fd_msg_pmdl_get(request)); CHECK_FCT_DO( fd_msg_free(request), /* ignore */ ); } } while (1); ASSERT(0); /* we have encountered a problem, maybe time to signal the framework to terminate? */ return NULL; } /* Store a new sent request */ int fd_p_sr_store(struct sr_list * srlist, struct msg **req, uint32_t *hbhloc, uint32_t hbh_restore) { struct sentreq * sr; struct fd_list * prev; int match; struct timespec * ts; TRACE_ENTRY("%p %p %p %x", srlist, req, hbhloc, hbh_restore); CHECK_PARAMS(srlist && req && *req && hbhloc); CHECK_MALLOC( sr = malloc(sizeof(struct sentreq)) ); memset(sr, 0, sizeof(struct sentreq)); fd_list_init(&sr->chain, hbhloc); sr->req = *req; sr->prevhbh = hbh_restore; fd_list_init(&sr->expire, sr); CHECK_SYS( clock_gettime(CLOCK_REALTIME, &sr->added_on) ); /* Search the place in the list */ CHECK_POSIX( pthread_mutex_lock(&srlist->mtx) ); prev = find_or_prev(&srlist->srs, *hbhloc, &match); if (match) { TRACE_DEBUG(INFO, "A request with the same hop-by-hop Id (0x%x) was already sent: error", *hbhloc); free(sr); srl_dump("Current list of SR: ", &srlist->srs); CHECK_POSIX_DO( pthread_mutex_unlock(&srlist->mtx), /* ignore */ ); return EINVAL; } /* Save in the list */ *req = NULL; fd_list_insert_after(prev, &sr->chain); srlist->cnt++; /* In case of request with a timeout, also store in the timeout list */ ts = fd_msg_anscb_gettimeout( sr->req ); if (ts) { struct fd_list * li; memcpy(&sr->timeout, ts, sizeof(struct timespec)); /* browse srlist->exp from the end */ for (li = srlist->exp.prev; li != &srlist->exp; li = li->prev) { struct sentreq * s = (struct sentreq *)(li->o); if (TS_IS_INFERIOR(&s->timeout, ts)) break; } fd_list_insert_after(li, &sr->expire); /* if the thread does not exist yet, create it */ if (srlist->thr == (pthread_t)NULL) { CHECK_POSIX_DO( pthread_create(&srlist->thr, NULL, sr_expiry_th, srlist), /* continue anyway */); } else { /* or, if added in first position, signal the condvar to update the sleep time of the thread */ if (li == &srlist->exp) { CHECK_POSIX_DO( pthread_cond_signal(&srlist->cnd), /* continue anyway */); } } } CHECK_POSIX( pthread_mutex_unlock(&srlist->mtx) ); return 0; } /* Fetch a request by hbh */ int fd_p_sr_fetch(struct sr_list * srlist, uint32_t hbh, struct msg **req) { struct sentreq * sr; int match; TRACE_ENTRY("%p %x %p", srlist, hbh, req); CHECK_PARAMS(srlist && req); /* Search the request in the list */ CHECK_POSIX( pthread_mutex_lock(&srlist->mtx) ); sr = (struct sentreq *)find_or_next(&srlist->srs, hbh, &match); if (!match) { TRACE_DEBUG(INFO, "There is no saved request with this hop-by-hop id (%x)", hbh); srl_dump("Current list of SR: ", &srlist->srs); *req = NULL; if (srlist->cnt_lost > 0) { srlist->cnt_lost--; /* This is probably an answer for a request we already timedout. */ } /* else, probably a bug in the remote peer */ } else { /* Restore hop-by-hop id */ *((uint32_t *)sr->chain.o) = sr->prevhbh; /* Unlink */ fd_list_unlink(&sr->chain); srlist->cnt--; fd_list_unlink(&sr->expire); *req = sr->req; free(sr); } CHECK_POSIX( pthread_mutex_unlock(&srlist->mtx) ); /* do not stop the expire thread here, it might cause creating/destroying it very often otherwise */ /* Done */ return 0; } /* Failover requests (free or requeue routables) */ void fd_p_sr_failover(struct sr_list * srlist) { CHECK_POSIX_DO( pthread_mutex_lock(&srlist->mtx), /* continue anyway */ ); while (!FD_IS_LIST_EMPTY(&srlist->srs)) { struct sentreq * sr = (struct sentreq *)(srlist->srs.next); fd_list_unlink(&sr->chain); srlist->cnt--; fd_list_unlink(&sr->expire); if (fd_msg_is_routable(sr->req)) { struct msg_hdr * hdr = NULL; int ret; /* Set the 'T' flag */ CHECK_FCT_DO(fd_msg_hdr(sr->req, &hdr), /* continue */); if (hdr) hdr->msg_flags |= CMD_FLAG_RETRANSMIT; /* Restore the original hop-by-hop id of the request */ *((uint32_t *)sr->chain.o) = sr->prevhbh; fd_hook_call(HOOK_MESSAGE_FAILOVER, sr->req, (struct fd_peer *)srlist->srs.o, NULL, fd_msg_pmdl_get(sr->req)); /* Requeue for sending to another peer */ CHECK_FCT_DO( ret = fd_fifo_post_noblock(fd_g_outgoing, (void *)&sr->req), { char buf[256]; snprintf(buf, sizeof(buf), "Internal error: error while requeuing during failover: %s", strerror(ret)); fd_hook_call(HOOK_MESSAGE_DROPPED, sr->req, NULL, buf, fd_msg_pmdl_get(sr->req)); CHECK_FCT_DO(fd_msg_free(sr->req), /* What can we do more? */) }); } else { /* Just free the request. */ /* fd_hook_call(HOOK_MESSAGE_DROPPED, sr->req, NULL, "Sent & unanswered local message discarded during failover.", fd_msg_pmdl_get(sr->req)); */ CHECK_FCT_DO(fd_msg_free(sr->req), /* Ignore */); } free(sr); } /* The list of expiring requests must be empty now */ ASSERT( FD_IS_LIST_EMPTY(&srlist->exp) ); ASSERT( srlist->cnt == 0 ); /* debug the counter management if needed */ CHECK_POSIX_DO( pthread_mutex_unlock(&srlist->mtx), /* continue anyway */ ); /* Terminate the expiry thread (must be done when the lock can be taken) */ CHECK_FCT_DO( fd_thr_term(&srlist->thr), /* ignore error */ ); } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/peers.c000066400000000000000000000567271333553357400223070ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" /* Global list of peers */ struct fd_list fd_g_peers = FD_LIST_INITIALIZER(fd_g_peers); pthread_rwlock_t fd_g_peers_rw = PTHREAD_RWLOCK_INITIALIZER; /* List of active peers */ struct fd_list fd_g_activ_peers = FD_LIST_INITIALIZER(fd_g_activ_peers); /* peers linked by their p_actives oredered by p_diamid */ pthread_rwlock_t fd_g_activ_peers_rw = PTHREAD_RWLOCK_INITIALIZER; /* List of validation callbacks (registered with fd_peer_validate_register) */ static struct fd_list validators = FD_LIST_INITIALIZER(validators); /* list items are simple fd_list with "o" pointing to the callback */ static pthread_rwlock_t validators_rw = PTHREAD_RWLOCK_INITIALIZER; /* Alloc / reinit a peer structure. if *ptr is not NULL, it must already point to a valid struct fd_peer. */ int fd_peer_alloc(struct fd_peer ** ptr) { struct fd_peer *p; TRACE_ENTRY("%p", ptr); CHECK_PARAMS(ptr); if (*ptr) { p = *ptr; } else { CHECK_MALLOC( p = malloc(sizeof(struct fd_peer)) ); *ptr = p; } /* Now initialize the content */ memset(p, 0, sizeof(struct fd_peer)); fd_list_init(&p->p_hdr.chain, p); fd_list_init(&p->p_hdr.info.pi_endpoints, p); fd_list_init(&p->p_hdr.info.runtime.pir_apps, p); p->p_eyec = EYEC_PEER; CHECK_POSIX( pthread_mutex_init(&p->p_state_mtx, NULL) ); fd_list_init(&p->p_actives, p); fd_list_init(&p->p_expiry, p); CHECK_FCT( fd_fifo_new(&p->p_tosend, 5) ); CHECK_FCT( fd_fifo_new(&p->p_tofailover, 0) ); p->p_hbh = lrand48(); fd_list_init(&p->p_sr.srs, p); fd_list_init(&p->p_sr.exp, p); CHECK_POSIX( pthread_mutex_init(&p->p_sr.mtx, NULL) ); CHECK_POSIX( pthread_cond_init(&p->p_sr.cnd, NULL) ); fd_list_init(&p->p_connparams, p); return 0; } /* Add a new peer entry */ int fd_peer_add ( struct peer_info * info, const char * orig_dbg, void (*cb)(struct peer_info *, void *), void * cb_data ) { struct fd_peer *p = NULL; struct fd_list * li, *li_inf; int ret = 0; TRACE_ENTRY("%p %p %p %p", info, orig_dbg, cb, cb_data); CHECK_PARAMS(info && info->pi_diamid); if (info->config.pic_realm) { if (!fd_os_is_valid_DiameterIdentity((os0_t)info->config.pic_realm, strlen(info->config.pic_realm))) { TRACE_DEBUG(INFO, "'%s' is not a valid DiameterIdentity.", info->config.pic_realm); return EINVAL; } } /* Create a structure to contain the new peer information */ CHECK_FCT( fd_peer_alloc(&p) ); /* Copy the informations from the parameters received */ p->p_hdr.info.pi_diamid = info->pi_diamid; CHECK_FCT( fd_os_validate_DiameterIdentity(&p->p_hdr.info.pi_diamid, &p->p_hdr.info.pi_diamidlen, 1) ); memcpy( &p->p_hdr.info.config, &info->config, sizeof(p->p_hdr.info.config) ); /* Duplicate the strings if provided */ if (info->config.pic_realm) { CHECK_MALLOC( p->p_hdr.info.config.pic_realm = strdup(info->config.pic_realm) ); } if (info->config.pic_priority) { CHECK_MALLOC( p->p_hdr.info.config.pic_priority = strdup(info->config.pic_priority) ); } /* Move the list of endpoints into the peer */ if (info->pi_endpoints.next) while (!FD_IS_LIST_EMPTY( &info->pi_endpoints ) ) { li = info->pi_endpoints.next; fd_list_unlink(li); fd_list_insert_before(&p->p_hdr.info.pi_endpoints, li); } /* The internal data */ if (orig_dbg) { CHECK_MALLOC( p->p_dbgorig = strdup(orig_dbg) ); } else { CHECK_MALLOC( p->p_dbgorig = strdup("unspecified") ); } p->p_cb = cb; p->p_cb_data = cb_data; /* Ok, now check if we don't already have an entry with the same Diameter Id, and insert this one */ CHECK_POSIX( pthread_rwlock_wrlock(&fd_g_peers_rw) ); li_inf = &fd_g_peers; for (li = fd_g_peers.next; li != &fd_g_peers; li = li->next) { struct fd_peer * next = (struct fd_peer *)li; int cont; int cmp = fd_os_almostcasesrch( p->p_hdr.info.pi_diamid, p->p_hdr.info.pi_diamidlen, next->p_hdr.info.pi_diamid, next->p_hdr.info.pi_diamidlen, &cont ); if (cmp > 0) li_inf = li; /* it will come after this element, for sure */ if (cmp == 0) { ret = EEXIST; /* we have a duplicate */ break; } if (!cont) break; } /* We can insert the new peer object */ if (! ret) do { /* Update expiry list */ CHECK_FCT_DO( ret = fd_p_expi_update( p ), break ); /* Insert the new element in the list */ fd_list_insert_after( li_inf, &p->p_hdr.chain ); } while (0); CHECK_POSIX( pthread_rwlock_unlock(&fd_g_peers_rw) ); if (ret) { CHECK_FCT( fd_peer_free(&p) ); } else { CHECK_FCT( fd_psm_begin(p) ); } return ret; } /* Search for a peer */ int fd_peer_getbyid( DiamId_t diamid, size_t diamidlen, int igncase, struct peer_hdr ** peer ) { struct fd_list * li; TRACE_ENTRY("%p %zd %d %p", diamid, diamidlen, igncase, peer); CHECK_PARAMS( diamid && diamidlen && peer ); *peer = NULL; /* Search in the list */ CHECK_POSIX( pthread_rwlock_rdlock(&fd_g_peers_rw) ); if (igncase) { for (li = fd_g_peers.next; li != &fd_g_peers; li = li->next) { struct fd_peer * next = (struct fd_peer *)li; int cmp, cont; cmp = fd_os_almostcasesrch( diamid, diamidlen, next->p_hdr.info.pi_diamid, next->p_hdr.info.pi_diamidlen, &cont ); if (cmp == 0) { *peer = &next->p_hdr; break; } if (!cont) break; } } else { for (li = fd_g_peers.next; li != &fd_g_peers; li = li->next) { struct fd_peer * next = (struct fd_peer *)li; int cmp = fd_os_cmp( diamid, diamidlen, next->p_hdr.info.pi_diamid, next->p_hdr.info.pi_diamidlen ); if (cmp > 0) continue; if (cmp == 0) *peer = &next->p_hdr; break; } } CHECK_POSIX( pthread_rwlock_unlock(&fd_g_peers_rw) ); return 0; } #define free_null( _v ) \ if (_v) { \ free(_v); \ (_v) = NULL; \ } #define free_list( _l ) \ while (!FD_IS_LIST_EMPTY(_l)) { \ struct fd_list * __li = ((struct fd_list *)(_l))->next; \ fd_list_unlink(__li); \ free(__li); \ } /* Empty the lists of p_tosend, p_failover, and p_sentreq messages */ void fd_peer_failover_msg(struct fd_peer * peer) { struct msg *m; TRACE_ENTRY("%p", peer); CHECK_PARAMS_DO(CHECK_PEER(peer), return); /* Requeue all messages in the "out" queue */ while ( fd_fifo_tryget(peer->p_tosend, &m) == 0 ) { /* but only if they are routable */ if (fd_msg_is_routable(m)) { fd_hook_call(HOOK_MESSAGE_FAILOVER, m, peer, NULL, fd_msg_pmdl_get(m)); CHECK_FCT_DO(fd_fifo_post_noblock(fd_g_outgoing, (void *)&m), { /* fallback: destroy the message */ fd_hook_call(HOOK_MESSAGE_DROPPED, m, NULL, "Internal error: unable to requeue this message during failover process", fd_msg_pmdl_get(m)); CHECK_FCT_DO(fd_msg_free(m), /* What can we do more? */) } ); } else { /* Just free it */ /* fd_hook_call(HOOK_MESSAGE_DROPPED, m, NULL, "Non-routable message freed during handover", fd_msg_pmdl_get(m)); */ CHECK_FCT_DO(fd_msg_free(m), /* What can we do more? */) } } /* Requeue all messages in the "failover" queue */ while ( fd_fifo_tryget(peer->p_tofailover, &m) == 0 ) { fd_hook_call(HOOK_MESSAGE_FAILOVER, m, peer, NULL, fd_msg_pmdl_get(m)); CHECK_FCT_DO(fd_fifo_post_noblock(fd_g_outgoing, (void *)&m), { /* fallback: destroy the message */ fd_hook_call(HOOK_MESSAGE_DROPPED, m, NULL, "Internal error: unable to requeue this message during failover process", fd_msg_pmdl_get(m)); CHECK_FCT_DO(fd_msg_free(m), /* What can we do more? */) } ); } /* Requeue all routable sent requests */ fd_p_sr_failover(&peer->p_sr); /* Done */ return; } /* Describe the current connection */ int fd_peer_cnx_proto_info(struct peer_hdr *peer, char * buf, size_t len) { struct fd_peer * p = (struct fd_peer *)peer; TRACE_ENTRY("%p %p %zd", peer, buf, len); CHECK_PARAMS(CHECK_PEER(peer) && buf && len); if (p->p_cnxctx) { CHECK_FCT(fd_cnx_proto_info(p->p_cnxctx, buf, len)); } else if (p->p_receiver) { CHECK_FCT(fd_cnx_proto_info(p->p_receiver, buf, len)); } else { snprintf(buf, len, "Not Connected"); } return 0; } /* Return the value of srlist->cnt */ int fd_peer_get_load_pending(struct peer_hdr *peer, long * to_receive, long * to_send) { struct fd_peer * p = (struct fd_peer *)peer; TRACE_ENTRY("%p %p %p", peer, to_receive, to_send); CHECK_PARAMS(CHECK_PEER(peer)); if (to_receive) { CHECK_POSIX( pthread_mutex_lock(&p->p_sr.mtx) ); *to_receive = p->p_sr.cnt; CHECK_POSIX( pthread_mutex_unlock(&p->p_sr.mtx) ); } if (to_send) { CHECK_POSIX( pthread_mutex_lock(&p->p_state_mtx) ); *to_send = p->p_reqin_count; CHECK_POSIX( pthread_mutex_unlock(&p->p_state_mtx) ); } return 0; } /* Destroy a structure once cleanups have been performed (fd_psm_abord, ...) */ int fd_peer_free(struct fd_peer ** ptr) { struct fd_peer *p; TRACE_ENTRY("%p", ptr); CHECK_PARAMS(ptr); p = *ptr; *ptr = NULL; CHECK_PARAMS(p); CHECK_PARAMS( FD_IS_LIST_EMPTY(&p->p_hdr.chain) ); free_null(p->p_hdr.info.pi_diamid); free_null(p->p_hdr.info.config.pic_realm); free_null(p->p_hdr.info.config.pic_priority); free_null(p->p_hdr.info.runtime.pir_realm); free_null(p->p_hdr.info.runtime.pir_prodname); free_list( &p->p_hdr.info.runtime.pir_apps ); free_list( &p->p_hdr.info.pi_endpoints ); free_null(p->p_dbgorig); fd_list_unlink(&p->p_expiry); fd_list_unlink(&p->p_actives); CHECK_FCT_DO( fd_fifo_del(&p->p_tosend), /* continue */ ); CHECK_FCT_DO( fd_fifo_del(&p->p_tofailover), /* continue */ ); CHECK_POSIX_DO( pthread_mutex_destroy(&p->p_state_mtx), /* continue */); CHECK_POSIX_DO( pthread_mutex_destroy(&p->p_sr.mtx), /* continue */); CHECK_POSIX_DO( pthread_cond_destroy(&p->p_sr.cnd), /* continue */); /* If the callback is still around... */ if (p->p_cb) (*p->p_cb)(NULL, p->p_cb_data); /* Free the structure */ free(p); return 0; } /* Terminate peer module (destroy all peers, first gently, then violently) */ int fd_peer_fini() { struct fd_list * li; struct fd_list purge = FD_LIST_INITIALIZER(purge); /* Store zombie peers here */ int list_empty; struct timespec wait_until, now; TRACE_ENTRY(); CHECK_FCT_DO(fd_p_expi_fini(), /* continue */); TRACE_DEBUG(INFO, "Sending terminate signal to all peer connections"); CHECK_FCT_DO( pthread_rwlock_wrlock(&fd_g_peers_rw), /* continue */ ); for (li = fd_g_peers.next; li != &fd_g_peers; li = li->next) { struct fd_peer * peer = (struct fd_peer *)li->o; if (fd_peer_getstate(peer) != STATE_ZOMBIE) { CHECK_FCT_DO( fd_psm_terminate(peer, "REBOOTING"), /* continue */ ); } else { li = li->prev; /* to avoid breaking the loop */ fd_list_unlink(&peer->p_hdr.chain); fd_list_insert_before(&purge, &peer->p_hdr.chain); } } list_empty = FD_IS_LIST_EMPTY(&fd_g_peers); CHECK_FCT_DO( pthread_rwlock_unlock(&fd_g_peers_rw), /* continue */ ); if (!list_empty) { CHECK_SYS( clock_gettime(CLOCK_REALTIME, &now) ); fd_psm_start(); /* just in case */ TRACE_DEBUG(INFO, "Waiting for connections shutdown... (%d sec max)", DPR_TIMEOUT + 1); wait_until.tv_sec = now.tv_sec + DPR_TIMEOUT + 1; wait_until.tv_nsec = now.tv_nsec; } while ((!list_empty) && (TS_IS_INFERIOR(&now, &wait_until))) { /* Allow the PSM(s) to execute */ usleep(100000); /* Remove zombie peers */ CHECK_FCT_DO( pthread_rwlock_wrlock(&fd_g_peers_rw), /* continue */ ); for (li = fd_g_peers.next; li != &fd_g_peers; li = li->next) { struct fd_peer * peer = (struct fd_peer *)li->o; if (fd_peer_getstate(peer) == STATE_ZOMBIE) { li = li->prev; /* to avoid breaking the loop */ fd_list_unlink(&peer->p_hdr.chain); fd_list_insert_before(&purge, &peer->p_hdr.chain); } } list_empty = FD_IS_LIST_EMPTY(&fd_g_peers); CHECK_FCT_DO( pthread_rwlock_unlock(&fd_g_peers_rw), /* continue */ ); CHECK_SYS( clock_gettime(CLOCK_REALTIME, &now) ); } if (!list_empty) { TRACE_DEBUG(INFO, "Forcing connections shutdown"); CHECK_FCT_DO( pthread_rwlock_wrlock(&fd_g_peers_rw), /* continue */ ); while (!FD_IS_LIST_EMPTY(&fd_g_peers)) { struct fd_peer * peer = (struct fd_peer *)(fd_g_peers.next->o); fd_psm_abord(peer); fd_list_unlink(&peer->p_hdr.chain); fd_list_insert_before(&purge, &peer->p_hdr.chain); } CHECK_FCT_DO( pthread_rwlock_unlock(&fd_g_peers_rw), /* continue */ ); } /* Free memory objects of all peers */ while (!FD_IS_LIST_EMPTY(&purge)) { struct fd_peer * peer = (struct fd_peer *)(purge.next->o); fd_list_unlink(&peer->p_hdr.chain); fd_peer_free(&peer); } /* Now empty the validators list */ CHECK_FCT_DO( pthread_rwlock_wrlock(&validators_rw), /* continue */ ); while (!FD_IS_LIST_EMPTY( &validators )) { struct fd_list * v = validators.next; fd_list_unlink(v); free(v); } CHECK_FCT_DO( pthread_rwlock_unlock(&validators_rw), /* continue */ ); return 0; } /* Dump info of one peer */ DECLARE_FD_DUMP_PROTOTYPE(fd_peer_dump, struct peer_hdr * p, int details) { FD_DUMP_HANDLE_OFFSET(); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "{peer}(@%p): ", p), return NULL); if (!CHECK_PEER(p)) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "INVALID/NULL"), return NULL); } else { struct fd_peer * peer = (struct fd_peer *)p; CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "%s [%s, cnt:%ldsr,%ldpa]", peer->p_hdr.info.pi_diamid, STATE_STR(fd_peer_getstate(peer)), peer->p_sr.cnt, peer->p_reqin_count), return NULL); if (details > 0) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " rlm:%s", peer->p_hdr.info.runtime.pir_realm ?: ""), return NULL); if (peer->p_hdr.info.runtime.pir_prodname) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " ['%s' %u]", peer->p_hdr.info.runtime.pir_prodname, peer->p_hdr.info.runtime.pir_firmrev), return NULL); } } if (details > 1) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " [from:%s] flags:%s%s%s%s%s%s%s%s lft:%ds", peer->p_dbgorig ?: "unset", peer->p_hdr.info.config.pic_flags.pro3 == PI_P3_DEFAULT ? "-" : (peer->p_hdr.info.config.pic_flags.pro3 == PI_P3_IP ? "4" : "6"), peer->p_hdr.info.config.pic_flags.pro4 == PI_P4_DEFAULT ? "-" : (peer->p_hdr.info.config.pic_flags.pro4 == PI_P4_TCP ? "T" : "S"), peer->p_hdr.info.config.pic_flags.alg ? "P" : "-", peer->p_hdr.info.config.pic_flags.sec & PI_SEC_NONE ? "N" :"-", peer->p_hdr.info.config.pic_flags.sec & PI_SEC_TLS_OLD ? "O" :"-", peer->p_hdr.info.config.pic_flags.sctpsec & PI_SCTPSEC_3436 ? "3" :"-", peer->p_hdr.info.config.pic_flags.exp ? "E" : "-", peer->p_hdr.info.config.pic_flags.persist ? "P" : "-", peer->p_hdr.info.config.pic_lft), return NULL); } } return *buf; } /* Dump the list of peers */ DECLARE_FD_DUMP_PROTOTYPE(fd_peer_dump_list, int details) { struct fd_list * li; FD_DUMP_HANDLE_OFFSET(); CHECK_FCT_DO( pthread_rwlock_rdlock(&fd_g_peers_rw), /* continue */ ); for (li = fd_g_peers.next; li != &fd_g_peers; li = li->next) { CHECK_MALLOC_DO( fd_peer_dump(FD_DUMP_STD_PARAMS, (struct peer_hdr *)li->o, details), break); if (li->next != &fd_g_peers) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "\n"), break); } } CHECK_FCT_DO( pthread_rwlock_unlock(&fd_g_peers_rw), /* continue */ ); return *buf; } static struct dict_object *avp_oh_model = NULL; static pthread_mutex_t cache_avp_lock = PTHREAD_MUTEX_INITIALIZER; /* Handle an incoming CER request on a new connection */ int fd_peer_handle_newCER( struct msg ** cer, struct cnxctx ** cnx ) { struct msg * msg; struct avp *avp_oh; struct avp_hdr * avp_hdr; struct fd_list * li, *li_inf; int found = 0; int ret = 0; struct fd_peer * peer; struct cnx_incoming * ev_data; TRACE_ENTRY("%p %p", cer, cnx); CHECK_PARAMS(cer && *cer && cnx && *cnx); msg = *cer; /* If needed, resolve the dictionary model for Origin-Host */ CHECK_POSIX( pthread_mutex_lock(&cache_avp_lock) ); if (!avp_oh_model) { avp_code_t code = AC_ORIGIN_HOST; CHECK_FCT_DO( fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_CODE, &code, &avp_oh_model, ENOENT), { LOG_E("Cannot find Origin-Host AVP definition in the dictionary!"); (void) pthread_mutex_unlock(&cache_avp_lock); return __ret__; } ); } CHECK_POSIX( pthread_mutex_unlock(&cache_avp_lock) ); /* Find the Diameter Identity of the remote peer in the message */ CHECK_FCT( fd_msg_search_avp ( msg, avp_oh_model, &avp_oh ) ); ASSERT(avp_oh); /* otherwise it should not have passed rules validation, right? */ CHECK_FCT( fd_msg_avp_hdr ( avp_oh, &avp_hdr ) ); /* First, check if the Origin-Host value is valid */ if (!fd_os_is_valid_DiameterIdentity(avp_hdr->avp_value->os.data, avp_hdr->avp_value->os.len)) { CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, cer, MSGFL_ANSW_ERROR ) ); CHECK_FCT( fd_msg_rescode_set(*cer, "DIAMETER_INVALID_AVP_VALUE", "Your Origin-Host contains invalid characters.", avp_oh, 1 ) ); fd_hook_call(HOOK_PEER_CONNECT_FAILED, *cer, NULL, "Received CER with invalid Origin-Host AVP", NULL); CHECK_FCT( fd_out_send(cer, *cnx, NULL, 0) ); return EINVAL; } /* Search if we already have this peer id in our list. We take directly the write lock so that we don't need to upgrade if it is a new peer. * There is space for a small optimization here if needed. */ CHECK_POSIX( pthread_rwlock_wrlock(&fd_g_peers_rw) ); li_inf = &fd_g_peers; for (li = fd_g_peers.next; li != &fd_g_peers; li = li->next) { int cmp, cont; peer = (struct fd_peer *)li; cmp = fd_os_almostcasesrch( avp_hdr->avp_value->os.data, avp_hdr->avp_value->os.len, peer->p_hdr.info.pi_diamid, peer->p_hdr.info.pi_diamidlen, &cont ); if (cmp > 0) { li_inf = li; } if (cmp == 0) { found = 1; break; } if (!cont) break; } if (!found) { /* Create a new peer entry for this new remote peer */ peer = NULL; CHECK_FCT_DO( ret = fd_peer_alloc(&peer), goto out ); /* Set the peer Diameter Id and the responder flag parameters */ CHECK_MALLOC_DO( peer->p_hdr.info.pi_diamid = os0dup(avp_hdr->avp_value->os.data, avp_hdr->avp_value->os.len), { ret = ENOMEM; goto out; } ); peer->p_hdr.info.pi_diamidlen = avp_hdr->avp_value->os.len; CHECK_MALLOC_DO( peer->p_dbgorig = strdup(fd_cnx_getid(*cnx)), { ret = ENOMEM; goto out; } ); peer->p_flags.pf_responder = 1; peer->p_flags.pf_delete = 1; LOG_D("Created new peer object for incoming CER: %s", peer->p_hdr.info.pi_diamid); #ifndef DISABLE_PEER_EXPIRY /* Set this peer to expire on inactivity */ peer->p_hdr.info.config.pic_flags.exp = PI_EXP_INACTIVE; peer->p_hdr.info.config.pic_lft = 3600; /* 1 hour without any message -- RFC3539 states that this must not be inferior to BRINGDOWN_INTERVAL = 5 minutes */ CHECK_FCT_DO( ret = fd_p_expi_update( peer ), goto out ); #endif /* DISABLE_PEER_EXPIRY */ /* Insert the new peer in the list (the PSM will take care of setting the expiry after validation) */ fd_list_insert_after( li_inf, &peer->p_hdr.chain ); /* Start the PSM, which will receive the event below */ CHECK_FCT_DO( ret = fd_psm_begin(peer), goto out ); } else { /* Check if the peer is in zombie state */ if (fd_peer_getstate(peer) == STATE_ZOMBIE) { /* Re-activate the peer */ if (peer->p_hdr.info.config.pic_flags.exp) peer->p_flags.pf_responder = 1; CHECK_POSIX_DO( pthread_mutex_lock(&peer->p_state_mtx), ); peer->p_state = STATE_NEW; CHECK_POSIX_DO( pthread_mutex_unlock(&peer->p_state_mtx), ); peer->p_flags.pf_localterm = 0; CHECK_FCT_DO( ret = fd_psm_begin(peer), goto out ); } } /* Send the new connection event to the PSM */ CHECK_MALLOC_DO( ev_data = malloc(sizeof(struct cnx_incoming)), { ret = ENOMEM; goto out; } ); memset(ev_data, 0, sizeof(*ev_data)); ev_data->cer = msg; ev_data->cnx = *cnx; ev_data->validate = !found; CHECK_FCT_DO( ret = fd_event_send(peer->p_events, FDEVP_CNX_INCOMING, sizeof(*ev_data), ev_data), goto out ); out: CHECK_POSIX( pthread_rwlock_unlock(&fd_g_peers_rw) ); if (ret == 0) { /* Reset the "out" parameters, so that they are not cleanup on function return. */ *cer = NULL; *cnx = NULL; } else { char buf[1024]; snprintf(buf, sizeof(buf), "An error occurred while processing new incoming CER: %s", strerror(ret)); fd_hook_call(HOOK_PEER_CONNECT_FAILED, *cer, NULL, buf, NULL); } return ret; } /* Save a callback to accept / reject incoming unknown peers */ int fd_peer_validate_register ( int (*peer_validate)(struct peer_info * /* info */, int * /* auth */, int (**cb2)(struct peer_info *)) ) { struct fd_list * v; TRACE_ENTRY("%p", peer_validate); CHECK_PARAMS(peer_validate); /* Alloc a new entry */ CHECK_MALLOC( v = malloc(sizeof(struct fd_list)) ); fd_list_init( v, peer_validate ); /* Add at the beginning of the list */ CHECK_FCT( pthread_rwlock_wrlock(&validators_rw) ); fd_list_insert_after(&validators, v); CHECK_FCT( pthread_rwlock_unlock(&validators_rw)); /* Done! */ return 0; } /* Validate a peer by calling the callbacks in turn -- return 0 if the peer is validated, ! 0 in case of error (>0) or if the peer is rejected (-1) */ int fd_peer_validate( struct fd_peer * peer ) { int ret = 0; struct fd_list * v; CHECK_FCT( pthread_rwlock_rdlock(&validators_rw) ); for (v = validators.next; v != &validators; v = v->next) { int auth = 0; pthread_cleanup_push(fd_cleanup_rwlock, &validators_rw); CHECK_FCT_DO( ret = ((int(*)(struct peer_info *, int *, int (**)(struct peer_info *)))(v->o)) (&peer->p_hdr.info, &auth, &peer->p_cb2), ); pthread_cleanup_pop(0); if (ret) goto out; if (auth) { ret = (auth > 0) ? 0 : -1; goto out; } peer->p_cb2 = NULL; } /* No callback has given a firm result, the default is to reject */ ret = -1; out: CHECK_FCT( pthread_rwlock_unlock(&validators_rw)); return ret; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/queues.c000066400000000000000000000066421333553357400224670ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" /* The global message queues */ struct fifo * fd_g_incoming = NULL; struct fifo * fd_g_outgoing = NULL; struct fifo * fd_g_local = NULL; /* Initialize the message queues. */ int fd_queues_init(void) { TRACE_ENTRY(); CHECK_FCT( fd_fifo_new ( &fd_g_incoming, 20 ) ); CHECK_FCT( fd_fifo_new ( &fd_g_outgoing, 30 ) ); CHECK_FCT( fd_fifo_new ( &fd_g_local, 25 ) ); return 0; } /* Destroy a queue after emptying it (and dumping the content) */ int fd_queues_fini(struct fifo ** queue) { struct msg * msg; int ret = 0; TRACE_ENTRY("%p", queue); /* Note : the threads that post into this queue should already been stopped before this !!! */ CHECK_PARAMS(queue); if (*queue == NULL) return 0; /* the queue was not already initialized */ /* Empty all contents */ while (1) { /* Check if there is a message in the queue */ ret = fd_fifo_tryget(*queue, &msg); if (ret == EWOULDBLOCK) break; CHECK_FCT(ret); /* We got one! */ fd_hook_call(HOOK_MESSAGE_DROPPED, msg, NULL, "Message lost because framework is terminating.", fd_msg_pmdl_get(msg)); fd_msg_free(msg); } /* Now, delete the empty queue */ CHECK_FCT( fd_fifo_del ( queue ) ); return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/routing_dispatch.c000066400000000000000000001316361333553357400245300ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2015, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" /********************************************************************************/ /* First part : handling the extensions callbacks */ /********************************************************************************/ /* Lists of the callbacks, and locks to protect them */ static pthread_rwlock_t rt_fwd_lock = PTHREAD_RWLOCK_INITIALIZER; static struct fd_list rt_fwd_list = FD_LIST_INITIALIZER_O(rt_fwd_list, &rt_fwd_lock); static pthread_rwlock_t rt_out_lock = PTHREAD_RWLOCK_INITIALIZER; static struct fd_list rt_out_list = FD_LIST_INITIALIZER_O(rt_out_list, &rt_out_lock); /* Items in the lists are the same */ struct rt_hdl { struct fd_list chain; /* link in the rt_fwd_list or rt_out_list */ void * cbdata; /* the registered data */ union { int order; /* This value is used to sort the list */ int dir; /* It is the direction for FWD handlers */ int prio; /* and the priority for OUT handlers */ }; union { int (*rt_fwd_cb)(void * cbdata, struct msg ** msg); int (*rt_out_cb)(void * cbdata, struct msg ** msg, struct fd_list * candidates); }; }; /* Add a new entry in the list */ static int add_ordered(struct rt_hdl * new, struct fd_list * list) { /* The list is ordered by prio parameter */ struct fd_list * li; CHECK_POSIX( pthread_rwlock_wrlock(list->o) ); for (li = list->next; li != list; li = li->next) { struct rt_hdl * h = (struct rt_hdl *) li; if (new->order <= h->order) break; } fd_list_insert_before(li, &new->chain); CHECK_POSIX( pthread_rwlock_unlock(list->o) ); return 0; } /* Register a new FWD callback */ int fd_rt_fwd_register ( int (*rt_fwd_cb)(void * cbdata, struct msg ** msg), void * cbdata, enum fd_rt_fwd_dir dir, struct fd_rt_fwd_hdl ** handler ) { struct rt_hdl * new; TRACE_ENTRY("%p %p %d %p", rt_fwd_cb, cbdata, dir, handler); CHECK_PARAMS( rt_fwd_cb ); CHECK_PARAMS( (dir >= RT_FWD_REQ) && ( dir <= RT_FWD_ANS) ); /* Create a new container */ CHECK_MALLOC(new = malloc(sizeof(struct rt_hdl))); memset(new, 0, sizeof(struct rt_hdl)); /* Write the content */ fd_list_init(&new->chain, NULL); new->cbdata = cbdata; new->dir = dir; new->rt_fwd_cb = rt_fwd_cb; /* Save this in the list */ CHECK_FCT( add_ordered(new, &rt_fwd_list) ); /* Give it back to the extension if needed */ if (handler) *handler = (void *)new; return 0; } /* Remove it */ int fd_rt_fwd_unregister ( struct fd_rt_fwd_hdl * handler, void ** cbdata ) { struct rt_hdl * del; TRACE_ENTRY( "%p %p", handler, cbdata); CHECK_PARAMS( handler ); del = (struct rt_hdl *)handler; CHECK_PARAMS( del->chain.head == &rt_fwd_list ); /* Unlink */ CHECK_POSIX( pthread_rwlock_wrlock(&rt_fwd_lock) ); fd_list_unlink(&del->chain); CHECK_POSIX( pthread_rwlock_unlock(&rt_fwd_lock) ); if (cbdata) *cbdata = del->cbdata; free(del); return 0; } /* Register a new OUT callback */ int fd_rt_out_register ( int (*rt_out_cb)(void * cbdata, struct msg ** pmsg, struct fd_list * candidates), void * cbdata, int priority, struct fd_rt_out_hdl ** handler ) { struct rt_hdl * new; TRACE_ENTRY("%p %p %d %p", rt_out_cb, cbdata, priority, handler); CHECK_PARAMS( rt_out_cb ); /* Create a new container */ CHECK_MALLOC(new = malloc(sizeof(struct rt_hdl))); memset(new, 0, sizeof(struct rt_hdl)); /* Write the content */ fd_list_init(&new->chain, NULL); new->cbdata = cbdata; new->prio = priority; new->rt_out_cb = rt_out_cb; /* Save this in the list */ CHECK_FCT( add_ordered(new, &rt_out_list) ); /* Give it back to the extension if needed */ if (handler) *handler = (void *)new; return 0; } /* Remove it */ int fd_rt_out_unregister ( struct fd_rt_out_hdl * handler, void ** cbdata ) { struct rt_hdl * del; TRACE_ENTRY( "%p %p", handler, cbdata); CHECK_PARAMS( handler ); del = (struct rt_hdl *)handler; CHECK_PARAMS( del->chain.head == &rt_out_list ); /* Unlink */ CHECK_POSIX( pthread_rwlock_wrlock(&rt_out_lock) ); fd_list_unlink(&del->chain); CHECK_POSIX( pthread_rwlock_unlock(&rt_out_lock) ); if (cbdata) *cbdata = del->cbdata; free(del); return 0; } /********************************************************************************/ /* Some default OUT routing callbacks */ /********************************************************************************/ /* Prevent sending to peers that do not support the message application */ static int dont_send_if_no_common_app(void * cbdata, struct msg ** pmsg, struct fd_list * candidates) { struct msg * msg = *pmsg; struct fd_list * li; struct msg_hdr * hdr; TRACE_ENTRY("%p %p %p", cbdata, msg, candidates); CHECK_PARAMS(msg && candidates); CHECK_FCT( fd_msg_hdr(msg, &hdr) ); /* For Base Diameter Protocol, every peer is supposed to support it, so skip */ if (hdr->msg_appl == 0) return 0; /* Otherwise, check that the peers support the application */ for (li = candidates->next; li != candidates; li = li->next) { struct rtd_candidate *c = (struct rtd_candidate *) li; struct fd_peer * peer; struct fd_app *found; CHECK_FCT( fd_peer_getbyid( c->diamid, c->diamidlen, 0, (void *)&peer ) ); if (peer && !peer->p_hdr.info.runtime.pir_relay) { /* Check if the remote peer advertised the message's appli */ CHECK_FCT( fd_app_check(&peer->p_hdr.info.runtime.pir_apps, hdr->msg_appl, &found) ); if (!found) c->score += FD_SCORE_NO_DELIVERY; } } return 0; } /* Detect if the Destination-Host and Destination-Realm match the peer */ static int score_destination_avp(void * cbdata, struct msg ** pmsg, struct fd_list * candidates) { struct msg * msg = *pmsg; struct fd_list * li; struct avp * avp; union avp_value *dh = NULL, *dr = NULL; TRACE_ENTRY("%p %p %p", cbdata, msg, candidates); CHECK_PARAMS(msg && candidates); /* Search the Destination-Host and Destination-Realm AVPs -- we could also use fd_msg_search_avp here, but this one is slightly more efficient */ CHECK_FCT( fd_msg_browse(msg, MSG_BRW_FIRST_CHILD, &avp, NULL) ); while (avp) { struct avp_hdr * ahdr; CHECK_FCT( fd_msg_avp_hdr( avp, &ahdr ) ); if (! (ahdr->avp_flags & AVP_FLAG_VENDOR)) { switch (ahdr->avp_code) { case AC_DESTINATION_HOST: /* Parse this AVP */ CHECK_FCT( fd_msg_parse_dict ( avp, fd_g_config->cnf_dict, NULL ) ); ASSERT( ahdr->avp_value ); dh = ahdr->avp_value; break; case AC_DESTINATION_REALM: /* Parse this AVP */ CHECK_FCT( fd_msg_parse_dict ( avp, fd_g_config->cnf_dict, NULL ) ); ASSERT( ahdr->avp_value ); dr = ahdr->avp_value; break; } } if (dh && dr) break; /* Go to next AVP */ CHECK_FCT( fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL) ); } /* Now, check each candidate against these AVP values */ for (li = candidates->next; li != candidates; li = li->next) { struct rtd_candidate *c = (struct rtd_candidate *) li; #if 0 /* this is actually useless since the sending process will also ensure that the peer is still available */ struct fd_peer * peer; /* Since the candidates list comes from the peers list, we do not have any issue with upper/lower case to find the peer object */ CHECK_FCT( fd_peer_getbyid( c->diamid, c->diamidlen, 0, (void *)&peer ) ); if (!peer) continue; /* it has been deleted since the candidate list was generated; avoid sending to this one in that case. */ #endif /* 0 */ /* In the AVPs, the value comes from the network, so let's be case permissive */ if (dh && !fd_os_almostcasesrch(dh->os.data, dh->os.len, c->diamid, c->diamidlen, NULL) ) { /* The candidate is the Destination-Host */ c->score += FD_SCORE_FINALDEST; } else { if (dr && !fd_os_almostcasesrch(dr->os.data, dr->os.len, c->realm, c->realmlen, NULL) ) { /* The candidate's realm matchs the Destination-Realm */ c->score += FD_SCORE_REALM; } } } return 0; } /********************************************************************************/ /* Helper functions */ /********************************************************************************/ /* Find (first) '!' and '@' positions in a UTF-8 encoded string (User-Name AVP value) */ static void nai_get_indexes(union avp_value * un, int * excl_idx, int * at_idx) { int i; TRACE_ENTRY("%p %p %p", un, excl_idx, at_idx); CHECK_PARAMS_DO( un && excl_idx && at_idx, return ); *excl_idx = 0; *at_idx = 0; /* Search if there is a '!' before any '@' -- do we need to check it contains a '.' ? */ for (i = 0; i < un->os.len; i++) { /* The '!' marks the decorated NAI */ if ( un->os.data[i] == (unsigned char) '!' ) { if (!*excl_idx) *excl_idx = i; continue; } /* If we reach the realm part, we can stop */ if ( un->os.data[i] == (unsigned char) '@' ) { *at_idx = i; break; } /* Stop if we find a \0 in the middle */ if ( un->os.data[i] == 0 ) { return; } /* Skip escaped characters */ if ( un->os.data[i] == (unsigned char) '\\' ) { i++; continue; } } return; } /* Test if a User-Name AVP contains a Decorated NAI -- RFC4282, RFC5729 */ /* Create new User-Name and Destination-Realm values */ static int process_decorated_NAI(int * was_nai, union avp_value * un, union avp_value * dr) { int at_idx, sep_idx; unsigned char * old_un; TRACE_ENTRY("%p %p %p", was_nai, un, dr); CHECK_PARAMS(was_nai && un && dr); /* Save the decorated User-Name, for example 'homerealm.example.net!user@otherrealm.example.net' */ old_un = un->os.data; /* Search the positions of the first '!' and the '@' in the string */ nai_get_indexes(un, &sep_idx, &at_idx); if ((!sep_idx) || (sep_idx > at_idx) || !fd_os_is_valid_DiameterIdentity(old_un, sep_idx /* this is the new realm part */)) { *was_nai = 0; return 0; } *was_nai = 1; /* Create the new User-Name value */ CHECK_MALLOC( un->os.data = malloc( at_idx ) ); memcpy( un->os.data, old_un + sep_idx + 1, at_idx - sep_idx ); /* user@ */ memcpy( un->os.data + at_idx - sep_idx, old_un, sep_idx ); /* homerealm.example.net */ /* Create the new Destination-Realm value */ CHECK_MALLOC( dr->os.data = realloc(dr->os.data, sep_idx) ); memcpy( dr->os.data, old_un, sep_idx ); dr->os.len = sep_idx; TRACE_DEBUG(FULL, "Processed Decorated NAI : '%.*s' became '%.*s' (%.*s)", (int)un->os.len, old_un, (int)at_idx, un->os.data, (int)dr->os.len, dr->os.data); un->os.len = at_idx; free(old_un); return 0; } /* Function to return an error to an incoming request */ static int return_error(struct msg ** pmsg, char * error_code, char * error_message, struct avp * failedavp) { struct fd_peer * peer; int is_loc = 0; /* Get the source of the message */ { DiamId_t id; size_t idlen; CHECK_FCT( fd_msg_source_get( *pmsg, &id, &idlen ) ); if (id == NULL) { is_loc = 1; /* The message was issued locally */ } else { /* Search the peer with this id */ CHECK_FCT( fd_peer_getbyid( id, idlen, 0, (void *)&peer ) ); if (!peer) { char buf[256]; snprintf(buf, sizeof(buf), "Unable to send error '%s' to deleted peer '%s' in reply to this message.", error_code, id); fd_hook_call(HOOK_MESSAGE_DROPPED, *pmsg, NULL, buf, fd_msg_pmdl_get(*pmsg)); fd_msg_free(*pmsg); *pmsg = NULL; return 0; } } } /* Create the error message */ CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, pmsg, MSGFL_ANSW_ERROR ) ); /* Set the error code */ CHECK_FCT( fd_msg_rescode_set(*pmsg, error_code, error_message, failedavp, 1 ) ); /* Send the answer */ if (is_loc) { CHECK_FCT( fd_fifo_post(fd_g_incoming, pmsg) ); } else { CHECK_FCT( fd_out_send(pmsg, NULL, peer, 1) ); } /* Done */ return 0; } /****************************************************************************/ /* Second part : threads moving messages in the daemon */ /****************************************************************************/ /* The DISPATCH message processing */ static int msg_dispatch(struct msg * msg) { struct msg_hdr * hdr; int is_req = 0; struct session * sess; enum disp_action action; char * ec = NULL; char * em = NULL; struct msg *msgptr = msg, *error = NULL; /* Read the message header */ CHECK_FCT( fd_msg_hdr(msg, &hdr) ); is_req = hdr->msg_flags & CMD_FLAG_REQUEST; /* Note: if the message is for local delivery, we should test for duplicate (draft-asveren-dime-dupcons-00). This may conflict with path validation decisions, no clear answer yet */ /* At this point, we need to understand the message content, so parse it */ CHECK_FCT_DO( fd_msg_parse_or_error( &msgptr, &error ), { int rescue = 0; if (__ret__ != EBADMSG) { fd_hook_call(HOOK_MESSAGE_DROPPED, msgptr, NULL, "Error while parsing received answer", fd_msg_pmdl_get(msgptr)); fd_msg_free(msgptr); } else { if (!msgptr) { fd_hook_call(HOOK_MESSAGE_PARSING_ERROR2, error, NULL, NULL, fd_msg_pmdl_get(error)); /* error now contains the answer message to send back */ CHECK_FCT( fd_fifo_post(fd_g_outgoing, &error) ); } else if (!error) { /* We have received an invalid answer to our query */ fd_hook_call(HOOK_MESSAGE_DROPPED, msgptr, NULL, "Received answer failed the dictionary / rules parsing", fd_msg_pmdl_get(msgptr)); fd_msg_free(msgptr); } else { /* We will pass the invalid received error to the application */ rescue = 1; } } if (!rescue) return 0; /* We are done with this message, go to the next */ } ); /* First, if the original request was registered with a callback and we receive the answer, call it. */ if ( ! is_req ) { struct msg * qry; void (*anscb)(void *, struct msg **) = NULL; void * data = NULL; /* Retrieve the corresponding query */ CHECK_FCT( fd_msg_answ_getq( msgptr, &qry ) ); /* Retrieve any registered handler */ CHECK_FCT( fd_msg_anscb_get( qry, &anscb, NULL, &data ) ); /* If a callback was registered, pass the message to it */ if (anscb != NULL) { TRACE_DEBUG(FULL, "Calling callback registered when query was sent (%p, %p)", anscb, data); (*anscb)(data, &msgptr); /* If the message is processed, we're done */ if (msgptr == NULL) { return 0; } /* otherwise continue the dispatching --hoping that the anscb callback did not mess with our message :) */ } } /* Retrieve the session of the message */ CHECK_FCT( fd_msg_sess_get(fd_g_config->cnf_dict, msgptr, &sess, NULL) ); /* Now, call any callback registered for the message */ CHECK_FCT( fd_msg_dispatch ( &msgptr, sess, &action, &ec, &em, &error) ); /* Now, act depending on msg and action and ec */ if (msgptr) { switch ( action ) { case DISP_ACT_CONT: /* No callback has handled the message, let's reply with a generic error or relay it */ if (!fd_g_config->cnf_flags.no_fwd) { /* requeue to fd_g_outgoing */ fd_hook_call(HOOK_MESSAGE_ROUTING_FORWARD, msgptr, NULL, NULL, fd_msg_pmdl_get(msgptr)); CHECK_FCT( fd_fifo_post(fd_g_outgoing, &msgptr) ); break; } /* We don't relay => reply error */ em = "The message was not handled by any extension callback"; ec = "DIAMETER_COMMAND_UNSUPPORTED"; /* and continue as if an error occurred... */ case DISP_ACT_ERROR: /* We have a problem with delivering the message */ if (ec == NULL) { ec = "DIAMETER_UNABLE_TO_COMPLY"; } if (!is_req) { fd_hook_call(HOOK_MESSAGE_DROPPED, msgptr, NULL, "Internal error: Answer received to locally issued request, but not handled by any handler.", fd_msg_pmdl_get(msgptr)); fd_msg_free(msgptr); break; } /* Create an answer with the error code and message */ CHECK_FCT( fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, &msgptr, 0 ) ); CHECK_FCT( fd_msg_rescode_set(msgptr, ec, em, NULL, 1 ) ); case DISP_ACT_SEND: /* Now, send the message */ CHECK_FCT( fd_fifo_post(fd_g_outgoing, &msgptr) ); } } else if (em) { fd_hook_call(HOOK_MESSAGE_DROPPED, error, NULL, em, fd_msg_pmdl_get(error)); fd_msg_free(error); } /* We're done with dispatching this message */ return 0; } /* The ROUTING-IN message processing */ static int msg_rt_in(struct msg * msg) { struct msg_hdr * hdr; int is_req = 0; int is_err = 0; DiamId_t qry_src = NULL; struct msg *msgptr = msg; /* Read the message header */ CHECK_FCT( fd_msg_hdr(msg, &hdr) ); is_req = hdr->msg_flags & CMD_FLAG_REQUEST; is_err = hdr->msg_flags & CMD_FLAG_ERROR; /* Handle incorrect bits */ if (is_req && is_err) { fd_hook_call(HOOK_MESSAGE_PARSING_ERROR, msgptr, NULL, "R & E bits were set", fd_msg_pmdl_get(msgptr)); CHECK_FCT( return_error( &msgptr, "DIAMETER_INVALID_HDR_BITS", "R & E bits were set", NULL) ); return 0; } /* If it is a request, we must analyze its content to decide what we do with it */ if (is_req) { struct avp * avp, *un = NULL; union avp_value * un_val = NULL, *dr_val = NULL; enum status { UNKNOWN, YES, NO }; /* Are we Destination-Host? */ enum status is_dest_host = UNKNOWN; /* Are we Destination-Realm? */ enum status is_dest_realm = UNKNOWN; /* Do we support the application of the message? */ enum status is_local_app = UNKNOWN; /* Check if we have local support for the message application */ if ( (hdr->msg_appl == 0) || (hdr->msg_appl == AI_RELAY) ) { fd_hook_call(HOOK_MESSAGE_PARSING_ERROR, msgptr, NULL, "Received a routable message with application id 0 or " _stringize(AI_RELAY) " (relay)", fd_msg_pmdl_get(msgptr)); CHECK_FCT( return_error( &msgptr, "DIAMETER_APPLICATION_UNSUPPORTED", "Routable message with application id 0 or relay", NULL) ); return 0; } else { struct fd_app * app; CHECK_FCT( fd_app_check(&fd_g_config->cnf_apps, hdr->msg_appl, &app) ); is_local_app = (app ? YES : NO); } /* Parse the message for Dest-Host, Dest-Realm, and Route-Record */ CHECK_FCT( fd_msg_browse(msgptr, MSG_BRW_FIRST_CHILD, &avp, NULL) ); while (avp) { struct avp_hdr * ahdr; struct fd_pei error_info; int ret; memset(&error_info, 0, sizeof(struct fd_pei)); CHECK_FCT( fd_msg_avp_hdr( avp, &ahdr ) ); if (! (ahdr->avp_flags & AVP_FLAG_VENDOR)) { switch (ahdr->avp_code) { case AC_DESTINATION_HOST: /* Parse this AVP */ CHECK_FCT_DO( ret = fd_msg_parse_dict ( avp, fd_g_config->cnf_dict, &error_info ), { if (error_info.pei_errcode) { fd_hook_call(HOOK_MESSAGE_PARSING_ERROR, msgptr, NULL, error_info.pei_message ?: error_info.pei_errcode, fd_msg_pmdl_get(msgptr)); CHECK_FCT( return_error( &msgptr, error_info.pei_errcode, error_info.pei_message, error_info.pei_avp) ); if (error_info.pei_avp_free) { fd_msg_free(error_info.pei_avp); } return 0; } else { fd_hook_call(HOOK_MESSAGE_PARSING_ERROR, msgptr, NULL, "Unspecified error while parsing Destination-Host AVP", fd_msg_pmdl_get(msgptr)); return ret; } } ); ASSERT( ahdr->avp_value ); /* Compare the Destination-Host AVP of the message with our identity */ if (!fd_os_almostcasesrch(ahdr->avp_value->os.data, ahdr->avp_value->os.len, fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len, NULL)) { is_dest_host = YES; } else { is_dest_host = NO; } break; case AC_DESTINATION_REALM: /* Parse this AVP */ CHECK_FCT_DO( ret = fd_msg_parse_dict ( avp, fd_g_config->cnf_dict, &error_info ), { if (error_info.pei_errcode) { fd_hook_call(HOOK_MESSAGE_PARSING_ERROR, msgptr, NULL, error_info.pei_message ?: error_info.pei_errcode, fd_msg_pmdl_get(msgptr)); CHECK_FCT( return_error( &msgptr, error_info.pei_errcode, error_info.pei_message, error_info.pei_avp) ); if (error_info.pei_avp_free) { fd_msg_free(error_info.pei_avp); } return 0; } else { fd_hook_call(HOOK_MESSAGE_PARSING_ERROR, msgptr, NULL, "Unspecified error while parsing Destination-Realm AVP", fd_msg_pmdl_get(msgptr)); return ret; } } ); ASSERT( ahdr->avp_value ); dr_val = ahdr->avp_value; /* Compare the Destination-Realm AVP of the message with our identity */ if (!fd_os_almostcasesrch(dr_val->os.data, dr_val->os.len, fd_g_config->cnf_diamrlm, fd_g_config->cnf_diamrlm_len, NULL)) { is_dest_realm = YES; } else { is_dest_realm = NO; } break; /* we also use User-Name for decorated NAI */ case AC_USER_NAME: /* Parse this AVP */ CHECK_FCT_DO( ret = fd_msg_parse_dict ( avp, fd_g_config->cnf_dict, &error_info ), { if (error_info.pei_errcode) { fd_hook_call(HOOK_MESSAGE_PARSING_ERROR, msgptr, NULL, error_info.pei_message ?: error_info.pei_errcode, fd_msg_pmdl_get(msgptr)); CHECK_FCT( return_error( &msgptr, error_info.pei_errcode, error_info.pei_message, error_info.pei_avp) ); if (error_info.pei_avp_free) { fd_msg_free(error_info.pei_avp); } return 0; } else { fd_hook_call(HOOK_MESSAGE_PARSING_ERROR, msgptr, NULL, "Unspecified error while parsing User-Name AVP", fd_msg_pmdl_get(msgptr)); return ret; } } ); ASSERT( ahdr->avp_value ); un = avp; un_val = ahdr->avp_value; break; case AC_ROUTE_RECORD: /* Parse this AVP */ CHECK_FCT_DO( ret = fd_msg_parse_dict ( avp, fd_g_config->cnf_dict, &error_info ), { if (error_info.pei_errcode) { fd_hook_call(HOOK_MESSAGE_PARSING_ERROR, msgptr, NULL, error_info.pei_message ?: error_info.pei_errcode, fd_msg_pmdl_get(msgptr)); CHECK_FCT( return_error( &msgptr, error_info.pei_errcode, error_info.pei_message, error_info.pei_avp) ); if (error_info.pei_avp_free) { fd_msg_free(error_info.pei_avp); } return 0; } else { fd_hook_call(HOOK_MESSAGE_PARSING_ERROR, msgptr, NULL, "Unspecified error while parsing Route-Record AVP", fd_msg_pmdl_get(msgptr)); return ret; } } ); ASSERT( ahdr->avp_value ); /* Is this our own name ? */ if (!fd_os_almostcasesrch(ahdr->avp_value->os.data, ahdr->avp_value->os.len, fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len, NULL)) { /* Yes: then we must return DIAMETER_LOOP_DETECTED according to Diameter RFC */ char * error = "DIAMETER_LOOP_DETECTED"; fd_hook_call(HOOK_MESSAGE_PARSING_ERROR, msgptr, NULL, error, fd_msg_pmdl_get(msgptr)); CHECK_FCT( return_error( &msgptr, error, NULL, NULL) ); return 0; } break; } } /* Stop when we found all 3 AVPs -- they are supposed to be at the beginning of the message, so this should be fast */ if ((is_dest_host != UNKNOWN) && (is_dest_realm != UNKNOWN) && un) break; /* Go to next AVP */ CHECK_FCT( fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL) ); } /* OK, now decide what we do with the request */ /* Handle the missing routing AVPs first */ if ( is_dest_realm == UNKNOWN ) { fd_hook_call(HOOK_MESSAGE_PARSING_ERROR, msgptr, NULL, "Non-routable message not supported (invalid bit ? missing Destination-Realm ?)", fd_msg_pmdl_get(msgptr)); CHECK_FCT( return_error( &msgptr, "DIAMETER_COMMAND_UNSUPPORTED", "Non-routable message not supported (invalid bit ? missing Destination-Realm ?)", NULL) ); return 0; } /* If we are listed as Destination-Host */ if (is_dest_host == YES) { if (is_local_app == YES) { /* Ok, give the message to the dispatch thread */ fd_hook_call(HOOK_MESSAGE_ROUTING_LOCAL, msgptr, NULL, NULL, fd_msg_pmdl_get(msgptr)); CHECK_FCT( fd_fifo_post(fd_g_local, &msgptr) ); } else { /* We don't support the application, reply an error */ fd_hook_call(HOOK_MESSAGE_PARSING_ERROR, msgptr, NULL, "Application unsupported", fd_msg_pmdl_get(msgptr)); CHECK_FCT( return_error( &msgptr, "DIAMETER_APPLICATION_UNSUPPORTED", NULL, NULL) ); } return 0; } /* If the message is explicitely for someone else */ if ((is_dest_host == NO) || (is_dest_realm == NO)) { if (fd_g_config->cnf_flags.no_fwd) { fd_hook_call(HOOK_MESSAGE_ROUTING_ERROR, msgptr, NULL, "Message for another realm/host", fd_msg_pmdl_get(msgptr)); CHECK_FCT( return_error( &msgptr, "DIAMETER_UNABLE_TO_DELIVER", "I am not a Diameter agent", NULL) ); return 0; } } else { /* Destination-Host was not set, and Destination-Realm is matching : we may handle or pass to a fellow peer */ int is_nai = 0; /* test for decorated NAI (RFC5729 section 4.4) */ /* Handle the decorated NAI */ if (un_val) { CHECK_FCT_DO( process_decorated_NAI(&is_nai, un_val, dr_val), { /* If the process failed, we assume it is because of the AVP format */ fd_hook_call(HOOK_MESSAGE_PARSING_ERROR, msgptr, NULL, "Failed to process decorated NAI", fd_msg_pmdl_get(msgptr)); CHECK_FCT( return_error( &msgptr, "DIAMETER_INVALID_AVP_VALUE", "Failed to process decorated NAI", un) ); return 0; } ); } if (is_nai) { /* We have transformed the AVP, now submit it again in the queue */ CHECK_FCT(fd_fifo_post(fd_g_incoming, &msgptr) ); return 0; } if (is_local_app == YES) { /* Handle localy since we are able to */ fd_hook_call(HOOK_MESSAGE_ROUTING_LOCAL, msgptr, NULL, NULL, fd_msg_pmdl_get(msgptr)); CHECK_FCT(fd_fifo_post(fd_g_local, &msgptr) ); return 0; } if (fd_g_config->cnf_flags.no_fwd) { /* We return an error */ fd_hook_call(HOOK_MESSAGE_ROUTING_ERROR, msgptr, NULL, "Application unsupported", fd_msg_pmdl_get(msgptr)); CHECK_FCT( return_error( &msgptr, "DIAMETER_APPLICATION_UNSUPPORTED", NULL, NULL) ); return 0; } } /* From that point, for requests, we will call the registered callbacks, then forward to another peer */ } else { /* The message is an answer */ struct msg * qry; /* Retrieve the corresponding query and its origin */ CHECK_FCT( fd_msg_answ_getq( msgptr, &qry ) ); CHECK_FCT( fd_msg_source_get( qry, &qry_src, NULL ) ); if ((!qry_src) && (!is_err)) { /* The message is a normal answer to a request issued localy, we do not call the callbacks chain on it. */ fd_hook_call(HOOK_MESSAGE_ROUTING_LOCAL, msgptr, NULL, NULL, fd_msg_pmdl_get(msgptr)); CHECK_FCT(fd_fifo_post(fd_g_local, &msgptr) ); return 0; } /* From that point, for answers, we will call the registered callbacks, then pass it to the dispatch module or forward it */ } /* Call all registered callbacks for this message */ { struct fd_list * li; CHECK_FCT( pthread_rwlock_rdlock( &rt_fwd_lock ) ); pthread_cleanup_push( fd_cleanup_rwlock, &rt_fwd_lock ); /* requests: dir = 1 & 2 => in order; answers = 3 & 2 => in reverse order */ for ( li = (is_req ? rt_fwd_list.next : rt_fwd_list.prev) ; msgptr && (li != &rt_fwd_list) ; li = (is_req ? li->next : li->prev) ) { struct rt_hdl * rh = (struct rt_hdl *)li; int ret; if (is_req && (rh->dir > RT_FWD_ALL)) break; if ((!is_req) && (rh->dir < RT_FWD_ALL)) break; /* Ok, call this cb */ TRACE_DEBUG(ANNOYING, "Calling next FWD callback on %p : %p", msgptr, rh->rt_fwd_cb); CHECK_FCT_DO( ret = (*rh->rt_fwd_cb)(rh->cbdata, &msgptr), { char buf[256]; snprintf(buf, sizeof(buf), "A FWD routing callback returned an error: %s", strerror(ret)); fd_hook_call(HOOK_MESSAGE_ROUTING_ERROR, msgptr, NULL, buf, fd_msg_pmdl_get(msgptr)); fd_hook_call(HOOK_MESSAGE_DROPPED, msgptr, NULL, buf, fd_msg_pmdl_get(msgptr)); fd_msg_free(msgptr); msgptr = NULL; break; } ); } pthread_cleanup_pop(0); CHECK_FCT( pthread_rwlock_unlock( &rt_fwd_lock ) ); /* If a callback has handled the message, we stop now */ if (!msgptr) return 0; } /* Now pass the message to the next step: either forward to another peer, or dispatch to local extensions */ if (is_req || qry_src) { fd_hook_call(HOOK_MESSAGE_ROUTING_FORWARD, msgptr, NULL, NULL, fd_msg_pmdl_get(msgptr)); CHECK_FCT(fd_fifo_post(fd_g_outgoing, &msgptr) ); } else { fd_hook_call(HOOK_MESSAGE_ROUTING_LOCAL, msgptr, NULL, NULL, fd_msg_pmdl_get(msgptr)); CHECK_FCT(fd_fifo_post(fd_g_local, &msgptr) ); } /* We're done with this message */ return 0; } /* The ROUTING-OUT message processing */ static int msg_rt_out(struct msg * msg) { struct rt_data * rtd = NULL; struct msg_hdr * hdr; int is_req = 0; int ret; struct fd_list * li, *candidates; struct avp * avp; struct rtd_candidate * c; struct msg *msgptr = msg; DiamId_t qry_src = NULL; size_t qry_src_len = 0; /* Read the message header */ CHECK_FCT( fd_msg_hdr(msgptr, &hdr) ); is_req = hdr->msg_flags & CMD_FLAG_REQUEST; /* For answers, the routing is very easy */ if ( ! is_req ) { struct msg * qry; struct msg_hdr * qry_hdr; struct fd_peer * peer = NULL; /* Retrieve the corresponding query and its origin */ CHECK_FCT( fd_msg_answ_getq( msgptr, &qry ) ); CHECK_FCT( fd_msg_source_get( qry, &qry_src, &qry_src_len ) ); ASSERT( qry_src ); /* if it is NULL, the message should have been in the LOCAL queue! */ /* Find the peer corresponding to this name */ CHECK_FCT( fd_peer_getbyid( qry_src, qry_src_len, 0, (void *) &peer ) ); if (fd_peer_getstate(peer) != STATE_OPEN && fd_peer_getstate(peer) != STATE_CLOSING_GRACE) { char buf[128]; snprintf(buf, sizeof(buf), "Unable to forward answer to deleted / closed peer '%s'.", qry_src); fd_hook_call(HOOK_MESSAGE_ROUTING_ERROR, msgptr, NULL, buf, fd_msg_pmdl_get(msgptr)); fd_hook_call(HOOK_MESSAGE_DROPPED, msgptr, NULL, buf, fd_msg_pmdl_get(msgptr)); fd_msg_free(msgptr); return 0; } /* We must restore the hop-by-hop id */ CHECK_FCT( fd_msg_hdr(qry, &qry_hdr) ); hdr->msg_hbhid = qry_hdr->msg_hbhid; /* Push the message into this peer */ CHECK_FCT( fd_out_send(&msgptr, NULL, peer, 1) ); /* We're done with this answer */ return 0; } /* From that point, the message is a request */ CHECK_FCT( fd_msg_source_get( msgptr, &qry_src, &qry_src_len ) ); /* if qry_src != NULL, this message is relayed, otherwise it is locally issued */ /* Get the routing data out of the message if any (in case of re-transmit) */ CHECK_FCT( fd_msg_rt_get ( msgptr, &rtd ) ); /* If there is no routing data already, let's create it */ if (rtd == NULL) { CHECK_FCT( fd_rtd_init(&rtd) ); /* Add all peers currently in OPEN state */ CHECK_FCT( pthread_rwlock_rdlock(&fd_g_activ_peers_rw) ); for (li = fd_g_activ_peers.next; li != &fd_g_activ_peers; li = li->next) { struct fd_peer * p = (struct fd_peer *)li->o; CHECK_FCT_DO( ret = fd_rtd_candidate_add(rtd, p->p_hdr.info.pi_diamid, p->p_hdr.info.pi_diamidlen, p->p_hdr.info.runtime.pir_realm, p->p_hdr.info.runtime.pir_realmlen), { CHECK_FCT_DO( pthread_rwlock_unlock(&fd_g_activ_peers_rw), ); return ret; } ); } CHECK_FCT( pthread_rwlock_unlock(&fd_g_activ_peers_rw) ); /* Now let's remove all peers from the Route-Records */ CHECK_FCT( fd_msg_browse(msgptr, MSG_BRW_FIRST_CHILD, &avp, NULL) ); while (avp) { struct avp_hdr * ahdr; struct fd_pei error_info; CHECK_FCT( fd_msg_avp_hdr( avp, &ahdr ) ); if ((ahdr->avp_code == AC_ROUTE_RECORD) && (! (ahdr->avp_flags & AVP_FLAG_VENDOR)) ) { /* Parse this AVP */ CHECK_FCT_DO( ret = fd_msg_parse_dict ( avp, fd_g_config->cnf_dict, &error_info ), { if (error_info.pei_errcode) { CHECK_FCT( return_error( &msgptr, error_info.pei_errcode, error_info.pei_message, error_info.pei_avp) ); if (error_info.pei_avp_free) { fd_msg_free(error_info.pei_avp); } return 0; } else { return ret; } } ); ASSERT( ahdr->avp_value ); /* Remove this value from the list. We don't need to pay special attention to the contents here. */ fd_rtd_candidate_del(rtd, ahdr->avp_value->os.data, ahdr->avp_value->os.len); } /* Go to next AVP */ CHECK_FCT( fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL) ); } /* Save the routing information in the message */ CHECK_FCT( fd_msg_rt_associate ( msgptr, rtd ) ); } /* Note: we reset the scores and pass the message to the callbacks, maybe we could re-use the saved scores when we have received an error ? -- TODO */ /* Ok, we have our list in rtd now, let's (re)initialize the scores */ fd_rtd_candidate_extract(rtd, &candidates, FD_SCORE_INI); /* Pass the list to registered callbacks (even if it is empty list) */ { CHECK_FCT( pthread_rwlock_rdlock( &rt_out_lock ) ); pthread_cleanup_push( fd_cleanup_rwlock, &rt_out_lock ); /* We call the cb by reverse priority order */ for ( li = rt_out_list.prev ; (msgptr != NULL) && (li != &rt_out_list) ; li = li->prev ) { struct rt_hdl * rh = (struct rt_hdl *)li; TRACE_DEBUG(ANNOYING, "Calling next OUT callback on %p : %p (prio %d)", msgptr, rh->rt_out_cb, rh->prio); CHECK_FCT_DO( ret = (*rh->rt_out_cb)(rh->cbdata, &msgptr, candidates), { char buf[256]; snprintf(buf, sizeof(buf), "An OUT routing callback returned an error: %s", strerror(ret)); fd_hook_call(HOOK_MESSAGE_ROUTING_ERROR, msgptr, NULL, buf, fd_msg_pmdl_get(msgptr)); fd_hook_call(HOOK_MESSAGE_DROPPED, msgptr, NULL, buf, fd_msg_pmdl_get(msgptr)); fd_msg_free(msgptr); msgptr = NULL; } ); } pthread_cleanup_pop(0); CHECK_FCT( pthread_rwlock_unlock( &rt_out_lock ) ); /* If an error occurred or the callback disposed of the message, go to next message */ if (! msgptr) { return 0; } } /* Order the candidate peers by score attributed by the callbacks */ CHECK_FCT( fd_rtd_candidate_reorder(candidates) ); /* Now try sending the message */ for (li = candidates->prev; li != candidates; li = li->prev) { struct fd_peer * peer; c = (struct rtd_candidate *) li; /* Stop when we have reached the end of valid candidates */ if (c->score < 0) break; /* Search for the peer */ CHECK_FCT( fd_peer_getbyid( c->diamid, c->diamidlen, 0, (void *)&peer ) ); if (fd_peer_getstate(peer) == STATE_OPEN) { /* Send to this one */ CHECK_FCT_DO( fd_out_send(&msgptr, NULL, peer, 1), continue ); /* If the sending was successful */ break; } } /* If the message has not been sent, return an error */ if (msgptr) { fd_hook_call(HOOK_MESSAGE_ROUTING_ERROR, msgptr, NULL, "No remaining suitable candidate to route the message to", fd_msg_pmdl_get(msgptr)); return_error( &msgptr, "DIAMETER_UNABLE_TO_DELIVER", "No suitable candidate to route the message to", NULL); } /* We're done with this message */ return 0; } /********************************************************************************/ /* Management of the threads */ /********************************************************************************/ /* Note: in the first version, we only create one thread of each kind. We could improve the scalability by using the threshold feature of the queues to create additional threads if a queue is filling up, or at least giving a configurable number of threads of each kind. */ /* Control of the threads */ static enum { RUN = 0, STOP = 1 } order_val = RUN; static pthread_mutex_t order_state_lock = PTHREAD_MUTEX_INITIALIZER; /* Threads report their status */ enum thread_state { NOTRUNNING = 0, RUNNING = 1 }; static void cleanup_state(void * state_loc) { CHECK_POSIX_DO( pthread_mutex_lock(&order_state_lock), ); *(enum thread_state *)state_loc = NOTRUNNING; CHECK_POSIX_DO( pthread_mutex_unlock(&order_state_lock), ); } /* This is the common thread code (same for routing and dispatching) */ static void * process_thr(void * arg, int (*action_cb)(struct msg * msg), struct fifo * queue, char * action_name) { TRACE_ENTRY("%p %p %p %p", arg, action_cb, queue, action_name); /* Set the thread name */ { char buf[48]; snprintf(buf, sizeof(buf), "%s (%p)", action_name, arg); fd_log_threadname ( buf ); } /* The thread reports its status when canceled */ CHECK_PARAMS_DO(arg, return NULL); pthread_cleanup_push( cleanup_state, arg ); /* Mark the thread running */ CHECK_POSIX_DO( pthread_mutex_lock(&order_state_lock), ); *(enum thread_state *)arg = RUNNING; CHECK_POSIX_DO( pthread_mutex_unlock(&order_state_lock), ); do { struct msg * msg; /* Test the current order */ { int must_stop; CHECK_POSIX_DO( pthread_mutex_lock(&order_state_lock), { ASSERT(0); } ); /* we lock to flush the caches */ must_stop = (order_val == STOP); CHECK_POSIX_DO( pthread_mutex_unlock(&order_state_lock), { ASSERT(0); } ); if (must_stop) goto end; pthread_testcancel(); } /* Ok, we are allowed to run */ /* Get the next message from the queue */ { int ret; struct timespec ts; CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &ts), goto fatal_error ); ts.tv_sec += 1; ret = fd_fifo_timedget ( queue, &msg, &ts ); if (ret == ETIMEDOUT) /* loop, check if the thread must stop now */ continue; if (ret == EPIPE) /* The queue was destroyed, we are probably exiting */ goto end; /* check if another error occurred */ CHECK_FCT_DO( ret, goto fatal_error ); } LOG_A("%s: Picked next message", action_name); /* Now process the message */ CHECK_FCT_DO( (*action_cb)(msg), goto fatal_error); /* We're done with this message */ } while (1); fatal_error: TRACE_DEBUG(INFO, "An unrecoverable error occurred, %s thread is terminating...", action_name); CHECK_FCT_DO(fd_core_shutdown(), ); end: ; /* noop so that we get rid of "label at end of compund statement" warning */ /* Mark the thread as terminated */ pthread_cleanup_pop(1); return NULL; } /* The dispatch thread */ static void * dispatch_thr(void * arg) { return process_thr(arg, msg_dispatch, fd_g_local, "Dispatch"); } /* The (routing-in) thread -- see description in freeDiameter.h */ static void * routing_in_thr(void * arg) { return process_thr(arg, msg_rt_in, fd_g_incoming, "Routing-IN"); } /* The (routing-out) thread -- see description in freeDiameter.h */ static void * routing_out_thr(void * arg) { return process_thr(arg, msg_rt_out, fd_g_outgoing, "Routing-OUT"); } /********************************************************************************/ /* The functions for the other files */ /********************************************************************************/ static pthread_t * dispatch = NULL; static enum thread_state * disp_state = NULL; /* Later: make this more dynamic */ static pthread_t rt_out = (pthread_t)NULL; static enum thread_state out_state = NOTRUNNING; static pthread_t rt_in = (pthread_t)NULL; static enum thread_state in_state = NOTRUNNING; /* Initialize the routing and dispatch threads */ int fd_rtdisp_init(void) { int i; /* Prepare the array for dispatch */ CHECK_MALLOC( disp_state = calloc(fd_g_config->cnf_dispthr, sizeof(enum thread_state)) ); CHECK_MALLOC( dispatch = calloc(fd_g_config->cnf_dispthr, sizeof(pthread_t)) ); /* Create the threads */ for (i=0; i < fd_g_config->cnf_dispthr; i++) { CHECK_POSIX( pthread_create( &dispatch[i], NULL, dispatch_thr, &disp_state[i] ) ); } CHECK_POSIX( pthread_create( &rt_out, NULL, routing_out_thr, &out_state) ); CHECK_POSIX( pthread_create( &rt_in, NULL, routing_in_thr, &in_state) ); /* Later: TODO("Set the thresholds for the queues to create more threads as needed"); */ /* Register the built-in callbacks */ CHECK_FCT( fd_rt_out_register( dont_send_if_no_common_app, NULL, 10, NULL ) ); CHECK_FCT( fd_rt_out_register( score_destination_avp, NULL, 10, NULL ) ); return 0; } /* Ask the thread to terminate after next iteration */ int fd_rtdisp_cleanstop(void) { CHECK_POSIX_DO( pthread_mutex_lock(&order_state_lock), ); order_val = STOP; CHECK_POSIX_DO( pthread_mutex_unlock(&order_state_lock), ); return 0; } static void stop_thread_delayed(enum thread_state *st, pthread_t * thr, char * th_name) { TRACE_ENTRY("%p %p", st, thr); CHECK_PARAMS_DO(st && thr, return); int terminated; CHECK_POSIX_DO( pthread_mutex_lock(&order_state_lock), ); terminated = (*st == NOTRUNNING); CHECK_POSIX_DO( pthread_mutex_unlock(&order_state_lock), ); /* Wait for a second for the thread to complete, by monitoring my_state */ if (!terminated) { TRACE_DEBUG(INFO, "Waiting for the %s thread to have a chance to terminate", th_name); do { struct timespec ts, ts_final; CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &ts), break ); ts_final.tv_sec = ts.tv_sec + 1; ts_final.tv_nsec = ts.tv_nsec; while (TS_IS_INFERIOR( &ts, &ts_final )) { CHECK_POSIX_DO( pthread_mutex_lock(&order_state_lock), ); terminated = (*st == NOTRUNNING); CHECK_POSIX_DO( pthread_mutex_unlock(&order_state_lock), ); if (terminated) break; usleep(100000); CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &ts), break ); } } while (0); } /* Now stop the thread and reclaim its resources */ CHECK_FCT_DO( fd_thr_term(thr ), /* continue */); } /* Stop the thread after up to one second of wait */ int fd_rtdisp_fini(void) { int i; /* Destroy the incoming queue */ CHECK_FCT_DO( fd_queues_fini(&fd_g_incoming), /* ignore */); /* Stop the routing IN thread */ stop_thread_delayed(&in_state, &rt_in, "IN routing"); /* Destroy the outgoing queue */ CHECK_FCT_DO( fd_queues_fini(&fd_g_outgoing), /* ignore */); /* Stop the routing OUT thread */ stop_thread_delayed(&out_state, &rt_out, "OUT routing"); /* Destroy the local queue */ CHECK_FCT_DO( fd_queues_fini(&fd_g_local), /* ignore */); /* Stop the Dispatch threads */ if (dispatch != NULL) { for (i=0; i < fd_g_config->cnf_dispthr; i++) { stop_thread_delayed(&disp_state[i], &dispatch[i], "Dispatching"); } free(dispatch); dispatch = NULL; } if (disp_state != NULL) { free(disp_state); disp_state = NULL; } return 0; } /* Cleanup handlers */ int fd_rtdisp_cleanup(void) { /* Cleanup all remaining handlers */ while (!FD_IS_LIST_EMPTY(&rt_fwd_list)) { CHECK_FCT_DO( fd_rt_fwd_unregister ( (void *)rt_fwd_list.next, NULL ), /* continue */ ); } while (!FD_IS_LIST_EMPTY(&rt_out_list)) { CHECK_FCT_DO( fd_rt_out_unregister ( (void *)rt_out_list.next, NULL ), /* continue */ ); } fd_disp_unregister_all(); /* destroy remaining handlers */ return 0; } /********************************************************************************/ /* For extensions to register a new appl */ /********************************************************************************/ /* Add an application into the peer's supported apps */ int fd_disp_app_support ( struct dict_object * app, struct dict_object * vendor, int auth, int acct ) { application_id_t aid = 0; vendor_id_t vid = 0; TRACE_ENTRY("%p %p %d %d", app, vendor, auth, acct); CHECK_PARAMS( app && (auth || acct) ); { enum dict_object_type type = 0; struct dict_application_data data; CHECK_FCT( fd_dict_gettype(app, &type) ); CHECK_PARAMS( type == DICT_APPLICATION ); CHECK_FCT( fd_dict_getval(app, &data) ); aid = data.application_id; } if (vendor) { enum dict_object_type type = 0; struct dict_vendor_data data; CHECK_FCT( fd_dict_gettype(vendor, &type) ); CHECK_PARAMS( type == DICT_VENDOR ); CHECK_FCT( fd_dict_getval(vendor, &data) ); vid = data.vendor_id; } return fd_app_merge(&fd_g_config->cnf_apps, aid, vid, auth, acct); } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/sctp.c000066400000000000000000001345111333553357400221260ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2015, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" #include "cnxctx.h" #include #include /* Size of buffer to receive ancilliary data. May need to be enlarged if more sockopt are set... */ #ifndef CMSG_BUF_LEN #define CMSG_BUF_LEN 1024 #endif /* CMSG_BUF_LEN */ /* Use old draft-ietf-tsvwg-sctpsocket-17 API ? If not defined, RFC6458 API will be used */ /* #define OLD_SCTP_SOCKET_API */ /* Automatically fallback to old API if some of the new symbols are not defined */ #if (!defined(SCTP_CONNECTX_4_ARGS) || (!defined(SCTP_RECVRCVINFO)) || (!defined(SCTP_SNDINFO))) # define OLD_SCTP_SOCKET_API #endif /* Temper with the retransmission timers to try and improve disconnection detection response? Undef this to keep the defaults of SCTP stack */ #ifndef USE_DEFAULT_SCTP_RTX_PARAMS /* make this a configuration option if useful */ #define ADJUST_RTX_PARAMS #endif /* USE_DEFAULT_SCTP_RTX_PARAMS */ /* Pre-binding socket options -- # streams read in config */ static int fd_setsockopt_prebind(int sk) { socklen_t sz; TRACE_ENTRY( "%d", sk); CHECK_PARAMS( sk > 0 ); { int reuse = 1; CHECK_SYS( setsockopt(sk, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse)) ); } #ifdef ADJUST_RTX_PARAMS /* Set the retransmit parameters */ #ifdef SCTP_RTOINFO { struct sctp_rtoinfo rtoinfo; memset(&rtoinfo, 0, sizeof(rtoinfo)); if (TRACE_BOOL(ANNOYING)) { sz = sizeof(rtoinfo); /* Read socket defaults */ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_RTOINFO, &rtoinfo, &sz) ); if (sz != sizeof(rtoinfo)) { TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(rtoinfo)); return ENOTSUP; } fd_log_debug( "Def SCTP_RTOINFO : srto_initial : %u", rtoinfo.srto_initial); fd_log_debug( " srto_min : %u", rtoinfo.srto_min); fd_log_debug( " srto_max : %u", rtoinfo.srto_max); } /* rtoinfo.srto_initial: Estimate of the RTT before it can be measured; keep the default value */ rtoinfo.srto_max = 5000; /* Maximum retransmit timer (in ms), we want fast retransmission time. */ rtoinfo.srto_min = 1000; /* Value under which the RTO does not descend, we set this value to not conflict with srto_max */ /* Set the option to the socket */ CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_RTOINFO, &rtoinfo, sizeof(rtoinfo)) ); if (TRACE_BOOL(ANNOYING)) { /* Check new values */ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_RTOINFO, &rtoinfo, &sz) ); fd_log_debug( "New SCTP_RTOINFO : srto_initial : %u", rtoinfo.srto_initial); fd_log_debug( " srto_max : %u", rtoinfo.srto_max); fd_log_debug( " srto_min : %u", rtoinfo.srto_min); } } #else /* SCTP_RTOINFO */ TRACE_DEBUG(ANNOYING, "Skipping SCTP_RTOINFO"); #endif /* SCTP_RTOINFO */ /* Set the association parameters: max number of retransmits, ... */ #ifdef SCTP_ASSOCINFO { struct sctp_assocparams assoc; memset(&assoc, 0, sizeof(assoc)); if (TRACE_BOOL(ANNOYING)) { sz = sizeof(assoc); /* Read socket defaults */ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_ASSOCINFO, &assoc, &sz) ); if (sz != sizeof(assoc)) { TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(assoc)); return ENOTSUP; } fd_log_debug( "Def SCTP_ASSOCINFO : sasoc_asocmaxrxt : %hu", assoc.sasoc_asocmaxrxt); fd_log_debug( " sasoc_number_peer_destinations : %hu", assoc.sasoc_number_peer_destinations); fd_log_debug( " sasoc_peer_rwnd : %u" , assoc.sasoc_peer_rwnd); fd_log_debug( " sasoc_local_rwnd : %u" , assoc.sasoc_local_rwnd); fd_log_debug( " sasoc_cookie_life : %u" , assoc.sasoc_cookie_life); } assoc.sasoc_asocmaxrxt = 4; /* Maximum number of retransmission attempts: we want fast detection of errors */ /* Note that this must remain less than the sum of retransmission parameters of the different paths. */ /* Set the option to the socket */ CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_ASSOCINFO, &assoc, sizeof(assoc)) ); if (TRACE_BOOL(ANNOYING)) { /* Check new values */ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_ASSOCINFO, &assoc, &sz) ); fd_log_debug( "New SCTP_ASSOCINFO : sasoc_asocmaxrxt : %hu", assoc.sasoc_asocmaxrxt); fd_log_debug( " sasoc_number_peer_destinations : %hu", assoc.sasoc_number_peer_destinations); fd_log_debug( " sasoc_peer_rwnd : %u" , assoc.sasoc_peer_rwnd); fd_log_debug( " sasoc_local_rwnd : %u" , assoc.sasoc_local_rwnd); fd_log_debug( " sasoc_cookie_life : %u" , assoc.sasoc_cookie_life); } } #else /* SCTP_ASSOCINFO */ TRACE_DEBUG(ANNOYING, "Skipping SCTP_ASSOCINFO"); #endif /* SCTP_ASSOCINFO */ #endif /* ADJUST_RTX_PARAMS */ /* Set the INIT parameters, such as number of streams */ #ifdef SCTP_INITMSG { struct sctp_initmsg init; memset(&init, 0, sizeof(init)); if (TRACE_BOOL(ANNOYING)) { sz = sizeof(init); /* Read socket defaults */ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_INITMSG, &init, &sz) ); if (sz != sizeof(init)) { TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(init)); return ENOTSUP; } fd_log_debug( "Def SCTP_INITMSG : sinit_num_ostreams : %hu", init.sinit_num_ostreams); fd_log_debug( " sinit_max_instreams : %hu", init.sinit_max_instreams); fd_log_debug( " sinit_max_attempts : %hu", init.sinit_max_attempts); fd_log_debug( " sinit_max_init_timeo : %hu", init.sinit_max_init_timeo); } /* Set the init options -- need to receive SCTP_COMM_UP to confirm the requested parameters, but we don't care (best effort) */ init.sinit_num_ostreams = fd_g_config->cnf_sctp_str; /* desired number of outgoing streams */ init.sinit_max_init_timeo = CNX_TIMEOUT * 1000; /* Set the option to the socket */ CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_INITMSG, &init, sizeof(init)) ); if (TRACE_BOOL(ANNOYING)) { /* Check new values */ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_INITMSG, &init, &sz) ); fd_log_debug( "New SCTP_INITMSG : sinit_num_ostreams : %hu", init.sinit_num_ostreams); fd_log_debug( " sinit_max_instreams : %hu", init.sinit_max_instreams); fd_log_debug( " sinit_max_attempts : %hu", init.sinit_max_attempts); fd_log_debug( " sinit_max_init_timeo : %hu", init.sinit_max_init_timeo); } } #else /* SCTP_INITMSG */ TRACE_DEBUG(ANNOYING, "Skipping SCTP_INITMSG"); #endif /* SCTP_INITMSG */ /* The SO_LINGER option will be reset if we want to perform SCTP ABORT */ #ifdef SO_LINGER { struct linger linger; memset(&linger, 0, sizeof(linger)); if (TRACE_BOOL(ANNOYING)) { sz = sizeof(linger); /* Read socket defaults */ CHECK_SYS( getsockopt(sk, SOL_SOCKET, SO_LINGER, &linger, &sz) ); if (sz != sizeof(linger)) { TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(linger)); return ENOTSUP; } fd_log_debug( "Def SO_LINGER : l_onoff : %d", linger.l_onoff); fd_log_debug( " l_linger : %d", linger.l_linger); } linger.l_onoff = 0; /* Do not activate the linger */ linger.l_linger = 0; /* Ignored, but it would mean : Return immediately when closing (=> abort) (graceful shutdown in background) */ /* Set the option */ CHECK_SYS( setsockopt(sk, SOL_SOCKET, SO_LINGER, &linger, sizeof(linger)) ); if (TRACE_BOOL(ANNOYING)) { /* Check new values */ CHECK_SYS( getsockopt(sk, SOL_SOCKET, SO_LINGER, &linger, &sz) ); fd_log_debug( "New SO_LINGER : l_onoff : %d", linger.l_onoff); fd_log_debug( " l_linger : %d", linger.l_linger); } } #else /* SO_LINGER */ TRACE_DEBUG(ANNOYING, "Skipping SO_LINGER"); #endif /* SO_LINGER */ /* Set the NODELAY option (Nagle-like algorithm) */ #ifdef SCTP_NODELAY { int nodelay; if (TRACE_BOOL(ANNOYING)) { sz = sizeof(nodelay); /* Read socket defaults */ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_NODELAY, &nodelay, &sz) ); if (sz != sizeof(nodelay)) { TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(nodelay)); return ENOTSUP; } fd_log_debug( "Def SCTP_NODELAY value : %s", nodelay ? "true" : "false"); } nodelay = 1; /* We turn ON to disable the Nagle algorithm, so that packets are sent ASAP. */ /* Set the option to the socket */ CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_NODELAY, &nodelay, sizeof(nodelay)) ); if (TRACE_BOOL(ANNOYING)) { /* Check new values */ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_NODELAY, &nodelay, &sz) ); fd_log_debug( "New SCTP_NODELAY value : %s", nodelay ? "true" : "false"); } } #else /* SCTP_NODELAY */ TRACE_DEBUG(ANNOYING, "Skipping SCTP_NODELAY"); #endif /* SCTP_NODELAY */ /* SO_RCVBUF size of receiver window SO_SNDBUF size of pending data to send SCTP_AUTOCLOSE for one-to-many only SCTP_PRIMARY_ADDR use this address as primary locally SCTP_ADAPTATION_LAYER set adaptation layer indication, we don't use this */ /* Set the SCTP_DISABLE_FRAGMENTS option, required for TLS */ #ifdef SCTP_DISABLE_FRAGMENTS { int nofrag; if (TRACE_BOOL(ANNOYING)) { sz = sizeof(nofrag); /* Read socket defaults */ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_DISABLE_FRAGMENTS, &nofrag, &sz) ); if (sz != sizeof(nofrag)) { TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(nofrag)); return ENOTSUP; } fd_log_debug( "Def SCTP_DISABLE_FRAGMENTS value : %s", nofrag ? "true" : "false"); } nofrag = 0; /* We turn ON the fragmentation, since Diameter messages & TLS messages can be quite large. */ /* Set the option to the socket */ CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_DISABLE_FRAGMENTS, &nofrag, sizeof(nofrag)) ); if (TRACE_BOOL(ANNOYING)) { /* Check new values */ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_DISABLE_FRAGMENTS, &nofrag, &sz) ); fd_log_debug( "New SCTP_DISABLE_FRAGMENTS value : %s", nofrag ? "true" : "false"); } } #else /* SCTP_DISABLE_FRAGMENTS */ # error "TLS requires support of SCTP_DISABLE_FRAGMENTS" #endif /* SCTP_DISABLE_FRAGMENTS */ /* SCTP_PEER_ADDR_PARAMS control heartbeat per peer address. We set it as a default for all addresses in the association; not sure if it works ... */ #ifdef SCTP_PEER_ADDR_PARAMS { struct sctp_paddrparams parms; memset(&parms, 0, sizeof(parms)); /* Some kernel versions need this to be set */ parms.spp_address.ss_family = AF_INET; if (TRACE_BOOL(ANNOYING)) { sz = sizeof(parms); /* Read socket defaults */ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_PEER_ADDR_PARAMS, &parms, &sz) ); if (sz != sizeof(parms)) { TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(parms)); return ENOTSUP; } fd_log_debug( "Def SCTP_PEER_ADDR_PARAMS : spp_hbinterval : %u", parms.spp_hbinterval); fd_log_debug( " spp_pathmaxrxt : %hu", parms.spp_pathmaxrxt); fd_log_debug( " spp_pathmtu : %u", parms.spp_pathmtu); fd_log_debug( " spp_flags : %x", parms.spp_flags); // fd_log_debug( " spp_ipv6_flowlabel: %u", parms.spp_ipv6_flowlabel); // fd_log_debug( " spp_ipv4_tos : %hhu",parms.spp_ipv4_tos); } parms.spp_flags = SPP_HB_ENABLE; /* Enable heartbeat for the association */ #ifdef SPP_PMTUD_ENABLE parms.spp_flags |= SPP_PMTUD_ENABLE; /* also enable path MTU discovery mechanism */ #endif /* SPP_PMTUD_ENABLE */ #ifdef ADJUST_RTX_PARAMS parms.spp_hbinterval = 6000; /* Send an heartbeat every 6 seconds to quickly start retransmissions */ /* parms.spp_pathmaxrxt : max nbr of restransmissions on this address. There is a relationship with sasoc_asocmaxrxt, so we leave the default here */ #endif /* ADJUST_RTX_PARAMS */ /* Set the option to the socket */ CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_PEER_ADDR_PARAMS, &parms, sizeof(parms)) ); if (TRACE_BOOL(ANNOYING)) { /* Check new values */ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_PEER_ADDR_PARAMS, &parms, &sz) ); fd_log_debug( "New SCTP_PEER_ADDR_PARAMS : spp_hbinterval : %u", parms.spp_hbinterval); fd_log_debug( " spp_pathmaxrxt : %hu", parms.spp_pathmaxrxt); fd_log_debug( " spp_pathmtu : %u", parms.spp_pathmtu); fd_log_debug( " spp_flags : %x", parms.spp_flags); // fd_log_debug( " spp_ipv6_flowlabel: %u", parms.spp_ipv6_flowlabel); // fd_log_debug( " spp_ipv4_tos : %hhu",parms.spp_ipv4_tos); } } #else /* SCTP_PEER_ADDR_PARAMS */ TRACE_DEBUG(ANNOYING, "Skipping SCTP_PEER_ADDR_PARAMS"); #endif /* SCTP_PEER_ADDR_PARAMS */ /* SCTP_DEFAULT_SEND_PARAM - DEPRECATED // parameters for the sendto() call, we don't use it. */ /* Subscribe to some notifications */ #ifdef OLD_SCTP_SOCKET_API #ifdef SCTP_EVENTS /* DEPRECATED */ { struct sctp_event_subscribe event; memset(&event, 0, sizeof(event)); event.sctp_data_io_event = 1; /* to receive the stream ID in SCTP_SNDRCV ancilliary data on message reception */ event.sctp_association_event = 0; /* new or closed associations (mostly for one-to-many style sockets) */ event.sctp_address_event = 1; /* address changes */ event.sctp_send_failure_event = 1; /* delivery failures */ event.sctp_peer_error_event = 1; /* remote peer sends an error */ event.sctp_shutdown_event = 1; /* peer has sent a SHUTDOWN */ event.sctp_partial_delivery_event = 1; /* a partial delivery is aborted, probably indicating the connection is being shutdown */ // event.sctp_adaptation_layer_event = 0; /* adaptation layer notifications */ // event.sctp_authentication_event = 0; /* when new key is made active */ /* Set the option to the socket */ CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_EVENTS, &event, sizeof(event)) ); if (TRACE_BOOL(ANNOYING)) { sz = sizeof(event); CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_EVENTS, &event, &sz) ); if (sz != sizeof(event)) { TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(event)); return ENOTSUP; } fd_log_debug( "SCTP_EVENTS : sctp_data_io_event : %hhu", event.sctp_data_io_event); fd_log_debug( " sctp_association_event : %hhu", event.sctp_association_event); fd_log_debug( " sctp_address_event : %hhu", event.sctp_address_event); fd_log_debug( " sctp_send_failure_event : %hhu", event.sctp_send_failure_event); fd_log_debug( " sctp_peer_error_event : %hhu", event.sctp_peer_error_event); fd_log_debug( " sctp_shutdown_event : %hhu", event.sctp_shutdown_event); fd_log_debug( " sctp_partial_delivery_event : %hhu", event.sctp_partial_delivery_event); fd_log_debug( " sctp_adaptation_layer_event : %hhu", event.sctp_adaptation_layer_event); // fd_log_debug( " sctp_authentication_event : %hhu", event.sctp_authentication_event); } } #else /* SCTP_EVENTS */ TRACE_DEBUG(ANNOYING, "Skipping SCTP_EVENTS"); #endif /* SCTP_EVENTS */ #endif /* OLD_SCTP_SOCKET_API */ /* Set the v4 mapped addresses option */ #ifdef SCTP_I_WANT_MAPPED_V4_ADDR if (!fd_g_config->cnf_flags.no_ip6) { int v4mapped; if (TRACE_BOOL(ANNOYING)) { sz = sizeof(v4mapped); /* Read socket defaults */ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_I_WANT_MAPPED_V4_ADDR, &v4mapped, &sz) ); if (sz != sizeof(v4mapped)) { TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(v4mapped)); return ENOTSUP; } fd_log_debug( "Def SCTP_I_WANT_MAPPED_V4_ADDR value : %s", v4mapped ? "true" : "false"); } #ifndef SCTP_USE_MAPPED_ADDRESSES v4mapped = 0; /* We don't want v4 mapped addresses */ #else /* SCTP_USE_MAPPED_ADDRESSES */ v4mapped = 1; /* but we may have to, otherwise the bind fails in some environments */ #endif /* SCTP_USE_MAPPED_ADDRESSES */ /* Set the option to the socket */ CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_I_WANT_MAPPED_V4_ADDR, &v4mapped, sizeof(v4mapped)) ); if (TRACE_BOOL(ANNOYING)) { /* Check new values */ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_I_WANT_MAPPED_V4_ADDR, &v4mapped, &sz) ); fd_log_debug( "New SCTP_I_WANT_MAPPED_V4_ADDR value : %s", v4mapped ? "true" : "false"); } } else { TRACE_DEBUG(ANNOYING, "Skipping SCTP_I_WANT_MAPPED_V4_ADDR, since IPv6 disabled."); } #else /* SCTP_I_WANT_MAPPED_V4_ADDR */ TRACE_DEBUG(ANNOYING, "Skipping SCTP_I_WANT_MAPPED_V4_ADDR"); #endif /* SCTP_I_WANT_MAPPED_V4_ADDR */ /* SCTP_MAXSEG max size of fragmented segments -- bound to PMTU SCTP_HMAC_IDENT authentication algorithms SCTP_AUTH_ACTIVE_KEY set the active key SCTP_DELAYED_SACK control delayed acks */ /* Set the interleaving option */ #ifdef SCTP_FRAGMENT_INTERLEAVE { int interleave; if (TRACE_BOOL(ANNOYING)) { sz = sizeof(interleave); /* Read socket defaults */ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_FRAGMENT_INTERLEAVE, &interleave, &sz) ); if (sz != sizeof(interleave)) { TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(interleave)); return ENOTSUP; } fd_log_debug( "Def SCTP_FRAGMENT_INTERLEAVE value : %d", interleave); } #if 0 interleave = 2; /* Allow partial delivery on several streams at the same time, since we are stream-aware in our security modules */ #else /* 0 */ interleave = 1; /* hmmm actually, we are not yet capable of handling this, and we don t need it. */ #endif /* 0 */ /* Set the option to the socket */ CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_FRAGMENT_INTERLEAVE, &interleave, sizeof(interleave)) ); if (TRACE_BOOL(ANNOYING)) { /* Check new values */ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_FRAGMENT_INTERLEAVE, &interleave, &sz) ); fd_log_debug( "New SCTP_FRAGMENT_INTERLEAVE value : %d", interleave); } } #else /* SCTP_FRAGMENT_INTERLEAVE */ TRACE_DEBUG(ANNOYING, "Skipping SCTP_FRAGMENT_INTERLEAVE"); #endif /* SCTP_FRAGMENT_INTERLEAVE */ /* SCTP_PARTIAL_DELIVERY_POINT control partial delivery size SCTP_USE_EXT_RCVINFO - DEPRECATED use extended receive info structure (information about the next message if available) */ /* SCTP_AUTO_ASCONF is set by the postbind function */ /* SCTP_MAX_BURST number of packets that can be burst emitted SCTP_CONTEXT save a context information along with the association. */ /* SCTP_EXPLICIT_EOR: we assume implicit EOR in freeDiameter, so let's ensure this is known by the stack */ #ifdef SCTP_EXPLICIT_EOR { int bool; if (TRACE_BOOL(ANNOYING)) { sz = sizeof(bool); /* Read socket defaults */ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &bool, &sz) ); if (sz != sizeof(bool)) { TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(bool)); return ENOTSUP; } fd_log_debug( "Def SCTP_EXPLICIT_EOR value : %s", bool ? "true" : "false"); } bool = 0; /* Set the option to the socket */ CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &bool, sizeof(bool)) ); if (TRACE_BOOL(ANNOYING)) { /* Check new values */ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_EXPLICIT_EOR, &bool, &sz) ); fd_log_debug( "New SCTP_EXPLICIT_EOR value : %s", bool ? "true" : "false"); } } #else /* SCTP_EXPLICIT_EOR */ TRACE_DEBUG(ANNOYING, "Skipping SCTP_EXPLICIT_EOR"); #endif /* SCTP_EXPLICIT_EOR */ /* SCTP_REUSE_PORT share one listening port with several sockets */ #ifndef OLD_SCTP_SOCKET_API #ifdef SCTP_EVENT { /* Subscribe to the following events */ int events_I_want[] = { #ifdef SCTP_ASSOC_CHANGE /* SCTP_ASSOC_CHANGE, */ #endif #ifdef SCTP_PEER_ADDR_CHANGE SCTP_PEER_ADDR_CHANGE, #endif #ifdef SCTP_REMOTE_ERROR SCTP_REMOTE_ERROR, #endif #ifdef SCTP_SEND_FAILED_EVENT SCTP_SEND_FAILED_EVENT, #endif #ifdef SCTP_SHUTDOWN_EVENT SCTP_SHUTDOWN_EVENT, #endif #ifdef SCTP_ADAPTATION_INDICATION /* SCTP_ADAPTATION_INDICATION, */ #endif #ifdef SCTP_PARTIAL_DELIVERY_EVENT /* SCTP_PARTIAL_DELIVERY_EVENT, */ #endif #ifdef SCTP_AUTHENTICATION_EVENT /* SCTP_AUTHENTICATION_EVENT, */ #endif #ifdef SCTP_SENDER_DRY_EVENT /* SCTP_SENDER_DRY_EVENT, */ #endif 0 }; int i; struct sctp_event event; for (i = 0; i < (sizeof(events_I_want) / sizeof(events_I_want[0]) - 1); i++) { memset(&event, 0, sizeof(event)); event.se_type = events_I_want[i]; event.se_on = 1; /* Set the option to the socket */ CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_EVENT, &event, sizeof(event)) ); } } #else /* SCTP_EVENT */ TRACE_DEBUG(ANNOYING, "Skipping SCTP_EVENT"); #endif /* SCTP_EVENT */ #ifdef SCTP_RECVRCVINFO /* Replaces SCTP_SNDRCV */ { int bool = 1; /* Set the option to the socket */ CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_RECVRCVINFO, &bool, sizeof(bool)) ); } #else /* SCTP_RECVRCVINFO */ TRACE_DEBUG(ANNOYING, "Skipping SCTP_RECVRCVINFO"); #endif /* SCTP_RECVRCVINFO */ #endif /* OLD_SCTP_SOCKET_API */ /* SCTP_RECVNXTINFO SCTP_DEFAULT_SNDINFO : send defaults SCTP_DEFAULT_PRINFO : default PR-SCTP */ /* In case of no_ip4, force the v6only option */ #ifdef IPV6_V6ONLY if (fd_g_config->cnf_flags.no_ip4) { int opt = 1; CHECK_SYS(setsockopt(sk, IPPROTO_IPV6, IPV6_V6ONLY, &opt, sizeof(opt))); } #endif /* IPV6_V6ONLY */ return 0; } /* Post-binding socket options */ static int fd_setsockopt_postbind(int sk, int bound_to_default) { TRACE_ENTRY( "%d %d", sk, bound_to_default); CHECK_PARAMS( (sk > 0) ); /* Set the ASCONF option */ #ifdef SCTP_AUTO_ASCONF if (bound_to_default) { int asconf; if (TRACE_BOOL(ANNOYING)) { socklen_t sz; sz = sizeof(asconf); /* Read socket defaults */ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_AUTO_ASCONF, &asconf, &sz) ); if (sz != sizeof(asconf)) { TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %d", sz, (socklen_t)sizeof(asconf)); return ENOTSUP; } fd_log_debug( "Def SCTP_AUTO_ASCONF value : %s", asconf ? "true" : "false"); } asconf = 1; /* allow automatic use of added or removed addresses in the association (for bound-all sockets) */ /* Set the option to the socket */ CHECK_SYS( setsockopt(sk, IPPROTO_SCTP, SCTP_AUTO_ASCONF, &asconf, sizeof(asconf)) ); if (TRACE_BOOL(ANNOYING)) { socklen_t sz = sizeof(asconf); /* Check new values */ CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_AUTO_ASCONF, &asconf, &sz) ); fd_log_debug( "New SCTP_AUTO_ASCONF value : %s", asconf ? "true" : "false"); } } #else /* SCTP_AUTO_ASCONF */ TRACE_DEBUG(ANNOYING, "Skipping SCTP_AUTO_ASCONF"); #endif /* SCTP_AUTO_ASCONF */ return 0; } /* Add addresses from a list to an array, with filter on the flags */ static int add_addresses_from_list_mask(uint8_t ** array, size_t * size, int * addr_count, int target_family, uint16_t port, struct fd_list * list, uint32_t mask, uint32_t val) { struct fd_list * li; int to_add4 = 0; int to_add6 = 0; union { uint8_t *buf; sSA4 *sin; sSA6 *sin6; } ptr; size_t sz; /* First, count the number of addresses to add */ for (li = list->next; li != list; li = li->next) { struct fd_endpoint * ep = (struct fd_endpoint *) li; /* Do the flag match ? */ if ((val & mask) != (ep->flags & mask)) continue; if (ep->sa.sa_family == AF_INET) { to_add4 ++; } else { to_add6 ++; } } if ((to_add4 + to_add6) == 0) return 0; /* nothing to do */ /* The size to add */ if (target_family == AF_INET) { sz = to_add4 * sizeof(sSA4); } else { #ifndef SCTP_USE_MAPPED_ADDRESSES sz = (to_add4 * sizeof(sSA4)) + (to_add6 * sizeof(sSA6)); #else /* SCTP_USE_MAPPED_ADDRESSES */ sz = (to_add4 + to_add6) * sizeof(sSA6); #endif /* SCTP_USE_MAPPED_ADDRESSES */ } /* Now, (re)alloc the array to store the new addresses */ CHECK_MALLOC( *array = realloc(*array, *size + sz) ); /* Finally, add the addresses */ for (li = list->next; li != list; li = li->next) { struct fd_endpoint * ep = (struct fd_endpoint *) li; /* Skip v6 addresses for v4 socket */ if ((target_family == AF_INET) && (ep->sa.sa_family == AF_INET6)) continue; /* Are the flags matching ? */ if ((val & mask) != (ep->flags & mask)) continue; /* Size of the new SA we are adding (array may contain a mix of sockaddr_in and sockaddr_in6) */ #ifndef SCTP_USE_MAPPED_ADDRESSES if (ep->sa.sa_family == AF_INET6) #else /* SCTP_USE_MAPPED_ADDRESSES */ if (target_family == AF_INET6) #endif /* SCTP_USE_MAPPED_ADDRESSES */ sz = sizeof(sSA6); else sz = sizeof(sSA4); /* Place where we add the new address */ ptr.buf = *array + *size; /* place of the new SA */ /* Update other information */ *size += sz; *addr_count += 1; /* And write the addr in the buffer */ if (sz == sizeof(sSA4)) { memcpy(ptr.buf, &ep->sin, sz); ptr.sin->sin_port = port; } else { if (ep->sa.sa_family == AF_INET) { /* We must map the address */ memset(ptr.buf, 0, sz); ptr.sin6->sin6_family = AF_INET6; IN6_ADDR_V4MAP( &ptr.sin6->sin6_addr.s6_addr, ep->sin.sin_addr.s_addr ); } else { memcpy(ptr.sin6, &ep->sin6, sz); } ptr.sin6->sin6_port = port; } } return 0; } /* Create a socket server and bind it according to daemon s configuration */ int fd_sctp_create_bind_server( int * sock, int family, struct fd_list * list, uint16_t port ) { int bind_default; TRACE_ENTRY("%p %i %p %hu", sock, family, list, port); CHECK_PARAMS(sock); /* Create the socket */ CHECK_SYS( *sock = socket(family, SOCK_STREAM, IPPROTO_SCTP) ); /* Set pre-binding socket options, including number of streams etc... */ CHECK_FCT( fd_setsockopt_prebind(*sock) ); bind_default = (! list) || (FD_IS_LIST_EMPTY(list)) ; redo: if ( bind_default ) { /* Implicit endpoints : bind to default addresses */ union { sSS ss; sSA sa; sSA4 sin; sSA6 sin6; } s; /* 0.0.0.0 and [::] are all zeros */ memset(&s, 0, sizeof(s)); s.sa.sa_family = family; if (family == AF_INET) s.sin.sin_port = htons(port); else s.sin6.sin6_port = htons(port); CHECK_SYS( bind(*sock, &s.sa, sSAlen(&s)) ); } else { /* Explicit endpoints to bind to from config */ sSA * sar = NULL; /* array of addresses */ size_t sz = 0; /* size of the array */ int count = 0; /* number of sock addr in the array */ /* Create the array of configured addresses */ CHECK_FCT( add_addresses_from_list_mask((void *)&sar, &sz, &count, family, htons(port), list, EP_FL_CONF, EP_FL_CONF) ); if (!count) { /* None of the addresses in the list came from configuration, we bind to default */ bind_default = 1; goto redo; } #if 0 union { sSA *sa; uint8_t *buf; } ptr; int i; ptr.sa = sar; fd_log_debug("Calling sctp_bindx with the following address array:"); for (i = 0; i < count; i++) { TRACE_sSA(FD_LOG_DEBUG, FULL, " - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" ); ptr.buf += (ptr.sa->sa_family == AF_INET) ? sizeof(sSA4) : sizeof(sSA6) ; } #endif /* Bind to this array */ CHECK_SYS( sctp_bindx(*sock, sar, count, SCTP_BINDX_ADD_ADDR) ); /* We don't need sar anymore */ free(sar); } /* Now, the server is bound, set remaining sockopt */ CHECK_FCT( fd_setsockopt_postbind(*sock, bind_default) ); /* Debug: show all local listening addresses */ #if 0 sSA *sar; union { sSA *sa; uint8_t *buf; } ptr; int sz; CHECK_SYS( sz = sctp_getladdrs(*sock, 0, &sar) ); fd_log_debug("SCTP server bound on :"); for (ptr.sa = sar; sz-- > 0; ptr.buf += (ptr.sa->sa_family == AF_INET) ? sizeof(sSA4) : sizeof(sSA6)) { TRACE_sSA(FD_LOG_DEBUG, FULL, " - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" ); } sctp_freeladdrs(sar); #endif return 0; } /* Allow clients connections on server sockets */ int fd_sctp_listen( int sock ) { TRACE_ENTRY("%d", sock); CHECK_SYS( listen(sock, 5) ); return 0; } /* Create a client socket and connect to remote server */ int fd_sctp_client( int *sock, int no_ip6, uint16_t port, struct fd_list * list ) { int family; union { uint8_t *buf; sSA *sa; } sar; size_t size = 0; int count = 0; int ret; sar.buf = NULL; TRACE_ENTRY("%p %i %hu %p", sock, no_ip6, port, list); CHECK_PARAMS( sock && list && (!FD_IS_LIST_EMPTY(list)) ); if (no_ip6) { family = AF_INET; } else { family = AF_INET6; } /* Create the socket */ CHECK_SYS( *sock = socket(family, SOCK_STREAM, IPPROTO_SCTP) ); /* Cleanup if we are cancelled */ pthread_cleanup_push(fd_cleanup_socket, sock); /* Set the socket options */ CHECK_FCT_DO( ret = fd_setsockopt_prebind(*sock), goto out ); /* Create the array of addresses, add first the configured addresses, then the discovered, then the other ones */ CHECK_FCT_DO( ret = add_addresses_from_list_mask(&sar.buf, &size, &count, family, htons(port), list, EP_FL_CONF, EP_FL_CONF ), goto out ); CHECK_FCT_DO( ret = add_addresses_from_list_mask(&sar.buf, &size, &count, family, htons(port), list, EP_FL_CONF | EP_FL_DISC, EP_FL_DISC ), goto out ); CHECK_FCT_DO( ret = add_addresses_from_list_mask(&sar.buf, &size, &count, family, htons(port), list, EP_FL_CONF | EP_FL_DISC, 0 ), goto out ); /* Try connecting */ LOG_A("Attempting SCTP connection (%d addresses attempted) ", count); #if 0 /* Dump the SAs */ union { uint8_t *buf; sSA *sa; sSA4 *sin; sSA6 *sin6; } ptr; int i; ptr.buf = sar.buf; for (i=0; i< count; i++) { TRACE_sSA(FD_LOG_DEBUG, FULL, " - ", ptr.sa, NI_NUMERICHOST | NI_NUMERICSERV, "" ); ptr.buf += (ptr.sa->sa_family == AF_INET) ? sizeof(sSA4) : sizeof(sSA6); } #endif /* Bug in some Linux kernel, the sctp_connectx is not a cancellation point. To avoid blocking freeDiameter, we allow async cancel here */ pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); #ifdef SCTP_CONNECTX_4_ARGS ret = sctp_connectx(*sock, sar.sa, count, NULL); #else /* SCTP_CONNECTX_4_ARGS */ ret = sctp_connectx(*sock, sar.sa, count); #endif /* SCTP_CONNECTX_4_ARGS */ /* back to normal cancelation behabior */ pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL); if (ret < 0) { ret = errno; /* Some errors are expected, we log at different level */ LOG_A("sctp_connectx returned an error: %s", strerror(ret)); goto out; } free(sar.buf); sar.buf = NULL; /* Set the remaining sockopts */ CHECK_FCT_DO( ret = fd_setsockopt_postbind(*sock, 1), { CHECK_SYS_DO( shutdown(*sock, SHUT_RDWR), /* continue */ ); } ); out: ; pthread_cleanup_pop(0); if (ret) { if (*sock > 0) { CHECK_SYS_DO( close(*sock), /* continue */ ); *sock = -1; } free(sar.buf); } return ret; } /* Retrieve streams information from a connected association -- optionally provide the primary address */ int fd_sctp_get_str_info( int sock, uint16_t *in, uint16_t *out, sSS *primary ) { struct sctp_status status; socklen_t sz = sizeof(status); TRACE_ENTRY("%d %p %p %p", sock, in, out, primary); CHECK_PARAMS( (sock > 0) && in && out ); /* Read the association parameters */ memset(&status, 0, sizeof(status)); CHECK_SYS( getsockopt(sock, IPPROTO_SCTP, SCTP_STATUS, &status, &sz) ); if (sz != sizeof(status)) { TRACE_DEBUG(INFO, "Invalid size of socket option: %d / %zd", sz, sizeof(status)); return ENOTSUP; } #if 0 char sa_buf[sSA_DUMP_STRLEN]; fd_sa_sdump_numeric(sa_buf, &status.sstat_primary.spinfo_address); fd_log_debug( "SCTP_STATUS : sstat_state : %i" , status.sstat_state); fd_log_debug( " sstat_rwnd : %u" , status.sstat_rwnd); fd_log_debug( " sstat_unackdata : %hu", status.sstat_unackdata); fd_log_debug( " sstat_penddata : %hu", status.sstat_penddata); fd_log_debug( " sstat_instrms : %hu", status.sstat_instrms); fd_log_debug( " sstat_outstrms : %hu", status.sstat_outstrms); fd_log_debug( " sstat_fragmentation_point : %u" , status.sstat_fragmentation_point); fd_log_debug( " sstat_primary.spinfo_address : %s" , sa_buf); fd_log_debug( " sstat_primary.spinfo_state : %d" , status.sstat_primary.spinfo_state); fd_log_debug( " sstat_primary.spinfo_cwnd : %u" , status.sstat_primary.spinfo_cwnd); fd_log_debug( " sstat_primary.spinfo_srtt : %u" , status.sstat_primary.spinfo_srtt); fd_log_debug( " sstat_primary.spinfo_rto : %u" , status.sstat_primary.spinfo_rto); fd_log_debug( " sstat_primary.spinfo_mtu : %u" , status.sstat_primary.spinfo_mtu); #endif /* 0 */ *in = status.sstat_instrms; *out = status.sstat_outstrms; if (primary) memcpy(primary, &status.sstat_primary.spinfo_address, sizeof(sSS)); return 0; } /* Get the list of remote endpoints of the socket */ int fd_sctp_get_remote_ep(int sock, struct fd_list * list) { union { sSA *sa; uint8_t *buf; } ptr; sSA * data = NULL; int count; TRACE_ENTRY("%d %p", sock, list); CHECK_PARAMS(list); /* Read the list on the socket */ CHECK_SYS( count = sctp_getpaddrs(sock, 0, &data) ); ptr.sa = data; while (count) { socklen_t sl; switch (ptr.sa->sa_family) { case AF_INET: sl = sizeof(sSA4); break; case AF_INET6: sl = sizeof(sSA6); break; default: TRACE_DEBUG(INFO, "Unknown address family returned in sctp_getpaddrs: %d, skip", ptr.sa->sa_family); /* There is a bug in current Linux kernel: http://www.spinics.net/lists/linux-sctp/msg00760.html */ goto stop; } CHECK_FCT( fd_ep_add_merge( list, ptr.sa, sl, EP_FL_LL ) ); ptr.buf += sl; count --; } stop: /* Free the list */ sctp_freepaddrs(data); /* Now get the primary address, the add function will take care of merging with existing entry */ { struct sctp_status status; socklen_t sz = sizeof(status); int ret; memset(&status, 0, sizeof(status)); /* Attempt to use SCTP_STATUS message to retrieve the primary address */ CHECK_SYS_DO( ret = getsockopt(sock, IPPROTO_SCTP, SCTP_STATUS, &status, &sz), /* continue */); if (sz != sizeof(status)) ret = -1; sz = sizeof(sSS); if (ret < 0) { /* Fallback to getsockname -- not recommended by draft-ietf-tsvwg-sctpsocket-19#section-7.4 */ CHECK_SYS(getpeername(sock, (sSA *)&status.sstat_primary.spinfo_address, &sz)); } CHECK_FCT( fd_ep_add_merge( list, (sSA *)&status.sstat_primary.spinfo_address, sz, EP_FL_PRIMARY ) ); } /* Done! */ return 0; } /* Send a vector over a specified stream */ ssize_t fd_sctp_sendstrv(struct cnxctx * conn, uint16_t strid, const struct iovec *iov, int iovcnt) { struct msghdr mhdr; struct cmsghdr *hdr; #ifdef OLD_SCTP_SOCKET_API struct sctp_sndrcvinfo *sndrcv; uint8_t anci[CMSG_SPACE(sizeof(struct sctp_sndrcvinfo))]; #else /* OLD_SCTP_SOCKET_API */ struct sctp_sndinfo *sndinf; uint8_t anci[CMSG_SPACE(sizeof(struct sctp_sndinfo))]; #endif /* OLD_SCTP_SOCKET_API */ ssize_t ret; struct timespec ts, now; TRACE_ENTRY("%p %hu %p %d", conn, strid, iov, iovcnt); CHECK_PARAMS_DO(conn && iov && iovcnt, { errno = EINVAL; return -1; } ); CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &ts), return -1 ); memset(&mhdr, 0, sizeof(mhdr)); memset(&anci, 0, sizeof(anci)); /* Anciliary data: specify SCTP stream */ hdr = (struct cmsghdr *)anci; hdr->cmsg_len = sizeof(anci); hdr->cmsg_level = IPPROTO_SCTP; #ifdef OLD_SCTP_SOCKET_API hdr->cmsg_type = SCTP_SNDRCV; sndrcv = (struct sctp_sndrcvinfo *)CMSG_DATA(hdr); sndrcv->sinfo_stream = strid; #else /* OLD_SCTP_SOCKET_API */ hdr->cmsg_type = SCTP_SNDINFO; sndinf = (struct sctp_sndinfo *)CMSG_DATA(hdr); sndinf->snd_sid = strid; #endif /* OLD_SCTP_SOCKET_API */ /* note : we could store other data also, for example in .sinfo_ppid for remote peer or in .sinfo_context for errors. */ /* We don't use mhdr.msg_name here; it could be used to specify an address different from the primary */ mhdr.msg_iov = (struct iovec *)iov; mhdr.msg_iovlen = iovcnt; mhdr.msg_control = anci; mhdr.msg_controllen = sizeof(anci); TRACE_DEBUG(FULL, "Sending %d chunks of data (first:%zdb) on stream %hu of socket %d", iovcnt, iov[0].iov_len, strid, conn->cc_socket); again: ret = sendmsg(conn->cc_socket, &mhdr, 0); /* Handle special case of timeout */ if ((ret < 0) && ((errno == EAGAIN) || (errno == EINTR))) { pthread_testcancel(); /* Check how much time we were blocked for this sending. */ CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &now), return -1 ); if ( ((now.tv_sec - ts.tv_sec) * 1000 + ((now.tv_nsec - ts.tv_nsec) / 1000000L)) > MAX_HOTL_BLOCKING_TIME) { LOG_D("Unable to send any data for %dms, closing the connection", MAX_HOTL_BLOCKING_TIME); } else if (! fd_cnx_teststate(conn, CC_STATUS_CLOSING )) { goto again; /* don't care, just ignore */ } /* propagate the error */ errno = -ret; ret = -1; } CHECK_SYS_DO( ret, ); /* for tracing error only */ return ret; } /* Receive the next data from the socket, or next notification */ int fd_sctp_recvmeta(struct cnxctx * conn, uint16_t * strid, uint8_t ** buf, size_t * len, int *event) { ssize_t ret = 0; struct msghdr mhdr; char ancidata[ CMSG_BUF_LEN ]; struct iovec iov; uint8_t *data = NULL; size_t bufsz = 0, datasize = 0; size_t mempagesz = sysconf(_SC_PAGESIZE); /* We alloc buffer by memory pages for efficiency */ int timedout = 0; TRACE_ENTRY("%p %p %p %p %p", conn, strid, buf, len, event); CHECK_PARAMS( conn && buf && len && event ); /* Cleanup out parameters */ *buf = NULL; *len = 0; *event = 0; /* Prepare header for receiving message */ memset(&mhdr, 0, sizeof(mhdr)); mhdr.msg_iov = &iov; mhdr.msg_iovlen = 1; mhdr.msg_control = &ancidata; mhdr.msg_controllen = sizeof(ancidata); next_message: datasize = 0; /* We will loop while all data is not received. */ incomplete: while (datasize >= bufsz ) { /* The buffer is full, enlarge it */ bufsz += mempagesz; CHECK_MALLOC( data = realloc(data, bufsz ) ); } /* the new data will be received following the preceding */ memset(&iov, 0, sizeof(iov)); iov.iov_base = data + datasize ; iov.iov_len = bufsz - datasize; /* Receive data from the socket */ again: pthread_cleanup_push(free, data); ret = recvmsg(conn->cc_socket, &mhdr, 0); pthread_testcancel(); pthread_cleanup_pop(0); /* First, handle timeouts (same as fd_cnx_s_recv) */ if ((ret < 0) && ((errno == EAGAIN) || (errno == EINTR))) { if (! fd_cnx_teststate(conn, CC_STATUS_CLOSING )) goto again; /* don't care, just ignore */ if (!timedout) { timedout ++; /* allow for one timeout while closing */ goto again; } /* fallback to normal handling */ } /* Handle errors */ if (ret <= 0) { /* Socket timedout, closed, or an error occurred */ CHECK_SYS_DO(ret, /* to log in case of error */); free(data); *event = FDEVP_CNX_ERROR; return 0; } /* Update the size of data we received */ datasize += ret; /* SCTP provides an indication when we received a full record; loop if it is not the case */ if ( ! (mhdr.msg_flags & MSG_EOR) ) { goto incomplete; } /* Handle the case where the data received is a notification */ if (mhdr.msg_flags & MSG_NOTIFICATION) { union sctp_notification * notif = (union sctp_notification *) data; TRACE_DEBUG(FULL, "Received %zdb data of notification on socket %d", datasize, conn->cc_socket); switch (notif->sn_header.sn_type) { case SCTP_ASSOC_CHANGE: /* We should not receive these as we did not subscribe for it */ TRACE_DEBUG(FULL, "Received SCTP_ASSOC_CHANGE notification"); TRACE_DEBUG(ANNOYING, " state : %hu", notif->sn_assoc_change.sac_state); TRACE_DEBUG(ANNOYING, " error : %hu", notif->sn_assoc_change.sac_error); TRACE_DEBUG(ANNOYING, " instr : %hu", notif->sn_assoc_change.sac_inbound_streams); TRACE_DEBUG(ANNOYING, " outstr : %hu", notif->sn_assoc_change.sac_outbound_streams); *event = FDEVP_CNX_EP_CHANGE; break; case SCTP_PEER_ADDR_CHANGE: TRACE_DEBUG(FULL, "Received SCTP_PEER_ADDR_CHANGE notification"); /* TRACE_sSA(FD_LOG_DEBUG, ANNOYING, " intf_change : ", &(notif->sn_paddr_change.spc_aaddr), NI_NUMERICHOST | NI_NUMERICSERV, "" ); */ TRACE_DEBUG(ANNOYING, " state : %d", notif->sn_paddr_change.spc_state); TRACE_DEBUG(ANNOYING, " error : %d", notif->sn_paddr_change.spc_error); *event = FDEVP_CNX_EP_CHANGE; break; case SCTP_REMOTE_ERROR: TRACE_DEBUG(FULL, "Received SCTP_REMOTE_ERROR notification"); TRACE_DEBUG(ANNOYING, " err : %hu", ntohs(notif->sn_remote_error.sre_error)); TRACE_DEBUG(ANNOYING, " len : %hu", ntohs(notif->sn_remote_error.sre_length)); *event = FDEVP_CNX_ERROR; break; #ifdef OLD_SCTP_SOCKET_API case SCTP_SEND_FAILED: TRACE_DEBUG(FULL, "Received SCTP_SEND_FAILED notification"); TRACE_DEBUG(ANNOYING, " len : %hu", notif->sn_send_failed.ssf_length); TRACE_DEBUG(ANNOYING, " err : %d", notif->sn_send_failed.ssf_error); *event = FDEVP_CNX_ERROR; break; #else /* OLD_SCTP_SOCKET_API */ case SCTP_SEND_FAILED_EVENT: TRACE_DEBUG(FULL, "Received SCTP_SEND_FAILED_EVENT notification"); *event = FDEVP_CNX_ERROR; break; #endif /* OLD_SCTP_SOCKET_API */ case SCTP_SHUTDOWN_EVENT: TRACE_DEBUG(FULL, "Received SCTP_SHUTDOWN_EVENT notification"); *event = FDEVP_CNX_SHUTDOWN; break; #ifndef OLD_SCTP_SOCKET_API case SCTP_NOTIFICATIONS_STOPPED_EVENT: TRACE_DEBUG(INFO, "Received SCTP_NOTIFICATIONS_STOPPED_EVENT notification, marking the association in error state"); *event = FDEVP_CNX_ERROR; break; #endif /* OLD_SCTP_SOCKET_API */ default: TRACE_DEBUG(FULL, "Received unknown notification %d, ignored", notif->sn_header.sn_type); goto next_message; } free(data); return 0; } /* From this point, we have received a message */ *event = FDEVP_CNX_MSG_RECV; *buf = data; *len = datasize; if (strid) { struct cmsghdr *hdr; #ifdef OLD_SCTP_SOCKET_API struct sctp_sndrcvinfo *sndrcv; #else /* OLD_SCTP_SOCKET_API */ struct sctp_rcvinfo *rcvinf; #endif /* OLD_SCTP_SOCKET_API */ /* Handle the anciliary data */ for (hdr = CMSG_FIRSTHDR(&mhdr); hdr; hdr = CMSG_NXTHDR(&mhdr, hdr)) { /* We deal only with anciliary data at SCTP level */ if (hdr->cmsg_level != IPPROTO_SCTP) { TRACE_DEBUG(FULL, "Received some anciliary data at level %d, skipped", hdr->cmsg_level); continue; } #ifdef OLD_SCTP_SOCKET_API /* Also only interested in SCTP_SNDRCV message for the moment */ if (hdr->cmsg_type != SCTP_SNDRCV) { TRACE_DEBUG(FULL, "Anciliary block IPPROTO_SCTP / %d, skipped", hdr->cmsg_type); continue; } sndrcv = (struct sctp_sndrcvinfo *) CMSG_DATA(hdr); if (TRACE_BOOL(ANNOYING)) { fd_log_debug( "Anciliary block IPPROTO_SCTP / SCTP_SNDRCV"); fd_log_debug( " sinfo_stream : %hu", sndrcv->sinfo_stream); fd_log_debug( " sinfo_ssn : %hu", sndrcv->sinfo_ssn); fd_log_debug( " sinfo_flags : %hu", sndrcv->sinfo_flags); /* fd_log_debug( " sinfo_pr_policy : %hu", sndrcv->sinfo_pr_policy); */ fd_log_debug( " sinfo_ppid : %u" , sndrcv->sinfo_ppid); fd_log_debug( " sinfo_context : %u" , sndrcv->sinfo_context); /* fd_log_debug( " sinfo_pr_value : %u" , sndrcv->sinfo_pr_value); */ fd_log_debug( " sinfo_tsn : %u" , sndrcv->sinfo_tsn); fd_log_debug( " sinfo_cumtsn : %u" , sndrcv->sinfo_cumtsn); } *strid = sndrcv->sinfo_stream; #else /* OLD_SCTP_SOCKET_API */ /* Also only interested in SCTP_RCVINFO message for the moment */ if (hdr->cmsg_type != SCTP_RCVINFO) { TRACE_DEBUG(FULL, "Anciliary block IPPROTO_SCTP / %d, skipped", hdr->cmsg_type); continue; } rcvinf = (struct sctp_rcvinfo *) CMSG_DATA(hdr); *strid = rcvinf->rcv_sid; #endif /* OLD_SCTP_SOCKET_API */ } TRACE_DEBUG(FULL, "Received %zdb data on socket %d, stream %hu", datasize, conn->cc_socket, *strid); } else { TRACE_DEBUG(FULL, "Received %zdb data on socket %d (stream ignored)", datasize, conn->cc_socket); } return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/sctp3436.c000066400000000000000000000650201333553357400224440ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* This file contains code for TLS over multi-stream SCTP wrapper implementation (GnuTLS does not support this) */ /* See http://aaa.koganei.wide.ad.jp/blogs/index.php/waaad/2008/08/18/tls-over-sctp for history */ #include "fdcore-internal.h" #include "cnxctx.h" #include #include /* Architecture of this wrapper: - we have several fifo queues (1 per stream pairs). GnuTLS is configured to use custom push / pull functions: - the pull function retrieves the data from the fifo queue corresponding to a stream #. - the push function sends the data on a certain stream. We also have a demux thread that reads the socket and store received data in the appropriate fifo We have one gnutls_session per stream pair, and as many threads that read the gnutls records and save incoming data to the target queue. This complexity is required because we cannot read a socket for a given stream only; we can only get the next message and find its stream. */ /* Note that this mechanism is replaced by DTLS in RFC6733 */ /*************************************************************/ /* threads */ /*************************************************************/ /* Demux received data and store in the appropriate fifo */ static void * demuxer(void * arg) { struct cnxctx * conn = arg; uint8_t * buf; size_t bufsz; int event; uint16_t strid; TRACE_ENTRY("%p", arg); CHECK_PARAMS_DO(conn && (conn->cc_socket > 0), goto out); /* Set the thread name */ { char buf[128]; snprintf(buf, sizeof(buf), "Demuxer (%d:%s)", conn->cc_socket, conn->cc_remid); fd_log_threadname ( buf ); } ASSERT( conn->cc_proto == IPPROTO_SCTP ); ASSERT( fd_cnx_target_queue(conn) ); ASSERT( conn->cc_sctp3436_data.array ); do { CHECK_FCT_DO( fd_sctp_recvmeta(conn, &strid, &buf, &bufsz, &event), goto fatal ); switch (event) { case FDEVP_CNX_MSG_RECV: /* Demux this message to the appropriate fifo, another thread will pull, gnutls process, and send to target queue */ if (strid < conn->cc_sctp_para.pairs) { CHECK_FCT_DO(fd_event_send(conn->cc_sctp3436_data.array[strid].raw_recv, event, bufsz, buf), goto fatal ); } else { TRACE_DEBUG(INFO, "Received packet (%zd bytes) on out-of-range stream #%d from %s, discarded.", bufsz, strid, conn->cc_remid); free(buf); } break; case FDEVP_CNX_EP_CHANGE: /* Send this event to the target queue */ CHECK_FCT_DO( fd_event_send( fd_cnx_target_queue(conn), event, bufsz, buf), goto fatal ); break; case FDEVP_CNX_ERROR: goto out; case FDEVP_CNX_SHUTDOWN: /* Just ignore the notification for now, we will get another error later anyway */ continue; default: goto fatal; } } while (conn->cc_loop); out: /* Signal termination of the connection to all decipher threads */ for (strid = 0; strid < conn->cc_sctp_para.pairs; strid++) { if (conn->cc_sctp3436_data.array[strid].raw_recv) { CHECK_FCT_DO(fd_event_send(conn->cc_sctp3436_data.array[strid].raw_recv, FDEVP_CNX_ERROR, 0, NULL), goto fatal ); } } fd_cnx_markerror(conn); TRACE_DEBUG(FULL, "Thread terminated"); return NULL; fatal: /* An unrecoverable error occurred, stop the daemon */ CHECK_FCT_DO(fd_core_shutdown(), ); goto out; } /* Decrypt the data received in this stream pair and store it in the target queue */ static void * decipher(void * arg) { struct sctp3436_ctx * ctx = arg; struct cnxctx *cnx; TRACE_ENTRY("%p", arg); CHECK_PARAMS_DO(ctx && ctx->raw_recv && ctx->parent, goto error); cnx = ctx->parent; ASSERT( fd_cnx_target_queue(cnx) ); /* Set the thread name */ { char buf[128]; snprintf(buf, sizeof(buf), "Decipher (%hu@%d:%s)", ctx->strid, cnx->cc_socket, cnx->cc_remid); fd_log_threadname ( buf ); } /* The next function loops while there is no error */ CHECK_FCT_DO(fd_tls_rcvthr_core(cnx, ctx->strid ? ctx->session : cnx->cc_tls_para.session), /* continue */); error: fd_cnx_markerror(cnx); TRACE_DEBUG(FULL, "Thread terminated"); return NULL; } /*************************************************************/ /* push / pull */ /*************************************************************/ #ifdef GNUTLS_VERSION_300 /* Check if data is available for gnutls on a given context */ static int sctp3436_pull_timeout(gnutls_transport_ptr_t tr, unsigned int ms) { struct sctp3436_ctx * ctx = (struct sctp3436_ctx *) tr; struct timespec tsstore, *ts = NULL; int ret; TRACE_ENTRY("%p %d", tr, ms); if (ctx->partial.buf) return 1; /* data is already available for pull */ if (ms) { CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &tsstore), return -1 ); tsstore.tv_nsec += (long)ms * 1000000; tsstore.tv_sec += tsstore.tv_nsec / 1000000000L; tsstore.tv_nsec %= 1000000000L; ts = &tsstore; } ret = fd_fifo_select ( ctx->raw_recv, ts ); if (ret < 0) { errno = -ret; ret = -1; } return ret; } #endif /* GNUTLS_VERSION_300 */ /* Send data over the connection, called by gnutls */ #ifndef GNUTLS_VERSION_212 static ssize_t sctp3436_push(gnutls_transport_ptr_t tr, const void * data, size_t len) { struct sctp3436_ctx * ctx = (struct sctp3436_ctx *) tr; struct iovec iov; TRACE_ENTRY("%p %p %zd", tr, data, len); CHECK_PARAMS_DO( tr && data, { errno = EINVAL; return -1; } ); iov.iov_base = (void *)data; iov.iov_len = len; return fd_sctp_sendstrv(ctx->parent, ctx->strid, &iov, 1); } #else /* GNUTLS_VERSION_212 */ static ssize_t sctp3436_pushv(gnutls_transport_ptr_t tr, const giovec_t * iov, int iovcnt) { struct sctp3436_ctx * ctx = (struct sctp3436_ctx *) tr; TRACE_ENTRY("%p %p %d", tr, iov, iovcnt); CHECK_PARAMS_DO( tr && iov, { errno = EINVAL; return -1; } ); return fd_sctp_sendstrv(ctx->parent, ctx->strid, (const struct iovec *)iov, iovcnt); } #endif /* GNUTLS_VERSION_212 */ /* Retrieve data received on a stream and already demultiplexed */ static ssize_t sctp3436_pull(gnutls_transport_ptr_t tr, void * buf, size_t len) { struct sctp3436_ctx * ctx = (struct sctp3436_ctx *) tr; size_t pulled = 0; int emptied; TRACE_ENTRY("%p %p %zd", tr, buf, len); CHECK_PARAMS_DO( tr && buf, { errno = EINVAL; goto error; } ); /* If we don't have data available now, pull new message from the fifo -- this is blocking (until the queue is destroyed) */ if (!ctx->partial.buf) { int ev; CHECK_FCT_DO( errno = fd_event_get(ctx->raw_recv, &ev, &ctx->partial.bufsz, (void *)&ctx->partial.buf), goto error ); if (ev == FDEVP_CNX_ERROR) { /* Documentations says to return 0 on connection closed, but it does hang within gnutls_handshake */ return -1; } } pulled = ctx->partial.bufsz - ctx->partial.offset; if (pulled <= len) { emptied = 1; } else { /* limit to the capacity of destination buffer */ emptied = 0; pulled = len; } /* Store the data in the destination buffer */ memcpy(buf, ctx->partial.buf + ctx->partial.offset, pulled); /* Free the buffer if we read all its content, and reset the partial structure */ if (emptied) { free(ctx->partial.buf); memset(&ctx->partial, 0, sizeof(ctx->partial)); } else { ctx->partial.offset += pulled; } /* We are done */ return pulled; error: gnutls_transport_set_errno (ctx->session, errno); return -1; } /* Set the parameters of a session to use the appropriate fifo and stream information */ #ifndef GNUTLS_VERSION_300 GCC_DIAG_OFF("-Wdeprecated-declarations") #endif /* !GNUTLS_VERSION_300 */ static void set_sess_transport(gnutls_session_t session, struct sctp3436_ctx *ctx) { /* Set the transport pointer passed to push & pull callbacks */ GNUTLS_TRACE( gnutls_transport_set_ptr( session, (gnutls_transport_ptr_t) ctx ) ); /* Reset the low water value, since we don't use sockets */ #ifndef GNUTLS_VERSION_300 /* starting version 2.12, this call is not needed */ GNUTLS_TRACE( gnutls_transport_set_lowat( session, 0 ) ); #else /* GNUTLS_VERSION_300 */ /* but in 3.0 we have to provide the pull_timeout callback */ GNUTLS_TRACE( gnutls_transport_set_pull_timeout_function( session, sctp3436_pull_timeout ) ); #endif /* GNUTLS_VERSION_300 */ /* Set the push and pull callbacks */ GNUTLS_TRACE( gnutls_transport_set_pull_function(session, sctp3436_pull) ); #ifndef GNUTLS_VERSION_212 GNUTLS_TRACE( gnutls_transport_set_push_function(session, sctp3436_push) ); #else /* GNUTLS_VERSION_212 */ GNUTLS_TRACE( gnutls_transport_set_vec_push_function(session, sctp3436_pushv) ); #endif /* GNUTLS_VERSION_212 */ return; } #ifndef GNUTLS_VERSION_300 GCC_DIAG_ON("-Wdeprecated-declarations") #endif /* !GNUTLS_VERSION_300 */ /*************************************************************/ /* Session resuming support */ /*************************************************************/ struct sr_store { struct fd_list list; /* list of sr_data, ordered by key.size then key.data */ pthread_rwlock_t lock; struct cnxctx *parent; /* Add another list to chain in a global list to implement a garbage collector on sessions -- TODO if needed */ }; /* Saved master session data for resuming sessions */ struct sr_data { struct fd_list chain; gnutls_datum_t key; gnutls_datum_t data; }; /* Initialize the store area for a connection */ static int store_init(struct cnxctx * conn) { TRACE_ENTRY("%p", conn); CHECK_PARAMS( conn && !conn->cc_sctp3436_data.sess_store ); CHECK_MALLOC( conn->cc_sctp3436_data.sess_store = malloc(sizeof(struct sr_store)) ); memset(conn->cc_sctp3436_data.sess_store, 0, sizeof(struct sr_store)); fd_list_init(&conn->cc_sctp3436_data.sess_store->list, NULL); CHECK_POSIX( pthread_rwlock_init(&conn->cc_sctp3436_data.sess_store->lock, NULL) ); conn->cc_sctp3436_data.sess_store->parent = conn; return 0; } /* Destroy the store area for a connection, and all its content */ static void store_destroy(struct cnxctx * conn) { /* Del all list entries */ TRACE_ENTRY("%p", conn); CHECK_PARAMS_DO( conn, return ); if (!conn->cc_sctp3436_data.sess_store) return; CHECK_POSIX_DO( pthread_rwlock_destroy(&conn->cc_sctp3436_data.sess_store->lock), /* continue */ ); while (!FD_IS_LIST_EMPTY(&conn->cc_sctp3436_data.sess_store->list)) { struct sr_data * sr = (struct sr_data *) conn->cc_sctp3436_data.sess_store->list.next; fd_list_unlink( &sr->chain ); free(sr->key.data); free(sr->data.data); free(sr); } free(conn->cc_sctp3436_data.sess_store); conn->cc_sctp3436_data.sess_store = NULL; return; } /* Search the position (or next if not found) of a key in a store */ static struct fd_list * find_or_next(struct sr_store * sto, gnutls_datum_t key, int * match) { struct fd_list * ret; *match = 0; for (ret = sto->list.next; ret != &sto->list; ret = ret->next) { int cmp = 0; struct sr_data * sr = (struct sr_data *)ret; cmp = fd_os_cmp(key.data, key.size, sr->key.data, sr->key.size); if (cmp > 0) continue; if (cmp == 0) *match = 1; break; } return ret; } /* Callbacks for the TLS server side of the connection, called during gnutls_handshake */ static int sr_store (void *dbf, gnutls_datum_t key, gnutls_datum_t data) { struct sr_store * sto = (struct sr_store *)dbf; struct fd_list * li; struct sr_data * sr; int match = 0; int ret = 0; TRACE_DEBUG( GNUTLS_DBG_LEVEL, "GNUTLS Callback: %s", __PRETTY_FUNCTION__ ); CHECK_PARAMS_DO( sto && key.data && data.data, return -1 ); CHECK_POSIX_DO( pthread_rwlock_wrlock(&sto->lock), return -1 ); TRACE_BUFFER(FD_LOG_DEBUG, GNUTLS_DBG_LEVEL, "Session store [key ", key.data, key.size, "]"); li = find_or_next(sto, key, &match); if (match) { sr = (struct sr_data *)li; /* Check the data is the same */ if ((data.size != sr->data.size) || memcmp(data.data, sr->data.data, data.size)) { TRACE_DEBUG(INFO, "GnuTLS tried to store a session with same key and different data!"); TRACE_BUFFER(FD_LOG_DEBUG, INFO, "Session store [key ", key.data, key.size, "]"); TRACE_BUFFER(FD_LOG_DEBUG, INFO, " -- old data [", sr->data.data, sr->data.size, "]"); TRACE_BUFFER(FD_LOG_DEBUG, INFO, " -- new data [", data.data, data.size, "]"); ret = -1; } else { TRACE_DEBUG(GNUTLS_DBG_LEVEL, "GnuTLS tried to store a session with same key and same data, skipped."); } goto out; } /* Create a new entry */ CHECK_MALLOC_DO( sr = malloc(sizeof(struct sr_data)), { ret = -1; goto out; } ); memset(sr, 0, sizeof(struct sr_data)); fd_list_init(&sr->chain, sr); CHECK_MALLOC_DO( sr->key.data = malloc(key.size), { ret = -1; goto out; } ); sr->key.size = key.size; memcpy(sr->key.data, key.data, key.size); CHECK_MALLOC_DO( sr->data.data = malloc(data.size), { ret = -1; goto out; } ); sr->data.size = data.size; memcpy(sr->data.data, data.data, data.size); /* Save this new entry in the list, we are done */ fd_list_insert_before(li, &sr->chain); out: CHECK_POSIX_DO( pthread_rwlock_unlock(&sto->lock), return -1 ); return ret; } static int sr_remove (void *dbf, gnutls_datum_t key) { struct sr_store * sto = (struct sr_store *)dbf; struct fd_list * li; struct sr_data * sr; int match = 0; int ret = 0; TRACE_DEBUG( GNUTLS_DBG_LEVEL, "GNUTLS Callback: %s", __PRETTY_FUNCTION__ ); CHECK_PARAMS_DO( sto && key.data, return -1 ); CHECK_POSIX_DO( pthread_rwlock_wrlock(&sto->lock), return -1 ); TRACE_BUFFER(FD_LOG_DEBUG, GNUTLS_DBG_LEVEL, "Session delete [key ", key.data, key.size, "]"); li = find_or_next(sto, key, &match); if (match) { sr = (struct sr_data *)li; /* Destroy this data */ fd_list_unlink(li); free(sr->key.data); free(sr->data.data); free(sr); } else { /* It was not found */ ret = -1; } CHECK_POSIX_DO( pthread_rwlock_unlock(&sto->lock), return -1 ); return ret; } static gnutls_datum_t sr_fetch (void *dbf, gnutls_datum_t key) { struct sr_store * sto = (struct sr_store *)dbf; struct fd_list * li; struct sr_data * sr; int match = 0; gnutls_datum_t res = { NULL, 0 }; gnutls_datum_t error = { NULL, 0 }; TRACE_DEBUG( GNUTLS_DBG_LEVEL, "GNUTLS Callback: %s", __PRETTY_FUNCTION__ ); CHECK_PARAMS_DO( sto && key.data, return error ); CHECK_POSIX_DO( pthread_rwlock_rdlock(&sto->lock), return error ); TRACE_BUFFER(FD_LOG_DEBUG, GNUTLS_DBG_LEVEL, "Session fetch [key ", key.data, key.size, "]"); li = find_or_next(sto, key, &match); if (match) { sr = (struct sr_data *)li; GNUTLS_TRACE( CHECK_MALLOC_DO(res.data = gnutls_malloc(sr->data.size), goto out ) ); res.size = sr->data.size; memcpy(res.data, sr->data.data, res.size); } out: TRACE_DEBUG(GNUTLS_DBG_LEVEL, "Fetched (%p, %d) from store %p", res.data, res.size, sto); CHECK_POSIX_DO( pthread_rwlock_unlock(&sto->lock), return error); return res; } /* Set the session pointer in a session object */ static void set_resume_callbacks(gnutls_session_t session, struct cnxctx * conn) { TRACE_ENTRY("%p", conn); GNUTLS_TRACE( gnutls_db_set_retrieve_function(session, sr_fetch)); GNUTLS_TRACE( gnutls_db_set_remove_function (session, sr_remove)); GNUTLS_TRACE( gnutls_db_set_store_function (session, sr_store)); GNUTLS_TRACE( gnutls_db_set_ptr (session, conn->cc_sctp3436_data.sess_store)); return; } /* The handshake is made in parallel in several threads to speed up */ static void * handshake_resume_th(void * arg) { struct sctp3436_ctx * ctx = (struct sctp3436_ctx *) arg; int resumed; TRACE_ENTRY("%p", arg); /* Set the thread name */ { char buf[48]; snprintf(buf, sizeof(buf), "Handshake resume (%hu@%d)", ctx->strid, ctx->parent->cc_socket); fd_log_threadname ( buf ); } TRACE_DEBUG(FULL, "Starting TLS resumed handshake on stream %hu", ctx->strid); CHECK_GNUTLS_DO( gnutls_handshake( ctx->session ), return NULL); GNUTLS_TRACE( resumed = gnutls_session_is_resumed(ctx->session) ); #ifndef GNUTLS_VERSION_300 if (!resumed) { /* Check the credentials here also */ CHECK_FCT_DO( fd_tls_verify_credentials(ctx->session, ctx->parent, 0), return NULL ); } #endif /* GNUTLS_VERSION_300 */ if (TRACE_BOOL(FULL)) { if (resumed) { fd_log_debug("Session was resumed successfully on stream %hu (conn: '%s')", ctx->strid, fd_cnx_getid(ctx->parent)); } else { fd_log_debug("Session was NOT resumed on stream %hu (full handshake) (conn: '%s')", ctx->strid, fd_cnx_getid(ctx->parent)); } } /* Finished, OK */ return arg; } /*************************************************************/ /* Exported functions */ /*************************************************************/ /* Initialize the wrapper for the connection */ int fd_sctp3436_init(struct cnxctx * conn) { uint16_t i; TRACE_ENTRY("%p", conn); CHECK_PARAMS( conn && (conn->cc_sctp_para.pairs > 1) && (!conn->cc_sctp3436_data.array) ); /* First, alloc the array and initialize the non-TLS data */ CHECK_MALLOC( conn->cc_sctp3436_data.array = calloc(conn->cc_sctp_para.pairs, sizeof(struct sctp3436_ctx)) ); for (i = 0; i < conn->cc_sctp_para.pairs; i++) { conn->cc_sctp3436_data.array[i].parent = conn; conn->cc_sctp3436_data.array[i].strid = i; CHECK_FCT( fd_fifo_new(&conn->cc_sctp3436_data.array[i].raw_recv, 10) ); } /* Set push/pull functions in the master session, using fifo in array[0] */ set_sess_transport(conn->cc_tls_para.session, &conn->cc_sctp3436_data.array[0]); /* For server side, we also initialize the resuming capabilities */ if (conn->cc_tls_para.mode == GNUTLS_SERVER) { /* Prepare the store for sessions data */ CHECK_FCT( store_init(conn) ); /* Set the callbacks for resuming in the master session */ set_resume_callbacks(conn->cc_tls_para.session, conn); } /* Start the demux thread */ CHECK_POSIX( pthread_create( &conn->cc_rcvthr, NULL, demuxer, conn ) ); return 0; } /* Handshake other streams, after full handshake on the master session */ int fd_sctp3436_handshake_others(struct cnxctx * conn, char * priority, void * alt_creds) { uint16_t i; int errors = 0; gnutls_datum_t master_data; TRACE_ENTRY("%p %p", conn, priority); CHECK_PARAMS( conn && (conn->cc_sctp_para.pairs > 1) && conn->cc_sctp3436_data.array ); /* Server side: we set all the parameters, the resume callback will take care of resuming the session */ /* Client side: we duplicate the parameters of the master session, then set the transport pointer */ /* For client side, retrieve the master session parameters */ if (conn->cc_tls_para.mode == GNUTLS_CLIENT) { CHECK_GNUTLS_DO( gnutls_session_get_data2(conn->cc_tls_para.session, &master_data), return ENOMEM ); /* For debug: */ if (TRACE_BOOL(GNUTLS_DBG_LEVEL)) { uint8_t id[256]; size_t ids = sizeof(id); CHECK_GNUTLS_DO( gnutls_session_get_id(conn->cc_tls_para.session, id, &ids), /* continue */ ); TRACE_BUFFER(FD_LOG_DEBUG, GNUTLS_DBG_LEVEL, "Master session id: [", id, ids, "]"); } } /* Initialize the session objects and start the handshake in a separate thread */ for (i = 1; i < conn->cc_sctp_para.pairs; i++) { /* Set credentials and priority */ CHECK_FCT( fd_tls_prepare(&conn->cc_sctp3436_data.array[i].session, conn->cc_tls_para.mode, 0, priority, alt_creds) ); /* additional initialization for gnutls 3.x */ #ifdef GNUTLS_VERSION_300 /* the verify function has already been set in the global initialization in config.c */ /* fd_tls_verify_credentials_2 uses the connection */ gnutls_session_set_ptr (conn->cc_sctp3436_data.array[i].session, (void *) conn); if ((conn->cc_tls_para.cn != NULL) && (conn->cc_tls_para.mode == GNUTLS_CLIENT)) { /* this might allow virtual hosting on the remote peer */ CHECK_GNUTLS_DO( gnutls_server_name_set (conn->cc_sctp3436_data.array[i].session, GNUTLS_NAME_DNS, conn->cc_tls_para.cn, strlen(conn->cc_tls_para.cn)), /* ignore failure */); } #endif /* GNUTLS_VERSION_300 */ #ifdef GNUTLS_VERSION_310 GNUTLS_TRACE( gnutls_handshake_set_timeout( conn->cc_sctp3436_data.array[i].session, GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT)); #endif /* GNUTLS_VERSION_310 */ /* For the client, copy data from master session; for the server, set session resuming pointers */ if (conn->cc_tls_para.mode == GNUTLS_CLIENT) { CHECK_GNUTLS_DO( gnutls_session_set_data(conn->cc_sctp3436_data.array[i].session, master_data.data, master_data.size), return ENOMEM ); } else { set_resume_callbacks(conn->cc_sctp3436_data.array[i].session, conn); } /* Set transport parameters */ set_sess_transport(conn->cc_sctp3436_data.array[i].session, &conn->cc_sctp3436_data.array[i]); /* Start the handshake thread */ CHECK_POSIX( pthread_create( &conn->cc_sctp3436_data.array[i].thr, NULL, handshake_resume_th, &conn->cc_sctp3436_data.array[i] ) ); } /* We can now release the memory of master session data if any */ if (conn->cc_tls_para.mode == GNUTLS_CLIENT) { GNUTLS_TRACE( gnutls_free(master_data.data) ); } /* Now wait for all handshakes to finish */ for (i = 1; i < conn->cc_sctp_para.pairs; i++) { void * ret; CHECK_POSIX( pthread_join(conn->cc_sctp3436_data.array[i].thr, &ret) ); conn->cc_sctp3436_data.array[i].thr = (pthread_t) NULL; if (ret == NULL) { errors++; /* Handshake failed on this stream */ } } if (errors) { TRACE_DEBUG(INFO, "Handshake failed on %d/%hd stream pairs", errors, conn->cc_sctp_para.pairs); fd_cnx_markerror(conn); return ENOTCONN; } return 0; } /* Receive messages from others ? all other stream pairs : the master pair */ int fd_sctp3436_startthreads(struct cnxctx * conn, int others) { uint16_t i; TRACE_ENTRY("%p", conn); CHECK_PARAMS( conn && conn->cc_sctp3436_data.array ); if (others) { for (i = 1; i < conn->cc_sctp_para.pairs; i++) { /* Start the decipher thread */ CHECK_POSIX( pthread_create( &conn->cc_sctp3436_data.array[i].thr, NULL, decipher, &conn->cc_sctp3436_data.array[i] ) ); } } else { CHECK_POSIX( pthread_create( &conn->cc_sctp3436_data.array[0].thr, NULL, decipher, &conn->cc_sctp3436_data.array[0] ) ); } return 0; } /* Initiate a "bye" on all stream pairs */ void fd_sctp3436_bye(struct cnxctx * conn) { uint16_t i; CHECK_PARAMS_DO( conn && conn->cc_sctp3436_data.array, return ); /* End all TLS sessions, in series (not as efficient as paralel, but simpler) */ for (i = 1; i < conn->cc_sctp_para.pairs; i++) { if ( ! fd_cnx_teststate(conn, CC_STATUS_ERROR)) { CHECK_GNUTLS_DO( gnutls_bye(conn->cc_sctp3436_data.array[i].session, GNUTLS_SHUT_WR), fd_cnx_markerror(conn) ); } } } /* After "bye" was sent on all streams, read from sessions until an error is received */ void fd_sctp3436_waitthreadsterm(struct cnxctx * conn) { uint16_t i; TRACE_ENTRY("%p", conn); CHECK_PARAMS_DO( conn && conn->cc_sctp3436_data.array, return ); for (i = 0; i < conn->cc_sctp_para.pairs; i++) { if (conn->cc_sctp3436_data.array[i].thr != (pthread_t)NULL) { CHECK_POSIX_DO( pthread_join(conn->cc_sctp3436_data.array[i].thr, NULL), /* continue */ ); conn->cc_sctp3436_data.array[i].thr = (pthread_t)NULL; } } return; } /* Free gnutls resources of all sessions */ void fd_sctp3436_gnutls_deinit_others(struct cnxctx * conn) { uint16_t i; TRACE_ENTRY("%p", conn); CHECK_PARAMS_DO( conn && conn->cc_sctp3436_data.array, return ); for (i = 1; i < conn->cc_sctp_para.pairs; i++) { if (conn->cc_sctp3436_data.array[i].session) { GNUTLS_TRACE( gnutls_deinit(conn->cc_sctp3436_data.array[i].session) ); conn->cc_sctp3436_data.array[i].session = NULL; } } } /* Stop all receiver threads */ void fd_sctp3436_stopthreads(struct cnxctx * conn) { uint16_t i; TRACE_ENTRY("%p", conn); CHECK_PARAMS_DO( conn && conn->cc_sctp3436_data.array, return ); for (i = 0; i < conn->cc_sctp_para.pairs; i++) { CHECK_FCT_DO( fd_thr_term(&conn->cc_sctp3436_data.array[i].thr), /* continue */ ); } return; } /* Destroy a wrapper context */ void fd_sctp3436_destroy(struct cnxctx * conn) { uint16_t i; CHECK_PARAMS_DO( conn && conn->cc_sctp3436_data.array, return ); /* Terminate all receiving threads in case we did not do it yet */ fd_sctp3436_stopthreads(conn); /* Now, stop the demux thread */ CHECK_FCT_DO( fd_thr_term(&conn->cc_rcvthr), /* continue */ ); /* Free remaining data in the array */ for (i = 0; i < conn->cc_sctp_para.pairs; i++) { if (conn->cc_sctp3436_data.array[i].raw_recv) fd_event_destroy( &conn->cc_sctp3436_data.array[i].raw_recv, free ); free(conn->cc_sctp3436_data.array[i].partial.buf); if (conn->cc_sctp3436_data.array[i].session) { GNUTLS_TRACE( gnutls_deinit(conn->cc_sctp3436_data.array[i].session) ); conn->cc_sctp3436_data.array[i].session = NULL; } } /* Free the array itself now */ free(conn->cc_sctp3436_data.array); conn->cc_sctp3436_data.array = NULL; /* Delete the store of sessions */ store_destroy(conn); return ; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/server.c000066400000000000000000000424101333553357400224570ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" /* Server (listening) part of the framework */ static struct fd_list FD_SERVERS = FD_LIST_INITIALIZER(FD_SERVERS); /* The list of all server objects */ /* We don't need to protect this list, it is only accessed from the main framework thread. */ enum s_state { NOT_CREATED=0, RUNNING, TERMINATED, ERROR /* an error occurred, this is not a valid status */ }; /* Servers information */ struct server { struct fd_list chain; /* link in the FD_SERVERS list */ struct cnxctx * conn; /* server connection context (listening socket) */ int proto; /* IPPROTO_TCP or IPPROTO_SCTP */ int secur; /* TLS is started immediatly after connection ? 0: no; 1: RFU; 2: yes (TLS/TCP or TLS/SCTP) */ pthread_t thr; /* The thread waiting for new connections (will store the data in the clients fifo) */ enum s_state state; /* state of the thread */ struct fifo *pending; /* FIFO of struct cnxctx */ struct pool_workers { struct server * s; /* pointer to the parent server structure */ int id; /* The worker id for logs */ pthread_t worker; /* The thread */ } *workers; /* array of cnf_thr_srv items */ }; /* Micro functions to read/change the status thread-safely */ static pthread_mutex_t s_lock = PTHREAD_MUTEX_INITIALIZER; static enum s_state get_status(struct server * s) { enum s_state r; CHECK_POSIX_DO( pthread_mutex_lock(&s_lock), return ERROR ); r = s->state; CHECK_POSIX_DO( pthread_mutex_unlock(&s_lock), return ERROR ); return r; } static void set_status(struct server * s, enum s_state st) { CHECK_POSIX_DO( pthread_mutex_lock(&s_lock), return ); s->state = st; CHECK_POSIX_DO( pthread_mutex_unlock(&s_lock), return ); } /* dump one item of the server->pending fifo */ static DECLARE_FD_DUMP_PROTOTYPE(dump_cnx, void * item) { struct cnxctx * c = item; CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " '%s'", fd_cnx_getid(c)), return NULL); return *buf; } /* Dump all servers information */ DECLARE_FD_DUMP_PROTOTYPE(fd_servers_dump, int details) { struct fd_list * li; FD_DUMP_HANDLE_OFFSET(); for (li = FD_SERVERS.next; li != &FD_SERVERS; li = li->next) { struct server * s = (struct server *)li; enum s_state st = get_status(s); if (details) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "{server}(@%p)'%s': %s, %s(%d), %s", s, fd_cnx_getid(s->conn), IPPROTO_NAME( s->proto ), s->secur ? "Secur" : "NotSecur", s->secur, (st == NOT_CREATED) ? "Thread not created" : ((st == RUNNING) ? "Thread running" : ((st == TERMINATED) ? "Thread terminated" : "Thread status unknown"))), return NULL); /* Dump the client list of this server */ CHECK_MALLOC_DO( fd_fifo_dump(FD_DUMP_STD_PARAMS, "pending connections", s->pending, dump_cnx), return NULL ); if (li->next != &FD_SERVERS) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "\n"), return NULL); } } else { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "'%s'(%s,%s) ", fd_cnx_getid(s->conn), IPPROTO_NAME( s->proto ), s->secur ? "Secur" : "NotSecur"), return NULL); } } return *buf; } /* The thread in the pool for handling new clients connecting to a server */ static void * client_worker(void * arg) { struct pool_workers * pw = arg; struct server * s = pw->s; struct cnxctx * c = NULL; int fatal = 0; struct timespec ts; struct fd_cnx_rcvdata rcv_data; struct fd_msg_pmdl * pmdl = NULL; struct msg * msg = NULL; struct msg_hdr *hdr = NULL; struct fd_pei pei; TRACE_ENTRY("%p", arg); /* Set the thread name */ { char buf[48]; snprintf(buf, sizeof(buf), "Worker#%d[%s%s]", pw->id, IPPROTO_NAME(s->proto), s->secur?", Sec" : ""); fd_log_threadname ( buf ); } /* Loop until canceled / error */ next_client: LOG_A("Ready to process next incoming connection"); memset(&rcv_data, 0, sizeof(rcv_data)); /* Get the next connection */ CHECK_FCT_DO( fd_fifo_get( s->pending, &c ), { fatal = 1; goto cleanup; } ); /* Handshake if we are a secure server port, or start clear otherwise */ if (s->secur) { LOG_D("Starting handshake with %s", fd_cnx_getid(c)); int ret = fd_cnx_handshake(c, GNUTLS_SERVER, (s->secur == 1) ? ALGO_HANDSHAKE_DEFAULT : ALGO_HANDSHAKE_3436, NULL, NULL); if (ret != 0) { char buf[1024]; snprintf(buf, sizeof(buf), "TLS handshake failed for connection '%s', connection closed.", fd_cnx_getid(c)); fd_hook_call(HOOK_PEER_CONNECT_FAILED, NULL, NULL, buf, NULL); goto cleanup; } } else { CHECK_FCT_DO( fd_cnx_start_clear(c, 0), goto cleanup ); } /* Set the timeout to receive the first message */ CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &ts), { fatal = 1; goto cleanup; } ); ts.tv_sec += INCNX_TIMEOUT; /* Receive the first Diameter message on the connection -- cleanup in case of timeout */ CHECK_FCT_DO( fd_cnx_receive(c, &ts, &rcv_data.buffer, &rcv_data.length), { char buf[1024]; switch (__ret__) { case ETIMEDOUT: snprintf(buf, sizeof(buf), "Client '%s' did not send CER within %ds, connection aborted.", fd_cnx_getid(c), INCNX_TIMEOUT); fd_hook_call(HOOK_PEER_CONNECT_FAILED, NULL, NULL, buf, NULL); break; case ENOTCONN: snprintf(buf, sizeof(buf), "Connection from '%s' in error before CER was received.", fd_cnx_getid(c)); fd_hook_call(HOOK_PEER_CONNECT_FAILED, NULL, NULL, buf, NULL); break; default: snprintf(buf, sizeof(buf), "Connection from '%s': unspecified error, connection aborted.", fd_cnx_getid(c)); fd_hook_call(HOOK_PEER_CONNECT_FAILED, NULL, NULL, buf, NULL); } goto cleanup; } ); TRACE_DEBUG(FULL, "Received %zdb from new client '%s'", rcv_data.length, fd_cnx_getid(c)); pmdl = fd_msg_pmdl_get_inbuf(rcv_data.buffer, rcv_data.length); /* Try parsing this message */ CHECK_FCT_DO( fd_msg_parse_buffer( &rcv_data.buffer, rcv_data.length, &msg ), { /* Parsing failed */ fd_hook_call(HOOK_MESSAGE_PARSING_ERROR, NULL, NULL, &rcv_data, pmdl ); goto cleanup; } ); /* Log incoming message */ fd_hook_associate(msg, pmdl); fd_hook_call(HOOK_MESSAGE_RECEIVED, msg, NULL, fd_cnx_getid(c), fd_msg_pmdl_get(msg)); /* We expect a CER, it must parse with our dictionary and rules */ CHECK_FCT_DO( fd_msg_parse_rules( msg, fd_g_config->cnf_dict, &pei ), { /* Parsing failed -- trace details */ char buf[1024]; fd_hook_call(HOOK_MESSAGE_PARSING_ERROR, msg, NULL, pei.pei_message ?: pei.pei_errcode, fd_msg_pmdl_get(msg)); snprintf(buf, sizeof(buf), "Error parsing CER from '%s', connection aborted.", fd_cnx_getid(c)); fd_hook_call(HOOK_PEER_CONNECT_FAILED, NULL, NULL, buf, NULL); goto cleanup; } ); /* Now check we received a CER */ CHECK_FCT_DO( fd_msg_hdr ( msg, &hdr ), { fatal = 1; goto cleanup; } ); CHECK_PARAMS_DO( (hdr->msg_appl == 0) && (hdr->msg_flags & CMD_FLAG_REQUEST) && (hdr->msg_code == CC_CAPABILITIES_EXCHANGE), { /* Parsing failed -- trace details */ char buf[1024]; snprintf(buf, sizeof(buf), "Expected CER from '%s', received a different message, connection aborted.", fd_cnx_getid(c)); fd_hook_call(HOOK_PEER_CONNECT_FAILED, msg, NULL, buf, NULL); goto cleanup; } ); /* Finally, pass the information to the peers module which will handle it in a separate thread */ pthread_cleanup_push((void *)fd_cnx_destroy, c); pthread_cleanup_push((void *)fd_msg_free, msg); CHECK_FCT_DO( fd_peer_handle_newCER( &msg, &c ), ); pthread_cleanup_pop(0); pthread_cleanup_pop(0); cleanup: /* Cleanup the parsed message if any */ if (msg) { CHECK_FCT_DO( fd_msg_free(msg), /* continue */); msg = NULL; } /* Close the connection if needed */ if (c != NULL) { fd_cnx_destroy(c); c = NULL; } /* Cleanup the received buffer if any */ free(rcv_data.buffer); if (!fatal) goto next_client; LOG_E("Worker thread exiting."); return NULL; } /* The thread managing a server */ static void * serv_th(void * arg) { struct server *s = (struct server *)arg; CHECK_PARAMS_DO(s, goto error); fd_log_threadname ( fd_cnx_getid(s->conn) ); set_status(s, RUNNING); /* Accept incoming connections */ CHECK_FCT_DO( fd_cnx_serv_listen(s->conn), goto error ); do { struct cnxctx * conn = NULL; /* Wait for a new client or cancel */ CHECK_MALLOC_DO( conn = fd_cnx_serv_accept(s->conn), break ); /* Store this connection in the fifo for processing by the worker pool. Will block when the fifo is full */ pthread_cleanup_push((void *)fd_cnx_destroy, conn); CHECK_FCT_DO( fd_fifo_post( s->pending, &conn ), break ); pthread_cleanup_pop(0); } while (1); error: if (s) set_status(s, TERMINATED); /* Send error signal to the core */ LOG_F( "An error occurred in server module! Thread is terminating..."); CHECK_FCT_DO(fd_core_shutdown(), ); return NULL; } /* Create a new server structure */ static struct server * new_serv( int proto, int secur ) { struct server * new; int i; /* New server structure */ CHECK_MALLOC_DO( new = malloc(sizeof(struct server)), return NULL ); memset(new, 0, sizeof(struct server)); fd_list_init(&new->chain, new); new->proto = proto; new->secur = secur; CHECK_FCT_DO( fd_fifo_new(&new->pending, 5), return NULL); CHECK_MALLOC_DO( new->workers = calloc( fd_g_config->cnf_thr_srv, sizeof(struct pool_workers) ), return NULL ); for (i = 0; i < fd_g_config->cnf_thr_srv; i++) { /* Create the pool */ new->workers[i].s = new; new->workers[i].id = i; CHECK_POSIX_DO( pthread_create( &new->workers[i].worker, NULL, client_worker, &new->workers[i]), return NULL ); } return new; } /* Start all the servers */ int fd_servers_start() { struct server * s; int empty_conf_ep = FD_IS_LIST_EMPTY(&fd_g_config->cnf_endpoints); /* SCTP */ if (!fd_g_config->cnf_flags.no_sctp) { #ifdef DISABLE_SCTP ASSERT(0); #else /* DISABLE_SCTP */ /* Create the server on unsecure port */ if (fd_g_config->cnf_port) { CHECK_MALLOC( s = new_serv(IPPROTO_SCTP, 0) ); CHECK_MALLOC( s->conn = fd_cnx_serv_sctp(fd_g_config->cnf_port, empty_conf_ep ? NULL : &fd_g_config->cnf_endpoints) ); fd_list_insert_before( &FD_SERVERS, &s->chain ); CHECK_POSIX( pthread_create( &s->thr, NULL, serv_th, s ) ); } /* Create the server on secure port */ if (fd_g_config->cnf_port_tls) { CHECK_MALLOC( s = new_serv(IPPROTO_SCTP, 2 /* Change when DTLS is introduced */) ); CHECK_MALLOC( s->conn = fd_cnx_serv_sctp(fd_g_config->cnf_port_tls, empty_conf_ep ? NULL : &fd_g_config->cnf_endpoints) ); fd_list_insert_before( &FD_SERVERS, &s->chain ); CHECK_POSIX( pthread_create( &s->thr, NULL, serv_th, s ) ); } /* Create the other server on 3436 secure port */ /*if (fd_g_config->cnf_port_3436) { CHECK_MALLOC( s = new_serv(IPPROTO_SCTP, 2) ); CHECK_MALLOC( s->conn = fd_cnx_serv_sctp(fd_g_config->cnf_port_3436, empty_conf_ep ? NULL : &fd_g_config->cnf_endpoints) ); fd_list_insert_before( &FD_SERVERS, &s->chain ); CHECK_POSIX( pthread_create( &s->thr, NULL, serv_th, s ) ); }*/ #endif /* DISABLE_SCTP */ } /* TCP */ if (!fd_g_config->cnf_flags.no_tcp) { if (empty_conf_ep) { /* Bind TCP servers on [0.0.0.0] */ if (!fd_g_config->cnf_flags.no_ip4) { if (fd_g_config->cnf_port) { CHECK_MALLOC( s = new_serv(IPPROTO_TCP, 0) ); CHECK_MALLOC( s->conn = fd_cnx_serv_tcp(fd_g_config->cnf_port, AF_INET, NULL) ); fd_list_insert_before( &FD_SERVERS, &s->chain ); CHECK_POSIX( pthread_create( &s->thr, NULL, serv_th, s ) ); } if (fd_g_config->cnf_port_tls) { CHECK_MALLOC( s = new_serv(IPPROTO_TCP, 1) ); CHECK_MALLOC( s->conn = fd_cnx_serv_tcp(fd_g_config->cnf_port_tls, AF_INET, NULL) ); fd_list_insert_before( &FD_SERVERS, &s->chain ); CHECK_POSIX( pthread_create( &s->thr, NULL, serv_th, s ) ); } } /* Bind TCP servers on [::] */ if (!fd_g_config->cnf_flags.no_ip6) { if (fd_g_config->cnf_port) { CHECK_MALLOC( s = new_serv(IPPROTO_TCP, 0) ); CHECK_MALLOC( s->conn = fd_cnx_serv_tcp(fd_g_config->cnf_port, AF_INET6, NULL) ); fd_list_insert_before( &FD_SERVERS, &s->chain ); CHECK_POSIX( pthread_create( &s->thr, NULL, serv_th, s ) ); } if (fd_g_config->cnf_port_tls) { CHECK_MALLOC( s = new_serv(IPPROTO_TCP, 1) ); CHECK_MALLOC( s->conn = fd_cnx_serv_tcp(fd_g_config->cnf_port_tls, AF_INET6, NULL) ); fd_list_insert_before( &FD_SERVERS, &s->chain ); CHECK_POSIX( pthread_create( &s->thr, NULL, serv_th, s ) ); } } } else { /* Create all endpoints -- check flags */ struct fd_list * li; for (li = fd_g_config->cnf_endpoints.next; li != &fd_g_config->cnf_endpoints; li = li->next) { struct fd_endpoint * ep = (struct fd_endpoint *)li; sSA * sa = (sSA *) &ep->ss; if (! (ep->flags & EP_FL_CONF)) continue; if (fd_g_config->cnf_flags.no_ip4 && (sa->sa_family == AF_INET)) continue; if (fd_g_config->cnf_flags.no_ip6 && (sa->sa_family == AF_INET6)) continue; if (fd_g_config->cnf_port) { CHECK_MALLOC( s = new_serv(IPPROTO_TCP, 0) ); CHECK_MALLOC( s->conn = fd_cnx_serv_tcp(fd_g_config->cnf_port, sa->sa_family, ep) ); fd_list_insert_before( &FD_SERVERS, &s->chain ); CHECK_POSIX( pthread_create( &s->thr, NULL, serv_th, s ) ); } if (fd_g_config->cnf_port_tls) { CHECK_MALLOC( s = new_serv(IPPROTO_TCP, 1) ); CHECK_MALLOC( s->conn = fd_cnx_serv_tcp(fd_g_config->cnf_port_tls, sa->sa_family, ep) ); fd_list_insert_before( &FD_SERVERS, &s->chain ); CHECK_POSIX( pthread_create( &s->thr, NULL, serv_th, s ) ); } } } } /* Now, if we had an empty list of local adresses (no address configured), try to read the real addresses from the kernel */ if (empty_conf_ep) { CHECK_FCT(fd_cnx_get_local_eps(&fd_g_config->cnf_endpoints)); if (FD_IS_LIST_EMPTY(&fd_g_config->cnf_endpoints)) { TRACE_DEBUG(INFO, "Unable to find the address(es) of the local system. " "Please use \"ListenOn\" parameter in the configuration. " "This information is required to generate the CER/CEA messages."); return EINVAL; } } { char * buf = NULL; size_t len = 0, offset = 0; CHECK_MALLOC_DO( fd_dump_extend( &buf, &len, &offset , "Local server address(es): "), ); CHECK_MALLOC_DO( fd_ep_dump( &buf, &len, &offset, 0, 0, &fd_g_config->cnf_endpoints ), ); LOG_N("%s", buf ?: "Error dumping addresses"); free(buf); } return 0; } /* Terminate all the servers */ int fd_servers_stop() { TRACE_ENTRY(""); TRACE_DEBUG(INFO, "Shutting down server sockets..."); /* Loop on all servers */ while (!FD_IS_LIST_EMPTY(&FD_SERVERS)) { struct server * s = (struct server *)(FD_SERVERS.next); int i; struct cnxctx * c; /* cancel thread */ CHECK_FCT_DO( fd_thr_term(&s->thr), /* continue */); /* destroy server connection context */ fd_cnx_destroy(s->conn); /* cancel and destroy all worker threads */ for (i = 0; i < fd_g_config->cnf_thr_srv; i++) { /* Destroy worker thread */ CHECK_FCT_DO( fd_thr_term(&s->workers[i].worker), /* continue */); } free(s->workers); /* Close any pending connection */ while ( fd_fifo_tryget( s->pending, &c ) == 0 ) { fd_cnx_destroy(c); } CHECK_FCT_DO( fd_fifo_del(&s->pending), ); /* Now destroy the server object */ fd_list_unlink(&s->chain); free(s); } /* We're done! */ return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/tcp.c000066400000000000000000000124041333553357400217370ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdcore-internal.h" #include "cnxctx.h" #include #include #include /* Set the socket options for TCP sockets, before bind is called */ static int fd_tcp_setsockopt(int family, int sk) { int ret = 0; int opt; /* Clear the NODELAY option in case it was set, as requested by rfc3539#section-3.2 */ /* Note that this is supposed to be the default, so we could probably remove this call ... */ opt = 0; ret = setsockopt(sk, IPPROTO_TCP, TCP_NODELAY, &opt, sizeof(opt)); if (ret != 0) { ret = errno; TRACE_DEBUG(INFO, "Unable to set the socket TCP_NODELAY option: %s", strerror(ret)); return ret; } /* Under Linux, we may also set the TCP_CONGESTION option to one of the following strings: - reno (default) - bic - cubic - highspeed - htcp - hybla - illinois - lp - scalable - vegas - veno - westwood - yeah */ /* In case of v6 address, force the v6only option, we use a different socket for v4 */ #ifdef IPV6_V6ONLY if (family == AF_INET6) { opt = 1; CHECK_SYS(setsockopt(sk, IPPROTO_IPV6, IPV6_V6ONLY, &opt, sizeof(opt))); } #endif /* IPV6_V6ONLY */ { opt = 1; CHECK_SYS( setsockopt(sk, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) ); } /* There are also others sockopt that can be set, but nothing useful for us AFAICT */ return 0; } /* Create a socket server and bind it */ int fd_tcp_create_bind_server( int * sock, sSA * sa, socklen_t salen ) { TRACE_ENTRY("%p %p %d", sock, sa, salen); CHECK_PARAMS( sock && sa ); /* Create the socket */ CHECK_SYS( *sock = socket(sa->sa_family, SOCK_STREAM, IPPROTO_TCP) ); /* Set the socket options */ CHECK_FCT( fd_tcp_setsockopt(sa->sa_family, *sock) ); /* Bind the socket */ CHECK_SYS( bind( *sock, sa, salen ) ); /* We're done */ return 0; } /* Allow clients connections on server sockets */ int fd_tcp_listen( int sock ) { TRACE_ENTRY("%d", sock); CHECK_SYS( listen(sock, 5) ); return 0; } /* Create a client socket and connect to remote server */ int fd_tcp_client( int *sock, sSA * sa, socklen_t salen ) { int ret = 0; int s; TRACE_ENTRY("%p %p %d", sock, sa, salen); CHECK_PARAMS( sock && (*sock <= 0) && sa && salen ); /* Create the socket */ CHECK_SYS( s = socket(sa->sa_family, SOCK_STREAM, IPPROTO_TCP) ); /* Set the socket options */ CHECK_FCT( fd_tcp_setsockopt(sa->sa_family, s) ); /* Cleanup if we are cancelled */ pthread_cleanup_push(fd_cleanup_socket, &s); /* Try connecting to the remote address */ ret = connect(s, sa, salen); pthread_cleanup_pop(0); if (ret < 0) { ret = errno; LOG_A( "connect returned an error: %s", strerror(ret)); CHECK_SYS_DO( close(s), /* continue */ ); *sock = -1; return ret; } /* Done! */ *sock = s; return ret; } /* Get the remote name of a TCP socket */ int fd_tcp_get_remote_ep(int sock, sSS * ss, socklen_t *sl) { TRACE_ENTRY("%d %p %p", sock, ss, sl); CHECK_PARAMS( ss && sl ); *sl = sizeof(sSS); CHECK_SYS(getpeername(sock, (sSA *)ss, sl)); return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdcore/version.c000066400000000000000000000053141333553357400226400ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include #include #ifdef FD_PROJECT_VERSION_HG # define FD_LIBFDCORE_VERSION \ _stringize(FD_PROJECT_VERSION_MAJOR) "." _stringize(FD_PROJECT_VERSION_MINOR) "." _stringize(FD_PROJECT_VERSION_REV) "-" FD_PROJECT_VERSION_HG_VAL #else # define FD_LIBFDCORE_VERSION \ _stringize(FD_PROJECT_VERSION_MAJOR) "." _stringize(FD_PROJECT_VERSION_MINOR) "." _stringize(FD_PROJECT_VERSION_REV) #endif const char fd_core_version[] = FD_LIBFDCORE_VERSION; nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdproto/000077500000000000000000000000001333553357400212175ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdproto/CMakeLists.txt000066400000000000000000000023421333553357400237600ustar00rootroot00000000000000# Name of the subproject Project("libfdproto" C) # Configuration for newer cmake cmake_policy(VERSION 2.6) if (POLICY CMP0022) cmake_policy(SET CMP0022 OLD) endif (POLICY CMP0022) # List of source files for the library SET(LFDPROTO_SRC fdproto-internal.h dictionary.c dictionary_functions.c dispatch.c fifo.c init.c lists.c log.c messages.c ostr.c portability.c rt_data.c sessions.c utils.c version.c ) # Save the list of files for testcases in the core's directory SET(LFDPROTO_SRC ${LFDPROTO_SRC} PARENT_SCOPE) # Include path INCLUDE_DIRECTORIES(${LFDPROTO_INCLUDES}) # Build as a shared library ADD_LIBRARY(libfdproto SHARED ${LFDPROTO_SRC}) ADD_DEPENDENCIES(libfdproto version_information) # Avoid the liblib name, and set the version SET_TARGET_PROPERTIES(libfdproto PROPERTIES OUTPUT_NAME "fdproto" SOVERSION ${FD_PROJECT_VERSION_API} VERSION ${FD_PROJECT_VERSION_MAJOR}.${FD_PROJECT_VERSION_MINOR}.${FD_PROJECT_VERSION_REV} LINK_INTERFACE_LIBRARIES "${LFDPROTO_LINK_INTERFACES}") # The library itself needs other libraries TARGET_LINK_LIBRARIES(libfdproto ${LFDPROTO_LIBS}) #### ## INSTALL section ## INSTALL(TARGETS libfdproto LIBRARY DESTINATION ${INSTALL_LIBRARY_SUFFIX} COMPONENT freeDiameter-common) nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdproto/Makefile.am000066400000000000000000000007221333553357400232540ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in pkglib_LTLIBRARIES = libfdproto.la libfdproto_la_SOURCES = \ fdproto-internal.h \ dictionary.c dictionary_functions.c dispatch.c fifo.c init.c \ lists.c log.c messages.c ostr.c portability.c rt_data.c \ sessions.c utils.c version.c AM_LDFLAGS = \ -version-info @LIBVERSION@ AM_CPPFLAGS = \ -I$(top_srcdir)/include AM_CFLAGS = MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdproto/dictionary.c000066400000000000000000002405131333553357400235350ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2015, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdproto-internal.h" #include /* Names of the base types */ const char * type_base_name[] = { /* must keep in sync with dict_avp_basetype */ "GROUPED", /* AVP_TYPE_GROUPED */ "OCTETSTRING", /* AVP_TYPE_OCTETSTRING */ "INTEGER32", /* AVP_TYPE_INTEGER32 */ "INTEGER64", /* AVP_TYPE_INTEGER64 */ "UNSIGNED32", /* AVP_TYPE_UNSIGNED32 */ "UNSIGNED64", /* AVP_TYPE_UNSIGNED64 */ "FLOAT32", /* AVP_TYPE_FLOAT32 */ "FLOAT64" /* AVP_TYPE_FLOAT64 */ }; /* The number of lists in an object */ #define NB_LISTS_PER_OBJ 3 /* Some eye catchers definitions */ #define OBJECT_EYECATCHER (0x0b13c7) #define DICT_EYECATCHER (0x00d1c7) /* Definition of the dictionary objects */ struct dict_object { enum dict_object_type type; /* What type of object is this? */ int objeyec;/* eyecatcher for this object */ int typeyec;/* eyecatcher for this type of object */ struct dictionary *dico; /* The dictionary this object belongs to */ union { struct dict_vendor_data vendor; /* datastr_len = strlen(vendor_name) */ struct dict_application_data application; /* datastr_len = strlen(application_name) */ struct dict_type_data type; /* datastr_len = strlen(type_name) */ struct dict_enumval_data enumval; /* datastr_len = strlen(enum_name) */ struct dict_avp_data avp; /* datastr_len = strlen(avp_name) */ struct dict_cmd_data cmd; /* datastr_len = strlen(cmd_name) */ struct dict_rule_data rule; /* datastr_len = 0 */ } data; /* The data of this object */ size_t datastr_len; /* cached length of the string inside the data. Saved when the object is created. */ struct dict_object * parent; /* The parent of this object, if any */ struct fd_list list[NB_LISTS_PER_OBJ];/* used to chain objects.*/ /* More information about the lists : - the use for each list depends on the type of object. See detail below. - a sentinel for a list has its 'o' field cleared. (this is the criteria to detect end of a loop) - The lists are always ordered. The criteria are described below. the functions to order them are referenced in dict_obj_info - The dict_lock must be held for any list operation. => VENDORS: list[0]: list of the vendors, ordered by their id. The sentinel is g_dict_vendors (vendor with id 0) list[1]: sentinel for the list of AVPs from this vendor, ordered by AVP code. list[2]: sentinel for the list of AVPs from this vendor, ordered by AVP name (fd_os_cmp). => APPLICATIONS: list[0]: list of the applications, ordered by their id. The sentinel is g_dict_applications (application with id 0) list[1]: not used list[2]: not used. => TYPES: list[0]: list of the types, ordered by their names. The sentinel is g_list_types. list[1]: sentinel for the type_enum list of this type, ordered by their constant name (fd_os_cmp). list[2]: sentinel for the type_enum list of this type, ordered by their constant value. => TYPE_ENUMS: list[0]: list of the contants for a given type, ordered by the constant name (fd_os_cmp). Sentinel is a (list[1]) element of a TYPE object. list[1]: list of the contants for a given type, ordered by the constant value. Sentinel is a (list[2]) element of a TYPE object. list[2]: not used => AVPS: list[0]: list of the AVP from a given vendor, ordered by avp code. Sentinel is a list[1] element of a VENDOR object. list[1]: list of the AVP from a given vendor, ordered by avp name (fd_os_cmp). Sentinel is a list[2] element of a VENDOR object. list[2]: sentinel for the rule list that apply to this AVP. => COMMANDS: list[0]: list of the commands, ordered by their names (fd_os_cmp). The sentinel is g_list_cmd_name. list[1]: list of the commands, ordered by their command code and 'R' flag. The sentinel is g_list_cmd_code. list[2]: sentinel for the rule list that apply to this command. => RULES: list[0]: list of the rules for a given (grouped) AVP or Command, ordered by the AVP vendor & code to which they refer. sentinel is list[2] of a command or (grouped) avp. list[1]: not used list[2]: not used. */ /* Sentinel for the dispatch callbacks */ struct fd_list disp_cbs; }; /* Definition of the dictionary structure */ struct dictionary { int dict_eyec; /* Eye-catcher for the dictionary (DICT_EYECATCHER) */ pthread_rwlock_t dict_lock; /* The global rwlock for the dictionary */ struct dict_object dict_vendors; /* Sentinel for the list of vendors, corresponding to vendor 0 */ struct dict_object dict_applications; /* Sentinel for the list of applications, corresponding to app 0 */ struct fd_list dict_types; /* Sentinel for the list of types */ struct fd_list dict_cmd_name; /* Sentinel for the list of commands, ordered by names */ struct fd_list dict_cmd_code; /* Sentinel for the list of commands, ordered by codes */ struct dict_object dict_cmd_error; /* Special command object for answers with the 'E' bit set */ int dict_count[DICT_TYPE_MAX + 1]; /* Number of objects of each type */ }; /* Forward declarations of dump functions */ static DECLARE_FD_DUMP_PROTOTYPE(dump_vendor_data, void * data ); static DECLARE_FD_DUMP_PROTOTYPE(dump_application_data, void * data ); static DECLARE_FD_DUMP_PROTOTYPE(dump_type_data, void * data ); /* the dump function for enum has a different prototype since it need the datatype */ static DECLARE_FD_DUMP_PROTOTYPE(dump_avp_data, void * data ); static DECLARE_FD_DUMP_PROTOTYPE(dump_command_data, void * data ); static DECLARE_FD_DUMP_PROTOTYPE(dump_rule_data, void * data ); /* Forward declarations of search functions */ static int search_vendor ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result ); static int search_application ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result ); static int search_type ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result ); static int search_enumval ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result ); static int search_avp ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result ); static int search_cmd ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result ); static int search_rule ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result ); /* The following array contains lot of data about the different types of objects, for automated handling */ static struct { enum dict_object_type type; /* information for this type */ char * name; /* string describing this object, for debug */ size_t datasize; /* The size of the data structure */ int parent; /* 0: never; 1: may; 2: must */ enum dict_object_type parenttype; /* The type of the parent, when relevant */ int eyecatcher; /* A kind of signature for this object */ DECLARE_FD_DUMP_PROTOTYPE( (*dump_data), void * data ); /* The function to dump the data section */ int (*search_fct)(struct dictionary * dict, int criteria, const void * what, struct dict_object **result );; /* The function to search an object of this type */ int haslist[NB_LISTS_PER_OBJ]; /* Tell if this list is used */ } dict_obj_info[] = { { 0, "(error)", 0, 0, 0, 0, NULL, NULL, {0, 0, 0} } /* type name datasize parent parenttype eyecatcher dump_data search_fct, haslist[] */ ,{ DICT_VENDOR, "VENDOR", sizeof(struct dict_vendor_data), 0, 0, OBJECT_EYECATCHER + 1, dump_vendor_data, search_vendor, { 1, 0, 0 } } ,{ DICT_APPLICATION, "APPLICATION", sizeof(struct dict_application_data), 1, DICT_VENDOR, OBJECT_EYECATCHER + 2, dump_application_data, search_application, { 1, 0, 0 } } ,{ DICT_TYPE, "TYPE", sizeof(struct dict_type_data), 1, DICT_APPLICATION, OBJECT_EYECATCHER + 3, dump_type_data, search_type, { 1, 0, 0 } } ,{ DICT_ENUMVAL, "ENUMVAL", sizeof(struct dict_enumval_data), 2, DICT_TYPE, OBJECT_EYECATCHER + 4, NULL, search_enumval, { 1, 1, 0 } } ,{ DICT_AVP, "AVP", sizeof(struct dict_avp_data), 1, DICT_TYPE, OBJECT_EYECATCHER + 5, dump_avp_data, search_avp, { 1, 1, 0 } } ,{ DICT_COMMAND, "COMMAND", sizeof(struct dict_cmd_data), 1, DICT_APPLICATION, OBJECT_EYECATCHER + 6, dump_command_data, search_cmd, { 1, 1, 0 } } ,{ DICT_RULE, "RULE", sizeof(struct dict_rule_data), 2, -1 /* special case: grouped avp or command */, OBJECT_EYECATCHER + 7, dump_rule_data, search_rule, { 1, 0, 0 } } }; /* Macro to verify a "type" value */ #define CHECK_TYPE( type ) ( ((type) > 0) && ((type) <= DICT_TYPE_MAX) ) /* Cast macro */ #define _O( object ) ((struct dict_object *) (object)) /* Get information line for a given object */ #define _OBINFO(object) (dict_obj_info[CHECK_TYPE(_O(object)->type) ? _O(object)->type : 0]) /*******************************************************************************************************/ /*******************************************************************************************************/ /* */ /* Objects management */ /* */ /*******************************************************************************************************/ /*******************************************************************************************************/ /* Functions to manage the objects creation and destruction. */ /* Duplicate a string inplace, save its length */ #define DUP_string_len( str, plen ) { \ *(plen) = strlen((str)); \ str = os0dup( str, *(plen)); \ } /* Initialize an object */ static void init_object( struct dict_object * obj, enum dict_object_type type ) { int i; TRACE_ENTRY("%p %d", obj, type); /* Clean the object first */ memset ( obj, 0, sizeof(struct dict_object)); CHECK_PARAMS_DO( CHECK_TYPE(type), return ); obj->type = type; obj->objeyec = OBJECT_EYECATCHER; obj->typeyec = _OBINFO(obj).eyecatcher; /* We don't initialize the data nor the parent here */ /* Now init the lists */ for (i=0; ilist[i], obj); else fd_list_init(&obj->list[i], NULL); } fd_list_init(&obj->disp_cbs, NULL); } /* Initialize the "data" part of an object */ static int init_object_data(struct dict_object * dest, void * source, enum dict_object_type type) { TRACE_ENTRY("%p %p %d", dest, source, type); CHECK_PARAMS( dest && source && CHECK_TYPE(type) ); /* Generic: copy the full data structure */ memcpy( &dest->data, source, dict_obj_info[type].datasize ); /* Then strings must be duplicated, not copied */ /* This function might be simplified by always defining the "name" field as the first field of the structures, but... it's error-prone */ switch (type) { case DICT_VENDOR: DUP_string_len( dest->data.vendor.vendor_name, &dest->datastr_len ); break; case DICT_APPLICATION: DUP_string_len( dest->data.application.application_name, &dest->datastr_len ); break; case DICT_TYPE: DUP_string_len( dest->data.type.type_name, &dest->datastr_len ); break; case DICT_ENUMVAL: DUP_string_len( dest->data.enumval.enum_name, &dest->datastr_len ); break; case DICT_AVP: DUP_string_len( dest->data.avp.avp_name, &dest->datastr_len ); break; case DICT_COMMAND: DUP_string_len( dest->data.cmd.cmd_name, &dest->datastr_len ); break; default: /* Nothing to do for RULES */ ; } return 0; } /* Check that an object is valid (1: OK, 0: error) */ static int verify_object( struct dict_object * obj ) { TRACE_ENTRY("%p", obj); CHECK_PARAMS_DO( obj && (obj->objeyec == OBJECT_EYECATCHER) && CHECK_TYPE(obj->type) && (obj->typeyec == dict_obj_info[obj->type].eyecatcher), { if (obj) { TRACE_DEBUG(FULL, "Invalid object: %p, obj->objeyec: %x/%x, obj->type: %d, obj->objeyec: %x/%x, obj->typeyec: %x/%x", obj, obj->objeyec, OBJECT_EYECATCHER, obj->type, obj->objeyec, OBJECT_EYECATCHER, obj->typeyec, _OBINFO(obj).eyecatcher); } else { TRACE_DEBUG(FULL, "Invalid object : NULL pointer"); } return 0; } ); /* The object is probably valid. */ return 1; } /* Free the data associated to an object */ static void destroy_object_data(struct dict_object * obj) { /* TRACE_ENTRY("%p", obj); */ switch (obj->type) { case DICT_VENDOR: free( obj->data.vendor.vendor_name ); break; case DICT_APPLICATION: free( obj->data.application.application_name ); break; case DICT_TYPE: free( obj->data.type.type_name ); break; case DICT_ENUMVAL: free( obj->data.enumval.enum_name ); break; case DICT_AVP: free( obj->data.avp.avp_name ); break; case DICT_COMMAND: free( obj->data.cmd.cmd_name ); break; default: /* nothing to do */ ; } } /* Forward declaration */ static void destroy_object(struct dict_object * obj); /* Destroy all objects in a list - the lock must be held */ static void destroy_list(struct fd_list * head) { /* TRACE_ENTRY("%p", head); */ /* loop in the list */ while (!FD_IS_LIST_EMPTY(head)) { /* When destroying the object, it is unlinked from the list */ destroy_object(_O(head->next->o)); } } /* Free an object and its sublists */ static void destroy_object(struct dict_object * obj) { int i; /* TRACE_ENTRY("%p", obj); */ /* Update global count */ if (obj->dico) obj->dico->dict_count[obj->type]--; /* Mark the object as invalid */ obj->objeyec = 0xdead; /* First, destroy the data associated to the object */ destroy_object_data(obj); for (i=0; ilist[i] ); else /* This is either a sentinel or unused (=emtpy) list, let's destroy it */ destroy_list( &obj->list[i] ); } /* Unlink all elements from the dispatch list; they will be freed when callback is unregistered */ CHECK_POSIX_DO( pthread_rwlock_wrlock(&fd_disp_lock), /* continue */ ); while (!FD_IS_LIST_EMPTY(&obj->disp_cbs)) { fd_list_unlink( obj->disp_cbs.next ); } CHECK_POSIX_DO( pthread_rwlock_unlock(&fd_disp_lock), /* continue */ ); /* Last, destroy the object */ free(obj); } /*******************************************************************************************************/ /*******************************************************************************************************/ /* */ /* Compare functions */ /* */ /*******************************************************************************************************/ /*******************************************************************************************************/ /* Compare two values */ #define ORDER_scalar( i1, i2 ) \ ((i1 < i2 ) ? -1 : ( i1 > i2 ? 1 : 0 )) /* Compare two vendor objects by their id (checks already performed) */ static int order_vendor_by_id ( struct dict_object *o1, struct dict_object *o2 ) { TRACE_ENTRY("%p %p", o1, o2); return ORDER_scalar( o1->data.vendor.vendor_id, o2->data.vendor.vendor_id ); } /* Compare two application objects by their id (checks already performed) */ static int order_appli_by_id ( struct dict_object *o1, struct dict_object *o2 ) { TRACE_ENTRY("%p %p", o1, o2); return ORDER_scalar( o1->data.application.application_id, o2->data.application.application_id ); } /* Compare two type objects by their name (checks already performed) */ static int order_type_by_name ( struct dict_object *o1, struct dict_object *o2 ) { TRACE_ENTRY("%p %p", o1, o2); return fd_os_cmp( o1->data.type.type_name, o1->datastr_len, o2->data.type.type_name, o2->datastr_len ); } /* Compare two type_enum objects by their names (checks already performed) */ static int order_enum_by_name ( struct dict_object *o1, struct dict_object *o2 ) { TRACE_ENTRY("%p %p", o1, o2); return fd_os_cmp( o1->data.enumval.enum_name, o1->datastr_len, o2->data.enumval.enum_name, o2->datastr_len ); } /* Compare two type_enum objects by their values (checks already performed) */ static int order_enum_by_val ( struct dict_object *o1, struct dict_object *o2 ) { TRACE_ENTRY("%p %p", o1, o2); /* The comparison function depends on the type of data */ switch ( o1->parent->data.type.type_base ) { case AVP_TYPE_OCTETSTRING: return fd_os_cmp( o1->data.enumval.enum_value.os.data, o1->data.enumval.enum_value.os.len, o2->data.enumval.enum_value.os.data, o2->data.enumval.enum_value.os.len); case AVP_TYPE_INTEGER32: return ORDER_scalar( o1->data.enumval.enum_value.i32, o2->data.enumval.enum_value.i32 ); case AVP_TYPE_INTEGER64: return ORDER_scalar( o1->data.enumval.enum_value.i64, o2->data.enumval.enum_value.i64 ); case AVP_TYPE_UNSIGNED32: return ORDER_scalar( o1->data.enumval.enum_value.u32, o2->data.enumval.enum_value.u32 ); case AVP_TYPE_UNSIGNED64: return ORDER_scalar( o1->data.enumval.enum_value.u64, o2->data.enumval.enum_value.u64 ); case AVP_TYPE_FLOAT32: return ORDER_scalar( o1->data.enumval.enum_value.f32, o2->data.enumval.enum_value.f32 ); case AVP_TYPE_FLOAT64: return ORDER_scalar( o1->data.enumval.enum_value.f64, o2->data.enumval.enum_value.f64 ); case AVP_TYPE_GROUPED: default: ASSERT(0); } return 0; } /* Compare two avp objects by their codes (checks already performed) */ static int order_avp_by_code ( struct dict_object *o1, struct dict_object *o2 ) { TRACE_ENTRY("%p %p", o1, o2); return ORDER_scalar( o1->data.avp.avp_code, o2->data.avp.avp_code ); } /* Compare two avp objects by their names (checks already performed) */ static int order_avp_by_name ( struct dict_object *o1, struct dict_object *o2 ) { TRACE_ENTRY("%p %p", o1, o2); return fd_os_cmp( o1->data.avp.avp_name, o1->datastr_len, o2->data.avp.avp_name, o2->datastr_len ); } /* Compare two command objects by their names (checks already performed) */ static int order_cmd_by_name ( struct dict_object *o1, struct dict_object *o2 ) { TRACE_ENTRY("%p %p", o1, o2); return fd_os_cmp( o1->data.cmd.cmd_name, o1->datastr_len, o2->data.cmd.cmd_name, o2->datastr_len ); } /* Compare two command objects by their codes and flags (request or answer) (checks already performed) */ static int order_cmd_by_codefl( struct dict_object *o1, struct dict_object *o2 ) { uint8_t fl1, fl2; int cmp = 0; TRACE_ENTRY("%p %p", o1, o2); cmp = ORDER_scalar( o1->data.cmd.cmd_code, o2->data.cmd.cmd_code ); if (cmp) return cmp; /* Same command code, we must compare the value of the 'R' flag */ fl1 = o1->data.cmd.cmd_flag_val & CMD_FLAG_REQUEST; fl2 = o2->data.cmd.cmd_flag_val & CMD_FLAG_REQUEST; /* We want requests first, so we reverse the operators here */ return ORDER_scalar(fl2, fl1); } /* Compare two rule object by the AVP vendor & code that they refer (checks already performed) */ static int order_rule_by_avpvc ( struct dict_object *o1, struct dict_object *o2 ) { TRACE_ENTRY("%p %p", o1, o2); return ORDER_scalar(o1->data.rule.rule_avp->data.avp.avp_vendor, o2->data.rule.rule_avp->data.avp.avp_vendor) ?: ORDER_scalar(o1->data.rule.rule_avp->data.avp.avp_code, o2->data.rule.rule_avp->data.avp.avp_code) ; } /*******************************************************************************************************/ /*******************************************************************************************************/ /* */ /* Search functions */ /* */ /*******************************************************************************************************/ /*******************************************************************************************************/ /* Functions used to search for objects in the lists, according to some criteria */ /* On a general note, if result is not NULL, ENOENT is not returned but *result is NULL. */ /* The following macros assume that "what", "ret", "result" (variables), and "end" (label) exist in the local context where they are called. They are meant to be called only from the functions that follow. */ /* For searchs of type "xxx_OF_xxx": children's parent or default parent */ #define SEARCH_childs_parent( type_of_child, default_parent ) { \ struct dict_object *__child = (struct dict_object *) what; \ CHECK_PARAMS_DO( verify_object(__child) && \ (__child->type == (type_of_child)), \ { ret = EINVAL; goto end; } ); \ ret = 0; \ if (result) \ *result = (__child->parent ? __child->parent :(default_parent));\ } /* For search of strings in lists. isindex= 1 if the string is the ordering key of the list */ /* it is expected that object->datastr_len is the length of the datafield parameter */ #define SEARCH_os0_l( str, len, sentinel, datafield, isindex ) { \ char * __str = (char *) (str); \ size_t __strlen = (size_t)(len); \ int __cmp; \ struct fd_list * __li; \ ret = 0; \ for (__li = (sentinel)->next; __li != (sentinel); __li = __li->next) { \ __cmp = fd_os_cmp(__str, __strlen, \ _O(__li->o)->data. datafield, _O(__li->o)->datastr_len);\ if (__cmp == 0) { \ if (result) \ *result = _O(__li->o); \ goto end; \ } \ if ((isindex) && (__cmp < 0)) \ break; \ } \ if (result) \ *result = NULL; \ else \ ret = ENOENT; \ } /* When len is not provided */ #define SEARCH_os0( str, sentinel, datafield, isindex ) { \ char * _str = (char *) (str); \ size_t _strlen = strlen(_str); \ SEARCH_os0_l( _str, _strlen, sentinel, datafield, isindex ); \ } /* For search of octetstrings in lists. */ #define SEARCH_os( str, strlen, sentinel, osdatafield, isindex ) { \ uint8_t * __str = (uint8_t *) (str); \ size_t __strlen = (size_t)(strlen); \ int __cmp; \ struct fd_list * __li; \ ret = 0; \ for (__li = (sentinel)->next; __li != (sentinel); __li = __li->next) { \ __cmp = fd_os_cmp(__str, __strlen, \ _O(__li->o)->data. osdatafield .data, \ _O(__li->o)->data. osdatafield .len); \ if (__cmp == 0) { \ if (result) \ *result = _O(__li->o); \ goto end; \ } \ if ((isindex) && (__cmp < 0)) \ break; \ } \ if (result) \ *result = NULL; \ else \ ret = ENOENT; \ } /* For search of AVP name in rule lists -- the list is not ordered by AVP names! */ #define SEARCH_ruleavpname( str, strlen, sentinel ) { \ char * __str = (char *) (str); \ size_t __strlen = (size_t) (strlen); \ int __cmp; \ struct fd_list * __li; \ ret = 0; \ for (__li = (sentinel)->next; __li != (sentinel); __li = __li->next) { \ __cmp = fd_os_cmp(__str, __strlen, \ _O(__li->o)->data.rule.rule_avp->data.avp.avp_name, \ _O(__li->o)->data.rule.rule_avp->datastr_len); \ if (__cmp == 0) { \ if (result) \ *result = _O(__li->o); \ goto end; \ } \ } \ if (result) \ *result = NULL; \ else \ ret = ENOENT; \ } /* For search of scalars in lists. isindex= 1 if the value is the ordering key of the list */ #define SEARCH_scalar( value, sentinel, datafield, isindex, defaultobj ) { \ int __cmp; \ struct fd_list * __li; \ ret = 0; \ if ( ((defaultobj) != NULL) \ && (_O(defaultobj)->data. datafield == value)) { \ if (result) \ *result = _O(defaultobj); \ goto end; \ } \ for (__li = (sentinel)->next; __li != (sentinel); __li = __li->next) { \ __cmp= ORDER_scalar(value, _O(__li->o)->data. datafield ); \ if (__cmp == 0) { \ if (result) \ *result = _O(__li->o); \ goto end; \ } \ if ((isindex) && (__cmp < 0)) \ break; \ } \ if (result) \ *result = NULL; \ else \ ret = ENOENT; \ } /* For search of commands in lists by code and flag. R_flag_val = 0 or CMD_FLAG_REQUEST */ #define SEARCH_codefl( value, R_flag_val, sentinel) { \ int __cmp; \ struct fd_list * __li; \ ret = 0; \ for (__li = (sentinel)->next; __li != (sentinel); __li = __li->next) { \ __cmp = ORDER_scalar(value, \ _O(__li->o)->data.cmd.cmd_code ); \ if (__cmp == 0) { \ uint8_t __mask, __val; \ __mask = _O(__li->o)->data.cmd.cmd_flag_mask; \ __val = _O(__li->o)->data.cmd.cmd_flag_val; \ if ( ! (__mask & CMD_FLAG_REQUEST) ) \ continue; \ if ( ( __val & CMD_FLAG_REQUEST ) != R_flag_val ) \ continue; \ if (result) \ *result = _O(__li->o); \ goto end; \ } \ if (__cmp < 0) \ break; \ } \ if (result) \ *result = NULL; \ else \ ret = ENOENT; \ } /* For searchs of type "xxx_OF_xxx": if the search object is sentinel list for the "what" object */ #define SEARCH_sentinel( type_of_what, what_list_nr, sentinel_list_nr ) { \ struct dict_object *__what = (struct dict_object *) what; \ CHECK_PARAMS_DO( verify_object(__what) && \ (__what->type == (type_of_what)), \ { ret = EINVAL; goto end; } ); \ ret = 0; \ if (result) { \ /* this is similar to the "container_of" */ \ *result = (struct dict_object *)((char *)(__what->list[what_list_nr].head) - \ (size_t)&(((struct dict_object *)0)->list[sentinel_list_nr])); \ } \ } static int search_vendor ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result ) { int ret = 0; vendor_id_t id; TRACE_ENTRY("%p %d %p %p", dict, criteria, what, result); switch (criteria) { case VENDOR_BY_ID: id = *(vendor_id_t *) what; SEARCH_scalar( id, &dict->dict_vendors.list[0], vendor.vendor_id, 1, &dict->dict_vendors ); break; case VENDOR_BY_NAME: /* "what" is a vendor name */ SEARCH_os0( what, &dict->dict_vendors.list[0], vendor.vendor_name, 0); break; case VENDOR_OF_APPLICATION: /* "what" should be an application object */ SEARCH_childs_parent( DICT_APPLICATION, &dict->dict_vendors ); break; case VENDOR_OF_AVP: /* "what" should be an avp object */ SEARCH_sentinel( DICT_AVP, 0, 1 ); break; default: /* Invalid criteria */ CHECK_PARAMS( criteria = 0 ); } end: return ret; } static int search_application ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result ) { int ret = 0; application_id_t id; TRACE_ENTRY("%p %d %p %p", dict, criteria, what, result); switch (criteria) { case APPLICATION_BY_ID: id = *(application_id_t *) what; SEARCH_scalar( id, &dict->dict_applications.list[0], application.application_id, 1, &dict->dict_applications ); break; case APPLICATION_BY_NAME: /* "what" is an application name */ SEARCH_os0( what, &dict->dict_applications.list[0], application.application_name, 0); break; case APPLICATION_OF_TYPE: /* "what" should be a type object */ SEARCH_childs_parent( DICT_TYPE, &dict->dict_applications ); break; case APPLICATION_OF_COMMAND: /* "what" should be a command object */ SEARCH_childs_parent( DICT_COMMAND, &dict->dict_applications ); break; default: /* Invalid criteria */ CHECK_PARAMS( criteria = 0 ); } end: return ret; } static int search_type ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result ) { int ret = 0; TRACE_ENTRY("%p %d %p %p", dict, criteria, what, result); switch (criteria) { case TYPE_BY_NAME: /* "what" is a type name */ SEARCH_os0( what, &dict->dict_types, type.type_name, 1); break; case TYPE_OF_ENUMVAL: /* "what" should be a type_enum object */ SEARCH_childs_parent( DICT_ENUMVAL, NULL ); break; case TYPE_OF_AVP: /* "what" should be an avp object */ SEARCH_childs_parent( DICT_AVP, NULL ); break; default: /* Invalid criteria */ CHECK_PARAMS( criteria = 0 ); } end: return ret; } static int search_enumval ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result ) { int ret = 0; TRACE_ENTRY("%p %d %p %p", dict, criteria, what, result); switch (criteria) { case ENUMVAL_BY_STRUCT: { struct dict_object * parent = NULL; struct dict_enumval_request * _what = (struct dict_enumval_request *) what; CHECK_PARAMS( _what && ( _what->type_obj || _what->type_name ) ); if (_what->type_obj != NULL) { parent = _what->type_obj; CHECK_PARAMS( verify_object(parent) && (parent->type == DICT_TYPE) ); } else { /* We received only the type name, we must find it first */ CHECK_FCT_DO( search_type( dict, TYPE_BY_NAME, _what->type_name, &parent ), CHECK_PARAMS( 0 ) ); } /* From here the "parent" object is valid */ if ( _what->search.enum_name != NULL ) { /* We are looking for this string */ SEARCH_os0( _what->search.enum_name, &parent->list[1], enumval.enum_name, 1 ); } else { /* We are looking for the value in enum_value */ switch (parent->data.type.type_base) { case AVP_TYPE_OCTETSTRING: SEARCH_os( _what->search.enum_value.os.data, _what->search.enum_value.os.len, &parent->list[2], enumval.enum_value.os , 1 ); break; case AVP_TYPE_INTEGER32: SEARCH_scalar( _what->search.enum_value.i32, &parent->list[2], enumval.enum_value.i32, 1, (struct dict_object *)NULL); break; case AVP_TYPE_INTEGER64: SEARCH_scalar( _what->search.enum_value.i64, &parent->list[2], enumval.enum_value.i64, 1, (struct dict_object *)NULL); break; case AVP_TYPE_UNSIGNED32: SEARCH_scalar( _what->search.enum_value.u32, &parent->list[2], enumval.enum_value.u32, 1, (struct dict_object *)NULL); break; case AVP_TYPE_UNSIGNED64: SEARCH_scalar( _what->search.enum_value.u64, &parent->list[2], enumval.enum_value.u64, 1, (struct dict_object *)NULL); break; case AVP_TYPE_FLOAT32: SEARCH_scalar( _what->search.enum_value.f32, &parent->list[2], enumval.enum_value.f32, 1, (struct dict_object *)NULL); break; case AVP_TYPE_FLOAT64: SEARCH_scalar( _what->search.enum_value.f64, &parent->list[2], enumval.enum_value.f64, 1, (struct dict_object *)NULL); break; default: /* Invalid parent type basetype */ CHECK_PARAMS( parent = NULL ); } } } break; default: /* Invalid criteria */ CHECK_PARAMS( criteria = 0 ); } end: return ret; } static int search_avp ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result ) { int ret = 0; TRACE_ENTRY("%p %d %p %p", dict, criteria, what, result); switch (criteria) { case AVP_BY_CODE: { avp_code_t code; code = *(avp_code_t *) what; SEARCH_scalar( code, &dict->dict_vendors.list[1], avp.avp_code, 1, (struct dict_object *)NULL ); } break; case AVP_BY_NAME: /* "what" is the AVP name, vendor 0 */ SEARCH_os0( what, &dict->dict_vendors.list[2], avp.avp_name, 1); break; case AVP_BY_CODE_AND_VENDOR: case AVP_BY_NAME_AND_VENDOR: { struct dict_avp_request * _what = (struct dict_avp_request *) what; struct dict_object * vendor = NULL; CHECK_PARAMS( (criteria != AVP_BY_NAME_AND_VENDOR) || _what->avp_name ); /* Now look for the vendor first */ CHECK_FCT( search_vendor( dict, VENDOR_BY_ID, &_what->avp_vendor, &vendor ) ); if (vendor == NULL) { if (result) *result = NULL; else ret = ENOENT; goto end; } /* We now have our vendor = head of the appropriate avp list */ if (criteria == AVP_BY_NAME_AND_VENDOR) { SEARCH_os0( _what->avp_name, &vendor->list[2], avp.avp_name, 1); } else { /* AVP_BY_CODE_AND_VENDOR */ SEARCH_scalar( _what->avp_code, &vendor->list[1], avp.avp_code, 1, (struct dict_object *)NULL ); } } break; case AVP_BY_STRUCT: { struct dict_avp_request_ex * _what = (struct dict_avp_request_ex *) what; struct dict_object * vendor = NULL; CHECK_PARAMS( _what->avp_vendor.vendor || _what->avp_vendor.vendor_id || _what->avp_vendor.vendor_name ); CHECK_PARAMS( _what->avp_data.avp_code || _what->avp_data.avp_name ); /* Now look for the vendor first */ if (_what->avp_vendor.vendor) { CHECK_PARAMS( ! _what->avp_vendor.vendor_id && ! _what->avp_vendor.vendor_name ); vendor = _what->avp_vendor.vendor; } else if (_what->avp_vendor.vendor_id) { CHECK_PARAMS( ! _what->avp_vendor.vendor_name ); CHECK_FCT( search_vendor( dict, VENDOR_BY_ID, &_what->avp_vendor.vendor_id, &vendor ) ); } else { CHECK_FCT( search_vendor( dict, VENDOR_BY_NAME, _what->avp_vendor.vendor_name, &vendor ) ); } if (vendor == NULL) { if (result) *result = NULL; else ret = ENOENT; goto end; } /* We now have our vendor = head of the appropriate avp list */ if (_what->avp_data.avp_code) { CHECK_PARAMS( ! _what->avp_data.avp_name ); SEARCH_scalar( _what->avp_data.avp_code, &vendor->list[1], avp.avp_code, 1, (struct dict_object *)NULL ); } else { SEARCH_os0( _what->avp_data.avp_name, &vendor->list[2], avp.avp_name, 1); } } break; case AVP_BY_NAME_ALL_VENDORS: { struct fd_list * li; size_t wl = strlen((char *)what); /* First, search for vendor 0 */ SEARCH_os0_l( what, wl, &dict->dict_vendors.list[2], avp.avp_name, 1); /* If not found, loop for all vendors, until found */ for (li = dict->dict_vendors.list[0].next; li != &dict->dict_vendors.list[0]; li = li->next) { SEARCH_os0_l( what, wl, &_O(li->o)->list[2], avp.avp_name, 1); } } break; default: /* Invalid criteria */ CHECK_PARAMS( criteria = 0 ); } end: return ret; } static int search_cmd ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result ) { int ret = 0; TRACE_ENTRY("%p %d %p %p", dict, criteria, what, result); switch (criteria) { case CMD_BY_NAME: /* "what" is a command name */ SEARCH_os0( what, &dict->dict_cmd_name, cmd.cmd_name, 1); break; case CMD_BY_CODE_R: case CMD_BY_CODE_A: { command_code_t code; uint8_t searchfl = 0; /* The command code that we are searching */ code = *(command_code_t *) what; /* The flag (request or answer) of the command we are searching */ if (criteria == CMD_BY_CODE_R) { searchfl = CMD_FLAG_REQUEST; } /* perform the search */ SEARCH_codefl( code, searchfl, &dict->dict_cmd_code ); } break; case CMD_ANSWER: { /* "what" is a command object of type "request" */ struct dict_object * req = (struct dict_object *) what; struct dict_object * ans = NULL; CHECK_PARAMS( verify_object(req) && (req->type == DICT_COMMAND) && (req->data.cmd.cmd_flag_mask & CMD_FLAG_REQUEST) && (req->data.cmd.cmd_flag_val & CMD_FLAG_REQUEST) ); /* The answer is supposed to be the next element in the list, if it exists */ ans = req->list[1].next->o; if ( ans == NULL ) { TRACE_DEBUG( FULL, "the request was the last element in the list" ); ret = ENOENT; goto end; } /* Now check that the ans element is really the correct one */ if ( (ans->data.cmd.cmd_code != req->data.cmd.cmd_code) || (!(ans->data.cmd.cmd_flag_mask & CMD_FLAG_REQUEST)) || ( ans->data.cmd.cmd_flag_val & CMD_FLAG_REQUEST ) ) { TRACE_DEBUG( FULL, "the answer does not follow the request in the list" ); ret = ENOENT; goto end; } if (result) *result = ans; ret = 0; } break; default: /* Invalid criteria */ CHECK_PARAMS( criteria = 0 ); } end: return ret; } static int search_rule ( struct dictionary * dict, int criteria, const void * what, struct dict_object **result ) { int ret = 0; TRACE_ENTRY("%p %d %p %p", dict, criteria, what, result); switch (criteria) { case RULE_BY_AVP_AND_PARENT: { struct dict_object * parent = NULL; struct dict_object * avp = NULL; struct dict_rule_request * _what = (struct dict_rule_request *) what; CHECK_PARAMS( _what && (parent = _what->rule_parent) && (avp = _what->rule_avp ) ); CHECK_PARAMS( verify_object(parent) && ((parent->type == DICT_COMMAND) || ((parent->type == DICT_AVP) && (parent->data.avp.avp_basetype == AVP_TYPE_GROUPED))) ); CHECK_PARAMS( verify_object(avp) && (avp->type == DICT_AVP) ); /* Perform the search */ SEARCH_ruleavpname( avp->data.avp.avp_name, avp->datastr_len, &parent->list[2]); } break; default: /* Invalid criteria */ CHECK_PARAMS( criteria = 0 ); } end: return ret; } /*******************************************************************************************************/ /*******************************************************************************************************/ /* */ /* Dump / debug functions */ /* */ /*******************************************************************************************************/ /*******************************************************************************************************/ /* The following functions are used to debug the module, and allow to print out the content of the dictionary */ static DECLARE_FD_DUMP_PROTOTYPE(dump_vendor_data, void * data ) { struct dict_vendor_data * vendor = (struct dict_vendor_data *)data; return fd_dump_extend( FD_DUMP_STD_PARAMS, "data: %-6u \"%s\"", vendor->vendor_id, vendor->vendor_name); } static DECLARE_FD_DUMP_PROTOTYPE(dump_application_data, void * data ) { struct dict_application_data * appli = (struct dict_application_data *) data; return fd_dump_extend( FD_DUMP_STD_PARAMS, "data: %-6u \"%s\"", appli->application_id, appli->application_name); } static DECLARE_FD_DUMP_PROTOTYPE(dump_type_data, void * data ) { struct dict_type_data * type = ( struct dict_type_data * ) data; return fd_dump_extend( FD_DUMP_STD_PARAMS, "data: %-12s \"%s\"", type_base_name[type->type_base], type->type_name); } static DECLARE_FD_DUMP_PROTOTYPE(dump_enumval_data, struct dict_enumval_data * enumval, enum dict_avp_basetype type ) { const int LEN_MAX = 20; CHECK_MALLOC_DO(fd_dump_extend( FD_DUMP_STD_PARAMS, "data: (%-12s) \"%s\" -> ", type_base_name[type], enumval->enum_name), return NULL); switch (type) { case AVP_TYPE_OCTETSTRING: { int i, n=LEN_MAX; if (enumval->enum_value.os.len < LEN_MAX) n = enumval->enum_value.os.len; for (i=0; i < n; i++) CHECK_MALLOC_DO(fd_dump_extend( FD_DUMP_STD_PARAMS, "0x%2hhX/'%c' ", enumval->enum_value.os.data[i], ASCII(enumval->enum_value.os.data[i])), return NULL); if (n == LEN_MAX) CHECK_MALLOC_DO(fd_dump_extend( FD_DUMP_STD_PARAMS, "..."), return NULL); } break; case AVP_TYPE_INTEGER32: CHECK_MALLOC_DO(fd_dump_extend( FD_DUMP_STD_PARAMS, "%i", enumval->enum_value.i32), return NULL); break; case AVP_TYPE_INTEGER64: CHECK_MALLOC_DO(fd_dump_extend( FD_DUMP_STD_PARAMS, "%"PRId64, enumval->enum_value.i64), return NULL); break; case AVP_TYPE_UNSIGNED32: CHECK_MALLOC_DO(fd_dump_extend( FD_DUMP_STD_PARAMS, "%u", enumval->enum_value.u32), return NULL); break; case AVP_TYPE_UNSIGNED64: CHECK_MALLOC_DO(fd_dump_extend( FD_DUMP_STD_PARAMS, "%"PRIu64, enumval->enum_value.u64), return NULL); break; case AVP_TYPE_FLOAT32: CHECK_MALLOC_DO(fd_dump_extend( FD_DUMP_STD_PARAMS, "%f", enumval->enum_value.f32), return NULL); break; case AVP_TYPE_FLOAT64: CHECK_MALLOC_DO(fd_dump_extend( FD_DUMP_STD_PARAMS, "%g", enumval->enum_value.f64), return NULL); break; default: CHECK_MALLOC_DO(fd_dump_extend( FD_DUMP_STD_PARAMS, "??? (ERROR unknown type %d)", type), return NULL); } return *buf; } static DECLARE_FD_DUMP_PROTOTYPE(dump_avp_data, void * data ) { struct dict_avp_data * avp = (struct dict_avp_data * ) data; return fd_dump_extend( FD_DUMP_STD_PARAMS, "data: v/m:" DUMP_AVPFL_str "/" DUMP_AVPFL_str ", %12s, %-6u \"%s\"", DUMP_AVPFL_val(avp->avp_flag_val), DUMP_AVPFL_val(avp->avp_flag_mask), type_base_name[avp->avp_basetype], avp->avp_code, avp->avp_name ); } static DECLARE_FD_DUMP_PROTOTYPE(dump_command_data, void * data ) { struct dict_cmd_data * cmd = (struct dict_cmd_data *) data; return fd_dump_extend( FD_DUMP_STD_PARAMS, "data: v/m:" DUMP_CMDFL_str "/" DUMP_CMDFL_str ", %-6u \"%s\"", DUMP_CMDFL_val(cmd->cmd_flag_val), DUMP_CMDFL_val(cmd->cmd_flag_mask), cmd->cmd_code, cmd->cmd_name); } static DECLARE_FD_DUMP_PROTOTYPE(dump_rule_data, void * data ) { struct dict_rule_data * rule = (struct dict_rule_data * )data; return fd_dump_extend( FD_DUMP_STD_PARAMS, "data: pos:%d ord:%d m/M:%2d/%2d avp:\"%s\"", rule->rule_position, rule->rule_order, rule->rule_min, rule->rule_max, rule->rule_avp->data.avp.avp_name); } static DECLARE_FD_DUMP_PROTOTYPE(dump_object, struct dict_object * obj, int parents, int depth, int indent ); static DECLARE_FD_DUMP_PROTOTYPE(dump_list, struct fd_list * sentinel, int parents, int depth, int indent ) { struct fd_list * li = sentinel; /* We don't lock here, the caller must have taken the dictionary lock for reading already */ if (FD_IS_LIST_EMPTY(sentinel)) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "\n%*s{empty list}", indent, ""), return NULL); } else { while (li->next != sentinel) { li = li->next; CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "\n"), return NULL); CHECK_MALLOC_DO( dump_object (FD_DUMP_STD_PARAMS, _O(li->o), parents, depth, indent ), return NULL); } } return *buf; } static DECLARE_FD_DUMP_PROTOTYPE(dump_object, struct dict_object * obj, int parents, int depth, int indent ) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "%*s{dictobj}(@%p): ", indent, "", obj), return NULL); if (!verify_object(obj)) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "INVALID/NULL"), return NULL); return *buf; } CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "%s p:%p ", _OBINFO(obj).name, obj->parent), return NULL); if (obj->type == DICT_ENUMVAL) { CHECK_MALLOC_DO( dump_enumval_data ( FD_DUMP_STD_PARAMS, &obj->data.enumval, obj->parent->data.type.type_base ), return NULL); } else { CHECK_MALLOC_DO( _OBINFO(obj).dump_data(FD_DUMP_STD_PARAMS, &obj->data), return NULL); } if (parents) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "\n%*sparent:", indent + 1, ""), return NULL); CHECK_MALLOC_DO( dump_object (FD_DUMP_STD_PARAMS, obj->parent, parents-1, 0, 0 ), return NULL); } if (depth) { int i; for (i=0; ilist[i].o == NULL) && (obj->list[i].next != &obj->list[i])) { CHECK_MALLOC_DO( dump_list(FD_DUMP_STD_PARAMS, &obj->list[i], 0, depth - 1, indent + 2), return NULL); break; /* we get duplicate information sorted by another criteria otherwise, which is not very useful */ } } } return *buf; } DECLARE_FD_DUMP_PROTOTYPE(fd_dict_dump_object, struct dict_object * obj) { FD_DUMP_HANDLE_OFFSET(); CHECK_MALLOC_DO( dump_object(FD_DUMP_STD_PARAMS, obj, 1, 2, 0), return NULL); return *buf; } DECLARE_FD_DUMP_PROTOTYPE(fd_dict_dump, struct dictionary * dict) { int i; struct fd_list * li; FD_DUMP_HANDLE_OFFSET(); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "{dictionary}(@%p): ", dict), return NULL); if ((dict == NULL) || (dict->dict_eyec != DICT_EYECATCHER)) { return fd_dump_extend(FD_DUMP_STD_PARAMS, "INVALID/NULL"); } CHECK_POSIX_DO( pthread_rwlock_rdlock( &dict->dict_lock ), /* ignore */ ); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "\n {dict(%p) : VENDORS / AVP / RULES}\n", dict), goto error); CHECK_MALLOC_DO( dump_object (FD_DUMP_STD_PARAMS, &dict->dict_vendors, 0, 3, 3 ), goto error); for (li = dict->dict_vendors.list[0].next; li != &dict->dict_vendors.list[0]; li = li->next) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "\n"), return NULL); CHECK_MALLOC_DO( dump_object (FD_DUMP_STD_PARAMS, li->o, 0, 3, 3 ), goto error); } CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "\n {dict(%p) : APPLICATIONS}\n", dict), goto error); CHECK_MALLOC_DO( dump_object (FD_DUMP_STD_PARAMS, &dict->dict_applications, 0, 1, 3 ), goto error); for (li = dict->dict_applications.list[0].next; li != &dict->dict_applications.list[0]; li = li->next) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "\n"), return NULL); CHECK_MALLOC_DO( dump_object (FD_DUMP_STD_PARAMS, li->o, 0, 1, 3 ), goto error); } CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "\n {dict(%p) : TYPES / ENUMVAL}", dict), goto error); CHECK_MALLOC_DO( dump_list(FD_DUMP_STD_PARAMS, &dict->dict_types, 0, 2, 3 ), goto error); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "\n {dict(%p) : COMMANDS / RULES}", dict), goto error); CHECK_MALLOC_DO( dump_list(FD_DUMP_STD_PARAMS, &dict->dict_cmd_code, 0, 0, 3 ), goto error); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "\n {dict(%p) : statistics}", dict), goto error); for (i=1; i<=DICT_TYPE_MAX; i++) CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "\n %5d: %s", dict->dict_count[i], dict_obj_info[i].name), goto error); CHECK_POSIX_DO( pthread_rwlock_unlock( &dict->dict_lock ), /* ignore */ ); return *buf; error: /* Free the rwlock */ CHECK_POSIX_DO( pthread_rwlock_unlock( &dict->dict_lock ), /* ignore */ ); return NULL; } /**************************** Dump AVP values ********************************/ /* Default dump functions */ static DECLARE_FD_DUMP_PROTOTYPE(dump_val_os, union avp_value * value) { int i; CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "<"), return NULL); for (i = 0; i < value->os.len; i++) { if (i == 1024) { /* Dump only up to 1024 bytes of the buffer */ CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "[...] (len=%zd)", value->os.len), return NULL); break; } CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "%s%02hhX", (i==0 ? "" : " "), value->os.data[i]), return NULL); } CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, ">"), return NULL); return *buf; } static DECLARE_FD_DUMP_PROTOTYPE(dump_val_i32, union avp_value * value) { return fd_dump_extend( FD_DUMP_STD_PARAMS, "%i (0x%x)", value->i32, value->i32); } static DECLARE_FD_DUMP_PROTOTYPE(dump_val_i64, union avp_value * value) { return fd_dump_extend( FD_DUMP_STD_PARAMS, "%" PRId64 " (0x%" PRIx64 ")", value->i64, value->i64); } static DECLARE_FD_DUMP_PROTOTYPE(dump_val_u32, union avp_value * value) { return fd_dump_extend( FD_DUMP_STD_PARAMS, "%u (0x%x)", value->u32, value->u32); } static DECLARE_FD_DUMP_PROTOTYPE(dump_val_u64, union avp_value * value) { return fd_dump_extend( FD_DUMP_STD_PARAMS, "%" PRIu64 " (0x%" PRIx64 ")", value->u64, value->u64); } static DECLARE_FD_DUMP_PROTOTYPE(dump_val_f32, union avp_value * value) { return fd_dump_extend( FD_DUMP_STD_PARAMS, "%f", value->f32); } static DECLARE_FD_DUMP_PROTOTYPE(dump_val_f64, union avp_value * value) { return fd_dump_extend( FD_DUMP_STD_PARAMS, "%g", value->f64); } /* Get the dump function for basic dict_avp_basetype */ static DECLARE_FD_DUMP_PROTOTYPE((*get_default_dump_val_cb(enum dict_avp_basetype datatype)), union avp_value *) { switch (datatype) { case AVP_TYPE_OCTETSTRING: return &dump_val_os; case AVP_TYPE_INTEGER32: return &dump_val_i32; case AVP_TYPE_INTEGER64: return &dump_val_i64; case AVP_TYPE_UNSIGNED32: return &dump_val_u32; case AVP_TYPE_UNSIGNED64: return &dump_val_u64; case AVP_TYPE_FLOAT32: return &dump_val_f32; case AVP_TYPE_FLOAT64: return &dump_val_f64; case AVP_TYPE_GROUPED: TRACE_DEBUG(FULL, "error: grouped AVP with a value!"); } return NULL; } /* indent inside an object (duplicate from messages.c) */ #define INOBJHDR "%*s " #define INOBJHDRVAL indent<0 ? 1 : indent, indent<0 ? "-" : "|" typedef DECLARE_FD_DUMP_PROTOTYPE((*dump_val_cb_t), union avp_value *); /* Formatter for the AVP value dump line */ static DECLARE_FD_DUMP_PROTOTYPE(dump_avp_val, union avp_value *avp_value, dump_val_cb_t def_dump_val_cb, dump_val_cb_t dump_val_cb, enum dict_avp_basetype datatype, char * type_name, char * const_name, int indent, int header) { if (header) { /* Header for all AVP values dumps: */ CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, INOBJHDR "value ", INOBJHDRVAL), return NULL); /* If the type is provided, write it */ if (type_name) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "t: '%s' ", type_name), return NULL); } /* Always give the base datatype anyway */ CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "(%s) ", type_base_name[datatype]), return NULL); /* Now, the value */ CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "v: "), return NULL); } if (const_name) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "'%s' (", const_name), return NULL); } if (dump_val_cb) { CHECK_MALLOC_DO( (*dump_val_cb)( FD_DUMP_STD_PARAMS, avp_value), fd_dump_extend( FD_DUMP_STD_PARAMS, "(dump failed)")); } else { CHECK_MALLOC_DO( (*def_dump_val_cb)( FD_DUMP_STD_PARAMS, avp_value), return NULL); } if (const_name) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, ")"), return NULL); } /* Done! */ return *buf; } /* Dump the value of an AVP of known type into the returned str */ DECLARE_FD_DUMP_PROTOTYPE(fd_dict_dump_avp_value, union avp_value *avp_value, struct dict_object * model, int indent, int header) { DECLARE_FD_DUMP_PROTOTYPE((*dump_val_cb), union avp_value *avp_value) = NULL; struct dict_object * type = NULL; char * type_name = NULL; char * const_name = NULL; FD_DUMP_HANDLE_OFFSET(); /* Handle invalid parameters */ if (!avp_value) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "(avp value not set)"), return NULL); return *buf; } if (!model) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "(model not set)"), return NULL); return *buf; } if (! ( verify_object(model) && (model->type == DICT_AVP) )) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "(invalid model)"), return NULL); return *buf; } /* Get the type definition of this AVP */ type = model->parent; if (type) { struct dict_enumval_request request; struct dict_object * enumval = NULL; type_name = type->data.type.type_name; /* overwrite the dump function ? */ if (type->data.type.type_dump) dump_val_cb = type->data.type.type_dump; /* Now check if the AVP value matches a constant */ memset(&request, 0, sizeof(request)); request.type_obj = type; memcpy(&request.search.enum_value, avp_value, sizeof(union avp_value)); /* bypass checks */ if ((search_enumval( type->dico, ENUMVAL_BY_STRUCT, &request, &enumval ) == 0) && (enumval)) { /* We found a constant, get its name */ const_name = enumval->data.enumval.enum_name; } } /* And finally, dump the value */ CHECK_MALLOC_DO( dump_avp_val(FD_DUMP_STD_PARAMS, avp_value, get_default_dump_val_cb(model->data.avp.avp_basetype), dump_val_cb, model->data.avp.avp_basetype, type_name, const_name, indent, header), return NULL ); return *buf; } /*******************************************************************************************************/ /*******************************************************************************************************/ /* */ /* Exported functions */ /* */ /*******************************************************************************************************/ /*******************************************************************************************************/ /* These are the functions exported outside libfreeDiameter. */ /* Get the data associated to an object */ int fd_dict_gettype ( struct dict_object * object, enum dict_object_type * type) { TRACE_ENTRY("%p %p", object, type); CHECK_PARAMS( type && verify_object(object) ); /* Copy the value and return */ *type = object->type; return 0; } int fd_dict_getdict ( struct dict_object * object, struct dictionary ** dict) { TRACE_ENTRY("%p %p", object, dict); CHECK_PARAMS( dict && verify_object(object) ); /* Copy the value and return */ *dict = object->dico; return 0; } /* Get the data associated to an object */ int fd_dict_getval ( struct dict_object * object, void * val) { TRACE_ENTRY("%p %p", object, val); CHECK_PARAMS( val && verify_object(object) ); /* Copy the value and return */ memcpy(val, &object->data, _OBINFO(object).datasize);; return 0; } /* Add a new object in the dictionary */ int fd_dict_new ( struct dictionary * dict, enum dict_object_type type, void * data, struct dict_object * parent, struct dict_object **ref ) { int ret = 0; struct dict_object * new = NULL; struct dict_object * vendor = NULL; struct dict_object * locref = NULL; TRACE_ENTRY("%p %d(%s) %p %p %p", dict, type, dict_obj_info[CHECK_TYPE(type) ? type : 0].name, data, parent, ref); /* Check parameters */ CHECK_PARAMS( dict && (dict->dict_eyec == DICT_EYECATCHER) && CHECK_TYPE(type) && data ); /* Check the "parent" parameter */ switch (dict_obj_info[type].parent) { case 0: /* parent is forbidden */ CHECK_PARAMS_DO( parent == NULL, goto error_param ); case 1: /* parent is optional */ if (parent == NULL) break; case 2: /* parent is mandatory */ CHECK_PARAMS_DO( verify_object(parent), goto error_param ); if (type == DICT_RULE ) { /* Special case : grouped AVP or Command parents are allowed */ CHECK_PARAMS_DO( (parent->type == DICT_COMMAND ) || ( (parent->type == DICT_AVP) && (parent->data.avp.avp_basetype == AVP_TYPE_GROUPED ) ), goto error_param ); } else { CHECK_PARAMS_DO( parent->type == dict_obj_info[type].parenttype, goto error_param ); } } /* For AVP object, we must also check that the "vendor" referenced exists */ if (type == DICT_AVP) { CHECK_FCT_DO( fd_dict_search( dict, DICT_VENDOR, VENDOR_BY_ID, &(((struct dict_avp_data *)data)->avp_vendor), (void*)&vendor, ENOENT ), { TRACE_DEBUG(INFO, "Unable to find vendor '%d' referenced in the AVP data", ((struct dict_avp_data *)data)->avp_vendor); goto error_param; } ); /* Also check if a parent is provided, that the type are the same */ if (parent) { CHECK_PARAMS_DO( parent->data.type.type_base == ((struct dict_avp_data *)data)->avp_basetype, goto error_param ); } } /* For RULE object, we must also check that the "avp" referenced exists */ if (type == DICT_RULE) { CHECK_PARAMS_DO( verify_object(((struct dict_rule_data *)data)->rule_avp), goto error_param ); CHECK_PARAMS_DO( ((struct dict_rule_data *)data)->rule_avp->type == DICT_AVP, goto error_param ); } /* For COMMAND object, check that the 'R' flag is fixed */ if (type == DICT_COMMAND) { CHECK_PARAMS_DO( ((struct dict_cmd_data *)data)->cmd_flag_mask & CMD_FLAG_REQUEST, goto error_param ); } /* We have to check that the new values are not equal to the sentinels */ if (type == DICT_VENDOR) { CHECK_PARAMS_DO( ((struct dict_vendor_data *)data)->vendor_id != 0, goto error_param ); } if (type == DICT_APPLICATION) { CHECK_PARAMS_DO( ((struct dict_application_data *)data)->application_id != 0, goto error_param ); } /* Parameters are valid, create the new object */ CHECK_MALLOC( new = malloc(sizeof(struct dict_object)) ); /* Initialize the data of the new object */ init_object(new, type); init_object_data(new, data, type); new->dico = dict; new->parent = parent; /* We will change the dictionary => acquire the write lock */ CHECK_POSIX_DO( ret = pthread_rwlock_wrlock(&dict->dict_lock), goto error_free ); /* Now link the object -- this also checks that no object with same keys already exists */ switch (type) { case DICT_VENDOR: /* A vendor object is linked in the g_dict_vendors.list[0], by their id */ ret = fd_list_insert_ordered ( &dict->dict_vendors.list[0], &new->list[0], (int (*)(void*, void *))order_vendor_by_id, (void **)&locref ); if (ret) goto error_unlock; break; case DICT_APPLICATION: /* An application object is linked in the g_dict_applciations.list[0], by their id */ ret = fd_list_insert_ordered ( &dict->dict_applications.list[0], &new->list[0], (int (*)(void*, void *))order_appli_by_id, (void **)&locref ); if (ret) goto error_unlock; break; case DICT_TYPE: /* A type object is linked in g_list_types by its name */ ret = fd_list_insert_ordered ( &dict->dict_types, &new->list[0], (int (*)(void*, void *))order_type_by_name, (void **)&locref ); if (ret) goto error_unlock; break; case DICT_ENUMVAL: /* A type_enum object is linked in it's parent 'type' object lists 1 and 2 by its name and values */ ret = fd_list_insert_ordered ( &parent->list[1], &new->list[0], (int (*)(void*, void *))order_enum_by_name, (void **)&locref ); if (ret) goto error_unlock; ret = fd_list_insert_ordered ( &parent->list[2], &new->list[1], (int (*)(void*, void *))order_enum_by_val, (void **)&locref ); if (ret) { fd_list_unlink(&new->list[0]); goto error_unlock; } break; case DICT_AVP: /* An avp object is linked in lists 1 and 2 of its vendor, by code and name */ ret = fd_list_insert_ordered ( &vendor->list[1], &new->list[0], (int (*)(void*, void *))order_avp_by_code, (void **)&locref ); if (ret) goto error_unlock; ret = fd_list_insert_ordered ( &vendor->list[2], &new->list[1], (int (*)(void*, void *))order_avp_by_name, (void **)&locref ); if (ret) { fd_list_unlink(&new->list[0]); goto error_unlock; } break; case DICT_COMMAND: /* A command object is linked in g_list_cmd_name and g_list_cmd_code by its name and code */ ret = fd_list_insert_ordered ( &dict->dict_cmd_code, &new->list[1], (int (*)(void*, void *))order_cmd_by_codefl, (void **)&locref ); if (ret) goto error_unlock; ret = fd_list_insert_ordered ( &dict->dict_cmd_name, &new->list[0], (int (*)(void*, void *))order_cmd_by_name, (void **)&locref ); if (ret) { fd_list_unlink(&new->list[1]); goto error_unlock; } break; case DICT_RULE: /* A rule object is linked in list[2] of its parent command or AVP by the name of the AVP it refers */ ret = fd_list_insert_ordered ( &parent->list[2], &new->list[0], (int (*)(void*, void *))order_rule_by_avpvc, (void **)&locref ); if (ret) goto error_unlock; break; default: ASSERT(0); } /* A new object has been created, increment the global counter */ dict->dict_count[type]++; /* Unlock the dictionary */ CHECK_POSIX_DO( ret = pthread_rwlock_unlock(&dict->dict_lock), goto error_free ); /* Save the pointer to the new object */ if (ref) *ref = new; return 0; error_param: ret = EINVAL; goto all_errors; error_unlock: CHECK_POSIX_DO( pthread_rwlock_unlock(&dict->dict_lock), /* continue */ ); if (ret == EEXIST) { /* We have a duplicate key in locref. Check if the pointed object is the same or not */ switch (type) { case DICT_VENDOR: TRACE_DEBUG(FULL, "Vendor %s already in dictionary", new->data.vendor.vendor_name); /* if we are here, it means the two vendors id are identical */ if (fd_os_cmp(locref->data.vendor.vendor_name, locref->datastr_len, new->data.vendor.vendor_name, new->datastr_len)) { TRACE_DEBUG(INFO, "Conflicting vendor name: %s", new->data.vendor.vendor_name); break; } /* Otherwise (same name), we consider the function succeeded, since the (same) object is in the dictionary */ ret = 0; break; case DICT_APPLICATION: TRACE_DEBUG(FULL, "Application %s already in dictionary", new->data.application.application_name); /* got same id */ if (fd_os_cmp(locref->data.application.application_name, locref->datastr_len, new->data.application.application_name, new->datastr_len)) { TRACE_DEBUG(FULL, "Conflicting application name"); break; } ret = 0; break; case DICT_TYPE: TRACE_DEBUG(FULL, "Type %s already in dictionary", new->data.type.type_name); /* got same name */ if (locref->data.type.type_base != new->data.type.type_base) { TRACE_DEBUG(FULL, "Conflicting base type"); break; } /* discard new definition only it a callback is provided and different from the previous one */ if ((new->data.type.type_interpret) && (locref->data.type.type_interpret != new->data.type.type_interpret)) { TRACE_DEBUG(FULL, "Conflicting interpret cb"); break; } if ((new->data.type.type_encode) && (locref->data.type.type_encode != new->data.type.type_encode)) { TRACE_DEBUG(FULL, "Conflicting encode cb"); break; } if ((new->data.type.type_dump) && (locref->data.type.type_dump != new->data.type.type_dump)) { TRACE_DEBUG(FULL, "Conflicting dump cb"); break; } ret = 0; break; case DICT_ENUMVAL: TRACE_DEBUG(FULL, "Enum %s already in dictionary", new->data.enumval.enum_name); /* got either same name or same value. We check that both are true */ if (order_enum_by_name(locref, new)) { TRACE_DEBUG(FULL, "Conflicting enum name"); break; } if (order_enum_by_val(locref, new)) { TRACE_DEBUG(FULL, "Conflicting enum value"); break; } ret = 0; break; case DICT_AVP: TRACE_DEBUG(FULL, "AVP %s already in dictionary", new->data.avp.avp_name); /* got either same name or code */ if (order_avp_by_code(locref, new)) { TRACE_DEBUG(FULL, "Conflicting AVP code"); break; } if (order_avp_by_name(locref, new)) { TRACE_DEBUG(FULL, "Conflicting AVP name"); break; } if (locref->data.avp.avp_vendor != new->data.avp.avp_vendor) { TRACE_DEBUG(FULL, "Conflicting AVP vendor"); break; } if (locref->data.avp.avp_flag_mask != new->data.avp.avp_flag_mask) { TRACE_DEBUG(FULL, "Conflicting AVP flags mask"); break; } if ((locref->data.avp.avp_flag_val & locref->data.avp.avp_flag_mask) != (new->data.avp.avp_flag_val & new->data.avp.avp_flag_mask)) { TRACE_DEBUG(FULL, "Conflicting AVP flags value"); break; } if (locref->data.avp.avp_basetype != new->data.avp.avp_basetype) { TRACE_DEBUG(FULL, "Conflicting AVP base type"); break; } ret = 0; break; case DICT_COMMAND: TRACE_DEBUG(FULL, "Command %s already in dictionary", new->data.cmd.cmd_name); /* We got either same name, or same code + R flag */ if (order_cmd_by_name(locref, new)) { TRACE_DEBUG(FULL, "Conflicting command name"); break; } if (locref->data.cmd.cmd_code != new->data.cmd.cmd_code) { TRACE_DEBUG(FULL, "Conflicting command code"); break; } if (locref->data.cmd.cmd_flag_mask != new->data.cmd.cmd_flag_mask) { TRACE_DEBUG(FULL, "Conflicting command flags mask %hhx:%hhx", locref->data.cmd.cmd_flag_mask, new->data.cmd.cmd_flag_mask); break; } if ((locref->data.cmd.cmd_flag_val & locref->data.cmd.cmd_flag_mask) != (new->data.cmd.cmd_flag_val & new->data.cmd.cmd_flag_mask)) { TRACE_DEBUG(FULL, "Conflicting command flags value"); break; } ret = 0; break; case DICT_RULE: /* Both rules point to the same AVPs (code & vendor) */ if (locref->data.rule.rule_position != new->data.rule.rule_position) { TRACE_DEBUG(FULL, "Conflicting rule position"); break; } if ( ((locref->data.rule.rule_position == RULE_FIXED_HEAD) || (locref->data.rule.rule_position == RULE_FIXED_TAIL)) && (locref->data.rule.rule_order != new->data.rule.rule_order)) { TRACE_DEBUG(FULL, "Conflicting rule order"); break; } if (locref->data.rule.rule_min != new->data.rule.rule_min) { int r1 = locref->data.rule.rule_min; int r2 = new->data.rule.rule_min; int p = locref->data.rule.rule_position; if ( ((r1 != -1) && (r2 != -1)) /* none of the definitions contains the "default" value */ || ((p == RULE_OPTIONAL) && (r1 != 0) && (r2 != 0)) /* the other value is not 0 for an optional rule */ || ((r1 != 1) && (r2 != 1)) /* the other value is not 1 for another rule */ ) { TRACE_DEBUG(FULL, "Conflicting rule min"); break; } } if (locref->data.rule.rule_max != new->data.rule.rule_max) { TRACE_DEBUG(FULL, "Conflicting rule max"); break; } ret = 0; break; } if (!ret) { TRACE_DEBUG(FULL, "An existing object with the same data was found, ignoring the error..."); } if (ref) *ref = locref; } all_errors: if (ret != 0) { char * buf = NULL; size_t len = 0, offset=0; if (type == DICT_ENUMVAL) { CHECK_MALLOC( dump_enumval_data ( &buf, &len, &offset, data, parent->data.type.type_base )); } else { CHECK_MALLOC( dict_obj_info[CHECK_TYPE(type) ? type : 0].dump_data(&buf, &len, &offset, data) ); } TRACE_DEBUG(INFO, "An error occurred while adding the following data in the dictionary: %s", buf); if (ret == EEXIST) { offset=0; CHECK_MALLOC( dump_object(&buf, &len, &offset, locref, 0, 0, 0) ); TRACE_DEBUG(INFO, "Conflicting entry in the dictionary: %s", buf); } free(buf); } error_free: free(new); return ret; } int fd_dict_delete(struct dict_object * obj) { int i; struct dictionary * dict; int ret=0; /* check params */ CHECK_PARAMS( verify_object(obj) && obj->dico); dict = obj->dico; /* Lock the dictionary for change */ CHECK_POSIX( pthread_rwlock_wrlock(&dict->dict_lock) ); /* check the object is not sentinel for another list */ for (i=0; ilist[i]))) { /* There are children, this is not good */ ret = EINVAL; TRACE_DEBUG (FULL, "Cannot delete object, list %d not empty:", i); #if 0 dump_list(&obj->list[i], 0,0,0); #endif break; } } /* ok, now destroy the object */ if (!ret) destroy_object(obj); /* Unlock */ CHECK_POSIX( pthread_rwlock_unlock(&dict->dict_lock) ); return ret; } int fd_dict_search ( struct dictionary * dict, enum dict_object_type type, int criteria, const void * what, struct dict_object **result, int retval ) { int ret = 0; TRACE_ENTRY("%p %d(%s) %d %p %p %d", dict, type, dict_obj_info[CHECK_TYPE(type) ? type : 0].name, criteria, what, result, retval); /* Check param */ CHECK_PARAMS( dict && (dict->dict_eyec == DICT_EYECATCHER) && CHECK_TYPE(type) ); /* Lock the dictionary for reading */ CHECK_POSIX( pthread_rwlock_rdlock(&dict->dict_lock) ); /* Now call the type-specific search function */ ret = dict_obj_info[type].search_fct (dict, criteria, what, result); /* Unlock */ CHECK_POSIX( pthread_rwlock_unlock(&dict->dict_lock) ); /* Update the return value as needed */ if ((result != NULL) && (*result == NULL)) ret = retval; return ret; } /* Function to retrieve list of objects in the dictionary. Use with care (read only). All returned list must be accessed like this: for (li = sentinel->next; li != sentinel; li=li->next) { struct dict_object * obj = li->o; ... } The following criteria are allowed, with corresponding parent. The parent is either struct dictionary * or struct dict_object * VENDOR_BY_ID : (parent = dictionary) returns list of vendors ordered by ID APPLICATION_BY_ID : (parent = dictionary) returns list of applications ordered by ID ** for these two lists, the Vendor with id 0 and applciation with id 0 are excluded. You must resolve them separatly with dict_search. TYPE_BY_NAME : (parent = dictionary) returns list of types ordered by name (osstring order) ENUMVAL_BY_NAME : (parent = type object) return list of constants for this type ordered by name (osstring order) ENUMVAL_BY_VALUE : (parent = type object) return list of constants for this type ordered by values AVP_BY_NAME : (parent = vendor object) return list of AVP for this vendor ordered by name (osstring order) AVP_BY_CODE : (parent = vendor object) return list of AVP for this vendor ordered by code CMD_BY_NAME : (parent = dictionary) returns list of commands ordered by name (osstring order) CMD_BY_CODE_R : (parent = dictionary) returns list of commands ordered by code RULE_BY_AVP_AND_PARENT: (parent = command or grouped AVP object) return list of rules for this object ordered by AVP vendor/code All other criteria are rejected. */ int fd_dict_getlistof(int criteria, void * parent, struct fd_list ** sentinel) { struct dictionary * dict = parent; struct dict_object * obj_parent = parent; TRACE_ENTRY("%i %p %p", criteria, parent, sentinel); CHECK_PARAMS(sentinel && parent); switch(criteria) { case VENDOR_BY_ID: /* parent must be the dictionary */ CHECK_PARAMS(dict->dict_eyec == DICT_EYECATCHER); *sentinel = &dict->dict_vendors.list[0]; break; case APPLICATION_BY_ID: /* parent must be the dictionary */ CHECK_PARAMS(dict->dict_eyec == DICT_EYECATCHER); *sentinel = &dict->dict_applications.list[0]; break; case TYPE_BY_NAME: /* parent must be the dictionary */ CHECK_PARAMS(dict->dict_eyec == DICT_EYECATCHER); *sentinel = &dict->dict_types; break; case ENUMVAL_BY_NAME: /* parent must be a type object */ CHECK_PARAMS(verify_object(obj_parent) && (obj_parent->type == DICT_TYPE)); *sentinel = &obj_parent->list[1]; break; case ENUMVAL_BY_VALUE: /* parent must be a type object */ CHECK_PARAMS(verify_object(obj_parent) && (obj_parent->type == DICT_TYPE)); *sentinel = &obj_parent->list[2]; break; case AVP_BY_NAME: /* parent must be a VENDOR object */ CHECK_PARAMS(verify_object(obj_parent) && (obj_parent->type == DICT_VENDOR)); *sentinel = &obj_parent->list[2]; break; case AVP_BY_CODE: /* parent must be a VENDOR object */ CHECK_PARAMS(verify_object(obj_parent) && (obj_parent->type == DICT_VENDOR)); *sentinel = &obj_parent->list[1]; break; case CMD_BY_NAME: /* parent must be the dictionary */ CHECK_PARAMS(dict->dict_eyec == DICT_EYECATCHER); *sentinel = &dict->dict_cmd_name; break; case CMD_BY_CODE_R: /* parent must be the dictionary */ CHECK_PARAMS(dict->dict_eyec == DICT_EYECATCHER); *sentinel = &dict->dict_cmd_code; break; case RULE_BY_AVP_AND_PARENT: /* parent must be command or grouped AVP */ CHECK_PARAMS(verify_object(obj_parent)); CHECK_PARAMS( (obj_parent->type == DICT_COMMAND) || ((obj_parent->type == DICT_AVP) && (obj_parent->data.avp.avp_basetype == AVP_TYPE_GROUPED)) ); *sentinel = &obj_parent->list[2]; break; default: CHECK_PARAMS(0); } return 0; } /*******************************************************************************************************/ /*******************************************************************************************************/ /* */ /* The init/fini functions */ /* */ /*******************************************************************************************************/ /*******************************************************************************************************/ /* Initialize the dictionary */ int fd_dict_init ( struct dictionary ** dict) { struct dictionary * new = NULL; TRACE_ENTRY("%p", dict); /* Sanity checks */ ASSERT( (sizeof(type_base_name) / sizeof(type_base_name[0])) == (AVP_TYPE_MAX + 1) ); ASSERT( (sizeof(dict_obj_info) / sizeof(dict_obj_info[0])) == (DICT_TYPE_MAX + 1) ); CHECK_PARAMS(dict); /* Allocate the memory for the dictionary */ CHECK_MALLOC( new = malloc(sizeof(struct dictionary)) ); memset(new, 0, sizeof(struct dictionary)); new->dict_eyec = DICT_EYECATCHER; /* Initialize the lock for the dictionary */ CHECK_POSIX( pthread_rwlock_init(&new->dict_lock, NULL) ); /* Initialize the sentinel for vendors and AVP lists */ init_object( &new->dict_vendors, DICT_VENDOR ); #define NO_VENDOR_NAME "(no vendor)" new->dict_vendors.data.vendor.vendor_name = NO_VENDOR_NAME; new->dict_vendors.datastr_len = CONSTSTRLEN(NO_VENDOR_NAME); /* new->dict_vendors.list[0].o = NULL; *//* overwrite since element is also sentinel for this list. */ new->dict_vendors.dico = new; /* Initialize the sentinel for applications */ init_object( &new->dict_applications, DICT_APPLICATION ); #define APPLICATION_0_NAME "Diameter Common Messages" new->dict_applications.data.application.application_name = APPLICATION_0_NAME; new->dict_applications.datastr_len = CONSTSTRLEN(APPLICATION_0_NAME); /* new->dict_applications.list[0].o = NULL; *//* overwrite since since element is also sentinel for this list. */ new->dict_applications.dico = new; /* Initialize the sentinel for types */ fd_list_init ( &new->dict_types, NULL ); /* Initialize the sentinels for commands */ fd_list_init ( &new->dict_cmd_name, NULL ); fd_list_init ( &new->dict_cmd_code, NULL ); /* Initialize the error command object */ init_object( &new->dict_cmd_error, DICT_COMMAND ); #define GENERIC_ERROR_NAME "(generic error format)" new->dict_cmd_error.data.cmd.cmd_name = GENERIC_ERROR_NAME; new->dict_cmd_error.datastr_len = CONSTSTRLEN(GENERIC_ERROR_NAME); new->dict_cmd_error.data.cmd.cmd_flag_mask=CMD_FLAG_ERROR | CMD_FLAG_REQUEST | CMD_FLAG_RETRANSMIT; new->dict_cmd_error.data.cmd.cmd_flag_val =CMD_FLAG_ERROR; new->dict_cmd_error.dico = new; *dict = new; /* Done */ return 0; } /* Destroy a dictionary */ int fd_dict_fini ( struct dictionary ** dict) { int i; TRACE_ENTRY(""); CHECK_PARAMS( dict && *dict && ((*dict)->dict_eyec == DICT_EYECATCHER) ); /* Acquire the write lock to make sure no other operation is ongoing */ CHECK_POSIX( pthread_rwlock_wrlock(&(*dict)->dict_lock) ); /* Empty all the lists, free the elements */ destroy_list ( &(*dict)->dict_cmd_error.list[2] ); destroy_list ( &(*dict)->dict_cmd_code ); destroy_list ( &(*dict)->dict_cmd_name ); destroy_list ( &(*dict)->dict_types ); for (i=0; i< NB_LISTS_PER_OBJ; i++) { destroy_list ( &(*dict)->dict_applications.list[i] ); destroy_list ( &(*dict)->dict_vendors.list[i] ); } /* Dictionary is empty, now destroy the lock */ CHECK_POSIX( pthread_rwlock_unlock(&(*dict)->dict_lock) ); CHECK_POSIX( pthread_rwlock_destroy(&(*dict)->dict_lock) ); free(*dict); *dict = NULL; return 0; } /*******************************************************************************************************/ /*******************************************************************************************************/ /* */ /* Other functions */ /* */ /*******************************************************************************************************/ /*******************************************************************************************************/ /* Iterate a callback on the rules for an object */ int fd_dict_iterate_rules ( struct dict_object *parent, void * data, int (*cb)(void *, struct dict_rule_data *) ) { int ret = 0; struct fd_list * li; TRACE_ENTRY("%p %p %p", parent, data, cb); /* Check parameters */ CHECK_PARAMS( verify_object(parent) ); CHECK_PARAMS( (parent->type == DICT_COMMAND) || ((parent->type == DICT_AVP) && (parent->data.avp.avp_basetype == AVP_TYPE_GROUPED)) ); TRACE_DEBUG (FULL, "Iterating on rules of %s: '%s'.", _OBINFO(parent).name, parent->type == DICT_COMMAND ? parent->data.cmd.cmd_name : parent->data.avp.avp_name); /* Acquire the read lock */ CHECK_POSIX( pthread_rwlock_rdlock(&parent->dico->dict_lock) ); /* go through the list and call the cb on each rule data */ for (li = &(parent->list[2]); li->next != &(parent->list[2]); li = li->next) { ret = (*cb)(data, &(_O(li->next->o)->data.rule)); if (ret != 0) break; } /* Release the lock */ CHECK_POSIX( pthread_rwlock_unlock(&parent->dico->dict_lock) ); return ret; } /* Create the list of vendors. Returns a 0-terminated array, that must be freed after use. Returns NULL on error. */ uint32_t * fd_dict_get_vendorid_list(struct dictionary * dict) { uint32_t * ret = NULL; int i = 0; struct fd_list * li; TRACE_ENTRY(); /* Acquire the read lock */ CHECK_POSIX_DO( pthread_rwlock_rdlock(&dict->dict_lock), return NULL ); /* Allocate an array to contain all the elements */ CHECK_MALLOC_DO( ret = calloc( dict->dict_count[DICT_VENDOR] + 1, sizeof(uint32_t) ), goto out ); /* Copy the vendors IDs */ for (li = dict->dict_vendors.list[0].next; li != &(dict->dict_vendors.list[0]); li = li->next) { ret[i] = _O(li->o)->data.vendor.vendor_id; i++; ASSERT( i <= dict->dict_count[DICT_VENDOR] ); } out: /* Release the lock */ CHECK_POSIX_DO( pthread_rwlock_unlock(&dict->dict_lock), return NULL ); return ret; } /* Return the location of the cb list for an object, after checking its type */ int fd_dict_disp_cb(enum dict_object_type type, struct dict_object *obj, struct fd_list ** cb_list) { TRACE_ENTRY("%d %p %p", type, obj, cb_list); CHECK_PARAMS( verify_object(obj) ); CHECK_PARAMS( _OBINFO(obj).type == type ); CHECK_PARAMS( cb_list ); *cb_list = &obj->disp_cbs; return 0; } int fd_dict_get_error_cmd(struct dictionary * dict, struct dict_object **obj) { TRACE_ENTRY("%p %p", dict, obj); CHECK_PARAMS( dict && (dict->dict_eyec == DICT_EYECATCHER) && obj ); *obj = &dict->dict_cmd_error; return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdproto/dictionary_functions.c000066400000000000000000000277241333553357400256340ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2015, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdproto-internal.h" #include /* This file contains helpers functions to be reused as callbacks in the struct dict_type_data structure. There are three callbacks there: - type_encode : - type_interpret : Those two callbacks allow to manipulate more natural structures of data in the code, and to map transparently these natural structures with the AVP-encoded format by calling the functions msg_avp_value_encode or msg_avp_value_interpret. - type_dump : This callback if provided gives a more human-readable debug information. */ /****************************/ /* Address AVP type */ /****************************/ /* The interpret and encode functions work with a "struct sockaddr_storage" pointer for mapping the contents of the AVP */ int fd_dictfct_Address_encode(void * data, union avp_value * avp_value) { sSS * ss = (sSS *) data; uint16_t AddressType = 0; size_t size = 0; unsigned char * buf = NULL; TRACE_ENTRY("%p %p", data, avp_value); CHECK_PARAMS( data && avp_value ); switch (ss->ss_family) { case AF_INET: { /* We are encoding an IP address */ sSA4 * sin = (sSA4 *)ss; AddressType = 1;/* see http://www.iana.org/assignments/address-family-numbers/ */ size = 6; /* 2 for AddressType + 4 for data */ CHECK_MALLOC( buf = malloc(size) ); /* may not work because of alignment: *(uint32_t *)(buf+2) = htonl(sin->sin_addr.s_addr); */ memcpy(buf + 2, &sin->sin_addr.s_addr, 4); } break; case AF_INET6: { /* We are encoding an IPv6 address */ sSA6 * sin6 = (sSA6 *)ss; AddressType = 2;/* see http://www.iana.org/assignments/address-family-numbers/ */ size = 18; /* 2 for AddressType + 16 for data */ CHECK_MALLOC( buf = malloc(size) ); /* The order is already good here */ memcpy(buf + 2, &sin6->sin6_addr.s6_addr, 16); } break; default: CHECK_PARAMS( AddressType = 0 ); } *(uint16_t *)buf = htons(AddressType); avp_value->os.len = size; avp_value->os.data = buf; return 0; } int fd_dictfct_Address_interpret(union avp_value * avp_value, void * interpreted) { uint16_t AddressType = 0; unsigned char * buf; TRACE_ENTRY("%p %p", avp_value, interpreted); CHECK_PARAMS( avp_value && interpreted && (avp_value->os.len >= 2) ); AddressType = ntohs(*(uint16_t *)avp_value->os.data); buf = &avp_value->os.data[2]; switch (AddressType) { case 1 /* IP */: { sSA4 * sin = (sSA4 *)interpreted; CHECK_PARAMS( avp_value->os.len == 6 ); sin->sin_family = AF_INET; /* sin->sin_addr.s_addr = ntohl( * (uint32_t *) buf); -- may not work because of bad alignment */ memcpy(&sin->sin_addr.s_addr, buf, 4); } break; case 2 /* IP6 */: { sSA6 * sin6 = (sSA6 *)interpreted; CHECK_PARAMS( avp_value->os.len == 18 ); sin6->sin6_family = AF_INET6; memcpy(&sin6->sin6_addr.s6_addr, buf, 16); } break; default: CHECK_PARAMS( AddressType = 0 ); } return 0; } /* Dump the content of an Address AVP */ DECLARE_FD_DUMP_PROTOTYPE(fd_dictfct_Address_dump, union avp_value * avp_value) { union { sSA sa; sSS ss; sSA4 sin; sSA6 sin6; } s; uint16_t fam; FD_DUMP_HANDLE_OFFSET(); memset(&s, 0, sizeof(s)); /* The first two octets represent the address family, http://www.iana.org/assignments/address-family-numbers/ */ if (avp_value->os.len < 2) { CHECK_MALLOC_DO( fd_dump_extend(FD_DUMP_STD_PARAMS, "[invalid length: %zd]", avp_value->os.len), return NULL); return *buf; } /* Following octets are the address in network byte order already */ fam = avp_value->os.data[0] << 8 | avp_value->os.data[1]; switch (fam) { case 1: /* IP */ s.sa.sa_family = AF_INET; if ((avp_value->os.len != 6) && (avp_value->os.len != 8)) { CHECK_MALLOC_DO( fd_dump_extend(FD_DUMP_STD_PARAMS, "[invalid IP length: %zd]", avp_value->os.len), return NULL); return *buf; } memcpy(&s.sin.sin_addr.s_addr, avp_value->os.data + 2, 4); if (avp_value->os.len == 8) memcpy(&s.sin.sin_port, avp_value->os.data + 6, 2); break; case 2: /* IP6 */ s.sa.sa_family = AF_INET6; if ((avp_value->os.len != 18) && (avp_value->os.len != 20)) { CHECK_MALLOC_DO( fd_dump_extend(FD_DUMP_STD_PARAMS, "[invalid IP6 length: %zd]", avp_value->os.len), return NULL); return *buf; } memcpy(&s.sin6.sin6_addr.s6_addr, avp_value->os.data + 2, 16); if (avp_value->os.len == 20) memcpy(&s.sin6.sin6_port, avp_value->os.data + 18, 2); break; case 8: /* E.164 */ CHECK_MALLOC_DO( fd_dump_extend(FD_DUMP_STD_PARAMS, "%.*s", (int)(avp_value->os.len-2), avp_value->os.data+2), return NULL); return *buf; default: CHECK_MALLOC_DO( fd_dump_extend(FD_DUMP_STD_PARAMS, "[unsupported family: 0x%hx]", fam), return NULL); return *buf; } return fd_sa_dump(FD_DUMP_STD_PARAMS, &s.sa, NI_NUMERICHOST); } /*******************************/ /* UTF8String AVP type */ /*******************************/ /* Dump the AVP in a natural human-readable format. This dumps the complete length of the AVP, it is up to the caller to truncate if needed */ DECLARE_FD_DUMP_PROTOTYPE(fd_dictfct_UTF8String_dump, union avp_value * avp_value) { size_t l; FD_DUMP_HANDLE_OFFSET(); l = avp_value->os.len; /* Just in case the string ends in invalid UTF-8 chars, we shorten it */ while ((l > 0) && (avp_value->os.data[l - 1] & 0x80)) { /* this byte is start or cont. of multibyte sequence, as we do not know the next byte we need to delete it. */ l--; if (avp_value->os.data[l] & 0x40) break; /* This was a start byte, we can stop the loop */ } CHECK_MALLOC_DO( fd_dump_extend(FD_DUMP_STD_PARAMS, "\"%.*s\"", (int)l, (char *)avp_value->os.data), return NULL); return *buf; } /*******************************/ /* Time AVP type */ /*******************************/ /* The interpret and encode functions work with a "time_t" pointer for mapping the contents of the AVP */ /* Unix Epoch starts 1970-01-01, NTP 0 is at 1900-01-01 */ #define DIFF_EPOCH_TO_NTP ((365*(1970-1900) + 17ul) * 24 * 60 * 60) static int diameter_string_to_time_t(const char *str, size_t len, time_t *result) { time_t time_stamp; CHECK_PARAMS(len == 4); time_stamp = (((unsigned long)(str[0]&0xff))<<24) + ((str[1]&0xff)<<16) + ((str[2]&0xff)<<8) + ((str[3]&0xff)); time_stamp -= DIFF_EPOCH_TO_NTP; #ifdef FIX__NEEDED_FOR_YEAR_2036_AND_LATER /* NTP overflows in 2036; after that, values start at zero again */ #define NTP_OVERFLOW_CORRECTION (0x100000000ull) /* XXX: debug and find correct conversion */ if (str[0] & 0x80 == 0x00) { time_stamp += NTP_OVERFLOW_CORRECTION; } #endif *result = time_stamp; return 0; } static int time_t_to_diameter_string(time_t time_stamp, char **result) { uint64_t out = time_stamp; char *conv; /* XXX: 2036 fix */ out += DIFF_EPOCH_TO_NTP; CHECK_PARAMS( (out >> 32) == 0); CHECK_MALLOC(conv=(char *)malloc(5)); conv[0] = (out>>24) & 0xff; conv[1] = (out>>16) & 0xff; conv[2] = (out>> 8) & 0xff; conv[3] = out & 0xff; conv[4] = '\0'; *result = conv; return 0; } int fd_dictfct_Time_encode(void * data, union avp_value * avp_value) { char * buf; size_t len; TRACE_ENTRY("%p %p", data, avp_value); CHECK_PARAMS( data && avp_value ); CHECK_FCT( time_t_to_diameter_string( *((time_t *)data), &buf) ); /* FIXME: return len from the function above? */ len = 4; avp_value->os.len = len; avp_value->os.data = (uint8_t *)buf; return 0; } int fd_dictfct_Time_interpret(union avp_value * avp_value, void * interpreted) { TRACE_ENTRY("%p %p", avp_value, interpreted); CHECK_PARAMS( avp_value && interpreted ); return diameter_string_to_time_t((const char *)avp_value->os.data, avp_value->os.len, interpreted); } static void _format_offs (long offset, char *buf) { int offs_hours, offs_minutes, sgn = 1; if (offset < 0) { offset = -offset; sgn = 1; } offs_hours = (int)(offset/3600); offs_minutes = (offset%3600)/60; char* s = buf; *(s++) = sgn == 1 ? '+' : '-'; *(s++) = (char)(offs_hours/10) + '0'; *(s++) = offs_hours%10 + '0'; if (offs_minutes == 0) { *(s++) = '\0'; } else { *(s++) = (char)(offs_minutes/10) + '0'; *(s++) = offs_minutes%10 + '0'; *(s++) = '\0'; } } DECLARE_FD_DUMP_PROTOTYPE(fd_dictfct_Time_dump, union avp_value * avp_value) { time_t val; struct tm conv; char tz_buf[7]; FD_DUMP_HANDLE_OFFSET(); if (avp_value->os.len != 4) { CHECK_MALLOC_DO( fd_dump_extend(FD_DUMP_STD_PARAMS, "[invalid length: %zd]", avp_value->os.len), return NULL); return *buf; } if (diameter_string_to_time_t((char *)avp_value->os.data, avp_value->os.len, &val) != 0) { CHECK_MALLOC_DO( fd_dump_extend(FD_DUMP_STD_PARAMS, "[time conversion error]"), return NULL); return *buf; } CHECK_MALLOC_DO( localtime_r(&val, &conv), return NULL); _format_offs(conv.tm_gmtoff, tz_buf); CHECK_MALLOC_DO( fd_dump_extend(FD_DUMP_STD_PARAMS, "%d%02d%02dT%02d%02d%02d%s", conv.tm_year+1900, conv.tm_mon+1, conv.tm_mday, conv.tm_hour, conv.tm_min, conv.tm_sec, tz_buf), return NULL); return *buf; } /* Check that a given AVP value contains all the characters from data in the same order */ static char error_message[80]; int fd_dictfct_CharInOS_check(void * data, union avp_value * val, char ** error_msg) { char * inChar = data; char * inData = (char *)val->os.data; int i = 0; CHECK_PARAMS(data); while (*inChar != '\0') { while (i < val->os.len) { if (*inChar == inData[i++]) { inChar++; break; } } if (i >= val->os.len) break; } if (*inChar == '\0') return 0; if (error_msg) { snprintf(error_message, sizeof(error_message), "Could not find '%c' in AVP", *inChar); *error_msg = error_message; } return EBADMSG; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdproto/dispatch.c000066400000000000000000000205441333553357400231670ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdproto-internal.h" /* The dispatch module in the library is quite simple: callbacks are saved in a global list * in no particular order. In addition, they are also linked from the dictionary objects they * refer to. */ /* Protection for the lists managed in this module. */ pthread_rwlock_t fd_disp_lock = PTHREAD_RWLOCK_INITIALIZER; /* List of all registered handlers -- useful if we want to cleanup properly at some point... */ static struct fd_list all_handlers = FD_LIST_INITIALIZER( all_handlers ); /* List of handlers registered for DISP_HOW_ANY. Other handlers are stored in the dictionary */ static struct fd_list any_handlers = FD_LIST_INITIALIZER( any_handlers ); /* The structure to store a callback */ struct disp_hdl { int eyec; /* Eye catcher, DISP_EYEC */ struct fd_list all; /* link in the all_handlers list */ struct fd_list parent;/* link in dictionary cb_list or in any_handlers */ enum disp_how how; /* Copy of registration parameter */ struct disp_when when; /* Copy of registration parameter */ int (*cb)( struct msg **, struct avp *, struct session *, void *, enum disp_action *); /* The callback itself */ void *opaque; /* opaque data passed back to the callback */ }; #define DISP_EYEC 0xD15241C1 #define VALIDATE_HDL( _hdl ) \ ( ( ( _hdl ) != NULL ) && ( ((struct disp_hdl *)( _hdl ))->eyec == DISP_EYEC ) ) /**************************************************************************************/ /* Call CBs from a given list (any_handlers if cb_list is NULL) -- must have locked fd_disp_lock before */ int fd_disp_call_cb_int( struct fd_list * cb_list, struct msg ** msg, struct avp *avp, struct session *sess, enum disp_action *action, struct dict_object * obj_app, struct dict_object * obj_cmd, struct dict_object * obj_avp, struct dict_object * obj_enu, char ** drop_reason, struct msg ** drop_msg) { struct fd_list * senti, *li; int r; TRACE_ENTRY("%p %p %p %p %p %p %p %p %p", cb_list, msg, avp, sess, action, obj_app, obj_cmd, obj_avp, obj_enu); CHECK_PARAMS(msg && action); senti = cb_list; if (!senti) senti = &any_handlers; for (li = senti->next; li != senti; li = li->next) { struct disp_hdl * hdl = (struct disp_hdl *)(li->o); TRACE_DEBUG(ANNOYING, "when: %p %p %p %p", hdl->when.app, hdl->when.command, hdl->when.avp, hdl->when.value); /* Check this handler matches this message / avp */ if (hdl->when.app && (hdl->when.app != obj_app)) continue; if (hdl->when.command && (hdl->when.command != obj_cmd)) continue; if (hdl->when.avp && (hdl->when.avp != obj_avp)) continue; if (hdl->when.value && (hdl->when.value != obj_enu)) continue; /* We have a match, the cb must be called. */ CHECK_FCT_DO( (r = (*hdl->cb)(msg, avp, sess, hdl->opaque, action)), { *drop_reason = "Internal error: a DISPATCH callback returned an error"; *drop_msg = *msg; *msg = NULL; } ); if (*action != DISP_ACT_CONT) break; if ( *msg == NULL ) break; } /* We're done on this list */ return 0; } /**************************************************************************************/ /* Create a new handler and link it */ int fd_disp_register ( int (*cb)( struct msg **, struct avp *, struct session *, void *, enum disp_action *), enum disp_how how, struct disp_when * when, void * opaque, struct disp_hdl ** handle ) { struct fd_list * cb_list = NULL; struct disp_hdl * new; struct dict_object * type_enum = NULL, * type_avp; struct dictionary * dict = NULL; TRACE_ENTRY("%p %d %p %p", cb, how, when, handle); CHECK_PARAMS( cb && ( (how == DISP_HOW_ANY) || when )); switch (how) { case DISP_HOW_ANY: cb_list = &any_handlers; break; case DISP_HOW_APPID: CHECK_FCT( fd_dict_disp_cb(DICT_APPLICATION, when->app, &cb_list) ); break; case DISP_HOW_CC: CHECK_FCT( fd_dict_disp_cb(DICT_COMMAND, when->command, &cb_list) ); break; case DISP_HOW_AVP_ENUMVAL: CHECK_FCT( fd_dict_disp_cb(DICT_ENUMVAL, when->value, &cb_list) ); /* cb_list is then overwritten */ CHECK_FCT( fd_dict_getdict(when->value, &dict) ); CHECK_FCT( fd_dict_search(dict, DICT_TYPE, TYPE_OF_ENUMVAL, when->value, &type_enum, EINVAL) ); case DISP_HOW_AVP: CHECK_FCT( fd_dict_disp_cb(DICT_AVP, when->avp, &cb_list) ); if (dict) { CHECK_FCT( fd_dict_search(dict, DICT_TYPE, TYPE_OF_AVP, when->avp, &type_avp, EINVAL) ); if (type_enum) { CHECK_PARAMS( type_enum == type_avp ); } } break; default: CHECK_PARAMS(how = 0); } /* We might further check optional fields, but we trust the caller ^^ */ /* Create the new handler */ CHECK_MALLOC( new = malloc( sizeof(struct disp_hdl) ) ); memset(new, 0, sizeof(struct disp_hdl)); new->eyec = DISP_EYEC; fd_list_init(&new->all, new); fd_list_init(&new->parent, new); new->how = how; switch (how) { case DISP_HOW_ANY: /* there is no "when" in that case */ break; case DISP_HOW_AVP_ENUMVAL: new->when.value = when->value; case DISP_HOW_AVP: new->when.avp = when->avp; case DISP_HOW_CC: new->when.command = when->command; case DISP_HOW_APPID: new->when.app = when->app; } new->cb = cb; new->opaque = opaque; /* Now, link this new element in the appropriate lists */ CHECK_POSIX( pthread_rwlock_wrlock(&fd_disp_lock) ); fd_list_insert_before(&all_handlers, &new->all); fd_list_insert_before(cb_list, &new->parent); CHECK_POSIX( pthread_rwlock_unlock(&fd_disp_lock) ); /* We're done */ if (handle) *handle = new; return 0; } /* Delete a handler */ int fd_disp_unregister ( struct disp_hdl ** handle, void ** opaque ) { struct disp_hdl * del; TRACE_ENTRY("%p", handle); CHECK_PARAMS( handle && VALIDATE_HDL(*handle) ); del = *handle; *handle = NULL; CHECK_POSIX( pthread_rwlock_wrlock(&fd_disp_lock) ); fd_list_unlink(&del->all); fd_list_unlink(&del->parent); CHECK_POSIX( pthread_rwlock_unlock(&fd_disp_lock) ); if (opaque) *opaque = del->opaque; free(del); return 0; } /* Delete all handlers */ void fd_disp_unregister_all ( void ) { TRACE_ENTRY(""); while (!FD_IS_LIST_EMPTY(&all_handlers)) { CHECK_FCT_DO( fd_disp_unregister((void *)&(all_handlers.next->o), NULL), /* continue */ ); } return; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdproto/fdproto-internal.h000066400000000000000000000067631333553357400246730ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* This file contains the definitions for internal use in the freeDiameter protocol library */ #ifndef _LIBFDPROTO_INTERNAL_H #define _LIBFDPROTO_INTERNAL_H #include #include /* Internal to the library */ extern const char * type_base_name[]; void fd_msg_eteid_init(void); int fd_sess_init(void); void fd_sess_fini(void); /* Iterator on the rules of a parent object */ int fd_dict_iterate_rules ( struct dict_object *parent, void * data, int (*cb)(void *, struct dict_rule_data *) ); /* Dispatch / messages / dictionary API */ int fd_dict_disp_cb(enum dict_object_type type, struct dict_object *obj, struct fd_list ** cb_list); DECLARE_FD_DUMP_PROTOTYPE(fd_dict_dump_avp_value, union avp_value *avp_value, struct dict_object * model, int indent, int header); int fd_disp_call_cb_int( struct fd_list * cb_list, struct msg ** msg, struct avp *avp, struct session *sess, enum disp_action *action, struct dict_object * obj_app, struct dict_object * obj_cmd, struct dict_object * obj_avp, struct dict_object * obj_enu, char ** drop_reason, struct msg ** drop_msg); extern pthread_rwlock_t fd_disp_lock; /* Messages / sessions API */ int fd_sess_reclaim_msg ( struct session ** session ); #endif /* _LIBFDPROTO_INTERNAL_H */ nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdproto/fifo.c000066400000000000000000000517531333553357400223210ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* FIFO queues module. * * The threads that call these functions must be in the cancellation state PTHREAD_CANCEL_ENABLE and type PTHREAD_CANCEL_DEFERRED. * This is the default state and type on thread creation. * * In order to destroy properly a queue, the application must: * -> shutdown any process that can add into the queue first. * -> pthread_cancel any thread that could be waiting on the queue. * -> consume any element that is in the queue, using fd_qu_tryget_int. * -> then destroy the queue using fd_mq_del. */ #include "fdproto-internal.h" /* Definition of a FIFO queue object */ struct fifo { int eyec; /* An eye catcher, also used to check a queue is valid. FIFO_EYEC */ pthread_mutex_t mtx; /* Mutex protecting this queue */ pthread_cond_t cond_pull; /* condition variable for pulling threads */ pthread_cond_t cond_push; /* condition variable for pushing threads */ struct fd_list list; /* sentinel for the list of elements */ int count; /* number of objects in the list */ int thrs; /* number of threads waiting for a new element (when count is 0) */ int max; /* maximum number of items to accept if not 0 */ int thrs_push; /* number of threads waitnig to push an item */ uint16_t high; /* High level threshold (see libfreeDiameter.h for details) */ uint16_t low; /* Low level threshhold */ void *data; /* Opaque pointer for threshold callbacks */ void (*h_cb)(struct fifo *, void **); /* The callbacks */ void (*l_cb)(struct fifo *, void **); int highest;/* The highest count value for which h_cb has been called */ int highest_ever; /* The max count value this queue has reached (for tweaking) */ long long total_items; /* Cumulated number of items that went through this fifo (excluding current count), always increasing. */ struct timespec total_time; /* Cumulated time all items spent in this queue, including blocking time (always growing, use deltas for monitoring) */ struct timespec blocking_time; /* Cumulated time threads trying to post new items were blocked (queue full). */ struct timespec last_time; /* For the last element retrieved from the queue, how long it take between posting (including blocking) and poping */ }; struct fifo_item { struct fd_list item; struct timespec posted_on; }; /* The eye catcher value */ #define FIFO_EYEC 0xe7ec1130 /* Macro to check a pointer */ #define CHECK_FIFO( _queue ) (( (_queue) != NULL) && ( (_queue)->eyec == FIFO_EYEC) ) /* Create a new queue, with max number of items -- use 0 for no max */ int fd_fifo_new ( struct fifo ** queue, int max ) { struct fifo * new; TRACE_ENTRY( "%p", queue ); CHECK_PARAMS( queue ); /* Create a new object */ CHECK_MALLOC( new = malloc (sizeof (struct fifo) ) ); /* Initialize the content */ memset(new, 0, sizeof(struct fifo)); new->eyec = FIFO_EYEC; CHECK_POSIX( pthread_mutex_init(&new->mtx, NULL) ); CHECK_POSIX( pthread_cond_init(&new->cond_pull, NULL) ); CHECK_POSIX( pthread_cond_init(&new->cond_push, NULL) ); new->max = max; fd_list_init(&new->list, NULL); /* We're done */ *queue = new; return 0; } /* Dump the content of a queue */ DECLARE_FD_DUMP_PROTOTYPE(fd_fifo_dump, char * name, struct fifo * queue, fd_fifo_dump_item_cb dump_item) { FD_DUMP_HANDLE_OFFSET(); if (name) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "'%s'(@%p): ", name, queue), return NULL); } else { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "{fifo}(@%p): ", queue), return NULL); } if (!CHECK_FIFO( queue )) { return fd_dump_extend(FD_DUMP_STD_PARAMS, "INVALID/NULL"); } CHECK_POSIX_DO( pthread_mutex_lock( &queue->mtx ), /* continue */ ); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "items:%d,%d,%d threads:%d,%d stats:%lld/%ld.%06ld,%ld.%06ld,%ld.%06ld thresholds:%d,%d,%d,%p,%p,%p", queue->count, queue->highest_ever, queue->max, queue->thrs, queue->thrs_push, queue->total_items,(long)queue->total_time.tv_sec,(long)(queue->total_time.tv_nsec/1000),(long)queue->blocking_time.tv_sec,(long)(queue->blocking_time.tv_nsec/1000),(long)queue->last_time.tv_sec,(long)(queue->last_time.tv_nsec/1000), queue->high, queue->low, queue->highest, queue->h_cb, queue->l_cb, queue->data), goto error); if (dump_item) { struct fd_list * li; int i = 0; for (li = queue->list.next; li != &queue->list; li = li->next) { struct fifo_item * fi = (struct fifo_item *)li; CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "\n [#%i](@%p)@%ld.%06ld: ", i++, fi->item.o, (long)fi->posted_on.tv_sec,(long)(fi->posted_on.tv_nsec/1000)), goto error); CHECK_MALLOC_DO( (*dump_item)(FD_DUMP_STD_PARAMS, fi->item.o), goto error); } } CHECK_POSIX_DO( pthread_mutex_unlock( &queue->mtx ), /* continue */ ); return *buf; error: CHECK_POSIX_DO( pthread_mutex_unlock( &queue->mtx ), /* continue */ ); return NULL; } /* Delete a queue. It must be empty. */ int fd_fifo_del ( struct fifo ** queue ) { struct fifo * q; int loops = 0; TRACE_ENTRY( "%p", queue ); CHECK_PARAMS( queue && CHECK_FIFO( *queue ) ); q = *queue; CHECK_POSIX( pthread_mutex_lock( &q->mtx ) ); if ((q->count != 0) || (q->data != NULL)) { TRACE_DEBUG(INFO, "The queue cannot be destroyed (%d, %p)", q->count, q->data); CHECK_POSIX_DO( pthread_mutex_unlock( &q->mtx ), /* no fallback */ ); return EINVAL; } /* Ok, now invalidate the queue */ q->eyec = 0xdead; /* Have all waiting threads return an error */ while (q->thrs) { CHECK_POSIX( pthread_mutex_unlock( &q->mtx )); CHECK_POSIX( pthread_cond_signal(&q->cond_pull) ); usleep(1000); CHECK_POSIX( pthread_mutex_lock( &q->mtx ) ); ASSERT( ++loops < 20 ); /* detect infinite loops */ } /* sanity check */ ASSERT(FD_IS_LIST_EMPTY(&q->list)); /* And destroy it */ CHECK_POSIX( pthread_mutex_unlock( &q->mtx ) ); CHECK_POSIX_DO( pthread_cond_destroy( &q->cond_pull ), ); CHECK_POSIX_DO( pthread_cond_destroy( &q->cond_push ), ); CHECK_POSIX_DO( pthread_mutex_destroy( &q->mtx ), ); free(q); *queue = NULL; return 0; } /* Move the content of old into new, and update loc_update atomically. We leave the old queue empty but valid */ int fd_fifo_move ( struct fifo * old, struct fifo * new, struct fifo ** loc_update ) { int loops = 0; TRACE_ENTRY("%p %p %p", old, new, loc_update); CHECK_PARAMS( CHECK_FIFO( old ) && CHECK_FIFO( new )); CHECK_PARAMS( ! old->data ); if (new->high) { TODO("Implement support for thresholds in fd_fifo_move..."); } /* Update loc_update */ if (loc_update) *loc_update = new; /* Lock the queues */ CHECK_POSIX( pthread_mutex_lock( &old->mtx ) ); CHECK_PARAMS_DO( (! old->thrs_push), { pthread_mutex_unlock( &old->mtx ); return EINVAL; } ); CHECK_POSIX( pthread_mutex_lock( &new->mtx ) ); /* Any waiting thread on the old queue returns an error */ old->eyec = 0xdead; while (old->thrs) { CHECK_POSIX( pthread_mutex_unlock( &old->mtx )); CHECK_POSIX( pthread_cond_signal( &old->cond_pull ) ); usleep(1000); CHECK_POSIX( pthread_mutex_lock( &old->mtx ) ); ASSERT( loops < 20 ); /* detect infinite loops */ } /* Move all data from old to new */ fd_list_move_end( &new->list, &old->list ); if (old->count && (!new->count)) { CHECK_POSIX( pthread_cond_signal(&new->cond_pull) ); } new->count += old->count; /* Reset old */ old->count = 0; old->eyec = FIFO_EYEC; /* Merge the stats in the new queue */ new->total_items += old->total_items; old->total_items = 0; new->total_time.tv_nsec += old->total_time.tv_nsec; new->total_time.tv_sec += old->total_time.tv_sec + (new->total_time.tv_nsec / 1000000000); new->total_time.tv_nsec %= 1000000000; old->total_time.tv_nsec = 0; old->total_time.tv_sec = 0; new->blocking_time.tv_nsec += old->blocking_time.tv_nsec; new->blocking_time.tv_sec += old->blocking_time.tv_sec + (new->blocking_time.tv_nsec / 1000000000); new->blocking_time.tv_nsec %= 1000000000; old->blocking_time.tv_nsec = 0; old->blocking_time.tv_sec = 0; /* Unlock, we're done */ CHECK_POSIX( pthread_mutex_unlock( &new->mtx ) ); CHECK_POSIX( pthread_mutex_unlock( &old->mtx ) ); return 0; } /* Get the information on the queue */ int fd_fifo_getstats( struct fifo * queue, int * current_count, int * limit_count, int * highest_count, long long * total_count, struct timespec * total, struct timespec * blocking, struct timespec * last) { TRACE_ENTRY( "%p %p %p %p %p %p %p %p", queue, current_count, limit_count, highest_count, total_count, total, blocking, last); /* Check the parameters */ CHECK_PARAMS( CHECK_FIFO( queue ) ); /* lock the queue */ CHECK_POSIX( pthread_mutex_lock( &queue->mtx ) ); if (current_count) *current_count = queue->count; if (limit_count) *limit_count = queue->max; if (highest_count) *highest_count = queue->highest_ever; if (total_count) *total_count = queue->total_items; if (total) memcpy(total, &queue->total_time, sizeof(struct timespec)); if (blocking) memcpy(blocking, &queue->blocking_time, sizeof(struct timespec)); if (last) memcpy(last, &queue->last_time, sizeof(struct timespec)); /* Unlock */ CHECK_POSIX( pthread_mutex_unlock( &queue->mtx ) ); /* Done */ return 0; } /* alternate version with no error checking */ int fd_fifo_length ( struct fifo * queue ) { if ( !CHECK_FIFO( queue ) ) return 0; return queue->count; /* Let's hope it's read atomically, since we are not locking... */ } /* Set the thresholds of the queue */ int fd_fifo_setthrhd ( struct fifo * queue, void * data, uint16_t high, void (*h_cb)(struct fifo *, void **), uint16_t low, void (*l_cb)(struct fifo *, void **) ) { TRACE_ENTRY( "%p %p %hu %p %hu %p", queue, data, high, h_cb, low, l_cb ); /* Check the parameters */ CHECK_PARAMS( CHECK_FIFO( queue ) && (high > low) && (queue->data == NULL) ); /* lock the queue */ CHECK_POSIX( pthread_mutex_lock( &queue->mtx ) ); /* Save the values */ queue->high = high; queue->low = low; queue->data = data; queue->h_cb = h_cb; queue->l_cb = l_cb; /* Unlock */ CHECK_POSIX( pthread_mutex_unlock( &queue->mtx ) ); /* Done */ return 0; } /* This handler is called when a thread is blocked on a queue, and cancelled */ static void fifo_cleanup_push(void * queue) { struct fifo * q = (struct fifo *)queue; TRACE_ENTRY( "%p", queue ); /* The thread has been cancelled, therefore it does not wait on the queue anymore */ q->thrs_push--; /* Now unlock the queue, and we're done */ CHECK_POSIX_DO( pthread_mutex_unlock( &q->mtx ), /* nothing */ ); /* End of cleanup handler */ return; } /* Post a new item in the queue */ int fd_fifo_post_internal ( struct fifo * queue, void ** item, int skip_max ) { struct fifo_item * new; int call_cb = 0; struct timespec posted_on, queued_on; /* Get the timing of this call */ CHECK_SYS( clock_gettime(CLOCK_REALTIME, &posted_on) ); /* lock the queue */ CHECK_POSIX( pthread_mutex_lock( &queue->mtx ) ); if ((!skip_max) && (queue->max)) { while (queue->count >= queue->max) { int ret = 0; /* We have to wait for an item to be pulled */ queue->thrs_push++ ; pthread_cleanup_push( fifo_cleanup_push, queue); ret = pthread_cond_wait( &queue->cond_push, &queue->mtx ); pthread_cleanup_pop(0); queue->thrs_push-- ; ASSERT( ret == 0 ); } } /* Create a new list item */ CHECK_MALLOC_DO( new = malloc (sizeof (struct fifo_item)) , { pthread_mutex_unlock( &queue->mtx ); return ENOMEM; } ); fd_list_init(&new->item, *item); *item = NULL; /* Add the new item at the end */ fd_list_insert_before( &queue->list, &new->item); queue->count++; if (queue->highest_ever < queue->count) queue->highest_ever = queue->count; if (queue->high && ((queue->count % queue->high) == 0)) { call_cb = 1; queue->highest = queue->count; } /* store timing */ memcpy(&new->posted_on, &posted_on, sizeof(struct timespec)); /* update queue timing info "blocking time" */ { long long blocked_ns; CHECK_SYS( clock_gettime(CLOCK_REALTIME, &queued_on) ); blocked_ns = (queued_on.tv_sec - posted_on.tv_sec) * 1000000000; blocked_ns += (queued_on.tv_nsec - posted_on.tv_nsec); blocked_ns += queue->blocking_time.tv_nsec; queue->blocking_time.tv_sec += blocked_ns / 1000000000; queue->blocking_time.tv_nsec = blocked_ns % 1000000000; } /* Signal if threads are asleep */ if (queue->thrs > 0) { CHECK_POSIX( pthread_cond_signal(&queue->cond_pull) ); } if (queue->thrs_push > 0) { /* cascade */ CHECK_POSIX( pthread_cond_signal(&queue->cond_push) ); } /* Unlock */ CHECK_POSIX( pthread_mutex_unlock( &queue->mtx ) ); /* Call high-watermark cb as needed */ if (call_cb && queue->h_cb) (*queue->h_cb)(queue, &queue->data); /* Done */ return 0; } /* Post a new item in the queue */ int fd_fifo_post_int ( struct fifo * queue, void ** item ) { TRACE_ENTRY( "%p %p", queue, item ); /* Check the parameters */ CHECK_PARAMS( CHECK_FIFO( queue ) && item && *item ); return fd_fifo_post_internal ( queue,item, 0 ); } /* Post a new item in the queue, not blocking */ int fd_fifo_post_noblock ( struct fifo * queue, void ** item ) { TRACE_ENTRY( "%p %p", queue, item ); /* Check the parameters */ CHECK_PARAMS( CHECK_FIFO( queue ) && item && *item ); return fd_fifo_post_internal ( queue,item, 1 ); } /* Pop the first item from the queue */ static void * mq_pop(struct fifo * queue) { void * ret = NULL; struct fifo_item * fi; struct timespec now; ASSERT( ! FD_IS_LIST_EMPTY(&queue->list) ); fi = (struct fifo_item *)(queue->list.next); ret = fi->item.o; fd_list_unlink(&fi->item); queue->count--; queue->total_items++; /* Update the timings */ CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &now), goto skip_timing ); { long long elapsed = (now.tv_sec - fi->posted_on.tv_sec) * 1000000000; elapsed += now.tv_nsec - fi->posted_on.tv_nsec; queue->last_time.tv_sec = elapsed / 1000000000; queue->last_time.tv_nsec = elapsed % 1000000000; elapsed += queue->total_time.tv_nsec; queue->total_time.tv_sec += elapsed / 1000000000; queue->total_time.tv_nsec = elapsed % 1000000000; } skip_timing: free(fi); if (queue->thrs_push) { CHECK_POSIX_DO( pthread_cond_signal( &queue->cond_push ), ); } return ret; } /* Check if the low watermark callback must be called. */ static __inline__ int test_l_cb(struct fifo * queue) { if ((queue->high == 0) || (queue->low == 0) || (queue->l_cb == 0)) return 0; if (((queue->count % queue->high) == queue->low) && (queue->highest > queue->count)) { queue->highest -= queue->high; return 1; } return 0; } /* Try poping an item */ int fd_fifo_tryget_int ( struct fifo * queue, void ** item ) { int wouldblock = 0; int call_cb = 0; TRACE_ENTRY( "%p %p", queue, item ); /* Check the parameters */ CHECK_PARAMS( CHECK_FIFO( queue ) && item ); /* lock the queue */ CHECK_POSIX( pthread_mutex_lock( &queue->mtx ) ); /* Check queue status */ if (queue->count > 0) { got_item: /* There are elements in the queue, so pick the first one */ *item = mq_pop(queue); call_cb = test_l_cb(queue); } else { if (queue->thrs_push > 0) { /* A thread is trying to push something, let's give it a chance */ CHECK_POSIX( pthread_mutex_unlock( &queue->mtx ) ); CHECK_POSIX( pthread_cond_signal( &queue->cond_push ) ); usleep(1000); CHECK_POSIX( pthread_mutex_lock( &queue->mtx ) ); if (queue->count > 0) goto got_item; } wouldblock = 1; *item = NULL; } /* Unlock */ CHECK_POSIX( pthread_mutex_unlock( &queue->mtx ) ); /* Call low watermark callback as needed */ if (call_cb) (*queue->l_cb)(queue, &queue->data); /* Done */ return wouldblock ? EWOULDBLOCK : 0; } /* This handler is called when a thread is blocked on a queue, and cancelled */ static void fifo_cleanup(void * queue) { struct fifo * q = (struct fifo *)queue; TRACE_ENTRY( "%p", queue ); /* The thread has been cancelled, therefore it does not wait on the queue anymore */ q->thrs--; /* Now unlock the queue, and we're done */ CHECK_POSIX_DO( pthread_mutex_unlock( &q->mtx ), /* nothing */ ); /* End of cleanup handler */ return; } /* The internal function for fd_fifo_timedget and fd_fifo_get */ static int fifo_tget ( struct fifo * queue, void ** item, int istimed, const struct timespec *abstime) { int call_cb = 0; int ret = 0; /* Check the parameters */ CHECK_PARAMS( CHECK_FIFO( queue ) && item && (abstime || !istimed) ); /* Initialize the return value */ *item = NULL; /* lock the queue */ CHECK_POSIX( pthread_mutex_lock( &queue->mtx ) ); awaken: /* Check queue status */ if (!CHECK_FIFO( queue )) { /* The queue is being destroyed */ CHECK_POSIX( pthread_mutex_unlock( &queue->mtx ) ); TRACE_DEBUG(FULL, "The queue is being destroyed -> EPIPE"); return EPIPE; } if (queue->count > 0) { /* There are items in the queue, so pick the first one */ *item = mq_pop(queue); call_cb = test_l_cb(queue); } else { /* We have to wait for a new item */ queue->thrs++ ; pthread_cleanup_push( fifo_cleanup, queue); if (istimed) { ret = pthread_cond_timedwait( &queue->cond_pull, &queue->mtx, abstime ); } else { ret = pthread_cond_wait( &queue->cond_pull, &queue->mtx ); } pthread_cleanup_pop(0); queue->thrs-- ; if (ret == 0) goto awaken; /* test for spurious wake-ups */ /* otherwise (ETIMEDOUT / other error) just continue */ } /* Unlock */ CHECK_POSIX( pthread_mutex_unlock( &queue->mtx ) ); /* Call low watermark callback as needed */ if (call_cb) (*queue->l_cb)(queue, &queue->data); /* Done */ return ret; } /* Get the next available item, block until there is one */ int fd_fifo_get_int ( struct fifo * queue, void ** item ) { TRACE_ENTRY( "%p %p", queue, item ); return fifo_tget(queue, item, 0, NULL); } /* Get the next available item, block until there is one, or the timeout expires */ int fd_fifo_timedget_int ( struct fifo * queue, void ** item, const struct timespec *abstime ) { TRACE_ENTRY( "%p %p %p", queue, item, abstime ); return fifo_tget(queue, item, 1, abstime); } /* Test if data is available in the queue, without pulling it */ int fd_fifo_select ( struct fifo * queue, const struct timespec *abstime ) { int ret = 0; TRACE_ENTRY( "%p %p", queue, abstime ); CHECK_PARAMS_DO( CHECK_FIFO( queue ), return -EINVAL ); /* lock the queue */ CHECK_POSIX_DO( pthread_mutex_lock( &queue->mtx ), return -__ret__ ); awaken: ret = (queue->count > 0 ) ? queue->count : 0; if ((ret == 0) && (abstime != NULL)) { /* We have to wait for a new item */ queue->thrs++ ; pthread_cleanup_push( fifo_cleanup, queue); ret = pthread_cond_timedwait( &queue->cond_pull, &queue->mtx, abstime ); pthread_cleanup_pop(0); queue->thrs-- ; if (ret == 0) goto awaken; /* test for spurious wake-ups */ if (ret == ETIMEDOUT) ret = 0; else ret = -ret; } /* Unlock */ CHECK_POSIX_DO( pthread_mutex_unlock( &queue->mtx ), return -__ret__ ); return ret; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdproto/init.c000066400000000000000000000057561333553357400223430ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdproto-internal.h" /* function to free the threadnames */ static void freelogstr(void * str) { if (TRACE_BOOL(ANNOYING)) { if (str) { fd_log_debug("(Thread '%s' terminating)", (char *)str); } } free(str); } /* Initialize library variables and threads */ int fd_libproto_init() { int ret = 0; /* Create the thread key that contains thread name for debug messages */ ret = pthread_key_create(&fd_log_thname, freelogstr); if (ret != 0) { fprintf(stderr, "Error initializing the libfreeDiameter library: %s\n", strerror(ret) ); return ret; } /* Initialize the modules that need it */ fd_msg_eteid_init(); CHECK_FCT( fd_sess_init() ); return 0; } /* Stop all threads created in the library */ void fd_libproto_fini(void) { fd_sess_fini(); } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdproto/lists.c000066400000000000000000000125061333553357400225250ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdproto-internal.h" /* Initialize a list element */ void fd_list_init ( struct fd_list * list, void * obj ) { memset(list, 0, sizeof(struct fd_list)); list->next = list; list->prev = list; list->head = list; list->o = obj; } #define CHECK_SINGLE( li ) { \ ASSERT( ((struct fd_list *)(li))->next == (li) ); \ ASSERT( ((struct fd_list *)(li))->prev == (li) ); \ ASSERT( ((struct fd_list *)(li))->head == (li) ); \ } /* insert after a reference, checks done */ static void list_insert_after( struct fd_list * ref, struct fd_list * item ) { item->prev = ref; item->next = ref->next; item->head = ref->head; ref->next->prev = item; ref->next = item; } /* insert after a reference */ void fd_list_insert_after ( struct fd_list * ref, struct fd_list * item ) { ASSERT(item != NULL); ASSERT(ref != NULL); CHECK_SINGLE ( item ); ASSERT(ref->head != item); list_insert_after(ref, item); } /* Move all elements of list senti at the end of list ref */ void fd_list_move_end(struct fd_list * ref, struct fd_list * senti) { struct fd_list * li; ASSERT(ref->head == ref); ASSERT(senti->head == senti); if (senti->next == senti) return; for (li = senti->next; li != senti; li = li->next) li->head = ref; senti->next->prev = ref->prev; ref->prev->next = senti->next; senti->prev->next = ref; ref->prev = senti->prev; senti->prev = senti; senti->next = senti; } /* insert before a reference, checks done */ static void list_insert_before ( struct fd_list * ref, struct fd_list * item ) { item->prev = ref->prev; item->next = ref; item->head = ref->head; ref->prev->next = item; ref->prev = item; } /* insert before a reference */ void fd_list_insert_before ( struct fd_list * ref, struct fd_list * item ) { ASSERT(item != NULL); ASSERT(ref != NULL); CHECK_SINGLE ( item ); ASSERT(ref->head != item); list_insert_before(ref, item); } /* Insert an item in an ordered list -- ordering function provided. If duplicate object found, it is returned in ref_duplicate */ int fd_list_insert_ordered( struct fd_list * head, struct fd_list * item, int (*cmp_fct)(void *, void *), void ** ref_duplicate) { struct fd_list * ptr = head; int cmp; /* Some debug sanity checks */ ASSERT(head != NULL); ASSERT(item != NULL); ASSERT(cmp_fct != NULL); ASSERT(head->head == head); CHECK_SINGLE ( item ); /* loop in the list */ while (ptr->next != head) { /* Compare the object to insert with the next object in list */ cmp = cmp_fct( item->o, ptr->next->o ); if (!cmp) { /* An element with the same key already exists */ if (ref_duplicate != NULL) *ref_duplicate = ptr->next->o; return EEXIST; } if (cmp < 0) break; /* We must insert the element here */ ptr = ptr->next; } /* Now insert the element between ptr and ptr->next */ list_insert_after( ptr, item ); /* Ok */ return 0; } /* Unlink an object */ void fd_list_unlink ( struct fd_list * item ) { ASSERT(item != NULL); if (item->head == item) return; /* unlink */ item->next->prev = item->prev; item->prev->next = item->next; /* sanitize */ item->next = item; item->prev = item; item->head = item; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdproto/log.c000066400000000000000000000233021333553357400221440ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2015, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdproto-internal.h" #include pthread_mutex_t fd_log_lock = PTHREAD_MUTEX_INITIALIZER; pthread_key_t fd_log_thname; int fd_g_debug_lvl = FD_LOG_NOTICE; static void fd_internal_logger( int, const char *, va_list ); static int use_colors = 0; /* 0: not init, 1: yes, 2: no */ /* These may be used to pass specific debug requests via the command-line parameters */ char * fd_debug_one_function = NULL; char * fd_debug_one_file = NULL; /* Useless function, only to ease setting up a breakpoint in gdb (break fd_breakhere) -- use TRACE_HERE */ int fd_breaks = 0; int fd_breakhere(void) { return ++fd_breaks; } /* Allow passing of the log and debug information from base stack to extensions */ void (*fd_logger)( int loglevel, const char * format, va_list args ) = fd_internal_logger; /* Register an external call back for tracing and debug */ int fd_log_handler_register( void (*logger)(int loglevel, const char * format, va_list args) ) { CHECK_PARAMS( logger ); if ( fd_logger != fd_internal_logger ) { return EALREADY; /* only one registration allowed */ } else { fd_logger = logger; } return 0; } /* Implement a simple reset function here */ int fd_log_handler_unregister ( void ) { fd_logger = fd_internal_logger; return 0; /* Successfull in all cases. */ } static void fd_cleanup_mutex_silent( void * mutex ) { (void)pthread_mutex_unlock((pthread_mutex_t *)mutex); } static void fd_internal_logger( int printlevel, const char *format, va_list ap ) { char buf[25]; /* Do we need to trace this ? */ if (printlevel < fd_g_debug_lvl) return; /* add timestamp */ printf("%s ", fd_log_time(NULL, buf, sizeof(buf), #if (defined(DEBUG) && defined(DEBUG_WITH_META)) 1, 1 #else /* (defined(DEBUG) && defined(DEBUG_WITH_META)) */ 0, 0 #endif /* (defined(DEBUG) && defined(DEBUG_WITH_META)) */ )); /* Use colors on stdout ? */ if (!use_colors) { if (isatty(STDOUT_FILENO)) use_colors = 1; else use_colors = 2; } switch(printlevel) { case FD_LOG_ANNOYING: printf("%s A ", (use_colors == 1) ? "\e[0;37m" : ""); break; case FD_LOG_DEBUG: printf("%s DBG ", (use_colors == 1) ? "\e[0;37m" : ""); break; case FD_LOG_NOTICE: printf("%sNOTI ", (use_colors == 1) ? "\e[1;37m" : ""); break; case FD_LOG_ERROR: printf("%sERROR ", (use_colors == 1) ? "\e[0;31m" : ""); break; case FD_LOG_FATAL: printf("%sFATAL! ", (use_colors == 1) ? "\e[0;31m" : ""); break; default: printf("%s ??? ", (use_colors == 1) ? "\e[0;31m" : ""); } vprintf(format, ap); if (use_colors == 1) printf("\e[00m"); printf("\n"); fflush(stdout); } /* Log a debug message */ void fd_log ( int loglevel, const char * format, ... ) { va_list ap; (void)pthread_mutex_lock(&fd_log_lock); pthread_cleanup_push(fd_cleanup_mutex_silent, &fd_log_lock); va_start(ap, format); fd_logger(loglevel, format, ap); va_end(ap); pthread_cleanup_pop(0); (void)pthread_mutex_unlock(&fd_log_lock); } /* Log a debug message */ void fd_log_va ( int loglevel, const char * format, va_list args ) { (void)pthread_mutex_lock(&fd_log_lock); pthread_cleanup_push(fd_cleanup_mutex_silent, &fd_log_lock); fd_logger(loglevel, format, args); pthread_cleanup_pop(0); (void)pthread_mutex_unlock(&fd_log_lock); } /* Function to set the thread's friendly name */ void fd_log_threadname ( const char * name ) { void * val = NULL; TRACE_ENTRY("%p(%s)", name, name?:"/"); /* First, check if a value is already assigned to the current thread */ val = pthread_getspecific(fd_log_thname); if (TRACE_BOOL(ANNOYING)) { if (val) { fd_log_debug("(Thread '%s' renamed to '%s')", (char *)val, name?:"(nil)"); } else { fd_log_debug("(Thread %p named '%s')", (void *)pthread_self(), name?:"(nil)"); } } if (val != NULL) { free(val); } /* Now create the new string */ if (name == NULL) { CHECK_POSIX_DO( pthread_setspecific(fd_log_thname, NULL), /* continue */); return; } CHECK_MALLOC_DO( val = strdup(name), return ); CHECK_POSIX_DO( pthread_setspecific(fd_log_thname, val), /* continue */); return; } /* Write time into a buffer */ char * fd_log_time ( struct timespec * ts, char * buf, size_t len, int incl_date, int incl_ms ) { int ret; size_t offset = 0; struct timespec tp; struct tm tm; /* Get current time */ if (!ts) { ret = clock_gettime(CLOCK_REALTIME, &tp); if (ret != 0) { snprintf(buf, len, "%s", strerror(ret)); return buf; } ts = &tp; } offset += strftime(buf + offset, len - offset, incl_date?"%D,%T":"%T", localtime_r( &ts->tv_sec , &tm )); if (incl_ms) offset += snprintf(buf + offset, len - offset, ".%6.6ld", ts->tv_nsec / 1000); return buf; } static size_t sys_mempagesz = 0; static size_t get_mempagesz(void) { if (!sys_mempagesz) { sys_mempagesz = sysconf(_SC_PAGESIZE); /* We alloc buffer by memory pages for efficiency. This can be readjusted if too memory consuming */ if (sys_mempagesz <= 0) sys_mempagesz = 256; /* default size if above call failed */ } return sys_mempagesz; } /* Helper function for fd_*_dump. Prints the format string from 'offset' into '*buf', extends if needed. The location of buf can be updated by this function. */ char * fd_dump_extend(char ** buf, size_t *len, size_t *offset, const char * format, ... ) { va_list ap; int to_write; size_t o = 0; size_t mempagesz = get_mempagesz(); /* we do not TRACE_ENTRY this one on purpose */ CHECK_PARAMS_DO(buf && len, return NULL); if (*buf == NULL) { CHECK_MALLOC_DO(*buf = malloc(mempagesz), return NULL); *len = mempagesz; } if (offset) o = *offset; va_start(ap, format); to_write = vsnprintf(*buf + o, *len - o, format, ap); va_end(ap); if (to_write + o >= *len) { /* There was no room in the buffer, we extend and redo */ size_t new_len = (((to_write + o) / mempagesz) + 1) * mempagesz; CHECK_MALLOC_DO(*buf = realloc(*buf, new_len), return NULL); *len = new_len; va_start(ap, format); to_write = vsnprintf(*buf + o, *len - o, format, ap); va_end(ap); } if (offset) *offset += to_write; return *buf; } char * fd_dump_extend_hexdump(char ** buf, size_t *len, size_t *offset, uint8_t *data, size_t datalen, size_t trunc, size_t wrap ) { int truncated = 0; size_t towrite = 0; size_t o = 0; int i; char * p; size_t mempagesz = get_mempagesz(); #define TRUNK_MARK "[...]" CHECK_PARAMS_DO(buf && len && data, return NULL); if (trunc && (datalen > trunc)) { datalen = trunc; truncated = 1; } towrite = datalen * 2; if (wrap) towrite += datalen / wrap; /* add 1 '\n' every wrap byte */ if (truncated) towrite += CONSTSTRLEN(TRUNK_MARK); if (offset) o = *offset; if (*buf == NULL) { /* Directly allocate the size we need */ *len = (((towrite + o) / mempagesz) + 1 ) * mempagesz; CHECK_MALLOC_DO(*buf = malloc(*len), return NULL); } else if ((towrite + o) >= *len) { /* There is no room in the buffer, we extend and redo */ size_t new_len = (((towrite + o) / mempagesz) + 1) * mempagesz; CHECK_MALLOC_DO(*buf = realloc(*buf, new_len), return NULL); *len = new_len; } p = *buf + o; for (i = 0; i < datalen; i++) { sprintf(p, "%02hhX", data[i]); p+=2; if ((wrap) && ((i+1) % wrap == 0)) { *p++='\n'; *p ='\0'; /* we want to ensure the buffer is always 0-terminated */ } } if (truncated) memcpy(p, TRUNK_MARK, CONSTSTRLEN(TRUNK_MARK)); if (offset) *offset += towrite; return *buf; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdproto/messages.c000066400000000000000000002703751333553357400232100ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2015, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Messages module. * * This module allows to manipulate the msg and avp structures that represents a Diameter message in memory. */ #include "fdproto-internal.h" #include /* Type of object */ enum msg_objtype { MSG_MSG = 1, MSG_AVP }; /* Chaining of elements as a free hierarchy */ struct msg_avp_chain { struct fd_list chaining; /* Chaining information at this level. */ struct fd_list children; /* sentinel for the children of this object */ enum msg_objtype type; /* Type of this object, _MSG_MSG or _MSG_AVP */ }; /* Return the chain information from an AVP or MSG. Since it's the first field, we just cast */ #define _C(_x) ((struct msg_avp_chain *)(_x)) /* Some details about chaining: * * A message is made of a header ( msg ) and 0 or more AVPs ( avp ). * The structure is a kind of tree, where some AVPs (grouped AVPs) can contain other AVPs. * Example: * msg * |-avp * |-gavp * | |-avp * | |-avp * | \-avp * |-avp * \-avp * * Each item (msg or avp) structure begins with a msg_avp_chain structure. * The element at the top of the hierarchy (msg in our example) has all the fields of its "chaining" equal to the same value. * * All elements at the same level are linked by their "chaining" list. * The "children" list is the sentinel for the lists of children of this element. */ /* The following definitions are used to recognize objects in memory. */ #define MSG_MSG_EYEC (0x11355463) #define MSG_AVP_EYEC (0x11355467) /* The following structure represents an AVP instance. */ struct avp { struct msg_avp_chain avp_chain; /* Chaining information of this AVP */ int avp_eyec; /* Must be equal to MSG_AVP_EYEC */ struct dict_object *avp_model; /* If not NULL, pointer to the dictionary object of this avp */ struct { avp_code_t mnf_code; vendor_id_t mnf_vendor; } avp_model_not_found; /* When model resolution has failed, store a copy of the data here to avoid searching again */ struct avp_hdr avp_public; /* AVP data that can be managed by other modules */ uint8_t *avp_source; /* If the message was parsed from a buffer, pointer to the AVP data start in the buffer. */ uint8_t *avp_rawdata; /* when the data can not be interpreted, the raw data is copied here. The header is not part of it. */ size_t avp_rawlen; /* The length of the raw buffer. */ union avp_value avp_storage; /* To avoid many alloc/free, store the integer values here and set avp_public.avp_data to &storage */ int avp_mustfreeos; /* 1 if an octetstring is malloc'd in avp_storage and must be freed. */ }; /* Macro to compute the AVP header size */ #define AVPHDRSZ_NOVEND 8 #define AVPHDRSZ_VENDOR 12 #define GETAVPHDRSZ( _flag ) ((_flag & AVP_FLAG_VENDOR) ? AVPHDRSZ_VENDOR : AVPHDRSZ_NOVEND) /* Macro to cast a msg_avp_t */ #define _A(_x) ((struct avp *)(_x)) /* Check the type and eyecatcher */ #define CHECK_AVP(_x) ((_x) && (_C(_x)->type == MSG_AVP) && (_A(_x)->avp_eyec == MSG_AVP_EYEC)) /* The following structure represents an instance of a message (command and children AVPs). */ struct msg { struct msg_avp_chain msg_chain; /* List of the AVPs in the message */ int msg_eyec; /* Must be equal to MSG_MSG_EYEC */ struct dict_object *msg_model; /* If not NULL, pointer to the dictionary object of this message */ struct { command_code_t mnf_code; uint8_t mnf_flags; } msg_model_not_found; /* When model resolution has failed, store a copy of the data here to avoid searching again */ struct msg_hdr msg_public; /* Message data that can be managed by extensions. */ uint8_t *msg_rawbuffer; /* data buffer that was received, saved during fd_msg_parse_buffer and freed in fd_msg_parse_dict */ int msg_routable; /* Is this a routable message? (0: undef, 1: routable, 2: non routable) */ struct msg *msg_query; /* the associated query if the message is a received answer */ int msg_associated; /* and the counter part information in the query, to avoid double free */ struct rt_data *msg_rtdata; /* Routing list for the query */ struct session *msg_sess; /* Cached message session if any */ struct { void (*anscb)(void *, struct msg **); void (*expirecb)(void *, DiamId_t, size_t, struct msg **); void * data; struct timespec timeout; } msg_cb; /* Callback to be called when an answer is received, or timeout expires, if not NULL */ DiamId_t msg_src_id; /* Diameter Id of the peer this message was received from. This string is malloc'd and must be freed */ size_t msg_src_id_len; /* cached length of this string */ struct fd_msg_pmdl msg_pmdl; /* list of permessagedata structures. */ }; /* Macro to compute the message header size */ #define GETMSGHDRSZ() 20 /* Macro to cast a msg_avp_t */ #define _M(_x) ((struct msg *)(_x)) /* Check the type and eyecatcher */ #define CHECK_MSG(_x) ((_x) && (_C(_x)->type == MSG_MSG) && (_M(_x)->msg_eyec == MSG_MSG_EYEC)) #define VALIDATE_OBJ(_x) ( (CHECK_MSG(_x)) || (CHECK_AVP(_x)) ) /* Macro to validate a MSGFL_ value */ #define CHECK_AVPFL(_fl) ( ((_fl) & (- (AVPFL_MAX << 1) )) == 0 ) #define CHECK_MSGFL(_fl) ( ((_fl) & (- (MSGFL_MAX << 1) )) == 0 ) /* initial sizes of AVP from their types, in bytes. */ static int avp_value_sizes[] = { 0, /* AVP_TYPE_GROUPED: size is dynamic */ 0, /* AVP_TYPE_OCTETSTRING: size is dynamic */ 4, /* AVP_TYPE_INTEGER32: size is 32 bits */ 8, /* AVP_TYPE_INTEGER64: size is 64 bits */ 4, /* AVP_TYPE_UNSIGNED32: size is 32 bits */ 8, /* AVP_TYPE_UNSIGNED64: size is 64 bits */ 4, /* AVP_TYPE_FLOAT32: size is 32 bits */ 8 /* AVP_TYPE_FLOAT64: size is 64 bits */ }; #define CHECK_BASETYPE( _type ) ( ((_type) <= AVP_TYPE_MAX) && ((_type) >= 0) ) #define GETINITIALSIZE( _type, _vend ) (avp_value_sizes[ CHECK_BASETYPE(_type) ? (_type) : 0] + GETAVPHDRSZ(_vend)) /* Forward declaration */ static int parsedict_do_msg(struct dictionary * dict, struct msg * msg, int only_hdr, struct fd_pei *error_info); /***************************************************************************************************************/ /* Creating objects */ /* Initialize a msg_avp_chain structure */ static void init_chain(struct msg_avp_chain * chain, int type) { fd_list_init( &chain->chaining, (void *)chain); fd_list_init( &chain->children, (void *)chain); chain->type = type; } /* Initialize a new AVP object */ static void init_avp ( struct avp * avp ) { TRACE_ENTRY("%p", avp); memset(avp, 0, sizeof(struct avp)); init_chain( &avp->avp_chain, MSG_AVP); avp->avp_eyec = MSG_AVP_EYEC; } /* Initialize a new MSG object */ static void init_msg ( struct msg * msg ) { TRACE_ENTRY("%p", msg); memset(msg, 0, sizeof(struct msg)); init_chain( &msg->msg_chain, MSG_MSG); msg->msg_eyec = MSG_MSG_EYEC; fd_list_init(&msg->msg_pmdl.sentinel, NULL); CHECK_POSIX_DO( pthread_mutex_init(&msg->msg_pmdl.lock, NULL), ); } /* Create a new AVP instance */ int fd_msg_avp_new ( struct dict_object * model, int flags, struct avp ** avp ) { struct avp *new = NULL; TRACE_ENTRY("%p %x %p", model, flags, avp); /* Check the parameters */ CHECK_PARAMS( avp && CHECK_AVPFL(flags) ); if (model) { enum dict_object_type dicttype; CHECK_PARAMS( (fd_dict_gettype(model, &dicttype) == 0) && (dicttype == DICT_AVP) ); } /* Create a new object */ CHECK_MALLOC( new = malloc (sizeof(struct avp)) ); /* Initialize the fields */ init_avp(new); if (model) { struct dict_avp_data dictdata; CHECK_FCT_DO( fd_dict_getval(model, &dictdata), { free(new); return __ret__; } ); new->avp_model = model; new->avp_public.avp_code = dictdata.avp_code; new->avp_public.avp_flags = dictdata.avp_flag_val; new->avp_public.avp_len = GETINITIALSIZE(dictdata.avp_basetype, dictdata.avp_flag_val ); new->avp_public.avp_vendor = dictdata.avp_vendor; } if (flags & AVPFL_SET_BLANK_VALUE) { new->avp_public.avp_value = &new->avp_storage; } if (flags & AVPFL_SET_RAWDATA_FROM_AVP) { new->avp_rawlen = (*avp)->avp_public.avp_len - GETAVPHDRSZ( (*avp)->avp_public.avp_flags ); if (new->avp_rawlen) { CHECK_MALLOC_DO( new->avp_rawdata = malloc(new->avp_rawlen), { free(new); return __ret__; } ); memset(new->avp_rawdata, 0x00, new->avp_rawlen); } } /* The new object is ready, return */ *avp = new; return 0; } /* Create a new message instance */ int fd_msg_new ( struct dict_object * model, int flags, struct msg ** msg ) { struct msg * new = NULL; TRACE_ENTRY("%p %x %p", model, flags, msg); /* Check the parameters */ CHECK_PARAMS( msg && CHECK_MSGFL(flags) ); if (model) { enum dict_object_type dicttype; CHECK_PARAMS( (fd_dict_gettype(model, &dicttype) == 0) && (dicttype == DICT_COMMAND) ); } /* Create a new object */ CHECK_MALLOC( new = malloc (sizeof(struct msg)) ); /* Initialize the fields */ init_msg(new); new->msg_public.msg_version = DIAMETER_VERSION; new->msg_public.msg_length = GETMSGHDRSZ(); /* This will be updated later */ if (model) { struct dictionary *dict; struct dict_cmd_data dictdata; struct dict_object *dictappl; CHECK_FCT_DO( fd_dict_getdict(model, &dict), { free(new); return __ret__; } ); CHECK_FCT_DO( fd_dict_getval(model, &dictdata), { free(new); return __ret__; } ); new->msg_model = model; new->msg_public.msg_flags = dictdata.cmd_flag_val; new->msg_public.msg_code = dictdata.cmd_code; /* Initialize application from the parent, if any */ CHECK_FCT_DO( fd_dict_search( dict, DICT_APPLICATION, APPLICATION_OF_COMMAND, model, &dictappl, 0), { free(new); return __ret__; } ); if (dictappl != NULL) { struct dict_application_data appdata; CHECK_FCT_DO( fd_dict_getval(dictappl, &appdata), { free(new); return __ret__; } ); new->msg_public.msg_appl = appdata.application_id; } } if (flags & MSGFL_ALLOC_ETEID) { new->msg_public.msg_eteid = fd_msg_eteid_get(); } /* The new object is ready, return */ *msg = new; return 0; } static int bufferize_avp(unsigned char * buffer, size_t buflen, size_t * offset, struct avp * avp); static int parsebuf_list(unsigned char * buf, size_t buflen, struct fd_list * head); static int parsedict_do_chain(struct dictionary * dict, struct fd_list * head, int mandatory, struct fd_pei *error_info); /* Create answer from a request */ int fd_msg_new_answer_from_req ( struct dictionary * dict, struct msg ** msg, int flags ) { struct dict_object * model = NULL; struct msg *qry, *ans; struct session * sess = NULL; TRACE_ENTRY("%p %x", msg, flags); /* Check the parameters */ CHECK_PARAMS( msg ); qry = *msg; CHECK_PARAMS( CHECK_MSG(qry) && (qry->msg_public.msg_flags & CMD_FLAG_REQUEST) ); if (! (flags & MSGFL_ANSW_NOSID)) { /* Get the session of the message */ CHECK_FCT_DO( fd_msg_sess_get(dict, qry, &sess, NULL), /* ignore an error */ ); } /* Find the model for the answer */ if (flags & MSGFL_ANSW_ERROR) { /* The model is the generic error format */ CHECK_FCT( fd_dict_get_error_cmd(dict, &model) ); } else { /* The model is the answer corresponding to the query. It supposes that these are defined in the dictionary */ CHECK_FCT_DO( parsedict_do_msg( dict, qry, 1, NULL), /* continue */ ); if (qry->msg_model) { CHECK_FCT( fd_dict_search ( dict, DICT_COMMAND, CMD_ANSWER, qry->msg_model, &model, EINVAL ) ); } } /* Create the answer */ CHECK_FCT( fd_msg_new( model, flags, &ans ) ); /* Set informations in the answer as in the query */ ans->msg_public.msg_code = qry->msg_public.msg_code; /* useful for MSGFL_ANSW_ERROR */ ans->msg_public.msg_appl = qry->msg_public.msg_appl; ans->msg_public.msg_eteid = qry->msg_public.msg_eteid; ans->msg_public.msg_hbhid = qry->msg_public.msg_hbhid; /* Add the Session-Id AVP if session is known */ if (sess && dict) { static struct dict_object * sess_id_avp = NULL; os0_t sid; size_t sidlen; struct avp * avp; union avp_value val; if (!sess_id_avp) { CHECK_FCT_DO( fd_dict_search( dict, DICT_AVP, AVP_BY_NAME, "Session-Id", &sess_id_avp, ENOENT), { free(ans); return __ret__; } ); } CHECK_FCT_DO( fd_sess_getsid ( sess, &sid, &sidlen ), { free(ans); return __ret__; } ); CHECK_FCT_DO( fd_msg_avp_new ( sess_id_avp, 0, &avp ), { free(ans); return __ret__; } ); val.os.data = sid; val.os.len = sidlen; CHECK_FCT_DO( fd_msg_avp_setvalue( avp, &val ), { free(avp); free(ans); return __ret__; } ); CHECK_FCT_DO( fd_msg_avp_add( ans, MSG_BRW_FIRST_CHILD, avp ), { free(avp); free(ans); return __ret__; } ); ans->msg_sess = sess; CHECK_FCT_DO( fd_sess_ref_msg(sess), { free(ans); return __ret__; } ); } /* Add all Proxy-Info AVPs from the query if any */ if (! (flags & MSGFL_ANSW_NOPROXYINFO)) { struct avp * avp; struct fd_pei pei; struct fd_list avpcpylist = FD_LIST_INITIALIZER(avpcpylist); CHECK_FCT_DO( fd_msg_browse(qry, MSG_BRW_FIRST_CHILD, &avp, NULL) , { free(ans); return __ret__; } ); while (avp) { if ( (avp->avp_public.avp_code == AC_PROXY_INFO) && (avp->avp_public.avp_vendor == 0) ) { /* We found a Proxy-Info, need to duplicate it in the answer */ /* In order to avoid dealing with all different possibilities of states, we just create a buffer then parse it */ unsigned char * buf = NULL; size_t offset = 0; /* Create a buffer with the content of the AVP. This is easier than going through the list */ CHECK_FCT_DO( fd_msg_update_length(avp), { free(ans); return __ret__; } ); CHECK_MALLOC_DO( buf = malloc(avp->avp_public.avp_len), { free(ans); return __ret__; } ); CHECK_FCT_DO( bufferize_avp(buf, avp->avp_public.avp_len, &offset, avp), { free(buf); free(ans); return __ret__; } ); /* Now we parse this buffer to create a copy AVP */ CHECK_FCT_DO( parsebuf_list(buf, avp->avp_public.avp_len, &avpcpylist), { free(buf); free(ans); return __ret__; } ); /* Parse dictionary objects now to remove the dependency on the buffer */ CHECK_FCT_DO( parsedict_do_chain(dict, &avpcpylist, 0, &pei), { /* leaking the avpcpylist -- this should never happen anyway */ free(buf); free(ans); return __ret__; } ); /* Done for this AVP */ free(buf); /* We move this AVP now so that we do not parse again in next loop */ fd_list_move_end(&ans->msg_chain.children, &avpcpylist); } /* move to next AVP in the message, we can have several Proxy-Info instances */ CHECK_FCT_DO( fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL), { free(ans); return __ret__; } ); } } /* associate with query */ ans->msg_query = qry; qry->msg_associated = 1; /* Done */ *msg = ans; return 0; } /***************************************************************************************************************/ /* Explore a message */ int fd_msg_browse_internal ( msg_or_avp * reference, enum msg_brw_dir dir, msg_or_avp ** found, int * depth ) { struct msg_avp_chain *result = NULL; int diff = 0; struct fd_list *li = NULL; TRACE_ENTRY("%p %d %p %p", reference, dir, found, depth); /* Initialize the "found" result if any */ if (found) *found = NULL; /* Check the parameters */ CHECK_PARAMS( VALIDATE_OBJ(reference) ); TRACE_DEBUG(FCTS, "chaining(%p): nxt:%p prv:%p hea:%p top:%p", &_C(reference)->chaining, _C(reference)->chaining.next, _C(reference)->chaining.prev, _C(reference)->chaining.head, _C(reference)->chaining.o); TRACE_DEBUG(FCTS, "children(%p): nxt:%p prv:%p hea:%p top:%p", &_C(reference)->children, _C(reference)->children.next, _C(reference)->children.prev, _C(reference)->children.head, _C(reference)->children.o); /* Now search */ switch (dir) { case MSG_BRW_NEXT: /* Check the reference is an AVP */ CHECK_PARAMS( _C(reference)->type == MSG_AVP ); li = &_C(reference)->chaining; /* Check if the next element is not the sentinel ( ==> the parent) */ if (li->next != li->head) result = _C(li->next->o); break; case MSG_BRW_PREV: /* Check the reference is an AVP */ CHECK_PARAMS( _C(reference)->type == MSG_AVP ); li = &_C(reference)->chaining; /* Check if the prev element is not the sentinel ( ==> the parent) */ if (li->prev != li->head) result = _C(li->prev->o); break; case MSG_BRW_FIRST_CHILD: li = &_C(reference)->children; if (! FD_IS_LIST_EMPTY(li)) { result = _C(li->next->o); diff = 1; } break; case MSG_BRW_LAST_CHILD: li = &_C(reference)->children; if (! FD_IS_LIST_EMPTY(li)) { result = _C(li->prev->o); diff = 1; } break; case MSG_BRW_PARENT: /* If the object is not chained, it has no parent */ li = &_C(reference)->chaining; if (li != li->head) { /* The sentinel is the parent's children list */ result = _C(li->head->o); diff = -1; } break; case MSG_BRW_WALK: /* First, try to find a child */ li = &_C(reference)->children; if ( ! FD_IS_LIST_EMPTY(li) ) { result = _C(li->next->o); diff = 1; break; } /* Then try to find a "next" at this level or one of the parent's */ li = &_C(reference)->chaining; do { /* If this element has a "next" element, return it */ if (li->next != li->head) { result = _C(li->next->o); break; } /* otherwise, check if we have a parent */ if (li == li->head) { /* no parent */ break; } /* Go to the parent's chaining information and loop */ diff -= 1; li = &_C(li->head->o)->chaining; } while (1); break; default: /* Other directions are invalid */ CHECK_PARAMS( dir = 0 ); } /* Save the found object, if any */ if (found && result) *found = (void *)result; /* Modify the depth according to the walk direction */ if (depth && diff) (*depth) += diff; /* Return ENOENT if found was NULL */ if ((!found) && (!result)) return ENOENT; else return 0; } /* Add an AVP into a tree */ int fd_msg_avp_add ( msg_or_avp * reference, enum msg_brw_dir dir, struct avp *avp) { TRACE_ENTRY("%p %d %p", reference, dir, avp); /* Check the parameters */ CHECK_PARAMS( VALIDATE_OBJ(reference) && CHECK_AVP(avp) && FD_IS_LIST_EMPTY(&avp->avp_chain.chaining) ); /* Now insert */ switch (dir) { case MSG_BRW_NEXT: /* Check the reference is an AVP -- we do not chain AVPs at same level as msgs. */ CHECK_PARAMS( _C(reference)->type == MSG_AVP ); /* Insert the new avp after the reference */ fd_list_insert_after( &_A(reference)->avp_chain.chaining, &avp->avp_chain.chaining ); break; case MSG_BRW_PREV: /* Check the reference is an AVP */ CHECK_PARAMS( _C(reference)->type == MSG_AVP ); /* Insert the new avp before the reference */ fd_list_insert_before( &_A(reference)->avp_chain.chaining, &avp->avp_chain.chaining ); break; case MSG_BRW_FIRST_CHILD: /* Insert the new avp after the children sentinel */ fd_list_insert_after( &_C(reference)->children, &avp->avp_chain.chaining ); break; case MSG_BRW_LAST_CHILD: /* Insert the new avp before the children sentinel */ fd_list_insert_before( &_C(reference)->children, &avp->avp_chain.chaining ); break; default: /* Other directions are invalid */ CHECK_PARAMS( dir = 0 ); } return 0; } /* Search a given AVP model in a message */ int fd_msg_search_avp ( struct msg * msg, struct dict_object * what, struct avp ** avp ) { struct avp * nextavp; struct dict_avp_data dictdata; enum dict_object_type dicttype; TRACE_ENTRY("%p %p %p", msg, what, avp); CHECK_PARAMS( CHECK_MSG(msg) && what ); CHECK_PARAMS( (fd_dict_gettype(what, &dicttype) == 0) && (dicttype == DICT_AVP) ); CHECK_FCT( fd_dict_getval(what, &dictdata) ); /* Loop on all top AVPs */ CHECK_FCT( fd_msg_browse(msg, MSG_BRW_FIRST_CHILD, (void *)&nextavp, NULL) ); while (nextavp) { if ( (nextavp->avp_public.avp_code == dictdata.avp_code) && (nextavp->avp_public.avp_vendor == dictdata.avp_vendor) ) /* always 0 if no V flag */ break; /* Otherwise move to next AVP in the message */ CHECK_FCT( fd_msg_browse(nextavp, MSG_BRW_NEXT, (void *)&nextavp, NULL) ); } if (avp) *avp = nextavp; if (avp && nextavp) { struct dictionary * dict; CHECK_FCT( fd_dict_getdict( what, &dict) ); CHECK_FCT_DO( fd_msg_parse_dict( nextavp, dict, NULL ), /* nothing */ ); } if (avp || nextavp) return 0; else return ENOENT; } /***************************************************************************************************************/ /* Deleting objects */ /* Destroy and free an AVP or message */ static int destroy_obj (struct msg_avp_chain * obj ) { TRACE_ENTRY("%p", obj); /* Check the parameter is a valid object */ CHECK_PARAMS( VALIDATE_OBJ(obj) && FD_IS_LIST_EMPTY( &obj->children ) ); /* Unlink this object if needed */ fd_list_unlink( &obj->chaining ); /* Free the octetstring if needed */ if ((obj->type == MSG_AVP) && (_A(obj)->avp_mustfreeos == 1)) { free(_A(obj)->avp_storage.os.data); } /* Free the rawdata if needed */ if ((obj->type == MSG_AVP) && (_A(obj)->avp_rawdata != NULL)) { free(_A(obj)->avp_rawdata); } if ((obj->type == MSG_MSG) && (_M(obj)->msg_rawbuffer != NULL)) { free(_M(obj)->msg_rawbuffer); } if ((obj->type == MSG_MSG) && (_M(obj)->msg_src_id != NULL)) { free(_M(obj)->msg_src_id); } if ((obj->type == MSG_MSG) && (_M(obj)->msg_rtdata != NULL)) { fd_rtd_free(&_M(obj)->msg_rtdata); } if ((obj->type == MSG_MSG) && (_M(obj)->msg_sess != NULL)) { CHECK_FCT_DO( fd_sess_reclaim_msg ( &_M(obj)->msg_sess ), /* continue */); } if ((obj->type == MSG_MSG) && (_M(obj)->msg_pmdl.sentinel.o != NULL)) { ((void (*)(struct fd_msg_pmdl *))_M(obj)->msg_pmdl.sentinel.o)(&_M(obj)->msg_pmdl); } /* free the object */ free(obj); return 0; } /* Destroy an object and all its children */ static void destroy_tree(struct msg_avp_chain * obj) { struct fd_list *rem; TRACE_ENTRY("%p", obj); /* Destroy any subtree */ while ( (rem = obj->children.next) != &obj->children) destroy_tree(_C(rem->o)); /* Then unlink and destroy the object */ CHECK_FCT_DO( destroy_obj(obj), /* nothing */ ); } /* Free an object and its tree */ int fd_msg_free ( msg_or_avp * object ) { TRACE_ENTRY("%p", object); if (object == NULL) return 0; if (CHECK_MSG(object)) { if (_M(object)->msg_query) { _M(_M(object)->msg_query)->msg_associated = 0; CHECK_FCT( fd_msg_free( _M(object)->msg_query ) ); _M(object)->msg_query = NULL; } else { if (_M(object)->msg_associated) { TRACE_DEBUG(INFO, "Not freeing query %p referenced in an answer (will be freed along the answer).", object); return 0; } } } destroy_tree(_C(object)); return 0; } /***************************************************************************************************************/ /* Debug functions: dumping */ /* messages and AVP formatters */ typedef DECLARE_FD_DUMP_PROTOTYPE( (*msg_dump_formatter_msg), struct msg * msg ); typedef DECLARE_FD_DUMP_PROTOTYPE( (*msg_dump_formatter_avp), struct avp * avp, int level, int first, int last ); /* Core function to process the dumping */ static DECLARE_FD_DUMP_PROTOTYPE( msg_dump_process, msg_dump_formatter_msg msg_format, msg_dump_formatter_avp avp_format, msg_or_avp *obj, struct dictionary *dict, int force_parsing, int recurse ) { FD_DUMP_HANDLE_OFFSET(); if (!VALIDATE_OBJ(obj)) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "INVALID MESSAGE OR AVP @%p", obj), return NULL); return *buf; } if (force_parsing) { (void) fd_msg_parse_dict(obj, dict, NULL); } switch (_C(obj)->type) { case MSG_AVP: CHECK_MALLOC_DO( (*avp_format)(FD_DUMP_STD_PARAMS, (struct avp *)obj, 0, 1, 1), return NULL); break; case MSG_MSG: CHECK_MALLOC_DO( (*msg_format)(FD_DUMP_STD_PARAMS, (struct msg *)obj), return NULL); break; default: ASSERT(0); free(*buf); *buf = NULL; return NULL; } if (recurse) { struct avp * avp = NULL; int first = 1; CHECK_FCT_DO( fd_msg_browse ( obj, MSG_BRW_FIRST_CHILD, &avp, NULL ), avp = NULL ); while (avp) { struct avp * nextavp = NULL; CHECK_FCT_DO( fd_msg_browse ( avp, MSG_BRW_NEXT, &nextavp, NULL ), nextavp = NULL ); CHECK_MALLOC_DO( (*avp_format)(FD_DUMP_STD_PARAMS, avp, 1, first, nextavp ? 0 : 1), return NULL); avp = nextavp; first = 0; }; } return *buf; } /* * Tree View message dump */ static DECLARE_FD_DUMP_PROTOTYPE( msg_format_treeview, struct msg * msg ) { if (!CHECK_MSG(msg)) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "INVALID MESSAGE"), return NULL); return *buf; } if (!msg->msg_model) { if (msg->msg_model_not_found.mnf_code) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "(not found in dictionary)\n"), return NULL); } else { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "(not searched in dictionary)\n"), return NULL); } } else { enum dict_object_type dicttype; struct dict_cmd_data dictdata; if (fd_dict_gettype(msg->msg_model, &dicttype) || (dicttype != DICT_COMMAND)) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "(invalid model information)\n"), return NULL); } else if (fd_dict_getval(msg->msg_model, &dictdata)) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "(error getting model information)\n"), return NULL); } else { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "'%s'\n", dictdata.cmd_name), return NULL); } } CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Version: 0x%02hhX\n", msg->msg_public.msg_version), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Length: %d\n", msg->msg_public.msg_length), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Flags: 0x%02hhX (" DUMP_CMDFL_str ")\n", msg->msg_public.msg_flags, DUMP_CMDFL_val(msg->msg_public.msg_flags)), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Command Code: %u\n", msg->msg_public.msg_code), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " ApplicationId: %d\n", msg->msg_public.msg_appl), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " Hop-by-Hop Identifier: 0x%08X\n", msg->msg_public.msg_hbhid), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " End-to-End Identifier: 0x%08X\n", msg->msg_public.msg_eteid), return NULL); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " {internal data}: src:%s(%zd) rwb:%p rt:%d cb:%p,%p(%p) qry:%p asso:%d sess:%p", msg->msg_src_id?:"(nil)", msg->msg_src_id_len, msg->msg_rawbuffer, msg->msg_routable, msg->msg_cb.anscb, msg->msg_cb.expirecb, msg->msg_cb.data, msg->msg_query, msg->msg_associated, msg->msg_sess), return NULL); return *buf; } static DECLARE_FD_DUMP_PROTOTYPE( avp_format_treeview, struct avp * avp, int level, int first, int last ) { char * name; struct dict_avp_data dictdata; struct dict_avp_data *dictinfo = NULL; struct dict_vendor_data vendordata; struct dict_vendor_data *vendorinfo = NULL; if (level) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "\n"), return NULL); } if (!CHECK_AVP(avp)) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "INVALID AVP"), return NULL); return *buf; } if (level) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "%*sAVP: ", level * 3, ""), return NULL); } if (!avp->avp_model) { if (avp->avp_model_not_found.mnf_code) { name = "(not found in dictionary)"; } else { name = "(not searched in dictionary)"; } } else { enum dict_object_type dicttype; if (fd_dict_gettype(avp->avp_model, &dicttype) || (dicttype != DICT_AVP)) { name = "(invalid model information)"; } else if (fd_dict_getval(avp->avp_model, &dictdata)) { name = "(error getting model information)"; } else { name = dictdata.avp_name; dictinfo = &dictdata; if (avp->avp_public.avp_flags & AVP_FLAG_VENDOR) { struct dictionary * dict; struct dict_object * vendor; if ((!fd_dict_getdict(avp->avp_model, &dict)) && (!fd_dict_search(dict, DICT_VENDOR, VENDOR_OF_AVP, avp->avp_model, &vendor, ENOENT)) && (!fd_dict_getval(vendor, &vendordata))) { vendorinfo = &vendordata; } } } } if (dictinfo) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "'%s'(%u)", name, avp->avp_public.avp_code), return NULL); } else { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "%u%s", avp->avp_public.avp_code, name), return NULL); } if (avp->avp_public.avp_flags & AVP_FLAG_VENDOR) { if (vendorinfo) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " vend='%s'(%u)", vendorinfo->vendor_name, avp->avp_public.avp_vendor), return NULL); } else { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " vend=%u", avp->avp_public.avp_vendor), return NULL); } } CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " l=%d f=" DUMP_AVPFL_str " val=", avp->avp_public.avp_len, DUMP_AVPFL_val(avp->avp_public.avp_flags)), return NULL); if (dictinfo && (dictinfo->avp_basetype == AVP_TYPE_GROUPED)) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "(grouped)"), return NULL); if (level) { struct avp * inavp = NULL; int first = 1; CHECK_FCT_DO( fd_msg_browse ( avp, MSG_BRW_FIRST_CHILD, &inavp, NULL ), inavp = NULL ); while (inavp) { struct avp * nextavp = NULL; CHECK_FCT_DO( fd_msg_browse ( inavp, MSG_BRW_NEXT, &nextavp, NULL ), inavp = NULL ); CHECK_MALLOC_DO( avp_format_treeview(FD_DUMP_STD_PARAMS, inavp, level + 1, first, nextavp ? 0 : 1), return NULL); inavp = nextavp; first = 0; }; } } else { if (avp->avp_public.avp_value) { CHECK_MALLOC_DO( fd_dict_dump_avp_value(FD_DUMP_STD_PARAMS, avp->avp_public.avp_value, avp->avp_model, 0, 0), return NULL); } else if (avp->avp_rawdata) { CHECK_MALLOC_DO( fd_dump_extend_hexdump(FD_DUMP_STD_PARAMS, avp->avp_rawdata, avp->avp_rawlen, 0, 0), return NULL); } else { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "(not set)"), return NULL); } } return *buf; } /* multi-line human-readable dump similar to wireshark output */ DECLARE_FD_DUMP_PROTOTYPE( fd_msg_dump_treeview, msg_or_avp *obj, struct dictionary *dict, int force_parsing, int recurse ) { return msg_dump_process(FD_DUMP_STD_PARAMS, msg_format_treeview, avp_format_treeview, obj, dict, force_parsing, recurse); } /* * One-line dumper for compact but complete traces */ static DECLARE_FD_DUMP_PROTOTYPE( msg_format_full, struct msg * msg ) { int success = 0; struct dict_cmd_data dictdata; if (!CHECK_MSG(msg)) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "INVALID MESSAGE"), return NULL); return *buf; } if (!msg->msg_model) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "(no model) "), return NULL); } else { enum dict_object_type dicttype=0; if (fd_dict_gettype(msg->msg_model, &dicttype) || (dicttype != DICT_COMMAND)) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "(invalid model %d) ", dicttype), return NULL); } else if (fd_dict_getval(msg->msg_model, &dictdata)) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "(error getting model data) "), return NULL); } else { success = 1; } } if (msg->msg_public.msg_appl) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "%s(%u/%u)[" DUMP_CMDFL_str "], Length=%u, Hop-By-Hop-Id=0x%08x, End-to-End=0x%08x", success ? dictdata.cmd_name : "unknown", msg->msg_public.msg_appl, msg->msg_public.msg_code, DUMP_CMDFL_val(msg->msg_public.msg_flags), msg->msg_public.msg_length, msg->msg_public.msg_hbhid, msg->msg_public.msg_eteid), return NULL); } else { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "%s(%u)[" DUMP_CMDFL_str "], Length=%u, Hop-By-Hop-Id=0x%08x, End-to-End=0x%08x", success ? dictdata.cmd_name : "unknown", msg->msg_public.msg_code, DUMP_CMDFL_val(msg->msg_public.msg_flags), msg->msg_public.msg_length, msg->msg_public.msg_hbhid, msg->msg_public.msg_eteid), return NULL); } return *buf; } static DECLARE_FD_DUMP_PROTOTYPE( avp_format_full, struct avp * avp, int level, int first, int last ) { int success = 0; struct dict_avp_data dictdata; if (level) { if ((first) && ((*buf)[*offset - 1] == '=')) { /* We are first AVP of a grouped AVP */ CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "{ "), return NULL); } else { /* We follow another AVP, or a message header */ CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, ", { "), return NULL); } } if (!CHECK_AVP(avp)) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "INVALID AVP"), return NULL); goto end; } if (avp->avp_model) { enum dict_object_type dicttype; if (fd_dict_gettype(avp->avp_model, &dicttype) || (dicttype != DICT_AVP)) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "(invalid model: %d) ", dicttype), return NULL); } else if (fd_dict_getval(avp->avp_model, &dictdata)) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "(error getting model data) "), return NULL); } else { success = 1; } } if (avp->avp_public.avp_flags & AVP_FLAG_VENDOR) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "%s(%u/%u)[" DUMP_AVPFL_str "]=", success ? dictdata.avp_name : "unknown", avp->avp_public.avp_vendor, avp->avp_public.avp_code, DUMP_AVPFL_val(avp->avp_public.avp_flags)), return NULL); } else { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "%s(%u)[" DUMP_AVPFL_str "]=", success ? dictdata.avp_name : "unknown", avp->avp_public.avp_code, DUMP_AVPFL_val(avp->avp_public.avp_flags)), return NULL); } if (success && (dictdata.avp_basetype == AVP_TYPE_GROUPED)) { if (level) { struct avp * inavp = NULL; int first = 1; CHECK_FCT_DO( fd_msg_browse ( avp, MSG_BRW_FIRST_CHILD, &inavp, NULL ), inavp = NULL ); while (inavp) { struct avp * nextavp = NULL; CHECK_FCT_DO( fd_msg_browse ( inavp, MSG_BRW_NEXT, &nextavp, NULL ), inavp = NULL ); CHECK_MALLOC_DO( avp_format_full(FD_DUMP_STD_PARAMS, inavp, level + 1, first, nextavp ? 0 : 1), return NULL); inavp = nextavp; first = 0; }; } } else { if (avp->avp_public.avp_value) { CHECK_MALLOC_DO( fd_dict_dump_avp_value(FD_DUMP_STD_PARAMS, avp->avp_public.avp_value, avp->avp_model, 0, 0), return NULL); } else if (avp->avp_rawdata) { CHECK_MALLOC_DO( fd_dump_extend_hexdump(FD_DUMP_STD_PARAMS, avp->avp_rawdata, avp->avp_rawlen, 0, 0), return NULL); } else { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "(not set)"), return NULL); } } end: if (level) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " }"), return NULL); } return *buf; } /* one-line dump with all the contents of the message */ DECLARE_FD_DUMP_PROTOTYPE( fd_msg_dump_full, msg_or_avp *obj, struct dictionary *dict, int force_parsing, int recurse ) { return msg_dump_process(FD_DUMP_STD_PARAMS, msg_format_full, avp_format_full, obj, dict, force_parsing, recurse); } /* * One-line dumper for compact but complete traces */ static DECLARE_FD_DUMP_PROTOTYPE( msg_format_summary, struct msg * msg ) { if (!CHECK_MSG(msg)) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "INVALID MESSAGE"), return NULL); return *buf; } if (!msg->msg_model) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "(no model)"), return NULL); } else { enum dict_object_type dicttype; struct dict_cmd_data dictdata; if (fd_dict_gettype(msg->msg_model, &dicttype) || (dicttype != DICT_COMMAND) || (fd_dict_getval(msg->msg_model, &dictdata))) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "(model error)"), return NULL); } else { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "'%s'", dictdata.cmd_name), return NULL); } } CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "%u/%u f:" DUMP_CMDFL_str " src:'%s' len:%d", msg->msg_public.msg_appl, msg->msg_public.msg_code, DUMP_CMDFL_val(msg->msg_public.msg_flags), msg->msg_src_id?:"(nil)", msg->msg_public.msg_length), return NULL); return *buf; } static DECLARE_FD_DUMP_PROTOTYPE( avp_format_summary, struct avp * avp, int level, int first, int last ) { char * name; struct dict_avp_data dictdata; struct dict_avp_data *dictinfo = NULL; struct dict_vendor_data vendordata; struct dict_vendor_data *vendorinfo = NULL; if (level) { if (first) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " {"), return NULL); } else { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, ","), return NULL); } } if (!CHECK_AVP(avp)) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "INVALID AVP"), return NULL); goto end; } if (!level) { /* We have been called to explicitely dump this AVP, so we parse its name if available */ if (!avp->avp_model) { name = "(no model)"; } else { enum dict_object_type dicttype; if (fd_dict_gettype(avp->avp_model, &dicttype) || (dicttype != DICT_AVP) || (fd_dict_getval(avp->avp_model, &dictdata))) { name = "(model error)"; } else { name = dictdata.avp_name; dictinfo = &dictdata; if (avp->avp_public.avp_flags & AVP_FLAG_VENDOR) { struct dictionary * dict; struct dict_object * vendor; if ((!fd_dict_getdict(avp->avp_model, &dict)) && (!fd_dict_search(dict, DICT_VENDOR, VENDOR_OF_AVP, avp->avp_model, &vendor, ENOENT)) && (!fd_dict_getval(vendor, &vendordata))) { vendorinfo = &vendordata; } } } } if (dictinfo) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "'%s'(%u)", name, avp->avp_public.avp_code), return NULL); } else { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "%u%s", avp->avp_public.avp_code, name), return NULL); } if (avp->avp_public.avp_flags & AVP_FLAG_VENDOR) { if (vendorinfo) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " V='%s'(%u)", vendorinfo->vendor_name, avp->avp_public.avp_vendor), return NULL); } else { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " V=%u", avp->avp_public.avp_vendor), return NULL); } } CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, " L=%d F=" DUMP_AVPFL_str " V=", avp->avp_public.avp_len, DUMP_AVPFL_val(avp->avp_public.avp_flags)), return NULL); if ((!dictinfo) || (dictinfo->avp_basetype != AVP_TYPE_GROUPED)) { if (avp->avp_public.avp_value) { CHECK_MALLOC_DO( fd_dict_dump_avp_value(FD_DUMP_STD_PARAMS, avp->avp_public.avp_value, avp->avp_model, 0, 0), return NULL); } else if (avp->avp_rawdata) { CHECK_MALLOC_DO( fd_dump_extend_hexdump(FD_DUMP_STD_PARAMS, avp->avp_rawdata, avp->avp_rawlen, 0, 0), return NULL); } else { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "(not set)"), return NULL); } } } else { /* For embedded AVPs, we only display (vendor,) code & length */ if (avp->avp_public.avp_flags & AVP_FLAG_VENDOR) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "V:%u/", avp->avp_public.avp_vendor), return NULL); } CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "C:%u/l:%d", avp->avp_public.avp_code, avp->avp_public.avp_len), return NULL); } end: if ((level) && (last)) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "}"), return NULL); } return *buf; } /* This one only prints a short display, does not go into the complete tree */ DECLARE_FD_DUMP_PROTOTYPE( fd_msg_dump_summary, msg_or_avp *obj, struct dictionary *dict, int force_parsing, int recurse ) { return msg_dump_process(FD_DUMP_STD_PARAMS, msg_format_summary, avp_format_summary, obj, dict, force_parsing, recurse); } /***************************************************************************************************************/ /* Simple meta-data management */ /* Retrieve the model of an object */ int fd_msg_model ( msg_or_avp * reference, struct dict_object ** model ) { TRACE_ENTRY("%p %p", reference, model); /* Check the parameters */ CHECK_PARAMS( model && VALIDATE_OBJ(reference) ); /* copy the model reference */ switch (_C(reference)->type) { case MSG_AVP: *model = _A(reference)->avp_model; break; case MSG_MSG: *model = _M(reference)->msg_model; break; default: CHECK_PARAMS(0); } return 0; } /* Retrieve the address of the msg_public field of a message */ int fd_msg_hdr ( struct msg *msg, struct msg_hdr **pdata ) { TRACE_ENTRY("%p %p", msg, pdata); CHECK_PARAMS( CHECK_MSG(msg) && pdata ); *pdata = &msg->msg_public; return 0; } /* Retrieve the address of the avp_public field of an avp */ int fd_msg_avp_hdr ( struct avp *avp, struct avp_hdr **pdata ) { TRACE_ENTRY("%p %p", avp, pdata); CHECK_PARAMS( CHECK_AVP(avp) && pdata ); *pdata = &avp->avp_public; return 0; } /* Associate answers and queries */ int fd_msg_answ_associate( struct msg * answer, struct msg * query ) { TRACE_ENTRY( "%p %p", answer, query ); CHECK_PARAMS( CHECK_MSG(answer) && CHECK_MSG(query) && (answer->msg_query == NULL ) ); answer->msg_query = query; query->msg_associated = 1; return 0; } int fd_msg_answ_getq( struct msg * answer, struct msg ** query ) { TRACE_ENTRY( "%p %p", answer, query ); CHECK_PARAMS( CHECK_MSG(answer) && query ); *query = answer->msg_query; return 0; } int fd_msg_answ_detach( struct msg * answer ) { TRACE_ENTRY( "%p", answer ); CHECK_PARAMS( CHECK_MSG(answer) ); answer->msg_query->msg_associated = 0; answer->msg_query = NULL; return 0; } /* Associate / get answer callbacks */ int fd_msg_anscb_associate( struct msg * msg, void ( *anscb)(void *, struct msg **), void * data, void (*expirecb)(void *, DiamId_t, size_t, struct msg **), const struct timespec *timeout ) { TRACE_ENTRY("%p %p %p %p", msg, anscb, expirecb, data); /* Check the parameters */ CHECK_PARAMS( CHECK_MSG(msg) ); if (! (msg->msg_public.msg_flags & CMD_FLAG_REQUEST )) return anscb ? EINVAL : 0; /* we associate with requests only */ CHECK_PARAMS( (anscb == NULL) || (msg->msg_cb.anscb == NULL) ); /* We are not overwriting a cb */ CHECK_PARAMS( (expirecb == NULL) || (msg->msg_cb.expirecb == NULL) ); /* We are not overwriting a cb */ /* Associate callback and data with the message, if any */ if (anscb) { msg->msg_cb.anscb = anscb; msg->msg_cb.data = data; } if (expirecb) { msg->msg_cb.expirecb = expirecb; if (timeout) { memcpy(&msg->msg_cb.timeout, timeout, sizeof(struct timespec)); } } return 0; } /* Remove a callback */ int fd_msg_anscb_reset(struct msg * msg, int clear_anscb, int clear_expirecb) { TRACE_ENTRY("%p %d %d", msg, clear_anscb, clear_expirecb); /* Check the parameters */ CHECK_PARAMS( CHECK_MSG(msg) ); if (clear_anscb) { msg->msg_cb.anscb = NULL; msg->msg_cb.data = NULL; } if (clear_expirecb) { msg->msg_cb.expirecb = NULL; memset(&msg->msg_cb.timeout, 0, sizeof(struct timespec)); } return 0; } int fd_msg_anscb_get( struct msg * msg, void (**anscb)(void *, struct msg **), void (**expirecb)(void *, DiamId_t, size_t, struct msg **), void ** data ) { TRACE_ENTRY("%p %p %p %p", msg, anscb, expirecb, data); /* Check the parameters */ CHECK_PARAMS( CHECK_MSG(msg) ); /* Copy the result */ if (anscb) *anscb = msg->msg_cb.anscb; if (data) *data = msg->msg_cb.data; if (expirecb) *expirecb = msg->msg_cb.expirecb; return 0; } struct timespec *fd_msg_anscb_gettimeout( struct msg * msg ) { TRACE_ENTRY("%p", msg); /* Check the parameters */ CHECK_PARAMS_DO( CHECK_MSG(msg), return NULL ); if (!msg->msg_cb.timeout.tv_sec) { return NULL; } return &msg->msg_cb.timeout; } /* Associate routing lists */ int fd_msg_rt_associate( struct msg * msg, struct rt_data * rtd ) { TRACE_ENTRY( "%p %p", msg, rtd ); CHECK_PARAMS( CHECK_MSG(msg) && rtd ); msg->msg_rtdata = rtd; return 0; } int fd_msg_rt_get( struct msg * msg, struct rt_data ** rtd ) { TRACE_ENTRY( "%p %p", msg, rtd ); CHECK_PARAMS( CHECK_MSG(msg) && rtd ); *rtd = msg->msg_rtdata; return 0; } /* Find if a message is routable */ int fd_msg_is_routable ( struct msg * msg ) { TRACE_ENTRY("%p", msg); CHECK_PARAMS_DO( CHECK_MSG(msg), return 0 /* pretend the message is not routable */ ); if ( ! msg->msg_routable ) { /* To define if a message is routable, we rely on the "PXY" flag (for application 0). */ msg->msg_routable = ((msg->msg_public.msg_appl != 0) || (msg->msg_public.msg_flags & CMD_FLAG_PROXIABLE)) ? 1 : 2; /* Note : the 'real' criteria according to the Diameter I-D is that the message is routable if and only if the "Destination-Realm" AVP is required by the command ABNF. We could make a test for this here, but it's more computational work and our test seems accurate (until proven otherwise...) */ } return (msg->msg_routable == 1) ? 1 : 0; } /* cache the dictionary model for next function to avoid re-searching at every incoming message */ static struct dict_object *cached_avp_rr_model = NULL; static struct dictionary *cached_avp_rr_dict = NULL; static pthread_mutex_t cached_avp_rr_lock = PTHREAD_MUTEX_INITIALIZER; /* Associate source peer */ int fd_msg_source_set( struct msg * msg, DiamId_t diamid, size_t diamidlen ) { TRACE_ENTRY( "%p %p %zd", msg, diamid, diamidlen); /* Check we received a valid message */ CHECK_PARAMS( CHECK_MSG(msg) ); /* Cleanup any previous source */ free(msg->msg_src_id); msg->msg_src_id = NULL; msg->msg_src_id_len = 0; /* If the request is to cleanup the source, we are done */ if (diamid == NULL) { return 0; } /* Otherwise save the new informations */ CHECK_MALLOC( msg->msg_src_id = os0dup(diamid, diamidlen) ); msg->msg_src_id_len = diamidlen; /* done */ return 0; } /* Associate source peer */ int fd_msg_source_setrr( struct msg * msg, DiamId_t diamid, size_t diamidlen, struct dictionary * dict ) { struct dict_object *avp_rr_model = NULL; avp_code_t code = AC_ROUTE_RECORD; struct avp *avp; union avp_value val; TRACE_ENTRY( "%p %p %zd %p", msg, diamid, diamidlen, dict); /* Check we received a valid message */ CHECK_PARAMS( CHECK_MSG(msg) && dict ); /* Lock the cached values */ CHECK_POSIX( pthread_mutex_lock(&cached_avp_rr_lock) ); if (cached_avp_rr_dict == dict) { avp_rr_model = cached_avp_rr_model; } CHECK_POSIX( pthread_mutex_unlock(&cached_avp_rr_lock) ); /* If it was not cached */ if (!avp_rr_model) { /* Find the model for Route-Record in the dictionary */ CHECK_FCT( fd_dict_search ( dict, DICT_AVP, AVP_BY_CODE, &code, &avp_rr_model, ENOENT) ); /* Now cache this result */ CHECK_POSIX( pthread_mutex_lock(&cached_avp_rr_lock) ); cached_avp_rr_dict = dict; cached_avp_rr_model = avp_rr_model; CHECK_POSIX( pthread_mutex_unlock(&cached_avp_rr_lock) ); } /* Create the AVP with this model */ CHECK_FCT( fd_msg_avp_new ( avp_rr_model, 0, &avp ) ); /* Set the AVP value with the diameter id */ memset(&val, 0, sizeof(val)); val.os.data = (uint8_t *)diamid; val.os.len = diamidlen; CHECK_FCT( fd_msg_avp_setvalue( avp, &val ) ); /* Add the AVP in the message */ CHECK_FCT( fd_msg_avp_add( msg, MSG_BRW_LAST_CHILD, avp ) ); /* done */ return 0; } int fd_msg_source_get( struct msg * msg, DiamId_t* diamid, size_t * diamidlen ) { TRACE_ENTRY( "%p %p %p", msg, diamid, diamidlen); /* Check we received valid parameters */ CHECK_PARAMS( CHECK_MSG(msg) ); CHECK_PARAMS( diamid ); /* Copy the informations */ *diamid = msg->msg_src_id; if (diamidlen) *diamidlen = msg->msg_src_id_len; /* done */ return 0; } /* Associate a session with a message, use only when the session was just created */ int fd_msg_sess_set(struct msg * msg, struct session * session) { TRACE_ENTRY("%p %p", msg, session); /* Check we received valid parameters */ CHECK_PARAMS( CHECK_MSG(msg) ); CHECK_PARAMS( session ); CHECK_PARAMS( msg->msg_sess == NULL ); msg->msg_sess = session; return 0; } /* Retrieve the session of the message */ int fd_msg_sess_get(struct dictionary * dict, struct msg * msg, struct session ** session, int * new) { struct avp * avp; TRACE_ENTRY("%p %p %p", msg, session, new); /* Check we received valid parameters */ CHECK_PARAMS( CHECK_MSG(msg) ); CHECK_PARAMS( session ); /* If we already resolved the session, just send it back */ if (msg->msg_sess) { *session = msg->msg_sess; if (new) *new = 0; return 0; } /* OK, we have to search for Session-Id AVP -- it is usually the first AVP, but let's be permissive here */ /* -- note: we accept messages that have not yet been dictionary parsed... */ CHECK_FCT( fd_msg_browse(msg, MSG_BRW_FIRST_CHILD, &avp, NULL) ); while (avp) { if ( (avp->avp_public.avp_code == AC_SESSION_ID) && (avp->avp_public.avp_vendor == 0) ) break; /* Otherwise move to next AVP in the message */ CHECK_FCT( fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL) ); } if (!avp) { TRACE_DEBUG(FULL, "No Session-Id AVP found in message %p", msg); *session = NULL; return 0; } if (!avp->avp_model) { CHECK_FCT( fd_msg_parse_dict ( avp, dict, NULL ) ); } ASSERT( avp->avp_public.avp_value ); /* Resolve the session and we are done */ if (avp->avp_public.avp_value->os.len > 0) { CHECK_FCT( fd_sess_fromsid_msg ( avp->avp_public.avp_value->os.data, avp->avp_public.avp_value->os.len, &msg->msg_sess, new) ); *session = msg->msg_sess; } else { TRACE_DEBUG(FULL, "Session-Id AVP with 0-byte length found in message %p", msg); *session = NULL; } return 0; } /* Retrieve the location of the pmd list for the message; return NULL if failed */ struct fd_msg_pmdl * fd_msg_pmdl_get(struct msg * msg) { CHECK_PARAMS_DO( CHECK_MSG(msg), return NULL ); return &msg->msg_pmdl; } /******************* End-to-end counter *********************/ static uint32_t fd_eteid; static pthread_mutex_t fd_eteid_lck = PTHREAD_MUTEX_INITIALIZER; void fd_msg_eteid_init(void) { uint32_t t = (uint32_t)time(NULL); srand48(t); fd_eteid = (t << 20) | ((uint32_t)lrand48() & ( (1 << 20) - 1 )); } uint32_t fd_msg_eteid_get ( void ) { uint32_t ret; CHECK_POSIX_DO( pthread_mutex_lock(&fd_eteid_lck), /* continue */ ); ret = fd_eteid ++; CHECK_POSIX_DO( pthread_mutex_unlock(&fd_eteid_lck), /* continue */ ); return ret; } /***************************************************************************************************************/ /* Manage AVPs values */ /* Set the value of an AVP */ int fd_msg_avp_setvalue ( struct avp *avp, union avp_value *value ) { enum dict_avp_basetype type = -1; TRACE_ENTRY("%p %p", avp, value); /* Check parameter */ CHECK_PARAMS( CHECK_AVP(avp) && avp->avp_model ); /* Retrieve information from the AVP model */ { enum dict_object_type dicttype; struct dict_avp_data dictdata; CHECK_PARAMS( (fd_dict_gettype(avp->avp_model, &dicttype) == 0) && (dicttype == DICT_AVP) ); CHECK_FCT( fd_dict_getval(avp->avp_model, &dictdata) ); type = dictdata.avp_basetype; CHECK_PARAMS( type != AVP_TYPE_GROUPED ); } /* First, clean any previous value */ if (avp->avp_mustfreeos != 0) { free(avp->avp_storage.os.data); avp->avp_mustfreeos = 0; } memset(&avp->avp_storage, 0, sizeof(union avp_value)); /* If the request was to delete a value: */ if (!value) { avp->avp_public.avp_value = NULL; return 0; } /* Now we have to set the value */ memcpy(&avp->avp_storage, value, sizeof(union avp_value)); /* Duplicate an octetstring if needed. */ if (type == AVP_TYPE_OCTETSTRING) { CHECK_MALLOC( avp->avp_storage.os.data = os0dup(value->os.data, value->os.len) ); avp->avp_mustfreeos = 1; } /* Set the data pointer of the public part */ avp->avp_public.avp_value = &avp->avp_storage; return 0; } /* Set the value of an AVP, using formatted data */ int fd_msg_avp_value_encode ( void *data, struct avp *avp ) { enum dict_avp_basetype type = -1; struct dict_type_data type_data; TRACE_ENTRY("%p %p", data, avp); /* Check parameter */ CHECK_PARAMS( CHECK_AVP(avp) && avp->avp_model ); /* Retrieve information from the AVP model and it's parent type */ { enum dict_object_type dicttype; struct dict_avp_data dictdata; struct dictionary * dict; struct dict_object * parenttype = NULL; /* First check the base type of the AVP */ CHECK_PARAMS( (fd_dict_gettype(avp->avp_model, &dicttype) == 0) && (dicttype == DICT_AVP) ); CHECK_FCT( fd_dict_getval(avp->avp_model, &dictdata) ); type = dictdata.avp_basetype; CHECK_PARAMS( type != AVP_TYPE_GROUPED ); /* Then retrieve information about the parent's type (= derived type) */ CHECK_FCT( fd_dict_getdict( avp->avp_model, &dict ) ); CHECK_FCT( fd_dict_search( dict, DICT_TYPE, TYPE_OF_AVP, avp->avp_model, &parenttype, EINVAL) ); CHECK_FCT( fd_dict_getval(parenttype, &type_data) ); if (type_data.type_encode == NULL) { TRACE_DEBUG(INFO, "This AVP type does not provide a callback to encode formatted data. ENOTSUP."); return ENOTSUP; } } /* Ok, now we can encode the value */ /* First, clean any previous value */ if (avp->avp_mustfreeos != 0) { free(avp->avp_storage.os.data); avp->avp_mustfreeos = 0; } avp->avp_public.avp_value = NULL; memset(&avp->avp_storage, 0, sizeof(union avp_value)); /* Now call the type's callback to encode the data */ CHECK_FCT( (*type_data.type_encode)(data, &avp->avp_storage) ); /* If an octetstring has been allocated, let's mark it to be freed */ if (type == AVP_TYPE_OCTETSTRING) avp->avp_mustfreeos = 1; /* Set the data pointer of the public part */ avp->avp_public.avp_value = &avp->avp_storage; return 0; } /* Interpret the value of an AVP into formatted data */ int fd_msg_avp_value_interpret ( struct avp *avp, void *data ) { struct dict_type_data type_data; TRACE_ENTRY("%p %p", avp, data); /* Check parameter */ CHECK_PARAMS( CHECK_AVP(avp) && avp->avp_model && avp->avp_public.avp_value ); /* Retrieve information about the AVP parent type */ { struct dictionary * dict; struct dict_object * parenttype = NULL; CHECK_FCT( fd_dict_getdict( avp->avp_model, &dict ) ); CHECK_FCT( fd_dict_search( dict, DICT_TYPE, TYPE_OF_AVP, avp->avp_model, &parenttype, EINVAL) ); CHECK_FCT( fd_dict_getval(parenttype, &type_data) ); if (type_data.type_interpret == NULL) { TRACE_DEBUG(INFO, "This AVP type does not provide a callback to interpret value in formatted data. ENOTSUP."); return ENOTSUP; } } /* Ok, now we can interpret the value */ CHECK_FCT( (*type_data.type_interpret)(avp->avp_public.avp_value, data) ); return 0; } /***************************************************************************************************************/ /* Creating a buffer from memory objects (bufferize a struct msg) */ /* Following macros are used to store 32 and 64 bit fields into a buffer in network byte order */ #define PUT_in_buf_32( _u32data, _bufptr ) { \ *(uint32_t *)(_bufptr) = htonl((uint32_t)(_u32data)); \ } /* The location is not on 64b boundary, so we split the writing in two operations to avoid sigbus */ #define PUT_in_buf_64( _u64data, _bufptr ) { \ uint64_t __v = htonll((uint64_t)(_u64data)); \ memcpy(_bufptr, &__v, sizeof(__v)); \ } /* Write a message header in the buffer */ static int bufferize_msg(unsigned char * buffer, size_t buflen, size_t * offset, struct msg * msg) { TRACE_ENTRY("%p %zd %p %p", buffer, buflen, offset, msg); if ((buflen - *offset) < GETMSGHDRSZ()) return ENOSPC; if (*offset & 0x3) return EFAULT; /* We are supposed to start on 32 bit boundaries */ PUT_in_buf_32(msg->msg_public.msg_length, buffer + *offset); buffer[*offset] = msg->msg_public.msg_version; *offset += 4; PUT_in_buf_32(msg->msg_public.msg_code, buffer + *offset); buffer[*offset] = msg->msg_public.msg_flags; *offset += 4; PUT_in_buf_32(msg->msg_public.msg_appl, buffer + *offset); *offset += 4; PUT_in_buf_32(msg->msg_public.msg_hbhid, buffer + *offset); *offset += 4; PUT_in_buf_32(msg->msg_public.msg_eteid, buffer + *offset); *offset += 4; return 0; } static int bufferize_chain(unsigned char * buffer, size_t buflen, size_t * offset, struct fd_list * list); /* Write an AVP in the buffer */ static int bufferize_avp(unsigned char * buffer, size_t buflen, size_t * offset, struct avp * avp) { struct dict_avp_data dictdata; TRACE_ENTRY("%p %zd %p %p", buffer, buflen, offset, avp); if ((buflen - *offset) < avp->avp_public.avp_len) return ENOSPC; /* Write the header */ PUT_in_buf_32(avp->avp_public.avp_code, buffer + *offset); *offset += 4; PUT_in_buf_32(avp->avp_public.avp_len, buffer + *offset); buffer[*offset] = avp->avp_public.avp_flags; *offset += 4; if (avp->avp_public.avp_flags & AVP_FLAG_VENDOR) { PUT_in_buf_32(avp->avp_public.avp_vendor, buffer + *offset); *offset += 4; } /* Then we must write the AVP value */ if (avp->avp_model == NULL) { /* In the case where we don't know the type of AVP, just copy the raw data or source */ CHECK_PARAMS( avp->avp_source || avp->avp_rawdata ); if ( avp->avp_rawdata != NULL ) { /* the content was stored in rawdata */ memcpy(&buffer[*offset], avp->avp_rawdata, avp->avp_rawlen); *offset += PAD4(avp->avp_rawlen); } else { /* the message was not parsed completely */ size_t datalen = avp->avp_public.avp_len - GETAVPHDRSZ(avp->avp_public.avp_flags); memcpy(&buffer[*offset], avp->avp_source, datalen); *offset += PAD4(datalen); } } else { /* The AVP is defined in the dictionary */ CHECK_FCT( fd_dict_getval(avp->avp_model, &dictdata) ); CHECK_PARAMS( ( dictdata.avp_basetype == AVP_TYPE_GROUPED ) || avp->avp_public.avp_value ); switch (dictdata.avp_basetype) { case AVP_TYPE_GROUPED: return bufferize_chain(buffer, buflen, offset, &avp->avp_chain.children); case AVP_TYPE_OCTETSTRING: if (avp->avp_public.avp_value->os.len) memcpy(&buffer[*offset], avp->avp_public.avp_value->os.data, avp->avp_public.avp_value->os.len); *offset += PAD4(avp->avp_public.avp_value->os.len); break; case AVP_TYPE_INTEGER32: PUT_in_buf_32(avp->avp_public.avp_value->i32, buffer + *offset); *offset += 4; break; case AVP_TYPE_INTEGER64: PUT_in_buf_64(avp->avp_public.avp_value->i64, buffer + *offset); *offset += 8; break; case AVP_TYPE_UNSIGNED32: PUT_in_buf_32(avp->avp_public.avp_value->u32, buffer + *offset); *offset += 4; break; case AVP_TYPE_UNSIGNED64: PUT_in_buf_64(avp->avp_public.avp_value->u64, buffer + *offset); *offset += 8; break; case AVP_TYPE_FLOAT32: /* We read the f32 as "u32" here to avoid casting to uint make decimals go away. The alternative would be something like "*(uint32_t *)(& f32)" but then the compiler complains about strict-aliasing rules. */ PUT_in_buf_32(avp->avp_public.avp_value->u32, buffer + *offset); *offset += 4; break; case AVP_TYPE_FLOAT64: /* Same remark as previously */ PUT_in_buf_64(avp->avp_public.avp_value->u64, buffer + *offset); *offset += 8; break; default: ASSERT(0); } } return 0; } /* Write a chain of AVPs in the buffer */ static int bufferize_chain(unsigned char * buffer, size_t buflen, size_t * offset, struct fd_list * list) { struct fd_list * avpch; TRACE_ENTRY("%p %zd %p %p", buffer, buflen, offset, list); for (avpch = list->next; avpch != list; avpch = avpch->next) { /* Bufferize the AVP */ CHECK_FCT( bufferize_avp(buffer, buflen, offset, _A(avpch->o)) ); } return 0; } /* Create the message buffer, in network-byte order. We browse the tree twice, this could be probably improved if needed */ int fd_msg_bufferize ( struct msg * msg, unsigned char ** buffer, size_t * len ) { int ret = 0; unsigned char * buf = NULL; size_t offset = 0; TRACE_ENTRY("%p %p %p", msg, buffer, len); /* Check the parameters */ CHECK_PARAMS( buffer && CHECK_MSG(msg) ); /* Update the length. This also checks that all AVP have their values set */ CHECK_FCT( fd_msg_update_length(msg) ); /* Now allocate a buffer to store the message */ CHECK_MALLOC( buf = malloc(msg->msg_public.msg_length) ); /* Clear the memory, so that the padding is always 0 (should not matter) */ memset(buf, 0, msg->msg_public.msg_length); /* Write the message header in the buffer */ CHECK_FCT_DO( ret = bufferize_msg(buf, msg->msg_public.msg_length, &offset, msg), { free(buf); return ret; } ); /* Write the list of AVPs */ CHECK_FCT_DO( ret = bufferize_chain(buf, msg->msg_public.msg_length, &offset, &msg->msg_chain.children), { free(buf); return ret; } ); ASSERT(offset == msg->msg_public.msg_length); /* or the msg_update_length is buggy */ if (len) { *len = offset; } *buffer = buf; return 0; } /***************************************************************************************************************/ /* Parsing buffers and building AVP objects lists (not parsing the AVP values which requires dictionary knowledge) */ /* Parse a buffer containing a supposed list of AVPs */ static int parsebuf_list(unsigned char * buf, size_t buflen, struct fd_list * head) { size_t offset = 0; TRACE_ENTRY("%p %zd %p", buf, buflen, head); while (offset < buflen) { struct avp * avp; if (buflen - offset < AVPHDRSZ_NOVEND) { TRACE_DEBUG(INFO, "truncated buffer: remaining only %zd bytes", buflen - offset); return EBADMSG; } /* Create a new AVP object */ CHECK_MALLOC( avp = malloc (sizeof(struct avp)) ); init_avp(avp); /* Initialize the header */ avp->avp_public.avp_code = ntohl(*(uint32_t *)(buf + offset)); avp->avp_public.avp_flags = buf[offset + 4]; avp->avp_public.avp_len = ((uint32_t)buf[offset+5]) << 16 | ((uint32_t)buf[offset+6]) << 8 | ((uint32_t)buf[offset+7]) ; offset += 8; if (avp->avp_public.avp_flags & AVP_FLAG_VENDOR) { if (buflen - offset < 4) { TRACE_DEBUG(INFO, "truncated buffer: remaining only %zd bytes for vendor and data", buflen - offset); free(avp); return EBADMSG; } avp->avp_public.avp_vendor = ntohl(*(uint32_t *)(buf + offset)); offset += 4; } /* Check there is enough remaining data in the buffer */ if ( (avp->avp_public.avp_len > GETAVPHDRSZ(avp->avp_public.avp_flags)) && (buflen - offset < avp->avp_public.avp_len - GETAVPHDRSZ(avp->avp_public.avp_flags))) { TRACE_DEBUG(INFO, "truncated buffer: remaining only %zd bytes for data, and avp data size is %d", buflen - offset, avp->avp_public.avp_len - GETAVPHDRSZ(avp->avp_public.avp_flags)); free(avp); return EBADMSG; } /* buf[offset] is now the beginning of the data */ avp->avp_source = &buf[offset]; /* Now eat the data and eventual padding */ offset += PAD4(avp->avp_public.avp_len - GETAVPHDRSZ(avp->avp_public.avp_flags)); /* And insert this avp in the list, at the end */ fd_list_insert_before( head, &avp->avp_chain.chaining ); } return 0; } /* Create a message object from a buffer. Dictionary objects are not resolved, AVP contents are not interpreted, buffer is saved in msg */ int fd_msg_parse_buffer ( unsigned char ** buffer, size_t buflen, struct msg ** msg ) { struct msg * new = NULL; int ret = 0; uint32_t msglen = 0; unsigned char * buf; TRACE_ENTRY("%p %zd %p", buffer, buflen, msg); CHECK_PARAMS( buffer && *buffer && msg && (buflen >= GETMSGHDRSZ()) ); buf = *buffer; if ( buf[0] != DIAMETER_VERSION) { TRACE_DEBUG(INFO, "Invalid version in message: %d (supported: %d)", buf[0], DIAMETER_VERSION); return EBADMSG; } msglen = ntohl(*(uint32_t *)buf) & 0x00ffffff; if ( buflen < msglen ) { TRACE_DEBUG(INFO, "Truncated message (%zd / %d)", buflen, msglen ); return EBADMSG; } /* Create a new object */ CHECK_MALLOC( new = malloc (sizeof(struct msg)) ); /* Initialize the fields */ init_msg(new); /* Now read from the buffer */ new->msg_public.msg_version = buf[0]; new->msg_public.msg_length = msglen; new->msg_public.msg_flags = buf[4]; new->msg_public.msg_code = ntohl(*(uint32_t *)(buf+4)) & 0x00ffffff; new->msg_public.msg_appl = ntohl(*(uint32_t *)(buf+8)); new->msg_public.msg_hbhid = ntohl(*(uint32_t *)(buf+12)); new->msg_public.msg_eteid = ntohl(*(uint32_t *)(buf+16)); /* Parse the AVP list */ CHECK_FCT_DO( ret = parsebuf_list(buf + GETMSGHDRSZ(), buflen - GETMSGHDRSZ(), &new->msg_chain.children), { destroy_tree(_C(new)); return ret; } ); /* Parsing successful */ new->msg_rawbuffer = buf; *buffer = NULL; *msg = new; return 0; } /***************************************************************************************************************/ /* Parsing messages and AVP with dictionary information */ /* Resolve dictionary objects of the cmd and avp instances, from their headers. * When the model is found, the data is interpreted from the avp_source buffer and copied to avp_storage. * When the model is not found, the data is copied as rawdata and saved (in case we FW the message). * Therefore, after this function has been called, the source buffer can be freed. * For command, if the dictionary model is not found, an error is returned. */ static char error_message[256]; /* Process an AVP. If we are not in recheck, the avp_source must be set. */ static int parsedict_do_avp(struct dictionary * dict, struct avp * avp, int mandatory, struct fd_pei *error_info) { struct dict_avp_data dictdata; struct dict_type_data derivedtypedata; struct dict_object * avp_derived_type = NULL; uint8_t * source; TRACE_ENTRY("%p %p %d %p", dict, avp, mandatory, error_info); /* First check we received an AVP as input */ CHECK_PARAMS( CHECK_AVP(avp) ); if (avp->avp_model != NULL) { /* the model has already been resolved. we do check it is still valid */ CHECK_FCT( fd_dict_getval(avp->avp_model, &dictdata) ); if ( avp->avp_public.avp_code == dictdata.avp_code ) { /* Ok then just process the children if any */ return parsedict_do_chain(dict, &avp->avp_chain.children, mandatory && (avp->avp_public.avp_flags & AVP_FLAG_MANDATORY), error_info); } else { /* We just erase the old model */ avp->avp_model = NULL; } } /* Check if we already searched for this model without success */ if ((avp->avp_model_not_found.mnf_code != avp->avp_public.avp_code) || (avp->avp_model_not_found.mnf_vendor != avp->avp_public.avp_vendor)) { /* Now try and resolve the model from the avp code and vendor */ if (avp->avp_public.avp_flags & AVP_FLAG_VENDOR) { struct dict_avp_request_ex avpreq; memset(&avpreq, 0, sizeof(avpreq)); avpreq.avp_vendor.vendor_id = avp->avp_public.avp_vendor; avpreq.avp_data.avp_code = avp->avp_public.avp_code; CHECK_FCT( fd_dict_search ( dict, DICT_AVP, AVP_BY_STRUCT, &avpreq, &avp->avp_model, 0)); } else { /* no vendor */ CHECK_FCT( fd_dict_search ( dict, DICT_AVP, AVP_BY_CODE, &avp->avp_public.avp_code, &avp->avp_model, 0)); } if (!avp->avp_model) { avp->avp_model_not_found.mnf_code = avp->avp_public.avp_code; avp->avp_model_not_found.mnf_vendor = avp->avp_public.avp_vendor; } } /* First handle the case where we have not found this AVP in the dictionary */ if (!avp->avp_model) { if (mandatory && (avp->avp_public.avp_flags & AVP_FLAG_MANDATORY)) { TRACE_DEBUG(INFO, "Unsupported mandatory AVP found"); if (error_info) { error_info->pei_errcode = "DIAMETER_AVP_UNSUPPORTED"; error_info->pei_avp = avp; } else { char * buf = NULL; size_t buflen; CHECK_MALLOC(fd_msg_dump_treeview(&buf, &buflen, NULL, avp, NULL, 0, 0)); LOG_E("Unsupported AVP: %s", buf); free(buf); } return ENOTSUP; } if (avp->avp_source) { /* we must copy the data from the source to the internal buffer area */ CHECK_PARAMS( !avp->avp_rawdata ); avp->avp_rawlen = avp->avp_public.avp_len - GETAVPHDRSZ( avp->avp_public.avp_flags ); if (avp->avp_rawlen) { CHECK_MALLOC( avp->avp_rawdata = malloc(avp->avp_rawlen) ); memcpy(avp->avp_rawdata, avp->avp_source, avp->avp_rawlen); } avp->avp_source = NULL; TRACE_DEBUG(FULL, "Unsupported optional AVP found, raw source data saved in avp_rawdata."); } return 0; } /* Ok we have resolved the object. Now we need to interpret its content. */ CHECK_FCT( fd_dict_getval(avp->avp_model, &dictdata) ); if (avp->avp_rawdata) { /* This happens if the dictionary object was defined after the first check */ avp->avp_source = avp->avp_rawdata; } /* A bit of sanity here... */ ASSERT(CHECK_BASETYPE(dictdata.avp_basetype)); /* Check the size is valid */ if ((avp_value_sizes[dictdata.avp_basetype] != 0) && (avp->avp_public.avp_len - GETAVPHDRSZ( avp->avp_public.avp_flags ) != avp_value_sizes[dictdata.avp_basetype])) { TRACE_DEBUG(INFO, "The AVP size is not suitable for the type"); if (error_info) { error_info->pei_errcode = "DIAMETER_INVALID_AVP_LENGTH"; error_info->pei_avp = avp; snprintf(error_message, sizeof(error_message), "I expected a size of %d for this AVP according to my dictionary", avp_value_sizes[dictdata.avp_basetype]); error_info->pei_message = error_message; } else { char * buf = NULL; size_t buflen; CHECK_MALLOC(fd_msg_dump_treeview(&buf, &buflen, NULL, avp, NULL, 0, 0)); LOG_E("Invalid length AVP: %s", buf); free(buf); } avp->avp_model = NULL; return EBADMSG; } source = avp->avp_source; avp->avp_source = NULL; /* Now get the value inside */ switch (dictdata.avp_basetype) { case AVP_TYPE_GROUPED: { int ret; /* This is a grouped AVP, so let's parse the list of AVPs inside */ CHECK_FCT_DO( ret = parsebuf_list(source, avp->avp_public.avp_len - GETAVPHDRSZ( avp->avp_public.avp_flags ), &avp->avp_chain.children), { if ((ret == EBADMSG) && (error_info)) { error_info->pei_errcode = "DIAMETER_INVALID_AVP_VALUE"; error_info->pei_avp = avp; snprintf(error_message, sizeof(error_message), "I cannot parse this AVP as a Grouped AVP"); error_info->pei_message = error_message; } avp->avp_source = source; return ret; } ); return parsedict_do_chain(dict, &avp->avp_chain.children, mandatory && (avp->avp_public.avp_flags & AVP_FLAG_MANDATORY), error_info); } case AVP_TYPE_OCTETSTRING: /* We just have to copy the string into the storage area */ CHECK_PARAMS_DO( avp->avp_public.avp_len >= GETAVPHDRSZ( avp->avp_public.avp_flags ), { if (error_info) { error_info->pei_errcode = "DIAMETER_INVALID_AVP_LENGTH"; error_info->pei_avp = avp; } avp->avp_source = source; return EBADMSG; } ); avp->avp_storage.os.len = avp->avp_public.avp_len - GETAVPHDRSZ( avp->avp_public.avp_flags ); CHECK_MALLOC( avp->avp_storage.os.data = os0dup(source, avp->avp_storage.os.len) ); avp->avp_mustfreeos = 1; break; case AVP_TYPE_INTEGER32: avp->avp_storage.i32 = (int32_t)ntohl(*(uint32_t *)source); break; case AVP_TYPE_INTEGER64: /* the storage might not be aligned on 64b boundary, so no direct indirection here is possible */ { uint64_t __stor; memcpy(&__stor, source, sizeof(__stor)); avp->avp_storage.i64 = (int64_t)ntohll(__stor); } break; case AVP_TYPE_UNSIGNED32: case AVP_TYPE_FLOAT32: /* For float, we must not cast, or the value is changed. Instead we use implicit cast by changing the member of the union */ avp->avp_storage.u32 = (uint32_t)ntohl(*(uint32_t *)source); break; case AVP_TYPE_UNSIGNED64: case AVP_TYPE_FLOAT64: /* same as 32 bits */ { uint64_t __stor; memcpy(&__stor, source, sizeof(__stor)); avp->avp_storage.u64 = (uint64_t)ntohll(__stor); } break; } /* Is there a derived type check function ? */ CHECK_FCT ( fd_dict_search ( dict, DICT_TYPE, TYPE_OF_AVP, avp->avp_model, &avp_derived_type, 0) ); if (avp_derived_type) { CHECK_FCT( fd_dict_getval(avp_derived_type, &derivedtypedata) ); if (derivedtypedata.type_check != NULL) { char * err; int ret = (*derivedtypedata.type_check)( derivedtypedata.type_check_param, &avp->avp_storage, &err ); if (ret != 0) { TRACE_DEBUG(INFO, "The AVP failed to pass the dictionary validation"); if (error_info) { error_info->pei_errcode = "DIAMETER_INVALID_AVP_VALUE"; error_info->pei_avp = avp; strncpy(error_message, err, sizeof(error_message)); error_info->pei_message = error_message; } else { char * buf = NULL; size_t buflen; CHECK_MALLOC(fd_msg_dump_treeview(&buf, &buflen, NULL, avp, NULL, 0, 0)); LOG_E("Invalid AVP: %s", buf); free(buf); } return ret; /* should we just return EBADMSG? */ } } } /* The value is now set, so set the data pointer and return 0 */ avp->avp_public.avp_value = &avp->avp_storage; return 0; } /* Process a list of AVPs */ static int parsedict_do_chain(struct dictionary * dict, struct fd_list * head, int mandatory, struct fd_pei *error_info) { struct fd_list * avpch; TRACE_ENTRY("%p %p %d %p", dict, head, mandatory, error_info); /* Sanity check */ ASSERT ( head == head->head ); /* Now process the list */ for (avpch=head->next; avpch != head; avpch = avpch->next) { CHECK_FCT( parsedict_do_avp(dict, _A(avpch->o), mandatory, error_info) ); } /* Done */ return 0; } /* Process a msg header. */ static int parsedict_do_msg(struct dictionary * dict, struct msg * msg, int only_hdr, struct fd_pei *error_info) { int ret = 0; TRACE_ENTRY("%p %p %d %p", dict, msg, only_hdr, error_info); CHECK_PARAMS( CHECK_MSG(msg) ); /* First, check if we already have a model. */ if (msg->msg_model != NULL) { /* Check if this model is still valid for the message data */ enum dict_object_type dicttype; struct dict_cmd_data data; ASSERT(((fd_dict_gettype(msg->msg_model, &dicttype) == 0) && (dicttype == DICT_COMMAND))); (void)fd_dict_getval( msg->msg_model, &data); if ((data.cmd_code != msg->msg_public.msg_code) || ((data.cmd_flag_val & data.cmd_flag_mask) != (msg->msg_public.msg_flags && data.cmd_flag_mask))) { msg->msg_model = NULL; } else { goto chain; } } /* Check if we already searched for this model without success */ if ((msg->msg_model_not_found.mnf_code == msg->msg_public.msg_code) && (msg->msg_model_not_found.mnf_flags == msg->msg_public.msg_flags)) { goto no_model; } else { msg->msg_model_not_found.mnf_code = 0; } /* Look for the model from the header */ CHECK_FCT_DO( ret = fd_dict_search ( dict, DICT_COMMAND, (msg->msg_public.msg_flags & CMD_FLAG_REQUEST) ? CMD_BY_CODE_R : CMD_BY_CODE_A, &msg->msg_public.msg_code, &msg->msg_model, ENOTSUP), { if (ret == ENOTSUP) { /* update the model not found info */ msg->msg_model_not_found.mnf_code = msg->msg_public.msg_code; msg->msg_model_not_found.mnf_flags = msg->msg_public.msg_flags; goto no_model; } return ret; } ); chain: if (!only_hdr) { /* Then process the children */ ret = parsedict_do_chain(dict, &msg->msg_chain.children, 1, error_info); /* Free the raw buffer if any */ if ((ret == 0) && (msg->msg_rawbuffer != NULL)) { free(msg->msg_rawbuffer); msg->msg_rawbuffer=NULL; } } return ret; no_model: if (error_info) { error_info->pei_errcode = "DIAMETER_COMMAND_UNSUPPORTED"; error_info->pei_protoerr = 1; } return ENOTSUP; } int fd_msg_parse_dict ( msg_or_avp * object, struct dictionary * dict, struct fd_pei *error_info ) { TRACE_ENTRY("%p %p %p", dict, object, error_info); CHECK_PARAMS( VALIDATE_OBJ(object) ); if (error_info) memset(error_info, 0, sizeof(struct fd_pei)); switch (_C(object)->type) { case MSG_MSG: return parsedict_do_msg(dict, _M(object), 0, error_info); case MSG_AVP: return parsedict_do_avp(dict, _A(object), 0, error_info); default: ASSERT(0); } return EINVAL; } /***************************************************************************************************************/ /* Parsing messages and AVP for rules (ABNF) compliance */ /* This function is used to get stats (first occurence position, last occurence position, number of occurences) of AVP instances of a given model in a chain of AVP */ static void parserules_stat_avps( struct dict_object * model_avp, struct fd_list *list, int * count, int * firstpos, int * lastpos) { struct fd_list * li; int curpos = 0; /* The current position in the list */ TRACE_ENTRY("%p %p %p %p %p", model_avp, list, count, firstpos, lastpos); *count = 0; /* number of instances found */ *firstpos = 0; /* position of the first instance */ *lastpos = 0; /* position of the last instance, starting from the end */ for (li = list->next; li != list; li = li->next) { /* Increment the current position counter */ curpos++; /* If we previously saved a "lastpos" information, increment it */ if (*lastpos != 0) (*lastpos)++; /* Check the type of the next AVP. We can compare the references directly, it is safe. */ if (_A(li->o)->avp_model == model_avp) { /* This AVP is of the type we are searching */ (*count)++; /* If we don't have yet a "firstpos", save it */ if (*firstpos == 0) *firstpos = curpos; /* Reset the lastpos */ (*lastpos) = 1; } } } /* We use this structure as parameter for the next function */ struct parserules_data { struct fd_list * sentinel; /* Sentinel of the list of children AVP */ struct fd_pei * pei; /* If the rule conflicts, save the error here */ }; /* Create an empty AVP of a given model (to use in Failed-AVP) */ static struct avp * empty_avp(struct dict_object * model_avp) { struct avp * avp = NULL; struct dict_avp_data avp_info; union avp_value val; unsigned char os[1] = { '\0' }; /* Create an instance */ CHECK_FCT_DO( fd_msg_avp_new(model_avp, 0, &avp ), return NULL ); /* Type of the AVP */ CHECK_FCT_DO( fd_dict_getval(model_avp, &avp_info), return NULL ); /* Set an initial size */ avp->avp_public.avp_len = GETAVPHDRSZ( avp->avp_public.avp_flags ) + avp_value_sizes[avp_info.avp_basetype]; /* Prepare the empty value */ memset(&val, 0, sizeof(val)); switch (avp_info.avp_basetype) { case AVP_TYPE_OCTETSTRING: val.os.data = os; val.os.len = sizeof(os); avp->avp_public.avp_len += val.os.len; case AVP_TYPE_INTEGER32: case AVP_TYPE_INTEGER64: case AVP_TYPE_UNSIGNED32: case AVP_TYPE_UNSIGNED64: case AVP_TYPE_FLOAT32: case AVP_TYPE_FLOAT64: CHECK_FCT_DO( fd_msg_avp_setvalue(avp, &val), return NULL ); case AVP_TYPE_GROUPED: /* For AVP_TYPE_GROUPED we don't do anything */ break; default: ASSERT(0); /* not handled */ } return avp; } /* Check that a list of AVPs is compliant with a given rule -- will be iterated on the list of rules */ static int parserules_check_one_rule(void * data, struct dict_rule_data *rule) { int count, first, last, min; struct parserules_data * pr_data = data; char * avp_name = ""; TRACE_ENTRY("%p %p", data, rule); /* Get statistics of the AVP concerned by this rule in the parent instance */ parserules_stat_avps( rule->rule_avp, pr_data->sentinel, &count, &first, &last); if (TRACE_BOOL(INFO)) { struct dict_avp_data avpdata; int ret; ret = fd_dict_getval(rule->rule_avp, &avpdata); if (ret == 0) avp_name = avpdata.avp_name; TRACE_DEBUG(ANNOYING, "Checking rule: p:%d(%d) m/M:%2d/%2d. Counted %d (first: %d, last:%d) of AVP '%s'", rule->rule_position, rule->rule_order, rule->rule_min, rule->rule_max, count, first, last, avp_name ); } /* Now check the rule is not conflicting */ /* Check the "min" value */ if ((min = rule->rule_min) == -1) { if (rule->rule_position == RULE_OPTIONAL) min = 0; else min = 1; } if (count < min) { fd_log_error("Conflicting rule: the number of occurences (%d) is < the rule min (%d) for '%s'.", count, min, avp_name); if (pr_data->pei) { pr_data->pei->pei_errcode = "DIAMETER_MISSING_AVP"; pr_data->pei->pei_avp = empty_avp(rule->rule_avp); pr_data->pei->pei_avp_free = 1; } return EBADMSG; } /* Check the "max" value */ if ((rule->rule_max != -1) && (count > rule->rule_max)) { fd_log_error("Conflicting rule: the number of occurences (%d) is > the rule max (%d) for '%s'.", count, rule->rule_max, avp_name); if (pr_data->pei) { if (rule->rule_max == 0) pr_data->pei->pei_errcode = "DIAMETER_AVP_NOT_ALLOWED"; else pr_data->pei->pei_errcode = "DIAMETER_AVP_OCCURS_TOO_MANY_TIMES"; pr_data->pei->pei_avp = empty_avp(rule->rule_avp); /* Well we are supposed to return the (max + 1)th instance of the AVP instead... Pfff... */ TODO("Improve..."); pr_data->pei->pei_avp_free = 1; } return EBADMSG; } /* Check the position and order (if relevant) */ switch (rule->rule_position) { case RULE_OPTIONAL: case RULE_REQUIRED: /* No special position constraints */ break; case RULE_FIXED_HEAD: /* Since "0*1" is a valid rule specifier, we only reject cases where the AVP appears *after* its fixed position */ if (first > rule->rule_order) { fd_log_error("Conflicting rule: the FIXED_HEAD AVP appears first in (%d) position, the rule requires (%d) for '%s'.", first, rule->rule_order, avp_name); if (pr_data->pei) { pr_data->pei->pei_errcode = "DIAMETER_MISSING_AVP"; pr_data->pei->pei_message = "AVP was not in its fixed position"; pr_data->pei->pei_avp = empty_avp(rule->rule_avp); pr_data->pei->pei_avp_free = 1; } return EBADMSG; } break; case RULE_FIXED_TAIL: /* Since "0*1" is a valid rule specifier, we only reject cases where the AVP appears *before* its fixed position */ if (last > rule->rule_order) { /* We have a ">" here because we count in reverse order (i.e. from the end) */ fd_log_error("Conflicting rule: the FIXED_TAIL AVP appears last in (%d) position, the rule requires (%d) for '%s'.", last, rule->rule_order, avp_name); if (pr_data->pei) { pr_data->pei->pei_errcode = "DIAMETER_MISSING_AVP"; pr_data->pei->pei_message = "AVP was not in its fixed position"; pr_data->pei->pei_avp = empty_avp(rule->rule_avp); pr_data->pei->pei_avp_free = 1; } return EBADMSG; } break; default: /* What is this position ??? */ ASSERT(0); return ENOTSUP; } /* We've checked all the parameters */ return 0; } /* Check the rules recursively */ static int parserules_do ( struct dictionary * dict, msg_or_avp * object, struct fd_pei *error_info, int mandatory) { struct parserules_data data; struct dict_object * model = NULL; TRACE_ENTRY("%p %p %p %d", dict, object, error_info, mandatory); /* object has already been checked and dict-parsed when we are called. */ /* First, handle the cases where there is no model */ { if (CHECK_MSG(object)) { if ( _M(object)->msg_public.msg_flags & CMD_FLAG_ERROR ) { /* The case of error messages: the ABNF is different */ CHECK_FCT( fd_dict_get_error_cmd(dict, &model) ); } else { model = _M(object)->msg_model; } /* Commands MUST be supported in the dictionary */ if (model == NULL) { TRACE_DEBUG(INFO, "Message with no dictionary model. EBADMSG"); if (error_info) { error_info->pei_errcode = "DIAMETER_COMMAND_UNSUPPORTED"; error_info->pei_protoerr = 1; } return EBADMSG; } } /* AVP with the 'M' flag must also be recognized in the dictionary -- except inside an optional grouped AVP */ if (CHECK_AVP(object) && ((model = _A(object)->avp_model) == NULL)) { if ( mandatory && (_A(object)->avp_public.avp_flags & AVP_FLAG_MANDATORY)) { /* Return an error in this case */ TRACE_DEBUG(INFO, "Mandatory AVP with no dictionary model. EBADMSG"); if (error_info) { error_info->pei_errcode = "DIAMETER_AVP_UNSUPPORTED"; error_info->pei_avp = object; } return EBADMSG; } else { /* We don't know any rule for this object, so assume OK */ TRACE_DEBUG(FULL, "Unknown informational AVP, ignoring..."); return 0; } } } /* At this point we know "model" is set and points to the object's model */ /* If we are an AVP with no children, just return OK */ if (CHECK_AVP(object)) { struct dict_avp_data dictdata; CHECK_FCT( fd_dict_getval(model, &dictdata) ); if (dictdata.avp_basetype != AVP_TYPE_GROUPED) { /* This object has no children and no rules */ return 0; } } /* If this object has children, first check the rules for all its children */ { int is_child_mand = 0; struct fd_list * ch = NULL; if ( CHECK_MSG(object) || (mandatory && (_A(object)->avp_public.avp_flags & AVP_FLAG_MANDATORY)) ) is_child_mand = 1; for (ch = _C(object)->children.next; ch != &_C(object)->children; ch = ch->next) { CHECK_FCT( parserules_do ( dict, _C(ch->o), error_info, is_child_mand ) ); } } /* Now check all rules of this object */ data.sentinel = &_C(object)->children; data.pei = error_info; CHECK_FCT( fd_dict_iterate_rules ( model, &data, parserules_check_one_rule ) ); return 0; } int fd_msg_parse_rules ( msg_or_avp * object, struct dictionary * dict, struct fd_pei *error_info) { TRACE_ENTRY("%p %p %p", object, dict, error_info); if (error_info) memset(error_info, 0, sizeof(struct fd_pei)); /* Resolve the dictionary objects when missing. This also validates the object. */ CHECK_FCT( fd_msg_parse_dict ( object, dict, error_info ) ); /* Call the recursive function */ return parserules_do ( dict, object, error_info, 1 ) ; } /***************************************************************************************************************/ /* Compute the lengh of an object and its subtree. */ int fd_msg_update_length ( msg_or_avp * object ) { size_t sz = 0; struct dict_object * model; union { struct dict_cmd_data cmddata; struct dict_avp_data avpdata; } dictdata; TRACE_ENTRY("%p", object); /* Get the model of the object. This also validates the object */ CHECK_FCT( fd_msg_model ( object, &model ) ); /* Get the information of the model */ if (model) { CHECK_FCT( fd_dict_getval(model, &dictdata) ); } else { /* For unknown AVP, just don't change the size */ if (_C(object)->type == MSG_AVP) return 0; } /* Deal with easy cases: AVPs without children */ if ((_C(object)->type == MSG_AVP) && (dictdata.avpdata.avp_basetype != AVP_TYPE_GROUPED)) { /* Sanity check */ ASSERT(FD_IS_LIST_EMPTY(&_A(object)->avp_chain.children)); /* Now check that the data is set in the AVP */ CHECK_PARAMS( _A(object)->avp_public.avp_value ); sz = GETAVPHDRSZ( _A(object)->avp_public.avp_flags ); switch (dictdata.avpdata.avp_basetype) { case AVP_TYPE_OCTETSTRING: sz += _A(object)->avp_public.avp_value->os.len; break; case AVP_TYPE_INTEGER32: case AVP_TYPE_INTEGER64: case AVP_TYPE_UNSIGNED32: case AVP_TYPE_UNSIGNED64: case AVP_TYPE_FLOAT32: case AVP_TYPE_FLOAT64: sz += avp_value_sizes[dictdata.avpdata.avp_basetype]; break; default: /* Something went wrong... */ ASSERT(0); } } else /* message or grouped AVP */ { struct fd_list * ch = NULL; /* First, compute the header size */ if (_C(object)->type == MSG_AVP) { sz = GETAVPHDRSZ( _A(object)->avp_public.avp_flags ); } else { sz = GETMSGHDRSZ( ); } /* Recurse in all children and update the sz information */ for (ch = _C(object)->children.next; ch != &_C(object)->children; ch = ch->next) { CHECK_FCT( fd_msg_update_length ( ch->o ) ); /* Add the padded size to the parent */ sz += PAD4( _A(ch->o)->avp_public.avp_len ); } } /* When we arrive here, the "sz" variable contains the size to write in the object */ if (_C(object)->type == MSG_AVP) _A(object)->avp_public.avp_len = sz; else _M(object)->msg_public.msg_length = sz; return 0; } /***************************************************************************************************************/ /* Macro to check if further callbacks must be called */ #define TEST_ACTION_STOP() \ if ((*msg == NULL) || (*action != DISP_ACT_CONT)) \ goto out; /* Call all dispatch callbacks for a given message */ int fd_msg_dispatch ( struct msg ** msg, struct session * session, enum disp_action *action, char ** error_code, char ** drop_reason, struct msg ** drop_msg) { struct dictionary * dict; struct dict_object * app; struct dict_object * cmd; struct avp * avp; struct fd_list * cb_list; int ret = 0, r2; TRACE_ENTRY("%p %p %p %p", msg, session, action, error_code); CHECK_PARAMS( msg && CHECK_MSG(*msg) && action); if (error_code) *error_code = NULL; if (drop_reason) *drop_reason = NULL; *action = DISP_ACT_CONT; /* Take the dispatch lock */ CHECK_FCT( pthread_rwlock_rdlock(&fd_disp_lock) ); pthread_cleanup_push( fd_cleanup_rwlock, &fd_disp_lock ); /* First, call the DISP_HOW_ANY callbacks */ CHECK_FCT_DO( ret = fd_disp_call_cb_int( NULL, msg, NULL, session, action, NULL, NULL, NULL, NULL, drop_reason, drop_msg ), goto out ); TEST_ACTION_STOP(); /* If we don't know the model at this point, we stop cause we cannot get the dictionary. It's invalid: an error should already have been trigged by ANY callbacks */ CHECK_PARAMS_DO(cmd = (*msg)->msg_model, { ret = EINVAL; goto out; } ); /* Now resolve message application */ CHECK_FCT_DO( ret = fd_dict_getdict( cmd, &dict ), goto out ); CHECK_FCT_DO( ret = fd_dict_search( dict, DICT_APPLICATION, APPLICATION_BY_ID, &(*msg)->msg_public.msg_appl, &app, 0 ), goto out ); if (app == NULL) { if ((*msg)->msg_public.msg_flags & CMD_FLAG_REQUEST) { if (error_code) *error_code = "DIAMETER_APPLICATION_UNSUPPORTED"; *action = DISP_ACT_ERROR; } else { *drop_reason = "Internal error: Received this answer to a local query with an unsupported application"; *drop_msg = *msg; *msg = NULL; } goto out; } /* So start browsing the message */ CHECK_FCT_DO( ret = fd_msg_browse( *msg, MSG_BRW_FIRST_CHILD, &avp, NULL ), goto out ); while (avp != NULL) { /* For unknown AVP, we don't have a callback registered, so just skip */ if (avp->avp_model) { struct dict_object * enumval = NULL; /* Get the list of callback for this AVP */ CHECK_FCT_DO( ret = fd_dict_disp_cb(DICT_AVP, avp->avp_model, &cb_list), goto out ); /* We search enumerated values only in case of non-grouped AVP */ if ( avp->avp_public.avp_value ) { struct dict_object * type; /* Check if the AVP has a constant value */ CHECK_FCT_DO( ret = fd_dict_search(dict, DICT_TYPE, TYPE_OF_AVP, avp->avp_model, &type, 0), goto out ); if (type) { struct dict_enumval_request req; memset(&req, 0, sizeof(struct dict_enumval_request)); req.type_obj = type; memcpy( &req.search.enum_value, avp->avp_public.avp_value, sizeof(union avp_value) ); CHECK_FCT_DO( ret = fd_dict_search(dict, DICT_ENUMVAL, ENUMVAL_BY_STRUCT, &req, &enumval, 0), goto out ); } } /* Call the callbacks */ CHECK_FCT_DO( ret = fd_disp_call_cb_int( cb_list, msg, avp, session, action, app, cmd, avp->avp_model, enumval, drop_reason, drop_msg ), goto out ); TEST_ACTION_STOP(); } /* Go to next AVP */ CHECK_FCT_DO( ret = fd_msg_browse( avp, MSG_BRW_WALK, &avp, NULL ), goto out ); } /* Now call command and application callbacks */ CHECK_FCT_DO( ret = fd_dict_disp_cb(DICT_COMMAND, cmd, &cb_list), goto out ); CHECK_FCT_DO( ret = fd_disp_call_cb_int( cb_list, msg, NULL, session, action, app, cmd, NULL, NULL, drop_reason, drop_msg ), goto out ); TEST_ACTION_STOP(); if (app) { CHECK_FCT_DO( ret = fd_dict_disp_cb(DICT_APPLICATION, app, &cb_list), goto out ); CHECK_FCT_DO( ret = fd_disp_call_cb_int( cb_list, msg, NULL, session, action, app, cmd, NULL, NULL, drop_reason, drop_msg ), goto out ); TEST_ACTION_STOP(); } out: ; /* some systems would complain without this */ pthread_cleanup_pop(0); CHECK_POSIX_DO(r2 = pthread_rwlock_unlock(&fd_disp_lock), /* ignore */ ); return ret ?: r2; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdproto/ostr.c000066400000000000000000000373501333553357400223620ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdproto-internal.h" #if (!defined(DIAMID_IDNA_IGNORE) && !defined(DIAMID_IDNA_REJECT)) /* Process IDNA with stringprep -- See RFC5890 -- and libidn documentation... */ #include /* idna_to_ascii_8z() */ #endif /* !defined(DIAMID_IDNA_IGNORE) && !defined(DIAMID_IDNA_REJECT) */ /* Similar to strdup with (must have been verified) os0_t */ os0_t os0dup_int(os0_t s, size_t l) { os0_t r; CHECK_MALLOC_DO( r = malloc(l+1), return NULL ); if (l) memcpy(r, s, l); /* this might be faster than a strcpy or strdup because it can work with 32 or 64b blocks */ r[l] = '\0'; return r; } /* case sensitive comparison, fast */ int fd_os_cmp_int(uint8_t * os1, size_t os1sz, uint8_t * os2, size_t os2sz) { ASSERT( os1 && os2); if (os1sz < os2sz) return -1; if (os1sz > os2sz) return 1; return os1sz ? memcmp(os1, os2, os1sz) : 0; } /* a local version of tolower() that does not depend on LC_CTYPE locale */ static inline uint8_t asciitolower(uint8_t a) { if ((a >= 'A') && (a <= 'Z')) return a + 32 /* == 'a' - 'A' */; return a; } /* less sensitive to case, slower. */ /* the semantics of "maybefurther" assume you are searching for os1 in a list of elements ordered, each element passed as os2 */ int fd_os_almostcasesrch_int(uint8_t * os1, size_t os1sz, uint8_t * os2, size_t os2sz, int *maybefurther) { int i; int res = 0; ASSERT( os1 && os2); if (maybefurther) *maybefurther = 0; if (os1sz < os2sz) return -1; if (maybefurther) *maybefurther = 1; if (os1sz > os2sz) return 1; for (i = 0; i < os1sz; i++) { if (os1[i] == os2[i]) continue; if (!res) res = os1[i] < os2[i] ? -1 : 1; if (asciitolower(os1[i]) == asciitolower(os2[i])) continue; return res; } return 0; } /* Check if the string contains only ASCII */ int fd_os_is_valid_DiameterIdentity(uint8_t * os, size_t ossz) { #ifdef DIAMID_IDNA_IGNORE /* Allow anything */ #else /* DIAMID_IDNA_IGNORE */ int i; /* Allow only letters, digits, hyphen, dot */ for (i=0; i < ossz; i++) { if (os[i] > 'z') break; if (os[i] >= 'a') continue; if ((os[i] >= 'A') && (os[i] <= 'Z')) continue; if ((os[i] == '-') || (os[i] == '.')) continue; if ((os[i] >= '0') && (os[i] <= '9')) continue; break; } if (i < ossz) { int nb = 1; /* To get a better display, check if the invalid char is UTF-8 */ if ((os[i] & 0xE0) == 0xC0 /* 110xxxxx */) { if ((i < ossz - 1) && ((os[i + 1] & 0xC0) == 0x80 /* 10xxxxxx */)) nb = 2; goto disp; } if ((os[i] & 0xF0) == 0xE0 /* 1110xxxx */) { if ((i < ossz - 2) && ((os[i + 1] & 0xC0) == 0x80 /* 10xxxxxx */) && ((os[i + 2] & 0xC0) == 0x80 /* 10xxxxxx */)) nb = 3; goto disp; } if ((os[i] & 0xF8) == 0xF0 /* 11110xxx */) { if ((i < ossz - 3) && ((os[i + 1] & 0xC0) == 0x80 /* 10xxxxxx */) && ((os[i + 2] & 0xC0) == 0x80 /* 10xxxxxx */) && ((os[i + 3] & 0xC0) == 0x80 /* 10xxxxxx */)) nb = 4; goto disp; } if ((os[i] & 0xFC) == 0xF8 /* 111110xx */) { if ((i < ossz - 4) && ((os[i + 1] & 0xC0) == 0x80 /* 10xxxxxx */) && ((os[i + 2] & 0xC0) == 0x80 /* 10xxxxxx */) && ((os[i + 3] & 0xC0) == 0x80 /* 10xxxxxx */) && ((os[i + 4] & 0xC0) == 0x80 /* 10xxxxxx */)) nb = 5; goto disp; } if ((os[i] & 0xFE) == 0xFC /* 1111110x */) { if ((i < ossz - 5) && ((os[i + 1] & 0xC0) == 0x80 /* 10xxxxxx */) && ((os[i + 2] & 0xC0) == 0x80 /* 10xxxxxx */) && ((os[i + 3] & 0xC0) == 0x80 /* 10xxxxxx */) && ((os[i + 4] & 0xC0) == 0x80 /* 10xxxxxx */) && ((os[i + 5] & 0xC0) == 0x80 /* 10xxxxxx */)) nb = 6; goto disp; } /* otherwise, we just display the hex code */ TRACE_DEBUG(INFO, "Invalid character (0x%hhX) at offset %d in DiameterIdentity '%.*s'", os[i], i+1, (int)ossz, os); return 0; disp: TRACE_DEBUG(INFO, "Invalid character '%.*s' at offset %d in DiameterIdentity '%.*s'", nb, os + i, i+1, (int)ossz, os); return 0; } #endif /* DIAMID_IDNA_IGNORE */ return 1; } /* The following function validates a string as a Diameter Identity or applies the IDNA transformation on it if *inoutsz is != 0 on entry, *id may not be \0-terminated. memory has the following meaning: 0: *id can be realloc'd. 1: *id must be malloc'd on output (was static) */ int fd_os_validate_DiameterIdentity(char ** id, size_t * inoutsz, int memory) { #if !defined(DIAMID_IDNA_IGNORE) && !defined(DIAMID_IDNA_REJECT) int gotsize = 0; #endif /* defined(DIAMID_IDNA_IGNORE) || defined(DIAMID_IDNA_REJECT) */ TRACE_ENTRY("%p %p", id, inoutsz); CHECK_PARAMS( id && *id && inoutsz ); if (!*inoutsz) *inoutsz = strlen(*id); #if !defined(DIAMID_IDNA_IGNORE) && !defined(DIAMID_IDNA_REJECT) else gotsize = 1; #endif /* defined(DIAMID_IDNA_IGNORE) || defined(DIAMID_IDNA_REJECT) */ #ifndef DIAMID_IDNA_IGNORE if (!fd_os_is_valid_DiameterIdentity((os0_t)*id, *inoutsz)) { #ifdef DIAMID_IDNA_REJECT TRACE_DEBUG(INFO, "The string '%s' is not a valid DiameterIdentity!", *id); TRACE_DEBUG(INFO, "Returning EINVAL since fD is compiled with option DIAMID_IDNA_REJECT."); return EINVAL; #else /* DIAMID_IDNA_REJECT */ char *processed; int ret; if (gotsize) { /* make it \0-terminated */ if (memory) { CHECK_MALLOC( *id = os0dup(*id, *inoutsz) ); memory = 0; } else { CHECK_MALLOC( *id = realloc(*id, *inoutsz + 1) ); (*id)[*inoutsz] = '0'; } } ret = idna_to_ascii_8z ( *id, &processed, IDNA_USE_STD3_ASCII_RULES ); if (ret == IDNA_SUCCESS) { TRACE_DEBUG(INFO, "The string '%s' is not a valid DiameterIdentity, it was changed to '%s'", *id, processed); if (memory == 0) free(*id); *id = processed; *inoutsz = strlen(processed); /* Done! */ } else { TRACE_DEBUG(INFO, "The string '%s' is not a valid DiameterIdentity and cannot be sanitanized: %s", *id, idna_strerror (ret)); return EINVAL; } #endif /* DIAMID_IDNA_REJECT */ } else #endif /* ! DIAMID_IDNA_IGNORE */ { if (memory == 1) { CHECK_MALLOC( *id = os0dup(*id, *inoutsz) ); } } return 0; } /* Analyze a DiameterURI and return its components. Return EINVAL if the URI is not valid. *diamid is malloc'd on function return and must be freed (it is processed by fd_os_validate_DiameterIdentity). *secure is 0 (no security) or 1 (security enabled) on return. *port is 0 (default) or a value in host byte order on return. *transport is 0 (default) or IPPROTO_* on return. *proto is 0 (default) or 'd' (diameter), 'r' (radius), or 't' (tacacs+) on return. */ int fd_os_parse_DiameterURI(uint8_t * uri, size_t urisz, DiamId_t * diamid, size_t * diamidlen, int * secure, uint16_t * port, int * transport, char *proto) { size_t offset = 0; DiamId_t fqdn = NULL; size_t fqdnlen; TRACE_ENTRY("%p %zd %p %p %p %p %p %p", uri, urisz, diamid, diamidlen, secure, port, transport, proto); CHECK_PARAMS( uri && urisz ); CHECK_PARAMS( urisz > 7 ); /* "aaa" + "://" + something else at least */ /* Initialize values */ if (secure) *secure = 0; if (port) *port = 0; if (transport) *transport = 0; if (proto) *proto = 0; /* Check the beginning */ if (memcmp( uri, "aaa", 3)) { TRACE_DEBUG(INFO, "Invalid DiameterURI prefix: got '%.*s', expected 'aaa'", 3, uri); return EINVAL; } offset += 3; /* Secure? */ if (uri[offset] == (uint8_t)'s') { if (secure) *secure = 1; offset += 1; } /* Remaining of URI marker */ if (memcmp( uri + offset, "://", 3)) { TRACE_DEBUG(INFO, "Invalid DiameterURI prefix: got '%.*s', expected 'aaa://' or 'aaas://'", (int)offset + 3, uri); return EINVAL; } offset += 3; /* This is the start of the FQDN */ fqdn = (DiamId_t)uri + offset; for ( ; offset < urisz ; offset++ ) { /* Stop only when we find ':' or ';' */ if ((uri[offset] == (uint8_t)':') || (uri[offset] == (uint8_t)';')) break; } fqdnlen = offset - (fqdn - (DiamId_t)uri); CHECK_FCT(fd_os_validate_DiameterIdentity(&fqdn, &fqdnlen, 1)); if (diamid) *diamid = fqdn; else free(fqdn); if (diamidlen) *diamidlen = fqdnlen; if (offset == urisz) return 0; /* Finished */ /* Is there a port ? */ if (uri[offset] == ':') { uint16_t p = 0; do { offset++; if (offset == urisz) break; uint32_t t = (uint32_t)((char)uri[offset] - '0'); if (t > 9) break; /* we did not get a digit */ t += p * 10; /* the port is specified in decimal base */ if (t >= (1<<16)) { TRACE_DEBUG(INFO, "Invalid DiameterURI: port value is too big."); return EINVAL; } p = t; } while (1); if (port) *port = p; } if (offset == urisz) return 0; /* Finished */ /* Is there a transport? */ if ( (urisz - offset > CONSTSTRLEN(";transport=")) && !strncasecmp((char *)uri + offset, ";transport=", CONSTSTRLEN(";transport=")) ) { offset += CONSTSTRLEN(";transport="); if (urisz - offset < 3) { TRACE_DEBUG(INFO, "Invalid DiameterURI: transport string is too short, ignored."); return 0; } if (!strncasecmp((char *)uri + offset, "tcp", CONSTSTRLEN("tcp"))) { if (transport) *transport = IPPROTO_TCP; offset += CONSTSTRLEN("tcp"); goto after_transport; } if (!strncasecmp((char *)uri + offset, "udp", CONSTSTRLEN("udp"))) { if (transport) *transport = IPPROTO_UDP; offset += CONSTSTRLEN("udp"); goto after_transport; } if ((urisz - offset > 3) && !strncasecmp((char *)uri + offset, "sctp", CONSTSTRLEN("sctp"))) { if (transport) { #ifndef DISABLE_SCTP *transport = IPPROTO_SCTP; #else /* DISABLE_SCTP */ TRACE_DEBUG(INFO, "Received DiameterURI with 'transport=sctp' but DISABLE_SCTP was selected"); *transport = 0; #endif /* DISABLE_SCTP */ } offset += CONSTSTRLEN("sctp"); goto after_transport; } TRACE_DEBUG(INFO, "Invalid DiameterURI: transport string is not recognized ('%.*s').", (int)(urisz - offset), uri + offset); return EINVAL; } after_transport: if (offset == urisz) return 0; /* Finished */ /* Is there a protocol? */ if ( ((urisz - offset) > CONSTSTRLEN(";protocol=")) && (!strncasecmp((char *)uri + offset, ";protocol=", CONSTSTRLEN(";protocol="))) ) { offset += CONSTSTRLEN(";protocol="); if ( ((urisz - offset) >= CONSTSTRLEN("diameter")) && (!strncasecmp((char *)uri + offset, "diameter", CONSTSTRLEN("diameter"))) ) { if (proto) *proto = 'd'; offset += CONSTSTRLEN("diameter"); goto after_proto; } if ( ((urisz - offset) >= CONSTSTRLEN("radius")) && (!strncasecmp((char *)uri + offset, "radius", CONSTSTRLEN("radius"))) ) { if (proto) *proto = 'r'; offset += CONSTSTRLEN("radius"); goto after_proto; } if ( ((urisz - offset) >= CONSTSTRLEN("tacacs+")) && (!strncasecmp((char *)uri + offset, "tacacs+", CONSTSTRLEN("tacacs+"))) ) { if (proto) *proto = 't'; offset += CONSTSTRLEN("tacacs+"); goto after_proto; } TRACE_DEBUG(INFO, "Invalid DiameterURI: protocol string is not recognized ('%.*s').", (int)(urisz - offset), uri + offset); return EINVAL; } after_proto: if (offset == urisz) return 0; /* Finished */ TRACE_DEBUG(INFO, "Invalid DiameterURI: final part of string is not recognized ('%.*s').", (int)(urisz - offset), uri + offset); return EINVAL; } /********************************************************************************************************/ /* Hash function -- credits to Austin Appleby, thank you ^^ */ /* See http://murmurhash.googlepages.com for more information on this function */ /* the strings are NOT always aligned properly (ex: received in RADIUS message), so we use the aligned MurmurHash2 function as needed */ #define _HASH_MIX(h,k,m) { k *= m; k ^= k >> r; k *= m; h *= m; h ^= k; } uint32_t fd_os_hash ( uint8_t * string, size_t len ) { uint32_t hash = len; uint8_t * data = string; const unsigned int m = 0x5bd1e995; const int r = 24; int align = (long)string & 3; if (!align || (len < 4)) { /* In case data is aligned, MurmurHash2 function */ while(len >= 4) { /* Mix 4 bytes at a time into the hash */ uint32_t k = *(uint32_t *)data; /* We don't care about the byte order */ _HASH_MIX(hash, k, m); data += 4; len -= 4; } /* Handle the last few bytes of the input */ switch(len) { case 3: hash ^= data[2] << 16; case 2: hash ^= data[1] << 8; case 1: hash ^= data[0]; hash *= m; } } else { /* Unaligned data, use alignment-safe slower version */ /* Pre-load the temp registers */ uint32_t t = 0, d = 0; switch(align) { case 1: t |= data[2] << 16; case 2: t |= data[1] << 8; case 3: t |= data[0]; } t <<= (8 * align); data += 4-align; len -= 4-align; /* From this point, "data" can be read by chunks of 4 bytes */ int sl = 8 * (4-align); int sr = 8 * align; /* Mix */ while(len >= 4) { uint32_t k; d = *(unsigned int *)data; k = (t >> sr) | (d << sl); _HASH_MIX(hash, k, m); t = d; data += 4; len -= 4; } /* Handle leftover data in temp registers */ d = 0; if(len >= align) { uint32_t k; switch(align) { case 3: d |= data[2] << 16; case 2: d |= data[1] << 8; case 1: d |= data[0]; } k = (t >> sr) | (d << sl); _HASH_MIX(hash, k, m); data += align; len -= align; /* Handle tail bytes */ switch(len) { case 3: hash ^= data[2] << 16; case 2: hash ^= data[1] << 8; case 1: hash ^= data[0]; hash *= m; }; } else { switch(len) { case 3: d |= data[2] << 16; case 2: d |= data[1] << 8; case 1: d |= data[0]; case 0: hash ^= (t >> sr) | (d << sl); hash *= m; } } } /* Do a few final mixes of the hash to ensure the last few bytes are well-incorporated. */ hash ^= hash >> 13; hash *= m; hash ^= hash >> 15; return hash; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdproto/portability.c000066400000000000000000000056721333553357400237370ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2012, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdproto-internal.h" /* Replacement for clock_gettime for the Mac OS */ #ifndef HAVE_CLOCK_GETTIME int clock_gettime(int clk_id, struct timespec* ts) { struct timeval tv; gettimeofday (&tv, NULL); ts->tv_sec = tv.tv_sec; ts->tv_nsec = tv.tv_usec * 1000; return 0; } #endif /* HAVE_CLOCK_GETTIME */ /* Replacement for strndup for the Mac OS */ #ifndef HAVE_STRNDUP char * strndup (char *str, size_t len) { char * output; size_t outlen; output = memchr(str, 0, len); if (output == NULL) { outlen = len; } else { outlen = output - str; } CHECK_MALLOC_DO( output = malloc (outlen + 1), return NULL ); output[outlen] = '\0'; memcpy (output, str, outlen); return output; } #endif /* HAVE_STRNDUP */ nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdproto/rt_data.c000066400000000000000000000261461333553357400230120ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Routing module helpers. * * This file provides support for the rt_data structure manipulation. */ #include "fdproto-internal.h" /* Structure that contains the routing data for a message */ struct rt_data { int extracted; /* if 0, candidates is ordered by diamid, otherwise the order is unspecified. This also counts the number of times the message was (re-)sent, as a side effect */ struct fd_list candidates; /* All the candidates. Items are struct rtd_candidate. */ struct fd_list errors; /* All errors received from other peers for this message */ }; /* Items of the errors list */ struct rtd_error { struct fd_list chain; /* link in the list, ordered by nexthop (fd_os_cmp) */ DiamId_t nexthop;/* the peer the message was sent to */ size_t nexthoplen; /* cached string length */ DiamId_t erh; /* the origin of the error */ size_t erhlen; /* cached string length */ uint32_t code; /* the error code */ }; /* Create a new structure to store routing data */ int fd_rtd_init(struct rt_data ** rtd) { struct rt_data *new; TRACE_ENTRY("%p", rtd); CHECK_PARAMS(rtd); /* Alloc the structure */ CHECK_MALLOC( new = malloc(sizeof(struct rt_data)) ); memset(new, 0, sizeof(struct rt_data) ); fd_list_init(&new->candidates, new); fd_list_init(&new->errors, new); *rtd = new; return 0; } /* Destroy the routing data */ void fd_rtd_free(struct rt_data ** rtd) { struct rt_data *old; TRACE_ENTRY("%p", rtd); CHECK_PARAMS_DO(rtd, return ); old = *rtd; *rtd = NULL; while (!FD_IS_LIST_EMPTY(&old->candidates)) { struct rtd_candidate * c = (struct rtd_candidate *) old->candidates.next; fd_list_unlink(&c->chain); free(c->diamid); free(c->realm); free(c); } while (!FD_IS_LIST_EMPTY(&old->errors)) { struct rtd_error * c = (struct rtd_error *) old->errors.next; fd_list_unlink(&c->chain); free(c->nexthop); free(c->erh); free(c); } free(old); return; } /* Add a peer to the candidates list. The source is our local peer list, so no need to care for the case here. */ int fd_rtd_candidate_add(struct rt_data * rtd, DiamId_t peerid, size_t peeridlen, DiamId_t realm, size_t realmlen) { struct fd_list * prev; struct rtd_candidate * new; TRACE_ENTRY("%p %p %zd %p %zd", rtd, peerid, peeridlen, realm, realmlen); CHECK_PARAMS(rtd && peerid && peeridlen); /* Since the peers are ordered when they are added (fd_g_activ_peers) we search for the position from the end -- this should be efficient */ for (prev = rtd->candidates.prev; prev != &rtd->candidates; prev = prev->prev) { struct rtd_candidate * cp = (struct rtd_candidate *) prev; int cmp = fd_os_cmp(peerid, peeridlen, cp->diamid, cp->diamidlen); if (cmp > 0) break; if (cmp == 0) /* The candidate is already in the list */ return 0; } /* Create the new entry */ CHECK_MALLOC( new = malloc(sizeof(struct rtd_candidate)) ); memset(new, 0, sizeof(struct rtd_candidate) ); fd_list_init(&new->chain, new); CHECK_MALLOC( new->diamid = os0dup(peerid, peeridlen) ) new->diamidlen = peeridlen; if (realm) { CHECK_MALLOC( new->realm = os0dup(realm, realmlen) ) new->realmlen = realmlen; } /* insert in the list at the correct position */ fd_list_insert_after(prev, &new->chain); return 0; } /* Remove a peer from the candidates (if it is found). Case insensitive search since the names are received from other peers */ void fd_rtd_candidate_del(struct rt_data * rtd, uint8_t * id, size_t idsz) { struct fd_list * li; TRACE_ENTRY("%p %p %zd", rtd, id, idsz); CHECK_PARAMS_DO( rtd && id && idsz, return ); if (!fd_os_is_valid_DiameterIdentity(id, idsz)) /* it cannot be in the list */ return; for (li = rtd->candidates.next; li != &rtd->candidates; li = li->next) { struct rtd_candidate * c = (struct rtd_candidate *) li; int cont; int cmp = fd_os_almostcasesrch(id, idsz, c->diamid, c->diamidlen, &cont); if (!cmp) { /* Found it! Remove it */ fd_list_unlink(&c->chain); free(c->diamid); free(c->realm); free(c); break; } if (cont) continue; /* The list is guaranteed to be ordered only if not extracted */ if (! rtd->extracted) break; } return; } /* If a peer returned a protocol error for this message, save it so that we don't try to send it there again. Case insensitive search since the names are received from other peers*/ int fd_rtd_error_add(struct rt_data * rtd, DiamId_t sentto, size_t senttolen, uint8_t * origin, size_t originsz, uint32_t rcode, struct fd_list ** candidates, int * sendingattemtps) { struct fd_list * li; int match = 0; TRACE_ENTRY("%p %p %zd %p %zd %u %p %p", rtd, sentto, senttolen, origin, originsz, rcode, candidates, sendingattemtps); CHECK_PARAMS( rtd && sentto && senttolen ); /* origin may be NULL */ /* First add the new error entry */ for (li = rtd->errors.next; li != &rtd->errors; li = li->next) { struct rtd_error * e = (struct rtd_error *) li; int cmp = fd_os_cmp(sentto, senttolen, e->nexthop, e->nexthoplen); if (cmp > 0) continue; if (!cmp) match = 1; break; } /* If we already had this entry, we should not have sent the message again to this peer... anyway, let's close our eyes. */ /* in the normal case, we save the error */ if (!match) { /* Add a new entry in the error list */ struct rtd_error * new; CHECK_MALLOC( new = malloc(sizeof(struct rtd_error)) ); memset(new, 0, sizeof(struct rtd_error)); fd_list_init(&new->chain, NULL); CHECK_MALLOC(new->nexthop = os0dup(sentto, senttolen)); new->nexthoplen = senttolen; if (origin) { if (!originsz) { originsz=strlen((char *)origin); } else { if (!fd_os_is_valid_DiameterIdentity(origin, originsz)){ TRACE_DEBUG(FULL, "Received error %d from peer with invalid Origin-Host AVP, not saved", rcode); origin = NULL; goto after_origin; } } CHECK_MALLOC( new->erh = (DiamId_t)os0dup(origin, originsz) ); new->erhlen = originsz; } after_origin: new->code = rcode; fd_list_insert_before(li, &new->chain); } /* Finally, remove this (these) peers from the candidate list */ fd_rtd_candidate_del(rtd, (os0_t)sentto, senttolen); if (origin) fd_rtd_candidate_del(rtd, origin, originsz); if (candidates) *candidates = &rtd->candidates; if (sendingattemtps) *sendingattemtps = rtd->extracted; /* Done! */ return 0; } /* Only retrieve the number of times this message has been processed by the routing-out mechanism (i.e. number of times it was failed over) */ int fd_rtd_get_nb_attempts(struct rt_data * rtd, int * sendingattemtps) { TRACE_ENTRY("%p %p", rtd, sendingattemtps); CHECK_PARAMS( rtd && sendingattemtps ); *sendingattemtps = rtd->extracted; /* Done! */ return 0; } /* Extract the list of valid candidates, and initialize their scores */ void fd_rtd_candidate_extract(struct rt_data * rtd, struct fd_list ** candidates, int ini_score) { struct fd_list * li; TRACE_ENTRY("%p %p", rtd, candidates); CHECK_PARAMS_DO( candidates, return ); CHECK_PARAMS_DO( rtd, { *candidates = NULL; return; } ); *candidates = &rtd->candidates; /* Reset all scores to INITIAL score */ for (li = rtd->candidates.next; li != &rtd->candidates; li = li->next) { struct rtd_candidate * c = (struct rtd_candidate *) li; c->score = ini_score; } rtd->extracted += 1; return; } /* Reorder the list of peers. If several peer have the same highest score, they are randomized. */ int fd_rtd_candidate_reorder(struct fd_list * candidates) { struct fd_list unordered = FD_LIST_INITIALIZER(unordered), *li; struct fd_list highest = FD_LIST_INITIALIZER(highest); int hs = -1; TRACE_ENTRY("%p", candidates); CHECK_PARAMS( candidates ); /* First, move all items from candidates to the undordered list */ fd_list_move_end(&unordered, candidates); /* Now extract each element from unordered and add it back to list ordered by score */ while (!FD_IS_LIST_EMPTY(&unordered)) { struct rtd_candidate * c = (struct rtd_candidate *) unordered.next; fd_list_unlink(&c->chain); /* If this candidate has a higher score than the previous ones */ if (c->score > hs) { /* Then we move the previous high score items at end of the list */ fd_list_move_end(candidates, &highest); /* And the new high score is set */ hs = c->score; } /* If this candidate equals the higher score, add it into highest list at a random place */ if (c->score == hs) { if (rand() & 1) { fd_list_insert_after(&highest, &c->chain); } else { fd_list_insert_before(&highest, &c->chain); } /* Otherwise, insert at normal place in the list */ } else { /* Find the position in ordered candidates list */ for (li = candidates->next; li != candidates; li = li->next) { struct rtd_candidate * cnext = (struct rtd_candidate *) li; if (cnext->score >= c->score) break; } /* Add the element there */ fd_list_insert_before(li, &c->chain); } } /* Now simply move back all the "highest" candidates at the end of the list */ fd_list_move_end(candidates, &highest); return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdproto/sessions.c000066400000000000000000000752361333553357400232460ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* Sessions module. * * Basic functionalities to help implementing User sessions state machines from RFC3588. */ #include "fdproto-internal.h" /*********************** Parameters **********************/ /* Size of the hash table containing the session objects (pow of 2. ex: 6 => 2^6 = 64). must be between 0 and 31. */ #ifndef SESS_HASH_SIZE #define SESS_HASH_SIZE 6 #endif /* SESS_HASH_SIZE */ /* Default lifetime of a session, in seconds. (31 days = 2678400 seconds) */ #ifndef SESS_DEFAULT_LIFETIME #define SESS_DEFAULT_LIFETIME 2678400 #endif /* SESS_DEFAULT_LIFETIME */ /********************** /Parameters **********************/ /* Eyescatchers definitions */ #define SH_EYEC 0x53554AD1 #define SD_EYEC 0x5355D474 #define SI_EYEC 0x53551D /* Macro to check an object is valid */ #define VALIDATE_SH( _obj ) ( ((_obj) != NULL) && ( ((struct session_handler *)(_obj))->eyec == SH_EYEC) ) #define VALIDATE_SI( _obj ) ( ((_obj) != NULL) && ( ((struct session *)(_obj))->eyec == SI_EYEC) ) /* Handlers registered by users of the session module */ struct session_handler { int eyec; /* An eye catcher also used to ensure the object is valid, must be SH_EYEC */ int id; /* A unique integer to identify this handler */ void (*cleanup)(struct sess_state *, os0_t, void *); /* The cleanup function to be called for cleaning a state */ session_state_dump state_dump; /* dumper function */ void *opaque; /* a value that is passed as is to the cleanup callback */ }; static int hdl_id = 0; /* A global counter to initialize the id field */ static pthread_mutex_t hdl_lock = PTHREAD_MUTEX_INITIALIZER; /* lock to protect hdl_id; we could use atomic operations otherwise (less portable) */ /* Data structures linked from the sessions, containing the applications states */ struct state { int eyec; /* Must be SD_EYEC */ struct sess_state *state; /* The state registered by the application, never NULL (or the whole object is deleted) */ struct fd_list chain; /* Chaining in the list of session's states ordered by hdl->id */ union { struct session_handler *hdl; /* The handler for which this state was registered */ os0_t sid; /* For deleted state, the sid of the session it belong to */ }; }; /* Session object, one for each value of Session-Id AVP */ struct session { int eyec; /* Eyecatcher, SI_EYEC */ os0_t sid; /* The \0-terminated Session-Id */ size_t sidlen; /* cached length of sid */ uint32_t hash; /* computed hash of sid */ struct fd_list chain_h;/* chaining in the hash table of sessions. */ struct timespec timeout;/* Timeout date for the session */ struct fd_list expire; /* List of expiring sessions, ordered by timeouts. */ pthread_mutex_t stlock; /* A lock to protect the list of states associated with this session */ struct fd_list states; /* Sentinel for the list of states of this session. */ int msg_cnt;/* Reference counter for the messages pointing to this session */ int is_destroyed; /* boolean telling if fd_sess_detroy has been called on this */ }; /* Sessions hash table, to allow fast sid to session retrieval */ static struct { struct fd_list sentinel; /* sentinel element for this sublist. The sublist is ordered by hash value, then fd_os_cmp(sid). */ pthread_mutex_t lock; /* the mutex for this sublist -- we might probably change it to rwlock for a little optimization */ } sess_hash [ 1 << SESS_HASH_SIZE ] ; #define H_MASK( __hash ) ((__hash) & (( 1 << SESS_HASH_SIZE ) - 1)) #define H_LIST( _hash ) (&(sess_hash[H_MASK(_hash)].sentinel)) #define H_LOCK( _hash ) (&(sess_hash[H_MASK(_hash)].lock )) static uint32_t sess_cnt = 0; /* counts all active session (that are in the expiry list) */ /* The following are used to generate sid values that are eternaly unique */ static uint32_t sid_h; /* initialized to the current time in fd_sess_init */ static uint32_t sid_l; /* incremented each time a session id is created */ static pthread_mutex_t sid_lock = PTHREAD_MUTEX_INITIALIZER; /* Expiring sessions management */ static struct fd_list exp_sentinel = FD_LIST_INITIALIZER(exp_sentinel); /* list of sessions ordered by their timeout date */ static pthread_mutex_t exp_lock = PTHREAD_MUTEX_INITIALIZER; /* lock protecting the list. */ static pthread_cond_t exp_cond = PTHREAD_COND_INITIALIZER; /* condvar used by the expiry mecahinsm. */ static pthread_t exp_thr = (pthread_t)NULL; /* The expiry thread that handles cleanup of expired sessions */ /* Hierarchy of the locks, to avoid deadlocks: * hash lock > state lock > expiry lock * i.e. state lock can be taken while holding the hash lock, but not while holding the expiry lock. * As well, the hash lock cannot be taken while holding a state lock. */ /********************************************************************************************************/ /* Initialize a session object. It is not linked now. sid must be already malloc'ed. The hash has already been computed. */ static struct session * new_session(os0_t sid, size_t sidlen, uint32_t hash) { struct session * sess; TRACE_ENTRY("%p %zd", sid, sidlen); CHECK_PARAMS_DO( sid && sidlen, return NULL ); CHECK_MALLOC_DO( sess = malloc(sizeof(struct session)), return NULL ); memset(sess, 0, sizeof(struct session)); sess->eyec = SI_EYEC; sess->sid = sid; sess->sidlen = sidlen; sess->hash = hash; fd_list_init(&sess->chain_h, sess); CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &sess->timeout), return NULL ); sess->timeout.tv_sec += SESS_DEFAULT_LIFETIME; fd_list_init(&sess->expire, sess); CHECK_POSIX_DO( pthread_mutex_init(&sess->stlock, NULL), return NULL ); fd_list_init(&sess->states, sess); return sess; } /* destroy the session object. It should really be already unlinked... */ static void del_session(struct session * s) { ASSERT(FD_IS_LIST_EMPTY(&s->states)); free(s->sid); fd_list_unlink(&s->chain_h); fd_list_unlink(&s->expire); CHECK_POSIX_DO( pthread_mutex_destroy(&s->stlock), /* continue */ ); free(s); } /* The expiry thread */ static void * exp_fct(void * arg) { fd_log_threadname ( "Session/expire" ); TRACE_ENTRY( "" ); do { struct timespec now; struct session * first; CHECK_POSIX_DO( pthread_mutex_lock(&exp_lock), break ); pthread_cleanup_push( fd_cleanup_mutex, &exp_lock ); again: /* Check if there are expiring sessions available */ if (FD_IS_LIST_EMPTY(&exp_sentinel)) { /* Just wait for a change or cancelation */ CHECK_POSIX_DO( pthread_cond_wait( &exp_cond, &exp_lock ), break /* this might not pop the cleanup handler, but since we ASSERT(0), it is not the big issue... */ ); /* Restart the loop on wakeup */ goto again; } /* Get the pointer to the session that expires first */ first = (struct session *)(exp_sentinel.next->o); ASSERT( VALIDATE_SI(first) ); /* Get the current time */ CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &now), break ); /* If first session is not expired, we just wait until it happens */ if ( TS_IS_INFERIOR( &now, &first->timeout ) ) { CHECK_POSIX_DO2( pthread_cond_timedwait( &exp_cond, &exp_lock, &first->timeout ), ETIMEDOUT, /* ETIMEDOUT is a normal error, continue */, /* on other error, */ break ); /* on wakeup, loop */ goto again; } /* Now, the first session in the list is expired; destroy it */ pthread_cleanup_pop( 0 ); CHECK_POSIX_DO( pthread_mutex_unlock(&exp_lock), break ); CHECK_FCT_DO( fd_sess_destroy( &first ), break ); } while (1); TRACE_DEBUG(INFO, "A system error occurred in session module! Expiry thread is terminating..."); ASSERT(0); return NULL; } /********************************************************************************************************/ /* Initialize the session module */ int fd_sess_init(void) { int i; TRACE_ENTRY( "" ); /* Initialize the global counters */ sid_h = (uint32_t) time(NULL); sid_l = 0; /* Initialize the hash table */ for (i = 0; i < sizeof(sess_hash) / sizeof(sess_hash[0]); i++) { fd_list_init( &sess_hash[i].sentinel, NULL ); CHECK_POSIX( pthread_mutex_init(&sess_hash[i].lock, NULL) ); } return 0; } /* Run this when initializations are complete. */ int fd_sess_start(void) { /* Start session garbage collector (expiry) */ CHECK_POSIX( pthread_create(&exp_thr, NULL, exp_fct, NULL) ); return 0; } /* Terminate */ void fd_sess_fini(void) { TRACE_ENTRY(""); CHECK_FCT_DO( fd_thr_term(&exp_thr), /* continue */ ); /* Destroy all sessions in the hash table, and the hash table itself? -- How to do it without a race condition ? */ return; } /* Create a new handler */ int fd_sess_handler_create ( struct session_handler ** handler, void (*cleanup)(struct sess_state *, os0_t, void *), session_state_dump dumper, void * opaque ) { struct session_handler *new; TRACE_ENTRY("%p %p", handler, cleanup); CHECK_PARAMS( handler && cleanup ); CHECK_MALLOC( new = malloc(sizeof(struct session_handler)) ); memset(new, 0, sizeof(struct session_handler)); CHECK_POSIX( pthread_mutex_lock(&hdl_lock) ); new->id = ++hdl_id; CHECK_POSIX( pthread_mutex_unlock(&hdl_lock) ); new->eyec = SH_EYEC; new->cleanup = cleanup; new->state_dump = dumper; new->opaque = opaque; *handler = new; return 0; } /* Destroy a handler, and all states attached to this handler. This operation is very slow but we don't care since it's rarely used. * Note that it's better to call this function after all sessions have been deleted... */ int fd_sess_handler_destroy ( struct session_handler ** handler, void ** opaque ) { struct session_handler * del; /* place to save the list of states to be cleaned up. We do it after finding them to avoid deadlocks. the "o" field becomes a copy of the sid. */ struct fd_list deleted_states = FD_LIST_INITIALIZER( deleted_states ); int i; TRACE_ENTRY("%p", handler); CHECK_PARAMS( handler && VALIDATE_SH(*handler) ); del = *handler; *handler = NULL; del->eyec = 0xdead; /* The handler is not valid anymore for any other operation */ /* Now find all sessions with data registered for this handler, and move this data to the deleted_states list. */ for (i = 0; i < sizeof(sess_hash) / sizeof(sess_hash[0]); i++) { struct fd_list * li_si; CHECK_POSIX( pthread_mutex_lock(&sess_hash[i].lock) ); for (li_si = sess_hash[i].sentinel.next; li_si != &sess_hash[i].sentinel; li_si = li_si->next) { /* for each session in the hash line */ struct fd_list * li_st; struct session * sess = (struct session *)(li_si->o); CHECK_POSIX( pthread_mutex_lock(&sess->stlock) ); for (li_st = sess->states.next; li_st != &sess->states; li_st = li_st->next) { /* for each state in this session */ struct state * st = (struct state *)(li_st->o); /* The list is ordered */ if (st->hdl->id < del->id) continue; if (st->hdl->id == del->id) { /* This state belongs to the handler we are deleting, move the item to the deleted_states list */ fd_list_unlink(&st->chain); st->sid = sess->sid; fd_list_insert_before(&deleted_states, &st->chain); } break; } CHECK_POSIX( pthread_mutex_unlock(&sess->stlock) ); } CHECK_POSIX( pthread_mutex_unlock(&sess_hash[i].lock) ); } /* Now, delete all states after calling their cleanup handler */ while (!FD_IS_LIST_EMPTY(&deleted_states)) { struct state * st = (struct state *)(deleted_states.next->o); TRACE_DEBUG(FULL, "Calling cleanup handler for session '%s' and data %p", st->sid, st->state); (*del->cleanup)(st->state, st->sid, del->opaque); fd_list_unlink(&st->chain); free(st); } if (opaque) *opaque = del->opaque; /* Free the handler */ free(del); return 0; } /* Create a new session object with the default timeout value, and link it. The refcount is increased by 1, whether the session existed or not */ int fd_sess_new ( struct session ** session, DiamId_t diamid, size_t diamidlen, uint8_t * opt, size_t optlen ) { os0_t sid = NULL; size_t sidlen; uint32_t hash; struct session * sess; struct fd_list * li; int found = 0; int ret = 0; TRACE_ENTRY("%p %p %zd %p %zd", session, diamid, diamidlen, opt, optlen); CHECK_PARAMS( session && (diamid || opt) ); if (diamid) { if (!diamidlen) { diamidlen = strlen(diamid); } /* We check if the string is a valid DiameterIdentity */ CHECK_PARAMS( fd_os_is_valid_DiameterIdentity((uint8_t *)diamid, diamidlen) ); } else { diamidlen = 0; } if (opt) { if (!optlen) { optlen = strlen((char *)opt); } else { CHECK_PARAMS( fd_os_is_valid_os0(opt, optlen) ); } } else { optlen = 0; } /* Ok, first create the identifier for the string */ if (diamid == NULL) { /* opt is the full string */ CHECK_MALLOC( sid = os0dup(opt, optlen) ); sidlen = optlen; } else { uint32_t sid_h_cpy; uint32_t sid_l_cpy; /* ";;[;opt]" */ sidlen = diamidlen; sidlen += 22; /* max size of ';;' */ if (opt) sidlen += 1 + optlen; /* ';opt' */ sidlen++; /* space for the final \0 also */ CHECK_MALLOC( sid = malloc(sidlen) ); CHECK_POSIX( pthread_mutex_lock(&sid_lock) ); if ( ++sid_l == 0 ) /* overflow */ ++sid_h; sid_h_cpy = sid_h; sid_l_cpy = sid_l; CHECK_POSIX( pthread_mutex_unlock(&sid_lock) ); if (opt) { sidlen = snprintf((char*)sid, sidlen, "%.*s;%u;%u;%.*s", (int)diamidlen, diamid, sid_h_cpy, sid_l_cpy, (int)optlen, opt); } else { sidlen = snprintf((char*)sid, sidlen, "%.*s;%u;%u", (int)diamidlen, diamid, sid_h_cpy, sid_l_cpy); } } hash = fd_os_hash(sid, sidlen); /* Now find the place to add this object in the hash table. */ CHECK_POSIX( pthread_mutex_lock( H_LOCK(hash) ) ); pthread_cleanup_push( fd_cleanup_mutex, H_LOCK(hash) ); for (li = H_LIST(hash)->next; li != H_LIST(hash); li = li->next) { int cmp; struct session * s = (struct session *)(li->o); /* The list is ordered by hash and sid (in case of collisions) */ if (s->hash < hash) continue; if (s->hash > hash) break; cmp = fd_os_cmp(s->sid, s->sidlen, sid, sidlen); if (cmp < 0) continue; if (cmp > 0) break; /* A session with the same sid was already in the hash table */ found = 1; *session = s; break; } /* If the session did not exist, we can create it & link it in global tables */ if (!found) { CHECK_MALLOC_DO(sess = new_session(sid, sidlen, hash), { ret = ENOMEM; free(sid); goto out; } ); fd_list_insert_before(li, &sess->chain_h); /* hash table */ sess->msg_cnt++; } else { free(sid); CHECK_POSIX( pthread_mutex_lock(&(*session)->stlock) ); (*session)->msg_cnt++; CHECK_POSIX( pthread_mutex_unlock(&(*session)->stlock) ); /* it was found: was it previously destroyed? */ if ((*session)->is_destroyed == 0) { ret = EALREADY; goto out; } else { /* the session was marked destroyed, let's re-activate it. */ sess = *session; sess->is_destroyed = 0; /* update the expiry time */ CHECK_SYS_DO( clock_gettime(CLOCK_REALTIME, &sess->timeout), { ASSERT(0); } ); sess->timeout.tv_sec += SESS_DEFAULT_LIFETIME; } } /* We must insert in the expiry list */ CHECK_POSIX( pthread_mutex_lock( &exp_lock ) ); pthread_cleanup_push( fd_cleanup_mutex, &exp_lock ); /* Find the position in that list. We take it in reverse order */ for (li = exp_sentinel.prev; li != &exp_sentinel; li = li->prev) { struct session * s = (struct session *)(li->o); if (TS_IS_INFERIOR( &s->timeout, &sess->timeout ) ) break; } fd_list_insert_after( li, &sess->expire ); sess_cnt++; /* We added a new expiring element, we must signal */ if (li == &exp_sentinel) { CHECK_POSIX_DO( pthread_cond_signal(&exp_cond), { ASSERT(0); } ); /* if it fails, we might not pop the cleanup handlers, but this should not happen -- and we'd have a serious problem otherwise */ } /* We're done with the locked part */ pthread_cleanup_pop(0); CHECK_POSIX_DO( pthread_mutex_unlock( &exp_lock ), { ASSERT(0); } ); /* if it fails, we might not pop the cleanup handler, but this should not happen -- and we'd have a serious problem otherwise */ out: ; pthread_cleanup_pop(0); CHECK_POSIX( pthread_mutex_unlock( H_LOCK(hash) ) ); if (ret) /* in case of error */ return ret; *session = sess; return 0; } /* Find or create a session -- the msg refcount is increased */ int fd_sess_fromsid_msg ( uint8_t * sid, size_t len, struct session ** session, int * new) { int ret; TRACE_ENTRY("%p %zd %p %p", sid, len, session, new); CHECK_PARAMS( sid && session ); if (!fd_os_is_valid_os0(sid,len)) { TRACE_DEBUG(INFO, "Warning: a Session-Id value contains \\0 chars... (len:%zd, begin:'%.*s') => Debug messages may be truncated.", len, (int)len, sid); } /* All the work is done in sess_new */ ret = fd_sess_new ( session, NULL, 0, sid, len ); switch (ret) { case 0: case EALREADY: break; default: CHECK_FCT(ret); } if (new) *new = ret ? 0 : 1; return 0; } /* Get the sid of a session */ int fd_sess_getsid ( struct session * session, os0_t * sid, size_t * sidlen ) { TRACE_ENTRY("%p %p", session, sid); CHECK_PARAMS( VALIDATE_SI(session) && sid ); *sid = session->sid; if (sidlen) *sidlen = session->sidlen; return 0; } /* Change the timeout value of a session */ int fd_sess_settimeout( struct session * session, const struct timespec * timeout ) { struct fd_list * li; TRACE_ENTRY("%p %p", session, timeout); CHECK_PARAMS( VALIDATE_SI(session) && timeout ); /* Lock -- do we need to lock the hash table as well? I don't think so... */ CHECK_POSIX( pthread_mutex_lock( &exp_lock ) ); pthread_cleanup_push( fd_cleanup_mutex, &exp_lock ); /* Update the timeout */ fd_list_unlink(&session->expire); memcpy(&session->timeout, timeout, sizeof(struct timespec)); /* Find the new position in expire list. We take it in normal order */ for (li = exp_sentinel.next; li != &exp_sentinel; li = li->next) { struct session * s = (struct session *)(li->o); if (TS_IS_INFERIOR( &s->timeout, &session->timeout ) ) continue; break; } fd_list_insert_before( li, &session->expire ); /* We added a new expiring element, we must signal if it was in first position */ if (session->expire.prev == &exp_sentinel) { CHECK_POSIX_DO( pthread_cond_signal(&exp_cond), { ASSERT(0); /* so that we don't have a pending cancellation handler */ } ); } /* We're done */ pthread_cleanup_pop(0); CHECK_POSIX( pthread_mutex_unlock( &exp_lock ) ); return 0; } /* Destroy the states associated to a session, and mark it destroyed. */ int fd_sess_destroy ( struct session ** session ) { struct session * sess; int destroy_now; os0_t sid; int ret = 0; /* place to save the list of states to be cleaned up. We do it after finding them to avoid deadlocks. the "o" field becomes a copy of the sid. */ struct fd_list deleted_states = FD_LIST_INITIALIZER( deleted_states ); TRACE_ENTRY("%p", session); CHECK_PARAMS( session && VALIDATE_SI(*session) ); sess = *session; *session = NULL; /* Lock the hash line */ CHECK_POSIX( pthread_mutex_lock( H_LOCK(sess->hash) ) ); pthread_cleanup_push( fd_cleanup_mutex, H_LOCK(sess->hash) ); /* Unlink from the expiry list */ CHECK_POSIX_DO( pthread_mutex_lock( &exp_lock ), { ASSERT(0); /* otherwise cleanup handler is not pop'd */ } ); if (!FD_IS_LIST_EMPTY(&sess->expire)) { sess_cnt--; fd_list_unlink( &sess->expire ); /* no need to signal the condition here */ } CHECK_POSIX_DO( pthread_mutex_unlock( &exp_lock ), { ASSERT(0); /* otherwise cleanup handler is not pop'd */ } ); /* Now move all states associated to this session into deleted_states */ CHECK_POSIX_DO( pthread_mutex_lock( &sess->stlock ), { ASSERT(0); /* otherwise cleanup handler is not pop'd */ } ); while (!FD_IS_LIST_EMPTY(&sess->states)) { struct state * st = (struct state *)(sess->states.next->o); fd_list_unlink(&st->chain); fd_list_insert_before(&deleted_states, &st->chain); } CHECK_POSIX_DO( pthread_mutex_unlock( &sess->stlock ), { ASSERT(0); /* otherwise cleanup handler is not pop'd */ } ); /* Mark the session as destroyed */ destroy_now = (sess->msg_cnt == 0); if (destroy_now) { fd_list_unlink( &sess->chain_h ); sid = sess->sid; } else { sess->is_destroyed = 1; CHECK_MALLOC_DO( sid = os0dup(sess->sid, sess->sidlen), ret = ENOMEM ); } pthread_cleanup_pop(0); CHECK_POSIX( pthread_mutex_unlock( H_LOCK(sess->hash) ) ); if (ret) return ret; /* Now, really delete the states */ while (!FD_IS_LIST_EMPTY(&deleted_states)) { struct state * st = (struct state *)(deleted_states.next->o); fd_list_unlink(&st->chain); TRACE_DEBUG(FULL, "Calling handler %p cleanup for state %p registered with session '%s'", st->hdl, st, sid); (*st->hdl->cleanup)(st->state, sid, st->hdl->opaque); free(st); } /* Finally, destroy the session itself, if it is not referrenced by any message anymore */ if (destroy_now) { del_session(sess); } else { free(sid); } return 0; } /* Destroy a session if it is not used */ int fd_sess_reclaim ( struct session ** session ) { struct session * sess; uint32_t hash; int destroy_now = 0; TRACE_ENTRY("%p", session); CHECK_PARAMS( session && VALIDATE_SI(*session) ); sess = *session; hash = sess->hash; *session = NULL; CHECK_POSIX( pthread_mutex_lock( H_LOCK(hash) ) ); pthread_cleanup_push( fd_cleanup_mutex, H_LOCK(hash) ); CHECK_POSIX_DO( pthread_mutex_lock( &sess->stlock ), { ASSERT(0); /* otherwise, cleanup not poped on FreeBSD */ } ); pthread_cleanup_push( fd_cleanup_mutex, &sess->stlock ); CHECK_POSIX_DO( pthread_mutex_lock( &exp_lock ), { ASSERT(0); /* otherwise, cleanup not poped on FreeBSD */ } ); /* We only do something if the states list is empty */ if (FD_IS_LIST_EMPTY(&sess->states)) { /* In this case, we do as in destroy */ fd_list_unlink( &sess->expire ); destroy_now = (sess->msg_cnt == 0); if (destroy_now) { fd_list_unlink(&sess->chain_h); } else { /* just mark it as destroyed, it will be freed when the last message stops referencing it */ sess->is_destroyed = 1; } } CHECK_POSIX_DO( pthread_mutex_unlock( &exp_lock ), { ASSERT(0); /* otherwise, cleanup not poped on FreeBSD */ } ); pthread_cleanup_pop(0); CHECK_POSIX_DO( pthread_mutex_unlock( &sess->stlock ), { ASSERT(0); /* otherwise, cleanup not poped on FreeBSD */ } ); pthread_cleanup_pop(0); CHECK_POSIX( pthread_mutex_unlock( H_LOCK(hash) ) ); if (destroy_now) del_session(sess); return 0; } /* Save a state information with a session */ int fd_sess_state_store ( struct session_handler * handler, struct session * session, struct sess_state ** state ) { struct state *new; struct fd_list * li; int already = 0; int ret = 0; TRACE_ENTRY("%p %p %p", handler, session, state); CHECK_PARAMS( handler && VALIDATE_SH(handler) && session && VALIDATE_SI(session) && (!session->is_destroyed) && state ); /* Lock the session state list */ CHECK_POSIX( pthread_mutex_lock(&session->stlock) ); pthread_cleanup_push( fd_cleanup_mutex, &session->stlock ); /* Create the new state object */ CHECK_MALLOC_DO(new = malloc(sizeof(struct state)), { ret = ENOMEM; goto out; } ); memset(new, 0, sizeof(struct state)); new->eyec = SD_EYEC; new->state= *state; fd_list_init(&new->chain, new); new->hdl = handler; /* find place for this state in the list */ for (li = session->states.next; li != &session->states; li = li->next) { struct state * st = (struct state *)(li->o); /* The list is ordered by handler's id */ if (st->hdl->id < handler->id) continue; if (st->hdl->id == handler->id) { TRACE_DEBUG(INFO, "A state was already stored for session '%s' and handler '%p', at location %p", session->sid, st->hdl, st->state); already = EALREADY; } break; } if (!already) { fd_list_insert_before(li, &new->chain); *state = NULL; } else { free(new); } out: ; pthread_cleanup_pop(0); CHECK_POSIX( pthread_mutex_unlock(&session->stlock) ); return ret ?: already; } /* Get the data back */ int fd_sess_state_retrieve ( struct session_handler * handler, struct session * session, struct sess_state ** state ) { struct fd_list * li; struct state * st = NULL; TRACE_ENTRY("%p %p %p", handler, session, state); CHECK_PARAMS( handler && VALIDATE_SH(handler) && session && VALIDATE_SI(session) && state ); *state = NULL; /* Lock the session state list */ CHECK_POSIX( pthread_mutex_lock(&session->stlock) ); pthread_cleanup_push( fd_cleanup_mutex, &session->stlock ); /* find the state in the list */ for (li = session->states.next; li != &session->states; li = li->next) { st = (struct state *)(li->o); /* The list is ordered by handler's id */ if (st->hdl->id > handler->id) break; } /* If we found the state */ if (st && (st->hdl == handler)) { fd_list_unlink(&st->chain); *state = st->state; free(st); } pthread_cleanup_pop(0); CHECK_POSIX( pthread_mutex_unlock(&session->stlock) ); return 0; } /* For the messages module */ int fd_sess_fromsid ( uint8_t * sid, size_t len, struct session ** session, int * new) { TRACE_ENTRY("%p %zd %p %p", sid, len, session, new); CHECK_PARAMS( sid && len && session ); /* Get the session object */ CHECK_FCT( fd_sess_fromsid_msg ( sid, len, session, new) ); /* Decrease the refcount */ CHECK_POSIX( pthread_mutex_lock(&(*session)->stlock) ); (*session)->msg_cnt--; /* was increased in fd_sess_new */ CHECK_POSIX( pthread_mutex_unlock(&(*session)->stlock) ); /* Done */ return 0; } int fd_sess_ref_msg ( struct session * session ) { TRACE_ENTRY("%p", session); CHECK_PARAMS( VALIDATE_SI(session) ); /* Update the msg refcount */ CHECK_POSIX( pthread_mutex_lock(&session->stlock) ); session->msg_cnt++; CHECK_POSIX( pthread_mutex_unlock(&session->stlock) ); return 0; } int fd_sess_reclaim_msg ( struct session ** session ) { int reclaim; uint32_t hash; TRACE_ENTRY("%p", session); CHECK_PARAMS( session && VALIDATE_SI(*session) ); /* Lock the hash line to avoid possibility that session is freed while we are reclaiming */ hash = (*session)->hash; CHECK_POSIX( pthread_mutex_lock( H_LOCK(hash)) ); pthread_cleanup_push( fd_cleanup_mutex, H_LOCK(hash) ); /* Update the msg refcount */ CHECK_POSIX( pthread_mutex_lock(&(*session)->stlock) ); reclaim = (*session)->msg_cnt; (*session)->msg_cnt = reclaim - 1; CHECK_POSIX( pthread_mutex_unlock(&(*session)->stlock) ); /* Ok, now unlock the hash line */ pthread_cleanup_pop( 0 ); CHECK_POSIX( pthread_mutex_unlock( H_LOCK(hash) ) ); /* and reclaim if no message references the session anymore */ if (reclaim == 1) { CHECK_FCT(fd_sess_reclaim ( session )); } else { *session = NULL; } return 0; } /* Dump functions */ DECLARE_FD_DUMP_PROTOTYPE(fd_sess_dump, struct session * session, int with_states) { FD_DUMP_HANDLE_OFFSET(); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "{session}(@%p): ", session), return NULL); if (!VALIDATE_SI(session)) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "INVALID/NULL"), return NULL); } else { char timebuf[30]; struct tm tm; strftime(timebuf, sizeof(timebuf), "%D,%T", localtime_r( &session->timeout.tv_sec , &tm )); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "'%s'(%zd) h:%x m:%d d:%d to:%s.%06ld", session->sid, session->sidlen, session->hash, session->msg_cnt, session->is_destroyed, timebuf, session->timeout.tv_nsec/1000), return NULL); if (with_states) { struct fd_list * li; CHECK_POSIX_DO( pthread_mutex_lock(&session->stlock), /* ignore */ ); pthread_cleanup_push( fd_cleanup_mutex, &session->stlock ); for (li = session->states.next; li != &session->states; li = li->next) { struct state * st = (struct state *)(li->o); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "\n {state i:%d}(@%p): ", st->hdl->id, st), return NULL); if (st->hdl->state_dump) { CHECK_MALLOC_DO( (*st->hdl->state_dump)( FD_DUMP_STD_PARAMS, st->state), fd_dump_extend( FD_DUMP_STD_PARAMS, "[dumper error]")); } else { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "<%p>", st->state), return NULL); } } pthread_cleanup_pop(0); CHECK_POSIX_DO( pthread_mutex_unlock(&session->stlock), /* ignore */ ); } } return *buf; } DECLARE_FD_DUMP_PROTOTYPE(fd_sess_dump_hdl, struct session_handler * handler) { FD_DUMP_HANDLE_OFFSET(); CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "{sesshdl}(@%p): ", handler), return NULL); if (!VALIDATE_SH(handler)) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "INVALID/NULL"), return NULL); } else { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "i:%d cl:%p d:%p o:%p", handler->id, handler->cleanup, handler->state_dump, handler->opaque), return NULL); } return *buf; } int fd_sess_getcount(uint32_t *cnt) { CHECK_PARAMS(cnt); CHECK_POSIX( pthread_mutex_lock( &exp_lock ) ); *cnt = sess_cnt; CHECK_POSIX( pthread_mutex_unlock( &exp_lock ) ); return 0; } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdproto/utils.c000066400000000000000000000071301333553357400225240ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdproto-internal.h" DECLARE_FD_DUMP_PROTOTYPE(fd_sa_dump, sSA * sa, int flags) { char addrbuf[INET6_ADDRSTRLEN]; char servbuf[32]; int rc; FD_DUMP_HANDLE_OFFSET(); servbuf[0] = 0; if (sa) { if (sSAport(sa)) { rc = getnameinfo(sa, sSAlen( sa ), addrbuf, sizeof(addrbuf), servbuf, sizeof(servbuf), flags); } else { rc = getnameinfo(sa, sSAlen( sa ), addrbuf, sizeof(addrbuf), NULL, 0, flags); } if (rc) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "%s", gai_strerror(rc)), return NULL); } else { if (servbuf[0]) { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "%s(%s)", &addrbuf[0], &servbuf[0]), return NULL); } else { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "%s", &addrbuf[0]), return NULL); } } } else { CHECK_MALLOC_DO( fd_dump_extend( FD_DUMP_STD_PARAMS, "(NULL / ANY)"), return NULL); } return *buf; } void fd_sa_sdump_numeric(char * buf /* must be at least sSA_DUMP_STRLEN */, sSA * sa) { char addrbuf[INET6_ADDRSTRLEN]; char servbuf[32]; if (sa) { int rc = getnameinfo(sa, sSAlen( sa ), addrbuf, sizeof(addrbuf), servbuf, sizeof(servbuf), NI_NUMERICHOST | NI_NUMERICSERV); if (rc) { snprintf(buf, sSA_DUMP_STRLEN, "%s", gai_strerror(rc)); } else { snprintf(buf, sSA_DUMP_STRLEN, "%s(%s)", addrbuf, servbuf); } } else { snprintf(buf, sSA_DUMP_STRLEN, "(NULL / ANY)"); } } nextepc-0.3.10/lib/freeDiameter-1.2.1/libfdproto/version.c000066400000000000000000000053241333553357400230540ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "fdproto-internal.h" #include #ifdef FD_PROJECT_VERSION_HG # define FD_LIBFDPROTO_VERSION \ _stringize(FD_PROJECT_VERSION_MAJOR) "." _stringize(FD_PROJECT_VERSION_MINOR) "." _stringize(FD_PROJECT_VERSION_REV) "-" FD_PROJECT_VERSION_HG_VAL #else # define FD_LIBFDPROTO_VERSION \ _stringize(FD_PROJECT_VERSION_MAJOR) "." _stringize(FD_PROJECT_VERSION_MINOR) "." _stringize(FD_PROJECT_VERSION_REV) #endif const char fd_libproto_version[] = FD_LIBFDPROTO_VERSION; nextepc-0.3.10/lib/freeDiameter-1.2.1/tests/000077500000000000000000000000001333553357400202155ustar00rootroot00000000000000nextepc-0.3.10/lib/freeDiameter-1.2.1/tests/CMakeLists.txt000066400000000000000000000063451333553357400227650ustar00rootroot00000000000000# Test directory PROJECT("freeDiameter tests" C) # give the possibility to configure the timeout duration for the tests OPTION(TEST_TIMEOUT "Timeout for the tests, in seconds (default: 120)?") IF(TEST_TIMEOUT) ADD_DEFINITIONS(-DTEST_TIMEOUT=${TEST_TIMEOUT}) ENDIF(TEST_TIMEOUT) # default command line for the tests OPTION(OPT_TEST_ARGUMENTS "Specify the default arguments for the tests" OFF) IF(OPT_TEST_ARGUMENTS) SET(TEST_ARGUMENTS ${OPT_TEST_ARGUMENTS}) ELSE(OPT_TEST_ARGUMENTS) SET(TEST_ARGUMENTS "") ENDIF(OPT_TEST_ARGUMENTS) ############################# # List the test cases SET(TEST_LIST testsctp testostr testfifo testpeers testdict testmesg testmesg_stress testsess testdisp testcnx testloadext ) ############################# # Some parameters for the tests ADD_DEFINITIONS(-DTEST_DEBUG) ADD_DEFINITIONS(-DBUILD_DIR="${CMAKE_BINARY_DIR}") INCLUDE_DIRECTORIES( "../libfdproto" ) INCLUDE_DIRECTORIES( "../libfdcore" ) INCLUDE_DIRECTORIES(${LFDCORE_INCLUDES}) SET(testcnx_ADDITIONAL_LIB ${CLOCK_GETTIME_LIBS}) SET(testfifo_ADDITIONAL_LIB ${CLOCK_GETTIME_LIBS}) SET(testsess_ADDITIONAL_LIB ${CLOCK_GETTIME_LIBS}) SET(testloadext_ADDITIONAL_LIB ${CMAKE_DL_LIBS}) SET(testmesg_stress_ADDITIONAL_LIB ${CLOCK_GETTIME_LIBS} ${CMAKE_DL_LIBS}) ############################## # App_acct test IF(BUILD_APP_ACCT OR ALL_EXTENSIONS) OPTION(TEST_APP_ACCT "Test app_acct extension? (Requires a configured database, see testappacct.c for details)" OFF) IF(TEST_APP_ACCT) OPTION(TEST_APP_ACCT_CONNINFO "The connection string to the database") IF(TEST_APP_ACCT_CONNINFO) ADD_DEFINITIONS(-DTEST_CONNINFO="${TEST_APP_ACCT_CONNINFO}") ENDIF(TEST_APP_ACCT_CONNINFO) SET(TEST_LIST ${TEST_LIST} testappacct) # Extension dependencies FIND_PACKAGE(PostgreSQL REQUIRED) INCLUDE_DIRECTORIES(${POSTGRESQL_INCLUDE_DIR}) SET(testappacct_ADDITIONAL_LIB ${POSTGRESQL_LIBRARIES}) # List of source files, copied from the extension CMakeLists. BISON_FILE(../extensions/app_acct/acct_conf.y) FLEX_FILE(../extensions/app_acct/acct_conf.l) #SET_SOURCE_FILES_PROPERTIES(lex.acct_conf.c acct_conf.tab.c PROPERTIES COMPILE_FLAGS "-I ${CMAKE_CURRENT_SOURCE_DIR}") SET( APP_ACCT_SRC app_acct.h app_acct.c acct_db.c acct_records.c ) SET( APP_ACCT_SRC_GEN lex.acct_conf.c acct_conf.tab.c acct_conf.tab.h ) # The extension headers INCLUDE_DIRECTORIES( "../extensions/app_acct" ) SET(testappacct_ADDITIONAL "") FOREACH( SRC_FILE ${APP_ACCT_SRC}) SET(testappacct_ADDITIONAL ${testappacct_ADDITIONAL} "../extensions/app_acct/${SRC_FILE}") ENDFOREACH(SRC_FILE) FOREACH( SRC_FILE ${APP_ACCT_SRC_GEN}) SET(testappacct_ADDITIONAL ${testappacct_ADDITIONAL} "${CMAKE_CURRENT_BINARY_DIR}/../extensions/app_acct/${SRC_FILE}") ENDFOREACH(SRC_FILE) ENDIF(TEST_APP_ACCT) ENDIF(BUILD_APP_ACCT OR ALL_EXTENSIONS) ############################# # Compile each test FOREACH( TEST ${TEST_LIST} ) ADD_EXECUTABLE(${TEST} ${TEST}.c tests.h ${${TEST}_ADDITIONAL}) TARGET_LINK_LIBRARIES(${TEST} libfdproto libfdcore ${GNUTLS_LIBRARIES} ${GCRYPT_LIBRARY} ${${TEST}_ADDITIONAL_LIB}) ADD_TEST(${TEST} ${EXECUTABLE_OUTPUT_PATH}/${TEST} ${TEST_ARGUMENTS}) ENDFOREACH( TEST ) #### ## INSTALL section ## # we do not install the tests nextepc-0.3.10/lib/freeDiameter-1.2.1/tests/testappacct.c000066400000000000000000000237211333553357400227010ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "tests.h" /* The connection string to the database */ #ifndef TEST_CONNINFO #error "Please specify the conninfo information" #endif /* TEST_CONNINFO */ /* The table used for tests. This table will receive the following instructions: DROP TABLE ; CREATE TABLE
( recorded_on timestamp with time zone NOT NULL, "Accounting-Record-Type" integer, "Session-Id" bytea, "Accounting-Record-Number" integer, "Route-Record1" bytea, "Route-Record2" bytea, "Route-Record3" bytea, "Route-Record4" bytea ); */ #define TABLE "incoming_test" #include "app_acct.h" #include static int add_avp_in_conf(char * avpname, int multi) { struct acct_conf_avp *new; struct dict_object * dict; struct dict_avp_data dictdata; /* Validate the avp name first */ CHECK_FCT( fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, avpname, &dict, ENOENT) ); CHECK_FCT( fd_dict_getval( dict, &dictdata )); /* Create a new entry */ CHECK_MALLOC( new = malloc(sizeof(struct acct_conf_avp)) ); memset(new, 0, sizeof(struct acct_conf_avp)); fd_list_init(&new->chain, NULL); new->avpname = avpname; new->avpobj = dict; new->avptype = dictdata.avp_basetype; new->multi = multi; /* Add this new entry at the end of the list */ fd_list_insert_before( &acct_config->avps, &new->chain ); return 0; } #define LOCAL_ID "test.app.acct" #define LOCAL_REALM "app.acct" /* Main test routine */ int main(int argc, char *argv[]) { extern pthread_key_t connk; /* in acct_db.c */ PGconn *conn; extern int fd_ext_init(int major, int minor, char * conffile); /* defined in include's extension.h */ extern void fd_ext_fini(void); /* defined in the extension itself */ struct msg * msg; os0_t sess_bkp; size_t sess_bkp_len; /* First, initialize the daemon modules */ INIT_FD(); fd_g_config->cnf_diamid = strdup(LOCAL_ID); fd_g_config->cnf_diamid_len = CONSTSTRLEN(LOCAL_ID); fd_g_config->cnf_diamrlm = strdup(LOCAL_REALM); fd_g_config->cnf_diamrlm_len = CONSTSTRLEN(LOCAL_REALM); CHECK( 0, fd_queues_init() ); CHECK( 0, fd_msg_init() ); CHECK( 0, fd_rtdisp_init() ); /* Initialize the extension configuration for the test */ { CHECK( 0, acct_conf_init() ); acct_config->conninfo = strdup(TEST_CONNINFO); acct_config->tablename = strdup(TABLE); acct_config->tsfield = strdup("recorded_on"); CHECK( 0, add_avp_in_conf(strdup("Session-Id"), 0) ); CHECK( 0, add_avp_in_conf(strdup("Accounting-Record-Type"), 0) ); CHECK( 0, add_avp_in_conf(strdup("Accounting-Record-Number"), 0) ); CHECK( 0, add_avp_in_conf(strdup("Route-Record"), 4) ); /* Now, call the one of the extension */ CHECK( 0, fd_ext_init(FD_PROJECT_VERSION_MAJOR, FD_PROJECT_VERSION_MINOR,NULL) ); conn = pthread_getspecific(connk); } /* Drop and recreate the table for the test */ { PGresult * res; CHECK( CONNECTION_OK, PQstatus(conn) ); res = PQexec(conn, "DROP TABLE " TABLE ";"); CHECK( PGRES_COMMAND_OK, PQresultStatus(res) ); PQclear(res); res = PQexec(conn, "CREATE TABLE " TABLE " ( " " recorded_on timestamp with time zone NOT NULL, " " \"Accounting-Record-Type\" integer, " " \"Session-Id\" bytea, " " \"Accounting-Record-Number\" integer, " " \"Route-Record1\" bytea, " " \"Route-Record2\" bytea, " " \"Route-Record3\" bytea, " " \"Route-Record4\" bytea " ");" ); CHECK( PGRES_COMMAND_OK, PQresultStatus(res) ); PQclear(res); } /* OK, we are ready to test now. Create an ACR message that will pass the ABNF check */ { struct dict_object * d = NULL; struct avp *avp = NULL; union avp_value avp_val; /* Now find the ACR dictionary object */ CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Accounting-Request", &d, ENOENT ) ); /* Create the instance */ CHECK( 0, fd_msg_new ( d, MSGFL_ALLOC_ETEID, &msg ) ); /* App id */ { struct msg_hdr * h; CHECK( 0, fd_msg_hdr( msg, &h ) ); h->msg_appl = 3; } /* sid */ { struct session * sess = NULL; os0_t s; CHECK( 0, fd_sess_new( &sess, fd_g_config->cnf_diamid, fd_g_config->cnf_diamid_len, NULL, 0) ); CHECK( 0, fd_sess_getsid(sess, &s, &sess_bkp_len) ); CHECK( 1, (sess_bkp = os0dup(s, sess_bkp_len)) ? 1 : 0); CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Session-Id", &d, ENOENT ) ); CHECK( 0, fd_msg_avp_new ( d, 0, &avp ) ); memset(&avp_val, 0, sizeof(avp_val)); avp_val.os.data = sess_bkp; avp_val.os.len = sess_bkp_len; CHECK( 0, fd_msg_avp_setvalue ( avp, &avp_val ) ); CHECK( 0, fd_msg_avp_add ( msg, MSG_BRW_FIRST_CHILD, avp) ); } /* Origin-* */ CHECK( 0, fd_msg_add_origin(msg, 1) ); /* Destination-Realm */ { CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Destination-Realm", &d, ENOENT ) ); CHECK( 0, fd_msg_avp_new ( d, 0, &avp ) ); memset(&avp_val, 0, sizeof(avp_val)); avp_val.os.data = (unsigned char *)fd_g_config->cnf_diamrlm; avp_val.os.len = fd_g_config->cnf_diamrlm_len; CHECK( 0, fd_msg_avp_setvalue ( avp, &avp_val ) ); CHECK( 0, fd_msg_avp_add ( msg, MSG_BRW_LAST_CHILD, avp) ); } /* Accounting-Record-Type */ { CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Accounting-Record-Type", &d, ENOENT ) ); CHECK( 0, fd_msg_avp_new ( d, 0, &avp ) ); memset(&avp_val, 0, sizeof(avp_val)); avp_val.u32 = 2; CHECK( 0, fd_msg_avp_setvalue ( avp, &avp_val ) ); CHECK( 0, fd_msg_avp_add ( msg, MSG_BRW_LAST_CHILD, avp) ); } /* Accounting-Record-Number */ { CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Accounting-Record-Number", &d, ENOENT ) ); CHECK( 0, fd_msg_avp_new ( d, 0, &avp ) ); memset(&avp_val, 0, sizeof(avp_val)); avp_val.u32 = 2; CHECK( 0, fd_msg_avp_setvalue ( avp, &avp_val ) ); CHECK( 0, fd_msg_avp_add ( msg, MSG_BRW_LAST_CHILD, avp) ); } /* Route-Record */ { CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Route-Record", &d, ENOENT ) ); CHECK( 0, fd_msg_avp_new ( d, 0, &avp ) ); memset(&avp_val, 0, sizeof(avp_val)); avp_val.os.data = (unsigned char *)"peer1"; avp_val.os.len = strlen((char *)avp_val.os.data); CHECK( 0, fd_msg_avp_setvalue ( avp, &avp_val ) ); CHECK( 0, fd_msg_avp_add ( msg, MSG_BRW_LAST_CHILD, avp) ); CHECK( 0, fd_msg_avp_new ( d, 0, &avp ) ); memset(&avp_val, 0, sizeof(avp_val)); avp_val.os.data = (unsigned char *)"peer2"; avp_val.os.len = strlen((char *)avp_val.os.data); CHECK( 0, fd_msg_avp_setvalue ( avp, &avp_val ) ); CHECK( 0, fd_msg_avp_add ( msg, MSG_BRW_LAST_CHILD, avp) ); } /* Source */ CHECK( 0, fd_msg_source_set( msg, "peer3", CONSTSTRLEN("peer3") ) ); CHECK( 0, fd_msg_source_setrr( msg, "peer3", CONSTSTRLEN("peer3"), fd_g_config->cnf_dict ) ); } /* Now, have the daemon handle this */ CHECK( 0, fd_fifo_post(fd_g_incoming, &msg) ); /* It is picked by the dispatch module, the extension handles the query, inserts the records in the DB, send creates the answer. Once the answer is ready, it is sent to "peer3" which is not available of course; then the message is simply destroyed. We wait 1 second for this to happen... */ sleep(1); /* Now, check the record was actually registered properly */ { PGresult * res; uint8_t * bs; char * es; size_t l; res = PQexec(conn, "SELECT \"Session-Id\" from " TABLE ";"); CHECK( PGRES_TUPLES_OK, PQresultStatus(res) ); /* We also check that the Session-Id we retrieve is the same as what we generated earlier (not trashed in the process) */ es = PQgetvalue(res, 0, 0); bs = PQunescapeBytea((uint8_t *)es, &l); CHECK( 0, fd_os_cmp(bs, l, sess_bkp, sess_bkp_len) ); PQclear(res); PQfreemem(bs); } /* That's all for the tests yet */ free(sess_bkp); PASSTEST(); } nextepc-0.3.10/lib/freeDiameter-1.2.1/tests/testcnx.c000066400000000000000000002332531333553357400220610ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "tests.h" #ifndef TEST_PORT #define TEST_PORT 3868 #endif /* TEST_PORT */ #ifndef NB_STREAMS #define NB_STREAMS 10 #endif /* NB_STREAMS */ #ifndef GNUTLS_DEFAULT_PRIORITY # define GNUTLS_DEFAULT_PRIORITY "NORMAL" #endif /* GNUTLS_DEFAULT_PRIORITY */ #ifndef GNUTLS_DEFAULT_DHBITS # define GNUTLS_DEFAULT_DHBITS 1024 #endif /* GNUTLS_DEFAULT_DHBITS */ /* The cryptographic data */ static char ca_data[] = "-----BEGIN CERTIFICATE-----\n" "MIIEqjCCA5KgAwIBAgIJANKgDwdlDYQDMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD\n" "VQQGEwJKUDEOMAwGA1UECAwFVG9reW8xEDAOBgNVBAcMB0tvZ2FuZWkxDTALBgNV\n" "BAoMBFdJREUxDzANBgNVBAsMBkFBQSBXRzEfMB0GA1UEAwwWY2hhdnJvdXguY293\n" "YWRkaWN0Lm9yZzEiMCAGCSqGSIb3DQEJARYTc2RlY3VnaXNAbmljdC5nby5qcDAe\n" "Fw0wOTEwMDUwODUxNDRaFw0xOTEwMDMwODUxNDRaMIGUMQswCQYDVQQGEwJKUDEO\n" "MAwGA1UECAwFVG9reW8xEDAOBgNVBAcMB0tvZ2FuZWkxDTALBgNVBAoMBFdJREUx\n" "DzANBgNVBAsMBkFBQSBXRzEfMB0GA1UEAwwWY2hhdnJvdXguY293YWRkaWN0Lm9y\n" "ZzEiMCAGCSqGSIb3DQEJARYTc2RlY3VnaXNAbmljdC5nby5qcDCCASIwDQYJKoZI\n" "hvcNAQEBBQADggEPADCCAQoCggEBAM5c6w4NnngTvGNWcJzbo0Kklp+kvUNQNgGu\n" "myvz826qPp07HTSyJrIcgFnuYDR0Nd130Ot9u5osqpQhHTvolxDE87Tii8i3hJSj\n" "TTY9K0ZwGb4AZ6QkuyMXS1jtOY657HqjpGZqT/2Syh0i7dM/hqSXFw0SPbyq+W1H\n" "SVFWa1CTkPywFWAzwdr5WKah77uZ1dxWqgPgUdcZOiIQtLRp5n3fg40Nwso5YdwS\n" "64+ebBX1pkhrCQ8AGc8O61Ep1JTXcO7jqQmPgzjiN+FeostI1Dp73S3MqleTAHjR\n" "hqZ77VF7nkroMM9btMHJBaxnfwc2ewULUJwnuOiGWrvMq/9Z4J8CAwEAAaOB/DCB\n" "+TAdBgNVHQ4EFgQUkqpVn7N3gmiJ7X5zQ2bki+7qv4UwgckGA1UdIwSBwTCBvoAU\n" "kqpVn7N3gmiJ7X5zQ2bki+7qv4WhgZqkgZcwgZQxCzAJBgNVBAYTAkpQMQ4wDAYD\n" "VQQIDAVUb2t5bzEQMA4GA1UEBwwHS29nYW5laTENMAsGA1UECgwEV0lERTEPMA0G\n" "A1UECwwGQUFBIFdHMR8wHQYDVQQDDBZjaGF2cm91eC5jb3dhZGRpY3Qub3JnMSIw\n" "IAYJKoZIhvcNAQkBFhNzZGVjdWdpc0BuaWN0LmdvLmpwggkA0qAPB2UNhAMwDAYD\n" "VR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAJy0XLk8j8YLSTt2/VMy9TAUx\n" "esXUiZj0Ung+gkr7A1K0NnwYxDzG2adMhf13upHoydu2ErLMmD6F77x+QuY/q7nc\n" "ZvO0tvcoAP6ToSDwiypU5dnTmnfkgwVwzFkNCi1sGRosEm8c/c/8MfK0I0nVdj1/\n" "BIkIG7tTDVi9JvkWYl0UlSKWTZKrntVwCmscfC02DGb+GoLbO9+QmiNM5Y3yOYZ4\n" "Pc7SSoKLL0rwJBmpPNs7boYsweeSuCAVu0shRfgC90odXcej2EN5ETfCuU1evXNW\n" "5cA+zZsDK/nWJwxBaW0CxAHX579FElFWlK4+BnzhZRdDhmJDnN5dh4ekJGM6Lg==\n" "-----END CERTIFICATE-----\n"; /* Client: Certificate: Data: Version: 3 (0x2) Serial Number: 5 (0x5) Signature Algorithm: sha1WithRSAEncryption Issuer: C=JP, ST=Tokyo, L=Koganei, O=WIDE, OU=AAA WG, CN=chavroux.cowaddict.org/emailAddress=sdecugis@nict.go.jp Validity Not Before: Oct 27 04:04:05 2009 GMT Not After : Oct 25 04:04:05 2019 GMT Subject: C=JP, ST=Tokyo, L=Koganei, O=WIDE, OU=AAA WG, CN=client.test/emailAddress=client@test Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public Key: (1024 bit) Modulus (1024 bit): 00:bd:eb:50:1e:9d:7a:cd:9d:bb:e7:bc:4e:38:4a: b2:cc:9e:b4:89:77:01:ef:d1:c6:19:29:00:fe:ce: 3c:62:05:13:b1:8c:ff:31:7a:0f:c1:2e:4b:3c:0c: 40:1e:36:4e:76:da:0a:64:43:fc:1e:ea:0c:97:b2: 57:9c:9c:8c:90:bd:eb:23:7b:b8:b7:5c:03:ed:6f: 48:55:8a:88:08:38:c5:cd:33:b7:ab:a8:3a:6f:7f: 13:10:65:a5:50:b9:f4:8b:cc:2e:e9:79:58:a6:11: f0:58:45:41:ef:36:b3:35:cb:14:ec:82:0c:ad:11: 6a:ea:64:ef:28:a2:6e:47:45 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Basic Constraints: CA:FALSE Netscape Comment: OpenSSL Generated Certificate X509v3 Subject Key Identifier: BE:B3:89:4F:9D:8F:6C:20:C4:D0:3E:6A:05:11:82:50:54:49:70:A2 X509v3 Authority Key Identifier: keyid:92:AA:55:9F:B3:77:82:68:89:ED:7E:73:43:66:E4:8B:EE:EA:BF:85 Signature Algorithm: sha1WithRSAEncryption a3:88:f5:15:b5:ad:20:60:a1:85:19:3f:b9:5e:1e:be:31:7f: 84:7a:c2:18:3a:63:6a:67:1f:46:86:4d:10:d6:1d:ad:a2:c8: 0b:95:33:fa:e4:05:f4:b8:70:34:77:f7:85:6e:70:46:ac:39: 54:a9:5f:ea:5e:d1:33:bb:c9:a3:42:81:41:90:25:b5:92:8b: e8:6e:3e:97:06:dd:9a:cc:29:61:34:5a:d3:1c:5d:ad:d1:a3: eb:6a:47:b4:d0:c2:17:89:e1:e2:2d:36:18:50:1a:e7:d4:fc: 38:2e:47:0b:39:50:87:2f:aa:07:64:f8:9a:4d:47:01:da:10: d8:97:c7:a6:13:bc:0e:ca:63:c1:f2:09:fb:f8:6a:a4:5f:08: b5:ad:ed:4f:71:b9:89:7f:43:27:85:72:e7:8d:a8:4a:cc:f6: 36:ca:8a:ae:82:b5:a8:42:41:99:87:84:7c:f0:90:fd:ca:96: 37:a2:e0:d9:fa:dd:a4:c9:f1:50:b7:e5:e6:8f:af:83:8c:23: b6:20:cc:66:e3:08:60:13:02:8f:42:3a:07:91:a7:38:b2:72: 16:fd:bd:a9:60:f0:e2:9f:23:f3:c0:99:e3:17:bc:00:7c:b3: 89:9c:ea:fa:3e:f6:69:a1:98:c2:ec:46:da:70:b6:f9:c3:93: a7:fc:36:dd */ static char client_cert_data[] ="-----BEGIN CERTIFICATE-----\n" "MIIDiTCCAnGgAwIBAgIBBTANBgkqhkiG9w0BAQUFADCBlDELMAkGA1UEBhMCSlAx\n" "DjAMBgNVBAgMBVRva3lvMRAwDgYDVQQHDAdLb2dhbmVpMQ0wCwYDVQQKDARXSURF\n" "MQ8wDQYDVQQLDAZBQUEgV0cxHzAdBgNVBAMMFmNoYXZyb3V4LmNvd2FkZGljdC5v\n" "cmcxIjAgBgkqhkiG9w0BCQEWE3NkZWN1Z2lzQG5pY3QuZ28uanAwHhcNMDkxMDI3\n" "MDQwNDA1WhcNMTkxMDI1MDQwNDA1WjCBgTELMAkGA1UEBhMCSlAxDjAMBgNVBAgM\n" "BVRva3lvMRAwDgYDVQQHDAdLb2dhbmVpMQ0wCwYDVQQKDARXSURFMQ8wDQYDVQQL\n" "DAZBQUEgV0cxFDASBgNVBAMMC2NsaWVudC50ZXN0MRowGAYJKoZIhvcNAQkBFgtj\n" "bGllbnRAdGVzdDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAvetQHp16zZ27\n" "57xOOEqyzJ60iXcB79HGGSkA/s48YgUTsYz/MXoPwS5LPAxAHjZOdtoKZEP8HuoM\n" "l7JXnJyMkL3rI3u4t1wD7W9IVYqICDjFzTO3q6g6b38TEGWlULn0i8wu6XlYphHw\n" "WEVB7zazNcsU7IIMrRFq6mTvKKJuR0UCAwEAAaN7MHkwCQYDVR0TBAIwADAsBglg\n" "hkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0O\n" "BBYEFL6ziU+dj2wgxNA+agURglBUSXCiMB8GA1UdIwQYMBaAFJKqVZ+zd4Joie1+\n" "c0Nm5Ivu6r+FMA0GCSqGSIb3DQEBBQUAA4IBAQCjiPUVta0gYKGFGT+5Xh6+MX+E\n" "esIYOmNqZx9Ghk0Q1h2tosgLlTP65AX0uHA0d/eFbnBGrDlUqV/qXtEzu8mjQoFB\n" "kCW1kovobj6XBt2azClhNFrTHF2t0aPrake00MIXieHiLTYYUBrn1Pw4LkcLOVCH\n" "L6oHZPiaTUcB2hDYl8emE7wOymPB8gn7+GqkXwi1re1PcbmJf0MnhXLnjahKzPY2\n" "yoqugrWoQkGZh4R88JD9ypY3ouDZ+t2kyfFQt+Xmj6+DjCO2IMxm4whgEwKPQjoH\n" "kac4snIW/b2pYPDinyPzwJnjF7wAfLOJnOr6PvZpoZjC7EbacLb5w5On/Dbd\n" "-----END CERTIFICATE-----\n"; static char client_priv_data[] ="-----BEGIN RSA PRIVATE KEY-----\n" "MIICXgIBAAKBgQC961AenXrNnbvnvE44SrLMnrSJdwHv0cYZKQD+zjxiBROxjP8x\n" "eg/BLks8DEAeNk522gpkQ/we6gyXslecnIyQvesje7i3XAPtb0hViogIOMXNM7er\n" "qDpvfxMQZaVQufSLzC7peVimEfBYRUHvNrM1yxTsggytEWrqZO8oom5HRQIDAQAB\n" "AoGBAIYnsOLPby3LnC5n8AEHkyHDgdgQvsd/MSYYtuFHIZRD7dNfu+xhQru9TdvO\n" "84Pj7K07/FczRuc3gUmu6wBv/UIP9To15RHZh+/n537nybGus5S4IYKVvap477To\n" "0rQDf9ec27iw77gxb7moQ9Otuxwbv0h0Z+1EVLI8d8jHOq0BAkEA9YNr0R+7KXBS\n" "48yT43g5HpOFkTZzNXWVdpSvYGneb56wslk5Eatp235I4uz/a7Rej5v99W0M3nSe\n" "/AgHfYn75QJBAMYH/pBx/WkrLj+pPaARlNwInCIC5zUhr6B0IKCt2tvy5eyuc5sd\n" "AoTFaU+cSI+ZqsRzY8jMKkonktxBg48oJ+ECQQCt4AtlqcFVkbVCm8pJGQXq/7Ni\n" "qlthiwr1Vkv2TkQ4bPza8pGWT/3Cc2ePPyWN08n8jw+G11p72cAW4mDbqfN5AkEA\n" "mNYKrkiLn+NnqlJf8W4gSUGL3uQGtYbuGRQHKnuDckWhFm39YzWcgAQsJvkjN1EN\n" "7thvpsWLzfeE7ODTPGVtgQJATObxYJOt6rms3fAStwuXW3ET77TA1ja4XsUEe5Yu\n" "JpcQOruJb9XwndqzNbL0dSUePb9gFiBCGKYOyreNTTRTmw==\n" "-----END RSA PRIVATE KEY-----\n"; /* Server: Certificate: Data: Version: 3 (0x2) Serial Number: 4 (0x4) Signature Algorithm: sha1WithRSAEncryption Issuer: C=JP, ST=Tokyo, L=Koganei, O=WIDE, OU=AAA WG, CN=chavroux.cowaddict.org/emailAddress=sdecugis@nict.go.jp Validity Not Before: Oct 27 04:03:39 2009 GMT Not After : Oct 25 04:03:39 2019 GMT Subject: C=JP, ST=Tokyo, L=Koganei, O=WIDE, OU=AAA WG, CN=serv.test/emailAddress=serv@test Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public Key: (1024 bit) Modulus (1024 bit): 00:a6:f7:1c:a9:90:5b:fa:c8:f6:a3:04:0c:d0:8b: 45:c3:90:f7:2d:c2:c9:d7:bd:66:8a:7c:1c:51:89: 40:9e:cd:70:57:cb:00:47:a3:e8:76:8b:00:b3:c9: c3:0d:b1:b9:2a:08:9f:52:92:82:d3:18:c1:d8:d1: b8:1e:fd:71:fe:23:ec:19:e9:6d:9d:fd:ae:88:bc: 39:44:7a:37:ad:c6:88:d1:64:7c:b1:d4:3c:a9:30: c4:de:51:02:c4:48:4f:25:3e:2f:93:ae:25:32:66: 9a:dc:f4:44:45:ff:7f:12:49:97:0d:01:8d:13:9a: d3:8f:9e:2d:62:95:02:0a:c7 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Basic Constraints: CA:FALSE Netscape Comment: OpenSSL Generated Certificate X509v3 Subject Key Identifier: 0C:33:C4:7F:39:D0:34:FF:F8:61:A1:46:8B:49:1D:A3:57:B3:4D:58 X509v3 Authority Key Identifier: keyid:92:AA:55:9F:B3:77:82:68:89:ED:7E:73:43:66:E4:8B:EE:EA:BF:85 Signature Algorithm: sha1WithRSAEncryption 87:f5:49:a6:04:f9:98:9a:f1:1a:68:ce:06:ae:4c:0c:08:eb: ba:98:e7:3f:df:22:7f:35:88:1d:b7:8a:f3:89:a3:68:0d:53: 45:eb:23:a1:dd:6b:dc:b0:80:58:0c:10:0b:49:74:ea:a8:b6: 8c:2e:c6:73:dc:7a:74:c7:59:3e:79:5a:d2:5c:15:0b:f1:d8: 19:37:2a:c0:22:75:10:3f:4c:e9:a1:e0:eb:b2:9e:09:70:3d: 2a:4c:fe:9c:99:36:4b:aa:6c:e1:8b:9c:aa:e1:29:1f:49:6b: 14:db:12:ae:cf:68:4a:dd:03:e1:3b:ad:79:b4:54:84:1d:bb: ac:45:c4:85:f1:03:65:65:96:23:ae:e7:97:3c:5c:db:ce:55: 34:5d:c3:73:ec:cd:f6:0f:a5:81:5f:c2:ab:a3:42:fa:36:7f: 83:ef:db:0f:cd:62:0b:ea:d9:4f:73:35:68:5f:23:d5:0a:be: ff:7f:23:9a:af:0d:a5:f8:3e:3a:f0:63:1c:e1:d2:96:81:cf: 7b:5a:6b:d0:9b:67:56:9e:aa:a9:e8:f1:6c:fb:54:2b:1a:f4: ef:16:5a:be:1d:a9:c8:d6:cc:f7:42:8c:fe:83:2c:84:8c:80: fb:1c:88:f6:35:1c:ae:43:72:fa:68:30:9c:25:8b:db:2c:84: 87:76:9d:b9 */ static char server_cert_data[] ="-----BEGIN CERTIFICATE-----\n" "MIIDhDCCAmygAwIBAgIBBDANBgkqhkiG9w0BAQUFADCBlDELMAkGA1UEBhMCSlAx\n" "DjAMBgNVBAgMBVRva3lvMRAwDgYDVQQHDAdLb2dhbmVpMQ0wCwYDVQQKDARXSURF\n" "MQ8wDQYDVQQLDAZBQUEgV0cxHzAdBgNVBAMMFmNoYXZyb3V4LmNvd2FkZGljdC5v\n" "cmcxIjAgBgkqhkiG9w0BCQEWE3NkZWN1Z2lzQG5pY3QuZ28uanAwHhcNMDkxMDI3\n" "MDQwMzM5WhcNMTkxMDI1MDQwMzM5WjB9MQswCQYDVQQGEwJKUDEOMAwGA1UECAwF\n" "VG9reW8xEDAOBgNVBAcMB0tvZ2FuZWkxDTALBgNVBAoMBFdJREUxDzANBgNVBAsM\n" "BkFBQSBXRzESMBAGA1UEAwwJc2Vydi50ZXN0MRgwFgYJKoZIhvcNAQkBFglzZXJ2\n" "QHRlc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKb3HKmQW/rI9qMEDNCL\n" "RcOQ9y3Cyde9Zop8HFGJQJ7NcFfLAEej6HaLALPJww2xuSoIn1KSgtMYwdjRuB79\n" "cf4j7BnpbZ39roi8OUR6N63GiNFkfLHUPKkwxN5RAsRITyU+L5OuJTJmmtz0REX/\n" "fxJJlw0BjROa04+eLWKVAgrHAgMBAAGjezB5MAkGA1UdEwQCMAAwLAYJYIZIAYb4\n" "QgENBB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmljYXRlMB0GA1UdDgQWBBQM\n" "M8R/OdA0//hhoUaLSR2jV7NNWDAfBgNVHSMEGDAWgBSSqlWfs3eCaIntfnNDZuSL\n" "7uq/hTANBgkqhkiG9w0BAQUFAAOCAQEAh/VJpgT5mJrxGmjOBq5MDAjrupjnP98i\n" "fzWIHbeK84mjaA1TResjod1r3LCAWAwQC0l06qi2jC7Gc9x6dMdZPnla0lwVC/HY\n" "GTcqwCJ1ED9M6aHg67KeCXA9Kkz+nJk2S6ps4YucquEpH0lrFNsSrs9oSt0D4Tut\n" "ebRUhB27rEXEhfEDZWWWI67nlzxc285VNF3Dc+zN9g+lgV/Cq6NC+jZ/g+/bD81i\n" "C+rZT3M1aF8j1Qq+/38jmq8Npfg+OvBjHOHSloHPe1pr0JtnVp6qqejxbPtUKxr0\n" "7xZavh2pyNbM90KM/oMshIyA+xyI9jUcrkNy+mgwnCWL2yyEh3aduQ==\n" "-----END CERTIFICATE-----\n"; static char server_priv_data[] ="-----BEGIN RSA PRIVATE KEY-----\n" "MIICXQIBAAKBgQCm9xypkFv6yPajBAzQi0XDkPctwsnXvWaKfBxRiUCezXBXywBH\n" "o+h2iwCzycMNsbkqCJ9SkoLTGMHY0bge/XH+I+wZ6W2d/a6IvDlEejetxojRZHyx\n" "1DypMMTeUQLESE8lPi+TriUyZprc9ERF/38SSZcNAY0TmtOPni1ilQIKxwIDAQAB\n" "AoGAZv3Ddm0P79CLIt9asEFY1VvUvSuMqkGwwPfx1/HcJJkBFYapM4fN22G/Gyf3\n" "47ifSWhsLtklTeXVnVMwSh14dJaJQuSEnaFnUUWfjiRbEAXZnMFwAIiaszEZbPap\n" "NUNpcGl06FZrphYAMkjOVUfjCjfOZDAvL4JGpo271Zx4l0ECQQDYoFFQpBCPx0PK\n" "TWUmvatXI/Amo94XkGfofbdeeI8PiAJBO5UI6rmjjIVwsJwO9dQb/IlP1/OnBeJv\n" "p9YW5uixAkEAxVAOKu7mpGu0Q/K2iEUUYDX9YHf253kgkdIDF4iZk4Tcecjoxuru\n" "fIWu9dMtyDVV+HT2X4cNEnO1/oS3kJII9wJBAJkdwDwiqz4lV6o/yFZ4zAoc8dsu\n" "CoZXYMq5SYox5tTQit928OHLn4mVgqBjhPsiEVnyx0+zUZpmE2ZemHm5nxECQHfE\n" "FBVzVYRP6+eil7E3XRrZKqc3qiLunxpkA4RxYebtKnaxwLmdOI1VB9InEQ8JcNmT\n" "BUkOzJx6p+mJ3XJfchkCQQDWmbMYYJajsjlS4YpdUUj7cBSotA6vtkNVHFr0/ak/\n" "S+tLkMNuruaInWizK+BKYTIJLlQDf5u5NTrw41vye5Hv\n" "-----END RSA PRIVATE KEY-----\n"; /* Expired: Certificate: Data: Version: 3 (0x2) Serial Number: 6 (0x6) Signature Algorithm: sha1WithRSAEncryption Issuer: C=JP, ST=Tokyo, L=Koganei, O=WIDE, OU=AAA WG, CN=chavroux.cowaddict.org/emailAddress=sdecugis@nict.go.jp Validity Not Before: Oct 27 04:06:35 2009 GMT Not After : Oct 28 04:06:35 2009 GMT Subject: C=JP, ST=Tokyo, L=Koganei, O=WIDE, OU=AAA WG, CN=expired.test/emailAddress=expired@test Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public Key: (1024 bit) Modulus (1024 bit): 00:e3:17:15:54:85:dc:cf:c7:a0:32:4a:49:7d:55: 75:9b:29:15:db:7e:87:17:d9:0e:65:44:53:d7:19: 37:27:c7:c6:fe:c6:dc:72:2b:dc:86:1a:ff:24:6c: 63:3f:75:9c:0a:14:e1:70:06:79:d4:b9:26:d4:68: 4c:28:38:ba:34:60:56:02:3d:94:55:4a:1f:4e:5a: f0:a5:71:4c:3e:71:69:39:ad:bc:aa:55:35:fb:73: 5b:5f:6c:30:71:8e:8a:b6:a5:06:cc:ee:dd:29:c7: 52:0d:a7:9c:0f:a1:ba:52:11:e2:1b:b9:74:6b:08: 87:11:d2:ec:a9:ac:63:63:4f Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Basic Constraints: CA:FALSE Netscape Comment: OpenSSL Generated Certificate X509v3 Subject Key Identifier: 1C:AF:66:42:5B:AD:AA:A5:9B:D9:AE:3A:C1:5A:AC:2F:CC:CE:22:6C X509v3 Authority Key Identifier: keyid:92:AA:55:9F:B3:77:82:68:89:ED:7E:73:43:66:E4:8B:EE:EA:BF:85 Signature Algorithm: sha1WithRSAEncryption 60:8f:55:55:59:82:0f:64:cb:b8:11:c8:44:ce:bf:69:07:0d: be:c2:34:be:42:6a:78:15:39:9f:be:8a:17:d6:43:42:c9:7c: f1:6d:5d:aa:c3:1b:4d:b0:f0:b6:73:46:2a:87:cd:55:56:a3: 6d:cc:de:a8:28:6a:53:85:9e:e5:68:b7:3c:f5:72:13:7b:d0: 21:f2:91:49:35:e0:37:1e:28:19:d5:1b:cc:e1:32:1e:7f:b0: 86:df:43:a4:47:0f:29:0b:eb:51:60:9a:f5:ca:50:f4:2d:59: cd:fc:50:9d:29:ed:45:98:de:a2:5c:d1:b5:7a:34:ad:7a:73: 48:8b:a2:9b:89:8e:4a:2e:2a:04:19:d6:62:6a:0d:f0:96:f2: f0:d0:22:77:3b:7f:b1:2a:f4:3b:17:47:5e:38:07:09:65:ad: 1d:ea:46:69:6a:96:b6:6b:3b:5c:cc:6e:30:d7:cb:53:69:59: c2:63:78:2b:03:d4:d4:f7:17:29:99:9a:43:ff:78:0a:af:42: c5:b3:8d:09:38:5b:30:70:28:c1:97:ab:fd:7f:87:9a:ec:f2: 97:44:ff:f5:b9:41:30:d1:c6:32:98:69:34:c4:39:30:6f:e2: d3:b2:70:97:66:ee:41:f5:ae:0f:09:f0:ed:60:96:67:a9:8a: cd:d6:95:f2 */ static char expired_cert_data[]="-----BEGIN CERTIFICATE-----\n" "MIIDizCCAnOgAwIBAgIBBjANBgkqhkiG9w0BAQUFADCBlDELMAkGA1UEBhMCSlAx\n" "DjAMBgNVBAgMBVRva3lvMRAwDgYDVQQHDAdLb2dhbmVpMQ0wCwYDVQQKDARXSURF\n" "MQ8wDQYDVQQLDAZBQUEgV0cxHzAdBgNVBAMMFmNoYXZyb3V4LmNvd2FkZGljdC5v\n" "cmcxIjAgBgkqhkiG9w0BCQEWE3NkZWN1Z2lzQG5pY3QuZ28uanAwHhcNMDkxMDI3\n" "MDQwNjM1WhcNMDkxMDI4MDQwNjM1WjCBgzELMAkGA1UEBhMCSlAxDjAMBgNVBAgM\n" "BVRva3lvMRAwDgYDVQQHDAdLb2dhbmVpMQ0wCwYDVQQKDARXSURFMQ8wDQYDVQQL\n" "DAZBQUEgV0cxFTATBgNVBAMMDGV4cGlyZWQudGVzdDEbMBkGCSqGSIb3DQEJARYM\n" "ZXhwaXJlZEB0ZXN0MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDjFxVUhdzP\n" "x6AySkl9VXWbKRXbfocX2Q5lRFPXGTcnx8b+xtxyK9yGGv8kbGM/dZwKFOFwBnnU\n" "uSbUaEwoOLo0YFYCPZRVSh9OWvClcUw+cWk5rbyqVTX7c1tfbDBxjoq2pQbM7t0p\n" "x1INp5wPobpSEeIbuXRrCIcR0uyprGNjTwIDAQABo3sweTAJBgNVHRMEAjAAMCwG\n" "CWCGSAGG+EIBDQQfFh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZpY2F0ZTAdBgNV\n" "HQ4EFgQUHK9mQlutqqWb2a46wVqsL8zOImwwHwYDVR0jBBgwFoAUkqpVn7N3gmiJ\n" "7X5zQ2bki+7qv4UwDQYJKoZIhvcNAQEFBQADggEBAGCPVVVZgg9ky7gRyETOv2kH\n" "Db7CNL5CangVOZ++ihfWQ0LJfPFtXarDG02w8LZzRiqHzVVWo23M3qgoalOFnuVo\n" "tzz1chN70CHykUk14DceKBnVG8zhMh5/sIbfQ6RHDykL61FgmvXKUPQtWc38UJ0p\n" "7UWY3qJc0bV6NK16c0iLopuJjkouKgQZ1mJqDfCW8vDQInc7f7Eq9DsXR144Bwll\n" "rR3qRmlqlrZrO1zMbjDXy1NpWcJjeCsD1NT3FymZmkP/eAqvQsWzjQk4WzBwKMGX\n" "q/1/h5rs8pdE//W5QTDRxjKYaTTEOTBv4tOycJdm7kH1rg8J8O1glmepis3WlfI=\n" "-----END CERTIFICATE-----\n"; static char expired_priv_data[]="-----BEGIN RSA PRIVATE KEY-----\n" "MIICXgIBAAKBgQDjFxVUhdzPx6AySkl9VXWbKRXbfocX2Q5lRFPXGTcnx8b+xtxy\n" "K9yGGv8kbGM/dZwKFOFwBnnUuSbUaEwoOLo0YFYCPZRVSh9OWvClcUw+cWk5rbyq\n" "VTX7c1tfbDBxjoq2pQbM7t0px1INp5wPobpSEeIbuXRrCIcR0uyprGNjTwIDAQAB\n" "AoGASwPoDui9XYHTIGm7xwRA+kVjLAOq+qy//aHJlEeHGcP7r1PfpHNqwH4QhGat\n" "jlv6dLYbFld9TVDwS8A8UBkVIPLWnCysd5tF2A4C5akx6ouW6HliW/JheYrgl8AV\n" "PVeR3bm91UbnpC0ABVlw87jp1Ovyr60Suo4jsoJz+CyTa2ECQQD0LJWpnwn1jIlR\n" "DGkLi7F3E70JJcdhTWzBjGFD+Na+/2ZO0MKLhK+O1WUkKa0oi+e5P1JOnGIpTI8c\n" "BJOO415RAkEA7hauapYuqGI/auSPH8/nFB5z1G94RTxo2a5THKcG5MqS/8N3ubFj\n" "i2PPS0lEYVjqoHEsZUsMnDmXp6KDKMAfnwJBAIp+T1UqM8fmsmwaEerOjRXxSCNM\n" "Hk5+T9Vn/jNDjOpAipLhrbbcx4bIWtmsGd8Jm6Fi3RhhcvvhxLorjlZZeEECQQCf\n" "IaPD88sNmlUewdLzhUbCiLQMadCuHflKfRxpyy1tYAQuVFxCTdDlynkzra25ju+K\n" "+vmcXjP4evnk/lbBtt+rAkEAgOr4Apgs3nMppngPV5yFx0NDqH2n8PlEAM1Il4Qs\n" "IuuK18v0KwlUGAfEEmCiNh1e1qkLmD0CnI2QjYAjcLQUhw==\n" "-----END RSA PRIVATE KEY-----\n"; /* Unknown CA certificate : Certificate: Data: Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: sha1WithRSAEncryption Issuer: C=JP, ST=Tokyo, L=Koganei, O=WIDE, OU=AAA WG, CN=chavroux.cowaddict.org/emailAddress=sdecugis@nict.go.jp Validity Not Before: Oct 28 08:04:40 2009 GMT Not After : Oct 28 08:04:40 2010 GMT Subject: C=JP, ST=Tokyo, L=Koganei, O=WIDE, OU=AAA WG, CN=unknown.cs/emailAddress=unknown@ca Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public Key: (1024 bit) Modulus (1024 bit): 00:e6:3a:d5:8a:14:c8:15:d0:f0:5c:03:c3:af:33: 51:2c:17:b7:65:ac:45:e8:48:2d:ae:70:fd:7c:79: 3a:c7:80:c8:50:53:d0:19:d8:3a:26:a8:16:4d:4c: 04:17:09:df:69:9b:59:2b:89:c8:e0:60:bb:1d:37: 82:d2:3f:17:39:c9:8f:5d:76:e1:0f:6e:08:9a:8f: 16:4a:ea:83:86:f9:bd:15:14:56:68:87:79:05:f9: 5f:66:11:bd:22:46:26:64:be:57:16:51:66:41:50: ac:f2:b1:ca:d0:38:11:4b:4c:b2:ee:25:36:6e:d3: b9:63:72:c4:84:82:1c:2b:27 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Basic Constraints: CA:FALSE Netscape Comment: OpenSSL Generated Certificate X509v3 Subject Key Identifier: BA:5A:9D:D2:B0:4B:72:D6:1F:00:11:0B:B5:7B:59:DF:08:38:81:BE X509v3 Authority Key Identifier: keyid:52:C5:A4:63:B8:DB:AC:F2:92:34:2F:72:56:71:C8:11:8E:76:E6:DF Signature Algorithm: sha1WithRSAEncryption 90:8f:3b:bd:e3:a1:ca:6a:92:a6:fd:f0:64:ae:46:83:32:35: 61:80:57:8b:30:12:70:02:e1:51:d9:87:c8:af:d9:4b:b9:6d: bf:ab:86:5f:19:1f:dc:af:84:67:bf:3c:bf:33:f3:7c:c6:81: 7b:e4:e9:26:1d:bc:d6:8c:ab:72:94:7f:85:33:95:d9:24:ec: fd:7b:d2:fd:50:3e:e5:61:4f:75:51:ae:c6:4a:ec:df:cf:aa: 73:a5:08:f7:f3:9a:40:66:48:f0:8e:9b:43:b1:30:f3:e3:c8: 36:3f:68:36:6a:1c:aa:16:40:49:b4:73:9a:71:f1:17:6c:0b: d3:e1:a7:b7:40:de:2c:3c:36:7c:d4:dd:d6:94:c9:d7:5f:f5: ae:35:56:e8:cc:65:9c:bb:3d:e8:7a:ca:0e:ed:78:03:41:cb: fd:80:81:de:f9:de:b2:14:4b:81:24:36:de:29:c1:06:11:86: 8c:a9:b0:0c:c7:57:cf:79:a7:3a:84:0c:27:dc:86:6d:cb:44: 2d:26:dc:7e:fb:17:d6:b2:3d:31:03:d3:f1:ab:5d:91:5d:94: e4:94:88:70:96:b3:7c:0f:15:fe:c8:c6:4d:99:37:ab:09:0c: da:ba:b6:0e:fa:5e:bb:4b:ce:04:21:06:09:a9:2c:27:86:76: cc:ee:73:6f */ static char notrust_ca_data[] = "-----BEGIN CERTIFICATE-----\n" "MIIEqjCCA5KgAwIBAgIJAP3UMghSlH9PMA0GCSqGSIb3DQEBBQUAMIGUMQswCQYD\n" "VQQGEwJKUDEOMAwGA1UECAwFVG9reW8xEDAOBgNVBAcMB0tvZ2FuZWkxDTALBgNV\n" "BAoMBFdJREUxDzANBgNVBAsMBkFBQSBXRzEfMB0GA1UEAwwWY2hhdnJvdXguY293\n" "YWRkaWN0Lm9yZzEiMCAGCSqGSIb3DQEJARYTc2RlY3VnaXNAbmljdC5nby5qcDAe\n" "Fw0wOTEwMjgwODAzNDRaFw0xOTEwMjYwODAzNDRaMIGUMQswCQYDVQQGEwJKUDEO\n" "MAwGA1UECAwFVG9reW8xEDAOBgNVBAcMB0tvZ2FuZWkxDTALBgNVBAoMBFdJREUx\n" "DzANBgNVBAsMBkFBQSBXRzEfMB0GA1UEAwwWY2hhdnJvdXguY293YWRkaWN0Lm9y\n" "ZzEiMCAGCSqGSIb3DQEJARYTc2RlY3VnaXNAbmljdC5nby5qcDCCASIwDQYJKoZI\n" "hvcNAQEBBQADggEPADCCAQoCggEBALKW9iSUggF5mbvYe1Xk128Csfiijx+fwH5y\n" "ZqWrHNt0YG/tZSwyCDMWBLXTeuYsntg5y0mcpsrN8v02tvrPiCzDfRPyz3mG68us\n" "DPEEgQ1kqL2Gsti2DUcsdyZcDM+4rgsWRivgOTVyoNimv5f+xgmPYoElkgelLwZK\n" "WxGt1VCebOxP3qZA3hSHWE1hJgL4svful7RD1PbwPzidxJKITyAiJoPKWQA9cjSa\n" "gVzRQ7S4vmYALJn7xe+dMFRcfAK8RMv7/gJF6Rw7zufW0DIZK98KZs6aL0lmMPVk\n" "f31N2uvndf+cjy0n4luwEoXY+TeJZY205lbwHrzR0rH75FSm0RsCAwEAAaOB/DCB\n" "+TAdBgNVHQ4EFgQUUsWkY7jbrPKSNC9yVnHIEY525t8wgckGA1UdIwSBwTCBvoAU\n" "UsWkY7jbrPKSNC9yVnHIEY525t+hgZqkgZcwgZQxCzAJBgNVBAYTAkpQMQ4wDAYD\n" "VQQIDAVUb2t5bzEQMA4GA1UEBwwHS29nYW5laTENMAsGA1UECgwEV0lERTEPMA0G\n" "A1UECwwGQUFBIFdHMR8wHQYDVQQDDBZjaGF2cm91eC5jb3dhZGRpY3Qub3JnMSIw\n" "IAYJKoZIhvcNAQkBFhNzZGVjdWdpc0BuaWN0LmdvLmpwggkA/dQyCFKUf08wDAYD\n" "VR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEACANo6IR3OQlQaXHJaprVVDvl\n" "oMJC0FRbVCK503sbmWTJL98UqxRdsTZNIL07gXlK0oUKyiNijIXiLG8d5IlUrDxF\n" "H/Vsu6s8k3/PpAUVeiO2oygWqvU5NGvt0jg54MrOJKhYYPWrzbmHty+cAXyoNzOR\n" "+W5RX6HRQgxvZWQq2Ok46VX622R1nNjFmCBYT7I7/gWG+hkbIAoH6d9sULLjpC+B\n" "bI+L/N7ac9/Og8pGIgpUI60Gn5zO93+E+Nhg+1BlcDHGnQD6vFNs8LYp5CCX/Zj1\n" "tWFVXZnx58odaU3M4t9/ZQnkZdx9YJIroETbN0PoqlnSagBjgUvbWwn4YCotCA==\n" "-----END CERTIFICATE-----\n"; static char notrust_cert_data[]="-----BEGIN CERTIFICATE-----\n" "MIIDhjCCAm6gAwIBAgIBATANBgkqhkiG9w0BAQUFADCBlDELMAkGA1UEBhMCSlAx\n" "DjAMBgNVBAgMBVRva3lvMRAwDgYDVQQHDAdLb2dhbmVpMQ0wCwYDVQQKDARXSURF\n" "MQ8wDQYDVQQLDAZBQUEgV0cxHzAdBgNVBAMMFmNoYXZyb3V4LmNvd2FkZGljdC5v\n" "cmcxIjAgBgkqhkiG9w0BCQEWE3NkZWN1Z2lzQG5pY3QuZ28uanAwHhcNMDkxMDI4\n" "MDgwNDQwWhcNMTAxMDI4MDgwNDQwWjB/MQswCQYDVQQGEwJKUDEOMAwGA1UECAwF\n" "VG9reW8xEDAOBgNVBAcMB0tvZ2FuZWkxDTALBgNVBAoMBFdJREUxDzANBgNVBAsM\n" "BkFBQSBXRzETMBEGA1UEAwwKdW5rbm93bi5jczEZMBcGCSqGSIb3DQEJARYKdW5r\n" "bm93bkBjYTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA5jrVihTIFdDwXAPD\n" "rzNRLBe3ZaxF6EgtrnD9fHk6x4DIUFPQGdg6JqgWTUwEFwnfaZtZK4nI4GC7HTeC\n" "0j8XOcmPXXbhD24Imo8WSuqDhvm9FRRWaId5BflfZhG9IkYmZL5XFlFmQVCs8rHK\n" "0DgRS0yy7iU2btO5Y3LEhIIcKycCAwEAAaN7MHkwCQYDVR0TBAIwADAsBglghkgB\n" "hvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYE\n" "FLpandKwS3LWHwARC7V7Wd8IOIG+MB8GA1UdIwQYMBaAFFLFpGO426zykjQvclZx\n" "yBGOdubfMA0GCSqGSIb3DQEBBQUAA4IBAQCQjzu946HKapKm/fBkrkaDMjVhgFeL\n" "MBJwAuFR2YfIr9lLuW2/q4ZfGR/cr4Rnvzy/M/N8xoF75OkmHbzWjKtylH+FM5XZ\n" "JOz9e9L9UD7lYU91Ua7GSuzfz6pzpQj385pAZkjwjptDsTDz48g2P2g2ahyqFkBJ\n" "tHOacfEXbAvT4ae3QN4sPDZ81N3WlMnXX/WuNVbozGWcuz3oesoO7XgDQcv9gIHe\n" "+d6yFEuBJDbeKcEGEYaMqbAMx1fPeac6hAwn3IZty0QtJtx++xfWsj0xA9Pxq12R\n" "XZTklIhwlrN8DxX+yMZNmTerCQzaurYO+l67S84EIQYJqSwnhnbM7nNv\n" "-----END CERTIFICATE-----\n"; static char notrust_priv_data[]="-----BEGIN RSA PRIVATE KEY-----\n" "MIICXQIBAAKBgQDmOtWKFMgV0PBcA8OvM1EsF7dlrEXoSC2ucP18eTrHgMhQU9AZ\n" "2DomqBZNTAQXCd9pm1kricjgYLsdN4LSPxc5yY9dduEPbgiajxZK6oOG+b0VFFZo\n" "h3kF+V9mEb0iRiZkvlcWUWZBUKzyscrQOBFLTLLuJTZu07ljcsSEghwrJwIDAQAB\n" "AoGAeRec1SGVE5Rvt5XrSK0vFofq2DlCE6hTDpszWFLTDbe4pDdRDybhfw+Nm15O\n" "EGgK8BrbTcEMvKdkAzv9POQeLDE8JImgesHZFxN3jnkK+b762BGRDt57DzvMJsfj\n" "1LBle+UBnZB1CvjrINvu+tNMVPlUpjIstbpMq0D+s01+ijECQQD8MHTv/M+Uc86u\n" "1SFywgs+eQPQ8g0OoTLxzqo6YhW8FtwLjoRCZx2TNQS5gYBuQrixd/yE0Spfv9aS\n" "UtlAaOc1AkEA6bVufggHVHcgiWqS8CHzb6g/GRxQixVshOsoVLMkCSz04zlwIfXF\n" "c03hh5RJVv7jmuBmhHbayujMgvinw75oawJAQb9oXUDt5Wgj1FTgeYi5YbovEoRo\n" "fw3ruDsHCl2UCQt0ptarCJzVixFhf/ORRi3C9RGxFfdqMrhS+qb62N4AmQJBALYU\n" "T1BLiwJoiWXmLTJ/EP0V9Irov2uMtm5cE6DhrJqlduksz8r1gu7RZ3tMsVLg5Iy+\n" "dcCQJOffNa54caQUTZ8CQQDTs/70Nr6F6ktrtmtU/S7lIitpQJCu9u/SPyBYPmFZ\n" "9Axy6Ee66Php+eWDNP4Ln4axrapD0732wD8DcmGDVHij\n" "-----END RSA PRIVATE KEY-----\n"; /* Diffie-Hellman parameters, generated with GNUTLS certtool: certtool --generate-dh-params Generator: 06 Prime: ea:c3:75:0b:32:cf:d9:17:98:5c:da:d1 e0:1d:b9:7c:be:29:60:b0:6f:68:a9:f6 8d:75:05:59:69:04:ae:39:7c:2b:74:04 3c:e2:da:28:8a:9b:93:aa:67:05:a7:3e 06:3e:0d:31:63:88:55:ad:5a:bd:41:22 b7:58:a7:45:b3:d5:03:ad:de:3c:8d:69 42:bf:84:3d:c1:90:e7:39:6a:4b:87:01 19:e5:f3:a4:e5:8e:e2:45:d5:0c:6b:17 22:2b:2e:50:83:91:0c:5b:82:fc:72:27 49:3b:9f:29:11:53:c7:90:b8:8d:87:73 1a:7b:05:ab:cb:30:59:16:71:30:60:1b 4c:80:15:3a:a2:d3:47:b7:4a:61:de:64 7e:79:de:88:53:b7:7a:c6:a2:9a:bb:55 40:2d:7a:71:c7:41:b5:29:df:d7:5c:fb 42:e4:d8:5e:0b:99:d3:3c:93:0f:33:51 8b:f4:60:e4:c5:b5:58:21:c0:51:c4:43 25:7c:37:fe:5c:d3:62:6c:2a:af:a7:2a 82:d5:d3:e2:bb:5d:ad:84:15:f6:78:d9 d5:a8:f7:f0:48:5c:8d:e0:3d:04:ac:cf aa:34:3f:5d:f2:0d:3d:ee:ec:b8:d8:e8 ad:dc:d3:40:59:a0:fd:45:62:47:63:c0 bd:f5:df:8b */ static char dh_params_data[] = "-----BEGIN DH PARAMETERS-----\n" "MIIBCAKCAQEA6sN1CzLP2ReYXNrR4B25fL4pYLBvaKn2jXUFWWkErjl8K3QEPOLa\n" "KIqbk6pnBac+Bj4NMWOIVa1avUEit1inRbPVA63ePI1pQr+EPcGQ5zlqS4cBGeXz\n" "pOWO4kXVDGsXIisuUIORDFuC/HInSTufKRFTx5C4jYdzGnsFq8swWRZxMGAbTIAV\n" "OqLTR7dKYd5kfnneiFO3esaimrtVQC16ccdBtSnf11z7QuTYXguZ0zyTDzNRi/Rg\n" "5MW1WCHAUcRDJXw3/lzTYmwqr6cqgtXT4rtdrYQV9njZ1aj38EhcjeA9BKzPqjQ/\n" "XfINPe7suNjordzTQFmg/UViR2PAvfXfiwIBBg==\n" "-----END DH PARAMETERS-----\n"; /* List server endpoints */ static struct fd_list eps = FD_LIST_INITIALIZER(eps); /* Pass parameters to the connect thread */ struct connect_flags { int proto; int expect_failure; /* 0 or 1 */ }; /* Client's side of the connection established from a separate thread */ static void * connect_thr(void * arg) { struct connect_flags * cf = arg; struct cnxctx * cnx = NULL; fd_log_threadname ( "testcnx:connect" ); /* Connect to the server */ switch (cf->proto) { case IPPROTO_TCP: { struct fd_endpoint * ep = (struct fd_endpoint *)(eps.next); cnx = fd_cnx_cli_connect_tcp( &ep->sa, sSAlen(&ep->ss) ); CHECK( 1, (cnx ? 1 : 0) ^ cf->expect_failure ); } break; #ifndef DISABLE_SCTP case IPPROTO_SCTP: { cnx = fd_cnx_cli_connect_sctp(0, TEST_PORT, &eps); CHECK( 1, (cnx ? 1 : 0) ^ cf->expect_failure ); } break; #endif /* DISABLE_SCTP */ default: CHECK( 0, 1 ); } /* exit */ return cnx; } /* Parameters to the handshake thread */ struct handshake_flags { struct cnxctx * cnx; gnutls_certificate_credentials_t creds; int algo; int ret; }; /* Handshake the client's side */ static void * handshake_thr(void * arg) { struct handshake_flags * hf = arg; fd_log_threadname ( "testcnx:handshake" ); hf->ret = fd_cnx_handshake(hf->cnx, GNUTLS_CLIENT, hf->algo, NULL, hf->creds); return NULL; } /* Terminate the client's connection side */ static void * destroy_thr(void * arg) { struct cnxctx * cnx = arg; fd_log_threadname ( "testcnx:destroy" ); fd_cnx_destroy(cnx); return NULL; } /* Main test routine */ int main(int argc, char *argv[]) { gnutls_datum_t ca = { (uint8_t *)ca_data, sizeof(ca_data) }; gnutls_datum_t server_cert = { (uint8_t *)server_cert_data, sizeof(server_cert_data) }; gnutls_datum_t server_priv = { (uint8_t *)server_priv_data, sizeof(server_priv_data) }; gnutls_datum_t client_cert = { (uint8_t *)client_cert_data, sizeof(client_cert_data) }; gnutls_datum_t client_priv = { (uint8_t *)client_priv_data, sizeof(client_priv_data) }; gnutls_datum_t expired_cert = { (uint8_t *)expired_cert_data, sizeof(expired_cert_data) }; gnutls_datum_t expired_priv = { (uint8_t *)expired_priv_data, sizeof(expired_priv_data) }; gnutls_datum_t notrust_ca = { (uint8_t *)notrust_ca_data, sizeof(notrust_ca_data) }; gnutls_datum_t notrust_cert = { (uint8_t *)notrust_cert_data, sizeof(notrust_cert_data) }; gnutls_datum_t notrust_priv = { (uint8_t *)notrust_priv_data, sizeof(notrust_priv_data) }; gnutls_datum_t dh_params = { (uint8_t *)dh_params_data, sizeof(dh_params_data) }; /* Listening socket, server side */ struct cnxctx * listener; #ifndef DISABLE_SCTP struct cnxctx * listener_sctp; #endif /* DISABLE_SCTP */ /* Server & client connected sockets */ struct cnxctx * server_side; struct cnxctx * client_side; pthread_t thr; int ret, i; uint8_t * cer_buf; size_t cer_sz; uint8_t * rcv_buf; size_t rcv_sz; /* First, initialize the daemon modules */ INIT_FD(); /* Restrain the # of streams */ fd_g_config->cnf_sctp_str = NB_STREAMS; /* Set the CA parameter in the config */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_trust_mem( fd_g_config->cnf_sec_data.credentials, &ca, GNUTLS_X509_FMT_PEM), ); CHECK( 1, ret ); #ifdef GNUTLS_VERSION_300 { /* We import these CA in the trust list */ gnutls_x509_crt_t * calist; unsigned int cacount = 0; CHECK_GNUTLS_DO( ret = gnutls_x509_crt_list_import2(&calist, &cacount, &ca, GNUTLS_X509_FMT_PEM, GNUTLS_X509_CRT_LIST_FAIL_IF_UNSORTED), ); CHECK( 1, cacount ); CHECK_GNUTLS_DO( ret = gnutls_x509_trust_list_add_cas (fd_g_config->cnf_sec_data.trustlist, calist, cacount, 0), ); CHECK( 1, ret ); } /* Use certificate verification during the handshake */ gnutls_certificate_set_verify_function (fd_g_config->cnf_sec_data.credentials, fd_tls_verify_credentials_2); #endif /* GNUTLS_VERSION_300 */ /* Set the server credentials (in config) */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_key_mem( fd_g_config->cnf_sec_data.credentials, &server_cert, &server_priv, GNUTLS_X509_FMT_PEM), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Set the default priority */ CHECK_GNUTLS_DO( ret = gnutls_priority_init( &fd_g_config->cnf_sec_data.prio_cache, GNUTLS_DEFAULT_PRIORITY, NULL), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Set default DH params */ CHECK_GNUTLS_DO( ret = gnutls_dh_params_import_pkcs3( fd_g_config->cnf_sec_data.dh_cache, &dh_params, GNUTLS_X509_FMT_PEM), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Initialize the server address (this should give a safe loopback address + port, even on non-standard configs) */ { struct addrinfo hints, *ai, *aip; memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_NUMERICSERV; hints.ai_family = AF_INET; CHECK( 0, getaddrinfo("localhost", _stringize(TEST_PORT), &hints, &ai) ); aip = ai; while (aip) { CHECK( 0, fd_ep_add_merge( &eps, aip->ai_addr, aip->ai_addrlen, EP_FL_DISC | EP_ACCEPTALL )); aip = aip->ai_next; }; freeaddrinfo(ai); CHECK( 0, FD_IS_LIST_EMPTY(&eps) ? 1 : 0 ); } /* Start the server(s) */ { /* TCP server */ listener = fd_cnx_serv_tcp(TEST_PORT, 0, (struct fd_endpoint *)(eps.next)); CHECK( 1, listener ? 1 : 0 ); /* Accept incoming clients */ CHECK( 0, fd_cnx_serv_listen(listener)); #ifndef DISABLE_SCTP /* SCTP server */ listener_sctp = fd_cnx_serv_sctp(TEST_PORT, &eps); CHECK( 1, listener_sctp ? 1 : 0 ); /* Accept incoming clients */ CHECK( 0, fd_cnx_serv_listen(listener_sctp)); #endif /* DISABLE_SCTP */ } /* Initialize the CER message */ { struct msg * cer; struct dict_object * model = NULL; struct avp * oh; union avp_value value; /* Find the CER dictionary object */ CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Capabilities-Exchange-Request", &model, ENOENT ) ); /* Create the instance */ CHECK( 0, fd_msg_new ( model, 0, &cer ) ); /* Now find the Origin-Host dictionary object */ CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Host", &model, ENOENT ) ); /* Create the instance */ CHECK( 0, fd_msg_avp_new ( model, 0, &oh ) ); value.os.data = (uint8_t *)"Client.side"; value.os.len = strlen((char *)value.os.data); CHECK( 0, fd_msg_avp_setvalue ( oh, &value ) ); /* Add the AVP */ CHECK( 0, fd_msg_avp_add( cer, MSG_BRW_LAST_CHILD, oh) ); #if 0 /* For debug: dump the object */ fd_log_debug("Dumping CER"); fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, cer, fd_g_config->cnf_dict, 0, 1)); #endif CHECK( 0, fd_msg_bufferize( cer, &cer_buf, &cer_sz ) ); CHECK( 0, fd_msg_free(cer) ); } /* Simple TCP client / server test (no TLS) */ { struct connect_flags cf; memset(&cf, 0, sizeof(cf)); cf.proto = IPPROTO_TCP; /* Start the client thread */ CHECK( 0, pthread_create(&thr, NULL, connect_thr, &cf) ); /* Accept the connection of the client */ server_side = fd_cnx_serv_accept(listener); CHECK( 1, server_side ? 1 : 0 ); CHECK( 0, fd_cnx_start_clear(server_side, 0) ); /* Retrieve the client connection object */ CHECK( 0, pthread_join( thr, (void *)&client_side ) ); CHECK( 1, client_side ? 1 : 0 ); CHECK( 0, fd_cnx_start_clear(client_side, 0) ); /* Send a message and receive it */ CHECK( 0, fd_cnx_send(server_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(client_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); /* Do it in the other direction */ CHECK( 0, fd_cnx_send(client_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(server_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); /* Now close the connections */ fd_cnx_destroy(client_side); fd_cnx_destroy(server_side); } #ifndef DISABLE_SCTP /* Simple SCTP client / server test (no TLS) */ { struct connect_flags cf; memset(&cf, 0, sizeof(cf)); cf.proto = IPPROTO_SCTP; /* Start the client thread */ CHECK( 0, pthread_create(&thr, NULL, connect_thr, &cf) ); /* Accept the connection of the client */ server_side = fd_cnx_serv_accept(listener_sctp); CHECK( 1, server_side ? 1 : 0 ); /* Retrieve the client connection object */ CHECK( 0, pthread_join( thr, (void *)&client_side ) ); CHECK( 1, client_side ? 1 : 0 ); CHECK( 0, fd_cnx_start_clear(server_side, 1) ); /* Send a message and receive it */ CHECK( 0, fd_cnx_send(server_side, cer_buf, cer_sz)); CHECK( EINVAL, fd_cnx_receive(client_side, NULL, &rcv_buf, &rcv_sz)); CHECK( 0, fd_cnx_start_clear(client_side, 0) ); CHECK( 0, fd_cnx_receive(client_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); /* Do it in the other direction */ CHECK( 0, fd_cnx_send(client_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(server_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); /* Do it one more time to use another stream */ CHECK( 0, fd_cnx_send(client_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(server_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); /* Now close the connection */ fd_cnx_destroy(client_side); fd_cnx_destroy(server_side); } #endif /* DISABLE_SCTP */ /* TCP Client / server emulating old Diameter behavior (handshake after 1 message exchange) */ { struct connect_flags cf; struct handshake_flags hf; memset(&cf, 0, sizeof(cf)); cf.proto = IPPROTO_TCP; memset(&hf, 0, sizeof(hf)); /* Initialize remote certificate */ CHECK_GNUTLS_DO( ret = gnutls_certificate_allocate_credentials (&hf.creds), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Set the CA */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_trust_mem( hf.creds, &ca, GNUTLS_X509_FMT_PEM), ); CHECK( 1, ret ); /* Set the key */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_key_mem( hf.creds, &client_cert, &client_priv, GNUTLS_X509_FMT_PEM), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Start the client thread */ CHECK( 0, pthread_create(&thr, NULL, connect_thr, &cf) ); /* Accept the connection of the client */ server_side = fd_cnx_serv_accept(listener); CHECK( 1, server_side ? 1 : 0 ); /* Retrieve the client connection object */ CHECK( 0, pthread_join( thr, (void *)&client_side ) ); CHECK( 1, client_side ? 1 : 0 ); hf.cnx = client_side; /* In legacy Diameter, we exchange first one message (CER / CEA) */ CHECK( 0, fd_cnx_start_clear(server_side, 0) ); CHECK( 0, fd_cnx_start_clear(client_side, 0) ); /* Send a message and receive it */ CHECK( 0, fd_cnx_send(server_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(client_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); /* And the supposed reply */ CHECK( 0, fd_cnx_send(client_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(server_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); /* At this point in legacy Diameter we start the handshake */ CHECK( 0, pthread_create(&thr, NULL, handshake_thr, &hf) ); CHECK( 0, fd_cnx_handshake(server_side, GNUTLS_SERVER, ALGO_HANDSHAKE_DEFAULT /* No impact on TCP */, NULL, NULL) ); CHECK( 0, pthread_join(thr, NULL) ); CHECK( 0, hf.ret ); /* Send a few TLS protected message, and replies */ for (i = 0; i < 2 * NB_STREAMS; i++) { CHECK( 0, fd_cnx_send(server_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(client_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); CHECK( 0, fd_cnx_send(client_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(server_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); } /* Now close the connection */ CHECK( 0, pthread_create(&thr, NULL, destroy_thr, client_side) ); fd_cnx_destroy(server_side); CHECK( 0, pthread_join(thr, NULL) ); /* Free the credentials */ gnutls_certificate_free_keys(hf.creds); gnutls_certificate_free_cas(hf.creds); gnutls_certificate_free_credentials(hf.creds); } #ifndef DISABLE_SCTP /* SCTP Client / server emulating old Diameter behavior (handshake after 1 message exchange) */ { struct connect_flags cf; struct handshake_flags hf; memset(&cf, 0, sizeof(cf)); cf.proto = IPPROTO_SCTP; memset(&hf, 0, sizeof(hf)); hf.algo = ALGO_HANDSHAKE_3436; /* this is mandatory for old TLS mechanism */ /* Initialize remote certificate */ CHECK_GNUTLS_DO( ret = gnutls_certificate_allocate_credentials (&hf.creds), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Set the CA */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_trust_mem( hf.creds, &ca, GNUTLS_X509_FMT_PEM), ); CHECK( 1, ret ); /* Set the key */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_key_mem( hf.creds, &client_cert, &client_priv, GNUTLS_X509_FMT_PEM), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Start the client thread */ CHECK( 0, pthread_create(&thr, NULL, connect_thr, &cf) ); /* Accept the connection of the client */ server_side = fd_cnx_serv_accept(listener_sctp); CHECK( 1, server_side ? 1 : 0 ); /* Retrieve the client connection object */ CHECK( 0, pthread_join( thr, (void *)&client_side ) ); CHECK( 1, client_side ? 1 : 0 ); hf.cnx = client_side; /* In legacy Diameter, we exchange first one message (CER / CEA) */ CHECK( 0, fd_cnx_start_clear(server_side, 0) ); CHECK( 0, fd_cnx_start_clear(client_side, 0) ); /* Send a message and receive it */ CHECK( 0, fd_cnx_send(server_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(client_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); /* And the supposed reply */ CHECK( 0, fd_cnx_send(client_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(server_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); /* At this point in legacy Diameter we start the handshake */ CHECK( 0, pthread_create(&thr, NULL, handshake_thr, &hf) ); CHECK( 0, fd_cnx_handshake(server_side, GNUTLS_SERVER, ALGO_HANDSHAKE_3436, NULL, NULL) ); CHECK( 0, pthread_join(thr, NULL) ); CHECK( 0, hf.ret ); /* Send a few TLS protected message, and replies */ for (i = 0; i < 2 * NB_STREAMS; i++) { CHECK( 0, fd_cnx_send(server_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(client_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); CHECK( 0, fd_cnx_send(client_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(server_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); } /* Now close the connection */ CHECK( 0, pthread_create(&thr, NULL, destroy_thr, client_side) ); fd_cnx_destroy(server_side); CHECK( 0, pthread_join(thr, NULL) ); /* Free the credentials */ gnutls_certificate_free_keys(hf.creds); gnutls_certificate_free_cas(hf.creds); gnutls_certificate_free_credentials(hf.creds); } #endif /* DISABLE_SCTP */ /* TCP Client / server emulating new Diameter behavior (handshake at connection directly) */ { struct connect_flags cf; struct handshake_flags hf; memset(&cf, 0, sizeof(cf)); cf.proto = IPPROTO_TCP; memset(&hf, 0, sizeof(hf)); /* Initialize remote certificate */ CHECK_GNUTLS_DO( ret = gnutls_certificate_allocate_credentials (&hf.creds), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Set the CA */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_trust_mem( hf.creds, &ca, GNUTLS_X509_FMT_PEM), ); CHECK( 1, ret ); /* Set the key */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_key_mem( hf.creds, &client_cert, &client_priv, GNUTLS_X509_FMT_PEM), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Start the client thread */ CHECK( 0, pthread_create(&thr, NULL, connect_thr, &cf) ); /* Accept the connection of the client */ server_side = fd_cnx_serv_accept(listener); CHECK( 1, server_side ? 1 : 0 ); /* Retrieve the client connection object */ CHECK( 0, pthread_join( thr, (void *)&client_side ) ); CHECK( 1, client_side ? 1 : 0 ); hf.cnx = client_side; /* Start the handshake directly */ CHECK( 0, pthread_create(&thr, NULL, handshake_thr, &hf) ); CHECK( 0, fd_cnx_handshake(server_side, GNUTLS_SERVER, ALGO_HANDSHAKE_DEFAULT, NULL, NULL) ); CHECK( 0, pthread_join(thr, NULL) ); CHECK( 0, hf.ret ); /* Send a few TLS protected message, and replies */ for (i = 0; i < 2 * NB_STREAMS; i++) { CHECK( 0, fd_cnx_send(server_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(client_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); CHECK( 0, fd_cnx_send(client_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(server_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); } /* Now close the connection */ CHECK( 0, pthread_create(&thr, NULL, destroy_thr, client_side) ); fd_cnx_destroy(server_side); CHECK( 0, pthread_join(thr, NULL) ); /* Free the credentials */ gnutls_certificate_free_keys(hf.creds); gnutls_certificate_free_cas(hf.creds); gnutls_certificate_free_credentials(hf.creds); } #ifndef DISABLE_SCTP /* SCTP Client / server emulating new Diameter behavior (DTLS handshake at connection directly) */ TODO("Enabled after DTLS implementation"); if (0) { struct connect_flags cf; struct handshake_flags hf; memset(&cf, 0, sizeof(cf)); cf.proto = IPPROTO_SCTP; memset(&hf, 0, sizeof(hf)); /* Initialize remote certificate */ CHECK_GNUTLS_DO( ret = gnutls_certificate_allocate_credentials (&hf.creds), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Set the CA */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_trust_mem( hf.creds, &ca, GNUTLS_X509_FMT_PEM), ); CHECK( 1, ret ); /* Set the key */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_key_mem( hf.creds, &client_cert, &client_priv, GNUTLS_X509_FMT_PEM), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Start the client thread */ CHECK( 0, pthread_create(&thr, NULL, connect_thr, &cf) ); /* Accept the connection of the client */ server_side = fd_cnx_serv_accept(listener_sctp); CHECK( 1, server_side ? 1 : 0 ); /* Retrieve the client connection object */ CHECK( 0, pthread_join( thr, (void *)&client_side ) ); CHECK( 1, client_side ? 1 : 0 ); hf.cnx = client_side; /* Start the handshake directly */ CHECK( 0, pthread_create(&thr, NULL, handshake_thr, &hf) ); CHECK( 0, fd_cnx_handshake(server_side, GNUTLS_SERVER, ALGO_HANDSHAKE_DEFAULT, NULL, NULL) ); CHECK( 0, pthread_join(thr, NULL) ); CHECK( 0, hf.ret ); /* Send a few TLS protected messages, and replies */ for (i = 0; i < 2 * NB_STREAMS; i++) { CHECK( 0, fd_cnx_send(server_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(client_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); CHECK( 0, fd_cnx_send(client_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(server_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); } /* Now close the connection */ CHECK( 0, pthread_create(&thr, NULL, destroy_thr, client_side) ); fd_cnx_destroy(server_side); CHECK( 0, pthread_join(thr, NULL) ); /* Free the credentials */ gnutls_certificate_free_keys(hf.creds); gnutls_certificate_free_cas(hf.creds); gnutls_certificate_free_credentials(hf.creds); } /* SCTP Client / server emulating old intermediary Diameter behavior (TLS handshake at connection directly) */ { struct connect_flags cf; struct handshake_flags hf; memset(&cf, 0, sizeof(cf)); cf.proto = IPPROTO_SCTP; memset(&hf, 0, sizeof(hf)); hf.algo = ALGO_HANDSHAKE_3436; /* this is mandatory for old TLS mechanism */ /* Initialize remote certificate */ CHECK_GNUTLS_DO( ret = gnutls_certificate_allocate_credentials (&hf.creds), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Set the CA */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_trust_mem( hf.creds, &ca, GNUTLS_X509_FMT_PEM), ); CHECK( 1, ret ); /* Set the key */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_key_mem( hf.creds, &client_cert, &client_priv, GNUTLS_X509_FMT_PEM), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Start the client thread */ CHECK( 0, pthread_create(&thr, NULL, connect_thr, &cf) ); /* Accept the connection of the client */ server_side = fd_cnx_serv_accept(listener_sctp); CHECK( 1, server_side ? 1 : 0 ); /* Retrieve the client connection object */ CHECK( 0, pthread_join( thr, (void *)&client_side ) ); CHECK( 1, client_side ? 1 : 0 ); hf.cnx = client_side; /* Start the handshake directly */ CHECK( 0, pthread_create(&thr, NULL, handshake_thr, &hf) ); CHECK( 0, fd_cnx_handshake(server_side, GNUTLS_SERVER, ALGO_HANDSHAKE_3436, NULL, NULL) ); CHECK( 0, pthread_join(thr, NULL) ); CHECK( 0, hf.ret ); /* Send a few TLS protected messages, and replies */ for (i = 0; i < 2 * NB_STREAMS; i++) { CHECK( 0, fd_cnx_send(server_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(client_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); CHECK( 0, fd_cnx_send(client_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(server_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); } /* Now close the connection */ CHECK( 0, pthread_create(&thr, NULL, destroy_thr, client_side) ); fd_cnx_destroy(server_side); CHECK( 0, pthread_join(thr, NULL) ); /* Free the credentials */ gnutls_certificate_free_keys(hf.creds); gnutls_certificate_free_cas(hf.creds); gnutls_certificate_free_credentials(hf.creds); } #endif /* DISABLE_SCTP */ /* Test with different number of streams between server and client */ #ifndef DISABLE_SCTP /* DTLS / SCTP style */ TODO("Enabled after DTLS implementation"); if (0) { struct connect_flags cf; struct handshake_flags hf; memset(&cf, 0, sizeof(cf)); cf.proto = IPPROTO_SCTP; memset(&hf, 0, sizeof(hf)); /* Initialize remote certificate */ CHECK_GNUTLS_DO( ret = gnutls_certificate_allocate_credentials (&hf.creds), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Set the CA */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_trust_mem( hf.creds, &ca, GNUTLS_X509_FMT_PEM), ); CHECK( 1, ret ); /* Set the key */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_key_mem( hf.creds, &client_cert, &client_priv, GNUTLS_X509_FMT_PEM), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Start the client thread with more streams than the server */ fd_g_config->cnf_sctp_str = 2 * NB_STREAMS; CHECK( 0, pthread_create(&thr, NULL, connect_thr, &cf) ); /* Accept the connection of the client */ server_side = fd_cnx_serv_accept(listener_sctp); CHECK( 1, server_side ? 1 : 0 ); /* Retrieve the client connection object */ CHECK( 0, pthread_join( thr, (void *)&client_side ) ); CHECK( 1, client_side ? 1 : 0 ); hf.cnx = client_side; /* Start the handshake directly */ CHECK( 0, pthread_create(&thr, NULL, handshake_thr, &hf) ); CHECK( 0, fd_cnx_handshake(server_side, GNUTLS_SERVER, ALGO_HANDSHAKE_DEFAULT, NULL, NULL) ); CHECK( 0, pthread_join(thr, NULL) ); CHECK( 0, hf.ret ); /* Send a few TLS protected message, and replies */ for (i = 0; i < 4 * NB_STREAMS; i++) { CHECK( 0, fd_cnx_send(server_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(client_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); CHECK( 0, fd_cnx_send(client_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(server_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); } /* Now close the connection */ CHECK( 0, pthread_create(&thr, NULL, destroy_thr, client_side) ); fd_cnx_destroy(server_side); CHECK( 0, pthread_join(thr, NULL) ); /* Do the same test but with more streams on the server this time */ fd_g_config->cnf_sctp_str = NB_STREAMS / 2; CHECK( 0, pthread_create(&thr, NULL, connect_thr, &cf) ); /* Accept the connection of the client */ server_side = fd_cnx_serv_accept(listener_sctp); CHECK( 1, server_side ? 1 : 0 ); /* Retrieve the client connection object */ CHECK( 0, pthread_join( thr, (void *)&client_side ) ); CHECK( 1, client_side ? 1 : 0 ); hf.cnx = client_side; /* Start the handshake directly */ CHECK( 0, pthread_create(&thr, NULL, handshake_thr, &hf) ); CHECK( 0, fd_cnx_handshake(server_side, GNUTLS_SERVER, ALGO_HANDSHAKE_DEFAULT, NULL, NULL) ); CHECK( 0, pthread_join(thr, NULL) ); CHECK( 0, hf.ret ); /* Send a few TLS protected message, and replies */ for (i = 0; i < 2 * NB_STREAMS; i++) { CHECK( 0, fd_cnx_send(server_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(client_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); CHECK( 0, fd_cnx_send(client_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(server_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); } /* Now close the connection */ CHECK( 0, pthread_create(&thr, NULL, destroy_thr, client_side) ); fd_cnx_destroy(server_side); CHECK( 0, pthread_join(thr, NULL) ); /* Free the credentials */ gnutls_certificate_free_keys(hf.creds); gnutls_certificate_free_cas(hf.creds); gnutls_certificate_free_credentials(hf.creds); } /* TLS / SCTP style */ { struct connect_flags cf; struct handshake_flags hf; memset(&cf, 0, sizeof(cf)); cf.proto = IPPROTO_SCTP; memset(&hf, 0, sizeof(hf)); hf.algo = ALGO_HANDSHAKE_3436; /* Initialize remote certificate */ CHECK_GNUTLS_DO( ret = gnutls_certificate_allocate_credentials (&hf.creds), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Set the CA */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_trust_mem( hf.creds, &ca, GNUTLS_X509_FMT_PEM), ); CHECK( 1, ret ); /* Set the key */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_key_mem( hf.creds, &client_cert, &client_priv, GNUTLS_X509_FMT_PEM), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Start the client thread with more streams than the server */ fd_g_config->cnf_sctp_str = 2 * NB_STREAMS; CHECK( 0, pthread_create(&thr, NULL, connect_thr, &cf) ); /* Accept the connection of the client */ server_side = fd_cnx_serv_accept(listener_sctp); CHECK( 1, server_side ? 1 : 0 ); /* Retrieve the client connection object */ CHECK( 0, pthread_join( thr, (void *)&client_side ) ); CHECK( 1, client_side ? 1 : 0 ); hf.cnx = client_side; /* Start the handshake directly */ CHECK( 0, pthread_create(&thr, NULL, handshake_thr, &hf) ); CHECK( 0, fd_cnx_handshake(server_side, GNUTLS_SERVER, ALGO_HANDSHAKE_3436, NULL, NULL) ); CHECK( 0, pthread_join(thr, NULL) ); CHECK( 0, hf.ret ); /* Send a few TLS protected message, and replies */ for (i = 0; i < 4 * NB_STREAMS; i++) { CHECK( 0, fd_cnx_send(server_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(client_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); CHECK( 0, fd_cnx_send(client_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(server_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); } /* Now close the connection */ CHECK( 0, pthread_create(&thr, NULL, destroy_thr, client_side) ); fd_cnx_destroy(server_side); CHECK( 0, pthread_join(thr, NULL) ); /* Do the same test but with more streams on the server this time */ fd_g_config->cnf_sctp_str = NB_STREAMS / 2; CHECK( 0, pthread_create(&thr, NULL, connect_thr, &cf) ); /* Accept the connection of the client */ server_side = fd_cnx_serv_accept(listener_sctp); CHECK( 1, server_side ? 1 : 0 ); /* Retrieve the client connection object */ CHECK( 0, pthread_join( thr, (void *)&client_side ) ); CHECK( 1, client_side ? 1 : 0 ); hf.cnx = client_side; /* Start the handshake directly */ CHECK( 0, pthread_create(&thr, NULL, handshake_thr, &hf) ); CHECK( 0, fd_cnx_handshake(server_side, GNUTLS_SERVER, ALGO_HANDSHAKE_3436, NULL, NULL) ); CHECK( 0, pthread_join(thr, NULL) ); CHECK( 0, hf.ret ); /* Send a few TLS protected message, and replies */ for (i = 0; i < 2 * NB_STREAMS; i++) { CHECK( 0, fd_cnx_send(server_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(client_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); CHECK( 0, fd_cnx_send(client_side, cer_buf, cer_sz)); CHECK( 0, fd_cnx_receive(server_side, NULL, &rcv_buf, &rcv_sz)); CHECK( cer_sz, rcv_sz ); CHECK( 0, memcmp( rcv_buf, cer_buf, cer_sz ) ); free(rcv_buf); } /* Now close the connection */ CHECK( 0, pthread_create(&thr, NULL, destroy_thr, client_side) ); fd_cnx_destroy(server_side); CHECK( 0, pthread_join(thr, NULL) ); /* Free the credentials */ gnutls_certificate_free_keys(hf.creds); gnutls_certificate_free_cas(hf.creds); gnutls_certificate_free_credentials(hf.creds); } #endif /* DISABLE_SCTP */ /* Basic operation tested successfully, now test we detect error conditions */ /* Untrusted certificate, TCP */ { struct connect_flags cf; struct handshake_flags hf; memset(&cf, 0, sizeof(cf)); cf.proto = IPPROTO_TCP; memset(&hf, 0, sizeof(hf)); /* Initialize remote certificate */ CHECK_GNUTLS_DO( ret = gnutls_certificate_allocate_credentials (&hf.creds), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Set the CA */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_trust_mem( hf.creds, ¬rust_ca, GNUTLS_X509_FMT_PEM), ); CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_trust_mem( hf.creds, &ca, GNUTLS_X509_FMT_PEM), ); CHECK( 1, ret ); /* Set the key */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_key_mem( hf.creds, ¬rust_cert, ¬rust_priv, GNUTLS_X509_FMT_PEM), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Start the client thread */ CHECK( 0, pthread_create(&thr, NULL, connect_thr, &cf) ); /* Accept the connection of the client */ server_side = fd_cnx_serv_accept(listener); CHECK( 1, server_side ? 1 : 0 ); /* Retrieve the client connection object */ CHECK( 0, pthread_join( thr, (void *)&client_side ) ); CHECK( 1, client_side ? 1 : 0 ); hf.cnx = client_side; /* Start the handshake directly */ CHECK( 0, pthread_create(&thr, NULL, handshake_thr, &hf) ); CHECK( EINVAL, fd_cnx_handshake(server_side, GNUTLS_SERVER, ALGO_HANDSHAKE_DEFAULT, NULL, NULL) ); fd_cnx_destroy(server_side); CHECK( 0, pthread_join(thr, NULL) ); /* Now close the connection */ CHECK( 0, pthread_create(&thr, NULL, destroy_thr, client_side) ); CHECK( 0, pthread_join(thr, NULL) ); /* Free the credentials */ gnutls_certificate_free_keys(hf.creds); gnutls_certificate_free_cas(hf.creds); gnutls_certificate_free_credentials(hf.creds); } /* Same in SCTP */ #ifndef DISABLE_SCTP /* DTLS */ TODO("Enabled after DTLS implementation"); if (0) { struct connect_flags cf; struct handshake_flags hf; memset(&cf, 0, sizeof(cf)); cf.proto = IPPROTO_SCTP; memset(&hf, 0, sizeof(hf)); /* Initialize remote certificate */ CHECK_GNUTLS_DO( ret = gnutls_certificate_allocate_credentials (&hf.creds), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Set the CA */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_trust_mem( hf.creds, ¬rust_ca, GNUTLS_X509_FMT_PEM), ); CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_trust_mem( hf.creds, &ca, GNUTLS_X509_FMT_PEM), ); CHECK( 1, ret ); /* Set the key */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_key_mem( hf.creds, ¬rust_cert, ¬rust_priv, GNUTLS_X509_FMT_PEM), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Start the client thread */ CHECK( 0, pthread_create(&thr, NULL, connect_thr, &cf) ); /* Accept the connection of the client */ server_side = fd_cnx_serv_accept(listener_sctp); CHECK( 1, server_side ? 1 : 0 ); /* Retrieve the client connection object */ CHECK( 0, pthread_join( thr, (void *)&client_side ) ); CHECK( 1, client_side ? 1 : 0 ); hf.cnx = client_side; /* Start the handshake directly */ CHECK( 0, pthread_create(&thr, NULL, handshake_thr, &hf) ); CHECK( EINVAL, fd_cnx_handshake(server_side, GNUTLS_SERVER, ALGO_HANDSHAKE_DEFAULT, NULL, NULL) ); fd_cnx_destroy(server_side); CHECK( 0, pthread_join(thr, NULL) ); /* Now close the connection */ CHECK( 0, pthread_create(&thr, NULL, destroy_thr, client_side) ); CHECK( 0, pthread_join(thr, NULL) ); /* Free the credentials */ gnutls_certificate_free_keys(hf.creds); gnutls_certificate_free_cas(hf.creds); gnutls_certificate_free_credentials(hf.creds); } /* TLS */ { struct connect_flags cf; struct handshake_flags hf; memset(&cf, 0, sizeof(cf)); cf.proto = IPPROTO_SCTP; memset(&hf, 0, sizeof(hf)); hf.algo = ALGO_HANDSHAKE_3436; /* Initialize remote certificate */ CHECK_GNUTLS_DO( ret = gnutls_certificate_allocate_credentials (&hf.creds), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Set the CA */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_trust_mem( hf.creds, ¬rust_ca, GNUTLS_X509_FMT_PEM), ); CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_trust_mem( hf.creds, &ca, GNUTLS_X509_FMT_PEM), ); CHECK( 1, ret ); /* Set the key */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_key_mem( hf.creds, ¬rust_cert, ¬rust_priv, GNUTLS_X509_FMT_PEM), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Start the client thread */ CHECK( 0, pthread_create(&thr, NULL, connect_thr, &cf) ); /* Accept the connection of the client */ server_side = fd_cnx_serv_accept(listener_sctp); CHECK( 1, server_side ? 1 : 0 ); /* Retrieve the client connection object */ CHECK( 0, pthread_join( thr, (void *)&client_side ) ); CHECK( 1, client_side ? 1 : 0 ); hf.cnx = client_side; /* Start the handshake directly */ CHECK( 0, pthread_create(&thr, NULL, handshake_thr, &hf) ); CHECK( EINVAL, fd_cnx_handshake(server_side, GNUTLS_SERVER, ALGO_HANDSHAKE_3436, NULL, NULL) ); fd_cnx_destroy(server_side); CHECK( 0, pthread_join(thr, NULL) ); /* Now close the connection */ CHECK( 0, pthread_create(&thr, NULL, destroy_thr, client_side) ); CHECK( 0, pthread_join(thr, NULL) ); /* Free the credentials */ gnutls_certificate_free_keys(hf.creds); gnutls_certificate_free_cas(hf.creds); gnutls_certificate_free_credentials(hf.creds); } #endif /* DISABLE_SCTP */ /* Expired certificate */ { struct connect_flags cf; struct handshake_flags hf; memset(&cf, 0, sizeof(cf)); cf.proto = IPPROTO_TCP; memset(&hf, 0, sizeof(hf)); /* Initialize remote certificate */ CHECK_GNUTLS_DO( ret = gnutls_certificate_allocate_credentials (&hf.creds), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Set the CA */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_trust_mem( hf.creds, &ca, GNUTLS_X509_FMT_PEM), ); CHECK( 1, ret ); /* Set the key */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_key_mem( hf.creds, &expired_cert, &expired_priv, GNUTLS_X509_FMT_PEM), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Start the client thread */ CHECK( 0, pthread_create(&thr, NULL, connect_thr, &cf) ); /* Accept the connection of the client */ server_side = fd_cnx_serv_accept(listener); CHECK( 1, server_side ? 1 : 0 ); /* Retrieve the client connection object */ CHECK( 0, pthread_join( thr, (void *)&client_side ) ); CHECK( 1, client_side ? 1 : 0 ); hf.cnx = client_side; /* Start the handshake directly */ CHECK( 0, pthread_create(&thr, NULL, handshake_thr, &hf) ); CHECK( EINVAL, fd_cnx_handshake(server_side, GNUTLS_SERVER, ALGO_HANDSHAKE_DEFAULT, NULL, NULL) ); fd_cnx_destroy(server_side); CHECK( 0, pthread_join(thr, NULL) ); /* Now close the connection */ CHECK( 0, pthread_create(&thr, NULL, destroy_thr, client_side) ); CHECK( 0, pthread_join(thr, NULL) ); /* Free the credentials */ gnutls_certificate_free_keys(hf.creds); gnutls_certificate_free_cas(hf.creds); gnutls_certificate_free_credentials(hf.creds); } /* Non matching hostname */ { struct connect_flags cf; struct handshake_flags hf; memset(&cf, 0, sizeof(cf)); cf.proto = IPPROTO_TCP; memset(&hf, 0, sizeof(hf)); /* Initialize remote certificate */ CHECK_GNUTLS_DO( ret = gnutls_certificate_allocate_credentials (&hf.creds), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Set the CA */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_trust_mem( hf.creds, &ca, GNUTLS_X509_FMT_PEM), ); CHECK( 1, ret ); /* Set the key */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_key_mem( hf.creds, &client_cert, &client_priv, GNUTLS_X509_FMT_PEM), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Start the client thread */ CHECK( 0, pthread_create(&thr, NULL, connect_thr, &cf) ); /* Accept the connection of the client */ server_side = fd_cnx_serv_accept(listener); CHECK( 1, server_side ? 1 : 0 ); /* Retrieve the client connection object */ CHECK( 0, pthread_join( thr, (void *)&client_side ) ); CHECK( 1, client_side ? 1 : 0 ); hf.cnx = client_side; /* Set the correct hostname we expect from the client (in the server) */ fd_cnx_sethostname(server_side, "client.test"); /* Start the handshake, check it is successful */ CHECK( 0, pthread_create(&thr, NULL, handshake_thr, &hf) ); CHECK( 0, fd_cnx_handshake(server_side, GNUTLS_SERVER, ALGO_HANDSHAKE_DEFAULT, NULL, NULL) ); CHECK( 0, pthread_join(thr, NULL) ); CHECK( 0, hf.ret ); /* Now close the connection */ CHECK( 0, pthread_create(&thr, NULL, destroy_thr, client_side) ); fd_cnx_destroy(server_side); CHECK( 0, pthread_join(thr, NULL) ); /* Do it again with an invalid hostname */ CHECK( 0, pthread_create(&thr, NULL, connect_thr, &cf) ); /* Accept the connection of the client */ server_side = fd_cnx_serv_accept(listener); CHECK( 1, server_side ? 1 : 0 ); /* Retrieve the client connection object */ CHECK( 0, pthread_join( thr, (void *)&client_side ) ); CHECK( 1, client_side ? 1 : 0 ); hf.cnx = client_side; /* Set the correct hostname we expect from the client (in the server) */ fd_cnx_sethostname(server_side, "nomatch.test"); /* Start the handshake, check it is successful */ CHECK( 0, pthread_create(&thr, NULL, handshake_thr, &hf) ); CHECK( EINVAL, fd_cnx_handshake(server_side, GNUTLS_SERVER, ALGO_HANDSHAKE_DEFAULT, NULL, NULL) ); fd_cnx_destroy(server_side); CHECK( 0, pthread_join(thr, NULL) ); /* Now close the connection */ CHECK( 0, pthread_create(&thr, NULL, destroy_thr, client_side) ); CHECK( 0, pthread_join(thr, NULL) ); /* Free the credentials */ gnutls_certificate_free_keys(hf.creds); gnutls_certificate_free_cas(hf.creds); gnutls_certificate_free_credentials(hf.creds); } /* Test the other functions of the module */ { struct connect_flags cf; struct handshake_flags hf; char * str; const gnutls_datum_t *cert_list; unsigned int cert_list_size; struct fifo * myfifo = NULL; struct timespec now; int ev_code; memset(&cf, 0, sizeof(cf)); cf.proto = IPPROTO_TCP; memset(&hf, 0, sizeof(hf)); /* Initialize remote certificate */ CHECK_GNUTLS_DO( ret = gnutls_certificate_allocate_credentials (&hf.creds), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Set the CA */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_trust_mem( hf.creds, &ca, GNUTLS_X509_FMT_PEM), ); CHECK( 1, ret ); /* Set the key */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_key_mem( hf.creds, &client_cert, &client_priv, GNUTLS_X509_FMT_PEM), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Start the client thread */ CHECK( 0, pthread_create(&thr, NULL, connect_thr, &cf) ); /* Accept the connection of the client */ server_side = fd_cnx_serv_accept(listener); CHECK( 1, server_side ? 1 : 0 ); /* Retrieve the client connection object */ CHECK( 0, pthread_join( thr, (void *)&client_side ) ); CHECK( 1, client_side ? 1 : 0 ); hf.cnx = client_side; /* Start the handshake */ CHECK( 0, pthread_create(&thr, NULL, handshake_thr, &hf) ); CHECK( 0, fd_cnx_handshake(server_side, GNUTLS_SERVER, ALGO_HANDSHAKE_DEFAULT, NULL, NULL) ); CHECK( 0, pthread_join(thr, NULL) ); CHECK( 0, hf.ret ); /* Test some simple functions */ /* fd_cnx_getid */ str = fd_cnx_getid(server_side); CHECK( 1, str ? 1 : 0 ); CHECK( 1, (str[0] != '\0') ? 1 : 0 ); /* fd_cnx_getproto */ i = fd_cnx_getproto(server_side); CHECK( IPPROTO_TCP, i); /* fd_cnx_getTLS */ i = fd_cnx_getTLS(server_side); CHECK( 1, i ? 1 : 0 ); /* fd_cnx_getcred */ CHECK( 0, fd_cnx_getcred(server_side, &cert_list, &cert_list_size) ); CHECK( 1, (cert_list_size > 0) ? 1 : 0 ); /* We could also verify that the cert_list really contains the client_cert and ca certificates */ /* fd_cnx_getremoteid */ str = fd_cnx_getremoteid(server_side); CHECK( 1, str ? 1 : 0 ); CHECK( 1, (str[0] != '\0') ? 1 : 0 ); /* fd_cnx_recv_setaltfifo */ CHECK( 0, fd_cnx_send(client_side, cer_buf, cer_sz)); CHECK( 0, fd_fifo_new(&myfifo, 0) ); CHECK( 0, fd_cnx_recv_setaltfifo(server_side, myfifo) ); CHECK( 0, clock_gettime(CLOCK_REALTIME, &now) ); do { CHECK( 0, fd_event_timedget(myfifo, &now, ETIMEDOUT, &ev_code, NULL, (void *)&rcv_buf) ); free(rcv_buf); } while (ev_code != FDEVP_CNX_MSG_RECV); /* Now close the connection */ CHECK( 0, pthread_create(&thr, NULL, destroy_thr, client_side) ); fd_cnx_destroy(server_side); CHECK( 0, pthread_join(thr, NULL) ); fd_event_destroy(&myfifo, free); /* Free the credentials */ gnutls_certificate_free_keys(hf.creds); gnutls_certificate_free_cas(hf.creds); gnutls_certificate_free_credentials(hf.creds); } #ifndef DISABLE_SCTP /* And re-test with a SCTP connection */ TODO("Enabled after DTLS implementation"); if (0) { struct connect_flags cf; struct handshake_flags hf; char * str; const gnutls_datum_t *cert_list; unsigned int cert_list_size; struct fifo * myfifo = NULL; struct timespec now; int ev_code; memset(&cf, 0, sizeof(cf)); cf.proto = IPPROTO_SCTP; memset(&hf, 0, sizeof(hf)); /* Initialize remote certificate */ CHECK_GNUTLS_DO( ret = gnutls_certificate_allocate_credentials (&hf.creds), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Set the CA */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_trust_mem( hf.creds, &ca, GNUTLS_X509_FMT_PEM), ); CHECK( 1, ret ); /* Set the key */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_key_mem( hf.creds, &client_cert, &client_priv, GNUTLS_X509_FMT_PEM), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Start the client thread */ CHECK( 0, pthread_create(&thr, NULL, connect_thr, &cf) ); /* Accept the connection of the client */ server_side = fd_cnx_serv_accept(listener_sctp); CHECK( 1, server_side ? 1 : 0 ); /* Retrieve the client connection object */ CHECK( 0, pthread_join( thr, (void *)&client_side ) ); CHECK( 1, client_side ? 1 : 0 ); hf.cnx = client_side; /* Start the handshake */ CHECK( 0, pthread_create(&thr, NULL, handshake_thr, &hf) ); CHECK( 0, fd_cnx_handshake(server_side, GNUTLS_SERVER, ALGO_HANDSHAKE_DEFAULT, NULL, NULL) ); CHECK( 0, pthread_join(thr, NULL) ); CHECK( 0, hf.ret ); /* Test some simple functions */ /* fd_cnx_getid */ str = fd_cnx_getid(server_side); CHECK( 1, str ? 1 : 0 ); CHECK( 1, (str[0] != '\0') ? 1 : 0 ); /* fd_cnx_getproto */ i = fd_cnx_getproto(server_side); CHECK( IPPROTO_SCTP, i); /* fd_cnx_getTLS */ i = fd_cnx_getTLS(server_side); CHECK( 1, i ? 1 : 0 ); /* fd_cnx_getcred */ CHECK( 0, fd_cnx_getcred(server_side, &cert_list, &cert_list_size) ); CHECK( 1, (cert_list_size > 0) ? 1 : 0 ); /* We could also verify that the cert_list really contains the client_cert and ca certificates */ /* fd_cnx_getremoteid */ str = fd_cnx_getremoteid(server_side); CHECK( 1, str ? 1 : 0 ); CHECK( 1, (str[0] != '\0') ? 1 : 0 ); /* fd_cnx_recv_setaltfifo */ CHECK( 0, fd_cnx_send(client_side, cer_buf, cer_sz)); CHECK( 0, fd_fifo_new(&myfifo, 0) ); CHECK( 0, fd_cnx_recv_setaltfifo(server_side, myfifo) ); CHECK( 0, clock_gettime(CLOCK_REALTIME, &now) ); do { CHECK( 0, fd_event_timedget(myfifo, &now, ETIMEDOUT, &ev_code, NULL, (void *)&rcv_buf) ); free(rcv_buf); } while (ev_code != FDEVP_CNX_MSG_RECV); /* Now close the connection */ CHECK( 0, pthread_create(&thr, NULL, destroy_thr, client_side) ); fd_cnx_destroy(server_side); CHECK( 0, pthread_join(thr, NULL) ); fd_event_destroy(&myfifo, free); /* Free the credentials */ gnutls_certificate_free_keys(hf.creds); gnutls_certificate_free_cas(hf.creds); gnutls_certificate_free_credentials(hf.creds); } /* TLS */ { struct connect_flags cf; struct handshake_flags hf; char * str; const gnutls_datum_t *cert_list; unsigned int cert_list_size; struct fifo * myfifo = NULL; struct timespec now; int ev_code; memset(&cf, 0, sizeof(cf)); cf.proto = IPPROTO_SCTP; memset(&hf, 0, sizeof(hf)); hf.algo = ALGO_HANDSHAKE_3436; /* Initialize remote certificate */ CHECK_GNUTLS_DO( ret = gnutls_certificate_allocate_credentials (&hf.creds), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Set the CA */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_trust_mem( hf.creds, &ca, GNUTLS_X509_FMT_PEM), ); CHECK( 1, ret ); /* Set the key */ CHECK_GNUTLS_DO( ret = gnutls_certificate_set_x509_key_mem( hf.creds, &client_cert, &client_priv, GNUTLS_X509_FMT_PEM), ); CHECK( GNUTLS_E_SUCCESS, ret ); /* Start the client thread */ CHECK( 0, pthread_create(&thr, NULL, connect_thr, &cf) ); /* Accept the connection of the client */ server_side = fd_cnx_serv_accept(listener_sctp); CHECK( 1, server_side ? 1 : 0 ); /* Retrieve the client connection object */ CHECK( 0, pthread_join( thr, (void *)&client_side ) ); CHECK( 1, client_side ? 1 : 0 ); hf.cnx = client_side; /* Start the handshake */ CHECK( 0, pthread_create(&thr, NULL, handshake_thr, &hf) ); CHECK( 0, fd_cnx_handshake(server_side, GNUTLS_SERVER, ALGO_HANDSHAKE_3436, NULL, NULL) ); CHECK( 0, pthread_join(thr, NULL) ); CHECK( 0, hf.ret ); /* Test some simple functions */ /* fd_cnx_getid */ str = fd_cnx_getid(server_side); CHECK( 1, str ? 1 : 0 ); CHECK( 1, (str[0] != '\0') ? 1 : 0 ); /* fd_cnx_getproto */ i = fd_cnx_getproto(server_side); CHECK( IPPROTO_SCTP, i); /* fd_cnx_getTLS */ i = fd_cnx_getTLS(server_side); CHECK( 1, i ? 1 : 0 ); /* fd_cnx_getcred */ CHECK( 0, fd_cnx_getcred(server_side, &cert_list, &cert_list_size) ); CHECK( 1, (cert_list_size > 0) ? 1 : 0 ); /* We could also verify that the cert_list really contains the client_cert and ca certificates */ /* fd_cnx_getremoteid */ str = fd_cnx_getremoteid(server_side); CHECK( 1, str ? 1 : 0 ); CHECK( 1, (str[0] != '\0') ? 1 : 0 ); /* fd_cnx_recv_setaltfifo */ CHECK( 0, fd_cnx_send(client_side, cer_buf, cer_sz)); CHECK( 0, fd_fifo_new(&myfifo, 0) ); CHECK( 0, fd_cnx_recv_setaltfifo(server_side, myfifo) ); CHECK( 0, clock_gettime(CLOCK_REALTIME, &now) ); do { CHECK( 0, fd_event_timedget(myfifo, &now, ETIMEDOUT, &ev_code, NULL, (void *)&rcv_buf) ); free(rcv_buf); } while (ev_code != FDEVP_CNX_MSG_RECV); /* Now close the connection */ CHECK( 0, pthread_create(&thr, NULL, destroy_thr, client_side) ); fd_cnx_destroy(server_side); CHECK( 0, pthread_join(thr, NULL) ); fd_event_destroy(&myfifo, free); /* Free the credentials */ gnutls_certificate_free_keys(hf.creds); gnutls_certificate_free_cas(hf.creds); gnutls_certificate_free_credentials(hf.creds); } #endif /* DISABLE_SCTP */ /* Destroy the servers */ { fd_cnx_destroy(listener); #ifndef DISABLE_SCTP fd_cnx_destroy(listener_sctp); #endif /* DISABLE_SCTP */ } /* Check that connection attempt fails then */ { struct connect_flags cf; memset(&cf, 0, sizeof(cf)); cf.proto = IPPROTO_TCP; cf.expect_failure = 1; /* Start the client thread, that should fail */ CHECK( 0, pthread_create(&thr, NULL, connect_thr, &cf) ); CHECK( 0, pthread_join( thr, (void *)&client_side ) ); CHECK( 0, client_side ? 1 : 0 ); } #ifndef DISABLE_SCTP { struct connect_flags cf; memset(&cf, 0, sizeof(cf)); cf.proto = IPPROTO_SCTP; cf.expect_failure = 1; /* Start the client thread, that should fail */ CHECK( 0, pthread_create(&thr, NULL, connect_thr, &cf) ); CHECK( 0, pthread_join( thr, (void *)&client_side ) ); CHECK( 0, client_side ? 1 : 0 ); } #endif /* DISABLE_SCTP */ /* That's all for the tests yet */ PASSTEST(); } nextepc-0.3.10/lib/freeDiameter-1.2.1/tests/testdict.c000066400000000000000000000210031333553357400222000ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "tests.h" /* Test for the dict_iterate_rules function */ int iter_test(void * data, struct dict_rule_data * rule) { struct dict_avp_data avpdata; (*(int *)data)++; CHECK( 0, fd_dict_getval ( rule->rule_avp, &avpdata ) ); TRACE_DEBUG(FULL, "rule #%d: avp '%s'", *(int *)data, avpdata.avp_name); return 0; } /* Main test routine */ int main(int argc, char *argv[]) { /* First, initialize the daemon modules */ INIT_FD(); /* Test creating and searching all types of objects */ { struct dict_object * obj1 = NULL; struct dict_object * obj2 = NULL; struct dict_object * obj3 = NULL; vendor_id_t vendor_id = 735671; struct dict_vendor_data vendor1_data = { 735671, "Vendor test 1" }; struct dict_vendor_data vendor2_data = { 735672, "Vendor test 2" }; struct dict_application_data app1_data = { 735674, "Application test 1" }; /* Create two vendors */ CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_VENDOR, &vendor1_data , NULL, &obj1 ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_VENDOR, &vendor2_data , NULL, NULL ) ); /* Check we always retrieve the correct vendor object */ CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_VENDOR, VENDOR_BY_ID, &vendor_id, &obj2, ENOENT ) ); CHECK( obj1, obj2); CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_VENDOR, VENDOR_BY_NAME, "Vendor test 1", &obj2, ENOENT ) ); CHECK( obj1, obj2); /* Check the error conditions */ CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_VENDOR, VENDOR_BY_ID, &vendor_id, NULL, ENOENT ) ); vendor_id = 735673; /* Not defined */ CHECK( ENOENT, fd_dict_search ( fd_g_config->cnf_dict, DICT_VENDOR, VENDOR_BY_ID, &vendor_id, NULL, ENOENT ) ); CHECK( ENOENT, fd_dict_search ( fd_g_config->cnf_dict, DICT_VENDOR, VENDOR_BY_NAME, "Vendor test 3", NULL, ENOENT ) ); CHECK( ENOENT, fd_dict_search ( fd_g_config->cnf_dict, DICT_VENDOR, VENDOR_BY_ID, &vendor_id, &obj2, ENOENT ) ); CHECK( ENOENT, fd_dict_search ( fd_g_config->cnf_dict, DICT_VENDOR, VENDOR_BY_NAME, "Vendor test 3", &obj2, ENOENT ) ); CHECK( ENOTSUP, fd_dict_search ( fd_g_config->cnf_dict, DICT_VENDOR, VENDOR_BY_NAME, "Vendor test 3", &obj2, ENOTSUP ) ); /* Check the get_* functions */ CHECK( 0, fd_dict_getval ( obj1, &vendor1_data ) ); CHECK( 735671, vendor1_data.vendor_id ); CHECK( 0, strcmp(vendor1_data.vendor_name, "Vendor test 1") ); /* error conditions */ CHECK( EINVAL, fd_dict_getval ( (struct dict_object *)"not an object", &vendor1_data ) ); /* Create the application with vendor1 as parent */ CHECK( EINVAL, fd_dict_new ( fd_g_config->cnf_dict, DICT_APPLICATION, &app1_data , (struct dict_object *)"bad object", &obj2 ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_APPLICATION, &app1_data , obj1, &obj2 ) ); CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_VENDOR, VENDOR_OF_APPLICATION, obj2, &obj3, ENOENT ) ); CHECK( obj1, obj3); /* Creating and searching the other objects is already done in dictionary initialization */ } /* Test creation of the "Example-AVP" grouped AVP from the RFC */ { int nbr = 0; struct dict_object * origin_host_avp = NULL; struct dict_object * session_id_avp = NULL; struct dict_object * example_avp_avp = NULL; struct dict_rule_data rule_data = { NULL, RULE_REQUIRED, -1, -1 }; struct dict_avp_data example_avp_data = { 999999, 0, "Example-AVP", AVP_FLAG_VENDOR , 0, AVP_TYPE_GROUPED }; CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Origin-Host", &origin_host_avp, ENOENT ) ); CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Session-Id", &session_id_avp, ENOENT ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &example_avp_data , NULL, &example_avp_avp ) ); rule_data.rule_avp = origin_host_avp; rule_data.rule_min = 1; rule_data.rule_max = 1; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_RULE, &rule_data, example_avp_avp, NULL ) ); rule_data.rule_avp = session_id_avp; rule_data.rule_min = 1; rule_data.rule_max = -1; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_RULE, &rule_data, example_avp_avp, NULL ) ); CHECK( 0, fd_dict_iterate_rules ( example_avp_avp, &nbr, iter_test) ); CHECK( 2, nbr ); } /* Test list function */ { struct fd_list * li = NULL; struct fd_list * sentinel = NULL; enum dict_object_type type; struct dict_object * defvnd=NULL; vendor_id_t vid = 0; int first = 1; CHECK( 0, fd_dict_getlistof(VENDOR_BY_ID, fd_g_config->cnf_dict, &sentinel)); for (li = sentinel; (li != sentinel) || (first != 0); li = li->next) { first = 0; CHECK(0, fd_dict_gettype(li->o, &type)); CHECK(DICT_VENDOR, type); #if 0 struct dict_vendor_data data; CHECK( 0, fd_dict_getval(li->o, &data) ); printf("%d : %s\n", data.vendor_id, data.vendor_name); #endif } CHECK( 0, fd_dict_search(fd_g_config->cnf_dict, DICT_VENDOR, VENDOR_BY_ID, &vid, &defvnd, ENOENT) ); CHECK( 0, fd_dict_getlistof(AVP_BY_NAME, defvnd, &sentinel)); for (li = sentinel->next; li != sentinel; li = li->next) { CHECK(0, fd_dict_gettype(li->o, &type)); CHECK(DICT_AVP, type); #if 0 struct dict_avp_data data; CHECK( 0, fd_dict_getval(li->o, &data) ); printf("%d : %s\n", data.avp_code, data.avp_name); #endif } } /* Test delete function */ { struct fd_list * li = NULL; struct fd_list * sentinel = NULL; struct dict_object * obj=NULL; vendor_id_t vid = 0; int count = 0, cntbkp; CHECK( 0, fd_dict_search(fd_g_config->cnf_dict, DICT_VENDOR, VENDOR_BY_ID, &vid, &obj, ENOENT) ); CHECK( EINVAL, fd_dict_delete(obj) ); CHECK( 0, fd_dict_getlistof(AVP_BY_NAME, obj, &sentinel)); obj = NULL; for (li = sentinel->next; li != sentinel; li = li->next) { struct dict_avp_data data; CHECK( 0, fd_dict_getval(li->o, &data) ); count++; if (data.avp_basetype != AVP_TYPE_GROUPED) obj = li->o; } CHECK(1, obj ? 1 : 0 ); #if 1 fd_log_debug("%s", fd_dict_dump_object(FD_DUMP_TEST_PARAMS, obj)); #endif CHECK( 0, fd_dict_delete(obj) ); cntbkp = count; count = 0; for (li = sentinel->next; li != sentinel; li = li->next) { count++; } CHECK( 1, cntbkp - count ); } LOG_D( "Dictionary at the end of %s: %s", __FILE__, fd_dict_dump(FD_DUMP_TEST_PARAMS, fd_g_config->cnf_dict) ?: "error"); /* That's all for the tests yet */ PASSTEST(); } nextepc-0.3.10/lib/freeDiameter-1.2.1/tests/testdisp.c000066400000000000000000000652111333553357400222250ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "tests.h" #define Define_cb( __int, __extra ) \ int cb_##__int( struct msg ** msg, struct avp * avp, struct session * session, void * opaque, enum disp_action * action ) \ { \ CHECK( 1, msg ? 1 : 0 ); \ CHECK( 1, action ? 1 : 0 ); \ CHECK( sess, session ); \ if (opaque) { \ CHECK( 1, opaque == g_opaque ? 1 : 0 ); \ } \ *action = DISP_ACT_CONT; \ cbcalled[__int] += 1; \ do { \ __extra ; \ } while (0); \ return 0; \ } #define NB_CB 10 char cbcalled[NB_CB]; struct session * sess; void * g_opaque = (void *)"test"; /* cb_0 */ Define_cb( 0, ); /* cb_1 */ Define_cb( 1, ); /* cb_2 */ Define_cb( 2, ); /* cb_3 */ Define_cb( 3, ); /* cb_4 */ Define_cb( 4, ); /* cb_5 */ Define_cb( 5, ); /* cb_6 */ Define_cb( 6, return 12345 ); /* cb_7 */ Define_cb( 7, { CHECK( 1, avp ? 1 : 0 ); } ); /* cb_8 */ Define_cb( 8, { CHECK( 0, fd_msg_free( *msg ) ); *msg = NULL; } ); /* cb_9 */ Define_cb( 9, *action = DISP_ACT_SEND ); /* max: cb_ */ /* Create a new message containing what we want */ struct msg * new_msg(int appid, struct dict_object * cmd, struct dict_object * avp1, struct dict_object * avp2, int val) { struct msg *new; struct avp *avp; union avp_value value; struct msg_hdr * msg_hdr = NULL; CHECK( 0, fd_msg_new ( cmd, 0, &new ) ); CHECK( 0, fd_msg_hdr ( new, &msg_hdr ) ); msg_hdr->msg_appl = appid; if (avp1) { CHECK( 0, fd_msg_avp_new ( avp1, 0, &avp ) ); value.u32 = 0; CHECK( 0, fd_msg_avp_setvalue ( avp, &value ) ); CHECK( 0, fd_msg_avp_add ( new, MSG_BRW_LAST_CHILD, avp ) ); } if (avp2) { CHECK( 0, fd_msg_avp_new ( avp2, 0, &avp ) ); value.u32 = val; CHECK( 0, fd_msg_avp_setvalue ( avp, &value ) ); CHECK( 0, fd_msg_avp_add ( new, MSG_BRW_LAST_CHILD, avp ) ); } return new; } /* Main test routine */ int main(int argc, char *argv[]) { struct dict_object * app1, * app2; struct dict_object * cmd1, * cmd2; struct dict_object * avp1, * avp2; /* avp2 is enumerated; they are both unsigned32 types */ struct dict_object * enu1, * enu2; struct msg * msg = NULL, *error; enum disp_action action; struct disp_hdl * hdl[NB_CB]; struct disp_when when; char * ec, *em; /* First, initialize the daemon modules */ INIT_FD(); /* Create a dummy session, we don't use it anyway */ #define DUMMY_SID "test.disp" CHECK( 0, fd_sess_new( &sess, DUMMY_SID, CONSTSTRLEN(DUMMY_SID), NULL, 0 ) ); memset(&when, 0xff, sizeof(when)); /* check that we don't use un-initialized parts */ /* Initialize dictionary objects */ { struct dict_object * enutype; struct dict_application_data app1_data = { 1, "Application test 1" }; struct dict_application_data app2_data = { 2, "Application test 2" }; struct dict_cmd_data cmd1_data = { 1, "Command test 1 (req)", CMD_FLAG_REQUEST, CMD_FLAG_REQUEST }; struct dict_cmd_data cmd2_data = { 1, "Command test 2 (ans)", CMD_FLAG_REQUEST, 0 }; struct dict_type_data type_data = { AVP_TYPE_UNSIGNED32, "Type test", NULL, NULL }; struct dict_avp_data avp1_data = { 10001, 0, "AVP test 1", 0, 0, AVP_TYPE_UNSIGNED32 }; struct dict_avp_data avp2_data = { 10002, 0, "AVP test 2", 0, 0, AVP_TYPE_UNSIGNED32 }; struct dict_enumval_data enu1_data = { "ENU test 1", { .u32 = 1 }}; struct dict_enumval_data enu2_data = { "ENU test 2", { .u32 = 2 }}; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_APPLICATION, &app1_data, NULL, &app1 ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_APPLICATION, &app2_data, NULL, &app2 ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_COMMAND, &cmd1_data, NULL, &cmd1 ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_COMMAND, &cmd2_data, NULL, &cmd2 ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_TYPE, &type_data, NULL, &enutype ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp1_data, NULL, &avp1 ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp2_data, enutype, &avp2 ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_ENUMVAL, &enu1_data, enutype, &enu1 ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_ENUMVAL, &enu2_data, enutype, &enu2 ) ); } /* Register first handler, very simple test */ { CHECK( 0, fd_disp_register( cb_0, DISP_HOW_ANY, NULL, NULL, &hdl[0] ) ); CHECK( 1, hdl[0] ? 1 : 0 ); CHECK( 0, fd_disp_unregister( &hdl[0], NULL ) ); CHECK( NULL, hdl[0] ); CHECK( 0, fd_disp_register( cb_0, DISP_HOW_ANY, NULL, NULL, &hdl[0] ) ); /* Check this handler is called for a message */ msg = new_msg( 0, cmd1, avp1, NULL, 0 ); memset(cbcalled, 0, sizeof(cbcalled)); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( DISP_ACT_CONT, action ); /* Delete the message */ CHECK( 0, fd_msg_free( msg ) ); CHECK( 0, fd_disp_unregister( &hdl[0], NULL ) ); } /* Handlers for applications */ { CHECK( 0, fd_disp_register( cb_0, DISP_HOW_ANY, &when, NULL, &hdl[0] ) ); when.app = app1; CHECK( 0, fd_disp_register( cb_1, DISP_HOW_APPID, &when, NULL, &hdl[1] ) ); when.app = app2; CHECK( 0, fd_disp_register( cb_2, DISP_HOW_APPID, &when, NULL, &hdl[2] ) ); when.avp = avp2; CHECK( 0, fd_disp_register( cb_3, DISP_HOW_APPID, &when, NULL, &hdl[3] ) ); when.avp = avp1; CHECK( 0, fd_disp_register( cb_4, DISP_HOW_APPID, &when, NULL, &hdl[4] ) ); /* Check the callbacks are called as appropriate */ memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 0, cmd1, avp1, NULL, 0 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 0, cbcalled[1] ); CHECK( 0, cbcalled[2] ); CHECK( 0, cbcalled[3] ); CHECK( 0, cbcalled[4] ); CHECK( DISP_ACT_CONT, action ); CHECK( 0, fd_msg_free( msg ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 1, cmd1, avp1, NULL, 0 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 1, cbcalled[1] ); CHECK( 0, cbcalled[2] ); CHECK( 0, cbcalled[3] ); CHECK( 0, cbcalled[4] ); CHECK( DISP_ACT_CONT, action ); CHECK( 0, fd_msg_free( msg ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 2, cmd1, avp1, NULL, 0 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 0, cbcalled[1] ); CHECK( 1, cbcalled[2] ); CHECK( 1, cbcalled[3] ); CHECK( 1, cbcalled[4] ); CHECK( DISP_ACT_CONT, action ); CHECK( 0, fd_msg_free( msg ) ); CHECK( 0, fd_disp_unregister( &hdl[0], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[1], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[2], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[3], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[4], NULL ) ); } /* Handlers for commands */ { when.app = NULL; when.command = NULL; CHECK( 0, fd_disp_register( cb_0, DISP_HOW_ANY, &when, NULL, &hdl[0] ) ); CHECK( EINVAL, fd_disp_register( cb_1, DISP_HOW_CC, &when, NULL, &hdl[1] ) ); when.command = cmd1; CHECK( 0, fd_disp_register( cb_1, DISP_HOW_CC, &when, NULL, &hdl[1] ) ); /* cmd1 */ when.app = app2; CHECK( 0, fd_disp_register( cb_2, DISP_HOW_CC, &when, NULL, &hdl[2] ) ); /* app2 + cmd1 */ when.command = cmd2; when.app = NULL; when.avp = avp1; CHECK( 0, fd_disp_register( cb_3, DISP_HOW_CC, &when, NULL, &hdl[3] ) ); /* cmd2 (avp1 ignored) */ /* Check the callbacks are called as appropriate */ memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 0, cmd1, avp1, NULL, 0 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 1, cbcalled[1] ); CHECK( 0, cbcalled[2] ); CHECK( 0, cbcalled[3] ); CHECK( DISP_ACT_CONT, action ); CHECK( 0, fd_msg_free( msg ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 2, cmd1, avp1, NULL, 0 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 1, cbcalled[1] ); CHECK( 1, cbcalled[2] ); CHECK( 0, cbcalled[3] ); CHECK( DISP_ACT_CONT, action ); CHECK( 0, fd_msg_free( msg ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 2, cmd2, avp1, NULL, 0 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 0, cbcalled[1] ); CHECK( 0, cbcalled[2] ); CHECK( 1, cbcalled[3] ); CHECK( DISP_ACT_CONT, action ); CHECK( 0, fd_msg_free( msg ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 1, cmd2, NULL, avp2, 0 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 0, cbcalled[1] ); CHECK( 0, cbcalled[2] ); CHECK( 1, cbcalled[3] ); CHECK( DISP_ACT_CONT, action ); CHECK( 0, fd_msg_free( msg ) ); CHECK( 0, fd_disp_unregister( &hdl[0], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[1], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[2], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[3], NULL ) ); } /* Handlers for AVPs */ { when.app = NULL; when.command = NULL; when.avp = NULL; CHECK( 0, fd_disp_register( cb_0, DISP_HOW_ANY, &when, NULL, &hdl[0] ) ); /* all */ CHECK( EINVAL, fd_disp_register( cb_1, DISP_HOW_AVP, &when, NULL, &hdl[1] ) ); when.avp = avp1; CHECK( 0, fd_disp_register( cb_1, DISP_HOW_AVP, &when, NULL, &hdl[1] ) ); /* avp1 */ when.command = cmd1; CHECK( 0, fd_disp_register( cb_2, DISP_HOW_AVP, &when, NULL, &hdl[2] ) ); /* avp1 + cmd1 */ when.command = NULL; when.app = app1; CHECK( 0, fd_disp_register( cb_3, DISP_HOW_AVP, &when, NULL, &hdl[3] ) ); /* avp1 + app1 */ when.command = cmd1; CHECK( 0, fd_disp_register( cb_4, DISP_HOW_AVP, &when, NULL, &hdl[4] ) ); /* avp1 + cmd1 + app1 */ when.app = NULL; when.command = NULL; when.avp = avp2; when.value = enu1; CHECK( 0, fd_disp_register( cb_5, DISP_HOW_AVP, &when, NULL, &hdl[5] ) ); /* avp2 */ when.value = enu2; CHECK( 0, fd_disp_register( cb_7, DISP_HOW_AVP, &when, NULL, &hdl[6] ) ); /* avp2 */ /* Check the callbacks are called as appropriate */ memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 0, cmd1, NULL, NULL, 0 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 0, cbcalled[1] ); CHECK( 0, cbcalled[2] ); CHECK( 0, cbcalled[3] ); CHECK( 0, cbcalled[4] ); CHECK( 0, cbcalled[5] ); CHECK( DISP_ACT_CONT, action ); CHECK( 0, fd_msg_free( msg ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 0, cmd1, avp1, NULL, 0 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 1, cbcalled[1] ); CHECK( 1, cbcalled[2] ); CHECK( 0, cbcalled[3] ); CHECK( 0, cbcalled[4] ); CHECK( 0, cbcalled[5] ); CHECK( DISP_ACT_CONT, action ); CHECK( 0, fd_msg_free( msg ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 1, cmd2, avp1, NULL, 0 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 1, cbcalled[1] ); CHECK( 0, cbcalled[2] ); CHECK( 1, cbcalled[3] ); CHECK( 0, cbcalled[4] ); CHECK( 0, cbcalled[5] ); CHECK( DISP_ACT_CONT, action ); CHECK( 0, fd_msg_free( msg ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 1, cmd1, avp1, NULL, 0 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 1, cbcalled[1] ); CHECK( 1, cbcalled[2] ); CHECK( 1, cbcalled[3] ); CHECK( 1, cbcalled[4] ); CHECK( 0, cbcalled[5] ); CHECK( DISP_ACT_CONT, action ); CHECK( 0, fd_msg_free( msg ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 1, cmd1, avp1, avp2, 0 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 1, cbcalled[1] ); CHECK( 1, cbcalled[2] ); CHECK( 1, cbcalled[3] ); CHECK( 1, cbcalled[4] ); CHECK( 1, cbcalled[5] ); CHECK( 1, cbcalled[7] ); CHECK( DISP_ACT_CONT, action ); CHECK( 0, fd_msg_free( msg ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 1, cmd1, NULL, avp2, 1 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 0, cbcalled[1] ); CHECK( 0, cbcalled[2] ); CHECK( 0, cbcalled[3] ); CHECK( 0, cbcalled[4] ); CHECK( 1, cbcalled[5] ); CHECK( 1, cbcalled[7] ); CHECK( DISP_ACT_CONT, action ); CHECK( 0, fd_msg_free( msg ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 1, cmd1, NULL, avp2, 2 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 0, cbcalled[1] ); CHECK( 0, cbcalled[2] ); CHECK( 0, cbcalled[3] ); CHECK( 0, cbcalled[4] ); CHECK( 1, cbcalled[5] ); CHECK( 1, cbcalled[7] ); CHECK( DISP_ACT_CONT, action ); CHECK( 0, fd_msg_free( msg ) ); CHECK( 0, fd_disp_unregister( &hdl[0], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[1], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[2], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[3], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[4], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[5], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[6], NULL ) ); } /* Handlers for enum values */ { when.app = NULL; when.command = NULL; when.avp = NULL; when.value = NULL; CHECK( 0, fd_disp_register( cb_0, DISP_HOW_ANY, &when, NULL, &hdl[0] ) ); /* all */ CHECK( EINVAL, fd_disp_register( cb_1, DISP_HOW_AVP_ENUMVAL, &when, NULL, &hdl[1] ) ); when.value = enu1; CHECK( EINVAL, fd_disp_register( cb_1, DISP_HOW_AVP_ENUMVAL, &when, NULL, &hdl[1] ) ); when.avp = avp1; CHECK( EINVAL, fd_disp_register( cb_1, DISP_HOW_AVP_ENUMVAL, &when, NULL, &hdl[1] ) ); when.avp = avp2; CHECK( 0, fd_disp_register( cb_1, DISP_HOW_AVP_ENUMVAL, &when, NULL, &hdl[1] ) ); /* avp2, enu1 */ when.command = cmd1; CHECK( 0, fd_disp_register( cb_2, DISP_HOW_AVP_ENUMVAL, &when, NULL, &hdl[2] ) ); /* avp2, enu1 + cmd1 */ when.command = NULL; when.app = app1; when.value = enu2; CHECK( 0, fd_disp_register( cb_3, DISP_HOW_AVP_ENUMVAL, &when, NULL, &hdl[3] ) ); /* avp2, enu2 + app1 */ /* Check the callbacks are called as appropriate */ memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 0, cmd1, avp1, NULL, 0 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 0, cbcalled[1] ); CHECK( 0, cbcalled[2] ); CHECK( 0, cbcalled[3] ); CHECK( DISP_ACT_CONT, action ); CHECK( 0, fd_msg_free( msg ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 1, cmd2, avp1, avp2, 0 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 0, cbcalled[1] ); CHECK( 0, cbcalled[2] ); CHECK( 0, cbcalled[3] ); CHECK( DISP_ACT_CONT, action ); CHECK( 0, fd_msg_free( msg ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 1, cmd2, avp1, avp2, 1 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 1, cbcalled[1] ); CHECK( 0, cbcalled[2] ); CHECK( 0, cbcalled[3] ); CHECK( DISP_ACT_CONT, action ); CHECK( 0, fd_msg_free( msg ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 1, cmd2, avp1, avp2, 2 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 0, cbcalled[1] ); CHECK( 0, cbcalled[2] ); CHECK( 1, cbcalled[3] ); CHECK( DISP_ACT_CONT, action ); CHECK( 0, fd_msg_free( msg ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 1, cmd1, avp1, avp2, 1 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 1, cbcalled[1] ); CHECK( 1, cbcalled[2] ); CHECK( 0, cbcalled[3] ); CHECK( DISP_ACT_CONT, action ); CHECK( 0, fd_msg_free( msg ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 1, cmd2, avp1, avp2, 1 ); { struct avp *avp; union avp_value value; CHECK( 0, fd_msg_avp_new ( avp2, 0, &avp ) ); value.u32 = 2; CHECK( 0, fd_msg_avp_setvalue ( avp, &value ) ); CHECK( 0, fd_msg_avp_add ( msg, MSG_BRW_LAST_CHILD, avp ) ); } CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 1, cbcalled[1] ); CHECK( 0, cbcalled[2] ); CHECK( 1, cbcalled[3] ); CHECK( DISP_ACT_CONT, action ); CHECK( 0, fd_msg_free( msg ) ); CHECK( 0, fd_disp_unregister( &hdl[0], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[1], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[2], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[3], NULL ) ); } /* Test behavior of handlers */ { CHECK( 0, fd_disp_register( cb_0, DISP_HOW_ANY, &when, NULL, &hdl[0] ) ); CHECK( 0, fd_disp_register( cb_1, DISP_HOW_ANY, &when, NULL, &hdl[1] ) ); CHECK( 0, fd_disp_register( cb_6, DISP_HOW_ANY, &when, NULL, &hdl[2] ) ); CHECK( 0, fd_disp_register( cb_2, DISP_HOW_ANY, &when, NULL, &hdl[3] ) ); CHECK( 0, fd_disp_register( cb_3, DISP_HOW_ANY, &when, NULL, &hdl[4] ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 1, cmd1, avp1, avp2, 1 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 1, cbcalled[1] ); CHECK( 1, cbcalled[6] ); CHECK( 0, cbcalled[2] ); CHECK( 0, cbcalled[3] ); CHECK( 0, msg ? 1 : 0); CHECK( 1, em ? 1 : 0); CHECK( 0, fd_msg_free( error ) ); CHECK( 0, fd_disp_unregister( &hdl[0], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[1], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[2], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[3], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[4], NULL ) ); CHECK( 0, fd_disp_register( cb_0, DISP_HOW_ANY, &when, NULL, &hdl[0] ) ); CHECK( 0, fd_disp_register( cb_1, DISP_HOW_ANY, &when, NULL, &hdl[1] ) ); CHECK( 0, fd_disp_register( cb_8, DISP_HOW_ANY, &when, NULL, &hdl[2] ) ); CHECK( 0, fd_disp_register( cb_2, DISP_HOW_ANY, &when, NULL, &hdl[3] ) ); CHECK( 0, fd_disp_register( cb_3, DISP_HOW_ANY, &when, NULL, &hdl[4] ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 1, cmd1, avp1, avp2, 1 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 1, cbcalled[1] ); CHECK( 1, cbcalled[8] ); CHECK( 0, cbcalled[2] ); CHECK( 0, cbcalled[3] ); CHECK( NULL, msg ); CHECK( NULL, em ); CHECK( 0, fd_disp_unregister( &hdl[0], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[1], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[2], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[3], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[4], NULL ) ); CHECK( 0, fd_disp_register( cb_0, DISP_HOW_ANY, &when, NULL, &hdl[0] ) ); CHECK( 0, fd_disp_register( cb_1, DISP_HOW_ANY, &when, NULL, &hdl[1] ) ); CHECK( 0, fd_disp_register( cb_9, DISP_HOW_ANY, &when, NULL, &hdl[2] ) ); CHECK( 0, fd_disp_register( cb_2, DISP_HOW_ANY, &when, NULL, &hdl[3] ) ); CHECK( 0, fd_disp_register( cb_3, DISP_HOW_ANY, &when, NULL, &hdl[4] ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 1, cmd1, avp1, avp2, 1 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 1, cbcalled[1] ); CHECK( 1, cbcalled[9] ); CHECK( 0, cbcalled[2] ); CHECK( 0, cbcalled[3] ); CHECK( DISP_ACT_SEND, action ); CHECK( 0, fd_msg_free( msg ) ); CHECK( 0, fd_disp_unregister( &hdl[0], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[1], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[2], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[3], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[4], NULL ) ); } /* Test order of handlers */ { when.app = app2; when.command = cmd2; when.avp = avp2; when.value = enu2; CHECK( 0, fd_disp_register( cb_0, DISP_HOW_ANY, &when, NULL, &hdl[0] ) ); CHECK( 0, fd_disp_register( cb_1, DISP_HOW_AVP_ENUMVAL, &when, NULL, &hdl[1] ) ); CHECK( 0, fd_disp_register( cb_2, DISP_HOW_AVP, &when, NULL, &hdl[2] ) ); CHECK( 0, fd_disp_register( cb_3, DISP_HOW_CC, &when, NULL, &hdl[3] ) ); CHECK( 0, fd_disp_register( cb_4, DISP_HOW_APPID, &when, NULL, &hdl[4] ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 2, cmd2, avp1, avp2, 2 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 1, cbcalled[1] ); CHECK( 1, cbcalled[2] ); CHECK( 1, cbcalled[3] ); CHECK( 1, cbcalled[4] ); CHECK( 0, cbcalled[9] ); CHECK( 0, fd_msg_free( msg ) ); CHECK( 0, fd_disp_register( cb_9, DISP_HOW_ANY, &when, NULL, &hdl[5] ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 2, cmd2, avp1, avp2, 2 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 0, cbcalled[1] ); CHECK( 0, cbcalled[2] ); CHECK( 0, cbcalled[3] ); CHECK( 0, cbcalled[4] ); CHECK( 1, cbcalled[9] ); CHECK( 0, fd_msg_free( msg ) ); CHECK( 0, fd_disp_unregister( &hdl[5], NULL ) ); CHECK( 0, fd_disp_register( cb_9, DISP_HOW_AVP_ENUMVAL, &when, NULL, &hdl[5] ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 2, cmd2, avp1, avp2, 2 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 1, cbcalled[1] ); CHECK( 1, cbcalled[2] ); CHECK( 0, cbcalled[3] ); CHECK( 0, cbcalled[4] ); CHECK( 1, cbcalled[9] ); CHECK( 0, fd_msg_free( msg ) ); CHECK( 0, fd_disp_unregister( &hdl[5], NULL ) ); CHECK( 0, fd_disp_register( cb_9, DISP_HOW_AVP, &when, NULL, &hdl[5] ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 2, cmd2, avp1, avp2, 2 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 1, cbcalled[1] ); CHECK( 1, cbcalled[2] ); CHECK( 0, cbcalled[3] ); CHECK( 0, cbcalled[4] ); CHECK( 1, cbcalled[9] ); CHECK( 0, fd_msg_free( msg ) ); CHECK( 0, fd_disp_unregister( &hdl[5], NULL ) ); CHECK( 0, fd_disp_register( cb_9, DISP_HOW_CC, &when, NULL, &hdl[5] ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 2, cmd2, avp1, avp2, 2 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 1, cbcalled[1] ); CHECK( 1, cbcalled[2] ); CHECK( 1, cbcalled[3] ); CHECK( 0, cbcalled[4] ); CHECK( 1, cbcalled[9] ); CHECK( 0, fd_msg_free( msg ) ); CHECK( 0, fd_disp_unregister( &hdl[5], NULL ) ); CHECK( 0, fd_disp_register( cb_9, DISP_HOW_APPID, &when, NULL, &hdl[5] ) ); memset(cbcalled, 0, sizeof(cbcalled)); msg = new_msg( 2, cmd2, avp1, avp2, 2 ); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( 1, cbcalled[1] ); CHECK( 1, cbcalled[2] ); CHECK( 1, cbcalled[3] ); CHECK( 1, cbcalled[4] ); CHECK( 1, cbcalled[9] ); CHECK( 0, fd_msg_free( msg ) ); CHECK( 0, fd_disp_unregister( &hdl[5], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[0], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[1], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[2], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[3], NULL ) ); CHECK( 0, fd_disp_unregister( &hdl[4], NULL ) ); } /* Test application support advertisement */ { struct dict_object * vnd; struct dict_vendor_data vnd_data = { 1, "Vendor test" }; struct fd_app * app; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_VENDOR, &vnd_data, NULL, &vnd ) ); CHECK( EINVAL, fd_disp_app_support ( vnd, NULL, 1, 0 ) ); CHECK( EINVAL, fd_disp_app_support ( app1, NULL, 0, 0 ) ); CHECK( 0, fd_disp_app_support ( app1, NULL, 1, 0 ) ); CHECK( 0, fd_disp_app_support ( app1, NULL, 0, 1 ) ); CHECK( 0, fd_disp_app_support ( app2, vnd, 1, 0 ) ); app = (struct fd_app *)(fd_g_config->cnf_apps.next); CHECK( 1, app->appid ); CHECK( 1, app->flags.auth ); CHECK( 1, app->flags.acct ); app = (struct fd_app *)(fd_g_config->cnf_apps.prev); CHECK( 2, app->appid ); CHECK( 1, app->flags.auth ); CHECK( 0, app->flags.acct ); #if 0 fd_log_debug("%s", fd_conf_dump(FD_DUMP_TEST_PARAMS)); #endif } /* Test opaque pointer management */ { void * ptr; CHECK( 0, fd_disp_register( cb_0, DISP_HOW_ANY, NULL, g_opaque, &hdl[0] ) ); /* Check this handler is called for a message */ msg = new_msg( 0, cmd1, avp1, NULL, 0 ); memset(cbcalled, 0, sizeof(cbcalled)); CHECK( 0, fd_msg_dispatch ( &msg, sess, &action, &ec, &em, &error ) ); CHECK( 1, cbcalled[0] ); CHECK( DISP_ACT_CONT, action ); /* Delete the message */ CHECK( 0, fd_msg_free( msg ) ); CHECK( 0, fd_disp_unregister( &hdl[0], &ptr ) ); CHECK( 1, ptr == g_opaque ? 1 : 0 ); } /* That's all for the tests yet */ PASSTEST(); } nextepc-0.3.10/lib/freeDiameter-1.2.1/tests/testfifo.c000066400000000000000000000375561333553357400222240ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "tests.h" #include #include /* Wrapper for pthread_barrier stuff on Mac OS X */ #ifndef HAVE_PTHREAD_BAR #define PTHREAD_BARRIER_SERIAL_THREAD 1 typedef struct { int count; int entered; int serial; pthread_mutex_t mutex; pthread_cond_t cond; } pthread_barrier_t; int pthread_barrier_init(pthread_barrier_t * barrier, int * barrier_attr, int count) { memset(barrier, 0, sizeof(pthread_barrier_t)); barrier->count = count; pthread_mutex_init(&barrier->mutex, NULL); pthread_cond_init(&barrier->cond, NULL); return 0; } int pthread_barrier_destroy(pthread_barrier_t * barrier) { pthread_mutex_destroy(&barrier->mutex); pthread_cond_destroy(&barrier->cond); return 0; } int pthread_barrier_wait(pthread_barrier_t * barrier) { int ret = 0; int serial; pthread_mutex_lock(&barrier->mutex); serial = barrier->serial; /* first thread gets the special value */ if (barrier->entered++ == 0) ret = PTHREAD_BARRIER_SERIAL_THREAD; /* Count was achieved? */ if (barrier->entered == barrier->count) { /* Ok, increase serial, reset number of threads, and signal everyone */ barrier->entered = 0; barrier->serial++; pthread_cond_broadcast(&barrier->cond); } else { do { pthread_cond_wait(&barrier->cond, &barrier->mutex); } while (barrier->serial == serial); /* this protects against spurious wakes */ } pthread_mutex_unlock(&barrier->mutex); return 0; } #endif /* HAVE_PTHREAD_BAR */ /* Structure for testing threshold function */ static struct thrh_test { struct fifo * queue; /* pointer to the queue */ int h_calls; /* number of calls of h_cb */ int l_calls; /* number of calls of l_cb */ } thrh_td; /* Callbacks for threasholds test */ void thrh_cb_h(struct fifo *queue, void **data) { if (thrh_td.h_calls == thrh_td.l_calls) { CHECK( NULL, *data ); *data = &thrh_td; } else { CHECK( *data, &thrh_td ); } CHECK( queue, thrh_td.queue ); /* Update the count */ thrh_td.h_calls ++; } void thrh_cb_l(struct fifo *queue, void **data) { CHECK( 1, data ? 1 : 0 ); CHECK( *data, &thrh_td ); /* Check the queue parameter is correct */ CHECK( queue, thrh_td.queue ); /* Update the count */ thrh_td.l_calls ++; /* Cleanup the data ptr if needed */ if (thrh_td.l_calls == thrh_td.h_calls) *data = NULL; /* done */ } /* Structure that is passed to the test function */ struct test_data { struct fifo * queue; /* pointer to the queue */ pthread_barrier_t * bar; /* if not NULL, barrier to synchronize before getting messages */ struct timespec * ts; /* if not NULL, use a timedget instead of a get */ int nbr; /* number of messages to retrieve from the queue */ }; /* The test function, to be threaded */ static void * test_fct(void * data) { int ret = 0, i; struct msg * msg = NULL; struct test_data * td = (struct test_data *) data; if (td->bar != NULL) { ret = pthread_barrier_wait(td->bar); if (ret != PTHREAD_BARRIER_SERIAL_THREAD) { CHECK( 0, ret); } else { CHECK( PTHREAD_BARRIER_SERIAL_THREAD, ret); /* just for the traces */ } } for (i=0; i< td->nbr; i++) { if (td->ts != NULL) { CHECK( 0, fd_fifo_timedget(td->queue, &msg, td->ts) ); } else { CHECK( 0, fd_fifo_get(td->queue, &msg) ); } } return NULL; } /* The test function, to be threaded */ static int iter = 0; static void * test_fct2(void * data) { int i; int * item; struct test_data * td = (struct test_data *) data; for (i=0; i< td->nbr; i++) { item = malloc(sizeof(int)); CHECK( 1, item ? 1 : 0 ); *item = i; CHECK( 0, fd_fifo_post(td->queue, &item) ); iter++; } return NULL; } /* Main test routine */ int main(int argc, char *argv[]) { struct timespec ts; struct msg * msg1 = NULL; struct msg * msg2 = NULL; struct msg * msg3 = NULL; /* First, initialize the daemon modules */ INIT_FD(); /* Prolog: create the messages */ { struct dict_object * acr_model = NULL; struct dict_object * cer_model = NULL; struct dict_object * dwr_model = NULL; CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Accounting-Request", &acr_model, ENOENT ) ); CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Capabilities-Exchange-Request", &cer_model, ENOENT ) ); CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Device-Watchdog-Request", &dwr_model, ENOENT ) ); CHECK( 0, fd_msg_new ( acr_model, 0, &msg1 ) ); CHECK( 0, fd_msg_new ( cer_model, 0, &msg2 ) ); CHECK( 0, fd_msg_new ( dwr_model, 0, &msg3 ) ); } /* Basic operation */ { struct fifo * queue = NULL; struct msg * msg = NULL; int max; long long count; /* Create the queue */ CHECK( 0, fd_fifo_new(&queue, 0) ); /* Check the count is 0 */ CHECK( 0, fd_fifo_length(queue) ); /* Now enqueue */ msg = msg1; CHECK( 0, fd_fifo_post(queue, &msg) ); msg = msg2; CHECK( 0, fd_fifo_post(queue, &msg) ); msg = msg3; CHECK( 0, fd_fifo_post(queue, &msg) ); /* Check the count is 3 */ CHECK( 3, fd_fifo_length(queue) ); /* Retrieve the first message using fd_fifo_get */ CHECK( 0, fd_fifo_get(queue, &msg) ); CHECK( msg1, msg); CHECK( 2, fd_fifo_length(queue) ); /* Retrieve the second message using fd_fifo_timedget */ CHECK(0, clock_gettime(CLOCK_REALTIME, &ts)); ts.tv_sec += 1; /* Set the timeout to 1 second */ CHECK( 0, fd_fifo_timedget(queue, &msg, &ts) ); CHECK( msg2, msg); CHECK( 1, fd_fifo_length(queue) ); /* Retrieve the third message using meq_tryget */ CHECK( 0, fd_fifo_tryget(queue, &msg) ); CHECK( msg3, msg); CHECK( 0, fd_fifo_length(queue) ); /* Check that another meq_tryget does not block */ CHECK( EWOULDBLOCK, fd_fifo_tryget(queue, &msg) ); CHECK( 0, fd_fifo_length(queue) ); /* Check the timedget actually timesout */ CHECK(0, clock_gettime(CLOCK_REALTIME, &ts)); ts.tv_nsec += 1000000; /* 1 millisecond */ if (ts.tv_nsec >= 1000000000L) { ts.tv_nsec -= 1000000000L; ts.tv_sec += 1; } CHECK( ETIMEDOUT, fd_fifo_timedget(queue, &msg, &ts) ); CHECK( 0, fd_fifo_length(queue) ); /* Post & get another message */ msg = msg1; CHECK( 0, fd_fifo_post(queue, &msg) ); CHECK( 0, fd_fifo_timedget(queue, &msg, &ts) ); CHECK( msg1, msg); /* Check some statistics */ CHECK( 0, fd_fifo_getstats(queue, NULL, NULL, &max, &count, NULL, NULL, NULL) ); CHECK( 3, max ); CHECK( 4, count ); /* We're done for basic tests */ CHECK( 0, fd_fifo_del(&queue) ); } /* Test robustness, ensure no messages are lost */ { #define NBR_MSG 200 #define NBR_THREADS 60 struct fifo *queue = NULL; pthread_barrier_t bar; struct test_data td_1; struct test_data td_2; struct msg *msgs[NBR_MSG * NBR_THREADS * 2], *msg; pthread_t thr [NBR_THREADS * 2]; struct dict_object *dwr_model = NULL; int i; int nbr_threads; #ifdef _POSIX_THREAD_THREADS_MAX nbr_threads = _POSIX_THREAD_THREADS_MAX; #else /* _POSIX_THREAD_THREADS_MAX */ nbr_threads = sysconf(_SC_THREAD_THREADS_MAX); #endif /* _POSIX_THREAD_THREADS_MAX */ if ((nbr_threads <= 0) || (nbr_threads > NBR_THREADS * 2)) { nbr_threads = NBR_THREADS; } else { TRACE_DEBUG(INFO, "Local limit on number of threads: %d", nbr_threads); /* The local limit is below NBR_THREADS */ nbr_threads = (nbr_threads / 2) - 1; /* Ensure we create at least a few threads! */ CHECK( 1, nbr_threads >= 10 ? 1 : 0 ); } /* Create the queue */ CHECK( 0, fd_fifo_new(&queue, 0) ); /* Create the barrier */ CHECK( 0, pthread_barrier_init(&bar, NULL, nbr_threads * 2 + 1) ); /* Initialize the ts */ CHECK(0, clock_gettime(CLOCK_REALTIME, &ts)); ts.tv_sec += 20; /* Set the timeout to 20 second */ /* Create the messages */ CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Device-Watchdog-Request", &dwr_model, ENOENT ) ); for (i = 0; i < NBR_MSG * nbr_threads * 2; i++) { CHECK( 0, fd_msg_new ( dwr_model, 0, &msgs[i] ) ); } /* Initialize the test data structures */ td_1.queue = queue; td_1.bar = &bar; td_1.ts = &ts; td_1.nbr = NBR_MSG; td_2.queue = queue; td_2.bar = &bar; td_2.ts = NULL; td_2.nbr = NBR_MSG; /* Create the threads */ for (i=0; i < nbr_threads * 2; i++) { CHECK( 0, pthread_create( &thr[i], NULL, test_fct, (i & 1) ? &td_1 : &td_2 ) ); } /* Synchronize everyone */ { int ret = pthread_barrier_wait(&bar); if (ret != PTHREAD_BARRIER_SERIAL_THREAD) { CHECK( 0, ret); } else { CHECK( PTHREAD_BARRIER_SERIAL_THREAD, ret); /* for trace only */ } } /* Now post all the messages */ for (i=0; i < NBR_MSG * nbr_threads * 2; i++) { msg = msgs[i]; CHECK( 0, fd_fifo_post(queue, &msg) ); } /* Join all threads. This blocks if messages are lost... */ for (i=0; i < nbr_threads * 2; i++) { CHECK( 0, pthread_join( thr[i], NULL ) ); } /* Check the count of the queue is back to 0 */ CHECK( 0, fd_fifo_length(queue) ); /* Destroy this queue and the messages */ CHECK( 0, fd_fifo_del(&queue) ); for (i=0; i < NBR_MSG * nbr_threads * 2; i++) { CHECK( 0, fd_msg_free( msgs[i] ) ); } } /* Test thread cancelation */ { struct fifo *queue = NULL; pthread_barrier_t bar; struct test_data td; pthread_t th; /* Create the queue */ CHECK( 0, fd_fifo_new(&queue, 0) ); /* Create the barrier */ CHECK( 0, pthread_barrier_init(&bar, NULL, 2) ); /* Initialize the ts */ CHECK(0, clock_gettime(CLOCK_REALTIME, &ts)); ts.tv_sec += 10; /* Set the timeout to 10 second */ /* Initialize the test data structures */ td.queue = queue; td.bar = &bar; td.ts = &ts; td.nbr = 1; /* Create the thread */ CHECK( 0, pthread_create( &th, NULL, test_fct, &td ) ); /* Wait for the thread to be running */ { int ret = pthread_barrier_wait(&bar); if (ret != PTHREAD_BARRIER_SERIAL_THREAD) { CHECK( 0, ret); } else { CHECK( PTHREAD_BARRIER_SERIAL_THREAD, ret ); } } /* Now cancel the thread */ CHECK( 0, pthread_cancel( th ) ); /* Join it */ CHECK( 0, pthread_join( th, NULL ) ); /* Do the same with the other function */ td.ts = NULL; /* Create the thread */ CHECK( 0, pthread_create( &th, NULL, test_fct, &td ) ); /* Wait for the thread to be running */ { int ret = pthread_barrier_wait(&bar); if (ret != PTHREAD_BARRIER_SERIAL_THREAD) { CHECK( 0, ret); } else { CHECK( PTHREAD_BARRIER_SERIAL_THREAD, ret ); } } /* Now cancel the thread */ CHECK( 0, pthread_cancel( th ) ); /* Join it */ CHECK( 0, pthread_join( th, NULL ) ); /* Destroy the queue */ CHECK( 0, fd_fifo_del(&queue) ); } /* Test the threashold function */ { struct fifo * queue = NULL; int i; struct msg * msg = NULL; /* Create the queue */ CHECK( 0, fd_fifo_new(&queue, 0) ); /* Prepare the test data */ memset(&thrh_td, 0, sizeof(thrh_td)); thrh_td.queue = queue; /* Set the thresholds for the queue */ CHECK( 0, fd_fifo_setthrhd ( queue, NULL, 6, thrh_cb_h, 4, thrh_cb_l ) ); /* Post 5 messages, no cb must be called. */ for (i=0; i<5; i++) { msg = msg1; CHECK( 0, fd_fifo_post(queue, &msg) ); } /* 5 msg in queue */ CHECK( 0, thrh_td.h_calls ); CHECK( 0, thrh_td.l_calls ); /* Get all these messages, and check again */ for (i=0; i<5; i++) { CHECK( 0, fd_fifo_get(queue, &msg) ); } /* 0 msg in queue */ CHECK( 0, thrh_td.h_calls ); CHECK( 0, thrh_td.l_calls ); /* Now, post 6 messages, the high threashold */ for (i=0; i<6; i++) { msg = msg1; CHECK( 0, fd_fifo_post(queue, &msg) ); } /* 6 msg in queue */ CHECK( 1, thrh_td.h_calls ); CHECK( 0, thrh_td.l_calls ); /* Remove 2 messages, to reach the low threshold */ for (i=0; i<2; i++) { CHECK( 0, fd_fifo_get(queue, &msg) ); } /* 4 msg in queue */ CHECK( 1, thrh_td.h_calls ); CHECK( 1, thrh_td.l_calls ); /* Come again at the high threshold */ for (i=0; i<2; i++) { msg = msg1; CHECK( 0, fd_fifo_post(queue, &msg) ); } /* 6 msg in queue */ CHECK( 2, thrh_td.h_calls ); CHECK( 1, thrh_td.l_calls ); /* Suppose the queue continues to grow */ for (i=0; i<6; i++) { msg = msg1; CHECK( 0, fd_fifo_post(queue, &msg) ); } /* 12 msg in queue */ CHECK( 3, thrh_td.h_calls ); CHECK( 1, thrh_td.l_calls ); for (i=0; i<5; i++) { msg = msg1; CHECK( 0, fd_fifo_post(queue, &msg) ); } /* 17 msg in queue */ CHECK( 3, thrh_td.h_calls ); CHECK( 1, thrh_td.l_calls ); /* Now the queue goes back to 0 messages */ for (i=0; i<17; i++) { CHECK( 0, fd_fifo_get(queue, &msg) ); } /* 0 msg in queue */ CHECK( 3, thrh_td.h_calls ); CHECK( 3, thrh_td.l_calls ); /* We're done for this test */ CHECK( 0, fd_fifo_del(&queue) ); } /* Test max queue limit */ { struct fifo *queue = NULL; struct test_data td; pthread_t th; int * item, i; /* Create the queue */ CHECK( 0, fd_fifo_new(&queue, 10) ); /* Initialize the test data structures */ td.queue = queue; td.nbr = 15; CHECK( 0, pthread_create( &th, NULL, test_fct2, &td ) ); usleep(100000); /* 100 millisec */ CHECK( 10, iter ); CHECK( 0, fd_fifo_tryget(queue, &item) ); CHECK( 0, *item); free(item); usleep(100000); /* 100 millisec */ CHECK( 11, iter ); for (i=1; i<4; i++) { CHECK( 0, fd_fifo_get(queue, &item) ); CHECK( i, *item); free(item); } usleep(100000); /* 100 millisec */ CHECK( 14, iter ); for (; i < td.nbr; i++) { CHECK( 0, fd_fifo_tryget(queue, &item) ); CHECK( i, *item); free(item); } CHECK( 0, pthread_join( th, NULL ) ); CHECK( 15, iter ); } /* Delete the messages */ CHECK( 0, fd_msg_free( msg1 ) ); CHECK( 0, fd_msg_free( msg2 ) ); CHECK( 0, fd_msg_free( msg3 ) ); /* That's all for the tests yet */ PASSTEST(); } nextepc-0.3.10/lib/freeDiameter-1.2.1/tests/testloadext.c000066400000000000000000000075221333553357400227270ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2011, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "tests.h" #ifndef BUILD_DIR #error "Missing BUILD_DIR information" #endif /* BUILD_DIR */ #include #include #include #include /* Main test routine */ int main(int argc, char *argv[]) { DIR *dir; struct dirent *dp; char fullname[512]; int pathlen; /* First, initialize the daemon modules */ INIT_FD(); CHECK( 0, fd_queues_init() ); CHECK( 0, fd_msg_init() ); CHECK( 0, fd_rtdisp_init() ); /* Find all extensions which have been compiled along the test */ TRACE_DEBUG(INFO, "Loading from: '%s'", BUILD_DIR "/extensions"); CHECK( 0, (dir = opendir (BUILD_DIR "/extensions")) == NULL ? 1 : 0 ); pathlen = snprintf(fullname, sizeof(fullname), BUILD_DIR "/extensions/"); while ((dp = readdir (dir)) != NULL) { char * dot = strrchr(dp->d_name, '.'); if (dot && !(strcmp(dot, ".fdx"))) { /* We found a file with name *.fdx, attempt to load it */ void *hdl, * ep; snprintf(fullname + pathlen, sizeof(fullname) - pathlen, "%s", dp->d_name); TRACE_DEBUG(INFO, "Extension: '%s'", dp->d_name); /* load */ hdl = dlopen(fullname, RTLD_NOW | RTLD_GLOBAL); if (!hdl) { TRACE_DEBUG(INFO, "Unable to load '%s': %s.", fullname, dlerror()); } CHECK( 0, hdl == NULL ? 1 : 0 ); /* resolve entry */ ep = dlsym( hdl, "fd_ext_init" ); if (!ep) { TRACE_DEBUG(INFO, "No 'fd_ext_init' entry point in '%s': %s.", fullname, dlerror()); } CHECK( 0, ep == NULL ? 1 : 0 ); /* Done, now unload */ #ifndef SKIP_DLCLOSE CHECK( 0, dlclose(hdl) ); #endif /* SKIP_DLCLOSE */ } } CHECK( 0, closedir(dir) ); PASSTEST(); } nextepc-0.3.10/lib/freeDiameter-1.2.1/tests/testmesg.c000066400000000000000000001577551333553357400222400ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2015, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "tests.h" /* Main test routine */ int main(int argc, char *argv[]) { struct msg * acr = NULL; struct avp * pi = NULL, *avp1, *avp2; unsigned char * buf = NULL; /* First, initialize the daemon modules */ INIT_FD(); /* Create the message object from model */ { struct dict_object * acr_model = NULL; /* Now find the ACR dictionary object */ CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Accounting-Request", &acr_model, ENOENT ) ); /* Create the instance, using the templates */ CHECK( 0, fd_msg_new ( acr_model, 0, &acr ) ); /* Check there is no child */ CHECK( ENOENT, fd_msg_browse ( acr, MSG_BRW_FIRST_CHILD, NULL, NULL) ); #if 0 /* For debug: dump the object */ fd_log_debug("Dumping Accounting-Request empty message:"); fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, acr, fd_g_config->cnf_dict, 0, 1)); #endif } /* Create the Proxy-Info AVP from model */ { struct dict_object * pi_model = NULL; /* Now find the ACR dictionary object */ CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Proxy-Info", &pi_model, ENOENT ) ); /* Create the instance, using the templates */ CHECK( 0, fd_msg_avp_new ( pi_model, 0, &pi ) ); #if 0 /* For debug: dump the object */ fd_log_debug("Dumping Proxy-Info AVP"); fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, pi, fd_g_config->cnf_dict, 0, 1)); fd_log_debug("Dumping dictionary model"); fd_log_debug("%s", fd_dict_dump_object(FD_DUMP_TEST_PARAMS, pi_model)); #endif } /* Get a reference to the current last AVP in the message */ { int diff = 0; CHECK( 0, fd_msg_avp_new ( NULL, 0, &avp1 ) ); CHECK( 0, fd_msg_avp_add ( acr, MSG_BRW_LAST_CHILD, avp1) ); CHECK( 0, fd_msg_browse ( acr, MSG_BRW_LAST_CHILD, &avp2, &diff) ); CHECK( 1, diff ); CHECK( avp1, avp2 ); /* Check that we cannot add this AVP to another object since it is already linked */ CHECK( EINVAL, fd_msg_avp_add( pi, MSG_BRW_LAST_CHILD, avp1) ); } /* Now add the Proxy-Info AVP at the end of the message */ { CHECK( 0, fd_msg_avp_add( acr, MSG_BRW_LAST_CHILD, pi) ); #if 0 /* For debug: dump the object */ fd_log_debug("Dumping Accounting-Request with Proxy-Info AVP at the end"); fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, acr, fd_g_config->cnf_dict, 0, 1)); #endif } /* Check the last child is now the proxy-Info */ { CHECK( 0, fd_msg_browse ( acr, MSG_BRW_LAST_CHILD, &avp2, NULL) ); CHECK( pi, avp2 ); } /* Check that the avp before the proxy-info is the previous last one */ { int diff = 0; CHECK( 0, fd_msg_browse ( pi, MSG_BRW_PREV, &avp2, &diff) ); CHECK( avp1, avp2 ); CHECK( 0, diff); } /* Check that there are no AVP after the proxy-info */ CHECK( ENOENT, fd_msg_browse ( pi, MSG_BRW_NEXT, NULL, NULL) ); /* Test the fd_msg_free function unlinks the object properly */ { struct dict_object * rr_model = NULL; /* Now find the dictionary object */ CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Route-Record", &rr_model, ENOENT ) ); /* Create the instance, using the templates */ CHECK( 0, fd_msg_avp_new ( rr_model, 0, &avp1 ) ); /* Add the AVP at the end of the message */ CHECK( 0, fd_msg_avp_add( pi, MSG_BRW_NEXT, avp1) ); /* Check the last AVP of the message is now this one */ CHECK( 0, fd_msg_browse ( acr, MSG_BRW_LAST_CHILD, &avp2, NULL) ); CHECK( avp1, avp2 ); /* Now delete it */ CHECK( 0, fd_msg_free( avp1 ) ); /* Check the last AVP of the message is back to pi */ CHECK( 0, fd_msg_browse ( acr, MSG_BRW_LAST_CHILD, &avp2, NULL) ); CHECK( pi, avp2 ); /* Delete the whole message */ CHECK( 0, fd_msg_free( acr ) ); } /* Recreate the message object */ { struct dict_object * acr_model = NULL; /* Now find the ACR dictionary object */ CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Accounting-Request", &acr_model, ENOENT ) ); /* Create the instance, using the templates */ CHECK( 0, fd_msg_new ( acr_model, 0, &acr ) ); } /* Now let's create some additional Dictionary objects for the test */ { /* The constant values used here are totally arbitrary chosen */ struct dict_object * vendor; { struct dict_vendor_data vendor_data = { 73565, "Vendor test" }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data , NULL, &vendor ) ); } { struct dict_application_data app_data = { 73566, "Application test" }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_APPLICATION, &app_data , vendor, NULL ) ); } { struct dict_avp_data avp_data = { 73567, 0, "AVP Test - no vendor - f32", 0, 0, AVP_TYPE_FLOAT32 }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , NULL, NULL ) ); } { struct dict_avp_data avp_data = { 139103, 0, "AVP Test - no vendor - f64", 0, 0, AVP_TYPE_FLOAT64 }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , NULL, NULL ) ); } { struct dict_object * type = NULL; struct dict_type_data type_data = { AVP_TYPE_INTEGER64, "Int64 test" }; struct dict_avp_data avp_data = { 73568, 73565, "AVP Test - i64", AVP_FLAG_VENDOR, AVP_FLAG_VENDOR, AVP_TYPE_INTEGER64 }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_TYPE, &type_data , NULL, &type ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , type, NULL ) ); } { struct dict_object * type = NULL; struct dict_type_data type_data = { AVP_TYPE_INTEGER32, "Enum32 test" }; struct dict_enumval_data val1 = { "i32 const test (val 1)", { .i32 = 1 } }; struct dict_enumval_data val2 = { "i32 const test (val 2)", { .i32 = 2 } }; struct dict_enumval_data val3 = { "i32 const test (val -5)",{ .i32 = -5 } }; struct dict_avp_data avp_data = { 73569, 73565, "AVP Test - enumi32", AVP_FLAG_VENDOR, AVP_FLAG_VENDOR, AVP_TYPE_INTEGER32 }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_TYPE, &type_data , NULL, &type ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , type, NULL ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_ENUMVAL, &val1 , type, NULL ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_ENUMVAL, &val2 , type, NULL ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_ENUMVAL, &val3 , type, NULL ) ); } { struct dict_object * type = NULL; struct dict_type_data type_data = { AVP_TYPE_OCTETSTRING, "OS test" }; struct dict_avp_data avp_data = { 73570, 73565, "AVP Test - os", AVP_FLAG_VENDOR, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_TYPE, &type_data , NULL, &type ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , type, NULL ) ); } { struct dict_object * type = NULL; struct dict_type_data type_data = { AVP_TYPE_OCTETSTRING, "OS enum test" }; struct dict_enumval_data val1 = { "os const test (Test)", { .os = { (unsigned char *)"Test", 4 } } }; struct dict_enumval_data val2 = { "os const test (waaad)", { .os = { (unsigned char *)"waaad", 5 } } }; struct dict_enumval_data val3 = { "os const test (waa)", { .os = { (unsigned char *)"waaad", 3 } } }; struct dict_avp_data avp_data = { 73571, 73565, "AVP Test - enumos", AVP_FLAG_VENDOR, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_TYPE, &type_data , NULL, &type ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , type, NULL ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_ENUMVAL, &val1 , type, NULL ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_ENUMVAL, &val2 , type, NULL ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_ENUMVAL, &val3 , type, NULL ) ); } { struct dict_object * gavp = NULL; struct dict_avp_data avp_data = { 73572, 73565, "AVP Test - grouped", AVP_FLAG_VENDOR, AVP_FLAG_VENDOR, AVP_TYPE_GROUPED }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , NULL, &gavp ) ); /* Macro to search AVP and create a rule */ #define ADD_RULE( _parent, _vendor, _avpname, _pos, _min, _max, _ord ) { \ struct dict_object * _avp = NULL; \ struct dict_avp_request _req = { (_vendor), 0, (_avpname) }; \ struct dict_rule_data _data; \ CHECK( 0, fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME_AND_VENDOR, &_req, &_avp, ENOENT));\ _data.rule_avp = _avp; \ _data.rule_position = (_pos); \ _data.rule_order = (_ord); \ _data.rule_min = (_min); \ _data.rule_max = (_max); \ CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_RULE, &_data , (_parent), NULL ) ); \ } ADD_RULE(gavp, 73565, "AVP Test - os", RULE_OPTIONAL, -1, -1, 0); } { struct dict_object * application = NULL; struct dict_object * command = NULL; struct dict_cmd_data cmd_data = { 73573, "Test-Command-Request", CMD_FLAG_REQUEST, CMD_FLAG_REQUEST }; CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_APPLICATION, APPLICATION_BY_NAME, "Application test", &application, ENOENT ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_COMMAND, &cmd_data , application, &command ) ); ADD_RULE(command, 0, "AVP Test - no vendor - f32", RULE_FIXED_HEAD, -1, 1, 1); ADD_RULE(command, 73565, "AVP Test - i64", RULE_REQUIRED, -1, -1, 0); ADD_RULE(command, 73565, "AVP Test - enumi32", RULE_OPTIONAL, -1, -1, 0); ADD_RULE(command, 73565, "AVP Test - os", RULE_OPTIONAL, -1, -1, 0); ADD_RULE(command, 73565, "AVP Test - enumos", RULE_OPTIONAL, -1, -1, 0); ADD_RULE(command, 73565, "AVP Test - grouped", RULE_OPTIONAL, -1, -1, 0); } { struct dict_object * application = NULL; struct dict_object * command = NULL; struct dict_cmd_data cmd_data = { 73573, "Test-Command-Answer", CMD_FLAG_REQUEST, 0 }; CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_APPLICATION, APPLICATION_BY_NAME, "Application test", &application, ENOENT ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_COMMAND, &cmd_data , application, &command ) ); } { struct dict_object * gavp = NULL; struct dict_avp_data avp_data = { 73574, 73565, "AVP Test - rules", AVP_FLAG_VENDOR, AVP_FLAG_VENDOR, AVP_TYPE_GROUPED }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , NULL, &gavp ) ); ADD_RULE(gavp, 0, "AVP Test - no vendor - f32", RULE_FIXED_HEAD, 0, 1, 1); ADD_RULE(gavp, 73565, "AVP Test - i64", RULE_FIXED_HEAD, -1, 1, 2); ADD_RULE(gavp, 73565, "AVP Test - enumi32", RULE_FIXED_HEAD, -1, 1, 3); ADD_RULE(gavp, 73565, "AVP Test - os", RULE_REQUIRED, 2, 3, 0); ADD_RULE(gavp, 73565, "AVP Test - enumos", RULE_OPTIONAL, 0, 1, 0); ADD_RULE(gavp, 73565, "AVP Test - grouped", RULE_FIXED_TAIL, -1, 1, 1); /* ABNF : < no vendor - f32 > < i64 > < enumi32 > 2*3 { os } *1 [ enumos ] < grouped > */ #if 0 fd_log_debug("%s", fd_dict_dump_object(FD_DUMP_TEST_PARAMS, gavp)); #endif } { struct dict_object * type = NULL; struct dict_type_data type_data = { AVP_TYPE_OCTETSTRING, "OS test2", NULL, NULL, NULL, fd_dictfct_CharInOS_check, "@." }; struct dict_avp_data avp_data = { 73575, 73565, "AVP Test - os2", AVP_FLAG_VENDOR, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_TYPE, &type_data , NULL, &type ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , type, NULL ) ); } #if 0 { fd_log_debug("%s", fd_dict_dump_object(FD_DUMP_TEST_PARAMS, vendor)); } #endif } /* Now create some values and check the length is correctly handled */ { struct dict_object * cmd_model = NULL; struct msg * msg = NULL; struct dict_object * avp_model = NULL; struct avp * avp = NULL; union avp_value value; CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Test-Command-Request", &cmd_model, ENOENT ) ); /* Check an error is trigged if the AVP has no value set */ { CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "AVP Test - no vendor - f32", &avp_model, ENOENT ) ); CHECK( 0, fd_msg_new ( cmd_model, 0, &msg ) ); CHECK( 0, fd_msg_avp_new ( avp_model, 0, &avp ) ); CHECK( 0, fd_msg_avp_add ( msg, MSG_BRW_FIRST_CHILD, avp ) ); CHECK( EINVAL, fd_msg_update_length ( avp ) ); CHECK( EINVAL, fd_msg_update_length ( msg ) ); CHECK( 0, fd_msg_free( msg ) ); } /* Check the sizes are handled properly */ { struct avp * avpi = NULL; struct avp * avpch = NULL; struct avp_hdr * avpdata = NULL; struct msg_hdr * msgdata = NULL; #define ADD_AVP( _parent, _position, _avpi, _avpvendor, _avpname) { \ struct dict_object * _avp = NULL; \ struct dict_avp_request _req = { (_avpvendor), 0, (_avpname) }; \ CHECK( 0, fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME_AND_VENDOR, &_req, &_avp, ENOENT));\ CHECK( 0, fd_msg_avp_new ( _avp, 0, &_avpi ) ); \ CHECK( 0, fd_msg_avp_add ( (_parent), (_position), _avpi ) ); \ } /* Create a message with many AVP inside */ CHECK( 0, fd_msg_new ( cmd_model, 0, &msg ) ); CHECK( 0, fd_msg_hdr ( msg, &msgdata ) ); /* Avp no vendor, float32 => size = 12 */ ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 0, "AVP Test - no vendor - f32" ); value.f32 = 3.1415; CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) ); CHECK( 0, fd_msg_update_length ( avpi ) ); #if 0 fd_log_debug("AVP no vendor, value 3.1415:"); fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, avpi, fd_g_config->cnf_dict, 0, 0)); #endif CHECK( 0, fd_msg_avp_hdr ( avpi, &avpdata ) ); CHECK( 12, avpdata->avp_len ); /* Check what happens when we delete the value */ CHECK( 0, fd_msg_avp_setvalue ( avpi, NULL ) ); CHECK( EINVAL, fd_msg_update_length ( avpi ) ); CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) ); /* Add a vendor AVP, integer64 => size = 20 */ ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - i64" ); value.i64 = 0x123456789abcdeLL; CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) ); CHECK( 0, fd_msg_update_length ( avpi ) ); #if 0 fd_log_debug("AVP vendor, value 0x123456789abcdeL:"); fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, avpi, fd_g_config->cnf_dict, 0, 0)); #endif CHECK( 0, fd_msg_avp_hdr ( avpi, &avpdata ) ); CHECK( 20, avpdata->avp_len ); /* Check the size of the message is 20 (header) + 12 + 20 = 52 */ CHECK( 0, fd_msg_update_length ( msg ) ); CHECK( 52, msgdata->msg_length ); /* Add an AVP with an enum value */ ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - enumi32" ); { struct dict_object * type_model = NULL; struct dict_object * value_model = NULL; struct dict_enumval_request request; CHECK( 0, fd_msg_model ( avpi, &avp_model ) ); CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_TYPE, TYPE_OF_AVP, avp_model, &type_model, ENOENT ) ); memset(&request, 0, sizeof(request)); request.type_obj = type_model; request.search.enum_name = "i32 const test (val 2)"; CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_ENUMVAL, ENUMVAL_BY_STRUCT, &request, &value_model, ENOENT ) ); CHECK( 0, fd_dict_getval ( value_model, &request.search ) ); CHECK( 0, fd_msg_avp_setvalue ( avpi, &request.search.enum_value ) ); #if 0 fd_log_debug("AVP enum i32, value 2 (from const):"); fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, avpi, fd_g_config->cnf_dict, 0, 0)); #endif } /* Add an AVP with an enum value, negative */ ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - enumi32" ); { struct dict_object * type_model = NULL; struct dict_object * value_model = NULL; struct dict_enumval_request request; CHECK( 0, fd_msg_model ( avpi, &avp_model ) ); CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_TYPE, TYPE_OF_AVP, avp_model, &type_model, ENOENT ) ); memset(&request, 0, sizeof(request)); request.type_obj = type_model; request.search.enum_name = "i32 const test (val -5)"; CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_ENUMVAL, ENUMVAL_BY_STRUCT, &request, &value_model, ENOENT ) ); CHECK( 0, fd_dict_getval ( value_model, &request.search ) ); CHECK( 0, fd_msg_avp_setvalue ( avpi, &request.search.enum_value ) ); #if 0 fd_log_debug("AVP enum i32, value -5 (from const):"); fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, avpi, fd_g_config->cnf_dict, 0, 0)); #endif /* Check the size is correct ( 12 for header + 4 for value ) */ CHECK( 0, fd_msg_update_length ( avpi ) ); CHECK( 0, fd_msg_avp_hdr ( avpi, &avpdata ) ); CHECK( 16, avpdata->avp_len ); } /* Now add a value which is not a constant into an enumerated AVP */ ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - enumi32" ); value.i32 = -10; CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) ); CHECK( 0, fd_msg_update_length ( avpi ) ); #if 0 fd_log_debug("AVP vendor enum i32, value -10 (not const):"); fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, avpi, fd_g_config->cnf_dict, 0, 0)); #endif /* Add an octetstring AVP */ ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - os" ); { unsigned char buf[90]; memcpy(&buf, "This\0 is a buffer of dat\a. It is not a string so we can have any c\0ntr\0l character here...\0\0", 89); value.os.data = buf; value.os.len = 89; CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) ); memset(&buf, 0, sizeof(buf)); /* Test that the OS value is really copied */ CHECK( 0, fd_msg_update_length ( avpi ) ); #if 0 fd_log_debug("AVP octet string, 'This\\0 is a b...'"); fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, avpi, fd_g_config->cnf_dict, 0, 0)); #endif CHECK( 0, fd_msg_avp_hdr ( avpi, &avpdata ) ); CHECK( 101, avpdata->avp_len ); CHECK( 'T', avpdata->avp_value->os.data[0] ); CHECK( 'i', avpdata->avp_value->os.data[6] ); } /* Check the size of the message is 20 (header) + 12 + 20 + 16 * 3 + 101 + 3 (padding) = 204 */ CHECK( 0, fd_msg_update_length ( msg ) ); CHECK( 204, msgdata->msg_length ); /* Add an octetstring from an enumerated constant */ ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - enumos" ); { struct dict_object * type_model = NULL; struct dict_object * value_model = NULL; struct dict_enumval_request request; CHECK( 0, fd_msg_model ( avpi, &avp_model ) ); CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_TYPE, TYPE_OF_AVP, avp_model, &type_model, ENOENT ) ); memset(&request, 0, sizeof(request)); request.type_obj = type_model; request.search.enum_name = "os const test (waaad)"; CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_ENUMVAL, ENUMVAL_BY_STRUCT, &request, &value_model, ENOENT ) ); CHECK( 0, fd_dict_getval ( value_model, &request.search ) ); CHECK( 0, fd_msg_avp_setvalue ( avpi, &request.search.enum_value ) ); #if 0 fd_log_debug("AVP Enumuerated OctetString (from const):"); fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, avpi, fd_g_config->cnf_dict, 0, 0)); #endif /* Check the size is correct ( 12 for header + 5 for value ) */ CHECK( 0, fd_msg_update_length ( avpi ) ); CHECK( 0, fd_msg_avp_hdr ( avpi, &avpdata ) ); CHECK( 17, avpdata->avp_len ); } /* Add an octetstring from an enumerated constant */ ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - enumos" ); { struct dict_object * type_model = NULL; struct dict_object * value_model = NULL; struct dict_enumval_request request; CHECK( 0, fd_msg_model ( avpi, &avp_model ) ); CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_TYPE, TYPE_OF_AVP, avp_model, &type_model, ENOENT ) ); memset(&request, 0, sizeof(request)); request.type_obj = type_model; request.search.enum_name = "os const test (waa)"; CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_ENUMVAL, ENUMVAL_BY_STRUCT, &request, &value_model, ENOENT ) ); CHECK( 0, fd_dict_getval ( value_model, &request.search ) ); CHECK( 0, fd_msg_avp_setvalue ( avpi, &request.search.enum_value ) ); #if 0 fd_log_debug("AVP Enumuerated OctetString (from const):"); fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, avpi, fd_g_config->cnf_dict, 0, 0)); #endif /* Check the size is correct ( 12 for header + 3 for value ) */ CHECK( 0, fd_msg_update_length ( avpi ) ); CHECK( 0, fd_msg_avp_hdr ( avpi, &avpdata ) ); CHECK( 15, avpdata->avp_len ); } /* Check the size of the message is 20 (header) + 12 + 20 + 16 * 3 + (101 + 3) + (17 + 3) + (15 + 1) = 240 */ CHECK( 0, fd_msg_update_length ( msg ) ); CHECK( 240, msgdata->msg_length ); /* Now test the grouped AVPs */ ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - grouped" ); ADD_AVP( avpi, MSG_BRW_LAST_CHILD, avpch, 73565, "AVP Test - os" ); { value.os.data = (unsigned char *)"12345678"; value.os.len = 8; CHECK( 0, fd_msg_avp_setvalue ( avpch, &value ) ); #if 0 fd_log_debug("AVP octet string, '1234678'"); fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, avpch, fd_g_config->cnf_dict, 0, 0)); #endif CHECK( 0, fd_msg_update_length ( avpch ) ); CHECK( 0, fd_msg_avp_hdr ( avpch, &avpdata ) ); CHECK( 20, avpdata->avp_len ); } ADD_AVP( avpi, MSG_BRW_LAST_CHILD, avpch, 73565, "AVP Test - os" ); { value.os.data = (unsigned char *)"123456789"; value.os.len = 9; CHECK( 0, fd_msg_avp_setvalue ( avpch, &value ) ); #if 0 fd_log_debug("AVP octet string, '12346789'"); fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, avpch, fd_g_config->cnf_dict, 0, 0)); #endif } /* Check the size is updated recursively: (gavp hdr: 12) + (avp1: 20) + (avp2: 21 + 3) = 56 */ CHECK( 0, fd_msg_update_length ( avpi ) ); CHECK( 0, fd_msg_avp_hdr ( avpi, &avpdata ) ); CHECK( 56, avpdata->avp_len ); /* Add another similar grouped AVP, to have lot of padding */ ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - grouped" ); ADD_AVP( avpi, MSG_BRW_LAST_CHILD, avpch, 73565, "AVP Test - os" ); { value.os.data = (unsigned char *)"1"; value.os.len = 1; CHECK( 0, fd_msg_avp_setvalue ( avpch, &value ) ); } ADD_AVP( avpi, MSG_BRW_LAST_CHILD, avpch, 73565, "AVP Test - os" ); { value.os.data = (unsigned char *)"1234567"; value.os.len = 7; CHECK( 0, fd_msg_avp_setvalue ( avpch, &value ) ); } /* Now check the global size of the message, if padding is correctly handled */ /* size = 20 (header) + 12 + 20 + 16 * 3 + (101 + 3) + (17 + 3) + (15 + 1) * + ( 12 + ( 20 + 21) + 3 ) # padding for the grouped AVP = 3 * + ( 12 + ( (13 + 3) + 19 ) + 1 ) # and 1 for this one * size = 240 + 56 + 48 = 344 */ CHECK( 0, fd_msg_update_length ( msg ) ); #if 0 fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, msg, fd_g_config->cnf_dict, 0, 1)); #endif CHECK( 344, msgdata->msg_length ); /* Set the application to the test application: 73566 */ msgdata->msg_appl = 73566; /* Set the hop-by-hop ID to a random value: 0x4b44b41d */ msgdata->msg_hbhid = 0x4b44b41d; /* Set the end-to-end ID to a random value: 0xe2ee2e1d */ msgdata->msg_eteid = 0xe2ee2e1d; } /* Test the msg_bufferize function */ { CHECK( 0, fd_msg_bufferize( msg, &buf, NULL ) ); /* Test the first bytes */ CHECK( 0x01, buf[0] ); /* Version */ CHECK( 0x00, buf[1] ); /* Length: 344 = 0x000158 */ CHECK( 0x01, buf[2] ); CHECK( 0x58, buf[3] ); CHECK( 0x80, buf[4] ); /* flags: only "R" is set. */ CHECK( 0x01, buf[5] ); /* Command code: 73573 = 0x011F65 */ CHECK( 0x1F, buf[6] ); CHECK( 0x65, buf[7] ); CHECK( 0x00, buf[8] ); /* App ID: 73566 = 0x00011F5E */ CHECK( 0x01, buf[9] ); CHECK( 0x1F, buf[10] ); CHECK( 0x5E, buf[11] ); CHECK( 0x4b, buf[12] ); /* hop-by-hop id: 0x4b44b41d */ CHECK( 0x44, buf[13] ); CHECK( 0xb4, buf[14] ); CHECK( 0x1d, buf[15] ); CHECK( 0xe2, buf[16] ); /* end-to-end id: 0xe2ee2e1d */ CHECK( 0xee, buf[17] ); CHECK( 0x2e, buf[18] ); CHECK( 0x1d, buf[19] ); CHECK( 0x00, buf[20] ); /* First AVP (AVP Test - no vendor - f32) begin: code 73567 = 0x00011F5F */ CHECK( 0x01, buf[21] ); CHECK( 0x1F, buf[22] ); CHECK( 0x5F, buf[23] ); CHECK( 0x00, buf[24] ); /* flags: 0 */ CHECK( 0x00, buf[25] ); /* length: 12 = 0x00000c */ CHECK( 0x00, buf[26] ); CHECK( 0x0C, buf[27] ); CHECK( 0x40, buf[28] ); /* Value: 3.1415: sign = '+' => most significant bit = 0 */ CHECK( 0x49, buf[29] ); /* 2 <= 3.1415 < 4 => exponent = 1 => biaised (on 8 bits) = (decimal) 128 = (binary) 100 0000 0 */ CHECK( 0x0e, buf[30] ); /* significand = (decimal) 1.57075 = (binary) 1.100 1001 0000 1110 0101 0110 */ CHECK( 0x56, buf[31] ); /* total => 0100 0000 0100 1001 0000 1110 0101 0110 = (hexa) 40 49 0e 56*/ /* The other AVPs will be tested by successful parsing... */ } /* Now free the message, we keep only the buffer. */ CHECK( 0, fd_msg_free( msg ) ); } /* Test the parsing of buffers and messages */ { unsigned char * buf_cpy = NULL; struct msg * msg; #define CPYBUF() { \ buf_cpy = malloc(344); \ CHECK( buf_cpy ? 1 : 0, 1); \ memcpy(buf_cpy, buf, 344); \ } /* Test the msg_parse_buffer function */ { CPYBUF(); CHECK( EBADMSG, fd_msg_parse_buffer( &buf_cpy, 340, &msg) ); CPYBUF(); CHECK( 0, fd_msg_parse_buffer( &buf_cpy, 344, &msg) ); #if 0 fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, msg, fd_g_config->cnf_dict, 0, 1)); #endif /* reinit the msg */ CHECK( 0, fd_msg_free ( msg ) ); } /* Test the fd_msg_search_avp function */ { struct dict_object * avp_model; struct avp * found; struct avp_hdr * avpdata = NULL; /* Now find the ACR dictionary object */ CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "AVP Test - no vendor - f32", &avp_model, ENOENT ) ); CPYBUF(); CHECK( 0, fd_msg_parse_buffer( &buf_cpy, 344, &msg) ); /* Search this AVP instance in the msg */ CHECK( 0, fd_msg_search_avp( msg, avp_model, &found ) ); /* Check the AVP value is 3.1415 */ CHECK( 0, fd_msg_avp_hdr ( found, &avpdata ) ); CHECK( 3.1415F, avpdata->avp_value->f32 ); /* reinit the msg */ CHECK( 0, fd_msg_free ( msg ) ); } /* Test the msg_parse_dict function */ { /* Test with an unknown command code */ { CPYBUF(); /* Change the command-code */ buf_cpy[5] = 0x11; CHECK( 0, fd_msg_parse_buffer( &buf_cpy, 344, &msg) ); CHECK( ENOTSUP, fd_msg_parse_dict( msg, fd_g_config->cnf_dict, NULL ) ); /* reset */ CHECK( 0, fd_msg_free ( msg ) ); } /* Test with an unknown Mandatory AVP */ { CPYBUF(); buf_cpy[20] = 0x11; /* New AVP code = 0x11011F5F, undefined */ buf_cpy[24] = 0x40; /* Add the 'M' flag */ /* Check that we cannot support this message now */ CHECK( 0, fd_msg_parse_buffer( &buf_cpy, 344, &msg) ); CHECK( ENOTSUP, fd_msg_parse_dict( msg, fd_g_config->cnf_dict, NULL ) ); /* reset */ CHECK( 0, fd_msg_free ( msg ) ); } /* Test with an unknown optional AVP */ { CPYBUF(); buf_cpy[20] = 0x11; /* New AVP code = 0x11011F5F, undefined */ /* Check that we can support this message now */ CHECK( 0, fd_msg_parse_buffer( &buf_cpy, 344, &msg) ); CHECK( 0, fd_msg_parse_dict( msg, fd_g_config->cnf_dict, NULL ) ); #if 0 fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, msg, fd_g_config->cnf_dict, 0, 1)); #endif /* reset */ CHECK( 0, fd_msg_free ( msg ) ); } /* Test with an invalid AVP (definition mismatch with the dictionary) */ { CPYBUF(); buf_cpy[21] = 0x02; /* New AVP code = 0x00021F5F, f64 type in the dictionary */ /* Check that we cannot support this message now */ CHECK( 0, fd_msg_parse_buffer( &buf_cpy, 344, &msg) ); CHECK( EBADMSG, fd_msg_parse_dict( msg, fd_g_config->cnf_dict, NULL ) ); /* reset */ CHECK( 0, fd_msg_free ( msg ) ); } /* Test with a type verifier */ { struct fd_pei error_info; CPYBUF(); buf_cpy[103] = 0x67; /* Replaced AVP code = 0x00011F67, OS test2 type in the dictionary */ /* Check that we cannot support this message now */ CHECK( 0, fd_msg_parse_buffer( &buf_cpy, 344, &msg) ); CHECK( EBADMSG, fd_msg_parse_dict( msg, fd_g_config->cnf_dict, NULL ) ); /* reset */ CHECK( 0, fd_msg_free ( msg ) ); CPYBUF(); buf_cpy[103] = 0x67; /* Replaced AVP code = 0x00011F67, OS test2 type in the dictionary */ /* Check error reporting works */ CHECK( 0, fd_msg_parse_buffer( &buf_cpy, 344, &msg) ); CHECK( EBADMSG, fd_msg_parse_dict( msg, fd_g_config->cnf_dict, &error_info ) ); #if 1 fd_log_debug("Error reported: %s\n in AVP: %s", error_info.pei_message, fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, error_info.pei_avp, fd_g_config->cnf_dict, 0, 1)); #endif /* reset */ CHECK( 0, fd_msg_free ( msg ) ); CPYBUF(); buf_cpy[103] = 0x67; /* Replaced AVP code = 0x00011F67, OS test2 type in the dictionary */ buf_cpy[130] = '@'; buf_cpy[140] = '.'; /* now we comply to the constraints */ /* Check that we cannot support this message now */ CHECK( 0, fd_msg_parse_buffer( &buf_cpy, 344, &msg) ); CHECK( 0, fd_msg_parse_dict( msg, fd_g_config->cnf_dict, NULL ) ); /* reset */ CHECK( 0, fd_msg_free ( msg ) ); } { unsigned char * buftmp = NULL; struct msg * error; /* Check the parse or error works as expected */ CPYBUF(); buf_cpy[21] = 0x02; /* New AVP code = 0x00021F5F, f64 type in the dictionary */ /* Check that we cannot support this message now */ CHECK( 0, fd_msg_init() ); CHECK( 0, fd_msg_parse_buffer( &buf_cpy, 344, &msg) ); CHECK( EBADMSG, fd_msg_parse_or_error( &msg, &error ) ); CHECK( NULL, msg ); msg = error; CHECK( 0, fd_msg_bufferize( msg, &buftmp, NULL ) ); fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, msg, fd_g_config->cnf_dict, 0, 1)); TODO("Check the Failed-AVP is as expected"); /* reset */ CHECK( 0, fd_msg_free ( msg ) ); free(buftmp); } CHECK( 0, fd_msg_parse_buffer( &buf, 344, &msg) ); CHECK( 0, fd_msg_parse_dict( msg, fd_g_config->cnf_dict, NULL ) ); #if 0 fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, msg, fd_g_config->cnf_dict, 0, 1)); #endif } /* Now test the msg_parse_rule function */ { struct fd_pei pei; CHECK( 0, fd_msg_parse_rules( msg, fd_g_config->cnf_dict, &pei ) ); /* Use the "AVP Test - rules" AVP to test the rules */ { struct avp * tavp = NULL; struct avp * tempavp = NULL; struct avp * childavp = NULL; ADD_AVP( msg, MSG_BRW_LAST_CHILD, tavp, 73565, "AVP Test - rules" ); /* Create a conforming message first */ ADD_AVP( tavp, MSG_BRW_LAST_CHILD, childavp, 0, "AVP Test - no vendor - f32" ); ADD_AVP( tavp, MSG_BRW_LAST_CHILD, childavp, 73565, "AVP Test - i64" ); ADD_AVP( tavp, MSG_BRW_LAST_CHILD, childavp, 73565, "AVP Test - enumi32" ); ADD_AVP( tavp, MSG_BRW_LAST_CHILD, childavp, 73565, "AVP Test - os" ); ADD_AVP( tavp, MSG_BRW_LAST_CHILD, childavp, 73565, "AVP Test - os" ); ADD_AVP( tavp, MSG_BRW_LAST_CHILD, childavp, 73565, "AVP Test - grouped" ); /* Check the message is still conform */ CHECK( 0, fd_msg_parse_rules( msg, fd_g_config->cnf_dict, &pei ) ); /* The first avp is optional in fixed position, so remove it and check the message is still OK */ CHECK( 0, fd_msg_browse ( tavp, MSG_BRW_FIRST_CHILD, &childavp, NULL) ); CHECK( 0, fd_msg_free ( childavp ) ); CHECK( 0, fd_msg_parse_rules( msg, fd_g_config->cnf_dict, &pei ) ); ADD_AVP( tavp, MSG_BRW_FIRST_CHILD, childavp, 0, "AVP Test - no vendor - f32" ); /* Now break some rules and check it is detected */ #define CHECK_CONFLICT( _msg, _error, _conflictavp_name, _conflictavp_vnd ) { \ struct fd_pei _pei; \ CHECK( EBADMSG, fd_msg_parse_rules( _msg, fd_g_config->cnf_dict, &_pei ) ); \ if (_error) { \ CHECK( 0, strcmp( _error, _pei.pei_errcode ) ); \ } \ if ((_conflictavp_name) == NULL) { \ CHECK( NULL, _pei.pei_avp); \ } else { \ struct dict_avp_request _req = { (_conflictavp_vnd), 0, (_conflictavp_name) }; \ struct dict_object * _avp; \ struct dict_object * _conflict; \ CHECK( 1, (_pei.pei_avp) ? 1 : 0 ); \ CHECK( 0, fd_msg_model( _pei.pei_avp, &_conflict ) ); \ CHECK( 0, fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME_AND_VENDOR, &_req, &_avp, ENOENT)); \ CHECK( _avp, _conflict ); \ } \ } /* ABNF : < no vendor - f32 > < i64 > < enumi32 > 2*3 { os } *1 [ enumos ] < grouped > */ { /* Test the FIXED_HEAD rules positions: add another AVP before the third */ CHECK( 0, fd_msg_browse ( tavp, MSG_BRW_FIRST_CHILD, &tempavp, NULL) ); /* tempavp is the novendor avp */ CHECK( 0, fd_msg_browse ( tempavp, MSG_BRW_NEXT, &tempavp, NULL) ); /* tempavp is the i64 avp */ ADD_AVP( tempavp, MSG_BRW_NEXT, childavp, 73565, "AVP Test - os" ); CHECK_CONFLICT( msg, "DIAMETER_MISSING_AVP", "AVP Test - enumi32", 73565 ); /* Now remove this AVP */ CHECK( 0, fd_msg_free ( childavp ) ); } { /* Remove the third AVP, same rule must conflict */ CHECK( 0, fd_msg_browse ( tempavp, MSG_BRW_NEXT, &childavp, NULL) ); /* childavp is the enumi32 avp */ CHECK( 0, fd_msg_free ( childavp ) ); CHECK_CONFLICT( msg, "DIAMETER_MISSING_AVP", "AVP Test - enumi32", 73565 ); /* Add the AVP back */ ADD_AVP( tempavp, MSG_BRW_NEXT, childavp, 73565, "AVP Test - enumi32" ); } { /* Test the minimum value in the REQUIRED rule: delete one of the os AVPs */ CHECK( 0, fd_msg_browse ( childavp, MSG_BRW_NEXT, &tempavp, NULL) ); /* tempavp is the os avp */ CHECK( 0, fd_msg_free ( tempavp ) ); CHECK_CONFLICT( msg, "DIAMETER_MISSING_AVP", "AVP Test - os", 73565 ); /* The rule requires at least 2 AVP, we have only 1 */ /* Now add this AVP */ ADD_AVP( childavp, MSG_BRW_NEXT, tempavp, 73565, "AVP Test - os" ); } { /* Test the maximum value in the REQUIRED rule: add more of the os AVPs */ ADD_AVP( childavp, MSG_BRW_NEXT, tempavp, 73565, "AVP Test - os" ); ADD_AVP( childavp, MSG_BRW_NEXT, tempavp, 73565, "AVP Test - os" ); CHECK_CONFLICT( msg, "DIAMETER_AVP_OCCURS_TOO_MANY_TIMES", "AVP Test - os", 73565 ); /* The rule requires at most 3 AVP, we have 4 */ /* Now delete these AVP */ CHECK( 0, fd_msg_free ( tempavp ) ); CHECK( 0, fd_msg_browse ( childavp, MSG_BRW_NEXT, &tempavp, NULL) ); CHECK( 0, fd_msg_free ( tempavp ) ); } { /* Test the maximum value in the OPTIONAL rule: add 2 enumos AVPs */ ADD_AVP( childavp, MSG_BRW_NEXT, tempavp, 73565, "AVP Test - enumos" ); /* The message is still conform */ CHECK( 0, fd_msg_parse_rules( msg, fd_g_config->cnf_dict, &pei ) ); /* Now break the rule */ ADD_AVP( childavp, MSG_BRW_NEXT, tempavp, 73565, "AVP Test - enumos" ); CHECK_CONFLICT( msg, "DIAMETER_AVP_OCCURS_TOO_MANY_TIMES", "AVP Test - enumos", 73565 ); /* Now delete this AVP */ CHECK( 0, fd_msg_free ( tempavp ) ); } { /* Test the RULE_FIXED_TAIL rules positions: add another AVP at the end */ ADD_AVP( tavp, MSG_BRW_LAST_CHILD, childavp, 73565, "AVP Test - os" ); CHECK_CONFLICT( msg, "DIAMETER_MISSING_AVP", "AVP Test - grouped", 73565 ); /* Now remove this AVP */ CHECK( 0, fd_msg_free ( childavp ) ); } } } /* Test the fd_msg_new_answer_from_req function */ { struct dict_object * cmd_model = NULL; struct msg * msg = NULL; struct avp * pi1, *pi2, *avp; char * host1="host1", * host2="host2"; union avp_value value; struct msg_hdr * msgdata = NULL; CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Test-Command-Request", &cmd_model, ENOENT ) ); /* Test default behavior without flags */ { /* Create a message with some AVPs inside */ CHECK( 0, fd_msg_new ( cmd_model, 0, &msg ) ); CHECK( 0, fd_msg_hdr ( msg, &msgdata ) ); /* Add a session id */ CHECK( 0, fd_msg_new_session( msg, (os0_t)"testmsg", strlen("testmsg") ) ); /* Create two instances of Proxy-Info */ ADD_AVP( msg, MSG_BRW_LAST_CHILD, pi1, 0, "Proxy-Info"); ADD_AVP( msg, MSG_BRW_LAST_CHILD, pi2, 0, "Proxy-Info"); ADD_AVP( pi1, MSG_BRW_LAST_CHILD, avp, 0, "Proxy-State"); value.os.data = (os0_t)"ps_pi1"; value.os.len = strlen((char *)value.os.data); CHECK( 0, fd_msg_avp_setvalue ( avp, &value ) ); ADD_AVP( pi2, MSG_BRW_LAST_CHILD, avp, 0, "Proxy-State"); value.os.data = (os0_t)"pi2_state"; value.os.len = strlen((char *)value.os.data); CHECK( 0, fd_msg_avp_setvalue ( avp, &value ) ); ADD_AVP( pi1, MSG_BRW_FIRST_CHILD, avp, 0, "Proxy-Host"); value.os.data = (os0_t)host1; value.os.len = strlen(host1); CHECK( 0, fd_msg_avp_setvalue ( avp, &value ) ); ADD_AVP( pi2, MSG_BRW_LAST_CHILD, avp, 0, "Proxy-Host"); value.os.data = (os0_t)host2; value.os.len = strlen(host2); CHECK( 0, fd_msg_avp_setvalue ( avp, &value ) ); ADD_AVP( pi2, MSG_BRW_LAST_CHILD, avp, 73565, "AVP Test - i64"); value.i64 = 0x123456789abcdeLL; CHECK( 0, fd_msg_avp_setvalue ( avp, &value ) ); /* Now call the fd_msg_new_answer_from_req function */ CHECK( 0, fd_msg_new_answer_from_req ( fd_g_config->cnf_dict, &msg, 0 ) ); /* Check there is a Session-Id AVP */ { struct session * sess; int new; CHECK( 0, fd_msg_sess_get(fd_g_config->cnf_dict, msg, &sess, &new) ); CHECK( 1, sess == NULL ? 0 : 1 ); CHECK( 0, new ? 1 : 0 ); } /* Check there are two Proxy-Info with the two hosts */ { int got_h1 = 0, got_h2=0; CHECK( 0, fd_msg_browse ( msg, MSG_BRW_FIRST_CHILD, &avp, NULL) ); while(avp) { struct avp_hdr * avpdata = NULL; CHECK( 0, fd_msg_avp_hdr ( avp, &avpdata ) ); if (avpdata->avp_code == AC_PROXY_INFO) { struct avp * iavp; CHECK( 0, fd_msg_browse ( avp, MSG_BRW_FIRST_CHILD, &iavp, NULL) ); while(iavp) { struct avp_hdr * iavpdata = NULL; CHECK( 0, fd_msg_avp_hdr ( iavp, &iavpdata ) ); if (iavpdata->avp_code == AC_PROXY_HOST) { if (!memcmp(host1, iavpdata->avp_value->os.data, strlen(host1))) got_h1++; if (!memcmp(host2, iavpdata->avp_value->os.data, strlen(host2))) got_h2++; } CHECK( 0, fd_msg_browse ( iavp, MSG_BRW_NEXT, &iavp, NULL) ); } } CHECK( 0, fd_msg_browse ( avp, MSG_BRW_NEXT, &avp, NULL) ); } CHECK(1, got_h1); CHECK(1, got_h2); } /* Now test the behavior of fd_msg_rescode_set with a grouped AVP */ CHECK( 0, fd_msg_rescode_set(msg, "DIAMETER_AVP_OCCURS_TOO_MANY_TIMES", NULL, pi1, 1) ); fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, msg, fd_g_config->cnf_dict, 0, 1)); TODO("Check the Failed-AVP is as expected"); } } } /* Test the msg_avp_value_interpret and msg_avp_value_encode functions. use the Address type and Host-IP-Address AVPs */ { struct dict_object * cer_model = NULL; struct msg * cer = NULL; struct dict_object * hia_model = NULL; struct avp *avp4, *avp6; #define TEST_IP4 "192.168.100.101" char buf4[INET_ADDRSTRLEN]; #define TEST_IP6 "1111:2222:3333:4444:1234:5678:9abc:def0" char buf6[INET6_ADDRSTRLEN]; struct sockaddr_storage ss; struct sockaddr_in sin, *psin; struct sockaddr_in6 sin6, *psin6; /* Find the CER dictionary object */ CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Capabilities-Exchange-Request", &cer_model, ENOENT ) ); /* Now find the Host-IP-Address dictionary object */ CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME, "Host-IP-Address", &hia_model, ENOENT ) ); /* Create the msg instance */ CHECK( 0, fd_msg_new ( cer_model, 0, &cer ) ); /* Create the avp instances */ CHECK( 0, fd_msg_avp_new ( hia_model, 0, &avp4 ) ); CHECK( 0, fd_msg_avp_new ( hia_model, 0, &avp6 ) ); /* Set the value of the IP avp */ sin.sin_family = AF_INET; CHECK( 1, inet_pton( AF_INET, TEST_IP4, &sin.sin_addr.s_addr ) ); CHECK( 0, fd_msg_avp_value_encode ( &sin, avp4 ) ); /* Set the value of the IP6 avp */ sin6.sin6_family = AF_INET6; CHECK( 1, inet_pton( AF_INET6, TEST_IP6, &sin6.sin6_addr.s6_addr ) ); CHECK( 0, fd_msg_avp_value_encode ( &sin6, avp6 ) ); /* Add these AVPs in the message */ CHECK( 0, fd_msg_avp_add( cer, MSG_BRW_LAST_CHILD, avp4) ); CHECK( 0, fd_msg_avp_add( cer, MSG_BRW_LAST_CHILD, avp6) ); /* Create the buffer for this message */ CHECK( 0, fd_msg_bufferize( cer, &buf, NULL ) ); /* Now free the message, we keep only the buffer. */ CHECK( 0, fd_msg_free( cer ) ); /* Check the content of the buffer is correct (skip command header) */ CHECK( 0x00, buf[20] ); /* First AVP (IP4) begins: code 257 = 0x00000101 */ CHECK( 0x00, buf[21] ); CHECK( 0x01, buf[22] ); CHECK( 0x01, buf[23] ); CHECK( 0x40, buf[24] ); /* flags: M */ CHECK( 0x00, buf[25] ); /* length: 8+6 = 0x00000e */ CHECK( 0x00, buf[26] ); CHECK( 0x0E, buf[27] ); CHECK( 0x00, buf[28] ); /* Value: AddressType 1 */ CHECK( 0x01, buf[29] ); CHECK( 192, buf[30] ); /* 192.168.100.101 */ CHECK( 168, buf[31] ); CHECK( 100, buf[32] ); CHECK( 101, buf[33] ); CHECK( 0x00, buf[34] ); /* Padding */ CHECK( 0x00, buf[35] ); CHECK( 0x00, buf[36] ); /* Second AVP (IP6) begins: code 257 = 0x00000101 */ CHECK( 0x00, buf[37] ); CHECK( 0x01, buf[38] ); CHECK( 0x01, buf[39] ); CHECK( 0x40, buf[40] ); /* flags: M */ CHECK( 0x00, buf[41] ); /* length: 8+18 = 0x00001a */ CHECK( 0x00, buf[42] ); CHECK( 0x1A, buf[43] ); CHECK( 0x00, buf[44] ); /* Value: AddressType 2 */ CHECK( 0x02, buf[45] ); CHECK( 0x11, buf[46] ); /* 1111:2222:3333:4444:1234:5678:9abc:def0 */ CHECK( 0x11, buf[47] ); CHECK( 0x22, buf[48] ); CHECK( 0x22, buf[49] ); CHECK( 0x33, buf[50] ); CHECK( 0x33, buf[51] ); CHECK( 0x44, buf[52] ); CHECK( 0x44, buf[53] ); CHECK( 0x12, buf[54] ); CHECK( 0x34, buf[55] ); CHECK( 0x56, buf[56] ); CHECK( 0x78, buf[57] ); CHECK( 0x9a, buf[58] ); CHECK( 0xbc, buf[59] ); CHECK( 0xde, buf[60] ); CHECK( 0xf0, buf[61] ); /* Ok, now let's recreate the message */ CHECK( 0, fd_msg_parse_buffer( &buf, 64, &cer) ); CHECK( 0, fd_msg_parse_dict( cer, fd_g_config->cnf_dict, NULL ) ); /* Get the pointers to the first and last AVP */ CHECK( 0, fd_msg_browse( cer, MSG_BRW_FIRST_CHILD, &avp4, NULL) ); CHECK( 0, fd_msg_browse( cer, MSG_BRW_LAST_CHILD, &avp6, NULL) ); /* Try and interpret the data in the AVPs */ CHECK( 0, fd_msg_avp_value_interpret ( avp4, &ss ) ); psin = (struct sockaddr_in *)&ss; CHECK( AF_INET, psin->sin_family ); CHECK( 0, (inet_ntop( AF_INET, &psin->sin_addr.s_addr, buf4, sizeof(buf4) ) == NULL) ? errno : 0 ); CHECK( 0, strcmp( buf4, TEST_IP4 ) ); CHECK( 0, fd_msg_avp_value_interpret ( avp6, &ss ) ); psin6 = (struct sockaddr_in6 *)&ss; CHECK( AF_INET6, psin6->sin6_family ); CHECK( 0, (inet_ntop( AF_INET6, &psin6->sin6_addr.s6_addr, buf6, sizeof(buf6) ) == NULL) ? errno : 0 ); CHECK( 0, strcasecmp( buf6, TEST_IP6 ) ); /* Ok, it's done */ CHECK( 0, fd_msg_free( cer ) ); } /* Check proper encoding / decoding for all basic types of AVP */ { { struct dict_avp_data avp_data = { 91001, 0, "AVP Test 2 - os", 0, 0, AVP_TYPE_OCTETSTRING }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , NULL, NULL ) ); } { struct dict_avp_data avp_data = { 91002, 0, "AVP Test 2 - i32", 0, 0, AVP_TYPE_INTEGER32 }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , NULL, NULL ) ); } { struct dict_avp_data avp_data = { 91003, 0, "AVP Test 2 - i64", 0, 0, AVP_TYPE_INTEGER64 }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , NULL, NULL ) ); } { struct dict_avp_data avp_data = { 91004, 0, "AVP Test 2 - u32", 0, 0, AVP_TYPE_UNSIGNED32 }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , NULL, NULL ) ); } { struct dict_avp_data avp_data = { 91005, 0, "AVP Test 2 - u64", 0, 0, AVP_TYPE_UNSIGNED64 }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , NULL, NULL ) ); } { struct dict_avp_data avp_data = { 91006, 0, "AVP Test 2 - f32", 0, 0, AVP_TYPE_FLOAT32 }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , NULL, NULL ) ); } { struct dict_avp_data avp_data = { 91007, 0, "AVP Test 2 - f64", 0, 0, AVP_TYPE_FLOAT64 }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , NULL, NULL ) ); } { struct dict_object * cmd_model = NULL; struct msg * msg = NULL; struct avp * avp = NULL; union avp_value value; struct avp * avpi = NULL; struct avp_hdr * avpdata = NULL; struct msg_hdr * msgdata = NULL; CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Test-Command-Request", &cmd_model, ENOENT ) ); /* Create a message */ CHECK( 0, fd_msg_new ( cmd_model, 0, &msg ) ); CHECK( 0, fd_msg_hdr ( msg, &msgdata ) ); ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 0, "AVP Test 2 - os" ); value.os.data = (unsigned char *) "waaad"; value.os.len = 6; CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) ); ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 0, "AVP Test 2 - i32" ); value.i32 = 0x123456; CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) ); ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 0, "AVP Test 2 - i32" ); value.i32 = -0x123456; CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) ); ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 0, "AVP Test 2 - i64" ); value.i64 = 0x11223344556677LL; CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) ); ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 0, "AVP Test 2 - i64" ); value.i64 = -0x11223344556677LL; CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) ); ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 0, "AVP Test 2 - u32" ); value.u32 = 0xFEDCBA98; CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) ); ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 0, "AVP Test 2 - u64" ); value.u64 = 0x123456789abcdef0LL; CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) ); ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 0, "AVP Test 2 - f32" ); value.f32 = 2097153.0F; CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) ); ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 0, "AVP Test 2 - f64" ); value.f64 = -1099511627777LL; CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) ); /* Ok now bufferize */ CHECK( 0, fd_msg_bufferize( msg, &buf, NULL ) ); /* Test the first bytes */ CHECK( 0x01, buf[0] ); /* Version */ CHECK( 0x00, buf[1] ); /* Length: 148 = 0x000094 */ CHECK( 0x00, buf[2] ); CHECK( 0x94, buf[3] ); CHECK( 0x80, buf[4] ); /* flags: only "R" is set. */ CHECK( 0x01, buf[5] ); /* Command code: 73573 = 0x011F65 */ CHECK( 0x1F, buf[6] ); CHECK( 0x65, buf[7] ); CHECK( 0x00, buf[8] ); /* App ID */ CHECK( 0x01, buf[9] ); CHECK( 0x1F, buf[10] ); CHECK( 0x5E, buf[11] ); CHECK( 0x00, buf[12] ); /* hop-by-hop id */ CHECK( 0x00, buf[13] ); CHECK( 0x00, buf[14] ); CHECK( 0x00, buf[15] ); CHECK( 0x00, buf[16] ); /* end-to-end id */ CHECK( 0x00, buf[17] ); CHECK( 0x00, buf[18] ); CHECK( 0x00, buf[19] ); CHECK( 0x00, buf[20] ); /* First AVP (AVP Test 2 - os) begin: code 91001 = 0x00016379 */ CHECK( 0x01, buf[21] ); CHECK( 0x63, buf[22] ); CHECK( 0x79, buf[23] ); CHECK( 0x00, buf[24] ); /* flags: 0 */ CHECK( 0x00, buf[25] ); /* length: 14 = 0x00000e */ CHECK( 0x00, buf[26] ); CHECK( 0x0e, buf[27] ); CHECK( 0x77, buf[28] ); /* "waaad\0" + padding */ CHECK( 0x61, buf[29] ); CHECK( 0x61, buf[30] ); CHECK( 0x61, buf[31] ); CHECK( 0x64, buf[32] ); CHECK( 0x00, buf[33] ); CHECK( 0x00, buf[34] ); CHECK( 0x00, buf[35] ); /* 36 ~ 43 : 2nd AVP header (size at last octet) */ CHECK( 0x0c, buf[43] ); CHECK( 0x00, buf[44] ); /* 0x123456 stored in integer32 in network byte order */ CHECK( 0x12, buf[45] ); CHECK( 0x34, buf[46] ); CHECK( 0x56, buf[47] ); /* 48 ~ 55 : next AVP header */ CHECK( 0xff, buf[56] ); /* -0x123456 stored in integer32 in network byte order. */ CHECK( 0xed, buf[57] ); /* We assume that two's complement is the correct representation, although it's not clearly specified. */ CHECK( 0xcb, buf[58] ); /* 00 12 34 56 inversed => FF ED CB A9 */ CHECK( 0xaa, buf[59] ); /* then "+1" => FF ED CB AA */ /* 60 ~ 67 : next header */ CHECK( 0x10, buf[67] ); /* (the size) */ CHECK( 0x00, buf[68] ); /* 0x11223344556677 in network byte order */ CHECK( 0x11, buf[69] ); CHECK( 0x22, buf[70] ); CHECK( 0x33, buf[71] ); CHECK( 0x44, buf[72] ); CHECK( 0x55, buf[73] ); CHECK( 0x66, buf[74] ); CHECK( 0x77, buf[75] ); /* 76 ~ 83 : next header */ CHECK( 0xFF, buf[84] ); /* - 0x11223344556677 (in two's complement) */ CHECK( 0xEE, buf[85] ); /* gives FF EE DD CC BB AA 99 89 */ CHECK( 0xDD, buf[86] ); CHECK( 0xCC, buf[87] ); CHECK( 0xBB, buf[88] ); CHECK( 0xAA, buf[89] ); CHECK( 0x99, buf[90] ); CHECK( 0x89, buf[91] ); /* 92 ~ 99 : next header */ CHECK( 0x0c, buf[99] ); /* (the size) */ CHECK( 0xFE, buf[100]); /* 0xFEDCBA98 in network byte order */ CHECK( 0xDC, buf[101]); CHECK( 0xBA, buf[102]); CHECK( 0x98, buf[103]); /* 104 ~ 111 : next header */ CHECK( 0x10, buf[111] ); /* (the size) */ CHECK( 0x12, buf[112]); /* 0x123456789abcdef0LL in network byte order */ CHECK( 0x34, buf[113]); CHECK( 0x56, buf[114]); CHECK( 0x78, buf[115]); CHECK( 0x9a, buf[116]); CHECK( 0xbc, buf[117]); CHECK( 0xde, buf[118]); CHECK( 0xf0, buf[119]); /* 120 ~ 127 : next header */ CHECK( 0x0c, buf[127] ); /* (the size) */ CHECK( 0x4a, buf[128]); /* http://en.wikipedia.org/wiki/IEEE_754-1985 to get descvription of the format */ CHECK( 0x00, buf[129]); /* v = 2097153 = 2^21 + 2 ^ 0; sign : "+", 2^21 <= v < 2^22 => exponent = 21; biaised on 8 bits => 21 + 127 => 100 1010 0 */ CHECK( 0x00, buf[130]); /* v = (+1) * (1 ^ 21) * ( 1 + 2^-21 ) => significand 000 0000 0000 0000 0000 0100 */ CHECK( 0x04, buf[131]); /* result: 4a 00 00 04 */ /* 132 ~ 139 : next header */ CHECK( 0x10, buf[139] ); /* (the size) */ CHECK( 0xc2, buf[140]); /* -1099511627777L ( 2^40 + 1 ) in network byte order */ CHECK( 0x70, buf[141]); /* sign: - => most significant bit = 1 */ CHECK( 0x00, buf[142]); /* 2^40 <= v < 2^41 => biaised exponent on 11 bits: 1023 + 40: 100 0010 0111 */ CHECK( 0x00, buf[143]); /* significand: 1 + 2^-40 => 0000 0000 0000 0000 0000 0000 0000 0000 0000 0001 0000 0000 0000 */ CHECK( 0x00, buf[144]); /* result: c2 70 00 00 00 00 10 00 */ CHECK( 0x00, buf[145]); CHECK( 0x10, buf[146]); CHECK( 0x00, buf[147]); /* Okay, now delete the message and parse the buffer, then check we obtain the same values back */ #if 0 fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, msg, fd_g_config->cnf_dict, 0, 1)); #endif CHECK( 0, fd_msg_free( msg ) ); CHECK( 0, fd_msg_parse_buffer( &buf, 148, &msg) ); CHECK( 0, fd_msg_parse_dict( msg, fd_g_config->cnf_dict, NULL ) ); #if 0 fd_log_debug("%s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, msg, fd_g_config->cnf_dict, 0, 1)); #endif CHECK( 0, fd_msg_browse ( msg, MSG_BRW_FIRST_CHILD, &avp, NULL) ); CHECK( 0, fd_msg_avp_hdr ( avp, &avpdata ) ); CHECK( 6, avpdata->avp_value->os.len ); CHECK( 'w', (char)(avpdata->avp_value->os.data[0]) ); CHECK( 'a', (char)(avpdata->avp_value->os.data[1]) ); CHECK( 'd', (char)(avpdata->avp_value->os.data[4]) ); CHECK( '\0', (char)(avpdata->avp_value->os.data[5]) ); CHECK( 0, fd_msg_browse ( avp, MSG_BRW_NEXT, &avp, NULL) ); CHECK( 0, fd_msg_avp_hdr ( avp, &avpdata ) ); CHECK( 0x123456, avpdata->avp_value->i32 ); CHECK( 0, fd_msg_browse ( avp, MSG_BRW_NEXT, &avp, NULL) ); CHECK( 0, fd_msg_avp_hdr ( avp, &avpdata ) ); CHECK( -0x123456, avpdata->avp_value->i32 ); CHECK( 0, fd_msg_browse ( avp, MSG_BRW_NEXT, &avp, NULL) ); CHECK( 0, fd_msg_avp_hdr ( avp, &avpdata ) ); CHECK( 0x11223344556677LL, avpdata->avp_value->i64 ); CHECK( 0, fd_msg_browse ( avp, MSG_BRW_NEXT, &avp, NULL) ); CHECK( 0, fd_msg_avp_hdr ( avp, &avpdata ) ); CHECK( -0x11223344556677LL, avpdata->avp_value->i64 ); CHECK( 0, fd_msg_browse ( avp, MSG_BRW_NEXT, &avp, NULL) ); CHECK( 0, fd_msg_avp_hdr ( avp, &avpdata ) ); CHECK( 0xFEDCBA98, avpdata->avp_value->u32 ); CHECK( 0, fd_msg_browse ( avp, MSG_BRW_NEXT, &avp, NULL) ); CHECK( 0, fd_msg_avp_hdr ( avp, &avpdata ) ); CHECK( 0x123456789abcdef0LL, avpdata->avp_value->u64 ); CHECK( 0, fd_msg_browse ( avp, MSG_BRW_NEXT, &avp, NULL) ); CHECK( 0, fd_msg_avp_hdr ( avp, &avpdata ) ); CHECK( 2097153.0F, avpdata->avp_value->f32 ); CHECK( 0, fd_msg_browse ( avp, MSG_BRW_NEXT, &avp, NULL) ); CHECK( 0, fd_msg_avp_hdr ( avp, &avpdata ) ); CHECK( -1099511627777LL, avpdata->avp_value->f64 ); CHECK( 0, fd_msg_free( msg ) ); } } /* That's all for the tests yet */ PASSTEST(); } nextepc-0.3.10/lib/freeDiameter-1.2.1/tests/testmesg_stress.c000066400000000000000000000644351333553357400236330ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "tests.h" #include #include #include #ifndef BUILD_DIR #error "Missing BUILD_DIR information" #endif /* BUILD_DIR */ /* The number of times each operation is repeated to measure the average operation time */ #define DEFAULT_NUMBER_OF_SAMPLES 100000 static void display_result(int nr, struct timespec * start, struct timespec * end, char * fct, char * type, char *op) { long double dur = (long double)end->tv_sec + (long double)end->tv_nsec/1000000000; dur -= (long double)start->tv_sec + (long double)start->tv_nsec/1000000000; long double thrp = (long double)nr / dur; printf("%-19s: %d %-8s %-7s in %.6LFs (%.1LFmsg/s)\n", fct, nr, type, op, dur, thrp); } struct ext_info { struct fd_list chain; /* link in the list */ void *handler; /* object returned by dlopen() */ int (*init_cb)(int, int, char *); char *ext_name; /* points to the extension name, either inside depends, or basename(filename) */ int free_ext_name; /* must be freed if it was malloc'd */ const char **depends; /* names of the other extensions this one depends on (if provided) */ }; static void load_all_extensions(char * prefix) { DIR *dir; struct dirent *dp; char fullname[512]; int pathlen; struct fd_list all_extensions = FD_LIST_INITIALIZER(all_extensions); struct fd_list ext_with_depends = FD_LIST_INITIALIZER(ext_with_depends); /* Find all extensions which have been compiled along the test */ LOG_D("Loading %s*.fdx from: '%s'", BUILD_DIR "/extensions", prefix ?: ""); CHECK( 0, (dir = opendir (BUILD_DIR "/extensions")) == NULL ? 1 : 0 ); pathlen = snprintf(fullname, sizeof(fullname), BUILD_DIR "/extensions/"); while ((dp = readdir (dir)) != NULL) { char * dot = strrchr(dp->d_name, '.'); if (dot && ((!prefix) || !(strncmp(dp->d_name, prefix, strlen(prefix)))) && (!(strcmp(dot, ".fdx")))) { /* We found a file with name dict_*.fdx, attempt to load it */ struct ext_info * new = malloc(sizeof(struct ext_info)); CHECK( 1, new ? 1:0); fd_list_init(&new->chain, new); snprintf(fullname + pathlen, sizeof(fullname) - pathlen, "%s", dp->d_name); LOG_D("Extension: '%s'", dp->d_name); /* load */ new->handler = dlopen(fullname, RTLD_NOW | RTLD_GLOBAL); if (!new->handler) { TRACE_DEBUG(INFO, "Unable to load '%s': %s.", fullname, dlerror()); } CHECK( 0, new->handler == NULL ? 1 : 0 ); /* resolve entry */ new->init_cb = dlsym( new->handler, "fd_ext_init" ); if (!new->init_cb) { TRACE_DEBUG(INFO, "No 'fd_ext_init' entry point in '%s': %s.", fullname, dlerror()); } CHECK( 0, new->init_cb == NULL ? 1 : 0 ); new->depends = dlsym( new->handler, "fd_ext_depends" ); if (new->depends) { new->ext_name = (char *)new->depends[0]; new->free_ext_name = 0; if ( new->depends[1] ) { fd_list_insert_before(&ext_with_depends, &new->chain); } else { fd_list_insert_before(&all_extensions, &new->chain); } } else { new->ext_name = strdup(basename(dp->d_name)); new->free_ext_name = 1; fd_list_insert_before(&all_extensions, &new->chain); } } } /* Now, reorder the list by dependencies */ { int count, prevcount = 0; struct fd_list * li; do { count = 0; for (li=ext_with_depends.next; li != &ext_with_depends; li=li->next) { struct ext_info * e = li->o; int d; int satisfied=0; /* Can we satisfy all dependencies? */ for (d=1; ;d++) { struct fd_list * eli; if (!e->depends[d]) { satisfied = 1; break; } /* can we find this dependency in the list? */ for (eli=all_extensions.next; eli != &all_extensions; eli = eli->next) { struct ext_info * de = eli->o; if (!strcasecmp(de->ext_name, e->depends[d])) break; /* this dependency is satisfied */ } if (eli == &all_extensions) { satisfied = 0; break; } } if (satisfied) { /* OK, we have all our dependencies in the list */ li=li->prev; fd_list_unlink(&e->chain); fd_list_insert_before(&all_extensions, &e->chain); } else { count++; } } if (prevcount && (prevcount == count)) { LOG_E("Some extensions cannot have their dependencies satisfied, e.g.: %s", ((struct ext_info *)ext_with_depends.next->o)->ext_name); CHECK(0, 1); } prevcount = count; if (FD_IS_LIST_EMPTY(&ext_with_depends)) break; } while (1); } /* Now, load all the extensions */ { struct fd_list * li; for (li=all_extensions.next; li != &all_extensions; li=li->next) { struct ext_info * e = li->o; int ret = (*e->init_cb)( FD_PROJECT_VERSION_MAJOR, FD_PROJECT_VERSION_MINOR, NULL ); LOG_N("Initializing extension '%s': %s", e->ext_name, ret ? strerror(ret) : "Success"); } } /* We should probably clean the list here ? */ } /* Main test routine */ int main(int argc, char *argv[]) { struct msg * acr = NULL; unsigned char * buf = NULL; int dictionaries_loaded = 0; test_parameter = DEFAULT_NUMBER_OF_SAMPLES; /* First, initialize the daemon modules */ INIT_FD(); CHECK( 0, fd_queues_init() ); CHECK( 0, fd_msg_init() ); CHECK( 0, fd_rtdisp_init() ); { struct dict_object * acr_model = NULL; /* Now find the ACR dictionary object */ CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Accounting-Request", &acr_model, ENOENT ) ); /* Create the instance, using the templates */ CHECK( 0, fd_msg_new ( acr_model, 0, &acr ) ); } /* Now let's create some additional Dictionary objects for the test */ { /* The constant values used here are totally arbitrary chosen */ struct dict_object * vendor; { struct dict_vendor_data vendor_data = { 73565, "Vendor test" }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_VENDOR, &vendor_data , NULL, &vendor ) ); } { struct dict_application_data app_data = { 73566, "Application test" }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_APPLICATION, &app_data , vendor, NULL ) ); } { struct dict_avp_data avp_data = { 73567, 0, "AVP Test - no vendor - f32", 0, 0, AVP_TYPE_FLOAT32 }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , NULL, NULL ) ); } { struct dict_avp_data avp_data = { 139103, 0, "AVP Test - no vendor - f64", 0, 0, AVP_TYPE_FLOAT64 }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , NULL, NULL ) ); } { struct dict_object * type = NULL; struct dict_type_data type_data = { AVP_TYPE_INTEGER64, "Int64 test" }; struct dict_avp_data avp_data = { 73568, 73565, "AVP Test - i64", AVP_FLAG_VENDOR, AVP_FLAG_VENDOR, AVP_TYPE_INTEGER64 }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_TYPE, &type_data , NULL, &type ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , type, NULL ) ); } { struct dict_object * type = NULL; struct dict_type_data type_data = { AVP_TYPE_INTEGER32, "Enum32 test" }; struct dict_enumval_data val1 = { "i32 const test (val 1)", { .i32 = 1 } }; struct dict_enumval_data val2 = { "i32 const test (val 2)", { .i32 = 2 } }; struct dict_enumval_data val3 = { "i32 const test (val -5)",{ .i32 = -5 } }; struct dict_avp_data avp_data = { 73569, 73565, "AVP Test - enumi32", AVP_FLAG_VENDOR, AVP_FLAG_VENDOR, AVP_TYPE_INTEGER32 }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_TYPE, &type_data , NULL, &type ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , type, NULL ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_ENUMVAL, &val1 , type, NULL ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_ENUMVAL, &val2 , type, NULL ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_ENUMVAL, &val3 , type, NULL ) ); } { struct dict_object * type = NULL; struct dict_type_data type_data = { AVP_TYPE_OCTETSTRING, "OS test" }; struct dict_avp_data avp_data = { 73570, 73565, "AVP Test - os", AVP_FLAG_VENDOR, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_TYPE, &type_data , NULL, &type ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , type, NULL ) ); } { struct dict_object * type = NULL; struct dict_type_data type_data = { AVP_TYPE_OCTETSTRING, "OS enum test" }; struct dict_enumval_data val1 = { "os const test (Test)", { .os = { (unsigned char *)"Test", 4 } } }; struct dict_enumval_data val2 = { "os const test (waaad)", { .os = { (unsigned char *)"waaad", 5 } } }; struct dict_enumval_data val3 = { "os const test (waa)", { .os = { (unsigned char *)"waaad", 3 } } }; struct dict_avp_data avp_data = { 73571, 73565, "AVP Test - enumos", AVP_FLAG_VENDOR, AVP_FLAG_VENDOR, AVP_TYPE_OCTETSTRING }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_TYPE, &type_data , NULL, &type ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , type, NULL ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_ENUMVAL, &val1 , type, NULL ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_ENUMVAL, &val2 , type, NULL ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_ENUMVAL, &val3 , type, NULL ) ); } { struct dict_object * gavp = NULL; struct dict_avp_data avp_data = { 73572, 73565, "AVP Test - grouped", AVP_FLAG_VENDOR, AVP_FLAG_VENDOR, AVP_TYPE_GROUPED }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , NULL, &gavp ) ); /* Macro to search AVP and create a rule */ #define ADD_RULE( _parent, _vendor, _avpname, _pos, _min, _max, _ord ) { \ struct dict_object * _avp = NULL; \ struct dict_avp_request _req = { (_vendor), 0, (_avpname) }; \ struct dict_rule_data _data; \ CHECK( 0, fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME_AND_VENDOR, &_req, &_avp, ENOENT));\ _data.rule_avp = _avp; \ _data.rule_position = (_pos); \ _data.rule_order = (_ord); \ _data.rule_min = (_min); \ _data.rule_max = (_max); \ CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_RULE, &_data , (_parent), NULL ) ); \ } ADD_RULE(gavp, 73565, "AVP Test - os", RULE_OPTIONAL, -1, -1, 0); } { struct dict_object * application = NULL; struct dict_object * command = NULL; struct dict_cmd_data cmd_data = { 73573, "Test-Command-Request", CMD_FLAG_REQUEST, CMD_FLAG_REQUEST }; CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_APPLICATION, APPLICATION_BY_NAME, "Application test", &application, ENOENT ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_COMMAND, &cmd_data , application, &command ) ); ADD_RULE(command, 0, "AVP Test - no vendor - f32", RULE_FIXED_HEAD, -1, 1, 1); ADD_RULE(command, 73565, "AVP Test - i64", RULE_REQUIRED, -1, -1, 0); ADD_RULE(command, 73565, "AVP Test - enumi32", RULE_OPTIONAL, -1, -1, 0); ADD_RULE(command, 73565, "AVP Test - os", RULE_OPTIONAL, -1, -1, 0); ADD_RULE(command, 73565, "AVP Test - enumos", RULE_OPTIONAL, -1, -1, 0); ADD_RULE(command, 73565, "AVP Test - grouped", RULE_OPTIONAL, -1, -1, 0); } { struct dict_object * application = NULL; struct dict_object * command = NULL; struct dict_cmd_data cmd_data = { 73573, "Test-Command-Answer", CMD_FLAG_REQUEST, 0 }; CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_APPLICATION, APPLICATION_BY_NAME, "Application test", &application, ENOENT ) ); CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_COMMAND, &cmd_data , application, &command ) ); } { struct dict_object * gavp = NULL; struct dict_avp_data avp_data = { 73574, 73565, "AVP Test - rules", AVP_FLAG_VENDOR, AVP_FLAG_VENDOR, AVP_TYPE_GROUPED }; CHECK( 0, fd_dict_new ( fd_g_config->cnf_dict, DICT_AVP, &avp_data , NULL, &gavp ) ); ADD_RULE(gavp, 0, "AVP Test - no vendor - f32", RULE_FIXED_HEAD, 0, 1, 1); ADD_RULE(gavp, 73565, "AVP Test - i64", RULE_FIXED_HEAD, -1, 1, 2); ADD_RULE(gavp, 73565, "AVP Test - enumi32", RULE_FIXED_HEAD, -1, 1, 3); ADD_RULE(gavp, 73565, "AVP Test - os", RULE_REQUIRED, 2, 3, 0); ADD_RULE(gavp, 73565, "AVP Test - enumos", RULE_OPTIONAL, 0, 1, 0); ADD_RULE(gavp, 73565, "AVP Test - grouped", RULE_FIXED_TAIL, -1, 1, 1); /* ABNF : < no vendor - f32 > < i64 > < enumi32 > 2*3 { os } *1 [ enumos ] < grouped > */ } } /* Now create some values and check the length is correctly handled */ { struct dict_object * cmd_model = NULL; struct msg * msg = NULL; struct dict_object * avp_model = NULL; union avp_value value; CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_COMMAND, CMD_BY_NAME, "Test-Command-Request", &cmd_model, ENOENT ) ); /* Check the sizes are handled properly */ { struct avp * avpi = NULL; struct avp * avpch = NULL; struct msg_hdr * msgdata = NULL; #define ADD_AVP( _parent, _position, _avpi, _avpvendor, _avpname) { \ struct dict_object * _avp = NULL; \ struct dict_avp_request _req = { (_avpvendor), 0, (_avpname) }; \ CHECK( 0, fd_dict_search( fd_g_config->cnf_dict, DICT_AVP, AVP_BY_NAME_AND_VENDOR, &_req, &_avp, ENOENT));\ CHECK( 0, fd_msg_avp_new ( _avp, 0, &_avpi ) ); \ CHECK( 0, fd_msg_avp_add ( (_parent), (_position), _avpi ) ); \ } /* Create a message with many AVP inside */ CHECK( 0, fd_msg_new ( cmd_model, 0, &msg ) ); CHECK( 0, fd_msg_hdr ( msg, &msgdata ) ); /* Avp no vendor, float32 => size = 12 */ ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 0, "AVP Test - no vendor - f32" ); value.f32 = 3.1415; CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) ); /* Add a vendor AVP, integer64 => size = 20 */ ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - i64" ); value.i64 = 0x123456789abcdeLL; CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) ); /* Add an AVP with an enum value */ ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - enumi32" ); { struct dict_object * type_model = NULL; struct dict_object * value_model = NULL; struct dict_enumval_request request; CHECK( 0, fd_msg_model ( avpi, &avp_model ) ); CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_TYPE, TYPE_OF_AVP, avp_model, &type_model, ENOENT ) ); memset(&request, 0, sizeof(request)); request.type_obj = type_model; request.search.enum_name = "i32 const test (val 2)"; CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_ENUMVAL, ENUMVAL_BY_STRUCT, &request, &value_model, ENOENT ) ); CHECK( 0, fd_dict_getval ( value_model, &request.search ) ); CHECK( 0, fd_msg_avp_setvalue ( avpi, &request.search.enum_value ) ); } /* Add an AVP with an enum value, negative */ ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - enumi32" ); { struct dict_object * type_model = NULL; struct dict_object * value_model = NULL; struct dict_enumval_request request; CHECK( 0, fd_msg_model ( avpi, &avp_model ) ); CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_TYPE, TYPE_OF_AVP, avp_model, &type_model, ENOENT ) ); memset(&request, 0, sizeof(request)); request.type_obj = type_model; request.search.enum_name = "i32 const test (val -5)"; CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_ENUMVAL, ENUMVAL_BY_STRUCT, &request, &value_model, ENOENT ) ); CHECK( 0, fd_dict_getval ( value_model, &request.search ) ); CHECK( 0, fd_msg_avp_setvalue ( avpi, &request.search.enum_value ) ); } /* Now add a value which is not a constant into an enumerated AVP */ ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - enumi32" ); value.i32 = -10; CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) ); /* Add an octetstring AVP */ ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - os" ); { unsigned char buf[90]; memcpy(&buf, "This\0 is a buffer of dat\a. It is not a string so we can have any c\0ntr\0l character here...\0\0", 89); value.os.data = buf; value.os.len = 89; CHECK( 0, fd_msg_avp_setvalue ( avpi, &value ) ); memset(&buf, 0, sizeof(buf)); /* Test that the OS value is really copied */ } /* Add an octetstring from an enumerated constant */ ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - enumos" ); { struct dict_object * type_model = NULL; struct dict_object * value_model = NULL; struct dict_enumval_request request; CHECK( 0, fd_msg_model ( avpi, &avp_model ) ); CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_TYPE, TYPE_OF_AVP, avp_model, &type_model, ENOENT ) ); memset(&request, 0, sizeof(request)); request.type_obj = type_model; request.search.enum_name = "os const test (waaad)"; CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_ENUMVAL, ENUMVAL_BY_STRUCT, &request, &value_model, ENOENT ) ); CHECK( 0, fd_dict_getval ( value_model, &request.search ) ); CHECK( 0, fd_msg_avp_setvalue ( avpi, &request.search.enum_value ) ); } /* Add an octetstring from an enumerated constant */ ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - enumos" ); { struct dict_object * type_model = NULL; struct dict_object * value_model = NULL; struct dict_enumval_request request; CHECK( 0, fd_msg_model ( avpi, &avp_model ) ); CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_TYPE, TYPE_OF_AVP, avp_model, &type_model, ENOENT ) ); memset(&request, 0, sizeof(request)); request.type_obj = type_model; request.search.enum_name = "os const test (waa)"; CHECK( 0, fd_dict_search ( fd_g_config->cnf_dict, DICT_ENUMVAL, ENUMVAL_BY_STRUCT, &request, &value_model, ENOENT ) ); CHECK( 0, fd_dict_getval ( value_model, &request.search ) ); CHECK( 0, fd_msg_avp_setvalue ( avpi, &request.search.enum_value ) ); } /* Now test the grouped AVPs */ ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - grouped" ); ADD_AVP( avpi, MSG_BRW_LAST_CHILD, avpch, 73565, "AVP Test - os" ); { value.os.data = (unsigned char *)"12345678"; value.os.len = 8; CHECK( 0, fd_msg_avp_setvalue ( avpch, &value ) ); } ADD_AVP( avpi, MSG_BRW_LAST_CHILD, avpch, 73565, "AVP Test - os" ); { value.os.data = (unsigned char *)"123456789"; value.os.len = 9; CHECK( 0, fd_msg_avp_setvalue ( avpch, &value ) ); } /* Add another similar grouped AVP, to have lot of padding */ ADD_AVP( msg, MSG_BRW_LAST_CHILD, avpi, 73565, "AVP Test - grouped" ); ADD_AVP( avpi, MSG_BRW_LAST_CHILD, avpch, 73565, "AVP Test - os" ); { value.os.data = (unsigned char *)"1"; value.os.len = 1; CHECK( 0, fd_msg_avp_setvalue ( avpch, &value ) ); } ADD_AVP( avpi, MSG_BRW_LAST_CHILD, avpch, 73565, "AVP Test - os" ); { value.os.data = (unsigned char *)"1234567"; value.os.len = 7; CHECK( 0, fd_msg_avp_setvalue ( avpch, &value ) ); } /* Set the application to the test application: 73566 */ msgdata->msg_appl = 73566; /* Set the hop-by-hop ID to a random value: 0x4b44b41d */ msgdata->msg_hbhid = 0x4b44b41d; /* Set the end-to-end ID to a random value: 0xe2ee2e1d */ msgdata->msg_eteid = 0xe2ee2e1d; } CHECK( 0, fd_msg_bufferize( msg, &buf, NULL ) ); LOG_D( "Test message: %s", fd_msg_dump_treeview(FD_DUMP_TEST_PARAMS, msg, NULL, 0, 1)); /* Now free the message, we keep only the buffer. */ CHECK( 0, fd_msg_free( msg ) ); } /* We have our "buf" now, length is 344 -- cf. testmesg.c. */ redo: /* Test the throughput of the different functions function */ { struct stress_struct { struct msg * m; uint8_t * b; } * stress_array; int i; struct timespec start, end; /* Create the copies of the message buffer */ stress_array = calloc(test_parameter, sizeof(struct stress_struct)); CHECK( stress_array ? 1 : 0, 1); for (i=0; i < test_parameter; i++) { stress_array[i].b = malloc(344); if (!stress_array[i].b) break; memcpy(stress_array[i].b, buf, 344); } CHECK( test_parameter, i ); /* if false, a malloc failed */ /* fd_msg_parse_buffer */ CHECK( 0, clock_gettime(CLOCK_REALTIME, &start) ); /* Test the msg_parse_buffer function */ for (i=0; i < test_parameter; i++) { if (0 != fd_msg_parse_buffer( &stress_array[i].b, 344, &stress_array[i].m) ) break; } CHECK( test_parameter, i ); /* if false, a call failed */ CHECK( 0, clock_gettime(CLOCK_REALTIME, &end) ); display_result(test_parameter, &start, &end, "fd_msg_parse_buffer", "buffers", "parsed"); /* fd_msg_parse_dict */ CHECK( 0, clock_gettime(CLOCK_REALTIME, &start) ); /* Test the fd_msg_parse_dict function */ for (i=0; i < test_parameter; i++) { if (0 != fd_msg_parse_dict( stress_array[i].m, fd_g_config->cnf_dict, NULL ) ) break; } CHECK( test_parameter, i ); /* if false, a call failed */ CHECK( 0, clock_gettime(CLOCK_REALTIME, &end) ); display_result(test_parameter, &start, &end, "fd_msg_parse_dict", "messages", "parsed"); /* fd_msg_parse_rules */ CHECK( 0, clock_gettime(CLOCK_REALTIME, &start) ); /* Test the fd_msg_parse_rules function */ for (i=0; i < test_parameter; i++) { if (0 != fd_msg_parse_rules( stress_array[i].m, fd_g_config->cnf_dict, NULL ) ) break; } CHECK( test_parameter, i ); /* if false, a call failed */ CHECK( 0, clock_gettime(CLOCK_REALTIME, &end) ); display_result(test_parameter, &start, &end, "fd_msg_parse_rules", "messages", "parsed"); /* fd_msg_new_answer_from_req (0) */ CHECK( 0, clock_gettime(CLOCK_REALTIME, &start) ); /* Test the fd_msg_new_answer_from_req function */ for (i=0; i < test_parameter; i++) { if (0 != fd_msg_new_answer_from_req( fd_g_config->cnf_dict, &stress_array[i].m, 0 ) ) break; } CHECK( test_parameter, i ); /* if false, a call failed */ CHECK( 0, clock_gettime(CLOCK_REALTIME, &end) ); display_result(test_parameter, &start, &end, "new_answer(normal)", "messages", "created"); /* unlink answers and go back to request messages */ for (i=0; i < test_parameter; i++) { struct msg * ans = stress_array[i].m; if (0 != fd_msg_answ_getq( ans, &stress_array[i].m ) ) break; if (0 != fd_msg_answ_detach( ans ) ) break; fd_msg_free( ans ); } CHECK( test_parameter, i ); /* if false, a call failed */ /* fd_msg_new_answer_from_req (MSGFL_ANSW_ERROR) */ CHECK( 0, clock_gettime(CLOCK_REALTIME, &start) ); /* Test the fd_msg_new_answer_from_req function */ for (i=0; i < test_parameter; i++) { if ( 0 != fd_msg_new_answer_from_req( fd_g_config->cnf_dict, &stress_array[i].m, MSGFL_ANSW_ERROR ) ) break; } CHECK( test_parameter, i ); /* if false, a call failed */ CHECK( 0, clock_gettime(CLOCK_REALTIME, &end) ); display_result(test_parameter, &start, &end, "new_answer(error)", "messages", "created"); /* unlink answers and go back to request messages */ for (i=0; i < test_parameter; i++) { struct msg * ans = stress_array[i].m; if (0 != fd_msg_answ_getq( ans, &stress_array[i].m ) ) break; if (0 != fd_msg_answ_detach( ans ) ) break; fd_msg_free( ans ); } /* fd_msg_bufferize */ CHECK( 0, clock_gettime(CLOCK_REALTIME, &start) ); /* Test the fd_msg_bufferize function */ for (i=0; i < test_parameter; i++) { size_t len = 0; if (0 != fd_msg_bufferize( stress_array[i].m, &stress_array[i].b, &len ) ) break; } CHECK( test_parameter, i ); /* if false, a call failed */ CHECK( 0, clock_gettime(CLOCK_REALTIME, &end) ); display_result(test_parameter, &start, &end, "fd_msg_bufferize", "buffers", "created"); /* fd_msg_free */ CHECK( 0, clock_gettime(CLOCK_REALTIME, &start) ); /* Free those messages */ for (i=0; i < test_parameter; i++) { fd_msg_free( stress_array[i].m ); } CHECK( 0, clock_gettime(CLOCK_REALTIME, &end) ); display_result(test_parameter, &start, &end, "fd_msg_free", "messages", "freed"); for (i=0; i < test_parameter; i++) { free(stress_array[i].b); } free(stress_array); } if (!dictionaries_loaded) { load_all_extensions("dict_"); dictionaries_loaded = 1; printf("Loaded all dictionary extensions, restarting...\n"); goto redo; } /* That's all for the tests yet */ PASSTEST(); } nextepc-0.3.10/lib/freeDiameter-1.2.1/tests/testostr.c000066400000000000000000000166131333553357400222570ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2011, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "tests.h" #define TEST_STR (os0_t)"This is my test string (with extra unused data)" /* The following string contains UTF-8 encoded characters (Chinese characters) */ #define TEST_IDN_UTF8 "freeDiameter.中国" #define TEST_IDN_CONV "freeDiameter.xn--fiqs8s" /* Main test routine */ int main(int argc, char *argv[]) { /* First, initialize the daemon modules */ INIT_FD(); /* Check the hash function */ { uint8_t buf[30]; uint32_t hash = fd_os_hash(TEST_STR, CONSTSTRLEN(TEST_STR)); /* reference value */ /* Check that a hash of a substring / surstring is different */ CHECK( 1, hash != fd_os_hash(TEST_STR, CONSTSTRLEN(TEST_STR) - 1) ? 1 : 0 ); CHECK( 1, hash != fd_os_hash(TEST_STR, CONSTSTRLEN(TEST_STR) + 1) ? 1 : 0 ); /* Check alignment of the string is not important */ memcpy(buf + 4, TEST_STR, CONSTSTRLEN(TEST_STR)); CHECK( hash, fd_os_hash(buf + 4, CONSTSTRLEN(TEST_STR)) ); memcpy(buf + 3, TEST_STR, CONSTSTRLEN(TEST_STR)); CHECK( hash, fd_os_hash(buf + 3, CONSTSTRLEN(TEST_STR)) ); memcpy(buf + 2, TEST_STR, CONSTSTRLEN(TEST_STR)); CHECK( hash, fd_os_hash(buf + 2, CONSTSTRLEN(TEST_STR)) ); memcpy(buf + 1, TEST_STR, CONSTSTRLEN(TEST_STR)); CHECK( hash, fd_os_hash(buf + 1, CONSTSTRLEN(TEST_STR)) ); } /* Check the Diameter Identity functions */ { char * res; size_t len=0; /* A valid ASCII domain name */ res = TEST_IDN_CONV; CHECK( 0, fd_os_validate_DiameterIdentity(&res, &len, 1) ); CHECK( 0, strcasecmp(res, TEST_IDN_CONV) ); /* the function does not change a valid DN */ CHECK( 0, fd_os_validate_DiameterIdentity(&res, &len, 0) ); CHECK( 0, strcasecmp(res, TEST_IDN_CONV) ); CHECK( CONSTSTRLEN(TEST_IDN_CONV), len ); free(res); /* Now, an invalid string */ res = TEST_IDN_UTF8; len = 0; #ifdef DIAMID_IDNA_IGNORE /* The UTF-8 chars are considered valid */ CHECK( 1, fd_os_is_valid_DiameterIdentity((os0_t)TEST_IDN_UTF8, CONSTSTRLEN(TEST_IDN_UTF8) ) ); /* The string should be passed unmodified */ CHECK( 0, fd_os_validate_DiameterIdentity(&res, &len, 1) ); CHECK( 0, strcasecmp(res, TEST_IDN_UTF8) ); CHECK( 0, fd_os_cmp(res, len, TEST_IDN_UTF8, CONSTSTRLEN(TEST_IDN_UTF8)) ); CHECK( 0, fd_os_almostcasesrch(res, len, TEST_IDN_UTF8, CONSTSTRLEN(TEST_IDN_UTF8), NULL) ); CHECK( 0, fd_os_validate_DiameterIdentity(&res, &len, 0) ); CHECK( 0, strcasecmp(res, TEST_IDN_UTF8) ); CHECK( CONSTSTRLEN(TEST_IDN_UTF8), len ); free(res); #else /* DIAMID_IDNA_IGNORE */ /* The UTF-8 chars are recognized as invalid DiameterIdentity */ CHECK( 0, fd_os_is_valid_DiameterIdentity((os0_t)TEST_IDN_UTF8, CONSTSTRLEN(TEST_IDN_UTF8) )); # ifdef DIAMID_IDNA_REJECT /* The string must be rejected */ CHECK( EINVAL, fd_os_validate_DiameterIdentity(&res, &len, 1) ); # else /* DIAMID_IDNA_REJECT */ /* The string should be transformed into TEST_IDN_CONV */ CHECK( 0, fd_os_validate_DiameterIdentity(&res, &len, 1) ); CHECK( 0, strcasecmp(res, TEST_IDN_CONV) ); CHECK( CONSTSTRLEN(TEST_IDN_CONV), len ); free(res); # endif /* DIAMID_IDNA_REJECT */ #endif /* DIAMID_IDNA_IGNORE */ } { /* test fd_os_cmp and fd_os_almostcasesrch and that they are compatible */ char *t1 = "a"; char *t2 = "b"; char *t3 = "C"; char *t4 = "d"; char *t5 = "aa"; char *t6 = "aB"; char *t7 = "Ac"; char *t8 = "aD"; char *t9 = "AAA"; char *t5b = "Aa"; char *t6b = "ab"; /* First, create a list with all the elements in order given by fd_os_cmp */ char *t[] = { t1, t2, t3, t4, t5, t6,t7, t8, t9 }; int i; struct fd_list *li, l = FD_LIST_INITIALIZER(l); for (i = 0; i < sizeof(t) / sizeof(t[0]); i++) { /* insert t[i] */ struct fd_list *n = malloc(sizeof(struct fd_list)); CHECK( 1, n ? 1 : 0 ); fd_list_init(n, t[i]); for (li = l.next; li != &l; li = li->next) { if ( fd_os_cmp(t[i], strlen(t[i]), li->o, strlen(li->o)) < 0 ) break; } fd_list_insert_before(li, n); } /* in principle the result is: [ "C", "a", "b", "d", "Ac", "aB", "aD", "aa", "AAA" ] */ /* Since there is no equal value in the list (even case-insensitive), check that the order is valid also for the caseinsensitive variant */ for (li = l.next; li != l.prev; li = li->next) { CHECK( 1, fd_os_almostcasesrch(li->o, strlen(li->o), li->next->o, strlen(li->next->o), NULL) < 0 ? 1 : 0 ); } /* Now check that we can case-insentively find t5b and t6b to be equal to t5 and t6 resp. (this is how we use it in the daemon) */ for (li = l.next; li != &l; li = li->next) { int cont, cmp; cmp = fd_os_almostcasesrch(t5b, strlen(t5b), li->o, strlen(li->o), &cont); TRACE_DEBUG(FULL, "Comp '%s' : %d, %d", (char *)li->o, cmp, cont); if (cmp == 0) break; if (!cont) break; } CHECK( li->o, t5 ); for (li = l.next; li != &l; li = li->next) { int cont, cmp; cmp = fd_os_almostcasesrch(t6b, strlen(t6b), li->o, strlen(li->o), &cont); TRACE_DEBUG(FULL, "Comp '%s' : %d, %d", (char *)li->o, cmp, cont); if (cmp == 0) break; if (!cont) break; } CHECK( li->o, t6 ); /* done */ while (!FD_IS_LIST_EMPTY(&l)) { li = l.next; fd_list_unlink(li); free(li); } } /* That's all for the tests yet */ PASSTEST(); } nextepc-0.3.10/lib/freeDiameter-1.2.1/tests/testpeers.c000066400000000000000000000065651333553357400224130ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "tests.h" const char * ids[] = { "b11", "b14", "b1", "b4" }; #define DomainName "localdomain" /* Main test routine */ int main(int argc, char *argv[]) { /* First, initialize the daemon modules */ INIT_FD(); /* Create 4 peers with these ids */ { int i; struct peer_info inf; char locid[255]; memset(&inf, 0, sizeof(inf)); inf.pi_diamid = (char *)locid; for (i=0; i < sizeof(ids) / sizeof(ids[0]); i++) { snprintf(locid, sizeof(locid), "%s." DomainName, ids[i]); CHECK( 0, fd_peer_add(&inf, __FILE__, NULL, NULL)); } } fd_log_debug("%s", fd_peer_dump_list(FD_DUMP_TEST_PARAMS, 0)); /* Check we are able to find again any of these */ { int i; char locid[255]; struct peer_hdr *p; for (i=0; i < sizeof(ids) / sizeof(ids[0]); i++) { snprintf(locid, sizeof(locid), "%s." DomainName, ids[i]); CHECK( 0, fd_peer_getbyid((DiamId_t)locid, strlen((char *)locid), 0, &p)); CHECK( 0, strcmp((char *)locid, p->info.pi_diamid)); CHECK( 0, fd_peer_getbyid((DiamId_t)locid, strlen((char *)locid), 1, &p)); CHECK( 0, strcmp((char *)locid, p->info.pi_diamid)); } } /* That's all for the tests yet */ PASSTEST(); } nextepc-0.3.10/lib/freeDiameter-1.2.1/tests/tests.h000066400000000000000000000165461333553357400215440ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ /* This file contains the definition of our test harness. * The harness is very simple yet. * It may be interessant to go to dejagnu later... * */ #ifndef _TESTS_H #define _TESTS_H #include "fdproto-internal.h" #include "fdcore-internal.h" #include #include GCC_DIAG_OFF("-Wdeprecated-declarations") #include GCC_DIAG_ON("-Wdeprecated-declarations") /* Test timeout duration, unless -n is passed on the command line */ #ifndef TEST_TIMEOUT #define TEST_TIMEOUT 120 /* in seconds */ #endif /* TEST_TIMEOUT */ /* Standard includes */ #include #include #include #include /* Define the return code values */ #define PASS 0 #define FAIL 1 /* Define the macro to fail a test with a message */ #define FAILTEST( message... ){ \ LOG_F(message); \ LOG_F("FAILED: %s ", __STRIPPED_FILE__); \ free(tbuf); \ exit(FAIL); \ } /* Define the macro to pass a test */ #define PASSTEST( ){ \ LOG_N("PASS: %s", __STRIPPED_FILE__); \ (void)fd_core_shutdown(); \ (void)fd_core_wait_shutdown_complete(); \ (void)fd_thr_term(&signal_thr); \ free(tbuf); \ exit(PASS); \ } static struct fd_config conf; extern struct fd_config * fd_g_config; /* for dumps */ static char * tbuf = NULL; size_t tbuflen = 0; #define FD_DUMP_TEST_PARAMS &tbuf, &tbuflen, NULL /* Define the standard check routines */ #define CHECK( _val, _assert ){ \ LOG_D("CHECK( %s == %s )", \ #_assert, \ #_val); \ { \ __typeof__ (_val) __ret = (_assert); \ if (__ret != (_val)) { \ FAILTEST( "%s:%d: CHECK FAILED : %s == %lx != %lx", \ __STRIPPED_FILE__, \ __LINE__, \ #_assert, \ (unsigned long)__ret, \ (unsigned long)(_val)); \ }} \ } static pthread_t signal_thr; static void * signal_catch(void * arg) { int sig; sigset_t ss; fd_log_threadname ( "Signal catcher" ); sigemptyset(&ss); /* We use SIGALRM */ sigaddset(&ss, SIGALRM); /* Unblock any other signal for this thread, so that default handler is enabled */ CHECK_SYS_DO( pthread_sigmask( SIG_SETMASK, &ss, NULL ), ); /* Now wait for sigwait or cancelation */ CHECK_POSIX_DO( sigwait(&ss, &sig), ); FAILTEST("The timeout (" _stringize(TEST_TIMEOUT) " sec) was reached. Use -n or change TEST_TIMEOUT if the test needs more time to execute."); return NULL; } GCRY_THREAD_OPTION_PTHREAD_IMPL; /* gnutls debug. */ static void fd_gnutls_debug(int level, const char * str) { const char * __thn = ((char *)pthread_getspecific(fd_log_thname) ?: "unnamed"); fd_log_debug("tid:%-20s[gnutls:%d] %s", __thn, level, str); } static int gnutls_debug = 0; static int test_parameter = 0; static inline void parse_cmdline(int argc, char * argv[]) { int c; int no_timeout = 0; while ((c = getopt (argc, argv, "dqnf:F:g:p:")) != -1) { switch (c) { case 'd': /* Increase verbosity of debug messages. */ fd_g_debug_lvl--; break; case 'q': /* Decrease verbosity. */ fd_g_debug_lvl++; break; case 'n': /* Disable the timeout of the test. */ no_timeout = 1; break; case 'f': /* Full debug for the function with this name. */ #ifdef DEBUG fd_debug_one_function = optarg; #else /* DEBUG */ TRACE_DEBUG(INFO, "Error: must compile with DEBUG support to use this feature"); #endif /* DEBUG */ break; case 'F': /* Full debug for the functions in file with this name. */ #ifdef DEBUG fd_debug_one_file = optarg; #else /* DEBUG */ TRACE_DEBUG(INFO, "Error: must compile with DEBUG support to use this feature"); #endif /* DEBUG */ break; case 'g': /* Set a debug level and function for GNU TLS calls. */ gnutls_debug = (int)atoi(optarg); break; case 'p': /* Set a debug level and function for GNU TLS calls. */ test_parameter = (int)atoi(optarg); break; default: /* bug: option not considered. */ return; } } if (!no_timeout) { alarm(TEST_TIMEOUT); } CHECK( 0, pthread_create(&signal_thr, NULL, signal_catch, NULL) ); } static inline void test_init(int argc, char * argv[], char *fname) { sigset_t sig_all; sigfillset(&sig_all); CHECK( 0, pthread_sigmask(SIG_BLOCK, &sig_all, NULL)); fd_g_config = &conf; memset(fd_g_config, 0, sizeof(struct fd_config)); CHECK( 0, fd_libproto_init() ); CHECK( 0, fd_hooks_init() ); fd_log_threadname(fname); /* Parse the command line */ parse_cmdline(argc, argv); /* Initialize gcrypt and gnutls */ (void) gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); (void) gcry_control (GCRYCTL_ENABLE_QUICK_RANDOM, 0); CHECK( 0, gnutls_global_init()); /* Set gnutls debug level ? */ if (gnutls_debug) { gnutls_global_set_log_function((gnutls_log_func)fd_gnutls_debug); gnutls_global_set_log_level (gnutls_debug); TRACE_DEBUG(INFO, "Enabled GNUTLS debug at level %d", gnutls_debug); } /* Initialize the config */ CHECK( 0, fd_conf_init() ); /* Add definitions of the base protocol */ CHECK( 0, fd_dict_base_protocol(fd_g_config->cnf_dict) ); /* Initialize only the sessions */ CHECK( 0, fd_sess_start() ); return; } #define INIT_FD() test_init(argc, argv, __STRIPPED_FILE__) #endif /* _TESTS_H */ nextepc-0.3.10/lib/freeDiameter-1.2.1/tests/testsctp.c000066400000000000000000000114541333553357400222370ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "tests.h" #include #ifndef TEST_PORT #define TEST_PORT 3868 #endif /* TEST_PORT */ #ifndef NB_STREAMS #define NB_STREAMS 10 #endif /* NB_STREAMS */ /* Main test routine */ int main(int argc, char *argv[]) { #ifdef DISABLE_SCTP INIT_FD(); /* In this case, we don't perform this simple test */ PASSTEST(); #else /* DISABLE_SCTP */ struct cnxctx cli, srv; /* we use only their cc_socket & cc_state */ int sock; char buf1[]="abcdef"; char *buf2; size_t sz; struct iovec iov; struct fd_list eps = FD_LIST_INITIALIZER(eps); uint16_t str; int ev; /* Initialize the server addresses */ { struct addrinfo hints, *ai, *aip; memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_NUMERICSERV; hints.ai_family = AF_INET; CHECK( 0, getaddrinfo("localhost", _stringize(TEST_PORT), &hints, &ai) ); aip = ai; while (aip) { CHECK( 0, fd_ep_add_merge( &eps, aip->ai_addr, aip->ai_addrlen, EP_FL_DISC | EP_ACCEPTALL )); aip = aip->ai_next; }; freeaddrinfo(ai); CHECK( 0, FD_IS_LIST_EMPTY(&eps) ? 1 : 0 ); } memset(&cli, 0, sizeof(cli)); memset(&srv, 0, sizeof(srv)); /* First, initialize the daemon modules */ INIT_FD(); /* Restrain the # of streams */ fd_g_config->cnf_sctp_str = NB_STREAMS; /* Create the server socket */ CHECK( 0, fd_sctp_create_bind_server( &sock, AF_INET6, &eps, TEST_PORT )); /* Accept incoming clients */ CHECK( 0, fd_sctp_listen( sock )); /* Now, create the client socket */ CHECK( 0, fd_sctp_client( &cli.cc_socket, 0, TEST_PORT, &eps )); /* Accept this connection */ srv.cc_socket = accept(sock, NULL, NULL); /* Send a first message */ iov.iov_base = buf1; iov.iov_len = sizeof(buf1); CHECK( sizeof(buf1), fd_sctp_sendstrv(&srv, 1, &iov, 1 ) ); CHECK( 0, srv.cc_state); /* Receive this message */ redo1: CHECK( 0, fd_sctp_recvmeta(&cli, &str, (uint8_t **)&buf2, &sz, &ev) ); if (ev == FDEVP_CNX_EP_CHANGE) goto redo1; CHECK( FDEVP_CNX_MSG_RECV, ev); CHECK( 0, cli.cc_state); CHECK( 1, str); CHECK( sizeof(buf1), sz ); CHECK( 0, memcmp(buf1, buf2, sz) ); free(buf2); buf2 = NULL; /* Send in the other direction */ CHECK( sizeof(buf1), fd_sctp_sendstrv(&cli, 2, &iov, 1) ); CHECK( 0, cli.cc_state); /* Receive this message */ redo2: CHECK( 0, fd_sctp_recvmeta(&srv, &str, (uint8_t **)&buf2, &sz, &ev) ); if (ev == FDEVP_CNX_EP_CHANGE) goto redo2; CHECK( FDEVP_CNX_MSG_RECV, ev); CHECK( 0, srv.cc_state); CHECK( 2, str); CHECK( sizeof(buf1), sz ); CHECK( 0, memcmp(buf1, buf2, sz) ); free(buf2); buf2 = NULL; /* That's all for the tests yet */ PASSTEST(); #endif /* DISABLE_SCTP */ } nextepc-0.3.10/lib/freeDiameter-1.2.1/tests/testsess.c000066400000000000000000000336121333553357400222430ustar00rootroot00000000000000/********************************************************************************************************* * Software License Agreement (BSD License) * * Author: Sebastien Decugis * * * * Copyright (c) 2013, WIDE Project and NICT * * All rights reserved. * * * * Redistribution and use of this software in source and binary forms, with or without modification, are * * permitted provided that the following conditions are met: * * * * * Redistributions of source code must retain the above * * copyright notice, this list of conditions and the * * following disclaimer. * * * * * 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. * * * * * Neither the name of the WIDE Project or NICT nor the * * names of its contributors may be used to endorse or * * promote products derived from this software without * * specific prior written permission of WIDE Project and * * NICT. * * * * 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. * *********************************************************************************************************/ #include "tests.h" #define TEST_DIAM_ID "testsess.myid" #define TEST_OPT_IN "suffix" #define TEST_OPT (os0_t)TEST_OPT_IN #define TEST_SID_IN TEST_DIAM_ID ";1234;5678;" TEST_OPT_IN #define TEST_SID (os0_t)TEST_SID_IN #define TEST_EYEC 0x7e57e1ec struct sess_state { int eyec; /* TEST_EYEC */ os0_t sid; /* the session with which the data was registered */ int * freed; /* location where to write the freed status */ void * opaque; /* if opaque was provided, this is the value we expect */ }; static void mycleanup( struct sess_state * data, os0_t sid, void * opaque ) { /* sanity */ CHECK( 1, sid ? 1 : 0 ); CHECK( 1, data? 1 : 0 ); CHECK( TEST_EYEC, data->eyec ); CHECK( 0, strcmp((char *)sid, (char *)data->sid) ); if (data->freed) *(data->freed) += 1; if (data->opaque) { CHECK( 1, opaque == data->opaque ? 1 : 0 ); } /* Now, free the data */ free(data->sid); free(data); } static __inline__ struct sess_state * new_state(os0_t sid, int *freed) { struct sess_state *new; new = malloc(sizeof(struct sess_state)); CHECK( 1, new ? 1 : 0 ); memset(new, 0, sizeof(struct sess_state)); new->eyec = TEST_EYEC; new->sid = os0dup(sid, strlen((char *)sid)); CHECK( 1, new->sid ? 1 : 0 ); new->freed = freed; return new; } void * g_opaque = (void *)"test"; /* Avoid a lot of casts */ #undef strlen #define strlen(s) strlen((char *)s) #undef strncmp #define strncmp(s1,s2,l) strncmp((char *)s1, (char *)s2, l) #undef strcmp #define strcmp(s1,s2) strcmp((char *)s1, (char *)s2) /* Main test routine */ int main(int argc, char *argv[]) { struct session_handler * hdl1, *hdl2; struct session *sess1, *sess2, *sess3; os0_t str1, str2; size_t str1len, str2len; int new; /* First, initialize the daemon modules */ INIT_FD(); /* Test functions related to handlers (simple situation) */ { void * testptr = NULL; CHECK( 0, fd_sess_handler_create ( &hdl1, mycleanup, NULL, NULL ) ); CHECK( 0, fd_sess_handler_create ( &hdl2, mycleanup, NULL, NULL ) ); CHECK( 0, fd_sess_handler_destroy( &hdl2, &testptr ) ); CHECK( 1, testptr == NULL ? 1 : 0 ); CHECK( 0, fd_sess_handler_create ( &hdl2, mycleanup, NULL, g_opaque ) ); #if 0 fd_log_debug("%s", fd_sess_dump_hdl(FD_DUMP_TEST_PARAMS, hdl1)); fd_log_debug("%s", fd_sess_dump_hdl(FD_DUMP_TEST_PARAMS, hdl2)); #endif } /* Test Session Id generation (fd_sess_new) */ { /* DiamId is provided, not opt */ CHECK( 0, fd_sess_new( &sess1, TEST_DIAM_ID, CONSTSTRLEN(TEST_DIAM_ID), NULL, 0 ) ); CHECK( 0, fd_sess_new( &sess2, TEST_DIAM_ID, CONSTSTRLEN(TEST_DIAM_ID), NULL, 0 ) ); #if 0 fd_log_debug("%s", fd_sess_dump(FD_DUMP_TEST_PARAMS, sess1, 1)); fd_log_debug("%s", fd_sess_dump(FD_DUMP_TEST_PARAMS, sess2, 1)); #endif /* Check both string start with the diameter Id, but are different */ CHECK( 0, fd_sess_getsid(sess1, &str1, &str1len) ); CHECK( 1, (strlen(str1) == str1len) ? 1 : 0 ); CHECK( 0, strncmp(str1, TEST_DIAM_ID ";", CONSTSTRLEN(TEST_DIAM_ID) + 1) ); CHECK( 0, fd_sess_getsid(sess2, &str2, &str2len) ); CHECK( 0, strncmp(str2, TEST_DIAM_ID ";", CONSTSTRLEN(TEST_DIAM_ID) + 1) ); CHECK( 1, strcmp(str1, str2) ? 1 : 0 ); CHECK( 0, fd_sess_destroy( &sess1 ) ); CHECK( 0, fd_sess_destroy( &sess2 ) ); /* diamId and opt */ CHECK( 0, fd_sess_new( &sess1, TEST_DIAM_ID, 0, TEST_OPT, 0 ) ); CHECK( 0, fd_sess_new( &sess2, TEST_DIAM_ID, CONSTSTRLEN(TEST_DIAM_ID), TEST_OPT, CONSTSTRLEN(TEST_OPT_IN) - 1 ) ); #if 0 fd_log_debug("%s", fd_sess_dump(FD_DUMP_TEST_PARAMS, sess1, 1)); fd_log_debug("%s", fd_sess_dump(FD_DUMP_TEST_PARAMS, sess2, 1)); #endif CHECK( 0, fd_sess_getsid(sess1, &str1, &str1len) ); CHECK( 0, strncmp(str1, TEST_DIAM_ID ";", CONSTSTRLEN(TEST_DIAM_ID) + 1) ); CHECK( 0, strcmp(str1 + str1len - CONSTSTRLEN(TEST_OPT_IN) - 1, ";" TEST_OPT_IN) ); CHECK( 0, fd_sess_getsid(sess2, &str2, &str2len) ); CHECK( 0, strncmp(str2, TEST_DIAM_ID ";", CONSTSTRLEN(TEST_DIAM_ID) + 1) ); CHECK( 0, strncmp(str2 + str2len - CONSTSTRLEN(TEST_OPT_IN), ";" TEST_OPT_IN, CONSTSTRLEN(TEST_OPT_IN)) ); CHECK( 1, strcmp(str1, str2) ? 1 : 0 ); CHECK( 0, fd_sess_destroy( &sess1 ) ); CHECK( 0, fd_sess_destroy( &sess2 ) ); /* Now, only opt is provided */ CHECK( 0, fd_sess_new( &sess1, NULL, 0, TEST_SID, 0 ) ); CHECK( EALREADY, fd_sess_new( &sess2, NULL, 0, TEST_SID, 0 ) ); CHECK( sess2, sess1 ); CHECK( EALREADY, fd_sess_new( &sess3, NULL, 0, TEST_SID, CONSTSTRLEN(TEST_SID_IN) ) ); CHECK( sess3, sess1 ); CHECK( 0, fd_sess_new( &sess2, NULL, 0, TEST_SID, CONSTSTRLEN(TEST_SID_IN) - 1 ) ); #if 0 fd_log_debug("%s", fd_sess_dump(FD_DUMP_TEST_PARAMS, sess1, 1)); fd_log_debug("%s", fd_sess_dump(FD_DUMP_TEST_PARAMS, sess2, 1)); #endif CHECK( 0, fd_sess_getsid(sess1, &str1, &str1len) ); CHECK( 0, fd_sess_getsid(sess2, &str2, &str2len) ); CHECK( 0, strncmp( str1, str2, CONSTSTRLEN(TEST_SID_IN) - 1 ) ); CHECK( 0, strcmp( str1, TEST_SID ) ); CHECK( 1, strcmp( str1, str2 ) ? 1 : 0 ); CHECK( 0, fd_sess_destroy( &sess2 ) ); CHECK( 0, fd_sess_destroy( &sess1 ) ); } /* Test fd_sess_getcount */ { uint32_t cnt; CHECK( 0, fd_sess_new( &sess1, TEST_DIAM_ID, CONSTSTRLEN(TEST_DIAM_ID), NULL, 0 ) ); CHECK( 0, fd_sess_new( &sess2, TEST_DIAM_ID, CONSTSTRLEN(TEST_DIAM_ID), NULL, 0 ) ); CHECK( 0, fd_sess_getcount(&cnt)); CHECK( 2, cnt); CHECK( 0, fd_sess_destroy( &sess2 ) ); CHECK( 0, fd_sess_getcount(&cnt)); CHECK( 1, cnt); CHECK( 0, fd_sess_destroy( &sess1 ) ); CHECK( 0, fd_sess_getcount(&cnt)); CHECK( 0, cnt); } /* Test fd_sess_fromsid */ { CHECK( 0, fd_sess_fromsid( TEST_SID, CONSTSTRLEN(TEST_SID_IN), &sess1, &new ) ); CHECK( 1, new ? 1 : 0 ); CHECK( 0, fd_sess_fromsid( TEST_SID, CONSTSTRLEN(TEST_SID_IN), &sess2, &new ) ); CHECK( 0, new ); CHECK( sess1, sess2 ); CHECK( 0, fd_sess_fromsid( TEST_SID, CONSTSTRLEN(TEST_SID_IN), &sess3, NULL ) ); CHECK( sess1, sess3 ); CHECK( 0, fd_sess_destroy( &sess1 ) ); } /* Test fd_sess_reclaim */ { struct sess_state *tms; CHECK( 0, fd_sess_fromsid( TEST_SID, CONSTSTRLEN(TEST_SID_IN), &sess1, &new ) ); CHECK( 1, new ? 1 : 0 ); CHECK( 0, fd_sess_reclaim( &sess1 ) ); CHECK( NULL, sess1 ); CHECK( 0, fd_sess_fromsid( TEST_SID, CONSTSTRLEN(TEST_SID_IN), &sess1, &new ) ); CHECK( 1, new ? 1 : 0 ); tms = new_state(TEST_SID, NULL); CHECK( 0, fd_sess_state_store ( hdl1, sess1, &tms ) ); CHECK( 0, fd_sess_reclaim( &sess1 ) ); CHECK( NULL, sess1 ); CHECK( 0, fd_sess_fromsid( TEST_SID, CONSTSTRLEN(TEST_SID_IN), &sess1, &new ) ); CHECK( 0, new ); CHECK( 0, fd_sess_destroy( &sess1 ) ); CHECK( 0, fd_sess_fromsid( TEST_SID, CONSTSTRLEN(TEST_SID_IN), &sess1, &new ) ); CHECK( 1, new ? 1 : 0 ); CHECK( 0, fd_sess_destroy( &sess1 ) ); } /* Test timeout function */ { struct timespec timeout; CHECK( 0, fd_sess_fromsid( TEST_SID, CONSTSTRLEN(TEST_SID_IN), &sess1, &new ) ); CHECK( 1, new ? 1 : 0 ); CHECK( 0, clock_gettime(CLOCK_REALTIME, &timeout) ); CHECK( 0, fd_sess_settimeout( sess1, &timeout) ); /* expire now */ timeout.tv_sec = 0; timeout.tv_nsec= 50000000; /* 50 ms */ CHECK( 0, nanosleep(&timeout, NULL) ); CHECK( 0, fd_sess_fromsid( TEST_SID, CONSTSTRLEN(TEST_SID_IN), &sess1, &new ) ); CHECK( 1, new ? 1 : 0 ); CHECK( 0, clock_gettime(CLOCK_REALTIME, &timeout) ); timeout.tv_sec += 2678500; /* longer that SESS_DEFAULT_LIFETIME */ CHECK( 0, fd_sess_settimeout( sess1, &timeout) ); /* Create a second session */ CHECK( 0, fd_sess_new( &sess2, TEST_DIAM_ID, 0, NULL, 0 ) ); /* We don't really have a way to verify the expiry list is in proper order automatically here... */ CHECK( 0, fd_sess_destroy( &sess2 ) ); CHECK( 0, fd_sess_destroy( &sess1 ) ); } /* Test states operations */ { struct sess_state * ms[6], *tms; int freed[6]; struct timespec timeout; void * testptr = NULL; /* Create three sessions */ CHECK( 0, fd_sess_new( &sess1, TEST_DIAM_ID, 0, NULL, 0 ) ); CHECK( 0, fd_sess_new( &sess2, TEST_DIAM_ID, 0, NULL, 0 ) ); CHECK( 0, fd_sess_new( &sess3, TEST_DIAM_ID, 0, NULL, 0 ) ); /* Create 2 states */ CHECK( 0, fd_sess_getsid(sess1, &str1, &str1len) ); freed[0] = 0; ms[0] = new_state(str1, &freed[0]); ms[1] = new_state(str1, NULL); tms = ms[0]; /* save a copy */ CHECK( 0, fd_sess_state_store ( hdl1, sess1, &ms[0] ) ); CHECK( NULL, ms[0] ); CHECK( EINVAL, fd_sess_state_store ( hdl1, sess1, NULL ) ); CHECK( EALREADY, fd_sess_state_store ( hdl1, sess1, &ms[1] ) ); CHECK( 1, ms[1] ? 1 : 0 ); #if 0 fd_log_debug("%s", fd_sess_dump(FD_DUMP_TEST_PARAMS, sess1, 1)); #endif CHECK( 0, fd_sess_state_retrieve( hdl1, sess1, &ms[0] ) ); CHECK( tms, ms[0] ); CHECK( 0, freed[0] ); CHECK( 0, fd_sess_state_retrieve( hdl1, sess2, &tms ) ); CHECK( NULL, tms ); mycleanup(ms[0], str1, NULL); mycleanup(ms[1], str1, NULL); /* Now create 6 states */ memset(&freed[0], 0, sizeof(freed)); CHECK( 0, fd_sess_getsid(sess1, &str1, &str1len) ); ms[0] = new_state(str1, &freed[0]); ms[1] = new_state(str1, &freed[1]); CHECK( 0, fd_sess_getsid(sess2, &str1, &str1len) ); ms[2] = new_state(str1, &freed[2]); ms[3] = new_state(str1, &freed[3]); CHECK( 0, fd_sess_getsid(sess3, &str1, &str1len) ); ms[4] = new_state(str1, &freed[4]); ms[5] = new_state(str1, &freed[5]); ms[5]->opaque = g_opaque; str2 = os0dup(str1, str1len); CHECK( 1, str2 ? 1 : 0 ); /* Store the six states */ CHECK( 0, fd_sess_state_store ( hdl1, sess1, &ms[0] ) ); CHECK( 0, fd_sess_state_store ( hdl2, sess1, &ms[1] ) ); CHECK( 0, fd_sess_state_store ( hdl1, sess2, &ms[2] ) ); CHECK( 0, fd_sess_state_store ( hdl2, sess2, &ms[3] ) ); CHECK( 0, fd_sess_state_store ( hdl1, sess3, &ms[4] ) ); CHECK( 0, fd_sess_state_store ( hdl2, sess3, &ms[5] ) ); #if 0 fd_log_debug("%s", fd_sess_dump(FD_DUMP_TEST_PARAMS, sess1, 1)); fd_log_debug("%s", fd_sess_dump(FD_DUMP_TEST_PARAMS, sess2, 1)); fd_log_debug("%s", fd_sess_dump(FD_DUMP_TEST_PARAMS, sess3, 1)); #endif /* Destroy session 3 */ CHECK( 0, fd_sess_destroy( &sess3 ) ); CHECK( 0, freed[0] ); CHECK( 0, freed[1] ); CHECK( 0, freed[2] ); CHECK( 0, freed[3] ); CHECK( 1, freed[4] ); CHECK( 1, freed[5] ); /* Destroy handler 2 */ CHECK( 0, fd_sess_handler_destroy( &hdl2, &testptr ) ); CHECK( 0, freed[0] ); CHECK( 1, freed[1] ); CHECK( 0, freed[2] ); CHECK( 1, freed[3] ); CHECK( 1, freed[4] ); CHECK( 1, freed[5] ); CHECK( 1, testptr == g_opaque ? 1 : 0 ); #if 1 fd_log_debug("%s", fd_sess_dump(FD_DUMP_TEST_PARAMS, sess1, 1)); fd_log_debug("%s", fd_sess_dump(FD_DUMP_TEST_PARAMS, sess2, 1)); #endif /* Create again session 3, check that no data is associated to it */ CHECK( 0, fd_sess_fromsid( str2, str1len, &sess3, &new ) ); CHECK( 1, new ? 1 : 0 ); CHECK( 0, fd_sess_state_retrieve( hdl1, sess3, &tms ) ); CHECK( NULL, tms ); CHECK( 0, fd_sess_destroy( &sess3 ) ); free(str2); /* Timeout does call cleanups */ CHECK( 0, clock_gettime(CLOCK_REALTIME, &timeout) ); CHECK( 0, fd_sess_settimeout( sess2, &timeout) ); #if 1 fd_log_debug("%s", fd_sess_dump(FD_DUMP_TEST_PARAMS, sess1, 1)); fd_log_debug("%s", fd_sess_dump(FD_DUMP_TEST_PARAMS, sess2, 1)); #endif timeout.tv_sec = 0; timeout.tv_nsec= 50000000; /* 50 ms */ CHECK( 0, nanosleep(&timeout, NULL) ); CHECK( 0, freed[0] ); CHECK( 1, freed[1] ); CHECK( 1, freed[2] ); CHECK( 1, freed[3] ); CHECK( 1, freed[4] ); CHECK( 1, freed[5] ); /* Check the last data can still be retrieved */ CHECK( 0, fd_sess_state_retrieve( hdl1, sess1, &tms ) ); CHECK( 1, tms ? 1 : 0); CHECK( 0, fd_sess_getsid(sess1, &str1, &str1len) ); mycleanup(tms, str1, NULL); } /* TODO: add tests on messages referencing sessions */ /* That's all for the tests yet */ PASSTEST(); } nextepc-0.3.10/lib/gtp/000077500000000000000000000000001333553357400146145ustar00rootroot00000000000000nextepc-0.3.10/lib/gtp/Makefile.am000066400000000000000000000012151333553357400166470ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in pkglib_LTLIBRARIES = libgtp.la libgtp_la_SOURCES = \ gtp_message.h gtp_types.h gtp_conv.h gtp_node.h gtp_path.h gtp_xact.h \ gtp_message.c gtp_types.c gtp_conv.c gtp_node.c gtp_path.c gtp_xact.c \ $(NULL) libgtp_la_DEPENDENCIES = \ $(top_srcdir)/lib/core/src/libcore.la \ $(NULL) libgtp_la_LIBADD = \ $(top_srcdir)/lib/core/src/libcore.la \ $(NULL) AM_LDFLAGS = \ -version-info @LIBVERSION@ \ $(NULL) AM_CPPFLAGS = \ -I$(top_srcdir)/lib/core/include \ $(NULL) AM_CFLAGS = \ -Wall -Werror \ $(NULL) MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump nextepc-0.3.10/lib/gtp/gtp_conv.c000066400000000000000000000116041333553357400166010ustar00rootroot00000000000000#define TRACE_MODULE _gtp_conv #include "core_debug.h" #include "core_network.h" #include "gtp_message.h" #include "gtp_types.h" #include "gtp_conv.h" void gtp_bearers_in_create_indirect_tunnel_request( tlv_bearer_context_t *bearers[][GTP_MAX_NUM_OF_INDIRECT_TUNNEL], gtp_create_indirect_data_forwarding_tunnel_request_t *req) { (*bearers)[0] = &req->bearer_context_0; (*bearers)[1] = &req->bearer_context_1; (*bearers)[2] = &req->bearer_context_2; (*bearers)[3] = &req->bearer_context_3; (*bearers)[4] = &req->bearer_context_4; (*bearers)[5] = &req->bearer_context_5; (*bearers)[6] = &req->bearer_context_6; (*bearers)[7] = &req->bearer_context_7; (*bearers)[8] = &req->bearer_context_8; (*bearers)[9] = &req->bearer_context_9; (*bearers)[10] = &req->bearer_context_10; } void gtp_bearers_in_create_indirect_tunnel_response( tlv_bearer_context_t *bearers[][GTP_MAX_NUM_OF_INDIRECT_TUNNEL], gtp_create_indirect_data_forwarding_tunnel_response_t *rsp) { (*bearers)[0] = &rsp->bearer_context_0; (*bearers)[1] = &rsp->bearer_context_1; (*bearers)[2] = &rsp->bearer_context_2; (*bearers)[3] = &rsp->bearer_context_3; (*bearers)[4] = &rsp->bearer_context_4; (*bearers)[5] = &rsp->bearer_context_5; (*bearers)[6] = &rsp->bearer_context_6; (*bearers)[7] = &rsp->bearer_context_7; (*bearers)[8] = &rsp->bearer_context_8; (*bearers)[9] = &rsp->bearer_context_9; (*bearers)[10] = &rsp->bearer_context_10; } status_t gtp_f_teid_to_sockaddr( gtp_f_teid_t *f_teid, c_uint16_t port, c_sockaddr_t **list) { c_sockaddr_t *addr = NULL, *addr6 = NULL; d_assert(f_teid, return CORE_ERROR,); d_assert(list, return CORE_ERROR,); addr = core_calloc(1, sizeof(c_sockaddr_t)); d_assert(addr, return CORE_ERROR,); addr->c_sa_family = AF_INET; addr->c_sa_port = htons(port); addr6 = core_calloc(1, sizeof(c_sockaddr_t)); d_assert(addr6, return CORE_ERROR,); addr6->c_sa_family = AF_INET6; addr6->c_sa_port = htons(port); if (f_teid->ipv4 && f_teid->ipv6) { addr->next = addr6; addr->sin.sin_addr.s_addr = f_teid->both.addr; memcpy(addr6->sin6.sin6_addr.s6_addr, f_teid->both.addr6, IPV6_LEN); *list = addr; } else if (f_teid->ipv4) { addr->sin.sin_addr.s_addr = f_teid->addr; CORE_FREE(addr6); *list = addr; } else if (f_teid->ipv6) { memcpy(addr6->sin6.sin6_addr.s6_addr, f_teid->addr6, IPV6_LEN); CORE_FREE(addr); *list = addr6; } else { CORE_FREE(addr); CORE_FREE(addr6); d_assert(0, return CORE_ERROR,); } return CORE_OK; } status_t gtp_sockaddr_to_f_teid( c_sockaddr_t *addr, c_sockaddr_t *addr6, gtp_f_teid_t *f_teid, int *len) { d_assert(f_teid, return CORE_ERROR,); if (addr && addr6) { f_teid->ipv4 = 1; f_teid->both.addr = addr->sin.sin_addr.s_addr; f_teid->ipv6 = 1; memcpy(f_teid->both.addr6, addr6->sin6.sin6_addr.s6_addr, IPV6_LEN); *len = GTP_F_TEID_IPV4V6_LEN; } else if (addr) { f_teid->ipv4 = 1; f_teid->ipv6 = 0; f_teid->addr = addr->sin.sin_addr.s_addr; *len = GTP_F_TEID_IPV4_LEN; } else if (addr6) { f_teid->ipv4 = 0; f_teid->ipv6 = 1; memcpy(f_teid->addr6, addr6->sin6.sin6_addr.s6_addr, IPV6_LEN); *len = GTP_F_TEID_IPV6_LEN; } else d_assert(0, return CORE_ERROR,); return CORE_OK; } status_t gtp_f_teid_to_ip(gtp_f_teid_t *f_teid, ip_t *ip) { d_assert(ip, return CORE_ERROR,); d_assert(f_teid, return CORE_ERROR,); memset(ip, 0, sizeof(ip_t)); ip->ipv4 = f_teid->ipv4; ip->ipv6 = f_teid->ipv6; if (ip->ipv4 && ip->ipv6) { ip->both.addr = f_teid->both.addr; memcpy(ip->both.addr6, f_teid->both.addr6, IPV6_LEN); ip->len = IPV4V6_LEN; } else if (ip->ipv4) { ip->addr = f_teid->addr; ip->len = IPV4_LEN; } else if (ip->ipv6) { memcpy(ip->addr6, f_teid->addr6, IPV6_LEN); ip->len = IPV6_LEN; } else d_assert(0, return CORE_ERROR,); return CORE_OK; } status_t gtp_ip_to_f_teid(ip_t *ip, gtp_f_teid_t *f_teid, int *len) { d_assert(ip, return CORE_ERROR,); d_assert(f_teid, return CORE_ERROR,); f_teid->ipv4 = ip->ipv4; f_teid->ipv6 = ip->ipv6; if (f_teid->ipv4 && f_teid->ipv6) { f_teid->both.addr = ip->both.addr; memcpy(f_teid->both.addr6, ip->both.addr6, IPV6_LEN); *len = GTP_F_TEID_IPV4V6_LEN; } else if (f_teid->ipv4) { f_teid->addr = ip->addr; *len = GTP_F_TEID_IPV4_LEN; } else if (f_teid->ipv6) { memcpy(f_teid->addr6, ip->addr6, IPV6_LEN); *len = GTP_F_TEID_IPV6_LEN; } else d_assert(0, return CORE_ERROR,); return CORE_OK; } nextepc-0.3.10/lib/gtp/gtp_conv.h000066400000000000000000000030041333553357400166010ustar00rootroot00000000000000#ifndef __GTP_CONV_H__ #define __GTP_CONV_H__ #include "core_errno.h" typedef struct _tlv_bearer_context_t tlv_bearer_context_t; typedef struct _gtp_create_indirect_data_forwarding_tunnel_request_t gtp_create_indirect_data_forwarding_tunnel_request_t; typedef struct _gtp_create_indirect_data_forwarding_tunnel_response_t gtp_create_indirect_data_forwarding_tunnel_response_t; typedef struct c_sockaddr_t c_sockaddr_t; typedef struct _gtp_f_teid_t gtp_f_teid_t; typedef struct _ip_t ip_t; #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define GTP_MAX_NUM_OF_INDIRECT_TUNNEL 11 /* Create Indirect Data Forwarding Tunnel Request/Response */ CORE_DECLARE(void) gtp_bearers_in_create_indirect_tunnel_request( tlv_bearer_context_t *bearers[][GTP_MAX_NUM_OF_INDIRECT_TUNNEL], gtp_create_indirect_data_forwarding_tunnel_request_t *req); CORE_DECLARE(void) gtp_bearers_in_create_indirect_tunnel_response( tlv_bearer_context_t *bearers[][GTP_MAX_NUM_OF_INDIRECT_TUNNEL], gtp_create_indirect_data_forwarding_tunnel_response_t *rsp); CORE_DECLARE(status_t) gtp_f_teid_to_sockaddr( gtp_f_teid_t *f_teid, c_uint16_t port, c_sockaddr_t **list); CORE_DECLARE(status_t) gtp_sockaddr_to_f_teid( c_sockaddr_t *addr, c_sockaddr_t *addr6, gtp_f_teid_t *f_teid, int *len); CORE_DECLARE(status_t) gtp_f_teid_to_ip(gtp_f_teid_t *f_teid, ip_t *ip); CORE_DECLARE(status_t) gtp_ip_to_f_teid( ip_t *ip, gtp_f_teid_t *f_teid, int *len); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTP_CONV_H__ */ nextepc-0.3.10/lib/gtp/gtp_message.c000066400000000000000000002134101333553357400172570ustar00rootroot00000000000000/* * Copyright (c) 2017, NextEPC Group * 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. */ /******************************************************************************* * This file had been created by gtp_tlv.py script v0.1.0 * Please do not modify this file but regenerate it via script. * Created on: 2018-01-23 16:32:53.073144 by acetcom * from 29274-d80.docx ******************************************************************************/ #define TRACE_MODULE _gtp_message #include "core_debug.h" #include "gtp_message.h" tlv_desc_t tlv_desc_imsi_0 = { TLV_VAR_STR, "IMSI", TLV_IMSI_TYPE, 0, 0, sizeof(tlv_imsi_t), { NULL } }; tlv_desc_t tlv_desc_cause_0 = { TLV_VAR_STR, "Cause", TLV_CAUSE_TYPE, 0, 0, sizeof(tlv_cause_t), { NULL } }; tlv_desc_t tlv_desc_recovery_0 = { TLV_UINT8, "Recovery", TLV_RECOVERY_TYPE, 1, 0, sizeof(tlv_recovery_t), { NULL } }; tlv_desc_t tlv_desc_stn_sr_0 = { TLV_VAR_STR, "STN-SR", TLV_STN_SR_TYPE, 0, 0, sizeof(tlv_stn_sr_t), { NULL } }; tlv_desc_t tlv_desc_apn_0 = { TLV_VAR_STR, "APN", TLV_APN_TYPE, 0, 0, sizeof(tlv_apn_t), { NULL } }; tlv_desc_t tlv_desc_ambr_0 = { TLV_VAR_STR, "AMBR", TLV_AMBR_TYPE, 0, 0, sizeof(tlv_ambr_t), { NULL } }; tlv_desc_t tlv_desc_ebi_0 = { TLV_UINT8, "EBI", TLV_EBI_TYPE, 1, 0, sizeof(tlv_ebi_t), { NULL } }; tlv_desc_t tlv_desc_ebi_1 = { TLV_UINT8, "EBI", TLV_EBI_TYPE, 1, 1, sizeof(tlv_ebi_t), { NULL } }; tlv_desc_t tlv_desc_ip_address_0 = { TLV_VAR_STR, "IP Address", TLV_IP_ADDRESS_TYPE, 0, 0, sizeof(tlv_ip_address_t), { NULL } }; tlv_desc_t tlv_desc_ip_address_1 = { TLV_VAR_STR, "IP Address", TLV_IP_ADDRESS_TYPE, 0, 1, sizeof(tlv_ip_address_t), { NULL } }; tlv_desc_t tlv_desc_ip_address_2 = { TLV_VAR_STR, "IP Address", TLV_IP_ADDRESS_TYPE, 0, 2, sizeof(tlv_ip_address_t), { NULL } }; tlv_desc_t tlv_desc_ip_address_3 = { TLV_VAR_STR, "IP Address", TLV_IP_ADDRESS_TYPE, 0, 3, sizeof(tlv_ip_address_t), { NULL } }; tlv_desc_t tlv_desc_mei_0 = { TLV_VAR_STR, "MEI", TLV_MEI_TYPE, 0, 0, sizeof(tlv_mei_t), { NULL } }; tlv_desc_t tlv_desc_msisdn_0 = { TLV_VAR_STR, "MSISDN", TLV_MSISDN_TYPE, 0, 0, sizeof(tlv_msisdn_t), { NULL } }; tlv_desc_t tlv_desc_indication_0 = { TLV_VAR_STR, "Indication", TLV_INDICATION_TYPE, 0, 0, sizeof(tlv_indication_t), { NULL } }; tlv_desc_t tlv_desc_pco_0 = { TLV_VAR_STR, "PCO", TLV_PCO_TYPE, 0, 0, sizeof(tlv_pco_t), { NULL } }; tlv_desc_t tlv_desc_paa_0 = { TLV_VAR_STR, "PAA", TLV_PAA_TYPE, 0, 0, sizeof(tlv_paa_t), { NULL } }; tlv_desc_t tlv_desc_bearer_qos_0 = { TLV_VAR_STR, "Bearer QoS", TLV_BEARER_QOS_TYPE, 0, 0, sizeof(tlv_bearer_qos_t), { NULL } }; tlv_desc_t tlv_desc_flow_qos_0 = { TLV_VAR_STR, "Flow QoS", TLV_FLOW_QOS_TYPE, 0, 0, sizeof(tlv_flow_qos_t), { NULL } }; tlv_desc_t tlv_desc_rat_type_0 = { TLV_UINT8, "RAT Type", TLV_RAT_TYPE_TYPE, 1, 0, sizeof(tlv_rat_type_t), { NULL } }; tlv_desc_t tlv_desc_serving_network_0 = { TLV_VAR_STR, "Serving Network", TLV_SERVING_NETWORK_TYPE, 0, 0, sizeof(tlv_serving_network_t), { NULL } }; tlv_desc_t tlv_desc_bearer_tft_0 = { TLV_VAR_STR, "Bearer TFT", TLV_BEARER_TFT_TYPE, 0, 0, sizeof(tlv_bearer_tft_t), { NULL } }; tlv_desc_t tlv_desc_tad_0 = { TLV_VAR_STR, "TAD", TLV_TAD_TYPE, 0, 0, sizeof(tlv_tad_t), { NULL } }; tlv_desc_t tlv_desc_uli_0 = { TLV_VAR_STR, "ULI", TLV_ULI_TYPE, 0, 0, sizeof(tlv_uli_t), { NULL } }; tlv_desc_t tlv_desc_f_teid_0 = { TLV_VAR_STR, "F-TEID", TLV_F_TEID_TYPE, 0, 0, sizeof(tlv_f_teid_t), { NULL } }; tlv_desc_t tlv_desc_f_teid_1 = { TLV_VAR_STR, "F-TEID", TLV_F_TEID_TYPE, 0, 1, sizeof(tlv_f_teid_t), { NULL } }; tlv_desc_t tlv_desc_f_teid_2 = { TLV_VAR_STR, "F-TEID", TLV_F_TEID_TYPE, 0, 2, sizeof(tlv_f_teid_t), { NULL } }; tlv_desc_t tlv_desc_f_teid_3 = { TLV_VAR_STR, "F-TEID", TLV_F_TEID_TYPE, 0, 3, sizeof(tlv_f_teid_t), { NULL } }; tlv_desc_t tlv_desc_f_teid_4 = { TLV_VAR_STR, "F-TEID", TLV_F_TEID_TYPE, 0, 4, sizeof(tlv_f_teid_t), { NULL } }; tlv_desc_t tlv_desc_f_teid_5 = { TLV_VAR_STR, "F-TEID", TLV_F_TEID_TYPE, 0, 5, sizeof(tlv_f_teid_t), { NULL } }; tlv_desc_t tlv_desc_f_teid_6 = { TLV_VAR_STR, "F-TEID", TLV_F_TEID_TYPE, 0, 6, sizeof(tlv_f_teid_t), { NULL } }; tlv_desc_t tlv_desc_f_teid_7 = { TLV_VAR_STR, "F-TEID", TLV_F_TEID_TYPE, 0, 7, sizeof(tlv_f_teid_t), { NULL } }; tlv_desc_t tlv_desc_f_teid_8 = { TLV_VAR_STR, "F-TEID", TLV_F_TEID_TYPE, 0, 8, sizeof(tlv_f_teid_t), { NULL } }; tlv_desc_t tlv_desc_f_teid_9 = { TLV_VAR_STR, "F-TEID", TLV_F_TEID_TYPE, 0, 9, sizeof(tlv_f_teid_t), { NULL } }; tlv_desc_t tlv_desc_f_teid_10 = { TLV_VAR_STR, "F-TEID", TLV_F_TEID_TYPE, 0, 10, sizeof(tlv_f_teid_t), { NULL } }; tlv_desc_t tlv_desc_f_teid_11 = { TLV_VAR_STR, "F-TEID", TLV_F_TEID_TYPE, 0, 11, sizeof(tlv_f_teid_t), { NULL } }; tlv_desc_t tlv_desc_tmsi_0 = { TLV_VAR_STR, "TMSI", TLV_TMSI_TYPE, 0, 0, sizeof(tlv_tmsi_t), { NULL } }; tlv_desc_t tlv_desc_global_cn_id_0 = { TLV_VAR_STR, "Global CN-Id", TLV_GLOBAL_CN_ID_TYPE, 0, 0, sizeof(tlv_global_cn_id_t), { NULL } }; tlv_desc_t tlv_desc_s103pdf_0 = { TLV_VAR_STR, "S103PDF", TLV_S103PDF_TYPE, 0, 0, sizeof(tlv_s103pdf_t), { NULL } }; tlv_desc_t tlv_desc_s1udf_0 = { TLV_VAR_STR, "S1UDF", TLV_S1UDF_TYPE, 0, 0, sizeof(tlv_s1udf_t), { NULL } }; tlv_desc_t tlv_desc_delay_value_0 = { TLV_VAR_STR, "Delay Value", TLV_DELAY_VALUE_TYPE, 0, 0, sizeof(tlv_delay_value_t), { NULL } }; tlv_desc_t tlv_desc_charging_id_0 = { TLV_VAR_STR, "Charging ID", TLV_CHARGING_ID_TYPE, 0, 0, sizeof(tlv_charging_id_t), { NULL } }; tlv_desc_t tlv_desc_charging_characteristics_0 = { TLV_VAR_STR, "Charging Characteristics", TLV_CHARGING_CHARACTERISTICS_TYPE, 0, 0, sizeof(tlv_charging_characteristics_t), { NULL } }; tlv_desc_t tlv_desc_trace_information_0 = { TLV_VAR_STR, "Trace Information", TLV_TRACE_INFORMATION_TYPE, 0, 0, sizeof(tlv_trace_information_t), { NULL } }; tlv_desc_t tlv_desc_bearer_flags_0 = { TLV_VAR_STR, "Bearer Flags", TLV_BEARER_FLAGS_TYPE, 0, 0, sizeof(tlv_bearer_flags_t), { NULL } }; tlv_desc_t tlv_desc_pdn_type_0 = { TLV_UINT8, "PDN Type", TLV_PDN_TYPE_TYPE, 1, 0, sizeof(tlv_pdn_type_t), { NULL } }; tlv_desc_t tlv_desc_pti_0 = { TLV_VAR_STR, "PTI", TLV_PTI_TYPE, 0, 0, sizeof(tlv_pti_t), { NULL } }; tlv_desc_t tlv_desc_mm_context_0 = { TLV_VAR_STR, "MM Context", TLV_MM_CONTEXT_TYPE, 0, 0, sizeof(tlv_mm_context_t), { NULL } }; tlv_desc_t tlv_desc_pdu_numbers_0 = { TLV_VAR_STR, "PDU Numbers", TLV_PDU_NUMBERS_TYPE, 0, 0, sizeof(tlv_pdu_numbers_t), { NULL } }; tlv_desc_t tlv_desc_p_tmsi_0 = { TLV_VAR_STR, "P-TMSI", TLV_P_TMSI_TYPE, 0, 0, sizeof(tlv_p_tmsi_t), { NULL } }; tlv_desc_t tlv_desc_p_tmsi_signature_0 = { TLV_VAR_STR, "P-TMSI Signature", TLV_P_TMSI_SIGNATURE_TYPE, 0, 0, sizeof(tlv_p_tmsi_signature_t), { NULL } }; tlv_desc_t tlv_desc_hop_counter_0 = { TLV_VAR_STR, "Hop Counter", TLV_HOP_COUNTER_TYPE, 0, 0, sizeof(tlv_hop_counter_t), { NULL } }; tlv_desc_t tlv_desc_ue_time_zone_0 = { TLV_VAR_STR, "UE Time Zone", TLV_UE_TIME_ZONE_TYPE, 0, 0, sizeof(tlv_ue_time_zone_t), { NULL } }; tlv_desc_t tlv_desc_trace_reference_0 = { TLV_VAR_STR, "Trace Reference", TLV_TRACE_REFERENCE_TYPE, 0, 0, sizeof(tlv_trace_reference_t), { NULL } }; tlv_desc_t tlv_desc_complete_request_message_0 = { TLV_VAR_STR, "Complete Request Message", TLV_COMPLETE_REQUEST_MESSAGE_TYPE, 0, 0, sizeof(tlv_complete_request_message_t), { NULL } }; tlv_desc_t tlv_desc_guti_0 = { TLV_VAR_STR, "GUTI", TLV_GUTI_TYPE, 0, 0, sizeof(tlv_guti_t), { NULL } }; tlv_desc_t tlv_desc_f_container_0 = { TLV_VAR_STR, "F-Container", TLV_F_CONTAINER_TYPE, 0, 0, sizeof(tlv_f_container_t), { NULL } }; tlv_desc_t tlv_desc_f_cause_0 = { TLV_VAR_STR, "F-Cause", TLV_F_CAUSE_TYPE, 0, 0, sizeof(tlv_f_cause_t), { NULL } }; tlv_desc_t tlv_desc_plmn_id_0 = { TLV_VAR_STR, "PLMN ID", TLV_PLMN_ID_TYPE, 0, 0, sizeof(tlv_plmn_id_t), { NULL } }; tlv_desc_t tlv_desc_target_identification_0 = { TLV_VAR_STR, "Target Identification", TLV_TARGET_IDENTIFICATION_TYPE, 0, 0, sizeof(tlv_target_identification_t), { NULL } }; tlv_desc_t tlv_desc_packet_flow_id_0 = { TLV_VAR_STR, "Packet Flow ID", TLV_PACKET_FLOW_ID_TYPE, 0, 0, sizeof(tlv_packet_flow_id_t), { NULL } }; tlv_desc_t tlv_desc_rab_context_0 = { TLV_VAR_STR, "RAB Context", TLV_RAB_CONTEXT_TYPE, 0, 0, sizeof(tlv_rab_context_t), { NULL } }; tlv_desc_t tlv_desc_source_rnc_pdcp_context_info_0 = { TLV_VAR_STR, "Source RNC PDCP Context Info", TLV_SOURCE_RNC_PDCP_CONTEXT_INFO_TYPE, 0, 0, sizeof(tlv_source_rnc_pdcp_context_info_t), { NULL } }; tlv_desc_t tlv_desc_port_number_0 = { TLV_UINT16, "Port Number", TLV_PORT_NUMBER_TYPE, 2, 0, sizeof(tlv_port_number_t), { NULL } }; tlv_desc_t tlv_desc_port_number_1 = { TLV_UINT16, "Port Number", TLV_PORT_NUMBER_TYPE, 2, 1, sizeof(tlv_port_number_t), { NULL } }; tlv_desc_t tlv_desc_port_number_2 = { TLV_UINT16, "Port Number", TLV_PORT_NUMBER_TYPE, 2, 2, sizeof(tlv_port_number_t), { NULL } }; tlv_desc_t tlv_desc_apn_restriction_0 = { TLV_UINT8, "APN Restriction", TLV_APN_RESTRICTION_TYPE, 1, 0, sizeof(tlv_apn_restriction_t), { NULL } }; tlv_desc_t tlv_desc_selection_mode_0 = { TLV_UINT8, "Selection Mode", TLV_SELECTION_MODE_TYPE, 1, 0, sizeof(tlv_selection_mode_t), { NULL } }; tlv_desc_t tlv_desc_source_identification_0 = { TLV_VAR_STR, "Source Identification", TLV_SOURCE_IDENTIFICATION_TYPE, 0, 0, sizeof(tlv_source_identification_t), { NULL } }; tlv_desc_t tlv_desc_change_reporting_action_0 = { TLV_VAR_STR, "Change Reporting Action", TLV_CHANGE_REPORTING_ACTION_TYPE, 0, 0, sizeof(tlv_change_reporting_action_t), { NULL } }; tlv_desc_t tlv_desc_fq_csid_0 = { TLV_VAR_STR, "FQ-CSID", TLV_FQ_CSID_TYPE, 0, 0, sizeof(tlv_fq_csid_t), { NULL } }; tlv_desc_t tlv_desc_fq_csid_1 = { TLV_VAR_STR, "FQ-CSID", TLV_FQ_CSID_TYPE, 0, 1, sizeof(tlv_fq_csid_t), { NULL } }; tlv_desc_t tlv_desc_fq_csid_2 = { TLV_VAR_STR, "FQ-CSID", TLV_FQ_CSID_TYPE, 0, 2, sizeof(tlv_fq_csid_t), { NULL } }; tlv_desc_t tlv_desc_fq_csid_3 = { TLV_VAR_STR, "FQ-CSID", TLV_FQ_CSID_TYPE, 0, 3, sizeof(tlv_fq_csid_t), { NULL } }; tlv_desc_t tlv_desc_channel_needed_0 = { TLV_VAR_STR, "Channel needed", TLV_CHANNEL_NEEDED_TYPE, 0, 0, sizeof(tlv_channel_needed_t), { NULL } }; tlv_desc_t tlv_desc_emlpp_priority_0 = { TLV_VAR_STR, "eMLPP Priority", TLV_EMLPP_PRIORITY_TYPE, 0, 0, sizeof(tlv_emlpp_priority_t), { NULL } }; tlv_desc_t tlv_desc_node_type_0 = { TLV_UINT8, "Node Type", TLV_NODE_TYPE_TYPE, 1, 0, sizeof(tlv_node_type_t), { NULL } }; tlv_desc_t tlv_desc_fqdn_0 = { TLV_VAR_STR, "FQDN", TLV_FQDN_TYPE, 0, 0, sizeof(tlv_fqdn_t), { NULL } }; tlv_desc_t tlv_desc_ti_0 = { TLV_VAR_STR, "TI", TLV_TI_TYPE, 0, 0, sizeof(tlv_ti_t), { NULL } }; tlv_desc_t tlv_desc_mbms_session_duration_0 = { TLV_VAR_STR, "MBMS Session Duration", TLV_MBMS_SESSION_DURATION_TYPE, 0, 0, sizeof(tlv_mbms_session_duration_t), { NULL } }; tlv_desc_t tlv_desc_mbms_service_area_0 = { TLV_VAR_STR, "MBMS Service Area", TLV_MBMS_SERVICE_AREA_TYPE, 0, 0, sizeof(tlv_mbms_service_area_t), { NULL } }; tlv_desc_t tlv_desc_mbms_session_identifier_0 = { TLV_VAR_STR, "MBMS Session Identifier", TLV_MBMS_SESSION_IDENTIFIER_TYPE, 0, 0, sizeof(tlv_mbms_session_identifier_t), { NULL } }; tlv_desc_t tlv_desc_mbms_flow_identifier_0 = { TLV_VAR_STR, "MBMS Flow Identifier", TLV_MBMS_FLOW_IDENTIFIER_TYPE, 0, 0, sizeof(tlv_mbms_flow_identifier_t), { NULL } }; tlv_desc_t tlv_desc_mbms_ip_multicast_distribution_0 = { TLV_VAR_STR, "MBMS IP Multicast Distribution", TLV_MBMS_IP_MULTICAST_DISTRIBUTION_TYPE, 0, 0, sizeof(tlv_mbms_ip_multicast_distribution_t), { NULL } }; tlv_desc_t tlv_desc_mbms_distribution_acknowledge_0 = { TLV_VAR_STR, "MBMS Distribution Acknowledge", TLV_MBMS_DISTRIBUTION_ACKNOWLEDGE_TYPE, 0, 0, sizeof(tlv_mbms_distribution_acknowledge_t), { NULL } }; tlv_desc_t tlv_desc_rfsp_index_0 = { TLV_VAR_STR, "RFSP Index", TLV_RFSP_INDEX_TYPE, 0, 0, sizeof(tlv_rfsp_index_t), { NULL } }; tlv_desc_t tlv_desc_uci_0 = { TLV_VAR_STR, "UCI", TLV_UCI_TYPE, 0, 0, sizeof(tlv_uci_t), { NULL } }; tlv_desc_t tlv_desc_csg_information_reporting_action_0 = { TLV_VAR_STR, "CSG Information Reporting Action", TLV_CSG_INFORMATION_REPORTING_ACTION_TYPE, 0, 0, sizeof(tlv_csg_information_reporting_action_t), { NULL } }; tlv_desc_t tlv_desc_csg_id_0 = { TLV_VAR_STR, "CSG ID", TLV_CSG_ID_TYPE, 0, 0, sizeof(tlv_csg_id_t), { NULL } }; tlv_desc_t tlv_desc_cmi_0 = { TLV_VAR_STR, "CMI", TLV_CMI_TYPE, 0, 0, sizeof(tlv_cmi_t), { NULL } }; tlv_desc_t tlv_desc_service_indicator_0 = { TLV_VAR_STR, "Service indicator", TLV_SERVICE_INDICATOR_TYPE, 0, 0, sizeof(tlv_service_indicator_t), { NULL } }; tlv_desc_t tlv_desc_detach_type_0 = { TLV_VAR_STR, "Detach Type", TLV_DETACH_TYPE_TYPE, 0, 0, sizeof(tlv_detach_type_t), { NULL } }; tlv_desc_t tlv_desc_ldn_0 = { TLV_VAR_STR, "LDN", TLV_LDN_TYPE, 0, 0, sizeof(tlv_ldn_t), { NULL } }; tlv_desc_t tlv_desc_ldn_1 = { TLV_VAR_STR, "LDN", TLV_LDN_TYPE, 0, 1, sizeof(tlv_ldn_t), { NULL } }; tlv_desc_t tlv_desc_ldn_2 = { TLV_VAR_STR, "LDN", TLV_LDN_TYPE, 0, 2, sizeof(tlv_ldn_t), { NULL } }; tlv_desc_t tlv_desc_ldn_3 = { TLV_VAR_STR, "LDN", TLV_LDN_TYPE, 0, 3, sizeof(tlv_ldn_t), { NULL } }; tlv_desc_t tlv_desc_node_features_0 = { TLV_VAR_STR, "Node Features", TLV_NODE_FEATURES_TYPE, 0, 0, sizeof(tlv_node_features_t), { NULL } }; tlv_desc_t tlv_desc_mbms_time_to_data_transfer_0 = { TLV_VAR_STR, "MBMS Time to Data Transfer", TLV_MBMS_TIME_TO_DATA_TRANSFER_TYPE, 0, 0, sizeof(tlv_mbms_time_to_data_transfer_t), { NULL } }; tlv_desc_t tlv_desc_throttling_0 = { TLV_VAR_STR, "Throttling", TLV_THROTTLING_TYPE, 0, 0, sizeof(tlv_throttling_t), { NULL } }; tlv_desc_t tlv_desc_arp_0 = { TLV_VAR_STR, "ARP", TLV_ARP_TYPE, 0, 0, sizeof(tlv_arp_t), { NULL } }; tlv_desc_t tlv_desc_epc_timer_0 = { TLV_VAR_STR, "EPC Timer", TLV_EPC_TIMER_TYPE, 0, 0, sizeof(tlv_epc_timer_t), { NULL } }; tlv_desc_t tlv_desc_signalling_priority_indication_0 = { TLV_VAR_STR, "Signalling Priority Indication", TLV_SIGNALLING_PRIORITY_INDICATION_TYPE, 0, 0, sizeof(tlv_signalling_priority_indication_t), { NULL } }; tlv_desc_t tlv_desc_tmgi_0 = { TLV_VAR_STR, "TMGI", TLV_TMGI_TYPE, 0, 0, sizeof(tlv_tmgi_t), { NULL } }; tlv_desc_t tlv_desc_additional_mm_context_for_srvcc_0 = { TLV_VAR_STR, "Additional MM context for SRVCC", TLV_ADDITIONAL_MM_CONTEXT_FOR_SRVCC_TYPE, 0, 0, sizeof(tlv_additional_mm_context_for_srvcc_t), { NULL } }; tlv_desc_t tlv_desc_additional_flags_for_srvcc_0 = { TLV_VAR_STR, "Additional flags for SRVCC", TLV_ADDITIONAL_FLAGS_FOR_SRVCC_TYPE, 0, 0, sizeof(tlv_additional_flags_for_srvcc_t), { NULL } }; tlv_desc_t tlv_desc_mdt_configuration_0 = { TLV_VAR_STR, "MDT Configuration", TLV_MDT_CONFIGURATION_TYPE, 0, 0, sizeof(tlv_mdt_configuration_t), { NULL } }; tlv_desc_t tlv_desc_apco_0 = { TLV_VAR_STR, "APCO", TLV_APCO_TYPE, 0, 0, sizeof(tlv_apco_t), { NULL } }; tlv_desc_t tlv_desc_absolute_time_of_mbms_data_transfer_0 = { TLV_VAR_STR, "Absolute Time of MBMS Data Transfer", TLV_ABSOLUTE_TIME_OF_MBMS_DATA_TRANSFER_TYPE, 0, 0, sizeof(tlv_absolute_time_of_mbms_data_transfer_t), { NULL } }; tlv_desc_t tlv_desc_enb_information_reporting_0 = { TLV_VAR_STR, "eNB Information Reporting", TLV_ENB_INFORMATION_REPORTING_TYPE, 0, 0, sizeof(tlv_enb_information_reporting_t), { NULL } }; tlv_desc_t tlv_desc_ip4cp_0 = { TLV_VAR_STR, "IP4CP", TLV_IP4CP_TYPE, 0, 0, sizeof(tlv_ip4cp_t), { NULL } }; tlv_desc_t tlv_desc_change_to_report_flags_0 = { TLV_VAR_STR, "Change to Report Flags", TLV_CHANGE_TO_REPORT_FLAGS_TYPE, 0, 0, sizeof(tlv_change_to_report_flags_t), { NULL } }; tlv_desc_t tlv_desc_action_indication_0 = { TLV_VAR_STR, "Action Indication", TLV_ACTION_INDICATION_TYPE, 0, 0, sizeof(tlv_action_indication_t), { NULL } }; tlv_desc_t tlv_desc_twan_identifier_0 = { TLV_VAR_STR, "TWAN Identifier", TLV_TWAN_IDENTIFIER_TYPE, 0, 0, sizeof(tlv_twan_identifier_t), { NULL } }; tlv_desc_t tlv_desc_twan_identifier_1 = { TLV_VAR_STR, "TWAN Identifier", TLV_TWAN_IDENTIFIER_TYPE, 0, 1, sizeof(tlv_twan_identifier_t), { NULL } }; tlv_desc_t tlv_desc_uli_timestamp_0 = { TLV_VAR_STR, "ULI Timestamp", TLV_ULI_TIMESTAMP_TYPE, 0, 0, sizeof(tlv_uli_timestamp_t), { NULL } }; tlv_desc_t tlv_desc_mbms_flags_0 = { TLV_VAR_STR, "MBMS Flags", TLV_MBMS_FLAGS_TYPE, 0, 0, sizeof(tlv_mbms_flags_t), { NULL } }; tlv_desc_t tlv_desc_ran_nas_cause_0 = { TLV_VAR_STR, "RAN/NAS Cause", TLV_RAN_NAS_CAUSE_TYPE, 0, 0, sizeof(tlv_ran_nas_cause_t), { NULL } }; tlv_desc_t tlv_desc_cn_operator_selection_entity_0 = { TLV_VAR_STR, "CN Operator Selection Entity", TLV_CN_OPERATOR_SELECTION_ENTITY_TYPE, 0, 0, sizeof(tlv_cn_operator_selection_entity_t), { NULL } }; tlv_desc_t tlv_desc_twmi_0 = { TLV_VAR_STR, "TWMI", TLV_TWMI_TYPE, 0, 0, sizeof(tlv_twmi_t), { NULL } }; tlv_desc_t tlv_desc_node_number_0 = { TLV_VAR_STR, "Node Number", TLV_NODE_NUMBER_TYPE, 0, 0, sizeof(tlv_node_number_t), { NULL } }; tlv_desc_t tlv_desc_node_identifier_0 = { TLV_VAR_STR, "Node Identifier", TLV_NODE_IDENTIFIER_TYPE, 0, 0, sizeof(tlv_node_identifier_t), { NULL } }; tlv_desc_t tlv_desc_presence_reporting_area_action_0 = { TLV_VAR_STR, "Presence Reporting Area Action", TLV_PRESENCE_REPORTING_AREA_ACTION_TYPE, 0, 0, sizeof(tlv_presence_reporting_area_action_t), { NULL } }; tlv_desc_t tlv_desc_presence_reporting_area_information_0 = { TLV_VAR_STR, "Presence Reporting Area Information", TLV_PRESENCE_REPORTING_AREA_INFORMATION_TYPE, 0, 0, sizeof(tlv_presence_reporting_area_information_t), { NULL } }; tlv_desc_t tlv_desc_twan_identifier_timestamp_0 = { TLV_VAR_STR, "TWAN Identifier Timestamp", TLV_TWAN_IDENTIFIER_TIMESTAMP_TYPE, 0, 0, sizeof(tlv_twan_identifier_timestamp_t), { NULL } }; tlv_desc_t tlv_desc_twan_identifier_timestamp_1 = { TLV_VAR_STR, "TWAN Identifier Timestamp", TLV_TWAN_IDENTIFIER_TIMESTAMP_TYPE, 0, 1, sizeof(tlv_twan_identifier_timestamp_t), { NULL } }; tlv_desc_t tlv_desc_metric_0 = { TLV_VAR_STR, "Metric", TLV_METRIC_TYPE, 0, 0, sizeof(tlv_metric_t), { NULL } }; tlv_desc_t tlv_desc_sequence_number_0 = { TLV_VAR_STR, "Sequence Number", TLV_SEQUENCE_NUMBER_TYPE, 0, 0, sizeof(tlv_sequence_number_t), { NULL } }; tlv_desc_t tlv_desc_apn_and_relative_capacity_0 = { TLV_VAR_STR, "APN and Relative Capacity", TLV_APN_AND_RELATIVE_CAPACITY_TYPE, 0, 0, sizeof(tlv_apn_and_relative_capacity_t), { NULL } }; tlv_desc_t tlv_desc_wlan_offloadability_indication_0 = { TLV_VAR_STR, "WLAN Offloadability Indication", TLV_WLAN_OFFLOADABILITY_INDICATION_TYPE, 0, 0, sizeof(tlv_wlan_offloadability_indication_t), { NULL } }; tlv_desc_t tlv_desc_paging_and_service_information_0 = { TLV_VAR_STR, "Paging and Service Information", TLV_PAGING_AND_SERVICE_INFORMATION_TYPE, 0, 0, sizeof(tlv_paging_and_service_information_t), { NULL } }; tlv_desc_t tlv_desc_integer_number_0 = { TLV_VAR_STR, "Integer Number", TLV_INTEGER_NUMBER_TYPE, 0, 0, sizeof(tlv_integer_number_t), { NULL } }; tlv_desc_t tlv_desc_millisecond_time_stamp_0 = { TLV_VAR_STR, "Millisecond Time Stamp", TLV_MILLISECOND_TIME_STAMP_TYPE, 0, 0, sizeof(tlv_millisecond_time_stamp_t), { NULL } }; tlv_desc_t tlv_desc_monitoring_event_information_0 = { TLV_VAR_STR, "Monitoring Event Information", TLV_MONITORING_EVENT_INFORMATION_TYPE, 0, 0, sizeof(tlv_monitoring_event_information_t), { NULL } }; tlv_desc_t tlv_desc_ecgi_list_0 = { TLV_VAR_STR, "ECGI List", TLV_ECGI_LIST_TYPE, 0, 0, sizeof(tlv_ecgi_list_t), { NULL } }; tlv_desc_t tlv_desc_remote_user_id_0 = { TLV_VAR_STR, "Remote User ID", TLV_REMOTE_USER_ID_TYPE, 0, 0, sizeof(tlv_remote_user_id_t), { NULL } }; tlv_desc_t tlv_desc_remote_ue_ip_information_0 = { TLV_VAR_STR, "Remote UE IP Information", TLV_REMOTE_UE_IP_INFORMATION_TYPE, 0, 0, sizeof(tlv_remote_ue_ip_information_t), { NULL } }; tlv_desc_t tlv_desc_ciot_optimizations_support_indication_0 = { TLV_VAR_STR, "CIoT Optimizations Support Indication", TLV_CIOT_OPTIMIZATIONS_SUPPORT_INDICATION_TYPE, 0, 0, sizeof(tlv_ciot_optimizations_support_indication_t), { NULL } }; tlv_desc_t tlv_desc_header_compression_configuration_0 = { TLV_VAR_STR, "Header Compression Configuration", TLV_HEADER_COMPRESSION_CONFIGURATION_TYPE, 0, 0, sizeof(tlv_header_compression_configuration_t), { NULL } }; tlv_desc_t tlv_desc_epco_0 = { TLV_VAR_STR, "ePCO", TLV_EPCO_TYPE, 0, 0, sizeof(tlv_epco_t), { NULL } }; tlv_desc_t tlv_desc_serving_plmn_rate_control_0 = { TLV_VAR_STR, "Serving PLMN Rate Control", TLV_SERVING_PLMN_RATE_CONTROL_TYPE, 0, 0, sizeof(tlv_serving_plmn_rate_control_t), { NULL } }; tlv_desc_t tlv_desc_counter_0 = { TLV_VAR_STR, "Counter", TLV_COUNTER_TYPE, 0, 0, sizeof(tlv_counter_t), { NULL } }; tlv_desc_t tlv_desc_bearer_context_0 = { TLV_COMPOUND, "Bearer Context", TLV_BEARER_CONTEXT_TYPE, 0, 0, sizeof(tlv_bearer_context_t), { &tlv_desc_ebi_0, &tlv_desc_bearer_tft_0, &tlv_desc_f_teid_0, &tlv_desc_f_teid_1, &tlv_desc_f_teid_2, &tlv_desc_f_teid_3, &tlv_desc_f_teid_4, &tlv_desc_f_teid_5, &tlv_desc_f_teid_6, &tlv_desc_bearer_qos_0, &tlv_desc_f_teid_7, &tlv_desc_cause_0, &tlv_desc_charging_id_0, &tlv_desc_bearer_flags_0, &tlv_desc_pco_0, &tlv_desc_epco_0, &tlv_desc_f_teid_8, &tlv_desc_f_teid_9, &tlv_desc_f_teid_10, &tlv_desc_f_teid_11, &tlv_desc_ran_nas_cause_0, &tlv_desc_apco_0, &tlv_desc_f_container_0, &tlv_desc_ti_0, &tlv_desc_packet_flow_id_0, NULL, } }; tlv_desc_t tlv_desc_bearer_context_1 = { TLV_COMPOUND, "Bearer Context", TLV_BEARER_CONTEXT_TYPE, 0, 1, sizeof(tlv_bearer_context_t), { &tlv_desc_ebi_0, &tlv_desc_bearer_tft_0, &tlv_desc_f_teid_0, &tlv_desc_f_teid_1, &tlv_desc_f_teid_2, &tlv_desc_f_teid_3, &tlv_desc_f_teid_4, &tlv_desc_f_teid_5, &tlv_desc_f_teid_6, &tlv_desc_bearer_qos_0, &tlv_desc_f_teid_7, &tlv_desc_cause_0, &tlv_desc_charging_id_0, &tlv_desc_bearer_flags_0, &tlv_desc_pco_0, &tlv_desc_epco_0, &tlv_desc_f_teid_8, &tlv_desc_f_teid_9, &tlv_desc_f_teid_10, &tlv_desc_f_teid_11, &tlv_desc_ran_nas_cause_0, &tlv_desc_apco_0, &tlv_desc_f_container_0, &tlv_desc_ti_0, &tlv_desc_packet_flow_id_0, NULL, } }; tlv_desc_t tlv_desc_bearer_context_2 = { TLV_COMPOUND, "Bearer Context", TLV_BEARER_CONTEXT_TYPE, 0, 2, sizeof(tlv_bearer_context_t), { &tlv_desc_ebi_0, &tlv_desc_bearer_tft_0, &tlv_desc_f_teid_0, &tlv_desc_f_teid_1, &tlv_desc_f_teid_2, &tlv_desc_f_teid_3, &tlv_desc_f_teid_4, &tlv_desc_f_teid_5, &tlv_desc_f_teid_6, &tlv_desc_bearer_qos_0, &tlv_desc_f_teid_7, &tlv_desc_cause_0, &tlv_desc_charging_id_0, &tlv_desc_bearer_flags_0, &tlv_desc_pco_0, &tlv_desc_epco_0, &tlv_desc_f_teid_8, &tlv_desc_f_teid_9, &tlv_desc_f_teid_10, &tlv_desc_f_teid_11, &tlv_desc_ran_nas_cause_0, &tlv_desc_apco_0, &tlv_desc_f_container_0, &tlv_desc_ti_0, &tlv_desc_packet_flow_id_0, NULL, } }; tlv_desc_t tlv_desc_bearer_context_3 = { TLV_COMPOUND, "Bearer Context", TLV_BEARER_CONTEXT_TYPE, 0, 3, sizeof(tlv_bearer_context_t), { &tlv_desc_ebi_0, &tlv_desc_bearer_tft_0, &tlv_desc_f_teid_0, &tlv_desc_f_teid_1, &tlv_desc_f_teid_2, &tlv_desc_f_teid_3, &tlv_desc_f_teid_4, &tlv_desc_f_teid_5, &tlv_desc_f_teid_6, &tlv_desc_bearer_qos_0, &tlv_desc_f_teid_7, &tlv_desc_cause_0, &tlv_desc_charging_id_0, &tlv_desc_bearer_flags_0, &tlv_desc_pco_0, &tlv_desc_epco_0, &tlv_desc_f_teid_8, &tlv_desc_f_teid_9, &tlv_desc_f_teid_10, &tlv_desc_f_teid_11, &tlv_desc_ran_nas_cause_0, &tlv_desc_apco_0, &tlv_desc_f_container_0, &tlv_desc_ti_0, &tlv_desc_packet_flow_id_0, NULL, } }; tlv_desc_t tlv_desc_bearer_context_4 = { TLV_COMPOUND, "Bearer Context", TLV_BEARER_CONTEXT_TYPE, 0, 4, sizeof(tlv_bearer_context_t), { &tlv_desc_ebi_0, &tlv_desc_bearer_tft_0, &tlv_desc_f_teid_0, &tlv_desc_f_teid_1, &tlv_desc_f_teid_2, &tlv_desc_f_teid_3, &tlv_desc_f_teid_4, &tlv_desc_f_teid_5, &tlv_desc_f_teid_6, &tlv_desc_bearer_qos_0, &tlv_desc_f_teid_7, &tlv_desc_cause_0, &tlv_desc_charging_id_0, &tlv_desc_bearer_flags_0, &tlv_desc_pco_0, &tlv_desc_epco_0, &tlv_desc_f_teid_8, &tlv_desc_f_teid_9, &tlv_desc_f_teid_10, &tlv_desc_f_teid_11, &tlv_desc_ran_nas_cause_0, &tlv_desc_apco_0, &tlv_desc_f_container_0, &tlv_desc_ti_0, &tlv_desc_packet_flow_id_0, NULL, } }; tlv_desc_t tlv_desc_bearer_context_5 = { TLV_COMPOUND, "Bearer Context", TLV_BEARER_CONTEXT_TYPE, 0, 5, sizeof(tlv_bearer_context_t), { &tlv_desc_ebi_0, &tlv_desc_bearer_tft_0, &tlv_desc_f_teid_0, &tlv_desc_f_teid_1, &tlv_desc_f_teid_2, &tlv_desc_f_teid_3, &tlv_desc_f_teid_4, &tlv_desc_f_teid_5, &tlv_desc_f_teid_6, &tlv_desc_bearer_qos_0, &tlv_desc_f_teid_7, &tlv_desc_cause_0, &tlv_desc_charging_id_0, &tlv_desc_bearer_flags_0, &tlv_desc_pco_0, &tlv_desc_epco_0, &tlv_desc_f_teid_8, &tlv_desc_f_teid_9, &tlv_desc_f_teid_10, &tlv_desc_f_teid_11, &tlv_desc_ran_nas_cause_0, &tlv_desc_apco_0, &tlv_desc_f_container_0, &tlv_desc_ti_0, &tlv_desc_packet_flow_id_0, NULL, } }; tlv_desc_t tlv_desc_bearer_context_6 = { TLV_COMPOUND, "Bearer Context", TLV_BEARER_CONTEXT_TYPE, 0, 6, sizeof(tlv_bearer_context_t), { &tlv_desc_ebi_0, &tlv_desc_bearer_tft_0, &tlv_desc_f_teid_0, &tlv_desc_f_teid_1, &tlv_desc_f_teid_2, &tlv_desc_f_teid_3, &tlv_desc_f_teid_4, &tlv_desc_f_teid_5, &tlv_desc_f_teid_6, &tlv_desc_bearer_qos_0, &tlv_desc_f_teid_7, &tlv_desc_cause_0, &tlv_desc_charging_id_0, &tlv_desc_bearer_flags_0, &tlv_desc_pco_0, &tlv_desc_epco_0, &tlv_desc_f_teid_8, &tlv_desc_f_teid_9, &tlv_desc_f_teid_10, &tlv_desc_f_teid_11, &tlv_desc_ran_nas_cause_0, &tlv_desc_apco_0, &tlv_desc_f_container_0, &tlv_desc_ti_0, &tlv_desc_packet_flow_id_0, NULL, } }; tlv_desc_t tlv_desc_bearer_context_7 = { TLV_COMPOUND, "Bearer Context", TLV_BEARER_CONTEXT_TYPE, 0, 7, sizeof(tlv_bearer_context_t), { &tlv_desc_ebi_0, &tlv_desc_bearer_tft_0, &tlv_desc_f_teid_0, &tlv_desc_f_teid_1, &tlv_desc_f_teid_2, &tlv_desc_f_teid_3, &tlv_desc_f_teid_4, &tlv_desc_f_teid_5, &tlv_desc_f_teid_6, &tlv_desc_bearer_qos_0, &tlv_desc_f_teid_7, &tlv_desc_cause_0, &tlv_desc_charging_id_0, &tlv_desc_bearer_flags_0, &tlv_desc_pco_0, &tlv_desc_epco_0, &tlv_desc_f_teid_8, &tlv_desc_f_teid_9, &tlv_desc_f_teid_10, &tlv_desc_f_teid_11, &tlv_desc_ran_nas_cause_0, &tlv_desc_apco_0, &tlv_desc_f_container_0, &tlv_desc_ti_0, &tlv_desc_packet_flow_id_0, NULL, } }; tlv_desc_t tlv_desc_bearer_context_8 = { TLV_COMPOUND, "Bearer Context", TLV_BEARER_CONTEXT_TYPE, 0, 8, sizeof(tlv_bearer_context_t), { &tlv_desc_ebi_0, &tlv_desc_bearer_tft_0, &tlv_desc_f_teid_0, &tlv_desc_f_teid_1, &tlv_desc_f_teid_2, &tlv_desc_f_teid_3, &tlv_desc_f_teid_4, &tlv_desc_f_teid_5, &tlv_desc_f_teid_6, &tlv_desc_bearer_qos_0, &tlv_desc_f_teid_7, &tlv_desc_cause_0, &tlv_desc_charging_id_0, &tlv_desc_bearer_flags_0, &tlv_desc_pco_0, &tlv_desc_epco_0, &tlv_desc_f_teid_8, &tlv_desc_f_teid_9, &tlv_desc_f_teid_10, &tlv_desc_f_teid_11, &tlv_desc_ran_nas_cause_0, &tlv_desc_apco_0, &tlv_desc_f_container_0, &tlv_desc_ti_0, &tlv_desc_packet_flow_id_0, NULL, } }; tlv_desc_t tlv_desc_bearer_context_9 = { TLV_COMPOUND, "Bearer Context", TLV_BEARER_CONTEXT_TYPE, 0, 9, sizeof(tlv_bearer_context_t), { &tlv_desc_ebi_0, &tlv_desc_bearer_tft_0, &tlv_desc_f_teid_0, &tlv_desc_f_teid_1, &tlv_desc_f_teid_2, &tlv_desc_f_teid_3, &tlv_desc_f_teid_4, &tlv_desc_f_teid_5, &tlv_desc_f_teid_6, &tlv_desc_bearer_qos_0, &tlv_desc_f_teid_7, &tlv_desc_cause_0, &tlv_desc_charging_id_0, &tlv_desc_bearer_flags_0, &tlv_desc_pco_0, &tlv_desc_epco_0, &tlv_desc_f_teid_8, &tlv_desc_f_teid_9, &tlv_desc_f_teid_10, &tlv_desc_f_teid_11, &tlv_desc_ran_nas_cause_0, &tlv_desc_apco_0, &tlv_desc_f_container_0, &tlv_desc_ti_0, &tlv_desc_packet_flow_id_0, NULL, } }; tlv_desc_t tlv_desc_bearer_context_10 = { TLV_COMPOUND, "Bearer Context", TLV_BEARER_CONTEXT_TYPE, 0, 10, sizeof(tlv_bearer_context_t), { &tlv_desc_ebi_0, &tlv_desc_bearer_tft_0, &tlv_desc_f_teid_0, &tlv_desc_f_teid_1, &tlv_desc_f_teid_2, &tlv_desc_f_teid_3, &tlv_desc_f_teid_4, &tlv_desc_f_teid_5, &tlv_desc_f_teid_6, &tlv_desc_bearer_qos_0, &tlv_desc_f_teid_7, &tlv_desc_cause_0, &tlv_desc_charging_id_0, &tlv_desc_bearer_flags_0, &tlv_desc_pco_0, &tlv_desc_epco_0, &tlv_desc_f_teid_8, &tlv_desc_f_teid_9, &tlv_desc_f_teid_10, &tlv_desc_f_teid_11, &tlv_desc_ran_nas_cause_0, &tlv_desc_apco_0, &tlv_desc_f_container_0, &tlv_desc_ti_0, &tlv_desc_packet_flow_id_0, NULL, } }; tlv_desc_t tlv_desc_pdn_connection_0 = { TLV_COMPOUND, "PDN Connection", TLV_PDN_CONNECTION_TYPE, 0, 0, sizeof(tlv_pdn_connection_t), { NULL, } }; tlv_desc_t tlv_desc_overload_control_information_0 = { TLV_COMPOUND, "Overload Control Information", TLV_OVERLOAD_CONTROL_INFORMATION_TYPE, 0, 0, sizeof(tlv_overload_control_information_t), { &tlv_desc_sequence_number_0, &tlv_desc_metric_0, &tlv_desc_epc_timer_0, &tlv_desc_apn_0, NULL, } }; tlv_desc_t tlv_desc_overload_control_information_1 = { TLV_COMPOUND, "Overload Control Information", TLV_OVERLOAD_CONTROL_INFORMATION_TYPE, 0, 1, sizeof(tlv_overload_control_information_t), { &tlv_desc_sequence_number_0, &tlv_desc_metric_0, &tlv_desc_epc_timer_0, &tlv_desc_apn_0, NULL, } }; tlv_desc_t tlv_desc_overload_control_information_2 = { TLV_COMPOUND, "Overload Control Information", TLV_OVERLOAD_CONTROL_INFORMATION_TYPE, 0, 2, sizeof(tlv_overload_control_information_t), { &tlv_desc_sequence_number_0, &tlv_desc_metric_0, &tlv_desc_epc_timer_0, &tlv_desc_apn_0, NULL, } }; tlv_desc_t tlv_desc_load_control_information_0 = { TLV_COMPOUND, "Load Control Information", TLV_LOAD_CONTROL_INFORMATION_TYPE, 0, 0, sizeof(tlv_load_control_information_t), { &tlv_desc_sequence_number_0, &tlv_desc_metric_0, &tlv_desc_apn_and_relative_capacity_0, NULL, } }; tlv_desc_t tlv_desc_load_control_information_1 = { TLV_COMPOUND, "Load Control Information", TLV_LOAD_CONTROL_INFORMATION_TYPE, 0, 1, sizeof(tlv_load_control_information_t), { &tlv_desc_sequence_number_0, &tlv_desc_metric_0, &tlv_desc_apn_and_relative_capacity_0, NULL, } }; tlv_desc_t tlv_desc_load_control_information_2 = { TLV_COMPOUND, "Load Control Information", TLV_LOAD_CONTROL_INFORMATION_TYPE, 0, 2, sizeof(tlv_load_control_information_t), { &tlv_desc_sequence_number_0, &tlv_desc_metric_0, &tlv_desc_apn_and_relative_capacity_0, NULL, } }; tlv_desc_t tlv_desc_remote_ue_context_0 = { TLV_COMPOUND, "Remote UE Context", TLV_REMOTE_UE_CONTEXT_TYPE, 0, 0, sizeof(tlv_remote_ue_context_t), { &tlv_desc_remote_user_id_0, &tlv_desc_remote_ue_ip_information_0, NULL, } }; tlv_desc_t tlv_desc_scef_pdn_connection_0 = { TLV_COMPOUND, "SCEF PDN Connection", TLV_SCEF_PDN_CONNECTION_TYPE, 0, 0, sizeof(tlv_scef_pdn_connection_t), { &tlv_desc_apn_0, &tlv_desc_ebi_0, &tlv_desc_node_identifier_0, NULL, } }; tlv_desc_t tlv_desc_echo_request = { TLV_MESSAGE, "Echo Request", 0, 0, 0, 0, { &tlv_desc_recovery_0, &tlv_desc_node_features_0, NULL, }}; tlv_desc_t tlv_desc_echo_response = { TLV_MESSAGE, "Echo Response", 0, 0, 0, 0, { &tlv_desc_recovery_0, &tlv_desc_node_features_0, NULL, }}; tlv_desc_t tlv_desc_create_session_request = { TLV_MESSAGE, "Create Session Request", 0, 0, 0, 0, { &tlv_desc_imsi_0, &tlv_desc_msisdn_0, &tlv_desc_mei_0, &tlv_desc_uli_0, &tlv_desc_serving_network_0, &tlv_desc_rat_type_0, &tlv_desc_indication_0, &tlv_desc_f_teid_0, &tlv_desc_f_teid_1, &tlv_desc_apn_0, &tlv_desc_selection_mode_0, &tlv_desc_pdn_type_0, &tlv_desc_paa_0, &tlv_desc_apn_restriction_0, &tlv_desc_ambr_0, &tlv_desc_ebi_0, &tlv_desc_twmi_0, &tlv_desc_pco_0, &tlv_desc_bearer_context_0, &tlv_desc_bearer_context_1, &tlv_desc_trace_information_0, &tlv_desc_recovery_0, &tlv_desc_fq_csid_0, &tlv_desc_fq_csid_1, &tlv_desc_fq_csid_2, &tlv_desc_fq_csid_3, &tlv_desc_ue_time_zone_0, &tlv_desc_uci_0, &tlv_desc_charging_characteristics_0, &tlv_desc_ldn_0, &tlv_desc_ldn_1, &tlv_desc_ldn_2, &tlv_desc_ldn_3, &tlv_desc_signalling_priority_indication_0, &tlv_desc_ip_address_0, &tlv_desc_port_number_0, &tlv_desc_apco_0, &tlv_desc_ip_address_1, &tlv_desc_port_number_1, &tlv_desc_ip_address_2, &tlv_desc_twan_identifier_0, &tlv_desc_ip_address_3, &tlv_desc_cn_operator_selection_entity_0, &tlv_desc_presence_reporting_area_information_0, &tlv_desc_overload_control_information_0, &tlv_desc_overload_control_information_1, &tlv_desc_overload_control_information_2, &tlv_desc_millisecond_time_stamp_0, &tlv_desc_integer_number_0, &tlv_desc_twan_identifier_1, &tlv_desc_twan_identifier_timestamp_0, &tlv_desc_f_container_0, &tlv_desc_remote_ue_context_0, &tlv_desc_node_identifier_0, &tlv_desc_epco_0, &tlv_desc_serving_plmn_rate_control_0, &tlv_desc_counter_0, &tlv_desc_port_number_2, NULL, }}; tlv_desc_t tlv_desc_create_session_response = { TLV_MESSAGE, "Create Session Response", 0, 0, 0, 0, { &tlv_desc_cause_0, &tlv_desc_change_reporting_action_0, &tlv_desc_csg_information_reporting_action_0, &tlv_desc_enb_information_reporting_0, &tlv_desc_f_teid_0, &tlv_desc_f_teid_1, &tlv_desc_paa_0, &tlv_desc_apn_restriction_0, &tlv_desc_ambr_0, &tlv_desc_ebi_0, &tlv_desc_pco_0, &tlv_desc_bearer_context_0, &tlv_desc_bearer_context_1, &tlv_desc_recovery_0, &tlv_desc_fqdn_0, &tlv_desc_ip_address_0, &tlv_desc_fq_csid_0, &tlv_desc_fq_csid_1, &tlv_desc_ldn_0, &tlv_desc_ldn_1, &tlv_desc_epc_timer_0, &tlv_desc_apco_0, &tlv_desc_ip4cp_0, &tlv_desc_indication_0, &tlv_desc_presence_reporting_area_action_0, &tlv_desc_load_control_information_0, &tlv_desc_load_control_information_1, &tlv_desc_load_control_information_2, &tlv_desc_overload_control_information_0, &tlv_desc_overload_control_information_1, &tlv_desc_f_container_0, &tlv_desc_charging_id_0, &tlv_desc_epco_0, NULL, }}; tlv_desc_t tlv_desc_modify_bearer_request = { TLV_MESSAGE, "Modify Bearer Request", 0, 0, 0, 0, { &tlv_desc_mei_0, &tlv_desc_uli_0, &tlv_desc_serving_network_0, &tlv_desc_rat_type_0, &tlv_desc_indication_0, &tlv_desc_f_teid_0, &tlv_desc_ambr_0, &tlv_desc_delay_value_0, &tlv_desc_bearer_context_0, &tlv_desc_bearer_context_1, &tlv_desc_recovery_0, &tlv_desc_ue_time_zone_0, &tlv_desc_fq_csid_0, &tlv_desc_uci_0, &tlv_desc_ip_address_1, &tlv_desc_port_number_1, &tlv_desc_ldn_0, &tlv_desc_ldn_1, &tlv_desc_ip_address_0, &tlv_desc_port_number_0, &tlv_desc_ip_address_2, &tlv_desc_cn_operator_selection_entity_0, &tlv_desc_presence_reporting_area_information_0, &tlv_desc_overload_control_information_0, &tlv_desc_overload_control_information_1, &tlv_desc_overload_control_information_2, &tlv_desc_serving_plmn_rate_control_0, &tlv_desc_counter_0, NULL, }}; tlv_desc_t tlv_desc_modify_bearer_response = { TLV_MESSAGE, "Modify Bearer Response", 0, 0, 0, 0, { &tlv_desc_cause_0, &tlv_desc_msisdn_0, &tlv_desc_ebi_0, &tlv_desc_apn_restriction_0, &tlv_desc_pco_0, &tlv_desc_bearer_context_0, &tlv_desc_bearer_context_1, &tlv_desc_change_reporting_action_0, &tlv_desc_csg_information_reporting_action_0, &tlv_desc_enb_information_reporting_0, &tlv_desc_fqdn_0, &tlv_desc_ip_address_0, &tlv_desc_fq_csid_0, &tlv_desc_fq_csid_1, &tlv_desc_recovery_0, &tlv_desc_ldn_0, &tlv_desc_ldn_1, &tlv_desc_indication_0, &tlv_desc_presence_reporting_area_action_0, &tlv_desc_load_control_information_0, &tlv_desc_load_control_information_1, &tlv_desc_load_control_information_2, &tlv_desc_overload_control_information_0, &tlv_desc_overload_control_information_1, &tlv_desc_charging_id_0, NULL, }}; tlv_desc_t tlv_desc_delete_session_request = { TLV_MESSAGE, "Delete Session Request", 0, 0, 0, 0, { &tlv_desc_cause_0, &tlv_desc_ebi_0, &tlv_desc_uli_0, &tlv_desc_indication_0, &tlv_desc_pco_0, &tlv_desc_node_type_0, &tlv_desc_f_teid_0, &tlv_desc_ue_time_zone_0, &tlv_desc_uli_timestamp_0, &tlv_desc_ran_nas_cause_0, &tlv_desc_twan_identifier_0, &tlv_desc_twan_identifier_timestamp_0, &tlv_desc_overload_control_information_0, &tlv_desc_overload_control_information_1, &tlv_desc_overload_control_information_2, &tlv_desc_twan_identifier_1, &tlv_desc_twan_identifier_timestamp_1, &tlv_desc_ip_address_0, &tlv_desc_port_number_0, &tlv_desc_epco_0, &tlv_desc_port_number_1, NULL, }}; tlv_desc_t tlv_desc_delete_session_response = { TLV_MESSAGE, "Delete Session Response", 0, 0, 0, 0, { &tlv_desc_cause_0, &tlv_desc_recovery_0, &tlv_desc_pco_0, &tlv_desc_indication_0, &tlv_desc_load_control_information_0, &tlv_desc_load_control_information_1, &tlv_desc_load_control_information_2, &tlv_desc_overload_control_information_0, &tlv_desc_overload_control_information_1, &tlv_desc_epco_0, NULL, }}; tlv_desc_t tlv_desc_modify_bearer_command = { TLV_MESSAGE, "Modify Bearer Command", 0, 0, 0, 0, { &tlv_desc_ambr_0, &tlv_desc_bearer_context_0, &tlv_desc_overload_control_information_0, &tlv_desc_overload_control_information_1, &tlv_desc_overload_control_information_2, &tlv_desc_f_teid_0, NULL, }}; tlv_desc_t tlv_desc_modify_bearer_failure_indication = { TLV_MESSAGE, "Modify Bearer Failure Indication", 0, 0, 0, 0, { &tlv_desc_cause_0, &tlv_desc_recovery_0, &tlv_desc_indication_0, &tlv_desc_overload_control_information_0, &tlv_desc_overload_control_information_1, NULL, }}; tlv_desc_t tlv_desc_delete_bearer_command = { TLV_MESSAGE, "Delete Bearer Command", 0, 0, 0, 0, { &tlv_desc_bearer_context_0, &tlv_desc_uli_0, &tlv_desc_uli_timestamp_0, &tlv_desc_ue_time_zone_0, &tlv_desc_overload_control_information_0, &tlv_desc_overload_control_information_1, &tlv_desc_f_teid_0, NULL, }}; tlv_desc_t tlv_desc_delete_bearer_failure_indication = { TLV_MESSAGE, "Delete Bearer Failure Indication", 0, 0, 0, 0, { &tlv_desc_cause_0, &tlv_desc_bearer_context_0, &tlv_desc_recovery_0, &tlv_desc_indication_0, &tlv_desc_overload_control_information_0, &tlv_desc_overload_control_information_1, NULL, }}; tlv_desc_t tlv_desc_downlink_data_notification_failure_indication = { TLV_MESSAGE, "Downlink Data Notification Failure Indication", 0, 0, 0, 0, { &tlv_desc_cause_0, &tlv_desc_node_type_0, &tlv_desc_imsi_0, NULL, }}; tlv_desc_t tlv_desc_create_bearer_request = { TLV_MESSAGE, "Create Bearer Request", 0, 0, 0, 0, { &tlv_desc_pti_0, &tlv_desc_ebi_0, &tlv_desc_pco_0, &tlv_desc_bearer_context_0, &tlv_desc_fq_csid_0, &tlv_desc_fq_csid_1, &tlv_desc_change_reporting_action_0, &tlv_desc_csg_information_reporting_action_0, &tlv_desc_enb_information_reporting_0, &tlv_desc_presence_reporting_area_action_0, &tlv_desc_indication_0, &tlv_desc_load_control_information_0, &tlv_desc_load_control_information_1, &tlv_desc_load_control_information_2, &tlv_desc_overload_control_information_0, &tlv_desc_overload_control_information_1, &tlv_desc_f_container_0, NULL, }}; tlv_desc_t tlv_desc_create_bearer_response = { TLV_MESSAGE, "Create Bearer Response", 0, 0, 0, 0, { &tlv_desc_cause_0, &tlv_desc_bearer_context_0, &tlv_desc_recovery_0, &tlv_desc_fq_csid_0, &tlv_desc_fq_csid_2, &tlv_desc_fq_csid_3, &tlv_desc_pco_0, &tlv_desc_ue_time_zone_0, &tlv_desc_uli_0, &tlv_desc_twan_identifier_0, &tlv_desc_overload_control_information_0, &tlv_desc_overload_control_information_1, &tlv_desc_presence_reporting_area_information_0, &tlv_desc_ip_address_0, &tlv_desc_overload_control_information_2, &tlv_desc_twan_identifier_1, &tlv_desc_twan_identifier_timestamp_1, &tlv_desc_port_number_0, &tlv_desc_f_container_0, &tlv_desc_port_number_1, NULL, }}; tlv_desc_t tlv_desc_update_bearer_request = { TLV_MESSAGE, "Update Bearer Request", 0, 0, 0, 0, { &tlv_desc_bearer_context_0, &tlv_desc_pti_0, &tlv_desc_pco_0, &tlv_desc_ambr_0, &tlv_desc_change_reporting_action_0, &tlv_desc_csg_information_reporting_action_0, &tlv_desc_enb_information_reporting_0, &tlv_desc_indication_0, &tlv_desc_fq_csid_0, &tlv_desc_fq_csid_1, &tlv_desc_presence_reporting_area_action_0, &tlv_desc_load_control_information_0, &tlv_desc_load_control_information_1, &tlv_desc_load_control_information_2, &tlv_desc_overload_control_information_0, &tlv_desc_overload_control_information_1, &tlv_desc_f_container_0, NULL, }}; tlv_desc_t tlv_desc_update_bearer_response = { TLV_MESSAGE, "Update Bearer Response", 0, 0, 0, 0, { &tlv_desc_cause_0, &tlv_desc_bearer_context_0, &tlv_desc_pco_0, &tlv_desc_recovery_0, &tlv_desc_fq_csid_0, &tlv_desc_fq_csid_1, &tlv_desc_fq_csid_2, &tlv_desc_fq_csid_3, &tlv_desc_indication_0, &tlv_desc_ue_time_zone_0, &tlv_desc_uli_0, &tlv_desc_twan_identifier_0, &tlv_desc_overload_control_information_0, &tlv_desc_overload_control_information_1, &tlv_desc_presence_reporting_area_information_0, &tlv_desc_ip_address_0, &tlv_desc_overload_control_information_2, &tlv_desc_twan_identifier_1, &tlv_desc_twan_identifier_timestamp_1, &tlv_desc_port_number_0, &tlv_desc_f_container_0, &tlv_desc_port_number_1, NULL, }}; tlv_desc_t tlv_desc_delete_bearer_request = { TLV_MESSAGE, "Delete Bearer Request", 0, 0, 0, 0, { &tlv_desc_ebi_0, &tlv_desc_ebi_1, &tlv_desc_bearer_context_0, &tlv_desc_pti_0, &tlv_desc_pco_0, &tlv_desc_fq_csid_0, &tlv_desc_fq_csid_1, &tlv_desc_cause_0, &tlv_desc_indication_0, &tlv_desc_load_control_information_0, &tlv_desc_load_control_information_1, &tlv_desc_load_control_information_2, &tlv_desc_overload_control_information_0, &tlv_desc_overload_control_information_1, &tlv_desc_f_container_0, &tlv_desc_epco_0, NULL, }}; tlv_desc_t tlv_desc_delete_bearer_response = { TLV_MESSAGE, "Delete Bearer Response", 0, 0, 0, 0, { &tlv_desc_cause_0, &tlv_desc_ebi_0, &tlv_desc_bearer_context_0, &tlv_desc_recovery_0, &tlv_desc_fq_csid_0, &tlv_desc_fq_csid_1, &tlv_desc_fq_csid_2, &tlv_desc_fq_csid_3, &tlv_desc_pco_0, &tlv_desc_ue_time_zone_0, &tlv_desc_uli_0, &tlv_desc_uli_timestamp_0, &tlv_desc_twan_identifier_0, &tlv_desc_twan_identifier_timestamp_0, &tlv_desc_overload_control_information_0, &tlv_desc_overload_control_information_1, &tlv_desc_ip_address_0, &tlv_desc_overload_control_information_2, &tlv_desc_twan_identifier_1, &tlv_desc_twan_identifier_timestamp_1, &tlv_desc_port_number_0, &tlv_desc_f_container_0, &tlv_desc_port_number_1, NULL, }}; tlv_desc_t tlv_desc_create_indirect_data_forwarding_tunnel_request = { TLV_MESSAGE, "Create Indirect Data Forwarding Tunnel Request", 0, 0, 0, 0, { &tlv_desc_imsi_0, &tlv_desc_mei_0, &tlv_desc_indication_0, &tlv_desc_f_teid_0, &tlv_desc_bearer_context_0, &tlv_desc_bearer_context_1, &tlv_desc_bearer_context_2, &tlv_desc_bearer_context_3, &tlv_desc_bearer_context_4, &tlv_desc_bearer_context_5, &tlv_desc_bearer_context_6, &tlv_desc_bearer_context_7, &tlv_desc_bearer_context_8, &tlv_desc_bearer_context_9, &tlv_desc_bearer_context_10, &tlv_desc_recovery_0, NULL, }}; tlv_desc_t tlv_desc_create_indirect_data_forwarding_tunnel_response = { TLV_MESSAGE, "Create Indirect Data Forwarding Tunnel Response", 0, 0, 0, 0, { &tlv_desc_cause_0, &tlv_desc_f_teid_0, &tlv_desc_bearer_context_0, &tlv_desc_bearer_context_1, &tlv_desc_bearer_context_2, &tlv_desc_bearer_context_3, &tlv_desc_bearer_context_4, &tlv_desc_bearer_context_5, &tlv_desc_bearer_context_6, &tlv_desc_bearer_context_7, &tlv_desc_bearer_context_8, &tlv_desc_bearer_context_9, &tlv_desc_bearer_context_10, &tlv_desc_recovery_0, NULL, }}; tlv_desc_t tlv_desc_delete_indirect_data_forwarding_tunnel_request = { TLV_MESSAGE, "Delete Indirect Data Forwarding Tunnel Request", 0, 0, 0, 0, { NULL, }}; tlv_desc_t tlv_desc_delete_indirect_data_forwarding_tunnel_response = { TLV_MESSAGE, "Delete Indirect Data Forwarding Tunnel Response", 0, 0, 0, 0, { &tlv_desc_cause_0, &tlv_desc_recovery_0, NULL, }}; tlv_desc_t tlv_desc_release_access_bearers_request = { TLV_MESSAGE, "Release Access Bearers Request", 0, 0, 0, 0, { &tlv_desc_ebi_0, &tlv_desc_node_type_0, &tlv_desc_indication_0, NULL, }}; tlv_desc_t tlv_desc_release_access_bearers_response = { TLV_MESSAGE, "Release Access Bearers Response", 0, 0, 0, 0, { &tlv_desc_cause_0, &tlv_desc_recovery_0, &tlv_desc_indication_0, &tlv_desc_load_control_information_0, &tlv_desc_overload_control_information_0, NULL, }}; tlv_desc_t tlv_desc_downlink_data_notification = { TLV_MESSAGE, "Downlink Data Notification", 0, 0, 0, 0, { &tlv_desc_cause_0, &tlv_desc_ebi_0, &tlv_desc_arp_0, &tlv_desc_imsi_0, &tlv_desc_f_teid_0, &tlv_desc_indication_0, &tlv_desc_load_control_information_0, &tlv_desc_overload_control_information_0, &tlv_desc_paging_and_service_information_0, NULL, }}; tlv_desc_t tlv_desc_downlink_data_notification_acknowledge = { TLV_MESSAGE, "Downlink Data Notification Acknowledge", 0, 0, 0, 0, { &tlv_desc_cause_0, &tlv_desc_delay_value_0, &tlv_desc_recovery_0, &tlv_desc_throttling_0, &tlv_desc_imsi_0, &tlv_desc_epc_timer_0, &tlv_desc_integer_number_0, NULL, }}; tlv_desc_t tlv_desc_modify_access_bearers_request = { TLV_MESSAGE, "Modify Access Bearers Request", 0, 0, 0, 0, { &tlv_desc_indication_0, &tlv_desc_f_teid_0, &tlv_desc_delay_value_0, &tlv_desc_bearer_context_0, &tlv_desc_bearer_context_1, &tlv_desc_recovery_0, NULL, }}; tlv_desc_t tlv_desc_modify_access_bearers_response = { TLV_MESSAGE, "Modify Access Bearers Response", 0, 0, 0, 0, { &tlv_desc_cause_0, &tlv_desc_bearer_context_0, &tlv_desc_bearer_context_1, &tlv_desc_recovery_0, &tlv_desc_indication_0, &tlv_desc_load_control_information_0, &tlv_desc_overload_control_information_0, NULL, }}; status_t gtp_parse_msg(gtp_message_t *gtp_message, pkbuf_t *pkbuf) { status_t rv = CORE_ERROR; gtp_header_t *h = NULL; c_uint16_t size = 0; d_assert(gtp_message, return CORE_ERROR, "Null param"); d_assert(pkbuf, return CORE_ERROR, "Null param"); d_assert(pkbuf->payload, return CORE_ERROR, "Null param"); d_trace(50, "[GTPv2] RECV : "); d_trace_hex(50, pkbuf->payload, pkbuf->len); h = pkbuf->payload; d_assert(h, return CORE_ERROR, "Null param"); memset(gtp_message, 0, sizeof(gtp_message_t)); if (h->teid_presence) size = GTPV2C_HEADER_LEN; else size = GTPV2C_HEADER_LEN-GTP_TEID_LEN; d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return CORE_ERROR, "pkbuf_header error"); memcpy(>p_message->h, pkbuf->payload - size, size); if (h->teid_presence) gtp_message->h.teid = ntohl(gtp_message->h.teid); if (pkbuf->len == 0) return CORE_OK; switch(gtp_message->h.type) { case GTP_ECHO_REQUEST_TYPE: rv = tlv_parse_msg(>p_message->echo_request, &tlv_desc_echo_request, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_ECHO_RESPONSE_TYPE: rv = tlv_parse_msg(>p_message->echo_response, &tlv_desc_echo_response, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_CREATE_SESSION_REQUEST_TYPE: rv = tlv_parse_msg(>p_message->create_session_request, &tlv_desc_create_session_request, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_CREATE_SESSION_RESPONSE_TYPE: rv = tlv_parse_msg(>p_message->create_session_response, &tlv_desc_create_session_response, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_MODIFY_BEARER_REQUEST_TYPE: rv = tlv_parse_msg(>p_message->modify_bearer_request, &tlv_desc_modify_bearer_request, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_MODIFY_BEARER_RESPONSE_TYPE: rv = tlv_parse_msg(>p_message->modify_bearer_response, &tlv_desc_modify_bearer_response, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_DELETE_SESSION_REQUEST_TYPE: rv = tlv_parse_msg(>p_message->delete_session_request, &tlv_desc_delete_session_request, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_DELETE_SESSION_RESPONSE_TYPE: rv = tlv_parse_msg(>p_message->delete_session_response, &tlv_desc_delete_session_response, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_MODIFY_BEARER_COMMAND_TYPE: rv = tlv_parse_msg(>p_message->modify_bearer_command, &tlv_desc_modify_bearer_command, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_MODIFY_BEARER_FAILURE_INDICATION_TYPE: rv = tlv_parse_msg(>p_message->modify_bearer_failure_indication, &tlv_desc_modify_bearer_failure_indication, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_DELETE_BEARER_COMMAND_TYPE: rv = tlv_parse_msg(>p_message->delete_bearer_command, &tlv_desc_delete_bearer_command, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_DELETE_BEARER_FAILURE_INDICATION_TYPE: rv = tlv_parse_msg(>p_message->delete_bearer_failure_indication, &tlv_desc_delete_bearer_failure_indication, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_DOWNLINK_DATA_NOTIFICATION_FAILURE_INDICATION_TYPE: rv = tlv_parse_msg(>p_message->downlink_data_notification_failure_indication, &tlv_desc_downlink_data_notification_failure_indication, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_CREATE_BEARER_REQUEST_TYPE: rv = tlv_parse_msg(>p_message->create_bearer_request, &tlv_desc_create_bearer_request, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_CREATE_BEARER_RESPONSE_TYPE: rv = tlv_parse_msg(>p_message->create_bearer_response, &tlv_desc_create_bearer_response, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_UPDATE_BEARER_REQUEST_TYPE: rv = tlv_parse_msg(>p_message->update_bearer_request, &tlv_desc_update_bearer_request, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_UPDATE_BEARER_RESPONSE_TYPE: rv = tlv_parse_msg(>p_message->update_bearer_response, &tlv_desc_update_bearer_response, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_DELETE_BEARER_REQUEST_TYPE: rv = tlv_parse_msg(>p_message->delete_bearer_request, &tlv_desc_delete_bearer_request, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_DELETE_BEARER_RESPONSE_TYPE: rv = tlv_parse_msg(>p_message->delete_bearer_response, &tlv_desc_delete_bearer_response, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_REQUEST_TYPE: rv = tlv_parse_msg(>p_message->create_indirect_data_forwarding_tunnel_request, &tlv_desc_create_indirect_data_forwarding_tunnel_request, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE: rv = tlv_parse_msg(>p_message->create_indirect_data_forwarding_tunnel_response, &tlv_desc_create_indirect_data_forwarding_tunnel_response, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_REQUEST_TYPE: rv = tlv_parse_msg(>p_message->delete_indirect_data_forwarding_tunnel_request, &tlv_desc_delete_indirect_data_forwarding_tunnel_request, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE: rv = tlv_parse_msg(>p_message->delete_indirect_data_forwarding_tunnel_response, &tlv_desc_delete_indirect_data_forwarding_tunnel_response, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_RELEASE_ACCESS_BEARERS_REQUEST_TYPE: rv = tlv_parse_msg(>p_message->release_access_bearers_request, &tlv_desc_release_access_bearers_request, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_RELEASE_ACCESS_BEARERS_RESPONSE_TYPE: rv = tlv_parse_msg(>p_message->release_access_bearers_response, &tlv_desc_release_access_bearers_response, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_DOWNLINK_DATA_NOTIFICATION_TYPE: rv = tlv_parse_msg(>p_message->downlink_data_notification, &tlv_desc_downlink_data_notification, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_DOWNLINK_DATA_NOTIFICATION_ACKNOWLEDGE_TYPE: rv = tlv_parse_msg(>p_message->downlink_data_notification_acknowledge, &tlv_desc_downlink_data_notification_acknowledge, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_MODIFY_ACCESS_BEARERS_REQUEST_TYPE: rv = tlv_parse_msg(>p_message->modify_access_bearers_request, &tlv_desc_modify_access_bearers_request, pkbuf, TLV_MODE_T1_L2_I1); break; case GTP_MODIFY_ACCESS_BEARERS_RESPONSE_TYPE: rv = tlv_parse_msg(>p_message->modify_access_bearers_response, &tlv_desc_modify_access_bearers_response, pkbuf, TLV_MODE_T1_L2_I1); break; default: d_warn("Not implmeneted(type:%d)", gtp_message->h.type); break; } return rv; } status_t gtp_build_msg(pkbuf_t **pkbuf, gtp_message_t *gtp_message) { status_t rv = CORE_ERROR; d_assert(gtp_message, return rv, "Null param"); switch(gtp_message->h.type) { case GTP_ECHO_REQUEST_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_echo_request, >p_message->echo_request, TLV_MODE_T1_L2_I1); break; case GTP_ECHO_RESPONSE_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_echo_response, >p_message->echo_response, TLV_MODE_T1_L2_I1); break; case GTP_CREATE_SESSION_REQUEST_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_create_session_request, >p_message->create_session_request, TLV_MODE_T1_L2_I1); break; case GTP_CREATE_SESSION_RESPONSE_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_create_session_response, >p_message->create_session_response, TLV_MODE_T1_L2_I1); break; case GTP_MODIFY_BEARER_REQUEST_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_modify_bearer_request, >p_message->modify_bearer_request, TLV_MODE_T1_L2_I1); break; case GTP_MODIFY_BEARER_RESPONSE_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_modify_bearer_response, >p_message->modify_bearer_response, TLV_MODE_T1_L2_I1); break; case GTP_DELETE_SESSION_REQUEST_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_delete_session_request, >p_message->delete_session_request, TLV_MODE_T1_L2_I1); break; case GTP_DELETE_SESSION_RESPONSE_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_delete_session_response, >p_message->delete_session_response, TLV_MODE_T1_L2_I1); break; case GTP_MODIFY_BEARER_COMMAND_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_modify_bearer_command, >p_message->modify_bearer_command, TLV_MODE_T1_L2_I1); break; case GTP_MODIFY_BEARER_FAILURE_INDICATION_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_modify_bearer_failure_indication, >p_message->modify_bearer_failure_indication, TLV_MODE_T1_L2_I1); break; case GTP_DELETE_BEARER_COMMAND_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_delete_bearer_command, >p_message->delete_bearer_command, TLV_MODE_T1_L2_I1); break; case GTP_DELETE_BEARER_FAILURE_INDICATION_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_delete_bearer_failure_indication, >p_message->delete_bearer_failure_indication, TLV_MODE_T1_L2_I1); break; case GTP_DOWNLINK_DATA_NOTIFICATION_FAILURE_INDICATION_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_downlink_data_notification_failure_indication, >p_message->downlink_data_notification_failure_indication, TLV_MODE_T1_L2_I1); break; case GTP_CREATE_BEARER_REQUEST_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_create_bearer_request, >p_message->create_bearer_request, TLV_MODE_T1_L2_I1); break; case GTP_CREATE_BEARER_RESPONSE_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_create_bearer_response, >p_message->create_bearer_response, TLV_MODE_T1_L2_I1); break; case GTP_UPDATE_BEARER_REQUEST_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_update_bearer_request, >p_message->update_bearer_request, TLV_MODE_T1_L2_I1); break; case GTP_UPDATE_BEARER_RESPONSE_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_update_bearer_response, >p_message->update_bearer_response, TLV_MODE_T1_L2_I1); break; case GTP_DELETE_BEARER_REQUEST_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_delete_bearer_request, >p_message->delete_bearer_request, TLV_MODE_T1_L2_I1); break; case GTP_DELETE_BEARER_RESPONSE_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_delete_bearer_response, >p_message->delete_bearer_response, TLV_MODE_T1_L2_I1); break; case GTP_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_REQUEST_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_create_indirect_data_forwarding_tunnel_request, >p_message->create_indirect_data_forwarding_tunnel_request, TLV_MODE_T1_L2_I1); break; case GTP_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_create_indirect_data_forwarding_tunnel_response, >p_message->create_indirect_data_forwarding_tunnel_response, TLV_MODE_T1_L2_I1); break; case GTP_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_REQUEST_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_delete_indirect_data_forwarding_tunnel_request, >p_message->delete_indirect_data_forwarding_tunnel_request, TLV_MODE_T1_L2_I1); break; case GTP_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_delete_indirect_data_forwarding_tunnel_response, >p_message->delete_indirect_data_forwarding_tunnel_response, TLV_MODE_T1_L2_I1); break; case GTP_RELEASE_ACCESS_BEARERS_REQUEST_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_release_access_bearers_request, >p_message->release_access_bearers_request, TLV_MODE_T1_L2_I1); break; case GTP_RELEASE_ACCESS_BEARERS_RESPONSE_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_release_access_bearers_response, >p_message->release_access_bearers_response, TLV_MODE_T1_L2_I1); break; case GTP_DOWNLINK_DATA_NOTIFICATION_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_downlink_data_notification, >p_message->downlink_data_notification, TLV_MODE_T1_L2_I1); break; case GTP_DOWNLINK_DATA_NOTIFICATION_ACKNOWLEDGE_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_downlink_data_notification_acknowledge, >p_message->downlink_data_notification_acknowledge, TLV_MODE_T1_L2_I1); break; case GTP_MODIFY_ACCESS_BEARERS_REQUEST_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_modify_access_bearers_request, >p_message->modify_access_bearers_request, TLV_MODE_T1_L2_I1); break; case GTP_MODIFY_ACCESS_BEARERS_RESPONSE_TYPE: rv = tlv_build_msg(pkbuf, &tlv_desc_modify_access_bearers_response, >p_message->modify_access_bearers_response, TLV_MODE_T1_L2_I1); break; default: d_warn("Not implmeneted(type:%d)", gtp_message->h.type); break; } if ((*pkbuf) && (*pkbuf)->payload) { d_trace(50, "[GTPv2] SEND : "); d_trace_hex(50, (*pkbuf)->payload, (*pkbuf)->len); } return rv; } nextepc-0.3.10/lib/gtp/gtp_message.h000066400000000000000000001445651333553357400173020ustar00rootroot00000000000000/* * Copyright (c) 2017, NextEPC Group * 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. */ /******************************************************************************* * This file had been created by gtp_tlv.py script v0.1.0 * Please do not modify this file but regenerate it via script. * Created on: 2018-01-23 16:32:53.055846 by acetcom * from 29274-d80.docx ******************************************************************************/ #ifndef __GTP_TLV_H__ #define __GTP_TLV_H__ #include "core_tlv_msg.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* 5.1 General format */ #define GTPV1U_HEADER_LEN 8 #define GTPV2C_HEADER_LEN 12 #define GTP_TEID_LEN 4 typedef struct _gtp_header_t { union { struct { ED4(c_uint8_t version:3;, c_uint8_t piggybacked:1;, c_uint8_t teid_presence:1;, c_uint8_t spare1:3;) }; /* GTU-U flags */ #define GTPU_FLAGS_PN 0x1 #define GTPU_FLAGS_S 0x2 c_uint8_t flags; }; c_uint8_t type; c_uint16_t length; union { struct { c_uint32_t teid; /* sqn : 31bit ~ 8bit, spare : 7bit ~ 0bit */ #define GTP_XID_TO_SQN(__xid) htonl(((__xid) << 8)) #define GTP_SQN_TO_XID(__sqn) (ntohl(__sqn) >> 8) c_uint32_t sqn; }; /* sqn : 31bit ~ 8bit, spare : 7bit ~ 0bit */ c_uint32_t sqn_only; }; } __attribute__ ((packed)) gtp_header_t; /* GTP-U message type, defined in 3GPP TS 29.281 Release 11 */ #define GTPU_MSGTYPE_ECHO_REQ 1 #define GTPU_MSGTYPE_ECHO_RSP 2 #define GTPU_MSGTYPE_ERR_IND 26 #define GTPU_MSGTYPE_SUPP_EXTHDR_NOTI 31 #define GTPU_MSGTYPE_END_MARKER 254 #define GTPU_MSGTYPE_GPDU 255 /* GTPv2-C message type */ #define GTP_ECHO_REQUEST_TYPE 1 #define GTP_ECHO_RESPONSE_TYPE 2 #define GTP_VERSION_NOT_SUPPORTED_INDICATION_TYPE 3 #define GTP_CREATE_SESSION_REQUEST_TYPE 32 #define GTP_CREATE_SESSION_RESPONSE_TYPE 33 #define GTP_MODIFY_BEARER_REQUEST_TYPE 34 #define GTP_MODIFY_BEARER_RESPONSE_TYPE 35 #define GTP_DELETE_SESSION_REQUEST_TYPE 36 #define GTP_DELETE_SESSION_RESPONSE_TYPE 37 #define GTP_CHANGE_NOTIFICATION_REQUEST_TYPE 38 #define GTP_CHANGE_NOTIFICATION_RESPONSE_TYPE 39 #define GTP_REMOTE_UE_REPORT_NOTIFICATION_TYPE 40 #define GTP_REMOTE_UE_REPORT_ACKNOWLEDGE_TYPE 41 #define GTP_MODIFY_BEARER_COMMAND_TYPE 64 #define GTP_MODIFY_BEARER_FAILURE_INDICATION_TYPE 65 #define GTP_DELETE_BEARER_COMMAND_TYPE 66 #define GTP_DELETE_BEARER_FAILURE_INDICATION_TYPE 67 #define GTP_BEARER_RESOURCE_COMMAND_TYPE 68 #define GTP_BEARER_RESOURCE_FAILURE_INDICATION_TYPE 69 #define GTP_DOWNLINK_DATA_NOTIFICATION_FAILURE_INDICATION_TYPE 70 #define GTP_TRACE_SESSION_ACTIVATION_TYPE 71 #define GTP_TRACE_SESSION_DEACTIVATION_TYPE 72 #define GTP_STOP_PAGING_INDICATION_TYPE 73 #define GTP_CREATE_BEARER_REQUEST_TYPE 95 #define GTP_CREATE_BEARER_RESPONSE_TYPE 96 #define GTP_UPDATE_BEARER_REQUEST_TYPE 97 #define GTP_UPDATE_BEARER_RESPONSE_TYPE 98 #define GTP_DELETE_BEARER_REQUEST_TYPE 99 #define GTP_DELETE_BEARER_RESPONSE_TYPE 100 #define GTP_DELETE_PDN_CONNECTION_SET_REQUEST_TYPE 101 #define GTP_DELETE_PDN_CONNECTION_SET_RESPONSE_TYPE 102 #define GTP_PGW_DOWNLINK_TRIGGERING_NOTIFICATION_TYPE 103 #define GTP_PGW_DOWNLINK_TRIGGERING_ACKNOWLEDGE_TYPE 104 #define GTP_CREATE_FORWARDING_TUNNEL_REQUEST_TYPE 160 #define GTP_CREATE_FORWARDING_TUNNEL_RESPONSE_TYPE 161 #define GTP_SUSPEND_NOTIFICATION_TYPE 162 #define GTP_SUSPEND_ACKNOWLEDGE_TYPE 163 #define GTP_RESUME_NOTIFICATION_TYPE 164 #define GTP_RESUME_ACKNOWLEDGE_TYPE 165 #define GTP_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_REQUEST_TYPE 166 #define GTP_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE 167 #define GTP_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_REQUEST_TYPE 168 #define GTP_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE 169 #define GTP_RELEASE_ACCESS_BEARERS_REQUEST_TYPE 170 #define GTP_RELEASE_ACCESS_BEARERS_RESPONSE_TYPE 171 #define GTP_DOWNLINK_DATA_NOTIFICATION_TYPE 176 #define GTP_DOWNLINK_DATA_NOTIFICATION_ACKNOWLEDGE_TYPE 177 #define GTP_PGW_RESTART_NOTIFICATION_TYPE 179 #define GTP_PGW_RESTART_NOTIFICATION_ACKNOWLEDGE_TYPE 180 #define GTP_UPDATE_PDN_CONNECTION_SET_REQUEST_TYPE 200 #define GTP_UPDATE_PDN_CONNECTION_SET_RESPONSE_TYPE 201 #define GTP_MODIFY_ACCESS_BEARERS_REQUEST_TYPE 211 #define GTP_MODIFY_ACCESS_BEARERS_RESPONSE_TYPE 212 #define TLV_IMSI_TYPE 1 #define TLV_CAUSE_TYPE 2 #define TLV_RECOVERY_TYPE 3 #define TLV_STN_SR_TYPE 51 #define TLV_APN_TYPE 71 #define TLV_AMBR_TYPE 72 #define TLV_EBI_TYPE 73 #define TLV_IP_ADDRESS_TYPE 74 #define TLV_MEI_TYPE 75 #define TLV_MSISDN_TYPE 76 #define TLV_INDICATION_TYPE 77 #define TLV_PCO_TYPE 78 #define TLV_PAA_TYPE 79 #define TLV_BEARER_QOS_TYPE 80 #define TLV_FLOW_QOS_TYPE 81 #define TLV_RAT_TYPE_TYPE 82 #define TLV_SERVING_NETWORK_TYPE 83 #define TLV_BEARER_TFT_TYPE 84 #define TLV_TAD_TYPE 85 #define TLV_ULI_TYPE 86 #define TLV_F_TEID_TYPE 87 #define TLV_TMSI_TYPE 88 #define TLV_GLOBAL_CN_ID_TYPE 89 #define TLV_S103PDF_TYPE 90 #define TLV_S1UDF_TYPE 91 #define TLV_DELAY_VALUE_TYPE 92 #define TLV_BEARER_CONTEXT_TYPE 93 #define TLV_CHARGING_ID_TYPE 94 #define TLV_CHARGING_CHARACTERISTICS_TYPE 95 #define TLV_TRACE_INFORMATION_TYPE 96 #define TLV_BEARER_FLAGS_TYPE 97 #define TLV_PDN_TYPE_TYPE 99 #define TLV_PTI_TYPE 100 #define TLV_MM_CONTEXT_TYPE 107 #define TLV_PDN_CONNECTION_TYPE 109 #define TLV_PDU_NUMBERS_TYPE 110 #define TLV_P_TMSI_TYPE 111 #define TLV_P_TMSI_SIGNATURE_TYPE 112 #define TLV_HOP_COUNTER_TYPE 113 #define TLV_UE_TIME_ZONE_TYPE 114 #define TLV_TRACE_REFERENCE_TYPE 115 #define TLV_COMPLETE_REQUEST_MESSAGE_TYPE 116 #define TLV_GUTI_TYPE 117 #define TLV_F_CONTAINER_TYPE 118 #define TLV_F_CAUSE_TYPE 119 #define TLV_PLMN_ID_TYPE 120 #define TLV_TARGET_IDENTIFICATION_TYPE 121 #define TLV_PACKET_FLOW_ID_TYPE 123 #define TLV_RAB_CONTEXT_TYPE 124 #define TLV_SOURCE_RNC_PDCP_CONTEXT_INFO_TYPE 125 #define TLV_PORT_NUMBER_TYPE 126 #define TLV_APN_RESTRICTION_TYPE 127 #define TLV_SELECTION_MODE_TYPE 128 #define TLV_SOURCE_IDENTIFICATION_TYPE 129 #define TLV_CHANGE_REPORTING_ACTION_TYPE 131 #define TLV_FQ_CSID_TYPE 132 #define TLV_CHANNEL_NEEDED_TYPE 133 #define TLV_EMLPP_PRIORITY_TYPE 134 #define TLV_NODE_TYPE_TYPE 135 #define TLV_FQDN_TYPE 136 #define TLV_TI_TYPE 137 #define TLV_MBMS_SESSION_DURATION_TYPE 138 #define TLV_MBMS_SERVICE_AREA_TYPE 139 #define TLV_MBMS_SESSION_IDENTIFIER_TYPE 140 #define TLV_MBMS_FLOW_IDENTIFIER_TYPE 141 #define TLV_MBMS_IP_MULTICAST_DISTRIBUTION_TYPE 142 #define TLV_MBMS_DISTRIBUTION_ACKNOWLEDGE_TYPE 143 #define TLV_RFSP_INDEX_TYPE 144 #define TLV_UCI_TYPE 145 #define TLV_CSG_INFORMATION_REPORTING_ACTION_TYPE 146 #define TLV_CSG_ID_TYPE 147 #define TLV_CMI_TYPE 148 #define TLV_SERVICE_INDICATOR_TYPE 149 #define TLV_DETACH_TYPE_TYPE 150 #define TLV_LDN_TYPE 151 #define TLV_NODE_FEATURES_TYPE 152 #define TLV_MBMS_TIME_TO_DATA_TRANSFER_TYPE 153 #define TLV_THROTTLING_TYPE 154 #define TLV_ARP_TYPE 155 #define TLV_EPC_TIMER_TYPE 156 #define TLV_SIGNALLING_PRIORITY_INDICATION_TYPE 157 #define TLV_TMGI_TYPE 158 #define TLV_ADDITIONAL_MM_CONTEXT_FOR_SRVCC_TYPE 159 #define TLV_ADDITIONAL_FLAGS_FOR_SRVCC_TYPE 160 #define TLV_MDT_CONFIGURATION_TYPE 162 #define TLV_APCO_TYPE 163 #define TLV_ABSOLUTE_TIME_OF_MBMS_DATA_TRANSFER_TYPE 164 #define TLV_ENB_INFORMATION_REPORTING_TYPE 165 #define TLV_IP4CP_TYPE 166 #define TLV_CHANGE_TO_REPORT_FLAGS_TYPE 167 #define TLV_ACTION_INDICATION_TYPE 168 #define TLV_TWAN_IDENTIFIER_TYPE 169 #define TLV_ULI_TIMESTAMP_TYPE 170 #define TLV_MBMS_FLAGS_TYPE 171 #define TLV_RAN_NAS_CAUSE_TYPE 172 #define TLV_CN_OPERATOR_SELECTION_ENTITY_TYPE 173 #define TLV_TWMI_TYPE 174 #define TLV_NODE_NUMBER_TYPE 175 #define TLV_NODE_IDENTIFIER_TYPE 176 #define TLV_PRESENCE_REPORTING_AREA_ACTION_TYPE 177 #define TLV_PRESENCE_REPORTING_AREA_INFORMATION_TYPE 178 #define TLV_TWAN_IDENTIFIER_TIMESTAMP_TYPE 179 #define TLV_OVERLOAD_CONTROL_INFORMATION_TYPE 180 #define TLV_LOAD_CONTROL_INFORMATION_TYPE 181 #define TLV_METRIC_TYPE 182 #define TLV_SEQUENCE_NUMBER_TYPE 183 #define TLV_APN_AND_RELATIVE_CAPACITY_TYPE 184 #define TLV_WLAN_OFFLOADABILITY_INDICATION_TYPE 185 #define TLV_PAGING_AND_SERVICE_INFORMATION_TYPE 186 #define TLV_INTEGER_NUMBER_TYPE 187 #define TLV_MILLISECOND_TIME_STAMP_TYPE 188 #define TLV_MONITORING_EVENT_INFORMATION_TYPE 189 #define TLV_ECGI_LIST_TYPE 190 #define TLV_REMOTE_UE_CONTEXT_TYPE 191 #define TLV_REMOTE_USER_ID_TYPE 192 #define TLV_REMOTE_UE_IP_INFORMATION_TYPE 193 #define TLV_CIOT_OPTIMIZATIONS_SUPPORT_INDICATION_TYPE 194 #define TLV_SCEF_PDN_CONNECTION_TYPE 195 #define TLV_HEADER_COMPRESSION_CONFIGURATION_TYPE 196 #define TLV_EPCO_TYPE 197 #define TLV_SERVING_PLMN_RATE_CONTROL_TYPE 198 #define TLV_COUNTER_TYPE 199 /* Infomration Element TLV Descriptor */ extern tlv_desc_t tlv_desc_imsi_0; extern tlv_desc_t tlv_desc_cause_0; extern tlv_desc_t tlv_desc_recovery_0; extern tlv_desc_t tlv_desc_stn_sr_0; extern tlv_desc_t tlv_desc_apn_0; extern tlv_desc_t tlv_desc_ambr_0; extern tlv_desc_t tlv_desc_ebi_0; extern tlv_desc_t tlv_desc_ebi_1; extern tlv_desc_t tlv_desc_ip_address_0; extern tlv_desc_t tlv_desc_ip_address_1; extern tlv_desc_t tlv_desc_ip_address_2; extern tlv_desc_t tlv_desc_ip_address_3; extern tlv_desc_t tlv_desc_mei_0; extern tlv_desc_t tlv_desc_msisdn_0; extern tlv_desc_t tlv_desc_indication_0; extern tlv_desc_t tlv_desc_pco_0; extern tlv_desc_t tlv_desc_paa_0; extern tlv_desc_t tlv_desc_bearer_qos_0; extern tlv_desc_t tlv_desc_flow_qos_0; extern tlv_desc_t tlv_desc_rat_type_0; extern tlv_desc_t tlv_desc_serving_network_0; extern tlv_desc_t tlv_desc_bearer_tft_0; extern tlv_desc_t tlv_desc_tad_0; extern tlv_desc_t tlv_desc_uli_0; extern tlv_desc_t tlv_desc_f_teid_0; extern tlv_desc_t tlv_desc_f_teid_1; extern tlv_desc_t tlv_desc_f_teid_2; extern tlv_desc_t tlv_desc_f_teid_3; extern tlv_desc_t tlv_desc_f_teid_4; extern tlv_desc_t tlv_desc_f_teid_5; extern tlv_desc_t tlv_desc_f_teid_6; extern tlv_desc_t tlv_desc_f_teid_7; extern tlv_desc_t tlv_desc_f_teid_8; extern tlv_desc_t tlv_desc_f_teid_9; extern tlv_desc_t tlv_desc_f_teid_10; extern tlv_desc_t tlv_desc_f_teid_11; extern tlv_desc_t tlv_desc_tmsi_0; extern tlv_desc_t tlv_desc_global_cn_id_0; extern tlv_desc_t tlv_desc_s103pdf_0; extern tlv_desc_t tlv_desc_s1udf_0; extern tlv_desc_t tlv_desc_delay_value_0; extern tlv_desc_t tlv_desc_charging_id_0; extern tlv_desc_t tlv_desc_charging_characteristics_0; extern tlv_desc_t tlv_desc_trace_information_0; extern tlv_desc_t tlv_desc_bearer_flags_0; extern tlv_desc_t tlv_desc_pdn_type_0; extern tlv_desc_t tlv_desc_pti_0; extern tlv_desc_t tlv_desc_mm_context_0; extern tlv_desc_t tlv_desc_pdu_numbers_0; extern tlv_desc_t tlv_desc_p_tmsi_0; extern tlv_desc_t tlv_desc_p_tmsi_signature_0; extern tlv_desc_t tlv_desc_hop_counter_0; extern tlv_desc_t tlv_desc_ue_time_zone_0; extern tlv_desc_t tlv_desc_trace_reference_0; extern tlv_desc_t tlv_desc_complete_request_message_0; extern tlv_desc_t tlv_desc_guti_0; extern tlv_desc_t tlv_desc_f_container_0; extern tlv_desc_t tlv_desc_f_cause_0; extern tlv_desc_t tlv_desc_plmn_id_0; extern tlv_desc_t tlv_desc_target_identification_0; extern tlv_desc_t tlv_desc_packet_flow_id_0; extern tlv_desc_t tlv_desc_rab_context_0; extern tlv_desc_t tlv_desc_source_rnc_pdcp_context_info_0; extern tlv_desc_t tlv_desc_port_number_0; extern tlv_desc_t tlv_desc_port_number_1; extern tlv_desc_t tlv_desc_port_number_2; extern tlv_desc_t tlv_desc_apn_restriction_0; extern tlv_desc_t tlv_desc_selection_mode_0; extern tlv_desc_t tlv_desc_source_identification_0; extern tlv_desc_t tlv_desc_change_reporting_action_0; extern tlv_desc_t tlv_desc_fq_csid_0; extern tlv_desc_t tlv_desc_fq_csid_1; extern tlv_desc_t tlv_desc_fq_csid_2; extern tlv_desc_t tlv_desc_fq_csid_3; extern tlv_desc_t tlv_desc_channel_needed_0; extern tlv_desc_t tlv_desc_emlpp_priority_0; extern tlv_desc_t tlv_desc_node_type_0; extern tlv_desc_t tlv_desc_fqdn_0; extern tlv_desc_t tlv_desc_ti_0; extern tlv_desc_t tlv_desc_mbms_session_duration_0; extern tlv_desc_t tlv_desc_mbms_service_area_0; extern tlv_desc_t tlv_desc_mbms_session_identifier_0; extern tlv_desc_t tlv_desc_mbms_flow_identifier_0; extern tlv_desc_t tlv_desc_mbms_ip_multicast_distribution_0; extern tlv_desc_t tlv_desc_mbms_distribution_acknowledge_0; extern tlv_desc_t tlv_desc_rfsp_index_0; extern tlv_desc_t tlv_desc_uci_0; extern tlv_desc_t tlv_desc_csg_information_reporting_action_0; extern tlv_desc_t tlv_desc_csg_id_0; extern tlv_desc_t tlv_desc_cmi_0; extern tlv_desc_t tlv_desc_service_indicator_0; extern tlv_desc_t tlv_desc_detach_type_0; extern tlv_desc_t tlv_desc_ldn_0; extern tlv_desc_t tlv_desc_ldn_1; extern tlv_desc_t tlv_desc_ldn_2; extern tlv_desc_t tlv_desc_ldn_3; extern tlv_desc_t tlv_desc_node_features_0; extern tlv_desc_t tlv_desc_mbms_time_to_data_transfer_0; extern tlv_desc_t tlv_desc_throttling_0; extern tlv_desc_t tlv_desc_arp_0; extern tlv_desc_t tlv_desc_epc_timer_0; extern tlv_desc_t tlv_desc_signalling_priority_indication_0; extern tlv_desc_t tlv_desc_tmgi_0; extern tlv_desc_t tlv_desc_additional_mm_context_for_srvcc_0; extern tlv_desc_t tlv_desc_additional_flags_for_srvcc_0; extern tlv_desc_t tlv_desc_mdt_configuration_0; extern tlv_desc_t tlv_desc_apco_0; extern tlv_desc_t tlv_desc_absolute_time_of_mbms_data_transfer_0; extern tlv_desc_t tlv_desc_enb_information_reporting_0; extern tlv_desc_t tlv_desc_ip4cp_0; extern tlv_desc_t tlv_desc_change_to_report_flags_0; extern tlv_desc_t tlv_desc_action_indication_0; extern tlv_desc_t tlv_desc_twan_identifier_0; extern tlv_desc_t tlv_desc_twan_identifier_1; extern tlv_desc_t tlv_desc_uli_timestamp_0; extern tlv_desc_t tlv_desc_mbms_flags_0; extern tlv_desc_t tlv_desc_ran_nas_cause_0; extern tlv_desc_t tlv_desc_cn_operator_selection_entity_0; extern tlv_desc_t tlv_desc_twmi_0; extern tlv_desc_t tlv_desc_node_number_0; extern tlv_desc_t tlv_desc_node_identifier_0; extern tlv_desc_t tlv_desc_presence_reporting_area_action_0; extern tlv_desc_t tlv_desc_presence_reporting_area_information_0; extern tlv_desc_t tlv_desc_twan_identifier_timestamp_0; extern tlv_desc_t tlv_desc_twan_identifier_timestamp_1; extern tlv_desc_t tlv_desc_metric_0; extern tlv_desc_t tlv_desc_sequence_number_0; extern tlv_desc_t tlv_desc_apn_and_relative_capacity_0; extern tlv_desc_t tlv_desc_wlan_offloadability_indication_0; extern tlv_desc_t tlv_desc_paging_and_service_information_0; extern tlv_desc_t tlv_desc_integer_number_0; extern tlv_desc_t tlv_desc_millisecond_time_stamp_0; extern tlv_desc_t tlv_desc_monitoring_event_information_0; extern tlv_desc_t tlv_desc_ecgi_list_0; extern tlv_desc_t tlv_desc_remote_user_id_0; extern tlv_desc_t tlv_desc_remote_ue_ip_information_0; extern tlv_desc_t tlv_desc_ciot_optimizations_support_indication_0; extern tlv_desc_t tlv_desc_header_compression_configuration_0; extern tlv_desc_t tlv_desc_epco_0; extern tlv_desc_t tlv_desc_serving_plmn_rate_control_0; extern tlv_desc_t tlv_desc_counter_0; /* Group Infomration Element TLV Descriptor */ extern tlv_desc_t tlv_desc_bearer_context_0; extern tlv_desc_t tlv_desc_bearer_context_1; extern tlv_desc_t tlv_desc_bearer_context_2; extern tlv_desc_t tlv_desc_bearer_context_3; extern tlv_desc_t tlv_desc_bearer_context_4; extern tlv_desc_t tlv_desc_bearer_context_5; extern tlv_desc_t tlv_desc_bearer_context_6; extern tlv_desc_t tlv_desc_bearer_context_7; extern tlv_desc_t tlv_desc_bearer_context_8; extern tlv_desc_t tlv_desc_bearer_context_9; extern tlv_desc_t tlv_desc_bearer_context_10; extern tlv_desc_t tlv_desc_pdn_connection_0; extern tlv_desc_t tlv_desc_overload_control_information_0; extern tlv_desc_t tlv_desc_overload_control_information_1; extern tlv_desc_t tlv_desc_overload_control_information_2; extern tlv_desc_t tlv_desc_load_control_information_0; extern tlv_desc_t tlv_desc_load_control_information_1; extern tlv_desc_t tlv_desc_load_control_information_2; extern tlv_desc_t tlv_desc_remote_ue_context_0; extern tlv_desc_t tlv_desc_scef_pdn_connection_0; /* Message Descriptor */ extern tlv_desc_t tlv_desc_echo_request; extern tlv_desc_t tlv_desc_echo_response; extern tlv_desc_t tlv_desc_version_not_supported_indication; extern tlv_desc_t tlv_desc_create_session_request; extern tlv_desc_t tlv_desc_create_session_response; extern tlv_desc_t tlv_desc_modify_bearer_request; extern tlv_desc_t tlv_desc_modify_bearer_response; extern tlv_desc_t tlv_desc_delete_session_request; extern tlv_desc_t tlv_desc_delete_session_response; extern tlv_desc_t tlv_desc_change_notification_request; extern tlv_desc_t tlv_desc_change_notification_response; extern tlv_desc_t tlv_desc_remote_ue_report_notification; extern tlv_desc_t tlv_desc_remote_ue_report_acknowledge; extern tlv_desc_t tlv_desc_modify_bearer_command; extern tlv_desc_t tlv_desc_modify_bearer_failure_indication; extern tlv_desc_t tlv_desc_delete_bearer_command; extern tlv_desc_t tlv_desc_delete_bearer_failure_indication; extern tlv_desc_t tlv_desc_bearer_resource_command; extern tlv_desc_t tlv_desc_bearer_resource_failure_indication; extern tlv_desc_t tlv_desc_downlink_data_notification_failure_indication; extern tlv_desc_t tlv_desc_trace_session_activation; extern tlv_desc_t tlv_desc_trace_session_deactivation; extern tlv_desc_t tlv_desc_stop_paging_indication; extern tlv_desc_t tlv_desc_create_bearer_request; extern tlv_desc_t tlv_desc_create_bearer_response; extern tlv_desc_t tlv_desc_update_bearer_request; extern tlv_desc_t tlv_desc_update_bearer_response; extern tlv_desc_t tlv_desc_delete_bearer_request; extern tlv_desc_t tlv_desc_delete_bearer_response; extern tlv_desc_t tlv_desc_delete_pdn_connection_set_request; extern tlv_desc_t tlv_desc_delete_pdn_connection_set_response; extern tlv_desc_t tlv_desc_pgw_downlink_triggering_notification; extern tlv_desc_t tlv_desc_pgw_downlink_triggering_acknowledge; extern tlv_desc_t tlv_desc_create_forwarding_tunnel_request; extern tlv_desc_t tlv_desc_create_forwarding_tunnel_response; extern tlv_desc_t tlv_desc_suspend_notification; extern tlv_desc_t tlv_desc_suspend_acknowledge; extern tlv_desc_t tlv_desc_resume_notification; extern tlv_desc_t tlv_desc_resume_acknowledge; extern tlv_desc_t tlv_desc_create_indirect_data_forwarding_tunnel_request; extern tlv_desc_t tlv_desc_create_indirect_data_forwarding_tunnel_response; extern tlv_desc_t tlv_desc_delete_indirect_data_forwarding_tunnel_request; extern tlv_desc_t tlv_desc_delete_indirect_data_forwarding_tunnel_response; extern tlv_desc_t tlv_desc_release_access_bearers_request; extern tlv_desc_t tlv_desc_release_access_bearers_response; extern tlv_desc_t tlv_desc_downlink_data_notification; extern tlv_desc_t tlv_desc_downlink_data_notification_acknowledge; extern tlv_desc_t tlv_desc_pgw_restart_notification; extern tlv_desc_t tlv_desc_pgw_restart_notification_acknowledge; extern tlv_desc_t tlv_desc_update_pdn_connection_set_request; extern tlv_desc_t tlv_desc_update_pdn_connection_set_response; extern tlv_desc_t tlv_desc_modify_access_bearers_request; extern tlv_desc_t tlv_desc_modify_access_bearers_response; /* Structure for Infomration Element */ typedef tlv_octet_t tlv_imsi_t; typedef tlv_octet_t tlv_cause_t; typedef tlv_uint8_t tlv_recovery_t; typedef tlv_octet_t tlv_stn_sr_t; typedef tlv_octet_t tlv_apn_t; typedef tlv_octet_t tlv_ambr_t; typedef tlv_uint8_t tlv_ebi_t; typedef tlv_octet_t tlv_ip_address_t; typedef tlv_octet_t tlv_mei_t; typedef tlv_octet_t tlv_msisdn_t; typedef tlv_octet_t tlv_indication_t; typedef tlv_octet_t tlv_pco_t; typedef tlv_octet_t tlv_paa_t; typedef tlv_octet_t tlv_bearer_qos_t; typedef tlv_octet_t tlv_flow_qos_t; typedef tlv_uint8_t tlv_rat_type_t; typedef tlv_octet_t tlv_serving_network_t; typedef tlv_octet_t tlv_bearer_tft_t; typedef tlv_octet_t tlv_tad_t; typedef tlv_octet_t tlv_uli_t; typedef tlv_octet_t tlv_f_teid_t; typedef tlv_octet_t tlv_tmsi_t; typedef tlv_octet_t tlv_global_cn_id_t; typedef tlv_octet_t tlv_s103pdf_t; typedef tlv_octet_t tlv_s1udf_t; typedef tlv_octet_t tlv_delay_value_t; typedef tlv_octet_t tlv_charging_id_t; typedef tlv_octet_t tlv_charging_characteristics_t; typedef tlv_octet_t tlv_trace_information_t; typedef tlv_octet_t tlv_bearer_flags_t; typedef tlv_uint8_t tlv_pdn_type_t; typedef tlv_octet_t tlv_pti_t; typedef tlv_octet_t tlv_mm_context_t; typedef tlv_octet_t tlv_pdu_numbers_t; typedef tlv_octet_t tlv_p_tmsi_t; typedef tlv_octet_t tlv_p_tmsi_signature_t; typedef tlv_octet_t tlv_hop_counter_t; typedef tlv_octet_t tlv_ue_time_zone_t; typedef tlv_octet_t tlv_trace_reference_t; typedef tlv_octet_t tlv_complete_request_message_t; typedef tlv_octet_t tlv_guti_t; typedef tlv_octet_t tlv_f_container_t; typedef tlv_octet_t tlv_f_cause_t; typedef tlv_octet_t tlv_plmn_id_t; typedef tlv_octet_t tlv_target_identification_t; typedef tlv_octet_t tlv_packet_flow_id_t; typedef tlv_octet_t tlv_rab_context_t; typedef tlv_octet_t tlv_source_rnc_pdcp_context_info_t; typedef tlv_uint16_t tlv_port_number_t; typedef tlv_uint8_t tlv_apn_restriction_t; typedef tlv_uint8_t tlv_selection_mode_t; typedef tlv_octet_t tlv_source_identification_t; typedef tlv_octet_t tlv_change_reporting_action_t; typedef tlv_octet_t tlv_fq_csid_t; typedef tlv_octet_t tlv_channel_needed_t; typedef tlv_octet_t tlv_emlpp_priority_t; typedef tlv_uint8_t tlv_node_type_t; typedef tlv_octet_t tlv_fqdn_t; typedef tlv_octet_t tlv_ti_t; typedef tlv_octet_t tlv_mbms_session_duration_t; typedef tlv_octet_t tlv_mbms_service_area_t; typedef tlv_octet_t tlv_mbms_session_identifier_t; typedef tlv_octet_t tlv_mbms_flow_identifier_t; typedef tlv_octet_t tlv_mbms_ip_multicast_distribution_t; typedef tlv_octet_t tlv_mbms_distribution_acknowledge_t; typedef tlv_octet_t tlv_rfsp_index_t; typedef tlv_octet_t tlv_uci_t; typedef tlv_octet_t tlv_csg_information_reporting_action_t; typedef tlv_octet_t tlv_csg_id_t; typedef tlv_octet_t tlv_cmi_t; typedef tlv_octet_t tlv_service_indicator_t; typedef tlv_octet_t tlv_detach_type_t; typedef tlv_octet_t tlv_ldn_t; typedef tlv_octet_t tlv_node_features_t; typedef tlv_octet_t tlv_mbms_time_to_data_transfer_t; typedef tlv_octet_t tlv_throttling_t; typedef tlv_octet_t tlv_arp_t; typedef tlv_octet_t tlv_epc_timer_t; typedef tlv_octet_t tlv_signalling_priority_indication_t; typedef tlv_octet_t tlv_tmgi_t; typedef tlv_octet_t tlv_additional_mm_context_for_srvcc_t; typedef tlv_octet_t tlv_additional_flags_for_srvcc_t; typedef tlv_octet_t tlv_mdt_configuration_t; typedef tlv_octet_t tlv_apco_t; typedef tlv_octet_t tlv_absolute_time_of_mbms_data_transfer_t; typedef tlv_octet_t tlv_enb_information_reporting_t; typedef tlv_octet_t tlv_ip4cp_t; typedef tlv_octet_t tlv_change_to_report_flags_t; typedef tlv_octet_t tlv_action_indication_t; typedef tlv_octet_t tlv_twan_identifier_t; typedef tlv_octet_t tlv_uli_timestamp_t; typedef tlv_octet_t tlv_mbms_flags_t; typedef tlv_octet_t tlv_ran_nas_cause_t; typedef tlv_octet_t tlv_cn_operator_selection_entity_t; typedef tlv_octet_t tlv_twmi_t; typedef tlv_octet_t tlv_node_number_t; typedef tlv_octet_t tlv_node_identifier_t; typedef tlv_octet_t tlv_presence_reporting_area_action_t; typedef tlv_octet_t tlv_presence_reporting_area_information_t; typedef tlv_octet_t tlv_twan_identifier_timestamp_t; typedef tlv_octet_t tlv_metric_t; typedef tlv_octet_t tlv_sequence_number_t; typedef tlv_octet_t tlv_apn_and_relative_capacity_t; typedef tlv_octet_t tlv_wlan_offloadability_indication_t; typedef tlv_octet_t tlv_paging_and_service_information_t; typedef tlv_octet_t tlv_integer_number_t; typedef tlv_octet_t tlv_millisecond_time_stamp_t; typedef tlv_octet_t tlv_monitoring_event_information_t; typedef tlv_octet_t tlv_ecgi_list_t; typedef tlv_octet_t tlv_remote_user_id_t; typedef tlv_octet_t tlv_remote_ue_ip_information_t; typedef tlv_octet_t tlv_ciot_optimizations_support_indication_t; typedef tlv_octet_t tlv_header_compression_configuration_t; typedef tlv_octet_t tlv_epco_t; typedef tlv_octet_t tlv_serving_plmn_rate_control_t; typedef tlv_octet_t tlv_counter_t; /* Structure for Group Infomration Element */ typedef struct _tlv_bearer_context_t { tlv_presence_t presence; tlv_ebi_t eps_bearer_id; tlv_bearer_tft_t tft; tlv_f_teid_t s1_u_enodeb_f_teid; /* Instance : 0 */ tlv_f_teid_t s4_u_sgsn_f_teid; /* Instance : 1 */ tlv_f_teid_t s5_s8_u_sgw_f_teid; /* Instance : 2 */ tlv_f_teid_t s5_s8_u_pgw_f_teid; /* Instance : 3 */ tlv_f_teid_t s12_rnc_f_teid; /* Instance : 4 */ tlv_f_teid_t s2b_u_epdg_f_teid_5; /* Instance : 5 */ tlv_f_teid_t s2a_u_twan_f_teid_6; /* Instance : 6 */ tlv_bearer_qos_t bearer_level_qos; tlv_f_teid_t s11_u_mme_f_teid; /* Instance : 7 */ tlv_cause_t cause; tlv_charging_id_t charging_id; tlv_bearer_flags_t bearer_flags; tlv_pco_t protocol_configuration_options; tlv_epco_t extended_protocol_configuration_options; tlv_f_teid_t s2b_u_epdg_f_teid_8; /* Instance : 8 */ tlv_f_teid_t s2b_u_pgw_f_teid; /* Instance : 9 */ tlv_f_teid_t s2a_u_twan_f_teid_10; /* Instance : 10 */ tlv_f_teid_t s2a_u_pgw_f_teid; /* Instance : 11 */ tlv_ran_nas_cause_t ran_nas_cause; tlv_apco_t additional_protocol_configuration_options; tlv_f_container_t bss_container; tlv_ti_t transaction_identifier; tlv_packet_flow_id_t packet_flow_id; } tlv_bearer_context_t; typedef struct _tlv_pdn_connection_t { tlv_presence_t presence; } tlv_pdn_connection_t; typedef struct _tlv_overload_control_information_t { tlv_presence_t presence; tlv_sequence_number_t overload_control_sequence_number; tlv_metric_t overload_reduction_metric; tlv_epc_timer_t period_of_validity; tlv_apn_t list_of_access_point_name; } tlv_overload_control_information_t; typedef struct _tlv_load_control_information_t { tlv_presence_t presence; tlv_sequence_number_t load_control_sequence_number; tlv_metric_t load_metric; tlv_apn_and_relative_capacity_t list_of_apn_and_relative_capacity; } tlv_load_control_information_t; typedef struct _tlv_remote_ue_context_t { tlv_presence_t presence; tlv_remote_user_id_t remote_user_id; tlv_remote_ue_ip_information_t remote_ue_ip_information; } tlv_remote_ue_context_t; typedef struct _tlv_scef_pdn_connection_t { tlv_presence_t presence; tlv_apn_t apn; tlv_ebi_t default_eps_bearer_id; tlv_node_identifier_t scef_id; } tlv_scef_pdn_connection_t; /* Structure for Message */ typedef struct _gtp_echo_request_t { tlv_recovery_t recovery; tlv_node_features_t sending_node_features; } gtp_echo_request_t; typedef struct _gtp_echo_response_t { tlv_recovery_t recovery; tlv_node_features_t sending_node_features; } gtp_echo_response_t; typedef struct _gtp_create_session_request_t { tlv_imsi_t imsi; tlv_msisdn_t msisdn; tlv_mei_t me_identity; tlv_uli_t user_location_information; tlv_serving_network_t serving_network; tlv_rat_type_t rat_type; tlv_indication_t indication_flags; tlv_f_teid_t sender_f_teid_for_control_plane; tlv_f_teid_t pgw_s5_s8_address_for_control_plane_or_pmip; tlv_apn_t access_point_name; tlv_selection_mode_t selection_mode; tlv_pdn_type_t pdn_type; tlv_paa_t pdn_address_allocation; tlv_apn_restriction_t maximum_apn_restriction; tlv_ambr_t aggregate_maximum_bit_rate; tlv_ebi_t linked_eps_bearer_id; tlv_twmi_t trusted_wlan_mode_indication; tlv_pco_t protocol_configuration_options; tlv_bearer_context_t bearer_contexts_to_be_created; tlv_bearer_context_t bearer_contexts_to_be_removed; tlv_trace_information_t trace_information; tlv_recovery_t recovery; tlv_fq_csid_t mme_fq_csid; tlv_fq_csid_t sgw_fq_csid; tlv_fq_csid_t epdg_fq_csid; tlv_fq_csid_t twan_fq_csid; tlv_ue_time_zone_t ue_time_zone; tlv_uci_t user_csg_information; tlv_charging_characteristics_t charging_characteristics; tlv_ldn_t mme_s4_sgsn_ldn; tlv_ldn_t sgw_ldn; tlv_ldn_t epdg_ldn; tlv_ldn_t twan_ldn; tlv_signalling_priority_indication_t signalling_priority_indication; tlv_ip_address_t ue_local_ip_address; tlv_port_number_t ue_udp_port; tlv_apco_t additional_protocol_configuration_options; tlv_ip_address_t hnb_local_ip_address; tlv_port_number_t hnb_udp_port; tlv_ip_address_t mme_s4_sgsn_identifier; tlv_twan_identifier_t twan_identifier; tlv_ip_address_t epdg_ip_address; tlv_cn_operator_selection_entity_t cn_operator_selection_entity; tlv_presence_reporting_area_information_t presence_reporting_area_information; tlv_overload_control_information_t mme_s4_sgsn_s_overload_control_information; tlv_overload_control_information_t sgw_s_overload_control_information; tlv_overload_control_information_t twan_epdg_s_overload_control_information; tlv_millisecond_time_stamp_t origination_time_stamp; tlv_integer_number_t maximum_wait_time; tlv_twan_identifier_t wlan_location_information; tlv_twan_identifier_timestamp_t wlan_location_timestamp; tlv_f_container_t nbifom_container; tlv_remote_ue_context_t remote_ue_context_connected; tlv_node_identifier_t _aaa_server_identifier; tlv_epco_t extended_protocol_configuration_options; tlv_serving_plmn_rate_control_t serving_plmn_rate_control; tlv_counter_t mo_exception_data_counter; tlv_port_number_t ue_tcp_port; } gtp_create_session_request_t; typedef struct _gtp_create_session_response_t { tlv_cause_t cause; tlv_change_reporting_action_t change_reporting_action_; tlv_csg_information_reporting_action_t csg_information_reporting_action; tlv_enb_information_reporting_t hnb_information_reporting; tlv_f_teid_t sender_f_teid_for_control_plane; tlv_f_teid_t pgw_s5_s8__s2a_s2b_f_teid_for_pmip_based_interface_or_for_gtp_based_control_plane_interface; tlv_paa_t pdn_address_allocation; tlv_apn_restriction_t apn_restriction; tlv_ambr_t aggregate_maximum_bit_rate; tlv_ebi_t linked_eps_bearer_id; tlv_pco_t protocol_configuration_options; tlv_bearer_context_t bearer_contexts_created; tlv_bearer_context_t bearer_contexts_marked_for_removal; tlv_recovery_t recovery; tlv_fqdn_t charging_gateway_name; tlv_ip_address_t charging_gateway_address; tlv_fq_csid_t pgw_fq_csid; tlv_fq_csid_t sgw_fq_csid; tlv_ldn_t sgw_ldn; tlv_ldn_t pgw_ldn; tlv_epc_timer_t pgw_back_off_time; tlv_apco_t additional_protocol_configuration_options; tlv_ip4cp_t trusted_wlan_ipv4_parameters_; tlv_indication_t indication_flags; tlv_presence_reporting_area_action_t presence_reporting_area_action; tlv_load_control_information_t pgw_s_node_level_load_control_information; tlv_load_control_information_t pgw_s_apn_level_load_control_information; tlv_load_control_information_t sgw_s_node_level_load_control_information; tlv_overload_control_information_t pgw_s_overload_control_information; tlv_overload_control_information_t sgw_s_overload_control_information; tlv_f_container_t nbifom_container; tlv_charging_id_t pdn_connection_charging_id; tlv_epco_t extended_protocol_configuration_options; } gtp_create_session_response_t; typedef struct _gtp_modify_bearer_request_t { tlv_mei_t me_identity; tlv_uli_t user_location_information; tlv_serving_network_t serving_network; tlv_rat_type_t rat_type; tlv_indication_t indication_flags; tlv_f_teid_t sender_f_teid_for_control_plane; tlv_ambr_t aggregate_maximum_bit_rate; tlv_delay_value_t delay_downlink_packet_notification_request; tlv_bearer_context_t bearer_contexts_to_be_modified; tlv_bearer_context_t bearer_contexts_to_be_removed; tlv_recovery_t recovery; tlv_ue_time_zone_t ue_time_zone; tlv_fq_csid_t mme_fq_csid; tlv_uci_t user_csg_information; tlv_ip_address_t ue_local_ip_address; tlv_port_number_t ue_udp_port; tlv_ldn_t mme_s4_sgsn_ldn; tlv_ldn_t sgw_ldn; tlv_ip_address_t hnb_local_ip_address; tlv_port_number_t hnb_udp_port; tlv_ip_address_t mme_s4_sgsn_identifier; tlv_cn_operator_selection_entity_t cn_operator_selection_entity; tlv_presence_reporting_area_information_t presence_reporting_area_information; tlv_overload_control_information_t mme_s4_sgsn_s_overload_control_information; tlv_overload_control_information_t sgw_s_overload_control_information; tlv_overload_control_information_t epdg_s_overload_control_information; tlv_serving_plmn_rate_control_t serving_plmn_rate_control; tlv_counter_t mo_exception_data_counter; } gtp_modify_bearer_request_t; typedef struct _gtp_modify_bearer_response_t { tlv_cause_t cause; tlv_msisdn_t msisdn; tlv_ebi_t linked_eps_bearer_id; tlv_apn_restriction_t apn_restriction; tlv_pco_t protocol_configuration_options; tlv_bearer_context_t bearer_contexts_modified; tlv_bearer_context_t bearer_contexts_marked_for_removal; tlv_change_reporting_action_t change_reporting_action; tlv_csg_information_reporting_action_t csg_information_reporting_action; tlv_enb_information_reporting_t hnb_information_reporting_; tlv_fqdn_t charging_gateway_name; tlv_ip_address_t charging_gateway_address; tlv_fq_csid_t pgw_fq_csid; tlv_fq_csid_t sgw_fq_csid; tlv_recovery_t recovery; tlv_ldn_t sgw_ldn; tlv_ldn_t pgw_ldn; tlv_indication_t indication_flags; tlv_presence_reporting_area_action_t presence_reporting_area_action; tlv_load_control_information_t pgw_s_node_level_load_control_information; tlv_load_control_information_t pgw_s_apn_level_load_control_information; tlv_load_control_information_t sgw_s_node_level_load_control_information; tlv_overload_control_information_t pgw_s_overload_control_information; tlv_overload_control_information_t sgw_s_overload_control_information; tlv_charging_id_t pdn_connection_charging_id; } gtp_modify_bearer_response_t; typedef struct _gtp_delete_session_request_t { tlv_cause_t cause; tlv_ebi_t linked_eps_bearer_id; tlv_uli_t user_location_information; tlv_indication_t indication_flags; tlv_pco_t protocol_configuration_options; tlv_node_type_t originating_node; tlv_f_teid_t sender_f_teid_for_control_plane; tlv_ue_time_zone_t ue_time_zone; tlv_uli_timestamp_t uli_timestamp; tlv_ran_nas_cause_t ran_nas_release_cause; tlv_twan_identifier_t twan_identifier; tlv_twan_identifier_timestamp_t twan_identifier_timestamp; tlv_overload_control_information_t mme_s4_sgsn_s_overload_control_information; tlv_overload_control_information_t sgw_s_overload_control_information; tlv_overload_control_information_t twan_epdg_s_overload_control_information; tlv_twan_identifier_t wlan_location_information; tlv_twan_identifier_timestamp_t wlan_location_timestamp; tlv_ip_address_t ue_local_ip_address; tlv_port_number_t ue_udp_port; tlv_epco_t extended_protocol_configuration_options; tlv_port_number_t ue_tcp_port; } gtp_delete_session_request_t; typedef struct _gtp_delete_session_response_t { tlv_cause_t cause; tlv_recovery_t recovery; tlv_pco_t protocol_configuration_options; tlv_indication_t indication_flags; tlv_load_control_information_t pgw_s_node_level_load_control_information; tlv_load_control_information_t pgw_s_apn_level_load_control_information; tlv_load_control_information_t sgw_s_node_level_load_control_information; tlv_overload_control_information_t pgw_s_overload_control_information; tlv_overload_control_information_t sgw_s_overload_control_information; tlv_epco_t extended_protocol_configuration_options; } gtp_delete_session_response_t; typedef struct _gtp_modify_bearer_command_t { tlv_ambr_t apn_aggregate_maximum_bit_rate; tlv_bearer_context_t bearer_context; tlv_overload_control_information_t mme_s4_sgsn_s_overload_control_information; tlv_overload_control_information_t sgw_s_overload_control_information; tlv_overload_control_information_t twan_epdg_s_overload_control_information; tlv_f_teid_t sender_f_teid_for_control_plane; } gtp_modify_bearer_command_t; typedef struct _gtp_modify_bearer_failure_indication_t { tlv_cause_t cause; tlv_recovery_t recovery; tlv_indication_t indication_flags; tlv_overload_control_information_t pgw_s_overload_control_information; tlv_overload_control_information_t sgw_s_overload_control_information; } gtp_modify_bearer_failure_indication_t; typedef struct _gtp_delete_bearer_command_t { tlv_bearer_context_t bearer_contexts; tlv_uli_t user_location_information; tlv_uli_timestamp_t uli_timestamp; tlv_ue_time_zone_t ue_time_zone; tlv_overload_control_information_t mme_s4_sgsn_s_overload_control_information; tlv_overload_control_information_t sgw_s_overload_control_information; tlv_f_teid_t sender_f_teid_for_control_plane; } gtp_delete_bearer_command_t; typedef struct _gtp_delete_bearer_failure_indication_t { tlv_cause_t cause; tlv_bearer_context_t bearer_context; tlv_recovery_t recovery; tlv_indication_t indication_flags; tlv_overload_control_information_t pgw_s_overload_control_information; tlv_overload_control_information_t sgw_s_overload_control_information; } gtp_delete_bearer_failure_indication_t; typedef struct _gtp_downlink_data_notification_failure_indication_t { tlv_cause_t cause; tlv_node_type_t originating_node; tlv_imsi_t imsi; } gtp_downlink_data_notification_failure_indication_t; typedef struct _gtp_create_bearer_request_t { tlv_pti_t procedure_transaction_id; tlv_ebi_t linked_eps_bearer_id; tlv_pco_t protocol_configuration_options; tlv_bearer_context_t bearer_contexts; tlv_fq_csid_t pgw_fq_csid; tlv_fq_csid_t sgw_fq_csid; tlv_change_reporting_action_t change_reporting_action; tlv_csg_information_reporting_action_t csg_information_reporting_action; tlv_enb_information_reporting_t hnb_information_reporting; tlv_presence_reporting_area_action_t presence_reporting_area_action; tlv_indication_t indication_flags; tlv_load_control_information_t pgw_s_node_level_load_control_information; tlv_load_control_information_t pgw_s_apn_level_load_control_information; tlv_load_control_information_t sgw_s_node_level_load_control_information; tlv_overload_control_information_t pgw_s_overload_control_information; tlv_overload_control_information_t sgw_s_overload_control_information; tlv_f_container_t nbifom_container; } gtp_create_bearer_request_t; typedef struct _gtp_create_bearer_response_t { tlv_cause_t cause; tlv_bearer_context_t bearer_contexts; tlv_recovery_t recovery; tlv_fq_csid_t mme_fq_csid; tlv_fq_csid_t epdg_fq_csid; tlv_fq_csid_t twan_fq_csid; tlv_pco_t protocol_configuration_options; tlv_ue_time_zone_t ue_time_zone; tlv_uli_t user_location_information; tlv_twan_identifier_t twan_identifier; tlv_overload_control_information_t mme_s4_sgsn_s_overload_control_information; tlv_overload_control_information_t sgw_s_overload_control_information; tlv_presence_reporting_area_information_t presence_reporting_area_information; tlv_ip_address_t mme_s4_sgsn_identifier; tlv_overload_control_information_t twan_epdg_s_overload_control_information; tlv_twan_identifier_t wlan_location_information; tlv_twan_identifier_timestamp_t wlan_location_timestamp; tlv_port_number_t ue_udp_port; tlv_f_container_t nbifom_container; tlv_port_number_t ue_tcp_port; } gtp_create_bearer_response_t; typedef struct _gtp_update_bearer_request_t { tlv_bearer_context_t bearer_contexts; tlv_pti_t procedure_transaction_id; tlv_pco_t protocol_configuration_options; tlv_ambr_t aggregate_maximum_bit_rate; tlv_change_reporting_action_t change_reporting_action; tlv_csg_information_reporting_action_t csg_information_reporting_action; tlv_enb_information_reporting_t hnb_information_reporting_; tlv_indication_t indication_flags; tlv_fq_csid_t pgw_fq_csid; tlv_fq_csid_t sgw_fq_csid; tlv_presence_reporting_area_action_t presence_reporting_area_action; tlv_load_control_information_t pgw_s_node_level_load_control_information; tlv_load_control_information_t pgw_s_apn_level_load_control_information; tlv_load_control_information_t sgw_s_node_level_load_control_information; tlv_overload_control_information_t pgw_s_overload_control_information; tlv_overload_control_information_t sgw_s_overload_control_information; tlv_f_container_t nbifom_container; } gtp_update_bearer_request_t; typedef struct _gtp_update_bearer_response_t { tlv_cause_t cause; tlv_bearer_context_t bearer_contexts; tlv_pco_t protocol_configuration_options; tlv_recovery_t recovery; tlv_fq_csid_t mme_fq_csid; tlv_fq_csid_t sgw_fq_csid; tlv_fq_csid_t epdg_fq_csid; tlv_fq_csid_t twan_fq_csid; tlv_indication_t indication_flags; tlv_ue_time_zone_t ue_time_zone; tlv_uli_t user_location_information; tlv_twan_identifier_t twan_identifier; tlv_overload_control_information_t mme_s4_sgsn_s_overload_control_information; tlv_overload_control_information_t sgw_s_overload_control_information; tlv_presence_reporting_area_information_t presence_reporting_area_information; tlv_ip_address_t mme_s4_sgsn_identifier; tlv_overload_control_information_t twan_epdg_s_overload_control_information; tlv_twan_identifier_t wlan_location_information; tlv_twan_identifier_timestamp_t wlan_location_timestamp; tlv_port_number_t ue_udp_port; tlv_f_container_t nbifom_container; tlv_port_number_t ue_tcp_port; } gtp_update_bearer_response_t; typedef struct _gtp_delete_bearer_request_t { tlv_ebi_t linked_eps_bearer_id; tlv_ebi_t eps_bearer_ids; tlv_bearer_context_t failed_bearer_contexts; tlv_pti_t procedure_transaction_id; tlv_pco_t protocol_configuration_options; tlv_fq_csid_t pgw_fq_csid; tlv_fq_csid_t sgw_fq_csid; tlv_cause_t cause; tlv_indication_t indication_flags; tlv_load_control_information_t pgw_s_node_level_load_control_information; tlv_load_control_information_t pgw_s_apn_level_load_control_information; tlv_load_control_information_t sgw_s_node_level_load_control_information; tlv_overload_control_information_t pgw_s_overload_control_information; tlv_overload_control_information_t sgw_s_overload_control_information; tlv_f_container_t nbifom_container; tlv_epco_t extended_protocol_configuration_options; } gtp_delete_bearer_request_t; typedef struct _gtp_delete_bearer_response_t { tlv_cause_t cause; tlv_ebi_t linked_eps_bearer_id; tlv_bearer_context_t bearer_contexts; tlv_recovery_t recovery; tlv_fq_csid_t mme_fq_csid; tlv_fq_csid_t sgw_fq_csid; tlv_fq_csid_t epdg_fq_csid; tlv_fq_csid_t twan_fq_csid; tlv_pco_t protocol_configuration_options; tlv_ue_time_zone_t ue_time_zone; tlv_uli_t user_location_information; tlv_uli_timestamp_t uli_timestamp; tlv_twan_identifier_t twan_identifier; tlv_twan_identifier_timestamp_t twan_identifier_timestamp; tlv_overload_control_information_t mme_s4_sgsn_s_overload_control_information; tlv_overload_control_information_t sgw_s_overload_control_information; tlv_ip_address_t mme_s4_sgsn_identifier; tlv_overload_control_information_t twan_epdg_s_overload_control_information; tlv_twan_identifier_t wlan_location_information; tlv_twan_identifier_timestamp_t wlan_location_timestamp; tlv_port_number_t ue_udp_port; tlv_f_container_t nbifom_container; tlv_port_number_t ue_tcp_port ; } gtp_delete_bearer_response_t; typedef struct _gtp_create_indirect_data_forwarding_tunnel_request_t { tlv_imsi_t imsi; tlv_mei_t me_identity; tlv_indication_t indication_flags; tlv_f_teid_t sender_f_teid_for_control_plane; tlv_bearer_context_t bearer_context_0; tlv_bearer_context_t bearer_context_1; tlv_bearer_context_t bearer_context_2; tlv_bearer_context_t bearer_context_3; tlv_bearer_context_t bearer_context_4; tlv_bearer_context_t bearer_context_5; tlv_bearer_context_t bearer_context_6; tlv_bearer_context_t bearer_context_7; tlv_bearer_context_t bearer_context_8; tlv_bearer_context_t bearer_context_9; tlv_bearer_context_t bearer_context_10; tlv_recovery_t recovery; } gtp_create_indirect_data_forwarding_tunnel_request_t; typedef struct _gtp_create_indirect_data_forwarding_tunnel_response_t { tlv_cause_t cause; tlv_f_teid_t sender_f_teid_for_control_plane; tlv_bearer_context_t bearer_context_0; tlv_bearer_context_t bearer_context_1; tlv_bearer_context_t bearer_context_2; tlv_bearer_context_t bearer_context_3; tlv_bearer_context_t bearer_context_4; tlv_bearer_context_t bearer_context_5; tlv_bearer_context_t bearer_context_6; tlv_bearer_context_t bearer_context_7; tlv_bearer_context_t bearer_context_8; tlv_bearer_context_t bearer_context_9; tlv_bearer_context_t bearer_context_10; tlv_recovery_t recovery; } gtp_create_indirect_data_forwarding_tunnel_response_t; typedef struct _gtp_delete_indirect_data_forwarding_tunnel_request_t { } gtp_delete_indirect_data_forwarding_tunnel_request_t; typedef struct _gtp_delete_indirect_data_forwarding_tunnel_response_t { tlv_cause_t cause; tlv_recovery_t recovery; } gtp_delete_indirect_data_forwarding_tunnel_response_t; typedef struct _gtp_release_access_bearers_request_t { tlv_ebi_t list_of_rabs; tlv_node_type_t originating_node; tlv_indication_t indication_flags; } gtp_release_access_bearers_request_t; typedef struct _gtp_release_access_bearers_response_t { tlv_cause_t cause; tlv_recovery_t recovery; tlv_indication_t indication_flags; tlv_load_control_information_t sgw_s_node_level_load_control_information; tlv_overload_control_information_t sgw_s_overload_control_information; } gtp_release_access_bearers_response_t; typedef struct _gtp_downlink_data_notification_t { tlv_cause_t cause; tlv_ebi_t eps_bearer_id; tlv_arp_t allocation_retention_priority; tlv_imsi_t imsi; tlv_f_teid_t sender_f_teid_for_control_plane; tlv_indication_t indication_flags; tlv_load_control_information_t sgw_s_node_level_load_control_information; tlv_overload_control_information_t sgw_s_overload_control_information; tlv_paging_and_service_information_t paging_and_service_information; } gtp_downlink_data_notification_t; typedef struct _gtp_downlink_data_notification_acknowledge_t { tlv_cause_t cause; tlv_delay_value_t data_notification_delay; tlv_recovery_t recovery; tlv_throttling_t dl_low_priority_traffic_throttling_; tlv_imsi_t imsi; tlv_epc_timer_t dl_buffering_duration; tlv_integer_number_t dl_buffering_suggested_packet_count; } gtp_downlink_data_notification_acknowledge_t; typedef struct _gtp_modify_access_bearers_request_t { tlv_indication_t indication_flags; tlv_f_teid_t sender_f_teid_for_control_plane; tlv_delay_value_t delay_downlink_packet_notification_request; tlv_bearer_context_t bearer_contexts_to_be_modified; tlv_bearer_context_t bearer_contexts_to_be_removed; tlv_recovery_t recovery; } gtp_modify_access_bearers_request_t; typedef struct _gtp_modify_access_bearers_response_t { tlv_cause_t cause; tlv_bearer_context_t bearer_contexts_modified; tlv_bearer_context_t bearer_contexts_marked_for_removal; tlv_recovery_t recovery; tlv_indication_t indication_flags; tlv_load_control_information_t sgw_s_node_level_load_control_information; tlv_overload_control_information_t sgw_s_overload_control_information; } gtp_modify_access_bearers_response_t; typedef struct _gtp_message_t { gtp_header_t h; union { gtp_echo_request_t echo_request; gtp_echo_response_t echo_response; gtp_create_session_request_t create_session_request; gtp_create_session_response_t create_session_response; gtp_modify_bearer_request_t modify_bearer_request; gtp_modify_bearer_response_t modify_bearer_response; gtp_delete_session_request_t delete_session_request; gtp_delete_session_response_t delete_session_response; gtp_modify_bearer_command_t modify_bearer_command; gtp_modify_bearer_failure_indication_t modify_bearer_failure_indication; gtp_delete_bearer_command_t delete_bearer_command; gtp_delete_bearer_failure_indication_t delete_bearer_failure_indication; gtp_downlink_data_notification_failure_indication_t downlink_data_notification_failure_indication; gtp_create_bearer_request_t create_bearer_request; gtp_create_bearer_response_t create_bearer_response; gtp_update_bearer_request_t update_bearer_request; gtp_update_bearer_response_t update_bearer_response; gtp_delete_bearer_request_t delete_bearer_request; gtp_delete_bearer_response_t delete_bearer_response; gtp_create_indirect_data_forwarding_tunnel_request_t create_indirect_data_forwarding_tunnel_request; gtp_create_indirect_data_forwarding_tunnel_response_t create_indirect_data_forwarding_tunnel_response; gtp_delete_indirect_data_forwarding_tunnel_request_t delete_indirect_data_forwarding_tunnel_request; gtp_delete_indirect_data_forwarding_tunnel_response_t delete_indirect_data_forwarding_tunnel_response; gtp_release_access_bearers_request_t release_access_bearers_request; gtp_release_access_bearers_response_t release_access_bearers_response; gtp_downlink_data_notification_t downlink_data_notification; gtp_downlink_data_notification_acknowledge_t downlink_data_notification_acknowledge; gtp_modify_access_bearers_request_t modify_access_bearers_request; gtp_modify_access_bearers_response_t modify_access_bearers_response; }; } gtp_message_t; CORE_DECLARE(status_t) gtp_parse_msg( gtp_message_t *gtp_message, pkbuf_t *pkbuf); CORE_DECLARE(status_t) gtp_build_msg( pkbuf_t **pkbuf, gtp_message_t *gtp_message); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTP_TLV_H__ */ nextepc-0.3.10/lib/gtp/gtp_node.c000066400000000000000000000076161333553357400165710ustar00rootroot00000000000000#define TRACE_MODULE _gtp_node #include "core_debug.h" #include "gtp_conv.h" #include "gtp_node.h" #include "gtp_xact.h" #define MAX_GTP_NODE_POOL_SIZE 512 pool_declare(gtp_node_pool, gtp_node_t, MAX_GTP_NODE_POOL_SIZE); status_t gtp_node_init(void) { pool_init(>p_node_pool, MAX_GTP_NODE_POOL_SIZE); return CORE_OK; } status_t gtp_node_final(void) { if (pool_used(>p_node_pool)) d_error("%d not freed in gtp_node_pool[%d]", pool_used(>p_node_pool), pool_size(>p_node_pool)); d_trace(9, "%d not freed in gtp_node_pool[%d]\n", pool_used(>p_node_pool), pool_size(>p_node_pool)); pool_final(>p_node_pool); return CORE_OK; } status_t gtp_add_node(list_t *list, gtp_node_t **node, c_sockaddr_t *all_list, int no_ipv4, int no_ipv6, int prefer_ipv4) { status_t rv; gtp_node_t *new_node = NULL; c_sockaddr_t *preferred_list = NULL; d_assert(list, return CORE_ERROR,); d_assert(all_list, return CORE_ERROR,); rv = core_copyaddrinfo(&preferred_list, all_list); d_assert(rv == CORE_OK, return CORE_ERROR,); if (no_ipv4 == 1) { rv = core_filteraddrinfo(&preferred_list, AF_INET6); d_assert(rv == CORE_OK, return CORE_ERROR,); } if (no_ipv6 == 1) { rv = core_filteraddrinfo(&preferred_list, AF_INET); d_assert(rv == CORE_OK, return CORE_ERROR,); } if (prefer_ipv4 == 1) { rv = core_sortaddrinfo(&preferred_list, AF_INET); d_assert(rv == CORE_OK, return CORE_ERROR,); } else { rv = core_sortaddrinfo(&preferred_list, AF_INET6); d_assert(rv == CORE_OK, return CORE_ERROR,); } if (preferred_list) { pool_alloc_node(>p_node_pool, &new_node); d_assert(new_node, return CORE_ERROR,); memset(new_node, 0, sizeof(gtp_node_t)); new_node->sa_list = preferred_list; list_init(&new_node->local_list); list_init(&new_node->remote_list); list_append(list, new_node); } *node = new_node; return CORE_OK; } gtp_node_t *gtp_add_node_with_teid(list_t *list, gtp_f_teid_t *f_teid, c_uint16_t port, int no_ipv4, int no_ipv6, int prefer_ipv4) { status_t rv; gtp_node_t *node = NULL; c_sockaddr_t *sa_list = NULL; d_assert(list, return NULL,); d_assert(f_teid, return NULL,); d_assert(port, return NULL,); rv = gtp_f_teid_to_sockaddr(f_teid, port, &sa_list); d_assert(rv == CORE_OK, return NULL,); rv = gtp_add_node(list, &node, sa_list, no_ipv4, no_ipv6, prefer_ipv4); d_assert(rv == CORE_OK, return NULL,); d_assert(node, return NULL,); rv = gtp_f_teid_to_ip(f_teid, &node->ip); d_assert(rv == CORE_OK, return NULL,); rv = sock_fill_scope_id_in_local(node->sa_list); d_assert(rv == CORE_OK, return NULL,); core_freeaddrinfo(sa_list); return node; } status_t gtp_remove_node(list_t *list, gtp_node_t *node) { d_assert(node, return CORE_ERROR,); list_remove(list, node); if (node->sock) sock_delete(node->sock); gtp_xact_delete_all(node); core_freeaddrinfo(node->sa_list); pool_free_node(>p_node_pool, node); return CORE_OK; } status_t gtp_remove_all_nodes(list_t *list) { gtp_node_t *node = NULL, *next_node = NULL; node = list_first(list); while(node) { next_node = list_next(node); gtp_remove_node(list, node); node = next_node; } return CORE_OK; } gtp_node_t* gtp_find_node(list_t *list, gtp_f_teid_t *f_teid) { status_t rv; gtp_node_t *node = NULL; ip_t ip; d_assert(list, return NULL,); d_assert(f_teid, return NULL,); rv = gtp_f_teid_to_ip(f_teid, &ip); d_assert(rv == CORE_OK, return NULL,); node = list_first(list); while (node) { if (memcmp(&node->ip, &ip, ip.len) == 0) break; node = list_next(node); } return node; } nextepc-0.3.10/lib/gtp/gtp_node.h000066400000000000000000000030611333553357400165640ustar00rootroot00000000000000#ifndef __GTP_NODE_H__ #define __GTP_NODE_H__ #include "core_list.h" #include "core_network.h" #include "gtp_types.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define SETUP_GTP_NODE(__cTX, __gNODE) \ do { \ d_assert((__cTX), break, "Null param"); \ d_assert((__gNODE), break, "Null param"); \ (__cTX)->gnode = __gNODE; \ } while(0) /** * This structure represents the commonalities of GTP node such as MME, SGW, * PGW gateway. Some of members may not be used by the specific type of node */ typedef struct _gtp_node_t { lnode_t node; /* A node of list_t */ c_sockaddr_t *sa_list; /* Socket Address List */ sock_id sock; /* Socket instance */ ip_t ip; /* Socket Address */ list_t local_list; list_t remote_list; } gtp_node_t; CORE_DECLARE(status_t) gtp_node_init(void); CORE_DECLARE(status_t) gtp_node_final(void); CORE_DECLARE(status_t) gtp_add_node(list_t *list, gtp_node_t **node, c_sockaddr_t *sa_list, int no_ipv4, int no_ipv6, int prefer_ipv4); CORE_DECLARE(gtp_node_t *) gtp_add_node_with_teid( list_t *list, gtp_f_teid_t *f_teid, c_uint16_t port, int no_ipv4, int no_ipv6, int prefer_ipv4); CORE_DECLARE(status_t) gtp_remove_node(list_t *list, gtp_node_t *node); CORE_DECLARE(status_t) gtp_remove_all_nodes(list_t *list); CORE_DECLARE(gtp_node_t *) gtp_find_node(list_t *list, gtp_f_teid_t *f_teid); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTP_NODE_H__ */ nextepc-0.3.10/lib/gtp/gtp_path.c000066400000000000000000000172761333553357400166030ustar00rootroot00000000000000#define TRACE_MODULE _gtp_path #include "core_debug.h" #include "core_pkbuf.h" #include "3gpp_types.h" #include "gtp_message.h" #include "gtp_conv.h" #include "gtp_node.h" #include "gtp_path.h" status_t gtp_server(sock_node_t *snode, sock_handler handler) { status_t rv; char buf[CORE_ADDRSTRLEN]; d_assert(snode, return CORE_ERROR,); rv = udp_server(&snode->sock, snode->list); d_assert(rv == CORE_OK, return CORE_ERROR,); rv = sock_register(snode->sock, handler, NULL); d_assert(rv == CORE_OK, return CORE_ERROR,); d_trace(1, "gtp_server() [%s]:%d\n", CORE_ADDR(snode->list, buf), CORE_PORT(snode->list)); return CORE_OK; } status_t gtp_client(gtp_node_t *gnode) { status_t rv; char buf[CORE_ADDRSTRLEN]; d_assert(gnode, return CORE_ERROR,); rv = udp_client(&gnode->sock, gnode->sa_list); d_assert(rv == CORE_OK, return CORE_ERROR,); d_trace(1, "gtp_client() [%s]:%d\n", CORE_ADDR(gnode->sa_list, buf), CORE_PORT(gnode->sa_list)); return CORE_OK; } status_t gtp_connect(sock_id ipv4, sock_id ipv6, gtp_node_t *gnode) { c_sockaddr_t *addr; char buf[CORE_ADDRSTRLEN]; d_assert(ipv4 || ipv6, return CORE_ERROR,); d_assert(gnode, return CORE_ERROR,); d_assert(gnode->sa_list, return CORE_ERROR,); addr = gnode->sa_list; while(addr) { sock_id id; if (addr->c_sa_family == AF_INET) id = ipv4; else if (addr->c_sa_family == AF_INET6) id = ipv6; else d_assert(0, return CORE_ERROR,); if (id) { if (sock_connect(id, addr) == CORE_OK) { d_trace(1, "gtp_connect() [%s]:%d\n", CORE_ADDR(addr, buf), CORE_PORT(addr)); gnode->sock = id; break; } } addr = addr->next; } if (addr == NULL) { d_warn("gtp_connect() [%s]:%d failed(%d:%s)", CORE_ADDR(gnode->sa_list, buf), CORE_PORT(gnode->sa_list), errno, strerror(errno)); return CORE_ERROR; } return CORE_OK; } status_t gtp_server_list(list_t *list, sock_handler handler) { status_t rv; sock_node_t *snode = NULL; d_assert(list, return CORE_ERROR,); d_assert(handler, return CORE_ERROR,); for (snode = list_first(list); snode; snode = list_next(snode)) { rv = gtp_server(snode, handler); d_assert(rv == CORE_OK, return CORE_ERROR,); } return CORE_OK; } sock_id gtp_local_sock_first(list_t *list) { sock_node_t *snode = NULL; sock_id sock = 0; d_assert(list, return 0,); for (snode = list_first(list); snode; snode = list_next(snode)) { sock = snode->sock; if (sock) return sock; } return 0; } c_sockaddr_t *gtp_local_addr_first(list_t *list) { sock_node_t *snode = NULL; c_sockaddr_t *addr = NULL; d_assert(list, return NULL,); for (snode = list_first(list); snode; snode = list_next(snode)) { addr = sock_local_addr(snode->sock); if (addr) return addr; } return NULL; } status_t gtp_recv(sock_id sock, pkbuf_t **pkbuf) { ssize_t size; d_assert(sock, return CORE_ERROR,); *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if ((*pkbuf) == NULL) { char tmp_buf[MAX_SDU_LEN]; d_fatal("Can't allocate pkbuf"); /* Read data from socket to exit from select */ core_recv(sock, tmp_buf, MAX_SDU_LEN, 0); return CORE_ERROR; } size = core_recv(sock, (*pkbuf)->payload, (*pkbuf)->len, 0); if (size <= 0) { pkbuf_free((*pkbuf)); if (errno != EAGAIN) { d_warn("net_read failed(%d:%s)", errno, strerror(errno)); } return CORE_ERROR; } else { (*pkbuf)->len = size; return CORE_OK;; } } status_t gtp_recvfrom(sock_id sock, pkbuf_t **pkbuf, c_sockaddr_t *from) { ssize_t size; d_assert(sock, return CORE_ERROR,); d_assert(from, return CORE_ERROR,); *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if ((*pkbuf) == NULL) { char tmp_buf[MAX_SDU_LEN]; d_fatal("Can't allocate pkbuf"); /* Read data from socket to exit from select */ core_recv(sock, tmp_buf, MAX_SDU_LEN, 0); return CORE_ERROR; } size = core_recvfrom(sock, (*pkbuf)->payload, (*pkbuf)->len, 0, from); if (size <= 0) { pkbuf_free((*pkbuf)); if (errno != EAGAIN) { d_warn("core_recv failed(%d:%s)", errno, strerror(errno)); } return CORE_ERROR; } else { (*pkbuf)->len = size; return CORE_OK;; } } status_t gtp_send(gtp_node_t *gnode, pkbuf_t *pkbuf) { char buf[CORE_ADDRSTRLEN]; ssize_t sent; sock_id sock = 0; c_sockaddr_t *addr = NULL; d_assert(gnode, return CORE_ERROR, "Null param"); d_assert(pkbuf, return CORE_ERROR, "Null param"); sock = gnode->sock; d_assert(sock, return CORE_ERROR, "Null param"); /* New interface */ sock = gnode->sock; d_assert(sock, return CORE_ERROR,); addr = sock_remote_addr(sock); d_assert(addr, return CORE_ERROR,); sent = core_send(sock, pkbuf->payload, pkbuf->len, 0); if (sent < 0 || sent != pkbuf->len) { d_error("core_send [%s]:%d failed(%d:%s)", CORE_ADDR(addr, buf), CORE_PORT(addr), errno, strerror(errno)); return CORE_ERROR; } return CORE_OK; } pkbuf_t *gtp_handle_echo_req(pkbuf_t *pkb) { gtp_header_t *gtph = NULL; pkbuf_t *pkb_resp;NULL; gtp_header_t *gtph_resp;NULL; c_uint16_t length; int idx; d_assert(pkb, return NULL, "pkt is NULL"); gtph = (gtp_header_t *)pkb->payload; /* Check GTP version. Now only support GTPv1(version = 1) */ if ((gtph->flags >> 5) != 1) { return NULL; } if (gtph->type != GTPU_MSGTYPE_ECHO_REQ) { return NULL; } pkb_resp = pkbuf_alloc(0, 100 /* enough for ECHO_RSP; use smaller buffer */); d_assert(pkb_resp, return NULL, "Can't allocate pkbuf"); gtph_resp = (gtp_header_t *)pkb_resp->payload; /* reply back immediately */ gtph_resp->flags = (1 << 5); /* set version */ gtph_resp->flags |= (1 << 4); /* set PT */ gtph_resp->type = GTPU_MSGTYPE_ECHO_RSP; length = 0; /* length of Recovery IE */ gtph_resp->length = htons(length); /* to be overwriten */ gtph_resp->teid = 0; idx = 8; if (gtph->flags & (GTPU_FLAGS_PN | GTPU_FLAGS_S)) { length += 4; if (gtph->flags & GTPU_FLAGS_S) { /* sequence exists */ gtph_resp->flags |= GTPU_FLAGS_S; *((c_uint8_t *)pkb_resp->payload + idx) = *((c_uint8_t *)pkb->payload + idx); *((c_uint8_t *)pkb_resp->payload + idx + 1) = *((c_uint8_t *)pkb->payload + idx + 1); } else { *((c_uint8_t *)pkb_resp->payload + idx) = 0; *((c_uint8_t *)pkb_resp->payload + idx + 1) = 0; } idx += 2; if (gtph->flags & GTPU_FLAGS_PN) { /* sequence exists */ gtph_resp->flags |= GTPU_FLAGS_PN; *((c_uint8_t *)pkb_resp->payload + idx) = *((c_uint8_t *)pkb->payload + idx); } else { *((c_uint8_t *)pkb_resp->payload + idx) = 0; } idx++; *((c_uint8_t *)pkb_resp->payload + idx) = 0; /* next-extension header */ idx++; } /* fill Recovery IE */ length += 2; *((c_uint8_t *)pkb_resp->payload + idx) = 14; idx++; /* type */ *((c_uint8_t *)pkb_resp->payload + idx) = 0; idx++; /* restart counter */ gtph_resp->length = htons(length); pkb_resp->len = idx; /* buffer length */ return pkb_resp; } nextepc-0.3.10/lib/gtp/gtp_path.h000066400000000000000000000017271333553357400166020ustar00rootroot00000000000000#ifndef __GTP_PATH_H__ #define __GTP_PATH_H__ #include "core_pkbuf.h" #include "core_network.h" typedef struct _gtp_node_t gtp_node_t; #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(status_t) gtp_server(sock_node_t *snode, sock_handler handler); CORE_DECLARE(status_t) gtp_client(gtp_node_t *gnode); CORE_DECLARE(status_t) gtp_connect( sock_id ipv4, sock_id ipv6, gtp_node_t *gnode); CORE_DECLARE(status_t) gtp_server_list(list_t *list, sock_handler handler); CORE_DECLARE(sock_id) gtp_local_sock_first(list_t *list); CORE_DECLARE(c_sockaddr_t *) gtp_local_addr_first(list_t *list); CORE_DECLARE(status_t) gtp_recv(sock_id sock, pkbuf_t **pkbuf); CORE_DECLARE(status_t) gtp_recvfrom(sock_id sock, pkbuf_t **pkbuf, c_sockaddr_t *from); CORE_DECLARE(status_t) gtp_send(gtp_node_t *gnode, pkbuf_t *pkbuf); CORE_DECLARE(pkbuf_t*) gtp_handle_echo_req(pkbuf_t *pkt); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTP_PATH_H__ */ nextepc-0.3.10/lib/gtp/gtp_types.c000066400000000000000000000403731333553357400170050ustar00rootroot00000000000000/* * Copyright (c) 2017, NextEPC Group * 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. */ #define TRACE_MODULE _gtptypes #include "core_debug.h" #include "core_lib.h" #include "core_network.h" #include "gtp_types.h" #include "gtp_message.h" /* 8.13 Protocol Configuration Options (PCO) * 10.5.6.3 Protocol configuration options in 3GPP TS 24.008 */ /* 8.15 Bearer Quality of Service (Bearer QoS) */ c_int16_t gtp_parse_bearer_qos( gtp_bearer_qos_t *bearer_qos, tlv_octet_t *octet) { gtp_bearer_qos_t *source = (gtp_bearer_qos_t *)octet->data; c_int16_t size = 0; d_assert(bearer_qos, return -1, "Null param"); d_assert(octet, return -1, "Null param"); d_assert(octet->len == GTP_BEARER_QOS_LEN, return -1, "Null param"); memset(bearer_qos, 0, sizeof(gtp_bearer_qos_t)); bearer_qos->pre_emption_capability = source->pre_emption_capability; bearer_qos->priority_level = source->priority_level; bearer_qos->pre_emption_vulnerability = source->pre_emption_vulnerability; size++; bearer_qos->qci = source->qci; size++; bearer_qos->ul_mbr = core_buffer_to_uint64(octet->data + size, 5); size += 5; bearer_qos->dl_mbr = core_buffer_to_uint64(octet->data + size, 5); size += 5; bearer_qos->ul_gbr = core_buffer_to_uint64(octet->data + size, 5); size += 5; bearer_qos->dl_gbr = core_buffer_to_uint64(octet->data + size, 5); size += 5; d_assert(size == octet->len, return -1, "decode error"); return size; } c_int16_t gtp_build_bearer_qos( tlv_octet_t *octet, gtp_bearer_qos_t *bearer_qos, void *data, int data_len) { gtp_bearer_qos_t target; c_int16_t size = 0; d_assert(bearer_qos, return -1, "Null param"); d_assert(octet, return -1, "Null param"); d_assert(data, return -1, "Null param"); d_assert(data_len >= GTP_BEARER_QOS_LEN, return -1, "Null param"); octet->data = data; memcpy(&target, bearer_qos, sizeof(gtp_bearer_qos_t)); memcpy(octet->data + size, &target, 2); size += 2; core_uint64_to_buffer(target.ul_mbr, 5, octet->data + size); size += 5; core_uint64_to_buffer(target.dl_mbr, 5, octet->data + size); size += 5; core_uint64_to_buffer(target.ul_gbr, 5, octet->data + size); size += 5; core_uint64_to_buffer(target.dl_gbr, 5, octet->data + size); size += 5; octet->len = size; return octet->len; } /* 8.19 EPS Bearer Level Traffic Flow Template (Bearer TFT) * See subclause 10.5.6.12 in 3GPP TS 24.008 [13]. */ c_int16_t gtp_build_tft( tlv_octet_t *octet, gtp_tft_t *tft, void *data, int data_len) { gtp_tft_t target; c_uint16_t size = 0; int i, j; d_assert(tft, return -1, "Null param"); d_assert(octet, return -1, "Null param"); d_assert(data, return -1, "Null param"); d_assert(data_len >= GTP_MAX_TRAFFIC_FLOW_TEMPLATE, return -1, "Null param"); octet->data = data; memcpy(&target, tft, sizeof(gtp_tft_t)); d_assert(size + sizeof(target.flags) <= data_len, return -1, "encode error"); memcpy(octet->data + size, &target.flags, sizeof(target.flags)); size += sizeof(target.flags); for (i = 0; i < target.num_of_packet_filter; i++) { d_assert(size + sizeof(target.pf[i].flags) <= data_len, return -1, "encode error"); memcpy(octet->data + size, &target.pf[i].flags, sizeof(target.pf[i].flags)); size += sizeof(target.pf[i].flags); d_assert(size + sizeof(target.pf[i].precedence) <= data_len, return -1, "encode error"); memcpy(octet->data + size, &target.pf[i].precedence, sizeof(target.pf[i].precedence)); size += sizeof(target.pf[i].precedence); d_assert(size + sizeof(target.pf[i].length) <= data_len, return -1, "encode error"); memcpy(octet->data + size, &target.pf[i].length, sizeof(target.pf[i].length)); size += sizeof(target.pf[i].length); for (j = 0; j < target.pf[i].num_of_component; j++) { d_assert(size + sizeof(target.pf[i].component[j].type) <= data_len, return -1, "encode error"); memcpy(octet->data + size, &target.pf[i].component[j].type, sizeof(target.pf[i].component[j].type)); size += sizeof(target.pf[i].component[j].type); switch(target.pf[i].component[j].type) { case GTP_PACKET_FILTER_PROTOCOL_IDENTIFIER_NEXT_HEADER_TYPE: { d_assert(size + sizeof(target.pf[i].component[j].proto) <= data_len, return -1, "encode error"); memcpy(octet->data + size, &target.pf[i].component[j].proto, sizeof(target.pf[i].component[j].proto)); size += sizeof(target.pf[i].component[j].proto); break; } case GTP_PACKET_FILTER_IPV4_REMOTE_ADDRESS_TYPE: case GTP_PACKET_FILTER_IPV4_LOCAL_ADDRESS_TYPE: d_assert(size + sizeof(target.pf[i].component[j].ipv4.addr) <= data_len, return -1, "encode error"); memcpy(octet->data + size, &target.pf[i].component[j].ipv4.addr, sizeof(target.pf[i].component[j].ipv4.addr)); size += sizeof(target.pf[i].component[j].ipv4.addr); d_assert(size + sizeof(target.pf[i].component[j].ipv4.mask) <= data_len, return -1, "encode error"); memcpy(octet->data + size, &target.pf[i].component[j].ipv4.mask, sizeof(target.pf[i].component[j].ipv4.mask)); size += sizeof(target.pf[i].component[j].ipv4.mask); break; case GTP_PACKET_FILTER_IPV6_LOCAL_ADDRESS_PREFIX_LENGTH_TYPE: case GTP_PACKET_FILTER_IPV6_REMOTE_ADDRESS_PREFIX_LENGTH_TYPE: d_assert(size + sizeof(target.pf[i].component[j].ipv6.addr) <= data_len, return -1, "encode error"); memcpy(octet->data + size, &target.pf[i].component[j].ipv6.addr, sizeof(target.pf[i].component[j].ipv6.addr)); size += sizeof(target.pf[i].component[j].ipv6.addr); d_assert(size + sizeof(target.pf[i].component[j].ipv6.prefixlen) <= data_len, return -1, "encode error"); memcpy(octet->data + size, &target.pf[i].component[j].ipv6.prefixlen, sizeof(target.pf[i].component[j].ipv6.prefixlen)); size += sizeof(target.pf[i].component[j].ipv6.prefixlen); break; case GTP_PACKET_FILTER_IPV6_REMOTE_ADDRESS_TYPE: d_assert(size + sizeof(target.pf[i].component[j].ipv6_mask.addr) <= data_len, return -1, "encode error"); memcpy(octet->data + size, &target.pf[i].component[j].ipv6_mask.addr, sizeof(target.pf[i].component[j].ipv6_mask.addr)); size += sizeof(target.pf[i].component[j].ipv6_mask.addr); d_assert(size + sizeof(target.pf[i].component[j].ipv6_mask.mask) <= data_len, return -1, "encode error"); memcpy(octet->data + size, &target.pf[i].component[j].ipv6_mask.mask, sizeof(target.pf[i].component[j].ipv6_mask.mask)); size += sizeof(target.pf[i].component[j].ipv6_mask.mask); break; case GTP_PACKET_FILTER_SINGLE_LOCAL_PORT_TYPE: case GTP_PACKET_FILTER_SINGLE_REMOTE_PORT_TYPE: d_assert(size + sizeof(target.pf[i].component[j].port.low) <= data_len, return -1, "encode error"); target.pf[i].component[j].port.low = htons(target.pf[i].component[j].port.low); memcpy(octet->data + size, &target.pf[i].component[j].port.low, sizeof(target.pf[i].component[j].port.low)); size += sizeof(target.pf[i].component[j].port.low); break; case GTP_PACKET_FILTER_LOCAL_PORT_RANGE_TYPE: case GTP_PACKET_FILTER_REMOTE_PORT_RANGE_TYPE: d_assert(size + sizeof(target.pf[i].component[j].port.low) <= data_len, return -1, "encode error"); target.pf[i].component[j].port.low = htons(target.pf[i].component[j].port.low); memcpy(octet->data + size, &target.pf[i].component[j].port.low, sizeof(target.pf[i].component[j].port.low)); size += sizeof(target.pf[i].component[j].port.low); d_assert(size + sizeof(target.pf[i].component[j].port.high) <= data_len, return -1, "encode error"); target.pf[i].component[j].port.high = htons(target.pf[i].component[j].port.high); memcpy(octet->data + size, &target.pf[i].component[j].port.high, sizeof(target.pf[i].component[j].port.high)); size += sizeof(target.pf[i].component[j].port.high); break; default: d_error("Unknown Packet Filter Type(%d)", target.pf[i].component[j].type); return -1; } } } octet->len = size; return octet->len; } /* 8.21 User Location Information (ULI) */ c_int16_t gtp_parse_uli(gtp_uli_t *uli, tlv_octet_t *octet) { gtp_uli_t *source = (gtp_uli_t *)octet->data; c_int16_t size = 0; d_assert(uli, return -1, "Null param"); d_assert(octet, return -1, "Null param"); memset(uli, 0, sizeof(gtp_uli_t)); uli->flags = source->flags; size++; if (uli->flags.cgi) { d_assert(size + sizeof(uli->cgi) <= octet->len, return -1, "decode error"); memcpy(&uli->cgi, octet->data + size, sizeof(uli->cgi)); uli->cgi.lac = ntohs(uli->cgi.lac); uli->cgi.ci = ntohs(uli->cgi.ci); size += sizeof(uli->cgi); } if (uli->flags.sai) { d_assert(size + sizeof(uli->sai) <= octet->len, return -1, "decode error"); memcpy(&uli->sai, octet->data + size, sizeof(uli->sai)); uli->sai.lac = ntohs(uli->sai.lac); uli->sai.sac = ntohs(uli->sai.sac); size += sizeof(uli->sai); } if (uli->flags.rai) { d_assert(size + sizeof(uli->rai) <= octet->len, return -1, "decode error"); memcpy(&uli->rai, octet->data + size, sizeof(uli->rai)); uli->rai.lac = ntohs(uli->rai.lac); uli->rai.rac = ntohs(uli->rai.rac); size += sizeof(uli->rai); } if (uli->flags.tai) { d_assert(size + sizeof(uli->tai) <= octet->len, return -1, "decode error"); memcpy(&uli->tai, octet->data + size, sizeof(uli->tai)); uli->tai.tac = ntohs(uli->tai.tac); size += sizeof(uli->tai); } if (uli->flags.e_cgi) { d_assert(size + sizeof(uli->e_cgi) <= octet->len, return -1, "decode error"); memcpy(&uli->e_cgi, octet->data + size, sizeof(uli->e_cgi)); uli->e_cgi.cell_id = ntohl(uli->e_cgi.cell_id); size += sizeof(uli->e_cgi); } if (uli->flags.lai) { d_assert(size + sizeof(uli->lai) <= octet->len, return -1, "decode error"); memcpy(&uli->lai, octet->data + size, sizeof(uli->lai)); uli->lai.lac = ntohs(uli->lai.lac); size += sizeof(uli->lai); } d_assert(size == octet->len, return -1, "decode error"); return size; } c_int16_t gtp_build_uli( tlv_octet_t *octet, gtp_uli_t *uli, void *data, int data_len) { gtp_uli_t target; c_int16_t size = 0; d_assert(uli, return -1, "Null param"); d_assert(octet, return -1, "Null param"); d_assert(data, return -1, "Null param"); d_assert(data_len, return -1, "Null param"); octet->data = data; memcpy(&target, uli, sizeof(gtp_uli_t)); d_assert(size + sizeof(target.flags) <= data_len, return -1, "encode error"); memcpy(octet->data + size, &target.flags, sizeof(target.flags)); size += sizeof(target.flags); if (target.flags.cgi) { d_assert(size + sizeof(target.cgi) <= data_len, return -1, "encode error"); target.cgi.lac = htons(target.cgi.lac); target.cgi.ci = htons(target.cgi.ci); memcpy(octet->data + size, &target.cgi, sizeof(target.cgi)); size += sizeof(target.cgi); } if (target.flags.sai) { d_assert(size + sizeof(target.sai) <= data_len, return -1, "encode error"); target.sai.lac = htons(target.sai.lac); target.sai.sac = htons(target.sai.sac); memcpy(octet->data + size, &target.sai, sizeof(target.sai)); size += sizeof(target.sai); } if (target.flags.rai) { d_assert(size + sizeof(target.rai) <= data_len, return -1, "encode error"); target.rai.lac = htons(target.rai.lac); target.rai.rac = htons(target.rai.rac); memcpy(octet->data + size, &target.rai, sizeof(target.rai)); size += sizeof(target.rai); } if (target.flags.tai) { d_assert(size + sizeof(target.tai) <= data_len, return -1, "encode error"); target.tai.tac = htons(target.tai.tac); memcpy(octet->data + size, &target.tai, sizeof(target.tai)); size += sizeof(target.tai); } if (target.flags.e_cgi) { d_assert(size + sizeof(target.e_cgi) <= data_len, return -1, "encode error"); target.e_cgi.cell_id = htonl(target.e_cgi.cell_id); memcpy(octet->data + size, &target.e_cgi, sizeof(target.e_cgi)); size += sizeof(target.e_cgi); } if (target.flags.lai) { d_assert(size + sizeof(target.lai) <= data_len, return -1, "encode error"); target.lai.lac = htons(target.lai.lac); memcpy(octet->data + size, &target.lai, sizeof(target.lai)); size += sizeof(target.lai); } octet->len = size; return octet->len; } nextepc-0.3.10/lib/gtp/gtp_types.h000066400000000000000000000371511333553357400170120ustar00rootroot00000000000000#ifndef __GTP_TYPES_H__ #define __GTP_TYPES_H__ #include "core_tlv_msg.h" #include "3gpp_types.h" typedef struct c_sockaddr_t c_sockaddr_t; #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* 8.4 Cause */ #define GTP_CAUSE_LOCAL_DETACH 2 #define GTP_CAUSE_COMPLETE_DETACH_3 #define GTP_CAUSE_RAT_CHANGED_FROM_3GPP_TO_NON_3GPP 4 #define GTP_CAUSE_ISR_DEACTIVATION 5 #define GTP_CAUSE_ERROR_INDICATION_RECEIVED_FROM_RNC_ENODEB_S4_SGSN_MME 6 #define GTP_CAUSE_IMSI_DETACH_ONLY 7 #define GTP_CAUSE_REACTIVATION_REQUESTED 8 #define GTP_CAUSE_PDN_RECONNECTION_TO_THIS_APN_DISALLOWED 9 #define GTP_CAUSE_ACCESS_CHANGED_FROM_NON_3GPP_TO_3GPP 10 #define GTP_CAUSE_PDN_CONNECTION_INACTIVITY_TIMER_EXPIRES 11 #define GTP_CAUSE_PGW_NOT_RESPONDING 12 #define GTP_CAUSE_NETWORK_FAILURE 13 #define GTP_CAUSE_QOS_PARAMETER_MISMATCH 14 #define GTP_CAUSE_REQUEST_ACCEPTED 16 #define GTP_CAUSE_REQUEST_ACCEPTED_PARTIALLY 17 #define GTP_CAUSE_NEW_PDN_TYPE_DUE_TO_NETWORK_PREFERENCE 18 #define GTP_CAUSE_NEW_PDN_TYPE_DUE_TO_SINGLE_ADDRESS_BEARER_ONLY 19 #define GTP_CAUSE_CONTEXT_NOT_FOUND 64 #define GTP_CAUSE_INVALID_MESSAGE_FORMAT 65 #define GTP_CAUSE_VERSION_NOT_SUPPORTED_BY_NEXT_PEER 66 #define GTP_CAUSE_INVALID_LENGTH 67 #define GTP_CAUSE_SERVICE_NOT_SUPPORTED 68 #define GTP_CAUSE_MANDATORY_IE_INCORRECT 69 #define GTP_CAUSE_MANDATORY_IE_MISSING 70 #define GTP_CAUSE_SYSTEM_FAILURE 72 #define GTP_CAUSE_NO_RESOURCES_AVAILABLE 73 #define GTP_CAUSE_SEMANTIC_ERROR_IN_THE_TFT_OPERATION 74 #define GTP_CAUSE_SYNTACTIC_ERROR_IN_THE_TFT_OPERATION 75 #define GTP_CAUSE_SEMANTIC_ERRORS_IN_PACKET_FILTER 76 #define GTP_CAUSE_SYNTACTIC_ERRORS_IN_PACKET_FILTER 77 #define GTP_CAUSE_MISSING_OR_UNKNOWN_APN 78 #define GTP_CAUSE_GRE_KEY_NOT_FOUND 80 #define GTP_CAUSE_RELOCATION_FAILURE 81 #define GTP_CAUSE_DENIED_IN_RAT 82 #define GTP_CAUSE_PREFERRED_PDN_TYPE_NOT_SUPPORTED 83 #define GTP_CAUSE_ALL_DYNAMIC_ADDRESSES_ARE_OCCUPIED 84 #define GTP_CAUSE_UE_CONTEXT_WITHOUT_TFT_ALREADY_ACTIVATED 85 #define GTP_CAUSE_PROTOCOL_TYPE_NOT_SUPPORTED 86 #define GTP_CAUSE_UE_NOT_RESPONDING 87 #define GTP_CAUSE_UE_REFUSES 88 #define GTP_CAUSE_SERVICE_DENIED 89 #define GTP_CAUSE_UNABLE_TO_PAGE_UE 90 #define GTP_CAUSE_NO_MEMORY_AVAILABLE 91 #define GTP_CAUSE_USER_AUTHENTICATION_FAILED 92 #define GTP_CAUSE_APN_ACCESS_DENIED_NO_SUBSCRIPTION 93 #define GTP_CAUSE_REQUEST_REJECTED_REASON_NOT_SPECIFIED 94 #define GTP_CAUSE_P_TMSI_SIGNATURE_MISMATCH 95 #define GTP_CAUSE_IMSI_IMEI_NOT_KNOWN 96 #define GTP_CAUSE_SEMANTIC_ERROR_IN_THE_TAD_OPERATION 97 #define GTP_CAUSE_SYNTACTIC_ERROR_IN_THE_TAD_OPERATION 98 #define GTP_CAUSE_REMOTE_PEER_NOT_RESPONDING 100 #define GTP_CAUSE_COLLISION_WITH_NETWORK_INITIATED_REQUEST 101 #define GTP_CAUSE_UNABLE_TO_PAGE_UE_DUE_TO_SUSPENSION 102 #define GTP_CAUSE_CONDITIONAL_IE_MISSING 103 #define GTP_CAUSE_APN_RESTRICTION_TYPE_INCOMPATIBLE 104 #define GTP_CAUSE_INVALID_OVERALL_LENGTH 105 #define GTP_CAUSE_DATA_FORWARDING_NOT_SUPPORTED 106 #define GTP_CAUSE_INVALID_REPLY_FROM_REMOTE_PEER 107 #define GTP_CAUSE_FALLBACK_TO_GTPV1 108 #define GTP_CAUSE_INVALID_PEER 109 #define GTP_CAUSE_TEMPORARILY_REJECTED_DUE_TO_HANDOVER_IN_PROGRESS 110 #define GTP_CAUSE_MODIFICATIONS_NOT_LIMITED_TO_S1_U_BEARERS 111 #define GTP_CAUSE_REQUEST_REJECTED_FOR_A_PMIPV6_REASON 112 #define GTP_CAUSE_APN_CONGESTION 113 #define GTP_CAUSE_BEARER_HANDLING_NOT_SUPPORTED 114 #define GTP_CAUSE_UE_ALREADY_RE_ATTACHED 115 #define GTP_CAUSE_MULTIPLE_PDN_CONNECTIONS_FOR_A_GIVEN_APN_NOT_ALLOWED 116 #define GTP_CAUSE_TARGET_ACCESS_RESTRICTED_FOR_THE_SUBSCRIBER 117 #define GTP_CAUSE_MME_SGSN_REFUSES_DUE_TO_VPLMN_POLICY 119 #define GTP_CAUSE_GTP_C_ENTITY_CONGESTION 120 #define GTP_CAUSE_LATE_OVERLAPPING_REQUEST 121 #define GTP_CAUSE_TIMED_OUT_REQUEST 122 #define GTP_CAUSE_UE_IS_TEMPORARILY_NOT_REACHABLE_DUE_TO_POWER_SAVING 123 #define GTP_CAUSE_RELOCATION_FAILURE_DUE_TO_NAS_MESSAGE_REDIRECTION 124 #define GTP_CAUSE_UE_NOT_AUTHORISED_BY_OCS_OR_EXTERNAL_AAA_SERVER 125 #define GTP_CAUSE_MULTIPLE_ACCESSES_TO_A_PDN_CONNECTION_NOT_ALLOWED 126 #define GTP_CAUSE_REQUEST_REJECTED_DUE_TO_UE_CAPABILITY 127 typedef struct _gtp_cause_t { c_uint8_t value; ED4(c_uint8_t spare:5;, c_uint8_t pce:1;, c_uint8_t bce:1;, c_uint8_t cs:1;) } __attribute__ ((packed)) gtp_cause_t; /* 8.7 Aggregate Maximum Bit Rate (AMBR) */ typedef struct _gtp_ambr_t { c_uint32_t uplink; c_uint32_t downlink; } __attribute__ ((packed)) gtp_ambr_t; /* 8.12 Indication */ typedef struct _gtp_indication_t { ED8(c_uint8_t daf:1;, c_uint8_t dtf:1;, c_uint8_t hi:1;, c_uint8_t dfi:1;, c_uint8_t oi:1;, c_uint8_t isrsi:1;, c_uint8_t israi:1;, c_uint8_t sgwci:1;) ED8(c_uint8_t sqci:1;, c_uint8_t uimsi:1;, c_uint8_t cfsi:1;, c_uint8_t crsi:1;, c_uint8_t p:1;, c_uint8_t pt:1;, c_uint8_t si:1;, c_uint8_t msv:1;) ED8(c_uint8_t retloc:1;, c_uint8_t pbic:1;, c_uint8_t srni:1;, c_uint8_t s6af:1;, c_uint8_t s4af:1;, c_uint8_t mbmdt:1;, c_uint8_t israu:1;, c_uint8_t ccrsi:1;) ED8(c_uint8_t spare1:1;, c_uint8_t spare2:1;, c_uint8_t spare3:1;, c_uint8_t spare4:1;, c_uint8_t spare5:1;, c_uint8_t csfbi:1;, c_uint8_t clii:1;, c_uint8_t cpsr:1;) } __attribute__ ((packed)) gtp_indication_t; /* 8.13 Protocol Configuration Options (PCO) * 10.5.6.3 Protocol configuration options in 3GPP TS 24.008 * RFC 3232 [103] * RFC 1661 [102] */ /* 8.15 Bearer Quality of Service (Bearer QoS) */ #define GTP_BEARER_QOS_LEN 22 typedef struct _gtp_bearer_qos_t { ED5(c_uint8_t spare1:1;, /* See 3GPP TS 29.212[29], clause 5.3.46 Pre-emption-Capability AVP. */ c_uint8_t pre_emption_capability:1;, /* See 3GPP TS 29.212[29], clause 5.3.45 Priority-Level AVP. * PL encodes each priority level defined for the Priority-Level AVP * as the binary value of the priority level. */ c_uint8_t priority_level:4;, c_uint8_t spare2:1;, /* See 3GPP TS 29.212[29], clause 5.3.47 Pre-emption-Vulnerability AVP. */ c_uint8_t pre_emption_vulnerability:1;) c_uint8_t qci; /* specified in 3GPP TS 23.203 [48]. */ /* specified in 3GPP TS 36.413 [10]. */ c_uint64_t ul_mbr; c_uint64_t dl_mbr; c_uint64_t ul_gbr; c_uint64_t dl_gbr; /* NOTE : The encoding in 3GPP TS 24.301 [23] and 3GPP TS 36.413 [10] * is different from the encoding within this specification. */ } __attribute__ ((packed)) gtp_bearer_qos_t; CORE_DECLARE(c_int16_t) gtp_parse_bearer_qos( gtp_bearer_qos_t *bearer_qos, tlv_octet_t *octet); CORE_DECLARE(c_int16_t) gtp_build_bearer_qos( tlv_octet_t *octet, gtp_bearer_qos_t *bearer_qos, void *data, int data_len); /* 8.17 RAT Type */ #define GTP_RAT_TYPE_UTRAN 1 #define GTP_RAT_TYPE_GERAN 2 #define GTP_RAT_TYPE_WLAN 3 #define GTP_RAT_TYPE_GAN 4 #define GTP_RAT_TYPE_HSPA_EVOLUTION 5 #define GTP_RAT_TYPE_EUTRAN 6 #define GTP_RAT_TYPE_VIRTUAL 7 #define GTP_RAT_TYPE_EUTRAN_NB_IOT 8 /* 8.19 EPS Bearer Level Traffic Flow Template (Bearer TFT) * See subclause 10.5.6.12 in 3GPP TS 24.008 [13]. */ #define GTP_MAX_TRAFFIC_FLOW_TEMPLATE 255 #define GTP_MAX_NUM_OF_PACKET_FILTER_COMPONENT 16 typedef struct _gtp_tft_t { union { struct { #define GTP_TFT_CODE_IGNORE_THIS_IE 0 #define GTP_TFT_CODE_CREATE_NEW_TFT 1 #define GTP_TFT_CODE_DELETE_EXISTING_TFT 2 #define GTP_TFT_CODE_ADD_PACKET_FILTERS_TO_EXISTING_TFT 3 #define GTP_TFT_CODE_REPLACE_PACKET_FILTERS_IN_EXISTING 4 #define GTP_TFT_CODE_DELETE_PACKET_FILTERS_FROM_EXISTING 5 #define GTP_TFT_CODE_NO_TFT_OPERATION 6 ED3(c_uint8_t code:3;, c_uint8_t e_bit:1;, c_uint8_t num_of_packet_filter:4;) }; c_uint8_t flags; }; struct { union { struct { ED3(c_uint8_t spare:2;, c_uint8_t direction:2;, c_uint8_t identifier:4;) }; c_uint8_t flags; }; c_uint8_t precedence; c_uint8_t length; #define GTP_PACKET_FILTER_PROTOCOL_IDENTIFIER_NEXT_HEADER_TYPE 48 #define GTP_PACKET_FILTER_IPV4_REMOTE_ADDRESS_TYPE 16 #define GTP_PACKET_FILTER_IPV4_LOCAL_ADDRESS_TYPE 17 #define GTP_PACKET_FILTER_IPV6_REMOTE_ADDRESS_TYPE 32 #define GTP_PACKET_FILTER_IPV6_REMOTE_ADDRESS_PREFIX_LENGTH_TYPE 33 #define GTP_PACKET_FILTER_IPV6_LOCAL_ADDRESS_TYPE 34 #define GTP_PACKET_FILTER_IPV6_LOCAL_ADDRESS_PREFIX_LENGTH_TYPE 35 #define GTP_PACKET_FILTER_SINGLE_LOCAL_PORT_TYPE 64 #define GTP_PACKET_FILTER_LOCAL_PORT_RANGE_TYPE 65 #define GTP_PACKET_FILTER_SINGLE_REMOTE_PORT_TYPE 80 #define GTP_PACKET_FILTER_REMOTE_PORT_RANGE_TYPE 81 #define GTP_PACKET_FILTER_SECURITY_PARAMETER_INDEX_TYPE 96 #define GTP_PACKET_FILTER_TOS_TRAFFIC_CLASS_TYPE 112 #define GTP_PACKET_FILTER_FLOW_LABEL_TYPE 128 struct { c_uint8_t type; union { c_uint8_t proto; struct { c_uint32_t addr; c_uint32_t mask; } ipv4; struct { c_uint32_t addr[4]; c_uint8_t prefixlen; } ipv6; struct { c_uint32_t addr[4]; c_uint32_t mask[4]; } ipv6_mask; struct { c_uint16_t low; c_uint16_t high; } port; }; } component[GTP_MAX_NUM_OF_PACKET_FILTER_COMPONENT]; c_uint8_t num_of_component; } pf[MAX_NUM_OF_PACKET_FILTER]; } gtp_tft_t; CORE_DECLARE(c_int16_t) gtp_build_tft( tlv_octet_t *octet, gtp_tft_t *tft, void *data, int data_len); /* 8.21 User Location Information (ULI) */ #define GTP_MAX_ULI_LEN sizeof(gtp_uli_t) typedef struct _gtp_uli_cgi_t { plmn_id_t plmn_id; c_uint16_t lac; c_uint16_t ci; } __attribute__ ((packed)) gtp_uli_cgi_t; typedef struct _gtp_uli_sai_t { plmn_id_t plmn_id; c_uint16_t lac; c_uint16_t sac; } __attribute__ ((packed)) gtp_uli_sai_t; typedef struct _gtp_uli_rai_t { plmn_id_t plmn_id; c_uint16_t lac; c_uint16_t rac; } __attribute__ ((packed)) gtp_uli_rai_t; typedef struct _gtp_uli_lai_t { plmn_id_t plmn_id; c_uint16_t lac; } __attribute__ ((packed)) gtp_uli_lai_t; typedef struct _gtp_uli_t { struct { ED7(c_uint8_t spare:2;, c_uint8_t lai:1;, c_uint8_t e_cgi:1;, c_uint8_t tai:1;, c_uint8_t rai:1;, c_uint8_t sai:1;, c_uint8_t cgi:1;) } flags; gtp_uli_cgi_t cgi; gtp_uli_sai_t sai; gtp_uli_rai_t rai; tai_t tai; e_cgi_t e_cgi; gtp_uli_lai_t lai; } gtp_uli_t; CORE_DECLARE(c_int16_t) gtp_parse_uli(gtp_uli_t *uli, tlv_octet_t *octet); CORE_DECLARE(c_int16_t) gtp_build_uli( tlv_octet_t *octet, gtp_uli_t *uli, void *data, int data_len); /* 8.22 Fully Qualified TEID (F-TEID) */ #define GTP_F_TEID_S1_U_ENODEB_GTP_U 0 #define GTP_F_TEID_S1_U_SGW_GTP_U 1 #define GTP_F_TEID_S12_RNC_GTP_U 2 #define GTP_F_TEID_S12_SGW_GTP_U 3 #define GTP_F_TEID_S5_S8_SGW_GTP_U 4 #define GTP_F_TEID_S5_S8_PGW_GTP_U 5 #define GTP_F_TEID_S5_S8_SGW_GTP_C 6 #define GTP_F_TEID_S5_S8_PGW_GTP_C 7 #define GTP_F_TEID_S5_S8_SGW_PMIPV6 8 #define GTP_F_TEID_S5_S8_PGW_PMIPV6 9 #define GTP_F_TEID_S11_MME_GTP_C 10 #define GTP_F_TEID_S11_S4_SGW_GTP_C 11 #define GTP_F_TEID_S10_MME_GTP_C 12 #define GTP_F_TEID_S3_MME_GTP_C 13 #define GTP_F_TEID_S3_SGSN_GTP_C 14 #define GTP_F_TEID_S4_SGSN_GTP_U 15 #define GTP_F_TEID_S4_SGW_GTP_U 16 #define GTP_F_TEID_S4_SGSN_GTP_C 17 #define GTP_F_TEID_S16_SGSN_GTP_C 18 #define GTP_F_TEID_ENODEB_GTP_U_FOR_DL_DATA_FORWARDING 19 #define GTP_F_TEID_ENODEB_GTP_U_FOR_UL_DATA_FORWARDING 20 #define GTP_F_TEID_RNC_GTP_U_FOR_DATA_FORWARDING 21 #define GTP_F_TEID_SGSN_GTP_U_FOR_DATA_FORWARDING 22 #define GTP_F_TEID_SGW_GTP_U_FOR_DL_DATA_FORWARDING 23 #define GTP_F_TEID_SM_MBMS_GW_GTP_C 24 #define GTP_F_TEID_SN_MBMS_GW_GTP_C 25 #define GTP_F_TEID_SM_MME_GTP_C 26 #define GTP_F_TEID_SN_SGSN_GTP_C 27 #define GTP_F_TEID_SGW_GTP_U_FOR_UL_DATA_FORWARDING 28 #define GTP_F_TEID_SN_SGSN_GTP_U 29 #define GTP_F_TEID_S2B_EPDG_GTP_C 30 #define GTP_F_TEID_S2B_U_EPDG_GTP_U 31 #define GTP_F_TEID_S2B_PGW_GTP_C 32 #define GTP_F_TEID_S2B_U_PGW_GTP_U 33 #define GTP_F_TEID_S2A_TWAN_GTP_U 34 #define GTP_F_TEID_S2A_TWAN_GTP_C 35 #define GTP_F_TEID_S2A_PGW_GTP_C 36 #define GTP_F_TEID_S2A_PGW_GTP_U 37 #define GTP_F_TEID_S11_MME_GTP_U 38 #define GTP_F_TEID_S11_SGW_GTP_U 39 #define GTP_F_TEID_HDR_LEN 5 #define GTP_F_TEID_IPV4_LEN IPV4_LEN+GTP_F_TEID_HDR_LEN #define GTP_F_TEID_IPV6_LEN IPV6_LEN+GTP_F_TEID_HDR_LEN #define GTP_F_TEID_IPV4V6_LEN IPV4V6_LEN+GTP_F_TEID_HDR_LEN typedef struct _gtp_f_teid_t { ED3(c_uint8_t ipv4:1;, c_uint8_t ipv6:1;, c_uint8_t interface_type:6;) c_uint32_t teid; union { /* GTP_F_TEID_IPV4 */ c_uint32_t addr; /* GTP_F_TEID_IPV6 */ c_uint8_t addr6[IPV6_LEN]; /* GTP_F_TEID_BOTH */ struct { c_uint32_t addr; c_uint8_t addr6[IPV6_LEN]; } both; }; } __attribute__ ((packed)) gtp_f_teid_t; /* 8.44 UE Time Zone */ #define GTP_UE_TIME_ZONE_NO_ADJUSTMENT_FOR_DAYLIGHT_SAVING_TIME 0 #define GTP_UE_TIME_ZONE_1_HOUR_FOR_DAYLIGHT_SAVING_TIME 1 #define GTP_UE_TIME_ZONE_2_HOUR_FOR_DAYLIGHT_SAVING_TIME 2 typedef struct _gtp_ue_timezone_t { /* Time Zone" IE in 3GPP TS 24.008 [5]. * This field uses the same format as the Timezone field used in the * TP-Service-Centre-Time-Stamp, which is defined in 3GPP TS 23.040 [90], * and its value shall be set as defined in 3GPP TS 22.042 */ #define GTP_TIME_TO_BCD(x) TIME_TO_BCD(x) ED2(c_uint8_t sign:1;, c_uint8_t gmtoff:7;) /* quarters of an hour */ ED2(c_uint8_t spare:6;, c_uint8_t daylight_saving_time:2;) } __attribute__ ((packed)) gtp_ue_timezone_t; /* 8.57 APN Restriction */ #define GTP_APN_NO_RESTRICTION 0 #define GTP_APN_RESTRICTION_PUBLIC_1 1 #define GTP_APN_RESTRICTION_PUBLIC_2 2 #define GTP_APN_RESTRICTION_PRIVATE_1 3 #define GTP_APN_RESTRICTION_PRIVATE_2 4 /* 8.58 Selection Mode */ #define GTP_SELECTION_MODE_MS_OR_NETWORK_PROVIDED_APN 0 #define GTP_SELECTION_MODE_MS_PROVIDED_APN 1 #define GTP_SELECTION_MODE_NETWORK_PROVIDED_APN 2 /* 8.65 Node Type */ #define GTP_NODE_TYPE_MME 0 #define GTP_NODE_TYPE_SGSN 1 #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTP_TYPES_H__ */ nextepc-0.3.10/lib/gtp/gtp_xact.c000066400000000000000000000730271333553357400166020ustar00rootroot00000000000000#define TRACE_MODULE _gtp_xact #include "core_debug.h" #include "core_pool.h" #include "core_event.h" #include "3gpp_types.h" #include "gtp_message.h" #include "gtp_node.h" #include "gtp_path.h" #include "gtp_xact.h" #define SIZE_OF_GTP_XACT_POOL 64 #define GTP_MIN_XACT_ID 1 #define GTP_MAX_XACT_ID 0x800000 #define GTP_T3_RESPONSE_DURATION 3000 /* 3 seconds */ #define GTP_T3_RESPONSE_RETRY_COUNT 3 #define GTP_T3_DUPLICATED_DURATION \ (GTP_T3_RESPONSE_DURATION * GTP_T3_RESPONSE_RETRY_COUNT) /* 9 seconds */ #define GTP_T3_DUPLICATED_RETRY_COUNT 1 typedef enum { GTP_XACT_UNKNOWN_STAGE, GTP_XACT_INITIAL_STAGE, GTP_XACT_INTERMEDIATE_STAGE, GTP_XACT_FINAL_STAGE, } gtp_xact_stage_t; static int gtp_xact_initialized = 0; static tm_service_t *g_tm_service = NULL; static c_uintptr_t g_response_event = 0; static c_uintptr_t g_holding_event = 0; static c_uint32_t g_xact_id = 0; index_declare(gtp_xact_pool, gtp_xact_t, SIZE_OF_GTP_XACT_POOL); static gtp_xact_stage_t gtp_xact_get_stage(c_uint8_t type, c_uint32_t sqn); static status_t gtp_xact_delete(gtp_xact_t *xact); status_t gtp_xact_init(tm_service_t *tm_service, c_uintptr_t response_event, c_uintptr_t holding_event) { d_assert(gtp_xact_initialized == 0, return CORE_ERROR, "GTP Transaction already has been initialized"); index_init(>p_xact_pool, SIZE_OF_GTP_XACT_POOL); g_xact_id = 0; g_tm_service = tm_service; g_response_event = response_event; g_holding_event = holding_event; gtp_xact_initialized = 1; return CORE_OK; } status_t gtp_xact_final(void) { d_assert(gtp_xact_initialized == 1, return CORE_ERROR, "GTP Transaction context already has been finalized"); if (pool_used(>p_xact_pool)) d_error("%d not freed in gtp_xact_pool[%d] of GTP Transaction", pool_used(>p_xact_pool), pool_size(>p_xact_pool)); d_trace(15, "%d not freed in gtp_xact_pool[%d] of GTP Transaction\n", pool_used(>p_xact_pool), pool_size(>p_xact_pool)); index_final(>p_xact_pool); gtp_xact_initialized = 0; return CORE_OK; } gtp_xact_t *gtp_xact_local_create( gtp_node_t *gnode, gtp_header_t *hdesc, pkbuf_t *pkbuf) { status_t rv; char buf[CORE_ADDRSTRLEN]; gtp_xact_t *xact = NULL; d_assert(gnode, return NULL, "Null param"); index_alloc(>p_xact_pool, &xact); d_assert(xact, return NULL, "Transaction allocation failed"); xact->org = GTP_LOCAL_ORIGINATOR; xact->xid = NEXT_ID(g_xact_id, GTP_MIN_XACT_ID, GTP_MAX_XACT_ID); xact->gnode = gnode; if (g_response_event) { xact->tm_response = timer_create(g_tm_service, g_response_event, GTP_T3_RESPONSE_DURATION); d_assert(xact->tm_response, return NULL, "Timer allocation failed"); timer_set_param1(xact->tm_response, xact->index); xact->response_rcount = GTP_T3_RESPONSE_RETRY_COUNT; } if (g_holding_event) { xact->tm_holding = timer_create(g_tm_service, g_holding_event, GTP_T3_DUPLICATED_DURATION); d_assert(xact->tm_holding, return NULL, "Timer allocation failed"); timer_set_param1(xact->tm_holding, xact->index); xact->holding_rcount = GTP_T3_DUPLICATED_RETRY_COUNT; } list_append(xact->org == GTP_LOCAL_ORIGINATOR ? &xact->gnode->local_list : &xact->gnode->remote_list, xact); rv = gtp_xact_update_tx(xact, hdesc, pkbuf); d_assert(rv == CORE_OK, return NULL, "Update Tx failed"); d_trace(15, "[%d] %s Create peer [%s]:%d\n", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", CORE_ADDR(sock_remote_addr(gnode->sock), buf), CORE_PORT(sock_remote_addr(gnode->sock))); return xact; } gtp_xact_t *gtp_xact_remote_create(gtp_node_t *gnode, c_uint32_t sqn) { char buf[CORE_ADDRSTRLEN]; gtp_xact_t *xact = NULL; d_assert(gnode, return NULL, "Null param"); index_alloc(>p_xact_pool, &xact); d_assert(xact, return NULL, "Transaction allocation failed"); xact->org = GTP_REMOTE_ORIGINATOR; xact->xid = GTP_SQN_TO_XID(sqn); xact->gnode = gnode; if (g_response_event) { xact->tm_response = timer_create(g_tm_service, g_response_event, GTP_T3_RESPONSE_DURATION); d_assert(xact->tm_response, return NULL, "Timer allocation failed"); timer_set_param1(xact->tm_response, xact->index); xact->response_rcount = GTP_T3_RESPONSE_RETRY_COUNT; } if (g_holding_event) { xact->tm_holding = timer_create(g_tm_service, g_holding_event, GTP_T3_DUPLICATED_DURATION); d_assert(xact->tm_holding, return NULL, "Timer allocation failed"); timer_set_param1(xact->tm_holding, xact->index); xact->holding_rcount = GTP_T3_DUPLICATED_RETRY_COUNT; } list_append(xact->org == GTP_LOCAL_ORIGINATOR ? &xact->gnode->local_list : &xact->gnode->remote_list, xact); d_trace(15, "[%d] %s Create peer [%s]:%d\n", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", CORE_ADDR(sock_remote_addr(gnode->sock), buf), CORE_PORT(sock_remote_addr(gnode->sock))); return xact; } void gtp_xact_delete_all(gtp_node_t *gnode) { gtp_xact_t *xact = NULL; xact = list_first(&gnode->local_list); while(xact) { gtp_xact_delete(xact); xact = list_next(xact); } xact = list_first(&gnode->remote_list); while(xact) { gtp_xact_delete(xact); xact = list_next(xact); } } status_t gtp_xact_update_tx(gtp_xact_t *xact, gtp_header_t *hdesc, pkbuf_t *pkbuf) { char buf[CORE_ADDRSTRLEN]; gtp_xact_stage_t stage; gtp_header_t *h = NULL; d_assert(xact, return CORE_ERROR, "Null param"); d_assert(xact->gnode, return CORE_ERROR, "Null param"); d_assert(hdesc, return CORE_ERROR, "Null param"); d_assert(pkbuf, return CORE_ERROR, "Null param"); d_trace(15, "[%d] %s UPD TX-%d peer [%s]:%d\n", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", hdesc->type, CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); stage = gtp_xact_get_stage(hdesc->type, xact->xid); if (xact->org == GTP_LOCAL_ORIGINATOR) { switch(stage) { case GTP_XACT_INITIAL_STAGE: d_assert(xact->step == 0, return CORE_ERROR, "[%d] %s invalid step %d for type %d peer [%s]:%d", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", xact->step, hdesc->type, CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); break; case GTP_XACT_INTERMEDIATE_STAGE: d_assert(0, return CORE_ERROR, "invalid step(%d)", xact->step); case GTP_XACT_FINAL_STAGE: d_assert(xact->step == 2, return CORE_ERROR, "[%d] %s invalid step %d for type %d peer [%s]:%d", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", xact->step, hdesc->type, CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); break; default: d_assert(0, return CORE_ERROR, "invalid step(%d)", xact->step); } } else if (xact->org == GTP_REMOTE_ORIGINATOR) { switch(stage) { case GTP_XACT_INITIAL_STAGE: d_assert(0, return CORE_ERROR, "invalid step(%d)", xact->step); case GTP_XACT_INTERMEDIATE_STAGE: case GTP_XACT_FINAL_STAGE: d_assert(xact->step == 1, return CORE_ERROR, "[%d] %s invalid step %d for type %d peer [%s]:%d", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", xact->step, hdesc->type, CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); break; default: d_assert(0, return CORE_ERROR, "invalid step(%d)", xact->step); } } else d_assert(0, return CORE_ERROR, "invalid orginator(%d)", xact->org); pkbuf_header(pkbuf, GTPV2C_HEADER_LEN); h = pkbuf->payload; d_assert(h, return CORE_ERROR, "Null param"); memset(h, 0, sizeof(gtp_header_t)); h->version = 2; h->teid_presence = 1; h->type = hdesc->type; h->length = htons(pkbuf->len - 4); h->teid = htonl(hdesc->teid); h->sqn = GTP_XID_TO_SQN(xact->xid); /* Save Message type and packet of this step */ xact->seq[xact->step].type = h->type; xact->seq[xact->step].pkbuf = pkbuf; /* Step */ xact->step++; return CORE_OK; } status_t gtp_xact_update_rx(gtp_xact_t *xact, c_uint8_t type) { status_t rv = CORE_OK; char buf[CORE_ADDRSTRLEN]; gtp_xact_stage_t stage; d_trace(15, "[%d] %s UPD RX-%d peer [%s]:%d\n", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", type, CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); stage = gtp_xact_get_stage(type, xact->xid); if (xact->org == GTP_LOCAL_ORIGINATOR) { switch(stage) { case GTP_XACT_INITIAL_STAGE: d_assert(0, return CORE_ERROR, "invalid step(%d)", xact->step); case GTP_XACT_INTERMEDIATE_STAGE: if (xact->seq[1].type == type) { pkbuf_t *pkbuf = NULL; d_assert(xact->step == 2 || xact->step == 3, return CORE_ERROR, "[%d] %s invalid step %d for type %d peer [%s]:%d", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", xact->step, type, CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); pkbuf = xact->seq[2].pkbuf; if (pkbuf) { if (xact->tm_holding) tm_start(xact->tm_holding); d_warn("[%d] %s Request Duplicated. Retransmit!" " for type %d peer [%s]:%d", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", xact->step, type, CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); rv = gtp_send(xact->gnode, pkbuf); d_assert(rv == CORE_OK, return CORE_ERROR, "gtp_send error"); } else { d_warn("[%d] %s Request Duplicated. Discard!" " for type %d peer [%s]:%d", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", xact->step, type, CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); } return CORE_EAGAIN; } d_assert(xact->step == 1, return CORE_ERROR, "[%d] %s invalid step %d for type %d peer [%s]:%d", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", xact->step, type, CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); if (xact->tm_holding) tm_start(xact->tm_holding); break; case GTP_XACT_FINAL_STAGE: d_assert(xact->step == 1, return CORE_ERROR, "[%d] %s invalid step %d for type %d peer [%s]:%d", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", xact->step, type, CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); break; default: d_assert(0, return CORE_ERROR, "invalid step(%d)", xact->step); } } else if (xact->org == GTP_REMOTE_ORIGINATOR) { switch(stage) { case GTP_XACT_INITIAL_STAGE: if (xact->seq[0].type == type) { pkbuf_t *pkbuf = NULL; d_assert(xact->step == 1 || xact->step == 2, return CORE_ERROR, "[%d] %s invalid step %d for type %d peer [%s]:%d", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", xact->step, type, CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); pkbuf = xact->seq[1].pkbuf; if (pkbuf) { if (xact->tm_holding) tm_start(xact->tm_holding); d_warn("[%d] %s Request Duplicated. Retransmit!" " for step %d type %d peer [%s]:%d", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", xact->step, type, CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); rv = gtp_send(xact->gnode, pkbuf); d_assert(rv == CORE_OK, return CORE_ERROR, "gtp_send error"); } else { d_warn("[%d] %s Request Duplicated. Discard!" " for step %d type %d peer [%s]:%d", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", xact->step, type, CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); } return CORE_EAGAIN; } d_assert(xact->step == 0, return CORE_ERROR, "[%d] %s invalid step %d for type %d peer [%s]:%d", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", xact->step, type, CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); if (xact->tm_holding) tm_start(xact->tm_holding); break; case GTP_XACT_INTERMEDIATE_STAGE: d_assert(0, return CORE_ERROR, "invalid step(%d)", xact->step); case GTP_XACT_FINAL_STAGE: d_assert(xact->step == 2, return CORE_ERROR, "[%d] %s invalid step %d for type %d peer [%s]:%d", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", xact->step, type, CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); /* continue */ break; default: d_assert(0, return CORE_ERROR, "invalid step(%d)", xact->step); } } else d_assert(0, return CORE_ERROR, "invalid orginator(%d)", xact->org); if (xact->tm_response) tm_stop(xact->tm_response); /* Save Message type of this step */ xact->seq[xact->step].type = type; /* Step */ xact->step++; return CORE_OK; } status_t gtp_xact_commit(gtp_xact_t *xact) { status_t rv; char buf[CORE_ADDRSTRLEN]; c_uint8_t type; pkbuf_t *pkbuf = NULL; gtp_xact_stage_t stage; d_assert(xact, return CORE_ERROR, "Null param"); d_assert(xact->gnode, return CORE_ERROR, "Null param"); d_trace(15, "[%d] %s Commit peer [%s]:%d\n", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); type = xact->seq[xact->step-1].type; stage = gtp_xact_get_stage(type, xact->xid); if (xact->org == GTP_LOCAL_ORIGINATOR) { switch(stage) { case GTP_XACT_INITIAL_STAGE: { d_assert(xact->step == 1, return CORE_ERROR, "[%d] %s invalid step %d for type %d peer [%s]:%d", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", xact->step, type, CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); if (xact->tm_response) tm_start(xact->tm_response); break; } case GTP_XACT_INTERMEDIATE_STAGE: d_assert(0, return CORE_ERROR, "invalid step(%d)", xact->step); case GTP_XACT_FINAL_STAGE: d_assert(xact->step == 2 || xact->step == 3, return CORE_ERROR, "[%d] %s invalid step %d for type %d peer [%s]:%d", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", xact->step, type, CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); if (xact->step == 2) { gtp_xact_delete(xact); return CORE_OK; } break; default: d_assert(0, return CORE_ERROR, "invalid step(%d)", xact->step); } } else if (xact->org == GTP_REMOTE_ORIGINATOR) { switch(stage) { case GTP_XACT_INITIAL_STAGE: d_assert(0, return CORE_ERROR, "invalid step(%d)", xact->step); case GTP_XACT_INTERMEDIATE_STAGE: d_assert(xact->step == 2, return CORE_ERROR, "[%d] %s invalid step %d for type %d peer [%s]:%d", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", xact->step, type, CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); if (xact->tm_response) tm_start(xact->tm_response); break; case GTP_XACT_FINAL_STAGE: d_assert(xact->step == 2 || xact->step == 3, return CORE_ERROR, "[%d] %s invalid step %d for type %d peer [%s]:%d", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", xact->step, type, CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); if (xact->step == 3) { gtp_xact_delete(xact); return CORE_OK; } break; default: d_assert(0, return CORE_ERROR, "invalid step(%d)", xact->step); } } else d_assert(0, return CORE_ERROR, "invalid orginator(%d)", xact->org); pkbuf = xact->seq[xact->step-1].pkbuf; d_assert(pkbuf, return CORE_ERROR, "Null param"); rv = gtp_send(xact->gnode, pkbuf); d_assert(rv == CORE_OK, return CORE_ERROR, "gtp_send error"); return CORE_OK; } status_t gtp_xact_timeout(index_t index, c_uintptr_t event) { char buf[CORE_ADDRSTRLEN]; gtp_xact_t *xact = NULL; d_assert(index, goto out, "Invalid Index"); xact = index_find(>p_xact_pool, index); d_assert(xact, goto out, "Null param"); d_assert(xact->gnode, goto out, "Null param"); if (event == g_response_event) { d_trace(15, "[%d] %s Response Timeout " "for step %d type %d peer [%s]:%d\n", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", xact->step, xact->seq[xact->step-1].type, CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); if (--xact->response_rcount > 0) { pkbuf_t *pkbuf = NULL; if (xact->tm_response) tm_start(xact->tm_response); pkbuf = xact->seq[xact->step-1].pkbuf; d_assert(pkbuf, return CORE_ERROR, "Null param"); if (gtp_send(xact->gnode, pkbuf) != CORE_OK) { d_error("gtp_send() failed"); goto out; } } else { d_warn("[%d] %s No Reponse. Give up! " "for step %d type %d peer [%s]:%d", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", xact->step, xact->seq[xact->step-1].type, CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); gtp_xact_delete(xact); } } else if (event == g_holding_event) { d_trace(15, "[%d] %s Holding Timeout " "for step %d type %d peer [%s]:%d\n", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", xact->step, xact->seq[xact->step-1].type, CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); if (--xact->holding_rcount > 0) { if (xact->tm_holding) tm_start(xact->tm_holding); } else { d_trace(15, "[%d] %s Delete Transaction " "for step %d type %d peer [%s]:%d\n", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", xact->step, xact->seq[xact->step-1].type, CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); gtp_xact_delete(xact); } } return CORE_OK; out: gtp_xact_delete(xact); return CORE_ERROR; } status_t gtp_xact_receive( gtp_node_t *gnode, gtp_header_t *h, gtp_xact_t **xact) { char buf[CORE_ADDRSTRLEN]; status_t rv; gtp_xact_t *new = NULL; d_assert(gnode, return CORE_ERROR, "Null param"); d_assert(h, return CORE_ERROR, "Null param"); new = gtp_xact_find_by_xid(gnode, h->type, GTP_SQN_TO_XID(h->sqn)); if (!new) new = gtp_xact_remote_create(gnode, h->sqn); d_assert(new, return CORE_ERROR, "Null param"); d_trace(15, "[%d] %s Receive peer [%s]:%d\n", new->xid, new->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", CORE_ADDR(sock_remote_addr(gnode->sock), buf), CORE_PORT(sock_remote_addr(gnode->sock))); rv = gtp_xact_update_rx(new, h->type); if (rv != CORE_OK) { return rv; } *xact = new; return CORE_OK; } gtp_xact_t *gtp_xact_find(index_t index) { d_assert(index, return NULL, "Invalid Index"); return index_find(>p_xact_pool, index); } static gtp_xact_stage_t gtp_xact_get_stage(c_uint8_t type, c_uint32_t xid) { gtp_xact_stage_t stage = GTP_XACT_UNKNOWN_STAGE; switch(type) { case GTP_CREATE_SESSION_REQUEST_TYPE: case GTP_MODIFY_BEARER_REQUEST_TYPE: case GTP_DELETE_SESSION_REQUEST_TYPE: case GTP_MODIFY_BEARER_COMMAND_TYPE: case GTP_DELETE_BEARER_COMMAND_TYPE: case GTP_BEARER_RESOURCE_COMMAND_TYPE: case GTP_RELEASE_ACCESS_BEARERS_REQUEST_TYPE: case GTP_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_REQUEST_TYPE: case GTP_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_REQUEST_TYPE: case GTP_DOWNLINK_DATA_NOTIFICATION_TYPE: stage = GTP_XACT_INITIAL_STAGE; break; case GTP_CREATE_BEARER_REQUEST_TYPE: case GTP_UPDATE_BEARER_REQUEST_TYPE: case GTP_DELETE_BEARER_REQUEST_TYPE: if (xid & GTP_MAX_XACT_ID) stage = GTP_XACT_INTERMEDIATE_STAGE; else stage = GTP_XACT_INITIAL_STAGE; break; case GTP_CREATE_SESSION_RESPONSE_TYPE: case GTP_MODIFY_BEARER_RESPONSE_TYPE: case GTP_DELETE_SESSION_RESPONSE_TYPE: case GTP_MODIFY_BEARER_FAILURE_INDICATION_TYPE: case GTP_DELETE_BEARER_FAILURE_INDICATION_TYPE: case GTP_BEARER_RESOURCE_FAILURE_INDICATION_TYPE: case GTP_CREATE_BEARER_RESPONSE_TYPE: case GTP_UPDATE_BEARER_RESPONSE_TYPE: case GTP_DELETE_BEARER_RESPONSE_TYPE: case GTP_RELEASE_ACCESS_BEARERS_RESPONSE_TYPE: case GTP_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE: case GTP_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE: case GTP_DOWNLINK_DATA_NOTIFICATION_ACKNOWLEDGE_TYPE: stage = GTP_XACT_FINAL_STAGE; break; default: d_error("Not implemented GTPv2 Message Type(%d)", type); break; } return stage; } gtp_xact_t *gtp_xact_find_by_xid( gtp_node_t *gnode, c_uint8_t type, c_uint32_t xid) { char buf[CORE_ADDRSTRLEN]; gtp_xact_t *xact = NULL; d_assert(gnode, return NULL, "Null param"); switch(gtp_xact_get_stage(type, xid)) { case GTP_XACT_INITIAL_STAGE: xact = list_first(&gnode->remote_list); break; case GTP_XACT_INTERMEDIATE_STAGE: xact = list_first(&gnode->local_list); break; case GTP_XACT_FINAL_STAGE: if (xid & GTP_MAX_XACT_ID) xact = list_first(&gnode->remote_list); else xact = list_first(&gnode->local_list); break; default: d_assert(0, return NULL, "Unknown stage"); } while(xact) { if (xact->xid == xid) break; xact = list_next(xact); } if (xact) { d_trace(15, "[%d] %s Find peer [%s]:%d\n", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", CORE_ADDR(sock_remote_addr(gnode->sock), buf), CORE_PORT(sock_remote_addr(gnode->sock))); } return xact; } void gtp_xact_associate(gtp_xact_t *xact1, gtp_xact_t *xact2) { d_assert(xact1, return, "Null param"); d_assert(xact2, return, "Null param"); d_assert(xact1->assoc_xact == NULL, return, "Already assocaited"); d_assert(xact2->assoc_xact == NULL, return, "Already assocaited"); xact1->assoc_xact = xact2; xact2->assoc_xact = xact1; } void gtp_xact_deassociate(gtp_xact_t *xact1, gtp_xact_t *xact2) { d_assert(xact1, return, "Null param"); d_assert(xact2, return, "Null param"); d_assert(xact1->assoc_xact != NULL, return, "Already deassocaited"); d_assert(xact2->assoc_xact != NULL, return, "Already deassocaited"); xact1->assoc_xact = NULL; xact2->assoc_xact = NULL; } static status_t gtp_xact_delete(gtp_xact_t *xact) { char buf[CORE_ADDRSTRLEN]; d_assert(xact, , "Null param"); d_assert(xact->gnode, , "Null param"); d_trace(15, "[%d] %s Delete peer [%s]:%d\n", xact->xid, xact->org == GTP_LOCAL_ORIGINATOR ? "LOCAL " : "REMOTE", CORE_ADDR(sock_remote_addr(xact->gnode->sock), buf), CORE_PORT(sock_remote_addr(xact->gnode->sock))); if (xact->seq[0].pkbuf) pkbuf_free(xact->seq[0].pkbuf); if (xact->seq[1].pkbuf) pkbuf_free(xact->seq[1].pkbuf); if (xact->seq[2].pkbuf) pkbuf_free(xact->seq[2].pkbuf); if (xact->tm_response) tm_delete(xact->tm_response); if (xact->tm_holding) tm_delete(xact->tm_holding); if (xact->assoc_xact) gtp_xact_deassociate(xact, xact->assoc_xact); list_remove(xact->org == GTP_LOCAL_ORIGINATOR ? &xact->gnode->local_list : &xact->gnode->remote_list, xact); index_free(>p_xact_pool, xact); return CORE_OK; } nextepc-0.3.10/lib/gtp/gtp_xact.h000066400000000000000000000060451333553357400166030ustar00rootroot00000000000000#ifndef __GTP_XACT_H__ #define __GTP_XACT_H__ #include "core_pkbuf.h" #include "core_list.h" #include "core_index.h" #include "core_timer.h" #include "gtp_message.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _gtp_node_t gtp_node_t; /** * Transaction context */ typedef struct _gtp_xact_t { lnode_t node; /**< A node of list */ index_t index; #define GTP_LOCAL_ORIGINATOR 0 #define GTP_REMOTE_ORIGINATOR 1 c_uint8_t org; /**< Transaction' originator. local or remote */ c_uint32_t xid; /**< Transaction ID */ gtp_node_t *gnode; /**< Relevant GTP node context */ int step; /**< Current step in the sequence. 1 : Initial 2 : Triggered 3 : Triggered-Reply */ struct { c_uint8_t type; /**< Message type history */ pkbuf_t *pkbuf; /**< Packet history */ } seq[3]; /**< history for the each step */ tm_block_id tm_response; /**< Timer waiting for next message */ c_uint8_t response_rcount; tm_block_id tm_holding; /**< Timer waiting for holding message */ c_uint8_t holding_rcount; struct _gtp_xact_t *assoc_xact; /**< Associated transaction */ #define GTP_XACT_STORE_SESSION(xact, session) \ do { \ d_assert((xact), break, "Null param"); \ d_assert((session), break, "Null param"); \ ((xact)->sess) = (session); \ } while(0) #define GTP_XACT_RETRIEVE_SESSION(xact) ((xact) ? ((xact)->sess) : NULL) void *sess; /**< Session Store */ } gtp_xact_t; CORE_DECLARE(status_t) gtp_xact_init(tm_service_t *tm_service, c_uintptr_t response_event, c_uintptr_t holding_event); CORE_DECLARE(status_t) gtp_xact_final(void); CORE_DECLARE(gtp_xact_t *) gtp_xact_local_create( gtp_node_t *gnode, gtp_header_t *hdesc, pkbuf_t *pkbuf); CORE_DECLARE(gtp_xact_t *) gtp_xact_remote_create( gtp_node_t *gnode, c_uint32_t sqn); CORE_DECLARE(void) gtp_xact_delete_all(gtp_node_t *gnode); CORE_DECLARE(status_t) gtp_xact_update_tx(gtp_xact_t *xact, gtp_header_t *hdesc, pkbuf_t *pkbuf); CORE_DECLARE(status_t) gtp_xact_update_rx(gtp_xact_t *xact, c_uint8_t type); CORE_DECLARE(status_t) gtp_xact_commit(gtp_xact_t *xact); CORE_DECLARE(status_t) gtp_xact_timeout(index_t index, c_uintptr_t event); CORE_DECLARE(status_t) gtp_xact_receive( gtp_node_t *gnode, gtp_header_t *h, gtp_xact_t **xact); CORE_DECLARE(gtp_xact_t *) gtp_xact_find(index_t index); CORE_DECLARE(gtp_xact_t *)gtp_xact_find_by_xid( gtp_node_t *gnode, c_uint8_t type, c_uint32_t xid); CORE_DECLARE(void) gtp_xact_associate(gtp_xact_t *xact1, gtp_xact_t *xact2); CORE_DECLARE(void) gtp_xact_deassociate(gtp_xact_t *xact1, gtp_xact_t *xact2); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTP_XACT_H__ */ nextepc-0.3.10/lib/gtp/support/000077500000000000000000000000001333553357400163305ustar00rootroot00000000000000nextepc-0.3.10/lib/gtp/support/29274-d80.docx000066400000000000000000027742631333553357400203140ustar00rootroot00000000000000PKK_.KcM _rels/.relsJ1>E{7 "ҴzY`HfwC7LkQtA70)LHxM e`{Z܃*đ v~ ѧ*#Hzкؑ9ZA'{HN 3;՝ :Ԗ3-RY|DusDSɠ/ ~/}-==rɋNBё)]3Oķggeg_yPKK_.KI+docProps/core.xmlmj@ E -;RLJ!43`wbRsWOgq1 5-T(Zߞ'DMfe~Gc⬎* =ΪG:7"3foydˌ}DjQWaV#+-E` ybA-,J^ĭ<ͼ]Ï2v;1PKK_.K; |docProps/app.xmlν 0ݫgoSDJ.PCrIȉ{#t[ĊgO ex;Өߊ N^<G0YdXRd3\L >:0zrHI,qKHm~ |zM֛?~{ȞloPKK_.KޛH ORword/document.xmlvږ. hVm{ο3 ^- !1%aվ7Wu"e?I>$ ,}3sma~Z쉻ؿ} O=o}\?17a96 >_糾3;sȇWpF whO ?<ы-/͑)xh]Ysh'=;n:=yseU8Côh>],x칎 3s!һ}oz4{劏Q@|Qأ `c?=?/r H>xP !ϝAAlwu۱&?/nn-K_|25TϞEzv*^IbDDμ9jz,OcCN 8>xs,iZ}6-InV{ѣ|.Te3!05FsڔHgh v,SPkYG=ֲl%},F\X>,ې rCbK"aC?#LƜdO]լ4gg?+7[G'Y~v0R33zbGBrIHU:mZ mn3o|hBP\5WϯH+`cM?ߓM?!1FO_cJum+q_/xt@j-} P^HLJ`GYDzIMIR']Sb)>g#9ÿ"2wO+oh~dz~y&P383ō}Y}lV ő~;JP<} %ףԲJB"sybXw&_pxl߼0%A\y@+s}5?Ԗ \ 'z@pk1!HUOT0U|Y׃O9P5Z29c07MXKvD_#z:w$fdg3\rܕ!lHrd{dz$SbMa*}u;4mv4%Q'z}xB0|.Zow⻗biox=S0k5K9i %ذpi$|+_۝ t'2CHl)..7אvpպkb߼ڝm mR<3 Er#˰i;' 俷}ҎX2ZB  !s zy ]Z2$+\ʘ8 չKk0MF {8[x!CV M {RxO鴪i)R:=յ}{3ۮU=Auk By+хxZl,ّZKtH=JY R "3;C}D̂ nw̱#ι{=> 5PA@'m;3{=C|biC#WkVea#T茭>B-iD;]+CpcIiZ\iq3g^r[q `&@]ȍ>w}>0ƖgSrA×ݠNsJaNɟ'^J஗k%뻆7rO^ӥr1+|2Vȡ}%'[`W$ˬoNq~R69ĥ*vK+Gz>@yTOMښ^,Oܪ^e%)aZZ)#,5E>ߩEYY<\LZ.7ZWH#]'󏣱ޣ.!4nrYK喦8h3 q éR#?7GZDEZV,'*='ϙ8%zվ9b7Q.m*;}1&Z^G[6m6Lehe=V=T XmTݑmJM:Nm(-}{ ns 9m,m{(P$HfUz!۾J65T+mw[)zm˺)J:vMyvvP3SZZ:}WFF5j8rMq5 ,bZ.ÎDˉ0m)*Q|?Iτﵹ6Z\{ّoY2Bo n`Mf=XwŽ^{>p/FK5V7Q SQkF~۸[6B_`w¸f}L#n5l (3J0c\qۼ j[vMGuU8cTbev2+XdƯVXƴbXVf93\׳< sz" r<6B=/kuf UYo*v_%? aM9IE=n}!vbG!vbG!v`bG!vbBTĎtF =O3M[,j9lp[GN+`kR~sz?ccA~sC14daqOʍ>G>gFOep!jK$"\e{z鸜x{*1'-6vոdqz>w܏.^\ ' %mCGxe\Z'+jQa:1VJ@عl<1eu,eݮ˟Ɯ&2>Ч }m9R2@QA$Fۊ`,I6R*,Y%OZ9dWa^ '.VNŮ:-6OGX*r9o~gpV !."0q1$1[}J,Xnn]b}஼O}@Q߮5+v=xHUJR pK2: s,r$mK텒R , y38  vY NR!px\b G^8͛&oƋ4f);bLKƲJ*  %{6Gvi=OIB|d;cM 2cSY K+hY+cЕY:s *J:WY#Uyv,N)@=Cn_\LL2ВwS A&[Ji^@EIJH^] [g턹qmCdB#Cq3sj2o{d8Tӄ 6Jz0dnS I@]pRu4}Pt#[`jNz ,\\V!K-e( RJKUA0#MP,Յn2FTO*SU{)KZAIVi^QΕG'qt/CAr9o+%.i^J }w2\IS E,ʹzRfRP0 dsٍa I93 !ʹ*dW05cIM&sKS{9C!M_ 4o^rb \~k  |;sY%Wؑn(d)ĐvSUhB0d(4].:B!KqAN_r3*&Ԋy\i1pn \%Cz#f>&i%oK::3v{5аi\ Z1WH 4Lkt:*?h\T$%8}sb.CMU/Aҧe(4>1wsny?<|^>ј7NcPPE.Q/F]zY]Z%wʞV\)u/QNf(UqAM2'V]bZ5w=-9϶e?ٹ9鍒b,E8j1idBSl~γ*XR^! K[T,MNЖ,8|K}6\UYH+I=wYZ-`LahJTi Atk:K;Mda/eWR@%_ef,EVsq'vS}:i+`.u&G-C$VjØ Pt-ڲ, uФe(ksAKxZ!?-`Lqx5I8fԿ 9t=w OO29gx5z=yP3#u:ZPC/kץڭg(ȡh$%6KRlze Of)Q_j7t|/ST~G9B y"~ KG)QvM_Rާ@FZ2 %f! ,'8֖B#K!N_w/Ȩ̾(%5Hf8RD;W^9Nب,mt)I>4KlN[Rbkm)Y [s:.%6Vs;V-("5Kኼ(%6V\$kOkJڴN[́RbY]_˘z}Yh,M^oS8rbĥՊY [M*7<t,6VR"LZ$B/uVR 4w-97y5^* h,3Nk^mEॐe)q?w_=960Ʈ_5loݠEi<}I-; .]ZPg3YJ%14=SO_~гO',L+Fx.~y4gmXa1U5=K M+a sZZ2jtfe>ΰd)CD^z9g6)v妝NᚥЅBjU-qmKNaԶEk+YZ9K+ } \/SъA2R2Y^uR2Y^uEॐe)dQKr'Փ7SE)WDJM4]R"oWDݥ$UR+V.ݥm5Ka"{6GfB Xv41&d\ySmA;i]1nSj} ,2|D( fK(wtM1\]v\\ߴS,E6JjZO k4qy,/Jb )U3gΘ8`[ ٤ECn98nZta.Kqa.Tmpc2!b>8h|KjY `s&hf6 ,svp%]C-K-8u5}۩Բx=v klxHR#wK$[rlY/**g :qyL?S8T"gy%zu靛5K2gY,_O2,+Լ=NpT@!oHKZ${A O~-u~.1BΒJj"(w6e*Ґ7%%͝sxa8UysY4rʤW$#URԑd:كS, Rqs|:Y Grv]nq;XF\'/-!MM/f)Q+ iIJ8f|z1KцZ:[ WM', {Y?{%=vٞ0sv<^RءĒR#H,rG@X yCXy0|*e*z7.%f^|kY sT.&bݎtuҋY))f2z?dBA븓~\i@Ia26liJ:ҵ,rWgJвA8YG9Cce)^;UywKز 8YG9)@t# =.7R,$r757i]9K! -gYK5}Ty:xCWZ[g&euiY?h9Kea/7gUtpZR8ޣFx-vpLߤDpXbirix*g*:ZRt_Y9K,YT*g*.7.7\4Gy2.S%ԋTpTsT"opKPs=.zRTBB<uP#uRPWR|BYI(o!jTR8"wP[}|zd), VO:o ٚ*e);%(g)ı_qJ.W=)pjJ.y胞sjLm"y:nGpktWGk/bW3)$z;7WׇUs;M N4}xMTuฬ}G*e)T;i7/f*r٩8rv,E-J9&8P)£,E.rrr94A*7_5KRhIFsU,0u'j`R?|"URISyF ]!|[fl,E?J9;}Z_\Jw.*e);%hRdf)QY"VLet~4nSZ!E)gY+Z1)xqZo GiZ-KRP)j Ph^÷'6kc/UjN,[}]:&/dSPD9g1x{>߄@9Sjֲ(,N.u-KA!itԲ_(,ĥ-NV۽n.7RX@C9gxbT!0Kr޼ zߟk9FK|ױY JsvVӒ?}e)DQ[BKO]=SሼE´ģ[f}aZB>q4Rg*;%"d`@5Dg*<3ؚx ?BvZLE+r[Q\>n@=K1JrP^٦e9#Y STW{7mKT2K2)~qѼfLON-=E_:>g2AH  K뢐zϦi"JI ϻnrG%ogGrcC*:d%tzO-WJO wbs[緤R1KqG%u+!֒Ts>0my'B\"yx{c}9O}IRL!J9c{2̒ehN8\E>Z\9V&˓>3'V F yѰMo*f*jw^-S!|^}Eɍ\ktL.$)qpMc7X_܁N.#S\-Ӓ oqy5N[ CT #ol/٠h3GșzB^bC^kF 5 Mtj*zc?z=ykPRItL8*CfiQ)?q+ 1Sj`W^P<9ݨ3 {EG) \hI=&8.{(g@JYUJn3 R,EKr)e)Cdr$L1KZJ!^9 f䕳Bs:,} LEL4}TLEIv9\R_Tl$#3(,+(?)>UT4#8IL1*9@--ISRx_T0#(Lz5>OYs9SjNq4-RxpE^W^p#Jݫd*LQͥq1OzT2sؙ(PGphEފ2rE=w1jb32 _vx8iW[fe/6Gߵ~ mIG9G )$ q vd\3"P=YXQ@<>9L!J)iLoA>}*e)hR[rZR$S@> 9ۧ>c_yzP32yo7ofB(feLP_j'%z5H]s5KѓC6WPl.KA-I";61MW(INaWZ;OZ3EH=]I'+)ѓ+^ҥHG;B+~^5K|"-~7=f ;O? f*QʝHLfӗqha18*f*ڑSK|P8 ̞)W _uƂ]NTWpGNd"58ʈ AZBH.uv3 ͹*IMWX^hRվ(J.Z~T]>ug.e*ޒrV#LEbWbPӳkMd\>(Uhئ7L^@ D0tPX-0u'@ta1S`qo͗J%^]TL&o by!cϏfQHb2Żh،2=y9%#Q-*f*JSɕXZNWg*?KХ i Tr&Kog9I8) ꍤ/$]T%oX%LO$3W~\nܕUŶz{L2J0 뙊j d˝|s|.l.S!M'3ʢ( 5S, FNlLE+ڞ@װm5A-X^4h 37Cwj79Ywi|o.pH({=~6\j7Ֆ}.1-,'* R= @5lA].p9k6Z'mbY;tHg*WϓY%ɤIis\ΰ/yr(=[NOi9a¡c~Mɬ~+X[;ܒrLp3;pKK 'q6i1yB3=M߆jLгFXui I6kc3qRLN}=a"(QC,źOse(/7%ew@l֓tFliby@~eAHy@4,q,E,6?͕_|AF/c8Ctl$hh'M[r1KaۼD.glbb~_kX6Igmt==fCIS( OtXɜV髎-] ,)N% HT}b܋pXv_\d-z/ q13=j F,9o=.Q>n?0ۑ몊X] +x`،MaRK4uY\OrqWr u' w?*$9#6FMP< "§ΜPK CP#\ë]uƶ-눅^ɱAOa<@k"u1&ضȷбgSPJ2uHTԁz|r.e=/ 5rqWju,;HO\0۩l  iFu<| +P@L,>_&*W?EG aT ]{f|MϐrFy sf~RPT~ZEVaE5,L;dX#,V#(OHۈ45uCB'9Woۺ۔R>hE,Wc }vŖ&SB+_܉E*3Q0CV:5t-0Չ?ߒX/X'3w/JOvO55 $> {+9F3QڰhD `{}ywcf زxCui=:wg1Io47s hsL@8 t<7enxRkp /^S{B;kb匩?["MyT+cwX ~+nR*5US J̠\e[BɝPx,dw@n)WE/< AqWޗ"M=Ҳn֮Z;^9-5VB'm+Uj4v<ҹ.8n4b̂/?ހ8]S ĕ2/B-E_Xq'#gVN͢ѿxI;x}ѹdwMV;AsĪVí>>bwΆ_[>j=~5PKع!v5)C}^XjGH30Kưڈ @ XF=lGXZrcP|Hް6}H+6Ј(ٳ !JC*ޝR\:jE-2P5HVm">ً-v#HVí)]QyX7fGz7Iwz..[?&NiPFl9dsn\oW4LέfI-QK~5=ZU/9zp"%7?9(+ &0hАE׻yEz* 8+AF)\Tq$YgJ}p(Ͳ'\7jN#T=6w=ګ-JxO0u}6)eq{eN@klw>21$9|b^WTRj*Z6UJPU4Kwwz]-oM~:jв^HiBĞug8rKs;]QQMlP"obe نXCv0=Jdbw<0Z{=g!ZͦQQ>9b6JWgW0Pg2zҖZZs5H*{Z)jpiۧC"ľ$tEky=Dz**D[az|!0'jJScu`2-cwnշQE^uAۤ"䓳\QE̐N@]oH%vt mւWj#a8+$Dl=u~xI!Y) vA"=-oM7['3[uW>JH8 >d mF>SRV-8NLa&Л2͔os;ӪKU $[x=?hͯ[,f6yYDaɌPz2&3hbCI Z \J)'V *$e[J'w]IJ}X fѾ-hC-Yig(3Pz]uB5TMMRU|FSmؼ+Wo8y"YgL 3ow'b+ɹS+$Yќr?ߎ%{)HmG^jYpX>c,M5J$g5ۻL}9*WJ Uu48X/&'_lc(Wic1&IϿ6[Oռz([kVmjVpo)1A˽$>H) k<".޿)`/a!־U;jՄjbe5kף~=O~P:TP1(X,qpj~Lzi5 a]o{yaՓic~o'ΟJ>$O H?T.q)3'p^U+EG/'9)끆4~; K_P| WsY.h?S|w댈 f[Xf粹W9/"̙:;'}jճO6k4+`L4IZ_^D%w+e2CLQ{R' d2If̥Msɱ֯ؕJ^̎ʀD~մuMA5-vi9ϓ_/߄;qZiy:k"o|ojy>S8޵i^+j} ^N Hugbr)')ÈGs7!Ҏ8oڻ֢k7"!WI-Ф\,)V[|})d Ls-ES9o~9jC'"zݙmt.vC&T=h&P،L'>0l;cL%^B |u<ΩUosN;-v\by3b(,.,P"NᐒW, :.o|8?Fm{-v|0e:e1V驼f :֑(`L.1l _UnG~XC|:l_(V3Iĭ2Jr#'ARF8 H }N &1[4%Ϸ $'ӑPSȌBYf?BfdzҬP).NW=#e}_҂*h蝽=m% X vgZ ׾#鋺JC=U_Þה^x(Hn<2xtyue0vab . 6ku/H{ZJpiµ5JѢγ#o )sw\]ho4XoRmI:ͥwv'jxzqp%l_Mݽ]P'~dH͋Kv/uUM.{[#:,MXF\3ڣbaoaf]\`(>xae ߳O"g.B]\NЖ5[[Lf;#zbx%m {EErn?mиj{6I#IzB$BmFjG޻z1I%.Rldm>) :6jxl攩eG7}1yM"ՐD;'tctT}à>ʠ"[SfjYzMa]'xxpxȾTW6iX*1%޿^2DM6#klߴI{t\'& /z1]|IZ5:`;ɔ&45 iTؕtj.J4Vu~j Q+k|~֎FtyLj .ǖ5ulX5ho ˻ݔ{Ub*@'cɥstkURXbW%4ݠn3JvZOq3yX)<0|4m_$&] aizO*jc`%*>L[V܃-)\v5}] Gd@H[ 6u+8P뚄uYͮxDQ׹*,4ءxώ~& .<1M<1%*.%9w4V0" XòBR{ҐryܮF~7$aB&R݊F'a8S;Q]:˞IE]E&`l4GUv3j31-?enKKTgrWs'hrIJ{̎ݵefJl?ݹ߹Lb| /E:߮HQpBϧRl\?NL i$Tt=~vK#JL J/ʈ^c,rU9_9}pZqKWD+<ƒgAf`L:;!Df3cAxG{|drN|~Xwp@AMgP@b ɦ͸{T)N/Rq"O<<:x|#4<ܩsDrX uhrC y@zaÛخNz^iO͍ncO2”0<:0ܝjfoT%qZ eQ'-?/O-#<<[R_jKXzȦ*=o#8sp}q~v]?i_7>O $ T2jHta* ֶk[K'm*W|ċ^o.N \إG{)i}SI-z$T u"{$>֝##5v&5aR3w+2O>I᎕-o+sGQ f=)Z.:%Xݑ+Kɨ*;)=_rն.bIrLAamTgN$נ(DFBe\TOMMWR~nV4XNγ e?6j5GO?5mpi'o߰3!E%~͂յy=$Γ{3OWSᝇ1 Ȋ+ b{d[ PV0 7|1 ֗Oo}dQ85$3z=Ǖ^+N%u/}}ԐfB<5R㞴H;\u]u OH kz.Ҫw0 XW)YgIp *>\R83<wkPAGů3ӶL! B H=%[&oJlۧJTW>T*Au/Եr5 n^KI+k 1+"=}tvr rhx;C'R X {L'&~;EiSцb-.9bN+TjuAC~mJ/kC 's/ZҴ,z3>r1_(a]ׁNQ]}q2t!C)p~I @/[ ʓ#3d/!>7ᆗǖ͞IԊTcۧCYO"Բ$=L$@2D!Jbxe6p0|BV5'gv9ջU1q&'ZaP&'8>[mx$6rp+PfKv _9Ah< p< 8ry+$ IC@1W +fd/*>~eH1_7}QWYӳEW-.-;T%߄ћ ܥ1b݂;GGCe/@ŶTZ/BPZ,ֆWfXX8g7SvK/#Sɺx~| >%Hq_5\e|{{oe%NWK*>ڤ:]g> a^ ̮|DJ33pſ#K?t[ Ot $VQp&V)9sC%-aQ(JaTkC$MF{/]tAa0g7XN)E_Ӷ^Ph>y _CEh;m؇::#{G\8=uAZдrű0ʲ=;<2L*Ld+2=tVT*|*-Y*2VA=jGAUI%ip >iD8\~Y  Q% ڙmyaů==LvHКaXu4LxXHe ;%?7 q/Y0~^wG@]뇸C,2R G/|`]KKZX)W|q\_(| nX\&9#,Á>AqKwL2W8$Twxl}`iSbw{[,@Ǩv{1EhIka~O^a5t,\ZV|\䏫݈.~m8Xv8uِnl7򩅷Կ_?uv~oE-*7wǾB?x9nܓ^#`n wOZ^E_Gpߟ԰;UtA V4g7.kG 2dBBP!ݨpb 'd2^l|~@U'ĹIW%6A%yړȉI,)fD,t9A1xXwjk+>]N~ioG]Gճ,E5+r5/6rIf a` 3(SL1=yc_W(+NzN}rʻ)kS@!gFiؾ __t.eժugӡM3'WR짖X$RI$O;S@(<ъu5T`~rRG?긹*Enjx=dLM%g <&! _)3؊:1K;M T ca 87vLGj9(u(4aw%8nSdJщa341Id49,f~>QBSO*/!˳j| 9*]nmeNhG3aD'sLAM̦^38fǞ̼ub7FZ2.^[l0MTC ;-ޛԙ⬳c lGI >7A% bYS߅ f$rxs}sF*]8$KFi7jIȻf14Qې &N'tPY@2j"5ur@6< Ȕ.} O|S3HOAQP?=kܟ|NM q_Y_=RjGI.n,e鎦'*,mr*_5q6e5Vaɉɢ%Cy?-q٥aZkaN{Bݾ;SIHT&jh ZTҔ@^dQXxpWX!'(U)bwϸZn^GՌ`!t;NhAtb%D^-Ho sN9xAX/mrR/~ ՏreZ~n?BK`wϔ9ա>+jdଂE+xM|I"<:0ҷ2֗< ;g[#Fڈޜ?⾅^.Lߕy#F5&um/:biXuBi~(T''Fa9?jwIQW}E_K+6OdM)DcHۜʼ;cJ :JjUTrd2a~|Wq^p7MOHȥTj;ݵ􌾏3] uE7d^#kU =vxS8vلz Od%$Ol\SAh5T2طU2:yBw>M;&§CQ{h<=L* w?vYiIQ!7hm.'94T]*ʬaܔ ka(G<[npՍ7/a%e_gD q+.,pGsU:,m 3ECc!y&ZRiBdzH!}t ]k!)hJo,q`zwPUTejsD _"0 9E po2`x;%[lAӭזvbƝ,ܛ!ih{e#-YL:?SdŏeVl~8)I|kس&j$e`VpL*`iT,!` ;Y?𘰘 \1"I:3Gkqr B^5ٝH*+֑lg cZӆ%s6P~UQLY,N^Epa^zA[d? E_& /Z߿Ǩf-AW"=⌒>W'!;n/G$4?TvS:gD]kPmyߜs#$돽xR mFi4\i*JēvzAvXD<)h~QzT@}Rbڇlȭ Ӹ@q!p_7+J7Peq6 +&9SS(1Xbmz8B[҄x6T4 /6NesN@& G-ydC Szo/XjXъ ԊdLfA}}+}W&BNZI΋zUHuu/Lmo#S:i{e"3~P &)l8|sdIկd!,;֘RG`xҏŕ*NŰt-b§bڛz@6@ ڦ5OчT}2w2ljoGxP ʪe@ٻ^;@P(+Abe2(eZr w MIw$xvU+S  dbZ2VA+ h@/ [zG| {wGM8ql""LqL1:b:Lddd\(ٿH%oYiV?Z5+OĮ\so'O@fYө}>s1}@+ϐڮ<! hAЂ=N각e0 ;e^RR UƢ*ƢScw9sBlH< 5٭@Jrgl-Vka0ݙÑũxhjd?i\Bnv:&͟`Ѫu͹`Zӝz"h.z$U[֯ЄtW fyILs#'/o$כr`#D9bq=~ŌW][ڱ*7H{m ԉ.0xZ'Cόgʼn'eRDG/Kf]!颱IIF I4I3FoQ.3q$lIh' 4(2/N(C;i |2 2ʀ2Sqd pSD;iP (A+J"jFmhb zACiބPN"P !!!W4FCi>}Pt>+J4t>: t5 U@'gU)8l==Skw zn}%<>=ߧkթJxioG]G]>p\A/F#{|&.l4;{Kŝ/'h57=s`X]K]toh `[:d t'.ۅ/^` &x5\E.܍܍Anx:йѹEn !!}H9/й(B$ (Cn, 2 TEnduȘGntŀbйZzn jl"41 zs7o}c`(xW Ɏݐ+:wt> tѿ ttڔٱms]c>s7&xCJЃAvHY:*]CC^5vEMA;vQz'مvm!nA;Sa  s =z A`/1{ݎ]$AEh?~@W\h?~h?˴%Ӆt~@W\ՁƯ z)ؾ̎ƴiWi6JbD؜OWm}%<>=ߧkթJxioG]G]>p\A/^\{i>]*v: 9vj2o{챫NIgZ Y_!N,#DsӧuC ؄-yܿw~JcF:SsCy}ja{9}nt#i 4MA*vX(_,\fZL&u!6TZuJhݯRAKX+nsװ^_}5%Z5Ul|L/$gͼqgcHGckyR$Mg2yscP`maE5]&U:mZ~ R/EeE|i>wbZP;MhM lM}'QSJbEQlB%,Ywɗ8%7^헀 ڴfٿ:C }ؚb SgêG= HJ~,Tɂyb-]}bwe尐K2YAAjl`\+%Z`9Տ#f;ld>0ޣPJ >kG#%V L_L 'EJFK82 &>'NXm+f LC5}e"M>C}d&zZdZn3l%aCh{ԧp{ީݰ2%blBg^dqω2F20/f49E*Bިd,ӡǶ)bHRs>{(8-LBު7S!T͓/Tr?ï7N~VB?tkFQQ}W*g3} wLXV?A1ճƒX q_"xN˧NK05i^2!c4ߊtBZ}3޹8KQHn։xҁ;>^'͋%cۗ G.aFHNթαYq0M[IF͍H師?icXJ*m@9c[bRFW!kQ >Jo֡ʔh*7KefcB~f?%vmf&G{=^AW%ќM2G̶$>ZCpGNGGm8iݓv]OH'mM Bj ͅtg޿Pl2P/(IGa&B>;7|g!%)=nj3&bM,I|L #W ҧ &o7.)zvqR8v9 .Ѹu#c>eSև4.]#D̞ݾ4}}+ϮgLw5(EA2qE%tL+EsG6qg8n!+!)@;z|G3(Iֲv9zsi>z:pomӶD3s~ĬpEQs>\AF8osQO%&*P>ڲk؞~꧁,/3^00hK6$ P(jVl4]xcKD Oy(fmg9$]>pv?п|b \dܐc(2 TΤ:f2Xஓ]rg6y5rL 4r#Y7Q` M{&.7ӥ?HÌ>f=iVMmtt8 'D{XBKl< :%Q8?ᝁJ` ֋Be3s8RQ/W5 ADEX6\X}uSHOzq(H"uv͗vd*W٬#m>y|lՙ(Ľ­3N¯=b?4=:2N@$Ȇ4a|X#!V23So'Uq$ʸSXbXcj*fZ-]|y%^EeQ| }/))"fXלY]U__Zm:2:DvaYcVqaH`*q÷bBBd.>UX{?@QEGsw`c%:AO"o PQ![t{"Muodz33}n 1l(Ui]1cCnqq7`^f5E%)M "Bp*Nx+]h"*TG^=Qu9-F4ιbu^;sV} GPdcz]:ipdt sĂyi}N2'Pɤ^&,rCU8T"'~ukT\JO\b/,QVJ5m?YlPK>'Q/ޏ .r~Xp) LQ!TꥄOk|ZIr []DZy+%Ң=JWMUZ>kB;ӎVOb a^JJQXm1'`lPuݵRe>. ]@ oQ[+j)Z(+e@rՀ2QV}w(*oFYʀE(+e2Qe6+U(C@&k*2) e#*+>9oB6!S3fMgRg3N j{tZc^I9\eCGvB2jerEe,}RG=PI-Tv\/-jKċMaAi[qVH%Eb zTVKUMvX*X}iSc5R45{ c\BK0iؕo%QHc,UYP'6,j>ڷz\}iQUdž홛lάrw%sWwot݈ud]sAjRYTV%Tj 59:/vT4.D^/UY\T/YrVI+mTwQ@1w0i\GvOWӅTQG 9s_#\KCMwAdoPFHAŵ'JhE&ou[--"NLT UH_d_&4j#.S2;U_B6NZ׽YJDӟ@ӜI"3i:YcTyF UB%8[}aWĎ|`ڲ\?1wv~8Է4ivo XMYzlu,=7663ObZۨc\DAGtxJ]K(X>Փ =굤kz1SzA]WU )ʻ~h`9I5IH3E ĵ 9Bysǀ@I9Dh@4Y';.L6 djm7g𛈚~рhO4QdGrԡ˷YX`~ LaiD p ..A`Zٵg[YI~{ |,`%\@, bdYR;ش;e>g6NxVK+%f(g ];?x jv X+ٯ悼OOښK%` )>.X Yޥw$+CͧYMq l^^ ,X Y^Zeٙ? ),%` ? Ă&L K,%Y@-𳼧]NK2K^R=G,GX2G+:( Hu(eNfM\:.}*38kPkDIW,2@, /免^2?Ÿ Ay0ֱa\y#P! d\I}Pp*ըr,jט{> ZYD2Ă0AUȱK XaPa`C{5jU,KDaX@,0AeaZ`of# XPa`) lP ը[QukDTF? @A.7V,KՁKF FdFvssqD#VG=ˎb.fhaA `0L0CTJ"" D׊oYӱmMfm#G,#sc6eal\`lFj6 6` X" \BWgXAj6 df45}վ=8hWX|4$S`&` ԰8A.1[B|vl[u+6:90{{a`%A, ۰A,,] r6{i;? s,K.#6(C:>nP ըq`]8 ʁ X0Kc˖ѷ 'p82w88${2 &N]:ikE*2a&lR a V^Ghjr0Z0`% † bdOaa\`aohaH&6` X"b \BA1aؠ`Pp.ab\`bF.M/kLkD>k HZi rii5h5` X"l \B3G5(נ׀%`5~ װA,,u 5jҰ,KXذA,aaX Y,2,l ,u-l``%RāKH  ث=Y־d/b`c%0A,b@$U c`b%%tabA&v &6&jrݾcmJ``%bذA,adO~5+gY+7? 8o00An0W]isE|ט{> u ubPb%C: uorAIK9%欗eX9`^ˋlQ dì]q /kM} kHڷ'TwX]>ikIt t7y֪4QK8hWNCH0L"v ~5,>3fb-Iy9FE~ 0|Ag0{KF/pLfDVA,ɬ§84   eKز%p [Ăld yp2v]G0' `23 Pz@.H.s:eMǶyOցjsa݂`%.X@,0alX Yc[ rvc96RAMKqd:.#k[S]CTgA9d``0K,p6ݝ 40L@&N e bNF=}K-v'AHkK'ajX`h@: m 8 J Xq 6(wb؁93,a4U"vȫfiAٟZo %X@,O}.ץI^A1/P Lr>r`4,a-WjϦXɦc3]6-MTlAIB{0'᫶^zӵ|VOVԭ ]_Cgi]8?.ۖWь;Ӏz菱ec>5\Ӱؽm>g7m|$ 4MԎjp@]E鿷\qǙ.r3`ŧ<|J{LBdZb,K m8c@|`l81Is2#}&l72g=i3=OfWq,X6/fS>NغhZl c8Vb]LgϺ/;>Gbjm.q17ZPv<J<{hz$7G(}O턛XCIUz FG7! `j;Hdqwa[ڜqoo0"ĄaZ^8y#3ZPş Iqu":մ{svnFz *e=x`^5%8b]79ꦑAZ/s]V+<1|@`)-O- mhw͂~ Dy֋6#Mn<b{4c,8p,y7Y&6_DmXcb>H?N>X%Dx슉gTzD_,a7#}X-=vd9\&6W =P !x(,&¹d:cOg%CZϛpb36+G#pH% Mp%`^݉8$*%ʻ(h@082/᳤,[ qbG\_x.{'<ݞE @_} ޫ>#ѳ_C+4>O3RKio4hvMZnơ2u‹t#.ƒ<8ҕ'}ItͲ`JcUҿ4\$-!c}|`ܛec/OqFJw!Ha.b˅᛽eyӜ<D)9!=b~(BX>mXh@_EW>VH{rFo%v@xVK =H4ӴC yxpH(Fa`GΥmlqo$md:k XK)vfI-$/eChz}qzs!U9`֋| A_O'?+zhNmZDV$wd/ҊvxoemUlbB,5q[6ymOOBZ ?rM2Eg1@J#]F)H}$ә/0HMÕS;$lmn%1Mg ]7Ld111WjbQq/ߕMB /tϏ\g~dWڔRWEZ;EfgVγ֋R2[!cWL֝7'ģ8߮wFGx/\A>K bG>=5|;=LFƌ6}/#?(Ā+%VA{HUO#_.< 1|y虘RA炽6?Mjٞ^VXukRRKW>$:R;϶z?ٹ'F<[/〴l35`t#;S[Ǖxנ80'-" }}MTg=u}1z?c#]],2Pu 'N $TSѺ%> .{ 4^hho.mi%^O,k4HxKj*AXW\A^, (o˓ѵI:| X!>վ%P3 N`jq' 0}T`qni!'> 8[>E}G*M%&)˩,ڊ +A|?/&9Eͧa5nOn호^`'tP>?_g LjI$51"_$3w]nMXc&l*C!vlP]^l& eܮl^MLDWsdC! !*Tx܌EQbvxxd(K8Kl9x0'x<~,nȺk. 97+jeJ EL {+!P<1ґ,shێG;e H%^ bk2DJS>7[ %b):mqIeD y=gXp~ \g8WY2Ufop>5յtRb{S J yd@L=Zҏx0b`lvb|Hi͗QtfG8;bݱyccw$Q"ً81J&*H5#'@Z!lfL3&'9 S`GR(N=yFR\¤K%SR!/Jpݴ-WTڐӋ(^ZF0m:֍c_<4Hmd)CIR? 2ˌ ^.V~,e^ϱCޘ 93PAXcf?!53R:9r):3 ِFdDnGNM.JIwPfa)7l |RbS*nt~'HJ 02L7P;IΘv<'pċj塄 a{ǥՒhN*1/^w:hOvV0G^<ĉ Omȃk _(2U}\1RI۪1rb!$$&JܮD/^Вl"mvT44{ñ'=YvԐ:˂ӢsQI ;OPs *J$ybrDttS $w,0Yx+Kqf9iaU2ϚNV<-62< PXcfNd'_c:Qۢsn hU$WMWaS鿼;:qs(mLrɑatZQU'u o rLI膘i:T͈@ܙ|_f>O ,I[9J\9I[ƃR1 JHZ oF [aIHgk)-V,>944 L^`=5\nh<~'})ףt}wێg^6Iʀ .o65[tKu'>X^pU ktdD]]LB-mFN69u'w1Wn ۠.cȤKg(@2;!d!IB>1tu.iMľH sz<׼5)‘o*fx6Tқ>S0_0T #i $O'(mDNϘc9m f{=JE7eRwf) May"W?JMYos~?ֺ'%΁uN͸$ I as [,ptO>!}{tRT4x4r\_fÆ.Mnt-rvF%Kz^Z~tAeI.Jx3 $>|EeKT(&e~}M* :c-?cq&u8 H|mg]`U`jd27c,OtT(kOwbS%{@`z՝¸LX6 ϿL; K$OT֡:tƤSÝ-*6AI%[p9([u7FUS_0)X%'YHPԂz\ˏiUJI9E8!#h~е%a+*'a>qŊ,򿰇C}[,6+,6^?W?YlCQ>BEB _o\v}Alw >.U k5=cRҒǦ|w#JֿqdBL4{iuW-^J@> lOV# bdX*DXC5o) OU5u@ & t;]z(8 DmWDt|lidn|0K0{`drB2TZ aXkp;C~K)\f@B"pwHeQӛ4kx#]U=a]cX DSgw<9B$|Y=|:*KyϠbk?FiuAgJCe!p"k8*}Q;*k~< Ny1 ƒg(C^3#~t*7Hh 6K3+@0A;9?گ'Q5Ո0REי)Sa9u*CN HqV~_I/O~Zu}{O+֧Go}?*{TDUj{2/2^f2cʌPg uƶ\gL_XI  !.gQh A1 @> ŀbPh @ bɀdPh ^  VK0qɀdpL@°Qh A1P %5k!+,%@7 %@;~()bALL%@;CI\Rf%nw.xR14ʲXT]ʰaE!8.3/b_G⻫Nq7tg}Ň7#w]=bn OU^dm͌1mq_ޡzRpI=[ƞ(TMϰmf#/e3yϒw[xj4'7]f|,KKUpps2*OUJ()*'=Yno~``ͨc[/rTQlWo 7_)K<`6gn }E;|I%:cQXcYF:NW"U_B1a]zuM*ErFADqCW{aNz?{*|P0IvCpz4}܎h[DI/гM)^Z"ņًW=?rJX,ۻb4M9j1#{=BJNV5CC'cd/Kl];Li t9m6U޴!`tnn.NUھ!W~GZW?&IG6x3UbZЎ,MޑY5-UbZH8v8I>GNbd)lEmIr;wbӮmS "hw>o?dl)ɡ"v׵LX٣I҈osZ[ .~WҬ~r3k2}1;PuܱGAȟ{a?nXǽnF'PKC~nl+&3dՐw{#OU&Ft\.reJۤ !%K`ckήb ""7>L zRZViUYs5- sª]N: dk/_pGbI$Ok(cוFR\]@"eF"2mbH`+Z:IzCV~'k tCb|mk'w O1dji^`ِ^dHkt8jY]bW(ғzΰkn #&wm"S7ɔ"s&$ӦqO3\| aZU-M6+p}ySU+%k.YH$7n\'lW{zu_NmAؐ:4S2N5a2{RtenM,PɈ`'[#aL#4C5g:h薈T+Qթw)Esu ?ͣor^PXQHՖhj-Q:L-M\a`lлeռchצ4F)a. +NO\n~OfMXP3%ԵX\-Lı /c3SAĶQV0ye!w{ʣ;,x"[#Lc^&n.33+уP|%h'Y9DK\(IY9ChqyaƦuY : }rcs,@cgMO:Gg31{Aہk\DctRL\tJy}Ӿ>b6 WG*F1v+e;AE"]3i!yS03uIv1á$+Ǘ F t]]p'fY[g,mUv1raLPX*]'<Ϫ(̄ u/yZx:π1褔Db Lsw^ܟaSiIǾVޤOoM?VCn4:\H 3}Dw/8.x'S 雃l}k'Јr?G縮<'Oѐ/)_-8̴{|%erLF  {{c;c q͂g`/J(UAφGgE'Bq7Gc4t\:N>X2Hx@:ĠVXR򤸵Ҥ'7֐Ҳ 45u笴 ?zet3kX!zH ƐOQ% U6:Hl=ȣX+!!(Ӌe@qDU{woNOw>; 18b7x|sMr#Tܤ_ {MyU =ͫkNRDW\pNN㰎Ʌh}wfw 5I9XIyw)M`T⪑>O?6>_VC 67q ;L+"<Ků"M4sxʐ&jlw2XIzU^kGi^]GwGB**$X[-Lr8NlxfĉX}5:{a}f vӰ a>*Ŧ|,lzM02ԑfsƮWՈzmΙҟ[3HJ8%`밷7rIqqPҭGĽqGn?ZS^g TH8t;pp½g 8ShS H/p,mvÎ|;F$G)VPoO:.]r(`wH$%0R.u9q xrp1!aԼd֞R7aSIdyXiN>a]WIWBt@Q/6w(ώqAR0`QĂ%,%9 _ENԙ2;*kv tZr-뮧\͓ Ѿ 6]^|D(VUӒ^{UЦ{Y6}Gp{i&l^Iq=SZe^'n&9!:HQNhf0 t: p`ϑ".ŷiY?JQE 7w+g@/C̟mؐZF$ #j1HR- r>LPA|ʹ79)iܝl\+|b gl繜f?5n-P S R^,UY-輏l料}.Y$*AqKзcOFKN]4T2`trf75eBH`-B:Ɛ'-}-;!8~gwL`k~OH'`rz a1G-ѴbOL%]Az]Jt%JNc}N.(.IdKf?K/l]C[a}=;R#G!ZA&t3Ax(pp%1 Չ0@<#z\%FB>Eʓ)f[asà^qd#2{/lD!#̖>Ң'CtѽALK`_j;I̶iߤkޣ,8!8B+vPox<=KluLxY K҈oN -b~"V2@W٬EBČX4avBD] # 7'u;H1O1Г345q"Ss3] r0ld$雃r-1%܏jԫFC S!L]5)pߔvVRR%Fh/{M1Bp*O&#2*6 Ry5A kX݁嶅)@K;AJ؈{Q/ ,Ad( di%D\!7}:'ct)Alִ(ݜAEKxw S2mcD J%e.)n7q\OTMl_E}Y5IqznMhxQ0¥I-Cpĕ}sey;n%=prXr(T(lIC݀n>fA2ZQx[=&#N Cu`t6dXN$.a,J4!CڦA*@P Uoz XK~<dLWiң-$ˤPY =8T mէ|{9{O9pwdbT0Uʾ~W5J{t 2XiAh4^4!7D "΢/P[ح)vh҂9A e+|Cv ag\ * GFDz>`riDq NSy:%RVWНז{T+nsRIB8 =i;wX-Ⲣ# xnؤѺ%`6+x_ec\YV[%"߂Z DDϣ=bxU6MEBA2+D1m7Z:g$&7s%^X#,?r'($qm[<@`#]m A+^^j^4\Jv,zV WBiL\vv$#_(X:34VUV&d̂)UAp|,&)fA85I,3Ƌ JzQE6ˉ:*/;/0_}Ȋ[E<\kaDKDm1OH?~S(_ȭq+qP,! w){tn]TNK 4!Y ad;~煇Bxyxmp<=U^ۆk:^ `Gaͽ̦hj6X,; -ZIpaBlxt}x/'9OcýO&J^Cq6ȹ>3h:h eS:95:w\*|:JNQ:Pb"JCq@yh7/s86w]SP y@,+ju/ e Ki,nv| gXr'J&E\nO7nTDaM&&S>gcf;/B(*U"q2q/qXB,G(~uz߲Ո ǭZ[T à }p qʟdĂ,w¸<8գ1)k5_j J{ΩJd/ƞ[v9sOFE-l'TCc=ZRzoA͞ժYV:aoZWx01(: b[CL8/ZmE\ý {U ܫ;KGzj1-uQKG~:^6-/fQ M}XfT 7,ŕI5\+ th𭀊[ٖ/eLZ]}SU  *]ZpP8 :~z2)uTŚ_{|-%P$ŘpYpPցdH%|IM!Щ];Aw [KgB,C8Uu# y!=x ӌ {S_:c?_ F@b6|kx@1$&c~=A\wĒ.z#3אbAVz0)D k˳glΫS6ClO8}6\Ր|}Ah_PcyNt)+xUhNNs+BShNZ-.JGw:P8ӁçP Ts&&Nc[jռxCՃVMYV5I6 xlãd9,|r<ΕfzP.rzB{"@A`zPP$((Kv~rRa^7%oˇ&[V!xOGT7O>fTcsZoS1kqktx3>5\aoMb<6l/%i 4x19_~?ϢqN mqloڬ͟kX´ʮC:PunM ǃb$4 |-駀y}h G5rޜrbJ̹VInI;؞2۱ѼGt | sR$nرjZ-TO"S0Gh^@gxC#Cx&A,GzdK*ǂ35elwžx ˼.0|rw\cϘ|6ՀPYʭ(#,7,~Ȇ%q9+gx⪶FR\ ~:vB;Z2Al@%W 9@,8vw/|)=Ǎnɻ2W7N |,L?kBYٟZ𮀴a!QD8X"eK}{}_ * UW9H$T<#A1.,[$2rG@v+Wi' b\_q}} 8F@,y: ]/9U9L1rcP@ԑw 1p@^B^*_ m^̄zES)%ʵma#fSlS~mqbva+=|?nXy[q#g}q߸ Ig$tb>Ob0B/r[j4p#0 DJiq[L%L{A]x3D_o A`=aK/TkBxlw3|L|8=XWZ , f#rE@,0\ N4?룰86EjZ7)+@I24{i] r9ًb!~y#3xrQg+ PH XQ \l)#C}%t U^}0@]qԂi>Z.dGpc ]x h!z`^G9X`l#+&dRqAbz/]? ,[gbdP<'d@?waIG,¥? uׄ{zfIyw M0->9OMwL6 Ӵw{;[ w4HiM2]} 3fH3'wڜ;ZDa%H_{ѼF]% ge@ \{2#'lzmG #xmȹ֍n\3Ô^+wC@0I*$3G@ŠzId<|,CoI9 8G9"uF ^iY^a𯀪a¿Z-혖tW@ w+U/l  8W@,pҹ24^Jܫ"QWŀW rKBTJW]sql(aY\q 7UZ@cGzA?*Z䣡E*QbX*%,9EFDTP5Wft-aW*-rd_6޴מ05pgGgk\,kFOwj9Pm<]9k&x&RíZBT?nPU BE;&XpcZ5#w{tKy_:-ٜ[w<eI9r, Bs{&\0 M/8 eKk9 h ~P .[1F {>!3FؒatdL>j$F}TB̭H]J@54ǖpC.eDm]P/ۖ0\U)Q.c]Ko5dvJ2.ϣ}{IZ+ycD/0`kUO1?At;tMaR:N}𽁸FS)%۫w[9HT-@ ՞opbTcy`r p&ǣ2츓9\X8P!:8=cFձY@PdNn|z$^T#~H rJT R;prk ;xsxeޘۅ,lJ-@N_hꏒHe]8fV9$-5u~C:,{wӄ0CJl/SL 0*Nfuŏ8;La\r,v~{쇟iqSDi`uldѲW ;\O;Y{ [K=-70V+0VBaBCvXfA8WsUeV?yEebj/kX&1e%-X]Ɲe*sJ&q9W']%L/~g;` lƖi`^204RrӸ+1}0og+s.^w:W=ʎUV8Ɓ-P S#X_ƇIig{#|U%uO~L׈{a0}[W/ɕTՓC2Y벑D.vIػX mq {<]-,0wםݮ]rS=xi+c@;Nyi79L1vο=^)jh] ؏0cz֮_wTZ$Ԡp^S`$%HUߙXtο:3զdOM*Nnpػ09lX՗9M]}Q%VZuDdT5VTRA$ʃӣX@$Hˉ pNܔ7*-lbټtis I] Ђl M'4xBR%g 8-JO@]>i(;BQa8p<y3g,&% x.M(ӼB*SHHxx27& )fDzjPT؟-ɚ ٨ӒR.W­prYѠtY-W$᷋61¾Mf]߻rqv\)VobbE?X!- ϱ Oҁ{æ  pִWE!,P (S(ssZu݁ aH>gz_kΥDbz. V I/"'4IONix:DS"(vh˵th:O,IUH06J!Sx@djt1BԠf]bJSl[~ru A4gK[N_xO~4ARkTBڢJHwY WLӔ^XGCPÙEژew,Sw | ht{ R fn'd@18UV,.wM/B !\0wjyDPLdD8ȸڄ5#]a+3ەΛoߎثk;LeӬQ%\#Խ˷\]mb(om}ժjIyݤ>DkT_0FYŎ+ ǀbcIpQqd bTG#G ۧ:J}4]׿'6IR\dQ,"U%0diL-ʷeߦ_r4h -?&#TѰWT:ImRK3g%m!~ՈuOf$.IOor%ڞ\g_г9r-6]TqT"SLCi'+zB7UҥPCO 8h/̉\j{5ʓsljF!i:3f8i;`65 @~#m]&.Jl!(dqF5 MOulfy &R \>gy5PR63߉L&@=AA J'_ t3+`x`wefaFEdMޑR&1 YԔa?G+(i|tl.ay439b'§؝L&"f1캞3äRxOK [l߄6/ޅlS$Kyw)G z$^AF{#Wc"$ i${P (FeKTR l?gUW\\K(tAaa HI^88GTL˞*$#0n@7m-6,g}(~y:pSJ qO)!n)4 CTa-?3 MjS\!q`=o<󀢇ɬ~A1E}j&HؙL,R=-A1Kϻ_#l8] ؍j[FNH >[f|HpFL e>)1'¦eߙ)tr;KV <wo=Zt $Jbp%kJ,O" L dt$] JNz+"JV2^6ǏGf |MY3_Zg:%3F@FZ@L`=ǘ8+?xf%cDptWT)J2Xki&&z]VeWQXzcO iC* UC*U ;W1LDT` 8.SpO~<a S@R#2B!?',Ed>Ka3V7gH{t 6.l\9P<"~6j&C1ӊLl7fHkcVݳ@* ^{RyFkEdhQ^Qʘsg$SKi@ |6˧dHcbHvbD~=PX.eר. v*D:BnАPԃhֲA4r/dOUِ$F>M gJ$ ;~1@v2cxXn#cͮ$ |d@2 d2ɰeĀ6ҍ(;WV:@L2̄Ec#A:]zçٮ/h GLh9r|LҊOjݴdHu%m!~(uOf$.IOorez\g_г9AnR&Bam~Ϯ315Q9|<9y8{Ē**/<0u׊ 3ץ3ƆNrMQ,~:PKH"CaFl;Col[5iG:U;CŤNd͟6 -%&d:D%;$iq&y'UXrrsq׿~9'Z%Zswh-K'è$卾r{j<&i3-O2eҍ} [ÊkPiH 0̛Ggn^:~vp:_n\ZE>㗝K)]C!$ a=ɱTKyb+ͷG'R5QQ'.ܜ%>X5J)FU @ܑ?) XD j)ÍDFu9ј'Jɮ]C&lHr^ݰJHU37p#+#{Z(UL8Q "> }txg:gJOiʝXu7皰De{4ɗu6Y“5ٚZCl =T=᣺\𸌓mvtvĜ^tY gW|פBW:"Jё[f[Q ?GJ~.߻^Vj}Y~|ԗwːb*j}G^NZ^pWdu2¨鹆EYc 7)^u&lu6 x<R7{~T01zRG-6k>}@!(J S`H^}l& aԾQ&ΪT{^ܳ9jg O !+j8KQ CB@_ι9-#m}?1cN;M|Kh&h1QIyFf}qiE oBTKDŹZqX_ᄂ_ݣ7ns:r* s<]cҪQeno ~u[TĨ,$U)HzuKv }.Y;Z4q82|k %xPtHeo83R:1_<7>-;M?QmwtjN{390"zjb&eַHDIƔrD$zUǭv@_qe>&7F+w⧉|_B?H(yRIVn$ZaڌfS\bhBH18k6[ '~v#z4-afeQϚ{ S1uѕ11}?=4z,uK,dN#Er£ޥfUz0$bARQR%Wi\#G GuBwk4M-X7=L0X:B:ԭ@8caJ'26^H%:SQv~Ej9hyv?|˷~bD{7;I^v͔FȯL36FoD}QxR;+#p[04Mf=aeR{mN(߇&=+=BFJ6Uj }=Qfh‡ӇDCӉ5Xc8ڔ FEU\(f:Z|ZVZA٣Pj ʝe99X=?1;=PuO7^l^g6W5 V2vJY7a y z~OsM=۩,x=Xld_Z~/'<^')ڌ\y0Ȥߤ 1A V%½x0_lKθIБVO(Nݫ~ C){:J9ta!2Vmt?<5zt ўj/v Fqq%hNj~~*DhyG Mߌ%׃\kmb_)ef{I؉0}6MR*uKZL9~{e>\:RZdv1:[A%xl'=I-f RInEj)=jG (K6UJrڪg<6{UηтLlb E{ɇLOmk?eĔP{G<T;'[4dw_w|v Z+{J3 aU+:W)˺|^$=_HڥbSu8:-$JMc 8$Eӭn<NO]1gP@s*mf j[ᧃږoW(_+o4@M|(t ^~;@8qfC$dTl:oӼ!6∾'׌z uX*?!] r ١ҭJ+-iªjGGiglP DM&?:܅EqU r΂;k);KҝMi{7᭲<RX0! z,(h;kAuGV|dHyLf K43PE*މԈl?lW 9e>4\ʬS(*Y*f_^`#ƍ|>G1@N7N:5p.\XQ$l~]ě_Ze.nw bz0Ȼb!`,-sztI:@HViͪNS\DSr@}]Ѐ@ oN-\3pPx u{@,^$JYBʁ)zky=XkNFpmt o,3oo2D)V( B 0卢42k.i'V@Ҽ AhoدswUo'Ba}k~+0}AqA9J/ P 2 صFھwP=tXͥdϢ)=9tct.yp53~NRnN{d6~ϷEVl鼩|u]\sڦ8 %` Kx`QLʉ $dph! p@2X i3ʰh&~կKWBɶ{(L+W=kXvKr}Z7b^(1 /- `!b|\r~AYϧr)h(G')c3qrvR7R]&HW:3.a¾%Nz].knF_lL~'Fx ҋ[L]:ǔ"vǾSJBtee(Cee TtE* zoR9P./jpqDt HeRɏuM)g@, {> @>LݔD>Ġ4lF nsBB A ZWY;V\7Y+Zkg3!Wӧ}h=0˕ˆb?ȡDɠFZ<.ߙ}zmڥqTy ywD=6rWͤZ$ .0}9xYO7p#+# {1~6._`v/=sf[#/'=6w<-1^ 5ƣiuq,]e[؁n6]L>YLc ]Z{?YYd^཰V}isj=\ fNF7* |b.f @e(%ě_Ze k,WcuϻmXBAWaC@+#C\?wHqr# ew$ |_?GZ3gv$H$Ǯc,ٯ+k>=q>hLȿ"*p,jg}R9n%RPǨmڦmڦH 5 WToM8NwwG&GnG\ʦzjr?Ҫ( l!U5tWCiU|0CiUdW0`^y}m+V (j*0,*!F(?ڪڪ ڪڪȟĠ*֝!Cu n !Rs,2β)(I\Y -T:Ba3a  x fF ɴM@ %/^TQAc+Pċ}F!:k@gTJ.;3J`@1V[D5/ch?x{ZyWϷ6#9N0maמ}:Ug7D\aKd9='?ǯԐI_`x'zSºiISW-K JqYw`Ihkv!=r['M^^OwN ڂOnf6Ccs6 |;@J4@lO]Uh:/րq 5>nf xpe^cwMgw0Wt|5T{.R(Ńq[ 1SX;(E6v齟|/:0TjX,#̷ō뗆܇Ma߳i]ǜ1'z< ||{kqf9TdJۜ1R#`c{ioJί`xm x:zQdʩr<uA)FjkVa=Mڎ4q8 4V?H۔vB5j\Q4zg=xY΍Z57 \!^Jۓ:WYhIS6-HOψmXHtG*Sqf?w3-?<4pc6x5^R a)֢Hx?9 W)J^yh q-jB@X9qJG MYj6G1CMIԒ}F Zwl#N`!5`1UV9#JS5&M3\J~fltNRg^. %SQ("ؕ1=kF h[<ů?~@9\PG)kYO|]9~gCճxk@ Jj5:'ф'B#[C˾-0}}R{Ȼns=,︒^0ϵCSn*Ň>k\}^KR:vd{uO>Fw"|(o:,yLPw]xx.7՟oV+&kj0|VR&Ie5][khBq V8fuaQ'G'8qһIR!_wD{z}G@jqT X'|&6lL&IDgFOp+Į t9V{;Pc7%J9h&jrvns|^y̙%q[z;l*b.uY;?rOTu晵g;\&JN[::Wgq-9)nY |6YH\NgnyZb ^cd8[Lq 0-\2P3Q\a P1)`Qn f㏈յ\?R0/fp<-WP (:J#][K*XuW~x;Cn }N$mI@4*Bovj<1 z31mb1%Mo݅S CE슾S~ FXc j|$ x&cC˝"k/CdsN4j{l;/3m\Fa .D*D;bp'1@#7P#EQ_ T T dr|"Ig4ty:0D c$2$HӰuK l'qR^} ӻ J?\F ]Izʁ9reN(@H, HU'J0ahard~I&mppxS*<Sf0mlfIH=K{LXVYaRc^!U{Nj\%>a&o**1 YԔ@J`?)1+?utFM0d}nf M'M,( hoBbZ>E.ϡ# 6ZiA3 ^,b#U>If ;.`,(?T~6 \|^>:DxqI6RZ7jrY)㌣ISN=x2 Mİng]M_m.D޼X6*wK|mO&SZ;卢 YZWܦG@ #G ™WNVO5 Yw(PԲ8ڈbMײP 9)°{utPO!1@%t|k)Y!X[ @fx~=H蜍=mq~OW 1eR ([ NcpPa-6 ĻʇD((("(u ,WB2=Sh텥  LQ6mdC0b+c>y }g1Ԃmu()cf,=^)2+f) d['A땵6Ouaag&^市4(PU,C7RH{`#Sz;( F3@X[LImy,YOLlvuJi+yHic}SVI@F̊:d#R&ZXM;}cǷ f֖v5y?-/e4o<4? n'VsQ?;w׻jݿ"ڭ8g>UEdI[rZdY!t$!'[p47pw}OO{7m&o:=TKJ机n. ƀ>+)*Xc7\myideۈd%>~pqfo^{.r˽k%wrN ؕ?3}MMRhN]}&7\7- 6yr Ly  ̡V> /L4ɎI֍0fx6?9szx̓ZR_=}@B)sU`>m+X:8N 6[3܎.H5A,U>aZF)bbdbF1}aEcpַ~V+nV\ Um9_TD=<_rWe]JqhZ3T7%J>|by852B=iPgUH49zz\r3Up̧VZ/(M WRXTݜ4E^dgT?$G>I$>3vtDU=9y3QW_3g#L/8"3QCcڎdE՚hL-&[EQlwƓZ.Gt~Q;[!m1\ͨG 6x6<5:cn&3t]s.ݥ:': P%]C,_ֺ|70^;{rz`=ؕ7z]lqWZx +E9r='b] b3.jxox`B֒dv& [-҅A|2kTƫ5*p>uvypeuΥ>Fj˫p‰ߞ<@l€/n!sS'RY^8.p-ӇY*Q'h@#H}znTr <1/9ES?e9K;EDT(]):((` e ߈9^s9ywHm6^t!wef@ܠd%4s3SUo O9963gf_ wڽU2iwAv&J'Mfz&jv}~]/yyIןK<;zYI{EnlJR<_[ؑvH|KQ~Ft1S(N9\TPk $QXL(v2ZgYQWi7e[C_Di\Ì_ԔQSKakJVqΏ cN_,K$J9|7 HLKAoQe_$)+eK-8ԌYsdЧ)SóMP~ l<1~xH i E7+,jNժZSB\zX2 ߓjd r>-Ut]2|Zn`ç>-Ollق=[֐jV3HSLЅ lJwJAYmDi~(QdAƧ;ŧ5w?Gd$犭zʦ.BPe t[qlSL`boΊu fXr9„c/l˛5hj\F8׫sY!sHYK`cu,tb%VZIPcMb̦ƙhTh 5Z6€0$Plf`3Ѝ@ ͞J<D0P3,jvP3(P257 4 $ϖ{tgy<Ah忲QhSP~]*y4Fr"3b@6椥o"o:R=Z@mB*&Cz.c6y>L|Ex;D$ɼ bI&Ga/JX>.??JXp֣Рd$15D`{*iˈ)tc?1bhAxIb 5*1eNB^"bzbeOۤ=xپr/m ) ShYAts<$.PX.e$TIYv/TqN PDYGq@x1-.%~rs\h I"߀uTX͟!GFh&lw c-G1@ .<%P fpx8AKJ1=C✠IIlbP4>4Շn \F'718I#T˥${eΆu'kȐtϿ%k4d#K.+L-S# q^ j@kv#vqXX=2MWJ$HvD"A2A$.Xg$œ/XuknyNa`95Xfoׁ|v>t7*j37p#+#{Z(M'tVm o_6 ;W2^im5Z}Kq E0'Zֈ%!/2]VO%\FV }(k PͩN7**SI:\-ƛbAF/T׿~Bt3\$(= :"ȑI[eh@7u3N!NJ~g<5X@Ҽr ̪p'4˴(Z'z3Tc3~ة͍LSeq?tD}=GX&UCFSl[R͗κn_eaչk!JpZ`Gʕ;'OWR`JCv/f9NEj2jon8Izy4/oG+|Xs2j7h*ؾ¡I!_ݖi3>wE/;]EK|_mR]5uS}kx50+Rsh${i~pd[fJ wv@\Fj+p2y/).Qo .Ur嫖} x*FrWB JSFQ#DJXF+eM}dY~"z7kg-._-UlN+U#%~h~6[aK\.9X7zGgBMJ$]_:ƍ^uO>d:--%LR?uŜ._|~*}`v9X]ݯkk\\ K&Y8b:D‰czk&z|8ڇ)_b'׌ٝ* JFD@eAr%/M6ix%hT򺊦 b["3H퉃jrOV3_ fghnp@8n.@M,(6?l/-@ вU܏_숈^ `,.c0y9&ytpI{K29m.`L(P29>*(5g활DW7u ľx[:x7^GuS-T7*`Y SU`S˙ES[KEG+ke]43+s=2,!CjCp# FjF>p# r#)Hm5F0Ly) $pZAt;v'Jx Ax,41:}KriS`! ג3 nD"LIɜq@4ď?7{W6ky"ahٷlW_]tߩj{XfCkuX]Gg 1FJjuN;I;=b[=Wu6f쩤9mp{Z~0~  ReR஛&$1 /I f 9b]B˘J"-dǪk1O4iR>> D"b3: xX\ , %1#q`=u闰[aߒ #p/4K7q)ہl[1=E^8-ћ[Q8c:rv뢩]+ S6uRjsim})tl/Bֱ\"bH DUOW&?V<,$t"b" GE  brvD@yC]3 &.Z)K%rcɝE^_{w roIMt#VELV₼+J8E(BE2nUr@s$ uz\%+¨j&L=68ݼ";K/(Sʹzx|Z=-Fq??m>J[=ߕǦO_tم2nѡ{;RXٯW"hT2WꯗBi6Z2K-Uc`Zr{҄_Ps>$Y(RvրBs S$^efAF-YԚ=r%j&lђMCr вPM)HYd[r7fq1+F+.n!y樹C 5pO!zb4+UuYkgЄ7ŦVB? zw>:]qԓ ||t[mr&X t~' MM_~|] +TqbDk,ѧx!* p530S[+zSn%?vڛ/+Sd9A9)#j!ZJFd=<psGa<q=d% _j-N"^Ǥ+n-~XFgXwp'NS؏קIoӝvg?ҾGo'ލl&/ бץ^ mss=5}w"NG/:ތWZ)JmN5t-gKW٥\qQg)rԔ8Sַ9C[ƑF':Q6[A?= t =zI?PçG'T&nڿݸ`c*h6>e__t=/M'j(tn<'dޣM1=|pp` Aa*أ_D3XH#MRQ=-;ԋ$Bu@ޡԹhu"%W=KNɫѴ=͋̋p}p:-[$;})%)SA_}OQ*]s\[R@"@Jk+~V(ޏ~+3|6[GgUzqڅgIj^8}Bt ZVr$+}ά9bϫVju>R>=>yÓj7SmMM"&oՑPdE7>uVl>~bbph?~ Z©#̚M#S3cs4Ϳ]xT;rbγ/>C:YY>s|O-߮p׵[.M.%u߬ OdO r_'ڹoS|UkQa;v2xA ;T*kO;KMVŶx-Wa]͈VUp[( kk]ѱ7y{#wW^PW3v,YKYUW-0l7݄ʦ`HafC Cj,(Yky2p16u$ *,aTwϠBgy'jWK (d@rYɟeL%M*[AF_;%9"#/iFeő8 Ƒ0nvqjT᜸9HXX7`-@>C cC"Jb #xă@Lt괸]^6r0vMuv#["Aգ{(W dBxсSj7J }dc.r(r(n PP.W}+`~?rV P`e#) GdB[0Zl;d?nTF8/DA2g3ۥf\)VGŲ~:\ځi.B2 F`$ FJ;@ `8.xPB`Y!IR ZZf6a蝋QB6;mE^q g K͛@xK_Zރ_gqPk|f,^$OkLu^Ȅc?9ԂwܝY\-N-YuqN*I#FSݱÙI^!r,>Z?p<_ʇ]J(-SS3Nz:hSsS dO_3T2bnܞ}~!slco3< j^AdBB6k3mC6߀<^l&#+#{1և67MxnOqs/EAc -C8xlbMKFns%K+f5DV[Hw,̩QZ8vsFVW#<*بU>K8Q Q %*aJ :Jk|V>D5lnTrmZ &R\ +W0O6*60 *TXV Qy >> , > 1  FB"63CX w^-l8'TrVC\qŝJ Ao,8k]MJD/j ⊞MC/~ؾ5Yv\'sn& e 1['# &Nwd%p`?ƚφ Ռ>)(%BK=kJJFZGk!;њ}s|L5Ba-e݄RQ֎ja0Jת>2ַ><[ϧ23sՌPK=~b~RJT"Nja-j{}^*:W><=>y7զU+2-?VZ?=2pتF@v8S iRkOؾ/t# Ϻ֔_n*YEL%Rξ[!2|z/7/D6qԾ` r) %G}Uޢ..n{mz+_=z\,%X^S' k7Q=Qcȃ MvhHǗwhю=\S9JDD=3וR8taHC,˕GѺ.}ϱ9hiSEfmxXFJc+֓LfY*7uyCrT?8 񙏣?RS0ouEqGY/fxZ 0;_~w(=3F@x"z`[6p{+‡ 9zq[ q3w:ej|\f~(0%T~uJc#fL>P{VmF9h[yej<񜳃tm'鎌b^xT;rbN[{m̓U7|O˷ kk\\ KpKoփ?Nɝ,]v'Z9BN:rߦ6#'׌K`@B+A+ ٥WcP@1S^`y2'-uz-HpY Pz@NZ)~$-7~}ff/&9 891Сfy{]t3>ګ9>8 3GDXr'E@M툸,fAlj̫Z E΀` x3y?>tcu}A "8tqFjOȡ({&?R!B6}3`:CyQ-LC;&MfK]8FN8`Y 8݈J,r[~x40-u݌sx&l^p@- @Fs429}X fV\ZMi9ΓbIq*I׉LBK#O4"D]!}iσZM.]\4AodhZ7h鞳4ˡQMJA y[͠\\bFN[ 5 ]%. ]` xu߯{|e<ApZ tpĚȈvyl,9 hl@\ ` !@xS!ls7>19s,AqZ5R.^u,>M6RSᷤED @m ;Xڰ2@1tE Eß J&: a@-4Eˆ{XjqTꫧH(G"yH^TA G〰DKL#"b q-٭%Sѽ=)ɗwުɢݝgn/sL@}!q`sfo'QmBI~O27Z+VJS3TS3Ekti8: mO i{n?Nb/c߷)up֠yqyy+GWjZtu|G}yZq$~bSڊl KB)5-'BaE,%Qүb%"kuft'o&X.TV:oS]}PG<~~Ԡ>̭FM:{;SD4rٵ'lQץEK,S] kʯgf=zX)V*&^3a79MErۿOtq&}n<NO]1'6ɪ(}[)UXPZc-&nSVm ~r'KG‰چsiܷ{A$4I5ㇿ]9yom~HW \+9^+/Ҷ8EӄU- =qPVNq;Xe{2֝ +{7zEqU <`hЂU'CU[P?`nA)Y/oܻ oMš! )ԜT &PPGwքꎬ(ʢw KTݳADjI3axC̗* 9er -iJI -̩Od$b992!/ ' aSP  BfQ8(șWU;-[X@0Ƴ ѲB¶<]Z2Քy77e2Tgbb}D\[ƒ;KT)GkxTQ.չa4njМƯ]8jMMFq]T)T_P3Q\8Fw^J+S3St9a co@04ţ҉R;ހH?Po k>eZ)I=ѼO>l9[;eES_\4Kn;j]pݲzzjԭ:YM*!@0SF oR.JDxRmxi~EinEp k0:Sk{@X f6بMAX`uYF s!fGl j`Y;G&c6R\G B 05P@0|ρs rl1l68P0F ;]P,,%XğVhPd-gM2Z7Rpۜi6oD>TKrO 4;`n5jv LS^r5oB9]Ɂx;b_ˆX``Ny!{COg>B֨_41;Wwmj{ +K=-wQ f0hq ; hԊUZW;$`?~ZT> 5K֍.`cg~ d*R\a[} S"=/荇gMvDJk}ሉ;GN_DiA'i Ӑ-8B/J@z&%m!~:pݓNS4^'oE_c=将?\J{9ץOOv'\-5#^Y y'+{GQ@X//<;a"(=t~fٶx?Ya.T1VȾrN8N)Ȇ8Ce?h#!6ȆI ) v!'C_2tVLv92S'D d:|wIdR֐L Wbb-Ϋn z=W6ܣxh@ e1æ$i*Hd !!.~*H Y4ػ쏱!nϡO9eʟXz/+8=%TSLj0qQ_;Rdp||p]`uVq3fxfj5|/ |w>-L`*?&QLq|x{}^oC-.Ӂl:kOؾEޛQ] kʯSAuDӇbX=~bL؋7\oB"+Y85%Œ?g`n?HIS^ZzՍG)+攙_,+NV%3o|OXy˥f=T Ods]Co"C c6&m$\IkGyhӀ! /쐇WŒ'^m9 bWHFzL)lPF֞7aeo~F*(8jYEoY`g-cgIVѼ[PJwܚ~{7᭲< +EW0Wc`WA]mtg#+cjy2(@pב0aPAC=t!yjR#0Cf>sfCR`θ9BKU9"Yd3fb4nCě{R?u>TF8/ F`*Ȝ99gkQާrX)ϲD.@L.VȢ yL@܈[bAR0@0 aj @h,1!4d0I*2_TAqXX+l0`6"\ s1jCȐz+Zay` p>yTZޅ_gqPk|f,^l-4מTV'B&L_ߤl.*Fjlqjɢ3?P#[F& WFAIʨ vg?`C?;B&RY` }6~xH TZV)L x4])'ٯpPZ1SH7fnO>P?91_쿷pXQSD&D+9a6c&0n cQjMJM oZʇ̷q&2LXW'KVbi͜'_-j$*YRS}peh3猬G$A lF lS]*:ب:( PP@Q@`=Sjacu3`kB-l\0B-ldW0`^y}aWA]}aPZ0ZذFz"`A-lA-l ybx|'cvPP™!G,;z@a9@2mJ%cC7WǮ&n5 c0 xz*:6 sAy!a<`8T޼1 Ry7{4uз!6Ejb=l"X2oE6NETۦLzCR̓YEa>7; C83vK aK A!uR/İz H0/W%&TZNdz`{>ck$(% C9|\vDKRO;Hg~zMu)we~4"y|O~w&KLV#⾆O1aA-Jhj/nގy<,X>S] .cIѬ?:)3o0Hideuж愍3@-@uN>GM J-`5 AvM}S\)NaKQQ[!m{|x{}^oM-.xWn9dV7E o1 hogQmeq)MOξ=[Aˑ|ʹMjiѧeA6RZ7<єo(Q{Sƾ5DeDDHA>/.tݗx3WC^oFx"Efoon^G7Jx|ݏY?zױZBj8JSǀfhK$+s1X| < =RC~_7纴@ϑ#n0~NR-^wj:ZkhPM2Z=9)EvOfĽ|/:0E*9yl>Rb-n\ xo 1CCKvdDGHG<Ȝm@WޭknX%U!?}sOo谮J½o)1NgQ9Lמޕv|ܩo-*Vq;=ݱʞ|k!J)[)"۔NpV 5^6) ¹U39zU: m(mj-Th:+Q7ejG]DZw/֡N.J5y\g{O8S:c/@(KAեZzՃ9?݌*ҊZQӢ|ON0tm'G.,X4MwO,s ɪNɖoS~lvXy˥ĩnӃɝqty D\@FĹH> H!=2%2 #iVKZwBRRs5њzBE&Ud?<, #4W2,b@lq1M%@JU@*X bބ*t = f[ Tp \oJ6BȘ7BH%dH6BL A&b61p@0z``y΃PyX W#KfXPlӸ8A X {V @͘9,п8{H{mG6^H%b)Mj0<5}`@ g#YdQ'(&6wt7~rAn)a"yw,=:g  Mn tZR{b{L 8l.,`Z^?}M[0wViʒnRK/)ձ" ۨ%& @P2vZ9]ϢB9`0sǡ)> TS7].*03U,`natC-OQaK6ٖ*- nt<`|c Ϳ 0R 쒥: Q3YLEt8o'[-6ե/Sꧼ)%9g^pϕZ%PP9J@-8 j}ő?ܧl .k?'8x`6Z`n$#nr&j+_Llź r<8w~c@`JVp}R;$[թ FDD@ k:P8P,Ȳ}$ 1llh%9˥lC}-۬nSw9 ̅X$ϢXue΢k5]ov]߻lOrlKʕbX. gȟx7*D;)$>aõN9=AA̛=uIXfhPs-Rmq !FZQ 8"8D?'u5%_~h6FǂD|)+s&O&%J#K: -<#e=#P B.B+Dc3] Wc$ i$7ʙRqPn!w~+N[̀&fpZmoˤ)!Cq fJ$ c. }ωfd}%0͈!fc%*5@]0"OP}QL6RZ7<)ĒH"mSeuCzMO ש.Rq`zALa;mY5U[gf[ Zh4mX0w0\^Y!Au@ Ί&)w?j6+̂ ID z~=69s"4}Z33{Q"i2D3(0QEj󙯙 x7p\W]PC_Zg:%gT2Eӻ{j ҎKVȽ@ΰr`egBP`lLP{9н]΢96s @ XJOfJ#7cV0+wGI&d]lofرX i) *6j`lZ c66@sgJ^q϶Fr&0%DiAxPFɽ@Y!g͟!$ ;~sז@,0_ [+uek< A0RJ(NrT9^ qj&Nwd%qh?V?5YSp/=q]~Fir)NmZM\L|h._4_Nտp Mdj83/􍏫9kgmv929 T]7UOulڂj7Ϛ݄{f.FOp4qZ9?J4dtup>TCzМQSC H]*S}iղcX0 MaáZDq8L5>zJ|/*KBK=ˮU}m])o"!Pšgu)~ԪWrϣ|^|{}^ʇ'>o$2p: HR}(V'EJ}!PeBiPk+.G'$PVXW}f*-ZzՍG)+洭ئ8Ym|V7m|B][YLM|qj Odse<@C9in*QlX>ɼfWePcL ?g Y O;K8MVŶͤ!8ao&Uc9ʖ_B+., (ZVosR ; v,* s -(;}{7᭲<RX0! z,(h;kAuGV5dhy6g]G A q *B;Q#ZmLwum>e@j(`3}9BKUfkUymU8"<3 fGYܴ,O`(b.fGNAM78 7&x rW6}h -(S[l7(5&|F>᲎Tq=nG'Ǝ |kyK-ضk2K=݇Fq9 {Ex6b^sWEk۾ÿ^ ߼"Hfc"wގ-2J3@ 5'Vҁ`hq F8=:ȁ@̼)Qd0( *nA]rH}>)%O{eHX0L^@0Q,`y#=Iy Ȃk0L@0E`+ "`0Uo@VTU @ʼ: R2%rڗfQZ`V;` xM 7?=rK5OFE Pyc"d OY8' N++Szt۠C?! FԦiAV`u!@0<> <p`Cf| o3R\39=@X h^3( 20'p୧,PЁc@μ9c-@* `0o_?GZ3f=h{̇X׬\!2  .d Y'`ʇD_( {@9{w H!0[A7)áz;jdYfXPlӸ58A$G\Z |CKVn2RV2 /OfIW 3ԉPS-6X瞧Cԭ"zHynsqH{'?",!o︫cP͍a{6gDգyP[ g1R?/`spjo@S>x0ahbϴd ڱl[mC_iaƿ]a?W1v WJ&OLf㙱~pme+ v=Zюs>8(ED0MOYDuypj\^- |P97O9e'"LԿ3 9R#!)@ y\[ow6%ͱZv~Q u6Ƨ)l#x 7<+h0NL]DE N$ةPۍZ*X{aHu9g^UFRA={[X ` A UwNϟ# v KaA5*(*(PX N y4].4#m,Ri,. \C Y.|LSO$Z.e1zrDߨiɷx}+BrS " )`Ǒ# p\3p'#&Nwd%pd?ƺφ@Ɇ?WS+?~iZ8&ku8:Z^#%鵬[>.nZ-WңZYd_{/{o2ZK%YeIt11pԨ }:.{zޤW+Q0lR8B!mFjǞ019un7CrCrPEixܚ,JqBcH D̾m?[nfFG$ǯ^ҝW:>z5ՍȒUG2v!:::b0P%;3éRT oQzb}O΄yfonL Ywrk,xud|Ρ tR7IתǮ? @An:b>{q㫉?[h3* ayMӉT;VYn'/"4"h'd75'z~+s IfxFJ\8GPz89p G.r/4ʑZa/A_I}b&Zϩv/YnNg̡nqYS(LW3-B r)EZ ^5si!FoU+:W)GIyyϛ1lRi=/kr%A"?X)pAhe| eԭ06|ت9Cwvb'qrd ݖnuQp}9Mہ/6NVe.3 ?m.߮Rξ?Vrir,&Y8'wDOty i$e:q}H4Wd^3~+&y?kLj*~H'ӥbJ+-H4aUaܓ&Gzd'lDe]ooV&yoʋ㪖[Ԃ[ 2d}:Y&]5Mx,-Jy}+|GY5U;`WA٣.kM:0 *hgPՐ ACjIT20HV3|:H,s-=GhISb HgNU'#iFC1;]JD  rgvΙNJZ<*b9IpiB0I;JMe2qOs#n Ir@WZa l gF}V X!h @Zb<C+>x g,#i6trdCo:jƵI ?̓bɼRqVz̃n.6`2̓YEa>7; C3%D1ε-]_}1 t1*p~(ZU*wMVǁulҖsK_/}Fvgzz:}J..=[7] {+pLm})կ#7mG㫿NEW]-Bs1ig8cN 4۾XnH' [5x,K#$Z݊UVFY/N*^ҵg u V \^ x_"|qhDlfnfj|V_L!ew|-چGJ,̥{I a,..&tX@ вiO`0tslP<6g{ `<4Cجl<S*$E[.g'Dy& so ƒVor0 swa-#\ yөR7A(J2QT3#6QOn׻I=)9HH uFW#y>EN$ @&*uROroTG݊s/PU@DJS,o &:LIv;RD(O~!>@f )3w@ 2ZT+}a %38)gu#A:~Ȃ @мR1`|/@UR> DDLė7צ>O vK<½J;w׫)v|Ҽ֙RlI[rZ]dY!4w ֢V]AH?R!ia^g^대cRw%] Mԗ!qsɔىi]7ls9[q8/U<.:3@?Juο# {y$W o:4]?~+}r/t6a| H4^fi$"()u匷0Tqx׿gms)(8 )Ify6Zzj&I!:*uO4DIGTuaN'mRVuwd Br9)z5)Ivy׷b< W"7RWEz1N Qdy̏E+U!N`ӉgQUr)QUf$p+ٺe;>Kg̲Cq#֨ޟv&?46sn$ۓ3۵ƒrX-KȟgaQ^\ɋ-x 6 ;\S@xJlqm+P&t J̵Hy&iCk4*2 vd=KSߤ ox5%G hb'&´SNA_9;k90iRx y[Cbao`3`X3 iR.B+Dn.ثWAG@Vwuvy%<>t@1hyT&XbDB(}KszXki&$#n0uYV,ه_EFycһ{jҞG5jKAbW+S?@P?f4в'Vs"a:`'X [xB2P*T,T4ܣJs(`"`A(ӊ/_|B1cs&JqT'\%J)`gfTGcǡu/$AChLetgo,K9G(X"E\21EQxϱ%TIĵ NJ7V͊/_TSW\lȥn\3>3+!ЉRbmyrn/_*/cZ4wX Fj S[ @'7daK"0_,](@0ݍ*+!N>W鎬d"݂jyCeʟ]AaKOw`[;f:U]tEGkr]WT1/g9Ք^Ld9$ӓIE~]/]smgȆ#6akW8&]t7O$%`Z+sOk 4Vӎ3*B|noqzu8 /73[~n&J>1 1%Z="هbxtPd_mQayM}h'֌\ q7Ք}mҷ4ՍG)+_:Y϶|l74϶|Bi Xy˥f=/ɝ,]v'Zl|r_'^0o|G1ɘ$_MUMc9?>A Y^tO;KpMVF>es(KׇOٞm,Mc¢eK`kZ֒I*L.05n[eiy V2+0`^.0;ʪ euPZ -r:0 *hgP!"߉ʤe`H%l+/O,˜]*#Zc|^[U3/ FQ w2fK輣=yP™\P[@̟&,VţbX)ub piBgitN#$Y4! 88yRD#9Ja Ao,8778s`5ojAk2R\|>`I%d "~{IS:TP)ⱇ毸x4$"X2oT[q)5GL/<%}Py`=1 0̬\zꮯ]kvI>oVrKC} G7w|HϨp~(j>('o)Vn5e\B:Z t|)u]Z2JGΎyb\T6~l6'+|{o<4? nroD6n =97+`CotB<BӴb<-\ =-ǣRـh+$i "eGF.IW&Sr%o uŜ@'"]ou&]oWxR8Zc-&no!=^~;Y/@8wCb9׵׉ON Qu'# w4 w4^ehb;bx( Nш8XXJ.O遥  ɓ` xotc')~V?YAr܏r٦Q"s0%}O=x bjZ/-@ V$OF/i5sc!$gҖDSƵv5!$ӺSTM d6QW[EKtqwB+d.Nx8HʜU`)8^UʰYɥcwaw}0QC 00`C?H$sh5b8/BJQJ1ĜJ:-0n%{VD(-_Bº{r s}kr]Y! ;|wU5Z aa7=^3 Kz.t$2BlpU*1H")zּ}fx}ro},17ñlm|SxfX i)qVF.3(P2<' 0  J鮚\#q&U`^a%ü j*QVwdi_cⒸ]G A q *doA;Q#u.r/g$pX9S#)?$Y*f_]#`(bx|'cv1xG%V@ gsBl3;v\)VGrR,'.@L-Uate%$Y4! 88yRDJ`9` x{X+mT^06 `RzCf22_@xXX+s09Z@xg@)XpD쎤sӽ>*/'A6D&ut!M3uj"[mD|du,m<*f*<}5f {`4XO D3I.\A.-oBmK:BV>& p\ PMkb8%CO2 IoUj.I=m  S[]Jc$9swHAF)bgc3Spɒ*,񈸯S C|Xuu4Z[`c^`&:f17=:=TW˺.zR4NL/}ھ5Yt9a u@ вDݪxǑt;i8w cgC~bqFWSXRk`V|||%V%2 U{eZa9~6x!m 0Bf(}0evhA[P}Lҭ陹jF^?1?)ʺbf%*TMI*5O Lsf05{^R=>yqyy+GWj*s [YC+ OpLSK=ˮ=aXҍ$ }0151RZ7-80_ u<]۬XY]v=rkIC" @Z R5n89suXjnu--U"rTJ!QەZzhmzݾ}/ϛԥz鼿=!ɆzZ-[e7WjNr'X{#ۜH4FL fظVyZ<]swy-?{G ƣEb86JܗIuYZV؟VF\9m3H$Țk-A8SS.C?0 ".`\omzr<.Ol oonDۖ+.Ì)QEegu1_ z_p"2mڽʢj0*-aJs}qɚ?;d!l9h=R`_m1k_ޢanyjm̓2@S  x%֘;i*3{A2?-8J%kMèKak~H$~}wB|'G~]bF&Nj iv57f^ǃaz[bWRP􊛦"+eiV;YvȝcK qW(29I^yi:W5IM s@ľnerUnlv2m+&+1_1 mp% J:]wK~/ VHmNMCэadng,r2#6F=u̕NH:NFZ'irsі:iK린b"uQ-siMq'=4&nwvz-B6٨au)ōٴ 5gtsPk`Ng Rm#M+I;9xXN HO SVs nyG߀A^OZm]6^1kYeGf*p+4w%۔tTY!|j*&fa&V|t[ݫ{HBi5~|JAuSRP逎nT;Bz ݨ @ܭz ETgo~Ka~BF.1J7Daҷi_!c1%He 40 gǃ-΄ۖD3q'5FJjGEHCHQ! ^CfdE +cgV"}*{b]swT #}ˇbm36'^F 9酡zIVsO=-ZbG0Y%Į cwIQUBl V/” ݵn~J2;V'.k^i?~$7fDN0`،ju 1G9G̏*uk#C1:⪞2o,LUi#uGC"NMQt5pep[1_EA8hTbU窶AZ.2¾h*ApB-w}ZJh\ZOoK%JJ;qL5͒l9PbB*vzG4K]u3ʡ|WȤ lXm*kTzԄɄLse4oX'dASmbK g)K?Ei؊n7[vJ*M#z..}o{5JI:D B8*D3NΔڱUH-:1]yf0$ĝzyb֗QLE;؋LR&.ևx}Ȍ:Tw!rYmOnHD챎IˍY]ʢ@IKR9Aʊ4$8w^rAjOl \.lV`)o2 nFZRȥ.ɄV{GT柋zFǽ jfHGHv]ɛkУ%dTT?ܹ*eOy a?jb>>"M±FkSHqFjuw-Rd>ص,XC5StNxnO6uJ?=9n/~Ĩ! 7*+#F^aJ,.ozHe7䠄gjɑP&'I!)ߞ8ؽW7ƿ]'M#PL;w e9I7UJAKQX E,elձoZِ)"K'C:6}~g LV٤*1˒'?o0{i[":tO tm43w)uZJϟ0S2n3Bǘ5iKeЦPkZhn'H ~T%'ߺBsve]+c޶JMYJ=?rN.j⭴ps~|4i"ͷDs@j +LD_ض9"41~}4IJ6H/Ci]KYo7n{hkݩ3bpWװd?hִRճMR$SIeT3#v>),+k)?x>%>ʚ~p,F&dZ^#Ώ_|!,n~|!/R{C'ꙛod%?7s=r_rڮ!c1TOÏw/63f]VaÂsZ?qUZY/ZY³[,]0~_ە_+Dk!u (X'w}ap@M!;qҡ8iڊ5£OkS7\?:q}SyYʍvEs >]:XL8 YAgg7L_ &|{  ~c_l ė-vr.[}Nsc fNkqWXI2RTt%Y>7ʵ?NFaB&()ð0*(n؅HlZrUYK%e@.رӓn/@IГO]R; e,CΜld0iL3~ TqRIaIljIMPV(\.SFҥAx3dݶ.x,Zz@3-vau>ꦒ51Kلò}TqI[T^~ҺsqLpjo^yҾBr6VJ/|uc>Ϟ^WƧc}+ɚv*P)1jռ# ^#n !oc蒴TEK>}lyR9Rݳ﫚jY?o0y~\sIm3s0Q+)VjSJzh5TlVHtynnU i>;]TMuz6 YS G7pkp!p@݆ ~'Xb=+~#%<#&^Vڬ$r|r)6BJBNfY}+}'4'j3_w'cy?(lpW;]^"KzVQ ZRQ g@^|:e:hCІ06AB>0mx DhCІ@ hÏDVҿІV$G$nHmtLGR/18KZ׍_w7UE)+;s53O)A p&eIӴ|ʱ&*)g.OW*=-WD"^*p-j:]Cˋgcߤ3hFmwWܢI[0e-DU,\>Ytr.uKWp ekGuyI_rRGbM=URtJh{2e1Rߦ׵F)yp{a䚝#?Ets,{w* Qn~LH(U0FW-W?PlKtN)1J,U`iB }oYzHcg*[.y3x35TGy/wM8P23VAmQjaPv "@ہZ@mmO}Zi'o5m@4}T!q㻩bWUoz!F1df/]C7Fj\,6g$l{A Y-u;%h*# *. r&=YV8C@`si>=ѣn0@ wQ`"`uѼdUn,n6a4!l S B%Y-hj{Q-e`aOt<`@D)C;4WF5& 2evvo>'sP/! N?tDŽ`! )Vƃ&YADEhX. ghĀv@ M$ I(@h|t??\۶,v:@?mNGsc-_6zO85)]w@t$AC4 yiXб[zegw뷸2aJ(#)o)SqŴK%J-:kQ\F4|ӎ}s;o~h:)qM9g$?2< ;w,~(lu{ F-\@@ dlv\".yI\֧jnN I":.}G Wշ)o/<Ν\>ulG.̙aq'a,p! ԑ "%.Bp@|&jЦMmsuY˙Mq-k"7W[udzl8.ڥdZot'ԬtQ3 I4\ h+-@7[c1Gt Ђ͎u='|IeH;L6t|A+(ȧȌ2qt!/s_@S!6H(6p-ؾn>+x`JrJi}HӢ#(9H*3o*`jw] G.Jܲ;{wrxCtH$"&;M`,(lwQZ;]11۴K؅$#@Ig<ȕJ/>PU$;Ƕ,9鍇k>L>Hmn#9c*P/RoLK.ȇg=F)D\sgҲXCscjr}a $-Y.\KL3Qȵ1"#7-ˉk,CwDX-S5f".L`I֋/;Pk+^jnodU5*-RTppќ6s"<.0MdcwL9r]Vxʒg*l ,z )P_2dIA7ٳ[rys2+KȗVX'vR^]3 ȩ]0jN V(ScF[?Y=?)Zlo;\utq+zo!Iy ӇYzlEӌBQ0*$akYb`=4!YW],TXޡ>W%*sv!קȊ8uf~$Ϸ(/ײMܝ@z`8-8#$F@~Yjn=ax˅N|&J.0/ [?H3ӏ$>4g:gRΊd32q43YTԍ+Е:}wʫB=:D^K8kDuZABKn@mU+1 SΛK? PMO}GEW.70_kZV}D#2_=8 [tGo6|^2f^[1m2dra2(UO?A|0R3{͋v{2a$Q5m<8D]Yۋjf»9:#JߕB| WZchbxq25{>cjcҋu裬CݳZnMEs[Lp~]AG]+}r$r!O bџC0F6 T)laJG(qIֱ.Y@iʙ9{ &;j9inM6e#W2<cJ5A&%;-Dz[EބKB޲܃Sޜ{`\ޮcnr &KE֦h"w)HwkrKt/.;l+YVWQYn~&DG}Ј9VW Uߏ/ BCHUm(~/Xc7Z|E1T%Rleݧ7WӀ0 m} }v |uE$(CyXv, 7sq>i׌ pso b "Mu}0]G6zX*Y|B=ɦ+'("mb ^4Yv;7A Ȋ}믓 xO_TPQ:yQ(?R?}*<ݶJteSReu "*)gy()iI,7ѹ6|f`xRWk:<'᪔fDB]AbϽLRc QyMa ` `la-M.ચS CUڛ^9h\~Fi@'b+ p@Rb5"ŇRMUv(ВYh(.>wpQ%+n{L3UT͔e##1.G*L# 4*bCHa{sb;N&Qʼ2kG澶E)i*yJoY$.z3- ĊS$WR蛜BU!/z Uݱ8ZQmWU=.9Vs @ ؄ͱ QaDqVgjI'P3M=͵ԣ8kwO'~SBӈRؐsqtG(R 8kK{jZa\u90Pլe~NVoL·(loudn./[k! 7`XT3=Uj%TD*|R˶$\o=Ŵr/ iQEQO^Ad~12FM; zUZA= Ti0" Bd=A|ذJ+9R9k{?df{<@툼tCch&\S(?T 1ù:b޶y'wTo*=GѥQZʢ #"vhar~{q?9 m0_<Yts*ŜB,uLm/.hOh#E!-%/r/c韜pځo<ףo,DZ׍ c4,+Ej3LM8|#uJ{L:bY&?\}h:)Wk2ze7:oM. ,%UD̯he-A 5O,O1n[pMm@ Ђ.@0 }Z.|rY#D6"hY?ANz(A{v>ɩ3eYVˎ|WO&~oGԔ xKO3gG? COλ2 @#\MܞuY"*@ H:f3Q/%b:rxmeQ~6u/Z%6SA=:aS)U$_°u.]TvY 7r@,P3 V#J\Igĸ֔D~&6V9rV׎%hfޗ ]ӥ/:<`:꓁ˆEbȑCO }MwP6=wXG ۓh۲3@?r@@lo,@ the4 ) pt3Iv8:!:Dy@}=PȡAHWS] ~+APH ZP8=U}nJ_Ŵ̮l]>o*&&%+ }'Vc xUg373G>ٝ, *Y1ɔIȲ升{>LP NFw}UEǓ*CizZwy;!q *1-B΀k7*_`"昈n;k[t+6pb_~/+&uO8FV!|(hf>ͲQtнBģ6@=h<m$?Lx aʇZ!J m/_]2rҞ m{Ƕ#\=0=׸)u;-#s44 |iNNR85*͒@?u:v$3$'Gӟ Ϲ׷f^r MNrjh24yˎă#Lt/.U{a'r݅j$mUkr:yIbI2@1\=G箬y}{]TmZ$Cxc/gaS ,E6ML }=i۩b1Y@G 2M{Z?Am& ğ"%lGh"\iGZrL\im 3Ħ8$ kyӀ/ ~îF<"im'RI/pŁu=Z)ѣv|pݸMwKaKVߕd<;9L EqXHuקҚ˫8LSw yrPxc:Ϲum}/fh =Ez;HڮSW{e}T;ibԔ'4' ݖhuU3)(<~9>9IP3cdx )RNʣ^ʣ_\%af$˸ +H]*wz '?gxړO6Ǫ|`^e5^QT cB|\L!8Xs2%4KY8rDG}z2+∺rESHK;>jR`]6Dw]F(M*= =ck/_^okw)?9)hJő`鑙HuwRnGZOlI'"]{;x%uTRA,ӊ IC >K9SKrBT9J?7gyw_2z14mJ;Ԑ x#9Vs-%ܲ2?a4NG#ڤ[/&z&[utw]L'0-MzyJԯ1Z^<,&/'Fv|4js[_~mbvd ݰ:LZvR:CY"I6J^7ں#V&oKU_ L}P(lw ぀&=dWq= c1_'t˕Ku)=UUěa?Ds홤Mݛi]sLq[9O-&Dܙ It3y&;JrZSK ۺrB.@ݶ9 ,+v,vudN{]S!2B* RQG[X! Kew/,?^8!DkWv@DyXV#}$ i$U*tP :mUݳsi4i 4h/j+4uipPb $s$նN;5c9/˲iS 8v,N c3pM]NC:>4vsztS9a\b2گb^"+Qfz ;ΑФm쀮1֓ϧ2&AiJ}o N)sҏ|}G <hUɁNSסg2M q ,5 ̀Txƥ1!/}9O\y|9[_/Sh]c߃[pB˷G<} X4Z _OTg3+FpFQ @l\Y}}߿>Zs=#Ẻy;!Es<;7 Uȩ*I #k8ckE}=}Z=HS̊2ʹ 󍇫n G `SoN!J6kĽ2` %@p-U8|r.Nod%3q l?U ܝm/޲o!ߛ'/=կlbgvRR䯂"_mj-/jC9Ñ @yY{ǣS,>gC V2^ԝL΁R^Jwm?62&o=y!ONrjVb\;RܰL(i0ځ;Rλ]vcr8])s\>?oѯ7y\C 99dv9j;ӫ*'sÓCy?KIiV塪ĕ %W-%@~^Kw)dkoko7 HՕCTd2䉙 wUGḳ(6.!?5 L,n#h`z U]JCJ\<$ѽMA(̸e;ukQ쉔)EGVp 3'"JqG'g%Ⱦ O#\.fIxw>Wx]>P4$ל䑠t<o*?w m.N縦|f|z$To4r7}\~ #5aH>XfPm/rbb41 $ ` u9qD:n|+i:T}%&{Y곿8ScD# r}OMB]F hb+#L9| 3o㕮%hg'_kbɿcU>7]w4LЉƣ̻eKNX{fug?*K#]M2v|D AM7 >.GɗW,d%IܞժҥɷF/|}^V梫IS/>YZK$UN+e0,,yx5AsT&Ѣ«2 ntjQ> ==nmulJ7,Ǒů;ÿ~L<3:lu5ғo~:Y (LGs2kȃ Du 5V"\_xPQ4[ HLoOG$s{$ߟF/SDJz|ܐ^lnvїJ,,*{*{ѓ$~f7ݶa]+):8תki RC+XE,KTVRƘ7R~K˯=rӧ"g$Q)ՋTjҫCMZYҔ!ʚ3/LޫgF-6=s`&fw ~JK6;d~Vh /@ȁ-mYvS',SN! y$[´6Hbb#JcZ&}r 3u,)uGBv1}4nj}M2& ׯv14)m4]l Y[gu6'n41PY%!uuꃒ-Mh4/m5nnP>fZhMdg%$o[TʰѤm2 72C 'Fg5ƤnV'x #(}6y)m:lLzXl+*r3%@mk8w C) 0K/i2b^|4m}I*Me)@C,9eCJuhI-g),w:mZ #>2ɬwc6,Rn7Sᖔ)}T{'/mmS\..lV9llkM""qx$AQE [(^&Y+rv]RR FKOiEg7:ݵ`S;E=yl,*loMN* 7JIJJnL/t:S;=9q~L9B-iڌ42%2/imY.4I[.s?Y)/b/|9աZt'#ئI _l%)@\$L2]%TW^6R`7z3Vu>HyO.=46.aH`,*韅^d> |qZBH)KcܞE[+)#f21[xƿ}-]Iv3 cτšVj~& vdW#X`hg$4z8t%V2ePf)R d_ [vb8)!R)< {kCmb+L*K,Spԯ8lGJ$ "փzErs?MU (dzyv(DP%@񩆑K%EҢtLH>2ڨf=wL84._6kǫ$﫶Y|'֎NriQI.Y0\7: z:MlH$ءJ߰B{~}9oĉɋ8B?;1q|rkM2@)qDq?)[5&jBө'*L*Qy,4ʇRW`RlBdf$I?P, b6\Q{sC.3Hl_JbRˏrٍzf3!1 wWMH/LPPx/LQo%,&% Q:5 ^BC%J%okm0G̶^;cÝ[̀Ny:9FEMtB># hlV3MBiEgk62-5ܾLKDޥ^z LԢwK!SfhmՋuz}ETY~~OҴ'zy>k}>Щ%S6K Y !&ܓr*Ȩ80a.qK'Q4V^Jj_o(Cou=Nfo'0KNi8,K>G[H}^̭L'//A/G;5Uf/gwI kU&N9#[9mHf4A˼KOo)sZ,K3TQQy*lTɯ8΀qn—lt @߅@ s%3 ]AM>5sh_۠%e.n'q )^^2};it/|=}n&>SW^9Io-5s<e@_ ፇk>L>M]j :IP"kFǪˬ(_!LE}<rɿ !^^d~ށjkjKEčB uK,aS^) H-'Rqq'ӯjUJcKv%'KYeYԱa=Zh=ZOEpkM&ZmNWϬHBݻ+jJ~jA4ڧ;{o5YJdfSSXRMRUnk}irUr@O#[,g*\ G-kL\rd.W ?Iv; 2[nj7OW3ta{sh5`ZD@0uǕS:`u ͦ+4N.d!)귛mqX!+,^ޖq0S*z``]w`8>0 %yBi,Z}SIęChR'|4T4'O9:<) ߉f!< C`ᅕJ `vQZAi-h2UԎ4Aj:~ OAU5K *~E!(mp< rmst| X* xhE8+<@ "6]hZZhe^V_tw]L}ak/g>P9K/]ɹ ~ER;4EeDa0..7<faܪ³Z9 ə<.HZ՝}:--J]lۓz}~`ugh=ɑ OiTku>jg#G. 8RSM5֥xsGufHل`SAÇ 2Y=`[AyUAЧO oy7y8w ٟcgKj ^ٜոW8,F>W]8^em'#|O<.݀C$1>-hutG|?hZtPϬ^riVtE yҙF<01ot\iqY`Ί䨞I[h΍?8a2uے,6Ւ1@`979LR{I #GR"*Qɳ9<ֻ\Bح_)ђ$ Z_{~*Z[dϲ@h{ݴe`Dnr-Bq4P[fGM{9@/0>?ONL9Y4 R2l^5OxUxpK^s|\,h9zTFE%ӕ';'DUKYl"IBT#`4[;ٌIy&$WϔIKMP` J)~x1ǑD˗xg V/J>SjW7%4fzlZ,6юIE'%q[Kpܷ]K*"v\I!糮)d1!ۗIQGmWtȴ>cӃؖ@/0jɵtƢ"[,&c.E DFFF@'=iL1jklֺX CJ_4AŒj>`w/_v<;5tZ|\F=jӓ,5/]+Gz9̏VDم?6ZZX먾UTjcb!S7٣?KɹRV [Dƴ!}ky˝4]oORgֱjb^|R{-|2#%\(T%ؽ{Uy}hݘXpr܀wwU=ĘrCZLt_zѓ+_$M-z+" c՛A抿,CS#E-g⒌^T5e [(A1|/m%NnWQ |zjM~lBM'= جm(ƾb"|jId1<{L6Ns O QvIm Ehhf׹0y5L&Z̦^qI*+3γ'6JQ ʉNbRt4ʄD@ң'm=,zmzlt(~-QT ~|!<N|($6%"?E 5K}.Wh/'`6aQM'lEm|[HL./cmV ;>ǰc@ hzP~ǀ.8c6457qUʵ򧃣/7VL5B@5& !2?D6f̿<,yq]X9;Qmi*Iנmid-b99j` w7Jp gX>V$|~,⭯m@ 2ZQ8SQ8SQ8©|gq&n=_ ,mV]=-'i;;B5\>Q>YLDO!?e;8RCt#u#\k'\.\0Jr'$+Wp^x, (J}'D,D8T(8TAOAO`AOAObPs J}ʜx @ { @tsf8Z+r\e?`=g@At?_,e@Ӽ[aAS@0~XkmeT^(6 `Z~z{V X!h @Vb<C+=xg,iH7i$H$ȖzvuXG,5_?L ߦDn\-͓\m.Ŗ<%}0lm1D 0l-n8}|m84]w]?]݋;Jz5zV#,~96,wRSկ?uGg80QKM_ [O7-~j6ahԪ 1i ۫V+:.t ƶneKs;uJyǕii4~z|{v,D%l4[2Wc?* R}YlAwU 4v/_G 6}`cz S W5sȊCƥ^zvI9ov=61+ҳɩwUlKzSό1l?p7oK!tf_뇡I*#nB,T7>-e.#lܙs, _=AZ0FerGZ޺RˇTӶ>>:(9d aky_g9ó5#1]ؓ.styI>lC!HYI; 6~` N mg3u!20,ڽH|6Heњq vWwĀS*s!<{n[6I+'Ly8Jt3wӸ\_GݫܿBˈ6i+k \暪' `@XhE_2ou{qs o^_\UDm A b^|Ĩ URbUI~*y-ŴW]nGaR{aM=JrC?h 3R~L l}>04j~m,n|5|-6*cH}&9  oӸ)-{~D4jx56Ɛ~ -SQ-,*Tc.jQɨK|gE ɷL}U\Rp ש_9o'&Tu(sub5D Pژ+0T`Pq Vԯ X)@F X)fmI]l?x8΍IeX%ޒ#*AH 9! i!0B@#sžhx}GB@̎ }@,HɿM\܋(vH7 ]^*jR\Znx{!IQ\??KcOP&2I_^NpN54meg"$ExՎI탋. \(pQ+,,T_ \\y.rQ&MNB΀aVL(Ɂz펎OEP7׺C+;@Ȝs`(UY=bȕZ/> DTV# m+6& YP-܇ߵ=!9/1q&~ZiWՆf '?[p晁qWS+k[}+F ,W /L~Uy$$"L_mTci­R0q[<أ'klP۳n{яaCtim1,/֎?3''!'+e&&̎v~w ` `"ZP"c<AR/nLg,*s7V : 3J)i cSV"WϢEqv=iپqKPB'(lo +8!K`8܋DDVbYxլJa&"voL_c?UEJ-5+W>N5pWt[Ê/0Mk=Qe?%XM,Gwx'^;jǮ>!ߖޔ\)3H9ǃbAp+e' ǴB@~Z4o Njo{:Lo᷁w'v<@dL s/g [S^JH߶PjPCܫe+C-YC=6*2mWΧjm?Ç|F$v7pX#4]Gxp!taDl+ZlNV/IGDB#kث-, ,!X@ % XM=/ph@1ZabD` OxbǩK0b@F-;ځ 'ށJlǰAoz/Hk:urwe$KO`+08 }fNtD8RV[f,rT# DBY@6ǶzL5@`^q`UIڛq>)S:zJol+6rTQ' 4 P ıNٖ@3 Bg@'ND qX`Wy%3##q[)Ƴq@|)>1 .2;sY^u;25'R0)_Gjմ"oH_;e G˷Ӥ;V#g,e5X.Ii[$Dz$RW`3D")pTH$EVZ؞ЭH$ZUTH#M4Rxs",%H0,@p΃zӂ^J.](kWN3L ãZU&FAevЌffYqҳYUh?]lEf bU )(x$=5434%C:mZJ8'׷u(1cpRzvcV{L>Ν.\ֈ"JO&.IY*}WCE  9Q0\`2}3\u\0"m,Fp*~F 6AA2(K,k5Ky{d Ȕid |>l@81N~>nBUJ,/_>T=ǣ:T~R3}p_ϏX[bM!/3ЧX%\rx`E~@q7Wf%3 x˩rg{E{@59E?J#9Ҭ象{NӨ:mN|‡+NEV$l>+Dd 8)HxIYDyeN2%u-9#nJ:Mʵ*Ёw<;16䙩b:(NG" K'Uk9PHX P'l~٣&¹ %6nbuzP;4g$m/GqF+`F1O`UOO;Y\8fL#O3_/_xו4RʿʕIYb#H]zǩ{8MPis||trXiӧZx[!i5onv\[M(q2BH~H!vĥF}ldk}_ aB*5{iM߮' ϣb7c79ҫusbDA%.,wfG %N;ҝd]t/}*d,C8Rp8Rs:RuP06t$5)3 fGpF8}@M7;Ax j`NC.wdo}mZ6E8 oߤph<8 *rT]-3p[?s }!5=^@fbA2 d&2sΎ|eHZ%MZ[lh=˙8RWS3G,El\.(L;+VdBzʘN3Tp\I Ɗq'j5룸!sTzםNAH:vw,6sȲ. SG7 N6BIZw!(4HZdDKc4rm)A/dRl8VmnߋXzr}aMHF(/LEҩt$y ]B"`4< m`AU B-C1pt(@l8j5;UZ< <SA0G[OW~>1] J-d-vMz]KlTʿ~%.5TPNelrUsj*T'K,kwQ߇.f;+HiyZB~iLk\7:-\ֈ"˾/.E0{ ‡^kru5$l|r^d~yKc۰mZ郘(kvۊU>il_nv$DTtYӗ3.?U^;j5ЕG^zu+jLJ#]TcD}^-C2F(o~,$]?k4؏ZItיxыX~QPdw |j7;mע8-joѯf6^P< i;Jna R8EH ҿgtaKVݏ~_jՓuޯzx -|L1m5t_OZK+phIl//R$'yp{!/3Q^Gƹ٩괶syqNs;wk$4xk7 q\CX̎1Æ+*gؑfb{tm(${׻7.߰Pp\X2,YBVSGp`~݂QrܻHmH2+Wp^=m:*`lRod\qLm/,l p p`!CUG,d<~ 3Zy"P9RCE(>sBF,`9Bi ']:M3ÓQ btnvj–/@ ߅@TnA8'n.AM,q+>?rW6}hy_p*h^,P.K;=xi9{s\eZbU-P{yG%Uf?WHcL@xhUTBm@ة6/·@6==1x9QvPveWPeW^Nu70@H6pDyKY ,tw F)-t$ý{ + v*C bt}8TEAA`AA A01j>'_5<Sau蜕nslʚj\+**HqOTPld F<@ A inĭ԰䠚  ~ %aj@h,P1!4,Td>8 BaGaxtCP0Ũ Fd66eE^s׊gMKΛ@xKP_Z>qWS+kd!s yE5_?*Nmc-,zmF& WFI}&)ic3ߓl\~W nx" b87ÒjJx1S3.!tK,f,^f G2pme)zfۓOol? A#"VsubUP0Dڜ9p76OVDm.IJ-`-AvM k+K\\e+&Iu=^z|}"ZLUwɨ`m.uֹi%9J;l"ڢ[Jwj/ ^r<̼E8/' 6`F/JE#l4F#l4F AA`=,# Ͱ!h.k. .\.p  +Wp`O6*6D* 1áBRa>χa, a>a1@ aQOy}9;h (a蝍U=BCl   Ur6r\sgl+!hA c%nL{:` Louw#<jbi=uo">8du,8uQ}mm֖<%}0yd7b `yhaKAB aȺ"֑>& pZ WPMkb8%CO 2 IÙ Unm1k9–O,דJ7/WR6$lwp{ t0aڭZ?pҟŠ dDBCjdEa鍬ddw޴'Ľ_VbJb KTo 5-jȨ٪u-۷/t.|=ܒM,y/ ֽ2Ֆ:$r/<0w? )"%QbH7q$Lb;syZ$w?}G~_CR<;rK@Z_ hn|pbרrMCHg/@X.KG'l*pQʵU⌻<7 C5f.1|UwmMl=xUbչA7HEr93h'G|V뎧;@VW?:D'x ͏F»g7{!'?)WS{"U1nfzժ(RƁKrÏ+',m[bKjľD?ݬKo(־RwJ{,ku=(u#U?(7|[iv|+IqZ2r(Lo Ŷc;2zkiqtd '%&IHDQ “t޽UڗC\ ZU[mwdcrAXmT1\-o{X_4n Lۑ#\t#7v~KUW+"]lѳWm]s׷%ᕪO:4H$q#M'zT3O}ޢ;xIp͂ttνH/vI^-ם Y eA=?&֮-tx6,+WH =coу~*Fccᵞ /mmg|6D*_Β#Mm=e>hAC .' fȲ!>7M[J!Ĺ^=`g /vfE_r.Ŝ>t [PT,"]*~6N&7JTݻ'4kwQ~/@R;إd**ě+:nJ^vX 5RGaPI< P`}ErQ]{qN+S3Y6r{I-1'wO|Gs38IlZrLĎ2W b7/RU弼帶sD{ 1 KNR乪ьa͟Og7cz.<9:Ԟ:;mfHB ĕ:r(9aS7Rn%|v j =}K#Hge~ѣžY•-~/}ņ"Z}eJ)4EE-Շ[3!~U-):Hv+36\1nf5E^gċ~EW\ _ԄYdÏ$i\zI'fﶕ-O<'3cĹ X/x,9_Wxp]_2) K4K\XO8M&<HMw+8)&4Qѧ)⛣2`Mbf+7ug(K,s=G(MSaMHf5fk0ZF@1;܄/Wah)K%#rp| ,: ͇ ˜cW ?L]`+0g*,ПP1H뷢gvj>HP?QD),m:`E!@ Sř '|:&/VU0y/5ɚ ۧcx/xgaS9@-&}F 47e=dn9c f1$ tbe 숅~λ]vc!Oy\NY?#,v%I\4] <~%R33w%&: S+.*7+o "sh܂͵9mۻF_m| Bh;%~!ڣdfU?fUr?Qao|պ11(I3sf4n+׍‚iq2Ro|FǐCݰWPZAw{H@l<,eZM\7xqN\`}A 9An Z|lյ/f*=ӀmHgd?˶I6mW5Ӱ(](lwQ£!JbG+ oՎ UrvN\-j#2Xl[>-/H:fF#Wj2jr: ERՏFW4&uVʏ_P-܇ɇߵl#$g#&䳴ݫfzZ-i|Pf~oxaˉFRΐf8قӱtO{;IPFzZG,hl=^R?HTtF?,?˗Gk"_b|W.LDi )V$;.WGB+HR<+g"G6ޑj}3}ߠlW{sb ³Z*$WǢ;!K.k]~*iA܅%$Gr8"D7ܰm*gz6q{Iu]]2)g4dxὮy(O-ښX- c@@X/HF"Qج{5D_„AXvբqsEO!]:a’/ Te굻7WDݛڞŞ Ӆc P hP @Nu?Ȳ 8W#'d{ ?NPXgAthbt֘SR'H0`'9ePK3c)=ӗLCO[v'GG$CRBmPSaE5 t* enqbe0kE7SVi8v#q N}y'ŭBay?CmdҟP_E}6שְ*KJ𬈂;Ҹ>? δzę*TU>J#p7ݹipl@2up]ٍ3uCMo3PU¤;Q=ByC͔=4&k!X,aY 7]H8N+v\C Ѝ@,m1\~F5T'6QN3PlT̉qO9vpjTMD˺\[I 5} [yvC|zc;.L\PC Uv0Q1ThQ5+;KcUv0vS|vr)gO{ Mr5ux\J^XR_Hq=&vvT3[).k`Q܃ H_O)DG'Ux$%[-\ʘu UQZa2,)]pkK8Aeե&[(CNoF_T[=7&ϺkjB 0W ` X`GQ FVsЏ~8n1 Zv<4_bItJWWdSC@c(s&z I%rmEYzmawU,ߨ#{8 ]W*G> q|lD<_(lx\g*>&&m݈!g#n@ 4߹2~>:iMzHIžȲUh&K,Gp,! UBhEɒJΝ#O G'˪/UV$5qCλ]vcrJ@lS[Go<0P)RhnRd~Q_ϫv8|NuBgE3! Wu(77.CȍLԵB*]=-5}/ |7[K p9,(wNŰ<*=G쏤Vllh=ͨ~){ބ%{Y ܊W5 ǣD)=I,HICcoWҊA2wJg=%6&lp)C}seڐ-Ll[} 9\5ǁ zT+`nZR@SwYW`+L$JZt49cK;+w_z?/ K49!Vݏ~_jՓuޯzxy]npF4K%slr|SV\Ծ$R>KPCp5Q{VBAk6{AVV.O<'sg|;§_//;_Wk+reR@Qq>?1‰8j-e>NbsQkaO3|s/rzv,΅~EfI\ aK|彤iTL,b75)9ҿ_AIҍ5o2p r kׂڏ8.]u`.wKOcp p`/½{o+ v*X;գ~cj{aD9l p p`!CzߨÄk J[>|UQ`Xl ybUAw>ϦM5ݰ΀qn—PoNw=' @iG /V,;snsLj|T>.W˵r5&(L"d#f0A4/Vj؁rv9`9` #< z@ᬟ8A=G=ĞxVzZX|<;5 |;fk; ד [~oêwY:SkPwMӿM݉7v]y:X mKnsA̗<%}0yd7b`Yvhǹv˝[VW/֙sǟi/'#XOVԀX7̷>RKzˍkVJֿL+換'&F՝{?JX&$=Sg P:!9IzP]^ ܋$+SNzW6F39B$I˂oܻ<z4)&DDEx_-)DN%m/qے.JWA?xn i1f4Zlb݊_}^Bo"wI +`޵\CS0@䷍6֝9H1:\16ly|[~FXsӸ\K|JW$kl[4³1 Tq7UfyOB(m葆ZL[s;;7nE&ۤu`Iq!/&LJ̶l̆SU qmkxϽ{VHucrkݼ&Oα[˙[H(q Dz;9K nX|xQ ~j@ߔ؏ۛkψ{l5iPY 6ycQ`yPL.rBߑh|tXeԎ}O4[ JhMr#Hfѳˡl5/gr#9x‘5 Rf_\U pYzOFdԬKoO;F;48ãG? F]irS(O yח"KV1Czqlb`+=幌Ixhi ;gҧJ Ҥmt;Ev=naƖ6z il^H%<ԥ4HR("#''?a& S>&E[d֤tڭP])ɺpXq _<~K}o2{_l40dDn1i'ۄ,wۊ(' ΓG̹;PU.vv+P8ڮʯ\%%.'D'w@8vr񹏓ܧicIOk7Gai N * *CAT>T1@.5Q`!_/VS3w B>| ilLZc 0# <'tпCsWwI pT UC1t8\LөCsEʼn5*ӷsubKS?Fپ o̱p5V*D)BXrov-0@ B0_yՊ "C22pߓ^(KZ#F⪜a ["F*g?%CGdM C^;ٚVT8U\!iL!Z‚sic$59!6@ RE\@~7KiiG 8'@,HPyiIXwx3h4C,Cż@ĘԄlBKNߑ6һ7*_O|U(# V9W<8;wB| yIMdjmuoP@*D=Rb/<:P-Ks)@PzZ7jZȖ!]fR"_,m# 8&Ո ^y>p m8&^ ?QcDh>)QT` WV9GIIhyRWmQѣU큪pYLLݜyz^-rrå$qڈ{T;:vMՎʇO"ZML {[o5{R7Rx& AGE#Ԯaί!@XP⭋SC7VՀ6xЊTP<[D3(>sJLTQBcط5VF;OT:&z0*K@a-wIedF.7iB4Tk7MWOuJ,(Ec ;V4 O$cx$xxkw#'Kz"zbʓϑׄ{eDݻwuwPwXޡn/w|mS|U` Qj P8Xn8Xp8X.oepLJ5jٙ/Sl>\>7m+ AF)ّL^BPIk(/Fb Ø>:=dTg#e}M!X n,NpcÍm˥}Fizika[~"W=9 z3#cW}suP5j( 5?XȕZ/> D%kki1Vq_>P-܇'ߵ1?:17H GL!<:^`? |o>5?|b*[IiI3l_|vj5E$;RE"zn {p@X"SH +3-˞{<=_Q=Iݳ͏>$:yXwꊩ#oVOW'&1VR벀N:A:.Ѝt\,X X 0aBuHɸ"R17y>((;%63BoPb`XqWS+k. cR75,` зByeϕ;Xg#@p/*v2un>Ɏ'] qxD1~xHTKiQ(,FfkIYLF򹬈,@&"eXт./4);M6KMKodVV6ѬnNh{ 5H6€0Olbd3@ fOF" FDcՑj#Ff"`y4i4/%-BD^yYhA(H?ê f"#5r7nj" g*pw]]* i `ED-P4++MyLj90"1E6NH!hB-BX*9jGIgQDJI,*@v2$D$n,@#-;HbIA ŐH8Q@"$y3mEt?%1w@(\蟐nj[|[@ HSQZ2YL=Ϛ/j=Xµ.K5ЁpC6Id0&C~13a$BG`i Z.0P`PZ  T"vB>vP`YS^)Q^JWqQXbz+#UFmUq:Oy78w ڟcKhKS=Ŭ /񌫒l%wOdn$F.UJ">uJ?qgl_cF3M*+ -Q:z2[xF@0&e Z3z=9\jT5U_8oѯ5s(Oӟ*7I ظuH6k,e#I/-2'=PAI:x@:L _BD2@SD='ekۖϟxQL{Wήߣ}OBDxSҘ{ugS*^dy[9FTչKqXrf}}ּh An^-S[\7m^R&'5WssRCb!ren? q\T>eʢ|ė}ķN?qRow}G!ki˴$=J Wxȟ@hbrT~UOrBɃTOsBoA^}rˋu5ä=lC"[mmsC-5E$,S ޢ@_cLOR/԰#UeTSynoM*rGUGה霵Qgjiu}.A=Eh*S\+.j_&?$(|W2+?2,aQO;a8mÂs'&NWE*.H/b{פn ۼ޽Qن-Bgς d9] ;/ޝ]t/-$ý jm:*`l:oodi; :!*0*XPL"J|3*sgsgT,s6áJTXACT(y1s:7ayb ƆbI@M7 7& r+xk>k# xg0|N>岢N(6󽸺 Ƕp0vٽ9.uX0_ hAKmҪ@7t؉n7' i e}1mPXV^h'mJpp]fK9.hN``QU] O60@sH6pDLY ,4'w F)-4'$ý{ +hN v*hNC bjp @ `(bZONi3y0~!,9+\.TcZV>.WU6U2h T EF`@[aA%C0@0>K@XbChYFC|pZZf6a؝Q"llt;ʊΚ7= |3 ɯzWB`3+yڽrܧ}L"&胍>h   @@`=,# !-k. .\.p  +Wp`O6*6D*0áBNza>χza, za>za1@ zaQNy}9; (a蝍=B?l   Ur6r\sgl+ݱ!hA ڻc%nLw:` ݱLnuw#j<jb=uo">8du,85Qmm]֖<%}0yd7b `yhaKAB aȺ"֑>& pZ WPMkb8%CO 2 IÙ Unm1k9–O,דJ7/WR6$lwp{ t0aڭZ?pҟŠ dDBCjdEa鍬ddw޴'Ľ_VbJb KTo 5-jȨ٪u-۷/t.|=ܒM,y/ ֽ2Ֆ:$r/<0w? )"%QbH7q$Lb;syZ$w?}G~_CR<;rK@Z_ hn|D-‘Ȭ|_\v ۗ>eN$Umᢒ >QEÂe⌻<9 CB5Gj|UW9RsW{dGa7LE93P~`4GQzժ\n# Ɖzz?y//[JDÏ+'t\KENEV?H M˱Tk_dVl\7:R鈈ģE}vSoEFs6Vz\wۊ껄Tݳ;{Wق:oGF-7x}{WveO5͎z+&y7|Ȧ? O>yWi_o@9pJԠe6n3nI~Vj7I6&K Fj{%&h{`#Gd,J.ł626ٮJVRKU_mTvݸaϞ~QkSnGO:`YJg6ccoIFU-ЩfV%mU>v:=DMz6?jfڃi[grPej b0i-2o4tF#doCNY8ܺ'Rؒ<ЏEbq!VϤxQSv*F0x5F\rpa_!hkFVmtYnjztPP8⶜hNƢcNj]˨>N:˒Cp&&k'qf:ɵ9üL@ :;mD/YU NhRbs- ҇nVwT cD"i\@ EpLВ/CVb_rt-SOf2'%~3Ub?21pKPNxm+=,O<'3wġ ]/.!_Wxp]_2) KK\XO Odap 3[}>MdH2Gf^39 @7ۂ:կW| Y4M5!|9Mo@ 3stIv\Cf"V#ԁ^PK=X |}%=|7@0|mJeBU@cT/ !݈yEymBuRMZ*YԬJ.TؾQ-ӚAčZUİ0c q @ڲ+'R.yp TTwc 7w@}P7 ^yT(@Ƥ;pΣ܈)._"zJN?z@?y|#z#:˪Xbd8v#q)CڿT*8b TqE#_eӉK߶F*=h QH'5vX'.͵P_A^#7 ܽy],S^ O 7220ad%]A%@мǼ:*nN+V2Y]]v1"09@-Ye PEcp6IL`!MI3O {Q%5izdZң{sy٪?:v'/1=;hC<;(<]߻ ^9] Z+'HmĊi]02. 9@7r1X h٥dA1Y(4*"+JꨂGtBklEيV` cn_l,{؀TM 8P|0$7s)o/?T5/JHiFF$;t5ê f"#rQ kH/T@܍|5Bǻͫ}dt#@dGLs)1F{:,Z}DZ(t୎Lɲ`:ctM_La1;X`i Zi.;LA JkIک֎@.`] 'tEX}(B'%X^!آgUB[u4ュ4j"5N?[.Nod%q h?ǖЖ`<^Y_Vn}Mdz3%gcC]yn=+b5Qu׃(?W~\G 9)KT\C YAj܃o IA7yiA=ȫ! 奞lM>iHvt/@X.M.{4RD5Ba|[L\+WՃڗ+h\qGxHd B^Z*#q]jͼf| :5}?!bݎ!xah3M]oL 5IÀ9ҳm^((`BqUbgZ YMs݂w F鮺[ЍgNՖ /]t/=-$ý jm:*`6VodDv0uB8Ta8TwϡB +u~3ƪf`ˇ܋BV3_TX9ĝY5!|9M5rT@ 3s3G?  \NkL՝XGdSap.]Xs\ٮ59ʵqJkZl@nj  , A=͍v 9Q l@  *fF {<-Ad°2#2DHaȊΚ7= GtCh G-4lܧ}ԩdx;o~ G5eeI}&)P8ʹO[WbI+^T<]' .z(Bf G2pme)zfۓOoizGbq-LVsfmM`p'+6UOͤ;`od%p `?Ж {S˛k+ +hhO(h2߶AcHSUn]2*g'J#F{F+-ܒoĬPS|)82MT򺂙Hgzno;hoQ +mih}h}33=Pp=^9ҍv0џ _ rQ !p^{ _ï _CPX2*$5|h555Ġ5 5ח؀ 1 `X5#⠞rP^, ks,5wƶ2*@ᬓƑ22AxPXh 09TEl@v<C+xp,h}=caz,ǮCݾCQiY4XL{!Ʈ[fũ&oo,a탡0[&C3$N@. #2Ðu}E#'5}0M@|@5-Jp"K=i#A*-e3fZzAr,aהҘHM\])(Ix;v8=~gJjuVG} b87Òj>@" L>혗XdуY̍mng/g{QՅcNf֟^$subUu愍\3@-@;$Vӝ~>1] J-`--AvMi{K)Ne+@ѽDK=R$gGҵ" 1}BoR~[;Q-E̒R0v(AmSQ^MX/. s]1?)һbZ%FtK*9OLj,vZ=w?}UOryi~j7:$enys!/_ EV@돧Vs'J#[|_\v ۗeN$Umᢒ >Q}r`8.8*Wo k|/̗L_f0}vg<7AF(RH2A\&טѢ뇡˫5UДF-sn,:\?%C.9fĹ_|F_zZߵ=D+3 TQ&r|1˶(NsK@+:1Ϗ{;%7|8+\mg̉!vrӸ\7nɶX˝\F+֩8r/5R/yR:lkf>shŧRÏ<% .vray9́Yr7 n.]i _ە_+.qa=I&7?^apbjL\dS$J#iQѧ)⛣#d>dx/V A'EB^ptzq @EF% Վ |}%=$E#.yp WC !(PhۻFm*rN3$.!NH]_k"[v$t].޶*19:dV"Ui#Wbݳq]$h -eu N^U%;NU^efUz<2|O2P /zǥGsJosDh;Յrʳ5WH(ݠ"7kv^`5Ge]@ ZƁ.j T_}Vw{+L+w@ydW#'d{>h mRz?W޴ġH%Ftpl˯~0Ԋ1%YTn[e}ڃ$[|b@ |dT(zk] j8tH:)Ks0 d)d6 4Ķ8@Pmx;x!q-VEi3DAҭ8s[@)! ; Å kRvAxS""xa!؅o +Lۋ6ʉ _hA9m-'bFvhAJtnKZ||m.SunZj,p\m}F$5,!Yd  A,XQصH!m=^Ui0#l7Q-w}%oIQ밐yQ#y#l+2u#qxGQ1Vܝm޸Si#0iaaJl4n;C@O"QymG>cx1-؂UpmRZwjGaQ? "P{# Y:@>X7zUZZ"٦E<&:65qMEEs|s3 0Hn:A}S)+ kPdCv׷(l7 Zs.PXN9,AhƆSQ⏩wZ3e&p+p<A܋ ʌăEH^\vX{aO>w}.d{!vqYV>*W咪OVq PkgXlr}}'y /ː(L:K+VwlZS@uD +9{@ -ɡ]P%fyʼ&ԑOJ (2,Da+âtl DH,"#'xXAraD<~ZC"&T(DZv;C VcFR$ i$U*J@1פ-0 a @ @&;?AXMKQ7 ).܊KFbtRx>GNwA=л{VmAdh=s]@zuy~$5"/,4ę=Ĩ=CMKLyXCg>0yVijv+er㓵?G+p5CJ4v.67SXG @aR`dCo#?(:vC7\z{@\^@ \-L3 4 i@ Pb J`s@U~gÀ][+G;޼1ޜH>=;Z]bz.6UxB/z% n+wBe|`l__:݁ôɮHo $VwtPw&9Eo9JhOrϞOCaE{v`skt~~4. `g|]# ݾ/3fGͅuVzY vmþDȣ $g^Fnk&zЂn4Ϛ܄f T]'Gh]6W6L~4*Ґ.&(JmzH_b\2s ,Lx8nWw-ntd-O[7,}շ+G?~; %ح`1z4D|̯y=Oϐzz<~+y7Opڬȉ_0HfSiʆp.ӅKi>nىH^mLJV;N6Y8&b`% HW9a>4ܞFotx@4^B4EP>,?*jXy{a(Ja6a0cjJjVp+e3%梠yٻ9C֑J}^KGʥLGZ:R:8t>#o~5^ w=wf|};F' O0#5ؓS8EΉ︈/͍mc6ryYg1fn3߉vS\(uhZjUٟ`5>=._~ocWdS:柄E8^2)7zLˇe7*_пE+kE+-R4aUlDsf ݌n#Ff>WW8R[T~7qs 㢖|S`g΂5XٜU`nAtWm;\] .׆`^a%ü *1VvUFw6 *#XG U0aPAC= 3NԈ  T'_&X%$ߕFM5[k>ϪU5\o΀1nTa Ɓl 5I+ psj`yG.we}Z\h9@: bc2^ `,.(QpM^hArw=;+#=@^_B96 J| 9k 9Je0QG2v]?:wSxKAN4`A |HoQ %I#EvEϐ%DʨӼQRt&5[UIjzty2QASJeWk1G~+(KEMHj;pcJ[ORE԰C!k_,@#P[Cq\ B-oNקM!lֽ kfT>D Ky,z`=rP*!#9Aߚ|1ptڳ$̺1Kϔ6ODؕQ$\j- CՐ/|=_D")ÐӪU}m Hn;7b4*#MP/ǽY-;mprg;ݟ? ym)~zѱ8BphPF\)TJ_הba_Bi$"c59ޖh}7ћ-J09OSJ4mbyċdo~n\>>m]6ienvJHOr(3#.őlHgF Lzr릯n}ZǸjy_hx* Byr¾? ˒.MθZԌcX_~~ʚз ,Ճ1+rڍOb//nWn7߮rZ𖋣 d4qɟ.|0_vJ78̎|:dfH Wfp <Hп_D"b%8&3vxŅ'&]9jr%t|>‘Xݛɽ`ŋ㢖:kւ[k[K9 J鮚\=.kKg0a^A_y py( z*h;{Q>KIʎ`Pa à{U!>Ԉ+r ?R'_@/X(H*ײY'f br7QP8}cN2*yu! @ gt`_%c2+(yIxhS*'9 Jl F"Dn )7؁r, oq#ܾc+ A X pOoT@oqOO j0`5Q -s6x[L+?']=x g,#if|7Z i$H$Ȇߖ-~߸e:2$S蔽>@ ?::Rgce`7K%&kGwb4!D1'.`Ӧݝ &I:d*b0p Qթݬ7ϛɋ7,{L%o{R cŪ}}m*ЭlD ~4{A__v5?4춶=4c̰ f\LrsNҦҦzwl <[Cޑ|StU;Nt3 2Q+$TA2 (+?ɰCpGT'C+k5YR88:`V*lrVqtKUXd!ӿs..>^kub TK/P+Z//ś볢0PJc,)zzǙC6ܳN7dLNfngƧ l#ŤQeEqPQ)HM6٣}z~aM<9Ǐ-WA[^Dؕ>mhʌ^70X4ӕjP=5 V>%Qɥ$74_U*1b|H_ղ c^S|* F3Ees5[h7{g5ciu^ȯX|+71),fKFH"_>Ilk=HH\>7b'8& /SGƱ(Ϙ0lMf:'%-x^\xX=s"'W1$}\J_IW\, o8@3M\gJבOv/;K.-:u|;pZȶe>.z<8y RN>RN+`Ai|ubra@1Pag3Nx3u>|)@;ơ v&P bK]㐑Zg_I݋SGz@y#f<(l+T5A/[ wp&bX_7}`Y$Z{B!/wˆb(zk8nLoB#N:͗3w{};[=]\$$c#)Uzwq\C2W7KDzR6fF}K~#s@/4-c=Dc) eOd]:ˆ3%1A![oeԛ7ONk:8@PZ%Eɪ -8- Iӵh4 6=F )U>7q`ʫgޛPH$=]ı|7^DiPnSWP(`yg=,}bPy C3;Ճҟܕ]quɵ Ueu6M62SU)؜x$>UM.dtV#{ y=ODkzq]/lOo̮$yNEnUo(X:kek v6z^`M⍈MvO#Ar>D!ov,g.۽*6v51Qma{ji)ΤMXws2ysK {{._..Kg]+\Zg6@t46z*7Ž tvyia.F6 gr\NЇAlpfX̸j!A/CA)!1%}DZAQ0I>ɇr%N-x_ V*ʅ)y/$_h^\Dx(@a}FTei`ǀ"c`Ǫ`acdǦ (A,N}nCT=YN໒Հ{C qfT%e6|Y'}j\^]ԠHNC_^ߩQ6R(@-NK<jh6K4I͢*p64Κ!.kƉzH`c 2\gy:zMo#2 b<<!0q,sߎ9j37ڠ_S>i*)hktv-_67#sTܤneѣ{zneJG).'=Dct(i2^L}-8kTn}oC#ḣ4R3vS[;o5owL94Zog\Te G;QO(åf¼rwihdKNvzT#~2b k z +Q?՞"+*w"KlQ`;;*p Q](fqh?'І`zNIrũE[6$":͎OqRh'ّѝzu(1GimW=:DO>,ؽTeصǩzU}GӼN_~ &3,ҁ˔qƐ3i%̄.SYٳTpđezc:'ؘz(v<4,h_8$^]{(tlHs!=Otulӛ'u U)3kLY 8{q%L0N7{Q'm ͉MkQ Pj8faɘm^Ez#trO\|%bMca$zTZD!1OOC.{.#w+Zrȵ(NP=@|txߋ&=x^.yEzvuԾnOau{ rԍ"y'82 {MpP6yN+3vaQH!k+R6֠j(GrR ƳuRf:Bґr(3+țqM slvqT\ҡnm8V&w(8.jYËv,YY F[PJw|)^[Z>y "+W ̫|XUU;`WAc&FdH 0 *hgP!߉q*5bFH |A5`Y&,蒬AxɩYgvq  @74M/G~=gL`I0S@f'* aDIkL+3 J3\Ӆ/Rq U@r9|Q(@  "fF}<cV]auV]NaەA $@ $0H@f, ,2Hˁ2EP$Ig<"'l-$&$`%üy +( z*(% aP!4E]EEE EPﴼJpf VP(xB A@0e7;FD`R*zzxB1J5ahNjP.)?']=x g,#i&tvxv;z;;FHԎۢkL}emXLvOO"W`ƹQzЏy6ͅR76_`AQZ㌵d.3 0ɹ=59/wuY5A_͈: CzcqWU3.YvZpﲡ|c=2c|JS~:49kҭ9kd 6SrںwWP}J1mt~{uϕ~wy[z2z+y7CÜ$^،ɛ_@)I^όY/ (W G6ؒDž~ ]zÜ{Of|/g=#z*k-#_#~r$F͠ңѸٯ ;U]z3ܾkLJxƸ6Yop<&'vjAD< m3^Zq[ś[ G$ ƪ?iw\@z@If9҅Bbxy e$#)R$R]+Kf&bE0GZLˇj_$Sg`l :C1.@~  pjbtA3q #ffFAI/C ~RuM|yJ,} ȍq O@vL~Ux 2 J#, 2{17ow+Z^Qěz3kQ?AnأdJ&q;Fok88`ߎx*jLF9(?+}KQ<2S.(/p~`8 }r[8AW7?pEwyJ~`~4/>?30ē#(0x F(VU{2&@}5@ @𻧾n Bp] .e`eRKe 9q'">$"Lvd"ɮ` 7BH*y`609C|y#2)Sgl݇zx<:Abje Xzd˟SQbH5&_} n[M(&#$eԍhasV(2Oz _Z{mVyRKEj`d 3\IJ2Lt-Ik\ }pp<牫wR-UgiRgH~~:Eµj9؜5i+!>`Τ@0[Gݝ"/_WAЄk,=QЉ9Tp9v , ,EXWvv;?e|q(B6{A+"v^$z)Hfld=NGm(Ō&{?;i nằ{'gAD!zrD1~vcH}9;>C/25?ozז=F~()!t*jc2%UR{鼻aSCn^B$B3euU&V7hV}-0k|۲z8 Qz-2 , _\qGOwmRZg˯H1OQ,6b'vm̴ |̾XNmǿPR*RnWŽ> ( )qJ9GEA֚|xe7'lĹgt\:ʆkH8A^aƻ.71_]j%7Lt(>SIhcn}鐈juj%S\(  KmUf3@,7#4%ǿ).r.CqZVM^橫VI ԏo1i!skth^@8Q8T>!އD&Hzi@G2ٯhpp^_<]0 ]< w15IBl$+u MNJ1,J@ҟqДI1*<ܧ A$Il_i{#x-s% j@0j;j\X‚uu35 QPvJ%w9OI9O(RS P@C*aRX Gk}_xuO>15SLJk.*$\Z tV"C.Ʒ<8['~4y3臎ᝈ9^\x^Hwgj2,9UXv/kVۺuzkW4_洵 {ADf`ף""M xnJI o0%7/H3`C R]Ţ;e{)uw?~O2^$\mae=zw4w1?BMթ,"Vg` X:p% 6>u:` A  LjsJxg.\X \n3yLt(@Z7Ec~3ϑ=o&gȾq= h{P{j(*?P ʱWIoC.Ϡ<|J"(eʣ- _8q'"z",zB6hS*b 0ӊ9 H @0  `38Ҕ;Ҕ"MΧ))-#Miu\gEoXr-vUKJ#WYJ/n>XU%t?_&i브q$y+ݜ\~XlOMڠ]/Md$9Mk e[AUJܣ "~;=6&mD0?&yFVo|zTb*\TTtW7lR]a_5 4GzP!wvH8+NA_yݫѣQlO=I*yeijcKe'G3t[~PVPpEʒ7`ժzr_gRCnlOvM76FLܕ;Nk(L_OggGӟgS<}fJx9ǠGKf-@ghף'3rhV+AYk-7  ̚\~Wpc$d7.C\6gmxE:yYn[?O|x'A?/.G# KV& 51giV AtƄc>.#!(WH >H `YnBP Ag,bt%G`(bĖ](?n˾ȈW_n>r 2h_A"zl zŮ-ES}ꡋ `?BjpAN ~jgh|WAn8} 7HfgGݳz9[W3/ES(L;KěeUB:p)-Jwpr.@B=ENSNtOž? ˒2C/W6R$,Xv_)HU k?\gA"$vfoZb焏TL6;nHŽQ'gYRjE*eyl2JH53W.A(QMlWOSJïFl ;gsQЏ<ˇ3֑J}^KGʥLGZ:R:8t>#o~5yz9{Gp8R BZ(OHKK+'nc9c`0x?|d06ا&,f cWO"% oQ8EJĸbi-Xx2m'3etw3dx)CvEd8]}PYZ.mzBWtxߋX;ApPNK|M• x.1q)4Ae:Ae,39y?< gEDZ8MLgEӫ/7?ge9 { X[2 rd':~_ۅf+='-0N  |SHgu Bh&JD, X> Iz (,6{K=-CM7A=U o]5i8UuJ0H~}p%3yKhP0v>(,(>(1( FƠ4}An[`+%v!T.T ea )'=g1<]P:YQaxʍ*v :$rJDt@oC7@rB9 X50E(ܓg<3ݑ4z:;<;T=#`}$H$U[ KD?ēbX#UqPe^lS(_W:sӟ:@۵n B^^hq2ƽ~e?G=׼b]8NVG 4$APAP`APAPx1|2HZ$!`y?`)Ǻ&<>87o<%J",}e$ Ip3I{Y-R!Q ;m=!4DG*b 86cUw2;wAxPHgsNJcyQ_N;̇0?a {=OK%ǧ'j8g</FlhtXf bMREqH2?iڊ35݌?쮹f(8φ}?Gݛ8~% ? křr,r K&!4!Qɼ&#q& ~~rU5a6'V%^RƹkP?𗡊s!}/7mtM{)#)w}P#Js\[$~4X+G##I_3mWPMږ,!ұN]uϣgk\zĐup'TGK˟dߥ_J{SNdWV&^\[e5L̓ʔ4>n!&1ުҞ@(Uht-&hD.= {Cýd#ЂcG'u}T N^y]̕#]bPj4e&-/³{ K=-5g%dG%cƳLoK,9ɗF_?1jffBFZ:qj84_8VGagA^ `aTB @h _ v ,4KʤGUr,nkLR@i;;͍4J "5?ź](fqh?'І`zcmXqYJ+p/9@MDŽ|We@nIGZ,m Zq3LgR>OmW+ۘI0SV TX +;12n?svz8HɮrJz0«" WޣLүq9siTljFgsQЏ<ˑ3֑J\&}^KGʥLGZ:R:8t>#o~5+ճ {G QqcvK^5iH:Uu!"LOrT/Lva\싖"d߸kfjFɋsHˈՑl֎ #mn֊z0>}ENխcITEn76URBKc-Gi?"]~$aC&\qfv̑j(϶2x٫^3y a;fo8:s"M63vx\6& j^c-J+p6>nI(V&yk:[e0Z`kek)V6\P?`rA)U=udLTm ~ץ{mi V2+0`^.0eUaWA]mtg=ڲS$QG U0aPAC= iNԈr ?R'_?r,Kb]I^eVdgAd >ONU'# 4nr >i;ݶVJ83+ N:K%IB9>¤P F"D] )7؁rv9`9` =7;FQ( gF}VcKwޱe{ҕ3 |;fc͍'Ao'A6 k AGT#Q;k lO"W`l~̳i.7_`AQZ㌵d.3 0%@L*"uqRH?bzb؇G0M@a A5-J"K}|#1&"ZbH?ɎzmNic[거e4&Z3O<(̓ !ٜ*=O/=SsܴHs%j{{,dQ8ݣqA}dtW¤˦\l ު8R9a7p@ в,ܢHG1tJ4ػω!Ⱦ^x[qVѣ{ "ֵUjǮеD}L{كhk/D&Xz 0z096[g+taQE<1;Hbvi4Tl)=#6$0*f{^\<>/yQyy+gGM]* 3u!Kh% vW3!4'8 }%TfcAN4ctms_5FJ1>OTp6qsy$KkPn;xAؑi"s\1X>B)~'1PDTDk?R{iyz/{|[uQ4J-pT(fD͕͜ޒ]` {D<nژ{DMx^H ZoZB_J˕9)[ݗԃ&qc,L  ^_P6y_{}FwI1~kF\-TJr寏n}7r o&o7`MPMwt4Hp߬?k}A&9\<;ByTJ̬ R #W:P}yusͬhؿړp(^574w5MO|^Jbva)bܞ #6qrO./F c0zlע{<(Ȏl\5JS5cgΤG*LzlkBbRX Q㵈׾LgwL ғXr]GR=h[:V§_oD PUgrδ1E .l{Kk*3@Ɣg~uJ*zM%E$&0iat0\kdXZ\^u60y^7}_~eNXL7GB}^h}a`}xOrzuS}o߮tZ𖋣 dSk%&"+Y~$#Pɉ9oDdN=3\xm[٫^3y8rL6 >~Q|Pbvo (FJP4-N9CX<֟bJ6  g v#}1_X_b[u )D=sЏB e_i0\fJ[a嬚٥e@x3P.>cI)xu^2[`ӄ/3V഍ hP# enW܆]Ѫ#,Y[jlJϜ &\/]E8,iά!fo[76fH^5ƍ^5)C>o2x NGsDs]Y@mFx*hFx<ÕᢘyF@7н#Mzy׏E|ِ 'KY ͨItCQ4>\z&)0oHS^/AZB6 з 3LuCʾdy^IkR%9^XO,Dկ;}W{>si͡1W[N).x~H~`c@m0mVw5(LDOһ"ezJ<3y+;2j (  l `dK/0l`c7GYmGKcvY2:(I"TOjo4nEMF[|C%c&%;S XH?,@ ͊*?q>OyZ*QO#Q )mpnP/1g=vDVOWmw#-]9rz$J͖?sHoQO}~6wai35݌9d47" x2 oV',Z$+:0Ikr{ki?[Op5#awd\TBk2rZ|-MЌԹRcHgu~Ԉre\|}(h-fJj S? Ki0 I{]Rc'!bdAطNiT:FNjfz̔/a={jB]՚F/Rجp2ɠ8tL4?ug5mJ9)ܻ $p7{yֿͩ,ȟyS4 <` ݳf+N = X bVsP~64KQU1G{W|al6Knq$0ϡ +[ /0'7aN|/H}mĀ6YmRmC M&@ h"f R lbJo@p› aG!FP`d~qrǺDL7Bybgnk<3/ߜjEJ;;Aއ JX,mIin'W"KK$p|Gyl|'.'@x(7oc usBX6^27+QviXdc& PA19 bYG$Ց֢vIɒa&J^:1u8c2]ϤL-ũc75h|=/~K{Y[x%s9?(tŞ6qH1?g^׈Yo@Mt d\&0"LqBo}OJ'k~AU,5'lːuZ;65| w{~^s;:D~[;pXP.)x{t|IAmi٪d"p~ LagsRH+̦A6m&%L7;Fk&% tJF^7艼td !EٖȻ\ٚXb,7\uM^{I \[KR\v@LH^BPɮ$)=є9?+ׇzܲ[pOˬΚP|e/=Jms$ʎ @+1*P=~6ӊC֑J}^KGʥLGZ:R:8t>#o~5+z){G/N0ᄍ)I:O[+{Idzݤk $հHqm;opCmڸjuh&xףvיqI$]% "s*y=x%fis Bp|2Z>ƾQR.!,CIyAU179'E+T OoW}-/򏅷\] sp˦K!.|0_vJ7όDȸeN{2m'٫^3yaN;Fopur"}83vxŏ.&m,G mDL*ԆǭZnMX+^P; v쬹,Xs -(=Rwѽ6| +EW0Ww6A>o`G U0aPAC= PNԈ%$  ?R'_&X"ߕFY%YSUH19p ě{K@WP s "ac]&^R-(,ԷL|.߁*L|eiJo;^҈PÐPeG”L>aj@3Ph⇀*ZNpZ2X x 5{Ϳ&@L9l Gʖ8ʱN!f h@)O{<~\ $_̘@Ș|`9<3'3VH~kh'ot: mJ6Ab!?sHoQ7O}~6wIU35݌9D&eO}hlˈ5pdW4@˻>3q7s r`ktIϰUu,&3zT(JviSڡ[=QjUg=G")+}c'UcK7tupC_gf{ɜdNI̷-FjGe>z+<:,kt^q@ 1HDCaƗӄU+Gz+?V W8R[UnMtE-u΂;k;Kq܂s J鮚[.kKg0a^A_y py z*h;{І}qdڑs *,aTwϠ"baއq!ቮ# |C `ə&m>BVdgAd 'f19Uب$`(b!^ItqE0ya.]X sr Dr\8,([MZ ɚiBS E(z#"!q U@r9;*C9q%P: 4= Dr 5h$C_T@qXX l0`6P`0:qmH>vq@ j)(@UH?`&qQPFw?~o2›X^-,n[q_3: O-mBgW\¡'weZT^@==xS<'k4#~g2z')z3A>&km:_||o3< j[5V E4'lf́m"끹B۫ |nq a6 a6*@?GFT@uTX>8.}bX(.`k.P &L.(0P ++W0`^A@1lU;`WaD1l,aT0P |5|P `XP |P bP  @|ˋAAl@ g@,l8'rVC\q#ܾcJ Ao,8K/]I+屓/ \:<>/ybkZe^aƻ.wɊdvW3!?=8*OG>0]|hTvJ[_:6֯t# S%_n*z'r4f<޻5to&Rّמ{ީwz[chNgWWbyMdgf#R̥cdB~^Ev# Qs/{w_uRN،lhIRZ @e94x[wʮS=ȎԂ2;mm⛡_$JG.7 ̋_gc͈ÕאZ{=m!|-2]zS7qzŗD%L_Ms7y3ӷujeW崒EG"d.sb4aIV'3k:jgP/ؕ 9#8_bw{]zOڣN] /仏.R,Sd C]5s'V㽬łWvg?c0B^j"~Pwxy,a<2qՒ+./Fl7[c^趦Ue{إzuO1=nk;5#Э1GFN:Ld(Z\>}7G_~G{Ҙ~IE|loAxX=s"I`/$pf_9 '+pZ𖋣 do%@L_G> wX< #`AE|Pdxh EP>,8d@I/C"Z[X ?# 3&n|q|> ̒PGKN0^$N,li )D=x WI.sU,(_Pl>~r(}*؇|C N*€TM"jבw}D} ZgQpDDeY_tdbJ4/D̈ɝyݤ_0wOG MC6sMHD㮫Aє; qQʂ&h`yayG"aOMh  |Fg^I$Z=I !@08|#JA X _dtc=֬iyYnX Sgx8iڞ!""  Z, dˢwYDP"`Y^h0~&>q%:uq#cK>7dJ/m9 m, @0*05{`A `8E-0@ )X8>P d)"2H.!- ϶QOL  ePBوø)J0@ 8y:Aĥk oI¾CFO GNG.f DeCNE`b) &*$ .hA҅TXS ),Mi8{! ®Gx C [h![u@_OggGӟg[O2h1i}RJ}+]soM_:2݉ʛRYvUw.9n}Y'5,8Yd Pc)0#E|)lSO) ;RzPfVZd/}g  )Y iHuDzwYGa DD@ {:`uCk?ϸςDd9JT{c~+X_8J᠇$pFv0U ^F Y N$8]qyuMeso9 ;>(!T.T 9 \7*H! [Rq{Ԥ>;qI3{,q3ds-"ACX6D!"@qDBDX?~'H@ pdOXƘXQSٝ=se&D)]3>$2BI6;$bI[CbP?! t"݂Ji}[5V:)>υec*]tftԽG:q|]# ݾ/٨h4^\XV%<{w]=(o~^춦{je-FMmNșxrDX+k i xWU!](DWMZN!]{FR&QTn%'S.ǰ„7o vuFG2O[óOճiJ~U\9Ri(nuWVDBTI>;vgɍ4O6ha~xRd0y/M@:2 +i KSotx@4^ZҞ&)ʇ%_W5SS"o/lVO(B" F{,}HH{zMl^\#O!{w"NjIՑJ}^KGʥLGZ:R:8t>#o~5^aΞAW>ʅ~}ъUh,V|vsgJiKcZfb%t?{QV7K@xX=s"!1$ }ŐJ-\q,0M\gtupiP pf6E8,abf>z+kc8q6tmDדaƗxiӄU-gO9[b'v3%I\a\Hm;}\OD +a., (ZV9; vvbesS]us)^Z>y "+W ̫|XUU;`WAfpLu_EwH 0 *hgP!55߉qC3 KT 3{}H ֲfkUYfݓߞf #ƍ*lZ)01|gqLb_AM78 ̅+P{<͏u+xK>B*e@gF>#`pYFu*ə߶=]p?rTqRgK cwnf٧FB~ $ = @0*hLݝo"rf6#-F&}뻶)9V\ 'bQGE bBEIu/Z#X`+'`@sͧ9Jevs}@l"1JDTkH0Li(R sazd|lGC G(q# 1LuߩϮjEhE1 bİg^(H&eP>p[++ jLW/ bN#]& 'Lay< H8 £/=z}WPA<@kvRNv>UCtēT85lP Ј@-ZCג]< $DxWHatݻݜ^O aHEj@Π'?dh9HO髾~ HoU5W?w$O 8LeLr-WLuWv(w.=Z =Y V* bE`_|gvJS ,D~LD?{60m󮐖 Ů# _Ff|r6ܯikٖ&Ǟ2K+-aZ IlGzp(WZ/ԍt lČh\53[Ãmg-2迧'?e Aw@YmtGzHR8 Quɤv-uqkc7 ^hy/v(Lroyyz QS%Kq] ^8U.1|Obb.oI2g_vraԾj+HK#{=dRxOKDV(L7L@ `Dh|=(h(,P~AT@@*RlI"p6 ײy @xZk3R&ݑa<9mkI26EڨИeB+lPO liPǟb.ny8w ٟgC}ц-`t ?]rX )G#Q#y-)g:BW֑7?cyo֞MؙoI^K5e(ea|* }7}ۉp%S.ՌWn1l琭QM_v$%^ݬ}a`}aDNj2 op+}5c-G\i?>,|0Q_vJ71|dfHWf@e!#_x"O|w"\V_z;OVŮfM595"V:>`\Hm^}Z MAEqQj`k֚Rl7+0~R&KE+dWa^\`^;ʪ® e5{Ts8zRD#*TX0!AUE25beH` Q'|HD,9+)K'f br7QP8}cN.yu! @ gt`y.sy0K(yqZ `YRž߹-.ۭd};~uy@[̨tS\+peH8ˁ(dp-pO}?O`'8`YcyW¥wi}u>y~ \xW_^:hx-Q5Ńأ > 9ӗI DPC.u gg(gTINf}`QVe`'i3Gf<oduvxc~!$A;FhAU8)_236'3ac8(A`gb> VoޚtesXԁo7;ZqxkzmR0%uO^x戟!ުRv{F9:h5hA"Q@ZnRw{ р>h@ Hr&1k)UV2jqLt>J08?գԭJk"-#yS;&8=R $P6,a6,f:iI0K6,[܀izxDxVHCNpP5#` hY#GңD{ qZOm@^>I7EY˜(@ˠ- H}oQS7µ  ,*0U,;q#m,]S.'V[I6L Sh{R"u'@\ c`+Y,')70w`c]<. >6/ffpFvR[{ 2Sg4akj/L{ܧk ;>(!T.T &C 8T8y9Ö)s޳8 6 R ̵h;xG`wAB%8o -[b-8>$,acLԘQSٝ=seB)]3.2\*6ۥU^[obQ_(  `~ 2I(AĪ$!${5pHr Y]@vY&|=~Vj́DV6H |H&m#J)Rd W D4Mim#e*Rv u'旯`_45tRnEv۬_Ҩf\ &vN' NXV~,0 2@w}o ՞"+8;~p:XX.Fv~47/B>! t"݂Ji}*l_oX$otX "z _j=?9I qʴc>\Ї#;.'vtrr6\\ؓ7%<ЅgA(ص!a~[=5t}&6S`tLē#z6,͕=3qA@𮾫HCf*B!>>>PommD? ĸ_Y-ZH5iKs[GJ_ŕ#{Vw0pjߟjmO$Nc~v:Oϐzz<|x= VICZBqBs| 0ׇ 3^NFhVz?zqpjg`) _1t|e<VC:Y= bzQqWP=rhV+ayxWUꔯ ۭGՓ"cFBڃk*V/~6ȓ|=lt\:t>#LG:g\.+maOrP/ \|!أ ?ojZ Lcfc-{㹹nրz0>}ENKcI,EYr7%7-ەZ bi-Xx2ua'et"o9kRČ^}" /ziy {Q.?7?{c˖~I;^iIV(lJhG/ %Dj!X;b2t%LҴdW(v-M22僗#|n>z^<%gǞ2+jяJy-w3OHIy{k曊܀ޱ\]DrGw§e!\SALAZ*ӔL2"ŀ oFd! 7yP9 hKtI6k(&ZudӏEoTFo# .}Q&bǠwQA#J\`k7L.\PJar7V2+W0`^>߰w>X0`PaY7 *Ġ7k777Ġ7 w\mpf" B؅`gOʅJP5%-trB3|ӅAfAq吀8PDĆ`9` x{XT^( `R|zzxZxZ>VVtZ9e{ҕ3 |;fWU^ R~; !TAsm]S~椷&D$+='U 1Ϧg8_`AQZQMs3]uUW\u>o8/w@|5A_͈: Of;UUkwc݁-K V]" ^fr2LySZGڬ~4}62m% !TzyyspUqcCDdPt~迊k=_w_iPw뾌$߿ w :0pY tKcW(DID\犧d ݓ)-P#BF3Ƚ{AzQJ'JΫ[P2P+d Ъտ&f0H^x({-Ot4QfT'Y'"v[]{=ݞ'GZ/dwaZg.rZs3LaZWu9N7G xp5GpDaτԣ8.p `,2@A6<(#zJTQ oi. B)iP [`3N꺉qeV!au|8[VMdH' EN` +7 D ^s4#  i*(%P(I#4Kvd"ɮ(0@!DjCvPrXyZ*Qr 4 .[r:9^tw y2Gy2ҕl\riig $rt]Wgsq͙nџ}va\ J̾m\ʘ^#=VJ"DK bRZ d2/6/5dd2OONK$j7Wוtyғgbro})g\hx, Um@A'YW{,q0%Z'j1,S׮RJiZ?Ax/ץ^G!{,0d Ie:b'wހTzcF+8V zyA}H ުҞ@f$jK4 S@þTYp# oI 9|-8ʺmtR_aJ^졕q\im<Х/4M+[_g -{Z k0Jb%Jƌgp``Xރ#Ls#~bN1qN1qċeW|[P+]*y4FQ ` x#BճS$| ؁+`]b_hn_ZTG^vJDڻω&!ؾsK~bY$^rИD C2tڋzbl{y& '׫ڕmIZ{ɉx)}34 +; ? K9nA}ddW2<z MUc+aQ}&׸İ R6D^(GH"ΝgH%t>#Q#y-)g:BW֑7?㚀+THSoҷ* % | _'KHL1j/?ԭby۫o<O_S;xQ;tlv bi-Xx29b'*eڂH,3dN3_g'o,q^}"`Xr֬J "; $kO|rj=c &q# @ ooLԿnp@ 7W&B0o% B)7e8Y -CN)Z̜[P%ȃʫ}Z\h9[i x@,,Bz-m\<ԺY';Pӏ3SǶabxRc/1Pqv} I>NC=vK'pjHv$XLN*_9ZLPPyl" 1 ,nf| *2P)n<"g(l-J2&J2`%üy +( z*(ɀ% 2Bl J2>ϻJ2, J2>J21@ J2fjy1;Mw$ɾw"[( ȝEWiK4ʅJP$6&q+ʞ3.49 b=N3!!4؁r, oq#ܾc+ A X pCoa~b/ o'A6hg\LE -i?M讄IMC.zRyTbc^t釡H|-V2 kT{mZa=~6^Q("sD^L6;`ͭd(>&]ؑz'ON]#[Jϓ<49LٞW)W3ϣ|^ty}^JǙ>/S״ʼŒw][n fC|{w+p>}7ރM,]|hTvJ[_:6֯t# S%_n*z'r2f^HloúB)~'N9_ ,,ͪt"vOZy޼&v\wv_^i Yxsz;)Mn!8XJťw]׏P=Ȏķ0oXtJO7dJzPbV*)1+E&~i=EG|m)pK+3–^rHsmq_$Jf^S oOLѴԜ˄nvN2B%w XN?FsHϨSqRORUfO7Vܧȩw?z(}f_Qox>ZoXZ?rqta&.sX$a5\yyfԈwH;H/Ff>zB>g`A5 T|Tb]T>*3uP |YY$ge&pSEtϣJx‰>#Q $Wv:"$N',Bg:8'$m-ow='+ыҫɬ~_E)~QG,詻qƘu y,pH%6`|GlSҸ35$ٗᤞg:#~Pǟ(v-M~2c_s/qd4/GݍqSV${N3Qĝ{$Cٙ'zg?"K3zQ{KvGLۑcS`۩o؇T鉸jtrz="G݂hMkJIJ . 5qrP 3ҎXݘE3pU#0GmZLnMPf; 0pԮw#n,<{ZbOf? 6?F lx'_9ߪտu2) P@!Zx«uvVD:cU0rDpA͆/zpS :~B ,3y rl5r#{嬷KR\˟3W̄Zĝ3O*SJ2{C*l8 ]cCJ`C\A96( v\!, ׊z2??! !%@ >|8.C` !!rl@ P 8N˸  ~?lHl6`P`CN2 6r6Ё@΀ (J!`C'uw6r6Ё@΀ (J!`C'uw6 l6`P`CN2 ~?l1@l96( e1 ~?lg!rl@ P 8N˸`C` !!t@ P8N˸i@x5F8VTA2z shɉ3yCvm.DzYt/XOh;CG*b( i h @fG YlG՞"+3H?xu,,EXXWvv;?e "?z](fqh?'І`z[5V:I<xV үNUK|{ d@Q%{/ruK9vdDѣ>ׁ+=[߶nNyMh?~4nVY+SH8Q?VJ0Gh{u;{G҃pNϼ{2CGZy޼6o/5Ϣ=2\q摇. s:ttH?'MHXSvCyqNDKyxtᯊ  ;5 FW0֛Nl^3ɣJy}^ʥ2W:8<>/y. *3LrU{}~H gRc֗ބUNȩ|̯cw3o^|* qK,d~%~}w_h Su+!(#LY^GV7ExX=s"1$񢔨}EJJ#l/򏅷\] sX KzYG> wؤ/;׊~}(s:=|; sm\ZL:S|XQ鎙Da|Hk%3vx41&m}_OggGӟg<[b'vJVz(P>‘.^Xٛ߭mŋ㢖`g΂5XT`nAw/kCg0a^A_y py z*h;쑓.qL$pG X0`PB Ty*5w( τ'l+,* 3rH"; $k|rj=)^ &q G1|gqLԿnp@ 7W&$xźĺM{hZKhW"K+*atݻ@ؔ~VjRz~M ~pw ~`ygY)x^ rO.;(  ,ߒ+Ζ)~HWs: oz0*f?ΔW˩NRFzbv"ٕʐ5{TO#;vBێJBE[:.W jrP=(?+-Ձ{RK=-aXcB?|)hX3w`hb" BE񪐟كJ7#=8ib;`Ky߀)mVf[ݠGmi%Q n `XJ;yl:m4w^)ڏҏDnN[n?n5J]kȬu)T,P,K[f1p9BDe`ߢE;`=ynY+䝎tL]Xw{}gnΨ(qj<8"lZ>Meb<3:uTȂcB], b}%ܽ~N9HEDa)9xahq%pGp0Xp0-_E*p,®]EXc9-`aFDbFaqC7_XSD.-E u%}ǽ ׎Bz T?)I.HG>Rx<\X1^F `al\zیbf˟'_DSH瞘 kLҏB_CߗYa>݌^+BlRiyػK\ YETDq `QZvO-zUXq;T -, 0rUr`f0)H:,A"hZ",owEr1dۡh)Eg};-Vk4YЋdW*kmDk5Q`0GrT]zqROo" =R6L^@sqPٞW)W3ϣ|^ty}^JǙ>/Sה+xׅ挰] &efV|2o,] $`~E{Pr \t#QJ1E0d>ʅ7?] PHzhj;C,| gyw|C>2S^R(F;>Jּ&уV}9 <3 MJ;2fTgrC/PDlK f./v2dMGG+h&՜ST^S#[e>3/aTIX+ؽ^m!|UіDviALl(+)}&?#z^-=ﬧ WxkJIءP&=Nг\ *aȽ'3ض]FקS8tG<ؼ ba(|*g-RSd9_ުpLu(+N2Ij^,6[dbSĜw`U10L㤆t*F7Vܧiw?{(f_ox?WKk[..96L9|OG|y(]fGrY^}P{EQ&H7з{a˕_oXidKHam 2),3F]A͆/zp՟) % 8Z TŃgrԝI#}qJc3یVx!>&|4FHҕrIQ+0Ȱ7T N 5>>ЁC)erl@ P 8N˸ ~?lHl6`P`CN2 6R@ X g%! ÆT:~`C!%@ 6l8.`C` !`C?! 6p^q`C` !G`C?! 6p^qG`C` !:~`C!%@ 6l8.> Æ t ,3`CJl pz] Æ|@ X g%! 6R:@X h@%!f=WSohE4  2gAhiQ1=38d9N'E:Ah>td"ɮA8Vd@b@6똍P>HS$|%lj Ύ`GUZ>Q%_0iJi¨{W/yQyy+gGM]a{dm\@]EDM9骽t>O76 Pr \pNc~ ̡o^|* 6BGgg T] 'b_yٷ |KG>  |5'ŝ!GBmt?Nm ݛx_зj7Vܧ):d?^W$ Ot+⊋c-Gi?'etw3e()Yv`gHC<|uw {Vq@~uD"b%+Œ/^miª tvxv;z;;ͳ%vo7wkEwԆǭ'nME-58΂;k.;K ܯ܂s J)( 'Q]t -Jy}+Uc**#jC$HۛK *TA,R#~"Lx+H||X0ߕFY%Yd}SUbƍ*lT>8 ĵF3P ja.\Xr{7ڗ:}hAn~ ~+#xă@,]PY1#_Vǔ+#=gh9?j! ^HB~PXq:[fi5oZ)`TV;@A$S!A,>P mx}W/1a0%uB=85 ,%VL^ 3lܕ뿍:s̢}:lgr?0Z&BiK26XEэ1֒qBx cLʞEqj%6+]vТKz Iۅxp 4ƃ k Y3h\G?J~>)jUR6&yyY98*jyy+2ϣ|^8V|c5e&?--!wtpZcJf4$p:=H,qz4a,0~b/ CaqnNFIƧ/cv4'54oP@MImOic <+ V} ZIv{Ճ5,E+A ~x_aR~)TiF:(TJ_g#iv'cҚ.MG>6e601^(J~#ĿґJ[^n캫\v&~KUB_J}K:}";~n@onj_4Mm}J[4~}&}=Y)]ly+)K'>D(b/; &p:u|;p˶d>z;:%GbeqC2VX >Ӏ6LQ,蒬c3Tj@ ӸQrn.7/2gS7_@M6A+7zedVE^6z>YhHjM<%V[ )pfm*էѕ;xD:~஀pWH ktY$ <-(G$6&Ic0 q9}W LI'(Oj]!q̵B'ξ_jg.k͚߷f+]$p'ϸ&@pB.֍]*cA8$|KWیvsMxM[Xf#$h,( GvVz%Nw]?d9N}'ҚegG<#`@ZX_/b9pà#l[LL>#i:<:(9H(.c`/f&p4[x@0λf̰ V{V.pF<λKv?%6(@0ΏfkWmh+j꘲V\ŧq}AkmEppr`r?WQ?GfG7#f p屾!ctPXzĠ WtsΑRMJ8 XIkS3佞xNq%`_,2>cvPyX4o-`]]Ֆ&Ā-*.2"(ZHEUZ^5Z~ZhjEmE) h!(ي [@)I gVuY R]%^ ;ƾ)A8ZQ%Qwh`9whs.Z}߻1:Aߟs:7Lry2ct\u:ɨ:eIqNQ'|P' :ɀ9u!pI^d  F,Z#^ /W$Gb]b]nqJE(=CB>$ x3F8a2zH@ gv$tO0 PE,]g i8 @:\ 1a((b @)l zRZt˨Ey H\m݀sJb궮!%WS/yWpRBHb&cL&kt]A~zwӔNCѵ:Hʓ VL$;(H/ 5)zq )F\ePf+M(/Szy:0a'YD`tIM$ѩ|̯cq`72>ʅry|21$>z?R: 7'gU/ǖHc/?]A`7icnI7Vܧ):d>^W OX+ኋc-G4i?'setw3d)v`]gHC<5*~.O/70pN$"Vg"_z7&]cqzӊ Gj:aeo~w| 㢖:΂;k;K ܂s J鮚[%3gsۿ.kKg0a^A_y py z*h;{P$CH 0 *hgP!a)DX]yDWjB>OΈH,KIrFVdgAd >ONU'=#ƍ* @ oo&^) :w"S0T,99G*J% lW('=e<]"qH(5AQA<-G<-D@}Gحޅ)d+D(m'f"hDkmoO$U颊,_u@P@Du.3UYYrr_CwQ#5P#5\(ˠF 2s lb}IF(H [ p: 0`rA)Ʌ: X0`^y $ $` àAe}TNAyA`AA A01R<=_j%J83DjArgmAjJg: [R)za@}֧Q4is jW̡^@ͮW _hfHۀtt tt8wb~@1P[gN go$Ev3f!^]ϐ:+Dʰ 58 #!~/zCB ώ 58 Vע\wF)Q=mEjip^ɺFE _$͏(􍌕hU`;Wv $ .e_lPqk ^Gf #3ӑ'?c]!Hb{0ʻ'D/VOX9Q,p0iuḑzfM)wV{W_'6m٬#3:,qPsC[^!}./7VSVepg+&"{4bf@9HOX\6w^nWs8-wD[I;~H n.#{ٹN$둒rూ_y%ڸ72oigQėWdo:֒!ϢϻUC./ѳovXƒ1 /&mXF+f }mwޥp `u3=5닮m;*߶s ep{LUXg Xpşտ/b h40Oܸ(& ksݷ Xz^fbƄÃZ\Eհ0abcP ؏3 \Ibw\qs <#hzEo3ݡOK`O~dVζdH;{*mLzb,\+5_ŶUpBxHQ)IzYV[Hϋb-eJ;(B2nYItf>xIO4ӱ =;MpSLz};oua$Wsq}3lX[91™{{v ^kT'N,t{RȄaTYJ0[X+H6'\|y4!WSMطOm#~N}Ngh3ē|xJ'o?Pjp΋) }UL|ϋ[[ty6=yBANKj{RL ?=ww1&0ffvwsuI#k',#;#;Az|X|b\CQ탢`1y9-. SHnp'w-uOBOٕ$(6Qdy'-#NÕI' SF޴ ǝ?oQM_h\|^s[]+P5YϼS:ViT3y\kϦF{G) Xap'f8t]e,zS,Dp,GZnn8w/~d9e @ 85XoS#iQXtoϞaHKh!34w 3D8hWڹ M@ՂZ)‰2x~I8(X,+XE{xyxGwly$sXoMM,]nIb-Q|u:~r 6R7n7=cӁg$ L46iS^zeLm&es[64^4Rd<1;Hל0O0w  ;@B>VmhKa<ʟ;; H< r$ :ogL/,ɐy=۔D+Ndϳ/#w٥.*MX$LHZ)~:ô鬳_l^1i߃l_vtk%.Uc 2 dLV5@+dt@PBpZcC֩H AXG,=32^7*7M8 2 L,4K#I8Қ: 9pcNsz?lA׏*|r>>0HU>7|#Bp> 8|fśJxe,_O)eTbp"BV'eEi]C\]SuEO;Խd\Bź,[NI]xw(NHQXfr-?MsI_צ/cz6S1,閘lfXVV|>D=Ц9VΛa@VFO>OvyrM݉6Gbґq/j66yaǀJpl@3 Z?P]p@XiMEn w~Ǻ\v٥N~(UJn#Z ao;Qw9qWkv\9_a6c?趖ݺƃ9Ofʎ[G~؎[]M+S_?VYM|w\3[~=SyER#4^948sE:?dvt4F_}TxksPƖ2j w'9" /5&/АNVk9zi<'ݓә}pǪx)WB`eo~Bgk^W^"* -Z03*$ s -(7=B k2g +W0Oۼ ֆP9%)[YJVg`Qa â}8!^_֥FGYR7W}̗eai+iD#쳬AiSUKf b4nLiMUP8]Ͷ% hnp@8n@M,2( @N6IRS-Wۨ Vno]9Fy\4_sJl~o&H%rPM{՞#n/nfh6d+e"-5[s8?Ky@\6ELSu"ZBn̿b9a9-Lw%oE_dquS;EеXWXW[I5֕=Ӧ P>iXp Q*o)A`DeK 잝5EssQ?H?zx\?6\ EZ #n&OlVQėWBwF)Q=mEZ_V*lakZ}sQH6j[37N<v:3D&a̜s}J h}UL|i5; 3ڂz~9c*fp+ Z_ GQTErz~G3M^{r1'NX!iY+Xߣ9V6Csܾ*0`hZЪ*-0ngP* ^oXV2+W0`^>n  +[2 8*L2pi{0,*gQjH$7F|Y[zA6Uc l+ >mX93ϲYgNU-OFZ5 Ӹ# |bxsO|2np@8_uP[<͏u-xs >%2""2"*2"Ϡ:!K'abt_y߫}᏾~8x o't잪=R(b_ӆ;^qh̙2_ymу)g500kWkZ^䙧< IK?p-䛯=%)JGU) ӷJM/ 5e7$O]ÓH0(x'~(Г7vѰc)ٸF S}vhdIO"jft Gn$Hp~]ߝ= _%#i% b%ߖ6_b@{Z&,{YƢ: ;b3vҮ{5kଈHY$eu[Tb7㪽^7pnjT&]Q o3b7n%2Ϫ>9sW̓1t#6hΈ{-#VӳZ4mF3Z=eI>kPJ''ϥmmOVX7rCb׸ `ԡL'Ir_6Ag+/ qe"5 NhLC#3+=PĀkj` .PIJ9%[4o貲EDGhj vU|hڦp~B0b2aӰ$:vlhژo7X{Gݢ d!]\չWa\}"ڟ {D#%+MH֏-~H ԥyђvJ;d+ t0g C!W? Wv˟D1̫y< ,^g:+:++Ry:+M >XDS>ǽ!pDS# 7?ں^R(jQXXo}_KxA }x"°pꮚF< ? )8`?Kg?bRM`[%0좯9ʅnT$}j!j<6Egђ4VA?(iD!2nEF7P/𵉳` ڽhYKp.V Fp^##S#CC~##i@|!n`<7lY(#u^бbl*c-dirF8Y ,u@?>ؓEQ8!{LQ`sZt,QDpNy($*AF- r;PN ('e`Y[9q,@(M߬DOG&+PӚ9 \j^" \jahf$'BU@oN6 ft D,TH>I%cI3)n/QrQd-IdF%HxiWwoRX(Ph_|v_vK|ko%[)Կi{\~+$&I-/^b{NPwcq-k|]Z[;=ۍPz"]HV7>S䙺_gb2{or/xK$Ns|.R"vcKOyRNV(ū4vYZt~ 9 uaD'@ vWQ}ł8U8\E*Q:C5 A^΅)0 b NMƔ; EjcI qS%g5cC2Xq%Gq¬sfR Y|AaW~[g4Iۃ"iZ 3V )& %yO,Gz%yޭ8i<0kSh%J7s>R>{~ƞǟW:g//Ӂ+>˒4% g7Du_b̃&P*OehF9QSORX+{g|<8%3lm-;tAm}tŜgmGW7ZjR4s>"`X,a{Y ̩%OvlqcJ_g1N|qdYZǠ&΅3P ra]b]M{hZL߼RX0H< *I<&ui |-Z:Dr wĕQX@PIaLjt<*!֫^@rQ>C],v{i Yvpjr Uw,oA,:CIHBsYM="V=]Ŭ rގ%Ux. @˄Y XSSYu}*D!yٗw2KuiSӉJÜw#* 0E+|t{F}FDڨ[XE*FI0h;A?2yS:[Zh34NSeaDžz2'lVσ`@f@ft f,3g3d)F []5?UZ-[p S Ò'MR:p\i,*-;?"Y9`ʛ-:xjW.d̴ j Lރ@Q{#T?ֱ^ ie #6XBvxP~,jEyk7w/EuT'#$dHP*a}OҸZK=vC&끙q Uu_癱n=.=`vʁd39Y<ȶRb{44U=h]-;' 5 E~60V&Ⱥ l:3tQ@F:Qw}O4,6kzlG(ƼdzT)Uv2ǀv'~0{!!nu|MhAL Kad5EnL&ێ͕'U~N>xP۟r]1׳U}7޷|}˷IPz˳[ޛ\ K:.Tɞ^vJIf42v=u~7bÑVjlxyFQ:#J۽Zz&؋vO.& S$/~❧\Mv{mFF(Wv,YKYFTA[PJ1h7W\dh+++W0`^AX1V vUF6HYX=|A q *TBtQ#Kh (_UV3|H,s O[I'ae r>ϜZ➌4@ 3qcJG1|qd9!,o ,{.OW~>`-@+,Yw GDJF>#`py:ץ& U e#\\`g-[PJanV2+W0`^>2w>2X0`PaY!nRPF|4|PF`XPF|PFbPF @O㨿:·TF8/DA2gJ f\)UJ2,zadzʸX.j#g0V qOs#nH ip@`8TiPB`y~BBxz}<Pa#|nTDJ$DJ$ PAAn$@ng2=eQ&ig<"'l-$&$`%üy +( z*(% BaP!8eMeee eP|1;((ȝeTR @R `9`hr\(oZ!HA κ*  Fq=Ak2W=Vt|>lAWZWQ/"HTᎶ\C]%E= _ ݳo|y]lD05.}ۦEFsg45\`AQvCtt.3 0zr~Qң᏾~8t1G㲖_W!O[0 Cv c%. ByvmZ1ެiq ?TyM:U93%Wj"Κ$;߭o+m!!lzX*/jA>`A>A>1H{p^ #RXA )Y_*W J Ydt@y*MNOi\Sw_1V{Lڟe4w{XS/v N,49s Mw=#Ry5)>ϻYvLrk WW{zbCn:21? |l60n :%C/ne%Jf\pNy˜Ztԍo}nu|mW!uLZcŔR+C%$g8H)p<$nv/eVY7Hs#@E=;-`yIpp*Tɧ"DžH8Xp.sw.R h<&p:EV-NG`ge)!  $?cE*ԬP8v  yz Ζ`g?uw]ߑyߑ ӑ'?c+:^ѦpP^:aN7d=֝'ծ|Fd`__{ZA'[fL}/"h%#5&/֧ӄUOVv\LtBэwDzx)W:[EuU%BaԃWU|P?`A)VoUW5YZy "+W ̫9ͫ +(0nI3Qsi{0,*gQ!KPw=ٕm>"Q̙e= sj281@̜ƍ)!#@ "WFEu n \97@[B 3캾%JJk2nw"%%Yg/V %T:jvWT  x yyx 5)w`8!0 xR 1.j0W] FTJy +W'PVQK,* ѐ AudXT|TbTCy$:C[`Au0pEZEZEZ䮝/Jz<q }pbxVyNYj_>f:´GD\ =%Μ)QuP/JoC*7)MZw᭯+5!){5߉e8~o$}_tZBkVS30 [:|8쎽0߯ k%g˒ޙHJ(4=wZ9%oR t琠f\zez $mQ[^o ?^%f߃ žh5 LiKp~׭9:?A/a_N0JxPR=mE~UYUn?.^~2{Bf?q' ulf;Hv06" =qhU*эuD7qoP{:!_Y+zR@7 {{ߖ7οu4hEt<΁o7aߺd̲řB hK7κ],kVw5n;|믓:6N̍%K'-6Zڊ+ui{C߿q$S}8)XW"LY#A.(4fBxgGЄ?-:3~i[HR.m֝CZtu!n}?Ҫ44<FVMӆ 2`!M:Ћa%,}zxw$+^&lkVKL[Z 3 AYOr͖2`cPgб8xdjqhr9k5i4O[ >OUvĴfgi=,Je c1]տPkKY4Bz:=[SD^+) 2y/!{ƿv (^%3~mNvd W슛f%ѕ#BY\f,F@njtDN_1> 4S9ʈU{sC Nw*|I6͖rmӲaxdQƆ`vv,)UʎUEv,dBvcMX8y,c>c`X7;d X8B1Ȏ"ٱ+(bě.3JpA|V( e3w>/'2ҁ+fʬ~j絸]ir#a?Y7=Zd]4v^|X?Y+ByF}Y}Q}]d1Fçe2z;+$N2SSXV_(7{ՉW4(%pA= ~f8Fvckf t7Klw >lX['z8y@$ e$%\ܳaΚ{6is*# \Eh!FY&ڈV&8w2?+vfK$TC!D⯝]q9(%yN$I:qiT;u򾴴<Su/ SS=9ï6w۝^mF;uO7'a<-AEh,6mvZ;Bos2i8 gI&䧂Z*333EwH;&ΒP fKH 8Ne> l1;=:}H*&FxhA8jX  bP0@:"\f)oRe.̲9\ p `y %dpޭ4InRX.=ak̄D+␒^<ʮ3 țbfs|^p\f 5 X4D%i..&2<@xU0+lėWH@E`y(Qg` !!#%9 Hy,+מsQ{XGʍI#ȋvIc%kKnnֹͨS]ɞ@2 Ft i)p:u*H~4jzrG볫C1^ 7-'_ۣ+{ cLKYO73]9]ݪLLjs-ZE^- 2h+2εl,D=i_.2L+9:ڞҎ>su+.¾ ;˳J(QoŅݝ,s^bwm>3޳Y 3W௙'K_ijU㤎U40N5ĥÇ6~X+ EGegaǙ H~gA[Cx|ģFf l]]>QrE9s:}Oф=qqSQ#Q'߳v4YYJaV?Y{"RU*_!7|:o9==}EY@T$ _h^qǀ0pssQ?H4S3H#u" GAX t65LI= _3Uf*kwrnZde\E3g)^W%6i,/p n|d21W5z%᪍TsLԀA@|%PA^`yNCZK$_kBwf/iv.Sjqbh. d-َڌja A〜n @,2Dΰh4f&q©v&_eOfb*`bW@jgBMeÕ17gO0k?ĖQ p[>'p+lXap5p5 Ef1,;s薇s/ɑ@W|V=)XXFCt.t?78l |)x*)@\1z lNjgclf3ÂRxKK02eb1eEXH%@Vjy,Zm!=//q (6.#ֿˬV+X&[iĀ0sx 7CȬ9˝wQ oY0Q@X l^(tD=+=I0 @ 0 C}2n-rhtt 0_r6(<`HY2ƃbTCI\^Ҁۢ~y_Yer0%&žpY z2[qQ?'1ɽ8m!,  U@yBp/Vj @,1U&ٔNs꜃Gx(@ (@0PO5{QtO1y{~) T|  Ġ-o<'QXQ@ؼdaᒕIl95T'Jҷ-ҞE%) Z^&@0zv.ZC?! "~l2*Q޹V"=mIB1Q1W"oeW%MNʴcN%.T,0R"Pm@E2s2wK"w}P`ZKp+@ V*V`輋eBQ.݁Sd ,/ΩVOaK7/]GR2#X ` iͺ @J@;1Gv d,4뉖V0NJ[ynoTigNkul!z)r@` x#_]FKJʼn&9詟 8Ho`8H20bG d7]sx IF0yE4W:N2@|qp!'ټ+SA4 A@k@p*9_ (fIQ0!f8Q$)ՠA @4 j_ -/O\<[[~t7l45~O Hj/HK"se4w)r$o?GT&~ Xߘ4Pu)U2s;.R硧>]7JOρ|JCWFi~ {v!+1;+fuAhbf 3>yD]n`X X\2{7LOVK[A)d(Ť&g*Қ;Lslki+>pEdwmtjS[ zPaZFu`(cAHw ĺ6rO@Ȭ4weת'ɦ`]Pt(z U `^8` x1bsқɤ칊oL?qXFP1!soAkRul=, bh!pD&rv̅ ̂aMpaa#u( 8_ ƾ0QJTOmqDRUZ;Gܰ6J:퐼{TQ0J"}A!Е8ֆQ6ZyE# HV` uӉKJ,~\hj X@44cS |ZNo|f"==qzQp:$/qڀUOb}D؃mD,˷,oro7Ř/h+4g Ƌ頫"/@WKuXsf3 @RgD=S C=V+I x{d -0Dټ̈ś<yzJ_VCDΛt%:%D  F-;~`TH`T p;ݮ42HkeD!)H0—+:4y4S$KiXp,c@[<&@`Z fN{13tKcB.L[)9iRmN>& 2'\?` uא@Z e^ؿd/B\Keȏ2@zb4* T^w{P! eD ~6?, 1g: iPKv2ys-TZ>i~~lrihn=*/Vv lqkfOI;=f$+&\ ٥Yvӂt# )߻ٓer^=6w-{@ a{y7È [G `Ih÷% _$C#d0U<=]&3Bg!ɵ h٭uӁ%g̐F/uC/!"eGF?c=4PN :l. 0_3@~fMqi䕲).A>7} O/N>MU ƍtWybL٬͑rz 2_qv,RB6vCg/*qvDs߆#@*U/?Slj2d;{ݫQVȝNW񵠡 ^ds_z_A6@w}JE|F mcߦݏ\LKyEڳh9RZh-\dK/ged,|V ;T.\ԥ5J-wd7Ge lajOJSNNs:mrTf*V*ޯG= chO+Ֆܯ#Aݸ5қ \}h^6y 6 m :z;-CA0 @-/+eF$ɲbԈ—J2(ɿ,U+0\A=€櫴Nrzym>I][. fZȝgG+cr9Cvg/9IP~&/Ce;d2"g:u!J8C ~ُ 2*YlN1qRjVjfLMu&L[Ip"@]gRE[&gX;w:$f\6*E7* x_SNzv..d1Bvhy㹫xb'4s9&n*`Z&kVyS3XߤD| & 0.50.@0N"}ò3VAM8`o^]X^X`]b_l\9\ p U=g 8 FkGRO@ݽ yJ%*]ƒ$VKRV/\Oܿ#]noTOdi!{gTr9'tpąbf>pԎZa}D_kJsāZ&^s:n{͹)`/]_߱uy]d Ս_z̽O;託fҳIBsF4m 's]7)mĻo͋{$VbCOxုH4BH7>&մ2! P*Ojg=߬Q2_qυNuT~".,t*H*qҗy/f5 (\x7I*m>[N.M#-$ n˃j⚨M[u%.܎ <2{Qz&s,yPmۖs!$([DPO&¡qMɬMƄN xcS B%/rOY^bbܻ6!Y!~v.0(}Uvl7[;5pb8meÑYA6i`r&EOFzko ^Xݐvc5 ٣MNӲoxXNCeB*)::2$kD)I>Q̊VLԞ%ݔVWeP 6%^OE$XӶZֺ'B7 IxJjYՂEO609 Mu1=}<; 6eZPyv9\ S_&IZH<皧,Z4Ι{z4rSqdWyDN4-Uyb8 f;f{;XwBHfHR{O0f"G20}Dw]rxp$ⓘi4tliLǝ{>9{ Gd`neY:co\GߔBM}?{z({ xtj{_7?Vl]e+xP۟r]1q~';>Zq>r|/߮&S_?VY6UޅÑ@OT^ѹ%4^zҰ,'ce`Z3ai+lB$A|ukpI$ʓ+]%6)=.`P5>n]oZp?Z@Hm=XR\v-W Z-[Bl+$h%i"ZvWUz6؀תFe@1x󔢸P&Md5!˺ 9o[n^ްBT u❞ XX.׸ܥ:H+`l)/J߅i"jKti9R?|P:U!y]'gbBڊՔӇ~YzTVohVPvTvWϪ ~[#ԋW:$@\+\Jo]8KlXotlvBOp%G_~ A< D߹JymD>ST81 2%=Pb(1$'4[훚{^ 6|p!tOgx=J˥1b+ G)qe8AtAtͭJC+@\_ cݜ!81:81`&rbS91`WWY@SFRX`UctC~E>'EZ`h: Z+=ĺӼUɡgY8c}>>XA2 jN5?b-@ T,j m9sfLQ658?n`A !p2WlN[tQ^*\[?~Ӌ[X޻>l:sd } l|ְUc~;l_9dn  0saY2hcusPY[[RYY " D֦Y UÔxz-c5ލ[ưdjF1k=u[ $e$03b^ ڗ]z'dY.$<` ^V naتUo圊hgI(} P_ 6C( ^تUop/3!0a 0a00a@[[`#,XMe>| {5LVi7QuN|yl`\ S\'dpip2R¨~1[rҥ`O~dwV>崳];tIɿ]ēM:x'aYW~GZVi&l0dof|)}ODp'\yIS\x=Br~ԩ2=wv̚3kv}WriS6ɺCki'{ad?xͮ}}GxÈM)cNebҟGmCOaD!MHM}h??_j_E}wt_qnEؗAaLaɭu7nyQli[9'1Z+&#S6e}mֶe;ɏ/D'U$ijAb8]d7Sާ~G*Kw>/lW㴫P6e6*`AѲ|hIfiu3mx&׼1 P~(CA4jlo8ˡ~%Ta;a㻢ق, |U"d[%Fl-KVUFܬ 1rS1nݜSII7J#3 @{lSٳQ {5=0uC,L{;`#hSRuv*O6:'2JB<+/dW]iqo^xO_YY9M2^ I* bRۚ+@@p OeVXݤ4JB(A:IK]̍a,uySY ^M1jW䓣C+$w<] .uRއ2jP] ՜_B22˽u3N\" wc8N"f&=ڝoYDeړnoTgEJ݄kbF ە>3KLp9<9x5p .ej^WW^ fvL#%WT \!VP"ٱ'Razv{lA&t !J3ɴj =bo{)Wl/r6q=E+Nmi ij-< >rG{5N3cܶ={ܜܶoJOvLWS`'0|O]#n-2kzn U"fc]PH!4Br ]dnI#S0Ng&OwH8NMGSۇ)Ps^ö jnmBZ#,y[偗ZB^YlYKuJsq_8OR{,8s]ZWgC~/CKjB`h \չwed\ XSӔj4¡[Mnwg4 hʴ>j5;#tZ Z`ԫ̂?UQ5CBkz|Wŷ*ۭ~I-@kAEUhїWc&ѣ4&E[i<_IՒ|#%0;Ѫ >I &;ԗ ,Is}% v6MuUZ!#I~c)UU?w6W|mʊ¹}j.mZpd!~flZ*f -H 72~}4}G,/a?ESPwZ9GB%qHqڍ9 #(%]co Eߗ3hV)QHr$J(pOt̻x22e5AETXy4VYlb5Igh6#cA\~merad;]ݻ(N޴zg'_}{֙=af?3$ I0T _~jl HEiKrТM>69vŞWƞǟyǞǟy>o9_Z]r'ףHUlND0Mᩁ,^;lMdsw K/tbx0RB 4R.fF)=^|y>}J#ݑV&LviI2HL:f`n]Ⱦ|T,Oӝes}tŜeJUQ7E|S˷Zc-M.%8yWyG³*Hا3 ;sQHɿOCeԫ*^d_AD堲|pj 'oUĢdwC΅j{-꾓 5ƪx˩IL&dYb7*ydgCaec8b/Y`g-egQI\d`nAtk*&*!5 C ! )R jw63 fZYVg`Pa à}UmUw`P!k˪_֥F L* l+z,kK# 5+P@]4.^8uC\, ,ڞSQ <@+g .q?e5'LEWhEʖalcHEgXZ+i-(/SsȁY ,K[F1$3S$n:*q$O9#|[lo0ށ`/T:Z2gnI<\G?*d o4'!XE)s=NX]R%՞q н,&b' iyJ_ #^&_\hg)Á)~%Gl-~Jo(`:J V`)ݥXS7)n/:pft@ `A%dDX/`!# 18_6?p'Rf J5pNe cAiɃa?Y7ZtV.wt'_o:nvOX Oo(0-8:DtIi\i[޳ƹ44q}әeL8\7Ď7M,+o)S{zi&KrIh8ݵF-g;M;ݨ_~Ciwu77:N,!A![?S-YO4h>#HCLJ$D5g̠֔q.nu|c:Ș2/ CV2a+|1Ѩn?]Es2{Z(d I̎xK1R/RxlCfI74m1}q4p&3Uk\n,Ӱ (%]co Jң[_i=2_]n> 9$IA,\Xs\yJmy9W)=??Gcϫ}MQ_3.7}Ih~(58g4G_Ձ2nUk!qbp-3 3+uuНw1&kf2r0VPʻOB5R(i&haLfEͶ#E: LvI[yԢ:R_Sts]\H>T趖4xP۟r]1HUk7|k˷i {˳[ޛ\ K'򎉸lOS)2ۢaŘGط62eukfG^WX_g}}/T7% 5&/ےNVŶ0'?܉^{r1߱~IDzx)W~Ǯe` ;6, 讫ZV(Spy=^UaAt[ W\diV2+0`^.04j0x:'i@FIV`bJ= KT&aoD.58z+_U#6Ҋ,˜IVFgYjUY8(?= 3 fKSڨ6`(b.2ĩfZ&3p ̜J 3캾F_Tm2)Fz` >p+^x yWm[jT:Wf493n !^`y^^^`dzM@ u8TbQGxOMv QΨO]d@X$J$'[l5?f-@ ~u Y_@恿X ^\QJ " BI׭atPs<$>rP5UsQ5UsQ5UsQ5w~Q1 nˈg6jvB#?X{򱚾Դ^\e̙2_E=KVR]!ff<zZM K,63tz^Q1JzE.RD5q@[ #DەFyv/!~_Վh1pE3W#stδJS> ~F]cv⫦{QpZ#4f\ZtN~`v&F9mv;q{芄AI}D\Oxj < v[!XX }Nđ LOE-~Jܕ:б*_)AwV{صvGa&"yL  ^M6U_^!\Ё1@sj,(M6+DҷQI>bLYi9%'4},dOyf}tssQ?9/ V1$~w:Mto3%:S6diS+^2KRW' iz._8A Ae{@Idc;X@ pz,`, I,E3(@  P,c4^7,Sgeɺ=&={Sފbc3t3Lg=2{p~dkɈE*Cbh ڳFajyٴK6@-&(~ pZ+>iz C7P ( Yp#bq⇷#?g-Om;#8E4M8(aE3㚒XA6ġ/[응a !-q r@k._Rޭj5{pX b-'Z+觔JxD*euEąY̒av[tQX/?kl-/±V)nsj)ώsU0C]%^ Kۡ&"8r  I"38 A؊* IahPI@<]F$tjVudJ"*}UXҤR) :_):et^9?*u Px!/@0:0hr Vi5.e. 6A5@V t/@ȼ0͒G9?M%ZS, 5RÂM P   wgg=:98 gJbp*;KzQ]eT4}0Nu)=y#5JRjVVp~hWp;$ӷtdb뾂 8'пű664/= @zCV`輋Uafo>P+@ ̲+EV%\;ΞXNKu=v'Ƅ1YowaAŢ\8i Rm^)%e>v|D`>3.i c;<T*1u Md "@ Sqo&># xyLcs (9@ΫENu8r v!դA=xw8ii ,y4'}|.a(uN*ȂplAWZWQ/B` ?~6Hݨ_&H. SvD gXcaI>w$I"%u1 z2IcLF62z IF$lKҧq4Vf4*0dZ*3F131%);Cs ?9Y}ZSHg,`N+d#ۑ![4*0 pyf%6@ -F1QG\Es2@{Z(lo:MQ Mּ;:{Ҙ0|K4z]e2xP۟r]1z*}fQݗoa}vu`<[j*+ed^fffcc_Gkcߎ8 =|AG[f}/pƤq4&Zΰiªx- Ƕ^{ra7*1aAxƗMoâ⸪e`gZ2bF0~܂R`W\dhV2+0`^.0;ƪ 8%ZY"Vg`Pa à}R @_֥F91嫾 b$|9> w̙= goXI*GBh~n;ZвQ!x# bgbq⇷ >G &P mgnmgz:*~[R\Aqk5|")L |<9P }P-FYa(O%p.ANK&@,FR3 H6/;s[\>\NS(f z4-X4[)H9*bɲ<C,P .T_yq,AX5S3%UK0ã9usgԵܙX\)N´ȄplFW6P# zTA@qLFe #Ȥx;B`gL  Xd@ `y^zBH.OLEY6lf<)`FV60# zl3>GS*Ҟ346:O)4QhA~Ɯߏ9hp VAz(vvHn5Kn$}I^VrE䛓z-٦uXl0{٣Vj6<ϫǞǟy>oè/҂w}QZquG_F?XF P ݏvo|`+be~i@\Y@ՍS~"D?$&P~J F*V NHJTJ[ylM4H/OxniKӫIBOUG?1vn(.Ҝ߲HjS+2{?vu*-sf2oa-svu`<[Ue*8qz&Wz)YBE԰Ryy0l?F/_}TxHH 66㗵uJ.g.q,sFdcۍe gNU):&8b9SڨnCq00ėW'z!'Erf>??_j_E5 LٴFjNɪ2{,lSSDy5aCI/f`*o8_7IOP{=@wrHd."Gf5zg¾xlӺ ʁj_wƒ#F$Mn}MO]6m{].wVm`bN: h>ʿ@+Q.6*0+~ಀlX`c]b_ ֯1޺[@umx#o}]í^>ܺ)"ea`Yi4NӰfggMj:ofԎp.Ν\hy -6O_a$Zߗ'!?Ҽ8 ǁ?mCc4JCiECod ${/ kǩY0u#Lg}Ɂ0uA: L|1S_[N  h|Jx7\x9%YKxA/| x3BzKC.Ko{`20  v`X`c]b]"] ]u!]˥_ ]t]˅{LxZ5^sDnG5fT\Fk&^%ؕV }otkIΫ=.5y {Sܻ_`PiM7w/?Ż/N^84+srl+Ͷ#$$TdL~ $'m GCZ v:R Q*ɡH [oR57jfmOt0&JuA}{nђNw/.$z= 9(0RMs<* e2MaKSY:0e{-\+,]4:UF2O}P ƜvG##V'_Ex-H/s̈4OG+&'+8 v-rHi02|5i4)P*>K8o JsF$`|K^%#$9Z-w+Hv)t qG\2@mp98v#_͟D3(O4-.~~ɏw[af %v͂3I:M'Pg^MQ:uNie3~wy&g@RWrz< 'ZހD'2~s+aq  LX< HX >HX A`yބŐ5/ a1bxN w,0 de퓺Z-%;(vs]eLowE/apNS@`.HyW^ܜ*H{·i';b m,6V 8 iBlEj#We@6Pk&.g:&iY<3 a_V??_j_E5 LٴHnF2r,HOJs s.T XeZY^FYVBu%!|Cdz+4q_ ^}S ߇Pè}*2Cmf& w?7$+莝4,qފ/϶{SnWSNxhN;uAʒ)ɉ20PU.Nvy?0a@^LmQ,·o@H2=!FJNplJZ 20#dOĤP Pؙ895Xa+tIa E9 x̗1+pc./4Xp>@d5|s<&w' `Hn%i J=>JEc߇-%@mOԣ7QJTOmqDRUZi(Ɨby7 tdb>7萊kJ_kN~5ZyރZ$@ۯR*) 0+D|PgV uG 'HNF `].iLjD9.p`k\B 8 lZy ~ N% >H>@ K,='hpy9Q_EBXrq4 DZx'DOA$D` ;rew=+i*RCYypj{ks>Z2H ~$H\uKr @,3ܜ(`lcuh h ~!/`=> K,x^`< .C}d# bآF8Ytॅ AOH@\xg >Yۣ2-,4!$$SR ( yݵ+%v .)(&?%(*a5H{@qho?Va8hPk*E3ӗ?Cv32%";ZI䴬F2X# b32+c|Gfa~mjG^HM\ }k:cNu)\"zikQ6 vg2mKK]/?oI߽w5^x"1BƇ4;~E:w7^4CͺFآt]Z%a|*n>.5`Fۮc]UC3Z{/\f5 2or=VY)'y| ѩ_>3i@ԾR7i e~wڤ*o&_w_vp.h4 k؅V$Zvgv\ШtqN gݙ#x=_Z&c6wi{ɷ# ˯-~]YvnR\¨)w5n.=&#c%y[MHݏ< ( T+Vդ% C<ǜ,j6<ϣe<<+=?y7uF}닒VRVǡ }pHzX;o=R2?x+zk~i@,mrʯS[DRt8# ̐1FҴ7rC:񾳻;}ۯ#m֒dBz m7L3 $M.Hv~z%$[vhfQאlNHXqxTL9/%gO rߝ00m9YE Z,~m=kvo!NƼNXc'|<8&+G_e= / vk#Jyo;Ew8.+Z鮊΋/ϒ͆ԍ4N2=EBj lDﵓֹEof1U$ƒ#ZZ~kdqzp+zݰ uG%;Nd*5Sm@:FdiS2<ǏxlPZD"XES$!0HW8OSt,Y1Գ/39fXX3Vy#IG]iẆFLgr1Hd BR`S% @oe^@M"<d!9 fۢ%]W]H3 ¨[e)q.-_ǗY=1[xAO{v3/ |S5sϷ0=Y>ýEWNIS:}zP+UPRkCYRp-9IKx7T_1-Yд4|GS_xdDdž=Q7դx"^0=m>+ %c^kus{BoYfnķ/aW_;sZ0H4D d˼`2D7xY., c ڿ10K՞KK{puGxr,Mi[b~.[[|EƒfW1C0Hmk.@Q L10ݓ{^Y/3β(g!QY+4JR:Ir4Os2yJwN 涻2%@Eܾy2ʊ4Jkg :J4 j' i@0]e vckfEt/tI g LtL_iTF4p0)+=/R& Ђt@0!]Ufs4C˽vf36}ԌM"++#!kMWiQ]FǛ48A:>Nl䷔ߟ TĥVE݉**Wr=gzjiϳt$DS>7BaO6{eA/ Z U nқu+xVz(Yf)oz}0MHT$*!$j4E|-EI&x6x ߗ) }?en6a`9o (ح`7v7} 4S9> .ѵ\|qHQ6_^!"`Y'kp,gBHH%iBQ~byn8ѤR-SP摆 ^'H#5՟xI(I%-p#dȸDd(3/bs;̝U_K@!_* ]ela|Gܷ ʁj_wewU赵{0l0[9K9Q"{Z8AL},==u4I[qeP_u@LMZ hv/^I=2y`F1(89v޳ًuc+Ҧ{«Z R[I6ͧ ltVjg!̾~F;SȰFZyo3x Y{.)b>^Yw4jhw׆39g doس㎐IpAf~Y oR1/%@GQLNi[=,Ugy/KWJJ? F7zQp>W;{l;v?ؼ^l|ە ږ+mɮt%0! H(,k=`׳t'Iޖ1"JArd7*v\-ڵ)4*N3 ѯoσkjZUa{| ݨR}Ik3U>{=2ԖX*w(PƑw$ywA$c+݄%vW1({ӝԃ[yv@5f6=?~{nL*% ٢NVhTWaA"T~$=oRJ&6~YYٛ_;+5 :?l3sGޚ$ > ޜ"#Lym;Ι{z4,ͧ_*Ol<}燃vĉձD5Z]Px 4(I o?(bkU`ѫ zW-mk16GJ iΚ-@DKw 7 7` xu/cFS/s9Z(AX wu9X4J8PR #'ī$sK B`ޭFЀz;sTs?99?/:pDJH @lhEz.Zu5n;^8mW?Azl ~z?O=Y Cӻ&aRi,x^ZNHoHV  H4p'4 <hy],H^VW2Ag@fAC1] ͤ  Bf s*Sy#/I3NHw3*e2k8n/q~.bm9Ⱦ`Yǃ8U;aTg FQ%JEc?P<܈wFmRUZip7IvHލ=ʦ*tdbQWRqN ]cmeCm'i^;B{P+j>r0a|HH5DkHFv2R&cT#*R y/GA6y CGz̩(@ oKH*FH1'DM37DJЍrz@7hBu \`. f0 *}_ylZKO D'ӋOx8s2îq#U`6Ss\o^D̗qKLۛ m4_U3>* F(WtBcuQjegr\F¾xvȼ$w* T&\W,ߐШ9hR8* 8`a@xYzchE'Ӓ^4'}|΅/=@A&GρXέ,e˴<]I2^e՛,Ab®q&:N"%# bX#,Wnp匊"1PQ$FێJFO7*>qr12>Ǝ4l\((O񬝂*" Pw@' hY'u/1+a*fbe[ˀPWf i?0\!A! CCCpzٹ`,A8A Z |^ $k2Y1o2=a/DYD$1r%:՜|GQGѦ7U[ \QIٞg͢5hj kA 7 o*WoUhXD p(@8mL)WnSp.W]9I[g=˖{{];Z"+ s9OӃ|9ڽF1B"2{4b6\.[DPPVcxM.e0́1//ᄥ;ǿ OB&)EWк-zy ׉]RZNk^v&sҕorMT> u%A#LIW IgZP¡U|d*&cBW'Ezj<-)& B%y_|#f5J d'ZP(}Uvl7$MSfK hl8qOP~^i3;~RI-")TƑhvԿR6u@!͍CkYulŤ=wFʇR^Jyyo6 Q^ڭ%}s~+6`yx# ٷ3q:F9:?쨧?$MF|-c aV0g/L%G)MHɘ(Nk2/S Q hx x&7LI *s`]fo5Ow=*ROCITOD#b^+;Xŗ{QV(pa-Œ7,7Ե N 6t4ֿR%u3ZOf̸rʯ@V'vK]ܵL]"X&0$EWs2l!y`6N["yg7[{m"zipgM`w9ӠiZA:2+CөvX8F+,~3n x#V]&ic}Fl9rK M6|*>{d,Y>F%0EzJSDl-Nf< U`xP"DeG'"pZJ[ckw%Gł8LČa+M_ޱt&83^0*cb4#8G*pà,YXνɱȶM*^;K3iUI1?Hrt}IV{m&ZbMV0s,ŞWƞǟys>4<9)~ìRl^&7TŶhRt[(ǘ2蝺ۥ~3ѐb0=-;tAm}tŜyirhUy7i ?||thO}yXy{ dkWyG=SyųH{sn#!|0:οOqʷᔯ+^|TN6~eڷ71Mjh,!X@ȁ|!j؁'?#l:fo_ԉÇN\YnalgxV3yaN/wB߯lâeU)r>u,Jw~a]ú^ʺ6Ȇ #F ]k`HcC4 iaHk`‚5 z"3 L,W%-50 j(0aPQzeaP#_֥/ 4ol(PdleEkGQ# Bץ2̬:QFXV,:jlꫂƎ D l145[OZ=ۣ5[MS`5hI@kD>Oka 9DO)W\81 2%=Pb(+CD(-f}SuϋA2[Жg+[AQG_t4^Ly%(%οu\b bl^oUBa 0i6БC6;|'N h 4eF [5M7*Ysu f 2[SA{:Ms婞q$lѷsΗ$1: Ys ,XMebaV>.=Hl^NhSZm[t [K?5rD:/ߧJTg|MCewOic{UAAtCt ]'0 >}ZV -1~AHQ@Bȁ`LE1'1sUeƲ?砳`ClKg`@f. ,YJf̂1cb%?7$~k@_)(1`h 8!ݧkK \0A`aV6x fQtcik!h;p B!7Y4MH[iV/PYseR dd̰kH8A/! 6@oK%K AتUo K\)qaS@APv@C ^8/ 8P}٥gx"UJ"^  : / /^p VzC/TFG``CYL@~F 6bk3t@0_/0_`ꅭ[gN?DsGJ` y{=4=$g`6=*ϰW.Y<,ӸqcMK]\b92#70)L*Y婘pNbb2!,3YErC*nu|Q-YGUݩ8Ͳ~:zQ*ae}%oϱ@/b􀵭΍ g1`U-FKtVKK  `pliŒB{5ŗ<1`:8p4e '+ $'V-ȷLeՌ48Y~{ḧCNxg{IkO|250k/QhVd))*@A hԽ{L^wd.S'ͰeS 2Q! W)MNf"Pn-Oiqu^* Oo+6q=E+.bi ij-< ~r`O{5N3cܶ={ܜܶoJOv\MWS`'0|F'1  ۫Bz:$!ؤm$" iB\ٮ[iHüb(*Ŷ"LDuɓY).xAPPx^fgc*`W[EP0vT?-@-<Q h{;^|j0 b 0% FtO{M1A'zFjӅN%6Qi\LiZFeCxi}y7mr@dt:@ZX04E+%P.R.twЕt%Jث]ɹ:V&p&'p/Y|1Fq'qajDz<|cnGg~Bj!6j&Fӌ}فE,])BF7wE(7@70oƼ8j0oo۽hbr$ ? }>7l^WA@4 DS+Rs2kW(3= ${&g##s %})1掘j)"EmzVͶ#AXamFQƁ cmyiXFWʖآuKi|'}pJ~դ$t0P.+,v]_ ʕ?u̜`yn(j(Fkj?/#l۵7j?}k:MQD?dwOTOEYOMMHcLq&NfEV]*o}{ƿIxzz$_'jlI_XO;%vnqۡk%/.4ͫ5ӜpC0UU,ʧwJT/?wtU*XjR*} r{9gLaTJ#96z!_pUL>$ì*ANb+]i5Ν,mK15uk^s |; lg, WBN/VoJV[ti=9GI&b?3U϶*Z0f2Y4Ñ0o2Nj1l..Sif)~_n+gس'hq8l~.q7צMxg4|Gs3;D[϶ F.*3K¤.RhbdHidt! |yfdL?˯jKZÅōT./GNۿwv%˿'HoZTn1a6aI/ֶdfX͎5<rp%0C:1—=$㋼x U&Dib(́ŞWƞǟyǞǟy>o9_ert|{3^_ >TUPVi O zwXWH?ܭ&vܹE×z&=(澐̳Rh9׽G_Oo·:d2x,.0}tgLYtH`lKo5t-Rƃ94H' G⿖ok濖oW[U˳[ޛ\ K.$iOT^ N/;%&mvǑʓ]=ܟmÇʔթWUF>*|fo:u\jF:E,OvXY0W[Vl_L*T02$~RW\dI0faHA3!C p!5T XPFւr2I]VVXTXð"ncL{ b߂e]zDPTBahjOuR6#.06{>ͫ5X kVך)=slc s_ S_OqZǠ'΅3 '$~l۲7?`-@S+* b%N:0ȻTa,-KVLsJu)Hpf^\5<4H@uЀx|TwC\(0TڞSsTxABX$FC(UfJ>-XqsZ83+/YՐVHNXݨJ/GWH;iy&mVKҸZV^LmKgMNJ=JN'K4=W^D($td #5*>xTUraVVxԔ8+I=X=T* ,k2)I_P+ ]@?0 kw NZ5 = o4'!XE){=NZ]R%՞q ҽد&b' %C6vJ_ 욜 ~q;&1=p8h58Ԕ`:J`)ݥX8hzMiWu|ЁKh0{#`0#Y$*DN tXh P#F:NmG|ސ[b y~cPw{B N\{#/* S.lБ{!H@P\ rbe$h4 (5(Po.F20ҵ)Z bΞFBB!ϛ¦dSs,0䲙e5w0臞AJ <XWYgU)2>V d>@v!cQ>($4@dϾ͸n/yVߋ$7+Y;FܶA==5b=r"̽EjG.w{C{X84|];|gʌfǽ[WVq>>%CR_ױw^ocvƑ^syҖD8鯼Ivw:(Z=%lLi ]gh2]ND$[lITShwԌJ Jd+#A[M”p~d~IV>qZކI@TO@k@bϫ|^|8<+=?y7uF?{8 Ķek.)+NԖ\yp EHпmߵKĊ(S2%kҒ8İ5[y]~r>~]x\N|O}@vA͉ ,"gjG[NkO>fz*Xӟwɚ<7k aGzp]jQmv{dgb(H]tY2T|Y|#5/DǏD<'Ufnc",&pmeOcOޛ$lb֣?NxN`.;Wfll65NN$sߦg/gQ4㗣@ |GNz+4*BO^Mr&Yj~*jzRen e\ǝ<DuYdZ0cS|PJ߫Wlk}Mx,-%ü yՀaw{Ydhy6g]G¢ â,*_B2Q#Kh{JХˇ %l+) /,K*e-iXy*[U3/ y'M P)CT}BX ez9ZcqZ"`TH{.ZA i*BÛƛѢʙ 5!A5ț5klLIc/ji0n%Zl+$eieǂN[)T.^1Xym<t7e)t@Aߝݩ| (; Z5U {jed< Hzʈz̰vRAP2+0`^yv70`XAav7 aXT`Q ,w^v7v7 v7(>KkwĠ |bxO|O;pH-8D-X%4;96^@ j" ?k솬/j@,,=n1p/eȠ? /*G[ATl/mx2 ~I_̃`xYB2ᩣ4] [0s{ڹADDݥ@b  AZEZEZEw}C+QϋZnhޞV^_N" V(Yv ֋nbd-YMY" cL~݇.wnitZ.[Չ)OqqSV0`6RZ_cJ%ł, }I=Ncl{#&b˙2nsqVf6B~5 ۮh~R ǫ_Eco1(G&acgq[x{?9/[@=ג\!cvM%+wjŝnB2wD`Oeg܋괷ؠF@F%&6%#bb.-7VʵgIb2f"YFiV4 X_|ס{n{[#QSok]ƴn52把f)JcIieadsnI"+3yW7*%fn >lyVT^fDhn5t3G7st3_J7Mv3G \˨ҥҥ ҥҥhg@ Jt)@ ovΑ^,L KA`+Tz`/Ȑـ_?!?Ib]Q_Im&?\yfq,UBص L%CJFrJ,ܻɁ >⬿䎾p&Tn]կs96h.$Nd)ڒ|ڄrsX݀u4"T4@B"6S׭?Tx y0P|WgY|kIu'Խ.CTԃ<#W'QN*j9($B"rjȤ:зnW' OR8 Q܈\#5!%7uSJoWLCv3 g}]K(OR У#@ -EVD׭IVVʁ'MUs3i{X,Klo5 +s wyz]VWUgDsj?w8-l@{*ʡ> < @*yqg{+՛Z@='=@ $ 83Ort::ʉŎ`.'<?+_j6y+X|,;nAs)i ;9;LTxrsɗAhN Asm`WuwzwuzF^k9L:rܷ]7)g< MLݬ\PɳOlG_Dju8 8udSD DWrSA; r.VapjeJbrPԐSƮ.S.݉OkԄؾQ=UiSb1 eQKA&*j' \b[6@`l{pbNHv#l o]bII->U4]LzQncӲt:pI%ds i9R$<:CuZWZC; ysr<^5r^52f}2rt.z݋4|Y X%)zpp5pp[|^\ŞN`E =UC:`(rL @19Gh7j{PQյn}ᙯ?Pπ^ڎUs}_G]r+ ` |㦮:kO.͛٩V ϝN[}5Jr[&S %OퟞrprǏXpi޺6cmƃF}ꊒrv˗e]~[ٓX& dR?S=*eJu¦fVMU qttTum_}\MG|,jK:LJfO !YhkŒ'wL{7mmU`qX z5/S?I}p-!q lɣ{ (" Z΂;k!;KN܂s J)zgOks&U`^a^A_y pyU z*h6;}LmOUh:H4gP- *mT.5 (_@pJVS.E{ u6={Вf5!ɚWk>ϺU5" 0nwbV/@@t3&k4FK.o}iZWx@<VPͯ,~`?A-uG y0P?0)M'r[:T9lʅ0 +NHCp&g~k'tqt%/=KK-D+g T=6?6ws.y5-i '{+Tه_g~^gHڹ}gZwD2W1"vy$FH8XS/T5vuٜrNs_~ʤU۷9jAB =^N! N*cXc~u~uAu-mtC+ @ioЌ_NkkkC m Qbw̧A3jKǿNzƠȸn1 K&B݁B>T6 K CԗVܣE~׋oό[`mo֤h"\=vshfi{< 2 Ɗ(Z#Hɹaۊ^ w>9y; GczϐMD<u|4? ERq;q',v5E%4?{1v(F&ًopvR$'>#l^1|@_\|B,J^DSLѻ[UAY@+o2燊Zǘb"*m{Dmib *jdRFf}֔f7Nt|ZmL nx:/.Y,"75oM9>PH=|r:ecoWbG'юq;I7:jȄԸ2*,nݧP11~0Q~2ZBT-Ǫb~Ye[UY)XL+*53"sx=+ZՓyZi+NipJRn|r, J- AvĠFs7  a,x$ȖqL>KWl8p> h} r68F9q)H QۇG81"A81:1"p|NּGY͉bIqsI$dVs%C6{}bՏp6+tµCϝ/޲Q8  QIJ*k?G>hT!*j1i癕BʨDxIzIP꺈KKE@E@l:DWЃ" @ D@ϴ2H,`tŘG#ɀ}M@][n'W\ <"}DasAq%6X層  aw8Cm6+Θ/G>uC~D@.>}үbnmw 8?8;#L[j; &FIS$ɸ#(J! 567񣢦[ -:,REhA uxΊ\gǁYBv9y HfK2)<-Ԟu,z &34 +(}v gߢ"샸#ߓɋ.z<>>MxЅ=jc cCT jjn|H!#&4&z3WPZS;rõBUE7! v uT8g8gP?7 nx:/.Y \ 3@ ;KVio/C_D};~?cFdo9yUKSEq;Iw8BèCICDqwj%'%@@@0{ 9k=ܓJ؁C( AL\//>nj-*IJkO#u&Nwd%pdٛFW4iZ)ߋ 4}dWm6um:I&qL4V.>a͕g Ϭ73{,қh5ykP#33KjYUV=̽>}rWQ~0ʜw}CDZC?VZaӌ=>+,l &!wreמ}.IT BfazTWN @:CaZz33Xlm'=cْ{i,xD1d +)$ϝLqi#|3"TvQnWFZ siu,WҴ[erm5yn*xlScarUN}@IvKƼ{Fװ"_/ؙ?ԜgAM]*؏C3RTVdEiCqNJ҃7Oojj Quɧ%MlK*8d<-@װ_JAߴhMtBZ'0*Aq[l+lfOi9Լ,ܻəډ~kF2wD9ߥ-گdc6rh]TЛ XB-:;ޠBxwMba|IM8d/әQbm3Ks=˶(p^b) J*'C?).Yˍetx??DM9aٜԒn[lƃ~}ꊒn_l/mcq[,nş` meOcOޛ$t߭Ge'7.rAXܷn«k(#f NH8!tB~[[SD"l |ٽX#O'cMHf QT5PZf) 7]S5x(bϣ5\ K. 5e>L|uJ,}[PE +pCOieԧ9h%yhSB+v?o=(ي?x;x;WA3{h~fe<v^=9K)\ŅN:!\!!\! nC$Mpy }Զ [Ȥu|}Ticܑ W2oi #' '? HԮ؁CWdf+BGo$턅Z\QX;w9 Y> 'VAr]6͟"|X}ND{ZmK̏6F aն.~{jsWψgnE&ŏ,̟"aZ+&(K~o>gdŨ[ǫ˦P# (C>ܡ*O_yqʾ>f|Te{MyV*:q^cuzyIv"޵e7޳fH0k]‹vzOc9q_cR\ˑix5l/yƝ.S4EE']ܨ/GKߛ,FEixԷzpG5I=ˢw(2ɗ9^HwZU.G!G-QnPuQaQ|R0ӽN ۈ?P%lGjΦH/τbnOz(<1#wFfVS075f­WihDD]/c0,A3e k)Zn4k5R-tk'DǏYedݶVEԍ%} ئ>^oa>[X} ?WxR8ʞҟ7I #[8uW w@8m\xL?mzęAX_}frS39֗ǝZZ>Og,KɄhe{tYBS|ޅZJ13 7r;@1Ps2:pM6EOtuuR("4*x`D$8x[c\!u색[\iZ&fqBp)݉V%)6|n4;i0S3[+43VoH6Lʠ=€Foy Cy'wL3UzPCTHZ3E:a0d<6zcւJ$Ȕo]+<}(r'ٖԫ.s +k6a9R%4~Q@Êt%bu٬Ξ׭dWycN Bko7K+Uz'U;j4!M"Y5@`jþԺku @OzC6Lvޛ%]14;ݽfwL< 4,G+ҨmpaɆ7{[caqIZ=fjUX 9K{xP< P138HH$Z>\u,iT*J5BZv4M4b z>.(FfoV2iGIa6;M(s9M:o]^ސPC9S6ݒǡ"V-OkVQB*tB*tF 5    Ġ 1/ % %t &*t *tsDaυLV}rt@ dLrJh &/I3YiʬL8cfBK*ڕA8A8APQvPqK%J;J/UbURR=y;jxD#FOϿwsKh@flS:#ߓ 3[3 f:vnKJj%ѿڸ/ɻX[]KVjj%|I7SحnxX}mæ sϳD5iC11C11,PۣĠ1/ % t &bb |dGtBbDp } zZ*L:hZ^UaMlrG_]HZ hJۢ(w,ԋZPʔnq䰭` o<4? nr vBGq䎩nij'sÞW隼rNEn45S2~4e"wY-uy<[pA4Ah^߻CpT;6MO{K){9 `|).^l c֬oҽw䏟pI-Mn=Mi̇X & @,?xJtna] ݵMaCņ9N/wuOC=?e랶&W%SY[)(9A\ՏK??.Jsu;=8?̑k :?L1Ώ֮{;(m @ ЂH߳;tmv:NP( $f "\z@ h >ƥ)q= F~99bGX֫U$)dHR)lu1r !߿q A au#+t Gbş]2e"xܦ 3h.Z{z1[??`=?B2wI hZ^Qxu@7?KL_S)i٧p Mp -=rW!d_C Ԗ%:q=Vw98U,o`t2OƟ&RNTBуqi!U(Hu4:Huvv1`"، Pk79"s:%)ű=kMփGZYŚp8 @gCQ#yzs˗n*5[qv=spho ]{dtup>TK'jgL_-6$ƣ/k]^bY0ejmC5衕%P,i _NaZ w8j!=U_O$9N ~-~p??k4R_R`C%S}CEaE1)e\bh !$`Jn3wOH7 ",oK-SO?$XX*oG h=PK;m+uKWB?nXSN+JmK1yz]VWjU_m /~%Zneλq!~_TRgWWչi=߮kOQ9iL9=wQ^p٨W\|O Ow>3Ŗxb3ULL bL" #$jbnR'wӃv+ GܣjZ Q\lZOϿwsc4k99L[3yktl=SW0V lH!ˊbMs c?'5XTF2Lmʓ:Dd1ڻ >_ۡZLY C8l8=&K:xR'~XNf>Q H;} eNǪ}K{kOm$ݒkWhX4h}+}4^ Gfeߪy6{n6]yS^;;uvTSz/4gB)Z QQ=iXnL9¤L&` O:s3\\ScaBJzmRݗ?i"_2d"WBZeIGrR?hJ {C70m$#i#3Nn7oҔ,; D8l◘KsI3][ pN9Z2FL g%zpe#x 2)k$a %5qC.yA+}2)P7"g(~X3Uh@f] +>L"2p =0NA==5nŏ 1%>Dʰ[⮢| xW;_99D_]5#!fFIf0ǒYZIYJX8w o/6܌#cwr5ZFS+헍gI>HZHc'8b{ewڿns4{:RVɚ%$qV]j-M )i N+.BH.(WPȂG`l)ߵKG%:IDi%2aZo¿C -vLpj؁`Y㉰>B)8-Q;CxLY8;Hr!k|% |7@`ArX n01kHJfjqt.V BS4HZ )#iȿjAEaÝ(A.OZ xVOHޜ\6 \+}Va5qj;a Y ^Jԅݴ.juHrΗb#tZFX*q*t$' t{WwʶBI_H؁`A%Uv v>k3jPG[J˯nj) 2E8tǿWb/òR5rHz}@ǹ ︤<2]߸G]gsԵWvuN$Z|Y~Uӓij?9 kOؾE$֩VHBRT#تX}~iذ܍k Ϋ=3wb3F~ʦ1Il(fLdvzVFmڙ_v{Yh}^ݦi):w;!(mX;/u.SZcU&GܦRߝ=ƃoɉE'#qt m|c(9h${9G$OIDgwƃ~}ꊒ@/փ.g<[\Bi''M$߭G%dPП7ߦ׉K7m?#>L3~9`Ӻΰ#!)Xd=GhIǚd Zb=5]A;bމq#+ەI| PP|m% ^Ȗ sF _8Ga˙mIiC/ղ̓gNG׵By䳾T7U:orlw"V<\3yeN-Cp~dVZ( I/n7"C3qx2q;ql?ް+UzM>1MD JtqgE<ы 6| @ }Ha͇kZcj  @Ĭ7xrAZݞ(_a0z{ܮdSsuƞuٌ_|gI֕Wf7,KQ)JbJAl Fl`Al8T٠K Au^wkuw^w%o V7ҶǛh[}TmބKoVd}_46͚J &';e8^^gR9_K)(!LlHW :j=b|A,ȇ c&k8q|[dzregea#qHE,Ϋ`r"Y`A, qi@ g7Q{@ڹ@ڽ]^ ms\KP 3y*¬,$Kk; vv?Krc iۘ~W7~R2Tz]%VkT4V?wi>\}y޽YQxF/fr;H ^e~yKm?/z(Qyr|$ZWUgW][%\6zٵ6(U;A_5wK-]b/R;J`<@&3NT] VBw4z*"ϳvT@T@ـ$T|TXT|TbTXP`PLHnGpBf%`9u\D 7)ty]/XzIŧXL~uu2vP(Mmt`wjX A]pmFzqӑ73#'L35s@"WjE~p~@*<&Uk%qa;@; w`Y$_#_ %|Ys%a2k/O"(-8#H-ԑ(/ty;gM\Q{*+iޔ/C½ (n(LԞ|n謝KBD)Z?dY!4wst?!f>yrs>3'h}L1s$&WYJL$yGf \iD}pR-&' ? iV^ CȕJr `Hq`@Д˥q& )fpK;;tQ0_eࣴ`puk+%k{N`pus2g|`ٴa-M1)>=e 30K ?|(kIBs0%و(fb郗-[$&-,8:]׿' E?mv4E;2ֶjA:g-qTNgS; ,ա6vݒ:-؟գ>/T+mv_YY"ul>J e}K [v3+g-sxyX}3kk(/N'5,Ǟ`43 u".2*p.2|"I22iȀ@ +s <@1 +Zf;ᡀqS QQ /@? NA F`A1,%8;[-Nl֬ S٬ Sܬg /~G8iM&jT j\2jOk̃G>-Q6mFz#&,Eȧitnc7>4Z3$rXV?Œ G? FfweD[VuC$LSS ~PC *-Z4.awV&I精LsRC\鳿mjmi>?$* Ծ?ҹjf])TG[޾ߵz zfPQѪK?ma" $ꉫ[MV5]N[vpIlܷ]KQ;T+iq<8.ܗ{O%pE?C hDs,wG%D47ckEKufXM^Aj5 J֠d J֠d ijAN'J> , > 1@ ֬`q6C#,/mx$N@ q%3e<#].;H]..;HG8ŷ,](1p%I'ikcI9$/5XCkfif^H)T/~_t؎/ѦVUM*7~az\iV+" s{mFyL3Cc?gSN(VT\'rӨ /Zm]S{/Nq@%fjHW(A£-1ډiq eetblK9r]rjF֎Q,)MamދZ!/t#o ]4K07XzHP{P{!= V{fe?QFs@x?m༿IGipDj\(ud!t |/)UP*pGJ\7R .Q*p\ވ F\. O0OOtK(~d38 }` }`;~].7?o&oBoBt߄~7`}M]rݾe夻W4LWN\zYhpPy&t׿fjur/}uktEV WLPz?&5C?*CM|^ tUtCnlD2Շ^)2d8 |;c5v*mqTc֪mK^[_8-8BF|ܬwm?p=HX0?_Y@,/CՊ,%` $ X 0s0sq-#CH=&TA=z|zj>³Bw; N@ Nȷ^Hj8hDH Y쌇}FɱWR?ۡ#W[t9CcR?..v&AY2TsfgǕÃ[\o*6w/]H}ov%Rv[J{B )7)h 3ܿ \>uKɔʔ::.8!A8H%0ˋ\"|Rr+T]|p;.շBY I")E_GaV$!z?[Sɰ\6RB3'>꿞2b1pzόa9Z3tX4ӀF<_Ge!< hYƒ/uLJ5OKg}0s^vfcCit#V4Qp^3Ec别W?=MRwx ˖Xr P&<58xahsAZ?qxur)p,1[Up;Ci6ᣉ3'}<̾bh=&~#+p=\I9bnuG{&߀@n P̛| oM (wrO ߃؁`ɃeZll|=*;ݭԖU0ntGVI m /Ԣ) ?VoF¶ 1QN{E!}5s2:g`K?ahlO+ί{}3R(M]A4U[iT0B!:uD6+Pѩ}g陀xzގaU߇oxЏ]e-]?+PZ&3T KjaZ}#WR/?U$w:ezvTc֪:-.a{4b2gź'-Q߲[l8Rdג'6h&XC+;d {YL}RVXc_[E`x®ͦK5#(J#tWi\#oyNRTPvm;!nm:'ΞhVTmk;'a͕g5%Us}_G]r+sM"zj}9]jܩoWf[=W5 IZ/\v ^tNRO ~-oJTj(-9xjˌ~!Og3T6B;S:Y : ZM9fIrWc. J 9E׷f=OW0dd ֽ{G9cF/4|vN?¡CưޅZNM͍bV)nS,\-o_JWOkZJպX6kϢk+Z7Sg+&v($^ $ ,ڰ_ E#V旔=z֎v1Kl @{,LԤDG$-9饘h6cT sKIZQ-ׄk=( /cqzzh7$'\}NuAc>uEIqtyL9^xl''MG%߭G1 w(epSDs񏹯Ȯܷi KIA4#B@8R2*$ >墋$ ,%+*cMHISRUkcvE:H6pI/H( $d.A2X JUT TTL~&?tBUn U/lczZ~xy.۲D5_Щˤc)Uj!WX3:O34:8.t3N03m*פ&"ޒn/.XW^uyu?Giqa/v;bȾcj E& `]ArjdEHo YkftGgRGJT C{݆)bzӝzٓtf /FQTNVc qSHr03lk~z-_-qfqvu^&&% I8U[CAU'd*ZXbsT%,`*ͦAsrd!DQeVKDե'fu2։Wiz0rA]0{ ;yY*PG )(р (р @o1H4@iXi|ibiXc(bdon @,,]T+pD51\P@b.C `s!~r:8ض}>|@1X$h 0V*Rx;vr=(r)p>8Xc7R*%o `T'DKLz| 'YI|-RB:g!@5AiKA dYA/Q3 yuBLĠ3-jPHGk#$Dɢ4!%([KxAeT`TvT].QvMed#c~32 2]ֱh X0F95̳b_tnqѠV۔5%fz3ET/_}8Ct |L.a. } ~~ b,0Aw{8\T`UV-&T)AX`.Ao_-8o~rYrl `,A˷ėl`7͞]qpD~f?tr @0?N @0> %3j?0H7<6gmv JZ iVN[L>g{!F \#F:SYwp+/E@{OKvـg^ 9k=ܓv  t |L| ``ܟ7{{aOEx0&sANQ^e^kGWZ0>Us}_G]r+s[C+ PioW GͶ:9|U6?9 kOؾE$ҩV`ʢҨFQvr5̋{(CX:[ۉiO5{17N/zxlȥn9u&8B_iIB euϻ3fy+^:]f闏8;IZ=fj}dc>'C-l> SC=G $#nSG 6}hR;Vڡ1N yٕoGZ>AEqxm5 ++ztR41VJsH;͡鉀9R47F9l$-m|eι.يp=?yo@8яn=TdvП7ߦ#r'2_sԫF_}frY9m]fgVr#[%V R2z=ukC5|ZLp1%YAT-@ # `QpO,].U ;]cT*"}3ǻQMµEõ D͌>z˝^"pÙAO$y{S\imȗ̬ArRFsJڴj1Wx>لWyCm/_,`^S꛺:v[ G&BG ۲mN*%<`wJàyJ`R#s!?GjoU0~֣A@2x.] p 2U2a|40la# a8䄟 |a, °a@ 0lk GhpI/<* $^.A2X z!m ;ȶ].m ;ȶF#0ZI&jj>NYͫBzה˙R} IͿi#Γ}MpEsFi4;I2LT HSE*T!xF* M`X >HSbCĈ_vį= ~t D* ~_]w'4洱N:'ĝK^:lʨK7y6tV޵$ q@gum)N" q,F# | ,|1@ bѷ ѷx^з. AK0qm^mA  3yW`G+ y{JӼ׃dRSòm.% [DiDAkt׿Zjz5Nb[OoyeW1a:\OF:%E,݀FgwypG0qK4lqr?1CXEăppw<ȴ]dZ׽SyvqjJBoWN+4)9vUĵ5]p?~W?;9 ]HE/}S6ʈG/ `X >Hb-. [ݯ%;s|UGA0~|A3{h~fYa(KvקԊAWp}v uTDD_&.[A?c̔ ]ŸeߚA40c~Thu dhQFD>E/b8S\4 K8j"G-Lj~S/#n%ԢP/Yrp4RCZGU/9ֻUʆ#ꕒ\Bxa4.y y8cL6r;l\ĺSkf;I@ƞPhlt!D1=ytv-~NW:G0<rM|[CRrt H$uo hE$vإO~`;D X4jjrI'kmj^ d뺵=\&xg+VuNHqǾ: -XQt4cF1xrh104HK3JF Rn1!q^ٳV MT3Wn*;OV*z^wś^HM%MDpSHdNWR;Deړ+Ěߧ.7|0؏ /\,ըG=yY'v '#B4]ǣ Fq'8lj^GcW"-*+OkWkiF=oOa{<F>)p6⫬%ޓqRtnj`ާhqDyKmjLB~Y@MxFS,ȤGZlgL8k.zݢfh/+{}(ҸPD*\~.o[a֝-+?[؁G!1$o ܲ)$wEqd?6u HN՟s;!yg-tÞ5a@ؓĽ$u&uds폴Is)^oܑf`|*XҖ:k5'qd}>V`urۄivWуضc7MX<0mݖ}(b;LCKMh6Sd<"8cjƏhAŢP=ĕ6i+t9zcFzycΣcV(aI:$kS_T V'^hO~;:MLL(4i4xż?=)6<;7>i,M, kÑbQ並/]{MeK4 AXO9KFj#񣍾kڅ)QGX3@ \聊)D[bEl` 7ڧY yː{^?! jWՍԌVӛvS}qu'ReE-[ġc{:\(#ߜX|xwz ٮ*uht4t%0 _*:YN>V6IdS"9 V5w&9uoY&Y(B.8rc/4NX{>Kq2x0+bR-n:}* ̆MqHv"cF?:k= Wa[*oqܨMn'^@ zIJ] &R:xkQQ`hT39~jxTVoeVvm[Z}& h}#Tخmθ#E43)_cNJ3ۉ}ɷ~TƫpRX#>Qs`,Zn(RTSw:`4 fxNy|IZb0_>=(ug)Өo Ө1 E *{7m Q_Hd:I d>$QȈC'J IquF~yahۈ* fsgO/d6)ŞƆI!9CUV7{`2*922UHcMG c;eh@3huLZ fX,hⱙX=j=,+"QQd{?LDK( ]ǑknG'V^lJ'q /9z|r-W,N_< ?˻A?Z32&7&K( NxkZIꑈanAV_H2Lg[nMgR9EKz$9ۢs6t3{4ۡi&w!n=쑵!$$I"9D*6xJ*^LiVdC=;{q8v&S3'%-z,:Wkb`1{%H:eiIqD '&O돣p!DGrwz](ҙ3>Ͼ2J]6isOΩ h$V1)IA$՝愺¾8h;(Ta1c+[UG@Oۺq*d&=)';Omˋu"'\IQ4?ےMKi$hW_.+Dy3X~M׊IEıAYQ±cMɾD'gL\'wM/`a|艑@IH76!+U]3#]059l [ׄNq1BN?< +ri4XaZA'V4L0.J˚VsM,΂J=T¦V6rG}|}O8>9\iEכWǩwgh&i~FA~|8-~=BgVڬ|`qbҔMu͟%qzy`u{zǕnUb8fl̯,`bY]><]m0AD ZksD-ߙVl2WzG/AO_"OC"N?LkиZwt F"LD*_6zےtoւyD( u2foH PYwnLx!Yʬ:И^CAG2TWK@)x6u+C쒛*f[㪶j#߼sIkɅWhOYfr>F٧PlޥԂx~+ ٻ׿Y=sJq1l\IXQ켺+Ubyp;o ׇUS*CmiEIfqm!}H*֬4%#EBz3'/.%j'ۢJѝS{1edn1()>CN̵D=#OXGJmtN.wyМڤK7PU(RC1GAeɾh3[La OPQlvpfmF AJu>f>i%݌(\<_]nT(*UMT ꨠZمF6cJo 5xi& hW (X[,ڼxB #qy8D15}! e#sOy1WӘ:/1-RκRv:鳨sc#EdZ:NMLNX!'=,jV9ճlx U-`Y=6o[Fu- Y\}"Tu2G\yz]VkTUg&E߱w.?f]v8.*o)v8(XG:3D#9O x'{YW{yl3 Bڄv ΀z"+uŲ%h$a(a6) A$X ROki4kIa_s-IJRƴm[>of#8fɻ(svI^dWvy{Klz'WE^z֬ρc][K޷Y,:Oכ[Thw}4?@5{Ou;z2sTP4mMA_ʀO(~iKZUUGc,(lZc~<87,V?I)][#~wrbQ& ?Cިkz\乯6j_WI3ӌ_ Z Nz/0f'7FC^](V8U|{|m vI4G"h, ͋?4/h^{k]Fh. ݧM=ίuvA<2;uōOC* ,<ɚVpv@y? +| K X`y`)hR(qUҾXC;bމqSYe/MCq@6@}] h~n>cyݨiւc`)^'F)e1%("n`:Xc7|i>-׳\@n$t3BؕCxFw}E` p5{p,1q( -11խr :g@>"@ " D̊}rWQEWR>cQc6q=#}f/иレGicܲo;eC@Os`R8rɱz%Y>93AW{~/^E=}axXm%tCԃw'(EQY[}40Zn<9DC%\BɆcAz -}Yhg7TUzZdF 'aէL%?9 hמ:.IS)_#I%N_TF6kdS^:f&ɬd ֍Yi#MZA4\x굶]Y}5 wXtM-6&dtH5996UYPc'*'3Rn[_pVO9*d9BK=e I(|Jj-S3Ĕ4nfl *vP FNc ~f;<d )H:Z `ʡ= xF<̨&вC]햳Ay1 Y(! Z \@0jjpq,j;ꪡma]5ShztjE@K2uKf9|@>9/F[P׿~9.~vj|r|5 VnͰ2C6;Q]( ~Eۖ%y薫%!Iؖѵ=upp>b{ǘG"2jPfsqG!{K2nEJE t9Eu4C)g\Q?EkRnF蜝piVqgpT:;BM}1eszd"Ga*Qdx8$+L\"B5о$5=RcR,"tؤXfhrFꔦ o*iٔtJW$WB"nQE."g B+=AK.ZK m@h^k2zYbEelЈ,j,M`}ϵ`]nh}:r|¡(¡(8qQ[CCCC C8 F4|/Zq?8&gX bKyZ>)b׽`w\覭ϞEBt@?^1U:&|@ | D |}}13SEU FUx@[`AX%I`IQIW_tZJj5,ejuZZO];ҊΧٚZ‹*ɤֳUw[ l5*l*l1`  塨i9HM^\P"\ +AW\$`J,}ŤPL ?Ť=X bPL ŤbW@ t>_qۿ# ^9H-0nCK_fCĀپZv8> D C!glYdڀkQ'vP'.K%d;dN6d/NK>s6]׿ԕc.piZ_fs\<ڲm> cݚa?ޞaueȇl` wp]e㣺< gAm[F\PH2NRF]lt ToO6PY`]& @(OSO_ODU sAq6vKArLJuq]~ۤ係;;D9|C%p+T ]qqYlڎ{r/yCR}tkIj>@OΎW E^@;'q[bJVޒ6dl̉*<[:$KbCW5c/ 8-,Fn Z趀qA`AA Aa2Qv:NԉqEG=3E݁B,2,].:Ou"` ;([u3Q,.A49T W XJob ZZ ]ʴ*0LɣJ N5ot]fjvP([TQ`Dqjo B?AqE!שOƒ M` M`MLX9]))қ"<[v]?)m?)3c W?Ho٩]k쯫zNT$8kc:lSTMxzܖp4C=~ ;KsvI=S^NgĨً`XTۦ[dK)(N!IǕnuk.R[|* Pg|iZ%3Gq؈QggL: ::@ :=<1B`D ]#x^ 3F+2]H?d,0AKdvd"Kt=L3]t=z{jS7qX>r\ 9q ~m_tH.@+xW%3e<d"v((0 rg0HR`aC7ޡQ%/(J#fVxl[*)~y0P g A&XIG:h^x $.7. n>c?`St.;9}bp^Y4y-HT[o\LVxW}"Cxct.t$0G|ٺ#"')n2ej?׿qY`9._U*U*(YRPvޟ3Ũ)%R؀aV݇e e],3'vR[7m.sɩW##.}=_g?lr0f4;;3jP O[:0[AjH?j1Y>l.Ha \CM8,_w`_ItW쎬d#Xl_LC8E=CP?rK7$fr ?= ԥ#'3GV''@>7\[OeYc xP;tP&Q^%ޒܣ,~~+J۷j\!h+Ǹݷ96^gOc/Ѝ(W7mf԰@2}7/9z}@j@FR? >m /~%u+sM1TL=Ssh?,wϷ#Z$/ "SGx%{?9 kOؾE$T B>* q)sXO'b =ӧ0-㾜DFZQ -5RVK9k.˽LĎ9#ǣd (@Gc Aڋsʽ-o_JWOkRԾԲڳJcZajG~s _ ~{쇟j,!%.Qme"1Pb s=26z5wUhv+jM1/'N1'sĔ+}ٕ_p9eY?s϶>p=?yo@pG|"d}1epbOIS+<p,"qfc_6<3|r'3XIZq.?cMHb=51@LIFV* vP Fhjh'n<xhH3\"&"F,e{$k$3ih=>JaGce(R>jpdzQoEz?QS>c]^k/7 ZhЌ*N/faSa?EU9iXB9,_V2xTL^^JLc#}I3. ̮6.4gd!zOH-Q߻F̋:j9mF'+32Le@7Y?bU`\JFe8j!)Y:tMi¸$D_\Vfzjs: ̟01|"u.c~Omb?b"0j&LPZ tM&I Rҍ x0tD=:b`1C~/ָuW@v&*xAMb{7͔̋zE0'_E :O)렀J c6Wy2jE} 澰<1Orԕ뙹}Txq}xxg?8fL##4wU5k[Ǘ~(#w3wk93ƴ/B=XqAc 厓/}jG*-8@Սah$6e.&p\1I@Fȗ]Y;KH[MJF5m|=hY%W)9ޘb@~K;G?J~G8Ĺ%((( (g{(5(bQ5TLXiegJ\f14ZG*)BAL`4OQ q G_<8z" L*:ah$8Q/`SOf0M*4wӂ 槃i# #+AX/nEO( d]Cˋwh3jFup޺-kyp=1x^pn6]yQgK28!cISCgKG|W1~)FddIT-Q%O:o uũ/(2n2è2t&3 T뙤&q/]TgNl , uTƜ- Mhp{ t\íTi,(\t;~ `Aj%2+@00kKnU" B~[DE>\v  vۃ`lD"^׷ #e kj|'{m/0Y{ iϼp'S H8:zypS9 vӎq\}ɜM&;$xPVeCyjsH!2N5ϵQ!}b3NHZT>k}(0~}^jOpG*6g3r jiRUj6a;s9 F*].Gʥ?"~~~^| N(KDv] 0֦R:q0{eXbN<}upefFQ47 d[q;ZRk?GGjW]yΊ-">Xa#>| ,|1@ srO9ktmE.,].<7z ۂ0_# م?e*.JH#`#t |Jp\߼ w6@X`.AoB n ~-nN؜܂ ؁ ` t |'.)@00` uE@d`2lp,7%odVڹ`$M ĀKG'רn2@F<89 89p>p,5pq@[p,Y{{c@0Tι/KjZLoj @,kgZ `S6_)  A ~^ؙa cԘ X uV棨G@lD` x5+nwB˓ ˺5~_h)0t\2w!\ܩ_ZHڴ@P` u@ruC+ Z p6!E bkib/}wr*O4ڠ5Bah/L֍dpJp-dY!?zӔ͹oԆ2Td {!k{" *Ie1e+hGȃhٗ+]ln8d,?1ȌB-?HYa.+Gj'H8_!ChWC" );u~)/@o"7 yC`r<A(Z[%]T0h\JFk'wrZ#Ӹvڭԍp!uv&_뭲Bb x@NQ3?3`c5i+-tnm2`3 mHU@kw`5JI@IIy'U/!BeKCb[ӓ_wx $sIشehp3EBqk zGN'wVY!DW;p,,{0A`Q`;;t+xIH/ YF '&%ؾ7}T6XPn[_\Y*ʆgN|'SQEGdD| t®?ԴKQA2)/}uC˭y7niS3ZO# ?yZwϷ4eAQ'[Feص'l_ ɋ.IȩVrJ^0B%G'/gۘb+<1cMfIL 'S5qI6}"" o̫#fDSF$[\Zn ˄h8vj,43)V-K=?t|o4ަ5V[ϫfNǕ*߇OJsRir[beO6#٘lNhmkܫ+J1~,?}Əg1𤲝,{N?S@OIUzj&bƍlU D C!";7uspb2^\zW{x3w"~7`AE %2+@0w?h׎v]aڮvڵ_KQګiמvϴ]7m֓qvK{;ZRk?G1K-@#gh^_Cmh^% L%;Dgh0`%:{---с -Қ] Ӏ[pO;@f-Aځ[ֆ~ LL]: ;AF _.vMqORvdp@0& م?ýPC "dނ.Ao7 y7@{jͣhZk,Q<Y[ %-`x` Me8jFg@Wc@`]\*Ap?pl P`.RNZL5{0%ǚqv{ŪS@Ɣ<`JACh+.%9A"q@&b.' 'W׿`ފcpo@poĐyf'prDe, @C {.ypYBjmZ m6` ux@ruC+ Z p6 E+uN8 Bl-Nw!7NM@9Բ@8ݑ}+B[m>+>2?ŧQ?V/=\d_9 1{V&;$#nSu. uMYmr@qNvR??7ksk5se/unsFhSr4k p{*E9:JeNV}rWQ~0ʜw}㖣yC+S+յv,5X뫚$/i ,]{.t')~RXB/ *zQs/GYW\|O fO13Ŗxb3L' Wɽł89c *$: ѿ/\ZnY}5(CDzn{N$%Ӟ:8o=UcVz1Mhnی}ހJ-9Zb!6،1 s Dݶ_p E)Dl gې?WxR8ʞҟ7I L#[85K;YJty A. "ur6=?#9I_}fr#_ord,,bE1#bEd9BK=$k>%U멙 bJ7U,<1RY. ћB^X]:SPz`/X@0J?ևDOϿws8$,9X tu /_cr EYlNq $hzyGy+W?+n0ϝtWگV  g{K x}dCW_]6%Է~,P} t@dL=8JRH ] @Wx vH5MuG6a P 9\Ӛ98181`4_v4_7`A %W`4_Ew7twniw&<ݭK(uV[}#ݲl[ҝmZoդdRk?G^؟=VZmC봃9ZM-MC4i7 0Z`i[`ĠSbx:.t5ۗ"O ߔ,Z߳TNrpqDkH օ'?J4B (^|6+9bUd E 'XPjpb{=+X/<9BbN9G RțrhaC7!g_D*s%6wA.^O@*'Nw!g=1ԩNO5AxM&:BLF ֍dpJp-<=yI- k4r3JZ*[%MR*x:1OsKCp&~k'{ J GԔ|"R${E:,i j'D?I[\7j-ۖk| _E!dW\qYsiP'E⊞Bm uO)n# $aZ9ci\Aξ Υaqݗ$伨GsAA?/DK ` Rv `A%`;N“ݑ}+B[uATTХ@q-m"uP3 C02N=gVrK@ˣP GVxzft C5'i&zQ#G'y&5M61ҥF'K18YLs>oAԼ :6oUcS&:7),,MF.:E'0QNz.:nI2rHt|tbtYvP F4H-U1ZFu!wxѱ6L{;;n5ZJx}dNex2rh\qntg%$ ESO^3οͻEk)6GcZסW䍇}51o< K~ghV?QZ8qqlcùTX QܨY \0&~N1CZ=5>ϚCh$όZj]fvC^t Wè`IZVC5Atb\{7Z=Y>)zh,5zfe?ȏz0ߣvEUهo,1*,Lz #ɔ)1<~z |xb1 ܸ&@p ";yJ̶."B!<NcR+PfTnDIHzYI5"<ض2%PL{9m+d4YR#͊zVmlQ}IO}M6#+0XI<;iȰpTi"K?Ԙ7E˲y^{wWT&i G} ZPm0"']οZ`Eʝz7&) FD XӬ@c$Rgŧ{dJU4tnc&-e>׎zxE iQ1;^.V)?b3EzЍ=W w2oaX3s=9<9@iX}GaJÞՆOf|*qZ:M Zw-aJ~ j٤X:QU$WÙRnŁY [KK@j@ꂷl] @%dw~=an"m 2fݝe>O7zӔ-7u0֎+s@cbt^܄uR;u:YTu:Yڄ}ONY.B ;(*C#XWʼnlǎ+u ƹV^!;QqN`++l+`s}W4m asX .J& % uؗߕEa:`?&`ح<8(09ar++l+4]ȃ?]M[ݯRJ ,԰9w:Q-! en7a==sODEh=hkBkB;V(0   tЃW&}{+ &x_)059[D``Ԭс<=h9q'P9ؠA3{8q'*A^NmK:2<٥CsbCu: q@K I T:(+38on~c]Xb8/"dWŇӋ/W0=>oU*;7 ZAx ST:(We_Ԏ؇֗6K x[B9dLc `FVVaZ[ @UwUjwة\J(`H 6HYؘ 1`ctP~W /[h8k;"|d.Z8}@ '&-CXUYv. rTI006i`*|s A$dVk@Mr###8:I A]:j+Xfh>$iY\fhD'&UgqE v꺾9Tf)N[9(0;av++l>N75\*XwCt.P@\WA\o-bm ~;^_]4?ٚ@ s&:mv\ A]N{ dQm@ȵb%outKVk.yx?kښc h:V ַʮlî##؄]ـ] A]\:f/a3ÑkiFfkQ#@' p Ik(@wEӛߘbg\ځ´3؟@ Nr4aWWؤy"x]K:۠ (۰<=`oMQ*A\+{쇟0]WL5(waYYY^_ǮhwXoye- YQ~ ؇V'#6mP9׊Zuv (@wUѸ6\ [gmH"%&˚m:/lrJ036԰3"xuu9dgVh~poRN~}E,0 =9蚰@a++lݽj}^ٞ<8(0=az++l^gܵ;Py3lMŁ6 Z1XM FFFpRM A] ЍtpɃ;o_5}Bdlm@tLfWWؤـ A]VpgϠgٚ  h*V 6`Sڦ?,[q!CaK@m+׊ L000CtJC+]hSǘU@VYؚ 5`kt~W( k@uYڀ6A F%ctqdd{KV%μݘ''0O:'+Wadٚλ@=-`Pâʢ |% geSjt, hbJX``00:(2T.R `}%I P @$ `2 `  "|]\8C>w/ w m0׊_UwO9*n(r@[U}}``1G0G:(k0G/z]Gwصk-q1Sp} m>>PS Ka@#S hyZdַ=D|/OO`uPW%C{І5@mM A\+/F 02}wf5jBg1@mrl*}Ʌo4ʵ%Az"|5!$1!RZ71:n 96js_=TڗG M%Kppڗǰ/: m^h }3lf1 A 3\\af LLk,) ck51O9@$LL 41k01:+W%kAƀ5 e&&LLppU@g7^[! A!'Nppڝ;:+WBv9Ѹ8VC=G<ڀ6k` F%Av"|v.a l6ր5G@}r$ K000j%PewErk] jk+6 $Jؕ``+O`WuPvWeWKtd‸ͥ]rTK]##& > N7_ "tދ }R}>Y ήB|0#* AđyZc&'FLLNu캏_c9.^avG$0$A\+{쇟_݆}rξq5(w(fffQauPWx.qy;9@:%Cai++ll_{:>BuZ @N K&F-X@ߕI]<4^ ([S(AD? ``6)aRuPvהy-KyvM[! Aā&OppZG>:+W/\7IvrymP-׊cؘ```!lL5i^^ةtM[ymP0# Ku3K(JƟ.Cr{Zoqk H6nL%{!ܒ4w #;kϠ@B~ 0j7`hߘ~ `ߞ~}EbD Žn͟9yÚ#' y`[}wL3G[ c Rx0aÂFy>,}X;3Z-URxov9lw krȲ6N+tZewMK2d.ODG (J lesx}yGr2 IPDWQO- u'ɺd݀Ezjkb$>b ^'á_Cᅢ>8b8»VVw1`w_x p|׊9@G+ݡ`߈^E?EG= MM7IځwK9@G<y(X7ȗnQεO#Pn{2@q_^EE}c{;;%;u<_b~ yq`͊\k _'dM@<d9@ O,Y˚N]i:|"݌2+;svpCڿww`w쌸<ŹUT3D]ټs~ns q ԯթ""S1N=qVo:\XT!FDwڛ?9z=}{m)ũRC؇UUS~%`w9UWhߊo9\\#Eky<o FllA.![-XVXxc+ v}Bt3 E j6N"6NCU@Uߤ_;q{Gŷ ^8h;>PrLl`@ PPP/w3 .8ttalҬN{e h]+kqJ>.Pw|\qwIIw|ٓDq5K9-wM.oht./] 컵lݔ6rL jb R>㛹9@~>}>=|U;V/S w۵9\{,õ"#} =oK/7][Yo?rCڿ;_MjJ{Dr¤HtB%"C[@[@[]wA҃@p|]m(AJK/-Ӌ @7н.t(.4]\h${He sHkq/' =qI?v,S֤#CI b[nT/b:TT@@܇r@&.і HOr\pTTu ;jϯ qQӁw8e(S `NuN5P[$a7>t(A7| 6CW@W@Wh77m%|]|7VrߏU_-_ҵ}iӀ\7׀rv.p \ ]]]]\`.]c~0? @9Pn|pr*@fQ}f m@9-\[oHPwnky80pnWo7w< ޾`[(Aj-#Q.Q3upuWps:o-@9-\ us ps:+׹ }ebpjw˩=Uw_{^nm8A`,="en y(@_DUoۮb.0&\<\`.(q) k@9&.w ҅"|]ʾJD4F q`8 ZZam-Pvm } q報XԵ[nK-|I 'x:8;t.:X-wB+@+l-_h'7`&[ V}@9Pv^v 78._ɩh}Copj߀S[ʁrpY,ÅVVب[ ]HA@.=>A5\[pw@9PbV[ EEE`WupWv-Zz4&iWb{& (} uk:5^x k:x,f 9{0Pgwwrpmߐ" ֩ lys{ \` n8<}6mv*/ ȁVٌK+lB+@+l٬&J\ c' a'8q[Jr\W6YQKq*BulvYX'C4MZ}1ѹ"P뉐>w6oC;H'MM7MגcB~(Eg2_@ttE0솾IWmixwJ?yYOяуɵSKT|Gq|=yI/e=qスVֵӉa˞runIq w?ۣw^HRI=q4{a\URkyR}I {v3 hn8rXR'HǓ)FGix w}7 ï7QAHPJUo"'+RHuWRk3SUr!oڡ3p5)Wdz_e3SJ. cqU cq'ef 'MHdhIp>Y+)[u} Sq~*~=u&] R[nOT,iph(+ "rGm6)s512lj~&.UuyyXSR19cF,\{ey`//?큽\Evޖ_VV򏥗|4- /rE|5*O3_lAC=V!κ\3渷@/RBq[[v*=2K.uA:A:53̓`:Q]NS/00PAg9r=я^K_(SГ:MNpeIQR*w^TqzZ<Ѣސ.];3>"|7z\ӿ?zlFOOFPhI@M!kT$?d\qn%J1-` 5b6FD;2I/+{nL4N-%4DH!JbnHKKF^Ӡ*φ熾7-.~|W%GX]ok ?˭KPMՅo.e8U #UT]9JaFʞB U?>?UWC_Zxhv3Cma"FQ8l{ _|PZ zt(rԓ*5F[{q)-q+gׁtٱ@_D'Z :(y𷿇^uw+}2y#?U &zո2_;f {%[^YS!+oީM\ sdHf+y>wWu<˨hlj?nDmW,$F^˸#E5lrH Z:4r"s c['F?#c{\I?}VTx~S[by//ir([~YY?^Ѵ`~_ռcSwҞo;#'BX& & H-4E||r#]kqN[}Kuxᆄ r>fq§5M'VQ6<7iŬ\BnwbYH4bw}ӿQ7K7Q8JܺT T]R6SuK0RuK1_LՅ/.'HjKQ˕BN@٥h^yr nu-潸6o*~2ǻ֋ Ӌ9[xY?f(.>F}yas}6Oj])*)W9ѡɞ˃oC]ԴpK2 mٕfR]|kSfKt@ڢ]>jt5g?g؞7 otYuSH?VH Jߧ=S.=`ݗ}/l)TN"ZORz>}֍*lr/UO\k 0dNH[S~~U Afٽ MJ:6+d#I*Ķ)^ F-FLOM2 x&o͉'5kUuePzOVV++8TF Q ,'U1ww!͢fc4`DT?GdVeK@ ܮT,9R7E"Wj9VGq[ģ|#ƃxPHZuF:ʵˇ2'Y&(y5E0)vork;O/h|iTfo-sty7lz=#jOkW鹞9t{;xZpHcnNȴG3A6)0'ν[<('G̥z O {KU{10#ߡvxr&oOj4]ܨ|RヨGHPF1 ? ̐p5%[yӳhx(5HqZD"yB.H20<ȭziz$gTB\}H#D޴nJ+u9@ܨ/G U!%9.5|/׻%۩ÇTߍt4a[7+n_| '/%^I=] 3jU`5!DZHQxfPr{M?=C躽`9pM{m=Ԧ>iX. YkLg'%5FiLqq"j$ _ԏ!UWFz,\቏ 25mMi gdJC=Y/ G1=K28HDd;H\c?sZ"M9RNȍ:VI )+T0 i@,n߈xQ? C'(Z)&+W)%-ɼ?~ ;(M/VW>ANe2MyN.[S{RD~LsYiFr2MMĪް&|#G`ʻ(gb T} %?e͢Xb˞^L("G`k"'?׿-(\ &D ΖmzɌ\}8npWF+1{H>aTh|GMj%R-\2;ٓm^F{yx&cԞ1/aothWz۸=ziѮ}#庴v-ڹ\I&_ﮈĭ(MSl}<BO'|2I\g|LmE%Sx3*s1 cP{f o{`5pGYj4#*]]=9Ez~;/! fyI5մZ^@Ͻm'N<5B7|M%Eqj{O+R6"OWQoz{=R4 tWek=4nmJdt#~"Kƛ˵0!\;xD7<&||FY:r~m&A\||hiӗop.CچAm 'x?=[4<'Eb4log^DnMmtZ!a>!Y6Ͽ=SI~1;'gvho`$vO4 #4t<y%[Q/ M^P&s1e8I]֪alSs\q f=]GkZWx1MSA?!Vmt'oLQ{[k,&cLp6u0*uJ!,}4oZ$FZQt8z'Jv\ĻE qxlw*`6Bhyn&Fu@40B5*nz-Dˬϧs<e֩5+Ʌz0\z܀'6I4hfjщ]49ѳOal=x'uaAb3K![|yhi]g`f1d|+Oñ*C\>_տC \>g/Ǔտ4Mm6*Lx. 7zΆndes+ QO6>)dy7Pc%]C]SǼJȄg( fɶx'nw4ڟrYdHyMݔId)G0~!=:iz+o#~sȘd00m>yL`U $2C<)gLnDSF#JZHbfG3}ZuUv H6uу=amuFś6φCY烷x:p|NГVePL<ʂ'~(zl*3m_v(Ǯr; 3:ZR[B?o6ݼMu6)6/¶6 xxyNGPWnhP8 cq{i30rӺ֓1 e]yR}|ӄRnoX<:2as$~0LҠG-]b׬&3"4NLvb@z9OOy>N49waO X:&<o6a2g^ >Ş JP΍ѪA^3%le#DNb-n7xGgINޯ{z5j{8X8\}">37l2>;vA|QcREZLdVZ%c)UxI]z:яnD~o%KzP')yvE ct<1Lə)US3GMzl:oAft:[g/T9yDMk:R59cG=_G//T5//T5//W_VV򏥗|4- /HXj3Oį=0Wv3p¹R2N5qdd\qIk]ZN&q 6˺RԐC.ofs3 GLyĞ--EYAc%%UG2HO ttPӞX^9X ,eD[oO}:j/i-FrB|.-<*rWX:9spIHס2XFy$zI1W "4`M)^gW;k#Zz^pUǾ,9xǔ0"l`i1Au!8.Q*4s @~#8N2r4XTB,p!\#\. |c}zq$/<[~: „ TaX@f<'#uvp!8Np.4"Zy0"80c0"h6p8_N =r:zB*sՁ"A"aġw#f#b-H3%MOK1_4($8T$DZ@DBR^eK_Ȼ3#A#aġ_!GBkiVtS'#4\{CPC/C} ͈ z/qj*gKp!`\#< †llhFk#J_U7-R)AA^Jh%-mC2':|JkA#8+0ދI[\a$*9/RoQν'zC莥Kl3t-uzݝ4őW'P1E4(-f(-B-3G訩m*݃r !(9*B*īKWI7[_;`B@:F}7^-`B3˞}"CŴ`Īrr@ ьh;],aڶ/SRx5(##+ѯУD0%w&^{PG6_F7f:V4h0&8l0&Zf^mBz mEEqhE >dȗsmΉ)*}P#8P#Z@fF Aq(ݠAz ͜HֿQ>!#M{aY\K `Cq`Cs ͈ Oeyc*> >8@ ЬCu$^0{"8"Z@fC; |IF޺e 7^Y[ p= DCh?C8nCDZgΕP 8<74;GGˆCGBoi@vSf8諠o5XPV V@ Xьhi':j4T/׻J>>@ A&o<=_(WRtꟅ7F?Fwb{-G{7, H H Hq'H JMыi])A*wA},"8XFz7XGp4ik}/b ?G/ˆC/B8phF4GG0P;’$pKzi 9a0H7&$ #; \[^lu`i 'ˆC'BlhFpKtV9nh$f }_s/ۍȄ+;VQz1Bmjp.lHϹ9ҽ"tVWW׻x;w E_/7S i[-MNr榠600;«p.=Ͽ5}>mJ5ˆC5BDnh)'_{8xnnh܀ ьp95YucCqC 9U!L#վ;L@xmLhFtd{KCG1MGw1="4C_r67r zˆ BniF{)K nlG(2i~]~$h$8$\@f⦓z/L:on*t RB7Iؐe lm:+nSn`@JJqPJ (5噣 VYm"@0BypMu }־K X?Z_/Dsu T@Dn iFuZ qB DZ`#-{a"N2B_ҿjR|c 2 UXۀ "\0IIˆCIBLm$i`I*D[޺KӺ6x[p&&8,&\@fxQ[33G}&_ʏ*.A.aġw.!74"9 =_{/](}tD^m^C$%8%\@ O+Sat #t QХܾԱㅸ'2fW9*D%hP$8tPB&0YrL_ĩ0=K@ S+Kȗszi]KKgQm7_H4]*IP &elj@>&.q cm)㢱U"~Y2wrVK> uVS_pTɊJ&UvF B‰|4GEJa:ZŏV TOXJӛ,TX#u^2k9zj&~{ڒ#T84)rUaGF` -SU(EU\S:KFBK :9]%+>]b(ugtŭDO}BQ7)iLy4r٣;*˦>>!1ȥ̉.]? 麐bJ*0zq\ěF5؏nq/=3T\߼O%ۧD f> ""Rf!=ZG*=DC?1.k\ FiM_Ş]!EVI٨<* 0dҵpx<<ҁh1nעqkFǵM^>8C(BQ'dD==rؑ M<QgEW_/eѾTL,U&`Lw^H2O?7];t nu2G$Y?;/Qo9[**gwj SX8TjuF otYvv; PacA <15]+Dc^ME6vh<]Ɏu<˨xMCU'RvJCG]gUgSI~=ػ$nxCTg[uo Q z฽WV+OZj1(..͏!WX*£5?g*»Լ[2o'úNSOL3m9ڲ6_^3s//͗@J=zNį=9v+;ohkG*KUR02.*̫V(yyyx Gqtu9K(1zRIe5K%W9 "3kԑH#H#H#H#H# 8E0G0Gi! }UxMcccccACb\&%Eŷ!.y 8*GQ Bӵ$\.\[r!v>]s`jaj9 {},L fj)g|\xϓLg\-cGÊ,6uqR6bbKɘmK1?K;_\F]:Q)]sa3h\z~AAKk]],)7c޺%ti^t9Ӎ2up rzxH4Ux/,oiFI.Ā'NAr0(LsOIǞy͈ތ͈ތ͈+?1@ɘBdpJBdl@dJ!P2 !e2J!P2 %C(R@XA,`ALpq Zi䪁H`````;m)@Bd0F0F0F0F0F:DJY)8).\.DJFdDJEdDJo,A#&a&a&Ipٕr_Z_k908gD-=pQ1\GtgVׂ z/Ѵ90= ƞ6zo]52ේl'JtT8H^ɋ?DuTY{>XZ=lj]ܨ|RヨGrMRrqt8Wdqw/kuvacR4&!,効޼h2\|뜼ψIɺ HI*MaA%=׹-g $f<78Dzy!ҫY!ү|yeTyþBq.g ^^K*TqQ. -{ʍyds\+:2\(u plz\ Vޭ%eqWi \ӿ箑Wdt̯ {}l8'{]]]t1Ј.GtypDBtylUCtyD!< !e.2D!< R2Dǂ >aA 2.S2]q-˃:Hˌ._cccccCtyDY]8].\.\prٽIzEiqFv(G@A@>Vw%VQ_ildID9$DsXGvI'-1Ho _=TNKt#p"b*/_\TKKiOztu G:^xOųN0)'= ܀ Nu'S`qN z/( ]Y3ܚ! 1NCSY{ZFV[|" J#,N>5gI'LR)[yN!' 9a e R9a!e  r%\ќ0Ekkkkki02s¸`````0t 0 ЊrGr ' \.\pr͜0.890a C^[ !҂Q0s/c(,k(^]Pxs/TOȻ,ҷQ|0]0]$TBB%$ThB'Tm"bW,Oz^/B8Qtr(XƩT+gEb c4F+\ ů!uPa:A-Qm2 k4QssN xx$!'ڼo$^Ix0**" }J#kTn p&r r,1N)j9J@|+r r Jr`Nw\w{gDDy[Y e>NR)[yXLHr@ʐ{R;Ƚ)ێ;e2 bAZpzwp'hr55555CPG wa{dz wp;Ƚk]r aj_mDzo['c#fő|vC(Ј(bsQ9 tļ]}p88rm|FtsI'ՠ 6{w~2;;drm!q<R{V[0]8 (v1ş  y B.#2B!c B!cD  ' ;be  PȐ2BAʖ ! e )C(dHB!DŽmG( RPXA, D 2 \F(dFFFFƝx  !2##### B!,C!2p!2B!B(dBӆP0 0m7`;?bDPdEFPdEFPW#O+ܹd\-,S*DzQTbfȑ; + SETs\*8şDW8z䨂6w=3rkL}a+¤$9=unܳ+FY!;8]@wlIsqx2^4}`FVvbkɭkc(SuZ"tHXF7P2"@EpB뒤['91g=_ @oD^~¼1QDFDnDppDFoDem87BV e )CoH"CARߐ2H"cAy <[z"3 -;m@Bo0F0F0F0F0F:Y8.\.\prm*6""0.@@Pe <04vFF`hyD@ ("赣z[]X0V5ʺc`z(کE>@PK|ܐ×ϗAq}ŵUԟ }oZ]Z,kǑ`@#}7utCO(rR)TSuK8NՅo.%HՅo.|1UtNRX%(#BϯOЗ3C8o7۟/2=7[ceŶG^Ͼue\%APP.z5C幦#$0aUW|o#.%NrF$,& a(dK̢7uu]L+ٞ z$wmS?ʺN~_?ghľnut-ϦN;;#Ta^]caRm7I#}2y#?nG(gIPvu5.̗3^{k;.*$~%rN"MATHg~MW;4}S6xQF@5S m]W44]ŕ''y(3ף@HLg?f(9%!q3NVq;Hl9P4{cR84Η,}=Jy7U0z\g˶Aޔ-!KR){&'tlRflaAᤰ )X'e6|ox /Sp\f%.3¥`X +*XfŰ`Xfy6`C6`C6bC 2V.eճ0 0M}j6pmjK 2#\*.¥ `pyK??c_; ̶z9 V\q/q5l.VfロD{t6q'(y6 ~y@afYp.G 8 0̊f\Yڧx^f& :ݾĆlh@lh4q:̄ ZY/p5M}}eF|py;pvX}\fK eƓ߰o p\fK  `MAe< /3 3Io-/`Y;s`fL`dc^ RN`6N\ 1but ddMd l2!XfČ6/ / /o/X^l1^xy!^:V; `w]a*= ڣC C.=^_VXd|e 4 z-)<+^/TpDnt :B8R!} R=%|d9KT[E=q\Uz_PJ}z_|->QiT#LiUؕ='4 'tT] IsrFx/,3T'M'7GR|!MZeWRRf^s̫@x=}}\G<xGtdR iՍ3*>v~sȜ S"|7=ě\/Tն ,4-A_ZRH?^w}'75<7PuUL@ ??lVv RzQIow9摗tI _ ] 5n0eR+.3N~7ZIgk|H n0CH6quK8mEu3T4eBKd-]!qlz{_4VV)0"T ].k4+ Nixa]'4taCN.zaeN|͍"mϰfK.4[>za$K/^^.K%j2{ 0bH)S3 N[R ,ωCqiź]000LvguO\ͱձjE19k59Mg͢$46C Q;*7.+['=|54+*;: HTF) io@6vH&},,3x^lI~фEK'+Y3vdl3^F"-.'ܳU>BVT9TM~6d'$^KS=K7GoĎfޱ$8{):G"tCSш~۱_p 6G'hFQQO==f`)]Wg:'ߣ)$J#6LT=wˋ67I=ғu?ꊄ:l>f~n؜bϐX >sD*-پlo}_ʥaY$hiiG.1,>A(6<'p"n3/iFGkiL |Ҧ5x%@N04o3\kVuO<[U^ߜ0K}^SPx7e +6|>;6Sg<ھ׼H}l6ݡJ0_4.I9-&i*nDxį,}BXFU敎QW #WtR˽Ac+5-AŪ飅Umݒi="=4$j)~^IҬp&=XyhiKO=%}.HHShْ| Mx+#IhɑXrП4 y<9Gul}R(ygIL0'~ ^D <-?nhan6bG}س>`%8Gӫ= ^rw7L=p1?2~mO5S>o{mtN iR.j:vͼTvZ_ʐHأ7rL!'6jd-=%=`ől}>"7*vPS&+cYY6W4l!yޜ yDǞ=Ip&7>]L̺~WTXd4) FsT޿g_=w"ݍ>+Zs=u'%QVfI&ti/,8U.?Ҟ^;4UQ {0 hԱNoyZ[G_Kd;nē3}~Cfz5]xѳwLDK/B[Q%KOk<7܎8|;6fS 's3)͓@0号ӡ4>{1"zF0+X;b;5?//zJ"9̣yi_q71Lӂ协$2мz4mm֮0}>>''bDjQA|<mEfz[9n:b<]-m<-^[7Mb#>/3I2ڧ'wim}?D ~.[%͔lge0wks͞`VmFs.f*8FQ)eKUߏߑ0c"dkGG,">K`c2W0 S?Kſkf3;sŧx T6.NDE3ɖu^ FVq8u}DoLAF'䙟1cHaOG|o_{C&h2WO(WnIYPL>Y:dS;#} Ecv/"S X=A%dOvd*WDu;8oNⁿ6=w|(N$,foʹלq 8=9n9(ɥtF|aF#1:Tjѿ; 3O Fg.l擜m؏6-c0/x7`&>}IP4ԇ;llipAUq_*bx$nM 7~ɨ0iJ}T`G۞Áِ7 8ߒDO"CwubE9;0[Ͷ[dO52q&~iQ$85a㲵'}rd|j¸qxh7NSa_<݉5BSąO*޽uv&Xˋ?+Wl$cdnF|#2:W$+M/;>3]"i"I01Shq4 41}4<θvbO~H6OP1TQ&:ފ^PXkoimt.-\eWpEZ}S2zRƴڪyJ#yN}nd(/d9˃D"P_YL4xkJ֟!bkQ t$y=ϤUOį.aɸ'wi4{\r4JX3ҡLN8"+Hl&a񱣇/Ԓv7rH5gUU^L iKO|<+}l?H>O<|1JL@agJ FP} zҏe.m{0IlJ{ <'&";};0_2!'dQ\t t8yݘ{:friIΨ&sej{a~LB$R4E3ÛGY(⛏3x9:kSMz@c.e\]XӺ魰dJgӯħw"tf'WR2ClR+S~Qo4 /aHJX9:xt>xFIDMzwzBB]N$XҏgDR{`=77DסњF{ja(d霓K%ٷODLpd2fy` |ы#$nҦWњUY:xAMbEISyԍACLBؓ7OrmNRGhT}N}HC.z D^ڟp*Gbkz]UʹJګP5g9:ғl{vO]' wǕb~|g)om%cdIoXS=X+3;>y-@I1Qw\%=_C~צ_zFXDjq^EN=ee%XzG\#9sHO\O?-vUVG2ռfXxdW6 ωP2qV)e^;:G ̫̫̫K8J5?G?{a ]tˡCb_ٞ%'Xѿɷ)-25F5:S"YY:yyiu*'CW9oq?nc? I?MQWn 膘5$_g1@,È.wD+Ƅ$oxTx (Կ<) %#s͂:qt4AcCkz64p2#  ^Y*-OPi@6+jť̀AʞRVAʞ ,&lRV^\ 2HRVZ RV\\ʊ2HRV.\ʌ2,ڂL 2XЂlS:5^uZՎj{vI zP3GQ=N7p>X#X#X#X#X#,9#_EPGPGi! }W~.##### KJ6Y,,, JKQ80n%rj\E vi}P(6 [4wi7X(lQTŊ3ɋƁ8UeM 4bGy&/uMեl7Ua7Ub _B]:Q)tt]|‘QH]ܨ|Rヨ?T=rRbJ+iUl+NْHFf!Ӆ.e|!qޤxI^V>K:BMw,Tw1r8xKف/uNދ׭eO݉xD^4Oĵɩu8GF#l4F?660G(acј( L"F#Fc)aaC=k\a6! j PՇ.>l4BV6Rѐ2!l4t a V¹`A 2炰۱W6aw--l4##F#l4#####F#-"0°58Bh .\.\;yQV*&(bTT.׬|:W8B7mR[rUrZvrphל6PVGM,3Sguޚ7];_c,;ymEVj|D$#hp ƌJW ˳-@G cc1y&tvMG:H=L1V`: ;#'{*V@n2(0c1-7[Ex-#SGNqN#jcǧ"|^N&.=@o7c\رa0N oY[幡 1C}Ux@T^]B!y(6Gp59DdC4m2}d6V納Ͼ!fR=a4t`4W.F#5ʍ[-5>)\w}'A7ݳ',Y]v|^Ӌؔ=)\sdEbm$;&J+^uW2V%3 ;3)8kL?p䆳,i" T`TR*Vq}͑Y*5"MSuzޯjHuWdzqeSg'R5>c >twW%q'JefzLr@HtTxDMq%?y'Z&ڳqK[(SuZ"tu)УǴƀG/fuqN4_#JS7m͓ܜ9O+;iTDS<}9OYMJȸ\32V2(wUmcyW˙) VV_95k ^шVb spXooBQ- CnM#RMK oCmǴՀ# Z.\mvJ\.\p`4(!j xi5K`"(z( ,kh^1.?7aܰp;h*؀ -JGāEEEEE]tUNjk 8#;u>n yPiM"1 (DJ#\dsbP:Rژ <6`0",`BLPZ Ŝ&zfT>,,83|XAAŲ]@ e \^wGY*o@ZcdyCݞnGDi\x~trqmngsCߛFr Ueͭ 04bw}ӿQ7$?̣˭KPMՅo.e8U #UT]9JaʞB 0?UWCRQ>4ދOB/94 'ҿQ{O^;qڳU|*el^KQw2CG2I|\ek_ L֜9ANro4>uVrqkFl 6)Wڂ.Z-iq`ğ㿢tUYmTs'eu1w}'1/O*Hjd?/,/eqov {C9r!qr+UD DG+#Pؖ ۵ D]HWX|7ҙQ:#t")8Z-!MHw\IOPJyX0#UNJ-Qi¶R[3) 0JJZS*ݓ8C=l4a#7EB(,Zol|z8t9vJRl/x k=CQ T!y%}CE/"o2ҏQYW Ϫ7eqs|iIuj'tz$£Y5ųN0)'= IF  kHnH Q-Fцg8Ku.wppkv]>dJ&7б$?nR1G~L2<G S\ 7Iŷ:N#B =K$DKb ^K76BVyKKX8YڈЫyEB]7_yճ=xQ^d:}o}e:⻫O`=PfƯG4>uL0a;7DmY|;"0l =7/jpqtt- .\.\p`v̕1? -6?ov#hbK"""".Z o0@BHz"=8$8$8$8$8$,.&34#H$E" Ӊ-###DN#_(z:֦#+Қx$f$a^,WwI"fq `gzVtB B 4-ZRxr/*82})>]uCνP=!TH߂TOI{Ǩ. Ϋ }>7\\[Eѡ\BnwbY3c X]ok O"(rR)TSuK8NՅo.%HՅo.|1UtNRX%(#(̯OՐT}-gTn?{D[7ʒb/kgY{uJ?H,¢0Zz6A0UųVKtڢPEgWn'*=U&I9v ؾJl,r 1${0T*Vĩ s.2 tcӭ)'Y<Եs~Y<3;(s<\ɠ4緗ŷ]=Dȕrż!,ҍͨ:q,a^O̰z>p[^SH-3T;oHSXH7y>[iWSu<˨iҡlR6:0>twW$6?ɓI@=Ӥ}Y+j'Z#OxNã8°-ֱZC=]1JQӣ&E?gjU*frL~i[[i`oi-frF'&0u0t+όQP`` #á2l@/>6LL 3gu8LJ}DMoXHǛ,fv8{YMJ`f*R0*TRk8:Sf9oaDHAN/ڥY@XCߗ.~VPAzx'lJ+$mIѕ᭔I^.uE߳%: ^Ks wVo -|I5rn};Cqu~t/:P:[%72;DKQ(玏ş_¥=wGW^3Ajo%#C/}O͉9c.$ Ӣ6ꩀZz㱈:-e^;` d"5PG!zd=JB~DG7*Rg9;4m\H}~MW;4}6)xQAMJkHN }e:⻫,ydW(3ף熺3j&D9㶜h>Q)sZ0n-̀d>+WC%ܜц+;pTDaD~}ц RFaR02.*̫̫̫9J(Q'޶LL< .!+,FtVU@ɟTpgs`7?lP6`1 k 2,`AfC 28y6倡W!}~ᣨŞlUr>X#X#X#X#X#,9zEPGPGi! }UxMccccc{[f U*Wb dd-`͡#8ZGM7Mגpr fm%lUUfy!luBQ&iIh2{ , FbQ(z9_Hbx$ -Sx_`*#""|/|M@Ӓф/^{{!ޮyo${}(unu-)-9XQ6<7it(]XĘC#}4x\J T]q.}Su)F.}Su)择%ԥs*Aiݕ='Fa~k9vhm /dx2]8[ SG6{W+Wos[edO3edzdK@Ex-E?WHMxȬ`fyz>#`lEGo5On Drx, F#&|LܻQ}E']:l/"[z~!n7T=[ GRѯÀ>Yu5iY2/hTo_^ֹ:'w?fhDr2;ݐqZY5}j;Ӣx~IN#*"~"O":80 HLԡmI~MRbEvi\Booڡv5Wdz^W6ZlR#qJ"0>twW1y䩥ž_JRK#yjODv/鈎o,nEGJ9q{O.hܪkM7gQ8D8t]9 5 D1$.K:vH_I+94O7ے4CQԥ}N}DϞ.7քXN[J|&,u ,$#|J2ߡ|11Y3=DɎ,Qkja[*fL"p\ԝ'g|e'Z c'SWӶ˵J)j9J(d^-g^-f^<^Qk\WֳC8#*+ do_шj2}Ram4̜]&Eo<UD͊Zmq){[ eRVAVTR{Hle@^9Rl N2H30 e+2c 2, N .:--5C|M}GFFFFx>[yDi! }S~.##### w 5 /2pa5 4]K˅kw 1aj߆-#;x+0iAtLDqGwDqGwDqQ܏9WF8#][{B>+ x++_^q|嫁aש%ltma9Ս(rtv劑tC:;_txrvxaK _'riʥؙ͓Dݱ+ +_0Dž2vپ-.0~5WNxeHl!e2W!2 a1!e ){+KXł ž`A 2{[ހW^"쥅W^xDnkkkkےʠ`````;^ 0p.\mv fnBjLPEPE\k/e=Ze&pTܕ\g RZ^Zˋr 2/-hy hYS,b*O| u3NrY@AAAAAaX.."" ,&"" 8,,,,,­LK Ϗ,,,,,Bolw}'/wRb*>X$X$X$X$X$֙W ddqX"Y\N݄ͶWLXKb2³BBG/^NpCνP=!TH߂TOI{ǘ <WX*φ熾7rrs?ebLm !Id%Xn]*j.}Su)ǩMեDz.|o.|1UtNRX%(#(̯OՐT}-W0{ }ճPyh=g:eM<GX4r#KR(zU'B; )Xӈ=ʉ>u`YSXzҳ mi0L^7GI?=.Sتד>ʼn0I.:~Np{y:Oq2}udSm< 4mQotǦ7%P[tlښ͞n@GAR'^H^!9xiT\ָ7?x:?_?FJ5yr-{/t/Gw-rn:_0Z9 d+u2{wOiJm)4ѨHrU&Y6&O֣V\0Hn$V=C dIHI .ɠOiWӝ_}Miֿ:e4 P6)Lv)iV]W#+$ϧefzܘ.q{4 u^vh4Qu`,\;s.5ejKA24PV #ÓX#}W'OZEJ;[bfA?#y\)E1%}VǚC3N [pb_[ˋ}yyO{=//W)/++K>"pIԝ'|e'X MZ''SWsˣ"SWK _.8$8$!OX(ǖ#[.L5`!?貓#c$.PApB-ȉO*5 TNPRTOY. 1HIW;@E.Cl"R+$A}]<X$AS*DDc/ IА IАm'9 +Mf͟$hsdA{Af6G ShTnԧXn[{{f bψۏg+JBA8UZqJ:sJ+?UWo֯r2su+ Ґ+ Ґ+ 0ZȕF4J|.r!4 D![b#[%@ʐ- Rli2HAʐ- Rli2dK![dK2،\i86}-,Ra^RLfy[iV0cCZ;MkWvd [qZ0qwu7!hN彫qR JFk2X%lSΊWt<q{맒E&2L99^ۢmَ yb)yMȫdZ=C^yz{_=+NqxC)))) )0HqwGD;pB;lA;$! ) eHq^)C;HRA eHq)C;, |bIA>qplz28$w@Є$w9 /_!8#8#M@ <0غ5_Hr!4!/_HHkV<"']6$]8a~xk$ H$ H$ ;dIcί#c&&I!JDIjH Ln:OBr͓$Ijhr u|ȏ#G(d$G8EY&T֑0A%+Axm2kH\u)[%P( }' }' }@O@T}O@#}'@'!} '@!}6 }Bʐ>R 2O/!}  e2O!}d< 2XAuZuyA|P3GQxîkkkkDwؼx, cMH*&22222[x"T,q #h!5 4]K .\.4s?JV~6y`X^ X>Z6jI @IP=!1LE`*S0v;h*Κp#qvy"ycƮϬq{q`ZluSm2av 4onAA$N2B:g#1$lRNNn5,WwN"bRalJKSZ--"5Xq6`_ :B8R!} R=%c|\9bOks?4:]J1F,o5f'yTcuMեl7Uɺ󽁺T]9JaʞB 0?UWCR\phC? ]W:ĵ"Sд5/NyUZJ:d扞8-WW`gy65V:(0~cvmBQKO3^4{:,] ׈ ?џCbrU$96 ;D$W£/"bW3^8)&qr8TխʜCUyPUV1T $NT-]HW]vE߼쮭:ǜ?"~#^E尢% $ |XISC_rԨH&zdlU?FD='idgq+叶q] qYE_F{xg?U󣽐]hlJǪ^*eV|ԮmR+X*Tc핪>STjk3={lm(/yϜG7At)QWќhMM9~_Д9 ^DhصsHD+fZ\Z*#'+3cKĠoMMqU*=RYbSuʶ4qogʣuڔ3u.V*^d{ WaɟoM&l]8?gMoZ?jn& Cl6Vٰdfۉ8tlSnZzkcP}6 1Iߔf˞ ,SML"5M*B>mhO%tM!ey;3W,&u/OJwF*~{l4pTH6hwE5o3LV&frWG]BT/'^/^N/Fޘ5ָ[0MD@:tuqu6>=S]ĿkFwvu lJKy)ucwS z ޺mvs"]fX':y)7$3A7ח._fH(nxǯesy0q/zG߫+#xʺMU t6&tUxHkZxTTrTxA?s$ QKh=L.hM43wWL-F(x9}N !fxq(hjrv%PMC$.#;}ECvb75=HpJJ$t'Q}D}8eڵv3*?q@ID p#6oHĔ_vhK[,XPwq8YTŀ}e:⻫xqPIdUѳ뮹Bq-Nvsz#RҬGw Ŕky Կ]u5Z3_H2p!5 ~~F+E=MN֏5u.R19cƣPqB|CmYG^^3<^^<^^re/++K>_E|5HOI{ps|ۙ^CoG'qythj9J(d^-g^-f^<^Qk<6^--ba*9Y8F=6nlD&抄XuaǪ1Л;e]?p 1/h8z aCɸk\f0P5PѴf_9VDmV[\ Hi)..eUH왴gKYyq){1,!e' eRVAʞtlRflaAI $BXUxA"`$c/E&lio!X#X#X#X#,jg_@ZH_{^ytav-oX*Wb dd-`H Zpqtt- .6\N\K,NV8mQnj::{iV*4WHy2/YHΐ|j{'s|QY+c~C؇0p4>:[dUzlxn{hP:(7j?F,hEy.B5UT]R2T]RSuKK4*UҺ+{O82 s Aӟ+Z>sq깶PϥgץM{εw,[(Eɦz0-9DpFgDp~:s9;saH˥4ǽ;y35eQ cUeDp^ a#qDpFgD +3BVR)CgH"8CQO!eRΐ2DpƂ "`A 2#v+༒/ Lj ָoiAAȳ%DYDgDB#Dp .Wҹq8];t1݊p@Ay!luBQ4MKB /_cc\1^$ͣ 6iyX<0x`QkW ؒ<0MImV*T88)amI% KXݙ~~]ܨ|RヨO"d|z,ku-mSnxjN[|(,1!GFgKN/Vԟ }oJg;~|W%VB#}4WzR\J T]q.}Su)F.}Su)择%ԥs*Aieݕ='V`~U\thg54U/u'Q&5lcf ~{ /_imzޯjϚj_2IR6 qTϜ꾢!*8o)N=un4"xA0ѠU s/$#/g' U^Rg!&ѝуލnbD  Hzay䇅INOZml,O[?(^+Z"w{ Ptir^J9z;w]T .0hzםtP eШB[+hPISYf(\axwǡ6JOHW[@c|~LT7cٍ ?q%;f.tXScM1/$Ĥ,'>C_^*J3׺7v|ۙd¦X]5*F-r}x932V/(5n٪`؂pe5sj4@hبbBk}RE_~Al^, !jqŷ@m@}%v +Rv ), RUHle1!eէxv R)[B RLť)8!R-&dQ 2XAC%]uZՎ?^ : Qxf85555v挏xAAUW5Gn F ,,e 9pqtt- .\.\p`v̕1? -TJ69 r4wA#Xf((1?KQ ttrS(@'A'A'a_bIVcNy N N D-8x#x#!av7yEEi1 e%/Gǭw,"D]c00sXc?4ǹ8Y #hs7$p's'#GiD\x~trqmngsCߛxrrs?w$ ЈEMF,P`;JܺT T]R6SuK0RuK1_LՅ/.ӨV Jy>(+Su5 Chh}=MeEB]7_Y?ZYƱ?+-2ټS\]W#l)$OefiRs$cvbh~{mӴO6n؉V'{ D]Io?:R#wb+I9i~*z"g/CוP4TPy0dzPڢ{8.! &W=5==|{k˿'l艝?)ewC|<'; Q,nʖ7es|=' E·*`{P aC 8KːO-zT34_ZR$=!񇟑>DYQզkjg_*fcCR} CFFFFXΜ"##FI\0F0F0F0F0F4t%0+"".*pa5 4]KkG\8~.8]0t: dN.8ڮyb.荭u_m?????T+ Ӳ䟥\Ψ ,T:E@GCa|a|/~f<,,4:;JcD̑\ 9d(yF$2Od^HdY:a:C9Crc y'$T 0aˁ8rxHF  H`H`kKu֘IBklÒ( R֐2$AʐR֐2$AʐRH`X X b%< XL0$kkkkki֠X11111!5"0\jppr f<P*VK Ej@x=Q΋>u n nܲ\Er @r W&X'p/!/.kHq`_t :B8R!} R=%md@ d@ dx3=㱄k ȐOċVw|A8aeQ0`KDism*ͭ>Gu꣰T>]I,|'.9cyr֐di nh*ߥ{k< r絲ZxkYLtm3 X<=,-Z@_PIri J&:2|ՍDԦEu ]1TBZ5չ}KW _9WnUxM7Gm L* 7:YC7؀Iet B[&Xu=j 5TUJfqGk]sʥ,*^>㋑;DM)./jʘpAWn 㺷Զ-mhi𧗚wLCn5h&j8aa3 3fE8ۚW;->j'os6@ v&30MP֘z=x"r <8 ˝$+B򈜖in^u*,qتy5ͻg;9y/qs@r !˰hoR*>}u|GzFG9 ZR?0qutzcdnTD i+@ʵr'Ԟ=Dz X3|+JlJW0*UR}q R9ƩOpX267AtHLT$#LJFN4u4~[^(̑a͟ʳ^IxlI:R$2$途!It`AHN8$8 -'IG9:@AAAA@ƈ (!"rt, p!G+ .v\q@&͝1th[]PzM@ӒdkGʸ:cHc4-* /_#/M@ӲЄ/_|3 -\*ʺyr"8J4FJut''''',gY@4}O@i*'X(ssssEXgg *@y?Ax s0@AL86P=)L9;n7w,Ww;JE}n}fb{ihZM$#4e fKmnц8 y Ux/pϖ#4~.k'V|BBs;#/|ZU=K> LVԵ -{ʕP(ZBT(?_ra E9WɭEB j"cQ4(@ZmzpKrѕij4R?5cM1̹KŌg6`R[ˋ}k{yO{m//W嗕c%M #t_{o8{NړmgY&z8]5*#rRZjq{sPyT׸ T--iDie5؄e c#216&\$U`7e]uc@E0z7 aCPk\f 0P5P&{ jRVAV R eg ])[6R )[n2H#oaAn DƥXUx``$rf*li# X#X#X#X#,.EaAAŢ"J*&11111[xHT.g"ȿ20}Հ# Z.\.\pr+U6r={ x^v/vs啠r핟t\'` ,Vۘ~ Vj~wmVV^J@қ>Dy-%x 8Ss{zB eҾ!*r"*r"kϭZܪf[yRN9wՙoUx\㞋nWs>LHR= C,'evZk޵-L[4>i]ߋε DƝi)SsKy-kcYBб?^+.Nz\/l34(*_  tKQ=G?tcVKOb,#O@&LqoF A|;l~G!Hލs`=0lMn{{~x|S<@jA#C99? p:Y?C8F/xT嶢l[=N/ıZD]"n'pNׁ1Ikisۥ|qV_R^og)+s\kR:SǿT)ѧJWtwkv0%'v(okE _?qhnHLK֐0N\]bFf2 I%i~A]R[fսBךjh%dFFke.dg.,8Gjd~rݽXwZwߌL $2Zc qS 8e 2Z#5AfʏC eU2Hkh̉2d!5  eh )CFkdFc,`AfC 28Hƀ` o<Cw!5#`````0th  !5p!5\.\;rre zc3ZIiy/"\.Gֹ8z㈟p@Fŭrphל6佂}$ziKH4H4H4JX4O_6U^6\#m Ҧ´)%]-||\.l4eIx)XZ#5{uA OLlb(m`Xz=5}QVeRo)ۀ Z$d5'S8Fਰ-\΃BFV/# GGݩf름]pg"pgxd33LܹUܹ=Gί="QnT>jA'EzSrwx|l C!޼ZG2]-q@/<{-/&_d#Z@ppH;bb@~a1&aIx=F#XtmAcFV+f #}oˌI;- *5kX5‚% J5{tYcJ`f*R0*TRk 7S_isd&P[S=hD]8?~}~MW;4}uο:UkT6@>۷` Z]>'(M70Pyh~{N3f\ΉڽlHnS*ZNv-m%@ѧ+9 N[HųVKtڢPP@X9 8Ε4W,{=u|*,嶑*ilQE#dYejSzg**:@2)eh̕M&U$R_[A:11a0F#n G'.d \sQQ%/KB.B.B.7vl~iT =Աu:vcԑCF>q͛=&{ w LQ̄>}C#6QA")䏶*џYΓ?ZCIZ1$5Pq'0qY]^YU`|^UY\;џWU'y}3$tfiY# L&QtH뮈8R/ʈJ `c)M ]A?BxZO&&)Z~$š4h{MR$ G2AːxdN J%T4K,}2T֔;quzKTIJމg^ .؋Lʲ4e$?Uj@fkw5c ĔhŢvV\[M2@7u ?FZ9Hun飍i@sEz1u|z^c\|:֫1k EaѺ}ļ&[)qvuJeoehpXrͣ3s}UKdVM[YUoS?d= 5@uFiR᷎F@0TDm/H:=|q]m/:Lj?DS둪6b:C:-Vg}aD.KI6;Lκ;,H ׾C0CRg-5Q۫uh:kjqVvj;5ݱz3yԦx=N&كr@[U( R[* ьtPiZM )oouiͭq7nMߛxZ&({; ;iN֋q֪S߷gk`Iyܓtf97zS Z<-f[V|O~5+3o=R+;9MK?GJy'{rsåaB2C)N5)ot5ie[J$u圦H3)L{wLbxwYL220OՔ7^xcfrrk+j\ހ'Tzqj./4 k{Hq;99ǽ{:t~=ёKoեK_kEY#TuM–7e$i9ӗX*DLԒvy?XO}щjkGs/ѡ_2{u㜛V^Ai/Kc+1㺙1TvLiKڡ/\}> }? M9Ngc86_tV>T/N~'}-=8=[߃Jx5Uj.>\_pt+8|r[MDv;kc&E]+aMkYPA447=|5eיc`4DzPi?xCIƹhXѯiv[v/5WI:{*TC3t,;wsq;+[_Usv!Zβ=?_%Z?t|;U썆ߕ{mq; bc>L [gMǫhtRcR_b{+i=Sݲ cjR^g 'k]`峿5v/{|dK6ϕ}6pWټۀ'ZG1JnFAjjևP]*ۚe`%|`SK1̦L_u3 )bJfw=EqNّwg,DQ`YZݰL,Ӫf~aSt*NMޕq.S9Mf4o~Kū8há{;@,.<[G)'V%)lQ1FzpHJfXpc~pGj3_oYy^;R'=o{sU'1'7g#Iѻ ;-|MC6Ϙto;T{$- q{WF.]ut03j'TwJN8+Q'[Yxzt-"N;NVCл=aCd% ^S:τ1pS+:-JXVXV2lceOZ39XVpcVs2d%`AE9ﴨ/HXMjV{ YW-_ C m6Bqy:3# )7"1a0F#n G'.d JGepvG N. 92 7!v^U܉kXj' ܌O ց"P&>Fo$΁ c>pq[ALI LoYz2x/ہ/Fξ `,01)f-͜u}@!D0d3uv.....<zIrfrgI3!:TU*Bqp(P4\UI3!鸓 Qu/Qaۉ+r߰HX$`H|־!{2 PmDj5)H#򸕾88Bӌ۾ j#U TfHH$3HH$~og ywd " P3@T*|$T* ϧRF9GgGf"GDLb& 6 D2 DB"}7L(ƨ"ix!0*NWSJ`0H$ io#_PI4*6 @B !;󾾰`0GP4I* C!;2 NBPI4 H$ b7 j(鷎jdJh$wbM&aI6NGӑR fJB%JB%wEOL6\ hR$gNj ^.1p.e"|.LSZ@˄h-Zv-g\N\ˤy}+`_n lAќ<–qɦdx-_bZLKZ*q r ->SI?pL8&` L0K6M[n%kMգ8gqWh/x"!@m:nd,EXOd zH_ PM!}UWe]5ll]D>0jy~[[$ (&4ՖdXFX9z5$d4^1[vGb>,U)XHYee\ϞbЮa&a!bG꺣Gr)XY\.YH}&+pycѐmLC@ ~))_UM_/DodU?$ ^"8{yV7Dz!P&EyARy@f7wjq=R5r /IM#/mƷk8R~\Eč-OWh ?Ή@;U]V'XM[^]NC6rBm.o)~/~T>IҺw:RMԾ6r2qXn~K[ޫ[9UYU.+b/Ϧg|r LzZ)Ͽ S0)j*iZԸTVj'RYl]^&.Ae/Eݪ`|j=!!jw"Y껌ξ\VtcbLRCRi[i !N7YӤRٓ S@ӷm^qQLۯS֧g{\.ew˿/>] AǫUaAGj JAAߨG]]~gf-dw?hf:Im$;Q]{04vЕOn辍5:Ƈ;Pxw0J}ol˸_m3y/!be=^c?~cvr%'o^UFWwN\w\pRx`['L^[?݁Ր+A[ ww4oÜck ҕfQ1݃|8Y%%7?w ՚zry^j bF>,ɇ  b#>zwag0T?dcx{Y94^:Xu請WW?pᶤscܖC.&eG~^ևenUIK14V6w~<ߊV>* 2=w.)7 ae% +[2lVVʰ[XNYXVf3ae 2kYaALwT:yvTx#+Z<m6B0w;y##c1ͼq1:fc"ߐŝPdљ0*AxA]rrJEȅB77pO"Tq'B.Y)\Æ\ +pn7s"P4y*s q$0N~^^0|}1߇B7WdfX}2f,y_* ꅫV/eCi.|> f͟+ڞ鉄͍Gf!!GVR qL3i**Z\TM6ėSar@"!@B"!m煻%%$D@8PI$PI$Trw 4>B>B[=i]! jNSHX$HX$,r}7x# ̈́2Nn$2 k{5 A axm=* L-cC !H$#> sEs\\&)h-eBT恖h-y.e'rw.e8)_Kkqma{q]7Gӡ8"_rI|ڳvE쬅208lGR [ e$2FX|k)2It@!=Cq85s{ '=9 ;<azX=V+hW] :t}:]AwDM%6In48c=<\.zg 1a0x1xg 1vڍÎξ^`Q8/tw^xPKBŇ^$E;WD'TSm_U?mYWM%Wt|9cİJ>:T`TW[c c'^1[vGb>,U)XHYee\?KR0#{uѣx9WUU.^/l6k:*H:m_&N Nf{DZhȶ^!T ɍgE>诃DսDp "j"8{yT7Dz!&EyARy@f7ꧧWV;~$^&m:.Nd륹T_5uQ"q_SW-6w~ǁ.yݙ0NDʶ**lBe].:-Sb_6,^ut-0~^WM쩜e!YEj:iPGyєD/SM r^] jMp= ++aeX­ae V-8vʜ٭ʰǭf,neZY 2۶ S*  9@8zn;^ȡ}|OWCV ZO h#㠍F\<ۜ5# a0F#Gn#[pǓEY ipTGhqT ꒐ksE\\\ GTс*Bw"N;q6OXp 4hgPM }h0N~^^0nj3~1㇛B7WdfXB0pVyɼ>l^ `,011*f-͜u@!D0d3Ux.....<zIwfwgI3!:TU*Bqp(P4\UI3!鸓 Qu/Qa0Wera0Is$a-{7/}C&>B fͥ!ڞ鉄k#ӐG#q+}?)qq87:}|N-G&˩0 Hf !H6@D" f o$TH$T*;O4R1 LsL_CDB-THL$@m& d Dno70QɍQGҜB&aUxm| a0H$ ﷍ӐߺGB%iUl$ @B w}}aahNU8$ C!wd ;lA%i&0A !H$+>$$o2ԴQon ѭIie6 M&amlu##H%06 J* Jf,m"\qТHΎ]ۋc\Dpp\ p. RZ ZΎ)I0--+`_ Wh30jy~ƯR/~[U {MԳyDF}S﷩ z_pR|m-'q!އAb^ur)O Ί~˽+'ka<1`f.Ż@\F)#+^`~ŗػ*D7j3=S_3pҳs1~PCVav1ՠ,1aߝEFKt$7VQڱhl66>|>'~g 1-[`"XT 6>t-p+"ԦFRD&{PIю a GWuOq[USƖA<_Θ4y(&4ՖdXFXPWűݑϫ*mGb>,VUA4d#f##~LG 72ZeG nWM쩜ed)y߄aL^RqTif|V<gĉ!Mr{/Ld=_MKTi4ә1VK_wJ{ba8mٺ*. &.Ae/EhVi#NR~S+ c@͞ij+gaeXY +neE +[2lVf7VSV,\+l2lVf C".dX! }83O]?3!+_{ YW-'m6_# $a0F#Gn#[pǓEY UM9 ĉ%!!z 4\\\ GTс*Bw"NHh:!@hBU@hha{d}L1dn =\>X" CcØ?~Z Dh"' Z Kvql `~3#֏fX?*~G8IB"DGhX6PA"(Ld=Qa <:nZddL"$#$ n,$6Y6! i6$U*BPE ogFv7M~[-gK[-aE&2{p"T$̈́Nr#DսtezplXer!I@$!-t{7/}%>|> fM)ڞDFG#G#n }?)qq8̴}|N-G&˩0y Hf !H6@D" f o$T}2S)THB$Ӝf$\>H$sEB[<zsH($\$$,$$ r oC3a 9Ln8^M*A a0H$o!ueJB%lH$ @‚9Aќ&!ϫpH8$ C$v: قJB%L`@B !H$rW|^IH#($di:ݒA"* #\܉>l6 M&8NGFJH%`m:* $T* 9>1Y.pE.EH/.x/2!\NA h-2@ h.p.;S p.aZZW}xa\_l_F?@V_󚉌oQ/&I[rO^nCļ܋J8REA2{WNמ+fg-,1`ǀa?BU]T .#ٔ /02NK]KQIbbSǩSߋ^8ɹ~g(Vaz\Fjy[d$j*DIrlypy<\._?.𺕜}_T6^&~ᦻ$|C$t@]Xd/*>")ڑ$" ;Bh)n˺j*2"ӝ&U=Otѡӄrk>?1߲8;RyUeHYUʗGb>/,Yle߫9|_ίwyOGIdIi8 V4 p /Er#EE^VEUOFt{ĞTwO^͗/vNxoUF5)y{7hyw&EyAR)@ޚ;r}.Z{NGl@&aU43X O}cǁHz[8Ǫ} ~aо[WN&#_&}X&H[7a@>J\F-b[4M~ qvKbZf&ݗ ]j)EW ؿI/ɦ~x c-o5ԧZMKa897o,oQ=mܢr2,~iIb]b혂a~8QN2|H=QߥYw]WŻ6UU$7eNrk蚼[26G7[u~f]8洲^:{"V͎oB=^we0\ֺ2Y@opICS3Ҽ9NEϣV V^[/jp,uLCv[Axmi3맘N[tvu5_UvclD:WzR{g?G@]0naE o0yme~ltboF\FK6Pq/{i+6[@\s=eF%L=#j2O0x~:^WONsrɈ1?׽v+/kW3:!j)d]o,XQu,GFۖx-prO,^,Z ,n|Ƈ=Ja|2"Ƈ ]oUjF>oUg3a|2>k-[^tl1>Y^\;zcSo̮质=$DFWCV$ZV&&0> :h"w$! I!Fp9     ?3`t#;!mJ0*AxA] mK C~}vJZn$aC*)pNU1Dh;@U@0a^Ec_?N 'ߒ{Zg/.dq#N])2]t5LW3]tN"4`hqs 6W]Q5dT_fA՗+Gh;pzRaҘy;&4fҘIc&4 32؁a8%g dV,*T@; YOTϿAHNTFF|1@=fb拙/fvMn+On 4.I o__I " HnZiH!XCHM@# ص5[ K3f#W GdCdCdD666@i6(w$Ǥٵ_V.WG|A|A|A|A|A|hoBB B 4GDB B B B B 1n!' Q3gz"!'e b b b b ba@4hp,  4!D9݈"^8ǵ >>섰Sۋtt.''S۶E]^)?~Hs{u^8,OAӬjYjΫ&˩0b-lYʒMb*@nA%hO?/n Q" Q`i O(s ftkxhKMq7t:eƅB|!۱T|*'^۫)(7H\zצ1T4m0X.][W W`1^ W+ʙy%l6 \>6ヱu>/&⦟h3~'ȦFRD&{PIю a GWuOq[USnrb",ƘfVi?w'NAI*,ɴb',c#eqzBu+(mGb b#e1Y^st\M6HCIJ{uўsW*މd:4; Q$ad._).>T^:AE^F/EM%`S/ /KS_u䵕R$720ayh{ƭ鮉/O{qr2NMMT`$Cnzdt4(+PIRNs)VӦ"EXqVQYimR\US̹#,ԛOFPMcMS|?mZ儩Iu~~Rܚ{={5_j; ~1ջ@ަmBβrpcN[/Zq,={enSj w)N~-AEی ߌl7{7i YL ÐTϪ9q16:*H!6-Sm>d]h ' GJF&{`3e-VY.rk(DwgKD+0pmDK߫ M#C6|m8]tZ5G AñA+ͨ{S9덨]g3'7W3ߟN}'6qxNTGӮH|w;8.uYǠDԩOn=ölpYCS*8ᑺ>dʑVw|C3t5>5d0mϬZ!lh]KOfGa]6t[Ĵ ypU]?^- =JKˍ2zjX7ZxF3[/2G4(L+'0=/W Ox Tú&0hҟޯO]h^yQnq"yJo؟~ UfsG,>)Ϟ?*UC~Xؓ3G|`*~JyH5z'鬃YvWxr8WW?pۃ`qqfZ+b33At6‚zxdWtaX[5vn}ba K#v!2nawæ;O|.^[}Mij٭ʰǭae "V- XVp+s>AaeV`eXVf3ae 2km[) Â̊d87gNB<0)'t5ab!!}KNm6B]syvzwH32`0F#ƈBG7-ɢ Y,Gr8*#p8quIEȵ'.!!!nn%'B4r`hKB^.!~ ܀EM}}HF; ߫Ȣ$b )H yLA^L+ETpSZx!|>_~,|-YJ^`cc^L1ᇓ[+V O'ቌk&M)"H I'CPE"TF4\fK|W+pEVfx U*tInd0"/rI$D" mۻ~a.yKr1f$\$8pI$\rMK?}$|@͚U= G&"!G|R qL3j**Yl/¤DB"DB"{8 wK$KI$q2 PI#PIx>H|$40i>K }>2 }>B{&Rf"3PH5HH$$9HH$$>fG\'7FVs ܆Wq⵽UrA a0H6NC~ JV!H$ s99MBWpH8$ ܑIȯ/tJ@B !H0GP4IPF)NuT%DTF&{秕}$l6 Mq:՝ J4t$T*I$T*s/}b\p]@"9;^\^v/o/ p.p.eBZ&DKeh)в h9;\\v.x\&ô}+`_ p{/¨Jپ?n .T]7R5Oߢ2_LC׏I䞼݆xyוzq|C$t@]Xd/*>")ڑ$" ;Bh)n˺j*2"ӝ&U=Ot,ѡӄrk>?1߲8;RyUeHYUʗGb>/, leŏSґ<.{uC{9ė]޽xe ~3F?~TP4@v\gfޠZzcp.UAžܟ|x@1q>wv~J3#btlHB u\gAw{0Ž㯺S\->\Ñ/q4(.&c{dSӣS1CGnòfAު$^Ѵ'ϱÆؓǞ_=dY,ⶑ, [E"PMi[\kX(m#[de25fw]XLP[e0Z%y$k΃nF4WNSr ˯3{Qvi(RFb>(efȲU; ΚbITz%;ɍ U*R&iHD%,f4KY"ih,f,eH"kY"iVF%4KXi24KXi24KXiX< 2,prYH"!E"dT%x"<|Zep@E"tOtl&[pF8#H3B!L݂ Y,Bqqqq{־>fBPF(#em)e,8c@j6HUpF֤pF86:8Mx"</Wlb0"X$H':7 pW43wE1H#QD1r#?)Fh$HD#\HX:'(F4Hd@D4h$h$VVh$Vh$Vh$V!!! eeF !zd8Dϸh$g8h$qE"dh$<; B4].B[ďv$c}[dR_a0I$ BB!qq?/,"D_/xӫ}a[Fh#`":|qu#$8 $nvϑ>y!jT7'ko=y-W|Q2RӸSj'gS*B"U!{hI|ȏG 1JE^#zXhſj~+QN;q6;2Rbh%TpH,!yK]̏'Q'Tp3rߕϬ!Yo8gہRENU\!!x<\Ϫwy'<]E10~x@ 7~9R|eCR8P%(\q oJPGOxŪA0ޘ /sW `^:9jvI#vqv%e<"x8 .y*A0`=_׸> 8Ńғos<=rܱGς;D''?;x<^&<{ x=^ ^dx)@0`7pVLcd#ز39F$2F1e I16v23Yܐe mC!) !;/` @0Gj1`H-A:AU@ H  dT. 6THgJ &!^@5/iE*펴bӜHH_dV;vbee!#p,,'aP9'ax WY6Y;}hF ,={E_@ 1OLY.]bD%˽%fi~j׸v CGV,Kg +1&ՍEfr,~F$i7us&MnR&MwjuK6E(4D{&21o,{NlS~~~EܖuTuqvuܧIsH$FyXnuYUׂ|.GqO_]n/xCbW<>g|#c)B# zH_ PM!}UWe]5ll]D ӑ>0jy~[[$ (&4}K)XFX9z5$d4^1[])ϫ*kY#e1WU'|CYgO1CJlƑeq ӏuG圛?^8NJAz ST{x0ċhCºmj8l2uf8r)_URW/Mz+o̷cȖ˜[4jKU&Z{Qz9ijC&{>ZdEz):kNa]y%Rɍĵ.TxQIӽڹwݽݑ5Gg6tti0?h*i1uN1!nykxg  bՐ?;5+v^x WaZEs/@3ja{_uZ| #_,dɝ,da88%B+ѩ&򋘤w@JOT1ʹk6vm2oAA}2+/spQҖPS+neV=neլ ce;eeE2lceX+?XV9XVxp?V#kee,Ȑ_dȯxEx!ڔci⍰,K5d]< Fh#ڈBgfG\'7=0F#cmy$!Er8*#p8quIEȵ!mcNm pN31i]~~׏I䞼YL9Aϥx4 *奸 ;[I{:ԙbI4ٝAv;;g%/ܛٹuFk$lNi{k4LTVS}}_w_/ c:ILg=tϤ{& 0h=h=eH"3[GHae{H+H+H  YXH)؇3P(/_T\0H|!1\&fh6d*64jɭvQS#G8XRA'TNQ4~v}K4>T*ׇ^G,Jl,㠦FdpB.bq.8 Tm{/{dsKC vu+#fA}5!7C(`v0֖S P WBE(?8ic3/$ڕ=yH$`,3 A ;,Xa,gv"ch$3&4sA#A0^9XC?24$ TtNOBa4i@zaot  }&H/,gg:W0Sg(LjaE_X7H^uJ"e쥋XZڀrIJxn6HlHU4m?M'pXBپ/jR6lzVdu(X9QR8g*;ڶ*R}KQ_3%4dS*Qa ¦ܔI!fpm7ϗ_A|rKq֔~i!D%w1+r~rfw88y)no¸"$2 kxHXF< }KҫBŢAWNT-Zi? & Y ͝$%mJ$ f%'M*)9r\t^oi'c^u^->(-Isc]Qؒ t?'EwHgĠ`hzxgqpPuPl\;?CAb;MUs]yeuE띎5'R/V=O RoS7BJq>?thFb>,h,ZHYU;#e1PS̐ґ&aqdGIQιȆϲ)#9c )=ZZ~myjEfDWaݶR ޸1\b3o~9/ )Ϋ&=7۱m V, > [m_&udsh[ *uZP :rG﹊v$c}F .T,L4lzV}ʉfeb94gp1wLșzA!)󟫂X5䇅=?\Ñ/qninq5" YE{ѩw@t筚Nua 9]iu!vn}+jS=pQHbjO-#{Tg,8+aeYae׃ce/V=W+cA#,Ȱ CN;-j Ц8oe^CUɘm6B-tyHS;2Nn4{ `0F#ƈBG7-8dd,0Gr8*#p8qO"Dȅrrr6*0`B Ybl%?f^݇"Bf@* 2tʘb_'f(7t㶬ʄ}W ;OOkFHhc(څ$- nI $-6O±1啩AQT5u;8.Kr$KYͣ8hSܸaKT-3u7i{YUi }޼qxyO݃ґXBW-:eA.8mpW_LxL\{_׸Hp&̦v` OIK@L ߅|3Ƥ[plwt U)XHAdw;>HavJ٣ז}&^dPCzTCw@6z7Gŗ@ÆUKcNj/W,*pPi KhXF/RX6lzml'+X91Vb6LU:lUbmUwN%F.U]oiث/C'lUi>qxMMDcG e/:moU/ :67c/ l۸ pPuPꉜBS{ʳ[ae[Yiv++aeXPy?j+&X=ie1&VMo[Y+ʞ}`ZXaA6;-j gІ`$oe^ɌE`Fh#E(w;ٲ:11a0F#n GPO]"dq0T58G3ĉQO'""""ZULna;%b9 g;''U"l0L~j& O[-E-: 49^n =] [CsXMi^hb݋؋؋؋؋k=]$8" FOYvڢg3ጸmc/|$lp.\p\qm\Tj7Zfs/xC\W<>'Wʖ;w:QǡpF-uKst{A-=K b旒SHY6~c{A2Hd4^1[])ϫ*kY#e1WU'|CYgO1CJlƑe߫N$E9Wո!}vX#iBsFK*N"/Qa KCƆwR'0ێ"#5s`~RaSD&(<]zؐ o0ymeZ+]kٕCߘ٠nF.JmHM+9WUa;|O[kKGV ï-/ZM A{m+TCv { x/Ǒ|%P+ySM͵ܭW;sVg-c@FbA(4PmWx` Vڴ^`|`-ז}_Q3ܥ?ݥeJj&uh|=gNf9`*i:c~0Nk? ?N\\zT'1'7g̮݅n1<ڽ,RޜI; `*W?0 _='K& 3M3Nj+6aУS1KG"[M>WL.;rA̾ZLEK7g3M Kr2 1֮L0:+K,uCn?U˾_ {ɚ}J?5w^y]xR.V:|wsV%gj·_,UΕMn/?yU:'d*NNDsl8ho}.R|w_&+_Av?/gBq0RKQ=UA;&HWygE%u\Tf?"쩥:?=vN: ?ۜ-Q=mv"`Fz0@z7<x: H 8//uYǗ+gNTuq(A~q}J'Qd<ȺɆ 3L6ZW̴9  j~w^dj+ *a'>~4q2 SWblͦ-څDc nXDc7O4ֱ魺[TNowQ8B:?2č؅/Ԛ ПǸ0`rb30p =3\8S`>= HiB ؙYA#W?y^'q}L/.t$aꝄ4cqNRM~$kҼ>;vWS*ض)=:n>/ 3cܑ&ǜ&0^p'f oE0M]-;Qِ󓛰s}#L)>_ :DbQ 9{X|[y̫9Qs3=Gy}|%$/tzQC|~XR|t{$͟,A%Z2k\*ٱ{/6T=ɎzrrS<*fc&ˮÁILnށIqƜ5r|ՙO(>,'3bVoZML%ENYD>r:z|UL޽FUq!d?.ZfLEKz ZS+neV=ne%2lrgeX+3ael\VSV1U+f,eVƂ̶-YaAfE 2+s3M9n0~Nj@g x\~Uos-eSeeӡl%ɘjffo3Cpo f:x9oVS0E0EU&ފ;H#qI[p!l2jl2B` vMLX GT vckP\F*TrL3,o1SLn ]-# C {H/o\kX(m#o$ ¶1O.~wm$ H`qI'E&9,9CA9N\])ϫ*kY8ygT&4̣,Wﳧ!AqM6HȲPY`4>|5øtȦ]}|R-32EgCսD 0Rdži(3˾{C{+G_Rʰz8}2ʜ40D}%Wo0AD) -.aܫE i:a:rL5eoO~it_T2(` Q(jwϴH먇YmE7K]hzutmbtN ~-=RҋHa+TDoC}ie_+1OW铢r[/ytd:vv)S#dA-AziZe- k5"CDE*Vo~{cä7Gŗ@`q^54ӟDZ|{=' ;+=7ĉgD4ɠn)Ȃ!,~^^]pٳ'^>:reQ^?\lU2lOf'̞ c1akf89E 3͊"8G;J'^P\\\\\-tsB.""Gh8RR]]ivALضaۢzgζhvg/}vhxxLnL{ede_d͐5CLPz%@Ʉ*9tRyuO?, =OT9tή.ۢ%ػ]5ԿF~=eVFUwKՂ/$skDⱪffb5afmjBfO8!m#e}е%mA$$]pX~zs9g]I=YT+L*{ʹsvy).\9߹{2I_pR|m-'q׽xTnX=G0jMO-#3mpLHOj4=i noTFN++XvDSFyt;JFETd" 5x]z(+c-VYcKD> 1qV{ nzbb*lpA3GaӠtסKF79gC=c׿տj@1瘒xq֕gM 02]>dFv_?|œ{%:2mXt[ME:zmEP|b#I,:]#Nػ2uBw>ꄃiWVtniRrޛ-zGqQ{~ Vm]C|#d8:qڒfb(amVǥ|^&ىRK#e1WUB_yUeq-k4߳8yg4<\Ϟb5 ##˞"{u݉0iWQ}a}}u# a5[To& LZެqVb[x3?R ]1匤 uXxUP; 0488y)nb={k [֭YnTÚjʗ,r kxr Gָ\ÅG1W ҌWmks''Z̏jmC~ϑI%1hݦ;@:CP:tg}$^BEb"P:tu^- a={uSܶ|tS%(VV-L7+aeMy<Ƈ_+,aeSyrQ+fOXViv>!4ӐɄim rb0t~rД'!hMM+HvHEEE셧[^]gsc^ث&؋؋؋؋ Oǁb/"z0r@hlb/b]Z mdSP;LessZmeM4;ʅQ(yUe)zQʴQ(yeUΨ^Mv_I\zf*AdpsJHa߉6\հz-a(EI~kK/ A%TBP A%p!34Jt(r-t(Jҡ,#Cҡ*ѡ*!Ħ9xT"CP SCP +$V!!a|*ae*ae*!!: Xa4>L&XTX`A%T"A%"ZA0F()tttttPR-~!M/b/PR"zCIikz%%L%%x JJ()$]KǫeC׿nHYTfSFE3Ñcy{#S%ܘzetq[USEz]9I(KqUN1Z>q- k5"3`߫n:8ib3o~9/2rNj~i"Xyc=|u[׋e"* d^`!5:M0TE k[@Mo˴ugI50yVK;YXeA ͓8pֿ\.|us Su#`Zye(9%guE{Ts|^΅5a>,5a>,N~T/|Pz%X`RD;:2.@C5q%(P%T|qbSt狪vU)Qmݾ/F]F~||ꑘ+C[nw=;MhHftOJG†dj'u//)~ }7}E]  b H7;6(q; Rii,bS^'6`64K&1c#f;6'TAm-*5zr.v!sq\fQC5Ջ5TFa@W^w)0}cͫ5]jk;)_%wKPۑZsNKFz3_uNabMuH;\7D&0/'8|0l|fQ?b1=󬳫K cA8qgvW q^-opp lpp )aw1!@8t`eXٺ 2l1V!!!XpL+aAf LwK2[^dt-kӑ#Ҝ C''U"9 @hhHCEņ8/u%/"|q6xhMs/////ue/"|q -CH2. lAL؜f8X#&#&#&#&Cl=ݑ*jL\pF!Hx|W+pE<z8˂&>ɴFRi gk5amdv:bJ1TP _\kX(m#_$cض1N-vRMk ٌf|pa_)hJ[$ (o*16}K)WCAUA&լE4R y(XG#0_ ײFJa>/N)utuD|N5Pq0NDITu/HLO~ᛠOr”I]W~L d6)_%w޽W^](YNd/'7אuN?$=$Kj*𢻗qR2 4ԁX6Werqݕv"T άu3tdH]^ 9r_~v͞G;ڴ.K 0Xn{Nş:V%71,#nhX(8`Mid;5WmMT+f1tAVTe}C33r mLj7b)7ʩyz䓾ݪX>AQ?bV>J38S}͘Cr_݄Ҙzwz)? TTϪFB#W@uN#-އѭiK}Y~H 䖌cZ.ta uϽz y __g\MSn|OST8Lt~O݋3܎VCDUI15d[i+M0͵7]7dL?ŤGLy>HӟU3w g[y>OLϡ,Wﳧ!A#sM6HȲP`\U}5FLj Ԏ(uSM!TDMپ_^%'PmH#ܽ `$F"X$h$f1` 8($D0V!!!!D0VF"+C"+C"`dH D!B"cuC"| 4!LEņ8//``&""""! [C` !LDFDFDFDFDC Ghq4 gk>̧WX7FWI<0wGrW wJ#%<y`䁑<3VxhbfGā]qઔ9WUs&}YlO|&80.n=S V>;5WLG+A$g{w[/j}35LFdaBVpr.o_m{!eI|ȏjʫ]P[FC#㴕uUU$Z tSj)BYZ72ZʛX8!TɌ](˽}/(zGqQ~ xm-E(^vӽll ^lZ6LHl>{]㿓 kAL9S$U iΔzuJ`&.K.3YAY HYUŵQ&yUeqΨj<\Ϟb5 ##˞BdDRٚxrpR3P)/_8i&)/A'*@UԵjĢ!۪nbT X9dbA&dbA&dbhdba.  218(dbHL 2db2db2dbeX21X21XVL VL 2aARpR yĸ@Fh#q]21pG4O##c1萉!g1d #dbps@!8G%B1[[[[[[+RbSd wQ:2Kqid?GGG#@ H_G#ܡ\yC -Rz 3N.!ȍ"m$4Hϻ$6M-b[dՃ#Pڂi +ht48#c"ZV< $  L DzM,DFð;ce)ڥϫ*K:)5RyUeqHY9}3$t`fiYvaDRsz%>G2fd&+H9nQ9-NԤd[zMOd{2 w"0)޹lC"?UVRzr*h%* e˔| qϿI'" V|qRިeFljn|w{YN{{,dv_aƚSW qj*H56&)g3^u, l0Vĝ"AgvG} Q0J }\.B?Uj5)p%|Z .'e |U?3`f*1pM^ cp18^U8U\eW03iDFL lj"+ 効Y"K$KVL 0jؓ뜸 Mbq~^'G0k`*[Zeb- !j"B.ac &IK8iW7?O6rf{ul8;vWS*|^IA|y | 2.{ӿ2I`{0ċºeXV d5(m-~q<_| T=lh?V543DZ|{TrP"[ǫv5\/ I#T4텡r/8!%W7R 2WC{eW_kdA2NszVIe> %m8eNLSg-Y`yY`chآ=r茽Nqoa'xn'+9G#JT3CbBⳇDY砌J֕J9YrI4ߪ$^z:aCQˬ3]`ZE9/ʳ[ae[Y +[0j$q+[ŒeX˰'b,~{VƂ̶-YaAfE 2&yqExD oe^CUWCfFh#mSgFځ;L@(Fc1a8:̍S('.d F9 ĉ%!!:\n%"Ր G3!'$ȇ,tM<`.Ҁh< )2.&i笩Dz`d m8Ӵm"@ %l/x- f;Rp#c)Bom/*>AHN?ھD۲J6"p$z3z+ˆD&.K1|^UY Ѩ5*cY++wF5y{T:vd3ъ?2~NͿ%84M<`zW_^]ws13+1*7#*C-~˔r,e\zKWq 9X6KXrJL$= c]H/muaso̾L!@XwO&LXr <#=ϫ"D 0*Q]|)N-G2L%pz@AfG|b&EP__J"k/q@ 8W} #k߇hv=˜xÚf+hNT"uˆv;evԴ#h".P_u䵝ÛE̚dSlm$|d;#{ Gv]:ѯoD|rlwtTk l[ők]`+_)xa'U ?~j[iݳ킞?HaLkaE_9HºmF iwH=8R/nu^54l8Vޘo6{pmvav&::GoPWG|)j51-B´FJꆘ@ ^X)7V30백՛v UO8\._ug:)Pxvl0SHX\LHHuNA *=:";JS_C&dr!RzX/]ڀ[jMKm6CkM GH9Qmo}fs/x]ᮠiu&:H5ྋ㾓 =*5,UU I|zu6R*K.|^UY HYUŵQ>yUeqΨ^ޙGYzu M&5P갎+r2F⬱{Yi y6ӫOVZsvy)-VYZLO6n-:)d_AEE5p!Uk;I[1]˪mF~>LJg5 2'*A0 Gޣ{VWolA-ۑe]@~8U+M3|>w+}*PO$fpNjڹF0HMߠ{FYRwSVNl/_w_{q`ܷJ*H>`3Bεݙ91mo~z.>]ՓՋuxyY 'J&i]x}mafCa }@tn.cxz%ƍlAPhI/OX g3<3n>c1ʆ+6t#m8Sc25VtK^T[,ev.xs gq =LX^{2)*q KM9m2@fW `&y ̜A#{fvt̪v8? t֯k\8؅Z?wN/27L w GVXؼ{eFg{toXx{7S]w >v&t[ku7}FdJq0=OzvGj b[ő+)/|^ZAf~ǸCOc(kaE_Q&H^uNOѵaὮ^l/Ǒ|%Pf8_'y+o̷Om/1;Uc˃ ;TE44IaMbicR|0JLm?JZiSKOTN1`Qڭh=tS Gl؝TBu8;GZEs\tꌽZ{՞->('3brjTevP Vʰ[Yiv+s2q++&*VSVV6 ;VZ+s˰oae<_32GW1YA d\Ӣvp mҔoXbdRb1]h#ڈ4FƁ;L@(Fc1a8-tt3oq܇'E.`jR #pfQ%/KB.B m mAWPpY,4&;w:;Iv4'-9D^Vq:!wHYU`|^UY\cmY++wFSYy}3$tfiYyo'Gr۾$}:埕yK y[.Mz*,]tB#!#kz1 fG*&,;ôV?3r> 7Yz\ ! 4s ?C*O ^k`xn.  >sș  xSA0ԥ@ fDP uG{=Ԏd,qw4?.5(3G~:61N^ 8tx8I—^ҌGRw(VvM;dC\ڤ5LU&ҐAbT+FI|P#c|^]v"b}WL[65)rM>F/^TSIEw"jq7_NcӗzKqK!/ߝ0gՍW NKjJW?)=Z:+Q,Lޡls@2Zm(z"l/Ք :SuD K+}/S/r{uűW cSL*iBșMաuN J]}jl:zRIUI`h$\!I<߳ړ8:O|.ʝ`V6@U +[f"V={"uVfceXق˰Y2hLjeV=;U+[|FxLdmAȂ 2+Z+G S\`hS.⍰[5ԁHixh#m6ҩ3sx́;L@(Fc1a8J >9n8,EN$698G3ĉ%!!!!!nn'PE04.†<fpNi68Sd"##ےD(( `J*wHWgHh:HB#ʇDC"/}C$>d2 f{SN?KU,1h%f#f Y7z4PK־PKz\.OUO'ቌkᾙo/HE Y Ar#r׵ݣm$l-e_vP3+mXd/*>")@A")䏶*џⶬ2"}>a\4Jݒ(&4}K)XFX9z5$d4^1[])ϫ*kY#e1WU'|CYgO1CJlƑeq ٯC}9WW$ƘQ}ҦdEF 'ƎvB,[ywߣղaߺUKtA/P邉k?y8 1@8-υwmĒdO!nF_b555JUrrlQSIfT"N4B"m}3}tlHÆ^ԯyI?]uLX{S]Ⱥ7uO֤/2ԵDrDIx!/NW.egK- {62^l4=uVmyMب?ճ?_?/^ yL[<3'>閊znɴdHhAF=0-E )eene"MbRkc`\dٲ^=9WB{WҋEӗsݧ\Oc֯qR8)6ܓyk뻼ԛ_#/zH5<<8Xyc͸=_;scj~: |iL#]Hyi`ut㛎jy_͸wِ{´9knI;;]/kHaManٔ'#VcܒtR}74%͐ ׼X_҆~ڻR-=n&2@A_f}*EI 46ER R\U*>ى!O)DeM3ߚfƺ.dK]Hrt͠l=m7|^~ז}&^db {m'RfOZ),>e;ch͉kB"fTU9Mr/cx-o45")A")䏶*џⶬU'td}UTAPeE*Ѳx%Y'#caWIɍ+?Hc~"$ ?d>M+הJMR g<:!lNc1 +p#1dt}A ߽wOZŪn@31;OL<M>uV2sC<k_ulzYVh)/хrijtz3?GǫM.h]' j\ vʦ =µ0ċ {R߫ng[]U~=1uĆo~9ŗ@MW/Mtx+o̷Ouh9W,3οwaKЅ{btMtPԋ ex?]|baIE,QT3؇Y<Ûz`u,f,h;VѶ\ ݻ:O^-ꌽZ| +X<`9Q\lyXWz̕C1T<` 3e: ־j\SFZ=֎ +̸i ;ƌQ98qkw?&\k}aoZJ#ǰu|2ߕe*yT&GP qh۸ *LS[yfūLg+[cVx +[9XU&2 dHƂ 2$BT&`hT&B h#m6n˛*0F#cDe!Ľ8GL2AEEEEȵ E&i& d̈́4BwClH##voe400'DBgeEwB#e^ze^fDEz)SƤB,qLXrAMnޡ') h1r4.+))E^{Z%Sk*r32f(ⓚ3ŲJԐMdeܜ_KՎ:ܜUJE_gZ^?=!/ sN9bܪ_n=P@c+p8S(xne3 iAG쁲({0 쁃Z1+{+[V쁕mkX=Ȇ쁕쁕쁲 2d`xCكs`h.SBm6B;$=`0F#ƈ["deqTGe=HLf64j.Bfx+`FiLNfr2̛|`Ӧ2dI˃Θuf{^Ut]'y'fvFm\ʸl(rJ#?Xҗ-m5ZCսD"ѿq qǍޏfzGd#R4ĖnWM}|xwmzGI[rO^ȋJ7 8lvȵ0tOwL=wơ7uz:j &чc- /Q;lpe~aFk 3F,rz^|~"Bq̫9kT'99խ)24Eir/Cqs϶fMNm\ذHe9mr}l ,leȩNNu2bjʩnaeXs2l9݉S+#:VFNubLl=r2,lA#dX!9c G]ЦT/Sm6Bwa -CH#D G#ᑸ?2! ȴ psSf9/1u_H3䭐Glwkez֊ik)xA{A6У r!a =XSC+C+a,AR C*=C.sxm6B!wH#Hx$<x !=\\ G;܁mMq;- DuӖ=6vӪ/U':iŦU/Ҫ^xJu7?H^X~JuYrJCw&H^XrbE%[SA,q|?49vf^~{~P=ot:&5z>y&nv$n6BFhV<74 c1a0F)I- YChG̈́\\\\\E Y{$ȚGGA'޵(''Mϻ40i {PIƝƊA")䏶*џⶬ-mEA6 hA~XB5P)._!~H!N'R\<Ƚi?Vy邉9Q D- F]7hFzjw N#{Ljɜ{wҗ߱a l-T]=+S_M]*4d[(7*i{wEM  i/m^⇩گqR8)6ܓkj=[R!39b< j'pw84uo~N{ƍ- Oʼ1ӝf(?OFQ9z/>?N\֏8ҏe=5w7g#SL 25 SL 25 SCG#SL eA!S%djʐʐʐA+C+C+ʐʐaAT&,Ȱ C*N!SiO04W h#m6nCJr]#Hx$<C ($B#kpsS1SE޿-ddT_%-KqAW,K6ײd-wTt`i`}0z($;3@A_cFƗf6U'xjSO<50&Ԁ<5O xjQ'<5d%œԨSIjE$5;r3&]>0?Xw$H,Vofu%e^ [^\?oo1LY_#vGEI; gF},$W;ek:WTL-Eǟ{32j3 1k=5bυL92QF;8*lB3DM+z<=Ug4fHkMGs܊7\>W lN=eIA}.  1Q@,(*.7FJmnMۆZBnvԷc `rԵ'm## Ao.OqɡbtH{lt&OthxO~F%$V"r]H5IƟ垗qqzKO z4N-q>Yx53B)ݐ[%=30O_d2"FDfTtE#5 y)NhbfxL:,]n˔ԓbn/5yy~>I ztgtQ_ۑ3nq; XEoV.׬3rj.@5λMVP C 6~8yln{TӰ^Жe "x &v)7 b<w@،r*.O Ȟ}yڹj}  \\L/ <01o<-[/n5c^U00. Dj{ƘWcr1{.:2`<02hYy`Ϙ-ϘWA-<hYyuxLh iX9K䐍}0F5=%[6tIZN PƍFsqcyn,Gsw~JtM:%0g>%?&?3=Jn' c?'ih3RK:-Da.7[v%ts筃9 EuR  CeMf-l,FzLxe J3&.K]QbdѪZLq,/?̙V,sęyYp~/hTکrNT2 `LFԸh]90RuܬCO=Bg\cM9r{ܴś"νk-`avf&DŽhޏFiͮdT#z-듥ғD3 [$̙^R¾Jpha ~6!G;pjۤK yW̿kG$YN4L6}W>}$sy4K?C֬ir=nT4+X?"d#Z D#cb_UV_.s|b +K>W5 egw4j}D{scyt, -ܒd,j Qv4yG]#GbˁH0 0 0 0 W섚8%;;2RHѣG.vV5x6ĕޣ9Qv;:dFLǢr!Bȅ nn\s"^mP!W6;RU=َTnZ*({u!K72YϾmדhҸ˷"ǜ^swIZ!Y}^<-C :l :v#oE1ӜiHwӘiDw=R3N$KGjĩu,YQLqLb,gWht^OS&C@?=s8M8~h="}T/OڎXeHٵM}DN-QS6^ mvۦ֨&ۨ ^*--̴zXA ߩx¬x( ݄}x5Daaϟ7eϷ.z{Ӳ0=A:SU´(p`X; ۆwm;n6-5#,ޱ(# q p`XGqFB]Gؓ4i>-pʛ8pd^cT==q]T.{J1ջ[㢓?O{Lv*/&̡s vLg;0=avqr@_Ѿe{`W47f7~S\? $w}lW^H^˯7$f؄D'=:dKC{SB:4,xGsǻ;iUTU!'5>'jZ6Y* 5=]-ųFjK(mo={Gkb$m+@7ҾGWZSъ8>YgmV44e'*A}IrpQ2^U+WٵLA˖kYcp-a,mneвI^A4xLhY1Aˊ?lWaAX ?TԎ ux5;F9PDfptN ^0 ɐ>SGp1G.vM7d,, dV9Qv;:`;j9~`:Eȅ !B.\ps{ \L6tsyIz kɚ^{!BO h6 -ގѢ k){!B <z:b/EPNֽ`M ^{!Bk=]f]ShZZ<854nQDD KZےB^q\r!BNIWA^E"⾣EЁ֢yȼCd))]X}2p{ycaw ]|^`/{3Y eOnZÜV19=x}בF?20")=)qG1aQ2]' c?'ih3Rff!@\70J$#y:6sDSru=^ˇ˚43WhX|e, R J3&1>oR,deɢU,:Y:a)bH`rҾq;R!=}~@ݨԍS|G/#`n1y\nx'!=%7'+n5} g,G{ɯ U٨ KsIPVBދDR)|IY &+1 2~+"$!tL^x($2g!@ɿkۮeԟ}Lހ9NQeët~m$<l'ǝ;oHHM"G] q܀\/[-BPc}KyYَY$P Fz1PJ; l/Dǚge<'I:{yx5gꨆ+Sp`_4j{#\OyEFJd~ˁ2n=ȽyYc.Q|7Q>{ى豏~ty0hL֧a<ĆlRM a fj,{Ⱦ 69QOW*Ƌno&M]iVۤM^ R "KD6b I[dXñCo?ȑ89ǧ ] NԗZԶϢMDnc[ØO,ӧ'&[^¯qxS_ll.k]mv t~φ폺iI!c٣퍫O4mv[oB;#qdf4lףn]bG:[$7%"*u(l)l)C}H`.0l: s<`z`=9 |,),"cyRzsuFT,8hU}=kf,jv#$|byգ #}I縄9)%kȗ˃ ybtzњ8XU~z"U:cAk_jOԔeGv쏆"GO{':zg/Ms`z?ہ鉑בnRu7x|ζ[Х_Q EW3mb~'hztȬ \fک-J xY k ]1֎wox7vw5vQ3ROCY,W=eeEВr̀U׌^Hg5ʲzLq],ҌbJEW8&VrU-Y:yz܎59 v\H/*Êwm}tYG3t |hm;AP =;A曎֚Z$Y΢:-킼< N{9z">wfɟa;c_[%dN$&GƬhQ%]iC=я^uImZ_We9u}c]#Oy!<imJqEqZO8zݾգO+* 3ˆz9#XϤMmyXL@qZ?UN$׭ѽɸq3_DryLkWHHU+Idӓ<#ZoSwBɼZxwG:m*J Y$j:DQg$o"`[/; :n83+q܄7WV>4 [@k$ƪ)_Ӑƪ)Hc il9t~XJd\{F[i,ҋ4 ͂-n߰ HcA BjSɠ4ZXxLhfHcUh в= .4ZX, Od <8Z]il!;^6k:9Q LF XU F F F F F8=tty꠽XQf;`G},B>\oA\-\S)b`VR&CZDsQkI* V bȊQ?U*d"g[133ҭ6>M62mtr uxY!Dґ8'nD=gN<UU|WBc7`=p]_ @#&qۑ/r!G] q܀\/[-BPcKyYWƔrRˋrrRA{66i:mur13f쯳S6;%'8 F5RՒ8 z2ۣRM8 JPb9qyb'܏Wjlļ"x(c x(C)'mJ2DRA ,Z-+5в)1AˊX-=% 2Se5h XAf : V<=eQap<6k $XXXX9%## @@@@@ LMg0,)%39e䔰#S!B.\r2q@h9]FS]KQ6$ǰ(Za/{4uB@4SB)xQs®<h@3)Lf 4SJ3L%ۤd0 +ٵz>L>!EirX\\1чuk [0hL<LBABX,g5˩a;lC`=SX/sN4uWbV]Sڟ#bRQ zcdF o}YoK< ǡ?fU9nb8!=%7b$s!\o{|HODϻRwP鴉Vf|7NGjEr"]HԵlsHB:ԓk'anrUnA║X|ſPϽɬXnW[MPڵO쉏I̮=~BsW=3%\]90pgǵT]`=;x27*jF,:^#vXMeUz4AnU//%'!P&[SBR.y7kJ5,yc{'cw&ܞPSM.!kFrwK[3w{3J<31 x ZSYp`r~6Apbw'kfɞ \EBEڄgv-ہ\вr-Z)V'2hYa)eieвC1A܉[aA,X YpN$TԎ JV^ (z^M.`#`#`#\κ}Y<+(nv Q ϭF h. PWT2\hYZVA ײ<&lNeв @-{} p=ˠeB6aA uX ?9p;Ũޫ9lll$pCdH#n]#n`QXX0?U1DŽ\brm|qZ+3Xg+%J:=%˅&n_>~j鴉VtU#uJ}Z85{žjz¶W* '`sw'5)M6'}am3SGSV8>YL+N n~M BJ}2A렾XE5k--ײzv-Cˠe˵`hCˠeX-{} bLhY{Wղ ZV0]v 2H,Ȁc rNExЎؐ(BzC.`#`#`#\W K4`G`GR&CL=G#####:G@Bx6`G#Q&;j9~`:yrmwe1N} jjJ G0ln @*ɂg3zaƮ,KMdeb(͘,,YtEuVdѪZó̴َ#2<#3B.\r!C7 ee FáwPd![%qhb(.c 1ga#0(aױ 4~1=ѣ M-B^,R"˒E6bMʲ{!gi$aH`y??ob. C@\A6LLyς eShhZ,ٌA'ffdžs$.a{aur)`--B,ˎm^W^ddXɯx4.kou-Ҏ_}|~`zu{xVIu`FOxo:kN ~m'7>/.j2ob|ԙգCJ=Y/,N&bOlړq i_0Nײ͑OIҬUD- :2*bt (XJrs+t t0E$²xGƣÿG̱͜쑌E v+i ;W*"X[IQxvKyѴV2Fo)i4ֲ\tM^Mcas۽P٦Gt/}ҹoq 3Xyz=>P/Z VINH>QO-`lYF!JN9CFg!auEwGޞ5bZ Z`t@cHpb3pMV=̬i#p6i~&hwÍcĖZs%/j:BdH=1lx{9F 1|G=Qr"2U I6ZIx7r\@"OP{E4&ߩ|M$QGO=ǹQѶ|fzyXLZ!hnmm\+v3H /ȸ\|NGxpZ=9+x'E>܊jw*icLnp?NH4)ҟ7NJx} Y J%Іa Kj3{'wY ;]FFg2wպ mwY/1Rt\h9=>~1X8)6(ycM B}2ٳA렾#}9(C^hhYZVAˊO.-mNhx ZH˴ZVA^X-+~zK:ӯaAh Xީ/Hڕ|Q:9Q L9FFFFbd ɐ>SGpѣG.M7dŃ!nGaGcQ\r!B7n.ZPbPP!W^a/=YϺk!BX a*=tq-yc"){SbG1aȘug> mf_Ei((3-\&"I]3b&z!"+RS1YuYJ3&.K]Q4CR,ZUU\d^-:'Mz=Yޏsf&!q+h]Yp"[#b3ͥe}3?3a^ol"'o$-d4[^ l!Jz~&=:Q 4qq TkZP{VNH.,~Pr|N:К,Kcn K4=SP?06 ^bjS=LģBL\9c}`/s %$"ǻ;iUT B DyL ,) 9_TWx}bդԀ( Q{ )F%[g9 LjNKx !~Z;\ 1%H6O|Izgz2^㏞;VѮGc}V*}sJ&4浚quC䃳xM 76/NooNۗGUK9^:d! ]:5fZSwf9֒5G6uLUTY ,8Nꌑ̉ĉbD˶1h*k8ѪDC9ьW4M3谰 8N48ѠeDVh8Ѡeв81esAˠeD'Q*dp 2XopmɎ 'Z#ON1Nl6666m '##8Dbbbbbĸh?aG#pQ\r!B7hJS@0l;n>)}D8oXnnvNd4/) V!*[) TU"1^pH`rҾq;R$~<]~\D)r@@0lԧĵDŽgGwLXЧ,+H-g<^ruiW"ioK 7*rN.z=&6!?} 4i2a_IW8&*5,9'BL]I3=dhq"3nqb>66=}^k1Sbk=j&]J|P/'-Y#(>ם8J&D͞5])#=?;֤Oa= n /c\9FnM1]p33׳׺٘RavCm@պ&8Su< =_JCzt,5!SsSN IȳɩYԥ.kk-LZ{oVy6 j[mrTX^ټ1#)l>)'ڛȃq~)d>T%}ng).,V nE9MgK ^+fJVJщT!У&I"&IM/~{e/oD0ͷ35u3h3 dߘ U"VrpQ~jZ@ˠe˵ ZV|nhlc-;(-ӡeвµLDŽe*2hYZlaA2wA&%SQ{^p06+y5;ԪG-60=;,p`* X"%r`)sX؈ٶGQ.L,gjAx'0 yJ+It)= B減2Q-ky69jݴ%Lϴٿho̢s|6IpoC.12" `?|W=Mp |>ݑNZEm^kSnI59zYy, 6_t[[f\KXՔ)ZmjꪽzdBjjO *8tyEY'""3ϯ ]FJSK`!#ǐT+g}u/[N;U*`2 tj"k6& kixj}^rteTЕ/tDG#&xW4LN3i  xKV /)eृ/)x:h tu2A@Wՠeв[NfX: nK6 /lh< H$4py[BV|1n%Y݂qHn vTYdu!B.\ŕ󀊰9n{k````2bGH@`ʺ'q{G)?]&;????4A*'f;aDY(+Srëz怒%PF͈BHZ?oQdd/ 0"y#(]=P' {#}#__;0"vvvvvG숤@0\}rQ-w77777 6}vDzhJ 0#0bF.s:MU d#HّRm. }RaGCϭa-a-7-ZVk\~o}c1 y7V DPɥk !zC3|Is q! & &l(2M888888{pp eLA Zܻ=FFFFF8=txOL6t;t'F|萻7>P#P#P#P#P#<zg6_0l `$nLF}AcQ3`gY6z9ocWWS&cS hp柙%Lױ 4~ۢzI&+(wܺ+4;oM(:s=^ˇ˚437 ZX|e,,Y g},AYY.Ad9ҹKCcw]ۑV8#51C}NskwM}*a|_W1g#o-0'tG>1Sf?!pB!$|mҥ:ۣ=bS%>ݑNhjEWU]iU!>I"!i_sOHpO#Ba;n >FیWBk!G%-,3peQD ȚN8 >7#!_2*a qy#Chٛ;ޮGP#(/PM݆ ^ymP-YxE詛'acWidр[8nCh_FTwQ=G#iX1x9K|-ُVƭyfY`OmVԺAdWߏ 舗 *r}%ǟaL۬ir4]ZR!E0k 'VqiF^3t/NY\G?V|6 k,">h:EgO7=cʟ>3Ujp{2ɷ]#]5kϞŪz^>;׊YRWgRt"նBhK-yuOZ{!q,Q4^5M }28A렾Ir6lxK"T\Uk@ˠekYp;h-eFv-ہ"вrLϮe Z\4hYZNB -)[5aA dY\SQ;^p^6+y5;4rԣ1rN6666Sq7 ?i{qp$p$p$p$p$I4h$CHl+Gs#v;:`;j9~`:Eȅ !B.\ps{dJaH )S:LJJ]o#Ĺ}Cpp.hF9Γ *2P Td"YTd/?̙Rgh8_4btaBrNz)jVi]^c2!5>inH= (鰁$y&$t>V`igY{~ӥqY{+oEmLb/ףyً!?OIg;iG_k\FqH<5y]^$ӒP&|@* y!ɑKHQSPwϲrIHf 3mF0Ȍ |m;Yf@3HxC~oB[k26k7^硉괴+dr, #)C1 uNJ| *_'sZ %7ᣉTv-&;bz$ҷwD<7fa3zo )CvEI~/,.,$irt\71"I~i7GvzT2k P"L+5-.Y57LQ>զOJ5 !-/0A|DnM1u33׳?>Zw:>/5L QN;^*JUІ^0(F05(50JL aҕQX[(G'@(t4@}eFwqXXQ B2oڦ@-+0 cx(@@-a Qe2FA@(ł dJZ=F+ο1aT}pyvv!C~'[Ꞟ7-BH7e>x 5r' LTR]A(vNө3W̩k$]̇tܟ6+˩ KV klHЫ .ii4pH.G t$ܾɩ CQaqDrYac?v` "9heв- A@$- Dr HZ"9!d 8[S\!;^p> 6kDru66666ˍH ,l@@{w;<0#\v\x`G#!K ]G7WƙCi,>\TTDȕy eOvC_bs{݀`[ȴU8qF&"͋ aL dB&piM(gL9Zُ~T4YTE\%Rmdכe縖9YQhڠk#Դɀ) bvGE9hۤKf`rua72ɧQ?o|Z!LXߕE[`5cez, E*l]4>Dzn{gFHb˕95ʿ '=r7cŸgƽ!c٣޴& aB6mB+LP~K($#j\/= HC"sDaT?5 NG>oP.鿨VmiBB:l@:/-yOq*'܀ r(o1ɷ+2- Ciwp!/1?yvϭ&ek4VtS#[vv?.[w]|K.6ȮXf"h-Vm8V9Unwx!1Ur`+12q]{ZMdeb(͘,xҵYtE3)JyU-Wvz)Ӳ (C?? ZG,KYXp NbUeXXF_-T=i\q(A[Mo_֞9T3 -kbw/;GdR[w--Fgܤ^ [, c&@.&\#,qG])$S)SlgggLkA<#,g~W;x닄˜WLJK\x!45~blsl_}7!T=~BDUj1Au)(FLq1A2cDLmM_zhᏄħ a7 xԢAw XLhidR$%Wb}oWwGEZgbӓCDxwG:mjjN+?Z9)QTJC3SMڿI+(8充Mhhުk4sRA|iYTTlgKZDkT2"FE͡H}7'j$js`z?ہ H@ώk5y0ZX^G˱w\x̴7YnxSa>3~={[:ް0g?/nI'ڙkie=H^uxΉ&twW]k\  n$o??/,>$G iS:*zU%u㯍ZJJߥDtO{>9s;T>5á;jF™=* 5}550R<$Ѭ'=[K|VOՄliCZ}qK;XgBrkNԊBM9Rt"UrfhTjr*EEOSYgOĤo!!PU"2 !,T\Uk@ˠekY=7-v y6\eW> +QS|Pr5ÊTM Z-[ipl\%L`XjF LT%DѮjwD5QE>7777;y&H5GGXR6KL= # # # # #>mʜL7),, E;?0"Bȵ!nr!䂛+ 7jPQTTDU!ThO.ZV"X[їۋfTaF06793]^?E o[ZXt¢a Npr{j8#ʸā" .....?aI1#""6,,;F9v aIS@@q{PPeE.z=>1ܸdzg~a ͢АH=_e KKK__!%h"eϋ["}>NNNNNN# ""aDE/Cꙁ[M8 % %V)))r<oFEm_XXbnp$$(}LZ=,x&^+FFFFFx}|x`/tqnG,f<<<3xT7@@\Q$##aDYHzֈ`7hĜ#@#@#@^9>%?&?3=J1p' c?'ih3R-DӁ.7[߮D<2ޞxu0G4_ d Xx-/k$7kgc1򕥦cd1fLq],deɢU,:Y:a)bH`rҾQIKBQQSȄ)>{ ms^H_b&m.%Ա'=[ i=ҨE9UJ_.M.:drAĸn'd؂RwG}or%0ת,ŹQXeV?Op?!,[LH9eZ/ŌRܾiZC u/vő/,0{^oדwgbY>A2}G"qT=W.kPԵls[YUJ]}#6Q^WH+ ^infz5 ;*B(9yݛͼ+vInq-5n;eټjKōK&@V_hl_ mODM$_mfx'E;,xrp]jؽ@EOl0WKq!Ec8L<Ӊb10 ޞ.\%4ߔߤ93EfuћޞƯt6.[\?Id-悚̿S~%ujgٗf˞U%qHUoJ)9z$r/3;%X~X.dyݗng:0kE|uչ&_/^׸4AezBgnG|$UU)J⇪FUT`VYX\LDrdރh[C7EV&uxA?.ٗۋTtZe¯3D#d0!7f;lEMeA33ҬV5#,%c1{yynV}|h(=vf?s<:¥s,A?J1ùc[O[Oo ZWJMR ު0os66ɇOwēcQs?Z(4l]<ʚ<=zw̮=9H,1,opqԧIߟ1@9-z o\BxtZkF~&\Oq÷tٱJmvMae; 0H\$kѴO-.Hj)(Fg2[\z.7D;d{E50t86oiS8^kŰ YLj&r7F?GՐӉ3򵖜o/z5=Ċ˓}x͡ž~^/9>OG%+dgni'ڛq=cZ:Riژ.}{s۠|vO)PNO;9ôGv}qkel ?Ac\*M,D++pjSÂw؂|6<(zUvW?V3=Ӛ0nViU/GUץT1AErSjuLg;0=1N8rgǵԺXwo=:3k(w\x̴7Kro w33׳JC.߿}nP?0ù\I{;b _>yw垈Xos:$ň ᶎO="7e*!yWÍh "N!$-dn#o2c. $a@kUvY5wCkC;Ғemj$ADgɖD6~X7rHhj\uV4=YVRb7kKI5bc{VUMOXĞ&M;OѢKL.9S#Ko7Oe_%QkSXgPG?פK:ZNXd̈́w3 /VC_< <&{ݦ#sяaaaLXSyԏc3}T:`TOCY,WZhoϐnI&+B2 Z16qϪ+KQS1)0fL qy)tES(J RhU-[Sr:%zq֎seJR+EM Ѹy&׶_d1:2{s,`d<@䱔CKCgx6 Gmq O䡁S :) #0@ аˣpPHo::T D2y`,m2hYDˠey =x"xLh)%ǻ;iUTu]:ƾUo<<9Z6{G(EDopa\>˱ 5yqN[H)P>rsuؾ]o5Qƶ\<äG@ڼ7m=/깕y)O^<-'E\IVʫFt< ly`#`{-HfSԂ8lyi-#lz"$j{ƖW[-[g Ͼa-/'"9[&=G&]J3!Rt̮ՆVIt>9 qi1>Y$?%`M5jk zt=:AMQ D|ۥ10MՓC ?kz}OZ=tӈwsL&{"O>DP h,#o+w TaIXFI I_xusWC+̉ MW؆+!W +xԃ?5d I_W*!L 0p`XN:_/#x wc;\1!թG\$תg 55~PSW: Uz@#bRQ zcdFҙRNR^6.tYOP44E='g܋{{G{_Wuo畊&hHMZEW4]U2?.[w]|K."qkLb/3maM[Y?/xE->3~uUכ8΀>zpnP E}=e=$X ĴOtּt"E٧\>&7C%gq7q,׉)1y]?T8ixVD<2uǷq|Ƿq|A;Β,`o7nc(|/>}5{%4xtct¤Ta=sz" YM`Cvm8A a aGHg 'aEmuG>! L``nLH7pO qp_QعRqZZ{3H _/~ߚ4IҬh|E[WB_'7%%S\I$r #̺'\MLqV+0'gygp޼. 6gl;p 뜆%_!asM^_h4wWx}I^V/rl ɟBc`Ya`FQa>W`q/'e:ȑē ?xcJ~7>Vq7f)OC<QZS~D8,]}* +^aɡxQ5z:H.n&m%w8/L{ G)gDOȭ3P7kxKa]m8ÖpIϘg|W᠞^Ʈ2VO=fϊ/5O!IY9LTW [3%XlhcFGBS9)quݟLO;rYRh{Z0c5F^ޒ˛DP- DAj<>_9 Tr\+97;S7.Q!051´kRIQY RgTk2!eTS5=!RSۍx7z]#djK(--\=}5>Zs'@ At WRubu|{TfМ@GO@_O6+Zn2T.hUhh92{e{jnEi)JQۑjZ#)2hr-gײ: Z ]A Zfd2Z-[32hYfcBˊO췪ՠeвs(1 o 25,`A$ xAЎ OCYLL d"*,˳+5#F++Ǵ,5E\%4cd%·(ɢU8%vUCuXz܎5S#F8C9YuڨE_bUЗdKju_bR?|ߧC8гs,h` x$ f慵he=@H{eSžÞ?opFGރǷ4xt^PrS_:)+J&W3*#,|( }CfN g:!HɑO+}o6q܀M"6THOaW̐w,?^]:K[,1-$l 6]dESU/KUD%T1Qu:Q>*; l.{3b„~OΣ[5{xs`z?ہǑ?;֥Vׂz$cq͛# 60K,g޴ś^L5q1&ݳA//nɍ(eF5fWRf^ /ׅWH~88ۗbY]8 !俹 ZM<0֟|QR\eY;.W 4y{Sж2Y~98U*175С{~Y ]Fh ]V4lE۽h%Du1s^ݚ$:=WB#nZy%2ŖbbK)eHh=$Mt4v-M߳/Xv gv7n !߾a)uP_\ VjrUkd2Z-[euhDG2hgSAˊIH5 iٕ-3xв2)VNslX: pr;6lhWRrjwDjV"Ahe:4`G`GR&CL=G#####:I4ГCӀZEr!Bȅ !EH5@E@E\JU], vvtsySi X eONւ M`nsu&69ocl"\1e%"iߑLfzH ' c?'ih3ReeEpEũ@Ͳ5#:T3 $|ξ,5E\%4cd%Nů˒Ejq,c\YQTv K껶>25ł{c# ţ){)3?3aoj&oD.m:*V= HC!sWE|?|?.m~R>b^QϭjϪ٩77fdlhSunN$& <`Q+'D\G-(X@-,w MiKh,(rM-Q'urvEc®8SZg⭨hХp^oiʻ,!% kA>P% xJMU7J٧ SA@-9 |2h6A6F- - lX'V X NCoKv4lhX !B.\‡y@EP'*7Bw!iCdH;* # # #<hF9ΓXĚkiX3'DkXP5kXs@a\[Tn\S ̒pY=ZOQV_ dw}?7]'N̲.zCR5/D5O/z=,~;S=30XIiR5_촉ڬT*+UH'^i=|L؁#L[i@h _6Ja}Ǵy>0Ǧ/9l1͈+jTeY\K0tH Z%ʗ,[jX UdmJFY_Dqe*t"bNYe$(#A HPF2߉PFGA e$2"(#@ Ue$l 2PFB@ \-e$ 2PFb,eĂ `Ag}1n2{aC{KYe$`#`#`#`#`^󎙶I>'-;₴Ez/l}M]? ? a7*jEV E5v#bc!3aP7Ssg^_nhlߵ_;9TıCڗW\WBbscaɰW1Aj|Lh ;kYisBҸ˷"Wյn׳ȁ7xWz5i~fOLYD h(J/x?=A'puLg;0=1yv\K˹2{ڈ>ŔH#A$X ]/uE.,as1JVrFW$̟I6038UoErB? fM; gk-ٖb&YO\חy-׭_+k|-brSa%{g >YgM7f7D}Xo|)mz4?!~/۠hؼ5u3h d?8U"sqJc7U]4hl1Aˊ̉ ZVˠeO,hAi -+\TeвµL*- 29bA 2Dxv U#lhWjwDˁzHGW섙H11yG F F F F F8=ttha$E``l+Gsvtvrt,к#Bȅ !B}tsρژa*VFs:;%0EeE ~8(ER&CZb~){ $HHHp`2N`%,+ ԓdT-쥂=r Q2Dea9լNd00bGՊvd(5\B]{D`!C F v;ښ;!C `*0G0hkˏ| "/D^2yT*@#@#@#@#@#\oc0L4->@@@@@@%Dr cdLQjGGGGǏ8dA#7$$d&c=18z0L{7znaL2\`qqƔɘN ܸn$0F?nn1esO}J\+Lfz =~ τ }bb}F{@@iQf+ LIx{^Nф~k\y&zvu6#_Yjj=&Km~Y E\%(1YuYhU-&AuXyz܎dHO?n_#>P7*Jq;9b[|C /3%!ADSJDiSBr*JS`1C?L{Ds$dV9t{ fAK-߮=)2}qV{Âw=ւwmr-u#Oat]?p}0jS=!iU6%0s=ގhrKEUj1QuI(FLqNOۖٵgvlA,LV۳Nj51&3QQL1ᣫm.%#dJ,7e wUrX:GIKlNvh{M!X` J=/T ak]_I o' aYE*B:-TaoB|*mLU甛6o?(j Vh襚4Der%M&"iZhr[dTg ^D[P_oN_S-wf5`{qm[frWnִҼ+2S4Sʭ}D.FCQ~zS?g 9~1uݟڏ玜gǵԺ`=8E!&'Qf7}aD􅂼0<JtFƢunQEOTG԰CASBZ8ŘPCpVgv𬐦%箈nw)J-.OV_K c$ٓ2D4ӷ{0EC M!Q<_IuP`v(Em~jZAˠe˵ ZV0A 2cp-ɱ -;(-1ee X-+>;O Z0aA 2`.B\f ѯwD7ʁz XXXX+vLӀaH 3u~3:@@@@@pt{2otH:"AC9Qv;:`;j9~`:Eȅ !B.\ps{d&:&aH @@ی$uC,%4dY}^Ya//9ǵ sʚ&zf!0 y'E71ִaLَ*Omc3ӛYzf ?L2&,mQ3ޞxn5CBJoq9RS1YuYJ3&.K]QbdѪZLq,눝 L]w=nGkqq;NxNҲG"4ܥ/^7-ޫfΦEDˋ>&~v%(eGY!%9H?we .1Ѿlj9f9t}UiU>ݑNZZw%Q<r$&'}G&^1%l!բhwtmt 3ms %eQ ]j+%E:Ƌ&}&yS~^=r1n&̜ܴśbgf¯g |joϋY#s0\WPBU׿w8sR=U]* oKb= G^i=bMhhaO"h!{!. @aԒk5z}If -`e!O{GH'=_~ҹ:'I vO'fօDM" |lTmz.v|3>jT̠bsTz*4FAŜ+A -QP1#iT+V<@ŬW}5pPH #e@Ō ZV<3 ZV<3<&x*fZ-+Z*fh>P1EObA t37|3lh-*&9rpr.ة32;^2L` 7!B.\ra>RfaEvw,LbCCn74!qZbP(<0<0ȘgaL{KƴUH$V@4z|qfsHt*N(NEI`@=5{d8UM0,Q0t玆'U""+3&qFnbJ֕_!3>$2q9"@陁+Hܡ(z,tYdrOP֓Q??X'-ut+q1EqYT#=]7KG`萚# y]I LK <$&Z`N"~RlWɰE1ӣCfav̮6ʩVβ E1ϗ@PcUԀfjDfYM굄zL*H1DFFT2Rg.Z[V4nLcѪNd}h2r9d2vml6W;]noM/ RZWdQ/;tA1?1fr7T6ԈSJETP!DhəY@0#`FatZG |HQagoo3j|Pa@8x:gBu`͐uIt@G,0.65cٸ\O3rى ͦբS;1kl<+= f0mss6A^![Ay}u'ITA x)C86 D=Zk*ZI~wgُ-Er-7E5) 8,X&GvA(#?E~Z#i2hr-c,e5hp-31ek]ThliвµLA 2%Xd S҂ Nzީ/8* ;4Trԣq9o<Cʇ\bbbbbCGX7dFRJá hL* !V\F}C.t۷ S)X#  %}ZdMSrںfr֊i:K?,5E\%4cd%YQJEjU-YSfJ^/o<9Y8oEnem[QBne=!r=EhХ IJ<'*ٖS%LdǁgqXjedAFddAFddAFddAFr\dAFG# 2 c Ye YYZ,2dA! 2<& YeȂ -! 2 Y $X l(, 66666Cd`GRYu F F F F F8:dAFdE Î`GȂ Y;ݐvDz  YaHb%Y 99yr""'V$G֧ɑ%$G6#_t_m쁒K,x^!MrsSi JdTAd$@Fd$@Fd$@FdEdt4 #2X ᠐)eH -Cdh cBːZ2h Cː 2K, / 2ΦrM#2`#`#`#`#`^<$@v!bbbbbCd$@X !2vr!Bȅk[?)ҧIsG)ZIe%f [y~9S#[o7Oe_%QkڙXNG?פK^Z{hwynH^-`/`/`/~0#0#l( EEEEE8=ttuyCʆ->s[!䈃H|jMp #Px^xd{4x {яeeaP9SW$? Lrl:3a}B6X!XhAK Zbxi AK&t_2z4G> ȳ u=w=F>z070~x~Ѐ}D'zA+> 6'%]sx52)j|eO~KR! gBjeK&/x>o oEYf@Ö'fp `*dJ2Iro֦΄p9|Đ7ң}Ȯ$m|a=1!nVK ׮%k|m]fKΰݬna{=:d{s,۵ lz,`Em-e[M{t7 #wmq ϲes*ȗe[6Jd6] ;aSaale<{PTQ΂5 ,2hjih*\~*p [] (nԵP.Fn [Y@ ۨ)[pXA,`IyJp&-/B\'lh7lhI{n7Fʟ-yҕizzzzr@h@hЕCWĈqc/u,,<5`G#ЕS\9j:B.\mCi,b^jj<0s%{Lwsvw>k `F03E0 ^S68Í6E 2KXmj0֕XUuXG'lhZT4YTE\%Rmdכ%gBrڙzD5 z霤*sK6BeV>roKCuz_3|t߮SJ^ɑ피J~= HC"r DV? Dj4znT4UPnN|YԊ( :('fD*B<$i8S W)7盖!Js_ 6SlJmR5kSbFbz1)}\E# Č&'rI#rFId_[=Gӷ՗L܎;7H5;qdbG%\Bg vvĎfoψ5;fDbG}  vmAx,bG;*)bGе@ˊ'vG -Aˠek -rˠejeH ZWΗaAi± ˼h ˰]9,ҨIGX7F" FFFFx-#tta>t@@@@@75Efv:B !B.\6nI>M[Oj% [y~9tk%'3}(.rJI5;2δ jEQrd62nQJ1"Il+m]ݵ0i9z/*T"DP/s.ZUo$:P#P#:{ {쇽ݵU!BT Q<qnE+uuR pE;2ƂevtcH;x̚&}"XҨc,';avя#hƔ-=)qґL&6tJRz' c?'i. ?33[+gnՈoK C \XxϬ{p?}zW!rfiJcwbF_<%zy?ȑO)G]6Ghqexw%&ʹ=f[kM' OߔND*R^u\޼̾&^ZX˝,T;hKc•s)/jhG-D [wdh>ۮ#n_ع;oZ?wwղ>jesM^_U{+j~fOT[7\uLg;0= ^q-!EmF+nf1Z~H9Li7,Յ̄_^'1ƍf7Bi`{?U܎]Wa5`:EڜX4& ԣCUL*̨8U5Or0ǟ!>kB)n[k- Z{o yEJh~Ce}٧J#d)oYgMÍ>{豏gz.%tgrWjF-nrFwbJC]i!^Z1qVJZNP5j3 A{/Q4% M }2A렾)\kjZcaeeuhlӁ@ˠeŧ.OQ ZcBˊ'X-+\˔2, d J87w*j Ξ†v8)(:9Q LЇ)pyN## )!}ΏGn]#n`RXDs0Î`GX!B.\r3$F4=#L)#b-#GFoޟaY.#EWف^3./>5j!R}&S6'yTڟ$j~dAW pa^g~Ϝi:h]Z& ?!"m;yEǩYYg2ksUКahFlDǴG?~P_ _#'1\}[b%]oɭIn$~Mu 0izEUUXtDmVԺJ׫m zci]+!z38 e>\Hqrkȭ.d lu}t7O |9qTGJ&h/š$ܓppi"`wSQḎ(Vi:#{ʮ4ux[2R0۷(;T|^C$5Te73-9#W;x+_Sg"U>TNf /$Gz$_^ONRHMb jrHRm .r\BbHROv&$ǾHRcaa$Gzvm*I-c$2hYI1e'$2$CzU, !,D$8cB 3lh7LS_CfGGlے4HSOz F F F F F{HSَ i)B.\r!䂛۔~'[4ine>b6lagLlYٵ23XOG?פK:ZN*Vxx3+ɶ \ 6qc`4/M֊.sяffaMٶ[SG1aH>N:3a}B6X& d"ˠ5&\Ce#ΩqNV )?9O7ϟV_$Vݸ \Is \ck_in}c* yI'|rh wUV.Q8Ԣ/XN8<偆|SmW%Պ͖u:RYAȔ2z( FYN%)J!Q-.aQ4`ZvnZV_ƞ FA Q `zQ4<,,b 52TmS(: ZV81 ZV<1 ZV<1 ZV<1 e Zbh>EObA3 -ʖx9=ЮѢ4E1wH6%(Eɇ^ҢsX- `GEAȅ !B.\7bIzER|}QI#####&0#0#l(;fl} FFFFF8}g'ل|5*uauϝ&EuR  -3ʲzLq],Ҍ"˒EW,,YE\ K:,E L]w=nGZ]Ri`9{51Q;Uɍ(W%hIytVmj1ȋ'$n} |mҥh]Եls?ſ 1}#6QM_rj8e1 /i7߼KDw&{̺'l@r8'縚 ncAlOԔfρl'|#?;6fwȇ-p_.3?~Z+9\ܼiK{THq'7F3.H)vtqB:JW<>|`=gND!J0Tgbw nlYWObc+\W/kǧJ#daYg'ڛ8x:R1ݫԦ$ӻ^O]yswx6FgvW9ц?dkaxA=ZJ zϲoPmV4L(M ^}2A렾I. DPWT]2hr-gײ Z\jˠe'.m?sūT2h ZVKK^@V(m=GB\ԁ+p. PReO4<*D2¯xtl•gIƐ81:L|*$`:#\Y6+Ӻ'PU* y=qHHlkp*SZ \KįtrvEXC`mL+ By9c. OP)#a&8b|Bܡ%'2T(:dp!(cptb'-uCU xnH9Uޑá.Q}پYG:oq5 MKrQ1-Df Hh,3WJ"ʎ6v,\cBLM>F$ ̙`sLDD4TZ= So֛Iepۨ&qg*R9.5JNHT1ӟ*7ʒD2'֛ 6bUw[ӮNՆj^8BЯx4.kou-XeH{__08B$g_)jcb[)7VJm6WbYI[#P#F@+0Q"0q5u0Cg0"`F3Eh2%"eD/;u9<*3u]Gy3W|-D_< :Y|Ji0ˆr|Kw |NJ|`>jWČ ,Ưd0Lp`~Mu 2A9쳀^bLFLlZB-xqd۴ ]MVOA|`)[5~[*9y dOEFthpw\-Qu/SuG?w}{a7 Xx3o2$@l,<'S"/7{Y^,oh&tL[K׋\QE̳g臃hƜ@W@W =)d_Ҏ@/@/@/@/@/@/{0 ̲K3. njjjjjjjj٥}.WX3zzzzzzzى3,,,,,,,,[ύvO}J\+Lfz5**E_ ( )sݺ+%8'ܨO,ǻn|!LJ=|"S.fFcۤK u[GLt!s,q[׺"bğ ⏺m|Z*#ƕ[򛬳QZQ*UkҽqiJ_J5m?QS ƫuݟ`츖ڔAX]>˅L|s!7/|f&zZ cL0gq";r:s˸VWrtBњH>Iߧǻc#ǡOL.(d=:d\=dόR!ooupW~P]Ɗ8p])j@#fEUtD+ZU!U:y%96ka/eM4* u-=Ċ!j_7ƖB}c_r~Y~*?r/l^A֘E|64'ڛx:RIX$*l=E j]#xX781\ybxZ13^ ft" z4tZt7:O(~|Q4$(2)uP_Q9}U+WٵLA^a<ˮeuhl1ek]ThlOPAˠeZv-ӠeвZb,eVidmA,Ȕ i~8-w*j x†v倧8(M}\+Lԙ8;;H8@@@@@pt{2ot uEC! 萳H;~`:EȅkC.!v[W WTJwK@0\.v(v3Frd,/&cyhL]ʇ9" ci<9I1VYUnVHH|r;0`/ >iCrzZ5rs9WvlƩBvnЫH7tûnXKN7H r^MJ7jIw%!֐3s3*rF6u4i1fV Y a3+\\^U]bH [ )5lKt~|m fƀl`6i&^M^Ь)s&V `F-{f=Qp;;97p66D@';Wl!u3333^碩 AmbbbnHjvH#ls!uKB#Bȅ nn-Z$l.)O {^`/ )OVU,^v^r<5r痻YmGr`S]޶r0*ހl 7oP  Ȱ{Ǎ>nd9ӾmMD{I9ocƴii=* #0(ug> mf_Cj>=%@{:~6X_*ts筃IuQ]!==7cBe_YMcdQZLq],JE\oRl\kgrXҾqQ>~~(ި(q˖!_sGá%%6j#Lc'=%}jBl?"Դۗɪ3U!xȶGQiD\mxaL]ӧ=p/.tUzMɳ^_4zcN=\ݵ#C>!ooڦm+"XȂ{wq/%`CP5τ bT(AxwG:mj_ E|l ƿ#l;c{œD~ܓ?t˫\Ǯ\Tr'2^|7+䨌ĔBi-">/5uvU9˭5T>b |,p>]<^iU^JQYj܄s`z?ہY GNZj%:˘mk|1cM9r{ܴśbQgf¯gA 9$uq s͘<OLC!W֕)0#:$h)+?M&]JD32QRa[;UR#ll3k60K* $z?hWB81HrQio |>f>^_WfiiHÉi|#~j$r'(Mk? +UUN N1NZ^Mx?bR_7!n䵘~̔_ezSa%{g VYgYDc'ڛݧ=c祜[ Js:ժ wz]MO2bM'w㴅4Kô*ß7b&lmoi7MІj[[+a/QF~7S}(7D])wt+DWֈ|ʙn A,RA9 H! ZmJG܁ hS٤v>vG@F@xxf`ħ͑CՅt@GlY,0X`,6K1iDkv6X|6 ծl܉HxpxK0bqĈX^f(¡9 ~ň^%2rLH,:lLfZ~\4{@rT 4Ny WE?ٍ"w|я#?J/9Z)Kp$'TQL'/Dȓi{40KdrWZcn9=%Yd*a\)}oEa[9QJ(Vk\iS\A !?o̾`0WL|l L(e3{jj{ÌURX\jaeL_$+u&Xc}gXGJ%m͚^͆!&m^MUK̟YSn7jZ]=ųFPZz>ܤ jl3&3Ko7O݂tbh5-yƆJ޳_BE͠u({e$(90`v(z~MٵLA˖kYcp-Aˠe<&p-1A 2 ZVˠekUZ}[aA 2%-|Ү'읊I k-?@_a'Y %T@@@@@7eT #,ʗ5`G1%B.\r!䂛C7gI&/o!ɤw[[ kc>F7؉?{8,˺JMQ4EL3BcJ퐢-KkE  @)T;{ QI 8J"%gwe$5rRCV\Yqe =H'go_J>}h' 6eW*VY_XJ_8B{+mVYa0=X̤HfV-lKfq.8@(>8.h1 GO綗ZAwU ?OZDz9(?oj,{Xk˝M ꖻ 1w)B}9HRQDdGT; hZ&< c1'E;6'kqw8uZ5m:n%-܇j:h}ݫwtpnti+ߝV tn\yq#IYbL ^k-r͢D`=sS`׿|?;{;Y@`[էT/a:::LgLgO{3KgbRAq8PA`9LbLb@J_2ULJ⣡cyz]4@Y..=..=]b3=4;a NsDs=ǭ qkeq3bAqt:\[u;8~̓, t6G:HbXNre"Y`Y2M?}{{vC PE1&(0q c(lZ(d Ώ 0P 1yrz1p c(" P8tt16-9¤"Ca10<$ S"WX&(t%Θ gY2p(&.4i\9%8P T0C@KH&(0qLg2dQȤÁ &@Tp@*Á &(&(0qLgbQȤpo3*pi@*8P fh` 3T01q-6(dO"*t8P4 Tp@*8P~T0AqLg?<9P%B&T0pii`r@a8PŁ 6Ξȁ́ 3>Q%*t8PäÁ Tp@*Á &(v wOT0qA, t8PÁ Tp ZTp`2*D*Θ8P%*t8PÁ TpAf ycx1n^m?`000Fcf~[Łq=]}eYPcYﳬ`~&~#CKB0RtNW`EQr?K1ϭ)&oč2Ne-)@Q ѿ%92Uyz`0|B ӓbŽq a$]b`f5O'+aC8BXɓ$Ӥ_' [u:$L%< c|aof 5nWHׄ=@H@uiKkȃqC/j.y0Y)~|zK\1qJq0ii- w0=p_~:NC/_tw"g?BZfs+F\(/$O/ XAx=NY 3jV?zۅTh]@#T+q~:\ M~ tu0ubcf_ꔁ%K2Ko TG@E/unjMc@fxQ~Oo @*ל|||PE(q-cb ѿǗ⭗{헬)rAr׏xY_d =H_TKd19+8Ȋ#+,^;@GVH[S.UGVY$7d哛E}b{EpHVaL=v#3)glK^/qZք!c0OH wN);Er|rW7bOҋ[/nI2ƭXbo p]Һc4}jpk5ոV01g{ʠ\9޸J:{c*~oLe%&S{c*~oLe1q728 Å8 Å88Ц0$#Ct .?&p׿|?;{;Y/2@=¯}s;֞Y{f홵g֞_mXf q;Ycd5FYq;VCq8wlr&\lr{Nyꄷ<7Qaŕ P: f+믬+Q=N]YweAk}]up)fUhA|sBYnw.Xv+uC y"wCn !n%Ļrvg{ pr7γmUEvA X_2VX7Rd_c@jYߍS%2 N?EnC}zj&% C!0%m AI𽀽]Pӽy678h}H$fZ7`C7L&A^ $՚7`(#4InC|nowk_]cuK5{n DqY"l-3 e^MD0W< it5?EǬ˳:VߖxlBo-P{!٘=vgesIpl"۲%C<Q@~(Xn=&fZzxIt AfĠ-p2G%OP%N,c OEѢF`Y4S,\!Lrdk2(EKϝn9R 5//2O,W.Ś㢄fx=)$IFӦZYc_УY2Rn41O)WĒ+/R{ x&6@fQ, "&^Q4jI [J ? M|hj%%}1&tk4JRiͬ6tQYu;V%WݝYv?ISJzRx]$˴מ,S'Y܈/INʓe˴lڳe<.2BڇXu!d4J"s1&W CQ)0=E,[x,>ݣ]붏6a_yl.}{id$]tza G8rs 7E@J78"O cǞPIm>TI@o_`Gf k`aPZ漣(IX>*&Bx p~ݠH=AYOsI:U)+c)jߙ%¿S"WEEϨb%I8ʎ(eI4"nH'\:Xl~U+J$~f*ï]ɭ/C i??Ctn/a-T*ȀPN/{B! "iX-p+5IfA٧ff\0 ..NrBن? `gY8%Lxr)i2A;B𖜬WurKܤa=`i4#BǠQ_ѳht@A> 1Y, 0z{Bk.`&Z3;7iTҳTd}S+gzdo/18O﵌040 `6&䣫^=.', pN Zv@':0`/ޞ_;U{zD8ThʩBogƸX؇Eij[o``|_}C_!] 0Z:JS6k5(ŁNkpg.H6z莘WS'GW'RVK^)(ߠ?sh8QJ#[h8M, cjE*6HNubI]LvQFFVKrѱ/P[%R:5H=n~`j;}$ծzd\+̤>ZiHWS|(Gi`KQiߐL3#eI4^TAd}ANgkTw o%jN) е}Q9k}PiҒ`iQJ"kICX_.]۞S6TF;uyZKJ3 J@O՟~+E6琊NdT쏱!Y0 c=Z׊u+J9^c &'4u1qքTNT{p<ǰ<[VPN[A{8X`7MA^ڋR+ {ݺt(MYsSnwOI퇶3-QQ%0fd0f^;f>ew @Vs\cQ:P}.T_ʊ#Å\>}:e2!űu`roWi/X/l~?#4 c`;zYofƜf E''̐ay sUν9s5V?k  {. ǖ.^cÌa. Ȑ!J"C!x G Vb xYPCYEd 3YEd0\~`WV/EUDok ++lXB*E"O4U=Μ-{'}cKS_z!~~vKKXIq,6մ ˵WjN?Nlٶra0{Y0Y)b2f43 dQ\USULAG}3ԋǑbq1_%-U!^yxvSFF#M(WL{-ՈuR]{ ~?vۃ[;M;$*&CPnmrz/SX,SmçA+S:,縬eݘqD0/*r 3?Gٞ%f&˄'~TDhꫨZ(w|dy(Cq6@7do9;Vs[S2ˏf^ؚQQl201} L_/zZGU}`{hV-r}ImCBTSQ=艾8QA3zв֡ezY!ϢJ`ˤhU+K.KG2,W(u7iKr b( ]QjPJyEgG W`S);N aʆIn$]$?"y`W.o)֓iϛx\ YS} > aqy+F-+\^r)Fiؾ Nfnj9YxSMp9qwFhd)gl5͹sXx*=2os<3gI Xg xU}'qք[\^,q{K4MRjގMoJ & T^d847V= Naw+l&A.D7ŀ0je? >_>5+!CP`Ub7\`>2,Kw(>ޘ|o1R#Ia{S?ǚh(.O3Qf-|V4),Jo6/N ؿF")mu'6mhQv.l݄VE3jπ%#Fst+\jeqkujVxoCojj@ߤIGE3g!\Õ+mbY~=i$ qHMQK]+z"UJL놾e~ ze j #I`WB`v p3fo]T"/g9\{L;bGp*d`PVNY l|mIʀD HMutz56bEUqdE%xI%9x 47d2*󐎝5l%w0IbW g#?NK#pCM+%ZxYtƄ֗'9.OZik@StLef-Mٵ\R.; $5C݄Ό^ 8IE"25 ˶) ߈9/B|kq(7$wj'lz^3_Ds1F-/ C6Tfz,]W]tֿQk:kڭi9M;~RUI+/'N~@nk ;tT]jB́w }cqdkȘ&,{~ZfѓLم2 ׼P9oф[nk[|qiohqꖧLD}bko,MJLAL` ZEOcDLMxr-N{54P`sk_2UH0嬇5da^pH28Α5/ZEwX^/z$9$1>@[pgC~fi"y)ǸnIP)3.hc=ɷیRKSZ`VROKFr?\Zr眲TAi OUD#D'b,d\C;UILO::5Kiҗ᭝1wic ԩ¾ՠ+D3nݺ b[on;Á(\U232LfU@]9򅩕?6ISǩ|fn #s$)?]g+җPr6t?$],k*4qENu-gkgWc_'hb m)KEEƭ)Ƿ9lڛ5ʴRQe6VPx:5.X$]|kAgNHUqJձ\1s"I(qS9n@IR1J$;}| + 0/%)fOZ1*x~۪g~;]b+2wO;êE bߨչj2'rN-_u%i8N4nyS !< M0G|a1:x;r̚=j5? -QcL}9&0*֏,gS_b]9'0x\~;wxf3۪LәL kpJbtIoNa[@:tHPDЎT,0!$PL 24@ЮXcT,r5l^"7~\GɈr(XsA'_e %GDAITᬐ$FnU?=p4J'l$S2"|PwU">5y0T4֋d^fRҦH81R_a2ܧMQ @TK_DũMZfc$8C5¡<J(!y+ܡUs76Uk)ʲb IޅnZPfԉ,B ԫkϖ %X[”)Jcv{3e:L#uKo- =aMHFcN:AEI^btTF .QyHEa[/%R0ؕV0JTcQRT4&Yo{8G>긣SdbfRGF#ڡ&>5)J8W*RTNZ# C'虴u*G;z9M߂[-@Ђ5uGkR8e~3GSԬDOnb\ S\ /cQXn1>l'ƵryӡK2+^}+[ )xqr}u@K 8η+]e٦C8u2Q9<=B۪#nBqwP:=i>gV@b·F52zخVz{gB(.:^AY怌6yي~:"ўM`@u.+WKn5'nWcB^pTתߪ1 mV!d)O^hjH*p@FkT,1S􃦊i*?.Z>1%ZATYO hqBsAYеUN>2Jʲb,:t2{SưNٙ5ٜzVDFӫdX\gG^PފkO|w;rPiXʽIfҴ(+r'_[ <6 80eK`JŴaF}^jXT,b sVAgu0cw9<)I#Po[@FZʍRj g*T;Ê:w0`Zu*AW5 6J&@ᨷu;k ;i߱eJj`r&$hmSSjjll3ʀt䠹\9鈗ѭRu:ܣFE'o䟾1YֆΈ?|Us\`c>V;Y,~dO?yJ [| 䁥=*w/4> {BMaTv[?uWupS{~탃byjw}if~.ut?2{|ok 5ܢ M ϫ?vWl fUle#SCȘbf1a^ b0h4X*5ϛ0y1枂o*T9~ƕ˞_R5cìYYbVų?ٷƬY v/ϟrlin=אjW"<#uuϊw?k5;]vuDyt*lHu XƙZjuϻ0r_TIQRU +Y_aR#5[[-(l_*\)LWlN;˒uV__Y.jNm0/w;$?aUaV")/q@d~@:@Fn6Lux{ux6Sq=zה)9@mރut*r]4S`fwds'EgcU?֏y0؟ۻr-lxsV1r2uBb4NGP[u_@4R&}ƿ AbaTnjaxl%YRl^m'wj\^?ةK kc+j;v-!E)`^u~~~0_,R3n"EvLg8ᩓ55͈H.Tӽ)ԝ-4gf앙ζwvXCanG&~rK=;]gMY}x/EX_Ⱦ9<3o-z91ė*xCV9rm_( fe rq|ϨsuKiۏt p3I}X״~Hסkr=aK5Gy8rZU:BN/-~G|dTΘCZ.i:f_ԋ3*Hx DW2mRLzn4c cDnTmtQ$#H?^*va[z3^;7SxZ/<;UYJPo3nFߢ.Ɪd8 ,h,t߆H(6 GuH{_mK*R 6&S `㺮l7¨n>ik[lIiѴi4V]y T{%ӵ;w8? YMejN?ǁ.6\⃶WWvdK,Mnй;snS3Mz϶aE"7L/:EidI 1^&rA0&r4m[e`'e(Jt[GfX2M%SƌHҿr|zgeT uPj,8]~S0l9^jRƄմ`M2rd\8g`Xkɂh^UjjsNG"aðA%çƲ'5e%=LiY]P)4bzHt\ SCQTaL"I&g хC}7l8S}ٕ w&&o<ŕ B=ПNh91UYwgqֽ_Ywwwn'z3bywPSgl׬E @lԤn ,Wg,r;h3wJ\x9׃e8hfkvV[F_õ+[-rbi:ė;.u9EQ(t]W{a/TeoUJ|l?%4nTOP&x&a@,^MS/, / Zf͵Tct^`}u9VA&c?f%nq\KB fU׆V>6o2oD<"ݠnYJjǥRCwC܆Mq3vm nܶﯼva n$hq@MϺQ+d휞xy\SjGOFa*םdoҽ'Ŕyu UV ߾=$ωLvr6ilbbs1Tp~5B 'G="؅; ,Ltq הB#j]3#1'{7#4[B#1<Q$frHnSH$#~^'i]0y[~32~ g l<7ŬmŔCLQ&:k eFח9~qR8|UFw~2u1\ EbRpA@+|'kJ_2фژvI#sG׾zćх 1c8¤e85 (}fuo~9< -|+ ҹִ7uۺkM\Qh74f-)cv ԨH#1lL,+~Ut0L |e%7)vBY" JC?N 1'3cBv뢋.pm3١  J RNӎ1|܄MXю"*#Ahz[i )WHzH<-8jvAǡpzX6Շ;d@%):.u~\X}FF8 秏&\k:B$Rl[w]n TbEH q \~;OR\r_QhE-N{R6>%EF jcֲ)-^#NtWUۣyKџ= *%h?:# Ú0c]sهzWnH'{ɻUY;=wsƒ #i't (wUK/} !.톸۽<|L1 */aB)&ݘ`e@笲̐aȰpaYϽW>̙ XXpa-PÚ3凑.6ka0k  #XKd0d& + a0+  . /7$>&` J[@sXmlR#`5ópaQ|:+7D} EY6c܍ug֝.3C'ҟ{N} 0mX{fxa,bvhsʇxNbA$1:;$@5vu3j>3|H! %xZiiB9Pa- {ˋu0w#AGV -5%*,KY(4W½ ox9/uъ560U|$="+?#$ Ͱgc+ 9R0瓬 Jj%7`થ*2wR#T+[c|F;Ii诼gd5"lfES2ڕ):ط F`j2 NCuRBl^".l$XqnJ8)ff#IPn9i2k~n3? . 7 k\j vF44{5bfodsdFX,VJ-8{/Ξ]řei[:!1-D+b8pD E{1ZZn~rCxGo@fzCUcm)Dž:DfM$dG 2".$UEz4:6>PކB_fWʐy]ݔR/a-J$mB#tYG( ŮpV @G|zpiAB"q?CM\i [ DYtO^{#@qcxPMqlMu-Di>j[h[L钦 8@L"λJ?]a-%ƅ  0 'v+ź:&K Iʶ"qbh0/wz&/:H*@e3JݥaIuQXpࣟ<-{Cg[H0$j1]O)*jṼ7EEoT~@&5 Pԭ/M*?]yç+*9引> _;ߓ{.i)*h:0`69zYiZ]!ǾQ lxBh b8D]DVHcEk(Ke>XU*K:O%f׾}Δ|P%ʐ"C؏ G:]U5ǸCGbi`f OHt#N\8FޫVjw2$ vCj+S0x`Qd` TRCf@ dgcJCTkȡB.vt75 |F"EArp);,r]Fu {,PswЍiHS7e-ڤŷfLl~c+ci *VD%'% Pٷ8dpml2F6ŇNSXF@nfsf䌬-9֣ʮRK^@{82#` u8;ϐFB0* $0n5gu_! "zWF焉.ޞ*A(T$i~@iKvNު0QR]D.44xB ^6!?ھuSPCK:8# cIbvsPa:L"[ ohex06m8y5do+2./Ŗ2hZ2=7_:A~Vs4.2+ GOVt2{( zDWw4C7*%Y)D[f}%ufq7NFVuA +p /<t6<yΊAO\9=O8A ^ل)RFi"#yz}OFFYc2rޖ$"`۸si;(ap5ܼ^|g`LWW+ A+=bzfkƜs_}UpƙJL B;nj\o5r-ZʕEX/k7Hn@ŰgvĖ Sc =TZI(ŋaԢg}lKoi%SMD1 8U! Р!]IuYovcԢKWa,B`jƘЊm $4#,14mt[Ŭ>bװ)<ӛZe(K&_c^3083 A(#ď$.[U̚7ꀏ=D*9z=n=45_z$%gcm 3'uEs(lO&+5 Z!}zo#dA>1\'v .:JGYq8Щ8w)hnvlFLnt)|5hE{(XS{Rҧҍhr  n0 mI۷\+"'Ŭ!&Ϙ@%t=WXs2E١éT'o}iNyo[>QdtmtRT*ik挾QU^erS@R[Wɰ%AgT~SH#UCn̨O1}!EVE(39GXY .R |=Fot~Mx`-BYvs`&#0le3tTFrZ;WӔ4?Yc3n8dy*YnҕgT{6 BTM_90yRyMۨn MEQkRogXU[SfNJM s22ށx ͭ#A^ V H )+u4i#ܝq\*](1^OUXֻ #׭kA%Vr' 2)qu$mŹjPaYS%Tڧub/oT=h$D G~hXoe1(oJ}L [s\VnudANZ>̓=&-PoTii=n)nJAMPMD.)zAA͕Y2MFH0Kt= Jt29FLp0{}mbyyOv,Cb:\nZ9%ŖJ QGm'74zpCYX SeThgJYኊ\T3WwWgs{l\\ rswͦW{ -)FF*Jam{,(q0zШ(u;D0U-'LVf ieT5WFѨ$whS|POD*95OFRvgI5ZAN1ԥ:-M@w:h Нzq)in-RUXwڳpp߄(+H&+V30.@bJro"Z5n7vL=h_ʛ ͤӲEBn-Dzȱ!?ƵK!e~:/}LGk~D[YrjxSM"²Q5$Tu^Z'51o'n^XP߈l"2vb!5|U ThHӷ)1_w^Έ}RX1=4ꏝKt%sC'V d=;2Knv}4 k r6#-}}}W~uvZuwZbfS{>vA5h2܂Z.Ib[Csk荴NFzh?BR0h44ڵe PNʃdu*qO>\1B?άP1/G]Y?lhbakVk^[v_W̫!>Y_fkNwf{=_7bxDڒ] ͺA- =Z?t)Ѵ'!؇>,t~h\Wת^+F#V  {4 Z1K+;93s^KDҹ.h 4]1h8+ ^1Kzr,z(bsw˗K}zzbl1ŠaаAà )8_=,]$%9h-[B}`K{f/sW!6 8g5NLUGlLf7ѣGqczdžᎺgΟ5;PQ6*#Z=n&7l.7#E~fT.3Tuԍ򨭽j U[N mZ^/O-wmϬ=BXvS~ eDaT- kXyb7'[p ]o72N{4[ x+;E+ŃʹRȒwxyO´*:)~3kTzk(P 6׾DK%X_Xc~l{3tkHBNhG(QFJAZy~.s<_AjfԸ~9,bPס#~200a1 QPD. !W4DջBPRdRKOxk !)~4IϙQWd'#Z㟖3 .[uMqj/n-#V(&^I %+7(6VPl $I{N ݃lfOά78%j-߀ L]Ĺ\H\~^46.XY̠(tE#P==?M@ޞHv-A{ْ#䪬8+h|f/iLONw/{;/b$xu~X7`H/G{Lҭ>uk>C5+ddY#tˠV/`יʤDMm+_E?ny Hd`a`iE<#x{+V!3t * JI?pFtgrT@R$.LQf?on <`K$ zƠݥ QJh|'2 o)|WZGrui=S: ^ ] *gYcГOJP_i k͓TmZT3@q6HˊXY'bBmbīQuU۽˳ZXkvZZL99NMnu U*7n\):. ` ,g.;,a#fߊ"=/B%2MuY~k ɱߣrx̪} U"ߴ_L-D# RƐ^l~g qu\wI!JV\%^ 2mX )Zf ~xKR(ʊ%W]&!h%cJ++6 ib֊rr:̒Vc2v)mw<7%Cy_)侃wsV kit #Is)3Ct_&ᔌ[ Ca@ wfƙ+I~o;*dC{ t"7cTcT$ H80D0a6{({/.եtV[ǶlrF"dE CsŅa 7`Љ᷆sd>ηduU,l`0 'm[@E!R'lvu09mc>IfFeǶѺO-gz qF0HkۑG`G9a@ FqnITKjI(Pq銐(֣;O[b6y;\MPx[,*5(|7(DKkN@!NeLY`LQVPh4}^fbנFoM`(5-HyQ`W_ c-vS9+CU|tLkHpPXA&mf.O~rWQ#5C+9_ZF9'ެ-q-c^fxpD4 |DN&yf~c5Mq#i%V/UWl Au6hw=e0b Su7Dv"'2Z`e˫woI9:cպªc:O30u&WR|IK\dn!eޑfLʃ<.DAd^ͺia8%l9PTwL1̇UcTC dk03io&Zs 'ᯗ?>#6r…Wix}-1 4jJ>JXFDuGrރuWIezq6 &dpZ7uf)DJ`M?+nMSbv}2I7IJfݲpF1)SwĠRpЪ%l'Ӎި6MKMbOuNð/n=1$%\tqruJ]־LL^t0CܪJ:H쨫Of>*qo3⸳xۂXՊ~i0)jsJ 6崾lUކȬV{+1OG XgzU:eFHe*BӢT{-T4T.ҧHL_P~8So0}5AL}x'J-}g81`i%v\B vJ003ZhѤD4y.eq7 :%Pah}!Dc0\I[Ȋ)Jso<= *kk$+wU#_JQIQclbƨUiVBʟv2#pk]LCuѳqCkuY?5?m[:0ǡ&>8* -Db$*:8VnN囄Q :Dle-2sgBFVM5!Iy,ƹoC Xǻ$!`$f4 !Zt[¬sKmRe2= Hk(+ UBo*54mcؚ$)pvMI钎'CliU}j QGgIUBJE-joC\|tSg lYw; LL9+koG2'.VIN9:hfSbX|\--Q)%AUxIqrRQ щt^jıp $?ԕ谳7ƪ*W-U{܍vr0 {AKʴ.|Hq]j crwɋ7]B_iԠ״~A)´6vaSV'Z&%c`jV>jSQGB3Ղ|l@'p tO]AW}Yt,f2Ck x10#J)Ǖ$W%֦8)ޙJ10c]*)yWYFvfu&dM:m]WW/P1ݑ^*Kd f帽\?Y`uy𞌨_- d*hC,i19w+%VMx?r~8g3Ϡ ˳.{N=g۟lģPoU3}{έiO|Zsp!^]lhkmpu-,3gs}d֋'s_ws n:dk# #M"9B%@2k'JM:7q SpW9 󑥪B3PQ$^%7?[=i*z"ttYѦҁҁ&DH :zYiAsl˄Iqarï[(,7ot˖M1$:u";/Lc$|i/9SJS|U1kX\rm], H꬐ I{N$b'-gmy*mazэ_Jsu⁦ M\ܶ)=M>ߔrS/_n V >ų4ZOU*n|̂=VA{m{)GNgV{Sĩk3 r<68\ɗlڰ5ӼuT[&Ts[SF-tSRn gr x]~1bUVx4[zkjL6YVRrwQQȶݮ L#<Z`E=vY9]ؿ%/tmhCBq$)S*mBS¬K>Jѕ%-H+ktꍚn9Ƕ!" ( (N*;T?B,,)Bsr:WQ1 8;b5pbD>+\)#Eb}1j&*Kpg듻}ݡ>K /k% wzP/=b{VfU`akehT0u|bIe­Piȩ+!g.hf˩Lu 'N8;U@p~n5R{Fd.OEe+JgS$D N^Ǿ-Ul'jxUc"b I28sI(/ncNuK#S]3O:%UWH9QlJ0qE z鑗O;6M]LIloIɧFJ]s'W[˫-L躝0 *$'8"3*̓pY%&h$/?c&V>domDL-1lpZG?l chFek/PX!C-a^Db䅋1t:Ju} ~RŻuJrb:XTrס5t9*tʃ"p3u3ĉB*S'z3_Nsv*iX{+&2Nfvle"Աɂd5ZrOtk{r uЦlM!ǾD9a%PƦ :'^AB|ܠg4 9x@G .UPr"7]8NH!M Qy/.w`:S|:kcPõ5/2V|$+kJ~0jHax$vӮ%\e~נs2)DB}ͣ2W`;v5 F'w޲>|Lȿ]a$r5PjKh:42Sw~dL[VmI "&ٲc^ [3=s?O<6)Db6-]JvL#ܒtgۢMV͏h/r~([̋⻥#*P:0YD[Ng+NaVRT&/`4@VIlTuJkė>\GVehƚÄY&ƞ9锈g$+ysh0Q ͂dO`oMAg%p\y!!4ާx)4^OYR9ps>}:ml&W_A﷋,W"}Оc,ooa{ Bc,3bҟZ]R)eÕ{*nʽb5[ڦ4A23 0Q-JV6TRTENԐ*r |,`27+k29)y{] HF^ֳE=x"H6E襪aIæR%*-̜$Yiy8RUZ;*oPl&^mfA~=]eܿynqWRT^;fzX zT+ӅS'2C.ʆ7:y%uwUSExWޭE8/B?)X]:Wpg,q&aqx`*m!&DbmI.-< _9<>Є?|&t X61brLR73#q6̭*Je3Na'U9*g2dmOƳVe  iWuɚ\60sg=@eey,-wd%Teǧ8qx `K4f{ MߞT߰n mhM̓dũ |2s10uO1i>yx(zaTP_@HnB*j0xU!{rL*ukcY XP00~)Q?Gh3!ۘ\er u5b]Ѓ=QQho(GIFRIPݞ3N^RdrTREo3r}ɘՔ781gz4l0e+Vr.S%*Ѩj )Q9{a^S&X!|8n91˦83-&WN6nP氒.V0KrfN6lkLbSeʴ8\aXv./ʒ 'yW% 1##՘XfcM.ӣ4i5D&&`WuA{Q)׿gꤹN׬[?Ivԝ0B 9Rb:sQUcW F\OJMb{ 2$F|搊QE 8V0na>is۫ʷ{Gih{gޭPK5zi{Չˑ"d$r:uz޽rv/;}]VQ.NbSOp.Kg*7EͲwݏ9G2+THۃ"m3dk͚K e4$+T7̜?HqX?Zz*m)3+o;&ZOux83|3ý܎sVrOӋe|ݥ0*>ؘ^&cd^FTU9{œn ?9rrdSX:꬟lf'O@muqμ2=Q`P ]+lA'-an yF)rah{°cMs&;mT)-5_UX,:sKqP[ssś+dgBd$Wix}MG/UoVe٫v<P+pG蚗 MtvmᲛOmt(&7(=ibڭ΃Gf \ }k>+7^ٺf9ִ:7kaΫ2nbpUI&*fCQ[̤9"0uވ R}rtV)2? iqRʡIV&~\Q|;#$l=qY&:Zwi"Xl9 :A|Iv~MUb׸¿,t.p~ .U<{E4 @5R2l^ʹ|wZJ@:V`n|&cXJYo0~LJ AFڮz)f|'څN{٩;,]:Yi\v, LTWiŚfv*P+%6zb'DYXꓹX 6%+cu ;dY1Qk4_h[N柝E IsQ}_󟧜[-sBF+zJaׇ/"3PѿP\[Iv dNwު?9a\*h*czb>X- {lk0u)6xX?nÏTyaSz'IfwzTi:B JXIR`86o$_y\o&~?:W߫|*e̘Lor؝rkeUI$ls%9?ͭ鯞<_NONaqԑ*R vvjߩAҜ?Ɔʍ Xq u|8uW'4H턫EGb+|S󉩻}iГ:*v̰:v?KL҆MD>r텾k Q 鴪 Ң`]h; uA]zn~17W_ҥ_ wڐ^խXiϘ}69/Mŗ+؎8ݡ?PB??lb+oCO;Y(6jǻ,WѬdޘLHlwhK%]HV֭F~;Q֯yOŦ;y* HicM߮85d11_F a*/S-N%JkM2Sz}֠My1Rl-N,%mH>7){E:t,..#uͯmSWhV%"lhy`_dys>6<%ɓV*$7/?lSeЦ'Rګ.ӽx%S)㯶YcBtzLW8g7Ggnsisx˿uU5ki9ENN}7A_5v{kJKO</c?}~>F7KS]Z}Nu&Govw3F~S>׻z)n8OΣz'i£F!p, z3Â"qC ޵4G*dVz8 )[|w( % $= hT>f9>L]a-ܿ?ި.?얟A:]DHe3r}f{ E[;\s ~9h }oOP8A!f9Gg{4:ƒ~|1]MtCugA*xQVsn5]x`߈ӉqﵖX`ekUqMKmJXwpFh8Tx?R#YQNZٱu2vsn$/u=P [wq=m jCܜ^eqnjI(]\k6=]q3)̍% 0s9YԷ-M*;tmNQQ$h1T>P1lKtqg>0877Go|S8͗*h/N|SlH=cQ{FvۏjY~.MڇT%Q;VqnTFTYy rP֟(9N˔'~fƵ~>˥7#73k~ ̃l_=i(CNɾm¾:P벯oe׾B^QJwUW~0~oEFl)r,0DŎP@E/Ulj:小&(9h_`z"Կf2[G|{SƟ4fjz/:QIE T,1- Pݩo9$2-Q8G.vbĽ"DQ׎CYě7B0CJ Kkspc=RCI IUNii>6.u<(]>L ۂVo2Sz37z٢J,ii)#a-\ls$ W-S,5=,(ױ\=S夷w ۜc !5$2g^yUJG'Yd2{|`ŝ`A#(dВ9 T3USъ_'jPZL՗^ I0(t_kw*w>uW)k)6x&G̥,I G΍xQRL8#?@4X+D4i{lraJ85):6]^7C̶55aNWIXqQmXd+`.9嘭YvCblZ!CbFX9:P==9jN1Q^,.si@E[Qv+4eL@9ϮfՐݫ5t*;?b=ZjT3Fd9 :ZpZ " @PAN[6|V!<G"9ȱ CO2/?u{ !/-M41irc櫃Sn2j agmgJLWj@$]}ٹhIgƊ|YWҫz /Qsl;[\q)֗svHqցj\pQ:e}av媉3Ž2i޵Jigm^ݧLB14ch)Sϴ[.DcQC%) 1$3i{>ЉQsvSbqu_Nlx6->M,Ƈ[DW䨊%LTgw'e#&WO9iqa"B]z/+ i gɹ)~B68eو߈O5C8G!D>`(w~ vq Sp,4]g I-d#~OG{d*|m&<o3Hp^Us\E3*yLE_d'w"s/HAJQoAG~<%|S<71Ó=*,\̗<4ѻrYVK0?'I{_NWnAwAߣB7L?"0{|ok Ym˽Bꏝ<>w }{K}naylmf:=f0*{A#/k[[x!z)$mEΎ?,~~u4Ac&by$3f"Lr̈́(߹h'mrt|z܏Jek3 4dn:uCUcc4 TuVA@\=| c0KT('%yc=l;^oFe.=QvI\DR}9X /ݖF1 ?CM}O'/F>○9w۞>60?l@oXgȪɭPcec=gm`t/C}߹xa}*HkʃpUӋKă[:|VKNjg_o1քx{! M9cϖܲܞ0*']kc=Qz34Ҟ#xYM9 s(cz:v;w/©Ϗt`^1ƙFamĺOjZ0a>V [-߽堒v*+Hb́-P0a -ǰP:l0c eI /qV P fdO+W+q~s;hG쟼8$&ɱ)X,>Qb9ϙ0a9Ra~n>hY*0ýe)l0a>v )\3*6~zr(ޱHbamC>}8JR/ {=AJ]{!.UWr '9\˱KMD|Y2N} ׏>eDLoKod C٦9 +Wl,Y̎͒%͒}˷^ic;MV:Vͺď#^Xr [41@,#‹u^E-%֮K<ыQ,:$E&9k氿2'eNʜQ9++rR>m 0B (} C_xA, @)nBV]..ÈbDqVK 'TK/O\~م zwVh*Qe1[cnjF eSOQD0/@O<5X+`>|'2W\a~ʒQ%.1go0XsQ,gVCCl$pUU(cǾT՚18+Ҙ3Q3<$& '֞(`| 7&٭&1*d27[-*7 8xƨbbcт| }_2`ByQBc usd_ s;Ӊle)Fkl4$W !\ Y'[NS$d_@ZdŒ 7TdhHz0løL6+ 1V(C`>|ONb~nˁMKzC2M=o:~+L=0~ç4Φ ;w1UzNϠ0CqpD?NSѽ[IOXtd>nw\.Ic) `j8^\>LO_IdX\~o/ʸcy󂗭"~tpY迃!-YehzkORCc[s: FS3x [4$Ƅ4剋OgBʤRt=MV>{|ÉLgϰÉL|jmI_5+Xpé_]윈8Efsaoüx0PT-Q(F:Ū7Üa o*Ƌ=h9g*0YK"kb`1)8߅h 1D?<ES{oe,|+l=.hfpĄ2<iS6FŢmmHޞZ4 .GHV{0pm?+p ߯NE /Kgm?;?֡;?-aXI~g|hM;oD͢^HeozrLs/ ld@_Gi\vbٱ,^;=3ؖA7Yq7tݺ덌HB f˄A\,3]uo1K})2LX!kT  26ˇ-7I˦+i!rޅnO8OJ1rX@ 곳 rvz|_T}}?ڭoG>SmqiAf/m9OD60z_FQ xCc1D`,ͭFЈt&oڡ7!.^8U娃NH^_3 ^_SnS\d M (]).5,:{? d_ջ =2bu2h3LL4\.+SΓtE*BH*/?/qHVqz5+"&HO@X$6r\ 1k0~Fa o Spހ~=^LCbRdR?:_I[j vFnj+41P\s !h\\MxtV#/#!iQ?U3܉vƺ(JP);PF=u>=<$ƶsR^5c[*d- %%/~T.yjK>Z&$Ƅ7Ƭ87#`؋($Nr$},02\&0y檒g2ֽC9L9zO:8HrX{G|GΊ0GHi# :0k>V;֓VP#, =+"wc+es'x <>pHb$1^ɀ6k mN[G ',gP'O0XEXTNשʓ7evdZfTL-s~{.6[|Y$DqU 4Ow\}>>o,*}R-aZ Ti9)" >q'nbVF27tDSW4GuNjzz}58ۚ->$< c[*^ p_iTΰ~a* w3n [c+!DXUNL' [/)ʸ'Y.k2p /f%$lIϣ2gZRλ (/^pa_tξ8`\|Y2N}qEaF#Y"-F'}NAהO iO=?/S8:Xf~kݶ=RrȠ!ƱN|nz3~0`N[3X ~h7Eұ7s2dvh ry IjJQ\H>bx=x1u{B ;M \[6+ /+ Oxb1Ϙ"ufluV%V<&Xoe3_X5:0z)qTc5-8Sgd,YKf0ZԲ) 1XfUlVJar]h &-D(D9=/G%.3uϊÝ?kZLwue)EŅ^jv/[CϽ? I|ٜFyx+|MYj,FԬ8 mGw&{&^*E a,ZO\ĴJ΅ X{ D~dz/E]*^ONbaCUoЗ͹|^q9ޅv-/l#&bOg(,f_ JH_~@ڭ@w'Ћ+l x#~OiEKt+qz5ֲ `Te{] Y? (=yV= HFv7w PPEaE4@C s'KL^З`4Lok(GS h4N0`Kޮooi~k;uJZ!.-׾؊a#WE` \F0yIq=5Su>JՅ_ʤDuϖdff%LXU0uo&$˕.epqqvm腱Zsɰ젺" (Jfǧ+q:k+ԼC%n[tb^ yʃsKypm*v$з1ˑݷfewbz P>(/1&L 2CW9q&ӿeb(]\ک/ NyR> KB?Vȗ#rl q ]=GĊdXʀn_*ѦK?qM$UXcYA`>l=u| XpyH_@x =ecK%d C%-/ˮoT\kHh'o菫QĖz|Gaci2YLPA7*Dڭ>r@̩*%ԊIz&)P ǀf80P›yiUx>>R* r^d#z{+T_;큊"'ij(ЗĤ!7q6Def I*h-N\׿_ P*Ry LY0e;̗1(k3`%slNڪ??SqaeV֬JmK8]YįD~^],γwÇ(_X (.bk0TA/F;̛67VLI|fLŃ e>*( hDcC>f"qJlu!RAWFfU-WAg\5}  {j<>⪘~( f6eKxS` d+_ =xR9^%y(Ԋ'SĺŒIN;\GLt.ꙧ50N3ӣ$J1DI ivKg*֝cRbMc1@W7fh- -qnt;? :v[E *cZ4ӿSwћ /Rntz=@GLO\>ѷSo;LHk͵ 58{Xћ̿C/k&#o!]hjb'Qo4\QT z3Â"_k1u@{{͑ʭ2W{=ǔk/G]E([o$0,hhV>f9>M]߁Tbgx[~<~Fj !%kJͤQ%h I np%u;X|oOSw ޏ.]q(O]=)itbJ(aĐ9D"a$ˆ/t[)7AFj:]atVx ftw|7: ^~Qz#//~01\78Gнaf%I@7B%,H4')A6>IL-$ 47_ _I 4V ̄BA xݬrB⎢^(:aSuGb}m]k{ՉsICG^u(x80P,''dS J0։XơʿWzlWȤٔdZ8jR |eBVN&yqC}RLlܧRaa6*g7`:1tsjql7쟝.{;T+? ͂7Y u Gh @ڇ*>@ukZ}tz_oc\/fp>Z͔:6u=`5V G,Ʌ[>N>1N 6 )2%ڛ$,|N2N=}ώb.:Q8%ZV0 Ɲߪ yj1pih(MTndf2Fh]G~q 3X khqT=qa t#z9LF7{yJu[ωS(|*e 5.z7!C 01L[_chD2oXE`$Y ,Y0gy& '3cdYSB_b@-'0;@% qŸ0Q`gH^pX'#Zb9s,YaΦ ;6MցViB~kVO> s,Y0Z=߭2,C5Fkk;ثOP(K^`h"{ӈxZ<.lԣeNʜ9)sR椏I9 09G%T-$3–J01Xaz] Z&ٷ2`9 +Wvfv^Yb\'TZ6.>0QK!JtR )S@j m"*(ѽg"+NK0ؗv_փǼﵜ>Vā.n{"{EQrg9/6I2'eNH ޙ#oH7 }A* Rݾ?<1]ĈbDqzTg3ΟR/=xHbq)3oqaU2WeeVϦ">j'؇r:É5'>fʑ!+Wp|Ӷ1[Mbld27yCe*FQPT fqr;)!#s\x>ء*4>Z~c`M 떳 duR o0caÖcÌYf`zLRV&rkMzɘ0gaœ8 *=[*0ɥI}ll1k +"8Cf(P5s9F1O( 3dVwa~#b0CJ*J0db`1ju~ (C!ЮU@ Dkً٩_ )\q@}Y0ga8&=`۬#bDy/2Vw+2Q\Uo9Zq#x4z$h&I*՛H tzRF})LvwFI߈_sq> 걃mN3y4_Na@ECS*ןxn58CωhΜs)%&:Xuy0L= g_8$r `ױWʐตc$뵭EP?Yaa͓jb7.Gu aOoC/v{)˿_%~E چE_%6}'nx,nT7aX?i9p93V{5U}sZ1(Ň0˓]GxQǍ88?ֵ}FuuٯWz𵽣^RUEG~D,cވQt ݇Oc?Dӛro\>ԛ$.0tͰ?7X3 P,OJ?4N>?X+QrSo.z qӬvO! 5e0v^;v~ex1r.ɠnq:q쥀XA+曢[nwZÝvcn=ޚwr^#Z  a}A0FKF.^_1r\)Mz;V%(Mne=z1b lq܉qϸwpZBOG;.~ D}b=Q~c O{1؊{Jngq㭗{]y)ՕDZL2%q&9nȸdѷeG@Y }>G9zcqQ(!G Gv9zc{m2؊{J}Q&'^@! 9>cAFd39>ȎSÏヌ2o9>dr| cǧ b Wf]xx8# 6gd18$!A>CC+e18$(cC @ |d1֏bl=%.3Moľ8 CÆOe18l(cÆ @ 6d18lc6+G"[ػCt䰯p!Ò%e2r!{U~ ?2X!C>scm{m2؊{R2^QtW&ABK82e$ !CAB2~$d~AB hG$d1!C!ʬOIk!Î%e2rp ~ ?2X ;-2{d1^wvaѓwTF^.(e2r!N~ ?2X!tBm2{\d!{mV=eEp,8,(cqX }>_cqXQ- @ v8,c{] 2؊{JrOK;/ YSÏC2o94drh cǡAC쵅e$sv,88(cqp }>98cqpQ- @DpAc;2b38x),Lb2XqtQ( G }۔ [2 ":Ac 2b-:QT^:c2+cpgo94ȠcơAFCd394>SÏC2o94drh cgb Wf8;2K2XqXQ(  } [ 2 @ qX[?v8,c+IÂFySQ q*ʼn7I 9Nd!qBF'd39NTÏㄌ2o9Ndr-{=>>c6+]yi .?_&<ÁrBㄌ2F 9Ngs ? er8aqBc 1k\B~dܱh QA2d)ÏAF1:i8:dn$: c~8:c+)!vh0NŁ4Ud"O4d N32.YqQ(!G }[![>[dr=-d1^w`BsP|(3):If(xC>qhd1CFc3d39fTÏc2o9fd2Ṵ1Cco bl=iT\mp,8,(cqX }>_cqXQ- @ 8,cqX!{ma80UaQyヌ<nd18>A>C8e18>(c @ {d1(C!ʬOI{.d|ž8 EGe2rt M~ ?2X GG{=2؊{f, * vGf8;!e2r!N~ ?2X!!½6{=2b1D(8g2g8ReO2XqQ(! }![2"lu8Dcq!{eVܥTA) \_1b#2FG92gsd] ?Gerddd182c6+.ISDXŃ$z02As)d18RȑB>C#Be18R(c# @ H!c # 1buA c?2?e-8{b(̻|ڐc2F9gs ?er bkoc="C!^,ᱟJ}+=AX|9a&<p㇌2F9~gs ?er{=Vc2+\a`*JIbG`98KؔLcߗY&~6<ӽPh2i@d'qRJ5)gnԗA(bQN2^ins-s)s%'Uսٙ2mteJm+$_Vi_MbF-KZHejZ>j1*~jѱZ {j!{ٌ1Ķ]My.g"ex$z )L/ G_/4H?2V {^{_ޡ^wq/IMYe~LNᇬ*<[Y\W:2B}BST )s+ LJb!{ي1Ķ]S!|J,dUvCR# FHeF>)~iP#<>cςB۶ ϯøie]IgiQ>/p!ei!kRV#@D#d .%=Eo4*i 2eM2ePD}e?A* *gQ۲wqWuQ>@8Ͳ?W6q2Aq}ASS)s+ 'G {}}{ bŽ$iOC1LNŃyq)LG_48?}2 AۊǞmECluפZ-C_U|u;/m e 諃ƦRV@utWd=["ؖ77a߯b6ۛ}=n!e ! &'RV @t_ d=ۋ"ؖ~MȊ"Ŧ )ݯ :Dur!eɅr!˅'RV.@@.d= ClKsacJ_SluCy]eO^Iy})L"G_"4;?2!Jg6$e="ضaכ}MYWqgi(N22P2D},?$CJ(J'"ؖ{SVټo_6 R[f0V6a)~iߚ&{ bmٻM))uCMLFB)Q*裯⇟BH[@³S=1^$.უzL!VM$_)a"6Mvp?~@EKHe*>**~UPE<;ScOED m{b)ܼ%Tuۯ7\֕ I*'RFP(Ph~B!eoBݽ]=B۲wq)<ߧx1\&Oߒ4/`H;2B}BT )s ==1^Tuw=´_EAܼQ& / ⇟(H[Q@E}Q==Q1^yu1O=G/oF y^A(A NO> >{6E 냋jg1=fEHMt RFnnh~!eonpFn{"ؖlXe6yRհ}WX?B≆Q&pH4D[CŐ=6߀KxmV/SrBUf|ME 1MGguZdmB ܆ b؞us?x,V ʀ^~"_(W>]1Ķlt,cU$6E Y7ojbpt6M6ej!n972B2=jZ{j!b:jZy峹(bm]-\.Ԯ`?<[5D ~UZ0l)|wo e.ռ~ Y-getykU>.bYm-ڈbj=jI,{쩍8x6OmD m;Mqy=b2 㛐EM6S!D 1P!{=BIB`!Uʧ"ضy~[7XO˘>W?)(TCL!T^!4=e=1sR@XB)!e]oBZ»&c:-Ɨ!3%B%BOcO"D̠T"!&}<|!bmY"yK?m(ڟP86~l$6˺jbXt_NM1tB{uB3T 3- pP'+Nb[ /Cl.?jʺjBVmy;Fͥ.b.=){邈8.x OD -낣yYg V n0AAMcOD̄T!3m<|_ގ66&qQw_ ,4˘ɄH٬O|(V=<b<=){Ƀʃ8<+A۲<8NBE?"عTCL T^ 4)e=513Q5@Z@򩁈!ާzE_U2Ke1ĔAe{ASSS3UpeH+))_ ap1O}. .AA McODxT!a<| "ؖ/}(@N*!*sǞy C,J x^@%,OnB },EAEA LcODhT!F3Q<|_ގ((UeۄYI%1Ĕ@%{@SRS3Up%`O +Clۗ^we|*Xa\t- bS-D 1P-{$=BLBr-1Ķ^ylcxt$_F bb=bA){쉁8x&!e1.٧Do߅ePpuuo C(9B B RcO.DT.!£]<|_^?~_E]C= 7nCYQY46MsXi# wޅ87; _,Qu4"Ҩ4rϽh {J#bJ#4)yK)bm4} mv.:>԰sW)" (rϽ hX{ bƢ 1yvA$v/R|*S\ieӯL &SD 1}P{}=ALIAp<$C۲>la|!Qjb&KM14AM{5AR3pMX+MDCl6-:<8wB b B '"f*CW>!1Ķ,t|!2~R D 1)P {)И=@ D@z <A۲x~so:*{,2ϴA`j! js Ǟ6 6 mg x^A۲68jg6u7Y(+8KOݲ^w/0WiC4v*!*sǞbb ,ǻ!x^l,b[V Gm(*\\Q]UOTa|bSD 1uP{u=AHAbSʧ"ؖ/}_ޯ_~`&>}M($ݦPbBP=B!*{  8Px(oBĄ—$֯hn"??FcOCT!S<| "ؖev'ѫ(g>l?v6wE !b) !+챧"fN BW>+ClL5t?Yp߯bӆjCL^47e=m1Rm@OA}}{; bK_k/bn$W,ȟ{KY1dAY{eA#Sؓ3pYX+,b۶dDj?0MF,XbbX=bA*{쉅8Xx" !e"}ʪUhID2bʠ2=ʠ){)*82x 2B2p|5kۇ-DP$ѝHb"H="*{쉄8Hx+AW,몉!=!:C C ScO0DT0@pO0+`b[ ,u[<J̹CL ^ 4&e=)1Q)@@`1Ķ,NNøaVpYxSY*'(H;KQ1DAQ{EAS3pQP+!6 E@R!sǞ CGj x^@۲x~sί^OB>ϒ CsK"rϽhR{j bfj ySCl;LL $dy[>fm,Adꃈ!sǞ>)> C' x^A۲>8Z/ڇVMvC=[r5 ݯ*>>L}1A}{AS3%p}L+>b[]܄iJy :!0yQ4 0AA NcOD̈T]q<|_ގ88&1cd} k#%@%@GcOD T&} <|"ؖ%0fuZdmYW2 o%e@e@HcOD0thwWʯd@}}{2 b2\f&ȚH 1$@ {%@Qؓ3@$@Y bۖkR29J b)J +챧"f`KW>%1Ķ1>zz"62Ke1ĔAe{ASSS3UpeT+2b[V,_c.ouwub -:7Z biZ k챧"f"[W>-1Ķތ~ ˬ~mL" m$E@E@ HcOD(TES+b/n¨ y[>:8;j bj ܫ&챧"f&`kW>51Ķkb ?:q5@N*!*sǞy C,J x^6N DL |IbovF٪a|:[H;J11@1{@R3p1X +e!e1*6Mv}ʪxǞ5!e}𦼿t",6؈* b ܋'"f>8x/F8{ bmY)|]C]*S!t0Я'PA1M[MuSuC@D 1Q@( 챷x$ "fx$ ǞGClzz<1."ȝ\\"%vrϽ"Ǟ"",NJ {YRb۶0Ŭa0WiK'YUA u1Au{ASS3 UpuDd=u1ĶvפZ-eQujuʁir bɁr ˁF'"f"*Ps{r bmYzY"_0j! "0( rϽ0hh{ bf 3 \A۲08;j6_*@6BD 1P{Ќ=t@ČBu@jcA۶WaTWm؊)" b" ܋'"f*@#{"ؖE7;}*&5BD 1P{Є=T@ BU@h.柯2&]ꢜ}y]~+!rbbb=i*{)*8bx))/hy."ͳT!ep4R9+y!z)a= ?wnt\֩EW/T5CC UcO8DT8C=0D mM__-;<7MVW)N-AAMcODtTi=/b[R.٧߶}M 'Z肈! s Ǟ.Ѩ. 킇 {Y2b[Ǘ%țL"rϽhJ{J bJ +()/z9 7}wm V!"(rϽhT{r b&r ʁ'r {Yb[1=1:țL"rϽhJ{J bJ *()/^~Ȫ~)4NN OCL^4.e=I1SQI@$AؓCl˒c(N)mQӬʡ?WR+YU}),&ŬcȈj2"bɈ2"ˈF'#"f*#03ɮ{_ޞ,Cyjb~*YEկ"kp]}RtX!*bB=B!+{ ($ B>pZ9mCVi2)e!sǞZZ j!{Yvb^ R.Be 1ĔB{BSTS 3,JR )J!{}}{GJ!bJW-))_]Rzy3Zoxq+cH!&Js/ǞTiE8Tx&׷w "&$$mB[_(b! "(( rϽ(h`{ b梢 3 :=4b۽~޼4MȊ"Ŧ eF)fm ;'YUC@u 1ĤC{CcUؓ3=pp_:doP:DL:|IbWuQ>ݕ),Sbzot&~쮫^H"^rϽ^h{z!bFz!g!bmEǦҧg&Wwˢ_b0RP CL1T ^14Me=1CS@^ 0d Q S _s0|R0YUS Yn>/>I)C-D 1P-{$=B LBj-ޮ*$_Ŧ}5Ͳr)g(!*sǞbƋb )!{)!epfҲA 1D@{E@R3pPd=1Ķ,]Ibܫ&챧!f@߉{_ށU|C)EM# WH!& Js/ Ǟ$$ M {Yb[|=yYgmYWM)^] )b^!& s/Ǟ@@  g!{ !e6u4,*Xa YUeHqTDŐK9C1D 1P1{4=C MCf1U cO1D -+(SpYxSY*]GoWUB!*PbBP=B!*{ ` B;1E/*_/*O,Lc`~ 7cJQ#$QCL#^#4?e=1cR@4Bس1Ķf&: NPCLT^4-e=E1CQE@\ASCl۶-b~?4Lb&* b) +챧"f(@"{ bmYߌCV83$kF C&D 1P&{=dBLJeBτ2!{Ʉ![UhbM߼)γ6a&w ʅ8b8=){쉃88+Ǟ8b[-uweb zjA A1AA{AR3pApOd=A1Ķ,ތ~ K3uBD 1P{p=@@@hc_&jnSwmUVeqn  bi k챧 "f< 6{ bmilbޖu|ۗ,dAeALcODdTfCY=b[oI(>0Jش >b>=){郈8>xǞ>b[]܄iJy 7ujjq Z!" (rϽ hX{ bf 4 gQ۲ xb<?^ :TKuABD 1uP{u=A HAfeLMS֕"ȝ\""rϽ"hZ{ b )*)/Iu!KE2k˻r^BZA;p|:T!"T(rϽTh{R!bR!4JB۶EGo!Vy]'uJ1oOCL^4.e=I1SQI@$AؓCl˒ਮi 7סI&mtPٓ,TASUAWMLcOD`TaV]U=TA۲*&UC=VMvoP =1@={@R3tVPV}1T I1BS B*FRfXj!:y=, D -^@8.E.ASAتƦRf@ }t {쩃!6u"! Hb"HȽ9튄ᷙHx,R({%ynSV-xrh_e[2N)mYWu,kª_VV&K}ʖ!>ۘɟ|gT fzO롌=X̂0Ă#˱Ǟa!mqTU]0T+6+A{EP?E2ʶ*"x)ynno]wYb l>_5A M14AM{a)~i~MdW43M=M1^oN.٧$_Ŧ04B5BjRfLj'Qr#<cN!e&(M yFOPCLTwc⇟:Hou@d=+Cl;WuƏmpb0M?F)$QP CL)T w⇟RHaR .GJ!{)!e8}_ ۇC0:ھr붜OJh!bI!zC3U)3=p1'"ضʖ҇~ ?۫闿g*ŐUExv,biȆ!&ʆܻ SO6T6!g'Ǟ Clŝ\eU^S@MCLw+⇟H *d==1Ķ]\RO;uUfu )6*zM ,ݷ0U]DPyCAD 1QAͯh~ "eDA:Q,몉!†vbڡvȽ^P?CʌOCt;t{91Ķ](Mʻ 7٧yaT/)S?"VOl´ξrH"rrW94R?2S@]CCļ{Ib.m~"Kӗa.T5CC &'RfvMC@7CCļ{IbrYi[p5ن ~څ<b<Ƚ;[y?ALH+Ay=+D m[W~l}vḚiX$OPCLTwS ⇟2HQϔAH 3q@7b{"ضMP.c~?z&o"~ YեXȣ!"X(rVW,4HO, 3/ pp@,d=1Ķlr68XRTC]=BD 1]P].hf. "f4 p.{_ޡ. ʋ."lXe6yRF}F(EfM>dvx !bi!|CsUC1S@ÃC=Nbv:s1mQ6YE_eMNhڬX\H!"\(rfW.4JO. 31 pT.dooO.D+›O!6U]Ouwb ,/X_Ȥ!"`(rvW04LO0 33 pp_0d=g"ؖMP.dU1SaYi*\^&UZ3R CL3 wǫj~H3M4ã]͐=,0D -\Oè^UmgeQޔ 11@1{bA)~byFp1ng!bmY dySٴe<0S-cO/ B25 1dCِ{7*~l鷐 OeCH6< cO6D -뺈([51dU&7ϟuJ*!Jb*JȽ{\?P%D̠B|%xǞ>b[6AySY*yǦ jǶת0Ž>x">rV4;O3"p}xOd=}1Ķmѧ.bd1\E9^wW+0WieB5 1dB{72*~2LIL ̈́'2!{mޞL ʋ_vפZ-t,cU-gVP!PPCL!Tw**8BxǞBb[_Ar 8ypu_(0J!b)H)˾~m`=ӽ]MEC4D 1P4{@=DCM7 DCD4Qѐ='މ/I9ݷƐNmf_Y˛4n! "4( rϽ4hl{ bN{f4Ȟ<9=9E// 1*ճp~sƗRvRbIiRKiƌ'!f|>PJ;c֜!u[sey.6 o!K}+$A%AKcODTT&cI=lb[N_ݼ%UٖYH1.cJQ-dRP CL-T ^-4Ie=1Ӎ}@7R OBس1Ķ> \>W~Ia.Hh ". rϽ.hf{ bF  g!bmYٹôe%R bIR KƤ'"f #)@7@سD1Ķ,lB[!uW:-vʪ>.bh#gH!&Js/ǞdW:@7 $Cs{6ON|a֫0.bvR߬Nrm:?xȪ~IgcRCLgٸ^g3d= 1cMw3 @7u6س41Ķ ~ׯCs+︓+ASAWMKcODPԹ}8"x>SClۊ۔Uy ȚD" rϽ hB{* bT@o&ީ/z}G S=t? mr!"8(rASCLT,G {NԾ0\]Q]cƗAN) }r}frbir[kg{b/j'n(jgbmYE}5Գp{9h¬Nf2ᮻ`1w7O>gG#QiC=D 1P={d=C P3=<9=9u̾, 1,Slb|,t9uN78 17{7H3tp n?7,CL6|IbUUr&O(!*sǞ!Ɨ+x׷"A~uQ>6M.~_(c(!*sǞRaR ,GJ!{)!uG=qho]wML|}j<[o7&+xz_+G)fm 4Lb&ʊj"bɊ"ˊF'+"fh RPV<cOVD -ˊoʏfSxȪbޟLx)qVVe1$`!&sDB<BP!?+챷v !b ‹~*륅oSZ"v?Y?BD 1YP{kMMcODpTAǞ2bVGuJE~_Uկry+YVW)eXth*!b!܋'"fn*0h{!bmq42&Vy y]0lDB 1DB{EBT 3'x$ p#D$d="9z߯V9YOk <.bՆ*"6Mvê\!"\(rϽ\h{r!b&@s\{"ؖ!y",2u Ӟo!KEy$_!ꪍfYW!#"(#rϽh{2"b&2"4#Xu{2"bm[FlXe6o"R^wW-/yfH"frϽfh{!bƦ!igRH3|s{9Ki@BD 1iP{iؔ=ALGAh<crBHr9x{sYUԏ1J*"b*"ܫ&챧""f񊸧"F*⑊wnɩ/ zVU[uO!VM zyWŏ˘ǗO_$7$7܌#cOrC=hrs {1Ķ8UQKj9/_CYTCfa_w~e^2*m!sǞz{8zxD@SClmi?"Vl4'k ~0b 0Ƚ80{ bf/AH<cOD جܹ"[.Bȡ||"%vrϽBǞB B* !{?w"C1\m9+j sRbj=jI){쩁8xǞ!e5M1,ʦ!{`6ElT. eڇ[?!fYWM 4}TY8TDSUDWMXcOED UEaVĽC=TD5SۧjUa!҅:b:=){쩃8:xǞ:b[VȪ~$<,Sb,PCL^4:e=y1Ry@-d=y1Ķ-qykѫ(g"&*6EA/$B%BOcO"D̔T"'c=$B۲DxueU^3ANCL^4,e=A13QA@A;A1AEIfyg0KO77Cw}BBD 1}P{}=AČHAh<cςA۲>8]5Xa{R p:bR=R1){IJ8x/Ǟb[ϋ~0c(̳N*4dOu%cH!&Js/ǞTiT MV HI/IM6e}|{{'Th!jsǞq lGZ {9a1Ķ^6M2N) qƗ݃UQ+pUSx]Ř$_Ŧ 4}I84D5DWcOCDUC6D c֣!m r|C1\m9({*b*=){쩂8*x Ǟ*b[VGYz:sBdMPCLT^4!e=1P@YU@s{3ON|a8Ԇ˿YP^weUؙRڸlp&ܮ*$_Ŧ5CCUcO:DT:S=C۲t8j7S!7BD 1!P{!А=@B@f<=@۶xh6ENCL ^ 4(e=11P1@*L do@ DL |Ibr^eRlV %7B D 1%P {%Д=@ C@]%=, D m;Z0[51/u@D 1t@{u@3R3 pDd _rrVY[U:X"0lAd e1ĔAe{ASSS3Upe^g bm[|=WW1[cȪ"u=DA Q1DAQ{EAS3pQhOd=Q1ĶuX=tWwvh({J!ĔԄ C 4} |OjoH7"ި7rϽh{z#bFz#}=F۲$1IlUcՋEq 'Z肈! s Ǟ.7OtA:C]+E͓SQ|ahv.[ô{ӷfr|qgЯ!qϽf{ZbFZji챷w!$γjM*T¬N4\L_K@R!bIR!Kƨ'"fZTx|,F< cv!e*ݵ,RiX8Wi=ԯ+ z?>n.C^WU(%sH!&%Js/%ǞiS٩ HVgOONON˦e)=udkbWKma<<*e 1Ĕ6{6SHS3xi;h@7R66ONON mʪfSz^4a^v1.lݕ~̻~ PEl7P 17{7I3p|;ܵ @7ߎ7혉,O}*uWpC-6~7L^MOCY1ͺgrȧ"rrwTϔC@9י0LoU6.bȥ"%vrϽbǞb#@7Q {w"$M8/&/C^yXY UA$ U1TAU{UASS3:=U@7QOTA;U1U%Mcz:Ȫ̝JH` "& rϽ&h^{ bƢ_)x F&wnɩ/ ?u?uQ g/!&qϽf{"bf"59=6`o:Ĥ\Wx:97^NPCLT^4-e=E1CQE@ZASClˊuUu)LWwMX7Ȣ"JrϽJh{*!bG*!n/z9R9+K$1LcMbF#$QCL#^#4?e=1cҍ$<p#@#d _y<>-ljbx{{ 'Xh! js Ǟ&& m {߹Wj'0/>PV|UĢ uwa&F!ʦqϽf{*b*lgbmʻ]y*O9cELW'޾ b ' "f6* @0Ȟwڗ_R}Gb~)俆e_6&Q @Q 1D5Q{E5G3pQDTcOTվ0LyʫnbIhKhƋ'!f/ {6D m Ox4}լNl'qY{F b ' "f6* @0Ȟuowf)fm 4O1*6IluĐUEꮜ} LuUBZ@C 1!N{!ΐ=8t!@88ONON!mf",bd1UjcuW[S_SC 1MMS{Mͼ=45Č745HS;c۳%b_f&*\6uݖ2_)"\!&s/Ǟ88 ' {쉃!m]"^Oכv/Oh6RӊF(Q CL( ^(4De=1MBfBޞP{x{'"&$wC>-cx3@ 91@9{@Rؓ3p9Xd=Clr`ie~'?^\[Z!" (rϽ hX{ bf6SA=A۲ 8z#-gefYWM,dAeALcODdtdAD?cOD -˂7)6cHylBV!T}8a}w(bƗ"d!&s/ǞXyX Cb!{쉅!ebyQ4uw}br xz$b$=q){IJ8$AؓClے${~`C~oX:|2y,V)Y~WW/7oA7$D%DWcOBDu XB$ =6NBDLB|:!U*',4壺j6Vy,cXĦ]!"p(rϽph{!bfPp{!bm[8g aqͳ`(p籍aI|M+©iȆ!&ʆs/Ǟlɩl ̆!{ٲ1ĶtamU]ďeƪ lE J b ܫ&챧"f@:xxF cOD ;аY-.(J b)J +챧"f@K{J bmY |fe ib=({ij8xǞb[ovn0tYJ6NCL ^ 4&e=)1x FR{x{'"&C1LNeaWEgmYW ҅:b:=){쩃n:xǞ!eu2:*3@MCL^4$e=!1P!@@ClBy![= K5BD 1P{Є=T@ B7] * {쩀!m^\Q]U1 :S\?pYxQT%dQP CL%T ^%4Ae=1R@Y vUBS Cl6 yw;9m~\c+$A%AKcODTtI$' {%yriYRܮ\PBiƦM,ae]51,3UD7D7 $cOtC_tFCэ=͓ӓSt&,S5 1:5:s:bh:hf챧!f@;ڑ{D mϲibՖpx_8doP8DL8|IbCr)ylHݵX%uAbSBD ߟyW|yPd=y1yPߗNAA̓ubzrY6avbb!*,cL(K2ڐOYC9D 1P9|T=C OCꎤNc=;"ضcu>p|xnRA A1AA| /G bf/ώAǞ b<$0MtUlڐET>u4!rsdc؞d>d{!bF:d /:=6a@2DL2|Ibrk0h! 2Ƙ0( 0hh{ bf 5  /I/a6Km# EA Q1DAQ|EAS3pQ챷w bK{vb(⬬>YBU]Oҡ*{IJ8tx|BؓClh/{6Ûp\YXĦcRf(1*Ǟbb -.d={"ض˛0e.ռ~ YY^Ȥ2Ƙ^^h{z!bFz!:Ӑ=0D \a߀tY7My^lU Ml-(PcL _ 4i4ٽRH2ƘRRh{J!bJ!)()/IlT)U7DSDWMWcOADUAijC=0b[V<g^ $NPcL T_ 4)e=51Q5@ZOw7{"֭'|}5 yR۲18B d11P |1Р=@C@j cO D m0:@ MPcL T_ 4%e=%1P%@[@سI(bmY }løU[<*ԩ c) +챧"f(P"{x{"$/ûp[.bK]Ő?t06?Bd1iP|iؔ=ALGAn<c϶!eiie :}.ɾ8R!cIR!Kƨ'"fZ*ST{V"ؖt-6a6@ 91@9|@Rؓ3r ȁG{r {Y9b[/bӢ zE^<.b(Vvݫ;I-C/d1P/|,=BČL^xz^{z!b aѶ6qU"kNT᪪q*{IJ8dxBۀ1e)60y4 y*c*>){쩂8*x Ǟ*bVϋ|naj~ihC>VMl^ɱL!2ƘL(Lh{2!b&2!6o=6`@&DL&|˧ iX8Wi_}>0)[, &RqC@d1Q@|p=DPDh@<c:CG?Ĭ*>gEPvyABd1yP|y=ALHAl<cOD -˃WuQ>}NzȪ՛R (-]fj,CD 1C|CUؓ3Ap'"ض]/ |\W1Iթ?pgd1ǞZZ Cgj!{m`"$w>ԳlyS=E_îrH2Ƙrrh{!b@9){쉂~ QLMDcQ=,$D -M!} !\oBq} ɨ&ȝ^^ 26 & Ǟ&& k Ǟ}DCl਻&UX- _:x9Q cL$ _$4@e=1sR@ -d= Cl"竦ρ,\E #UorJ1yEa>tM'lBc974D5DWcOCDUCMxv!Ǟb۶0ŬauHfYW&ȝ^ 2Ƙ& &h^{ bƢ  |=l>b]~ӯa-r^ROcL_40e=Q1sQQ@DA;Q1Q%Ewßޯ_Uٖ~~)OCVNMS¨^,+w66.bdeyOd]#!cL!_4e=1X@!uHسa)bmgBY.mVw<[51n/D|!2ƘD(Dh|{!b!6H'"ؖ%I\ԏ}$mYW;!x^^S! ycW !,!c)!+챧"fˡU)!x Eo.뺈ÛE_}!i"&2Ƙ(&(&Ǟ g1HLdOLt!x 㮳N)mYWUB STBS UBW MPcO%D̼F%VC=[yEE]pu5/EBRDB EB PcO$D̸{"!nd)HȞHͼ o]Ģ?>6E˅ȅ1&ʅ/Ǟ\\ ͅr!{rGo/z?BtL2u*O2:腌1Ǟ^7 wBH/< BċqȪ"On e.ռ~ Y-g}>,J?јE?d1P?|l=CLr6C@?<۳ސ=7Tuw=¨f*Cai x3Q1c &Yv_"."c " '("f#(PȞhA"xmۋ,=w\𗺊9Ept߯b4臌1Ǟ~I~ Д=yE%:&O],»˝ד~ᢾ+YTX%KA4acL:_:4Ve=1C@{tȞt<g!6M2N)녇mڇf|~y :"-:"c:"f챧#"f#;-Lma xxћ߆/Tcosu1u%/mXF_v*p?Bd1iP|iؔ=ALG4x|, &gQ۶4GrQ*{Ʌʅ8\/Ǟ!²=w\𗺊a|*\ylcƦشa}GH%C-d1P-|$=B LB쩄j!{쩅!e ~²MY>tN{{M]-0gm=*cI*K'"f,Pꑤ{*bm[Re)L?F٪Вڠ){ij86x {yrj &4N#*\jcu{3뫩ơɿcꚺ>#{kk8غvyrzrk_^.ռ~ Y̻Elv k1& k=5U ZDNcL_4*e=91C9@7qɑ{_ށĮ.n g*eϧX ҧZ(1 * Ǟ2౅2xBw{45ONM1LcLb&/f4kl1il?ǞƆ mlcM1%oBV?oINcL_4,e=A13QA@=A=· vl>~XfCe|bxȪTPcL_48e=q1Qq@Z@d=q1Ķ,^E ݟ_$MPcLT_4!e=1P@[-d=1ĶtyYggu j6\mxSBdPcL_4;e=}1#R}@OACl$cL2Uz}5 4}-?Iluİ&$RP cL-T _-4Ie=1S@Z,vwBs{t6ONljgfS&+[}E6~$_Ŧ7ބ7 %cOxC_xc=͓ӓSxpQekڬowÜjj1j9Ǟڑ yoǞ/Clxe]O'Z1& / Ǟ07OAȹx' { !eaqͳ>>TJ cI KƦ' "f:* `4Ȟ<9=9EbvW?ԩ ׫]La|J(⬬>k$k1k=Ǟ顾 kg{}}{!$ϣQX-M}M˚Xjcu׾ q1B B QcO*D̴R<j*<ە c.!ջtu>N1Q]cw1c/6,pUS84Ͽ|_Xt_CZd1iQZ|iؕh 特5ۃIXSV ''65I=;L{-QVl:} mv=?5W_Pdݗ&YӸvSZI1c{/K"챷VV[!?8V{V[&c<9=95// qiJ,몱;M4,0|5MMc=5 135MMWN4سw!bmY|ަpzFbU&ȝ^ 2Ƙ& &h^{ bƢ  iYaɩO})6m*onRlRcLl_l3d= 1~ @Hlc= Clے9wϽp73/TA U1TAU|UASS3x<9Sp#UhOdo@DLJUEկ"kp]1\Ħc(VμTòCpy+D`11D1|DV3Opy챷wb"bbKz}5 pe5m(HVhR u1Au|ASS3 : YjxǞ:b[V/⬬k>pV~EVS 뼍mfu c"~F2Rΐ cL2 _24Ne=1SS p@2d;Jl6m 4һI|MSVY*Oc k k'!f p#k{!ض˦U[fҼ0 eWxXVuw c ԫ0*B=:=y9DDYcOKD8u-t"=LK<cOKD -koʏ},lX‡}(uLl1/ge cۛ]*F?dTcL?_?4[e=1#T@Clɩ}ya_okML1,bdQSϼ_Sc1MMS|Mͼ=45Č =8HSc س&1eE`U"kNTtυqQ T.ASAWMNcOD̀T=;vǞ;Cl$bUq5i{y\ĪmBgePڦ,bg`!2Ƙ`(`h{!bfny Ǟ儈!ò=i^/c>704I|MҨb(1*ǞRaR xtO)d=1Ķli}lb* c ૃ {쩃u {쩃!mupYI:ꪊz14 ʅ:c:>){쩃~;:Ǟc CleĪ-yY*g7_Yuwb ,몉!ncn>*{醈8U!{}}{!bKr$^I&6ج"!Hc"H>"*{쉄8Hx*ǞŅ!u[61mW:-VU=jr.,Sbb#(aȄ1&ʄ/ǞLIL ̈́2!{Ʉ!mk ˦gQVY|]1/ÇXt&dy[>ZQ!2ƘT(Th{R!bR!7J챷{R!bR_)|C4Vݵ|X2S|:p7u"L~>yR1XCLd11QL|1Ѡ=DSDh۵=;D m]w8VM ?gU :w7i?Bd1iP|iؔ=ALGAl<cOD -Kj^Vt,]&bdy~CI)C.d1P.|(=BLL7 OvBĶ'r!{Ʌ!ep:^:uU=mW*"(]ȃ1&ʃ/Ǟ< < C̓VȃɃ/IO?dU.߄".c SȳA q1Aq|AS3pqd_d _PV}a7Wp5ӣWmL+4J!c)J!+챧"fX`KR{J!bmY)z}5 o0 ׏McێNK>BU 1ƔB|BSTS 3,U pH)d="ؖC1\m9+$eڲe}KLu_@ b!cb!'"f^*PcٮX{"ؖ_?&H1I|M+(\1&/Ǟ88 { {}}{; bKװƤҦR(1*Ǟa -J {)!e%/F.kb./BVuR~ >xXȄ(J2!cɄ2!˄F'"fR*`3L{D -˄UU7g Љ c '"f& xr&Fɑ {D - 7 WuQ> a&:!Nc:N>:*{鄈8؅:!{鄈!ep|u9U݆_ClЉ c '"f&*p {vE - :iӪ :EyѰLuU 4tC uC TcO7DT7vý]'膈/Ie-1b r?|T+Q cL+ _+4Ge=1ҍӽ#@7D+d="ضNbijpU~c7dI(Q cL( _(4De=1oaQP 'B!{}}{B!bBK;_j?4lBTePC~mBSx{{wr!R\cr\>rQ*{Ʌ~ BD.O)=P coH)D̰KމR xogRS ClJYU uM߆< 1*ֹP&DQT cwۗ _& cO&DG& ܷ({Ʉ!gYy33o4S\oE)żP PcL _ 4tNw 7?ovullK%H1&J/7Ǟ CMfeMؓTT_ػ!e fu CA:Bd1AP|Aа=AD7v ϼ<8c;_4^I|MvԫpU|ډ5ܤ:*EI-C/d1P/|,=BČLBl/< c  _MMR|*S\ĪmB= jVS*?=Ҩb(1*ǞRaR =qO)d=7"ؖ«cz=yu~ss}*!XzRϋ b)gH1&J/Ǟdd O'!{91Ķ,Ymz.ߎtYW4l! 2Ƙ4( 4hl{ b 6 K' "ؖ?o]֩ Y-CYa?0Syvȧ2Ƙvvh{!bƧ!j챧"ؖ70ژ6S(fvbI|CB"d1P"|=$BLIDx &[y=6`P"DL"|IbKSU?] (ge, ۇ?شa&6CCVcO>DU>0;cooC×$v-^wc{{!p}> lUltB5 1tB|uB3T 3* pNg'R۶Nx~UC[.b)\"kЦjf1RnMwAB& 1B|BT 32 p'챧"ؖ§y]P&O-JNcL_4.e=I1SQI@O%Av$A$$6<iFh&YUA M14AM|5AR3pMdWd=Clۖ >d?p|Tv܄M88uABd1yP|y=ALHAnܓcOD ʃb.SlbzXu4s7Uy1LAC4d1P4|@=DCMECl4< cO4D m[S]*!28YՆ˩M~h}L4}TCDd1QD|р=DDQEDnD<cooDDDė$vp5T?MYW6Iz֫SȊ"ŦYB4ݿ e4"c>*{IJ8؄x"!׷#!"&!$u1뮗H!2Ƙ(hH{B bfB nљ{"ؖ!/ƛcVS,TASUAWMLcOD`{ n*{"ؖU2~.XĴϣ2Hj 2Ƙ2 2hj{ b@:*{鄈8Nx鄈/zb0MI|Mj!ci!k챧"fL`F{!bmg#|D|!2ƘD(D(ǞD)D ]"<cO"D -Kqe _6CCC3챧"ؖë(g>'QXdU- 6CCCؓ3ޑ~><cO>D -ˇ_Vm f=$)j1& /Ǟp٩p >3=1+[zsqFuU|B% 1dB|Lx,2LIg]@7g}!bm[&M'ߐ$,bd1o )6m.SbZH26vZǞZiZſt3d ;P S _ ,몉(`! 2Ƙ(( (h`{ b@<p#;챷w bKez~Oׯüγy߄(Rl۔BU 1ƔB|BSTS 3,|)?U p-OBۀ#+s[/<1'BC - B{ bT 8QhShClrEGQVzQu]0 mڇ.<1LcMUlq$Y0"/KB| x=$DLQm M"{m-Exw.ewa<8 1B|BS3#@  '!{9/1Ķ,^C~kcY"XY/&W:-+ !c) !+챧"fH Bz&[)g !bmY!5~(gBi]wkӶ*! Jc*J>* *{쩄:@[ UBvTBT—$vêcgr|+"'Uȁ1&ʁ/Ǟ7pmEp39Hd=91Ķ,|jmDY|5=ܙ^q1 j c f챧"fD`>{6E -7o j^VrSTuN |uZ汸b!BXcbX>bA*{쉅~ Xx"މ/I(>6aV070<  c ' "f6Al<c*B۲0x-zϧrzjzF٪!pjz׏j\!ci!k챧"fl`f{_ށff&(Ma=/ Ez6SPa<,oGېҩj(1*Ǟrr C-!{ن1Ķq*B^WO~nӘEs/*l1&/Ǟxx C{;e="ض 1NLzFOa&)Lc2L>2*{Ʉʄ8Lh;Sۀ1%]).[.?.bۛgM|.WWa勍!%2Ƙ(%h{R"bR"6%HgR۲xU0zmcErVNȢ2ƘNNh{:!bF:!챧"Vk9uU/WVݕ}z()[,対>{5= p^)6M1_Y¨TM{_e5'Z8"@2Ƙ)@ H@< 3}yx(@F䁣cϞ!m/?zcxY|RoZVgasfYWMtv"Ǧcء>:{:"b<ONtDBc=,dD -눓pf<$>YZPcL_48e=q1#q@7OAس1Ķ4* Y8k\Wpѯ8MYb y1B B QcO+D̸T+3=6N+DL+| IcU]~vs]\*k_dc" >"4{쉬38Ⱥ'Ǟ!e&&Vy y] K3owί^O>ë(gGH 1D|DU3Cq_@d=4Clۛp8Q(d@e@HcOD$TfC=6`ODL|Ibqi}MV~mlBc D/dR cL/ _/4Ke=1#S@ Bس(bmY/U?_BaU1Ĕ$ 'YȂ1& ʂ/ Ǟ,ɨ, ͂ {ɂ!m|rV4Yu(a|xxR^(1*ǞB!B C-d= "ض7;PVmL`΄(SNTtGC*d1P*|=BLKBl*< cO*D 7%:k1\ypUyw4˺jRH2ƘRRh{J!bJ!)챷{J!bJn;zqbNeu<ЖB,Sl4B 14B|5BS3&|#<9p#Gj챧"ؖ5«a6CY4<eXŃ c ' "f6* p  /Il1ocn~ 18B d11P |1Р=@C7@H <c*A۲8b0/6uJϛuȞeڇӰЖrBJ 1D|𿫂  ⩂!ēS@7Q3{ "bm_A\WC= WrZדW7; Ŧ6cؑ6>ڠ6{ bf7ڠ6 hhi/z}GNNmx30S(<_}@̟hz/X+eƴ3U]İy~RU=ESEWM]cOYDpUYcϪC۶x^eMi6W.ލƺ!ncn>*{醈8nxǞ!e"c&*6$11ӢNȢ2ƘNNh{:!bF:!n챷{:!b:K/% ls6_PVNcӔu% .ϳ(b)gH1&J/Ǟdd M!{}}{;!bK{SY*$|Kc C Ӄ g 2B B RcO,D̼T,oO,d=1[Sy !YLchvUE6Z-bz>p|8+هH 2Ƙ h{ "b " )챧 "ضyYҰ uXPE\GX>zՆq?N"cI"KƮ'-"f*- iXZd=i1Ķ,-^m~B MPcL T_ 4%e=%1P%@[O@SClJw?p}w j_i8Ͳy IT5CSCWMUcO9DT9ã=1%MW2VWUa/0U^e]C* Ő1C|CTS 34U pP1d=k Clۊa+/2xUSx]K($RP cL-T _-4Ie=1S@\}=6`O-DL-|y~ۇ8m d|bWD*j!cj!ૅ&챧"f``kHcooB$>.柯2&:VM /Z7;_͍P,oYWoYuJf1X|t=` `l,{Y/b۶^t|xHiB6VrWh1 j Ǟ&& oG {i!'NU>cu5O>X~hǐbieXR'UCFd1QF|ш=dDLReDlF<cۑ_N)"a|Οͪy٦/$ WC:U 1ƔC|CSUS3B!+{ 8DClBmEھ dp-.ɃJ cɃ ˃F'"fB*P=y=A۰<81p<@ 11@1|@R3] }#Z6cO D Uw»˓qc8T.g&=۟7'U T3CS CW MScO1DT1׊!{;1Q02umhr&dy[۬q*{I?IdZ2d= Cla:},K?_؄^Y f؄|V_3./ϟ_ O|/ :Cgs~ٿ[wMտ[`1n[Ͽ[z-n1˗;{ݗOe=KClӖ:rcNdA$u% Y1~؁,>,{ b6, ?{ bmZMFᨓeUaZFGG4dMo(TC2 Ր1TC|UCUS 38]5~:ᏟYǞjjܶmb G0uuZ-0,ژN^LN'a^_ҩj(1*Ǟr3XoJ9u=`oK9DL9|LbX=H'Iv_xz9VS-ASAWMMcODp7 {˝7(duSSk=Q(֕(d@o >2 {2 b42  ?H{2 bmX _ub]?eXoN41o4>/O~rɟދ=ZQ1ǞQ C({:0bmrУ:K6Cv}]yd= YQ0cӄ˘VݥEUylbQPVcLP_P4le=A13UA@wEClb){쉃(nۓ=A%uUdev7vM+Q cL+ _+4Ge=1R@ B ClZ/kCYE1`XW0m͢+ T2BS BW MRcO-DT-j!{쩅!ad< e)CwʻX=T6 u[N<`!2Ƙ`(`h{!bf!6 cO0D ݊{XTY%zoB4XqWŋ˔ەYU !c!'"f~x-:K cO&'b|rbE,"/k]GBB!d1P!|=B IBl!Vco ))Ilb^eXM}F>Ƞv2Ƙ>>hv{ bF cꃈ郏ˋPW<.Xy몊bW!/8b 34C 5C ScO3DT36ý]͐=Bb /?QZ o:cZ>Z9){ij8o@ClZY>\ļ_-N@ =1@=|@R3p={D M[xC۶o'I.QLatbu gg'ahڔbH2Ƙbbh{!b!(챧"؆8m oCEM)[!TPVEg i(*l1&/Ǟxx ;!{~16,S}[^mgfuVzHi@8)ż 2B B RcO/Dtṕ^ {z!{Ylb ޏe9MJ m*cJ>J)){)J *g bmX ƗBֆ6YgPK>ɂI cɂ ˂F' "f2wdA\AmɂɂI"PO0: =gG)fm E/b&:K9C2d1P2|8=$CLMў/%C\J7!{S16,.ILᨮ mcE9-c*o i%C, ɐ1$C|Wd{kHے!b HdR2d="ƭ2\ԩ.~$̪bu(HzvvUVe[fm,}6Lqzw<Ruc]uCAd6  Ǟ =@ײO+=D۰xg0e7M))6m+BB d1P |=BH^ @Z d=16,NbK>'qZV ҧZ(1 * Ǟ22 |tOd " >&QUj`x/*@@ JcO DҠ){I? HS AؓClElm c /OyȦm[CB#d1P#|=4BČIA#p-j챧"؆5QϖM$a= q||FEn.*BE]Vm>ٹ: !c!'"f~x/zx{!bmX<ƗBֆ6uyl,d! 2Ƙ,( ,hd{ b&HY@גeAؓClӎ$<8<e8ҦR(1*ǞaK૗J (@Ĕ$v(6]LumQe=1SR@N{'"&>r"L1o8&Vy )~^)c ,NBu 1ƴB|BsT 3. pV{Z!bmX+<0MselOcL_47e=m1Qm@wACl3]hzpd }2cʠ2>ʠ){)*82 Ǟ2bhbd71\vOG>d7tU.l 2B B RcO,D̼T,}=B۰XSuU6j%a=]U:ŻoG !Bc B> ){)*8Bf[!d=16!Kev}Xݴaײ.^(pz9 F#PcL#_#4?e=1cR@w4BClEwݵóa.`1,ꪉJ!*RcJR)/bޮ;?Yw{_'"щL!2ƘL(Lh{2!b&2!6 czE۴L->rj ,}.l֋yV,R cL, _,4He=1R@ _gM!bmX,lo]x^mxuy2:cQY!2ƘP(Ph{B!bfB!rK=B۴P8 y貉?p&.AANcOD̄T}y=l:bǧh"ŦMGUٖ,F PcL _ 4G8MSUiW9._N*ǎJ"c)J"+챧$"flJ=%@Q8=HbVb2uW8մNQOcL_47e=m1] p=mpOd= Cld>*|UW (wY_86iPIU8TDSUDTĽ*"{쭡">rE{r獊 k9{V"؆Uw['0e\ך wzźz&c?llO|MPd=M13MPkve=+ ClVnum]u?no]F}26 }2cʠ2>ʠ){)*82 Ǟ2bV/&XylFDNcL_4*e=91Q9@w@ؓCl6=6+qpTMu@Bd1uP|u=A HAl|Ǟ:bV&,ίu[.¨*<[B;(\1&/Ǟ88 A[=q1q1/oat6 Yc8r A u1Au|ASS3 Upu:{"؆I+m]@pga_Dx?/c~?P/dR cL/ _/4Ke=1#S@ wD{V"ئ0:y=/~a,B[O;*TRO{P!c ! '"ff`R0m=C۰`x|ktR\ԩ^!~mc/,l´N|~zd<6,RP cL1T _14Me=1CS@[ wCS ClCa^WmF0R cL0 _0 cO0D@G0@`{   ;YgmZam*c~'ҫE1.ZL2 2B B RcO,D̼m@ײX{OooW,DL,|XMfa^1UQ޷Ca>Bd1aP|aД=AF|Ca@CT{E M Kޏe9Mat6:ϬDPcL_4:e=y1Ry@A[÷w bc{Btu(O-,>XwlBEC0 ѐ1DC|ECU 37}fh+Ǟ5!iNY*gB~bC[y}][X:2;ܤ4!lcl>*{lgÝ@ד _ˆB۰l8T˼?0pSx_TĪ-ew_uȳ<)~}ogg'a&?W #Ǻc?ll_aA=FSF+{&Ǟ!i!&]۾ ٪6żS/EOB<; G;NC* Ő1C|CTS 34U ppO1d="؆s6.&0~Yoa:/yZ!:VcZV>Z9*{ij8VhRس16o|,&!C::~7҇?(*l1&/Ǟxx C;!{쉇!a(p]MHـTOcL_40e=Q1sQQ@EAClâUj1ᨚi~^eN=]gg<Z!ciZ!k챧"f\p[V{Z!bmI)ż/Mhp^1\vO(`! 2Ƙ(( (h`{ b梢 6 cOD M[@(66rn: <^W1NtB5 1tB|uB3T 3* pN{:!bmX'< Ue2ia6\“~?ߟǬV6].^뢜~ Yx]TErU1TEU|UEWS3XUpUkU=흪UqT ߟ(RlUY\._!c ! '"fF*p=,;D %*ovTRO{P!c ! '"ff*P=C۰`2Gm,:pT};.AA NcOD|TA co vA$6h6՚ wz&c&>y){ij8&&{ bmX<6~mEMa:nq@Bd1qP|q=AGwA\Gc틃IjQdm ylbhP[SǦn⬼[flS܆/e{u9+o!Ū*{醈>nJ7ut}ݐ=`oK7DL7|Lb}locC Hue5PcL_48e=q1Qq@_|=l>bo08dyi?Bd1iP|iؔ=ALGAܷ(% co AĤ$Z&8*bՖ2pYcf*Hb 2Ƙ* *hb{ b — {M16 weHiB^ vr$c$>q){IJ8-d5ۓ6VMYW1r0m󷡊_/7ej0:+9YCNd19QN|9Ѩ=DLTD쑄r"{916,'N&PmhijôNUqVY[֕BHz2ƘBBhz{ !b/{ !(dB۴B8N"YuPOɋtrպ[q|Q&DQ cL& _&4Be=1R@ wdBؓ Cl2բ!0|)P4b#igu\,AQ@TcL@_@4\e=13T@wDCljcU\ünbz{A\/p8>YiNC[c5CC UcO8DT8==C۰px\6yjQm rSqhz6:kb 4f2pmS"ʊJ"cɊ"ˊF'+"f*+`⾬{"bɊE}Si_CZd1iQZ|iQZd=i1i@W⁴{"bmVMM(UbN7=]d-ٟjɢ!#2Ƙ(#h{2"b&2"6#cOFD 1r.Qq9DDYcOJD4UJR"{I!i)qyن{2+{Ɉʈ8܌##Ǟ ICl2q!_VpZ3*Nc.STT5CSCWMUcO9DT9}=,@D MݧtYuhXe;fDžK5CCUcO;DT;=C3fMosֽ.B 1B|BS3#p@{%E 'մNyǪ%U 6cڠ6>ڠ){ij866{ bmX|D>γCQ&mulXvO42!ƺLc?l@&|P&d=1cP&̄2!{Y?b 'mK02_- Yv#(\1&/Ǟ88 /_'"؆*1\8?<[61SS\E(?Ĭ-S M,Jr"cɉr"ˉF''"f*'`sK9=`ONDLN|Կ_)ż T`]0S1޸s!rdcd>q*{IJ8dCؓ ClW Ƭůa< i?Bd1iP|iؔ=ALGAtܓcmII~&i%26mH1],V ?ײYma%!tcҡt>ҡ*{IJ8t/Ǟs ClqƔb&/&/.y XW1Ɛ~>^Ȥ2Ƙ^^h{z!bF/B\{oB Clze?;˦N˛eZNY]ۘB 1B|BSS3$Up+ ~Ǟs S%Om6(aǦ hoS*)d1&/ǞXy3b!e9X{OooW,DL,|Lb*-Wpvvb59Q1W8bZb͢i)rwh1)j)Ǟ m5Eس16)E>$y/ ]=Bd1]P|]̔=tAČFwlL 邯tAClc/CYM4?O0SyCBd1 QB| QBd= 1ST @ _J$D$$vuj_cxu)6c_0/?L1ST5CSCWMUcO9DT9m=rrĮޏaH?W/ '[o_[61EKP6!6mv=+X(t!c)!+챧"fx 3Z9*{ij8 wB[=1)x/*bH2Ƙbbh{!b!+C$vCwrud$G'feS ߏR͢b)gH1&J/Ǟdd M!{Ydb ꦽsEIщ"HZ2Ƙ""hZ{ b m+B۰"xXe[U6 ylb"yXt/0.+gu9+o}=tW 2<ٺy1j"Jcj>jI+{쩉8ؚCس%)bmZM<+҇?v%-⴬VuoW#q@Bd1qP|q=AGAlt^!{Yjbcd71,ʛoY/,K̳>ʃJ cɃ ˃F'"fB<͞< ȃ; {916->6]VC\mA:\b[Gw!qT类;ʇJ!cɇ!ˇF'"fju!6co ɇɇd*1Lbm"~^ƦUS-ASAWMMcODpBl| Ǟ!aemwIb GuƯm:\0rZ"NngÃuC65 ݐ1tC|uC3U 3:}6@ w_챧"؆uˏa<@D !1Ƅ@!|@CR3 ]|R]!=޾>?<Yu9+oMYLc~.^Q~8F4S cL4 _44Pe=1sg D=ѐ=D Muo0ӏkd<-6-o$ͳ?猨"p1""ǞA3.T*"{쩈!aqTezG|xga=0LV;fy=B=$TPcL=T_=4Ye=17!쩇챷oC$6N]G~> nMޅ(RlpWfᰏ}3\k<Z!cݿyVǞVYzVhg!bmX+<o.ÐUYa|Q(Q cL(  ^ 챷PJ(D̬C˗B\K(|%  ۳I81UY[0-iqٴ^0<_h(")e+eȅ1ƶB Bؓ 3Α B\R.d= Clr,K̳Ëã.2Hj 2Ƙ2 2hj{ b  n+챧 "&.$|7Q1׹PDPcL_4:e=y1Ry@AؓClU.b"^<6MvB 1B|BS3#U <cO D M '" -_1}SS+ASAWMKcODPTW {=]E1EQ~YPiYߏMF …8cR<(AAGA7 {Y.bv$pTWm6QY=YU:\-?q{Ȫ"YwMYjlY9[7>oτ>NvW j ci k챧 "f< `km=AmR\ԩ^aX)lcں8 7FC(d1P(|=BJ B\K( cO(D M[Dip\[UEg=T6 u[NkQ&ËqC6[FGyw 1~؎V>ZV{Z!bf9ZV ? ig!bmX+<6Vmi&Ѱ.f1y6/K)ġṊH¡"2Ƙ"h{*"b믈^TD""">&˓QYwjaUSU‹.+gp-!i9!$2Ƙ($h{B"bfB"6$ gR۰xqx.~{t향5B 14B|5BS3&pp_#d5|{">&чU\aZpilo8ndz!Z^cz^>zY*{酈8^xǞ^bwaJ1_-+|? eϖMCu/1\:2ELAC4d1P4|@=DCMECl4|%Ǟ C?NC3F'T=畈y臌j!c!f챧"fpk=dbC?zNq6a&Q)U7DSDWMWcOADUA "{ٶ1P4iUDTڐcL>_>4Ze=1T@Cس)b !.W UyvML[6CC VcO-:^CXd1aQX|aЕ=EVQXp [&=EBXr M{fN/:kb&;٪)NvCD 1C|G75['ѦfIn|o}1#G{&c䶾{ko"o>ɺ(aǦ o]p?/cӆ"}l밬ٲ!M[Y6G\Ef]EFd6zz/'bOV=vTO\vUOس1P=/bEo6Il~nY&Cw%g*~)M0>>okԨ18⠆\k5=c0mloYFʻt_F p2Ƙ©p©p©p"f k{{" g鋃/艘1z-zǞe!6yRfUj:/լ>yݖ2V>OUeGe4~mcU"\/Ә~uĉ< 5b(cb(b/8b(bb(>#ǞbC㶏:}0>qޗX/yyx/o(c >鋃/艘`ע'%zg[@j؟yt>modySٴeެ2h~y㣣0]V@Nb1N|N_N1_@k<;cmɝɝOn2*[Z|75ɔ\dM5eM5eM_|q5eMLveM|Y{E dͳ*z3]<稚if1ff8f;kK5@Q3w^vL'ߓ$oK{=/gcѯ͌E8S RO]er&c > 鋃/ ‰! ϶pn+g&b p^yeCYj6柪,7'c >鋃/J=p-s_d=1ĆOɋˏ/4pbQ6U$NH1N|sk{G@d^ >z@|u z⁀{k' "& >9lޗM ۳IĦ)*\شd!2ۓ _2 cO2DHgsk{z+ɐ=ޖddNaRuu49zRl:nnӲYͪ",}|x<Ȯ+2Ƙ+h{"bFϠ+p=]{""J)+{)*8ؒFId=+Cl%q|!U8J1kcĦ)/M͢)kH1&J/Ǟtt M{!{I!6txTWmچnô^VEo73mB$ 1B|BTؓ 31 pp_.d%"&>}.L)mho!ݣG'.RH2ƘRRh{J!bJ!(챧" JaѽB= G0:!/BB OcO ĎT };: OkA4^v$(cH1&J/ǞTiT MR!{=]1E>*~yGٲ.b)=*H 2Ƙ h{ "b " (g!b |! U8𶻖1,ꪱ TCDd1QD|р=DDQEDnDco މOQ]YY.&!-eB% 1dB|eB#Tؓ 3)}ծL Ȅ{;2!{Ʉ!6Lx/uUVe[fm,hKlIX!cI!KƩ'"fj*`IcO2D !$ëw}-<{!~ucXt/RuCAd1QA|t=D QDlAScOAD â(ۇ *,cӄYQV݇3TCDd1QD|р=DDQEDjD)"쉈O8N˾<[61iB{Circ67JȰ/2Ƙ/h{"bF"/cO_D !ZvbQ6UQRH2ƘRRh{J!bϣo+L_+챧" D YQ([d M* {g.)kH1&J/Ǟtt T:d5ەYXͮ:_bn'LvUEh{H 2Ƙ h{ "b "vW "{Y|b(1; gg'ힳb&1cHqV?*{쉆8h/ǞhbCò ӏ 6cڠ6>ڠ){i>6 Z6{6)E 8NE\ԩ u[N$$RP cL-T _-4Ie=1gS $ۏǞ!6Z8NUbaaYaL!rdcd>q*{I?@׳d{!b UŬ41LbG^tY6|²Z< 弻+/EhA1EA|EV3S}Aq[PA|-(ǞbW'nb잗pTkC$Q cL$ _$4@e=1sgpk@ O9=mOʶNÓXM(w)?0\fQWM6CC VcO~Wg?޺ ⬏ų/.CYhS/VM,,rrZ묉_߀~~loCkndtȹdJMr.cɹr.˹F'"f-`ׄscϹ!65[S6V]fx{vkT_D*j!cj!ૅ&챧"f``k+=ށZZd( q.bwI(eu9+o"c>*{IJ8؄ZBd= Cl (ʶ_fXOVeLDBE잗Hxv&g!6eU3/?۪.N&lr:d$U-ǖUS8;;y19y}][X8@nQDxd1Qxex<co qGxD 8@q{Wxd=1Ć|N)mz*-Wѱa2QPcs_$/elн91y}ݫFcXXWc쇍h1j챧1"f9q h cޞƈ~ʪijUW[oFe(]&,K8om9/!$2Ƙ($h{B"bfB"6$cbE@Hloo]bu0fU1+2m臌1Ǟ~~ !{=]1OY̪fSO1d84=iyLՇ9RqeEt%Y1dEY|eE#Wؓ3Ypg(Ɋ챷odEdŧfw?Bôp/e{./Cbz.j"Jcj>jI+{쩉8ؚ&ǞbEZ=(:Tp^1U >V}&NBY*6V[1ƪƚTǞ íoXs$b ssS,cXd&;Y^*!zfcf>y*{ij8fsǞfb>f|OYUw1*"c"૊&챧*"f*PS&co vUETŧf7)YU^6Y.ujôNhWP/r^62m臌1Ǟ~~ 퇯Cs$b |mcUG+?,V?)qPC(%ElI1$EI|%EVؓ3UpI{6:E !,Ia= V'l}_mz4/C[6-aχuû0:N:\شϳE]51cd7C$G%GccOrDUr&헒#{==1ٽ.SLa^6oxUŬ{C+Q cL+ _+4Ge=1R@ l{'"ZaQxFEM_lo*Lcxuy2:$1<$Ƈ"c>+{쩊8Ԫ*Ǟb*Sy*~&Lޏv6=\ϫN).N۬c&pg*# c*>* ,{쩌8ʸ2RS$b:V?:{2rVY*BwnTc,\@TcL@_@4\e=13T@_ g"b gm붜K qe0T_f!tcҡt>ҡ*{IJ8tDس1qnbyh:/quPbU/Pjl!2Ƙl(lh{!b&!5ڲ=8D Adp0bذ!iLc("~ 4\e?}rΛy'(B+v1&( /(Ǟ C {/EClAi,,i Y]o0cӄ)\tm [8y; e)H02Ƙ¨0h{ #b #0(챧0" 6VMYW**/&!oM̗lXfUjRuCAd1QA|t=D QAAVpq@Ad " >5u~g[eUɉEhbӇKS.hW݇Uu]Ȯ+2Ƙ+h{"bF"+챷otEt';ov</,FE+j-U>[XiȬ֡'2Ƙ'h{z"bFz"'cOOD %rSʪe/Uyl ""c""'""f*"`Kcq!6Eٲß^ߝ-gm>Cc:da||MCU!/~ovK?(_}"y,)+$*$c*$ૐ&챧B"f * 먐Fe=1ĆP!+dċ8X2Rΐ cL2 w xw=Bٿw+cSMCpogǧ] V.~;o ٫n|74?eU19kxP> +)~' Ryc]yCBd6JB| QB 2 =# QBM{"d=%D$$'_Xqfr:u ?}TŔطRuCAd1QA|2 S3[Upq_A D >s)=nG4B 14B|5B L#DT#6}2Ȭ2$!4Yig3a1ikbyjyfQkL!6~mCֆy}][X:2U(~s~◲ GR\ cL _ 24HLg5Hl|ABc" b'[War1ۺ<nlk_JUcLJ_J 2ȤD YCJܕp-&HA&%GRq,NZtOB6}?>1 W'aٿtH!+2Ƙ(+OW 3p_kY2ٖH\bfR* I<WΦ M,\"dA!g b ki4D #oh $\øNR2ƘRRd)虡>Ն;J!Q !17Rxw&LSO?R!2TcRT>T#Bc==CԵƒ}@ג _IA&G ~X.Me:Cc}C$d6Z$|P$ 2=CMDB\G$|} B#"  zq8ʖM^ĦMeޮ.<_ίc7%=OvW:Lnpu")R+wH1&)J/)Bd"z )HZR 2GaQ_Ek'E Vouw??PKM_.KG_ [word/styles.xml][s8~_AyfF܌ӓtUYwlOr8NׯH+6GB;?_ $v: #DM,UF?}yů.].:8.Ȟ}衴έ݆ݥNзaݮ$Zwn9^'{n>- ۟V׉_wYxܱC?'\ןN&'\ݎ0/=z~h]TX.ķp߆av%GҊlǹ;sT=#~s qyiGT"Њb#r:+%QڷɆ[x ZAWh1#+W`jpDZ?'ġ8dB[6]V]hVni Y9 $~ f#xe/g&e25aX&BYݤ_yrJ̞H(:a$4"ܬ?{?P%P;qX5@?XZ +0IF&dM:#tx$i+]QTCO (keлx+ؙ awFg*3TZ}-ͪJ+F(|E625Tsj0D_eR*cf5cvqP 6 STet-1_S&/V:g?k_rL;}.S'/0}w aEnk6_߱5MV-&G۟VOW+/q4!nƉb Τr TЭ~ Y 3E, S&P2{(پz:;#+yENMr#4sEg]>AMq &Z6n_{Q'z5 i?9P>Q>.v?ѢhKL[o>twt(L='qGI<yze A!L &EMtlH{aC:,!jW/dRrU貉f%7N R֣޽Gk04a%y>@;#BA DQ5G`rbw[@8(1`F?8gg:f:aS va7F>2i32_BVZji?PL-A daY0AÕ@##2dbsl6V{t\"&ZgⷤyRL?'ᅴ 2%RrZ\ay M'V ϔ UWjKv(xr" (!8RNyۤ x'DSh@V**IDq^O멵HT"ًx~!J4iHEd.R˘@DniP]L2Ȝ08#`JF sF3)H޴)RK2W@333p#pFpxFT23v%Ȝxw;Je*A$3JFrF3>hTFA_W'rFV41rFMGg=*bEJ@HOmNyU^ t* WE0[qWDlk@Y5|W`VPJf-Ag3goc'iC҆.X-?OA=I9ܲO{äXIl[yZ6m٬+J qCtpjL\.p d\Y8+BWuB^vix1_<58)iI<ܲyOɦ^ۣym{mnܺOoȡer4NS]΄:z :zM&*ΠzJ;JGC>("Ȱ0ȩ[ |8+F~ I|x2ϖeO֭MmSԤ++YF{ƠZ*!`1u"Qڡo!u AL#Jd9?1E皝v,1$ӏ,1${1% 1.;`&F+ ( G+#H&壕R *k𑶀DU6̑V=`&GE`&5̀(l%Rޜ.e9**COӷg@jrӕ9S!bh*MeEW$hhbJ_*j4U{ZPj4TFSj4I}hZhr} h lgЁ!ZnǗrGV)[o՟_EPKM_.Kc7Uword/fontTable.xml͔n0 {(vZ T(qc<@h *I)}8m&U;9ω̗g aJxc2U#c(WB\ż JZ\4A"< yPH;(-u>zYU Ƹ{Ce_*T8JzUv4@9Qb^[G%[y(MKD5{M`q-6k$23I h_hТ5=?gF4vE;<ܒU+LdDfsԈlQGkmLs -+)m Eo(Jz!YRfoxyPKM_.K%a6word/numbering.xmlnגy A]o =qLD(d:j˥wjWZwbj~|-ߛ-O_ϗiVGGj?߿]?y5;[lo շ{~gVog'G-9=;9:_x˳O^;;=V3Oϊ,͗7_|볣?_՛ߘϾd~|v:}sӓgȍg߲< ]}wOf:-wo_|oFۮ_/~GVgG|wzb?oO֟h_lNj?<0_zfa[u>߻Cq.|^}i_lл"{yXw7-9u=?Xw{ʫg@Ȋĭ @"H $VHDVX#[AbD$n-8tA9@cruASdw»3MʈH`D1Hz:# '?g&9|1o}.)kt2$k h p~R8d4Jar(ԙcu6\z$R +zAriC8վHǞiO&C@CbL}?Zb  - 0@pƥtpt++O 0Tǟ8 a C;8UP\-Wz T!;p\ @\#iLӀSi+Wi)4i+4i+\iLӀSi+Wi)4i+4i+\iLӀSi+Wi)4i+4i+\iLӀSi+Wi)4i+4i+\#S& d3 tSni u:!0 5Nq:`rɘ*3ǂLCcr +>4TzӠLi+ӠLi+Ӡz = 8e4UO\= 8e4UO\= 8W6 Ʀa 察{peׯm^E|A8]vx9|\_Fn|?Jr~E+Nr`WE+Nr`WE+Nr`,:F i)4i+4i`4i`p4CMCh(1Z9ZE,0 La:SN)04 La:}SNOjM €>ПS3?| ПWp%gT\:4L0`2 L\2 LNL\L\:4$A0 LNL\LWLӀSpl*A0 LNL\LWLӀSpljA0 LNL\LWLӀSplA0 LNL\LWLӀSplZA0 LNL\LWLӀSpl1 2a koiktMC^1 piq+N4T9\'`+N4\ui(3= €iӀSAO\4iӀSAO\4iӀS= p`Ӑݦl~ko!x3w B] Ҡs2a?^%iB?z`>3ΤD|JymR~OP 8TaCpP**SNVKhP) NUԭ6WUj38Uɷ \6Wfj38 \:4$A0 LNL\LWLӀSpl*A0 LNL\LWLӀSpl0 MYA ?f`t30TP%J~O~ }iR>ƤD| *&%*TpxO**0Tǟ 8 Ua?pdڌVrTEj3p \U6S|j3pe6SMC4i)4i+4i`4i`p4CMCʘa40 8e2 pe2 L\2 LNuișa40 8e2 pe2 L\2 LNui(a40 8e2 pe2 L\2 LNui(w44ERiY;{Tp}pXokzp6?Z_{[]t~A_/+\Gq)]>2 ( S.>: (W! RV@q*"izM8?hzMpWAN5=MC4i)4i+4i`4i`p4MC#ߞ Y{LC?][l>[ pbӐ 8i0dLCcu1L\a= €iӀSAO\4iӀSAO\4iӀS= p`nl֠<0_ Y|zؖk].PeWh{yjW֥R,bXpJbXJP,8XJP,pX(R,pXnEiLӀSi+Wi)4i+4i+\iLӀSi+Wi)4i+4i+\iLӀSi+Wi)4i+4i+\r *STi)m,UD ] 8bptK+\' Xjt: ,Uf  ,&Wp}`rA+NpWA+NpWA+NrMC4i)4i+4i`4i`p4MC)^@MU6g6\D8֛Za͏{?/ǧg{?Gb?{/7G_naKl QÀgJ׀O ” O:h}h5=TjzWMp4=TӃjz+ MpdXA\5=hzWM :ۑ`8⦇ϔ\M p@CSN iz2s,N1鄚LӐ3 €i`p40 pe40 8e2 pe2 p`PJu +ۻRŵn ׭]^Ia,a:R WNgyʀZ^ɔ Z^+\'R@q*ӃMET k\;=@N2,*NpӃף"Ҏ. )N'RY)+\'RSNg%+Nfԙcu/&W8K&Wp}ia40 8e2 pe2 L\2 LNuia40 8e2 pe2 L\2 LNuiha40 8e2 pe2 L\2 LNuihw4˄}q-6 mmWniHpLCSN4\u2̱:И\tB 0  LWLӀSi+Wi)W5 M4i)4i+4i`4i`p4MCna4اL}j2 i)`ڧL}pjui(4AON= pWAON= pWAON4MC4i)4i+4i`4i`p4MCz0`SIpz\'iz\WI8z\:4TL0`2 L\2 LNL\L\:4L0`2 L\2 LNL\L\:44L0`2 L\2 LNL\L\:45/?,f?̗~a=_e{Z?w^^]_FWm|?RHO^]""p]®mo>ihlP88-n)Dgz~<Y@t^5ݽҴ MvFS/Y'ɚyc.z9ɞo˪%B慦0 IE%^$k i ÐQN]ٙ6m0d~%R&0 %bO.Zɚo32T.[nꖁ+[etU \ 28-W6 9 LWLӀSi+Wi)W6  LWLӀSi+Wi)W6 X;4vi(;4[XRmCdijwI;xUEm"؜<j-$&eD?eU/ג6;?)bSf=1): F}L*j$Խ׳_ށwS{o]Q:ib`DA)Z~'&0n)&N~OF.F.>=3'sO5r)"Ei2UF.F.=}TaO!VwSEy F.fI&MPkEFRk5j0Z֐MQkȦ֨5Q@QkȦ5jȅZZ>DZs;֨5\SkԚaF!Z֐MQkZ֐M%RkԚ ߕcrZK=r{C.xc_{[Lٴ{-u,d}C;ȶ;=4~mߊN, m;nGYreFW V~׭;[d}6 ;w3pl{9a}ޢ&s> $m!~M=z=@l˟z ۤsRiJdmRׯf"`+c_%-AW@.R{h%+zFjH#Q3J#Q5-WZfEJSt`v+! cP<TPL>= oD$\Cu%vEC,{ɿE\CP],.mB0EW ]-YgeB®2Ju5\ ۱\a=vz \[eHo^+ ufu E.>LbP|%}M\!w]: EW͝+_I_a3p[lsWX++\^ZmrwܝxvN+|ZV~28-}"8iUpZRpZӚ˧iݗOkuy'o<H#<-yDYG< &Hf跟?&0-p" SL@N!W9Eg"r"")"r"")Br2 )r.SFȕ)" )#r/o_zFc{TV1bt _|Z!=[-O<$N6gm ĊX4VlXi "V6[ Uź $I)TbEl+.69u&beXiwgUc6/H6v' HlNfb%/Y@C. ]F 4t2eS_HCG::E::E::E::OfEKE䤀rRDN I9U@NrR\SET9UDNSEET9U\SET9UDNSE9U@SE9uDNSG9uDNSG9u\SOFiF9uDNSG49uDND49MDND49MDNӄFF49MDNӄ4m@N!9m@N9m@Nrm@Nrmhx{r. "r"V. "亀." "r. c@N>Ema_As֫WPKM_.K%<-Wword/theme/theme1.xml\mo6_!h $[KZFaiPFm_#ni$k G<><<'D>mQ&&W#ے a JLiL-{3Ǒ!d2I)m"b )vFϠ5fNuNL"nC'm$<ĔL(G-NbN!uF*4=oa7מb3a}"lbe;o^;%6na^9.l{-tߥ^ ]30vbsl ms7p&gY0noGxϦ*mx7grfJ6a:E ^s\QL>&b3@On۔nIi2jέ~3|ҁDf){>t%Ϥ8Ϣ9M'4|8̚{'5=gm: F-XU&,, $Lļn'-"_I xU洛&}RWO+\)+d-՘Nkm?|\c^|`k^ZpokN͚f,\o˚dHhg iy)Ɇvdzrk_Չ12^M7Sg^`[!I'|q $a;x U6/ţY)7HTDZxU{4p{O-niNTI(˔t>=zMj]c<~\jG ?Y_%0V#-5_2Qk68AF5cOuAMS{315YB*OF.KN#?T~c%g"9ME?/-ƳN6Kf4\DH$hj{ >,q$d[Duk֥YDPbrCkK(u!CצxO=-<,;^f ai"f¥ɺCtUuudLO85"6`K0:(")r9ő~9_q$@ G8T G#]T"G#]V!G#]U#G#]\%Z&7p8k!e1@2X?0Fqe\`荋B^<2H~@zл=R/#xA z^#G9G G9#_ЗK^oؾHQa(Ƶ } }0#@`9#@`9*uЛ_PKM_.Ko`rword/header1.xml]K0%w[)2ucnLi'{od EorN>&o,Epb`V1M1 :*a@uD%Dhbtam֫2|(wDahi$SmsIB45-$S.cy]scQK+\[!2k辙c? Wz ǨթP-Q*/j]Ž י/91le.LGtWa*#]jk;7OOzM@k4/7ûщݞe&2>0]@aE;w,\ _f} PKM_.KdV word/header2.xmlW]o0}߯&hp%Cw{1IUem#cPx ^eArZx K*ͤ[[*HuS=\rn]LZyI6b!tm1%S Ҡ(3ơ7bx>C͛.Ƞb餜2ji;TA`GKT)~JEyA,!lM@t͖CdM ܯt.vGm!mMV uQJT@9֝ )nCY&"ğ g}/_Fkx2޼ތOgx>_Q|5.yGk$ ٙ$#iv1vd8jQFxxMVPu6ȸv;C}Oz|`[r<a [/muZ,E4NkX8 ;yG œml~F$ 5C4M>< <iah-cXd ~/Lc?C*PKM_.Kk`rword/footer1.xml]K0%w[)2ucnLi'{od EorN>&o,Epb`V1M1 :*a@uD%Dhbtam֫2JVb;g04gة6LT$w! ur)1~ ⼮͹f .R-JѐJ M~tL1+ W=fcTZDr MQs W}^pL p6в^@I:VI0A_ . =&@5SQoU] DDnŲO]xTd{Vy;^^/PKM_.KP`word/footer2.xmlN }c,[[2}%h^cb9çVQ#I0)m !LiL"ə#Rr}K Q5bJ*-c+ۂ& @|XbCQH.k-)F}]%##kp96lQ 8gwLKRR#e%GpP MҎT33νR1k|t?DoPKM_.KD,0word/media/image1.pngeXT_q)iiiiiS@SP@zPAbC;᧿};/fgZYH 5y\lrl @ 4J̻?/47My)Py/S(T mkׅrܞ.%.m۞0*ӈ.O-l^[q4H)Zn鄍Ǫ2=_V-[ˊP6G%E>Q.oi)^+9$CmKFIbbW>>gmm\BJrIAzTa |-iN[O^f~o')ʇ=k b|( ܱeAh R1T"qAGM2n3*$Xo9C] o y;*6HhV 4 j B:zڊb9Ai21+Y> QGPBM0M_CN=Tx肂a~c[W _!sttu7mwN8d5S gueuγ\iVkED^S4ЫuH,τxbPNMFE;ӡ歭67K8SIgIދ>P]lE"ro< _~ wv*l[)K valk}߅l>o ֞A>?=% Eg$$M=LV% a&B`zo`˪-{ZʕܥG^Osed,#dtzME-SP^&nHhRќ!sl`ϯ#COF᳭ #tqLFe"uYC^$aY̥ɼД6f"8+Yv,K-Nj&bYB͇Vu*$JGn7>g>ULTs~q Қwy*xvͥJf'~HkXtr9X(P\z͏j$1O Wxߋ^IJVih͐:F>Ҭw!QT+OX`F QIݕzOl#= kz9ƴ$S6p,) W+=;|`$duAU#O>>Ψ}61jo3= ńsnlQI{ԛo_d'a4-R mNCG]( gܿGb:U.|%@zf:;HWCpa{s*N+ʖk7R͟:kZ7I\G #TXxqo|I~n^1SJ8vO6 g'Bxxآ1UexCW YrM+#m4Z=Wt8RÒ.Dfڈ0){XFœ7mAI?ΤUqVNHQ5jf/wJrv"HSiԣ E)*ƪ~qظў7Pl+W[@xSC'ZveO܋3?r> 4L7@}it'(Nŀd'wگkOAx+lW/ʪpMSS"Wha v܌93juJ$'b`/*c;v#tAuXszx2s4̌9'/1Fiz4|lGpyw5Jt?AʈY)Lhi r{آͼ Ӳ7{)L\X5 ||:]N_Q8CI&Eq 0+a…TjCyciL̡M wp^4b@Ѩ6Ȋe(>"l9ovU?uMYV)psI7H]8/_۝il BZ3>.5ǭtn=?Pkk6LQ[\ dvm6wpL5it]q,́p*= 03uB!X1%WI|VavT15 ~D 2!ƌ&oLrձHԆS]m=:TP< $Js*:)G"Lw|%UǓr[%V>7j8_w8JㆱR@"Vb8uFݓc(&,-Kd܂<E%:t[B㳲 Q //.jJ.< ZRBg-?@:箲: EbCH˓!`RCgcZo֏0:& |l)cDk<A+4wZcwkw*K-z yOM+{D)LlTeaM`mwK@gLPHCYF;iHc&|l28XaRJ<T㚻~8TuISV ꜯhD@r|`NA{/=C3$X2t$d'54$*||~\-`3؁'k 9x)rnTq1VUͼr}_L,;' _ (FzFBT58.-2u2еůf7-u̥`MI:=d۟sLѣ$jGս/&ʢ(׶o59E_IlI st{柯%f rZɮY@Pg9\nrZӭ`)co)F_H8T^9S\֪P]~m꿧($,[3 Nݜ.ƿw I32_, ;l Fg_tI44~,f bchNU?Q[/OlN&z\\\ݐs//"d|įVV(vAC[Rw?V32(gCr*uwdQ6g[Aygzo+lO?^{h\$1 ޳DXEWZ/"XN4+J,iIY5EO_wFW$gb"1ʙ\G:?YG9:MJݻ4U<)fJ1>0~[FR.I'~xru EuM/r#HnԀQ'u eu/JZ*|d.4^!u<L LǗyʖ> (f-}6u}P9ԳnDu*)Sz_dҍ3dz񬑠I}3%_[ltut0m qyrxR->U@AW#0j7^++|T|Kk``i"|EPP}ji_dӆG>w_F bBsx?Ay?,^עvHa+i3Eg(fHe TG{M|ayflϮ)?)zi>a,t,}7/Qgo 217I0o^WRpO j=,ut{߷H:~~̬OmKg.5C"XӇ:!;1m}eAR}$QP`s?d8srh^;7["B֣b/ò /r% -v}hrWv7-=PF$O$/ 'iUՑ7[=ĩIu7K0ő*+q¼/W[azD짿&}RU!r__#a8-L8K5z>R:cƂQO(jϱgYDm[P( ٫z p/˹2?wT/+_t蚦% /:6I%`oW DsL3tk=KOmv_a`8KOC$Cgy|~o&!l,>H[\=8=z?\q vf ;Vϋ'`jj&$x2:Mw%`IG-X1a!7X VwxMbM!$( m6_ǐX_ʗ>]=;ƍ%|)}!#هq_)bĐDBG.ƿ!iՒ|*DkĻO#űnS<:v1HrcSϥNMS'k;g9/.>wah&*W1[% %:W⧞VGWYʷ5o1{!c'JB8ZTGmaD p&y+bq1S|*bpj>dFDd̥1.rt 3ԡ |Tf9;ʹHQwEngSepfϜ ~cCd@1,~yO퇮%/hw9,FF6s[3:](EnXd_tףvѼ.$Wy{\rИ4)WM'=vD)L?KJ{>Mr;پ\7;T즌tacK{ey bD$F` M~d>qECԼ[Ψ9cN5L(R|6dmlcuа5weSEG볕"چ0_xp5õdc ͫ7j'v>S XOH5tF+L bgoőEKoz$1i*f฀ gp| X= .0Po}6"gѦ1g{\c.]۪g>6Ub ualaa"yT)ejhWHӺC*U-y7]DE1cY[92cƎ]ZCiilG[GD"\،kS1?@- Hg:otjq嗬sJP_'Q7N{f|ϠK߼bLI"vKkgHǐ?, hoR{iS`67.4&zO၍2#wnC>V>CD(mFL-k^;\: ' %a3hՖHRiy2Ww"]-={J@p9.~Y&IDI0"Z 9v.Y 35&HoۿVj>Szo3`vt)2'bi('$wD gٽf^"ԄH㍞ <-S[{dS6\p_L;dnI"(P6V=w ԿUQܐ;i#H^ʏX 5p>*+a1=͋Ԗ N?o쥂EYk&\^_^+E53Juvze2cCJ{}N 0bjB>h$2Ԩ^c)*Kwy2s:[eccw6i;q3GT-y~OnTD\*kz'߇D=os"|rC5B4>kivbމT- ] jNAܫI`IY3sJ6t- Q؜ w,OW ~+25!.(x놆\@-R;|edʥ^PKM_.Kތ) Hword/media/image2.pngt|eX\˖v wwwww.9̽3t]UKwU,+-/&*(@B؞xb1A>EVM%;o &N4Ey6`9NӉ[~~5\},Y Z 5h__73 ek~?fӇKI$Nnl4њKKfmu6>U>]u?~jc6F 1'b}I+ ˫{:SnvQ߬yHiU3I sKn 9a7e'.,oq> GpSԵg*˥:5XHp;2z[0VDG_\U~g例:᧱q}!\uo@)뱷j h癩/~Nxo/c^':OGN_X,Y֏79m]_V {OI0_09i@`3(U> G k|+[Nd3HH WhֺԪcY 𫽱۳36 SKʽ0$"8/,y;zfؿ¼K}E E/aƧz !Ad$00mtَyq0^IVx=l/+k?>ßdi}؀0vS<5 QHC5-Jn;jы7w4}`pqt [<"iΠ.}R]#O<6厽\jn;}Lh˝̭ÝdսhHb7Jy Ģ6{ +Xѱd1Í7[[{ 6mqD[[Kl-B\~0h`Kahp n)#y)[MCneT( mOt!S7`ڜY}G ZAq$uGudnf%S#y`$V<{B+bd0Yg\DOls`?Y@!EtፏRXjH$L>j'Yy1nvZ̛֯c"Z.5\d=h,VXXqH;eK{N')=s&v<ڲeKGGswu5NF{X&kmå)V9XQ0G4^:N[7~xw:܂7/zu43-f Xc#* 8\wjU*^-g'>ϫt'w?EZb4fbqQ@QYF.:t ѯ` 4C3ɾiY%N|ufbuOJuS|7hW~_i,ߏE;οW{}ZR%,4UK:OgK˭l ^N`3u ȱV=R Ҿ$@)@8b}YxlQutbCZ}#+3팶{GtfnIJ(Y֚6mr/0A,-L-zJ.m礛}a6Lwwm OK38{hљOc5 cL\v_gl+#`[ڭ(0;,iiwN]H(+maNr^^טV71+k'\D#f#'X+JSF\Er5Y2;ĞrpαK8ؽ/\;cg-yְYXHGVI%pߤ$ ˷UDk֯eCx\ni`6K-5R5]x'Jд,=7Zau߼^K ΄t=\cLVoxIj)|wj]fw0H47wCEWrn|G1X|.N n@U,oӮϻM"LT?B>^Er6(է7Qlح /C}= 9I!Pc*paŜ-'o5VIh¸&u^z~xN_{5k=tvߐ==irӥ7xɌ@];L  &wD'KLÒ3aдEel߅‰8չ3=nAWwYaDvP3ft1.UNac5t֨{E@|=I5kb뱑`SJN{S!$vh7"Op2#قuCH*K?njBw1,,w41LjT1c*@G UWq釥r<0LF73\)e?:)HOWg娝a7t E}.'vXjXGCkpa4E9k4Zba-~MvQsxeyfj\%qׁrcʌSB}ws2=Gy aXe{ȧ!s(C"YQ2pr񟿇T'BqFf՗`.goɋ ~f, ?9O (~*c%?0:\~F@z(5 I@'s^Q|ktzGkՙK< mx> KI1Y/^JW$x] 1O8O7y=IEpʚ00w4Gp__Ӊ0sJ < CMw;ə`/51)q Q̢2x"JmVP:!TO5/f:S!_WTre\_a E G)\j]p\YZH4a{1z*[a2\nrec>݋<(y9 >PppwrkBL]Pl]攆=Y r%;u)W! WM hC"{h nnxnX_%HdKrhn&;z!Ύ@zZKBD1G$aI0>:vtjȭ0l'W:A&gFs3v4,d`U$fT-ebR~Xu8E2v wTpqo\?t\azt=Ay~ m JD7GmS591RzzBk`x>OσTn3Q[@#3^G8}FRAB}z7 D0ؖh# X$^,-e谺Β|&HWR~$G~}u6j#X S9Fѫ `5W"ꢴ~EQq.ʁǩO(C[X3 ttTI6}<ǻ2lb]+W ׄ)лP ߷ֺr!>Rewŕკ!dƣSdA=/Ǝ?Q 7Q-W׮S@yT !9I)-=Omr.&IQn y+FO1YAdzB$p* T2) U]0cyMpN x, VY31)`q!`"43hjW{pgpY4<0Wڢ>9\P]%c3ZjSL/!ՙ  >^My_e>F]rb{B1W] e0-cuLcΊSgYy"J2Br9L>\T</ou.K@oa|tOLl(DC\7b[[~9GlX&ʽ\4&pwhgÔ'gÔVJ9Q!~^ug'@τCFJR?}1j?g˚M''1Lb@<7 V/8L$#y3 ^d&}r4 BgG<X:Fq{7䉝0U#W .6~L$9e Nզ{/ըm`-//=.7}ya!XUa.r}f7n6/d~d/rG?^o0//yTK3 #5x] w%ekIQM*ʐxRu`IwH ]:NPʅwnlHzG'ooLe?;t.Kَ_ߩ H:Ң};s:o}nHJbn9Q2{+5 dhB%d>wd:%6%o@;RiE"TQ<Ȳ(uatkM>"2 Kja6t)WBN}7?pR}d5ٴ‭uI.#&wSlay9$dC-+K Dh0|7dѱ>Ea,+GvS5ς243"kotJz 9/87|cR8,Q6,CG=_+ ǫn7}?nGnw}ENDoFŋ(ܶ.PN ifG6ၠXB1yfmM}Z\;R%B !VlCq{*N-7ap\.Gw0ov~ت.ʼ̖Nx%4{KYW( 9z21с A.) '"u\QE ˗';+1џrzh=tq$bd 䃣ԟa [QT*C̥F231*9fj+W^M>[<bܸ=lNcH\Q 풸ڃti 2vW=2o''[bˈ=K Bc]\IpT闅_)`2mVRtV^7O;Dמ)gu 9ba`IENt7IY~awQL T2"6MI >l܄7+A FAUG\9"Mpl(g*E(n\6ZZ:'"=I[LVwWhr􇯵k)7c[NXu OdY ҧD\W,Brw]֨vj_мiE>CCZa+<=|CbN8oNIgpz`u }|,@嬬)8/ ^x\.t9Z*BU/+YaCiiћL0X]h @ٶap` #/)mO.N^]C{Nq;O:O.M*1sᆑvd"jǪ: n8/kOܝ*F 2 S0߻;f(i2oegKt\2Dj%%w ɔwC@1O;M$%}疾^S=ѐ'OaO!{H:pHwՙ)LC.tBL,3~'JsͯMPvU FTHĬgǷ__P‡#9_hwj,KhRͷ!gnjep͔aԄp "xad4ta+`@r 0}/hln Db,p'=++KI/"HS|m5jP󦼘vG乂ʑ%92TPy^ N?C0t}cn4䨝J`\^Sn"= NUp;Urka2<`â4fAnldAe?y l}Z&`w^8Mik8 (b7 BxkLaŕ~'9d+jP˻]Ě{z:aF޵ oV53 ,)D'vLu{힘5kY`YdӷNz.Dd7ұm)9'dSJqd+E,*ʥk5 }H+ۖ́laݾ.ظekxGyi m˻ (o i';X 0O4KȤz @Gr> fһB/z ɷ 33Ҵ.lIYܶA4}olO/7 ;,+ԒR= # WD5l>I윟(GN^ek3@ѣU5 ȂD-\>K*]btqGe,Pw0U#c3`-š5#(i"VA-*1MrD8μY _K"7<`~va,(g_)k40Ӱw>oʲx2THrЪ2Cc3كN6=R/Rcxn&&ʡ}j#_83~Qj91 3:5V#qWnVv#TN\`~9!;z%9   7_zGmt G]0UY-ٶ?G("O$ߙ/Fշg#ˣs`b )mcck6¿mJ5TnSt#[' ph]Ò]:9ٸIq6{὾ //>| :iRgR-]eXB+g #7n5\+uɷf؍E:{QԬBBE$YoU8Ca%T߳O)7FKFJmUcI qSTn+uo^W`Na: ;&b> Eu6nuuz8-:@U[)')mnGZSYD7W7MnՎ!W45ǹd RڂoVym%/o3r;)1C:nڽBZO2׳;V͌38,gx!laӹ?G䬀ʞ h_F,0/ȑd+Su )&̢z! X1d|(q T PB`<"?/ڡSRyTȪL/ H4c)Qxz. ڱ:Lo%-22Dw):P65>3zu:h~}Spkb SJd[vRQ~rV+E}ኧB&zev. 0)"m3 /[Ⱥu|C˙ZEj\ZlfTV-'ÑF,.|8&MPKy~k2"x= 퇹*qTxK}eEXĺ/۹uD4@i([&j <[W7s1{oRM>W f5 }zuxy6844@>~/_mu#+mL9vIoENJ=ͰzºJ,mc6{t;/Gx @Ծ9OOR.>z>maz`De/6ڃc@g< '=цJ rL:\\xe52G Ie +*7҅Mǒ 12,5Q=paZ1l_a3*Zsw\q볏] 2ɭ# ܸp>"u!_a=7Ш/k]/>^ÑCX .ܱԹ1d@vJdrJy.,.:sf^)q9KԼ4Pb]KJG'] :l_@f6aX,Y+LbuvADFQ0QRX Bp`͔X4Sy@駑!X(=gߒ@Lʗ__RƒaL$@tVK0%/}E2Bg0,rjvaGaP4bPKA1)ZXWc0yNF:Fe]a9>ƃ`6;lػ8zfYg}m\k)\ B3}v{*Cax*@Yܰ>fT 5h^T<ڛZx1´ipɊ1SZNNR8.es/K<%zxo,)S\YO[qnjœ\*@a158$|F-xJsQ^I^&FI}FLG>@M$!t$U8[3^4j{1 q{JŷܮtQ_kPw8ܭTIа6a ٤-AoY_]ܼbDG7s0՞9{,8,E<>|ᖧ|aFKA?0BO,5,1C=&@0)I@*ʍ}RCBZNiB^_F[%,uV27 µ шM `ԉPL.<|#_]*?Ye2'X)far+_VU2)$7&0L?Gש*DYn$)tEd+B_:A &|~`T Qx5`oUӽ8!5SI>y,_ǰO7U:_CBR52RõYoa9E; B 3Us2v/lMhԧh<| دreP*Ba%0nX*Bv7sʆ0t௶xۖ堜L9+CAT\VkvGz֘3SHvMb3V~3-A¡yͶ ,?=' "i4r.?/呛4k/juǩoo 6CaA@LVPU(?[迶߾d&Sa\UIhLrr3^ΤZREx~Gñᬅȷ}*ЫFřF4S_rXoy p^+ AáN8Rfu7-ɗ)!QL~vY#&Yt2:BA:\ DP͗"UAʘ ;tz̘M^6e_z.D~\prk=%|<&Q~1ZR)WVZ~ eꆞ'.ot>PgD5Je薺[թ,bFSLj[zH5$R}.Bs)ECvm|軧R"?_2y$⍻odܦ'Z-Py*CXG!/>I~'Lo6s&Tn(ʳ]`drb<{0]BZa<P<sX2gg-[G7Jme ?B35B:X/y E;\1_X6aC:?5ȵh KRS۲No¢}\! L!*#Fu}SyeS+ jk{+gmR^OCg #UZyHU]$04jKpn&MɛgkmLUI#RFHMn >kRt-%75PCu|qj<hmc')qqY:m5LoK80@VfyE@$)ʂ*U$SB*oa?^eB[s}ʕ$957K9J&K26͡:ӈr\A>١q1](}B\I䥺0c߲<݅L6 N1a|6.4X~e:a,>U40sgs{`]s5fzAU (|`U\rY8+;gnIJ_F$?a]HCd|܁5EȀAӴ~gh=,#wu$>O~QMxʱ;0r9o+si,IR'U}qB>-ѣH¢>7~X7Ht#񙩋?A| d9- -[t[Bm}ͅ;>>/X!!LqdbK400)#7څ6ЇG(˗̠GQѫ^ս%Cs!98[TݤBsA"<&+xJHT'He9|JM\A3Ua %O>T+0T}Q4FZI0ڙzFg/fUܬÍF<XKʓ .R` -9f*r5ho`u̝/ &E%\D<$=יWxj_1`ܮfvSkj`.$<ZÍыC7W\:F<ґEHG]}@3snFsL:Tqh!FՒ)_1 B0>?QF*aiKx=}Dp~JvƩRB[vh~G`YBOJ:Sx=>U``*K)T9{`juTҜ-:#8_n K$V=T (x'DuxIXbA/އ x>yU'n6Y6'XT5VPN]ubw`a:@]Jm`0*Sy0z4~}>OV9;ytk+SZN֕QwωSepk04;jZ{X-A<6r5%STXWtRr}{fde.Q N&ceĖf 0 7.h*}1~)C+jT!t಄rSYLi]vxjiԛEjw<-PLuMX= 99SnqKRD˱kfbW?ssYAst'k䡮\]LJkSaIО ^/\I}W\DIAN}pvoqsUH>y`Za7O7UFir\M%sf9/تCDK/y) ysHxrQ3/ek^/  3hIH}K)Ės6o?D=*??V?*B_?K6Նg?I}dRH0{ϯ*o:Vī7hoEF'r:TUx҃x6ÆJqtc{KcCR&37R;];/leJmݟZ#dmʜR,t%wSFoofo)C S?IAQ]e,gEvY/a _n< 04):Jˠl 2h(NND |'T}!{>i4GA/'09 4l+~xb5phҴzM:N[r5#8SGysb琼t4)CEfԏe%G𛜛ݻZpÝ%;`r2N#R%7)rXr <) pdF]stL_2ӯ!7.{bͪcQ\)v,dp?U{#>I;,Z.=cfN~zg__tn?~=MT#\7D !U`؛ a4Vz?| SA_0dN}U !iFK5]íG*nBxvXfBc:ׁ`>+p}ϒf#J+Rhq;={{ p"~<)wO]gVHxa#ܢ·abq^6LH9q蝶ҽX -Ԅ27,Ʃh?U#0tc.bB>S7h\'؀uK'"p,`b$rb!>0$H[J'Ew3Ox29[G SS9j8T("!) HpI d<3 娅ϕzZrOaߒψJQ vF"F2A[0›JR ąk4l?Z\u?.b@5g3^ aM` ʵ cT,iiqkL9y| 翷U>B1r%:,- ^ɵpی_H^[d;7)Zv\zI~Aʨ[OָƇԊjFr,¸+QPf2RknX]=hOXp1\i+Akmņ OՃbW ",$Tz#y$J}C1Al/m'QۍBzNX_yԬ! T2nY11I~S'i-fYs>11NBJ c>"!b(;FnoH ~j'BVV!!窓إm0aN2(,Ɏc`Oc x`FnIuT":hdFN3Yivywb5X4ԁH 8ϘdW֪ƞQumY!/x;NJaoxXզR$HqH@I9B.^k'2 _Z5Qܳ. |z X(ٴɓ !6CkH?>){V54gzI/i3 >1w&A0QrM::K3Yrm5.ACV^ ?[nPC~pLkDuG:!07Ħ0@BGhg[#Rup$!O-u ,clQ4] Ȓ-d;07~Y;%T\OYQTXY# #V/"K%H=z:4s73xjUMBMx-TйS|?8oQ\L/[~/I G+!Qߐ@4 L==tԇK|rdoErB+2w 8 6尡V0r4J9qhp'pzO$S"l+ Uԇo%;00lN?t[VTD˟kG)%G .|G%1n0^*՟YH g=%\r5PؓCP(/!}^CXؔ+e XƟU8?wrެIHl}+@z*8G"c Rs_h ^eq|D*Vj%uTT)ǒ3UGkZgIcN9ӧ J&l?qpqXdLZܬ\\V}G:(v7^]=Pԑn_p:.'%$mO QxkIPKfeW =,/ 6P(?̙ܲ2qBE!B4I){;TACY 0(˗ Z(qVJQ]r~.sغ"3z6yL9lZ]2Yk5mCsS61o)"|x}t6:[ $MdNÛ@C)eIt5OсxM\I1='TԷwti-fg5,(I9z ^y3pPv{Iƒ,Aqctya;U^WӻyǨpkK%- snW6ѭBZy1tD{-@itM` KRԎ}: i?48e&% f\+'IEq S=(',ޢ[7[;9g7[P`MTTm'StB3:S+Pgi <>=VÜ{Q'Dď!L i%knہn몫.v. ʨv`a\Bٽg47M7]sRpAt&}\*u]FGB e#FKhy"['MY-6P^l$ꄆ3M2k=D/ dъAj!t"^|vxC]>R+9P&,B$˯~eϤp36w{(~p2+ЧB5l0w&{e5`.u8|=DžLϱMj/6,TIQXK-!iH-]%Z>5[t=wKS4q( RջIMm46B܃=hd`Ԑs?L3WW8UI<9#v59 >ۯ, OsRάYyk01[a -jZzN%WZ0SK :XҥEjQ,q%Q;J8of}p*|>O/GdZG z5mJW̨g zvߣ8;COK-2dE\uTEEr,%ҪrK[j_:2<߼;^T&DPen cZ-O:"jޥ,~!@8ādiq 5()_@'L[׆1>;:͟?-!`_FZtEOƟUA-aZ`gz>TsD֗U*.8a3ݽ]BQW>ʕTZi!xI`=3C_fjD"~Z}(|6C%*S)EuT(V!,Hp4 ]SQfCr-1Z_&.)A7~i@-Ġz1na%Sm}|+iֵKWl2gp 6:TMW}"{v7 uҨ&5 y_eY=~&Aq.d;.:,=,2\$;a Z\T!ij.5"UjBA0@0(EH:WݶMP) F7V&V>rt(v[1N @oZI 7šc `*_ȍGZ]0A,ބ|z @9:8v|G6EPw$*BDW X,'3B/-!P9U\*7RX*'4Qiꯍ)1P aLi ǯc0~6 H3z.k!𐨒4ET=!|;薋{] 9s=hI0n%ԽaX rg2l0>gr[b4m`ֳ~N'S,%SXw<,"dj;uMH $rf;7™  f|rMW~,Jn22JYuׅ[0& ^k Np'HG5rmqhڳ?BC#KGT @q+Ⱥm$j {pEE~tP @f<x4wU1BÄX Mfx _Kۛ /Lz~ZN%N *{4ȶH-bWLD7copN^m1H9ŸM]݇M6؇CBn:?x|* ILB3DmUy7 @7h:~L$I_C,,R\{,7w,5\?,($#5 Rtx\@>A]Yy⣎JC%>}ر( .m//RW3.Fp G-5"C6:gB6 <2{uD9ׅ94_H8UWGoTZN|hw>0Aц}Sq~$a wBC6+B|paN, H&B(dgG4QIIAʲh'| Vv ր=O_땸aKؤ)cVmk2NG+Na#{>q| 0l<RS'v;gWJ̛w!Gj%Duzw HAB~@S2&WxvlEs,g`/xmMğcbqk`ϕ]d U3cXzjϧDLȩ*Ce2()("8yRJϮӖ0(jp9@Yyc;SœN'ฝpjȡر2ÿrKP4Agtn܏W3p~25§ $:AS:6</an0ۇ\4 dRE7~ mUzثo^>K-Q=_ h@~"T ǥxV -Mw}sd$ 6n*|ըbi7'6\BJ4&vtb7!8W xmjt- ?/ߓ$#$4 B9;*yDeysiǏﶾ!$|Pz.59F{nSMF+#|Q^Y2VSRIMmkae!7{;[ua4lR<a C*u7CN,V?-}},gEfA/~)!QF;mhM1P|@\1ﱣyv} iGI2RYU@oL.L!MzP m8 L239*jbzRh Ӻ$fܧkvBap,G^*@ 3x/[,:gq)Y!SCg\T0BAMڻ^T2F5Z~쿋U $Xtt%[ :6BmC1&_p=85Ғt "ya>0/9RS>!H8jm):|޹!nK]<>[s}Qa2dl˃2:䈅޵VvB5c\.*f-Eo#+Cg'hA7b^H5 ^`ݣQ0owYzK-LFM'@ϔƠ%z+Q#ſoTl?(`: 3},=F>s;ʿۙN 뵰j<4gD!NΩ ;8 ;(LdDC6kJ0MQ8leȐ@+2/<wL O=hO&g[,ݦ7.&QT75Gn*"[(cI=o1Ia-EpeyTMNo$W RLض\^pHFigҧxN[=NΊoWKkﴟܥNjanF^+O[@ns~ E ` ;z.U!_E(A (}/J^dԅ0䋩bb/{yy'I "}۾ߺZ2wCRTЖ1R8rRuQbհµFG(ss=LmVba܋0 Q^+dcwֻ7͏d/EE6S1=޾iάޫ`2!ZpJޫmAm WYq9I*o(6 38 8ii@% 95sM{WV{{G,IoqhVd1~-jX =d%'cU室.򱂍ɫ%oHN0#qe'N- "Nl_à ⋉38%mpjuSj( J2eV;UK9^T7O?wݰ] +AF]vW@\P˺լ=(gD. c-J]hJiLTuxԨY<林ȘgsrAkzJoU%mjJYo [%~NW&$ሥE W* FG&;V]̩Y=n7{ ;*z:9* V I>o78BFw`8$KZbUb8tĹdX)ة9 b7r/m{ IIcLR`f&V H-NNBpp۰6ZRȯn~6[8̵l^t聕It )/V!z8h!b^zrtfya%&%&McN!zd5&=)Jٔ,M{gJ`s#XWZ;c7}5#[jRYgW7>,6f'Acyc 15%ǗCa`ɘϹ;)2CK8iƲwXX'i?-݇3d/!:\$t6\ .#-\Rfդ (l da>v(yW|m`y2>+'šGxC k KM0+L]_CjƼl̻ÛDjk'?^O @!A9uͼ1 zb4\4w&7cQq9Z>EK"?2uBٝ3e(݊P\%xٴ p6oȬطȐ麤d9 6GFlX"& nG_!HK4$e:Gf};J-Zh\<S l0 G{z61ʔMe8Qtcr<|fPLj~I(geXaQB:q tm T'~PAY(T,Jj(mN:d'ywƿȔN=\o}sRH(s%Wؽ+hYUo!(t-c&PPK\ e@ۗjQ[ceqkKqg;AlHMɁ=X{ =*N#G8.UT]h|*AZr5ǩP_Fu4yTNg֨A&vVix˱J|h7{U0cta4%zY'OV!ҕewlX'g~k͙@&C\^2|c Eޑ`Z{&y ꔛU+cA⭷76o5S8=eepWðo|FQ_ Q_WoI1 0L^|Vv?(Y%ue`EBVJ.Bj1XNAzsuQJ4R+1KЎӣ#e3nQ2eXkvJv37*wR7l\k*QEs~L{w8{ 8/H:GIOHXȽ?U D&6XYKkT'M<|8R"p\~o+2{Gw2v sKB\@pC5ױQǢ^c(,$'0pxSu+ȏ}p!UiwhM;O Wo%(,n%2-b5KI-VpCke7ޛ"돗&Ն1,ɢ0F_zpD9Vx}+d|,Bd$m N 0othEzD^ə^:nk]m ZxæBd&2Kc;A,fkkmNC>|>,Ǐpw+/qC}U2}I:wVC^vB~uqeC\xGO&qBC!q#v}ro!k7-e /QBQ{ D3x]+ _우pX^BZ)1,yr3ʩ#,ݧqC<`V#aŨ 0 &Q>&K AGk) GV&eH4#k}Rrә۳+h1?7Lc?Wl]ap"~/WHx%+0==w4?b?t?Ӄ,4tχ>g@Xb+:<4b./k<yB{ QXUzdȿrD8MhEVm4n{9: /ٮ[¶Kq j#Fh=T43$ɷ a}ë "J{[ͅ*"X=/Krer5~SBwD7}mw5Řu6p2BJxC2K6L7>|/wK_AʩK[Az7wE,~My!:Hq7*1).'}WBMrC~+ c#-uh =e}3k97ƺov#|S@>.ՉNhHQ7b2KyڅFo8xm[Yznj{esc1]u${24ڿ)?|qtQ|YkGAjL-)Bbjm C'%ɻ@ϒ$#\TY%4oT]\XbHØ&^u8+U7!plGi(9\f~OBmF1z? [MJf,,Uq!L._pӟxLț~=!{mW\(#?2J(}|7i^]H+.P߁]7]D]xmxRK"3|]Br[FapMpZӡ ^*ABQ ٦۾`\>]>Zh.7Ic;;x[%_5l3/]yW:[J?g}VY4^ ǣs Yo t#JTiwGӣVUL0&Lyt&wU!JuE:7ԲPp ǻ@6Xn 6B?sFMa2"; Nγo]X_AL{ƶo*B> Nb |u f~ $^Xnr̆)ۧR%fE9=+hFwuz6P'5OAHS^ }ǢuBLQ}Y?¹%3\ͥ>S=0`*XV_,pH튏_6clI9gs:tKTUC;9|&iӍ՗ S _?]́|Y#G3Qw(PVWAͫ"> "5C"=,Q,/}:ߨ8?|:7r:?0gЀ87VNo]\@);>"!.[KFIٹinh둇H"{@LbqPNL*Y*q;p7|њ%UڮS;>$P}= g4;F9W\xt{^4[.<p^"8f Q]¿ WQaHDR<?yIm 1/ifɶ.{s/P@XaL{}䀐p>AzG}D2z;gU_<pin cȚ<+,g(@m-R;% ѯweK@ mY}]f&sh/q = WoD1)K7[' ;8՘@?xo߾IHIFuuo=O WF'!+j&v=Q^GKx{K$~](ߕ{eX~4l?=trU|DG^k;/?Y,9|F8sJ=C]eښqZR 4ݕ . T #"ZuE r(CMCAߍX5w~44Ή;7am||?}A텰pzj ;俶v-o<9x?̠}>]a"s1Qͯe!}o =;Ge2_Bѷ^tdn[+3 Bځ9K o^UIKbexW %ô\ѐ/.#IW wJݗ+ݡ'0KV(g`AOVߒ:XLŖɹ8D ?M~D""TXS[>tj{KzU*dC(Qq1~0K%QbR7?>c;ʍ@1~?T"_,+A*A+M|{z`; 8["3?P7<,[fҋz,Dn2/`Jl% +K#SGsNJDF\>WLcDN^ Dڬ-S;ꀯ$U壁̈́%O;[A= 9?YTY7yW;O3vׄg6_>'-^i%tӝ*1m 8f dfl(PȘOeN$Q]Ő`W D_>-sPyhvjYS ?Ԉߛtoh[vٹ'8 3<ĹFSz aC 2qy~$\U;bkcF£zEZ|:x;.2>E7hg=pOrhNIcxKVO &[LbDe Vh/~5Ҫpfx$SDxN!"f3mQ?h$7jPxUp,w嫡J-긚⳯oRFeq0j7,ҧυ_g_=/oX@ R z ]ZL&i(.J x|9!ߣ\&9_;>)mIna l|"I#;3H]*b^wsh6ƒZ+ϔFzD11HRoD+#6C߬8f ChD&p*A(p&NЎ"tBr`ZALj$l_KSFR/|cN#&F[c;'˦/Ưҷ;M|DPқt tiU 2*5 ρ{$o״=)[;)MCIvPfF&#";} IJ/(m6U(+ ϣ:`1×TvT"AGX12F#I BTdY)&W~ ʣ=Xۧ+_*tq;0kȴ#Q`ű[GզjRbXUl!F<ʁOR3_BV v]S][O`SQ0eGZγe܅-^{^H$+C%7bose_}P!@ECuf 2a'׷WEvmR2CЃHݝH9Ҳ$%%kR AfA@$^t?lu:׹Eɵ 2Ʋ0֚mxCU-Զ*: Jn3\៯ k{I@wS.C䚼@QZb֕/*'<iT0a g!@SFOmX7ooA^s7̍;Y$6S /DBΙ.jqiԻIW{FRp3&}z!=1}Ň De}Jssö#>\W\R𲢹K<$"Q~KM흵w@DnD:߬5쉷ݮU\~nt|ѫDzRflH3H)}~PɿǼ*: p),\mNk S Ԟ*tM^f`(* =򇻦`dp`>jm޲5LŞ\MT ۫:EMi7<[r»kg ؾwGPlJntfdILZ!?[&t/!@j^K]5I:{se4O>V J*+.﹓Vs^g|E]]o {_H_EJ]oVXK3ޙS#X7Pq1V6t]_w{$^h;N O2U?F~yQږQiԩ ]'~f5a9V"xUԛP\vxuѫwޜ;<:HVꋕj< S(#?ేsƄf&g-+C]x9'wDvy 1/[A1]uK]n@7?=OVym>_FR9?ເpU;:õlH5\=- q8G:1 RC<Yu Yw#3$&߬NzvPZ`B|~ vU!%]Wuu*L cU0tWo+&F.&aہQL-=Qkp7yb.^_y=HԷ< pwK:P6s)z{ʚ2뫌%7ve$Rt-6M..Lmv6u2zޢlrp3/>RK!Ysiᇆ`J<ل[ Jȵ[I 's?qO}@[e/AXD%V۷y ث iB9grW{CCl$ b?* rV%}J"))` YUf )M;epzDA r\W*d#!;C -Y7Ν"xc,"uW#^˵bT8;:NG) *k`XfbMsmk}Ml1) @ 2J[N9T_Oeb45idk,^7l KN9GWmctAxnFD6\,eU3s.3m"9Vo{ȉ $|Gf3HXS138ǧ6$`*vA|nOpRC*nr jmJ/ de-uc W.on*w;ۻ v,^s Ncը 0NJ,1E76S;>EEDˆN s\9LϺD-Q )ZK,"N |j{=zT1(M%>\urwfd-=+], ݙ2x [* Xzjq8 T}Gs u`\xGD Y(?=Dwy8 _eI%G{v5DnG<-w_1rȴ bvۥ*^g= t 7A=YӎԿb?`*kY,-M_FHԨ.<*EmհWE_RR 10nOjy\N H3ԓ4!6:^jI ~ lnMh4g= G 9bȼ;7I}N{g%2pB>Qho5+ K.vLQ+;xuL Vp z$Sl:+-=Si+PqXd}q\|zʧ{`tvm s5 }C;_c7nů6uTA""T@B } Uʘi6G*N=!5.phT 8𪉵nĉ)i٧e;9+ mYM킓> 4px.O}kC&W/ېw 2P5$y{7 IlI\dOrd{N=}3TK5p[`ǣw}Y>+ou advjgB$>hQ]qƁPA6ԩgb!qI>Ywz b׫sq 5alWR3C@\MZ?N60'-E=&3?)LM9#XR-XX~_1:\RiCFZmlΓiZK%X{&R4d})eӱ=L4kŶ%, ie7Т|ɭa۹$frf➗w:7Kt ®`|Ml.gF,Y4U% d_MWK1R%a1TDk.[Dq)c+tM$8@ BxNq[ɠ]Xrd[G ^aG"I|1Q*J9oZ;}cg1F'w?A0tI=- ]V<%҆*G_kE7.;xLr⃋wQMߖ(MҰ?/ D4Y,a Ne n1&p{j ҐQx:LR?סBp;T;@\,\q)ڲ܉%xǜQRJ2Gś[qw +0)Ž'VK-yJ|/5]7SSd͖K=b,uW+̐zL Ez<=h__ʸo(.BIDPW87;K[,g‡r_x&5h:yYj?A#5 6UYq%gҢ<Lкz2NlIOi%N"tL?g$SRJ;<&1+Vq97EU7 u# -?ǩ]I)4۩SFnW <y\\wjϓ>;ew22=CEѢ 0 Vr|kDa[G3{i'Ry2E|.[QX<:=T'S&wܲt oOI^[ڔ fXKCB\>lCH4a:F]o2~$OUW6 ?Yj3qĝhI'GG }y$__iϚ9pJXb]4rc[q\(r58.#DFֿY0"~@>$ҖWb?QҶAю땔p<|V ^\ֶ58k7YnCtGKñ\d\KOx7!}r;ߤv%:r!U]o7Fnэ랎٢/(RXZRc |p&4Kr3Pd6xc@Q''bF7R{$VQ ȓi^"՗n_BWg |ǎ:%­U[>OOה&`_VeC\DQ{1$fr!zԆts}EXK*dBn]3 Cz%CrZSEd/:ZLWO}($oҨ|%92^BN1ڵ9W.l 1MxRa~OX>P!?LdH8~.5s&^7;'N9v(I!TTYU1w.YavM}e9X_,;l4{PG. G֝Tz2KB-RAߊ>ҍG]S yM=\ݔ0.8O )KVo yik zy % .ҧi-$Ff!#$F7\ͽxgÔJ*xV ZHQrQ-P KՏ6 k'A8UG.ݛ~`CjЍT8~44_}(+(A:"3A]Fb@XRm(sHY8KthMh?j%/i={(DO%pLݽ,?Mȟe`m}uUdZ,y|PW",O2h6*$Y+[f`N4U),1JL{5hD3{`fU mF&,hϝeKbX.a+ؔȌ0AIg1YdȳtKMGD߆vDPǑhFn_2׶W^~PNM=m8PJiO$T&JR%-܆jLѥL1U: ]Ү͓ЀTBrT_>L¾&1+B >wDj#:߆#tU 揩KJI߉ib)0_Sr>dTuGJՃ}׋A䧅db\nϙgW.UK;`fo? 6%Mޑו*jOJ)8FINA?Zp)mh*#"^l,EMy;oBORmLH.E=71w:'y7T`REﯣIZ'!3 JIaMmn2a c)o—؉olқzh}yOi؛Em$,Veiɏ4"V#EÁkx jWШH|*8Z5tPmV½mrqVa\ree?4 t-;?4x:i?H[P*~x[%w&q|g7;R?*> 7vHkgt'-1=@ʸSn[30hExzXzɌHԥFҭwRrh8Ꮕfr!T~]i)m5O F2XQ]GahҽӼ>^z R%06{iKgV6.,.ЌAlzX^٪EaRμ9tFv=7.e<S}vaw|Uی PDnC~l,g /)*~䤱 "uHb6hVueTϩ/dمuaŃNLqbYu1RwJ3 Z?̱lNj7і}ȏHKrG5ERW.8@?Js Љvɛ0)~ Vb]+CxrOK= .6E'% 8A8FļI,OWKCb!,ͿԘaxY엡 U-u.}pIAm7ž}uE4 3e_܋?l~7 {TB*%f>Q%~:mH]hy.է^jPKM_.Kword/media/image3.png_\M57,wi\<{pwwwww7kgfpڵk yY1EB"'7oVQLP>Np$|q֪҆|ޖ GQ4ľ'Wɭ Kj>Dkx,çpcƆo|b, h'D#/f~..Nnmшn4v/vjx&t7$iMF脋Ί89Vq/V&iXbL#psXcᔜ1ĘaZG#N_Pイ/_QLi^8?9nXϟ¶ߔY}q~"vSb_i0˖t;:;_Ne=.B:Jb<.c0^^6fg !O3uOo\񽘧WFqi7f0pxNr{.}ItNa7FK~LC\Y[Q b:no-Qoc>Wp:Cx2ԱU3w@t]$ex7̮"#}V-9,q޵~Xp1`d/g1Lkf}Swg41x<|oV;Oݸvilpʤb8YPp7wz (ZmuᘵlaodAXn5v7\<]707{_̕y29#iA Bͱ/mya@Es<1r\cA3\ K+} 5ׅ Twk4EqZZ/|.GcBeO:\yrnomZ֟s2*}]c)g?L|c7|p m4nߠR.>[@opYwز9 ,a2oؖr 8[pppLgIlķg{3t" x+X0snX#bYAo$/-&/ΣN]s>!ڼZk~D! uwW}5>㣨|I$ކX^Pgz@VxbJa;Ue;}۾9SV\}u^xf`׃coG|+zy7* ࢿ/=.q_bĘ M`8n2퇜u3x͓:g*P79,pTԲsɎA+_F~94 -uuŪz)=F pl64hQLHͿ]:j\26{Of6OkvɣŐ vJ8P4nP\jYK 9؃WCA2q9y|ʿYw|Ch8% wwc.ίHb:nጔ*+r5=#R1ꉥ!)V?Zc(xq?==IPp 7I{vKmetL€ﶎ} Di%ׅ#x2此u{C 7mk;kse\CiIp5-17MR'.O:yC焕jw;dCcC<wïgM-Cr ]W0vX C݌@JZj; ҭh)Ho:hJ ¡6+ rU*#g;M2绥C<&[#1;ZK;s_;dWŞ{HKڗ*y& y?E;UixM~Ժ30sY8}ZЩl?vV =6 \<65H`Ny/WkǸRގDd=x띵z?q&,1pP.s~X&tS.2%l5[27e=v^}g5NO6X~ZgOΎ*?cq?ZtOz{Pf[;͗N0/'Sa=8h{CKn=(z\HpY/TSY6a#{8}Vn&+hKK8!l %#KfE|\~'Ek?+/ߴeY+"r W=FïSfGKۏ8?q<ŇP^hEڮOs+!&\Z-vCYb0+-חdZ 5~G%)C>r(. k(}&_m5-н62X7U7H8bZd-3s\ǥ] FmzG~&=v@Ln?UV.hΤnLLH X7ޏ, ^JMjy„/]T?.465qAmoG4vr~Hsv\m-7nӒ6SיSNؔ1Zza"f,#L6k wޟoihHS`Ӂ'%8 !H.pr_}E  P pObpoqKY>1IϴNtNDzk!iE7V&krMu)gUc-?իMdR $I[5$7_l|UIk<8]b (.cHC){s%?/SA~FmƵDjpC4RK0K'n{)uF:)D-yG`Hn/ĝ 6ұ3HZdHgih#/~^H&U?XwF;g߃`XnlG= kby^ƪH#J>[ TQiAXCHX,7)}\uM=8S5ʎS~='ßKJ ˥ 8 !)ҩ.L/xh7v8i??.Ѻb`/R3%q3=,RߜBO9e=+\aYxXsQ'ذn&2HNբr<[5e}Eun,~i婽=0ېgfi'  \;@ Mݏ w*KrzjpVK] bSFOr%GΛ#8?Ň?)ѕ㷑HB>{j7e<2)%V8W/ [r{d7h*ԓxCuOzYإ XMSs~~\T݉m ۽kUQ['Xx?Y}rMg崄wo-\Y.1W %qQf`j0B/E7K /~|=ڟA X|$7Ъjh=nk >.- hz/x  B D89Ex&j÷O@| ev~)ŷ&ԫ)iYwI ʐ 3NpiE8غZW Lw||5]|\VG"h%Ų&RU%*\i hAWid6Hy; wh_2M7r}9ڡ- ̧]g\w:s>bd)ټXIo0nOd5>lL61q)K7|ɏLOS pnW[4}C+\y  %7䫭%{`lq\DAcQtJuʒ2UNby)a_F@"AHp7Sܙ)7u\B Po 7_˒E}VL', A=wרWX#| Qp ]R58O^-]?m2(&H=ޡ3; )^Te.b~k4Hrɡf Nqc+ΈE0}F{`He\q9 tW&B*l+{l`;7{L\@B% % 5#l K^u#rro g!?t#j -E(s12t}@z_rHFS";IT'&oLxB.E:Ad2]B2aޟO] 0oARk%uu?YQ-nAMm 4|1zݯ_? ?\Tル;< Tf9LQ@(v2>Q[hM7*1s]j,EJ5f%F5mBuZNU[Ox>]̮f`Y􃠇FHҹ+3[d?@yt4iN"ĉ6WA}Mb>+Hy}@ u6z`2H0.{ri@[BPLkl!DG1.zI)C6Y0_Fb͖*,f8'TZ_cg1]f\m.?G;M;xtTSǚ{R#6ܘg]qns*,[hwﱴ[:@Ճ aGWӐ+M] P\#4V< XP?񲅾yY!g6oXiVKq+n˹a#&B7^ISpoB ͓ 8 -3 8ѦӤ%=dzM?ô{iGDSK(AwhrpP~BZXt{@&m PӨQߏӻEuvDFaqݣM^_s B$˽Y|Roi5o#{>sM&;J`}BU@=\ NpP?Uc*S\W(OFeKw25 SnueOM^ }&u嵒;$ }KEl=%N}+8hH":Έ#..c*/ o{7R"1x{ Z=d{a"G1IU"]_B#وi=tw"]ȈkGt$CW_?x?;>٫Ҏ)75 'a;x7PS!'qlbwʖrRYo^j-cf¹*~zR=npʻyA O<_s Q͛hs<*faJ(-dcN6-zw!Eit$32Fm ]Jmo`ia5OWK){ hG_C8Q]IMoIpEjUbltO‡¶N/,gM"m4Ado#ȹ:Ry oc|cE)0H u2??6impJw : 㳯ijjLөE٣_}v7En?iOC8(ovG ./cq$UEq" ZHJ{d:4+\ІKDZ`'!8ڝ?v?*IymO8C'ccp`~Y_)Oym?cSy9YImģ;N0Jey8':Ƅͱkt%H- ī.}$yKco8t3uYr냬]h5 I֑lAd H8fIԅk:tN{/ŰouApUBnY!M49-LҘU;xCy Q]z?H]G&dc/k/JZoANY '}Iq- >֟扲xC2SM=|=$Dzo-sR^]&bqn}Ӻ\R/k ؾkwr^1Z^$Qv)@0GjW VX[t)+C4:p4ݞ$|NHȈ ~mI &ܹJ߽G >ΊQ Kg {q*_n\' ~{?#fu>n+dxwmCN–xW` +EC!tvBn*~23B~{Jpkz~: roq܀}ց|vJtf$kSj5g?KC߅]s@euqXn&DَTWK`eGwa|(˱m*X'tnϛ'PxN_g{; 9jpN(1/b $i'4:PWT2m`j{hWH&ў͕CGL <%2c!iPߡżk)r͕*+^]2d# "@1QLg ќNIL2 Νx :ϒIBSpT׾"j-ou+ Fw;ʥ*WOuZ8 \9ե%/Z vEW2' Y$qn.CUH,9?"OfkqK㮃2 nS5^AG3By;p FZn)d`L6 w4؉cv)~Dn^5ޕY^472R&],nVG-Zt~ph"ҪQQNҸZs IDvU3#gӰFsұ_z(S4i@-5*2v@_+61W/p}}ƽC/oF'H/ drʳ吳ȅ}R56 L^$dLoȺ6#?Q-Ht~O]W(2!gk (1|s\C2FYy]Z'5JN ?ה]V0`)R@]wɨhWD)5ګy!2U˶ ;QK GЯG&/ , TK8S(6wXRXuC$H%v-#]Jq+!ZnlaCXw :wGr@ykοّu徖 !8g^!Pv`@ oՀdiQ ^ d99s}@g M*3Q ϣH*#O* *2x "841'4/?o}F+X.q( vrrkOVY]tukB8T2&oC? =/v<"Q1|Ġ5 !‘W/Dp$K͌ᗠ4aqlfn0@"AcjW./E1 -~4ԇj ;'$-ŚjxR vc_w19f*DM j\#],;'ZS}%U{bCP$@$VZK̮t{mт}x`(ĩpz^p7.XXQ)B w8sl=7VP+# o3~;O>]Xbhۣ[-!;,H(tK~Zu7Z'T6y]').EH'!/üöA?gD! VYn3]b?~ņo]{%+,Kmɼw?%o]W?>A`xhdwg"Hшfr?f)m(3`5G9;Vjz"}9;]d-ԯI =~Ocv%{P fn45Bt&~LHirR ;WRf@;lMGrDP_ki5{~z?*w\A3XYV%9t2nre)nxRx-eѭ kV/@8lBjA~"YHAMB!eœ͢{⎅%? HN:4@ÑwƤ5K-Mo~z,r$<: a0<\[;m/0J*V'±8˦X-3 ;_*0WrSCQϊ!;}fCFT4q&x_KK*;|r\ȠźP Nŀ= 9~xiTkkxZ<bMiN4#L`0BSTϕQR4,`m47]KW3uFF6,|(8P5ů5id&eV'EBNL+ͣx=X"=GoزQ{JL8OI/; 0&n!WEr?RMdJuj:( cDaI'4/R£`UqtwLc>a۳دhuἽObr#)|b[B\duGsxj B~_$Pd-^lŝTAQ<ݴ^FgEC'zL{7RtKE@4éIq"Bm2\497*1Tu"+BΔ8fĜI 7Z#BQc {UU}^Ŭq Ioގ!BH5"_acKF glY,p+l扠&  Rje&;QqR V'Rr'[ |M<?VHe{fp6/ ݴh{nbꄄ^Run+O -HǗy?k21ҵMf 0X 7(7m.-a,ƛD#~cގiwpJ; O:>qHȿa}Xn Jqml)wi\lj/&[8ՌRΎ0f,vGD!qG0]5ψÉKɋZ/0_j֌DfL_I"hX# ȠmU?$Bo x@>w= Mm"$\偯T>MMIaU8}D4ޅ HՐzq\~"|y.4"ľ$;WZ"# &dK@*5?UsO #q2!Ez!='W, oniy_ãx4h[[N`#rk~-V^K $]WYBy"rߕeinMǠS_+ErjJeg** [QP+W-KEg'Q8!^olֆ.Ĩ2'kR54ou=`RҜWRqǗ=æ!\^u "/f ѠHzg,BEi8HapjO,F#^L_uAS⎐rp/b!bv WM? 0Hv~<l-׵-T]웭DTsVM*Ɍ[DyVQ""NMne.D: LmJ]-< cT4 _3$s|T iyľjd_JNwam%6YɇI`BTyKf:`s,3F9WnZr:"6tM *U1"SoԶI֨NvpUiʧrLTh)grοiic4̳2v[O'ї*aMO#Ǯ#~+9'v?/ARQԵH6;0^r[^jd{uaq=q~ḿIreyx e5Dz(񣪽ֱI- hexVFug5P%jBzlcNTe#Z`j%ē_x~@O!s.7G;^P0ϏE]saJ*wcz:Q(9)'W"$yuvدI8WPkg$bZBXF[Rͣ_\n)̛n~ro=`s{qسAYa|^奺Kl瘼h۞F-^$U5hS=+l|ɮ27F~H+l$>,1%sU4 ܲP8Ehmp]@\ZZK~py58"t =K'сƶ#L_>_ _ qu62[oy(m2oeeŭ ԩ]VT##_<[ ]tel?j$,hS X;*D {(f8XlV |b6ήw Yvjm`,Asb]JPS]D}ۗF&("{9$ONsgQjߣKχl;+|Y?R$*` ._)ܦ|K __ky`Tq3ȁ[vy4SV쩥dnQZ"/Ԥ4#yfuܧ}'llկPT ̙F+t|m=% -|d̊-R3, mx2Sqfg-zwmZ nNfD ZR Ps`qu&}W#qG|𱸍y֚|c⼆B+Bnd&Prt 8 %=UBl`#'}@;V!ܓ&{OIdX0ֽqk?AװzUR61*[MnsH51[0}ĨK5wZ5ܶ9zl}"Y (HmP0ZICd-hF ؖpBq^u:3{{x]x3?0*ң6wi?!|P׆ +mT.+u,+`S\l7c(ڠ*կ~Hb1?bzbX 8dg?[8j!hS;MDJMģ 0Em6V]68,OVpR|- ;^mUb|^ CGE">2x=}יY)f=Wdh{˩ |>ێnDRc z>)DXH*RQя?{4kPvaC|BOpCWpEIJe/]T koBN_O: T9O}ӕf yRѦ-7 p{;1q@NlAS#{cQZg}BKj7{J}=ZH5;zV/G察J1#l8Jb~D8b/X;)z̈́,es!A6,\ xYCIhhnP>~DRRC4Đ@2-Ptu7gMv Zeĭ2֓~yHjk'$;P T.<嚚ވcmi!BA{±F.hؽ߷-nJ\[!M̛gs[Y y6l!ۡ@lݒ-.L`.>_ّ#0* `\t뻾cFE-3dy|V—i5H.rdgXECP#"Ȉ'A_C >b}?ۯz|ٻHj[,!A"xEү'as/:ۘ<<9 M"+wV,"?7^c4iQG60$]cfpg8+ -/mf:đ5SlAt(/HroZlL8)QJ"al'.oB?Z' NdܨQB3;XN,V6^y?6O+/K"Hgc}џPXb86z{y9o;ԗz[Кg"RE[ݾOzA.EL*hcސn!҃4l5Rz) @YeL,㮇Pi:ne5G emb|5'HNn:?A܌J'7>tp2J{MЃf,eQ'[ZZKV$8;&d7c7hR1i_creN&7FLXwsi@bv!?V[[/菅ݞuRdULܷ<=ߺG{5o%>|$&< :?$Ğ[x!cVVn>Ρexg=Rۖ,^DS YXmqx2Ԏ0PahWx.фB.y%tPS`\"=uXdHrUGRtqC1M4> ꪔq>riL!am9Šqg^W!?.YS;*20 ,*rJw6xPi @27*jdg"нA%^eRIeo-/ 97ؤ g/ՏQ٭*(wnJFx8ߘ\'-IAS>ipIV^!M/⃌KSl7s;SanU`  ޺H9ƒF-ת&&e&vw[!y} tC~B dNvQ~j=C*ɐ0)LwCm4NPK3G.#CdR]#,ke"t$˗)E8-bk#peKŗL5HFV ]Ju04Mڤml|(U>6B@}evXz`udq8C[`z[/vGFE`Z]Yj?Ʉ`Dka^"~f}gɻ-a=%|[,ON9Jm%`2z9e(|3|x0]QUs5y=quVkD:;Bz+P-1 tOյ7#hg"̹~KIG8 11!l] 'u/P5i]$d4 mw1?aJ`=|%E~6B(OCF\p|0}/@? kK DZ3OoNb.R l|!m=q4 (uhd^ƕag}q ~aTmFf}3qfKC2LgdX=( ݺx9;fHtUa(~L9HBkwѿk%"~9oDs[|&}jx]@§ŵMqZ9qW\jvEH 0#[UF9 U|O G7oX6[X9SI}_#ǩ{YwwiKAWu<1֍?wP6b4xʭx ׍4 Hدu-L6q(Hܸ4-[:OR5~.eH6vAؽrQVF6u+ӽۤO[Rŝx+R)J]矅=dԃT{ c:&'9iVʊo 9ӨNpұLĺ9`ȉDe$8}ꡮ{1(8SER>Q/ څBnE1zwltwҬ1Z:Bczfx}CLתE7*AơܺQa|xEȖrc؃MF@^AE&n1Qjy|zh$1\v{Bizv<.QކS {޳0eA"KMb}@sa=?Ey>ْZbj>璒68 $e1u)'#w0|B`ŨrddUI.U9)exLKjv T&&fQU:úyo!ʩt;wɜ!oL j2+ǧvBx(v)r&- :BO7 .acTN <9Iq6A˪H'#U$¹ip$Tߕ$3tm!?u% B:");Jcڄs=!? @7ynu[nN8"p _ B Ԏ}ڹ\e')x9ý +䙷LX;{e#!V>Ӈw=HDNhla+ܱh;*`9#D/ҁOtЦ$n֒)Ù!ѓ>H9s.hZ;QqOkDGCȔDުg ^`# qvyԮ2)2؀E8J PU(#/{\zGxF9<`Jm,~<߯,?rI?|[Djbe3eᰏqm4ҫ -5 F4Wbi  {B:+PƉi]. ·셇_JGttO&%d4%4˗Iբf1+&)9R-^(BN n%NP+}kMJCXZāAq̟;Frc^SIE%+i'uU'x<~#Ю l, A 1 Y[[.b%k)݉88߬5rXyaJEURz.}>Gb_TE#˫$dyjH0D[=L%,}\*I*Z<-д:(OS!w!%rs4˰*Tq<4jN2EV& >bkRu_C/р:siSd搝F(*#TEc/r njkSB9kn4qrVMcт,TCEBGtñMpNYQ׭Xf>" laPi[Mr?|p(q%# kS} 7VM$R߃Ԧ('.U'dѺgnn.[B9YT7OTH׫{^*?c6Xuņ tmH(>6BajP8&1f`X6VO5|h5g5cta $*:Uw,m+1"y 1*Hټ@zsyigNBK Q i$qW%iIBzjް{9ʁ*M[eoM^B/d S2n1?$<].uNlN:NPSҩu׉-Ud?Te2^ - [\ͣ\^O蹤[y_T{=nWi8y_L= N7L@y蛵v6y -0Z500A.-Z2/ 4rzVƧ0dAb6gЉ,Xf&KVJ>(|5|9j=G]c8zJ簜 ?Gp5Ygq9t=NĮ+ynaʢ]g|~2-m*羟c٭ )cAYƖe~q˕ F7 co :]C W酣gYʛˠ0-EF )3  _l0 ۇg}Da;Fm"0i1)}g5Iym'|H`'^6i^`g֒BDWxBo ߪvZMdw\JrEt"BC/'50Qp_4R9G; 6mߵQv];%G$ŵ貮ZLo6*迴^{~rI gIvqP-Ѧ^5ﳾ-z?KZ3>TJ}ۦ]P54//b[=@¢](P)=z;H|_h(' ?՟r96}Y+m3;,E_'~u}mCt *gIb;;we@-)І{'.f~bE|fHI aT5eNXR 6И58J}O_ϵ'nSmܭ^;\\O_Vjn 5c9p:ø|/΀: ׺b$f|tb{⺇?qjsA}n.S0•G;"eao,2c׉r0זIYeA6{@{d-?/*zgkħíyKYS浰@SMYfc7>0+CW'-xLPFP+D ^xiPfATRn N0cAxW,7Ph91C9 c1Jb6p }|,ܲE|D=XQ s!%g_&9\,Bet` ?y{Տ/_vS%luf 7:ms3QK#N(q{ >icxAQV8>81 #VS>p.Gh<.ǝaj즌J$ AuAL\&*nA/1OmQ9ϋoVK`lDַ5)8Obwtqs@B܄u|- *$UH}OU$˴i ;oIhKg2/Tu_d!?U_=~Zy@3k|O,CHdϡ`S; Cgܲт6\02?3e97JyU^Ӧ,Uݙ x>pT%tpw}pEsPXYbxX2XS`!taG`}"FBV9$BY"nd*y^\:d^PϐʹC7wOϢeȎ)Q0vhg.,ק }>qz\¨dJ޴Rȑ98'`'Mw0,Mo 5 s@Ĺ 'g9Zs;! qIJB7o`H^m-'a8Fd:{bّ樁@ɇ~ >RRnJ@Du3M(LJ݇(N3<'3t͙lX=9CeG$ s]xeItleYc3xU毓sfk!J?Lg693 H4uj+@$35$ٝYY&) *?j>>xV/xH,grX1yr4 V ɹ׆( 5j[6„uhi*^jî]W=vI丗 m<>@Zl ~VljN WI!ן|GK9=5cêe-CoF}>H%mM9';7T3WN`P o}-3 1]Iz:^5CInS4U5"íN'{BcHc/Y I#Ơ\9:c!IpqkO0)4?={n;=LsʱeKخ%/];Buܒ֥^WViѩl^)lA~"Piպ/qŃE /k(`<Ioax7q(`k.]$L@i 1hPukObC}tk(f]㩺F B{Ȑ5 |WZmՉ$&,~Ӣ߃X r@ noη?Gݑi1 e~]%~$2r>y}('`oeR 3!ol=mùf8Nx1 ede˥G e-y;>FodТuJ9^*O hF+dإWTwـw-xQ(AY+H덌 i敔@]S1 B6޸*c_M$L#S*H[=H덪-"ZU2s5Ĩ%dKAS6rZgB_^iVȞRsrDov&:g*7X?"< `=dl.QЀ{?Mq{',By߱;nJޣavF158纁Y,\d@6Z,jui9iKאB4߇8F]7d{3+&fo>Qn3c~t i4kug!Q#L08w3|Mޞh.e <Gmh.[ci˭Y }cjΏ~ӃWJ팟qą9o@UNƎ|J+ J~Ao+7S1Pe7|k0{܅SJ 'n8wg-P.E9%%w՟fϺT:ic>@bw2ST:M=+̃"4F33u.cv~uw^=|{0 pUp޹=^ vu 1?ۯWt[{;=QβR?X}uɛ& %Ki K;=F[|r^qS05OǸ5Mw1%[ɨCeS/.`$n=ax$:rzٙWw.06eE_NEBaLe_23=U4 a fӒgDCCoUX}]~Ei`[v/j`{ꕯ۰2fK5ڹㅪfNd4:_ftkG |h"-@` $ibMV"@X ??H,۔M1@Jgi?:zN8x}@2UJO~C=TE3kV2Kt'X? L%i^^}&ȡ,Tqrߛ(0?At:T @Dw<`* ЅYTb_7gBeڝ0x뼙 `} źhLϑ6U憚 0ja0s7~0l~+ϨGJ/^YB yRBtcOx]-Z6VJeV{ '<1"YV С|ulr䄞!tU_5 *A4qY; `/P`MHldrds;;4V1[(s KPc[cp,k>"~7r!fSԯ,;ÝOAKVt6' F{6nG3j1+S 2A*"T(VF9Ã׍aFz8ngu"7#ԞN:SbxvP#le eb՞7OLS>Œ/|Y|w /Wn_ $PfEn Ǵ5B3x]_yaMc t~x~SA( ۴7D ֍r;]# T,Z~n~}T7(%orR|~=:O~LY- z-]gyeQJݐ4Y 2GV)DaQlR$aswpi ;M=L)O.T\udk<RBDYP)/haJH]B%/(J#a"];yғ:u^Q TdE;oY)?@ʓ~)̈wg1| NvD袨JM k0k UŁZ1Sr,#Oy2V Dqs|wLr xgMz6H3W Ȏ:72*c8^w qK ~%@=]uOJ<O~H0,Y|5IU\MCfw)B4ᰃqס=^D nω ;gt~'Ou 8:Qs`>Ǘ=D|T+qFw.ӜCQqG 4AZAMf,yPwj r%ɇ}q@#i:y\BL_婺J22Big( ,GES鍚Ƚ05s-}o^18F[Yq-x$.@ kk\wysh8$}ņ07%qsΐU'c"]C]A#셓[i!&.ȋ7ے{e~'gA%U(0o:r'ӗ|R!}_ެp~{q|שZu6\ۤYnQgʱBɮn]a\0"q% 1nnhB֠cޑ@.tL}|>6}J/ tNb: N! IGDVounH8R$Q&O\l('ܟ&yFo6Ӳ׋eJ3 FD֏4J RnKD7 澌@^mqFi'f 8]DLR4~D産u!Vt}x|<6[f>/Jlh[oA8CSK<'~3KsU͈ e n cQh;Fcβ8{Lw]SE%TY;rGn6QӠchwK>KSjUN1O(/aվ#/{=g6۳EarʥaseQrҵK_&SN^Cs!VS"m茼n LyXBGC&* c⡸" R)z֏h.K)8ؚe;AUn:d=}#VA=5'k%{(yvE1(n#Roi4۸W&bt~;dGF}OcyRu9$Iaʷml&1 4 ؤ5fJg 7xo0B4*7KN9SaO8t+NbޱZuB1$ ls8hl ѷn̍sr+FјCye~ַ] E2]^"MufU#Hkd떍jtf:W582ggPEg~#6*? #4.XIۆ{o h7qob7 o#=&dqf 7];id:_ i]1V @ٮP6~<谌jX%a 䎖s_kyػ p]?Yl]Lkss˟}Z#C_Wfh5L7eFT'팬J"%Nإ=f(CY@>OͥZE$ux7T UY; kUjIg<~O K?37ށߢBaZWkpZ]}>L?(d GLP{\ޣ]^0gdu;UGa c0" c)Pٜ3sjyϯT2l8M"9:_I!4w 0~,AȀ`twu$Mp31qX+Lt sfZM\ڡX-ogZې)^3[eF$A$Br5$"ZhÌIQ&J $Ab1DF/~}~{kg=k=[]ׅAkcĸ3kҖ&kB d|TFOTM1w}= p\ ,Vmi4uf=w(6(S_IjVK' oC E'5lUDEO0ǹ_x]sX;42RTP樞i#߈AB# 5k (HOo"Ჹr}'c0'2:FElfb4)k $; ~wQ? 4^7.-b (zx{eqї!w-te^5}ztiR}[Y,C+I} V$beEMnF?K#fbd]Z9aJ.ph>Z0inG6北s ˰k4 #K XZ2Wfhh~apAS%9jVʾ1Nӭe-LTjXA ˏ¸0\4%>)k.'pܧ9cSe\żz`|2)]ﯭuA?.h#ڨELw[ͩ˩(>|M|^ kU]/h7rK}5|+ I=~H~>o(ŵH*M;#@Һ,ۤ\t ռ{Qi@yl12Mgָ,UO==TculcM({I=JFV'_ pnbm:gŝV M94M͌.Բ%=BGASI:TByh[A7-!rr tP]H}T/Ƶ_FVn߽jC9# L" bJ^gť&ě=>ȡZKFrKͩ,Sj+b|qbb;2E>+,I'=|C۰%cLo:tLAˉ2RYu?P4x(6u+4=[K"6DND;9HAZ ۿӭX;v.EZgKwM툛3~(-R+HY-BB~N'D{(*屾Ē |JEOp=gұ8uy#kczPJ8#X#}Ю5.y1B[pœn΁n:;I2Xa{^Jr1V6^-uFU+9eT p->_9 [w7H_ؒt9*b;|P:zh3 r9Gۗlv3"iIʑnr7C ReҰ5ד@Vp3+]=_/kYۯrZ| 13 &ûH8EVL+|,HN%YUy;}R.]{ [^Hbv3~!q61ͼ0'cV%zhzsjJ|AX%"AW_'b1p;@N|(?,$[]> d&|`ݦS؁8sLsLL*=ȴ玎mgH S(瓏h/ރ ἅJ \X̆QP?규&sxm=_E\}9WvRCܷLo')'$lFIUƔk1EG*E˵*g [-;7ҊpN YLPj/}$@RF Foq֋ rfjq x uMk֊:\o?=IK%)1ႲiGGc^<77(]Vݯ!6_8?Ƃ["/D.`o jUZf~mvit$K x~qi| 5lg " I׫cUKU@Ey=ҐLZI3 }~OZ{ \DXZ{r*qG!0(?yF a k퀶Où3\#d=b=cYnڢOr!;\av|yp!{ЃE(Eo2mf4!*j8Bh齴WB4SOY8Lj5.D ٭Tl1աe_|!`~c9OB:шB&=.L{:&"e< 8+Qjb'WDQߖrT,x#5ݎ[JZpD&6KC ?| ټb.-"WϚ丽ʏ*yF7 z>cO*A4zhH8,ͨRF屿{T?|̥_vͼLl㲱 /oX3.Gх:hBO's @rFEȁN!GW$kspݟNmgr=Uܲ?k&7xF oھ4^fiO1gw.8Bب276kRWMj_(eCE1+çIJ{}by1r:Cs<cyFȄ,iYM^b 9ݑŐˬHSwNd#TDn?`jPt[HnLaf ַC1MSNB \Hxܿar1s;kScHB:]^vQ.ŝ,.HuV QuCW otKnך$J88  gl3_>5[Ni@?-gV(>Mi:EI$c9D4$c뭣킖EX>T@F|ҞC+pvZWC_4|~Y0cC^k`vh軲^xc߸-#)yx!=sĿRE/< ig2V928rd/"eּbsѤq{*{RͰHw|Q;}/F|\WzXRH/2Ra.9 So.ei)>=RGJfi$:Pu--\,֛' (1\mJKy-( 08IUיR] 0",ת}fdktf>Z4-$*кߒ2gД]hc]v٢·H~+ǹ>PVVK9M\=v׃qT OͰr棣lϩIJ&;]nf ( ܨǢ!-3%=$14h1q%Eu[]>o*y`Og7&뢠HnW КӠd0"g]˵Dihzobә8Hz\>Z$J(0I!OY<9}}.&6rWvMuM]SOb4*(jpbE߮`.u5)ePL&ۭur;-Yz1=rTd=4yK^x/4ASD,aѝX<=[9@Y]ODB3M $u &JZ,FuLqG&AaY!qEm=SRI)yCBٝ#)/ %uStkyו3' nٔ)A%cera_&U )ܫ덗yTn&.lm/|vcXqaɎfaKX);aA(_;S͐R0ۤvBWB/_8f:u& Fi\ȜoFi]8w] zh0=#ZpYvUb78ȦuK.PAT:BwteVTlqfx!7sIL}U[y@p:*z2:4po\fr 2\쓋kW0sJ~6F Lw*SRim$׼%}UVW2JPܝ<&QtpCC2(.U{;0\!sټ-rkWFoGk53 ; hf|a..]Rw h)#"N5Ζ|sV^C`.jjB]զ3rscgp<;fV^Wyj-[W'v 0y;uq7&Zn ׏q#|N84 rd>xoVHG:{j>v[aSZLvvsD'fbDcP1IxPƬTx![㣡k|^T}De+fsi=vGݲ3 2`gQ`iR)$|V- f􀸰S'19vwoй8̜4<2 ]5im,Тax5?'+  WԯQ5GP>G[Z o:)>7+]ko\2QA?c#*_U?+ER#݆lVae'Ff3{*em킉R_3(Q ާ^>yĀN'TnɜF +A]~,XD[>n*25X|K}"J~K2sҜhT1Z\d:ӡfMy)43UqoZa$A{O2ùᑯӢL}TGy\sv[u __M~Qs.p \3"};U/kH8 Z4`Ǣ`AxuB19gzsm>e3„ԝ56ĖSsA te[ EIM'K ,>wY&B8]M3>T/8(8C^_eJmY,%p#2 Y) LI =q8l{Mz͟XE;U=#ȇo׮y*ޢD40$pY.CyHcC=<:a%%pgS!iZOS`I>orTf82ݢ[Wz/ۏ/^tnہ)Txe@?siK[̌eۋiĞzrPXc{sr6TnI,hovZk˜8'5s &m ?l|ʃ[iԧ0̫lZplzZ( 幺>K"c>`6^R Nyj\HE꛰"?2`* zQ.i=OtukL:S-E14巛. O|eVVenZp54ibx8Xpc K]_oGѶޕ2W*|ceosݟprD>PKM_.KT@Gword/media/image4.pngt}eX\ۖm. -n%8; w_rνݧ&K6ƨ./+ IU p χ_~9) *'AW!ew O@zvWs|A(i9o`aR [dG)8R/#gĜ IxN@͞6g @ /~5kpjzbw1Tau#Kֶn08?Cw fhi:id7`eG8Qq:#`d+,$K5:@- ŅAꮔHhk灈_+_|}9H1xJ9ڨz+ZD}>K <̭zC6'Z6V}Zt{[~]IrceEY~t"s:E^0ުC*T[sR_ƺ^v]wL)f[?*V:H[O*y?:@LmeygȖgZ0ˡtXwN`dKY#==t0 6]bB䄘_Ӂ 0A䈶x 0|۩B/(? `~Mh0j,k`wpF:֪ WcJΖbοec%S _2[hXW5k1>A=[ʡS(m?a&f5iɂaǠ ISvQWBン|O` 57 v}Ih2Fr݋W/VzhxO;b3;<:s$>{9}MZB/-'=^C13g^)6x׽!Aξֻi7;R)w(tZX-ϛ}oL>U m@3.x}L醙Hؓ<w,.s6Eb)!'S4֠ 퍆{8£P-r/շ]UB_O71D$dA^y#vW-GY?fdV4:x{ܗʀeq4cc&Tt9lsM>ɝ ƹ|S!|u}tu3ԧB`.,4TfߩJ 9mMe(qgZg6}L"gVQs98e$^곇 ˒J"X!ޏkՇ֔qc UCcW.hRɍ$KѣyB5uM*Kc鮜B9WF*OGQ!y72AdNݟpI0cePW9^o:jwh7 (>I&|Ԓ[s=\0KTl[:IhtDH }>Z{[,u8̙)޽DBO|Ip\V Ʋ3*M?Ca&V>ף` T#g3RH@B{Z "r++G#3*#Tm%pK /&L)["H?j.>+-"؅#`C5%NR>v\r$Nw_t~̺iKJ@O @mGz=i}uVr\Jy[]G8ybyu{64FxKI/ݎl aَٞ$oonu#OŘ]W@p*\l3Vn.y)1h{$7\pнY#5WAcSe.cg}߷xlBm۰EJ𿞰{sL*:Sx4)\:s&ZT\%Ri )e L} mg[_S&A%0bBvIWyiDyJf|?~QVfmw|m)7~8osﰮzWfV0v,jrUZkx6~?= 6?>n2 <۠\tJ>^+--<]Q+yNz>&پ3ucA[>@t'#:m(kYuD-̻,orL ljb><|C Ĥ+ٷ;Cgh|.l\˜mn*`; 91͓rm\9gcdMw,3/AoˢU7Q\Y=DM\LPߛ.jg777gy$"CD1Ym6 gD~~ 365_3LNA/R;gf AeAiŜhu[x&~(̱ȳ\!e}.!Պ Hc!_KX-ahJFpG%񼁅-s3L;o{1/`P_&&ߝFZ y{*DD m<0?H]# @mMI &ۇ2䠨2+yԫ7$QME[׽8`k:7zv׳yeĜTXnlI<!g?Խ_ &p:96ff=/nw&Gs9u:TP|8#"kSӅ' ֛…ɝB^뺰h.Zѱ=Q[P,Q(5Nx^Փ&h~k}J m/"m>gdCM ʁ|Ut=rcٞPZYG"Z"E܌Zv>==<uu]sߺ,;=r\/Wn/>AbО^vN"eZi iQ$16O\KggG>Ŕ)P`Gaż3ł3V#}S8n&j{pMo:JF`GvsAj`Kn\n`7)_5} MdIԆ{_U1=xK BįMEd8f\fExpuH4/jk|ʸ~'Efʁ 3їb P{s6ةL}лOncN &uW^_'Μːޭqg] y[΋}1c Lg@"ҟj(,uiHPKi[[} |]y@vFcb.^2rByK<Aˣv rDo;kWLǪdR7fE%] _Z}MnO0WkޠjG~xb7ՍX\ꚛQh1:2|o=H^1ݦ;׎H# =|-پ/#s]9d$ ]WnOsSI=\X^-oH˘f:#7 o"#pJV:~5\RiQd"Xy7ڷ3e[Ez`p|qؙmq\7TG/__K(+ި/|[),ZLQVY-d %4ľGÏCtZSM"sf:r$6&j*_LwɱUkWn˓lxLls~]vjaayri.t>N#&4)oz5/](nne=޽%r5PN4<35CŻsJ};Ch1j{kgfJAy Xok,hY4E騨E<SPvp(&DdF: k˯ĹX8Wr~ܴX[|L[ SϮDF*vbsP!%e +yxZMMER )zM9Qh>#]ofJ*tYGaI)g zL{񤖣ȏ_jTO֔fj=nRB86' Pn߾C M#]VNWe-niN8L֕RZk ~:FIFV&n]:z3c!0u)z,' UYju)#:!ݴ mcQ= {rهRŕwbi%,  P6N $|^N)Xl*9|b8!v2^+,/LM{$|8Y)Gz^U^˲^V~^6h UEgw޹eߠPMhu{lj6]91Ӈ\NVש ćEv)meOo'9E ʌ5z#G 5/=H2ٷtU}\S`Fцe 0NtG:Iq7 DG:Y #r҉ l͜g[n&߱hv0f\ pŢ~M?+X nKnc_Y2Ir݅3Ko{T?!N`9;Q|[06K 6-+fO?pfzU8n:)w.#hNH}')ro7qs@N[p…*n$! GV{~ᚓCCGk(!/YH.ZY>dC pvʲQUWOb a`"4~za X$( zwoe,5s0\'C:[mxJL3hLW&aagҾH؄!zCwy@;b9F6BCۅXK?:165(GQX [q6J}_ErZE~`?;"t($#%¸2j,g^ըN/0h <3o\fXF[@y3Lo5&O56lܯ@͑JfED\/qfleՋ70x'M o<~p~m_Ŧmk{LgW*586LR6`R % 9%g2%VسÍY#ݕC bx. rƐ hM #V| |}›ɥq>_+ɔOI߈wvTOKNXq|2wN?詞O%ѬE@e$C#5B}T.Kw4QlӉ]݁,F;? d%%v9jX @""*P*)~?EHʸobuj (U w1]7})dXVUQ<>Rы8I ^-ɕD0QzSsͰײ\s <ډVrFΩ FAєrټӘqW^BiB}3vp0:Z 9:<=~ ߄j"RK%Yz (r .shq":t>Ķkyf_n'jP= yLJKr]>i jN m H|]+gQB3~M0}MJe\5 X9Hu^"zu%bS/a}ל8Ÿ6Gc݉ʉ1kIt#(i칦CD[Z%]VxzDcPQP*#y}NQrX>X},b蕆˝&Vfsuz'9nkn^l7.༵t܍LX%hH]ɘbE:ʂw wxdZ]"y!+ 4'&3__șO QE$|6 28M_ܕx%LJwIwX]~ /kb4m0)YNPuU5C%c?(,24)W x +` BȦ^Nglj< foc$zQS }\AN'm.D _w@aM(nV_ d.|MamVGu}E{?ڕF)!35Tfx"6/ʺ>"dP)f|휗 %Ujy6Ք x^5Z_-<5|_*.q8Yg,m'.7/-Bz'@wh;rlV6}wVaAW,GU wMGoGANUw:@#],Bv_,Auiǚ6J+n?fXW_Y )+Y3q-kGCPR}N_5Ir,#+4r:$Zk+|hQSN JHmѺQ)Bw@?]Nvt4ܧqėzXEpFil 0Y %K>%WQs :_s>ś,?6F!yj< RE/\av7GԽRGygB: W Uf߉R aVI~l٣Gvq*; 1Zӫu"2'&w}. +T >=sA.,ϥ9Sý ΰͣS⎑LkCÄVQ*`oTK>x\5O_=廤^R2( @X;(TGQf.kܩ!9Sjӵelop]|34{[yNA}üc~!̘S \<ӀV}fv|.MC{նO1fO)A)qȟ7$|;C#uH哼Pin.:uԛ`%*ſeMnI EtP3@f72Ц&[[]7F-wqu!d>vo_w|킉?AxU]à 3閕-y}V ϖO"ᢺ/ ,Cj<'Pj3|yx7SPf6?d9pPz}a2Aݾ[ K.&߃n7lEOe:26K9D5:*])iUUj*Bq*M]"5p̀d LfD'4*K5Tf1;D2Ըת~DbfHpL)lcid4ᓆK` 4^YCfj8mF/o]|s2`v.;Q6B^; `Ldc+>qV2w9%f53}aD]$'}ueq^#.FZyq<ä_ݫ=K<498x{:&?uv>] eO}vXM XC%g _R9(b= V |ve Z.u{&iW(_ȸ/9$hdf^dI>}sìƪv~PxӖC=8|=ڝ6" at7oƎv8*=N)嵤 ;io,qza(]qgQjw6h繾q:4iJq j FNPuhU8owpq[S$JOq2U D#NC.)b(pS:r"G6,boWï7'1TvnJ贍.9JDh"M*p4)dԩ~:H/^IUGj}G1=27N]VԣSjeޥإEj/7$)G]cO؋TBo\+Jayza jT]B'8rᖫ0gOЀaAn>Q)0`oZJTFϸ4Y˔G dhbu+d>{&JM 9x0 A%.F?+-6*9MWnOQK@URyƭ`5bsB#(+km㿘 BŔw)E+hlPw٭iFk#bJȽ.k*B.}KKkG7Ւ(`jw,r;HzmܤcMdU;iʭ*:52VQӢ݋0h1HۑrdMcxRRC5Djf-kyoD0ǶUu}j$KU6T @&7uih GsU#gYnvep6L#5Ooh0y5|kz )7h' v" W\*(l&-28:ZT]tAu5`n s-9dhՄǙFUN5D L~鮖Ѧ.ex:꽠.w7s_UQC5x(&hqsR(WrΛ($r``us bwG0 rK -rTҰ\yPf#'bJ[[+pߺE "6qlH ǒ(kh鑂NRڌqa,) E3d]iK:Bٗa ^] . 4n01FK. ">Y4ǽ>c"1}YCuq8cxQ2֍Z QnM4in F۔/קqҿj1R;5V,Yf<˱-M>]gMI%^C( 9ocR_7|Zf;`X|2 >HDT0WIB@8L`1r eŗ;73F#s;HhrόR꙽^tW61@ď 3oNc+<] _`$651$ y {W鲙^Aq!#܀P;z:YWƟ wjۿk|e0o_'~˩޺Y!_ @:j0ёVn dOv, 3ϛrWMQ:YpK0zoƹ4vY 7s ~k*XA_jx0.8J|;3 aZEz"L "mS羁QK }Oۿ?:!ΜLH&goѹOvgpPJ1Gi|R.e>"0@h'zsCeV5 H;#=H9)Dvl(e%-{ χ'CN̨Y[lYc7iO߬9-h t?\cܽIZvd͙lq9ڄ_:.r1v"o 3˧v,;X3r(/xD4+^oJpw;qړ{ȳoᖤIV¥h̗Ę `ԍд}Kɫ`hox ?:LBQ7=;y̿V|x[IMECoV`6Ku ,DE&g8!NY4#U^ef&oMd[ V5VASlu^!y#īs(~M/]5j gnr:WJϐ&o"&KV(Kո#T>9]yKQ+ٙx\zAkpbzͼ=],!gIVFXlk!`@x+>&\ڷ6h\5cw3^*Ӹ JݗcGNprIDT'!5pWjcIEaqA9^T}͒9JF@K9i.(˔5qx@YAHcg?$zIRKufll}ٛ8w~]ni'̿=*KaZ|H^˱B 9/@7 =>EF{/{a2 #mR8VTL@էux%З0t"NGokݴX)`/8ٖ_&lΑ摧\Yk: G:.:oAPT~U&%,{(qx}g|04{0Vcv3x* QnAvZuggb x O ~Ku慉 ti 3zk Y&_]|=j8CZrSHUR8Ƭ GnP{!s0k/wc'֍pMTfѝ8eﴛ9);D7Iշ!4v+V{_$PRxPԦkV_gZ.QN\=M _i#$CFFU(3u&'58L=7Ԩvlg}NY!W\r]`uJ_2N_"tf#K9cIu:[D5Fjb/U} o9xb?rG:}'[C8vV-&LMJY5zj!ן݇ZмF";UpH(ԉܔ3 :!kHϾg1dr_MB%zI~)QEu2Z!bq~X~)]]+Y6U !4}Kkp\fR=7d()k2bBl)PVZ-tIkC'Jd 3db,{A[MxQbLpn~rFD xw.-)}:MW5 ۵>͗s%AVdz;7U>)h@97Kx sg1^Ul턞T\R~W V]OQ'XE,Џ*| hU!K!S}WJ/6t(~d2|ҭ /B!~@P5N5u*7̗o hC6( ;@c*H 16>-nGHx!٣+}GG߽0lFĪJw~"9°EF;#O2$=9uaйu ntYC>ZA^+NʭU8^N.rF3A~j.}2w-HVqb/P%KQxrLԝ]mʳ⡋trNQ] n3Z=-662uXO "D/ Cک}_6_U>8#kO3k$<@@x4[ U{,s\l[p?P57L&2&T7yיEW#Y6qQ]y֬ZZഝ pǞbևf)iZ6j :¾fv o7ʾR m(̦2ֶt2n oD+XC!o'-1P')q}L='_K?8A8E5N>Qo%ۨV繟x}k)Ѿ+3Ȳ-V`թpQ2C$58Blӧkypm rd<3&^vFU_nL`6ZZ ;N5hCylKC(BBOܳP^5!>5^D02Jt;x75}T)̅X9ڦ;)U-UCT7h3ZqT~D.)7Zjz9"tFnwt¥mŔmҳb'Jzx:N({p'g/U`g,WӬݖ~]{Z36J>_FƮsOxH)<#r Bi"DZn}m~v(m@)8D7#ܝ/y{;E) '||Sd \0Bx-RYkNK /[M2j'X7LT)EqMt_ $it %D@ B*N Yg ^ܫp>rP3\dHXDg~4w$6%<Hs;/Hg,ػ0 i Tk(Wk5M 3OwE~r9HY1紻 $F:,ڕxG+ R5zG@Vd8&ћHگX!Z{"U򺜜 .~WYr$BLX"zonwF^~͊ޱ7Sَ& ٷ%l52`/YþI_ƖmixMؔXޮUn&|ŢO: 5/Ia҇xAG<-%N~"_z q kԆ(.@K|17 L1W+eM Q JաV\2fנ€D5}W{VNMi_ 45DǽndpsK?ʚXlr(\13 Ձmy *ӘnÕ&dݹVdv*R/d1 IYd/L#~z?3UQOuiz7){D^6O Qw-q=[R94crGJtHGv0 B<~<*yhI2X [N7W/%W-onu>ww3Pc< TFiv*<֔`ߵ@=1DºN:R?iX33'6fQa5.ʐh F/rb߽FmkT*iu ̜X-\>ReILw2!?+ql2yS~-VN0݌O5;(F0=:o&pO.p PrŰF{paD;)GWfQpO"ZGF'p>":3lMEKJl-pEjr֧[vSфG5ӑ%R !KcK w'OLZKG5_o^"ɐE?̰ OXAD&|k`1}a`NOf NUz2H!wk@1S_$p[}ZKy7: 2VJh36ef=f!#JBO@($߉T>5p:JG k=ˇd >\YNJUb^ݰ˽Ě%AU"aVySHhړz:s"\3Xj)Dg6i& .NFe8#ʦӚD5jbIz i k4(5"K4MP/ -^Q:A!솾2уX^Bmz9iKM@2 2ol̡B#*m:/X`e6fS+&T%v G,BQ~u!fmBJȫC=pCǨt!#`OC|j7(,^ad6mx?o]R\uVr:9j0oF^;ܨmv.$6 x?s]rOI$V: W( :?).C xbC Vz>TMc$1n'sr>ȃ&≰k't~ {V`Na~i8Kס%]'niu3.xpfH;\RgO@ :JgjE2O幫~^4YaS?rVt擊]+L5K I P+ WP8&<>gj8F)i*]y[>#74saEDK +h]E@Qγ1"y*ULNg=Fܡ7vZ>45Z+Lή ,! ?hvBBC.`t1;rwb3B` ل/TUF_ROv'qLؿo[/R7v`e@oGH!׃l9J2 &6F;<륛idXUKQk{ zU{r`a/\0<,~LLi31hof9kY'ί!, #Pց⫃q0D mCt킣?D57x;P w79loJhaM~(6Y0G3hmyCފ2LlI2׸ O&6ϛ$$F{'1G!g"(f_6vm8sF6+=hMuk,E ;w+0]jYTrfr{KwO®ϧEAw.r2$A&K w ¿؏L#VI< &qͱ] USoWL5AtԏۼD*lFC};(d HO\u%0a5mM.C_E,xUP~%:P_ <5;z$dcov*ȧ,}w'uq;8R /0!ߏLd.C텺ňF>= bj4jDxX;0JUR>xb? }ĀJ0"NtPjgκƠG8sQ z:+׿叩+' =瞟D}g£Q:HsgRe#8%>4J <nG| g-EEDmpˏ?vZNU4>a@%vo#ƶsVCnrC( u{kKzpUxzABnv%T!{9 ]vzS ^ C:$׬`نV$ǸҐLpWCGd=6/TKuAĠ!ۨizx+O?}1!q6ΥGmH $x]k RիJ j Gŕ룃-;P\)7 Jng|Oyϕxd=3KQ2tz;+-ѹ=sZ a^ 3GheR&M ieJ qz ˤwUXSike ;U2Ϸ/{AVpI'6^$X4i2{0; UZ(19~j7-I2K2}+PT/W *_|Nۤ1N3v71 e@hG*0yԥ/[ .F5>\#k߅8nHѽbGLWJ}u- MEiS]I޽kRӸə:d"`ͩj]s@%bLqCt=K? -3s2wG{F"cfȍlUvp+Ϧ ;_hd;KAgA$9u4!.&BI(xy+oLƿsrL\ڪZ}ls按LlMLkކ+me|gYVFp+$KwD+c2m|u|&SFVIthNS8ʈ}ojjKE 籙EC̆ڳʢo_Tyּe(P* &T 4<5#?!lO $=1P[ 3 )A,/5*6MZHkR2Loo3e;P԰n D8sۮ8'`mKyd}os8 7mf 6xLb=<@w˜ ePŷO1Lpʉk[4pm'^GBj.o 0͋תy_:Kg}\Q-o1FJ[3͎[mdlReőicZ>6 3-YDh3+jSMj m'ڛ\Oscc`݆/0K[A۰${ |d~aE8E(xC"3m?>23O! G4~2YPe{) C,S(.7حT##„._fZiWfR/+15TSͮf˖A@Z$< B(#"flcz$i1 >M1iKiFs,'']).%%`sD Fi_s@Ŏ/RvmWC(0}U[NŚU>AK{~zƪs i1m)PԕʄndjO!m7a>IIl>Lkw`>9ZjTaA=٧̥ R\o `9^g K՟; ܭn{b-ʥiskj]w-QͤxÑIU6ė'Rڂ1y7 MV0M-G-(J:Ƌ_ ~ n+0-YRuP2 IϦy?QX'f$!qT(U<5]v:*E[\>Oa z!?M6+`. O"}V ΪU+݅4ڕ'/*y̕YZd Y ]M J"^z()ebUe:;,Ry_N{\4.0NP7ڡnf;U/%̮g;,y/nJoN=0:qJжj_/Irt2z_\юk1Rnςc@Imߔw)&|vِ:Rx/ߩb^{x,>^ib@ZIA&4DyQ}}ZHQȲA+tͤWv,%Edhze<؃Tn2tT@G_pY @تaQr .W&uSzwxs_.kzeZm=9~AoMxUy - sj _4^| !8q4O2Av#vf;#O >W{- 6"hf+iڔ-w8yY4x NZ|7͆kDÛ'5 zdvh69KR dΕ7Ϲø\ Tx}=@w{ ~6z,9pe Qg# Whȝ;$0(k}1 ?\lsHKFE?W`DR)ߣoT"RGx -r %!>j|q"HbRGil(/:vZ.coKѪ< !8G&2]%lgYǀ+ExxrSm͂{lˊsӓ5J^?Dk>CO8ۗE 8NLXk; Ezbm4;Ζ)A^;s1X>L2toe U (8ɮzrՋj^ Ge2jڄHuny(.u(Ocr8: !qRts-9d1s \oH76FkS+f $a!G30V&ױ?fcJkXl,Wz~VۺHӦʼn8nrq] 4{ˍ m}n^_mf`@Fx NY-}MN.JM@iLq?v̸= Go_ 2:Ba2 8On¯htbu{77iRl[lu]"솖䆇/͛(\FLipHl 3 C_I!>obu{c>?='l8cTPIPC(mN5|+UoWyUL7+k$=څCudX,p\{6 c}MRG4S&\msZe^]1LpXsZFx+ l%*tT}3 gY! u MN &?o>ZY|{f +~<$#' tYSm"epɄgjl:gfXFur3nDx mkL,* /S8g(eo~IƏw쨎`Ѿj3sVPmʂ Gw_v%\p@Ҏ\ -nLҜWZx)~|J6!p9[xwbE>׆Rek-.Vِ]vDО /F[2u)}u={Š|fx ){ C bJ D[{gcW6!\Tgdaum9ұ#<Ѭ ֞18RɡTݏ/ WB9Nh0хA)qW#V[upǜ c*6 q=Q B^.ccXtͨR{thAx']6j{6i8\MRՒGR,)Ͼ_}m^G=iE*C]}*TjLbanQ0GQW& MyxkЪDo)x8IW}&w(/{Lz6V1>U64r(tn}1*R"ςD X0~))pc dXVK8z[~_jg1ߖ.#(K)Ƃ>~j0? Of =|n4ܞK┋e9:a|@}!5l,Q<@<:p򗱳CkMHYI3G7*3ɉAVdڮןt|&^d[N:}I:$e"D2.*ZKdEViDu >{05;.a{k׊4 流Iɟ^6NꃂV=տLU)?ѿEl&Nx dY8h@[/_&l$/p:̬No^BBR/dPl UFTnVI֔3u$@TBOH@6 x81C>=n$|5C[]gٿߓXmуdSⳖ (qw>[Us|>?QxjŬ ~&e ywXdylmzbc?ע~+0ù}/Zڦ`pLz95B0ʟjtY+C_p_v|Ϊ#џQL;ɾڎU0VjJ~bC&x `ʄXeٜ?kĭ[]o+XЍO(l]cox~Sv骃guq[cYٰS~dc'^< .=RmLt1̙I t}E{&#p&Iƣen8 1@>V; HPx"|Ye9iYSw0r^S@zJXI@IܮMIBIaeӥnYS{w>7 ZiO=zqL\Ks == PQkkwy,XY/m=--$a!>Nxۃ i0` Ux{: R۳Hp ݕL@.)bm J ^瘵⮀7]-99;Hr~ZԦ$BҾBt*"H s18:h'7}cB,/|=&XP<7B*hĮ̝9"ܾĞ(#DI/6 {;Is7(%*4=7!G 0$O %4rZSω\ ί HuIM9D^h›%-{m zj9}_%SvF&T]ժ0LѷltY,TǟB,U ]cťW|'G6ݚ[|QJ)zOStK x0"W-awy@Ǝb_^-%ifb #;([-v#4O7D|B`q_tA;J +m]mCZb/Iz L[mc=c#=XM^%\p7al8b 5+8U;IW/`eJGnwzYj-2OÏ_W|{h߸.Bճ"O~< e {v/v^F:0NSWyKz9.%Y/<8aF|8V^` #`21"j׿nOeHBAsd[y0]ڗd WNr`)4p@dEj6MIwDf]0 +_AJIH[3M|YA}]{S4h^u=p~7{i*~En] B2zȈIBѣצUҚJBH) k愗6ηE0 +PE?=CIװ+a$WP[~>ǘȶs#%(iOt\zfNIӡ,IE?9 7obƻJ<\ ѥ8 uYHdTݧ|Qu3HR4?_:W_mLfkuOk#OR'ԍ2;R^ɯ6RbpX~>p04[Vs- (.Ƥڶ,rmk":m٥ED>Z E)j م1sča}5Վ#'5l u [bBooLMx—$.*܊ .gZ`˱ۛp kԪ%5+V|3H+ʍ=LZ*x%Pd}6%YxXD}Dmg?z42Űߟ}b=s.\S -l|;; dpN/" U2\^~Zˏ}_d\un$)Z也Ji8t[uw hTϖZgP#ep?9q#逞we8'֏&#=pk?ZL]rQT )e˩Lf}f? h;$ǡ픵 zbYޣ5u;KaxAP 0Hq5|51H=ۜ3]x[.`7׫|\|osϵ)TΑAUC)ρXVmЦ]ogł偗aTa`Wn'l8? 5!orz6 P HUH<8=ezRXGİToV^țǭJ_AL;ow\#!lnb{ dԈ7sjsZ_s-{짼u.Sg-ssk-H|AJ¹xSTf0C{L&~7DtOOWI A&: ߑB,;./zøѮ깸Y^h2%~3myXwTqg6ߘdPU9z "_gՃ o>p^1hZjUќη9GUvmE;kD&dceۣK-o ۔~jM93*E.?I^g-J@Lz2dR3ųMol@"M$,tzdd#P aJ8x:xkmu؜MV+٩.ol.Vw^<> Rt^5fܠb^0ʇXeUw+ =Yإ ,ԷXRZ}'E!qlSޔr%ܿFre݂?c[=Y(J(/HgA5DKJlU_bݚw^3H=fu8KHofKx.厖"_RFRA#ͧ=3=ox24Bc<\DU) u[ )js]̢?HCQ96{CF!PR>`MM4WƵ sm%y tJ VGDVk@w NI<>ˌY^EACv 7)~DrʹoS5I> t iABA(Oar۫+I姀BM3@bHTZU7xV~y|fcT`(mg|Xg՛G.:S|[m~#덼vV+_U$Ķ ?{aBVC[cKY#sM?'oSчƮnv;kREuy>!bT3AqGI%!yB7enLN4f GF/b!av)sN(;ޠT OƓ?|\uv)G ESBcc7Cq)pRuE9#AڅsjN 'WL,@Eυ3ʬU`!099;DOFLR|JӚqdc)̻ N3DqCqllA@aD /_7B.\ ~r2b9(b?zrǥA?x 4Vm6t kӔtD}t&ViJuacb~c!e#I65ZGHxWZ%; 'Pѣ{Yn7bD,;'H=os0FD#|frjK{A7MJ,.78ad {\fܴ+ރ_Xi2(~' (Yv?)3Y*|m 0;h6ߊiMN|#ےwJ&h.?_6OZs=ws5fSчB_j]^k}#UIFq3kǜz0?k)n'bُsY1.rbC{."A0Wkg pg9)5ﳭ?&4Rg4Bҏp٫*ߖ.W'&SLCGW(Yk_$G.<Ն"OʀLR&},=YGB\MP%9ɋgbEKEʋc[kO5gmK﷩|@Z39LI>0i³h8S5~h]FkKT-}8&HF.-PŦ TlϫLq3GZ١sZ{Q1LOEȪxՖTgƞ㭻8NhxAqh8jף2:],&s3+^ܵ:X: 8 "us\V0$6-NKۛXvn2^43=Cʋ 8LqLkw. Pѳuר5y +ȵe DžQK J;zFܲ. x lFwH{nHNӕ5^Cs)~e"ݷw.f'O;M@VMZ|.̡r)7!tX!`>Qlgez_l v|^xV3a,Yy;iDiVL[s9YӐ0K8g)[OyDGw0UD/54׸o|ٖs:VoO '?v>0 3CK6akoWu2Cq+)m+peӼ垻$QžzdsCe8> v`F`0R 'ui>M;fF6%JuF:xX^GͿ'L6cMu Y`ܟ dsvg-ct0zAk,~ϢCv=VZ~)砙J`ݛONdER VY4ФϕSqgo;MTD0g{=21!uL"2@0F!Q ]=fZ`],NY~3WpatR Efіdtmz#@Z}y7b{On։DM*D!~Y/"j3=Fre4`uV|ʴPn߫(hhTb-=V[S0%N N܉y]DG1'jq_##9fv~.J~ĞakPZ(<{~z՝pUN;F#^E+/euVI{sS飮rQˌJŧ, @Vßlqz{״0+ϛw' ]N2ibzZ|oP׃O 1GDWGFQFڢTGFN\ `]RadZsKa(&Zz Kj]8?v-Mh?FncLJB G}+9Fۻ_ҋa1M3ZُU|%RpC[e 3m pשXaWQP 85]% _v0☃H껕qn!fK,hmqҳ4yuQ_n2BqvÛgQƊpT*(YSG,JNԔq`xيgG?r~(il$р s8EI`Y|LW9--3dV,KBl؝)}.P,jYjɘlze 2g]kY|weVCw_mz%Dxn&:cm2 NWW_`ow,sD/QB!`:-ǾN15p6dg,{D^-.% P|֑IDZ/8H}cwbX/r݌_c/j]:&Cj['#$OSS"&&gqHlbU6=93pfQ_TypAk+>^Ʃ;xQdTz; t`<qXhv P%w7ZRߒ!]rJ.t#Sby²2Q7na_[qK>l1zuZA.t``r3ɓIF nݡ0Mp:M֬q,pCv!۶ SpEU__m~-E3_ HCtB%U IS L늨wCqt:{U%Ĵ1ƛe ^@V;.%PY]"i\}eH0kɛajqE3L}"c{b>]5Gx;'>ꯜo|)-ЛWgg̉ySR[fUbtag&w6S cQ.?\e!FL֜BvD>s9<mV#=4No1C.q +уݐUj;ډP&D.䊹0_2m0R[o[@ټ蔚}hU%fCĊ Ke MM6_ 9p4,)+:ݤӭ2?dvSO/_5jb鍂.5 V--mܟ3ՙԾwn?<: {4q8mBm&}~:S_z>x/娎~>f-QUXO9&)[1]J9D3؝V:?0 "mY>Yo4(}|,tCto]+!ZÈNCHF* ?7Ҹ5sG⩔fHu|]|6BWֈd6m`Bcl;`pq8ۿ p=΋Reׂz2\uE/'EY8\ RK%`tb,M[靮/w MdeF>tOt:(D"\<&06Oۏ},]Q<{vf,kVbꥫ,^(aD~ʾ'j i/FhBX͆x̛fƹ =ɒp3lp.NĘoW9Ndq{%a8m~5q}PUTNRB)i, 1b_T3m0-/|m 2!Jatn8 ]3is~Ғ7;2j1ս' O~|b֭nwua%A2󡂅*x~FV DRwqci[qe}QZCEZjՏ/A~*5 \KC'2ڮuO*܌jxoLM{P+?6D}m;FU x2 /(7ϋٜ*Wf~_wsWaʥQ<|f& Ys 3R&h_r>9G7ILNuI'd=: sο'Rve&nK1gtUbZe]O1bg{LT0S-;As`d5{dz;F#I>БÍZF_8E5+vã/r҅ d,~aG{&˄zdgy@=+պt,~ȖE& $s<O2=!Dܬ/LZթ8MU4w:qH%z~n]I[2=?b@flgjm+LHR5> M1"4e.QfgSg]{EJMY{mL 4kLJd::)2[@EF=F$tE8v7Fm -˕ʐ[2DQOIu r%*v^>eQ^Ҫ,⨾d"gŁ#WvprC8K+<#OlSA$LFKٔ bٻJr .K+"`,M߃S T@\鲯% &4?@pcKZsه˰(@| 4mOMɂ)KgZs5#ϩ f4zkPi JpG*7%VR)?$"R!RV¤iS| zؙk-PXX;SE^(>Ǽq<9/lM[}=EiX{ʤ8.̯~D qRG"UQ/sBo%DW;4?]ԧiI}6vjk@Q7(n- (rn*hT-dGZIn'$+ܑr}l(5.>2XV2)k8xY~vifU(RVGU /e m o?Mͩ50vICJQҠAk2 iXv)Ka+φLm纛ޮ+aU<^hyԉO^1Ku;m)}67rchj\e؛D療43.tgEAP!0#EZj5gη.%bҬpzV#FiW"1Nm|fdcBnZ7Z8wqB$z'Er\.h^3:4- LaO7Z|p3ӫkˬ@0D"ep"N@[E %8>/ڪ0wuNg4ܚ\B˓@b*옦ʠh'6飻xg7`>W;"wӗT rƋy8<O7>V/ܿ׆Nl>`mY!ޟW ~dAzy'cupNs뷼{{f]CϧwVl22-zZנB$lg>: FҦo%$3q.dH9\E,aG@Z@&}ݶFrg peZ5p9'^v]+)3T2@\f9Hf5Rk]}/r]9Z}mKZvPKM_.K[[bword/media/image5.pnguX7{|#F >xL J,Kq\L +ֆoTW?蹭@Iwj%wt~q-QӦFqϲd?N{>ηRab]st~= ro?<oDI""chStUyJ:xp@D:6~#"sO 7\IԱ8 j? N~ |@qO{(ЫO8wq3\2 1U"L.8HWSfW S5el>lGoƷ2JO ff&6eȟΨ#Ъ{JizBɶ|Ը|ƩTx/p"&.#[zmƣ0)Rxoeu/aKC_e`֟0ݸTC]Rt'Ҍ\~ZY)ۻ̋/?ͯ&TE$n^,0p8K~2hMRJDtAMJLY%m|H>o&%@jTN13X;FL,i<뇞>2zH4aa9 2dqⱢ`r9uu% S*rY'm']~i_JG\ VzAhA S8|"Fn-I_ hv_##V7?Jx 3+p8cp]5t讳֭y~*l0 stG{Rd: "ZcPy1BQォ-#ڣħ1)Wjī-Y1迸 rfnׁ&j'BRrƭ0c6RS0L i Nt2PdvRQݘ/垂I͒7N<\} +N_r'G%yގd\OÔ{Ҏ1_JkGnZ/ލT1+Oq7ń# _ .TP8'lS-HAA6mHSl90uVIU>X{h3 bJpXD6nf_Ig6' ^˵ߥhJB 3b IG;JZ7UqϠUMg3A}`%?xtVbKe־*lbZ:V0=)0g^#4U^BHE;zqRqdl_Av~&opg[7>~٤KW聕mGrڎyfE0Dbv$]x X뙄X1ԵģE%3쨚8}N]O'CXiRW59 +ds˅;&1pj#Ѧ/gudD!Pw=j-1MOjqg?5ak Z'b NI2`h(3'&GjxA:zܖXN5׫h&uс9Ľ?yJWl~96R ~璥{NGE|#(pX>+w]x5PޏkBY2crd 7ˢO|6^djX/nx0Mayl%-`|כ}Y->>,xp!kx ؙ/ <0 Dj<)z4ÌL"Pk><`]C;.F5-ΟƜ%?rs39'2gΒ6qigBY -cLs7ĭJNnvPdYrD2xI\B=kl[YG# IBB㠕~n~G^)*;J''K.IV ?O)>nQ.EOJUCy]K!􏽻,ݰD#3[Tj3v~OMIeҰI"*b}ǽѓl>9\3  h=[ ?ԭ Gw4n-;y>1>xd'eHYehB X5j|TN#9jLM!~1Be8hP}\XqKt}xDhw‡tl>,?xę#6(74 p1x0C0Okkq3yµ8yAlVa:69$-άBq׌:~~ۯmEg1~DPkr)>`l X]ct )_<'[|=rCL".V; ,~i$qhDLfdYw3|y jH g]˷Z @~Xd㴨"7E=>$= r&t_Q18wX?[eE,kLʝ6cA@,D F XD3FË"b &hB6#_"x<*j lKVwY}CjGΧ!a=2ċI ˲|r!I': 섪\x?JV }ۓ+_8CCoZ幣GekKɮdzirLղk´CL_2:#.|9Q+e]7KSM|6rɇzfpxC~(yw񝫇wU}+ܩ@ofPgZ9I󡘪a{X1̵ P璀=]Ї37j@X&hpLc>&0vÁ^0qQ522}Cd;6N+D\:;wLYl\ G*Tn1źIQΏƢ/@eI@jWvR5 z(fvBu;1W%GAQ gK Qo~ưѦ^×T!9]b%g޳^>!x6l/,|E(AN.m m"3Qȴc]5,=xl QjVķQoT=suEe~~E weL$Pr}"-ۥ0 VO"$v=!gK pb@,aHJ@fה8H&7t,+p (Ð~,ojE*w)>mx nĀ"Q/ya)$)-Җ(t pGn}3ThzD_ڍ:"c.Ra ;U~G5KkD#`?ͪ wES~tsb[@kJa`2PV0c0c`g(vJ 4u̶ ɤJ Y/QEY&]HHb]_ա9SO2L: Y4ﱁVXcntr@1 ߹&`,`rL9q6=(N6jiEDc#i*0Yteݘ1+p6&sg g@e'^O&ـQR8uz9$;$B0190XVK1ȁ0մ0K{I d އ\3[9OU4<#V,azgV^ʹ چw:NGQ TQԔqr_$QO~BrI#C^@f@zPקT|mLin#JiltW-@Y/lSoӀ!􀹃Z"]Be'x8.MERbdj]F724,)׆O~~-j4!3~Kc Վ{ 7^Xֵ'cw D%!R=pϐUWÉ0rq)ǡ4uN [6' ``((t&;E x`"@׼raE_*a9,$&9#F}) OF**K\ƃ &L֢mbXY~Jp"$ݓ1k.\~Oq2% xZ F؛i#?r &sO Ufo8T8 yAJY`6 ·f맂l\uR+&H }܃#_*.6O Zr4eWu b7cԐz*Q}GI{VN4#`2A"֍t2bsxn- )2=8*&P<1]̖%]NB`q0I)o; \=ܬxGF fy _&}cH*>aHaXgmqȇݢLV+x'ۭ|d2KgS!CbT/N6*6=C&9pY~Z} @Syr4&$!. :?\e!|/=Cq#K=naB糴xtysftx@~e$}?C('LD,JQ>npVR)>MX{}7IېM\^9W-iYVGyZw5y_MCG%Җ !y~2vC 1Xe :+A5d!}l-Xy(J3ny TQP7LlB=@QJ}mrj OcݟlZ;LnfGo:>~赁)@'&zh0G'y/{˛#QȠe= /zY|?ĪR[O6$z!9Y<=k޳s;C/z6C9{f%h=DWer3΃s30!b5>i9#i7f,If%.`;Kyj#F*5W@ehBq}OZXeCGo9;v8&ê/MJO#nlmz2*/F-nXFr*k\'$酲vXԒ`R+y}.=sA.ea<>FaM$1&4J;$q3|{{Qfv7.Ҿ{c-ZMN20ie~ֳEsmz_@;D)m0w]:չf[FfɌGåӓec1;)eߤ s^LNfҰ/KԳ(C#gkAUsmeoKex`H C]r͌hwu)3 ";PY0aԫ1I~"=/NHfim|czԙ Xg齚~5d+}@i=ة#18x؁B#!i]ş@,&s8OUOyd'rU:Yo/hҖ@°&W|?B{t-YfwjӲ a+uYv![mٲBZɓn{P[K=k^T!AYO^zϛ5=ԣĺU,sX^#Cޘ!#o2ch% #уiQP{Y;)r$Sdgs3a3&سXceDcCIC X rg J:fv? /0HclS|uٌ,<Y5^1.F~0gAR?Ql/_t/***5cUeѨCuHhtLcbvL@[m~.M}fe }q}6ިA OBQ"M.ͫ:eiYd",^~pq6$b="k8'ZQ,QԆ&R R.ހG z0 Co"`hv]~"x;YfoVR7~ćK,9N*C5k,\F qIg TgpT St=~Aw1cd #ڜʾfT>[*{~ 2}/KoגZ^qxT@\|Wv?8$/"[A4?3OfQV'3 )<ǣ)=jJD[yX]4*-3W2=fl{]A> (*8BT4ܕ(“Ǭߩty}@5Tֺh\`㟟/?{<vy 0xR:VAd֦X}>>0K9|rVu@[=zsB5u`e[ W NŎVȉ]9 [ix:#tSStlΫ\c9~yv (# a=3~"πwZĪ]Wh嗂@,h]eׅBq4ysӌcv}爡*gc.Ɯ@(nqG'f0 Ub^j_ NuAw -V֦X5HdKYtpt5N2;c2;7׾2O{cSrU1"R/, U'T$x;OSy wR"2lt9CLo=eAb~A&H8t"q\fbnU6k_~26'2ʯ=93{izSv)SNIJ{3d3'`BȢ,$_jyQT{ MdNX4aS?ERΤgw~mR_ACU"Xhb1gyzv=īvt=\r5u {1J(pکUt$>D{皗0qz:*ă)/0^ɣ8-_ECu(4;ceoEMܯ2Ev)mYcMZٶ+Q wtn6ml>LqeIH};NsK186ѿ>P!_&V؇p!@ ,cgrך"Ia~ 1/vXoTT9Ę_]Q-uG w\f7dx轫0M}^fQ M҄ h)t':!,㭪23!>'R?Vei^J&^J~nsfYzT%wi8E B:^UH^4%Q u#q@e9°apz<5F'ǼŸƧxBZBDA·YW"M8h "^NOa2\b֜_ [zgocu\;eBѢCCz'Hӕ}梉CV7kK&fq:>UjZiFsl΁5]a=;ǒt޵C#@ 1Fx@)chcOb'$%G?;4(;CS?-q|8p w ,Ř=8|3-&gC:{(5@ =MhyB)6=O6`( {6ٸ^8ݧT&RQo/*]XlÞm(cKRQ6 &F&J_*T9X' lerKNQ0Hi.RڙR6FbeK &SlR#>E Mze9P%i{ uU 2خc+@,ԚzC ׁzaaYip#%J.`y0Ef^cDŽnh,Qxy˰qu{mCͽd)if?E? /jB>GmMTw{s F{v'߼m,Gcׇj*tu0Ac MkBN٠}sY]I1wJ>Vz˥ x-MIl̳򶨊\.̃:#hrzFC*9h3Vڥwu.Rtʓ^0`mAH)H *L2o*y,ȓ SyŒ \^8QBoz%iuJ.̉% ֲ#-kX+}?QbBR$O'Ya+jf}'G-]Du6%dcQiDh$}+,#7EijwEBQV[fC,΋x*rEgmN 5`T $ِGlweRkФݍMPg9^" "h4XS'ɂЇٳ@SADoVn_.#ZxGcg"5iP+c(NrfU&^uj$5"#!k@29MQt $"ݎGD ׫S܈A&v@\>y*׮.}bcaN9쪐1!#[F9 tXE_}YqL9,WsR7q8 ӕlLjM+p[@e1ߍ]N,4޿GݙnP{i׻{;Ez\ I.< &|&)imlQ%Ν,^F&xֳTǯ#XHp |'Kg*,37r0`8l_h˛Vऩty{Fj-T(9zR",jw ]'W ,s]I>tr\{qj.8b3 OtawznO$#nnz'Kw{݃;|M<_~u=gZ?c 0a39dV0pMJ$ڗ 3o|ڥLOku>2!+`vihAȒYz9y_%E^=}?xWЧN7銃Ab8>l~ŜF{n(4 zԷ77`SSnj#R8\J=3i ku<7Tk.G-# it1XUg&8IJ6.3"U!"%dp!%8YCP0. l>;xŬE1ףɆ0$y' WA}xW=ڮ"|@sjenw2{*z%e4QgӘ=7?޾֞Zr {yNA:G&*eNw ST{:E` MG|VGj}¾WH FEx6rA1vydӛO=&>j NF/:b҄p@lp5xq%G3v'WKl64ejXnx%r :"36lA[cjs 9P^]Jȿ o+u$~f[ ѩł?Q:NI:! ZY멺g7&Yݲ0_ALLvk~ jgۜ*phP$(Q/ mwBzjg z dY,?d˸+zEam@C^}DjONT[9]?er\Wl=P H9FoMA/}Z#ȣznIx ,ĕ_zhD<]*U@SG C| T#6<%Kׄ:A}/ dZ/L-Sic0\lH{h\CLyzSmv +fpxgTZx ^$`z*#ʛT ~5L^NWn0l7Wc ?Ef+At).K]ps"(yL]!Z"g?_g_3@Dqğk~9@0˚ޜYv+O5Sk˳-ɣP~G+cXŗ|-VKc@Y508liKGFUy6bC*$Ux8i13"[TA}ys[6[fDMT~pe͛mMݹzZ6eVμ?*pgYac A.  & E= $`̕$û;(%P2Wz }0 k>vx|U͞ݗ9.hj}.i=SF`k],HA 1&~=(JTeH\mՀ*ĻWu@[bi 3^k6fE>ш'v|yC̫+ud{]"tJj~>siT=0=bW 5: tp77}\GĖ+` 6P0|iy|nIgSomG1so N\WAQoD^jRRpd7r$4HϮ1 p37&13VSs[F,5W:8tu}{b0dF@?lT5,OaĴ6 'kh몸1fqWpbv;ݔ ZGN$k\G7{6&~0TS ?Kz.M< 'fA8&]| .uuXef= zGP} 8}m)٣a#q135>πpxnz~OZgk|h_ 뚤ԡ-c; 'T> v^]kY3&(Db]-%vü].{7ԡgWῡ=0+@d^c/$ećtA~{R 4"}c0h %=*@:ᇺv,D`oG{{~`B`%6Ge15+Q?BmdJ̈ >m\]sEۈ-5_wʀs`Ã/nbkC^ UK>?0a28`3d?1f$wm}j0}c;XrhdVm`W6~d}J%e;BMy-"Zl% mDowfTF@I2;;i{7%9.4"VWToҙ0n߸yK3r7^. @ZisqMipхI@ hW=ip'Z ﻱYHrªfち5u8\O{F{ih6ˑ| Sĉ*6GӁFp , "]I9XOHZ@Jx3b}`'7Ԇq)ˎO#5`4}OWEw~:|?3{ߊW'YZQz3)v1ykM)$%.E|!w 4HE(o@ E O[ԲaD66}<}Ѓjqtq64nD8EcKWD&N2>)=vQj[RcuE􁖷7qCJ} mqAg3 b6mǕ383dZI,{̈af8xE堳2Jqצ">NDPeiL94LGCs Τ Ê kbŦv=2a`*]6C/Tf&ea599p5 f]aaXg\vȞhQ-Oc~6Uo }ۧ !J$"+!oOxU-p!1 3fEdzylc<\ o_6Oo\"G96!L;=oy.%I01Sv|Ls$sslwX`gץOOlK~]Bj2fo*=^ իe/Mb@\݅%v7)*$,AnwK? |׫ђ!/ڿh"9f"?NoT% #&Fuu8nfS&;M̃!~y&4;(XnU{>A`;\j[ Ff:D }3Ӈu>.(õ͵!%mGX$ZlQ ;Z;y;WOgƪgX4_2GɏȾlBqsڈtS;&%29=7?)DV1wm85#K)Gפ:O|͕K~S{.VD2p$!V{<Hڏ'A:/x6Μ2v?KT&TfJgݾՔ K!Q*piV3zDkq;ṿٶRAaSug-aTg'ȰwM j^)%Bz1̻d`|:dC ʌѓY=_[1x J:$9z"4:"Zv>\ydc Z*O9 y!Pd3@, wr^9.Si?2Tdn3W/'?~aˀ:C4l3w uMԴ!P߿`(ut]>|+Έ魃pq7>PÀ]i(֩n~isN}.Q_ڷdt %Slú3Ȱ~$ӈm[ h#๴[׿ &vH]ӛoIE?}Dԥʆo{gF7CfbP~3ڭa}LEa?b:)9`̏H>0G mr-zyK1a=C<T/Ǹ&uj2TlKf79)WNN.vk7<&YD).pc=JÍ^.)FaZM>X㯠I(0ՙu3n|' 5fN<;x4yE7ݾʫ$iBqjDƥ۸Ŀ*rqMKG/(9"_:ץ:u=^o{j]a 9|-..i:, sHƜw8oi\gW5i bYW啹[JIYˁ3'k%6n8g))Hցc kj3rPhWypZk)Pdq*b21O#8먳ZB#7$3^8eL^C.oB\VMؖ#VgP:!>C<ۗ#{AݗbK-+LJx^ e$Nr]8+if$2틀]%hRl<礽uh1]"9fxR%^<1yR/I䞇3꾂 ~avOA~b_k ==~D 7=o_ Z'}BZ6(餥ɐڻ5 9+PHîJp<4sb3U$ia~:xqZ_:tw*Z8.<Lԯ.G!j-OyEhUVxŪޓs(<Ȥ;XT@q; 5V(,M=1| p7Rp ۯ[CLF1qʹVieѧt\_w ԰,,kۇ͕K*GHTUmEtՄ&1~w\3ևU@Q-wrDvٷѢwY+ۥV=Ѥ!>gK6XU.4_-0kŸk&1-2ۦ"a^[^^42v^ihe!{'3;:YlKE ^\}Vork2`S)[Zj{,(HڡL`ߥ_P49 =-6-lbK2C._΁@?bOSf?G2G?s^s{b]|.-x'd..>ϟr\60zS0e S&]~I3VSF. whj41UMz8ʌؙ{uđnL>u⌜[x~2EY0,Ne#&gۉ#DwWg}gu1=Vx`s[3OѴEU3)WDP5s0舨gI*Y0 7̯cAk&46UTɰ DI ɞs;K3'Pyz]Q[תG Cu@=swڻ Tr|ܽ2,~'4+o^Bۭh֕4/M`;4qզ(d\Fqq:IcD#DdWYx!cCZD6ح|K8<n}b&:<ϫN;Ȁt_R~(.oXޜVDscܭ<%)sr69e.-bo@o]IVYcPf[tL# ~mG|??zV,t ~x]iLn)ȪDU^h=wQmfi-À&6KF%# Pq;K.:Un+oՌ !JOrX`MC~[kzZng.?FA;M1i]Z *":tBs VFzzw0>,R/k\82_^Z=]џoFL_͞zkR m?]9+%{ɵs&as6ҷ(^V;թE5ζsQK w!wZ?:sn`Աߛ3ӓ@ҋdsܥ9H&]hs8H6iqDoGbIjvEvu֗ۢ*鋞5\>EBVEÙƷ2ӆ@yC4pY^_2x112B`C癆<GzLI-*hx(b,+.!'8/ >2O˦ n KLW sX rzEC!Dc Xu PfYqɐb?~'0 k|e9& 1ѢUiM?YbRo&#T +E  95^9+#%#.7+$2e=-!ݣtI}ji1lCºK4fޛKͦF"czC~ *upcg ,t-a&4om;{Sfrl[tVuX/3J~biaW-w<|+ڛ,0 `pI",eH7}'kE棿'qϓ.bU| "z*beuMkV>A2vgd J@GWVӯG)jwFe\F\;6{H09U(=;srkSRtYdK7'u9 Mgض~S.\!-Xi"uq/j2 EY\؀h91sVx;K𦗷,T|< B%86 ttҀA_cG;1Wl9࿉ 0)/곲'PKM_.Kghword/settings.xmlTK0W WǢ=^Lb±#ہEN-R=}3߼Ǚ\>s`p%3]d .IX* *d91Cnocì'ӁҌ<#;kq|JjT$7JԂAI*+j nOAiTFj-ǘ[\+6 ͆ Gq(;EUΌJ]sI;Td\Z4tɵVzIK!#lw>+=qpq+#%֠ ̙@iۇTZ^YU:̴T현R#ge&'RΓdNydODF,}B/鏧V [qx0 0AA[sZ[yqK?"o!1.F JFy?GXĝYZ3

,rYNIHww8-ii h@p+ ҭT45ռ54IL=ȵgt(3b%#QkWUHA- Γ0#JDĜ;.b`z  /C|@4p-0 ([>,ֲiǰacxac`<+/W`t,ʓ8qpA#p.2{PKM_.KOT [Content_Types].xmlŖn0E ¢Ehe8cG Z Cvqx]'AYt0ʔx`I@a!z{tbMX~p u`(RXҧ/?Q_-<۬_ -wyΒݾh1\r19uFeYJd'Tʅ3ciA&0nDA"8B(d1=LpU0B&`4mQ'/h:4W9APJB"<t91/޺@!m>ZiP#p$:H7<b$ ߬5jCt>2y@$.>l nŮK5|FZY~w/8 _X_}Yfw }lHOB+shPK>K_.KcM _rels/.relsPK>K_.KI+docProps/core.xmlPK>K_.K; |'docProps/app.xmlPK>K_.KޛH ORword/document.xmlPK>M_.KG_ [K word/styles.xmlPK>M_.Kc7UW word/fontTable.xmlPK>M_.K%a60Y word/numbering.xmlPK>M_.K%<-Wt word/theme/theme1.xmlPK>M_.Ko`rI{ word/header1.xmlPK>M_.KdV | word/header2.xmlPK>M_.Kk`r word/footer1.xmlPK>M_.KP`% word/footer2.xmlPK>M_.KD,0 word/media/image1.pngPK>M_.Kތ) H word/media/image2.pngPK>M_.KR word/media/image3.pngPK>M_.KT@G word/media/image4.pngPK>M_.K[[bU word/media/image5.pngPK>M_.KghM word/settings.xmlPK>M_.KC word/_rels/document.xml.relsPK>M_.KOT  [Content_Types].xmlPK nextepc-0.3.10/lib/gtp/support/README000066400000000000000000000007251333553357400172140ustar00rootroot00000000000000 * Install python-pip user@host ~/Documents/git/nextepc/lib/gtp/support$ \ sudo apt-get install python-pip * Install python-docx user@host ~/Documents/git/nextepc/lib/gtp/support$ \ sudo pip install python-docx * Change the format of standard specification from 29274-d80.doc to 29274-d80.docx using Microsoft Office 2007+ * Generate TLV support files user@host ~/Documents/git/nextepc/lib/s1ap/support$ \ python gtp_tlv.py -f 29274-d80.docx -o .. nextepc-0.3.10/lib/gtp/support/cache/000077500000000000000000000000001333553357400173735ustar00rootroot00000000000000nextepc-0.3.10/lib/gtp/support/cache/tlv_group_list.py000066400000000000000000000350461333553357400230310ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "EBI", "ie_value" : "EPS Bearer ID", "presence" : "M", "instance" : "0", "comment" : ""}) ies.append({ "ie_type" : "Bearer TFT", "ie_value" : "TFT", "presence" : "O", "instance" : "0", "comment" : "This IE may be included on the S4/S11 interfaces."}) ies.append({ "ie_type" : "F-TEID", "ie_value" : "S1-U eNodeB F-TEID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S11 interface for X2-based handover with SGW relocation."}) type_list["F-TEID"]["max_instance"] = "1" ies.append({ "ie_type" : "F-TEID", "ie_value" : "S4-U SGSN F-TEID", "presence" : "C", "instance" : "1", "comment" : "This IE shall be included on the S4 interface if the S4-U interface is used."}) type_list["F-TEID"]["max_instance"] = "2" ies.append({ "ie_type" : "F-TEID", "ie_value" : "S5/S8-U SGW F-TEID", "presence" : "C", "instance" : "2", "comment" : "This IE shall be included on the S5/S8 interface for an E-UTRAN Initial Attach, a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN, a PDP Context Activation, a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN/GERAN or a UE Requested PDN Connectivity."}) type_list["F-TEID"]["max_instance"] = "3" ies.append({ "ie_type" : "F-TEID", "ie_value" : "S5/S8-U PGW F-TEID", "presence" : "C", "instance" : "3", "comment" : "This IE shall be included on the S4 and S11 interfaces for the TAU/RAU/Handover cases when the GTP-based S5/S8 is used."}) type_list["F-TEID"]["max_instance"] = "4" ies.append({ "ie_type" : "F-TEID", "ie_value" : "S12 RNC F-TEID", "presence" : "CO", "instance" : "4", "comment" : "This IE shall be included on the S4 interface if the S12 interface is used in the Enhanced serving RNS relocation with SGW relocation procedure."}) type_list["F-TEID"]["max_instance"] = "5" ies.append({ "ie_type" : "F-TEID", "ie_value" : "S2b-U ePDG F-TEID", "presence" : "C", "instance" : "5", "comment" : "This IE shall be included on the S2b interface for an Attach with GTP on S2b, a UE initiated Connectivity to Additional PDN with GTP on S2b, a Handover to Untrusted Non-3GPP IP Access with GTP on S2b and an Initial Attach for emergency session (GTP on S2b)."}) type_list["F-TEID"]["max_instance"] = "6" ies.append({ "ie_type" : "F-TEID", "ie_value" : "S2a-U TWAN F-TEID", "presence" : "C", "instance" : "6", "comment" : "This IE shall be included on the S2a interface for an Initial Attach in WLAN on GTP S2a, a UE initiated Connectivity to Additional PDN with GTP on S2a and a Handover to TWAN with GTP on S2a."}) ies.append({ "ie_type" : "Bearer QoS", "ie_value" : "Bearer Level QoS", "presence" : "M", "instance" : "0", "comment" : ""}) type_list["F-TEID"]["max_instance"] = "7" ies.append({ "ie_type" : "F-TEID", "ie_value" : "S11-U MME F-TEID", "presence" : "CO", "instance" : "7", "comment" : "This IE shall be sent on the S11 interface, if S11-U is being used, during the E-UTRAN Initial Attach and UE requested PDN connectivity procedures. This IE may also be sent on the S11 interface, if S11-U is being used, during a Tracking Area Update procedure with Serving GW change, if the MME needs to establish the S11-U tunnel. See NOTE 2."}) group_list["Bearer Context"] = { "type" : "93", "ies" : ies } added_ies = group_list["Bearer Context"]["ies"] ies = [] ies.append({ "ie_type" : "Sequence Number", "ie_value" : "Overload Control Sequence Number", "presence" : "M", "instance" : "0", "comment" : "See clause 12.3.5.1.2.1 for the description and use of this parameter."}) ies.append({ "ie_type" : "Metric", "ie_value" : "Overload Reduction Metric", "presence" : "M", "instance" : "0", "comment" : "See clause 12.3.5.1.2.3 for the description and use of this parameter."}) ies.append({ "ie_type" : "EPC Timer", "ie_value" : "Period of Validity", "presence" : "M", "instance" : "0", "comment" : "See clause 12.3.5.1.2.2 for the description and use of this parameter.This IE should be set to 0 if the Overload Reduction Metric is null. This IE shall be ignored by the receiver if the Overload Reduction Metric is null."}) group_list["Overload Control Information"] = { "type" : "180", "ies" : ies } ies = [] ies.append({ "ie_type" : "Remote User ID", "ie_value" : "Remote User ID", "presence" : "M", "instance" : "0", "comment" : "See subclause 8.123 for the description and use of this parameter"}) ies.append({ "ie_type" : "Remote UE IP Information", "ie_value" : "Remote UE IP Information", "presence" : "M", "instance" : "0", "comment" : "See subclause 8.124 for the description and use of this parameter"}) group_list["Remote UE Context"] = { "type" : "191", "ies" : ies } added_ies = group_list["Bearer Context"]["ies"] added_ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : "This IE shall indicate if the bearer handling was successful, and if not, it gives information on the reason. (NOTE 1, NOTE 2, NOTE 3)"}) added_ies.append({ "ie_type" : "Charging ID", "ie_value" : "Charging Id", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 interface for an E-UTRAN initial attach, a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN, a PDP Context Activation, a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN/GERAN and a UE requested PDN connectivity."}) added_ies.append({ "ie_type" : "Bearer Flags", "ie_value" : "Bearer Flags", "presence" : "O", "instance" : "0", "comment" : "Applicable flags are:PPC (Prohibit Payload Compression) : this flag may be set on the S5/S8 and S4 interfaces."}) group_list["Bearer Context"] = { "type" : "93", "ies" : added_ies } added_ies = group_list["Bearer Context"]["ies"] ies = [] ies.append({ "ie_type" : "Sequence Number", "ie_value" : "Load Control Sequence Number", "presence" : "M", "instance" : "0", "comment" : "See clause 12.2.5.1.2.1 for the description and use of this parameter."}) ies.append({ "ie_type" : "Metric", "ie_value" : "Load Metric", "presence" : "M", "instance" : "0", "comment" : "See clauses 12.2.5.1.2.2 and 12.2.5.1.2.3 for the description and use of this parameter."}) ies.append({ "ie_type" : "APN and Relative Capacity", "ie_value" : "List of APN and Relative Capacity", "presence" : "CO", "instance" : "0", "comment" : "The IE shall (only) be present in the PGWs APN level Load Control Information IE.For indicating the APN level load, the PGW shall include one or more instances of this IE, up to maximum of 10, with the same type and instance value, representing a list of APN(s) & its respective Relative Capacity (sharing the same Load Metric).See clause 12.2.5.1.2.3 for the description and use of this parameter.See NOTE 1."}) group_list["Load Control Information"] = { "type" : "181", "ies" : ies } added_ies = group_list["Overload Control Information"]["ies"] added_ies.append({ "ie_type" : "APN", "ie_value" : "List of Access Point Name", "presence" : "CO", "instance" : "0", "comment" : "The IE may (only) be present in the PGWs Overload Control Information IE.For indicating the APN level overload, the PGW shall include one or more instances of this IE, up to maximum of 10, with the same type and instance value, representing a list of APN(s) (sharing the same Overload Reduction Metric and Period of Validity). See NOTE 1."}) group_list["Overload Control Information"] = { "type" : "180", "ies" : added_ies } added_ies = group_list["Bearer Context"]["ies"] added_ies.append({ "ie_type" : "PCO", "ie_value" : "Protocol Configuration Options", "presence" : "O", "instance" : "0", "comment" : "This IE may be sent on the S5/S8 and S4/S11 interfaces if ePCO is not supported by the UE or the network. This bearer level IE takes precedence over the PCO IE in the message body if they both exist."}) added_ies.append({ "ie_type" : "ePCO", "ie_value" : "Extended Protocol Configuration Options", "presence" : "O", "instance" : "0", "comment" : "This IE may be sent on the S5/S8 and S11 interfaces if the UE and the network support ePCO."}) group_list["Bearer Context"] = { "type" : "93", "ies" : added_ies } added_ies = group_list["Load Control Information"]["ies"] added_ies = group_list["Overload Control Information"]["ies"] added_ies = group_list["Bearer Context"]["ies"] type_list["F-TEID"]["max_instance"] = "8" added_ies.append({ "ie_type" : "F-TEID", "ie_value" : "S2b-U ePDG F-TEID", "presence" : "C", "instance" : "8", "comment" : "This IE shall be sent on the S2b interface."}) type_list["F-TEID"]["max_instance"] = "9" added_ies.append({ "ie_type" : "F-TEID", "ie_value" : "S2b-U PGW F-TEID", "presence" : "C", "instance" : "9", "comment" : "This IE shall be sent on the S2b interface. It shall be used to correlate the bearers with those in the Create Bearer Request."}) type_list["F-TEID"]["max_instance"] = "10" added_ies.append({ "ie_type" : "F-TEID", "ie_value" : "S2a-U TWAN F-TEID", "presence" : "C", "instance" : "10", "comment" : "This IE shall be sent on the S2a interface."}) type_list["F-TEID"]["max_instance"] = "11" added_ies.append({ "ie_type" : "F-TEID", "ie_value" : "S2a-U PGW F-TEID", "presence" : "C", "instance" : "11", "comment" : "This IE shall be sent on the S2a interface. It shall be used to correlate the bearers with those in the Create Bearer Request."}) added_ies.append({ "ie_type" : "RAN/NAS Cause", "ie_value" : "RAN/NAS Cause", "presence" : "CO", "instance" : "0", "comment" : "If the bearer creation failed, the MME shall include this IE on the S11 interface to indicate the RAN cause and/or the NAS cause of the bearer creation failure, if available and if this information is permitted to be sent to the PGW operator according to MME operators policy. If both a RAN cause and a NAS cause are generated, then several IEs with the same type and instance value shall be included to represent a list of causes.The SGW shall include this IE on the S5/S8 interface if it receives it from the MME."}) group_list["Bearer Context"] = { "type" : "93", "ies" : added_ies } added_ies = group_list["Overload Control Information"]["ies"] added_ies = group_list["Overload Control Information"]["ies"] added_ies = group_list["Overload Control Information"]["ies"] added_ies = group_list["Bearer Context"]["ies"] added_ies = group_list["Bearer Context"]["ies"] added_ies = group_list["Overload Control Information"]["ies"] added_ies = group_list["Bearer Context"]["ies"] added_ies = group_list["Bearer Context"]["ies"] added_ies = group_list["Load Control Information"]["ies"] added_ies = group_list["Overload Control Information"]["ies"] added_ies = group_list["Overload Control Information"]["ies"] added_ies = group_list["Bearer Context"]["ies"] added_ies = group_list["Load Control Information"]["ies"] added_ies = group_list["Overload Control Information"]["ies"] added_ies = group_list["Load Control Information"]["ies"] added_ies = group_list["Overload Control Information"]["ies"] added_ies = group_list["Bearer Context"]["ies"] added_ies = group_list["Overload Control Information"]["ies"] added_ies = group_list["Load Control Information"]["ies"] added_ies = group_list["Overload Control Information"]["ies"] added_ies = group_list["Bearer Context"]["ies"] added_ies = group_list["Overload Control Information"]["ies"] added_ies = group_list["Overload Control Information"]["ies"] added_ies = group_list["Bearer Context"]["ies"] added_ies.append({ "ie_type" : "APCO", "ie_value" : "Additional Protocol Configuration Options", "presence" : "CO", "instance" : "0", "comment" : "The PGW shall include the Additional Prococol Configuration Options (APCO) IE on the S2b interface, including the list of available P-CSCF addresses, as part of the P-CSCF restoration extension procedure for the untrusted WLAN access, as specified in 3GPP TS 23.380 [61]."}) group_list["Bearer Context"] = { "type" : "93", "ies" : added_ies } added_ies = group_list["Load Control Information"]["ies"] added_ies = group_list["Overload Control Information"]["ies"] added_ies = group_list["Bearer Context"]["ies"] added_ies = group_list["Overload Control Information"]["ies"] added_ies = group_list["Bearer Context"]["ies"] added_ies = group_list["Overload Control Information"]["ies"] added_ies = group_list["Bearer Context"]["ies"] added_ies = group_list["Overload Control Information"]["ies"] added_ies = group_list["Bearer Context"]["ies"] added_ies = group_list["Bearer Context"]["ies"] added_ies = group_list["Load Control Information"]["ies"] added_ies = group_list["Overload Control Information"]["ies"] added_ies = group_list["Bearer Context"]["ies"] added_ies = group_list["Bearer Context"]["ies"] added_ies = group_list["Bearer Context"]["ies"] added_ies = group_list["Bearer Context"]["ies"] added_ies = group_list["Load Control Information"]["ies"] added_ies = group_list["Overload Control Information"]["ies"] added_ies = group_list["Remote UE Context"]["ies"] added_ies = group_list["Remote UE Context"]["ies"] ies = [] group_list["PDN Connection"] = { "type" : "109", "ies" : ies } added_ies = group_list["Bearer Context"]["ies"] added_ies.append({ "ie_type" : "F-Container", "ie_value" : "BSS Container", "presence" : "CO", "instance" : "0", "comment" : "The MME/S4 SGSN shall include the Packet Flow ID, Radio Priority, SAPI, PS Handover XID parameters in the TAU/RAU/Handover procedure, if available. See Figure 8.48-2. The Container Type shall be set to 2."}) added_ies.append({ "ie_type" : "TI", "ie_value" : "Transaction Identifier", "presence" : "C", "instance" : "0", "comment" : "This IE shall be sent over S3/S10/S16 if the UE supports A/Gb and/or Iu mode."}) group_list["Bearer Context"] = { "type" : "93", "ies" : added_ies } added_ies = group_list["Remote UE Context"]["ies"] ies = [] ies.append({ "ie_type" : "APN", "ie_value" : "APN", "presence" : "M", "instance" : "0", "comment" : ""}) ies.append({ "ie_type" : "EBI", "ie_value" : "Default EPS Bearer ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall identify the default bearer of the SCEF PDN Connection."}) ies.append({ "ie_type" : "Node Identifier", "ie_value" : "SCEF ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall include the SCEF Identifier and the SCEF Realm for the APN."}) group_list["SCEF PDN Connection"] = { "type" : "195", "ies" : ies } added_ies = group_list["Bearer Context"]["ies"] added_ies.append({ "ie_type" : "Packet Flow ID", "ie_value" : "Packet Flow ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if the message is used for PS handover and Inter RAT handover to/from A/Gb mode procedures."}) group_list["Bearer Context"] = { "type" : "93", "ies" : added_ies } added_ies = group_list["PDN Connection"]["ies"] added_ies = group_list["Bearer Context"]["ies"] added_ies = group_list["Remote UE Context"]["ies"] added_ies = group_list["Bearer Context"]["ies"] added_ies = group_list["PDN Connection"]["ies"] added_ies = group_list["PDN Connection"]["ies"] nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_1.py000066400000000000000000000010651333553357400216420ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "M", "instance" : "0", "comment" : ""}) ies.append({ "ie_type" : "Node Features", "ie_value" : "Sending Node Features", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be sent towards a peer node on any GTPv2 interface if the sending node supports at least one feature on this interface or if the sending node supports at least one feature and does not know the interface type towards the peer node. This IE may be present otherwise. "}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_100.py000066400000000000000000000171211333553357400220020ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : ""}) ies.append({ "ie_type" : "EBI", "ie_value" : "Linked EPS Bearer ID", "presence" : "C", "instance" : "0", "comment" : "If the response corresponds to the bearer deactivation procedure in case all the bearers associated with the default bearer of a PDN connection shall be released, this IE shall be included on the S4/S11, S5/S8 and S2a/S2b interfaces to indicate the default bearer associated with the PDN being disconnected."}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts", "presence" : "C", "instance" : "0", "comment" : "It shall be used on the S4/S11, S5/S8 and S2a/S2b interfaces for bearers different from default one. In this case at least one bearer shall be included.Several IEs with this type and instance values shall be included as necessary to represent a list of Bearers.Used for dedicated bearers. When used, at least one dedicated bearer shall be present. All the bearer contexts included in the EPS Bearer IDs IE of the corresponding Delete Bearer Request shall be included."}) ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S4/S11, S5/S8 and S2a/S2b interfaces if contacting the peer for the first time "}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "MME-FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included by MME the on S11 interface and shall be forwarded by the SGW on S5/S8 interface according to the requirements in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "SGW-FQ-CSID", "presence" : "C", "instance" : "1", "comment" : "This IE shall be included by the SGW on the S5/S8 interface according to the requirements in 3GPP TS 23.007 [17]."}) type_list["FQ-CSID"]["max_instance"] = "2" ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "ePDG-FQ-CSID", "presence" : "C", "instance" : "2", "comment" : "This IE shall be included by the ePDG on the S2b interface according to the requirements in 3GPP TS 23.007 [17]."}) type_list["FQ-CSID"]["max_instance"] = "3" ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "TWAN-FQ-CSID", "presence" : "C", "instance" : "3", "comment" : "This IE shall be included by the TWAN on the S2a interface according to the requirements in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "PCO", "ie_value" : "Protocol Configuration Options", "presence" : "CO", "instance" : "0", "comment" : "An MME/SGSN shall include the PCO IE if such information was received from the UE. If the SGW receives this IE, the SGW shall forward it to PGW on the S5/S8 interface."}) ies.append({ "ie_type" : "UE Time Zone", "ie_value" : "UE Time Zone", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included, if available, by the MME on the S11 interface or by the SGSN on the S4 interface."}) ies.append({ "ie_type" : "ULI", "ie_value" : "User Location Information", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included by the MME on the S11 interface or by the SGSN on the S4 interface. The CGI/SAI shall be included by SGSN and the ECGI shall be included by MME. See NOTE 2."}) ies.append({ "ie_type" : "ULI Timestamp", "ie_value" : "ULI Timestamp", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S4/S11 interface if the ULI IE is present. It indicates the time when the User Location Information was acquired. The SGW shall include this IE on S5/S8 if the SGW receives it from the MME/SGSN. See NOTE 1."}) ies.append({ "ie_type" : "TWAN Identifier", "ie_value" : "TWAN Identifier", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included by the TWAN on the S2a interface as specified in 3GPP TS 23.402 [45]. "}) ies.append({ "ie_type" : "TWAN Identifier Timestamp", "ie_value" : "TWAN Identifier Timestamp", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included by the TWAN on the S2a interface if the TWAN Identifier IE is present. It shall indicate the time when the TWAN acquired the TWAN Identifier information. "}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "MME/S4-SGSN's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the MME/S4-SGSN may include this IE on the S11/S4 interface if the overload control feature is supported by the MME/S4-SGSN and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the MME/S4-SGSN shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S5/S8 interface if the overload control feature is supported by the SGW and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "IP Address", "ie_value" : "MME/S4-SGSN Identifier", "presence" : "CO", "instance" : "0", "comment" : "If the overload control feature is supported by the MME/S4-SGSN and is activated for the PLMN to which the PGW belongs (see subclause 12.3.11), the MME/S4-SGSN shall include this IE on the S11/S4 interface when there is at least one bearer remaining for the given PDN connection after the bearer deletion, and the PGW has not been updated with the identity of the currently serving MME/S4-SGSN, i.e. if no other message carrying MME/S4-SGSN identity has been sent to the PGW during/after an inter-MME/S4-SGSN intra-SGW mobility procedure."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "TWAN/ePDG's Overload Control Information", "presence" : "O", "instance" : "2", "comment" : "During an overload condition, the TWAN/ePDG may include this IE over the S2a/S2b interface if the overload control feature is supported by the TWAN/ePDG and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the TWAN/ePDG shall provide only one instance of this IE, representing its overload information."}) type_list["TWAN Identifier"]["max_instance"] = "1" ies.append({ "ie_type" : "TWAN Identifier", "ie_value" : "WLAN Location Information", "presence" : "CO", "instance" : "1", "comment" : "The ePDG shall include this IE on the S2b interface if the WLAN Location Information is available. "}) type_list["TWAN Identifier Timestamp"]["max_instance"] = "1" ies.append({ "ie_type" : "TWAN Identifier Timestamp", "ie_value" : "WLAN Location Timestamp", "presence" : "CO", "instance" : "1", "comment" : "The ePDG shall include this IE on the S2b interface, if the WLAN Location Timestamp is available. "}) ies.append({ "ie_type" : "Port Number", "ie_value" : "UE UDP Port", "presence" : "CO", "instance" : "0", "comment" : "The ePDG shall include this IE on the S2b interface if NAT is detected and UDP encapsulation is used."}) ies.append({ "ie_type" : "F-Container", "ie_value" : "NBIFOM Container", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S11/S4 or S2a/S2b interfaces if the MME/S4-SGSN or the TWAN/ePDG receives a NBIFOM Container from the UE as specified in 3GPP TS 24.161 73]. The Container Type shall be set to 4."}) ies.append({ "ie_type" : "Port Number", "ie_value" : "UE TCP Port ", "presence" : "CO", "instance" : "1", "comment" : "The ePDG shall include this IE on the S2b interface if NAT is detected and TCP encapsulation is used."}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_166.py000066400000000000000000000105471333553357400220230ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "IMSI", "ie_value" : "IMSI", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included by the MME/SGSN if the SGW that the MME/SGSN selects for indirect data forwarding is different from the SGW already in use for the UE as the anchor point except for the case: - If the UE is emergency attached and the UE is UICClessWhen the IMSI is included in the message, it is not used as an identifier- if UE is emergency attached but IMSI is not authenticated.See NOTE1."}) ies.append({ "ie_type" : "MEI", "ie_value" : "ME Identity", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included by the MME/SGSN if the SGW that the MME/SGSN selects for indirect data forwarding is different from the SGW already in use for the UE as the anchor point and if one of the following condition satisfies:- If the UE is emergency attached and the UE is UICCless- If the UE is emergency attached and the IMSI is not authenticated"}) ies.append({ "ie_type" : "Indication", "ie_value" : "Indication Flags", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included if any one of the applicable flags is set to 1.Applicable flags are:Unauthenticated IMSI: This flag shall be set to 1 if the IMSI present in the message is not authenticated and is for an emergency attached UE."}) ies.append({ "ie_type" : "F-TEID", "ie_value" : "Sender F-TEID for Control Plane", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included by the MME/SGSN if the SGW that the MME/SGSN selects for indirect data forwarding is different from the SGW already in use for the UE as the anchor point.See NOTE1."}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context 0", "presence" : "M", "instance" : "0", "comment" : "Several IEs with this type and instance value may be included as necessary to represent a list of Bearers"}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context 1", "presence" : "O", "instance" : "1", "comment" : "Several IEs with this type and instance value may be included as necessary to represent a list of Bearers"}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context 2", "presence" : "O", "instance" : "2", "comment" : "Several IEs with this type and instance value may be included as necessary to represent a list of Bearers"}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context 3", "presence" : "O", "instance" : "3", "comment" : "Several IEs with this type and instance value may be included as necessary to represent a list of Bearers"}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context 4", "presence" : "O", "instance" : "4", "comment" : "Several IEs with this type and instance value may be included as necessary to represent a list of Bearers"}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context 5", "presence" : "O", "instance" : "5", "comment" : "Several IEs with this type and instance value may be included as necessary to represent a list of Bearers"}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context 6", "presence" : "O", "instance" : "6", "comment" : "Several IEs with this type and instance value may be included as necessary to represent a list of Bearers"}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context 7", "presence" : "O", "instance" : "7", "comment" : "Several IEs with this type and instance value may be included as necessary to represent a list of Bearers"}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context 8", "presence" : "O", "instance" : "8", "comment" : "Several IEs with this type and instance value may be included as necessary to represent a list of Bearers"}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context 9", "presence" : "O", "instance" : "9", "comment" : "Several IEs with this type and instance value may be included as necessary to represent a list of Bearers"}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context 10", "presence" : "O", "instance" : "10", "comment" : "Several IEs with this type and instance value may be included as necessary to represent a list of Bearers"}) ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included if contacting the peer for the first time."}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_167.py000066400000000000000000000071571333553357400220270ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : ""}) ies.append({ "ie_type" : "F-TEID", "ie_value" : "Sender F-TEID for Control Plane", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included by an SGW if the SGW receives a Sender F-TEID for Control Plane IE from an MME/SGSN in a Create Indirect Data Forwarding Tunnel Request message.See also NOTE 1 in Table 7.2.18-1."}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context 0", "presence" : "M", "instance" : "0", "comment" : "Several IEs with this type and instance value may be included as necessary to represent a list of Bearers"}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context 1", "presence" : "O", "instance" : "1", "comment" : "Several IEs with this type and instance value may be included as necessary to represent a list of Bearers"}) type_list["Bearer Context"]["max_instance"] = "2" ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context 2", "presence" : "O", "instance" : "2", "comment" : "Several IEs with this type and instance value may be included as necessary to represent a list of Bearers"}) type_list["Bearer Context"]["max_instance"] = "3" ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context 3", "presence" : "O", "instance" : "3", "comment" : "Several IEs with this type and instance value may be included as necessary to represent a list of Bearers"}) type_list["Bearer Context"]["max_instance"] = "4" ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context 4", "presence" : "O", "instance" : "4", "comment" : "Several IEs with this type and instance value may be included as necessary to represent a list of Bearers"}) type_list["Bearer Context"]["max_instance"] = "5" ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context 5", "presence" : "O", "instance" : "5", "comment" : "Several IEs with this type and instance value may be included as necessary to represent a list of Bearers"}) type_list["Bearer Context"]["max_instance"] = "6" ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context 6", "presence" : "O", "instance" : "6", "comment" : "Several IEs with this type and instance value may be included as necessary to represent a list of Bearers"}) type_list["Bearer Context"]["max_instance"] = "7" ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context 7", "presence" : "O", "instance" : "7", "comment" : "Several IEs with this type and instance value may be included as necessary to represent a list of Bearers"}) type_list["Bearer Context"]["max_instance"] = "8" ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context 8", "presence" : "O", "instance" : "8", "comment" : "Several IEs with this type and instance value may be included as necessary to represent a list of Bearers"}) type_list["Bearer Context"]["max_instance"] = "9" ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context 9", "presence" : "O", "instance" : "9", "comment" : "Several IEs with this type and instance value may be included as necessary to represent a list of Bearers"}) type_list["Bearer Context"]["max_instance"] = "10" ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context 10", "presence" : "O", "instance" : "10", "comment" : "Several IEs with this type and instance value may be included as necessary to represent a list of Bearers"}) ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included if contacting the peer for the first time"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_168.py000066400000000000000000000000441333553357400220140ustar00rootroot00000000000000ies = [] msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_169.py000066400000000000000000000006751333553357400220270ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : "This IE shall indicate if the deletion of indirect tunnel is successful, and if not, gives information on the reason."}) ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if contacting the peer for the first time."}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_170.py000066400000000000000000000026311333553357400220110ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "EBI", "ie_value" : "List of RABs", "presence" : "C", "instance" : "0", "comment" : "Shall be present on S4 interface when this message is used to release a subset of all active RABs according to the RAB release procedure.Several IEs with this type and instance values shall be included as necessary to represent a list of RABs to be released."}) ies.append({ "ie_type" : "Node Type", "ie_value" : "Originating Node", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be sent on S11 interface, if ISR is active in the MME.This IE shall be sent on S4 interface, if ISR is active in the SGSNSee NOTE 1."}) ies.append({ "ie_type" : "Indication", "ie_value" : "Indication Flags", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included if any one of the applicable flags is set to 1.Applicable flags are:Abnormal Release of Radio Link: This flag shall be set to 1 on the S11 interface - if the S1 release is due to an abnormal release of the radio link, e.g. when the MME receives UE CONTEXT RELEASE REQUEST with the cause value set to Radio Connection With UE Lost, or- if the MME performs DL data buffering and the operator specified policy/configuration conditions for triggering the PGW pause of charging are met (e.g. number/fraction of packets/bytes dropped at MME in downlink) as specified in subclause 5.3.6A of 3GPP TS23.401 [3]."}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_171.py000066400000000000000000000033331333553357400220120ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : ""}) ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "O", "instance" : "0", "comment" : "This IE shall be included if contacting the peer for the first time"}) ies.append({ "ie_type" : "Indication", "ie_value" : "Indication Flags", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included if any one of the applicable flags is set to 1.Applicable flags are:Associate OCI with SGW nodes identity: The SGW shall set this flag to 1 on the S11/S4 interface if it has included the SGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the DNS during the SGW selection) of the serving SGW."}) ies.append({ "ie_type" : "Load Control Information", "ie_value" : "SGW's node level Load Control Information", "presence" : "O", "instance" : "0", "comment" : "The SGW may include this IE, over the S11/S4 interface if the load control feature is supported by the SGW and is activated in the network (see clause 12.2.6).When present, the SGW shall provide only one instance of this IE, representing its node level load information."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the SGW may include this IE over the S11/S4 interface if the overload control feature is supported by the SGW and is activated in the network (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_176.py000066400000000000000000000154461333553357400220270ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "CO", "instance" : "0", "comment" : "If SGW receives an Error Indication from eNodeB/RNC/S4-SGSN/MME, the SGW shall send the Cause IE with value Error Indication received from RNC/eNodeB/S4-SGSN/MME to MME/S4-SGSN as specified in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "EBI", "ie_value" : "EPS Bearer ID", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S11 and S4 interfaces and shall be set as follows: If the Downlink Data Notification is triggered by the arrival of downlink data packets at the SGW, the SGW shall include the EPS Bearer ID stored in the EPS bearer context of the bearer on which the downlink data packet was received; If the Downlink Data Notification is triggered by the receipt of an Error Indication from the eNodeB, RNC or S4-SGSN, the SGW shall include the EPS Bearer ID stored in the EPS bearer context of the bearer for which the Error Indication was received;If the ISR is active and the Downlink Data Notification is triggered by the arrival of control plane signalling, the SGW shall include the EPS Bearer ID present in the control plane signalling or derived from the control plane signaling (for PMIP based S5/S8), See NOTE 3). For a Downlink Data Notification triggered by a Create Bearer Request message, the SGW shall include the EPS Bearer ID of the corresponding PDN connections default bearer.If both the SGW and the MME/S4-SGSN support the network triggered service restoration procedure (see 3GPP TS 23.007 [17]), and if the Downlink Data Notification is triggered by the arrival of control plane signalling, the SGW shall include the EPS Bearer ID present in the control plane signalling or derived from the control plane signaling (for PMIP based S5/S8). (See 3GPP TS 23.401[3], section 5.3.4.3).More than one IE with this type and instance values may be included to represent multiple bearers having received downlink data packets or being signalled in the received control plane message. See NOTE 1."}) ies.append({ "ie_type" : "ARP", "ie_value" : "Allocation/Retention Priority", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S11 and S4 interfaces and shall be set as follows: If the Downlink Data Notification is triggered by the arrival of downlink data packets at the SGW, the SGW shall include the ARP stored in the EPS bearer context of the bearer on which the downlink data packet was received; If the Downlink Data Notification is triggered by the receipt of an Error Indication from the eNodeB, RNC or S4-SGSN, the SGW shall include the ARP stored in the EPS bearer context of the bearer for which the Error Indication was received.If the ISR is active and the Downlink Data Notification is triggered by the arrival of control plane signalling, the SGW shall include the ARP if present in the control plane signalling. If the ARP is not present in the control plane signalling, the SGW shall include the ARP in the stored EPS bearer context. See NOTE 3.If both the SGW and the MME/S4-SGSN support the network triggered service restoration procedure (see 3GPP TS 23.007 [17]), and if the Downlink Data Notification is triggered by the arrival of control plane signalling, the SGW shall include the ARP if present in the control plane signalling. If the ARP is not present in the control plane signalling, the SGW shall include the ARP from the stored EPS bearer context. (See 3GPP TS 23.401[3], section 5.3.4.3).If multiple EPS Bearers IDs are reported in the message, the SGW shall include the ARP associated with the bearer with the highest priority (i.e. the lowest ARP Priority Level value).See NOTE 1."}) ies.append({ "ie_type" : "IMSI", "ie_value" : "IMSI", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S11/S4 interface as part of the network triggered service restoration procedure if both the SGW and the MME/S4-SGSN support this optional feature (see 3GPP TS 23.007 [17])."}) ies.append({ "ie_type" : "F-TEID", "ie_value" : "Sender F-TEID for Control Plane", "presence" : "O", "instance" : "0", "comment" : "This IE may be included on the S11/S4 interface towards the restarted CN node or an alternative CN node (same type of mobility node as the failed one) as part of the network triggered service restoration procedure with or without ISR if both the SGW and the MME/S4-SGSN support this optional feature (see 3GPP TS 23.007 [17]). This IE shall not be included otherwise.(NOTE 2)"}) ies.append({ "ie_type" : "Indication", "ie_value" : "Indication Flags", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included if any one of the applicable flags is set to 1.Applicable flags are:Associate OCI with SGW nodes identity: The SGW shall set this flag to 1 on the S11/S4 interface if it has included the SGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the DNS during the SGW selection) of the serving SGW."}) ies.append({ "ie_type" : "Load Control Information", "ie_value" : "SGW's node level Load Control Information", "presence" : "O", "instance" : "0", "comment" : "The SGW may include this IE, over the S11/S4 interface if the load control feature is supported by the SGW and is activated in the network (see clause 12.2.6).When present, the SGW shall provide only one instance of this IE, representing its node level load information."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the SGW may include this IE over the S5/S8 interface if the overload control feature is supported by the SGW and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "Paging and Service Information", "ie_value" : "Paging and Service Information", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S11 and S4 interfaces, for an IP PDN connection, if the SGW supports the Paging Policy Differentiation feature (see subclause 4.9 of 3GPP TS 23.401 [3]) and if the Downlink Data Notification is triggered by the arrival of downlink data packets at the SGW. If the preceding conditions are fulfilled, then for each bearer and for each packet that triggers a Downlink Data Notification, the SGW shall copy, into the Paging Policy Indication value within this IE, the value of the DSCP in TOS (IPv4) or TC (IPv6) information received in the IP payload of the GTP-U packet from the PGW (see IETF RFC 2474 [65]).See NOTE 4.One IE with this type and instance value shall be included per EPS Bearers ID reported in the message, See NOTE 1."}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_177.py000066400000000000000000000053441333553357400220240ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : ""}) ies.append({ "ie_type" : "Delay Value", "ie_value" : "Data Notification Delay", "presence" : "C", "instance" : "0", "comment" : "he MME/SGSN shall include the delay the SGW shall apply between receiving downlink data and sending Downlink Data Notification for all UEs served by that MME/SGSN (see subclause 5.3.4.2 of 3GPP TS 23.401 [3]), if the rate of Downlink Data Notification event occurrence in the MME/SGSN becomes significant (as configured by the operator) and the MME/SGSNs load exceeds an operator configured value.See NOTE 4."}) ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if contacting the peer for the first time "}) ies.append({ "ie_type" : "Throttling", "ie_value" : "DL low priority traffic Throttling ", "presence" : "O", "instance" : "0", "comment" : "The MME/SGSN may send this IE to the SGW to request the SGW to reduce the number of Downlink Data Notification requests it sends for downlink low priority traffic received for UEs in idle mode served by that MME/SGSN in proportion to the Throttling Factor and during the Throttling Delay. See NOTE 1, NOTE 2, NOTE 3."}) ies.append({ "ie_type" : "IMSI", "ie_value" : "IMSI", "presence" : "CO", "instance" : "0", "comment" : "3GPP TS 23.007 [17] specifies conditions for sending this IE on the S11/S4 interface as part of the network triggered service restoration procedure, if both the SGW and the MME/S4-SGSN support this optional feature."}) ies.append({ "ie_type" : "EPC Timer", "ie_value" : "DL Buffering Duration", "presence" : "CO", "instance" : "0", "comment" : "The MME/SGSN shall include this IE on the S11/S4 interface to indicate the duration during which the SGW shall buffer DL data for this UE without sending any further Downlink Data Notification message, if extended buffering in the SGW is required: - for a UE in a power saving state (e.g. Power Saving Mode or extended idle mode DRX) that cannot be reached by paging at the moment, as specified in subclause 5.3.4.3 of 3GPP TS 23.401 [3], or.- for a UE using NB-IoT, WB-EUTRAN or GERAN Extended Coverage with increased NAS transmission delay (see 3GPP TS 24.301 [23] and 3GPP TS 24.008 [5]).If this IE is included, the Cause IE shall be set to Request Accepted."}) ies.append({ "ie_type" : "Integer Number", "ie_value" : "DL Buffering Suggested Packet Count", "presence" : "O", "instance" : "0", "comment" : "The MME/SGSN may include this IE on the S11/S4 interface, if the DL Buffering Duration IE is included, to suggest the maximum number of downlink data packets to be buffered in the SGW for this UE. "}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_2.py000066400000000000000000000010641333553357400216420ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "M", "instance" : "0", "comment" : ""}) ies.append({ "ie_type" : "Node Features", "ie_value" : "Sending Node Features", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be sent towards a peer node on any GTPv2 interface if the sending node supports at least one feature on this interface or if the sending node supports at least one feature and does not know the interface type towards the peer node. This IE may be present otherwise."}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_211.py000066400000000000000000000053611333553357400220100ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "Indication", "ie_value" : "Indication Flags", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if any one of the applicable flags is set to 1.Applicable flags are:ISRAI: This flag shall be set to 1 if ISR is established between the MME and the S4 SGSN for an S1-based Handover without SGW relocation and for an X2-based Handover without SGW relocation. Change F-TEID support Indication: This flag shall be set to 1 for an IDLE state UE initiated TAU procedure to allow the SGW changing the GTP-U F-TEID.S11-U Tunnel Flag: this flag shall be set to 1 on the S11 interface if user data is transported in NAS signalling."}) ies.append({ "ie_type" : "F-TEID", "ie_value" : "Sender F-TEID for Control Plane", "presence" : "C", "instance" : "0", "comment" : "The new MME shall include this IE on the S11 interface for a TAU/Handover with MME change and without any SGW change. If the SGW receives this IE and if it finds that its value is the same as the earlier received value of this IE for this UE, it should interpret this to mean that the MME has not changed."}) ies.append({ "ie_type" : "Delay Value", "ie_value" : "Delay Downlink Packet Notification Request", "presence" : "C", "instance" : "0", "comment" : "This IE shall be sent for a UE triggered Service Request and UE initiated Connection Resume procedures. It shall contain the delay the SGW shall apply between receiving downlink data and sending Downlink Data Notification for all UEs served by that MME (see subclause 5.3.4.2 of 3GPP TS 23.401 [3])."}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts to be modified", "presence" : "C", "instance" : "0", "comment" : "Several IEs with the same type and instance value may be included as necessary to represent a list of Bearers to be modified.See NOTE 1."}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts to be removed", "presence" : "C", "instance" : "1", "comment" : "This IE shall be included for the TAU/Handover, UE initiated Connection Resume and Service Request procedures where any of the bearers existing before the TAU/Handover procedure, UE initiated Connection Resume and Service Request procedures will be deactivated as consequence of the TAU/Handover procedure, UE initiated Connection Resume and Service Request procedures. For the Service Request and UE initiated Connection Resume procedures, all unaccepted bearers for this UE shall be included.For each of those bearers, an IE with the same type and instance value, shall be included.See NOTE 1."}) ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if contacting the peer for the first time. "}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_212.py000066400000000000000000000050171333553357400220070ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : ""}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts modified", "presence" : "C", "instance" : "0", "comment" : "EPS bearers corresponding to Bearer Contexts to be modified that were sent in Modify Access Bearers Request message. Several IEs with the same type and instance value may be included as necessary to represent a list of the Bearers which are modified."}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts marked for removal", "presence" : "C", "instance" : "1", "comment" : "EPS bearers corresponding to Bearer Contexts to be removed that were sent in the Modify Access Bearers Request message. Shall be included if request message contained Bearer Contexts to be removed.For each of those bearers an IE with the same type and instance value shall be included."}) ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if contacting the peer for the first time."}) ies.append({ "ie_type" : "Indication", "ie_value" : "Indication Flags", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included if any one of the applicable flags is set to 1.Applicable flags are:Associate OCI with SGW nodes identity: The SGW shall set this flag to 1 on the S11/S4 interface if it has included the SGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the DNS during the SGW selection) of the serving SGW."}) ies.append({ "ie_type" : "Load Control Information", "ie_value" : "SGW's node level Load Control Information", "presence" : "O", "instance" : "0", "comment" : "The SGW may include this IE, over the S11/S4 interface if the load control feature is supported by the SGW and is activated in the network (see clause 12.2.6).When present, the SGW shall provide only one instance of this IE, representing its node level load information."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the SGW may include this IE over the S11/S4 interface if the overload control feature is supported by the SGW and is activated in the network (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_32.py000066400000000000000000001020451333553357400217260ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "IMSI", "ie_value" : "IMSI", "presence" : "C", "instance" : "0", "comment" : "The IMSI shall be included in the message on the S4/S11 interface, and on S5/S8 interface if provided by the MME/SGSN, except for the case:- If the UE is emergency attached and the UE is UICCless.The IMSI shall be included in the message on the S4/S11 interface, and on S5/S8 interface if provided by the MME/SGSN, but not used as an identifierif UE is emergency attached but IMSI is not authenticated.The IMSI shall be included in the message on the S2a/S2b interface."}) ies.append({ "ie_type" : "MSISDN", "ie_value" : "MSISDN", "presence" : "C", "instance" : "0", "comment" : "For an E-UTRAN Initial Attach and a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN the IE shall be included when used on the S11 interface, if provided in the subscription data from the HSS.For a PDP Context Activation procedure and a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN/GERAN the IE shall be included when used on the S4 interface, if provided in the subscription data from the HSS. The IE shall be included for the case of a UE Requested PDN Connectivity, if the MME has it stored for that UE. It shall be included when used on the S5/S8 interfaces if provided by the MME/SGSN. The ePDG shall include this IE on the S2b interface during an Attach with GTP on S2b , UE initiated Connectivity to Additional PDN with GTP on S2b and a Handover to Untrusted Non-3GPP IP Access with GTP on S2b, Initial Attach for emergency session (GTP on S2b), if provided by the HSS/AAA. The TWAN shall include this IE on the S2a interface during an Initial Attach in WLAN on GTP S2a, UE initiated Connectivity to Additional PDN with GTP on S2a and a Handover to TWAN with GTP on S2a, if provided by the HSS/AAA."}) ies.append({ "ie_type" : "MEI", "ie_value" : "ME Identity", "presence" : "C", "instance" : "0", "comment" : "The MME/SGSN shall include the ME Identity (MEI) IE on the S11/S4 interface:- If the UE is emergency attached and the UE is UICCless- If the UE is emergency attached and the IMSI is not authenticatedFor all other cases the MME/SGSN shall include the ME Identity (MEI) IE on the S11/S4 interface if it is available."}) ies.append({ "ie_type" : "ULI", "ie_value" : "User Location Information", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S11 interface for E-UTRAN Initial Attach, a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN and UE-requested PDN Connectivity procedures. It shall include ECGI and TAI. The MME/SGSN shall also include it on the S11/S4 interface for TAU/RAU/X2-Handover/Enhanced SRNS Relocation procedure if the PGW/PCRF has requested location information change reporting and MME/SGSN support location information change reporting."}) ies.append({ "ie_type" : "Serving Network", "ie_value" : "Serving Network", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S4/S11, S5/S8 and S2b interfaces for an E-UTRAN initial attach, a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN, a PDP Context Activation, a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN/GERAN, a UE requested PDN connectivity, an Attach with GTP on S2b, a UE initiated Connectivity to Additional PDN with GTP on S2b, a Handover to Untrusted Non-3GPP IP Access with GTP on S2b and an Initial Attach for emergency session (GTP on S2b). See NOTE 10."}) ies.append({ "ie_type" : "RAT Type", "ie_value" : "RAT Type", "presence" : "M", "instance" : "0", "comment" : "This IE shall be set to the 3GPP access type or to the value matching the characteristics of the non-3GPP access the UE is using to attach to the EPS.The ePDG may use the access technology type of the untrusted non-3GPP access network if it is able to acquire it; otherwise it shall indicate Virtual as the RAT Type.The TWAN shall set the RAT Type value to WLAN on the S2a interface.See NOTE 3, NOTE 4."}) ies.append({ "ie_type" : "Indication", "ie_value" : "Indication Flags", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if any one of the applicable flags is set to 1.Applicable flags are:S5/S8 Protocol Type: This flag shall be set to 1 on the S11/S4 interfaces if the chosen protocol type for the S5/S8 interface is PMIP.Dual Address Bearer Flag: This flag shall be set to 1 on the S2b, S11/S4 and S5/S8 interfaces when the PDN Type, determined based on UE request and subscription record, is set to IPv4v6 and all SGSNs which the UE may be handed over to support dual addressing. This shall be determined based on node pre-configuration by the operator. (see also NOTE 5). The TWAN shall set this flag to 1 on the S2a interface if it supports IPv4 and IPv6 and the PDN Type determined from the UE request if single-connection mode or multi-connection mode is used (see 3GPPTS23.402[45]) and the user subscription data is set to IPv4v6.Handover Indication: This flag shall be set to 1 on the S11/S4 and S5/S8 interface during a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN, or a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN/GERAN procedures, or an Addition of a 3GPP access of NBIFOM procedure. This flag shall be set to 1 on the S2b interface during a Handover from 3GPP access to Untrusted Non-3GPP IP Access with GTP on S2b and IP address preservation is requested by the UE, or an Addition of an access using S2b of NBIFOM procedure. This flag shall be set to 1 on the S2a interface during a Handover from 3GPP access to TWAN with GTP on S2a and IP address preservation is requested by the UE, or an Addition of an access using S2a of NBIFOM procedure.Operation Indication: This flag shall be set to 1 on the S4/S11 interface for a TAU/RAU procedure with SGW relocation, Enhanced SRNS Relocation with SGW relocation, X2-based handovers with SGW relocation and MME triggered Serving GW relocation.Direct Tunnel Flag: This flag shall be set to 1 on the S4 interface if Direct Tunnel is used.Piggybacking Supported: This flag shall be set to 1 on the S11 interface only if the MME supports the piggybacking feature as described in Annex F of 3GPP TS 23.401 [3]. This flag shall be set to 1 on S5/S8 only if both the MME and the SGW support piggybacking.Change Reporting support Indication: This flag shall be set to 1 on S4/S11 and S5/S8 interfaces if the SGSN/MME supports location Info Change Reporting and if the SGSN/MMEs operator policy permits reporting of location change to the operator of the PGW with which the session is being established. See NOTE2. CSG Change Reporting Support Indication: This flag shall be set to 1 on S4/S11 and S5/S8 interfaces if the SGSN/MME supports CSG Information Change Reporting and if the SGSN/MMEs operator policy permits reporting of CSG Information change to the operator of the PGW with which the session is being established. See NOTE 2.Unauthenticated IMSI: This flag shall be set to 1 on the S4/S11 and S5/S8 interfaces if the IMSI present in the message is not authenticated and is for an emergency attached UE. PDN Pause Support Indication: this flag shall be set to 1 on the S5/S8 interface if the SGW supports the PGW Pause of Charging procedure. NBIFOM Support Indication: This flag shall be set to 1 on S11/S4 if the MME/SGSN supports NBIFOM.This flag shall be set to 1 on S5/S8 if both the SGW and the MME/SGSN support NBIFOM. This flag shall be set to 1 on S2a/S2b if the TWAN/ePDG supports NBIFOM. WLCP PDN Connection Modification Support Indication: This flag shall be set to 1 on the S2a interface if the TWAN supports the WLCP PDN Connection Modification procedure. UE Not Authorised Cause Code Support Indication: This flag shall be set to 1 on S4/S11 and S5/S8 interface if the SGSN/MME supports the UE not authorised by OCS or external AAA Server Cause Code. UE Available for Signalling Indication: this flag shall be set to 1 on S11/S4 during a TAU/RAU with SGW relocation procedure if there is pending network initiated PDN connection signalling for this PDN connection. The SGW shall include this IE on S5/S8 if it receives the flag from the MME/SGSN. S11-U Tunnel Flag: this flag shall be set to 1 on the S11 interface if user data is transported in NAS signalling. Extended PCO Support Indication: this flag shall be set to 1 on S11 interface by the MME if the UE and the MME support ePCO; and this flag shall be set to 1 on S5/S8 interface by the SGW if the SGW supports ePCO and MME has set the flag to 1.Control Plane Only PDN Connection Indication: this flag shall be set to 1 over S11 and S5/S8 if the PDN Connection is set to Control Plane Only."}) ies.append({ "ie_type" : "F-TEID", "ie_value" : "Sender F-TEID for Control Plane", "presence" : "M", "instance" : "0", "comment" : ""}) ies.append({ "ie_type" : "F-TEID", "ie_value" : "PGW S5/S8 Address for Control Plane or PMIP", "presence" : "C", "instance" : "1", "comment" : "This IE shall be sent on the S11 / S4 interfaces. The TEID or GRE Key is set to 0 in the E-UTRAN initial attach, a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN, the PDP Context Activation, a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN/GERAN and the UE requested PDN connectivity procedures."}) ies.append({ "ie_type" : "APN", "ie_value" : "Access Point Name", "presence" : "M", "instance" : "0", "comment" : ""}) ies.append({ "ie_type" : "Selection Mode", "ie_value" : "Selection Mode", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S4/S11 and S5/S8 interfaces for an E-UTRAN initial attach, a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN, a PDP Context Activation, a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN/GERAN and a UE requested PDN connectivity. This IE shall be included on the S2b interface for an Initial Attach with GTP on S2b, a Handover to Untrusted Non-3GPP IP Access with GTP on S2b, a UE initiated Connectivity to Additional PDN with GTP on S2b and an Initial Attach for emergency session (GTP on S2b).It shall indicate whether a subscribed APN or a non subscribed APN chosen by the UE/MME/SGSN/ePDG/TWAN was selected, see NOTE 17.This IE shall be included on the S2a interface for an Initial Attach in WLAN on GTP S2a, a Handover to TWAN with GTP on S2a and a UE initiated Connectivity to Additional PDN with GTP on S2a. The value shall be set to MS or network provided APN, subscription verified."}) ies.append({ "ie_type" : "PDN Type", "ie_value" : "PDN Type", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S4/S11 and S5/S8 interfaces for an E-UTRAN initial attach, a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN, a PDP Context Activation, a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN/GERAN and a UE requested PDN connectivity.This IE shall be set to IPv4, IPv6, IPv4v6 or Non-IP. This is based on the UE request and the subscription record retrieved from the HSS (for MME see 3GPP TS 23.401 [3], clause 5.3.1.1, and for SGSN see 3GPP TS 23.060 [35], clause 9.2.1). See NOTE 1. See NOTE 14."}) ies.append({ "ie_type" : "PAA", "ie_value" : "PDN Address Allocation", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included the S4/S11, S5/S8 and S2a/S2b interfaces for an E-UTRAN initial attach, a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN, a PDP Context Activation, a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN/GERAN, a UE requested PDN connectivity, an Attach with GTP on S2b, a UE initiated Connectivity to Additional PDN with GTP on S2b, a Handover to Untrusted Non-3GPP IP Access with GTP on S2b, an Initial Attach for emergency session (GTP on S2b, an Initial Attach in WLAN on GTP S2a, a UE initiated Connectivity to Additional PDN with GTP on S2a and a Handover to TWAN with GTP on S2a. For PMIP-based S5/S8, this IE shall also be included on the S4/S11 interfaces for TAU/RAU/Handover cases involving SGW relocation.The PDN type field in the PAA shall be set to IPv4, or IPv6 or IPv4v6, or Non-IP by MME, based on the UE request and the subscription record retrieved from the HSS (see subclause 8.12 and also NOTE 5).The TWAN shall set the PDN type field in the PAA to IPv4, or IPv6 or IPv4v6 based on the UE request if single-connection mode or multi-connection mode is used (see 3GPPTS23.402[45]), the IP versions the TWAN supports and the PDN type received in the user subscription data from the HSS/3GPP AAA Server.The ePDG shall set the PDN type field in the PAA to IPv4, or IPv6 or IPv4v6 based on the UE request and the subscription record retrieved from the HSS/3GPP AAA Server, or based on the UE request and the ePDG Emergency Configuration Data for an Initial Attach for emergency session (GTP on S2b).For static IP address assignment (for MME see 3GPP TS 23.401 [3], clause 5.3.1.1, for SGSN see 3GPP TS 23.060 [35], clause 9.2.1, for ePDG see 3GPP TS 23.402 [45] subclause 4.7.3, and for TWAN see 3GPP TS 23.402 [45] subclause 16.1.5), the MME/SGSN/ePDG/TWAN shall set the IPv4 address and/or IPv6 prefix length and IPv6 prefix and Interface Identifier based on the subscribed values received from HSS, if available. For PDN Type IPv4v6, either one of the IP versions (i.e. IPv4 address or IPv6 prefix and Interface Identifier) or both the IP versions may be statically provisioned in the HSS. If only one of the IP versions is statically provisioned in the HSS, the MME/SGSN/ePDG/TWAN shall set the other IP version as all zeros. The value of PDN Type field shall be consistent with the value of the PDN Type IE, if present in this message.For a Handover to Untrusted Non-3GPP IP Access with GTP on S2b, the ePDG shall set the IPv4 address and/or IPv6 prefix length and IPv6 prefix and Interface Identifier based on the IP address(es) received from the UE.For IP PDN connections, if static IP address assignment is not used (e.g. static address is not received from the HSS), and for scenarios other than a Handover to Untrusted Non-3GPP IP Access with GTP on S2b, the IPv4 address shall be set to 0.0.0.0, and/or the IPv6 Prefix Length and IPv6 prefix and Interface Identifier shall all be set to zero.For Non-IP PDN connections, the PDN Address and Prefix field shall not be present. See NOTE 14."}) ies.append({ "ie_type" : "APN Restriction", "ie_value" : "Maximum APN Restriction", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S4/S11 and S5/S8 interfaces in the E-UTRAN initial attach, a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN, PDP Context Activation, a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN/GERAN and UE Requested PDN connectivity procedures.This IE denotes the most stringent restriction as required by any already active bearer context. If there are no already active bearer contexts, this value is set to the least restrictive type."}) ies.append({ "ie_type" : "AMBR", "ie_value" : "Aggregate Maximum Bit Rate", "presence" : "C", "instance" : "0", "comment" : "This IE represents the APN-AMBR. It shall be included on the S4/S11, S5/S8 and S2a/S2b interfaces for an E-UTRAN initial attach, a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN, UE requested PDN connectivity, PDP Context Activation procedure using S4, a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN/GERAN, TAU/RAU/Handover from the Gn/Gp SGSN to the S4 SGSN/MME procedures, Attach with GTP on S2b, a Handover to Untrusted Non-3GPP IP Access with GTP on S2b, UE initiated Connectivity to Additional PDN with GTP on S2b, an Initial Attach for emergency session (GTP on S2b), Initial Attach in WLAN on GTP S2a, a Handover to TWAN with GTP on S2a and UE initiated Connectivity to Additional PDN with GTP on S2a."}) ies.append({ "ie_type" : "EBI", "ie_value" : "Linked EPS Bearer ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on S4/S11 in RAU/TAU/HO except in the Gn/Gp SGSN to MME/S4-SGSN RAU/TAU/HO procedures with SGW change to identify the default bearer of the PDN Connection"}) ies.append({ "ie_type" : "TWMI", "ie_value" : "Trusted WLAN Mode Indication", "presence" : "CO", "instance" : "0", "comment" : "The TWAN shall include this IE on S2a interface (during initial attach, handover to TWAN with GTP on S2a procedure, UE-initiated additional PDN connectivity procedures), if the single-connection mode or multiple-connection mode is used.The TWAN shall not include this IE if transparent single-connection mode is used. The PGW shall assume that transparent single-connection mode is used if it receives this message without this IE from the TWAN."}) ies.append({ "ie_type" : "PCO", "ie_value" : "Protocol Configuration Options", "presence" : "C", "instance" : "0", "comment" : "If MME/SGSN receives PCO from the UE during the Attach, PDN connectivity or Handover to 3GPP access procedures, the MME/SGSN shall forward the PCO IE to SGW. The SGW shall also forward it to PGW."}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts to be created", "presence" : "M", "instance" : "0", "comment" : "S Several IEs with the same type and instance value shall be included on the S4/S11 and S5/S8 interfaces as necessary to represent a list of Bearers. One single IE shall be included on the S2a/S2b interface.One bearer shall be included for E-UTRAN Initial Attach, PDP Context Activation, UE requested PDN Connectivity, Attach with GTP on S2b, UE initiated Connectivity to Additional PDN with GTP on S2b, Handovers between Untrusted Non-3GPP IP Access with GTP on S2b and 3GPP Access, Initial Attach for emergency session (GTP on S2b), Initial Attach in WLAN on GTP S2a, Handovers between TWAN with GTP on S2a and 3GPP Access and UE initiated Connectivity to Additional PDN with GTP on S2a.One or more bearers shall be included for a Handover/TAU/RAU with an SGW change. See NOTE 6 and NOTE 7."}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts to be removed", "presence" : "C", "instance" : "1", "comment" : "This IE shall be included on the S4/S11 interfaces for the TAU/RAU/Handover cases where any of the bearers existing before the TAU/RAU/Handover procedure will be deactivated as consequence of the TAU/RAU/Handover procedure.For each of those bearers, an IE with the same type and instance value shall be included.See NOTE 6 and NOTE 7."}) ies.append({ "ie_type" : "Trace Information", "ie_value" : "Trace Information", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S4/S11 interface if an SGW trace is activated, and/or on the S5/S8 and S2a/2b interfaces if a PGW trace is activated. See 3GPP TS 32.422 [18]."}) ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S4/S11, S5/S8 and S S2a/2b interfaces if contacting the peer node for the first time."}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "MME-FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included by the MME on the S11 interface and shall be forwarded by an SGW on the S5/S8 interfaces according to the requirements in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "SGW-FQ-CSID", "presence" : "C", "instance" : "1", "comment" : "This IE shall included by the SGW on the S5/S8 interfaces according to the requirements in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "ePDG-FQ-CSID", "presence" : "C", "instance" : "2", "comment" : "This IE shall be included by the ePDG on the S2b interface according to the requirements in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "TWAN-FQ-CSID", "presence" : "C", "instance" : "3", "comment" : "This IE shall be included by the TWAN on the S2a interface according to the requirements in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "UE Time Zone", "ie_value" : "UE Time Zone", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included by the MME over S11 during Initial Attach, a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN and UE Requested PDN Connectivity procedure.This IE shall be included by the SGSN over S4 during PDP Context Activation procedure and a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN/GERAN.This IE shall be included by the MME/SGSN over S11/S4 TAU/RAU/Handover with SGW relocation."}) ies.append({ "ie_type" : "UCI", "ie_value" : "User CSG Information", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S4/S11 interface for E-UTRAN Initial Attach, a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN, UE-requested PDN Connectivity, PDP Context Activation and a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN using S4 procedures, if the UE is accessed via CSG cell or hybrid cell. The MME/SGSN shall also include it for TAU/RAU/Handover procedures with SGW relocation if the UE is accessed via a CSG cell or hybrid cell or leaves a CSG or hybrid cell and the PGW/PCRF has requested CSG info reporting and MME/SGSN support CSG info reporting. NOTE 11.The SGW shall include this IE on S5/S8 if it receives the User CSG information from MME/SGSN.See NOTE 10."}) ies.append({ "ie_type" : "Charging Characteristics", "ie_value" : "Charging Characteristics", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S4/S11, S5/S8 and S2a/S2b interfaces according to 3GPP TS 32.251 [8]"}) ies.append({ "ie_type" : "LDN", "ie_value" : "MME/S4-SGSN LDN", "presence" : "O", "instance" : "0", "comment" : "This IE is optionally sent by the MME to the SGW on the S11 interface and by the S4-SGSN to the SGW on the S4 interface (see 3GPP TS 32.423 [44]), when communicating the LDN to the peer node for the first time."}) ies.append({ "ie_type" : "LDN", "ie_value" : "SGW LDN", "presence" : "O", "instance" : "1", "comment" : "This IE is optionally sent by the SGW to the PGW on the S5/S8 interfaces (see 3GPP TS 32.423 [44]), when communicating the LDN to the peer node for the first time."}) type_list["LDN"]["max_instance"] = "2" ies.append({ "ie_type" : "LDN", "ie_value" : "ePDG LDN", "presence" : "O", "instance" : "2", "comment" : "This IE is optionally sent by the ePDG to the PGW on the S2b interfaces (see 3GPP TS 32.423 [44]), when contacting the peer node for the first time. "}) type_list["LDN"]["max_instance"] = "3" ies.append({ "ie_type" : "LDN", "ie_value" : "TWAN LDN", "presence" : "O", "instance" : "3", "comment" : "This IE may be sent by the TWAN to the PGW on the S2a interfaces (see 3GPP TS 32.423 [44]), when contacting the peer node for the first time. "}) ies.append({ "ie_type" : "Signalling Priority Indication", "ie_value" : "Signalling Priority Indication", "presence" : "CO", "instance" : "0", "comment" : "The SGSN/MME shall include this IE on the S4/S11 interface if the UE indicates low access priority when requesting to establish the PDN connection. The SGW shall forward this IE in the Create Session Request message on the S5/S8 interfaces if received from the MME/SGSN. "}) ies.append({ "ie_type" : "IP Address", "ie_value" : "UE Local IP Address", "presence" : "CO", "instance" : "0", "comment" : "The ePDG shall include this IE on the S2b interface during an Initial Attach for emergency session (GTP on S2b). Otherwise the ePDG shall include this IE on the S2b interface based on local policy. "}) ies.append({ "ie_type" : "Port Number", "ie_value" : "UE UDP Port", "presence" : "CO", "instance" : "0", "comment" : "The ePDG shall include this IE on the S2b interface if NAT is detected, the UDP encapsulation is used and the UE Local IP Address is present."}) ies.append({ "ie_type" : "APCO", "ie_value" : "Additional Protocol Configuration Options", "presence" : "CO", "instance" : "0", "comment" : "If multiple authentications are supported by the ePDG, the ePDG shall include this IE on the S2b interface and perform the corresponding procedures as specified for PAP and CHAP authentication of the UE with external networks in 3GPP TS 33.402 [50]."}) ies.append({ "ie_type" : "IP Address", "ie_value" : "HNB Local IP Address", "presence" : "CO", "instance" : "1", "comment" : "The MME/SGSN shall include this IE on S11/S4 interface if the MME/SGSN receives this information from H(e)NB in UE associated S1/Iu signalling according (see 3GPP TS 23.139 [51]) during: E-UTRAN Initial Attach, a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN, UE-requested PDN Connectivity, PDP Context Activation and a a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN using S4;TAU/RAU/X2-based handover/Enhanced Serving RNS Relocation Procedure with SGW change, if the PGW/PCRF has requested H(e)NB information reporting for the PDN connection.The SGW shall forward this IE on S5/S8 interface if the SGW receives it from the MME/SGSN."}) ies.append({ "ie_type" : "Port Number", "ie_value" : "HNB UDP Port", "presence" : "CO", "instance" : "1", "comment" : "The MME/SGSN shall include this IE on S11/S4 interface if the MME/SGSN receives this information from H(e)NB in UE associated S1/Iu signalling according (see 3GPP TS 23.139 [51]) during: E-UTRAN Initial Attach, a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN, UE-requested PDN Connectivity, PDP Context Activation and a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN using S4;TAU/RAU/X2-based handover/Enhanced Serving RNS Relocation Procedure with SGW relocation, if the PGW/PCRF has requested H(e)NB information reporting for the PDN connection.The SGW shall forward this IE on S5/S8 interface if the SGW receives it from the MME/SGSN."}) ies.append({ "ie_type" : "IP Address", "ie_value" : "MME/S4-SGSN Identifier", "presence" : "CO", "instance" : "2", "comment" : "If the PGW triggered SGW restoration procedure is supported, the MME/S4-SGSN shall include this IE on S11/S4 interface and the SGW shall forward this IE on S5 interface in the existing signalling as specified in 3GPP TS 23.007 [17].If the overload control feature is supported by the MME/S4-SGSN and is activated for the PLMN to which the PGW belongs (see subclause 12.3.11), the MME/S4-SGSN shall include this IE on the S11/S4 interface. In that case, the SGW shall forward this IE on the S5/S8 interface."}) ies.append({ "ie_type" : "TWAN Identifier", "ie_value" : "TWAN Identifier", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S2a interface for Initial Attach in WLAN procedure, UE-initiated Connectivity to Additional PDN with GTP on S2a and handover to TWAN with GTP on S2a procedure as specified in 3GPP TS 23.402 [45]. "}) type_list["IP Address"]["max_instance"] = "3" ies.append({ "ie_type" : "IP Address", "ie_value" : "ePDG IP Address", "presence" : "O", "instance" : "3", "comment" : "This IE may be included on the S2b interface based on local policy for Fixed Broadband access network interworking, see 3GPPTS23.139[51]. If present, it shall contain the ePDG IP address which is used as IKEv2 tunnel endpoint with the UE."}) ies.append({ "ie_type" : "CN Operator Selection Entity", "ie_value" : "CN Operator Selection Entity", "presence" : "CO", "instance" : "0", "comment" : "In shared networks, the SGSN shall include this IE on the S4 interface for a PDP Context Activation, a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN/GERAN and RAU with SGW relocation procedures, if the information is available, to indicate whether the Serving Network has been selected by the UE or by the network."}) ies.append({ "ie_type" : "Presence Reporting Area Information", "ie_value" : "Presence Reporting Area Information", "presence" : "CO", "instance" : "0", "comment" : "The MME/SGSN shall include this IE in the following procedures, if the PGW/PCRF requested reporting changes of UE presence in a Presence Reporting Area and the MME/SGSN supports such reporting:- TAU/RAU/Handover procedures with SGW relocation and MME/SGSN change. The new MME/SGSN shall then indicate whether the UE is inside or outside the Presence Reporting Area; - TAU/RAU/Handover procedures with SGW relocation and without MME/SGSN change, if the UE enters or leaves the Presence Reporting Area."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "MME/S4-SGSN's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the MME/S4-SGSN may include this IE on the S11/S4 interface if the overload control feature is supported by the MME/S4-SGSN and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the MME/S4-SGSN shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S5/S8 interface if the overload control feature is supported by the SGW and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "TWAN/ePDG's Overload Control Information", "presence" : "O", "instance" : "2", "comment" : "During an overload condition, the TWAN/ePDG may include this IE over the S2a/S2b interface if the overload control feature is supported by the TWAN/ePDG and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the TWAN/ePDG shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "Millisecond Time Stamp", "ie_value" : "Origination Time Stamp", "presence" : "CO", "instance" : "0", "comment" : "The MME/SGSN and the TWAN/ePDG shall include this IE on the S11/S4 and S2a/S2b interface respectively, in the conditions specified in subclause 13.2.When present, the Origination Time Stamp shall contain the UTC time when the originating entity initiated the request."}) ies.append({ "ie_type" : "Integer Number", "ie_value" : "Maximum Wait Time", "presence" : "CO", "instance" : "0", "comment" : "The MME/SGSN and the TWAN/ePDG shall include this IE on the S11/S4 and S2a/S2b interface respectively, in the conditions specified in subclause 13.3.When present, the Maximum Wait Time shall contain the duration (number of milliseconds since the Origination Time Stamp) during which the originator of the request waits for a response."}) ies.append({ "ie_type" : "TWAN Identifier", "ie_value" : "WLAN Location Information", "presence" : "CO", "instance" : "1", "comment" : "This IE shall be included on the S2b interface if the WLAN Location Information is available. "}) ies.append({ "ie_type" : "TWAN Identifier Timestamp", "ie_value" : "WLAN Location Timestamp", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S2b interface, if the WLAN Location Timestamp is available. "}) ies.append({ "ie_type" : "F-Container", "ie_value" : "NBIFOM Container", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S11/S4 or S2a/S2b interfaces if the MME/S4-SGSN or the TWAN/ePDG receives an NBIFOM Container from the UE as specified in TS 24.161 73]. The Container Type shall be set to 4."}) ies.append({ "ie_type" : "Remote UE Context", "ie_value" : "Remote UE Context Connected", "presence" : "CO", "instance" : "0", "comment" : "The MME shall include this IE on the S11 interface during a SGW relocation procedure if such information is available. Several IEs with the same type and instance value may be included as necessary to represent a list of remote UEs connected."}) ies.append({ "ie_type" : "Node Identifier", "ie_value" : "3GPP AAA Server Identifier", "presence" : "O", "instance" : "0", "comment" : "The ePDG/TWAN may include this IE on the S2a/S2b interface to provide the selected 3GPP AAA server identifier to the PGW. See NOTE 13."}) ies.append({ "ie_type" : "ePCO", "ie_value" : "Extended Protocol Configuration Options", "presence" : "CO", "instance" : "0", "comment" : "If the MME receives ePCO from the UE during the Initial Attach, UE requested PDN Connectivity procedures, the MME shall forward the ePCO IE to the SGW if the MME supports ePCO. The SGW shall also forward it to the PGW if the SGW supports ePCO. See NOTE 15."}) ies.append({ "ie_type" : "Serving PLMN Rate Control", "ie_value" : "Serving PLMN Rate Control", "presence" : "CO", "instance" : "0", "comment" : "The MME shall include this IE on the S11 interface if Serving PLMN Rate control is configured by the MME operator and the PDN Connection is set to Control Plane Only:- during an Initial Attach, or a UE Requested PDN Connectivity procedure.- during an inter MME TAU with SGW relocation procedureSee NOTE 18.The SGW shall include this IE on S5/S8 if it receives this IE from MME. "}) ies.append({ "ie_type" : "Counter", "ie_value" : "MO Exception Data Counter", "presence" : "CO", "instance" : "0", "comment" : "The MME shall include the counter if it has received the counter for RRC cause MO Exception data in the Context Response message during a TAU with an MME and SGW change."}) type_list["Port Number"]["max_instance"] = "2" ies.append({ "ie_type" : "Port Number", "ie_value" : "UE TCP Port", "presence" : "CO", "instance" : "2", "comment" : "The ePDG shall include this IE on the S2b interface if NAT is detected, the TCP encapsulation is used and the UE Local IP Address is present."}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_33.py000066400000000000000000000420341333553357400217300ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : "See NOTE 2 and NOTE 4."}) ies.append({ "ie_type" : "Change Reporting Action", "ie_value" : "Change Reporting Action ", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 and S4/S11 interfaces with the appropriate Action field if the location Change Reporting mechanism is to be started or stopped for this subscriber in the SGSN/MME."}) ies.append({ "ie_type" : "CSG Information Reporting Action", "ie_value" : "CSG Information Reporting Action", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 and S4/S11 interfaces with the appropriate Action field if the CSG Info reporting mechanism is to be started or stopped for this subscriber in the SGSN/MME."}) ies.append({ "ie_type" : "eNB Information Reporting", "ie_value" : "HNB Information Reporting", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 and S4/S11 interfaces with the appropriate Action field if H(e)NB information reporting is to be started or stopped (during a TAU/RAU with SGW change if started earlier) for the PDN connection in the SGSN/MME."}) ies.append({ "ie_type" : "F-TEID", "ie_value" : "Sender F-TEID for Control Plane", "presence" : "C", "instance" : "0", "comment" : "This IE shall be sent on the S11/S4 interfaces. For the S5/S8/ S2a/S2b interfaces it is not needed because its content would be identical to the IE PGW S5/S8/ S2a/S2b F-TEID for PMIP based interface or for GTP based Control Plane interface."}) ies.append({ "ie_type" : "F-TEID", "ie_value" : "PGW S5/S8/ S2a/S2b F-TEID for PMIP based interface or for GTP based Control Plane interface", "presence" : "C", "instance" : "1", "comment" : "The PGW shall include this IE on the S5/S8 interfaces during the Initial Attach, a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN, UE requested PDN connectivity, PDP Context Activation and a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN/GERAN procedures.If the SGW receives this IE it shall forward the IE to MME/S4-SGSN on the S11/S4 interface.This IE shall include the TEID for GTP based S5/S8 case and the uplink GRE key in the PMIP based S5/S8 case.For PMIP based S5/S8, this IE shall be included on the S11/S4 interface and shall contain the PGW S5/S8 IP address for control plane; the same IP address shall be used for both control plane and the user plane communication if the Bearer Context IE does not contain a S5/S8-U PGW F-TEID IE. See NOTE 7.The PGW shall include this IE on the S2b interface during the Attach with GTP on S2b, UE initiated Connectivity to Additional PDN with GTP on S2b, Handover to Untrusted Non-3GPP IP Access with GTP on S2b procedures and Initial Attach for emergency session (GTP on S2b).The PGW shall include this IE on the S2a interface during the Initial Attach in WLAN on GTP S2a, UE initiated Connectivity to Additional PDN with GTP on S2a and Handover to TWAN with GTP on S2a proceduresSee NOTE 6."}) ies.append({ "ie_type" : "PAA", "ie_value" : "PDN Address Allocation", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S5/S8, S4/S11 and S2a/S2b interfaces for the E-UTRAN initial attach, a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN, PDP Context Activation, a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN/GERAN, UE requested PDN connectivity, Attach with GTP on S2b, UE initiated Connectivity to Additional PDN with GTP on S2b, Handover to Untrusted Non-3GPP IP Access with GTP on S2b, Initial Attach for emergency session (GTP on S2b), Initial Attach in WLAN on GTP S2a procedures, UE initiated Connectivity to Additional PDN with GTP on S2a and Handover to TWAN with GTP on S2a.The PDN type field in the PAA shall be set to IPv4, or IPv6 or IPv4v6, or Non-IP by the PGW. See NOTE4. For the S4/S11 and S5/S8 interfaces, if the PGW uses DHCPv4 for IPv4 address allocation, the IPv4 address field shall be set to 0.0.0.0; otherwise, the IPv4 address field shall be set to non-zero value as specified in 3GPP TS 23.401 [3] and 3GPP TS 23.402 [45]. When assigning an IPv6 address the PGW shall send a non-zero Interface Identifier. See NOTE 8.For Non-IP PDN connections, the PDN Address and Prefix field shall not be present."}) ies.append({ "ie_type" : "APN Restriction", "ie_value" : "APN Restriction", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 and S4/S11 interfaces in the E-UTRAN initial attach, a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN, PDP Context Activation, a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN/GERAN and UE Requested PDN connectivity procedures.This IE shall also be included on S4/S11 during the Gn/Gp SGSN to S4 SGSN/MME RAU/TAU procedures.This IE denotes the restriction on the combination of types of APN for the APN associated with this EPS bearer Context."}) ies.append({ "ie_type" : "AMBR", "ie_value" : "Aggregate Maximum Bit Rate", "presence" : "C", "instance" : "0", "comment" : "This IE represents the APN-AMBR. It shall be included on the S5/S8, S4/S11 and S2a/S2b interfaces if the received APN-AMBR has been modified by the PCRF."}) ies.append({ "ie_type" : "EBI", "ie_value" : "Linked EPS Bearer ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be sent on the S4/S11 interfaces during Gn/Gp SGSN to S4-SGSN/MME RAU/TAU procedure to identify the default bearer the PGW selects for the PDN Connection."}) ies.append({ "ie_type" : "PCO", "ie_value" : "Protocol Configuration Options", "presence" : "C", "instance" : "0", "comment" : "If ePCO is not supported by the UE or the network, and if the PGW decides to return PCO to the UE during the Attach, PDN connectivity or Handover to 3GPP access procedures, PGW shall send PCO to SGW. If SGW receives the PCO IE, SGW shall forward it to MME/SGSN."}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts created", "presence" : "M", "instance" : "0", "comment" : "EPS bearers corresponding to Bearer Contexts sent in request message. Several IEs with the same type and instance value may be included on the S5/S8 and S4/S11 as necessary to represent a list of Bearers. One single IE shall be included on the S2a/S2b interface.One bearer shall be included for E-UTRAN Initial Attach, a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN, PDP Context Activation, a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN/GERAN, UE Requested PDN Connectivity , Attach with GTP on S2b, UE initiated Connectivity to Additional PDN with GTP on S2b, Handover to Untrusted Non-3GPP IP Access with GTP on S2b, Initial Attach for emergency session (GTP on S2b), Initial Attach in WLAN on GTP S2a, UE initiated Connectivity to Additional PDN with GTP on S2a and Handover to TWAN with GTP on S2a.One or more created bearers shall be included for a Handover/TAU/RAU with an SGW change. See NOTE 2."}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts marked for removal", "presence" : "C", "instance" : "1", "comment" : "EPS bearers corresponding to Bearer Contexts to be removed that were sent in the Create Session Request message.For each of those bearers an IE with the same type and instance value shall be included on the S4/S11 interfaces."}) ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S4/S11, S5/S8 and S2a/S2b interfaces if contacting the peer for the first time "}) ies.append({ "ie_type" : "FQDN", "ie_value" : "Charging Gateway Name", "presence" : "C", "instance" : "0", "comment" : "When Charging Gateway Function (CGF) Address is configured, the PGW shall include this IE on the S5 interface. See NOTE 1."}) ies.append({ "ie_type" : "IP Address", "ie_value" : "Charging Gateway Address", "presence" : "C", "instance" : "0", "comment" : "When Charging Gateway Function (CGF) Address is configured, the PGW shall include this IE on the S5 interface. See NOTE 1."}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "PGW-FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included by the PGW on the S5/S8 and S2a/S2b interfaces and, when received from S5/S8 be forwarded by the SGW on the S11 interface according to the requirements in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "SGW-FQ-CSID", "presence" : "C", "instance" : "1", "comment" : "This IE shall be included by the SGW on the S11 interface according to the requirements in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "LDN", "ie_value" : "SGW LDN", "presence" : "O", "instance" : "0", "comment" : "This IE is optionally sent by the SGW to the MME/SGSN on the S11/S4 interfaces (see 3GPP TS 32.423 [44]), when communicating the LDN to the peer node for the first time."}) ies.append({ "ie_type" : "LDN", "ie_value" : "PGW LDN", "presence" : "O", "instance" : "1", "comment" : "This IE is optionally included by the PGW on the S5/S8 and S2a/S2b interfaces (see 3GPP TS 32.423 [44]), when communicating the LDN to the peer node for the first time."}) ies.append({ "ie_type" : "EPC Timer", "ie_value" : "PGW Back-Off Time", "presence" : "O", "instance" : "0", "comment" : "This IE may be included on the S5/S8 and S4/S11 interfaces when the PDN GW rejects the Create Session Request with the cause APN congestion. It indicates the time during which the MME or S4-SGSN should refrain from sending subsequent PDN connection establishment requests to the PGW for the congested APN for services other than Service Users/emergency services.See NOTE 3."}) ies.append({ "ie_type" : "APCO", "ie_value" : "Additional Protocol Configuration Options", "presence" : "CO", "instance" : "0", "comment" : "If multiple authentications are supported by the PGW and if PGW received the Additional Protocol Configuration Options IE in the Create Session Request, the PGW shall include this IE on the S2b interface and perform the corresponding procedures as specified for PAP and CHAP authentication of the UE with external networks in 3GPP TS 33.402 [50]."}) ies.append({ "ie_type" : "IP4CP", "ie_value" : "Trusted WLAN IPv4 Parameters ", "presence" : "CO", "instance" : "0", "comment" : "The PGW shall include this IE on the S2a interface to a Trusted WLAN Access if PDN Type in the PAA is set to IPv4 or IPv4v6 and the transparent single-connection mode is used as specified in 3GPPTS23.402[45].This IE shall include:The Subnet Prefix Length of the subnet from which the PGW allocates the UEs IPv4 address.The IPv4 Default Router Address which belongs to the same subnet as the IPv4 address allocated to the UE."}) ies.append({ "ie_type" : "Indication", "ie_value" : "Indication Flags", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included if any one of the applicable flags is set to 1.Applicable flags are:PDN Pause Support Indication: this flag shall be set to 1 on the S5/S8 interface if the PGW supports the PGW Pause of Charging procedure.PDN Pause Enable Indication: this flag shall be set to 1 on the S5/S8 interface if the PGW enables the SGW to use the PGW Pause of Charging procedure for this PDN connection.Associate OCI with PGW nodes identity: The PGW shall set this flag to 1 on the S5/S8 interface or S2a/S2b interface if it has included the PGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the HSS or DNS during the PGW selection) of the serving PGW. This flag shall be set to 1 by the PGW if the PGWs Overload Control Information is included and the Cause IE is set to a rejection cause code. The SGW shall set this flag on the S11/S4 interface if it supports the overload control feature and if the flag is set on the S5/S8 interface.Associate OCI with SGW nodes identity: The SGW shall set this flag to 1 on the S11/S4 interface if it has included the SGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the DNS during the SGW selection) of the serving SGW. This flag shall be set to 1 by the SGW if the SGWs Overload Control Information is included and the Cause IE is set to a rejection cause code. Delay Tolerant Connection Indication: the flag shall be set to 1 on the S5/S8 and S11/S4 interface if the PDN connection is Delay Tolerant (see subclause 8.12).Triggering SGSN initiated PDP Context Creation/Modification Indication: this flag shall be set to 1 on the S5/S8 interfaces if the network-initiated NBIFOM mode is used for this PDN connection. The SGW shall set this flag on the S4 interface if it supports the NBIFOM feature and the flag is set on the S5/S8 interface."}) ies.append({ "ie_type" : "Presence Reporting Area Action", "ie_value" : "Presence Reporting Area Action", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 and S11/S4 interfaces with the appropriate Action field if reporting changes of UE presence in a Presence Routing Area is to be started or stopped for this subscriber in the MME/SGSN."}) ies.append({ "ie_type" : "Load Control Information", "ie_value" : "PGW's node level Load Control Information", "presence" : "O", "instance" : "0", "comment" : "The PGW may include this IE on the S5/S8 or S2a/S2b interface, providing its node level load information, if the load control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access network, ePDG/TWAN for non-3GPP access network, belongs (see clause 12.2.6)."}) ies.append({ "ie_type" : "Load Control Information", "ie_value" : "PGW's APN level Load Control Information", "presence" : "O", "instance" : "1", "comment" : "The PGW may include this IE on the S5/S8 or S2a/S2b interface, providing APN level load information, if the APN level load control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access network, ePDG/TWAN for non-3GPP access based network, belongs (see clause 12.2.6).When present, the PGW shall provide one or more instances of this IE, up to maximum of 10, with the same type and instance value, each representing the load information for a list of APN(s).See NOTE 9, NOTE 11."}) ies.append({ "ie_type" : "Load Control Information", "ie_value" : "SGW's node level Load Control Information", "presence" : "O", "instance" : "2", "comment" : "The SGW may include this IE, over the S11/S4 interface if the load control feature is supported by the SGW and is activated in the network (see clause 12.2.6).When present, the SGW shall provide only one instance of this IE, representing its node level load information."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "PGW's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the PGW may include this IE on the S5/S8 or S2a/S2b interface, if the overload control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access based network, ePDG/TWAN for non-3GPP access based network, belongs (see clause 12.3.11).When present, the PGW shall provide at least one instance of this IE, representing its overload information. Additionally, the PGW may indicate APN level overload control by providing, one or more instances of this IE, up to maximum of 10, with the same type and instance value, each representing the overload information for a list of APN(s).See NOTE 10, NOTE 12."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S11/S4 interface if the overload control feature is supported by the SGW and is activated in the network (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "F-Container", "ie_value" : "NBIFOM Container", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 or S2a/S2b interfaces if the PGW needs to send NBIFOM informationas specified in 3GPP TS 23.161 [71].The Container Type shall be set to 4."}) ies.append({ "ie_type" : "Charging ID", "ie_value" : "PDN Connection Charging ID", "presence" : "CO", "instance" : "0", "comment" : "The PGW shall include this IE on the S5/S8 or S2a/S2b interfaces, during an Initial Attach, Initial PDN connection establishment, or Addition of an access procedures, when using NBIFOM, as specified in 3GPP TS 23.161 [71]."}) ies.append({ "ie_type" : "ePCO", "ie_value" : "Extended Protocol Configuration Options", "presence" : "CO", "instance" : "0", "comment" : "If the PGW decides to return ePCO to the UE during an Initial Attach, UE requested PDN Connectivity procedure, and if the PGW supports the ePCO and the EPCOSI flag is set to 1 in the Create Session Request message, the PGW shall send ePCO to the SGW. If the SGW receives the ePCO IE, the SGW shall forward it to the MME.See NOTE 13."}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_34.py000066400000000000000000000501541333553357400217330ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "MEI", "ie_value" : "ME Identity", "presence" : "C", "instance" : "0", "comment" : "If an SGW receives this IE from an MME/SGSN during a TAU/RAU/Handover procedure, the SGW shall forward it across the S5/S8 interface to the PGW."}) ies.append({ "ie_type" : "ULI", "ie_value" : "User Location Information", "presence" : "C", "instance" : "0", "comment" : "The MME/SGSN shall include this IE for the TAU/RAU/Handover procedures if the PGW/PCRF has requested location information change reporting and MME/SGSN support location information change reporting. An MME/SGSN which supports location information change shall include this IE for UE-initiated Service Request and UE initiated Connection Resume procedures if the PGW/PCRF has requested location information change reporting and the UEs location info has changed. See NOTE 5, NOTE 17.When ISR is active, the MME/SGSN which supports location information change shall include this IE for UE-initiated Service Request procedure, if the PGW/PCRF has requested location information change reporting."}) ies.append({ "ie_type" : "Serving Network", "ie_value" : "Serving Network", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on S11/S4 interface during the following procedures: - TAU/RAU/handover if Serving Network is changed.- TAU/RAU when the UE was ISR activated which is indicated by ISRAU flag.- UE triggered Service Request when UE is ISR activated.- UE initiated Service Request if ISR is not active, but the Serving Network has changed during previous mobility procedures, i.e. intra MME/S4-SGSN TAU/RAU and the change has not been reported to the PGW yet.- TAU/RAU procedure as part of the optional network triggered service restoration procedure with ISR, as specified by 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "RAT Type", "ie_value" : "RAT Type", "presence" : "C", "instance" : "0", "comment" : "This IE shall be sent on the S11 interface for a TAU with an SGSN interaction, UE triggered Service Request or an I-RAT Handover.This IE shall be sent on the S4 interface for a RAU with MME interaction, a RAU with an SGSN change, a UE Initiated Service Request or an I-RAT Handover.This IE shall be sent on the S5/S8 interface if the RAT type changes."}) ies.append({ "ie_type" : "Indication", "ie_value" : "Indication Flags", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if any one of the applicable flags is set to 1.Applicable flags are:Idle mode Signalling Reduction Activation Indication: This flag shall be set to 1 on S4/S11 interface, if the ISR is established between the MME and the S4 SGSN.Handover Indication: This flag shall be set to 1 on the S4/S11 and S5/S8 interfaces during a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN or a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN/GERAN procedures..Direct Tunnel Flag: This flag shall be set to 1 on the S4 interface, if Direct Tunnel is used.Change Reporting Support Indication: shall be set to 1 on S4/S11, S5/S8 interfaces, if the SGSN/MME supports location Info Change Reporting and if the SGSN/MMEs operator policy permits reporting of location change to the operator of the PGW with which the session is established. This flag should be ignored by SGW if no message is sent on S5/S8. See NOTE 4.CSG Change Reporting Support Indication: shall be set to 1 on S4/S11, S5/S8, if the SGSN/MME supports CSG Information Change Reporting and if the SGSN/MMEs operator policy permits reporting of the CSG Information change to the operator of the PGW with which the session is established. This flag shall be ignored by SGW if no message is sent on S5/S8. See NOTE 4.Change F-TEID support Indication: This flag shall be set to 1 on S4/S11 for an IDLE state UE initiated TAU/RAU procedure to allow the SGW changing the GTP-U F-TEID. Propagate BBAI Information Change: The MME/SGSN shall set this flag to 1 on S11/S4 in procedures without MME/SGSN change if the PGW has requested H(e)NB information reporting and the H(e)NB local IP address or UDP port number information from H(e)NB in UE associated S1/Iu signalling has changed. (NOTE 8)The MME/SGSN shall set this flag to 1 on S11/S4 during TAU/RAU/Handover with MME/SGSN change procedures if the PGW has requested H(e)NB information reporting.See 3GPP TS 23.139 [51]. CS to PS SRVCC indication: This flag shall be set to 1 on S4/S11 and on S5/S8 during UTRAN/GERAN to E-UTRAN/UTRAN (HSPA) SRVCC procedure as specified in 3GPP TS 23.216 [43].Change of Location Information Indication (CLII): This flag shall be set to 1 on S4/S11 interface only when the ISR is active for the UE. This flag shall be set to 1 by the MME/S4-SGSN if the ULI IE is included in the Modify Bearer Request message and the location information has changed since last reported by the MME/S4-SGSN. See NOTE 9. .PDN Pause Support Indication: this flag shall be set to 1 on the S5/S8 interface during the TAU/RAU/handover with SGW relocation procedures if the new SGW supports the PGW Pause of Charging procedure.PDN Pause On Indication: this flag shall be set to 1 on the S5/S8 interface if the SGW requests the PGW to pause the charging for the PDN connection as specified in 3GPP TS 23.401 [3]. (NOTE 13).PDN Pause Off Indication: this flag shall be set to 1 on the S5/S8 interface if the SGW requests the PGW to unpause the charging for the PDN connection as specified in 3GPP TS 23.401 [3]. (NOTE 13).Change of Presence Reporting Area information Indication (CPRAI): this flag shall be set to 1 on the S4/S11 interface if ISR is active for the UE and if the Presence Reporting Area Information IE is included in the Modify Bearer Request message and the Presence Reporting Area information has changed since last reported by the MME/S4-SGSN. See NOTE 9. P-CSCF Restoration Indication: this flag shall be set to 1 on the S11/S4 and S5/S8 interfaces, for the IMS PDN connection, if the MME/S4-SGSN has received the indication from the HSS that a P-CSCF restoration is required for this user. UE Available for Signalling Indication: this flag shall be set to 1 on S11/S4 by the MME/SGSN during a TAU/RAU or a Service Request procedure for E-UTRAN/UTRAN, or UE initiated Connection Resume procedure for E-UTRAN, or at receipt of an uplink LLC PDU for user data or any valid LLC frame serving as a paging response for GERAN, if the PDN connection is delay tolerant and if there is pending network initiated PDN connection signalling. The SGW shall include this IE on S5/S8 if it receives the flag from the MME/SGSN. S11-U Tunnel Flag: this flag shall be set to 1 on the S11 interface if user data is transported in NAS signalling.Extended PCO Support Indication: this flag shall be set to 1 on S11 interface by the MME if the UE and the MME support ePCO. This flag shall be set to 1 on S5/S8 interface by the SGW if the SGW support ePCO and the MME has set the flag to 1 over the S11 interface. See NOTE 18.NBIFOM Support Indication: this flag shall be set to 1 on S11/S4 during an inter-PLMN mobility procedure for E-UTRAN/UTRAN if the MME/SGSN supports NBIFOM.This flag shall be set to 1 on S5/S8 during an inter-PLMN mobility procedure for E-UTRAN/UTRAN if both the SGW and the MME/SGSN support NBIFOM.See NOTE19."}) ies.append({ "ie_type" : "F-TEID", "ie_value" : "Sender F-TEID for Control Plane", "presence" : "C", "instance" : "0", "comment" : "The new MME/SGSN shall include this IE on the S11 and S4 interfaces for a TAU/RAU/ Handover with an MME/SGSN change and without any SGW change. See NOTE 10.If the SGW receives this IE and if it finds that its value is the same as the earlier received value of this IE for this UE, it should interpret this to mean that the MME/SGSN has not changed.The new SGW shall include this IE on the S5 and S8 interfaces for a TAU/RAU/Handover with a SGW change. See NOTE 10.If the PGW receives this IE and if it finds that its value is the same as the earlier received value of this IE for this PDN connection, it should interpret this to mean that the SGW has not changed."}) ies.append({ "ie_type" : "AMBR", "ie_value" : "Aggregate Maximum Bit Rate", "presence" : "C", "instance" : "0", "comment" : "The APN-AMBR shall be sent for TAU/RAU/Handover from the Gn/Gp SGSN to the S4 SGSN/MME procedures."}) ies.append({ "ie_type" : "Delay Value", "ie_value" : "Delay Downlink Packet Notification Request", "presence" : "C", "instance" : "0", "comment" : "his IE shall be sent on the S11 interface for a UE triggered Service Request and UE initiated Connection Resume procedures. It shall contain the delay the SGW shall apply between receiving downlink data and sending Downlink Data Notification for all UEs served by that MME (see subclause 5.3.4.2 of 3GPP TS 23.401 [3])."}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts to be modified", "presence" : "C", "instance" : "0", "comment" : "This IE shall be sent on the S4/S11 interface and S5/S8 interface, except on the S5/S8 interface for a UE triggered Service Request and UE initiated Connection Resume procedures. on the S5/S8 interface for a TAU/RAU/HO without SGW change procedure. See NOTE 10. .on the S5/S8 interface when requesting the PGW to pause or unpause charging for the PDN connection. on the S5/S8 interface for any other procedure without SGW change which requires to send a Modify Bearer Request to the PGW, e.g. HSS-based P-CSCF restoration for 3GPP access, reporting of UE presence in a Presence Reporting Area, implicit resume of suspended bearers.(see NOTE 6).When Handover Indication flag is set to 1 (i.e., for a Handover from Trusted or Untrusted Non-3GPP IP Access to E-UTRAN or a Handover from Trusted or Untrusted Non-3GPP IP Access to UTRAN/GERAN procedures), the PGW shall ignore this IE. See NOTE 1.Several IEs with the same type and instance value may be included as necessary to represent a list of Bearers to be modified.During a TAU/RAU/Handover procedure with an SGW change, the SGW includes all bearers it received from the MME/SGSN (Bearer Contexts to be created, or Bearer Contexts to be modified and also Bearer Contexts to be removed) into the list of Bearer Contexts to be modified IEs, which are then sent on the S5/S8 interface to the PGW (see NOTE 2, see NOTE 10). During an E-UTRAN Initiated E-RAB modification procedure the MME shall send a Modify Bearer Request, including all the bearers (those modified and those not modified), per PDN connection for which at least one bearer has changed. See NOTE 11."}) type_list["Bearer Context"]["max_instance"] = "1" ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts to be removed", "presence" : "C", "instance" : "1", "comment" : "This IE shall be included on the S4 and S11 interfaces for the TAU/RAU/Handover, UE initiated Connection Resume and Service Request procedures where any of the bearers existing before the TAU/RAU/Handover procedure, UE initiated Connection Resume and Service Request procedures will be deactivated as consequence of the TAU/RAU/Handover procedure, UE initiated Connection Resume and Service Request procedures. See NOTE 3 and NOTE 6.For each of those bearers, an IE with the same type and instance value, shall be included. See NOTE 11."}) ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if contacting the peer for the first time "}) ies.append({ "ie_type" : "UE Time Zone", "ie_value" : "UE Time Zone", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included by the MME/SGSN on the S11/S4 interfaces if the UE Time Zone has changed in the case of TAU/RAU/Handover or UE initiated Service Request procedure. See NOTE 5."}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "MME-FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included by MME on S11 and shall be forwarded by SGW on S5/S8 according to the requirements in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "UCI", "ie_value" : "User CSG Information", "presence" : "CO", "instance" : "0", "comment" : "The MME/SGSN shall include this IE for Handover procedures, UE initiated Connection Resume and UE-initiated Service Request procedure if the PGW/PCRF has requested CSG Info reporting and the MME/SGSN support the CSG information reporting and the User CSG information has changed (i.e. the UE is accessed via a new CSG cell or hybrid cell or leaves a CSG or hybrid cell).In TAU/RAU procedure without SGW change, this IE shall also be sent if the PGW/PCRF has requested CSG info reporting and MME/SGSN supports CSG info reporting and the User CSG information has changed (i.e. the UE is accessed via a new CSG cell or hybrid cell or leaves a CSG or hybrid cell) when UE requested to activate E-RAB for all the active EPS bearers in TAU procedure or to keep the Iu connection after the completion of the RAU procedure. See NOTE 5. See NOTE 10. See NOTE 16.The SGW shall include this IE on S5/S8 if it receives the User CSG Information from MME/SGSN. See NOTE 15."}) type_list["IP Address"]["max_instance"] = "1" ies.append({ "ie_type" : "IP Address", "ie_value" : "UE Local IP Address", "presence" : "CO", "instance" : "1", "comment" : "If the UE local IP Address has changed, the ePDG shall include this IE on S2b interface based on local policy for Fixed Broadband access network interworking (see 3GPP TS 23.139 [51]). "}) type_list["Port Number"]["max_instance"] = "1" ies.append({ "ie_type" : "Port Number", "ie_value" : "UE UDP Port", "presence" : "CO", "instance" : "1", "comment" : "The ePDG shall include this IE on S2b interface if NAT is detected and UE Local IP Address is present for Fixed Broadband access network interworking (see 3GPP TS 23.139 [51]). "}) ies.append({ "ie_type" : "LDN", "ie_value" : "MME/S4-SGSN LDN", "presence" : "O", "instance" : "0", "comment" : "This IE is optionally sent by the MME to the SGW on the S11 interface and by the SGSN to the SGW on the S4 interface (see 3GPP TS 32.423 [44]), when communicating the LDN to the peer node for the first time."}) type_list["LDN"]["max_instance"] = "1" ies.append({ "ie_type" : "LDN", "ie_value" : "SGW LDN", "presence" : "O", "instance" : "1", "comment" : "This IE is optionally sent by the SGW to the PGW on the S5/S8 interfaces (see 3GPP TS 32.423 [44]), for inter-SGW mobity, when communicating the LDN to the peer node for the first time."}) ies.append({ "ie_type" : "IP Address", "ie_value" : "HNB Local IP Address", "presence" : "CO", "instance" : "0", "comment" : "The MME/SGSN shall include this IE on S11/S4 interface if the PGW/PCRF has requested H(e)NB information reporting and the MME/SGSN has received this information from H(e)NB in UE associated S1/Iu signalling (see 3GPP TS 23.139 [51]). The SGW shall forward this IE on S5/S8 interface if it is received from the MME/SGSN and the Modify Bearer Request message needs to be sent to the PGW as specified in the 3GPP TS 23.401 [3]; orthe Propagate BBAI information change flag is received from the MME/SGSN.(NOTE 7)"}) ies.append({ "ie_type" : "Port Number", "ie_value" : "HNB UDP Port", "presence" : "CO", "instance" : "0", "comment" : "The MME/SGSN shall include this IE on S11/S4 interface if the PGW/PCRF has requested H(e)NB information reporting and the MME/SGSN has received this information from H(e)NB in UE associated S1/Iu signalling (see 3GPP TS 23.139 [51]). The SGW shall forward this IE on S5/S8 interface if it is received from the MME/SGSN and the Modify Bearer Request message needs to be sent to the PGW as specified in the 3GPP TS 23.401 [3]; orthe Propagate BBAI information change flag is received from the MME/SGSN.(NOTE 7)"}) type_list["IP Address"]["max_instance"] = "2" ies.append({ "ie_type" : "IP Address", "ie_value" : "MME/S4-SGSN Identifier", "presence" : "CO", "instance" : "2", "comment" : "If the PGW triggered SGW restoration procedure is supported, the MME/S4-SGSN shall include this IE on S11/S4 interface and the SGW shall forward this IE on S5 interface in the existing signalling as specified in 3GPP TS 23.007 [17].If the overload control feature is supported by the MME/S4-SGSN and is activated for the PLMN to which the PGW belongs(see subclause 12.3.11), the MME/S4-SGSN shall include this IE on the S11/S4 interface during mobility procedures with MME/S4-SGSN change."}) ies.append({ "ie_type" : "CN Operator Selection Entity", "ie_value" : "CN Operator Selection Entity", "presence" : "CO", "instance" : "0", "comment" : "In shared networks, the SGSN shall include this IE on the S4 interface for the RAU procedure, if the information is available, and if the Serving Network IE is present in the message or if the CN Operator Selection Entity has changed, to indicate whether the Serving Network has been selected by the UE or by the network."}) ies.append({ "ie_type" : "Presence Reporting Area Information", "ie_value" : "Presence Reporting Area Information", "presence" : "CO", "instance" : "0", "comment" : "The MME/SGSN shall include this IE: - if the PGW/PCRF has just requested to start reporting changes of UE presence in a Presence Reporting Area and the MME/SGSN supports such reporting. The MME/SGSN shall then indicate whether the UE is inside or outside the Presence Reporting Area.The MME/SGSN shall also include this IE in the following procedures, if the PGW/PCRF requested to report changes of UE presence in a Presence Reporting Area and the MME/SGSN supports such reporting: - TAU/RAU/Handover procedures without SGW change and with MME/SGSN change. The MME/SGSN shall then indicate whether the UE is inside or outside the Presence Reporting Area.- TAU/RAU/Handover/Cell Update procedures without MME/SGSN change, UE initiated Connection Resume and UE-initiated Service Request procedure if the UE enters or leaves the Presence Reporting Area. See NOTE 5, NOTE 10.- UE initiated Service Request, if ISR is active; "}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "MME/S4-SGSN's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the MME/S4-SGSN may include this IE on the S11/S4 interface if the overload control feature is supported by the MME/S4-SGSN and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the MME/S4-SGSN shall provide only one instance of this IE, representing its overload information."}) type_list["Overload Control Information"]["max_instance"] = "1" ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S5/S8 interface if the overload control feature is supported by the SGW and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."}) type_list["Overload Control Information"]["max_instance"] = "2" ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "ePDG's Overload Control Information", "presence" : "O", "instance" : "2", "comment" : "During an overload condition, the ePDG may include this IE over the S2b interface if the overload control feature is supported by the ePDG and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the ePDG shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "Serving PLMN Rate Control", "ie_value" : "Serving PLMN Rate Control", "presence" : "CO", "instance" : "0", "comment" : "The MME shall include this IE on the S11 interface if the Serving PLMN Rate is changed.The target MME shall also include this IE on the S11 interface during an Inter-MME mobility procedure if the Serving PLMN Rate control is configured, and if the configured value is different from the one received from the old MME. See NOTE 20.The SGW shall include this IE on S5/S8 if it receives this IE from MME via the Create Session Request or the Modify Bearer Request message. "}) ies.append({ "ie_type" : "Counter", "ie_value" : "MO Exception Data Counter", "presence" : "CO", "instance" : "0", "comment" : "The MME shall include this IE on the S11 interface when it needs to send a non-zero counter value for the MO Exception Data Counter. The timestamp in the counter shall be set with the time at which the counter value increased from 0 to 1."}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_35.py000066400000000000000000000257471333553357400217460ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : ""}) ies.append({ "ie_type" : "MSISDN", "ie_value" : "MSISDN", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on S5/S8 interfaces by the PGW if it is stored in its UE context and if this message is triggered due to TAU/RAU/HO with SGW relocation."}) ies.append({ "ie_type" : "EBI", "ie_value" : "Linked EPS Bearer ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be sent on S5/S8 when the UE moves from a Gn/Gp SGSN to the S4 SGSN or MME to identify the default bearer the PGW selects for the PDN Connection.This IE shall also be sent by SGW on S11, S4 during Gn/Gp SGSN to S4-SGSN/MME HO procedures to identify the default bearer the PGW selects for the PDN Connection."}) ies.append({ "ie_type" : "APN Restriction", "ie_value" : "APN Restriction", "presence" : "C ", "instance" : "0", "comment" : "This IE denotes the restriction on the combination of types of APN for the APN associated with this EPS bearer Context. This IE shall be included over S5/S8 interfaces, and shall be forwarded over S11/S4 interfaces during Gn/Gp SGSN to MME/S4-SGSN handover procedures. This IE shall also be included on S5/S8 interfaces during the Gn/Gp SGSN to S4 SGSN/MME RAU/TAU procedures.The target MME or SGSN determines the Maximum APN Restriction using the APN Restriction. "}) ies.append({ "ie_type" : "PCO", "ie_value" : "Protocol Configuration Options", "presence" : "C", "instance" : "0", "comment" : "If SGW receives this IE from PGW on GTP or PMIP based S5/S8, the SGW shall forward PCO to MME/S4-SGSN during Inter RAT handover from the UTRAN or from the GERAN to the E-UTRAN. See NOTE 2."}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts modified", "presence" : "C", "instance" : "0", "comment" : "EPS bearers corresponding to Bearer Contexts to be modified that were sent in Modify Bearer Request message. Several IEs with the same type and instance value may be included as necessary to represent a list of the Bearers which are modified."}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts marked for removal", "presence" : "C", "instance" : "1", "comment" : "EPS bearers corresponding to Bearer Contexts to be removed sent in the Modify Bearer Request message. Shall be included if request message contained Bearer Contexts to be removed.For each of those bearers an IE with the same type and instance value shall be included."}) ies.append({ "ie_type" : "Change Reporting Action", "ie_value" : "Change Reporting Action", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included with the appropriate Action field If the location Change Reporting mechanism is to be started or stopped for this subscriber in the SGSN/MME."}) ies.append({ "ie_type" : "CSG Information Reporting Action", "ie_value" : "CSG Information Reporting Action", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included with the appropriate Action field if the location CSG Info change reporting mechanism is to be started or stopped for this subscriber in the SGSN/MME."}) ies.append({ "ie_type" : "eNB Information Reporting", "ie_value" : "HNB Information Reporting ", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 and S4/S11 interfaces with the appropriate Action field if H(e)NB information reporting is to be started or stopped for the PDN connection in the SGSN/MME."}) ies.append({ "ie_type" : "FQDN", "ie_value" : "Charging Gateway Name", "presence" : "C", "instance" : "0", "comment" : "When Charging Gateway Function (CGF) Address is configured, the PGW shall include this IE on the S5 interface during SGW relocation and when the UE moves from Gn/Gp SGSN to S4-SGSN/MME. See NOTE 1."}) ies.append({ "ie_type" : "IP Address", "ie_value" : "Charging Gateway Address", "presence" : "C", "instance" : "0", "comment" : "When Charging Gateway Function (CGF) Address is configured, the PGW shall include this IE on the S5 interface during SGW relocation and when the UE moves from Gn/Gp SGSN to S4-SGSN/MME. See NOTE 1."}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "PGW-FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included by PGW on S5/S8and shall be forwarded by SGW on S11 according to the requirements in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "SGW-FQ-CSID", "presence" : "C", "instance" : "1", "comment" : "This IE shall be included by SGW on S11 according to the requirements in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if contacting the peer for the first time."}) ies.append({ "ie_type" : "LDN", "ie_value" : "SGW LDN", "presence" : "O", "instance" : "0", "comment" : "This IE is optionally sent by the SGW to the MME/SGSN on the S11/S4 interfaces (see 3GPP TS 32.423 [44]), when communicating the LDN to the peer node for the first time."}) ies.append({ "ie_type" : "LDN", "ie_value" : "PGW LDN", "presence" : "O", "instance" : "1", "comment" : "This IE is optionally sent by the PGW to the SGW on the S5/S8 interfaces (see 3GPP TS 32.423 [44]), when communicating the LDN to the peer node for the first time."}) ies.append({ "ie_type" : "Indication", "ie_value" : "Indication Flags", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included if any one of the applicable flags is set to 1.Applicable flags are:Static IPv4 Address Flag: This flag shall be set to 1 on the S5/S8 interface in the TAU/RAU/Handover with SGW change procedure if the PDP/PDN IPv4 address is static as specified in 3GPP TS 32.251 [8]. See NOTE 3.Static IPv6 Address Flag: This flag shall be set to 1 on the S5/S8 interface in the TAU/RAU/Handover with SGW change procedure if the PDP/PDN IPv6 address is static as specified in 3GPP TS 32.251 [8]. See NOTE 3. PDN Pause Support Indication: this flag shall be set to 1 on the S5/S8 interface during the TAU/RAU/handover with SGW relocation procedures if the PGW supports the PGW Pause of Charging procedure.PDN Pause Enable Indication: this flag shall be set to 1 on the S5/S8 interface during the TAU/RAU/handover with SGW relocation procedures if the PGW enables the new SGW to use the PGW Pause of Charging procedure for this PDN connection. Associate OCI with PGW nodes identity: The PGW shall set this flag to 1 on the S5/S8 interface or S2a/S2b interface if it has included the PGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the HSS or DNS during the PGW selection) of the serving PGW. The SGW shall set this flag on the S11/S4 interface if it supports the overload control feature and if the flag is set on the S5/S8 interface.Associate OCI with SGW nodes identity: The SGW shall set this flag to 1 on the S11/S4 interface if it has included the SGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the DNS during the SGW selection) of the serving SGW. Delay Tolerant Connection Indication: the flag shall be set to 1 on the S5/S8 interface during a SGW relocation procedure and when the UE moves from Gn/Gp SGSN to S4-SGSN/MME if the PDN connection is Delay Tolerant (see subclause 8.12). See NOTE 9."}) ies.append({ "ie_type" : "Presence Reporting Area Action", "ie_value" : "Presence Reporting Area Action", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 and S11/S4 interfaces with the appropriate Action field if reporting changes of UE presence in a Presence Routing Area is to be started or stopped for this subscriber in the MME/SGSN."}) ies.append({ "ie_type" : "Load Control Information", "ie_value" : "PGW's node level Load Control Information", "presence" : "O", "instance" : "0", "comment" : "The PGW may include this IE on the S5/S8 or S2a/S2b interface, providing its node level load information, if the load control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access network, ePDG/TWAN for non-3GPP access network, belongs (see clause 12.2.6)."}) ies.append({ "ie_type" : "Load Control Information", "ie_value" : "PGW's APN level Load Control Information", "presence" : "O", "instance" : "1", "comment" : "The PGW may include this IE on the S5/S8 or S2a/S2b interface, providing APN level load information, if the APN level load control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access network, ePDG/TWAN for non-3GPP access based network, belongs (see clause 12.2.6).When present, the PGW shall provide one or more instances of this IE, up to maximum of 10, with the same type and instance value, each representing the load information for a list of APN(s).See NOTE 5, NOTE 7."}) ies.append({ "ie_type" : "Load Control Information", "ie_value" : "SGW's node level Load Control Information", "presence" : "O", "instance" : "2", "comment" : "The SGW may include this IE, over the S11/S4 interface if the load control feature is supported by the SGW and is activated in the network (see clause 12.2.6).When present, the SGW shall provide only one instance of this IE, representing its node level load information."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "PGW's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the PGW may include this IE on the S5/S8 or S2b interface, if the overload control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access based network, ePDG for non-3GPP access based network, belongs (see clause 12.3.11).When present, the PGW shall provide at least one instance of this IE, representing its overload information. Additionally, the PGW may indicate APN level overload control by providing, one or more instances of this IE, up to maximum of 10, with the same type and instance value, each representing the overload information for a list of APN(s).See NOTE 6, NOTE 8."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S11/S4 interface if the overload control feature is supported by the SGW and is activated in the network (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "Charging ID", "ie_value" : "PDN Connection Charging ID", "presence" : "CO", "instance" : "0", "comment" : "The PGW shall include this IE on the S5/S8 interface during a TAU/RAU/HO with SGW relocation procedure, if a PDN connection Charging ID has been allocated during the initial Attach or Initial PDN connection establishment procedure. "}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_36.py000066400000000000000000000220041333553357400217260ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "C", "instance" : "0", "comment" : "If ISR is being de-activated, the Cause IE shall be included on the S4/S11 interface with the value ISR deactivation, which indicates that the SGW shall delete the bearer resources by sending Delete Bearer Request to the MME/SGSN on which ISR was activated with the same Cause value ISR deactivation. See NOTE 3"}) ies.append({ "ie_type" : "EBI", "ie_value" : "Linked EPS Bearer ID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S4/S11, S5/S8 and S2a/S2b interfaces to indicate the default bearer associated with the PDN being disconnected unless in the handover/TAU/RAU with SGW relocation procedures."}) ies.append({ "ie_type" : "ULI", "ie_value" : "User Location Information", "presence" : "C", "instance" : "0", "comment" : "The MME/SGSN shall include this IE on the S4/S11 interface for the Detach procedure. The MME shall include ECGI, SGSN shall include CGI/SAI. The SGW shall include this IE on S5/S8 if it receives the ULI from MME/SGSN. See NOTE 4."}) ies.append({ "ie_type" : "Indication", "ie_value" : "Indication Flags", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included if any one of the applicable flags is set to 1.Applicable flags:Operation Indication: This flag shall be set to 1 over S4/S11 interface, if the SGW needs to forward the Delete Session Request message to the PGW. This flag shall not be set if the ISR associated GTP entity sends this message to the SGW in the Detach procedure. This flag shall also not be set to 1 in the SRNS Relocation Cancel Using S4 (6.9.2.2.4a in 3GPP TS 23.060 [4]), Inter RAT handover Cancel procedure with SGW change TAU with Serving GW change, Gn/Gb based RAU (see 5.5.2.5, 5.3.3.1, D.3.5 in 3GPP TS 23.401 [3], respectively), S1 Based handover Cancel procedure with SGW change.This flag shall also not be set to 1 for, e.g., X2 based handover procedure with SGW change(see subclause 5.5.1.1.3 in 3GPP TS 23.401 [3]), or S1 based handover procedure with SGW change (see subclause 5.5.1.2.2 in 3GPP TS 23.401 [3]). See NOTE 1.Scope Indication: This flag shall be set to 1 on the S4/S11 interface, if the request corresponds to TAU/RAU/Handover with SGW change/SRNS Relocation Cancel Using S4 with SGW change, Inter RAT handover Cancel procedure with SGW change, S1 Based handover Cancel procedure with SGW change. See NOTE 1.Release Over Any Access Indication (ROAAI): This flag shall be set to 1 over the S4/S11 interface when an NB-IFOM capable MME/SGSN wishes to request release of the PDN connection over any applicable access, e.g.:during a basic P-CSCF restoration procedure; or when the MME/SGSN wishes that the PDN connection be reestablished via another PGW for SIPTO.See NOTE 9."}) ies.append({ "ie_type" : "PCO", "ie_value" : "Protocol Configuration Options", "presence" : "C", "instance" : "0", "comment" : "If the UE includes the PCO IE, then the MME/SGSN shall copy the content of this IE transparently from the PCO IE included by the UE.If SGW receives the PCO IE, SGW shall forward it to PGW."}) ies.append({ "ie_type" : "Node Type", "ie_value" : "Originating Node", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S4/S11 interface if the ISR is active in MME/SGSN to denote the type of the node originating the message.The SGW shall release the corresponding Originating Node related EPS Bearer contexts information in the PDN Connection identified by the LBI."}) ies.append({ "ie_type" : "F-TEID", "ie_value" : "Sender F-TEID for Control Plane", "presence" : "O", "instance" : "0", "comment" : "This IE may be included on the S4/S11 interfaces except when the source MME/SGSN initiates the deletion of PDN connections not supported by the target MME/SGSN during a successful handover/TAU/RAU procedure with MME/SGSN change and without SGW change (see subclauses 5.3.3.2 and 5.5.1.2.1 of 3GPP TS 23.401 [3]), in which case this IE shall not be included. See NOTE 10.If the Sender F-TEID for Control Plane is received by the SGW, the SGW shall only accept the Delete Session Request message when the Sender F-TEID for Control Plane in this message is the same as the Sender F-TEID for Control Plane that was last received in either the Create Session Request message or the Modify Bearer Request message on the given interface. If the ISR is activated, two F-TEIDs exist: one for the MME and the other for the SGSN. See NOTE 2."}) ies.append({ "ie_type" : "UE Time Zone", "ie_value" : "UE Time Zone", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included by the MME on the S11 interface or by the SGSN on the S4 interface, for Detach and PDN Disconnection procedures, if the UE Time Zone has changed."}) ies.append({ "ie_type" : "ULI Timestamp", "ie_value" : "ULI Timestamp", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S4/S11 interface if the ULI IE is present. It indicates the time when the User Location Information was acquired. The SGW shall include this IE on S5/S8 if the SGW receives it from the MME/SGSN. See NOTE 4."}) ies.append({ "ie_type" : "RAN/NAS Cause", "ie_value" : "RAN/NAS Release Cause", "presence" : "CO", "instance" : "0", "comment" : "The MME shall include this IE on the S11 interface to indicate the NAS release cause to release the PDN connection, if available and this information is permitted to be sent to the PGW operator according to MME operators policy. The SGW shall include this IE on the S5/S8 interface if it receives it from the MME and if the Operation Indication bit received from the MME is set to 1."}) ies.append({ "ie_type" : "TWAN Identifier", "ie_value" : "TWAN Identifier", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included by the TWAN on the S2a interface as specified in 3GPP TS 23.402 [45]. "}) ies.append({ "ie_type" : "TWAN Identifier Timestamp", "ie_value" : "TWAN Identifier Timestamp", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included by the TWAN on the S2a if the TWAN Identifier IE is present. It shall indicate the time when the TWAN acquired the TWAN Identifier information. "}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "MME/S4-SGSN's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the MME/S4-SGSN may include this IE on the S11/S4 interface if the overload control feature is supported by the MME/S4-SGSN and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the MME/S4-SGSN shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S5/S8 interface if the overload control feature is supported by the SGW and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "TWAN/ePDG's Overload Control Information", "presence" : "O", "instance" : "2", "comment" : "During an overload condition, the TWAN/ePDG may include this IE over the S2a/S2b interface if the overload control feature is supported by the TWAN/ePDG and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the TWAN/ePDG shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "TWAN Identifier", "ie_value" : "WLAN Location Information", "presence" : "CO", "instance" : "1", "comment" : "The ePDG shall include this IE on the S2b interface if the WLAN Location Information is available. "}) ies.append({ "ie_type" : "TWAN Identifier Timestamp", "ie_value" : "WLAN Location Timestamp", "presence" : "CO", "instance" : "1", "comment" : "The ePDG shall include this IE on the S2b interface, if the WLAN Location Timestamp is available. "}) ies.append({ "ie_type" : "IP Address", "ie_value" : "UE Local IP Address", "presence" : "CO", "instance" : "0", "comment" : "The ePDG shall include this IE on the S2b interface. "}) ies.append({ "ie_type" : "Port Number", "ie_value" : "UE UDP Port", "presence" : "CO", "instance" : "0", "comment" : "The ePDG shall include this IE on the S2b interface if NAT is detected and UDP encapsulation is used."}) ies.append({ "ie_type" : "ePCO", "ie_value" : "Extended Protocol Configuration Options", "presence" : "CO", "instance" : "0", "comment" : "If the UE includes the ePCO IE, then the MME shall copy the content of this IE transparently from the ePCO IE included by the UE.If the SGW receives the ePCO IE, the SGW shall forward it to the PGW."}) ies.append({ "ie_type" : "Port Number", "ie_value" : "UE TCP Port", "presence" : "CO", "instance" : "1", "comment" : "The ePDG shall include this IE on the S2b interface if NAT is detected and the TCP encapsulation is used."}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_37.py000066400000000000000000000117521333553357400217370ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : ""}) ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S5/S8, S4/S11 and S2a/S2b interfaces if contacting the peer for the first time "}) ies.append({ "ie_type" : "PCO", "ie_value" : "Protocol Configuration Options", "presence" : "C", "instance" : "0", "comment" : "The PGW shall include Protocol Configuration Options (PCO) IE on the S5/S8 interface, if available and if the UE or the network does not support ePCO.If SGW receives this IE, SGW shall forward it to SGSN/MME on the S4/S11 interface."}) ies.append({ "ie_type" : "Indication", "ie_value" : "Indication Flags", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included if any one of the applicable flags is set to 1.Applicable flags are:Associate OCI with PGW nodes identity: The PGW shall set this flag to 1 on the S5/S8 interface or S2a/S2b interface if it has included the PGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the HSS or DNS during the PGW selection) of the serving PGW. The SGW shall set this flag on the S11/S4 interface if it supports the overload control feature and if the flag is set on the S5/S8 interface.Associate OCI with SGW nodes identity: The SGW shall set this flag to 1 on the S11/S4 interface if it has included the SGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the DNS during the SGW selection) of the serving SGW."}) ies.append({ "ie_type" : "Load Control Information", "ie_value" : "PGW's node level Load Control Information", "presence" : "O", "instance" : "0", "comment" : "The PGW may include this IE on the S5/S8 or S2a/S2b interface, providing its node level load information, if the load control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access network, ePDG/TWAN for non-3GPP access network, belongs (see clause 12.2.6)."}) ies.append({ "ie_type" : "Load Control Information", "ie_value" : "PGW's APN level Load Control Information", "presence" : "O", "instance" : "1", "comment" : "The PGW may include this IE on the S5/S8 or S2a/S2b interface, providing APN level load information, if the APN level load control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access network, ePDG/TWAN for non-3GPP access based network, belongs (see clause 12.2.6).When present, the PGW shall provide one or more instances of this IE, up to maximum of 10, with the same type and instance value, each representing the load information for a list of APN(s).See NOTE 1, NOTE 3."}) ies.append({ "ie_type" : "Load Control Information", "ie_value" : "SGW's node level Load Control Information", "presence" : "O", "instance" : "2", "comment" : "The SGW may include this IE, over the S11/S4 interface if the load control feature is supported by the SGW and is activated in the network (see clause 12.2.6).When present, the SGW shall provide only one instance of this IE, representing its node level load information."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "PGW's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the PGW may include this IE on the S5/S8 or S2a/S2b interface, if the overload control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access based network, ePDG/TWAN for non-3GPP access based network, belongs (see clause 12.3.11).When present, the PGW shall provide at least one instance of this IE, representing its overload information. Additionally, the PGW may indicate APN level overload control by providing, one or more instances of this IE, up to maximum of 10, with the same type and instance value, each representing the overload information for a list of APN(s).See NOTE 2, NOTE 4."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S11/S4 interface if the overload control feature is supported by the SGW and is activated in the network (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "ePCO", "ie_value" : "Extended Protocol Configuration Options", "presence" : "CO", "instance" : "0", "comment" : "The PGW shall include Extended Protocol Configuration Options (ePCO) IE on the S5/S8 interface, if available and if the UE and the network support ePCO.If the SGW receives this IE, the SGW shall forward it to the MME on the S11 interface."}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_64.py000066400000000000000000000046621333553357400217410ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "AMBR", "ie_value" : "APN-Aggregate Maximum Bit Rate", "presence" : "M", "instance" : "0", "comment" : "This IE shall contain the APN-AMBR value received by the MME/SGSN/ TWAN/ePDG from the HSS."}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context", "presence" : "M", "instance" : "0", "comment" : "Only one IE with this type and instance value shall be included and this shall represent the Default Bearer."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "MME/S4-SGSN's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the MME/S4-SGSN may include this IE on the S11/S4 interface if the overload control feature is supported by the MME/S4-SGSN and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the MME/S4-SGSN shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S5/S8 interface if the overload control feature is supported by the SGW and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "TWAN/ePDG's Overload Control Information", "presence" : "O", "instance" : "2", "comment" : "During an overload condition, the TWAN/ePDG may include this IE over the S2a/S2b interface if the overload control feature is supported by the TWAN/ePDG and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the TWAN/ePDG shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "F-TEID", "ie_value" : "Sender F-TEID for Control Plane", "presence" : "CO", "instance" : "0", "comment" : "The SGW shall include this IE on the S5/S8 interfaces and set it to the last value sent to the PGW.If the Sender F-TEID for Control Plane is received, the PGW shall only handle the Modify Bearer Command message if the Sender F-TEID for Control Plane in this message is the same as the last Sender F-TEID for Control Plane received on the given interface."}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_65.py000066400000000000000000000052311333553357400217330ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : ""}) ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S5/S8, S4/S11 and S2a/S2b interfaces if contacting the peer for the first time"}) ies.append({ "ie_type" : "Indication", "ie_value" : "Indication Flags", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included if any one of the applicable flags is set to 1.Applicable flags are:Associate OCI with PGW nodes identity: The PGW shall set this flag to 1 on the S5/S8 interface or S2a/S2b interface if it has included the PGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the HSS or DNS during the PGW selection) of the serving PGW. The SGW shall set this flag on the S11/S4 interface if it supports the overload control feature and if the flag is set on the S5/S8 interface.Associate OCI with SGW nodes identity: The SGW shall set this flag to 1 on the S11/S4 interface if it has included the SGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the DNS during the SGW selection) of the serving SGW."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "PGW's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the PGW may include this IE on the S5/S8 or S2a/S2b interface, if the overload control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access based network, ePDG/TWAN for non-3GPP access based network, belongs (see clause 12.3.11).When present, the PGW shall provide at least one instance of this IE, representing its overload information. Additionally, the PGW may indicate APN level overload control by providing, one or more instances of this IE, up to maximum of 10, with the same type and instance value, each representing the overload information for a list of APN(s).See NOTE 1, NOTE 2."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S11/S4 interface if the overload control feature is supported by the SGW and and is activated in the network (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_66.py000066400000000000000000000054441333553357400217420ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts", "presence" : "M", "instance" : "0", "comment" : "This IE shall be used to indicate dedicated bearers. When used, at least one dedicated bearer shall be present. Several IEs with this type and instance values shall be included as necessary to represent a list of Bearers"}) ies.append({ "ie_type" : "ULI", "ie_value" : "User Location Information", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included by the MME on the S11 interface or by the SGSN on the S4 interface. The CGI/SAI shall be included by SGSN and the ECGI shall be included by MME.The SGW shall forward this IE on the S5/S8 interface if it receives it from the MME/SGSN. See NOTE 1."}) ies.append({ "ie_type" : "ULI Timestamp", "ie_value" : "ULI Timestamp", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S4/S11 interface if the ULI IE is present. It indicates the time when the User Location Information was acquired. The SGW shall include this IE on S5/S8 if the SGW receives it from the MME/SGSN. "}) ies.append({ "ie_type" : "UE Time Zone", "ie_value" : "UE Time Zone", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included, if available, by the MME on the S11 interface or by the SGSN on the S4 interface. "}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "MME/S4-SGSN's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the MME/S4-SGSN may include this IE on the S11/S4 interface if the overload control feature is supported by the MME/S4-SGSN and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the MME/S4-SGSN shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S5/S8 interface if the overload control feature is supported by the SGW and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "F-TEID", "ie_value" : "Sender F-TEID for Control Plane", "presence" : "CO", "instance" : "0", "comment" : "The SGW shall include this IE on the S5/S8 interfaces and set it to the last value sent to the PGW.If the Sender F-TEID for Control Plane is received, the PGW shall only handle the Delete Bearer Command message if the Sender F-TEID for Control Plane in this message is the same as the last Sender F-TEID for Control Plane received on the given interface."}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_67.py000066400000000000000000000054331333553357400217410ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : ""}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Context", "presence" : "M", "instance" : "0", "comment" : "This IE shall contain the list of failed bearers. See subclause 6.1.1 Presence requirements of Information Elements."}) ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included If contacting the peer for the first time. "}) ies.append({ "ie_type" : "Indication", "ie_value" : "Indication Flags", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included if any one of the applicable flags is set to 1.Applicable flags are:Associate OCI with PGW nodes identity: The PGW shall set this flag to 1 on the S5/S8 interface or S2a/S2b interface if it has included the PGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the HSS or DNS during the PGW selection) of the serving PGW. The SGW shall set this flag on the S11/S4 interface if it supports the overload control feature and if the flag is set on the S5/S8 interface.Associate OCI with SGW nodes identity: The SGW shall set this flag to 1 on the S11/S4 interface if it has included the SGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the DNS during the SGW selection) of the serving SGW."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "PGW's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the PGW may include this IE on the S5/S8, if the overload control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access based network belongs (see clause 12.3.11).When present, the PGW shall provide at least one instance of this IE, representing its overload information. Additionally, the PGW may indicate APN level overload control by providing, one or more instances of this IE, up to maximum of 10, with the same type and instance value, each representing the overload information for a list of APN(s).See NOTE 1, NOTE 2."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S11/S4 interface if the overload control feature is supported by the SGW and is activated in the network (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_70.py000066400000000000000000000015041333553357400217260ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : ""}) ies.append({ "ie_type" : "Node Type", "ie_value" : "Originating Node", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S4/S11 interface if the ISR associated GTP entities i.e. MME, S4-SGSN, send this message to the SGW during the Network Triggered Service Request procedure to denote the type of the node originating the message."}) ies.append({ "ie_type" : "IMSI", "ie_value" : "IMSI", "presence" : "CO", "instance" : "0", "comment" : "3GPP TS 23.007 [17] specifies conditions for sending this IE on the S11/S4 interface as part of the network triggered service restoration procedure, if both the SGW and the MME/S4-SGSN support this optional feature."}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_95.py000066400000000000000000000167121333553357400217440ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "PTI", "ie_value" : "Procedure Transaction Id", "presence" : "C", "instance" : "0", "comment" : "This IE shall be sent on the S5/S8 and S4/S11 interfaces when the procedure was initiated by a UE Requested Bearer Resource Modification Procedure or UE Requested Bearer Resource Allocation Procedure (see NOTE 1) or Secondary PDP Context Activation Procedure. The PTI shall be the same as the one used in the corresponding Bearer Resource Command."}) ies.append({ "ie_type" : "EBI", "ie_value" : "Linked EPS Bearer ID", "presence" : "M", "instance" : "0", "comment" : "This IE shall be included to indicate the default bearer associated with the PDN connection."}) ies.append({ "ie_type" : "PCO", "ie_value" : "Protocol Configuration Options", "presence" : "O", "instance" : "0", "comment" : "This IE may be sent on the S5/S8 and S4/S11 interfaces if ePCO is not supported by the UE or the network."}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts", "presence" : "M", "instance" : "0", "comment" : "Several IEs with this type and instance values shall be included as necessary to represent a list of Bearers."}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "PGW-FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included by the PGW on the S5/S8 and S2a/S2b interfaces and, when received from S5/S8 be forwarded by the SGW on the S11 interface according to the requirements in 3GPP TS 23.007 [17]."}) type_list["FQ-CSID"]["max_instance"] = "1" ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "SGW-FQ-CSID", "presence" : "C", "instance" : "1", "comment" : "This IE shall be included by the SGW on the S11 interface according to the requirements in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "Change Reporting Action", "ie_value" : "Change Reporting Action", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 and S4/S11 interfaces with the appropriate Action field If the location Change Reporting mechanism is to be started or stopped for this subscriber in the SGSN/MME."}) ies.append({ "ie_type" : "CSG Information Reporting Action", "ie_value" : "CSG Information Reporting Action", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 and S4/S11 interfaces with the appropriate Action field if the CSG Info reporting mechanism is to be started or stopped for this subscriber in the SGSN/MME."}) ies.append({ "ie_type" : "eNB Information Reporting", "ie_value" : "HNB Information Reporting", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 and S4/S11 interfaces with the appropriate Action field if H(e)NB information reporting is to be started or stopped for the PDN connection in the SGSN/MME."}) ies.append({ "ie_type" : "Presence Reporting Area Action", "ie_value" : "Presence Reporting Area Action", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 and S11/S4 interfaces with the appropriate Action field if reporting changes of UE presence in a Presence Routing Area is to be started or stopped for this subscriber in the MME/SGSN."}) ies.append({ "ie_type" : "Indication", "ie_value" : "Indication Flags", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included if any one of the applicable flags is set to 1.Applicable flags are:Associate OCI with PGW nodes identity: The PGW shall set this flag to 1 on the S5/S8 interface or S2a/S2b interface if it has included the PGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the HSS or DNS during the PGW selection) of the serving PGW. The SGW shall set this flag on the S11/S4 interface if it supports the overload control feature and if the flag is set on the S5/S8 interface.Associate OCI with SGW nodes identity: The SGW shall set this flag to 1 on the S11/S4 interface if it has included the SGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the DNS during the SGW selection) of the serving SGW."}) ies.append({ "ie_type" : "Load Control Information", "ie_value" : "PGW's node level Load Control Information", "presence" : "O", "instance" : "0", "comment" : "The PGW may include this IE on the S5/S8 or S2a/S2b interface, providing its node level load information, if the load control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access network, ePDG/TWAN for non-3GPP access network, belongs (see clause 12.2.6)."}) type_list["Load Control Information"]["max_instance"] = "1" ies.append({ "ie_type" : "Load Control Information", "ie_value" : "PGW's APN level Load Control Information", "presence" : "O", "instance" : "1", "comment" : "The PGW may include this IE on the S5/S8 or S2a/S2b interface, providing APN level load information, if the APN level load control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access network, ePDG/TWAN for non-3GPP access based network, belongs (see clause 12.2.6).When present, the PGW shall provide one or more instances of this IE, up to maximum of 10, with the same type and instance value, each representing the load information for a list of APN(s).See NOTE 2, NOTE 4."}) type_list["Load Control Information"]["max_instance"] = "2" ies.append({ "ie_type" : "Load Control Information", "ie_value" : "SGW's node level Load Control Information", "presence" : "O", "instance" : "2", "comment" : "The SGW may include this IE, over the S11/S4 interface if the load control feature is supported by the SGW and is activated in the network (see clause 12.2.6).When present, the SGW shall provide only one instance of this IE, representing its node level load information."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "PGW's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the PGW may include this IE on the S5/S8 or S2a/S2b interface, if the overload control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access based network, ePDG/TWAN for non-3GPP access based network, belongs (see clause 12.3.11).When present, the PGW shall provide at least one instance of this IE, representing its overload information. Additionally, the PGW may indicate APN level overload control by providing, one or more instances of this IE, up to maximum of 10, with the same type and instance value, each representing the overload information for a list of APN(s).See NOTE 3, NOTE 5."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S11/S4 interface if the overload control feature is supported by the SGW and is activated in the network (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "F-Container", "ie_value" : "NBIFOM Container", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 and S2a/S2b interfaces if the PGW needs to send NBIFOM information as specified in 3GPP TS 23.161 [71]. The Container Type shall be set to 4."}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_96.py000066400000000000000000000145601333553357400217440ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : ""}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts", "presence" : "M", "instance" : "0", "comment" : "All the bearer contexts included in the corresponding Create Bearer Request shall be included. Several IEs with this type and instance value shall be included on the S4/S11, S5/S8 and S2a/S2b interfaces as necessary to represent a list of Bearers."}) ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S4/S11, S5/S8 and S2a/S2b interfaces if contacting the peer for the first time"}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "MME-FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included by the MME on the S11 interfaceand shall be forwarded by the SGW on the S5/S8 interfaces according to the requirements in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "ePDG-FQ-CSID", "presence" : "C", "instance" : "2", "comment" : "This IE shall be included by the ePDG on the S2b interface according to the requirements in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "TWAN-FQ-CSID", "presence" : "C", "instance" : "3", "comment" : "This IE shall be included by the TWAN on the S2a interface according to the requirements in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "PCO", "ie_value" : "Protocol Configuration Options", "presence" : "C", "instance" : "0", "comment" : "If the UE includes the PCO IE, then the MME/SGSN shall copy the content of this IE transparently from the PCO IE included by the UE. If the SGW receives PCO from MME/SGSN, SGW shall forward it to the PGW."}) ies.append({ "ie_type" : "UE Time Zone", "ie_value" : "UE Time Zone", "presence" : "O", "instance" : "0", "comment" : "This IE is optionally included by the MME on the S11 interface or by the SGSN on the S4 interface. "}) ies.append({ "ie_type" : "ULI", "ie_value" : "User Location Information", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included by the MME on the S11 interface or by the SGSN on the S4 interface. The CGI/SAI shall be included by SGSN and the ECGI shall be included by MME. See NOTE 1."}) ies.append({ "ie_type" : "TWAN Identifier", "ie_value" : "TWAN Identifier", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included by the TWAN on the S2a interface as specified in 3GPP TS 23.402 [45]. "}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "MME/S4-SGSN's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the MME/S4-SGSN may include this IE on the S11/S4 interface if the overload control feature is supported by the MME/S4-SGSN and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the MME/S4-SGSN shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S5/S8 interface if the overload control feature is supported by the SGW and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "Presence Reporting Area Information", "ie_value" : "Presence Reporting Area Information", "presence" : "CO", "instance" : "0", "comment" : "The MME/SGSN shall include this IE on S11/S4 if the PGW/PCRF has requested to start reporting changes of UE presence in a Presence Reporting Area in the corresponding Create Bearer Request message and the MME/SGSN supports such reporting. The MME/SGSN shall then indicate whether the UE is inside or outside the Presence Reporting Area.The SGW shall include this IE on S5/S8 if it receives the Presence Reporting Area Information from the MME/SGSN."}) ies.append({ "ie_type" : "IP Address", "ie_value" : "MME/S4-SGSN Identifier", "presence" : "CO", "instance" : "0", "comment" : "If the overload control feature is supported by the MME/S4-SGSN and is activated for the PLMN to which the PGW belongs (see subclause 12.3.11), the MME/S4-SGSN shall include this IE on the S11/S4 interface if the PGW has not been updated with the identity of the currently serving MME/S4-SGSN, i.e. if no other message carrying MME/S4-SGSN identity has been sent to the PGW during/after an inter-MME/S4-SGSN intra-SGW mobility procedure."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "TWAN/ePDG's Overload Control Information", "presence" : "O", "instance" : "2", "comment" : "During an overload condition, the TWAN/ePDG may include this IE over the S2a/S2b interface if the overload control feature is supported by the TWAN/ePDG and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the TWAN/ePDG shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "TWAN Identifier", "ie_value" : "WLAN Location Information", "presence" : "CO", "instance" : "1", "comment" : "The ePDG shall include this IE on the S2b interface if the WLAN Location Information is available. "}) ies.append({ "ie_type" : "TWAN Identifier Timestamp", "ie_value" : "WLAN Location Timestamp", "presence" : "CO", "instance" : "1", "comment" : "The ePDG shall include this IE on the S2b interface, if the WLAN Location Timestamp is available. "}) ies.append({ "ie_type" : "Port Number", "ie_value" : "UE UDP Port", "presence" : "CO", "instance" : "0", "comment" : "The ePDG shall include this IE on the S2b interface if NAT is detected."}) ies.append({ "ie_type" : "F-Container", "ie_value" : "NBIFOM Container", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S11/S4 or S2a/S2b interfaces if the MME/S4-SGSN or the TWAN/ePDG receives a NBIFOM Container from the UE as specified in 3GPP TS 24.161 73]. The Container Type shall be set to 4."}) ies.append({ "ie_type" : "Port Number", "ie_value" : "UE TCP Port", "presence" : "CO", "instance" : "1", "comment" : "The ePDG shall include this IE on the S2b interface if NAT is detected and the TCP encapsulation is used."}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_97.py000066400000000000000000000175451333553357400217530ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts", "presence" : "M", "instance" : "0", "comment" : "This IE shall contain contexts related to bearers that need QoS/TFT modification. Several IEs with this type and instance values shall be included as necessary to represent a list of Bearers. If there is no QoS/TFT modification, only one IE with this type and instance value shall be included."}) ies.append({ "ie_type" : "PTI", "ie_value" : "Procedure Transaction Id", "presence" : "C", "instance" : "0", "comment" : "If the request corresponds to UE requested bearer resource modification procedure or the UE requested bearer resource allocation procedure for an E-UTRAN (see NOTE 1) or MS initiated EPS bearer modification procedure, this IE shall be included.PTI shall be the same as the one used in the corresponding Bearer Resource Command"}) ies.append({ "ie_type" : "PCO", "ie_value" : "Protocol Configuration Options", "presence" : "C", "instance" : "0", "comment" : "The PGW shall include the Protocol Configuration Options (PCO) IE on the S5/S8 interface, if available and if ePCO is not supported by the UE or the network. The PCO IE shall carry a P-CSCF address list only when the UE is required to perform an IMS registration, e.g during the P-CSCF restoration procedure as defined in clause 5 of 3GPP TS 23.380 [61].If SGW receives this IE, SGW shall forward it to SGSN/MME on the S4/S11 interface."}) ies.append({ "ie_type" : "AMBR", "ie_value" : "Aggregate Maximum Bit Rate", "presence" : "M", "instance" : "0", "comment" : "APN-AMBR"}) ies.append({ "ie_type" : "Change Reporting Action", "ie_value" : "Change Reporting Action", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 and S4/S11 interfaces with the appropriate Action field If the location Change Reporting mechanism is to be started or stopped for this subscriber in the SGSN/MME."}) ies.append({ "ie_type" : "CSG Information Reporting Action", "ie_value" : "CSG Information Reporting Action", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 and S4/S11 interfaces with the appropriate Action field if the CSG Info reporting mechanism is to be started or stopped for this subscriber in the SGSN/MME."}) ies.append({ "ie_type" : "eNB Information Reporting", "ie_value" : "HNB Information Reporting ", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 and S4/S11 interfaces with the appropriate Action field if H(e)NB information reporting is to be started or stopped for the PDN connection in the SGSN/MME."}) ies.append({ "ie_type" : "Indication", "ie_value" : "Indication flags", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included if any one of the applicable flags is set to 1.Applicable flags are:Retrieve Location Indication: This flag shall be set to 1 on the S5/S8, S4/S11, S2a and S2b interfaces in the PGW Initiated Bearer Modification procedure if the location information is requested. Associate OCI with PGW nodes identity: The PGW shall set this flag to 1 on the S5/S8 interface or S2a/S2b interface if it has included the PGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the HSS or DNS during the PGW selection) of the serving PGW. The SGW shall set this flag on the S11/S4 interface if it supports the overload control feature and if the flag is set on the S5/S8 interface.Associate OCI with SGW nodes identity: The SGW shall set this flag to 1 on the S11/S4 interface if it has included the SGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the DNS during the SGW selection) of the serving SGW."}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "PGW-FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included by PGW on the S5/S8 and S2a/S2b interfaces, and when received from S5/S8 be forwarded by SGW on S11 according to the requirements in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "SGW-FQ-CSID", "presence" : "C", "instance" : "1", "comment" : "This IE shall be included by SGW on S11 according to the requirements in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "Presence Reporting Area Action", "ie_value" : "Presence Reporting Area Action", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 and S11/S4 interfaces with the appropriate Action field if reporting changes of UE presence in a Presence Routing Area is to be started or stopped for this subscriber in the MME/SGSN."}) ies.append({ "ie_type" : "Load Control Information", "ie_value" : "PGW's node level Load Control Information", "presence" : "O", "instance" : "0", "comment" : "The PGW may include this IE on the S5/S8 or S2a/S2b interface, providing its node level load information, if the load control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access network, ePDG/TWAN for non-3GPP access network, belongs (see clause 12.2.6)."}) ies.append({ "ie_type" : "Load Control Information", "ie_value" : "PGW's APN level Load Control Information", "presence" : "O", "instance" : "1", "comment" : "The PGW may include this IE on the S5/S8 or S2a/S2b interface, providing APN level load information, if the APN level load control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access network, ePDG/TWAN for non-3GPP access based network, belongs (see clause 12.2.6).When present, the PGW shall provide one or more instances of this IE, up to maximum of 10, with the same type and instance value, each representing the load information for a list of APN(s).See NOTE 2, NOTE 4."}) ies.append({ "ie_type" : "Load Control Information", "ie_value" : "SGW's node level Load Control Information", "presence" : "O", "instance" : "2", "comment" : "The SGW may include this IE, over the S11/S4 interface if the load control feature is supported by the SGW and is activated in the network (see clause 12.2.6).When present, the SGW shall provide only one instance of this IE, representing its node level load information."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "PGW's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the PGW may include this IE on the S5/S8 or S2a/S2b interface, if the overload control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access based network, ePDG/TWAN for non-3GPP access based network, belongs (see clause 12.3.11).When present, the PGW shall provide at least one instance of this IE, representing its overload information. Additionally, the PGW may indicate APN level overload control by providing, one or more instances of this IE, up to maximum of 10, with the same type and instance value, each representing the overload information for a list of APN(s).See NOTE 3, NOTE 5."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S11/S4 interface if the overload control feature is supported by the SGW and is activated in the network (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "F-Container", "ie_value" : "NBIFOM Container", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 or S2a/S2b interfaces if the PGW needs to send NBIFOM information as specified in 3GPP TS 23.161 [71]. The Container Type shall be set to 4."}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_98.py000066400000000000000000000154451333553357400217510ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "M", "instance" : "0", "comment" : ""}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Bearer Contexts", "presence" : "M", "instance" : "0", "comment" : "This IE shall contain all the bearer contexts included in the corresponding Update Bearer Request. Several IEs with this type and instance values shall be included as necessary to represent a list of Bearers."}) ies.append({ "ie_type" : "PCO", "ie_value" : "Protocol Configuration Options", "presence" : "CO", "instance" : "0", "comment" : "An MME/SGSN shall include the PCO IE if such information was received from the UE. If the SGW receives this IE, the SGW shall forward it to PGW on the S5/S8 interface."}) ies.append({ "ie_type" : "Recovery", "ie_value" : "Recovery", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included on the S5/S8, S4/S11 and S2a/S2b interfaces if contacting the peer for the first time "}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "MME-FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included by MME on S11and shall be forwarded by SGW on S5/S8 according to the requirements in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "SGW-FQ-CSID", "presence" : "C", "instance" : "1", "comment" : "This IE shall be included by SGW on S5/S8 according to the requirements in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "ePDG-FQ-CSID", "presence" : "C", "instance" : "2", "comment" : "This IE shall be included by the ePDG on the S2b interface according to the requirements in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "TWAN-FQ-CSID", "presence" : "C", "instance" : "3", "comment" : "This IE shall be included by the TWAN on the S2a interface according to the requirements in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "Indication", "ie_value" : "Indication Flags", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included if any one of the applicable flags is set to 1.Applicable flags:Direct Tunnel Flag: This flag shall be set to 1 on the S4 interface, if Direct Tunnel is used."}) ies.append({ "ie_type" : "UE Time Zone", "ie_value" : "UE Time Zone", "presence" : "O", "instance" : "0", "comment" : "This IE is optionally included by the MME on the S11 interface or by the SGSN on the S4 interface. "}) ies.append({ "ie_type" : "ULI", "ie_value" : "User Location Information", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included by the MME on the S11 interface or by the SGSN on the S4 interface. The CGI/SAI shall be included by SGSN and the ECGI shall be included by MME. See NOTE 1."}) ies.append({ "ie_type" : "TWAN Identifier", "ie_value" : "TWAN Identifier", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included by the TWAN on the S2a interface as specified in 3GPP TS 23.402 [45]. "}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "MME/S4-SGSN's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the MME/S4-SGSN may include this IE on the S11/S4 interface if the overload control feature is supported by the MME/S4-SGSN and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the MME/S4-SGSN shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S5/S8 interface if the overload control feature is supported by the SGW and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "Presence Reporting Area Information", "ie_value" : "Presence Reporting Area Information", "presence" : "CO", "instance" : "0", "comment" : "The MME/SGSN shall include this IE on S11/S4 if the PGW/PCRF has requested to start reporting changes of UE presence in a Presence Reporting Area in the corresponding Update Bearer Request message and the MME/SGSN supports such reporting. The MME/SGSN shall then indicate whether the UE is inside or outside the Presence Reporting Area.The SGW shall include this IE on S5/S8 if it receives the Presence Reporting Area Information from the MME/SGSN."}) ies.append({ "ie_type" : "IP Address", "ie_value" : "MME/S4-SGSN Identifier", "presence" : "CO", "instance" : "0", "comment" : "If the overload control feature is supported by the MME/S4-SGSN and is activated for the PLMN to which the PGW belongs (see subclause 12.3.11), the MME/S4-SGSN shall include this IE on the S11/S4 interface if the PGW has not been updated with the identity of the currently serving MME/S4-SGSN, i.e. if no other message carrying MME/S4-SGSN identity has been sent to the PGW during/after an inter-MME/S4-SGSN intra-SGW mobility procedure."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "TWAN/ePDG's Overload Control Information", "presence" : "O", "instance" : "2", "comment" : "During an overload condition, the TWAN/ePDG may include this IE over the S2a/S2b interface if the overload control feature is supported by the TWAN/ePDG and is activated for the PLMN to which the PGW belongs (see clause 12.3.11).When present, the TWAN/ePDG shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "TWAN Identifier", "ie_value" : "WLAN Location Information", "presence" : "CO", "instance" : "1", "comment" : "The ePDG shall include this IE on the S2b interface if the WLAN Location Information is available. "}) ies.append({ "ie_type" : "TWAN Identifier Timestamp", "ie_value" : "WLAN Location Timestamp", "presence" : "CO", "instance" : "1", "comment" : "The ePDG shall include this IE on the S2b interface, if the WLAN Location Timestamp is available. "}) ies.append({ "ie_type" : "Port Number", "ie_value" : "UE UDP Port", "presence" : "CO", "instance" : "0", "comment" : "The ePDG shall include this IE on the S2b interface if NAT is detected and UDP encapsulation is used."}) ies.append({ "ie_type" : "F-Container", "ie_value" : "NBIFOM Container", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S11/S4 or S2a/S2b interfaces if the MME/S4-SGSN or the TWAN/ePDG receives a NBIFOM Container from the UE as specified in 3GPP TS 24.161 73]. The Container Type shall be set to 4."}) ies.append({ "ie_type" : "Port Number", "ie_value" : "UE TCP Port", "presence" : "CO", "instance" : "1", "comment" : "The ePDG shall include this IE on the S2b interface if NAT is detected and TCP encapsulation is used."}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_99.py000066400000000000000000000200131333553357400217350ustar00rootroot00000000000000ies = [] ies.append({ "ie_type" : "EBI", "ie_value" : "Linked EPS Bearer ID", "presence" : "C", "instance" : "0", "comment" : "If the request corresponds to the bearer deactivation procedure in case all bearers belonging to a PDN connection shall be released, then this IE shall be included on the S5/S8, S4/S11 and S2a/S2b interfaces to indicate the default bearer associated with the PDN being disconnected.This IE shall be included only when the EPS Bearer ID is not present in the message."}) type_list["EBI"]["max_instance"] = "1" ies.append({ "ie_type" : "EBI", "ie_value" : "EPS Bearer IDs", "presence" : "C", "instance" : "1", "comment" : "This IE shall be included on S5/S8, S4/S11 and S2a/S2b interfaces for deleting bearers different from the default one, i.e. for dedicated bearers. In this case at least one dedicated bearer shall be included.This IE shall be included only when the Linked EPS Bearer ID is not present in the message.Several IEs with this type and instance values shall be included as necessary to represent a list of Bearers."}) ies.append({ "ie_type" : "Bearer Context", "ie_value" : "Failed Bearer Contexts", "presence" : "O", "instance" : "0", "comment" : "This IE may be included on the S5/S8 and S11 interfaces if the request corresponds to MME initiated bearer deactivation procedure. This IE shall contain the list of failed bearers if partial Bearer Contexts included in the Delete Bearer Command message could not be deleted."}) ies.append({ "ie_type" : "PTI", "ie_value" : "Procedure Transaction Id", "presence" : "C", "instance" : "0", "comment" : "If the request corresponds to UE requested bearer resource modification procedure for an E-UTRAN, this IE shall be included on the S5/S8 and S11 interfaces."}) ies.append({ "ie_type" : "PCO", "ie_value" : "Protocol Configuration Options", "presence" : "C", "instance" : "0", "comment" : "The PGW shall include Protocol Configuration Options (PCO) IE on the S5/S8 interface, if available and if ePCO is not supported by the UE or the network.If SGW receives this IE, SGW shall forward it to SGSN/MME on the S4/S11 interface."}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "PGW-FQ-CSID", "presence" : "C", "instance" : "0", "comment" : "This IE shall be included by the PGW on the S5/S8 and S2a/S2b interfaces, and when received from S5/S8 be forwarded by the SGW on the S11 interface according to the requirements in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "FQ-CSID", "ie_value" : "SGW-FQ-CSID", "presence" : "C", "instance" : "1", "comment" : "This IE shall be included by the SGW on the S11 interface according to the requirements in 3GPP TS 23.007 [17]."}) ies.append({ "ie_type" : "Cause", "ie_value" : "Cause", "presence" : "C", "instance" : "0", "comment" : "This IE shall be sent on S5/S8 and S11/S4 interfaces if the message is caused by a handover with or without optimization from 3GPP to non-3GPP (see subclause 9.3.2 in 3GPP TS 23.402 [45] and subclause 5.4.4.1 in 3GPP TS 23.401 [3], respectively). In this case the Cause value shall be set to RAT changed from 3GPP to Non-3GPP. This IE shall also be sent on S11/S4 interfaces when the SGW requests to delete all bearer contexts for the given UE in an MME or S4-SGSN due to ISR deactivation, and the Cause value shall be set to ISR deactivation. This IE shall be sent on the S2a/S2b interface if the message is caused by handover from non-3GPP to 3GPP. In this case the Cause value shall be set to Access changed from Non-3GPP to 3GPP. "}) ies.append({ "ie_type" : "Indication", "ie_value" : "Indication Flags", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included if any one of the applicable flags is set to 1.Applicable flags are:Associate OCI with PGW nodes identity: The PGW shall set this flag to 1 on the S5/S8 interface or S2a/S2b interface if it has included the PGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the HSS or DNS during the PGW selection) of the serving PGW. The SGW shall set this flag on the S11/S4 interface if it supports the overload control feature and if the flag is set on the S5/S8 interface.Associate OCI with SGW nodes identity: The SGW shall set this flag to 1 on the S11/S4 interface if it has included the SGWs Overload Control Information and if this information is to be associated with the node identity (i.e. FQDN or the IP address received from the DNS during the SGW selection) of the serving SGW."}) ies.append({ "ie_type" : "Load Control Information", "ie_value" : "PGW's node level Load Control Information", "presence" : "O", "instance" : "0", "comment" : "The PGW may include this IE on the S5/S8 or S2a/S2b interface, providing its node level load information, if the load control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access network, ePDG/TWAN for non-3GPP access network, belongs (see clause 12.2.6)."}) ies.append({ "ie_type" : "Load Control Information", "ie_value" : "PGW's APN level Load Control Information", "presence" : "O", "instance" : "1", "comment" : "The PGW may include this IE on the S5/S8 or S2a/S2b interface, providing APN level load information, if the APN level load control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access network, ePDG/TWAN for non-3GPP access based network, belongs (see clause 12.2.6).When present, the PGW shall provide one or more instances of this IE, up to maximum of 10, with the same type and instance value, each representing the load information for a list of APN(s).See NOTE 3, NOTE 5."}) ies.append({ "ie_type" : "Load Control Information", "ie_value" : "SGW's node level Load Control Information", "presence" : "O", "instance" : "2", "comment" : "The SGW may include this IE, over the S11/S4 interface if the load control feature is supported by the SGW and is activated in the network (see clause 12.2.6).When present, the SGW shall provide only one instance of this IE, representing its node level load information."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "PGW's Overload Control Information", "presence" : "O", "instance" : "0", "comment" : "During an overload condition, the PGW may include this IE on the S5/S8 or S2a/S2b interface, if the overload control feature is supported by the PGW and is activated for the PLMN to which the access network node, i.e. MME/S4-SGSN for 3GPP access based network, ePDG/TWAN for non-3GPP access based network, belongs (see clause 12.3.11).When present, the PGW shall provide at least one instance of this IE, representing its overload information. Additionally, the PGW may indicate APN level overload control by providing, one or more instances of this IE, up to maximum of 10, with the same type and instance value, each representing the overload information for a list of APN(s).See NOTE 4, NOTE 6."}) ies.append({ "ie_type" : "Overload Control Information", "ie_value" : "SGW's Overload Control Information", "presence" : "O", "instance" : "1", "comment" : "During an overload condition, the SGW may include this IE over the S11/S4 interface if the overload control feature is supported by the SGW and is activated in the network (see clause 12.3.11).When present, the SGW shall provide only one instance of this IE, representing its overload information."}) ies.append({ "ie_type" : "F-Container", "ie_value" : "NBIFOM Container", "presence" : "CO", "instance" : "0", "comment" : "This IE shall be included on the S5/S8 and S2a/S2b interfaces if the PGW needs to send NBIFOM information as specified in 3GPP TS 23.161 [71]. The Container Type shall be set to 4."}) ies.append({ "ie_type" : "ePCO", "ie_value" : "Extended Protocol Configuration Options", "presence" : "CO", "instance" : "0", "comment" : "The PGW shall include Extended Protocol Configuration Options (ePCO) IE on the S5/S8 interface, if available and if the UE and the network support ePCO.If the SGW receives this IE, the SGW shall forward it to the MME on the S11 interface."}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/gtp/support/cache/tlv_msg_list.py000066400000000000000000000062721333553357400224620ustar00rootroot00000000000000msg_list["Echo Request"] = { "type" : "1" } msg_list["Echo Response"] = { "type" : "2" } msg_list["Version Not Supported Indication"] = { "type" : "3" } msg_list["Create Session Request"] = { "type" : "32" } msg_list["Create Session Response"] = { "type" : "33" } msg_list["Delete Session Request"] = { "type" : "36" } msg_list["Delete Session Response"] = { "type" : "37" } msg_list["Modify Bearer Request"] = { "type" : "34" } msg_list["Modify Bearer Response"] = { "type" : "35" } msg_list["Remote UE Report Notification"] = { "type" : "40" } msg_list["Remote UE Report Acknowledge"] = { "type" : "41" } msg_list["Change Notification Request"] = { "type" : "38" } msg_list["Change Notification Response"] = { "type" : "39" } msg_list["Resume Notification"] = { "type" : "164" } msg_list["Resume Acknowledge"] = { "type" : "165" } msg_list["Modify Bearer Command"] = { "type" : "64" } msg_list["Modify Bearer Failure Indication"] = { "type" : "65" } msg_list["Delete Bearer Command"] = { "type" : "66" } msg_list["Delete Bearer Failure Indication"] = { "type" : "67" } msg_list["Bearer Resource Command"] = { "type" : "68" } msg_list["Bearer Resource Failure Indication"] = { "type" : "69" } msg_list["Downlink Data Notification Failure Indication"] = { "type" : "70" } msg_list["Trace Session Activation"] = { "type" : "71" } msg_list["Trace Session Deactivation"] = { "type" : "72" } msg_list["Stop Paging Indication"] = { "type" : "73" } msg_list["Create Bearer Request"] = { "type" : "95" } msg_list["Create Bearer Response"] = { "type" : "96" } msg_list["Update Bearer Request"] = { "type" : "97" } msg_list["Update Bearer Response"] = { "type" : "98" } msg_list["Delete Bearer Request"] = { "type" : "99" } msg_list["Delete Bearer Response"] = { "type" : "100" } msg_list["Delete PDN Connection Set Request"] = { "type" : "101" } msg_list["Delete PDN Connection Set Response"] = { "type" : "102" } msg_list["PGW Downlink Triggering Notification"] = { "type" : "103" } msg_list["PGW Downlink Triggering Acknowledge"] = { "type" : "104" } msg_list["Suspend Notification"] = { "type" : "162" } msg_list["Suspend Acknowledge"] = { "type" : "163" } msg_list["Create Forwarding Tunnel Request"] = { "type" : "160" } msg_list["Create Forwarding Tunnel Response"] = { "type" : "161" } msg_list["Create Indirect Data Forwarding Tunnel Request"] = { "type" : "166" } msg_list["Create Indirect Data Forwarding Tunnel Response"] = { "type" : "167" } msg_list["Delete Indirect Data Forwarding Tunnel Request"] = { "type" : "168" } msg_list["Delete Indirect Data Forwarding Tunnel Response"] = { "type" : "169" } msg_list["Release Access Bearers Request"] = { "type" : "170" } msg_list["Release Access Bearers Response"] = { "type" : "171" } msg_list["Downlink Data Notification"] = { "type" : "176" } msg_list["Downlink Data Notification Acknowledge"] = { "type" : "177" } msg_list["PGW Restart Notification"] = { "type" : "179" } msg_list["PGW Restart Notification Acknowledge"] = { "type" : "180" } msg_list["Update PDN Connection Set Request"] = { "type" : "200" } msg_list["Update PDN Connection Set Response"] = { "type" : "201" } msg_list["Modify Access Bearers Request"] = { "type" : "211" } msg_list["Modify Access Bearers Response"] = { "type" : "212" } nextepc-0.3.10/lib/gtp/support/cache/tlv_type_list.py000066400000000000000000000206021333553357400226460ustar00rootroot00000000000000type_list["IMSI"] = { "type" : "1", "max_instance" : "0" } type_list["Cause"] = { "type" : "2", "max_instance" : "0" } type_list["Recovery"] = { "type" : "3", "max_instance" : "0" } type_list["STN-SR"] = { "type" : "51", "max_instance" : "0" } type_list["APN"] = { "type" : "71", "max_instance" : "0" } type_list["AMBR"] = { "type" : "72", "max_instance" : "0" } type_list["EBI"] = { "type" : "73", "max_instance" : "0" } type_list["IP Address"] = { "type" : "74", "max_instance" : "0" } type_list["MEI"] = { "type" : "75", "max_instance" : "0" } type_list["MSISDN"] = { "type" : "76", "max_instance" : "0" } type_list["Indication"] = { "type" : "77", "max_instance" : "0" } type_list["PCO"] = { "type" : "78", "max_instance" : "0" } type_list["PAA"] = { "type" : "79", "max_instance" : "0" } type_list["Bearer QoS"] = { "type" : "80", "max_instance" : "0" } type_list["Flow QoS"] = { "type" : "81", "max_instance" : "0" } type_list["RAT Type"] = { "type" : "82", "max_instance" : "0" } type_list["Serving Network"] = { "type" : "83", "max_instance" : "0" } type_list["Bearer TFT"] = { "type" : "84", "max_instance" : "0" } type_list["TAD"] = { "type" : "85", "max_instance" : "0" } type_list["ULI"] = { "type" : "86", "max_instance" : "0" } type_list["F-TEID"] = { "type" : "87", "max_instance" : "0" } type_list["TMSI"] = { "type" : "88", "max_instance" : "0" } type_list["Global CN-Id"] = { "type" : "89", "max_instance" : "0" } type_list["S103PDF"] = { "type" : "90", "max_instance" : "0" } type_list["S1UDF"] = { "type" : "91", "max_instance" : "0" } type_list["Delay Value"] = { "type" : "92", "max_instance" : "0" } type_list["Bearer Context"] = { "type" : "93", "max_instance" : "0" } type_list["Charging ID"] = { "type" : "94", "max_instance" : "0" } type_list["Charging Characteristics"] = { "type" : "95", "max_instance" : "0" } type_list["Trace Information"] = { "type" : "96", "max_instance" : "0" } type_list["Bearer Flags"] = { "type" : "97", "max_instance" : "0" } type_list["PDN Type"] = { "type" : "99", "max_instance" : "0" } type_list["PTI"] = { "type" : "100", "max_instance" : "0" } type_list["PDN Connection"] = { "type" : "109", "max_instance" : "0" } type_list["PDU Numbers"] = { "type" : "110", "max_instance" : "0" } type_list["P-TMSI"] = { "type" : "111", "max_instance" : "0" } type_list["P-TMSI Signature"] = { "type" : "112", "max_instance" : "0" } type_list["Hop Counter"] = { "type" : "113", "max_instance" : "0" } type_list["UE Time Zone"] = { "type" : "114", "max_instance" : "0" } type_list["Trace Reference"] = { "type" : "115", "max_instance" : "0" } type_list["Complete Request Message"] = { "type" : "116", "max_instance" : "0" } type_list["GUTI"] = { "type" : "117", "max_instance" : "0" } type_list["F-Container"] = { "type" : "118", "max_instance" : "0" } type_list["F-Cause"] = { "type" : "119", "max_instance" : "0" } type_list["PLMN ID"] = { "type" : "120", "max_instance" : "0" } type_list["Target Identification"] = { "type" : "121", "max_instance" : "0" } type_list["Packet Flow ID"] = { "type" : "123", "max_instance" : "0" } type_list["RAB Context"] = { "type" : "124", "max_instance" : "0" } type_list["Source RNC PDCP Context Info"] = { "type" : "125", "max_instance" : "0" } type_list["Port Number"] = { "type" : "126", "max_instance" : "0" } type_list["APN Restriction"] = { "type" : "127", "max_instance" : "0" } type_list["Selection Mode"] = { "type" : "128", "max_instance" : "0" } type_list["Source Identification"] = { "type" : "129", "max_instance" : "0" } type_list["Change Reporting Action"] = { "type" : "131", "max_instance" : "0" } type_list["FQ-CSID"] = { "type" : "132", "max_instance" : "0" } type_list["Channel needed"] = { "type" : "133", "max_instance" : "0" } type_list["eMLPP Priority"] = { "type" : "134", "max_instance" : "0" } type_list["Node Type"] = { "type" : "135", "max_instance" : "0" } type_list["FQDN"] = { "type" : "136", "max_instance" : "0" } type_list["TI"] = { "type" : "137", "max_instance" : "0" } type_list["MBMS Session Duration"] = { "type" : "138", "max_instance" : "0" } type_list["MBMS Service Area"] = { "type" : "139", "max_instance" : "0" } type_list["MBMS Session Identifier"] = { "type" : "140", "max_instance" : "0" } type_list["MBMS Flow Identifier"] = { "type" : "141", "max_instance" : "0" } type_list["MBMS IP Multicast Distribution"] = { "type" : "142", "max_instance" : "0" } type_list["MBMS Distribution Acknowledge"] = { "type" : "143", "max_instance" : "0" } type_list["RFSP Index"] = { "type" : "144", "max_instance" : "0" } type_list["UCI"] = { "type" : "145", "max_instance" : "0" } type_list["CSG Information Reporting Action"] = { "type" : "146", "max_instance" : "0" } type_list["CSG ID"] = { "type" : "147", "max_instance" : "0" } type_list["CMI"] = { "type" : "148", "max_instance" : "0" } type_list["Service indicator"] = { "type" : "149", "max_instance" : "0" } type_list["Detach Type"] = { "type" : "150", "max_instance" : "0" } type_list["LDN"] = { "type" : "151", "max_instance" : "0" } type_list["Node Features"] = { "type" : "152", "max_instance" : "0" } type_list["MBMS Time to Data Transfer"] = { "type" : "153", "max_instance" : "0" } type_list["Throttling"] = { "type" : "154", "max_instance" : "0" } type_list["ARP"] = { "type" : "155", "max_instance" : "0" } type_list["EPC Timer"] = { "type" : "156", "max_instance" : "0" } type_list["Signalling Priority Indication"] = { "type" : "157", "max_instance" : "0" } type_list["TMGI"] = { "type" : "158", "max_instance" : "0" } type_list["Additional MM context for SRVCC"] = { "type" : "159", "max_instance" : "0" } type_list["Additional flags for SRVCC"] = { "type" : "160", "max_instance" : "0" } type_list["MDT Configuration"] = { "type" : "162", "max_instance" : "0" } type_list["APCO"] = { "type" : "163", "max_instance" : "0" } type_list["Absolute Time of MBMS Data Transfer"] = { "type" : "164", "max_instance" : "0" } type_list["eNB Information Reporting"] = { "type" : "165", "max_instance" : "0" } type_list["IP4CP"] = { "type" : "166", "max_instance" : "0" } type_list["Change to Report Flags"] = { "type" : "167", "max_instance" : "0" } type_list["Action Indication"] = { "type" : "168", "max_instance" : "0" } type_list["TWAN Identifier"] = { "type" : "169", "max_instance" : "0" } type_list["ULI Timestamp"] = { "type" : "170", "max_instance" : "0" } type_list["MBMS Flags"] = { "type" : "171", "max_instance" : "0" } type_list["RAN/NAS Cause"] = { "type" : "172", "max_instance" : "0" } type_list["CN Operator Selection Entity"] = { "type" : "173", "max_instance" : "0" } type_list["TWMI"] = { "type" : "174", "max_instance" : "0" } type_list["Node Number"] = { "type" : "175", "max_instance" : "0" } type_list["Node Identifier"] = { "type" : "176", "max_instance" : "0" } type_list["Presence Reporting Area Action"] = { "type" : "177", "max_instance" : "0" } type_list["Presence Reporting Area Information"] = { "type" : "178", "max_instance" : "0" } type_list["TWAN Identifier Timestamp"] = { "type" : "179", "max_instance" : "0" } type_list["Overload Control Information"] = { "type" : "180", "max_instance" : "0" } type_list["Load Control Information"] = { "type" : "181", "max_instance" : "0" } type_list["Metric"] = { "type" : "182", "max_instance" : "0" } type_list["Sequence Number"] = { "type" : "183", "max_instance" : "0" } type_list["APN and Relative Capacity"] = { "type" : "184", "max_instance" : "0" } type_list["WLAN Offloadability Indication"] = { "type" : "185", "max_instance" : "0" } type_list["Paging and Service Information"] = { "type" : "186", "max_instance" : "0" } type_list["Integer Number"] = { "type" : "187", "max_instance" : "0" } type_list["Millisecond Time Stamp"] = { "type" : "188", "max_instance" : "0" } type_list["Monitoring Event Information"] = { "type" : "189", "max_instance" : "0" } type_list["ECGI List"] = { "type" : "190", "max_instance" : "0" } type_list["Remote UE Context"] = { "type" : "191", "max_instance" : "0" } type_list["Remote User ID"] = { "type" : "192", "max_instance" : "0" } type_list["Remote UE IP Information"] = { "type" : "193", "max_instance" : "0" } type_list["CIoT Optimizations Support Indication"] = { "type" : "194", "max_instance" : "0" } type_list["SCEF PDN Connection"] = { "type" : "195", "max_instance" : "0" } type_list["Header Compression Configuration"] = { "type" : "196", "max_instance" : "0" } type_list["ePCO"] = { "type" : "197", "max_instance" : "0" } type_list["Serving PLMN Rate Control"] = { "type" : "198", "max_instance" : "0" } type_list["Counter"] = { "type" : "199", "max_instance" : "0" } nextepc-0.3.10/lib/gtp/support/gtp_tlv.py000066400000000000000000000633151333553357400203710ustar00rootroot00000000000000# # Copyright (c) 2017, NextEPC Group # 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. # from docx import Document import re, os, sys, string import datetime import getopt import getpass version = "0.1.0" msg_list = {} type_list = {} group_list = {} verbosity = 0 filename = "" outdir = './' cachedir = './cache/' FAIL = '\033[91m' INFO = '\033[93m' ENDC = '\033[0m' def d_print(string): if verbosity > 0: sys.stdout.write(string) def d_info(string): sys.stdout.write(INFO + string + ENDC + "\n") def d_error(string): sys.stderr.write(FAIL + string + ENDC + "\n") sys.exit(0) def write_file(f, string): f.write(string) d_print(string) def output_header_to_file(f): now = datetime.datetime.now() f.write("""/* * Copyright (c) 2017, NextEPC Group * 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. */ """) f.write("/*******************************************************************************\n") f.write(" * This file had been created by gtp_tlv.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(), filename)) f.write(" ******************************************************************************/\n\n") def usage(): print "Python generating TLV build/parser for GTPv2-C v%s" % (version) print "Usage: python gtp_tlv.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 "-c [dir] Cache files to given directory" print "-h Print this help and return" def v_upper(v): return re.sub('3GPP', '', re.sub('\'', '_', re.sub('/', '_', re.sub('-', '_', re.sub(' ', '_', v)))).upper()) def v_lower(v): return re.sub('3gpp', '', re.sub('\'', '_', re.sub('/', '_', re.sub('-', '_', re.sub(' ', '_', v)))).lower()) def get_cells(cells): instance = cells[4].text.encode('ascii', 'ignore') if instance.isdigit() is not True: return None ie_type = re.sub('\s*$', '', re.sub('\s*\n*\s*\(NOTE.*\)*', '', cells[3].text.encode('ascii', 'ignore'))) if ie_type.find('LDN') != -1: ie_type = 'LDN' elif ie_type.find('APCO') != -1: ie_type = 'APCO' elif ie_type.find('Charging Id') != -1: ie_type = 'Charging ID' elif ie_type.find('H(e)NB Information Reporting') != -1: ie_type = 'eNB Information Reporting' elif ie_type.find('IPv4 Configuration Parameters (IP4CP)') != -1: ie_type = 'IP4CP' if ie_type not in type_list.keys(): assert False, "Unknown IE type : [" \ + cells[3].text + "]" + "(" + ie_type + ")" presence = cells[1].text.encode('ascii', 'ignore') ie_value = re.sub('\s*\n*\s*\([^\)]*\)*', '', cells[0].text).encode('ascii', 'ignore') comment = cells[2].text.encode('ascii', 'ignore') comment = re.sub('\n|\"|\'|\\\\', '', comment); if int(instance) > int(type_list[ie_type]["max_instance"]): type_list[ie_type]["max_instance"] = instance write_file(f, "type_list[\"" + ie_type + "\"][\"max_instance\"] = \"" + instance + "\"\n") return { "ie_type" : ie_type, "ie_value" : ie_value, "presence" : presence, "instance" : instance, "comment" : comment } def write_cells_to_file(name, cells): write_file(f, name + ".append({ \"ie_type\" : \"" + cells["ie_type"] + \ "\", \"ie_value\" : \"" + cells["ie_value"] + \ "\", \"presence\" : \"" + cells["presence"] + \ "\", \"instance\" : \"" + cells["instance"] + \ "\", \"comment\" : \"" + cells["comment"] + "\"})\n") try: opts, args = getopt.getopt(sys.argv[1:], "df:ho:c:", ["debug", "file", "help", "output", "cache"]) except getopt.GetoptError as err: # print help information and exit: usage() sys.exit(2) for o, a in opts: if o in ("-d", "--debug"): verbosity = 1 if o in ("-f", "--file"): filename = a if o in ("-o", "--output"): outdir = a if outdir.rfind('/') != len(outdir): outdir += '/' if o in ("-c", "--cache"): cache = a if cachedir.rfind('/') != len(cachedir): cachedir += '/' if o in ("-h", "--help"): usage() sys.exit(2) if os.path.isfile(filename) and os.access(filename, os.R_OK): file = open(filename, 'r') else: d_error("Cannot find file : " + filename) d_info("[Message List]") cachefile = cachedir + 'tlv_msg_list.py' if os.path.isfile(cachefile) and os.access(cachefile, os.R_OK): execfile(cachefile) print "Read from " + cachefile else: document = Document(filename) f = open(cachefile, 'w') msg_table = "" for i, table in enumerate(document.tables): cell = table.rows[0].cells[0] if cell.text.find('Message Type value') != -1: msg_table = table d_print("Table Index = %d\n" % i) for row in msg_table.rows[2:-4]: key = row.cells[1].text.encode('ascii', 'ignore') type = row.cells[0].text.encode('ascii', 'ignore') if type.isdigit() is False: continue if int(type) in range(128, 160): continue if int(type) in range(231, 240): continue if key.find('Reserved') != -1: continue key = re.sub('\s*\n*\s*\([^\)]*\)*', '', key) msg_list[key] = { "type": type } write_file(f, "msg_list[\"" + key + "\"] = { \"type\" : \"" + type + "\" }\n") f.close() d_info("[IE Type List]") cachefile = cachedir + 'tlv_type_list.py' if os.path.isfile(cachefile) and os.access(cachefile, os.R_OK): execfile(cachefile) print "Read from " + cachefile else: document = Document(filename) f = open(cachefile, 'w') ie_table = "" for i, table in enumerate(document.tables): cell = table.rows[0].cells[0] if cell.text.find('IE Type value') != -1: ie_table = table d_print("Table Index = %d\n" % i) for row in ie_table.rows[1:-5]: key = row.cells[1].text.encode('ascii', 'ignore') if key.find('Reserved') != -1: continue if key.find('MM Context') != -1: continue elif key.find('Recovery') != -1: key = 'Recovery' elif key.find('Trusted WLAN Mode Indication') != -1: key = 'TWMI' elif key.find('LDN') != -1: key = 'LDN' elif key.find('APCO') != -1: key = 'APCO' elif key.find('Remote UE IP information') != -1: key = 'Remote UE IP Information' elif key.find('Procedure Transaction ID') != -1: key = 'PTI' else: key = re.sub('.*\(', '', row.cells[1].text.encode('ascii', 'ignore')) key = re.sub('\)', '', key) key = re.sub('\s*$', '', key) type = row.cells[0].text.encode('ascii', 'ignore') type_list[key] = { "type": type , "max_instance" : "0" } write_file(f, "type_list[\"" + key + "\"] = { \"type\" : \"" + type) write_file(f, "\", \"max_instance\" : \"0\" }\n") f.close() type_list['MM Context'] = { "type": "107", "max_instance" : "0" } d_info("[Group IE List]") cachefile = cachedir + 'tlv_group_list.py' if os.path.isfile(cachefile) and os.access(cachefile, os.R_OK): execfile(cachefile) print "Read from " + cachefile else: document = Document(filename) f = open(cachefile, 'w') for i, table in enumerate(document.tables): if table.rows[0].cells[0].text.find('Octet') != -1 and \ table.rows[0].cells[2].text.find('IE Type') != -1: d_print("Table Index = %d\n" % i) row = table.rows[0]; if len(re.findall('\d+', row.cells[2].text)) == 0: continue; ie_type = re.findall('\d+', row.cells[2].text)[0].encode('ascii', 'ignore') ie_name = re.sub('\s*IE Type.*', '', row.cells[2].text.encode('ascii', 'ignore')) if ie_name not in group_list.keys(): ies = [] write_file(f, "ies = []\n") for row in table.rows[4:]: cells = get_cells(row.cells) if cells is None: continue ies_is_added = True for ie in ies: if (cells["ie_type"], cells["instance"]) == (ie["ie_type"], ie["instance"]): ies_is_added = False if ies_is_added is True: ies.append(cells) write_cells_to_file("ies", cells) group_list[ie_name] = { "type" : ie_type, "ies" : ies } write_file(f, "group_list[\"" + ie_name + "\"] = { \"type\" : \"" + ie_type + "\", \"ies\" : ies }\n") else: group_list_is_added = False added_ies = group_list[ie_name]["ies"] write_file(f, "added_ies = group_list[\"" + ie_name + "\"][\"ies\"]\n") for row in table.rows[4:]: cells = get_cells(row.cells) if cells is None: continue ies_is_added = True for ie in group_list[ie_name]["ies"]: if (cells["ie_type"], cells["instance"]) == (ie["ie_type"], ie["instance"]): ies_is_added = False for ie in ies: if (cells["ie_type"], cells["instance"]) == (ie["ie_type"], ie["instance"]): ies_is_added = False if ies_is_added is True: added_ies.append(cells) write_cells_to_file("added_ies", cells) group_list_is_added = True if group_list_is_added is True: group_list[ie_name] = { "type" : ie_type, "ies" : added_ies } write_file(f, "group_list[\"" + ie_name + "\"] = { \"type\" : \"" + ie_type + "\", \"ies\" : added_ies }\n") f.close() msg_list["Echo Request"]["table"] = 6 msg_list["Echo Response"]["table"] = 7 msg_list["Create Session Request"]["table"] = 8 msg_list["Create Session Response"]["table"] = 13 msg_list["Create Bearer Request"]["table"] = 18 msg_list["Create Bearer Response"]["table"] = 22 msg_list["Modify Bearer Request"]["table"] = 29 msg_list["Modify Bearer Response"]["table"] = 33 msg_list["Delete Session Request"]["table"] = 38 msg_list["Delete Bearer Request"]["table"] = 40 msg_list["Delete Session Response"]["table"] = 44 msg_list["Delete Bearer Response"]["table"] = 47 msg_list["Downlink Data Notification"]["table"] = 50 msg_list["Downlink Data Notification Acknowledge"]["table"] = 53 msg_list["Downlink Data Notification Failure Indication"]["table"] = 54 msg_list["Delete Indirect Data Forwarding Tunnel Request"]["table"] = 55 msg_list["Delete Indirect Data Forwarding Tunnel Response"]["table"] = 56 msg_list["Modify Bearer Command"]["table"] = 57 msg_list["Modify Bearer Failure Indication"]["table"] = 60 msg_list["Update Bearer Request"]["table"] = 62 msg_list["Update Bearer Response"]["table"] = 66 msg_list["Delete Bearer Command"]["table"] = 69 msg_list["Delete Bearer Failure Indication"]["table"] = 72 msg_list["Create Indirect Data Forwarding Tunnel Request"]["table"] = 75 msg_list["Create Indirect Data Forwarding Tunnel Response"]["table"] = 77 msg_list["Release Access Bearers Request"]["table"] = 79 msg_list["Release Access Bearers Response"]["table"] = 80 msg_list["Modify Access Bearers Request"]["table"] = 84 msg_list["Modify Access Bearers Response"]["table"] = 87 for key in msg_list.keys(): if "table" in msg_list[key].keys(): d_info("[" + key + "]") cachefile = cachedir + "tlv_msg_" + msg_list[key]["type"] + ".py" if os.path.isfile(cachefile) and os.access(cachefile, os.R_OK): execfile(cachefile) print "Read from " + cachefile else: document = Document(filename) f = open(cachefile, 'w') ies = [] write_file(f, "ies = []\n") table = document.tables[msg_list[key]["table"]] for row in table.rows[1:]: cells = get_cells(row.cells) if cells is None: continue ies_is_added = True for ie in ies: if (cells["ie_type"], cells["instance"]) == (ie["ie_type"], ie["instance"]): ies_is_added = False if ies_is_added is True: ies.append(cells) write_cells_to_file("ies", cells) msg_list[key]["ies"] = ies write_file(f, "msg_list[key][\"ies\"] = ies\n") f.close() type_list["Recovery"]["size"] = 1 # Type : 3 type_list["EBI"]["size"] = 1 # Type : 73 type_list["RAT Type"]["size"] = 1 # Type : 82 type_list["PDN Type"]["size"] = 1 # Type : 99 type_list["Port Number"]["size"] = 2 # Type : 126 type_list["APN Restriction"]["size"] = 1 # Type : 127 type_list["Selection Mode"]["size"] = 1 # Type : 128 type_list["Node Type"]["size"] = 1 # Type : 128 f = open(outdir + 'gtp_message.h', 'w') output_header_to_file(f) f.write("""#ifndef __GTP_TLV_H__ #define __GTP_TLV_H__ #include "core_tlv_msg.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* 5.1 General format */ #define GTPV1U_HEADER_LEN 8 #define GTPV2C_HEADER_LEN 12 #define GTP_TEID_LEN 4 typedef struct _gtp_header_t { union { struct { ED4(c_uint8_t version:3;, c_uint8_t piggybacked:1;, c_uint8_t teid_presence:1;, c_uint8_t spare1:3;) }; /* GTU-U flags */ #define GTPU_FLAGS_PN 0x1 #define GTPU_FLAGS_S 0x2 c_uint8_t flags; }; c_uint8_t type; c_uint16_t length; union { struct { c_uint32_t teid; /* sqn : 31bit ~ 8bit, spare : 7bit ~ 0bit */ #define GTP_XID_TO_SQN(__xid) htonl(((__xid) << 8)) #define GTP_SQN_TO_XID(__sqn) (ntohl(__sqn) >> 8) c_uint32_t sqn; }; /* sqn : 31bit ~ 8bit, spare : 7bit ~ 0bit */ c_uint32_t sqn_only; }; } __attribute__ ((packed)) gtp_header_t; /* GTP-U message type, defined in 3GPP TS 29.281 Release 11 */ #define GTPU_MSGTYPE_ECHO_REQ 1 #define GTPU_MSGTYPE_ECHO_RSP 2 #define GTPU_MSGTYPE_ERR_IND 26 #define GTPU_MSGTYPE_SUPP_EXTHDR_NOTI 31 #define GTPU_MSGTYPE_END_MARKER 254 #define GTPU_MSGTYPE_GPDU 255 /* GTPv2-C message type */ """) tmp = [(k, v["type"]) for k, v in msg_list.items()] sorted_msg_list = sorted(tmp, key=lambda tup: int(tup[1])) for (k, v) in sorted_msg_list: f.write("#define GTP_" + v_upper(k) + "_TYPE " + v + "\n") f.write("\n") tmp = [(k, v["type"]) for k, v in type_list.items()] sorted_type_list = sorted(tmp, key=lambda tup: int(tup[1])) for (k, v) in sorted_type_list: f.write("#define TLV_" + v_upper(k) + "_TYPE " + v + "\n") f.write("\n") f.write("/* Infomration Element TLV Descriptor */\n") for (k, v) in sorted_type_list: if k in group_list.keys(): continue for instance in range(0, int(type_list[k]["max_instance"])+1): f.write("extern tlv_desc_t tlv_desc_" + v_lower(k)) f.write("_" + str(instance) + ";\n") f.write("\n") tmp = [(k, v["type"]) for k, v in group_list.items()] sorted_group_list = sorted(tmp, key=lambda tup: int(tup[1])) f.write("/* Group Infomration Element TLV Descriptor */\n") for (k, v) in sorted_group_list: for instance in range(0, int(type_list[k]["max_instance"])+1): f.write("extern tlv_desc_t tlv_desc_" + v_lower(k)) f.write("_" + str(instance) + ";\n") f.write("\n") f.write("/* Message Descriptor */\n") for (k, v) in sorted_msg_list: f.write("extern tlv_desc_t tlv_desc_" + v_lower(k) + ";\n") f.write("\n") f.write("/* Structure for Infomration Element */\n") for (k, v) in sorted_type_list: if k in group_list.keys(): continue if "size" in type_list[k]: if type_list[k]["size"] == 1: f.write("typedef tlv_uint8_t tlv_" + v_lower(k) + "_t;\n") elif type_list[k]["size"] == 2: f.write("typedef tlv_uint16_t tlv_" + v_lower(k) + "_t;\n") elif type_list[k]["size"] == 3: f.write("typedef tlv_uint24_t tlv_" + v_lower(k) + "_t;\n") elif type_list[k]["size"] == 4: f.write("typedef tlv_uint32_t tlv_" + v_lower(k) + "_t;\n") else: assert False, "Unknown size = %d for key = %s" % (type_list[k]["size"], k) else: f.write("typedef tlv_octet_t tlv_" + v_lower(k) + "_t;\n") f.write("\n") f.write("/* Structure for Group Infomration Element */\n") for (k, v) in sorted_group_list: f.write("typedef struct _tlv_" + v_lower(k) + "_t {\n") f.write(" tlv_presence_t presence;\n") for ies in group_list[k]["ies"]: f.write(" tlv_" + v_lower(ies["ie_type"]) + "_t " + \ v_lower(ies["ie_value"])) if ies["ie_type"] == "F-TEID": if ies["ie_value"] == "S2b-U ePDG F-TEID": f.write("_" + ies["instance"] + ";") elif ies["ie_value"] == "S2a-U TWAN F-TEID": f.write("_" + ies["instance"] + ";") else: f.write(";") f.write(" /* Instance : " + ies["instance"] + " */\n") else: f.write(";\n") f.write("} tlv_" + v_lower(k) + "_t;\n") f.write("\n") f.write("/* Structure for Message */\n") for (k, v) in sorted_msg_list: if "ies" in msg_list[k]: f.write("typedef struct _gtp_" + v_lower(k) + "_t {\n") for ies in msg_list[k]["ies"]: f.write(" tlv_" + v_lower(ies["ie_type"]) + "_t " + \ v_lower(ies["ie_value"]) + ";\n") f.write("} gtp_" + v_lower(k) + "_t;\n") f.write("\n") f.write("typedef struct _gtp_message_t {\n") f.write(" gtp_header_t h;\n") f.write(" union {\n") for (k, v) in sorted_msg_list: if "ies" in msg_list[k]: f.write(" gtp_" + v_lower(k) + "_t " + v_lower(k) + ";\n"); f.write(" };\n"); f.write("} gtp_message_t;\n\n") f.write("""CORE_DECLARE(status_t) gtp_parse_msg( gtp_message_t *gtp_message, pkbuf_t *pkbuf); CORE_DECLARE(status_t) gtp_build_msg( pkbuf_t **pkbuf, gtp_message_t *gtp_message); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __GTP_TLV_H__ */ """) f.close() f = open(outdir + 'gtp_message.c', 'w') output_header_to_file(f) f.write("""#define TRACE_MODULE _gtp_message #include "core_debug.h" #include "gtp_message.h" """) for (k, v) in sorted_type_list: if k in group_list.keys(): continue for instance in range(0, int(type_list[k]["max_instance"])+1): f.write("tlv_desc_t tlv_desc_%s_%d =\n" % (v_lower(k), instance)) f.write("{\n") if "size" in type_list[k]: if type_list[k]["size"] == 1: f.write(" TLV_UINT8,\n") elif type_list[k]["size"] == 2: f.write(" TLV_UINT16,\n") elif type_list[k]["size"] == 3: f.write(" TLV_UINT24,\n") elif type_list[k]["size"] == 4: f.write(" TLV_UINT32,\n") else: assert False, "Unknown size = %d for key = %s" % (type_list[k]["size"], k) else: f.write(" TLV_VAR_STR,\n") f.write(" \"%s\",\n" % k) f.write(" TLV_%s_TYPE,\n" % v_upper(k)) if "size" in type_list[k]: f.write(" %d,\n" % type_list[k]["size"]) else: f.write(" 0,\n") f.write(" %d,\n" % instance) f.write(" sizeof(tlv_%s_t),\n" % v_lower(k)) f.write(" { NULL }\n") f.write("};\n\n") for (k, v) in sorted_group_list: for instance in range(0, int(type_list[k]["max_instance"])+1): f.write("tlv_desc_t tlv_desc_%s_%d =\n" % (v_lower(k), instance)) f.write("{\n") f.write(" TLV_COMPOUND,\n") f.write(" \"%s\",\n" % k) f.write(" TLV_%s_TYPE,\n" % v_upper(k)) f.write(" 0,\n") f.write(" %d,\n" % instance) f.write(" sizeof(tlv_%s_t),\n" % v_lower(k)) f.write(" {\n") for ies in group_list[k]["ies"]: f.write(" &tlv_desc_%s_%s,\n" % (v_lower(ies["ie_type"]), v_lower(ies["instance"]))) f.write(" NULL,\n") f.write(" }\n") f.write("};\n\n") for (k, v) in sorted_msg_list: if "ies" in msg_list[k]: f.write("tlv_desc_t tlv_desc_%s =\n" % v_lower(k)) f.write("{\n") f.write(" TLV_MESSAGE,\n") f.write(" \"%s\",\n" % k) f.write(" 0, 0, 0, 0, {\n") for ies in msg_list[k]["ies"]: f.write(" &tlv_desc_%s_%s,\n" % (v_lower(ies["ie_type"]), v_lower(ies["instance"]))) f.write(" NULL,\n") f.write("}};\n\n") f.write("\n") f.write("""status_t gtp_parse_msg(gtp_message_t *gtp_message, pkbuf_t *pkbuf) { status_t rv = CORE_ERROR; gtp_header_t *h = NULL; c_uint16_t size = 0; d_assert(gtp_message, return CORE_ERROR, "Null param"); d_assert(pkbuf, return CORE_ERROR, "Null param"); d_assert(pkbuf->payload, return CORE_ERROR, "Null param"); d_trace(50, "[GTPv2] RECV : "); d_trace_hex(50, pkbuf->payload, pkbuf->len); h = pkbuf->payload; d_assert(h, return CORE_ERROR, "Null param"); memset(gtp_message, 0, sizeof(gtp_message_t)); if (h->teid_presence) size = GTPV2C_HEADER_LEN; else size = GTPV2C_HEADER_LEN-GTP_TEID_LEN; d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return CORE_ERROR, "pkbuf_header error"); memcpy(>p_message->h, pkbuf->payload - size, size); if (h->teid_presence) gtp_message->h.teid = ntohl(gtp_message->h.teid); if (pkbuf->len == 0) return CORE_OK; switch(gtp_message->h.type) { """) for (k, v) in sorted_msg_list: if "ies" in msg_list[k]: f.write(" case GTP_%s_TYPE:\n" % v_upper(k)) f.write(" rv = tlv_parse_msg(>p_message->%s,\n" % v_lower(k)) f.write(" &tlv_desc_%s, pkbuf, TLV_MODE_T1_L2_I1);\n" % v_lower(k)) f.write(" break;\n") f.write(""" default: d_warn("Not implmeneted(type:%d)", gtp_message->h.type); break; } return rv; } """) f.write("""status_t gtp_build_msg(pkbuf_t **pkbuf, gtp_message_t *gtp_message) { status_t rv = CORE_ERROR; d_assert(gtp_message, return rv, "Null param"); switch(gtp_message->h.type) { """) for (k, v) in sorted_msg_list: if "ies" in msg_list[k]: f.write(" case GTP_%s_TYPE:\n" % v_upper(k)) f.write(" rv = tlv_build_msg(pkbuf, &tlv_desc_%s,\n" % v_lower(k)) f.write(" >p_message->%s, TLV_MODE_T1_L2_I1);\n" % v_lower(k)) f.write(" break;\n") f.write(""" default: d_warn("Not implmeneted(type:%d)", gtp_message->h.type); break; } if ((*pkbuf) && (*pkbuf)->payload) { d_trace(50, "[GTPv2] SEND : "); d_trace_hex(50, (*pkbuf)->payload, (*pkbuf)->len); } return rv; } """) f.write("\n") f.close() nextepc-0.3.10/lib/ipfw/000077500000000000000000000000001333553357400147675ustar00rootroot00000000000000nextepc-0.3.10/lib/ipfw/Makefile.am000066400000000000000000000011741333553357400170260ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in. pkglib_LTLIBRARIES = libipfw.la libipfw_la_SOURCES = \ ipfw2.h \ ipfw2.c dummynet.c ipv6.c tables.c \ expand_number.c humanize_number.c \ glue.c AM_LDFLAGS = \ -version-info @LIBVERSION@ AM_CPPFLAGS = \ -I$(top_srcdir)/lib/ipfw/objs/include_e \ -include glue.h \ -D_DEFAULT_SOURCE -D_BSD_SOURCE \ -DUSERSPACE -D__BSD_VISIBLE -DNEED_STRTONUM -DNEED_ROUNDUP2 \ @IPFW_CPPFLAGS@ AM_CFLAGS = \ -Wall -Werror -Wno-shift-negative-value \ -Wno-unused-but-set-variable -Wno-unknown-warning-option MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = core *.stackdump nextepc-0.3.10/lib/ipfw/dummynet.c000066400000000000000000001066251333553357400170070ustar00rootroot00000000000000/* * Copyright (c) 2002-2003,2010 Luigi Rizzo * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * Redistribution in binary form may occur without any restrictions. * Obviously, it would be nice if you gave credit where credit is due * but requiring it would be too onerous. * * This software is provided ``AS IS'' without any warranties of any kind. * * $FreeBSD: head/sbin/ipfw/dummynet.c 270424 2014-08-23 17:37:18Z melifaro $ * * dummynet support */ #include #include /* XXX there are several sysctl leftover here */ #include #include "ipfw2.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include /* inet_ntoa */ static struct _s_x dummynet_params[] = { { "plr", TOK_PLR }, { "noerror", TOK_NOERROR }, { "buckets", TOK_BUCKETS }, { "dst-ip", TOK_DSTIP }, { "src-ip", TOK_SRCIP }, { "dst-port", TOK_DSTPORT }, { "src-port", TOK_SRCPORT }, { "proto", TOK_PROTO }, { "weight", TOK_WEIGHT }, { "lmax", TOK_LMAX }, { "maxlen", TOK_LMAX }, { "all", TOK_ALL }, { "mask", TOK_MASK }, /* alias for both */ { "sched_mask", TOK_SCHED_MASK }, { "flow_mask", TOK_FLOW_MASK }, { "droptail", TOK_DROPTAIL }, { "ecn", TOK_ECN }, { "red", TOK_RED }, { "gred", TOK_GRED }, { "bw", TOK_BW }, { "bandwidth", TOK_BW }, { "delay", TOK_DELAY }, { "link", TOK_LINK }, { "pipe", TOK_PIPE }, { "queue", TOK_QUEUE }, { "flowset", TOK_FLOWSET }, { "sched", TOK_SCHED }, { "pri", TOK_PRI }, { "priority", TOK_PRI }, { "type", TOK_TYPE }, { "flow-id", TOK_FLOWID}, { "dst-ipv6", TOK_DSTIP6}, { "dst-ip6", TOK_DSTIP6}, { "src-ipv6", TOK_SRCIP6}, { "src-ip6", TOK_SRCIP6}, { "profile", TOK_PROFILE}, { "burst", TOK_BURST}, { "dummynet-params", TOK_NULL }, { NULL, 0 } /* terminator */ }; #define O_NEXT(p, len) ((void *)((char *)p + len)) static void oid_fill(struct dn_id *oid, int len, int type, uintptr_t id) { oid->len = len; oid->type = type; oid->subtype = 0; oid->id = id; } /* make room in the buffer and move the pointer forward */ static void * o_next(struct dn_id **o, int len, int type) { struct dn_id *ret = *o; oid_fill(ret, len, type, 0); *o = O_NEXT(*o, len); return ret; } #if 0 static int sort_q(void *arg, const void *pa, const void *pb) { int rev = (co.do_sort < 0); int field = rev ? -co.do_sort : co.do_sort; long long res = 0; const struct dn_flow_queue *a = pa; const struct dn_flow_queue *b = pb; switch (field) { case 1: /* pkts */ res = a->len - b->len; break; case 2: /* bytes */ res = a->len_bytes - b->len_bytes; break; case 3: /* tot pkts */ res = a->tot_pkts - b->tot_pkts; break; case 4: /* tot bytes */ res = a->tot_bytes - b->tot_bytes; break; } if (res < 0) res = -1; if (res > 0) res = 1; return (int)(rev ? res : -res); } #endif /* print a mask and header for the subsequent list of flows */ static void print_mask(struct ipfw_flow_id *id) { if (!IS_IP6_FLOW_ID(id)) { printf(" " "mask: %s 0x%02x 0x%08x/0x%04x -> 0x%08x/0x%04x\n", id->extra ? "queue," : "", id->proto, id->src_ip, id->src_port, id->dst_ip, id->dst_port); } else { char buf[255]; printf("\n mask: %sproto: 0x%02x, flow_id: 0x%08x, ", id->extra ? "queue," : "", id->proto, id->flow_id6); inet_ntop(AF_INET6, &(id->src_ip6), buf, sizeof(buf)); printf("%s/0x%04x -> ", buf, id->src_port); inet_ntop(AF_INET6, &(id->dst_ip6), buf, sizeof(buf)); printf("%s/0x%04x\n", buf, id->dst_port); } } static void print_header(struct ipfw_flow_id *id) { if (!IS_IP6_FLOW_ID(id)) printf("BKT Prot ___Source IP/port____ " "____Dest. IP/port____ " "Tot_pkt/bytes Pkt/Byte Drp\n"); else printf("BKT ___Prot___ _flow-id_ " "______________Source IPv6/port_______________ " "_______________Dest. IPv6/port_______________ " "Tot_pkt/bytes Pkt/Byte Drp\n"); } static void list_flow(struct buf_pr *bp, struct dn_flow *ni) { char buff[255]; struct protoent *pe = NULL; struct in_addr ina; struct ipfw_flow_id *id = &ni->fid; pe = getprotobynumber(id->proto); /* XXX: Should check for IPv4 flows */ bprintf(bp, "%3u%c", (ni->oid.id) & 0xff, id->extra ? '*' : ' '); if (!IS_IP6_FLOW_ID(id)) { if (pe) bprintf(bp, "%-4s ", pe->p_name); else bprintf(bp, "%4u ", id->proto); ina.s_addr = htonl(id->src_ip); bprintf(bp, "%15s/%-5d ", inet_ntoa(ina), id->src_port); ina.s_addr = htonl(id->dst_ip); bprintf(bp, "%15s/%-5d ", inet_ntoa(ina), id->dst_port); } else { /* Print IPv6 flows */ if (pe != NULL) bprintf(bp, "%9s ", pe->p_name); else bprintf(bp, "%9u ", id->proto); bprintf(bp, "%7d %39s/%-5d ", id->flow_id6, inet_ntop(AF_INET6, &(id->src_ip6), buff, sizeof(buff)), id->src_port); bprintf(bp, " %39s/%-5d ", inet_ntop(AF_INET6, &(id->dst_ip6), buff, sizeof(buff)), id->dst_port); } pr_u64(bp, &ni->tot_pkts, 4); pr_u64(bp, &ni->tot_bytes, 8); bprintf(bp, "%2u %4u %3u", ni->length, ni->len_bytes, ni->drops); } static void print_flowset_parms(struct dn_fs *fs, char *prefix) { int l; char qs[30]; char plr[30]; char red[90]; /* Display RED parameters */ l = fs->qsize; if (fs->flags & DN_QSIZE_BYTES) { if (l >= 8192) sprintf(qs, "%d KB", l / 1024); else sprintf(qs, "%d B", l); } else sprintf(qs, "%3d sl.", l); if (fs->plr) sprintf(plr, "plr %f", 1.0 * fs->plr / (double)(0x7fffffff)); else plr[0] = '\0'; if (fs->flags & DN_IS_RED) { /* RED parameters */ sprintf(red, "\n\t %cRED w_q %f min_th %d max_th %d max_p %f", (fs->flags & DN_IS_GENTLE_RED) ? 'G' : ' ', 1.0 * fs->w_q / (double)(1 << SCALE_RED), fs->min_th, fs->max_th, 1.0 * fs->max_p / (double)(1 << SCALE_RED)); if (fs->flags & DN_IS_ECN) #if 0 /* modifed by acetcom */ strncat(red, " (ecn)", 6); #else strcat(red, " (ecn)"); #endif } else sprintf(red, "droptail"); if (prefix[0]) { printf("%s %s%s %d queues (%d buckets) %s\n", prefix, qs, plr, fs->oid.id, fs->buckets, red); prefix[0] = '\0'; } else { printf("q%05d %s%s %d flows (%d buckets) sched %d " "weight %d lmax %d pri %d %s\n", fs->fs_nr, qs, plr, fs->oid.id, fs->buckets, fs->sched_nr, fs->par[0], fs->par[1], fs->par[2], red); if (fs->flags & DN_HAVE_MASK) print_mask(&fs->flow_mask); } } static void print_extra_delay_parms(struct dn_profile *p) { double loss; if (p->samples_no <= 0) return; loss = p->loss_level; loss /= p->samples_no; printf("\t profile: name \"%s\" loss %f samples %d\n", p->name, loss, p->samples_no); } static void flush_buf(char *buf) { if (buf[0]) printf("%s\n", buf); buf[0] = '\0'; } /* * generic list routine. We expect objects in a specific order, i.e. * PIPES AND SCHEDULERS: * link; scheduler; internal flowset if any; instances * we can tell a pipe from the number. * * FLOWSETS: * flowset; queues; * link i (int queue); scheduler i; si(i) { flowsets() : queues } */ static void list_pipes(struct dn_id *oid, struct dn_id *end) { char buf[160]; /* pending buffer */ int toPrint = 1; /* print header */ struct buf_pr bp; buf[0] = '\0'; bp_alloc(&bp, 4096); for (; oid != end; oid = O_NEXT(oid, oid->len)) { if (oid->len < sizeof(*oid)) errx(1, "invalid oid len %d\n", oid->len); switch (oid->type) { default: flush_buf(buf); printf("unrecognized object %d size %d\n", oid->type, oid->len); break; case DN_TEXT: /* list of attached flowsets */ { int i, l; struct { struct dn_id id; uint32_t p[0]; } *d = (void *)oid; l = (oid->len - sizeof(*oid))/sizeof(d->p[0]); if (l == 0) break; printf(" Children flowsets: "); for (i = 0; i < l; i++) printf("%u ", d->p[i]); printf("\n"); break; } case DN_CMD_GET: if (co.verbose) printf("answer for cmd %d, len %d\n", oid->type, oid->id); break; case DN_SCH: { struct dn_sch *s = (struct dn_sch *)oid; flush_buf(buf); printf(" sched %d type %s flags 0x%x %d buckets %d active\n", s->sched_nr, s->name, s->flags, s->buckets, s->oid.id); if (s->flags & DN_HAVE_MASK) print_mask(&s->sched_mask); } break; case DN_FLOW: if (toPrint != 0) { print_header(&((struct dn_flow *)oid)->fid); toPrint = 0; } list_flow(&bp, (struct dn_flow *)oid); printf("%s\n", bp.buf); break; case DN_LINK: { struct dn_link *p = (struct dn_link *)oid; double b = p->bandwidth; char bwbuf[30]; char burst[5 + 7]; /* This starts a new object so flush buffer */ flush_buf(buf); /* data rate */ if (b == 0) sprintf(bwbuf, "unlimited "); else if (b >= 1000000) sprintf(bwbuf, "%7.3f Mbit/s", b/1000000); else if (b >= 1000) sprintf(bwbuf, "%7.3f Kbit/s", b/1000); else sprintf(bwbuf, "%7.3f bit/s ", b); if (humanize_number(burst, sizeof(burst), p->burst, "", HN_AUTOSCALE, 0) < 0 || co.verbose) sprintf(burst, "%d", (int)p->burst); sprintf(buf, "%05d: %s %4d ms burst %s", p->link_nr % DN_MAX_ID, bwbuf, p->delay, burst); } break; case DN_FS: print_flowset_parms((struct dn_fs *)oid, buf); break; case DN_PROFILE: flush_buf(buf); print_extra_delay_parms((struct dn_profile *)oid); } flush_buf(buf); // XXX does it really go here ? } bp_free(&bp); } /* * Delete pipe, queue or scheduler i */ int ipfw_delete_pipe(int do_pipe, int i) { struct { struct dn_id oid; uintptr_t a[1]; /* add more if we want a list */ } cmd; oid_fill((void *)&cmd, sizeof(cmd), DN_CMD_DELETE, DN_API_VERSION); cmd.oid.subtype = (do_pipe == 1) ? DN_LINK : ( (do_pipe == 2) ? DN_FS : DN_SCH); cmd.a[0] = i; i = do_cmd(IP_DUMMYNET3, &cmd, cmd.oid.len); if (i) { i = 1; warn("rule %u: setsockopt(IP_DUMMYNET_DEL)", i); } return i; } /* * Code to parse delay profiles. * * Some link types introduce extra delays in the transmission * of a packet, e.g. because of MAC level framing, contention on * the use of the channel, MAC level retransmissions and so on. * From our point of view, the channel is effectively unavailable * for this extra time, which is constant or variable depending * on the link type. Additionally, packets may be dropped after this * time (e.g. on a wireless link after too many retransmissions). * We can model the additional delay with an empirical curve * that represents its distribution. * * cumulative probability * 1.0 ^ * | * L +-- loss-level x * | ****** * | * * | ***** * | * * | ** * | * * +-------*-------------------> * delay * * The empirical curve may have both vertical and horizontal lines. * Vertical lines represent constant delay for a range of * probabilities; horizontal lines correspond to a discontinuty * in the delay distribution: the link will use the largest delay * for a given probability. * * To pass the curve to dummynet, we must store the parameters * in a file as described below, and issue the command * * ipfw pipe config ... bw XXX profile ... * * The file format is the following, with whitespace acting as * a separator and '#' indicating the beginning a comment: * * samples N * the number of samples used in the internal * representation (2..1024; default 100); * * loss-level L * The probability above which packets are lost. * (0.0 <= L <= 1.0, default 1.0 i.e. no loss); * * name identifier * Optional a name (listed by "ipfw pipe show") * to identify the distribution; * * "delay prob" | "prob delay" * One of these two lines is mandatory and defines * the format of the following lines with data points. * * XXX YYY * 2 or more lines representing points in the curve, * with either delay or probability first, according * to the chosen format. * The unit for delay is milliseconds. * * Data points does not need to be ordered or equal to the number * specified in the "samples" line. ipfw will sort and interpolate * the curve as needed. * * Example of a profile file: name bla_bla_bla samples 100 loss-level 0.86 prob delay 0 200 # minimum overhead is 200ms 0.5 200 0.5 300 0.8 1000 0.9 1300 1 1300 * Internally, we will convert the curve to a fixed number of * samples, and when it is time to transmit a packet we will * model the extra delay as extra bits in the packet. * */ #define ED_MAX_LINE_LEN 256+ED_MAX_NAME_LEN #define ED_TOK_SAMPLES "samples" #define ED_TOK_LOSS "loss-level" #define ED_TOK_NAME "name" #define ED_TOK_DELAY "delay" #define ED_TOK_PROB "prob" #define ED_TOK_BW "bw" #define ED_SEPARATORS " \t\n" #define ED_MIN_SAMPLES_NO 2 /* * returns 1 if s is a non-negative number, with at least one '.' */ static int is_valid_number(const char *s) { int i, dots_found = 0; int len = strlen(s); for (i = 0; i 1)) return 0; return 1; } /* * Take as input a string describing a bandwidth value * and return the numeric bandwidth value. * set clocking interface or bandwidth value */ static void read_bandwidth(char *arg, int *bandwidth, char *if_name, int namelen) { if (*bandwidth != -1) warnx("duplicate token, override bandwidth value!"); if (arg[0] >= 'a' && arg[0] <= 'z') { if (!if_name) { errx(1, "no if support"); } if (namelen >= IFNAMSIZ) warn("interface name truncated"); namelen--; /* interface name */ strncpy(if_name, arg, namelen); if_name[namelen] = '\0'; *bandwidth = 0; } else { /* read bandwidth value */ int bw; char *end = NULL; bw = strtoul(arg, &end, 0); if (*end == 'K' || *end == 'k') { end++; bw *= 1000; } else if (*end == 'M' || *end == 'm') { end++; bw *= 1000000; } if ((*end == 'B' && _substrcmp2(end, "Bi", "Bit/s") != 0) || _substrcmp2(end, "by", "bytes") == 0) bw *= 8; if (bw < 0) errx(EX_DATAERR, "bandwidth too large"); *bandwidth = bw; if (if_name) if_name[0] = '\0'; } } struct point { double prob; double delay; }; static int compare_points(const void *vp1, const void *vp2) { const struct point *p1 = vp1; const struct point *p2 = vp2; double res = 0; res = p1->prob - p2->prob; if (res == 0) res = p1->delay - p2->delay; if (res < 0) return -1; else if (res > 0) return 1; else return 0; } #define ED_EFMT(s) EX_DATAERR,"error in %s at line %d: "#s,filename,lineno static void load_extra_delays(const char *filename, struct dn_profile *p, struct dn_link *link) { char line[ED_MAX_LINE_LEN]; FILE *f; int lineno = 0; int i; int samples = -1; double loss = -1.0; char profile_name[ED_MAX_NAME_LEN]; int delay_first = -1; int do_points = 0; struct point points[ED_MAX_SAMPLES_NO]; int points_no = 0; /* XXX link never NULL? */ p->link_nr = link->link_nr; profile_name[0] = '\0'; f = fopen(filename, "r"); if (f == NULL) err(EX_UNAVAILABLE, "fopen: %s", filename); while (fgets(line, ED_MAX_LINE_LEN, f)) { /* read commands */ char *s, *cur = line, *name = NULL, *arg = NULL; ++lineno; /* parse the line */ while (cur) { s = strsep(&cur, ED_SEPARATORS); if (s == NULL || *s == '#') break; if (*s == '\0') continue; if (arg) errx(ED_EFMT("too many arguments")); if (name == NULL) name = s; else arg = s; } if (name == NULL) /* empty line */ continue; if (arg == NULL) errx(ED_EFMT("missing arg for %s"), name); if (!strcasecmp(name, ED_TOK_SAMPLES)) { if (samples > 0) errx(ED_EFMT("duplicate ``samples'' line")); if (atoi(arg) <=0) errx(ED_EFMT("invalid number of samples")); samples = atoi(arg); if (samples>ED_MAX_SAMPLES_NO) errx(ED_EFMT("too many samples, maximum is %d"), ED_MAX_SAMPLES_NO); do_points = 0; } else if (!strcasecmp(name, ED_TOK_BW)) { char buf[IFNAMSIZ]; read_bandwidth(arg, &link->bandwidth, buf, sizeof(buf)); } else if (!strcasecmp(name, ED_TOK_LOSS)) { if (loss != -1.0) errx(ED_EFMT("duplicated token: %s"), name); if (!is_valid_number(arg)) errx(ED_EFMT("invalid %s"), arg); loss = atof(arg); if (loss > 1) errx(ED_EFMT("%s greater than 1.0"), name); do_points = 0; } else if (!strcasecmp(name, ED_TOK_NAME)) { if (profile_name[0] != '\0') errx(ED_EFMT("duplicated token: %s"), name); strncpy(profile_name, arg, sizeof(profile_name) - 1); profile_name[sizeof(profile_name)-1] = '\0'; do_points = 0; } else if (!strcasecmp(name, ED_TOK_DELAY)) { if (do_points) errx(ED_EFMT("duplicated token: %s"), name); delay_first = 1; do_points = 1; } else if (!strcasecmp(name, ED_TOK_PROB)) { if (do_points) errx(ED_EFMT("duplicated token: %s"), name); delay_first = 0; do_points = 1; } else if (do_points) { if (!is_valid_number(name) || !is_valid_number(arg)) errx(ED_EFMT("invalid point found")); if (delay_first) { points[points_no].delay = atof(name); points[points_no].prob = atof(arg); } else { points[points_no].delay = atof(arg); points[points_no].prob = atof(name); } if (points[points_no].prob > 1.0) errx(ED_EFMT("probability greater than 1.0")); ++points_no; } else { errx(ED_EFMT("unrecognised command '%s'"), name); } } fclose (f); if (samples == -1) { warnx("'%s' not found, assuming 100", ED_TOK_SAMPLES); samples = 100; } if (loss == -1.0) { warnx("'%s' not found, assuming no loss", ED_TOK_LOSS); loss = 1; } /* make sure that there are enough points. */ if (points_no < ED_MIN_SAMPLES_NO) errx(ED_EFMT("too few samples, need at least %d"), ED_MIN_SAMPLES_NO); qsort(points, points_no, sizeof(struct point), compare_points); /* interpolation */ for (i = 0; isamples[ix] = x1; } else { double m = (y2-y1)/(x2-x1); double c = y1 - m*x1; for (; ixsamples[ix] = (ix - c)/m; } } p->samples_no = samples; p->loss_level = loss * samples; strncpy(p->name, profile_name, sizeof(p->name)); } /* * configuration of pipes, schedulers, flowsets. * When we configure a new scheduler, an empty pipe is created, so: * * do_pipe = 1 -> "pipe N config ..." only for backward compatibility * sched N+Delta type fifo sched_mask ... * pipe N+Delta * flowset N+Delta pipe N+Delta (no parameters) * sched N type wf2q+ sched_mask ... * pipe N * * do_pipe = 2 -> flowset N config * flowset N parameters * * do_pipe = 3 -> sched N config * sched N parameters (default no pipe) * optional Pipe N config ... * pipe ==> */ void ipfw_config_pipe(int ac, char **av) { int i; u_int j; char *end; struct dn_id *buf, *base; struct dn_sch *sch = NULL; struct dn_link *p = NULL; struct dn_fs *fs = NULL; struct dn_profile *pf = NULL; struct ipfw_flow_id *mask = NULL; int lmax; uint32_t _foo = 0, *flags = &_foo , *buckets = &_foo; /* * allocate space for 1 header, * 1 scheduler, 1 link, 1 flowset, 1 profile */ lmax = sizeof(struct dn_id); /* command header */ lmax += sizeof(struct dn_sch) + sizeof(struct dn_link) + sizeof(struct dn_fs) + sizeof(struct dn_profile); av++; ac--; /* Pipe number */ if (ac && isdigit(**av)) { i = atoi(*av); av++; ac--; } else i = -1; if (i <= 0) errx(EX_USAGE, "need a pipe/flowset/sched number"); base = buf = safe_calloc(1, lmax); /* all commands start with a 'CONFIGURE' and a version */ o_next(&buf, sizeof(struct dn_id), DN_CMD_CONFIG); base->id = DN_API_VERSION; switch (co.do_pipe) { case 1: /* "pipe N config ..." */ /* Allocate space for the WF2Q+ scheduler, its link * and the FIFO flowset. Set the number, but leave * the scheduler subtype and other parameters to 0 * so the kernel will use appropriate defaults. * XXX todo: add a flag to record if a parameter * is actually configured. * If we do a 'pipe config' mask -> sched_mask. * The FIFO scheduler and link are derived from the * WF2Q+ one in the kernel. */ sch = o_next(&buf, sizeof(*sch), DN_SCH); p = o_next(&buf, sizeof(*p), DN_LINK); fs = o_next(&buf, sizeof(*fs), DN_FS); sch->sched_nr = i; sch->oid.subtype = 0; /* defaults to WF2Q+ */ mask = &sch->sched_mask; flags = &sch->flags; buckets = &sch->buckets; *flags |= DN_PIPE_CMD; p->link_nr = i; /* This flowset is only for the FIFO scheduler */ fs->fs_nr = i + 2*DN_MAX_ID; fs->sched_nr = i + DN_MAX_ID; break; case 2: /* "queue N config ... " */ fs = o_next(&buf, sizeof(*fs), DN_FS); fs->fs_nr = i; mask = &fs->flow_mask; flags = &fs->flags; buckets = &fs->buckets; break; case 3: /* "sched N config ..." */ sch = o_next(&buf, sizeof(*sch), DN_SCH); fs = o_next(&buf, sizeof(*fs), DN_FS); sch->sched_nr = i; mask = &sch->sched_mask; flags = &sch->flags; buckets = &sch->buckets; /* fs is used only with !MULTIQUEUE schedulers */ fs->fs_nr = i + DN_MAX_ID; fs->sched_nr = i; break; } /* set to -1 those fields for which we want to reuse existing * values from the kernel. * Also, *_nr and subtype = 0 mean reuse the value from the kernel. * XXX todo: support reuse of the mask. */ if (p) p->bandwidth = -1; for (j = 0; j < sizeof(fs->par)/sizeof(fs->par[0]); j++) fs->par[j] = -1; while (ac > 0) { double d; int tok = match_token(dummynet_params, *av); ac--; av++; switch(tok) { case TOK_NOERROR: NEED(fs, "noerror is only for pipes"); fs->flags |= DN_NOERROR; break; case TOK_PLR: NEED(fs, "plr is only for pipes"); NEED1("plr needs argument 0..1\n"); d = strtod(av[0], NULL); if (d > 1) d = 1; else if (d < 0) d = 0; fs->plr = (int)(d*0x7fffffff); ac--; av++; break; case TOK_QUEUE: NEED(fs, "queue is only for pipes or flowsets"); NEED1("queue needs queue size\n"); end = NULL; fs->qsize = strtoul(av[0], &end, 0); if (*end == 'K' || *end == 'k') { fs->flags |= DN_QSIZE_BYTES; fs->qsize *= 1024; } else if (*end == 'B' || _substrcmp2(end, "by", "bytes") == 0) { fs->flags |= DN_QSIZE_BYTES; } ac--; av++; break; case TOK_BUCKETS: NEED(fs, "buckets is only for pipes or flowsets"); NEED1("buckets needs argument\n"); *buckets = strtoul(av[0], NULL, 0); ac--; av++; break; case TOK_FLOW_MASK: case TOK_SCHED_MASK: case TOK_MASK: NEED(mask, "tok_mask"); NEED1("mask needs mask specifier\n"); /* * per-flow queue, mask is dst_ip, dst_port, * src_ip, src_port, proto measured in bits */ bzero(mask, sizeof(*mask)); end = NULL; while (ac >= 1) { uint32_t *p32 = NULL; uint16_t *p16 = NULL; uint32_t *p20 = NULL; struct in6_addr *pa6 = NULL; uint32_t a; tok = match_token(dummynet_params, *av); ac--; av++; switch(tok) { case TOK_ALL: /* * special case, all bits significant * except 'extra' (the queue number) */ mask->dst_ip = ~0; mask->src_ip = ~0; mask->dst_port = ~0; mask->src_port = ~0; mask->proto = ~0; n2mask(&mask->dst_ip6, 128); n2mask(&mask->src_ip6, 128); mask->flow_id6 = ~0; *flags |= DN_HAVE_MASK; goto end_mask; case TOK_QUEUE: mask->extra = ~0; *flags |= DN_HAVE_MASK; goto end_mask; case TOK_DSTIP: mask->addr_type = 4; p32 = &mask->dst_ip; break; case TOK_SRCIP: mask->addr_type = 4; p32 = &mask->src_ip; break; case TOK_DSTIP6: mask->addr_type = 6; pa6 = &mask->dst_ip6; break; case TOK_SRCIP6: mask->addr_type = 6; pa6 = &mask->src_ip6; break; case TOK_FLOWID: mask->addr_type = 6; p20 = &mask->flow_id6; break; case TOK_DSTPORT: p16 = &mask->dst_port; break; case TOK_SRCPORT: p16 = &mask->src_port; break; case TOK_PROTO: break; default: ac++; av--; /* backtrack */ goto end_mask; } if (ac < 1) errx(EX_USAGE, "mask: value missing"); if (*av[0] == '/') { a = strtoul(av[0]+1, &end, 0); if (pa6 == NULL) a = (a == 32) ? ~0 : (1 << a) - 1; } else a = strtoul(av[0], &end, 0); if (p32 != NULL) *p32 = a; else if (p16 != NULL) { if (a > 0xFFFF) errx(EX_DATAERR, "port mask must be 16 bit"); *p16 = (uint16_t)a; } else if (p20 != NULL) { if (a > 0xfffff) errx(EX_DATAERR, "flow_id mask must be 20 bit"); *p20 = (uint32_t)a; } else if (pa6 != NULL) { if (a > 128) errx(EX_DATAERR, "in6addr invalid mask len"); else n2mask(pa6, a); } else { if (a > 0xFF) errx(EX_DATAERR, "proto mask must be 8 bit"); mask->proto = (uint8_t)a; } if (a != 0) *flags |= DN_HAVE_MASK; ac--; av++; } /* end while, config masks */ end_mask: break; case TOK_RED: case TOK_GRED: NEED1("red/gred needs w_q/min_th/max_th/max_p\n"); fs->flags |= DN_IS_RED; if (tok == TOK_GRED) fs->flags |= DN_IS_GENTLE_RED; /* * the format for parameters is w_q/min_th/max_th/max_p */ if ((end = strsep(&av[0], "/"))) { double w_q = strtod(end, NULL); if (w_q > 1 || w_q <= 0) errx(EX_DATAERR, "0 < w_q <= 1"); fs->w_q = (int) (w_q * (1 << SCALE_RED)); } if ((end = strsep(&av[0], "/"))) { fs->min_th = strtoul(end, &end, 0); if (*end == 'K' || *end == 'k') fs->min_th *= 1024; } if ((end = strsep(&av[0], "/"))) { fs->max_th = strtoul(end, &end, 0); if (*end == 'K' || *end == 'k') fs->max_th *= 1024; } if ((end = strsep(&av[0], "/"))) { double max_p = strtod(end, NULL); if (max_p > 1 || max_p < 0) errx(EX_DATAERR, "0 <= max_p <= 1"); fs->max_p = (int)(max_p * (1 << SCALE_RED)); } ac--; av++; break; case TOK_ECN: fs->flags |= DN_IS_ECN; break; case TOK_DROPTAIL: NEED(fs, "droptail is only for flowsets"); fs->flags &= ~(DN_IS_RED|DN_IS_GENTLE_RED); break; case TOK_BW: NEED(p, "bw is only for links"); NEED1("bw needs bandwidth or interface\n"); read_bandwidth(av[0], &p->bandwidth, NULL, 0); ac--; av++; break; case TOK_DELAY: NEED(p, "delay is only for links"); NEED1("delay needs argument 0..10000ms\n"); p->delay = strtoul(av[0], NULL, 0); ac--; av++; break; case TOK_TYPE: { int l; NEED(sch, "type is only for schedulers"); NEED1("type needs a string"); l = strlen(av[0]); if (l == 0 || l > 15) errx(1, "type %s too long\n", av[0]); strcpy(sch->name, av[0]); sch->oid.subtype = 0; /* use string */ ac--; av++; break; } case TOK_WEIGHT: NEED(fs, "weight is only for flowsets"); NEED1("weight needs argument\n"); fs->par[0] = strtol(av[0], &end, 0); ac--; av++; break; case TOK_LMAX: NEED(fs, "lmax is only for flowsets"); NEED1("lmax needs argument\n"); fs->par[1] = strtol(av[0], &end, 0); ac--; av++; break; case TOK_PRI: NEED(fs, "priority is only for flowsets"); NEED1("priority needs argument\n"); fs->par[2] = strtol(av[0], &end, 0); ac--; av++; break; case TOK_SCHED: case TOK_PIPE: NEED(fs, "pipe/sched"); NEED1("pipe/link/sched needs number\n"); fs->sched_nr = strtoul(av[0], &end, 0); ac--; av++; break; case TOK_PROFILE: NEED((!pf), "profile already set"); NEED(p, "profile"); { NEED1("extra delay needs the file name\n"); pf = o_next(&buf, sizeof(*pf), DN_PROFILE); load_extra_delays(av[0], pf, p); //XXX can't fail? --ac; ++av; } break; case TOK_BURST: NEED(p, "burst"); NEED1("burst needs argument\n"); errno = 0; if (expand_number(av[0], &p->burst) < 0) if (errno != ERANGE) errx(EX_DATAERR, "burst: invalid argument"); if (errno || p->burst > (1ULL << 48) - 1) errx(EX_DATAERR, "burst: out of range (0..2^48-1)"); ac--; av++; break; default: errx(EX_DATAERR, "unrecognised option ``%s''", av[-1]); } } /* check validity of parameters */ if (p) { if (p->delay > 10000) errx(EX_DATAERR, "delay must be < 10000"); if (p->bandwidth == -1) p->bandwidth = 0; } if (fs) { /* XXX accept a 0 scheduler to keep the default */ if (fs->flags & DN_QSIZE_BYTES) { size_t len; long limit; len = sizeof(limit); if (sysctlbyname("net.inet.ip.dummynet.pipe_byte_limit", &limit, &len, NULL, 0) == -1) limit = 1024*1024; if (fs->qsize > limit) errx(EX_DATAERR, "queue size must be < %ldB", limit); } else { size_t len; long limit; len = sizeof(limit); if (sysctlbyname("net.inet.ip.dummynet.pipe_slot_limit", &limit, &len, NULL, 0) == -1) limit = 100; if (fs->qsize > limit) errx(EX_DATAERR, "2 <= queue size <= %ld", limit); } if ((fs->flags & DN_IS_ECN) && !(fs->flags & DN_IS_RED)) errx(EX_USAGE, "enable red/gred for ECN"); if (fs->flags & DN_IS_RED) { size_t len; int lookup_depth, avg_pkt_size; if (!(fs->flags & DN_IS_ECN) && (fs->min_th >= fs->max_th)) errx(EX_DATAERR, "min_th %d must be < than max_th %d", fs->min_th, fs->max_th); else if ((fs->flags & DN_IS_ECN) && (fs->min_th > fs->max_th)) errx(EX_DATAERR, "min_th %d must be =< than max_th %d", fs->min_th, fs->max_th); if (fs->max_th == 0) errx(EX_DATAERR, "max_th must be > 0"); len = sizeof(int); if (sysctlbyname("net.inet.ip.dummynet.red_lookup_depth", &lookup_depth, &len, NULL, 0) == -1) lookup_depth = 256; if (lookup_depth == 0) errx(EX_DATAERR, "net.inet.ip.dummynet.red_lookup_depth" " must be greater than zero"); len = sizeof(int); if (sysctlbyname("net.inet.ip.dummynet.red_avg_pkt_size", &avg_pkt_size, &len, NULL, 0) == -1) avg_pkt_size = 512; if (avg_pkt_size == 0) errx(EX_DATAERR, "net.inet.ip.dummynet.red_avg_pkt_size must" " be greater than zero"); #if 0 /* the following computation is now done in the kernel */ /* * Ticks needed for sending a medium-sized packet. * Unfortunately, when we are configuring a WF2Q+ queue, we * do not have bandwidth information, because that is stored * in the parent pipe, and also we have multiple queues * competing for it. So we set s=0, which is not very * correct. But on the other hand, why do we want RED with * WF2Q+ ? */ if (p.bandwidth==0) /* this is a WF2Q+ queue */ s = 0; else s = (double)ck.hz * avg_pkt_size * 8 / p.bandwidth; /* * max idle time (in ticks) before avg queue size becomes 0. * NOTA: (3/w_q) is approx the value x so that * (1-w_q)^x < 10^-3. */ w_q = ((double)fs->w_q) / (1 << SCALE_RED); idle = s * 3. / w_q; fs->lookup_step = (int)idle / lookup_depth; if (!fs->lookup_step) fs->lookup_step = 1; weight = 1 - w_q; for (t = fs->lookup_step; t > 1; --t) weight *= 1 - w_q; fs->lookup_weight = (int)(weight * (1 << SCALE_RED)); #endif /* code moved in the kernel */ } } i = do_cmd(IP_DUMMYNET3, base, (char *)buf - (char *)base); if (i) err(1, "setsockopt(%s)", "IP_DUMMYNET_CONFIGURE"); } void dummynet_flush(void) { struct dn_id oid; oid_fill(&oid, sizeof(oid), DN_CMD_FLUSH, DN_API_VERSION); do_cmd(IP_DUMMYNET3, &oid, oid.len); } /* Parse input for 'ipfw [pipe|sched|queue] show [range list]' * Returns the number of ranges, and possibly stores them * in the array v of size len. */ static int parse_range(int ac, char *av[], uint32_t *v, int len) { int n = 0; char *endptr, *s; uint32_t base[2]; if (v == NULL || len < 2) { v = base; len = 2; } for (s = *av; s != NULL; av++, ac--) { v[0] = strtoul(s, &endptr, 10); v[1] = (*endptr != '-') ? v[0] : strtoul(endptr+1, &endptr, 10); if (*endptr == '\0') { /* prepare for next round */ s = (ac > 0) ? *(av+1) : NULL; } else { if (*endptr != ',') { warn("invalid number: %s", s); s = ++endptr; continue; } /* continue processing from here */ s = ++endptr; ac++; av--; } if (v[1] < v[0] || v[1] >= DN_MAX_ID-1 || v[1] >= DN_MAX_ID-1) { continue; /* invalid entry */ } n++; /* translate if 'pipe list' */ if (co.do_pipe == 1) { v[0] += DN_MAX_ID; v[1] += DN_MAX_ID; } v = (n*2 < len) ? v + 2 : base; } return n; } /* main entry point for dummynet list functions. co.do_pipe indicates * which function we want to support. * av may contain filtering arguments, either individual entries * or ranges, or lists (space or commas are valid separators). * Format for a range can be n1-n2 or n3 n4 n5 ... * In a range n1 must be <= n2, otherwise the range is ignored. * A number 'n4' is translate in a range 'n4-n4' * All number must be > 0 and < DN_MAX_ID-1 */ void dummynet_list(int ac, char *av[], int show_counters) { struct dn_id *oid, *x = NULL; int ret, i; int n; /* # of ranges */ u_int buflen, l; u_int max_size; /* largest obj passed up */ (void)show_counters; // XXX unused, but we should use it. ac--; av++; /* skip 'list' | 'show' word */ n = parse_range(ac, av, NULL, 0); /* Count # of ranges. */ /* Allocate space to store ranges */ l = sizeof(*oid) + sizeof(uint32_t) * n * 2; oid = safe_calloc(1, l); oid_fill(oid, l, DN_CMD_GET, DN_API_VERSION); if (n > 0) /* store ranges in idx */ parse_range(ac, av, (uint32_t *)(oid + 1), n*2); /* * Compute the size of the largest object returned. If the * response leaves at least this much spare space in the * buffer, then surely the response is complete; otherwise * there might be a risk of truncation and we will need to * retry with a larger buffer. * XXX don't bother with smaller structs. */ max_size = sizeof(struct dn_fs); if (max_size < sizeof(struct dn_sch)) max_size = sizeof(struct dn_sch); if (max_size < sizeof(struct dn_flow)) max_size = sizeof(struct dn_flow); switch (co.do_pipe) { case 1: oid->subtype = DN_LINK; /* list pipe */ break; case 2: oid->subtype = DN_FS; /* list queue */ break; case 3: oid->subtype = DN_SCH; /* list sched */ break; } /* * Ask the kernel an estimate of the required space (result * in oid.id), unless we are requesting a subset of objects, * in which case the kernel does not give an exact answer. * In any case, space might grow in the meantime due to the * creation of new queues, so we must be prepared to retry. */ if (n > 0) { buflen = 4*1024; } else { ret = do_cmd(-IP_DUMMYNET3, oid, (uintptr_t)&l); if (ret != 0 || oid->id <= sizeof(*oid)) goto done; buflen = oid->id + max_size; oid->len = sizeof(*oid); /* restore */ } /* Try a few times, until the buffer fits */ for (i = 0; i < 20; i++) { l = buflen; x = safe_realloc(x, l); bcopy(oid, x, oid->len); ret = do_cmd(-IP_DUMMYNET3, x, (uintptr_t)&l); if (ret != 0 || x->id <= sizeof(*oid)) goto done; /* no response */ if (l + max_size <= buflen) break; /* ok */ buflen *= 2; /* double for next attempt */ } list_pipes(x, O_NEXT(x, l)); done: if (x) free(x); free(oid); } nextepc-0.3.10/lib/ipfw/expand_number.c000066400000000000000000000057731333553357400177760ustar00rootroot00000000000000/*- * Copyright (c) 2007 Eric Anderson * Copyright (c) 2007 Pawel Jakub Dawidek * 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 AUTHORS 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 AUTHORS 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. */ #include __FBSDID("$FreeBSD: head/lib/libutil/expand_number.c 211343 2010-08-15 18:32:06Z des $"); #include #include #include #include //#include #include /* * Convert an expression of the following forms to a uint64_t. * 1) A positive decimal number. * 2) A positive decimal number followed by a 'b' or 'B' (mult by 1). * 3) A positive decimal number followed by a 'k' or 'K' (mult by 1 << 10). * 4) A positive decimal number followed by a 'm' or 'M' (mult by 1 << 20). * 5) A positive decimal number followed by a 'g' or 'G' (mult by 1 << 30). * 6) A positive decimal number followed by a 't' or 'T' (mult by 1 << 40). * 7) A positive decimal number followed by a 'p' or 'P' (mult by 1 << 50). * 8) A positive decimal number followed by a 'e' or 'E' (mult by 1 << 60). */ int expand_number(const char *buf, uint64_t *num) { uint64_t number; unsigned shift; char *endptr; number = strtoumax(buf, &endptr, 0); if (endptr == buf) { /* No valid digits. */ errno = EINVAL; return (-1); } switch (tolower((unsigned char)*endptr)) { case 'e': shift = 60; break; case 'p': shift = 50; break; case 't': shift = 40; break; case 'g': shift = 30; break; case 'm': shift = 20; break; case 'k': shift = 10; break; case 'b': case '\0': /* No unit. */ *num = number; return (0); default: /* Unrecognized unit. */ errno = EINVAL; return (-1); } if ((number << shift) >> shift != number) { /* Overflow */ errno = ERANGE; return (-1); } *num = number << shift; return (0); } nextepc-0.3.10/lib/ipfw/glue.c000066400000000000000000000321341333553357400160720ustar00rootroot00000000000000/* * Userland functions missing in linux * taken from /usr/src/lib/libc/stdtime/time32.c */ #include #include #include #include #include /* sockaddr_in */ #include /* TCP_NODELAY */ #include #include /* uint* types */ #include #include /* bzero */ #include /* htonl */ #ifndef HAVE_NAT /* dummy nat functions */ void ipfw_show_nat(int ac, char **av) { D("unsupported"); } void ipfw_config_nat(int ac, char **av) { D("unsupported"); } #endif /* HAVE_NAT */ #ifdef NEED_STRTONUM /* missing in linux and windows */ long long int strtonum(const char *nptr, long long minval, long long maxval, const char **errstr) { long long ret; int errno_c = errno; /* save actual errno */ errno = 0; #ifdef TCC ret = strtol(nptr, (char **)errstr, 0); #else ret = strtoll(nptr, (char **)errstr, 0); #endif /* We accept only a string that represent exactly a number (ie. start * and end with a digit). * FreeBSD version wants errstr==NULL if no error occurs, otherwise * errstr should point to an error string. * For our purspose, we implement only the invalid error, ranges * error aren't checked */ if (errno != 0 || nptr == *errstr || **errstr != '\0') *errstr = "invalid"; else { *errstr = NULL; errno = errno_c; } return ret; } int ishexnumber(int c) { return ((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F') ); } #endif /* NEED_STRTONUM */ #ifdef __linux__ int optreset; /* missing in linux */ /* * not implemented in linux. * taken from /usr/src/lib/libc/string/strlcpy.c */ size_t strlcpy(dst, src, siz) char *dst; const char *src; size_t siz; { char *d = dst; const char *s = src; size_t n = siz; /* Copy as many bytes as will fit */ if (n != 0 && --n != 0) { do { if ((*d++ = *s++) == 0) break; } while (--n != 0); } /* Not enough room in dst, add NUL and traverse rest of src */ if (n == 0) { if (siz != 0) *d = '\0'; /* NUL-terminate dst */ while (*s++) ; } return(s - src - 1); /* count does not include NUL */ } #endif /* __linux__ */ #if defined (EMULATE_SYSCTL) //XXX missing prerequisites #include //openwrt #include //openwrt #include #include int do_cmd(int optname, void *optval, uintptr_t optlen); #endif /* EMULATE_SYSCTL */ /* * set or get system information * XXX lock acquisition/serialize calls * * we export this as sys/module/ipfw_mod/parameters/___ * This function get or/and set the value of the sysctl passed by * the name parameter. If the old value is not desired, * oldp and oldlenp should be set to NULL. * * XXX * I do not know how this works in FreeBSD in the case * where there are no write permission on the sysctl var. * We read the value and set return variables in any way * but returns -1 on write failures, regardless the * read success. * * Since there is no information on types, in the following * code we assume a length of 4 is a int. * * Returns 0 on success, -1 on errors. */ int sysctlbyname(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen) { #if defined (EMULATE_SYSCTL) /* * we embed the sysctl request in the usual sockopt mechanics. * the sockopt buffer il filled with a dn_id with IP_DUMMYNET3 * command, and the special DN_SYSCTL_GET and DN_SYSCTL_SET * subcommands. * the syntax of this function is fully compatible with * POSIX sysctlby name: * if newp and newlen are != 0 => this is a set * else if oldp and oldlen are != 0 => this is a get * to avoid too much overhead in the module, the whole * sysctltable is returned, and the parsing is done in userland, * a probe request is done to retrieve the size needed to * transfer the table, before the real request * if both old and new params = 0 => this is a print * this is a special request, done only by main() * to implement the extension './ipfw sysctl', * a command that bypasses the normal getopt, and that * is available on those platforms that use this * sysctl emulation. * in this case, a negative oldlen signals that *oldp * is actually a FILE* to print somewhere else than stdout */ int l; int ret; struct dn_id* oid; struct sysctlhead* entry; char* pstring; char* pdata; FILE* fp; if((oldlenp != NULL) && ((int)*oldlenp < 0)) fp = (FILE*)oldp; else fp = stdout; if(newp != NULL && newlen != 0) { //this is a set l = sizeof(struct dn_id) + sizeof(struct sysctlhead) + strlen(name)+1 + newlen; oid = malloc(l); if (oid == NULL) return -1; oid->len = l; oid->type = DN_SYSCTL_SET; oid->id = DN_API_VERSION; entry = (struct sysctlhead*)(oid+1); pdata = (char*)(entry+1); pstring = pdata + newlen; entry->blocklen = ((sizeof(struct sysctlhead) + strlen(name)+1 + newlen) + 3) & ~3; entry->namelen = strlen(name)+1; entry->flags = 0; entry->datalen = newlen; bcopy(newp, pdata, newlen); bcopy(name, pstring, strlen(name)+1); ret = do_cmd(IP_DUMMYNET3, oid, (uintptr_t)l); if (ret != 0) return -1; } else { //this is a get or a print l = sizeof(struct dn_id); oid = malloc(l); if (oid == NULL) return -1; oid->len = l; oid->type = DN_SYSCTL_GET; oid->id = DN_API_VERSION; ret = do_cmd(-IP_DUMMYNET3, oid, (uintptr_t)&l); if (ret != 0) return -1; l=oid->id; free(oid); oid = malloc(l); if (oid == NULL) return -1; oid->len = l; oid->type = DN_SYSCTL_GET; oid->id = DN_API_VERSION; ret = do_cmd(-IP_DUMMYNET3, oid, (uintptr_t)&l); if (ret != 0) return -1; entry = (struct sysctlhead*)(oid+1); while(entry->blocklen != 0) { pdata = (char*)(entry+1); pstring = pdata+entry->datalen; //time to check if this is a get or a print if(name != NULL && oldp != NULL && *oldlenp > 0) { //this is a get if(strcmp(name,pstring) == 0) { //match found, sanity chech on len if(*oldlenp < entry->datalen) { printf("%s error: buffer too small\n",__FUNCTION__); return -1; } *oldlenp = entry->datalen; bcopy(pdata, oldp, *oldlenp); return 0; } } else { //this is a print if( name == NULL ) goto print; if ( (strncmp(pstring,name,strlen(name)) == 0) && ( pstring[strlen(name)]=='\0' || pstring[strlen(name)]=='.' ) ) goto print; else goto skip; print: fprintf(fp, "%s: ",pstring); switch( entry->flags >> 2 ) { case SYSCTLTYPE_LONG: fprintf(fp, "%li ", *(long*)(pdata)); break; case SYSCTLTYPE_UINT: fprintf(fp, "%u ", *(unsigned int*)(pdata)); break; case SYSCTLTYPE_ULONG: fprintf(fp, "%lu ", *(unsigned long*)(pdata)); break; case SYSCTLTYPE_INT: default: fprintf(fp, "%i ", *(int*)(pdata)); } if( (entry->flags & 0x00000003) == CTLFLAG_RD ) fprintf(fp, "\t(read only)\n"); else fprintf(fp, "\n"); skip: ; } entry = (struct sysctlhead*)((unsigned char*)entry + entry->blocklen); } free(oid); return 0; } //fallback for invalid options return -1; #else /* __linux__ */ FILE *fp; char *basename = "/sys/module/ipfw_mod/parameters/"; char filename[256]; /* full filename */ char *varp; int ret = 0; /* return value */ int d; if (name == NULL) /* XXX set errno */ return -1; /* locate the filename */ varp = strrchr(name, '.'); if (varp == NULL) /* XXX set errno */ return -1; snprintf(filename, sizeof(filename), "%s%s", basename, varp+1); /* * XXX we could open the file here, in rw mode * but need to check if a file have write * permissions. */ /* check parameters */ if (oldp && oldlenp) { /* read mode */ fp = fopen(filename, "r"); if (fp == NULL) { fprintf(stderr, "%s fopen error reading filename %s\n", __FUNCTION__, filename); return -1; } if (*oldlenp == 4) { if (fscanf(fp, "%d", &d) == 1) memcpy(oldp, &d, *oldlenp); else ret = -1; } fclose(fp); } if (newp && newlen) { /* write */ fp = fopen(filename, "w"); if (fp == NULL) { fprintf(stderr, "%s fopen error writing filename %s\n", __FUNCTION__, filename); return -1; } if (newlen == 4) { if (fprintf(fp, "%d", *(int*)newp) < 1) ret = -1; } fclose(fp); } return ret; #endif /* __linux__ */ } /* * The following two functions implement getsockopt/setsockopt * replacements to talk over a TCP socket. * Because the calls are synchronous, we can run blocking code * and do not need to play special tricks to be selectable. * The wire protocol for the emulation is the following: * REQUEST: n32 req_size, level, optname; u8 data[req_size] * RESPONSE: n32 resp_size, ret_code; u8 data[resp_size] * data is only present if ret_code == 0 * * Return 0 if the message wan sent to the remote * endpoint, -1 on error. * * If the required lenght is greater then the * available buffer size, -1 is returned and * optlen is the required lenght. */ enum sock_type {GET_SOCKOPT, SET_SOCKOPT}; struct wire_hdr { uint32_t optlen; /* actual data len */ uint32_t level; /* or error */ uint32_t optname; /* or act len */ uint32_t dir; /* in or out */ }; /* do a complete write of the buffer */ static int writen(int fd, const char *buf, int len) { int i; for (; len > 0; buf += i, len -= i) { i = write(fd, buf, len); ND("have %d wrote %d", len, i); if (i < 0) { if (errno == EAGAIN) continue; return -1; } } return 0; } /* do a complete read */ static int readn(int fd, char *buf, int len) { int i, pos; for (pos = 0; pos < len; pos += i) { i = read(fd, buf + pos, len - pos); ND("have %d want %d got %d", pos, len, i); if (i < 0) { if (errno == EAGAIN) continue; return -1; } } ND("full read got %d", pos); return 0; } int __sockopt2(int s, int level, int optname, void *optval, socklen_t *optlen, enum sopt_dir dir) { struct wire_hdr r; int len = optlen && optval ? *optlen : 0; int new_errno; ND("dir %d optlen %d level %d optname %d", dir, len, level, optname); /* send request to the server */ r.optlen = htonl(len); r.level = htonl(level); r.optname = htonl(optname); r.dir = htonl(dir); if (writen(s, (const char *) &r, sizeof(r))) return -1; /* error writing */ /* send data, if present */ if (len < 0) { fprintf(stderr, "%s invalid args found\n", __FUNCTION__); return -1; } else if (len > 0) { if (writen(s, optval, len)) return -1; /* error writing */ } /* read response size and error code */ if (readn(s, (char *)&r, sizeof(r))) return -1; /* error reading */ len = ntohl(r.optlen); ND("got header, datalen %d", len); if (len > 0) { if (readn(s, optval, len)) { return -1; /* error reading */ } } if (optlen) *optlen = ntohl(r.optlen); /* actual len */ new_errno = ntohl(r.level); if (new_errno) errno = new_errno; return (new_errno ? -1 : 0); } /* * getsockopt() replacement. */ int getsockopt2(int s, int level, int optname, void *optval, socklen_t *optlen) { return __sockopt2(s, level, optname, optval, optlen, SOPT_GET); } /* * setsockopt() replacement */ int setsockopt2(int s, int level, int optname, void *optval, socklen_t optlen) { /* optlen not changed, use the local address */ return __sockopt2(s, level, optname, optval, &optlen, SOPT_SET); } #ifdef socket #undef socket /* we want the real one */ #endif /* * This function replaces the socket() call to connect to * the ipfw control socket. * We actually ignore the paramerers if IPFW_HOST and IPFW_PORT * are defined. */ int do_connect(const char *addr, int port) { int conn_fd; /* open the socket */ #ifdef NETLINK struct rtnl_handle rth; conn_fd = socket(PF_NETLINK, SOCK_DGRAM, NETLINK_ROUTE); #else struct sockaddr_in server; /* server address */ const char *s; conn_fd = socket(AF_INET, SOCK_STREAM, 0); if (conn_fd < 0) { perror("socket"); return -1; } #endif #ifndef NETLINK /* fill the sockaddr structure with server address */ bzero(&server, sizeof(server)); server.sin_family = AF_INET; /* override the host if set in the environment */ s = getenv("IPFW_HOST"); if (s) addr = s; inet_aton(addr, &server.sin_addr); s = getenv("IPFW_PORT"); if (s && atoi(s) > 0) port = atoi(s); server.sin_port = htons(port); /* connect to the server */ if (connect(conn_fd, (struct sockaddr*) &server, sizeof(server)) < 0) { perror("connect"); return -1; } #ifdef setsockopt /* we want the real one here */ #undef setsockopt #undef getsockopt #endif { int on = 1, ret; ret = setsockopt(conn_fd, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)); ND("set TCP_NODELAY %d returns %d", on, ret); } if (0) fprintf(stderr, "connected to %s:%d\n", inet_ntoa(server.sin_addr), ntohs(server.sin_port)); #endif return conn_fd; } nextepc-0.3.10/lib/ipfw/glue.h000066400000000000000000000335101333553357400160760ustar00rootroot00000000000000/* * Copyright (c) 2009 Luigi Rizzo, Marta Carbone, Universita` di Pisa * * 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 AUTHOR 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 AUTHOR 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. */ /* * $Id: glue.h 8327 2011-03-22 17:01:35Z marta $ * * glue code to adapt the FreeBSD version to linux and windows, * userland and kernel. * This is included before any other headers, so we do not have * a chance to override any #define that should appear in other * headers. * First handle headers for userland and kernel. Then common code * (including headers that require a specific order of inclusion), * then the user- and kernel- specific parts. */ #ifndef _GLUE_H #define _GLUE_H /* * common definitions to allow portability */ #ifndef __FBSDID #define __FBSDID(x) struct __hack #endif /* FBSDID */ #include /* linux needs it in addition to sys/types.h */ #include /* for size_t */ #define true 1 /* stdbool */ #ifdef _KERNEL /* prevent a warning */ #undef _KERNEL #include #include #include /* we want errno */ #define _KERNEL #else #include #endif #include #ifndef USERSPACE #include #endif /*----- */ /* ipfw2.c - from timeconv.h */ static __inline time_t _long_to_time(long tlong) { if (sizeof(long) == sizeof(__int32_t)) return((time_t)(__int32_t)(tlong)); return((time_t)tlong); } #define min(a, b) ((a) < (b) ? (a) : (b) ) // radix.c /* * debugging macros from ip_dn_private.h */ #include #include extern char *strrchr(const char *, int); static inline const char *xyz(const char *s) { static char buf[128]; struct timeval t; const char *ret = strrchr(s, '/'); if (ret) s = ret + 1; gettimeofday(&t, NULL); buf[sizeof(buf) - 1] = '\0'; snprintf(buf, sizeof(buf), "[%4d.%06d] %s", (int)(t.tv_sec % 1000), (int)(t.tv_usec), s); return buf; } #define ND(fmt, ...) do {} while (0) #define D1(fmt, ...) do {} while (0) #define D(fmt, ...) fprintf(stderr, "%s:%-10s [%d] " fmt "\n", \ xyz(__FILE__), __FUNCTION__, __LINE__, ## __VA_ARGS__) /* Rate limited version of "D", lps indicates how many per second */ #define RD(lps, format, ...) \ do { \ static int t0, __cnt; \ struct timeval __xxts; \ gettimeofday(&__xxts, NULL); \ if (t0 != __xxts.tv_sec) { \ t0 = __xxts.tv_sec; \ __cnt = 0; \ } \ if (__cnt++ < lps) { \ D(format, ##__VA_ARGS__); \ } \ } while (0) #define DX(lev, fmt, ...) do { \ if (dn_cfg.debug > lev) D(fmt, ## __VA_ARGS__); } while (0) /* end debugging macros */ /* * sbin/ipfw on non-freebsd platform */ #ifdef NEED_STRTONUM /* prototypes from libutil */ /* humanize_number(3) */ #define HN_DECIMAL 0x01 #define HN_NOSPACE 0x02 #define HN_B 0x04 #define HN_DIVISOR_1000 0x08 #define HN_IEC_PREFIXES 0x10 #define HN_GETSCALE 0x10 #define HN_AUTOSCALE 0x20 int humanize_number(char *_buf, size_t _len, int64_t _number, const char *_suffix, int _scale, int _flags); int expand_number(const char *buf, uint64_t *num); long long strtonum(const char *nptr, long long minval, long long maxval, const char **errstr); #ifndef __APPLE__ int ishexnumber(int c); #endif #endif /* NEED_STRTONUM */ #ifdef NEED_SYSCTLBYNAME /* and other linux calls */ int sysctlbyname(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen); #define setprogname(x) /* not present in linux */ extern int optreset; /* not present in linux */ long long int strtonum(const char *nptr, long long minval, long long maxval, const char **errstr); struct ether_addr; struct ether_addr * ether_aton(const char *a); #define ICMP6_MAXTYPE 201 #define __u6_addr in6_u #define in6_u __in6_u /* missing type for ipv6 (linux 2.6.28) */ #define __u6_addr32 u6_addr32 /* on freebsd sys/socket.h pf specific */ #define NET_RT_IFLIST 3 /* survey interface list */ #define RTM_VERSION 5 /* Up the ante and ignore older versions */ #endif // NEED_SYSCTLBYNAME #ifdef NEED_SIN_LEN /* * linux at least does not have sin_len and sin6_len, so we remap * to some safe fields (check use of sin6_flowinfo XXX) */ #define sin_len sin_zero[0] #define sin6_len sin6_flowinfo #endif /* NEED_SIN_LEN */ #ifdef NEED_ROUNDUP2 /* in freensd is in sys/param.h */ /* round up to the next power of 2 (y) */ #define roundup2(x, y) (((x)+((y)-1))&(~((y)-1))) /* if y is powers of two */ #endif // NEED_ROUNDUP2 /* possibly redundant, does not harm */ size_t strlcpy(char * dst, const char * src, size_t siz); /* * Part 2: common userland and kernel definitions */ #define ICMP6_DST_UNREACH_NOROUTE 0 /* no route to destination */ #define ICMP6_DST_UNREACH_ADMIN 1 /* administratively prohibited */ #define ICMP6_DST_UNREACH_ADDR 3 /* address unreachable */ #define ICMP6_DST_UNREACH_NOPORT 4 /* port unreachable */ /* * linux: sysctl are mapped into /sys/module/ipfw_mod parameters * windows: they are emulated via get/setsockopt */ #define CTLFLAG_RD 1 #define CTLFLAG_RDTUN 1 #define CTLFLAG_RW 2 #define CTLFLAG_SECURE3 0 /* unsupported */ #define CTLFLAG_VNET 0 /* unsupported */ /* if needed, queue.h must be included here after list.h */ /* * our own struct thread */ struct thread { /* ip_fw_sockopt */ void *sopt_td; void *td_ucred; }; enum sopt_dir { SOPT_GET, SOPT_SET }; struct sockopt { enum sopt_dir sopt_dir; /* is this a get or a set? */ int sopt_level; /* second arg of [gs]etsockopt */ int sopt_name; /* third arg of [gs]etsockopt */ void *sopt_val; /* fourth arg of [gs]etsockopt */ size_t sopt_valsize; /* (almost) fifth arg of [gs]etsockopt */ struct thread *sopt_td; /* calling thread or null if kernel */ }; /* * List of values used for set/getsockopt options. * The base value on FreeBSD is defined as a macro, * if not available we will use our own enum. * The TABLE_BASE value is used in the kernel. */ #define _IPFW_SOCKOPT_BASE 100 /* 40 on freebsd */ #define IP_FW_TABLE_ADD (_IPFW_SOCKOPT_BASE + 0) #define IP_FW_TABLE_DEL (_IPFW_SOCKOPT_BASE + 1) #define IP_FW_TABLE_FLUSH (_IPFW_SOCKOPT_BASE + 2) #define IP_FW_TABLE_GETSIZE (_IPFW_SOCKOPT_BASE + 3) #define IP_FW_TABLE_LIST (_IPFW_SOCKOPT_BASE + 4) #define IP_FW_DYN_GET (_IPFW_SOCKOPT_BASE + 5) #define IP_FW3 (_IPFW_SOCKOPT_BASE + 8) #define IP_DUMMYNET3 (_IPFW_SOCKOPT_BASE + 9) #define IP_FW_ADD (_IPFW_SOCKOPT_BASE + 10) #define IP_FW_DEL (_IPFW_SOCKOPT_BASE + 11) #define IP_FW_FLUSH (_IPFW_SOCKOPT_BASE + 12) #define IP_FW_ZERO (_IPFW_SOCKOPT_BASE + 13) #define IP_FW_GET (_IPFW_SOCKOPT_BASE + 14) #define IP_FW_RESETLOG (_IPFW_SOCKOPT_BASE + 15) #define IP_FW_NAT_CFG (_IPFW_SOCKOPT_BASE + 16) #define IP_FW_NAT_DEL (_IPFW_SOCKOPT_BASE + 17) #define IP_FW_NAT_GET_CONFIG (_IPFW_SOCKOPT_BASE + 18) #define IP_FW_NAT_GET_LOG (_IPFW_SOCKOPT_BASE + 19) #define IP_DUMMYNET_CONFIGURE (_IPFW_SOCKOPT_BASE + 20) #define IP_DUMMYNET_DEL (_IPFW_SOCKOPT_BASE + 21) #define IP_DUMMYNET_FLUSH (_IPFW_SOCKOPT_BASE + 22) /* 63 is missing */ #define IP_DUMMYNET_GET (_IPFW_SOCKOPT_BASE + 24) #define _IPFW_SOCKOPT_END (_IPFW_SOCKOPT_BASE + 25) /* * Part 3: userland stuff for linux/windows */ /* * now remap functions for userland or linux kernel etc. */ #ifdef USERSPACE /* * definitions used when the programs communicate through userspace. * We need to define the socket and addresses used to talk, and * the userland side must also remap socket() and [gs]etsockopt() * to appropriate wrappers. */ #define LOCALADDR "127.0.0.1" #define IPFW_PORT 5555 #ifndef KERNEL_SIDE #ifdef _KERNEL #error _KERNEL defined in user space #endif int do_connect(const char *addr, int port); #include /* for socklen_t */ #define socket(a, b, c) do_connect(LOCALADDR, IPFW_PORT) #define setsockopt setsockopt2 #define getsockopt getsockopt2 int getsockopt2(int s, int lev, int optname, void *optval, socklen_t *optlen); int setsockopt2(int s, int lev, int optname, void *optval, socklen_t optlen); #endif /* KERNEL_SIDE */ #endif /* USERSPACE */ /* * Part 5: windows specific stuff and sysctl emulation */ /******************* * SYSCTL emulation * ********************/ #ifdef EMULATE_SYSCTL /* this needs to be here, as it is part of the user-kernel messages */ /* flag is set with the last 2 bits for access, as defined in glue.h * and the rest for type */ enum { SYSCTLTYPE_INT = 0, SYSCTLTYPE_UINT = 1, SYSCTLTYPE_SHORT = 2, SYSCTLTYPE_USHORT = 3, SYSCTLTYPE_LONG = 4, SYSCTLTYPE_ULONG = 5, SYSCTLTYPE_STRING = 6, /* the following are SYSCTL_PROC equivalents of the above, * where the SYSCTLTYPE is shifted 2 bits, * and SYSCTLTYPE_PROC is set */ SYSCTLTYPE_PROC = 0x100, CTLTYPE_INT = (0x100 | (0<<2)), CTLTYPE_UINT = (0x100 | (1<<2)), CTLTYPE_LONG = (0x100 | (4<<2)), CTLTYPE_ULONG = (0x100 | (5<<2)) }; struct sysctlhead { uint32_t blocklen; //total size of the entry uint32_t namelen; //strlen(name) + '\0' uint32_t flags; //type and access uint32_t datalen; }; #endif /* EMULATE_SYSCTL */ #ifndef __FreeBSD__ int sysctlbyname(const char *name, void *oldp, size_t *oldlenp, void *newp, size_t newlen); #define test_bit(ix, pData) ((*pData) & (1<<(ix))) #define __set_bit(ix, pData) (*pData) |= (1<<(ix)) #define __clear_bit(ix, pData) (*pData) &= ~(1<<(ix)) static inline int fls(int _n) { unsigned int n = _n; int i = 0; for (i = 0; n > 0; n >>= 1, i++) ; return i; } static inline unsigned long __fls(unsigned long word) { return fls(word) - 1; } #endif /* !FreeBSD */ #ifdef KERNEL_SIDE /* sys/counter.h , to be moved to a file */ typedef uint64_t *counter_u64_t; // XXX kernel static inline void counter_u64_add(counter_u64_t c, int64_t v) { *c += v; } static inline void counter_u64_zero(counter_u64_t c) { *c = 0; } static inline uint64_t counter_u64_fetch(counter_u64_t c) { return *c; } struct rm_priotracker { }; #define vslock(_a, _b) (0) #define vsunlock(_a, _b) typedef uint64_t u_register_t; // XXX not on osx ? typedef uintptr_t eventhandler_tag; #define EVENTHANDLER_REGISTER(_a, _b, ...) (uintptr_t)_b; #define EVENTHANDLER_DEREGISTER(_a, _b, ...) (void)_b; // XXX this needs to be completed #define if_name(_ifp) (_ifp->if_xname) #define ifunit_ref(_n) NULL // XXX #define if_rele(_n) #define rtalloc1_fib(_a, ...) NULL #define rt_key(_a) NULL #define rt_mask(_a) NULL #define RTFREE_LOCKED(_a) ((void)NULL) struct rtentry { }; #define rt_tables_get_rnh(_a, _b) NULL #endif /* KERNEL_SIDE */ #ifdef _KERNEL /* XXX kernel support */ /* on freebsd net/if.h XXX used */ #ifdef linux #define div64(a,b) (((int64_t)a)/((int64_t)b)) #define LINUX_VERSION_CODE 30003 #define KERNEL_VERSION(a,b,c) (a*10000+b*100 + c) #define __printflike(a,b) #endif /* linux */ #endif /* _KERNEL */ #ifndef __FreeBSD__ #ifndef IFNAMSIZ #define IFNAMSIZ 16 #endif #include "missing.h" struct if_data { /* ... */ u_long ifi_mtu; /* maximum transmission unit */ }; #endif #ifdef __APPLE__ #include // need in kernel /* needed both in kernel and userspace */ struct if_data64 { // XXX Darwin version /* ... */ u_long ifi_mtu; /* maximum transmission unit */ }; struct net_event_data { }; struct in_addr; #endif /* __APPLE__ */ #define __PAST_END(v, idx) v[idx] /* * a fast copy routine */ #include // XXX only for multiples of 64 bytes, non overlapped. static inline void _pkt_copy(const void *_src, void *_dst, int l) { const uint64_t *src = _src; uint64_t *dst = _dst; #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) if (unlikely(l >= 1024)) { bcopy(src, dst, l); return; } for (; l > 0; l-=64) { *dst++ = *src++; *dst++ = *src++; *dst++ = *src++; *dst++ = *src++; *dst++ = *src++; *dst++ = *src++; *dst++ = *src++; *dst++ = *src++; } } #endif /* !_GLUE_H */ nextepc-0.3.10/lib/ipfw/humanize_number.c000066400000000000000000000115671333553357400203350ustar00rootroot00000000000000/* $NetBSD: humanize_number.c,v 1.14 2008/04/28 20:22:59 martin Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2002 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility, * NASA Ames Research Center, by Luke Mewburn and by Tomas Svensson. * * 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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. */ #include __FBSDID("$FreeBSD: head/lib/libutil/humanize_number.c 220582 2011-04-12 22:48:03Z delphij $"); #include #include #include #include #include #include #include //#include static const int maxscale = 7; int humanize_number(char *buf, size_t len, int64_t quotient, const char *suffix, int scale, int flags) { const char *prefixes, *sep; int i, r, remainder, s1, s2, sign; int64_t divisor, max; size_t baselen; assert(buf != NULL); assert(suffix != NULL); assert(scale >= 0); assert(scale < maxscale || (((scale & (HN_AUTOSCALE | HN_GETSCALE)) != 0))); assert(!((flags & HN_DIVISOR_1000) && (flags & HN_IEC_PREFIXES))); remainder = 0; if (flags & HN_IEC_PREFIXES) { baselen = 2; /* * Use the prefixes for power of two recommended by * the International Electrotechnical Commission * (IEC) in IEC 80000-3 (i.e. Ki, Mi, Gi...). * * HN_IEC_PREFIXES implies a divisor of 1024 here * (use of HN_DIVISOR_1000 would have triggered * an assertion earlier). */ divisor = 1024; if (flags & HN_B) prefixes = "B\0\0Ki\0Mi\0Gi\0Ti\0Pi\0Ei"; else prefixes = "\0\0Ki\0Mi\0Gi\0Ti\0Pi\0Ei"; } else { baselen = 1; if (flags & HN_DIVISOR_1000) divisor = 1000; else divisor = 1024; if (flags & HN_B) prefixes = "B\0\0k\0\0M\0\0G\0\0T\0\0P\0\0E"; else prefixes = "\0\0\0k\0\0M\0\0G\0\0T\0\0P\0\0E"; } #define SCALE2PREFIX(scale) (&prefixes[(scale) * 3]) if (scale < 0 || (scale >= maxscale && (scale & (HN_AUTOSCALE | HN_GETSCALE)) == 0)) return (-1); if (buf == NULL || suffix == NULL) return (-1); if (len > 0) buf[0] = '\0'; if (quotient < 0) { sign = -1; quotient = -quotient; baselen += 2; /* sign, digit */ } else { sign = 1; baselen += 1; /* digit */ } if (flags & HN_NOSPACE) sep = ""; else { sep = " "; baselen++; } baselen += strlen(suffix); /* Check if enough room for `x y' + suffix + `\0' */ if (len < baselen + 1) return (-1); if (scale & (HN_AUTOSCALE | HN_GETSCALE)) { /* See if there is additional columns can be used. */ for (max = 1, i = len - baselen; i-- > 0;) max *= 10; /* * Divide the number until it fits the given column. * If there will be an overflow by the rounding below, * divide once more. */ for (i = 0; (quotient >= max || (quotient == max - 1 && remainder >= 950)) && i < maxscale; i++) { remainder = quotient % divisor; quotient /= divisor; } if (scale & HN_GETSCALE) return (i); } else { for (i = 0; i < scale && i < maxscale; i++) { remainder = quotient % divisor; quotient /= divisor; } } /* If a value <= 9.9 after rounding and ... */ if (quotient <= 9 && remainder < 950 && i > 0 && flags & HN_DECIMAL) { /* baselen + \0 + .N */ if (len < baselen + 1 + 2) return (-1); s1 = (int)quotient + ((remainder + 50) / 1000); s2 = ((remainder + 50) / 100) % 10; r = snprintf(buf, len, "%d%s%d%s%s%s", sign * s1, localeconv()->decimal_point, s2, sep, SCALE2PREFIX(i), suffix); } else r = snprintf(buf, len, "%" PRId64 "%s%s%s", sign * (quotient + (remainder + 50) / 1000), sep, SCALE2PREFIX(i), suffix); return (r); } nextepc-0.3.10/lib/ipfw/ipfw2.c000066400000000000000000003431701333553357400161720ustar00rootroot00000000000000/* * Copyright (c) 2002-2003 Luigi Rizzo * Copyright (c) 1996 Alex Nash, Paul Traina, Poul-Henning Kamp * Copyright (c) 1994 Ugen J.S.Antsilevich * * Idea and grammar partially left from: * Copyright (c) 1993 Daniel Boulet * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * Redistribution in binary form may occur without any restrictions. * Obviously, it would be nice if you gave credit where credit is due * but requiring it would be too onerous. * * This software is provided ``AS IS'' without any warranties of any kind. * * NEW command line interface for IP firewall facility * * $FreeBSD: head/sbin/ipfw/ipfw2.c 273253 2014-10-18 15:18:31Z melifaro $ */ #include #include #include #include #include #include "ipfw2.h" #include #include #include #include #include #include #include #include #include #include #include #include /* ctime */ #include /* _long_to_time */ #include #include #include /* offsetof */ #include #include /* only IFNAMSIZ */ #include #include /* only n_short, n_long */ #include #include #include #include #include struct cmdline_opts co; /* global options */ struct format_opts { int bcwidth; int pcwidth; int show_counters; uint32_t set_mask; /* enabled sets mask */ uint32_t flags; /* request flags */ uint32_t first; /* first rule to request */ uint32_t last; /* last rule to request */ uint32_t dcnt; /* number of dynamic states */ ipfw_obj_ctlv *tstate; /* table state data */ }; int resvd_set_number = RESVD_SET; int ipfw_socket = -1; #define CHECK_LENGTH(v, len) do { \ if ((v) < (len)) \ errx(EX_DATAERR, "Rule too long"); \ } while (0) /* * Check if we have enough space in cmd buffer. Note that since * first 8? u32 words are reserved by reserved header, full cmd * buffer can't be used, so we need to protect from buffer overrun * only. At the beginnig, cblen is less than actual buffer size by * size of ipfw_insn_u32 instruction + 1 u32 work. This eliminates need * for checking small instructions fitting in given range. * We also (ab)use the fact that ipfw_insn is always the first field * for any custom instruction. */ #define CHECK_CMDLEN CHECK_LENGTH(cblen, F_LEN((ipfw_insn *)cmd)) #define GET_UINT_ARG(arg, min, max, tok, s_x) do { \ if (!av[0]) \ errx(EX_USAGE, "%s: missing argument", match_value(s_x, tok)); \ if (_substrcmp(*av, "tablearg") == 0) { \ arg = IP_FW_TARG; \ break; \ } \ \ { \ long _xval; \ char *end; \ \ _xval = strtol(*av, &end, 10); \ \ if (!isdigit(**av) || *end != '\0' || (_xval == 0 && errno == EINVAL)) \ errx(EX_DATAERR, "%s: invalid argument: %s", \ match_value(s_x, tok), *av); \ \ if (errno == ERANGE || _xval < min || _xval > max) \ errx(EX_DATAERR, "%s: argument is out of range (%u..%u): %s", \ match_value(s_x, tok), min, max, *av); \ \ if (_xval == IP_FW_TARG) \ errx(EX_DATAERR, "%s: illegal argument value: %s", \ match_value(s_x, tok), *av); \ arg = _xval; \ } \ } while (0) static struct _s_x f_tcpflags[] = { { "syn", TH_SYN }, { "fin", TH_FIN }, { "ack", TH_ACK }, { "psh", TH_PUSH }, { "rst", TH_RST }, { "urg", TH_URG }, { "tcp flag", 0 }, { NULL, 0 } }; static struct _s_x f_tcpopts[] = { { "mss", IP_FW_TCPOPT_MSS }, { "maxseg", IP_FW_TCPOPT_MSS }, { "window", IP_FW_TCPOPT_WINDOW }, { "sack", IP_FW_TCPOPT_SACK }, { "ts", IP_FW_TCPOPT_TS }, { "timestamp", IP_FW_TCPOPT_TS }, { "cc", IP_FW_TCPOPT_CC }, { "tcp option", 0 }, { NULL, 0 } }; /* * IP options span the range 0 to 255 so we need to remap them * (though in fact only the low 5 bits are significant). */ static struct _s_x f_ipopts[] = { { "ssrr", IP_FW_IPOPT_SSRR}, { "lsrr", IP_FW_IPOPT_LSRR}, { "rr", IP_FW_IPOPT_RR}, { "ts", IP_FW_IPOPT_TS}, { "ip option", 0 }, { NULL, 0 } }; static struct _s_x f_iptos[] = { { "lowdelay", IPTOS_LOWDELAY}, { "throughput", IPTOS_THROUGHPUT}, { "reliability", IPTOS_RELIABILITY}, { "mincost", IPTOS_MINCOST}, { "congestion", IPTOS_ECN_CE}, { "ecntransport", IPTOS_ECN_ECT0}, { "ip tos option", 0}, { NULL, 0 } }; struct _s_x f_ipdscp[] = { { "af11", IPTOS_DSCP_AF11 >> 2 }, /* 001010 */ { "af12", IPTOS_DSCP_AF12 >> 2 }, /* 001100 */ { "af13", IPTOS_DSCP_AF13 >> 2 }, /* 001110 */ { "af21", IPTOS_DSCP_AF21 >> 2 }, /* 010010 */ { "af22", IPTOS_DSCP_AF22 >> 2 }, /* 010100 */ { "af23", IPTOS_DSCP_AF23 >> 2 }, /* 010110 */ { "af31", IPTOS_DSCP_AF31 >> 2 }, /* 011010 */ { "af32", IPTOS_DSCP_AF32 >> 2 }, /* 011100 */ { "af33", IPTOS_DSCP_AF33 >> 2 }, /* 011110 */ { "af41", IPTOS_DSCP_AF41 >> 2 }, /* 100010 */ { "af42", IPTOS_DSCP_AF42 >> 2 }, /* 100100 */ { "af43", IPTOS_DSCP_AF43 >> 2 }, /* 100110 */ { "be", IPTOS_DSCP_CS0 >> 2 }, /* 000000 */ { "ef", IPTOS_DSCP_EF >> 2 }, /* 101110 */ { "cs0", IPTOS_DSCP_CS0 >> 2 }, /* 000000 */ { "cs1", IPTOS_DSCP_CS1 >> 2 }, /* 001000 */ { "cs2", IPTOS_DSCP_CS2 >> 2 }, /* 010000 */ { "cs3", IPTOS_DSCP_CS3 >> 2 }, /* 011000 */ { "cs4", IPTOS_DSCP_CS4 >> 2 }, /* 100000 */ { "cs5", IPTOS_DSCP_CS5 >> 2 }, /* 101000 */ { "cs6", IPTOS_DSCP_CS6 >> 2 }, /* 110000 */ { "cs7", IPTOS_DSCP_CS7 >> 2 }, /* 100000 */ { NULL, 0 } }; static struct _s_x limit_masks[] = { {"all", DYN_SRC_ADDR|DYN_SRC_PORT|DYN_DST_ADDR|DYN_DST_PORT}, {"src-addr", DYN_SRC_ADDR}, {"src-port", DYN_SRC_PORT}, {"dst-addr", DYN_DST_ADDR}, {"dst-port", DYN_DST_PORT}, {NULL, 0} }; /* * we use IPPROTO_ETHERTYPE as a fake protocol id to call the print routines * This is only used in this code. */ #define IPPROTO_ETHERTYPE 0x1000 static struct _s_x ether_types[] = { /* * Note, we cannot use "-:&/" in the names because they are field * separators in the type specifications. Also, we use s = NULL as * end-delimiter, because a type of 0 can be legal. */ { "ip", 0x0800 }, { "ipv4", 0x0800 }, { "ipv6", 0x86dd }, { "arp", 0x0806 }, { "rarp", 0x8035 }, { "vlan", 0x8100 }, { "loop", 0x9000 }, { "trail", 0x1000 }, { "at", 0x809b }, { "atalk", 0x809b }, { "aarp", 0x80f3 }, { "pppoe_disc", 0x8863 }, { "pppoe_sess", 0x8864 }, { "ipx_8022", 0x00E0 }, { "ipx_8023", 0x0000 }, { "ipx_ii", 0x8137 }, { "ipx_snap", 0x8137 }, { "ipx", 0x8137 }, { "ns", 0x0600 }, { NULL, 0 } }; static struct _s_x rule_actions[] = { { "accept", TOK_ACCEPT }, { "pass", TOK_ACCEPT }, { "allow", TOK_ACCEPT }, { "permit", TOK_ACCEPT }, { "count", TOK_COUNT }, { "pipe", TOK_PIPE }, { "queue", TOK_QUEUE }, { "divert", TOK_DIVERT }, { "tee", TOK_TEE }, { "netgraph", TOK_NETGRAPH }, { "ngtee", TOK_NGTEE }, { "fwd", TOK_FORWARD }, { "forward", TOK_FORWARD }, { "skipto", TOK_SKIPTO }, { "deny", TOK_DENY }, { "drop", TOK_DENY }, { "reject", TOK_REJECT }, { "reset6", TOK_RESET6 }, { "reset", TOK_RESET }, { "unreach6", TOK_UNREACH6 }, { "unreach", TOK_UNREACH }, { "check-state", TOK_CHECKSTATE }, { "//", TOK_COMMENT }, { "nat", TOK_NAT }, { "reass", TOK_REASS }, { "setfib", TOK_SETFIB }, { "setdscp", TOK_SETDSCP }, { "call", TOK_CALL }, { "return", TOK_RETURN }, { NULL, 0 } /* terminator */ }; static struct _s_x rule_action_params[] = { { "altq", TOK_ALTQ }, { "log", TOK_LOG }, { "tag", TOK_TAG }, { "untag", TOK_UNTAG }, { NULL, 0 } /* terminator */ }; /* * The 'lookup' instruction accepts one of the following arguments. * -1 is a terminator for the list. * Arguments are passed as v[1] in O_DST_LOOKUP options. */ static int lookup_key[] = { TOK_DSTIP, TOK_SRCIP, TOK_DSTPORT, TOK_SRCPORT, TOK_UID, TOK_JAIL, TOK_DSCP, -1 }; static struct _s_x rule_options[] = { { "tagged", TOK_TAGGED }, { "uid", TOK_UID }, { "gid", TOK_GID }, { "jail", TOK_JAIL }, { "in", TOK_IN }, { "limit", TOK_LIMIT }, { "keep-state", TOK_KEEPSTATE }, { "bridged", TOK_LAYER2 }, { "layer2", TOK_LAYER2 }, { "out", TOK_OUT }, { "diverted", TOK_DIVERTED }, { "diverted-loopback", TOK_DIVERTEDLOOPBACK }, { "diverted-output", TOK_DIVERTEDOUTPUT }, { "xmit", TOK_XMIT }, { "recv", TOK_RECV }, { "via", TOK_VIA }, { "fragment", TOK_FRAG }, { "frag", TOK_FRAG }, { "fib", TOK_FIB }, { "ipoptions", TOK_IPOPTS }, { "ipopts", TOK_IPOPTS }, { "iplen", TOK_IPLEN }, { "ipid", TOK_IPID }, { "ipprecedence", TOK_IPPRECEDENCE }, { "dscp", TOK_DSCP }, { "iptos", TOK_IPTOS }, { "ipttl", TOK_IPTTL }, { "ipversion", TOK_IPVER }, { "ipver", TOK_IPVER }, { "estab", TOK_ESTAB }, { "established", TOK_ESTAB }, { "setup", TOK_SETUP }, { "sockarg", TOK_SOCKARG }, { "tcpdatalen", TOK_TCPDATALEN }, { "tcpflags", TOK_TCPFLAGS }, { "tcpflgs", TOK_TCPFLAGS }, { "tcpoptions", TOK_TCPOPTS }, { "tcpopts", TOK_TCPOPTS }, { "tcpseq", TOK_TCPSEQ }, { "tcpack", TOK_TCPACK }, { "tcpwin", TOK_TCPWIN }, { "icmptype", TOK_ICMPTYPES }, { "icmptypes", TOK_ICMPTYPES }, { "dst-ip", TOK_DSTIP }, { "src-ip", TOK_SRCIP }, { "dst-port", TOK_DSTPORT }, { "src-port", TOK_SRCPORT }, { "proto", TOK_PROTO }, { "MAC", TOK_MAC }, { "mac", TOK_MAC }, { "mac-type", TOK_MACTYPE }, { "verrevpath", TOK_VERREVPATH }, { "versrcreach", TOK_VERSRCREACH }, { "antispoof", TOK_ANTISPOOF }, { "ipsec", TOK_IPSEC }, { "icmp6type", TOK_ICMP6TYPES }, { "icmp6types", TOK_ICMP6TYPES }, { "ext6hdr", TOK_EXT6HDR}, { "flow-id", TOK_FLOWID}, { "ipv6", TOK_IPV6}, { "ip6", TOK_IPV6}, { "ipv4", TOK_IPV4}, { "ip4", TOK_IPV4}, { "dst-ipv6", TOK_DSTIP6}, { "dst-ip6", TOK_DSTIP6}, { "src-ipv6", TOK_SRCIP6}, { "src-ip6", TOK_SRCIP6}, { "lookup", TOK_LOOKUP}, { "flow", TOK_FLOW}, { "//", TOK_COMMENT }, { "not", TOK_NOT }, /* pseudo option */ { "!", /* escape ? */ TOK_NOT }, /* pseudo option */ { "or", TOK_OR }, /* pseudo option */ { "|", /* escape */ TOK_OR }, /* pseudo option */ { "{", TOK_STARTBRACE }, /* pseudo option */ { "(", TOK_STARTBRACE }, /* pseudo option */ { "}", TOK_ENDBRACE }, /* pseudo option */ { ")", TOK_ENDBRACE }, /* pseudo option */ { NULL, 0 } /* terminator */ }; void bprint_uint_arg(struct buf_pr *bp, const char *str, uint32_t arg); static int ipfw_get_config(struct cmdline_opts *co, struct format_opts *fo, ipfw_cfg_lheader **pcfg, size_t *psize); static int ipfw_show_config(struct cmdline_opts *co, struct format_opts *fo, ipfw_cfg_lheader *cfg, size_t sz, int ac, char **av); static void ipfw_list_tifaces(void); /* * Simple string buffer API. * Used to simplify buffer passing between function and for * transparent overrun handling. */ /* * Allocates new buffer of given size @sz. * * Returns 0 on success. */ int bp_alloc(struct buf_pr *b, size_t size) { memset(b, 0, sizeof(struct buf_pr)); if ((b->buf = calloc(1, size)) == NULL) return (ENOMEM); b->ptr = b->buf; b->size = size; b->avail = b->size; return (0); } void bp_free(struct buf_pr *b) { free(b->buf); } /* * Flushes buffer so new writer start from beginning. */ void bp_flush(struct buf_pr *b) { b->ptr = b->buf; b->avail = b->size; } /* * Print message specified by @format and args. * Automatically manage buffer space and transparently handle * buffer overruns. * * Returns number of bytes that should have been printed. */ int bprintf(struct buf_pr *b, char *format, ...) { va_list args; int i; va_start(args, format); i = vsnprintf(b->ptr, b->avail, format, args); va_end(args); if (i > b->avail || i < 0) { /* Overflow or print error */ b->avail = 0; } else { b->ptr += i; b->avail -= i; } b->needed += i; return (i); } /* * Special values printer for tablearg-aware opcodes. */ void bprint_uint_arg(struct buf_pr *bp, const char *str, uint32_t arg) { if (str != NULL) bprintf(bp, "%s", str); if (arg == IP_FW_TARG) bprintf(bp, "tablearg"); else bprintf(bp, "%u", arg); } /* * Helper routine to print a possibly unaligned uint64_t on * various platform. If width > 0, print the value with * the desired width, followed by a space; * otherwise, return the required width. */ int pr_u64(struct buf_pr *b, uint64_t *pd, int width) { #ifdef TCC #define U64_FMT "I64" #else #define U64_FMT "llu" #endif uint64_t u; unsigned long long d; bcopy (pd, &u, sizeof(u)); d = u; return (width > 0) ? bprintf(b, "%*" U64_FMT " ", width, d) : snprintf(NULL, 0, "%" U64_FMT, d) ; #undef U64_FMT } void * safe_calloc(size_t number, size_t size) { void *ret = calloc(number, size); if (ret == NULL) err(EX_OSERR, "calloc"); return ret; } void * safe_realloc(void *ptr, size_t size) { void *ret = realloc(ptr, size); if (ret == NULL) err(EX_OSERR, "realloc"); return ret; } /* * Compare things like interface or table names. */ int stringnum_cmp(const char *a, const char *b) { int la, lb; la = strlen(a); lb = strlen(b); if (la > lb) return (1); else if (la < lb) return (-01); return (strcmp(a, b)); } /* * conditionally runs the command. * Selected options or negative -> getsockopt */ int do_cmd(int optname, void *optval, uintptr_t optlen) { int i; if (co.test_only) return 0; if (ipfw_socket == -1) ipfw_socket = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); if (ipfw_socket < 0) err(EX_UNAVAILABLE, "socket"); if (optname == IP_FW_GET || optname == IP_DUMMYNET_GET || optname == IP_FW_ADD || optname == IP_FW3 || optname == IP_FW_NAT_GET_CONFIG || optname < 0 || optname == IP_FW_NAT_GET_LOG) { if (optname < 0) optname = -optname; i = getsockopt(ipfw_socket, IPPROTO_IP, optname, optval, (socklen_t *)optlen); } else { i = setsockopt(ipfw_socket, IPPROTO_IP, optname, optval, optlen); } return i; } /* * do_set3 - pass ipfw control cmd to kernel * @optname: option name * @optval: pointer to option data * @optlen: option length * * Assumes op3 header is already embedded. * Calls setsockopt() with IP_FW3 as kernel-visible opcode. * Returns 0 on success or errno otherwise. */ int do_set3(int optname, ip_fw3_opheader *op3, uintptr_t optlen) { if (co.test_only) return (0); if (ipfw_socket == -1) ipfw_socket = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); if (ipfw_socket < 0) err(EX_UNAVAILABLE, "socket"); op3->opcode = optname; return (setsockopt(ipfw_socket, IPPROTO_IP, IP_FW3, op3, optlen)); } /* * do_get3 - pass ipfw control cmd to kernel * @optname: option name * @optval: pointer to option data * @optlen: pointer to option length * * Assumes op3 header is already embedded. * Calls getsockopt() with IP_FW3 as kernel-visible opcode. * Returns 0 on success or errno otherwise. */ int do_get3(int optname, ip_fw3_opheader *op3, size_t *optlen) { int error; if (co.test_only) return (0); if (ipfw_socket == -1) ipfw_socket = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); if (ipfw_socket < 0) err(EX_UNAVAILABLE, "socket"); op3->opcode = optname; error = getsockopt(ipfw_socket, IPPROTO_IP, IP_FW3, op3, (socklen_t *)optlen); return (error); } /** * match_token takes a table and a string, returns the value associated * with the string (-1 in case of failure). */ int match_token(struct _s_x *table, char *string) { struct _s_x *pt; uint i = strlen(string); for (pt = table ; i && pt->s != NULL ; pt++) if (strlen(pt->s) == i && !bcmp(string, pt->s, i)) return pt->x; return (-1); } /** * match_token takes a table and a string, returns the value associated * with the string for the best match. * * Returns: * value from @table for matched records * -1 for non-matched records * -2 if more than one records match @string. */ int match_token_relaxed(struct _s_x *table, char *string) { struct _s_x *pt, *m = NULL; int i, c; i = strlen(string); c = 0; for (pt = table ; i != 0 && pt->s != NULL ; pt++) { if (strncmp(pt->s, string, i) != 0) continue; m = pt; c++; } if (c == 1) return (m->x); return (c > 0 ? -2: -1); } /** * match_value takes a table and a value, returns the string associated * with the value (NULL in case of failure). */ char const * match_value(struct _s_x *p, int value) { for (; p->s != NULL; p++) if (p->x == value) return p->s; return NULL; } size_t concat_tokens(char *buf, size_t bufsize, struct _s_x *table, char *delimiter) { struct _s_x *pt; int l; size_t sz; for (sz = 0, pt = table ; pt->s != NULL; pt++) { l = snprintf(buf + sz, bufsize - sz, "%s%s", (sz == 0) ? "" : delimiter, pt->s); sz += l; bufsize += l; if (sz > bufsize) return (bufsize); } return (sz); } /* * helper function to process a set of flags and set bits in the * appropriate masks. */ int fill_flags(struct _s_x *flags, char *p, char **e, uint32_t *set, uint32_t *clear) { char *q; /* points to the separator */ int val; uint32_t *which; /* mask we are working on */ while (p && *p) { if (*p == '!') { p++; which = clear; } else which = set; q = strchr(p, ','); if (q) *q++ = '\0'; val = match_token(flags, p); if (val <= 0) { if (e != NULL) *e = p; return (-1); } *which |= (uint32_t)val; p = q; } return (0); } void print_flags_buffer(char *buf, size_t sz, struct _s_x *list, uint32_t set) { char const *comma = ""; int i, l; for (i = 0; list[i].x != 0; i++) { if ((set & list[i].x) == 0) continue; set &= ~list[i].x; l = snprintf(buf, sz, "%s%s", comma, list[i].s); if (l >= sz) return; comma = ","; buf += l; sz -=l; } } /* * _substrcmp takes two strings and returns 1 if they do not match, * and 0 if they match exactly or the first string is a sub-string * of the second. A warning is printed to stderr in the case that the * first string is a sub-string of the second. * * This function will be removed in the future through the usual * deprecation process. */ int _substrcmp(const char *str1, const char* str2) { if (strncmp(str1, str2, strlen(str1)) != 0) return 1; if (strlen(str1) != strlen(str2)) warnx("DEPRECATED: '%s' matched '%s' as a sub-string", str1, str2); return 0; } /* * _substrcmp2 takes three strings and returns 1 if the first two do not match, * and 0 if they match exactly or the second string is a sub-string * of the first. A warning is printed to stderr in the case that the * first string does not match the third. * * This function exists to warn about the bizarre construction * strncmp(str, "by", 2) which is used to allow people to use a shortcut * for "bytes". The problem is that in addition to accepting "by", * "byt", "byte", and "bytes", it also excepts "by_rabid_dogs" and any * other string beginning with "by". * * This function will be removed in the future through the usual * deprecation process. */ int _substrcmp2(const char *str1, const char* str2, const char* str3) { if (strncmp(str1, str2, strlen(str2)) != 0) return 1; if (strcmp(str1, str3) != 0) warnx("DEPRECATED: '%s' matched '%s'", str1, str3); return 0; } /* * prints one port, symbolic or numeric */ static void print_port(struct buf_pr *bp, int proto, uint16_t port) { if (proto == IPPROTO_ETHERTYPE) { char const *s; if (co.do_resolv && (s = match_value(ether_types, port)) ) bprintf(bp, "%s", s); else bprintf(bp, "0x%04x", port); } else { struct servent *se = NULL; if (co.do_resolv) { struct protoent *pe = getprotobynumber(proto); se = getservbyport(htons(port), pe ? pe->p_name : NULL); } if (se) bprintf(bp, "%s", se->s_name); else bprintf(bp, "%d", port); } } static struct _s_x _port_name[] = { {"dst-port", O_IP_DSTPORT}, {"src-port", O_IP_SRCPORT}, {"ipid", O_IPID}, {"iplen", O_IPLEN}, {"ipttl", O_IPTTL}, {"mac-type", O_MAC_TYPE}, {"tcpdatalen", O_TCPDATALEN}, {"tcpwin", O_TCPWIN}, {"tagged", O_TAGGED}, {NULL, 0} }; /* * Print the values in a list 16-bit items of the types above. * XXX todo: add support for mask. */ static void print_newports(struct buf_pr *bp, ipfw_insn_u16 *cmd, int proto, int opcode) { uint16_t *p = cmd->ports; int i; char const *sep; if (opcode != 0) { sep = match_value(_port_name, opcode); if (sep == NULL) sep = "???"; bprintf(bp, " %s", sep); } sep = " "; for (i = F_LEN((ipfw_insn *)cmd) - 1; i > 0; i--, p += 2) { bprintf(bp, "%s", sep); print_port(bp, proto, p[0]); if (p[0] != p[1]) { bprintf(bp, "-"); print_port(bp, proto, p[1]); } sep = ","; } } /* * Like strtol, but also translates service names into port numbers * for some protocols. * In particular: * proto == -1 disables the protocol check; * proto == IPPROTO_ETHERTYPE looks up an internal table * proto == matches the values there. * Returns *end == s in case the parameter is not found. */ static int strtoport(char *s, char **end, int base, int proto) { char *p, *buf; char *s1; int i; *end = s; /* default - not found */ if (*s == '\0') return 0; /* not found */ if (isdigit(*s)) return strtol(s, end, base); /* * find separator. '\\' escapes the next char. */ for (s1 = s; *s1 && (isalnum(*s1) || *s1 == '\\') ; s1++) if (*s1 == '\\' && s1[1] != '\0') s1++; buf = safe_calloc(s1 - s + 1, 1); /* * copy into a buffer skipping backslashes */ for (p = s, i = 0; p != s1 ; p++) if (*p != '\\') buf[i++] = *p; buf[i++] = '\0'; if (proto == IPPROTO_ETHERTYPE) { i = match_token(ether_types, buf); free(buf); if (i != -1) { /* found */ *end = s1; return i; } } else { struct protoent *pe = NULL; struct servent *se; if (proto != 0) pe = getprotobynumber(proto); setservent(1); se = getservbyname(buf, pe ? pe->p_name : NULL); free(buf); if (se != NULL) { *end = s1; return ntohs(se->s_port); } } return 0; /* not found */ } /* * Fill the body of the command with the list of port ranges. */ static int fill_newports(ipfw_insn_u16 *cmd, char *av, int proto, int cblen) { uint16_t a, b, *p = cmd->ports; int i = 0; char *s = av; while (*s) { a = strtoport(av, &s, 0, proto); if (s == av) /* empty or invalid argument */ return (0); CHECK_LENGTH(cblen, i + 2); switch (*s) { case '-': /* a range */ av = s + 1; b = strtoport(av, &s, 0, proto); /* Reject expressions like '1-abc' or '1-2-3'. */ if (s == av || (*s != ',' && *s != '\0')) return (0); p[0] = a; p[1] = b; break; case ',': /* comma separated list */ case '\0': p[0] = p[1] = a; break; default: warnx("port list: invalid separator <%c> in <%s>", *s, av); return (0); } i++; p += 2; av = s + 1; } if (i > 0) { if (i + 1 > F_LEN_MASK) errx(EX_DATAERR, "too many ports/ranges\n"); cmd->o.len |= i + 1; /* leave F_NOT and F_OR untouched */ } return (i); } /* * Fill the body of the command with the list of DiffServ codepoints. */ static void fill_dscp(ipfw_insn *cmd, char *av, int cblen) { uint32_t *low, *high; char *s = av, *a; int code; cmd->opcode = O_DSCP; cmd->len |= F_INSN_SIZE(ipfw_insn_u32) + 1; CHECK_CMDLEN; low = (uint32_t *)(cmd + 1); high = low + 1; *low = 0; *high = 0; while (s != NULL) { a = strchr(s, ','); if (a != NULL) *a++ = '\0'; if (isalpha(*s)) { if ((code = match_token(f_ipdscp, s)) == -1) errx(EX_DATAERR, "Unknown DSCP code"); } else { code = strtoul(s, NULL, 10); if (code < 0 || code > 63) errx(EX_DATAERR, "Invalid DSCP value"); } if (code > 32) *high |= 1 << (code - 32); else *low |= 1 << code; s = a; } } static struct _s_x icmpcodes[] = { { "net", ICMP_UNREACH_NET }, { "host", ICMP_UNREACH_HOST }, { "protocol", ICMP_UNREACH_PROTOCOL }, { "port", ICMP_UNREACH_PORT }, { "needfrag", ICMP_UNREACH_NEEDFRAG }, { "srcfail", ICMP_UNREACH_SRCFAIL }, { "net-unknown", ICMP_UNREACH_NET_UNKNOWN }, { "host-unknown", ICMP_UNREACH_HOST_UNKNOWN }, { "isolated", ICMP_UNREACH_ISOLATED }, { "net-prohib", ICMP_UNREACH_NET_PROHIB }, { "host-prohib", ICMP_UNREACH_HOST_PROHIB }, { "tosnet", ICMP_UNREACH_TOSNET }, { "toshost", ICMP_UNREACH_TOSHOST }, { "filter-prohib", ICMP_UNREACH_FILTER_PROHIB }, { "host-precedence", ICMP_UNREACH_HOST_PRECEDENCE }, { "precedence-cutoff", ICMP_UNREACH_PRECEDENCE_CUTOFF }, { NULL, 0 } }; static void fill_reject_code(u_short *codep, char *str) { int val; char *s; val = strtoul(str, &s, 0); if (s == str || *s != '\0' || val >= 0x100) val = match_token(icmpcodes, str); if (val < 0) errx(EX_DATAERR, "unknown ICMP unreachable code ``%s''", str); *codep = val; return; } static void print_reject_code(struct buf_pr *bp, uint16_t code) { char const *s; if ((s = match_value(icmpcodes, code)) != NULL) bprintf(bp, "unreach %s", s); else bprintf(bp, "unreach %u", code); } /* * Returns the number of bits set (from left) in a contiguous bitmask, * or -1 if the mask is not contiguous. * XXX this needs a proper fix. * This effectively works on masks in big-endian (network) format. * when compiled on little endian architectures. * * First bit is bit 7 of the first byte -- note, for MAC addresses, * the first bit on the wire is bit 0 of the first byte. * len is the max length in bits. */ int contigmask(uint8_t *p, int len) { int i, n; for (i=0; iarg1 & 0xff; uint8_t clear = (cmd->arg1 >> 8) & 0xff; if (list == f_tcpflags && set == TH_SYN && clear == TH_ACK) { bprintf(bp, " setup"); return; } bprintf(bp, " %s ", name); for (i=0; list[i].x != 0; i++) { if (set & list[i].x) { set &= ~list[i].x; bprintf(bp, "%s%s", comma, list[i].s); comma = ","; } if (clear & list[i].x) { clear &= ~list[i].x; bprintf(bp, "%s!%s", comma, list[i].s); comma = ","; } } } /* * Print the ip address contained in a command. */ static void print_ip(struct buf_pr *bp, struct format_opts *fo, ipfw_insn_ip *cmd, char const *s) { struct hostent *he = NULL; struct in_addr *ia; uint32_t len = F_LEN((ipfw_insn *)cmd); uint32_t *a = ((ipfw_insn_u32 *)cmd)->d; char *t; if (cmd->o.opcode == O_IP_DST_LOOKUP && len > F_INSN_SIZE(ipfw_insn_u32)) { uint32_t d = a[1]; const char *arg = ""; if (d < sizeof(lookup_key)/sizeof(lookup_key[0])) arg = match_value(rule_options, lookup_key[d]); t = table_search_ctlv(fo->tstate, ((ipfw_insn *)cmd)->arg1); bprintf(bp, "%s lookup %s %s", cmd->o.len & F_NOT ? " not": "", arg, t); return; } bprintf(bp, "%s%s ", cmd->o.len & F_NOT ? " not": "", s); if (cmd->o.opcode == O_IP_SRC_ME || cmd->o.opcode == O_IP_DST_ME) { bprintf(bp, "me"); return; } if (cmd->o.opcode == O_IP_SRC_LOOKUP || cmd->o.opcode == O_IP_DST_LOOKUP) { t = table_search_ctlv(fo->tstate, ((ipfw_insn *)cmd)->arg1); bprintf(bp, "table(%s", t); if (len == F_INSN_SIZE(ipfw_insn_u32)) bprintf(bp, ",%u", *a); bprintf(bp, ")"); return; } if (cmd->o.opcode == O_IP_SRC_SET || cmd->o.opcode == O_IP_DST_SET) { uint32_t x, *map = (uint32_t *)&(cmd->mask); int i, j; char comma = '{'; x = cmd->o.arg1 - 1; x = htonl( ~x ); cmd->addr.s_addr = htonl(cmd->addr.s_addr); bprintf(bp, "%s/%d", inet_ntoa(cmd->addr), contigmask((uint8_t *)&x, 32)); x = cmd->addr.s_addr = htonl(cmd->addr.s_addr); x &= 0xff; /* base */ /* * Print bits and ranges. * Locate first bit set (i), then locate first bit unset (j). * If we have 3+ consecutive bits set, then print them as a * range, otherwise only print the initial bit and rescan. */ for (i=0; i < cmd->o.arg1; i++) if (map[i/32] & (1<<(i & 31))) { for (j=i+1; j < cmd->o.arg1; j++) if (!(map[ j/32] & (1<<(j & 31)))) break; bprintf(bp, "%c%d", comma, i+x); if (j>i+2) { /* range has at least 3 elements */ bprintf(bp, "-%d", j-1+x); i = j-1; } comma = ','; } bprintf(bp, "}"); return; } /* * len == 2 indicates a single IP, whereas lists of 1 or more * addr/mask pairs have len = (2n+1). We convert len to n so we * use that to count the number of entries. */ for (len = len / 2; len > 0; len--, a += 2) { int mb = /* mask length */ (cmd->o.opcode == O_IP_SRC || cmd->o.opcode == O_IP_DST) ? 32 : contigmask((uint8_t *)&(a[1]), 32); if (mb == 32 && co.do_resolv) he = gethostbyaddr((char *)&(a[0]), sizeof(u_long), AF_INET); if (he != NULL) /* resolved to name */ bprintf(bp, "%s", he->h_name); else if (mb == 0) /* any */ bprintf(bp, "any"); else { /* numeric IP followed by some kind of mask */ ia = (struct in_addr *)&a[0]; bprintf(bp, "%s", inet_ntoa(*ia)); if (mb < 0) bprintf(bp, ":%s", inet_ntoa(*ia ) ); else if (mb < 32) bprintf(bp, "/%d", mb); } if (len > 1) bprintf(bp, ","); } } /* * prints a MAC address/mask pair */ static void print_mac(struct buf_pr *bp, uint8_t *addr, uint8_t *mask) { int l = contigmask(mask, 48); if (l == 0) bprintf(bp, " any"); else { bprintf(bp, " %02x:%02x:%02x:%02x:%02x:%02x", addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]); if (l == -1) bprintf(bp, "&%02x:%02x:%02x:%02x:%02x:%02x", mask[0], mask[1], mask[2], mask[3], mask[4], mask[5]); else if (l < 48) bprintf(bp, "/%d", l); } } static void fill_icmptypes(ipfw_insn_u32 *cmd, char *av) { uint8_t type; cmd->d[0] = 0; while (*av) { if (*av == ',') av++; type = strtoul(av, &av, 0); if (*av != ',' && *av != '\0') errx(EX_DATAERR, "invalid ICMP type"); if (type > 31) errx(EX_DATAERR, "ICMP type out of range"); cmd->d[0] |= 1 << type; } cmd->o.opcode = O_ICMPTYPE; cmd->o.len |= F_INSN_SIZE(ipfw_insn_u32); } static void print_icmptypes(struct buf_pr *bp, ipfw_insn_u32 *cmd) { int i; char sep= ' '; bprintf(bp, " icmptypes"); for (i = 0; i < 32; i++) { if ( (cmd->d[0] & (1 << (i))) == 0) continue; bprintf(bp, "%c%d", sep, i); sep = ','; } } static void print_dscp(struct buf_pr *bp, ipfw_insn_u32 *cmd) { int i, c; uint32_t *v; char sep= ' '; const char *code; bprintf(bp, " dscp"); i = 0; c = 0; v = cmd->d; while (i < 64) { if (*v & (1 << i)) { if ((code = match_value(f_ipdscp, i)) != NULL) bprintf(bp, "%c%s", sep, code); else bprintf(bp, "%c%d", sep, i); sep = ','; } if ((++i % 32) == 0) v++; } } /* * show_ipfw() prints the body of an ipfw rule. * Because the standard rule has at least proto src_ip dst_ip, we use * a helper function to produce these entries if not provided explicitly. * The first argument is the list of fields we have, the second is * the list of fields we want to be printed. * * Special cases if we have provided a MAC header: * + if the rule does not contain IP addresses/ports, do not print them; * + if the rule does not contain an IP proto, print "all" instead of "ip"; * * Once we have 'have_options', IP header fields are printed as options. */ #define HAVE_PROTO 0x0001 #define HAVE_SRCIP 0x0002 #define HAVE_DSTIP 0x0004 #define HAVE_PROTO4 0x0008 #define HAVE_PROTO6 0x0010 #define HAVE_IP 0x0100 #define HAVE_OPTIONS 0x8000 static void show_prerequisites(struct buf_pr *bp, int *flags, int want, int cmd) { (void)cmd; /* UNUSED */ if (co.comment_only) return; if ( (*flags & HAVE_IP) == HAVE_IP) *flags |= HAVE_OPTIONS; if ( !(*flags & HAVE_OPTIONS)) { if ( !(*flags & HAVE_PROTO) && (want & HAVE_PROTO)) { if ( (*flags & HAVE_PROTO4)) bprintf(bp, " ip4"); else if ( (*flags & HAVE_PROTO6)) bprintf(bp, " ip6"); else bprintf(bp, " ip"); } if ( !(*flags & HAVE_SRCIP) && (want & HAVE_SRCIP)) bprintf(bp, " from any"); if ( !(*flags & HAVE_DSTIP) && (want & HAVE_DSTIP)) bprintf(bp, " to any"); } *flags |= want; } static void show_static_rule(struct cmdline_opts *co, struct format_opts *fo, struct buf_pr *bp, struct ip_fw_rule *rule, struct ip_fw_bcounter *cntr) { static int twidth = 0; int l; ipfw_insn *cmd, *tagptr = NULL; const char *comment = NULL; /* ptr to comment if we have one */ int proto = 0; /* default */ int flags = 0; /* prerequisites */ ipfw_insn_log *logptr = NULL; /* set if we find an O_LOG */ ipfw_insn_altq *altqptr = NULL; /* set if we find an O_ALTQ */ int or_block = 0; /* we are in an or block */ uint32_t uval; if ((fo->set_mask & (1 << rule->set)) == 0) { /* disabled mask */ if (!co->show_sets) return; else bprintf(bp, "# DISABLED "); } bprintf(bp, "%05u ", rule->rulenum); /* Print counters if enabled */ if (fo->pcwidth > 0 || fo->bcwidth > 0) { pr_u64(bp, &cntr->pcnt, fo->pcwidth); pr_u64(bp, &cntr->bcnt, fo->bcwidth); } if (co->do_time == 2) bprintf(bp, "%10u ", cntr->timestamp); else if (co->do_time == 1) { char timestr[30]; time_t t = (time_t)0; if (twidth == 0) { strcpy(timestr, ctime(&t)); *strchr(timestr, '\n') = '\0'; twidth = strlen(timestr); } if (cntr->timestamp > 0) { t = _long_to_time(cntr->timestamp); strcpy(timestr, ctime(&t)); *strchr(timestr, '\n') = '\0'; bprintf(bp, "%s ", timestr); } else { bprintf(bp, "%*s", twidth, " "); } } if (co->show_sets) bprintf(bp, "set %d ", rule->set); /* * print the optional "match probability" */ if (rule->cmd_len > 0) { cmd = rule->cmd ; if (cmd->opcode == O_PROB) { ipfw_insn_u32 *p = (ipfw_insn_u32 *)cmd; double d = 1.0 * p->d[0]; d = (d / 0x7fffffff); bprintf(bp, "prob %f ", d); } } /* * first print actions */ for (l = rule->cmd_len - rule->act_ofs, cmd = ACTION_PTR(rule); l > 0 ; l -= F_LEN(cmd), cmd += F_LEN(cmd)) { switch(cmd->opcode) { case O_CHECK_STATE: bprintf(bp, "check-state"); /* avoid printing anything else */ flags = HAVE_PROTO | HAVE_SRCIP | HAVE_DSTIP | HAVE_IP; break; case O_ACCEPT: bprintf(bp, "allow"); break; case O_COUNT: bprintf(bp, "count"); break; case O_DENY: bprintf(bp, "deny"); break; case O_REJECT: if (cmd->arg1 == ICMP_REJECT_RST) bprintf(bp, "reset"); else if (cmd->arg1 == ICMP_UNREACH_HOST) bprintf(bp, "reject"); else print_reject_code(bp, cmd->arg1); break; case O_UNREACH6: if (cmd->arg1 == ICMP6_UNREACH_RST) bprintf(bp, "reset6"); else print_unreach6_code(cmd->arg1); break; case O_SKIPTO: bprint_uint_arg(bp, "skipto ", cmd->arg1); break; case O_PIPE: bprint_uint_arg(bp, "pipe ", cmd->arg1); break; case O_QUEUE: bprint_uint_arg(bp, "queue ", cmd->arg1); break; case O_DIVERT: bprint_uint_arg(bp, "divert ", cmd->arg1); break; case O_TEE: bprint_uint_arg(bp, "tee ", cmd->arg1); break; case O_NETGRAPH: bprint_uint_arg(bp, "netgraph ", cmd->arg1); break; case O_NGTEE: bprint_uint_arg(bp, "ngtee ", cmd->arg1); break; case O_FORWARD_IP: { ipfw_insn_sa *s = (ipfw_insn_sa *)cmd; if (s->sa.sin_addr.s_addr == INADDR_ANY) { bprintf(bp, "fwd tablearg"); } else { bprintf(bp, "fwd %s",inet_ntoa(s->sa.sin_addr)); } if (s->sa.sin_port) bprintf(bp, ",%d", s->sa.sin_port); } break; case O_FORWARD_IP6: { char buf[4 + INET6_ADDRSTRLEN + 1]; ipfw_insn_sa6 *s = (ipfw_insn_sa6 *)cmd; bprintf(bp, "fwd %s", inet_ntop(AF_INET6, &s->sa.sin6_addr, buf, sizeof(buf))); if (s->sa.sin6_port) bprintf(bp, ",%d", s->sa.sin6_port); } break; case O_LOG: /* O_LOG is printed last */ logptr = (ipfw_insn_log *)cmd; break; case O_ALTQ: /* O_ALTQ is printed after O_LOG */ altqptr = (ipfw_insn_altq *)cmd; break; case O_TAG: tagptr = cmd; break; case O_NAT: if (cmd->arg1 != 0) bprint_uint_arg(bp, "nat ", cmd->arg1); else bprintf(bp, "nat global"); break; case O_SETFIB: bprint_uint_arg(bp, "setfib ", cmd->arg1 & 0x7FFF); break; case O_SETDSCP: { const char *code; if (cmd->arg1 == IP_FW_TARG) { bprint_uint_arg(bp, "setdscp ", cmd->arg1); break; } uval = cmd->arg1 & 0x3F; if ((code = match_value(f_ipdscp, uval)) != NULL) bprintf(bp, "setdscp %s", code); else bprint_uint_arg(bp, "setdscp ", uval); } break; case O_REASS: bprintf(bp, "reass"); break; case O_CALLRETURN: if (cmd->len & F_NOT) bprintf(bp, "return"); else bprint_uint_arg(bp, "call ", cmd->arg1); break; default: bprintf(bp, "** unrecognized action %d len %d ", cmd->opcode, cmd->len); } } if (logptr) { if (logptr->max_log > 0) bprintf(bp, " log logamount %d", logptr->max_log); else bprintf(bp, " log"); } #ifndef NO_ALTQ if (altqptr) { print_altq_cmd(bp, altqptr); } #endif if (tagptr) { if (tagptr->len & F_NOT) bprint_uint_arg(bp, " untag ", tagptr->arg1); else bprint_uint_arg(bp, " tag ", tagptr->arg1); } /* * then print the body. */ for (l = rule->act_ofs, cmd = rule->cmd; l > 0 ; l -= F_LEN(cmd) , cmd += F_LEN(cmd)) { if ((cmd->len & F_OR) || (cmd->len & F_NOT)) continue; if (cmd->opcode == O_IP4) { flags |= HAVE_PROTO4; break; } else if (cmd->opcode == O_IP6) { flags |= HAVE_PROTO6; break; } } if (rule->flags & IPFW_RULE_NOOPT) { /* empty rules before options */ if (!co->do_compact) { show_prerequisites(bp, &flags, HAVE_PROTO, 0); bprintf(bp, " from any to any"); } flags |= HAVE_IP | HAVE_OPTIONS | HAVE_PROTO | HAVE_SRCIP | HAVE_DSTIP; } if (co->comment_only) comment = "..."; for (l = rule->act_ofs, cmd = rule->cmd; l > 0 ; l -= F_LEN(cmd) , cmd += F_LEN(cmd)) { /* useful alias */ ipfw_insn_u32 *cmd32 = (ipfw_insn_u32 *)cmd; if (co->comment_only) { if (cmd->opcode != O_NOP) continue; bprintf(bp, " // %s\n", (char *)(cmd + 1)); return; } show_prerequisites(bp, &flags, 0, cmd->opcode); switch(cmd->opcode) { case O_PROB: break; /* done already */ case O_PROBE_STATE: break; /* no need to print anything here */ case O_IP_SRC: case O_IP_SRC_LOOKUP: case O_IP_SRC_MASK: case O_IP_SRC_ME: case O_IP_SRC_SET: show_prerequisites(bp, &flags, HAVE_PROTO, 0); if (!(flags & HAVE_SRCIP)) bprintf(bp, " from"); if ((cmd->len & F_OR) && !or_block) bprintf(bp, " {"); print_ip(bp, fo, (ipfw_insn_ip *)cmd, (flags & HAVE_OPTIONS) ? " src-ip" : ""); flags |= HAVE_SRCIP; break; case O_IP_DST: case O_IP_DST_LOOKUP: case O_IP_DST_MASK: case O_IP_DST_ME: case O_IP_DST_SET: show_prerequisites(bp, &flags, HAVE_PROTO|HAVE_SRCIP, 0); if (!(flags & HAVE_DSTIP)) bprintf(bp, " to"); if ((cmd->len & F_OR) && !or_block) bprintf(bp, " {"); print_ip(bp, fo, (ipfw_insn_ip *)cmd, (flags & HAVE_OPTIONS) ? " dst-ip" : ""); flags |= HAVE_DSTIP; break; case O_IP6_SRC: case O_IP6_SRC_MASK: case O_IP6_SRC_ME: show_prerequisites(bp, &flags, HAVE_PROTO, 0); if (!(flags & HAVE_SRCIP)) bprintf(bp, " from"); if ((cmd->len & F_OR) && !or_block) bprintf(bp, " {"); print_ip6(bp, (ipfw_insn_ip6 *)cmd, (flags & HAVE_OPTIONS) ? " src-ip6" : ""); flags |= HAVE_SRCIP | HAVE_PROTO; break; case O_IP6_DST: case O_IP6_DST_MASK: case O_IP6_DST_ME: show_prerequisites(bp, &flags, HAVE_PROTO|HAVE_SRCIP, 0); if (!(flags & HAVE_DSTIP)) bprintf(bp, " to"); if ((cmd->len & F_OR) && !or_block) bprintf(bp, " {"); print_ip6(bp, (ipfw_insn_ip6 *)cmd, (flags & HAVE_OPTIONS) ? " dst-ip6" : ""); flags |= HAVE_DSTIP; break; case O_FLOW6ID: print_flow6id(bp, (ipfw_insn_u32 *) cmd ); flags |= HAVE_OPTIONS; break; case O_IP_DSTPORT: show_prerequisites(bp, &flags, HAVE_PROTO | HAVE_SRCIP | HAVE_DSTIP | HAVE_IP, 0); case O_IP_SRCPORT: if (flags & HAVE_DSTIP) flags |= HAVE_IP; show_prerequisites(bp, &flags, HAVE_PROTO | HAVE_SRCIP, 0); if ((cmd->len & F_OR) && !or_block) bprintf(bp, " {"); if (cmd->len & F_NOT) bprintf(bp, " not"); print_newports(bp, (ipfw_insn_u16 *)cmd, proto, (flags & HAVE_OPTIONS) ? cmd->opcode : 0); break; case O_PROTO: { struct protoent *pe = NULL; if ((cmd->len & F_OR) && !or_block) bprintf(bp, " {"); if (cmd->len & F_NOT) bprintf(bp, " not"); proto = cmd->arg1; pe = getprotobynumber(cmd->arg1); if ((flags & (HAVE_PROTO4 | HAVE_PROTO6)) && !(flags & HAVE_PROTO)) show_prerequisites(bp, &flags, HAVE_PROTO | HAVE_IP | HAVE_SRCIP | HAVE_DSTIP | HAVE_OPTIONS, 0); if (flags & HAVE_OPTIONS) bprintf(bp, " proto"); if (pe) bprintf(bp, " %s", pe->p_name); else bprintf(bp, " %u", cmd->arg1); } flags |= HAVE_PROTO; break; default: /*options ... */ if (!(cmd->len & (F_OR|F_NOT))) if (((cmd->opcode == O_IP6) && (flags & HAVE_PROTO6)) || ((cmd->opcode == O_IP4) && (flags & HAVE_PROTO4))) break; show_prerequisites(bp, &flags, HAVE_PROTO | HAVE_SRCIP | HAVE_DSTIP | HAVE_IP | HAVE_OPTIONS, 0); if ((cmd->len & F_OR) && !or_block) bprintf(bp, " {"); if (cmd->len & F_NOT && cmd->opcode != O_IN) bprintf(bp, " not"); switch(cmd->opcode) { case O_MACADDR2: { ipfw_insn_mac *m = (ipfw_insn_mac *)cmd; bprintf(bp, " MAC"); print_mac(bp, m->addr, m->mask); print_mac(bp, m->addr + 6, m->mask + 6); } break; case O_MAC_TYPE: print_newports(bp, (ipfw_insn_u16 *)cmd, IPPROTO_ETHERTYPE, cmd->opcode); break; case O_FRAG: bprintf(bp, " frag"); break; case O_FIB: bprintf(bp, " fib %u", cmd->arg1 ); break; case O_SOCKARG: bprintf(bp, " sockarg"); break; case O_IN: bprintf(bp, cmd->len & F_NOT ? " out" : " in"); break; case O_DIVERTED: switch (cmd->arg1) { case 3: bprintf(bp, " diverted"); break; case 1: bprintf(bp, " diverted-loopback"); break; case 2: bprintf(bp, " diverted-output"); break; default: bprintf(bp, " diverted-?<%u>", cmd->arg1); break; } break; case O_LAYER2: bprintf(bp, " layer2"); break; case O_XMIT: case O_RECV: case O_VIA: { char const *s, *t; ipfw_insn_if *cmdif = (ipfw_insn_if *)cmd; if (cmd->opcode == O_XMIT) s = "xmit"; else if (cmd->opcode == O_RECV) s = "recv"; else /* if (cmd->opcode == O_VIA) */ s = "via"; if (cmdif->name[0] == '\0') bprintf(bp, " %s %s", s, inet_ntoa(cmdif->p.ip)); else if (cmdif->name[0] == '\1') { /* interface table */ t = table_search_ctlv(fo->tstate, cmdif->p.kidx); bprintf(bp, " %s table(%s)", s, t); } else bprintf(bp, " %s %s", s, cmdif->name); break; } case O_IP_FLOW_LOOKUP: { char *t; t = table_search_ctlv(fo->tstate, cmd->arg1); bprintf(bp, " flow table(%s", t); if (F_LEN(cmd) == F_INSN_SIZE(ipfw_insn_u32)) bprintf(bp, ",%u", ((ipfw_insn_u32 *)cmd)->d[0]); bprintf(bp, ")"); break; } case O_IPID: if (F_LEN(cmd) == 1) bprintf(bp, " ipid %u", cmd->arg1 ); else print_newports(bp, (ipfw_insn_u16 *)cmd, 0, O_IPID); break; case O_IPTTL: if (F_LEN(cmd) == 1) bprintf(bp, " ipttl %u", cmd->arg1 ); else print_newports(bp, (ipfw_insn_u16 *)cmd, 0, O_IPTTL); break; case O_IPVER: bprintf(bp, " ipver %u", cmd->arg1 ); break; case O_IPPRECEDENCE: bprintf(bp, " ipprecedence %u", cmd->arg1 >> 5); break; case O_DSCP: print_dscp(bp, (ipfw_insn_u32 *)cmd); break; case O_IPLEN: if (F_LEN(cmd) == 1) bprintf(bp, " iplen %u", cmd->arg1 ); else print_newports(bp, (ipfw_insn_u16 *)cmd, 0, O_IPLEN); break; case O_IPOPT: print_flags(bp, "ipoptions", cmd, f_ipopts); break; case O_IPTOS: print_flags(bp, "iptos", cmd, f_iptos); break; case O_ICMPTYPE: print_icmptypes(bp, (ipfw_insn_u32 *)cmd); break; case O_ESTAB: bprintf(bp, " established"); break; case O_TCPDATALEN: if (F_LEN(cmd) == 1) bprintf(bp, " tcpdatalen %u", cmd->arg1 ); else print_newports(bp, (ipfw_insn_u16 *)cmd, 0, O_TCPDATALEN); break; case O_TCPFLAGS: print_flags(bp, "tcpflags", cmd, f_tcpflags); break; case O_TCPOPTS: print_flags(bp, "tcpoptions", cmd, f_tcpopts); break; case O_TCPWIN: if (F_LEN(cmd) == 1) bprintf(bp, " tcpwin %u", cmd->arg1); else print_newports(bp, (ipfw_insn_u16 *)cmd, 0, O_TCPWIN); break; case O_TCPACK: bprintf(bp, " tcpack %d", ntohl(cmd32->d[0])); break; case O_TCPSEQ: bprintf(bp, " tcpseq %d", ntohl(cmd32->d[0])); break; case O_UID: { struct passwd *pwd = getpwuid(cmd32->d[0]); if (pwd) bprintf(bp, " uid %s", pwd->pw_name); else bprintf(bp, " uid %u", cmd32->d[0]); } break; case O_GID: { struct group *grp = getgrgid(cmd32->d[0]); if (grp) bprintf(bp, " gid %s", grp->gr_name); else bprintf(bp, " gid %u", cmd32->d[0]); } break; case O_JAIL: bprintf(bp, " jail %d", cmd32->d[0]); break; case O_VERREVPATH: bprintf(bp, " verrevpath"); break; case O_VERSRCREACH: bprintf(bp, " versrcreach"); break; case O_ANTISPOOF: bprintf(bp, " antispoof"); break; case O_IPSEC: bprintf(bp, " ipsec"); break; case O_NOP: comment = (char *)(cmd + 1); break; case O_KEEP_STATE: bprintf(bp, " keep-state"); break; case O_LIMIT: { struct _s_x *p = limit_masks; ipfw_insn_limit *c = (ipfw_insn_limit *)cmd; uint8_t x = c->limit_mask; char const *comma = " "; bprintf(bp, " limit"); for (; p->x != 0 ; p++) if ((x & p->x) == p->x) { x &= ~p->x; bprintf(bp, "%s%s", comma,p->s); comma = ","; } bprint_uint_arg(bp, " ", c->conn_limit); break; } case O_IP6: bprintf(bp, " ip6"); break; case O_IP4: bprintf(bp, " ip4"); break; case O_ICMP6TYPE: print_icmp6types(bp, (ipfw_insn_u32 *)cmd); break; case O_EXT_HDR: print_ext6hdr(bp, (ipfw_insn *)cmd); break; case O_TAGGED: if (F_LEN(cmd) == 1) bprint_uint_arg(bp, " tagged ", cmd->arg1); else print_newports(bp, (ipfw_insn_u16 *)cmd, 0, O_TAGGED); break; default: bprintf(bp, " [opcode %d len %d]", cmd->opcode, cmd->len); } } if (cmd->len & F_OR) { bprintf(bp, " or"); or_block = 1; } else if (or_block) { bprintf(bp, " }"); or_block = 0; } } show_prerequisites(bp, &flags, HAVE_PROTO | HAVE_SRCIP | HAVE_DSTIP | HAVE_IP, 0); if (comment) bprintf(bp, " // %s", comment); bprintf(bp, "\n"); } static void show_dyn_state(struct cmdline_opts *co, struct format_opts *fo, struct buf_pr *bp, ipfw_dyn_rule *d) { struct protoent *pe; struct in_addr a; uint16_t rulenum; char buf[INET6_ADDRSTRLEN]; if (!co->do_expired) { if (!d->expire && !(d->dyn_type == O_LIMIT_PARENT)) return; } bcopy(&d->rule, &rulenum, sizeof(rulenum)); bprintf(bp, "%05d", rulenum); if (fo->pcwidth > 0 || fo->bcwidth > 0) { bprintf(bp, " "); pr_u64(bp, &d->pcnt, fo->pcwidth); pr_u64(bp, &d->bcnt, fo->bcwidth); bprintf(bp, "(%ds)", d->expire); } switch (d->dyn_type) { case O_LIMIT_PARENT: bprintf(bp, " PARENT %d", d->count); break; case O_LIMIT: bprintf(bp, " LIMIT"); break; case O_KEEP_STATE: /* bidir, no mask */ bprintf(bp, " STATE"); break; } if ((pe = getprotobynumber(d->id.proto)) != NULL) bprintf(bp, " %s", pe->p_name); else bprintf(bp, " proto %u", d->id.proto); if (d->id.addr_type == 4) { a.s_addr = htonl(d->id.src_ip); bprintf(bp, " %s %d", inet_ntoa(a), d->id.src_port); a.s_addr = htonl(d->id.dst_ip); bprintf(bp, " <-> %s %d", inet_ntoa(a), d->id.dst_port); } else if (d->id.addr_type == 6) { bprintf(bp, " %s %d", inet_ntop(AF_INET6, &d->id.src_ip6, buf, sizeof(buf)), d->id.src_port); bprintf(bp, " <-> %s %d", inet_ntop(AF_INET6, &d->id.dst_ip6, buf, sizeof(buf)), d->id.dst_port); } else bprintf(bp, " UNKNOWN <-> UNKNOWN\n"); } static int do_range_cmd(int cmd, ipfw_range_tlv *rt) { ipfw_range_header rh; size_t sz; memset(&rh, 0, sizeof(rh)); memcpy(&rh.range, rt, sizeof(*rt)); rh.range.head.length = sizeof(*rt); rh.range.head.type = IPFW_TLV_RANGE; sz = sizeof(rh); if (do_get3(cmd, &rh.opheader, &sz) != 0) return (-1); /* Save number of matched objects */ rt->new_set = rh.range.new_set; return (0); } /* * This one handles all set-related commands * ipfw set { show | enable | disable } * ipfw set swap X Y * ipfw set move X to Y * ipfw set move rule X to Y */ void ipfw_sets_handler(char *av[]) { uint32_t masks[2]; int i; uint8_t cmd, rulenum; ipfw_range_tlv rt; char *msg; size_t size; av++; memset(&rt, 0, sizeof(rt)); if (av[0] == NULL) errx(EX_USAGE, "set needs command"); if (_substrcmp(*av, "show") == 0) { struct format_opts fo; ipfw_cfg_lheader *cfg; memset(&fo, 0, sizeof(fo)); if (ipfw_get_config(&co, &fo, &cfg, &size) != 0) err(EX_OSERR, "requesting config failed"); for (i = 0, msg = "disable"; i < RESVD_SET; i++) if ((cfg->set_mask & (1<set_mask != (uint32_t)-1) ? " enable" : "enable"; for (i = 0; i < RESVD_SET; i++) if ((cfg->set_mask & (1< RESVD_SET) errx(EX_DATAERR, "invalid set number %s\n", av[0]); if (!isdigit(*(av[1])) || rt.new_set > RESVD_SET) errx(EX_DATAERR, "invalid set number %s\n", av[1]); i = do_range_cmd(IP_FW_SET_SWAP, &rt); } else if (_substrcmp(*av, "move") == 0) { av++; if (av[0] && _substrcmp(*av, "rule") == 0) { rt.flags = IPFW_RCFLAG_RANGE; /* move rules to new set */ cmd = IP_FW_XMOVE; av++; } else cmd = IP_FW_SET_MOVE; /* Move set to new one */ if (av[0] == NULL || av[1] == NULL || av[2] == NULL || av[3] != NULL || _substrcmp(av[1], "to") != 0) errx(EX_USAGE, "syntax: set move [rule] X to Y\n"); rulenum = atoi(av[0]); rt.new_set = atoi(av[2]); if (cmd == IP_FW_XMOVE) { rt.start_rule = rulenum; rt.end_rule = rulenum; } else rt.set = rulenum; rt.new_set = atoi(av[2]); if (!isdigit(*(av[0])) || (cmd == 3 && rt.set > RESVD_SET) || (cmd == 2 && rt.start_rule == IPFW_DEFAULT_RULE) ) errx(EX_DATAERR, "invalid source number %s\n", av[0]); if (!isdigit(*(av[2])) || rt.new_set > RESVD_SET) errx(EX_DATAERR, "invalid dest. set %s\n", av[1]); i = do_range_cmd(cmd, &rt); } else if (_substrcmp(*av, "disable") == 0 || _substrcmp(*av, "enable") == 0 ) { int which = _substrcmp(*av, "enable") == 0 ? 1 : 0; av++; masks[0] = masks[1] = 0; while (av[0]) { if (isdigit(**av)) { i = atoi(*av); if (i < 0 || i > RESVD_SET) errx(EX_DATAERR, "invalid set number %d\n", i); masks[which] |= (1<dcnt++; if (fo->show_counters == 0) return; if (co->use_set) { /* skip states from another set */ bcopy((char *)&d->rule + sizeof(uint16_t), &set, sizeof(uint8_t)); if (set != co->use_set - 1) return; } width = pr_u64(NULL, &d->pcnt, 0); if (width > fo->pcwidth) fo->pcwidth = width; width = pr_u64(NULL, &d->bcnt, 0); if (width > fo->bcwidth) fo->bcwidth = width; } static int foreach_state(struct cmdline_opts *co, struct format_opts *fo, caddr_t base, size_t sz, state_cb dyn_bc, void *dyn_arg) { int ttype; state_cb *fptr; void *farg; ipfw_obj_tlv *tlv; ipfw_obj_ctlv *ctlv; fptr = NULL; ttype = 0; while (sz > 0) { ctlv = (ipfw_obj_ctlv *)base; switch (ctlv->head.type) { case IPFW_TLV_DYNSTATE_LIST: base += sizeof(*ctlv); sz -= sizeof(*ctlv); ttype = IPFW_TLV_DYN_ENT; fptr = dyn_bc; farg = dyn_arg; break; default: return (sz); } while (sz > 0) { tlv = (ipfw_obj_tlv *)base; if (tlv->type != ttype) break; fptr(co, fo, farg, tlv + 1); sz -= tlv->length; base += tlv->length; } } return (sz); } static void prepare_format_opts(struct cmdline_opts *co, struct format_opts *fo, ipfw_obj_tlv *rtlv, int rcnt, caddr_t dynbase, size_t dynsz) { int bcwidth, pcwidth, width; int n; struct ip_fw_bcounter *cntr; struct ip_fw_rule *r; bcwidth = 0; pcwidth = 0; if (fo->show_counters != 0) { for (n = 0; n < rcnt; n++, rtlv = (ipfw_obj_tlv *)((caddr_t)rtlv + rtlv->length)) { cntr = (struct ip_fw_bcounter *)(rtlv + 1); r = (struct ip_fw_rule *)((caddr_t)cntr + cntr->size); /* skip rules from another set */ if (co->use_set && r->set != co->use_set - 1) continue; /* packet counter */ width = pr_u64(NULL, &cntr->pcnt, 0); if (width > pcwidth) pcwidth = width; /* byte counter */ width = pr_u64(NULL, &cntr->bcnt, 0); if (width > bcwidth) bcwidth = width; } } fo->bcwidth = bcwidth; fo->pcwidth = pcwidth; fo->dcnt = 0; if (co->do_dynamic && dynsz > 0) foreach_state(co, fo, dynbase, dynsz, prepare_format_dyn, NULL); } static int list_static_range(struct cmdline_opts *co, struct format_opts *fo, struct buf_pr *bp, ipfw_obj_tlv *rtlv, int rcnt) { int n, seen; struct ip_fw_rule *r; struct ip_fw_bcounter *cntr; int c = 0; for (n = seen = 0; n < rcnt; n++, rtlv = (ipfw_obj_tlv *)((caddr_t)rtlv + rtlv->length)) { if (fo->show_counters != 0) { cntr = (struct ip_fw_bcounter *)(rtlv + 1); r = (struct ip_fw_rule *)((caddr_t)cntr + cntr->size); } else { cntr = NULL; r = (struct ip_fw_rule *)(rtlv + 1); } if (r->rulenum > fo->last) break; if (co->use_set && r->set != co->use_set - 1) continue; if (r->rulenum >= fo->first && r->rulenum <= fo->last) { show_static_rule(co, fo, bp, r, cntr); printf("%s", bp->buf); c += rtlv->length; bp_flush(bp); seen++; } } return (seen); } static void list_dyn_state(struct cmdline_opts *co, struct format_opts *fo, void *_arg, void *_state) { uint16_t rulenum; uint8_t set; ipfw_dyn_rule *d; struct buf_pr *bp; d = (ipfw_dyn_rule *)_state; bp = (struct buf_pr *)_arg; bcopy(&d->rule, &rulenum, sizeof(rulenum)); if (rulenum > fo->last) return; if (co->use_set) { bcopy((char *)&d->rule + sizeof(uint16_t), &set, sizeof(uint8_t)); if (set != co->use_set - 1) return; } if (rulenum >= fo->first) { show_dyn_state(co, fo, bp, d); printf("%s\n", bp->buf); bp_flush(bp); } } static int list_dyn_range(struct cmdline_opts *co, struct format_opts *fo, struct buf_pr *bp, caddr_t base, size_t sz) { sz = foreach_state(co, fo, base, sz, list_dyn_state, bp); return (sz); } void ipfw_list(int ac, char *av[], int show_counters) { ipfw_cfg_lheader *cfg; struct format_opts sfo; size_t sz; int error; int lac; char **lav; uint32_t rnum; char *endptr; if (co.test_only) { fprintf(stderr, "Testing only, list disabled\n"); return; } if (co.do_pipe) { dummynet_list(ac, av, show_counters); return; } ac--; av++; memset(&sfo, 0, sizeof(sfo)); /* Determine rule range to request */ if (ac > 0) { for (lac = ac, lav = av; lac != 0; lac--) { rnum = strtoul(*lav++, &endptr, 10); if (sfo.first == 0 || rnum < sfo.first) sfo.first = rnum; if (*endptr == '-') rnum = strtoul(endptr + 1, &endptr, 10); if (sfo.last == 0 || rnum > sfo.last) sfo.last = rnum; } } /* get configuraion from kernel */ cfg = NULL; sfo.show_counters = show_counters; sfo.flags = IPFW_CFG_GET_STATIC; if (co.do_dynamic != 0) sfo.flags |= IPFW_CFG_GET_STATES; if (sfo.show_counters != 0) sfo.flags |= IPFW_CFG_GET_COUNTERS; if (ipfw_get_config(&co, &sfo, &cfg, &sz) != 0) err(EX_OSERR, "retrieving config failed"); error = ipfw_show_config(&co, &sfo, cfg, sz, ac, av); free(cfg); if (error != EX_OK) exit(error); } static int ipfw_show_config(struct cmdline_opts *co, struct format_opts *fo, ipfw_cfg_lheader *cfg, size_t sz, int ac, char *av[]) { caddr_t dynbase; size_t dynsz; int rcnt; int exitval = EX_OK; int lac; char **lav; char *endptr; size_t readsz; struct buf_pr bp; ipfw_obj_ctlv *ctlv, *tstate; ipfw_obj_tlv *rbase; /* * Handle tablenames TLV first, if any */ tstate = NULL; rbase = NULL; dynbase = NULL; dynsz = 0; readsz = sizeof(*cfg); rcnt = 0; fo->set_mask = cfg->set_mask; ctlv = (ipfw_obj_ctlv *)(cfg + 1); if (cfg->flags & IPFW_CFG_GET_STATIC) { /* We've requested static rules */ if (ctlv->head.type == IPFW_TLV_TBLNAME_LIST) { fo->tstate = ctlv; readsz += ctlv->head.length; ctlv = (ipfw_obj_ctlv *)((caddr_t)ctlv + ctlv->head.length); } if (ctlv->head.type == IPFW_TLV_RULE_LIST) { rbase = (ipfw_obj_tlv *)(ctlv + 1); rcnt = ctlv->count; readsz += ctlv->head.length; ctlv = (ipfw_obj_ctlv *)((caddr_t)ctlv + ctlv->head.length); } } if ((cfg->flags & IPFW_CFG_GET_STATES) && (readsz != sz)) { /* We may have some dynamic states */ dynsz = sz - readsz; /* Skip empty header */ if (dynsz != sizeof(ipfw_obj_ctlv)) dynbase = (caddr_t)ctlv; else dynsz = 0; } prepare_format_opts(co, fo, rbase, rcnt, dynbase, dynsz); bp_alloc(&bp, 4096); /* if no rule numbers were specified, list all rules */ if (ac == 0) { fo->first = 0; fo->last = IPFW_DEFAULT_RULE; list_static_range(co, fo, &bp, rbase, rcnt); if (co->do_dynamic && dynsz > 0) { printf("## Dynamic rules (%d %zu):\n", fo->dcnt, dynsz); list_dyn_range(co, fo, &bp, dynbase, dynsz); } bp_free(&bp); return (EX_OK); } /* display specific rules requested on command line */ for (lac = ac, lav = av; lac != 0; lac--) { /* convert command line rule # */ fo->last = fo->first = strtoul(*lav++, &endptr, 10); if (*endptr == '-') fo->last = strtoul(endptr + 1, &endptr, 10); if (*endptr) { exitval = EX_USAGE; warnx("invalid rule number: %s", *(lav - 1)); continue; } if (list_static_range(co, fo, &bp, rbase, rcnt) == 0) { /* give precedence to other error(s) */ if (exitval == EX_OK) exitval = EX_UNAVAILABLE; if (fo->first == fo->last) warnx("rule %u does not exist", fo->first); else warnx("no rules in range %u-%u", fo->first, fo->last); } } if (co->do_dynamic && dynsz > 0) { printf("## Dynamic rules:\n"); for (lac = ac, lav = av; lac != 0; lac--) { fo->last = fo->first = strtoul(*lav++, &endptr, 10); if (*endptr == '-') fo->last = strtoul(endptr+1, &endptr, 10); if (*endptr) /* already warned */ continue; list_dyn_range(co, fo, &bp, dynbase, dynsz); } } bp_free(&bp); return (exitval); } /* * Retrieves current ipfw configuration of given type * and stores its pointer to @pcfg. * * Caller is responsible for freeing @pcfg. * * Returns 0 on success. */ static int ipfw_get_config(struct cmdline_opts *co, struct format_opts *fo, ipfw_cfg_lheader **pcfg, size_t *psize) { ipfw_cfg_lheader *cfg; size_t sz; int i; if (co->test_only != 0) { fprintf(stderr, "Testing only, list disabled\n"); return (0); } /* Start with some data size */ sz = 4096; cfg = NULL; for (i = 0; i < 16; i++) { if (cfg != NULL) free(cfg); if ((cfg = calloc(1, sz)) == NULL) return (ENOMEM); cfg->flags = fo->flags; cfg->start_rule = fo->first; cfg->end_rule = fo->last; if (do_get3(IP_FW_XGET, &cfg->opheader, &sz) != 0) { if (errno != ENOMEM) { free(cfg); return (errno); } /* Buffer size is not enough. Try to increase */ sz = sz * 2; if (sz < cfg->size) sz = cfg->size; continue; } *pcfg = cfg; *psize = sz; return (0); } free(cfg); return (ENOMEM); } static int lookup_host (char *host, struct in_addr *ipaddr) { struct hostent *he; if (!inet_aton(host, ipaddr)) { if ((he = gethostbyname(host)) == NULL) return(-1); *ipaddr = *(struct in_addr *)he->h_addr_list[0]; } return(0); } struct tidx { ipfw_obj_ntlv *idx; uint32_t count; uint32_t size; uint16_t counter; uint8_t set; }; static uint16_t pack_table(struct tidx *tstate, char *name) { int i; ipfw_obj_ntlv *ntlv; if (table_check_name(name) != 0) return (0); for (i = 0; i < tstate->count; i++) { if (strcmp(tstate->idx[i].name, name) != 0) continue; if (tstate->idx[i].set != tstate->set) continue; return (tstate->idx[i].idx); } if (tstate->count + 1 > tstate->size) { tstate->size += 4; tstate->idx = realloc(tstate->idx, tstate->size * sizeof(ipfw_obj_ntlv)); if (tstate->idx == NULL) return (0); } ntlv = &tstate->idx[i]; memset(ntlv, 0, sizeof(ipfw_obj_ntlv)); strlcpy(ntlv->name, name, sizeof(ntlv->name)); ntlv->head.type = IPFW_TLV_TBL_NAME; ntlv->head.length = sizeof(ipfw_obj_ntlv); ntlv->set = tstate->set; ntlv->idx = ++tstate->counter; tstate->count++; return (ntlv->idx); } static void fill_table(ipfw_insn *cmd, char *av, uint8_t opcode, struct tidx *tstate) { uint32_t *d = ((ipfw_insn_u32 *)cmd)->d; uint16_t uidx; char *p; if ((p = strchr(av + 6, ')')) == NULL) errx(EX_DATAERR, "forgotten parenthesis: '%s'", av); *p = '\0'; p = strchr(av + 6, ','); if (p) *p++ = '\0'; if ((uidx = pack_table(tstate, av + 6)) == 0) errx(EX_DATAERR, "Invalid table name: %s", av + 6); cmd->opcode = opcode; cmd->arg1 = uidx; if (p) { cmd->len |= F_INSN_SIZE(ipfw_insn_u32); d[0] = strtoul(p, NULL, 0); } else cmd->len |= F_INSN_SIZE(ipfw_insn); } /* * fills the addr and mask fields in the instruction as appropriate from av. * Update length as appropriate. * The following formats are allowed: * me returns O_IP_*_ME * 1.2.3.4 single IP address * 1.2.3.4:5.6.7.8 address:mask * 1.2.3.4/24 address/mask * 1.2.3.4/26{1,6,5,4,23} set of addresses in a subnet * We can have multiple comma-separated address/mask entries. */ static void fill_ip(ipfw_insn_ip *cmd, char *av, int cblen, struct tidx *tstate) { int len = 0; uint32_t *d = ((ipfw_insn_u32 *)cmd)->d; cmd->o.len &= ~F_LEN_MASK; /* zero len */ if (_substrcmp(av, "any") == 0) return; if (_substrcmp(av, "me") == 0) { cmd->o.len |= F_INSN_SIZE(ipfw_insn); return; } if (strncmp(av, "table(", 6) == 0) { fill_table(&cmd->o, av, O_IP_DST_LOOKUP, tstate); return; } while (av) { /* * After the address we can have '/' or ':' indicating a mask, * ',' indicating another address follows, '{' indicating a * set of addresses of unspecified size. */ char *t = NULL, *p = strpbrk(av, "/:,{"); int masklen; char md, nd = '\0'; CHECK_LENGTH(cblen, F_INSN_SIZE(ipfw_insn) + 2 + len); if (p) { md = *p; *p++ = '\0'; if ((t = strpbrk(p, ",{")) != NULL) { nd = *t; *t = '\0'; } } else md = '\0'; if (lookup_host(av, (struct in_addr *)&d[0]) != 0) errx(EX_NOHOST, "hostname ``%s'' unknown", av); switch (md) { case ':': if (!inet_aton(p, (struct in_addr *)&d[1])) errx(EX_DATAERR, "bad netmask ``%s''", p); break; case '/': masklen = atoi(p); if (masklen == 0) d[1] = htonl(0); /* mask */ else if (masklen > 32) errx(EX_DATAERR, "bad width ``%s''", p); else d[1] = htonl(~0 << (32 - masklen)); break; case '{': /* no mask, assume /24 and put back the '{' */ d[1] = htonl(~0 << (32 - 24)); *(--p) = md; break; case ',': /* single address plus continuation */ *(--p) = md; /* FALLTHROUGH */ case 0: /* initialization value */ default: d[1] = htonl(~0); /* force /32 */ break; } d[0] &= d[1]; /* mask base address with mask */ if (t) *t = nd; /* find next separator */ if (p) p = strpbrk(p, ",{"); if (p && *p == '{') { /* * We have a set of addresses. They are stored as follows: * arg1 is the set size (powers of 2, 2..256) * addr is the base address IN HOST FORMAT * mask.. is an array of arg1 bits (rounded up to * the next multiple of 32) with bits set * for each host in the map. */ uint32_t *map = (uint32_t *)&cmd->mask; int low, high; int i = contigmask((uint8_t *)&(d[1]), 32); if (len > 0) errx(EX_DATAERR, "address set cannot be in a list"); if (i < 24 || i > 31) errx(EX_DATAERR, "invalid set with mask %d\n", i); cmd->o.arg1 = 1<<(32-i); /* map length */ d[0] = ntohl(d[0]); /* base addr in host format */ cmd->o.opcode = O_IP_DST_SET; /* default */ cmd->o.len |= F_INSN_SIZE(ipfw_insn_u32) + (cmd->o.arg1+31)/32; for (i = 0; i < (cmd->o.arg1+31)/32 ; i++) map[i] = 0; /* clear map */ av = p + 1; low = d[0] & 0xff; high = low + cmd->o.arg1 - 1; /* * Here, i stores the previous value when we specify a range * of addresses within a mask, e.g. 45-63. i = -1 means we * have no previous value. */ i = -1; /* previous value in a range */ while (isdigit(*av)) { char *s; int a = strtol(av, &s, 0); if (s == av) { /* no parameter */ if (*av != '}') errx(EX_DATAERR, "set not closed\n"); if (i != -1) errx(EX_DATAERR, "incomplete range %d-", i); break; } if (a < low || a > high) errx(EX_DATAERR, "addr %d out of range [%d-%d]\n", a, low, high); a -= low; if (i == -1) /* no previous in range */ i = a; else { /* check that range is valid */ if (i > a) errx(EX_DATAERR, "invalid range %d-%d", i+low, a+low); if (*s == '-') errx(EX_DATAERR, "double '-' in range"); } for (; i <= a; i++) map[i/32] |= 1<<(i & 31); i = -1; if (*s == '-') i = a; else if (*s == '}') break; av = s+1; } return; } av = p; if (av) /* then *av must be a ',' */ av++; /* Check this entry */ if (d[1] == 0) { /* "any", specified as x.x.x.x/0 */ /* * 'any' turns the entire list into a NOP. * 'not any' never matches, so it is removed from the * list unless it is the only item, in which case we * report an error. */ if (cmd->o.len & F_NOT) { /* "not any" never matches */ if (av == NULL && len == 0) /* only this entry */ errx(EX_DATAERR, "not any never matches"); } /* else do nothing and skip this entry */ return; } /* A single IP can be stored in an optimized format */ if (d[1] == (uint32_t)~0 && av == NULL && len == 0) { cmd->o.len |= F_INSN_SIZE(ipfw_insn_u32); return; } len += 2; /* two words... */ d += 2; } /* end while */ if (len + 1 > F_LEN_MASK) errx(EX_DATAERR, "address list too long"); cmd->o.len |= len+1; } /* n2mask sets n bits of the mask */ void n2mask(struct in6_addr *mask, int n) { static int minimask[9] = { 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff }; u_char *p; memset(mask, 0, sizeof(struct in6_addr)); p = (u_char *) mask; for (; n > 0; p++, n -= 8) { if (n >= 8) *p = 0xff; else *p = minimask[n]; } return; } static void fill_flags_cmd(ipfw_insn *cmd, enum ipfw_opcodes opcode, struct _s_x *flags, char *p) { char *e; uint32_t set = 0, clear = 0; if (fill_flags(flags, p, &e, &set, &clear) != 0) errx(EX_DATAERR, "invalid flag %s", e); cmd->opcode = opcode; cmd->len = (cmd->len & (F_NOT | F_OR)) | 1; cmd->arg1 = (set & 0xff) | ( (clear & 0xff) << 8); } void ipfw_delete(char *av[]) { int i; int exitval = EX_OK; int do_set = 0; ipfw_range_tlv rt; av++; NEED1("missing rule specification"); memset(&rt, 0, sizeof(rt)); if ( *av && _substrcmp(*av, "set") == 0) { /* Do not allow using the following syntax: * ipfw set N delete set M */ if (co.use_set) errx(EX_DATAERR, "invalid syntax"); do_set = 1; /* delete set */ av++; } /* Rule number */ while (*av && isdigit(**av)) { i = atoi(*av); av++; if (co.do_nat) { exitval = do_cmd(IP_FW_NAT_DEL, &i, sizeof i); if (exitval) { exitval = EX_UNAVAILABLE; warn("rule %u not available", i); } } else if (co.do_pipe) { exitval = ipfw_delete_pipe(co.do_pipe, i); } else { if (do_set != 0) { rt.set = i & 31; rt.flags = IPFW_RCFLAG_SET; } else { rt.start_rule = i & 0xffff; rt.end_rule = i & 0xffff; if (rt.start_rule == 0 && rt.end_rule == 0) rt.flags |= IPFW_RCFLAG_ALL; else rt.flags |= IPFW_RCFLAG_RANGE; if (co.use_set != 0) { rt.set = co.use_set - 1; rt.flags |= IPFW_RCFLAG_SET; } } i = do_range_cmd(IP_FW_XDEL, &rt); if (i != 0) { exitval = EX_UNAVAILABLE; warn("rule %u: setsockopt(IP_FW_XDEL)", rt.start_rule); } else if (rt.new_set == 0) { exitval = EX_UNAVAILABLE; if (rt.start_rule != rt.end_rule) warnx("no rules rules in %u-%u range", rt.start_rule, rt.end_rule); else warnx("rule %u not found", rt.start_rule); } } } if (exitval != EX_OK) exit(exitval); } /* * fill the interface structure. We do not check the name as we can * create interfaces dynamically, so checking them at insert time * makes relatively little sense. * Interface names containing '*', '?', or '[' are assumed to be shell * patterns which match interfaces. */ static void fill_iface(ipfw_insn_if *cmd, char *arg, int cblen, struct tidx *tstate) { char *p; uint16_t uidx; cmd->name[0] = '\0'; cmd->o.len |= F_INSN_SIZE(ipfw_insn_if); CHECK_CMDLEN; /* Parse the interface or address */ if (strcmp(arg, "any") == 0) cmd->o.len = 0; /* effectively ignore this command */ else if (strncmp(arg, "table(", 6) == 0) { if ((p = strchr(arg + 6, ')')) == NULL) errx(EX_DATAERR, "forgotten parenthesis: '%s'", arg); *p = '\0'; p = strchr(arg + 6, ','); if (p) *p++ = '\0'; if ((uidx = pack_table(tstate, arg + 6)) == 0) errx(EX_DATAERR, "Invalid table name: %s", arg + 6); cmd->name[0] = '\1'; /* Special value indicating table */ cmd->p.kidx = uidx; } else if (!isdigit(*arg)) { strlcpy(cmd->name, arg, sizeof(cmd->name)); cmd->p.glob = strpbrk(arg, "*?[") != NULL ? 1 : 0; } else if (!inet_aton(arg, &cmd->p.ip)) errx(EX_DATAERR, "bad ip address ``%s''", arg); } static void get_mac_addr_mask(const char *p, uint8_t *addr, uint8_t *mask) { int i; size_t l; char *ap, *ptr, *optr; struct ether_addr *mac; const char *macset = "0123456789abcdefABCDEF:"; if (strcmp(p, "any") == 0) { for (i = 0; i < ETHER_ADDR_LEN; i++) addr[i] = mask[i] = 0; return; } optr = ptr = strdup(p); if ((ap = strsep(&ptr, "&/")) != NULL && *ap != 0) { l = strlen(ap); if (strspn(ap, macset) != l || (mac = ether_aton(ap)) == NULL) errx(EX_DATAERR, "Incorrect MAC address"); bcopy(mac, addr, ETHER_ADDR_LEN); } else errx(EX_DATAERR, "Incorrect MAC address"); if (ptr != NULL) { /* we have mask? */ if (p[ptr - optr - 1] == '/') { /* mask len */ long ml = strtol(ptr, &ap, 10); if (*ap != 0 || ml > ETHER_ADDR_LEN * 8 || ml < 0) errx(EX_DATAERR, "Incorrect mask length"); for (i = 0; ml > 0 && i < ETHER_ADDR_LEN; ml -= 8, i++) mask[i] = (ml >= 8) ? 0xff: (~0) << (8 - ml); } else { /* mask */ l = strlen(ptr); if (strspn(ptr, macset) != l || (mac = ether_aton(ptr)) == NULL) errx(EX_DATAERR, "Incorrect mask"); bcopy(mac, mask, ETHER_ADDR_LEN); } } else { /* default mask: ff:ff:ff:ff:ff:ff */ for (i = 0; i < ETHER_ADDR_LEN; i++) mask[i] = 0xff; } for (i = 0; i < ETHER_ADDR_LEN; i++) addr[i] &= mask[i]; free(optr); } /* * helper function, updates the pointer to cmd with the length * of the current command, and also cleans up the first word of * the new command in case it has been clobbered before. */ static ipfw_insn * next_cmd(ipfw_insn *cmd, int *len) { *len -= F_LEN(cmd); CHECK_LENGTH(*len, 0); cmd += F_LEN(cmd); bzero(cmd, sizeof(*cmd)); return cmd; } /* * Takes arguments and copies them into a comment */ static void fill_comment(ipfw_insn *cmd, char **av, int cblen) { int i, l; char *p = (char *)(cmd + 1); cmd->opcode = O_NOP; cmd->len = (cmd->len & (F_NOT | F_OR)); /* Compute length of comment string. */ for (i = 0, l = 0; av[i] != NULL; i++) l += strlen(av[i]) + 1; if (l == 0) return; if (l > 84) errx(EX_DATAERR, "comment too long (max 80 chars)"); l = 1 + (l+3)/4; cmd->len = (cmd->len & (F_NOT | F_OR)) | l; CHECK_CMDLEN; for (i = 0; av[i] != NULL; i++) { strcpy(p, av[i]); p += strlen(av[i]); *p++ = ' '; } *(--p) = '\0'; } /* * A function to fill simple commands of size 1. * Existing flags are preserved. */ static void fill_cmd(ipfw_insn *cmd, enum ipfw_opcodes opcode, int flags, uint16_t arg) { cmd->opcode = opcode; cmd->len = ((cmd->len | flags) & (F_NOT | F_OR)) | 1; cmd->arg1 = arg; } /* * Fetch and add the MAC address and type, with masks. This generates one or * two microinstructions, and returns the pointer to the last one. */ static ipfw_insn * add_mac(ipfw_insn *cmd, char *av[], int cblen) { ipfw_insn_mac *mac; if ( ( av[0] == NULL ) || ( av[1] == NULL ) ) errx(EX_DATAERR, "MAC dst src"); cmd->opcode = O_MACADDR2; cmd->len = (cmd->len & (F_NOT | F_OR)) | F_INSN_SIZE(ipfw_insn_mac); CHECK_CMDLEN; mac = (ipfw_insn_mac *)cmd; get_mac_addr_mask(av[0], mac->addr, mac->mask); /* dst */ get_mac_addr_mask(av[1], &(mac->addr[ETHER_ADDR_LEN]), &(mac->mask[ETHER_ADDR_LEN])); /* src */ return cmd; } static ipfw_insn * add_mactype(ipfw_insn *cmd, char *av, int cblen) { if (!av) errx(EX_DATAERR, "missing MAC type"); if (strcmp(av, "any") != 0) { /* we have a non-null type */ fill_newports((ipfw_insn_u16 *)cmd, av, IPPROTO_ETHERTYPE, cblen); cmd->opcode = O_MAC_TYPE; return cmd; } else return NULL; } static ipfw_insn * add_proto0(ipfw_insn *cmd, char *av, u_char *protop) { struct protoent *pe; char *ep; int proto; proto = strtol(av, &ep, 10); if (*ep != '\0' || proto <= 0) { if ((pe = getprotobyname(av)) == NULL) return NULL; proto = pe->p_proto; } fill_cmd(cmd, O_PROTO, 0, proto); *protop = proto; return cmd; } static ipfw_insn * add_proto(ipfw_insn *cmd, char *av, u_char *protop) { u_char proto = IPPROTO_IP; if (_substrcmp(av, "all") == 0 || strcmp(av, "ip") == 0) ; /* do not set O_IP4 nor O_IP6 */ else if (strcmp(av, "ip4") == 0) /* explicit "just IPv4" rule */ fill_cmd(cmd, O_IP4, 0, 0); else if (strcmp(av, "ip6") == 0) { /* explicit "just IPv6" rule */ proto = IPPROTO_IPV6; fill_cmd(cmd, O_IP6, 0, 0); } else return add_proto0(cmd, av, protop); *protop = proto; return cmd; } static ipfw_insn * add_proto_compat(ipfw_insn *cmd, char *av, u_char *protop) { u_char proto = IPPROTO_IP; if (_substrcmp(av, "all") == 0 || strcmp(av, "ip") == 0) ; /* do not set O_IP4 nor O_IP6 */ else if (strcmp(av, "ipv4") == 0 || strcmp(av, "ip4") == 0) /* explicit "just IPv4" rule */ fill_cmd(cmd, O_IP4, 0, 0); else if (strcmp(av, "ipv6") == 0 || strcmp(av, "ip6") == 0) { /* explicit "just IPv6" rule */ proto = IPPROTO_IPV6; fill_cmd(cmd, O_IP6, 0, 0); } else return add_proto0(cmd, av, protop); *protop = proto; return cmd; } static ipfw_insn * add_srcip(ipfw_insn *cmd, char *av, int cblen, struct tidx *tstate) { fill_ip((ipfw_insn_ip *)cmd, av, cblen, tstate); if (cmd->opcode == O_IP_DST_SET) /* set */ cmd->opcode = O_IP_SRC_SET; else if (cmd->opcode == O_IP_DST_LOOKUP) /* table */ cmd->opcode = O_IP_SRC_LOOKUP; else if (F_LEN(cmd) == F_INSN_SIZE(ipfw_insn)) /* me */ cmd->opcode = O_IP_SRC_ME; else if (F_LEN(cmd) == F_INSN_SIZE(ipfw_insn_u32)) /* one IP */ cmd->opcode = O_IP_SRC; else /* addr/mask */ cmd->opcode = O_IP_SRC_MASK; return cmd; } static ipfw_insn * add_dstip(ipfw_insn *cmd, char *av, int cblen, struct tidx *tstate) { fill_ip((ipfw_insn_ip *)cmd, av, cblen, tstate); if (cmd->opcode == O_IP_DST_SET) /* set */ ; else if (cmd->opcode == O_IP_DST_LOOKUP) /* table */ ; else if (F_LEN(cmd) == F_INSN_SIZE(ipfw_insn)) /* me */ cmd->opcode = O_IP_DST_ME; else if (F_LEN(cmd) == F_INSN_SIZE(ipfw_insn_u32)) /* one IP */ cmd->opcode = O_IP_DST; else /* addr/mask */ cmd->opcode = O_IP_DST_MASK; return cmd; } static struct _s_x f_reserved_keywords[] = { { "altq", TOK_OR }, { "//", TOK_OR }, { "diverted", TOK_OR }, { "dst-port", TOK_OR }, { "src-port", TOK_OR }, { "established", TOK_OR }, { "keep-state", TOK_OR }, { "frag", TOK_OR }, { "icmptypes", TOK_OR }, { "in", TOK_OR }, { "out", TOK_OR }, { "ip6", TOK_OR }, { "any", TOK_OR }, { "to", TOK_OR }, { "via", TOK_OR }, { "{", TOK_OR }, { NULL, 0 } /* terminator */ }; static ipfw_insn * add_ports(ipfw_insn *cmd, char *av, u_char proto, int opcode, int cblen) { if (match_token(f_reserved_keywords, av) != -1) return (NULL); if (fill_newports((ipfw_insn_u16 *)cmd, av, proto, cblen)) { /* XXX todo: check that we have a protocol with ports */ cmd->opcode = opcode; return cmd; } return NULL; } static ipfw_insn * add_src(ipfw_insn *cmd, char *av, u_char proto, int cblen, struct tidx *tstate) { struct in6_addr a; char *host, *ch, buf[INET6_ADDRSTRLEN]; ipfw_insn *ret = NULL; int len; /* Copy first address in set if needed */ if ((ch = strpbrk(av, "/,")) != NULL) { len = ch - av; strlcpy(buf, av, sizeof(buf)); if (len < sizeof(buf)) buf[len] = '\0'; host = buf; } else host = av; if (proto == IPPROTO_IPV6 || strcmp(av, "me6") == 0 || inet_pton(AF_INET6, host, &a) == 1) ret = add_srcip6(cmd, av, cblen); /* XXX: should check for IPv4, not !IPv6 */ if (ret == NULL && (proto == IPPROTO_IP || strcmp(av, "me") == 0 || inet_pton(AF_INET6, host, &a) != 1)) ret = add_srcip(cmd, av, cblen, tstate); if (ret == NULL && strcmp(av, "any") != 0) ret = cmd; return ret; } static ipfw_insn * add_dst(ipfw_insn *cmd, char *av, u_char proto, int cblen, struct tidx *tstate) { struct in6_addr a; char *host, *ch, buf[INET6_ADDRSTRLEN]; ipfw_insn *ret = NULL; int len; /* Copy first address in set if needed */ if ((ch = strpbrk(av, "/,")) != NULL) { len = ch - av; strlcpy(buf, av, sizeof(buf)); if (len < sizeof(buf)) buf[len] = '\0'; host = buf; } else host = av; if (proto == IPPROTO_IPV6 || strcmp(av, "me6") == 0 || inet_pton(AF_INET6, host, &a) == 1) ret = add_dstip6(cmd, av, cblen); /* XXX: should check for IPv4, not !IPv6 */ if (ret == NULL && (proto == IPPROTO_IP || strcmp(av, "me") == 0 || inet_pton(AF_INET6, host, &a) != 1)) ret = add_dstip(cmd, av, cblen, tstate); if (ret == NULL && strcmp(av, "any") != 0) ret = cmd; return ret; } /* * Parse arguments and assemble the microinstructions which make up a rule. * Rules are added into the 'rulebuf' and then copied in the correct order * into the actual rule. * * The syntax for a rule starts with the action, followed by * optional action parameters, and the various match patterns. * In the assembled microcode, the first opcode must be an O_PROBE_STATE * (generated if the rule includes a keep-state option), then the * various match patterns, log/altq actions, and the actual action. * */ void compile_rule(char *av[], uint32_t *rbuf, int *rbufsize, struct tidx *tstate) { /* * rules are added into the 'rulebuf' and then copied in * the correct order into the actual rule. * Some things that need to go out of order (prob, action etc.) * go into actbuf[]. */ static uint32_t actbuf[255], cmdbuf[255]; int rblen, ablen, cblen; ipfw_insn *src, *dst, *cmd, *action, *prev=NULL; ipfw_insn *first_cmd; /* first match pattern */ struct ip_fw_rule *rule; /* * various flags used to record that we entered some fields. */ ipfw_insn *have_state = NULL; /* check-state or keep-state */ ipfw_insn *have_log = NULL, *have_altq = NULL, *have_tag = NULL; size_t len; int i; int open_par = 0; /* open parenthesis ( */ /* proto is here because it is used to fetch ports */ u_char proto = IPPROTO_IP; /* default protocol */ double match_prob = 1; /* match probability, default is always match */ bzero(actbuf, sizeof(actbuf)); /* actions go here */ bzero(cmdbuf, sizeof(cmdbuf)); bzero(rbuf, *rbufsize); rule = (struct ip_fw_rule *)rbuf; cmd = (ipfw_insn *)cmdbuf; action = (ipfw_insn *)actbuf; rblen = *rbufsize / sizeof(uint32_t); rblen -= sizeof(struct ip_fw_rule) / sizeof(uint32_t); ablen = sizeof(actbuf) / sizeof(actbuf[0]); cblen = sizeof(cmdbuf) / sizeof(cmdbuf[0]); cblen -= F_INSN_SIZE(ipfw_insn_u32) + 1; #define CHECK_RBUFLEN(len) { CHECK_LENGTH(rblen, len); rblen -= len; } #define CHECK_ACTLEN CHECK_LENGTH(ablen, action->len) av++; /* [rule N] -- Rule number optional */ if (av[0] && isdigit(**av)) { rule->rulenum = atoi(*av); av++; } /* [set N] -- set number (0..RESVD_SET), optional */ if (av[0] && av[1] && _substrcmp(*av, "set") == 0) { int set = strtoul(av[1], NULL, 10); if (set < 0 || set > RESVD_SET) errx(EX_DATAERR, "illegal set %s", av[1]); rule->set = set; tstate->set = set; av += 2; } /* [prob D] -- match probability, optional */ if (av[0] && av[1] && _substrcmp(*av, "prob") == 0) { match_prob = strtod(av[1], NULL); if (match_prob <= 0 || match_prob > 1) errx(EX_DATAERR, "illegal match prob. %s", av[1]); av += 2; } /* action -- mandatory */ NEED1("missing action"); i = match_token(rule_actions, *av); av++; action->len = 1; /* default */ CHECK_ACTLEN; switch(i) { case TOK_CHECKSTATE: have_state = action; action->opcode = O_CHECK_STATE; break; case TOK_ACCEPT: action->opcode = O_ACCEPT; break; case TOK_DENY: action->opcode = O_DENY; action->arg1 = 0; break; case TOK_REJECT: action->opcode = O_REJECT; action->arg1 = ICMP_UNREACH_HOST; break; case TOK_RESET: action->opcode = O_REJECT; action->arg1 = ICMP_REJECT_RST; break; case TOK_RESET6: action->opcode = O_UNREACH6; action->arg1 = ICMP6_UNREACH_RST; break; case TOK_UNREACH: action->opcode = O_REJECT; NEED1("missing reject code"); fill_reject_code(&action->arg1, *av); av++; break; case TOK_UNREACH6: action->opcode = O_UNREACH6; NEED1("missing unreach code"); fill_unreach6_code(&action->arg1, *av); av++; break; case TOK_COUNT: action->opcode = O_COUNT; break; case TOK_NAT: action->opcode = O_NAT; action->len = F_INSN_SIZE(ipfw_insn_nat); CHECK_ACTLEN; if (_substrcmp(*av, "global") == 0) { action->arg1 = 0; av++; break; } else goto chkarg; case TOK_QUEUE: action->opcode = O_QUEUE; goto chkarg; case TOK_PIPE: action->opcode = O_PIPE; goto chkarg; case TOK_SKIPTO: action->opcode = O_SKIPTO; goto chkarg; case TOK_NETGRAPH: action->opcode = O_NETGRAPH; goto chkarg; case TOK_NGTEE: action->opcode = O_NGTEE; goto chkarg; case TOK_DIVERT: action->opcode = O_DIVERT; goto chkarg; case TOK_TEE: action->opcode = O_TEE; goto chkarg; case TOK_CALL: action->opcode = O_CALLRETURN; chkarg: if (!av[0]) errx(EX_USAGE, "missing argument for %s", *(av - 1)); if (isdigit(**av)) { action->arg1 = strtoul(*av, NULL, 10); if (action->arg1 <= 0 || action->arg1 >= IP_FW_TABLEARG) errx(EX_DATAERR, "illegal argument for %s", *(av - 1)); } else if (_substrcmp(*av, "tablearg") == 0) { action->arg1 = IP_FW_TARG; } else if (i == TOK_DIVERT || i == TOK_TEE) { struct servent *s; setservent(1); s = getservbyname(av[0], "divert"); if (s != NULL) action->arg1 = ntohs(s->s_port); else errx(EX_DATAERR, "illegal divert/tee port"); } else errx(EX_DATAERR, "illegal argument for %s", *(av - 1)); av++; break; case TOK_FORWARD: { /* * Locate the address-port separator (':' or ','). * Could be one of the following: * hostname:port * IPv4 a.b.c.d,port * IPv4 a.b.c.d:port * IPv6 w:x:y::z,port * The ':' can only be used with hostname and IPv4 address. * XXX-BZ Should we also support [w:x:y::z]:port? */ struct sockaddr_storage result; struct addrinfo *res; char *s, *end; int family; u_short port_number; NEED1("missing forward address[:port]"); /* * locate the address-port separator (':' or ',') */ s = strchr(*av, ','); if (s == NULL) { /* Distinguish between IPv4:port and IPv6 cases. */ s = strchr(*av, ':'); if (s && strchr(s+1, ':')) s = NULL; /* no port */ } port_number = 0; if (s != NULL) { /* Terminate host portion and set s to start of port. */ *(s++) = '\0'; i = strtoport(s, &end, 0 /* base */, 0 /* proto */); if (s == end) errx(EX_DATAERR, "illegal forwarding port ``%s''", s); port_number = (u_short)i; } if (_substrcmp(*av, "tablearg") == 0) { family = PF_INET; ((struct sockaddr_in*)&result)->sin_addr.s_addr = INADDR_ANY; } else { /* * Resolve the host name or address to a family and a * network representation of the address. */ if (getaddrinfo(*av, NULL, NULL, &res)) errx(EX_DATAERR, NULL); /* Just use the first host in the answer. */ family = res->ai_family; memcpy(&result, res->ai_addr, res->ai_addrlen); freeaddrinfo(res); } if (family == PF_INET) { ipfw_insn_sa *p = (ipfw_insn_sa *)action; action->opcode = O_FORWARD_IP; action->len = F_INSN_SIZE(ipfw_insn_sa); CHECK_ACTLEN; /* * In the kernel we assume AF_INET and use only * sin_port and sin_addr. Remember to set sin_len as * the routing code seems to use it too. */ p->sa.sin_len = sizeof(struct sockaddr_in); p->sa.sin_family = AF_INET; p->sa.sin_port = port_number; p->sa.sin_addr.s_addr = ((struct sockaddr_in *)&result)->sin_addr.s_addr; } else if (family == PF_INET6) { ipfw_insn_sa6 *p = (ipfw_insn_sa6 *)action; action->opcode = O_FORWARD_IP6; action->len = F_INSN_SIZE(ipfw_insn_sa6); CHECK_ACTLEN; p->sa.sin6_len = sizeof(struct sockaddr_in6); p->sa.sin6_family = AF_INET6; p->sa.sin6_port = port_number; p->sa.sin6_flowinfo = 0; p->sa.sin6_scope_id = 0; /* No table support for v6 yet. */ bcopy(&((struct sockaddr_in6*)&result)->sin6_addr, &p->sa.sin6_addr, sizeof(p->sa.sin6_addr)); } else { errx(EX_DATAERR, "Invalid address family in forward action"); } av++; break; } case TOK_COMMENT: /* pretend it is a 'count' rule followed by the comment */ action->opcode = O_COUNT; av--; /* go back... */ break; case TOK_SETFIB: { int numfibs; size_t intsize = sizeof(int); action->opcode = O_SETFIB; NEED1("missing fib number"); if (_substrcmp(*av, "tablearg") == 0) { action->arg1 = IP_FW_TARG; } else { action->arg1 = strtoul(*av, NULL, 10); if (sysctlbyname("net.fibs", &numfibs, &intsize, NULL, 0) == -1) errx(EX_DATAERR, "fibs not suported.\n"); if (action->arg1 >= numfibs) /* Temporary */ errx(EX_DATAERR, "fib too large.\n"); /* Add high-order bit to fib to make room for tablearg*/ action->arg1 |= 0x8000; } av++; break; } case TOK_SETDSCP: { int code; action->opcode = O_SETDSCP; NEED1("missing DSCP code"); if (_substrcmp(*av, "tablearg") == 0) { action->arg1 = IP_FW_TARG; } else if (isalpha(*av[0])) { if ((code = match_token(f_ipdscp, *av)) == -1) errx(EX_DATAERR, "Unknown DSCP code"); action->arg1 = code; } else action->arg1 = strtoul(*av, NULL, 10); /* Add high-order bit to DSCP to make room for tablearg */ if (action->arg1 != IP_FW_TARG) action->arg1 |= 0x8000; av++; break; } case TOK_REASS: action->opcode = O_REASS; break; case TOK_RETURN: fill_cmd(action, O_CALLRETURN, F_NOT, 0); break; default: errx(EX_DATAERR, "invalid action %s\n", av[-1]); } action = next_cmd(action, &ablen); /* * [altq queuename] -- altq tag, optional * [log [logamount N]] -- log, optional * * If they exist, it go first in the cmdbuf, but then it is * skipped in the copy section to the end of the buffer. */ while (av[0] != NULL && (i = match_token(rule_action_params, *av)) != -1) { av++; switch (i) { case TOK_LOG: { ipfw_insn_log *c = (ipfw_insn_log *)cmd; int l; if (have_log) errx(EX_DATAERR, "log cannot be specified more than once"); have_log = (ipfw_insn *)c; cmd->len = F_INSN_SIZE(ipfw_insn_log); CHECK_CMDLEN; cmd->opcode = O_LOG; if (av[0] && _substrcmp(*av, "logamount") == 0) { av++; NEED1("logamount requires argument"); l = atoi(*av); if (l < 0) errx(EX_DATAERR, "logamount must be positive"); c->max_log = l; av++; } else { len = sizeof(c->max_log); if (sysctlbyname("net.inet.ip.fw.verbose_limit", &c->max_log, &len, NULL, 0) == -1) { if (co.test_only) { c->max_log = 0; break; } errx(1, "sysctlbyname(\"%s\")", "net.inet.ip.fw.verbose_limit"); } } } break; #ifndef NO_ALTQ case TOK_ALTQ: { ipfw_insn_altq *a = (ipfw_insn_altq *)cmd; NEED1("missing altq queue name"); if (have_altq) errx(EX_DATAERR, "altq cannot be specified more than once"); have_altq = (ipfw_insn *)a; cmd->len = F_INSN_SIZE(ipfw_insn_altq); CHECK_CMDLEN; cmd->opcode = O_ALTQ; a->qid = altq_name_to_qid(*av); av++; } break; #endif case TOK_TAG: case TOK_UNTAG: { uint16_t tag; if (have_tag) errx(EX_USAGE, "tag and untag cannot be " "specified more than once"); GET_UINT_ARG(tag, IPFW_ARG_MIN, IPFW_ARG_MAX, i, rule_action_params); have_tag = cmd; fill_cmd(cmd, O_TAG, (i == TOK_TAG) ? 0: F_NOT, tag); av++; break; } default: abort(); } cmd = next_cmd(cmd, &cblen); } if (have_state) /* must be a check-state, we are done */ goto done; #define OR_START(target) \ if (av[0] && (*av[0] == '(' || *av[0] == '{')) { \ if (open_par) \ errx(EX_USAGE, "nested \"(\" not allowed\n"); \ prev = NULL; \ open_par = 1; \ if ( (av[0])[1] == '\0') { \ av++; \ } else \ (*av)++; \ } \ target: \ #define CLOSE_PAR \ if (open_par) { \ if (av[0] && ( \ strcmp(*av, ")") == 0 || \ strcmp(*av, "}") == 0)) { \ prev = NULL; \ open_par = 0; \ av++; \ } else \ errx(EX_USAGE, "missing \")\"\n"); \ } #define NOT_BLOCK \ if (av[0] && _substrcmp(*av, "not") == 0) { \ if (cmd->len & F_NOT) \ errx(EX_USAGE, "double \"not\" not allowed\n"); \ cmd->len |= F_NOT; \ av++; \ } #define OR_BLOCK(target) \ if (av[0] && _substrcmp(*av, "or") == 0) { \ if (prev == NULL || open_par == 0) \ errx(EX_DATAERR, "invalid OR block"); \ prev->len |= F_OR; \ av++; \ goto target; \ } \ CLOSE_PAR; first_cmd = cmd; #if 0 /* * MAC addresses, optional. * If we have this, we skip the part "proto from src to dst" * and jump straight to the option parsing. */ NOT_BLOCK; NEED1("missing protocol"); if (_substrcmp(*av, "MAC") == 0 || _substrcmp(*av, "mac") == 0) { av++; /* the "MAC" keyword */ add_mac(cmd, av); /* exits in case of errors */ cmd = next_cmd(cmd); av += 2; /* dst-mac and src-mac */ NOT_BLOCK; NEED1("missing mac type"); if (add_mactype(cmd, av[0])) cmd = next_cmd(cmd); av++; /* any or mac-type */ goto read_options; } #endif /* * protocol, mandatory */ OR_START(get_proto); NOT_BLOCK; NEED1("missing protocol"); if (add_proto_compat(cmd, *av, &proto)) { av++; if (F_LEN(cmd) != 0) { prev = cmd; cmd = next_cmd(cmd, &cblen); } } else if (first_cmd != cmd) { errx(EX_DATAERR, "invalid protocol ``%s''", *av); } else goto read_options; OR_BLOCK(get_proto); /* * "from", mandatory */ if ((av[0] == NULL) || _substrcmp(*av, "from") != 0) errx(EX_USAGE, "missing ``from''"); av++; /* * source IP, mandatory */ OR_START(source_ip); NOT_BLOCK; /* optional "not" */ NEED1("missing source address"); if (add_src(cmd, *av, proto, cblen, tstate)) { av++; if (F_LEN(cmd) != 0) { /* ! any */ prev = cmd; cmd = next_cmd(cmd, &cblen); } } else errx(EX_USAGE, "bad source address %s", *av); OR_BLOCK(source_ip); /* * source ports, optional */ NOT_BLOCK; /* optional "not" */ if ( av[0] != NULL ) { if (_substrcmp(*av, "any") == 0 || add_ports(cmd, *av, proto, O_IP_SRCPORT, cblen)) { av++; if (F_LEN(cmd) != 0) cmd = next_cmd(cmd, &cblen); } } /* * "to", mandatory */ if ( (av[0] == NULL) || _substrcmp(*av, "to") != 0 ) errx(EX_USAGE, "missing ``to''"); av++; /* * destination, mandatory */ OR_START(dest_ip); NOT_BLOCK; /* optional "not" */ NEED1("missing dst address"); if (add_dst(cmd, *av, proto, cblen, tstate)) { av++; if (F_LEN(cmd) != 0) { /* ! any */ prev = cmd; cmd = next_cmd(cmd, &cblen); } } else errx( EX_USAGE, "bad destination address %s", *av); OR_BLOCK(dest_ip); /* * dest. ports, optional */ NOT_BLOCK; /* optional "not" */ if (av[0]) { if (_substrcmp(*av, "any") == 0 || add_ports(cmd, *av, proto, O_IP_DSTPORT, cblen)) { av++; if (F_LEN(cmd) != 0) cmd = next_cmd(cmd, &cblen); } } read_options: if (av[0] && first_cmd == cmd) { /* * nothing specified so far, store in the rule to ease * printout later. */ rule->flags |= IPFW_RULE_NOOPT; } prev = NULL; while ( av[0] != NULL ) { char *s; ipfw_insn_u32 *cmd32; /* alias for cmd */ s = *av; cmd32 = (ipfw_insn_u32 *)cmd; if (*s == '!') { /* alternate syntax for NOT */ if (cmd->len & F_NOT) errx(EX_USAGE, "double \"not\" not allowed\n"); cmd->len = F_NOT; s++; } i = match_token(rule_options, s); av++; switch(i) { case TOK_NOT: if (cmd->len & F_NOT) errx(EX_USAGE, "double \"not\" not allowed\n"); cmd->len = F_NOT; break; case TOK_OR: if (open_par == 0 || prev == NULL) errx(EX_USAGE, "invalid \"or\" block\n"); prev->len |= F_OR; break; case TOK_STARTBRACE: if (open_par) errx(EX_USAGE, "+nested \"(\" not allowed\n"); open_par = 1; break; case TOK_ENDBRACE: if (!open_par) errx(EX_USAGE, "+missing \")\"\n"); open_par = 0; prev = NULL; break; case TOK_IN: fill_cmd(cmd, O_IN, 0, 0); break; case TOK_OUT: cmd->len ^= F_NOT; /* toggle F_NOT */ fill_cmd(cmd, O_IN, 0, 0); break; case TOK_DIVERTED: fill_cmd(cmd, O_DIVERTED, 0, 3); break; case TOK_DIVERTEDLOOPBACK: fill_cmd(cmd, O_DIVERTED, 0, 1); break; case TOK_DIVERTEDOUTPUT: fill_cmd(cmd, O_DIVERTED, 0, 2); break; case TOK_FRAG: fill_cmd(cmd, O_FRAG, 0, 0); break; case TOK_LAYER2: fill_cmd(cmd, O_LAYER2, 0, 0); break; case TOK_XMIT: case TOK_RECV: case TOK_VIA: NEED1("recv, xmit, via require interface name" " or address"); fill_iface((ipfw_insn_if *)cmd, av[0], cblen, tstate); av++; if (F_LEN(cmd) == 0) /* not a valid address */ break; if (i == TOK_XMIT) cmd->opcode = O_XMIT; else if (i == TOK_RECV) cmd->opcode = O_RECV; else if (i == TOK_VIA) cmd->opcode = O_VIA; break; case TOK_ICMPTYPES: NEED1("icmptypes requires list of types"); fill_icmptypes((ipfw_insn_u32 *)cmd, *av); av++; break; case TOK_ICMP6TYPES: NEED1("icmptypes requires list of types"); fill_icmp6types((ipfw_insn_icmp6 *)cmd, *av, cblen); av++; break; case TOK_IPTTL: NEED1("ipttl requires TTL"); if (strpbrk(*av, "-,")) { if (!add_ports(cmd, *av, 0, O_IPTTL, cblen)) errx(EX_DATAERR, "invalid ipttl %s", *av); } else fill_cmd(cmd, O_IPTTL, 0, strtoul(*av, NULL, 0)); av++; break; case TOK_IPID: NEED1("ipid requires id"); if (strpbrk(*av, "-,")) { if (!add_ports(cmd, *av, 0, O_IPID, cblen)) errx(EX_DATAERR, "invalid ipid %s", *av); } else fill_cmd(cmd, O_IPID, 0, strtoul(*av, NULL, 0)); av++; break; case TOK_IPLEN: NEED1("iplen requires length"); if (strpbrk(*av, "-,")) { if (!add_ports(cmd, *av, 0, O_IPLEN, cblen)) errx(EX_DATAERR, "invalid ip len %s", *av); } else fill_cmd(cmd, O_IPLEN, 0, strtoul(*av, NULL, 0)); av++; break; case TOK_IPVER: NEED1("ipver requires version"); fill_cmd(cmd, O_IPVER, 0, strtoul(*av, NULL, 0)); av++; break; case TOK_IPPRECEDENCE: NEED1("ipprecedence requires value"); fill_cmd(cmd, O_IPPRECEDENCE, 0, (strtoul(*av, NULL, 0) & 7) << 5); av++; break; case TOK_DSCP: NEED1("missing DSCP code"); fill_dscp(cmd, *av, cblen); av++; break; case TOK_IPOPTS: NEED1("missing argument for ipoptions"); fill_flags_cmd(cmd, O_IPOPT, f_ipopts, *av); av++; break; case TOK_IPTOS: NEED1("missing argument for iptos"); fill_flags_cmd(cmd, O_IPTOS, f_iptos, *av); av++; break; case TOK_UID: NEED1("uid requires argument"); { char *end; uid_t uid; struct passwd *pwd; cmd->opcode = O_UID; uid = strtoul(*av, &end, 0); pwd = (*end == '\0') ? getpwuid(uid) : getpwnam(*av); if (pwd == NULL) errx(EX_DATAERR, "uid \"%s\" nonexistent", *av); cmd32->d[0] = pwd->pw_uid; cmd->len |= F_INSN_SIZE(ipfw_insn_u32); av++; } break; case TOK_GID: NEED1("gid requires argument"); { char *end; gid_t gid; struct group *grp; cmd->opcode = O_GID; gid = strtoul(*av, &end, 0); grp = (*end == '\0') ? getgrgid(gid) : getgrnam(*av); if (grp == NULL) errx(EX_DATAERR, "gid \"%s\" nonexistent", *av); cmd32->d[0] = grp->gr_gid; cmd->len |= F_INSN_SIZE(ipfw_insn_u32); av++; } break; case TOK_JAIL: NEED1("jail requires argument"); { char *end; int jid; cmd->opcode = O_JAIL; jid = (int)strtol(*av, &end, 0); if (jid < 0 || *end != '\0') errx(EX_DATAERR, "jail requires prison ID"); cmd32->d[0] = (uint32_t)jid; cmd->len |= F_INSN_SIZE(ipfw_insn_u32); av++; } break; case TOK_ESTAB: fill_cmd(cmd, O_ESTAB, 0, 0); break; case TOK_SETUP: fill_cmd(cmd, O_TCPFLAGS, 0, (TH_SYN) | ( (TH_ACK) & 0xff) <<8 ); break; case TOK_TCPDATALEN: NEED1("tcpdatalen requires length"); if (strpbrk(*av, "-,")) { if (!add_ports(cmd, *av, 0, O_TCPDATALEN, cblen)) errx(EX_DATAERR, "invalid tcpdata len %s", *av); } else fill_cmd(cmd, O_TCPDATALEN, 0, strtoul(*av, NULL, 0)); av++; break; case TOK_TCPOPTS: NEED1("missing argument for tcpoptions"); fill_flags_cmd(cmd, O_TCPOPTS, f_tcpopts, *av); av++; break; case TOK_TCPSEQ: case TOK_TCPACK: NEED1("tcpseq/tcpack requires argument"); cmd->len = F_INSN_SIZE(ipfw_insn_u32); cmd->opcode = (i == TOK_TCPSEQ) ? O_TCPSEQ : O_TCPACK; cmd32->d[0] = htonl(strtoul(*av, NULL, 0)); av++; break; case TOK_TCPWIN: NEED1("tcpwin requires length"); if (strpbrk(*av, "-,")) { if (!add_ports(cmd, *av, 0, O_TCPWIN, cblen)) errx(EX_DATAERR, "invalid tcpwin len %s", *av); } else fill_cmd(cmd, O_TCPWIN, 0, strtoul(*av, NULL, 0)); av++; break; case TOK_TCPFLAGS: NEED1("missing argument for tcpflags"); cmd->opcode = O_TCPFLAGS; fill_flags_cmd(cmd, O_TCPFLAGS, f_tcpflags, *av); av++; break; case TOK_KEEPSTATE: if (open_par) errx(EX_USAGE, "keep-state cannot be part " "of an or block"); if (have_state) errx(EX_USAGE, "only one of keep-state " "and limit is allowed"); have_state = cmd; fill_cmd(cmd, O_KEEP_STATE, 0, 0); break; case TOK_LIMIT: { ipfw_insn_limit *c = (ipfw_insn_limit *)cmd; int val; if (open_par) errx(EX_USAGE, "limit cannot be part of an or block"); if (have_state) errx(EX_USAGE, "only one of keep-state and " "limit is allowed"); have_state = cmd; cmd->len = F_INSN_SIZE(ipfw_insn_limit); CHECK_CMDLEN; cmd->opcode = O_LIMIT; c->limit_mask = c->conn_limit = 0; while ( av[0] != NULL ) { if ((val = match_token(limit_masks, *av)) <= 0) break; c->limit_mask |= val; av++; } if (c->limit_mask == 0) errx(EX_USAGE, "limit: missing limit mask"); GET_UINT_ARG(c->conn_limit, IPFW_ARG_MIN, IPFW_ARG_MAX, TOK_LIMIT, rule_options); av++; break; } case TOK_PROTO: NEED1("missing protocol"); if (add_proto(cmd, *av, &proto)) { av++; } else errx(EX_DATAERR, "invalid protocol ``%s''", *av); break; case TOK_SRCIP: NEED1("missing source IP"); if (add_srcip(cmd, *av, cblen, tstate)) { av++; } break; case TOK_DSTIP: NEED1("missing destination IP"); if (add_dstip(cmd, *av, cblen, tstate)) { av++; } break; case TOK_SRCIP6: NEED1("missing source IP6"); if (add_srcip6(cmd, *av, cblen)) { av++; } break; case TOK_DSTIP6: NEED1("missing destination IP6"); if (add_dstip6(cmd, *av, cblen)) { av++; } break; case TOK_SRCPORT: NEED1("missing source port"); if (_substrcmp(*av, "any") == 0 || add_ports(cmd, *av, proto, O_IP_SRCPORT, cblen)) { av++; } else errx(EX_DATAERR, "invalid source port %s", *av); break; case TOK_DSTPORT: NEED1("missing destination port"); if (_substrcmp(*av, "any") == 0 || add_ports(cmd, *av, proto, O_IP_DSTPORT, cblen)) { av++; } else errx(EX_DATAERR, "invalid destination port %s", *av); break; case TOK_MAC: if (add_mac(cmd, av, cblen)) av += 2; break; case TOK_MACTYPE: NEED1("missing mac type"); if (!add_mactype(cmd, *av, cblen)) errx(EX_DATAERR, "invalid mac type %s", *av); av++; break; case TOK_VERREVPATH: fill_cmd(cmd, O_VERREVPATH, 0, 0); break; case TOK_VERSRCREACH: fill_cmd(cmd, O_VERSRCREACH, 0, 0); break; case TOK_ANTISPOOF: fill_cmd(cmd, O_ANTISPOOF, 0, 0); break; case TOK_IPSEC: fill_cmd(cmd, O_IPSEC, 0, 0); break; case TOK_IPV6: fill_cmd(cmd, O_IP6, 0, 0); break; case TOK_IPV4: fill_cmd(cmd, O_IP4, 0, 0); break; case TOK_EXT6HDR: fill_ext6hdr( cmd, *av ); av++; break; case TOK_FLOWID: if (proto != IPPROTO_IPV6 ) errx( EX_USAGE, "flow-id filter is active " "only for ipv6 protocol\n"); fill_flow6( (ipfw_insn_u32 *) cmd, *av, cblen); av++; break; case TOK_COMMENT: fill_comment(cmd, av, cblen); av[0]=NULL; break; case TOK_TAGGED: if (av[0] && strpbrk(*av, "-,")) { if (!add_ports(cmd, *av, 0, O_TAGGED, cblen)) errx(EX_DATAERR, "tagged: invalid tag" " list: %s", *av); } else { uint16_t tag; GET_UINT_ARG(tag, IPFW_ARG_MIN, IPFW_ARG_MAX, TOK_TAGGED, rule_options); fill_cmd(cmd, O_TAGGED, 0, tag); } av++; break; case TOK_FIB: NEED1("fib requires fib number"); fill_cmd(cmd, O_FIB, 0, strtoul(*av, NULL, 0)); av++; break; case TOK_SOCKARG: fill_cmd(cmd, O_SOCKARG, 0, 0); break; case TOK_LOOKUP: { ipfw_insn_u32 *c = (ipfw_insn_u32 *)cmd; int j; if (!av[0] || !av[1]) errx(EX_USAGE, "format: lookup argument tablenum"); cmd->opcode = O_IP_DST_LOOKUP; cmd->len |= F_INSN_SIZE(ipfw_insn) + 2; i = match_token(rule_options, *av); for (j = 0; lookup_key[j] >= 0 ; j++) { if (i == lookup_key[j]) break; } if (lookup_key[j] <= 0) errx(EX_USAGE, "format: cannot lookup on %s", *av); __PAST_END(c->d, 1) = j; // i converted to option av++; if ((j = pack_table(tstate, *av)) == 0) errx(EX_DATAERR, "Invalid table name: %s", *av); cmd->arg1 = j; av++; } break; case TOK_FLOW: NEED1("missing table name"); if (strncmp(*av, "table(", 6) != 0) errx(EX_DATAERR, "enclose table name into \"table()\""); fill_table(cmd, *av, O_IP_FLOW_LOOKUP, tstate); av++; break; default: errx(EX_USAGE, "unrecognised option [%d] %s\n", i, s); } if (F_LEN(cmd) > 0) { /* prepare to advance */ prev = cmd; cmd = next_cmd(cmd, &cblen); } } done: /* * Now copy stuff into the rule. * If we have a keep-state option, the first instruction * must be a PROBE_STATE (which is generated here). * If we have a LOG option, it was stored as the first command, * and now must be moved to the top of the action part. */ dst = (ipfw_insn *)rule->cmd; /* * First thing to write into the command stream is the match probability. */ if (match_prob != 1) { /* 1 means always match */ dst->opcode = O_PROB; dst->len = 2; *((int32_t *)(dst+1)) = (int32_t)(match_prob * 0x7fffffff); dst += dst->len; } /* * generate O_PROBE_STATE if necessary */ if (have_state && have_state->opcode != O_CHECK_STATE) { fill_cmd(dst, O_PROBE_STATE, 0, 0); dst = next_cmd(dst, &rblen); } /* copy all commands but O_LOG, O_KEEP_STATE, O_LIMIT, O_ALTQ, O_TAG */ for (src = (ipfw_insn *)cmdbuf; src != cmd; src += i) { i = F_LEN(src); CHECK_RBUFLEN(i); switch (src->opcode) { case O_LOG: case O_KEEP_STATE: case O_LIMIT: case O_ALTQ: case O_TAG: break; default: bcopy(src, dst, i * sizeof(uint32_t)); dst += i; } } /* * put back the have_state command as last opcode */ if (have_state && have_state->opcode != O_CHECK_STATE) { i = F_LEN(have_state); CHECK_RBUFLEN(i); bcopy(have_state, dst, i * sizeof(uint32_t)); dst += i; } /* * start action section */ rule->act_ofs = dst - rule->cmd; /* put back O_LOG, O_ALTQ, O_TAG if necessary */ if (have_log) { i = F_LEN(have_log); CHECK_RBUFLEN(i); bcopy(have_log, dst, i * sizeof(uint32_t)); dst += i; } if (have_altq) { i = F_LEN(have_altq); CHECK_RBUFLEN(i); bcopy(have_altq, dst, i * sizeof(uint32_t)); dst += i; } if (have_tag) { i = F_LEN(have_tag); CHECK_RBUFLEN(i); bcopy(have_tag, dst, i * sizeof(uint32_t)); dst += i; } /* * copy all other actions */ for (src = (ipfw_insn *)actbuf; src != action; src += i) { i = F_LEN(src); CHECK_RBUFLEN(i); bcopy(src, dst, i * sizeof(uint32_t)); dst += i; } rule->cmd_len = (uint32_t *)dst - (uint32_t *)(rule->cmd); *rbufsize = (char *)dst - (char *)rule; } /* * Adds one or more rules to ipfw chain. * Data layout: * Request: * [ * ip_fw3_opheader * [ ipfw_obj_ctlv(IPFW_TLV_TBL_LIST) ipfw_obj_ntlv x N ] (optional *1) * [ ipfw_obj_ctlv(IPFW_TLV_RULE_LIST) [ ip_fw_rule ip_fw_insn ] x N ] (*2) (*3) * ] * Reply: * [ * ip_fw3_opheader * [ ipfw_obj_ctlv(IPFW_TLV_TBL_LIST) ipfw_obj_ntlv x N ] (optional) * [ ipfw_obj_ctlv(IPFW_TLV_RULE_LIST) [ ip_fw_rule ip_fw_insn ] x N ] * ] * * Rules in reply are modified to store their actual ruleset number. * * (*1) TLVs inside IPFW_TLV_TBL_LIST needs to be sorted ascending * accoring to their idx field and there has to be no duplicates. * (*2) Numbered rules inside IPFW_TLV_RULE_LIST needs to be sorted ascending. * (*3) Each ip_fw structure needs to be aligned to u64 boundary. */ void ipfw_add(char *av[]) { uint32_t rulebuf[1024]; int rbufsize, default_off, tlen, rlen; size_t sz; struct tidx ts; struct ip_fw_rule *rule; caddr_t tbuf; ip_fw3_opheader *op3; ipfw_obj_ctlv *ctlv, *tstate; rbufsize = sizeof(rulebuf); memset(rulebuf, 0, rbufsize); memset(&ts, 0, sizeof(ts)); /* Optimize case with no tables */ default_off = sizeof(ipfw_obj_ctlv) + sizeof(ip_fw3_opheader); op3 = (ip_fw3_opheader *)rulebuf; ctlv = (ipfw_obj_ctlv *)(op3 + 1); rule = (struct ip_fw_rule *)(ctlv + 1); rbufsize -= default_off; compile_rule(av, (uint32_t *)rule, &rbufsize, &ts); /* Align rule size to u64 boundary */ rlen = roundup2(rbufsize, sizeof(uint64_t)); tbuf = NULL; sz = 0; tstate = NULL; if (ts.count != 0) { /* Some tables. We have to alloc more data */ tlen = ts.count * sizeof(ipfw_obj_ntlv); sz = default_off + sizeof(ipfw_obj_ctlv) + tlen + rlen; if ((tbuf = calloc(1, sz)) == NULL) err(EX_UNAVAILABLE, "malloc() failed for IP_FW_ADD"); op3 = (ip_fw3_opheader *)tbuf; /* Tables first */ ctlv = (ipfw_obj_ctlv *)(op3 + 1); ctlv->head.type = IPFW_TLV_TBLNAME_LIST; ctlv->head.length = sizeof(ipfw_obj_ctlv) + tlen; ctlv->count = ts.count; ctlv->objsize = sizeof(ipfw_obj_ntlv); memcpy(ctlv + 1, ts.idx, tlen); table_sort_ctlv(ctlv); tstate = ctlv; /* Rule next */ ctlv = (ipfw_obj_ctlv *)((caddr_t)ctlv + ctlv->head.length); ctlv->head.type = IPFW_TLV_RULE_LIST; ctlv->head.length = sizeof(ipfw_obj_ctlv) + rlen; ctlv->count = 1; memcpy(ctlv + 1, rule, rbufsize); } else { /* Simply add header */ sz = rlen + default_off; memset(ctlv, 0, sizeof(*ctlv)); ctlv->head.type = IPFW_TLV_RULE_LIST; ctlv->head.length = sizeof(ipfw_obj_ctlv) + rlen; ctlv->count = 1; } if (do_get3(IP_FW_XADD, op3, &sz) != 0) err(EX_UNAVAILABLE, "getsockopt(%s)", "IP_FW_XADD"); if (!co.do_quiet) { struct format_opts sfo; struct buf_pr bp; memset(&sfo, 0, sizeof(sfo)); sfo.tstate = tstate; sfo.set_mask = (uint32_t)(-1); bp_alloc(&bp, 4096); show_static_rule(&co, &sfo, &bp, rule, NULL); printf("%s", bp.buf); bp_free(&bp); } if (tbuf != NULL) free(tbuf); if (ts.idx != NULL) free(ts.idx); } /* * clear the counters or the log counters. * optname has the following values: * 0 (zero both counters and logging) * 1 (zero logging only) */ void ipfw_zero(int ac, char *av[], int optname) { ipfw_range_tlv rt; uint32_t arg; int failed = EX_OK; char const *errstr; char const *name = optname ? "RESETLOG" : "ZERO"; optname = optname ? IP_FW_XRESETLOG : IP_FW_XZERO; memset(&rt, 0, sizeof(rt)); av++; ac--; if (ac == 0) { /* clear all entries */ rt.flags = IPFW_RCFLAG_ALL; if (do_range_cmd(optname, &rt) < 0) err(EX_UNAVAILABLE, "setsockopt(IP_FW_X%s)", name); if (!co.do_quiet) printf("%s.\n", optname == IP_FW_XZERO ? "Accounting cleared":"Logging counts reset"); return; } while (ac) { /* Rule number */ if (isdigit(**av)) { arg = strtonum(*av, 0, 0xffff, &errstr); if (errstr) errx(EX_DATAERR, "invalid rule number %s\n", *av); rt.start_rule = arg; rt.end_rule = arg; rt.flags |= IPFW_RCFLAG_RANGE; if (co.use_set != 0) { rt.set = co.use_set - 1; rt.flags |= IPFW_RCFLAG_SET; } if (do_range_cmd(optname, &rt) != 0) { warn("rule %u: setsockopt(IP_FW_X%s)", arg, name); failed = EX_UNAVAILABLE; } else if (rt.new_set == 0) { printf("Entry %d not found\n", arg); failed = EX_UNAVAILABLE; } else if (!co.do_quiet) printf("Entry %d %s.\n", arg, optname == IP_FW_XZERO ? "cleared" : "logging count reset"); } else { errx(EX_USAGE, "invalid rule number ``%s''", *av); } av++; ac--; } if (failed != EX_OK) exit(failed); } void ipfw_flush(int force) { ipfw_range_tlv rt; if (!force && !co.do_quiet) { /* need to ask user */ int c; printf("Are you sure? [yn] "); fflush(stdout); do { c = toupper(getc(stdin)); while (c != '\n' && getc(stdin) != '\n') if (feof(stdin)) return; /* and do not flush */ } while (c != 'Y' && c != 'N'); printf("\n"); if (c == 'N') /* user said no */ return; } if (co.do_pipe) { dummynet_flush(); return; } /* `ipfw set N flush` - is the same that `ipfw delete set N` */ memset(&rt, 0, sizeof(rt)); if (co.use_set != 0) { rt.set = co.use_set - 1; rt.flags = IPFW_RCFLAG_SET; } else rt.flags = IPFW_RCFLAG_ALL; if (do_range_cmd(IP_FW_XDEL, &rt) != 0) err(EX_UNAVAILABLE, "setsockopt(IP_FW_XDEL)"); if (!co.do_quiet) printf("Flushed all %s.\n", co.do_pipe ? "pipes" : "rules"); } static struct _s_x intcmds[] = { { "talist", TOK_TALIST }, { "iflist", TOK_IFLIST }, { "vlist", TOK_VLIST }, { NULL, 0 } }; void ipfw_internal_handler(int ac, char *av[]) { int tcmd; ac--; av++; NEED1("internal cmd required"); if ((tcmd = match_token(intcmds, *av)) == -1) errx(EX_USAGE, "invalid internal sub-cmd: %s", *av); switch (tcmd) { case TOK_IFLIST: ipfw_list_tifaces(); break; case TOK_TALIST: ipfw_list_ta(ac, av); break; case TOK_VLIST: ipfw_list_values(ac, av); break; } } static int ipfw_get_tracked_ifaces(ipfw_obj_lheader **polh) { ipfw_obj_lheader req, *olh; size_t sz; memset(&req, 0, sizeof(req)); sz = sizeof(req); if (do_get3(IP_FW_XIFLIST, &req.opheader, &sz) != 0) { if (errno != ENOMEM) return (errno); } sz = req.size; if ((olh = calloc(1, sz)) == NULL) return (ENOMEM); olh->size = sz; if (do_get3(IP_FW_XIFLIST, &olh->opheader, &sz) != 0) { free(olh); return (errno); } *polh = olh; return (0); } static int ifinfo_cmp(const void *a, const void *b) { ipfw_iface_info *ia, *ib; ia = (ipfw_iface_info *)a; ib = (ipfw_iface_info *)b; return (stringnum_cmp(ia->ifname, ib->ifname)); } /* * Retrieves table list from kernel, * optionally sorts it and calls requested function for each table. * Returns 0 on success. */ static void ipfw_list_tifaces() { ipfw_obj_lheader *olh = NULL; ipfw_iface_info *info; int i, error; if ((error = ipfw_get_tracked_ifaces(&olh)) != 0) err(EX_OSERR, "Unable to request ipfw tracked interface list"); qsort(olh + 1, olh->count, olh->objsize, ifinfo_cmp); info = (ipfw_iface_info *)(olh + 1); for (i = 0; i < olh->count; i++) { if (info->flags & IPFW_IFFLAG_RESOLVED) printf("%s ifindex: %d refcount: %u changes: %u\n", info->ifname, info->ifindex, info->refcnt, info->gencnt); else printf("%s ifindex: unresolved refcount: %u changes: %u\n", info->ifname, info->refcnt, info->gencnt); info = (ipfw_iface_info *)((caddr_t)info + olh->objsize); } free(olh); } nextepc-0.3.10/lib/ipfw/ipfw2.h000066400000000000000000000210101333553357400161610ustar00rootroot00000000000000/* * Copyright (c) 2002-2003 Luigi Rizzo * Copyright (c) 1996 Alex Nash, Paul Traina, Poul-Henning Kamp * Copyright (c) 1994 Ugen J.S.Antsilevich * * Idea and grammar partially left from: * Copyright (c) 1993 Daniel Boulet * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * Redistribution in binary form may occur without any restrictions. * Obviously, it would be nice if you gave credit where credit is due * but requiring it would be too onerous. * * This software is provided ``AS IS'' without any warranties of any kind. * * NEW command line interface for IP firewall facility * * $FreeBSD: head/sbin/ipfw/ipfw2.h 272840 2014-10-09 19:32:35Z melifaro $ */ /* * Options that can be set on the command line. * When reading commands from a file, a subset of the options can also * be applied globally by specifying them before the file name. * After that, each line can contain its own option that changes * the global value. * XXX The context is not restored after each line. */ struct cmdline_opts { /* boolean options: */ int do_value_as_ip; /* show table value as IP */ int do_resolv; /* try to resolve all ip to names */ int do_time; /* Show time stamps */ int do_quiet; /* Be quiet in add and flush */ int do_pipe; /* this cmd refers to a pipe/queue/sched */ int do_nat; /* this cmd refers to a nat config */ int do_dynamic; /* display dynamic rules */ int do_expired; /* display expired dynamic rules */ int do_compact; /* show rules in compact mode */ int do_force; /* do not ask for confirmation */ int show_sets; /* display the set each rule belongs to */ int test_only; /* only check syntax */ int comment_only; /* only print action and comment */ int verbose; /* be verbose on some commands */ /* The options below can have multiple values. */ int do_sort; /* field to sort results (0 = no) */ /* valid fields are 1 and above */ int use_set; /* work with specified set number */ /* 0 means all sets, otherwise apply to set use_set - 1 */ }; extern struct cmdline_opts co; /* * _s_x is a structure that stores a string <-> token pairs, used in * various places in the parser. Entries are stored in arrays, * with an entry with s=NULL as terminator. * The search routines are match_token() and match_value(). * Often, an element with x=0 contains an error string. * */ struct _s_x { char const *s; int x; }; extern struct _s_x f_ipdscp[]; enum tokens { TOK_NULL=0, TOK_OR, TOK_NOT, TOK_STARTBRACE, TOK_ENDBRACE, TOK_ACCEPT, TOK_COUNT, TOK_PIPE, TOK_LINK, TOK_QUEUE, TOK_FLOWSET, TOK_SCHED, TOK_DIVERT, TOK_TEE, TOK_NETGRAPH, TOK_NGTEE, TOK_FORWARD, TOK_SKIPTO, TOK_DENY, TOK_REJECT, TOK_RESET, TOK_UNREACH, TOK_CHECKSTATE, TOK_NAT, TOK_REASS, TOK_CALL, TOK_RETURN, TOK_ALTQ, TOK_LOG, TOK_TAG, TOK_UNTAG, TOK_TAGGED, TOK_UID, TOK_GID, TOK_JAIL, TOK_IN, TOK_LIMIT, TOK_KEEPSTATE, TOK_LAYER2, TOK_OUT, TOK_DIVERTED, TOK_DIVERTEDLOOPBACK, TOK_DIVERTEDOUTPUT, TOK_XMIT, TOK_RECV, TOK_VIA, TOK_FRAG, TOK_IPOPTS, TOK_IPLEN, TOK_IPID, TOK_IPPRECEDENCE, TOK_DSCP, TOK_IPTOS, TOK_IPTTL, TOK_IPVER, TOK_ESTAB, TOK_SETUP, TOK_TCPDATALEN, TOK_TCPFLAGS, TOK_TCPOPTS, TOK_TCPSEQ, TOK_TCPACK, TOK_TCPWIN, TOK_ICMPTYPES, TOK_MAC, TOK_MACTYPE, TOK_VERREVPATH, TOK_VERSRCREACH, TOK_ANTISPOOF, TOK_IPSEC, TOK_COMMENT, TOK_PLR, TOK_NOERROR, TOK_BUCKETS, TOK_DSTIP, TOK_SRCIP, TOK_DSTPORT, TOK_SRCPORT, TOK_ALL, TOK_MASK, TOK_FLOW_MASK, TOK_SCHED_MASK, TOK_BW, TOK_DELAY, TOK_PROFILE, TOK_BURST, TOK_RED, TOK_GRED, TOK_ECN, TOK_DROPTAIL, TOK_PROTO, /* dummynet tokens */ TOK_WEIGHT, TOK_LMAX, TOK_PRI, TOK_TYPE, TOK_SLOTSIZE, TOK_IP, TOK_IF, TOK_ALOG, TOK_DENY_INC, TOK_SAME_PORTS, TOK_UNREG_ONLY, TOK_SKIP_GLOBAL, TOK_RESET_ADDR, TOK_ALIAS_REV, TOK_PROXY_ONLY, TOK_REDIR_ADDR, TOK_REDIR_PORT, TOK_REDIR_PROTO, TOK_IPV6, TOK_FLOWID, TOK_ICMP6TYPES, TOK_EXT6HDR, TOK_DSTIP6, TOK_SRCIP6, TOK_IPV4, TOK_UNREACH6, TOK_RESET6, TOK_FIB, TOK_SETFIB, TOK_LOOKUP, TOK_SOCKARG, TOK_SETDSCP, TOK_FLOW, TOK_IFLIST, /* Table tokens */ TOK_CREATE, TOK_DESTROY, TOK_LIST, TOK_INFO, TOK_DETAIL, TOK_MODIFY, TOK_FLUSH, TOK_SWAP, TOK_ADD, TOK_DEL, TOK_VALTYPE, TOK_ALGO, TOK_TALIST, TOK_ATOMIC, TOK_LOCK, TOK_UNLOCK, TOK_VLIST, }; /* * the following macro returns an error message if we run out of * arguments. */ #define NEED(_p, msg) {if (!_p) errx(EX_USAGE, msg);} #define NEED1(msg) {if (!(*av)) errx(EX_USAGE, msg);} struct buf_pr { char *buf; /* allocated buffer */ char *ptr; /* current pointer */ size_t size; /* total buffer size */ size_t avail; /* available storage */ size_t needed; /* length needed */ }; int pr_u64(struct buf_pr *bp, uint64_t *pd, int width); int bp_alloc(struct buf_pr *b, size_t size); void bp_free(struct buf_pr *b); int bprintf(struct buf_pr *b, char *format, ...); /* memory allocation support */ void *safe_calloc(size_t number, size_t size); void *safe_realloc(void *ptr, size_t size); /* string comparison functions used for historical compatibility */ int _substrcmp(const char *str1, const char* str2); int _substrcmp2(const char *str1, const char* str2, const char* str3); int stringnum_cmp(const char *a, const char *b); /* utility functions */ int match_token(struct _s_x *table, char *string); int match_token_relaxed(struct _s_x *table, char *string); char const *match_value(struct _s_x *p, int value); size_t concat_tokens(char *buf, size_t bufsize, struct _s_x *table, char *delimiter); int fill_flags(struct _s_x *flags, char *p, char **e, uint32_t *set, uint32_t *clear); void print_flags_buffer(char *buf, size_t sz, struct _s_x *list, uint32_t set); struct _ip_fw3_opheader; int do_cmd(int optname, void *optval, uintptr_t optlen); int do_set3(int optname, struct _ip_fw3_opheader *op3, uintptr_t optlen); int do_get3(int optname, struct _ip_fw3_opheader *op3, size_t *optlen); struct in6_addr; void n2mask(struct in6_addr *mask, int n); int contigmask(uint8_t *p, int len); /* * Forward declarations to avoid include way too many headers. * C does not allow duplicated typedefs, so we use the base struct * that the typedef points to. * Should the typedefs use a different type, the compiler will * still detect the change when compiling the body of the * functions involved, so we do not lose error checking. */ struct _ipfw_insn; struct _ipfw_insn_altq; struct _ipfw_insn_u32; struct _ipfw_insn_ip6; struct _ipfw_insn_icmp6; /* * The reserved set numer. This is a constant in ip_fw.h * but we store it in a variable so other files do not depend * in that header just for one constant. */ extern int resvd_set_number; /* first-level command handlers */ void ipfw_add(char *av[]); void ipfw_show_nat(int ac, char **av); void ipfw_config_pipe(int ac, char **av); void ipfw_config_nat(int ac, char **av); void ipfw_sets_handler(char *av[]); void ipfw_table_handler(int ac, char *av[]); void ipfw_sysctl_handler(char *av[], int which); void ipfw_delete(char *av[]); void ipfw_flush(int force); void ipfw_zero(int ac, char *av[], int optname); void ipfw_list(int ac, char *av[], int show_counters); void ipfw_internal_handler(int ac, char *av[]); #ifdef PF /* altq.c */ void altq_set_enabled(int enabled); u_int32_t altq_name_to_qid(const char *name); void print_altq_cmd(struct buf_pr *bp, struct _ipfw_insn_altq *altqptr); #else #define NO_ALTQ #endif /* dummynet.c */ void dummynet_list(int ac, char *av[], int show_counters); void dummynet_flush(void); int ipfw_delete_pipe(int pipe_or_queue, int n); /* ipv6.c */ void print_unreach6_code(uint16_t code); void print_ip6(struct buf_pr *bp, struct _ipfw_insn_ip6 *cmd, char const *s); void print_flow6id(struct buf_pr *bp, struct _ipfw_insn_u32 *cmd); void print_icmp6types(struct buf_pr *bp, struct _ipfw_insn_u32 *cmd); void print_ext6hdr(struct buf_pr *bp, struct _ipfw_insn *cmd ); struct _ipfw_insn *add_srcip6(struct _ipfw_insn *cmd, char *av, int cblen); struct _ipfw_insn *add_dstip6(struct _ipfw_insn *cmd, char *av, int cblen); void fill_flow6(struct _ipfw_insn_u32 *cmd, char *av, int cblen); void fill_unreach6_code(u_short *codep, char *str); void fill_icmp6types(struct _ipfw_insn_icmp6 *cmd, char *av, int cblen); int fill_ext6hdr(struct _ipfw_insn *cmd, char *av); /* tables.c */ struct _ipfw_obj_ctlv; char *table_search_ctlv(struct _ipfw_obj_ctlv *ctlv, uint16_t idx); void table_sort_ctlv(struct _ipfw_obj_ctlv *ctlv); int table_check_name(char *tablename); void ipfw_list_ta(int ac, char *av[]); void ipfw_list_values(int ac, char *av[]); nextepc-0.3.10/lib/ipfw/ipv6.c000066400000000000000000000322421333553357400160220ustar00rootroot00000000000000/* * Copyright (c) 2002-2003 Luigi Rizzo * Copyright (c) 1996 Alex Nash, Paul Traina, Poul-Henning Kamp * Copyright (c) 1994 Ugen J.S.Antsilevich * * Idea and grammar partially left from: * Copyright (c) 1993 Daniel Boulet * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * Redistribution in binary form may occur without any restrictions. * Obviously, it would be nice if you gave credit where credit is due * but requiring it would be too onerous. * * This software is provided ``AS IS'' without any warranties of any kind. * * NEW command line interface for IP firewall facility * * $FreeBSD: head/sbin/ipfw/ipv6.c 270424 2014-08-23 17:37:18Z melifaro $ * * ipv6 support */ #include #include #include "ipfw2.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #define CHECK_LENGTH(v, len) do { \ if ((v) < (len)) \ errx(EX_DATAERR, "Rule too long"); \ } while (0) static struct _s_x icmp6codes[] = { { "no-route", ICMP6_DST_UNREACH_NOROUTE }, { "admin-prohib", ICMP6_DST_UNREACH_ADMIN }, { "address", ICMP6_DST_UNREACH_ADDR }, { "port", ICMP6_DST_UNREACH_NOPORT }, { NULL, 0 } }; void fill_unreach6_code(u_short *codep, char *str) { int val; char *s; val = strtoul(str, &s, 0); if (s == str || *s != '\0' || val >= 0x100) val = match_token(icmp6codes, str); if (val < 0) errx(EX_DATAERR, "unknown ICMPv6 unreachable code ``%s''", str); *codep = val; return; } void print_unreach6_code(uint16_t code) { char const *s = match_value(icmp6codes, code); if (s != NULL) printf("unreach6 %s", s); else printf("unreach6 %u", code); } /* * Print the ip address contained in a command. */ void print_ip6(struct buf_pr *bp, ipfw_insn_ip6 *cmd, char const *s) { struct hostent *he = NULL; int len = F_LEN((ipfw_insn *) cmd) - 1; struct in6_addr *a = &(cmd->addr6); char trad[255]; bprintf(bp, "%s%s ", cmd->o.len & F_NOT ? " not": "", s); if (cmd->o.opcode == O_IP6_SRC_ME || cmd->o.opcode == O_IP6_DST_ME) { bprintf(bp, "me6"); return; } if (cmd->o.opcode == O_IP6) { bprintf(bp, " ip6"); return; } /* * len == 4 indicates a single IP, whereas lists of 1 or more * addr/mask pairs have len = (2n+1). We convert len to n so we * use that to count the number of entries. */ for (len = len / 4; len > 0; len -= 2, a += 2) { int mb = /* mask length */ (cmd->o.opcode == O_IP6_SRC || cmd->o.opcode == O_IP6_DST) ? 128 : contigmask((uint8_t *)&(a[1]), 128); if (mb == 128 && co.do_resolv) he = gethostbyaddr((char *)a, sizeof(*a), AF_INET6); if (he != NULL) /* resolved to name */ bprintf(bp, "%s", he->h_name); else if (mb == 0) /* any */ bprintf(bp, "any"); else { /* numeric IP followed by some kind of mask */ if (inet_ntop(AF_INET6, a, trad, sizeof( trad ) ) == NULL) bprintf(bp, "Error ntop in print_ip6\n"); bprintf(bp, "%s", trad ); if (mb < 0) /* XXX not really legal... */ bprintf(bp, ":%s", inet_ntop(AF_INET6, &a[1], trad, sizeof(trad))); else if (mb < 128) bprintf(bp, "/%d", mb); } if (len > 2) bprintf(bp, ","); } } void fill_icmp6types(ipfw_insn_icmp6 *cmd, char *av, int cblen) { uint8_t type; CHECK_LENGTH(cblen, F_INSN_SIZE(ipfw_insn_icmp6)); bzero(cmd, sizeof(*cmd)); while (*av) { if (*av == ',') av++; type = strtoul(av, &av, 0); if (*av != ',' && *av != '\0') errx(EX_DATAERR, "invalid ICMP6 type"); /* * XXX: shouldn't this be 0xFF? I can't see any reason why * we shouldn't be able to filter all possiable values * regardless of the ability of the rest of the kernel to do * anything useful with them. */ if (type > ICMP6_MAXTYPE) errx(EX_DATAERR, "ICMP6 type out of range"); cmd->d[type / 32] |= ( 1 << (type % 32)); } cmd->o.opcode = O_ICMP6TYPE; cmd->o.len |= F_INSN_SIZE(ipfw_insn_icmp6); } void print_icmp6types(struct buf_pr *bp, ipfw_insn_u32 *cmd) { int i, j; char sep= ' '; bprintf(bp, " ip6 icmp6types"); for (i = 0; i < 7; i++) for (j=0; j < 32; ++j) { if ( (cmd->d[i] & (1 << (j))) == 0) continue; bprintf(bp, "%c%d", sep, (i*32 + j)); sep = ','; } } void print_flow6id(struct buf_pr *bp, ipfw_insn_u32 *cmd) { uint16_t i, limit = cmd->o.arg1; char sep = ','; bprintf(bp, " flow-id "); for( i=0; i < limit; ++i) { if (i == limit - 1) sep = ' '; bprintf(bp, "%d%c", cmd->d[i], sep); } } /* structure and define for the extension header in ipv6 */ static struct _s_x ext6hdrcodes[] = { { "frag", EXT_FRAGMENT }, { "hopopt", EXT_HOPOPTS }, { "route", EXT_ROUTING }, { "dstopt", EXT_DSTOPTS }, { "ah", EXT_AH }, { "esp", EXT_ESP }, { "rthdr0", EXT_RTHDR0 }, { "rthdr2", EXT_RTHDR2 }, { NULL, 0 } }; /* fills command for the extension header filtering */ int fill_ext6hdr( ipfw_insn *cmd, char *av) { int tok; char *s = av; cmd->arg1 = 0; while(s) { av = strsep( &s, ",") ; tok = match_token(ext6hdrcodes, av); switch (tok) { case EXT_FRAGMENT: cmd->arg1 |= EXT_FRAGMENT; break; case EXT_HOPOPTS: cmd->arg1 |= EXT_HOPOPTS; break; case EXT_ROUTING: cmd->arg1 |= EXT_ROUTING; break; case EXT_DSTOPTS: cmd->arg1 |= EXT_DSTOPTS; break; case EXT_AH: cmd->arg1 |= EXT_AH; break; case EXT_ESP: cmd->arg1 |= EXT_ESP; break; case EXT_RTHDR0: cmd->arg1 |= EXT_RTHDR0; break; case EXT_RTHDR2: cmd->arg1 |= EXT_RTHDR2; break; default: errx( EX_DATAERR, "invalid option for ipv6 exten header" ); break; } } if (cmd->arg1 == 0 ) return 0; cmd->opcode = O_EXT_HDR; cmd->len |= F_INSN_SIZE( ipfw_insn ); return 1; } void print_ext6hdr(struct buf_pr *bp, ipfw_insn *cmd ) { char sep = ' '; bprintf(bp, " extension header:"); if (cmd->arg1 & EXT_FRAGMENT ) { bprintf(bp, "%cfragmentation", sep); sep = ','; } if (cmd->arg1 & EXT_HOPOPTS ) { bprintf(bp, "%chop options", sep); sep = ','; } if (cmd->arg1 & EXT_ROUTING ) { bprintf(bp, "%crouting options", sep); sep = ','; } if (cmd->arg1 & EXT_RTHDR0 ) { bprintf(bp, "%crthdr0", sep); sep = ','; } if (cmd->arg1 & EXT_RTHDR2 ) { bprintf(bp, "%crthdr2", sep); sep = ','; } if (cmd->arg1 & EXT_DSTOPTS ) { bprintf(bp, "%cdestination options", sep); sep = ','; } if (cmd->arg1 & EXT_AH ) { bprintf(bp, "%cauthentication header", sep); sep = ','; } if (cmd->arg1 & EXT_ESP ) { bprintf(bp, "%cencapsulated security payload", sep); } } /* Try to find ipv6 address by hostname */ static int lookup_host6 (char *host, struct in6_addr *ip6addr) { struct hostent *he; if (!inet_pton(AF_INET6, host, ip6addr)) { if ((he = gethostbyname2(host, AF_INET6)) == NULL) return(-1); memcpy(ip6addr, he->h_addr_list[0], sizeof( struct in6_addr)); } return(0); } /* * fill the addr and mask fields in the instruction as appropriate from av. * Update length as appropriate. * The following formats are allowed: * any matches any IP6. Actually returns an empty instruction. * me returns O_IP6_*_ME * * 03f1::234:123:0342 single IP6 addres * 03f1::234:123:0342/24 address/mask * 03f1::234:123:0342/24,03f1::234:123:0343/ List of address * * Set of address (as in ipv6) not supported because ipv6 address * are typically random past the initial prefix. * Return 1 on success, 0 on failure. */ static int fill_ip6(ipfw_insn_ip6 *cmd, char *av, int cblen) { int len = 0; struct in6_addr *d = &(cmd->addr6); /* * Needed for multiple address. * Note d[1] points to struct in6_add r mask6 of cmd */ cmd->o.len &= ~F_LEN_MASK; /* zero len */ if (strcmp(av, "any") == 0) return (1); if (strcmp(av, "me") == 0) { /* Set the data for "me" opt*/ cmd->o.len |= F_INSN_SIZE(ipfw_insn); return (1); } if (strcmp(av, "me6") == 0) { /* Set the data for "me" opt*/ cmd->o.len |= F_INSN_SIZE(ipfw_insn); return (1); } if (strncmp(av, "table(", 6) == 0) { char *p = strchr(av + 6, ','); uint32_t *dm = ((ipfw_insn_u32 *)cmd)->d; if (p) *p++ = '\0'; cmd->o.opcode = O_IP_DST_LOOKUP; cmd->o.arg1 = strtoul(av + 6, NULL, 0); if (p) { cmd->o.len |= F_INSN_SIZE(ipfw_insn_u32); dm[0] = strtoul(p, NULL, 0); } else cmd->o.len |= F_INSN_SIZE(ipfw_insn); return (1); } av = strdup(av); while (av) { /* * After the address we can have '/' indicating a mask, * or ',' indicating another address follows. */ char *p; int masklen; char md = '\0'; CHECK_LENGTH(cblen, 1 + len + 2 * F_INSN_SIZE(struct in6_addr)); if ((p = strpbrk(av, "/,")) ) { md = *p; /* save the separator */ *p = '\0'; /* terminate address string */ p++; /* and skip past it */ } /* now p points to NULL, mask or next entry */ /* lookup stores address in *d as a side effect */ if (lookup_host6(av, d) != 0) { /* XXX: failed. Free memory and go */ errx(EX_DATAERR, "bad address \"%s\"", av); } /* next, look at the mask, if any */ masklen = (md == '/') ? atoi(p) : 128; if (masklen > 128 || masklen < 0) errx(EX_DATAERR, "bad width \"%s\''", p); else n2mask(&d[1], masklen); APPLY_MASK(d, &d[1]) /* mask base address with mask */ /* find next separator */ if (md == '/') { /* find separator past the mask */ p = strpbrk(p, ","); if (p != NULL) p++; } av = p; /* Check this entry */ if (masklen == 0) { /* * 'any' turns the entire list into a NOP. * 'not any' never matches, so it is removed from the * list unless it is the only item, in which case we * report an error. */ if (cmd->o.len & F_NOT && av == NULL && len == 0) errx(EX_DATAERR, "not any never matches"); continue; } /* * A single IP can be stored alone */ if (masklen == 128 && av == NULL && len == 0) { len = F_INSN_SIZE(struct in6_addr); break; } /* Update length and pointer to arguments */ len += F_INSN_SIZE(struct in6_addr)*2; d += 2; } /* end while */ /* * Total length of the command, remember that 1 is the size of * the base command. */ if (len + 1 > F_LEN_MASK) errx(EX_DATAERR, "address list too long"); cmd->o.len |= len+1; free(av); return (1); } /* * fills command for ipv6 flow-id filtering * note that the 20 bit flow number is stored in a array of u_int32_t * it's supported lists of flow-id, so in the o.arg1 we store how many * additional flow-id we want to filter, the basic is 1 */ void fill_flow6( ipfw_insn_u32 *cmd, char *av, int cblen) { u_int32_t type; /* Current flow number */ u_int16_t nflow = 0; /* Current flow index */ char *s = av; cmd->d[0] = 0; /* Initializing the base number*/ while (s) { CHECK_LENGTH(cblen, F_INSN_SIZE(ipfw_insn_u32) + nflow + 1); av = strsep( &s, ",") ; type = strtoul(av, &av, 0); if (*av != ',' && *av != '\0') errx(EX_DATAERR, "invalid ipv6 flow number %s", av); if (type > 0xfffff) errx(EX_DATAERR, "flow number out of range %s", av); cmd->d[nflow] |= type; nflow++; } if( nflow > 0 ) { cmd->o.opcode = O_FLOW6ID; cmd->o.len |= F_INSN_SIZE(ipfw_insn_u32) + nflow; cmd->o.arg1 = nflow; } else { errx(EX_DATAERR, "invalid ipv6 flow number %s", av); } } ipfw_insn * add_srcip6(ipfw_insn *cmd, char *av, int cblen) { fill_ip6((ipfw_insn_ip6 *)cmd, av, cblen); if (cmd->opcode == O_IP_DST_SET) /* set */ cmd->opcode = O_IP_SRC_SET; else if (cmd->opcode == O_IP_DST_LOOKUP) /* table */ cmd->opcode = O_IP_SRC_LOOKUP; else if (F_LEN(cmd) == 0) { /* any */ } else if (F_LEN(cmd) == F_INSN_SIZE(ipfw_insn)) { /* "me" */ cmd->opcode = O_IP6_SRC_ME; } else if (F_LEN(cmd) == (F_INSN_SIZE(struct in6_addr) + F_INSN_SIZE(ipfw_insn))) { /* single IP, no mask*/ cmd->opcode = O_IP6_SRC; } else { /* addr/mask opt */ cmd->opcode = O_IP6_SRC_MASK; } return cmd; } ipfw_insn * add_dstip6(ipfw_insn *cmd, char *av, int cblen) { fill_ip6((ipfw_insn_ip6 *)cmd, av, cblen); if (cmd->opcode == O_IP_DST_SET) /* set */ ; else if (cmd->opcode == O_IP_DST_LOOKUP) /* table */ ; else if (F_LEN(cmd) == 0) { /* any */ } else if (F_LEN(cmd) == F_INSN_SIZE(ipfw_insn)) { /* "me" */ cmd->opcode = O_IP6_DST_ME; } else if (F_LEN(cmd) == (F_INSN_SIZE(struct in6_addr) + F_INSN_SIZE(ipfw_insn))) { /* single IP, no mask*/ cmd->opcode = O_IP6_DST; } else { /* addr/mask opt */ cmd->opcode = O_IP6_DST_MASK; } return cmd; } nextepc-0.3.10/lib/ipfw/missing.h000066400000000000000000000546561333553357400166310ustar00rootroot00000000000000/* * Copyright (C) 2009 Luigi Rizzo, Marta Carbone, Universita` di Pisa * * 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 AUTHOR 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 AUTHOR 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. */ /* * $Id: missing.h 8377 2011-04-04 16:08:27Z marta $ * * Header for kernel variables and functions that are not available in * userland. */ #ifndef _MISSING_H_ #define _MISSING_H_ #define KLD_MODULE /* disable kernel dependencies */ /* defined as assert */ void panic(const char *fmt, ...); #define KASSERT(exp,msg) do { \ if (__predict_false(!(exp))) \ panic msg; \ } while (0) /* don't bother to optimize */ #ifndef __predict_false #define __predict_false(x) (x) /* __builtin_expect((exp), 0) */ #endif // XXX #ifdef _KERNEL #define NEED_KERNEL #undef _KERNEL #endif #include // printf #include // IFNAMSIZ ? #include // strncmp #include // bsearch #ifdef NEED_KERNEL #define _KERNEL #include #include #define __user // not defined here ? #define __init #define __exit /* portability features, to be set before the rest: */ #define WITHOUT_BPF /* do not use bpf logging */ #define MALLOC_DECLARE(x) struct __hack /* nothing */ // XXX kernel malloc/free extern void *kern_malloc(int); extern void kern_free(void *); #define malloc(_size, type, flags) kern_malloc(_size) #define free(_var, type) kern_free(_var) /* inet_ntoa_r() differs in userspace and kernel. * We load netinet/in.h so we get the kernel prototype ? * but we also need to put #defines in the two places where * it is used XXX fixme */ #include /* log() conflicts with the math function. * Revise, modifying the first argument. */ #define LOG_ERR 0x100 #define LOG_INFO 0x200 #ifndef LOG_SECURITY #define LOG_SECURITY 0x400 #endif #define log(_level, fmt, arg...) do { \ int __attribute__((unused)) _querty = _level; \ printf("kernel: " fmt, ##arg); } while (0) #endif /* _KERNEL */ /* * Kernel locking support. * FreeBSD uses mtx in dummynet.c and struct rwlock ip_fw2.c * * In linux we use spinlock_bh to implement both. * For 'struct rwlock' we need an #ifdef to change it to spinlock_t */ #ifndef DEFINE_SPINLOCK /* this is for linux 2.4 */ #if defined(__APPLE__) #define DEFINE_SPINLOCK(x) struct mtx x; #else /* linux ? */ #define DEFINE_SPINLOCK(x) spinlock_t x // = SPIN_LOCK_UNLOCKED #endif #endif /* 20111031 * redefine mutex in terms of threads. */ #undef _KERNEL // #include #include #ifdef NEED_KERNEL #define _KERNEL #endif struct mtx { pthread_mutex_t p0; }; struct rwlock { pthread_mutex_t p0; }; struct rmlock { pthread_mutex_t p0; }; extern pthread_mutex_t dummynet_mtx_p; extern pthread_mutex_t ipfw_dyn_mtx_p; extern pthread_mutex_t pfil_global_lock_p; #define mtx_assert(a, b) /* * the first argument to mtx_init is often a static variable, * so use (void)m to prevent a compiler warning */ #define mtx_init(m, a,b,c) do { \ (void)m; pthread_mutex_init(&((m)->p0), NULL); } while (0) #define MTX_SYSINIT(a, m, c, d) // pthread_mutex_init(m##_p, NULL) #define mtx_lock(m) pthread_mutex_lock(m.p0) #define mtx_unlock(m) pthread_mutex_unlock(m.p0) #define mtx_destroy(m) pthread_mutex_destroy(m.p0) #if 1 //------------------ #if 1 // used for IPFW_UH #define rw_assert(a, b) #define rw_destroy(_l) #define rw_init(_l, msg) // XXX mtx_init((_l), 0, 0, 0) #define rw_rlock(_l) mtx_lock(_l) #define rw_runlock(_l) mtx_unlock(_l) #define rw_wlock(_l) mtx_lock(_l) #define rw_wunlock(_l) mtx_unlock(_l) #define rw_init_flags(_l, s, v) #endif // XXX not used anymore #define rm_init(_l, msg) // mtx_init(...) #define rm_rlock(_l, _t) ((void)_t, mtx_lock(_l)) #define rm_runlock(_l, _t) mtx_unlock(_l) #define rm_wlock(_l) mtx_lock(_l) #define rm_wunlock(_l) mtx_unlock(_l) #define rm_destroy(_l) // XXX #define rm_assert(_l, _w) // XXX #endif // locking on linux ? /* end of locking support */ /* * Reference to an ipfw rule that can be carried outside critical sections. * A rule is identified by rulenum:rule_id which is ordered. * In version chain_id the rule can be found in slot 'slot', so * we don't need a lookup if chain_id == chain->id. * * On exit from the firewall this structure refers to the rule after * the matching one (slot points to the new rule; rulenum:rule_id-1 * is the matching rule), and additional info (e.g. info often contains * the insn argument or tablearg in the low 16 bits, in host format). * On entry, the structure is valid if slot>0, and refers to the starting * rules. 'info' contains the reason for reinject, e.g. divert port, * divert direction, and so on. */ struct ipfw_rule_ref { uint32_t slot; /* slot for matching rule */ uint32_t rulenum; /* matching rule number */ uint32_t rule_id; /* matching rule id */ uint32_t chain_id; /* ruleset id */ uint32_t info; /* see below */ }; /* ISO C restricts enumerator values to range of 'int' * so we need IN to have a smaller value */ enum { IPFW_INFO_MASK = 0x0000ffff, IPFW_INFO_OUT = 0x00000000, /* outgoing, just for convenience */ IPFW_INFO_IN = 0x00800000, /* incoming, overloads dir */ IPFW_ONEPASS = 0x40000000, /* One-pass, do not reinject */ IPFW_IS_MASK = 0x30000000, /* which source ? */ IPFW_IS_DIVERT = 0x20000000, IPFW_IS_DUMMYNET =0x10000000, IPFW_IS_PIPE = 0x08000000, /* pipe=1, queue = 0 */ }; /* in netinet/in.h */ #define in_nullhost(x) ((x).s_addr == INADDR_ANY) /* ip_dummynet.c */ #ifndef __FreeBSD_version #define __FreeBSD_version 500035 #endif /* define some macro for ip_dummynet */ struct malloc_type { }; #define MALLOC_DEFINE(type, shortdesc, longdesc) \ struct malloc_type type[1]; void *md_dummy_ ## type = type #define CTASSERT(x) /* * gettimeofday would be in sys/time.h but it is not * visible if _KERNEL is defined */ //int gettimeofday(struct timeval *, struct timezone *); extern int hz; extern long tick; /* exists in 2.4 but not in 2.6 */ extern int bootverbose; extern struct timeval boottime; /* time_uptime is a FreeBSD variable increased each second */ extern time_t time_uptime; extern int max_linkhdr; extern int ip_defttl; extern u_long in_ifaddrhmask; /* mask for hash table */ extern struct in_ifaddrhashhead *in_ifaddrhashtbl; /* inet addr hash table */ /*-------------------------------------------------*/ /* define, includes and functions missing in linux */ /* include and define */ #include /* inet_ntoa */ struct mbuf; // XXX #define M_MCAST 0x04 /* send/received as link-level multicast */ /* used by ip_dummynet.c */ void reinject_drop(struct mbuf* m); #include /* for ETHERTYPE_IP */ #ifdef _KERNEL #define IF_NAMESIZE 16 #ifndef IFNAMSIZ #define IFNAMSIZ IF_NAMESIZE #endif //#include /* IFNAMESIZ */ #endif /* * some network structure can be defined in the bsd way * by using the _FAVOR_BSD definition. This is not true * for icmp structure. * XXX struct icmp contains bsd names in * /usr/include/netinet/ip_icmp.h */ /* missing definition */ #define TH_FIN 0x01 #define TH_SYN 0x02 #define TH_RST 0x04 #define TH_ACK 0x10 /* 20131101 IPTOS from ip.h */ /* * Definitions for DiffServ Codepoints as per RFC2474 */ #define IPTOS_DSCP_CS0 0x00 #define IPTOS_DSCP_CS1 0x20 #define IPTOS_DSCP_AF11 0x28 #define IPTOS_DSCP_AF12 0x30 #define IPTOS_DSCP_AF13 0x38 #define IPTOS_DSCP_CS2 0x40 #define IPTOS_DSCP_AF21 0x48 #define IPTOS_DSCP_AF22 0x50 #define IPTOS_DSCP_AF23 0x58 #define IPTOS_DSCP_CS3 0x60 #define IPTOS_DSCP_AF31 0x68 #define IPTOS_DSCP_AF32 0x70 #define IPTOS_DSCP_AF33 0x78 #define IPTOS_DSCP_CS4 0x80 #define IPTOS_DSCP_AF41 0x88 #define IPTOS_DSCP_AF42 0x90 #define IPTOS_DSCP_AF43 0x98 #define IPTOS_DSCP_CS5 0xa0 #define IPTOS_DSCP_EF 0xb8 #define IPTOS_DSCP_CS6 0xc0 #define IPTOS_DSCP_CS7 0xe0 /* * ECN (Explicit Congestion Notification) codepoints in RFC3168 mapped to the * lower 2 bits of the TOS field. */ #define IPTOS_ECN_NOTECT 0x00 /* not-ECT */ #define IPTOS_ECN_ECT1 0x01 /* ECN-capable transport (1) */ #define IPTOS_ECN_ECT0 0x02 /* ECN-capable transport (0) */ #define IPTOS_ECN_CE 0x03 /* congestion experienced */ #define IPTOS_ECN_MASK 0x03 /* ECN field mask */ /*------------------------- */ #define RTF_CLONING 0x100 /* generate new routes on use */ #define IPPROTO_OSPFIGP 89 /* OSPFIGP */ #define IPPROTO_CARP 112 /* CARP */ #define CARP_VERSION 2 #define CARP_ADVERTISEMENT 0x01 #define PRIV_NETINET_IPFW 491 /* Administer IPFW firewall. */ #define IP_FORWARDING 0x1 /* most of ip header exists */ #define NETISR_IP 2 /* same as AF_INET */ #define PRIV_NETINET_DUMMYNET 494 /* Administer DUMMYNET. */ extern int securelevel; #define if_xname name #define if_snd XXX // XXX we could use this to point to the incoming peer struct ifnet { char if_xname[IFNAMSIZ]; /* external name (name + unit) */ uint32_t if_index; // IP_FW_3 }; struct ifaltq { void *ifq_head; }; int ffs(int); // XXX where int fls(int); // XXX where struct ip; /* machine/in_cksum.h */ int in_cksum(struct mbuf *m, int len); #ifndef __FreeBSD__ u_short in_cksum_hdr(struct ip *); #endif #define CTR3(a, ...) #define uma_zone_set_max(a, b) // XXX /* * ifnet->if_snd is used in ip_dummynet.c to take the transmission * clock. */ #if defined( __linux__) #define if_xname name #define if_snd XXX struct route_in6 { }; #elif defined( _WIN32 ) /* used in ip_dummynet.c */ struct ifnet { char if_xname[IFNAMSIZ]; /* external name (name + unit) */ // struct ifaltq if_snd; /* output queue (includes altq) */ }; struct net_device { char if_xname[IFNAMSIZ]; /* external name (name + unit) */ }; #elif defined(__APPLE__) typedef u_int32_t tcp_cc; #ifndef s6_addr32 // XXX #define s6_addr32 __u6_addr.__u6_addr32 #endif #include struct route_in6 { }; struct icmphdr { u_char icmp_type; /* type of message, see below */ u_char icmp_code; /* type sub code */ u_short icmp_cksum; /* ones complement cksum of struct */ }; #define IPPROTO_SCTP 132 /* SCTP */ /* defined in linux/sctp.h with no bsd definition */ struct sctphdr { uint16_t src_port; /* source port */ uint16_t dest_port; /* destination port */ uint32_t v_tag; /* verification tag of packet */ uint32_t checksum; /* Adler32 C-Sum */ /* chunks follow... */ }; struct carp_header { #if BYTE_ORDER == LITTLE_ENDIAN u_int8_t carp_type:4, carp_version:4; #endif #if BYTE_ORDER == BIG_ENDIAN u_int8_t carp_version:4, carp_type:4; #endif }; struct pim { int dummy; /* windows compiler does not like empty definition */ }; #endif /* involves mbufs */ //int in_cksum(struct mbuf *m, int len); #define divert_cookie(mtag) 0 #define divert_info(mtag) 0 #define pf_find_mtag(a) NULL #define pf_get_mtag(a) NULL #if !defined(_WIN32) && !defined(AF_LINK) #define AF_LINK AF_ASH /* ? our sys/socket.h */ #endif /* search local the ip addresses, used for the "me" keyword */ #define INADDR_TO_IFP(ip, b) b = NULL /* we don't pullup, either success or free and fail */ #define m_pullup(m, x) \ ((m)->m_len >= x ? (m) : (FREE_PKT(m), NULL)) struct pf_mtag { void *hdr; /* saved hdr pos in mbuf, for ECN */ sa_family_t af; /* for ECN */ u_int32_t qid; /* queue id */ }; /* missing kernel functions */ char *inet_ntoa(struct in_addr ina); long random(void); /* * Return the risult of a/b * * this is used in linux kernel space, * since the 64bit division needs to * be done using a macro */ //int64_t div64(int64_t a, int64_t b); /* from bsd sys/queue.h */ #define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ for ((var) = TAILQ_FIRST((head)); \ (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ (var) = (tvar)) #define SLIST_FOREACH_SAFE(var, head, field, tvar) \ for ((var) = SLIST_FIRST((head)); \ (var) && ((tvar) = SLIST_NEXT((var), field), 1); \ (var) = (tvar)) /*-------------------------------------------------*/ #define RT_NUMFIBS 1 extern u_int rt_numfibs; /* involves kernel locking function */ #ifdef RTFREE #undef RTFREE #define RTFREE(a) fprintf(stderr, "RTFREE: commented out locks\n"); #endif void getmicrouptime(struct timeval *tv); /* from sys/netinet/ip_output.c */ struct ip_moptions; struct route; struct ip; struct inpcb; struct mbuf *ip_reass(struct mbuf *); int ip_output(struct mbuf *m, struct mbuf *opt, struct route *ro, int flags, struct ip_moptions *imo, struct inpcb *inp); /* from net/netisr.c -- fails on FreeBSD */ int netisr_dispatch(u_int proto, struct mbuf *m); /* definition moved in missing.c */ int sooptcopyout(struct sockopt *sopt, const void *buf, size_t len); int copyout(const void *kaddr, void *uaddr, size_t len); int sooptcopyin(struct sockopt *sopt, void *buf, size_t len, size_t minlen); /* defined in session.c */ int priv_check(struct thread *td, int priv); /* struct ucred is in linux/socket.h and has pid, uid, gid. * We need a 'bsd_ucred' to store also the extra info */ struct bsd_ucred { uid_t uid; gid_t gid; uint32_t xid; uint32_t nid; }; #ifdef _KERNEL #if 0 // XXX int cred_check(void *insn, int proto, struct ifnet *oif, struct in_addr dst_ip, u_int16_t dst_port, struct in_addr src_ip, u_int16_t src_port, struct bsd_ucred *u, int *ugid_lookupp, struct sk_buff *skb); #endif struct ucred; int securelevel_ge(struct ucred *cr, int level); /* * stripped down version of the sysctl api */ struct sysctl_oid; struct sysctl_req { void *oldptr; /* store here the original value */ int oldlen; void *newptr; /* NULL on reads */ int newlen; }; #ifdef _WIN32 #define module_param_named(_name, _var, _ty, _perm) #else /* !_WIN32 */ #endif /* !_WIN32 so maybe __linux__ */ #if 0 // XXX disable sysctl defined (__linux__) && !defined (EMULATE_SYSCTL) #define SYSCTL_DECL(_1) #define SYSCTL_OID(_1, _2, _3, _4, _5, _6, _7, _8) #define SYSCTL_NODE(_1, _2, _3, _4, _5, _6) #define _SYSCTL_BASE(_name, _var, _ty, _perm) \ module_param_named(_name, *(_var), _ty, \ ( (_perm) == CTLFLAG_RD) ? 0444: 0644 ) #define SYSCTL_PROC(_base, _oid, _name, _mode, _var, _val, _desc, _a, _b) #define SYSCTL_INT(_base, _oid, _name, _mode, _var, _val, _desc) \ _SYSCTL_BASE(_name, _var, int, _mode) #define SYSCTL_LONG(_base, _oid, _name, _mode, _var, _val, _desc) \ _SYSCTL_BASE(_name, _var, long, _mode) #define SYSCTL_ULONG(_base, _oid, _name, _mode, _var, _val, _desc) \ _SYSCTL_BASE(_name, _var, ulong, _mode) #define SYSCTL_UINT(_base, _oid, _name, _mode, _var, _val, _desc) \ _SYSCTL_BASE(_name, _var, uint, _mode) #define TUNABLE_INT(_name, _ptr) #define SYSCTL_VNET_PROC SYSCTL_PROC #define SYSCTL_VNET_INT SYSCTL_INT #define SYSCTL_VNET_UINT SYSCTL_UINT #endif #define SYSCTL_HANDLER_ARGS \ struct sysctl_oid *oidp, void *arg1, int arg2, struct sysctl_req *req typedef int (sysctl_h_fn_t)(SYSCTL_HANDLER_ARGS); int sysctl_handle_int(SYSCTL_HANDLER_ARGS); int sysctl_handle_long(SYSCTL_HANDLER_ARGS); #ifdef EMULATE_SYSCTL /* mandatory here */ #define STRINGIFY(x) #x #ifdef SYSCTL_NODE #undef SYSCTL_NODE #endif #define SYSCTL_NODE(a,b,c,d,e,f) int a; (void)a #define SYSCTL_DECL(a) #define GST_HARD_LIMIT 100 /* In the module, GST is implemented as an array of * sysctlentry, but while passing data to the userland * pointers are useless, the buffer is actually made of: * - sysctlhead (fixed size, containing lengths) * - data (typically 32 bit) * - name (zero-terminated and padded to mod4) */ struct sysctlentry { struct sysctlhead head; char* name; void* data; sysctl_h_fn_t *fn; }; struct sysctltable { int count; //number of valid tables int totalsize; //total size of valid entries of al the valid tables void* namebuffer; //a buffer for all chained names struct sysctlentry entry[GST_HARD_LIMIT]; }; #ifdef SYSBEGIN #undef SYSBEGIN #endif #define SYSBEGIN(x) void sysctl_addgroup_##x() { #ifdef SYSEND #undef SYSEND #endif #define SYSEND } /* XXX remove duplication */ #define SYSCTL_INT(a,b,c,d,e,f,g) \ sysctl_pushback(STRINGIFY(a) "." STRINGIFY(c) + 1, \ (d) | (SYSCTLTYPE_INT << 2), sizeof(*e), e, NULL) #define SYSCTL_UINT(a,b,c,d,e,f,g) \ sysctl_pushback(STRINGIFY(a) "." STRINGIFY(c) + 1, \ (d) | (SYSCTLTYPE_UINT << 2), sizeof(*e), e, NULL) #define SYSCTL_LONG(a,b,c,d,e,f,g) \ sysctl_pushback(STRINGIFY(a) "." STRINGIFY(c) + 1, \ (d) | (SYSCTLTYPE_LONG << 2), sizeof(*e), e, NULL) #define SYSCTL_ULONG(a,b,c,d,e,f,g) \ sysctl_pushback(STRINGIFY(a) "." STRINGIFY(c) + 1, \ (d) | (SYSCTLTYPE_ULONG << 2), sizeof(*e), e, NULL) #define TUNABLE_INT(a,b) #define SYSCTL_PROC(a,b,c,d,e,f,g,h,i) \ sysctl_pushback(STRINGIFY(a) "." STRINGIFY(c) + 1, \ (d), 4 /* XXX large */, (void *)(f /* arg2 */), g) #define SYSCTL_VNET_PROC SYSCTL_PROC #define SYSCTL_VNET_INT SYSCTL_INT #define SYSCTL_VNET_UINT SYSCTL_UINT void keinit_GST(void); void keexit_GST(void); int kesysctl_emu_set(void* p, int l); int kesysctl_emu_get(struct sockopt* sopt); void sysctl_pushback(char* name, int flags, int datalen, void* data, sysctl_h_fn_t *fn); #endif /* EMULATE_SYSCTL */ struct ifnet; void ether_demux(struct ifnet *ifp, struct mbuf *m); int ether_output_frame(struct ifnet *ifp, struct mbuf *m); void in_rtalloc_ign(struct route *ro, u_long ignflags, u_int fibnum); void icmp_error(struct mbuf *n, int type, int code, uint32_t dest, int mtu); #define in_localip(_x) (0) #ifndef __FreeBSD__ struct rtentry; #endif void rtfree(struct rtentry *rt); u_short in_cksum_skip(struct mbuf *m, int len, int skip); #ifdef INP_LOCK_ASSERT #undef INP_LOCK_ASSERT #define INP_LOCK_ASSERT(a) #endif int jailed(struct ucred *cred); /* * Return 1 if an internet address is for a ``local'' host * (one to which we have a connection). If subnetsarelocal * is true, this includes other subnets of the local net. * Otherwise, it includes only the directly-connected (sub)nets. */ int in_localaddr(struct in_addr in); int fnmatch(const char *pattern, const char *string, int flags); /* vnet wrappers, in vnet.h and ip_var.h */ //int ipfw_init(void); //void ipfw_destroy(void); #define MTAG_IPFW 1148380143 /* IPFW-tagged cookie */ #define MTAG_IPFW_RULE 1262273568 /* rule reference */ #define MTAG_IPFW_CALL 1308397630 /* call stack */ #ifdef __APPLE__ #define offsetof(type, field) __builtin_offsetof(type, field) #endif struct ip_fw_args; extern int (*ip_dn_io_ptr)(struct mbuf **m, int dir, struct ip_fw_args *fwa); #if 1 /* include vnet.h */ #define curvnet NULL #define CURVNET_SET(_v) #define CURVNET_RESTORE() #define VNET_ASSERT(condition) #define VNET_NAME(n) n #define VNET_DECLARE(t, n) extern t n #define VNET_DEFINE(t, n) t n #define _VNET_PTR(b, n) &VNET_NAME(n) /* * Virtualized global variable accessor macros. */ #define VNET_VNET_PTR(vnet, n) (&(n)) #define VNET_VNET(vnet, n) (n) #define VNET_PTR(n) (&(n)) #define VNET(n) (n) #define IS_DEFAULT_VNET(x) (1) // always true #endif VNET_DECLARE(int, ip_defttl); #define V_ip_defttl VNET(ip_defttl); // int ipfw_check_hook(void *arg, struct mbuf **m0, struct ifnet *ifp, int dir, struct inpcb *inp); // XXX used in netmap_io.c int ipfw_check_packet(void *arg, struct mbuf **m0, struct ifnet *ifp, int dir, struct inpcb *inp); int ipfw_check_frame(void *arg, struct mbuf **m0, struct ifnet *ifp, int dir, struct inpcb *inp); /* hooks for divert */ extern void (*ip_divert_ptr)(struct mbuf *m, int incoming); extern int (*ip_dn_ctl_ptr)(struct sockopt *); typedef int ip_fw_ctl_t(struct sockopt *); extern ip_fw_ctl_t *ip_fw_ctl_ptr; /* netgraph prototypes */ typedef int ng_ipfw_input_t(struct mbuf **, int, struct ip_fw_args *, int); extern ng_ipfw_input_t *ng_ipfw_input_p; /* For kernel ipfw_ether and ipfw_bridge. */ struct ip_fw_args; #define V_ip_fw_ctl_ptr VNET(ip_fw_ctl_ptr) #define V_tcbinfo VNET(tcbinfo) #define V_udbinfo VNET(udbinfo) #endif /* _KERNEL */ // sys/eventhandler.h #define EVENTHANDLER_DECLARE(a, b) /* application specific */ struct sess; typedef int (handler_t)(struct sess *sess, void *arg); /* * flags to control the callback * WANT_READ select on read * WANT_WRITE select on write * WANT_RUN run unconditionally * WANT_DELETE session is exiting */ enum flags_t { WANT_READ=1, WANT_WRITE=2, WANT_RUN=4, WANT_DELETE=0x8000 }; struct sess { struct sess *next; int fd; handler_t *func; void *arg; enum flags_t flags; void *private; /* pointer managed by the session code */ }; struct sess * new_session(int fd, handler_t *func, void *arg, enum flags_t flags); void netmap_add_port(const char *dev); #endif /* !_MISSING_H_ */ nextepc-0.3.10/lib/ipfw/objs/000077500000000000000000000000001333553357400157245ustar00rootroot00000000000000nextepc-0.3.10/lib/ipfw/objs/include_e/000077500000000000000000000000001333553357400176535ustar00rootroot00000000000000nextepc-0.3.10/lib/ipfw/objs/include_e/libutil.h000066400000000000000000000000001333553357400214560ustar00rootroot00000000000000nextepc-0.3.10/lib/ipfw/objs/include_e/net/000077500000000000000000000000001333553357400204415ustar00rootroot00000000000000nextepc-0.3.10/lib/ipfw/objs/include_e/net/if_var.h000066400000000000000000000000001333553357400220460ustar00rootroot00000000000000nextepc-0.3.10/lib/ipfw/objs/include_e/netinet/000077500000000000000000000000001333553357400213215ustar00rootroot00000000000000nextepc-0.3.10/lib/ipfw/objs/include_e/netinet/ip_dummynet.h000066400000000000000000000205371333553357400240330ustar00rootroot00000000000000/*- * Copyright (c) 1998-2010 Luigi Rizzo, Universita` di Pisa * Portions Copyright (c) 2000 Akamba Corp. * 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 AUTHOR 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 AUTHOR 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. * * $FreeBSD: head/sys/netinet/ip_dummynet.h 266941 2014-06-01 07:28:24Z hiren $ */ #ifndef _IP_DUMMYNET_H #define _IP_DUMMYNET_H /* * Definition of the kernel-userland API for dummynet. * * Setsockopt() and getsockopt() pass a batch of objects, each * of them starting with a "struct dn_id" which should fully identify * the object and its relation with others in the sequence. * The first object in each request should have * type= DN_CMD_*, id = DN_API_VERSION. * For other objects, type and subtype specify the object, len indicates * the total length including the header, and 'id' identifies the specific * object. * * Most objects are numbered with an identifier in the range 1..65535. * DN_MAX_ID indicates the first value outside the range. */ #define DN_API_VERSION 12500000 #define DN_MAX_ID 0x10000 struct dn_id { uint16_t len; /* total obj len including this header */ uint8_t type; uint8_t subtype; uint32_t id; /* generic id */ }; /* * These values are in the type field of struct dn_id. * To preserve the ABI, never rearrange the list or delete * entries with the exception of DN_LAST */ enum { DN_NONE = 0, DN_LINK = 1, DN_FS, DN_SCH, DN_SCH_I, DN_QUEUE, DN_DELAY_LINE, DN_PROFILE, DN_FLOW, /* struct dn_flow */ DN_TEXT, /* opaque text is the object */ DN_CMD_CONFIG = 0x80, /* objects follow */ DN_CMD_DELETE, /* subtype + list of entries */ DN_CMD_GET, /* subtype + list of entries */ DN_CMD_FLUSH, /* for compatibility with FreeBSD 7.2/8 */ DN_COMPAT_PIPE, DN_COMPAT_QUEUE, DN_GET_COMPAT, /* special commands for emulation of sysctl variables */ DN_SYSCTL_GET, DN_SYSCTL_SET, DN_LAST, }; enum { /* subtype for schedulers, flowset and the like */ DN_SCHED_UNKNOWN = 0, DN_SCHED_FIFO = 1, DN_SCHED_WF2QP = 2, /* others are in individual modules */ }; enum { /* user flags */ DN_HAVE_MASK = 0x0001, /* fs or sched has a mask */ DN_NOERROR = 0x0002, /* do not report errors */ DN_QHT_HASH = 0x0004, /* qht is a hash table */ DN_QSIZE_BYTES = 0x0008, /* queue size is in bytes */ DN_HAS_PROFILE = 0x0010, /* a link has a profile */ DN_IS_RED = 0x0020, DN_IS_GENTLE_RED= 0x0040, DN_IS_ECN = 0x0080, DN_PIPE_CMD = 0x1000, /* pipe config... */ }; /* * link template. */ struct dn_link { struct dn_id oid; /* * Userland sets bw and delay in bits/s and milliseconds. * The kernel converts this back and forth to bits/tick and ticks. * XXX what about burst ? */ int32_t link_nr; int bandwidth; /* bit/s or bits/tick. */ int delay; /* ms and ticks */ uint64_t burst; /* scaled. bits*Hz XXX */ }; /* * A flowset, which is a template for flows. Contains parameters * from the command line: id, target scheduler, queue sizes, plr, * flow masks, buckets for the flow hash, and possibly scheduler- * specific parameters (weight, quantum and so on). */ struct dn_fs { struct dn_id oid; uint32_t fs_nr; /* the flowset number */ uint32_t flags; /* userland flags */ int qsize; /* queue size in slots or bytes */ int32_t plr; /* PLR, pkt loss rate (2^31-1 means 100%) */ uint32_t buckets; /* buckets used for the queue hash table */ struct ipfw_flow_id flow_mask; uint32_t sched_nr; /* the scheduler we attach to */ /* generic scheduler parameters. Leave them at -1 if unset. * Now we use 0: weight, 1: lmax, 2: priority */ int par[4]; /* RED/GRED parameters. * weight and probabilities are in the range 0..1 represented * in fixed point arithmetic with SCALE_RED decimal bits. */ #define SCALE_RED 16 #define SCALE(x) ( (x) << SCALE_RED ) #define SCALE_VAL(x) ( (x) >> SCALE_RED ) #define SCALE_MUL(x,y) ( ( (x) * (y) ) >> SCALE_RED ) int w_q ; /* queue weight (scaled) */ int max_th ; /* maximum threshold for queue (scaled) */ int min_th ; /* minimum threshold for queue (scaled) */ int max_p ; /* maximum value for p_b (scaled) */ }; /* * dn_flow collects flow_id and stats for queues and scheduler * instances, and is used to pass these info to userland. * oid.type/oid.subtype describe the object, oid.id is number * of the parent object. */ struct dn_flow { struct dn_id oid; struct ipfw_flow_id fid; uint64_t tot_pkts; /* statistics counters */ uint64_t tot_bytes; uint32_t length; /* Queue length, in packets */ uint32_t len_bytes; /* Queue length, in bytes */ uint32_t drops; }; /* * Scheduler template, mostly indicating the name, number, * sched_mask and buckets. */ struct dn_sch { struct dn_id oid; uint32_t sched_nr; /* N, scheduler number */ uint32_t buckets; /* number of buckets for the instances */ uint32_t flags; /* have_mask, ... */ char name[16]; /* null terminated */ /* mask to select the appropriate scheduler instance */ struct ipfw_flow_id sched_mask; /* M */ }; /* A delay profile is attached to a link. * Note that a profile, as any other object, cannot be longer than 2^16 */ #define ED_MAX_SAMPLES_NO 1024 struct dn_profile { struct dn_id oid; /* fields to simulate a delay profile */ #define ED_MAX_NAME_LEN 32 char name[ED_MAX_NAME_LEN]; int link_nr; int loss_level; int _bandwidth; // XXX use link bandwidth? unused ? int samples_no; /* actual len of samples[] */ int samples[ED_MAX_SAMPLES_NO]; /* may be shorter */ }; /* * Overall structure of dummynet In dummynet, packets are selected with the firewall rules, and passed to two different objects: PIPE or QUEUE (bad name). A QUEUE defines a classifier, which groups packets into flows according to a 'mask', puts them into independent queues (one per flow) with configurable size and queue management policy, and passes flows to a scheduler: (flow_mask|sched_mask) sched_mask +---------+ weight Wx +-------------+ | |->-[flow]-->--| |-+ -->--| QUEUE x | ... | | | | |->-[flow]-->--| SCHEDuler N | | +---------+ | | | ... | +--[LINK N]-->-- +---------+ weight Wy | | +--[LINK N]-->-- | |->-[flow]-->--| | | -->--| QUEUE y | ... | | | | |->-[flow]-->--| | | +---------+ +-------------+ | +-------------+ Many QUEUE objects can connect to the same scheduler, each QUEUE object can have its own set of parameters. In turn, the SCHEDuler 'forks' multiple instances according to a 'sched_mask', each instance manages its own set of queues and transmits on a private instance of a configurable LINK. A PIPE is a simplified version of the above, where there is no flow_mask, and each scheduler instance handles a single queue. The following data structures (visible from userland) describe the objects used by dummynet: + dn_link, contains the main configuration parameters related to delay and bandwidth; + dn_profile describes a delay profile; + dn_flow describes the flow status (flow id, statistics) + dn_sch describes a scheduler + dn_fs describes a flowset (msk, weight, queue parameters) * */ #endif /* _IP_DUMMYNET_H */ nextepc-0.3.10/lib/ipfw/objs/include_e/netinet/ip_fw.h000066400000000000000000000766221333553357400226130ustar00rootroot00000000000000/*- * Copyright (c) 2002-2009 Luigi Rizzo, Universita` di Pisa * * 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 AUTHOR 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 AUTHOR 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. * * $FreeBSD: head/sys/netinet/ip_fw.h 273035 2014-10-13 13:49:28Z melifaro $ */ #ifndef _IPFW2_H #define _IPFW2_H /* * The default rule number. By the design of ip_fw, the default rule * is the last one, so its number can also serve as the highest number * allowed for a rule. The ip_fw code relies on both meanings of this * constant. */ #define IPFW_DEFAULT_RULE 65535 #define RESVD_SET 31 /*set for default and persistent rules*/ #define IPFW_MAX_SETS 32 /* Number of sets supported by ipfw*/ /* * Default number of ipfw tables. */ #define IPFW_TABLES_MAX 65535 #define IPFW_TABLES_DEFAULT 128 /* * Most commands (queue, pipe, tag, untag, limit...) can have a 16-bit * argument between 1 and 65534. The value 0 (IP_FW_TARG) is used * to represent 'tablearg' value, e.g. indicate the use of a 'tablearg' * result of the most recent table() lookup. * Note that 16bit is only a historical limit, resulting from * the use of a 16-bit fields for that value. In reality, we can have * 2^32 pipes, queues, tag values and so on. */ #define IPFW_ARG_MIN 1 #define IPFW_ARG_MAX 65534 #define IP_FW_TABLEARG 65535 /* Compat value for old clients */ #define IP_FW_TARG 0 /* Current tablearg value */ /* * Number of entries in the call stack of the call/return commands. * Call stack currently is an uint16_t array with rule numbers. */ #define IPFW_CALLSTACK_SIZE 16 /* IP_FW3 header/opcodes */ typedef struct _ip_fw3_opheader { uint16_t opcode; /* Operation opcode */ uint16_t version; /* Opcode version */ uint16_t reserved[2]; /* Align to 64-bit boundary */ } ip_fw3_opheader; /* IP_FW3 opcodes */ #define IP_FW_TABLE_XADD 86 /* add entry */ #define IP_FW_TABLE_XDEL 87 /* delete entry */ #define IP_FW_TABLE_XGETSIZE 88 /* get table size (deprecated) */ #define IP_FW_TABLE_XLIST 89 /* list table contents */ #define IP_FW_TABLE_XDESTROY 90 /* destroy table */ #define IP_FW_TABLES_XLIST 92 /* list all tables */ #define IP_FW_TABLE_XINFO 93 /* request info for one table */ #define IP_FW_TABLE_XFLUSH 94 /* flush table data */ #define IP_FW_TABLE_XCREATE 95 /* create new table */ #define IP_FW_TABLE_XMODIFY 96 /* modify existing table */ #define IP_FW_XGET 97 /* Retrieve configuration */ #define IP_FW_XADD 98 /* add rule */ #define IP_FW_XDEL 99 /* del rule */ #define IP_FW_XMOVE 100 /* move rules to different set */ #define IP_FW_XZERO 101 /* clear accounting */ #define IP_FW_XRESETLOG 102 /* zero rules logs */ #define IP_FW_SET_SWAP 103 /* Swap between 2 sets */ #define IP_FW_SET_MOVE 104 /* Move one set to another one */ #define IP_FW_SET_ENABLE 105 /* Enable/disable sets */ #define IP_FW_TABLE_XFIND 106 /* finds an entry */ #define IP_FW_XIFLIST 107 /* list tracked interfaces */ #define IP_FW_TABLES_ALIST 108 /* list table algorithms */ #define IP_FW_TABLE_XSWAP 109 /* swap two tables */ #define IP_FW_TABLE_VLIST 110 /* dump table value hash */ #define IP_FW_NAT44_XCONFIG 111 /* Create/modify NAT44 instance */ #define IP_FW_NAT44_DESTROY 112 /* Destroys NAT44 instance */ #define IP_FW_NAT44_XGETCONFIG 113 /* Get NAT44 instance config */ #define IP_FW_NAT44_LIST_NAT 114 /* List all NAT44 instances */ #define IP_FW_NAT44_XGETLOG 115 /* Get log from NAT44 instance */ #define IP_FW_DUMP_SOPTCODES 116 /* Dump available sopts/versions */ /* * The kernel representation of ipfw rules is made of a list of * 'instructions' (for all practical purposes equivalent to BPF * instructions), which specify which fields of the packet * (or its metadata) should be analysed. * * Each instruction is stored in a structure which begins with * "ipfw_insn", and can contain extra fields depending on the * instruction type (listed below). * Note that the code is written so that individual instructions * have a size which is a multiple of 32 bits. This means that, if * such structures contain pointers or other 64-bit entities, * (there is just one instance now) they may end up unaligned on * 64-bit architectures, so the must be handled with care. * * "enum ipfw_opcodes" are the opcodes supported. We can have up * to 256 different opcodes. When adding new opcodes, they should * be appended to the end of the opcode list before O_LAST_OPCODE, * this will prevent the ABI from being broken, otherwise users * will have to recompile ipfw(8) when they update the kernel. */ enum ipfw_opcodes { /* arguments (4 byte each) */ O_NOP, O_IP_SRC, /* u32 = IP */ O_IP_SRC_MASK, /* ip = IP/mask */ O_IP_SRC_ME, /* none */ O_IP_SRC_SET, /* u32=base, arg1=len, bitmap */ O_IP_DST, /* u32 = IP */ O_IP_DST_MASK, /* ip = IP/mask */ O_IP_DST_ME, /* none */ O_IP_DST_SET, /* u32=base, arg1=len, bitmap */ O_IP_SRCPORT, /* (n)port list:mask 4 byte ea */ O_IP_DSTPORT, /* (n)port list:mask 4 byte ea */ O_PROTO, /* arg1=protocol */ O_MACADDR2, /* 2 mac addr:mask */ O_MAC_TYPE, /* same as srcport */ O_LAYER2, /* none */ O_IN, /* none */ O_FRAG, /* none */ O_RECV, /* none */ O_XMIT, /* none */ O_VIA, /* none */ O_IPOPT, /* arg1 = 2*u8 bitmap */ O_IPLEN, /* arg1 = len */ O_IPID, /* arg1 = id */ O_IPTOS, /* arg1 = id */ O_IPPRECEDENCE, /* arg1 = precedence << 5 */ O_IPTTL, /* arg1 = TTL */ O_IPVER, /* arg1 = version */ O_UID, /* u32 = id */ O_GID, /* u32 = id */ O_ESTAB, /* none (tcp established) */ O_TCPFLAGS, /* arg1 = 2*u8 bitmap */ O_TCPWIN, /* arg1 = desired win */ O_TCPSEQ, /* u32 = desired seq. */ O_TCPACK, /* u32 = desired seq. */ O_ICMPTYPE, /* u32 = icmp bitmap */ O_TCPOPTS, /* arg1 = 2*u8 bitmap */ O_VERREVPATH, /* none */ O_VERSRCREACH, /* none */ O_PROBE_STATE, /* none */ O_KEEP_STATE, /* none */ O_LIMIT, /* ipfw_insn_limit */ O_LIMIT_PARENT, /* dyn_type, not an opcode. */ /* * These are really 'actions'. */ O_LOG, /* ipfw_insn_log */ O_PROB, /* u32 = match probability */ O_CHECK_STATE, /* none */ O_ACCEPT, /* none */ O_DENY, /* none */ O_REJECT, /* arg1=icmp arg (same as deny) */ O_COUNT, /* none */ O_SKIPTO, /* arg1=next rule number */ O_PIPE, /* arg1=pipe number */ O_QUEUE, /* arg1=queue number */ O_DIVERT, /* arg1=port number */ O_TEE, /* arg1=port number */ O_FORWARD_IP, /* fwd sockaddr */ O_FORWARD_MAC, /* fwd mac */ O_NAT, /* nope */ O_REASS, /* none */ /* * More opcodes. */ O_IPSEC, /* has ipsec history */ O_IP_SRC_LOOKUP, /* arg1=table number, u32=value */ O_IP_DST_LOOKUP, /* arg1=table number, u32=value */ O_ANTISPOOF, /* none */ O_JAIL, /* u32 = id */ O_ALTQ, /* u32 = altq classif. qid */ O_DIVERTED, /* arg1=bitmap (1:loop, 2:out) */ O_TCPDATALEN, /* arg1 = tcp data len */ O_IP6_SRC, /* address without mask */ O_IP6_SRC_ME, /* my addresses */ O_IP6_SRC_MASK, /* address with the mask */ O_IP6_DST, O_IP6_DST_ME, O_IP6_DST_MASK, O_FLOW6ID, /* for flow id tag in the ipv6 pkt */ O_ICMP6TYPE, /* icmp6 packet type filtering */ O_EXT_HDR, /* filtering for ipv6 extension header */ O_IP6, /* * actions for ng_ipfw */ O_NETGRAPH, /* send to ng_ipfw */ O_NGTEE, /* copy to ng_ipfw */ O_IP4, O_UNREACH6, /* arg1=icmpv6 code arg (deny) */ O_TAG, /* arg1=tag number */ O_TAGGED, /* arg1=tag number */ O_SETFIB, /* arg1=FIB number */ O_FIB, /* arg1=FIB desired fib number */ O_SOCKARG, /* socket argument */ O_CALLRETURN, /* arg1=called rule number */ O_FORWARD_IP6, /* fwd sockaddr_in6 */ O_DSCP, /* 2 u32 = DSCP mask */ O_SETDSCP, /* arg1=DSCP value */ O_IP_FLOW_LOOKUP, /* arg1=table number, u32=value */ O_LAST_OPCODE /* not an opcode! */ }; /* * The extension header are filtered only for presence using a bit * vector with a flag for each header. */ #define EXT_FRAGMENT 0x1 #define EXT_HOPOPTS 0x2 #define EXT_ROUTING 0x4 #define EXT_AH 0x8 #define EXT_ESP 0x10 #define EXT_DSTOPTS 0x20 #define EXT_RTHDR0 0x40 #define EXT_RTHDR2 0x80 /* * Template for instructions. * * ipfw_insn is used for all instructions which require no operands, * a single 16-bit value (arg1), or a couple of 8-bit values. * * For other instructions which require different/larger arguments * we have derived structures, ipfw_insn_*. * * The size of the instruction (in 32-bit words) is in the low * 6 bits of "len". The 2 remaining bits are used to implement * NOT and OR on individual instructions. Given a type, you can * compute the length to be put in "len" using F_INSN_SIZE(t) * * F_NOT negates the match result of the instruction. * * F_OR is used to build or blocks. By default, instructions * are evaluated as part of a logical AND. An "or" block * { X or Y or Z } contains F_OR set in all but the last * instruction of the block. A match will cause the code * to skip past the last instruction of the block. * * NOTA BENE: in a couple of places we assume that * sizeof(ipfw_insn) == sizeof(u_int32_t) * this needs to be fixed. * */ typedef struct _ipfw_insn { /* template for instructions */ u_int8_t opcode; u_int8_t len; /* number of 32-bit words */ #define F_NOT 0x80 #define F_OR 0x40 #define F_LEN_MASK 0x3f #define F_LEN(cmd) ((cmd)->len & F_LEN_MASK) u_int16_t arg1; } ipfw_insn; /* * The F_INSN_SIZE(type) computes the size, in 4-byte words, of * a given type. */ #define F_INSN_SIZE(t) ((sizeof (t))/sizeof(u_int32_t)) /* * This is used to store an array of 16-bit entries (ports etc.) */ typedef struct _ipfw_insn_u16 { ipfw_insn o; u_int16_t ports[2]; /* there may be more */ } ipfw_insn_u16; /* * This is used to store an array of 32-bit entries * (uid, single IPv4 addresses etc.) */ typedef struct _ipfw_insn_u32 { ipfw_insn o; u_int32_t d[1]; /* one or more */ } ipfw_insn_u32; /* * This is used to store IP addr-mask pairs. */ typedef struct _ipfw_insn_ip { ipfw_insn o; struct in_addr addr; struct in_addr mask; } ipfw_insn_ip; /* * This is used to forward to a given address (ip). */ typedef struct _ipfw_insn_sa { ipfw_insn o; struct sockaddr_in sa; } ipfw_insn_sa; /* * This is used to forward to a given address (ipv6). */ typedef struct _ipfw_insn_sa6 { ipfw_insn o; struct sockaddr_in6 sa; } ipfw_insn_sa6; /* * This is used for MAC addr-mask pairs. */ typedef struct _ipfw_insn_mac { ipfw_insn o; u_char addr[12]; /* dst[6] + src[6] */ u_char mask[12]; /* dst[6] + src[6] */ } ipfw_insn_mac; /* * This is used for interface match rules (recv xx, xmit xx). */ typedef struct _ipfw_insn_if { ipfw_insn o; union { struct in_addr ip; int glob; uint16_t kidx; } p; char name[IFNAMSIZ]; } ipfw_insn_if; /* * This is used for storing an altq queue id number. */ typedef struct _ipfw_insn_altq { ipfw_insn o; u_int32_t qid; } ipfw_insn_altq; /* * This is used for limit rules. */ typedef struct _ipfw_insn_limit { ipfw_insn o; u_int8_t _pad; u_int8_t limit_mask; /* combination of DYN_* below */ #define DYN_SRC_ADDR 0x1 #define DYN_SRC_PORT 0x2 #define DYN_DST_ADDR 0x4 #define DYN_DST_PORT 0x8 u_int16_t conn_limit; } ipfw_insn_limit; /* * This is used for log instructions. */ typedef struct _ipfw_insn_log { ipfw_insn o; u_int32_t max_log; /* how many do we log -- 0 = all */ u_int32_t log_left; /* how many left to log */ } ipfw_insn_log; /* Legacy NAT structures, compat only */ #ifndef _KERNEL /* * Data structures required by both ipfw(8) and ipfw(4) but not part of the * management API are protected by IPFW_INTERNAL. */ #ifdef IPFW_INTERNAL /* Server pool support (LSNAT). */ struct cfg_spool { LIST_ENTRY(cfg_spool) _next; /* chain of spool instances */ struct in_addr addr; u_short port; }; #endif /* Redirect modes id. */ #define REDIR_ADDR 0x01 #define REDIR_PORT 0x02 #define REDIR_PROTO 0x04 #ifdef IPFW_INTERNAL /* Nat redirect configuration. */ struct cfg_redir { LIST_ENTRY(cfg_redir) _next; /* chain of redir instances */ u_int16_t mode; /* type of redirect mode */ struct in_addr laddr; /* local ip address */ struct in_addr paddr; /* public ip address */ struct in_addr raddr; /* remote ip address */ u_short lport; /* local port */ u_short pport; /* public port */ u_short rport; /* remote port */ u_short pport_cnt; /* number of public ports */ u_short rport_cnt; /* number of remote ports */ int proto; /* protocol: tcp/udp */ struct alias_link **alink; /* num of entry in spool chain */ u_int16_t spool_cnt; /* chain of spool instances */ LIST_HEAD(spool_chain, cfg_spool) spool_chain; }; #endif #ifdef IPFW_INTERNAL /* Nat configuration data struct. */ struct cfg_nat { /* chain of nat instances */ LIST_ENTRY(cfg_nat) _next; int id; /* nat id */ struct in_addr ip; /* nat ip address */ char if_name[IF_NAMESIZE]; /* interface name */ int mode; /* aliasing mode */ struct libalias *lib; /* libalias instance */ /* number of entry in spool chain */ int redir_cnt; /* chain of redir instances */ LIST_HEAD(redir_chain, cfg_redir) redir_chain; }; #endif #define SOF_NAT sizeof(struct cfg_nat) #define SOF_REDIR sizeof(struct cfg_redir) #define SOF_SPOOL sizeof(struct cfg_spool) #endif /* ifndef _KERNEL */ struct nat44_cfg_spool { struct in_addr addr; uint16_t port; uint16_t spare; }; #define NAT44_REDIR_ADDR 0x01 #define NAT44_REDIR_PORT 0x02 #define NAT44_REDIR_PROTO 0x04 /* Nat redirect configuration. */ struct nat44_cfg_redir { struct in_addr laddr; /* local ip address */ struct in_addr paddr; /* public ip address */ struct in_addr raddr; /* remote ip address */ uint16_t lport; /* local port */ uint16_t pport; /* public port */ uint16_t rport; /* remote port */ uint16_t pport_cnt; /* number of public ports */ uint16_t rport_cnt; /* number of remote ports */ uint16_t mode; /* type of redirect mode */ uint16_t spool_cnt; /* num of entry in spool chain */ uint16_t spare; uint32_t proto; /* protocol: tcp/udp */ }; /* Nat configuration data struct. */ struct nat44_cfg_nat { char name[64]; /* nat name */ char if_name[64]; /* interface name */ uint32_t size; /* structure size incl. redirs */ struct in_addr ip; /* nat IPv4 address */ uint32_t mode; /* aliasing mode */ uint32_t redir_cnt; /* number of entry in spool chain */ }; /* Nat command. */ typedef struct _ipfw_insn_nat { ipfw_insn o; struct cfg_nat *nat; } ipfw_insn_nat; /* Apply ipv6 mask on ipv6 addr */ #define APPLY_MASK(addr,mask) \ (addr)->__u6_addr.__u6_addr32[0] &= (mask)->__u6_addr.__u6_addr32[0]; \ (addr)->__u6_addr.__u6_addr32[1] &= (mask)->__u6_addr.__u6_addr32[1]; \ (addr)->__u6_addr.__u6_addr32[2] &= (mask)->__u6_addr.__u6_addr32[2]; \ (addr)->__u6_addr.__u6_addr32[3] &= (mask)->__u6_addr.__u6_addr32[3]; /* Structure for ipv6 */ typedef struct _ipfw_insn_ip6 { ipfw_insn o; struct in6_addr addr6; struct in6_addr mask6; } ipfw_insn_ip6; /* Used to support icmp6 types */ typedef struct _ipfw_insn_icmp6 { ipfw_insn o; uint32_t d[7]; /* XXX This number si related to the netinet/icmp6.h * define ICMP6_MAXTYPE * as follows: n = ICMP6_MAXTYPE/32 + 1 * Actually is 203 */ } ipfw_insn_icmp6; /* * Here we have the structure representing an ipfw rule. * * Layout: * struct ip_fw_rule * [ counter block, size = rule->cntr_len ] * [ one or more instructions, size = rule->cmd_len * 4 ] * * It starts with a general area (with link fields). * Counter block may be next (if rule->cntr_len > 0), * followed by an array of one or more instructions, which the code * accesses as an array of 32-bit values. rule->cmd_len represents * the total instructions legth in u32 worrd, while act_ofs represents * rule action offset in u32 words. * * When assembling instruction, remember the following: * * + if a rule has a "keep-state" (or "limit") option, then the * first instruction (at r->cmd) MUST BE an O_PROBE_STATE * + if a rule has a "log" option, then the first action * (at ACTION_PTR(r)) MUST be O_LOG * + if a rule has an "altq" option, it comes after "log" * + if a rule has an O_TAG option, it comes after "log" and "altq" * * * All structures (excluding instructions) are u64-aligned. * Please keep this. */ struct ip_fw_rule { uint16_t act_ofs; /* offset of action in 32-bit units */ uint16_t cmd_len; /* # of 32-bit words in cmd */ uint16_t spare; uint8_t set; /* rule set (0..31) */ uint8_t flags; /* rule flags */ uint32_t rulenum; /* rule number */ uint32_t id; /* rule id */ ipfw_insn cmd[1]; /* storage for commands */ }; #define IPFW_RULE_NOOPT 0x01 /* Has no options in body */ /* Unaligned version */ /* Base ipfw rule counter block. */ struct ip_fw_bcounter { uint16_t size; /* Size of counter block, bytes */ uint8_t flags; /* flags for given block */ uint8_t spare; uint32_t timestamp; /* tv_sec of last match */ uint64_t pcnt; /* Packet counter */ uint64_t bcnt; /* Byte counter */ }; #ifndef _KERNEL /* * Legacy rule format */ struct ip_fw { struct ip_fw *x_next; /* linked list of rules */ struct ip_fw *next_rule; /* ptr to next [skipto] rule */ /* 'next_rule' is used to pass up 'set_disable' status */ uint16_t act_ofs; /* offset of action in 32-bit units */ uint16_t cmd_len; /* # of 32-bit words in cmd */ uint16_t rulenum; /* rule number */ uint8_t set; /* rule set (0..31) */ uint8_t _pad; /* padding */ uint32_t id; /* rule id */ /* These fields are present in all rules. */ uint64_t pcnt; /* Packet counter */ uint64_t bcnt; /* Byte counter */ uint32_t timestamp; /* tv_sec of last match */ ipfw_insn cmd[1]; /* storage for commands */ }; #endif #define ACTION_PTR(rule) \ (ipfw_insn *)( (u_int32_t *)((rule)->cmd) + ((rule)->act_ofs) ) #define RULESIZE(rule) (sizeof(*(rule)) + (rule)->cmd_len * 4 - 4) #if 1 // should be moved to in.h /* * This structure is used as a flow mask and a flow id for various * parts of the code. * addr_type is used in userland and kernel to mark the address type. * fib is used in the kernel to record the fib in use. * _flags is used in the kernel to store tcp flags for dynamic rules. */ struct ipfw_flow_id { uint32_t dst_ip; uint32_t src_ip; uint16_t dst_port; uint16_t src_port; uint8_t fib; uint8_t proto; uint8_t _flags; /* protocol-specific flags */ uint8_t addr_type; /* 4=ip4, 6=ip6, 1=ether ? */ struct in6_addr dst_ip6; struct in6_addr src_ip6; uint32_t flow_id6; uint32_t extra; /* queue/pipe or frag_id */ }; #endif #define IS_IP6_FLOW_ID(id) ((id)->addr_type == 6) /* * Dynamic ipfw rule. */ typedef struct _ipfw_dyn_rule ipfw_dyn_rule; struct _ipfw_dyn_rule { ipfw_dyn_rule *next; /* linked list of rules. */ struct ip_fw *rule; /* pointer to rule */ /* 'rule' is used to pass up the rule number (from the parent) */ ipfw_dyn_rule *parent; /* pointer to parent rule */ u_int64_t pcnt; /* packet match counter */ u_int64_t bcnt; /* byte match counter */ struct ipfw_flow_id id; /* (masked) flow id */ u_int32_t expire; /* expire time */ u_int32_t bucket; /* which bucket in hash table */ u_int32_t state; /* state of this rule (typically a * combination of TCP flags) */ u_int32_t ack_fwd; /* most recent ACKs in forward */ u_int32_t ack_rev; /* and reverse directions (used */ /* to generate keepalives) */ u_int16_t dyn_type; /* rule type */ u_int16_t count; /* refcount */ }; /* * Definitions for IP option names. */ #define IP_FW_IPOPT_LSRR 0x01 #define IP_FW_IPOPT_SSRR 0x02 #define IP_FW_IPOPT_RR 0x04 #define IP_FW_IPOPT_TS 0x08 /* * Definitions for TCP option names. */ #define IP_FW_TCPOPT_MSS 0x01 #define IP_FW_TCPOPT_WINDOW 0x02 #define IP_FW_TCPOPT_SACK 0x04 #define IP_FW_TCPOPT_TS 0x08 #define IP_FW_TCPOPT_CC 0x10 #define ICMP_REJECT_RST 0x100 /* fake ICMP code (send a TCP RST) */ #define ICMP6_UNREACH_RST 0x100 /* fake ICMPv6 code (send a TCP RST) */ /* * These are used for lookup tables. */ #define IPFW_TABLE_ADDR 1 /* Table for holding IPv4/IPv6 prefixes */ #define IPFW_TABLE_INTERFACE 2 /* Table for holding interface names */ #define IPFW_TABLE_NUMBER 3 /* Table for holding ports/uid/gid/etc */ #define IPFW_TABLE_FLOW 4 /* Table for holding flow data */ #define IPFW_TABLE_MAXTYPE 4 /* Maximum valid number */ #define IPFW_TABLE_CIDR IPFW_TABLE_ADDR /* compat */ /* Value types */ #define IPFW_VTYPE_LEGACY 0xFFFFFFFF /* All data is filled in */ #define IPFW_VTYPE_SKIPTO 0x00000001 /* skipto/call/callreturn */ #define IPFW_VTYPE_PIPE 0x00000002 /* pipe/queue */ #define IPFW_VTYPE_FIB 0x00000004 /* setfib */ #define IPFW_VTYPE_NAT 0x00000008 /* nat */ #define IPFW_VTYPE_DSCP 0x00000010 /* dscp */ #define IPFW_VTYPE_TAG 0x00000020 /* tag/untag */ #define IPFW_VTYPE_DIVERT 0x00000040 /* divert/tee */ #define IPFW_VTYPE_NETGRAPH 0x00000080 /* netgraph/ngtee */ #define IPFW_VTYPE_LIMIT 0x00000100 /* limit */ #define IPFW_VTYPE_NH4 0x00000200 /* IPv4 nexthop */ #define IPFW_VTYPE_NH6 0x00000400 /* IPv6 nexthop */ typedef struct _ipfw_table_entry { in_addr_t addr; /* network address */ u_int32_t value; /* value */ u_int16_t tbl; /* table number */ u_int8_t masklen; /* mask length */ } ipfw_table_entry; typedef struct _ipfw_table_xentry { uint16_t len; /* Total entry length */ uint8_t type; /* entry type */ uint8_t masklen; /* mask length */ uint16_t tbl; /* table number */ uint16_t flags; /* record flags */ uint32_t value; /* value */ union { /* Longest field needs to be aligned by 4-byte boundary */ struct in6_addr addr6; /* IPv6 address */ char iface[IF_NAMESIZE]; /* interface name */ } k; } ipfw_table_xentry; #define IPFW_TCF_INET 0x01 /* CIDR flags: IPv4 record */ typedef struct _ipfw_table { u_int32_t size; /* size of entries in bytes */ u_int32_t cnt; /* # of entries */ u_int16_t tbl; /* table number */ ipfw_table_entry ent[0]; /* entries */ } ipfw_table; typedef struct _ipfw_xtable { ip_fw3_opheader opheader; /* IP_FW3 opcode */ uint32_t size; /* size of entries in bytes */ uint32_t cnt; /* # of entries */ uint16_t tbl; /* table number */ uint8_t type; /* table type */ ipfw_table_xentry xent[0]; /* entries */ } ipfw_xtable; typedef struct _ipfw_obj_tlv { uint16_t type; /* TLV type */ uint16_t flags; /* TLV-specific flags */ uint32_t length; /* Total length, aligned to u64 */ } ipfw_obj_tlv; #define IPFW_TLV_TBL_NAME 1 #define IPFW_TLV_TBLNAME_LIST 2 #define IPFW_TLV_RULE_LIST 3 #define IPFW_TLV_DYNSTATE_LIST 4 #define IPFW_TLV_TBL_ENT 5 #define IPFW_TLV_DYN_ENT 6 #define IPFW_TLV_RULE_ENT 7 #define IPFW_TLV_TBLENT_LIST 8 #define IPFW_TLV_RANGE 9 /* Object name TLV */ typedef struct _ipfw_obj_ntlv { ipfw_obj_tlv head; /* TLV header */ uint16_t idx; /* Name index */ uint8_t spare; /* unused */ uint8_t type; /* object type, if applicable */ uint32_t set; /* set, if applicable */ char name[64]; /* Null-terminated name */ } ipfw_obj_ntlv; /* IPv4/IPv6 L4 flow description */ struct tflow_entry { uint8_t af; uint8_t proto; uint16_t spare; uint16_t sport; uint16_t dport; union { struct { struct in_addr sip; struct in_addr dip; } a4; struct { struct in6_addr sip6; struct in6_addr dip6; } a6; } a; }; typedef struct _ipfw_table_value { uint32_t tag; /* O_TAG/O_TAGGED */ uint32_t pipe; /* O_PIPE/O_QUEUE */ uint16_t divert; /* O_DIVERT/O_TEE */ uint16_t skipto; /* skipto, CALLRET */ uint32_t netgraph; /* O_NETGRAPH/O_NGTEE */ uint32_t fib; /* O_SETFIB */ uint32_t nat; /* O_NAT */ uint32_t nh4; uint8_t dscp; uint8_t spare0[3]; struct in6_addr nh6; uint32_t limit; /* O_LIMIT */ uint32_t spare1; uint64_t reserved; } ipfw_table_value; /* Table entry TLV */ typedef struct _ipfw_obj_tentry { ipfw_obj_tlv head; /* TLV header */ uint8_t subtype; /* subtype (IPv4,IPv6) */ uint8_t masklen; /* mask length */ uint8_t result; /* request result */ uint8_t spare0; uint16_t idx; /* Table name index */ uint16_t spare1; union { /* Longest field needs to be aligned by 8-byte boundary */ struct in_addr addr; /* IPv4 address */ uint32_t key; /* uid/gid/port */ struct in6_addr addr6; /* IPv6 address */ char iface[IF_NAMESIZE]; /* interface name */ struct tflow_entry flow; } k; union { ipfw_table_value value; /* value data */ uint32_t kidx; /* value kernel index */ } v; } ipfw_obj_tentry; #define IPFW_TF_UPDATE 0x01 /* Update record if exists */ /* Container TLV */ #define IPFW_CTF_ATOMIC 0x01 /* Perform atomic operation */ /* Operation results */ #define IPFW_TR_IGNORED 0 /* Entry was ignored (rollback) */ #define IPFW_TR_ADDED 1 /* Entry was succesfully added */ #define IPFW_TR_UPDATED 2 /* Entry was succesfully updated*/ #define IPFW_TR_DELETED 3 /* Entry was succesfully deleted*/ #define IPFW_TR_LIMIT 4 /* Entry was ignored (limit) */ #define IPFW_TR_NOTFOUND 5 /* Entry was not found */ #define IPFW_TR_EXISTS 6 /* Entry already exists */ #define IPFW_TR_ERROR 7 /* Request has failed (unknown) */ typedef struct _ipfw_obj_dyntlv { ipfw_obj_tlv head; ipfw_dyn_rule state; } ipfw_obj_dyntlv; #define IPFW_DF_LAST 0x01 /* Last state in chain */ /* Containter TLVs */ typedef struct _ipfw_obj_ctlv { ipfw_obj_tlv head; /* TLV header */ uint32_t count; /* Number of sub-TLVs */ uint16_t objsize; /* Single object size */ uint8_t version; /* TLV version */ uint8_t flags; /* TLV-specific flags */ } ipfw_obj_ctlv; /* Range TLV */ typedef struct _ipfw_range_tlv { ipfw_obj_tlv head; /* TLV header */ uint32_t flags; /* Range flags */ uint16_t start_rule; /* Range start */ uint16_t end_rule; /* Range end */ uint32_t set; /* Range set to match */ uint32_t new_set; /* New set to move/swap to */ } ipfw_range_tlv; #define IPFW_RCFLAG_RANGE 0x01 /* rule range is set */ #define IPFW_RCFLAG_ALL 0x02 /* match ALL rules */ #define IPFW_RCFLAG_SET 0x04 /* match rules in given set */ /* User-settable flags */ #define IPFW_RCFLAG_USER (IPFW_RCFLAG_RANGE | IPFW_RCFLAG_ALL | \ IPFW_RCFLAG_SET) /* Internally used flags */ #define IPFW_RCFLAG_DEFAULT 0x0100 /* Do not skip defaul rule */ typedef struct _ipfw_ta_tinfo { uint32_t flags; /* Format flags */ uint32_t spare; uint8_t taclass4; /* algorithm class */ uint8_t spare4; uint16_t itemsize4; /* item size in runtime */ uint32_t size4; /* runtime structure size */ uint32_t count4; /* number of items in runtime */ uint8_t taclass6; /* algorithm class */ uint8_t spare6; uint16_t itemsize6; /* item size in runtime */ uint32_t size6; /* runtime structure size */ uint32_t count6; /* number of items in runtime */ } ipfw_ta_tinfo; #define IPFW_TACLASS_HASH 1 /* algo is based on hash */ #define IPFW_TACLASS_ARRAY 2 /* algo is based on array */ #define IPFW_TACLASS_RADIX 3 /* algo is based on radix tree */ #define IPFW_TATFLAGS_DATA 0x0001 /* Has data filled in */ #define IPFW_TATFLAGS_AFDATA 0x0002 /* Separate data per AF */ #define IPFW_TATFLAGS_AFITEM 0x0004 /* diff. items per AF */ typedef struct _ipfw_xtable_info { uint8_t type; /* table type (addr,iface,..) */ uint8_t tflags; /* type flags */ uint16_t mflags; /* modification flags */ uint16_t flags; /* generic table flags */ uint16_t spare[3]; uint32_t vmask; /* bitmask with value types */ uint32_t set; /* set table is in */ uint32_t kidx; /* kernel index */ uint32_t refcnt; /* number of references */ uint32_t count; /* Number of records */ uint32_t size; /* Total size of records(export)*/ uint32_t limit; /* Max number of records */ char tablename[64]; /* table name */ char algoname[64]; /* algorithm name */ ipfw_ta_tinfo ta_info; /* additional algo stats */ } ipfw_xtable_info; /* Generic table flags */ #define IPFW_TGFLAGS_LOCKED 0x01 /* Tables is locked from changes*/ /* Table type-specific flags */ #define IPFW_TFFLAG_SRCIP 0x01 #define IPFW_TFFLAG_DSTIP 0x02 #define IPFW_TFFLAG_SRCPORT 0x04 #define IPFW_TFFLAG_DSTPORT 0x08 #define IPFW_TFFLAG_PROTO 0x10 /* Table modification flags */ #define IPFW_TMFLAGS_LIMIT 0x0002 /* Change limit value */ #define IPFW_TMFLAGS_LOCK 0x0004 /* Change table lock state */ typedef struct _ipfw_iface_info { char ifname[64]; /* interface name */ uint32_t ifindex; /* interface index */ uint32_t flags; /* flags */ uint32_t refcnt; /* number of references */ uint32_t gencnt; /* number of changes */ uint64_t spare; } ipfw_iface_info; #define IPFW_IFFLAG_RESOLVED 0x01 /* Interface exists */ typedef struct _ipfw_ta_info { char algoname[64]; /* algorithm name */ uint32_t type; /* lookup type */ uint32_t flags; uint32_t refcnt; uint32_t spare0; uint64_t spare1; } ipfw_ta_info; #define IPFW_OBJTYPE_TABLE 1 typedef struct _ipfw_obj_header { ip_fw3_opheader opheader; /* IP_FW3 opcode */ uint32_t spare; uint16_t idx; /* object name index */ uint8_t objtype; /* object type */ uint8_t objsubtype; /* object subtype */ ipfw_obj_ntlv ntlv; /* object name tlv */ } ipfw_obj_header; typedef struct _ipfw_obj_lheader { ip_fw3_opheader opheader; /* IP_FW3 opcode */ uint32_t set_mask; /* disabled set mask */ uint32_t count; /* Total objects count */ uint32_t size; /* Total size (incl. header) */ uint32_t objsize; /* Size of one object */ } ipfw_obj_lheader; #define IPFW_CFG_GET_STATIC 0x01 #define IPFW_CFG_GET_STATES 0x02 #define IPFW_CFG_GET_COUNTERS 0x04 typedef struct _ipfw_cfg_lheader { ip_fw3_opheader opheader; /* IP_FW3 opcode */ uint32_t set_mask; /* enabled set mask */ uint32_t spare; uint32_t flags; /* Request flags */ uint32_t size; /* neded buffer size */ uint32_t start_rule; uint32_t end_rule; } ipfw_cfg_lheader; typedef struct _ipfw_range_header { ip_fw3_opheader opheader; /* IP_FW3 opcode */ ipfw_range_tlv range; } ipfw_range_header; typedef struct _ipfw_sopt_info { uint16_t opcode; uint8_t version; uint8_t dir; uint8_t spare; uint64_t refcnt; } ipfw_sopt_info; #endif /* _IPFW2_H */ nextepc-0.3.10/lib/ipfw/objs/include_e/sys/000077500000000000000000000000001333553357400204715ustar00rootroot00000000000000nextepc-0.3.10/lib/ipfw/objs/include_e/sys/sockio.h000066400000000000000000000000001333553357400221170ustar00rootroot00000000000000nextepc-0.3.10/lib/ipfw/objs/include_e/timeconv.h000066400000000000000000000000001333553357400216360ustar00rootroot00000000000000nextepc-0.3.10/lib/ipfw/tables.c000066400000000000000000001265031333553357400164140ustar00rootroot00000000000000/* * Copyright (c) 2014 Yandex LLC * Copyright (c) 2014 Alexander V. Chernikov * * Redistribution and use in source forms, with and without modification, * are permitted provided that this entire comment appears intact. * * Redistribution in binary form may occur without any restrictions. * Obviously, it would be nice if you gave credit where credit is due * but requiring it would be too onerous. * * This software is provided ``AS IS'' without any warranties of any kind. * * in-kernel ipfw tables support. * * $FreeBSD: head/sbin/ipfw/tables.c 273241 2014-10-17 20:47:55Z melifaro $ */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "ipfw2.h" static void table_modify_record(ipfw_obj_header *oh, int ac, char *av[], int add, int quiet, int update, int atomic); static int table_flush(ipfw_obj_header *oh); static int table_destroy(ipfw_obj_header *oh); static int table_do_create(ipfw_obj_header *oh, ipfw_xtable_info *i); static int table_do_modify(ipfw_obj_header *oh, ipfw_xtable_info *i); static int table_do_swap(ipfw_obj_header *oh, char *second); static void table_create(ipfw_obj_header *oh, int ac, char *av[]); static void table_modify(ipfw_obj_header *oh, int ac, char *av[]); static void table_lookup(ipfw_obj_header *oh, int ac, char *av[]); static void table_lock(ipfw_obj_header *oh, int lock); static int table_swap(ipfw_obj_header *oh, char *second); static int table_get_info(ipfw_obj_header *oh, ipfw_xtable_info *i); static int table_show_info(ipfw_xtable_info *i, void *arg); static void table_fill_ntlv(ipfw_obj_ntlv *ntlv, char *name, uint32_t set, uint16_t uidx); static int table_flush_one(ipfw_xtable_info *i, void *arg); static int table_show_one(ipfw_xtable_info *i, void *arg); static int table_do_get_list(ipfw_xtable_info *i, ipfw_obj_header **poh); static void table_show_list(ipfw_obj_header *oh, int need_header); static void table_show_entry(ipfw_xtable_info *i, ipfw_obj_tentry *tent); static void tentry_fill_key(ipfw_obj_header *oh, ipfw_obj_tentry *tent, char *key, int add, uint8_t *ptype, uint32_t *pvmask, ipfw_xtable_info *xi); static void tentry_fill_value(ipfw_obj_header *oh, ipfw_obj_tentry *tent, char *arg, uint8_t type, uint32_t vmask); static void table_show_value(char *buf, size_t bufsize, ipfw_table_value *v, uint32_t vmask, int print_ip); typedef int (table_cb_t)(ipfw_xtable_info *i, void *arg); static int tables_foreach(table_cb_t *f, void *arg, int sort); #ifndef s6_addr32 #define s6_addr32 __u6_addr.__u6_addr32 #endif static struct _s_x tabletypes[] = { { "addr", IPFW_TABLE_ADDR }, { "iface", IPFW_TABLE_INTERFACE }, { "number", IPFW_TABLE_NUMBER }, { "flow", IPFW_TABLE_FLOW }, { NULL, 0 } }; static struct _s_x tablevaltypes[] = { { "skipto", IPFW_VTYPE_SKIPTO }, { "pipe", IPFW_VTYPE_PIPE }, { "fib", IPFW_VTYPE_FIB }, { "nat", IPFW_VTYPE_NAT }, { "dscp", IPFW_VTYPE_DSCP }, { "tag", IPFW_VTYPE_TAG }, { "divert", IPFW_VTYPE_DIVERT }, { "netgraph", IPFW_VTYPE_NETGRAPH }, { "limit", IPFW_VTYPE_LIMIT }, { "ipv4", IPFW_VTYPE_NH4 }, { "ipv6", IPFW_VTYPE_NH6 }, { NULL, 0 } }; static struct _s_x tablecmds[] = { { "add", TOK_ADD }, { "delete", TOK_DEL }, { "create", TOK_CREATE }, { "destroy", TOK_DESTROY }, { "flush", TOK_FLUSH }, { "modify", TOK_MODIFY }, { "swap", TOK_SWAP }, { "info", TOK_INFO }, { "detail", TOK_DETAIL }, { "list", TOK_LIST }, { "lookup", TOK_LOOKUP }, { "atomic", TOK_ATOMIC }, { "lock", TOK_LOCK }, { "unlock", TOK_UNLOCK }, { NULL, 0 } }; static int lookup_host (char *host, struct in_addr *ipaddr) { struct hostent *he; if (!inet_aton(host, ipaddr)) { if ((he = gethostbyname(host)) == NULL) return(-1); *ipaddr = *(struct in_addr *)he->h_addr_list[0]; } return(0); } static int get_token(struct _s_x *table, char *string, char *errbase) { int tcmd; if ((tcmd = match_token_relaxed(table, string)) < 0) errx(EX_USAGE, "%s %s %s", (tcmd == 0) ? "invalid" : "ambiguous", errbase, string); return (tcmd); } /* * This one handles all table-related commands * ipfw table NAME create ... * ipfw table NAME modify ... * ipfw table NAME destroy * ipfw table NAME swap NAME * ipfw table NAME lock * ipfw table NAME unlock * ipfw table NAME add addr[/masklen] [value] * ipfw table NAME add [addr[/masklen] value] [addr[/masklen] value] .. * ipfw table NAME delete addr[/masklen] [addr[/masklen]] .. * ipfw table NAME lookup addr * ipfw table {NAME | all} flush * ipfw table {NAME | all} list * ipfw table {NAME | all} info * ipfw table {NAME | all} detail */ void ipfw_table_handler(int ac, char *av[]) { int do_add, is_all; int atomic, error, tcmd; ipfw_xtable_info i; ipfw_obj_header oh; char *tablename; uint32_t set; void *arg; memset(&oh, 0, sizeof(oh)); is_all = 0; if (co.use_set != 0) set = co.use_set - 1; else set = 0; ac--; av++; NEED1("table needs name"); tablename = *av; if (table_check_name(tablename) == 0) { table_fill_ntlv(&oh.ntlv, *av, set, 1); oh.idx = 1; } else { if (strcmp(tablename, "all") == 0) is_all = 1; else errx(EX_USAGE, "table name %s is invalid", tablename); } ac--; av++; NEED1("table needs command"); tcmd = get_token(tablecmds, *av, "table command"); /* Check if atomic operation was requested */ atomic = 0; if (tcmd == TOK_ATOMIC) { ac--; av++; NEED1("atomic needs command"); tcmd = get_token(tablecmds, *av, "table command"); switch (tcmd) { case TOK_ADD: break; default: errx(EX_USAGE, "atomic is not compatible with %s", *av); } atomic = 1; } switch (tcmd) { case TOK_LIST: case TOK_INFO: case TOK_DETAIL: case TOK_FLUSH: break; default: if (is_all != 0) errx(EX_USAGE, "table name required"); } switch (tcmd) { case TOK_ADD: case TOK_DEL: do_add = **av == 'a'; ac--; av++; table_modify_record(&oh, ac, av, do_add, co.do_quiet, co.do_quiet, atomic); break; case TOK_CREATE: ac--; av++; table_create(&oh, ac, av); break; case TOK_MODIFY: ac--; av++; table_modify(&oh, ac, av); break; case TOK_DESTROY: if (table_destroy(&oh) != 0) err(EX_OSERR, "failed to destroy table %s", tablename); break; case TOK_FLUSH: if (is_all == 0) { if ((error = table_flush(&oh)) != 0) err(EX_OSERR, "failed to flush table %s info", tablename); } else { error = tables_foreach(table_flush_one, &oh, 1); if (error != 0) err(EX_OSERR, "failed to flush tables list"); } break; case TOK_SWAP: ac--; av++; NEED1("second table name required"); table_swap(&oh, *av); break; case TOK_LOCK: case TOK_UNLOCK: table_lock(&oh, (tcmd == TOK_LOCK)); break; case TOK_DETAIL: case TOK_INFO: arg = (tcmd == TOK_DETAIL) ? (void *)1 : NULL; if (is_all == 0) { if ((error = table_get_info(&oh, &i)) != 0) err(EX_OSERR, "failed to request table info"); table_show_info(&i, arg); } else { error = tables_foreach(table_show_info, arg, 1); if (error != 0) err(EX_OSERR, "failed to request tables list"); } break; case TOK_LIST: if (is_all == 0) { ipfw_xtable_info i; if ((error = table_get_info(&oh, &i)) != 0) err(EX_OSERR, "failed to request table info"); table_show_one(&i, NULL); } else { error = tables_foreach(table_show_one, NULL, 1); if (error != 0) err(EX_OSERR, "failed to request tables list"); } break; case TOK_LOOKUP: ac--; av++; table_lookup(&oh, ac, av); break; } } static void table_fill_ntlv(ipfw_obj_ntlv *ntlv, char *name, uint32_t set, uint16_t uidx) { ntlv->head.type = IPFW_TLV_TBL_NAME; ntlv->head.length = sizeof(ipfw_obj_ntlv); ntlv->idx = uidx; ntlv->set = set; strlcpy(ntlv->name, name, sizeof(ntlv->name)); } static void table_fill_objheader(ipfw_obj_header *oh, ipfw_xtable_info *i) { oh->idx = 1; table_fill_ntlv(&oh->ntlv, i->tablename, i->set, 1); } static struct _s_x tablenewcmds[] = { { "type", TOK_TYPE }, { "valtype", TOK_VALTYPE }, { "algo", TOK_ALGO }, { "limit", TOK_LIMIT }, { "locked", TOK_LOCK }, { NULL, 0 } }; static struct _s_x flowtypecmds[] = { { "src-ip", IPFW_TFFLAG_SRCIP }, { "proto", IPFW_TFFLAG_PROTO }, { "src-port", IPFW_TFFLAG_SRCPORT }, { "dst-ip", IPFW_TFFLAG_DSTIP }, { "dst-port", IPFW_TFFLAG_DSTPORT }, { NULL, 0 } }; int table_parse_type(uint8_t ttype, char *p, uint8_t *tflags) { uint32_t fset, fclear; char *e; /* Parse type options */ switch(ttype) { case IPFW_TABLE_FLOW: fset = fclear = 0; if (fill_flags(flowtypecmds, p, &e, &fset, &fclear) != 0) errx(EX_USAGE, "unable to parse flow option %s", e); *tflags = fset; break; default: return (EX_USAGE); } return (0); } void table_print_type(char *tbuf, size_t size, uint8_t type, uint8_t tflags) { const char *tname; int l; if ((tname = match_value(tabletypes, type)) == NULL) tname = "unknown"; l = snprintf(tbuf, size, "%s", tname); tbuf += l; size -= l; switch(type) { case IPFW_TABLE_FLOW: if (tflags != 0) { *tbuf++ = ':'; l--; print_flags_buffer(tbuf, size, flowtypecmds, tflags); } break; } } /* * Creates new table * * ipfw table NAME create [ type { addr | iface | number | flow } ] * [ algo algoname ] */ static void table_create(ipfw_obj_header *oh, int ac, char *av[]) { ipfw_xtable_info xi; int error, tcmd, val; uint32_t fset, fclear; size_t sz; char *e, *p; char tbuf[128]; sz = sizeof(tbuf); memset(&xi, 0, sizeof(xi)); while (ac > 0) { tcmd = get_token(tablenewcmds, *av, "option"); ac--; av++; switch (tcmd) { case TOK_LIMIT: NEED1("limit value required"); xi.limit = strtol(*av, NULL, 10); ac--; av++; break; case TOK_TYPE: NEED1("table type required"); /* Type may have suboptions after ':' */ if ((p = strchr(*av, ':')) != NULL) *p++ = '\0'; val = match_token(tabletypes, *av); if (val == -1) { concat_tokens(tbuf, sizeof(tbuf), tabletypes, ", "); errx(EX_USAGE, "Unknown tabletype: %s. Supported: %s", *av, tbuf); } xi.type = val; if (p != NULL) { error = table_parse_type(val, p, &xi.tflags); if (error != 0) errx(EX_USAGE, "Unsupported suboptions: %s", p); } ac--; av++; break; case TOK_VALTYPE: NEED1("table value type required"); fset = fclear = 0; val = fill_flags(tablevaltypes, *av, &e, &fset, &fclear); if (val != -1) { xi.vmask = fset; ac--; av++; break; } concat_tokens(tbuf, sizeof(tbuf), tablevaltypes, ", "); errx(EX_USAGE, "Unknown value type: %s. Supported: %s", e, tbuf); break; case TOK_ALGO: NEED1("table algorithm name required"); if (strlen(*av) > sizeof(xi.algoname)) errx(EX_USAGE, "algorithm name too long"); strlcpy(xi.algoname, *av, sizeof(xi.algoname)); ac--; av++; break; case TOK_LOCK: xi.flags |= IPFW_TGFLAGS_LOCKED; break; } } /* Set some defaults to preserve compability */ if (xi.algoname[0] == '\0' && xi.type == 0) xi.type = IPFW_TABLE_ADDR; if (xi.vmask == 0) xi.vmask = IPFW_VTYPE_LEGACY; if ((error = table_do_create(oh, &xi)) != 0) err(EX_OSERR, "Table creation failed"); } /* * Creates new table * * Request: [ ipfw_obj_header ipfw_xtable_info ] * * Returns 0 on success. */ static int table_do_create(ipfw_obj_header *oh, ipfw_xtable_info *i) { char tbuf[sizeof(ipfw_obj_header) + sizeof(ipfw_xtable_info)]; int error; memcpy(tbuf, oh, sizeof(*oh)); memcpy(tbuf + sizeof(*oh), i, sizeof(*i)); oh = (ipfw_obj_header *)tbuf; error = do_set3(IP_FW_TABLE_XCREATE, &oh->opheader, sizeof(tbuf)); return (error); } /* * Modifies existing table * * ipfw table NAME modify [ limit number ] */ static void table_modify(ipfw_obj_header *oh, int ac, char *av[]) { ipfw_xtable_info xi; int tcmd; size_t sz; char tbuf[128]; sz = sizeof(tbuf); memset(&xi, 0, sizeof(xi)); while (ac > 0) { tcmd = get_token(tablenewcmds, *av, "option"); ac--; av++; switch (tcmd) { case TOK_LIMIT: NEED1("limit value required"); xi.limit = strtol(*av, NULL, 10); xi.mflags |= IPFW_TMFLAGS_LIMIT; ac--; av++; break; default: errx(EX_USAGE, "cmd is not supported for modificatiob"); } } if (table_do_modify(oh, &xi) != 0) err(EX_OSERR, "Table modification failed"); } /* * Modifies existing table. * * Request: [ ipfw_obj_header ipfw_xtable_info ] * * Returns 0 on success. */ static int table_do_modify(ipfw_obj_header *oh, ipfw_xtable_info *i) { char tbuf[sizeof(ipfw_obj_header) + sizeof(ipfw_xtable_info)]; int error; memcpy(tbuf, oh, sizeof(*oh)); memcpy(tbuf + sizeof(*oh), i, sizeof(*i)); oh = (ipfw_obj_header *)tbuf; error = do_set3(IP_FW_TABLE_XMODIFY, &oh->opheader, sizeof(tbuf)); return (error); } /* * Locks or unlocks given table */ static void table_lock(ipfw_obj_header *oh, int lock) { ipfw_xtable_info xi; memset(&xi, 0, sizeof(xi)); xi.mflags |= IPFW_TMFLAGS_LOCK; xi.flags |= (lock != 0) ? IPFW_TGFLAGS_LOCKED : 0; if (table_do_modify(oh, &xi) != 0) err(EX_OSERR, "Table %s failed", lock != 0 ? "lock" : "unlock"); } /* * Destroys given table specified by @oh->ntlv. * Returns 0 on success. */ static int table_destroy(ipfw_obj_header *oh) { if (do_set3(IP_FW_TABLE_XDESTROY, &oh->opheader, sizeof(*oh)) != 0) return (-1); return (0); } /* * Flushes given table specified by @oh->ntlv. * Returns 0 on success. */ static int table_flush(ipfw_obj_header *oh) { if (do_set3(IP_FW_TABLE_XFLUSH, &oh->opheader, sizeof(*oh)) != 0) return (-1); return (0); } static int table_do_swap(ipfw_obj_header *oh, char *second) { char tbuf[sizeof(ipfw_obj_header) + sizeof(ipfw_obj_ntlv)]; int error; memset(tbuf, 0, sizeof(tbuf)); memcpy(tbuf, oh, sizeof(*oh)); oh = (ipfw_obj_header *)tbuf; table_fill_ntlv((ipfw_obj_ntlv *)(oh + 1), second, oh->ntlv.set, 1); error = do_set3(IP_FW_TABLE_XSWAP, &oh->opheader, sizeof(tbuf)); return (error); } /* * Swaps given table with @second one. */ static int table_swap(ipfw_obj_header *oh, char *second) { int error; if (table_check_name(second) != 0) errx(EX_USAGE, "table name %s is invalid", second); error = table_do_swap(oh, second); switch (error) { case EINVAL: errx(EX_USAGE, "Unable to swap table: check types"); case EFBIG: errx(EX_USAGE, "Unable to swap table: check limits"); } return (0); } /* * Retrieves table in given table specified by @oh->ntlv. * it inside @i. * Returns 0 on success. */ static int table_get_info(ipfw_obj_header *oh, ipfw_xtable_info *i) { char tbuf[sizeof(ipfw_obj_header) + sizeof(ipfw_xtable_info)]; size_t sz; sz = sizeof(tbuf); memset(tbuf, 0, sizeof(tbuf)); memcpy(tbuf, oh, sizeof(*oh)); oh = (ipfw_obj_header *)tbuf; if (do_get3(IP_FW_TABLE_XINFO, &oh->opheader, &sz) != 0) return (errno); if (sz < sizeof(tbuf)) return (EINVAL); *i = *(ipfw_xtable_info *)(oh + 1); return (0); } static struct _s_x tablealgoclass[] = { { "hash", IPFW_TACLASS_HASH }, { "array", IPFW_TACLASS_ARRAY }, { "radix", IPFW_TACLASS_RADIX }, { NULL, 0 } }; struct ta_cldata { uint8_t taclass; uint8_t spare4; uint16_t itemsize; uint16_t itemsize6; uint32_t size; uint32_t count; }; /* * Print global/per-AF table @i algorithm info. */ static void table_show_tainfo(ipfw_xtable_info *i, struct ta_cldata *d, const char *af, const char *taclass) { switch (d->taclass) { case IPFW_TACLASS_HASH: case IPFW_TACLASS_ARRAY: printf(" %salgorithm %s info\n", af, taclass); if (d->itemsize == d->itemsize6) printf(" size: %u items: %u itemsize: %u\n", d->size, d->count, d->itemsize); else printf(" size: %u items: %u " "itemsize4: %u itemsize6: %u\n", d->size, d->count, d->itemsize, d->itemsize6); break; case IPFW_TACLASS_RADIX: printf(" %salgorithm %s info\n", af, taclass); if (d->itemsize == d->itemsize6) printf(" items: %u itemsize: %u\n", d->count, d->itemsize); else printf(" items: %u " "itemsize4: %u itemsize6: %u\n", d->count, d->itemsize, d->itemsize6); break; default: printf(" algo class: %s\n", taclass); } } static void table_print_valheader(char *buf, size_t bufsize, uint32_t vmask) { if (vmask == IPFW_VTYPE_LEGACY) { snprintf(buf, bufsize, "legacy"); return; } print_flags_buffer(buf, bufsize, tablevaltypes, vmask); } /* * Prints table info struct @i in human-readable form. */ static int table_show_info(ipfw_xtable_info *i, void *arg) { const char *vtype; ipfw_ta_tinfo *tainfo; int afdata, afitem; struct ta_cldata d; char ttype[64], tvtype[64]; table_print_type(ttype, sizeof(ttype), i->type, i->tflags); table_print_valheader(tvtype, sizeof(tvtype), i->vmask); printf("--- table(%s), set(%u) ---\n", i->tablename, i->set); if ((i->flags & IPFW_TGFLAGS_LOCKED) != 0) printf(" kindex: %d, type: %s, locked\n", i->kidx, ttype); else printf(" kindex: %d, type: %s\n", i->kidx, ttype); printf(" references: %u, valtype: %s\n", i->refcnt, tvtype); printf(" algorithm: %s\n", i->algoname); printf(" items: %u, size: %u\n", i->count, i->size); if (i->limit > 0) printf(" limit: %u\n", i->limit); /* Print algo-specific info if requested & set */ if (arg == NULL) return (0); if ((i->ta_info.flags & IPFW_TATFLAGS_DATA) == 0) return (0); tainfo = &i->ta_info; afdata = 0; afitem = 0; if (tainfo->flags & IPFW_TATFLAGS_AFDATA) afdata = 1; if (tainfo->flags & IPFW_TATFLAGS_AFITEM) afitem = 1; memset(&d, 0, sizeof(d)); d.taclass = tainfo->taclass4; d.size = tainfo->size4; d.count = tainfo->count4; d.itemsize = tainfo->itemsize4; if (afdata == 0 && afitem != 0) d.itemsize6 = tainfo->itemsize6; else d.itemsize6 = d.itemsize; if ((vtype = match_value(tablealgoclass, d.taclass)) == NULL) vtype = "unknown"; if (afdata == 0) { table_show_tainfo(i, &d, "", vtype); } else { table_show_tainfo(i, &d, "IPv4 ", vtype); memset(&d, 0, sizeof(d)); d.taclass = tainfo->taclass6; if ((vtype = match_value(tablealgoclass, d.taclass)) == NULL) vtype = "unknown"; d.size = tainfo->size6; d.count = tainfo->count6; d.itemsize = tainfo->itemsize6; d.itemsize6 = d.itemsize; table_show_tainfo(i, &d, "IPv6 ", vtype); } return (0); } /* * Function wrappers which can be used either * as is or as foreach function parameter. */ static int table_show_one(ipfw_xtable_info *i, void *arg) { ipfw_obj_header *oh = NULL; // XXX uninitialized int error; if ((error = table_do_get_list(i, &oh)) != 0) { err(EX_OSERR, "Error requesting table %s list", i->tablename); return (error); } table_show_list(oh, 1); free(oh); return (0); } static int table_flush_one(ipfw_xtable_info *i, void *arg) { ipfw_obj_header *oh; oh = (ipfw_obj_header *)arg; table_fill_ntlv(&oh->ntlv, i->tablename, i->set, 1); return (table_flush(oh)); } static int table_do_modify_record(int cmd, ipfw_obj_header *oh, ipfw_obj_tentry *tent, int count, int atomic) { ipfw_obj_ctlv *ctlv; ipfw_obj_tentry *tent_base; caddr_t pbuf; char xbuf[sizeof(*oh) + sizeof(ipfw_obj_ctlv) + sizeof(*tent)]; int error, i; size_t sz; sz = sizeof(*ctlv) + sizeof(*tent) * count; if (count == 1) { memset(xbuf, 0, sizeof(xbuf)); pbuf = xbuf; } else { if ((pbuf = calloc(1, sizeof(*oh) + sz)) == NULL) return (ENOMEM); } memcpy(pbuf, oh, sizeof(*oh)); oh = (ipfw_obj_header *)pbuf; oh->opheader.version = 1; ctlv = (ipfw_obj_ctlv *)(oh + 1); ctlv->count = count; ctlv->head.length = sz; if (atomic != 0) ctlv->flags |= IPFW_CTF_ATOMIC; tent_base = tent; memcpy(ctlv + 1, tent, sizeof(*tent) * count); tent = (ipfw_obj_tentry *)(ctlv + 1); for (i = 0; i < count; i++, tent++) { tent->head.length = sizeof(ipfw_obj_tentry); tent->idx = oh->idx; } sz += sizeof(*oh); error = do_get3(cmd, &oh->opheader, &sz); tent = (ipfw_obj_tentry *)(ctlv + 1); /* Copy result back to provided buffer */ memcpy(tent_base, ctlv + 1, sizeof(*tent) * count); if (pbuf != xbuf) free(pbuf); return (error); } static void table_modify_record(ipfw_obj_header *oh, int ac, char *av[], int add, int quiet, int update, int atomic) { ipfw_obj_tentry *ptent, tent, *tent_buf; ipfw_xtable_info xi; uint8_t type; uint32_t vmask; int cmd, count, error, i, ignored; char *texterr, *etxt, *px; if (ac == 0) errx(EX_USAGE, "address required"); if (add != 0) { cmd = IP_FW_TABLE_XADD; texterr = "Adding record failed"; } else { cmd = IP_FW_TABLE_XDEL; texterr = "Deleting record failed"; } /* * Calculate number of entries: * Assume [key val] x N for add * and * key x N for delete */ count = (add != 0) ? ac / 2 + 1 : ac; if (count <= 1) { /* Adding single entry with/without value */ memset(&tent, 0, sizeof(tent)); tent_buf = &tent; } else { if ((tent_buf = calloc(count, sizeof(tent))) == NULL) errx(EX_OSERR, "Unable to allocate memory for all entries"); } ptent = tent_buf; memset(&xi, 0, sizeof(xi)); count = 0; while (ac > 0) { tentry_fill_key(oh, ptent, *av, add, &type, &vmask, &xi); /* * compability layer: auto-create table if not exists */ if (xi.tablename[0] == '\0') { xi.type = type; xi.vmask = vmask; strlcpy(xi.tablename, oh->ntlv.name, sizeof(xi.tablename)); fprintf(stderr, "DEPRECATED: inserting data info " "non-existent table %s. (auto-created)\n", xi.tablename); table_do_create(oh, &xi); } oh->ntlv.type = type; ac--; av++; if (add != 0 && ac > 0) { tentry_fill_value(oh, ptent, *av, type, vmask); ac--; av++; } if (update != 0) ptent->head.flags |= IPFW_TF_UPDATE; count++; ptent++; } error = table_do_modify_record(cmd, oh, tent_buf, count, atomic); quiet = 0; /* * Compatibility stuff: do not yell on duplicate keys or * failed deletions. */ if (error == 0 || (error == EEXIST && add != 0) || (error == ENOENT && add == 0)) { if (quiet != 0) { if (tent_buf != &tent) free(tent_buf); return; } } /* Report results back */ ptent = tent_buf; for (i = 0; i < count; ptent++, i++) { ignored = 0; switch (ptent->result) { case IPFW_TR_ADDED: px = "added"; break; case IPFW_TR_DELETED: px = "deleted"; break; case IPFW_TR_UPDATED: px = "updated"; break; case IPFW_TR_LIMIT: px = "limit"; ignored = 1; break; case IPFW_TR_ERROR: px = "error"; ignored = 1; break; case IPFW_TR_NOTFOUND: px = "notfound"; ignored = 1; break; case IPFW_TR_EXISTS: px = "exists"; ignored = 1; break; case IPFW_TR_IGNORED: px = "ignored"; ignored = 1; break; default: px = "unknown"; ignored = 1; } if (error != 0 && atomic != 0 && ignored == 0) printf("%s(reverted): ", px); else printf("%s: ", px); table_show_entry(&xi, ptent); } if (tent_buf != &tent) free(tent_buf); if (error == 0) return; /* Get real OS error */ error = errno; /* Try to provide more human-readable error */ switch (error) { case EEXIST: etxt = "record already exists"; break; case EFBIG: etxt = "limit hit"; break; case ESRCH: etxt = "table not found"; break; case ENOENT: etxt = "record not found"; break; case EACCES: etxt = "table is locked"; break; default: etxt = strerror(error); } errx(EX_OSERR, "%s: %s", texterr, etxt); } static int table_do_lookup(ipfw_obj_header *oh, char *key, ipfw_xtable_info *xi, ipfw_obj_tentry *xtent) { char xbuf[sizeof(ipfw_obj_header) + sizeof(ipfw_obj_tentry)]; ipfw_obj_tentry *tent; uint8_t type; uint32_t vmask; size_t sz; memcpy(xbuf, oh, sizeof(*oh)); oh = (ipfw_obj_header *)xbuf; tent = (ipfw_obj_tentry *)(oh + 1); memset(tent, 0, sizeof(*tent)); tent->head.length = sizeof(*tent); tent->idx = 1; tentry_fill_key(oh, tent, key, 0, &type, &vmask, xi); oh->ntlv.type = type; sz = sizeof(xbuf); if (do_get3(IP_FW_TABLE_XFIND, &oh->opheader, &sz) != 0) return (errno); if (sz < sizeof(xbuf)) return (EINVAL); *xtent = *tent; return (0); } static void table_lookup(ipfw_obj_header *oh, int ac, char *av[]) { ipfw_obj_tentry xtent; ipfw_xtable_info xi; char key[64]; int error; if (ac == 0) errx(EX_USAGE, "address required"); strlcpy(key, *av, sizeof(key)); memset(&xi, 0, sizeof(xi)); error = table_do_lookup(oh, key, &xi, &xtent); switch (error) { case 0: break; case ESRCH: errx(EX_UNAVAILABLE, "Table %s not found", oh->ntlv.name); case ENOENT: errx(EX_UNAVAILABLE, "Entry %s not found", *av); case ENOTSUP: errx(EX_UNAVAILABLE, "Table %s algo does not support " "\"lookup\" method", oh->ntlv.name); default: err(EX_OSERR, "getsockopt(IP_FW_TABLE_XFIND)"); } table_show_entry(&xi, &xtent); } static void tentry_fill_key_type(char *arg, ipfw_obj_tentry *tentry, uint8_t type, uint8_t tflags) { char *p, *pp; int mask, af; struct in6_addr *paddr, tmp; struct tflow_entry *tfe; uint32_t key, *pkey; uint16_t port; struct protoent *pent; struct servent *sent; int masklen; mask = 0; // XXX uninitialized ? masklen = 0; af = 0; paddr = (struct in6_addr *)&tentry->k; switch (type) { case IPFW_TABLE_ADDR: /* Remove / if exists */ if ((p = strchr(arg, '/')) != NULL) { *p = '\0'; mask = atoi(p + 1); } if (inet_pton(AF_INET, arg, paddr) == 1) { if (p != NULL && mask > 32) errx(EX_DATAERR, "bad IPv4 mask width: %s", p + 1); masklen = p ? mask : 32; af = AF_INET; } else if (inet_pton(AF_INET6, arg, paddr) == 1) { if (IN6_IS_ADDR_V4COMPAT(paddr)) errx(EX_DATAERR, "Use IPv4 instead of v4-compatible"); if (p != NULL && mask > 128) errx(EX_DATAERR, "bad IPv6 mask width: %s", p + 1); masklen = p ? mask : 128; af = AF_INET6; } else { /* Assume FQDN */ if (lookup_host(arg, (struct in_addr *)paddr) != 0) errx(EX_NOHOST, "hostname ``%s'' unknown", arg); masklen = 32; type = IPFW_TABLE_ADDR; af = AF_INET; } break; case IPFW_TABLE_INTERFACE: /* Assume interface name. Copy significant data only */ mask = MIN(strlen(arg), IF_NAMESIZE - 1); memcpy(paddr, arg, mask); /* Set mask to exact match */ masklen = 8 * IF_NAMESIZE; break; case IPFW_TABLE_NUMBER: /* Port or any other key */ key = strtol(arg, &p, 10); if (*p != '\0') errx(EX_DATAERR, "Invalid number: %s", arg); pkey = (uint32_t *)paddr; *pkey = key; masklen = 32; break; case IPFW_TABLE_FLOW: /* Assume [src-ip][,proto][,src-port][,dst-ip][,dst-port] */ tfe = &tentry->k.flow; af = 0; /* Handle */ if ((tflags & IPFW_TFFLAG_SRCIP) != 0) { if ((p = strchr(arg, ',')) != NULL) *p++ = '\0'; /* Determine family using temporary storage */ if (inet_pton(AF_INET, arg, &tmp) == 1) { if (af != 0 && af != AF_INET) errx(EX_DATAERR, "Inconsistent address family\n"); af = AF_INET; memcpy(&tfe->a.a4.sip, &tmp, 4); } else if (inet_pton(AF_INET6, arg, &tmp) == 1) { if (af != 0 && af != AF_INET6) errx(EX_DATAERR, "Inconsistent address family\n"); af = AF_INET6; memcpy(&tfe->a.a6.sip6, &tmp, 16); } arg = p; } /* Handle */ if ((tflags & IPFW_TFFLAG_PROTO) != 0) { if (arg == NULL) errx(EX_DATAERR, "invalid key: proto missing"); if ((p = strchr(arg, ',')) != NULL) *p++ = '\0'; key = strtol(arg, &pp, 10); if (*pp != '\0') { if ((pent = getprotobyname(arg)) == NULL) errx(EX_DATAERR, "Unknown proto: %s", arg); else key = pent->p_proto; } if (key > 255) errx(EX_DATAERR, "Bad protocol number: %u",key); tfe->proto = key; arg = p; } /* Handle */ if ((tflags & IPFW_TFFLAG_SRCPORT) != 0) { if (arg == NULL) errx(EX_DATAERR, "invalid key: src port missing"); if ((p = strchr(arg, ',')) != NULL) *p++ = '\0'; if ((port = htons(strtol(arg, NULL, 10))) == 0) { if ((sent = getservbyname(arg, NULL)) == NULL) errx(EX_DATAERR, "Unknown service: %s", arg); else key = sent->s_port; } tfe->sport = port; arg = p; } /* Handle */ if ((tflags & IPFW_TFFLAG_DSTIP) != 0) { if (arg == NULL) errx(EX_DATAERR, "invalid key: dst ip missing"); if ((p = strchr(arg, ',')) != NULL) *p++ = '\0'; /* Determine family using temporary storage */ if (inet_pton(AF_INET, arg, &tmp) == 1) { if (af != 0 && af != AF_INET) errx(EX_DATAERR, "Inconsistent address family"); af = AF_INET; memcpy(&tfe->a.a4.dip, &tmp, 4); } else if (inet_pton(AF_INET6, arg, &tmp) == 1) { if (af != 0 && af != AF_INET6) errx(EX_DATAERR, "Inconsistent address family"); af = AF_INET6; memcpy(&tfe->a.a6.dip6, &tmp, 16); } arg = p; } /* Handle */ if ((tflags & IPFW_TFFLAG_DSTPORT) != 0) { if (arg == NULL) errx(EX_DATAERR, "invalid key: dst port missing"); if ((p = strchr(arg, ',')) != NULL) *p++ = '\0'; if ((port = htons(strtol(arg, NULL, 10))) == 0) { if ((sent = getservbyname(arg, NULL)) == NULL) errx(EX_DATAERR, "Unknown service: %s", arg); else key = sent->s_port; } tfe->dport = port; arg = p; } tfe->af = af; break; default: errx(EX_DATAERR, "Unsupported table type: %d", type); } tentry->subtype = af; tentry->masklen = masklen; } static void tentry_fill_key(ipfw_obj_header *oh, ipfw_obj_tentry *tent, char *key, int add, uint8_t *ptype, uint32_t *pvmask, ipfw_xtable_info *xi) { uint8_t type, tflags; uint32_t vmask; int error; char *del; type = 0; tflags = 0; vmask = 0; if (xi->tablename[0] == '\0') error = table_get_info(oh, xi); else error = 0; if (error == 0) { /* Table found. */ type = xi->type; tflags = xi->tflags; vmask = xi->vmask; } else { if (error != ESRCH) errx(EX_OSERR, "Error requesting table %s info", oh->ntlv.name); if (add == 0) errx(EX_DATAERR, "Table %s does not exist", oh->ntlv.name); /* * Table does not exist. * Compability layer: try to interpret data as ADDR * before failing. */ if ((del = strchr(key, '/')) != NULL) *del = '\0'; if (inet_pton(AF_INET, key, &tent->k.addr6) == 1 || inet_pton(AF_INET6, key, &tent->k.addr6) == 1) { /* OK Prepare and send */ type = IPFW_TABLE_ADDR; vmask = IPFW_VTYPE_LEGACY; } else { /* Inknown key */ errx(EX_USAGE, "Table %s does not exist, cannot guess " "key '%s' type", oh->ntlv.name, key); } if (del != NULL) *del = '/'; } tentry_fill_key_type(key, tent, type, tflags); *ptype = type; *pvmask = vmask; } static void set_legacy_value(uint32_t val, ipfw_table_value *v) { v->tag = val; v->pipe = val; v->divert = val; v->skipto = val; v->netgraph = val; v->fib = val; v->nat = val; v->nh4 = val; v->dscp = (uint8_t)val; v->limit = val; } static void tentry_fill_value(ipfw_obj_header *oh, ipfw_obj_tentry *tent, char *arg, uint8_t type, uint32_t vmask) { uint32_t a4, flag, val, vm; ipfw_table_value *v; uint32_t i; int dval; char *comma, *e, *etype, *n, *p; v = &tent->v.value; vm = vmask; /* Compat layer: keep old behavior for legacy value types */ if (vmask == IPFW_VTYPE_LEGACY) { /* Try to interpret as number first */ val = strtoul(arg, &p, 0); if (*p == '\0') { set_legacy_value(val, v); return; } if (inet_pton(AF_INET, arg, &val) == 1) { set_legacy_value(ntohl(val), v); return; } /* Try hostname */ if (lookup_host(arg, (struct in_addr *)&val) == 0) { set_legacy_value(val, v); return; } errx(EX_OSERR, "Unable to parse value %s", arg); } /* * Shorthands: handle single value if vmask consists * of numbers only. e.g.: * vmask = "fib,skipto" -> treat input "1" as "1,1" */ n = arg; etype = NULL; for (i = 1; i < (1 << 31); i *= 2) { if ((flag = (vmask & i)) == 0) continue; vmask &= ~flag; if ((comma = strchr(n, ',')) != NULL) *comma = '\0'; switch (flag) { case IPFW_VTYPE_TAG: v->tag = strtol(n, &e, 10); if (*e != '\0') etype = "tag"; break; case IPFW_VTYPE_PIPE: v->pipe = strtol(n, &e, 10); if (*e != '\0') etype = "pipe"; break; case IPFW_VTYPE_DIVERT: v->divert = strtol(n, &e, 10); if (*e != '\0') etype = "divert"; break; case IPFW_VTYPE_SKIPTO: v->skipto = strtol(n, &e, 10); if (*e != '\0') etype = "skipto"; break; case IPFW_VTYPE_NETGRAPH: v->netgraph = strtol(n, &e, 10); if (*e != '\0') etype = "netgraph"; break; case IPFW_VTYPE_FIB: v->fib = strtol(n, &e, 10); if (*e != '\0') etype = "fib"; break; case IPFW_VTYPE_NAT: v->nat = strtol(n, &e, 10); if (*e != '\0') etype = "nat"; break; case IPFW_VTYPE_LIMIT: v->limit = strtol(n, &e, 10); if (*e != '\0') etype = "limit"; break; case IPFW_VTYPE_NH4: if (strchr(n, '.') != NULL && inet_pton(AF_INET, n, &a4) == 1) { v->nh4 = ntohl(a4); break; } if (lookup_host(n, (struct in_addr *)&v->nh4) == 0) break; etype = "ipv4"; break; case IPFW_VTYPE_DSCP: if (isalpha(*n)) { if ((dval = match_token(f_ipdscp, n)) != -1) { v->dscp = dval; break; } else etype = "DSCP code"; } else { v->dscp = strtol(n, &e, 10); if (v->dscp > 63 || *e != '\0') etype = "DSCP value"; } break; case IPFW_VTYPE_NH6: if (strchr(n, ':') != NULL && inet_pton(AF_INET6, n, &v->nh6) == 1) break; etype = "ipv6"; break; } if (etype != NULL) errx(EX_USAGE, "Unable to parse %s as %s", n, etype); if (comma != NULL) *comma++ = ','; if ((n = comma) != NULL) continue; /* End of input. */ if (vmask != 0) errx(EX_USAGE, "Not enough fields inside value"); } } /* * Compare table names. * Honor number comparison. */ static int tablename_cmp(const void *a, const void *b) { ipfw_xtable_info *ia, *ib; ia = (ipfw_xtable_info *)a; ib = (ipfw_xtable_info *)b; return (stringnum_cmp(ia->tablename, ib->tablename)); } /* * Retrieves table list from kernel, * optionally sorts it and calls requested function for each table. * Returns 0 on success. */ static int tables_foreach(table_cb_t *f, void *arg, int sort) { ipfw_obj_lheader *olh; ipfw_xtable_info *info; size_t sz; int i, error; /* Start with reasonable default */ sz = sizeof(*olh) + 16 * sizeof(ipfw_xtable_info); for (;;) { if ((olh = calloc(1, sz)) == NULL) return (ENOMEM); olh->size = sz; if (do_get3(IP_FW_TABLES_XLIST, &olh->opheader, &sz) != 0) { sz = olh->size; free(olh); if (errno != ENOMEM) return (errno); continue; } if (sort != 0) qsort(olh + 1, olh->count, olh->objsize, tablename_cmp); info = (ipfw_xtable_info *)(olh + 1); for (i = 0; i < olh->count; i++) { error = f(info, arg); /* Ignore errors for now */ info = (ipfw_xtable_info *)((caddr_t)info + olh->objsize); } free(olh); break; } return (0); } /* * Retrieves all entries for given table @i in * eXtended format. Allocate buffer large enough * to store result. Called needs to free it later. * * Returns 0 on success. */ static int table_do_get_list(ipfw_xtable_info *i, ipfw_obj_header **poh) { ipfw_obj_header *oh; size_t sz; int c; sz = 0; oh = NULL; for (c = 0; c < 8; c++) { if (sz < i->size) sz = i->size + 44; if (oh != NULL) free(oh); if ((oh = calloc(1, sz)) == NULL) continue; table_fill_objheader(oh, i); oh->opheader.version = 1; /* Current version */ if (do_get3(IP_FW_TABLE_XLIST, &oh->opheader, &sz) == 0) { *poh = oh; return (0); } if (errno != ENOMEM) break; } free(oh); return (errno); } /* * Shows all entries from @oh in human-readable format */ static void table_show_list(ipfw_obj_header *oh, int need_header) { ipfw_obj_tentry *tent; uint32_t count; ipfw_xtable_info *i; i = (ipfw_xtable_info *)(oh + 1); tent = (ipfw_obj_tentry *)(i + 1); if (need_header) printf("--- table(%s), set(%u) ---\n", i->tablename, i->set); count = i->count; while (count > 0) { table_show_entry(i, tent); tent = (ipfw_obj_tentry *)((caddr_t)tent + tent->head.length); count--; } } static void table_show_value(char *buf, size_t bufsize, ipfw_table_value *v, uint32_t vmask, int print_ip) { uint32_t flag, i, l; size_t sz; struct in_addr a4; char abuf[INET6_ADDRSTRLEN]; sz = bufsize; /* * Some shorthands for printing values: * legacy assumes all values are equal, so keep the first one. */ if (vmask == IPFW_VTYPE_LEGACY) { if (print_ip != 0) { flag = htonl(v->tag); inet_ntop(AF_INET, &flag, buf, sz); } else snprintf(buf, sz, "%u", v->tag); return; } for (i = 1; i < (1 << 31); i *= 2) { if ((flag = (vmask & i)) == 0) continue; l = 0; switch (flag) { case IPFW_VTYPE_TAG: l = snprintf(buf, sz, "%u,", v->tag); break; case IPFW_VTYPE_PIPE: l = snprintf(buf, sz, "%u,", v->pipe); break; case IPFW_VTYPE_DIVERT: l = snprintf(buf, sz, "%d,", v->divert); break; case IPFW_VTYPE_SKIPTO: l = snprintf(buf, sz, "%d,", v->skipto); break; case IPFW_VTYPE_NETGRAPH: l = snprintf(buf, sz, "%u,", v->netgraph); break; case IPFW_VTYPE_FIB: l = snprintf(buf, sz, "%u,", v->fib); break; case IPFW_VTYPE_NAT: l = snprintf(buf, sz, "%u,", v->nat); break; case IPFW_VTYPE_LIMIT: l = snprintf(buf, sz, "%u,", v->limit); break; case IPFW_VTYPE_NH4: a4.s_addr = htonl(v->nh4); inet_ntop(AF_INET, &a4, abuf, sizeof(abuf)); l = snprintf(buf, sz, "%s,", abuf); break; case IPFW_VTYPE_DSCP: l = snprintf(buf, sz, "%d,", v->dscp); break; case IPFW_VTYPE_NH6: inet_ntop(AF_INET6, &v->nh6, abuf, sizeof(abuf)); l = snprintf(buf, sz, "%s,", abuf); break; } buf += l; sz -= l; } if (sz != bufsize) *(buf - 1) = '\0'; } static void table_show_entry(ipfw_xtable_info *i, ipfw_obj_tentry *tent) { char *comma, tbuf[128], pval[128]; void *paddr; struct tflow_entry *tfe; table_show_value(pval, sizeof(pval), &tent->v.value, i->vmask, co.do_value_as_ip); switch (i->type) { case IPFW_TABLE_ADDR: /* IPv4 or IPv6 prefixes */ inet_ntop(tent->subtype, &tent->k, tbuf, sizeof(tbuf)); printf("%s/%u %s\n", tbuf, tent->masklen, pval); break; case IPFW_TABLE_INTERFACE: /* Interface names */ printf("%s %s\n", tent->k.iface, pval); break; case IPFW_TABLE_NUMBER: /* numbers */ printf("%u %s\n", tent->k.key, pval); break; case IPFW_TABLE_FLOW: /* flows */ tfe = &tent->k.flow; comma = ""; if ((i->tflags & IPFW_TFFLAG_SRCIP) != 0) { if (tfe->af == AF_INET) paddr = &tfe->a.a4.sip; else paddr = &tfe->a.a6.sip6; inet_ntop(tfe->af, paddr, tbuf, sizeof(tbuf)); printf("%s%s", comma, tbuf); comma = ","; } if ((i->tflags & IPFW_TFFLAG_PROTO) != 0) { printf("%s%d", comma, tfe->proto); comma = ","; } if ((i->tflags & IPFW_TFFLAG_SRCPORT) != 0) { printf("%s%d", comma, ntohs(tfe->sport)); comma = ","; } if ((i->tflags & IPFW_TFFLAG_DSTIP) != 0) { if (tfe->af == AF_INET) paddr = &tfe->a.a4.dip; else paddr = &tfe->a.a6.dip6; inet_ntop(tfe->af, paddr, tbuf, sizeof(tbuf)); printf("%s%s", comma, tbuf); comma = ","; } if ((i->tflags & IPFW_TFFLAG_DSTPORT) != 0) { printf("%s%d", comma, ntohs(tfe->dport)); comma = ","; } printf(" %s\n", pval); } } static int table_do_get_stdlist(uint16_t opcode, ipfw_obj_lheader **polh) { ipfw_obj_lheader req, *olh; size_t sz; memset(&req, 0, sizeof(req)); sz = sizeof(req); if (do_get3(opcode, &req.opheader, &sz) != 0) if (errno != ENOMEM) return (errno); sz = req.size; if ((olh = calloc(1, sz)) == NULL) return (ENOMEM); olh->size = sz; if (do_get3(opcode, &olh->opheader, &sz) != 0) { free(olh); return (errno); } *polh = olh; return (0); } static int table_do_get_algolist(ipfw_obj_lheader **polh) { return (table_do_get_stdlist(IP_FW_TABLES_ALIST, polh)); } static int table_do_get_vlist(ipfw_obj_lheader **polh) { return (table_do_get_stdlist(IP_FW_TABLE_VLIST, polh)); } void ipfw_list_ta(int ac, char *av[]) { ipfw_obj_lheader *olh; ipfw_ta_info *info; int error, i; const char *atype; error = table_do_get_algolist(&olh); if (error != 0) err(EX_OSERR, "Unable to request algorithm list"); info = (ipfw_ta_info *)(olh + 1); for (i = 0; i < olh->count; i++) { if ((atype = match_value(tabletypes, info->type)) == NULL) atype = "unknown"; printf("--- %s ---\n", info->algoname); printf(" type: %s\n refcount: %u\n", atype, info->refcnt); info = (ipfw_ta_info *)((caddr_t)info + olh->objsize); } free(olh); } /* Copy of current kernel table_value structure */ struct _table_value { uint32_t tag; /* O_TAG/O_TAGGED */ uint32_t pipe; /* O_PIPE/O_QUEUE */ uint16_t divert; /* O_DIVERT/O_TEE */ uint16_t skipto; /* skipto, CALLRET */ uint32_t netgraph; /* O_NETGRAPH/O_NGTEE */ uint32_t fib; /* O_SETFIB */ uint32_t nat; /* O_NAT */ uint32_t nh4; uint8_t dscp; uint8_t spare0[3]; /* -- 32 bytes -- */ struct in6_addr nh6; uint32_t limit; /* O_LIMIT */ uint32_t spare1; uint64_t refcnt; /* Number of references */ }; int compare_values(const void *_a, const void *_b) { struct _table_value *a, *b; a = (struct _table_value *)_a; b = (struct _table_value *)_b; if (a->spare1 < b->spare1) return (-1); else if (a->spare1 > b->spare1) return (1); return (0); } void ipfw_list_values(int ac, char *av[]) { ipfw_obj_lheader *olh; struct _table_value *v; int error, i; uint32_t vmask; char buf[128]; error = table_do_get_vlist(&olh); if (error != 0) err(EX_OSERR, "Unable to request value list"); vmask = 0x7FFFFFFF; /* Similar to IPFW_VTYPE_LEGACY */ table_print_valheader(buf, sizeof(buf), vmask); printf("HEADER: %s\n", buf); v = (struct _table_value *)(olh + 1); qsort(v, olh->count, olh->objsize, compare_values); for (i = 0; i < olh->count; i++) { table_show_value(buf, sizeof(buf), (ipfw_table_value *)v, vmask, 0); printf("[%u] refs=%lu %s\n", v->spare1, (u_long)v->refcnt, buf); v = (struct _table_value *)((caddr_t)v + olh->objsize); } free(olh); } int compare_ntlv(const void *_a, const void *_b) { ipfw_obj_ntlv *a, *b; a = (ipfw_obj_ntlv *)_a; b = (ipfw_obj_ntlv *)_b; if (a->set < b->set) return (-1); else if (a->set > b->set) return (1); if (a->idx < b->idx) return (-1); else if (a->idx > b->idx) return (1); return (0); } int compare_kntlv(const void *k, const void *v) { ipfw_obj_ntlv *ntlv; uint16_t key; key = *((uint16_t *)k); ntlv = (ipfw_obj_ntlv *)v; if (key < ntlv->idx) return (-1); else if (key > ntlv->idx) return (1); return (0); } /* * Finds table name in @ctlv by @idx. * Uses the following facts: * 1) All TLVs are the same size * 2) Kernel implementation provides already sorted list. * * Returns table name or NULL. */ char * table_search_ctlv(ipfw_obj_ctlv *ctlv, uint16_t idx) { ipfw_obj_ntlv *ntlv; ntlv = bsearch(&idx, (ctlv + 1), ctlv->count, ctlv->objsize, compare_kntlv); if (ntlv != 0) return (ntlv->name); return (NULL); } void table_sort_ctlv(ipfw_obj_ctlv *ctlv) { qsort(ctlv + 1, ctlv->count, ctlv->objsize, compare_ntlv); } int table_check_name(char *tablename) { int c, i, l; /* * Check if tablename is null-terminated and contains * valid symbols only. Valid mask is: * [a-zA-Z0-9\-_\.]{1,63} */ l = strlen(tablename); if (l == 0 || l >= 64) return (EINVAL); for (i = 0; i < l; i++) { c = tablename[i]; if (isalpha(c) || isdigit(c) || c == '_' || c == '-' || c == '.') continue; return (EINVAL); } /* Restrict some 'special' names */ if (strcmp(tablename, "all") == 0) return (EINVAL); return (0); } nextepc-0.3.10/lib/nas/000077500000000000000000000000001333553357400146035ustar00rootroot00000000000000nextepc-0.3.10/lib/nas/Makefile.am000066400000000000000000000011271333553357400166400ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in pkglib_LTLIBRARIES = libnas.la libnas_la_SOURCES = \ nas_message.h nas_ies.h nas_types.h \ nas_decoder.c nas_encoder.c nas_ies.c nas_types.c \ $(NULL) libnas_la_DEPENDENCIES = \ $(top_srcdir)/lib/core/src/libcore.la \ $(NULL) libnas_la_LIBADD = \ $(top_srcdir)/lib/core/src/libcore.la \ $(NULL) AM_LDFLAGS = \ -version-info @LIBVERSION@ \ $(NULL) AM_CPPFLAGS = \ -I$(top_srcdir)/lib/core/include \ $(NULL) AM_CFLAGS = \ -Wall -Werror \ $(NULL) MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump nextepc-0.3.10/lib/nas/nas_decoder.c000066400000000000000000004524521333553357400172310ustar00rootroot00000000000000/* * Copyright (c) 2017, NextEPC Group * 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. */ /******************************************************************************* * This file had been created by gtpv2c_tlv.py script v0.1.0 * Please do not modify this file but regenerate it via script. * Created on: 2018-01-23 15:58:42.874567 by acetcom * from 24301-d80.docx ******************************************************************************/ #define TRACE_MODULE _nas_decoder #include "core_debug.h" #include "nas_message.h" c_int32_t nas_decode_attach_request(nas_message_t *message, pkbuf_t *pkbuf) { nas_attach_request_t *attach_request = &message->emm.attach_request; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode ATTACH_REQUEST\n"); size = nas_decode_eps_attach_type(&attach_request->eps_attach_type, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; size = nas_decode_eps_mobile_identity(&attach_request->eps_mobile_identity, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; size = nas_decode_ue_network_capability(&attach_request->ue_network_capability, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; size = nas_decode_esm_message_container(&attach_request->esm_message_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_ATTACH_REQUEST_OLD_P_TMSI_SIGNATURE_TYPE: size = nas_decode_p_tmsi_signature(&attach_request->old_p_tmsi_signature, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_request->presencemask |= NAS_ATTACH_REQUEST_OLD_P_TMSI_SIGNATURE_PRESENT; decoded += size; break; case NAS_ATTACH_REQUEST_ADDITIONAL_GUTI_TYPE: size = nas_decode_eps_mobile_identity(&attach_request->additional_guti, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_request->presencemask |= NAS_ATTACH_REQUEST_ADDITIONAL_GUTI_PRESENT; decoded += size; break; case NAS_ATTACH_REQUEST_LAST_VISITED_REGISTERED_TAI_TYPE: size = nas_decode_tracking_area_identity(&attach_request->last_visited_registered_tai, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_request->presencemask |= NAS_ATTACH_REQUEST_LAST_VISITED_REGISTERED_TAI_PRESENT; decoded += size; break; case NAS_ATTACH_REQUEST_DRX_PARAMETER_TYPE: size = nas_decode_drx_parameter(&attach_request->drx_parameter, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_request->presencemask |= NAS_ATTACH_REQUEST_DRX_PARAMETER_PRESENT; decoded += size; break; case NAS_ATTACH_REQUEST_MS_NETWORK_CAPABILITY_TYPE: size = nas_decode_ms_network_capability(&attach_request->ms_network_capability, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_request->presencemask |= NAS_ATTACH_REQUEST_MS_NETWORK_CAPABILITY_PRESENT; decoded += size; break; case NAS_ATTACH_REQUEST_OLD_LOCATION_AREA_IDENTIFICATION_TYPE: size = nas_decode_location_area_identification(&attach_request->old_location_area_identification, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_request->presencemask |= NAS_ATTACH_REQUEST_OLD_LOCATION_AREA_IDENTIFICATION_PRESENT; decoded += size; break; case NAS_ATTACH_REQUEST_TMSI_STATUS_TYPE: size = nas_decode_tmsi_status(&attach_request->tmsi_status, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_request->presencemask |= NAS_ATTACH_REQUEST_TMSI_STATUS_PRESENT; decoded += size; break; case NAS_ATTACH_REQUEST_MOBILE_STATION_CLASSMARK_2_TYPE: size = nas_decode_mobile_station_classmark_2(&attach_request->mobile_station_classmark_2, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_request->presencemask |= NAS_ATTACH_REQUEST_MOBILE_STATION_CLASSMARK_2_PRESENT; decoded += size; break; case NAS_ATTACH_REQUEST_MOBILE_STATION_CLASSMARK_3_TYPE: size = nas_decode_mobile_station_classmark_3(&attach_request->mobile_station_classmark_3, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_request->presencemask |= NAS_ATTACH_REQUEST_MOBILE_STATION_CLASSMARK_3_PRESENT; decoded += size; break; case NAS_ATTACH_REQUEST_SUPPORTED_CODECS_TYPE: size = nas_decode_supported_codec_list(&attach_request->supported_codecs, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_request->presencemask |= NAS_ATTACH_REQUEST_SUPPORTED_CODECS_PRESENT; decoded += size; break; case NAS_ATTACH_REQUEST_ADDITIONAL_UPDATE_TYPE_TYPE: size = nas_decode_additional_update_type(&attach_request->additional_update_type, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_request->presencemask |= NAS_ATTACH_REQUEST_ADDITIONAL_UPDATE_TYPE_PRESENT; decoded += size; break; case NAS_ATTACH_REQUEST_VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_TYPE: size = nas_decode_voice_domain_preference_and_ue_usage_setting(&attach_request->voice_domain_preference_and_ue_usage_setting, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_request->presencemask |= NAS_ATTACH_REQUEST_VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_PRESENT; decoded += size; break; case NAS_ATTACH_REQUEST_DEVICE_PROPERTIES_TYPE: size = nas_decode_device_properties(&attach_request->device_properties, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_request->presencemask |= NAS_ATTACH_REQUEST_DEVICE_PROPERTIES_PRESENT; decoded += size; break; case NAS_ATTACH_REQUEST_OLD_GUTI_TYPE_TYPE: size = nas_decode_guti_type(&attach_request->old_guti_type, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_request->presencemask |= NAS_ATTACH_REQUEST_OLD_GUTI_TYPE_PRESENT; decoded += size; break; case NAS_ATTACH_REQUEST_MS_NETWORK_FEATURE_SUPPORT_TYPE: size = nas_decode_ms_network_feature_support(&attach_request->ms_network_feature_support, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_request->presencemask |= NAS_ATTACH_REQUEST_MS_NETWORK_FEATURE_SUPPORT_PRESENT; decoded += size; break; case NAS_ATTACH_REQUEST_TMSI_BASED_NRI_CONTAINER_TYPE: size = nas_decode_network_resource_identifier_container(&attach_request->tmsi_based_nri_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_request->presencemask |= NAS_ATTACH_REQUEST_TMSI_BASED_NRI_CONTAINER_PRESENT; decoded += size; break; case NAS_ATTACH_REQUEST_T3324_VALUE_TYPE: size = nas_decode_gprs_timer_2(&attach_request->t3324_value, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_request->presencemask |= NAS_ATTACH_REQUEST_T3324_VALUE_PRESENT; decoded += size; break; case NAS_ATTACH_REQUEST_T3412_EXTENDED_VALUE_TYPE: size = nas_decode_gprs_timer_3(&attach_request->t3412_extended_value, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_request->presencemask |= NAS_ATTACH_REQUEST_T3412_EXTENDED_VALUE_PRESENT; decoded += size; break; case NAS_ATTACH_REQUEST_EXTENDED_DRX_PARAMETERS_TYPE: size = nas_decode_extended_drx_parameters(&attach_request->extended_drx_parameters, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_request->presencemask |= NAS_ATTACH_REQUEST_EXTENDED_DRX_PARAMETERS_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_attach_accept(nas_message_t *message, pkbuf_t *pkbuf) { nas_attach_accept_t *attach_accept = &message->emm.attach_accept; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode ATTACH_ACCEPT\n"); size = nas_decode_eps_attach_result(&attach_accept->eps_attach_result, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; size = nas_decode_gprs_timer(&attach_accept->t3412_value, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; size = nas_decode_tracking_area_identity_list(&attach_accept->tai_list, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; size = nas_decode_esm_message_container(&attach_accept->esm_message_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_ATTACH_ACCEPT_GUTI_TYPE: size = nas_decode_eps_mobile_identity(&attach_accept->guti, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_accept->presencemask |= NAS_ATTACH_ACCEPT_GUTI_PRESENT; decoded += size; break; case NAS_ATTACH_ACCEPT_LOCATION_AREA_IDENTIFICATION_TYPE: size = nas_decode_location_area_identification(&attach_accept->location_area_identification, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_accept->presencemask |= NAS_ATTACH_ACCEPT_LOCATION_AREA_IDENTIFICATION_PRESENT; decoded += size; break; case NAS_ATTACH_ACCEPT_MS_IDENTITY_TYPE: size = nas_decode_mobile_identity(&attach_accept->ms_identity, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_accept->presencemask |= NAS_ATTACH_ACCEPT_MS_IDENTITY_PRESENT; decoded += size; break; case NAS_ATTACH_ACCEPT_EMM_CAUSE_TYPE: size = nas_decode_emm_cause(&attach_accept->emm_cause, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_accept->presencemask |= NAS_ATTACH_ACCEPT_EMM_CAUSE_PRESENT; decoded += size; break; case NAS_ATTACH_ACCEPT_T3402_VALUE_TYPE: size = nas_decode_gprs_timer(&attach_accept->t3402_value, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_accept->presencemask |= NAS_ATTACH_ACCEPT_T3402_VALUE_PRESENT; decoded += size; break; case NAS_ATTACH_ACCEPT_T3423_VALUE_TYPE: size = nas_decode_gprs_timer(&attach_accept->t3423_value, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_accept->presencemask |= NAS_ATTACH_ACCEPT_T3423_VALUE_PRESENT; decoded += size; break; case NAS_ATTACH_ACCEPT_EQUIVALENT_PLMNS_TYPE: size = nas_decode_plmn_list(&attach_accept->equivalent_plmns, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_accept->presencemask |= NAS_ATTACH_ACCEPT_EQUIVALENT_PLMNS_PRESENT; decoded += size; break; case NAS_ATTACH_ACCEPT_EMERGENCY_NUMBER_LIST_TYPE: size = nas_decode_emergency_number_list(&attach_accept->emergency_number_list, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_accept->presencemask |= NAS_ATTACH_ACCEPT_EMERGENCY_NUMBER_LIST_PRESENT; decoded += size; break; case NAS_ATTACH_ACCEPT_EPS_NETWORK_FEATURE_SUPPORT_TYPE: size = nas_decode_eps_network_feature_support(&attach_accept->eps_network_feature_support, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_accept->presencemask |= NAS_ATTACH_ACCEPT_EPS_NETWORK_FEATURE_SUPPORT_PRESENT; decoded += size; break; case NAS_ATTACH_ACCEPT_ADDITIONAL_UPDATE_RESULT_TYPE: size = nas_decode_additional_update_result(&attach_accept->additional_update_result, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_accept->presencemask |= NAS_ATTACH_ACCEPT_ADDITIONAL_UPDATE_RESULT_PRESENT; decoded += size; break; case NAS_ATTACH_ACCEPT_T3412_EXTENDED_VALUE_TYPE: size = nas_decode_gprs_timer_3(&attach_accept->t3412_extended_value, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_accept->presencemask |= NAS_ATTACH_ACCEPT_T3412_EXTENDED_VALUE_PRESENT; decoded += size; break; case NAS_ATTACH_ACCEPT_T3324_VALUE_TYPE: size = nas_decode_gprs_timer_2(&attach_accept->t3324_value, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_accept->presencemask |= NAS_ATTACH_ACCEPT_T3324_VALUE_PRESENT; decoded += size; break; case NAS_ATTACH_ACCEPT_EXTENDED_DRX_PARAMETERS_TYPE: size = nas_decode_extended_drx_parameters(&attach_accept->extended_drx_parameters, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_accept->presencemask |= NAS_ATTACH_ACCEPT_EXTENDED_DRX_PARAMETERS_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_attach_complete(nas_message_t *message, pkbuf_t *pkbuf) { nas_attach_complete_t *attach_complete = &message->emm.attach_complete; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode ATTACH_COMPLETE\n"); size = nas_decode_esm_message_container(&attach_complete->esm_message_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; return decoded; } c_int32_t nas_decode_attach_reject(nas_message_t *message, pkbuf_t *pkbuf) { nas_attach_reject_t *attach_reject = &message->emm.attach_reject; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode ATTACH_REJECT\n"); size = nas_decode_emm_cause(&attach_reject->emm_cause, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_ATTACH_REJECT_ESM_MESSAGE_CONTAINER_TYPE: size = nas_decode_esm_message_container(&attach_reject->esm_message_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_reject->presencemask |= NAS_ATTACH_REJECT_ESM_MESSAGE_CONTAINER_PRESENT; decoded += size; break; case NAS_ATTACH_REJECT_T3346_VALUE_TYPE: size = nas_decode_gprs_timer_2(&attach_reject->t3346_value, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_reject->presencemask |= NAS_ATTACH_REJECT_T3346_VALUE_PRESENT; decoded += size; break; case NAS_ATTACH_REJECT_T3402_VALUE_TYPE: size = nas_decode_gprs_timer_2(&attach_reject->t3402_value, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_reject->presencemask |= NAS_ATTACH_REJECT_T3402_VALUE_PRESENT; decoded += size; break; case NAS_ATTACH_REJECT_EXTENDED_EMM_CAUSE_TYPE: size = nas_decode_extended_emm_cause(&attach_reject->extended_emm_cause, pkbuf); d_assert(size >= 0, return -1, "decode failed"); attach_reject->presencemask |= NAS_ATTACH_REJECT_EXTENDED_EMM_CAUSE_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_detach_request_from_ue(nas_message_t *message, pkbuf_t *pkbuf) { nas_detach_request_from_ue_t *detach_request_from_ue = &message->emm.detach_request_from_ue; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode DETACH_REQUEST\n"); size = nas_decode_detach_type(&detach_request_from_ue->detach_type, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; size = nas_decode_eps_mobile_identity(&detach_request_from_ue->eps_mobile_identity, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; return decoded; } c_int32_t nas_decode_detach_request_to_ue(nas_message_t *message, pkbuf_t *pkbuf) { nas_detach_request_to_ue_t *detach_request_to_ue = &message->emm.detach_request_to_ue; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode DETACH_REQUEST\n"); size = nas_decode_detach_type(&detach_request_to_ue->detach_type, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_DETACH_REQUEST_EMM_CAUSE_TYPE: size = nas_decode_emm_cause(&detach_request_to_ue->emm_cause, pkbuf); d_assert(size >= 0, return -1, "decode failed"); detach_request_to_ue->presencemask |= NAS_DETACH_REQUEST_EMM_CAUSE_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_tracking_area_update_request(nas_message_t *message, pkbuf_t *pkbuf) { nas_tracking_area_update_request_t *tracking_area_update_request = &message->emm.tracking_area_update_request; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode TRACKING_AREA_UPDATE_REQUEST\n"); size = nas_decode_eps_update_type(&tracking_area_update_request->eps_update_type, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; size = nas_decode_eps_mobile_identity(&tracking_area_update_request->old_guti, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_TRACKING_AREA_UPDATE_REQUEST_NON_CURRENT_NATIVE_NAS_KEY_SET_IDENTIFIER_TYPE: size = nas_decode_key_set_identifier(&tracking_area_update_request->non_current_native_nas_key_set_identifier, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_NON_CURRENT_NATIVE_NAS_KEY_SET_IDENTIFIER_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_GPRS_CIPHERING_KEY_SEQUENCE_NUMBER_TYPE: size = nas_decode_ciphering_key_sequence_number(&tracking_area_update_request->gprs_ciphering_key_sequence_number, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_GPRS_CIPHERING_KEY_SEQUENCE_NUMBER_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_OLD_P_TMSI_SIGNATURE_TYPE: size = nas_decode_p_tmsi_signature(&tracking_area_update_request->old_p_tmsi_signature, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_OLD_P_TMSI_SIGNATURE_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_ADDITIONAL_GUTI_TYPE: size = nas_decode_eps_mobile_identity(&tracking_area_update_request->additional_guti, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_ADDITIONAL_GUTI_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_NONCEUE_TYPE: size = nas_decode_nonce(&tracking_area_update_request->nonceue, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_NONCEUE_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_UE_NETWORK_CAPABILITY_TYPE: size = nas_decode_ue_network_capability(&tracking_area_update_request->ue_network_capability, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_UE_NETWORK_CAPABILITY_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_LAST_VISITED_REGISTERED_TAI_TYPE: size = nas_decode_tracking_area_identity(&tracking_area_update_request->last_visited_registered_tai, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_LAST_VISITED_REGISTERED_TAI_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_DRX_PARAMETER_TYPE: size = nas_decode_drx_parameter(&tracking_area_update_request->drx_parameter, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_DRX_PARAMETER_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_UE_RADIO_CAPABILITY_INFORMATION_UPDATE_NEEDED_TYPE: size = nas_decode_ue_radio_capability_information_update_needed(&tracking_area_update_request->ue_radio_capability_information_update_needed, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_UE_RADIO_CAPABILITY_INFORMATION_UPDATE_NEEDED_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_EPS_BEARER_CONTEXT_STATUS_TYPE: size = nas_decode_eps_bearer_context_status(&tracking_area_update_request->eps_bearer_context_status, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_EPS_BEARER_CONTEXT_STATUS_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_MS_NETWORK_CAPABILITY_TYPE: size = nas_decode_ms_network_capability(&tracking_area_update_request->ms_network_capability, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_MS_NETWORK_CAPABILITY_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_OLD_LOCATION_AREA_IDENTIFICATION_TYPE: size = nas_decode_location_area_identification(&tracking_area_update_request->old_location_area_identification, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_OLD_LOCATION_AREA_IDENTIFICATION_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_TMSI_STATUS_TYPE: size = nas_decode_tmsi_status(&tracking_area_update_request->tmsi_status, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_TMSI_STATUS_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_MOBILE_STATION_CLASSMARK_2_TYPE: size = nas_decode_mobile_station_classmark_2(&tracking_area_update_request->mobile_station_classmark_2, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_MOBILE_STATION_CLASSMARK_2_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_MOBILE_STATION_CLASSMARK_3_TYPE: size = nas_decode_mobile_station_classmark_3(&tracking_area_update_request->mobile_station_classmark_3, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_MOBILE_STATION_CLASSMARK_3_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_SUPPORTED_CODECS_TYPE: size = nas_decode_supported_codec_list(&tracking_area_update_request->supported_codecs, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_SUPPORTED_CODECS_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_ADDITIONAL_UPDATE_TYPE_TYPE: size = nas_decode_additional_update_type(&tracking_area_update_request->additional_update_type, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_ADDITIONAL_UPDATE_TYPE_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_TYPE: size = nas_decode_voice_domain_preference_and_ue_usage_setting(&tracking_area_update_request->voice_domain_preference_and_ue_usage_setting, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_OLD_GUTI_TYPE_TYPE: size = nas_decode_guti_type(&tracking_area_update_request->old_guti_type, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_OLD_GUTI_TYPE_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_DEVICE_PROPERTIES_TYPE: size = nas_decode_device_properties(&tracking_area_update_request->device_properties, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_DEVICE_PROPERTIES_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_MS_NETWORK_FEATURE_SUPPORT_TYPE: size = nas_decode_ms_network_feature_support(&tracking_area_update_request->ms_network_feature_support, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_MS_NETWORK_FEATURE_SUPPORT_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_TMSI_BASED_NRI_CONTAINER_TYPE: size = nas_decode_network_resource_identifier_container(&tracking_area_update_request->tmsi_based_nri_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_TMSI_BASED_NRI_CONTAINER_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_T3324_VALUE_TYPE: size = nas_decode_gprs_timer_2(&tracking_area_update_request->t3324_value, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_T3324_VALUE_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_T3412_EXTENDED_VALUE_TYPE: size = nas_decode_gprs_timer_3(&tracking_area_update_request->t3412_extended_value, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_T3412_EXTENDED_VALUE_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REQUEST_EXTENDED_DRX_PARAMETERS_TYPE: size = nas_decode_extended_drx_parameters(&tracking_area_update_request->extended_drx_parameters, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_request->presencemask |= NAS_TRACKING_AREA_UPDATE_REQUEST_EXTENDED_DRX_PARAMETERS_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_tracking_area_update_accept(nas_message_t *message, pkbuf_t *pkbuf) { nas_tracking_area_update_accept_t *tracking_area_update_accept = &message->emm.tracking_area_update_accept; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode TRACKING_AREA_UPDATE_ACCEPT\n"); size = nas_decode_eps_update_result(&tracking_area_update_accept->eps_update_result, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_TRACKING_AREA_UPDATE_ACCEPT_T3412_VALUE_TYPE: size = nas_decode_gprs_timer(&tracking_area_update_accept->t3412_value, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_accept->presencemask |= NAS_TRACKING_AREA_UPDATE_ACCEPT_T3412_VALUE_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_ACCEPT_GUTI_TYPE: size = nas_decode_eps_mobile_identity(&tracking_area_update_accept->guti, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_accept->presencemask |= NAS_TRACKING_AREA_UPDATE_ACCEPT_GUTI_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_ACCEPT_TAI_LIST_TYPE: size = nas_decode_tracking_area_identity_list(&tracking_area_update_accept->tai_list, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_accept->presencemask |= NAS_TRACKING_AREA_UPDATE_ACCEPT_TAI_LIST_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_ACCEPT_EPS_BEARER_CONTEXT_STATUS_TYPE: size = nas_decode_eps_bearer_context_status(&tracking_area_update_accept->eps_bearer_context_status, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_accept->presencemask |= NAS_TRACKING_AREA_UPDATE_ACCEPT_EPS_BEARER_CONTEXT_STATUS_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_ACCEPT_LOCATION_AREA_IDENTIFICATION_TYPE: size = nas_decode_location_area_identification(&tracking_area_update_accept->location_area_identification, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_accept->presencemask |= NAS_TRACKING_AREA_UPDATE_ACCEPT_LOCATION_AREA_IDENTIFICATION_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_ACCEPT_MS_IDENTITY_TYPE: size = nas_decode_mobile_identity(&tracking_area_update_accept->ms_identity, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_accept->presencemask |= NAS_TRACKING_AREA_UPDATE_ACCEPT_MS_IDENTITY_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_ACCEPT_EMM_CAUSE_TYPE: size = nas_decode_emm_cause(&tracking_area_update_accept->emm_cause, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_accept->presencemask |= NAS_TRACKING_AREA_UPDATE_ACCEPT_EMM_CAUSE_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_ACCEPT_T3402_VALUE_TYPE: size = nas_decode_gprs_timer(&tracking_area_update_accept->t3402_value, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_accept->presencemask |= NAS_TRACKING_AREA_UPDATE_ACCEPT_T3402_VALUE_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_ACCEPT_T3423_VALUE_TYPE: size = nas_decode_gprs_timer(&tracking_area_update_accept->t3423_value, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_accept->presencemask |= NAS_TRACKING_AREA_UPDATE_ACCEPT_T3423_VALUE_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_ACCEPT_EQUIVALENT_PLMNS_TYPE: size = nas_decode_plmn_list(&tracking_area_update_accept->equivalent_plmns, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_accept->presencemask |= NAS_TRACKING_AREA_UPDATE_ACCEPT_EQUIVALENT_PLMNS_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_ACCEPT_EMERGENCY_NUMBER_LIST_TYPE: size = nas_decode_emergency_number_list(&tracking_area_update_accept->emergency_number_list, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_accept->presencemask |= NAS_TRACKING_AREA_UPDATE_ACCEPT_EMERGENCY_NUMBER_LIST_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_ACCEPT_EPS_NETWORK_FEATURE_SUPPORT_TYPE: size = nas_decode_eps_network_feature_support(&tracking_area_update_accept->eps_network_feature_support, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_accept->presencemask |= NAS_TRACKING_AREA_UPDATE_ACCEPT_EPS_NETWORK_FEATURE_SUPPORT_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_ACCEPT_ADDITIONAL_UPDATE_RESULT_TYPE: size = nas_decode_additional_update_result(&tracking_area_update_accept->additional_update_result, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_accept->presencemask |= NAS_TRACKING_AREA_UPDATE_ACCEPT_ADDITIONAL_UPDATE_RESULT_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_ACCEPT_T3412_EXTENDED_VALUE_TYPE: size = nas_decode_gprs_timer_3(&tracking_area_update_accept->t3412_extended_value, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_accept->presencemask |= NAS_TRACKING_AREA_UPDATE_ACCEPT_T3412_EXTENDED_VALUE_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_ACCEPT_T3324_VALUE_TYPE: size = nas_decode_gprs_timer_2(&tracking_area_update_accept->t3324_value, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_accept->presencemask |= NAS_TRACKING_AREA_UPDATE_ACCEPT_T3324_VALUE_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_ACCEPT_EXTENDED_DRX_PARAMETERS_TYPE: size = nas_decode_extended_drx_parameters(&tracking_area_update_accept->extended_drx_parameters, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_accept->presencemask |= NAS_TRACKING_AREA_UPDATE_ACCEPT_EXTENDED_DRX_PARAMETERS_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_ACCEPT_HEADER_COMPRESSION_CONFIGURATION_STATUS_TYPE: size = nas_decode_header_compression_configuration_status(&tracking_area_update_accept->header_compression_configuration_status, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_accept->presencemask |= NAS_TRACKING_AREA_UPDATE_ACCEPT_HEADER_COMPRESSION_CONFIGURATION_STATUS_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_tracking_area_update_reject(nas_message_t *message, pkbuf_t *pkbuf) { nas_tracking_area_update_reject_t *tracking_area_update_reject = &message->emm.tracking_area_update_reject; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode TRACKING_AREA_UPDATE_REJECT\n"); size = nas_decode_emm_cause(&tracking_area_update_reject->emm_cause, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_TRACKING_AREA_UPDATE_REJECT_T3346_VALUE_TYPE: size = nas_decode_gprs_timer_2(&tracking_area_update_reject->t3346_value, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_reject->presencemask |= NAS_TRACKING_AREA_UPDATE_REJECT_T3346_VALUE_PRESENT; decoded += size; break; case NAS_TRACKING_AREA_UPDATE_REJECT_EXTENDED_EMM_CAUSE_TYPE: size = nas_decode_extended_emm_cause(&tracking_area_update_reject->extended_emm_cause, pkbuf); d_assert(size >= 0, return -1, "decode failed"); tracking_area_update_reject->presencemask |= NAS_TRACKING_AREA_UPDATE_REJECT_EXTENDED_EMM_CAUSE_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_extended_service_request(nas_message_t *message, pkbuf_t *pkbuf) { nas_extended_service_request_t *extended_service_request = &message->emm.extended_service_request; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode EXTENDED_SERVICE_REQUEST\n"); size = nas_decode_service_type(&extended_service_request->service_type, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; size = nas_decode_mobile_identity(&extended_service_request->m_tmsi, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_EXTENDED_SERVICE_REQUEST_CSFB_RESPONSE_TYPE: size = nas_decode_csfb_response(&extended_service_request->csfb_response, pkbuf); d_assert(size >= 0, return -1, "decode failed"); extended_service_request->presencemask |= NAS_EXTENDED_SERVICE_REQUEST_CSFB_RESPONSE_PRESENT; decoded += size; break; case NAS_EXTENDED_SERVICE_REQUEST_EPS_BEARER_CONTEXT_STATUS_TYPE: size = nas_decode_eps_bearer_context_status(&extended_service_request->eps_bearer_context_status, pkbuf); d_assert(size >= 0, return -1, "decode failed"); extended_service_request->presencemask |= NAS_EXTENDED_SERVICE_REQUEST_EPS_BEARER_CONTEXT_STATUS_PRESENT; decoded += size; break; case NAS_EXTENDED_SERVICE_REQUEST_DEVICE_PROPERTIES_TYPE: size = nas_decode_device_properties(&extended_service_request->device_properties, pkbuf); d_assert(size >= 0, return -1, "decode failed"); extended_service_request->presencemask |= NAS_EXTENDED_SERVICE_REQUEST_DEVICE_PROPERTIES_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_service_request(nas_message_t *message, pkbuf_t *pkbuf) { nas_service_request_t *service_request = &message->emm.service_request; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode SERVICE_REQUEST\n"); size = nas_decode_ksi_and_sequence_number(&service_request->ksi_and_sequence_number, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; size = nas_decode_short_mac(&service_request->message_authentication_code, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; return decoded; } c_int32_t nas_decode_service_reject(nas_message_t *message, pkbuf_t *pkbuf) { nas_service_reject_t *service_reject = &message->emm.service_reject; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode SERVICE_REJECT\n"); size = nas_decode_emm_cause(&service_reject->emm_cause, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_SERVICE_REJECT_T3346_VALUE_TYPE: size = nas_decode_gprs_timer_2(&service_reject->t3346_value, pkbuf); d_assert(size >= 0, return -1, "decode failed"); service_reject->presencemask |= NAS_SERVICE_REJECT_T3346_VALUE_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_guti_reallocation_command(nas_message_t *message, pkbuf_t *pkbuf) { nas_guti_reallocation_command_t *guti_reallocation_command = &message->emm.guti_reallocation_command; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode GUTI_REALLOCATION_COMMAND\n"); size = nas_decode_eps_mobile_identity(&guti_reallocation_command->guti, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_GUTI_REALLOCATION_COMMAND_TAI_LIST_TYPE: size = nas_decode_tracking_area_identity_list(&guti_reallocation_command->tai_list, pkbuf); d_assert(size >= 0, return -1, "decode failed"); guti_reallocation_command->presencemask |= NAS_GUTI_REALLOCATION_COMMAND_TAI_LIST_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_authentication_request(nas_message_t *message, pkbuf_t *pkbuf) { nas_authentication_request_t *authentication_request = &message->emm.authentication_request; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode AUTHENTICATION_REQUEST\n"); size = nas_decode_key_set_identifier(&authentication_request->nas_key_set_identifierasme, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; size = nas_decode_authentication_parameter_rand(&authentication_request->authentication_parameter_rand, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; size = nas_decode_authentication_parameter_autn(&authentication_request->authentication_parameter_autn, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; return decoded; } c_int32_t nas_decode_authentication_response(nas_message_t *message, pkbuf_t *pkbuf) { nas_authentication_response_t *authentication_response = &message->emm.authentication_response; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode AUTHENTICATION_RESPONSE\n"); size = nas_decode_authentication_response_parameter(&authentication_response->authentication_response_parameter, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; return decoded; } c_int32_t nas_decode_identity_request(nas_message_t *message, pkbuf_t *pkbuf) { nas_identity_request_t *identity_request = &message->emm.identity_request; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode IDENTITY_REQUEST\n"); size = nas_decode_identity_type_2(&identity_request->identity_type, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; return decoded; } c_int32_t nas_decode_identity_response(nas_message_t *message, pkbuf_t *pkbuf) { nas_identity_response_t *identity_response = &message->emm.identity_response; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode IDENTITY_RESPONSE\n"); size = nas_decode_mobile_identity(&identity_response->mobile_identity, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; return decoded; } c_int32_t nas_decode_authentication_failure(nas_message_t *message, pkbuf_t *pkbuf) { nas_authentication_failure_t *authentication_failure = &message->emm.authentication_failure; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode AUTHENTICATION_FAILURE\n"); size = nas_decode_emm_cause(&authentication_failure->emm_cause, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_AUTHENTICATION_FAILURE_AUTHENTICATION_FAILURE_PARAMETER_TYPE: size = nas_decode_authentication_failure_parameter(&authentication_failure->authentication_failure_parameter, pkbuf); d_assert(size >= 0, return -1, "decode failed"); authentication_failure->presencemask |= NAS_AUTHENTICATION_FAILURE_AUTHENTICATION_FAILURE_PARAMETER_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_security_mode_command(nas_message_t *message, pkbuf_t *pkbuf) { nas_security_mode_command_t *security_mode_command = &message->emm.security_mode_command; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode SECURITY_MODE_COMMAND\n"); size = nas_decode_security_algorithms(&security_mode_command->selected_nas_security_algorithms, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; size = nas_decode_key_set_identifier(&security_mode_command->nas_key_set_identifier, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; size = nas_decode_ue_security_capability(&security_mode_command->replayed_ue_security_capabilities, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_SECURITY_MODE_COMMAND_IMEISV_REQUEST_TYPE: size = nas_decode_imeisv_request(&security_mode_command->imeisv_request, pkbuf); d_assert(size >= 0, return -1, "decode failed"); security_mode_command->presencemask |= NAS_SECURITY_MODE_COMMAND_IMEISV_REQUEST_PRESENT; decoded += size; break; case NAS_SECURITY_MODE_COMMAND_REPLAYED_NONCEUE_TYPE: size = nas_decode_nonce(&security_mode_command->replayed_nonceue, pkbuf); d_assert(size >= 0, return -1, "decode failed"); security_mode_command->presencemask |= NAS_SECURITY_MODE_COMMAND_REPLAYED_NONCEUE_PRESENT; decoded += size; break; case NAS_SECURITY_MODE_COMMAND_NONCEMME_TYPE: size = nas_decode_nonce(&security_mode_command->noncemme, pkbuf); d_assert(size >= 0, return -1, "decode failed"); security_mode_command->presencemask |= NAS_SECURITY_MODE_COMMAND_NONCEMME_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_security_mode_complete(nas_message_t *message, pkbuf_t *pkbuf) { nas_security_mode_complete_t *security_mode_complete = &message->emm.security_mode_complete; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode SECURITY_MODE_COMPLETE\n"); while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_SECURITY_MODE_COMPLETE_IMEISV_TYPE: size = nas_decode_mobile_identity(&security_mode_complete->imeisv, pkbuf); d_assert(size >= 0, return -1, "decode failed"); security_mode_complete->presencemask |= NAS_SECURITY_MODE_COMPLETE_IMEISV_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_security_mode_reject(nas_message_t *message, pkbuf_t *pkbuf) { nas_security_mode_reject_t *security_mode_reject = &message->emm.security_mode_reject; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode SECURITY_MODE_REJECT\n"); size = nas_decode_emm_cause(&security_mode_reject->emm_cause, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; return decoded; } c_int32_t nas_decode_emm_status(nas_message_t *message, pkbuf_t *pkbuf) { nas_emm_status_t *emm_status = &message->emm.emm_status; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode EMM_STATUS\n"); size = nas_decode_emm_cause(&emm_status->emm_cause, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; return decoded; } c_int32_t nas_decode_emm_information(nas_message_t *message, pkbuf_t *pkbuf) { nas_emm_information_t *emm_information = &message->emm.emm_information; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode EMM_INFORMATION\n"); while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_EMM_INFORMATION_FULL_NAME_FOR_NETWORK_TYPE: size = nas_decode_network_name(&emm_information->full_name_for_network, pkbuf); d_assert(size >= 0, return -1, "decode failed"); emm_information->presencemask |= NAS_EMM_INFORMATION_FULL_NAME_FOR_NETWORK_PRESENT; decoded += size; break; case NAS_EMM_INFORMATION_SHORT_NAME_FOR_NETWORK_TYPE: size = nas_decode_network_name(&emm_information->short_name_for_network, pkbuf); d_assert(size >= 0, return -1, "decode failed"); emm_information->presencemask |= NAS_EMM_INFORMATION_SHORT_NAME_FOR_NETWORK_PRESENT; decoded += size; break; case NAS_EMM_INFORMATION_LOCAL_TIME_ZONE_TYPE: size = nas_decode_time_zone(&emm_information->local_time_zone, pkbuf); d_assert(size >= 0, return -1, "decode failed"); emm_information->presencemask |= NAS_EMM_INFORMATION_LOCAL_TIME_ZONE_PRESENT; decoded += size; break; case NAS_EMM_INFORMATION_UNIVERSAL_TIME_AND_LOCAL_TIME_ZONE_TYPE: size = nas_decode_time_zone_and_time(&emm_information->universal_time_and_local_time_zone, pkbuf); d_assert(size >= 0, return -1, "decode failed"); emm_information->presencemask |= NAS_EMM_INFORMATION_UNIVERSAL_TIME_AND_LOCAL_TIME_ZONE_PRESENT; decoded += size; break; case NAS_EMM_INFORMATION_NETWORK_DAYLIGHT_SAVING_TIME_TYPE: size = nas_decode_daylight_saving_time(&emm_information->network_daylight_saving_time, pkbuf); d_assert(size >= 0, return -1, "decode failed"); emm_information->presencemask |= NAS_EMM_INFORMATION_NETWORK_DAYLIGHT_SAVING_TIME_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_downlink_nas_transport(nas_message_t *message, pkbuf_t *pkbuf) { nas_downlink_nas_transport_t *downlink_nas_transport = &message->emm.downlink_nas_transport; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode DOWNLINK_NAS_TRANSPORT\n"); size = nas_decode_message_container(&downlink_nas_transport->nas_message_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; return decoded; } c_int32_t nas_decode_uplink_nas_transport(nas_message_t *message, pkbuf_t *pkbuf) { nas_uplink_nas_transport_t *uplink_nas_transport = &message->emm.uplink_nas_transport; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode UPLINK_NAS_TRANSPORT\n"); size = nas_decode_message_container(&uplink_nas_transport->nas_message_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; return decoded; } c_int32_t nas_decode_cs_service_notification(nas_message_t *message, pkbuf_t *pkbuf) { nas_cs_service_notification_t *cs_service_notification = &message->emm.cs_service_notification; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode CS_SERVICE_NOTIFICATION\n"); size = nas_decode_paging_identity(&cs_service_notification->paging_identity, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_CS_SERVICE_NOTIFICATION_CLI_TYPE: size = nas_decode_cli(&cs_service_notification->cli, pkbuf); d_assert(size >= 0, return -1, "decode failed"); cs_service_notification->presencemask |= NAS_CS_SERVICE_NOTIFICATION_CLI_PRESENT; decoded += size; break; case NAS_CS_SERVICE_NOTIFICATION_SS_CODE_TYPE: size = nas_decode_ss_code(&cs_service_notification->ss_code, pkbuf); d_assert(size >= 0, return -1, "decode failed"); cs_service_notification->presencemask |= NAS_CS_SERVICE_NOTIFICATION_SS_CODE_PRESENT; decoded += size; break; case NAS_CS_SERVICE_NOTIFICATION_LCS_INDICATOR_TYPE: size = nas_decode_lcs_indicator(&cs_service_notification->lcs_indicator, pkbuf); d_assert(size >= 0, return -1, "decode failed"); cs_service_notification->presencemask |= NAS_CS_SERVICE_NOTIFICATION_LCS_INDICATOR_PRESENT; decoded += size; break; case NAS_CS_SERVICE_NOTIFICATION_LCS_CLIENT_IDENTITY_TYPE: size = nas_decode_lcs_client_identity(&cs_service_notification->lcs_client_identity, pkbuf); d_assert(size >= 0, return -1, "decode failed"); cs_service_notification->presencemask |= NAS_CS_SERVICE_NOTIFICATION_LCS_CLIENT_IDENTITY_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_uplink_generic_nas_transport(nas_message_t *message, pkbuf_t *pkbuf) { nas_uplink_generic_nas_transport_t *uplink_generic_nas_transport = &message->emm.uplink_generic_nas_transport; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode UPLINK_GENERIC_NAS_TRANSPORT\n"); size = nas_decode_generic_message_container_type(&uplink_generic_nas_transport->generic_message_container_type, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; size = nas_decode_generic_message_container(&uplink_generic_nas_transport->generic_message_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_UPLINK_GENERIC_NAS_TRANSPORT_ADDITIONAL_INFORMATION_TYPE: size = nas_decode_additional_information(&uplink_generic_nas_transport->additional_information, pkbuf); d_assert(size >= 0, return -1, "decode failed"); uplink_generic_nas_transport->presencemask |= NAS_UPLINK_GENERIC_NAS_TRANSPORT_ADDITIONAL_INFORMATION_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_downlink_generic_nas_transport(nas_message_t *message, pkbuf_t *pkbuf) { nas_downlink_generic_nas_transport_t *downlink_generic_nas_transport = &message->emm.downlink_generic_nas_transport; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode DOWNLINK_GENERIC_NAS_TRANSPORT\n"); size = nas_decode_generic_message_container_type(&downlink_generic_nas_transport->generic_message_container_type, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; size = nas_decode_generic_message_container(&downlink_generic_nas_transport->generic_message_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_DOWNLINK_GENERIC_NAS_TRANSPORT_ADDITIONAL_INFORMATION_TYPE: size = nas_decode_additional_information(&downlink_generic_nas_transport->additional_information, pkbuf); d_assert(size >= 0, return -1, "decode failed"); downlink_generic_nas_transport->presencemask |= NAS_DOWNLINK_GENERIC_NAS_TRANSPORT_ADDITIONAL_INFORMATION_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_activate_default_eps_bearer_context_request(nas_message_t *message, pkbuf_t *pkbuf) { nas_activate_default_eps_bearer_context_request_t *activate_default_eps_bearer_context_request = &message->esm.activate_default_eps_bearer_context_request; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST\n"); size = nas_decode_eps_quality_of_service(&activate_default_eps_bearer_context_request->eps_qos, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; size = nas_decode_access_point_name(&activate_default_eps_bearer_context_request->access_point_name, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; size = nas_decode_pdn_address(&activate_default_eps_bearer_context_request->pdn_address, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_TRANSACTION_IDENTIFIER_TYPE: size = nas_decode_transaction_identifier(&activate_default_eps_bearer_context_request->transaction_identifier, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_default_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_TRANSACTION_IDENTIFIER_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_QOS_TYPE: size = nas_decode_quality_of_service(&activate_default_eps_bearer_context_request->negotiated_qos, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_default_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_QOS_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_TYPE: size = nas_decode_llc_service_access_point_identifier(&activate_default_eps_bearer_context_request->negotiated_llc_sapi, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_default_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_RADIO_PRIORITY_TYPE: size = nas_decode_radio_priority(&activate_default_eps_bearer_context_request->radio_priority, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_default_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_RADIO_PRIORITY_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_TYPE: size = nas_decode_packet_flow_identifier(&activate_default_eps_bearer_context_request->packet_flow_identifier, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_default_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_APN_AMBR_TYPE: size = nas_decode_apn_aggregate_maximum_bit_rate(&activate_default_eps_bearer_context_request->apn_ambr, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_default_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_APN_AMBR_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_ESM_CAUSE_TYPE: size = nas_decode_esm_cause(&activate_default_eps_bearer_context_request->esm_cause, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_default_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_ESM_CAUSE_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_protocol_configuration_options(&activate_default_eps_bearer_context_request->protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_default_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_CONNECTIVITY_TYPE_TYPE: size = nas_decode_connectivity_type(&activate_default_eps_bearer_context_request->connectivity_type, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_default_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_CONNECTIVITY_TYPE_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_TYPE: size = nas_decode_wlan_offload_acceptability(&activate_default_eps_bearer_context_request->wlan_offload_indication, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_default_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_TYPE: size = nas_decode_nbifom_container(&activate_default_eps_bearer_context_request->nbifom_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_default_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_HEADER_COMPRESSION_CONFIGURATION_TYPE: size = nas_decode_header_compression_configuration(&activate_default_eps_bearer_context_request->header_compression_configuration, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_default_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_HEADER_COMPRESSION_CONFIGURATION_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_CONTROL_PLANE_ONLY_INDICATION_TYPE: size = nas_decode_control_plane_only_indication(&activate_default_eps_bearer_context_request->control_plane_only_indication, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_default_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_CONTROL_PLANE_ONLY_INDICATION_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_extended_protocol_configuration_options(&activate_default_eps_bearer_context_request->extended_protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_default_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_SERVING_PLMN_RATE_CONTROL_TYPE: size = nas_decode_serving_plmn_rate_control(&activate_default_eps_bearer_context_request->serving_plmn_rate_control, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_default_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_SERVING_PLMN_RATE_CONTROL_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_activate_default_eps_bearer_context_accept(nas_message_t *message, pkbuf_t *pkbuf) { nas_activate_default_eps_bearer_context_accept_t *activate_default_eps_bearer_context_accept = &message->esm.activate_default_eps_bearer_context_accept; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT\n"); while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_protocol_configuration_options(&activate_default_eps_bearer_context_accept->protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_default_eps_bearer_context_accept->presencemask |= NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_extended_protocol_configuration_options(&activate_default_eps_bearer_context_accept->extended_protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_default_eps_bearer_context_accept->presencemask |= NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_activate_default_eps_bearer_context_reject(nas_message_t *message, pkbuf_t *pkbuf) { nas_activate_default_eps_bearer_context_reject_t *activate_default_eps_bearer_context_reject = &message->esm.activate_default_eps_bearer_context_reject; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT\n"); size = nas_decode_esm_cause(&activate_default_eps_bearer_context_reject->esm_cause, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_protocol_configuration_options(&activate_default_eps_bearer_context_reject->protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_default_eps_bearer_context_reject->presencemask |= NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_extended_protocol_configuration_options(&activate_default_eps_bearer_context_reject->extended_protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_default_eps_bearer_context_reject->presencemask |= NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_activate_dedicated_eps_bearer_context_request(nas_message_t *message, pkbuf_t *pkbuf) { nas_activate_dedicated_eps_bearer_context_request_t *activate_dedicated_eps_bearer_context_request = &message->esm.activate_dedicated_eps_bearer_context_request; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST\n"); size = nas_decode_linked_eps_bearer_identity(&activate_dedicated_eps_bearer_context_request->linked_eps_bearer_identity, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; size = nas_decode_eps_quality_of_service(&activate_dedicated_eps_bearer_context_request->eps_qos, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; size = nas_decode_traffic_flow_template(&activate_dedicated_eps_bearer_context_request->tft, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_TRANSACTION_IDENTIFIER_TYPE: size = nas_decode_transaction_identifier(&activate_dedicated_eps_bearer_context_request->transaction_identifier, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_dedicated_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_TRANSACTION_IDENTIFIER_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_QOS_TYPE: size = nas_decode_quality_of_service(&activate_dedicated_eps_bearer_context_request->negotiated_qos, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_dedicated_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_QOS_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_TYPE: size = nas_decode_llc_service_access_point_identifier(&activate_dedicated_eps_bearer_context_request->negotiated_llc_sapi, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_dedicated_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_RADIO_PRIORITY_TYPE: size = nas_decode_radio_priority(&activate_dedicated_eps_bearer_context_request->radio_priority, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_dedicated_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_RADIO_PRIORITY_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_TYPE: size = nas_decode_packet_flow_identifier(&activate_dedicated_eps_bearer_context_request->packet_flow_identifier, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_dedicated_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_protocol_configuration_options(&activate_dedicated_eps_bearer_context_request->protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_dedicated_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_TYPE: size = nas_decode_wlan_offload_acceptability(&activate_dedicated_eps_bearer_context_request->wlan_offload_indication, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_dedicated_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_TYPE: size = nas_decode_nbifom_container(&activate_dedicated_eps_bearer_context_request->nbifom_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_dedicated_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_extended_protocol_configuration_options(&activate_dedicated_eps_bearer_context_request->extended_protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_dedicated_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_activate_dedicated_eps_bearer_context_accept(nas_message_t *message, pkbuf_t *pkbuf) { nas_activate_dedicated_eps_bearer_context_accept_t *activate_dedicated_eps_bearer_context_accept = &message->esm.activate_dedicated_eps_bearer_context_accept; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT\n"); while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_protocol_configuration_options(&activate_dedicated_eps_bearer_context_accept->protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_dedicated_eps_bearer_context_accept->presencemask |= NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_NBIFOM_CONTAINER_TYPE: size = nas_decode_nbifom_container(&activate_dedicated_eps_bearer_context_accept->nbifom_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_dedicated_eps_bearer_context_accept->presencemask |= NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_NBIFOM_CONTAINER_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_extended_protocol_configuration_options(&activate_dedicated_eps_bearer_context_accept->extended_protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_dedicated_eps_bearer_context_accept->presencemask |= NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_activate_dedicated_eps_bearer_context_reject(nas_message_t *message, pkbuf_t *pkbuf) { nas_activate_dedicated_eps_bearer_context_reject_t *activate_dedicated_eps_bearer_context_reject = &message->esm.activate_dedicated_eps_bearer_context_reject; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT\n"); size = nas_decode_esm_cause(&activate_dedicated_eps_bearer_context_reject->esm_cause, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_protocol_configuration_options(&activate_dedicated_eps_bearer_context_reject->protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_dedicated_eps_bearer_context_reject->presencemask |= NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_NBIFOM_CONTAINER_TYPE: size = nas_decode_nbifom_container(&activate_dedicated_eps_bearer_context_reject->nbifom_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_dedicated_eps_bearer_context_reject->presencemask |= NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_NBIFOM_CONTAINER_PRESENT; decoded += size; break; case NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_extended_protocol_configuration_options(&activate_dedicated_eps_bearer_context_reject->extended_protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); activate_dedicated_eps_bearer_context_reject->presencemask |= NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_modify_eps_bearer_context_request(nas_message_t *message, pkbuf_t *pkbuf) { nas_modify_eps_bearer_context_request_t *modify_eps_bearer_context_request = &message->esm.modify_eps_bearer_context_request; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode MODIFY_EPS_BEARER_CONTEXT_REQUEST\n"); while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEW_EPS_QOS_TYPE: size = nas_decode_eps_quality_of_service(&modify_eps_bearer_context_request->new_eps_qos, pkbuf); d_assert(size >= 0, return -1, "decode failed"); modify_eps_bearer_context_request->presencemask |= NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEW_EPS_QOS_PRESENT; decoded += size; break; case NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_TFT_TYPE: size = nas_decode_traffic_flow_template(&modify_eps_bearer_context_request->tft, pkbuf); d_assert(size >= 0, return -1, "decode failed"); modify_eps_bearer_context_request->presencemask |= NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_TFT_PRESENT; decoded += size; break; case NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEW_QOS_TYPE: size = nas_decode_quality_of_service(&modify_eps_bearer_context_request->new_qos, pkbuf); d_assert(size >= 0, return -1, "decode failed"); modify_eps_bearer_context_request->presencemask |= NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEW_QOS_PRESENT; decoded += size; break; case NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_TYPE: size = nas_decode_llc_service_access_point_identifier(&modify_eps_bearer_context_request->negotiated_llc_sapi, pkbuf); d_assert(size >= 0, return -1, "decode failed"); modify_eps_bearer_context_request->presencemask |= NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_PRESENT; decoded += size; break; case NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_RADIO_PRIORITY_TYPE: size = nas_decode_radio_priority(&modify_eps_bearer_context_request->radio_priority, pkbuf); d_assert(size >= 0, return -1, "decode failed"); modify_eps_bearer_context_request->presencemask |= NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_RADIO_PRIORITY_PRESENT; decoded += size; break; case NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_TYPE: size = nas_decode_packet_flow_identifier(&modify_eps_bearer_context_request->packet_flow_identifier, pkbuf); d_assert(size >= 0, return -1, "decode failed"); modify_eps_bearer_context_request->presencemask |= NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_PRESENT; decoded += size; break; case NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_APN_AMBR_TYPE: size = nas_decode_apn_aggregate_maximum_bit_rate(&modify_eps_bearer_context_request->apn_ambr, pkbuf); d_assert(size >= 0, return -1, "decode failed"); modify_eps_bearer_context_request->presencemask |= NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_APN_AMBR_PRESENT; decoded += size; break; case NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_protocol_configuration_options(&modify_eps_bearer_context_request->protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); modify_eps_bearer_context_request->presencemask |= NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; case NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_TYPE: size = nas_decode_wlan_offload_acceptability(&modify_eps_bearer_context_request->wlan_offload_indication, pkbuf); d_assert(size >= 0, return -1, "decode failed"); modify_eps_bearer_context_request->presencemask |= NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_PRESENT; decoded += size; break; case NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_TYPE: size = nas_decode_nbifom_container(&modify_eps_bearer_context_request->nbifom_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); modify_eps_bearer_context_request->presencemask |= NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_PRESENT; decoded += size; break; case NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_HEADER_COMPRESSION_CONFIGURATION_TYPE: size = nas_decode_header_compression_configuration(&modify_eps_bearer_context_request->header_compression_configuration, pkbuf); d_assert(size >= 0, return -1, "decode failed"); modify_eps_bearer_context_request->presencemask |= NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_HEADER_COMPRESSION_CONFIGURATION_PRESENT; decoded += size; break; case NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_extended_protocol_configuration_options(&modify_eps_bearer_context_request->extended_protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); modify_eps_bearer_context_request->presencemask |= NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_modify_eps_bearer_context_accept(nas_message_t *message, pkbuf_t *pkbuf) { nas_modify_eps_bearer_context_accept_t *modify_eps_bearer_context_accept = &message->esm.modify_eps_bearer_context_accept; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode MODIFY_EPS_BEARER_CONTEXT_ACCEPT\n"); while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_protocol_configuration_options(&modify_eps_bearer_context_accept->protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); modify_eps_bearer_context_accept->presencemask |= NAS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; case NAS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_NBIFOM_CONTAINER_TYPE: size = nas_decode_nbifom_container(&modify_eps_bearer_context_accept->nbifom_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); modify_eps_bearer_context_accept->presencemask |= NAS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_NBIFOM_CONTAINER_PRESENT; decoded += size; break; case NAS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_extended_protocol_configuration_options(&modify_eps_bearer_context_accept->extended_protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); modify_eps_bearer_context_accept->presencemask |= NAS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_modify_eps_bearer_context_reject(nas_message_t *message, pkbuf_t *pkbuf) { nas_modify_eps_bearer_context_reject_t *modify_eps_bearer_context_reject = &message->esm.modify_eps_bearer_context_reject; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode MODIFY_EPS_BEARER_CONTEXT_REJECT\n"); size = nas_decode_esm_cause(&modify_eps_bearer_context_reject->esm_cause, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_MODIFY_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_protocol_configuration_options(&modify_eps_bearer_context_reject->protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); modify_eps_bearer_context_reject->presencemask |= NAS_MODIFY_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; case NAS_MODIFY_EPS_BEARER_CONTEXT_REJECT_NBIFOM_CONTAINER_TYPE: size = nas_decode_nbifom_container(&modify_eps_bearer_context_reject->nbifom_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); modify_eps_bearer_context_reject->presencemask |= NAS_MODIFY_EPS_BEARER_CONTEXT_REJECT_NBIFOM_CONTAINER_PRESENT; decoded += size; break; case NAS_MODIFY_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_extended_protocol_configuration_options(&modify_eps_bearer_context_reject->extended_protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); modify_eps_bearer_context_reject->presencemask |= NAS_MODIFY_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_deactivate_eps_bearer_context_request(nas_message_t *message, pkbuf_t *pkbuf) { nas_deactivate_eps_bearer_context_request_t *deactivate_eps_bearer_context_request = &message->esm.deactivate_eps_bearer_context_request; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST\n"); size = nas_decode_esm_cause(&deactivate_eps_bearer_context_request->esm_cause, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_protocol_configuration_options(&deactivate_eps_bearer_context_request->protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); deactivate_eps_bearer_context_request->presencemask |= NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; case NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_T3396_VALUE_TYPE: size = nas_decode_gprs_timer_3(&deactivate_eps_bearer_context_request->t3396_value, pkbuf); d_assert(size >= 0, return -1, "decode failed"); deactivate_eps_bearer_context_request->presencemask |= NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_T3396_VALUE_PRESENT; decoded += size; break; case NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_TYPE: size = nas_decode_wlan_offload_acceptability(&deactivate_eps_bearer_context_request->wlan_offload_indication, pkbuf); d_assert(size >= 0, return -1, "decode failed"); deactivate_eps_bearer_context_request->presencemask |= NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_PRESENT; decoded += size; break; case NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_TYPE: size = nas_decode_nbifom_container(&deactivate_eps_bearer_context_request->nbifom_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); deactivate_eps_bearer_context_request->presencemask |= NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_PRESENT; decoded += size; break; case NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_extended_protocol_configuration_options(&deactivate_eps_bearer_context_request->extended_protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); deactivate_eps_bearer_context_request->presencemask |= NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_deactivate_eps_bearer_context_accept(nas_message_t *message, pkbuf_t *pkbuf) { nas_deactivate_eps_bearer_context_accept_t *deactivate_eps_bearer_context_accept = &message->esm.deactivate_eps_bearer_context_accept; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT\n"); while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_protocol_configuration_options(&deactivate_eps_bearer_context_accept->protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); deactivate_eps_bearer_context_accept->presencemask |= NAS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; case NAS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_extended_protocol_configuration_options(&deactivate_eps_bearer_context_accept->extended_protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); deactivate_eps_bearer_context_accept->presencemask |= NAS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_pdn_connectivity_request(nas_message_t *message, pkbuf_t *pkbuf) { nas_pdn_connectivity_request_t *pdn_connectivity_request = &message->esm.pdn_connectivity_request; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode PDN_CONNECTIVITY_REQUEST\n"); size = nas_decode_request_type(&pdn_connectivity_request->request_type, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_PDN_CONNECTIVITY_REQUEST_ESM_INFORMATION_TRANSFER_FLAG_TYPE: size = nas_decode_esm_information_transfer_flag(&pdn_connectivity_request->esm_information_transfer_flag, pkbuf); d_assert(size >= 0, return -1, "decode failed"); pdn_connectivity_request->presencemask |= NAS_PDN_CONNECTIVITY_REQUEST_ESM_INFORMATION_TRANSFER_FLAG_PRESENT; decoded += size; break; case NAS_PDN_CONNECTIVITY_REQUEST_ACCESS_POINT_NAME_TYPE: size = nas_decode_access_point_name(&pdn_connectivity_request->access_point_name, pkbuf); d_assert(size >= 0, return -1, "decode failed"); pdn_connectivity_request->presencemask |= NAS_PDN_CONNECTIVITY_REQUEST_ACCESS_POINT_NAME_PRESENT; decoded += size; break; case NAS_PDN_CONNECTIVITY_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_protocol_configuration_options(&pdn_connectivity_request->protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); pdn_connectivity_request->presencemask |= NAS_PDN_CONNECTIVITY_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; case NAS_PDN_CONNECTIVITY_REQUEST_DEVICE_PROPERTIES_TYPE: size = nas_decode_device_properties(&pdn_connectivity_request->device_properties, pkbuf); d_assert(size >= 0, return -1, "decode failed"); pdn_connectivity_request->presencemask |= NAS_PDN_CONNECTIVITY_REQUEST_DEVICE_PROPERTIES_PRESENT; decoded += size; break; case NAS_PDN_CONNECTIVITY_REQUEST_NBIFOM_CONTAINER_TYPE: size = nas_decode_nbifom_container(&pdn_connectivity_request->nbifom_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); pdn_connectivity_request->presencemask |= NAS_PDN_CONNECTIVITY_REQUEST_NBIFOM_CONTAINER_PRESENT; decoded += size; break; case NAS_PDN_CONNECTIVITY_REQUEST_HEADER_COMPRESSION_CONFIGURATION_TYPE: size = nas_decode_header_compression_configuration(&pdn_connectivity_request->header_compression_configuration, pkbuf); d_assert(size >= 0, return -1, "decode failed"); pdn_connectivity_request->presencemask |= NAS_PDN_CONNECTIVITY_REQUEST_HEADER_COMPRESSION_CONFIGURATION_PRESENT; decoded += size; break; case NAS_PDN_CONNECTIVITY_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_extended_protocol_configuration_options(&pdn_connectivity_request->extended_protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); pdn_connectivity_request->presencemask |= NAS_PDN_CONNECTIVITY_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_pdn_connectivity_reject(nas_message_t *message, pkbuf_t *pkbuf) { nas_pdn_connectivity_reject_t *pdn_connectivity_reject = &message->esm.pdn_connectivity_reject; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode PDN_CONNECTIVITY_REJECT\n"); size = nas_decode_esm_cause(&pdn_connectivity_reject->esm_cause, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_PDN_CONNECTIVITY_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_protocol_configuration_options(&pdn_connectivity_reject->protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); pdn_connectivity_reject->presencemask |= NAS_PDN_CONNECTIVITY_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; case NAS_PDN_CONNECTIVITY_REJECT_BACK_OFF_TIMER_VALUE_TYPE: size = nas_decode_gprs_timer_3(&pdn_connectivity_reject->back_off_timer_value, pkbuf); d_assert(size >= 0, return -1, "decode failed"); pdn_connectivity_reject->presencemask |= NAS_PDN_CONNECTIVITY_REJECT_BACK_OFF_TIMER_VALUE_PRESENT; decoded += size; break; case NAS_PDN_CONNECTIVITY_REJECT_RE_ATTEMPT_INDICATOR_TYPE: size = nas_decode_re_attempt_indicator(&pdn_connectivity_reject->re_attempt_indicator, pkbuf); d_assert(size >= 0, return -1, "decode failed"); pdn_connectivity_reject->presencemask |= NAS_PDN_CONNECTIVITY_REJECT_RE_ATTEMPT_INDICATOR_PRESENT; decoded += size; break; case NAS_PDN_CONNECTIVITY_REJECT_NBIFOM_CONTAINER_TYPE: size = nas_decode_nbifom_container(&pdn_connectivity_reject->nbifom_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); pdn_connectivity_reject->presencemask |= NAS_PDN_CONNECTIVITY_REJECT_NBIFOM_CONTAINER_PRESENT; decoded += size; break; case NAS_PDN_CONNECTIVITY_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_extended_protocol_configuration_options(&pdn_connectivity_reject->extended_protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); pdn_connectivity_reject->presencemask |= NAS_PDN_CONNECTIVITY_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_pdn_disconnect_request(nas_message_t *message, pkbuf_t *pkbuf) { nas_pdn_disconnect_request_t *pdn_disconnect_request = &message->esm.pdn_disconnect_request; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode PDN_DISCONNECT_REQUEST\n"); size = nas_decode_linked_eps_bearer_identity(&pdn_disconnect_request->linked_eps_bearer_identity, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_PDN_DISCONNECT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_protocol_configuration_options(&pdn_disconnect_request->protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); pdn_disconnect_request->presencemask |= NAS_PDN_DISCONNECT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; case NAS_PDN_DISCONNECT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_extended_protocol_configuration_options(&pdn_disconnect_request->extended_protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); pdn_disconnect_request->presencemask |= NAS_PDN_DISCONNECT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_pdn_disconnect_reject(nas_message_t *message, pkbuf_t *pkbuf) { nas_pdn_disconnect_reject_t *pdn_disconnect_reject = &message->esm.pdn_disconnect_reject; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode PDN_DISCONNECT_REJECT\n"); size = nas_decode_esm_cause(&pdn_disconnect_reject->esm_cause, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_PDN_DISCONNECT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_protocol_configuration_options(&pdn_disconnect_reject->protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); pdn_disconnect_reject->presencemask |= NAS_PDN_DISCONNECT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; case NAS_PDN_DISCONNECT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_extended_protocol_configuration_options(&pdn_disconnect_reject->extended_protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); pdn_disconnect_reject->presencemask |= NAS_PDN_DISCONNECT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_bearer_resource_allocation_request(nas_message_t *message, pkbuf_t *pkbuf) { nas_bearer_resource_allocation_request_t *bearer_resource_allocation_request = &message->esm.bearer_resource_allocation_request; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode BEARER_RESOURCE_ALLOCATION_REQUEST\n"); size = nas_decode_linked_eps_bearer_identity(&bearer_resource_allocation_request->linked_eps_bearer_identity, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; size = nas_decode_traffic_flow_aggregate_description(&bearer_resource_allocation_request->traffic_flow_aggregate, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; size = nas_decode_eps_quality_of_service(&bearer_resource_allocation_request->required_traffic_flow_qos, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_protocol_configuration_options(&bearer_resource_allocation_request->protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); bearer_resource_allocation_request->presencemask |= NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; case NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_DEVICE_PROPERTIES_TYPE: size = nas_decode_device_properties(&bearer_resource_allocation_request->device_properties, pkbuf); d_assert(size >= 0, return -1, "decode failed"); bearer_resource_allocation_request->presencemask |= NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_DEVICE_PROPERTIES_PRESENT; decoded += size; break; case NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_NBIFOM_CONTAINER_TYPE: size = nas_decode_nbifom_container(&bearer_resource_allocation_request->nbifom_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); bearer_resource_allocation_request->presencemask |= NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_NBIFOM_CONTAINER_PRESENT; decoded += size; break; case NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_extended_protocol_configuration_options(&bearer_resource_allocation_request->extended_protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); bearer_resource_allocation_request->presencemask |= NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_bearer_resource_allocation_reject(nas_message_t *message, pkbuf_t *pkbuf) { nas_bearer_resource_allocation_reject_t *bearer_resource_allocation_reject = &message->esm.bearer_resource_allocation_reject; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode BEARER_RESOURCE_ALLOCATION_REJECT\n"); size = nas_decode_esm_cause(&bearer_resource_allocation_reject->esm_cause, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_BEARER_RESOURCE_ALLOCATION_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_protocol_configuration_options(&bearer_resource_allocation_reject->protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); bearer_resource_allocation_reject->presencemask |= NAS_BEARER_RESOURCE_ALLOCATION_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; case NAS_BEARER_RESOURCE_ALLOCATION_REJECT_BACK_OFF_TIMER_VALUE_TYPE: size = nas_decode_gprs_timer_3(&bearer_resource_allocation_reject->back_off_timer_value, pkbuf); d_assert(size >= 0, return -1, "decode failed"); bearer_resource_allocation_reject->presencemask |= NAS_BEARER_RESOURCE_ALLOCATION_REJECT_BACK_OFF_TIMER_VALUE_PRESENT; decoded += size; break; case NAS_BEARER_RESOURCE_ALLOCATION_REJECT_RE_ATTEMPT_INDICATOR_TYPE: size = nas_decode_re_attempt_indicator(&bearer_resource_allocation_reject->re_attempt_indicator, pkbuf); d_assert(size >= 0, return -1, "decode failed"); bearer_resource_allocation_reject->presencemask |= NAS_BEARER_RESOURCE_ALLOCATION_REJECT_RE_ATTEMPT_INDICATOR_PRESENT; decoded += size; break; case NAS_BEARER_RESOURCE_ALLOCATION_REJECT_NBIFOM_CONTAINER_TYPE: size = nas_decode_nbifom_container(&bearer_resource_allocation_reject->nbifom_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); bearer_resource_allocation_reject->presencemask |= NAS_BEARER_RESOURCE_ALLOCATION_REJECT_NBIFOM_CONTAINER_PRESENT; decoded += size; break; case NAS_BEARER_RESOURCE_ALLOCATION_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_extended_protocol_configuration_options(&bearer_resource_allocation_reject->extended_protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); bearer_resource_allocation_reject->presencemask |= NAS_BEARER_RESOURCE_ALLOCATION_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_bearer_resource_modification_request(nas_message_t *message, pkbuf_t *pkbuf) { nas_bearer_resource_modification_request_t *bearer_resource_modification_request = &message->esm.bearer_resource_modification_request; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode BEARER_RESOURCE_MODIFICATION_REQUEST\n"); size = nas_decode_linked_eps_bearer_identity(&bearer_resource_modification_request->eps_bearer_identity_for_packet_filter, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; size = nas_decode_traffic_flow_aggregate_description(&bearer_resource_modification_request->traffic_flow_aggregate, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_REQUIRED_TRAFFIC_FLOW_QOS_TYPE: size = nas_decode_eps_quality_of_service(&bearer_resource_modification_request->required_traffic_flow_qos, pkbuf); d_assert(size >= 0, return -1, "decode failed"); bearer_resource_modification_request->presencemask |= NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_REQUIRED_TRAFFIC_FLOW_QOS_PRESENT; decoded += size; break; case NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_ESM_CAUSE_TYPE: size = nas_decode_esm_cause(&bearer_resource_modification_request->esm_cause, pkbuf); d_assert(size >= 0, return -1, "decode failed"); bearer_resource_modification_request->presencemask |= NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_ESM_CAUSE_PRESENT; decoded += size; break; case NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_protocol_configuration_options(&bearer_resource_modification_request->protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); bearer_resource_modification_request->presencemask |= NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; case NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_DEVICE_PROPERTIES_TYPE: size = nas_decode_device_properties(&bearer_resource_modification_request->device_properties, pkbuf); d_assert(size >= 0, return -1, "decode failed"); bearer_resource_modification_request->presencemask |= NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_DEVICE_PROPERTIES_PRESENT; decoded += size; break; case NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_NBIFOM_CONTAINER_TYPE: size = nas_decode_nbifom_container(&bearer_resource_modification_request->nbifom_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); bearer_resource_modification_request->presencemask |= NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_NBIFOM_CONTAINER_PRESENT; decoded += size; break; case NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_HEADER_COMPRESSION_CONFIGURATION_TYPE: size = nas_decode_header_compression_configuration(&bearer_resource_modification_request->header_compression_configuration, pkbuf); d_assert(size >= 0, return -1, "decode failed"); bearer_resource_modification_request->presencemask |= NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_HEADER_COMPRESSION_CONFIGURATION_PRESENT; decoded += size; break; case NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_extended_protocol_configuration_options(&bearer_resource_modification_request->extended_protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); bearer_resource_modification_request->presencemask |= NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_bearer_resource_modification_reject(nas_message_t *message, pkbuf_t *pkbuf) { nas_bearer_resource_modification_reject_t *bearer_resource_modification_reject = &message->esm.bearer_resource_modification_reject; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode BEARER_RESOURCE_MODIFICATION_REJECT\n"); size = nas_decode_esm_cause(&bearer_resource_modification_reject->esm_cause, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_BEARER_RESOURCE_MODIFICATION_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_protocol_configuration_options(&bearer_resource_modification_reject->protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); bearer_resource_modification_reject->presencemask |= NAS_BEARER_RESOURCE_MODIFICATION_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; case NAS_BEARER_RESOURCE_MODIFICATION_REJECT_BACK_OFF_TIMER_VALUE_TYPE: size = nas_decode_gprs_timer_3(&bearer_resource_modification_reject->back_off_timer_value, pkbuf); d_assert(size >= 0, return -1, "decode failed"); bearer_resource_modification_reject->presencemask |= NAS_BEARER_RESOURCE_MODIFICATION_REJECT_BACK_OFF_TIMER_VALUE_PRESENT; decoded += size; break; case NAS_BEARER_RESOURCE_MODIFICATION_REJECT_RE_ATTEMPT_INDICATOR_TYPE: size = nas_decode_re_attempt_indicator(&bearer_resource_modification_reject->re_attempt_indicator, pkbuf); d_assert(size >= 0, return -1, "decode failed"); bearer_resource_modification_reject->presencemask |= NAS_BEARER_RESOURCE_MODIFICATION_REJECT_RE_ATTEMPT_INDICATOR_PRESENT; decoded += size; break; case NAS_BEARER_RESOURCE_MODIFICATION_REJECT_NBIFOM_CONTAINER_TYPE: size = nas_decode_nbifom_container(&bearer_resource_modification_reject->nbifom_container, pkbuf); d_assert(size >= 0, return -1, "decode failed"); bearer_resource_modification_reject->presencemask |= NAS_BEARER_RESOURCE_MODIFICATION_REJECT_NBIFOM_CONTAINER_PRESENT; decoded += size; break; case NAS_BEARER_RESOURCE_MODIFICATION_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_extended_protocol_configuration_options(&bearer_resource_modification_reject->extended_protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); bearer_resource_modification_reject->presencemask |= NAS_BEARER_RESOURCE_MODIFICATION_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_esm_information_response(nas_message_t *message, pkbuf_t *pkbuf) { nas_esm_information_response_t *esm_information_response = &message->esm.esm_information_response; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode ESM_INFORMATION_RESPONSE\n"); while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { case NAS_ESM_INFORMATION_RESPONSE_ACCESS_POINT_NAME_TYPE: size = nas_decode_access_point_name(&esm_information_response->access_point_name, pkbuf); d_assert(size >= 0, return -1, "decode failed"); esm_information_response->presencemask |= NAS_ESM_INFORMATION_RESPONSE_ACCESS_POINT_NAME_PRESENT; decoded += size; break; case NAS_ESM_INFORMATION_RESPONSE_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_protocol_configuration_options(&esm_information_response->protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); esm_information_response->presencemask |= NAS_ESM_INFORMATION_RESPONSE_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; case NAS_ESM_INFORMATION_RESPONSE_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE: size = nas_decode_extended_protocol_configuration_options(&esm_information_response->extended_protocol_configuration_options, pkbuf); d_assert(size >= 0, return -1, "decode failed"); esm_information_response->presencemask |= NAS_ESM_INFORMATION_RESPONSE_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; decoded += size; break; default: d_warn("Unknown type(0x%x) or not implemented\n", type); break; } } return decoded; } c_int32_t nas_decode_esm_status(nas_message_t *message, pkbuf_t *pkbuf) { nas_esm_status_t *esm_status = &message->esm.esm_status; c_int32_t decoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Decode ESM_STATUS\n"); size = nas_decode_esm_cause(&esm_status->esm_cause, pkbuf); d_assert(size >= 0, return -1, "decode failed"); decoded += size; return decoded; } status_t nas_emm_decode(nas_message_t *message, pkbuf_t *pkbuf) { status_t rv = CORE_ERROR; c_uint16_t size = 0; c_uint16_t decoded = 0; d_assert(pkbuf, return CORE_ERROR, "Null param"); d_assert(pkbuf->payload, return CORE_ERROR, "Null param"); memset(message, 0, sizeof(nas_message_t)); size = sizeof(nas_emm_header_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return CORE_ERROR, "pkbuf_header error"); memcpy(&message->emm.h, pkbuf->payload - size, size); decoded += size; if (message->emm.h.security_header_type >= NAS_SECURITY_HEADER_FOR_SERVICE_REQUEST_MESSAGE) { d_assert(pkbuf_header(pkbuf, 1) == CORE_OK, return CORE_ERROR, "pkbuf_header error"); decoded -= 1; size = nas_decode_service_request(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; goto out; } switch(message->emm.h.message_type) { case NAS_ATTACH_REQUEST: size = nas_decode_attach_request(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_ATTACH_ACCEPT: size = nas_decode_attach_accept(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_ATTACH_COMPLETE: size = nas_decode_attach_complete(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_ATTACH_REJECT: size = nas_decode_attach_reject(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_DETACH_REQUEST: size = nas_decode_detach_request_from_ue(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_DETACH_ACCEPT: break; case NAS_TRACKING_AREA_UPDATE_REQUEST: size = nas_decode_tracking_area_update_request(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_TRACKING_AREA_UPDATE_ACCEPT: size = nas_decode_tracking_area_update_accept(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_TRACKING_AREA_UPDATE_COMPLETE: break; case NAS_TRACKING_AREA_UPDATE_REJECT: size = nas_decode_tracking_area_update_reject(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_EXTENDED_SERVICE_REQUEST: size = nas_decode_extended_service_request(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_SERVICE_REJECT: size = nas_decode_service_reject(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_GUTI_REALLOCATION_COMMAND: size = nas_decode_guti_reallocation_command(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_GUTI_REALLOCATION_COMPLETE: break; case NAS_AUTHENTICATION_REQUEST: size = nas_decode_authentication_request(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_AUTHENTICATION_RESPONSE: size = nas_decode_authentication_response(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_AUTHENTICATION_REJECT: break; case NAS_IDENTITY_REQUEST: size = nas_decode_identity_request(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_IDENTITY_RESPONSE: size = nas_decode_identity_response(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_AUTHENTICATION_FAILURE: size = nas_decode_authentication_failure(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_SECURITY_MODE_COMMAND: size = nas_decode_security_mode_command(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_SECURITY_MODE_COMPLETE: size = nas_decode_security_mode_complete(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_SECURITY_MODE_REJECT: size = nas_decode_security_mode_reject(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_EMM_STATUS: size = nas_decode_emm_status(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_EMM_INFORMATION: size = nas_decode_emm_information(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_DOWNLINK_NAS_TRANSPORT: size = nas_decode_downlink_nas_transport(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_UPLINK_NAS_TRANSPORT: size = nas_decode_uplink_nas_transport(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_CS_SERVICE_NOTIFICATION: size = nas_decode_cs_service_notification(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_UPLINK_GENERIC_NAS_TRANSPORT: size = nas_decode_uplink_generic_nas_transport(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_DOWNLINK_GENERIC_NAS_TRANSPORT: size = nas_decode_downlink_generic_nas_transport(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; default: d_error("Unknown message type (0x%x) or not implemented", message->emm.h.message_type); break; } out: rv = pkbuf_header(pkbuf, decoded); d_assert(rv == CORE_OK, return CORE_ERROR, "pkbuf_header error"); return CORE_OK; } status_t nas_esm_decode(nas_message_t *message, pkbuf_t *pkbuf) { status_t rv = CORE_ERROR; c_uint16_t size = 0; c_uint16_t decoded = 0; d_assert(pkbuf, return CORE_ERROR, "Null param"); d_assert(pkbuf->payload, return CORE_ERROR, "Null param"); memset(message, 0, sizeof(nas_message_t)); size = sizeof(nas_esm_header_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return CORE_ERROR, "pkbuf_header error"); memcpy(&message->esm.h, pkbuf->payload - size, size); decoded += size; switch(message->esm.h.message_type) { case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST: size = nas_decode_activate_default_eps_bearer_context_request(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT: size = nas_decode_activate_default_eps_bearer_context_accept(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT: size = nas_decode_activate_default_eps_bearer_context_reject(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST: size = nas_decode_activate_dedicated_eps_bearer_context_request(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT: size = nas_decode_activate_dedicated_eps_bearer_context_accept(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT: size = nas_decode_activate_dedicated_eps_bearer_context_reject(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST: size = nas_decode_modify_eps_bearer_context_request(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT: size = nas_decode_modify_eps_bearer_context_accept(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_MODIFY_EPS_BEARER_CONTEXT_REJECT: size = nas_decode_modify_eps_bearer_context_reject(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST: size = nas_decode_deactivate_eps_bearer_context_request(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT: size = nas_decode_deactivate_eps_bearer_context_accept(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_PDN_CONNECTIVITY_REQUEST: size = nas_decode_pdn_connectivity_request(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_PDN_CONNECTIVITY_REJECT: size = nas_decode_pdn_connectivity_reject(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_PDN_DISCONNECT_REQUEST: size = nas_decode_pdn_disconnect_request(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_PDN_DISCONNECT_REJECT: size = nas_decode_pdn_disconnect_reject(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_BEARER_RESOURCE_ALLOCATION_REQUEST: size = nas_decode_bearer_resource_allocation_request(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_BEARER_RESOURCE_ALLOCATION_REJECT: size = nas_decode_bearer_resource_allocation_reject(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_BEARER_RESOURCE_MODIFICATION_REQUEST: size = nas_decode_bearer_resource_modification_request(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_BEARER_RESOURCE_MODIFICATION_REJECT: size = nas_decode_bearer_resource_modification_reject(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_ESM_INFORMATION_REQUEST: break; case NAS_ESM_INFORMATION_RESPONSE: size = nas_decode_esm_information_response(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; case NAS_ESM_STATUS: size = nas_decode_esm_status(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; break; default: d_error("Unknown message type (0x%x) or not implemented", message->esm.h.message_type); break; } rv = pkbuf_header(pkbuf, decoded); d_assert(rv == CORE_OK, return CORE_ERROR, "pkbuf_header error"); return CORE_OK; } #if 0 /* deprecated */ status_t nas_plain_decode(nas_message_t *message, pkbuf_t *pkbuf) { nas_security_header_t *h = NULL; d_assert(pkbuf, return CORE_ERROR, "Null param"); h = pkbuf->payload; d_assert(h, return CORE_ERROR, "Null param"); if (h->protocol_discriminator == NAS_PROTOCOL_DISCRIMINATOR_EMM) return nas_emm_decode(message, pkbuf); else if (h->protocol_discriminator == NAS_PROTOCOL_DISCRIMINATOR_ESM) return nas_esm_decode(message, pkbuf); d_assert(0, return CORE_ERROR, "Invalid Protocol : %d", h->protocol_discriminator); } #endif nextepc-0.3.10/lib/nas/nas_encoder.c000066400000000000000000004413211333553357400172340ustar00rootroot00000000000000/* * Copyright (c) 2017, NextEPC Group * 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. */ /******************************************************************************* * This file had been created by gtpv2c_tlv.py script v0.1.0 * Please do not modify this file but regenerate it via script. * Created on: 2018-01-23 15:58:42.903985 by acetcom * from 24301-d80.docx ******************************************************************************/ #define TRACE_MODULE _nas_encoder #include "core_debug.h" #include "nas_message.h" c_int32_t nas_encode_attach_request(pkbuf_t *pkbuf, nas_message_t *message) { nas_attach_request_t *attach_request = &message->emm.attach_request; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode ATTACH_REQUEST\n"); size = nas_encode_eps_attach_type(pkbuf, &attach_request->eps_attach_type); d_assert(size >= 0, return -1, "encode failed"); encoded += size; size = nas_encode_eps_mobile_identity(pkbuf, &attach_request->eps_mobile_identity); d_assert(size >= 0, return -1, "encode failed"); encoded += size; size = nas_encode_ue_network_capability(pkbuf, &attach_request->ue_network_capability); d_assert(size >= 0, return -1, "encode failed"); encoded += size; size = nas_encode_esm_message_container(pkbuf, &attach_request->esm_message_container); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (attach_request->presencemask & NAS_ATTACH_REQUEST_OLD_P_TMSI_SIGNATURE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_REQUEST_OLD_P_TMSI_SIGNATURE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_p_tmsi_signature(pkbuf, &attach_request->old_p_tmsi_signature); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_request->presencemask & NAS_ATTACH_REQUEST_ADDITIONAL_GUTI_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_REQUEST_ADDITIONAL_GUTI_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_eps_mobile_identity(pkbuf, &attach_request->additional_guti); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_request->presencemask & NAS_ATTACH_REQUEST_LAST_VISITED_REGISTERED_TAI_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_REQUEST_LAST_VISITED_REGISTERED_TAI_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_tracking_area_identity(pkbuf, &attach_request->last_visited_registered_tai); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_request->presencemask & NAS_ATTACH_REQUEST_DRX_PARAMETER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_REQUEST_DRX_PARAMETER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_drx_parameter(pkbuf, &attach_request->drx_parameter); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_request->presencemask & NAS_ATTACH_REQUEST_MS_NETWORK_CAPABILITY_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_REQUEST_MS_NETWORK_CAPABILITY_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_ms_network_capability(pkbuf, &attach_request->ms_network_capability); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_request->presencemask & NAS_ATTACH_REQUEST_OLD_LOCATION_AREA_IDENTIFICATION_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_REQUEST_OLD_LOCATION_AREA_IDENTIFICATION_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_location_area_identification(pkbuf, &attach_request->old_location_area_identification); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_request->presencemask & NAS_ATTACH_REQUEST_TMSI_STATUS_PRESENT) { attach_request->tmsi_status.type = (NAS_ATTACH_REQUEST_TMSI_STATUS_TYPE >> 4); size = nas_encode_tmsi_status(pkbuf, &attach_request->tmsi_status); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_request->presencemask & NAS_ATTACH_REQUEST_MOBILE_STATION_CLASSMARK_2_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_REQUEST_MOBILE_STATION_CLASSMARK_2_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_mobile_station_classmark_2(pkbuf, &attach_request->mobile_station_classmark_2); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_request->presencemask & NAS_ATTACH_REQUEST_MOBILE_STATION_CLASSMARK_3_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_REQUEST_MOBILE_STATION_CLASSMARK_3_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_mobile_station_classmark_3(pkbuf, &attach_request->mobile_station_classmark_3); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_request->presencemask & NAS_ATTACH_REQUEST_SUPPORTED_CODECS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_REQUEST_SUPPORTED_CODECS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_supported_codec_list(pkbuf, &attach_request->supported_codecs); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_request->presencemask & NAS_ATTACH_REQUEST_ADDITIONAL_UPDATE_TYPE_PRESENT) { attach_request->additional_update_type.type = (NAS_ATTACH_REQUEST_ADDITIONAL_UPDATE_TYPE_TYPE >> 4); size = nas_encode_additional_update_type(pkbuf, &attach_request->additional_update_type); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_request->presencemask & NAS_ATTACH_REQUEST_VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_REQUEST_VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_voice_domain_preference_and_ue_usage_setting(pkbuf, &attach_request->voice_domain_preference_and_ue_usage_setting); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_request->presencemask & NAS_ATTACH_REQUEST_DEVICE_PROPERTIES_PRESENT) { attach_request->device_properties.type = (NAS_ATTACH_REQUEST_DEVICE_PROPERTIES_TYPE >> 4); size = nas_encode_device_properties(pkbuf, &attach_request->device_properties); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_request->presencemask & NAS_ATTACH_REQUEST_OLD_GUTI_TYPE_PRESENT) { attach_request->old_guti_type.type = (NAS_ATTACH_REQUEST_OLD_GUTI_TYPE_TYPE >> 4); size = nas_encode_guti_type(pkbuf, &attach_request->old_guti_type); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_request->presencemask & NAS_ATTACH_REQUEST_MS_NETWORK_FEATURE_SUPPORT_PRESENT) { attach_request->ms_network_feature_support.type = (NAS_ATTACH_REQUEST_MS_NETWORK_FEATURE_SUPPORT_TYPE >> 4); size = nas_encode_ms_network_feature_support(pkbuf, &attach_request->ms_network_feature_support); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_request->presencemask & NAS_ATTACH_REQUEST_TMSI_BASED_NRI_CONTAINER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_REQUEST_TMSI_BASED_NRI_CONTAINER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_network_resource_identifier_container(pkbuf, &attach_request->tmsi_based_nri_container); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_request->presencemask & NAS_ATTACH_REQUEST_T3324_VALUE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_REQUEST_T3324_VALUE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_gprs_timer_2(pkbuf, &attach_request->t3324_value); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_request->presencemask & NAS_ATTACH_REQUEST_T3412_EXTENDED_VALUE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_REQUEST_T3412_EXTENDED_VALUE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_gprs_timer_3(pkbuf, &attach_request->t3412_extended_value); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_request->presencemask & NAS_ATTACH_REQUEST_EXTENDED_DRX_PARAMETERS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_REQUEST_EXTENDED_DRX_PARAMETERS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_drx_parameters(pkbuf, &attach_request->extended_drx_parameters); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_attach_accept(pkbuf_t *pkbuf, nas_message_t *message) { nas_attach_accept_t *attach_accept = &message->emm.attach_accept; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode ATTACH_ACCEPT\n"); size = nas_encode_eps_attach_result(pkbuf, &attach_accept->eps_attach_result); d_assert(size >= 0, return -1, "encode failed"); encoded += size; size = nas_encode_gprs_timer(pkbuf, &attach_accept->t3412_value); d_assert(size >= 0, return -1, "encode failed"); encoded += size; size = nas_encode_tracking_area_identity_list(pkbuf, &attach_accept->tai_list); d_assert(size >= 0, return -1, "encode failed"); encoded += size; size = nas_encode_esm_message_container(pkbuf, &attach_accept->esm_message_container); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (attach_accept->presencemask & NAS_ATTACH_ACCEPT_GUTI_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_ACCEPT_GUTI_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_eps_mobile_identity(pkbuf, &attach_accept->guti); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_accept->presencemask & NAS_ATTACH_ACCEPT_LOCATION_AREA_IDENTIFICATION_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_ACCEPT_LOCATION_AREA_IDENTIFICATION_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_location_area_identification(pkbuf, &attach_accept->location_area_identification); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_accept->presencemask & NAS_ATTACH_ACCEPT_MS_IDENTITY_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_ACCEPT_MS_IDENTITY_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_mobile_identity(pkbuf, &attach_accept->ms_identity); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_accept->presencemask & NAS_ATTACH_ACCEPT_EMM_CAUSE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_ACCEPT_EMM_CAUSE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_emm_cause(pkbuf, &attach_accept->emm_cause); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_accept->presencemask & NAS_ATTACH_ACCEPT_T3402_VALUE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_ACCEPT_T3402_VALUE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_gprs_timer(pkbuf, &attach_accept->t3402_value); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_accept->presencemask & NAS_ATTACH_ACCEPT_T3423_VALUE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_ACCEPT_T3423_VALUE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_gprs_timer(pkbuf, &attach_accept->t3423_value); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_accept->presencemask & NAS_ATTACH_ACCEPT_EQUIVALENT_PLMNS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_ACCEPT_EQUIVALENT_PLMNS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_plmn_list(pkbuf, &attach_accept->equivalent_plmns); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_accept->presencemask & NAS_ATTACH_ACCEPT_EMERGENCY_NUMBER_LIST_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_ACCEPT_EMERGENCY_NUMBER_LIST_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_emergency_number_list(pkbuf, &attach_accept->emergency_number_list); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_accept->presencemask & NAS_ATTACH_ACCEPT_EPS_NETWORK_FEATURE_SUPPORT_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_ACCEPT_EPS_NETWORK_FEATURE_SUPPORT_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_eps_network_feature_support(pkbuf, &attach_accept->eps_network_feature_support); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_accept->presencemask & NAS_ATTACH_ACCEPT_ADDITIONAL_UPDATE_RESULT_PRESENT) { attach_accept->additional_update_result.type = (NAS_ATTACH_ACCEPT_ADDITIONAL_UPDATE_RESULT_TYPE >> 4); size = nas_encode_additional_update_result(pkbuf, &attach_accept->additional_update_result); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_accept->presencemask & NAS_ATTACH_ACCEPT_T3412_EXTENDED_VALUE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_ACCEPT_T3412_EXTENDED_VALUE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_gprs_timer_3(pkbuf, &attach_accept->t3412_extended_value); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_accept->presencemask & NAS_ATTACH_ACCEPT_T3324_VALUE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_ACCEPT_T3324_VALUE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_gprs_timer_2(pkbuf, &attach_accept->t3324_value); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_accept->presencemask & NAS_ATTACH_ACCEPT_EXTENDED_DRX_PARAMETERS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_ACCEPT_EXTENDED_DRX_PARAMETERS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_drx_parameters(pkbuf, &attach_accept->extended_drx_parameters); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_attach_complete(pkbuf_t *pkbuf, nas_message_t *message) { nas_attach_complete_t *attach_complete = &message->emm.attach_complete; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode ATTACH_COMPLETE\n"); size = nas_encode_esm_message_container(pkbuf, &attach_complete->esm_message_container); d_assert(size >= 0, return -1, "encode failed"); encoded += size; return encoded; } c_int32_t nas_encode_attach_reject(pkbuf_t *pkbuf, nas_message_t *message) { nas_attach_reject_t *attach_reject = &message->emm.attach_reject; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode ATTACH_REJECT\n"); size = nas_encode_emm_cause(pkbuf, &attach_reject->emm_cause); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (attach_reject->presencemask & NAS_ATTACH_REJECT_ESM_MESSAGE_CONTAINER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_REJECT_ESM_MESSAGE_CONTAINER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_esm_message_container(pkbuf, &attach_reject->esm_message_container); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_reject->presencemask & NAS_ATTACH_REJECT_T3346_VALUE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_REJECT_T3346_VALUE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_gprs_timer_2(pkbuf, &attach_reject->t3346_value); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_reject->presencemask & NAS_ATTACH_REJECT_T3402_VALUE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ATTACH_REJECT_T3402_VALUE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_gprs_timer_2(pkbuf, &attach_reject->t3402_value); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (attach_reject->presencemask & NAS_ATTACH_REJECT_EXTENDED_EMM_CAUSE_PRESENT) { attach_reject->extended_emm_cause.type = (NAS_ATTACH_REJECT_EXTENDED_EMM_CAUSE_TYPE >> 4); size = nas_encode_extended_emm_cause(pkbuf, &attach_reject->extended_emm_cause); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_detach_request_from_ue(pkbuf_t *pkbuf, nas_message_t *message) { nas_detach_request_from_ue_t *detach_request_from_ue = &message->emm.detach_request_from_ue; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode DETACH_REQUEST\n"); size = nas_encode_detach_type(pkbuf, &detach_request_from_ue->detach_type); d_assert(size >= 0, return -1, "encode failed"); encoded += size; size = nas_encode_eps_mobile_identity(pkbuf, &detach_request_from_ue->eps_mobile_identity); d_assert(size >= 0, return -1, "encode failed"); encoded += size; return encoded; } c_int32_t nas_encode_detach_request_to_ue(pkbuf_t *pkbuf, nas_message_t *message) { nas_detach_request_to_ue_t *detach_request_to_ue = &message->emm.detach_request_to_ue; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode DETACH_REQUEST\n"); size = nas_encode_detach_type(pkbuf, &detach_request_to_ue->detach_type); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (detach_request_to_ue->presencemask & NAS_DETACH_REQUEST_EMM_CAUSE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_DETACH_REQUEST_EMM_CAUSE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_emm_cause(pkbuf, &detach_request_to_ue->emm_cause); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_tracking_area_update_request(pkbuf_t *pkbuf, nas_message_t *message) { nas_tracking_area_update_request_t *tracking_area_update_request = &message->emm.tracking_area_update_request; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode TRACKING_AREA_UPDATE_REQUEST\n"); size = nas_encode_eps_update_type(pkbuf, &tracking_area_update_request->eps_update_type); d_assert(size >= 0, return -1, "encode failed"); encoded += size; size = nas_encode_eps_mobile_identity(pkbuf, &tracking_area_update_request->old_guti); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_NON_CURRENT_NATIVE_NAS_KEY_SET_IDENTIFIER_PRESENT) { tracking_area_update_request->non_current_native_nas_key_set_identifier.type = (NAS_TRACKING_AREA_UPDATE_REQUEST_NON_CURRENT_NATIVE_NAS_KEY_SET_IDENTIFIER_TYPE >> 4); size = nas_encode_key_set_identifier(pkbuf, &tracking_area_update_request->non_current_native_nas_key_set_identifier); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_GPRS_CIPHERING_KEY_SEQUENCE_NUMBER_PRESENT) { tracking_area_update_request->gprs_ciphering_key_sequence_number.type = (NAS_TRACKING_AREA_UPDATE_REQUEST_GPRS_CIPHERING_KEY_SEQUENCE_NUMBER_TYPE >> 4); size = nas_encode_ciphering_key_sequence_number(pkbuf, &tracking_area_update_request->gprs_ciphering_key_sequence_number); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_OLD_P_TMSI_SIGNATURE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_REQUEST_OLD_P_TMSI_SIGNATURE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_p_tmsi_signature(pkbuf, &tracking_area_update_request->old_p_tmsi_signature); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_ADDITIONAL_GUTI_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_REQUEST_ADDITIONAL_GUTI_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_eps_mobile_identity(pkbuf, &tracking_area_update_request->additional_guti); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_NONCEUE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_REQUEST_NONCEUE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_nonce(pkbuf, &tracking_area_update_request->nonceue); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_UE_NETWORK_CAPABILITY_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_REQUEST_UE_NETWORK_CAPABILITY_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_ue_network_capability(pkbuf, &tracking_area_update_request->ue_network_capability); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_LAST_VISITED_REGISTERED_TAI_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_REQUEST_LAST_VISITED_REGISTERED_TAI_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_tracking_area_identity(pkbuf, &tracking_area_update_request->last_visited_registered_tai); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_DRX_PARAMETER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_REQUEST_DRX_PARAMETER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_drx_parameter(pkbuf, &tracking_area_update_request->drx_parameter); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_UE_RADIO_CAPABILITY_INFORMATION_UPDATE_NEEDED_PRESENT) { tracking_area_update_request->ue_radio_capability_information_update_needed.type = (NAS_TRACKING_AREA_UPDATE_REQUEST_UE_RADIO_CAPABILITY_INFORMATION_UPDATE_NEEDED_TYPE >> 4); size = nas_encode_ue_radio_capability_information_update_needed(pkbuf, &tracking_area_update_request->ue_radio_capability_information_update_needed); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_EPS_BEARER_CONTEXT_STATUS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_REQUEST_EPS_BEARER_CONTEXT_STATUS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_eps_bearer_context_status(pkbuf, &tracking_area_update_request->eps_bearer_context_status); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_MS_NETWORK_CAPABILITY_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_REQUEST_MS_NETWORK_CAPABILITY_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_ms_network_capability(pkbuf, &tracking_area_update_request->ms_network_capability); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_OLD_LOCATION_AREA_IDENTIFICATION_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_REQUEST_OLD_LOCATION_AREA_IDENTIFICATION_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_location_area_identification(pkbuf, &tracking_area_update_request->old_location_area_identification); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_TMSI_STATUS_PRESENT) { tracking_area_update_request->tmsi_status.type = (NAS_TRACKING_AREA_UPDATE_REQUEST_TMSI_STATUS_TYPE >> 4); size = nas_encode_tmsi_status(pkbuf, &tracking_area_update_request->tmsi_status); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_MOBILE_STATION_CLASSMARK_2_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_REQUEST_MOBILE_STATION_CLASSMARK_2_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_mobile_station_classmark_2(pkbuf, &tracking_area_update_request->mobile_station_classmark_2); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_MOBILE_STATION_CLASSMARK_3_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_REQUEST_MOBILE_STATION_CLASSMARK_3_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_mobile_station_classmark_3(pkbuf, &tracking_area_update_request->mobile_station_classmark_3); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_SUPPORTED_CODECS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_REQUEST_SUPPORTED_CODECS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_supported_codec_list(pkbuf, &tracking_area_update_request->supported_codecs); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_ADDITIONAL_UPDATE_TYPE_PRESENT) { tracking_area_update_request->additional_update_type.type = (NAS_TRACKING_AREA_UPDATE_REQUEST_ADDITIONAL_UPDATE_TYPE_TYPE >> 4); size = nas_encode_additional_update_type(pkbuf, &tracking_area_update_request->additional_update_type); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_REQUEST_VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_voice_domain_preference_and_ue_usage_setting(pkbuf, &tracking_area_update_request->voice_domain_preference_and_ue_usage_setting); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_OLD_GUTI_TYPE_PRESENT) { tracking_area_update_request->old_guti_type.type = (NAS_TRACKING_AREA_UPDATE_REQUEST_OLD_GUTI_TYPE_TYPE >> 4); size = nas_encode_guti_type(pkbuf, &tracking_area_update_request->old_guti_type); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_DEVICE_PROPERTIES_PRESENT) { tracking_area_update_request->device_properties.type = (NAS_TRACKING_AREA_UPDATE_REQUEST_DEVICE_PROPERTIES_TYPE >> 4); size = nas_encode_device_properties(pkbuf, &tracking_area_update_request->device_properties); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_MS_NETWORK_FEATURE_SUPPORT_PRESENT) { tracking_area_update_request->ms_network_feature_support.type = (NAS_TRACKING_AREA_UPDATE_REQUEST_MS_NETWORK_FEATURE_SUPPORT_TYPE >> 4); size = nas_encode_ms_network_feature_support(pkbuf, &tracking_area_update_request->ms_network_feature_support); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_TMSI_BASED_NRI_CONTAINER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_REQUEST_TMSI_BASED_NRI_CONTAINER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_network_resource_identifier_container(pkbuf, &tracking_area_update_request->tmsi_based_nri_container); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_T3324_VALUE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_REQUEST_T3324_VALUE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_gprs_timer_2(pkbuf, &tracking_area_update_request->t3324_value); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_T3412_EXTENDED_VALUE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_REQUEST_T3412_EXTENDED_VALUE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_gprs_timer_3(pkbuf, &tracking_area_update_request->t3412_extended_value); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_EXTENDED_DRX_PARAMETERS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_REQUEST_EXTENDED_DRX_PARAMETERS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_drx_parameters(pkbuf, &tracking_area_update_request->extended_drx_parameters); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_tracking_area_update_accept(pkbuf_t *pkbuf, nas_message_t *message) { nas_tracking_area_update_accept_t *tracking_area_update_accept = &message->emm.tracking_area_update_accept; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode TRACKING_AREA_UPDATE_ACCEPT\n"); size = nas_encode_eps_update_result(pkbuf, &tracking_area_update_accept->eps_update_result); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (tracking_area_update_accept->presencemask & NAS_TRACKING_AREA_UPDATE_ACCEPT_T3412_VALUE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_ACCEPT_T3412_VALUE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_gprs_timer(pkbuf, &tracking_area_update_accept->t3412_value); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_accept->presencemask & NAS_TRACKING_AREA_UPDATE_ACCEPT_GUTI_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_ACCEPT_GUTI_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_eps_mobile_identity(pkbuf, &tracking_area_update_accept->guti); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_accept->presencemask & NAS_TRACKING_AREA_UPDATE_ACCEPT_TAI_LIST_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_ACCEPT_TAI_LIST_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_tracking_area_identity_list(pkbuf, &tracking_area_update_accept->tai_list); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_accept->presencemask & NAS_TRACKING_AREA_UPDATE_ACCEPT_EPS_BEARER_CONTEXT_STATUS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_ACCEPT_EPS_BEARER_CONTEXT_STATUS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_eps_bearer_context_status(pkbuf, &tracking_area_update_accept->eps_bearer_context_status); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_accept->presencemask & NAS_TRACKING_AREA_UPDATE_ACCEPT_LOCATION_AREA_IDENTIFICATION_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_ACCEPT_LOCATION_AREA_IDENTIFICATION_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_location_area_identification(pkbuf, &tracking_area_update_accept->location_area_identification); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_accept->presencemask & NAS_TRACKING_AREA_UPDATE_ACCEPT_MS_IDENTITY_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_ACCEPT_MS_IDENTITY_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_mobile_identity(pkbuf, &tracking_area_update_accept->ms_identity); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_accept->presencemask & NAS_TRACKING_AREA_UPDATE_ACCEPT_EMM_CAUSE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_ACCEPT_EMM_CAUSE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_emm_cause(pkbuf, &tracking_area_update_accept->emm_cause); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_accept->presencemask & NAS_TRACKING_AREA_UPDATE_ACCEPT_T3402_VALUE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_ACCEPT_T3402_VALUE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_gprs_timer(pkbuf, &tracking_area_update_accept->t3402_value); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_accept->presencemask & NAS_TRACKING_AREA_UPDATE_ACCEPT_T3423_VALUE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_ACCEPT_T3423_VALUE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_gprs_timer(pkbuf, &tracking_area_update_accept->t3423_value); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_accept->presencemask & NAS_TRACKING_AREA_UPDATE_ACCEPT_EQUIVALENT_PLMNS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_ACCEPT_EQUIVALENT_PLMNS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_plmn_list(pkbuf, &tracking_area_update_accept->equivalent_plmns); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_accept->presencemask & NAS_TRACKING_AREA_UPDATE_ACCEPT_EMERGENCY_NUMBER_LIST_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_ACCEPT_EMERGENCY_NUMBER_LIST_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_emergency_number_list(pkbuf, &tracking_area_update_accept->emergency_number_list); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_accept->presencemask & NAS_TRACKING_AREA_UPDATE_ACCEPT_EPS_NETWORK_FEATURE_SUPPORT_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_ACCEPT_EPS_NETWORK_FEATURE_SUPPORT_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_eps_network_feature_support(pkbuf, &tracking_area_update_accept->eps_network_feature_support); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_accept->presencemask & NAS_TRACKING_AREA_UPDATE_ACCEPT_ADDITIONAL_UPDATE_RESULT_PRESENT) { tracking_area_update_accept->additional_update_result.type = (NAS_TRACKING_AREA_UPDATE_ACCEPT_ADDITIONAL_UPDATE_RESULT_TYPE >> 4); size = nas_encode_additional_update_result(pkbuf, &tracking_area_update_accept->additional_update_result); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_accept->presencemask & NAS_TRACKING_AREA_UPDATE_ACCEPT_T3412_EXTENDED_VALUE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_ACCEPT_T3412_EXTENDED_VALUE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_gprs_timer_3(pkbuf, &tracking_area_update_accept->t3412_extended_value); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_accept->presencemask & NAS_TRACKING_AREA_UPDATE_ACCEPT_T3324_VALUE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_ACCEPT_T3324_VALUE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_gprs_timer_2(pkbuf, &tracking_area_update_accept->t3324_value); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_accept->presencemask & NAS_TRACKING_AREA_UPDATE_ACCEPT_EXTENDED_DRX_PARAMETERS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_ACCEPT_EXTENDED_DRX_PARAMETERS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_drx_parameters(pkbuf, &tracking_area_update_accept->extended_drx_parameters); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_accept->presencemask & NAS_TRACKING_AREA_UPDATE_ACCEPT_HEADER_COMPRESSION_CONFIGURATION_STATUS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_ACCEPT_HEADER_COMPRESSION_CONFIGURATION_STATUS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_header_compression_configuration_status(pkbuf, &tracking_area_update_accept->header_compression_configuration_status); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_tracking_area_update_reject(pkbuf_t *pkbuf, nas_message_t *message) { nas_tracking_area_update_reject_t *tracking_area_update_reject = &message->emm.tracking_area_update_reject; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode TRACKING_AREA_UPDATE_REJECT\n"); size = nas_encode_emm_cause(pkbuf, &tracking_area_update_reject->emm_cause); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (tracking_area_update_reject->presencemask & NAS_TRACKING_AREA_UPDATE_REJECT_T3346_VALUE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_TRACKING_AREA_UPDATE_REJECT_T3346_VALUE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_gprs_timer_2(pkbuf, &tracking_area_update_reject->t3346_value); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (tracking_area_update_reject->presencemask & NAS_TRACKING_AREA_UPDATE_REJECT_EXTENDED_EMM_CAUSE_PRESENT) { tracking_area_update_reject->extended_emm_cause.type = (NAS_TRACKING_AREA_UPDATE_REJECT_EXTENDED_EMM_CAUSE_TYPE >> 4); size = nas_encode_extended_emm_cause(pkbuf, &tracking_area_update_reject->extended_emm_cause); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_extended_service_request(pkbuf_t *pkbuf, nas_message_t *message) { nas_extended_service_request_t *extended_service_request = &message->emm.extended_service_request; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode EXTENDED_SERVICE_REQUEST\n"); size = nas_encode_service_type(pkbuf, &extended_service_request->service_type); d_assert(size >= 0, return -1, "encode failed"); encoded += size; size = nas_encode_mobile_identity(pkbuf, &extended_service_request->m_tmsi); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (extended_service_request->presencemask & NAS_EXTENDED_SERVICE_REQUEST_CSFB_RESPONSE_PRESENT) { extended_service_request->csfb_response.type = (NAS_EXTENDED_SERVICE_REQUEST_CSFB_RESPONSE_TYPE >> 4); size = nas_encode_csfb_response(pkbuf, &extended_service_request->csfb_response); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (extended_service_request->presencemask & NAS_EXTENDED_SERVICE_REQUEST_EPS_BEARER_CONTEXT_STATUS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_EXTENDED_SERVICE_REQUEST_EPS_BEARER_CONTEXT_STATUS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_eps_bearer_context_status(pkbuf, &extended_service_request->eps_bearer_context_status); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (extended_service_request->presencemask & NAS_EXTENDED_SERVICE_REQUEST_DEVICE_PROPERTIES_PRESENT) { extended_service_request->device_properties.type = (NAS_EXTENDED_SERVICE_REQUEST_DEVICE_PROPERTIES_TYPE >> 4); size = nas_encode_device_properties(pkbuf, &extended_service_request->device_properties); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_service_request(pkbuf_t *pkbuf, nas_message_t *message) { nas_service_request_t *service_request = &message->emm.service_request; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode SERVICE_REQUEST\n"); size = nas_encode_ksi_and_sequence_number(pkbuf, &service_request->ksi_and_sequence_number); d_assert(size >= 0, return -1, "encode failed"); encoded += size; size = nas_encode_short_mac(pkbuf, &service_request->message_authentication_code); d_assert(size >= 0, return -1, "encode failed"); encoded += size; return encoded; } c_int32_t nas_encode_service_reject(pkbuf_t *pkbuf, nas_message_t *message) { nas_service_reject_t *service_reject = &message->emm.service_reject; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode SERVICE_REJECT\n"); size = nas_encode_emm_cause(pkbuf, &service_reject->emm_cause); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (service_reject->presencemask & NAS_SERVICE_REJECT_T3346_VALUE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_SERVICE_REJECT_T3346_VALUE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_gprs_timer_2(pkbuf, &service_reject->t3346_value); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_guti_reallocation_command(pkbuf_t *pkbuf, nas_message_t *message) { nas_guti_reallocation_command_t *guti_reallocation_command = &message->emm.guti_reallocation_command; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode GUTI_REALLOCATION_COMMAND\n"); size = nas_encode_eps_mobile_identity(pkbuf, &guti_reallocation_command->guti); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (guti_reallocation_command->presencemask & NAS_GUTI_REALLOCATION_COMMAND_TAI_LIST_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_GUTI_REALLOCATION_COMMAND_TAI_LIST_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_tracking_area_identity_list(pkbuf, &guti_reallocation_command->tai_list); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_authentication_request(pkbuf_t *pkbuf, nas_message_t *message) { nas_authentication_request_t *authentication_request = &message->emm.authentication_request; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode AUTHENTICATION_REQUEST\n"); size = nas_encode_key_set_identifier(pkbuf, &authentication_request->nas_key_set_identifierasme); d_assert(size >= 0, return -1, "encode failed"); encoded += size; size = nas_encode_authentication_parameter_rand(pkbuf, &authentication_request->authentication_parameter_rand); d_assert(size >= 0, return -1, "encode failed"); encoded += size; size = nas_encode_authentication_parameter_autn(pkbuf, &authentication_request->authentication_parameter_autn); d_assert(size >= 0, return -1, "encode failed"); encoded += size; return encoded; } c_int32_t nas_encode_authentication_response(pkbuf_t *pkbuf, nas_message_t *message) { nas_authentication_response_t *authentication_response = &message->emm.authentication_response; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode AUTHENTICATION_RESPONSE\n"); size = nas_encode_authentication_response_parameter(pkbuf, &authentication_response->authentication_response_parameter); d_assert(size >= 0, return -1, "encode failed"); encoded += size; return encoded; } c_int32_t nas_encode_identity_request(pkbuf_t *pkbuf, nas_message_t *message) { nas_identity_request_t *identity_request = &message->emm.identity_request; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode IDENTITY_REQUEST\n"); size = nas_encode_identity_type_2(pkbuf, &identity_request->identity_type); d_assert(size >= 0, return -1, "encode failed"); encoded += size; return encoded; } c_int32_t nas_encode_identity_response(pkbuf_t *pkbuf, nas_message_t *message) { nas_identity_response_t *identity_response = &message->emm.identity_response; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode IDENTITY_RESPONSE\n"); size = nas_encode_mobile_identity(pkbuf, &identity_response->mobile_identity); d_assert(size >= 0, return -1, "encode failed"); encoded += size; return encoded; } c_int32_t nas_encode_authentication_failure(pkbuf_t *pkbuf, nas_message_t *message) { nas_authentication_failure_t *authentication_failure = &message->emm.authentication_failure; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode AUTHENTICATION_FAILURE\n"); size = nas_encode_emm_cause(pkbuf, &authentication_failure->emm_cause); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (authentication_failure->presencemask & NAS_AUTHENTICATION_FAILURE_AUTHENTICATION_FAILURE_PARAMETER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_AUTHENTICATION_FAILURE_AUTHENTICATION_FAILURE_PARAMETER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_authentication_failure_parameter(pkbuf, &authentication_failure->authentication_failure_parameter); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_security_mode_command(pkbuf_t *pkbuf, nas_message_t *message) { nas_security_mode_command_t *security_mode_command = &message->emm.security_mode_command; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode SECURITY_MODE_COMMAND\n"); size = nas_encode_security_algorithms(pkbuf, &security_mode_command->selected_nas_security_algorithms); d_assert(size >= 0, return -1, "encode failed"); encoded += size; size = nas_encode_key_set_identifier(pkbuf, &security_mode_command->nas_key_set_identifier); d_assert(size >= 0, return -1, "encode failed"); encoded += size; size = nas_encode_ue_security_capability(pkbuf, &security_mode_command->replayed_ue_security_capabilities); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (security_mode_command->presencemask & NAS_SECURITY_MODE_COMMAND_IMEISV_REQUEST_PRESENT) { security_mode_command->imeisv_request.type = (NAS_SECURITY_MODE_COMMAND_IMEISV_REQUEST_TYPE >> 4); size = nas_encode_imeisv_request(pkbuf, &security_mode_command->imeisv_request); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (security_mode_command->presencemask & NAS_SECURITY_MODE_COMMAND_REPLAYED_NONCEUE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_SECURITY_MODE_COMMAND_REPLAYED_NONCEUE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_nonce(pkbuf, &security_mode_command->replayed_nonceue); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (security_mode_command->presencemask & NAS_SECURITY_MODE_COMMAND_NONCEMME_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_SECURITY_MODE_COMMAND_NONCEMME_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_nonce(pkbuf, &security_mode_command->noncemme); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_security_mode_complete(pkbuf_t *pkbuf, nas_message_t *message) { nas_security_mode_complete_t *security_mode_complete = &message->emm.security_mode_complete; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode SECURITY_MODE_COMPLETE\n"); if (security_mode_complete->presencemask & NAS_SECURITY_MODE_COMPLETE_IMEISV_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_SECURITY_MODE_COMPLETE_IMEISV_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_mobile_identity(pkbuf, &security_mode_complete->imeisv); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_security_mode_reject(pkbuf_t *pkbuf, nas_message_t *message) { nas_security_mode_reject_t *security_mode_reject = &message->emm.security_mode_reject; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode SECURITY_MODE_REJECT\n"); size = nas_encode_emm_cause(pkbuf, &security_mode_reject->emm_cause); d_assert(size >= 0, return -1, "encode failed"); encoded += size; return encoded; } c_int32_t nas_encode_emm_status(pkbuf_t *pkbuf, nas_message_t *message) { nas_emm_status_t *emm_status = &message->emm.emm_status; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode EMM_STATUS\n"); size = nas_encode_emm_cause(pkbuf, &emm_status->emm_cause); d_assert(size >= 0, return -1, "encode failed"); encoded += size; return encoded; } c_int32_t nas_encode_emm_information(pkbuf_t *pkbuf, nas_message_t *message) { nas_emm_information_t *emm_information = &message->emm.emm_information; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode EMM_INFORMATION\n"); if (emm_information->presencemask & NAS_EMM_INFORMATION_FULL_NAME_FOR_NETWORK_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_EMM_INFORMATION_FULL_NAME_FOR_NETWORK_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_network_name(pkbuf, &emm_information->full_name_for_network); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (emm_information->presencemask & NAS_EMM_INFORMATION_SHORT_NAME_FOR_NETWORK_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_EMM_INFORMATION_SHORT_NAME_FOR_NETWORK_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_network_name(pkbuf, &emm_information->short_name_for_network); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (emm_information->presencemask & NAS_EMM_INFORMATION_LOCAL_TIME_ZONE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_EMM_INFORMATION_LOCAL_TIME_ZONE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_time_zone(pkbuf, &emm_information->local_time_zone); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (emm_information->presencemask & NAS_EMM_INFORMATION_UNIVERSAL_TIME_AND_LOCAL_TIME_ZONE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_EMM_INFORMATION_UNIVERSAL_TIME_AND_LOCAL_TIME_ZONE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_time_zone_and_time(pkbuf, &emm_information->universal_time_and_local_time_zone); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (emm_information->presencemask & NAS_EMM_INFORMATION_NETWORK_DAYLIGHT_SAVING_TIME_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_EMM_INFORMATION_NETWORK_DAYLIGHT_SAVING_TIME_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_daylight_saving_time(pkbuf, &emm_information->network_daylight_saving_time); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_downlink_nas_transport(pkbuf_t *pkbuf, nas_message_t *message) { nas_downlink_nas_transport_t *downlink_nas_transport = &message->emm.downlink_nas_transport; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode DOWNLINK_NAS_TRANSPORT\n"); size = nas_encode_message_container(pkbuf, &downlink_nas_transport->nas_message_container); d_assert(size >= 0, return -1, "encode failed"); encoded += size; return encoded; } c_int32_t nas_encode_uplink_nas_transport(pkbuf_t *pkbuf, nas_message_t *message) { nas_uplink_nas_transport_t *uplink_nas_transport = &message->emm.uplink_nas_transport; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode UPLINK_NAS_TRANSPORT\n"); size = nas_encode_message_container(pkbuf, &uplink_nas_transport->nas_message_container); d_assert(size >= 0, return -1, "encode failed"); encoded += size; return encoded; } c_int32_t nas_encode_cs_service_notification(pkbuf_t *pkbuf, nas_message_t *message) { nas_cs_service_notification_t *cs_service_notification = &message->emm.cs_service_notification; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode CS_SERVICE_NOTIFICATION\n"); size = nas_encode_paging_identity(pkbuf, &cs_service_notification->paging_identity); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (cs_service_notification->presencemask & NAS_CS_SERVICE_NOTIFICATION_CLI_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_CS_SERVICE_NOTIFICATION_CLI_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_cli(pkbuf, &cs_service_notification->cli); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (cs_service_notification->presencemask & NAS_CS_SERVICE_NOTIFICATION_SS_CODE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_CS_SERVICE_NOTIFICATION_SS_CODE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_ss_code(pkbuf, &cs_service_notification->ss_code); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (cs_service_notification->presencemask & NAS_CS_SERVICE_NOTIFICATION_LCS_INDICATOR_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_CS_SERVICE_NOTIFICATION_LCS_INDICATOR_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_lcs_indicator(pkbuf, &cs_service_notification->lcs_indicator); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (cs_service_notification->presencemask & NAS_CS_SERVICE_NOTIFICATION_LCS_CLIENT_IDENTITY_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_CS_SERVICE_NOTIFICATION_LCS_CLIENT_IDENTITY_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_lcs_client_identity(pkbuf, &cs_service_notification->lcs_client_identity); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_uplink_generic_nas_transport(pkbuf_t *pkbuf, nas_message_t *message) { nas_uplink_generic_nas_transport_t *uplink_generic_nas_transport = &message->emm.uplink_generic_nas_transport; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode UPLINK_GENERIC_NAS_TRANSPORT\n"); size = nas_encode_generic_message_container_type(pkbuf, &uplink_generic_nas_transport->generic_message_container_type); d_assert(size >= 0, return -1, "encode failed"); encoded += size; size = nas_encode_generic_message_container(pkbuf, &uplink_generic_nas_transport->generic_message_container); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (uplink_generic_nas_transport->presencemask & NAS_UPLINK_GENERIC_NAS_TRANSPORT_ADDITIONAL_INFORMATION_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_UPLINK_GENERIC_NAS_TRANSPORT_ADDITIONAL_INFORMATION_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_additional_information(pkbuf, &uplink_generic_nas_transport->additional_information); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_downlink_generic_nas_transport(pkbuf_t *pkbuf, nas_message_t *message) { nas_downlink_generic_nas_transport_t *downlink_generic_nas_transport = &message->emm.downlink_generic_nas_transport; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode DOWNLINK_GENERIC_NAS_TRANSPORT\n"); size = nas_encode_generic_message_container_type(pkbuf, &downlink_generic_nas_transport->generic_message_container_type); d_assert(size >= 0, return -1, "encode failed"); encoded += size; size = nas_encode_generic_message_container(pkbuf, &downlink_generic_nas_transport->generic_message_container); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (downlink_generic_nas_transport->presencemask & NAS_DOWNLINK_GENERIC_NAS_TRANSPORT_ADDITIONAL_INFORMATION_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_DOWNLINK_GENERIC_NAS_TRANSPORT_ADDITIONAL_INFORMATION_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_additional_information(pkbuf, &downlink_generic_nas_transport->additional_information); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_activate_default_eps_bearer_context_request(pkbuf_t *pkbuf, nas_message_t *message) { nas_activate_default_eps_bearer_context_request_t *activate_default_eps_bearer_context_request = &message->esm.activate_default_eps_bearer_context_request; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST\n"); size = nas_encode_eps_quality_of_service(pkbuf, &activate_default_eps_bearer_context_request->eps_qos); d_assert(size >= 0, return -1, "encode failed"); encoded += size; size = nas_encode_access_point_name(pkbuf, &activate_default_eps_bearer_context_request->access_point_name); d_assert(size >= 0, return -1, "encode failed"); encoded += size; size = nas_encode_pdn_address(pkbuf, &activate_default_eps_bearer_context_request->pdn_address); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (activate_default_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_TRANSACTION_IDENTIFIER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_TRANSACTION_IDENTIFIER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_transaction_identifier(pkbuf, &activate_default_eps_bearer_context_request->transaction_identifier); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_default_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_QOS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_QOS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_quality_of_service(pkbuf, &activate_default_eps_bearer_context_request->negotiated_qos); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_default_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_llc_service_access_point_identifier(pkbuf, &activate_default_eps_bearer_context_request->negotiated_llc_sapi); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_default_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_RADIO_PRIORITY_PRESENT) { activate_default_eps_bearer_context_request->radio_priority.type = (NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_RADIO_PRIORITY_TYPE >> 4); size = nas_encode_radio_priority(pkbuf, &activate_default_eps_bearer_context_request->radio_priority); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_default_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_packet_flow_identifier(pkbuf, &activate_default_eps_bearer_context_request->packet_flow_identifier); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_default_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_APN_AMBR_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_APN_AMBR_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_apn_aggregate_maximum_bit_rate(pkbuf, &activate_default_eps_bearer_context_request->apn_ambr); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_default_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_ESM_CAUSE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_ESM_CAUSE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_esm_cause(pkbuf, &activate_default_eps_bearer_context_request->esm_cause); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_default_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_protocol_configuration_options(pkbuf, &activate_default_eps_bearer_context_request->protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_default_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_CONNECTIVITY_TYPE_PRESENT) { activate_default_eps_bearer_context_request->connectivity_type.type = (NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_CONNECTIVITY_TYPE_TYPE >> 4); size = nas_encode_connectivity_type(pkbuf, &activate_default_eps_bearer_context_request->connectivity_type); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_default_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_PRESENT) { activate_default_eps_bearer_context_request->wlan_offload_indication.type = (NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_TYPE >> 4); size = nas_encode_wlan_offload_acceptability(pkbuf, &activate_default_eps_bearer_context_request->wlan_offload_indication); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_default_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_nbifom_container(pkbuf, &activate_default_eps_bearer_context_request->nbifom_container); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_default_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_HEADER_COMPRESSION_CONFIGURATION_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_HEADER_COMPRESSION_CONFIGURATION_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_header_compression_configuration(pkbuf, &activate_default_eps_bearer_context_request->header_compression_configuration); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_default_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_CONTROL_PLANE_ONLY_INDICATION_PRESENT) { activate_default_eps_bearer_context_request->control_plane_only_indication.type = (NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_CONTROL_PLANE_ONLY_INDICATION_TYPE >> 4); size = nas_encode_control_plane_only_indication(pkbuf, &activate_default_eps_bearer_context_request->control_plane_only_indication); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_default_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_protocol_configuration_options(pkbuf, &activate_default_eps_bearer_context_request->extended_protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_default_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_SERVING_PLMN_RATE_CONTROL_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_SERVING_PLMN_RATE_CONTROL_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_serving_plmn_rate_control(pkbuf, &activate_default_eps_bearer_context_request->serving_plmn_rate_control); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_activate_default_eps_bearer_context_accept(pkbuf_t *pkbuf, nas_message_t *message) { nas_activate_default_eps_bearer_context_accept_t *activate_default_eps_bearer_context_accept = &message->esm.activate_default_eps_bearer_context_accept; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT\n"); if (activate_default_eps_bearer_context_accept->presencemask & NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_protocol_configuration_options(pkbuf, &activate_default_eps_bearer_context_accept->protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_default_eps_bearer_context_accept->presencemask & NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_protocol_configuration_options(pkbuf, &activate_default_eps_bearer_context_accept->extended_protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_activate_default_eps_bearer_context_reject(pkbuf_t *pkbuf, nas_message_t *message) { nas_activate_default_eps_bearer_context_reject_t *activate_default_eps_bearer_context_reject = &message->esm.activate_default_eps_bearer_context_reject; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT\n"); size = nas_encode_esm_cause(pkbuf, &activate_default_eps_bearer_context_reject->esm_cause); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (activate_default_eps_bearer_context_reject->presencemask & NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_protocol_configuration_options(pkbuf, &activate_default_eps_bearer_context_reject->protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_default_eps_bearer_context_reject->presencemask & NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_protocol_configuration_options(pkbuf, &activate_default_eps_bearer_context_reject->extended_protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_activate_dedicated_eps_bearer_context_request(pkbuf_t *pkbuf, nas_message_t *message) { nas_activate_dedicated_eps_bearer_context_request_t *activate_dedicated_eps_bearer_context_request = &message->esm.activate_dedicated_eps_bearer_context_request; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST\n"); size = nas_encode_linked_eps_bearer_identity(pkbuf, &activate_dedicated_eps_bearer_context_request->linked_eps_bearer_identity); d_assert(size >= 0, return -1, "encode failed"); encoded += size; size = nas_encode_eps_quality_of_service(pkbuf, &activate_dedicated_eps_bearer_context_request->eps_qos); d_assert(size >= 0, return -1, "encode failed"); encoded += size; size = nas_encode_traffic_flow_template(pkbuf, &activate_dedicated_eps_bearer_context_request->tft); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (activate_dedicated_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_TRANSACTION_IDENTIFIER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_TRANSACTION_IDENTIFIER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_transaction_identifier(pkbuf, &activate_dedicated_eps_bearer_context_request->transaction_identifier); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_dedicated_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_QOS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_QOS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_quality_of_service(pkbuf, &activate_dedicated_eps_bearer_context_request->negotiated_qos); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_dedicated_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_llc_service_access_point_identifier(pkbuf, &activate_dedicated_eps_bearer_context_request->negotiated_llc_sapi); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_dedicated_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_RADIO_PRIORITY_PRESENT) { activate_dedicated_eps_bearer_context_request->radio_priority.type = (NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_RADIO_PRIORITY_TYPE >> 4); size = nas_encode_radio_priority(pkbuf, &activate_dedicated_eps_bearer_context_request->radio_priority); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_dedicated_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_packet_flow_identifier(pkbuf, &activate_dedicated_eps_bearer_context_request->packet_flow_identifier); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_dedicated_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_protocol_configuration_options(pkbuf, &activate_dedicated_eps_bearer_context_request->protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_dedicated_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_PRESENT) { activate_dedicated_eps_bearer_context_request->wlan_offload_indication.type = (NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_TYPE >> 4); size = nas_encode_wlan_offload_acceptability(pkbuf, &activate_dedicated_eps_bearer_context_request->wlan_offload_indication); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_dedicated_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_nbifom_container(pkbuf, &activate_dedicated_eps_bearer_context_request->nbifom_container); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_dedicated_eps_bearer_context_request->presencemask & NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_protocol_configuration_options(pkbuf, &activate_dedicated_eps_bearer_context_request->extended_protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_activate_dedicated_eps_bearer_context_accept(pkbuf_t *pkbuf, nas_message_t *message) { nas_activate_dedicated_eps_bearer_context_accept_t *activate_dedicated_eps_bearer_context_accept = &message->esm.activate_dedicated_eps_bearer_context_accept; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT\n"); if (activate_dedicated_eps_bearer_context_accept->presencemask & NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_protocol_configuration_options(pkbuf, &activate_dedicated_eps_bearer_context_accept->protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_dedicated_eps_bearer_context_accept->presencemask & NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_NBIFOM_CONTAINER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_NBIFOM_CONTAINER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_nbifom_container(pkbuf, &activate_dedicated_eps_bearer_context_accept->nbifom_container); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_dedicated_eps_bearer_context_accept->presencemask & NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_protocol_configuration_options(pkbuf, &activate_dedicated_eps_bearer_context_accept->extended_protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_activate_dedicated_eps_bearer_context_reject(pkbuf_t *pkbuf, nas_message_t *message) { nas_activate_dedicated_eps_bearer_context_reject_t *activate_dedicated_eps_bearer_context_reject = &message->esm.activate_dedicated_eps_bearer_context_reject; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT\n"); size = nas_encode_esm_cause(pkbuf, &activate_dedicated_eps_bearer_context_reject->esm_cause); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (activate_dedicated_eps_bearer_context_reject->presencemask & NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_protocol_configuration_options(pkbuf, &activate_dedicated_eps_bearer_context_reject->protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_dedicated_eps_bearer_context_reject->presencemask & NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_NBIFOM_CONTAINER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_NBIFOM_CONTAINER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_nbifom_container(pkbuf, &activate_dedicated_eps_bearer_context_reject->nbifom_container); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (activate_dedicated_eps_bearer_context_reject->presencemask & NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_protocol_configuration_options(pkbuf, &activate_dedicated_eps_bearer_context_reject->extended_protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_modify_eps_bearer_context_request(pkbuf_t *pkbuf, nas_message_t *message) { nas_modify_eps_bearer_context_request_t *modify_eps_bearer_context_request = &message->esm.modify_eps_bearer_context_request; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode MODIFY_EPS_BEARER_CONTEXT_REQUEST\n"); if (modify_eps_bearer_context_request->presencemask & NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEW_EPS_QOS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEW_EPS_QOS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_eps_quality_of_service(pkbuf, &modify_eps_bearer_context_request->new_eps_qos); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (modify_eps_bearer_context_request->presencemask & NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_TFT_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_TFT_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_traffic_flow_template(pkbuf, &modify_eps_bearer_context_request->tft); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (modify_eps_bearer_context_request->presencemask & NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEW_QOS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEW_QOS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_quality_of_service(pkbuf, &modify_eps_bearer_context_request->new_qos); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (modify_eps_bearer_context_request->presencemask & NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_llc_service_access_point_identifier(pkbuf, &modify_eps_bearer_context_request->negotiated_llc_sapi); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (modify_eps_bearer_context_request->presencemask & NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_RADIO_PRIORITY_PRESENT) { modify_eps_bearer_context_request->radio_priority.type = (NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_RADIO_PRIORITY_TYPE >> 4); size = nas_encode_radio_priority(pkbuf, &modify_eps_bearer_context_request->radio_priority); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (modify_eps_bearer_context_request->presencemask & NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_packet_flow_identifier(pkbuf, &modify_eps_bearer_context_request->packet_flow_identifier); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (modify_eps_bearer_context_request->presencemask & NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_APN_AMBR_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_APN_AMBR_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_apn_aggregate_maximum_bit_rate(pkbuf, &modify_eps_bearer_context_request->apn_ambr); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (modify_eps_bearer_context_request->presencemask & NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_protocol_configuration_options(pkbuf, &modify_eps_bearer_context_request->protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (modify_eps_bearer_context_request->presencemask & NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_PRESENT) { modify_eps_bearer_context_request->wlan_offload_indication.type = (NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_TYPE >> 4); size = nas_encode_wlan_offload_acceptability(pkbuf, &modify_eps_bearer_context_request->wlan_offload_indication); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (modify_eps_bearer_context_request->presencemask & NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_nbifom_container(pkbuf, &modify_eps_bearer_context_request->nbifom_container); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (modify_eps_bearer_context_request->presencemask & NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_HEADER_COMPRESSION_CONFIGURATION_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_HEADER_COMPRESSION_CONFIGURATION_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_header_compression_configuration(pkbuf, &modify_eps_bearer_context_request->header_compression_configuration); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (modify_eps_bearer_context_request->presencemask & NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_protocol_configuration_options(pkbuf, &modify_eps_bearer_context_request->extended_protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_modify_eps_bearer_context_accept(pkbuf_t *pkbuf, nas_message_t *message) { nas_modify_eps_bearer_context_accept_t *modify_eps_bearer_context_accept = &message->esm.modify_eps_bearer_context_accept; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode MODIFY_EPS_BEARER_CONTEXT_ACCEPT\n"); if (modify_eps_bearer_context_accept->presencemask & NAS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_protocol_configuration_options(pkbuf, &modify_eps_bearer_context_accept->protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (modify_eps_bearer_context_accept->presencemask & NAS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_NBIFOM_CONTAINER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_NBIFOM_CONTAINER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_nbifom_container(pkbuf, &modify_eps_bearer_context_accept->nbifom_container); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (modify_eps_bearer_context_accept->presencemask & NAS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_protocol_configuration_options(pkbuf, &modify_eps_bearer_context_accept->extended_protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_modify_eps_bearer_context_reject(pkbuf_t *pkbuf, nas_message_t *message) { nas_modify_eps_bearer_context_reject_t *modify_eps_bearer_context_reject = &message->esm.modify_eps_bearer_context_reject; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode MODIFY_EPS_BEARER_CONTEXT_REJECT\n"); size = nas_encode_esm_cause(pkbuf, &modify_eps_bearer_context_reject->esm_cause); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (modify_eps_bearer_context_reject->presencemask & NAS_MODIFY_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_MODIFY_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_protocol_configuration_options(pkbuf, &modify_eps_bearer_context_reject->protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (modify_eps_bearer_context_reject->presencemask & NAS_MODIFY_EPS_BEARER_CONTEXT_REJECT_NBIFOM_CONTAINER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_MODIFY_EPS_BEARER_CONTEXT_REJECT_NBIFOM_CONTAINER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_nbifom_container(pkbuf, &modify_eps_bearer_context_reject->nbifom_container); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (modify_eps_bearer_context_reject->presencemask & NAS_MODIFY_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_MODIFY_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_protocol_configuration_options(pkbuf, &modify_eps_bearer_context_reject->extended_protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_deactivate_eps_bearer_context_request(pkbuf_t *pkbuf, nas_message_t *message) { nas_deactivate_eps_bearer_context_request_t *deactivate_eps_bearer_context_request = &message->esm.deactivate_eps_bearer_context_request; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST\n"); size = nas_encode_esm_cause(pkbuf, &deactivate_eps_bearer_context_request->esm_cause); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (deactivate_eps_bearer_context_request->presencemask & NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_protocol_configuration_options(pkbuf, &deactivate_eps_bearer_context_request->protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (deactivate_eps_bearer_context_request->presencemask & NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_T3396_VALUE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_T3396_VALUE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_gprs_timer_3(pkbuf, &deactivate_eps_bearer_context_request->t3396_value); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (deactivate_eps_bearer_context_request->presencemask & NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_PRESENT) { deactivate_eps_bearer_context_request->wlan_offload_indication.type = (NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_TYPE >> 4); size = nas_encode_wlan_offload_acceptability(pkbuf, &deactivate_eps_bearer_context_request->wlan_offload_indication); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (deactivate_eps_bearer_context_request->presencemask & NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_nbifom_container(pkbuf, &deactivate_eps_bearer_context_request->nbifom_container); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (deactivate_eps_bearer_context_request->presencemask & NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_protocol_configuration_options(pkbuf, &deactivate_eps_bearer_context_request->extended_protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_deactivate_eps_bearer_context_accept(pkbuf_t *pkbuf, nas_message_t *message) { nas_deactivate_eps_bearer_context_accept_t *deactivate_eps_bearer_context_accept = &message->esm.deactivate_eps_bearer_context_accept; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT\n"); if (deactivate_eps_bearer_context_accept->presencemask & NAS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_protocol_configuration_options(pkbuf, &deactivate_eps_bearer_context_accept->protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (deactivate_eps_bearer_context_accept->presencemask & NAS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_protocol_configuration_options(pkbuf, &deactivate_eps_bearer_context_accept->extended_protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_pdn_connectivity_request(pkbuf_t *pkbuf, nas_message_t *message) { nas_pdn_connectivity_request_t *pdn_connectivity_request = &message->esm.pdn_connectivity_request; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode PDN_CONNECTIVITY_REQUEST\n"); size = nas_encode_request_type(pkbuf, &pdn_connectivity_request->request_type); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (pdn_connectivity_request->presencemask & NAS_PDN_CONNECTIVITY_REQUEST_ESM_INFORMATION_TRANSFER_FLAG_PRESENT) { pdn_connectivity_request->esm_information_transfer_flag.type = (NAS_PDN_CONNECTIVITY_REQUEST_ESM_INFORMATION_TRANSFER_FLAG_TYPE >> 4); size = nas_encode_esm_information_transfer_flag(pkbuf, &pdn_connectivity_request->esm_information_transfer_flag); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (pdn_connectivity_request->presencemask & NAS_PDN_CONNECTIVITY_REQUEST_ACCESS_POINT_NAME_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_PDN_CONNECTIVITY_REQUEST_ACCESS_POINT_NAME_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_access_point_name(pkbuf, &pdn_connectivity_request->access_point_name); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (pdn_connectivity_request->presencemask & NAS_PDN_CONNECTIVITY_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_PDN_CONNECTIVITY_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_protocol_configuration_options(pkbuf, &pdn_connectivity_request->protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (pdn_connectivity_request->presencemask & NAS_PDN_CONNECTIVITY_REQUEST_DEVICE_PROPERTIES_PRESENT) { pdn_connectivity_request->device_properties.type = (NAS_PDN_CONNECTIVITY_REQUEST_DEVICE_PROPERTIES_TYPE >> 4); size = nas_encode_device_properties(pkbuf, &pdn_connectivity_request->device_properties); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (pdn_connectivity_request->presencemask & NAS_PDN_CONNECTIVITY_REQUEST_NBIFOM_CONTAINER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_PDN_CONNECTIVITY_REQUEST_NBIFOM_CONTAINER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_nbifom_container(pkbuf, &pdn_connectivity_request->nbifom_container); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (pdn_connectivity_request->presencemask & NAS_PDN_CONNECTIVITY_REQUEST_HEADER_COMPRESSION_CONFIGURATION_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_PDN_CONNECTIVITY_REQUEST_HEADER_COMPRESSION_CONFIGURATION_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_header_compression_configuration(pkbuf, &pdn_connectivity_request->header_compression_configuration); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (pdn_connectivity_request->presencemask & NAS_PDN_CONNECTIVITY_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_PDN_CONNECTIVITY_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_protocol_configuration_options(pkbuf, &pdn_connectivity_request->extended_protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_pdn_connectivity_reject(pkbuf_t *pkbuf, nas_message_t *message) { nas_pdn_connectivity_reject_t *pdn_connectivity_reject = &message->esm.pdn_connectivity_reject; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode PDN_CONNECTIVITY_REJECT\n"); size = nas_encode_esm_cause(pkbuf, &pdn_connectivity_reject->esm_cause); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (pdn_connectivity_reject->presencemask & NAS_PDN_CONNECTIVITY_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_PDN_CONNECTIVITY_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_protocol_configuration_options(pkbuf, &pdn_connectivity_reject->protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (pdn_connectivity_reject->presencemask & NAS_PDN_CONNECTIVITY_REJECT_BACK_OFF_TIMER_VALUE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_PDN_CONNECTIVITY_REJECT_BACK_OFF_TIMER_VALUE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_gprs_timer_3(pkbuf, &pdn_connectivity_reject->back_off_timer_value); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (pdn_connectivity_reject->presencemask & NAS_PDN_CONNECTIVITY_REJECT_RE_ATTEMPT_INDICATOR_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_PDN_CONNECTIVITY_REJECT_RE_ATTEMPT_INDICATOR_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_re_attempt_indicator(pkbuf, &pdn_connectivity_reject->re_attempt_indicator); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (pdn_connectivity_reject->presencemask & NAS_PDN_CONNECTIVITY_REJECT_NBIFOM_CONTAINER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_PDN_CONNECTIVITY_REJECT_NBIFOM_CONTAINER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_nbifom_container(pkbuf, &pdn_connectivity_reject->nbifom_container); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (pdn_connectivity_reject->presencemask & NAS_PDN_CONNECTIVITY_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_PDN_CONNECTIVITY_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_protocol_configuration_options(pkbuf, &pdn_connectivity_reject->extended_protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_pdn_disconnect_request(pkbuf_t *pkbuf, nas_message_t *message) { nas_pdn_disconnect_request_t *pdn_disconnect_request = &message->esm.pdn_disconnect_request; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode PDN_DISCONNECT_REQUEST\n"); size = nas_encode_linked_eps_bearer_identity(pkbuf, &pdn_disconnect_request->linked_eps_bearer_identity); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (pdn_disconnect_request->presencemask & NAS_PDN_DISCONNECT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_PDN_DISCONNECT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_protocol_configuration_options(pkbuf, &pdn_disconnect_request->protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (pdn_disconnect_request->presencemask & NAS_PDN_DISCONNECT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_PDN_DISCONNECT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_protocol_configuration_options(pkbuf, &pdn_disconnect_request->extended_protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_pdn_disconnect_reject(pkbuf_t *pkbuf, nas_message_t *message) { nas_pdn_disconnect_reject_t *pdn_disconnect_reject = &message->esm.pdn_disconnect_reject; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode PDN_DISCONNECT_REJECT\n"); size = nas_encode_esm_cause(pkbuf, &pdn_disconnect_reject->esm_cause); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (pdn_disconnect_reject->presencemask & NAS_PDN_DISCONNECT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_PDN_DISCONNECT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_protocol_configuration_options(pkbuf, &pdn_disconnect_reject->protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (pdn_disconnect_reject->presencemask & NAS_PDN_DISCONNECT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_PDN_DISCONNECT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_protocol_configuration_options(pkbuf, &pdn_disconnect_reject->extended_protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_bearer_resource_allocation_request(pkbuf_t *pkbuf, nas_message_t *message) { nas_bearer_resource_allocation_request_t *bearer_resource_allocation_request = &message->esm.bearer_resource_allocation_request; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode BEARER_RESOURCE_ALLOCATION_REQUEST\n"); size = nas_encode_linked_eps_bearer_identity(pkbuf, &bearer_resource_allocation_request->linked_eps_bearer_identity); d_assert(size >= 0, return -1, "encode failed"); encoded += size; size = nas_encode_traffic_flow_aggregate_description(pkbuf, &bearer_resource_allocation_request->traffic_flow_aggregate); d_assert(size >= 0, return -1, "encode failed"); encoded += size; size = nas_encode_eps_quality_of_service(pkbuf, &bearer_resource_allocation_request->required_traffic_flow_qos); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (bearer_resource_allocation_request->presencemask & NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_protocol_configuration_options(pkbuf, &bearer_resource_allocation_request->protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (bearer_resource_allocation_request->presencemask & NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_DEVICE_PROPERTIES_PRESENT) { bearer_resource_allocation_request->device_properties.type = (NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_DEVICE_PROPERTIES_TYPE >> 4); size = nas_encode_device_properties(pkbuf, &bearer_resource_allocation_request->device_properties); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (bearer_resource_allocation_request->presencemask & NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_NBIFOM_CONTAINER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_NBIFOM_CONTAINER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_nbifom_container(pkbuf, &bearer_resource_allocation_request->nbifom_container); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (bearer_resource_allocation_request->presencemask & NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_protocol_configuration_options(pkbuf, &bearer_resource_allocation_request->extended_protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_bearer_resource_allocation_reject(pkbuf_t *pkbuf, nas_message_t *message) { nas_bearer_resource_allocation_reject_t *bearer_resource_allocation_reject = &message->esm.bearer_resource_allocation_reject; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode BEARER_RESOURCE_ALLOCATION_REJECT\n"); size = nas_encode_esm_cause(pkbuf, &bearer_resource_allocation_reject->esm_cause); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (bearer_resource_allocation_reject->presencemask & NAS_BEARER_RESOURCE_ALLOCATION_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_BEARER_RESOURCE_ALLOCATION_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_protocol_configuration_options(pkbuf, &bearer_resource_allocation_reject->protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (bearer_resource_allocation_reject->presencemask & NAS_BEARER_RESOURCE_ALLOCATION_REJECT_BACK_OFF_TIMER_VALUE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_BEARER_RESOURCE_ALLOCATION_REJECT_BACK_OFF_TIMER_VALUE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_gprs_timer_3(pkbuf, &bearer_resource_allocation_reject->back_off_timer_value); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (bearer_resource_allocation_reject->presencemask & NAS_BEARER_RESOURCE_ALLOCATION_REJECT_RE_ATTEMPT_INDICATOR_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_BEARER_RESOURCE_ALLOCATION_REJECT_RE_ATTEMPT_INDICATOR_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_re_attempt_indicator(pkbuf, &bearer_resource_allocation_reject->re_attempt_indicator); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (bearer_resource_allocation_reject->presencemask & NAS_BEARER_RESOURCE_ALLOCATION_REJECT_NBIFOM_CONTAINER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_BEARER_RESOURCE_ALLOCATION_REJECT_NBIFOM_CONTAINER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_nbifom_container(pkbuf, &bearer_resource_allocation_reject->nbifom_container); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (bearer_resource_allocation_reject->presencemask & NAS_BEARER_RESOURCE_ALLOCATION_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_BEARER_RESOURCE_ALLOCATION_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_protocol_configuration_options(pkbuf, &bearer_resource_allocation_reject->extended_protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_bearer_resource_modification_request(pkbuf_t *pkbuf, nas_message_t *message) { nas_bearer_resource_modification_request_t *bearer_resource_modification_request = &message->esm.bearer_resource_modification_request; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode BEARER_RESOURCE_MODIFICATION_REQUEST\n"); size = nas_encode_linked_eps_bearer_identity(pkbuf, &bearer_resource_modification_request->eps_bearer_identity_for_packet_filter); d_assert(size >= 0, return -1, "encode failed"); encoded += size; size = nas_encode_traffic_flow_aggregate_description(pkbuf, &bearer_resource_modification_request->traffic_flow_aggregate); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (bearer_resource_modification_request->presencemask & NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_REQUIRED_TRAFFIC_FLOW_QOS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_REQUIRED_TRAFFIC_FLOW_QOS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_eps_quality_of_service(pkbuf, &bearer_resource_modification_request->required_traffic_flow_qos); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (bearer_resource_modification_request->presencemask & NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_ESM_CAUSE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_ESM_CAUSE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_esm_cause(pkbuf, &bearer_resource_modification_request->esm_cause); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (bearer_resource_modification_request->presencemask & NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_protocol_configuration_options(pkbuf, &bearer_resource_modification_request->protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (bearer_resource_modification_request->presencemask & NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_DEVICE_PROPERTIES_PRESENT) { bearer_resource_modification_request->device_properties.type = (NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_DEVICE_PROPERTIES_TYPE >> 4); size = nas_encode_device_properties(pkbuf, &bearer_resource_modification_request->device_properties); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (bearer_resource_modification_request->presencemask & NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_NBIFOM_CONTAINER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_NBIFOM_CONTAINER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_nbifom_container(pkbuf, &bearer_resource_modification_request->nbifom_container); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (bearer_resource_modification_request->presencemask & NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_HEADER_COMPRESSION_CONFIGURATION_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_HEADER_COMPRESSION_CONFIGURATION_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_header_compression_configuration(pkbuf, &bearer_resource_modification_request->header_compression_configuration); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (bearer_resource_modification_request->presencemask & NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_protocol_configuration_options(pkbuf, &bearer_resource_modification_request->extended_protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_bearer_resource_modification_reject(pkbuf_t *pkbuf, nas_message_t *message) { nas_bearer_resource_modification_reject_t *bearer_resource_modification_reject = &message->esm.bearer_resource_modification_reject; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode BEARER_RESOURCE_MODIFICATION_REJECT\n"); size = nas_encode_esm_cause(pkbuf, &bearer_resource_modification_reject->esm_cause); d_assert(size >= 0, return -1, "encode failed"); encoded += size; if (bearer_resource_modification_reject->presencemask & NAS_BEARER_RESOURCE_MODIFICATION_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_BEARER_RESOURCE_MODIFICATION_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_protocol_configuration_options(pkbuf, &bearer_resource_modification_reject->protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (bearer_resource_modification_reject->presencemask & NAS_BEARER_RESOURCE_MODIFICATION_REJECT_BACK_OFF_TIMER_VALUE_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_BEARER_RESOURCE_MODIFICATION_REJECT_BACK_OFF_TIMER_VALUE_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_gprs_timer_3(pkbuf, &bearer_resource_modification_reject->back_off_timer_value); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (bearer_resource_modification_reject->presencemask & NAS_BEARER_RESOURCE_MODIFICATION_REJECT_RE_ATTEMPT_INDICATOR_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_BEARER_RESOURCE_MODIFICATION_REJECT_RE_ATTEMPT_INDICATOR_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_re_attempt_indicator(pkbuf, &bearer_resource_modification_reject->re_attempt_indicator); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (bearer_resource_modification_reject->presencemask & NAS_BEARER_RESOURCE_MODIFICATION_REJECT_NBIFOM_CONTAINER_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_BEARER_RESOURCE_MODIFICATION_REJECT_NBIFOM_CONTAINER_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_nbifom_container(pkbuf, &bearer_resource_modification_reject->nbifom_container); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (bearer_resource_modification_reject->presencemask & NAS_BEARER_RESOURCE_MODIFICATION_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_BEARER_RESOURCE_MODIFICATION_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_protocol_configuration_options(pkbuf, &bearer_resource_modification_reject->extended_protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_esm_information_response(pkbuf_t *pkbuf, nas_message_t *message) { nas_esm_information_response_t *esm_information_response = &message->esm.esm_information_response; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode ESM_INFORMATION_RESPONSE\n"); if (esm_information_response->presencemask & NAS_ESM_INFORMATION_RESPONSE_ACCESS_POINT_NAME_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ESM_INFORMATION_RESPONSE_ACCESS_POINT_NAME_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_access_point_name(pkbuf, &esm_information_response->access_point_name); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (esm_information_response->presencemask & NAS_ESM_INFORMATION_RESPONSE_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ESM_INFORMATION_RESPONSE_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_protocol_configuration_options(pkbuf, &esm_information_response->protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } if (esm_information_response->presencemask & NAS_ESM_INFORMATION_RESPONSE_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { size = nas_encode_optional_type(pkbuf, NAS_ESM_INFORMATION_RESPONSE_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; size = nas_encode_extended_protocol_configuration_options(pkbuf, &esm_information_response->extended_protocol_configuration_options); d_assert(size >= 0, return encoded, "decode failed"); encoded += size; } return encoded; } c_int32_t nas_encode_esm_status(pkbuf_t *pkbuf, nas_message_t *message) { nas_esm_status_t *esm_status = &message->esm.esm_status; c_int32_t encoded = 0; c_int32_t size = 0; d_trace(25, "[NAS] Encode ESM_STATUS\n"); size = nas_encode_esm_cause(pkbuf, &esm_status->esm_cause); d_assert(size >= 0, return -1, "encode failed"); encoded += size; return encoded; } status_t nas_emm_encode(pkbuf_t **pkbuf, nas_message_t *message) { status_t rv = CORE_ERROR; c_int32_t size = 0; c_int32_t encoded = 0; d_assert(message, return CORE_ERROR, "Null param"); /* The Packet Buffer(pkbuf_t) for NAS message MUST make a HEADROOM. * When calculating AES_CMAC, we need to use the headroom of the packet. */ *pkbuf = pkbuf_alloc(NAS_HEADROOM, MAX_SDU_LEN); d_assert(*pkbuf, return -1, "Null Param"); size = sizeof(nas_emm_header_t); rv = pkbuf_header(*pkbuf, -size); d_assert(rv == CORE_OK, return CORE_ERROR, "pkbuf_header error"); memcpy((*pkbuf)->payload - size, &message->emm.h, size); encoded += size; if (message->emm.h.security_header_type >= NAS_SECURITY_HEADER_FOR_SERVICE_REQUEST_MESSAGE) { d_assert(pkbuf_header(*pkbuf, 1) == CORE_OK, return CORE_ERROR, "pkbuf_header error"); encoded -= 1; size = nas_encode_service_request(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; goto out; } switch(message->emm.h.message_type) { case NAS_ATTACH_REQUEST: size = nas_encode_attach_request(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_ATTACH_ACCEPT: size = nas_encode_attach_accept(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_ATTACH_COMPLETE: size = nas_encode_attach_complete(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_ATTACH_REJECT: size = nas_encode_attach_reject(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_DETACH_REQUEST: size = nas_encode_detach_request_to_ue(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_DETACH_ACCEPT: break; case NAS_TRACKING_AREA_UPDATE_REQUEST: size = nas_encode_tracking_area_update_request(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_TRACKING_AREA_UPDATE_ACCEPT: size = nas_encode_tracking_area_update_accept(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_TRACKING_AREA_UPDATE_COMPLETE: break; case NAS_TRACKING_AREA_UPDATE_REJECT: size = nas_encode_tracking_area_update_reject(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_EXTENDED_SERVICE_REQUEST: size = nas_encode_extended_service_request(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_SERVICE_REJECT: size = nas_encode_service_reject(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_GUTI_REALLOCATION_COMMAND: size = nas_encode_guti_reallocation_command(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_GUTI_REALLOCATION_COMPLETE: break; case NAS_AUTHENTICATION_REQUEST: size = nas_encode_authentication_request(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_AUTHENTICATION_RESPONSE: size = nas_encode_authentication_response(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_AUTHENTICATION_REJECT: break; case NAS_IDENTITY_REQUEST: size = nas_encode_identity_request(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_IDENTITY_RESPONSE: size = nas_encode_identity_response(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_AUTHENTICATION_FAILURE: size = nas_encode_authentication_failure(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_SECURITY_MODE_COMMAND: size = nas_encode_security_mode_command(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_SECURITY_MODE_COMPLETE: size = nas_encode_security_mode_complete(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_SECURITY_MODE_REJECT: size = nas_encode_security_mode_reject(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_EMM_STATUS: size = nas_encode_emm_status(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_EMM_INFORMATION: size = nas_encode_emm_information(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_DOWNLINK_NAS_TRANSPORT: size = nas_encode_downlink_nas_transport(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_UPLINK_NAS_TRANSPORT: size = nas_encode_uplink_nas_transport(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_CS_SERVICE_NOTIFICATION: size = nas_encode_cs_service_notification(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_UPLINK_GENERIC_NAS_TRANSPORT: size = nas_encode_uplink_generic_nas_transport(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_DOWNLINK_GENERIC_NAS_TRANSPORT: size = nas_encode_downlink_generic_nas_transport(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; default: d_error("Unknown message type (0x%x) or not implemented", message->emm.h.message_type); pkbuf_free((*pkbuf)); return CORE_ERROR; } out: rv = pkbuf_header(*pkbuf, encoded); d_assert(rv == CORE_OK, return CORE_ERROR, "pkbuf_header error"); (*pkbuf)->len = encoded; return CORE_OK; } status_t nas_esm_encode(pkbuf_t **pkbuf, nas_message_t *message) { status_t rv = CORE_ERROR; c_int32_t size = 0; c_int32_t encoded = 0; d_assert(message, return CORE_ERROR, "Null param"); /* The Packet Buffer(pkbuf_t) for NAS message MUST make a HEADROOM. * When calculating AES_CMAC, we need to use the headroom of the packet. */ *pkbuf = pkbuf_alloc(NAS_HEADROOM, MAX_SDU_LEN); d_assert(*pkbuf, return -1, "Null Param"); size = sizeof(nas_esm_header_t); rv = pkbuf_header(*pkbuf, -size); d_assert(rv == CORE_OK, return CORE_ERROR, "pkbuf_header error"); memcpy((*pkbuf)->payload - size, &message->esm.h, size); encoded += size; switch(message->esm.h.message_type) { case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST: size = nas_encode_activate_default_eps_bearer_context_request(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT: size = nas_encode_activate_default_eps_bearer_context_accept(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT: size = nas_encode_activate_default_eps_bearer_context_reject(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST: size = nas_encode_activate_dedicated_eps_bearer_context_request(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT: size = nas_encode_activate_dedicated_eps_bearer_context_accept(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT: size = nas_encode_activate_dedicated_eps_bearer_context_reject(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST: size = nas_encode_modify_eps_bearer_context_request(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT: size = nas_encode_modify_eps_bearer_context_accept(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_MODIFY_EPS_BEARER_CONTEXT_REJECT: size = nas_encode_modify_eps_bearer_context_reject(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST: size = nas_encode_deactivate_eps_bearer_context_request(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT: size = nas_encode_deactivate_eps_bearer_context_accept(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_PDN_CONNECTIVITY_REQUEST: size = nas_encode_pdn_connectivity_request(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_PDN_CONNECTIVITY_REJECT: size = nas_encode_pdn_connectivity_reject(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_PDN_DISCONNECT_REQUEST: size = nas_encode_pdn_disconnect_request(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_PDN_DISCONNECT_REJECT: size = nas_encode_pdn_disconnect_reject(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_BEARER_RESOURCE_ALLOCATION_REQUEST: size = nas_encode_bearer_resource_allocation_request(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_BEARER_RESOURCE_ALLOCATION_REJECT: size = nas_encode_bearer_resource_allocation_reject(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_BEARER_RESOURCE_MODIFICATION_REQUEST: size = nas_encode_bearer_resource_modification_request(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_BEARER_RESOURCE_MODIFICATION_REJECT: size = nas_encode_bearer_resource_modification_reject(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_ESM_INFORMATION_REQUEST: break; case NAS_ESM_INFORMATION_RESPONSE: size = nas_encode_esm_information_response(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; case NAS_ESM_STATUS: size = nas_encode_esm_status(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; break; default: d_error("Unknown message type (0x%x) or not implemented", message->esm.h.message_type); pkbuf_free((*pkbuf)); return CORE_ERROR; } rv = pkbuf_header(*pkbuf, encoded); d_assert(rv == CORE_OK, return CORE_ERROR, "pkbuf_header error"); (*pkbuf)->len = encoded; return CORE_OK; } status_t nas_plain_encode(pkbuf_t **pkbuf, nas_message_t *message) { d_assert(message, return CORE_ERROR, "Null param"); d_assert(message->emm.h.protocol_discriminator == message->esm.h.protocol_discriminator, return CORE_ERROR, "check UNION for protocol"); if (message->emm.h.protocol_discriminator == NAS_PROTOCOL_DISCRIMINATOR_EMM) return nas_emm_encode(pkbuf, message); else if (message->emm.h.protocol_discriminator == NAS_PROTOCOL_DISCRIMINATOR_ESM) return nas_esm_encode(pkbuf, message); d_assert(0, return CORE_ERROR, "Invalid Protocol : %d", message->emm.h.protocol_discriminator); } nextepc-0.3.10/lib/nas/nas_ies.c000066400000000000000000003100021333553357400163640ustar00rootroot00000000000000/* * Copyright (c) 2017, NextEPC Group * 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. */ /******************************************************************************* * This file had been created by gtpv2c_tlv.py script v0.1.0 * Please do not modify this file but regenerate it via script. * Created on: 2018-01-23 15:58:42.829935 by acetcom * from 24301-d80.docx ******************************************************************************/ #define TRACE_MODULE _nas_ies #include "core_debug.h" #include "core_lib.h" #include "nas_ies.h" c_int16_t nas_encode_optional_type(pkbuf_t *pkbuf, c_uint8_t type) { c_uint16_t size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &type, size); return size; } /* 9.9.2.0 Additional information * O TLV 3-n */ c_int16_t nas_decode_additional_information(nas_additional_information_t *additional_information, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_additional_information_t *source = pkbuf->payload; additional_information->length = source->length; size = additional_information->length + sizeof(additional_information->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(additional_information, pkbuf->payload - size, size); d_trace(25, " ADDITIONAL_INFORMATION - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_additional_information(pkbuf_t *pkbuf, nas_additional_information_t *additional_information) { c_uint16_t size = additional_information->length + sizeof(additional_information->length); nas_additional_information_t target; memcpy(&target, additional_information, sizeof(nas_additional_information_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " ADDITIONAL_INFORMATION - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.2.0A Device properties * O TV 1 */ c_int16_t nas_decode_device_properties(nas_device_properties_t *device_properties, pkbuf_t *pkbuf) { memcpy(device_properties, pkbuf->payload - 1, 1); d_trace(25, " DEVICE_PROPERTIES - "); d_trace_hex(25, pkbuf->payload - 1, 1); return 0; } c_int16_t nas_encode_device_properties(pkbuf_t *pkbuf, nas_device_properties_t *device_properties) { c_uint16_t size = sizeof(nas_device_properties_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, device_properties, size); d_trace(25, " DEVICE_PROPERTIES - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.2.1 EPS bearer context status * O TLV 4 */ c_int16_t nas_decode_eps_bearer_context_status(nas_eps_bearer_context_status_t *eps_bearer_context_status, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_eps_bearer_context_status_t *source = pkbuf->payload; eps_bearer_context_status->length = source->length; size = eps_bearer_context_status->length + sizeof(eps_bearer_context_status->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(eps_bearer_context_status, pkbuf->payload - size, size); d_trace(25, " EPS_BEARER_CONTEXT_STATUS - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_eps_bearer_context_status(pkbuf_t *pkbuf, nas_eps_bearer_context_status_t *eps_bearer_context_status) { c_uint16_t size = eps_bearer_context_status->length + sizeof(eps_bearer_context_status->length); nas_eps_bearer_context_status_t target; memcpy(&target, eps_bearer_context_status, sizeof(nas_eps_bearer_context_status_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " EPS_BEARER_CONTEXT_STATUS - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.2.10 Supported Codec List * O TLV 5-n */ c_int16_t nas_decode_supported_codec_list(nas_supported_codec_list_t *supported_codec_list, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_supported_codec_list_t *source = pkbuf->payload; supported_codec_list->length = source->length; size = supported_codec_list->length + sizeof(supported_codec_list->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(supported_codec_list, pkbuf->payload - size, size); d_trace(25, " SUPPORTED_CODEC_LIST - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_supported_codec_list(pkbuf_t *pkbuf, nas_supported_codec_list_t *supported_codec_list) { c_uint16_t size = supported_codec_list->length + sizeof(supported_codec_list->length); nas_supported_codec_list_t target; memcpy(&target, supported_codec_list, sizeof(nas_supported_codec_list_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " SUPPORTED_CODEC_LIST - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.2.2 Location area identification * O TV 6 */ c_int16_t nas_decode_location_area_identification(nas_location_area_identification_t *location_area_identification, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_location_area_identification_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(location_area_identification, pkbuf->payload - size, size); location_area_identification->lac = ntohs(location_area_identification->lac); d_trace(25, " LOCATION_AREA_IDENTIFICATION - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_location_area_identification(pkbuf_t *pkbuf, nas_location_area_identification_t *location_area_identification) { c_uint16_t size = sizeof(nas_location_area_identification_t); nas_location_area_identification_t target; memcpy(&target, location_area_identification, size); target.lac = htons(location_area_identification->lac); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " LOCATION_AREA_IDENTIFICATION - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.2.3 Mobile identity * O TLV 7-10 */ c_int16_t nas_decode_mobile_identity(nas_mobile_identity_t *mobile_identity, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_mobile_identity_t *source = pkbuf->payload; mobile_identity->length = source->length; size = mobile_identity->length + sizeof(mobile_identity->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(mobile_identity, pkbuf->payload - size, size); if (mobile_identity->tmsi.type == NAS_MOBILE_IDENTITY_TMSI) { if (mobile_identity->tmsi.spare != 0xf) d_warn("Spec warning : mobile_identity->tmsi.spare = 0x%x", mobile_identity->tmsi.spare); mobile_identity->tmsi.tmsi = ntohl(mobile_identity->tmsi.tmsi); } d_trace(25, " MOBILE_IDENTITY - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_mobile_identity(pkbuf_t *pkbuf, nas_mobile_identity_t *mobile_identity) { c_uint16_t size = mobile_identity->length + sizeof(mobile_identity->length); nas_mobile_identity_t target; memcpy(&target, mobile_identity, sizeof(nas_mobile_identity_t)); if (mobile_identity->tmsi.type == NAS_MOBILE_IDENTITY_TMSI) { target.tmsi.tmsi = htonl(mobile_identity->tmsi.tmsi); target.tmsi.spare = 0xf; } d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " MOBILE_IDENTITY - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.2.4 Mobile station classmark 2 * O TLV 5 */ c_int16_t nas_decode_mobile_station_classmark_2(nas_mobile_station_classmark_2_t *mobile_station_classmark_2, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_mobile_station_classmark_2_t *source = pkbuf->payload; mobile_station_classmark_2->length = source->length; size = mobile_station_classmark_2->length + sizeof(mobile_station_classmark_2->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(mobile_station_classmark_2, pkbuf->payload - size, size); d_trace(25, " MOBILE_STATION_CLASSMARK_2 - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_mobile_station_classmark_2(pkbuf_t *pkbuf, nas_mobile_station_classmark_2_t *mobile_station_classmark_2) { c_uint16_t size = mobile_station_classmark_2->length + sizeof(mobile_station_classmark_2->length); nas_mobile_station_classmark_2_t target; memcpy(&target, mobile_station_classmark_2, sizeof(nas_mobile_station_classmark_2_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " MOBILE_STATION_CLASSMARK_2 - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.2.5 Mobile station classmark 3 * O TLV 2-34 */ c_int16_t nas_decode_mobile_station_classmark_3(nas_mobile_station_classmark_3_t *mobile_station_classmark_3, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_mobile_station_classmark_3_t *source = pkbuf->payload; mobile_station_classmark_3->length = source->length; size = mobile_station_classmark_3->length + sizeof(mobile_station_classmark_3->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(mobile_station_classmark_3, pkbuf->payload - size, size); d_trace(25, " MOBILE_STATION_CLASSMARK_3 - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_mobile_station_classmark_3(pkbuf_t *pkbuf, nas_mobile_station_classmark_3_t *mobile_station_classmark_3) { c_uint16_t size = mobile_station_classmark_3->length + sizeof(mobile_station_classmark_3->length); nas_mobile_station_classmark_3_t target; memcpy(&target, mobile_station_classmark_3, sizeof(nas_mobile_station_classmark_3_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " MOBILE_STATION_CLASSMARK_3 - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.2.8 PLMN list * O TLV 5-47 */ c_int16_t nas_decode_plmn_list(nas_plmn_list_t *plmn_list, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_plmn_list_t *source = pkbuf->payload; plmn_list->length = source->length; size = plmn_list->length + sizeof(plmn_list->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(plmn_list, pkbuf->payload - size, size); d_trace(25, " PLMN_LIST - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_plmn_list(pkbuf_t *pkbuf, nas_plmn_list_t *plmn_list) { c_uint16_t size = plmn_list->length + sizeof(plmn_list->length); nas_plmn_list_t target; memcpy(&target, plmn_list, sizeof(nas_plmn_list_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " PLMN_LIST - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.0A Additional update result * O TV 1 */ c_int16_t nas_decode_additional_update_result(nas_additional_update_result_t *additional_update_result, pkbuf_t *pkbuf) { memcpy(additional_update_result, pkbuf->payload - 1, 1); d_trace(25, " ADDITIONAL_UPDATE_RESULT - "); d_trace_hex(25, pkbuf->payload - 1, 1); return 0; } c_int16_t nas_encode_additional_update_result(pkbuf_t *pkbuf, nas_additional_update_result_t *additional_update_result) { c_uint16_t size = sizeof(nas_additional_update_result_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, additional_update_result, size); d_trace(25, " ADDITIONAL_UPDATE_RESULT - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.0B Additional update type * O TV 1 */ c_int16_t nas_decode_additional_update_type(nas_additional_update_type_t *additional_update_type, pkbuf_t *pkbuf) { memcpy(additional_update_type, pkbuf->payload - 1, 1); d_trace(25, " ADDITIONAL_UPDATE_TYPE - "); d_trace_hex(25, pkbuf->payload - 1, 1); return 0; } c_int16_t nas_encode_additional_update_type(pkbuf_t *pkbuf, nas_additional_update_type_t *additional_update_type) { c_uint16_t size = sizeof(nas_additional_update_type_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, additional_update_type, size); d_trace(25, " ADDITIONAL_UPDATE_TYPE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.1 Authentication failure parameter * O TLV 16 */ c_int16_t nas_decode_authentication_failure_parameter(nas_authentication_failure_parameter_t *authentication_failure_parameter, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_authentication_failure_parameter_t *source = pkbuf->payload; authentication_failure_parameter->length = source->length; size = authentication_failure_parameter->length + sizeof(authentication_failure_parameter->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(authentication_failure_parameter, pkbuf->payload - size, size); d_trace(25, " AUTHENTICATION_FAILURE_PARAMETER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_authentication_failure_parameter(pkbuf_t *pkbuf, nas_authentication_failure_parameter_t *authentication_failure_parameter) { c_uint16_t size = authentication_failure_parameter->length + sizeof(authentication_failure_parameter->length); nas_authentication_failure_parameter_t target; memcpy(&target, authentication_failure_parameter, sizeof(nas_authentication_failure_parameter_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " AUTHENTICATION_FAILURE_PARAMETER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.10 EPS attach result * M V 1/2 */ c_int16_t nas_decode_eps_attach_result(nas_eps_attach_result_t *eps_attach_result, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_eps_attach_result_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(eps_attach_result, pkbuf->payload - size, size); d_trace(25, " EPS_ATTACH_RESULT - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_eps_attach_result(pkbuf_t *pkbuf, nas_eps_attach_result_t *eps_attach_result) { c_uint16_t size = sizeof(nas_eps_attach_result_t); nas_eps_attach_result_t target; memcpy(&target, eps_attach_result, size); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " EPS_ATTACH_RESULT - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.11 EPS attach type * M V 1/2 */ c_int16_t nas_decode_eps_attach_type(nas_eps_attach_type_t *eps_attach_type, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_eps_attach_type_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(eps_attach_type, pkbuf->payload - size, size); d_trace(25, " EPS_ATTACH_TYPE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_eps_attach_type(pkbuf_t *pkbuf, nas_eps_attach_type_t *eps_attach_type) { c_uint16_t size = sizeof(nas_eps_attach_type_t); nas_eps_attach_type_t target; memcpy(&target, eps_attach_type, size); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " EPS_ATTACH_TYPE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.12 EPS mobile identity * M LV 5-12 */ c_int16_t nas_decode_eps_mobile_identity(nas_eps_mobile_identity_t *eps_mobile_identity, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_eps_mobile_identity_t *source = pkbuf->payload; eps_mobile_identity->length = source->length; size = eps_mobile_identity->length + sizeof(eps_mobile_identity->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(eps_mobile_identity, pkbuf->payload - size, size); if (eps_mobile_identity->guti.type == NAS_EPS_MOBILE_IDENTITY_GUTI) { if (eps_mobile_identity->guti.spare != 0xf) d_warn("Spec warning : eps_mobile_identy->spare = 0x%x", eps_mobile_identity->guti.spare); eps_mobile_identity->guti.mme_gid = ntohs(eps_mobile_identity->guti.mme_gid); eps_mobile_identity->guti.m_tmsi = ntohl(eps_mobile_identity->guti.m_tmsi); } d_trace(25, " EPS_MOBILE_IDENTITY - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_eps_mobile_identity(pkbuf_t *pkbuf, nas_eps_mobile_identity_t *eps_mobile_identity) { c_uint16_t size = eps_mobile_identity->length + sizeof(eps_mobile_identity->length); nas_eps_mobile_identity_t target; memcpy(&target, eps_mobile_identity, sizeof(nas_eps_mobile_identity_t)); if (target.guti.type == NAS_EPS_MOBILE_IDENTITY_GUTI) { target.guti.spare = 0xf; target.guti.mme_gid = htons(eps_mobile_identity->guti.mme_gid); target.guti.m_tmsi = htonl(eps_mobile_identity->guti.m_tmsi); } d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " EPS_MOBILE_IDENTITY - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.12A EPS network feature support * O TLV 3 */ c_int16_t nas_decode_eps_network_feature_support(nas_eps_network_feature_support_t *eps_network_feature_support, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_eps_network_feature_support_t *source = pkbuf->payload; eps_network_feature_support->length = source->length; size = eps_network_feature_support->length + sizeof(eps_network_feature_support->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(eps_network_feature_support, pkbuf->payload - size, size); d_trace(25, " EPS_NETWORK_FEATURE_SUPPORT - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_eps_network_feature_support(pkbuf_t *pkbuf, nas_eps_network_feature_support_t *eps_network_feature_support) { c_uint16_t size = eps_network_feature_support->length + sizeof(eps_network_feature_support->length); nas_eps_network_feature_support_t target; memcpy(&target, eps_network_feature_support, sizeof(nas_eps_network_feature_support_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " EPS_NETWORK_FEATURE_SUPPORT - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.13 EPS update result * M V 1/2 */ c_int16_t nas_decode_eps_update_result(nas_eps_update_result_t *eps_update_result, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_eps_update_result_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(eps_update_result, pkbuf->payload - size, size); d_trace(25, " EPS_UPDATE_RESULT - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_eps_update_result(pkbuf_t *pkbuf, nas_eps_update_result_t *eps_update_result) { c_uint16_t size = sizeof(nas_eps_update_result_t); nas_eps_update_result_t target; memcpy(&target, eps_update_result, size); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " EPS_UPDATE_RESULT - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.14 EPS update type * M V 1/2 */ c_int16_t nas_decode_eps_update_type(nas_eps_update_type_t *eps_update_type, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_eps_update_type_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(eps_update_type, pkbuf->payload - size, size); d_trace(25, " EPS_UPDATE_TYPE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_eps_update_type(pkbuf_t *pkbuf, nas_eps_update_type_t *eps_update_type) { c_uint16_t size = sizeof(nas_eps_update_type_t); nas_eps_update_type_t target; memcpy(&target, eps_update_type, size); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " EPS_UPDATE_TYPE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.15 ESM message container * M LV-E 5-n */ c_int16_t nas_decode_esm_message_container(nas_esm_message_container_t *esm_message_container, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_esm_message_container_t *source = pkbuf->payload; esm_message_container->length = ntohs(source->length); size = esm_message_container->length + sizeof(esm_message_container->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); esm_message_container->buffer = pkbuf->payload - size + sizeof(esm_message_container->length); d_trace(25, " ESM_MESSAGE_CONTAINER - "); d_trace_hex(25, esm_message_container->buffer, esm_message_container->length); return size; } c_int16_t nas_encode_esm_message_container(pkbuf_t *pkbuf, nas_esm_message_container_t *esm_message_container) { c_uint16_t size = 0; c_uint16_t target; d_assert(esm_message_container, return -1, "Null param"); d_assert(esm_message_container->buffer, return -1, "Null param"); size = sizeof(esm_message_container->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); target = htons(esm_message_container->length); memcpy(pkbuf->payload - size, &target, size); size = esm_message_container->length; d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, esm_message_container->buffer, size); d_trace(25, " ESM_MESSAGE_CONTAINER - "); d_trace_hex(25, pkbuf->payload - size, size); return esm_message_container->length + sizeof(esm_message_container->length); } /* 9.9.3.16 GPRS timer * M V 1 */ c_int16_t nas_decode_gprs_timer(nas_gprs_timer_t *gprs_timer, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_gprs_timer_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(gprs_timer, pkbuf->payload - size, size); d_trace(25, " GPRS_TIMER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_gprs_timer(pkbuf_t *pkbuf, nas_gprs_timer_t *gprs_timer) { c_uint16_t size = sizeof(nas_gprs_timer_t); nas_gprs_timer_t target; memcpy(&target, gprs_timer, size); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " GPRS_TIMER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.16A GPRS timer 2 * O TLV 3 */ c_int16_t nas_decode_gprs_timer_2(nas_gprs_timer_2_t *gprs_timer_2, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_gprs_timer_2_t *source = pkbuf->payload; gprs_timer_2->length = source->length; size = gprs_timer_2->length + sizeof(gprs_timer_2->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(gprs_timer_2, pkbuf->payload - size, size); d_trace(25, " GPRS_TIMER_2 - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_gprs_timer_2(pkbuf_t *pkbuf, nas_gprs_timer_2_t *gprs_timer_2) { c_uint16_t size = gprs_timer_2->length + sizeof(gprs_timer_2->length); nas_gprs_timer_2_t target; memcpy(&target, gprs_timer_2, sizeof(nas_gprs_timer_2_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " GPRS_TIMER_2 - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.16B GPRS timer 3 * O TLV 3 */ c_int16_t nas_decode_gprs_timer_3(nas_gprs_timer_3_t *gprs_timer_3, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_gprs_timer_3_t *source = pkbuf->payload; gprs_timer_3->length = source->length; size = gprs_timer_3->length + sizeof(gprs_timer_3->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(gprs_timer_3, pkbuf->payload - size, size); d_trace(25, " GPRS_TIMER_3 - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_gprs_timer_3(pkbuf_t *pkbuf, nas_gprs_timer_3_t *gprs_timer_3) { c_uint16_t size = gprs_timer_3->length + sizeof(gprs_timer_3->length); nas_gprs_timer_3_t target; memcpy(&target, gprs_timer_3, sizeof(nas_gprs_timer_3_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " GPRS_TIMER_3 - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.17 Identity type 2 * M V 1/2 */ c_int16_t nas_decode_identity_type_2(nas_identity_type_2_t *identity_type_2, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_identity_type_2_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(identity_type_2, pkbuf->payload - size, size); d_trace(25, " IDENTITY_TYPE_2 - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_identity_type_2(pkbuf_t *pkbuf, nas_identity_type_2_t *identity_type_2) { c_uint16_t size = sizeof(nas_identity_type_2_t); nas_identity_type_2_t target; memcpy(&target, identity_type_2, size); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " IDENTITY_TYPE_2 - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.18 IMEISV request * O TV 1 */ c_int16_t nas_decode_imeisv_request(nas_imeisv_request_t *imeisv_request, pkbuf_t *pkbuf) { memcpy(imeisv_request, pkbuf->payload - 1, 1); d_trace(25, " IMEISV_REQUEST - "); d_trace_hex(25, pkbuf->payload - 1, 1); return 0; } c_int16_t nas_encode_imeisv_request(pkbuf_t *pkbuf, nas_imeisv_request_t *imeisv_request) { c_uint16_t size = sizeof(nas_imeisv_request_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, imeisv_request, size); d_trace(25, " IMEISV_REQUEST - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.19 KSI and sequence number * M V 1 */ c_int16_t nas_decode_ksi_and_sequence_number(nas_ksi_and_sequence_number_t *ksi_and_sequence_number, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_ksi_and_sequence_number_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(ksi_and_sequence_number, pkbuf->payload - size, size); d_trace(25, " KSI_AND_SEQUENCE_NUMBER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_ksi_and_sequence_number(pkbuf_t *pkbuf, nas_ksi_and_sequence_number_t *ksi_and_sequence_number) { c_uint16_t size = sizeof(nas_ksi_and_sequence_number_t); nas_ksi_and_sequence_number_t target; memcpy(&target, ksi_and_sequence_number, size); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " KSI_AND_SEQUENCE_NUMBER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.2 Authentication parameter AUTN * M LV 17 */ c_int16_t nas_decode_authentication_parameter_autn(nas_authentication_parameter_autn_t *authentication_parameter_autn, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_authentication_parameter_autn_t *source = pkbuf->payload; authentication_parameter_autn->length = source->length; size = authentication_parameter_autn->length + sizeof(authentication_parameter_autn->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(authentication_parameter_autn, pkbuf->payload - size, size); d_trace(25, " AUTHENTICATION_PARAMETER_AUTN - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_authentication_parameter_autn(pkbuf_t *pkbuf, nas_authentication_parameter_autn_t *authentication_parameter_autn) { c_uint16_t size = authentication_parameter_autn->length + sizeof(authentication_parameter_autn->length); nas_authentication_parameter_autn_t target; memcpy(&target, authentication_parameter_autn, sizeof(nas_authentication_parameter_autn_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " AUTHENTICATION_PARAMETER_AUTN - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.20 MS network capability * O TLV 4-10 */ c_int16_t nas_decode_ms_network_capability(nas_ms_network_capability_t *ms_network_capability, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_ms_network_capability_t *source = pkbuf->payload; ms_network_capability->length = source->length; size = ms_network_capability->length + sizeof(ms_network_capability->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(ms_network_capability, pkbuf->payload - size, size); d_trace(25, " MS_NETWORK_CAPABILITY - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_ms_network_capability(pkbuf_t *pkbuf, nas_ms_network_capability_t *ms_network_capability) { c_uint16_t size = ms_network_capability->length + sizeof(ms_network_capability->length); nas_ms_network_capability_t target; memcpy(&target, ms_network_capability, sizeof(nas_ms_network_capability_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " MS_NETWORK_CAPABILITY - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.20A MS network feature support * O TV 1 */ c_int16_t nas_decode_ms_network_feature_support(nas_ms_network_feature_support_t *ms_network_feature_support, pkbuf_t *pkbuf) { memcpy(ms_network_feature_support, pkbuf->payload - 1, 1); d_trace(25, " MS_NETWORK_FEATURE_SUPPORT - "); d_trace_hex(25, pkbuf->payload - 1, 1); return 0; } c_int16_t nas_encode_ms_network_feature_support(pkbuf_t *pkbuf, nas_ms_network_feature_support_t *ms_network_feature_support) { c_uint16_t size = sizeof(nas_ms_network_feature_support_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, ms_network_feature_support, size); d_trace(25, " MS_NETWORK_FEATURE_SUPPORT - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.21 key set identifier * O TV 1 */ c_int16_t nas_decode_key_set_identifier(nas_key_set_identifier_t *key_set_identifier, pkbuf_t *pkbuf) { memcpy(key_set_identifier, pkbuf->payload - 1, 1); d_trace(25, " KEY_SET_IDENTIFIER - "); d_trace_hex(25, pkbuf->payload - 1, 1); return 0; } c_int16_t nas_encode_key_set_identifier(pkbuf_t *pkbuf, nas_key_set_identifier_t *key_set_identifier) { c_uint16_t size = sizeof(nas_key_set_identifier_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, key_set_identifier, size); d_trace(25, " KEY_SET_IDENTIFIER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.22 message container * M LV 3-252 */ c_int16_t nas_decode_message_container(nas_message_container_t *message_container, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_message_container_t *source = pkbuf->payload; message_container->length = source->length; size = message_container->length + sizeof(message_container->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(message_container, pkbuf->payload - size, size); d_trace(25, " MESSAGE_CONTAINER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_message_container(pkbuf_t *pkbuf, nas_message_container_t *message_container) { c_uint16_t size = message_container->length + sizeof(message_container->length); nas_message_container_t target; memcpy(&target, message_container, sizeof(nas_message_container_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " MESSAGE_CONTAINER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.23 security algorithms * M V 1 */ c_int16_t nas_decode_security_algorithms(nas_security_algorithms_t *security_algorithms, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_security_algorithms_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(security_algorithms, pkbuf->payload - size, size); d_trace(25, " SECURITY_ALGORITHMS - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_security_algorithms(pkbuf_t *pkbuf, nas_security_algorithms_t *security_algorithms) { c_uint16_t size = sizeof(nas_security_algorithms_t); nas_security_algorithms_t target; memcpy(&target, security_algorithms, size); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " SECURITY_ALGORITHMS - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.24 Network name * O TLV 3-n */ c_int16_t nas_decode_network_name(nas_network_name_t *network_name, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_network_name_t *source = pkbuf->payload; network_name->length = source->length; size = network_name->length + sizeof(network_name->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(network_name, pkbuf->payload - size, size); d_trace(25, " NETWORK_NAME - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_network_name(pkbuf_t *pkbuf, nas_network_name_t *network_name) { c_uint16_t size = network_name->length + sizeof(network_name->length); nas_network_name_t target; memcpy(&target, network_name, sizeof(nas_network_name_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " NETWORK_NAME - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.24A Network resource identifier container * O TLV 4 */ c_int16_t nas_decode_network_resource_identifier_container(nas_network_resource_identifier_container_t *network_resource_identifier_container, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_network_resource_identifier_container_t *source = pkbuf->payload; network_resource_identifier_container->length = source->length; size = network_resource_identifier_container->length + sizeof(network_resource_identifier_container->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(network_resource_identifier_container, pkbuf->payload - size, size); d_trace(25, " NETWORK_RESOURCE_IDENTIFIER_CONTAINER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_network_resource_identifier_container(pkbuf_t *pkbuf, nas_network_resource_identifier_container_t *network_resource_identifier_container) { c_uint16_t size = network_resource_identifier_container->length + sizeof(network_resource_identifier_container->length); nas_network_resource_identifier_container_t target; memcpy(&target, network_resource_identifier_container, sizeof(nas_network_resource_identifier_container_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " NETWORK_RESOURCE_IDENTIFIER_CONTAINER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.25 Nonce * O TV 5 */ c_int16_t nas_decode_nonce(nas_nonce_t *nonce, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_nonce_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(nonce, pkbuf->payload - size, size); *nonce = ntohl(*nonce); d_trace(25, " NONCE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_nonce(pkbuf_t *pkbuf, nas_nonce_t *nonce) { c_uint16_t size = sizeof(nas_nonce_t); nas_nonce_t target; memcpy(&target, nonce, size); target = htonl(*nonce); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " NONCE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.25A Paging identity * M V 1 */ c_int16_t nas_decode_paging_identity(nas_paging_identity_t *paging_identity, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_paging_identity_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(paging_identity, pkbuf->payload - size, size); d_trace(25, " PAGING_IDENTITY - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_paging_identity(pkbuf_t *pkbuf, nas_paging_identity_t *paging_identity) { c_uint16_t size = sizeof(nas_paging_identity_t); nas_paging_identity_t target; memcpy(&target, paging_identity, size); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " PAGING_IDENTITY - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.26 P-TMSI signature * O TV 4 */ c_int16_t nas_decode_p_tmsi_signature(nas_p_tmsi_signature_t *p_tmsi_signature, pkbuf_t *pkbuf) { c_uint16_t size = 3; d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(p_tmsi_signature, pkbuf->payload - size, size); *p_tmsi_signature = htonl(*p_tmsi_signature); d_trace(25, " P_TMSI_SIGNATURE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_p_tmsi_signature(pkbuf_t *pkbuf, nas_p_tmsi_signature_t *p_tmsi_signature) { c_uint16_t size = 3; nas_p_tmsi_signature_t target; memcpy(&target, p_tmsi_signature, size); *p_tmsi_signature = ntohl(*p_tmsi_signature); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " P_TMSI_SIGNATURE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.26A Extended EMM cause * O TV 1 */ c_int16_t nas_decode_extended_emm_cause(nas_extended_emm_cause_t *extended_emm_cause, pkbuf_t *pkbuf) { memcpy(extended_emm_cause, pkbuf->payload - 1, 1); d_trace(25, " EXTENDED_EMM_CAUSE - "); d_trace_hex(25, pkbuf->payload - 1, 1); return 0; } c_int16_t nas_encode_extended_emm_cause(pkbuf_t *pkbuf, nas_extended_emm_cause_t *extended_emm_cause) { c_uint16_t size = sizeof(nas_extended_emm_cause_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, extended_emm_cause, size); d_trace(25, " EXTENDED_EMM_CAUSE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.27 Service type * M V 1/2 */ c_int16_t nas_decode_service_type(nas_service_type_t *service_type, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_service_type_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(service_type, pkbuf->payload - size, size); d_trace(25, " SERVICE_TYPE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_service_type(pkbuf_t *pkbuf, nas_service_type_t *service_type) { c_uint16_t size = sizeof(nas_service_type_t); nas_service_type_t target; memcpy(&target, service_type, size); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " SERVICE_TYPE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.28 Short MAC * M V 2 */ c_int16_t nas_decode_short_mac(nas_short_mac_t *short_mac, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_short_mac_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(short_mac, pkbuf->payload - size, size); *short_mac = ntohs(*short_mac); d_trace(25, " SHORT_MAC - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_short_mac(pkbuf_t *pkbuf, nas_short_mac_t *short_mac) { c_uint16_t size = sizeof(nas_short_mac_t); nas_short_mac_t target; memcpy(&target, short_mac, size); target = htons(*short_mac); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " SHORT_MAC - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.29 Time zone * O TV 2 */ c_int16_t nas_decode_time_zone(nas_time_zone_t *time_zone, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_time_zone_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(time_zone, pkbuf->payload - size, size); d_trace(25, " TIME_ZONE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_time_zone(pkbuf_t *pkbuf, nas_time_zone_t *time_zone) { c_uint16_t size = sizeof(nas_time_zone_t); nas_time_zone_t target; memcpy(&target, time_zone, size); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " TIME_ZONE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.3 Authentication parameter RAND * M V 16 */ c_int16_t nas_decode_authentication_parameter_rand(nas_authentication_parameter_rand_t *authentication_parameter_rand, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_authentication_parameter_rand_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(authentication_parameter_rand, pkbuf->payload - size, size); d_trace(25, " AUTHENTICATION_PARAMETER_RAND - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_authentication_parameter_rand(pkbuf_t *pkbuf, nas_authentication_parameter_rand_t *authentication_parameter_rand) { c_uint16_t size = sizeof(nas_authentication_parameter_rand_t); nas_authentication_parameter_rand_t target; memcpy(&target, authentication_parameter_rand, size); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " AUTHENTICATION_PARAMETER_RAND - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.30 Time zone and time * O TV 8 */ c_int16_t nas_decode_time_zone_and_time(nas_time_zone_and_time_t *time_zone_and_time, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_time_zone_and_time_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(time_zone_and_time, pkbuf->payload - size, size); d_trace(25, " TIME_ZONE_AND_TIME - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_time_zone_and_time(pkbuf_t *pkbuf, nas_time_zone_and_time_t *time_zone_and_time) { c_uint16_t size = sizeof(nas_time_zone_and_time_t); nas_time_zone_and_time_t target; memcpy(&target, time_zone_and_time, size); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " TIME_ZONE_AND_TIME - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.31 TMSI status * O TV 1 */ c_int16_t nas_decode_tmsi_status(nas_tmsi_status_t *tmsi_status, pkbuf_t *pkbuf) { memcpy(tmsi_status, pkbuf->payload - 1, 1); d_trace(25, " TMSI_STATUS - "); d_trace_hex(25, pkbuf->payload - 1, 1); return 0; } c_int16_t nas_encode_tmsi_status(pkbuf_t *pkbuf, nas_tmsi_status_t *tmsi_status) { c_uint16_t size = sizeof(nas_tmsi_status_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, tmsi_status, size); d_trace(25, " TMSI_STATUS - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.32 Tracking area identity * O TV 6 */ c_int16_t nas_decode_tracking_area_identity(nas_tracking_area_identity_t *tracking_area_identity, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_tracking_area_identity_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(tracking_area_identity, pkbuf->payload - size, size); tracking_area_identity->tac = ntohs(tracking_area_identity->tac); d_trace(25, " TRACKING_AREA_IDENTITY - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_tracking_area_identity(pkbuf_t *pkbuf, nas_tracking_area_identity_t *tracking_area_identity) { c_uint16_t size = sizeof(nas_tracking_area_identity_t); nas_tracking_area_identity_t target; memcpy(&target, tracking_area_identity, size); target.tac = htons(tracking_area_identity->tac); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " TRACKING_AREA_IDENTITY - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.33 Tracking area identity list * M LV 7-97 */ c_int16_t nas_decode_tracking_area_identity_list(nas_tracking_area_identity_list_t *tracking_area_identity_list, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_tracking_area_identity_list_t *source = pkbuf->payload; tracking_area_identity_list->length = source->length; size = tracking_area_identity_list->length + sizeof(tracking_area_identity_list->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(tracking_area_identity_list, pkbuf->payload - size, size); d_trace(25, " TRACKING_AREA_IDENTITY_LIST - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_tracking_area_identity_list(pkbuf_t *pkbuf, nas_tracking_area_identity_list_t *tracking_area_identity_list) { c_uint16_t size = tracking_area_identity_list->length + sizeof(tracking_area_identity_list->length); nas_tracking_area_identity_list_t target; memcpy(&target, tracking_area_identity_list, sizeof(nas_tracking_area_identity_list_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " TRACKING_AREA_IDENTITY_LIST - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.34 UE network capability * M LV 3-14 */ c_int16_t nas_decode_ue_network_capability(nas_ue_network_capability_t *ue_network_capability, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_ue_network_capability_t *source = pkbuf->payload; ue_network_capability->length = source->length; size = ue_network_capability->length + sizeof(ue_network_capability->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(ue_network_capability, pkbuf->payload - size, size); d_trace(25, " UE_NETWORK_CAPABILITY - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_ue_network_capability(pkbuf_t *pkbuf, nas_ue_network_capability_t *ue_network_capability) { c_uint16_t size = ue_network_capability->length + sizeof(ue_network_capability->length); nas_ue_network_capability_t target; memcpy(&target, ue_network_capability, sizeof(nas_ue_network_capability_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " UE_NETWORK_CAPABILITY - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.35 UE radio capability information update needed * O TV 1 */ c_int16_t nas_decode_ue_radio_capability_information_update_needed(nas_ue_radio_capability_information_update_needed_t *ue_radio_capability_information_update_needed, pkbuf_t *pkbuf) { memcpy(ue_radio_capability_information_update_needed, pkbuf->payload - 1, 1); d_trace(25, " UE_RADIO_CAPABILITY_INFORMATION_UPDATE_NEEDED - "); d_trace_hex(25, pkbuf->payload - 1, 1); return 0; } c_int16_t nas_encode_ue_radio_capability_information_update_needed(pkbuf_t *pkbuf, nas_ue_radio_capability_information_update_needed_t *ue_radio_capability_information_update_needed) { c_uint16_t size = sizeof(nas_ue_radio_capability_information_update_needed_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, ue_radio_capability_information_update_needed, size); d_trace(25, " UE_RADIO_CAPABILITY_INFORMATION_UPDATE_NEEDED - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.36 UE security capability * M LV 3-6 */ c_int16_t nas_decode_ue_security_capability(nas_ue_security_capability_t *ue_security_capability, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_ue_security_capability_t *source = pkbuf->payload; ue_security_capability->length = source->length; size = ue_security_capability->length + sizeof(ue_security_capability->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(ue_security_capability, pkbuf->payload - size, size); d_trace(25, " UE_SECURITY_CAPABILITY - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_ue_security_capability(pkbuf_t *pkbuf, nas_ue_security_capability_t *ue_security_capability) { c_uint16_t size = ue_security_capability->length + sizeof(ue_security_capability->length); nas_ue_security_capability_t target; memcpy(&target, ue_security_capability, sizeof(nas_ue_security_capability_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " UE_SECURITY_CAPABILITY - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.37 Emergency number list * O TLV 5-50 */ c_int16_t nas_decode_emergency_number_list(nas_emergency_number_list_t *emergency_number_list, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_emergency_number_list_t *source = pkbuf->payload; emergency_number_list->length = source->length; size = emergency_number_list->length + sizeof(emergency_number_list->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(emergency_number_list, pkbuf->payload - size, size); d_trace(25, " EMERGENCY_NUMBER_LIST - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_emergency_number_list(pkbuf_t *pkbuf, nas_emergency_number_list_t *emergency_number_list) { c_uint16_t size = emergency_number_list->length + sizeof(emergency_number_list->length); nas_emergency_number_list_t target; memcpy(&target, emergency_number_list, sizeof(nas_emergency_number_list_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " EMERGENCY_NUMBER_LIST - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.38 CLI * O TLV 3-14 */ c_int16_t nas_decode_cli(nas_cli_t *cli, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_cli_t *source = pkbuf->payload; cli->length = source->length; size = cli->length + sizeof(cli->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(cli, pkbuf->payload - size, size); d_trace(25, " CLI - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_cli(pkbuf_t *pkbuf, nas_cli_t *cli) { c_uint16_t size = cli->length + sizeof(cli->length); nas_cli_t target; memcpy(&target, cli, sizeof(nas_cli_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " CLI - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.39 SS Code * O TV 2 */ c_int16_t nas_decode_ss_code(nas_ss_code_t *ss_code, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_ss_code_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(ss_code, pkbuf->payload - size, size); d_trace(25, " SS_CODE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_ss_code(pkbuf_t *pkbuf, nas_ss_code_t *ss_code) { c_uint16_t size = sizeof(nas_ss_code_t); nas_ss_code_t target; memcpy(&target, ss_code, size); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " SS_CODE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.4 Authentication response parameter * M LV 5-17 */ c_int16_t nas_decode_authentication_response_parameter(nas_authentication_response_parameter_t *authentication_response_parameter, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_authentication_response_parameter_t *source = pkbuf->payload; authentication_response_parameter->length = source->length; size = authentication_response_parameter->length + sizeof(authentication_response_parameter->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(authentication_response_parameter, pkbuf->payload - size, size); d_trace(25, " AUTHENTICATION_RESPONSE_PARAMETER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_authentication_response_parameter(pkbuf_t *pkbuf, nas_authentication_response_parameter_t *authentication_response_parameter) { c_uint16_t size = authentication_response_parameter->length + sizeof(authentication_response_parameter->length); nas_authentication_response_parameter_t target; memcpy(&target, authentication_response_parameter, sizeof(nas_authentication_response_parameter_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " AUTHENTICATION_RESPONSE_PARAMETER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.40 LCS indicator * O TV 2 */ c_int16_t nas_decode_lcs_indicator(nas_lcs_indicator_t *lcs_indicator, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_lcs_indicator_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(lcs_indicator, pkbuf->payload - size, size); d_trace(25, " LCS_INDICATOR - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_lcs_indicator(pkbuf_t *pkbuf, nas_lcs_indicator_t *lcs_indicator) { c_uint16_t size = sizeof(nas_lcs_indicator_t); nas_lcs_indicator_t target; memcpy(&target, lcs_indicator, size); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " LCS_INDICATOR - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.41 LCS client identity * O TLV 3-257 */ c_int16_t nas_decode_lcs_client_identity(nas_lcs_client_identity_t *lcs_client_identity, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_lcs_client_identity_t *source = pkbuf->payload; lcs_client_identity->length = source->length; size = lcs_client_identity->length + sizeof(lcs_client_identity->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(lcs_client_identity, pkbuf->payload - size, size); d_trace(25, " LCS_CLIENT_IDENTITY - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_lcs_client_identity(pkbuf_t *pkbuf, nas_lcs_client_identity_t *lcs_client_identity) { c_uint16_t size = lcs_client_identity->length + sizeof(lcs_client_identity->length); nas_lcs_client_identity_t target; memcpy(&target, lcs_client_identity, sizeof(nas_lcs_client_identity_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " LCS_CLIENT_IDENTITY - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.42 Generic message container type * M V 1 */ c_int16_t nas_decode_generic_message_container_type(nas_generic_message_container_type_t *generic_message_container_type, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_generic_message_container_type_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(generic_message_container_type, pkbuf->payload - size, size); d_trace(25, " GENERIC_MESSAGE_CONTAINER_TYPE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_generic_message_container_type(pkbuf_t *pkbuf, nas_generic_message_container_type_t *generic_message_container_type) { c_uint16_t size = sizeof(nas_generic_message_container_type_t); nas_generic_message_container_type_t target; memcpy(&target, generic_message_container_type, size); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " GENERIC_MESSAGE_CONTAINER_TYPE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.43 Generic message container * M LV-E 3-n */ c_int16_t nas_decode_generic_message_container(nas_generic_message_container_t *generic_message_container, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_generic_message_container_t *source = pkbuf->payload; generic_message_container->length = ntohs(source->length); size = generic_message_container->length + sizeof(generic_message_container->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); generic_message_container->buffer = pkbuf->payload - size + sizeof(generic_message_container->length); d_trace(25, " GENERIC_MESSAGE_CONTAINER - "); d_trace_hex(25, generic_message_container->buffer, generic_message_container->length); return size; } c_int16_t nas_encode_generic_message_container(pkbuf_t *pkbuf, nas_generic_message_container_t *generic_message_container) { c_uint16_t size = 0; c_uint16_t target; d_assert(generic_message_container, return -1, "Null param"); d_assert(generic_message_container->buffer, return -1, "Null param"); size = sizeof(generic_message_container->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); target = htons(generic_message_container->length); memcpy(pkbuf->payload - size, &target, size); size = generic_message_container->length; d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, generic_message_container->buffer, size); d_trace(25, " GENERIC_MESSAGE_CONTAINER - "); d_trace_hex(25, pkbuf->payload - size, size); return generic_message_container->length + sizeof(generic_message_container->length); } /* 9.9.3.44 Voice domain preference and UE usage setting * O TLV 3 */ c_int16_t nas_decode_voice_domain_preference_and_ue_usage_setting(nas_voice_domain_preference_and_ue_usage_setting_t *voice_domain_preference_and_ue_usage_setting, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_voice_domain_preference_and_ue_usage_setting_t *source = pkbuf->payload; voice_domain_preference_and_ue_usage_setting->length = source->length; size = voice_domain_preference_and_ue_usage_setting->length + sizeof(voice_domain_preference_and_ue_usage_setting->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(voice_domain_preference_and_ue_usage_setting, pkbuf->payload - size, size); d_trace(25, " VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_voice_domain_preference_and_ue_usage_setting(pkbuf_t *pkbuf, nas_voice_domain_preference_and_ue_usage_setting_t *voice_domain_preference_and_ue_usage_setting) { c_uint16_t size = voice_domain_preference_and_ue_usage_setting->length + sizeof(voice_domain_preference_and_ue_usage_setting->length); nas_voice_domain_preference_and_ue_usage_setting_t target; memcpy(&target, voice_domain_preference_and_ue_usage_setting, sizeof(nas_voice_domain_preference_and_ue_usage_setting_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.45 GUTI type * O TV 1 */ c_int16_t nas_decode_guti_type(nas_guti_type_t *guti_type, pkbuf_t *pkbuf) { memcpy(guti_type, pkbuf->payload - 1, 1); d_trace(25, " GUTI_TYPE - "); d_trace_hex(25, pkbuf->payload - 1, 1); return 0; } c_int16_t nas_encode_guti_type(pkbuf_t *pkbuf, nas_guti_type_t *guti_type) { c_uint16_t size = sizeof(nas_guti_type_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, guti_type, size); d_trace(25, " GUTI_TYPE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.46 Extended DRX parameters * O TLV 3 */ c_int16_t nas_decode_extended_drx_parameters(nas_extended_drx_parameters_t *extended_drx_parameters, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_extended_drx_parameters_t *source = pkbuf->payload; extended_drx_parameters->length = source->length; size = extended_drx_parameters->length + sizeof(extended_drx_parameters->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(extended_drx_parameters, pkbuf->payload - size, size); d_trace(25, " EXTENDED_DRX_PARAMETERS - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_extended_drx_parameters(pkbuf_t *pkbuf, nas_extended_drx_parameters_t *extended_drx_parameters) { c_uint16_t size = extended_drx_parameters->length + sizeof(extended_drx_parameters->length); nas_extended_drx_parameters_t target; memcpy(&target, extended_drx_parameters, sizeof(nas_extended_drx_parameters_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " EXTENDED_DRX_PARAMETERS - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.4a Ciphering key sequence number * O TV 1 */ c_int16_t nas_decode_ciphering_key_sequence_number(nas_ciphering_key_sequence_number_t *ciphering_key_sequence_number, pkbuf_t *pkbuf) { memcpy(ciphering_key_sequence_number, pkbuf->payload - 1, 1); d_trace(25, " CIPHERING_KEY_SEQUENCE_NUMBER - "); d_trace_hex(25, pkbuf->payload - 1, 1); return 0; } c_int16_t nas_encode_ciphering_key_sequence_number(pkbuf_t *pkbuf, nas_ciphering_key_sequence_number_t *ciphering_key_sequence_number) { c_uint16_t size = sizeof(nas_ciphering_key_sequence_number_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, ciphering_key_sequence_number, size); d_trace(25, " CIPHERING_KEY_SEQUENCE_NUMBER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.5 CSFB response * O TV 1 */ c_int16_t nas_decode_csfb_response(nas_csfb_response_t *csfb_response, pkbuf_t *pkbuf) { memcpy(csfb_response, pkbuf->payload - 1, 1); d_trace(25, " CSFB_RESPONSE - "); d_trace_hex(25, pkbuf->payload - 1, 1); return 0; } c_int16_t nas_encode_csfb_response(pkbuf_t *pkbuf, nas_csfb_response_t *csfb_response) { c_uint16_t size = sizeof(nas_csfb_response_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, csfb_response, size); d_trace(25, " CSFB_RESPONSE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.6 Daylight saving time * O TLV 3 */ c_int16_t nas_decode_daylight_saving_time(nas_daylight_saving_time_t *daylight_saving_time, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_daylight_saving_time_t *source = pkbuf->payload; daylight_saving_time->length = source->length; size = daylight_saving_time->length + sizeof(daylight_saving_time->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(daylight_saving_time, pkbuf->payload - size, size); d_trace(25, " DAYLIGHT_SAVING_TIME - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_daylight_saving_time(pkbuf_t *pkbuf, nas_daylight_saving_time_t *daylight_saving_time) { c_uint16_t size = daylight_saving_time->length + sizeof(daylight_saving_time->length); nas_daylight_saving_time_t target; memcpy(&target, daylight_saving_time, sizeof(nas_daylight_saving_time_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " DAYLIGHT_SAVING_TIME - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.7 Detach type * M V 1/2 */ c_int16_t nas_decode_detach_type(nas_detach_type_t *detach_type, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_detach_type_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(detach_type, pkbuf->payload - size, size); d_trace(25, " DETACH_TYPE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_detach_type(pkbuf_t *pkbuf, nas_detach_type_t *detach_type) { c_uint16_t size = sizeof(nas_detach_type_t); nas_detach_type_t target; memcpy(&target, detach_type, size); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " DETACH_TYPE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.8 DRX parameter * O TV 3 */ c_int16_t nas_decode_drx_parameter(nas_drx_parameter_t *drx_parameter, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_drx_parameter_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(drx_parameter, pkbuf->payload - size, size); d_trace(25, " DRX_PARAMETER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_drx_parameter(pkbuf_t *pkbuf, nas_drx_parameter_t *drx_parameter) { c_uint16_t size = sizeof(nas_drx_parameter_t); nas_drx_parameter_t target; memcpy(&target, drx_parameter, size); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " DRX_PARAMETER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.3.9 EMM cause * O TV 2 */ c_int16_t nas_decode_emm_cause(nas_emm_cause_t *emm_cause, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_emm_cause_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(emm_cause, pkbuf->payload - size, size); d_trace(25, " EMM_CAUSE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_emm_cause(pkbuf_t *pkbuf, nas_emm_cause_t *emm_cause) { c_uint16_t size = sizeof(nas_emm_cause_t); nas_emm_cause_t target; memcpy(&target, emm_cause, size); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " EMM_CAUSE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.1 Access point name * M LV 2-101 */ c_int16_t nas_decode_access_point_name(nas_access_point_name_t *access_point_name, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_access_point_name_t *source = pkbuf->payload; access_point_name->length = source->length; size = access_point_name->length + sizeof(access_point_name->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(access_point_name, pkbuf->payload - size, size); { c_int8_t apn[MAX_APN_LEN]; access_point_name->length = apn_parse(apn, access_point_name->apn, access_point_name->length); core_cpystrn(access_point_name->apn, apn, c_min(access_point_name->length, MAX_APN_LEN) + 1); } d_trace(25, " ACCESS_POINT_NAME - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_access_point_name(pkbuf_t *pkbuf, nas_access_point_name_t *access_point_name) { c_uint16_t size = access_point_name->length + sizeof(access_point_name->length); nas_access_point_name_t target; memcpy(&target, access_point_name, sizeof(nas_access_point_name_t)); target.length = apn_build(target.apn, access_point_name->apn, access_point_name->length); size = target.length + sizeof(target.length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " ACCESS_POINT_NAME - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.11 Protocol configuration options * O TLV 3-253 */ c_int16_t nas_decode_protocol_configuration_options(nas_protocol_configuration_options_t *protocol_configuration_options, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_protocol_configuration_options_t *source = pkbuf->payload; protocol_configuration_options->length = source->length; size = protocol_configuration_options->length + sizeof(protocol_configuration_options->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(protocol_configuration_options, pkbuf->payload - size, size); d_trace(25, " PROTOCOL_CONFIGURATION_OPTIONS - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_protocol_configuration_options(pkbuf_t *pkbuf, nas_protocol_configuration_options_t *protocol_configuration_options) { c_uint16_t size = protocol_configuration_options->length + sizeof(protocol_configuration_options->length); nas_protocol_configuration_options_t target; memcpy(&target, protocol_configuration_options, sizeof(nas_protocol_configuration_options_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " PROTOCOL_CONFIGURATION_OPTIONS - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.12 Quality of service * O TLV 14-22 */ c_int16_t nas_decode_quality_of_service(nas_quality_of_service_t *quality_of_service, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_quality_of_service_t *source = pkbuf->payload; quality_of_service->length = source->length; size = quality_of_service->length + sizeof(quality_of_service->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(quality_of_service, pkbuf->payload - size, size); d_trace(25, " QUALITY_OF_SERVICE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_quality_of_service(pkbuf_t *pkbuf, nas_quality_of_service_t *quality_of_service) { c_uint16_t size = quality_of_service->length + sizeof(quality_of_service->length); nas_quality_of_service_t target; memcpy(&target, quality_of_service, sizeof(nas_quality_of_service_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " QUALITY_OF_SERVICE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.13 Radio priority * O TV 1 */ c_int16_t nas_decode_radio_priority(nas_radio_priority_t *radio_priority, pkbuf_t *pkbuf) { memcpy(radio_priority, pkbuf->payload - 1, 1); d_trace(25, " RADIO_PRIORITY - "); d_trace_hex(25, pkbuf->payload - 1, 1); return 0; } c_int16_t nas_encode_radio_priority(pkbuf_t *pkbuf, nas_radio_priority_t *radio_priority) { c_uint16_t size = sizeof(nas_radio_priority_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, radio_priority, size); d_trace(25, " RADIO_PRIORITY - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.13A Re-attempt indicator * O TLV 3 */ c_int16_t nas_decode_re_attempt_indicator(nas_re_attempt_indicator_t *re_attempt_indicator, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_re_attempt_indicator_t *source = pkbuf->payload; re_attempt_indicator->length = source->length; size = re_attempt_indicator->length + sizeof(re_attempt_indicator->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(re_attempt_indicator, pkbuf->payload - size, size); d_trace(25, " RE_ATTEMPT_INDICATOR - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_re_attempt_indicator(pkbuf_t *pkbuf, nas_re_attempt_indicator_t *re_attempt_indicator) { c_uint16_t size = re_attempt_indicator->length + sizeof(re_attempt_indicator->length); nas_re_attempt_indicator_t target; memcpy(&target, re_attempt_indicator, sizeof(nas_re_attempt_indicator_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " RE_ATTEMPT_INDICATOR - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.14 Request type * M V 1/2 */ c_int16_t nas_decode_request_type(nas_request_type_t *request_type, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_request_type_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(request_type, pkbuf->payload - size, size); d_trace(25, " REQUEST_TYPE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_request_type(pkbuf_t *pkbuf, nas_request_type_t *request_type) { c_uint16_t size = sizeof(nas_request_type_t); nas_request_type_t target; memcpy(&target, request_type, size); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " REQUEST_TYPE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.15 Traffic flow aggregate description * M LV 2-256 */ c_int16_t nas_decode_traffic_flow_aggregate_description(nas_traffic_flow_aggregate_description_t *traffic_flow_aggregate_description, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_traffic_flow_aggregate_description_t *source = pkbuf->payload; traffic_flow_aggregate_description->length = source->length; size = traffic_flow_aggregate_description->length + sizeof(traffic_flow_aggregate_description->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(traffic_flow_aggregate_description, pkbuf->payload - size, size); d_trace(25, " TRAFFIC_FLOW_AGGREGATE_DESCRIPTION - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_traffic_flow_aggregate_description(pkbuf_t *pkbuf, nas_traffic_flow_aggregate_description_t *traffic_flow_aggregate_description) { c_uint16_t size = traffic_flow_aggregate_description->length + sizeof(traffic_flow_aggregate_description->length); nas_traffic_flow_aggregate_description_t target; memcpy(&target, traffic_flow_aggregate_description, sizeof(nas_traffic_flow_aggregate_description_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " TRAFFIC_FLOW_AGGREGATE_DESCRIPTION - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.16 Traffic flow template * M LV 2-256 */ c_int16_t nas_decode_traffic_flow_template(nas_traffic_flow_template_t *traffic_flow_template, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_traffic_flow_template_t *source = pkbuf->payload; traffic_flow_template->length = source->length; size = traffic_flow_template->length + sizeof(traffic_flow_template->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(traffic_flow_template, pkbuf->payload - size, size); d_trace(25, " TRAFFIC_FLOW_TEMPLATE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_traffic_flow_template(pkbuf_t *pkbuf, nas_traffic_flow_template_t *traffic_flow_template) { c_uint16_t size = traffic_flow_template->length + sizeof(traffic_flow_template->length); nas_traffic_flow_template_t target; memcpy(&target, traffic_flow_template, sizeof(nas_traffic_flow_template_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " TRAFFIC_FLOW_TEMPLATE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.17 Transaction identifier * O TLV 3-4 */ c_int16_t nas_decode_transaction_identifier(nas_transaction_identifier_t *transaction_identifier, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_transaction_identifier_t *source = pkbuf->payload; transaction_identifier->length = source->length; size = transaction_identifier->length + sizeof(transaction_identifier->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(transaction_identifier, pkbuf->payload - size, size); d_trace(25, " TRANSACTION_IDENTIFIER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_transaction_identifier(pkbuf_t *pkbuf, nas_transaction_identifier_t *transaction_identifier) { c_uint16_t size = transaction_identifier->length + sizeof(transaction_identifier->length); nas_transaction_identifier_t target; memcpy(&target, transaction_identifier, sizeof(nas_transaction_identifier_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " TRANSACTION_IDENTIFIER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.18 WLAN offload acceptability * O TV 1 */ c_int16_t nas_decode_wlan_offload_acceptability(nas_wlan_offload_acceptability_t *wlan_offload_acceptability, pkbuf_t *pkbuf) { memcpy(wlan_offload_acceptability, pkbuf->payload - 1, 1); d_trace(25, " WLAN_OFFLOAD_ACCEPTABILITY - "); d_trace_hex(25, pkbuf->payload - 1, 1); return 0; } c_int16_t nas_encode_wlan_offload_acceptability(pkbuf_t *pkbuf, nas_wlan_offload_acceptability_t *wlan_offload_acceptability) { c_uint16_t size = sizeof(nas_wlan_offload_acceptability_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, wlan_offload_acceptability, size); d_trace(25, " WLAN_OFFLOAD_ACCEPTABILITY - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.19 NBIFOM container * O TLV 3-257 */ c_int16_t nas_decode_nbifom_container(nas_nbifom_container_t *nbifom_container, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_nbifom_container_t *source = pkbuf->payload; nbifom_container->length = source->length; size = nbifom_container->length + sizeof(nbifom_container->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(nbifom_container, pkbuf->payload - size, size); d_trace(25, " NBIFOM_CONTAINER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_nbifom_container(pkbuf_t *pkbuf, nas_nbifom_container_t *nbifom_container) { c_uint16_t size = nbifom_container->length + sizeof(nbifom_container->length); nas_nbifom_container_t target; memcpy(&target, nbifom_container, sizeof(nas_nbifom_container_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " NBIFOM_CONTAINER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.2 APN aggregate maximum bit rate * O TLV 4-8 */ c_int16_t nas_decode_apn_aggregate_maximum_bit_rate(nas_apn_aggregate_maximum_bit_rate_t *apn_aggregate_maximum_bit_rate, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_apn_aggregate_maximum_bit_rate_t *source = pkbuf->payload; apn_aggregate_maximum_bit_rate->length = source->length; size = apn_aggregate_maximum_bit_rate->length + sizeof(apn_aggregate_maximum_bit_rate->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(apn_aggregate_maximum_bit_rate, pkbuf->payload - size, size); d_trace(25, " APN_AGGREGATE_MAXIMUM_BIT_RATE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_apn_aggregate_maximum_bit_rate(pkbuf_t *pkbuf, nas_apn_aggregate_maximum_bit_rate_t *apn_aggregate_maximum_bit_rate) { c_uint16_t size = apn_aggregate_maximum_bit_rate->length + sizeof(apn_aggregate_maximum_bit_rate->length); nas_apn_aggregate_maximum_bit_rate_t target; memcpy(&target, apn_aggregate_maximum_bit_rate, sizeof(nas_apn_aggregate_maximum_bit_rate_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " APN_AGGREGATE_MAXIMUM_BIT_RATE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.22 Header compression configuration * O TLV 5-257 */ c_int16_t nas_decode_header_compression_configuration(nas_header_compression_configuration_t *header_compression_configuration, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_header_compression_configuration_t *source = pkbuf->payload; header_compression_configuration->length = source->length; size = header_compression_configuration->length + sizeof(header_compression_configuration->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(header_compression_configuration, pkbuf->payload - size, size); header_compression_configuration->max_cid = ntohs(header_compression_configuration->max_cid); d_trace(25, " HEADER_COMPRESSION_CONFIGURATION - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_header_compression_configuration(pkbuf_t *pkbuf, nas_header_compression_configuration_t *header_compression_configuration) { c_uint16_t size = header_compression_configuration->length + sizeof(header_compression_configuration->length); nas_header_compression_configuration_t target; memcpy(&target, header_compression_configuration, sizeof(nas_header_compression_configuration_t)); target.max_cid = htons(header_compression_configuration->max_cid); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " HEADER_COMPRESSION_CONFIGURATION - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.23 Control plane only indication * O TV 1 */ c_int16_t nas_decode_control_plane_only_indication(nas_control_plane_only_indication_t *control_plane_only_indication, pkbuf_t *pkbuf) { memcpy(control_plane_only_indication, pkbuf->payload - 1, 1); d_trace(25, " CONTROL_PLANE_ONLY_INDICATION - "); d_trace_hex(25, pkbuf->payload - 1, 1); return 0; } c_int16_t nas_encode_control_plane_only_indication(pkbuf_t *pkbuf, nas_control_plane_only_indication_t *control_plane_only_indication) { c_uint16_t size = sizeof(nas_control_plane_only_indication_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, control_plane_only_indication, size); d_trace(25, " CONTROL_PLANE_ONLY_INDICATION - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.26 Extended protocol configuration options * O TLV-E 4-65538 */ c_int16_t nas_decode_extended_protocol_configuration_options(nas_extended_protocol_configuration_options_t *extended_protocol_configuration_options, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_extended_protocol_configuration_options_t *source = pkbuf->payload; extended_protocol_configuration_options->length = ntohs(source->length); size = extended_protocol_configuration_options->length + sizeof(extended_protocol_configuration_options->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); extended_protocol_configuration_options->buffer = pkbuf->payload - size + sizeof(extended_protocol_configuration_options->length); d_trace(25, " EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS - "); d_trace_hex(25, extended_protocol_configuration_options->buffer, extended_protocol_configuration_options->length); return size; } c_int16_t nas_encode_extended_protocol_configuration_options(pkbuf_t *pkbuf, nas_extended_protocol_configuration_options_t *extended_protocol_configuration_options) { c_uint16_t size = 0; c_uint16_t target; d_assert(extended_protocol_configuration_options, return -1, "Null param"); d_assert(extended_protocol_configuration_options->buffer, return -1, "Null param"); size = sizeof(extended_protocol_configuration_options->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); target = htons(extended_protocol_configuration_options->length); memcpy(pkbuf->payload - size, &target, size); size = extended_protocol_configuration_options->length; d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, extended_protocol_configuration_options->buffer, size); d_trace(25, " EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS - "); d_trace_hex(25, pkbuf->payload - size, size); return extended_protocol_configuration_options->length + sizeof(extended_protocol_configuration_options->length); } /* 9.9.4.27 Header compression configuration status * O TLV 4 */ c_int16_t nas_decode_header_compression_configuration_status(nas_header_compression_configuration_status_t *header_compression_configuration_status, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_header_compression_configuration_status_t *source = pkbuf->payload; header_compression_configuration_status->length = source->length; size = header_compression_configuration_status->length + sizeof(header_compression_configuration_status->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(header_compression_configuration_status, pkbuf->payload - size, size); d_trace(25, " HEADER_COMPRESSION_CONFIGURATION_STATUS - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_header_compression_configuration_status(pkbuf_t *pkbuf, nas_header_compression_configuration_status_t *header_compression_configuration_status) { c_uint16_t size = header_compression_configuration_status->length + sizeof(header_compression_configuration_status->length); nas_header_compression_configuration_status_t target; memcpy(&target, header_compression_configuration_status, sizeof(nas_header_compression_configuration_status_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " HEADER_COMPRESSION_CONFIGURATION_STATUS - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.28 Serving PLMN rate control * O TLV 4 */ c_int16_t nas_decode_serving_plmn_rate_control(nas_serving_plmn_rate_control_t *serving_plmn_rate_control, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_serving_plmn_rate_control_t *source = pkbuf->payload; serving_plmn_rate_control->length = source->length; size = serving_plmn_rate_control->length + sizeof(serving_plmn_rate_control->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(serving_plmn_rate_control, pkbuf->payload - size, size); d_trace(25, " SERVING_PLMN_RATE_CONTROL - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_serving_plmn_rate_control(pkbuf_t *pkbuf, nas_serving_plmn_rate_control_t *serving_plmn_rate_control) { c_uint16_t size = serving_plmn_rate_control->length + sizeof(serving_plmn_rate_control->length); nas_serving_plmn_rate_control_t target; memcpy(&target, serving_plmn_rate_control, sizeof(nas_serving_plmn_rate_control_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " SERVING_PLMN_RATE_CONTROL - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.2A Connectivity type * O TV 1 */ c_int16_t nas_decode_connectivity_type(nas_connectivity_type_t *connectivity_type, pkbuf_t *pkbuf) { memcpy(connectivity_type, pkbuf->payload - 1, 1); d_trace(25, " CONNECTIVITY_TYPE - "); d_trace_hex(25, pkbuf->payload - 1, 1); return 0; } c_int16_t nas_encode_connectivity_type(pkbuf_t *pkbuf, nas_connectivity_type_t *connectivity_type) { c_uint16_t size = sizeof(nas_connectivity_type_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, connectivity_type, size); d_trace(25, " CONNECTIVITY_TYPE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.3 EPS quality of service * M LV 2-14 */ c_int16_t nas_decode_eps_quality_of_service(nas_eps_quality_of_service_t *eps_quality_of_service, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_eps_quality_of_service_t *source = pkbuf->payload; eps_quality_of_service->length = source->length; size = eps_quality_of_service->length + sizeof(eps_quality_of_service->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(eps_quality_of_service, pkbuf->payload - size, size); d_trace(25, " EPS_QUALITY_OF_SERVICE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_eps_quality_of_service(pkbuf_t *pkbuf, nas_eps_quality_of_service_t *eps_quality_of_service) { c_uint16_t size = eps_quality_of_service->length + sizeof(eps_quality_of_service->length); nas_eps_quality_of_service_t target; memcpy(&target, eps_quality_of_service, sizeof(nas_eps_quality_of_service_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " EPS_QUALITY_OF_SERVICE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.4 ESM cause * O TV 2 */ c_int16_t nas_decode_esm_cause(nas_esm_cause_t *esm_cause, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_esm_cause_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(esm_cause, pkbuf->payload - size, size); d_trace(25, " ESM_CAUSE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_esm_cause(pkbuf_t *pkbuf, nas_esm_cause_t *esm_cause) { c_uint16_t size = sizeof(nas_esm_cause_t); nas_esm_cause_t target; memcpy(&target, esm_cause, size); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " ESM_CAUSE - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.5 ESM information transfer flag * O TV 1 */ c_int16_t nas_decode_esm_information_transfer_flag(nas_esm_information_transfer_flag_t *esm_information_transfer_flag, pkbuf_t *pkbuf) { memcpy(esm_information_transfer_flag, pkbuf->payload - 1, 1); d_trace(25, " ESM_INFORMATION_TRANSFER_FLAG - "); d_trace_hex(25, pkbuf->payload - 1, 1); return 0; } c_int16_t nas_encode_esm_information_transfer_flag(pkbuf_t *pkbuf, nas_esm_information_transfer_flag_t *esm_information_transfer_flag) { c_uint16_t size = sizeof(nas_esm_information_transfer_flag_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, esm_information_transfer_flag, size); d_trace(25, " ESM_INFORMATION_TRANSFER_FLAG - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.6 Linked EPS bearer identity * M V 1/2 */ c_int16_t nas_decode_linked_eps_bearer_identity(nas_linked_eps_bearer_identity_t *linked_eps_bearer_identity, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_linked_eps_bearer_identity_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(linked_eps_bearer_identity, pkbuf->payload - size, size); d_trace(25, " LINKED_EPS_BEARER_IDENTITY - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_linked_eps_bearer_identity(pkbuf_t *pkbuf, nas_linked_eps_bearer_identity_t *linked_eps_bearer_identity) { c_uint16_t size = sizeof(nas_linked_eps_bearer_identity_t); nas_linked_eps_bearer_identity_t target; memcpy(&target, linked_eps_bearer_identity, size); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " LINKED_EPS_BEARER_IDENTITY - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.7 LLC service access point identifier * O TV 2 */ c_int16_t nas_decode_llc_service_access_point_identifier(nas_llc_service_access_point_identifier_t *llc_service_access_point_identifier, pkbuf_t *pkbuf) { c_uint16_t size = sizeof(nas_llc_service_access_point_identifier_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(llc_service_access_point_identifier, pkbuf->payload - size, size); d_trace(25, " LLC_SERVICE_ACCESS_POINT_IDENTIFIER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_llc_service_access_point_identifier(pkbuf_t *pkbuf, nas_llc_service_access_point_identifier_t *llc_service_access_point_identifier) { c_uint16_t size = sizeof(nas_llc_service_access_point_identifier_t); nas_llc_service_access_point_identifier_t target; memcpy(&target, llc_service_access_point_identifier, size); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " LLC_SERVICE_ACCESS_POINT_IDENTIFIER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.8 Packet flow Identifier * O TLV 3 */ c_int16_t nas_decode_packet_flow_identifier(nas_packet_flow_identifier_t *packet_flow_identifier, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_packet_flow_identifier_t *source = pkbuf->payload; packet_flow_identifier->length = source->length; size = packet_flow_identifier->length + sizeof(packet_flow_identifier->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(packet_flow_identifier, pkbuf->payload - size, size); d_trace(25, " PACKET_FLOW_IDENTIFIER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_packet_flow_identifier(pkbuf_t *pkbuf, nas_packet_flow_identifier_t *packet_flow_identifier) { c_uint16_t size = packet_flow_identifier->length + sizeof(packet_flow_identifier->length); nas_packet_flow_identifier_t target; memcpy(&target, packet_flow_identifier, sizeof(nas_packet_flow_identifier_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " PACKET_FLOW_IDENTIFIER - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } /* 9.9.4.9 PDN address * M LV 6-14 */ c_int16_t nas_decode_pdn_address(nas_pdn_address_t *pdn_address, pkbuf_t *pkbuf) { c_uint16_t size = 0; nas_pdn_address_t *source = pkbuf->payload; pdn_address->length = source->length; size = pdn_address->length + sizeof(pdn_address->length); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pdn_address, pkbuf->payload - size, size); d_trace(25, " PDN_ADDRESS - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } c_int16_t nas_encode_pdn_address(pkbuf_t *pkbuf, nas_pdn_address_t *pdn_address) { c_uint16_t size = pdn_address->length + sizeof(pdn_address->length); nas_pdn_address_t target; memcpy(&target, pdn_address, sizeof(nas_pdn_address_t)); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &target, size); d_trace(25, " PDN_ADDRESS - "); d_trace_hex(25, pkbuf->payload - size, size); return size; } nextepc-0.3.10/lib/nas/nas_ies.h000066400000000000000000000577241333553357400164140ustar00rootroot00000000000000/* * Copyright (c) 2017, NextEPC Group * 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. */ /******************************************************************************* * This file had been created by gtpv2c_tlv.py script v0.1.0 * Please do not modify this file but regenerate it via script. * Created on: 2018-01-23 15:58:42.823738 by acetcom * from 24301-d80.docx ******************************************************************************/ #ifndef __NAS_IES_H__ #define __NAS_IES_H__ #include "core_pkbuf.h" #include "nas_types.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(c_int16_t) nas_encode_optional_type(pkbuf_t *pkbuf, c_uint8_t type); CORE_DECLARE(c_int16_t) nas_decode_additional_information(nas_additional_information_t *additional_information, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_device_properties(nas_device_properties_t *device_properties, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_eps_bearer_context_status(nas_eps_bearer_context_status_t *eps_bearer_context_status, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_supported_codec_list(nas_supported_codec_list_t *supported_codec_list, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_location_area_identification(nas_location_area_identification_t *location_area_identification, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_mobile_identity(nas_mobile_identity_t *mobile_identity, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_mobile_station_classmark_2(nas_mobile_station_classmark_2_t *mobile_station_classmark_2, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_mobile_station_classmark_3(nas_mobile_station_classmark_3_t *mobile_station_classmark_3, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_plmn_list(nas_plmn_list_t *plmn_list, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_additional_update_result(nas_additional_update_result_t *additional_update_result, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_additional_update_type(nas_additional_update_type_t *additional_update_type, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_authentication_failure_parameter(nas_authentication_failure_parameter_t *authentication_failure_parameter, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_eps_attach_result(nas_eps_attach_result_t *eps_attach_result, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_eps_attach_type(nas_eps_attach_type_t *eps_attach_type, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_eps_mobile_identity(nas_eps_mobile_identity_t *eps_mobile_identity, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_eps_network_feature_support(nas_eps_network_feature_support_t *eps_network_feature_support, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_eps_update_result(nas_eps_update_result_t *eps_update_result, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_eps_update_type(nas_eps_update_type_t *eps_update_type, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_esm_message_container(nas_esm_message_container_t *esm_message_container, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_gprs_timer(nas_gprs_timer_t *gprs_timer, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_gprs_timer_2(nas_gprs_timer_2_t *gprs_timer_2, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_gprs_timer_3(nas_gprs_timer_3_t *gprs_timer_3, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_identity_type_2(nas_identity_type_2_t *identity_type_2, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_imeisv_request(nas_imeisv_request_t *imeisv_request, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_ksi_and_sequence_number(nas_ksi_and_sequence_number_t *ksi_and_sequence_number, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_authentication_parameter_autn(nas_authentication_parameter_autn_t *authentication_parameter_autn, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_ms_network_capability(nas_ms_network_capability_t *ms_network_capability, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_ms_network_feature_support(nas_ms_network_feature_support_t *ms_network_feature_support, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_key_set_identifier(nas_key_set_identifier_t *key_set_identifier, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_message_container(nas_message_container_t *message_container, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_security_algorithms(nas_security_algorithms_t *security_algorithms, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_network_name(nas_network_name_t *network_name, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_network_resource_identifier_container(nas_network_resource_identifier_container_t *network_resource_identifier_container, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_nonce(nas_nonce_t *nonce, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_paging_identity(nas_paging_identity_t *paging_identity, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_p_tmsi_signature(nas_p_tmsi_signature_t *p_tmsi_signature, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_extended_emm_cause(nas_extended_emm_cause_t *extended_emm_cause, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_service_type(nas_service_type_t *service_type, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_short_mac(nas_short_mac_t *short_mac, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_time_zone(nas_time_zone_t *time_zone, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_authentication_parameter_rand(nas_authentication_parameter_rand_t *authentication_parameter_rand, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_time_zone_and_time(nas_time_zone_and_time_t *time_zone_and_time, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_tmsi_status(nas_tmsi_status_t *tmsi_status, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_tracking_area_identity(nas_tracking_area_identity_t *tracking_area_identity, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_tracking_area_identity_list(nas_tracking_area_identity_list_t *tracking_area_identity_list, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_ue_network_capability(nas_ue_network_capability_t *ue_network_capability, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_ue_radio_capability_information_update_needed(nas_ue_radio_capability_information_update_needed_t *ue_radio_capability_information_update_needed, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_ue_security_capability(nas_ue_security_capability_t *ue_security_capability, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_emergency_number_list(nas_emergency_number_list_t *emergency_number_list, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_cli(nas_cli_t *cli, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_ss_code(nas_ss_code_t *ss_code, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_authentication_response_parameter(nas_authentication_response_parameter_t *authentication_response_parameter, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_lcs_indicator(nas_lcs_indicator_t *lcs_indicator, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_lcs_client_identity(nas_lcs_client_identity_t *lcs_client_identity, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_generic_message_container_type(nas_generic_message_container_type_t *generic_message_container_type, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_generic_message_container(nas_generic_message_container_t *generic_message_container, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_voice_domain_preference_and_ue_usage_setting(nas_voice_domain_preference_and_ue_usage_setting_t *voice_domain_preference_and_ue_usage_setting, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_guti_type(nas_guti_type_t *guti_type, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_extended_drx_parameters(nas_extended_drx_parameters_t *extended_drx_parameters, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_ciphering_key_sequence_number(nas_ciphering_key_sequence_number_t *ciphering_key_sequence_number, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_csfb_response(nas_csfb_response_t *csfb_response, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_daylight_saving_time(nas_daylight_saving_time_t *daylight_saving_time, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_detach_type(nas_detach_type_t *detach_type, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_drx_parameter(nas_drx_parameter_t *drx_parameter, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_emm_cause(nas_emm_cause_t *emm_cause, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_access_point_name(nas_access_point_name_t *access_point_name, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_protocol_configuration_options(nas_protocol_configuration_options_t *protocol_configuration_options, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_quality_of_service(nas_quality_of_service_t *quality_of_service, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_radio_priority(nas_radio_priority_t *radio_priority, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_re_attempt_indicator(nas_re_attempt_indicator_t *re_attempt_indicator, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_request_type(nas_request_type_t *request_type, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_traffic_flow_aggregate_description(nas_traffic_flow_aggregate_description_t *traffic_flow_aggregate_description, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_traffic_flow_template(nas_traffic_flow_template_t *traffic_flow_template, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_transaction_identifier(nas_transaction_identifier_t *transaction_identifier, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_wlan_offload_acceptability(nas_wlan_offload_acceptability_t *wlan_offload_acceptability, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_nbifom_container(nas_nbifom_container_t *nbifom_container, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_apn_aggregate_maximum_bit_rate(nas_apn_aggregate_maximum_bit_rate_t *apn_aggregate_maximum_bit_rate, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_header_compression_configuration(nas_header_compression_configuration_t *header_compression_configuration, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_control_plane_only_indication(nas_control_plane_only_indication_t *control_plane_only_indication, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_extended_protocol_configuration_options(nas_extended_protocol_configuration_options_t *extended_protocol_configuration_options, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_header_compression_configuration_status(nas_header_compression_configuration_status_t *header_compression_configuration_status, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_serving_plmn_rate_control(nas_serving_plmn_rate_control_t *serving_plmn_rate_control, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_connectivity_type(nas_connectivity_type_t *connectivity_type, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_eps_quality_of_service(nas_eps_quality_of_service_t *eps_quality_of_service, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_esm_cause(nas_esm_cause_t *esm_cause, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_esm_information_transfer_flag(nas_esm_information_transfer_flag_t *esm_information_transfer_flag, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_linked_eps_bearer_identity(nas_linked_eps_bearer_identity_t *linked_eps_bearer_identity, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_llc_service_access_point_identifier(nas_llc_service_access_point_identifier_t *llc_service_access_point_identifier, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_packet_flow_identifier(nas_packet_flow_identifier_t *packet_flow_identifier, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_decode_pdn_address(nas_pdn_address_t *pdn_address, pkbuf_t *pkbuf); CORE_DECLARE(c_int16_t) nas_encode_additional_information(pkbuf_t *pkbuf, nas_additional_information_t *additional_information); CORE_DECLARE(c_int16_t) nas_encode_device_properties(pkbuf_t *pkbuf, nas_device_properties_t *device_properties); CORE_DECLARE(c_int16_t) nas_encode_eps_bearer_context_status(pkbuf_t *pkbuf, nas_eps_bearer_context_status_t *eps_bearer_context_status); CORE_DECLARE(c_int16_t) nas_encode_supported_codec_list(pkbuf_t *pkbuf, nas_supported_codec_list_t *supported_codec_list); CORE_DECLARE(c_int16_t) nas_encode_location_area_identification(pkbuf_t *pkbuf, nas_location_area_identification_t *location_area_identification); CORE_DECLARE(c_int16_t) nas_encode_mobile_identity(pkbuf_t *pkbuf, nas_mobile_identity_t *mobile_identity); CORE_DECLARE(c_int16_t) nas_encode_mobile_station_classmark_2(pkbuf_t *pkbuf, nas_mobile_station_classmark_2_t *mobile_station_classmark_2); CORE_DECLARE(c_int16_t) nas_encode_mobile_station_classmark_3(pkbuf_t *pkbuf, nas_mobile_station_classmark_3_t *mobile_station_classmark_3); CORE_DECLARE(c_int16_t) nas_encode_plmn_list(pkbuf_t *pkbuf, nas_plmn_list_t *plmn_list); CORE_DECLARE(c_int16_t) nas_encode_additional_update_result(pkbuf_t *pkbuf, nas_additional_update_result_t *additional_update_result); CORE_DECLARE(c_int16_t) nas_encode_additional_update_type(pkbuf_t *pkbuf, nas_additional_update_type_t *additional_update_type); CORE_DECLARE(c_int16_t) nas_encode_authentication_failure_parameter(pkbuf_t *pkbuf, nas_authentication_failure_parameter_t *authentication_failure_parameter); CORE_DECLARE(c_int16_t) nas_encode_eps_attach_result(pkbuf_t *pkbuf, nas_eps_attach_result_t *eps_attach_result); CORE_DECLARE(c_int16_t) nas_encode_eps_attach_type(pkbuf_t *pkbuf, nas_eps_attach_type_t *eps_attach_type); CORE_DECLARE(c_int16_t) nas_encode_eps_mobile_identity(pkbuf_t *pkbuf, nas_eps_mobile_identity_t *eps_mobile_identity); CORE_DECLARE(c_int16_t) nas_encode_eps_network_feature_support(pkbuf_t *pkbuf, nas_eps_network_feature_support_t *eps_network_feature_support); CORE_DECLARE(c_int16_t) nas_encode_eps_update_result(pkbuf_t *pkbuf, nas_eps_update_result_t *eps_update_result); CORE_DECLARE(c_int16_t) nas_encode_eps_update_type(pkbuf_t *pkbuf, nas_eps_update_type_t *eps_update_type); CORE_DECLARE(c_int16_t) nas_encode_esm_message_container(pkbuf_t *pkbuf, nas_esm_message_container_t *esm_message_container); CORE_DECLARE(c_int16_t) nas_encode_gprs_timer(pkbuf_t *pkbuf, nas_gprs_timer_t *gprs_timer); CORE_DECLARE(c_int16_t) nas_encode_gprs_timer_2(pkbuf_t *pkbuf, nas_gprs_timer_2_t *gprs_timer_2); CORE_DECLARE(c_int16_t) nas_encode_gprs_timer_3(pkbuf_t *pkbuf, nas_gprs_timer_3_t *gprs_timer_3); CORE_DECLARE(c_int16_t) nas_encode_identity_type_2(pkbuf_t *pkbuf, nas_identity_type_2_t *identity_type_2); CORE_DECLARE(c_int16_t) nas_encode_imeisv_request(pkbuf_t *pkbuf, nas_imeisv_request_t *imeisv_request); CORE_DECLARE(c_int16_t) nas_encode_ksi_and_sequence_number(pkbuf_t *pkbuf, nas_ksi_and_sequence_number_t *ksi_and_sequence_number); CORE_DECLARE(c_int16_t) nas_encode_authentication_parameter_autn(pkbuf_t *pkbuf, nas_authentication_parameter_autn_t *authentication_parameter_autn); CORE_DECLARE(c_int16_t) nas_encode_ms_network_capability(pkbuf_t *pkbuf, nas_ms_network_capability_t *ms_network_capability); CORE_DECLARE(c_int16_t) nas_encode_ms_network_feature_support(pkbuf_t *pkbuf, nas_ms_network_feature_support_t *ms_network_feature_support); CORE_DECLARE(c_int16_t) nas_encode_key_set_identifier(pkbuf_t *pkbuf, nas_key_set_identifier_t *key_set_identifier); CORE_DECLARE(c_int16_t) nas_encode_message_container(pkbuf_t *pkbuf, nas_message_container_t *message_container); CORE_DECLARE(c_int16_t) nas_encode_security_algorithms(pkbuf_t *pkbuf, nas_security_algorithms_t *security_algorithms); CORE_DECLARE(c_int16_t) nas_encode_network_name(pkbuf_t *pkbuf, nas_network_name_t *network_name); CORE_DECLARE(c_int16_t) nas_encode_network_resource_identifier_container(pkbuf_t *pkbuf, nas_network_resource_identifier_container_t *network_resource_identifier_container); CORE_DECLARE(c_int16_t) nas_encode_nonce(pkbuf_t *pkbuf, nas_nonce_t *nonce); CORE_DECLARE(c_int16_t) nas_encode_paging_identity(pkbuf_t *pkbuf, nas_paging_identity_t *paging_identity); CORE_DECLARE(c_int16_t) nas_encode_p_tmsi_signature(pkbuf_t *pkbuf, nas_p_tmsi_signature_t *p_tmsi_signature); CORE_DECLARE(c_int16_t) nas_encode_extended_emm_cause(pkbuf_t *pkbuf, nas_extended_emm_cause_t *extended_emm_cause); CORE_DECLARE(c_int16_t) nas_encode_service_type(pkbuf_t *pkbuf, nas_service_type_t *service_type); CORE_DECLARE(c_int16_t) nas_encode_short_mac(pkbuf_t *pkbuf, nas_short_mac_t *short_mac); CORE_DECLARE(c_int16_t) nas_encode_time_zone(pkbuf_t *pkbuf, nas_time_zone_t *time_zone); CORE_DECLARE(c_int16_t) nas_encode_authentication_parameter_rand(pkbuf_t *pkbuf, nas_authentication_parameter_rand_t *authentication_parameter_rand); CORE_DECLARE(c_int16_t) nas_encode_time_zone_and_time(pkbuf_t *pkbuf, nas_time_zone_and_time_t *time_zone_and_time); CORE_DECLARE(c_int16_t) nas_encode_tmsi_status(pkbuf_t *pkbuf, nas_tmsi_status_t *tmsi_status); CORE_DECLARE(c_int16_t) nas_encode_tracking_area_identity(pkbuf_t *pkbuf, nas_tracking_area_identity_t *tracking_area_identity); CORE_DECLARE(c_int16_t) nas_encode_tracking_area_identity_list(pkbuf_t *pkbuf, nas_tracking_area_identity_list_t *tracking_area_identity_list); CORE_DECLARE(c_int16_t) nas_encode_ue_network_capability(pkbuf_t *pkbuf, nas_ue_network_capability_t *ue_network_capability); CORE_DECLARE(c_int16_t) nas_encode_ue_radio_capability_information_update_needed(pkbuf_t *pkbuf, nas_ue_radio_capability_information_update_needed_t *ue_radio_capability_information_update_needed); CORE_DECLARE(c_int16_t) nas_encode_ue_security_capability(pkbuf_t *pkbuf, nas_ue_security_capability_t *ue_security_capability); CORE_DECLARE(c_int16_t) nas_encode_emergency_number_list(pkbuf_t *pkbuf, nas_emergency_number_list_t *emergency_number_list); CORE_DECLARE(c_int16_t) nas_encode_cli(pkbuf_t *pkbuf, nas_cli_t *cli); CORE_DECLARE(c_int16_t) nas_encode_ss_code(pkbuf_t *pkbuf, nas_ss_code_t *ss_code); CORE_DECLARE(c_int16_t) nas_encode_authentication_response_parameter(pkbuf_t *pkbuf, nas_authentication_response_parameter_t *authentication_response_parameter); CORE_DECLARE(c_int16_t) nas_encode_lcs_indicator(pkbuf_t *pkbuf, nas_lcs_indicator_t *lcs_indicator); CORE_DECLARE(c_int16_t) nas_encode_lcs_client_identity(pkbuf_t *pkbuf, nas_lcs_client_identity_t *lcs_client_identity); CORE_DECLARE(c_int16_t) nas_encode_generic_message_container_type(pkbuf_t *pkbuf, nas_generic_message_container_type_t *generic_message_container_type); CORE_DECLARE(c_int16_t) nas_encode_generic_message_container(pkbuf_t *pkbuf, nas_generic_message_container_t *generic_message_container); CORE_DECLARE(c_int16_t) nas_encode_voice_domain_preference_and_ue_usage_setting(pkbuf_t *pkbuf, nas_voice_domain_preference_and_ue_usage_setting_t *voice_domain_preference_and_ue_usage_setting); CORE_DECLARE(c_int16_t) nas_encode_guti_type(pkbuf_t *pkbuf, nas_guti_type_t *guti_type); CORE_DECLARE(c_int16_t) nas_encode_extended_drx_parameters(pkbuf_t *pkbuf, nas_extended_drx_parameters_t *extended_drx_parameters); CORE_DECLARE(c_int16_t) nas_encode_ciphering_key_sequence_number(pkbuf_t *pkbuf, nas_ciphering_key_sequence_number_t *ciphering_key_sequence_number); CORE_DECLARE(c_int16_t) nas_encode_csfb_response(pkbuf_t *pkbuf, nas_csfb_response_t *csfb_response); CORE_DECLARE(c_int16_t) nas_encode_daylight_saving_time(pkbuf_t *pkbuf, nas_daylight_saving_time_t *daylight_saving_time); CORE_DECLARE(c_int16_t) nas_encode_detach_type(pkbuf_t *pkbuf, nas_detach_type_t *detach_type); CORE_DECLARE(c_int16_t) nas_encode_drx_parameter(pkbuf_t *pkbuf, nas_drx_parameter_t *drx_parameter); CORE_DECLARE(c_int16_t) nas_encode_emm_cause(pkbuf_t *pkbuf, nas_emm_cause_t *emm_cause); CORE_DECLARE(c_int16_t) nas_encode_access_point_name(pkbuf_t *pkbuf, nas_access_point_name_t *access_point_name); CORE_DECLARE(c_int16_t) nas_encode_protocol_configuration_options(pkbuf_t *pkbuf, nas_protocol_configuration_options_t *protocol_configuration_options); CORE_DECLARE(c_int16_t) nas_encode_quality_of_service(pkbuf_t *pkbuf, nas_quality_of_service_t *quality_of_service); CORE_DECLARE(c_int16_t) nas_encode_radio_priority(pkbuf_t *pkbuf, nas_radio_priority_t *radio_priority); CORE_DECLARE(c_int16_t) nas_encode_re_attempt_indicator(pkbuf_t *pkbuf, nas_re_attempt_indicator_t *re_attempt_indicator); CORE_DECLARE(c_int16_t) nas_encode_request_type(pkbuf_t *pkbuf, nas_request_type_t *request_type); CORE_DECLARE(c_int16_t) nas_encode_traffic_flow_aggregate_description(pkbuf_t *pkbuf, nas_traffic_flow_aggregate_description_t *traffic_flow_aggregate_description); CORE_DECLARE(c_int16_t) nas_encode_traffic_flow_template(pkbuf_t *pkbuf, nas_traffic_flow_template_t *traffic_flow_template); CORE_DECLARE(c_int16_t) nas_encode_transaction_identifier(pkbuf_t *pkbuf, nas_transaction_identifier_t *transaction_identifier); CORE_DECLARE(c_int16_t) nas_encode_wlan_offload_acceptability(pkbuf_t *pkbuf, nas_wlan_offload_acceptability_t *wlan_offload_acceptability); CORE_DECLARE(c_int16_t) nas_encode_nbifom_container(pkbuf_t *pkbuf, nas_nbifom_container_t *nbifom_container); CORE_DECLARE(c_int16_t) nas_encode_apn_aggregate_maximum_bit_rate(pkbuf_t *pkbuf, nas_apn_aggregate_maximum_bit_rate_t *apn_aggregate_maximum_bit_rate); CORE_DECLARE(c_int16_t) nas_encode_header_compression_configuration(pkbuf_t *pkbuf, nas_header_compression_configuration_t *header_compression_configuration); CORE_DECLARE(c_int16_t) nas_encode_control_plane_only_indication(pkbuf_t *pkbuf, nas_control_plane_only_indication_t *control_plane_only_indication); CORE_DECLARE(c_int16_t) nas_encode_extended_protocol_configuration_options(pkbuf_t *pkbuf, nas_extended_protocol_configuration_options_t *extended_protocol_configuration_options); CORE_DECLARE(c_int16_t) nas_encode_header_compression_configuration_status(pkbuf_t *pkbuf, nas_header_compression_configuration_status_t *header_compression_configuration_status); CORE_DECLARE(c_int16_t) nas_encode_serving_plmn_rate_control(pkbuf_t *pkbuf, nas_serving_plmn_rate_control_t *serving_plmn_rate_control); CORE_DECLARE(c_int16_t) nas_encode_connectivity_type(pkbuf_t *pkbuf, nas_connectivity_type_t *connectivity_type); CORE_DECLARE(c_int16_t) nas_encode_eps_quality_of_service(pkbuf_t *pkbuf, nas_eps_quality_of_service_t *eps_quality_of_service); CORE_DECLARE(c_int16_t) nas_encode_esm_cause(pkbuf_t *pkbuf, nas_esm_cause_t *esm_cause); CORE_DECLARE(c_int16_t) nas_encode_esm_information_transfer_flag(pkbuf_t *pkbuf, nas_esm_information_transfer_flag_t *esm_information_transfer_flag); CORE_DECLARE(c_int16_t) nas_encode_linked_eps_bearer_identity(pkbuf_t *pkbuf, nas_linked_eps_bearer_identity_t *linked_eps_bearer_identity); CORE_DECLARE(c_int16_t) nas_encode_llc_service_access_point_identifier(pkbuf_t *pkbuf, nas_llc_service_access_point_identifier_t *llc_service_access_point_identifier); CORE_DECLARE(c_int16_t) nas_encode_packet_flow_identifier(pkbuf_t *pkbuf, nas_packet_flow_identifier_t *packet_flow_identifier); CORE_DECLARE(c_int16_t) nas_encode_pdn_address(pkbuf_t *pkbuf, nas_pdn_address_t *pdn_address); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __NAS_IES_H__ */ nextepc-0.3.10/lib/nas/nas_message.h000066400000000000000000002077661333553357400172630ustar00rootroot00000000000000/* * Copyright (c) 2017, NextEPC Group * 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. */ /******************************************************************************* * This file had been created by gtpv2c_tlv.py script v0.1.0 * Please do not modify this file but regenerate it via script. * Created on: 2018-01-23 15:58:42.847411 by acetcom * from 24301-d80.docx ******************************************************************************/ #ifndef __NAS_MESSAGE_H__ #define __NAS_MESSAGE_H__ #include "nas_ies.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* The Packet Buffer(pkbuf_t) for NAS message MUST make a HEADROOM. * When calculating AES_CMAC, we need to use the headroom of the packet. */ #define NAS_HEADROOM 16 #define NAS_SECURITY_HEADER_PLAIN_NAS_MESSAGE 0 #define NAS_SECURITY_HEADER_INTEGRITY_PROTECTED 1 #define NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHERED 2 #define NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_NEW_SECURITY_CONTEXT 3 #define NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHTERD_WITH_NEW_INTEGRITY_CONTEXT 4 #define NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_PARTICALLY_CIPHTERD 5 #define NAS_SECURITY_HEADER_FOR_SERVICE_REQUEST_MESSAGE 12 #define NAS_PROTOCOL_DISCRIMINATOR_ESM 0x2 #define NAS_PROTOCOL_DISCRIMINATOR_EMM 0x7 #define NAS_EPS_BEARER_IDENTITY_UNASSIGNED 0 #define NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED 0 typedef struct _nas_emm_header_t { ED2(c_uint8_t security_header_type:4;, c_uint8_t protocol_discriminator:4;) c_uint8_t message_type; } __attribute__ ((packed)) nas_emm_header_t; typedef struct _nas_esm_header_t { ED2(c_uint8_t eps_bearer_identity:4;, c_uint8_t protocol_discriminator:4;) c_uint8_t procedure_transaction_identity; c_uint8_t message_type; } __attribute__ ((packed)) nas_esm_header_t; typedef struct _nas_security_header_t { ED2(c_uint8_t security_header_type:4;, c_uint8_t protocol_discriminator:4;) c_uint32_t message_authentication_code; c_uint8_t sequence_number; } __attribute__ ((packed)) nas_security_header_t; #define NAS_ATTACH_REQUEST 65 #define NAS_ATTACH_ACCEPT 66 #define NAS_ATTACH_COMPLETE 67 #define NAS_ATTACH_REJECT 68 #define NAS_DETACH_REQUEST 69 #define NAS_DETACH_ACCEPT 70 #define NAS_TRACKING_AREA_UPDATE_REQUEST 72 #define NAS_TRACKING_AREA_UPDATE_ACCEPT 73 #define NAS_TRACKING_AREA_UPDATE_COMPLETE 74 #define NAS_TRACKING_AREA_UPDATE_REJECT 75 #define NAS_EXTENDED_SERVICE_REQUEST 76 #define NAS_SERVICE_REJECT 78 #define NAS_GUTI_REALLOCATION_COMMAND 80 #define NAS_GUTI_REALLOCATION_COMPLETE 81 #define NAS_AUTHENTICATION_REQUEST 82 #define NAS_AUTHENTICATION_RESPONSE 83 #define NAS_AUTHENTICATION_REJECT 84 #define NAS_IDENTITY_REQUEST 85 #define NAS_IDENTITY_RESPONSE 86 #define NAS_AUTHENTICATION_FAILURE 92 #define NAS_SECURITY_MODE_COMMAND 93 #define NAS_SECURITY_MODE_COMPLETE 94 #define NAS_SECURITY_MODE_REJECT 95 #define NAS_EMM_STATUS 96 #define NAS_EMM_INFORMATION 97 #define NAS_DOWNLINK_NAS_TRANSPORT 98 #define NAS_UPLINK_NAS_TRANSPORT 99 #define NAS_CS_SERVICE_NOTIFICATION 100 #define NAS_UPLINK_GENERIC_NAS_TRANSPORT 101 #define NAS_DOWNLINK_GENERIC_NAS_TRANSPORT 104 #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST 193 #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT 194 #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT 195 #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST 197 #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT 198 #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT 199 #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST 201 #define NAS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT 202 #define NAS_MODIFY_EPS_BEARER_CONTEXT_REJECT 203 #define NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST 205 #define NAS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT 206 #define NAS_PDN_CONNECTIVITY_REQUEST 208 #define NAS_PDN_CONNECTIVITY_REJECT 209 #define NAS_PDN_DISCONNECT_REQUEST 210 #define NAS_PDN_DISCONNECT_REJECT 211 #define NAS_BEARER_RESOURCE_ALLOCATION_REQUEST 212 #define NAS_BEARER_RESOURCE_ALLOCATION_REJECT 213 #define NAS_BEARER_RESOURCE_MODIFICATION_REQUEST 214 #define NAS_BEARER_RESOURCE_MODIFICATION_REJECT 215 #define NAS_ESM_INFORMATION_REQUEST 217 #define NAS_ESM_INFORMATION_RESPONSE 218 #define NAS_ESM_STATUS 232 /******************************************************* * ATTACH REQUEST ******************************************************/ #define NAS_ATTACH_REQUEST_OLD_P_TMSI_SIGNATURE_PRESENT (1<<0) #define NAS_ATTACH_REQUEST_ADDITIONAL_GUTI_PRESENT (1<<1) #define NAS_ATTACH_REQUEST_LAST_VISITED_REGISTERED_TAI_PRESENT (1<<2) #define NAS_ATTACH_REQUEST_DRX_PARAMETER_PRESENT (1<<3) #define NAS_ATTACH_REQUEST_MS_NETWORK_CAPABILITY_PRESENT (1<<4) #define NAS_ATTACH_REQUEST_OLD_LOCATION_AREA_IDENTIFICATION_PRESENT (1<<5) #define NAS_ATTACH_REQUEST_TMSI_STATUS_PRESENT (1<<6) #define NAS_ATTACH_REQUEST_MOBILE_STATION_CLASSMARK_2_PRESENT (1<<7) #define NAS_ATTACH_REQUEST_MOBILE_STATION_CLASSMARK_3_PRESENT (1<<8) #define NAS_ATTACH_REQUEST_SUPPORTED_CODECS_PRESENT (1<<9) #define NAS_ATTACH_REQUEST_ADDITIONAL_UPDATE_TYPE_PRESENT (1<<10) #define NAS_ATTACH_REQUEST_VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_PRESENT (1<<11) #define NAS_ATTACH_REQUEST_DEVICE_PROPERTIES_PRESENT (1<<12) #define NAS_ATTACH_REQUEST_OLD_GUTI_TYPE_PRESENT (1<<13) #define NAS_ATTACH_REQUEST_MS_NETWORK_FEATURE_SUPPORT_PRESENT (1<<14) #define NAS_ATTACH_REQUEST_TMSI_BASED_NRI_CONTAINER_PRESENT (1<<15) #define NAS_ATTACH_REQUEST_T3324_VALUE_PRESENT (1<<16) #define NAS_ATTACH_REQUEST_T3412_EXTENDED_VALUE_PRESENT (1<<17) #define NAS_ATTACH_REQUEST_EXTENDED_DRX_PARAMETERS_PRESENT (1<<18) #define NAS_ATTACH_REQUEST_OLD_P_TMSI_SIGNATURE_TYPE 0x19 #define NAS_ATTACH_REQUEST_ADDITIONAL_GUTI_TYPE 0x50 #define NAS_ATTACH_REQUEST_LAST_VISITED_REGISTERED_TAI_TYPE 0x52 #define NAS_ATTACH_REQUEST_DRX_PARAMETER_TYPE 0x5C #define NAS_ATTACH_REQUEST_MS_NETWORK_CAPABILITY_TYPE 0x31 #define NAS_ATTACH_REQUEST_OLD_LOCATION_AREA_IDENTIFICATION_TYPE 0x13 #define NAS_ATTACH_REQUEST_TMSI_STATUS_TYPE 0x90 #define NAS_ATTACH_REQUEST_MOBILE_STATION_CLASSMARK_2_TYPE 0x11 #define NAS_ATTACH_REQUEST_MOBILE_STATION_CLASSMARK_3_TYPE 0x20 #define NAS_ATTACH_REQUEST_SUPPORTED_CODECS_TYPE 0x40 #define NAS_ATTACH_REQUEST_ADDITIONAL_UPDATE_TYPE_TYPE 0xF0 #define NAS_ATTACH_REQUEST_VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_TYPE 0x5D #define NAS_ATTACH_REQUEST_DEVICE_PROPERTIES_TYPE 0xD0 #define NAS_ATTACH_REQUEST_OLD_GUTI_TYPE_TYPE 0xE0 #define NAS_ATTACH_REQUEST_MS_NETWORK_FEATURE_SUPPORT_TYPE 0xC0 #define NAS_ATTACH_REQUEST_TMSI_BASED_NRI_CONTAINER_TYPE 0x10 #define NAS_ATTACH_REQUEST_T3324_VALUE_TYPE 0x6A #define NAS_ATTACH_REQUEST_T3412_EXTENDED_VALUE_TYPE 0x5E #define NAS_ATTACH_REQUEST_EXTENDED_DRX_PARAMETERS_TYPE 0x6E typedef struct _nas_attach_request_t { /* Mandatory fields */ nas_eps_attach_type_t eps_attach_type; nas_eps_mobile_identity_t eps_mobile_identity; nas_ue_network_capability_t ue_network_capability; nas_esm_message_container_t esm_message_container; /* Optional fields */ c_uint32_t presencemask; nas_p_tmsi_signature_t old_p_tmsi_signature; nas_eps_mobile_identity_t additional_guti; nas_tracking_area_identity_t last_visited_registered_tai; nas_drx_parameter_t drx_parameter; nas_ms_network_capability_t ms_network_capability; nas_location_area_identification_t old_location_area_identification; nas_tmsi_status_t tmsi_status; nas_mobile_station_classmark_2_t mobile_station_classmark_2; nas_mobile_station_classmark_3_t mobile_station_classmark_3; nas_supported_codec_list_t supported_codecs; nas_additional_update_type_t additional_update_type; nas_voice_domain_preference_and_ue_usage_setting_t voice_domain_preference_and_ue_usage_setting; nas_device_properties_t device_properties; nas_guti_type_t old_guti_type; nas_ms_network_feature_support_t ms_network_feature_support; nas_network_resource_identifier_container_t tmsi_based_nri_container; nas_gprs_timer_2_t t3324_value; nas_gprs_timer_3_t t3412_extended_value; nas_extended_drx_parameters_t extended_drx_parameters; } nas_attach_request_t; /******************************************************* * ATTACH ACCEPT ******************************************************/ #define NAS_ATTACH_ACCEPT_GUTI_PRESENT (1<<0) #define NAS_ATTACH_ACCEPT_LOCATION_AREA_IDENTIFICATION_PRESENT (1<<1) #define NAS_ATTACH_ACCEPT_MS_IDENTITY_PRESENT (1<<2) #define NAS_ATTACH_ACCEPT_EMM_CAUSE_PRESENT (1<<3) #define NAS_ATTACH_ACCEPT_T3402_VALUE_PRESENT (1<<4) #define NAS_ATTACH_ACCEPT_T3423_VALUE_PRESENT (1<<5) #define NAS_ATTACH_ACCEPT_EQUIVALENT_PLMNS_PRESENT (1<<6) #define NAS_ATTACH_ACCEPT_EMERGENCY_NUMBER_LIST_PRESENT (1<<7) #define NAS_ATTACH_ACCEPT_EPS_NETWORK_FEATURE_SUPPORT_PRESENT (1<<8) #define NAS_ATTACH_ACCEPT_ADDITIONAL_UPDATE_RESULT_PRESENT (1<<9) #define NAS_ATTACH_ACCEPT_T3412_EXTENDED_VALUE_PRESENT (1<<10) #define NAS_ATTACH_ACCEPT_T3324_VALUE_PRESENT (1<<11) #define NAS_ATTACH_ACCEPT_EXTENDED_DRX_PARAMETERS_PRESENT (1<<12) #define NAS_ATTACH_ACCEPT_GUTI_TYPE 0x50 #define NAS_ATTACH_ACCEPT_LOCATION_AREA_IDENTIFICATION_TYPE 0x13 #define NAS_ATTACH_ACCEPT_MS_IDENTITY_TYPE 0x23 #define NAS_ATTACH_ACCEPT_EMM_CAUSE_TYPE 0x53 #define NAS_ATTACH_ACCEPT_T3402_VALUE_TYPE 0x17 #define NAS_ATTACH_ACCEPT_T3423_VALUE_TYPE 0x59 #define NAS_ATTACH_ACCEPT_EQUIVALENT_PLMNS_TYPE 0x4A #define NAS_ATTACH_ACCEPT_EMERGENCY_NUMBER_LIST_TYPE 0x34 #define NAS_ATTACH_ACCEPT_EPS_NETWORK_FEATURE_SUPPORT_TYPE 0x64 #define NAS_ATTACH_ACCEPT_ADDITIONAL_UPDATE_RESULT_TYPE 0xF0 #define NAS_ATTACH_ACCEPT_T3412_EXTENDED_VALUE_TYPE 0x5E #define NAS_ATTACH_ACCEPT_T3324_VALUE_TYPE 0x6A #define NAS_ATTACH_ACCEPT_EXTENDED_DRX_PARAMETERS_TYPE 0x6E typedef struct _nas_attach_accept_t { /* Mandatory fields */ nas_eps_attach_result_t eps_attach_result; nas_gprs_timer_t t3412_value; nas_tracking_area_identity_list_t tai_list; nas_esm_message_container_t esm_message_container; /* Optional fields */ c_uint32_t presencemask; nas_eps_mobile_identity_t guti; nas_location_area_identification_t location_area_identification; nas_mobile_identity_t ms_identity; nas_emm_cause_t emm_cause; nas_gprs_timer_t t3402_value; nas_gprs_timer_t t3423_value; nas_plmn_list_t equivalent_plmns; nas_emergency_number_list_t emergency_number_list; nas_eps_network_feature_support_t eps_network_feature_support; nas_additional_update_result_t additional_update_result; nas_gprs_timer_3_t t3412_extended_value; nas_gprs_timer_2_t t3324_value; nas_extended_drx_parameters_t extended_drx_parameters; } nas_attach_accept_t; /******************************************************* * ATTACH COMPLETE ******************************************************/ typedef struct _nas_attach_complete_t { /* Mandatory fields */ nas_esm_message_container_t esm_message_container; } nas_attach_complete_t; /******************************************************* * ATTACH REJECT ******************************************************/ #define NAS_ATTACH_REJECT_ESM_MESSAGE_CONTAINER_PRESENT (1<<0) #define NAS_ATTACH_REJECT_T3346_VALUE_PRESENT (1<<1) #define NAS_ATTACH_REJECT_T3402_VALUE_PRESENT (1<<2) #define NAS_ATTACH_REJECT_EXTENDED_EMM_CAUSE_PRESENT (1<<3) #define NAS_ATTACH_REJECT_ESM_MESSAGE_CONTAINER_TYPE 0x78 #define NAS_ATTACH_REJECT_T3346_VALUE_TYPE 0x5F #define NAS_ATTACH_REJECT_T3402_VALUE_TYPE 0x16 #define NAS_ATTACH_REJECT_EXTENDED_EMM_CAUSE_TYPE 0xA0 typedef struct _nas_attach_reject_t { /* Mandatory fields */ nas_emm_cause_t emm_cause; /* Optional fields */ c_uint32_t presencemask; nas_esm_message_container_t esm_message_container; nas_gprs_timer_2_t t3346_value; nas_gprs_timer_2_t t3402_value; nas_extended_emm_cause_t extended_emm_cause; } nas_attach_reject_t; /******************************************************* * DETACH REQUEST FROM UE ******************************************************/ typedef struct _nas_detach_request_from_ue_t { /* Mandatory fields */ nas_detach_type_t detach_type; nas_eps_mobile_identity_t eps_mobile_identity; } nas_detach_request_from_ue_t; /******************************************************* * DETACH REQUEST TO UE ******************************************************/ #define NAS_DETACH_REQUEST_EMM_CAUSE_PRESENT (1<<0) #define NAS_DETACH_REQUEST_EMM_CAUSE_TYPE 0x53 typedef struct _nas_detach_request_to_ue_t { /* Mandatory fields */ nas_detach_type_t detach_type; /* Optional fields */ c_uint32_t presencemask; nas_emm_cause_t emm_cause; } nas_detach_request_to_ue_t; /******************************************************* * TRACKING AREA UPDATE REQUEST ******************************************************/ #define NAS_TRACKING_AREA_UPDATE_REQUEST_NON_CURRENT_NATIVE_NAS_KEY_SET_IDENTIFIER_PRESENT (1<<0) #define NAS_TRACKING_AREA_UPDATE_REQUEST_GPRS_CIPHERING_KEY_SEQUENCE_NUMBER_PRESENT (1<<1) #define NAS_TRACKING_AREA_UPDATE_REQUEST_OLD_P_TMSI_SIGNATURE_PRESENT (1<<2) #define NAS_TRACKING_AREA_UPDATE_REQUEST_ADDITIONAL_GUTI_PRESENT (1<<3) #define NAS_TRACKING_AREA_UPDATE_REQUEST_NONCEUE_PRESENT (1<<4) #define NAS_TRACKING_AREA_UPDATE_REQUEST_UE_NETWORK_CAPABILITY_PRESENT (1<<5) #define NAS_TRACKING_AREA_UPDATE_REQUEST_LAST_VISITED_REGISTERED_TAI_PRESENT (1<<6) #define NAS_TRACKING_AREA_UPDATE_REQUEST_DRX_PARAMETER_PRESENT (1<<7) #define NAS_TRACKING_AREA_UPDATE_REQUEST_UE_RADIO_CAPABILITY_INFORMATION_UPDATE_NEEDED_PRESENT (1<<8) #define NAS_TRACKING_AREA_UPDATE_REQUEST_EPS_BEARER_CONTEXT_STATUS_PRESENT (1<<9) #define NAS_TRACKING_AREA_UPDATE_REQUEST_MS_NETWORK_CAPABILITY_PRESENT (1<<10) #define NAS_TRACKING_AREA_UPDATE_REQUEST_OLD_LOCATION_AREA_IDENTIFICATION_PRESENT (1<<11) #define NAS_TRACKING_AREA_UPDATE_REQUEST_TMSI_STATUS_PRESENT (1<<12) #define NAS_TRACKING_AREA_UPDATE_REQUEST_MOBILE_STATION_CLASSMARK_2_PRESENT (1<<13) #define NAS_TRACKING_AREA_UPDATE_REQUEST_MOBILE_STATION_CLASSMARK_3_PRESENT (1<<14) #define NAS_TRACKING_AREA_UPDATE_REQUEST_SUPPORTED_CODECS_PRESENT (1<<15) #define NAS_TRACKING_AREA_UPDATE_REQUEST_ADDITIONAL_UPDATE_TYPE_PRESENT (1<<16) #define NAS_TRACKING_AREA_UPDATE_REQUEST_VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_PRESENT (1<<17) #define NAS_TRACKING_AREA_UPDATE_REQUEST_OLD_GUTI_TYPE_PRESENT (1<<18) #define NAS_TRACKING_AREA_UPDATE_REQUEST_DEVICE_PROPERTIES_PRESENT (1<<19) #define NAS_TRACKING_AREA_UPDATE_REQUEST_MS_NETWORK_FEATURE_SUPPORT_PRESENT (1<<20) #define NAS_TRACKING_AREA_UPDATE_REQUEST_TMSI_BASED_NRI_CONTAINER_PRESENT (1<<21) #define NAS_TRACKING_AREA_UPDATE_REQUEST_T3324_VALUE_PRESENT (1<<22) #define NAS_TRACKING_AREA_UPDATE_REQUEST_T3412_EXTENDED_VALUE_PRESENT (1<<23) #define NAS_TRACKING_AREA_UPDATE_REQUEST_EXTENDED_DRX_PARAMETERS_PRESENT (1<<24) #define NAS_TRACKING_AREA_UPDATE_REQUEST_NON_CURRENT_NATIVE_NAS_KEY_SET_IDENTIFIER_TYPE 0xB0 #define NAS_TRACKING_AREA_UPDATE_REQUEST_GPRS_CIPHERING_KEY_SEQUENCE_NUMBER_TYPE 0x80 #define NAS_TRACKING_AREA_UPDATE_REQUEST_OLD_P_TMSI_SIGNATURE_TYPE 0x19 #define NAS_TRACKING_AREA_UPDATE_REQUEST_ADDITIONAL_GUTI_TYPE 0x50 #define NAS_TRACKING_AREA_UPDATE_REQUEST_NONCEUE_TYPE 0x55 #define NAS_TRACKING_AREA_UPDATE_REQUEST_UE_NETWORK_CAPABILITY_TYPE 0x58 #define NAS_TRACKING_AREA_UPDATE_REQUEST_LAST_VISITED_REGISTERED_TAI_TYPE 0x52 #define NAS_TRACKING_AREA_UPDATE_REQUEST_DRX_PARAMETER_TYPE 0x5C #define NAS_TRACKING_AREA_UPDATE_REQUEST_UE_RADIO_CAPABILITY_INFORMATION_UPDATE_NEEDED_TYPE 0xA0 #define NAS_TRACKING_AREA_UPDATE_REQUEST_EPS_BEARER_CONTEXT_STATUS_TYPE 0x57 #define NAS_TRACKING_AREA_UPDATE_REQUEST_MS_NETWORK_CAPABILITY_TYPE 0x31 #define NAS_TRACKING_AREA_UPDATE_REQUEST_OLD_LOCATION_AREA_IDENTIFICATION_TYPE 0x13 #define NAS_TRACKING_AREA_UPDATE_REQUEST_TMSI_STATUS_TYPE 0x90 #define NAS_TRACKING_AREA_UPDATE_REQUEST_MOBILE_STATION_CLASSMARK_2_TYPE 0x11 #define NAS_TRACKING_AREA_UPDATE_REQUEST_MOBILE_STATION_CLASSMARK_3_TYPE 0x20 #define NAS_TRACKING_AREA_UPDATE_REQUEST_SUPPORTED_CODECS_TYPE 0x40 #define NAS_TRACKING_AREA_UPDATE_REQUEST_ADDITIONAL_UPDATE_TYPE_TYPE 0xF0 #define NAS_TRACKING_AREA_UPDATE_REQUEST_VOICE_DOMAIN_PREFERENCE_AND_UE_USAGE_SETTING_TYPE 0x5D #define NAS_TRACKING_AREA_UPDATE_REQUEST_OLD_GUTI_TYPE_TYPE 0xE0 #define NAS_TRACKING_AREA_UPDATE_REQUEST_DEVICE_PROPERTIES_TYPE 0xD0 #define NAS_TRACKING_AREA_UPDATE_REQUEST_MS_NETWORK_FEATURE_SUPPORT_TYPE 0xC0 #define NAS_TRACKING_AREA_UPDATE_REQUEST_TMSI_BASED_NRI_CONTAINER_TYPE 0x10 #define NAS_TRACKING_AREA_UPDATE_REQUEST_T3324_VALUE_TYPE 0x6A #define NAS_TRACKING_AREA_UPDATE_REQUEST_T3412_EXTENDED_VALUE_TYPE 0x5E #define NAS_TRACKING_AREA_UPDATE_REQUEST_EXTENDED_DRX_PARAMETERS_TYPE 0x6E typedef struct _nas_tracking_area_update_request_t { /* Mandatory fields */ nas_eps_update_type_t eps_update_type; nas_eps_mobile_identity_t old_guti; /* Optional fields */ c_uint32_t presencemask; nas_key_set_identifier_t non_current_native_nas_key_set_identifier; nas_ciphering_key_sequence_number_t gprs_ciphering_key_sequence_number; nas_p_tmsi_signature_t old_p_tmsi_signature; nas_eps_mobile_identity_t additional_guti; nas_nonce_t nonceue; nas_ue_network_capability_t ue_network_capability; nas_tracking_area_identity_t last_visited_registered_tai; nas_drx_parameter_t drx_parameter; nas_ue_radio_capability_information_update_needed_t ue_radio_capability_information_update_needed; nas_eps_bearer_context_status_t eps_bearer_context_status; nas_ms_network_capability_t ms_network_capability; nas_location_area_identification_t old_location_area_identification; nas_tmsi_status_t tmsi_status; nas_mobile_station_classmark_2_t mobile_station_classmark_2; nas_mobile_station_classmark_3_t mobile_station_classmark_3; nas_supported_codec_list_t supported_codecs; nas_additional_update_type_t additional_update_type; nas_voice_domain_preference_and_ue_usage_setting_t voice_domain_preference_and_ue_usage_setting; nas_guti_type_t old_guti_type; nas_device_properties_t device_properties; nas_ms_network_feature_support_t ms_network_feature_support; nas_network_resource_identifier_container_t tmsi_based_nri_container; nas_gprs_timer_2_t t3324_value; nas_gprs_timer_3_t t3412_extended_value; nas_extended_drx_parameters_t extended_drx_parameters; } nas_tracking_area_update_request_t; /******************************************************* * TRACKING AREA UPDATE ACCEPT ******************************************************/ #define NAS_TRACKING_AREA_UPDATE_ACCEPT_T3412_VALUE_PRESENT (1<<0) #define NAS_TRACKING_AREA_UPDATE_ACCEPT_GUTI_PRESENT (1<<1) #define NAS_TRACKING_AREA_UPDATE_ACCEPT_TAI_LIST_PRESENT (1<<2) #define NAS_TRACKING_AREA_UPDATE_ACCEPT_EPS_BEARER_CONTEXT_STATUS_PRESENT (1<<3) #define NAS_TRACKING_AREA_UPDATE_ACCEPT_LOCATION_AREA_IDENTIFICATION_PRESENT (1<<4) #define NAS_TRACKING_AREA_UPDATE_ACCEPT_MS_IDENTITY_PRESENT (1<<5) #define NAS_TRACKING_AREA_UPDATE_ACCEPT_EMM_CAUSE_PRESENT (1<<6) #define NAS_TRACKING_AREA_UPDATE_ACCEPT_T3402_VALUE_PRESENT (1<<7) #define NAS_TRACKING_AREA_UPDATE_ACCEPT_T3423_VALUE_PRESENT (1<<8) #define NAS_TRACKING_AREA_UPDATE_ACCEPT_EQUIVALENT_PLMNS_PRESENT (1<<9) #define NAS_TRACKING_AREA_UPDATE_ACCEPT_EMERGENCY_NUMBER_LIST_PRESENT (1<<10) #define NAS_TRACKING_AREA_UPDATE_ACCEPT_EPS_NETWORK_FEATURE_SUPPORT_PRESENT (1<<11) #define NAS_TRACKING_AREA_UPDATE_ACCEPT_ADDITIONAL_UPDATE_RESULT_PRESENT (1<<12) #define NAS_TRACKING_AREA_UPDATE_ACCEPT_T3412_EXTENDED_VALUE_PRESENT (1<<13) #define NAS_TRACKING_AREA_UPDATE_ACCEPT_T3324_VALUE_PRESENT (1<<14) #define NAS_TRACKING_AREA_UPDATE_ACCEPT_EXTENDED_DRX_PARAMETERS_PRESENT (1<<15) #define NAS_TRACKING_AREA_UPDATE_ACCEPT_HEADER_COMPRESSION_CONFIGURATION_STATUS_PRESENT (1<<16) #define NAS_TRACKING_AREA_UPDATE_ACCEPT_T3412_VALUE_TYPE 0x5A #define NAS_TRACKING_AREA_UPDATE_ACCEPT_GUTI_TYPE 0x50 #define NAS_TRACKING_AREA_UPDATE_ACCEPT_TAI_LIST_TYPE 0x54 #define NAS_TRACKING_AREA_UPDATE_ACCEPT_EPS_BEARER_CONTEXT_STATUS_TYPE 0x57 #define NAS_TRACKING_AREA_UPDATE_ACCEPT_LOCATION_AREA_IDENTIFICATION_TYPE 0x13 #define NAS_TRACKING_AREA_UPDATE_ACCEPT_MS_IDENTITY_TYPE 0x23 #define NAS_TRACKING_AREA_UPDATE_ACCEPT_EMM_CAUSE_TYPE 0x53 #define NAS_TRACKING_AREA_UPDATE_ACCEPT_T3402_VALUE_TYPE 0x17 #define NAS_TRACKING_AREA_UPDATE_ACCEPT_T3423_VALUE_TYPE 0x59 #define NAS_TRACKING_AREA_UPDATE_ACCEPT_EQUIVALENT_PLMNS_TYPE 0x4A #define NAS_TRACKING_AREA_UPDATE_ACCEPT_EMERGENCY_NUMBER_LIST_TYPE 0x34 #define NAS_TRACKING_AREA_UPDATE_ACCEPT_EPS_NETWORK_FEATURE_SUPPORT_TYPE 0x64 #define NAS_TRACKING_AREA_UPDATE_ACCEPT_ADDITIONAL_UPDATE_RESULT_TYPE 0xF0 #define NAS_TRACKING_AREA_UPDATE_ACCEPT_T3412_EXTENDED_VALUE_TYPE 0x5E #define NAS_TRACKING_AREA_UPDATE_ACCEPT_T3324_VALUE_TYPE 0x6A #define NAS_TRACKING_AREA_UPDATE_ACCEPT_EXTENDED_DRX_PARAMETERS_TYPE 0x6E #define NAS_TRACKING_AREA_UPDATE_ACCEPT_HEADER_COMPRESSION_CONFIGURATION_STATUS_TYPE 0x68 typedef struct _nas_tracking_area_update_accept_t { /* Mandatory fields */ nas_eps_update_result_t eps_update_result; /* Optional fields */ c_uint32_t presencemask; nas_gprs_timer_t t3412_value; nas_eps_mobile_identity_t guti; nas_tracking_area_identity_list_t tai_list; nas_eps_bearer_context_status_t eps_bearer_context_status; nas_location_area_identification_t location_area_identification; nas_mobile_identity_t ms_identity; nas_emm_cause_t emm_cause; nas_gprs_timer_t t3402_value; nas_gprs_timer_t t3423_value; nas_plmn_list_t equivalent_plmns; nas_emergency_number_list_t emergency_number_list; nas_eps_network_feature_support_t eps_network_feature_support; nas_additional_update_result_t additional_update_result; nas_gprs_timer_3_t t3412_extended_value; nas_gprs_timer_2_t t3324_value; nas_extended_drx_parameters_t extended_drx_parameters; nas_header_compression_configuration_status_t header_compression_configuration_status; } nas_tracking_area_update_accept_t; /******************************************************* * TRACKING AREA UPDATE REJECT ******************************************************/ #define NAS_TRACKING_AREA_UPDATE_REJECT_T3346_VALUE_PRESENT (1<<0) #define NAS_TRACKING_AREA_UPDATE_REJECT_EXTENDED_EMM_CAUSE_PRESENT (1<<1) #define NAS_TRACKING_AREA_UPDATE_REJECT_T3346_VALUE_TYPE 0x5F #define NAS_TRACKING_AREA_UPDATE_REJECT_EXTENDED_EMM_CAUSE_TYPE 0xA0 typedef struct _nas_tracking_area_update_reject_t { /* Mandatory fields */ nas_emm_cause_t emm_cause; /* Optional fields */ c_uint32_t presencemask; nas_gprs_timer_2_t t3346_value; nas_extended_emm_cause_t extended_emm_cause; } nas_tracking_area_update_reject_t; /******************************************************* * EXTENDED SERVICE REQUEST ******************************************************/ #define NAS_EXTENDED_SERVICE_REQUEST_CSFB_RESPONSE_PRESENT (1<<0) #define NAS_EXTENDED_SERVICE_REQUEST_EPS_BEARER_CONTEXT_STATUS_PRESENT (1<<1) #define NAS_EXTENDED_SERVICE_REQUEST_DEVICE_PROPERTIES_PRESENT (1<<2) #define NAS_EXTENDED_SERVICE_REQUEST_CSFB_RESPONSE_TYPE 0xB0 #define NAS_EXTENDED_SERVICE_REQUEST_EPS_BEARER_CONTEXT_STATUS_TYPE 0x57 #define NAS_EXTENDED_SERVICE_REQUEST_DEVICE_PROPERTIES_TYPE 0xD0 typedef struct _nas_extended_service_request_t { /* Mandatory fields */ nas_service_type_t service_type; nas_mobile_identity_t m_tmsi; /* Optional fields */ c_uint32_t presencemask; nas_csfb_response_t csfb_response; nas_eps_bearer_context_status_t eps_bearer_context_status; nas_device_properties_t device_properties; } nas_extended_service_request_t; /******************************************************* * SERVICE REQUEST ******************************************************/ typedef struct _nas_service_request_t { /* Mandatory fields */ nas_ksi_and_sequence_number_t ksi_and_sequence_number; nas_short_mac_t message_authentication_code; } nas_service_request_t; /******************************************************* * SERVICE REJECT ******************************************************/ #define NAS_SERVICE_REJECT_T3346_VALUE_PRESENT (1<<0) #define NAS_SERVICE_REJECT_T3346_VALUE_TYPE 0x5F typedef struct _nas_service_reject_t { /* Mandatory fields */ nas_emm_cause_t emm_cause; nas_gprs_timer_t t3442_value; /* Optional fields */ c_uint32_t presencemask; nas_gprs_timer_2_t t3346_value; } nas_service_reject_t; /******************************************************* * GUTI REALLOCATION COMMAND ******************************************************/ #define NAS_GUTI_REALLOCATION_COMMAND_TAI_LIST_PRESENT (1<<0) #define NAS_GUTI_REALLOCATION_COMMAND_TAI_LIST_TYPE 0x54 typedef struct _nas_guti_reallocation_command_t { /* Mandatory fields */ nas_eps_mobile_identity_t guti; /* Optional fields */ c_uint32_t presencemask; nas_tracking_area_identity_list_t tai_list; } nas_guti_reallocation_command_t; /******************************************************* * AUTHENTICATION REQUEST ******************************************************/ typedef struct _nas_authentication_request_t { /* Mandatory fields */ nas_key_set_identifier_t nas_key_set_identifierasme; nas_authentication_parameter_rand_t authentication_parameter_rand; nas_authentication_parameter_autn_t authentication_parameter_autn; } nas_authentication_request_t; /******************************************************* * AUTHENTICATION RESPONSE ******************************************************/ typedef struct _nas_authentication_response_t { /* Mandatory fields */ nas_authentication_response_parameter_t authentication_response_parameter; } nas_authentication_response_t; /******************************************************* * IDENTITY REQUEST ******************************************************/ typedef struct _nas_identity_request_t { /* Mandatory fields */ nas_identity_type_2_t identity_type; } nas_identity_request_t; /******************************************************* * IDENTITY RESPONSE ******************************************************/ typedef struct _nas_identity_response_t { /* Mandatory fields */ nas_mobile_identity_t mobile_identity; } nas_identity_response_t; /******************************************************* * AUTHENTICATION FAILURE ******************************************************/ #define NAS_AUTHENTICATION_FAILURE_AUTHENTICATION_FAILURE_PARAMETER_PRESENT (1<<0) #define NAS_AUTHENTICATION_FAILURE_AUTHENTICATION_FAILURE_PARAMETER_TYPE 0x30 typedef struct _nas_authentication_failure_t { /* Mandatory fields */ nas_emm_cause_t emm_cause; /* Optional fields */ c_uint32_t presencemask; nas_authentication_failure_parameter_t authentication_failure_parameter; } nas_authentication_failure_t; /******************************************************* * SECURITY MODE COMMAND ******************************************************/ #define NAS_SECURITY_MODE_COMMAND_IMEISV_REQUEST_PRESENT (1<<0) #define NAS_SECURITY_MODE_COMMAND_REPLAYED_NONCEUE_PRESENT (1<<1) #define NAS_SECURITY_MODE_COMMAND_NONCEMME_PRESENT (1<<2) #define NAS_SECURITY_MODE_COMMAND_IMEISV_REQUEST_TYPE 0xC0 #define NAS_SECURITY_MODE_COMMAND_REPLAYED_NONCEUE_TYPE 0x55 #define NAS_SECURITY_MODE_COMMAND_NONCEMME_TYPE 0x56 typedef struct _nas_security_mode_command_t { /* Mandatory fields */ nas_security_algorithms_t selected_nas_security_algorithms; nas_key_set_identifier_t nas_key_set_identifier; nas_ue_security_capability_t replayed_ue_security_capabilities; /* Optional fields */ c_uint32_t presencemask; nas_imeisv_request_t imeisv_request; nas_nonce_t replayed_nonceue; nas_nonce_t noncemme; } nas_security_mode_command_t; /******************************************************* * SECURITY MODE COMPLETE ******************************************************/ #define NAS_SECURITY_MODE_COMPLETE_IMEISV_PRESENT (1<<0) #define NAS_SECURITY_MODE_COMPLETE_IMEISV_TYPE 0x23 typedef struct _nas_security_mode_complete_t { /* Optional fields */ c_uint32_t presencemask; nas_mobile_identity_t imeisv; } nas_security_mode_complete_t; /******************************************************* * SECURITY MODE REJECT ******************************************************/ typedef struct _nas_security_mode_reject_t { /* Mandatory fields */ nas_emm_cause_t emm_cause; } nas_security_mode_reject_t; /******************************************************* * EMM STATUS ******************************************************/ typedef struct _nas_emm_status_t { /* Mandatory fields */ nas_emm_cause_t emm_cause; } nas_emm_status_t; /******************************************************* * EMM INFORMATION ******************************************************/ #define NAS_EMM_INFORMATION_FULL_NAME_FOR_NETWORK_PRESENT (1<<0) #define NAS_EMM_INFORMATION_SHORT_NAME_FOR_NETWORK_PRESENT (1<<1) #define NAS_EMM_INFORMATION_LOCAL_TIME_ZONE_PRESENT (1<<2) #define NAS_EMM_INFORMATION_UNIVERSAL_TIME_AND_LOCAL_TIME_ZONE_PRESENT (1<<3) #define NAS_EMM_INFORMATION_NETWORK_DAYLIGHT_SAVING_TIME_PRESENT (1<<4) #define NAS_EMM_INFORMATION_FULL_NAME_FOR_NETWORK_TYPE 0x43 #define NAS_EMM_INFORMATION_SHORT_NAME_FOR_NETWORK_TYPE 0x45 #define NAS_EMM_INFORMATION_LOCAL_TIME_ZONE_TYPE 0x46 #define NAS_EMM_INFORMATION_UNIVERSAL_TIME_AND_LOCAL_TIME_ZONE_TYPE 0x47 #define NAS_EMM_INFORMATION_NETWORK_DAYLIGHT_SAVING_TIME_TYPE 0x49 typedef struct _nas_emm_information_t { /* Optional fields */ c_uint32_t presencemask; nas_network_name_t full_name_for_network; nas_network_name_t short_name_for_network; nas_time_zone_t local_time_zone; nas_time_zone_and_time_t universal_time_and_local_time_zone; nas_daylight_saving_time_t network_daylight_saving_time; } nas_emm_information_t; /******************************************************* * DOWNLINK NAS TRANSPORT ******************************************************/ typedef struct _nas_downlink_nas_transport_t { /* Mandatory fields */ nas_message_container_t nas_message_container; } nas_downlink_nas_transport_t; /******************************************************* * UPLINK NAS TRANSPORT ******************************************************/ typedef struct _nas_uplink_nas_transport_t { /* Mandatory fields */ nas_message_container_t nas_message_container; } nas_uplink_nas_transport_t; /******************************************************* * CS SERVICE NOTIFICATION ******************************************************/ #define NAS_CS_SERVICE_NOTIFICATION_CLI_PRESENT (1<<0) #define NAS_CS_SERVICE_NOTIFICATION_SS_CODE_PRESENT (1<<1) #define NAS_CS_SERVICE_NOTIFICATION_LCS_INDICATOR_PRESENT (1<<2) #define NAS_CS_SERVICE_NOTIFICATION_LCS_CLIENT_IDENTITY_PRESENT (1<<3) #define NAS_CS_SERVICE_NOTIFICATION_CLI_TYPE 0x60 #define NAS_CS_SERVICE_NOTIFICATION_SS_CODE_TYPE 0x61 #define NAS_CS_SERVICE_NOTIFICATION_LCS_INDICATOR_TYPE 0x62 #define NAS_CS_SERVICE_NOTIFICATION_LCS_CLIENT_IDENTITY_TYPE 0x63 typedef struct _nas_cs_service_notification_t { /* Mandatory fields */ nas_paging_identity_t paging_identity; /* Optional fields */ c_uint32_t presencemask; nas_cli_t cli; nas_ss_code_t ss_code; nas_lcs_indicator_t lcs_indicator; nas_lcs_client_identity_t lcs_client_identity; } nas_cs_service_notification_t; /******************************************************* * UPLINK GENERIC NAS TRANSPORT ******************************************************/ #define NAS_UPLINK_GENERIC_NAS_TRANSPORT_ADDITIONAL_INFORMATION_PRESENT (1<<0) #define NAS_UPLINK_GENERIC_NAS_TRANSPORT_ADDITIONAL_INFORMATION_TYPE 0x65 typedef struct _nas_uplink_generic_nas_transport_t { /* Mandatory fields */ nas_generic_message_container_type_t generic_message_container_type; nas_generic_message_container_t generic_message_container; /* Optional fields */ c_uint32_t presencemask; nas_additional_information_t additional_information; } nas_uplink_generic_nas_transport_t; /******************************************************* * DOWNLINK GENERIC NAS TRANSPORT ******************************************************/ #define NAS_DOWNLINK_GENERIC_NAS_TRANSPORT_ADDITIONAL_INFORMATION_PRESENT (1<<0) #define NAS_DOWNLINK_GENERIC_NAS_TRANSPORT_ADDITIONAL_INFORMATION_TYPE 0x65 typedef struct _nas_downlink_generic_nas_transport_t { /* Mandatory fields */ nas_generic_message_container_type_t generic_message_container_type; nas_generic_message_container_t generic_message_container; /* Optional fields */ c_uint32_t presencemask; nas_additional_information_t additional_information; } nas_downlink_generic_nas_transport_t; /******************************************************* * ACTIVATE DEFAULT EPS BEARER CONTEXT REQUEST ******************************************************/ #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_TRANSACTION_IDENTIFIER_PRESENT (1<<0) #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_QOS_PRESENT (1<<1) #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_PRESENT (1<<2) #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_RADIO_PRIORITY_PRESENT (1<<3) #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_PRESENT (1<<4) #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_APN_AMBR_PRESENT (1<<5) #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_ESM_CAUSE_PRESENT (1<<6) #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<7) #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_CONNECTIVITY_TYPE_PRESENT (1<<8) #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_PRESENT (1<<9) #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_PRESENT (1<<10) #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_HEADER_COMPRESSION_CONFIGURATION_PRESENT (1<<11) #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_CONTROL_PLANE_ONLY_INDICATION_PRESENT (1<<12) #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<13) #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_SERVING_PLMN_RATE_CONTROL_PRESENT (1<<14) #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_TRANSACTION_IDENTIFIER_TYPE 0x5D #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_QOS_TYPE 0x30 #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_TYPE 0x32 #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_RADIO_PRIORITY_TYPE 0x80 #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_TYPE 0x34 #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_APN_AMBR_TYPE 0x5E #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_ESM_CAUSE_TYPE 0x58 #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x27 #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_CONNECTIVITY_TYPE_TYPE 0xB0 #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_TYPE 0xC0 #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_TYPE 0x33 #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_HEADER_COMPRESSION_CONFIGURATION_TYPE 0x66 #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_CONTROL_PLANE_ONLY_INDICATION_TYPE 0x90 #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x7B #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_SERVING_PLMN_RATE_CONTROL_TYPE 0x6E typedef struct _nas_activate_default_eps_bearer_context_request_t { /* Mandatory fields */ nas_eps_quality_of_service_t eps_qos; nas_access_point_name_t access_point_name; nas_pdn_address_t pdn_address; /* Optional fields */ c_uint32_t presencemask; nas_transaction_identifier_t transaction_identifier; nas_quality_of_service_t negotiated_qos; nas_llc_service_access_point_identifier_t negotiated_llc_sapi; nas_radio_priority_t radio_priority; nas_packet_flow_identifier_t packet_flow_identifier; nas_apn_aggregate_maximum_bit_rate_t apn_ambr; nas_esm_cause_t esm_cause; nas_protocol_configuration_options_t protocol_configuration_options; nas_connectivity_type_t connectivity_type; nas_wlan_offload_acceptability_t wlan_offload_indication; nas_nbifom_container_t nbifom_container; nas_header_compression_configuration_t header_compression_configuration; nas_control_plane_only_indication_t control_plane_only_indication; nas_extended_protocol_configuration_options_t extended_protocol_configuration_options; nas_serving_plmn_rate_control_t serving_plmn_rate_control; } nas_activate_default_eps_bearer_context_request_t; /******************************************************* * ACTIVATE DEFAULT EPS BEARER CONTEXT ACCEPT ******************************************************/ #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<0) #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<1) #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x27 #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x7B typedef struct _nas_activate_default_eps_bearer_context_accept_t { /* Optional fields */ c_uint32_t presencemask; nas_protocol_configuration_options_t protocol_configuration_options; nas_extended_protocol_configuration_options_t extended_protocol_configuration_options; } nas_activate_default_eps_bearer_context_accept_t; /******************************************************* * ACTIVATE DEFAULT EPS BEARER CONTEXT REJECT ******************************************************/ #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<0) #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<1) #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x27 #define NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x7B typedef struct _nas_activate_default_eps_bearer_context_reject_t { /* Mandatory fields */ nas_esm_cause_t esm_cause; /* Optional fields */ c_uint32_t presencemask; nas_protocol_configuration_options_t protocol_configuration_options; nas_extended_protocol_configuration_options_t extended_protocol_configuration_options; } nas_activate_default_eps_bearer_context_reject_t; /******************************************************* * ACTIVATE DEDICATED EPS BEARER CONTEXT REQUEST ******************************************************/ #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_TRANSACTION_IDENTIFIER_PRESENT (1<<0) #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_QOS_PRESENT (1<<1) #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_PRESENT (1<<2) #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_RADIO_PRIORITY_PRESENT (1<<3) #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_PRESENT (1<<4) #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<5) #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_PRESENT (1<<6) #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_PRESENT (1<<7) #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<8) #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_TRANSACTION_IDENTIFIER_TYPE 0x5D #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_QOS_TYPE 0x30 #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_TYPE 0x32 #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_RADIO_PRIORITY_TYPE 0x80 #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_TYPE 0x34 #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x27 #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_TYPE 0xC0 #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_TYPE 0x33 #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x7B typedef struct _nas_activate_dedicated_eps_bearer_context_request_t { /* Mandatory fields */ nas_linked_eps_bearer_identity_t linked_eps_bearer_identity; nas_eps_quality_of_service_t eps_qos; nas_traffic_flow_template_t tft; /* Optional fields */ c_uint32_t presencemask; nas_transaction_identifier_t transaction_identifier; nas_quality_of_service_t negotiated_qos; nas_llc_service_access_point_identifier_t negotiated_llc_sapi; nas_radio_priority_t radio_priority; nas_packet_flow_identifier_t packet_flow_identifier; nas_protocol_configuration_options_t protocol_configuration_options; nas_wlan_offload_acceptability_t wlan_offload_indication; nas_nbifom_container_t nbifom_container; nas_extended_protocol_configuration_options_t extended_protocol_configuration_options; } nas_activate_dedicated_eps_bearer_context_request_t; /******************************************************* * ACTIVATE DEDICATED EPS BEARER CONTEXT ACCEPT ******************************************************/ #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<0) #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_NBIFOM_CONTAINER_PRESENT (1<<1) #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<2) #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x27 #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_NBIFOM_CONTAINER_TYPE 0x33 #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x7B typedef struct _nas_activate_dedicated_eps_bearer_context_accept_t { /* Optional fields */ c_uint32_t presencemask; nas_protocol_configuration_options_t protocol_configuration_options; nas_nbifom_container_t nbifom_container; nas_extended_protocol_configuration_options_t extended_protocol_configuration_options; } nas_activate_dedicated_eps_bearer_context_accept_t; /******************************************************* * ACTIVATE DEDICATED EPS BEARER CONTEXT REJECT ******************************************************/ #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<0) #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_NBIFOM_CONTAINER_PRESENT (1<<1) #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<2) #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x27 #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_NBIFOM_CONTAINER_TYPE 0x33 #define NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x7B typedef struct _nas_activate_dedicated_eps_bearer_context_reject_t { /* Mandatory fields */ nas_esm_cause_t esm_cause; /* Optional fields */ c_uint32_t presencemask; nas_protocol_configuration_options_t protocol_configuration_options; nas_nbifom_container_t nbifom_container; nas_extended_protocol_configuration_options_t extended_protocol_configuration_options; } nas_activate_dedicated_eps_bearer_context_reject_t; /******************************************************* * MODIFY EPS BEARER CONTEXT REQUEST ******************************************************/ #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEW_EPS_QOS_PRESENT (1<<0) #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_TFT_PRESENT (1<<1) #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEW_QOS_PRESENT (1<<2) #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_PRESENT (1<<3) #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_RADIO_PRIORITY_PRESENT (1<<4) #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_PRESENT (1<<5) #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_APN_AMBR_PRESENT (1<<6) #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<7) #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_PRESENT (1<<8) #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_PRESENT (1<<9) #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_HEADER_COMPRESSION_CONFIGURATION_PRESENT (1<<10) #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<11) #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEW_EPS_QOS_TYPE 0x5B #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_TFT_TYPE 0x36 #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEW_QOS_TYPE 0x30 #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEGOTIATED_LLC_SAPI_TYPE 0x32 #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_RADIO_PRIORITY_TYPE 0x80 #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_PACKET_FLOW_IDENTIFIER_TYPE 0x34 #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_APN_AMBR_TYPE 0x5E #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x27 #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_TYPE 0xC0 #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_TYPE 0x33 #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_HEADER_COMPRESSION_CONFIGURATION_TYPE 0x66 #define NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x7B typedef struct _nas_modify_eps_bearer_context_request_t { /* Optional fields */ c_uint32_t presencemask; nas_eps_quality_of_service_t new_eps_qos; nas_traffic_flow_template_t tft; nas_quality_of_service_t new_qos; nas_llc_service_access_point_identifier_t negotiated_llc_sapi; nas_radio_priority_t radio_priority; nas_packet_flow_identifier_t packet_flow_identifier; nas_apn_aggregate_maximum_bit_rate_t apn_ambr; nas_protocol_configuration_options_t protocol_configuration_options; nas_wlan_offload_acceptability_t wlan_offload_indication; nas_nbifom_container_t nbifom_container; nas_header_compression_configuration_t header_compression_configuration; nas_extended_protocol_configuration_options_t extended_protocol_configuration_options; } nas_modify_eps_bearer_context_request_t; /******************************************************* * MODIFY EPS BEARER CONTEXT ACCEPT ******************************************************/ #define NAS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<0) #define NAS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_NBIFOM_CONTAINER_PRESENT (1<<1) #define NAS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<2) #define NAS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x27 #define NAS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_NBIFOM_CONTAINER_TYPE 0x33 #define NAS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x7B typedef struct _nas_modify_eps_bearer_context_accept_t { /* Optional fields */ c_uint32_t presencemask; nas_protocol_configuration_options_t protocol_configuration_options; nas_nbifom_container_t nbifom_container; nas_extended_protocol_configuration_options_t extended_protocol_configuration_options; } nas_modify_eps_bearer_context_accept_t; /******************************************************* * MODIFY EPS BEARER CONTEXT REJECT ******************************************************/ #define NAS_MODIFY_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<0) #define NAS_MODIFY_EPS_BEARER_CONTEXT_REJECT_NBIFOM_CONTAINER_PRESENT (1<<1) #define NAS_MODIFY_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<2) #define NAS_MODIFY_EPS_BEARER_CONTEXT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x27 #define NAS_MODIFY_EPS_BEARER_CONTEXT_REJECT_NBIFOM_CONTAINER_TYPE 0x33 #define NAS_MODIFY_EPS_BEARER_CONTEXT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x7B typedef struct _nas_modify_eps_bearer_context_reject_t { /* Mandatory fields */ nas_esm_cause_t esm_cause; /* Optional fields */ c_uint32_t presencemask; nas_protocol_configuration_options_t protocol_configuration_options; nas_nbifom_container_t nbifom_container; nas_extended_protocol_configuration_options_t extended_protocol_configuration_options; } nas_modify_eps_bearer_context_reject_t; /******************************************************* * DEACTIVATE EPS BEARER CONTEXT REQUEST ******************************************************/ #define NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<0) #define NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_T3396_VALUE_PRESENT (1<<1) #define NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_PRESENT (1<<2) #define NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_PRESENT (1<<3) #define NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<4) #define NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x27 #define NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_T3396_VALUE_TYPE 0x37 #define NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_WLAN_OFFLOAD_INDICATION_TYPE 0xC0 #define NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_NBIFOM_CONTAINER_TYPE 0x33 #define NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x7B typedef struct _nas_deactivate_eps_bearer_context_request_t { /* Mandatory fields */ nas_esm_cause_t esm_cause; /* Optional fields */ c_uint32_t presencemask; nas_protocol_configuration_options_t protocol_configuration_options; nas_gprs_timer_3_t t3396_value; nas_wlan_offload_acceptability_t wlan_offload_indication; nas_nbifom_container_t nbifom_container; nas_extended_protocol_configuration_options_t extended_protocol_configuration_options; } nas_deactivate_eps_bearer_context_request_t; /******************************************************* * DEACTIVATE EPS BEARER CONTEXT ACCEPT ******************************************************/ #define NAS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<0) #define NAS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<1) #define NAS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x27 #define NAS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x7B typedef struct _nas_deactivate_eps_bearer_context_accept_t { /* Optional fields */ c_uint32_t presencemask; nas_protocol_configuration_options_t protocol_configuration_options; nas_extended_protocol_configuration_options_t extended_protocol_configuration_options; } nas_deactivate_eps_bearer_context_accept_t; /******************************************************* * PDN CONNECTIVITY REQUEST ******************************************************/ #define NAS_PDN_CONNECTIVITY_REQUEST_ESM_INFORMATION_TRANSFER_FLAG_PRESENT (1<<0) #define NAS_PDN_CONNECTIVITY_REQUEST_ACCESS_POINT_NAME_PRESENT (1<<1) #define NAS_PDN_CONNECTIVITY_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<2) #define NAS_PDN_CONNECTIVITY_REQUEST_DEVICE_PROPERTIES_PRESENT (1<<3) #define NAS_PDN_CONNECTIVITY_REQUEST_NBIFOM_CONTAINER_PRESENT (1<<4) #define NAS_PDN_CONNECTIVITY_REQUEST_HEADER_COMPRESSION_CONFIGURATION_PRESENT (1<<5) #define NAS_PDN_CONNECTIVITY_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<6) #define NAS_PDN_CONNECTIVITY_REQUEST_ESM_INFORMATION_TRANSFER_FLAG_TYPE 0xD0 #define NAS_PDN_CONNECTIVITY_REQUEST_ACCESS_POINT_NAME_TYPE 0x28 #define NAS_PDN_CONNECTIVITY_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x27 #define NAS_PDN_CONNECTIVITY_REQUEST_DEVICE_PROPERTIES_TYPE 0xC0 #define NAS_PDN_CONNECTIVITY_REQUEST_NBIFOM_CONTAINER_TYPE 0x33 #define NAS_PDN_CONNECTIVITY_REQUEST_HEADER_COMPRESSION_CONFIGURATION_TYPE 0x66 #define NAS_PDN_CONNECTIVITY_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x7B typedef struct _nas_pdn_connectivity_request_t { /* Mandatory fields */ nas_request_type_t request_type; /* Optional fields */ c_uint32_t presencemask; nas_esm_information_transfer_flag_t esm_information_transfer_flag; nas_access_point_name_t access_point_name; nas_protocol_configuration_options_t protocol_configuration_options; nas_device_properties_t device_properties; nas_nbifom_container_t nbifom_container; nas_header_compression_configuration_t header_compression_configuration; nas_extended_protocol_configuration_options_t extended_protocol_configuration_options; } nas_pdn_connectivity_request_t; /******************************************************* * PDN CONNECTIVITY REJECT ******************************************************/ #define NAS_PDN_CONNECTIVITY_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<0) #define NAS_PDN_CONNECTIVITY_REJECT_BACK_OFF_TIMER_VALUE_PRESENT (1<<1) #define NAS_PDN_CONNECTIVITY_REJECT_RE_ATTEMPT_INDICATOR_PRESENT (1<<2) #define NAS_PDN_CONNECTIVITY_REJECT_NBIFOM_CONTAINER_PRESENT (1<<3) #define NAS_PDN_CONNECTIVITY_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<4) #define NAS_PDN_CONNECTIVITY_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x27 #define NAS_PDN_CONNECTIVITY_REJECT_BACK_OFF_TIMER_VALUE_TYPE 0x37 #define NAS_PDN_CONNECTIVITY_REJECT_RE_ATTEMPT_INDICATOR_TYPE 0x6B #define NAS_PDN_CONNECTIVITY_REJECT_NBIFOM_CONTAINER_TYPE 0x33 #define NAS_PDN_CONNECTIVITY_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x7B typedef struct _nas_pdn_connectivity_reject_t { /* Mandatory fields */ nas_esm_cause_t esm_cause; /* Optional fields */ c_uint32_t presencemask; nas_protocol_configuration_options_t protocol_configuration_options; nas_gprs_timer_3_t back_off_timer_value; nas_re_attempt_indicator_t re_attempt_indicator; nas_nbifom_container_t nbifom_container; nas_extended_protocol_configuration_options_t extended_protocol_configuration_options; } nas_pdn_connectivity_reject_t; /******************************************************* * PDN DISCONNECT REQUEST ******************************************************/ #define NAS_PDN_DISCONNECT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<0) #define NAS_PDN_DISCONNECT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<1) #define NAS_PDN_DISCONNECT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x27 #define NAS_PDN_DISCONNECT_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x7B typedef struct _nas_pdn_disconnect_request_t { /* Mandatory fields */ nas_linked_eps_bearer_identity_t linked_eps_bearer_identity; /* Optional fields */ c_uint32_t presencemask; nas_protocol_configuration_options_t protocol_configuration_options; nas_extended_protocol_configuration_options_t extended_protocol_configuration_options; } nas_pdn_disconnect_request_t; /******************************************************* * PDN DISCONNECT REJECT ******************************************************/ #define NAS_PDN_DISCONNECT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<0) #define NAS_PDN_DISCONNECT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<1) #define NAS_PDN_DISCONNECT_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x27 #define NAS_PDN_DISCONNECT_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x7B typedef struct _nas_pdn_disconnect_reject_t { /* Mandatory fields */ nas_esm_cause_t esm_cause; /* Optional fields */ c_uint32_t presencemask; nas_protocol_configuration_options_t protocol_configuration_options; nas_extended_protocol_configuration_options_t extended_protocol_configuration_options; } nas_pdn_disconnect_reject_t; /******************************************************* * BEARER RESOURCE ALLOCATION REQUEST ******************************************************/ #define NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<0) #define NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_DEVICE_PROPERTIES_PRESENT (1<<1) #define NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_NBIFOM_CONTAINER_PRESENT (1<<2) #define NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<3) #define NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x27 #define NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_DEVICE_PROPERTIES_TYPE 0xC0 #define NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_NBIFOM_CONTAINER_TYPE 0x33 #define NAS_BEARER_RESOURCE_ALLOCATION_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x7B typedef struct _nas_bearer_resource_allocation_request_t { /* Mandatory fields */ nas_linked_eps_bearer_identity_t linked_eps_bearer_identity; nas_traffic_flow_aggregate_description_t traffic_flow_aggregate; nas_eps_quality_of_service_t required_traffic_flow_qos; /* Optional fields */ c_uint32_t presencemask; nas_protocol_configuration_options_t protocol_configuration_options; nas_device_properties_t device_properties; nas_nbifom_container_t nbifom_container; nas_extended_protocol_configuration_options_t extended_protocol_configuration_options; } nas_bearer_resource_allocation_request_t; /******************************************************* * BEARER RESOURCE ALLOCATION REJECT ******************************************************/ #define NAS_BEARER_RESOURCE_ALLOCATION_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<0) #define NAS_BEARER_RESOURCE_ALLOCATION_REJECT_BACK_OFF_TIMER_VALUE_PRESENT (1<<1) #define NAS_BEARER_RESOURCE_ALLOCATION_REJECT_RE_ATTEMPT_INDICATOR_PRESENT (1<<2) #define NAS_BEARER_RESOURCE_ALLOCATION_REJECT_NBIFOM_CONTAINER_PRESENT (1<<3) #define NAS_BEARER_RESOURCE_ALLOCATION_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<4) #define NAS_BEARER_RESOURCE_ALLOCATION_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x27 #define NAS_BEARER_RESOURCE_ALLOCATION_REJECT_BACK_OFF_TIMER_VALUE_TYPE 0x37 #define NAS_BEARER_RESOURCE_ALLOCATION_REJECT_RE_ATTEMPT_INDICATOR_TYPE 0x6B #define NAS_BEARER_RESOURCE_ALLOCATION_REJECT_NBIFOM_CONTAINER_TYPE 0x33 #define NAS_BEARER_RESOURCE_ALLOCATION_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x7B typedef struct _nas_bearer_resource_allocation_reject_t { /* Mandatory fields */ nas_esm_cause_t esm_cause; /* Optional fields */ c_uint32_t presencemask; nas_protocol_configuration_options_t protocol_configuration_options; nas_gprs_timer_3_t back_off_timer_value; nas_re_attempt_indicator_t re_attempt_indicator; nas_nbifom_container_t nbifom_container; nas_extended_protocol_configuration_options_t extended_protocol_configuration_options; } nas_bearer_resource_allocation_reject_t; /******************************************************* * BEARER RESOURCE MODIFICATION REQUEST ******************************************************/ #define NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_REQUIRED_TRAFFIC_FLOW_QOS_PRESENT (1<<0) #define NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_ESM_CAUSE_PRESENT (1<<1) #define NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<2) #define NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_DEVICE_PROPERTIES_PRESENT (1<<3) #define NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_NBIFOM_CONTAINER_PRESENT (1<<4) #define NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_HEADER_COMPRESSION_CONFIGURATION_PRESENT (1<<5) #define NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<6) #define NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_REQUIRED_TRAFFIC_FLOW_QOS_TYPE 0x5B #define NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_ESM_CAUSE_TYPE 0x58 #define NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x27 #define NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_DEVICE_PROPERTIES_TYPE 0xC0 #define NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_NBIFOM_CONTAINER_TYPE 0x33 #define NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_HEADER_COMPRESSION_CONFIGURATION_TYPE 0x66 #define NAS_BEARER_RESOURCE_MODIFICATION_REQUEST_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x7B typedef struct _nas_bearer_resource_modification_request_t { /* Mandatory fields */ nas_linked_eps_bearer_identity_t eps_bearer_identity_for_packet_filter; nas_traffic_flow_aggregate_description_t traffic_flow_aggregate; /* Optional fields */ c_uint32_t presencemask; nas_eps_quality_of_service_t required_traffic_flow_qos; nas_esm_cause_t esm_cause; nas_protocol_configuration_options_t protocol_configuration_options; nas_device_properties_t device_properties; nas_nbifom_container_t nbifom_container; nas_header_compression_configuration_t header_compression_configuration; nas_extended_protocol_configuration_options_t extended_protocol_configuration_options; } nas_bearer_resource_modification_request_t; /******************************************************* * BEARER RESOURCE MODIFICATION REJECT ******************************************************/ #define NAS_BEARER_RESOURCE_MODIFICATION_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<0) #define NAS_BEARER_RESOURCE_MODIFICATION_REJECT_BACK_OFF_TIMER_VALUE_PRESENT (1<<1) #define NAS_BEARER_RESOURCE_MODIFICATION_REJECT_RE_ATTEMPT_INDICATOR_PRESENT (1<<2) #define NAS_BEARER_RESOURCE_MODIFICATION_REJECT_NBIFOM_CONTAINER_PRESENT (1<<3) #define NAS_BEARER_RESOURCE_MODIFICATION_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<4) #define NAS_BEARER_RESOURCE_MODIFICATION_REJECT_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x27 #define NAS_BEARER_RESOURCE_MODIFICATION_REJECT_BACK_OFF_TIMER_VALUE_TYPE 0x37 #define NAS_BEARER_RESOURCE_MODIFICATION_REJECT_RE_ATTEMPT_INDICATOR_TYPE 0x6B #define NAS_BEARER_RESOURCE_MODIFICATION_REJECT_NBIFOM_CONTAINER_TYPE 0x33 #define NAS_BEARER_RESOURCE_MODIFICATION_REJECT_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x7B typedef struct _nas_bearer_resource_modification_reject_t { /* Mandatory fields */ nas_esm_cause_t esm_cause; /* Optional fields */ c_uint32_t presencemask; nas_protocol_configuration_options_t protocol_configuration_options; nas_gprs_timer_3_t back_off_timer_value; nas_re_attempt_indicator_t re_attempt_indicator; nas_nbifom_container_t nbifom_container; nas_extended_protocol_configuration_options_t extended_protocol_configuration_options; } nas_bearer_resource_modification_reject_t; /******************************************************* * ESM INFORMATION RESPONSE ******************************************************/ #define NAS_ESM_INFORMATION_RESPONSE_ACCESS_POINT_NAME_PRESENT (1<<0) #define NAS_ESM_INFORMATION_RESPONSE_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<1) #define NAS_ESM_INFORMATION_RESPONSE_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT (1<<2) #define NAS_ESM_INFORMATION_RESPONSE_ACCESS_POINT_NAME_TYPE 0x28 #define NAS_ESM_INFORMATION_RESPONSE_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x27 #define NAS_ESM_INFORMATION_RESPONSE_EXTENDED_PROTOCOL_CONFIGURATION_OPTIONS_TYPE 0x7B typedef struct _nas_esm_information_response_t { /* Optional fields */ c_uint32_t presencemask; nas_access_point_name_t access_point_name; nas_protocol_configuration_options_t protocol_configuration_options; nas_extended_protocol_configuration_options_t extended_protocol_configuration_options; } nas_esm_information_response_t; /******************************************************* * ESM STATUS ******************************************************/ typedef struct _nas_esm_status_t { /* Mandatory fields */ nas_esm_cause_t esm_cause; } nas_esm_status_t; typedef struct _nas_emm_message_t { nas_emm_header_t h; union { nas_attach_request_t attach_request; nas_attach_accept_t attach_accept; nas_attach_complete_t attach_complete; nas_attach_reject_t attach_reject; nas_detach_request_from_ue_t detach_request_from_ue; nas_detach_request_to_ue_t detach_request_to_ue; nas_tracking_area_update_request_t tracking_area_update_request; nas_tracking_area_update_accept_t tracking_area_update_accept; nas_tracking_area_update_reject_t tracking_area_update_reject; nas_extended_service_request_t extended_service_request; nas_service_request_t service_request; nas_service_reject_t service_reject; nas_guti_reallocation_command_t guti_reallocation_command; nas_authentication_request_t authentication_request; nas_authentication_response_t authentication_response; nas_identity_request_t identity_request; nas_identity_response_t identity_response; nas_authentication_failure_t authentication_failure; nas_security_mode_command_t security_mode_command; nas_security_mode_complete_t security_mode_complete; nas_security_mode_reject_t security_mode_reject; nas_emm_status_t emm_status; nas_emm_information_t emm_information; nas_downlink_nas_transport_t downlink_nas_transport; nas_uplink_nas_transport_t uplink_nas_transport; nas_cs_service_notification_t cs_service_notification; nas_uplink_generic_nas_transport_t uplink_generic_nas_transport; nas_downlink_generic_nas_transport_t downlink_generic_nas_transport; }; } nas_emm_message_t; typedef struct _nas_esm_message_t { nas_esm_header_t h; union { nas_activate_default_eps_bearer_context_request_t activate_default_eps_bearer_context_request; nas_activate_default_eps_bearer_context_accept_t activate_default_eps_bearer_context_accept; nas_activate_default_eps_bearer_context_reject_t activate_default_eps_bearer_context_reject; nas_activate_dedicated_eps_bearer_context_request_t activate_dedicated_eps_bearer_context_request; nas_activate_dedicated_eps_bearer_context_accept_t activate_dedicated_eps_bearer_context_accept; nas_activate_dedicated_eps_bearer_context_reject_t activate_dedicated_eps_bearer_context_reject; nas_modify_eps_bearer_context_request_t modify_eps_bearer_context_request; nas_modify_eps_bearer_context_accept_t modify_eps_bearer_context_accept; nas_modify_eps_bearer_context_reject_t modify_eps_bearer_context_reject; nas_deactivate_eps_bearer_context_request_t deactivate_eps_bearer_context_request; nas_deactivate_eps_bearer_context_accept_t deactivate_eps_bearer_context_accept; nas_pdn_connectivity_request_t pdn_connectivity_request; nas_pdn_connectivity_reject_t pdn_connectivity_reject; nas_pdn_disconnect_request_t pdn_disconnect_request; nas_pdn_disconnect_reject_t pdn_disconnect_reject; nas_bearer_resource_allocation_request_t bearer_resource_allocation_request; nas_bearer_resource_allocation_reject_t bearer_resource_allocation_reject; nas_bearer_resource_modification_request_t bearer_resource_modification_request; nas_bearer_resource_modification_reject_t bearer_resource_modification_reject; nas_esm_information_response_t esm_information_response; nas_esm_status_t esm_status; }; } nas_esm_message_t; typedef struct _nas_message_t { nas_security_header_t h; union { nas_emm_message_t emm; nas_esm_message_t esm; }; } nas_message_t; CORE_DECLARE(status_t) nas_emm_decode(nas_message_t *message, pkbuf_t *pkbuf); CORE_DECLARE(status_t) nas_esm_decode(nas_message_t *message, pkbuf_t *pkbuf); CORE_DECLARE(status_t) nas_plain_encode( pkbuf_t **pkbuf, nas_message_t *message); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __NAS_MESSAGE_H__ */ nextepc-0.3.10/lib/nas/nas_types.c000066400000000000000000000223711333553357400167610ustar00rootroot00000000000000#define TRACE_MODULE _nas_types #include "core_debug.h" #include "core_lib.h" #include "nas_types.h" static c_uint8_t br_calculate( c_uint8_t *br, c_uint8_t *extended, c_uint8_t *extended2, c_uint64_t input) { c_uint8_t length = 0; /* Octet 3 : 00000000 Reserved, 11111111 0kbps */ if (input < 1) { *br = 0xff; length = c_max(length, 1); return length; } /* * Octet 7 : 00000000 * Use the value indicated by the APN-AMBR for downlink and * APN-AMBR for downlink (extended) in octets 3 and 5. * * Octet 7 : 00000001 - 11111110 * The APN-AMBR is * (the binary coded value in 8 bits) * 256 Mbps + * (the value indicated by the APN-AMBR for downlink * and APN-AMBR for downlink (extended) in octets 3 and 5), * giving a range of 256 Mbps to 65280 Mbps. */ if (input > (65200*1024)) { *extended2 = 0b11111110; length = c_max(length, 3); input %= (256*1024); } else if (input >= (256*1024) && input <= (65200*1024)) { *extended2 = input / (256*1024); length = c_max(length, 3); input %= (256*1024); } /* Octet 3 : 00000001 - 00111111 * The APN-AMBR is binary coded in 8 bits, using a granularity of 1 kbps * giving a range of values from 1 kbps to 63 kbps in 1 kbps increments. */ if (input >= 1 && input <= 63) { *br = input; length = c_max(length, 1); } /* Octet 3 : 01000000 - 01111111 * The APN-AMBR is * 64 kbps + ((the binary coded value in 8 bits –01000000) * 8 kbps) * giving a range of values from 64 kbps to 568 kbps * in 8 kbps increments. */ else if (input >= 64 && input <= 568) { *br = ((input - 64) / 8) + 0b01000000; length = c_max(length, 1); } /* Set to 568 Kbps */ else if (input > 568 && input < 576) { *br = 0b01111111; length = c_max(length, 1); } /* Octet 3 : 10000000 - 111111110 * The APN-AMBR is * 576 kbps + ((the binary coded value in 8 bits –10000000) * 64 kbps) * giving a range of values from 576 kbps to 8640 kbps * in 64 kbps increments. */ else if (input >= 576 && input <= 8640) { *br = ((input - 576) / 64) + 0b10000000; length = c_max(length, 1); } /* Set to 8640 Kbps */ else if (input > 8640 && input < 8700) { *br = 0b11111110; length = c_max(length, 1); } /* If the network wants to indicate an APN-AMBR * for downlink higher than 8640 kbps, * it shall set octet 3 to "11111110", i.e. 8640 kbps, * and shall encode the value for the APN-AMBR in octet 5. * * Octet 5 : 00000000 * Use the value indicated by the APN-AMBR for downlink in octet 3. * * Octet 5 : All other values shall be interpreted as '11111010'. * * Octet 5 : 00000001 - 01001010 * The APN-AMBR is * 8600 kbps + ((the binary coded value in 8 bits) * 100 kbps), * giving a range of values from 8700 kbps to 16000 kbps * in 100 kbps increments. */ else if (input >= 8700 && input <= 16000) { *br = 0b11111110; *extended = ((input - 8600) / 100); length = c_max(length, 2); } /* Set to 16000 Kbps */ else if (input > 16000 && input < (17*1024)) { *br = 0b11111110; *extended = 0b01001010; length = c_max(length, 2); } /* Octet 5: 01001011 - 10111010 * The APN-AMBR is * 16 Mbps + ((the binary coded value in 8 bits - 01001010) * 1 Mbps), * giving a range of values from 17 Mbps to 128 Mbps * in 1 Mbps increments. */ else if (input >= (17*1024) && input <= (128*1024)) { *br = 0b11111110; *extended = ((input - (16*1024)) / (1*1024)) + 0b01001010; length = c_max(length, 2); } /* Set to 128 Mbps */ else if (input > (128*1024) && input < (130*1024)) { *br = 0b11111110; *extended = 0b10111010; length = c_max(length, 2); } /* Octet 5: 10111011 - 11111010 * The APN-AMBR is * 128 Mbps + ((the binary coded value in 8 bits - 10111010) * 2 Mbps), * giving a range of values from 130 Mbps to 256 Mbps * in 2 Mbps increments. */ else if (input >= (130*1024) && input <= (256*1024)) { *br = 0b11111110; *extended = ((input - (128*1024)) / (2*1024)) + 0b10111010; length = c_max(length, 2); } return length; } void apn_ambr_build( nas_apn_aggregate_maximum_bit_rate_t *apn_aggregate_maximum_bit_rate, c_uint32_t dl_apn_ambr, c_uint32_t ul_apn_ambr) { c_uint8_t length = 0; dl_apn_ambr = dl_apn_ambr / 1024; /* Kbps */ ul_apn_ambr = ul_apn_ambr / 1024; /* Kbps */ memset(apn_aggregate_maximum_bit_rate, 0, sizeof(nas_apn_aggregate_maximum_bit_rate_t)); length = c_max(length, br_calculate( &apn_aggregate_maximum_bit_rate->dl_apn_ambr, &apn_aggregate_maximum_bit_rate->dl_apn_ambr_extended, &apn_aggregate_maximum_bit_rate->dl_apn_ambr_extended2, dl_apn_ambr)); length = c_max(length, br_calculate( &apn_aggregate_maximum_bit_rate->ul_apn_ambr, &apn_aggregate_maximum_bit_rate->ul_apn_ambr_extended, &apn_aggregate_maximum_bit_rate->ul_apn_ambr_extended2, ul_apn_ambr)); apn_aggregate_maximum_bit_rate->length = length*2; } void eps_qos_build(nas_eps_quality_of_service_t *eps_qos, c_uint8_t qci, c_uint64_t dl_mbr, c_uint64_t ul_mbr, c_uint64_t dl_gbr, c_uint64_t ul_gbr) { c_uint8_t length = 0; dl_mbr = dl_mbr / 1024; /* Kbps */ ul_mbr = ul_mbr / 1024; /* Kbps */ dl_gbr = dl_gbr / 1024; /* Kbps */ ul_gbr = ul_gbr / 1024; /* Kbps */ memset(eps_qos, 0, sizeof(nas_eps_quality_of_service_t)); eps_qos->qci = qci; if (dl_mbr) length = c_max(length, br_calculate( &eps_qos->dl_mbr, &eps_qos->dl_mbr_extended, &eps_qos->dl_mbr_extended2, dl_mbr)); if (ul_mbr) length = c_max(length, br_calculate( &eps_qos->ul_mbr, &eps_qos->ul_mbr_extended, &eps_qos->ul_mbr_extended2, ul_mbr)); if (dl_gbr) length = c_max(length, br_calculate( &eps_qos->dl_gbr, &eps_qos->dl_gbr_extended, &eps_qos->dl_gbr_extended2, dl_gbr)); if (ul_gbr) length = c_max(length, br_calculate( &eps_qos->ul_gbr, &eps_qos->ul_gbr_extended, &eps_qos->ul_gbr_extended2, ul_gbr)); eps_qos->length = length*4+1; } void nas_tai_list_build( nas_tracking_area_identity_list_t *target, tai0_list_t *source0, tai2_list_t *source2) { int i = 0, j = 0, size = 0; tai0_list_t target0; tai2_list_t target2; d_assert(target, return,); d_assert(source0, return,); d_assert(source2, return,); memset(target, 0, sizeof(nas_tracking_area_identity_list_t)); memset(&target0, 0, sizeof(tai0_list_t)); memset(&target2, 0, sizeof(tai2_list_t)); for (i = 0; source0->tai[i].num; i++) { d_assert(source0->tai[i].type == TAI0_TYPE, return, "type = %d", source0->tai[i].type); target0.tai[i].type = source0->tai[i].type; /* target->num = source->num - 1 */ d_assert(source0->tai[i].num < MAX_NUM_OF_TAI, return, "num = %d", source0->tai[i].num); target0.tai[i].num = source0->tai[i].num - 1; memcpy(&target0.tai[i].plmn_id, &source0->tai[i].plmn_id, PLMN_ID_LEN); for (j = 0; j < source0->tai[i].num; j++) { target0.tai[i].tac[j] = htons(source0->tai[i].tac[j]); } size = (1 + 3 + 2 * source0->tai[i].num); if ((target->length + size) > NAS_MAX_TAI_LIST_LEN) { d_warn("Overflow: Ignore remained TAI LIST(length:%d, size:%d)", target->length, size); return; } memcpy(target->buffer + target->length, &target0.tai[i], size); target->length += size; } if (source2->num) { memset(&target2, 0, sizeof(target2)); d_assert(source2->type == TAI1_TYPE || source2->type == TAI2_TYPE, return, "type = %d", source2->type); target2.type = source2->type; /* target->num = source->num - 1 */ d_assert(source2->num < MAX_NUM_OF_TAI, return, "num = %d", source2->num); target2.num = source2->num - 1; size = (1 + (3 + 2) * source2->num); if ((target->length + size) > NAS_MAX_TAI_LIST_LEN) { d_warn("Overflow: Ignore remained TAI LIST(length:%d, size:%d)", target->length, size); return; } for (i = 0; i < source2->num; i++) { memcpy(&target2.tai[i].plmn_id, &source2->tai[i].plmn_id, PLMN_ID_LEN); target2.tai[i].tac = htons(source2->tai[i].tac); } memcpy(target->buffer + target->length, &target2, size); target->length += size; } } nextepc-0.3.10/lib/nas/nas_types.h000066400000000000000000001272101333553357400167640ustar00rootroot00000000000000#ifndef _NAS_TYPES_H__ #define _NAS_TYPES_H__ #include "3gpp_types.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define NAS_CLEAR_DATA(__dATA) \ do { \ d_assert((__dATA), , "Null param"); \ if ((__dATA)->buffer) \ { \ CORE_FREE((__dATA)->buffer); \ (__dATA)->buffer = NULL; \ (__dATA)->length = 0; \ } \ } while(0) #define NAS_STORE_DATA(__dST, __sRC) \ do { \ d_assert((__sRC),, "Null param") \ d_assert((__sRC)->buffer,, "Null param") \ d_assert((__dST),, "Null param") \ NAS_CLEAR_DATA(__dST); \ (__dST)->length = (__sRC)->length; \ (__dST)->buffer = core_calloc((__dST)->length, sizeof(c_uint8_t)); \ memcpy((__dST)->buffer, (__sRC)->buffer, (__dST)->length); \ } while(0) #define NAS_KSI_NO_KEY_IS_AVAILABLE 0x7 /* 9.9.2.0 Additional information * O TLV 3-n */ #define NAX_MAX_ADDITIONAL_INFORMATION_LEN 255 typedef struct _nas_additional_information_t { c_uint8_t length; c_uint8_t buffer[NAX_MAX_ADDITIONAL_INFORMATION_LEN]; } __attribute__ ((packed)) nas_additional_information_t; /* 9.9.2.0A Device properties * See subclause 10.5.7.8 in 3GPP TS 24.008 [13]. * O TV 1 */ typedef struct _nas_device_properties_t { ED3(c_uint8_t type:4;, c_uint8_t spare:3;, c_uint8_t low_priority:1;) } __attribute__ ((packed)) nas_device_properties_t; /* 9.9.2.1 EPS bearer context status * O TLV 4 */ typedef struct _nas_eps_bearer_context_status_t { c_uint8_t length; ED8(c_uint8_t ebi7:1;, c_uint8_t ebi6:1;, c_uint8_t ebi5:1;, c_uint8_t ebi4:1;, c_uint8_t ebi3:1;, c_uint8_t ebi2:1;, c_uint8_t ebi1:1;, c_uint8_t ebi0:1;) ED8(c_uint8_t ebi15:1;, c_uint8_t ebi14:1;, c_uint8_t ebi13:1;, c_uint8_t ebi12:1;, c_uint8_t ebi11:1;, c_uint8_t ebi10:1;, c_uint8_t ebi9:1;, c_uint8_t ebi8:1;) } __attribute__ ((packed)) nas_eps_bearer_context_status_t; /* 9.9.2.2 Location area identification * See subclause 10.5.1.3 in 3GPP TS 24.008 [13] * O TV 6 */ typedef struct _nas_location_area_identification_t { plmn_id_t plmn_id; c_uint16_t lac; } __attribute__ ((packed)) nas_location_area_identification_t; /* 9.9.2.3 Mobile identity * See subclause 10.5.1.4 in 3GPP TS 24.008 [13]. * O TLV 7-10 */ #define NAS_MOBILE_IDENTITY_NONE 0 #define NAS_MOBILE_IDENTITY_IMSI 1 #define NAS_MOBILE_IDENTITY_IMEI 2 #define NAS_MOBILE_IDENTITY_IMEISV 3 #define NAS_MOBILE_IDENTITY_TMSI 4 #define NAS_MOBILE_IDENTITY_TMGI 5 #define NAS_MOBILE_IDENTITY_GUTI 6 typedef struct _nas_mobile_identity_imsi { ED3(c_uint8_t digit1:4;, c_uint8_t odd_even:1;, c_uint8_t type:3;) ED2(c_uint8_t digit3:4;, c_uint8_t digit2:4;) ED2(c_uint8_t digit5:4;, c_uint8_t digit4:4;) ED2(c_uint8_t digit7:4;, c_uint8_t digit6:4;) ED2(c_uint8_t digit9:4;, c_uint8_t digit8:4;) ED2(c_uint8_t digit11:4;, c_uint8_t digit10:4;) ED2(c_uint8_t digit13:4;, c_uint8_t digit12:4;) ED2(c_uint8_t digit15:4;, c_uint8_t digit14:4;) } __attribute__ ((packed)) nas_mobile_identity_imsi_t; typedef struct _nas_mobile_identity_tmsi { ED3(c_uint8_t spare:4;, c_uint8_t odd_even:1;, c_uint8_t type:3;) c_uint32_t tmsi; } __attribute__ ((packed)) nas_mobile_identity_tmsi_t; typedef struct _nas_mobile_identity_tmgi { ED5(c_uint8_t spare:2;, c_uint8_t mbms_session_id:1;, c_uint8_t mcc_mnc:1;, c_uint8_t odd_even:1;, c_uint8_t type:3;) c_uint8_t mbms_servicec_id[3]; plmn_id_t plmn_id; c_uint8_t mbms_session_identity; } __attribute__ ((packed)) nas_mobile_identity_tmgi_t; typedef struct _nas_mobile_identity_t { c_uint8_t length; union { nas_mobile_identity_imsi_t imsi; nas_mobile_identity_tmsi_t tmsi; nas_mobile_identity_tmgi_t tmgi; }; } nas_mobile_identity_t; /* 9.9.2.4 Mobile station classmark 2 * See subclause 10.5.1.6 in 3GPP TS 24.008 * O TLV 5 */ #define NAS_MS_CLASSMARK_2_REVISION_GSM_PHASE1 0 #define NAS_MS_CLASSMARK_2_REVISION_GSM_PHASE2 1 #define NAS_MS_CLASSMARK_2_REVISION_R99 2 #define NAS_MS_CLASSMARK_2_REVISION_RESERVED 2 #define NAS_MS_CLASSMARK_2_RF_CLASS1 0 #define NAS_MS_CLASSMARK_2_RF_CLASS2 1 #define NAS_MS_CLASSMARK_2_RF_CLASS3 2 #define NAS_MS_CLASSMARK_2_RF_CLASS4 3 #define NAS_MS_CLASSMARK_2_RF_CLASS5 4 #define NAS_MS_CLASSMARK_2_RF_IRRELEVANT 7 typedef struct nas_mobile_station_classmark_2_t { c_uint8_t length; ED5(c_uint8_t spare1:1;, c_uint8_t revision_level:2;, c_uint8_t es_ind:1;, c_uint8_t a5_1:1;, c_uint8_t rf_power_capability:3;) ED7(c_uint8_t spare:1;, c_uint8_t ps_capa:1;, c_uint8_t ss_screen_indicator:2;, c_uint8_t sm_capabi:1;, c_uint8_t vbs:1;, c_uint8_t vgcs:1;, c_uint8_t fc:1;) ED8(c_uint8_t cm3:1;, c_uint8_t spare2:1;, c_uint8_t lcsva_cap:1;, c_uint8_t ucs2:1;, c_uint8_t solsa:1;, c_uint8_t cmsp:1;, c_uint8_t a5_3:1;, c_uint8_t a5_2:1;) } __attribute__ ((packed)) nas_mobile_station_classmark_2_t; /*9.9.2.5 Mobile station classmark 3 * See subclause 10.5.1.7 in 3GPP TS 24.008 [13]. * O TLV 2-34 */ #define NAS_MAX_MOBILE_STATION_CLASSMARK_3_LEN 32 typedef struct _nas_mobile_station_classmark_3_t { c_uint8_t length; c_uint8_t buffer[NAS_MAX_MOBILE_STATION_CLASSMARK_3_LEN]; } __attribute__ ((packed)) nas_mobile_station_classmark_3_t; /* 9.9.2.8 PLMN list * See subclause 10.5.1.13 in 3GPP TS 24.008 [13]. * O TLV 5-47 */ #define NAS_MAX_PLMN 15 typedef struct _nas_plmn_list_t { c_uint8_t length; plmn_id_t plmn_id[NAS_MAX_PLMN]; } __attribute__ ((packed)) nas_plmn_list_t; /* 9.9.2.10 Supported codec list * See subclause 10.5.4.32 in 3GPP TS 24.008 [13]. * O TLV 5-n */ typedef struct _nas_supported_codec_item_t { c_uint8_t system_identification; c_uint8_t length_of_bitmap; c_uint16_t codec_bitmap; } __attribute__ ((packed)) nas_supported_codec_item_t; #define NAS_MAX_SUPPORTED_CODECS 8 typedef struct _nas_supported_codec_list_t { c_uint8_t length; nas_supported_codec_item_t item[NAS_MAX_SUPPORTED_CODECS]; } __attribute__ ((packed)) nas_supported_codec_list_t; /* 9.9.3.0A Additional update result * O TV 1 */ typedef struct _nas_additional_update_result_t { ED3(c_uint8_t type:4;, c_uint8_t spare:2;, c_uint8_t additional_update_result_value:2;) } __attribute__ ((packed)) nas_additional_update_result_t; /* 9.9.3.0B Additional update type * O TV 1 */ #define NAS_ADDITIONAL_UPDATE_TYPE_CIOT_NONE 0 #define NAS_ADDITIONAL_UPDATE_TYPE_CIOT_CONTROL_PLANE 1 #define NAS_ADDITIONAL_UPDATE_TYPE_CIOT_DATA_PLANE 2 #define NAS_ADDITIONAL_UPDATE_TYPE_CIOT_RESERVED 3 typedef struct _nas_additional_update_type_t { ED4(c_uint8_t type:4;, c_uint8_t pnb_ciot:2;, c_uint8_t saf:1;, c_uint8_t autv:1;) } __attribute__ ((packed)) nas_additional_update_type_t; /* 9.9.3.1 Authentication failure parameter * See subclause 10.5.3.2.2 in 3GPP TS 24.008 [13]. * O TLV 16 */ typedef struct _nas_authentication_failure_parameter_t { c_uint8_t length; c_uint8_t auts[AUTS_LEN]; } __attribute__ ((packed)) nas_authentication_failure_parameter_t; /* 9.9.3.2 Authentication parameter AUTN * See subclause 10.5.3.1.1 in 3GPP TS 24.008 [13]. * M LV 17 */ typedef struct _nas_authentication_parameter_autn_t { c_uint8_t length; c_uint8_t autn[AUTN_LEN]; } nas_authentication_parameter_autn_t; /* 9.9.3.3 Authentication parameter RAND * See subclause 10.5.3.1 in 3GPP TS 24.008 [13]. * M V 16 */ typedef struct _nas_authentication_parameter_rand_t { c_uint8_t rand[RAND_LEN]; } nas_authentication_parameter_rand_t; /* 9.9.3.4 Authentication response parameter * M LV 5-17 */ typedef struct _nas_authentication_response_parameter_t { c_uint8_t length; c_uint8_t res[MAX_RES_LEN]; } nas_authentication_response_parameter_t; /* 9.9.3.4a Ciphering key sequence number * See subclause 10.5.1.2 in 3GPP TS 24.008 [13]. * O TV 1 */ #define NAS_CIPHERING_KEY_SEQUENCE_NUMBER_NO_KEY_FROM_MS 7 typedef struct _nas_ciphering_key_sequence_number_t { ED3(c_uint8_t type:4;, c_uint8_t spare:1;, c_uint8_t key_sequence:3;) } __attribute__ ((packed)) nas_ciphering_key_sequence_number_t; /* 9.9.3.5 CSFB response * O TV 1 */ #define NAS_CS_FALLBACK_RESPONSE_REJECTED_BY_THE_UE 0 #define NAS_CS_FALLBACK_RESPONSE_ACCEPTED_BY_THE_UE 1 typedef struct _nas_csfb_response_t { ED3(c_uint8_t type:4;, c_uint8_t spare:1;, c_uint8_t response:3;) } __attribute__ ((packed)) nas_csfb_response_t; /* 9.9.3.6 Daylight saving time * See subclause 10.5.3.12 in 3GPP TS 24.008 [13]. * O TLV 3 */ #define NAS_NO_ADJUSTMENT_FOR_DAYLIGHT_SAVING_TIME 0 #define NAS_PLUS_1_HOUR_ADJUSTMENT_FOR_DAYLIGHT_SAVING_TIME 1 #define NAS_PLUS_2_HOURS_ADJUSTMENT_FOR_DAYLIGHT_SAVING_TIME 2 typedef struct _nas_daylight_saving_time_t { c_uint8_t length; ED2(c_uint8_t spare:6;, c_uint8_t value:2;) } __attribute__ ((packed)) nas_daylight_saving_time_t; /* 9.9.3.7 Detach type * M V 1/2 * 9.9.3.21 NAS key set identifier * M V 1/2 */ #define NAS_DETACH_TYPE_FROM_UE_EPS_DETACH 1 #define NAS_DETACH_TYPE_FROM_UE_IMSI_DETACH 2 #define NAS_DETACH_TYPE_FROM_UE_COMBINED_EPS_IMSI_DETACH 3 #define NAS_DETACH_TYPE_TO_UE_RE_ATTACH_REQUIRED 1 #define NAS_DETACH_TYPE_TO_UE_RE_ATTACH_NOT_REQUIRED 2 #define NAS_DETACH_TYPE_TO_UE_IMSI_DETACH 3 typedef struct _nas_detach_type_t { ED4(c_uint8_t tsc:1;, c_uint8_t nas_key_set_identifier:3;, c_uint8_t switch_off:1;, c_uint8_t detach_type:3;) } __attribute__ ((packed)) nas_detach_type_t; /* 9.9.3.8 DRX parameter * See subclause 10.5.5.6 in 3GPP TS 24.008 * O TV 3 */ #define NAS_DRX_PARAMETER_TIMER_MAX_1SEC 1 #define NAS_DRX_PARAMETER_TIMER_MAX_2SEC 2 #define NAS_DRX_PARAMETER_TIMER_MAX_4SEC 3 #define NAS_DRX_PARAMETER_TIMER_MAX_8SEC 4 #define NAS_DRX_PARAMETER_TIMER_MAX_16SEC 5 #define NAS_DRX_PARAMETER_TIMER_MAX_32SEC 6 #define NAS_DRX_PARAMETER_TIMER_MAX_64SEC 7 #define NAS_DRX_PARAMETER_COEFFICIENT_T_NOT_SPECIFIED_BY_MS 0 #define NAS_DRX_PARAMETER_COEFFICIENT_6_T_32 6 #define NAS_DRX_PARAMETER_COEFFICIENT_7_T_64 7 #define NAS_DRX_PARAMETER_COEFFICIENT_8_T_128 8 #define NAS_DRX_PARAMETER_COEFFICIENT_9_T_256 9 typedef struct _nas_drx_parameter_t { c_uint8_t split_pg_cycle_code; ED3(c_uint8_t cn_specific_drx_cycle_length_coefficient_and_drx_value_for_s1_mode:4;, c_uint8_t split_on_ccch:1;, c_uint8_t non_DRX_timer:3;) } __attribute__ ((packed)) nas_drx_parameter_t; /* 9.9.3.9 EMM cause * O TV 2 * Annex A (informative):
Cause values for EPS mobility management * A.1 Causes related to UE identification */ #define EMM_CAUSE_IMSI_UNKNOWN_IN_HSS 2 #define EMM_CAUSE_ILLEGAL_UE 3 #define EMM_CAUSE_ILLEGAL_ME 6 #define EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK 9 #define EMM_CAUSE_IMPLICITLY_DETACHED 10 /* A.2 Cause related to subscription options */ #define EMM_CAUSE_IMEI_NOT_ACCEPTED 5 #define EMM_CAUSE_EPS_SERVICES_NOT_ALLOWED 7 #define EMM_CAUSE_EPS_SERVICES_AND_NON_EPS_SERVICES_NOT_ALLOWED 8 #define EMM_CAUSE_PLMN_NOT_ALLOWED 11 #define EMM_CAUSE_TRACKING_AREA_NOT_ALLOWED 12 #define EMM_CAUSE_ROAMING_NOT_ALLOWED_IN_THIS_TRACKING_AREA 13 #define EMM_CAUSE_EPS_SERVICES_NOT_ALLOWED_IN_THIS_PLMN 14 #define EMM_CAUSE_NO_SUITABLE_CELLS_IN_TRACKING_AREA 15 #define EMM_CAUSE_REQUESTED_SERVICE_OPTION_NOT_AUTHORIZED_IN_THIS_PLMN 35 #define EMM_CAUSE_NO_EPS_BEARER_CONTEXT_ACTIVATED 40 /* A.3 Causes related to PLMN specific network failures and * congestion/authentication failures */ #define EMM_CAUSE_MSC_TEMPORARILY_NOT_REACHABLE 16 #define EMM_CAUSE_NETWORK_FAILURE 17 #define EMM_CAUSE_CS_DOMAIN_NOT_AVAILABLE 18 #define EMM_CAUSE_ESM_FAILURE 19 #define EMM_CAUSE_MAC_FAILURE 20 #define EMM_CAUSE_SYNCH_FAILURE 21 #define EMM_CAUSE_CONGESTION 22 #define EMM_CAUSE_UE_SECURITY_CAPABILITIES_MISMATCH 23 #define EMM_CAUSE_SECURITY_MODE_REJECTED_UNSPECIFIED 24 #define EMM_CAUSE_NON_EPS_AUTHENTICATION_UNACCEPTABLE 26 #define EMM_CAUSE_CS_SERVICE_TEMPORARILY_NOT_AVAILABLE 39 #define EMM_CAUSE_SEVERE_NETWORK_FAILURE 42 /* A.4 Causes related to nature of request * NOTE: This subclause has no entries in this version of the specification * * A.5 Causes related to invalid messages */ #define EMM_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE 95 #define EMM_CAUSE_INVALID_MANDATORY_INFORMATION 96 #define EMM_CAUSE_MESSAGE_TYPE_NON_EXISTENT_OR_NOT_IMPLEMENTED 97 #define EMM_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE 98 #define EMM_CAUSE_INFORMATION_ELEMENT_NON_EXISTENT_OR_NOT_IMPLEMENTED 99 #define EMM_CAUSE_CONDITIONAL_IE_ERROR 100 #define EMM_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE 101 #define EMM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED 111 typedef c_uint8_t nas_emm_cause_t; /* 9.9.3.10 * EPS attach result * M V 1/2 */ #define NAS_ATTACH_RESULT_EPS_ONLY 1 #define NAS_ATTACH_RESULT_COMBINED_EPS_IMSI_ATTACH 2 typedef struct _nas_eps_attach_result_t { ED2(c_uint8_t spare:5;, c_uint8_t result:3;) } __attribute__ ((packed)) nas_eps_attach_result_t; /* 9.9.3.11 EPS attach type * M V 1/2 * 9.9.3.21 NAS key set identifier * M V 1/2 */ #define NAS_KEY_SET_IDENTIFIER_NATIVE 0 #define NAS_KEY_SET_IDENTIFIER_MAPPED 1 #define NAS_KEY_SET_IDENTIFIER_NOT_AVAILABLE 0x111 #define NAS_ATTACH_TYPE_EPS_ATTACH 1 #define NAS_ATTACH_TYPE_COMBINED_EPS_IMSI_ATTAACH 2 #define NAS_ATTACH_TYPE_EPS_ERMERGENCY_ATTCH 3 #define NAS_ATTACH_TYPE_RESERVED 4 typedef struct _nas_eps_attach_type_t { ED4(c_uint8_t tsc:1;, c_uint8_t nas_key_set_identifier:3;, c_uint8_t spare:1;, c_uint8_t attach_type:3;) } __attribute__ ((packed)) nas_eps_attach_type_t; /* 9.9.3.12 EPS mobile identity * M LV 5-12 */ #define NAS_EPS_MOBILE_IDENTITY_IMSI 1 #define NAS_EPS_MOBILE_IDENTITY_GUTI 6 #define NAS_EPS_MOBILE_IDENTITY_IMEI 3 #define NAS_EPS_MOBILE_IDENTITY_EVEN 0 #define NAS_EPS_MOBILE_IDENTITY_ODD 1 typedef struct _nas_eps_mobile_identity_guti_t { ED3(c_uint8_t spare:4;, c_uint8_t odd_even:1;, c_uint8_t type:3;) plmn_id_t plmn_id; c_uint16_t mme_gid; c_uint8_t mme_code; c_uint32_t m_tmsi; } __attribute__ ((packed)) nas_eps_mobile_identity_guti_t; typedef nas_mobile_identity_imsi_t nas_eps_mobile_identity_imsi_t; typedef nas_eps_mobile_identity_imsi_t nas_eps_mobile_identity_imei_t; typedef struct _nas_eps_mobile_identity_t { c_uint8_t length; union { nas_eps_mobile_identity_imsi_t imsi; nas_eps_mobile_identity_guti_t guti; nas_eps_mobile_identity_imei_t imei; }; } __attribute__ ((packed)) nas_eps_mobile_identity_t; /* 9.9.3.12A EPS network feature support * O TLV 3 */ typedef struct _nas_eps_network_feature_support_t { c_uint8_t length; ED7(c_uint8_t cp_ciot:1;, c_uint8_t erw_opdn:1;, c_uint8_t esr_ps:1;, c_uint8_t cs_lcs:2;, c_uint8_t epc_lcs:1;, c_uint8_t emc_bs:1;, c_uint8_t ims_vops:1;) ED5(c_uint8_t spare:4;, c_uint8_t e_pco:1;, c_uint8_t hc_cp_ciot:1;, c_uint8_t s1_u_data:1;, c_uint8_t up_ciot :1;) } __attribute__ ((packed)) nas_eps_network_feature_support_t; /* 9.9.3.13 EPS update result * M V 1/2 */ #define NAS_EPS_UPDATE_RESULT_TA_UPDATED 0 #define NAS_EPS_UPDATE_RESULT_COMBINED_TA_LA_UPDATED 1 #define NAS_EPS_UPDATE_RESULT_TA_UPDATED_AND_ISR_ACTIVATED 4 #define NAS_EPS_UPDATE_RESULT_COMBINED_TA_LA_UPDATED_AND_ISR_ACTIVATED 5 typedef struct _nas_eps_update_result_t { ED2(c_uint8_t spare:5;, c_uint8_t result:3;) } __attribute__ ((packed)) nas_eps_update_result_t; /* 9.9.3.14 EPS update type * M V 1/2 * 9.9.3.21 NAS key set identifier * M V 1/2 */ #define NAS_EPS_UPDATE_TYPE_TA_UPDATING 0 #define NAS_EPS_UPDATE_TYPE_COMBINED_TA_LA_UPDATING 1 #define NAS_EPS_UPDATE_TYPE_COMBINED_TA_LA_UPDATING_WITH_IMSI_ATTACH 2 #define NAS_EPS_UPDATE_TYPE_PERIODIC_UPDATING 3 typedef struct _nas_eps_update_type_t { ED4(c_uint8_t tsc:1;, c_uint8_t nas_key_set_identifier:3;, c_uint8_t active_flag:1;, c_uint8_t update_type:3;) } __attribute__ ((packed)) nas_eps_update_type_t; /* 9.9.3.15 ESM message container * M LV-E 5-n */ typedef struct _nas_esm_message_container_t { c_uint16_t length; c_uint8_t *buffer; } nas_esm_message_container_t; /* 9.9.3.16 GPRS timer * See subclause 10.5.7.3 in 3GPP TS 24.008 [13]. * M V 1 or O TV 2 */ #define NAS_GRPS_TIMER_UNIT_MULTIPLES_OF_2_SS 0 #define NAS_GRPS_TIMER_UNIT_MULTIPLES_OF_1_MM 1 #define NAS_GRPS_TIMER_UNIT_MULTIPLES_OF_DECI_HH 2 #define NAS_GRPS_TIMER_UNIT_DEACTIVATED 7 typedef struct _nas_gprs_timer_t { ED2(c_uint8_t unit:3;, c_uint8_t value:5;) } __attribute__ ((packed)) nas_gprs_timer_t; /* 9.9.3.16A GPRS timer 2 * See subclause 10.5.7.4 in 3GPP TS 24.008 [13]. * O TLV 3 */ typedef struct _nas_gprs_timer_2_t { c_uint8_t length; c_uint8_t gprs_timer_2_value; } __attribute__ ((packed)) nas_gprs_timer_2_t; /* 9.9.3.16B GPRS timer 3 * See subclause 10.5.7.4a in 3GPP TS 24.008 [13]. * O TLV 3 */ #define NAS_GRPS_TIMER_3_UNIT_MULTIPLES_OF_10_MM 0 #define NAS_GRPS_TIMER_3_UNIT_MULTIPLES_OF_1_HH 1 #define NAS_GRPS_TIMER_3_UNIT_MULTIPLES_OF_10_HH 2 #define NAS_GRPS_TIMER_3_UNIT_MULTIPLES_OF_2_SS 3 #define NAS_GRPS_TIMER_3_UNIT_MULTIPLES_OF_30_SS 4 #define NAS_GRPS_TIMER_3_UNIT_MULTIPLES_OF_1_MM 5 #define NAS_GRPS_TIMER_3_UNIT_MULTIPLES_OF_320_HH 6 #define NAS_GRPS_TIMER_3_UNIT_DEACTIVATED 7 typedef struct _nas_gprs_timer_3_t { c_uint8_t length; ED2(c_uint8_t unit:3;, c_uint8_t timer_value:5;) } __attribute__ ((packed)) nas_gprs_timer_3_t; /* 9.9.3.17 Identity type 2 * See subclause 10.5.5.9 in 3GPP TS 24.008 [13]. * M V 1/2 */ #define NAS_IDENTITY_TYPE_2_IMSI 1 #define NAS_IDENTITY_TYPE_2_IMEI 2 #define NAS_IDENTITY_TYPE_2_IMEISV 3 #define NAS_IDENTITY_TYPE_2_TMSI 4 typedef struct _nas_identity_type_2_t { ED2(c_uint8_t spare:5;, c_uint8_t type:3;) } __attribute__ ((packed)) nas_identity_type_2_t; /* 9.9.3.18 IMEISV request * See subclause 10.5.5.10 in 3GPP TS 24.008 [13]. * O TV 1 */ typedef struct _nas_imeisv_request_t { ED3(c_uint8_t type:4;, c_uint8_t spare:1;, c_uint8_t imeisv_request_value:3;) } __attribute__ ((packed)) nas_imeisv_request_t; /* 9.9.3.19 KSI and sequence number * M V 1 */ typedef struct _nas_ksi_and_sequence_number_t { ED2(c_uint8_t ksi:3;, c_uint8_t sequence_number:5;) } __attribute__ ((packed)) nas_ksi_and_sequence_number_t; /* 9.9.3.20 MS network capability * See subclause 10.5.5.12 in 3GPP TS 24.008 * O TLV 4-10 */ #define NAS_MS_NETWORK_CAPABILITY_GEA2 0b01000000 #define NAS_MS_NETWORK_CAPABILITY_GEA3 0b00100000 #define NAS_MS_NETWORK_CAPABILITY_GEA4 0b00010000 #define NAS_MS_NETWORK_CAPABILITY_GEA5 0b00001000 #define NAS_MS_NETWORK_CAPABILITY_GEA6 0b00000100 #define NAS_MS_NETWORK_CAPABILITY_GEA7 0b00000010 typedef struct _nas_ms_network_capability_t { c_uint8_t length; ED7(c_uint8_t gea1:1;, c_uint8_t sm_capabilities_via_dedicated_channels:1;, c_uint8_t sm_capabilities_via_gprs_channels:1;, c_uint8_t ucs2:1;, c_uint8_t ss_screening_indicator:2;, c_uint8_t solsa_capability:1;, c_uint8_t revision_level_indicator:1;) ED3(c_uint8_t pfc_feature_mode:1;, c_uint8_t extended_gea:6;, c_uint8_t lcs_va_capability:1;) ED8(c_uint8_t ps_inter_rat_ho_from_geran_to_utran_iu_mode_capability:1;, c_uint8_t ps_inter_rat_ho_from_geran_to_e_utran_s1_mode_capability:1;, c_uint8_t emm_combined_procedures_capability:1;, c_uint8_t isr_support:1;, c_uint8_t srvcc_to_geran_utran_capability:1;, c_uint8_t epc_capability:1;, c_uint8_t nf_capability:1;, c_uint8_t geran_network_sharing_capability:1;) ED6(c_uint8_t user_plane_integrity_protection_support:1;, c_uint8_t gia4:1;, c_uint8_t gia5:1;, c_uint8_t gia6:1;, c_uint8_t gia7:1;, c_uint8_t spare:3;) } __attribute__ ((packed)) nas_ms_network_capability_t; /* 9.9.3.20A MS network feature support * See subclause 10.5.1.15 in 3GPP TS 24.008 [13]. * O TV 1 */ typedef struct _nas_ms_network_feature_support_t { ED3(c_uint8_t type:4;, c_uint8_t spare:3;, c_uint8_t extended_periodic_timers:1;) } __attribute__ ((packed)) nas_ms_network_feature_support_t; /* 9.9.3.21 NAS key set identifier * M V 1/2 * 9.9.2.9 Spare half octet * M V 1/2 */ typedef struct _nas_key_set_identifier_t { ED3(c_uint8_t type:4;, c_uint8_t tsc:1;, c_uint8_t nas_key_set_identifier:3;) } __attribute__ ((packed)) nas_key_set_identifier_t; /* 9.9.3.22 message container * M LV 3-252 */ #define NAS_MAX_MESSAGE_CONTAINER_LEN 250 typedef struct _nas_message_container_t { c_uint8_t length; c_uint8_t buffer[NAS_MAX_MESSAGE_CONTAINER_LEN]; } __attribute__ ((packed)) nas_message_container_t; /* 9.9.3.23 NAS security algorithms * M V 1 */ #define NAS_SECURITY_ALGORITHMS_EIA0 0 #define NAS_SECURITY_ALGORITHMS_128_EIA1 1 #define NAS_SECURITY_ALGORITHMS_128_EIA2 2 #define NAS_SECURITY_ALGORITHMS_128_EIA3 3 #define NAS_SECURITY_ALGORITHMS_EEA0 0 #define NAS_SECURITY_ALGORITHMS_128_EEA1 1 #define NAS_SECURITY_ALGORITHMS_128_EEA2 2 #define NAS_SECURITY_ALGORITHMS_128_EEA3 3 typedef struct _nas_security_algorithms_t { ED4(c_uint8_t spare1:1;, c_uint8_t type_of_ciphering_algorithm:3;, c_uint8_t spare2:1;, c_uint8_t type_of_integrity_protection_algorithm:3;) } __attribute__ ((packed)) nas_security_algorithms_t; /* 9.9.3.24 Network name * See subclause 10.5.3.5a in 3GPP TS 24.008 [13]. * O TLV 3-n */ #define NAS_MAX_NETWORK_NAME_LEN 255 typedef struct _nas_network_name_t { c_uint8_t length; ED4(c_uint8_t ext:1;, c_uint8_t coding_scheme:3;, c_uint8_t add_ci:1;, c_uint8_t number_of_spare_bits_in_last_octet:3;) c_uint8_t name[NAS_MAX_NETWORK_NAME_LEN]; } __attribute__ ((packed)) nas_network_name_t; /* 9.9.3.24A Network resource identifier container * See subclause 10.5.5.31 in 3GPP TS 24.008 [13]. * O TLV 4 */ typedef struct _nas_network_resource_identifier_container_t { c_uint8_t length; c_uint8_t nri_container_value1; ED2(c_uint8_t nri_container_value2:2;, c_uint8_t spare:6;) } __attribute__ ((packed)) nas_network_resource_identifier_container_t; /* 9.9.3.25 Nonce * O TV 5 */ typedef c_uint32_t nas_nonce_t; /* 9.9.3.25A Paging identity * M V 1 */ #define NAS_PAGING_IDENTITY_IMSI 0 #define NAS_PAGING_IDENTITY_TMSI 1 typedef struct _nas_paging_identity_t { ED2(c_uint8_t spare:7;, c_uint8_t identity:1;) } nas_paging_identity_t; /* 9.9.3.26 P-TMSI signature * See subclause 10.5.5.8 in 3GPP TS 24.008 * O TV 4 */ typedef c_uint32_t nas_p_tmsi_signature_t; /* TV : 4bytes */ /* 9.9.3.26A Extended EMM cause * O TV 1 */ typedef struct _nas_extended_emm_cause_t { ED4(c_uint8_t type:4;, c_uint8_t spare:2;, c_uint8_t eps_optimization_info:1;, c_uint8_t e_utran_allowed:1;) } nas_extended_emm_cause_t; /* 9.9.3.27 Service type * M V 1/2 * 9.9.3.21 NAS key set identifier * M V 1/2 */ #define NAS_SERVICE_TYPE_CS_FALLBACK_OR_1XCS_FALLBACK_FROM_UE 0 #define NAS_SERVICE_TYPE_CS_FALLBACK_OR_1XCS_FALLBACK_TO_UE 1 #define NAS_SERVICE_TYPE_CS_FALLBACK_EMERGENCY_CALL_OR_1XCS_FALLBACK_EMERGENCY_CALL_FROM_UE 2 typedef struct _nas_service_type_t { ED3(c_uint8_t tsc:1;, c_uint8_t nas_key_set_identifier:3;, c_uint8_t service_type:4;) } __attribute__ ((packed)) nas_service_type_t; /* 9.9.3.28 Short MAC * M V 2 */ typedef c_uint16_t nas_short_mac_t; /* 9.9.3.29 Time zone * See subclause 10.5.3.8 in 3GPP TS 24.008 [13]. * O TV 2 */ typedef c_uint8_t nas_time_zone_t; /* 9.9.3.30 Time zone and time * See subclause 10.5.3.9 in 3GPP TS 24.008 [13]. * 9.2.3.11 TPServiceCentreTimeStamp (TPSCTS) in 3GPP TS 23.040 [90] * O TV 8 */ #define NAS_TIME_TO_BCD(x) TIME_TO_BCD(x) typedef struct _nas_time_zone_and_time_t { c_uint8_t year; c_uint8_t mon; c_uint8_t mday; c_uint8_t hour; c_uint8_t min; c_uint8_t sec; ED2(c_uint8_t sign:1;, c_uint8_t gmtoff:7;) /* quarters of an hour */ } nas_time_zone_and_time_t; /* 9.9.3.31 TMSI status * See subclause 10.5.5.4 in 3GPP TS 24.008 [13] * O TV 1 */ typedef struct _nas_tmsi_status_t { ED3(c_uint8_t type:4;, c_uint8_t spare:3;, c_uint8_t tmsi_flag:1;) } __attribute__ ((packed)) nas_tmsi_status_t; /* 9.9.3.32 Tracking area identity * O TV 6 */ typedef tai_t nas_tracking_area_identity_t; /* 9.9.3.33 Tracking area identity list * M LV 7-97 */ #define NAS_MAX_TAI_LIST_LEN 96 #define TAI0_TYPE 0 #define TAI1_TYPE 1 #define TAI2_TYPE 2 typedef struct _tai0_list_t { struct { ED3(c_uint8_t spare:1;, c_uint8_t type:2;, c_uint8_t num:5;) plmn_id_t plmn_id; c_uint16_t tac[MAX_NUM_OF_TAI]; } __attribute__ ((packed)) tai[MAX_NUM_OF_TAI]; } __attribute__ ((packed)) tai0_list_t; typedef struct _tai2_list_t { ED3(c_uint8_t spare:1;, c_uint8_t type:2;, c_uint8_t num:5;) tai_t tai[MAX_NUM_OF_TAI]; } __attribute__ ((packed)) tai2_list_t; typedef struct _nas_tracking_area_identity_list_t { c_uint8_t length; c_uint8_t buffer[NAS_MAX_TAI_LIST_LEN]; } __attribute__ ((packed)) nas_tracking_area_identity_list_t; CORE_DECLARE(void) nas_tai_list_build( nas_tracking_area_identity_list_t *target, tai0_list_t *source0, tai2_list_t *source2); /* 9.9.3.34 UE network capability * M LV 3-14 */ typedef struct _nas_ue_network_capability_t { c_uint8_t length; union { struct { ED8(c_uint8_t eea0:1;, c_uint8_t eea1:1;, c_uint8_t eea2:1;, c_uint8_t eea3:1;, c_uint8_t eea4:1;, c_uint8_t eea5:1;, c_uint8_t eea6:1;, c_uint8_t eea7:1;) }; c_uint8_t eea; }; union { struct { ED8(c_uint8_t eia0:1;, c_uint8_t eia1:1;, c_uint8_t eia2:1;, c_uint8_t eia3:1;, c_uint8_t eia4:1;, c_uint8_t eia5:1;, c_uint8_t eia6:1;, c_uint8_t eia7:1;) }; c_uint8_t eia; }; union { struct { ED8(c_uint8_t uea0:1;, c_uint8_t uea1:1;, c_uint8_t uea2:1;, c_uint8_t uea3:1;, c_uint8_t uea4:1;, c_uint8_t uea5:1;, c_uint8_t uea6:1;, c_uint8_t uea7:1;) }; c_uint8_t uea; }; union { struct { ED8(c_uint8_t ucs2:1;, c_uint8_t uia1:1;, c_uint8_t uia2:1;, c_uint8_t uia3:1;, c_uint8_t uia4:1;, c_uint8_t uia5:1;, c_uint8_t uia6:1;, c_uint8_t uia7:1;) }; c_uint8_t uia; }; ED8(c_uint8_t prose_dd:1;, c_uint8_t prose:1;, c_uint8_t h_245_ash:1;, c_uint8_t acc_csfb:1;, c_uint8_t lpp:1;, c_uint8_t lcs:1;, c_uint8_t srvcc:1;, c_uint8_t nf:1;) ED8(c_uint8_t epco:1;, c_uint8_t hc_cp_ciot:1;, c_uint8_t erw_opdn:1;, c_uint8_t s1u_data:1;, c_uint8_t up_ciot:1;, c_uint8_t cp_ciot:1;, c_uint8_t prose_relay:1;, c_uint8_t prose_dc:1;) ED2(c_uint8_t spare:7;, c_uint8_t multiple_drb:1;) } __attribute__ ((packed)) nas_ue_network_capability_t; /* 9.9.3.35 UE radio capability information update needed * O TV 1 */ typedef struct _nas_ue_radio_capability_information_update_needed_t { ED3(c_uint8_t type:4;, c_uint8_t spare:3;, c_uint8_t update_needed:1;) } __attribute__ ((packed)) nas_ue_radio_capability_information_update_needed_t; /* 9.9.3.36 UE security capability * M LV 3-6 */ typedef struct _nas_ue_security_capability_t { c_uint8_t length; union { struct { ED8(c_uint8_t eea0:1;, c_uint8_t eea1:1;, c_uint8_t eea2:1;, c_uint8_t eea3:1;, c_uint8_t eea4:1;, c_uint8_t eea5:1;, c_uint8_t eea6:1;, c_uint8_t eea7:1;) }; c_uint8_t eea; }; union { struct { ED8(c_uint8_t eia0:1;, c_uint8_t eia1:1;, c_uint8_t eia2:1;, c_uint8_t eia3:1;, c_uint8_t eia4:1;, c_uint8_t eia5:1;, c_uint8_t eia6:1;, c_uint8_t eia7:1;) }; c_uint8_t eia; }; union { struct { ED8(c_uint8_t uea0:1;, c_uint8_t uea1:1;, c_uint8_t uea2:1;, c_uint8_t uea3:1;, c_uint8_t uea4:1;, c_uint8_t uea5:1;, c_uint8_t uea6:1;, c_uint8_t uea7:1;) }; c_uint8_t uea; }; union { struct { ED8(c_uint8_t spare1:1;, c_uint8_t uia1:1;, c_uint8_t uia2:1;, c_uint8_t uia3:1;, c_uint8_t uia4:1;, c_uint8_t uia5:1;, c_uint8_t uia6:1;, c_uint8_t uia7:1;) }; c_uint8_t uia; }; union { struct { ED8(c_uint8_t spare2:1;, c_uint8_t gea1:1;, c_uint8_t gea2:1;, c_uint8_t gea3:1;, c_uint8_t gea4:1;, c_uint8_t gea5:1;, c_uint8_t gea6:1;, c_uint8_t gea7:1;) }; c_uint8_t gea; }; } __attribute__ ((packed)) nas_ue_security_capability_t; /* buffer : 9.9.3.37 Emergency number list * See subclause 10.5.3.13 in 3GPP TS 24.008 [13]. * O TLV 5-50 */ #define NAS_MAX_EMERGENCY_NUMBER_LIST_LEN 48 typedef struct _nas_emergency_number_list_t { c_uint16_t length; c_uint8_t buffer[NAS_MAX_EMERGENCY_NUMBER_LIST_LEN]; } __attribute__ ((packed)) nas_emergency_number_list_t; /* 9.9.3.38 CLI * O TLV 3-14 * The coding of the CLI value part is the same as for * octets 3 to 14 of the Calling party BCD number information element * defined in subclause 10.5.4.9 of 3GPP TS 24.008 [13]. */ #define NAX_MAX_CLI_LEN 12 typedef struct _nas_cli_t { c_uint8_t length; c_uint8_t buffer[NAX_MAX_CLI_LEN]; } __attribute__ ((packed)) nas_cli_t; /* 9.9.3.39 SS Code * O TV 2 * The coding of the SS Code value is given in subclause 17.7.5 of * 3GPP TS 29.002 [15C] */ typedef c_uint8_t nas_ss_code_t; /* 9.9.3.40 LCS indicator * O TV 2 */ #define NAS_LCS_INDICATOR_MT_LR 1 typedef c_uint8_t nas_lcs_indicator_t; /* 9.9.3.41 LCS client identity * O TLV 3-257 */ #define NAS_MAX_LCS_CLIENT_IDENTITY_LEN 255 typedef struct _nas_lcs_client_identity_t { c_uint8_t length; c_uint8_t buffer[NAS_MAX_LCS_CLIENT_IDENTITY_LEN]; } __attribute__ ((packed)) nas_lcs_client_identity_t; /* 9.9.3.42 Generic message container type * M V 1 */ #define NAS_GENERIC_MESSAGE_CONTAINER_TYPE_LTE_POSITIONING_PROTOCOL 1 #define NAS_GENERIC_MESSAGE_CONTAINER_TYPE_LTE_LOCATION_SERVICES_MESSAGE 2 typedef c_uint8_t nas_generic_message_container_type_t; /* 9.9.3.43 Generic message container * M LV-E 3-n */ typedef struct _nas_generic_message_container_t { c_uint16_t length; c_uint8_t *buffer; } nas_generic_message_container_t; /* 9.9.3.44 Voice domain preference and UE's usage setting * See subclause 10.5.5.28 in 3GPP TS 24.008 [13]. * O TLV 3 */ typedef struct _nas_voice_domain_preference_and_ue_usage_setting_t { c_uint8_t length; ED3(c_uint8_t spare:5;, c_uint8_t ue_usage_setting:1;, c_uint8_t voice_domain_preference_for_e_utran:2;) } __attribute__ ((packed)) nas_voice_domain_preference_and_ue_usage_setting_t; /* 9.9.3.45 GUTI type * O TV 1 */ typedef struct _nas_guti_type_t { ED3(c_uint8_t type:4;, c_uint8_t spare:3;, c_uint8_t guti_type:1;) } __attribute__ ((packed)) nas_guti_type_t; /* 9.9.3.46 Extended DRX parameters * See subclause 10.5.5.32 in 3GPP TS 24.008 [13]. * O TLV 3 */ typedef struct _nas_extended_drx_parameters_t { c_uint8_t length; ED2(c_uint8_t paging_time_window:4;, c_uint8_t e_drx_value:4;) } __attribute__ ((packed)) nas_extended_drx_parameters_t; /* 9.9.4.1 Access point name * See subclause 10.5.6.1 in 3GPP TS 24.008 [13]. * O TLV 3-102 */ typedef struct _nas_access_point_name_t { c_uint8_t length; c_int8_t apn[MAX_APN_LEN]; } __attribute__ ((packed)) nas_access_point_name_t; /* 9.9.4.2 APN aggregate maximum bit rate * O TLV 4-8 */ typedef struct _nas_apn_aggregate_maximum_bit_rate_t { c_uint8_t length; c_uint8_t dl_apn_ambr; c_uint8_t ul_apn_ambr; c_uint8_t dl_apn_ambr_extended; c_uint8_t ul_apn_ambr_extended; c_uint8_t dl_apn_ambr_extended2; c_uint8_t ul_apn_ambr_extended2; } __attribute__ ((packed)) nas_apn_aggregate_maximum_bit_rate_t; CORE_DECLARE(void) apn_ambr_build( nas_apn_aggregate_maximum_bit_rate_t * apn_aggregate_maximum_bit_rate, c_uint32_t dl_ambr, c_uint32_t ul_ambr); /* 9.9.4.2A Connectivity type * See subclause 10.5.6.19 in 3GPP TS 24.008 [13]. * O TV 1 */ typedef struct _nas_connectivity_type_t { ED3(c_uint8_t type:4;, c_uint8_t spare:3;, c_uint8_t considered_lipa_pdn_connection:1;) } __attribute__ ((packed)) nas_connectivity_type_t; /* 9.9.4.3 EPS quality of service * M LV 2-14 */ typedef struct _nas_eps_quality_of_service_t { c_uint8_t length; c_uint8_t qci; c_uint8_t ul_mbr; c_uint8_t dl_mbr; c_uint8_t ul_gbr; c_uint8_t dl_gbr; c_uint8_t ul_mbr_extended; c_uint8_t dl_mbr_extended; c_uint8_t ul_gbr_extended; c_uint8_t dl_gbr_extended; c_uint8_t ul_mbr_extended2; c_uint8_t dl_mbr_extended2; c_uint8_t ul_gbr_extended2; c_uint8_t dl_gbr_extended2; } nas_eps_quality_of_service_t; CORE_DECLARE(void) eps_qos_build(nas_eps_quality_of_service_t *eps_qos, c_uint8_t qci, c_uint64_t dl_mbr, c_uint64_t ul_mbr, c_uint64_t dl_gbr, c_uint64_t ul_gbr); /* 9.9.4.4 ESM cause * M V 1 * Annex B (informative):
Cause values for EPS session management B.1 Causes related to nature of request */ #define ESM_CAUSE_OPERATOR_DETERMINED_BARRING 8 #define ESM_CAUSE_INSUFFICIENT_RESOURCES 26 #define ESM_CAUSE_MISSING_OR_UNKNOWN_APN 27 #define ESM_CAUSE_UNKNOWN_PDN_TYPE 28 #define ESM_CAUSE_USER_AUTHENTICATION_FAILED 29 #define ESM_CAUSE_REQUEST_REJECTED_BY_SERVING_GW_OR_PDN_GW 30 #define ESM_CAUSE_REQUEST_REJECTED_UNSPECIFIED 31 #define ESM_CAUSE_SERVICE_OPTION_NOT_SUPPORTED 32 #define ESM_CAUSE_REQUESTED_SERVICE_OPTION_NOT_SUBSCRIBED 33 #define ESM_CAUSE_SERVICE_OPTION_TEMPORARILY_OUT_OF_ORDER 34 #define ESM_CAUSE_PTI_ALREADY_IN_USE 35 #define ESM_CAUSE_REGULAR_DEACTIVATION 36 #define ESM_CAUSE_EPS_QOS_NOT_ACCEPTED 37 #define ESM_CAUSE_NETWORK_FAILURE 38 #define ESM_CAUSE_REACTIVATION_REQUESTED 39 #define ESM_CAUSE_SEMANTIC_ERROR_IN_THE_TFT_OPERATION 41 #define ESM_CAUSE_SYNTACTICAL_ERROR_IN_THE_TFT_OPERATION 42 #define ESM_CAUSE_INVALID_EPS_BEARER_IDENTITY 43 #define ESM_CAUSE_SEMANTIC_ERRORS_IN_PACKET_FILTERS 44 #define ESM_CAUSE_SYNTACTICAL_ERROR_IN_PACKET_FILTERS 45 #define ESM_CAUSE_PTI_MISMATCH 47 #define ESM_CAUSE_LAST_PDN_DISCONNECTION_NOT_ALLOWED 49 #define ESM_CAUSE_PDN_TYPE_IPV4_ONLY_ALLOWED 50 #define ESM_CAUSE_PDN_TYPE_IPV6_ONLY_ALLOWED 51 #define ESM_CAUSE_SINGLE_ADDRESS_BEARERS_ONLY_ALLOWED 52 #define ESM_CAUSE_ESM_INFORMATION_NOT_RECEIVED 53 #define ESM_CAUSE_PDN_CONNECTION_DOES_NOT_EXIST 54 #define ESM_CAUSE_MULTIPLE_PDN_CONNECTIONS_FOR_A_GIVEN_APN_NOT_ALLOWED 55 #define ESM_CAUSE_COLLISION_WITH_NETWORK_INITIATED_REQUEST 56 #define ESM_CAUSE_PDN_TYPE_IPV4V6_ONLY_ALLOWED 57 #define ESM_CAUSE_PDN_TYPE_NON_IP_ONLY_ALLOWED 58 #define ESM_CAUSE_UNSUPPORTED_QCI_VALUE 59 #define ESM_CAUSE_BEARER_HANDLING_NOT_SUPPORTED 60 #define ESM_CAUSE_MAXIMUM_NUMBER_OF_EPS_BEARERS_REACHED 65 #define ESM_CAUSE_REQUESTED_APN_NOT_SUPPORTED_IN_CURRENT_RAT_AND_PLMN_COMBINATION 66 #define ESM_CAUSE_INVALID_PTI_VALUE 81 #define ESM_CAUSE_APN_RESTRICTION_VALUE_INCOMPATIBLE_WITH_ACTIVE_EPS_BEARER_CONTEXT 112 #define ESM_CAUSE_MULTIPLE_ACCESSES_TO_A_PDN_CONNECTION_NOT_ALLOWED 113 /* B.2 Protocol errors (e.g., unknown message) class */ #define ESM_CAUSE_SEMANTICALLY_INCORRECT_MESSAGE 95 #define ESM_CAUSE_INVALID_MANDATORY_INFORMATION 96 #define ESM_CAUSE_MESSAGE_TYPE_NON_EXISTENT_OR_NOT_IMPLEMENTED 97 #define ESM_CAUSE_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE 98 #define ESM_CAUSE_INFORMATION_ELEMENT_NON_EXISTENT_OR_NOT_IMPLEMENTED 99 #define ESM_CAUSE_CONDITIONAL_IE_ERROR 100 #define ESM_CAUSE_MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE 101 #define ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED 111 typedef c_uint8_t nas_esm_cause_t; /* 9.9.4.5 ESM information transfer flag * O TV 1 */ typedef struct _nas_esm_information_transfer_flag_t { ED3(c_uint8_t type:4;, c_uint8_t spare:3;, c_uint8_t security_protected_required:1;) } __attribute__ ((packed)) nas_esm_information_transfer_flag_t; /* 9.9.4.6 Linked EPS bearer identity * M V 1/2 */ typedef struct _nas_linked_eps_bearer_identity_t { ED2(c_uint8_t spare:4;, c_uint8_t eps_bearer_identity:4;) } __attribute__ ((packed)) nas_linked_eps_bearer_identity_t; /* 9.9.4.7 LLC service access point identifier * See subclause 10.5.6.9 in 3GPP TS 24.008 [13]. * O TV 2 */ typedef c_uint8_t nas_llc_service_access_point_identifier_t; /* 9.9.4.8 Packet flow Identifier * See subclause 10.5.6.11 in 3GPP TS 24.008 [13]. * O TLV 3 */ #define NAS_PACKET_FLOW_IDENTIFIER_BEST_EFFORT 0 #define NAS_PACKET_FLOW_IDENTIFIER_SIGNALLING 1 #define NAS_PACKET_FLOW_IDENTIFIER_SMS 2 #define NAS_PACKET_FLOW_IDENTIFIER_TOM8 3 #define NAS_PACKET_FLOW_IDENTIFIER_DYNAMIC_ASSIGN_MIN 8 #define NAS_PACKET_FLOW_IDENTIFIER_DYNAMIC_ASSIGN_MAX 0xef typedef struct _nas_packet_flow_identifier_t { c_uint8_t length; ED2(c_uint8_t spare:1;, c_uint8_t value:7;) } __attribute__ ((packed)) nas_packet_flow_identifier_t; /* 9.9.4.13 Radio priority * See subclause 10.5.7.2 in 3GPP TS 24.008 [13]. * O TV 1 */ typedef struct _nas_radio_priority_t { ED3(c_uint8_t type:4;, c_uint8_t spare:1;, c_uint8_t value:3;) } __attribute__ ((packed)) nas_radio_priority_t; /* 9.9.4.9 PDN address * M LV 6-14 */ #define NAS_PDN_ADDRESS_IPV4_LEN 5 #define NAS_PDN_ADDRESS_IPV6_LEN 9 #define NAS_PDN_ADDRESS_IPV4V6_LEN 13 typedef struct _nas_pdn_address_t { c_uint8_t length; ED2(c_uint8_t reserved:5;, c_uint8_t pdn_type:3;) union { c_uint32_t addr; struct { c_uint8_t addr6[IPV6_LEN>>1]; /* Interface Identifer Only */ }; struct { c_uint8_t addr6[IPV6_LEN>>1]; /* Interface Identifer Only */ c_uint32_t addr; } both; }; } __attribute__ ((packed)) nas_pdn_address_t; /* 9.9.4.11 Protocol configuration options * See subclause 10.5.6.3 in 3GPP TS 24.008 [13]. * O TLV 3-253 */ typedef struct _nas_protocol_configuration_options_t { c_uint8_t length; c_uint8_t buffer[MAX_PCO_LEN]; } __attribute__ ((packed)) nas_protocol_configuration_options_t; /* 9.9.4.12 Quality of service * See subclause 10.5.6.5 in 3GPP TS 24.008 [13]. * O TLV 14-22 */ #define NAS_QOS_LEN 20 typedef struct _nas_quality_of_service_t { c_uint8_t length; c_uint8_t buffer[NAS_QOS_LEN]; } __attribute__ ((packed)) nas_quality_of_service_t; /* 9.9.4.13A Re-attempt indicator * O TLV 3 */ typedef struct _nas_re_attempt_indicator_t { c_uint8_t length; ED3(c_uint8_t spare:3;, /* allowed in A/Gb mode or Iu mode */ c_uint8_t eplmnc:1;, /* allowed in an equivalent PLMN */ c_uint8_t ratc:1;) } __attribute__ ((packed)) nas_re_attempt_indicator_t; /* 9.9.4.14 Request type * M V 1/2 * See subclause 10.5.6.17 in 3GPP TS 24.008 [13]. * 9.9.4.10 PDN type "PDN type * M V 1/2 */ #define NAS_PDN_CONNECTIVITY_REQUEST_TYPE_INITIAL 1 #define NAS_PDN_CONNECTIVITY_REQUEST_TYPE_HANDOVER 2 #define NAS_PDN_CONNECTIVITY_REQUEST_TYPE_EMERGENCY 4 #define NAS_PDN_CONNECTIVITY_PDN_TYPE_IPV4 1 #define NAS_PDN_CONNECTIVITY_PDN_TYPE_IPV6 2 #define NAS_PDN_CONNECTIVITY_PDN_TYPE_IPV4V6 3 #define NAS_PDN_CONNECTIVITY_PDN_TYPE_NON_IP 5 typedef struct _nas_request_type_t { ED4(c_uint8_t spare1:1;, c_uint8_t pdn_type:3;, c_uint8_t spare2:1;, c_uint8_t request_type:3;) } __attribute__ ((packed)) nas_request_type_t; /* 9.9.4.15 Traffic flow aggregate description * see subclause 10.5.6.12 in 3GPP TS 24.008 [13] * M LV 2-256 */ #define NAS_MAX_TRAFFIC_FLOW_AGGREGATE_DESCRIPTION 255 typedef struct _nas_traffic_flow_aggregate_description_t { c_uint8_t length; c_uint8_t buffer[NAS_MAX_TRAFFIC_FLOW_AGGREGATE_DESCRIPTION]; } __attribute__ ((packed)) nas_traffic_flow_aggregate_description_t; /* 9.9.4.16 Traffic flow template * See subclause 10.5.6.12 in 3GPP TS 24.008 [13]. * M LV 2-256 */ #define NAS_MAX_TRAFFIC_FLOW_TEMPLATE 255 typedef struct _nas_traffic_flow_template_t { c_uint8_t length; c_uint8_t buffer[NAS_MAX_TRAFFIC_FLOW_TEMPLATE]; } __attribute__ ((packed)) nas_traffic_flow_template_t; /* 9.9.4.17 Transaction identifier * 3GPP TS 24.008 [13], subclause 10.5.6.7. * O TLV 3-4 */ typedef struct _nas_transaction_identifier_t { c_uint8_t length; c_uint16_t linked_ti; } __attribute__ ((packed)) nas_transaction_identifier_t; /* 9.9.4.18 WLAN offload acceptability * 3GPP TS 24.008 [13], subclause 10.5.6.20 * O TV 1 */ typedef struct _nas_wlan_offload_acceptability_t { ED4(c_uint8_t type:4;, c_uint8_t spare:2;, c_uint8_t utran_via_wlan_acceptable:1;, c_uint8_t e_utran_via_wlan_acceptable:1;) } __attribute__ ((packed)) nas_wlan_offload_acceptability_t; /* 9.9.4.19 NBIFOM container * See subclause 10.5.6.21 in 3GPP TS 24.008 [4]. * O TLV 3-257 */ #define MAX_NAS_NBIFOM_CONTAINER_LEN 255 typedef struct _nas_nbifom_container_t { c_uint8_t length; c_uint8_t buffer[MAX_NAS_NBIFOM_CONTAINER_LEN]; } __attribute__ ((packed)) nas_nbifom_container_t; /* 9.9.4.22 Header compression configuration * O TLV 5-257 */ #define MAX_NAS_HEADER_COMPRESSION_CONTAINER_LEN 251 typedef struct _nas_header_compression_configuration_t { c_uint8_t length; ED8(c_uint8_t spare:1;, c_uint8_t profile0x0104:1;, c_uint8_t profile0x0103:1;, c_uint8_t profile0x0102:1;, c_uint8_t profile0x0006:1;, c_uint8_t profile0x0004:1;, c_uint8_t profile0x0003:1;, c_uint8_t profile0x0002:1;) c_uint16_t max_cid; #define NAS_HEADER_COMPRESSION_NO_COMPRESSION 0 #define NAS_HEADER_COMPRESSION_PROFILE_0x0002_UDP_IP 1 #define NAS_HEADER_COMPRESSION_PROFILE_0x0003_ESP_IP 2 #define NAS_HEADER_COMPRESSION_PROFILE_0x0004 3 #define NAS_HEADER_COMPRESSION_PROFILE_0x0006 4 #define NAS_HEADER_COMPRESSION_PROFILE_0x0102_UDP_IP 5 #define NAS_HEADER_COMPRESSION_PROFILE_0x0103_ESP_IP 6 #define NAS_HEADER_COMPRESSION_PROFILE_0x0104_IP 7 c_uint8_t type; c_uint8_t container[MAX_NAS_NBIFOM_CONTAINER_LEN]; } __attribute__ ((packed)) nas_header_compression_configuration_t; /* 9.9.4.23 Control plane only indication * O TV 1 */ typedef struct _nas_control_plane_only_indication_t { ED3(c_uint8_t type:4;, c_uint8_t spare:3;, c_uint8_t ciot_eps_optimization:1;) } __attribute__ ((packed)) nas_control_plane_only_indication_t; /* 9.9.4.26 Extended protocol configuration options * O TLV-E 4-65538 */ typedef struct _nas_extended_protocol_configuration_options_t { c_uint16_t length; c_uint8_t *buffer; } __attribute__ ((packed)) nas_extended_protocol_configuration_options_t; /* 9.9.4.27 Header compression configuration status * O TLV 4 */ typedef struct _nas_header_compression_configuration_status_t { c_uint8_t length; c_uint16_t value; } __attribute__ ((packed)) nas_header_compression_configuration_status_t; /* 9.9.4.28 Serving PLMN rate control * O TLV 4 */ typedef struct _nas_serving_plmn_rate_control_t { c_uint8_t length; ED8(c_uint8_t ebi7:1;, c_uint8_t ebi6:1;, c_uint8_t ebi5:1;, c_uint8_t ebi4:1;, c_uint8_t ebi3:1;, c_uint8_t ebi2:1;, c_uint8_t ebi1:1;, c_uint8_t ebi0:1;) ED8(c_uint8_t ebi15:1;, c_uint8_t ebi14:1;, c_uint8_t ebi13:1;, c_uint8_t ebi12:1;, c_uint8_t ebi11:1;, c_uint8_t ebi10:1;, c_uint8_t ebi9:1;, c_uint8_t ebi8:1;) } __attribute__ ((packed)) nas_serving_plmn_rate_control_t; #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __NAS_TYPES_H__ */ nextepc-0.3.10/lib/nas/support/000077500000000000000000000000001333553357400163175ustar00rootroot00000000000000nextepc-0.3.10/lib/nas/support/24301-d80.docx000066400000000000000000006264631333553357400202610ustar00rootroot00000000000000PKJcM _rels/.relsJ1>E{7 "ҴzY`HfwC7LkQtA70)LHxM e`{Z܃*đ v~ ѧ*#Hzкؑ9ZA'{HN 3;՝ :Ԗ3-RY|DusDSɠ/ ~/}-==rɋNBё)]3Oķggeg_yPKJI+docProps/core.xmlmj@ E -;RLJ!43`wbRsWOgq1 5-T(Zߞ'DMfe~Gc⬎* =ΪG:7"3foydˌ}DjQWaV#+-E` ybA-,J^ĭ<ͼ]Ï2v;1PKJ; |docProps/app.xmlν 0ݫgoSDJ.PCrIȉ{#t[ĊgO ex;Өߊ N^<G0YdXRd3\L >:0zrHI,qKHm~ |zM֛?~{ȞloPKJ'<word/document.xmlRHJF=s1SE ŅM< Ki]d(>}},}(HvE@~QX$/e2̵}[~{W.ҳ}Gy7~kadyݽ ;=J/^> FC{ VXG`hEz3}eˏ3+@V<QnzQ9u+3 |[qY.CKy˔~{7ӫ ߏl~ruΨJi?|er |zWjC;Kxd h\E;SezP~y'Vnkڞܛ Ӊ])ZoNe_ޟ4g9rgGL~{lEg?wKκ?l+W^h{F"ghlb8UnI[.LLT(lrR82@gO0q ߏw 'ζϬ{$LUYBSSبQ Cl=$K;{4pYf%//}KζR+nWOߥv˲ u+Ǟ2u}ؑ%-G@ɾ95N'Y?NM7OS\J3֏PxJgK$tCZ|ϽVQnFd0mZi{ql“7~SQ?ȯ7Odoۺj ~?SWV>lm[Z-~v7SnG/^pU[ij{yd\iPnC|po4yGWaF La=:$]W[`Ebh݋Etj]}*[Er9vY|U}^KL 5fJ?Mhj8[ѳW8п/49NϤ{{R(%U3x,[ :?Jڣ%~ZߕCWşciSב͇W~Vk׈d$\D_ Q?9(v]ĞĔE䋚A_=HGE<å_e!#$:c Yu\{⍇ rrIl3|OzizVj2fr3hznP~?L/J wˑq+0g/&31E3J8P=ew+;L?8Ÿ"0:m|DIx#{2.]w}}?ρܚTw^?v\)d+|HW]G5Q4Ҥ?o ^wtv]nvsGܛ裇#Wj~zft4z`_@ƽ\G]ʳv)޷OX3,~4bF{湩ioFuO󻛞X'x.1vk'RΛ27"i4[1q5臿n#~fiig}< ͸T7{vqߥ=~Oyq9"Cy?mt43 5fOo0JyM)9VfWq/5fIȒڪnRL{DO!{K_'IɀoucQ|5Lg>3b=37FFp CewƏɩ_iF:´APZT5)[X4c(bo5<zC"~yH[F=&s+)jPzL:Q5ҷ6HN_|8,JLU3ѧDž_yea~82zT>Twiz`nҊ߂ 1elR^(>y~LP! C9Djmٵ_WReG ɌCd8:]6?"#hEjkjlË'=cM Hfc4 >4Ͷ<2̫I!' XILJ]:%ёSqۼL+a[f;M:vONI벻%: Rl-wK&}"ž] .yZDǑʳl`F*ԧ^$yt"S-D=wgzɞŻUF5.;51{f)^}Z[̓!Waf13\K=^M75% \Vw4"% V^ybW+?vp͕V8s(>vfkWߥs'(|O|w:fZ..z{&Eb?qhNUkMǴ3hv{lُ-3"~7sƦ_ F|?*.oM q6fǮ1nC[5?`=>}UM9_fV;yT&+VC ;{ؿ^)؀+r`]`c5xW˧--r9-snk]w}2r- \&dx)iRX2)GImz`ls @A ((σRޯ/HkW:fA@Z&:';S :_Y~،PP/wKHkzQQ PVk߁3-;@;@ww w%Z~ <D9PwHw@ PPwwx_◻odR ,?ًv8p"UJG(w`8 PP~QKr'nVXw03Y|y槈g5 z z dQ/wQ;n W̯L`t +<*vW݁8#-;@̀rx)ýC;`;9bs:ER'!AJOՑ12ʦd 9Vga!*[羣qk+Y+\F 2=J+S7ҳ7m+,X>viH:9d⸶P L uAE24t Y^|x^WBwJ FҖV:d *7um \\ST?p8{ĕ7l2,]{#̜%cJ{E0 d492(M |C;qẠ=]o~M_dSjP(sUԤl_G[ѕ~P^FRJCQ<5~jy}_!sG1, Rtc'Hߍo.RՊ*ajpܹw [K-3e`u5Z"5/BbmA5Ŗ'Mq{|r*Znubn? r9?/Io I`Ho8E7|3M ՟XXL}؝ain'Nl[Ջ{qZsvaV &YX ;e\aJe 處`6 d `X%/oOq ZZLz7рm «!V_)mG.VPyV: |ge|؄9 P%( / ~v#q{1VD)zW-  NJ=D#yy<@QVk3-<@<@)xw w%ZV<Rd-@&)z#7.$<@ ׂXYyx2gʹSvOt3ۢ2{wtX:mvL;Sd4٨% 1۹rXo$ 1۹Ҩ5\ \ Ujs1ZI:ŐJ9f;CIg5[3dH˶ā՟' ^62r>,[4j6 ɑ}i ppz}^ﲢiz`0. kVqe1BѓқtrNvX-\ëN:̔p%MTՅTj^7a\%!ItDOtX;8bHt+RD;$:dJ؀ &:<x!!s;ZHt 2-& |D otJf P@ (x%N$:D!!`6 ߡ/HLt8 iQ49gpF@ACA/+'j;?5r1.1IgxRόPPPPPPꠗ3=Tކ9OdJ'=гIz#*먊00_PP2$l:BY`yƞC'EP,j1Saf0#"5[Hl$5c>D@)舠*ϣREE^0/sO>n 1QZ;?c㶘G70N(PEkwD5A{gL!k dYW=#AlG%߇zF ep+ߥ$ =~ LA@JDHHD(X{:;lLua%q{&A8r'ngJ!Cu9CZ!F!Z3aŐz aŐZ5f;C\ js1|tV5C ?ZniɳN'fbӧo.[-e;PhWy;6*F {aIOC,YZҼ]5^%&yK YhZw ).;•C\=]|CEod)ߋk>߲#uOR/|{29l+1cD cks)zYa>vNOFw~-YCZ=0m {Zw9PmjrUlݎ+/.iCܙuT'(Oă@$Sҵ?)Q$:R?쬞f׊'N zYP^sO,ֿ[qk^=;ͨqrdGH8}ArYT,bmE}5 T=L 'ZQ~.a6a5}MLuێwq D}HF7ӇV3:~Z'[ #O__7~Lgֽn~}]:ئ}c>'mqYbDj|Ucb\-Nۻ0i{LC RVvͬ=X,,[n$?mobvd_R6`K3u0^/@ ŧ82^t!  !/2~_TF@,q(bcBhg\(FHB3B/cP{茠*Yq&Ȋ!"(b !! !B l1U "BNUd4JuF1l á|EM#T)5Eg0(rhP-RG`^!Am#UFM#T PATJeZCc`Q_ T@% *htĉHЀ8+#TZS,"* * lu➇OVPɂʱ(3rxXP5@'ߋBJ8P=e睸tc/)v*+~qI.N(ȃx d@嫯l)h)OٗsubZ7R2tEXm5bFB=FH@f_ l*s/zwt*PF3H,9Y}p،P)BkDe-DPLc'mVpC d)b 4%,3x P R   z=G>tg3 d([O"Pļq E8ɨB jsD #j$ j$@U#GGH0+P%TD@TDP2"B/ü [*TZ"HztxV? '5C?D@DPDDeDDPLɏfBǫ#G+E~g(Km- - J[X{:;lLua%q{&A8r'ngJ!Cu9CZ!F!Z3aŐz aŐZ5f;C\ js1|tV5C ?ZniɳN'fRf?Vo!^0ԍVaI 펲HqBy;v*P}1~N(,3Ph=sj}!ҟ}qGV$Co蟓S&#]I${m3&gGe~חn?\ E8=ϗ^.ζR+Um)׏(jT>l;fIc`oBڳ-;qyv~A"7̀F +W!QE!3&Ϗ?JK>6Ь<4GE,7NE_y==xy0iӐ!OC4< ,} *Txm?'Iv#ݟ[KSJ7R/.IPR{t{eYN)@mz<ЄJێo:(N:ښ0*<"Gj{G2fRRGw}ϽO~W.Qbs*4l)ha(}=3nPCF?yddEa'=yʫYRgB]V94i'b~f򎷵%~qB2}4壼5n[nݲ[?ǝk:5w~zO24w1(#NL:44j"qS>Cw6=L?CwK_Ưu@2TLc{1r)ß%%V>*<]uhݧ)[0~\v)RM*ⳌH){ZS'߹>T#< 7Rh*au"gmXNܾ\~KiB 㱍#S9(nS⮉M|HVp~p63:RbmkoӢ/mi3O+|*\wO[qB|:n]_d\GzpbHgl[2 m {vM' omUc'!GQ9ea;3ѧrt>[q\eX3V̝ne\=O xfd&]9L;}WW9* ؼzl. `5xW˧vRRBr&h*Cr+5hGx%{F.~b @ gE3|ge|؀ AJPvx +HxHxtHx%ڕfIH1AבϊCY"6-<@<$@8Z#Ka^5 d2uڈ+Ƴr< ߋ)*Σm^DXUilgI0=SyFCZ!F!Z3aŐz aŐZ5f;C\ js1|tV5C --y֩}D`,UJy~!P[Bw\WiB{Y+3ĝR؏{`v]%юT_!"?޶`w#E?su}( ̡4 buPjPJQ|y(%_+lR_?w(NQy3[E?cdtf~2ԘkX4FoK< 0Ctb '\8z~[)DGȕJe}Cy_\>9nr!Z:nɶRNmn3-QaO3ku[ ڧ-Ϣ;S{/R{íxzS YK =cCe}ML=wAʉF?o6onJX_iyc*/T<}+; ӌKYw,A9PxřC/w~xG=ēOMۛrU9:,ĔSw }q}ae'Xft+=P؁axaJe :iK`6e M%x]SA}0ip9M4 k&io_j#?u Gvʳ"e>ŧ+,Dl֌ PgxBS$"tC7% xa,jjIKj_"D&rdR ,/|;d8E*#;ft(tt)oWk4 鎖DRej$:(~i]v=\Wz7zPURU zUD>gD(ȇ)[G6x5 4>MSUEh|0΀ Pe3!T2|ϊ|ysO'wt^MQOS!:ilUi/i=,fJzԔϤYM{-^%I&c<2k&cl$c$JXWҲ.f#r%=c9-Qrf)kLL'*-)|?  h7İ;h<ۤ\y`6Lx/Bƌ\q񔋳5b!HoF㞺Nnu^{mwPp0T]AE\n_x|ȼ͢B]@ Cڅ7]Ch߸Zܬ,Ӭ,%dѕx^:YteFWFW@AWH)BQ5ЕѕѕiV`]|Ea~w!ؠc;DhʀLFcdpFIFI@AIHdFctdtdtdtdtd|K'hn6MqhWp=P=R ==P 'IF!k8 =JTNڰ++R)hPFvl@ )`вaVR+אiW6&gAT!4zH>Bgdm@ ڨڠ*YP!r4666 $ 6JTN:BymP58vy"PATyFFe'*6JFv"llIenF@@!@ vTݻwOg@:qtI^!Q)ُ {Z 8}2tTWAJ|l[;LT~*uKY:زig0nt тoiX1 |[:@&'kڙJ#VM63٭OՁP^ ϧehiU㓓ewK6uԍq<;ͦmrdGI=s',x"QsSWzS*n9]]~.!Vae>}MLێRw D}H1i֌kC-8}+}99 +L/qfkWߥ8xz@9{L:fZ..z{&mouԳrU%*syUyWyX5eŅyt=_ɾ >?=ʪy\uf>Vxyż|;h-Вa]ni#i2% ?u Gv.E.)^Ё `44+h(σPP_A_E/ 6^@Eb -]R;S Z*6-;@;@;;E/˝ ёA6%F 5 gջdT)LdA)L~d.)LNd)LdFQ>HMc@Yw.ngCWEˡ'7 H +"'9 EN(rV`P;"g/"h!9 / E>!9`6KPX (B(#<_< P<"'9`3B@A@AC_;$9J%PPEN(rBP,yuP"cFKj^.=oV YQh~g֚=ԝP /,O'џGyGD]W]:D!cDV1k 1щNLDDo~gL3:PtFLtXD;D< 7!&:/^6ZafE~RbDG.y15Y(y(Z(TB_E/ 򏉎~< c6  /~I_LYtEGʃ#x((w w%Ò`f6L1:3[  0~Kr'&E(ɀ>tg321['LBk{1oߓ38U!Mqbw|\Rv´ 7ţvpW nEijL;7A-W;KN;9yt=_ɾ ??c#y\ŗxwИ-ВanK@Y_d?u Gv9"~\>I|PL-<@!" A~QK$ +i݋to(!OԻj~،PP/wRxihcӑ p^n!  lOC^E/6-1f`f#'!jD3B@A@aznY ߎ$!p2#YLV&Q`=R:BvF_y(y(yyY~Uς d@u~.lk2!b f]b3e !Jt臐)Hy^=~X{:;lLua% q{&A8r'ngJ!Cu9CZ!F!Z3aŐz aŐZ5f;C\ js1|tV5C ?ZniɳN'fR*?Iv E"{Br(HĻmwHG<17|7 [+-ik`Z}<qGt G~m(Cb݋h ';?&"?޼nqw청 7E9<\Aׅg[pZIDGJMIv3k'e_*/[ʫbiUNs媻%:kʶ<;͸rdGH0=s򺵬By!Yދ cB#z3Nt}ɸQ[Dl|)&.nRNԇdfcƬ_1~z̺u6ŮuW +/qfkWߥ8Qdz@9{U:l ]?,.+a崣3S7]V?tyy"W!W"WnEjkϗ?d`V^3+ CdH6;C^ gaJe z **؀+Ҭ`0*SC[})K&\s)$sQP!RP KgׇwuqֈfҰlJ_E]ipu.~_eDl$)z6IOqcWJ܌Qv!R6ii-8zuRɿoN}eINt8JNO/d/_1ym [td_yj^> ӻP9L9Mqw<*Hq-#%Rϓ睜Z(\w_. 7|n}Zx?\QI^!Z~pX'k9YPf=-=y 5kQ3=y-mA-FZBa5$-'"r;I˟1 |Mv`_lHZ`26DmH qqqFas!6JT=u |&p[#\nP"O7d#R |C |C l&7777 Ƅ#oP%08ֽVhn D@)@m 4oH l5 7.N'v)]'c@g ܨ~Vbm[3j#WyS){)!a൜F-a.F\]`sfƬ\Ls뵃f֪IvͭV[)'Q36|Dl-YrC-,v?TZjO JRZXrg.{O߇W4 d([߻vK {ѓ"^$z"ș%a_sȯ_ QsG;ww &> NJw;dnV2׾SRx>Il6_V[Hfj %V}cX6%/xdaz5U#rqZC<)_ON*#c12Y鳣eL?{Gl麿huºkO+l-^|Y.t[SΔM\뛊0%l3<ַ}W!Ñnn 'w[lw옻_P_F}ݼV}=G˫ Tߓ1 v汖ZzĮG%zˆO?[m>SauhZ0E5u  4#SV̘aOF#,9Qgz}yC #VSujJ냵EY8~ eZ7rV:O>MK.]˻.@`– ]W20~LƶkH\v3kK#ɾߞu}(Vj4X{ܽlɠg47,FrK6}To>aܰ u,ދʝ<}d]L`ٛj,> ÞהTm`<]yr>$_v^46T<}+} Ya%L|3^#7w.e2>1oߓX66._.nIn4Rv+ÔG˩%G RZ`#KT2t+SqڭXʂr0[;vv`%c^{eC?lcsil3yw֥ɒlxx]Q.Kis} aR/񟖊T! =VPK,f*ځ*ϊ |g#Rs]@A (<(]CK$@XYAX/]V:*i钏"+lbRYPP^k_͌ede+Ӭ +#+oR{g]0~ݣ. e9VUn)3 2 2A(pN3LMi+MA/sB ,OL1[3%# "ŕo>ȷ,|<{Y(.ߋ8oQ59*tlgb=fFCZ!F!Z3aHc8nېz aŐZ5f;C\ js1|tV5CLI^O=#VRϱ + MOtd_yq"e.Ŵ[J.RLڐxH KtDrݞe3wp{b,AV;ēטzPKǻp),3FVUd~_qG+o{$QtQCyvf?)龠Bo2*T NhrѵL[txHΎvĭyIK\utg&(u[[WHR;bf<W{*ھIy8$=Pl8h_UvWiGGʩ?Y} R+R?9gX!R[b؁Rg}zpTS!`u&dSŎdV{#uq1*~InTTݣ6Kx!R6mRKR0K6X"-Ӭ -tw^Q{eWa!R!R .,Z{eeeet/? ґ^{f,B$ªM4fpF@cHAcH٥L((((4*(%~Yٗa)@4"\9DIiF(ɐ)(ɐ)VFKddYlSlJa|gH_&t/C /C // 2 2~@!^FOpɂS!b"$WJUtdf̏ )!RAT@FFFFF~NF!#Ө?dlT>ߪl@d80P580/ې)H"o yy{vMQ"o dIcx=]2E{$Ȋ!R7AІ *άn7 7@dou dbʹnM5* * Hݐ9"8:1B7`#I tC 0T@܀=Qtbǝ%y{Q?Dy̍ٚ]W ʓgɳgpfS-gHQKҜ6Hbs1Qk& 1۹R$ 1۹R&lbHtV!rY+圜|tV5C ?ZniɳN'z-&ͻ!M3^XCKv)[B7Į+gcGhBn sm):257W#{Br(HsmE2؏9d0T>TIG,QcrRiٛm_|ާTĴ8_߆G?mrc;Y6VՔԴu]lRvY:3~gyQ("E?گXлeGVtxS_W~AJ]orqkI2^>ϔ[P~U˶F6RJuBߞ? SC%ե)\soю|s'D-\F%,hDzznnxuJuV{3j}99\/d_GSitƖ%>@Ɖgnׂg^}w_Y4WbyO|_lyQL'Q~.)a5}MLuێ;汤Vxyż|;h-В!UnicY8R2 ?u Gv]~\>I|ج9|@ +(x (x%ڕf}HK|@xgsCn c`!K  ߡ/~IǸb9ҋTtR ej^-y  !# JB/J~찂F,bI }(I2kgAzʦz!A d{໫z*YOS "$ d&o&Hk%*"3d@ m!"JT{Gg5yo)]'ccTڔo+t4Β;{4!f;C덄!f;Cf!A!jYv.T+Ig5۹R)'lbH f{k&[ZSi9f_{~0_ʍy|Vu[6P[bh݋ʳݱ# C~Zbf nqVh5 0R-\|t(BEw?-Yy2ofSCR﷢ }]} PD7鉑p%ё&o.≓/sqUUqB|99U#?H_SQNm-]8jFkMZW3/u*/T<}+; DKYw,9Pxĝ9%v?(s&m~¤͕2WadvdX,x8\9L2ov`1+ٗ#i梀 d*M{vxy |;h-ВaEnk@N_Nf?u Gvʳ"?@.$>XaF*f!ѪP.(BHtg32a[DJ=}  J۟g~>ҵ{{Q?EyMv, E{ nȏ?y2oBys+W'[vW]:,.U kLWJg$:R_{nx6JҒZ1/|عrimɮ'-Nkn3-Q6ignEvdnbg}Z8=sD{GɲS1=~}K>%zϱ]޾ =ێw D}HZ?o62inje~Gh_Wy~fؕnd%ά{t)L(|Oއwo4Nw?a&eTCF[uJ&`٪u\\9L2Wv`燡+ٗlf] dJ+*M;exy |;h-<-gһ,afQ~ڐ \*ځ*ϊ |gc)UA2*@Q  ~QKr7"I{5Yi'9φ)zW-  nUG+OAă 2_XUXt PP'!A/"=/5\7pnwjՌPm|39tap,;!el9 s6ẇ9l~Ĝ]6b.k1gsȘ[$쎕~ŐC1ۆCsgfֱmqѺ,/GLr$f$8P,5EN9甒R:2 Ͽ|l/I+)]/󙴒ӳF{/R뛤$$i$I#Iڅ5F 4v`LF2O^-$DaV%I#|HIHl  P(x (x%I#xHIHf~(~(~~w%~$PMINDItX\ PPX\x%~FV r·#IX SR:BkY(w((w((w(wr_;)@\ɑkKG\)WEJ ) Iz.^݌PP6@JR{ $=ҡ2ʛ@}jw@9!l6Mq26q_` <J)R | xW#$ ,3]=;x42w{Q/K0,q paPR e{+zwUlW $Ly~N NN 蔨/(蔐))' 3֞N~N=([_+8+eCybբOsԮ'~z77[Ligž]?ಯN3u<h\3}?"MZLxZ?|Ђbڕ Tm×xrr>$؏lM鍫_q ?7~]ʑ/vcYa`|3^7w.>1oߓx8 0aSbDWs=m~¤M2yW vbz̞XʂКhLm2%2sD6`@RxwРZ%Cr$D?0d).~b23hʳ"?@.$>X\AlpPe3(P%K / ~vek -];S Z*6-;@;@;;E/ݖ qb9ҋHzOYF ! +5aB BjKcc}ML=7wqKqr>$x7475[όVկP9ŮuW +Y/qfkWߥ8az@9{?UG׽J%ew1=uq9*+D\|=/_?M4X\7qO]':jػvx.CA/ĺ|]QQ|6O1VUyX ),C@ɐ]Ch߸ZDYYAY/ݎ?o݋╖Еx6O1Tj ؈ʐ)ʀ(\W~; 23iVhVЕKHcB9ҋTt GpEZXXi Ψː)Ģ7۷ؓ\ ٔvKQQ|sbT\8d0@̺C5o:-@ - 0&p4*4*;;?T@%KjV16Lf>_^uDA mF 6@J"6@JRxM9e6J&eZkl ̬lJcmF@mH,]3mP TQQwQݞ@t:N<(.떈';?f6Fƻ_*EFqST=ioǣ>ĜrƖD;?c;R8 cJwyƿsuhwOΊ$:Ry6L\T^֓?W ='5DZ3Du}t˰eJ%."fBA/R|]QQ|6O1lWyu[ɱ )B@گl_&w-iefe/wXH{i钏+lbR]Е!RЕP^LPtetete fRxaO2e~g(3x 0C 0 lQ`F^F^F^~Z^nFy/wYIх8^lkȑp?a b6B˕&2@ .C . l.#.露?OwGɤf{sB7(H76L0o lnLCo lnv0lZ5.J5]`s+$jrQ+$Q33wK%Si9&c|uqFJJn`̅@Zb9i]vdaGpU_ٖg'r3-Q6-.i9M49-;$ & $3rI(y(_ (o> / ~Qdw<05`ߡ  /~IǸHPя!G*Z"I&j83B@A@)B_<^<aVDG .q r6ENq򪖫Hw@ PPxwx_◻pdR ,/|;hw8(]tr֌PPPPPP޳֏A *eUoV`|03Y|y&Ј'5!_` ! d.!B d zwgDP,jut,q)X P6!!" dXEE_U*Sx Y 0|:3(V IPPPATJs降!"JV=]2E{$Ȋ!"#AІ *N2 #|3Da@AaP"*5E1yT*gmEg`d #!*hg@(BpEH-@c^1_T@%SnSqaf~`fg+VJ,j|(LUP&*{D]] *i)qHgu)N<#Dxf(^oVwǁ>)w8ĥ{ON1=PY).Lz{ 8'Ȟ(H")eTO]M BPɖ@\{$=G:dY!<Df臚($JP&Q"'B/üWjMT@%XPafVQ+WԌPPPATPQa^I*bͦ#~/1L}DP~6OqZm- - Ymmzeh*P9.paQ P8L8FV4Fk'xzY=JRY;DG@GPmR{V{X{:;lLua%q{&A8r'ngJ!Cu9CZ!F!Z3aŐz aŐZ5f;C\ js1|tV5C ?Zniɳ̘_߬=]ҟmMYC9 [OKRݥҫTnzաb̻ίvv>Ⱦ5v9t9X_\_ne&W>rڀFzÞ)}'Nlu&^i L uQDž24ޭqY^fh ^몜u>mнFҖT՟fԃgv)3R??i᧶M[`zcX|sLiF&X Wth3 އ>GˤuG~N6PtCUUդl_珣ɭĵDpg'4*{{;5=#ϱ"/9!?U9MRHYc[,n%3=37FoRk@lzRmX,'S=`ɢ~≓ ,K[riaIL& ̓/gnkK6vtbg8[LXtßgnğ,L <\Ib}œ>Gl*.tXtdĹ?D?i|=7RNԇdُMJlnjr}fr~zrU^$/vcYat|3ތgWߥzz@9{O2$Vzj|\Rv7Խ 7?3i{ǫZ=>+7_3:ק[n^: fVDĺ<;+ٗԃ鵗\{`6@f>Vxyż|;hr-i9M4xe@G+/ 6p#_pThj<+2MS@=&UVQP+"+(x (x%ڕǁ`)zW-  NJO^zUp({`VOŭ*DgF_y(y(hLFc2 2o2RFu"7F>^6&4Kifj#S$ɜKaZYDIyBI9<<9͂UjGKHL!z09To4 מD?44KRE3~Iv)[bh ؑ"P[n =!ōd`#\y+]1{5iᆖgȡ"aލ #{c\i:[YZ6SՔ$ſdyO֔wOΊ=7+G&8ʔͯelo+}FRE=Z5(ͭc9֎K.9Ⱦ:q0C /BFMFOg[]Go&ޡ<{g7V<^%ёfu f,ʫbiD\g8jˏݖjnĎ~xvsSnɤ*! {vM~˾9ԁx,ڜu1sj -i-M<ߧJ#>?ce}ML=wbyr>$_ca:ԡr]2 Ya>^|3^C8w.z>1oߓxWr\bovPIݨ7Sv)Խf&mojbuC[ޏޟj&+MR[\؁WNW@`6K3wj/Oqm}Zh]r&hsZv80Z~&^~b2+ʳ"?@.$>X[AlWm#!J Pebw_"Al]H{i钏lbwRm  ߡ/~_f"(Gz VVk"3/<@<@"$@̃^E/M{ٙIxÃ7I}[!ہ5,d;@d;@f!/~_a~"t]_IlxB7.d<@d<@d b#J Ј);ze*ϗWa@&;D$s,=[ o+)DȚ Q PP !R T@%u^6ՊMxMil (5?E@EHRCP^с^AT@%*ǎ"{cDK!#r"h#'"' \N$#J)NUE]*1əUɟAp @l йXGf({H)udJ])Ȕ*4C Y=BFYȊ"p3DV@a#6S&-VWoSZ - d@L$V* #cW eZ$i *+ # !RHJPbbл I".2 4@k82b3waPqC*"@.R(,^ysY1GT@%r|S(CdcERxR:a"TA*dF0=cF&3 0R ebл!AT2fҕ}/#FV4!6LPQJ QP*`ȋ ;:⫖AT2r! @S]P]T@eI^wtW"- d?p}{s!IE_M2 eɖDřHg\( iH7z-1"P#J.y͚hM1S ,i{H(H)YDB^x*hPL8җ2geV(mLQ/8AE@C l:#B֏%*o["0mdp(*DW% jh*YPG#?#N|G,Yq¨عI PAT:kqCS_'b+ dAqnebHqBy;v*P}1~`2#ou7w>'| #"8C_x1E<^xFr(l}fh|ht['GZY?0phFIG(#iGIݫl_|Wcq}W]:]1ahҒu辶xO'ZJ}q1Lge)\U=W |yx<_g{W|*Rǎ"{+>_wۯ힝eoe%qځE+[[iEu6 T6_wEyT.YN*Y=60*ƞ+|TQDe3c㑣eL)3+ĭ U=07JQ?v۹1)L"sny>{R~?azOYá tӏWs|x" i'å."vy^yE\ɍ99UE9* 'C/Hwm{z,;ˋo<<܅eǣ;u6t-|j$MBXS[z#0)in2CZr':׷'Xɾ/̳;0?v~_B)Ec٧ Ovj(~4*x0]vbIr⣱ ]#LS: 'aYUp~z'sB!N:ښ0:j>-NGkf&G!j J֎_{VNʖQP_^W(eQS(Lx{seB/ijF$.ĸo9F4G(a0-9UƑ iǍ+?3wzT@iGyk@׽뉔,^I9 ?5w~793I_/*g1lP9mgli5k朊0Ux2[кt{3Ŏ9W 󜊭Zl]~y){ZSz'?<9u0v3߶RjVW/jꛭn e70g:m2yoM{X췭 7L?y~OA5 [GЊJ#urѤKҖzӂ0i~y־I}UwKut,(1ŴrdGHOسX]_{iӖgYe|\̜H9,F/86/Jش?i& MWv/N璚Iȏ )LD <8Sx5eS*JSH}vKr(.Y-\聞U)k WG܌v!R6ee yuRىoN}e^ytYI?vrgy47umMd̞F3!F-aŐz#amCf!A!jYv.T+Ig5۹R)'lbH f{kiy軜ųmo'e'gn?{\J3s6ё}) 0g9ȧ)ɯ[ȭU$]/D՟[ WO׭'/OWʏT2R+rjJJ#5aZju*/# "O/30*N**=Z/@ Z/Z/~^h4D!v:Z/^|"2/AІ *[Ep()Juȋ\!2bYhPA-r8*RgBy8WBv$>Eќ+$gF]$gH tϘVS'Z3NS,O|/ .떩lɓѝ|ӕ,.o[A=K(#_.=ʳQ8vH:b$%ё ֐ZYU,ʫbiNzy־OuѺjNڽ:\~nĎBN3qn3-Q6=EGO37O[EL1.f^הtsq5̓!fY;6(6P9ŮE Ym$sϬ{ tgSM(|Onu0QQ(r఑L;paM)63y2S=݊n~q+XYZ` ev`%2zv3拓 ؼbl.n`)\ڀlϤw n =mw' k5T]zA5$ *~&^8*5T"*&)ƪ 2/`j+A w!4?H(H%\Smw1儥<& FEI_-ՈTz!Rzzq"K'0R/}>H%4*T^ T x!R6~^ {zuCeB/*/*/ YШ* <[@qT|rqj >I|"9WJ(/(ΐ)H1i/%8Og08qtY^]\y̍ga%֕ښlUy2on WeG*[NExAz{Rn|?PIDGjzn2VCvkg~(gz4=mȒъ߿_Oiyn'g8[Lizž]מv$.37Cx)&àxSQ{غ?Q_S1amǝXm7ݱQPʑ/v/L$d5iY1w.a>1oߓ|gcӾvboY쮖iG˩GU~w?aUk̅z3frQOX[g&+y57eŅyt=_ɾ ?nj&l6 7|/ywРZ%C$DӒZV;~ 72#_pThj<+2MS=f6M ihPef_"Al]H{^ l(4OԻwh PP~Kr$Di\%?2"59ҋTtV`dP*zM}:<)+ʟ5 y0bf G[/ݫ/g%:퓖jήWϰzn2Ff7e]Cy;4)#OCaZ''J7<xP}P49cݒIU myֲoNI5>]-Z{pK^oF{DT?zRa*SǦ~*Ễj=W5e0Uzn;ţ!~LlnJ](_iev*/T<}+; S KY1w.>1oߓX+0$>J쮖G)j-ew^Iۛ ZlY/|9˗vtPX,x}36#r0#؁WNW@zt؀ͫD0+SAhi9M4x@G+/Y6p#_pThj<+2MSE=f[yh(σPP2,ޯ/HkW:|b -]j";S |*w~,(~(~~_Ү!AL^YqM"#-M^n!  ( Bo1wC߁ d@ehATo[Ɏf(o";"JTjyF'QeS-l s6wٴ9lr]6t.(:gsM'[$Ե/twyd=9ҳIs%z6j]TR CehyMeyfI]MI2RӉD-F"oR.]N]"Eih&sMwtn~>L%o[b:nDㅰ'F"Yď/dx@W/CncY-\nq%>>Oq~h_<ív̶`l67/x9cPFXrƾtzHhemVe+iIjˇ<3HW':5d̤7x+d]y; ;C&ٌ4MfuSx!l։:ep񔋳5lFg?\vf`_Gזz9_ ֶ+t0!)~InTSR 5 vP6URHMR0$+ afVKգm*K2N]#*5 2 2S7 3Oyȹt}ss71Q?ǁQ`yDC#0zQ!֐x=/ /@J23kY6W;DfQAf/˝ǖIʠl j!/Pa5&34#9 93?qIEKǤ-O*nQ{0 TI&*L@WfLs̟%0*|Teg Ggx/π(!=#=OUמϲ)~b5 UgP \|hrOt'I8!p $1!15z3 33| ,16gAF3Jb#9#:!u|m=1.֕8rmWW\uݒu㩾iN3yn3-Q2N=s&.=ue_fEL}X yé~}7&?)s(.٪mP9ŮEd6Yɹw,N9PxBQAlVJg`iPyP~7/Wt%.=$]8##HE蹰;cbn9# "ȹ/ȹ%~S IN+E F`C!8Cz$^@$^@ۗ%'uHg9̇Cdfdfa}l$8\P ʖ2Vsn93 3 3ӊq׮Iń߃ڋڋ_usa[PB ĬIL1dۣRPP7/tKx_n1D{gm*kɠ`پW7#'Db#0z ;PА/π(σ=CzFz~^ݫԫf03ĀQ"? d@Cӗ8F< 8lIGHp (ČČ/%1"135K̇Mf8aQ8 *eHztĈOTA@wi@ {-$i$굽F^m"J3yۢDN~ӉwJEŕgܥ~VbY{v|?\ɳ32 j3٨% 1۹rXo$ 1۹Ҩ5\ gmR&lbHtV!rY+圜|tV5C ?ZniɳN'&;RT)U i@_h_@Γ duKܩp C" ,/H2!+/tSztg#˴n2|[E?kdt߄llʜϏD8d ό׿pҒoxÚ]7P뛋(]9aqUu_0mcS`V{=˜վ}׿C\*B)Ee_+l+RQjsqZKΓ.ٵV|]|Y/t[Sm-'6YZY/U%n0}X銊J{\ߞjko~n׭Uzӡ3}`:rhJϠCZs5cFUKgQW2g<#6c>MOXŽ/q~ˏr@.gbV\D؍R~$: Օn5,Lʫb:ݴI['Ǹ>ZWE_]quݒu㩾Nyn3-Q6=s8n-4@sgb:{iS0:TobqAMÞ2=Aʉ)F #O___DO8jr~=5sYy==sF=#3_1%)ԣZãr JsHfnoy~ 1![ynמ?wtLXy,­p.;0+faJe {)۳~*؀+2&^^1/Si]]t_?M4X31s{}uĬFҥMVOK XQPP|6O1bsTx%X9G@y躯D]D.u .}XE*Gх;ŐspAPAA7G}9ie]>%~ I$P+H F`C!8zD^@D^D^<Ȼ}w3nΜ]$loK/wYZ*'C"$`0%8|P7/˜^_"_%*s}K B/P1ݣR@pȻ(ȻȻy60w%GMi\iOџs7@A/˂hSH1ܾHF8(Rnt ݑrPrw \".a"[%6=J%~+)wrWp^v?ǖ{E([e7ڂ[]nF@y%.Rrs^ˤ\\&aR.~_U~2V`% ++[]NDr8r"n ͠ٸ(F%~ Ro 2!i P,Q˼в#{ }%fMS 2P%C3܌ǜa #6#6A4 ͠*P7~H:K6` kbR+̐ (g/\۫/Lg>nḢ3sT@e9Dt/̰;Y k`l[ʋvef3!PeS33[}y3n$ߕyt}`j@sT@%*W|1 lfhNsіPЖііwgJkז L e:>3Ng, d@ҲhˬMxf8JsPҌgLl׬47Aχe-(͠*Y|]V?!3K`T9eg(Gh@z@AzFzїH X#?3љ~F*YPB[PX8CwYyY=>ӝ!PHyj 73Bը"7 dI˹Y#Φ)| ׈ ˀ(E|Ҥ˕4g69"<35 χMl'B(~@xPɀJ{$=G:bD xx*L]i S;25o쵐_z(lm9 N'f)]'cW):s{Xg&A8r'ng0Yΐf09k ma0lbHLbs1^;Hbs1VM:Őj%f;C*夳\ )$lo͐[ZSi9fE~GIDTW ۟ -;VԪy)qR\D8 ~ G ~dtf'&SO^K> =PhM5n.)+yu" Gё)1L-0ڌˏ^=*Q+Dt/ۅի.\ʼRWBq?U܍^GYvxstj0V6hNFea56ahɎYUܩp#MH2{X%~ңۛ7 ^evUfSᾼ>#i2{7s#E߻]Jm o`MO SsE;}}͗s}e΁ٴз'M S~y~ G6ϰذpܳ]kDYeZY,\|(+* 8"qIW5Ǧu8'E_w [;SY==rl+ڻm6;.̴|\&xZ+6_V+/4MdZi4Xrfgڥg\btY}=.oOh 7i?7wUuڀX7鷦Ⱦ5v#ѺΆ`&LCIn!)O+O-=XO}NwMzS<Ε>ޚv6FyDGݭE~(V4Ҟ1'nK|l}:>ƅu|պ'_.㓓ewKwԍi wƖ%>`7ž]/z貓"O3O[eq|1"ь9ҟZ*ߧ]m{?km}ML_\v.~rr>d 6x`|ʑ/v/2}" -gֽ&r~}]:Kݦ}c>' ;mU1a1].Sv7ʹw+ rZ`#t92t+ڭfXʂښk`Z6vd_R_#W?y\Tf>xyż|;hk2S6r3DG zʽs}KvMR!=VOK;-eځ*ϊ|g#Zys]@ArAW/n\3DݕA#A/˝q'5.jCέ"5x]@]]ܼ؂.tt)6*}tKrNBOBj&e FŐykΠP7*2guK٥ċ_;Me `l yh!Na&j/83G@AE͋nwB/j/j/j/=FY!@T e%0*|dr!0_Q^wvV:"y4G7UU___ߗdN. ? 2,QOGs#FOT9@w``|*qԢ;jmQWE޾$<stbǝ%y{Q?vr37ۻJju5َǑ>_u:j]/uU?Z'-ѣo;N3xn3-Q2=s&Q[xaU#}MLێ2w D}Vu ^v&aeybW"dAV_̺DݯKgqρr$ k32rبIQjr0+gno*k) ryuZV{sY+o("Ԙ;+ٗ;`6@f>xyż|;hk7/si\ZXg?M4X{R!,T"#lb(U4]f (Ƹ]Ymn .4]Ɇ?$h&C#0zQya=:/ :/@ĀBҙˇ4*%~Yl8I]a ƖШVrn"933 3SW/ t~||7s.lkJ[5)v{T1e ߢo K-Bp} ITRb,fX*{d`F/Qqr2PyPg5m$GQo',wR莐e"]wtHY&Jtp&Pc顜LHz*-e!s=2yC~ ^۫6jhЌ!E#p*@ *gPt1i{<G6Q UPem^]] z}h(ӌކ2=ՔAxjǝiy乡=vs3/_ZH֞skzM¡rm- i7)CV i5)CV i)CвiCrsC굴RoŐj%x+Tig53dg{XZ~YQ`Ҭ2.JRǺqY@#ʵ#)W9[n _|; d BoH]Z,ݔ2>}!~J/o{뇹2oNhe>yμ"Ǟ\Z0 oxx)Ab}r%b4>u>fCoךO"O,-sn| %q k5TYΨΥY=Nٱ-@7ve<̷͌/JɊb*/ofk6ȟgl>'iRG>)^])~azYF%/}QTY.1W_*`z':s^X:W+qtqwO\umn(.\;nȤʗީO3kEv!Xը DÞE8r$jZڏglT[m_gr$Spu=~}]:H~c>GQ L$ԷvuR:R۵ib! x?@JR{:0~Ay 1 W@Κ)zWAkZw(w)Uʌ`F/!ָsa9/f`fef# A4+$;@$;H͑dm5>AMa_>z":)h"t J0*"kmh*9P97^P:6`+UDȦ퇞(*=={*"CkU(*)G{xy;g&5~+ȰEHݤ{'~r|n<|}\<ޤ@g=KQ V`+_}e ڡ̎7GP@a=Y Fͳ#,B+m0eATrre9c_y dlցMFy4T# 0 #1}h,+Bk[G~Pɳe;q">/Oq6j,p0 XV*b\r,BkS *óOW0͍/oP]&#qB/ -IJ)# "0 #B1]ﵑb~_FPɁJ{&lkHX)ZGvg$dWaf5 bEs^/Bo T@%tj =ܾVNg=>NM&ĥ-QNF4r3=N&PJ髓TQ_̐z2oŐZ2oŐj2oŐJ2 gۘ=aϘ,.iz'LI.JRƣǺޏk_S.ZxOwoI_)vD0=_WH#ϑdQGa Ww-țH/t+kB{ ]rĜ=P8|dN-#s*+}bEߗst:80!Ɩ0#͸|)?G{xyR\>O##ͯ}=1 ט͌侴o2wW@bħ)4-.Zv!WZrxywxjЛ&QތdX799"I; t 645 yabNƺ6M}/H{VrI 7I2@Q2!\Xc1Ob07eL:ߗN)N|Vqm%;uN()&92cx'K7G7)NgwLO[9Li>|q̋^o4k9ifQT0'3li+{<_ޘnDҬ'jh*IµU)gɮ [' )MTYθw8ۉkO];~@w'~-„&o+~zxfr_ Ŋa;jV 6Թw/ɼVx}(u&u9XڦbLUo0['ʐ08@o/?-6SԈG#Qx3gVyspAj{זJG(%M"R~ܴ~bU;]v<=K\6G#>3XU˶XW=-4rG'^Ot.QmuJ"|[zvtm뼾pvN=?5ͮdQ>2k<$ܞL%GQDX./zYݹ+Ve΄NrUxżW݌-Nݸ K>)Fʝf_m|-Y=1ktM|[&zqK_ݯUC@Ⱦrv$FuKM!Oԛ֒4Y/nwn\Z}50>u:WӽzuGs6dgWݸJq˵LLi {fv͹΢3q|<#퍿?g~a4.*Qʇ?]v3.ԧߏKF5>3?=*7P<~;;?v%V#nqjkgWߥ3TI|گr(&jiojT3_W*rו'OYjZ%I90g+Sx72s,V`eYL;/W^esavv~+Ѵkcsb[ 0KTC# T7`7WFGx d֬K<QfHVf>ħkWir6&` -R %)S RrRٯ/ᗈLUp%rC5m-;H;H;;E/4=N&P6}u9jnSj4SҬSҨSRoŐZ5x+T+ig5[1RN;9ޘ!+?GְUrˊA"Y.JR5.? n T N:B\{81brE8b$ u>fCoךϏ8'+H">7DEѸDqac(*zc?Zy%q3XL*Q=iC:=}]dXzȾ W(f>~r|6<)xq@Jsy}opέ諓h(.9_(Z_rNoOëΕt/^ua\ϯnoCvՍt=r,Cg;k!>+_gfԕc7^t$̤y{_-^nk ~{ȌnStg}GsOS!{%"M4Dz]$~3.ԧG%7uuc-gXW>#_οd-N{tGǧ+|"Iu~xۇ񱩯~}u剳SFmn}UD_FO:' Xʜfۙj ɣwؿ}Kf(!؀Ml.} F%_\rr*ݛp !Z_2>qT`j\Y7>XzJ 3cwJ熾L5_ZHl&jG'yp\yz{__*Ium7)sqm5)sqm)sqm)sqͭҨ[Q36ZIf lnF Yr#kX*G:NԟЏ|mjvG\u e[~#{*NФ\ nsr׎S@"̖:n0RxRcx'K7Go6L/B}!~J/o{뇹2ome>̼"ǞWZ0u XuFeId}d>NRYd_gaW3bSUxg$튃3r&cʡi6i9 ^T1;}γe\Na-stwn<D zyzv%/u7jTiV6՚ފK72\e:CG*l\{^K^k>>9X&/eGP|kd4.A\Xꌊ$h؏{^m~z\_;2][郌$-_G_ķMZ9o޼/vT0,ّ}*c˙D1lr|^s/u:J#~t~QTY.A4fVsxչW׫8|wrqކ,febgb 7dgk=3kg',Ӎb<^.Qa|XDƢ~ͩHGaz=+ÓHҸrƅ=7迤ǢoL7~f*7P<~;;?v%TG853ҙpF=aҩo~ٖו'O5=ݳ=0V`%+sig2v`'OkOK_65lrmQ'5l}`D54 K\N{XvAx9QK?W#ZJ>kŧ-Tir6bsr)zHɵq~ ~ DXdrv`gmC5m-;H;H;;E/d^bzu_N MR MR e^fEzQKK9oXk`nªzmZ`L UR UR ͪzӃ^T=|sg¶&DYbt:#vZ@ Z@ ZZAoƴ*`{n_Lp@olh`F/QqJV!*J#@J=OaVR۫6j WCoP5 ٲyHB8a"Ox~ )J'@MQR QV`e""B+m|BP7ʕܳPơPc3|ESCMaR aV`aazi塷*O'_.̄RDTY8h5-?DHDX~nJSl)B0*kt1.rC\hAK}hϪSS:<7(dɀrЪFb6Q8:ɛCIZ.fHYObbHLbbHNbbH^NbbHvVsCjմRoŐJ9xcsY҂WK/+Of~T j\!@tWpbp Hu3/\y7q Dз`B.H -NnJ^olHk}׿;>C`_J7 GOvBQb̋^(x>>~kLxC-r.Y>#>qXSЙ?'2%FU(2VST\˾K7t&/Cd5zwJj3R{ S_6=w &?f9?dtS 69¿)7V1?7mLJ42gk( 77 9#Zkά ? V)nT8Hw2W\@k5TH)j^^.k {M?Z/UM?_濷 ~N㰟 מѽ ˥E1z+|~18$s㫄_(KnV:F:b0ɯ)?;{_7se-tUeC@Dub9oR޼A\W|S)*ƞ@;nߤM~78l 2o {Bws5өe|Ksu:JcN\ xbV%,H59\NQG]|>rrt;8kې]uFYLv&pC&}V=a̮?Ǿ'I\[ ?$p$W(8ɌrSהg&@,GjOS 2{֟!M4Db]\3.ԧG%}/uA-g}PWD#_οd-N{t懎ǧ+|"=t~wۇ襾~s}u剳SFmn|t4DGF:O:'Xʜ~ۙ꼌ɣwؿ}Kf ؀Ml.} %_\rr*ݛp !Z_2>qT`j\6Y7>X7J ڛ3rV=GЃ"sKVkgZw)w)oVc@"M }:ǾP%kA4ZXߤ#^LۃR}30))\[=E/&Ftǖ/gapNQjvXBHAHy]ƬZE/,A|W;a % GkfzU4 @ʺƦ AWm4JO;FPy\?'ʗJA4Em 9ω54s罾.gmA- FHcwJ熾L5_ZHl&jG'yp\yz{__*Ium7)sqm5)sqm)sqm)sqͭҨ[Q36ZIf lnF Yr#kX*G2t‰Q RT)WzZ{Ǖs|з}eл 8Y@#ʵ#2)W)F2~#|m @X6>%76GhS>z-}IǓp0=QW)P\늟W7m}nre7҂led;0o'q:,/Qo')h6w*h7nap ŻD}/+;Y)=zeZJn}=?%ؗ ѽ\y3s, E d< c;oҡz@8a t:nOO' Քc]Τ)Ǿ|o'mi2 kK}sIu95^nSΌ.ϳUTݩp޵e:F֑w:?@JQ2v_K^nzҬl5neo)rϕ7^h\ yy"[T;"ǁ>=]P'Z2ԟ_, ZIGp`s*S ^$Kn1\QQJ2qώh1Y}kgYk+@]ɬYvnMYc#,ۖp OeY #U IbdC5ܔ7׻J'22NK?i' R|*ƞ%4cJ+L:r5$O"qٓU4}N~;ut9\^{sې]ݖP}]v35ܐI/mO3kq'|]6>/'(d &7{עAntTCwcd{TSq$z"aq>%gv?/mK{>ӥ^ #_οd&-N{ tgħ+|3ژ'm^J:gW*_'7nLN,tz8Ir2,[r,'~X]feN-LU粵{;NOK_c+`6ͥ/usf& >/_ K\!ξ-g?M8X[}}=w:N^Sb?ϸ➾Ս" ]@%*죞◬Քh9*}5Rz>*:)ZEU$^f9 <oȺȺo+U4Wʶ54݅5:.U4]|+j?L{TtC#쬍b5\ (n@g+sT}sK2Eė8h2]0Ũ*oiң B lP%޼F ([RwC;ۂ*Wљ *%~<;< ]е:5Na6b38 6 63?y%N̒T|h7 T[*2;#1FJR  9@y@ɱ)3[^Qcyb'eTPr'gP<~HG SqjEܑPP֦HuФѤ߀F*ͨMS= f)GcWI:󖺆Қq^8:ɛC ^9Z5nSj4SҬSҨSRoŐZ5x+T+igV䬕rY Y?:_Vԟw?4HKR2Jc]Ǭoeoq_ÉQ+-q7/vĝ 27]vB. -NnJllPAH?%ؗ ѽ\y7ai/426g^BLcisw.-qZ;)g+3y '})ՕAb}r%b4>u>fCoךO"O,-sn| %q k5TYΨΥY=Nٱ-@7v-aj+@n^ ɗNdn*& 8\e~7)=_+ Σiv <_C✈=SD_deLIt:]uwV?~I^.*DY%Q^'JOëΕ88u':6dkWݸK9βuf32eᯝE=sUWg "/(r ڈ67՘h_XlN7zP"[gcYzxS9B}Fe5 ](G؝{q4 ˩S^8s.i1oߣ9nƟ6ԷD H}]mYgW+7)W_ײήlNLxzM:@_keHF4#0 .BdfT.̭v@Π *g7t1 7u>fUxVxcar8Yt y%b7K+]7ruE`_S4~vG=/6d=nB][,uЙF7ԸIS[nTM̰L|x+ -{`2Ӗ[a"xrBQ$:n:ga|j~?mI, ~}zv?Y=qumض\;ˮ}nȤʟ2`ѱ*Of̒<{_ ]1~IERk`3_7ԣߧAs8>haس}Oǝ ÓH2 )Ym_YwQ'o/ŕrֽt~}]:~c>Gj4L}[m5_Ճ+r9g琉Z}M0 c6@odIdV`eYk3vmƕb.%җYlfe&` 0̗F|pɁ˩to2 N7 QKWj#aؾ) = |gc5*M.fyphy)9H)g*/~5R[+G `vN1Ի\BHAHAC_;|̓ M0@"$FP괿@ @&5==^=H熁 lˡ*8Fd?8t\bJ@Y>&sI'e-,ߌ͢EeZŒ-"Jܲ<4N)'@ '@JlyئFkYL5n lnޑf=o9.z9e9.Z5s\`sk4jV+iqͭӨ゙!KNl8eIeaL6|VJv|f{ʙF?:*sz8<7̦ތ^'|5Oο\\N.U_;;lasu.+iaڬ%;mfm&m&m"m &m ذ&c6o\6A_Zo|6on)LuHa~4+;Yֳw:[Yʒ,Vr3s+j+s+ˤYhsjMVVv67k3KM$=$=|zhQR b5؁\ǵJ l2/0 [>GKo9+cEgFbM#3޶1;@V&P$\M#Qq|s- (ɢhˀwl@XFXFXFX& ,%*켑QQPQPQQQQ_"mbwje0ޝPPV̌_◯yx 9왾3{#3:2:2 :2 :2:2:t::2A!gPܢG7ʡm cOpun mC䬉bz (9x@@ɱc)*7JTj{2 stttX@`97cHߤD<|}\<ޤ"YAV`+_}e #`v<ΞN9 BnWDE=n&t76w0@Bz~~8VH_\2碧+ծ}뛉瞻wrYJ6p(\f &燁z5'r0-CNX77B l_E~%,]|nX݅tr0+rv<)-QlXlp0u ϘxE+J[(j+2{& '[|Oԅ́c">M؊|a oSۅ7ݐPe\vuY4`|Зƍgռe}4ϦZPM+5 u$R SÍ?|-ʢN7oa'Nv7dPWݸJikg43̙X Y24 {fv]{`O6n,[8Hoʆ(P<~;".)Yb(~tS^#7s.qi1oߣHV5[?~]+W2T+O2jsj,^4K9JFO:'OLhTaVveg(GU'!$1v`g1rT|[>L lvK_kq|jhpJ&'`ˏkjZ_; ) = |gc*M.f&uV Rr1R %)*/~C&I)G `vN1Ի\BHAHAC_;|̓+M7a^bzu_N MR MR eB/~QEVGG΃!Z?|aŻ6 -px)x)xxw%~j; b':A@;x]V)V)R0n-[)GcKT!IrЊhLl휆!x+͔!x+4!x+4!x+kig5[1VM;9ފ!JYV j7f87m K ^u,-G=LRTiƅǺޏbn-[ ˶8\PCH̬bfeh<ɑ}*3pAӲ=e=@@z'WwZ7׻J ?LB+{+̜[%ѕ*zp0Ɂ҂\Ώ+OOF:W+qtqwOu.{2sQv3s5ܐI/IO3kꢱ{. *ŘXEkfklb .0YY l~[(MWݯ.tk^azv]@Ѕ)[CkZ蹐)9z t=K=/_ C]O|)Br+Z iE1*[GoZh)h)ص4b@ْʼtfLPAg/W,=3n,HϐY 5Na6B34# 4C 43?y~JOe(1yBm*,j{n_Lx 1FJR r )ggSg鵽j,MvsTPPCPɁ/gPgKpN44fFO@cHAcFcӘ[ȟqewTh Oh̠*yvJב3i{<G6QER em^MM z}hڨҌ|޴*=ՓxjƝx乡=vq嚤3ouNMI8TCʞVeh #U&7_оlgv?Ɨ#okf;[%UPn:$Ic~,d-gOOF:W+qtqwO\uo稷!3ƍϵ̜LL|G=3ojgr>\M-a]$Q<3#j2*ݢcY/2{M{J?V'Q9h3.ԧlT ^m_l@9ۋh)YnhԺ ܯKg~r|گr(R]KLo+Z׵J-DL}>(gݹ\|``qbm ڞ&}JFzMO:'+1+ʜڙ03`gwؿ}K^ysROaj.}v^eyV\π;tos[wf_A*>)~'#sT`j\+|SuS-(pͬQ9C@yPuQu߀WH,aےnI.~_UW6*G savN1r.XzG@AEϑs_@g+sȹT}sK1Eėe3h1]0Ũ"oi# B lN$޼D ([wC:ۂܬT *%~vy؁ k)FgfDtf@tf绮/Yꗊ / /~wτmMr 1"1ŐmJu3-u[@[[-K/-*>ElW[+GdPyS;_ٞW7ߊ&{c'@b#0z ;W*@?Q}^uy=qN!;ƍϵLL|iwzž]shqӖ0/(7nv!n`ﱄݬGZ=S'=ÓuwS6LQ6FybwET,'_O{MtG,ǧ+|"Ō3orP?nή$YruMZsqFy=㶓ߓQ[9=HIduF`eNHLUё;;_ɾnhrf5UҗZ)`v/Q m P-csѝT7`QeF=obkXQJ&YA@/d l_k >N|E3]H_EEuYKY/_#Ph;kcn Ii#B "H(Бt_ی.Fҥ򃤋_◯v.'.iEˑ(FzȼNR ?/n^]3n7˸e :UD^,:0 h-7yȼLR d^g@} O[I T@5r."^w2kY)ω5Tf>+.f '\l]`Hy N/1V鵽Jܺ *P}1`V`%++[ޝh ج kP ըː)˨˨WuygVdfH325Z/= *K&'ODcYhmfFW@jHa f<}i^ 5|U Z3JT/>]. FX77B)Fw5ĵ _YQP!RPQE!C @=#1fgxT Q( Ґ):obfQ(LO%g@8qtJyn{\&̋V5ҟ뼚G'yp\yz:,Gf1CzsCZfsCvsCrsC굴RVݒV+ig5[1RN;9ޘ!+?GְUfx~YQ`Ҭ*.Jv)&Nt.^wA9)M@"uc 稾·WwM> É#_fw@G>E_{=YQȊޗF7){1"rd%׎S@7 ] uEh;TnWOI@zmM 'G]i˔V۞`Q\,փOl1/4GX-[23]ĘhЦZvid*+xIq"'jDvrCWƞ.`/Z2Osȗ˸tzwBnh^/V|vgQةÔ-.v"[rxywxj+o0sl$HM[r}?_Nd:Lןj#֍SSTtuշ`B.~/+;Y)=zYpHL}TQՠ&`f>|E\/L{p}+C7yyG?rwM N}S}?nڼI}WvRԭ ϞV?.?u嬾$л.T=m@iÂɵ=&LU_K^l߱%/dU5W[n ܾIkr(Ge:{Yi׵=j^wmN.5D zy u7ĪfeOW-9uI*?uZ[^)ro.gb%}FJdiI/3P*,db4>u>fi+|~ĕд \:>ϸDI nd:r bҳ7seBaV3mU_DwzQ XQ$"nk{Jixޜbd /'G U7n䨮e̴g[ Y 鯝EY?Q83in\[L釛D)?yw!!憙o~39hND6aφ{J?s=:) zU\2I9X9C˃HAoHThx hx%"4]u%sM<؁)zWCkZw)w)ww~_◯yя !(FP괿@ @&5==^=)bmQe~M%h-B_XMS ij!A A !A/~_~.ވE|֋O1<+|&tBƃHYײx*yPy~blwɾS:o<7ǖhh4=ioz4ݬ56h56Yo56Q/56^Kf lnFj%9.r5s\0s7dɹmX*:NԞ͏B|mjAp?~<=וvnUx/|pXW_źR%þd<#UF]ZдoYo{pexDE_;4 + U00[ /,1Ҟ[])9)=-ik .-*˥?qQ䷓՟7d]Wג#ҵYLL 4IA~jQmY=k{J?n]OtŢ )9迤^W{>^OrokcYbItS^7s.'i1oߣb4ZTjVd]dg~]{Ĩ kMrll;IdUA8XeV~GQvt? ;;_ɾnHJ7ͥ/5Sy`D5q3\vSބݜ00Z_CO'pT`jܵLC0)܄*`3a3s % Rv{J4qn'J;dǓ'*Noeӛ[\fj?F|Fp'kS^_t.ZלW _ZRþs"PXbJ:}5:+}ϗƥmL'_I،8i=I0e4ʽ<5$9_{ؗtvxy%=}]v^Tf^tFʍ ȹ{Ɖ$fAeVYdR7)3R6* &1Ɨ7mLێ772e}BP ú?x|%ri|~| b) R_e"h\"vZ Ux?W r /YŲPזZΪTUnM"˜jT0,ؑ}]0iBrsɯQxMa;M?TO|MF\$\E%ҵJIZ6/E=Se9IT >Ï.;GNz#:6d^WݸJGv˵̛LLO=a̮.pq.-bu "gy>c̃ҠeN&GROe/)y=2{ M%'t ? )9pIE{]]8.ot5lokcYbputS^8s.i1oߣHN4Zk63Uk_W*rƷJ֝ۍC7EeMϓԤۭosY+ˬ}BĄ0 Vj^1vv~+ٗՇ59`\2X0%JLـhaZN{Vnô>BR4MҲՅ#+Y^+H%+̵a l_5lx >SÀ!0 <ohˀ(σRٯ",#,#,#,VKrҝ!#Pʰ;kcr QPPAQBXAT/82^79ZԚ. F`Cj#48B3 B3fdfdfdfdf 23~_>Aq(Z@騰r}QЗPЗPЗї}BPA_/QQٹ䟨aH@4 BS T/U ӴёPБPX%TP +dQl#Q`V@ ri   J: 2a!gXjTAYL(#+Z6Z/}Z7(P=I#>wVeMj6̢=|ـ(σCΆHaa lll Ae ] *CۖA ƞrC@Y9 (܀(kOQATrR۫ҍҍM`AXBPɳNVub_LxTol`F/Q4pDp(G@@AP٬^m ,H ,G]*kyl)ƾ7~$7@κ)]-YPEM RXPP *W(@jܠ*9P9ťP -Jpg=h87\jͲRoRYW>47"R~(YaRT'A7[r+k5`v<}ΞN9 0f<5{|{tl=*ci72,.$@z}P}Ht0 0P >h}@wU,H99K*9P|HǬŠO@ M:!ajg^8;yX{F֦Ca[СJ´+v)G:>cLkϼ.[~MΫqt7 :hަN ]̐v2oŐV2S7mHNbbH^NbbHvVsCjմRoŐJ9xcvDp`Ӏ?Qw 0iVijj XD="I0-7K_͂`ֻ77kG<jđ"@t(sqtq~9vqN'F2)ݎ7e.вFZ ՏX3> +#BO\Y@1}ti+w*>]}Xl['ƞƹ!tzG?G=E:{FSRZ0wC :|~Ek]H7:;6ˈ[9ר;Z [f$zę)g?뻏^@;aO7W8Q;O+*Q?'^79tv/kvK#wI^8VhwtSzfc40Bݢ tᙉ?%ؗ GO{݊K>De̼GLn`ln2`s;,m%UDP@ =Ka9oAȻ͍/ock"Wh<vqUNx;72_ud̜S'Dît#Z_gWl'mi"skp_OijV? VNۻU`Jw:?蚗_//So䅽X*ʦZVOy&RƲWِm]ZT̲\;˶nȤʟ󾯝E.yew{oKi_C7OnED}UwQT9B}vr,W67ʑ/v^dIAԺܯKg~g|گr(foJfl_W*rו'OId29x#O:'+jm1V+s}iÂg1v`g1:mLPfҗa>0_\%.ҽ ?eڠkqZ_f\%bj\+|3uSު4err)߈))9HW~KD;:uDG `vN1Ի\BHAHAC_;|̓ңEͬHy`F/Q1T:/))IMEzEDXú({N 4֝/צδ R R/_I bV$:AΘ;x]V)V)VVr[m-"؞W7+764E08BcBiR %.h+yXUB-F'FP4=N&P6}u9jnSj4SҬSҨSRoŐZ5x+T+ig5[1RN;9ޘ!+?GְUrˊA"Y6uVf[vДr T N:B\{81jrE8 r+;&T0F #wB^8VhwtSzzcDB] {GVa>~׎2c^BLcɭ^`:j22~/R>kZ3/K^c?VxP2y(2W P2VCދ< r /YŲPV:[(qJyɂ+W^pMJ~ (dC}i0z%:u6-a$%ѕRW*X%g,5k~g>]wzϯnoCuuK_u Y͌t&pC&}Vԣgf]cW]8Wmxu "q";g@jtI]jF4(*T9hNzNdL~,9]O](g\O)!鬽. q>#!.%@9AԺܯKg~_|گr(jΏK}06)+O2js#kt`' 7Op9a#JVܾiFZAg k%җ0\`M0J`v/Q .SބFaf_A͌IHVf>ħ~4Yn)&)d_"Bo1ˮ֩+}*GY;PjwpM[ R R ~K5"EėѬh<0Ũ^BӃHAӃH٤Ћ_"EO\ar=xZsKVkg]y)y)yyЋ_◯Rx8U7f؂mb(yzI iyA A 0=~KݱK1}١dgX5SZ:ִ R R^~UCr"?moEkyc'@\#0z 3LR] ss))j#JVj{FPzc i& T@%nC:cGxTLep )FrC\hAK}hϪSS:<7(dɀrЪFb6Q8:ɛCIZ.fHYObbHLbbHNbbH^NbbHvVsCjմRoŐJ9xcsY҂WK/+Of~T+UdǺMY/@#ʵv(W9ێn _|; d BoH]"Z,ݔ2P:>w})n K{9"`2{~ϿOOsit^;2ed&_|B@ɽ^k>T?u8L^:ʶ̹U/%b7Pbd:F:f8Eg~}oKbY Pg!}%G^/M2o*%[8\exb7):/_+ #3Bh+tAN[kE~}gř.x_])Naz砕m__zr>4RV!u9ŗɆUoCfuu[_uYfs&pC&}VԷgfmc]8W}xu "qqVϐXRG%Y{]}F>\OˇWry,1/ũu__}_}嘏7QԔa\R_W8{?eF9HNos0GX<}sa$0v`'ONK_4C8lr-A 5A}`D54 K]{XA=MK&143W#Z#bLlfe @ {@ k]+uJ_(G `vN1Ի\BHAHAC_;|̓t?ty4kRKbT UN iA A lRCу^E/"U/L9$Am +in3-$+Ki<+3Ng >>N5F|159jR4=N&P6}u9*nSj4SҬSҨSRoŐZ5x+T+ig5[1RN;9ޘ!+?GְUrˊ"Y6[>&c77PF_É#A9[K>:ԦtjX_;{ _-}'ƾw]x>ދF}EטV}5e*MZ^wO~R+6*.-p끢 g™{KxP3x]6;3g:eP`T0}S=?^чGdغ_VEeNr ~[/U2,LVud_d Nzs_+ #d-ZR'%iɲP:7ƻlơqOKlIJP.P,0}b.,]?Us?fyz1 zչ?ˋngCuՍîmv}3;5ܐIv9Cs߯ wQj~B$Q4gF<0}b-i}4ƒ=?=kÓ{5vSrjDmK^hiz*7okcYbhtS^8s.i1oߣHBa[뇑;h]yQ>[c,S;1u gaV2'uhY؁<<W/}Ҍ5eCkA|jhpJ&0AKǮsydj\+|3uSYU\T@vHawnHMν_EÃ_E/!W:]qSWB9 Ux;6v@ @ kD/E[n`MB#0zIi8/4=H4=HMjz(z (z%RڢO~Xu@jڴvZ@ Z@JwʬMuzP_ 2;H[A2i٤wlY;HV*=!3>8Wdn(c(c؝Ya+ ҙE\؁qI ̬/-вӻG߁p繡l\>z6 @uOn@ay<_< b{G"ޑDFC@A@A_E/+s$B.Ip= @=@o$zD(MWKthȵoKl;F eP P z $lMuٽRd=<؁S T/U4PֵZo{XXyꞋf~JRoRYW>M&Ukjn%*WRm *-זB=o+^ɖ dK  @;3R e-b3Owtyn{-ѵQ1Mz W)8=$o+OoW'꺘!f=e9ފ!F3e9ފ!z;eH37mH^NbbHvVsCjմRoŐJ9xcy];Ur]"MOX~8v~;9ꈫ?vsjtYX#Nk RϫzyJ򟿖RSU$z&.RtY\K֥}o8-? >nCSF4Zg [$V]!L)@|LfI=LsL-g)Cd!^T bL! , i5/3g3|D9Cs':g5F7ɭr90떛;]Kh><֨P6+$Mo,WCt"#B2A&.Ç:nڔ`_˾`ik楅m,'L6gf1âZ,pĜZeR',lOwUhYՄ8Dۇ.vvҵZ 3 Н?'ҵp'kb"11Ll2DabΆbNvlsvC!}N9֡llgEvI_սRW_nۅUQي-?ce+dYbOmي-?e+d`6fj~BlZӉpjԏgM g֔6_ݡ~V}̎w*Ɇ;8$ؼT`ﱇNM`63PٓnҮ:q#d.VtYFʙl6HcN򡣉 Tn=ovXf&U(]'s;o+Gھnhsim1`\nkIFꌷ-D©]lQ'v跡w'mjMMci9:r|PJxlfTPSa` rd_LJzyizM?Z/˭M?_꿧|$ĥbϻ@J}k:?'^7G޵,NxT(֊ ϒ֖TiFO|l3:R(/8{w3uš)t[]e_ afvN u@ CI_ǎɅ0&Ϛ(; JPP6]r"QB z4*̕G=F@(((= 71(rhY }qpNA pe!ݒn[▸%MH  !F[R-qK!FCN\NnCÑÈ(@@5Ra01DRNPx0ȇ@PhK  ᧢CQ!  a((B PP Pa((/@ܩp \yv=[MlO-E63X\lG=P# $ C= e7z=եZ,Յ-~B? ud@Au@Au@ax 2PY2.-qa B>o_qKv9-qKd ZHC-▸%n[/i|w:b$06, @J 0=a}a=c_ҿBHKg{Rt;WuU_;l4#)tl ▸%n[4/i^S#Z_LeP/@P +@ DpPLpqCyQYPɱJ-ns鎭YY8w?pI̳$e_ҖVJΟP\K9C}-RR)..FYc=ў b= + CC~Ѡg8gܒI6%n[/i͹_r=A v~p(p !:=NT6e_ o 6+ ARywnd% @c]'1T lϑcOYf@i4s}v^G]|}Yr%S]c^vzp30{ * DKX#Q==30Iƛۮ&)]19rM]t5UjugzM¡rmor8b!x+͔!x+4!x+4!x+kig5[1VM;9ފ!JYV j7f85,G'bڳIbw*D?xi `M3 Ӈd/x&=LĖ-Cp6Q[94utꠕ}ӧK" ?<+LohX\[.'JR5#w.:euʙ&ς!E]ql'Px:#B󕼕0vvu*g{:ݳ59V4Y_+^QCtƘ2ݺ?j#hMگOU˞xsO\nz\nmT,"egr{tL{%-7иXX%}w ˻韊~nOI2L#$NCi?LX\ A79TLl9USPao%ޝ7F_ b̆jD]F2D><'9p$Ȭ|Duӯ0m,C!@j֟qN |}ש5覺|1f@ciL_WV?P9Ju]mf,]DWp'ko4DŽvأN:;A8{^ =0DGigt@ݸ'lK)9G_{dܭ{o[KI;M{O+{kci2Y͢d\T*:"u>\^]:GN{k':ݡU~x(TPXPp™3=#HVfE3/D?@A@! P@P PN{:sC>SsO=6 m@ ((D@@@(B? P(sOp2UO.^L] Ph QPP б(BD@! ]%]UoٶnUOC-qK-qK-q˝vK^ܒ-)-qK/K+U P((BD@! & P(B_8}L]Kމ5z*7Ymh>@" QP(( QPXP^{zFx(CI=0?@(BD@" Pn{@^(D@鶧 I8n>{_9Af˞PC 9:@! QP((B P" 0P/]sgOA# @" QP(( QP(B=}oi3˞{" mB QP((( F@P{zp}RÉ${ 54^}(BD@" P.{@" P.{1=YOBPh P(BD@kP P謧|_Oo=Q%(4P(BD@@zPh QP譧]iO|[?)lo4\{z4]}BP((D@@@P(z@z鱧~= dO=b@! PPP@! QP貧˞.vikFA=fW -qK-qK-w-|qKJK- |/,J0( @@@((( (BD@! N_8ERwDZ$`Mg /4XwB# U/@@@SP(š΀(tMO7*ϥzb j@@@((( F@! WO_=}/\ܡrî} ƞ_'P'CN(PP ,B(z@~쿎鰧Þ@C t@@@(((t QP(B=?ꊮo-녪lŧϞXC(a(((TP(( P@! gO=}]FWv۷υ7&P7{C@c@@@(BD@P U/" u~I+\i3/rGQ1mڊ&-ԋnpgդh^;f ZDp[ O* 6/+A[I/VK֨+l(<(-@@y& <JPP((σRcX2T((LtKw/nNe8up-qK-qK-w-QSqKJK-{ d&}O,OP@@{((((@P(BDKū]W>{w1n#<F黇mF▸%n[▸%n[▸%n[▔%nIi[W_WƼQ(ÙGPPP (((((z.P(( (yvnP G0f"Nn sC=s"PsH'PQ{  (4((D@[-tӍOAC<@@(((((t И@a:> tӍ_HXLa)n[▸%n[▸%n[Q[▔%%n[mF;:3'LGePP ?((((„@" Pp™Bk laOgz@Th * .(4PzQ|z)ޓϮthPPn@@@@:Ph QPȧ#BMg_g: @&[▸%n[▸%n[▸%nN%%n[RZtt3}Ob8 0PPPz v' QP /W4sT'P=((((c((B P{@" ({O^{oC3((((I U/@ZP((L@{:>='Sn[▸%n[▸%n[▸%▔%nIi[Y_Yƞ=Q32!t((|8@@@(4@^D@!Qp EG?KխJmC  U/@[P((Q(B>=E/,La)n[▸%n[▸%n[,h[▔%%n[aF?3y':FGePP9q(D@" 0P(BD@/p&|nL!U=+>iOA9(((b(D@" ],(D@@ӞN{ u?3}-qK-qK-qKdRܒ-)-qKKX䙾'p1rPPP (BD@! 0_PP(D@/p_|QGQx˞PC (BD@! (B P%P貧˞|[],L=epK-qK-qK-Y-qKJKܒ22x2@@@ QP((@!QP(B_8}􅿢٢tJ_2&-5z*eg ;i  P(B= P(B=Eggz:,7[▸%n[▸%n[▸%nR%%n[RZ3}O b 0*P(BD@a QP /W U/@" tSş'n[▸%n[▸%n[▸%˙▔%nIi[___=Q38Qt((L@" T' QP /W4w={'P)(((a(D@@@P(BD@Ϟ>{ c $ᖔ%nIi[;_;LQ(\ʘ9@@@@+ QP((D@" N_8}ihZ$`(▸%n[▸%n[▸%n[2 -qKJKܒn1n1Dk 0OP(„@@! U/" N_8}dy_;—c 5Qz 10jc(((b (BD@!е(D" P/ O0@3D-qK-qK-qKdRܒ-)-qKzKzvsy}OXYƔጝ{Cup@@@@f QP(BD@" ~I_k1 -Zy)GcӔk9hU^ymvqt7 ʕ髓dOlX!f=e9ފ!F3e9ފ!z;e9ފ!z9e9ފ!ZYV UjbHvVsC*崳3=d K ^u,-G>/LA\iE8Pnߘ*r(G Ǻ֕**][JR8ߗN1M@8?^'y/,:5E_Ja[|%3W3 Q D탨G7h=گ"k {M?Z/˭M?_KPxv(C&7Fc Ahjlud)7N8霘) 9H3kh >\M)4`Ko/%r%?F8CT_}_}嘏7Qc/L]m+fֹO;8eh%^JoYJ*^uЬ(@aPZR@yP+Ң(JcUPfm8@rD1(oڪ̔>@zDi 09P ]vMFO;fohYޭemO%tNv' +)3_Jv&< /pDH"dY%B!o#B &I$@ Ztlkmz M6צ*^^k[V ^%ע_OϖQD~&-ޏ L^i"/W,G$}HV򏞙<6OMi^[ɶ' $eS!i'fA-fA3 M͂n9zia!fg6s_Vn*6ӏB vc[#kh >:\̭gk=1U 9քKփW6 *ޢޢޢnK]mՖ=XKU4kq*"R%~_~e]v\vŵ 'sj+[nҲY6WVʤ*^ܝ?[x%XNb[ʹmp=n=^<7k6:Gޣk.ܷRշnu]j0_@a5@)E((^C(KD@(op ]@51kZY*%/m/m0ThJXFI$_F]/tl!h>Xa@$`+]Uj1*N|!޵oW~ۣx%Db  qH @!_7U b ~WuC\~`{@q5{DWcb(~P) S\%C1rgb(~uS|@ į6C>|S=S=巵|| LM¡rm8G%ڌY̶&V+mfʭ; i8r-[-W3 6y ԉ-kN7N^\u$QБC.vqOH}hsT~/PtuM~3hhQO*S_>0ezn6]%[%?J+0)ƾ +^Rh?<>zJcY(^˱]RS wʶBp`):ݳ/  ub=}~BFKASs%.{흜N~ "y֕>,ZZZZڶs K ^u,/@MjFH:ڤPK(Gw 7obWZ@>Uxk +RT)ՄrEM?RSU{ZZ\g޵ҏ|x漽嘆.m{yA0oG7qu"_{sw~'܈e:=B{#ڻ:(?Ĭ.qޭEww*ΎD$ 9I_fN(%Fx,7gE,#64+Lޝk G#6/*|ߚ @̌|fyiHѿLyp *Nj 6CֹA$o$Ց n4w |#,jDzj%M"۶ō XWdx#I?* bw?S#ʝHΚ:t5j9}[o[+>jGmq\`McbLy""=ԟ79$Y(àPyP@yPR@yP꫃@yPjQPJP%AIvP+)ܞn]fm;fou1mm/f&ȿĤ㉘7ɺBm庽:-& -AUP FPP^=( @A@+lE/4gҿ vϧLߣ,$ q#HR\ k [ON,v(@!G׬߾YGIu=Pdjے@m' (;(; f%aVk7OOZ*rmnzxp{0^Ͷ/vwaw"A\PTJm❦9Gu<py7P]Љt=Z`.hD YZ/|m$|?,vu ^z7fh]K/od]I~຺Bo!Emk}tZ]f.-zb+ -iv;hۭ~9^pr$9ޭVҭJE,&Xo*&XsٷXWֳXlX;VQi0oiB=k}Xun܉ f LIc,@6Z6" c,@6( (XD@l34f Kڱ֏ְUq"E$R~4 fϵ_q+0f:}5~Y穑k{7}4L<=_jPՠ7~X+YlmX4+WU ֱZe7Sw9U8m~hN|Ͳ57Ӿ8 P88ƒ/%?5wrGׯuT_? (keׇ Q?eàLeZ~F0bUx肮;O曼_y}[$FZNjՃV+;~I&H}(OfN$ .W,x.\g57 ;Wrd{Jd{ڞwx_&P6O(^%oPvvq+mU_Ѧ/bddO'˸gk q-~mgnF~ʈwj&7kvc[bk[um @:fon3[]ScrG_emˮ+КvTm/O) (  Wa[r+k(@q֍R'~p?q(+׌aobzIou%qVfr\G,iŸ'eeZ)t:J: _ͯkF ,_aZOD1^,!(p(p^l&'.Gmbk^t4%Ip(BJ#PB>\hr{*"zuYo=z(씴TL\PRWԳc뜦q}~IN C .HoDRz)WCcqUrX%UrX%V97-aik֔&ӎ zZ\\ U6Yߞ|O?-ya\j*Jͨ_//7m@'VrRwiAZd8z7G*t\ިGsXK^$Z#KTQL;ggQm=#֍ @[9p'kS^fUgX07mȝ q;Z j"uu 229:㡩b`jjsT`Z.6`2{~ĴXK*_q N_eWyjh3TvbJ Gˬ+—d[{Lٕٽuƾw)KO*f,]Dk0쁹.J?s[hj/Ihvzi h `ݹtGK6nKiWYq{6)t-:Ƣ̱:eu fuJV|3S<, Mjq<-K_߁m^^3@yPyP(<( @@y: <J PP ((σRYw&3ۡ(⠩wгPI(\y+}1 r@yn`.*[ڪhduUYZUYZu[K9҂WKѦr K~(o\WĜJzKH1c/B[lVK=1[ḩֵ̌Yl9~/ a + -{ ϡoLbV5}9OUȉ/KORc. ޝkBc?Z57ev~ג&NWD<4nφZ`||dv(α\pu\X.r mZK}ۨ624W=nf Y!+m6i@y <JPP2(lB (We&k 0(矴4~z~K1Rvv wcmO~m f2Gܔ'c`U/?xˆ`F j ~ kݑ4X%+^xb,Y|Vnk>Ur\elo+Oo\hңxqy+M[`Ng!aμ29MV< ^NY ]papA~X;ǯdcv6G/L!0jcsl6oz?Y$NBTf02:퍮ki;*{ib]B[KG%= nza_No]mn}FG;-ע?nĻP P Ja _]XSEl%Rd` =loR^i}>?A´=וv4^h ͸~(2:)ޗ%|o[Fo;kdA[×K߄W|pexĵXʛ];Cv( ( 0CDS/ Yy7€R5!*!*_D:WF P/gKCHH)SQ+vX):]C5RK*#MGBBۊ*#UFSR&/R_$ R_(B}"şK]a'/.-V C0C+2TZ0r M Ԏ;S(NW.kϼ9hU#Tt}Sx^voIAT+%Ǻ8ʎ:@DRÉ/2q!~FwѷofWJL5 +ZJЉT-UrEM[nz\no]Zб@yf/ߜWJG_~{ޏן}_c U 'k$?k8!r6+0YHV92OF Onl[C{2B̙_'g/n{Yw:sKm}[)=gZ$ 8mn?^mw ؠ4E*$ey=:|/"2"%rS(oN !_5jn;ѩV2D[ [䍨bx`4 [>9hcyz'luolWߝ| jŧ˗!]wya78;>۵W;z+'I=Qm<<ъWx5j"U6{ RJLJs }.Hm))uHHE}=)>R e RL| @.nOX )l ,J_ZGomm/:;9+GAD2i{)))?L q:"q8qK;N3_]ptqnK ~?tf5]y/BHz])Ѡsp ڶyo=/4MQ,hʫ6P7r#炤牰]9B,Ȯn)::ۮ۱_vuWxO5mklY7mI(D4ܡV}ר7eh;}:VSAX@Z JbPh (( (B{X@@NwX@.u<DsXH)msmu,0[V#cKXP~oIޮq iWs5+ Lpaday"X,>e)OY|ZDOOGuNP2Ͷ)?qhIFԤD69j7OIi>LcӃ,ZKjj3֘3s!iw߭>ׂւLP Xt2^y|3IQv EPt؞'gѮ|F\*icUEnP@5ObF@)1(J $Kt=1$4b+<}PP((Hh$4 Ee-h{Ȟ܏waŏG!("@Act *Oͭ*2>z?NuM,K$D,1KD92WL5-e`\Wэ >)ƍ{e`@i^2׹ΫU=՜{9m|WsM洤]i\绚zw5 j<׽ʊmOS_-CqPBn7ʷ?nBV_ rDڥ"u=Zus4b S8_\.w}EVV[o{eEڊ7l^FvFm~u#p P i? E9];Gc{G+;%ndOءo;OՏ&P1Tf*#iF/,=O70]r»^^E^n녴^"ů[ ::_ku<6ʋ3-1>ה ["^ufւT[ kXKu8khzZIs}c250*Z( b^_<- 60C8̵笽*';?"zN Z~_}Ua(ddf>pc):!bn {JAad@a+Mp3c!TWπ(;U(t@A>#˜N\\>(ec=P,@ Qen|mk;"^ (| ( QPP% #T>*WCLT>PP]΂M1= P |@AcH{6S@ף]O(z@@@AףlܴdDmƍ-;;h C0]^9r~/^HFxt@Y ,OJx0 <̗y?a2ʀnX(PJXBCefYb%UҼHCpVWb`,1Ki4d&3 w=?. dxYb%fpEb9t+P]V6bhPVM֤E^6]&:N$j YWUPFI}_2@Wp<Ý xmD?~n񈠞Xd7frm]ը\OzzczukZ3ӯ^V~j֬Y^2gEz1k/u3_oz˟ﶌwi6Pk7ҎMZmJyר7}yG*bKv睲J1Z2֦eVӡPĠ47 (RzP$R@)1(C!bm 4(RbP=J PUρ2bДn U7x}yꣳx:.&Cj[x8C!pih,dav^wɵQ:pI#~ܲgNw+1]%\k#]\=тIն$&ڤi'SߵVxFa\dmJjs%BJċ|Ynz[Cd;A˟(dfccTS (%9((((;Xtr((;X(r^(;XD('죶w= z\ g g*s(;< l(x@@@Q ™ .sXy_<'N//Y|=~z 0@@@aP((( ( 3iu'L3M{a(B PPP@ dPB(4=0M]2M_e'g#awre @@Rƀ(x@fPXT(B|@f뙭g~G?iz ;@R`((4= Piz@PXT(4=Lg=\\PNWzX[Ϥ=ΆI{ 1@@@aPH@B/@B/@ 0iϤ=|53՘@!K(((P@!@!@!b&Pg&|O3Oӓ^Dk{zھ# [{H0D>|<" I2@@@! (D>  }PX(D>Lg`:]'rEOFvg @@P@!@aP(3_|}Ňtg'gPD 0Y(d= z Pz&w8Y/'GgoCXƬ= 1@@@!u (d$ z PY{fw8kɷz|p<8&3v mf0;@!C(((P@@ PY|fx? n Su'}f0+@!;((( 01 ((( P|fx?ȉ:߱tPy,gC{@Rc((BP(((TN P{w:}XDr0;px ~ g枙{<3@@b((= PPP@a= 33s{ѷw0W\=>z y0@@@aP(((^(@az/E؎qk;.뙳0g@!((($P(((B(z@왳g~G3OA3O(B PPPH QP QP(^(K;Oyz/(Pȁ (x@P@a== 3h0SL=L= Y0@@@aP(L=  +Pg|W޵ #g4=P +@ 0M(B(‚z@陦g>ew8ѽCNP p`Gf0{@!3(((P@!@> PgO~O@!#/ʮwd{;Pȍ ( z 0({@g>܏oKDDt=o @@P@!@!@a= 3o2^tmѽyv+qewИ@!7(l PPPB(º{@ad#F'B:])a<.wd=Ň,gBGĄ>Pd@&PPP@aBP }&x?Gr0;pd:vܭgC>E@! (> P((^(ق>0>: P`Ek$nڑ1w=>{ y1@aPPH  QP((,@aP{x2“ѝ|}qG홲0eT>0@ yc@B/@@@!@_> SL3e"kp C{q9LCZ/** P(((B(=0y=v3Oّ =0w &$Ɋ c@&$PP Pe(3s}d}"<{-:a$Hz g0t@-L〈Ԙ@a~PPP& 0? (((hB/@ e^'Ku/S9}~'э|0|gFODƌ>!0Q ((( 0Q (((hB/@ 3%K3p}yUZBħ>y{3@a:PPP@a:P PB(J|@ad޾}|g'B0aτ= {< #(((dP@!@!@a= L3aT>.X|b5@!M(((P((((^(L S%SeʿLǫ_e;9_oՙߔ0KY,`%fY,-1K,q%f;d dy==5fYm7s8ˡ=} "M6ynd 1#)ٕέ}n|wu)j\~=)@ڑ:E0PJϑ0?P]֓ѝ|r6o^elZČ]?3&qo:f9]iƬaLV7F[?xm2xжըܕ~j3w_]z:sWfZ~YkׯW1kʨZ~``OJQ[> YǦJbUɢ[ʷ'Ž"{BpF)ުϳ]J`R8`憄EYr =^("_$iVgQ*U1(?ҏ{I4w:Jku3w{Nlb/'{\`zPqU83F4 V7!qq.*)TIv]{K&33jOG¨|ǒ~|{'8xר7}yG*^ÿӕv#<pEZxE'@Ai PyPj(<( < ((;h7bvH}kYU?zStٗlO9})7ȍf33Z 㵍Qge)rHFxvzᮗz߮zޮzqݮmz+|K"+/^׳.^`%V}rI/-X^Tm5X^Z^4mԻusˀv{KˀZs2hnw/Ƃemo߶'[ţ'' K 6ہ/(-:(栰P;L%gp6+E> lTP|.s\{=z o( QP%x:'{zA雳g.9ջκ`a0ܫE 0qS|Οiɇw穣D?n9s_:*F|F!?W(/#[g.vLڎv@ڎN)Ȼ}t{Y8ڨey-w@y& <JPP((σR@43@9PL@@A{ͲmJ*Zw)kNt"xo*5r}];1f_/ˣeʂ #}v(X6e|K"+/^ѳ.^Z%}2 I/ʽ-XVٳeEhڞ}wߝtCY덢ehƒfq/Re)vx㭐MD>-F/6!bn {JAaw3@a&M όP|@a+W@3 K01ǽw`A Pe]싧x9xyGl^P/(|@Acbˁ ׽Gq4h|< PP] Vr:])9W` ?A9v 'l'ϥ" ſׯJG\ѹ“ѝ|??"C0.j E7G]޿d͛V 6 5ޔ}}1}neOJn]6qaѽyP7;ӓ^D+D+x#p PpH'Rn)m[G2E:LH'Ni|:ݓΟm{穣D?ދsv/k~pb.#F/e-' VK95# FJZ J"0*'#V}=Uݰjs>ϩQmSޮ[9Iэjc k+ZJ[6j+lڴax@)/(-RF@ < PyPj[1(£ `u< (/1PXj ,J/0n78}54I+_:;9+Ku2gB'_ogq^ ;rUiN{33wG.3W@sKW<>c\c6/#RbB @ >| 2e{jݚ^NozNw1ƪIR$ =zt[G0 QK` <|<>=Y8 %DJӉ׈x{F|-tȅq:q:qz^:q:oNN>r!O'N'Nmޠ!o<4g?q&wo݋ߖd%׏ϫoq~\I\=WWWq\뫏oU<=Oӓ E z(^?_[fx}>^?ߘ:ir;GYԱb?ސi#?ߵf=*M^YKZzFmzuk3ӯ^֚~,WfEz9k/u3Y{ѯQz[e;^\Oku<6 Q EҮXìߧx}?ؑ{Br=CϑYת[};]?~MeaŦ@;ud0v,xV5im M*9̿dX{W{[^I?GM]K{rԣḄ.#col8]фH))=lb)Rꏛ˥~H6Z:m$i#y@m$VZUޭ>:$c2䕊&x1zrnn'gQ]yWwNY2dd2Mn@e !qqDB j.4蔲xY_ TP*i]a4 WwPPPe@Dm8.PP%f@Q{^ėh0("斷'E5!e[2N8{#n~J儢Hӑ]'{b!?_?+d~S}6΁F:E䋖>VUÙH~ E늎FqJz=1/㛰񖷆/31d3d*{gkN]+JMKMoDCEL[~<>'3?O"ʮb*>D]:DЧ*ש>ѵ(>p#%^_aO:s"$ +F/sꮒ7skPޓ}S_\d\]yLRZz6xd<`+WJ|;ȋNS_[O<=uEƱƓĄrQ]}~}U./Iv@zx)zbfɜU]GZ;"F,B,R=o!?=㩪I@_q i@L&&ǓQ :ճiwo8FAҢ3MK>$UIO'&t:a*L{ CN'NOS utsFY?Jk ^$==3˓U33̬ Vz ŴDn}zrFR&H\>q]Ti`YHZ, !Sdyt~0I|??tI7p:)P@4ګ6TO]X3^4;G}ǾSOyA4cTJ^Y)1Z,׬7f_gyF5s=:kՙY^fڋ~,s^,g_gy=:k/vuVVԩ{mA}sK]iWa#f\rq9M];Ab<іG}G$^pk*OBu=-!]9N<{0RBfOL]S$yt}*PeSN-c_pcebēʪ}D~қy;twh>$شw sc7X#6K?a%fw\KqԬ8\ڞIY2a/vx3VC[vmO㧹1?6ϡO~~20?~g*ݍi?|&?Fe&@l=tjL7[֜IT"D,_ -*<;9G5\(7}YɺFdqwͷ95uuuuuu}·JEݤ1.^%Fx&=VQߎ!S|Wڬn" q|_EOx _\_Q`銴'M]؅]؅]d#jBr!r!r!7d!b fYbN_m5M\?ٹI#8*G㍨Qaxm 6"QEE"y3ykη̶uܷY^Yo\ɦ]^\Oz5k^,g_gy=Ә^ꬽ۽*YKN"\էEk]iWaUvK~ʼnŹefF|. ?AO}C_v}]^_~VΛ:e{xR81 ) H1]t#!Oҵ#]{hw׉QOw"_t {+ӝ+f8B e:nYmŃChi()qqq.)T$>3tz43d15 S|S;_eq5ӛ$r@+V!u&]noR_B4rz굎U1ƭ r CbHq Jŋɂȗx+q"aHGV=gc9qƄbv `ON+߸-~ ط270E|fia%fYbϚ$ˍ]"WI éO]4bp,1K!v4< !qiI1 T2 (,1K-v=tuOerjXC}ѓ ׽+GVy2d/ڧHM2"0"Ua,"_XDj2 (LZa%fY2]"WI YD4bp,1K!v4,L\P"R-nE[@AF`%fYnQ[x}!~7;er',"XDʈW!«~Izc\*0iYb%f\*v\%4d g)P1K,%Ұ37ArIa(P%fYbHZ$-vYPIrQd.SC0\cxq|X&"_Y1ʠc!±yh9TY1, fr/P3e p;.ks \2gYbY ņg ;;PPX,1K*b8|x}?$bvM / /E؎'PطW%B1H@Ac%J%_oҦ2z@f ( 1KFfoMf*Bj#P4,1K6RR\HЍn g:}ur/g'|ry%~ /EF'..tf7#Eq!3L޵D330oYb%ft.v\eiE!c%fY" KayH/+h( "_ϑ B'vYFX~fYb% ]UoX*ˢ*(X3 C=ٓ }vyuIy;'[^|.n:ѽxq.2fɲďъjsȯn0zN׎d()8tƴόi`3 9YdPM,1KdDs iN3K v1K,1K!Ґ̤.vEXދtfYb%y-ͧe.Cޅ!E:R3J\\ 9/;8 w[,eb:̅3FFF5\u\w&G;>-SY$^0(T`%fYRBq vYY5V^ nB@ *,1Kq. /nYxe` ^4͋~exB%. V]0J1J檋3cCCCK.0K. R#\0(Lc%fYRBU vY4[lqA@ ,1Ke.lYl[ B\z$zvd( b,0Y`t ,   XRp ׅYRaRx)+@a,1K̒ O̚-aZP %fYbhY,vY4-˲ -l`4Op@^kKlq6򵾂!!!lW+nf``\u6-cCV'v76bvK|o~~0ݹWJ* wϡ~<3IAXBE PYb%fIE vIP'YE9 ( ,1K4/,e :MTgPt,8I'{b~N(H޾/jZ^̩wG/~vRwk )pߨd? Yy ܙ&fU1K,g[d$9h\h\@AL`%fYqѸhh\ ѽ e,` p[ ESDBq)ԯk{=~3v(κު2"l4"bFjbόi>.l7͙J:>E^a!j7jfnDˍ4덙ѯr#ZkFHVz/7RfUˍX欱{Ә5Vz/7bTgUٍl|s?neOaEmAx}sKx]iW15..hس#)hziϳ]H1C?wܐpHfHO1ʮӿ?7>x|; NKNanΟq釚ƺ穣Dc3w{N,bıw,С0~Uo1k+?~ 3H^ ipnB#]<!_y$B'O3;/}:>^̩X]{DDN7I\wzї7y"f'%*Ts*ZV (M@@y <JPP6((K ((PL@@|k K"[ka)^K7x}yMvug'g A6uXmܽ0n_v/#Y%KS;&gHKxvGz;zM㮗.z"zᮗnzw-#˜N_kb(B' J: Q Q]q<WGo>Qb2T>/((|_{a{=qvIȹyq䀘r@wH~@ .9_ _od@ ~t~u  ;;CV*My& ns /&'ޭ5VRn#EiQd͛V 6 ^нi-wޔ- P2rNwNu{T;7Dϑ+9"~?ssBuOD8 R%l7ћl$ʵ?~g~g3~\oVVԩ{zHwxZxhw9VL6iVRF(,R/NڎZEnO)_`_0UhUGaw؛9MeSMgxy(яk~pb.#wKPӭz;0/'DfOYmhw'Rl݆FQ^ۛ$h-5E*&nmZL (r4PyP(<(A|+(%)(ӴJAP@RJ[K]ZO3|@ (@@3iYd;+檺i!C Peנ03(H{i_Pi==2Az< 2DI;'g/τEvݏ񆀂G KttPsد7x±c|@!n@@Ac 7 e~7a$a #v(-Ox%dW:νndt_*9< 99em2؂p{vGSB3h(Eq M!cHΣnfxw# 8,uC''"0k.Q`\3L궘s@> 9|>gG>FR91eF*I)7Rnvv?t~#Qǫ?.?\>>}x}z<.홓]܆O<~~k]-$x U[Mص gjVd*-_zʹ8,^t屼zhꔣs^?vXc, Xp+Xq^q ۻϟug+oVۻŝTVinVUaޕjۮf0|Ws9|WsfC|WsL|WsfV|Ws_|Wsfi|WsrpW۽>wkӥr;gJҬX:&_\WYT]_7}MdG M=upZlڛ)~֓^77+<^ice5V<9Eϑ v)?/]yCm^W o4lW㳇:0kYZu*fKׁ;IV~+^/0o?[Co|TUu/J8QQ\qpr ?_m:J\[o[Mv&b!lvnc?tk+'MO:oMe0ouLhtkʮlk’Pv@aew~Äa3l6@a3l@@a3l@6@fFٷ@a3lZn2bU axf^avئa̙ZCAUb6@JExKKK-n ",",REɞ!m K)7ZlJl~,c )Pz+6[k|*k|XsHk|VšUޭf?Ȅ7Jꥵ~_y(pak_Wӭ:rP@0 ɉr4_f i1xj #X,1š$y]  18fYR\ّs+~?/ʾA4|vg}7GOv;YfQCxSv j,QC!8áE ]rևZ O+$o,1Kd:avI^0= neOG:@|IPC&wq稟ze]igeTGɥuV6s=:5덙Y^Qk\OzZuzu׫Y_gy=˜:ƬY^Ϩڋ~-s?neOJn]74 ەvŪ?vÖBw/u֪ϴ]8p>IH/)QFp5pKkÑkG2^mvqzס 2Ա5K}>T+վyy7{v(SGs= m]1tAz{lw(VM:Nv2ӓLD򌁬vOGb|9a7i.q;MmCˉw[FմwigiǦ^ݶRmk#@bnQZ(uz|k W7X۬?zk9E6Kg'gBt;?C:;:LeKŋ8W/KYҰ$I` `9D>;]ۛxG|Xp*"/^|tuJqt?N>}kqOcuQmaq-0zr=YT T$0:o8 (pkc»a]͙]͙]͙]͙]͙]͙E]͙k]mǚ#N(^ꏛA-O`R;ּk"_KNvy Ol>*Fԛ8^$k ?]}ll+Xڥ'gc-ڧ;|T9S4U^m|SK:gα |ƆTCP|(w&% J֛QwPwh+Ê]wle܇ܽ2 wC,F,;Uhwt_dTiMӚn.=W?^1tw!??}1mi\% A0I{vkwNq5d;Zq7~ ٳٛe޵~ޮ%sHOI=H_4Բ)I|80t&+_}Ҁ@RxO΢͔ 4`{+r %+PĠ(Z(4DӳN\3AA eNO..<ŜU oϔϔRn BP u@!#]8Ќa^E%zCt':d 1@>z o8>^P@@>v/޷}Fg}@!1@@AcR8>P0H@ K~~(H@!)(. >Z aPP%ZTZ+_oշV#n#.穓9` ۼR :_|w# 8re8/=Q'' `2[t'7@yy~@A 0!]7?|f gP%q((g|'GUnZL9c oPXW (K7>92~7(t QP%|D#uJO#D ɏ߻䷐H~E:PP]"˵Gq@@Aàa(.u>b a bDK7}<b(@@Acrf~UߊoV[˹О>u;OT !{͟HԄDK}w# S؁WS~3)~OdWrT  럘!;X3irw&}/ /O?ߵfo~4ּ\j[k5j3ӯ^ޘ~,WUg_gy5k/u׳Y{ѯiڋ~ꬽ۽:VVԩ{zڂ%斦AGҮXs^$s)?_(ӥTϨuQ8{k~ШVb7pu+JU3++Ֆh2GAW ';2Pَ'@`AY1Q{W7R GVz߄>qA(Q`{a_qi |Qً?.0p4A$\qne Oމ=*ͬӡ'і_ΟyCN}xys= v> L,be'ao?R H Ja`wNtpwPF\O77Oc/?~MDmU/nݩ8W'gq{ՔC|V!0N3;/ {;_eqvq|MDZJr)GsaXg<.'gmbK^0mPRsgMkϦJAin PJ(<(u@@y <((σb &OX )]jneұh @VM?zoy66IYyNfuXCMMZh!0Y»Š:߸.~Uޓ/XVβr}x}Jz$z|/|tnV;~+nǙYMҮc5ksunokuUsN-H;bVIb.EeY6kf ^8;M:Kqߛ0j7ʼn[Tn;vztrF"T_w )F.M,]ϖlهZv Z]͙7]͙]]͙]͙]͙]͙]͙]ml[Ohza/x4wW'F2Q({B}D ?UD:i:]COGyx`4w4 =ج f;Z-bn}uo_-%]ke_U"8P(뾎(u@u@# l# }h1#:Y,:Y$UمdٝpOJnˡꕿKh UW8-Bd<I+x2(((((((( 70V*=COgNtt`1JW~JPd%:G44OȌOFX n/i L{r-ּ[ڱ[aK# }DFOh;c6k6kT>)}j4ua]Ywk Y ,'{Ÿ xڷ`l;Ȁ o7 nv JѽKO7xlFlFlF%ȹkPy(;ege"u= wQQ~]_rW4kjfX=m򓯑~'?7ɋw ߥmh.e4{=Gmudi}y+bd,p9ڼ{<7nn~YodnX*5RJbUjj&M+ݖN{vimCzz;url]fR6=on5vrjK_l99~{H ; sFLca@vN_tc"P9}(C@[Q!)– Hi \ M%iPvX,1r7֞K&Ce5z}m^Vm;zNKC&{~ eQjuޞ=ew5oⷋK#g,K~63zן> u;۸H2s=͇U{C>12F:FIϚL7DZ^3^xG&~#-'_ozإ&N'-[lmQ5:MO W-,JQxgz4lw~h)O(dK2ӖF3 劣ٶjO%\Ӯl≵'ݪWyiFd:ސ Q 5ٚG!M^O&_~P56xW׏"7KmzFmzuk3ӯ^֚~,WfEz9k/u3Y{1lŨڋ~-s]VVԩ{EmDkWb6rK$K:])PV}F(Բ1R/b!]9^$Pp(N>ȓ330U= de϶Lpxiw5?8uea߿U(/#w[)#?~MbMLi,nBx]a'v:ӓLbY#}bU8Ƈ$q;QmCbƣ/oHۉtt-*.NMP& <JPP((σR@APe (7R[IG5HmE)ClPp[<;9xaC9'u갑,Oɂgx|^XBP'ۅ:WG+~]rm'?ܦ_yʄ~(܉Rx߽}(e 滺[f|#73+tf݇ϗ!,XSm5X2Zcj)Mk-n]7\l\5'T/yN4bY%b,_>سh{ȓ Mno'ѡd 9βhK4 y--§XT=Рv7X[(@)=(& `dR4G#Y {* Pv ZPPP *(GWxv[:}u;vz__A) R$p*h- $%XӰD$Auh-<#i BHBHJ $\K{/o2O $,pç| PGAʂ:m2F 㺢ĉd0 d${ſ+.I>J8}Ȯtnչ:"“ѝPAzPPP(x@@  -b#((6@@a^ THn ]VoEF"Lv ŭcK rD~B@@֌y 󰻲KC`Ǒ D!)**P*(c A7J,Y @< | 9 j1bnUJYm5o:pzC{nzxSn00=l{R2ꘑv .V*9sUO YNswy{Q?קM3E~Rۺ^Q~,רf_gyz:s=:լY{ѯeڋ~Lc^,gTgE?չ lNM$k [JbU8P;x"8%X9zP@tJ]nu)~h>p=!]9^$PD~$Q|No#'ɧ_ΎOħJ dײR/ ϭ$x]wS]701䜯B({ ' G:TDscC)E8t][d{kWoMXpu+BX8}k+p򵩐}M__PӍ2>upw}~cS`7GeѷgwG*?WڰVIVC)(t4,N!pwPfjMv՛NAa892>}&8$S퇌û-#jڻʹ3ڍcSn[ǶR5G_䑊?n|6U?E*ehmZ0PJ JssP(1(MB/@)?(MAj8@Rأ @6e@)1((J@ RXzzfћu;C Yy<͠!5b\#-3Wv <%O4xJcum;rmݲ?n6ON:&ǷwqWVoqj~R3.]'Ot-nt-rR{r=7/lYFFRW_GK[_\WYT]_7}ծ[1tГY|/iL3z4S}j;pz:-j^ nhg:O'Y)}g >`W2_C~~U7vݰjPs@:F֚^]K{rԣ> jǣ+#1zZ.JyAinP4((;(rԶ bPJG@A|< (w%P ,٢!᜺mύ!e~}KV5j{==>BxWi"oXkga_qȅ\-%8r;Dwt=޾x|-tȅq:q:qz^t8oo'N'[Drɧ6N2N,o]1^/ϫxy^^x9H^xzƳ؋+W(rO~MK n߯'FmWr@ﯰ[S@Uev 8bcVuK Ƀ Ӂj+8|] d&HU..N~㉳ϯ'٭0Ŵ;ZU]o ɯ⨲S6c>ovtMHC4mȺXG x+"In$E?P#~9: jzxbk2|5Jכ͍7|:oj; =M ՐW_ CT**B=uo3ON#s^8pɵ+#D~ɮOzjPRHO+[}d| usxOLAIhj0{8T.AG+x5zo5~a5?׌݋-̇1`HYlqU5L(X08Q*Fx'aWR\{~ڰԁ;?@#>ՉħWr|r}_ySȯq\G:|lqY w*&ٕ!̘xݜ188tSfww8H;ލ#gThW'y9?4[d'>>&;ϳ^qwl}/>j3q<WuIy+zcSpt}uL} vK cPA9N1c\YSҎ`m2q39ӞlJ 5GYq|[H~`rIG>d'b@*?lؕTwzhIcgc4Lbw'jGfM3& Ď:3P!r4;߇*?r?_|x>vEa,t_xy:Z%I⹵%}bJ"]?K@ d@*FhwPPkT`}r@{r53Oux<ݰ#Wqix~^aQG!굛g߭pҎ5ZSEBmnpUcY{Vk5(JssPkl@9LPx@Ao (RzPj^(σbz <G@y[׷j͒Bf\v4F\bh۬{^^ګ.(:;9+/ʌ#|QzH|$>rs?LwR;L\&.siie6qL6 )&!v9?(c1g-=|Q Q Q QJQIBBcO?T?TTTT6Kqqq~8dd1,TfH.tIK:]{zk:Oӝt_w{nz^~HwZ@ НO(Ytţ ii (BwZ@ Нt٤c}K櫇_SV^>WȕϷ|z/nVv@| >/>HwQ NK7kz|=_g/߯=}&sQ+=9#'einStծjf_gyf1s=:5j5[gsz:s=:լY{ѯeڋ~Lc^,gTgEVW(rO~Ms1R|9 d([w(]iWeUŅD(_)@IEqr13fsg_v/6zg](ȏ~PAPǪ;,c+&Nݰb{|t~e08:Ylw-WS>awz fv_2 zg dF|wӛd%<[ ˟WóMiEmsO"x-6o@y& <J]PG@y栘(£ <F@y5b;փ$M*W@x^jЎrhrc׮Y^b7pGTk5,a JhБIr (dzN%Kf29[dve8ȅ"ˎ2tot=o}b-tȅq:q:qz^t8oo'N'[Drɧ6NѹooC;~?ϫy~z";;;uxC(vawv"yP؝Py| (<((<((<̵B ;U؝y؝`yX8>5- i!N'N'Nuu=wϢȅ\.Poq{V@.䲪@@@=z:宸{N]M=GWGoTxz<=~sO>^^ȗ׷&^.fp8^o7 Ph!}ȅ\e>*2bQg>B.ՉՉsx|<> ,'V'V'VeV\_xz<枞5x}~1.}&sQ+=9#],T6yfiY^Yo\OzZkzu׫ת3ӯ^͚:Y欽Y^4fEzFu^^o!|K"+?;W#ׁ;@2߽}\)ڕvŪXVȱ]v:H[8=^NA6;{گ <_自QMH?LHiwG߷Z=;^vKϱC_NJڶ */4R8g1Vw1CՔCڂz 9fv_2 g dJ|wtӛdC![ݕ٪=H}zY .dI-U畍46J-ղQ X!!ݑC!:f"Q|YAb'i- :lvC0tREۍmW&ByS>Ƨ}&V Wzэ>7|Pt)zRɞӏ?'; [Ѡ#Z#C/>I 1RJ&c$c$cV'B*+d<tU#O2+[٫$(P:: X;iC)WK@?r`;+ Y)bB  ~n* >v4ed,<`d~󷸯$6@)=(PyPL< j('{JB 8|U(8f'ʎ@A QP((;C(D;oƹI)Ui{() J P(G@*ps$p|H) R P(nx@#9Grqr*wrΨF91CpD(0_##(P1P@< /2_tQQMvGBD 9@< d eOٹ:9sx>sh)@AKP QP#;){5򙝫[5m+B:`_0r?9h /n$#a'Rvv^b7e$`$(7!!"R""wD~Nſ7LCSo4@4NQ~Д!! C0[}V)"_D"ّ\/U@ Wy!!|cׁ;y ep+8?ӊc_kut^t}Z rl7q C0^.gmfH`H VYC>CR㨹1/mwj?W2##tŬx/b/ =Z$ Ai|.](y.,`#:"C0D\ޠ̜!! C0[]ؔCxISt]ilVUNAAfB0C0D C V}%>=,G^ǽ, :q0C8G*Iኾ#ݞn=xT0nIv@z=;r|\vR1 \U]O-xk<(wJH C0DH:9x2/p08Lan%.Kq!o}/tGuxmݽvoxNq*DtFə[]8+"Ӆ>)@X\;QXg}aO?{dB2Ǝ_]$~[Ȓ:/T4*``&(8R*_7i#aKW}!a=K";Z%KaƪzwBTN^@kRS#fg%a10l?''EM,R~"ӍeuōjvIx^dl.,^8Na*[Bhh!j$ 傡eʥĥdN+Ŀ'RxZ,;;2PZ\|x{Ω@W)uGzk<-ғ u~~?Gz'yޫ'c3_iM9.}/ _iSfiGӛɥuV6s=:5덙Y^Qk\OzZuzu׫Y_gy=˜:ƬY^Ϩڋ~-s?P"NKڂ=斦vҮX2f>y(-vRUiӚl8 ~(' 10Uݸ'i,}[G8f#Jue/n>\ ];JťpHL_|L$wD^V$zqt}|GzLnRokzɩteNWl(R3u:0N9ѸnD_r ݬ.NꝡtȽY9a]+9?^4MʫJ]umЮ9bTmh%ф7Nq= 5/ xdV'S\{hʀŵ0:+4 kMeO0 ; =X*Nw57WHjp1r?^](_^ꏛLL}yzC=98N_\ڀ.w}E˪UsWhkzd_O9?Hp'pl,_Dza󃘏;>H=3 ,FȳAu~vOs@B*fv_~7O d i|?zHB8}:>}&Xi|yNm&cm6̍mftcl۬/lUol~ϵDɨ3{)/&CO:-gF#}zZ=dv5dI~& ܘf~Pi~??kS#~Y ?6?MCؔ2UkFnk[ZgڲL,ciPzaީi;ީx0oK``Fs}·ngElilgہ nݶ8 =d, $;vsهZjEze9k^?3 `f`.f|f _\U5 K"KJ@~}|'Ƣ..`0_}_/?mu/7޸(4LSISJ&4I%34M*iIћyqoR6 BO>g sɟ|{_|~v?ϢgG6tK1AR"(JPkSrIJ.LR QJI%=Ev9Ul>?AA"梠EPEN5Pt Fn ](`ޕE)O")5ErWZ[-{..RH\r>....vp"Tʌ˳ep=}@DTy:Ȣxmԩ=RjvT{lYth4J(U=q++]ߋo${bb Izǝc58TYqFX[%߬"V^Q~,רf_gyz:s=:լY{ѯeڋ~Lc^L#[{1_oz$W(rO~MJ]Zs= hWb*dt_Du{x}?ؑ{Br hݰOǷxewmx_'Vă?S)gŦUM: f'A&?tz43I5c k$=S|015UgDƇWkLUhxժkkRm=L.%P0C%gsn A #(B] 9b$GY#&G]LRP aa %a--O]ا `:^$G3'(N' C8ќ:QqrvTMqIqbgbr0ӊYb̴b̴2ӊ]MRAPAT-fYj1KT-iRLR%E s iʅs럚?=O?1}),1K2Ř%b2e.5Ph[\5P([@Ab%ʖ9m-$.uP] ` 5A5{DuPLrd1K̒l1fI\1vYDKDPP%f,Q([$STAv*(!\.Ԛ[U  I\1fDŌdcŔAnqAAmmYb([e.K2Kj!….lmn T(g(&Ę%fI$OL,ȥ ] U (ZDbZT-vY[*PO s9Y[dQT>Q&8Č3`QRQEBl1K$DۢmѶĥ @ >s5P&5P0 u *d1L L13kcE@mBl1K-ʖeEٖd (.SC0\}6V@T@c%yb̒<1ybx2 (-ʖ (-DݢnQ%ĥ TA @u͹UPUPP *d1L l1Il1bbZ(-.Z(-P[Db([-ʶ$ӸAv:(!cz|iNܤx_<5VJ1W7N(;t{Ꝟӵ#F "{ҎҋBn'{{c-F2PtO~>s3l0ls3KҔZcbX̒jfc1L*̜ $$4 d([۫8#$nPBݗR dݑxq!kYYbZj[m9&o)~Bx%ʟZ:Z[dQ(B_ yb$OY%&K]LRe(- m1L4ҖqEܖg(/SC0\6@@=r(% 9Ę%fI<1yb\F@!laYb[Y.0}KR)!.?s˟ ʟYJʟЗB$!G$OL,Υ iKNҖP aYb[aEؖc(.SC0|?߉=;̩Ih#(r"̤ ` `Kd0f=?rN׎WsHдP4-fYi1K-E[PEKa*)l!q找^~x~u{7&$S&d1LRnd1K2d< D'?_}::/m_q&[D3O0Zn-Z|20Kʺ\󀂔,1KsA8IŒ<V(T)6&$0K̒  $`̣MhMKվ3krWbn],1K.rˀ˙ARW:Zh%3c*H{ԃ!"~߮Ną::vSW_x¼y`OB<2,1Kf*0K).s/.|ERh|% CbT4!`/Xl1,u{QԙQ (ǔoWa.O_>)j̩˾qےPD7C#y;' B=R}=w<tU0 _'eO^Ozڏԩ=fY,ޓ.Om})OCRFy Yb\EBRFe6*Ӭi4J`MJ"/哲fG܋A|8_(iP!#az$#xIN8fNsgDD,.D,Z YbHXEBSR㔧< D^=*A7K- #&i@jY[Ҁ%fI$ HmNa CY zPг%%(ZK-E[LEK *tDvVjڥT%vyd*^9їT,@!I* !fI !v z]U (hZDbhZ4-vYTMK :|8udt_^ҵm^Ok_־DՐj)/%SJHO Pb%B̒L!B2o£n~g-0[)A!p1KY"pr\bTle9(]1TGJq|_K#g5n s|}a?: bJR 2&2!2`4DKxD P%:xE"oK o)A2P s(1ӫcjŮ=ܔ0;)Aqb%yC 2d0s9|VS QEFn1KuYmѶhۢk[JbлOIVFKHQ`{a_=/{ԋ]RPIjDb fY,I .s N j5K j 5YR/eDϢgѳEԳq▭/'?tΉnQ$.~>y4}9tWo>-wiE=xoձ0Sr%fI$cH]p9EOQ )Ubl\Db\.70(aLhe2V_@`tHw^>N3Yꙛ|8q$HI NIs,1Kr9nASit/@b^t/̺65haoS5^O0#_z;ף l{x!/̦U2)~R.g'aHEPT(R%fIj$Hj2emKhX:B]*6Jhй&JDtQ(un>Un#7rd?iZb0~W9\i'+FqD '(F 5s|Q,P{7׹,XUm~~,dgTC8!~ORGG>R"fY2Y2v|&}PJP,1KT,fEbʡkZrndKB]1qF]؁Zm';Rt}],l/ d8{[Y}Ʈ;ScXr (g[ d d럘,XzPbό:}9<wМQOyA75Ȩ*yfQnY^Yo\OzZkzu׫ת3ӯ^͚:Y欽Y^4fEzFu^^oSkVVnޫn];74^ڕvŪXqcwqDZhس#)<){Jjg]T4C?+lZ#-M:u?:Zc3ug.Gvw_od7#xI\T:\/aCF=BPB@XV,zoA w+dʁʔO+o;Si{miu{Iz'jPl#F^,ǾIW/0&ވPV'#=ĸyxyM[`sL7͇n>sut%GxmW R񻸁xhgb6(B+ewIՠ M٪tv}=Hvq񐰕.&l)^}5wkcKbYʽĶ74ЉxCONTJͼl}F{Zuej@_@2%,1%r.]8d gⰊ8bp,1˃M!:<*t{""oGSy (,1K-,Im=YXG>= JU@П'8׮ݭSJ[?^?|V x< +6H{ H~iQ({s/Ew~ED:tutwtoNh׾f ;" ~=B]ĥ!~Oga+z߉˔=OG7B=8?OVN"{*TNEʹc芓Mm|Jخ꫽<}mm/'TGtC~~5eqB] )TG •޵zamOh;+xZ3&Rp&+뎔K v]ёӃ%T|v!l^ej0ɣ3=~GٚJw_MO~]y᣽.s}3vzd |$>ۺVp1󎤾d˕ym1|cvê؇>hi&cm6̍mftcl۬/lUol fm':}fve/?xƜ~'Vj٢Mkړo~inO ?s4??kS͏Ysc~&k2 Vz_ZcKZ֜IT&,*S|vr{jZvOaqd7۸㎙DsDsDsMD>L|͉뺾I/ Vww&=hK=zۍazuu2 ] RFYOQr>l^u=f0 \ͲW30 03:8:j@D"<~( x$-LϴȀ5Oj"(h2ȅ\;O|Ox_ku<6+Ei~s= hWb5*ew8ѽCOҕEG.[HMuRhPJ$OߵZwwVʻ-~ɥwWl[*yj鉄z3{Y!Nfo7د h8HċD[/},zhs6Jd(!kk `O899xWD/`*9>Ii+͇Mu8ȧ"\,-̝YN2%f±KT\Ϗ.a-5j[Db[a{ӷ?!va'!20[5@5)|P(L@!OYb1K䉱\AQ%\Cb%D"nĥ B CWBPOR(t&Ř%fI$[L,ҥ q iKqa"%q-4.P^ `B)|`B3-,1K3`TR %8 q ([DbH[-vYi\JO) >teksˠjA="(&d1LRrd1K2d©\  ,ɷ l/[m9o)B>O0T>Jf>ʢ s@/<1fI<1%ybeT.P[#JjH[ieD"me @ ?P&P@O(%yĘ%yb&b2xB*]D@!m &9-fE"l1K b)!.?sK J%PKd1K/3^'&O]PR%0 iK,1K-fE"l1Kb)!>Ie } 'ʼnN4NTUSiRDܢi-s̴b%3%3̴bETkѵTkе%f,ѵZtm)&o}B>O0C%ܧa^+j̭jR䉩Ba OYb ,)f,ԥ uKlD Pж%"uxEۢmK3K%z!….B͹P *IGb b̒\1b첈B:(-!;P[PAb-fEݢnK4K%!….BPu*IG%Pc%bf+f,Х mKlDPж%f,Q([$STAv*(!\rV@ըyPK@!KYbd1KdbI\jPR%RCb%Dעkѵ T> >sOO0 m (d1K̒ 1S3`MR%. ] (ZDbZT-vY[*PO s9٘[dRLQR&8Ę%Ybed.O([OZ@Ab%DբjLR}j`p˹'''%YrĘ%fI$GL,ȥ ] ]K,1Kt-ee[ڐ7O?wIkQC0|>?~[TWn!7!hnݨ|rTMqI!qBb'/J!1Zfp,1K&\1K[n.'s)%F($F ,ѵ%]]b'.SC0]ցs럚?A=r'%%,1KĘ%YbeD.OZP%VCb%D٢lQ% ? @uOPO (&Ę%fI$OL,̥ e ] (ZDbZt-vY[кO tYjَͭd"OLcd.Ph["#jжjh[DXmѶhLR~`p:*UPP IJL1fY),'.'sB٢lBl1KeYlQ(ےLR~*`p: ( ('OL yb$OY'&O]ORER%VCbA2^mѶhLR~j`p:(('@  b$OL`AL1f.UPh[\UPh[DDDn/Ѷh[mi&qB?UP0C8ehsnA#稁B_#Sa#OY'&O]OR%` mK,1K-fE٢lK2Kj!>uIe -~j /ŋ^t^''-S GϡHa{=~,)~OS;M  0Cx%4|vddQNE9@Ord2%̒b/a/Q'/e]█U9H[@Ab%D"k2LRԅ} `KOsnT#F̑#]3%,1KĨ\T*'-'- k1KYY"ke&o)~B>O0C%5N#(~B]RD$G$KL,ʥ aKNҖP aYb[aEؖc'.SC0\?(zOK@!GYb1Kr䈱˂i\J,1Kd-fEbe > ?OO@YЗ=c%Yb 0 s)BQ-fY"l1Kd-,-OH]ا `l-2)zOK@!GYb1Kr䈱˂i\JJT#l1LD"l嘼 ? ?͹OO@O'%yĘ%fI$KL,ʥ a aK,1K-fE"l1}Kb)!>/>] uaރ }j 7ōntn''-S GϡHa{=~,)~OS;M  0CxeDxrddQN)K.QĢf]v v ,]B"sA٢lY%VCbtF2^mѶhLR~j`p:Psn T('@  b̒L1bK2d" ]ж8 jP,Q([K-e[)\jPO  VCZsTA=ИB$)G$WL,Х mKNږX eYrAb[-DӸTBxJ(!6Fԓ } (d1K̒<1fI,1vY4K JjPj([̒R-%m-.P] `ϭz @0|),1KĘ%ybed.5P([-5P([b5-fI ږmEۖf (.SC0]ց6@@A=yjPd>c%yb̒<1ybx2(-ʖ(-m1LDDۢmѶ¥ @ @u͹5P5PP }I<1IB<1fI<1vY-/E_/ݡQ'_]nExy¾s= v>Llb[y(w_VŸ)P?3 +k/Kĕa,U,O8`U_Y72zLݩP"zg۾}t5RA;IQ*tz43IZu@~ħ`vb~}=N{8I8 Ww[FմwigiǦ^ݶRmk#{H3zzfћu;.S:;9+ϡK2%i? _xȾô6G#{D3_k46(G||rbC;^}Z]r4>!8ȼgxH)ڳNNAt S2tut%G 6ʋP,1@;t<5X>wܧ:p'~vPWO:{|/u ٚWIаdg~i.4 4 YA5 i5|l|dJYnN!g NN3x.ZxKڗ-rr{>PwqsGLbTKwMJ-)-ݛTnT^t>i /{xۄ.1x{Wo~ĵJ;L;=f{[)5jf>(. ~}W7>n>n ȉֻK%{g Ts$(_}ǿBAzɷzɷK~M[ɛ@=Ox|A< D# PhOx@A< Ph(Bx@ P̵B iK6#wXaJx!(rxD<"qMYƲ4,[u[ږo[c#>хYt ]hCTEd| yho-6o7ukVzen׬4+uZU^RekW?WLJ0)qjՔ^y/Usv7s3 捏CvW 0㨪->O^MwW?e|ҫU=ǢEѿ},Фؑ}ѿP}(@ P(B>A WD" f.~}XJ?"~_H??αtsj??me}[1S^L)6=2ڵd!&vdjdnhdnhnD0=zU9nN]~r0%!&,apU1) ӝVj4!ظ]0#_B<^T7?U^ɌoyG2"ET!v2tNoDytޭ= )Uo|.u^Q9S+P~B}M{Ch0nN_:B/)2db%E/) ^R(K^R(@ P%(B/)Z!^R̠gaxZDG)|]3'o7o.WC!+KYCm<=Z O;!D/d|>2iw z΂ :\M q8çޤ `C?>q~ݧ4JoNmdcxF&I~ׁ;q@2%-WzEMKܬtAuh5ld.vSzY5&EnMp9lyI"uoɮ7|D}p ڹqGp(wnqTҬV0E\c+ժYgͨ^aրYf 58.fJғ^v{q+}7^xw z'{'U'|z(rv=\7*2TUl s9UK}ww^{W3ͦj󜛻saۇ?(w>y_Nwʧaq~(pl7FH“i^5y8|ǜ5WS^A?6˦](Vc ᥭ:-9Ap@4&S@e' >@ 6@9PA)9([<(p@!q,Eֲz xr8c%fYb1 d,/Ko1^2^b%sP%3P@ad1{WL@@@@@@@98P@ lp'V4m QM((((P| P-(G@{3P-]R-@@vNą:{/?o-^|x)2 k)NmxJ)3gӯ/R?#7I{;.J|Vb|[Lw #*ɳ P_*OPґѝ^|a+zm?RR_{y{v(SGs= ̗c#y.*;?\(l#"HWdHx 84_ثY7z,4T7!qq.Ū)T wN&tz43I"j@)>ʳMͯ|*x|{%N'"8nH}n3 v#ԫV걭wzї7yo~ͯe [9ML"@$P21(MB/@)?(MAj8@Rأ @6e@)1(%'[= {d>BeHacg`l,M2f_fn8;9+' ՁRa'HF(j!Y~ut#"]a.0\9mu^ݞd+3| Hs9A@$H!ۋ?-xND]]bu]7Vu]Iu7]7=uo-^oSw {$NG`?xp~pϜD|K*jg} zU[Mzz۵g[j2ߛvz/Rnz*2 t{K;t]{|O(Z7[zk,ŮorW4kjfXvpm",tk GDModn><|Ho$-TTl/'bw|Nt/F0n%Cs^}={n wwƴ* h6@a;66c;@-mxF6@lx(†w( >6nxΤUۤPo?zJv "cCzNk If!=瓧pTKA@D *7H$ȁKĶWؕil+Zo)o*XC}/R )"_Ԅi[ H{ʡڡK~%gNʀ@ߢ9UzS:ɨιVVԩ{Em3f3N2^=IO?B Dj_NS-{R?N׵Gl/k~ШV-S8_\.w}EVV[o{eEڎ7S~BPEdptٙՍQ0C@^οP <=߿ϯ>pt~".O>rv|">'Wb о znu:yx o;Oݏ;`KJ<,qVX F[XQV ;HFo4om8qۊոmڶzZ5ֆ5>Yms+)Cۛ:,l=4PyP(<(Ai} J)(ӴJAP@ΟRJ𧹥?fj,}]2/Yx}xNvăm.sG?uu׶owM19.+eeFU>z;^ VO_ctc=4~#+6[ I72b94~#+O72b1k9^Ѫ?FW4kO,G ֪stm}S?xӓU|7 wokb]RhxF6^v|?g|K,`jZkݜUͱnxL:lk-n]m;SM񐰕RE˛:zA\gċ~%:>zYʖ ȱ1fVCoيsl9~[1d^i1_MSJA17@)=(J ̢ag31 og@BUPP4}P%SώFgs$(W&h} qZP(kP*>v/ҏd0ȳү&JwC\@A $@GS hUÈ#0!C8fYQd19c8'~}OFzAOđ#.~>]d7>|s^O= 'zW{ueUu^w?<=Qhlj4տn!O-QD-wsu@+kb&a?PNn]z*qOu}uGd^ic`l09޿-di2MpOW#d9b LJ('JV= ..deV~>ў |9ޑcv.ՓC/O|xe3BUb^ WK+LٸC _}M^-vM1XfX*ޮ6sh`fnT܊o]Ք_7_7L%\w#.;p9׋/Y͞,\τ޸78[1F˨VOX5X+b~jiQd(z*F@()Jye%@()J 2(U_bV(,Jg1PlXM=>" x7W^,m l(쿶Yh]h[Z==hcPB}1Je$jE?XwlN0aZL֚9&ZezB}ǶhF4#qn͘G3ьi֌z^\H/ЋE13NS6ߢ$Q(ɹd?ВhIdWHt$:rYBG#ёG|CODS)hJ4%VI$zr1=Y'C*PagCvNR)eǵC؈ox{,%+4RSCͩS}d ݂W;G%q97N C_(;Adc9MZ*alP}8:8ޣK7TWIR>&پXK};nlQ5{-"u<}/0=!a:lYnjh:"(_gZp[]pׅк1Y|D\/eՎuk)YJF=k?-Pj-U?e7E]ØsneQ( wT$;$3Do/*K0-hPA1B?zJ}^2ٰZ$ s -k*cy7+2$t u9 7̐ \&r_鬴vfJ3~isOl6l4 J#TnI3n| rv)?fRƨjr}n\!Vߌk _tM;N$׉Vc^[3q}ٳ\{Z@ s/:Z{1{izSZ 2[^+d-UFe+LPO<.7S6~ UQ]Ѷ0-uB= ߳`L b|EF|wꜚ6zG+awd9\(+ qh5޻N7_VOo/ 5P܀1O FnzFnj mD& jia?_q+JD }SFtX4n>淮q˿Gj@4e`ZM7<+Soysf/Z-=/gřI J V8 lePpp&V?FZjn- rwJO?ʺU C @()Jye%@()J 2(EL/PfF(e6P@PͰ*Pz|Po\Q"x@VIJa-cT8ێEUKm}.ffB aVOPC l#EgWC=Q/!eaILD[-emD[L[U#z=8̣уxOOB?яs Q(cP4HT$*rnYDE"QiS_g:YF#ё+:<J-\XKђhIC\ЕJtܺDW+D[-іh*m<.uD].K D_/Dc1јKiLDc%w.D].P9%uy% \HaQ(L2hL4&s!I4&9Lt&:Μ#Ofk쳥;#џU?R-Bը:fQt<{MJ0Ҟ>d{bi=}JH{x ّ&+G>d{|Ǜl/g}|moG^-xyԶ O-I΅%ٶ{ I]~EzzRT3L!&ier!mٖN DA}Eyo/?\)jb2á{3+{penTP?t+FՔ_7_7b(L%#.%<ӯeu}|-B֛k{lϫ`BMv 6)lʁPؐRg:X٦zS'eIOY퉈kd7"zD!nvڹM\6w[wa*;ٷ>.T$?Ye/kQ%QpG+}ḁ?;հE4erd -_W[wc|x=K/DX&E7>QA4dȗX^ÿu?]Fmz}7-t^twZ][t^eݥK64G^7'{ax߽oئzbRgro~o)G0\Y݈{e$(ҳ5k CP3I8>Д پ)WSc̵cvpJcg}:`"M u %㬆VL4xTOz:@DFa`lBFFlt.PnbDDT옰mv޾$xŢh=t=‘nEE46C9ج7g/8_Vq3G3 nf(I&WfJwOPDdE*wB}t2.${؛S+nzTl_犥XX7 Sq9gFHרkd57q9q#VX b5zQ"DnYnɮe8Pz龌+FjL[ s 11qJnI%DT& :Ȳ&B)7ct2*D? q$oq| CG(6ᡆMD!݉#~|:}v[O—ӋN `0[`(@E;L-?gd}Y_+axǚl cKAu@|3 4cnOWiK]ؿ.J5T4ü.93Gl|q- `)H 95FbO7Wtlߧ[XO7mxb,{6ZDQT= c[Jy=e3{ u1Q+:~GYJ0Ҟ>d{bi=}JH{x ّ&+G>d{|Ǜl/g}|moG]^۴3 US"'$⮚f B۫v{)fח jט?Zw^ں%[!-,Щ5o+_J-CiVO]*KK|ȻjJ*UkF?mKϐZj~ػN?Z#E>=[E/l< [t_?qZE-tK9z&謺PenT|r2#{D-8zÖ>WoJxf{G < 6\'' c?lizCm34le?._)g5gZS>[3zb$&-'>!X+^ѵK=}36_, .t{ѿF$Hlރ ;z)iVF{qtA?ԏSzpzzտ VSgۉ(=PJR^(YPR@)cz2Pz+0PR @A%b@az2vUR}Z)ǣt,Vz1oY^zOݑYh]hAQVOjOe([ 4@(u>Ru^pPp͖o陁2^rdS|2=O}UvܣoQ@GP @0 oP t$a@PS` 3/;~ղtIz IyH{T =PDN*@@/{P  1Buu'}v==P |$@(h{P  @('veeea=?_ >(z@(pP  @(6Ct ; @<]KO|N`5r2-[6!!Q7?P# @(x =PAHt P*N{P' ?4쾑tHM) mAǓ/'.lq4_~ә/>@*t0@(P(FP p4t P`" k|P =@(@%IT)(~ JϮCLzćG֣ @( @([P \=@(l(xM;CΕtcpr?v^JnHo0IuoX֟9,)SGGJ̙?~nt“t.w&r T ((B:=T)fP  @!z@oklN`5<#G)ۑ^FGbI¢`|8|N(2B~P8~0mh|h|T6$>@(p@Pv*H|P  @(K߬]ߊ{5VS:ܣo`Q@H³*wP =@(R{P`aaBכ!7- > >| > @L|P & @(*8|8|8]ЇƇG(nH|P  dIN(BV)eSWj"ccG6*P@c~X{P" @({P!mm3h@(qJ4-:l ilBCv уJV{P`% @(}}}~Q~*ױ_Q7 @(ڞ@S# @(@¾{P !;!KV,@FP @(>B|PqP ==|mlzŽh500 4|P% @({B1 >PA{P`aekrZ6=ِ==  P $@aP @(0@uP Y @a=@(PPP[ʚpG6BJ?O/ݣq0 @({wwT)P =@(l(pKTr];:a$/Z'L`=IG^_>QDPhFP`* @(JxJP|(<}}v3׶-_G~˱ dSxܳ}yNN*@"|P  @aP "v|^%.CwnzY]+]k(*(gP @(x~T)l(֞JO=P) @(0@Q P @(U >@(l(0K}b u~|!11X@IP @(BL/P(03/aӹuM[kBzAC٣h |g<$@({P  @(aaa7*P`( @(@C P @(@PR222?A_p:~G6gyxiisiP $ @((05 $@( SțP؆sss|<jB]ٕrƷ')j׷^} 鉆gVGMhKP @(@[P @(o:~zhHߗ\aWwdm[RG U 3-rZB1-LK"/V^zcZ2-LK=ANK3%O5%-R42ռ76qpp :-΋pGś=ِ֓lP_̶Ž'@d"5?'|=Y )NZq=ӳln ܖltqFj֑HnPm+%gLNpgyٵZȮt3h/@T{e\mvWƇXEh,?)El[V HWhʖ,G#OIJvOl۽S/K>ķ*yVֆkzU5 mK-j*3vM '^Y;ڰBv\[A ml0x|C eڨmfD5:V5C(3h-3 -֫J0+}^^TsWBvWx*Gg>}ٮw߫1:{edGg>MM;ֺ*ͦQǔuQT3L1An/JmNE.tR-|XЖHzN S;7e[:~iZZ>to=H߲^y O?}<*2|zV>L6M-5L /h*9.yc<53`BML{w]ػO _W7H _NlhUy(2 E߽]s( 7K¶BjU[MucOu#Yk>|kY?esإ_ų=YV~يx6tfȰ}?Js]jM8tTVPJ:PҾcie1JR\(QP @ <@(e6Pr-dAl;)utg ]qXӥ5@M/`?zTMU8Msm\L?۷ 0cL65@D)b_qj1ogyq҆`^#@{(_±pr~X}lF?ZG:Rv=&f RRȆղT{<ղe|xzP 52 y6\5tr0;;.yc<30mg]دl$a$}JYHfG2;ٍ圫f2٬|:pZ&M|r5굹l54yzwޭuTV.{F )5 % R@JRZ)}2PX#JauQJG2(94 @([cVRқPs?((#@]R7uezL=꾰e~@r 1s<6lhՂ7Gmy"wyqC1|Xp;J; v/ؿpDrB gs-V;eV EBCrXGMuH_ oSkl}ǃ,[ܾ$FH}~P9(%@J PUՋW VXҳgIF$ZYJPր‚= yrBmsx&pQ7AʍgeqlCpm4ܻZx k_mndIV*VX>3-xZb3-LK% 1b,VVqb [(nj,"{by!Q$ `*(B`7t>p>|@|@$ĪU:P}a2h5q?~SǪ P :Ķ8 0q@ "*P @(D?|IC4  @aMŚ Q @(D>|I烑?@EEUt PA@ظ P **D@aC t + B >|[AA@ @ w@(=<x XV@b-UPa^Zl̓g5o;fSX~m?h_~<[j$\'q[<Z΅PQW*:%{MJ0Ҟ>d{bi=}JH{x ّ&+G>d{|Ǜl/g}|moG]^۴3 UMuQb7*j)ǼNj3KjHa6Eǵ 6>ZE_pJ)}6iygKhd3L)S#_[2leۭYpZ rv Vmte=w6 zs2c1o 5#a&E! >[ tE;)q7xZ4,8BFz&xtoC945 7Kbm߫-A_3_7_7 K8qG\/Z _)/9`B6Tnيx6t^'^q#ZG^PBD UV:P(R(JqeV`(ՁF(J<@((e ;z|;@Vt,V Eқ |ͮ̈́Pz5D~ 6mBa2)wOatxYa?XA@Z~:t)N!0Wl.M1P-$x @I1PeOV)s!P(y(l!@A|PY9P? SQ0ߴE1/!SRGaync'˺Pʾ6H>P @(Q @(T)p͆ۛ_ģ4'鉆4m扨_ _Nw{ub7u⏮ɦxK)_vn>|&gNTDĖ`MĚiɴdZ2-R`Z촄dZ2-LKlK%Ӓiɴ\ϴ%l.l.L߰OHqd{9ctMgdG>^o{?ڦYl3$xե]QT3L%6 ?}$?^2-}VS:ղ`i,NwVJw:S1@l)e CX̢h1Wdm7#{fyY_Ml*T{bm5Zy.,mn( }mOo' rV(Lщ4S82xvxvjGH!Kv-ާ:Q0^2{7v/nSu>-m]ē/c_Az]v2VhK]?Z8%ۖcmaKA-Qn#)ϱ b|Ţiq7㷘dC'`7#zhzmJ}ؓ792Apᄏ0_`ܲ~'g5{Ь^le:[ӳ/ ޭJ ˦=9U"(cf*@()JyuQJRB2(EPl @((J-=>k %n*vS,$_^z/_ms66JZ==gcA[-F crWDt":qEl_lcu>*[ERYcȢCS`U{7|e'4 @(뎠D+'K=;I?0W8: z8L_d\{+Yw^|*baB>bʱD[է䖭QMK[NWbVN2ɎZr.`HؐڛrjT _ uLƚ5k¢TmOl58CAEP,b*qwz Qn7-G^<%<=<̩.?J;RrJ*h MV_П`O0\}@K0 ?DrbhCz6, ѻ5#iȁTh WCfT@ܫ'&1xX9r`].?Ciqo R@XMf@c,%Lb(L6Dw ,eB5n,nu1a gJU6n׋mP~zOZL4m7'uhl&?4 C`-=,npPȓFlN'GR#y:%DZ΅PQE}xHT5*H{x핋&+*#MW,dGǛl/xsEo1:_&3Eu ;]_T])&NK}f ?Rc޿=b4X5ϝ:]G)ma[Iڲ- q,!-Â]d,w 9RēҔ c[ fㇲ|a^騺'zOL|ُ1kv>6lzzf&%oMj! 3Hf,p(@oU-C10F`{JPfnTp+y6f'ܠ#dEm -lx˾hoAzjz=#a쬑ɧ j'W^Vsmsjn@2CZ]Y5k@b׀,H)GJiUMVPR @aP(ՁF(JPl(laQ?n7Vmuȏáɋ֛^^~ٕGk/f IG}׭\XMث܀xb/=2␶Ifn_e[zֻ m;Zmؖ#/[gT>w7cQl=Չ8<`%>$Қi}",U ٙ T KhX;\-κ]TX` N(VLV/ge ƺMPXճX(KֳgUj9fU=@bPX3/Yt}PŶŽH@6|~Z“ i=_D(#gkd8P@UTq `^ 8T:~WkbHY M KJ!Nm 7x^T'E\QAmy C`9ZMqCaB}.;M9 n3!=wߴiI$XHiBkH_-B*VmR*7^XiOoR2Ҟ>d{Bv=} 7^>7:_&Eo=#;:_zۛQW6̂w}fSu]'.j)d1u=7pTWӲX#܎ORE_n^J)}6iygKhd3L)#_[2leۭYpZgf_m/+!ni슎gG6˙=4iwfv'Pi59϶[}wbZ䗏wRt^V=zz7b;j-=p5)mٖN\kO SM+4'c8kjӶg<Ѩg]IlKqz}u T:ۦc>D]xnC6o|%o'VBծoh"<f~X`wD. 75BR@)5x' -r#8 #!ϥUzz=QI7KJvVS~ؓH|Y qaҲ~0_ų=~,t|)_*XlҵF)xmik+jRIgms<\HR) 7&yQ^uc2fS*IiUeՍW}YPJR^(o?'XZ?S\?e @()JaeE(%@ɯ bs|̭ j6k٥ )# [JMƂ Z^zSmPBAkSxbzj!iA1NR(h4 :tGgT+4\'Nc0 a~ !WByg騏 1 +db@ \}6+l\pnFŽp > Āx@\ȣbs0EU%0fRӻ5!x%'"?3b=)`Wݓq2 I_&I_&I_& I_&I_&I_&I_&&Z_Σn`[xJ.4=khyoƕ)xBx^5p%bI^z8mv>h}Q׭mwrtG y˫i+e2Y2)DjqMj EƶU~{NĽ5[Hy_JԠ_EmJLz7sO٘Ύlg[3aQ R򏮥Z;OVީcAj| VSm{)ӯ(((((4P2)\HGWJ-ޑ/e2Zo0<ղ Sa>JS6mBʶ4۲ۑ^ؘ]:<0#}kW%\[ǶiysvF#GS-6:%|ڽ<{=vKS_R R[=$+`Kee{ȟA~?Ǟ7uGWOz{9o^ˈыkI?gE /vvxۣtF>4|Bif&z /qz OIz .QkxFN65~뉰B,6Mj.Rڦ7m*䪇DEt ^ěpzR}tydzy7Ryc+5#8Ӱ03kE(lHo!iwR\|\Bi^ ㇫zypQ2ضٺ>Z^<]?Y#"VKWM;o&>fb3qfnӌfTZOnM8vvzWv{N} 5~z=cԗk)4^K 4j%I,hG>+I g_Յhl'4ܒo{ƥiځus"|72(/a0뇮I&kǯ Lk^͊4kEГGǷFv\Nc{MՔ'8;' SG7ןR"ת,>񨟥~Jf5I[`4Zz }H?ٹD/FToW JÚj6~le eA_Zl5a_}BabL On{.H& \L/[8wmW&j]'er VTaf/ 7F=Ѧf}y׎F=מ{~z.zMƼl\lF>֢[ւތ2kwf?_MO.R|GuErv-~Qblb1_/J~[J\-Cl:-CCB;kf?s #_v8-Ǒ:d9U'<(R(JieEPR@z @(gPlX2|PB9=@5H:K e_+d[$b$#k!ꐰtUu)ܶ+[RO{菣'4'3_% |)E:"=Ҧ. ӕRN}ڄ} ;wHML],B{%.BXw`1sot iKQ q ] s3gag0A$*D%Pz ӂ<"oZ;o5AáVCsyoX֟9,K'~O-he&  37 s!r9ƅVU_JH_R,dGw՗B~t]%xW}sW/FvtmefN~#]Vo z-RwGT.;"VwGt kF{E+] >,O{qMUO%ULλhղV#\}\OӴfWG/բ2~TS|?ώHv֩Kׯ <x&o3c(|'pyȕ*:Ȧ7PX{H7X{ȟ7X{H7Yc{>jiN\JgZ2-ZjK2M 'Ts~< PLKlplp5N}/=b8ngɀ9%d`ZRaE L=| kbga%@qֺC`蘵fr qѻy܀J*[p#ƙ  8P @a:9 Ȧ_!|XFy4 (Q,f 'T'4@aP @aHQkW,X> u?@('O3'T'4@&(yOWZnC{&b''am 7xPt/LO O{ ٱ0H%y2PӀ | h~bl!ƒɱfZPMpYhYn Gm_Lex#Wywo<ɼEQLcz>ې#mi eA >uyEetڮղݥ_rFxS˜* h­tYUaSuEǰ /9-UkV$UM6tO_WFܩG\m.iunr}-nE.foY"cLC`S k *D5d{9ctMgdG>^o{?J 3kk ^h:i jl(B>'ae6\Gg0;(Jl~0uFqWE(VyXɷgaJͷM/Tqn-.-VonG߷~B eC`lk~'ue: A;ye-awɆW*MP{j)dr=7ǼNzח1ܗQl-I'9") zR_".M|n9: zYtпhHxiS-ONA3;GϮC=6_2[yFtC1вpJ13Fz5 aJOP[T-jwJ:ꄚXQc.0]`T+ 5JWG ReX{T/"xxoC94Ȳ 7K` ¯i{WRƞF8 +|ąve,g5{nW*grg|g'<7p0^ZbqSA(C+RP@) #1]% PJR(l!9kr @ɭQrqPz|;@ gmg,U 1ffWf$^^Ghlgc_l2jxji;  - 9̥RGl,#ёבjƏ/Z&`h J=wbUbUbUmUʪ,yA!_!n/;vl0HTOnk hSYWƥ_?̴'#G9ȑGnCyN|gTگxwbuv#[ mꚮÝ6$&!Q"DHA:ycC'B 3,',Mz3 o.(ӥ'n~ |%{uN븾%?#RF|z&J29 1M(#LPF6GyKxs~& jqm-_]DL~9}R#ɊΊoȟX|&p?̓>-G.0sp9z&c"1yǙ˺sCiHɳ<+ږcmkzs9vAX/kUX IDz9"kX\_o["n\>S[Fw=Ʀx#Z͈G5{S߭:P{-˖o75g-PoԷnPfXl?7"g',, Ix$ +jBҿ8~PJ8[*'5J/'%-ΖnÝ(\Wkc6bSD HTY5/G @I1P+ @I1PJobW~r@Mel} @()JnuoXv{JLtC_N=chVWffdVOJ"i;;+MD[ԛa3|Ss;dE4GPȪjE <֞ޜ7^Yoc핋&+*#u7^iOoB~tMύΗ|n%g}|moG^-xyԶ lˑO-\\'2bP5_U_CEǦμ74$5W+")|D)JFkYtބ4ߎVlg=u뙸\5oEoTqogvpjw138wR0ȣ+;+-uqq@63GS3ڦ' F w D=BC3p=et\n^lȜ]̊7^;s;ܜ j1Uo$~ГSzO˗ɴ_׀Qj(T-d^? A҅۰(@^(MBwa1oW8 U)3CSx& ?L6y>o܁S9o~_~ճܰnߔL<^bL1Q0Q0Q}(IH H^12#s#5F*|ԁ11?l*HA9NCd!s!%C&}K)S(VP%Xפ/: 8~b.UA~\QKRtqu_:kuPB2`W0VVe H9``[i*uMGpk2}SOo5@2pg.uuWc=ejY #_ݭȗ2\^-_=#K4ftսދPzo< 3~U.Iܶ0|%>vKQ&4+m9GRݠ{'j׷VG!3C1=GfU)C0H6vn1ƶ[}uryQutC>/, =f=g8_a3$NA\x5IN)?Q(?A#*?adAӅӋ]$^]ʖvY6#_]OdŦfPp=E3ζdZ~ @ HI1Rk@J#N) e yրV %HɣS@ H)9t H) X)1/bzHy?M&5(ێET -ieمTwI ]x'v5iW_}C1bt1({6Vj%1ol'GlأTX?4& kloEW p>W*mGc{w~3&3Ǟ[`O67o'MwͿ R6ecZO'o;.g+e*I{}KhqMju-zD^=rŦbfT+vp+Xogqw OVJ\Gu'z=pl4]jñ*hT*hO Џfn.9{%#_^e̦_MOzotSP Q,Pȝ9^bl)Я|Q5trOL #L)7mw/t鹙=SYۓRZ4aC{SnPnva7TUrQ2˟T-"(GY4fQA>-y{JR-b)Zv I1K((JvӀ(Bv3R(ԱyB9B!SwgfbH!>Xb19wQmCqO$r ZeCn<,x!Qo[KҒ/>U[UR*a}\1t:gL9,9t:gK:Kls.$n7?×=3sCARrJ9xwz kOޝߌES̅AҼq˴Mwm;T ?_>z_ojť>͡3)2q䧤&9IMHjcJMX)2_Z]s{8j4{^\ iXJ_M;|8,4[ `|(})>]aw#tqcє$-ĕt(m[$Ў{5*q&J;iǽ@NW(jѵ^MvЫ6T1k[5 5nR3}iHe6FH.lX2+;u^i+,5Ǣ^Uq$W]x~ 'cQ0܎+Z]/Ec[*#}v¿uږz;:]ώTyO\Wj,i]~#3a6~8-Qe5v\G}9uw /ǩG:mKMћS7GV`6דDKVi~"먆7MM!syjAf`{']&;}x;oϟ6k O^3$:;n ;ȓϖN?-SCe7 a])Ri}Uyj!0t|,M{yQ` 4S+_n&if [P>oq/ uWZJjm( Q8ܑCiٯfwba)P؉%:,E#[q˕m{)p)L_CznfYdJ2!5ҲYGz _ 96ބkoB7ڛP.ccM(&X{J[M*ͦ(_"C)6!?}$?~fFsW xpWm r;?G~ntKmliJZz@\E:ά_r_>e9+ΛÂ_|0 1m~ Ʀ7 Qv}de5{za6)|mJÛͦ;MF!'od!3*@Ydj0!=֔nK7^>}=$`fc93+ y᱙̴Bqv 5[EI$2m˱ݶN(V֋~HT?.(J|QF'tEk*PK{J#98âgb]F.Tw9.l5Kb$&-'=P-%]ZOp(0>:#ߦ\P҇XY54/ @I1Pʫ% PJRZ(eL/~WJ PJRXY(G@{ @I1Prk @(*`)Vj7%66s+zD2%nS>T;^}ɞce>ot™VI.!+KeF)P6@7 âtNâ Ass 8 6:H5܃(M>p#]?ΒH-K"ʒUdPVٻӫo8/`{w~3,I!Zp M1z4!R)w: F_xJW(j^]Z-'OUum:_G׋~`UJrX9.&U4u J>.zއg i6~v!$zgu.FۖP@((ė5 R[\^ObR9{@K6 ikm3oX:^*TU {/KKAWs-6ylĀ6hb@ 9@ aĀ6o 'M&FݜcŠQ A CGq] A CGqbP|(b@ B>|f|lKvoloKcoYoP[QW pvrSr!u 1)zu3Ƈ Tx潽.OP\͖T(BU(+z"d{/Ŏ<\Vb^*UؔMaڶXدqezWvl[i{Ô}+ Gң~oz6 qP ҍ'+EV(a*COVk* sCٶ{N[{Vv{?i>|W,(6>óqBHE(~V /G3PH8+mZ6\O]q#T˵[ OXq0^C8n ņ .]خk,xiVϖ+ʕyl%yΪ$([%u/.2LFjA4;w7WnD[i;Aj`Rifخi9^GMtRvjؗ O)LqJF$ږUݲ'PxK)_nwrL!kwfd..7O-tuMK'3Ʊ}E%~B}GNо_aeR g6AS.E#"hg+Flrz;o- F%+Ju?BF8!tk [Jn}nA=yVyule[UZ[elBU~&[o[`(ǗF&[`k爈y{,.2X-\mjG ݑZ(QPczzƀ:;h?WeaNE˭5tZF-oR-:%jZޯ屺+hb4&5q~S vB[˂mguYHb;f.n#̊]F6+vqypV6RgY97ަ_ʹ]iʩq~f,cě^vUF(-^tL":΃N:I?1=FiNE]_:۞s"!~ I/;'ԗ]8b/7\x#)Id[tL>S[nپeR7~"`Z"M7<j){7xӉÄ>] kx:я,n+f>^DZv- ^@5痮Xq]3*{T /vk͊\2u.z:-Z/?TKH|v9+%_]fOShU<ԤQ%*B􆀂pJeF\}̬s<{mD+3ۻӻ20KA hI1ZNķs`ss/ۀ I1l\^(|^f 0fvL]'կ߰?rY-;&@m8:~Sǟpvk4c?y Nx2^5dN޷+pvWګR.o9/dsxR Ũgl];FNkիoc4`aBB!O./}Ծo>/,ͩ?as3ƣh#MƵӲ D@.^'+kzN3 O)qUծJ7c(aalS^;OJ.w˖F1w9]Fb1S|Og_}7S]mc z?E_ފ'jpc&‹M·|'WC&S|8 <\10&(_nVjM9%wcyRk_6!V9Tw2;#L/:ېMB:VKj?޽-k5r*-2m7-`9h[[2 f_\WjZc ' g^ {r3|{<̓az̢j\[(D`CΣDx-y*3б~xWO@+;`gz'zJd/ OljgZ:X!0@hg(z[qEN2gʇcSdL VP,Kl*M՗wwEK嶚-Rc񑊢8!Z?#Cf=ͮ;ttYO7$tpdú :_ߥ.kq]e&G]GW G}"DJI_l^-);TnmQAhUmzj:/"RE./_%*`X j@NmZ'9Fz[v  'Lͤ 9Ϗ2:9渵|Gz lK2r 3bȝ`!cgH>F1Б|A(^;kGx8֖h^}KnqP)~ a~N`5"}Ѵm>>M ӗu"NN1[EBH:u?)iC=Y5<'q"OcSoWw7.U-yf^)7#ž1x4 egCXZvl7{a_nK/~ :yB{.f)`OO F& nVTG3U?nE˴{eDKn_X'!]/RUFqU/!p }8qgbO}5pv{I]zgs^Pѐ%]v@;E {@VE_n?u}mw7]*;a!zWlKJjXd({ F۽WAk=X !$#)[{|y"׌)H<* r:Gi7MEcr G-1zP;39"Y[.3g!qd%@n Kuu"ؼ,>Ro'/wF@L,=*S ̦ 7>je2! "BF6Ȇ CBiez#ٷڙ]6q@\qWE#z}Q{3<k?z'rޙEs 'J9GTըڤy[>afO$PDk1^_Jr}.m'Wdtߌ9wUd'<,Na"PDRq WKHBID5\E]{,f%^F ^ˁBSds:epS ϺM-L>˔_*V]Rgl=ߓH71POQOiӬsYJ^\Etc-8wqv<Ks"04{۠( V>VQo')ځo ߸v-|CrRׅ dcnbq*e9% ásAhgA8.H+Z;__+7h%׫w3Wţ$Kh9ЬN":,_V[zz2ߛ(-^idIt\xT3% ]p;3nXnv 3xfGvf/ۦޢ:+1D+qb>Oݧˈ"P5Vôu`:mnٳ5:c"Rm=RnE˴{%:|UT!P"'=KsH~~=jNZyĄք)M]uL~5ؖE{4&sCY!/'ʺ#>5zZD+ qWvkZBZ] s󷡹kRpQQ8ݧp:8q+Lܭ%IAp}R溚f^Uax҆eDDefR) 2c};ޥ:r.$LT/-!:/rm9UI|[#Ra#x')K#;HP>IGHGN:RȏNV}sU#9cttȎNV}ƕM;df4?9ִGN;˄U#AԮoxoV"ڦg[' U?uٚ?mcϫ[Mhź0 mab&Sjpv=&ܨ.oܕu?vݿ?r'' Kķ0_t6kY?es8%g5{)g0ސ4Ӄѫ㧍Az}^OZe#!=)eF\}̰Āy{ Yvmx{y~6!049;~[΅ թah]̤3N_MaYԳL[|w GO>xn.S2~b g8l'uzGc 2߮"ۑV<yOS!Wo+e^H ?I lP͵0;%#Ezk)*S` ݱe2 t"{ (@ ̷%4TFHO#Ma/Er {gC\KKcr)ԉ,zItFCv5d/w4B~+xSSH*0"uB[#Vˊ\_k5|w|5N3Z.{`QӰ///ocft[$ F'}xD8'6`կw;8E Bkay_n?5쀝qEJvOgx-߷\GWUF{LPj"D1 55555Nb*Pk&ξ]^~zw},d& %zf ;V'psttfߦd[ӳ["Nojg]KohijhK7Яy"̈#DL\OL4-- X4%X^X^X^X^X^t:X^ x~ɿ}]cЌ-hGHξK\~\C cV1߮ni:q7vfN-va鷧D%FL re@\B\zYdd Bɖq_t-[f6-q|Q \P3Dڶ?J:*gG5/j6%@|NohڶQuSCZX#~AC ]hʎt N}7ЁVC!Et 3ȦP@3@Y{Vp@A`6ElKA:q/'! BbݱqnJ=n|~ԁswJ̢zA)З9\37kp!TΦ1$~xR/­=FG\T^sB'^u`` q&д^ Q0onJ=>I`b/!T/Z5jt܈ҺKr4ռ[BT捽W$\C܎Ǽ퉹#x9]OڲZcO9=i' "OlFP'4{ +zF;B^|axL%N -]}b)b\W+*QoMC'Bv8GDr Twywe <`[0i,\8'BI_it)ݰJJO_}7S]LEXG/3+i/wC vUaxl(ԫC15^W]x!G״E XbX;=*Nj#7q]N>qjٳ$Oko֜͜,-{2*|K)_5dw)\wQ[ȶƻqݭkBp?*yPFPfdwelL s޿v Sh.l~^+3[6t\/Y?ӄ>1 wkffFe(13&h<|:pj9jT"ؖ#/^7 b #;HX>IGJHGN:R,dG:wґB~tt$x'U#Fvtud6\mڙ*͐M*yF )OiekOV2*y6A3|3hzVf'Ҏf;f>jCJn0'~M3RVV*pdМV^HJe]9?vFhs-G{k D,Z EIkY?es8P-g5{adgp7Y`TN*bXG4U~Hݯ[q8/k7e ̋_O/V׸`̤3ww+e`Вb~oBMŝ\^(|f;If09wW~ò˩gX ͑_ކ'P!?PvVw_ݞտ]h-P™Ej7qS&N/.P{NɁ] <ʚЯ:3Rs]w}hy!'b>kޫ6/Ի 9{#tq[brܯ0(  !UUWI9ۂGöm }uo\뷴$C3u8$Խbi , I1KAcLeXP§ٴtQ+Fj“t׶K Jٸ}da;(2;9?~q7/Ѫ~wZh!R]+eW+++++UR]*++}뷱']/` -wBxaE^Dyor8r"y<,,#EfgYƳ P8[Y.ojn)г_:Vô헓0]?g/LO t; mYQȟ{>I[>NyF3!;:m^u-j SONSd^|axgfVĒk)QwէwhMN˅XuPʶŽڦ$?}6Lט2e&rzL MPw;%|qV &L_?ʉ[$#3stl)uϵXsID~t^vrӫdFpXG*HGN:R.F:wґR2} ّtx'F'>IGrd;鈑xkY+kvfѻM1&$rtu4Ҽ#Z*W"޶?U^>OUkG¦+Vcy~G6OɶtS*NKo5UOl&}Se! c2ۦc>c>6ёՔ3CoqoCNܔ z}CUMQ]2 cg8t'ϵnɿ'G EkY?es/YaqpásĿ^OJ=i]v#_f1 f^zzF0f]́5\(L8K@26Cͷk64`fׅ0x拍7djXZ |w_k mGZ~p"rND=O!x^oKIa۽JQP25Az)ILJf^OL?9VJ@TysLV-p@QiE&<5f|j?}?>/1n$\KyYz2rj7zb>A[b9ss)D{ MR?%"ؖ#/^1nX#Ra#xz?/AtQ(-I!OLd /^r`bp*ܨFT)%5s'gZA&ed Pa02٢axTn4FzPKJPword/styles.xml[Ks6WpؙdeGd(=(7$$ ί/>D -阾X,v?|B Rc[db`8@H07ٟ>~X3~BfaFbQ7'4\颳&tS@DQ:Q'i7QK?x/ Q 8WiD(9:d>GTޢж| P Vtd˱H*L7Ӓz̙>,@h`_HL$bK3sۣ@oN}VrY@\os.aI83JɊ0a^^زl+ d`IjW J:R\R C\lHfn.\&[e,XWl:(LG)Bȿ9 JC⥓nNyR22uyx$z.Oy pH!B*)7i8 .e2}^MLX,\!ι,dJWYJ~o l`dЌ}'J|*!*,.g[N[1#'d2)MNbm84pN"MLbiP| !堼G:S2PB@˻L(FC:NOHn%sLKdT!9+p *oBXCNbBQ>G" 3Y"6>(Eht4VK47P (XP/DMn2+U< t:X@"l*N\tE0Sp>~&xd) ijB6XbjN-K:4mjdThfnÐl:geep΅*6V6zm94LL/ &FͮAjFfmM'i"줝wBP_:IXA]T?jtopYG> jVߚ孫VFlZFq$r*Tmw?ek[ٖ{eW5vvu{t7Sr"Zq+h} 4O^r?Eîz+gl DeƗS/;]j)ݹʜzTHٍ$oY^K9w#r2YՁNђosPS2wKAoECOT ?Gqܗ~{t+nâ zM]6C=L}xԯDvk{_[y&k#n  WC^`a#퇕hLТE%Ag{Q{MܛfW ^ |ϭU]xy_7 gbySa ٮl_xh{&l{o xyE@kDߓ/L&#Ld2jɤ7RI}}o3HhV'ywΩ^UZ7%7ܹ6ũO 2_@sy olǦ}tIέsf'ƄC ۵ ^ݫ).hA>?PKJ)word/fontTable.xml͑n0 {(v *Døm Fʟ*(v6Mؤ'<*gcqJf.Wf}?+isb>pbTǴ2b Ğ+m1UHw FHe#+Ml$/PWgdg QrNY{OϗoP*+.J44`5m2XϟBEVyNMWBRIW$x§!&B4q)|MÒ]k[1IH9j"ݨÕQ?8yPKJ%<-Wword/theme/theme1.xml\mo6_!h $[KZFaiPFm_#ni$k G<><<'D>mQ&&W#ے a JLiL-{3Ǒ!d2I)m"b )vFϠ5fNuNL"nC'm$<ĔL(G-NbN!uF*4=oa7מb3a}"lbe;o^;%6na^9.l{-tߥ^ ]30vbsl ms7p&gY0noGxϦ*mx7grfJ6a:E ^s\QL>&b3@On۔nIi2jέ~3|ҁDf){>t%Ϥ8Ϣ9M'4|8̚{'5=gm: F-XU&,, $Lļn'-"_I xU洛&}RWO+\)+d-՘Nkm?|\c^|`k^ZpokN͚f,\o˚dHhg iy)Ɇvdzrk_Չ12^M7Sg^`[!I'|q $a;x U6/ţY)7HTDZxU{4p{O-niNTI(˔t>=zMj]c<~\jG ?Y_%0V#-5_2Qk68AF5cOuAMS{315YB*OF.KN#?T~c%g"9ME?/-ƳN6Kf4\DH$hj{ >,q$d[Duk֥YDPbrCkK(u!CצxO=-<,;^f ai"f¥ɺCtUuudLO85"6`K0:(")r9ő~9_q$@ G8T G#]T"G#]V!G#]U#G#]\%Z&7p8k!e1@2X?0Fqe\`荋B^<2H~@zл=R/#xA z^#G9G G9#_ЗK^oؾHQa(Ƶ } }0#@`9#@`9*uЛ_PKJo`rword/header1.xml]K0%w[)2ucnLi'{od EorN>&o,Epb`V1M1 :*a@uD%Dhbtam֫2|(wDahi$SmsIB45-$S.cy]scQK+\[!2k辙c? Wz ǨթP-Q*/j]Ž י/91le.LGtWa*#]jk;7OOzM@k4/7ûщݞe&2>0]@aE;w,\ _f} PKJk`rword/footer1.xml]K0%w[)2ucnLi'{od EorN>&o,Epb`V1M1 :*a@uD%Dhbtam֫2JVb;g04gة6LT$w! ur)1~ ⼮͹f .R-JѐJ M~tL1+ W=fcTZDr MQs W}^pL p6в^@I:VI0A_ . =&@5SQoU] DDnŲO]xTd{Vy;^^/PKJghword/settings.xmlTK0W WǢ=^Lb±#ہEN-R=}3߼Ǚ\>s`p%3]d .IX* *d91Cnocì'ӁҌ<#;kq|JjT$7JԂAI*+j nOAiTFj-ǘ[\+6 ͆ Gq(;EUΌJ]sI;Td\Z4tɵVzIK!#lw>+=qpq+#%֠ ̙@iۇTZ^YU:̴T현R#ge&'RΓdNydODF,}B/鏧V [qx0 0AA[sZ[yqK?"o!1.F JFy?GXĝYZ3

HjiE#Fh$>aȿrUhK )r/IWeaգx95;( -JߏqjiRZ κ ηpKpOZ?罁9ҋMN>r*^2{PKJ.Xw[Content_Types].xmln0 { C!V0 qzXCEj:o?^rdEҋ }E7CيݔkVT+" +v*vnC,by;0"΃LH^/mkg,0i񪱸)(n8^y N:H7<)I~sA|yR#bäN2F(XGD8*/АNAgta]Wps}QgSGEE 2GK>/PK>JcM _rels/.relsPK>JI+docProps/core.xmlPK>J; |'docProps/app.xmlPK>J'<word/document.xmlPK>JPword/styles.xmlPK>J)word/fontTable.xmlPK>J%<-Wword/theme/theme1.xmlPK>Jo`r word/header1.xmlPK>Jk`r"word/footer1.xmlPK>Jgh:$word/settings.xmlPK>J}&word/_rels/document.xml.relsPK>J.Xw*([Content_Types].xmlPK "*nextepc-0.3.10/lib/nas/support/README000066400000000000000000000007351333553357400172040ustar00rootroot00000000000000 * Install python-pip user@host ~/Documents/git/nextepc/lib/gtp/support$ \ sudo apt-get install python-pip * Install python-docx user@host ~/Documents/git/nextepc/lib/gtp/support$ \ sudo pip install python-docx * Change the format of standard specification from 24301-d80.doc to 24301-d80.docx using Microsoft Office 2007+ * Generate Message support files user@host ~/Documents/git/nextepc/lib/s1ap/support$ \ python nas_message.py -f 24301-d80.docx -o .. nextepc-0.3.10/lib/nas/support/cache/000077500000000000000000000000001333553357400173625ustar00rootroot00000000000000nextepc-0.3.10/lib/nas/support/cache/nas_msg_100.py000066400000000000000000000014611333553357400217450ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "Paging identity", "type" : "Paging identity", "reference" : "9.9.3.25A", "presence" : "M", "format" : "V", "length" : "1"}) ies.append({ "iei" : "60", "value" : "CLI", "type" : "CLI", "reference" : "9.9.3.38", "presence" : "O", "format" : "TLV", "length" : "3-14"}) ies.append({ "iei" : "61", "value" : "SS Code", "type" : "SS Code", "reference" : "9.9.3.39", "presence" : "O", "format" : "TV", "length" : "2"}) ies.append({ "iei" : "62", "value" : "LCS indicator", "type" : "LCS indicator", "reference" : "9.9.3.40", "presence" : "O", "format" : "TV", "length" : "2"}) ies.append({ "iei" : "63", "value" : "LCS client identity", "type" : "LCS client identity", "reference" : "9.9.3.41", "presence" : "O", "format" : "TLV", "length" : "3-257"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_101.py000066400000000000000000000011131333553357400217400ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "Generic message container type", "type" : "Generic message container type", "reference" : "9.9.3.42", "presence" : "M", "format" : "V", "length" : "1"}) ies.append({ "iei" : "", "value" : "Generic message container", "type" : "Generic message container", "reference" : "9.9.3.43", "presence" : "M", "format" : "LV-E", "length" : "3-n"}) ies.append({ "iei" : "65", "value" : "Additional information", "type" : "Additional information", "reference" : "9.9.2.0", "presence" : "O", "format" : "TLV", "length" : "3-n"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_104.py000066400000000000000000000011131333553357400217430ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "Generic message container type", "type" : "Generic message container type", "reference" : "9.9.3.42", "presence" : "M", "format" : "V", "length" : "1"}) ies.append({ "iei" : "", "value" : "Generic message container", "type" : "Generic message container", "reference" : "9.9.3.43", "presence" : "M", "format" : "LV-E", "length" : "3-n"}) ies.append({ "iei" : "65", "value" : "Additional information", "type" : "Additional information", "reference" : "9.9.2.0", "presence" : "O", "format" : "TLV", "length" : "3-n"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_193.py000066400000000000000000000062161333553357400217640ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "EPS QoS", "type" : "EPS quality of service", "reference" : "9.9.4.3", "presence" : "M", "format" : "LV", "length" : "2-14"}) ies.append({ "iei" : "", "value" : "Access point name", "type" : "Access point name", "reference" : "9.9.4.1", "presence" : "M", "format" : "LV", "length" : "2-101"}) ies.append({ "iei" : "", "value" : "PDN address", "type" : "PDN address", "reference" : "9.9.4.9", "presence" : "M", "format" : "LV", "length" : "6-14"}) ies.append({ "iei" : "5D", "value" : "Transaction identifier", "type" : "Transaction identifier", "reference" : "9.9.4.17", "presence" : "O", "format" : "TLV", "length" : "3-4"}) ies.append({ "iei" : "30", "value" : "Negotiated QoS", "type" : "Quality of service", "reference" : "9.9.4.12", "presence" : "O", "format" : "TLV", "length" : "14-22"}) ies.append({ "iei" : "32", "value" : "Negotiated LLC SAPI", "type" : "LLC service access point identifier", "reference" : "9.9.4.7", "presence" : "O", "format" : "TV", "length" : "2"}) ies.append({ "iei" : "8-", "value" : "Radio priority", "type" : "Radio priority", "reference" : "9.9.4.13", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "34", "value" : "Packet flow Identifier", "type" : "Packet flow Identifier", "reference" : "9.9.4.8", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "5E", "value" : "APN-AMBR", "type" : "APN aggregate maximum bit rate", "reference" : "9.9.4.2", "presence" : "O", "format" : "TLV", "length" : "4-8"}) ies.append({ "iei" : "58", "value" : "ESM cause", "type" : "ESM cause", "reference" : "9.9.4.4", "presence" : "O", "format" : "TV", "length" : "2"}) ies.append({ "iei" : "27", "value" : "Protocol configuration options", "type" : "Protocol configuration options", "reference" : "9.9.4.11", "presence" : "O", "format" : "TLV", "length" : "3-253"}) ies.append({ "iei" : "B-", "value" : "Connectivity type", "type" : "Connectivity type", "reference" : "9.9.4.2A", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "C-", "value" : "WLAN offload indication", "type" : "WLAN offload acceptability", "reference" : "9.9.4.18", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "33", "value" : "NBIFOM container", "type" : "NBIFOM container", "reference" : "9.9.4.19", "presence" : "O", "format" : "TLV", "length" : "3-257"}) ies.append({ "iei" : "66", "value" : "Header compression configuration", "type" : "Header compression configuration", "reference" : "9.9.4.22", "presence" : "O", "format" : "TLV", "length" : "5-257"}) ies.append({ "iei" : "9-", "value" : "Control plane only indication", "type" : "Control plane only indication", "reference" : "9.9.4.23", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "7B", "value" : "Extended protocol configuration options", "type" : "Extended protocol configuration options", "reference" : "9.9.4.26", "presence" : "O", "format" : "TLV-E", "length" : "4-65538"}) ies.append({ "iei" : "6E", "value" : "Serving PLMN rate control", "type" : "Serving PLMN rate control", "reference" : "9.9.4.28", "presence" : "O", "format" : "TLV", "length" : "4"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_194.py000066400000000000000000000007041333553357400217610ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "27", "value" : "Protocol configuration options", "type" : "Protocol configuration options", "reference" : "9.9.4.11", "presence" : "O", "format" : "TLV", "length" : "3-253"}) ies.append({ "iei" : "7B", "value" : "Extended protocol configuration options", "type" : "Extended protocol configuration options", "reference" : "9.9.4.26", "presence" : "O", "format" : "TLV-E", "length" : "4-65538"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_195.py000066400000000000000000000011261333553357400217610ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "ESM cause", "type" : "ESM cause", "reference" : "9.9.4.4", "presence" : "M", "format" : "V", "length" : "1"}) ies.append({ "iei" : "27", "value" : "Protocol configuration options", "type" : "Protocol configuration options", "reference" : "9.9.4.11", "presence" : "O", "format" : "TLV", "length" : "3-253"}) ies.append({ "iei" : "7B", "value" : "Extended protocol configuration options", "type" : "Extended protocol configuration options", "reference" : "9.9.4.26", "presence" : "O", "format" : "TLV-E", "length" : "4-65538"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_197.py000066400000000000000000000041751333553357400217720ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "Linked EPS bearer identity", "type" : "Linked EPS bearer identity", "reference" : "9.9.4.6", "presence" : "M", "format" : "V", "length" : "1/2"}) ies.append({ "iei" : "", "value" : "EPS QoS", "type" : "EPS quality of service", "reference" : "9.9.4.3", "presence" : "M", "format" : "LV", "length" : "2-14"}) ies.append({ "iei" : "", "value" : "TFT", "type" : "Traffic flow template", "reference" : "9.9.4.16", "presence" : "M", "format" : "LV", "length" : "2-256"}) ies.append({ "iei" : "5D", "value" : "Transaction identifier", "type" : "Transaction identifier", "reference" : "9.9.4.17", "presence" : "O", "format" : "TLV", "length" : "3-4"}) ies.append({ "iei" : "30", "value" : "Negotiated QoS", "type" : "Quality of service", "reference" : "9.9.4.12", "presence" : "O", "format" : "TLV", "length" : "14-22"}) ies.append({ "iei" : "32", "value" : "Negotiated LLC SAPI", "type" : "LLC service access point identifier", "reference" : "9.9.4.7", "presence" : "O", "format" : "TV", "length" : "2"}) ies.append({ "iei" : "8-", "value" : "Radio priority", "type" : "Radio priority", "reference" : "9.9.4.13", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "34", "value" : "Packet flow Identifier", "type" : "Packet flow Identifier", "reference" : "9.9.4.8", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "27", "value" : "Protocol configuration options", "type" : "Protocol configuration options", "reference" : "9.9.4.11", "presence" : "O", "format" : "TLV", "length" : "3-253"}) ies.append({ "iei" : "C-", "value" : "WLAN offload indication", "type" : "WLAN offload acceptability", "reference" : "9.9.4.18", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "33", "value" : "NBIFOM container", "type" : "NBIFOM container", "reference" : "9.9.4.19", "presence" : "O", "format" : "TLV ", "length" : "3-257"}) ies.append({ "iei" : "7B", "value" : "Extended protocol configuration options", "type" : "Extended protocol configuration options", "reference" : "9.9.4.26", "presence" : "O", "format" : "TLV-E", "length" : "4-65538"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_198.py000066400000000000000000000011551333553357400217660ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "27", "value" : "Protocol configuration options", "type" : "Protocol configuration options", "reference" : "9.9.4.11", "presence" : "O", "format" : "TLV", "length" : "3-253"}) ies.append({ "iei" : "33", "value" : "NBIFOM container", "type" : "NBIFOM container", "reference" : "9.9.4.19", "presence" : "O", "format" : "TLV", "length" : "3-257"}) ies.append({ "iei" : "7B", "value" : "Extended protocol configuration options", "type" : "Extended protocol configuration options", "reference" : "9.9.4.26", "presence" : "O", "format" : "TLV-E", "length" : "4-65538"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_199.py000066400000000000000000000013771333553357400217750ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "ESM cause", "type" : "ESM cause", "reference" : "9.9.4.4", "presence" : "M", "format" : "V", "length" : "1"}) ies.append({ "iei" : "27", "value" : "Protocol configuration options", "type" : "Protocol configuration options", "reference" : "9.9.4.11", "presence" : "O", "format" : "TLV", "length" : "3-253"}) ies.append({ "iei" : "33", "value" : "NBIFOM container", "type" : "NBIFOM container", "reference" : "9.9.4.19", "presence" : "O", "format" : "TLV", "length" : "3-257"}) ies.append({ "iei" : "7B", "value" : "Extended protocol configuration options", "type" : "Extended protocol configuration options", "reference" : "9.9.4.26", "presence" : "O", "format" : "TLV-E", "length" : "4-65538"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_201.py000066400000000000000000000042131333553357400217450ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "5B", "value" : "New EPS QoS", "type" : "EPS quality of service", "reference" : "9.9.4.3", "presence" : "O", "format" : "TLV", "length" : "3-15"}) ies.append({ "iei" : "36", "value" : "TFT", "type" : "Traffic flow template", "reference" : "9.9.4.16", "presence" : "O", "format" : "TLV", "length" : "3-257"}) ies.append({ "iei" : "30", "value" : "New QoS", "type" : "Quality of service", "reference" : "9.9.4.12", "presence" : "O", "format" : "TLV", "length" : "14-22"}) ies.append({ "iei" : "32", "value" : "Negotiated LLC SAPI", "type" : "LLC service access point identifier", "reference" : "9.9.4.7", "presence" : "O", "format" : "TV", "length" : "2"}) ies.append({ "iei" : "8-", "value" : "Radio priority", "type" : "Radio priority", "reference" : "9.9.4.13", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "34", "value" : "Packet flow Identifier", "type" : "Packet flow Identifier", "reference" : "9.9.4.8", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "5E", "value" : "APN-AMBR", "type" : "APN aggregate maximum bit rate", "reference" : "9.9.4.2", "presence" : "O", "format" : "TLV", "length" : "4-8"}) ies.append({ "iei" : "27", "value" : "Protocol configuration options", "type" : "Protocol configuration options", "reference" : "9.9.4.11", "presence" : "O", "format" : "TLV", "length" : "3-253"}) ies.append({ "iei" : "C-", "value" : "WLAN offload indication", "type" : "WLAN offload acceptability", "reference" : "9.9.4.18", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "33", "value" : "NBIFOM container", "type" : "NBIFOM container", "reference" : "9.9.4.19", "presence" : "O", "format" : "TLV", "length" : "3-257"}) ies.append({ "iei" : "66", "value" : "Header compression configuration", "type" : "Header compression configuration", "reference" : "9.9.4.22", "presence" : "O", "format" : "TLV", "length" : "5-257"}) ies.append({ "iei" : "7B", "value" : "Extended protocol configuration options", "type" : "Extended protocol configuration options", "reference" : "9.9.4.26", "presence" : "O", "format" : "TLV-E", "length" : "4-65538"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_202.py000066400000000000000000000011551333553357400217500ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "27", "value" : "Protocol configuration options", "type" : "Protocol configuration options", "reference" : "9.9.4.11", "presence" : "O", "format" : "TLV", "length" : "3-253"}) ies.append({ "iei" : "33", "value" : "NBIFOM container", "type" : "NBIFOM container", "reference" : "9.9.4.19", "presence" : "O", "format" : "TLV", "length" : "3-257"}) ies.append({ "iei" : "7B", "value" : "Extended protocol configuration options", "type" : "Extended protocol configuration options", "reference" : "9.9.4.26", "presence" : "O", "format" : "TLV-E", "length" : "4-65538"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_203.py000066400000000000000000000013771333553357400217570ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "ESM cause", "type" : "ESM cause", "reference" : "9.9.4.4", "presence" : "M", "format" : "V", "length" : "1"}) ies.append({ "iei" : "27", "value" : "Protocol configuration options", "type" : "Protocol configuration options", "reference" : "9.9.4.11", "presence" : "O", "format" : "TLV", "length" : "3-253"}) ies.append({ "iei" : "33", "value" : "NBIFOM container", "type" : "NBIFOM container", "reference" : "9.9.4.19", "presence" : "O", "format" : "TLV", "length" : "3-257"}) ies.append({ "iei" : "7B", "value" : "Extended protocol configuration options", "type" : "Extended protocol configuration options", "reference" : "9.9.4.26", "presence" : "O", "format" : "TLV-E", "length" : "4-65538"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_205.py000066400000000000000000000021211333553357400217450ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "ESM cause", "type" : "ESM cause", "reference" : "9.9.4.4", "presence" : "M", "format" : "V", "length" : "1"}) ies.append({ "iei" : "27", "value" : "Protocol configuration options", "type" : "Protocol configuration options", "reference" : "9.9.4.11", "presence" : "O", "format" : "TLV", "length" : "3-253"}) ies.append({ "iei" : "37", "value" : "T3396 value", "type" : "GPRS timer 3", "reference" : "9.9.3.16B", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "C-", "value" : "WLAN offload indication", "type" : "WLAN offload acceptability", "reference" : "9.9.4.18", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "33", "value" : "NBIFOM container", "type" : "NBIFOM container", "reference" : "9.9.4.19", "presence" : "O", "format" : "TLV", "length" : "3-257"}) ies.append({ "iei" : "7B", "value" : "Extended protocol configuration options", "type" : "Extended protocol configuration options", "reference" : "9.9.4.26", "presence" : "O", "format" : "TLV-E", "length" : "4-65538"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_206.py000066400000000000000000000007041333553357400217530ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "27", "value" : "Protocol configuration options", "type" : "Protocol configuration options", "reference" : "9.9.4.11", "presence" : "O", "format" : "TLV", "length" : "3-253"}) ies.append({ "iei" : "7B", "value" : "Extended protocol configuration options", "type" : "Extended protocol configuration options", "reference" : "9.9.4.26", "presence" : "O", "format" : "TLV-E", "length" : "4-65538"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_208.py000066400000000000000000000027361333553357400217640ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "Request type", "type" : "Request type", "reference" : "9.9.4.14", "presence" : "M", "format" : "V", "length" : "1/2"}) ies.append({ "iei" : "D-", "value" : "ESM information transfer flag", "type" : "ESM information transfer flag", "reference" : "9.9.4.5", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "28", "value" : "Access point name", "type" : "Access point name", "reference" : "9.9.4.1", "presence" : "O", "format" : "TLV", "length" : "3-102"}) ies.append({ "iei" : "27", "value" : "Protocol configuration options", "type" : "Protocol configuration options", "reference" : "9.9.4.11", "presence" : "O", "format" : "TLV", "length" : "3-253"}) ies.append({ "iei" : "C-", "value" : "Device properties", "type" : "Device properties", "reference" : "9.9.2.0A", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "33", "value" : "NBIFOM container", "type" : "NBIFOM container", "reference" : "9.9.4.19", "presence" : "O", "format" : "TLV", "length" : "3-257"}) ies.append({ "iei" : "66", "value" : "Header compression configuration", "type" : "Header compression configuration", "reference" : "9.9.4.22", "presence" : "O", "format" : "TLV", "length" : "5-257"}) ies.append({ "iei" : "7B", "value" : "Extended protocol configuration options", "type" : "Extended protocol configuration options", "reference" : "9.9.4.26", "presence" : "O", "format" : "TLV-E", "length" : "4-65538"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_209.py000066400000000000000000000021231333553357400217530ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "ESM cause", "type" : "ESM cause", "reference" : "9.9.4.4", "presence" : "M", "format" : "V", "length" : "1"}) ies.append({ "iei" : "27", "value" : "Protocol configuration options", "type" : "Protocol configuration options", "reference" : "9.9.4.11", "presence" : "O", "format" : "TLV", "length" : "3-253"}) ies.append({ "iei" : "37", "value" : "Back-off timer value", "type" : "GPRS timer 3", "reference" : "9.9.3.16B", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "6B", "value" : "Re-attempt indicator", "type" : "Re-attempt indicator", "reference" : "9.9.4.13A", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "33", "value" : "NBIFOM container", "type" : "NBIFOM container", "reference" : "9.9.4.19", "presence" : "O", "format" : "TLV", "length" : "3-257"}) ies.append({ "iei" : "7B", "value" : "Extended protocol configuration options", "type" : "Extended protocol configuration options", "reference" : "9.9.4.26", "presence" : "O", "format" : "TLV-E", "length" : "4-65538"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_210.py000066400000000000000000000011721333553357400217460ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "Linked EPS bearer identity", "type" : "Linked EPS bearer identity", "reference" : "9.9.4.6", "presence" : "M", "format" : "V", "length" : "1/2"}) ies.append({ "iei" : "27", "value" : "Protocol configuration options", "type" : "Protocol configuration options", "reference" : "9.9.4.11", "presence" : "O", "format" : "TLV", "length" : "3-253"}) ies.append({ "iei" : "7B", "value" : "Extended protocol configuration options", "type" : "Extended protocol configuration options", "reference" : "9.9.4.26", "presence" : "O", "format" : "TLV-E", "length" : "4-65538"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_211.py000066400000000000000000000011261333553357400217460ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "ESM cause", "type" : "ESM cause", "reference" : "9.9.4.4", "presence" : "M", "format" : "V", "length" : "1"}) ies.append({ "iei" : "27", "value" : "Protocol configuration options", "type" : "Protocol configuration options", "reference" : "9.9.4.11", "presence" : "O", "format" : "TLV", "length" : "3-253"}) ies.append({ "iei" : "7B", "value" : "Extended protocol configuration options", "type" : "Extended protocol configuration options", "reference" : "9.9.4.26", "presence" : "O", "format" : "TLV-E", "length" : "4-65538"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_212.py000066400000000000000000000024721333553357400217540ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "Linked EPS bearer identity", "type" : "Linked EPS bearer identity", "reference" : "9.9.4.6", "presence" : "M", "format" : "V", "length" : "1/2"}) ies.append({ "iei" : "", "value" : "Traffic flow aggregate", "type" : "Traffic flow aggregate description", "reference" : "9.9.4.15", "presence" : "M", "format" : "LV", "length" : "2-256"}) ies.append({ "iei" : "", "value" : "Required traffic flow QoS", "type" : "EPS quality of service", "reference" : "9.9.4.3", "presence" : "M", "format" : "LV", "length" : "2-14"}) ies.append({ "iei" : "27", "value" : "Protocol configuration options", "type" : "Protocol configuration options", "reference" : "9.9.4.11", "presence" : "O", "format" : "TLV", "length" : "3-253"}) ies.append({ "iei" : "C-", "value" : "Device properties", "type" : "Device properties", "reference" : "9.9.2.0A", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "33", "value" : "NBIFOM container", "type" : "NBIFOM container", "reference" : "9.9.4.19", "presence" : "O", "format" : "TLV", "length" : "3-257"}) ies.append({ "iei" : "7B", "value" : "Extended protocol configuration options", "type" : "Extended protocol configuration options", "reference" : "9.9.4.26", "presence" : "O", "format" : "TLV-E", "length" : "4-65538"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_213.py000066400000000000000000000021231333553357400217460ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "ESM cause", "type" : "ESM cause", "reference" : "9.9.4.4", "presence" : "M", "format" : "V", "length" : "1"}) ies.append({ "iei" : "27", "value" : "Protocol configuration options", "type" : "Protocol configuration options", "reference" : "9.9.4.11", "presence" : "O", "format" : "TLV", "length" : "3-253"}) ies.append({ "iei" : "37", "value" : "Back-off timer value", "type" : "GPRS timer 3", "reference" : "9.9.3.16B", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "6B", "value" : "Re-attempt indicator", "type" : "Re-attempt indicator", "reference" : "9.9.4.13A", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "33", "value" : "NBIFOM container", "type" : "NBIFOM container", "reference" : "9.9.4.19", "presence" : "O", "format" : "TLV", "length" : "3-257"}) ies.append({ "iei" : "7B", "value" : "Extended protocol configuration options", "type" : "Extended protocol configuration options", "reference" : "9.9.4.26", "presence" : "O", "format" : "TLV-E", "length" : "4-65538"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_214.py000066400000000000000000000032461333553357400217560ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "EPS bearer identity for packet filter", "type" : "Linked EPS bearer identity", "reference" : "9.9.4.6", "presence" : "M", "format" : "V", "length" : "1/2"}) ies.append({ "iei" : "", "value" : "Traffic flow aggregate", "type" : "Traffic flow aggregate description", "reference" : "9.9.4.15", "presence" : "M", "format" : "LV", "length" : "2-256"}) ies.append({ "iei" : "5B", "value" : "Required traffic flow QoS", "type" : "EPS quality of service", "reference" : "9.9.4.3", "presence" : "O", "format" : "TLV", "length" : "3-15"}) ies.append({ "iei" : "58", "value" : "ESM cause", "type" : "ESM cause", "reference" : "9.9.4.4", "presence" : "O", "format" : "TV", "length" : "2"}) ies.append({ "iei" : "27", "value" : "Protocol configuration options", "type" : "Protocol configuration options", "reference" : "9.9.4.11", "presence" : "O", "format" : "TLV", "length" : "3-253"}) ies.append({ "iei" : "C-", "value" : "Device properties", "type" : "Device properties", "reference" : "9.9.2.0A", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "33", "value" : "NBIFOM container", "type" : "NBIFOM container", "reference" : "9.9.4.19", "presence" : "O", "format" : "TLV", "length" : "3-257"}) ies.append({ "iei" : "66", "value" : "Header compression configuration", "type" : "Header compression configuration", "reference" : "9.9.4.22", "presence" : "O", "format" : "TLV", "length" : "5-257"}) ies.append({ "iei" : "7B", "value" : "Extended protocol configuration options", "type" : "Extended protocol configuration options", "reference" : "9.9.4.26", "presence" : "O", "format" : "TLV-E", "length" : "4-65538"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_215.py000066400000000000000000000021231333553357400217500ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "ESM cause", "type" : "ESM cause", "reference" : "9.9.4.4", "presence" : "M", "format" : "V", "length" : "1"}) ies.append({ "iei" : "27", "value" : "Protocol configuration options", "type" : "Protocol configuration options", "reference" : "9.9.4.11", "presence" : "O", "format" : "TLV", "length" : "3-253"}) ies.append({ "iei" : "37", "value" : "Back-off timer value", "type" : "GPRS timer 3", "reference" : "9.9.3.16B", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "6B", "value" : "Re-attempt indicator", "type" : "Re-attempt indicator", "reference" : "9.9.4.13A", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "33", "value" : "NBIFOM container", "type" : "NBIFOM container", "reference" : "9.9.4.19", "presence" : "O", "format" : "TLV", "length" : "3-257"}) ies.append({ "iei" : "7B", "value" : "Extended protocol configuration options", "type" : "Extended protocol configuration options", "reference" : "9.9.4.26", "presence" : "O", "format" : "TLV-E", "length" : "4-65538"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_217.py000066400000000000000000000000441333553357400217520ustar00rootroot00000000000000ies = [] msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_218.py000066400000000000000000000011561333553357400217600ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "28", "value" : "Access point name", "type" : "Access point name", "reference" : "9.9.4.1", "presence" : "O", "format" : "TLV", "length" : "3-102"}) ies.append({ "iei" : "27", "value" : "Protocol configuration options", "type" : "Protocol configuration options", "reference" : "9.9.4.11", "presence" : "O", "format" : "TLV", "length" : "3-253"}) ies.append({ "iei" : "7B", "value" : "Extended protocol configuration options", "type" : "Extended protocol configuration options", "reference" : "9.9.4.26", "presence" : "O", "format" : "TLV-E", "length" : "4-65538"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_232.py000066400000000000000000000002661333553357400217550ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "ESM cause", "type" : "ESM cause", "reference" : "9.9.4.4", "presence" : "M", "format" : "V", "length" : "1"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_65.py000066400000000000000000000077321333553357400217060ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "EPS attach type", "type" : "EPS attach type", "reference" : "9.9.3.11", "presence" : "M", "format" : "V", "length" : "1/2"}) ies.append({ "iei" : "", "value" : "EPS mobile identity", "type" : "EPS mobile identity", "reference" : "9.9.3.12", "presence" : "M", "format" : "LV", "length" : "5-12"}) ies.append({ "iei" : "", "value" : "UE network capability", "type" : "UE network capability", "reference" : "9.9.3.34", "presence" : "M", "format" : "LV", "length" : "3-14"}) ies.append({ "iei" : "", "value" : "ESM message container", "type" : "ESM message container", "reference" : "9.9.3.15", "presence" : "M", "format" : "LV-E", "length" : "5-n"}) ies.append({ "iei" : "19", "value" : "Old P-TMSI signature", "type" : "P-TMSI signature", "reference" : "9.9.3.26", "presence" : "O", "format" : "TV", "length" : "4"}) ies.append({ "iei" : "50", "value" : "Additional GUTI", "type" : "EPS mobile identity", "reference" : "9.9.3.12", "presence" : "O", "format" : "TLV", "length" : "13"}) ies.append({ "iei" : "52", "value" : "Last visited registered TAI", "type" : "Tracking area identity", "reference" : "9.9.3.32", "presence" : "O", "format" : "TV", "length" : "6"}) ies.append({ "iei" : "5C", "value" : "DRX parameter", "type" : "DRX parameter", "reference" : "9.9.3.8", "presence" : "O", "format" : "TV", "length" : "3"}) ies.append({ "iei" : "31", "value" : "MS network capability", "type" : "MS network capability", "reference" : "9.9.3.20", "presence" : "O", "format" : "TLV", "length" : "4-10"}) ies.append({ "iei" : "13", "value" : "Old location area identification", "type" : "Location area identification", "reference" : "9.9.2.2", "presence" : "O", "format" : "TV", "length" : "6"}) ies.append({ "iei" : "9-", "value" : "TMSI status", "type" : "TMSI status", "reference" : "9.9.3.31", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "11", "value" : "Mobile station classmark 2", "type" : "Mobile station classmark 2", "reference" : "9.9.2.4", "presence" : "O", "format" : "TLV", "length" : "5"}) ies.append({ "iei" : "20", "value" : "Mobile station classmark 3", "type" : "Mobile station classmark 3", "reference" : "9.9.2.5", "presence" : "O", "format" : "TLV", "length" : "2-34"}) ies.append({ "iei" : "40", "value" : "Supported Codecs", "type" : "Supported Codec List", "reference" : "9.9.2.10", "presence" : "O", "format" : "TLV", "length" : "5-n"}) ies.append({ "iei" : "F-", "value" : "Additional update type", "type" : "Additional update type", "reference" : "9.9.3.0B", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "5D", "value" : "Voice domain preference and UE usage setting", "type" : "Voice domain preference and UE usage setting", "reference" : "9.9.3.44", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "D-", "value" : "Device properties", "type" : "Device properties", "reference" : "9.9.2.0A", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "E-", "value" : "Old GUTI type", "type" : "GUTI type", "reference" : "9.9.3.45", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "C- ", "value" : "MS network feature support", "type" : "MS network feature support", "reference" : "9.9.3.20A", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "10", "value" : "TMSI based NRI container", "type" : "Network resource identifier container", "reference" : "9.9.3.24A", "presence" : "O", "format" : "TLV", "length" : "4"}) ies.append({ "iei" : "6A", "value" : "T3324 value", "type" : "GPRS timer 2", "reference" : "9.9.3.16A", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "5E", "value" : "T3412 extended value", "type" : "GPRS timer 3", "reference" : "9.9.3.16B", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "6E", "value" : "Extended DRX parameters", "type" : "Extended DRX parameters", "reference" : "9.9.3.46", "presence" : "O", "format" : "TLV", "length" : "3"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_66.py000066400000000000000000000054571333553357400217110ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "EPS attach result", "type" : "EPS attach result", "reference" : "9.9.3.10", "presence" : "M", "format" : "V", "length" : "1/2"}) ies.append({ "iei" : "", "value" : "T3412 value", "type" : "GPRS timer", "reference" : "9.9.3.16", "presence" : "M", "format" : "V", "length" : "1"}) ies.append({ "iei" : "", "value" : "TAI list", "type" : "Tracking area identity list", "reference" : "9.9.3.33", "presence" : "M", "format" : "LV", "length" : "7-97"}) ies.append({ "iei" : "", "value" : "ESM message container", "type" : "ESM message container", "reference" : "9.9.3.15", "presence" : "M", "format" : "LV-E", "length" : "5-n"}) ies.append({ "iei" : "50", "value" : "GUTI", "type" : "EPS mobile identity", "reference" : "9.9.3.12", "presence" : "O", "format" : "TLV", "length" : "13"}) ies.append({ "iei" : "13", "value" : "Location area identification", "type" : "Location area identification", "reference" : "9.9.2.2", "presence" : "O", "format" : "TV", "length" : "6"}) ies.append({ "iei" : "23", "value" : "MS identity", "type" : "Mobile identity", "reference" : "9.9.2.3", "presence" : "O", "format" : "TLV", "length" : "7-10"}) ies.append({ "iei" : "53", "value" : "EMM cause", "type" : "EMM cause", "reference" : "9.9.3.9", "presence" : "O", "format" : "TV", "length" : "2"}) ies.append({ "iei" : "17", "value" : "T3402 value", "type" : "GPRS timer", "reference" : "9.9.3.16", "presence" : "O", "format" : "TV", "length" : "2"}) ies.append({ "iei" : "59", "value" : "T3423 value", "type" : "GPRS timer", "reference" : "9.9.3.16", "presence" : "O", "format" : "TV", "length" : "2"}) ies.append({ "iei" : "4A", "value" : "Equivalent PLMNs", "type" : "PLMN list", "reference" : "9.9.2.8", "presence" : "O", "format" : "TLV", "length" : "5-47"}) ies.append({ "iei" : "34", "value" : "Emergency number list", "type" : "Emergency number list", "reference" : "9.9.3.37", "presence" : "O", "format" : "TLV", "length" : "5-50"}) ies.append({ "iei" : "64", "value" : "EPS network feature support", "type" : "EPS network feature support", "reference" : "9.9.3.12A", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "F-", "value" : "Additional update result", "type" : "Additional update result", "reference" : "9.9.3.0A", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "5E", "value" : "T3412 extended value", "type" : "GPRS timer 3", "reference" : "9.9.3.16B", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "6A", "value" : "T3324 value", "type" : "GPRS timer 2", "reference" : "9.9.3.16A", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "6E", "value" : "Extended DRX parameters", "type" : "Extended DRX parameters", "reference" : "9.9.3.46", "presence" : "O", "format" : "TLV", "length" : "3"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_67.py000066400000000000000000000003241333553357400216760ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "ESM message container", "type" : "ESM message container", "reference" : "9.9.3.15", "presence" : "M", "format" : "LV-E", "length" : "5-n"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_68.py000066400000000000000000000015141333553357400217010ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "EMM cause", "type" : "EMM cause", "reference" : "9.9.3.9", "presence" : "M", "format" : "V", "length" : "1"}) ies.append({ "iei" : "78", "value" : "ESM message container", "type" : "ESM message container", "reference" : "9.9.3.15", "presence" : "O", "format" : "TLV-E", "length" : "6-n"}) ies.append({ "iei" : "5F", "value" : "T3346 value", "type" : "GPRS timer 2", "reference" : "9.9.3.16A", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "16", "value" : "T3402 value", "type" : "GPRS timer 2", "reference" : "9.9.3.16A", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "A-", "value" : "Extended EMM cause", "type" : "Extended EMM cause", "reference" : "9.9.3.26A", "presence" : "O", "format" : "TV", "length" : "1"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_69.1.py000066400000000000000000000005471333553357400220460ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "Detach type", "type" : "Detach type", "reference" : "9.9.3.7", "presence" : "M", "format" : "V", "length" : "1/2"}) ies.append({ "iei" : "", "value" : "EPS mobile identity", "type" : "EPS mobile identity", "reference" : "9.9.3.12", "presence" : "M", "format" : "LV", "length" : "5-12"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_69.2.py000066400000000000000000000005211333553357400220370ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "Detach type", "type" : "Detach type", "reference" : "9.9.3.7", "presence" : "M", "format" : "V", "length" : "1/2"}) ies.append({ "iei" : "53", "value" : "EMM cause", "type" : "EMM cause", "reference" : "9.9.3.9", "presence" : "O", "format" : "TV", "length" : "2"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_70.py000066400000000000000000000000441333553357400216670ustar00rootroot00000000000000ies = [] msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_72.py000066400000000000000000000113041333553357400216720ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "EPS update type", "type" : "EPS update type", "reference" : "9.9.3.14", "presence" : "M", "format" : "V", "length" : "1/2"}) ies.append({ "iei" : "", "value" : "Old GUTI", "type" : "EPS mobile identity", "reference" : "9.9.3.12", "presence" : "M", "format" : "LV", "length" : "12"}) ies.append({ "iei" : "B-", "value" : "Non-current native NAS key set identifier", "type" : "key set identifier", "reference" : "9.9.3.21", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "8-", "value" : "GPRS ciphering key sequence number", "type" : "Ciphering key sequence number", "reference" : "9.9.3.4a", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "19", "value" : "Old P-TMSI signature", "type" : "P-TMSI signature", "reference" : "9.9.3.26", "presence" : "O", "format" : "TV", "length" : "4"}) ies.append({ "iei" : "50", "value" : "Additional GUTI", "type" : "EPS mobile identity", "reference" : "9.9.3.12", "presence" : "O", "format" : "TLV", "length" : "13"}) ies.append({ "iei" : "55", "value" : "NonceUE", "type" : "Nonce", "reference" : "9.9.3.25", "presence" : "O", "format" : "TV", "length" : "5"}) ies.append({ "iei" : "58", "value" : "UE network capability", "type" : "UE network capability", "reference" : "9.9.3.34", "presence" : "O", "format" : "TLV", "length" : "4-15"}) ies.append({ "iei" : "52", "value" : "Last visited registered TAI", "type" : "Tracking area identity", "reference" : "9.9.3.32", "presence" : "O", "format" : "TV", "length" : "6"}) ies.append({ "iei" : "5C", "value" : "DRX parameter", "type" : "DRX parameter", "reference" : "9.9.3.8", "presence" : "O", "format" : "TV", "length" : "3"}) ies.append({ "iei" : "A-", "value" : "UE radio capability information update needed", "type" : "UE radio capability information update needed", "reference" : "9.9.3.35", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "57", "value" : "EPS bearer context status", "type" : "EPS bearer context status", "reference" : "9.9.2.1", "presence" : "O", "format" : "TLV", "length" : "4"}) ies.append({ "iei" : "31", "value" : "MS network capability", "type" : "MS network capability", "reference" : "9.9.3.20", "presence" : "O", "format" : "TLV", "length" : "4-10"}) ies.append({ "iei" : "13", "value" : "Old location area identification", "type" : "Location area identification", "reference" : "9.9.2.2", "presence" : "O", "format" : "TV", "length" : "6"}) ies.append({ "iei" : "9-", "value" : "TMSI status", "type" : "TMSI status", "reference" : "9.9.3.31", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "11", "value" : "Mobile station classmark 2", "type" : "Mobile station classmark 2", "reference" : "9.9.2.4", "presence" : "O", "format" : "TLV", "length" : "5"}) ies.append({ "iei" : "20", "value" : "Mobile station classmark 3", "type" : "Mobile station classmark 3", "reference" : "9.9.2.5", "presence" : "O", "format" : "TLV", "length" : "2-34"}) ies.append({ "iei" : "40", "value" : "Supported Codecs", "type" : "Supported Codec List", "reference" : "9.9.2.10", "presence" : "O", "format" : "TLV", "length" : "5-n"}) ies.append({ "iei" : "F-", "value" : "Additional update type", "type" : "Additional update type", "reference" : "9.9.3.0B", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "5D", "value" : "Voice domain preference and UE usage setting", "type" : "Voice domain preference and UE usage setting", "reference" : "9.9.3.44", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "E-", "value" : "Old GUTI type", "type" : "GUTI type", "reference" : "9.9.3.45", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "D-", "value" : "Device properties", "type" : "Device properties", "reference" : "9.9.2.0A", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "C-", "value" : "MS network feature support", "type" : "MS network feature support", "reference" : "9.9.3.20A", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "10", "value" : "TMSI based NRI container", "type" : "Network resource identifier container", "reference" : "9.9.3.24A", "presence" : "O", "format" : "TLV", "length" : "4"}) ies.append({ "iei" : "6A", "value" : "T3324 value", "type" : "GPRS timer 2", "reference" : "9.9.3.16", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "5E", "value" : "T3412 extended value", "type" : "GPRS timer 3", "reference" : "9.9.3.16B", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "6E", "value" : "Extended DRX parameters", "type" : "Extended DRX parameters", "reference" : "9.9.3.46", "presence" : "O", "format" : "TLV", "length" : "3"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_73.py000066400000000000000000000060161333553357400216770ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "EPS update result", "type" : "EPS update result", "reference" : "9.9.3.13", "presence" : "M", "format" : "V", "length" : "1/2"}) ies.append({ "iei" : "5A", "value" : "T3412 value", "type" : "GPRS timer", "reference" : "9.9.3.16", "presence" : "O", "format" : "TV", "length" : "2"}) ies.append({ "iei" : "50", "value" : "GUTI", "type" : "EPS mobile identity", "reference" : "9.9.3.12", "presence" : "O", "format" : "TLV", "length" : "13"}) ies.append({ "iei" : "54", "value" : "TAI list", "type" : "Tracking area identity list", "reference" : "9.9.3.33", "presence" : "O", "format" : "TLV", "length" : "8-98"}) ies.append({ "iei" : "57", "value" : "EPS bearer context status", "type" : "EPS bearer context status", "reference" : "9.9.2.1", "presence" : "O", "format" : "TLV", "length" : "4"}) ies.append({ "iei" : "13", "value" : "Location area identification", "type" : "Location area identification", "reference" : "9.9.2.2", "presence" : "O", "format" : "TV", "length" : "6"}) ies.append({ "iei" : "23", "value" : "MS identity", "type" : "Mobile identity", "reference" : "9.9.2.3", "presence" : "O", "format" : "TLV", "length" : "7-10"}) ies.append({ "iei" : "53", "value" : "EMM cause", "type" : "EMM cause", "reference" : "9.9.3.9", "presence" : "O", "format" : "TV", "length" : "2"}) ies.append({ "iei" : "17", "value" : "T3402 value", "type" : "GPRS timer", "reference" : "9.9.3.16", "presence" : "O", "format" : "TV", "length" : "2"}) ies.append({ "iei" : "59", "value" : "T3423 value", "type" : "GPRS timer", "reference" : "9.9.3.16", "presence" : "O", "format" : "TV", "length" : "2"}) ies.append({ "iei" : "4A", "value" : "Equivalent PLMNs", "type" : "PLMN list", "reference" : "9.9.2.8", "presence" : "O", "format" : "TLV", "length" : "5-47"}) ies.append({ "iei" : "34", "value" : "Emergency number list", "type" : "Emergency number list", "reference" : "9.9.3.37", "presence" : "O", "format" : "TLV", "length" : "5-50"}) ies.append({ "iei" : "64", "value" : "EPS network feature support", "type" : "EPS network feature support", "reference" : "9.9.3.12A", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "F-", "value" : "Additional update result", "type" : "Additional update result", "reference" : "9.9.3.0A", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "5E", "value" : "T3412 extended value", "type" : "GPRS timer 3", "reference" : "9.9.3.16B", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "6A", "value" : "T3324 value", "type" : "GPRS timer 2", "reference" : "9.9.3.16A", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "6E", "value" : "Extended DRX parameters", "type" : "Extended DRX parameters", "reference" : "9.9.3.46", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "68", "value" : "Header compression configuration status", "type" : "Header compression configuration status", "reference" : "9.9.4.27", "presence" : "O", "format" : "TLV", "length" : "4"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_74.py000066400000000000000000000000441333553357400216730ustar00rootroot00000000000000ies = [] msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_75.py000066400000000000000000000007741333553357400217060ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "EMM cause", "type" : "EMM cause", "reference" : "9.9.3.9", "presence" : "M", "format" : "V", "length" : "1"}) ies.append({ "iei" : "5F", "value" : "T3346 value", "type" : "GPRS timer 2", "reference" : "9.9.3.16A", "presence" : "O", "format" : "TLV", "length" : "3"}) ies.append({ "iei" : "A-", "value" : "Extended EMM cause", "type" : "Extended EMM cause", "reference" : "9.9.3.26A", "presence" : "O", "format" : "TV", "length" : "1"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_76.py000066400000000000000000000015161333553357400217020ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "Service type", "type" : "Service type", "reference" : "9.9.3.27", "presence" : "M", "format" : "V", "length" : "1/2"}) ies.append({ "iei" : "", "value" : "M-TMSI", "type" : "Mobile identity", "reference" : "9.9.2.3", "presence" : "M", "format" : "LV", "length" : "6"}) ies.append({ "iei" : "B-", "value" : "CSFB response", "type" : "CSFB response", "reference" : "9.9.3.5", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "57", "value" : "EPS bearer context status", "type" : "EPS bearer context status", "reference" : "9.9.2.1", "presence" : "O", "format" : "TLV", "length" : "4"}) ies.append({ "iei" : "D-", "value" : "Device properties", "type" : "Device properties", "reference" : "9.9.2.0A", "presence" : "O", "format" : "TV", "length" : "1"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_77.1.py000066400000000000000000000005701333553357400220410ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "KSI and sequence number", "type" : "KSI and sequence number", "reference" : "9.9.3.19", "presence" : "M", "format" : "V", "length" : "1"}) ies.append({ "iei" : "", "value" : "Message authentication code", "type" : "Short MAC", "reference" : "9.9.3.28", "presence" : "M", "format" : "V", "length" : "2"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_78.py000066400000000000000000000007541333553357400217070ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "EMM cause", "type" : "EMM cause", "reference" : "9.9.3.9", "presence" : "M", "format" : "V", "length" : "1"}) ies.append({ "iei" : "5B", "value" : "T3442 value", "type" : "GPRS timer", "reference" : "9.9.3.16", "presence" : "C", "format" : "TV", "length" : "2"}) ies.append({ "iei" : "5F", "value" : "T3346 value", "type" : "GPRS timer 2", "reference" : "9.9.3.16A", "presence" : "O", "format" : "TLV", "length" : "3"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_80.py000066400000000000000000000005511333553357400216730ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "GUTI", "type" : "EPS mobile identity", "reference" : "9.9.3.12", "presence" : "M", "format" : "LV", "length" : "12"}) ies.append({ "iei" : "54", "value" : "TAI list", "type" : "Tracking area identity list", "reference" : "9.9.3.33", "presence" : "O", "format" : "TLV", "length" : "8-98"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_81.py000066400000000000000000000000441333553357400216710ustar00rootroot00000000000000ies = [] msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_82.py000066400000000000000000000011121333553357400216670ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "NAS key set identifierASME", "type" : "key set identifier", "reference" : "9.9.3.21", "presence" : "M", "format" : "V", "length" : "1/2"}) ies.append({ "iei" : "", "value" : "Authentication parameter RAND", "type" : "Authentication parameter RAND", "reference" : "9.9.3.3", "presence" : "M", "format" : "V", "length" : "16"}) ies.append({ "iei" : "", "value" : "Authentication parameter AUTN", "type" : "Authentication parameter AUTN", "reference" : "9.9.3.2", "presence" : "M", "format" : "LV", "length" : "17"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_83.py000066400000000000000000000003521333553357400216750ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "Authentication response parameter", "type" : "Authentication response parameter", "reference" : "9.9.3.4", "presence" : "M", "format" : "LV", "length" : "5-17"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_84.py000066400000000000000000000000441333553357400216740ustar00rootroot00000000000000ies = [] msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_85.py000066400000000000000000000003031333553357400216730ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "Identity type", "type" : "Identity type 2", "reference" : "9.9.3.17", "presence" : "M", "format" : "V", "length" : "1/2"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_86.py000066400000000000000000000003061333553357400216770ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "Mobile identity", "type" : "Mobile identity", "reference" : "9.9.2.3", "presence" : "M", "format" : "LV", "length" : "4-10"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_92.py000066400000000000000000000005731333553357400217020ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "EMM cause", "type" : "EMM cause", "reference" : "9.9.3.9", "presence" : "M", "format" : "V", "length" : "1"}) ies.append({ "iei" : "30", "value" : "Authentication failure parameter", "type" : "Authentication failure parameter", "reference" : "9.9.3.1", "presence" : "O", "format" : "TLV", "length" : "16"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_93.py000066400000000000000000000020101333553357400216670ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "Selected NAS security algorithms", "type" : "security algorithms", "reference" : "9.9.3.23", "presence" : "M", "format" : "V", "length" : "1"}) ies.append({ "iei" : "", "value" : "NAS key set identifier", "type" : "key set identifier", "reference" : "9.9.3.21", "presence" : "M", "format" : "V", "length" : "1/2"}) ies.append({ "iei" : "", "value" : "Replayed UE security capabilities", "type" : "UE security capability", "reference" : "9.9.3.36", "presence" : "M", "format" : "LV", "length" : "3-6"}) ies.append({ "iei" : "C-", "value" : "IMEISV request", "type" : "IMEISV request", "reference" : "9.9.3.18", "presence" : "O", "format" : "TV", "length" : "1"}) ies.append({ "iei" : "55", "value" : "Replayed nonceUE", "type" : "Nonce", "reference" : "9.9.3.25", "presence" : "O", "format" : "TV", "length" : "5"}) ies.append({ "iei" : "56", "value" : "NonceMME", "type" : "Nonce", "reference" : "9.9.3.25", "presence" : "O", "format" : "TV", "length" : "5"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_94.py000066400000000000000000000002761333553357400217040ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "23", "value" : "IMEISV", "type" : "Mobile identity", "reference" : "9.9.2.3", "presence" : "O", "format" : "TLV", "length" : "11"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_95.py000066400000000000000000000002661333553357400217040ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "EMM cause", "type" : "EMM cause", "reference" : "9.9.3.9", "presence" : "M", "format" : "V", "length" : "1"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_96.py000066400000000000000000000002661333553357400217050ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "EMM cause", "type" : "EMM cause", "reference" : "9.9.3.9", "presence" : "M", "format" : "V", "length" : "1"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_97.py000066400000000000000000000015751333553357400217120ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "43", "value" : "Full name for network", "type" : "Network name", "reference" : "9.9.3.24", "presence" : "O", "format" : "TLV", "length" : "3-n"}) ies.append({ "iei" : "45", "value" : "Short name for network", "type" : "Network name", "reference" : "9.9.3.24", "presence" : "O", "format" : "TLV", "length" : "3-n"}) ies.append({ "iei" : "46", "value" : "Local time zone", "type" : "Time zone", "reference" : "9.9.3.29", "presence" : "O", "format" : "TV", "length" : "2"}) ies.append({ "iei" : "47", "value" : "Universal time and local time zone", "type" : "Time zone and time", "reference" : "9.9.3.30", "presence" : "O", "format" : "TV", "length" : "8"}) ies.append({ "iei" : "49", "value" : "Network daylight saving time", "type" : "Daylight saving time", "reference" : "9.9.3.6", "presence" : "O", "format" : "TLV", "length" : "3"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_98.py000066400000000000000000000003201333553357400216760ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "NAS message container", "type" : "message container", "reference" : "9.9.3.22", "presence" : "M", "format" : "LV", "length" : "3-252"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/cache/nas_msg_99.py000066400000000000000000000003201333553357400216770ustar00rootroot00000000000000ies = [] ies.append({ "iei" : "", "value" : "NAS message container", "type" : "message container", "reference" : "9.9.3.22", "presence" : "M", "format" : "LV", "length" : "3-252"}) msg_list[key]["ies"] = ies nextepc-0.3.10/lib/nas/support/nas_message.py000066400000000000000000001201221333553357400211540ustar00rootroot00000000000000# # Copyright (c) 2017, NextEPC Group # 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. # from docx import Document import re, os, sys, string import datetime import getopt import getpass version = "0.1.0" msg_list = {} type_list = {} verbosity = 0 filename = "" outdir = './' cachedir = './cache/' currentdir = './' FAIL = '\033[91m' INFO = '\033[93m' ENDC = '\033[0m' def d_print(string): if verbosity > 0: sys.stdout.write(string) def d_info(string): sys.stdout.write(INFO + string + ENDC + "\n") def d_error(string): sys.stderr.write(FAIL + string + ENDC + "\n") sys.exit(0) def write_file(f, string): f.write(string) d_print(string) def output_header_to_file(f): now = datetime.datetime.now() f.write("""/* * Copyright (c) 2017, NextEPC Group * 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. */ """) f.write("/*******************************************************************************\n") f.write(" * This file had been created by gtpv2c_tlv.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(), filename)) f.write(" ******************************************************************************/\n\n") def usage(): print "Python generating NAS Message encoder/decoder v%s" % (version) print "Usage: python nas_message.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 "-c [dir] Cache files to given directory" print "-h Print this help and return" def v_upper(v): return re.sub('_TO_UE', '', re.sub('_FROM_UE', '', re.sub('3GPP', '', re.sub('\'', '_', re.sub('/', '_', re.sub('-', '_', re.sub(' ', '_', v)))).upper()))) def v_lower(v): return re.sub('3gpp', '', re.sub('\'', '_', re.sub('/', '_', re.sub('-', '_', re.sub(' ', '_', v)))).lower()) def get_cells(cells): iei = cells[0].text.encode('ascii', 'ignore') value = re.sub("\s*$", "", re.sub("\s*\n*\s*\([^\)]*\)*", "", re.sub("'s", "", cells[1].text))).encode('ascii', 'ignore') type = re.sub("^NAS ", "", re.sub("'s", "", re.sub('\s*\n\s*[a-zA-Z0-9.]*', '', cells[2].text))).encode('ascii', 'ignore') reference = re.sub('[a-zA-Z0-9\'\-\s]*\n\s*', '', cells[2].text).encode('ascii', 'ignore') presence = cells[3].text.encode('ascii', 'ignore') format = cells[4].text.encode('ascii', 'ignore') length = cells[5].text.encode('ascii', 'ignore') return { "iei" : iei, "value" : value, "type" : type, "reference" : reference, "presence" : presence, "format" : format, "length" : length } def write_cells_to_file(name, cells): write_file(f, name + ".append({ \"iei\" : \"" + cells["iei"] + \ "\", \"value\" : \"" + cells["value"] + \ "\", \"type\" : \"" + cells["type"] + \ "\", \"reference\" : \"" + cells["reference"] + \ "\", \"presence\" : \"" + cells["presence"] + \ "\", \"format\" : \"" + cells["format"] + \ "\", \"length\" : \"" + cells["length"] + "\"})\n") try: opts, args = getopt.getopt(sys.argv[1:], "df:ho:c:", ["debug", "file", "help", "output", "cache"]) except getopt.GetoptError as err: # print help information and exit: usage() sys.exit(2) for o, a in opts: if o in ("-d", "--debug"): verbosity = 1 if o in ("-f", "--file"): filename = a if o in ("-o", "--output"): outdir = a if outdir.rfind('/') != len(outdir): outdir += '/' if o in ("-c", "--cache"): cache = a if cachedir.rfind('/') != len(cachedir): cachedir += '/' if o in ("-h", "--help"): usage() sys.exit(2) # Message Type List msg_list["ATTACH REQUEST"] = { "type" : "65" } msg_list["ATTACH ACCEPT"]= { "type" : "66" } msg_list["ATTACH COMPLETE"] = { "type" : "67" } msg_list["ATTACH REJECT"] = { "type" : "68" } msg_list["DETACH REQUEST FROM UE"] = { "type" : "69.1" } msg_list["DETACH REQUEST TO UE"] = { "type" : "69.2" } msg_list["DETACH ACCEPT"] = { "type" : "70" } msg_list["TRACKING AREA UPDATE REQUEST"] = { "type" : "72" } msg_list["TRACKING AREA UPDATE ACCEPT"] = { "type" : "73" } msg_list["TRACKING AREA UPDATE COMPLETE"] = { "type" : "74" } msg_list["TRACKING AREA UPDATE REJECT"] = { "type" : "75" } msg_list["EXTENDED SERVICE REQUEST"] = { "type" : "76" } msg_list["SERVICE REQUEST"] = { "type" : "77.1" } msg_list["SERVICE REJECT"] = { "type" : "78" } msg_list["GUTI REALLOCATION COMMAND"] = { "type" : "80" } msg_list["GUTI REALLOCATION COMPLETE"] = { "type" : "81" } msg_list["AUTHENTICATION REQUEST"] = { "type" : "82" } msg_list["AUTHENTICATION RESPONSE"] = { "type" : "83" } msg_list["AUTHENTICATION REJECT"] = { "type" : "84" } msg_list["AUTHENTICATION FAILURE"] = { "type" : "92" } msg_list["IDENTITY REQUEST"] = { "type" : "85" } msg_list["IDENTITY RESPONSE"] = { "type" : "86" } msg_list["SECURITY MODE COMMAND"] = { "type" : "93" } msg_list["SECURITY MODE COMPLETE"] = { "type" : "94" } msg_list["SECURITY MODE REJECT"] = { "type" : "95" } msg_list["EMM STATUS"] = { "type" : "96" } msg_list["EMM INFORMATION"] = { "type" : "97" } msg_list["DOWNLINK NAS TRANSPORT"] = { "type" : "98" } msg_list["UPLINK NAS TRANSPORT"] = { "type" : "99" } msg_list["CS SERVICE NOTIFICATION"] = { "type" : "100" } msg_list["DOWNLINK GENERIC NAS TRANSPORT"] = { "type" : "104" } msg_list["UPLINK GENERIC NAS TRANSPORT"] = { "type" : "101" } msg_list["ACTIVATE DEFAULT EPS BEARER CONTEXT REQUEST"] = { "type" : "193" } msg_list["ACTIVATE DEFAULT EPS BEARER CONTEXT ACCEPT"] = { "type" : "194" } msg_list["ACTIVATE DEFAULT EPS BEARER CONTEXT REJECT"] = { "type" : "195" } msg_list["ACTIVATE DEDICATED EPS BEARER CONTEXT REQUEST"] = { "type" : "197" } msg_list["ACTIVATE DEDICATED EPS BEARER CONTEXT ACCEPT"] = { "type" : "198" } msg_list["ACTIVATE DEDICATED EPS BEARER CONTEXT REJECT"] = { "type" : "199" } msg_list["MODIFY EPS BEARER CONTEXT REQUEST"] = { "type" : "201" } msg_list["MODIFY EPS BEARER CONTEXT ACCEPT"] = { "type" : "202" } msg_list["MODIFY EPS BEARER CONTEXT REJECT"] = { "type" : "203" } msg_list["DEACTIVATE EPS BEARER CONTEXT REQUEST"] = { "type" : "205" } msg_list["DEACTIVATE EPS BEARER CONTEXT ACCEPT"] = { "type" : "206" } msg_list["PDN CONNECTIVITY REQUEST"] = { "type" : "208" } msg_list["PDN CONNECTIVITY REJECT"] = { "type" : "209" } msg_list["PDN DISCONNECT REQUEST"] = { "type" : "210" } msg_list["PDN DISCONNECT REJECT"] = { "type" : "211" } msg_list["BEARER RESOURCE ALLOCATION REQUEST"] = { "type" : "212" } msg_list["BEARER RESOURCE ALLOCATION REJECT"] = { "type" : "213" } msg_list["BEARER RESOURCE MODIFICATION REQUEST"] = { "type" : "214" } msg_list["BEARER RESOURCE MODIFICATION REJECT"] = { "type" : "215" } msg_list["ESM INFORMATION REQUEST"] = { "type" : "217" } msg_list["ESM INFORMATION RESPONSE"] = { "type" : "218" } msg_list["ESM STATUS"] = { "type" : "232" } # Table number for Message List msg_list["ATTACH ACCEPT"]["table"] = 0 msg_list["ATTACH COMPLETE"]["table"] = 1 msg_list["ATTACH REJECT"]["table"] = 2 msg_list["ATTACH REQUEST"]["table"] = 3 msg_list["AUTHENTICATION FAILURE"]["table"] = 4 msg_list["AUTHENTICATION REJECT"]["table"] = 5 msg_list["AUTHENTICATION REQUEST"]["table"] = 6 msg_list["AUTHENTICATION RESPONSE"]["table"] = 7 msg_list["CS SERVICE NOTIFICATION"]["table"] = 8 msg_list["DETACH ACCEPT"]["table"] = 9 msg_list["DETACH REQUEST FROM UE"]["table"] = 11 msg_list["DETACH REQUEST TO UE"]["table"] = 12 msg_list["DOWNLINK NAS TRANSPORT"]["table"] = 13 msg_list["EMM INFORMATION"]["table"] = 14 msg_list["EMM STATUS"]["table"] = 15 msg_list["EXTENDED SERVICE REQUEST"]["table"] = 16 msg_list["GUTI REALLOCATION COMMAND"]["table"] = 17 msg_list["GUTI REALLOCATION COMPLETE"]["table"] = 18 msg_list["IDENTITY REQUEST"]["table"] = 19 msg_list["IDENTITY RESPONSE"]["table"] = 20 msg_list["SECURITY MODE COMMAND"]["table"] = 21 msg_list["SECURITY MODE COMPLETE"]["table"] = 22 msg_list["SECURITY MODE REJECT"]["table"] = 23 msg_list["SERVICE REJECT"]["table"] = 25 msg_list["SERVICE REQUEST"]["table"] = 26 msg_list["TRACKING AREA UPDATE ACCEPT"]["table"] = 27 msg_list["TRACKING AREA UPDATE COMPLETE"]["table"] = 28 msg_list["TRACKING AREA UPDATE REJECT"]["table"] = 29 msg_list["TRACKING AREA UPDATE REQUEST"]["table"] = 30 msg_list["UPLINK NAS TRANSPORT"]["table"] = 31 msg_list["DOWNLINK GENERIC NAS TRANSPORT"]["table"] = 32 msg_list["UPLINK GENERIC NAS TRANSPORT"]["table"] = 33 msg_list["ACTIVATE DEDICATED EPS BEARER CONTEXT ACCEPT"]["table"] = 36 msg_list["ACTIVATE DEDICATED EPS BEARER CONTEXT REJECT"]["table"] = 37 msg_list["ACTIVATE DEDICATED EPS BEARER CONTEXT REQUEST"]["table"] = 38 msg_list["ACTIVATE DEFAULT EPS BEARER CONTEXT ACCEPT"]["table"] = 39 msg_list["ACTIVATE DEFAULT EPS BEARER CONTEXT REJECT"]["table"] = 40 msg_list["ACTIVATE DEFAULT EPS BEARER CONTEXT REQUEST"]["table"] = 41 msg_list["BEARER RESOURCE ALLOCATION REJECT"]["table"] = 42 msg_list["BEARER RESOURCE ALLOCATION REQUEST"]["table"] = 43 msg_list["BEARER RESOURCE MODIFICATION REJECT"]["table"] = 44 msg_list["BEARER RESOURCE MODIFICATION REQUEST"]["table"] = 45 msg_list["DEACTIVATE EPS BEARER CONTEXT ACCEPT"]["table"] = 46 msg_list["DEACTIVATE EPS BEARER CONTEXT REQUEST"]["table"] = 47 msg_list["ESM INFORMATION REQUEST"]["table"] = 49 msg_list["ESM INFORMATION RESPONSE"]["table"] = 50 msg_list["ESM STATUS"]["table"] = 51 msg_list["MODIFY EPS BEARER CONTEXT ACCEPT"]["table"] = 52 msg_list["MODIFY EPS BEARER CONTEXT REJECT"]["table"] = 53 msg_list["MODIFY EPS BEARER CONTEXT REQUEST"]["table"] = 54 msg_list["PDN CONNECTIVITY REJECT"]["table"] = 56 msg_list["PDN CONNECTIVITY REQUEST"]["table"] = 57 msg_list["PDN DISCONNECT REJECT"]["table"] = 58 msg_list["PDN DISCONNECT REQUEST"]["table"] = 59 for key in msg_list.keys(): if "table" not in msg_list[key].keys(): continue; d_info("[" + key + "]") cachefile = cachedir + "nas_msg_" + msg_list[key]["type"] + ".py" if os.path.isfile(cachefile) and os.access(cachefile, os.R_OK): execfile(cachefile) print "Read from " + cachefile else: document = Document(filename) f = open(cachefile, 'w') ies = [] write_file(f, "ies = []\n") table = document.tables[msg_list[key]["table"]] start_row = 0 for start_row, row in enumerate(table.rows): cells = get_cells(row.cells); if cells["type"].find('Message type') != -1: break if cells["type"].find('KSI and sequence number') != -1: start_row -= 1 break assert start_row <= 4, "Can't find message type" half_length = True; for row in table.rows[start_row+1:]: cells = get_cells(row.cells) if cells is None: continue if cells["length"] == "1/2": if half_length is True: half_length = False; else: half_length = True; continue; ies.append(cells) write_cells_to_file("ies", cells) msg_list[key]["ies"] = ies write_file(f, "msg_list[key][\"ies\"] = ies\n") f.close() tmp = [(k, v["type"]) for k, v in msg_list.items()] sorted_msg_list = sorted(tmp, key=lambda tup: float(tup[1])) for (k, v) in sorted_msg_list: if "ies" not in msg_list[k]: continue; for ie in msg_list[k]["ies"]: key = ie["type"] if key in type_list.keys() and (type_list[key]["presence"] != ie["presence"] or type_list[key]["format"] != ie["format"] or type_list[key]["length"] != ie["length"]): d_print("KEY type different : %s\n" % key) d_print("%s.%s %s %s %s\n" % (v_lower(type_list[key]["message"]), type_list[key]["value"], type_list[key]["presence"], type_list[key]["format"], type_list[key]["length"])) d_print("%s.%s %s %s %s\n\n" % (v_lower(k), ie["value"], ie["presence"], ie["format"], ie["length"])) continue type_list[key] = { "reference" : ie["reference"], "presence" : ie["presence"], "format" : ie["format"], "length" : ie["length"], "message" : k, "value" : ie["value"] } d_info("[Type List]") typefile = currentdir + "type_list.py" if os.path.isfile(typefile) and os.access(typefile, os.R_OK): execfile(typefile) print "Read from " + typefile tmp = [(k, v["reference"]) for k, v in type_list.items()] sorted_type_list = sorted(tmp, key=lambda tup: tup[1]) f = open(outdir + 'nas_ies.h', 'w') output_header_to_file(f) f.write("""#ifndef __NAS_IES_H__ #define __NAS_IES_H__ #include "core_pkbuf.h" #include "nas_types.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(c_int16_t) nas_encode_optional_type(pkbuf_t *pkbuf, c_uint8_t type); """) for (k, v) in sorted_type_list: f.write("CORE_DECLARE(c_int16_t) nas_decode_%s(nas_%s_t *%s, pkbuf_t *pkbuf);\n" % (v_lower(k), v_lower(k), v_lower(k))) f.write("\n") for (k, v) in sorted_type_list: f.write("CORE_DECLARE(c_int16_t) nas_encode_%s(pkbuf_t *pkbuf, nas_%s_t *%s);\n" % (v_lower(k), v_lower(k), v_lower(k))) f.write("\n") f.write("""#ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __NAS_IES_H__ */ """) f.close() f = open(outdir + 'nas_ies.c', 'w') output_header_to_file(f) f.write("""#define TRACE_MODULE _nas_ies #include "core_debug.h" #include "core_lib.h" #include "nas_ies.h" c_int16_t nas_encode_optional_type(pkbuf_t *pkbuf, c_uint8_t type) { c_uint16_t size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); memcpy(pkbuf->payload - size, &type, size); return size; } """) for (k, v) in sorted_type_list: # d_print("%s = %s\n" % (k, type_list[k])) f.write("/* %s %s\n" % (type_list[k]["reference"], k)) f.write(" * %s %s %s */\n" % (type_list[k]["presence"], type_list[k]["format"], type_list[k]["length"])) if type_list[k]["format"] == "TV" and type_list[k]["length"] == "1": f.write("c_int16_t nas_decode_%s(nas_%s_t *%s, pkbuf_t *pkbuf)\n" % (v_lower(k), v_lower(k), v_lower(k))) f.write("{\n") f.write(" memcpy(%s, pkbuf->payload - 1, 1);\n\n" % v_lower(k)) f.write(" d_trace(25, \" %s - \");\n" % v_upper(k)) f.write(" d_trace_hex(25, pkbuf->payload - 1, 1);\n\n"); f.write(" return 0;\n") f.write("}\n\n") f.write("c_int16_t nas_encode_%s(pkbuf_t *pkbuf, nas_%s_t *%s)\n" % (v_lower(k), v_lower(k), v_lower(k))) f.write("{\n") f.write(" c_uint16_t size = sizeof(nas_%s_t);\n\n" % v_lower(k)) f.write(" d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, \"pkbuf_header error\");\n") f.write(" memcpy(pkbuf->payload - size, %s, size);\n\n" % v_lower(k)) f.write(" d_trace(25, \" %s - \");\n" % v_upper(k)) f.write(" d_trace_hex(25, pkbuf->payload - size, size);\n\n"); f.write(" return size;\n") f.write("}\n\n") elif type_list[k]["format"] == "TV" or type_list[k]["format"] == "V": f.write("c_int16_t nas_decode_%s(nas_%s_t *%s, pkbuf_t *pkbuf)\n" % (v_lower(k), v_lower(k), v_lower(k))) f.write("{\n") if type_list[k]["length"] == "4": f.write(" c_uint16_t size = 3;\n\n") else: f.write(" c_uint16_t size = sizeof(nas_%s_t);\n\n" % v_lower(k)) f.write(" d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, \"pkbuf_header error\");\n") f.write(" memcpy(%s, pkbuf->payload - size, size);\n\n" % v_lower(k)) if "decode" in type_list[k]: f.write("%s" % type_list[k]["decode"]) f.write(" d_trace(25, \" %s - \");\n" % v_upper(k)) f.write(" d_trace_hex(25, pkbuf->payload - size, size);\n\n"); f.write(" return size;\n") f.write("}\n\n") f.write("c_int16_t nas_encode_%s(pkbuf_t *pkbuf, nas_%s_t *%s)\n" % (v_lower(k), v_lower(k), v_lower(k))) f.write("{\n") if type_list[k]["length"] == "4": f.write(" c_uint16_t size = 3;\n") else: f.write(" c_uint16_t size = sizeof(nas_%s_t);\n" % v_lower(k)) f.write(" nas_%s_t target;\n\n" % v_lower(k)) f.write(" memcpy(&target, %s, size);\n" % v_lower(k)) if "encode" in type_list[k]: f.write("%s" % type_list[k]["encode"]) f.write(" d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, \"pkbuf_header error\");\n") f.write(" memcpy(pkbuf->payload - size, &target, size);\n\n") f.write(" d_trace(25, \" %s - \");\n" % v_upper(k)) f.write(" d_trace_hex(25, pkbuf->payload - size, size);\n\n"); f.write(" return size;\n") f.write("}\n\n") elif type_list[k]["format"] == "LV-E" or type_list[k]["format"] == "TLV-E": f.write("c_int16_t nas_decode_%s(nas_%s_t *%s, pkbuf_t *pkbuf)\n" % (v_lower(k), v_lower(k), v_lower(k))) f.write("{\n") f.write(" c_uint16_t size = 0;\n") f.write(" nas_%s_t *source = pkbuf->payload;\n\n" % v_lower(k)) f.write(" %s->length = ntohs(source->length);\n" % v_lower(k)) f.write(" size = %s->length + sizeof(%s->length);\n\n" % (v_lower(k), v_lower(k))) f.write(" d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, \"pkbuf_header error\");\n") f.write(" %s->buffer = pkbuf->payload - size + sizeof(%s->length);\n\n" % (v_lower(k), v_lower(k))) f.write(" d_trace(25, \" %s - \");\n" % v_upper(k)) f.write(" d_trace_hex(25, %s->buffer, %s->length);\n\n" % (v_lower(k), v_lower(k))); f.write(" return size;\n") f.write("}\n\n") f.write("c_int16_t nas_encode_%s(pkbuf_t *pkbuf, nas_%s_t *%s)\n" % (v_lower(k), v_lower(k), v_lower(k))) f.write("{\n") f.write(" c_uint16_t size = 0;\n") f.write(" c_uint16_t target;\n\n") f.write(" d_assert(%s, return -1, \"Null param\");\n" % v_lower(k)) f.write(" d_assert(%s->buffer, return -1, \"Null param\");\n\n" % v_lower(k)) f.write(" size = sizeof(%s->length);\n" % v_lower(k)) f.write(" d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, \"pkbuf_header error\");\n") f.write(" target = htons(%s->length);\n" % v_lower(k)) f.write(" memcpy(pkbuf->payload - size, &target, size);\n\n") f.write(" size = %s->length;\n" % v_lower(k)) f.write(" d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, \"pkbuf_header error\");\n") f.write(" memcpy(pkbuf->payload - size, %s->buffer, size);\n\n" % v_lower(k)) f.write(" d_trace(25, \" %s - \");\n" % v_upper(k)) f.write(" d_trace_hex(25, pkbuf->payload - size, size);\n\n"); f.write(" return %s->length + sizeof(%s->length);\n" % (v_lower(k), v_lower(k))) f.write("}\n\n"); else: f.write("c_int16_t nas_decode_%s(nas_%s_t *%s, pkbuf_t *pkbuf)\n" % (v_lower(k), v_lower(k), v_lower(k))) f.write("{\n") f.write(" c_uint16_t size = 0;\n") f.write(" nas_%s_t *source = pkbuf->payload;\n\n" % v_lower(k)) f.write(" %s->length = source->length;\n" % v_lower(k)) f.write(" size = %s->length + sizeof(%s->length);\n\n" % (v_lower(k), v_lower(k))) f.write(" d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, \"pkbuf_header error\");\n") f.write(" memcpy(%s, pkbuf->payload - size, size);\n\n" % v_lower(k)) if "decode" in type_list[k]: f.write("%s" % type_list[k]["decode"]) f.write(" d_trace(25, \" %s - \");\n" % v_upper(k)) f.write(" d_trace_hex(25, pkbuf->payload - size, size);\n\n"); f.write(" return size;\n") f.write("}\n\n") f.write("c_int16_t nas_encode_%s(pkbuf_t *pkbuf, nas_%s_t *%s)\n" % (v_lower(k), v_lower(k), v_lower(k))) f.write("{\n") f.write(" c_uint16_t size = %s->length + sizeof(%s->length);\n" % (v_lower(k), v_lower(k))) f.write(" nas_%s_t target;\n\n" % v_lower(k)) f.write(" memcpy(&target, %s, sizeof(nas_%s_t));\n" % (v_lower(k), v_lower(k))) if "encode" in type_list[k]: f.write("%s" % type_list[k]["encode"]) f.write(" d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, \"pkbuf_header error\");\n") f.write(" memcpy(pkbuf->payload - size, &target, size);\n\n") f.write(" d_trace(25, \" %s - \");\n" % v_upper(k)) f.write(" d_trace_hex(25, pkbuf->payload - size, size);\n\n"); f.write(" return size;\n") f.write("}\n\n"); f.close() f = open(outdir + 'nas_message.h', 'w') output_header_to_file(f) f.write("""#ifndef __NAS_MESSAGE_H__ #define __NAS_MESSAGE_H__ #include "nas_ies.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* The Packet Buffer(pkbuf_t) for NAS message MUST make a HEADROOM. * When calculating AES_CMAC, we need to use the headroom of the packet. */ #define NAS_HEADROOM 16 #define NAS_SECURITY_HEADER_PLAIN_NAS_MESSAGE 0 #define NAS_SECURITY_HEADER_INTEGRITY_PROTECTED 1 #define NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHERED 2 #define NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_NEW_SECURITY_CONTEXT 3 #define NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHTERD_WITH_NEW_INTEGRITY_CONTEXT 4 #define NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_PARTICALLY_CIPHTERD 5 #define NAS_SECURITY_HEADER_FOR_SERVICE_REQUEST_MESSAGE 12 #define NAS_PROTOCOL_DISCRIMINATOR_ESM 0x2 #define NAS_PROTOCOL_DISCRIMINATOR_EMM 0x7 #define NAS_EPS_BEARER_IDENTITY_UNASSIGNED 0 #define NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED 0 typedef struct _nas_emm_header_t { ED2(c_uint8_t security_header_type:4;, c_uint8_t protocol_discriminator:4;) c_uint8_t message_type; } __attribute__ ((packed)) nas_emm_header_t; typedef struct _nas_esm_header_t { ED2(c_uint8_t eps_bearer_identity:4;, c_uint8_t protocol_discriminator:4;) c_uint8_t procedure_transaction_identity; c_uint8_t message_type; } __attribute__ ((packed)) nas_esm_header_t; typedef struct _nas_security_header_t { ED2(c_uint8_t security_header_type:4;, c_uint8_t protocol_discriminator:4;) c_uint32_t message_authentication_code; c_uint8_t sequence_number; } __attribute__ ((packed)) nas_security_header_t; """) for (k, v) in sorted_msg_list: if k.find("TO UE") == -1 and k != "SERVICE REQUEST": f.write("#define NAS_" + v_upper(k) + " " + v.split('.')[0] + "\n") f.write("\n") for (k, v) in sorted_msg_list: if "ies" not in msg_list[k]: continue; if len(msg_list[k]["ies"]) == 0: continue; f.write("\n/*******************************************************\n") f.write(" * %s\n" % k) f.write(" ******************************************************/") for i, ie in enumerate([ies for ies in msg_list[k]["ies"] if ies["presence"] == "O"]): f.write("\n#define NAS_%s_%s_PRESENT (1<<%d)" % (v_upper(k), v_upper(ie["value"]), i)) for i, ie in enumerate([ies for ies in msg_list[k]["ies"] if ies["presence"] == "O"]): f.write("\n#define NAS_%s_%s_TYPE 0x%s" % (v_upper(k), v_upper(ie["value"]), re.sub('-', '0', ie["iei"]))) f.write("\n\ntypedef struct _nas_%s_t {\n" % v_lower(k)) mandatory_fields = False; optional_fields = False; for ie in msg_list[k]["ies"]: if ie["presence"] == "M" and mandatory_fields is False: f.write(" /* Mandatory fields */\n") mandatory_fields = True; if ie["presence"] == "O" and optional_fields is False: f.write("\n /* Optional fields */\n") f.write(" c_uint32_t presencemask;\n"); optional_fields = True; f.write(" nas_" + v_lower(ie["type"]) + "_t " + \ v_lower(ie["value"]) + ";\n") f.write("} nas_%s_t;\n\n" % v_lower(k)) f.write("\n") f.write("""typedef struct _nas_emm_message_t { nas_emm_header_t h; union { """) for (k, v) in sorted_msg_list: if "ies" not in msg_list[k]: continue; if len(msg_list[k]["ies"]) == 0: continue; if float(msg_list[k]["type"]) < 192: f.write(" nas_%s_t %s;\n" % (v_lower(k), v_lower(k))) f.write(""" }; } nas_emm_message_t; typedef struct _nas_esm_message_t { nas_esm_header_t h; union { """) for (k, v) in sorted_msg_list: if "ies" not in msg_list[k]: continue; if len(msg_list[k]["ies"]) == 0: continue; if float(msg_list[k]["type"]) >= 192: f.write(" nas_%s_t %s;\n" % (v_lower(k), v_lower(k))) f.write(""" }; } nas_esm_message_t; typedef struct _nas_message_t { nas_security_header_t h; union { nas_emm_message_t emm; nas_esm_message_t esm; }; } nas_message_t; CORE_DECLARE(status_t) nas_emm_decode(nas_message_t *message, pkbuf_t *pkbuf); CORE_DECLARE(status_t) nas_esm_decode(nas_message_t *message, pkbuf_t *pkbuf); CORE_DECLARE(status_t) nas_plain_encode( pkbuf_t **pkbuf, nas_message_t *message); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __NAS_MESSAGE_H__ */ """) f.close() f = open(outdir + 'nas_decoder.c', 'w') output_header_to_file(f) f.write("""#define TRACE_MODULE _nas_decoder #include "core_debug.h" #include "nas_message.h" """) for (k, v) in sorted_msg_list: if "ies" not in msg_list[k]: continue if len(msg_list[k]["ies"]) == 0: continue f.write("c_int32_t nas_decode_%s(nas_message_t *message, pkbuf_t *pkbuf)\n{\n" % v_lower(k)) if float(msg_list[k]["type"]) < 192: f.write(" nas_%s_t *%s = &message->emm.%s;\n" % (v_lower(k), v_lower(k), v_lower(k))) else: f.write(" nas_%s_t *%s = &message->esm.%s;\n" % (v_lower(k), v_lower(k), v_lower(k))) f.write(" c_int32_t decoded = 0;\n") f.write(" c_int32_t size = 0;\n\n") f.write(" d_trace(25, \"[NAS] Decode %s\\n\");\n\n" % v_upper(k)) for ie in [ies for ies in msg_list[k]["ies"] if ies["presence"] == "M"]: f.write(" size = nas_decode_%s(&%s->%s, pkbuf);\n" % (v_lower(ie["type"]), v_lower(k), v_lower(ie["value"]))) f.write(" d_assert(size >= 0, return -1, \"decode failed\");\n") f.write(" decoded += size;\n\n") optional_fields = False; for ie in [ies for ies in msg_list[k]["ies"] if ies["presence"] == "O"]: if optional_fields is False: f.write(""" while(pkbuf->len > 0) { c_uint8_t *buffer = pkbuf->payload; c_uint8_t type = (*buffer) >= 0x80 ? ((*buffer) & 0xf0) : (*buffer); size = sizeof(c_uint8_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return -1, "pkbuf_header error"); decoded += size; switch(type) { """) optional_fields = True; f.write(" case NAS_%s_%s_TYPE:\n" % (v_upper(k), v_upper(ie["value"]))) f.write(" size = nas_decode_%s(&%s->%s, pkbuf);\n" % (v_lower(ie["type"]), v_lower(k), v_lower(ie["value"]))) f.write(" d_assert(size >= 0, return -1, \"decode failed\");\n") f.write(" %s->presencemask |= NAS_%s_%s_PRESENT;\n" % (v_lower(k), v_upper(k), v_upper(ie["value"]))) f.write(" decoded += size;\n") f.write(" break;\n") if [ies for ies in msg_list[k]["ies"] if ies["presence"] == "O"]: f.write(""" default: d_warn("Unknown type(0x%x) or not implemented\\n", type); break; } } """) f.write(""" return decoded; } """) f.write("""status_t nas_emm_decode(nas_message_t *message, pkbuf_t *pkbuf) { status_t rv = CORE_ERROR; c_uint16_t size = 0; c_uint16_t decoded = 0; d_assert(pkbuf, return CORE_ERROR, "Null param"); d_assert(pkbuf->payload, return CORE_ERROR, "Null param"); memset(message, 0, sizeof(nas_message_t)); size = sizeof(nas_emm_header_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return CORE_ERROR, "pkbuf_header error"); memcpy(&message->emm.h, pkbuf->payload - size, size); decoded += size; if (message->emm.h.security_header_type >= NAS_SECURITY_HEADER_FOR_SERVICE_REQUEST_MESSAGE) { d_assert(pkbuf_header(pkbuf, 1) == CORE_OK, return CORE_ERROR, "pkbuf_header error"); decoded -= 1; size = nas_decode_service_request(message, pkbuf); d_assert(size >= CORE_OK, return CORE_ERROR, "decode error"); decoded += size; goto out; } switch(message->emm.h.message_type) { """) for (k, v) in sorted_msg_list: if "ies" not in msg_list[k]: continue; if float(msg_list[k]["type"]) < 192 and k.find("TO UE") == -1 and k != "SERVICE REQUEST": f.write(" case NAS_%s:\n" % v_upper(k)) if len(msg_list[k]["ies"]) != 0: f.write(" size = nas_decode_%s(message, pkbuf);\n" % v_lower(k)) f.write(" d_assert(size >= CORE_OK, return CORE_ERROR, \"decode error\");\n") f.write(" decoded += size;\n") f.write(" break;\n") f.write(""" default: d_error("Unknown message type (0x%x) or not implemented", message->emm.h.message_type); break; } out: rv = pkbuf_header(pkbuf, decoded); d_assert(rv == CORE_OK, return CORE_ERROR, "pkbuf_header error"); return CORE_OK; } """) f.write("""status_t nas_esm_decode(nas_message_t *message, pkbuf_t *pkbuf) { status_t rv = CORE_ERROR; c_uint16_t size = 0; c_uint16_t decoded = 0; d_assert(pkbuf, return CORE_ERROR, "Null param"); d_assert(pkbuf->payload, return CORE_ERROR, "Null param"); memset(message, 0, sizeof(nas_message_t)); size = sizeof(nas_esm_header_t); d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, return CORE_ERROR, "pkbuf_header error"); memcpy(&message->esm.h, pkbuf->payload - size, size); decoded += size; switch(message->esm.h.message_type) { """) for (k, v) in sorted_msg_list: if "ies" not in msg_list[k]: continue; if float(msg_list[k]["type"]) >= 192: f.write(" case NAS_%s:\n" % v_upper(k)) if len(msg_list[k]["ies"]) != 0: f.write(" size = nas_decode_%s(message, pkbuf);\n" % v_lower(k)) f.write(" d_assert(size >= CORE_OK, return CORE_ERROR, \"decode error\");\n") f.write(" decoded += size;\n") f.write(" break;\n") f.write(""" default: d_error("Unknown message type (0x%x) or not implemented", message->esm.h.message_type); break; } rv = pkbuf_header(pkbuf, decoded); d_assert(rv == CORE_OK, return CORE_ERROR, "pkbuf_header error"); return CORE_OK; } #if 0 /* deprecated */ status_t nas_plain_decode(nas_message_t *message, pkbuf_t *pkbuf) { nas_security_header_t *h = NULL; d_assert(pkbuf, return CORE_ERROR, "Null param"); h = pkbuf->payload; d_assert(h, return CORE_ERROR, "Null param"); if (h->protocol_discriminator == NAS_PROTOCOL_DISCRIMINATOR_EMM) return nas_emm_decode(message, pkbuf); else if (h->protocol_discriminator == NAS_PROTOCOL_DISCRIMINATOR_ESM) return nas_esm_decode(message, pkbuf); d_assert(0, return CORE_ERROR, "Invalid Protocol : %d", h->protocol_discriminator); } #endif """) f.close() f = open(outdir + 'nas_encoder.c', 'w') output_header_to_file(f) f.write("""#define TRACE_MODULE _nas_encoder #include "core_debug.h" #include "nas_message.h" """) for (k, v) in sorted_msg_list: if "ies" not in msg_list[k]: continue; if len(msg_list[k]["ies"]) == 0: continue f.write("c_int32_t nas_encode_%s(pkbuf_t *pkbuf, nas_message_t *message)\n{\n" % v_lower(k)) if float(msg_list[k]["type"]) < 192: f.write(" nas_%s_t *%s = &message->emm.%s;\n" % (v_lower(k), v_lower(k), v_lower(k))) else: f.write(" nas_%s_t *%s = &message->esm.%s;\n" % (v_lower(k), v_lower(k), v_lower(k))) f.write(" c_int32_t encoded = 0;\n") f.write(" c_int32_t size = 0;\n\n") f.write(" d_trace(25, \"[NAS] Encode %s\\n\");\n\n" % v_upper(k)) for ie in [ies for ies in msg_list[k]["ies"] if ies["presence"] == "M"]: f.write(" size = nas_encode_%s(pkbuf, &%s->%s);\n" % (v_lower(ie["type"]), v_lower(k), v_lower(ie["value"]))) f.write(" d_assert(size >= 0, return -1, \"encode failed\");\n") f.write(" encoded += size;\n\n") for ie in [ies for ies in msg_list[k]["ies"] if ies["presence"] == "O"]: f.write(" if (%s->presencemask & NAS_%s_%s_PRESENT)\n" % (v_lower(k), v_upper(k), v_upper(ie["value"]))) f.write(" {\n") if ie["length"] == "1" and ie["format"] == "TV": f.write(" %s->%s.type = (NAS_%s_%s_TYPE >> 4);\n\n" % (v_lower(k), v_lower(ie["value"]), v_upper(k), v_upper(ie["value"]))) else: f.write(" size = nas_encode_optional_type(pkbuf, NAS_%s_%s_TYPE);\n" % (v_upper(k), v_upper(ie["value"]))) f.write(" d_assert(size >= 0, return encoded, \"decode failed\");\n") f.write(" encoded += size;\n\n") f.write(" size = nas_encode_%s(pkbuf, &%s->%s);\n" % (v_lower(ie["type"]), v_lower(k), v_lower(ie["value"]))) f.write(" d_assert(size >= 0, return encoded, \"decode failed\");\n") f.write(" encoded += size;\n") f.write(" }\n\n") f.write(""" return encoded; } """) f.write("""status_t nas_emm_encode(pkbuf_t **pkbuf, nas_message_t *message) { status_t rv = CORE_ERROR; c_int32_t size = 0; c_int32_t encoded = 0; d_assert(message, return CORE_ERROR, "Null param"); /* The Packet Buffer(pkbuf_t) for NAS message MUST make a HEADROOM. * When calculating AES_CMAC, we need to use the headroom of the packet. */ *pkbuf = pkbuf_alloc(NAS_HEADROOM, MAX_SDU_LEN); d_assert(*pkbuf, return -1, "Null Param"); size = sizeof(nas_emm_header_t); rv = pkbuf_header(*pkbuf, -size); d_assert(rv == CORE_OK, return CORE_ERROR, "pkbuf_header error"); memcpy((*pkbuf)->payload - size, &message->emm.h, size); encoded += size; if (message->emm.h.security_header_type >= NAS_SECURITY_HEADER_FOR_SERVICE_REQUEST_MESSAGE) { d_assert(pkbuf_header(*pkbuf, 1) == CORE_OK, return CORE_ERROR, "pkbuf_header error"); encoded -= 1; size = nas_encode_service_request(*pkbuf, message); d_assert(size >= 0, return CORE_ERROR, "decode error"); encoded += size; goto out; } switch(message->emm.h.message_type) { """) for (k, v) in sorted_msg_list: if "ies" not in msg_list[k]: continue; if float(msg_list[k]["type"]) < 192 and k.find("FROM UE") == -1 and k != "SERVICE REQUEST": f.write(" case NAS_%s:\n" % v_upper(k)) if len(msg_list[k]["ies"]) != 0: f.write(" size = nas_encode_%s(*pkbuf, message);\n" % v_lower(k)) f.write(" d_assert(size >= 0, return CORE_ERROR, \"decode error\");\n") f.write(" encoded += size;\n") f.write(" break;\n") f.write(""" default: d_error("Unknown message type (0x%x) or not implemented", message->emm.h.message_type); pkbuf_free((*pkbuf)); return CORE_ERROR; } out: rv = pkbuf_header(*pkbuf, encoded); d_assert(rv == CORE_OK, return CORE_ERROR, "pkbuf_header error"); (*pkbuf)->len = encoded; return CORE_OK; } """) f.write("""status_t nas_esm_encode(pkbuf_t **pkbuf, nas_message_t *message) { status_t rv = CORE_ERROR; c_int32_t size = 0; c_int32_t encoded = 0; d_assert(message, return CORE_ERROR, "Null param"); /* The Packet Buffer(pkbuf_t) for NAS message MUST make a HEADROOM. * When calculating AES_CMAC, we need to use the headroom of the packet. */ *pkbuf = pkbuf_alloc(NAS_HEADROOM, MAX_SDU_LEN); d_assert(*pkbuf, return -1, "Null Param"); size = sizeof(nas_esm_header_t); rv = pkbuf_header(*pkbuf, -size); d_assert(rv == CORE_OK, return CORE_ERROR, "pkbuf_header error"); memcpy((*pkbuf)->payload - size, &message->esm.h, size); encoded += size; switch(message->esm.h.message_type) { """) for (k, v) in sorted_msg_list: if "ies" not in msg_list[k]: continue; if float(msg_list[k]["type"]) >= 192: f.write(" case NAS_%s:\n" % v_upper(k)) if len(msg_list[k]["ies"]) != 0: f.write(" size = nas_encode_%s(*pkbuf, message);\n" % v_lower(k)) f.write(" d_assert(size >= 0, return CORE_ERROR, \"decode error\");\n") f.write(" encoded += size;\n") f.write(" break;\n") f.write(""" default: d_error("Unknown message type (0x%x) or not implemented", message->esm.h.message_type); pkbuf_free((*pkbuf)); return CORE_ERROR; } rv = pkbuf_header(*pkbuf, encoded); d_assert(rv == CORE_OK, return CORE_ERROR, "pkbuf_header error"); (*pkbuf)->len = encoded; return CORE_OK; } status_t nas_plain_encode(pkbuf_t **pkbuf, nas_message_t *message) { d_assert(message, return CORE_ERROR, "Null param"); d_assert(message->emm.h.protocol_discriminator == message->esm.h.protocol_discriminator, return CORE_ERROR, "check UNION for protocol"); if (message->emm.h.protocol_discriminator == NAS_PROTOCOL_DISCRIMINATOR_EMM) return nas_emm_encode(pkbuf, message); else if (message->emm.h.protocol_discriminator == NAS_PROTOCOL_DISCRIMINATOR_ESM) return nas_esm_encode(pkbuf, message); d_assert(0, return CORE_ERROR, "Invalid Protocol : %d", message->emm.h.protocol_discriminator); } """) f.close() nextepc-0.3.10/lib/nas/support/type_list.py000066400000000000000000000063171333553357400207140ustar00rootroot00000000000000type_list["P-TMSI signature"]["decode"] = \ " *p_tmsi_signature = htonl(*p_tmsi_signature);\n\n" type_list["P-TMSI signature"]["encode"] = \ " *p_tmsi_signature = ntohl(*p_tmsi_signature);\n\n" type_list["Location area identification"]["decode"] = \ " location_area_identification->lac = ntohs(location_area_identification->lac);\n\n" type_list["Location area identification"]["encode"] = \ " target.lac = htons(location_area_identification->lac);\n\n" type_list["Tracking area identity"]["decode"] = \ " tracking_area_identity->tac = ntohs(tracking_area_identity->tac);\n\n" type_list["Tracking area identity"]["encode"] = \ " target.tac = htons(tracking_area_identity->tac);\n\n" type_list["Mobile identity"]["decode"] = \ " if (mobile_identity->tmsi.type == NAS_MOBILE_IDENTITY_TMSI)\n" \ " {\n" \ " if (mobile_identity->tmsi.spare != 0xf)\n" \ " d_warn(\"Spec warning : mobile_identity->tmsi.spare = 0x%x\", mobile_identity->tmsi.spare);\n" \ " mobile_identity->tmsi.tmsi = ntohl(mobile_identity->tmsi.tmsi);\n" \ " }\n\n" type_list["Mobile identity"]["encode"] = \ " if (mobile_identity->tmsi.type == NAS_MOBILE_IDENTITY_TMSI)\n" \ " {\n" \ " target.tmsi.tmsi = htonl(mobile_identity->tmsi.tmsi);\n" \ " target.tmsi.spare = 0xf;\n" \ " }\n\n" type_list["EPS mobile identity"]["decode"] = \ " if (eps_mobile_identity->guti.type == NAS_EPS_MOBILE_IDENTITY_GUTI)\n" \ " {\n" \ " if (eps_mobile_identity->guti.spare != 0xf)\n" \ " d_warn(\"Spec warning : eps_mobile_identy->spare = 0x%x\", eps_mobile_identity->guti.spare);\n" \ " eps_mobile_identity->guti.mme_gid = ntohs(eps_mobile_identity->guti.mme_gid);\n" \ " eps_mobile_identity->guti.m_tmsi = ntohl(eps_mobile_identity->guti.m_tmsi);\n" \ " }\n\n" type_list["EPS mobile identity"]["encode"] = \ " if (target.guti.type == NAS_EPS_MOBILE_IDENTITY_GUTI)\n" \ " {\n" \ " target.guti.spare = 0xf;\n" \ " target.guti.mme_gid = htons(eps_mobile_identity->guti.mme_gid);\n" \ " target.guti.m_tmsi = htonl(eps_mobile_identity->guti.m_tmsi);\n" \ " }\n\n" type_list["Nonce"]["decode"] = \ " *nonce = ntohl(*nonce);\n\n" type_list["Nonce"]["encode"] = \ " target = htonl(*nonce);\n\n" type_list["Header compression configuration"]["decode"] = \ " header_compression_configuration->max_cid = ntohs(header_compression_configuration->max_cid);\n\n" type_list["Header compression configuration"]["encode"] = \ " target.max_cid = htons(header_compression_configuration->max_cid);\n\n" type_list["Short MAC"]["decode"] = \ " *short_mac = ntohs(*short_mac);\n\n" type_list["Short MAC"]["encode"] = \ " target = htons(*short_mac);\n\n" type_list["Access point name"]["decode"] = \ " {\n" \ " c_int8_t apn[MAX_APN_LEN];\n" \ " access_point_name->length = apn_parse(apn, access_point_name->apn, access_point_name->length);\n" \ " core_cpystrn(access_point_name->apn, apn, c_min(access_point_name->length, MAX_APN_LEN) + 1);\n" \ " }\n\n" type_list["Access point name"]["encode"] = \ " target.length = apn_build(target.apn, access_point_name->apn, access_point_name->length);\n" \ " size = target.length + sizeof(target.length);\n\n" nextepc-0.3.10/lib/s1ap/000077500000000000000000000000001333553357400146665ustar00rootroot00000000000000nextepc-0.3.10/lib/s1ap/Makefile.am000066400000000000000000000012751333553357400167270ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in SUBDIRS = asn1c pkglib_LTLIBRARIES = libs1ap.la libs1ap_la_SOURCES = \ s1ap_decoder.c s1ap_encoder.c s1ap_free.c \ $(NULL) libs1ap_la_DEPENDENCIES = \ $(top_srcdir)/lib/core/src/libcore.la \ $(top_srcdir)/lib/s1ap/asn1c/libs1apasn1c.la \ $(NULL) libs1ap_la_LIBADD = \ $(top_srcdir)/lib/core/src/libcore.la \ $(top_srcdir)/lib/s1ap/asn1c/libs1apasn1c.la \ $(NULL) AM_LDFLAGS = \ -version-info @LIBVERSION@ AM_CPPFLAGS = \ -I$(top_srcdir)/lib/core/include \ -I$(top_srcdir)/lib/s1ap/asn1c \ $(NULL) AM_CFLAGS = \ -Wall -Werror \ $(NULL) MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump nextepc-0.3.10/lib/s1ap/asn1c/000077500000000000000000000000001333553357400156735ustar00rootroot00000000000000nextepc-0.3.10/lib/s1ap/asn1c/ANY.c000066400000000000000000000243451333553357400164760ustar00rootroot00000000000000/* * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include asn_OCTET_STRING_specifics_t asn_SPC_ANY_specs = { sizeof(ANY_t), offsetof(ANY_t, _asn_ctx), ASN_OSUBV_ANY }; asn_TYPE_operation_t asn_OP_ANY = { OCTET_STRING_free, OCTET_STRING_print, OCTET_STRING_compare, OCTET_STRING_decode_ber, OCTET_STRING_encode_der, OCTET_STRING_decode_xer_hex, ANY_encode_xer, #ifdef ASN_DISABLE_OER_SUPPORT 0, 0, #else 0, 0, #endif /* ASN_DISABLE_OER_SUPPORT */ #ifdef ASN_DISABLE_PER_SUPPORT 0, 0, 0, 0, #else ANY_decode_uper, ANY_encode_uper, ANY_decode_aper, ANY_encode_aper, #endif /* ASN_DISABLE_PER_SUPPORT */ 0, /* Random fill is not defined for ANY type */ 0 /* Use generic outmost tag fetcher */ }; asn_TYPE_descriptor_t asn_DEF_ANY = { "ANY", "ANY", &asn_OP_ANY, 0, 0, 0, 0, { 0, 0, asn_generic_no_constraint }, /* No constraints */ 0, 0, /* No members */ &asn_SPC_ANY_specs, }; #undef RETURN #define RETURN(_code) \ do { \ asn_dec_rval_t tmprval; \ tmprval.code = _code; \ tmprval.consumed = consumed_myself; \ return tmprval; \ } while(0) asn_enc_rval_t ANY_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, void *app_key) { if(flags & XER_F_CANONICAL) { /* * Canonical XER-encoding of ANY type is not supported. */ ASN__ENCODE_FAILED; } /* Dump as binary */ return OCTET_STRING_encode_xer(td, sptr, ilevel, flags, cb, app_key); } struct _callback_arg { uint8_t *buffer; size_t offset; size_t size; }; static int ANY__consume_bytes(const void *buffer, size_t size, void *key); int ANY_fromType(ANY_t *st, asn_TYPE_descriptor_t *td, void *sptr) { struct _callback_arg arg; asn_enc_rval_t erval; if(!st || !td) { errno = EINVAL; return -1; } if(!sptr) { if(st->buf) FREEMEM(st->buf); st->size = 0; return 0; } arg.offset = arg.size = 0; arg.buffer = 0; erval = der_encode(td, sptr, ANY__consume_bytes, &arg); if(erval.encoded == -1) { if(arg.buffer) FREEMEM(arg.buffer); return -1; } assert((size_t)erval.encoded == arg.offset); if(st->buf) FREEMEM(st->buf); st->buf = arg.buffer; st->size = arg.offset; return 0; } int ANY_fromType_aper(ANY_t *st, asn_TYPE_descriptor_t *td, void *sptr) { uint8_t *buffer = NULL; ssize_t erval; if(!st || !td) { errno = EINVAL; return -1; } if(!sptr) { if(st->buf) FREEMEM(st->buf); st->size = 0; return 0; } erval = aper_encode_to_new_buffer(td, td->encoding_constraints.per_constraints, sptr, (void**)&buffer); if(erval == -1) { if(buffer) FREEMEM(buffer); return -1; } assert((size_t)erval > 0); if(st->buf) FREEMEM(st->buf); st->buf = buffer; st->size = erval; return 0; } ANY_t * ANY_new_fromType(asn_TYPE_descriptor_t *td, void *sptr) { ANY_t tmp; ANY_t *st; if(!td || !sptr) { errno = EINVAL; return 0; } memset(&tmp, 0, sizeof(tmp)); if(ANY_fromType(&tmp, td, sptr)) return 0; st = (ANY_t *)CALLOC(1, sizeof(ANY_t)); if(st) { *st = tmp; return st; } else { FREEMEM(tmp.buf); return 0; } } ANY_t * ANY_new_fromType_aper(asn_TYPE_descriptor_t *td, void *sptr) { ANY_t tmp; ANY_t *st; if(!td || !sptr) { errno = EINVAL; return 0; } memset(&tmp, 0, sizeof(tmp)); if(ANY_fromType_aper(&tmp, td, sptr)) return 0; st = (ANY_t *)CALLOC(1, sizeof(ANY_t)); if(st) { *st = tmp; return st; } else { FREEMEM(tmp.buf); return 0; } } int ANY_to_type(ANY_t *st, asn_TYPE_descriptor_t *td, void **struct_ptr) { asn_dec_rval_t rval; void *newst = 0; if(!st || !td || !struct_ptr) { errno = EINVAL; return -1; } if(st->buf == 0) { /* Nothing to convert, make it empty. */ *struct_ptr = (void *)0; return 0; } rval = ber_decode(0, td, (void **)&newst, st->buf, st->size); if(rval.code == RC_OK) { *struct_ptr = newst; return 0; } else { /* Remove possibly partially decoded data. */ ASN_STRUCT_FREE(*td, newst); return -1; } } int ANY_to_type_aper(ANY_t *st, asn_TYPE_descriptor_t *td, void **struct_ptr) { asn_dec_rval_t rval; void *newst = 0; if(!st || !td || !struct_ptr) { errno = EINVAL; return -1; } if(st->buf == 0) { /* Nothing to convert, make it empty. */ *struct_ptr = (void *)0; return 0; } rval = aper_decode(0, td, (void **)&newst, st->buf, st->size, 0, 0); if(rval.code == RC_OK) { *struct_ptr = newst; return 0; } else { /* Remove possibly partially decoded data. */ ASN_STRUCT_FREE(*td, newst); return -1; } } static int ANY__consume_bytes(const void *buffer, size_t size, void *key) { struct _callback_arg *arg = (struct _callback_arg *)key; if((arg->offset + size) >= arg->size) { size_t nsize = (arg->size ? arg->size << 2 : 16) + size; void *p = REALLOC(arg->buffer, nsize); if(!p) return -1; arg->buffer = (uint8_t *)p; arg->size = nsize; } memcpy(arg->buffer + arg->offset, buffer, size); arg->offset += size; assert(arg->offset < arg->size); return 0; } #ifndef ASN_DISABLE_PER_SUPPORT asn_dec_rval_t ANY_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { const asn_OCTET_STRING_specifics_t *specs = td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics : &asn_SPC_ANY_specs; size_t consumed_myself = 0; int repeat; ANY_t *st = (ANY_t *)*sptr; (void)opt_codec_ctx; (void)constraints; /* * Allocate the structure. */ if(!st) { st = (ANY_t *)(*sptr = CALLOC(1, specs->struct_size)); if(!st) RETURN(RC_FAIL); } ASN_DEBUG("UPER Decoding ANY type"); st->size = 0; do { ssize_t raw_len; ssize_t len_bytes; ssize_t len_bits; void *p; int ret; /* Get the PER length */ raw_len = uper_get_length(pd, -1, 0, &repeat); if(raw_len < 0) RETURN(RC_WMORE); if(raw_len == 0 && st->buf) break; ASN_DEBUG("Got PER length len %" ASN_PRI_SIZE ", %s (%s)", raw_len, repeat ? "repeat" : "once", td->name); len_bytes = raw_len; len_bits = len_bytes * 8; p = REALLOC(st->buf, st->size + len_bytes + 1); if(!p) RETURN(RC_FAIL); st->buf = (uint8_t *)p; ret = per_get_many_bits(pd, &st->buf[st->size], 0, len_bits); if(ret < 0) RETURN(RC_WMORE); consumed_myself += len_bits; st->size += len_bytes; } while(repeat); st->buf[st->size] = 0; /* nul-terminate */ RETURN(RC_OK); } asn_enc_rval_t ANY_encode_uper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { const ANY_t *st = (const ANY_t *)sptr; asn_enc_rval_t er = {0, 0, 0}; const uint8_t *buf; size_t size; int ret; (void)constraints; if(!st || (!st->buf && st->size)) ASN__ENCODE_FAILED; buf = st->buf; size = st->size; do { int need_eom = 0; ssize_t may_save = uper_put_length(po, size, &need_eom); if(may_save < 0) ASN__ENCODE_FAILED; ret = per_put_many_bits(po, buf, may_save * 8); if(ret) ASN__ENCODE_FAILED; buf += may_save; size -= may_save; assert(!(may_save & 0x07) || !size); if(need_eom && uper_put_length(po, 0, 0)) ASN__ENCODE_FAILED; /* End of Message length */ } while(size); ASN__ENCODED_OK(er); } asn_dec_rval_t ANY_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { const asn_OCTET_STRING_specifics_t *specs = td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics : &asn_SPC_ANY_specs; size_t consumed_myself = 0; int repeat; ANY_t *st = (ANY_t *)*sptr; (void)opt_codec_ctx; (void)constraints; /* * Allocate the structure. */ if(!st) { st = (ANY_t *)(*sptr = CALLOC(1, specs->struct_size)); if(!st) RETURN(RC_FAIL); } ASN_DEBUG("APER Decoding ANY type"); st->size = 0; do { ssize_t raw_len; ssize_t len_bytes; ssize_t len_bits; void *p; int ret; /* Get the PER length */ raw_len = aper_get_length(pd, -1, 0, &repeat); if(raw_len < 0) RETURN(RC_WMORE); if(raw_len == 0 && st->buf) break; ASN_DEBUG("Got PER length len %" ASN_PRI_SIZE ", %s (%s)", raw_len, repeat ? "repeat" : "once", td->name); len_bytes = raw_len; len_bits = len_bytes * 8; p = REALLOC(st->buf, st->size + len_bytes + 1); if(!p) RETURN(RC_FAIL); st->buf = (uint8_t *)p; ret = per_get_many_bits(pd, &st->buf[st->size], 0, len_bits); if(ret < 0) RETURN(RC_WMORE); consumed_myself += len_bits; st->size += len_bytes; } while(repeat); st->buf[st->size] = 0; /* nul-terminate */ RETURN(RC_OK); } asn_enc_rval_t ANY_encode_aper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { const ANY_t *st = (const ANY_t *)sptr; asn_enc_rval_t er = {0, 0, 0}; const uint8_t *buf; size_t size; int ret; (void)constraints; if(!st || (!st->buf && st->size)) ASN__ENCODE_FAILED; buf = st->buf; size = st->size; do { int need_eom = 0; ssize_t may_save = uper_put_length(po, size, &need_eom); if(may_save < 0) ASN__ENCODE_FAILED; ret = per_put_many_bits(po, buf, may_save * 8); if(ret) ASN__ENCODE_FAILED; buf += may_save; size -= may_save; assert(!(may_save & 0x07) || !size); if(need_eom && uper_put_length(po, 0, 0)) ASN__ENCODE_FAILED; /* End of Message length */ } while(size); ASN__ENCODED_OK(er); } #endif /* ASN_DISABLE_PER_SUPPORT */ nextepc-0.3.10/lib/s1ap/asn1c/ANY.h000066400000000000000000000042151333553357400164750ustar00rootroot00000000000000/*- * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef ASN_TYPE_ANY_H #define ASN_TYPE_ANY_H #include /* Implemented via OCTET STRING type */ #ifdef __cplusplus extern "C" { #endif typedef struct ANY { uint8_t *buf; /* BER-encoded ANY contents */ int size; /* Size of the above buffer */ asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */ } ANY_t; extern asn_TYPE_descriptor_t asn_DEF_ANY; extern asn_TYPE_operation_t asn_OP_ANY; extern asn_OCTET_STRING_specifics_t asn_SPC_ANY_specs; asn_struct_free_f ANY_free; asn_struct_print_f ANY_print; ber_type_decoder_f ANY_decode_ber; der_type_encoder_f ANY_encode_der; xer_type_encoder_f ANY_encode_xer; per_type_decoder_f ANY_decode_uper; per_type_encoder_f ANY_encode_uper; per_type_decoder_f ANY_decode_aper; per_type_encoder_f ANY_encode_aper; #define ANY_free OCTET_STRING_free #define ANY_print OCTET_STRING_print #define ANY_compare OCTET_STRING_compare #define ANY_constraint asn_generic_no_constraint #define ANY_decode_ber OCTET_STRING_decode_ber #define ANY_encode_der OCTET_STRING_encode_der #define ANY_decode_xer OCTET_STRING_decode_xer_hex /****************************** * Handy conversion routines. * ******************************/ /* Convert another ASN.1 type into the ANY. This implies DER encoding. */ int ANY_fromType(ANY_t *, asn_TYPE_descriptor_t *td, void *struct_ptr); int ANY_fromType_aper(ANY_t *st, asn_TYPE_descriptor_t *td, void *sptr); ANY_t *ANY_new_fromType(asn_TYPE_descriptor_t *td, void *struct_ptr); ANY_t *ANY_new_fromType_aper(asn_TYPE_descriptor_t *td, void *sptr); /* Convert the contents of the ANY type into the specified type. */ int ANY_to_type(ANY_t *, asn_TYPE_descriptor_t *td, void **struct_ptr); int ANY_to_type_aper(ANY_t *, asn_TYPE_descriptor_t *td, void **struct_ptr); #define ANY_fromBuf(s, buf, size) OCTET_STRING_fromBuf((s), (buf), (size)) #define ANY_new_fromBuf(buf, size) OCTET_STRING_new_fromBuf( \ &asn_DEF_ANY, (buf), (size)) #ifdef __cplusplus } #endif #endif /* ASN_TYPE_ANY_H */ nextepc-0.3.10/lib/s1ap/asn1c/BIT_STRING.c000066400000000000000000000463511333553357400175540ustar00rootroot00000000000000/*- * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include /* * BIT STRING basic type description. */ static const ber_tlv_tag_t asn_DEF_BIT_STRING_tags[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_OCTET_STRING_specifics_t asn_SPC_BIT_STRING_specs = { sizeof(BIT_STRING_t), offsetof(BIT_STRING_t, _asn_ctx), ASN_OSUBV_BIT }; asn_TYPE_operation_t asn_OP_BIT_STRING = { OCTET_STRING_free, /* Implemented in terms of OCTET STRING */ BIT_STRING_print, BIT_STRING_compare, OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ OCTET_STRING_encode_der, /* Implemented in terms of OCTET STRING */ OCTET_STRING_decode_xer_binary, BIT_STRING_encode_xer, #ifdef ASN_DISABLE_OER_SUPPORT 0, 0, #else BIT_STRING_decode_oer, BIT_STRING_encode_oer, #endif /* ASN_DISABLE_OER_SUPPORT */ #ifdef ASN_DISABLE_PER_SUPPORT 0, 0, 0, 0, #else BIT_STRING_decode_uper, /* Unaligned PER decoder */ BIT_STRING_encode_uper, /* Unaligned PER encoder */ OCTET_STRING_decode_aper, /* Aligned PER decoder */ OCTET_STRING_encode_aper, /* Aligned PER encoder */ #endif /* ASN_DISABLE_PER_SUPPORT */ BIT_STRING_random_fill, 0 /* Use generic outmost tag fetcher */ }; asn_TYPE_descriptor_t asn_DEF_BIT_STRING = { "BIT STRING", "BIT_STRING", &asn_OP_BIT_STRING, asn_DEF_BIT_STRING_tags, sizeof(asn_DEF_BIT_STRING_tags) / sizeof(asn_DEF_BIT_STRING_tags[0]), asn_DEF_BIT_STRING_tags, /* Same as above */ sizeof(asn_DEF_BIT_STRING_tags) / sizeof(asn_DEF_BIT_STRING_tags[0]), { 0, 0, BIT_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs }; /* * BIT STRING generic constraint. */ int BIT_STRING_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; if(st && st->buf) { if((st->size == 0 && st->bits_unused) || st->bits_unused < 0 || st->bits_unused > 7) { ASN__CTFAIL(app_key, td, sptr, "%s: invalid padding byte (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } else { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } return 0; } static const char *_bit_pattern[16] = { "0000", "0001", "0010", "0011", "0100", "0101", "0110", "0111", "1000", "1001", "1010", "1011", "1100", "1101", "1110", "1111" }; asn_enc_rval_t BIT_STRING_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, void *app_key) { asn_enc_rval_t er; char scratch[128]; char *p = scratch; char *scend = scratch + (sizeof(scratch) - 10); const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; int xcan = (flags & XER_F_CANONICAL); uint8_t *buf; uint8_t *end; if(!st || !st->buf) ASN__ENCODE_FAILED; er.encoded = 0; buf = st->buf; end = buf + st->size - 1; /* Last byte is special */ /* * Binary dump */ for(; buf < end; buf++) { int v = *buf; int nline = xcan?0:(((buf - st->buf) % 8) == 0); if(p >= scend || nline) { ASN__CALLBACK(scratch, p - scratch); p = scratch; if(nline) ASN__TEXT_INDENT(1, ilevel); } memcpy(p + 0, _bit_pattern[v >> 4], 4); memcpy(p + 4, _bit_pattern[v & 0x0f], 4); p += 8; } if(!xcan && ((buf - st->buf) % 8) == 0) ASN__TEXT_INDENT(1, ilevel); ASN__CALLBACK(scratch, p - scratch); p = scratch; if(buf == end) { int v = *buf; int ubits = st->bits_unused; int i; for(i = 7; i >= ubits; i--) *p++ = (v & (1 << i)) ? 0x31 : 0x30; ASN__CALLBACK(scratch, p - scratch); } if(!xcan) ASN__TEXT_INDENT(1, ilevel - 1); ASN__ENCODED_OK(er); cb_failed: ASN__ENCODE_FAILED; } /* * BIT STRING specific contents printer. */ int BIT_STRING_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { const char * const h2c = "0123456789ABCDEF"; char scratch[64]; const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; uint8_t *buf; uint8_t *end; char *p = scratch; (void)td; /* Unused argument */ if(!st || !st->buf) return (cb("", 8, app_key) < 0) ? -1 : 0; ilevel++; buf = st->buf; end = buf + st->size; /* * Hexadecimal dump. */ for(; buf < end; buf++) { if((buf - st->buf) % 16 == 0 && (st->size > 16) && buf != st->buf) { _i_INDENT(1); /* Dump the string */ if(cb(scratch, p - scratch, app_key) < 0) return -1; p = scratch; } *p++ = h2c[*buf >> 4]; *p++ = h2c[*buf & 0x0F]; *p++ = 0x20; } if(p > scratch) { p--; /* Eat the tailing space */ if((st->size > 16)) { _i_INDENT(1); } /* Dump the incomplete 16-bytes row */ if(cb(scratch, p - scratch, app_key) < 0) return -1; } if(st->bits_unused) { int ret = snprintf(scratch, sizeof(scratch), " (%d bit%s unused)", st->bits_unused, st->bits_unused == 1 ? "" : "s"); assert(ret > 0 && ret < (ssize_t)sizeof(scratch)); if(ret > 0 && ret < (ssize_t)sizeof(scratch) && cb(scratch, ret, app_key) < 0) return -1; } return 0; } /* * Non-destructively remove the trailing 0-bits from the given bit string. */ static const BIT_STRING_t * BIT_STRING__compactify(const BIT_STRING_t *st, BIT_STRING_t *tmp) { const uint8_t *b; union { const uint8_t *c_buf; uint8_t *nc_buf; } unconst; if(st->size == 0) { assert(st->bits_unused == 0); return st; } else { for(b = &st->buf[st->size - 1]; b > st->buf && *b == 0; b--) { ; } /* b points to the last byte which may contain data */ if(*b) { int unused = 7; uint8_t v = *b; v &= -(int8_t)v; if(v & 0x0F) unused -= 4; if(v & 0x33) unused -= 2; if(v & 0x55) unused -= 1; tmp->size = b-st->buf + 1; tmp->bits_unused = unused; } else { tmp->size = b-st->buf; tmp->bits_unused = 0; } assert(b >= st->buf); } unconst.c_buf = st->buf; tmp->buf = unconst.nc_buf; return tmp; } /* * Lexicographically compare the common prefix of both strings, * and if it is the same return -1 for the smallest string. */ int BIT_STRING_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const void *bptr) { /* * Remove information about trailing bits, since * X.680 (08/2015) #22.7 "ensure that different semantics are not" * "associated with [values that differ only in] the trailing 0 bits." */ BIT_STRING_t compact_a, compact_b; const BIT_STRING_t *a = BIT_STRING__compactify(aptr, &compact_a); const BIT_STRING_t *b = BIT_STRING__compactify(bptr, &compact_b); const asn_OCTET_STRING_specifics_t *specs = td->specifics; assert(specs && specs->subvariant == ASN_OSUBV_BIT); if(a && b) { size_t common_prefix_size = a->size <= b->size ? a->size : b->size; int ret = memcmp(a->buf, b->buf, common_prefix_size); if(ret == 0) { /* Figure out which string with equal prefixes is longer. */ if(a->size < b->size) { return -1; } else if(a->size > b->size) { return 1; } else { /* Figure out how many unused bits */ if(a->bits_unused > b->bits_unused) { return -1; } else if(a->bits_unused < b->bits_unused) { return 1; } else { return 0; } } } else { return ret; } } else if(!a && !b) { return 0; } else if(!a) { return -1; } else { return 1; } } #ifndef ASN_DISABLE_PER_SUPPORT #undef RETURN #define RETURN(_code) \ do { \ asn_dec_rval_t tmprval; \ tmprval.code = _code; \ tmprval.consumed = consumed_myself; \ return tmprval; \ } while(0) static asn_per_constraint_t asn_DEF_BIT_STRING_constraint_size = { APC_SEMI_CONSTRAINED, -1, -1, 0, 0}; asn_dec_rval_t BIT_STRING_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { const asn_OCTET_STRING_specifics_t *specs = td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics : &asn_SPC_BIT_STRING_specs; const asn_per_constraints_t *pc = constraints ? constraints : td->encoding_constraints.per_constraints; const asn_per_constraint_t *csiz; asn_dec_rval_t rval = { RC_OK, 0 }; BIT_STRING_t *st = (BIT_STRING_t *)*sptr; ssize_t consumed_myself = 0; int repeat; (void)opt_codec_ctx; if(pc) { csiz = &pc->size; } else { csiz = &asn_DEF_BIT_STRING_constraint_size; } if(specs->subvariant != ASN_OSUBV_BIT) { ASN_DEBUG("Subvariant %d is not BIT OSUBV_BIT", specs->subvariant); RETURN(RC_FAIL); } /* * Allocate the string. */ if(!st) { st = (BIT_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); if(!st) RETURN(RC_FAIL); } ASN_DEBUG("PER Decoding %s size %ld .. %ld bits %d", csiz->flags & APC_EXTENSIBLE ? "extensible" : "non-extensible", csiz->lower_bound, csiz->upper_bound, csiz->effective_bits); if(csiz->flags & APC_EXTENSIBLE) { int inext = per_get_few_bits(pd, 1); if(inext < 0) RETURN(RC_WMORE); if(inext) { csiz = &asn_DEF_BIT_STRING_constraint_size; } } if(csiz->effective_bits >= 0) { FREEMEM(st->buf); st->size = (csiz->upper_bound + 7) >> 3; st->buf = (uint8_t *)MALLOC(st->size + 1); if(!st->buf) { st->size = 0; RETURN(RC_FAIL); } } /* X.691, #16.5: zero-length encoding */ /* X.691, #16.6: short fixed length encoding (up to 2 octets) */ /* X.691, #16.7: long fixed length encoding (up to 64K octets) */ if(csiz->effective_bits == 0) { int ret; ASN_DEBUG("Encoding BIT STRING size %ld", csiz->upper_bound); ret = per_get_many_bits(pd, st->buf, 0, csiz->upper_bound); if(ret < 0) RETURN(RC_WMORE); consumed_myself += csiz->upper_bound; st->buf[st->size] = 0; st->bits_unused = (8 - (csiz->upper_bound & 0x7)) & 0x7; RETURN(RC_OK); } st->size = 0; do { ssize_t raw_len; ssize_t len_bytes; ssize_t len_bits; void *p; int ret; /* Get the PER length */ raw_len = uper_get_length(pd, csiz->effective_bits, csiz->lower_bound, &repeat); if(raw_len < 0) RETURN(RC_WMORE); if(raw_len == 0 && st->buf) break; ASN_DEBUG("Got PER length eb %ld, len %ld, %s (%s)", (long)csiz->effective_bits, (long)raw_len, repeat ? "repeat" : "once", td->name); len_bits = raw_len; len_bytes = (len_bits + 7) >> 3; if(len_bits & 0x7) st->bits_unused = 8 - (len_bits & 0x7); /* len_bits be multiple of 16K if repeat is set */ p = REALLOC(st->buf, st->size + len_bytes + 1); if(!p) RETURN(RC_FAIL); st->buf = (uint8_t *)p; ret = per_get_many_bits(pd, &st->buf[st->size], 0, len_bits); if(ret < 0) RETURN(RC_WMORE); st->size += len_bytes; } while(repeat); st->buf[st->size] = 0; /* nul-terminate */ return rval; } asn_enc_rval_t BIT_STRING_encode_uper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { const asn_OCTET_STRING_specifics_t *specs = td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics : &asn_SPC_BIT_STRING_specs; const asn_per_constraints_t *pc = constraints ? constraints : td->encoding_constraints.per_constraints; const asn_per_constraint_t *csiz; const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; BIT_STRING_t compact_bstr; /* Do not modify this directly! */ asn_enc_rval_t er = { 0, 0, 0 }; int inext = 0; /* Lies not within extension root */ size_t size_in_bits; const uint8_t *buf; int ret; int ct_extensible; if(!st || (!st->buf && st->size)) ASN__ENCODE_FAILED; if(specs->subvariant == ASN_OSUBV_BIT) { if((st->size == 0 && st->bits_unused) || (st->bits_unused & ~7)) ASN__ENCODE_FAILED; } else { ASN__ENCODE_FAILED; } if(pc) { csiz = &pc->size; } else { csiz = &asn_DEF_BIT_STRING_constraint_size; } ct_extensible = csiz->flags & APC_EXTENSIBLE; /* Figure out the size without the trailing bits */ st = BIT_STRING__compactify(st, &compact_bstr); size_in_bits = 8 * st->size - st->bits_unused; ASN_DEBUG( "Encoding %s into %" ASN_PRI_SIZE " bits" " (%ld..%ld, effective %d)%s", td->name, size_in_bits, csiz->lower_bound, csiz->upper_bound, csiz->effective_bits, ct_extensible ? " EXT" : ""); /* Figure out whether size lies within PER visible constraint */ if(csiz->effective_bits >= 0) { if((ssize_t)size_in_bits > csiz->upper_bound) { if(ct_extensible) { csiz = &asn_DEF_BIT_STRING_constraint_size; inext = 1; } else { ASN__ENCODE_FAILED; } } } else { inext = 0; } if(ct_extensible) { /* Declare whether length is [not] within extension root */ if(per_put_few_bits(po, inext, 1)) ASN__ENCODE_FAILED; } if(csiz->effective_bits >= 0 && !inext) { int add_trailer = (ssize_t)size_in_bits < csiz->lower_bound; ASN_DEBUG( "Encoding %" ASN_PRI_SIZE " bytes (%ld), length (in %d bits) trailer %d; actual " "value %" ASN_PRI_SSIZE "", st->size, size_in_bits - csiz->lower_bound, csiz->effective_bits, add_trailer, add_trailer ? 0 : (ssize_t)size_in_bits - csiz->lower_bound); ret = per_put_few_bits( po, add_trailer ? 0 : (ssize_t)size_in_bits - csiz->lower_bound, csiz->effective_bits); if(ret) ASN__ENCODE_FAILED; ret = per_put_many_bits(po, st->buf, size_in_bits); if(ret) ASN__ENCODE_FAILED; if(add_trailer) { static const uint8_t zeros[16]; size_t trailing_zero_bits = csiz->lower_bound - size_in_bits; while(trailing_zero_bits > 0) { if(trailing_zero_bits > 8 * sizeof(zeros)) { ret = per_put_many_bits(po, zeros, 8 * sizeof(zeros)); trailing_zero_bits -= 8 * sizeof(zeros); } else { ret = per_put_many_bits(po, zeros, trailing_zero_bits); trailing_zero_bits = 0; } if(ret) ASN__ENCODE_FAILED; } } ASN__ENCODED_OK(er); } ASN_DEBUG("Encoding %" ASN_PRI_SIZE " bytes", st->size); buf = st->buf; do { int need_eom = 0; ssize_t maySave = uper_put_length(po, size_in_bits, &need_eom); if(maySave < 0) ASN__ENCODE_FAILED; ASN_DEBUG("Encoding %" ASN_PRI_SSIZE " of %" ASN_PRI_SIZE "", maySave, size_in_bits); ret = per_put_many_bits(po, buf, maySave); if(ret) ASN__ENCODE_FAILED; buf += maySave >> 3; size_in_bits -= maySave; assert(!(maySave & 0x07) || !size_in_bits); if(need_eom && uper_put_length(po, 0, 0)) ASN__ENCODE_FAILED; /* End of Message length */ } while(size_in_bits); ASN__ENCODED_OK(er); } #endif /* ASN_DISABLE_PER_SUPPORT */ asn_random_fill_result_t BIT_STRING_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, const asn_encoding_constraints_t *constraints, size_t max_length) { const asn_OCTET_STRING_specifics_t *specs = td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics : &asn_SPC_BIT_STRING_specs; asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; static unsigned lengths[] = {0, 1, 2, 3, 4, 8, 126, 127, 128, 16383, 16384, 16385, 65534, 65535, 65536, 65537}; uint8_t *buf; uint8_t *bend; uint8_t *b; size_t rnd_bits, rnd_len; BIT_STRING_t *st; if(max_length == 0) return result_skipped; switch(specs->subvariant) { case ASN_OSUBV_ANY: return result_failed; case ASN_OSUBV_BIT: break; default: break; } /* Figure out how far we should go */ rnd_bits = lengths[asn_random_between( 0, sizeof(lengths) / sizeof(lengths[0]) - 1)]; if(!constraints || !constraints->per_constraints) constraints = &td->encoding_constraints; if(constraints->per_constraints) { const asn_per_constraint_t *pc = &constraints->per_constraints->size; if(pc->flags & APC_CONSTRAINED) { long suggested_upper_bound = pc->upper_bound < (ssize_t)max_length ? pc->upper_bound : (ssize_t)max_length; if(max_length < (size_t)pc->lower_bound) { return result_skipped; } if(pc->flags & APC_EXTENSIBLE) { switch(asn_random_between(0, 5)) { case 0: if(pc->lower_bound > 0) { rnd_bits = pc->lower_bound - 1; break; } /* Fall through */ case 1: rnd_bits = pc->upper_bound + 1; break; case 2: /* Keep rnd_bits from the table */ if(rnd_bits < max_length) { break; } /* Fall through */ default: rnd_bits = asn_random_between(pc->lower_bound, suggested_upper_bound); } } else { rnd_bits = asn_random_between(pc->lower_bound, suggested_upper_bound); } } else { rnd_bits = asn_random_between(0, max_length - 1); } } else if(rnd_bits >= max_length) { rnd_bits = asn_random_between(0, max_length - 1); } rnd_len = (rnd_bits + 7) / 8; buf = CALLOC(1, rnd_len + 1); if(!buf) return result_failed; bend = &buf[rnd_len]; for(b = buf; b < bend; b++) { *(uint8_t *)b = asn_random_between(0, 255); } *b = 0; /* Zero-terminate just in case. */ if(*sptr) { st = *sptr; FREEMEM(st->buf); } else { st = (BIT_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); if(!st) { FREEMEM(buf); return result_failed; } } st->buf = buf; st->size = rnd_len; st->bits_unused = (8 - (rnd_bits & 0x7)) & 0x7; if(st->bits_unused) { assert(st->size > 0); st->buf[st->size-1] &= 0xff << st->bits_unused; } result_ok.length = st->size; return result_ok; } nextepc-0.3.10/lib/s1ap/asn1c/BIT_STRING.h000066400000000000000000000030351333553357400175510ustar00rootroot00000000000000/*- * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _BIT_STRING_H_ #define _BIT_STRING_H_ #include /* Some help from OCTET STRING */ #ifdef __cplusplus extern "C" { #endif typedef struct BIT_STRING_s { uint8_t *buf; /* BIT STRING body */ size_t size; /* Size of the above buffer */ int bits_unused;/* Unused trailing bits in the last octet (0..7) */ asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */ } BIT_STRING_t; extern asn_TYPE_descriptor_t asn_DEF_BIT_STRING; extern asn_TYPE_operation_t asn_OP_BIT_STRING; extern asn_OCTET_STRING_specifics_t asn_SPC_BIT_STRING_specs; asn_struct_print_f BIT_STRING_print; /* Human-readable output */ asn_struct_compare_f BIT_STRING_compare; asn_constr_check_f BIT_STRING_constraint; xer_type_encoder_f BIT_STRING_encode_xer; oer_type_decoder_f BIT_STRING_decode_oer; oer_type_encoder_f BIT_STRING_encode_oer; per_type_decoder_f BIT_STRING_decode_uper; per_type_encoder_f BIT_STRING_encode_uper; asn_random_fill_f BIT_STRING_random_fill; #define BIT_STRING_free OCTET_STRING_free #define BIT_STRING_decode_ber OCTET_STRING_decode_ber #define BIT_STRING_encode_der OCTET_STRING_encode_der #define BIT_STRING_decode_xer OCTET_STRING_decode_xer_binary #define BIT_STRING_decode_aper OCTET_STRING_decode_aper #define BIT_STRING_encode_aper OCTET_STRING_encode_aper #ifdef __cplusplus } #endif #endif /* _BIT_STRING_H_ */ nextepc-0.3.10/lib/s1ap/asn1c/BIT_STRING_oer.c000066400000000000000000000122751333553357400204170ustar00rootroot00000000000000/* * Copyright (c) 2017 Lev Walkin . * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef ASN_DISABLE_OER_SUPPORT #include #include #include asn_dec_rval_t BIT_STRING_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_oer_constraints_t *constraints, void **sptr, const void *ptr, size_t size) { BIT_STRING_t *st = (BIT_STRING_t *)*sptr; const asn_oer_constraints_t *cts = constraints ? constraints : td->encoding_constraints.oer_constraints; ssize_t ct_size = cts ? cts->size : -1; asn_dec_rval_t rval = {RC_OK, 0}; size_t expected_length = 0; (void)opt_codec_ctx; if(!st) { st = (BIT_STRING_t *)(*sptr = CALLOC(1, sizeof(*st))); if(!st) ASN__DECODE_FAILED; } if(ct_size >= 0) { expected_length = (ct_size + 7) >> 3; st->bits_unused = (8 - (ct_size & 7)) & 7; } else { /* * X.696 (08/2015) #13.3.1 * Encode length determinant as _number of octets_, but only * if upper bound is not equal to lower bound. */ ssize_t len_len = oer_fetch_length(ptr, size, &expected_length); if(len_len > 0) { ptr = (const char *)ptr + len_len; size -= len_len; } else if(len_len == 0) { ASN__DECODE_STARVED; } else if(len_len < 0) { ASN__DECODE_FAILED; } if(expected_length < 1) { ASN__DECODE_FAILED; } else if(expected_length > size) { ASN__DECODE_STARVED; } st->bits_unused = ((const uint8_t *)ptr)[0]; if(st->bits_unused & ~7) { ASN_DEBUG("%s: unused bits outside of 0..7 range", td->name); ASN__DECODE_FAILED; } ptr = (const char *)ptr + 1; size--; expected_length--; rval.consumed = len_len + 1; } if(size < expected_length) { ASN__DECODE_STARVED; } else { uint8_t *buf = MALLOC(expected_length + 1); if(buf == NULL) { ASN__DECODE_FAILED; } else { memcpy(buf, ptr, expected_length); buf[expected_length] = '\0'; } FREEMEM(st->buf); st->buf = buf; st->size = expected_length; if(expected_length > 0) { buf[expected_length - 1] &= (0xff << st->bits_unused); } rval.consumed += expected_length; return rval; } } /* * Encode as Canonical OER. */ asn_enc_rval_t BIT_STRING_encode_oer(const asn_TYPE_descriptor_t *td, const asn_oer_constraints_t *constraints, const void *sptr, asn_app_consume_bytes_f *cb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; asn_enc_rval_t erval = {0, 0, 0}; const asn_oer_constraints_t *cts = constraints ? constraints : td->encoding_constraints.oer_constraints; ssize_t ct_size = cts ? cts->size : -1; size_t trailing_zeros = 0; int fix_last_byte = 0; if(!st) ASN__ENCODE_FAILED; if(st->bits_unused & ~7) { ASN_DEBUG("BIT STRING unused bits %d out of 0..7 range", st->bits_unused); ASN__ENCODE_FAILED; } if(st->bits_unused && !(st->size && st->buf)) { ASN_DEBUG("BIT STRING %s size 0 can't support unused bits %d", td->name, st->bits_unused); ASN__ENCODE_FAILED; } if(ct_size >= 0) { size_t ct_bytes = (ct_size + 7) >> 3; if(st->size > ct_bytes) { ASN_DEBUG("More bits in BIT STRING %s (%" ASN_PRI_SSIZE ") than constrained %" ASN_PRI_SSIZE "", td->name, 8 * st->size - st->bits_unused, ct_size); ASN__ENCODE_FAILED; } trailing_zeros = ct_bytes - st->size; /* Allow larger constraint */ } else { uint8_t ub = st->bits_unused & 7; ssize_t len_len = oer_serialize_length(1 + st->size, cb, app_key); if(len_len < 0) ASN__ENCODE_FAILED; if(cb(&ub, 1, app_key) < 0) { ASN__ENCODE_FAILED; } erval.encoded += len_len + 1; } if(st->bits_unused) { if(st->buf[st->size - 1] & (0xff << st->bits_unused)) { fix_last_byte = 1; } } if(cb(st->buf, st->size - fix_last_byte, app_key) < 0) { ASN__ENCODE_FAILED; } if(fix_last_byte) { uint8_t b = st->buf[st->size - 1] & (0xff << st->bits_unused); if(cb(&b, 1, app_key) < 0) { ASN__ENCODE_FAILED; } } erval.encoded += st->size; if(trailing_zeros) { static uint8_t zeros[16]; while(trailing_zeros > 0) { int ret; if(trailing_zeros < sizeof(zeros)) { ret = cb(zeros, trailing_zeros, app_key); erval.encoded += trailing_zeros; } else { ret = cb(zeros, sizeof(zeros), app_key); erval.encoded += sizeof(zeros); } if(ret < 0) ASN__ENCODE_FAILED; } } return erval; } #endif /* ASN_DISABLE_OER_SUPPORT */ nextepc-0.3.10/lib/s1ap/asn1c/BOOLEAN.c000066400000000000000000000265411333553357400171260ustar00rootroot00000000000000/*- * Copyright (c) 2003, 2005 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include /* * BOOLEAN basic type description. */ static const ber_tlv_tag_t asn_DEF_BOOLEAN_tags[] = { (ASN_TAG_CLASS_UNIVERSAL | (1 << 2)) }; asn_TYPE_operation_t asn_OP_BOOLEAN = { BOOLEAN_free, BOOLEAN_print, BOOLEAN_compare, BOOLEAN_decode_ber, BOOLEAN_encode_der, BOOLEAN_decode_xer, BOOLEAN_encode_xer, #ifdef ASN_DISABLE_OER_SUPPORT 0, 0, #else BOOLEAN_decode_oer, BOOLEAN_encode_oer, #endif /* ASN_DISABLE_OER_SUPPORT */ #ifdef ASN_DISABLE_PER_SUPPORT 0, 0, 0, 0, #else BOOLEAN_decode_uper, /* Unaligned PER decoder */ BOOLEAN_encode_uper, /* Unaligned PER encoder */ BOOLEAN_decode_aper, /* Aligned PER decoder */ BOOLEAN_encode_aper, /* Aligned PER encoder */ #endif /* ASN_DISABLE_PER_SUPPORT */ BOOLEAN_random_fill, 0 /* Use generic outmost tag fetcher */ }; asn_TYPE_descriptor_t asn_DEF_BOOLEAN = { "BOOLEAN", "BOOLEAN", &asn_OP_BOOLEAN, asn_DEF_BOOLEAN_tags, sizeof(asn_DEF_BOOLEAN_tags) / sizeof(asn_DEF_BOOLEAN_tags[0]), asn_DEF_BOOLEAN_tags, /* Same as above */ sizeof(asn_DEF_BOOLEAN_tags) / sizeof(asn_DEF_BOOLEAN_tags[0]), { 0, 0, asn_generic_no_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; /* * Decode BOOLEAN type. */ asn_dec_rval_t BOOLEAN_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **bool_value, const void *buf_ptr, size_t size, int tag_mode) { BOOLEAN_t *st = (BOOLEAN_t *)*bool_value; asn_dec_rval_t rval; ber_tlv_len_t length; ber_tlv_len_t lidx; if(st == NULL) { st = (BOOLEAN_t *)(*bool_value = CALLOC(1, sizeof(*st))); if(st == NULL) { rval.code = RC_FAIL; rval.consumed = 0; return rval; } } ASN_DEBUG("Decoding %s as BOOLEAN (tm=%d)", td->name, tag_mode); /* * Check tags. */ rval = ber_check_tags(opt_codec_ctx, td, 0, buf_ptr, size, tag_mode, 0, &length, 0); if(rval.code != RC_OK) return rval; ASN_DEBUG("Boolean length is %d bytes", (int)length); buf_ptr = ((const char *)buf_ptr) + rval.consumed; size -= rval.consumed; if(length > (ber_tlv_len_t)size) { rval.code = RC_WMORE; rval.consumed = 0; return rval; } /* * Compute boolean value. */ for(*st = 0, lidx = 0; (lidx < length) && *st == 0; lidx++) { /* * Very simple approach: read bytes until the end or * value is already TRUE. * BOOLEAN is not supposed to contain meaningful data anyway. */ *st |= ((const uint8_t *)buf_ptr)[lidx]; } rval.code = RC_OK; rval.consumed += length; ASN_DEBUG("Took %ld/%ld bytes to encode %s, value=%d", (long)rval.consumed, (long)length, td->name, *st); return rval; } asn_enc_rval_t BOOLEAN_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key) { asn_enc_rval_t erval; const BOOLEAN_t *st = (const BOOLEAN_t *)sptr; erval.encoded = der_write_tags(td, 1, tag_mode, 0, tag, cb, app_key); if(erval.encoded == -1) { erval.failed_type = td; erval.structure_ptr = sptr; return erval; } if(cb) { uint8_t bool_value; bool_value = *st ? 0xff : 0; /* 0xff mandated by DER */ if(cb(&bool_value, 1, app_key) < 0) { erval.encoded = -1; erval.failed_type = td; erval.structure_ptr = sptr; return erval; } } erval.encoded += 1; ASN__ENCODED_OK(erval); } /* * Decode the chunk of XML text encoding INTEGER. */ static enum xer_pbd_rval BOOLEAN__xer_body_decode(const asn_TYPE_descriptor_t *td, void *sptr, const void *chunk_buf, size_t chunk_size) { BOOLEAN_t *st = (BOOLEAN_t *)sptr; const char *p = (const char *)chunk_buf; (void)td; if(chunk_size && p[0] == 0x3c /* '<' */) { switch(xer_check_tag(chunk_buf, chunk_size, "false")) { case XCT_BOTH: /* "" */ *st = 0; break; case XCT_UNKNOWN_BO: if(xer_check_tag(chunk_buf, chunk_size, "true") != XCT_BOTH) return XPBD_BROKEN_ENCODING; /* "" */ *st = 1; /* Or 0xff as in DER?.. */ break; default: return XPBD_BROKEN_ENCODING; } return XPBD_BODY_CONSUMED; } else { return XPBD_BROKEN_ENCODING; } } asn_dec_rval_t BOOLEAN_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **sptr, const char *opt_mname, const void *buf_ptr, size_t size) { return xer_decode_primitive(opt_codec_ctx, td, sptr, sizeof(BOOLEAN_t), opt_mname, buf_ptr, size, BOOLEAN__xer_body_decode); } asn_enc_rval_t BOOLEAN_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, void *app_key) { const BOOLEAN_t *st = (const BOOLEAN_t *)sptr; asn_enc_rval_t er = {0, 0, 0}; (void)ilevel; (void)flags; if(!st) ASN__ENCODE_FAILED; if(*st) { ASN__CALLBACK("", 7); } else { ASN__CALLBACK("", 8); } ASN__ENCODED_OK(er); cb_failed: ASN__ENCODE_FAILED; } int BOOLEAN_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { const BOOLEAN_t *st = (const BOOLEAN_t *)sptr; const char *buf; size_t buflen; (void)td; /* Unused argument */ (void)ilevel; /* Unused argument */ if(st) { if(*st) { buf = "TRUE"; buflen = 4; } else { buf = "FALSE"; buflen = 5; } } else { buf = ""; buflen = 8; } return (cb(buf, buflen, app_key) < 0) ? -1 : 0; } void BOOLEAN_free(const asn_TYPE_descriptor_t *td, void *ptr, enum asn_struct_free_method method) { if(td && ptr) { switch(method) { case ASFM_FREE_EVERYTHING: FREEMEM(ptr); break; case ASFM_FREE_UNDERLYING: break; case ASFM_FREE_UNDERLYING_AND_RESET: memset(ptr, 0, sizeof(BOOLEAN_t)); break; } } } #ifndef ASN_DISABLE_PER_SUPPORT asn_dec_rval_t BOOLEAN_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { asn_dec_rval_t rv; BOOLEAN_t *st = (BOOLEAN_t *)*sptr; (void)opt_codec_ctx; (void)td; (void)constraints; if(!st) { st = (BOOLEAN_t *)(*sptr = MALLOC(sizeof(*st))); if(!st) ASN__DECODE_FAILED; } /* * Extract a single bit */ switch(per_get_few_bits(pd, 1)) { case 1: *st = 1; break; case 0: *st = 0; break; case -1: default: ASN__DECODE_STARVED; } ASN_DEBUG("%s decoded as %s", td->name, *st ? "TRUE" : "FALSE"); rv.code = RC_OK; rv.consumed = 1; return rv; } asn_enc_rval_t BOOLEAN_encode_uper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { const BOOLEAN_t *st = (const BOOLEAN_t *)sptr; asn_enc_rval_t er = { 0, 0, 0 }; (void)constraints; if(!st) ASN__ENCODE_FAILED; if(per_put_few_bits(po, *st ? 1 : 0, 1)) ASN__ENCODE_FAILED; ASN__ENCODED_OK(er); } asn_dec_rval_t BOOLEAN_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { asn_dec_rval_t rv; BOOLEAN_t *st = (BOOLEAN_t *)*sptr; (void)opt_codec_ctx; (void)constraints; (void)td; if(!st) { st = (BOOLEAN_t *)(*sptr = MALLOC(sizeof(*st))); if(!st) ASN__DECODE_FAILED; } /* * Extract a single bit */ switch(per_get_few_bits(pd, 1)) { case 1: *st = 1; break; case 0: *st = 0; break; case -1: default: ASN__DECODE_STARVED; } ASN_DEBUG("%s decoded as %s", td->name, *st ? "TRUE" : "FALSE"); rv.code = RC_OK; rv.consumed = 1; return rv; } asn_enc_rval_t BOOLEAN_encode_aper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { const BOOLEAN_t *st = (const BOOLEAN_t *)sptr; asn_enc_rval_t er = { 0, 0, 0 }; (void)constraints; if(!st) ASN__ENCODE_FAILED; if(per_put_few_bits(po, *st ? 1 : 0, 1)) ASN__ENCODE_FAILED; ASN__ENCODED_OK(er); } #endif /* ASN_DISABLE_PER_SUPPORT */ #ifndef ASN_DISABLE_OER_SUPPORT /* * Encode as Canonical OER. */ asn_enc_rval_t BOOLEAN_encode_oer(const asn_TYPE_descriptor_t *td, const asn_oer_constraints_t *constraints, const void *sptr, asn_app_consume_bytes_f *cb, void *app_key) { asn_enc_rval_t er = { 1, 0, 0 }; const BOOLEAN_t *st = sptr; uint8_t bool_value = *st ? 0xff : 0; /* 0xff mandated by OER */ (void)td; (void)constraints; /* Constraints are unused in OER */ if(cb(&bool_value, 1, app_key) < 0) { ASN__ENCODE_FAILED; } else { ASN__ENCODED_OK(er); } } asn_dec_rval_t BOOLEAN_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_oer_constraints_t *constraints, void **sptr, const void *ptr, size_t size) { asn_dec_rval_t ok = {RC_OK, 1}; BOOLEAN_t *st; (void)opt_codec_ctx; (void)td; (void)constraints; /* Constraints are unused in OER */ if(size < 1) { ASN__DECODE_STARVED; } if(!(st = *sptr)) { st = (BOOLEAN_t *)(*sptr = CALLOC(1, sizeof(*st))); if(!st) ASN__DECODE_FAILED; } *st = *(const uint8_t *)ptr; return ok; } #endif int BOOLEAN_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const void *bptr) { const BOOLEAN_t *a = aptr; const BOOLEAN_t *b = bptr; (void)td; if(a && b) { if(!*a == !*b) { /* TRUE can be encoded by any non-zero byte. */ return 0; } else if(!*a) { return -1; } else { return 1; } } else if(!a) { return -1; } else { return 1; } } asn_random_fill_result_t BOOLEAN_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, const asn_encoding_constraints_t *constraints, size_t max_length) { asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; BOOLEAN_t *st = *sptr; if(max_length == 0) return result_skipped; if(st == NULL) { st = (BOOLEAN_t *)(*sptr = CALLOC(1, sizeof(*st))); if(st == NULL) { return result_failed; } } if(!constraints || !constraints->per_constraints) constraints = &td->encoding_constraints; if(constraints->per_constraints) { const asn_per_constraint_t *pc = &constraints->per_constraints->value; if(pc->flags & APC_CONSTRAINED) { *st = asn_random_between(pc->lower_bound, pc->upper_bound); return result_ok; } } /* Simulate booleans that are sloppily set and biased. */ switch(asn_random_between(0, 7)) { case 0: case 1: case 2: *st = 0; break; case 3: *st = -1; break; case 4: *st = 1; break; case 5: *st = INT_MIN; break; case 6: *st = INT_MAX; break; default: *st = asn_random_between(INT_MIN, INT_MAX); break; } return result_ok; } nextepc-0.3.10/lib/s1ap/asn1c/BOOLEAN.h000066400000000000000000000023221333553357400171220ustar00rootroot00000000000000/*- * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _BOOLEAN_H_ #define _BOOLEAN_H_ #include #ifdef __cplusplus extern "C" { #endif /* * The underlying integer may contain various values, but everything * non-zero is capped to 0xff by the DER encoder. The BER decoder may * yield non-zero values different from 1, beware. */ typedef int BOOLEAN_t; extern asn_TYPE_descriptor_t asn_DEF_BOOLEAN; extern asn_TYPE_operation_t asn_OP_BOOLEAN; asn_struct_free_f BOOLEAN_free; asn_struct_print_f BOOLEAN_print; asn_struct_compare_f BOOLEAN_compare; ber_type_decoder_f BOOLEAN_decode_ber; der_type_encoder_f BOOLEAN_encode_der; oer_type_decoder_f BOOLEAN_decode_oer; oer_type_encoder_f BOOLEAN_encode_oer; per_type_decoder_f BOOLEAN_decode_uper; per_type_encoder_f BOOLEAN_encode_uper; per_type_decoder_f BOOLEAN_decode_aper; per_type_encoder_f BOOLEAN_encode_aper; xer_type_decoder_f BOOLEAN_decode_xer; xer_type_encoder_f BOOLEAN_encode_xer; asn_random_fill_f BOOLEAN_random_fill; #define BOOLEAN_constraint asn_generic_no_constraint #ifdef __cplusplus } #endif #endif /* _BOOLEAN_H_ */ nextepc-0.3.10/lib/s1ap/asn1c/INTEGER.c000066400000000000000000001303661333553357400171450ustar00rootroot00000000000000/*- * Copyright (c) 2003-2014 Lev Walkin . * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include /* Encoder and decoder of a primitive type */ #include /* * INTEGER basic type description. */ static const ber_tlv_tag_t asn_DEF_INTEGER_tags[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_operation_t asn_OP_INTEGER = { INTEGER_free, INTEGER_print, INTEGER_compare, ber_decode_primitive, INTEGER_encode_der, INTEGER_decode_xer, INTEGER_encode_xer, #ifdef ASN_DISABLE_OER_SUPPORT 0, 0, #else INTEGER_decode_oer, /* OER decoder */ INTEGER_encode_oer, /* Canonical OER encoder */ #endif /* ASN_DISABLE_OER_SUPPORT */ #ifdef ASN_DISABLE_PER_SUPPORT 0, 0, 0, 0, #else INTEGER_decode_uper, /* Unaligned PER decoder */ INTEGER_encode_uper, /* Unaligned PER encoder */ INTEGER_decode_aper, /* Aligned PER decoder */ INTEGER_encode_aper, /* Aligned PER encoder */ #endif /* ASN_DISABLE_PER_SUPPORT */ INTEGER_random_fill, 0 /* Use generic outmost tag fetcher */ }; asn_TYPE_descriptor_t asn_DEF_INTEGER = { "INTEGER", "INTEGER", &asn_OP_INTEGER, asn_DEF_INTEGER_tags, sizeof(asn_DEF_INTEGER_tags) / sizeof(asn_DEF_INTEGER_tags[0]), asn_DEF_INTEGER_tags, /* Same as above */ sizeof(asn_DEF_INTEGER_tags) / sizeof(asn_DEF_INTEGER_tags[0]), { 0, 0, asn_generic_no_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; /* * Encode INTEGER type using DER. */ asn_enc_rval_t INTEGER_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key) { const INTEGER_t *st = (const INTEGER_t *)sptr; asn_enc_rval_t rval; INTEGER_t effective_integer; ASN_DEBUG("%s %s as INTEGER (tm=%d)", cb?"Encoding":"Estimating", td->name, tag_mode); /* * Canonicalize integer in the buffer. * (Remove too long sign extension, remove some first 0x00 bytes) */ if(st->buf) { uint8_t *buf = st->buf; uint8_t *end1 = buf + st->size - 1; int shift; /* Compute the number of superfluous leading bytes */ for(; buf < end1; buf++) { /* * If the contents octets of an integer value encoding * consist of more than one octet, then the bits of the * first octet and bit 8 of the second octet: * a) shall not all be ones; and * b) shall not all be zero. */ switch(*buf) { case 0x00: if((buf[1] & 0x80) == 0) continue; break; case 0xff: if((buf[1] & 0x80)) continue; break; } break; } /* Remove leading superfluous bytes from the integer */ shift = buf - st->buf; if(shift) { union { const uint8_t *c_buf; uint8_t *nc_buf; } unconst; unconst.c_buf = st->buf; effective_integer.buf = unconst.nc_buf + shift; effective_integer.size = st->size - shift; st = &effective_integer; } } rval = der_encode_primitive(td, st, tag_mode, tag, cb, app_key); if(rval.structure_ptr == &effective_integer) { rval.structure_ptr = sptr; } return rval; } static const asn_INTEGER_enum_map_t *INTEGER_map_enum2value( const asn_INTEGER_specifics_t *specs, const char *lstart, const char *lstop); /* * INTEGER specific human-readable output. */ static ssize_t INTEGER__dump(const asn_TYPE_descriptor_t *td, const INTEGER_t *st, asn_app_consume_bytes_f *cb, void *app_key, int plainOrXER) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; char scratch[32]; uint8_t *buf = st->buf; uint8_t *buf_end = st->buf + st->size; intmax_t value; ssize_t wrote = 0; char *p; int ret; if(specs && specs->field_unsigned) ret = asn_INTEGER2umax(st, (uintmax_t *)&value); else ret = asn_INTEGER2imax(st, &value); /* Simple case: the integer size is small */ if(ret == 0) { const asn_INTEGER_enum_map_t *el; el = (value >= 0 || !specs || !specs->field_unsigned) ? INTEGER_map_value2enum(specs, value) : 0; if(el) { if(plainOrXER == 0) return asn__format_to_callback(cb, app_key, "%" ASN_PRIdMAX " (%s)", value, el->enum_name); else return asn__format_to_callback(cb, app_key, "<%s/>", el->enum_name); } else if(plainOrXER && specs && specs->strict_enumeration) { ASN_DEBUG("ASN.1 forbids dealing with " "unknown value of ENUMERATED type"); errno = EPERM; return -1; } else { return asn__format_to_callback(cb, app_key, (specs && specs->field_unsigned) ? "%" ASN_PRIuMAX : "%" ASN_PRIdMAX, value); } } else if(plainOrXER && specs && specs->strict_enumeration) { /* * Here and earlier, we cannot encode the ENUMERATED values * if there is no corresponding identifier. */ ASN_DEBUG("ASN.1 forbids dealing with " "unknown value of ENUMERATED type"); errno = EPERM; return -1; } /* Output in the long xx:yy:zz... format */ /* TODO: replace with generic algorithm (Knuth TAOCP Vol 2, 4.3.1) */ for(p = scratch; buf < buf_end; buf++) { const char * const h2c = "0123456789ABCDEF"; if((p - scratch) >= (ssize_t)(sizeof(scratch) - 4)) { /* Flush buffer */ if(cb(scratch, p - scratch, app_key) < 0) return -1; wrote += p - scratch; p = scratch; } *p++ = h2c[*buf >> 4]; *p++ = h2c[*buf & 0x0F]; *p++ = 0x3a; /* ":" */ } if(p != scratch) p--; /* Remove the last ":" */ wrote += p - scratch; return (cb(scratch, p - scratch, app_key) < 0) ? -1 : wrote; } /* * INTEGER specific human-readable output. */ int INTEGER_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { const INTEGER_t *st = (const INTEGER_t *)sptr; ssize_t ret; (void)ilevel; if(!st || !st->buf) ret = cb("", 8, app_key); else ret = INTEGER__dump(td, st, cb, app_key, 0); return (ret < 0) ? -1 : 0; } struct e2v_key { const char *start; const char *stop; const asn_INTEGER_enum_map_t *vemap; const unsigned int *evmap; }; static int INTEGER__compar_enum2value(const void *kp, const void *am) { const struct e2v_key *key = (const struct e2v_key *)kp; const asn_INTEGER_enum_map_t *el = (const asn_INTEGER_enum_map_t *)am; const char *ptr, *end, *name; /* Remap the element (sort by different criterion) */ el = key->vemap + key->evmap[el - key->vemap]; /* Compare strings */ for(ptr = key->start, end = key->stop, name = el->enum_name; ptr < end; ptr++, name++) { if(*ptr != *name || !*name) return *(const unsigned char *)ptr - *(const unsigned char *)name; } return name[0] ? -1 : 0; } static const asn_INTEGER_enum_map_t * INTEGER_map_enum2value(const asn_INTEGER_specifics_t *specs, const char *lstart, const char *lstop) { const asn_INTEGER_enum_map_t *el_found; int count = specs ? specs->map_count : 0; struct e2v_key key; const char *lp; if(!count) return NULL; /* Guaranteed: assert(lstart < lstop); */ /* Figure out the tag name */ for(lstart++, lp = lstart; lp < lstop; lp++) { switch(*lp) { case 9: case 10: case 11: case 12: case 13: case 32: /* WSP */ case 0x2f: /* '/' */ case 0x3e: /* '>' */ break; default: continue; } break; } if(lp == lstop) return NULL; /* No tag found */ lstop = lp; key.start = lstart; key.stop = lstop; key.vemap = specs->value2enum; key.evmap = specs->enum2value; el_found = (asn_INTEGER_enum_map_t *)bsearch(&key, specs->value2enum, count, sizeof(specs->value2enum[0]), INTEGER__compar_enum2value); if(el_found) { /* Remap enum2value into value2enum */ el_found = key.vemap + key.evmap[el_found - key.vemap]; } return el_found; } static int INTEGER__compar_value2enum(const void *kp, const void *am) { long a = *(const long *)kp; const asn_INTEGER_enum_map_t *el = (const asn_INTEGER_enum_map_t *)am; long b = el->nat_value; if(a < b) return -1; else if(a == b) return 0; else return 1; } const asn_INTEGER_enum_map_t * INTEGER_map_value2enum(const asn_INTEGER_specifics_t *specs, long value) { int count = specs ? specs->map_count : 0; if(!count) return 0; return (asn_INTEGER_enum_map_t *)bsearch(&value, specs->value2enum, count, sizeof(specs->value2enum[0]), INTEGER__compar_value2enum); } static int INTEGER_st_prealloc(INTEGER_t *st, int min_size) { void *p = MALLOC(min_size + 1); if(p) { void *b = st->buf; st->size = 0; st->buf = p; FREEMEM(b); return 0; } else { return -1; } } /* * Decode the chunk of XML text encoding INTEGER. */ static enum xer_pbd_rval INTEGER__xer_body_decode(const asn_TYPE_descriptor_t *td, void *sptr, const void *chunk_buf, size_t chunk_size) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; INTEGER_t *st = (INTEGER_t *)sptr; intmax_t dec_value; intmax_t hex_value = 0; const char *lp; const char *lstart = (const char *)chunk_buf; const char *lstop = lstart + chunk_size; enum { ST_LEADSPACE, ST_SKIPSPHEX, ST_WAITDIGITS, ST_DIGITS, ST_DIGITS_TRAILSPACE, ST_HEXDIGIT1, ST_HEXDIGIT2, ST_HEXDIGITS_TRAILSPACE, ST_HEXCOLON, ST_END_ENUM, ST_UNEXPECTED } state = ST_LEADSPACE; const char *dec_value_start = 0; /* INVARIANT: always !0 in ST_DIGITS */ const char *dec_value_end = 0; if(chunk_size) ASN_DEBUG("INTEGER body %ld 0x%2x..0x%2x", (long)chunk_size, *lstart, lstop[-1]); if(INTEGER_st_prealloc(st, (chunk_size/3) + 1)) return XPBD_SYSTEM_FAILURE; /* * We may have received a tag here. It will be processed inline. * Use strtoul()-like code and serialize the result. */ for(lp = lstart; lp < lstop; lp++) { int lv = *lp; switch(lv) { case 0x09: case 0x0a: case 0x0d: case 0x20: switch(state) { case ST_LEADSPACE: case ST_DIGITS_TRAILSPACE: case ST_HEXDIGITS_TRAILSPACE: case ST_SKIPSPHEX: continue; case ST_DIGITS: dec_value_end = lp; state = ST_DIGITS_TRAILSPACE; continue; case ST_HEXCOLON: state = ST_HEXDIGITS_TRAILSPACE; continue; default: break; } break; case 0x2d: /* '-' */ if(state == ST_LEADSPACE) { dec_value = 0; dec_value_start = lp; state = ST_WAITDIGITS; continue; } break; case 0x2b: /* '+' */ if(state == ST_LEADSPACE) { dec_value = 0; dec_value_start = lp; state = ST_WAITDIGITS; continue; } break; case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: switch(state) { case ST_DIGITS: continue; case ST_SKIPSPHEX: /* Fall through */ case ST_HEXDIGIT1: hex_value = (lv - 0x30) << 4; state = ST_HEXDIGIT2; continue; case ST_HEXDIGIT2: hex_value += (lv - 0x30); state = ST_HEXCOLON; st->buf[st->size++] = (uint8_t)hex_value; continue; case ST_HEXCOLON: return XPBD_BROKEN_ENCODING; case ST_LEADSPACE: dec_value = 0; dec_value_start = lp; /* FALL THROUGH */ case ST_WAITDIGITS: state = ST_DIGITS; continue; default: break; } break; case 0x3c: /* '<', start of XML encoded enumeration */ if(state == ST_LEADSPACE) { const asn_INTEGER_enum_map_t *el; el = INTEGER_map_enum2value( (const asn_INTEGER_specifics_t *) td->specifics, lstart, lstop); if(el) { ASN_DEBUG("Found \"%s\" => %ld", el->enum_name, el->nat_value); dec_value = el->nat_value; state = ST_END_ENUM; lp = lstop - 1; continue; } ASN_DEBUG("Unknown identifier for INTEGER"); } return XPBD_BROKEN_ENCODING; case 0x3a: /* ':' */ if(state == ST_HEXCOLON) { /* This colon is expected */ state = ST_HEXDIGIT1; continue; } else if(state == ST_DIGITS) { /* The colon here means that we have * decoded the first two hexadecimal * places as a decimal value. * Switch decoding mode. */ ASN_DEBUG("INTEGER re-evaluate as hex form"); state = ST_SKIPSPHEX; dec_value_start = 0; lp = lstart - 1; continue; } else { ASN_DEBUG("state %d at %ld", state, (long)(lp - lstart)); break; } /* [A-Fa-f] */ case 0x41:case 0x42:case 0x43:case 0x44:case 0x45:case 0x46: case 0x61:case 0x62:case 0x63:case 0x64:case 0x65:case 0x66: switch(state) { case ST_SKIPSPHEX: case ST_LEADSPACE: /* Fall through */ case ST_HEXDIGIT1: hex_value = lv - ((lv < 0x61) ? 0x41 : 0x61); hex_value += 10; hex_value <<= 4; state = ST_HEXDIGIT2; continue; case ST_HEXDIGIT2: hex_value += lv - ((lv < 0x61) ? 0x41 : 0x61); hex_value += 10; st->buf[st->size++] = (uint8_t)hex_value; state = ST_HEXCOLON; continue; case ST_DIGITS: ASN_DEBUG("INTEGER re-evaluate as hex form"); state = ST_SKIPSPHEX; dec_value_start = 0; lp = lstart - 1; continue; default: break; } break; } /* Found extra non-numeric stuff */ ASN_DEBUG("INTEGER :: Found non-numeric 0x%2x at %ld", lv, (long)(lp - lstart)); state = ST_UNEXPECTED; break; } switch(state) { case ST_END_ENUM: /* Got a complete and valid enumeration encoded as a tag. */ break; case ST_DIGITS: dec_value_end = lstop; /* FALL THROUGH */ case ST_DIGITS_TRAILSPACE: /* The last symbol encountered was a digit. */ switch(asn_strtoimax_lim(dec_value_start, &dec_value_end, &dec_value)) { case ASN_STRTOX_OK: if(specs && specs->field_unsigned && (uintmax_t) dec_value <= ULONG_MAX) { break; } else if(dec_value >= LONG_MIN && dec_value <= LONG_MAX) { break; } else { /* * We model INTEGER on long for XER, * to avoid rewriting all the tests at once. */ ASN_DEBUG("INTEGER exceeds long range"); } /* Fall through */ case ASN_STRTOX_ERROR_RANGE: ASN_DEBUG("INTEGER decode %s hit range limit", td->name); return XPBD_DECODER_LIMIT; case ASN_STRTOX_ERROR_INVAL: case ASN_STRTOX_EXPECT_MORE: case ASN_STRTOX_EXTRA_DATA: return XPBD_BROKEN_ENCODING; } break; case ST_HEXCOLON: case ST_HEXDIGITS_TRAILSPACE: st->buf[st->size] = 0; /* Just in case termination */ return XPBD_BODY_CONSUMED; case ST_HEXDIGIT1: case ST_HEXDIGIT2: case ST_SKIPSPHEX: return XPBD_BROKEN_ENCODING; case ST_LEADSPACE: /* Content not found */ return XPBD_NOT_BODY_IGNORE; case ST_WAITDIGITS: case ST_UNEXPECTED: ASN_DEBUG("INTEGER: No useful digits (state %d)", state); return XPBD_BROKEN_ENCODING; /* No digits */ } /* * Convert the result of parsing of enumeration or a straight * decimal value into a BER representation. */ if(asn_imax2INTEGER(st, dec_value)) { ASN_DEBUG("INTEGER decode %s conversion failed", td->name); return XPBD_SYSTEM_FAILURE; } return XPBD_BODY_CONSUMED; } asn_dec_rval_t INTEGER_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **sptr, const char *opt_mname, const void *buf_ptr, size_t size) { return xer_decode_primitive(opt_codec_ctx, td, sptr, sizeof(INTEGER_t), opt_mname, buf_ptr, size, INTEGER__xer_body_decode); } asn_enc_rval_t INTEGER_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, void *app_key) { const INTEGER_t *st = (const INTEGER_t *)sptr; asn_enc_rval_t er; (void)ilevel; (void)flags; if(!st || !st->buf) ASN__ENCODE_FAILED; er.encoded = INTEGER__dump(td, st, cb, app_key, 1); if(er.encoded < 0) ASN__ENCODE_FAILED; ASN__ENCODED_OK(er); } #ifndef ASN_DISABLE_PER_SUPPORT asn_dec_rval_t INTEGER_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; asn_dec_rval_t rval = { RC_OK, 0 }; INTEGER_t *st = (INTEGER_t *)*sptr; const asn_per_constraint_t *ct; int repeat; (void)opt_codec_ctx; if(!st) { st = (INTEGER_t *)(*sptr = CALLOC(1, sizeof(*st))); if(!st) ASN__DECODE_FAILED; } if(!constraints) constraints = td->encoding_constraints.per_constraints; ct = constraints ? &constraints->value : 0; if(ct && ct->flags & APC_EXTENSIBLE) { int inext = per_get_few_bits(pd, 1); if(inext < 0) ASN__DECODE_STARVED; if(inext) ct = 0; } FREEMEM(st->buf); st->buf = 0; st->size = 0; if(ct) { if(ct->flags & APC_SEMI_CONSTRAINED) { st->buf = (uint8_t *)CALLOC(1, 2); if(!st->buf) ASN__DECODE_FAILED; st->size = 1; } else if(ct->flags & APC_CONSTRAINED && ct->range_bits >= 0) { size_t size = (ct->range_bits + 7) >> 3; st->buf = (uint8_t *)MALLOC(1 + size + 1); if(!st->buf) ASN__DECODE_FAILED; st->size = size; } } /* X.691-2008/11, #13.2.2, constrained whole number */ if(ct && ct->flags != APC_UNCONSTRAINED) { /* #11.5.6 */ ASN_DEBUG("Integer with range %d bits", ct->range_bits); if(ct->range_bits >= 0) { if((size_t)ct->range_bits > 8 * sizeof(unsigned long)) ASN__DECODE_FAILED; if(specs && specs->field_unsigned) { unsigned long uvalue = 0; if(uper_get_constrained_whole_number(pd, &uvalue, ct->range_bits)) ASN__DECODE_STARVED; ASN_DEBUG("Got value %lu + low %ld", uvalue, ct->lower_bound); uvalue += ct->lower_bound; if(asn_ulong2INTEGER(st, uvalue)) ASN__DECODE_FAILED; } else { unsigned long uvalue = 0; long svalue; if(uper_get_constrained_whole_number(pd, &uvalue, ct->range_bits)) ASN__DECODE_STARVED; ASN_DEBUG("Got value %lu + low %ld", uvalue, ct->lower_bound); if(per_long_range_unrebase(uvalue, ct->lower_bound, ct->upper_bound, &svalue) || asn_long2INTEGER(st, svalue)) { ASN__DECODE_FAILED; } } return rval; } } else { ASN_DEBUG("Decoding unconstrained integer %s", td->name); } /* X.691, #12.2.3, #12.2.4 */ do { ssize_t len = 0; void *p = NULL; int ret = 0; /* Get the PER length */ len = uper_get_length(pd, -1, 0, &repeat); if(len < 0) ASN__DECODE_STARVED; p = REALLOC(st->buf, st->size + len + 1); if(!p) ASN__DECODE_FAILED; st->buf = (uint8_t *)p; ret = per_get_many_bits(pd, &st->buf[st->size], 0, 8 * len); if(ret < 0) ASN__DECODE_STARVED; st->size += len; } while(repeat); st->buf[st->size] = 0; /* JIC */ /* #12.2.3 */ if(ct && ct->lower_bound) { /* * TODO: replace by in-place arithmetics. */ long value = 0; if(asn_INTEGER2long(st, &value)) ASN__DECODE_FAILED; if(asn_imax2INTEGER(st, value + ct->lower_bound)) ASN__DECODE_FAILED; } return rval; } asn_enc_rval_t INTEGER_encode_uper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; asn_enc_rval_t er; const INTEGER_t *st = (const INTEGER_t *)sptr; const uint8_t *buf; const uint8_t *end; const asn_per_constraint_t *ct; long value = 0; if(!st || st->size == 0) ASN__ENCODE_FAILED; if(!constraints) constraints = td->encoding_constraints.per_constraints; ct = constraints ? &constraints->value : 0; er.encoded = 0; if(ct) { int inext = 0; if(specs && specs->field_unsigned) { unsigned long uval; if(asn_INTEGER2ulong(st, &uval)) ASN__ENCODE_FAILED; /* Check proper range */ if(ct->flags & APC_SEMI_CONSTRAINED) { if(uval < (unsigned long)ct->lower_bound) inext = 1; } else if(ct->range_bits >= 0) { if(uval < (unsigned long)ct->lower_bound || uval > (unsigned long)ct->upper_bound) inext = 1; } ASN_DEBUG("Value %lu (%02x/%" ASN_PRI_SIZE ") lb %lu ub %lu %s", uval, st->buf[0], st->size, ct->lower_bound, ct->upper_bound, inext ? "ext" : "fix"); value = uval; } else { if(asn_INTEGER2long(st, &value)) ASN__ENCODE_FAILED; /* Check proper range */ if(ct->flags & APC_SEMI_CONSTRAINED) { if(value < ct->lower_bound) inext = 1; } else if(ct->range_bits >= 0) { if(value < ct->lower_bound || value > ct->upper_bound) inext = 1; } ASN_DEBUG("Value %ld (%02x/%" ASN_PRI_SIZE ") lb %ld ub %ld %s", value, st->buf[0], st->size, ct->lower_bound, ct->upper_bound, inext ? "ext" : "fix"); } if(ct->flags & APC_EXTENSIBLE) { if(per_put_few_bits(po, inext, 1)) ASN__ENCODE_FAILED; if(inext) ct = 0; } else if(inext) { ASN__ENCODE_FAILED; } } /* X.691-11/2008, #13.2.2, test if constrained whole number */ if(ct && ct->range_bits >= 0) { unsigned long v; /* #11.5.6 -> #11.3 */ ASN_DEBUG("Encoding integer %ld (%lu) with range %d bits", value, value - ct->lower_bound, ct->range_bits); if(per_long_range_rebase(value, ct->lower_bound, ct->upper_bound, &v)) { ASN__ENCODE_FAILED; } if(uper_put_constrained_whole_number_u(po, v, ct->range_bits)) ASN__ENCODE_FAILED; ASN__ENCODED_OK(er); } if(ct && ct->lower_bound) { ASN_DEBUG("Adjust lower bound to %ld", ct->lower_bound); /* TODO: adjust lower bound */ ASN__ENCODE_FAILED; } for(buf = st->buf, end = st->buf + st->size; buf < end;) { int need_eom = 0; ssize_t mayEncode = uper_put_length(po, end - buf, &need_eom); if(mayEncode < 0) ASN__ENCODE_FAILED; if(per_put_many_bits(po, buf, 8 * mayEncode)) ASN__ENCODE_FAILED; buf += mayEncode; if(need_eom && uper_put_length(po, 0, 0)) ASN__ENCODE_FAILED; } ASN__ENCODED_OK(er); } asn_dec_rval_t INTEGER_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; asn_dec_rval_t rval = { RC_OK, 0 }; INTEGER_t *st = (INTEGER_t *)*sptr; const asn_per_constraint_t *ct; int repeat; (void)opt_codec_ctx; if(!st) { st = (INTEGER_t *)(*sptr = CALLOC(1, sizeof(*st))); if(!st) ASN__DECODE_FAILED; } if(!constraints) constraints = td->encoding_constraints.per_constraints; ct = constraints ? &constraints->value : 0; if(ct && ct->flags & APC_EXTENSIBLE) { int inext = per_get_few_bits(pd, 1); if(inext < 0) ASN__DECODE_STARVED; if(inext) ct = 0; } FREEMEM(st->buf); st->buf = 0; st->size = 0; if(ct) { if(ct->flags & APC_SEMI_CONSTRAINED) { st->buf = (uint8_t *)CALLOC(1, 2); if(!st->buf) ASN__DECODE_FAILED; st->size = 1; } else if(ct->flags & APC_CONSTRAINED && ct->range_bits >= 0) { size_t size = (ct->range_bits + 7) >> 3; st->buf = (uint8_t *)MALLOC(1 + size + 1); if(!st->buf) ASN__DECODE_FAILED; st->size = size; } } /* X.691, #12.2.2 */ if(ct && ct->flags != APC_UNCONSTRAINED) { /* #10.5.6 */ ASN_DEBUG("Integer with range %d bits", ct->range_bits); if(ct->range_bits >= 0) { if (ct->range_bits > 16) { int max_range_bytes = (ct->range_bits >> 3) + (((ct->range_bits % 8) > 0) ? 1 : 0); int length = 0, i; long value = 0; for (i = 1; ; i++) { int upper = 1 << i; if (upper >= max_range_bytes) break; } ASN_DEBUG("Can encode %d (%d bytes) in %d bits", ct->range_bits, max_range_bytes, i); if ((length = per_get_few_bits(pd, i)) < 0) ASN__DECODE_FAILED; /* X.691 #12.2.6 length determinant + lb (1) */ length += 1; ASN_DEBUG("Got length %d", length); if (aper_get_align(pd) != 0) ASN__DECODE_FAILED; while (length--) { int buf = per_get_few_bits(pd, 8); if (buf < 0) ASN__DECODE_FAILED; value += (((long)buf) << (8 * length)); } value += ct->lower_bound; if((specs && specs->field_unsigned) ? asn_uint642INTEGER(st, (unsigned long)value) : asn_int642INTEGER(st, value)) ASN__DECODE_FAILED; ASN_DEBUG("Got value %ld + low %ld", value, ct->lower_bound); } else { long value = 0; if (ct->range_bits < 8) { value = per_get_few_bits(pd, ct->range_bits); if(value < 0) ASN__DECODE_STARVED; } else if (ct->range_bits == 8) { if (aper_get_align(pd) < 0) ASN__DECODE_FAILED; value = per_get_few_bits(pd, ct->range_bits); if(value < 0) ASN__DECODE_STARVED; } else { /* Align */ if (aper_get_align(pd) < 0) ASN__DECODE_FAILED; value = per_get_few_bits(pd, 16); if(value < 0) ASN__DECODE_STARVED; } value += ct->lower_bound; if((specs && specs->field_unsigned) ? asn_ulong2INTEGER(st, value) : asn_long2INTEGER(st, value)) ASN__DECODE_FAILED; ASN_DEBUG("Got value %ld + low %ld", value, ct->lower_bound); } return rval; } else { ASN__DECODE_FAILED; } } else { ASN_DEBUG("Decoding unconstrained integer %s", td->name); } /* X.691, #12.2.3, #12.2.4 */ do { ssize_t len; void *p; int ret; /* Get the PER length */ len = aper_get_length(pd, -1, -1, &repeat); if(len < 0) ASN__DECODE_STARVED; p = REALLOC(st->buf, st->size + len + 1); if(!p) ASN__DECODE_FAILED; st->buf = (uint8_t *)p; ret = per_get_many_bits(pd, &st->buf[st->size], 0, 8 * len); if(ret < 0) ASN__DECODE_STARVED; st->size += len; } while(repeat); st->buf[st->size] = 0; /* JIC */ /* #12.2.3 */ if(ct && ct->lower_bound) { /* * TODO: replace by in-place arithmetics. */ long value; if(asn_INTEGER2long(st, &value)) ASN__DECODE_FAILED; if(asn_long2INTEGER(st, value + ct->lower_bound)) ASN__DECODE_FAILED; } return rval; } asn_enc_rval_t INTEGER_encode_aper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; asn_enc_rval_t er; const INTEGER_t *st = (const INTEGER_t *)sptr; const uint8_t *buf; const uint8_t *end; const asn_per_constraint_t *ct; long value = 0; if(!st || st->size == 0) ASN__ENCODE_FAILED; if(!constraints) constraints = td->encoding_constraints.per_constraints; ct = constraints ? &constraints->value : 0; er.encoded = 0; if(ct) { int inext = 0; if(specs && specs->field_unsigned) { unsigned long uval; if(asn_INTEGER2ulong(st, &uval)) ASN__ENCODE_FAILED; /* Check proper range */ if(ct->flags & APC_SEMI_CONSTRAINED) { if(uval < (unsigned long)ct->lower_bound) inext = 1; } else if(ct->range_bits >= 0) { if(uval < (unsigned long)ct->lower_bound || uval > (unsigned long)ct->upper_bound) inext = 1; } ASN_DEBUG("Value %lu (%02x/%lu) lb %ld ub %ld %s", uval, st->buf[0], st->size, ct->lower_bound, ct->upper_bound, inext ? "ext" : "fix"); value = uval; } else { if(asn_INTEGER2long(st, &value)) ASN__ENCODE_FAILED; /* Check proper range */ if(ct->flags & APC_SEMI_CONSTRAINED) { if(value < ct->lower_bound) inext = 1; } else if(ct->range_bits >= 0) { if(value < ct->lower_bound || value > ct->upper_bound) inext = 1; } ASN_DEBUG("Value %lu (%02x/%lu) lb %ld ub %ld %s", value, st->buf[0], st->size, ct->lower_bound, ct->upper_bound, inext ? "ext" : "fix"); } if(ct->flags & APC_EXTENSIBLE) { if(per_put_few_bits(po, inext, 1)) ASN__ENCODE_FAILED; if(inext) ct = 0; } else if(inext) { ASN__ENCODE_FAILED; } } /* X.691, #12.2.2 */ if(ct && ct->range_bits >= 0) { unsigned long v; /* #10.5.6 */ ASN_DEBUG("Encoding integer %ld (%lu) with range %d bits", value, value - ct->lower_bound, ct->range_bits); v = value - ct->lower_bound; /* #12 <= 8 -> alignment ? */ if (ct->range_bits < 8) { if(per_put_few_bits(po, 0x00 | v, ct->range_bits)) ASN__ENCODE_FAILED; } else if (ct->range_bits == 8) { if(aper_put_align(po) < 0) ASN__ENCODE_FAILED; if(per_put_few_bits(po, 0x00 | v, ct->range_bits)) ASN__ENCODE_FAILED; } else if (ct->range_bits <= 16) { /* Consume the bytes to align on octet */ if(aper_put_align(po) < 0) ASN__ENCODE_FAILED; if(per_put_few_bits(po, 0x0000 | v, 16)) ASN__ENCODE_FAILED; } else { /* TODO: extend to >64 bits */ int64_t v64 = v; int i, j; int max_range_bytes = (ct->range_bits >> 3) + (((ct->range_bits % 8) > 0) ? 1 : 0); for (i = 1; ; i++) { int upper = 1 << i; if (upper >= max_range_bytes) break; } for (j = sizeof(int64_t) -1; j != 0; j--) { int64_t val; val = v64 >> (j * 8); if (val != 0) break; } /* Putting length in the minimum number of bits ex: 5 = 3bits */ if (per_put_few_bits(po, j, i)) ASN__ENCODE_FAILED; /* Consume the bits to align on octet */ if (aper_put_align(po) < 0) ASN__ENCODE_FAILED; /* Put the value */ for (i = 0; i <= j; i++) { if(per_put_few_bits(po, (v64 >> (8 * (j - i))) & 0xff, 8)) ASN__ENCODE_FAILED; } } ASN__ENCODED_OK(er); } if(ct && ct->lower_bound) { ASN_DEBUG("Adjust lower bound to %ld", ct->lower_bound); /* TODO: adjust lower bound */ ASN__ENCODE_FAILED; } for(buf = st->buf, end = st->buf + st->size; buf < end;) { ssize_t mayEncode = aper_put_length(po, -1, end - buf); if(mayEncode < 0) ASN__ENCODE_FAILED; if(per_put_many_bits(po, buf, 8 * mayEncode)) ASN__ENCODE_FAILED; buf += mayEncode; } ASN__ENCODED_OK(er); } #endif /* ASN_DISABLE_PER_SUPPORT */ static intmax_t asn__integer_convert(const uint8_t *b, const uint8_t *end) { uintmax_t value; /* Perform the sign initialization */ /* Actually value = -(*b >> 7); gains nothing, yet unreadable! */ if((*b >> 7)) { value = (uintmax_t)(-1); } else { value = 0; } /* Conversion engine */ for(; b < end; b++) { value = (value << 8) | *b; } return value; } int asn_INTEGER2imax(const INTEGER_t *iptr, intmax_t *lptr) { uint8_t *b, *end; size_t size; /* Sanity checking */ if(!iptr || !iptr->buf || !lptr) { errno = EINVAL; return -1; } /* Cache the begin/end of the buffer */ b = iptr->buf; /* Start of the INTEGER buffer */ size = iptr->size; end = b + size; /* Where to stop */ if(size > sizeof(intmax_t)) { uint8_t *end1 = end - 1; /* * Slightly more advanced processing, * able to process INTEGERs with >sizeof(intmax_t) bytes * when the actual value is small, e.g. for intmax_t == int32_t * (0x0000000000abcdef INTEGER would yield a fine 0x00abcdef int32_t) */ /* Skip out the insignificant leading bytes */ for(; b < end1; b++) { switch(*b) { case 0x00: if((b[1] & 0x80) == 0) continue; break; case 0xff: if((b[1] & 0x80) != 0) continue; break; } break; } size = end - b; if(size > sizeof(intmax_t)) { /* Still cannot fit the sizeof(intmax_t) */ errno = ERANGE; return -1; } } /* Shortcut processing of a corner case */ if(end == b) { *lptr = 0; return 0; } *lptr = asn__integer_convert(b, end); return 0; } /* FIXME: negative INTEGER values are silently interpreted as large unsigned ones. */ int asn_INTEGER2umax(const INTEGER_t *iptr, uintmax_t *lptr) { uint8_t *b, *end; uintmax_t value; size_t size; if(!iptr || !iptr->buf || !lptr) { errno = EINVAL; return -1; } b = iptr->buf; size = iptr->size; end = b + size; /* If all extra leading bytes are zeroes, ignore them */ for(; size > sizeof(value); b++, size--) { if(*b) { /* Value won't fit into uintmax_t */ errno = ERANGE; return -1; } } /* Conversion engine */ for(value = 0; b < end; b++) value = (value << 8) | *b; *lptr = value; return 0; } int asn_umax2INTEGER(INTEGER_t *st, uintmax_t value) { uint8_t *buf; uint8_t *end; uint8_t *b; int shr; if(value <= ((~(uintmax_t)0) >> 1)) { return asn_imax2INTEGER(st, value); } buf = (uint8_t *)MALLOC(1 + sizeof(value)); if(!buf) return -1; end = buf + (sizeof(value) + 1); buf[0] = 0; /* INTEGERs are signed. 0-byte indicates positive. */ for(b = buf + 1, shr = (sizeof(value) - 1) * 8; b < end; shr -= 8, b++) *b = (uint8_t)(value >> shr); if(st->buf) FREEMEM(st->buf); st->buf = buf; st->size = 1 + sizeof(value); return 0; } int asn_imax2INTEGER(INTEGER_t *st, intmax_t value) { uint8_t *buf, *bp; uint8_t *p; uint8_t *pstart; uint8_t *pend1; int littleEndian = 1; /* Run-time detection */ int add; if(!st) { errno = EINVAL; return -1; } buf = (uint8_t *)(long *)MALLOC(sizeof(value)); if(!buf) return -1; if(*(char *)&littleEndian) { pstart = (uint8_t *)&value + sizeof(value) - 1; pend1 = (uint8_t *)&value; add = -1; } else { pstart = (uint8_t *)&value; pend1 = pstart + sizeof(value) - 1; add = 1; } /* * If the contents octet consists of more than one octet, * then bits of the first octet and bit 8 of the second octet: * a) shall not all be ones; and * b) shall not all be zero. */ for(p = pstart; p != pend1; p += add) { switch(*p) { case 0x00: if((*(p+add) & 0x80) == 0) continue; break; case 0xff: if((*(p+add) & 0x80)) continue; break; } break; } /* Copy the integer body */ for(bp = buf, pend1 += add; p != pend1; p += add) *bp++ = *p; if(st->buf) FREEMEM(st->buf); st->buf = buf; st->size = bp - buf; return 0; } int asn_INTEGER2long(const INTEGER_t *iptr, long *l) { intmax_t v; if(asn_INTEGER2imax(iptr, &v) == 0) { if(v < LONG_MIN || v > LONG_MAX) { errno = ERANGE; return -1; } *l = v; return 0; } else { return -1; } } int asn_INTEGER2ulong(const INTEGER_t *iptr, unsigned long *l) { uintmax_t v; if(asn_INTEGER2umax(iptr, &v) == 0) { if(v > ULONG_MAX) { errno = ERANGE; return -1; } *l = v; return 0; } else { return -1; } } int asn_long2INTEGER(INTEGER_t *st, long value) { return asn_imax2INTEGER(st, value); } int asn_ulong2INTEGER(INTEGER_t *st, unsigned long value) { return asn_imax2INTEGER(st, value); } int asn_uint642INTEGER(INTEGER_t *st, uint64_t value) { uint8_t *buf; uint8_t *end; uint8_t *b; int shr; if(value <= INT64_MAX) return asn_int642INTEGER(st, value); buf = (uint8_t *)MALLOC(1 + sizeof(value)); if(!buf) return -1; end = buf + (sizeof(value) + 1); buf[0] = 0; for(b = buf + 1, shr = (sizeof(value)-1)*8; b < end; shr -= 8, b++) *b = (uint8_t)(value >> shr); if(st->buf) FREEMEM(st->buf); st->buf = buf; st->size = 1 + sizeof(value); return 0; } int asn_int642INTEGER(INTEGER_t *st, int64_t value) { uint8_t *buf, *bp; uint8_t *p; uint8_t *pstart; uint8_t *pend1; int littleEndian = 1; /* Run-time detection */ int add; if(!st) { errno = EINVAL; return -1; } buf = (uint8_t *)MALLOC(sizeof(value)); if(!buf) return -1; if(*(char *)&littleEndian) { pstart = (uint8_t *)&value + sizeof(value) - 1; pend1 = (uint8_t *)&value; add = -1; } else { pstart = (uint8_t *)&value; pend1 = pstart + sizeof(value) - 1; add = 1; } /* * If the contents octet consists of more than one octet, * then bits of the first octet and bit 8 of the second octet: * a) shall not all be ones; and * b) shall not all be zero. */ for(p = pstart; p != pend1; p += add) { switch(*p) { case 0x00: if((*(p+add) & 0x80) == 0) continue; break; case 0xff: if((*(p+add) & 0x80)) continue; break; } break; } /* Copy the integer body */ for(pstart = p, bp = buf, pend1 += add; p != pend1; p += add) *bp++ = *p; if(st->buf) FREEMEM(st->buf); st->buf = buf; st->size = bp - buf; return 0; } /* * Parse the number in the given string until the given *end position, * returning the position after the last parsed character back using the * same (*end) pointer. * WARNING: This behavior is different from the standard strtol/strtoimax(3). */ enum asn_strtox_result_e asn_strtoimax_lim(const char *str, const char **end, intmax_t *intp) { int sign = 1; intmax_t value; #define ASN1_INTMAX_MAX ((~(uintmax_t)0) >> 1) const intmax_t upper_boundary = ASN1_INTMAX_MAX / 10; intmax_t last_digit_max = ASN1_INTMAX_MAX % 10; #undef ASN1_INTMAX_MAX if(str >= *end) return ASN_STRTOX_ERROR_INVAL; switch(*str) { case '-': last_digit_max++; sign = -1; /* FALL THROUGH */ case '+': str++; if(str >= *end) { *end = str; return ASN_STRTOX_EXPECT_MORE; } } for(value = 0; str < (*end); str++) { switch(*str) { case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: { int d = *str - '0'; if(value < upper_boundary) { value = value * 10 + d; } else if(value == upper_boundary) { if(d <= last_digit_max) { if(sign > 0) { value = value * 10 + d; } else { sign = 1; value = -value * 10 - d; } } else { *end = str; return ASN_STRTOX_ERROR_RANGE; } } else { *end = str; return ASN_STRTOX_ERROR_RANGE; } } continue; default: *end = str; *intp = sign * value; return ASN_STRTOX_EXTRA_DATA; } } *end = str; *intp = sign * value; return ASN_STRTOX_OK; } /* * Parse the number in the given string until the given *end position, * returning the position after the last parsed character back using the * same (*end) pointer. * WARNING: This behavior is different from the standard strtoul/strtoumax(3). */ enum asn_strtox_result_e asn_strtoumax_lim(const char *str, const char **end, uintmax_t *uintp) { uintmax_t value; #define ASN1_UINTMAX_MAX ((~(uintmax_t)0)) const uintmax_t upper_boundary = ASN1_UINTMAX_MAX / 10; uintmax_t last_digit_max = ASN1_UINTMAX_MAX % 10; #undef ASN1_UINTMAX_MAX if(str >= *end) return ASN_STRTOX_ERROR_INVAL; switch(*str) { case '-': return ASN_STRTOX_ERROR_INVAL; case '+': str++; if(str >= *end) { *end = str; return ASN_STRTOX_EXPECT_MORE; } } for(value = 0; str < (*end); str++) { switch(*str) { case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: { unsigned int d = *str - '0'; if(value < upper_boundary) { value = value * 10 + d; } else if(value == upper_boundary) { if(d <= last_digit_max) { value = value * 10 + d; } else { *end = str; return ASN_STRTOX_ERROR_RANGE; } } else { *end = str; return ASN_STRTOX_ERROR_RANGE; } } continue; default: *end = str; *uintp = value; return ASN_STRTOX_EXTRA_DATA; } } *end = str; *uintp = value; return ASN_STRTOX_OK; } enum asn_strtox_result_e asn_strtol_lim(const char *str, const char **end, long *lp) { intmax_t value; switch(asn_strtoimax_lim(str, end, &value)) { case ASN_STRTOX_ERROR_RANGE: return ASN_STRTOX_ERROR_RANGE; case ASN_STRTOX_ERROR_INVAL: return ASN_STRTOX_ERROR_INVAL; case ASN_STRTOX_EXPECT_MORE: return ASN_STRTOX_EXPECT_MORE; case ASN_STRTOX_OK: if(value >= LONG_MIN && value <= LONG_MAX) { *lp = value; return ASN_STRTOX_OK; } else { return ASN_STRTOX_ERROR_RANGE; } case ASN_STRTOX_EXTRA_DATA: if(value >= LONG_MIN && value <= LONG_MAX) { *lp = value; return ASN_STRTOX_EXTRA_DATA; } else { return ASN_STRTOX_ERROR_RANGE; } } assert(!"Unreachable"); return ASN_STRTOX_ERROR_INVAL; } enum asn_strtox_result_e asn_strtoul_lim(const char *str, const char **end, unsigned long *ulp) { uintmax_t value; switch(asn_strtoumax_lim(str, end, &value)) { case ASN_STRTOX_ERROR_RANGE: return ASN_STRTOX_ERROR_RANGE; case ASN_STRTOX_ERROR_INVAL: return ASN_STRTOX_ERROR_INVAL; case ASN_STRTOX_EXPECT_MORE: return ASN_STRTOX_EXPECT_MORE; case ASN_STRTOX_OK: if(value <= ULONG_MAX) { *ulp = value; return ASN_STRTOX_OK; } else { return ASN_STRTOX_ERROR_RANGE; } case ASN_STRTOX_EXTRA_DATA: if(value <= ULONG_MAX) { *ulp = value; return ASN_STRTOX_EXTRA_DATA; } else { return ASN_STRTOX_ERROR_RANGE; } } assert(!"Unreachable"); return ASN_STRTOX_ERROR_INVAL; } int INTEGER_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const void *bptr) { const INTEGER_t *a = aptr; const INTEGER_t *b = bptr; (void)td; if(a && b) { if(a->size && b->size) { int sign_a = (a->buf[0] & 0x80) ? -1 : 1; int sign_b = (b->buf[0] & 0x80) ? -1 : 1; if(sign_a < sign_b) return -1; if(sign_a > sign_b) return 1; /* The shortest integer wins, unless comparing negatives */ if(a->size < b->size) { return -1 * sign_a; } else if(a->size > b->size) { return 1 * sign_b; } return sign_a * memcmp(a->buf, b->buf, a->size); } else if(a->size) { int sign = (a->buf[0] & 0x80) ? -1 : 1; return (1) * sign; } else if(b->size) { int sign = (a->buf[0] & 0x80) ? -1 : 1; return (-1) * sign; } else { return 0; } } else if(!a && !b) { return 0; } else if(!a) { return -1; } else { return 1; } } asn_random_fill_result_t INTEGER_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, const asn_encoding_constraints_t *constraints, size_t max_length) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; INTEGER_t *st = *sptr; const asn_INTEGER_enum_map_t *emap; size_t emap_len; intmax_t value; int find_inside_map; if(max_length == 0) return result_skipped; if(st == NULL) { st = (INTEGER_t *)CALLOC(1, sizeof(*st)); if(st == NULL) { return result_failed; } } if(specs) { emap = specs->value2enum; emap_len = specs->map_count; if(specs->strict_enumeration) { find_inside_map = emap_len > 0; } else { find_inside_map = emap_len ? asn_random_between(0, 1) : 0; } } else { emap = 0; emap_len = 0; find_inside_map = 0; } if(find_inside_map) { assert(emap_len > 0); value = emap[asn_random_between(0, emap_len - 1)].nat_value; } else { const asn_per_constraints_t *ct; static const long variants[] = { -65536, -65535, -65534, -32769, -32768, -32767, -16385, -16384, -16383, -257, -256, -255, -254, -129, -128, -127, -126, -1, 0, 1, 126, 127, 128, 129, 254, 255, 256, 257, 16383, 16384, 16385, 32767, 32768, 32769, 65534, 65535, 65536, 65537}; if(specs && specs->field_unsigned) { assert(variants[18] == 0); value = variants[asn_random_between( 18, sizeof(variants) / sizeof(variants[0]) - 1)]; } else { value = variants[asn_random_between( 0, sizeof(variants) / sizeof(variants[0]) - 1)]; } if(!constraints) constraints = &td->encoding_constraints; ct = constraints ? constraints->per_constraints : 0; if(ct && (ct->value.flags & APC_CONSTRAINED)) { if(value < ct->value.lower_bound || value > ct->value.upper_bound) { value = asn_random_between(ct->value.lower_bound, ct->value.upper_bound); } } } if(asn_imax2INTEGER(st, value)) { if(st == *sptr) { ASN_STRUCT_RESET(*td, st); } else { ASN_STRUCT_FREE(*td, st); } return result_failed; } else { *sptr = st; result_ok.length = st->size; return result_ok; } } nextepc-0.3.10/lib/s1ap/asn1c/INTEGER.h000066400000000000000000000100351333553357400171400ustar00rootroot00000000000000/*- * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _INTEGER_H_ #define _INTEGER_H_ #include #include #ifdef __cplusplus extern "C" { #endif typedef ASN__PRIMITIVE_TYPE_t INTEGER_t; extern asn_TYPE_descriptor_t asn_DEF_INTEGER; extern asn_TYPE_operation_t asn_OP_INTEGER; /* Map with to integer value association */ typedef struct asn_INTEGER_enum_map_s { long nat_value; /* associated native integer value */ size_t enum_len; /* strlen("tag") */ const char *enum_name; /* "tag" */ } asn_INTEGER_enum_map_t; /* This type describes an enumeration for INTEGER and ENUMERATED types */ typedef struct asn_INTEGER_specifics_s { const asn_INTEGER_enum_map_t *value2enum; /* N -> "tag"; sorted by N */ const unsigned int *enum2value; /* "tag" => N; sorted by tag */ int map_count; /* Elements in either map */ int extension; /* This map is extensible */ int strict_enumeration; /* Enumeration set is fixed */ int field_width; /* Size of native integer */ int field_unsigned; /* Signed=0, unsigned=1 */ } asn_INTEGER_specifics_t; #define INTEGER_free ASN__PRIMITIVE_TYPE_free #define INTEGER_decode_ber ber_decode_primitive #define INTEGER_constraint asn_generic_no_constraint asn_struct_print_f INTEGER_print; asn_struct_compare_f INTEGER_compare; der_type_encoder_f INTEGER_encode_der; xer_type_decoder_f INTEGER_decode_xer; xer_type_encoder_f INTEGER_encode_xer; oer_type_decoder_f INTEGER_decode_oer; oer_type_encoder_f INTEGER_encode_oer; per_type_decoder_f INTEGER_decode_uper; per_type_encoder_f INTEGER_encode_uper; per_type_decoder_f INTEGER_decode_aper; per_type_encoder_f INTEGER_encode_aper; asn_random_fill_f INTEGER_random_fill; /*********************************** * Some handy conversion routines. * ***********************************/ /* * Natiwe size-independent conversion of native integers to/from INTEGER. * (l_size) is in bytes. * Returns 0 if it was possible to convert, -1 otherwise. * -1/EINVAL: Mandatory argument missing * -1/ERANGE: Value encoded is out of range for long representation * -1/ENOMEM: Memory allocation failed (in asn_*2INTEGER()). */ int asn_INTEGER2imax(const INTEGER_t *i, intmax_t *l); int asn_INTEGER2umax(const INTEGER_t *i, uintmax_t *l); int asn_imax2INTEGER(INTEGER_t *i, intmax_t l); int asn_umax2INTEGER(INTEGER_t *i, uintmax_t l); /* * Size-specific conversion helpers. */ int asn_INTEGER2long(const INTEGER_t *i, long *l); int asn_INTEGER2ulong(const INTEGER_t *i, unsigned long *l); int asn_long2INTEGER(INTEGER_t *i, long l); int asn_ulong2INTEGER(INTEGER_t *i, unsigned long l); int asn_int642INTEGER(INTEGER_t *i, int64_t l); int asn_uint642INTEGER(INTEGER_t *i, uint64_t l); /* A version of strtol/strtoimax(3) with nicer error reporting. */ enum asn_strtox_result_e { ASN_STRTOX_ERROR_RANGE = -3, /* Input outside of supported numeric range */ ASN_STRTOX_ERROR_INVAL = -2, /* Invalid data encountered (e.g., "+-") */ ASN_STRTOX_EXPECT_MORE = -1, /* More data expected (e.g. "+") */ ASN_STRTOX_OK = 0, /* Conversion succeded, number ends at (*end) */ ASN_STRTOX_EXTRA_DATA = 1 /* Conversion succeded, but the string has extra stuff */ }; enum asn_strtox_result_e asn_strtol_lim(const char *str, const char **end, long *l); enum asn_strtox_result_e asn_strtoul_lim(const char *str, const char **end, unsigned long *l); enum asn_strtox_result_e asn_strtoimax_lim(const char *str, const char **end, intmax_t *l); enum asn_strtox_result_e asn_strtoumax_lim(const char *str, const char **end, uintmax_t *l); /* * Convert the integer value into the corresponding enumeration map entry. */ const asn_INTEGER_enum_map_t *INTEGER_map_value2enum( const asn_INTEGER_specifics_t *specs, long value); #ifdef __cplusplus } #endif #endif /* _INTEGER_H_ */ nextepc-0.3.10/lib/s1ap/asn1c/INTEGER_oer.c000066400000000000000000000112341333553357400200020ustar00rootroot00000000000000/* * Copyright (c) 2017 Lev Walkin . * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef ASN_DISABLE_OER_SUPPORT #include #include #include asn_dec_rval_t INTEGER_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_oer_constraints_t *constraints, void **sptr, const void *ptr, size_t size) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; asn_dec_rval_t rval = {RC_OK, 0}; INTEGER_t *st = (INTEGER_t *)*sptr; struct asn_oer_constraint_number_s ct = {0, 0}; size_t req_bytes; (void)opt_codec_ctx; (void)specs; if(!st) { st = (INTEGER_t *)(*sptr = CALLOC(1, sizeof(*st))); if(!st) ASN__DECODE_FAILED; } FREEMEM(st->buf); st->buf = 0; st->size = 0; if(!constraints) constraints = td->encoding_constraints.oer_constraints; if(constraints) ct = constraints->value; if(ct.width) { req_bytes = ct.width; } else { /* No lower bound and no upper bound, effectively */ ssize_t consumed = oer_fetch_length(ptr, size, &req_bytes); if(consumed == 0) { ASN__DECODE_STARVED; } else if(consumed == -1) { ASN__DECODE_FAILED; } rval.consumed += consumed; ptr = (const char *)ptr + consumed; size -= consumed; } if(req_bytes > size) { ASN__DECODE_STARVED; } if(ct.positive) { /* X.969 08/2015 10.2(a) */ unsigned msb; /* Most significant bit */ size_t useful_size; /* Check most significant bit */ msb = *(const uint8_t *)ptr >> 7; /* yields 0 or 1 */ useful_size = msb + req_bytes; st->buf = (uint8_t *)MALLOC(useful_size + 1); if(!st->buf) { ASN__DECODE_FAILED; } /* * Record a large unsigned in a way not to confuse it * with signed value. */ st->buf[0] = '\0'; memcpy(st->buf + msb, ptr, req_bytes); st->buf[useful_size] = '\0'; /* Just in case, 0-terminate */ st->size = useful_size; rval.consumed += req_bytes; return rval; } else { /* X.969 08/2015 10.2(b) */ st->buf = (uint8_t *)MALLOC(req_bytes + 1); if(!st->buf) { ASN__DECODE_FAILED; } memcpy(st->buf, ptr, req_bytes); st->buf[req_bytes] = '\0'; /* Just in case, 0-terminate */ st->size = req_bytes; rval.consumed += req_bytes; return rval; } } /* * Encode as Canonical OER. */ asn_enc_rval_t INTEGER_encode_oer(const asn_TYPE_descriptor_t *td, const asn_oer_constraints_t *constraints, const void *sptr, asn_app_consume_bytes_f *cb, void *app_key) { const INTEGER_t *st = sptr; asn_enc_rval_t er; struct asn_oer_constraint_number_s ct = {0, 0}; const uint8_t *buf; const uint8_t *end; size_t useful_bytes; size_t req_bytes = 0; int sign = 0; if(!st || st->size == 0) ASN__ENCODE_FAILED; if(!constraints) constraints = td->encoding_constraints.oer_constraints; if(constraints) ct = constraints->value; er.encoded = 0; buf = st->buf; end = buf + st->size; sign = (buf && buf < end) ? buf[0] & 0x80 : 0; /* Ignore 9 leading zeroes or ones */ if(ct.positive) { if(sign) { /* The value given is a signed value. Can't proceed. */ ASN__ENCODE_FAILED; } /* Remove leading zeros. */ for(; buf + 1 < end; buf++) { if(buf[0] != 0x0) break; } } else { for(; buf + 1 < end; buf++) { if(buf[0] == 0x0 && (buf[1] & 0x80) == 0) { continue; } else if(buf[0] == 0xff && (buf[1] & 0x80) != 0) { continue; } break; } } useful_bytes = end - buf; if(ct.width) { req_bytes = ct.width; } else { ssize_t r = oer_serialize_length(useful_bytes, cb, app_key); if(r < 0) { ASN__ENCODE_FAILED; } er.encoded += r; req_bytes = useful_bytes; } if(req_bytes < useful_bytes) { ASN__ENCODE_FAILED; } er.encoded += req_bytes; for(; req_bytes > useful_bytes; req_bytes--) { if(cb(sign?"\xff":"\0", 1, app_key) < 0) { ASN__ENCODE_FAILED; } } if(cb(buf, useful_bytes, app_key) < 0) { ASN__ENCODE_FAILED; } ASN__ENCODED_OK(er); } #endif /* ASN_DISABLE_OER_SUPPORT */ nextepc-0.3.10/lib/s1ap/asn1c/Makefile.am000066400000000000000000001046751333553357400177440ustar00rootroot00000000000000ASN_MODULE_SRCS= \ S1AP_S1AP-PDU.c \ S1AP_InitiatingMessage.c \ S1AP_SuccessfulOutcome.c \ S1AP_UnsuccessfulOutcome.c \ S1AP_E-RAB-IE-ContainerList.c \ S1AP_HandoverRequired.c \ S1AP_HandoverCommand.c \ S1AP_E-RABSubjecttoDataForwardingList.c \ S1AP_E-RABDataForwardingItem.c \ S1AP_HandoverPreparationFailure.c \ S1AP_HandoverRequest.c \ S1AP_E-RABToBeSetupListHOReq.c \ S1AP_E-RABToBeSetupItemHOReq.c \ S1AP_HandoverRequestAcknowledge.c \ S1AP_E-RABAdmittedList.c \ S1AP_E-RABAdmittedItem.c \ S1AP_E-RABFailedtoSetupListHOReqAck.c \ S1AP_E-RABFailedToSetupItemHOReqAck.c \ S1AP_HandoverFailure.c \ S1AP_HandoverNotify.c \ S1AP_PathSwitchRequest.c \ S1AP_E-RABToBeSwitchedDLList.c \ S1AP_E-RABToBeSwitchedDLItem.c \ S1AP_PathSwitchRequestAcknowledge.c \ S1AP_E-RABToBeSwitchedULList.c \ S1AP_E-RABToBeSwitchedULItem.c \ S1AP_PathSwitchRequestFailure.c \ S1AP_HandoverCancel.c \ S1AP_HandoverCancelAcknowledge.c \ S1AP_E-RABSetupRequest.c \ S1AP_E-RABToBeSetupListBearerSUReq.c \ S1AP_E-RABToBeSetupItemBearerSUReq.c \ S1AP_E-RABSetupResponse.c \ S1AP_E-RABSetupListBearerSURes.c \ S1AP_E-RABSetupItemBearerSURes.c \ S1AP_E-RABModifyRequest.c \ S1AP_E-RABToBeModifiedListBearerModReq.c \ S1AP_E-RABToBeModifiedItemBearerModReq.c \ S1AP_E-RABModifyResponse.c \ S1AP_E-RABModifyListBearerModRes.c \ S1AP_E-RABModifyItemBearerModRes.c \ S1AP_E-RABReleaseCommand.c \ S1AP_E-RABReleaseResponse.c \ S1AP_E-RABReleaseListBearerRelComp.c \ S1AP_E-RABReleaseItemBearerRelComp.c \ S1AP_E-RABReleaseIndication.c \ S1AP_InitialContextSetupRequest.c \ S1AP_E-RABToBeSetupListCtxtSUReq.c \ S1AP_E-RABToBeSetupItemCtxtSUReq.c \ S1AP_InitialContextSetupResponse.c \ S1AP_E-RABSetupListCtxtSURes.c \ S1AP_E-RABSetupItemCtxtSURes.c \ S1AP_InitialContextSetupFailure.c \ S1AP_Paging.c \ S1AP_TAIList.c \ S1AP_TAIItem.c \ S1AP_UEContextReleaseRequest.c \ S1AP_UEContextReleaseCommand.c \ S1AP_UEContextReleaseComplete.c \ S1AP_UEContextModificationRequest.c \ S1AP_UEContextModificationResponse.c \ S1AP_UEContextModificationFailure.c \ S1AP_UERadioCapabilityMatchRequest.c \ S1AP_UERadioCapabilityMatchResponse.c \ S1AP_DownlinkNASTransport.c \ S1AP_InitialUEMessage.c \ S1AP_UplinkNASTransport.c \ S1AP_NASNonDeliveryIndication.c \ S1AP_RerouteNASRequest.c \ S1AP_NASDeliveryIndication.c \ S1AP_Reset.c \ S1AP_ResetType.c \ S1AP_ResetAll.c \ S1AP_UE-associatedLogicalS1-ConnectionListRes.c \ S1AP_ResetAcknowledge.c \ S1AP_UE-associatedLogicalS1-ConnectionListResAck.c \ S1AP_ErrorIndication.c \ S1AP_S1SetupRequest.c \ S1AP_S1SetupResponse.c \ S1AP_S1SetupFailure.c \ S1AP_ENBConfigurationUpdate.c \ S1AP_ENBConfigurationUpdateAcknowledge.c \ S1AP_ENBConfigurationUpdateFailure.c \ S1AP_MMEConfigurationUpdate.c \ S1AP_MMEConfigurationUpdateAcknowledge.c \ S1AP_MMEConfigurationUpdateFailure.c \ S1AP_DownlinkS1cdma2000tunnelling.c \ S1AP_UplinkS1cdma2000tunnelling.c \ S1AP_UECapabilityInfoIndication.c \ S1AP_ENBStatusTransfer.c \ S1AP_MMEStatusTransfer.c \ S1AP_TraceStart.c \ S1AP_TraceFailureIndication.c \ S1AP_DeactivateTrace.c \ S1AP_CellTrafficTrace.c \ S1AP_LocationReportingControl.c \ S1AP_LocationReportingFailureIndication.c \ S1AP_LocationReport.c \ S1AP_OverloadStart.c \ S1AP_OverloadStop.c \ S1AP_WriteReplaceWarningRequest.c \ S1AP_WriteReplaceWarningResponse.c \ S1AP_ENBDirectInformationTransfer.c \ S1AP_Inter-SystemInformationTransferType.c \ S1AP_MMEDirectInformationTransfer.c \ S1AP_ENBConfigurationTransfer.c \ S1AP_MMEConfigurationTransfer.c \ S1AP_PrivateMessage.c \ S1AP_KillRequest.c \ S1AP_KillResponse.c \ S1AP_PWSRestartIndication.c \ S1AP_PWSFailureIndication.c \ S1AP_DownlinkUEAssociatedLPPaTransport.c \ S1AP_UplinkUEAssociatedLPPaTransport.c \ S1AP_DownlinkNonUEAssociatedLPPaTransport.c \ S1AP_UplinkNonUEAssociatedLPPaTransport.c \ S1AP_E-RABModificationIndication.c \ S1AP_E-RABToBeModifiedListBearerModInd.c \ S1AP_E-RABToBeModifiedItemBearerModInd.c \ S1AP_E-RABNotToBeModifiedListBearerModInd.c \ S1AP_E-RABNotToBeModifiedItemBearerModInd.c \ S1AP_CSGMembershipInfo.c \ S1AP_E-RABModificationConfirm.c \ S1AP_E-RABModifyListBearerModConf.c \ S1AP_E-RABModifyItemBearerModConf.c \ S1AP_UEContextModificationIndication.c \ S1AP_UEContextModificationConfirm.c \ S1AP_UEContextSuspendRequest.c \ S1AP_UEContextSuspendResponse.c \ S1AP_UEContextResumeRequest.c \ S1AP_E-RABFailedToResumeListResumeReq.c \ S1AP_E-RABFailedToResumeItemResumeReq.c \ S1AP_UEContextResumeResponse.c \ S1AP_E-RABFailedToResumeListResumeRes.c \ S1AP_E-RABFailedToResumeItemResumeRes.c \ S1AP_UEContextResumeFailure.c \ S1AP_ConnectionEstablishmentIndication.c \ S1AP_RetrieveUEInformation.c \ S1AP_UEInformationTransfer.c \ S1AP_ENBCPRelocationIndication.c \ S1AP_MMECPRelocationIndication.c \ S1AP_Additional-GUTI.c \ S1AP_AreaScopeOfMDT.c \ S1AP_AllocationAndRetentionPriority.c \ S1AP_AssistanceDataForCECapableUEs.c \ S1AP_AssistanceDataForPaging.c \ S1AP_AssistanceDataForRecommendedCells.c \ S1AP_Bearers-SubjectToStatusTransferList.c \ S1AP_Bearers-SubjectToStatusTransfer-Item.c \ S1AP_BearerType.c \ S1AP_BitRate.c \ S1AP_BPLMNs.c \ S1AP_BroadcastCancelledAreaList.c \ S1AP_BroadcastCompletedAreaList.c \ S1AP_CancelledCellinEAI.c \ S1AP_CancelledCellinEAI-Item.c \ S1AP_CancelledCellinTAI.c \ S1AP_CancelledCellinTAI-Item.c \ S1AP_Cause.c \ S1AP_CauseMisc.c \ S1AP_CauseProtocol.c \ S1AP_CauseRadioNetwork.c \ S1AP_CauseTransport.c \ S1AP_CauseNas.c \ S1AP_CellAccessMode.c \ S1AP_CellIdentifierAndCELevelForCECapableUEs.c \ S1AP_CELevel.c \ S1AP_CE-mode-B-SupportIndicator.c \ S1AP_CellIdentity.c \ S1AP_CellID-Broadcast.c \ S1AP_CellID-Broadcast-Item.c \ S1AP_CellID-Cancelled.c \ S1AP_CellID-Cancelled-Item.c \ S1AP_CellBasedMDT.c \ S1AP_CellIdListforMDT.c \ S1AP_Cdma2000PDU.c \ S1AP_Cdma2000RATType.c \ S1AP_Cdma2000SectorID.c \ S1AP_Cdma2000HOStatus.c \ S1AP_Cdma2000HORequiredIndication.c \ S1AP_Cdma2000OneXSRVCCInfo.c \ S1AP_Cdma2000OneXMEID.c \ S1AP_Cdma2000OneXMSI.c \ S1AP_Cdma2000OneXPilot.c \ S1AP_Cdma2000OneXRAND.c \ S1AP_Cell-Size.c \ S1AP_CellType.c \ S1AP_CGI.c \ S1AP_CI.c \ S1AP_CNDomain.c \ S1AP_ConcurrentWarningMessageIndicator.c \ S1AP_Correlation-ID.c \ S1AP_CSFallbackIndicator.c \ S1AP_AdditionalCSFallbackIndicator.c \ S1AP_CSG-Id.c \ S1AP_CSG-IdList.c \ S1AP_CSG-IdList-Item.c \ S1AP_CSGMembershipStatus.c \ S1AP_COUNTvalue.c \ S1AP_COUNTValueExtended.c \ S1AP_COUNTvaluePDCP-SNlength18.c \ S1AP_Coverage-Level.c \ S1AP_CriticalityDiagnostics.c \ S1AP_CriticalityDiagnostics-IE-List.c \ S1AP_CriticalityDiagnostics-IE-Item.c \ S1AP_DataCodingScheme.c \ S1AP_DCN-ID.c \ S1AP_ServedDCNs.c \ S1AP_ServedDCNsItem.c \ S1AP_DL-CP-SecurityInformation.c \ S1AP_DL-Forwarding.c \ S1AP_DL-NAS-MAC.c \ S1AP_Direct-Forwarding-Path-Availability.c \ S1AP_Data-Forwarding-Not-Possible.c \ S1AP_DLNASPDUDeliveryAckRequest.c \ S1AP_EARFCN.c \ S1AP_ECGIList.c \ S1AP_PWSfailedECGIList.c \ S1AP_EmergencyAreaIDList.c \ S1AP_EmergencyAreaID.c \ S1AP_EmergencyAreaID-Broadcast.c \ S1AP_EmergencyAreaID-Broadcast-Item.c \ S1AP_EmergencyAreaID-Cancelled.c \ S1AP_EmergencyAreaID-Cancelled-Item.c \ S1AP_CompletedCellinEAI.c \ S1AP_CompletedCellinEAI-Item.c \ S1AP_ECGI-List.c \ S1AP_EmergencyAreaIDListForRestart.c \ S1AP_ENB-ID.c \ S1AP_GERAN-Cell-ID.c \ S1AP_Global-ENB-ID.c \ S1AP_GUMMEIList.c \ S1AP_ENB-StatusTransfer-TransparentContainer.c \ S1AP_ENB-UE-S1AP-ID.c \ S1AP_ENBname.c \ S1AP_ENBX2TLAs.c \ S1AP_EncryptionAlgorithms.c \ S1AP_EnhancedCoverageRestricted.c \ S1AP_EPLMNs.c \ S1AP_EventType.c \ S1AP_E-RAB-ID.c \ S1AP_E-RABInformationList.c \ S1AP_E-RABInformationListItem.c \ S1AP_E-RABList.c \ S1AP_E-RABItem.c \ S1AP_E-RABLevelQoSParameters.c \ S1AP_EUTRAN-CGI.c \ S1AP_EUTRANRoundTripDelayEstimationInfo.c \ S1AP_ExpectedUEBehaviour.c \ S1AP_ExpectedUEActivityBehaviour.c \ S1AP_ExpectedActivityPeriod.c \ S1AP_ExpectedIdlePeriod.c \ S1AP_SourceOfUEActivityBehaviourInformation.c \ S1AP_ExpectedHOInterval.c \ S1AP_ExtendedRNC-ID.c \ S1AP_ExtendedRepetitionPeriod.c \ S1AP_Extended-UEIdentityIndexValue.c \ S1AP_ForbiddenInterRATs.c \ S1AP_ForbiddenTAs.c \ S1AP_ForbiddenTAs-Item.c \ S1AP_ForbiddenTACs.c \ S1AP_ForbiddenLAs.c \ S1AP_ForbiddenLAs-Item.c \ S1AP_ForbiddenLACs.c \ S1AP_GBR-QosInformation.c \ S1AP_GTP-TEID.c \ S1AP_GUMMEI.c \ S1AP_GUMMEIType.c \ S1AP_GWContextReleaseIndication.c \ S1AP_HandoverRestrictionList.c \ S1AP_HandoverType.c \ S1AP_HFN.c \ S1AP_HFNModified.c \ S1AP_HFNforPDCP-SNlength18.c \ S1AP_Masked-IMEISV.c \ S1AP_ImmediateMDT.c \ S1AP_IMSI.c \ S1AP_InformationOnRecommendedCellsAndENBsForPaging.c \ S1AP_IntegrityProtectionAlgorithms.c \ S1AP_IntendedNumberOfPagingAttempts.c \ S1AP_InterfacesToTrace.c \ S1AP_KillAllWarningMessages.c \ S1AP_LAC.c \ S1AP_LAI.c \ S1AP_LastVisitedCell-Item.c \ S1AP_LastVisitedEUTRANCellInformation.c \ S1AP_LastVisitedUTRANCellInformation.c \ S1AP_LastVisitedGERANCellInformation.c \ S1AP_L3-Information.c \ S1AP_LPPa-PDU.c \ S1AP_LHN-ID.c \ S1AP_Links-to-log.c \ S1AP_ListeningSubframePattern.c \ S1AP_LoggedMDT.c \ S1AP_LoggingInterval.c \ S1AP_LoggingDuration.c \ S1AP_LoggedMBSFNMDT.c \ S1AP_M3Configuration.c \ S1AP_M3period.c \ S1AP_M4Configuration.c \ S1AP_M4period.c \ S1AP_M5Configuration.c \ S1AP_M5period.c \ S1AP_M6Configuration.c \ S1AP_M6report-Interval.c \ S1AP_M6delay-threshold.c \ S1AP_M7Configuration.c \ S1AP_M7period.c \ S1AP_MDT-Activation.c \ S1AP_MDT-Location-Info.c \ S1AP_MDT-Configuration.c \ S1AP_ManagementBasedMDTAllowed.c \ S1AP_MBSFN-ResultToLog.c \ S1AP_MBSFN-ResultToLogInfo.c \ S1AP_MDTPLMNList.c \ S1AP_PrivacyIndicator.c \ S1AP_MDTMode.c \ S1AP_MDTMode-Extension.c \ S1AP_MeasurementsToActivate.c \ S1AP_MeasurementThresholdA2.c \ S1AP_MessageIdentifier.c \ S1AP_MobilityInformation.c \ S1AP_MMEname.c \ S1AP_MMEPagingTarget.c \ S1AP_MMERelaySupportIndicator.c \ S1AP_MME-Group-ID.c \ S1AP_MME-Code.c \ S1AP_MME-UE-S1AP-ID.c \ S1AP_M-TMSI.c \ S1AP_MSClassmark2.c \ S1AP_MSClassmark3.c \ S1AP_MutingAvailabilityIndication.c \ S1AP_MutingPatternInformation.c \ S1AP_NAS-PDU.c \ S1AP_NASSecurityParametersfromE-UTRAN.c \ S1AP_NASSecurityParameterstoE-UTRAN.c \ S1AP_NB-IoT-DefaultPagingDRX.c \ S1AP_NB-IoT-Paging-eDRXInformation.c \ S1AP_NB-IoT-Paging-eDRX-Cycle.c \ S1AP_NB-IoT-PagingTimeWindow.c \ S1AP_NB-IoT-UEIdentityIndexValue.c \ S1AP_NextPagingAreaScope.c \ S1AP_NumberofBroadcastRequest.c \ S1AP_NumberOfBroadcasts.c \ S1AP_OldBSS-ToNewBSS-Information.c \ S1AP_OverloadAction.c \ S1AP_OverloadResponse.c \ S1AP_PagingAttemptInformation.c \ S1AP_PagingAttemptCount.c \ S1AP_Paging-eDRXInformation.c \ S1AP_Paging-eDRX-Cycle.c \ S1AP_PagingTimeWindow.c \ S1AP_PagingDRX.c \ S1AP_PagingPriority.c \ S1AP_PDCP-SN.c \ S1AP_PDCP-SNExtended.c \ S1AP_PDCP-SNlength18.c \ S1AP_M1PeriodicReporting.c \ S1AP_PLMNidentity.c \ S1AP_Port-Number.c \ S1AP_Pre-emptionCapability.c \ S1AP_Pre-emptionVulnerability.c \ S1AP_PriorityLevel.c \ S1AP_ProSeAuthorized.c \ S1AP_ProSeDirectDiscovery.c \ S1AP_ProSeUEtoNetworkRelaying.c \ S1AP_ProSeDirectCommunication.c \ S1AP_PS-ServiceNotAvailable.c \ S1AP_QCI.c \ S1AP_ReceiveStatusofULPDCPSDUs.c \ S1AP_ReceiveStatusOfULPDCPSDUsExtended.c \ S1AP_ReceiveStatusOfULPDCPSDUsPDCP-SNlength18.c \ S1AP_RecommendedCellsForPaging.c \ S1AP_RecommendedCellList.c \ S1AP_RecommendedCellItem.c \ S1AP_RecommendedENBsForPaging.c \ S1AP_RecommendedENBList.c \ S1AP_RecommendedENBItem.c \ S1AP_RelativeMMECapacity.c \ S1AP_RelayNode-Indicator.c \ S1AP_RAC.c \ S1AP_RAT-Type.c \ S1AP_ReportAmountMDT.c \ S1AP_ReportIntervalMDT.c \ S1AP_M1ReportingTrigger.c \ S1AP_RequestType.c \ S1AP_RIMTransfer.c \ S1AP_RIMInformation.c \ S1AP_RIMRoutingAddress.c \ S1AP_ReportArea.c \ S1AP_RepetitionPeriod.c \ S1AP_RLFReportInformation.c \ S1AP_RNC-ID.c \ S1AP_RRC-Container.c \ S1AP_RRC-Establishment-Cause.c \ S1AP_ECGIListForRestart.c \ S1AP_Routing-ID.c \ S1AP_SecurityKey.c \ S1AP_SecurityContext.c \ S1AP_SerialNumber.c \ S1AP_SONInformation.c \ S1AP_SONInformation-Extension.c \ S1AP_SONInformationRequest.c \ S1AP_SONInformationReply.c \ S1AP_SONInformationReport.c \ S1AP_SONConfigurationTransfer.c \ S1AP_SynchronisationInformation.c \ S1AP_Source-ToTarget-TransparentContainer.c \ S1AP_SourceBSS-ToTargetBSS-TransparentContainer.c \ S1AP_SourceeNB-ID.c \ S1AP_SRVCCOperationNotPossible.c \ S1AP_SRVCCOperationPossible.c \ S1AP_SRVCCHOIndication.c \ S1AP_SourceeNB-ToTargeteNB-TransparentContainer.c \ S1AP_SourceRNC-ToTargetRNC-TransparentContainer.c \ S1AP_ServedGUMMEIs.c \ S1AP_ServedGUMMEIsItem.c \ S1AP_ServedGroupIDs.c \ S1AP_ServedMMECs.c \ S1AP_ServedPLMNs.c \ S1AP_SubscriberProfileIDforRFP.c \ S1AP_SupportedTAs.c \ S1AP_SupportedTAs-Item.c \ S1AP_StratumLevel.c \ S1AP_SynchronisationStatus.c \ S1AP_TimeSynchronisationInfo.c \ S1AP_S-TMSI.c \ S1AP_TAC.c \ S1AP_TAIBasedMDT.c \ S1AP_TAIListforMDT.c \ S1AP_TAIListforWarning.c \ S1AP_TAI.c \ S1AP_TAI-Broadcast.c \ S1AP_TAI-Broadcast-Item.c \ S1AP_TAI-Cancelled.c \ S1AP_TAI-Cancelled-Item.c \ S1AP_TABasedMDT.c \ S1AP_TAListforMDT.c \ S1AP_CompletedCellinTAI.c \ S1AP_CompletedCellinTAI-Item.c \ S1AP_TBCD-STRING.c \ S1AP_TargetID.c \ S1AP_TargeteNB-ID.c \ S1AP_TargetRNC-ID.c \ S1AP_TargeteNB-ToSourceeNB-TransparentContainer.c \ S1AP_Target-ToSource-TransparentContainer.c \ S1AP_TargetRNC-ToSourceRNC-TransparentContainer.c \ S1AP_TargetBSS-ToSourceBSS-TransparentContainer.c \ S1AP_M1ThresholdEventA2.c \ S1AP_Threshold-RSRP.c \ S1AP_Threshold-RSRQ.c \ S1AP_TimeToWait.c \ S1AP_Time-UE-StayedInCell.c \ S1AP_Time-UE-StayedInCell-EnhancedGranularity.c \ S1AP_TransportInformation.c \ S1AP_TransportLayerAddress.c \ S1AP_TraceActivation.c \ S1AP_TraceDepth.c \ S1AP_E-UTRAN-Trace-ID.c \ S1AP_TrafficLoadReductionIndication.c \ S1AP_TunnelInformation.c \ S1AP_TypeOfError.c \ S1AP_TAIListForRestart.c \ S1AP_UEAggregateMaximumBitrate.c \ S1AP_UE-RetentionInformation.c \ S1AP_UE-S1AP-IDs.c \ S1AP_UE-S1AP-ID-pair.c \ S1AP_UE-associatedLogicalS1-ConnectionItem.c \ S1AP_UEIdentityIndexValue.c \ S1AP_UE-HistoryInformation.c \ S1AP_UE-HistoryInformationFromTheUE.c \ S1AP_UEPagingID.c \ S1AP_UERadioCapability.c \ S1AP_UERadioCapabilityForPaging.c \ S1AP_UE-RLF-Report-Container.c \ S1AP_UE-RLF-Report-Container-for-extended-bands.c \ S1AP_UESecurityCapabilities.c \ S1AP_UESidelinkAggregateMaximumBitrate.c \ S1AP_UE-Usage-Type.c \ S1AP_UL-CP-SecurityInformation.c \ S1AP_UL-NAS-MAC.c \ S1AP_UL-NAS-Count.c \ S1AP_UserLocationInformation.c \ S1AP_UEUserPlaneCIoTSupportIndicator.c \ S1AP_VoiceSupportMatchIndicator.c \ S1AP_V2XServicesAuthorized.c \ S1AP_VehicleUE.c \ S1AP_PedestrianUE.c \ S1AP_WarningAreaList.c \ S1AP_WarningType.c \ S1AP_WarningSecurityInfo.c \ S1AP_WarningMessageContents.c \ S1AP_X2TNLConfigurationInfo.c \ S1AP_ENBX2ExtTLAs.c \ S1AP_ENBX2ExtTLA.c \ S1AP_ENBX2GTPTLAs.c \ S1AP_ENBIndirectX2TransportLayerAddresses.c \ S1AP_Criticality.c \ S1AP_Presence.c \ S1AP_PrivateIE-ID.c \ S1AP_ProcedureCode.c \ S1AP_ProtocolExtensionID.c \ S1AP_ProtocolIE-ID.c \ S1AP_TriggeringMessage.c \ S1AP_ProtocolIE-Container.c \ S1AP_ProtocolIE-SingleContainer.c \ S1AP_ProtocolIE-Field.c \ S1AP_ProtocolIE-ContainerList.c \ S1AP_ProtocolExtensionContainer.c \ S1AP_ProtocolExtensionField.c \ S1AP_PrivateIE-Container.c \ S1AP_PrivateIE-Field.c ASN_MODULE_HDRS= \ S1AP_S1AP-PDU.h \ S1AP_InitiatingMessage.h \ S1AP_SuccessfulOutcome.h \ S1AP_UnsuccessfulOutcome.h \ S1AP_E-RAB-IE-ContainerList.h \ S1AP_E-RAB-IE-ContainerPairList.h \ S1AP_ProtocolError-IE-ContainerList.h \ S1AP_HandoverRequired.h \ S1AP_HandoverCommand.h \ S1AP_E-RABSubjecttoDataForwardingList.h \ S1AP_E-RABDataForwardingItem.h \ S1AP_HandoverPreparationFailure.h \ S1AP_HandoverRequest.h \ S1AP_E-RABToBeSetupListHOReq.h \ S1AP_E-RABToBeSetupItemHOReq.h \ S1AP_HandoverRequestAcknowledge.h \ S1AP_E-RABAdmittedList.h \ S1AP_E-RABAdmittedItem.h \ S1AP_E-RABFailedtoSetupListHOReqAck.h \ S1AP_E-RABFailedToSetupItemHOReqAck.h \ S1AP_HandoverFailure.h \ S1AP_HandoverNotify.h \ S1AP_PathSwitchRequest.h \ S1AP_E-RABToBeSwitchedDLList.h \ S1AP_E-RABToBeSwitchedDLItem.h \ S1AP_PathSwitchRequestAcknowledge.h \ S1AP_E-RABToBeSwitchedULList.h \ S1AP_E-RABToBeSwitchedULItem.h \ S1AP_PathSwitchRequestFailure.h \ S1AP_HandoverCancel.h \ S1AP_HandoverCancelAcknowledge.h \ S1AP_E-RABSetupRequest.h \ S1AP_E-RABToBeSetupListBearerSUReq.h \ S1AP_E-RABToBeSetupItemBearerSUReq.h \ S1AP_E-RABSetupResponse.h \ S1AP_E-RABSetupListBearerSURes.h \ S1AP_E-RABSetupItemBearerSURes.h \ S1AP_E-RABModifyRequest.h \ S1AP_E-RABToBeModifiedListBearerModReq.h \ S1AP_E-RABToBeModifiedItemBearerModReq.h \ S1AP_E-RABModifyResponse.h \ S1AP_E-RABModifyListBearerModRes.h \ S1AP_E-RABModifyItemBearerModRes.h \ S1AP_E-RABReleaseCommand.h \ S1AP_E-RABReleaseResponse.h \ S1AP_E-RABReleaseListBearerRelComp.h \ S1AP_E-RABReleaseItemBearerRelComp.h \ S1AP_E-RABReleaseIndication.h \ S1AP_InitialContextSetupRequest.h \ S1AP_E-RABToBeSetupListCtxtSUReq.h \ S1AP_E-RABToBeSetupItemCtxtSUReq.h \ S1AP_InitialContextSetupResponse.h \ S1AP_E-RABSetupListCtxtSURes.h \ S1AP_E-RABSetupItemCtxtSURes.h \ S1AP_InitialContextSetupFailure.h \ S1AP_Paging.h \ S1AP_TAIList.h \ S1AP_TAIItem.h \ S1AP_UEContextReleaseRequest.h \ S1AP_UEContextReleaseCommand.h \ S1AP_UEContextReleaseComplete.h \ S1AP_UEContextModificationRequest.h \ S1AP_UEContextModificationResponse.h \ S1AP_UEContextModificationFailure.h \ S1AP_UERadioCapabilityMatchRequest.h \ S1AP_UERadioCapabilityMatchResponse.h \ S1AP_DownlinkNASTransport.h \ S1AP_InitialUEMessage.h \ S1AP_UplinkNASTransport.h \ S1AP_NASNonDeliveryIndication.h \ S1AP_RerouteNASRequest.h \ S1AP_NASDeliveryIndication.h \ S1AP_Reset.h \ S1AP_ResetType.h \ S1AP_ResetAll.h \ S1AP_UE-associatedLogicalS1-ConnectionListRes.h \ S1AP_ResetAcknowledge.h \ S1AP_UE-associatedLogicalS1-ConnectionListResAck.h \ S1AP_ErrorIndication.h \ S1AP_S1SetupRequest.h \ S1AP_S1SetupResponse.h \ S1AP_S1SetupFailure.h \ S1AP_ENBConfigurationUpdate.h \ S1AP_ENBConfigurationUpdateAcknowledge.h \ S1AP_ENBConfigurationUpdateFailure.h \ S1AP_MMEConfigurationUpdate.h \ S1AP_MMEConfigurationUpdateAcknowledge.h \ S1AP_MMEConfigurationUpdateFailure.h \ S1AP_DownlinkS1cdma2000tunnelling.h \ S1AP_UplinkS1cdma2000tunnelling.h \ S1AP_UECapabilityInfoIndication.h \ S1AP_ENBStatusTransfer.h \ S1AP_MMEStatusTransfer.h \ S1AP_TraceStart.h \ S1AP_TraceFailureIndication.h \ S1AP_DeactivateTrace.h \ S1AP_CellTrafficTrace.h \ S1AP_LocationReportingControl.h \ S1AP_LocationReportingFailureIndication.h \ S1AP_LocationReport.h \ S1AP_OverloadStart.h \ S1AP_OverloadStop.h \ S1AP_WriteReplaceWarningRequest.h \ S1AP_WriteReplaceWarningResponse.h \ S1AP_ENBDirectInformationTransfer.h \ S1AP_Inter-SystemInformationTransferType.h \ S1AP_MMEDirectInformationTransfer.h \ S1AP_ENBConfigurationTransfer.h \ S1AP_MMEConfigurationTransfer.h \ S1AP_PrivateMessage.h \ S1AP_KillRequest.h \ S1AP_KillResponse.h \ S1AP_PWSRestartIndication.h \ S1AP_PWSFailureIndication.h \ S1AP_DownlinkUEAssociatedLPPaTransport.h \ S1AP_UplinkUEAssociatedLPPaTransport.h \ S1AP_DownlinkNonUEAssociatedLPPaTransport.h \ S1AP_UplinkNonUEAssociatedLPPaTransport.h \ S1AP_E-RABModificationIndication.h \ S1AP_E-RABToBeModifiedListBearerModInd.h \ S1AP_E-RABToBeModifiedItemBearerModInd.h \ S1AP_E-RABNotToBeModifiedListBearerModInd.h \ S1AP_E-RABNotToBeModifiedItemBearerModInd.h \ S1AP_CSGMembershipInfo.h \ S1AP_E-RABModificationConfirm.h \ S1AP_E-RABModifyListBearerModConf.h \ S1AP_E-RABModifyItemBearerModConf.h \ S1AP_UEContextModificationIndication.h \ S1AP_UEContextModificationConfirm.h \ S1AP_UEContextSuspendRequest.h \ S1AP_UEContextSuspendResponse.h \ S1AP_UEContextResumeRequest.h \ S1AP_E-RABFailedToResumeListResumeReq.h \ S1AP_E-RABFailedToResumeItemResumeReq.h \ S1AP_UEContextResumeResponse.h \ S1AP_E-RABFailedToResumeListResumeRes.h \ S1AP_E-RABFailedToResumeItemResumeRes.h \ S1AP_UEContextResumeFailure.h \ S1AP_ConnectionEstablishmentIndication.h \ S1AP_RetrieveUEInformation.h \ S1AP_UEInformationTransfer.h \ S1AP_ENBCPRelocationIndication.h \ S1AP_MMECPRelocationIndication.h \ S1AP_Additional-GUTI.h \ S1AP_AreaScopeOfMDT.h \ S1AP_AllocationAndRetentionPriority.h \ S1AP_AssistanceDataForCECapableUEs.h \ S1AP_AssistanceDataForPaging.h \ S1AP_AssistanceDataForRecommendedCells.h \ S1AP_Bearers-SubjectToStatusTransferList.h \ S1AP_Bearers-SubjectToStatusTransfer-Item.h \ S1AP_BearerType.h \ S1AP_BitRate.h \ S1AP_BPLMNs.h \ S1AP_BroadcastCancelledAreaList.h \ S1AP_BroadcastCompletedAreaList.h \ S1AP_CancelledCellinEAI.h \ S1AP_CancelledCellinEAI-Item.h \ S1AP_CancelledCellinTAI.h \ S1AP_CancelledCellinTAI-Item.h \ S1AP_Cause.h \ S1AP_CauseMisc.h \ S1AP_CauseProtocol.h \ S1AP_CauseRadioNetwork.h \ S1AP_CauseTransport.h \ S1AP_CauseNas.h \ S1AP_CellAccessMode.h \ S1AP_CellIdentifierAndCELevelForCECapableUEs.h \ S1AP_CELevel.h \ S1AP_CE-mode-B-SupportIndicator.h \ S1AP_CellIdentity.h \ S1AP_CellID-Broadcast.h \ S1AP_CellID-Broadcast-Item.h \ S1AP_CellID-Cancelled.h \ S1AP_CellID-Cancelled-Item.h \ S1AP_CellBasedMDT.h \ S1AP_CellIdListforMDT.h \ S1AP_Cdma2000PDU.h \ S1AP_Cdma2000RATType.h \ S1AP_Cdma2000SectorID.h \ S1AP_Cdma2000HOStatus.h \ S1AP_Cdma2000HORequiredIndication.h \ S1AP_Cdma2000OneXSRVCCInfo.h \ S1AP_Cdma2000OneXMEID.h \ S1AP_Cdma2000OneXMSI.h \ S1AP_Cdma2000OneXPilot.h \ S1AP_Cdma2000OneXRAND.h \ S1AP_Cell-Size.h \ S1AP_CellType.h \ S1AP_CGI.h \ S1AP_CI.h \ S1AP_CNDomain.h \ S1AP_ConcurrentWarningMessageIndicator.h \ S1AP_Correlation-ID.h \ S1AP_CSFallbackIndicator.h \ S1AP_AdditionalCSFallbackIndicator.h \ S1AP_CSG-Id.h \ S1AP_CSG-IdList.h \ S1AP_CSG-IdList-Item.h \ S1AP_CSGMembershipStatus.h \ S1AP_COUNTvalue.h \ S1AP_COUNTValueExtended.h \ S1AP_COUNTvaluePDCP-SNlength18.h \ S1AP_Coverage-Level.h \ S1AP_CriticalityDiagnostics.h \ S1AP_CriticalityDiagnostics-IE-List.h \ S1AP_CriticalityDiagnostics-IE-Item.h \ S1AP_DataCodingScheme.h \ S1AP_DCN-ID.h \ S1AP_ServedDCNs.h \ S1AP_ServedDCNsItem.h \ S1AP_DL-CP-SecurityInformation.h \ S1AP_DL-Forwarding.h \ S1AP_DL-NAS-MAC.h \ S1AP_Direct-Forwarding-Path-Availability.h \ S1AP_Data-Forwarding-Not-Possible.h \ S1AP_DLNASPDUDeliveryAckRequest.h \ S1AP_EARFCN.h \ S1AP_ECGIList.h \ S1AP_PWSfailedECGIList.h \ S1AP_EmergencyAreaIDList.h \ S1AP_EmergencyAreaID.h \ S1AP_EmergencyAreaID-Broadcast.h \ S1AP_EmergencyAreaID-Broadcast-Item.h \ S1AP_EmergencyAreaID-Cancelled.h \ S1AP_EmergencyAreaID-Cancelled-Item.h \ S1AP_CompletedCellinEAI.h \ S1AP_CompletedCellinEAI-Item.h \ S1AP_ECGI-List.h \ S1AP_EmergencyAreaIDListForRestart.h \ S1AP_ENB-ID.h \ S1AP_GERAN-Cell-ID.h \ S1AP_Global-ENB-ID.h \ S1AP_GUMMEIList.h \ S1AP_ENB-StatusTransfer-TransparentContainer.h \ S1AP_ENB-UE-S1AP-ID.h \ S1AP_ENBname.h \ S1AP_ENBX2TLAs.h \ S1AP_EncryptionAlgorithms.h \ S1AP_EnhancedCoverageRestricted.h \ S1AP_EPLMNs.h \ S1AP_EventType.h \ S1AP_E-RAB-ID.h \ S1AP_E-RABInformationList.h \ S1AP_E-RABInformationListItem.h \ S1AP_E-RABList.h \ S1AP_E-RABItem.h \ S1AP_E-RABLevelQoSParameters.h \ S1AP_EUTRAN-CGI.h \ S1AP_EUTRANRoundTripDelayEstimationInfo.h \ S1AP_ExpectedUEBehaviour.h \ S1AP_ExpectedUEActivityBehaviour.h \ S1AP_ExpectedActivityPeriod.h \ S1AP_ExpectedIdlePeriod.h \ S1AP_SourceOfUEActivityBehaviourInformation.h \ S1AP_ExpectedHOInterval.h \ S1AP_ExtendedRNC-ID.h \ S1AP_ExtendedRepetitionPeriod.h \ S1AP_Extended-UEIdentityIndexValue.h \ S1AP_ForbiddenInterRATs.h \ S1AP_ForbiddenTAs.h \ S1AP_ForbiddenTAs-Item.h \ S1AP_ForbiddenTACs.h \ S1AP_ForbiddenLAs.h \ S1AP_ForbiddenLAs-Item.h \ S1AP_ForbiddenLACs.h \ S1AP_GBR-QosInformation.h \ S1AP_GTP-TEID.h \ S1AP_GUMMEI.h \ S1AP_GUMMEIType.h \ S1AP_GWContextReleaseIndication.h \ S1AP_HandoverRestrictionList.h \ S1AP_HandoverType.h \ S1AP_HFN.h \ S1AP_HFNModified.h \ S1AP_HFNforPDCP-SNlength18.h \ S1AP_Masked-IMEISV.h \ S1AP_ImmediateMDT.h \ S1AP_IMSI.h \ S1AP_InformationOnRecommendedCellsAndENBsForPaging.h \ S1AP_IntegrityProtectionAlgorithms.h \ S1AP_IntendedNumberOfPagingAttempts.h \ S1AP_InterfacesToTrace.h \ S1AP_KillAllWarningMessages.h \ S1AP_LAC.h \ S1AP_LAI.h \ S1AP_LastVisitedCell-Item.h \ S1AP_LastVisitedEUTRANCellInformation.h \ S1AP_LastVisitedUTRANCellInformation.h \ S1AP_LastVisitedGERANCellInformation.h \ S1AP_L3-Information.h \ S1AP_LPPa-PDU.h \ S1AP_LHN-ID.h \ S1AP_Links-to-log.h \ S1AP_ListeningSubframePattern.h \ S1AP_LoggedMDT.h \ S1AP_LoggingInterval.h \ S1AP_LoggingDuration.h \ S1AP_LoggedMBSFNMDT.h \ S1AP_M3Configuration.h \ S1AP_M3period.h \ S1AP_M4Configuration.h \ S1AP_M4period.h \ S1AP_M5Configuration.h \ S1AP_M5period.h \ S1AP_M6Configuration.h \ S1AP_M6report-Interval.h \ S1AP_M6delay-threshold.h \ S1AP_M7Configuration.h \ S1AP_M7period.h \ S1AP_MDT-Activation.h \ S1AP_MDT-Location-Info.h \ S1AP_MDT-Configuration.h \ S1AP_ManagementBasedMDTAllowed.h \ S1AP_MBSFN-ResultToLog.h \ S1AP_MBSFN-ResultToLogInfo.h \ S1AP_MDTPLMNList.h \ S1AP_PrivacyIndicator.h \ S1AP_MDTMode.h \ S1AP_MDTMode-Extension.h \ S1AP_MeasurementsToActivate.h \ S1AP_MeasurementThresholdA2.h \ S1AP_MessageIdentifier.h \ S1AP_MobilityInformation.h \ S1AP_MMEname.h \ S1AP_MMEPagingTarget.h \ S1AP_MMERelaySupportIndicator.h \ S1AP_MME-Group-ID.h \ S1AP_MME-Code.h \ S1AP_MME-UE-S1AP-ID.h \ S1AP_M-TMSI.h \ S1AP_MSClassmark2.h \ S1AP_MSClassmark3.h \ S1AP_MutingAvailabilityIndication.h \ S1AP_MutingPatternInformation.h \ S1AP_NAS-PDU.h \ S1AP_NASSecurityParametersfromE-UTRAN.h \ S1AP_NASSecurityParameterstoE-UTRAN.h \ S1AP_NB-IoT-DefaultPagingDRX.h \ S1AP_NB-IoT-Paging-eDRXInformation.h \ S1AP_NB-IoT-Paging-eDRX-Cycle.h \ S1AP_NB-IoT-PagingTimeWindow.h \ S1AP_NB-IoT-UEIdentityIndexValue.h \ S1AP_NextPagingAreaScope.h \ S1AP_NumberofBroadcastRequest.h \ S1AP_NumberOfBroadcasts.h \ S1AP_OldBSS-ToNewBSS-Information.h \ S1AP_OverloadAction.h \ S1AP_OverloadResponse.h \ S1AP_PagingAttemptInformation.h \ S1AP_PagingAttemptCount.h \ S1AP_Paging-eDRXInformation.h \ S1AP_Paging-eDRX-Cycle.h \ S1AP_PagingTimeWindow.h \ S1AP_PagingDRX.h \ S1AP_PagingPriority.h \ S1AP_PDCP-SN.h \ S1AP_PDCP-SNExtended.h \ S1AP_PDCP-SNlength18.h \ S1AP_M1PeriodicReporting.h \ S1AP_PLMNidentity.h \ S1AP_Port-Number.h \ S1AP_Pre-emptionCapability.h \ S1AP_Pre-emptionVulnerability.h \ S1AP_PriorityLevel.h \ S1AP_ProSeAuthorized.h \ S1AP_ProSeDirectDiscovery.h \ S1AP_ProSeUEtoNetworkRelaying.h \ S1AP_ProSeDirectCommunication.h \ S1AP_PS-ServiceNotAvailable.h \ S1AP_QCI.h \ S1AP_ReceiveStatusofULPDCPSDUs.h \ S1AP_ReceiveStatusOfULPDCPSDUsExtended.h \ S1AP_ReceiveStatusOfULPDCPSDUsPDCP-SNlength18.h \ S1AP_RecommendedCellsForPaging.h \ S1AP_RecommendedCellList.h \ S1AP_RecommendedCellItem.h \ S1AP_RecommendedENBsForPaging.h \ S1AP_RecommendedENBList.h \ S1AP_RecommendedENBItem.h \ S1AP_RelativeMMECapacity.h \ S1AP_RelayNode-Indicator.h \ S1AP_RAC.h \ S1AP_RAT-Type.h \ S1AP_ReportAmountMDT.h \ S1AP_ReportIntervalMDT.h \ S1AP_M1ReportingTrigger.h \ S1AP_RequestType.h \ S1AP_RIMTransfer.h \ S1AP_RIMInformation.h \ S1AP_RIMRoutingAddress.h \ S1AP_ReportArea.h \ S1AP_RepetitionPeriod.h \ S1AP_RLFReportInformation.h \ S1AP_RNC-ID.h \ S1AP_RRC-Container.h \ S1AP_RRC-Establishment-Cause.h \ S1AP_ECGIListForRestart.h \ S1AP_Routing-ID.h \ S1AP_SecurityKey.h \ S1AP_SecurityContext.h \ S1AP_SerialNumber.h \ S1AP_SONInformation.h \ S1AP_SONInformation-Extension.h \ S1AP_SONInformationRequest.h \ S1AP_SONInformationReply.h \ S1AP_SONInformationReport.h \ S1AP_SONConfigurationTransfer.h \ S1AP_SynchronisationInformation.h \ S1AP_Source-ToTarget-TransparentContainer.h \ S1AP_SourceBSS-ToTargetBSS-TransparentContainer.h \ S1AP_SourceeNB-ID.h \ S1AP_SRVCCOperationNotPossible.h \ S1AP_SRVCCOperationPossible.h \ S1AP_SRVCCHOIndication.h \ S1AP_SourceeNB-ToTargeteNB-TransparentContainer.h \ S1AP_SourceRNC-ToTargetRNC-TransparentContainer.h \ S1AP_ServedGUMMEIs.h \ S1AP_ServedGUMMEIsItem.h \ S1AP_ServedGroupIDs.h \ S1AP_ServedMMECs.h \ S1AP_ServedPLMNs.h \ S1AP_SubscriberProfileIDforRFP.h \ S1AP_SupportedTAs.h \ S1AP_SupportedTAs-Item.h \ S1AP_StratumLevel.h \ S1AP_SynchronisationStatus.h \ S1AP_TimeSynchronisationInfo.h \ S1AP_S-TMSI.h \ S1AP_TAC.h \ S1AP_TAIBasedMDT.h \ S1AP_TAIListforMDT.h \ S1AP_TAIListforWarning.h \ S1AP_TAI.h \ S1AP_TAI-Broadcast.h \ S1AP_TAI-Broadcast-Item.h \ S1AP_TAI-Cancelled.h \ S1AP_TAI-Cancelled-Item.h \ S1AP_TABasedMDT.h \ S1AP_TAListforMDT.h \ S1AP_CompletedCellinTAI.h \ S1AP_CompletedCellinTAI-Item.h \ S1AP_TBCD-STRING.h \ S1AP_TargetID.h \ S1AP_TargeteNB-ID.h \ S1AP_TargetRNC-ID.h \ S1AP_TargeteNB-ToSourceeNB-TransparentContainer.h \ S1AP_Target-ToSource-TransparentContainer.h \ S1AP_TargetRNC-ToSourceRNC-TransparentContainer.h \ S1AP_TargetBSS-ToSourceBSS-TransparentContainer.h \ S1AP_M1ThresholdEventA2.h \ S1AP_Threshold-RSRP.h \ S1AP_Threshold-RSRQ.h \ S1AP_TimeToWait.h \ S1AP_Time-UE-StayedInCell.h \ S1AP_Time-UE-StayedInCell-EnhancedGranularity.h \ S1AP_TransportInformation.h \ S1AP_TransportLayerAddress.h \ S1AP_TraceActivation.h \ S1AP_TraceDepth.h \ S1AP_E-UTRAN-Trace-ID.h \ S1AP_TrafficLoadReductionIndication.h \ S1AP_TunnelInformation.h \ S1AP_TypeOfError.h \ S1AP_TAIListForRestart.h \ S1AP_UEAggregateMaximumBitrate.h \ S1AP_UE-RetentionInformation.h \ S1AP_UE-S1AP-IDs.h \ S1AP_UE-S1AP-ID-pair.h \ S1AP_UE-associatedLogicalS1-ConnectionItem.h \ S1AP_UEIdentityIndexValue.h \ S1AP_UE-HistoryInformation.h \ S1AP_UE-HistoryInformationFromTheUE.h \ S1AP_UEPagingID.h \ S1AP_UERadioCapability.h \ S1AP_UERadioCapabilityForPaging.h \ S1AP_UE-RLF-Report-Container.h \ S1AP_UE-RLF-Report-Container-for-extended-bands.h \ S1AP_UESecurityCapabilities.h \ S1AP_UESidelinkAggregateMaximumBitrate.h \ S1AP_UE-Usage-Type.h \ S1AP_UL-CP-SecurityInformation.h \ S1AP_UL-NAS-MAC.h \ S1AP_UL-NAS-Count.h \ S1AP_UserLocationInformation.h \ S1AP_UEUserPlaneCIoTSupportIndicator.h \ S1AP_VoiceSupportMatchIndicator.h \ S1AP_V2XServicesAuthorized.h \ S1AP_VehicleUE.h \ S1AP_PedestrianUE.h \ S1AP_WarningAreaList.h \ S1AP_WarningType.h \ S1AP_WarningSecurityInfo.h \ S1AP_WarningMessageContents.h \ S1AP_X2TNLConfigurationInfo.h \ S1AP_ENBX2ExtTLAs.h \ S1AP_ENBX2ExtTLA.h \ S1AP_ENBX2GTPTLAs.h \ S1AP_ENBIndirectX2TransportLayerAddresses.h \ S1AP_Criticality.h \ S1AP_Presence.h \ S1AP_PrivateIE-ID.h \ S1AP_ProcedureCode.h \ S1AP_ProtocolExtensionID.h \ S1AP_ProtocolIE-ID.h \ S1AP_TriggeringMessage.h \ S1AP_ProtocolIE-Container.h \ S1AP_ProtocolIE-SingleContainer.h \ S1AP_ProtocolIE-Field.h \ S1AP_ProtocolIE-ContainerPair.h \ S1AP_ProtocolIE-FieldPair.h \ S1AP_ProtocolIE-ContainerList.h \ S1AP_ProtocolIE-ContainerPairList.h \ S1AP_ProtocolExtensionContainer.h \ S1AP_ProtocolExtensionField.h \ S1AP_PrivateIE-Container.h \ S1AP_PrivateIE-Field.h ASN_MODULE_HDRS+=ANY.h ASN_MODULE_SRCS+=ANY.c ASN_MODULE_HDRS+=OCTET_STRING.h ASN_MODULE_HDRS+=OPEN_TYPE.h ASN_MODULE_SRCS+=OPEN_TYPE.c ASN_MODULE_HDRS+=constr_CHOICE.h ASN_MODULE_HDRS+=BOOLEAN.h ASN_MODULE_SRCS+=BOOLEAN.c ASN_MODULE_HDRS+=INTEGER.h ASN_MODULE_SRCS+=INTEGER.c ASN_MODULE_HDRS+=NULL.h ASN_MODULE_SRCS+=NULL.c ASN_MODULE_HDRS+=NativeEnumerated.h ASN_MODULE_SRCS+=NativeEnumerated.c ASN_MODULE_HDRS+=NativeInteger.h ASN_MODULE_SRCS+=NativeInteger.c ASN_MODULE_HDRS+=OBJECT_IDENTIFIER.h ASN_MODULE_SRCS+=OBJECT_IDENTIFIER.c ASN_MODULE_HDRS+=PrintableString.h ASN_MODULE_SRCS+=PrintableString.c ASN_MODULE_HDRS+=asn_SEQUENCE_OF.h ASN_MODULE_SRCS+=asn_SEQUENCE_OF.c ASN_MODULE_HDRS+=asn_SET_OF.h ASN_MODULE_SRCS+=asn_SET_OF.c ASN_MODULE_SRCS+=constr_CHOICE.c ASN_MODULE_HDRS+=constr_SEQUENCE.h ASN_MODULE_SRCS+=constr_SEQUENCE.c ASN_MODULE_HDRS+=constr_SEQUENCE_OF.h ASN_MODULE_SRCS+=constr_SEQUENCE_OF.c ASN_MODULE_HDRS+=constr_SET_OF.h ASN_MODULE_SRCS+=constr_SET_OF.c ASN_MODULE_HDRS+=asn_application.h ASN_MODULE_SRCS+=asn_application.c ASN_MODULE_HDRS+=asn_ioc.h ASN_MODULE_HDRS+=asn_system.h ASN_MODULE_HDRS+=asn_codecs.h ASN_MODULE_HDRS+=asn_internal.h ASN_MODULE_SRCS+=asn_internal.c ASN_MODULE_HDRS+=asn_random_fill.h ASN_MODULE_SRCS+=asn_random_fill.c ASN_MODULE_HDRS+=asn_bit_data.h ASN_MODULE_SRCS+=asn_bit_data.c ASN_MODULE_SRCS+=OCTET_STRING.c ASN_MODULE_HDRS+=BIT_STRING.h ASN_MODULE_SRCS+=BIT_STRING.c ASN_MODULE_SRCS+=asn_codecs_prim.c ASN_MODULE_HDRS+=asn_codecs_prim.h ASN_MODULE_HDRS+=ber_tlv_length.h ASN_MODULE_SRCS+=ber_tlv_length.c ASN_MODULE_HDRS+=ber_tlv_tag.h ASN_MODULE_SRCS+=ber_tlv_tag.c ASN_MODULE_HDRS+=ber_decoder.h ASN_MODULE_SRCS+=ber_decoder.c ASN_MODULE_HDRS+=der_encoder.h ASN_MODULE_SRCS+=der_encoder.c ASN_MODULE_HDRS+=constr_TYPE.h ASN_MODULE_SRCS+=constr_TYPE.c ASN_MODULE_HDRS+=constraints.h ASN_MODULE_SRCS+=constraints.c ASN_MODULE_HDRS+=xer_support.h ASN_MODULE_SRCS+=xer_support.c ASN_MODULE_HDRS+=xer_decoder.h ASN_MODULE_SRCS+=xer_decoder.c ASN_MODULE_HDRS+=xer_encoder.h ASN_MODULE_SRCS+=xer_encoder.c ASN_MODULE_HDRS+=per_support.h ASN_MODULE_SRCS+=per_support.c ASN_MODULE_HDRS+=per_decoder.h ASN_MODULE_SRCS+=per_decoder.c ASN_MODULE_HDRS+=per_encoder.h ASN_MODULE_SRCS+=per_encoder.c ASN_MODULE_HDRS+=per_opentype.h ASN_MODULE_SRCS+=per_opentype.c ASN_MODULE_HDRS+=oer_decoder.h ASN_MODULE_HDRS+=oer_encoder.h ASN_MODULE_HDRS+=oer_support.h ASN_MODULE_SRCS+=oer_decoder.c ASN_MODULE_SRCS+=oer_encoder.c ASN_MODULE_SRCS+=oer_support.c ASN_MODULE_SRCS+=OPEN_TYPE_oer.c ASN_MODULE_SRCS+=INTEGER_oer.c ASN_MODULE_SRCS+=BIT_STRING_oer.c ASN_MODULE_SRCS+=OCTET_STRING_oer.c ASN_MODULE_SRCS+=NativeInteger_oer.c ASN_MODULE_SRCS+=NativeEnumerated_oer.c ASN_MODULE_SRCS+=constr_CHOICE_oer.c ASN_MODULE_SRCS+=constr_SEQUENCE_oer.c ASN_MODULE_SRCS+=constr_SET_OF_oer.c ASN_MODULE_CFLAGS= pkglib_LTLIBRARIES=libs1apasn1c.la libs1apasn1c_la_SOURCES=$(ASN_MODULE_SRCS) $(ASN_MODULE_HDRS) libs1apasn1c_la_DEPENDENCIES = \ $(top_srcdir)/lib/core/src/libcore.la \ $(NULL) libs1apasn1c_la_LIBADD = \ $(top_srcdir)/lib/core/src/libcore.la \ $(NULL) AM_LDFLAGS = \ -version-info @LIBVERSION@ \ $(NULL) AM_CPPFLAGS = \ -I$(top_srcdir)/lib/core/include \ $(NULL) AM_CFLAGS = \ ${ASN_MODULE_CFLAGS} \ -Wno-parentheses-equality -Wno-overflow -Wno-format \ $(NULL) MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = core *.stackdump regen: regenerate-from-asn1-source regenerate-from-asn1-source: ASN1C_PREFIX=S1AP_ ../../../../asn1c.velichkov/asn1c/asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps ../support/r14.4.0/36413-e40.asn rm -f S1AP_E-RAB-IE-ContainerPairList.c S1AP_ProtocolError-IE-ContainerList.c S1AP_ProtocolIE-ContainerPair.c S1AP_ProtocolIE-FieldPair.c S1AP_ProtocolIE-ContainerPairList.c rm -f converter-example.mk converter-example.c pdu_collection.c rm -f Makefile.am.asn1convert Makefile.am.libasncodec nextepc-0.3.10/lib/s1ap/asn1c/NULL.c000066400000000000000000000153761333553357400166250ustar00rootroot00000000000000/*- * Copyright (c) 2003, 2005 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include #include /* Implemented in terms of BOOLEAN type */ /* * NULL basic type description. */ static const ber_tlv_tag_t asn_DEF_NULL_tags[] = { (ASN_TAG_CLASS_UNIVERSAL | (5 << 2)) }; asn_TYPE_operation_t asn_OP_NULL = { BOOLEAN_free, NULL_print, NULL_compare, BOOLEAN_decode_ber, /* Implemented in terms of BOOLEAN */ NULL_encode_der, /* Special handling of DER encoding */ NULL_decode_xer, NULL_encode_xer, #ifdef ASN_DISABLE_OER_SUPPORT 0, 0, #else NULL_decode_oer, NULL_encode_oer, #endif /* ASN_DISABLE_OER_SUPPORT */ #ifdef ASN_DISABLE_PER_SUPPORT 0, 0, 0, 0, #else NULL_decode_uper, /* Unaligned PER decoder */ NULL_encode_uper, /* Unaligned PER encoder */ NULL_decode_aper, /* Aligned PER decoder */ NULL_encode_aper, /* Aligned PER encoder */ #endif /* ASN_DISABLE_PER_SUPPORT */ NULL_random_fill, 0 /* Use generic outmost tag fetcher */ }; asn_TYPE_descriptor_t asn_DEF_NULL = { "NULL", "NULL", &asn_OP_NULL, asn_DEF_NULL_tags, sizeof(asn_DEF_NULL_tags) / sizeof(asn_DEF_NULL_tags[0]), asn_DEF_NULL_tags, /* Same as above */ sizeof(asn_DEF_NULL_tags) / sizeof(asn_DEF_NULL_tags[0]), { 0, 0, asn_generic_no_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; asn_enc_rval_t NULL_encode_der(const asn_TYPE_descriptor_t *td, const void *ptr, int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key) { asn_enc_rval_t erval; erval.encoded = der_write_tags(td, 0, tag_mode, 0, tag, cb, app_key); if(erval.encoded == -1) { erval.failed_type = td; erval.structure_ptr = ptr; } ASN__ENCODED_OK(erval); } asn_enc_rval_t NULL_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, void *app_key) { asn_enc_rval_t er; (void)td; (void)sptr; (void)ilevel; (void)flags; (void)cb; (void)app_key; /* XMLNullValue is empty */ er.encoded = 0; ASN__ENCODED_OK(er); } static enum xer_pbd_rval NULL__xer_body_decode(const asn_TYPE_descriptor_t *td, void *sptr, const void *chunk_buf, size_t chunk_size) { (void)td; (void)sptr; (void)chunk_buf; /* Going to be empty according to the rules below. */ /* * There must be no content in self-terminating tag. */ if(chunk_size) return XPBD_BROKEN_ENCODING; else return XPBD_BODY_CONSUMED; } asn_dec_rval_t NULL_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **sptr, const char *opt_mname, const void *buf_ptr, size_t size) { return xer_decode_primitive(opt_codec_ctx, td, sptr, sizeof(NULL_t), opt_mname, buf_ptr, size, NULL__xer_body_decode); } int NULL_compare(const asn_TYPE_descriptor_t *td, const void *a, const void *b) { (void)td; (void)a; (void)b; return 0; } int NULL_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { (void)td; /* Unused argument */ (void)ilevel; /* Unused argument */ if(sptr) { return (cb("", 9, app_key) < 0) ? -1 : 0; } else { return (cb("", 8, app_key) < 0) ? -1 : 0; } } #ifndef ASN_DISABLE_OER_SUPPORT asn_dec_rval_t NULL_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_oer_constraints_t *constraints, void **sptr, const void *ptr, size_t size) { asn_dec_rval_t rv = {RC_OK, 0}; (void)opt_codec_ctx; (void)td; (void)constraints; (void)ptr; (void)size; if(!*sptr) { *sptr = MALLOC(sizeof(NULL_t)); if(*sptr) { *(NULL_t *)*sptr = 0; } else { ASN__DECODE_FAILED; } } return rv; } asn_enc_rval_t NULL_encode_oer(const asn_TYPE_descriptor_t *td, const asn_oer_constraints_t *constraints, const void *sptr, asn_app_consume_bytes_f *cb, void *app_key) { asn_enc_rval_t er; (void)td; (void)sptr; (void)constraints; (void)cb; (void)app_key; er.encoded = 0; /* Encoding in 0 bytes. */ ASN__ENCODED_OK(er); } #endif /* ASN_DISABLE_OER_SUPPORT */ #ifndef ASN_DISABLE_PER_SUPPORT asn_dec_rval_t NULL_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { asn_dec_rval_t rv; (void)opt_codec_ctx; (void)td; (void)constraints; (void)pd; if(!*sptr) { *sptr = MALLOC(sizeof(NULL_t)); if(*sptr) { *(NULL_t *)*sptr = 0; } else { ASN__DECODE_FAILED; } } /* * NULL type does not have content octets. */ rv.code = RC_OK; rv.consumed = 0; return rv; } asn_enc_rval_t NULL_encode_uper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { asn_enc_rval_t er; (void)td; (void)constraints; (void)sptr; (void)po; er.encoded = 0; ASN__ENCODED_OK(er); } asn_dec_rval_t NULL_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { asn_dec_rval_t rv; (void)opt_codec_ctx; (void)td; (void)constraints; (void)pd; if(!*sptr) { *sptr = MALLOC(sizeof(NULL_t)); if(*sptr) { *(NULL_t *)*sptr = 0; } else { ASN__DECODE_FAILED; } } /* * NULL type does not have content octets. */ rv.code = RC_OK; rv.consumed = 0; return rv; } asn_enc_rval_t NULL_encode_aper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { asn_enc_rval_t er; (void)td; (void)constraints; (void)sptr; (void)po; er.encoded = 0; ASN__ENCODED_OK(er); } #endif /* ASN_DISABLE_PER_SUPPORT */ asn_random_fill_result_t NULL_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, const asn_encoding_constraints_t *constr, size_t max_length) { asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; NULL_t *st = *sptr; (void)td; (void)constr; if(max_length == 0) return result_skipped; if(st == NULL) { st = (NULL_t *)(*sptr = CALLOC(1, sizeof(*st))); if(st == NULL) { return result_failed; } } return result_ok; } nextepc-0.3.10/lib/s1ap/asn1c/NULL.h000066400000000000000000000021431333553357400166160ustar00rootroot00000000000000/*- * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef ASN_TYPE_NULL_H #define ASN_TYPE_NULL_H #include #include #ifdef __cplusplus extern "C" { #endif /* * The value of the NULL type is meaningless: see BOOLEAN if you want to * carry true/false semantics. */ typedef int NULL_t; extern asn_TYPE_descriptor_t asn_DEF_NULL; extern asn_TYPE_operation_t asn_OP_NULL; asn_struct_print_f NULL_print; asn_struct_compare_f NULL_compare; der_type_encoder_f NULL_encode_der; xer_type_decoder_f NULL_decode_xer; xer_type_encoder_f NULL_encode_xer; oer_type_decoder_f NULL_decode_oer; oer_type_encoder_f NULL_encode_oer; per_type_decoder_f NULL_decode_uper; per_type_encoder_f NULL_encode_uper; per_type_decoder_f NULL_decode_aper; per_type_encoder_f NULL_encode_aper; asn_random_fill_f NULL_random_fill; #define NULL_free BOOLEAN_free #define NULL_decode_ber BOOLEAN_decode_ber #define NULL_constraint asn_generic_no_constraint #ifdef __cplusplus } #endif #endif /* NULL_H */ nextepc-0.3.10/lib/s1ap/asn1c/NativeEnumerated.c000066400000000000000000000245341333553357400213070ustar00rootroot00000000000000/*- * Copyright (c) 2004, 2007 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ /* * Read the NativeInteger.h for the explanation wrt. differences between * INTEGER and NativeInteger. * Basically, both are decoders and encoders of ASN.1 INTEGER type, but this * implementation deals with the standard (machine-specific) representation * of them instead of using the platform-independent buffer. */ #include #include /* * NativeEnumerated basic type description. */ static const ber_tlv_tag_t asn_DEF_NativeEnumerated_tags[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_operation_t asn_OP_NativeEnumerated = { NativeInteger_free, NativeInteger_print, NativeInteger_compare, NativeInteger_decode_ber, NativeInteger_encode_der, NativeInteger_decode_xer, NativeEnumerated_encode_xer, #ifdef ASN_DISABLE_OER_SUPPORT 0, 0, #else NativeEnumerated_decode_oer, NativeEnumerated_encode_oer, #endif /* ASN_DISABLE_OER_SUPPORT */ #ifdef ASN_DISABLE_PER_SUPPORT 0, 0, 0, 0, #else NativeEnumerated_decode_uper, NativeEnumerated_encode_uper, NativeEnumerated_decode_aper, NativeEnumerated_encode_aper, #endif /* ASN_DISABLE_PER_SUPPORT */ NativeEnumerated_random_fill, 0 /* Use generic outmost tag fetcher */ }; asn_TYPE_descriptor_t asn_DEF_NativeEnumerated = { "ENUMERATED", /* The ASN.1 type is still ENUMERATED */ "ENUMERATED", &asn_OP_NativeEnumerated, asn_DEF_NativeEnumerated_tags, sizeof(asn_DEF_NativeEnumerated_tags) / sizeof(asn_DEF_NativeEnumerated_tags[0]), asn_DEF_NativeEnumerated_tags, /* Same as above */ sizeof(asn_DEF_NativeEnumerated_tags) / sizeof(asn_DEF_NativeEnumerated_tags[0]), { 0, 0, asn_generic_no_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; asn_enc_rval_t NativeEnumerated_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, void *app_key) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; asn_enc_rval_t er; const long *native = (const long *)sptr; const asn_INTEGER_enum_map_t *el; (void)ilevel; (void)flags; if(!native) ASN__ENCODE_FAILED; el = INTEGER_map_value2enum(specs, *native); if(el) { er.encoded = asn__format_to_callback(cb, app_key, "<%s/>", el->enum_name); if(er.encoded < 0) ASN__ENCODE_FAILED; ASN__ENCODED_OK(er); } else { ASN_DEBUG( "ASN.1 forbids dealing with " "unknown value of ENUMERATED type"); ASN__ENCODE_FAILED; } } asn_dec_rval_t NativeEnumerated_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { const asn_INTEGER_specifics_t *specs = td->specifics; asn_dec_rval_t rval = { RC_OK, 0 }; long *native = (long *)*sptr; const asn_per_constraint_t *ct; long value; (void)opt_codec_ctx; if(constraints) ct = &constraints->value; else if(td->encoding_constraints.per_constraints) ct = &td->encoding_constraints.per_constraints->value; else ASN__DECODE_FAILED; /* Mandatory! */ if(!specs) ASN__DECODE_FAILED; if(!native) { native = (long *)(*sptr = CALLOC(1, sizeof(*native))); if(!native) ASN__DECODE_FAILED; } ASN_DEBUG("Decoding %s as NativeEnumerated", td->name); if(ct->flags & APC_EXTENSIBLE) { int inext = per_get_few_bits(pd, 1); if(inext < 0) ASN__DECODE_STARVED; if(inext) ct = 0; } if(ct && ct->range_bits >= 0) { value = per_get_few_bits(pd, ct->range_bits); if(value < 0) ASN__DECODE_STARVED; if(value >= (specs->extension ? specs->extension - 1 : specs->map_count)) ASN__DECODE_FAILED; } else { if(!specs->extension) ASN__DECODE_FAILED; /* * X.691, #10.6: normally small non-negative whole number; */ value = uper_get_nsnnwn(pd); if(value < 0) ASN__DECODE_STARVED; value += specs->extension - 1; if(value >= specs->map_count) ASN__DECODE_FAILED; } *native = specs->value2enum[value].nat_value; ASN_DEBUG("Decoded %s = %ld", td->name, *native); return rval; } static int NativeEnumerated__compar_value2enum(const void *ap, const void *bp) { const asn_INTEGER_enum_map_t *a = ap; const asn_INTEGER_enum_map_t *b = bp; if(a->nat_value == b->nat_value) return 0; if(a->nat_value < b->nat_value) return -1; return 1; } asn_enc_rval_t NativeEnumerated_encode_uper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; asn_enc_rval_t er; long native, value; const asn_per_constraint_t *ct; int inext = 0; asn_INTEGER_enum_map_t key; const asn_INTEGER_enum_map_t *kf; if(!sptr) ASN__ENCODE_FAILED; if(!specs) ASN__ENCODE_FAILED; if(constraints) ct = &constraints->value; else if(td->encoding_constraints.per_constraints) ct = &td->encoding_constraints.per_constraints->value; else ASN__ENCODE_FAILED; /* Mandatory! */ ASN_DEBUG("Encoding %s as NativeEnumerated", td->name); er.encoded = 0; native = *(const long *)sptr; key.nat_value = native; kf = bsearch(&key, specs->value2enum, specs->map_count, sizeof(key), NativeEnumerated__compar_value2enum); if(!kf) { ASN_DEBUG("No element corresponds to %ld", native); ASN__ENCODE_FAILED; } value = kf - specs->value2enum; if(ct->range_bits >= 0) { int cmpWith = specs->extension ? specs->extension - 1 : specs->map_count; if(value >= cmpWith) inext = 1; } if(ct->flags & APC_EXTENSIBLE) { if(per_put_few_bits(po, inext, 1)) ASN__ENCODE_FAILED; if(inext) ct = 0; } else if(inext) { ASN__ENCODE_FAILED; } if(ct && ct->range_bits >= 0) { if(per_put_few_bits(po, value, ct->range_bits)) ASN__ENCODE_FAILED; ASN__ENCODED_OK(er); } if(!specs->extension) ASN__ENCODE_FAILED; /* * X.691, #10.6: normally small non-negative whole number; */ ASN_DEBUG("value = %ld, ext = %d, inext = %d, res = %ld", value, specs->extension, inext, value - (inext ? (specs->extension - 1) : 0)); if(uper_put_nsnnwn(po, value - (inext ? (specs->extension - 1) : 0))) ASN__ENCODE_FAILED; ASN__ENCODED_OK(er); } asn_dec_rval_t NativeEnumerated_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; asn_dec_rval_t rval = { RC_OK, 0 }; long *native = (long *)*sptr; const asn_per_constraint_t *ct; long value; (void)opt_codec_ctx; if(constraints) ct = &constraints->value; else if(td->encoding_constraints.per_constraints) ct = &td->encoding_constraints.per_constraints->value; else ASN__DECODE_FAILED; /* Mandatory! */ if(!specs) ASN__DECODE_FAILED; if(!native) { native = (long *)(*sptr = CALLOC(1, sizeof(*native))); if(!native) ASN__DECODE_FAILED; } ASN_DEBUG("Decoding %s as NativeEnumerated", td->name); if(ct->flags & APC_EXTENSIBLE) { int inext = per_get_few_bits(pd, 1); if(inext < 0) ASN__DECODE_STARVED; if(inext) ct = 0; } /* Deal with APER padding */ if(ct && ct->upper_bound >= 255) { int padding = 0; padding = (8 - (pd->moved % 8)) % 8; ASN_DEBUG("For NativeEnumerated %s,offset= %lu Padding bits = %d", td->name, pd->moved, padding); ASN_DEBUG("For NativeEnumerated %s, upper bound = %lu", td->name, ct->upper_bound); if(padding > 0) per_get_few_bits(pd, padding); } if(ct && ct->range_bits >= 0) { value = per_get_few_bits(pd, ct->range_bits); if(value < 0) ASN__DECODE_STARVED; if(value >= (specs->extension ? specs->extension - 1 : specs->map_count)) ASN__DECODE_FAILED; } else { if(!specs->extension) ASN__DECODE_FAILED; /* * X.691, #10.6: normally small non-negative whole number; */ value = uper_get_nsnnwn(pd); if(value < 0) ASN__DECODE_STARVED; value += specs->extension - 1; if(value >= specs->map_count) ASN__DECODE_FAILED; } *native = specs->value2enum[value].nat_value; ASN_DEBUG("Decoded %s = %ld", td->name, *native); return rval; } asn_enc_rval_t NativeEnumerated_encode_aper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; asn_enc_rval_t er; long native, value; const asn_per_constraint_t *ct; int inext = 0; asn_INTEGER_enum_map_t key; asn_INTEGER_enum_map_t *kf; if(!sptr) ASN__ENCODE_FAILED; if(!specs) ASN__ENCODE_FAILED; if(constraints) ct = &constraints->value; else if(td->encoding_constraints.per_constraints) ct = &td->encoding_constraints.per_constraints->value; else ASN__ENCODE_FAILED; /* Mandatory! */ ASN_DEBUG("Encoding %s as NativeEnumerated", td->name); er.encoded = 0; native = *(const long *)sptr; if(native < 0) ASN__ENCODE_FAILED; key.nat_value = native; kf = bsearch(&key, specs->value2enum, specs->map_count, sizeof(key), NativeEnumerated__compar_value2enum); if(!kf) { ASN_DEBUG("No element corresponds to %ld", native); ASN__ENCODE_FAILED; } value = kf - specs->value2enum; if(ct->range_bits >= 0) { int cmpWith = specs->extension ? specs->extension - 1 : specs->map_count; if(value >= cmpWith) inext = 1; } if(ct->flags & APC_EXTENSIBLE) { if(per_put_few_bits(po, inext, 1)) ASN__ENCODE_FAILED; if(inext) ct = 0; } else if(inext) { ASN__ENCODE_FAILED; } if(ct && ct->range_bits >= 0) { if(per_put_few_bits(po, value, ct->range_bits)) ASN__ENCODE_FAILED; ASN__ENCODED_OK(er); } if(!specs->extension) ASN__ENCODE_FAILED; /* * X.691, #10.6: normally small non-negative whole number; */ ASN_DEBUG("value = %ld, ext = %d, inext = %d, res = %ld", value, specs->extension, inext, value - (inext ? (specs->extension - 1) : 0)); if(uper_put_nsnnwn(po, value - (inext ? (specs->extension - 1) : 0))) ASN__ENCODE_FAILED; ASN__ENCODED_OK(er); } nextepc-0.3.10/lib/s1ap/asn1c/NativeEnumerated.h000066400000000000000000000031131333553357400213020ustar00rootroot00000000000000/* * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ /* * This type differs from the standard ENUMERATED in that it is modelled using * the fixed machine type (long, int, short), so it can hold only values of * limited length. There is no type (i.e., NativeEnumerated_t, any integer type * will do). * This type may be used when integer range is limited by subtype constraints. */ #ifndef _NativeEnumerated_H_ #define _NativeEnumerated_H_ #include #ifdef __cplusplus extern "C" { #endif extern asn_TYPE_descriptor_t asn_DEF_NativeEnumerated; extern asn_TYPE_operation_t asn_OP_NativeEnumerated; xer_type_encoder_f NativeEnumerated_encode_xer; oer_type_decoder_f NativeEnumerated_decode_oer; oer_type_encoder_f NativeEnumerated_encode_oer; per_type_decoder_f NativeEnumerated_decode_uper; per_type_encoder_f NativeEnumerated_encode_uper; per_type_decoder_f NativeEnumerated_decode_aper; per_type_encoder_f NativeEnumerated_encode_aper; #define NativeEnumerated_free NativeInteger_free #define NativeEnumerated_print NativeInteger_print #define NativeEnumerated_compare NativeInteger_compare #define NativeEnumerated_random_fill NativeInteger_random_fill #define NativeEnumerated_constraint asn_generic_no_constraint #define NativeEnumerated_decode_ber NativeInteger_decode_ber #define NativeEnumerated_encode_der NativeInteger_encode_der #define NativeEnumerated_decode_xer NativeInteger_decode_xer #ifdef __cplusplus } #endif #endif /* _NativeEnumerated_H_ */ nextepc-0.3.10/lib/s1ap/asn1c/NativeEnumerated_oer.c000066400000000000000000000074571333553357400221610ustar00rootroot00000000000000/* * Copyright (c) 2017 Lev Walkin . * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef ASN_DISABLE_OER_SUPPORT #include #include #include static long asn__nativeenumerated_convert(const uint8_t *b, const uint8_t *end) { unsigned long value; /* Perform the sign initialization */ /* Actually value = -(*b >> 7); gains nothing, yet unreadable! */ if((*b >> 7)) { value = (unsigned long)(-1); } else { value = 0; } /* Conversion engine */ for(; b < end; b++) { value = (value << 8) | *b; } return value; } asn_dec_rval_t NativeEnumerated_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_oer_constraints_t *constraints, void **nint_ptr, const void *ptr, size_t size) { asn_dec_rval_t rval = {RC_OK, 0}; long *native = (long *)*nint_ptr; const uint8_t *b = ptr; (void)opt_codec_ctx; (void)constraints; if(size < 1) { ASN__DECODE_STARVED; } if((*b & 0x80) == 0) { /* * X.696 (08/2015) #11.2 Short form for Enumerated. */ if(!native) { native = (long *)(*nint_ptr = CALLOC(1, sizeof(*native))); if(!native) ASN__DECODE_FAILED; } *native = *b; rval.consumed = 1; } else { /* * X.696 (08/2015) #11.4 Long form for Enumerated. */ size_t length = *b & 0x7f; const uint8_t *bend; long value; if(length < 1 || length > sizeof(*native)) { ASN__DECODE_FAILED; } if((1 + length) > size) { ASN__DECODE_STARVED; } b++; bend = b + length; value = asn__nativeenumerated_convert(b, bend); if(value < 0) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; if(specs && specs->field_unsigned) { ASN__DECODE_FAILED; } } if(!native) { native = (long *)(*nint_ptr = CALLOC(1, sizeof(*native))); if(!native) ASN__DECODE_FAILED; } *native = value; rval.consumed = (1 + length); } return rval; } /* * Encode as Canonical OER. */ asn_enc_rval_t NativeEnumerated_encode_oer(const asn_TYPE_descriptor_t *td, const asn_oer_constraints_t *constraints, const void *sptr, asn_app_consume_bytes_f *cb, void *app_key) { asn_enc_rval_t er; long native; (void)constraints; if(!sptr) ASN__ENCODE_FAILED; native = *(const long *)sptr; if(native >= 0 && native <= 127) { /* #11.2 Short form */ uint8_t b = native; er.encoded = 1; if(cb(&b, er.encoded, app_key) < 0) { ASN__ENCODE_FAILED; } ASN__ENCODED_OK(er); } else { /* #11.2 Long form */ uint8_t buf[1 + sizeof(native)]; uint8_t *b = &buf[sizeof(native)]; /* Last addressable */ long final_pattern = -1 * (native < 0); for(;;) { *b-- = native; native >>= 8; if(native == final_pattern) { if(final_pattern) { if((b[1] & 0x80)) break; } else { if(!(b[1] & 0x80)) break; } } } *b = 0x80 | (&buf[sizeof(native)] - b); er.encoded = 1 + (&buf[sizeof(native)] - b); if(cb(b, er.encoded, app_key) < 0) { ASN__ENCODE_FAILED; } ASN__ENCODED_OK(er); } } #endif /* ASN_DISABLE_OER_SUPPORT */ nextepc-0.3.10/lib/s1ap/asn1c/NativeInteger.c000066400000000000000000000373511333553357400206140ustar00rootroot00000000000000/*- * Copyright (c) 2004, 2005, 2006 Lev Walkin . * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ /* * Read the NativeInteger.h for the explanation wrt. differences between * INTEGER and NativeInteger. * Basically, both are decoders and encoders of ASN.1 INTEGER type, but this * implementation deals with the standard (machine-specific) representation * of them instead of using the platform-independent buffer. */ #include #include /* * NativeInteger basic type description. */ static const ber_tlv_tag_t asn_DEF_NativeInteger_tags[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_operation_t asn_OP_NativeInteger = { NativeInteger_free, NativeInteger_print, NativeInteger_compare, NativeInteger_decode_ber, NativeInteger_encode_der, NativeInteger_decode_xer, NativeInteger_encode_xer, #ifdef ASN_DISABLE_OER_SUPPORT 0, 0, #else NativeInteger_decode_oer, /* OER decoder */ NativeInteger_encode_oer, /* Canonical OER encoder */ #endif /* ASN_DISABLE_OER_SUPPORT */ #ifdef ASN_DISABLE_PER_SUPPORT 0, 0, 0, 0, #else NativeInteger_decode_uper, /* Unaligned PER decoder */ NativeInteger_encode_uper, /* Unaligned PER encoder */ NativeInteger_decode_aper, /* Aligned PER decoder */ NativeInteger_encode_aper, /* Aligned PER encoder */ #endif /* ASN_DISABLE_PER_SUPPORT */ NativeInteger_random_fill, 0 /* Use generic outmost tag fetcher */ }; asn_TYPE_descriptor_t asn_DEF_NativeInteger = { "INTEGER", /* The ASN.1 type is still INTEGER */ "INTEGER", &asn_OP_NativeInteger, asn_DEF_NativeInteger_tags, sizeof(asn_DEF_NativeInteger_tags) / sizeof(asn_DEF_NativeInteger_tags[0]), asn_DEF_NativeInteger_tags, /* Same as above */ sizeof(asn_DEF_NativeInteger_tags) / sizeof(asn_DEF_NativeInteger_tags[0]), { 0, 0, asn_generic_no_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; /* * Decode INTEGER type. */ asn_dec_rval_t NativeInteger_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **nint_ptr, const void *buf_ptr, size_t size, int tag_mode) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; long *native = (long *)*nint_ptr; asn_dec_rval_t rval; ber_tlv_len_t length; /* * If the structure is not there, allocate it. */ if(native == NULL) { native = (long *)(*nint_ptr = CALLOC(1, sizeof(*native))); if(native == NULL) { rval.code = RC_FAIL; rval.consumed = 0; return rval; } } ASN_DEBUG("Decoding %s as INTEGER (tm=%d)", td->name, tag_mode); /* * Check tags. */ rval = ber_check_tags(opt_codec_ctx, td, 0, buf_ptr, size, tag_mode, 0, &length, 0); if(rval.code != RC_OK) return rval; ASN_DEBUG("%s length is %d bytes", td->name, (int)length); /* * Make sure we have this length. */ buf_ptr = ((const char *)buf_ptr) + rval.consumed; size -= rval.consumed; if(length > (ber_tlv_len_t)size) { rval.code = RC_WMORE; rval.consumed = 0; return rval; } /* * ASN.1 encoded INTEGER: buf_ptr, length * Fill the native, at the same time checking for overflow. * If overflow occured, return with RC_FAIL. */ { INTEGER_t tmp; union { const void *constbuf; void *nonconstbuf; } unconst_buf; long l; unconst_buf.constbuf = buf_ptr; tmp.buf = (uint8_t *)unconst_buf.nonconstbuf; tmp.size = length; if((specs&&specs->field_unsigned) ? asn_INTEGER2ulong(&tmp, (unsigned long *)&l) /* sic */ : asn_INTEGER2long(&tmp, &l)) { rval.code = RC_FAIL; rval.consumed = 0; return rval; } *native = l; } rval.code = RC_OK; rval.consumed += length; ASN_DEBUG("Took %ld/%ld bytes to encode %s (%ld)", (long)rval.consumed, (long)length, td->name, (long)*native); return rval; } /* * Encode the NativeInteger using the standard INTEGER type DER encoder. */ asn_enc_rval_t NativeInteger_encode_der(const asn_TYPE_descriptor_t *sd, const void *ptr, int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key) { unsigned long native = *(const unsigned long *)ptr; /* Disable sign ext. */ asn_enc_rval_t erval; INTEGER_t tmp; #ifdef WORDS_BIGENDIAN /* Opportunistic optimization */ tmp.buf = (uint8_t *)&native; tmp.size = sizeof(native); #else /* Works even if WORDS_BIGENDIAN is not set where should've been */ uint8_t buf[sizeof(native)]; uint8_t *p; /* Prepare a fake INTEGER */ for(p = buf + sizeof(buf) - 1; p >= buf; p--, native >>= 8) *p = (uint8_t)native; tmp.buf = buf; tmp.size = sizeof(buf); #endif /* WORDS_BIGENDIAN */ /* Encode fake INTEGER */ erval = INTEGER_encode_der(sd, &tmp, tag_mode, tag, cb, app_key); if(erval.structure_ptr == &tmp) { erval.structure_ptr = ptr; } return erval; } /* * Decode the chunk of XML text encoding INTEGER. */ asn_dec_rval_t NativeInteger_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **sptr, const char *opt_mname, const void *buf_ptr, size_t size) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; asn_dec_rval_t rval; INTEGER_t st; void *st_ptr = (void *)&st; long *native = (long *)*sptr; if(!native) { native = (long *)(*sptr = CALLOC(1, sizeof(*native))); if(!native) ASN__DECODE_FAILED; } memset(&st, 0, sizeof(st)); rval = INTEGER_decode_xer(opt_codec_ctx, td, &st_ptr, opt_mname, buf_ptr, size); if(rval.code == RC_OK) { long l; if((specs&&specs->field_unsigned) ? asn_INTEGER2ulong(&st, (unsigned long *)&l) /* sic */ : asn_INTEGER2long(&st, &l)) { rval.code = RC_FAIL; rval.consumed = 0; } else { *native = l; } } else { /* * Cannot restart from the middle; * there is no place to save state in the native type. * Request a continuation from the very beginning. */ rval.consumed = 0; } ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &st); return rval; } asn_enc_rval_t NativeInteger_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, void *app_key) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; char scratch[32]; /* Enough for 64-bit int */ asn_enc_rval_t er; const long *native = (const long *)sptr; (void)ilevel; (void)flags; if(!native) ASN__ENCODE_FAILED; er.encoded = snprintf(scratch, sizeof(scratch), (specs && specs->field_unsigned) ? "%lu" : "%ld", *native); if(er.encoded <= 0 || (size_t)er.encoded >= sizeof(scratch) || cb(scratch, er.encoded, app_key) < 0) ASN__ENCODE_FAILED; ASN__ENCODED_OK(er); } #ifndef ASN_DISABLE_PER_SUPPORT asn_dec_rval_t NativeInteger_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; asn_dec_rval_t rval; long *native = (long *)*sptr; INTEGER_t tmpint; void *tmpintptr = &tmpint; (void)opt_codec_ctx; ASN_DEBUG("Decoding NativeInteger %s (UPER)", td->name); if(!native) { native = (long *)(*sptr = CALLOC(1, sizeof(*native))); if(!native) ASN__DECODE_FAILED; } memset(&tmpint, 0, sizeof tmpint); rval = INTEGER_decode_uper(opt_codec_ctx, td, constraints, &tmpintptr, pd); if(rval.code == RC_OK) { if((specs&&specs->field_unsigned) ? asn_INTEGER2ulong(&tmpint, (unsigned long *)native) : asn_INTEGER2long(&tmpint, native)) rval.code = RC_FAIL; else ASN_DEBUG("NativeInteger %s got value %ld", td->name, *native); } ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); return rval; } asn_enc_rval_t NativeInteger_encode_uper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; asn_enc_rval_t er; long native; INTEGER_t tmpint; if(!sptr) ASN__ENCODE_FAILED; native = *(const long *)sptr; ASN_DEBUG("Encoding NativeInteger %s %ld (UPER)", td->name, native); memset(&tmpint, 0, sizeof(tmpint)); if((specs&&specs->field_unsigned) ? asn_ulong2INTEGER(&tmpint, native) : asn_long2INTEGER(&tmpint, native)) ASN__ENCODE_FAILED; er = INTEGER_encode_uper(td, constraints, &tmpint, po); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); return er; } asn_dec_rval_t NativeInteger_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; asn_dec_rval_t rval; long *native = (long *)*sptr; INTEGER_t tmpint; void *tmpintptr = &tmpint; (void)opt_codec_ctx; ASN_DEBUG("Decoding NativeInteger %s (APER)", td->name); if(!native) { native = (long *)(*sptr = CALLOC(1, sizeof(*native))); if(!native) ASN__DECODE_FAILED; } memset(&tmpint, 0, sizeof tmpint); rval = INTEGER_decode_aper(opt_codec_ctx, td, constraints, &tmpintptr, pd); if(rval.code == RC_OK) { if((specs&&specs->field_unsigned) ? asn_INTEGER2ulong(&tmpint, (unsigned long *)native) : asn_INTEGER2long(&tmpint, native)) rval.code = RC_FAIL; else ASN_DEBUG("NativeInteger %s got value %ld", td->name, *native); } ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); return rval; } asn_enc_rval_t NativeInteger_encode_aper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; asn_enc_rval_t er; long native; INTEGER_t tmpint; if(!sptr) ASN__ENCODE_FAILED; native = *(const long *)sptr; ASN_DEBUG("Encoding NativeInteger %s %ld (APER)", td->name, native); memset(&tmpint, 0, sizeof(tmpint)); if((specs&&specs->field_unsigned) ? asn_ulong2INTEGER(&tmpint, (unsigned long)native) : asn_long2INTEGER(&tmpint, native)) ASN__ENCODE_FAILED; er = INTEGER_encode_aper(td, constraints, &tmpint, po); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); return er; } #endif /* ASN_DISABLE_PER_SUPPORT */ /* * INTEGER specific human-readable output. */ int NativeInteger_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; const long *native = (const long *)sptr; char scratch[32]; /* Enough for 64-bit int */ int ret; (void)td; /* Unused argument */ (void)ilevel; /* Unused argument */ if(native) { long value = *native; ret = snprintf(scratch, sizeof(scratch), (specs && specs->field_unsigned) ? "%lu" : "%ld", value); assert(ret > 0 && (size_t)ret < sizeof(scratch)); if(cb(scratch, ret, app_key) < 0) return -1; if(specs && (value >= 0 || !specs->field_unsigned)) { const asn_INTEGER_enum_map_t *el = INTEGER_map_value2enum(specs, value); if(el) { if(cb(" (", 2, app_key) < 0) return -1; if(cb(el->enum_name, el->enum_len, app_key) < 0) return -1; if(cb(")", 1, app_key) < 0) return -1; } } return 0; } else { return (cb("", 8, app_key) < 0) ? -1 : 0; } } void NativeInteger_free(const asn_TYPE_descriptor_t *td, void *ptr, enum asn_struct_free_method method) { if(!td || !ptr) return; ASN_DEBUG("Freeing %s as INTEGER (%d, %p, Native)", td->name, method, ptr); switch(method) { case ASFM_FREE_EVERYTHING: FREEMEM(ptr); break; case ASFM_FREE_UNDERLYING: break; case ASFM_FREE_UNDERLYING_AND_RESET: memset(ptr, 0, sizeof(long)); break; } } int NativeInteger_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const void *bptr) { (void)td; if(aptr && bptr) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; if(specs && specs->field_unsigned) { const unsigned long *a = aptr; const unsigned long *b = bptr; if(*a < *b) { return -1; } else if(*a > *b) { return 1; } else { return 0; } } else { const long *a = aptr; const long *b = bptr; if(*a < *b) { return -1; } else if(*a > *b) { return 1; } else { return 0; } } } else if(!aptr) { return -1; } else { return 1; } } asn_random_fill_result_t NativeInteger_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, const asn_encoding_constraints_t *constraints, size_t max_length) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; long *st = *sptr; const asn_INTEGER_enum_map_t *emap; size_t emap_len; intmax_t value; int find_inside_map; if(max_length == 0) return result_skipped; if(st == NULL) { st = (long *)CALLOC(1, sizeof(*st)); if(st == NULL) { return result_failed; } } if(specs) { emap = specs->value2enum; emap_len = specs->map_count; if(specs->strict_enumeration) { find_inside_map = emap_len > 0; } else { find_inside_map = emap_len ? asn_random_between(0, 1) : 0; } } else { emap = 0; emap_len = 0; find_inside_map = 0; } if(find_inside_map) { assert(emap_len > 0); value = emap[asn_random_between(0, emap_len - 1)].nat_value; } else { const asn_per_constraints_t *ct; static const long variants[] = { -65536, -65535, -65534, -32769, -32768, -32767, -16385, -16384, -16383, -257, -256, -255, -254, -129, -128, -127, -126, -1, 0, 1, 126, 127, 128, 129, 254, 255, 256, 257, 16383, 16384, 16385, 32767, 32768, 32769, 65534, 65535, 65536, 65537}; if(specs && specs->field_unsigned) { assert(variants[18] == 0); value = variants[asn_random_between( 18, sizeof(variants) / sizeof(variants[0]) - 1)]; } else { value = variants[asn_random_between( 0, sizeof(variants) / sizeof(variants[0]) - 1)]; } if(!constraints) constraints = &td->encoding_constraints; ct = constraints ? constraints->per_constraints : 0; if(ct && (ct->value.flags & APC_CONSTRAINED)) { if(value < ct->value.lower_bound || value > ct->value.upper_bound) { value = asn_random_between(ct->value.lower_bound, ct->value.upper_bound); } } } *sptr = st; *st = value; return result_ok; } nextepc-0.3.10/lib/s1ap/asn1c/NativeInteger.h000066400000000000000000000027101333553357400206100ustar00rootroot00000000000000/*- * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ /* * This type differs from the standard INTEGER in that it is modelled using * the fixed machine type (long, int, short), so it can hold only values of * limited length. There is no type (i.e., NativeInteger_t, any integer type * will do). * This type may be used when integer range is limited by subtype constraints. */ #ifndef _NativeInteger_H_ #define _NativeInteger_H_ #include #include #ifdef __cplusplus extern "C" { #endif extern asn_TYPE_descriptor_t asn_DEF_NativeInteger; extern asn_TYPE_operation_t asn_OP_NativeInteger; asn_struct_free_f NativeInteger_free; asn_struct_print_f NativeInteger_print; asn_struct_compare_f NativeInteger_compare; ber_type_decoder_f NativeInteger_decode_ber; der_type_encoder_f NativeInteger_encode_der; xer_type_decoder_f NativeInteger_decode_xer; xer_type_encoder_f NativeInteger_encode_xer; oer_type_decoder_f NativeInteger_decode_oer; oer_type_encoder_f NativeInteger_encode_oer; per_type_decoder_f NativeInteger_decode_uper; per_type_encoder_f NativeInteger_encode_uper; per_type_decoder_f NativeInteger_decode_aper; per_type_encoder_f NativeInteger_encode_aper; asn_random_fill_f NativeInteger_random_fill; #define NativeInteger_constraint asn_generic_no_constraint #ifdef __cplusplus } #endif #endif /* _NativeInteger_H_ */ nextepc-0.3.10/lib/s1ap/asn1c/NativeInteger_oer.c000066400000000000000000000057431333553357400214610ustar00rootroot00000000000000/* * Copyright (c) 2017 Lev Walkin . * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef ASN_DISABLE_OER_SUPPORT #include #include #include asn_dec_rval_t NativeInteger_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_oer_constraints_t *constraints, void **nint_ptr, const void *ptr, size_t size) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; asn_dec_rval_t rval = {RC_OK, 0}; long *native = (long *)*nint_ptr; INTEGER_t tmpint; INTEGER_t *tmpintptr = &tmpint; memset(&tmpint, 0, sizeof(tmpint)); if(!native) { native = (long *)(*nint_ptr = CALLOC(1, sizeof(*native))); if(!native) ASN__DECODE_FAILED; } /* * OPTIMIZATION: Encode directly rather than passing through INTEGER. * Saves a memory allocation. */ rval = INTEGER_decode_oer(opt_codec_ctx, td, constraints, (void **)&tmpintptr, ptr, size); if(rval.code != RC_OK) { ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); return rval; } if(specs && specs->field_unsigned) { unsigned long ul; int ok = asn_INTEGER2ulong(&tmpint, &ul) == 0; ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); if(ok) { *native = ul; } else { rval.code = RC_FAIL; return rval; } } else { long l; int ok = asn_INTEGER2long(&tmpint, &l) == 0; ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); if(ok) { *native = l; } else { rval.code = RC_FAIL; return rval; } } return rval; } /* * Encode as Canonical OER. */ asn_enc_rval_t NativeInteger_encode_oer(const asn_TYPE_descriptor_t *td, const asn_oer_constraints_t *constraints, const void *sptr, asn_app_consume_bytes_f *cb, void *app_key) { const asn_INTEGER_specifics_t *specs = (const asn_INTEGER_specifics_t *)td->specifics; INTEGER_t tmpint; long native; if(!sptr) ASN__ENCODE_FAILED; native = *(const long *)sptr; memset(&tmpint, 0, sizeof(tmpint)); ASN_DEBUG("Encoding %s %ld as NativeInteger", td ? td->name : "", native); if((specs && specs->field_unsigned) ? asn_ulong2INTEGER(&tmpint, native) : asn_long2INTEGER(&tmpint, native)) { ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); ASN__ENCODE_FAILED; } else { asn_enc_rval_t er = INTEGER_encode_oer(td, constraints, &tmpint, cb, app_key); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_INTEGER, &tmpint); return er; } } #endif /* ASN_DISABLE_OER_SUPPORT */ nextepc-0.3.10/lib/s1ap/asn1c/OBJECT_IDENTIFIER.c000066400000000000000000000427411333553357400205170ustar00rootroot00000000000000/*- * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include #include #include /* for CHAR_BIT */ #include /* * OBJECT IDENTIFIER basic type description. */ static const ber_tlv_tag_t asn_DEF_OBJECT_IDENTIFIER_tags[] = { (ASN_TAG_CLASS_UNIVERSAL | (6 << 2)) }; asn_TYPE_operation_t asn_OP_OBJECT_IDENTIFIER = { ASN__PRIMITIVE_TYPE_free, OBJECT_IDENTIFIER_print, OCTET_STRING_compare, /* Implemented in terms of a string comparison */ ber_decode_primitive, der_encode_primitive, OBJECT_IDENTIFIER_decode_xer, OBJECT_IDENTIFIER_encode_xer, #ifdef ASN_DISABLE_OER_SUPPORT 0, 0, #else OBJECT_IDENTIFIER_decode_oer, OBJECT_IDENTIFIER_encode_oer, #endif /* ASN_DISABLE_OER_SUPPORT */ #ifdef ASN_DISABLE_PER_SUPPORT 0, 0, 0, 0, #else OCTET_STRING_decode_uper, OCTET_STRING_encode_uper, OCTET_STRING_decode_aper, OCTET_STRING_encode_aper, #endif /* ASN_DISABLE_PER_SUPPORT */ OBJECT_IDENTIFIER_random_fill, 0 /* Use generic outmost tag fetcher */ }; asn_TYPE_descriptor_t asn_DEF_OBJECT_IDENTIFIER = { "OBJECT IDENTIFIER", "OBJECT_IDENTIFIER", &asn_OP_OBJECT_IDENTIFIER, asn_DEF_OBJECT_IDENTIFIER_tags, sizeof(asn_DEF_OBJECT_IDENTIFIER_tags) / sizeof(asn_DEF_OBJECT_IDENTIFIER_tags[0]), asn_DEF_OBJECT_IDENTIFIER_tags, /* Same as above */ sizeof(asn_DEF_OBJECT_IDENTIFIER_tags) / sizeof(asn_DEF_OBJECT_IDENTIFIER_tags[0]), { 0, 0, OBJECT_IDENTIFIER_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; int OBJECT_IDENTIFIER_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const OBJECT_IDENTIFIER_t *st = (const OBJECT_IDENTIFIER_t *)sptr; if(st && st->buf) { if(st->size < 1) { ASN__CTFAIL(app_key, td, sptr, "%s: at least one numerical value " "expected (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } else { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } return 0; } static ssize_t OBJECT_IDENTIFIER_get_first_arcs(const uint8_t *arcbuf, size_t arcbuf_len, asn_oid_arc_t *arc0, asn_oid_arc_t *arc1) { asn_oid_arc_t value; ssize_t rd = OBJECT_IDENTIFIER_get_single_arc(arcbuf, arcbuf_len, &value); if(rd <= 0) return rd; if(value >= 80) { *arc0 = 2; *arc1 = value - 80; } else if(value >= 40) { *arc0 = 1; *arc1 = value - 40; } else { *arc0 = 0; *arc1 = value; } return rd; } ssize_t OBJECT_IDENTIFIER_get_single_arc(const uint8_t *arcbuf, size_t arcbuf_len, asn_oid_arc_t *ret_value) { const uint8_t *b = arcbuf; const uint8_t *arcend = arcbuf + arcbuf_len; /* End of arc */ if(arcbuf == arcend) { return 0; } else { asn_oid_arc_t accum; /* Gather all bits into the accumulator */ for(accum = 0; b < arcend; b++) { accum = (accum << 7) | (*b & ~0x80); if((*b & 0x80) == 0) { if(accum <= ASN_OID_ARC_MAX) { *ret_value = accum; return 1 + (b - arcbuf); } else { errno = ERANGE; /* Overflow */ return -1; } } } errno = EINVAL; return -1; } } static ssize_t OBJECT_IDENTIFIER__dump_body(const OBJECT_IDENTIFIER_t *st, asn_app_consume_bytes_f *cb, void *app_key) { char scratch[32]; asn_oid_arc_t arc0, arc1; size_t produced = 0; size_t off = 0; ssize_t rd; int ret; rd = OBJECT_IDENTIFIER_get_first_arcs(st->buf, st->size, &arc0, &arc1); if(rd <= 0) { return -1; } ret = snprintf(scratch, sizeof(scratch), "%"PRIu32".%"PRIu32, arc0, arc1); if(ret >= (ssize_t)sizeof(scratch)) { return -1; } produced += ret; if(cb(scratch, ret, app_key) < 0) return -1; for(off = rd; ; ) { asn_oid_arc_t arc; rd = OBJECT_IDENTIFIER_get_single_arc(st->buf + off, st->size - off, &arc); if(rd < 0) { return -1; } else if(rd == 0) { /* No more arcs. */ break; } else { off += rd; assert(off <= st->size); ret = snprintf(scratch, sizeof(scratch), ".%" PRIu32, arc); if(ret >= (ssize_t)sizeof(scratch)) { return -1; } produced += ret; if(cb(scratch, ret, app_key) < 0) return -1; } } if(off != st->size) { ASN_DEBUG("Could not scan to the end of Object Identifier"); return -1; } return produced; } static enum xer_pbd_rval OBJECT_IDENTIFIER__xer_body_decode(const asn_TYPE_descriptor_t *td, void *sptr, const void *chunk_buf, size_t chunk_size) { OBJECT_IDENTIFIER_t *st = (OBJECT_IDENTIFIER_t *)sptr; const char *chunk_end = (const char *)chunk_buf + chunk_size; const char *endptr; asn_oid_arc_t s_arcs[10]; asn_oid_arc_t *arcs = s_arcs; ssize_t num_arcs; ssize_t ret; (void)td; num_arcs = OBJECT_IDENTIFIER_parse_arcs( (const char *)chunk_buf, chunk_size, arcs, sizeof(s_arcs) / sizeof(s_arcs[0]), &endptr); if(num_arcs < 0) { /* Expecting more than zero arcs */ return XPBD_BROKEN_ENCODING; } else if(num_arcs == 0) { return XPBD_NOT_BODY_IGNORE; } assert(endptr == chunk_end); if((size_t)num_arcs > sizeof(s_arcs)/sizeof(s_arcs[0])) { arcs = (asn_oid_arc_t *)MALLOC(num_arcs * sizeof(asn_oid_arc_t)); if(!arcs) return XPBD_SYSTEM_FAILURE; ret = OBJECT_IDENTIFIER_parse_arcs((const char *)chunk_buf, chunk_size, arcs, num_arcs, &endptr); if(ret != num_arcs) return XPBD_SYSTEM_FAILURE; /* assert?.. */ } /* * Convert arcs into BER representation. */ ret = OBJECT_IDENTIFIER_set_arcs(st, arcs, num_arcs); if(arcs != s_arcs) FREEMEM(arcs); return ret ? XPBD_SYSTEM_FAILURE : XPBD_BODY_CONSUMED; } asn_dec_rval_t OBJECT_IDENTIFIER_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **sptr, const char *opt_mname, const void *buf_ptr, size_t size) { return xer_decode_primitive(opt_codec_ctx, td, sptr, sizeof(OBJECT_IDENTIFIER_t), opt_mname, buf_ptr, size, OBJECT_IDENTIFIER__xer_body_decode); } asn_enc_rval_t OBJECT_IDENTIFIER_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, void *app_key) { const OBJECT_IDENTIFIER_t *st = (const OBJECT_IDENTIFIER_t *)sptr; asn_enc_rval_t er; (void)ilevel; (void)flags; if(!st || !st->buf) { ASN__ENCODE_FAILED; } er.encoded = OBJECT_IDENTIFIER__dump_body(st, cb, app_key); if(er.encoded < 0) ASN__ENCODE_FAILED; ASN__ENCODED_OK(er); } int OBJECT_IDENTIFIER_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { const OBJECT_IDENTIFIER_t *st = (const OBJECT_IDENTIFIER_t *)sptr; (void)td; /* Unused argument */ (void)ilevel; /* Unused argument */ if(!st || !st->buf) return (cb("", 8, app_key) < 0) ? -1 : 0; /* Dump preamble */ if(cb("{ ", 2, app_key) < 0) return -1; if(OBJECT_IDENTIFIER__dump_body(st, cb, app_key) < 0) { return -1; } return (cb(" }", 2, app_key) < 0) ? -1 : 0; } ssize_t OBJECT_IDENTIFIER_get_arcs(const OBJECT_IDENTIFIER_t *st, asn_oid_arc_t *arcs, size_t arc_slots) { asn_oid_arc_t arc0, arc1; size_t num_arcs = 0; size_t off; ssize_t rd; if(!st || !st->buf) { errno = EINVAL; return -1; } rd = OBJECT_IDENTIFIER_get_first_arcs(st->buf, st->size, &arc0, &arc1); if(rd <= 0) { return -1; } num_arcs = 2; switch(arc_slots) { default: case 2: arcs[1] = arc1; /* Fall through */ case 1: arcs[0] = arc0; /* Fall through */ case 0: break; } for(off = rd; ; ) { asn_oid_arc_t arc; rd = OBJECT_IDENTIFIER_get_single_arc(st->buf + off, st->size - off, &arc); if(rd < 0) { return -1; } else if(rd == 0) { /* No more arcs. */ break; } else { off += rd; if(num_arcs < arc_slots) { arcs[num_arcs] = arc; } num_arcs++; } } if(off != st->size) { return -1; } return num_arcs; } /* * Save the single value as an object identifier arc. */ ssize_t OBJECT_IDENTIFIER_set_single_arc(uint8_t *arcbuf, size_t arcbuf_len, asn_oid_arc_t value) { /* * The following conditions must hold: * assert(arcbuf); */ uint8_t scratch[((sizeof(value) * CHAR_BIT + 6) / 7)]; uint8_t *scratch_end = &scratch[sizeof(scratch)-1]; uint8_t *b; size_t result_len; uint8_t mask; for(b = scratch_end, mask = 0; ; mask = 0x80, b--) { *b = mask | (value & 0x7f); value >>= 7; if(!value) { break; } } result_len = (scratch_end - b) + 1; if(result_len > arcbuf_len) { return -1; } memcpy(arcbuf, b, result_len); return result_len; } int OBJECT_IDENTIFIER_set_arcs(OBJECT_IDENTIFIER_t *st, const asn_oid_arc_t *arcs, size_t arc_slots) { uint8_t *buf; uint8_t *bp; ssize_t wrote; asn_oid_arc_t arc0; asn_oid_arc_t arc1; size_t size; size_t i; if(!st || !arcs || arc_slots < 2) { errno = EINVAL; return -1; } arc0 = arcs[0]; arc1 = arcs[1]; if(arc0 <= 1) { if(arc1 >= 40) { /* 8.19.4: At most 39 subsequent values (including 0) */ errno = ERANGE; return -1; } } else if(arc0 == 2) { if(arc1 > ASN_OID_ARC_MAX - 80) { errno = ERANGE; return -1; } } else if(arc0 > 2) { /* 8.19.4: Only three values are allocated from the root node */ errno = ERANGE; return -1; } /* * After above tests it is known that the value of arc0 is completely * trustworthy (0..2). However, the arc1's value is still meaningless. */ /* * Roughly estimate the maximum size necessary to encode these arcs. * This estimation implicitly takes in account the following facts, * that cancel each other: * * the first two arcs are encoded in a single value. * * the first value may require more space (+1 byte) * * the value of the first arc which is in range (0..2) */ size = ((sizeof(asn_oid_arc_t) * CHAR_BIT + 6) / 7) * arc_slots; bp = buf = (uint8_t *)MALLOC(size + 1); if(!buf) { /* ENOMEM */ return -1; } wrote = OBJECT_IDENTIFIER_set_single_arc(bp, size, arc0 * 40 + arc1); if(wrote <= 0) { FREEMEM(buf); return -1; } assert((size_t)wrote <= size); bp += wrote; size -= wrote; for(i = 2; i < arc_slots; i++) { wrote = OBJECT_IDENTIFIER_set_single_arc(bp, size, arcs[i]); if(wrote <= 0) { FREEMEM(buf); return -1; } assert((size_t)wrote <= size); bp += wrote; size -= wrote; } /* * Replace buffer. */ st->size = bp - buf; bp = st->buf; st->buf = buf; st->buf[st->size] = '\0'; if(bp) FREEMEM(bp); return 0; } ssize_t OBJECT_IDENTIFIER_parse_arcs(const char *oid_text, ssize_t oid_txt_length, asn_oid_arc_t *arcs, size_t arcs_count, const char **opt_oid_text_end) { size_t num_arcs = 0; const char *oid_end; enum { ST_LEADSPACE, ST_TAILSPACE, ST_AFTERVALUE, /* Next character ought to be '.' or a space */ ST_WAITDIGITS /* Next character is expected to be a digit */ } state = ST_LEADSPACE; if(!oid_text || oid_txt_length < -1 || (arcs_count && !arcs)) { if(opt_oid_text_end) *opt_oid_text_end = oid_text; errno = EINVAL; return -1; } if(oid_txt_length == -1) oid_txt_length = strlen(oid_text); #define _OID_CAPTURE_ARC(oid_text, oid_end) \ do { \ const char *endp = oid_end; \ unsigned long value; \ switch(asn_strtoul_lim(oid_text, &endp, &value)) { \ case ASN_STRTOX_EXTRA_DATA: \ case ASN_STRTOX_OK: \ if(value <= ASN_OID_ARC_MAX) { \ if(num_arcs < arcs_count) arcs[num_arcs] = value; \ num_arcs++; \ oid_text = endp - 1; \ break; \ } \ /* Fall through */ \ case ASN_STRTOX_ERROR_RANGE: \ if(opt_oid_text_end) *opt_oid_text_end = oid_text; \ errno = ERANGE; \ return -1; \ case ASN_STRTOX_ERROR_INVAL: \ case ASN_STRTOX_EXPECT_MORE: \ if(opt_oid_text_end) *opt_oid_text_end = oid_text; \ errno = EINVAL; \ return -1; \ } \ } while(0) for(oid_end = oid_text + oid_txt_length; oid_text broken OID */ return -1; case ST_LEADSPACE: case ST_WAITDIGITS: _OID_CAPTURE_ARC(oid_text, oid_end); state = ST_AFTERVALUE; continue; } break; default: /* Unexpected symbols */ state = ST_WAITDIGITS; break; } /* switch() */ break; } /* for() */ if(opt_oid_text_end) *opt_oid_text_end = oid_text; /* Finalize last arc */ switch(state) { case ST_LEADSPACE: return 0; /* No OID found in input data */ case ST_WAITDIGITS: errno = EINVAL; /* Broken OID */ return -1; case ST_AFTERVALUE: case ST_TAILSPACE: return num_arcs; } errno = EINVAL; /* Broken OID */ return -1; } /* * Generate values from the list of interesting values, or just a random * value up to the upper limit. */ static asn_oid_arc_t OBJECT_IDENTIFIER__biased_random_arc(asn_oid_arc_t upper_bound) { const asn_oid_arc_t values[] = {0, 1, 127, 128, 129, 254, 255, 256}; size_t idx; switch(asn_random_between(0, 2)) { case 0: idx = asn_random_between(0, sizeof(values) / sizeof(values[0]) - 1); if(values[idx] < upper_bound) { return values[idx]; } /* Fall through */ case 1: return asn_random_between(0, upper_bound); case 2: default: return upper_bound; } } asn_random_fill_result_t OBJECT_IDENTIFIER_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, const asn_encoding_constraints_t *constraints, size_t max_length) { asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; OBJECT_IDENTIFIER_t *st; asn_oid_arc_t arcs[5]; size_t arcs_len = asn_random_between(2, 5); size_t i; (void)constraints; if(max_length < arcs_len) return result_skipped; if(*sptr) { st = *sptr; } else { st = CALLOC(1, sizeof(*st)); } arcs[0] = asn_random_between(0, 2); arcs[1] = OBJECT_IDENTIFIER__biased_random_arc( arcs[0] <= 1 ? 39 : (ASN_OID_ARC_MAX - 80)); for(i = 2; i < arcs_len; i++) { arcs[i] = OBJECT_IDENTIFIER__biased_random_arc(ASN_OID_ARC_MAX); } if(OBJECT_IDENTIFIER_set_arcs(st, arcs, arcs_len)) { if(st != *sptr) { ASN_STRUCT_FREE(*td, st); } return result_failed; } *sptr = st; result_ok.length = st->size; return result_ok; } nextepc-0.3.10/lib/s1ap/asn1c/OBJECT_IDENTIFIER.h000066400000000000000000000130731333553357400205200ustar00rootroot00000000000000/* * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _OBJECT_IDENTIFIER_H_ #define _OBJECT_IDENTIFIER_H_ #include #include #include #ifdef __cplusplus extern "C" { #endif typedef uint32_t asn_oid_arc_t; #define ASN_OID_ARC_MAX (~((asn_oid_arc_t)0)) typedef ASN__PRIMITIVE_TYPE_t OBJECT_IDENTIFIER_t; extern asn_TYPE_descriptor_t asn_DEF_OBJECT_IDENTIFIER; extern asn_TYPE_operation_t asn_OP_OBJECT_IDENTIFIER; asn_struct_print_f OBJECT_IDENTIFIER_print; asn_constr_check_f OBJECT_IDENTIFIER_constraint; der_type_encoder_f OBJECT_IDENTIFIER_encode_der; xer_type_decoder_f OBJECT_IDENTIFIER_decode_xer; xer_type_encoder_f OBJECT_IDENTIFIER_encode_xer; asn_random_fill_f OBJECT_IDENTIFIER_random_fill; #define OBJECT_IDENTIFIER_free ASN__PRIMITIVE_TYPE_free #define OBJECT_IDENTIFIER_compare OCTET_STRING_compare #define OBJECT_IDENTIFIER_decode_ber ber_decode_primitive #define OBJECT_IDENTIFIER_encode_der der_encode_primitive #define OBJECT_IDENTIFIER_decode_oer oer_decode_primitive #define OBJECT_IDENTIFIER_encode_oer oer_encode_primitive #define OBJECT_IDENTIFIER_decode_uper OCTET_STRING_decode_uper #define OBJECT_IDENTIFIER_encode_uper OCTET_STRING_encode_uper #define OBJECT_IDENTIFIER_decode_aper OCTET_STRING_decode_aper #define OBJECT_IDENTIFIER_encode_aper OCTET_STRING_encode_aper /********************************** * Some handy conversion routines * **********************************/ /* * This function fills an (arcs) array with OBJECT IDENTIFIER arcs * up to specified (arc_slots) elements. * * EXAMPLE: * void print_arcs(OBJECT_IDENTIFIER_t *oid) { * asn_oid_arc_t fixed_arcs[10]; // Try with fixed space first * asn_oid_arc_t *arcs = fixed_arcs; * size_t arc_slots = sizeof(fixed_arcs)/sizeof(fixed_arcs[0]); // 10 * ssize_t count; // Real number of arcs. * int i; * * count = OBJECT_IDENTIFIER_get_arcs(oid, arcs, arc_slots); * // If necessary, reallocate arcs array and try again. * if(count > arc_slots) { * arc_slots = count; * arcs = malloc(sizeof(asn_oid_arc_t) * arc_slots); * if(!arcs) return; * count = OBJECT_IDENTIFIER_get_arcs(oid, arcs, arc_slots); * assert(count == arc_slots); * } * * // Print the contents of the arcs array. * for(i = 0; i < count; i++) * printf("%"PRIu32"\n", arcs[i]); * * // Avoid memory leak. * if(arcs != fixed_arcs) free(arcs); * } * * RETURN VALUES: * -1/EINVAL: Invalid arguments (oid is missing) * -1/ERANGE: One or more arcs have value out of array cell type range. * >=0: Number of arcs contained in the OBJECT IDENTIFIER * * WARNING: The function always returns the actual number of arcs, * even if there is no sufficient (arc_slots) provided. */ ssize_t OBJECT_IDENTIFIER_get_arcs(const OBJECT_IDENTIFIER_t *oid, asn_oid_arc_t *arcs, size_t arc_slots); /* * This functions initializes the OBJECT IDENTIFIER object with * the given set of arcs. * The minimum of two arcs must be present; some restrictions apply. * RETURN VALUES: * -1/EINVAL: Invalid arguments * -1/ERANGE: The first two arcs do not conform to ASN.1 restrictions. * -1/ENOMEM: Memory allocation failed * 0: The object was initialized with new arcs. */ int OBJECT_IDENTIFIER_set_arcs(OBJECT_IDENTIFIER_t *oid, const asn_oid_arc_t *arcs, size_t arcs_count); /* * Parse the OBJECT IDENTIFIER textual representation ("1.3.6.1.4.1.9363"). * No arc can exceed the (0..ASN_OID_ARC_MAX, which is the same as UINT32_MAX). * This function is not specific to OBJECT IDENTIFIER, it may be used to parse * the RELATIVE-OID data, or any other data consisting of dot-separated * series of numeric values. * * If (oid_txt_length == -1), the strlen() will be invoked to determine the * size of the (oid_text) string. * * After return, the optional (opt_oid_text_end) is set to the character after * the last parsed one. (opt_oid_text_end) is never less than (oid_text). * * RETURN VALUES: * -1: Parse error. * >= 0: Number of arcs contained in the OBJECT IDENTIFIER. * * WARNING: The function always returns the real number of arcs, * even if there is no sufficient (arc_slots) provided. * This is useful for (arc_slots) value estimation. */ ssize_t OBJECT_IDENTIFIER_parse_arcs(const char *oid_text, ssize_t oid_txt_length, asn_oid_arc_t *arcs, size_t arcs_count, const char **opt_oid_text_end); /* * Internal functions. * Used by RELATIVE-OID implementation in particular. */ /* * Retrieve a single arc of size from the (arcbuf) buffer. * RETURN VALUES: * -1: Failed to retrieve the value from the (arcbuf). * >0: Number of bytes consumed from the (arcbuf), <= (arcbuf_len). */ ssize_t OBJECT_IDENTIFIER_get_single_arc(const uint8_t *arcbuf, size_t arcbuf_len, asn_oid_arc_t *ret_value); /* * Write the unterminated arc value into the (arcbuf) which has the size at * least (arcbuf_len). * RETURN VALUES: * -1: (arcbuf_len) size is not sufficient to write the value. * : Number of bytes appended to the arcbuf (<= arcbuf_len). */ ssize_t OBJECT_IDENTIFIER_set_single_arc(uint8_t *arcbuf, size_t arcbuf_len, asn_oid_arc_t arc_value); #ifdef __cplusplus } #endif #endif /* _OBJECT_IDENTIFIER_H_ */ nextepc-0.3.10/lib/s1ap/asn1c/OCTET_STRING.c000066400000000000000000002003241333553357400200040ustar00rootroot00000000000000/*- * Copyright (c) 2003-2017 Lev Walkin . * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include /* for .bits_unused member */ #include /* * OCTET STRING basic type description. */ static const ber_tlv_tag_t asn_DEF_OCTET_STRING_tags[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_OCTET_STRING_specifics_t asn_SPC_OCTET_STRING_specs = { sizeof(OCTET_STRING_t), offsetof(OCTET_STRING_t, _asn_ctx), ASN_OSUBV_STR }; asn_TYPE_operation_t asn_OP_OCTET_STRING = { OCTET_STRING_free, OCTET_STRING_print, /* OCTET STRING generally means a non-ascii sequence */ OCTET_STRING_compare, OCTET_STRING_decode_ber, OCTET_STRING_encode_der, OCTET_STRING_decode_xer_hex, OCTET_STRING_encode_xer, #ifdef ASN_DISABLE_OER_SUPPORT 0, 0, #else OCTET_STRING_decode_oer, OCTET_STRING_encode_oer, #endif /* ASN_DISABLE_OER_SUPPORT */ #ifdef ASN_DISABLE_PER_SUPPORT 0, 0, 0, 0, #else OCTET_STRING_decode_uper, /* Unaligned PER decoder */ OCTET_STRING_encode_uper, /* Unaligned PER encoder */ OCTET_STRING_decode_aper, /* Aligned PER decoder */ OCTET_STRING_encode_aper, /* Aligned PER encoder */ #endif /* ASN_DISABLE_PER_SUPPORT */ OCTET_STRING_random_fill, 0 /* Use generic outmost tag fetcher */ }; asn_TYPE_descriptor_t asn_DEF_OCTET_STRING = { "OCTET STRING", /* Canonical name */ "OCTET_STRING", /* XML tag name */ &asn_OP_OCTET_STRING, asn_DEF_OCTET_STRING_tags, sizeof(asn_DEF_OCTET_STRING_tags) / sizeof(asn_DEF_OCTET_STRING_tags[0]), asn_DEF_OCTET_STRING_tags, /* Same as above */ sizeof(asn_DEF_OCTET_STRING_tags) / sizeof(asn_DEF_OCTET_STRING_tags[0]), { 0, 0, asn_generic_no_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs }; #undef _CH_PHASE #undef NEXT_PHASE #undef PREV_PHASE #define _CH_PHASE(ctx, inc) do { \ if(ctx->phase == 0) \ ctx->context = 0; \ ctx->phase += inc; \ } while(0) #define NEXT_PHASE(ctx) _CH_PHASE(ctx, +1) #define PREV_PHASE(ctx) _CH_PHASE(ctx, -1) #undef ADVANCE #define ADVANCE(num_bytes) do { \ size_t num = (num_bytes); \ buf_ptr = ((const char *)buf_ptr) + num; \ size -= num; \ consumed_myself += num; \ } while(0) #undef RETURN #define RETURN(_code) do { \ asn_dec_rval_t tmprval; \ tmprval.code = _code; \ tmprval.consumed = consumed_myself; \ return tmprval; \ } while(0) #undef APPEND #define APPEND(bufptr, bufsize) do { \ size_t _bs = (bufsize); /* Append size */ \ size_t _ns = ctx->context; /* Allocated now */ \ size_t _es = st->size + _bs; /* Expected size */ \ /* int is really a typeof(st->size): */ \ if((int)_es < 0) RETURN(RC_FAIL); \ if(_ns <= _es) { \ void *ptr; \ /* Be nice and round to the memory allocator */ \ do { _ns = _ns ? _ns << 1 : 16; } \ while(_ns <= _es); \ /* int is really a typeof(st->size): */ \ if((int)_ns < 0) RETURN(RC_FAIL); \ ptr = REALLOC(st->buf, _ns); \ if(ptr) { \ st->buf = (uint8_t *)ptr; \ ctx->context = _ns; \ } else { \ RETURN(RC_FAIL); \ } \ ASN_DEBUG("Reallocating into %ld", (long)_ns); \ } \ memcpy(st->buf + st->size, bufptr, _bs); \ /* Convenient nul-termination */ \ st->buf[_es] = '\0'; \ st->size = _es; \ } while(0) /* * The main reason why ASN.1 is still alive is that too much time and effort * is necessary for learning it more or less adequately, thus creating a gut * necessity to demonstrate that aquired skill everywhere afterwards. * No, I am not going to explain what the following stuff is. */ struct _stack_el { ber_tlv_len_t left; /* What's left to read (or -1) */ ber_tlv_len_t got; /* What was actually processed */ unsigned cont_level; /* Depth of subcontainment */ int want_nulls; /* Want null "end of content" octets? */ int bits_chopped; /* Flag in BIT STRING mode */ ber_tlv_tag_t tag; /* For debugging purposes */ struct _stack_el *prev; struct _stack_el *next; }; struct _stack { struct _stack_el *tail; struct _stack_el *cur_ptr; }; static struct _stack_el * OS__add_stack_el(struct _stack *st) { struct _stack_el *nel; /* * Reuse the old stack frame or allocate a new one. */ if(st->cur_ptr && st->cur_ptr->next) { nel = st->cur_ptr->next; nel->bits_chopped = 0; nel->got = 0; /* Retain the nel->cont_level, it's correct. */ } else { nel = (struct _stack_el *)CALLOC(1, sizeof(struct _stack_el)); if(nel == NULL) return NULL; if(st->tail) { /* Increase a subcontainment depth */ nel->cont_level = st->tail->cont_level + 1; st->tail->next = nel; } nel->prev = st->tail; st->tail = nel; } st->cur_ptr = nel; return nel; } static struct _stack * _new_stack(void) { return (struct _stack *)CALLOC(1, sizeof(struct _stack)); } /* * Decode OCTET STRING type. */ asn_dec_rval_t OCTET_STRING_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **sptr, const void *buf_ptr, size_t size, int tag_mode) { const asn_OCTET_STRING_specifics_t *specs = td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics : &asn_SPC_OCTET_STRING_specs; BIT_STRING_t *st = (BIT_STRING_t *)*sptr; asn_dec_rval_t rval; asn_struct_ctx_t *ctx; ssize_t consumed_myself = 0; struct _stack *stck; /* Expectations stack structure */ struct _stack_el *sel = 0; /* Stack element */ int tlv_constr; enum asn_OS_Subvariant type_variant = specs->subvariant; ASN_DEBUG("Decoding %s as %s (frame %ld)", td->name, (type_variant == ASN_OSUBV_STR) ? "OCTET STRING" : "OS-SpecialCase", (long)size); /* * Create the string if does not exist. */ if(st == NULL) { st = (BIT_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); if(st == NULL) RETURN(RC_FAIL); } /* Restore parsing context */ ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); switch(ctx->phase) { case 0: /* * Check tags. */ rval = ber_check_tags(opt_codec_ctx, td, ctx, buf_ptr, size, tag_mode, -1, &ctx->left, &tlv_constr); if(rval.code != RC_OK) return rval; if(tlv_constr) { /* * Complex operation, requires stack of expectations. */ ctx->ptr = _new_stack(); if(!ctx->ptr) { RETURN(RC_FAIL); } } else { /* * Jump into stackless primitive decoding. */ _CH_PHASE(ctx, 3); if(type_variant == ASN_OSUBV_ANY && tag_mode != 1) APPEND(buf_ptr, rval.consumed); ADVANCE(rval.consumed); goto phase3; } NEXT_PHASE(ctx); /* Fall through */ case 1: phase1: /* * Fill the stack with expectations. */ stck = (struct _stack *)ctx->ptr; sel = stck->cur_ptr; do { ber_tlv_tag_t tlv_tag; ber_tlv_len_t tlv_len; ber_tlv_tag_t expected_tag; ssize_t tl, ll, tlvl; /* This one works even if (sel->left == -1) */ size_t Left = ((!sel||(size_t)sel->left >= size) ?size:(size_t)sel->left); ASN_DEBUG("%p, s->l=%ld, s->wn=%ld, s->g=%ld\n", (void *)sel, (long)(sel?sel->left:0), (long)(sel?sel->want_nulls:0), (long)(sel?sel->got:0) ); if(sel && sel->left <= 0 && sel->want_nulls == 0) { if(sel->prev) { struct _stack_el *prev = sel->prev; if(prev->left != -1) { if(prev->left < sel->got) RETURN(RC_FAIL); prev->left -= sel->got; } prev->got += sel->got; sel = stck->cur_ptr = prev; if(!sel) break; tlv_constr = 1; continue; } else { sel = stck->cur_ptr = 0; break; /* Nothing to wait */ } } tl = ber_fetch_tag(buf_ptr, Left, &tlv_tag); ASN_DEBUG("fetch tag(size=%ld,L=%ld), %sstack, left=%ld, wn=%ld, tl=%ld", (long)size, (long)Left, sel?"":"!", (long)(sel?sel->left:0), (long)(sel?sel->want_nulls:0), (long)tl); switch(tl) { case -1: RETURN(RC_FAIL); case 0: RETURN(RC_WMORE); } tlv_constr = BER_TLV_CONSTRUCTED(buf_ptr); ll = ber_fetch_length(tlv_constr, (const char *)buf_ptr + tl,Left - tl,&tlv_len); ASN_DEBUG("Got tag=%s, tc=%d, left=%ld, tl=%ld, len=%ld, ll=%ld", ber_tlv_tag_string(tlv_tag), tlv_constr, (long)Left, (long)tl, (long)tlv_len, (long)ll); switch(ll) { case -1: RETURN(RC_FAIL); case 0: RETURN(RC_WMORE); } if(sel && sel->want_nulls && ((const uint8_t *)buf_ptr)[0] == 0 && ((const uint8_t *)buf_ptr)[1] == 0) { ASN_DEBUG("Eat EOC; wn=%d--", sel->want_nulls); if(type_variant == ASN_OSUBV_ANY && (tag_mode != 1 || sel->cont_level)) APPEND("\0\0", 2); ADVANCE(2); sel->got += 2; if(sel->left != -1) { sel->left -= 2; /* assert(sel->left >= 2) */ } sel->want_nulls--; if(sel->want_nulls == 0) { /* Move to the next expectation */ sel->left = 0; tlv_constr = 1; } continue; } /* * Set up expected tags, * depending on ASN.1 type being decoded. */ switch(type_variant) { case ASN_OSUBV_BIT: /* X.690: 8.6.4.1, NOTE 2 */ /* Fall through */ case ASN_OSUBV_STR: default: if(sel) { unsigned level = sel->cont_level; if(level < td->all_tags_count) { expected_tag = td->all_tags[level]; break; } else if(td->all_tags_count) { expected_tag = td->all_tags [td->all_tags_count - 1]; break; } /* else, Fall through */ } /* Fall through */ case ASN_OSUBV_ANY: expected_tag = tlv_tag; break; } if(tlv_tag != expected_tag) { char buf[2][32]; ber_tlv_tag_snprint(tlv_tag, buf[0], sizeof(buf[0])); ber_tlv_tag_snprint(td->tags[td->tags_count-1], buf[1], sizeof(buf[1])); ASN_DEBUG("Tag does not match expectation: %s != %s", buf[0], buf[1]); RETURN(RC_FAIL); } tlvl = tl + ll; /* Combined length of T and L encoding */ if((tlv_len + tlvl) < 0) { /* tlv_len value is too big */ ASN_DEBUG("TLV encoding + length (%ld) is too big", (long)tlv_len); RETURN(RC_FAIL); } /* * Append a new expectation. */ sel = OS__add_stack_el(stck); if(!sel) RETURN(RC_FAIL); sel->tag = tlv_tag; sel->want_nulls = (tlv_len==-1); if(sel->prev && sel->prev->left != -1) { /* Check that the parent frame is big enough */ if(sel->prev->left < tlvl + (tlv_len==-1?0:tlv_len)) RETURN(RC_FAIL); if(tlv_len == -1) sel->left = sel->prev->left - tlvl; else sel->left = tlv_len; } else { sel->left = tlv_len; } if(type_variant == ASN_OSUBV_ANY && (tag_mode != 1 || sel->cont_level)) APPEND(buf_ptr, tlvl); sel->got += tlvl; ADVANCE(tlvl); ASN_DEBUG("+EXPECT2 got=%ld left=%ld, wn=%d, clvl=%u", (long)sel->got, (long)sel->left, sel->want_nulls, sel->cont_level); } while(tlv_constr); if(sel == NULL) { /* Finished operation, "phase out" */ ASN_DEBUG("Phase out"); _CH_PHASE(ctx, +3); break; } NEXT_PHASE(ctx); /* Fall through */ case 2: stck = (struct _stack *)ctx->ptr; sel = stck->cur_ptr; ASN_DEBUG("Phase 2: Need %ld bytes, size=%ld, alrg=%ld, wn=%d", (long)sel->left, (long)size, (long)sel->got, sel->want_nulls); { ber_tlv_len_t len; assert(sel->left >= 0); len = ((ber_tlv_len_t)size < sel->left) ? (ber_tlv_len_t)size : sel->left; if(len > 0) { if(type_variant == ASN_OSUBV_BIT && sel->bits_chopped == 0) { /* Put the unused-bits-octet away */ st->bits_unused = *(const uint8_t *)buf_ptr; APPEND(((const char *)buf_ptr+1), (len - 1)); sel->bits_chopped = 1; } else { APPEND(buf_ptr, len); } ADVANCE(len); sel->left -= len; sel->got += len; } if(sel->left) { ASN_DEBUG("OS left %ld, size = %ld, wn=%d\n", (long)sel->left, (long)size, sel->want_nulls); RETURN(RC_WMORE); } PREV_PHASE(ctx); goto phase1; } break; case 3: phase3: /* * Primitive form, no stack required. */ assert(ctx->left >= 0); if(size < (size_t)ctx->left) { if(!size) RETURN(RC_WMORE); if(type_variant == ASN_OSUBV_BIT && !ctx->context) { st->bits_unused = *(const uint8_t *)buf_ptr; ctx->left--; ADVANCE(1); } APPEND(buf_ptr, size); assert(ctx->context > 0); ctx->left -= size; ADVANCE(size); RETURN(RC_WMORE); } else { if(type_variant == ASN_OSUBV_BIT && !ctx->context && ctx->left) { st->bits_unused = *(const uint8_t *)buf_ptr; ctx->left--; ADVANCE(1); } APPEND(buf_ptr, ctx->left); ADVANCE(ctx->left); ctx->left = 0; NEXT_PHASE(ctx); } break; } if(sel) { ASN_DEBUG("3sel p=%p, wn=%d, l=%ld, g=%ld, size=%ld", (void *)sel->prev, sel->want_nulls, (long)sel->left, (long)sel->got, (long)size); if(sel->prev || sel->want_nulls > 1 || sel->left > 0) { RETURN(RC_WMORE); } } /* * BIT STRING-specific processing. */ if(type_variant == ASN_OSUBV_BIT) { if(st->size) { if(st->bits_unused < 0 || st->bits_unused > 7) { RETURN(RC_FAIL); } /* Finalize BIT STRING: zero out unused bits. */ st->buf[st->size-1] &= 0xff << st->bits_unused; } else { if(st->bits_unused) { RETURN(RC_FAIL); } } } ASN_DEBUG("Took %ld bytes to encode %s: [%s]:%ld", (long)consumed_myself, td->name, (type_variant == ASN_OSUBV_STR) ? (char *)st->buf : "", (long)st->size); RETURN(RC_OK); } /* * Encode OCTET STRING type using DER. */ asn_enc_rval_t OCTET_STRING_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key) { asn_enc_rval_t er; const asn_OCTET_STRING_specifics_t *specs = td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics : &asn_SPC_OCTET_STRING_specs; const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; enum asn_OS_Subvariant type_variant = specs->subvariant; int fix_last_byte = 0; ASN_DEBUG("%s %s as OCTET STRING", cb?"Estimating":"Encoding", td->name); /* * Write tags. */ if(type_variant != ASN_OSUBV_ANY || tag_mode == 1) { er.encoded = der_write_tags(td, (type_variant == ASN_OSUBV_BIT) + st->size, tag_mode, type_variant == ASN_OSUBV_ANY, tag, cb, app_key); if(er.encoded == -1) { er.failed_type = td; er.structure_ptr = sptr; return er; } } else { /* Disallow: [] IMPLICIT ANY */ assert(type_variant != ASN_OSUBV_ANY || tag_mode != -1); er.encoded = 0; } if(!cb) { er.encoded += (type_variant == ASN_OSUBV_BIT) + st->size; ASN__ENCODED_OK(er); } /* * Prepare to deal with the last octet of BIT STRING. */ if(type_variant == ASN_OSUBV_BIT) { uint8_t b = st->bits_unused & 0x07; if(b && st->size) fix_last_byte = 1; ASN__CALLBACK(&b, 1); } /* Invoke callback for the main part of the buffer */ ASN__CALLBACK(st->buf, st->size - fix_last_byte); /* The last octet should be stripped off the unused bits */ if(fix_last_byte) { uint8_t b = st->buf[st->size-1] & (0xff << st->bits_unused); ASN__CALLBACK(&b, 1); } ASN__ENCODED_OK(er); cb_failed: ASN__ENCODE_FAILED; } asn_enc_rval_t OCTET_STRING_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, void *app_key) { const char * const h2c = "0123456789ABCDEF"; const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; asn_enc_rval_t er; char scratch[16 * 3 + 4]; char *p = scratch; uint8_t *buf; uint8_t *end; size_t i; if(!st || (!st->buf && st->size)) ASN__ENCODE_FAILED; er.encoded = 0; /* * Dump the contents of the buffer in hexadecimal. */ buf = st->buf; end = buf + st->size; if(flags & XER_F_CANONICAL) { char *scend = scratch + (sizeof(scratch) - 2); for(; buf < end; buf++) { if(p >= scend) { ASN__CALLBACK(scratch, p - scratch); p = scratch; } *p++ = h2c[(*buf >> 4) & 0x0F]; *p++ = h2c[*buf & 0x0F]; } ASN__CALLBACK(scratch, p-scratch); /* Dump the rest */ } else { for(i = 0; buf < end; buf++, i++) { if(!(i % 16) && (i || st->size > 16)) { ASN__CALLBACK(scratch, p-scratch); p = scratch; ASN__TEXT_INDENT(1, ilevel); } *p++ = h2c[(*buf >> 4) & 0x0F]; *p++ = h2c[*buf & 0x0F]; *p++ = 0x20; } if(p - scratch) { p--; /* Remove the tail space */ ASN__CALLBACK(scratch, p-scratch); /* Dump the rest */ if(st->size > 16) ASN__TEXT_INDENT(1, ilevel-1); } } ASN__ENCODED_OK(er); cb_failed: ASN__ENCODE_FAILED; } static const struct OCTET_STRING__xer_escape_table_s { const char *string; int size; } OCTET_STRING__xer_escape_table[] = { #define OSXET(s) { s, sizeof(s) - 1 } OSXET("\074\156\165\154\057\076"), /* */ OSXET("\074\163\157\150\057\076"), /* */ OSXET("\074\163\164\170\057\076"), /* */ OSXET("\074\145\164\170\057\076"), /* */ OSXET("\074\145\157\164\057\076"), /* */ OSXET("\074\145\156\161\057\076"), /* */ OSXET("\074\141\143\153\057\076"), /* */ OSXET("\074\142\145\154\057\076"), /* */ OSXET("\074\142\163\057\076"), /* */ OSXET("\011"), /* \t */ OSXET("\012"), /* \n */ OSXET("\074\166\164\057\076"), /* */ OSXET("\074\146\146\057\076"), /* */ OSXET("\015"), /* \r */ OSXET("\074\163\157\057\076"), /* */ OSXET("\074\163\151\057\076"), /* */ OSXET("\074\144\154\145\057\076"), /* */ OSXET("\074\144\143\061\057\076"), /* */ OSXET("\074\144\143\062\057\076"), /* */ OSXET("\074\144\143\063\057\076"), /* */ OSXET("\074\144\143\064\057\076"), /* */ OSXET("\074\156\141\153\057\076"), /* */ OSXET("\074\163\171\156\057\076"), /* */ OSXET("\074\145\164\142\057\076"), /* */ OSXET("\074\143\141\156\057\076"), /* */ OSXET("\074\145\155\057\076"), /* */ OSXET("\074\163\165\142\057\076"), /* */ OSXET("\074\145\163\143\057\076"), /* */ OSXET("\074\151\163\064\057\076"), /* */ OSXET("\074\151\163\063\057\076"), /* */ OSXET("\074\151\163\062\057\076"), /* */ OSXET("\074\151\163\061\057\076"), /* */ { 0, 0 }, /* " " */ { 0, 0 }, /* ! */ { 0, 0 }, /* \" */ { 0, 0 }, /* # */ { 0, 0 }, /* $ */ { 0, 0 }, /* % */ OSXET("\046\141\155\160\073"), /* & */ { 0, 0 }, /* ' */ {0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, /* ()*+,-./ */ {0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, /* 01234567 */ {0,0},{0,0},{0,0},{0,0}, /* 89:; */ OSXET("\046\154\164\073"), /* < */ { 0, 0 }, /* = */ OSXET("\046\147\164\073"), /* > */ }; static int OS__check_escaped_control_char(const void *buf, int size) { size_t i; /* * Inefficient algorithm which translates the escape sequences * defined above into characters. Returns -1 if not found. * TODO: replace by a faster algorithm (bsearch(), hash or * nested table lookups). */ for(i = 0; i < 32 /* Don't spend time on the bottom half */; i++) { const struct OCTET_STRING__xer_escape_table_s *el; el = &OCTET_STRING__xer_escape_table[i]; if(el->size == size && memcmp(buf, el->string, size) == 0) return i; } return -1; } static int OCTET_STRING__handle_control_chars(void *struct_ptr, const void *chunk_buf, size_t chunk_size) { /* * This might be one of the escape sequences * for control characters. Check it out. * #11.15.5 */ int control_char = OS__check_escaped_control_char(chunk_buf,chunk_size); if(control_char >= 0) { OCTET_STRING_t *st = (OCTET_STRING_t *)struct_ptr; void *p = REALLOC(st->buf, st->size + 2); if(p) { st->buf = (uint8_t *)p; st->buf[st->size++] = control_char; st->buf[st->size] = '\0'; /* nul-termination */ return 0; } } return -1; /* No, it's not */ } asn_enc_rval_t OCTET_STRING_encode_xer_utf8(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, void *app_key) { const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; asn_enc_rval_t er; uint8_t *buf, *end; uint8_t *ss; /* Sequence start */ ssize_t encoded_len = 0; (void)ilevel; /* Unused argument */ (void)flags; /* Unused argument */ if(!st || (!st->buf && st->size)) ASN__ENCODE_FAILED; buf = st->buf; end = buf + st->size; for(ss = buf; buf < end; buf++) { unsigned int ch = *buf; int s_len; /* Special encoding sequence length */ /* * Escape certain characters: X.680/11.15 */ if(ch < sizeof(OCTET_STRING__xer_escape_table) /sizeof(OCTET_STRING__xer_escape_table[0]) && (s_len = OCTET_STRING__xer_escape_table[ch].size)) { if(((buf - ss) && cb(ss, buf - ss, app_key) < 0) || cb(OCTET_STRING__xer_escape_table[ch].string, s_len, app_key) < 0) ASN__ENCODE_FAILED; encoded_len += (buf - ss) + s_len; ss = buf + 1; } } encoded_len += (buf - ss); if((buf - ss) && cb(ss, buf - ss, app_key) < 0) ASN__ENCODE_FAILED; er.encoded = encoded_len; ASN__ENCODED_OK(er); } /* * Convert from hexadecimal format (cstring): "AB CD EF" */ static ssize_t OCTET_STRING__convert_hexadecimal(void *sptr, const void *chunk_buf, size_t chunk_size, int have_more) { OCTET_STRING_t *st = (OCTET_STRING_t *)sptr; const char *chunk_stop = (const char *)chunk_buf; const char *p = chunk_stop; const char *pend = p + chunk_size; unsigned int clv = 0; int half = 0; /* Half bit */ uint8_t *buf; /* Reallocate buffer according to high cap estimation */ size_t new_size = st->size + (chunk_size + 1) / 2; void *nptr = REALLOC(st->buf, new_size + 1); if(!nptr) return -1; st->buf = (uint8_t *)nptr; buf = st->buf + st->size; /* * If something like " a b c " appears here, the " a b":3 will be * converted, and the rest skipped. That is, unless buf_size is greater * than chunk_size, then it'll be equivalent to "ABC0". */ for(; p < pend; p++) { int ch = *(const unsigned char *)p; switch(ch) { case 0x09: case 0x0a: case 0x0c: case 0x0d: case 0x20: /* Ignore whitespace */ continue; case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: /*01234*/ case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: /*56789*/ clv = (clv << 4) + (ch - 0x30); break; case 0x41: case 0x42: case 0x43: /* ABC */ case 0x44: case 0x45: case 0x46: /* DEF */ clv = (clv << 4) + (ch - 0x41 + 10); break; case 0x61: case 0x62: case 0x63: /* abc */ case 0x64: case 0x65: case 0x66: /* def */ clv = (clv << 4) + (ch - 0x61 + 10); break; default: *buf = 0; /* JIC */ return -1; } if(half++) { half = 0; *buf++ = clv; chunk_stop = p + 1; } } /* * Check partial decoding. */ if(half) { if(have_more) { /* * Partial specification is fine, * because no more more PXER_TEXT data is available. */ *buf++ = clv << 4; chunk_stop = p; } } else { chunk_stop = p; } st->size = buf - st->buf; /* Adjust the buffer size */ assert(st->size <= new_size); st->buf[st->size] = 0; /* Courtesy termination */ return (chunk_stop - (const char *)chunk_buf); /* Converted size */ } /* * Convert from binary format: "00101011101" */ static ssize_t OCTET_STRING__convert_binary(void *sptr, const void *chunk_buf, size_t chunk_size, int have_more) { BIT_STRING_t *st = (BIT_STRING_t *)sptr; const char *p = (const char *)chunk_buf; const char *pend = p + chunk_size; int bits_unused = st->bits_unused & 0x7; uint8_t *buf; /* Reallocate buffer according to high cap estimation */ size_t new_size = st->size + (chunk_size + 7) / 8; void *nptr = REALLOC(st->buf, new_size + 1); if(!nptr) return -1; st->buf = (uint8_t *)nptr; buf = st->buf + st->size; (void)have_more; if(bits_unused == 0) bits_unused = 8; else if(st->size) buf--; /* * Convert series of 0 and 1 into the octet string. */ for(; p < pend; p++) { int ch = *(const unsigned char *)p; switch(ch) { case 0x09: case 0x0a: case 0x0c: case 0x0d: case 0x20: /* Ignore whitespace */ break; case 0x30: case 0x31: if(bits_unused-- <= 0) { *++buf = 0; /* Clean the cell */ bits_unused = 7; } *buf |= (ch&1) << bits_unused; break; default: st->bits_unused = bits_unused; return -1; } } if(bits_unused == 8) { st->size = buf - st->buf; st->bits_unused = 0; } else { st->size = buf - st->buf + 1; st->bits_unused = bits_unused; } assert(st->size <= new_size); st->buf[st->size] = 0; /* Courtesy termination */ return chunk_size; /* Converted in full */ } /* * Something like strtod(), but with stricter rules. */ static int OS__strtoent(int base, const char *buf, const char *end, int32_t *ret_value) { const int32_t last_unicode_codepoint = 0x10ffff; int32_t val = 0; const char *p; for(p = buf; p < end; p++) { int ch = *p; switch(ch) { case 0x30: case 0x31: case 0x32: case 0x33: case 0x34: /*01234*/ case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: /*56789*/ val = val * base + (ch - 0x30); break; case 0x41: case 0x42: case 0x43: /* ABC */ case 0x44: case 0x45: case 0x46: /* DEF */ val = val * base + (ch - 0x41 + 10); break; case 0x61: case 0x62: case 0x63: /* abc */ case 0x64: case 0x65: case 0x66: /* def */ val = val * base + (ch - 0x61 + 10); break; case 0x3b: /* ';' */ *ret_value = val; return (p - buf) + 1; default: return -1; /* Character set error */ } /* Value exceeds the Unicode range. */ if(val > last_unicode_codepoint) { return -1; } } *ret_value = -1; return (p - buf); } /* * Convert from the plain UTF-8 format, expanding entity references: "2 < 3" */ static ssize_t OCTET_STRING__convert_entrefs(void *sptr, const void *chunk_buf, size_t chunk_size, int have_more) { OCTET_STRING_t *st = (OCTET_STRING_t *)sptr; const char *p = (const char *)chunk_buf; const char *pend = p + chunk_size; uint8_t *buf; /* Reallocate buffer */ size_t new_size = st->size + chunk_size; void *nptr = REALLOC(st->buf, new_size + 1); if(!nptr) return -1; st->buf = (uint8_t *)nptr; buf = st->buf + st->size; /* * Convert series of 0 and 1 into the octet string. */ for(; p < pend; p++) { int ch = *(const unsigned char *)p; int len; /* Length of the rest of the chunk */ if(ch != 0x26 /* '&' */) { *buf++ = ch; continue; /* That was easy... */ } /* * Process entity reference. */ len = chunk_size - (p - (const char *)chunk_buf); if(len == 1 /* "&" */) goto want_more; if(p[1] == 0x23 /* '#' */) { const char *pval; /* Pointer to start of digits */ int32_t val = 0; /* Entity reference value */ int base; if(len == 2 /* "&#" */) goto want_more; if(p[2] == 0x78 /* 'x' */) pval = p + 3, base = 16; else pval = p + 2, base = 10; len = OS__strtoent(base, pval, p + len, &val); if(len == -1) { /* Invalid charset. Just copy verbatim. */ *buf++ = ch; continue; } if(!len || pval[len-1] != 0x3b) goto want_more; assert(val > 0); p += (pval - p) + len - 1; /* Advance past entref */ if(val < 0x80) { *buf++ = (char)val; } else if(val < 0x800) { *buf++ = 0xc0 | ((val >> 6)); *buf++ = 0x80 | ((val & 0x3f)); } else if(val < 0x10000) { *buf++ = 0xe0 | ((val >> 12)); *buf++ = 0x80 | ((val >> 6) & 0x3f); *buf++ = 0x80 | ((val & 0x3f)); } else if(val < 0x200000) { *buf++ = 0xf0 | ((val >> 18)); *buf++ = 0x80 | ((val >> 12) & 0x3f); *buf++ = 0x80 | ((val >> 6) & 0x3f); *buf++ = 0x80 | ((val & 0x3f)); } else if(val < 0x4000000) { *buf++ = 0xf8 | ((val >> 24)); *buf++ = 0x80 | ((val >> 18) & 0x3f); *buf++ = 0x80 | ((val >> 12) & 0x3f); *buf++ = 0x80 | ((val >> 6) & 0x3f); *buf++ = 0x80 | ((val & 0x3f)); } else { *buf++ = 0xfc | ((val >> 30) & 0x1); *buf++ = 0x80 | ((val >> 24) & 0x3f); *buf++ = 0x80 | ((val >> 18) & 0x3f); *buf++ = 0x80 | ((val >> 12) & 0x3f); *buf++ = 0x80 | ((val >> 6) & 0x3f); *buf++ = 0x80 | ((val & 0x3f)); } } else { /* * Ugly, limited parsing of & > < */ char *sc = (char *)memchr(p, 0x3b, len > 5 ? 5 : len); if(!sc) goto want_more; if((sc - p) == 4 && p[1] == 0x61 /* 'a' */ && p[2] == 0x6d /* 'm' */ && p[3] == 0x70 /* 'p' */) { *buf++ = 0x26; p = sc; continue; } if((sc - p) == 3) { if(p[1] == 0x6c) { *buf = 0x3c; /* '<' */ } else if(p[1] == 0x67) { *buf = 0x3e; /* '>' */ } else { /* Unsupported entity reference */ *buf++ = ch; continue; } if(p[2] != 0x74) { /* Unsupported entity reference */ *buf++ = ch; continue; } buf++; p = sc; continue; } /* Unsupported entity reference */ *buf++ = ch; } continue; want_more: if(have_more) { /* * We know that no more data (of the same type) * is coming. Copy the rest verbatim. */ *buf++ = ch; continue; } chunk_size = (p - (const char *)chunk_buf); /* Processing stalled: need more data */ break; } st->size = buf - st->buf; assert(st->size <= new_size); st->buf[st->size] = 0; /* Courtesy termination */ return chunk_size; /* Converted in full */ } /* * Decode OCTET STRING from the XML element's body. */ static asn_dec_rval_t OCTET_STRING__decode_xer( const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **sptr, const char *opt_mname, const void *buf_ptr, size_t size, int (*opt_unexpected_tag_decoder)(void *struct_ptr, const void *chunk_buf, size_t chunk_size), ssize_t (*body_receiver)(void *struct_ptr, const void *chunk_buf, size_t chunk_size, int have_more)) { OCTET_STRING_t *st = (OCTET_STRING_t *)*sptr; const asn_OCTET_STRING_specifics_t *specs = td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics : &asn_SPC_OCTET_STRING_specs; const char *xml_tag = opt_mname ? opt_mname : td->xml_tag; asn_struct_ctx_t *ctx; /* Per-structure parser context */ asn_dec_rval_t rval; /* Return value from the decoder */ int st_allocated; /* * Create the string if does not exist. */ if(!st) { st = (OCTET_STRING_t *)CALLOC(1, specs->struct_size); *sptr = (void *)st; if(!st) goto sta_failed; st_allocated = 1; } else { st_allocated = 0; } if(!st->buf) { /* This is separate from above section */ st->buf = (uint8_t *)CALLOC(1, 1); if(!st->buf) { if(st_allocated) { *sptr = 0; goto stb_failed; } else { goto sta_failed; } } } /* Restore parsing context */ ctx = (asn_struct_ctx_t *)(((char *)*sptr) + specs->ctx_offset); return xer_decode_general(opt_codec_ctx, ctx, *sptr, xml_tag, buf_ptr, size, opt_unexpected_tag_decoder, body_receiver); stb_failed: FREEMEM(st); sta_failed: rval.code = RC_FAIL; rval.consumed = 0; return rval; } /* * Decode OCTET STRING from the hexadecimal data. */ asn_dec_rval_t OCTET_STRING_decode_xer_hex(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **sptr, const char *opt_mname, const void *buf_ptr, size_t size) { return OCTET_STRING__decode_xer(opt_codec_ctx, td, sptr, opt_mname, buf_ptr, size, 0, OCTET_STRING__convert_hexadecimal); } /* * Decode OCTET STRING from the binary (0/1) data. */ asn_dec_rval_t OCTET_STRING_decode_xer_binary(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **sptr, const char *opt_mname, const void *buf_ptr, size_t size) { return OCTET_STRING__decode_xer(opt_codec_ctx, td, sptr, opt_mname, buf_ptr, size, 0, OCTET_STRING__convert_binary); } /* * Decode OCTET STRING from the string (ASCII/UTF-8) data. */ asn_dec_rval_t OCTET_STRING_decode_xer_utf8(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **sptr, const char *opt_mname, const void *buf_ptr, size_t size) { return OCTET_STRING__decode_xer(opt_codec_ctx, td, sptr, opt_mname, buf_ptr, size, OCTET_STRING__handle_control_chars, OCTET_STRING__convert_entrefs); } #ifndef ASN_DISABLE_PER_SUPPORT static int OCTET_STRING_per_get_characters(asn_per_data_t *po, uint8_t *buf, size_t units, unsigned int bpc, unsigned int unit_bits, long lb, long ub, const asn_per_constraints_t *pc) { uint8_t *end = buf + units * bpc; ASN_DEBUG("Expanding %d characters into (%ld..%ld):%d", (int)units, lb, ub, unit_bits); /* X.691: 27.5.4 */ if((unsigned long)ub <= ((unsigned long)2 << (unit_bits - 1))) { /* Decode without translation */ lb = 0; } else if(pc && pc->code2value) { if(unit_bits > 16) return 1; /* FATAL: can't have constrained * UniversalString with more than * 16 million code points */ for(; buf < end; buf += bpc) { int value; int code = per_get_few_bits(po, unit_bits); if(code < 0) return -1; /* WMORE */ value = pc->code2value(code); if(value < 0) { ASN_DEBUG("Code %d (0x%02x) is" " not in map (%ld..%ld)", code, code, lb, ub); return 1; /* FATAL */ } switch(bpc) { case 1: *buf = value; break; case 2: buf[0] = value >> 8; buf[1] = value; break; case 4: buf[0] = value >> 24; buf[1] = value >> 16; buf[2] = value >> 8; buf[3] = value; break; } } return 0; } /* Shortcut the no-op copying to the aligned structure */ if(lb == 0 && (unit_bits == 8 * bpc)) { return per_get_many_bits(po, buf, 0, unit_bits * units); } for(; buf < end; buf += bpc) { int32_t code = per_get_few_bits(po, unit_bits); int32_t ch = code + lb; if(code < 0) return -1; /* WMORE */ if(ch > ub) { ASN_DEBUG("Code %d is out of range (%ld..%ld)", ch, lb, ub); return 1; /* FATAL */ } switch(bpc) { case 1: *buf = ch; break; case 2: buf[0] = ch >> 8; buf[1] = ch; break; case 4: buf[0] = ch >> 24; buf[1] = ch >> 16; buf[2] = ch >> 8; buf[3] = ch; break; } } return 0; } static int OCTET_STRING_per_put_characters(asn_per_outp_t *po, const uint8_t *buf, size_t units, unsigned int bpc, unsigned int unit_bits, long lb, long ub, const asn_per_constraints_t *pc) { const uint8_t *end = buf + units * bpc; ASN_DEBUG("Squeezing %d characters into (%ld..%ld):%d (%d bpc)", (int)units, lb, ub, unit_bits, bpc); /* X.691: 27.5.4 */ if((unsigned long)ub <= ((unsigned long)2 << (unit_bits - 1))) { /* Encode as is */ lb = 0; } else if(pc && pc->value2code) { for(; buf < end; buf += bpc) { int code; uint32_t value; switch(bpc) { case 1: value = *(const uint8_t *)buf; break; case 2: value = (buf[0] << 8) | buf[1]; break; case 4: value = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; break; default: return -1; } code = pc->value2code(value); if(code < 0) { ASN_DEBUG("Character %d (0x%02x) is" " not in map (%ld..%ld)", *buf, *buf, lb, ub); return -1; } if(per_put_few_bits(po, code, unit_bits)) return -1; } } /* Shortcut the no-op copying to the aligned structure */ if(lb == 0 && (unit_bits == 8 * bpc)) { return per_put_many_bits(po, buf, unit_bits * units); } for(ub -= lb; buf < end; buf += bpc) { int ch; uint32_t value; switch(bpc) { case 1: value = *(const uint8_t *)buf; break; case 2: value = (buf[0] << 8) | buf[1]; break; case 4: value = (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; break; default: return -1; } ch = value - lb; if(ch < 0 || ch > ub) { ASN_DEBUG("Character %d (0x%02x) is out of range (%ld..%ld)", *buf, value, lb, ub + lb); return -1; } if(per_put_few_bits(po, ch, unit_bits)) return -1; } return 0; } static asn_per_constraints_t asn_DEF_OCTET_STRING_constraints = { { APC_CONSTRAINED, 8, 8, 0, 255 }, { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 }, 0, 0 }; asn_dec_rval_t OCTET_STRING_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { const asn_OCTET_STRING_specifics_t *specs = td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics : &asn_SPC_OCTET_STRING_specs; const asn_per_constraints_t *pc = constraints ? constraints : td->encoding_constraints.per_constraints; const asn_per_constraint_t *cval; const asn_per_constraint_t *csiz; asn_dec_rval_t rval = { RC_OK, 0 }; OCTET_STRING_t *st = (OCTET_STRING_t *)*sptr; ssize_t consumed_myself = 0; int repeat; enum { OS__BPC_CHAR = 1, OS__BPC_U16 = 2, OS__BPC_U32 = 4 } bpc; /* Bytes per character */ unsigned int unit_bits; unsigned int canonical_unit_bits; (void)opt_codec_ctx; if(pc) { cval = &pc->value; csiz = &pc->size; } else { cval = &asn_DEF_OCTET_STRING_constraints.value; csiz = &asn_DEF_OCTET_STRING_constraints.size; } switch(specs->subvariant) { default: case ASN_OSUBV_ANY: case ASN_OSUBV_BIT: ASN_DEBUG("Unrecognized subvariant %d", specs->subvariant); RETURN(RC_FAIL); break; case ASN_OSUBV_STR: canonical_unit_bits = unit_bits = 8; if(cval->flags & APC_CONSTRAINED) unit_bits = cval->range_bits; bpc = OS__BPC_CHAR; break; case ASN_OSUBV_U16: canonical_unit_bits = unit_bits = 16; if(cval->flags & APC_CONSTRAINED) unit_bits = cval->range_bits; bpc = OS__BPC_U16; break; case ASN_OSUBV_U32: canonical_unit_bits = unit_bits = 32; if(cval->flags & APC_CONSTRAINED) unit_bits = cval->range_bits; bpc = OS__BPC_U32; break; } /* * Allocate the string. */ if(!st) { st = (OCTET_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); if(!st) RETURN(RC_FAIL); } ASN_DEBUG("PER Decoding %s size %ld .. %ld bits %d", csiz->flags & APC_EXTENSIBLE ? "extensible" : "non-extensible", csiz->lower_bound, csiz->upper_bound, csiz->effective_bits); if(csiz->flags & APC_EXTENSIBLE) { int inext = per_get_few_bits(pd, 1); if(inext < 0) RETURN(RC_WMORE); if(inext) { csiz = &asn_DEF_OCTET_STRING_constraints.size; unit_bits = canonical_unit_bits; } } if(csiz->effective_bits >= 0) { FREEMEM(st->buf); if(bpc) { st->size = csiz->upper_bound * bpc; } else { st->size = (csiz->upper_bound + 7) >> 3; } st->buf = (uint8_t *)MALLOC(st->size + 1); if(!st->buf) { st->size = 0; RETURN(RC_FAIL); } } /* X.691, #16.5: zero-length encoding */ /* X.691, #16.6: short fixed length encoding (up to 2 octets) */ /* X.691, #16.7: long fixed length encoding (up to 64K octets) */ if(csiz->effective_bits == 0) { int ret; if(bpc) { ASN_DEBUG("Encoding OCTET STRING size %ld", csiz->upper_bound); ret = OCTET_STRING_per_get_characters(pd, st->buf, csiz->upper_bound, bpc, unit_bits, cval->lower_bound, cval->upper_bound, pc); if(ret > 0) RETURN(RC_FAIL); } else { ASN_DEBUG("Encoding BIT STRING size %ld", csiz->upper_bound); ret = per_get_many_bits(pd, st->buf, 0, unit_bits * csiz->upper_bound); } if(ret < 0) RETURN(RC_WMORE); consumed_myself += unit_bits * csiz->upper_bound; st->buf[st->size] = 0; RETURN(RC_OK); } st->size = 0; do { ssize_t raw_len; ssize_t len_bytes; void *p; int ret; /* Get the PER length */ raw_len = uper_get_length(pd, csiz->effective_bits, csiz->lower_bound, &repeat); if(raw_len < 0) RETURN(RC_WMORE); if(raw_len == 0 && st->buf) break; ASN_DEBUG("Got PER length eb %ld, len %ld, %s (%s)", (long)csiz->effective_bits, (long)raw_len, repeat ? "repeat" : "once", td->name); len_bytes = raw_len * bpc; p = REALLOC(st->buf, st->size + len_bytes + 1); if(!p) RETURN(RC_FAIL); st->buf = (uint8_t *)p; ret = OCTET_STRING_per_get_characters(pd, &st->buf[st->size], raw_len, bpc, unit_bits, cval->lower_bound, cval->upper_bound, pc); if(ret > 0) RETURN(RC_FAIL); if(ret < 0) RETURN(RC_WMORE); st->size += len_bytes; } while(repeat); st->buf[st->size] = 0; /* nul-terminate */ return rval; } asn_enc_rval_t OCTET_STRING_encode_uper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { const asn_OCTET_STRING_specifics_t *specs = td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics : &asn_SPC_OCTET_STRING_specs; const asn_per_constraints_t *pc = constraints ? constraints : td->encoding_constraints.per_constraints; const asn_per_constraint_t *cval; const asn_per_constraint_t *csiz; const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; asn_enc_rval_t er = { 0, 0, 0 }; int inext = 0; /* Lies not within extension root */ unsigned int unit_bits; unsigned int canonical_unit_bits; size_t size_in_units; const uint8_t *buf; int ret; enum { OS__BPC_CHAR = 1, OS__BPC_U16 = 2, OS__BPC_U32 = 4 } bpc; /* Bytes per character */ int ct_extensible; if(!st || (!st->buf && st->size)) ASN__ENCODE_FAILED; if(pc) { cval = &pc->value; csiz = &pc->size; } else { cval = &asn_DEF_OCTET_STRING_constraints.value; csiz = &asn_DEF_OCTET_STRING_constraints.size; } ct_extensible = csiz->flags & APC_EXTENSIBLE; switch(specs->subvariant) { default: case ASN_OSUBV_ANY: case ASN_OSUBV_BIT: ASN__ENCODE_FAILED; case ASN_OSUBV_STR: canonical_unit_bits = unit_bits = 8; if(cval->flags & APC_CONSTRAINED) unit_bits = cval->range_bits; bpc = OS__BPC_CHAR; size_in_units = st->size; break; case ASN_OSUBV_U16: canonical_unit_bits = unit_bits = 16; if(cval->flags & APC_CONSTRAINED) unit_bits = cval->range_bits; bpc = OS__BPC_U16; size_in_units = st->size >> 1; if(st->size & 1) { ASN_DEBUG("%s string size is not modulo 2", td->name); ASN__ENCODE_FAILED; } break; case ASN_OSUBV_U32: canonical_unit_bits = unit_bits = 32; if(cval->flags & APC_CONSTRAINED) unit_bits = cval->range_bits; bpc = OS__BPC_U32; size_in_units = st->size >> 2; if(st->size & 3) { ASN_DEBUG("%s string size is not modulo 4", td->name); ASN__ENCODE_FAILED; } break; } ASN_DEBUG("Encoding %s into %" ASN_PRI_SIZE " units of %d bits" " (%ld..%ld, effective %d)%s", td->name, size_in_units, unit_bits, csiz->lower_bound, csiz->upper_bound, csiz->effective_bits, ct_extensible ? " EXT" : ""); /* Figure out whether size lies within PER visible constraint */ if(csiz->effective_bits >= 0) { if((ssize_t)size_in_units < csiz->lower_bound || (ssize_t)size_in_units > csiz->upper_bound) { if(ct_extensible) { csiz = &asn_DEF_OCTET_STRING_constraints.size; unit_bits = canonical_unit_bits; inext = 1; } else { ASN__ENCODE_FAILED; } } } else { inext = 0; } if(ct_extensible) { /* Declare whether length is [not] within extension root */ if(per_put_few_bits(po, inext, 1)) ASN__ENCODE_FAILED; } if(csiz->effective_bits >= 0 && !inext) { ASN_DEBUG("Encoding %" ASN_PRI_SIZE " bytes (%ld), length in %d bits", st->size, size_in_units - csiz->lower_bound, csiz->effective_bits); ret = per_put_few_bits(po, size_in_units - csiz->lower_bound, csiz->effective_bits); if(ret) ASN__ENCODE_FAILED; ret = OCTET_STRING_per_put_characters(po, st->buf, size_in_units, bpc, unit_bits, cval->lower_bound, cval->upper_bound, pc); if(ret) ASN__ENCODE_FAILED; ASN__ENCODED_OK(er); } ASN_DEBUG("Encoding %" ASN_PRI_SIZE " bytes", st->size); buf = st->buf; ASN_DEBUG("Encoding %" ASN_PRI_SIZE " in units", size_in_units); do { int need_eom = 0; ssize_t may_save = uper_put_length(po, size_in_units, &need_eom); if(may_save < 0) ASN__ENCODE_FAILED; ASN_DEBUG("Encoding %" ASN_PRI_SSIZE " of %" ASN_PRI_SIZE "%s", may_save, size_in_units, need_eom ? ",+EOM" : ""); ret = OCTET_STRING_per_put_characters(po, buf, may_save, bpc, unit_bits, cval->lower_bound, cval->upper_bound, pc); if(ret) ASN__ENCODE_FAILED; buf += may_save * bpc; size_in_units -= may_save; assert(!(may_save & 0x07) || !size_in_units); if(need_eom && uper_put_length(po, 0, 0)) ASN__ENCODE_FAILED; /* End of Message length */ } while(size_in_units); ASN__ENCODED_OK(er); } asn_dec_rval_t OCTET_STRING_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { const asn_OCTET_STRING_specifics_t *specs = td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics : &asn_SPC_OCTET_STRING_specs; const asn_per_constraints_t *pc = constraints ? constraints : td->encoding_constraints.per_constraints; const asn_per_constraint_t *cval; const asn_per_constraint_t *csiz; asn_dec_rval_t rval = { RC_OK, 0 }; BIT_STRING_t *st = (BIT_STRING_t *)*sptr; ssize_t consumed_myself = 0; int repeat; enum { OS__BPC_BIT = 0, OS__BPC_CHAR = 1, OS__BPC_U16 = 2, OS__BPC_U32 = 4 } bpc; /* Bytes per character */ unsigned int unit_bits; unsigned int canonical_unit_bits; (void)opt_codec_ctx; if(pc) { cval = &pc->value; csiz = &pc->size; } else { cval = &asn_DEF_OCTET_STRING_constraints.value; csiz = &asn_DEF_OCTET_STRING_constraints.size; } switch(specs->subvariant) { default: /* case ASN_OSUBV_ANY: ASN_DEBUG("Unrecognized subvariant %d", specs->subvariant); RETURN(RC_FAIL); */ case ASN_OSUBV_BIT: canonical_unit_bits = unit_bits = 1; bpc = OS__BPC_BIT; break; case ASN_OSUBV_ANY: case ASN_OSUBV_STR: canonical_unit_bits = unit_bits = 8; /* if(cval->flags & APC_CONSTRAINED) unit_bits = cval->range_bits; */ bpc = OS__BPC_CHAR; break; case ASN_OSUBV_U16: canonical_unit_bits = unit_bits = 16; if(cval->flags & APC_CONSTRAINED) unit_bits = cval->range_bits; bpc = OS__BPC_U16; break; case ASN_OSUBV_U32: canonical_unit_bits = unit_bits = 32; if(cval->flags & APC_CONSTRAINED) unit_bits = cval->range_bits; bpc = OS__BPC_U32; break; } /* * Allocate the string. */ if(!st) { st = (BIT_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); if(!st) RETURN(RC_FAIL); } ASN_DEBUG("PER Decoding %s size %ld .. %ld bits %d", csiz->flags & APC_EXTENSIBLE ? "extensible" : "non-extensible", csiz->lower_bound, csiz->upper_bound, csiz->effective_bits); if(csiz->flags & APC_EXTENSIBLE) { int inext = per_get_few_bits(pd, 1); if(inext < 0) RETURN(RC_WMORE); if(inext) { csiz = &asn_DEF_OCTET_STRING_constraints.size; cval = &asn_DEF_OCTET_STRING_constraints.value; unit_bits = canonical_unit_bits; } } if(csiz->effective_bits >= 0) { FREEMEM(st->buf); if(bpc) { st->size = csiz->upper_bound * bpc; } else { st->size = (csiz->upper_bound + 7) >> 3; } st->buf = (uint8_t *)MALLOC(st->size + 1); if(!st->buf) { st->size = 0; RETURN(RC_FAIL); } } /* X.691, #16.5: zero-length encoding */ /* X.691, #16.6: short fixed length encoding (up to 2 octets) */ /* X.691, #16.7: long fixed length encoding (up to 64K octets) */ if(csiz->effective_bits == 0) { int ret; if (st->size > 2) { /* X.691 #16 NOTE 1 */ if (aper_get_align(pd) < 0) RETURN(RC_FAIL); } if(bpc) { ASN_DEBUG("Decoding OCTET STRING size %ld", csiz->upper_bound); ret = OCTET_STRING_per_get_characters(pd, st->buf, csiz->upper_bound, bpc, unit_bits, cval->lower_bound, cval->upper_bound, pc); if(ret > 0) RETURN(RC_FAIL); } else { ASN_DEBUG("Decoding BIT STRING size %ld", csiz->upper_bound); ret = per_get_many_bits(pd, st->buf, 0, unit_bits * csiz->upper_bound); } if(ret < 0) RETURN(RC_WMORE); consumed_myself += unit_bits * csiz->upper_bound; st->buf[st->size] = 0; if(bpc == 0) { int ubs = (csiz->upper_bound & 0x7); st->bits_unused = ubs ? 8 - ubs : 0; } RETURN(RC_OK); } st->size = 0; do { ssize_t raw_len; ssize_t len_bytes; ssize_t len_bits; void *p; int ret; /* Get the PER length */ if (csiz->upper_bound - csiz->lower_bound == 0) /* Indefinite length case */ raw_len = aper_get_length(pd, -1, csiz->effective_bits, &repeat); else raw_len = aper_get_length(pd, csiz->upper_bound - csiz->lower_bound + 1, csiz->effective_bits, &repeat); repeat = 0; if(raw_len < 0) RETURN(RC_WMORE); raw_len += csiz->lower_bound; ASN_DEBUG("Got PER length eb %ld, len %ld, %s (%s)", (long)csiz->effective_bits, (long)raw_len, repeat ? "repeat" : "once", td->name); if (raw_len > 2) { /* X.691 #16 NOTE 1 */ if (aper_get_align(pd) < 0) RETURN(RC_FAIL); } if(bpc) { len_bytes = raw_len * bpc; len_bits = len_bytes * unit_bits; } else { len_bits = raw_len; len_bytes = (len_bits + 7) >> 3; if(len_bits & 0x7) st->bits_unused = 8 - (len_bits & 0x7); /* len_bits be multiple of 16K if repeat is set */ } p = REALLOC(st->buf, st->size + len_bytes + 1); if(!p) RETURN(RC_FAIL); st->buf = (uint8_t *)p; if(bpc) { ret = OCTET_STRING_per_get_characters(pd, &st->buf[st->size], raw_len, bpc, unit_bits, cval->lower_bound, cval->upper_bound, pc); if(ret > 0) RETURN(RC_FAIL); } else { ret = per_get_many_bits(pd, &st->buf[st->size], 0, len_bits); } if(ret < 0) RETURN(RC_WMORE); st->size += len_bytes; } while(repeat); st->buf[st->size] = 0; /* nul-terminate */ return rval; } asn_enc_rval_t OCTET_STRING_encode_aper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { const asn_OCTET_STRING_specifics_t *specs = td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics : &asn_SPC_OCTET_STRING_specs; const asn_per_constraints_t *pc = constraints ? constraints : td->encoding_constraints.per_constraints; const asn_per_constraint_t *cval; const asn_per_constraint_t *csiz; const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; asn_enc_rval_t er = { 0, 0, 0 }; int inext = 0; /* Lies not within extension root */ unsigned int unit_bits; unsigned int canonical_unit_bits; unsigned int sizeinunits; const uint8_t *buf; int ret; enum { OS__BPC_BIT = 0, OS__BPC_CHAR = 1, OS__BPC_U16 = 2, OS__BPC_U32 = 4 } bpc; /* Bytes per character */ int ct_extensible; if(!st || (!st->buf && st->size)) ASN__ENCODE_FAILED; if(pc) { cval = &pc->value; csiz = &pc->size; } else { cval = &asn_DEF_OCTET_STRING_constraints.value; csiz = &asn_DEF_OCTET_STRING_constraints.size; } ct_extensible = csiz->flags & APC_EXTENSIBLE; switch(specs->subvariant) { default: /* case ASN_OSUBV_ANY: ASN__ENCODE_FAILED; */ case ASN_OSUBV_BIT: canonical_unit_bits = unit_bits = 1; bpc = OS__BPC_BIT; sizeinunits = st->size * 8 - (st->bits_unused & 0x07); ASN_DEBUG("BIT STRING of %d bytes", sizeinunits); break; case ASN_OSUBV_ANY: case ASN_OSUBV_STR: canonical_unit_bits = unit_bits = 8; /* if(cval->flags & APC_CONSTRAINED) unit_bits = 8; */ bpc = OS__BPC_CHAR; sizeinunits = st->size; break; case ASN_OSUBV_U16: canonical_unit_bits = unit_bits = 16; if(cval->flags & APC_CONSTRAINED) unit_bits = cval->range_bits; bpc = OS__BPC_U16; sizeinunits = st->size / 2; break; case ASN_OSUBV_U32: canonical_unit_bits = unit_bits = 32; if(cval->flags & APC_CONSTRAINED) unit_bits = cval->range_bits; bpc = OS__BPC_U32; sizeinunits = st->size / 4; break; } ASN_DEBUG("Encoding %s into %d units of %d bits" " (%ld..%ld, effective %d)%s", td->name, sizeinunits, unit_bits, csiz->lower_bound, csiz->upper_bound, csiz->effective_bits, ct_extensible ? " EXT" : ""); /* Figure out wheter size lies within PER visible constraint */ if(csiz->effective_bits >= 0) { if((int)sizeinunits < csiz->lower_bound || (int)sizeinunits > csiz->upper_bound) { if(ct_extensible) { cval = &asn_DEF_OCTET_STRING_constraints.value; csiz = &asn_DEF_OCTET_STRING_constraints.size; unit_bits = canonical_unit_bits; inext = 1; } else ASN__ENCODE_FAILED; } } else { inext = 0; } if(ct_extensible) { /* Declare whether length is [not] within extension root */ if(per_put_few_bits(po, inext, 1)) ASN__ENCODE_FAILED; } /* X.691, #16.5: zero-length encoding */ /* X.691, #16.6: short fixed length encoding (up to 2 octets) */ /* X.691, #16.7: long fixed length encoding (up to 64K octets) */ if(csiz->effective_bits >= 0) { ASN_DEBUG("Encoding %lu bytes (%ld), length in %d bits", st->size, sizeinunits - csiz->lower_bound, csiz->effective_bits); if (csiz->effective_bits > 0) { ret = aper_put_length(po, csiz->upper_bound - csiz->lower_bound + 1, sizeinunits - csiz->lower_bound); if(ret) ASN__ENCODE_FAILED; } if (st->size > 2) { /* X.691 #16 NOTE 1 */ if (aper_put_align(po) < 0) ASN__ENCODE_FAILED; } if(bpc) { ret = OCTET_STRING_per_put_characters(po, st->buf, sizeinunits, bpc, unit_bits, cval->lower_bound, cval->upper_bound, pc); } else { ret = per_put_many_bits(po, st->buf, sizeinunits * unit_bits); } if(ret) ASN__ENCODE_FAILED; ASN__ENCODED_OK(er); } ASN_DEBUG("Encoding %lu bytes", st->size); if(sizeinunits == 0) { if(aper_put_length(po, -1, 0)) ASN__ENCODE_FAILED; ASN__ENCODED_OK(er); } buf = st->buf; while(sizeinunits) { ssize_t maySave = aper_put_length(po, -1, sizeinunits); if(maySave < 0) ASN__ENCODE_FAILED; ASN_DEBUG("Encoding %ld of %ld", (long)maySave, (long)sizeinunits); if(bpc) { ret = OCTET_STRING_per_put_characters(po, buf, maySave, bpc, unit_bits, cval->lower_bound, cval->upper_bound, pc); } else { ret = per_put_many_bits(po, buf, maySave * unit_bits); } if(ret) ASN__ENCODE_FAILED; if(bpc) buf += maySave * bpc; else buf += maySave >> 3; sizeinunits -= maySave; assert(!(maySave & 0x07) || !sizeinunits); } ASN__ENCODED_OK(er); } #endif /* ASN_DISABLE_PER_SUPPORT */ int OCTET_STRING_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { const char * const h2c = "0123456789ABCDEF"; const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; char scratch[16 * 3 + 4]; char *p = scratch; uint8_t *buf; uint8_t *end; size_t i; (void)td; /* Unused argument */ if(!st || (!st->buf && st->size)) return (cb("", 8, app_key) < 0) ? -1 : 0; /* * Dump the contents of the buffer in hexadecimal. */ buf = st->buf; end = buf + st->size; for(i = 0; buf < end; buf++, i++) { if(!(i % 16) && (i || st->size > 16)) { if(cb(scratch, p - scratch, app_key) < 0) return -1; _i_INDENT(1); p = scratch; } *p++ = h2c[(*buf >> 4) & 0x0F]; *p++ = h2c[*buf & 0x0F]; *p++ = 0x20; } if(p > scratch) { p--; /* Remove the tail space */ if(cb(scratch, p - scratch, app_key) < 0) return -1; } return 0; } int OCTET_STRING_print_utf8(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; (void)td; /* Unused argument */ (void)ilevel; /* Unused argument */ if(st && (st->buf || !st->size)) { return (cb(st->buf, st->size, app_key) < 0) ? -1 : 0; } else { return (cb("", 8, app_key) < 0) ? -1 : 0; } } void OCTET_STRING_free(const asn_TYPE_descriptor_t *td, void *sptr, enum asn_struct_free_method method) { OCTET_STRING_t *st = (OCTET_STRING_t *)sptr; const asn_OCTET_STRING_specifics_t *specs; asn_struct_ctx_t *ctx; struct _stack *stck; if(!td || !st) return; specs = td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics : &asn_SPC_OCTET_STRING_specs; ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); ASN_DEBUG("Freeing %s as OCTET STRING", td->name); if(st->buf) { FREEMEM(st->buf); st->buf = 0; } /* * Remove decode-time stack. */ stck = (struct _stack *)ctx->ptr; if(stck) { while(stck->tail) { struct _stack_el *sel = stck->tail; stck->tail = sel->prev; FREEMEM(sel); } FREEMEM(stck); } switch(method) { case ASFM_FREE_EVERYTHING: FREEMEM(sptr); break; case ASFM_FREE_UNDERLYING: break; case ASFM_FREE_UNDERLYING_AND_RESET: memset(sptr, 0, td->specifics ? ((const asn_OCTET_STRING_specifics_t *)(td->specifics)) ->struct_size : sizeof(OCTET_STRING_t)); break; } } /* * Conversion routines. */ int OCTET_STRING_fromBuf(OCTET_STRING_t *st, const char *str, int len) { void *buf; if(st == 0 || (str == 0 && len)) { errno = EINVAL; return -1; } /* * Clear the OCTET STRING. */ if(str == NULL) { FREEMEM(st->buf); st->buf = 0; st->size = 0; return 0; } /* Determine the original string size, if not explicitly given */ if(len < 0) len = strlen(str); /* Allocate and fill the memory */ buf = MALLOC(len + 1); if(buf == NULL) return -1; memcpy(buf, str, len); ((uint8_t *)buf)[len] = '\0'; /* Couldn't use memcpy(len+1)! */ FREEMEM(st->buf); st->buf = (uint8_t *)buf; st->size = len; return 0; } OCTET_STRING_t * OCTET_STRING_new_fromBuf(const asn_TYPE_descriptor_t *td, const char *str, int len) { const asn_OCTET_STRING_specifics_t *specs = td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics : &asn_SPC_OCTET_STRING_specs; OCTET_STRING_t *st; st = (OCTET_STRING_t *)CALLOC(1, specs->struct_size); if(st && str && OCTET_STRING_fromBuf(st, str, len)) { FREEMEM(st); st = NULL; } return st; } /* * Lexicographically compare the common prefix of both strings, * and if it is the same return -1 for the smallest string. */ int OCTET_STRING_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const void *bptr) { const asn_OCTET_STRING_specifics_t *specs = td->specifics; const OCTET_STRING_t *a = aptr; const OCTET_STRING_t *b = bptr; assert(!specs || specs->subvariant != ASN_OSUBV_BIT); if(a && b) { size_t common_prefix_size = a->size <= b->size ? a->size : b->size; int ret = memcmp(a->buf, b->buf, common_prefix_size); if(ret == 0) { /* Figure out which string with equal prefixes is longer. */ if(a->size < b->size) { return -1; } else if(a->size > b->size) { return 1; } else { return 0; } } else { return ret < 0 ? -1 : 1; } } else if(!a && !b) { return 0; } else if(!a) { return -1; } else { return 1; } } /* * Biased function for randomizing character values around their limits. */ static uint32_t OCTET_STRING__random_char(unsigned long lb, unsigned long ub) { assert(lb <= ub); switch(asn_random_between(0, 16)) { case 0: if(lb < ub) return lb + 1; /* Fall through */ case 1: return lb; case 2: if(lb < ub) return ub - 1; /* Fall through */ case 3: return ub; default: return asn_random_between(lb, ub); } } size_t OCTET_STRING_random_length_constrained( const asn_TYPE_descriptor_t *td, const asn_encoding_constraints_t *constraints, size_t max_length) { const unsigned lengths[] = {0, 1, 2, 3, 4, 8, 126, 127, 128, 16383, 16384, 16385, 65534, 65535, 65536, 65537}; size_t rnd_len; /* Figure out how far we should go */ rnd_len = lengths[asn_random_between( 0, sizeof(lengths) / sizeof(lengths[0]) - 1)]; if(!constraints || !constraints->per_constraints) constraints = &td->encoding_constraints; if(constraints->per_constraints) { const asn_per_constraint_t *pc = &constraints->per_constraints->size; if(pc->flags & APC_CONSTRAINED) { long suggested_upper_bound = pc->upper_bound < (ssize_t)max_length ? pc->upper_bound : (ssize_t)max_length; if(max_length <= (size_t)pc->lower_bound) { return pc->lower_bound; } if(pc->flags & APC_EXTENSIBLE) { switch(asn_random_between(0, 5)) { case 0: if(pc->lower_bound > 0) { rnd_len = pc->lower_bound - 1; break; } /* Fall through */ case 1: rnd_len = pc->upper_bound + 1; break; case 2: /* Keep rnd_len from the table */ if(rnd_len <= max_length) { break; } /* Fall through */ default: rnd_len = asn_random_between(pc->lower_bound, suggested_upper_bound); } } else { rnd_len = asn_random_between(pc->lower_bound, suggested_upper_bound); } } else { rnd_len = asn_random_between(0, max_length); } } else if(rnd_len > max_length) { rnd_len = asn_random_between(0, max_length); } return rnd_len; } asn_random_fill_result_t OCTET_STRING_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, const asn_encoding_constraints_t *constraints, size_t max_length) { const asn_OCTET_STRING_specifics_t *specs = td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics : &asn_SPC_OCTET_STRING_specs; asn_random_fill_result_t result_ok = {ARFILL_OK, 1}; asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; unsigned int unit_bytes = 1; unsigned long clb = 0; /* Lower bound on char */ unsigned long cub = 255; /* Higher bound on char value */ uint8_t *buf; uint8_t *bend; uint8_t *b; size_t rnd_len; OCTET_STRING_t *st; if(max_length == 0 && !*sptr) return result_skipped; switch(specs->subvariant) { default: case ASN_OSUBV_ANY: return result_failed; case ASN_OSUBV_BIT: /* Handled by BIT_STRING itself. */ return result_failed; case ASN_OSUBV_STR: unit_bytes = 1; clb = 0; cub = 255; break; case ASN_OSUBV_U16: unit_bytes = 2; clb = 0; cub = 65535; break; case ASN_OSUBV_U32: unit_bytes = 4; clb = 0; cub = 0x10FFFF; break; } if(!constraints || !constraints->per_constraints) constraints = &td->encoding_constraints; if(constraints->per_constraints) { const asn_per_constraint_t *pc = &constraints->per_constraints->value; if(pc->flags & APC_SEMI_CONSTRAINED) { clb = pc->lower_bound; } else if(pc->flags & APC_CONSTRAINED) { clb = pc->lower_bound; cub = pc->upper_bound; } } rnd_len = OCTET_STRING_random_length_constrained(td, constraints, max_length); buf = CALLOC(unit_bytes, rnd_len + 1); if(!buf) return result_failed; bend = &buf[unit_bytes * rnd_len]; switch(unit_bytes) { case 1: for(b = buf; b < bend; b += unit_bytes) { *(uint8_t *)b = OCTET_STRING__random_char(clb, cub); } *(uint8_t *)b = 0; break; case 2: for(b = buf; b < bend; b += unit_bytes) { uint32_t code = OCTET_STRING__random_char(clb, cub); b[0] = code >> 8; b[1] = code; } *(uint16_t *)b = 0; break; case 4: for(b = buf; b < bend; b += unit_bytes) { uint32_t code = OCTET_STRING__random_char(clb, cub); b[0] = code >> 24; b[1] = code >> 16; b[2] = code >> 8; b[3] = code; } *(uint32_t *)b = 0; break; } if(*sptr) { st = *sptr; FREEMEM(st->buf); } else { st = (OCTET_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); if(!st) { FREEMEM(buf); return result_failed; } } st->buf = buf; st->size = unit_bytes * rnd_len; result_ok.length = st->size; return result_ok; } nextepc-0.3.10/lib/s1ap/asn1c/OCTET_STRING.h000066400000000000000000000067771333553357400200310ustar00rootroot00000000000000/*- * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _OCTET_STRING_H_ #define _OCTET_STRING_H_ #include #ifdef __cplusplus extern "C" { #endif typedef struct OCTET_STRING { uint8_t *buf; /* Buffer with consecutive OCTET_STRING bits */ size_t size; /* Size of the buffer */ asn_struct_ctx_t _asn_ctx; /* Parsing across buffer boundaries */ } OCTET_STRING_t; extern asn_TYPE_descriptor_t asn_DEF_OCTET_STRING; extern asn_TYPE_operation_t asn_OP_OCTET_STRING; asn_struct_free_f OCTET_STRING_free; asn_struct_print_f OCTET_STRING_print; asn_struct_print_f OCTET_STRING_print_utf8; asn_struct_compare_f OCTET_STRING_compare; ber_type_decoder_f OCTET_STRING_decode_ber; der_type_encoder_f OCTET_STRING_encode_der; xer_type_decoder_f OCTET_STRING_decode_xer_hex; /* Hexadecimal */ xer_type_decoder_f OCTET_STRING_decode_xer_binary; /* 01010111010 */ xer_type_decoder_f OCTET_STRING_decode_xer_utf8; /* ASCII/UTF-8 */ xer_type_encoder_f OCTET_STRING_encode_xer; xer_type_encoder_f OCTET_STRING_encode_xer_utf8; oer_type_decoder_f OCTET_STRING_decode_oer; oer_type_encoder_f OCTET_STRING_encode_oer; per_type_decoder_f OCTET_STRING_decode_uper; per_type_encoder_f OCTET_STRING_encode_uper; per_type_decoder_f OCTET_STRING_decode_aper; per_type_encoder_f OCTET_STRING_encode_aper; asn_random_fill_f OCTET_STRING_random_fill; #define OCTET_STRING_constraint asn_generic_no_constraint #define OCTET_STRING_decode_xer OCTET_STRING_decode_xer_hex /****************************** * Handy conversion routines. * ******************************/ /* * This function clears the previous value of the OCTET STRING (if any) * and then allocates a new memory with the specified content (str/size). * If size = -1, the size of the original string will be determined * using strlen(str). * If str equals to NULL, the function will silently clear the * current contents of the OCTET STRING. * Returns 0 if it was possible to perform operation, -1 otherwise. */ int OCTET_STRING_fromBuf(OCTET_STRING_t *s, const char *str, int size); /* Handy conversion from the C string into the OCTET STRING. */ #define OCTET_STRING_fromString(s, str) OCTET_STRING_fromBuf(s, str, -1) /* * Allocate and fill the new OCTET STRING and return a pointer to the newly * allocated object. NULL is permitted in str: the function will just allocate * empty OCTET STRING. */ OCTET_STRING_t *OCTET_STRING_new_fromBuf(const asn_TYPE_descriptor_t *td, const char *str, int size); /**************************** * Internally useful stuff. * ****************************/ typedef struct asn_OCTET_STRING_specifics_s { /* * Target structure description. */ unsigned struct_size; /* Size of the structure */ unsigned ctx_offset; /* Offset of the asn_struct_ctx_t member */ enum asn_OS_Subvariant { ASN_OSUBV_ANY, /* The open type (ANY) */ ASN_OSUBV_BIT, /* BIT STRING */ ASN_OSUBV_STR, /* String types, not {BMP,Universal}String */ ASN_OSUBV_U16, /* 16-bit character (BMPString) */ ASN_OSUBV_U32 /* 32-bit character (UniversalString) */ } subvariant; } asn_OCTET_STRING_specifics_t; extern asn_OCTET_STRING_specifics_t asn_SPC_OCTET_STRING_specs; size_t OCTET_STRING_random_length_constrained( const asn_TYPE_descriptor_t *, const asn_encoding_constraints_t *, size_t max_length); #ifdef __cplusplus } #endif #endif /* _OCTET_STRING_H_ */ nextepc-0.3.10/lib/s1ap/asn1c/OCTET_STRING_oer.c000066400000000000000000000121771333553357400206600ustar00rootroot00000000000000/* * Copyright (c) 2017 Lev Walkin . * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef ASN_DISABLE_OER_SUPPORT #include #include #include asn_dec_rval_t OCTET_STRING_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_oer_constraints_t *constraints, void **sptr, const void *ptr, size_t size) { const asn_OCTET_STRING_specifics_t *specs = td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics : &asn_SPC_OCTET_STRING_specs; OCTET_STRING_t *st = (OCTET_STRING_t *)*sptr; const asn_oer_constraints_t *cts = constraints ? constraints : td->encoding_constraints.oer_constraints; ssize_t ct_size = cts ? cts->size : -1; asn_dec_rval_t rval = {RC_OK, 0}; size_t expected_length = 0; size_t unit_bytes; switch(specs->subvariant) { default: case ASN_OSUBV_BIT: ASN_DEBUG("Invalid use of OCTET STRING to decode BIT STRING"); ASN__DECODE_FAILED; case ASN_OSUBV_ANY: /* Fall through */ case ASN_OSUBV_STR: unit_bytes = 1; break; case ASN_OSUBV_U16: unit_bytes = 2; break; case ASN_OSUBV_U32: unit_bytes = 4; break; } (void)opt_codec_ctx; if(!st) { st = (OCTET_STRING_t *)(*sptr = CALLOC(1, specs->struct_size)); if(!st) ASN__DECODE_FAILED; } if(ct_size >= 0) { expected_length = unit_bytes * ct_size; } else { /* * X.696 (08/2015) #27.2 * Encode length determinant as _number of octets_, but only * if upper bound is not equal to lower bound. */ ssize_t len_len = oer_fetch_length(ptr, size, &expected_length); if(len_len > 0) { rval.consumed = len_len; ptr = (const char *)ptr + len_len; size -= len_len; } else if(len_len == 0) { ASN__DECODE_STARVED; } else if(len_len < 0) { ASN__DECODE_FAILED; } if(expected_length % unit_bytes != 0) { ASN_DEBUG( "Data size %" ASN_PRI_SIZE " bytes is not consistent with multiplier %" ASN_PRI_SIZE "", expected_length, unit_bytes); ASN__DECODE_FAILED; } } if(size < expected_length) { ASN__DECODE_STARVED; } else { uint8_t *buf = MALLOC(expected_length + 1); if(buf == NULL) { ASN__DECODE_FAILED; } else { memcpy(buf, ptr, expected_length); buf[expected_length] = '\0'; } FREEMEM(st->buf); st->buf = buf; st->size = expected_length; rval.consumed += expected_length; return rval; } } /* * Encode as Canonical OER. */ asn_enc_rval_t OCTET_STRING_encode_oer(const asn_TYPE_descriptor_t *td, const asn_oer_constraints_t *constraints, const void *sptr, asn_app_consume_bytes_f *cb, void *app_key) { const asn_OCTET_STRING_specifics_t *specs = td->specifics ? (const asn_OCTET_STRING_specifics_t *)td->specifics : &asn_SPC_OCTET_STRING_specs; const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; const asn_oer_constraints_t *cts = constraints ? constraints : td->encoding_constraints.oer_constraints; ssize_t ct_size = cts ? cts->size : -1; asn_enc_rval_t er = {0, 0, 0}; if(!st) ASN__ENCODE_FAILED; ASN_DEBUG("Encoding %s %" ASN_PRI_SIZE " as OCTET STRING", td ? td->name : "", st->size); if(ct_size >= 0) { /* * Check that available data matches the constraint */ size_t unit_bytes; switch(specs->subvariant) { default: case ASN_OSUBV_BIT: ASN_DEBUG("Invalid use of OCTET STRING to encode BIT STRING"); ASN__ENCODE_FAILED; case ASN_OSUBV_ANY: /* Fall through */ case ASN_OSUBV_STR: unit_bytes = 1; break; case ASN_OSUBV_U16: unit_bytes = 2; break; case ASN_OSUBV_U32: unit_bytes = 4; break; } if(st->size != unit_bytes * (size_t)ct_size) { ASN_DEBUG( "Trying to encode %s (%" ASN_PRI_SIZE " bytes) which doesn't fit SIZE " "constraint (%" ASN_PRI_SIZE ")", td->name, st->size, ct_size); ASN__ENCODE_FAILED; } } else { /* * X.696 (08/2015) #27.2 * Encode length determinant as _number of octets_, but only * if upper bound is not equal to lower bound. */ ssize_t ret = oer_serialize_length(st->size, cb, app_key); if(ret < 0) { ASN__ENCODE_FAILED; } er.encoded += ret; } er.encoded += st->size; if(cb(st->buf, st->size, app_key) < 0) { ASN__ENCODE_FAILED; } else { ASN__ENCODED_OK(er); } } #endif /* ASN_DISABLE_OER_SUPPORT */ nextepc-0.3.10/lib/s1ap/asn1c/OPEN_TYPE.c000066400000000000000000000344261333553357400174520ustar00rootroot00000000000000/* * Copyright (c) 2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include #include #include asn_TYPE_operation_t asn_OP_OPEN_TYPE = { OPEN_TYPE_free, OPEN_TYPE_print, OPEN_TYPE_compare, OPEN_TYPE_decode_ber, OPEN_TYPE_encode_der, OPEN_TYPE_decode_xer, OPEN_TYPE_encode_xer, #ifdef ASN_DISABLE_OER_SUPPORT 0, 0, /* No OER support, use "-gen-OER" to enable */ #else OPEN_TYPE_decode_oer, OPEN_TYPE_encode_oer, #endif #ifdef ASN_DISABLE_PER_SUPPORT 0, 0, 0, 0, #else OPEN_TYPE_decode_uper, OPEN_TYPE_encode_uper, OPEN_TYPE_decode_aper, OPEN_TYPE_encode_aper, #endif 0, /* Random fill is not supported for open type */ 0 /* Use generic outmost tag fetcher */ }; #undef ADVANCE #define ADVANCE(num_bytes) \ do { \ size_t num = num_bytes; \ ptr = ((const char *)ptr) + num; \ size -= num; \ consumed_myself += num; \ } while(0) asn_dec_rval_t OPEN_TYPE_ber_get(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void *sptr, const asn_TYPE_member_t *elm, const void *ptr, size_t size) { size_t consumed_myself = 0; asn_type_selector_result_t selected; void *memb_ptr; /* Pointer to the member */ void **memb_ptr2; /* Pointer to that pointer */ void *inner_value; asn_dec_rval_t rv; if(!(elm->flags & ATF_OPEN_TYPE)) { ASN__DECODE_FAILED; } if(!elm->type_selector) { ASN_DEBUG("Type selector is not defined for Open Type %s->%s->%s", td->name, elm->name, elm->type->name); ASN__DECODE_FAILED; } selected = elm->type_selector(td, sptr); if(!selected.presence_index) { ASN__DECODE_FAILED; } /* Fetch the pointer to this member */ if(elm->flags & ATF_POINTER) { memb_ptr2 = (void **)((char *)sptr + elm->memb_offset); } else { memb_ptr = (char *)sptr + elm->memb_offset; memb_ptr2 = &memb_ptr; } if(*memb_ptr2 != NULL) { /* Make sure we reset the structure first before encoding */ if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, 0) != 0) { ASN__DECODE_FAILED; } } inner_value = (char *)*memb_ptr2 + elm->type->elements[selected.presence_index - 1].memb_offset; ASN_DEBUG("presence %d\n", selected.presence_index); rv = selected.type_descriptor->op->ber_decoder( opt_codec_ctx, selected.type_descriptor, &inner_value, ptr, size, elm->tag_mode); ADVANCE(rv.consumed); rv.consumed = 0; switch(rv.code) { case RC_OK: if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, selected.presence_index) == 0) { rv.code = RC_OK; rv.consumed = consumed_myself; return rv; } else { /* Oh, now a full-blown failure failure */ } /* Fall through */ case RC_FAIL: rv.consumed = consumed_myself; /* Fall through */ case RC_WMORE: break; } if(*memb_ptr2) { if(elm->flags & ATF_POINTER) { ASN_STRUCT_FREE(*selected.type_descriptor, inner_value); *memb_ptr2 = NULL; } else { ASN_STRUCT_RESET(*selected.type_descriptor, inner_value); } } return rv; } asn_dec_rval_t OPEN_TYPE_xer_get(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void *sptr, const asn_TYPE_member_t *elm, const void *ptr, size_t size) { size_t consumed_myself = 0; asn_type_selector_result_t selected; void *memb_ptr; /* Pointer to the member */ void **memb_ptr2; /* Pointer to that pointer */ void *inner_value; asn_dec_rval_t rv; int xer_context = 0; ssize_t ch_size; pxer_chunk_type_e ch_type; if(!(elm->flags & ATF_OPEN_TYPE)) { ASN__DECODE_FAILED; } if(!elm->type_selector) { ASN_DEBUG("Type selector is not defined for Open Type %s->%s->%s", td->name, elm->name, elm->type->name); ASN__DECODE_FAILED; } selected = elm->type_selector(td, sptr); if(!selected.presence_index) { ASN__DECODE_FAILED; } /* Fetch the pointer to this member */ assert(elm->flags == ATF_OPEN_TYPE); if(elm->flags & ATF_POINTER) { memb_ptr2 = (void **)((char *)sptr + elm->memb_offset); } else { memb_ptr = (char *)sptr + elm->memb_offset; memb_ptr2 = &memb_ptr; } if(*memb_ptr2 != NULL) { /* Make sure we reset the structure first before encoding */ if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, 0) != 0) { ASN__DECODE_FAILED; } } /* * Confirm wrapper. */ for(;;) { ch_size = xer_next_token(&xer_context, ptr, size, &ch_type); if(ch_size < 0) { ASN__DECODE_FAILED; } else { switch(ch_type) { case PXER_WMORE: ASN__DECODE_STARVED; case PXER_COMMENT: case PXER_TEXT: ADVANCE(ch_size); continue; case PXER_TAG: break; } break; } } /* * Wrapper value confirmed. */ switch(xer_check_tag(ptr, ch_size, elm->name)) { case XCT_OPENING: ADVANCE(ch_size); break; case XCT_BROKEN: default: ASN__DECODE_FAILED; } inner_value = (char *)*memb_ptr2 + elm->type->elements[selected.presence_index - 1].memb_offset; rv = selected.type_descriptor->op->xer_decoder( opt_codec_ctx, selected.type_descriptor, &inner_value, NULL, ptr, size); ADVANCE(rv.consumed); rv.consumed = 0; switch(rv.code) { case RC_OK: if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, selected.presence_index) == 0) { break; } else { rv.code = RC_FAIL; } /* Fall through */ case RC_FAIL: /* Point to a best position where failure occurred */ rv.consumed = consumed_myself; /* Fall through */ case RC_WMORE: /* Wrt. rv.consumed==0: * In case a genuine RC_WMORE, the whole Open Type decoding * will have to be restarted. */ if(*memb_ptr2) { if(elm->flags & ATF_POINTER) { ASN_STRUCT_FREE(*selected.type_descriptor, inner_value); *memb_ptr2 = NULL; } else { ASN_STRUCT_RESET(*selected.type_descriptor, inner_value); } } return rv; } /* * Finalize wrapper. */ for(;;) { ch_size = xer_next_token(&xer_context, ptr, size, &ch_type); if(ch_size < 0) { ASN__DECODE_FAILED; } else { switch(ch_type) { case PXER_WMORE: ASN__DECODE_STARVED; case PXER_COMMENT: case PXER_TEXT: ADVANCE(ch_size); continue; case PXER_TAG: break; } break; } } /* * Wrapper value confirmed. */ switch(xer_check_tag(ptr, ch_size, elm->name)) { case XCT_CLOSING: ADVANCE(ch_size); break; case XCT_BROKEN: default: ASN__DECODE_FAILED; } rv.consumed += consumed_myself; return rv; } #ifndef ASN_DISABLE_PER_SUPPORT asn_dec_rval_t OPEN_TYPE_uper_get(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void *sptr, const asn_TYPE_member_t *elm, asn_per_data_t *pd) { asn_type_selector_result_t selected; void *memb_ptr; /* Pointer to the member */ void **memb_ptr2; /* Pointer to that pointer */ void *inner_value; asn_dec_rval_t rv; if(!(elm->flags & ATF_OPEN_TYPE)) { ASN__DECODE_FAILED; } if(!elm->type_selector) { ASN_DEBUG("Type selector is not defined for Open Type %s->%s->%s", td->name, elm->name, elm->type->name); ASN__DECODE_FAILED; } selected = elm->type_selector(td, sptr); if(!selected.presence_index) { ASN__DECODE_FAILED; } /* Fetch the pointer to this member */ assert(elm->flags == ATF_OPEN_TYPE); if(elm->flags & ATF_POINTER) { memb_ptr2 = (void **)((char *)sptr + elm->memb_offset); } else { memb_ptr = (char *)sptr + elm->memb_offset; memb_ptr2 = &memb_ptr; } if(*memb_ptr2 != NULL) { /* Make sure we reset the structure first before encoding */ if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, 0) != 0) { ASN__DECODE_FAILED; } } inner_value = (char *)*memb_ptr2 + elm->type->elements[selected.presence_index - 1].memb_offset; rv = uper_open_type_get(opt_codec_ctx, selected.type_descriptor, NULL, &inner_value, pd); switch(rv.code) { case RC_OK: if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, selected.presence_index) == 0) { break; } else { rv.code = RC_FAIL; } /* Fall through */ case RC_WMORE: case RC_FAIL: if(*memb_ptr2) { if(elm->flags & ATF_POINTER) { ASN_STRUCT_FREE(*selected.type_descriptor, inner_value); *memb_ptr2 = NULL; } else { ASN_STRUCT_RESET(*selected.type_descriptor, inner_value); } } } return rv; } asn_enc_rval_t OPEN_TYPE_encode_uper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { const void *memb_ptr; /* Pointer to the member */ asn_TYPE_member_t *elm; /* CHOICE's element */ asn_enc_rval_t er; unsigned present; (void)constraints; present = CHOICE_variant_get_presence(td, sptr); if(present == 0 || present > td->elements_count) { ASN__ENCODE_FAILED; } else { present--; } ASN_DEBUG("Encoding %s OPEN TYPE element %d", td->name, present); elm = &td->elements[present]; if(elm->flags & ATF_POINTER) { /* Member is a pointer to another structure */ memb_ptr = *(const void *const *)((const char *)sptr + elm->memb_offset); if(!memb_ptr) ASN__ENCODE_FAILED; } else { memb_ptr = (const char *)sptr + elm->memb_offset; } if(uper_open_type_put(elm->type, NULL, memb_ptr, po) < 0) { ASN__ENCODE_FAILED; } er.encoded = 0; ASN__ENCODED_OK(er); } asn_dec_rval_t OPEN_TYPE_aper_get(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void *sptr, const asn_TYPE_member_t *elm, asn_per_data_t *pd) { asn_type_selector_result_t selected; void *memb_ptr; /* Pointer to the member */ void **memb_ptr2; /* Pointer to that pointer */ void *inner_value; asn_dec_rval_t rv; if(!(elm->flags & ATF_OPEN_TYPE)) { ASN__DECODE_FAILED; } if(!elm->type_selector) { ASN_DEBUG("Type selector is not defined for Open Type %s->%s->%s", td->name, elm->name, elm->type->name); ASN__DECODE_FAILED; } selected = elm->type_selector(td, sptr); if(!selected.presence_index) { ASN__DECODE_FAILED; } /* Fetch the pointer to this member */ assert(elm->flags == ATF_OPEN_TYPE); if(elm->flags & ATF_POINTER) { memb_ptr2 = (void **)((char *)sptr + elm->memb_offset); } else { memb_ptr = (char *)sptr + elm->memb_offset; memb_ptr2 = &memb_ptr; } if(*memb_ptr2 != NULL) { /* Make sure we reset the structure first before encoding */ if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, 0) != 0) { ASN__DECODE_FAILED; } } inner_value = (char *)*memb_ptr2 + elm->type->elements[selected.presence_index - 1].memb_offset; rv = aper_open_type_get(opt_codec_ctx, selected.type_descriptor, NULL, &inner_value, pd); switch(rv.code) { case RC_OK: if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, selected.presence_index) == 0) { break; } else { rv.code = RC_FAIL; } /* Fall through */ case RC_WMORE: case RC_FAIL: if(*memb_ptr2) { if(elm->flags & ATF_POINTER) { ASN_STRUCT_FREE(*selected.type_descriptor, inner_value); *memb_ptr2 = NULL; } else { ASN_STRUCT_RESET(*selected.type_descriptor, inner_value); } } } return rv; } asn_enc_rval_t OPEN_TYPE_encode_aper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { const void *memb_ptr; /* Pointer to the member */ asn_TYPE_member_t *elm; /* CHOICE's element */ asn_enc_rval_t er; unsigned present; (void)constraints; present = CHOICE_variant_get_presence(td, sptr); if(present == 0 || present > td->elements_count) { ASN__ENCODE_FAILED; } else { present--; } ASN_DEBUG("Encoding %s OPEN TYPE element %d", td->name, present); elm = &td->elements[present]; if(elm->flags & ATF_POINTER) { /* Member is a pointer to another structure */ memb_ptr = *(const void *const *)((const char *)sptr + elm->memb_offset); if(!memb_ptr) ASN__ENCODE_FAILED; } else { memb_ptr = (const char *)sptr + elm->memb_offset; } if(aper_open_type_put(elm->type, NULL, memb_ptr, po) < 0) { ASN__ENCODE_FAILED; } er.encoded = 0; ASN__ENCODED_OK(er); } #endif /* ASN_DISABLE_PER_SUPPORT */ nextepc-0.3.10/lib/s1ap/asn1c/OPEN_TYPE.h000066400000000000000000000057051333553357400174550ustar00rootroot00000000000000/*- * Copyright (c) 2017-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef ASN_OPEN_TYPE_H #define ASN_OPEN_TYPE_H #include #ifdef __cplusplus extern "C" { #endif #define OPEN_TYPE_free CHOICE_free #define OPEN_TYPE_print CHOICE_print #define OPEN_TYPE_compare CHOICE_compare #define OPEN_TYPE_constraint CHOICE_constraint #define OPEN_TYPE_decode_ber NULL #define OPEN_TYPE_encode_der CHOICE_encode_der #define OPEN_TYPE_decode_xer NULL #define OPEN_TYPE_encode_xer CHOICE_encode_xer #define OPEN_TYPE_decode_oer NULL #define OPEN_TYPE_encode_oer CHOICE_encode_oer #define OPEN_TYPE_decode_uper NULL #define OPEN_TYPE_decode_aper NULL extern asn_TYPE_operation_t asn_OP_OPEN_TYPE; /* * Decode an Open Type which is potentially constraiend * by the other members of the parent structure. */ asn_dec_rval_t OPEN_TYPE_ber_get(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *parent_type, void *parent_structure, const asn_TYPE_member_t *element, const void *ptr, size_t size); asn_dec_rval_t OPEN_TYPE_xer_get(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *parent_type, void *parent_structure, const asn_TYPE_member_t *element, const void *ptr, size_t size); asn_dec_rval_t OPEN_TYPE_oer_get(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *parent_type, void *parent_structure, asn_TYPE_member_t *element, const void *ptr, size_t size); asn_dec_rval_t OPEN_TYPE_uper_get(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *parent_type, void *parent_structure, const asn_TYPE_member_t *element, asn_per_data_t *pd); asn_dec_rval_t OPEN_TYPE_aper_get(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *parent_type, void *parent_structure, const asn_TYPE_member_t *element, asn_per_data_t *pd); asn_enc_rval_t OPEN_TYPE_encode_uper( const asn_TYPE_descriptor_t *type_descriptor, const asn_per_constraints_t *constraints, const void *struct_ptr, asn_per_outp_t *per_output); asn_enc_rval_t OPEN_TYPE_encode_aper( const asn_TYPE_descriptor_t *type_descriptor, const asn_per_constraints_t *constraints, const void *struct_ptr, asn_per_outp_t *per_output); #ifdef __cplusplus } #endif #endif /* ASN_OPEN_TYPE_H */ nextepc-0.3.10/lib/s1ap/asn1c/OPEN_TYPE_oer.c000066400000000000000000000053631333553357400203150ustar00rootroot00000000000000/* * Copyright (c) 2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include #include asn_dec_rval_t OPEN_TYPE_oer_get(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void *sptr, asn_TYPE_member_t *elm, const void *ptr, size_t size) { asn_type_selector_result_t selected; void *memb_ptr; /* Pointer to the member */ void **memb_ptr2; /* Pointer to that pointer */ void *inner_value; asn_dec_rval_t rv; size_t ot_ret; if(!(elm->flags & ATF_OPEN_TYPE)) { ASN__DECODE_FAILED; } if(!elm->type_selector) { ASN_DEBUG("Type selector is not defined for Open Type %s->%s->%s", td->name, elm->name, elm->type->name); ASN__DECODE_FAILED; } selected = elm->type_selector(td, sptr); if(!selected.presence_index) { ASN__DECODE_FAILED; } /* Fetch the pointer to this member */ if(elm->flags & ATF_POINTER) { memb_ptr2 = (void **)((char *)sptr + elm->memb_offset); } else { memb_ptr = (char *)sptr + elm->memb_offset; memb_ptr2 = &memb_ptr; } if(*memb_ptr2 != NULL) { /* Make sure we reset the structure first before encoding */ if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, 0) != 0) { ASN__DECODE_FAILED; } } inner_value = (char *)*memb_ptr2 + elm->type->elements[selected.presence_index - 1].memb_offset; ot_ret = oer_open_type_get(opt_codec_ctx, selected.type_descriptor, NULL, &inner_value, ptr, size); switch(ot_ret) { default: if(CHOICE_variant_set_presence(elm->type, *memb_ptr2, selected.presence_index) == 0) { rv.code = RC_OK; rv.consumed = ot_ret; return rv; } else { /* Oh, now a full-blown failure failure */ } /* Fall through */ case -1: rv.code = RC_FAIL; rv.consumed = ot_ret; break; case 0: rv.code = RC_WMORE; rv.consumed = 0; break; } if(*memb_ptr2) { const asn_CHOICE_specifics_t *specs = selected.type_descriptor->specifics; if(elm->flags & ATF_POINTER) { ASN_STRUCT_FREE(*selected.type_descriptor, inner_value); *memb_ptr2 = NULL; } else { ASN_STRUCT_FREE_CONTENTS_ONLY(*selected.type_descriptor, inner_value); memset(*memb_ptr2, 0, specs->struct_size); } } return rv; } nextepc-0.3.10/lib/s1ap/asn1c/PrintableString.c000066400000000000000000000076231333553357400211560ustar00rootroot00000000000000/*- * Copyright (c) 2003, 2004, 2006 Lev Walkin . * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include /* * ASN.1:1984 (X.409) */ static const int _PrintableString_alphabet[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ 10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ 38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ 64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ }; static const int _PrintableString_code2value[74] = { 32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, 55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, 75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, 97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, 113,114,115,116,117,118,119,120,121,122}; /* * PrintableString basic type description. */ static const ber_tlv_tag_t asn_DEF_PrintableString_tags[] = { (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)), /* [UNIVERSAL 19] IMPLICIT ...*/ (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) /* ... OCTET STRING */ }; static int asn_DEF_PrintableString_v2c(unsigned int value) { return _PrintableString_alphabet[value > 255 ? 0 : value] - 1; } static int asn_DEF_PrintableString_c2v(unsigned int code) { if(code < 74) return _PrintableString_code2value[code]; return -1; } static asn_per_constraints_t asn_DEF_PrintableString_per_constraints = { { APC_CONSTRAINED, 4, 4, 0x20, 0x39 }, /* Value */ { APC_SEMI_CONSTRAINED, -1, -1, 0, 0 }, /* Size */ asn_DEF_PrintableString_v2c, asn_DEF_PrintableString_c2v }; asn_TYPE_operation_t asn_OP_PrintableString = { OCTET_STRING_free, OCTET_STRING_print_utf8, /* ASCII subset */ OCTET_STRING_compare, OCTET_STRING_decode_ber, /* Implemented in terms of OCTET STRING */ OCTET_STRING_encode_der, OCTET_STRING_decode_xer_utf8, OCTET_STRING_encode_xer_utf8, #ifdef ASN_DISABLE_OER_SUPPORT 0, 0, #else OCTET_STRING_decode_oer, OCTET_STRING_encode_oer, #endif /* ASN_DISABLE_OER_SUPPORT */ #ifdef ASN_DISABLE_PER_SUPPORT 0, 0, 0, 0, #else OCTET_STRING_decode_uper, OCTET_STRING_encode_uper, OCTET_STRING_decode_aper, OCTET_STRING_encode_aper, #endif /* ASN_DISABLE_PER_SUPPORT */ OCTET_STRING_random_fill, 0 /* Use generic outmost tag fetcher */ }; asn_TYPE_descriptor_t asn_DEF_PrintableString = { "PrintableString", "PrintableString", &asn_OP_PrintableString, asn_DEF_PrintableString_tags, sizeof(asn_DEF_PrintableString_tags) / sizeof(asn_DEF_PrintableString_tags[0]) - 1, asn_DEF_PrintableString_tags, sizeof(asn_DEF_PrintableString_tags) / sizeof(asn_DEF_PrintableString_tags[0]), { 0, &asn_DEF_PrintableString_per_constraints, PrintableString_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; int PrintableString_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const PrintableString_t *st = (const PrintableString_t *)sptr; if(st && st->buf) { uint8_t *buf = st->buf; uint8_t *end = buf + st->size; /* * Check the alphabet of the PrintableString. * ASN.1:1984 (X.409) */ for(; buf < end; buf++) { if(!_PrintableString_alphabet[*buf]) { ASN__CTFAIL(app_key, td, sptr, "%s: value byte %ld (%d) " "not in PrintableString alphabet " "(%s:%d)", td->name, (long)((buf - st->buf) + 1), *buf, __FILE__, __LINE__); return -1; } } } else { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } return 0; } nextepc-0.3.10/lib/s1ap/asn1c/PrintableString.h000066400000000000000000000024121333553357400211520ustar00rootroot00000000000000/*- * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _PrintableString_H_ #define _PrintableString_H_ #include #ifdef __cplusplus extern "C" { #endif typedef OCTET_STRING_t PrintableString_t; /* Implemented via OCTET STRING */ extern asn_TYPE_descriptor_t asn_DEF_PrintableString; extern asn_TYPE_operation_t asn_OP_PrintableString; asn_constr_check_f PrintableString_constraint; #define PrintableString_free OCTET_STRING_free #define PrintableString_print OCTET_STRING_print_utf8 #define PrintableString_compare OCTET_STRING_compare #define PrintableString_decode_ber OCTET_STRING_decode_ber #define PrintableString_encode_der OCTET_STRING_encode_der #define PrintableString_decode_xer OCTET_STRING_decode_xer_utf8 #define PrintableString_encode_xer OCTET_STRING_encode_xer_utf8 #define PrintableString_decode_uper OCTET_STRING_decode_uper #define PrintableString_encode_uper OCTET_STRING_encode_uper #define PrintableString_decode_aper OCTET_STRING_decode_aper #define PrintableString_encode_aper OCTET_STRING_encode_aper #ifdef __cplusplus } #endif #endif /* _PrintableString_H_ */ nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Additional-GUTI.c000066400000000000000000000047201333553357400214440ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Additional-GUTI.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_Additional_GUTI_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_Additional_GUTI, gUMMEI), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_GUMMEI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "gUMMEI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_Additional_GUTI, m_TMSI), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_M_TMSI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "m-TMSI" }, { ATF_POINTER, 1, offsetof(struct S1AP_Additional_GUTI, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P20, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_Additional_GUTI_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_Additional_GUTI_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_Additional_GUTI_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gUMMEI */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* m-TMSI */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_Additional_GUTI_specs_1 = { sizeof(struct S1AP_Additional_GUTI), offsetof(struct S1AP_Additional_GUTI, _asn_ctx), asn_MAP_S1AP_Additional_GUTI_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_Additional_GUTI_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_Additional_GUTI = { "Additional-GUTI", "Additional-GUTI", &asn_OP_SEQUENCE, asn_DEF_S1AP_Additional_GUTI_tags_1, sizeof(asn_DEF_S1AP_Additional_GUTI_tags_1) /sizeof(asn_DEF_S1AP_Additional_GUTI_tags_1[0]), /* 1 */ asn_DEF_S1AP_Additional_GUTI_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Additional_GUTI_tags_1) /sizeof(asn_DEF_S1AP_Additional_GUTI_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_Additional_GUTI_1, 3, /* Elements count */ &asn_SPC_S1AP_Additional_GUTI_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Additional-GUTI.h000066400000000000000000000020721333553357400214470ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Additional_GUTI_H_ #define _S1AP_Additional_GUTI_H_ #include /* Including external dependencies */ #include "S1AP_GUMMEI.h" #include "S1AP_M-TMSI.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_Additional-GUTI */ typedef struct S1AP_Additional_GUTI { S1AP_GUMMEI_t gUMMEI; S1AP_M_TMSI_t m_TMSI; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_Additional_GUTI_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Additional_GUTI; #ifdef __cplusplus } #endif #endif /* _S1AP_Additional_GUTI_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_AdditionalCSFallbackIndicator.c000066400000000000000000000046161333553357400244050ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_AdditionalCSFallbackIndicator.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_AdditionalCSFallbackIndicator_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_AdditionalCSFallbackIndicator_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_AdditionalCSFallbackIndicator_value2enum_1[] = { { 0, 14, "no-restriction" }, { 1, 11, "restriction" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_AdditionalCSFallbackIndicator_enum2value_1[] = { 0, /* no-restriction(0) */ 1 /* restriction(1) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_AdditionalCSFallbackIndicator_specs_1 = { asn_MAP_S1AP_AdditionalCSFallbackIndicator_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_AdditionalCSFallbackIndicator_enum2value_1, /* N => "tag"; sorted by N */ 2, /* Number of elements in the maps */ 3, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_AdditionalCSFallbackIndicator_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_AdditionalCSFallbackIndicator = { "AdditionalCSFallbackIndicator", "AdditionalCSFallbackIndicator", &asn_OP_NativeEnumerated, asn_DEF_S1AP_AdditionalCSFallbackIndicator_tags_1, sizeof(asn_DEF_S1AP_AdditionalCSFallbackIndicator_tags_1) /sizeof(asn_DEF_S1AP_AdditionalCSFallbackIndicator_tags_1[0]), /* 1 */ asn_DEF_S1AP_AdditionalCSFallbackIndicator_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_AdditionalCSFallbackIndicator_tags_1) /sizeof(asn_DEF_S1AP_AdditionalCSFallbackIndicator_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_AdditionalCSFallbackIndicator_constr_1, &asn_PER_type_S1AP_AdditionalCSFallbackIndicator_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_AdditionalCSFallbackIndicator_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_AdditionalCSFallbackIndicator.h000066400000000000000000000035001333553357400244010ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_AdditionalCSFallbackIndicator_H_ #define _S1AP_AdditionalCSFallbackIndicator_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_AdditionalCSFallbackIndicator { S1AP_AdditionalCSFallbackIndicator_no_restriction = 0, S1AP_AdditionalCSFallbackIndicator_restriction = 1 /* * Enumeration is extensible */ } e_S1AP_AdditionalCSFallbackIndicator; /* S1AP_AdditionalCSFallbackIndicator */ typedef long S1AP_AdditionalCSFallbackIndicator_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_AdditionalCSFallbackIndicator; asn_struct_free_f S1AP_AdditionalCSFallbackIndicator_free; asn_struct_print_f S1AP_AdditionalCSFallbackIndicator_print; asn_constr_check_f S1AP_AdditionalCSFallbackIndicator_constraint; ber_type_decoder_f S1AP_AdditionalCSFallbackIndicator_decode_ber; der_type_encoder_f S1AP_AdditionalCSFallbackIndicator_encode_der; xer_type_decoder_f S1AP_AdditionalCSFallbackIndicator_decode_xer; xer_type_encoder_f S1AP_AdditionalCSFallbackIndicator_encode_xer; oer_type_decoder_f S1AP_AdditionalCSFallbackIndicator_decode_oer; oer_type_encoder_f S1AP_AdditionalCSFallbackIndicator_encode_oer; per_type_decoder_f S1AP_AdditionalCSFallbackIndicator_decode_uper; per_type_encoder_f S1AP_AdditionalCSFallbackIndicator_encode_uper; per_type_decoder_f S1AP_AdditionalCSFallbackIndicator_decode_aper; per_type_encoder_f S1AP_AdditionalCSFallbackIndicator_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_AdditionalCSFallbackIndicator_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_AllocationAndRetentionPriority.c000066400000000000000000000064101333553357400247660ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_AllocationAndRetentionPriority.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_AllocationAndRetentionPriority_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_AllocationAndRetentionPriority, priorityLevel), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_PriorityLevel, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "priorityLevel" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_AllocationAndRetentionPriority, pre_emptionCapability), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Pre_emptionCapability, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "pre-emptionCapability" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_AllocationAndRetentionPriority, pre_emptionVulnerability), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Pre_emptionVulnerability, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "pre-emptionVulnerability" }, { ATF_POINTER, 1, offsetof(struct S1AP_AllocationAndRetentionPriority, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P21, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_AllocationAndRetentionPriority_oms_1[] = { 3 }; static const ber_tlv_tag_t asn_DEF_S1AP_AllocationAndRetentionPriority_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_AllocationAndRetentionPriority_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* priorityLevel */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* pre-emptionCapability */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* pre-emptionVulnerability */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_AllocationAndRetentionPriority_specs_1 = { sizeof(struct S1AP_AllocationAndRetentionPriority), offsetof(struct S1AP_AllocationAndRetentionPriority, _asn_ctx), asn_MAP_S1AP_AllocationAndRetentionPriority_tag2el_1, 4, /* Count of tags in the map */ asn_MAP_S1AP_AllocationAndRetentionPriority_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_AllocationAndRetentionPriority = { "AllocationAndRetentionPriority", "AllocationAndRetentionPriority", &asn_OP_SEQUENCE, asn_DEF_S1AP_AllocationAndRetentionPriority_tags_1, sizeof(asn_DEF_S1AP_AllocationAndRetentionPriority_tags_1) /sizeof(asn_DEF_S1AP_AllocationAndRetentionPriority_tags_1[0]), /* 1 */ asn_DEF_S1AP_AllocationAndRetentionPriority_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_AllocationAndRetentionPriority_tags_1) /sizeof(asn_DEF_S1AP_AllocationAndRetentionPriority_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_AllocationAndRetentionPriority_1, 4, /* Elements count */ &asn_SPC_S1AP_AllocationAndRetentionPriority_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_AllocationAndRetentionPriority.h000066400000000000000000000027541333553357400250020ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_AllocationAndRetentionPriority_H_ #define _S1AP_AllocationAndRetentionPriority_H_ #include /* Including external dependencies */ #include "S1AP_PriorityLevel.h" #include "S1AP_Pre-emptionCapability.h" #include "S1AP_Pre-emptionVulnerability.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_AllocationAndRetentionPriority */ typedef struct S1AP_AllocationAndRetentionPriority { S1AP_PriorityLevel_t priorityLevel; S1AP_Pre_emptionCapability_t pre_emptionCapability; S1AP_Pre_emptionVulnerability_t pre_emptionVulnerability; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_AllocationAndRetentionPriority_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_AllocationAndRetentionPriority; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_AllocationAndRetentionPriority_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_AllocationAndRetentionPriority_1[4]; #ifdef __cplusplus } #endif #endif /* _S1AP_AllocationAndRetentionPriority_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_AreaScopeOfMDT.c000066400000000000000000000055301333553357400213220ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_AreaScopeOfMDT.h" #include "S1AP_CellBasedMDT.h" #include "S1AP_TABasedMDT.h" #include "S1AP_TAIBasedMDT.h" static asn_oer_constraints_t asn_OER_type_S1AP_AreaScopeOfMDT_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_AreaScopeOfMDT_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_AreaScopeOfMDT_1[] = { { ATF_POINTER, 0, offsetof(struct S1AP_AreaScopeOfMDT, choice.cellBased), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CellBasedMDT, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cellBased" }, { ATF_POINTER, 0, offsetof(struct S1AP_AreaScopeOfMDT, choice.tABased), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TABasedMDT, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "tABased" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_AreaScopeOfMDT, choice.pLMNWide), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_NULL, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "pLMNWide" }, { ATF_POINTER, 0, offsetof(struct S1AP_AreaScopeOfMDT, choice.tAIBased), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TAIBasedMDT, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "tAIBased" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_AreaScopeOfMDT_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* cellBased */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* tABased */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* pLMNWide */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* tAIBased */ }; asn_CHOICE_specifics_t asn_SPC_S1AP_AreaScopeOfMDT_specs_1 = { sizeof(struct S1AP_AreaScopeOfMDT), offsetof(struct S1AP_AreaScopeOfMDT, _asn_ctx), offsetof(struct S1AP_AreaScopeOfMDT, present), sizeof(((struct S1AP_AreaScopeOfMDT *)0)->present), asn_MAP_S1AP_AreaScopeOfMDT_tag2el_1, 4, /* Count of tags in the map */ 0, 0, 3 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_AreaScopeOfMDT = { "AreaScopeOfMDT", "AreaScopeOfMDT", &asn_OP_CHOICE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { &asn_OER_type_S1AP_AreaScopeOfMDT_constr_1, &asn_PER_type_S1AP_AreaScopeOfMDT_constr_1, CHOICE_constraint }, asn_MBR_S1AP_AreaScopeOfMDT_1, 4, /* Elements count */ &asn_SPC_S1AP_AreaScopeOfMDT_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_AreaScopeOfMDT.h000066400000000000000000000032201333553357400213210ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_AreaScopeOfMDT_H_ #define _S1AP_AreaScopeOfMDT_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_AreaScopeOfMDT_PR { S1AP_AreaScopeOfMDT_PR_NOTHING, /* No components present */ S1AP_AreaScopeOfMDT_PR_cellBased, S1AP_AreaScopeOfMDT_PR_tABased, S1AP_AreaScopeOfMDT_PR_pLMNWide, /* Extensions may appear below */ S1AP_AreaScopeOfMDT_PR_tAIBased } S1AP_AreaScopeOfMDT_PR; /* Forward declarations */ struct S1AP_CellBasedMDT; struct S1AP_TABasedMDT; struct S1AP_TAIBasedMDT; /* S1AP_AreaScopeOfMDT */ typedef struct S1AP_AreaScopeOfMDT { S1AP_AreaScopeOfMDT_PR present; union S1AP_AreaScopeOfMDT_u { struct S1AP_CellBasedMDT *cellBased; struct S1AP_TABasedMDT *tABased; NULL_t pLMNWide; /* * This type is extensible, * possible extensions are below. */ struct S1AP_TAIBasedMDT *tAIBased; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_AreaScopeOfMDT_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_AreaScopeOfMDT; extern asn_CHOICE_specifics_t asn_SPC_S1AP_AreaScopeOfMDT_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_AreaScopeOfMDT_1[4]; extern asn_per_constraints_t asn_PER_type_S1AP_AreaScopeOfMDT_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_AreaScopeOfMDT_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_AssistanceDataForCECapableUEs.c000066400000000000000000000051311333553357400242560ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_AssistanceDataForCECapableUEs.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_AssistanceDataForCECapableUEs_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_AssistanceDataForCECapableUEs, cellIdentifierAndCELevelForCECapableUEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cellIdentifierAndCELevelForCECapableUEs" }, { ATF_POINTER, 1, offsetof(struct S1AP_AssistanceDataForCECapableUEs, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P22, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_AssistanceDataForCECapableUEs_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_AssistanceDataForCECapableUEs_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_AssistanceDataForCECapableUEs_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* cellIdentifierAndCELevelForCECapableUEs */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_AssistanceDataForCECapableUEs_specs_1 = { sizeof(struct S1AP_AssistanceDataForCECapableUEs), offsetof(struct S1AP_AssistanceDataForCECapableUEs, _asn_ctx), asn_MAP_S1AP_AssistanceDataForCECapableUEs_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_AssistanceDataForCECapableUEs_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_AssistanceDataForCECapableUEs = { "AssistanceDataForCECapableUEs", "AssistanceDataForCECapableUEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_AssistanceDataForCECapableUEs_tags_1, sizeof(asn_DEF_S1AP_AssistanceDataForCECapableUEs_tags_1) /sizeof(asn_DEF_S1AP_AssistanceDataForCECapableUEs_tags_1[0]), /* 1 */ asn_DEF_S1AP_AssistanceDataForCECapableUEs_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_AssistanceDataForCECapableUEs_tags_1) /sizeof(asn_DEF_S1AP_AssistanceDataForCECapableUEs_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_AssistanceDataForCECapableUEs_1, 2, /* Elements count */ &asn_SPC_S1AP_AssistanceDataForCECapableUEs_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_AssistanceDataForCECapableUEs.h000066400000000000000000000025541333553357400242710ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_AssistanceDataForCECapableUEs_H_ #define _S1AP_AssistanceDataForCECapableUEs_H_ #include /* Including external dependencies */ #include "S1AP_CellIdentifierAndCELevelForCECapableUEs.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_AssistanceDataForCECapableUEs */ typedef struct S1AP_AssistanceDataForCECapableUEs { S1AP_CellIdentifierAndCELevelForCECapableUEs_t cellIdentifierAndCELevelForCECapableUEs; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_AssistanceDataForCECapableUEs_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_AssistanceDataForCECapableUEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_AssistanceDataForCECapableUEs_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_AssistanceDataForCECapableUEs_1[2]; #ifdef __cplusplus } #endif #endif /* _S1AP_AssistanceDataForCECapableUEs_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_AssistanceDataForPaging.c000066400000000000000000000065571333553357400233240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_AssistanceDataForPaging.h" #include "S1AP_AssistanceDataForRecommendedCells.h" #include "S1AP_AssistanceDataForCECapableUEs.h" #include "S1AP_PagingAttemptInformation.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_AssistanceDataForPaging_1[] = { { ATF_POINTER, 4, offsetof(struct S1AP_AssistanceDataForPaging, assistanceDataForRecommendedCells), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_AssistanceDataForRecommendedCells, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "assistanceDataForRecommendedCells" }, { ATF_POINTER, 3, offsetof(struct S1AP_AssistanceDataForPaging, assistanceDataForCECapableUEs), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_AssistanceDataForCECapableUEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "assistanceDataForCECapableUEs" }, { ATF_POINTER, 2, offsetof(struct S1AP_AssistanceDataForPaging, pagingAttemptInformation), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_PagingAttemptInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "pagingAttemptInformation" }, { ATF_POINTER, 1, offsetof(struct S1AP_AssistanceDataForPaging, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P23, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_AssistanceDataForPaging_oms_1[] = { 0, 1, 2, 3 }; static const ber_tlv_tag_t asn_DEF_S1AP_AssistanceDataForPaging_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_AssistanceDataForPaging_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* assistanceDataForRecommendedCells */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* assistanceDataForCECapableUEs */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* pagingAttemptInformation */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_AssistanceDataForPaging_specs_1 = { sizeof(struct S1AP_AssistanceDataForPaging), offsetof(struct S1AP_AssistanceDataForPaging, _asn_ctx), asn_MAP_S1AP_AssistanceDataForPaging_tag2el_1, 4, /* Count of tags in the map */ asn_MAP_S1AP_AssistanceDataForPaging_oms_1, /* Optional members */ 4, 0, /* Root/Additions */ 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_AssistanceDataForPaging = { "AssistanceDataForPaging", "AssistanceDataForPaging", &asn_OP_SEQUENCE, asn_DEF_S1AP_AssistanceDataForPaging_tags_1, sizeof(asn_DEF_S1AP_AssistanceDataForPaging_tags_1) /sizeof(asn_DEF_S1AP_AssistanceDataForPaging_tags_1[0]), /* 1 */ asn_DEF_S1AP_AssistanceDataForPaging_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_AssistanceDataForPaging_tags_1) /sizeof(asn_DEF_S1AP_AssistanceDataForPaging_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_AssistanceDataForPaging_1, 4, /* Elements count */ &asn_SPC_S1AP_AssistanceDataForPaging_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_AssistanceDataForPaging.h000066400000000000000000000026341333553357400233210ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_AssistanceDataForPaging_H_ #define _S1AP_AssistanceDataForPaging_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_AssistanceDataForRecommendedCells; struct S1AP_AssistanceDataForCECapableUEs; struct S1AP_PagingAttemptInformation; struct S1AP_ProtocolExtensionContainer; /* S1AP_AssistanceDataForPaging */ typedef struct S1AP_AssistanceDataForPaging { struct S1AP_AssistanceDataForRecommendedCells *assistanceDataForRecommendedCells; /* OPTIONAL */ struct S1AP_AssistanceDataForCECapableUEs *assistanceDataForCECapableUEs; /* OPTIONAL */ struct S1AP_PagingAttemptInformation *pagingAttemptInformation; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_AssistanceDataForPaging_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_AssistanceDataForPaging; #ifdef __cplusplus } #endif #endif /* _S1AP_AssistanceDataForPaging_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_AssistanceDataForRecommendedCells.c000066400000000000000000000051751333553357400253170ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_AssistanceDataForRecommendedCells.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_AssistanceDataForRecommendedCells_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_AssistanceDataForRecommendedCells, recommendedCellsForPaging), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_RecommendedCellsForPaging, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "recommendedCellsForPaging" }, { ATF_POINTER, 1, offsetof(struct S1AP_AssistanceDataForRecommendedCells, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P24, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_AssistanceDataForRecommendedCells_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_AssistanceDataForRecommendedCells_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_AssistanceDataForRecommendedCells_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* recommendedCellsForPaging */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_AssistanceDataForRecommendedCells_specs_1 = { sizeof(struct S1AP_AssistanceDataForRecommendedCells), offsetof(struct S1AP_AssistanceDataForRecommendedCells, _asn_ctx), asn_MAP_S1AP_AssistanceDataForRecommendedCells_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_AssistanceDataForRecommendedCells_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_AssistanceDataForRecommendedCells = { "AssistanceDataForRecommendedCells", "AssistanceDataForRecommendedCells", &asn_OP_SEQUENCE, asn_DEF_S1AP_AssistanceDataForRecommendedCells_tags_1, sizeof(asn_DEF_S1AP_AssistanceDataForRecommendedCells_tags_1) /sizeof(asn_DEF_S1AP_AssistanceDataForRecommendedCells_tags_1[0]), /* 1 */ asn_DEF_S1AP_AssistanceDataForRecommendedCells_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_AssistanceDataForRecommendedCells_tags_1) /sizeof(asn_DEF_S1AP_AssistanceDataForRecommendedCells_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_AssistanceDataForRecommendedCells_1, 2, /* Elements count */ &asn_SPC_S1AP_AssistanceDataForRecommendedCells_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_AssistanceDataForRecommendedCells.h000066400000000000000000000025461333553357400253230ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_AssistanceDataForRecommendedCells_H_ #define _S1AP_AssistanceDataForRecommendedCells_H_ #include /* Including external dependencies */ #include "S1AP_RecommendedCellsForPaging.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_AssistanceDataForRecommendedCells */ typedef struct S1AP_AssistanceDataForRecommendedCells { S1AP_RecommendedCellsForPaging_t recommendedCellsForPaging; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_AssistanceDataForRecommendedCells_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_AssistanceDataForRecommendedCells; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_AssistanceDataForRecommendedCells_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_AssistanceDataForRecommendedCells_1[2]; #ifdef __cplusplus } #endif #endif /* _S1AP_AssistanceDataForRecommendedCells_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_BPLMNs.c000066400000000000000000000030651333553357400176620ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_BPLMNs.h" static asn_oer_constraints_t asn_OER_type_S1AP_BPLMNs_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..6)) */}; asn_per_constraints_t asn_PER_type_S1AP_BPLMNs_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 3, 3, 1, 6 } /* (SIZE(1..6)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_BPLMNs_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_PLMNidentity, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_BPLMNs_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_BPLMNs_specs_1 = { sizeof(struct S1AP_BPLMNs), offsetof(struct S1AP_BPLMNs, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_BPLMNs = { "BPLMNs", "BPLMNs", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_BPLMNs_tags_1, sizeof(asn_DEF_S1AP_BPLMNs_tags_1) /sizeof(asn_DEF_S1AP_BPLMNs_tags_1[0]), /* 1 */ asn_DEF_S1AP_BPLMNs_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_BPLMNs_tags_1) /sizeof(asn_DEF_S1AP_BPLMNs_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_BPLMNs_constr_1, &asn_PER_type_S1AP_BPLMNs_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_BPLMNs_1, 1, /* Single element */ &asn_SPC_S1AP_BPLMNs_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_BPLMNs.h000066400000000000000000000017341333553357400176700ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_BPLMNs_H_ #define _S1AP_BPLMNs_H_ #include /* Including external dependencies */ #include "S1AP_PLMNidentity.h" #include #include #ifdef __cplusplus extern "C" { #endif /* S1AP_BPLMNs */ typedef struct S1AP_BPLMNs { A_SEQUENCE_OF(S1AP_PLMNidentity_t) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_BPLMNs_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_BPLMNs; extern asn_SET_OF_specifics_t asn_SPC_S1AP_BPLMNs_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_BPLMNs_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_BPLMNs_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_BPLMNs_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_BearerType.c000066400000000000000000000036721333553357400206750ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_BearerType.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_BearerType_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_BearerType_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_BearerType_value2enum_1[] = { { 0, 6, "non-IP" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_BearerType_enum2value_1[] = { 0 /* non-IP(0) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_BearerType_specs_1 = { asn_MAP_S1AP_BearerType_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_BearerType_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_BearerType_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_BearerType = { "BearerType", "BearerType", &asn_OP_NativeEnumerated, asn_DEF_S1AP_BearerType_tags_1, sizeof(asn_DEF_S1AP_BearerType_tags_1) /sizeof(asn_DEF_S1AP_BearerType_tags_1[0]), /* 1 */ asn_DEF_S1AP_BearerType_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_BearerType_tags_1) /sizeof(asn_DEF_S1AP_BearerType_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_BearerType_constr_1, &asn_PER_type_S1AP_BearerType_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_BearerType_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_BearerType.h000066400000000000000000000025411333553357400206740ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_BearerType_H_ #define _S1AP_BearerType_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_BearerType { S1AP_BearerType_non_IP = 0 /* * Enumeration is extensible */ } e_S1AP_BearerType; /* S1AP_BearerType */ typedef long S1AP_BearerType_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_BearerType; asn_struct_free_f S1AP_BearerType_free; asn_struct_print_f S1AP_BearerType_print; asn_constr_check_f S1AP_BearerType_constraint; ber_type_decoder_f S1AP_BearerType_decode_ber; der_type_encoder_f S1AP_BearerType_encode_der; xer_type_decoder_f S1AP_BearerType_decode_xer; xer_type_encoder_f S1AP_BearerType_encode_xer; oer_type_decoder_f S1AP_BearerType_decode_oer; oer_type_encoder_f S1AP_BearerType_encode_oer; per_type_decoder_f S1AP_BearerType_decode_uper; per_type_encoder_f S1AP_BearerType_encode_uper; per_type_decoder_f S1AP_BearerType_decode_aper; per_type_encoder_f S1AP_BearerType_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_BearerType_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Bearers-SubjectToStatusTransfer-Item.c000066400000000000000000000073311333553357400257170ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Bearers-SubjectToStatusTransfer-Item.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_Bearers_SubjectToStatusTransfer_Item_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_Item, e_RAB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RAB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_Item, uL_COUNTvalue), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_COUNTvalue, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "uL-COUNTvalue" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_Item, dL_COUNTvalue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_COUNTvalue, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "dL-COUNTvalue" }, { ATF_POINTER, 2, offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_Item, receiveStatusofULPDCPSDUs), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ReceiveStatusofULPDCPSDUs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "receiveStatusofULPDCPSDUs" }, { ATF_POINTER, 1, offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_Item, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P25, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_Bearers_SubjectToStatusTransfer_Item_oms_1[] = { 3, 4 }; static const ber_tlv_tag_t asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_Item_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_Bearers_SubjectToStatusTransfer_Item_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-RAB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* uL-COUNTvalue */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* dL-COUNTvalue */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* receiveStatusofULPDCPSDUs */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_Bearers_SubjectToStatusTransfer_Item_specs_1 = { sizeof(struct S1AP_Bearers_SubjectToStatusTransfer_Item), offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_Item, _asn_ctx), asn_MAP_S1AP_Bearers_SubjectToStatusTransfer_Item_tag2el_1, 5, /* Count of tags in the map */ asn_MAP_S1AP_Bearers_SubjectToStatusTransfer_Item_oms_1, /* Optional members */ 2, 0, /* Root/Additions */ 5, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_Item = { "Bearers-SubjectToStatusTransfer-Item", "Bearers-SubjectToStatusTransfer-Item", &asn_OP_SEQUENCE, asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_Item_tags_1, sizeof(asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_Item_tags_1) /sizeof(asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_Item_tags_1[0]), /* 1 */ asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_Item_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_Item_tags_1) /sizeof(asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_Item_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_Bearers_SubjectToStatusTransfer_Item_1, 5, /* Elements count */ &asn_SPC_S1AP_Bearers_SubjectToStatusTransfer_Item_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Bearers-SubjectToStatusTransfer-Item.h000066400000000000000000000025761333553357400257320ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Bearers_SubjectToStatusTransfer_Item_H_ #define _S1AP_Bearers_SubjectToStatusTransfer_Item_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-ID.h" #include "S1AP_COUNTvalue.h" #include "S1AP_ReceiveStatusofULPDCPSDUs.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_Bearers-SubjectToStatusTransfer-Item */ typedef struct S1AP_Bearers_SubjectToStatusTransfer_Item { S1AP_E_RAB_ID_t e_RAB_ID; S1AP_COUNTvalue_t uL_COUNTvalue; S1AP_COUNTvalue_t dL_COUNTvalue; S1AP_ReceiveStatusofULPDCPSDUs_t *receiveStatusofULPDCPSDUs; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_Bearers_SubjectToStatusTransfer_Item_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_Item; #ifdef __cplusplus } #endif #endif /* _S1AP_Bearers_SubjectToStatusTransfer_Item_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Bearers-SubjectToStatusTransferList.c000066400000000000000000000043401333553357400256540ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Bearers-SubjectToStatusTransferList.h" #include "S1AP_ProtocolIE-SingleContainer.h" static asn_oer_constraints_t asn_OER_type_S1AP_Bearers_SubjectToStatusTransferList_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_Bearers_SubjectToStatusTransferList_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_Bearers_SubjectToStatusTransferList_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P11, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_Bearers_SubjectToStatusTransferList_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_Bearers_SubjectToStatusTransferList_specs_1 = { sizeof(struct S1AP_Bearers_SubjectToStatusTransferList), offsetof(struct S1AP_Bearers_SubjectToStatusTransferList, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_Bearers_SubjectToStatusTransferList = { "Bearers-SubjectToStatusTransferList", "Bearers-SubjectToStatusTransferList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_Bearers_SubjectToStatusTransferList_tags_1, sizeof(asn_DEF_S1AP_Bearers_SubjectToStatusTransferList_tags_1) /sizeof(asn_DEF_S1AP_Bearers_SubjectToStatusTransferList_tags_1[0]), /* 1 */ asn_DEF_S1AP_Bearers_SubjectToStatusTransferList_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Bearers_SubjectToStatusTransferList_tags_1) /sizeof(asn_DEF_S1AP_Bearers_SubjectToStatusTransferList_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_Bearers_SubjectToStatusTransferList_constr_1, &asn_PER_type_S1AP_Bearers_SubjectToStatusTransferList_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_Bearers_SubjectToStatusTransferList_1, 1, /* Single element */ &asn_SPC_S1AP_Bearers_SubjectToStatusTransferList_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Bearers-SubjectToStatusTransferList.h000066400000000000000000000024661333553357400256700ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Bearers_SubjectToStatusTransferList_H_ #define _S1AP_Bearers_SubjectToStatusTransferList_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolIE_SingleContainer; /* S1AP_Bearers-SubjectToStatusTransferList */ typedef struct S1AP_Bearers_SubjectToStatusTransferList { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_Bearers_SubjectToStatusTransferList_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Bearers_SubjectToStatusTransferList; extern asn_SET_OF_specifics_t asn_SPC_S1AP_Bearers_SubjectToStatusTransferList_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_Bearers_SubjectToStatusTransferList_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_Bearers_SubjectToStatusTransferList_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_Bearers_SubjectToStatusTransferList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_BitRate.c000066400000000000000000000037001333553357400201550ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_BitRate.h" int S1AP_BitRate_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const INTEGER_t *st = (const INTEGER_t *)sptr; long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(asn_INTEGER2long(st, &value)) { ASN__CTFAIL(app_key, td, sptr, "%s: value too large (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if((value >= 0 && value <= 10000000000)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using INTEGER, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_BitRate_constr_1 CC_NOTUSED = { { 8, 1 } /* (0..10000000000) */, -1}; asn_per_constraints_t asn_PER_type_S1AP_BitRate_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 34, -1, 0, 10000000000 } /* (0..10000000000) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_BitRate_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_BitRate = { "BitRate", "BitRate", &asn_OP_INTEGER, asn_DEF_S1AP_BitRate_tags_1, sizeof(asn_DEF_S1AP_BitRate_tags_1) /sizeof(asn_DEF_S1AP_BitRate_tags_1[0]), /* 1 */ asn_DEF_S1AP_BitRate_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_BitRate_tags_1) /sizeof(asn_DEF_S1AP_BitRate_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_BitRate_constr_1, &asn_PER_type_S1AP_BitRate_constr_1, S1AP_BitRate_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_BitRate.h000066400000000000000000000023321333553357400201620ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_BitRate_H_ #define _S1AP_BitRate_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_BitRate */ typedef INTEGER_t S1AP_BitRate_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_BitRate_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_BitRate; asn_struct_free_f S1AP_BitRate_free; asn_struct_print_f S1AP_BitRate_print; asn_constr_check_f S1AP_BitRate_constraint; ber_type_decoder_f S1AP_BitRate_decode_ber; der_type_encoder_f S1AP_BitRate_encode_der; xer_type_decoder_f S1AP_BitRate_decode_xer; xer_type_encoder_f S1AP_BitRate_encode_xer; oer_type_decoder_f S1AP_BitRate_decode_oer; oer_type_encoder_f S1AP_BitRate_encode_oer; per_type_decoder_f S1AP_BitRate_decode_uper; per_type_encoder_f S1AP_BitRate_encode_uper; per_type_decoder_f S1AP_BitRate_decode_aper; per_type_encoder_f S1AP_BitRate_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_BitRate_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_BroadcastCancelledAreaList.c000066400000000000000000000056711333553357400237560ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_BroadcastCancelledAreaList.h" #include "S1AP_CellID-Cancelled.h" #include "S1AP_TAI-Cancelled.h" #include "S1AP_EmergencyAreaID-Cancelled.h" static asn_oer_constraints_t asn_OER_type_S1AP_BroadcastCancelledAreaList_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_BroadcastCancelledAreaList_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_BroadcastCancelledAreaList_1[] = { { ATF_POINTER, 0, offsetof(struct S1AP_BroadcastCancelledAreaList, choice.cellID_Cancelled), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CellID_Cancelled, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cellID-Cancelled" }, { ATF_POINTER, 0, offsetof(struct S1AP_BroadcastCancelledAreaList, choice.tAI_Cancelled), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TAI_Cancelled, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "tAI-Cancelled" }, { ATF_POINTER, 0, offsetof(struct S1AP_BroadcastCancelledAreaList, choice.emergencyAreaID_Cancelled), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_EmergencyAreaID_Cancelled, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "emergencyAreaID-Cancelled" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_BroadcastCancelledAreaList_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* cellID-Cancelled */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* tAI-Cancelled */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* emergencyAreaID-Cancelled */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_BroadcastCancelledAreaList_specs_1 = { sizeof(struct S1AP_BroadcastCancelledAreaList), offsetof(struct S1AP_BroadcastCancelledAreaList, _asn_ctx), offsetof(struct S1AP_BroadcastCancelledAreaList, present), sizeof(((struct S1AP_BroadcastCancelledAreaList *)0)->present), asn_MAP_S1AP_BroadcastCancelledAreaList_tag2el_1, 3, /* Count of tags in the map */ 0, 0, 3 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_BroadcastCancelledAreaList = { "BroadcastCancelledAreaList", "BroadcastCancelledAreaList", &asn_OP_CHOICE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { &asn_OER_type_S1AP_BroadcastCancelledAreaList_constr_1, &asn_PER_type_S1AP_BroadcastCancelledAreaList_constr_1, CHOICE_constraint }, asn_MBR_S1AP_BroadcastCancelledAreaList_1, 3, /* Elements count */ &asn_SPC_S1AP_BroadcastCancelledAreaList_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_BroadcastCancelledAreaList.h000066400000000000000000000032361333553357400237560ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_BroadcastCancelledAreaList_H_ #define _S1AP_BroadcastCancelledAreaList_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_BroadcastCancelledAreaList_PR { S1AP_BroadcastCancelledAreaList_PR_NOTHING, /* No components present */ S1AP_BroadcastCancelledAreaList_PR_cellID_Cancelled, S1AP_BroadcastCancelledAreaList_PR_tAI_Cancelled, S1AP_BroadcastCancelledAreaList_PR_emergencyAreaID_Cancelled /* Extensions may appear below */ } S1AP_BroadcastCancelledAreaList_PR; /* Forward declarations */ struct S1AP_CellID_Cancelled; struct S1AP_TAI_Cancelled; struct S1AP_EmergencyAreaID_Cancelled; /* S1AP_BroadcastCancelledAreaList */ typedef struct S1AP_BroadcastCancelledAreaList { S1AP_BroadcastCancelledAreaList_PR present; union S1AP_BroadcastCancelledAreaList_u { struct S1AP_CellID_Cancelled *cellID_Cancelled; struct S1AP_TAI_Cancelled *tAI_Cancelled; struct S1AP_EmergencyAreaID_Cancelled *emergencyAreaID_Cancelled; /* * This type is extensible, * possible extensions are below. */ } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_BroadcastCancelledAreaList_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_BroadcastCancelledAreaList; #ifdef __cplusplus } #endif #endif /* _S1AP_BroadcastCancelledAreaList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_BroadcastCompletedAreaList.c000066400000000000000000000056711333553357400240200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_BroadcastCompletedAreaList.h" #include "S1AP_CellID-Broadcast.h" #include "S1AP_TAI-Broadcast.h" #include "S1AP_EmergencyAreaID-Broadcast.h" static asn_oer_constraints_t asn_OER_type_S1AP_BroadcastCompletedAreaList_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_BroadcastCompletedAreaList_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_BroadcastCompletedAreaList_1[] = { { ATF_POINTER, 0, offsetof(struct S1AP_BroadcastCompletedAreaList, choice.cellID_Broadcast), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CellID_Broadcast, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cellID-Broadcast" }, { ATF_POINTER, 0, offsetof(struct S1AP_BroadcastCompletedAreaList, choice.tAI_Broadcast), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TAI_Broadcast, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "tAI-Broadcast" }, { ATF_POINTER, 0, offsetof(struct S1AP_BroadcastCompletedAreaList, choice.emergencyAreaID_Broadcast), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_EmergencyAreaID_Broadcast, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "emergencyAreaID-Broadcast" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_BroadcastCompletedAreaList_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* cellID-Broadcast */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* tAI-Broadcast */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* emergencyAreaID-Broadcast */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_BroadcastCompletedAreaList_specs_1 = { sizeof(struct S1AP_BroadcastCompletedAreaList), offsetof(struct S1AP_BroadcastCompletedAreaList, _asn_ctx), offsetof(struct S1AP_BroadcastCompletedAreaList, present), sizeof(((struct S1AP_BroadcastCompletedAreaList *)0)->present), asn_MAP_S1AP_BroadcastCompletedAreaList_tag2el_1, 3, /* Count of tags in the map */ 0, 0, 3 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_BroadcastCompletedAreaList = { "BroadcastCompletedAreaList", "BroadcastCompletedAreaList", &asn_OP_CHOICE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { &asn_OER_type_S1AP_BroadcastCompletedAreaList_constr_1, &asn_PER_type_S1AP_BroadcastCompletedAreaList_constr_1, CHOICE_constraint }, asn_MBR_S1AP_BroadcastCompletedAreaList_1, 3, /* Elements count */ &asn_SPC_S1AP_BroadcastCompletedAreaList_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_BroadcastCompletedAreaList.h000066400000000000000000000032361333553357400240200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_BroadcastCompletedAreaList_H_ #define _S1AP_BroadcastCompletedAreaList_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_BroadcastCompletedAreaList_PR { S1AP_BroadcastCompletedAreaList_PR_NOTHING, /* No components present */ S1AP_BroadcastCompletedAreaList_PR_cellID_Broadcast, S1AP_BroadcastCompletedAreaList_PR_tAI_Broadcast, S1AP_BroadcastCompletedAreaList_PR_emergencyAreaID_Broadcast /* Extensions may appear below */ } S1AP_BroadcastCompletedAreaList_PR; /* Forward declarations */ struct S1AP_CellID_Broadcast; struct S1AP_TAI_Broadcast; struct S1AP_EmergencyAreaID_Broadcast; /* S1AP_BroadcastCompletedAreaList */ typedef struct S1AP_BroadcastCompletedAreaList { S1AP_BroadcastCompletedAreaList_PR present; union S1AP_BroadcastCompletedAreaList_u { struct S1AP_CellID_Broadcast *cellID_Broadcast; struct S1AP_TAI_Broadcast *tAI_Broadcast; struct S1AP_EmergencyAreaID_Broadcast *emergencyAreaID_Broadcast; /* * This type is extensible, * possible extensions are below. */ } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_BroadcastCompletedAreaList_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_BroadcastCompletedAreaList; #ifdef __cplusplus } #endif #endif /* _S1AP_BroadcastCompletedAreaList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CE-mode-B-SupportIndicator.c000066400000000000000000000044201333553357400235220ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CE-mode-B-SupportIndicator.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_CE_mode_B_SupportIndicator_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_CE_mode_B_SupportIndicator_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_CE_mode_B_SupportIndicator_value2enum_1[] = { { 0, 9, "supported" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_CE_mode_B_SupportIndicator_enum2value_1[] = { 0 /* supported(0) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_CE_mode_B_SupportIndicator_specs_1 = { asn_MAP_S1AP_CE_mode_B_SupportIndicator_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_CE_mode_B_SupportIndicator_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_CE_mode_B_SupportIndicator_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_CE_mode_B_SupportIndicator = { "CE-mode-B-SupportIndicator", "CE-mode-B-SupportIndicator", &asn_OP_NativeEnumerated, asn_DEF_S1AP_CE_mode_B_SupportIndicator_tags_1, sizeof(asn_DEF_S1AP_CE_mode_B_SupportIndicator_tags_1) /sizeof(asn_DEF_S1AP_CE_mode_B_SupportIndicator_tags_1[0]), /* 1 */ asn_DEF_S1AP_CE_mode_B_SupportIndicator_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CE_mode_B_SupportIndicator_tags_1) /sizeof(asn_DEF_S1AP_CE_mode_B_SupportIndicator_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_CE_mode_B_SupportIndicator_constr_1, &asn_PER_type_S1AP_CE_mode_B_SupportIndicator_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_CE_mode_B_SupportIndicator_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CE-mode-B-SupportIndicator.h000066400000000000000000000033041333553357400235270ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CE_mode_B_SupportIndicator_H_ #define _S1AP_CE_mode_B_SupportIndicator_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_CE_mode_B_SupportIndicator { S1AP_CE_mode_B_SupportIndicator_supported = 0 /* * Enumeration is extensible */ } e_S1AP_CE_mode_B_SupportIndicator; /* S1AP_CE-mode-B-SupportIndicator */ typedef long S1AP_CE_mode_B_SupportIndicator_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CE_mode_B_SupportIndicator; asn_struct_free_f S1AP_CE_mode_B_SupportIndicator_free; asn_struct_print_f S1AP_CE_mode_B_SupportIndicator_print; asn_constr_check_f S1AP_CE_mode_B_SupportIndicator_constraint; ber_type_decoder_f S1AP_CE_mode_B_SupportIndicator_decode_ber; der_type_encoder_f S1AP_CE_mode_B_SupportIndicator_encode_der; xer_type_decoder_f S1AP_CE_mode_B_SupportIndicator_decode_xer; xer_type_encoder_f S1AP_CE_mode_B_SupportIndicator_encode_xer; oer_type_decoder_f S1AP_CE_mode_B_SupportIndicator_decode_oer; oer_type_encoder_f S1AP_CE_mode_B_SupportIndicator_encode_oer; per_type_decoder_f S1AP_CE_mode_B_SupportIndicator_decode_uper; per_type_encoder_f S1AP_CE_mode_B_SupportIndicator_encode_uper; per_type_decoder_f S1AP_CE_mode_B_SupportIndicator_decode_aper; per_type_encoder_f S1AP_CE_mode_B_SupportIndicator_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_CE_mode_B_SupportIndicator_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CELevel.c000066400000000000000000000016161333553357400201060ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CELevel.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_CELevel_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_CELevel = { "CELevel", "CELevel", &asn_OP_OCTET_STRING, asn_DEF_S1AP_CELevel_tags_1, sizeof(asn_DEF_S1AP_CELevel_tags_1) /sizeof(asn_DEF_S1AP_CELevel_tags_1[0]), /* 1 */ asn_DEF_S1AP_CELevel_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CELevel_tags_1) /sizeof(asn_DEF_S1AP_CELevel_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CELevel.h000066400000000000000000000022431333553357400201100ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CELevel_H_ #define _S1AP_CELevel_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_CELevel */ typedef OCTET_STRING_t S1AP_CELevel_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CELevel; asn_struct_free_f S1AP_CELevel_free; asn_struct_print_f S1AP_CELevel_print; asn_constr_check_f S1AP_CELevel_constraint; ber_type_decoder_f S1AP_CELevel_decode_ber; der_type_encoder_f S1AP_CELevel_encode_der; xer_type_decoder_f S1AP_CELevel_decode_xer; xer_type_encoder_f S1AP_CELevel_encode_xer; oer_type_decoder_f S1AP_CELevel_decode_oer; oer_type_encoder_f S1AP_CELevel_encode_oer; per_type_decoder_f S1AP_CELevel_decode_uper; per_type_encoder_f S1AP_CELevel_encode_uper; per_type_decoder_f S1AP_CELevel_decode_aper; per_type_encoder_f S1AP_CELevel_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_CELevel_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CGI.c000066400000000000000000000053331333553357400172310ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CGI.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_CGI_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CGI, pLMNidentity), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_PLMNidentity, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "pLMNidentity" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CGI, lAC), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_LAC, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "lAC" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CGI, cI), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cI" }, { ATF_POINTER, 2, offsetof(struct S1AP_CGI, rAC), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_RAC, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "rAC" }, { ATF_POINTER, 1, offsetof(struct S1AP_CGI, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P34, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_CGI_oms_1[] = { 3, 4 }; static const ber_tlv_tag_t asn_DEF_S1AP_CGI_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CGI_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMNidentity */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* lAC */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* cI */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* rAC */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CGI_specs_1 = { sizeof(struct S1AP_CGI), offsetof(struct S1AP_CGI, _asn_ctx), asn_MAP_S1AP_CGI_tag2el_1, 5, /* Count of tags in the map */ asn_MAP_S1AP_CGI_oms_1, /* Optional members */ 2, 0, /* Root/Additions */ 5, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CGI = { "CGI", "CGI", &asn_OP_SEQUENCE, asn_DEF_S1AP_CGI_tags_1, sizeof(asn_DEF_S1AP_CGI_tags_1) /sizeof(asn_DEF_S1AP_CGI_tags_1[0]), /* 1 */ asn_DEF_S1AP_CGI_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CGI_tags_1) /sizeof(asn_DEF_S1AP_CGI_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CGI_1, 5, /* Elements count */ &asn_SPC_S1AP_CGI_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CGI.h000066400000000000000000000022651333553357400172370ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CGI_H_ #define _S1AP_CGI_H_ #include /* Including external dependencies */ #include "S1AP_PLMNidentity.h" #include "S1AP_LAC.h" #include "S1AP_CI.h" #include "S1AP_RAC.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_CGI */ typedef struct S1AP_CGI { S1AP_PLMNidentity_t pLMNidentity; S1AP_LAC_t lAC; S1AP_CI_t cI; S1AP_RAC_t *rAC; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CGI_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CGI; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CGI_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_CGI_1[5]; #ifdef __cplusplus } #endif #endif /* _S1AP_CGI_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CI.c000066400000000000000000000033521333553357400171210ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CI.h" int S1AP_CI_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } size = st->size; if((size == 2)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_CI_constr_1 CC_NOTUSED = { { 0, 0 }, 2 /* (SIZE(2..2)) */}; asn_per_constraints_t asn_PER_type_S1AP_CI_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 2, 2 } /* (SIZE(2..2)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_CI_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_CI = { "CI", "CI", &asn_OP_OCTET_STRING, asn_DEF_S1AP_CI_tags_1, sizeof(asn_DEF_S1AP_CI_tags_1) /sizeof(asn_DEF_S1AP_CI_tags_1[0]), /* 1 */ asn_DEF_S1AP_CI_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CI_tags_1) /sizeof(asn_DEF_S1AP_CI_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_CI_constr_1, &asn_PER_type_S1AP_CI_constr_1, S1AP_CI_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CI.h000066400000000000000000000022001333553357400171150ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CI_H_ #define _S1AP_CI_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_CI */ typedef OCTET_STRING_t S1AP_CI_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_CI_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CI; asn_struct_free_f S1AP_CI_free; asn_struct_print_f S1AP_CI_print; asn_constr_check_f S1AP_CI_constraint; ber_type_decoder_f S1AP_CI_decode_ber; der_type_encoder_f S1AP_CI_encode_der; xer_type_decoder_f S1AP_CI_decode_xer; xer_type_encoder_f S1AP_CI_encode_xer; oer_type_decoder_f S1AP_CI_decode_oer; oer_type_encoder_f S1AP_CI_encode_oer; per_type_decoder_f S1AP_CI_decode_uper; per_type_encoder_f S1AP_CI_encode_uper; per_type_decoder_f S1AP_CI_decode_aper; per_type_encoder_f S1AP_CI_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_CI_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CNDomain.c000066400000000000000000000035261333553357400202610ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CNDomain.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_CNDomain_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_CNDomain_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_CNDomain_value2enum_1[] = { { 0, 2, "ps" }, { 1, 2, "cs" } }; static const unsigned int asn_MAP_S1AP_CNDomain_enum2value_1[] = { 1, /* cs(1) */ 0 /* ps(0) */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_CNDomain_specs_1 = { asn_MAP_S1AP_CNDomain_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_CNDomain_enum2value_1, /* N => "tag"; sorted by N */ 2, /* Number of elements in the maps */ 0, /* Enumeration is not extensible */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_CNDomain_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_CNDomain = { "CNDomain", "CNDomain", &asn_OP_NativeEnumerated, asn_DEF_S1AP_CNDomain_tags_1, sizeof(asn_DEF_S1AP_CNDomain_tags_1) /sizeof(asn_DEF_S1AP_CNDomain_tags_1[0]), /* 1 */ asn_DEF_S1AP_CNDomain_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CNDomain_tags_1) /sizeof(asn_DEF_S1AP_CNDomain_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_CNDomain_constr_1, &asn_PER_type_S1AP_CNDomain_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_CNDomain_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CNDomain.h000066400000000000000000000024411333553357400202610ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CNDomain_H_ #define _S1AP_CNDomain_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_CNDomain { S1AP_CNDomain_ps = 0, S1AP_CNDomain_cs = 1 } e_S1AP_CNDomain; /* S1AP_CNDomain */ typedef long S1AP_CNDomain_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CNDomain; asn_struct_free_f S1AP_CNDomain_free; asn_struct_print_f S1AP_CNDomain_print; asn_constr_check_f S1AP_CNDomain_constraint; ber_type_decoder_f S1AP_CNDomain_decode_ber; der_type_encoder_f S1AP_CNDomain_encode_der; xer_type_decoder_f S1AP_CNDomain_decode_xer; xer_type_encoder_f S1AP_CNDomain_encode_xer; oer_type_decoder_f S1AP_CNDomain_decode_oer; oer_type_encoder_f S1AP_CNDomain_encode_oer; per_type_decoder_f S1AP_CNDomain_decode_uper; per_type_encoder_f S1AP_CNDomain_encode_uper; per_type_decoder_f S1AP_CNDomain_decode_aper; per_type_encoder_f S1AP_CNDomain_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_CNDomain_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_COUNTValueExtended.c000066400000000000000000000051201333553357400221670ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_COUNTValueExtended.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_COUNTValueExtended_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_COUNTValueExtended, pDCP_SNExtended), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_PDCP_SNExtended, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "pDCP-SNExtended" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_COUNTValueExtended, hFNModified), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_HFNModified, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "hFNModified" }, { ATF_POINTER, 1, offsetof(struct S1AP_COUNTValueExtended, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P37, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_COUNTValueExtended_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_COUNTValueExtended_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_COUNTValueExtended_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pDCP-SNExtended */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* hFNModified */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_COUNTValueExtended_specs_1 = { sizeof(struct S1AP_COUNTValueExtended), offsetof(struct S1AP_COUNTValueExtended, _asn_ctx), asn_MAP_S1AP_COUNTValueExtended_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_COUNTValueExtended_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_COUNTValueExtended = { "COUNTValueExtended", "COUNTValueExtended", &asn_OP_SEQUENCE, asn_DEF_S1AP_COUNTValueExtended_tags_1, sizeof(asn_DEF_S1AP_COUNTValueExtended_tags_1) /sizeof(asn_DEF_S1AP_COUNTValueExtended_tags_1[0]), /* 1 */ asn_DEF_S1AP_COUNTValueExtended_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_COUNTValueExtended_tags_1) /sizeof(asn_DEF_S1AP_COUNTValueExtended_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_COUNTValueExtended_1, 3, /* Elements count */ &asn_SPC_S1AP_COUNTValueExtended_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_COUNTValueExtended.h000066400000000000000000000021711333553357400221770ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_COUNTValueExtended_H_ #define _S1AP_COUNTValueExtended_H_ #include /* Including external dependencies */ #include "S1AP_PDCP-SNExtended.h" #include "S1AP_HFNModified.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_COUNTValueExtended */ typedef struct S1AP_COUNTValueExtended { S1AP_PDCP_SNExtended_t pDCP_SNExtended; S1AP_HFNModified_t hFNModified; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_COUNTValueExtended_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_COUNTValueExtended; #ifdef __cplusplus } #endif #endif /* _S1AP_COUNTValueExtended_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_COUNTvalue.c000066400000000000000000000045021333553357400205510ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_COUNTvalue.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_COUNTvalue_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_COUNTvalue, pDCP_SN), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_PDCP_SN, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "pDCP-SN" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_COUNTvalue, hFN), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_HFN, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "hFN" }, { ATF_POINTER, 1, offsetof(struct S1AP_COUNTvalue, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P36, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_COUNTvalue_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_COUNTvalue_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_COUNTvalue_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pDCP-SN */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* hFN */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_COUNTvalue_specs_1 = { sizeof(struct S1AP_COUNTvalue), offsetof(struct S1AP_COUNTvalue, _asn_ctx), asn_MAP_S1AP_COUNTvalue_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_COUNTvalue_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_COUNTvalue = { "COUNTvalue", "COUNTvalue", &asn_OP_SEQUENCE, asn_DEF_S1AP_COUNTvalue_tags_1, sizeof(asn_DEF_S1AP_COUNTvalue_tags_1) /sizeof(asn_DEF_S1AP_COUNTvalue_tags_1[0]), /* 1 */ asn_DEF_S1AP_COUNTvalue_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_COUNTvalue_tags_1) /sizeof(asn_DEF_S1AP_COUNTvalue_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_COUNTvalue_1, 3, /* Elements count */ &asn_SPC_S1AP_COUNTvalue_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_COUNTvalue.h000066400000000000000000000022111333553357400205510ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_COUNTvalue_H_ #define _S1AP_COUNTvalue_H_ #include /* Including external dependencies */ #include "S1AP_PDCP-SN.h" #include "S1AP_HFN.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_COUNTvalue */ typedef struct S1AP_COUNTvalue { S1AP_PDCP_SN_t pDCP_SN; S1AP_HFN_t hFN; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_COUNTvalue_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_COUNTvalue; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_COUNTvalue_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_COUNTvalue_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_COUNTvalue_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_COUNTvaluePDCP-SNlength18.c000066400000000000000000000054401333553357400231130ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_COUNTvaluePDCP-SNlength18.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_COUNTvaluePDCP_SNlength18_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_COUNTvaluePDCP_SNlength18, pDCP_SNlength18), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_PDCP_SNlength18, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "pDCP-SNlength18" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_COUNTvaluePDCP_SNlength18, hFNforPDCP_SNlength18), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_HFNforPDCP_SNlength18, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "hFNforPDCP-SNlength18" }, { ATF_POINTER, 1, offsetof(struct S1AP_COUNTvaluePDCP_SNlength18, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P38, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_COUNTvaluePDCP_SNlength18_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_COUNTvaluePDCP_SNlength18_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_COUNTvaluePDCP_SNlength18_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pDCP-SNlength18 */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* hFNforPDCP-SNlength18 */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_COUNTvaluePDCP_SNlength18_specs_1 = { sizeof(struct S1AP_COUNTvaluePDCP_SNlength18), offsetof(struct S1AP_COUNTvaluePDCP_SNlength18, _asn_ctx), asn_MAP_S1AP_COUNTvaluePDCP_SNlength18_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_COUNTvaluePDCP_SNlength18_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_COUNTvaluePDCP_SNlength18 = { "COUNTvaluePDCP-SNlength18", "COUNTvaluePDCP-SNlength18", &asn_OP_SEQUENCE, asn_DEF_S1AP_COUNTvaluePDCP_SNlength18_tags_1, sizeof(asn_DEF_S1AP_COUNTvaluePDCP_SNlength18_tags_1) /sizeof(asn_DEF_S1AP_COUNTvaluePDCP_SNlength18_tags_1[0]), /* 1 */ asn_DEF_S1AP_COUNTvaluePDCP_SNlength18_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_COUNTvaluePDCP_SNlength18_tags_1) /sizeof(asn_DEF_S1AP_COUNTvaluePDCP_SNlength18_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_COUNTvaluePDCP_SNlength18_1, 3, /* Elements count */ &asn_SPC_S1AP_COUNTvaluePDCP_SNlength18_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_COUNTvaluePDCP-SNlength18.h000066400000000000000000000023101333553357400231110ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_COUNTvaluePDCP_SNlength18_H_ #define _S1AP_COUNTvaluePDCP_SNlength18_H_ #include /* Including external dependencies */ #include "S1AP_PDCP-SNlength18.h" #include "S1AP_HFNforPDCP-SNlength18.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_COUNTvaluePDCP-SNlength18 */ typedef struct S1AP_COUNTvaluePDCP_SNlength18 { S1AP_PDCP_SNlength18_t pDCP_SNlength18; S1AP_HFNforPDCP_SNlength18_t hFNforPDCP_SNlength18; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_COUNTvaluePDCP_SNlength18_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_COUNTvaluePDCP_SNlength18; #ifdef __cplusplus } #endif #endif /* _S1AP_COUNTvaluePDCP_SNlength18_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CSFallbackIndicator.c000066400000000000000000000043441333553357400224120ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CSFallbackIndicator.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_CSFallbackIndicator_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_CSFallbackIndicator_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_CSFallbackIndicator_value2enum_1[] = { { 0, 20, "cs-fallback-required" }, { 1, 25, "cs-fallback-high-priority" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_CSFallbackIndicator_enum2value_1[] = { 1, /* cs-fallback-high-priority(1) */ 0 /* cs-fallback-required(0) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_CSFallbackIndicator_specs_1 = { asn_MAP_S1AP_CSFallbackIndicator_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_CSFallbackIndicator_enum2value_1, /* N => "tag"; sorted by N */ 2, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_CSFallbackIndicator_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_CSFallbackIndicator = { "CSFallbackIndicator", "CSFallbackIndicator", &asn_OP_NativeEnumerated, asn_DEF_S1AP_CSFallbackIndicator_tags_1, sizeof(asn_DEF_S1AP_CSFallbackIndicator_tags_1) /sizeof(asn_DEF_S1AP_CSFallbackIndicator_tags_1[0]), /* 1 */ asn_DEF_S1AP_CSFallbackIndicator_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CSFallbackIndicator_tags_1) /sizeof(asn_DEF_S1AP_CSFallbackIndicator_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_CSFallbackIndicator_constr_1, &asn_PER_type_S1AP_CSFallbackIndicator_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_CSFallbackIndicator_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CSFallbackIndicator.h000066400000000000000000000031561333553357400224170ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CSFallbackIndicator_H_ #define _S1AP_CSFallbackIndicator_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_CSFallbackIndicator { S1AP_CSFallbackIndicator_cs_fallback_required = 0, /* * Enumeration is extensible */ S1AP_CSFallbackIndicator_cs_fallback_high_priority = 1 } e_S1AP_CSFallbackIndicator; /* S1AP_CSFallbackIndicator */ typedef long S1AP_CSFallbackIndicator_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CSFallbackIndicator; asn_struct_free_f S1AP_CSFallbackIndicator_free; asn_struct_print_f S1AP_CSFallbackIndicator_print; asn_constr_check_f S1AP_CSFallbackIndicator_constraint; ber_type_decoder_f S1AP_CSFallbackIndicator_decode_ber; der_type_encoder_f S1AP_CSFallbackIndicator_encode_der; xer_type_decoder_f S1AP_CSFallbackIndicator_decode_xer; xer_type_encoder_f S1AP_CSFallbackIndicator_encode_xer; oer_type_decoder_f S1AP_CSFallbackIndicator_decode_oer; oer_type_encoder_f S1AP_CSFallbackIndicator_encode_oer; per_type_decoder_f S1AP_CSFallbackIndicator_decode_uper; per_type_encoder_f S1AP_CSFallbackIndicator_encode_uper; per_type_decoder_f S1AP_CSFallbackIndicator_decode_aper; per_type_encoder_f S1AP_CSFallbackIndicator_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_CSFallbackIndicator_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CSG-Id.c000066400000000000000000000036161333553357400175770ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CSG-Id.h" int S1AP_CSG_Id_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 27)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_CSG_Id_constr_1 CC_NOTUSED = { { 0, 0 }, 27 /* (SIZE(27..27)) */}; asn_per_constraints_t asn_PER_type_S1AP_CSG_Id_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 27, 27 } /* (SIZE(27..27)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_CSG_Id_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_CSG_Id = { "CSG-Id", "CSG-Id", &asn_OP_BIT_STRING, asn_DEF_S1AP_CSG_Id_tags_1, sizeof(asn_DEF_S1AP_CSG_Id_tags_1) /sizeof(asn_DEF_S1AP_CSG_Id_tags_1[0]), /* 1 */ asn_DEF_S1AP_CSG_Id_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CSG_Id_tags_1) /sizeof(asn_DEF_S1AP_CSG_Id_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_CSG_Id_constr_1, &asn_PER_type_S1AP_CSG_Id_constr_1, S1AP_CSG_Id_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CSG-Id.h000066400000000000000000000023141333553357400175760ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CSG_Id_H_ #define _S1AP_CSG_Id_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_CSG-Id */ typedef BIT_STRING_t S1AP_CSG_Id_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_CSG_Id_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CSG_Id; asn_struct_free_f S1AP_CSG_Id_free; asn_struct_print_f S1AP_CSG_Id_print; asn_constr_check_f S1AP_CSG_Id_constraint; ber_type_decoder_f S1AP_CSG_Id_decode_ber; der_type_encoder_f S1AP_CSG_Id_encode_der; xer_type_decoder_f S1AP_CSG_Id_decode_xer; xer_type_encoder_f S1AP_CSG_Id_encode_xer; oer_type_decoder_f S1AP_CSG_Id_decode_oer; oer_type_encoder_f S1AP_CSG_Id_encode_oer; per_type_decoder_f S1AP_CSG_Id_decode_uper; per_type_encoder_f S1AP_CSG_Id_encode_uper; per_type_decoder_f S1AP_CSG_Id_decode_aper; per_type_encoder_f S1AP_CSG_Id_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_CSG_Id_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CSG-IdList-Item.c000066400000000000000000000042231333553357400213220ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CSG-IdList-Item.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_CSG_IdList_Item_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CSG_IdList_Item, cSG_Id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CSG_Id, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cSG-Id" }, { ATF_POINTER, 1, offsetof(struct S1AP_CSG_IdList_Item, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P35, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_CSG_IdList_Item_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_CSG_IdList_Item_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CSG_IdList_Item_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* cSG-Id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CSG_IdList_Item_specs_1 = { sizeof(struct S1AP_CSG_IdList_Item), offsetof(struct S1AP_CSG_IdList_Item, _asn_ctx), asn_MAP_S1AP_CSG_IdList_Item_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_CSG_IdList_Item_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CSG_IdList_Item = { "CSG-IdList-Item", "CSG-IdList-Item", &asn_OP_SEQUENCE, asn_DEF_S1AP_CSG_IdList_Item_tags_1, sizeof(asn_DEF_S1AP_CSG_IdList_Item_tags_1) /sizeof(asn_DEF_S1AP_CSG_IdList_Item_tags_1[0]), /* 1 */ asn_DEF_S1AP_CSG_IdList_Item_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CSG_IdList_Item_tags_1) /sizeof(asn_DEF_S1AP_CSG_IdList_Item_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CSG_IdList_Item_1, 2, /* Elements count */ &asn_SPC_S1AP_CSG_IdList_Item_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CSG-IdList-Item.h000066400000000000000000000022131333553357400213240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CSG_IdList_Item_H_ #define _S1AP_CSG_IdList_Item_H_ #include /* Including external dependencies */ #include "S1AP_CSG-Id.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_CSG-IdList-Item */ typedef struct S1AP_CSG_IdList_Item { S1AP_CSG_Id_t cSG_Id; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CSG_IdList_Item_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CSG_IdList_Item; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CSG_IdList_Item_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_CSG_IdList_Item_1[2]; #ifdef __cplusplus } #endif #endif /* _S1AP_CSG_IdList_Item_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CSG-IdList.c000066400000000000000000000033121333553357400204240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CSG-IdList.h" #include "S1AP_CSG-IdList-Item.h" static asn_oer_constraints_t asn_OER_type_S1AP_CSG_IdList_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_CSG_IdList_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_CSG_IdList_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CSG_IdList_Item, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CSG_IdList_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_S1AP_CSG_IdList_specs_1 = { sizeof(struct S1AP_CSG_IdList), offsetof(struct S1AP_CSG_IdList, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CSG_IdList = { "CSG-IdList", "CSG-IdList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_CSG_IdList_tags_1, sizeof(asn_DEF_S1AP_CSG_IdList_tags_1) /sizeof(asn_DEF_S1AP_CSG_IdList_tags_1[0]), /* 1 */ asn_DEF_S1AP_CSG_IdList_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CSG_IdList_tags_1) /sizeof(asn_DEF_S1AP_CSG_IdList_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_CSG_IdList_constr_1, &asn_PER_type_S1AP_CSG_IdList_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_CSG_IdList_1, 1, /* Single element */ &asn_SPC_S1AP_CSG_IdList_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CSG-IdList.h000066400000000000000000000015541333553357400204370ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CSG_IdList_H_ #define _S1AP_CSG_IdList_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_CSG_IdList_Item; /* S1AP_CSG-IdList */ typedef struct S1AP_CSG_IdList { A_SEQUENCE_OF(struct S1AP_CSG_IdList_Item) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CSG_IdList_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CSG_IdList; #ifdef __cplusplus } #endif #endif /* _S1AP_CSG_IdList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CSGMembershipInfo.c000066400000000000000000000063351333553357400220760ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CSGMembershipInfo.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_CSGMembershipInfo_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CSGMembershipInfo, cSGMembershipStatus), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CSGMembershipStatus, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cSGMembershipStatus" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CSGMembershipInfo, cSG_Id), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CSG_Id, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cSG-Id" }, { ATF_POINTER, 3, offsetof(struct S1AP_CSGMembershipInfo, cellAccessMode), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CellAccessMode, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cellAccessMode" }, { ATF_POINTER, 2, offsetof(struct S1AP_CSGMembershipInfo, pLMNidentity), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_PLMNidentity, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "pLMNidentity" }, { ATF_POINTER, 1, offsetof(struct S1AP_CSGMembershipInfo, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P16, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_CSGMembershipInfo_oms_1[] = { 2, 3, 4 }; static const ber_tlv_tag_t asn_DEF_S1AP_CSGMembershipInfo_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CSGMembershipInfo_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* cSGMembershipStatus */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* cSG-Id */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* cellAccessMode */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* pLMNidentity */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_CSGMembershipInfo_specs_1 = { sizeof(struct S1AP_CSGMembershipInfo), offsetof(struct S1AP_CSGMembershipInfo, _asn_ctx), asn_MAP_S1AP_CSGMembershipInfo_tag2el_1, 5, /* Count of tags in the map */ asn_MAP_S1AP_CSGMembershipInfo_oms_1, /* Optional members */ 3, 0, /* Root/Additions */ 5, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CSGMembershipInfo = { "CSGMembershipInfo", "CSGMembershipInfo", &asn_OP_SEQUENCE, asn_DEF_S1AP_CSGMembershipInfo_tags_1, sizeof(asn_DEF_S1AP_CSGMembershipInfo_tags_1) /sizeof(asn_DEF_S1AP_CSGMembershipInfo_tags_1[0]), /* 1 */ asn_DEF_S1AP_CSGMembershipInfo_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CSGMembershipInfo_tags_1) /sizeof(asn_DEF_S1AP_CSGMembershipInfo_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CSGMembershipInfo_1, 5, /* Elements count */ &asn_SPC_S1AP_CSGMembershipInfo_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CSGMembershipInfo.h000066400000000000000000000024421333553357400220760ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CSGMembershipInfo_H_ #define _S1AP_CSGMembershipInfo_H_ #include /* Including external dependencies */ #include "S1AP_CSGMembershipStatus.h" #include "S1AP_CSG-Id.h" #include "S1AP_CellAccessMode.h" #include "S1AP_PLMNidentity.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_CSGMembershipInfo */ typedef struct S1AP_CSGMembershipInfo { S1AP_CSGMembershipStatus_t cSGMembershipStatus; S1AP_CSG_Id_t cSG_Id; S1AP_CellAccessMode_t *cellAccessMode; /* OPTIONAL */ S1AP_PLMNidentity_t *pLMNidentity; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CSGMembershipInfo_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CSGMembershipInfo; #ifdef __cplusplus } #endif #endif /* _S1AP_CSGMembershipInfo_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CSGMembershipStatus.c000066400000000000000000000041101333553357400224530ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CSGMembershipStatus.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_CSGMembershipStatus_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_CSGMembershipStatus_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_CSGMembershipStatus_value2enum_1[] = { { 0, 6, "member" }, { 1, 10, "not-member" } }; static const unsigned int asn_MAP_S1AP_CSGMembershipStatus_enum2value_1[] = { 0, /* member(0) */ 1 /* not-member(1) */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_CSGMembershipStatus_specs_1 = { asn_MAP_S1AP_CSGMembershipStatus_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_CSGMembershipStatus_enum2value_1, /* N => "tag"; sorted by N */ 2, /* Number of elements in the maps */ 0, /* Enumeration is not extensible */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_CSGMembershipStatus_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_CSGMembershipStatus = { "CSGMembershipStatus", "CSGMembershipStatus", &asn_OP_NativeEnumerated, asn_DEF_S1AP_CSGMembershipStatus_tags_1, sizeof(asn_DEF_S1AP_CSGMembershipStatus_tags_1) /sizeof(asn_DEF_S1AP_CSGMembershipStatus_tags_1[0]), /* 1 */ asn_DEF_S1AP_CSGMembershipStatus_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CSGMembershipStatus_tags_1) /sizeof(asn_DEF_S1AP_CSGMembershipStatus_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_CSGMembershipStatus_constr_1, &asn_PER_type_S1AP_CSGMembershipStatus_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_CSGMembershipStatus_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CSGMembershipStatus.h000066400000000000000000000032001333553357400224570ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CSGMembershipStatus_H_ #define _S1AP_CSGMembershipStatus_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_CSGMembershipStatus { S1AP_CSGMembershipStatus_member = 0, S1AP_CSGMembershipStatus_not_member = 1 } e_S1AP_CSGMembershipStatus; /* S1AP_CSGMembershipStatus */ typedef long S1AP_CSGMembershipStatus_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_CSGMembershipStatus_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CSGMembershipStatus; extern const asn_INTEGER_specifics_t asn_SPC_CSGMembershipStatus_specs_1; asn_struct_free_f CSGMembershipStatus_free; asn_struct_print_f CSGMembershipStatus_print; asn_constr_check_f CSGMembershipStatus_constraint; ber_type_decoder_f CSGMembershipStatus_decode_ber; der_type_encoder_f CSGMembershipStatus_encode_der; xer_type_decoder_f CSGMembershipStatus_decode_xer; xer_type_encoder_f CSGMembershipStatus_encode_xer; oer_type_decoder_f CSGMembershipStatus_decode_oer; oer_type_encoder_f CSGMembershipStatus_encode_oer; per_type_decoder_f CSGMembershipStatus_decode_uper; per_type_encoder_f CSGMembershipStatus_encode_uper; per_type_decoder_f CSGMembershipStatus_decode_aper; per_type_encoder_f CSGMembershipStatus_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_CSGMembershipStatus_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CancelledCellinEAI-Item.c000066400000000000000000000052601333553357400230420ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CancelledCellinEAI-Item.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_CancelledCellinEAI_Item_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CancelledCellinEAI_Item, eCGI), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_EUTRAN_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "eCGI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CancelledCellinEAI_Item, numberOfBroadcasts), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_NumberOfBroadcasts, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "numberOfBroadcasts" }, { ATF_POINTER, 1, offsetof(struct S1AP_CancelledCellinEAI_Item, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P26, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_CancelledCellinEAI_Item_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_CancelledCellinEAI_Item_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CancelledCellinEAI_Item_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eCGI */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* numberOfBroadcasts */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CancelledCellinEAI_Item_specs_1 = { sizeof(struct S1AP_CancelledCellinEAI_Item), offsetof(struct S1AP_CancelledCellinEAI_Item, _asn_ctx), asn_MAP_S1AP_CancelledCellinEAI_Item_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_CancelledCellinEAI_Item_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CancelledCellinEAI_Item = { "CancelledCellinEAI-Item", "CancelledCellinEAI-Item", &asn_OP_SEQUENCE, asn_DEF_S1AP_CancelledCellinEAI_Item_tags_1, sizeof(asn_DEF_S1AP_CancelledCellinEAI_Item_tags_1) /sizeof(asn_DEF_S1AP_CancelledCellinEAI_Item_tags_1[0]), /* 1 */ asn_DEF_S1AP_CancelledCellinEAI_Item_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CancelledCellinEAI_Item_tags_1) /sizeof(asn_DEF_S1AP_CancelledCellinEAI_Item_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CancelledCellinEAI_Item_1, 3, /* Elements count */ &asn_SPC_S1AP_CancelledCellinEAI_Item_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CancelledCellinEAI-Item.h000066400000000000000000000024561333553357400230530ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CancelledCellinEAI_Item_H_ #define _S1AP_CancelledCellinEAI_Item_H_ #include /* Including external dependencies */ #include "S1AP_EUTRAN-CGI.h" #include "S1AP_NumberOfBroadcasts.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_CancelledCellinEAI-Item */ typedef struct S1AP_CancelledCellinEAI_Item { S1AP_EUTRAN_CGI_t eCGI; S1AP_NumberOfBroadcasts_t numberOfBroadcasts; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CancelledCellinEAI_Item_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CancelledCellinEAI_Item; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CancelledCellinEAI_Item_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_CancelledCellinEAI_Item_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_CancelledCellinEAI_Item_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CancelledCellinEAI.c000066400000000000000000000035651333553357400221540ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CancelledCellinEAI.h" #include "S1AP_CancelledCellinEAI-Item.h" static asn_oer_constraints_t asn_OER_type_S1AP_CancelledCellinEAI_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_CancelledCellinEAI_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_CancelledCellinEAI_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CancelledCellinEAI_Item, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CancelledCellinEAI_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_CancelledCellinEAI_specs_1 = { sizeof(struct S1AP_CancelledCellinEAI), offsetof(struct S1AP_CancelledCellinEAI, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CancelledCellinEAI = { "CancelledCellinEAI", "CancelledCellinEAI", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_CancelledCellinEAI_tags_1, sizeof(asn_DEF_S1AP_CancelledCellinEAI_tags_1) /sizeof(asn_DEF_S1AP_CancelledCellinEAI_tags_1[0]), /* 1 */ asn_DEF_S1AP_CancelledCellinEAI_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CancelledCellinEAI_tags_1) /sizeof(asn_DEF_S1AP_CancelledCellinEAI_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_CancelledCellinEAI_constr_1, &asn_PER_type_S1AP_CancelledCellinEAI_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_CancelledCellinEAI_1, 1, /* Single element */ &asn_SPC_S1AP_CancelledCellinEAI_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CancelledCellinEAI.h000066400000000000000000000022061333553357400221500ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CancelledCellinEAI_H_ #define _S1AP_CancelledCellinEAI_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_CancelledCellinEAI_Item; /* S1AP_CancelledCellinEAI */ typedef struct S1AP_CancelledCellinEAI { A_SEQUENCE_OF(struct S1AP_CancelledCellinEAI_Item) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CancelledCellinEAI_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CancelledCellinEAI; extern asn_SET_OF_specifics_t asn_SPC_S1AP_CancelledCellinEAI_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_CancelledCellinEAI_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_CancelledCellinEAI_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_CancelledCellinEAI_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CancelledCellinTAI-Item.c000066400000000000000000000052601333553357400230610ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CancelledCellinTAI-Item.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_CancelledCellinTAI_Item_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CancelledCellinTAI_Item, eCGI), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_EUTRAN_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "eCGI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CancelledCellinTAI_Item, numberOfBroadcasts), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_NumberOfBroadcasts, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "numberOfBroadcasts" }, { ATF_POINTER, 1, offsetof(struct S1AP_CancelledCellinTAI_Item, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P27, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_CancelledCellinTAI_Item_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_CancelledCellinTAI_Item_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CancelledCellinTAI_Item_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eCGI */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* numberOfBroadcasts */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CancelledCellinTAI_Item_specs_1 = { sizeof(struct S1AP_CancelledCellinTAI_Item), offsetof(struct S1AP_CancelledCellinTAI_Item, _asn_ctx), asn_MAP_S1AP_CancelledCellinTAI_Item_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_CancelledCellinTAI_Item_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CancelledCellinTAI_Item = { "CancelledCellinTAI-Item", "CancelledCellinTAI-Item", &asn_OP_SEQUENCE, asn_DEF_S1AP_CancelledCellinTAI_Item_tags_1, sizeof(asn_DEF_S1AP_CancelledCellinTAI_Item_tags_1) /sizeof(asn_DEF_S1AP_CancelledCellinTAI_Item_tags_1[0]), /* 1 */ asn_DEF_S1AP_CancelledCellinTAI_Item_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CancelledCellinTAI_Item_tags_1) /sizeof(asn_DEF_S1AP_CancelledCellinTAI_Item_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CancelledCellinTAI_Item_1, 3, /* Elements count */ &asn_SPC_S1AP_CancelledCellinTAI_Item_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CancelledCellinTAI-Item.h000066400000000000000000000024561333553357400230720ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CancelledCellinTAI_Item_H_ #define _S1AP_CancelledCellinTAI_Item_H_ #include /* Including external dependencies */ #include "S1AP_EUTRAN-CGI.h" #include "S1AP_NumberOfBroadcasts.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_CancelledCellinTAI-Item */ typedef struct S1AP_CancelledCellinTAI_Item { S1AP_EUTRAN_CGI_t eCGI; S1AP_NumberOfBroadcasts_t numberOfBroadcasts; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CancelledCellinTAI_Item_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CancelledCellinTAI_Item; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CancelledCellinTAI_Item_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_CancelledCellinTAI_Item_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_CancelledCellinTAI_Item_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CancelledCellinTAI.c000066400000000000000000000035651333553357400221730ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CancelledCellinTAI.h" #include "S1AP_CancelledCellinTAI-Item.h" static asn_oer_constraints_t asn_OER_type_S1AP_CancelledCellinTAI_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_CancelledCellinTAI_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_CancelledCellinTAI_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CancelledCellinTAI_Item, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CancelledCellinTAI_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_CancelledCellinTAI_specs_1 = { sizeof(struct S1AP_CancelledCellinTAI), offsetof(struct S1AP_CancelledCellinTAI, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CancelledCellinTAI = { "CancelledCellinTAI", "CancelledCellinTAI", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_CancelledCellinTAI_tags_1, sizeof(asn_DEF_S1AP_CancelledCellinTAI_tags_1) /sizeof(asn_DEF_S1AP_CancelledCellinTAI_tags_1[0]), /* 1 */ asn_DEF_S1AP_CancelledCellinTAI_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CancelledCellinTAI_tags_1) /sizeof(asn_DEF_S1AP_CancelledCellinTAI_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_CancelledCellinTAI_constr_1, &asn_PER_type_S1AP_CancelledCellinTAI_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_CancelledCellinTAI_1, 1, /* Single element */ &asn_SPC_S1AP_CancelledCellinTAI_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CancelledCellinTAI.h000066400000000000000000000022061333553357400221670ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CancelledCellinTAI_H_ #define _S1AP_CancelledCellinTAI_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_CancelledCellinTAI_Item; /* S1AP_CancelledCellinTAI */ typedef struct S1AP_CancelledCellinTAI { A_SEQUENCE_OF(struct S1AP_CancelledCellinTAI_Item) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CancelledCellinTAI_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CancelledCellinTAI; extern asn_SET_OF_specifics_t asn_SPC_S1AP_CancelledCellinTAI_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_CancelledCellinTAI_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_CancelledCellinTAI_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_CancelledCellinTAI_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cause.c000066400000000000000000000055651333553357400176760ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Cause.h" static asn_oer_constraints_t asn_OER_type_S1AP_Cause_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_Cause_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 4 } /* (0..4,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_Cause_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_Cause, choice.radioNetwork), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CauseRadioNetwork, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "radioNetwork" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_Cause, choice.transport), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CauseTransport, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "transport" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_Cause, choice.nas), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CauseNas, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "nas" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_Cause, choice.protocol), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CauseProtocol, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocol" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_Cause, choice.misc), (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CauseMisc, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "misc" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_Cause_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* radioNetwork */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* transport */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* nas */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* protocol */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* misc */ }; asn_CHOICE_specifics_t asn_SPC_S1AP_Cause_specs_1 = { sizeof(struct S1AP_Cause), offsetof(struct S1AP_Cause, _asn_ctx), offsetof(struct S1AP_Cause, present), sizeof(((struct S1AP_Cause *)0)->present), asn_MAP_S1AP_Cause_tag2el_1, 5, /* Count of tags in the map */ 0, 0, 5 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_Cause = { "Cause", "Cause", &asn_OP_CHOICE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { &asn_OER_type_S1AP_Cause_constr_1, &asn_PER_type_S1AP_Cause_constr_1, CHOICE_constraint }, asn_MBR_S1AP_Cause_1, 5, /* Elements count */ &asn_SPC_S1AP_Cause_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cause.h000066400000000000000000000030761333553357400176760ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Cause_H_ #define _S1AP_Cause_H_ #include /* Including external dependencies */ #include "S1AP_CauseRadioNetwork.h" #include "S1AP_CauseTransport.h" #include "S1AP_CauseNas.h" #include "S1AP_CauseProtocol.h" #include "S1AP_CauseMisc.h" #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_Cause_PR { S1AP_Cause_PR_NOTHING, /* No components present */ S1AP_Cause_PR_radioNetwork, S1AP_Cause_PR_transport, S1AP_Cause_PR_nas, S1AP_Cause_PR_protocol, S1AP_Cause_PR_misc /* Extensions may appear below */ } S1AP_Cause_PR; /* S1AP_Cause */ typedef struct S1AP_Cause { S1AP_Cause_PR present; union S1AP_Cause_u { S1AP_CauseRadioNetwork_t radioNetwork; S1AP_CauseTransport_t transport; S1AP_CauseNas_t nas; S1AP_CauseProtocol_t protocol; S1AP_CauseMisc_t misc; /* * This type is extensible, * possible extensions are below. */ } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_Cause_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Cause; extern asn_CHOICE_specifics_t asn_SPC_S1AP_Cause_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_Cause_1[5]; extern asn_per_constraints_t asn_PER_type_S1AP_Cause_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_Cause_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CauseMisc.c000066400000000000000000000044301333553357400205000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CauseMisc.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_CauseMisc_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_CauseMisc_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 5 } /* (0..5,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_CauseMisc_value2enum_1[] = { { 0, 27, "control-processing-overload" }, { 1, 42, "not-enough-user-plane-processing-resources" }, { 2, 16, "hardware-failure" }, { 3, 15, "om-intervention" }, { 4, 11, "unspecified" }, { 5, 12, "unknown-PLMN" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_CauseMisc_enum2value_1[] = { 0, /* control-processing-overload(0) */ 2, /* hardware-failure(2) */ 1, /* not-enough-user-plane-processing-resources(1) */ 3, /* om-intervention(3) */ 5, /* unknown-PLMN(5) */ 4 /* unspecified(4) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_CauseMisc_specs_1 = { asn_MAP_S1AP_CauseMisc_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_CauseMisc_enum2value_1, /* N => "tag"; sorted by N */ 6, /* Number of elements in the maps */ 7, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_CauseMisc_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_CauseMisc = { "CauseMisc", "CauseMisc", &asn_OP_NativeEnumerated, asn_DEF_S1AP_CauseMisc_tags_1, sizeof(asn_DEF_S1AP_CauseMisc_tags_1) /sizeof(asn_DEF_S1AP_CauseMisc_tags_1[0]), /* 1 */ asn_DEF_S1AP_CauseMisc_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CauseMisc_tags_1) /sizeof(asn_DEF_S1AP_CauseMisc_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_CauseMisc_constr_1, &asn_PER_type_S1AP_CauseMisc_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_CauseMisc_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CauseMisc.h000066400000000000000000000031601333553357400205040ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CauseMisc_H_ #define _S1AP_CauseMisc_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_CauseMisc { S1AP_CauseMisc_control_processing_overload = 0, S1AP_CauseMisc_not_enough_user_plane_processing_resources = 1, S1AP_CauseMisc_hardware_failure = 2, S1AP_CauseMisc_om_intervention = 3, S1AP_CauseMisc_unspecified = 4, S1AP_CauseMisc_unknown_PLMN = 5 /* * Enumeration is extensible */ } e_S1AP_CauseMisc; /* S1AP_CauseMisc */ typedef long S1AP_CauseMisc_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_CauseMisc_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CauseMisc; extern const asn_INTEGER_specifics_t asn_SPC_CauseMisc_specs_1; asn_struct_free_f CauseMisc_free; asn_struct_print_f CauseMisc_print; asn_constr_check_f CauseMisc_constraint; ber_type_decoder_f CauseMisc_decode_ber; der_type_encoder_f CauseMisc_encode_der; xer_type_decoder_f CauseMisc_decode_xer; xer_type_encoder_f CauseMisc_encode_xer; oer_type_decoder_f CauseMisc_decode_oer; oer_type_encoder_f CauseMisc_encode_oer; per_type_decoder_f CauseMisc_decode_uper; per_type_encoder_f CauseMisc_encode_uper; per_type_decoder_f CauseMisc_decode_aper; per_type_encoder_f CauseMisc_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_CauseMisc_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CauseNas.c000066400000000000000000000042061333553357400203270ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CauseNas.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_CauseNas_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_CauseNas_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_CauseNas_value2enum_1[] = { { 0, 14, "normal-release" }, { 1, 22, "authentication-failure" }, { 2, 6, "detach" }, { 3, 11, "unspecified" }, { 4, 23, "csg-subscription-expiry" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_CauseNas_enum2value_1[] = { 1, /* authentication-failure(1) */ 4, /* csg-subscription-expiry(4) */ 2, /* detach(2) */ 0, /* normal-release(0) */ 3 /* unspecified(3) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_CauseNas_specs_1 = { asn_MAP_S1AP_CauseNas_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_CauseNas_enum2value_1, /* N => "tag"; sorted by N */ 5, /* Number of elements in the maps */ 5, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_CauseNas_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_CauseNas = { "CauseNas", "CauseNas", &asn_OP_NativeEnumerated, asn_DEF_S1AP_CauseNas_tags_1, sizeof(asn_DEF_S1AP_CauseNas_tags_1) /sizeof(asn_DEF_S1AP_CauseNas_tags_1[0]), /* 1 */ asn_DEF_S1AP_CauseNas_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CauseNas_tags_1) /sizeof(asn_DEF_S1AP_CauseNas_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_CauseNas_constr_1, &asn_PER_type_S1AP_CauseNas_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_CauseNas_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CauseNas.h000066400000000000000000000030171333553357400203330ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CauseNas_H_ #define _S1AP_CauseNas_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_CauseNas { S1AP_CauseNas_normal_release = 0, S1AP_CauseNas_authentication_failure = 1, S1AP_CauseNas_detach = 2, S1AP_CauseNas_unspecified = 3, /* * Enumeration is extensible */ S1AP_CauseNas_csg_subscription_expiry = 4 } e_S1AP_CauseNas; /* S1AP_CauseNas */ typedef long S1AP_CauseNas_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_CauseNas_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CauseNas; extern const asn_INTEGER_specifics_t asn_SPC_CauseNas_specs_1; asn_struct_free_f CauseNas_free; asn_struct_print_f CauseNas_print; asn_constr_check_f CauseNas_constraint; ber_type_decoder_f CauseNas_decode_ber; der_type_encoder_f CauseNas_encode_der; xer_type_decoder_f CauseNas_decode_xer; xer_type_encoder_f CauseNas_encode_xer; oer_type_decoder_f CauseNas_decode_oer; oer_type_encoder_f CauseNas_encode_oer; per_type_decoder_f CauseNas_decode_uper; per_type_encoder_f CauseNas_encode_uper; per_type_decoder_f CauseNas_decode_aper; per_type_encoder_f CauseNas_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_CauseNas_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CauseProtocol.c000066400000000000000000000050541333553357400214110ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CauseProtocol.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_CauseProtocol_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_CauseProtocol_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 6 } /* (0..6,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_CauseProtocol_value2enum_1[] = { { 0, 21, "transfer-syntax-error" }, { 1, 28, "abstract-syntax-error-reject" }, { 2, 39, "abstract-syntax-error-ignore-and-notify" }, { 3, 42, "message-not-compatible-with-receiver-state" }, { 4, 14, "semantic-error" }, { 5, 49, "abstract-syntax-error-falsely-constructed-message" }, { 6, 11, "unspecified" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_CauseProtocol_enum2value_1[] = { 5, /* abstract-syntax-error-falsely-constructed-message(5) */ 2, /* abstract-syntax-error-ignore-and-notify(2) */ 1, /* abstract-syntax-error-reject(1) */ 3, /* message-not-compatible-with-receiver-state(3) */ 4, /* semantic-error(4) */ 0, /* transfer-syntax-error(0) */ 6 /* unspecified(6) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_CauseProtocol_specs_1 = { asn_MAP_S1AP_CauseProtocol_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_CauseProtocol_enum2value_1, /* N => "tag"; sorted by N */ 7, /* Number of elements in the maps */ 8, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_CauseProtocol_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_CauseProtocol = { "CauseProtocol", "CauseProtocol", &asn_OP_NativeEnumerated, asn_DEF_S1AP_CauseProtocol_tags_1, sizeof(asn_DEF_S1AP_CauseProtocol_tags_1) /sizeof(asn_DEF_S1AP_CauseProtocol_tags_1[0]), /* 1 */ asn_DEF_S1AP_CauseProtocol_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CauseProtocol_tags_1) /sizeof(asn_DEF_S1AP_CauseProtocol_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_CauseProtocol_constr_1, &asn_PER_type_S1AP_CauseProtocol_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_CauseProtocol_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CauseProtocol.h000066400000000000000000000035171333553357400214200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CauseProtocol_H_ #define _S1AP_CauseProtocol_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_CauseProtocol { S1AP_CauseProtocol_transfer_syntax_error = 0, S1AP_CauseProtocol_abstract_syntax_error_reject = 1, S1AP_CauseProtocol_abstract_syntax_error_ignore_and_notify = 2, S1AP_CauseProtocol_message_not_compatible_with_receiver_state = 3, S1AP_CauseProtocol_semantic_error = 4, S1AP_CauseProtocol_abstract_syntax_error_falsely_constructed_message = 5, S1AP_CauseProtocol_unspecified = 6 /* * Enumeration is extensible */ } e_S1AP_CauseProtocol; /* S1AP_CauseProtocol */ typedef long S1AP_CauseProtocol_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_CauseProtocol_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CauseProtocol; extern const asn_INTEGER_specifics_t asn_SPC_CauseProtocol_specs_1; asn_struct_free_f CauseProtocol_free; asn_struct_print_f CauseProtocol_print; asn_constr_check_f CauseProtocol_constraint; ber_type_decoder_f CauseProtocol_decode_ber; der_type_encoder_f CauseProtocol_encode_der; xer_type_decoder_f CauseProtocol_decode_xer; xer_type_encoder_f CauseProtocol_encode_xer; oer_type_decoder_f CauseProtocol_decode_oer; oer_type_encoder_f CauseProtocol_encode_oer; per_type_decoder_f CauseProtocol_decode_uper; per_type_encoder_f CauseProtocol_encode_uper; per_type_decoder_f CauseProtocol_decode_aper; per_type_encoder_f CauseProtocol_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_CauseProtocol_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CauseRadioNetwork.c000066400000000000000000000124721333553357400222220ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CauseRadioNetwork.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_CauseRadioNetwork_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_CauseRadioNetwork_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 6, 6, 0, 35 } /* (0..35,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_CauseRadioNetwork_value2enum_1[] = { { 0, 11, "unspecified" }, { 1, 22, "tx2relocoverall-expiry" }, { 2, 19, "successful-handover" }, { 3, 38, "release-due-to-eutran-generated-reason" }, { 4, 18, "handover-cancelled" }, { 5, 16, "partial-handover" }, { 6, 45, "ho-failure-in-target-EPC-eNB-or-target-system" }, { 7, 21, "ho-target-not-allowed" }, { 8, 22, "tS1relocoverall-expiry" }, { 9, 19, "tS1relocprep-expiry" }, { 10, 18, "cell-not-available" }, { 11, 16, "unknown-targetID" }, { 12, 43, "no-radio-resources-available-in-target-cell" }, { 13, 22, "unknown-mme-ue-s1ap-id" }, { 14, 22, "unknown-enb-ue-s1ap-id" }, { 15, 23, "unknown-pair-ue-s1ap-id" }, { 16, 35, "handover-desirable-for-radio-reason" }, { 17, 22, "time-critical-handover" }, { 18, 30, "resource-optimisation-handover" }, { 19, 27, "reduce-load-in-serving-cell" }, { 20, 15, "user-inactivity" }, { 21, 29, "radio-connection-with-ue-lost" }, { 22, 27, "load-balancing-tau-required" }, { 23, 21, "cs-fallback-triggered" }, { 24, 31, "ue-not-available-for-ps-service" }, { 25, 29, "radio-resources-not-available" }, { 26, 36, "failure-in-radio-interface-procedure" }, { 27, 23, "invalid-qos-combination" }, { 28, 20, "interrat-redirection" }, { 29, 32, "interaction-with-other-procedure" }, { 30, 16, "unknown-E-RAB-ID" }, { 31, 27, "multiple-E-RAB-ID-instances" }, { 32, 63, "encryption-and-or-integrity-protection-algorithms-not-supported" }, { 33, 34, "s1-intra-system-handover-triggered" }, { 34, 34, "s1-inter-system-handover-triggered" }, { 35, 21, "x2-handover-triggered" }, { 36, 25, "redirection-towards-1xRTT" }, { 37, 23, "not-supported-QCI-value" }, { 38, 14, "invalid-CSG-Id" }, { 39, 26, "release-due-to-pre-emption" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_CauseRadioNetwork_enum2value_1[] = { 10, /* cell-not-available(10) */ 23, /* cs-fallback-triggered(23) */ 32, /* encryption-and-or-integrity-protection-algorithms-not-supported(32) */ 26, /* failure-in-radio-interface-procedure(26) */ 4, /* handover-cancelled(4) */ 16, /* handover-desirable-for-radio-reason(16) */ 6, /* ho-failure-in-target-EPC-eNB-or-target-system(6) */ 7, /* ho-target-not-allowed(7) */ 29, /* interaction-with-other-procedure(29) */ 28, /* interrat-redirection(28) */ 38, /* invalid-CSG-Id(38) */ 27, /* invalid-qos-combination(27) */ 22, /* load-balancing-tau-required(22) */ 31, /* multiple-E-RAB-ID-instances(31) */ 12, /* no-radio-resources-available-in-target-cell(12) */ 37, /* not-supported-QCI-value(37) */ 5, /* partial-handover(5) */ 21, /* radio-connection-with-ue-lost(21) */ 25, /* radio-resources-not-available(25) */ 36, /* redirection-towards-1xRTT(36) */ 19, /* reduce-load-in-serving-cell(19) */ 3, /* release-due-to-eutran-generated-reason(3) */ 39, /* release-due-to-pre-emption(39) */ 18, /* resource-optimisation-handover(18) */ 34, /* s1-inter-system-handover-triggered(34) */ 33, /* s1-intra-system-handover-triggered(33) */ 2, /* successful-handover(2) */ 8, /* tS1relocoverall-expiry(8) */ 9, /* tS1relocprep-expiry(9) */ 17, /* time-critical-handover(17) */ 1, /* tx2relocoverall-expiry(1) */ 24, /* ue-not-available-for-ps-service(24) */ 30, /* unknown-E-RAB-ID(30) */ 14, /* unknown-enb-ue-s1ap-id(14) */ 13, /* unknown-mme-ue-s1ap-id(13) */ 15, /* unknown-pair-ue-s1ap-id(15) */ 11, /* unknown-targetID(11) */ 0, /* unspecified(0) */ 20, /* user-inactivity(20) */ 35 /* x2-handover-triggered(35) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_CauseRadioNetwork_specs_1 = { asn_MAP_S1AP_CauseRadioNetwork_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_CauseRadioNetwork_enum2value_1, /* N => "tag"; sorted by N */ 40, /* Number of elements in the maps */ 37, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_CauseRadioNetwork_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_CauseRadioNetwork = { "CauseRadioNetwork", "CauseRadioNetwork", &asn_OP_NativeEnumerated, asn_DEF_S1AP_CauseRadioNetwork_tags_1, sizeof(asn_DEF_S1AP_CauseRadioNetwork_tags_1) /sizeof(asn_DEF_S1AP_CauseRadioNetwork_tags_1[0]), /* 1 */ asn_DEF_S1AP_CauseRadioNetwork_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CauseRadioNetwork_tags_1) /sizeof(asn_DEF_S1AP_CauseRadioNetwork_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_CauseRadioNetwork_constr_1, &asn_PER_type_S1AP_CauseRadioNetwork_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_CauseRadioNetwork_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CauseRadioNetwork.h000066400000000000000000000074021333553357400222240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CauseRadioNetwork_H_ #define _S1AP_CauseRadioNetwork_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_CauseRadioNetwork { S1AP_CauseRadioNetwork_unspecified = 0, S1AP_CauseRadioNetwork_tx2relocoverall_expiry = 1, S1AP_CauseRadioNetwork_successful_handover = 2, S1AP_CauseRadioNetwork_release_due_to_eutran_generated_reason = 3, S1AP_CauseRadioNetwork_handover_cancelled = 4, S1AP_CauseRadioNetwork_partial_handover = 5, S1AP_CauseRadioNetwork_ho_failure_in_target_EPC_eNB_or_target_system = 6, S1AP_CauseRadioNetwork_ho_target_not_allowed = 7, S1AP_CauseRadioNetwork_tS1relocoverall_expiry = 8, S1AP_CauseRadioNetwork_tS1relocprep_expiry = 9, S1AP_CauseRadioNetwork_cell_not_available = 10, S1AP_CauseRadioNetwork_unknown_targetID = 11, S1AP_CauseRadioNetwork_no_radio_resources_available_in_target_cell = 12, S1AP_CauseRadioNetwork_unknown_mme_ue_s1ap_id = 13, S1AP_CauseRadioNetwork_unknown_enb_ue_s1ap_id = 14, S1AP_CauseRadioNetwork_unknown_pair_ue_s1ap_id = 15, S1AP_CauseRadioNetwork_handover_desirable_for_radio_reason = 16, S1AP_CauseRadioNetwork_time_critical_handover = 17, S1AP_CauseRadioNetwork_resource_optimisation_handover = 18, S1AP_CauseRadioNetwork_reduce_load_in_serving_cell = 19, S1AP_CauseRadioNetwork_user_inactivity = 20, S1AP_CauseRadioNetwork_radio_connection_with_ue_lost = 21, S1AP_CauseRadioNetwork_load_balancing_tau_required = 22, S1AP_CauseRadioNetwork_cs_fallback_triggered = 23, S1AP_CauseRadioNetwork_ue_not_available_for_ps_service = 24, S1AP_CauseRadioNetwork_radio_resources_not_available = 25, S1AP_CauseRadioNetwork_failure_in_radio_interface_procedure = 26, S1AP_CauseRadioNetwork_invalid_qos_combination = 27, S1AP_CauseRadioNetwork_interrat_redirection = 28, S1AP_CauseRadioNetwork_interaction_with_other_procedure = 29, S1AP_CauseRadioNetwork_unknown_E_RAB_ID = 30, S1AP_CauseRadioNetwork_multiple_E_RAB_ID_instances = 31, S1AP_CauseRadioNetwork_encryption_and_or_integrity_protection_algorithms_not_supported = 32, S1AP_CauseRadioNetwork_s1_intra_system_handover_triggered = 33, S1AP_CauseRadioNetwork_s1_inter_system_handover_triggered = 34, S1AP_CauseRadioNetwork_x2_handover_triggered = 35, /* * Enumeration is extensible */ S1AP_CauseRadioNetwork_redirection_towards_1xRTT = 36, S1AP_CauseRadioNetwork_not_supported_QCI_value = 37, S1AP_CauseRadioNetwork_invalid_CSG_Id = 38, S1AP_CauseRadioNetwork_release_due_to_pre_emption = 39 } e_S1AP_CauseRadioNetwork; /* S1AP_CauseRadioNetwork */ typedef long S1AP_CauseRadioNetwork_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_CauseRadioNetwork_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CauseRadioNetwork; extern const asn_INTEGER_specifics_t asn_SPC_CauseRadioNetwork_specs_1; asn_struct_free_f CauseRadioNetwork_free; asn_struct_print_f CauseRadioNetwork_print; asn_constr_check_f CauseRadioNetwork_constraint; ber_type_decoder_f CauseRadioNetwork_decode_ber; der_type_encoder_f CauseRadioNetwork_encode_der; xer_type_decoder_f CauseRadioNetwork_decode_xer; xer_type_encoder_f CauseRadioNetwork_encode_xer; oer_type_decoder_f CauseRadioNetwork_decode_oer; oer_type_encoder_f CauseRadioNetwork_encode_oer; per_type_decoder_f CauseRadioNetwork_decode_uper; per_type_encoder_f CauseRadioNetwork_encode_uper; per_type_decoder_f CauseRadioNetwork_decode_aper; per_type_encoder_f CauseRadioNetwork_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_CauseRadioNetwork_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CauseTransport.c000066400000000000000000000041451333553357400216040ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CauseTransport.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_CauseTransport_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_CauseTransport_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_CauseTransport_value2enum_1[] = { { 0, 30, "transport-resource-unavailable" }, { 1, 11, "unspecified" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_CauseTransport_enum2value_1[] = { 0, /* transport-resource-unavailable(0) */ 1 /* unspecified(1) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_CauseTransport_specs_1 = { asn_MAP_S1AP_CauseTransport_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_CauseTransport_enum2value_1, /* N => "tag"; sorted by N */ 2, /* Number of elements in the maps */ 3, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_CauseTransport_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_CauseTransport = { "CauseTransport", "CauseTransport", &asn_OP_NativeEnumerated, asn_DEF_S1AP_CauseTransport_tags_1, sizeof(asn_DEF_S1AP_CauseTransport_tags_1) /sizeof(asn_DEF_S1AP_CauseTransport_tags_1[0]), /* 1 */ asn_DEF_S1AP_CauseTransport_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CauseTransport_tags_1) /sizeof(asn_DEF_S1AP_CauseTransport_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_CauseTransport_constr_1, &asn_PER_type_S1AP_CauseTransport_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_CauseTransport_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CauseTransport.h000066400000000000000000000031031333553357400216020ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CauseTransport_H_ #define _S1AP_CauseTransport_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_CauseTransport { S1AP_CauseTransport_transport_resource_unavailable = 0, S1AP_CauseTransport_unspecified = 1 /* * Enumeration is extensible */ } e_S1AP_CauseTransport; /* S1AP_CauseTransport */ typedef long S1AP_CauseTransport_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_CauseTransport_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CauseTransport; extern const asn_INTEGER_specifics_t asn_SPC_CauseTransport_specs_1; asn_struct_free_f CauseTransport_free; asn_struct_print_f CauseTransport_print; asn_constr_check_f CauseTransport_constraint; ber_type_decoder_f CauseTransport_decode_ber; der_type_encoder_f CauseTransport_encode_der; xer_type_decoder_f CauseTransport_decode_xer; xer_type_encoder_f CauseTransport_encode_xer; oer_type_decoder_f CauseTransport_decode_oer; oer_type_encoder_f CauseTransport_encode_oer; per_type_decoder_f CauseTransport_decode_uper; per_type_encoder_f CauseTransport_encode_uper; per_type_decoder_f CauseTransport_decode_aper; per_type_encoder_f CauseTransport_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_CauseTransport_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cdma2000HORequiredIndication.c000066400000000000000000000044601333553357400237270ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Cdma2000HORequiredIndication.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_Cdma2000HORequiredIndication_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_Cdma2000HORequiredIndication_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_Cdma2000HORequiredIndication_value2enum_1[] = { { 0, 4, "true" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_Cdma2000HORequiredIndication_enum2value_1[] = { 0 /* true(0) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_Cdma2000HORequiredIndication_specs_1 = { asn_MAP_S1AP_Cdma2000HORequiredIndication_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_Cdma2000HORequiredIndication_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_Cdma2000HORequiredIndication_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Cdma2000HORequiredIndication = { "Cdma2000HORequiredIndication", "Cdma2000HORequiredIndication", &asn_OP_NativeEnumerated, asn_DEF_S1AP_Cdma2000HORequiredIndication_tags_1, sizeof(asn_DEF_S1AP_Cdma2000HORequiredIndication_tags_1) /sizeof(asn_DEF_S1AP_Cdma2000HORequiredIndication_tags_1[0]), /* 1 */ asn_DEF_S1AP_Cdma2000HORequiredIndication_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Cdma2000HORequiredIndication_tags_1) /sizeof(asn_DEF_S1AP_Cdma2000HORequiredIndication_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_Cdma2000HORequiredIndication_constr_1, &asn_PER_type_S1AP_Cdma2000HORequiredIndication_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_Cdma2000HORequiredIndication_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cdma2000HORequiredIndication.h000066400000000000000000000033531333553357400237340ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Cdma2000HORequiredIndication_H_ #define _S1AP_Cdma2000HORequiredIndication_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_Cdma2000HORequiredIndication { S1AP_Cdma2000HORequiredIndication_true = 0 /* * Enumeration is extensible */ } e_S1AP_Cdma2000HORequiredIndication; /* S1AP_Cdma2000HORequiredIndication */ typedef long S1AP_Cdma2000HORequiredIndication_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Cdma2000HORequiredIndication; asn_struct_free_f S1AP_Cdma2000HORequiredIndication_free; asn_struct_print_f S1AP_Cdma2000HORequiredIndication_print; asn_constr_check_f S1AP_Cdma2000HORequiredIndication_constraint; ber_type_decoder_f S1AP_Cdma2000HORequiredIndication_decode_ber; der_type_encoder_f S1AP_Cdma2000HORequiredIndication_encode_der; xer_type_decoder_f S1AP_Cdma2000HORequiredIndication_decode_xer; xer_type_encoder_f S1AP_Cdma2000HORequiredIndication_encode_xer; oer_type_decoder_f S1AP_Cdma2000HORequiredIndication_decode_oer; oer_type_encoder_f S1AP_Cdma2000HORequiredIndication_encode_oer; per_type_decoder_f S1AP_Cdma2000HORequiredIndication_decode_uper; per_type_encoder_f S1AP_Cdma2000HORequiredIndication_encode_uper; per_type_decoder_f S1AP_Cdma2000HORequiredIndication_decode_aper; per_type_encoder_f S1AP_Cdma2000HORequiredIndication_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Cdma2000HORequiredIndication_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cdma2000HOStatus.c000066400000000000000000000041551333553357400214310ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Cdma2000HOStatus.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_Cdma2000HOStatus_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_Cdma2000HOStatus_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_Cdma2000HOStatus_value2enum_1[] = { { 0, 9, "hOSuccess" }, { 1, 9, "hOFailure" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_Cdma2000HOStatus_enum2value_1[] = { 1, /* hOFailure(1) */ 0 /* hOSuccess(0) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_Cdma2000HOStatus_specs_1 = { asn_MAP_S1AP_Cdma2000HOStatus_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_Cdma2000HOStatus_enum2value_1, /* N => "tag"; sorted by N */ 2, /* Number of elements in the maps */ 3, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_Cdma2000HOStatus_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Cdma2000HOStatus = { "Cdma2000HOStatus", "Cdma2000HOStatus", &asn_OP_NativeEnumerated, asn_DEF_S1AP_Cdma2000HOStatus_tags_1, sizeof(asn_DEF_S1AP_Cdma2000HOStatus_tags_1) /sizeof(asn_DEF_S1AP_Cdma2000HOStatus_tags_1[0]), /* 1 */ asn_DEF_S1AP_Cdma2000HOStatus_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Cdma2000HOStatus_tags_1) /sizeof(asn_DEF_S1AP_Cdma2000HOStatus_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_Cdma2000HOStatus_constr_1, &asn_PER_type_S1AP_Cdma2000HOStatus_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_Cdma2000HOStatus_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cdma2000HOStatus.h000066400000000000000000000030161333553357400214310ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Cdma2000HOStatus_H_ #define _S1AP_Cdma2000HOStatus_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_Cdma2000HOStatus { S1AP_Cdma2000HOStatus_hOSuccess = 0, S1AP_Cdma2000HOStatus_hOFailure = 1 /* * Enumeration is extensible */ } e_S1AP_Cdma2000HOStatus; /* S1AP_Cdma2000HOStatus */ typedef long S1AP_Cdma2000HOStatus_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Cdma2000HOStatus; asn_struct_free_f S1AP_Cdma2000HOStatus_free; asn_struct_print_f S1AP_Cdma2000HOStatus_print; asn_constr_check_f S1AP_Cdma2000HOStatus_constraint; ber_type_decoder_f S1AP_Cdma2000HOStatus_decode_ber; der_type_encoder_f S1AP_Cdma2000HOStatus_encode_der; xer_type_decoder_f S1AP_Cdma2000HOStatus_decode_xer; xer_type_encoder_f S1AP_Cdma2000HOStatus_encode_xer; oer_type_decoder_f S1AP_Cdma2000HOStatus_decode_oer; oer_type_encoder_f S1AP_Cdma2000HOStatus_encode_oer; per_type_decoder_f S1AP_Cdma2000HOStatus_decode_uper; per_type_encoder_f S1AP_Cdma2000HOStatus_encode_uper; per_type_decoder_f S1AP_Cdma2000HOStatus_decode_aper; per_type_encoder_f S1AP_Cdma2000HOStatus_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Cdma2000HOStatus_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cdma2000OneXMEID.c000066400000000000000000000017611333553357400212270ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Cdma2000OneXMEID.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_Cdma2000OneXMEID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Cdma2000OneXMEID = { "Cdma2000OneXMEID", "Cdma2000OneXMEID", &asn_OP_OCTET_STRING, asn_DEF_S1AP_Cdma2000OneXMEID_tags_1, sizeof(asn_DEF_S1AP_Cdma2000OneXMEID_tags_1) /sizeof(asn_DEF_S1AP_Cdma2000OneXMEID_tags_1[0]), /* 1 */ asn_DEF_S1AP_Cdma2000OneXMEID_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Cdma2000OneXMEID_tags_1) /sizeof(asn_DEF_S1AP_Cdma2000OneXMEID_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cdma2000OneXMEID.h000066400000000000000000000025161333553357400212330ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Cdma2000OneXMEID_H_ #define _S1AP_Cdma2000OneXMEID_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_Cdma2000OneXMEID */ typedef OCTET_STRING_t S1AP_Cdma2000OneXMEID_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Cdma2000OneXMEID; asn_struct_free_f S1AP_Cdma2000OneXMEID_free; asn_struct_print_f S1AP_Cdma2000OneXMEID_print; asn_constr_check_f S1AP_Cdma2000OneXMEID_constraint; ber_type_decoder_f S1AP_Cdma2000OneXMEID_decode_ber; der_type_encoder_f S1AP_Cdma2000OneXMEID_encode_der; xer_type_decoder_f S1AP_Cdma2000OneXMEID_decode_xer; xer_type_encoder_f S1AP_Cdma2000OneXMEID_encode_xer; oer_type_decoder_f S1AP_Cdma2000OneXMEID_decode_oer; oer_type_encoder_f S1AP_Cdma2000OneXMEID_encode_oer; per_type_decoder_f S1AP_Cdma2000OneXMEID_decode_uper; per_type_encoder_f S1AP_Cdma2000OneXMEID_encode_uper; per_type_decoder_f S1AP_Cdma2000OneXMEID_decode_aper; per_type_encoder_f S1AP_Cdma2000OneXMEID_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Cdma2000OneXMEID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cdma2000OneXMSI.c000066400000000000000000000017461333553357400211440ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Cdma2000OneXMSI.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_Cdma2000OneXMSI_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Cdma2000OneXMSI = { "Cdma2000OneXMSI", "Cdma2000OneXMSI", &asn_OP_OCTET_STRING, asn_DEF_S1AP_Cdma2000OneXMSI_tags_1, sizeof(asn_DEF_S1AP_Cdma2000OneXMSI_tags_1) /sizeof(asn_DEF_S1AP_Cdma2000OneXMSI_tags_1[0]), /* 1 */ asn_DEF_S1AP_Cdma2000OneXMSI_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Cdma2000OneXMSI_tags_1) /sizeof(asn_DEF_S1AP_Cdma2000OneXMSI_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cdma2000OneXMSI.h000066400000000000000000000024731333553357400211470ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Cdma2000OneXMSI_H_ #define _S1AP_Cdma2000OneXMSI_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_Cdma2000OneXMSI */ typedef OCTET_STRING_t S1AP_Cdma2000OneXMSI_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Cdma2000OneXMSI; asn_struct_free_f S1AP_Cdma2000OneXMSI_free; asn_struct_print_f S1AP_Cdma2000OneXMSI_print; asn_constr_check_f S1AP_Cdma2000OneXMSI_constraint; ber_type_decoder_f S1AP_Cdma2000OneXMSI_decode_ber; der_type_encoder_f S1AP_Cdma2000OneXMSI_encode_der; xer_type_decoder_f S1AP_Cdma2000OneXMSI_decode_xer; xer_type_encoder_f S1AP_Cdma2000OneXMSI_encode_xer; oer_type_decoder_f S1AP_Cdma2000OneXMSI_decode_oer; oer_type_encoder_f S1AP_Cdma2000OneXMSI_encode_oer; per_type_decoder_f S1AP_Cdma2000OneXMSI_decode_uper; per_type_encoder_f S1AP_Cdma2000OneXMSI_encode_uper; per_type_decoder_f S1AP_Cdma2000OneXMSI_decode_aper; per_type_encoder_f S1AP_Cdma2000OneXMSI_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Cdma2000OneXMSI_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cdma2000OneXPilot.c000066400000000000000000000017741333553357400216040ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Cdma2000OneXPilot.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_Cdma2000OneXPilot_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Cdma2000OneXPilot = { "Cdma2000OneXPilot", "Cdma2000OneXPilot", &asn_OP_OCTET_STRING, asn_DEF_S1AP_Cdma2000OneXPilot_tags_1, sizeof(asn_DEF_S1AP_Cdma2000OneXPilot_tags_1) /sizeof(asn_DEF_S1AP_Cdma2000OneXPilot_tags_1[0]), /* 1 */ asn_DEF_S1AP_Cdma2000OneXPilot_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Cdma2000OneXPilot_tags_1) /sizeof(asn_DEF_S1AP_Cdma2000OneXPilot_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cdma2000OneXPilot.h000066400000000000000000000025411333553357400216020ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Cdma2000OneXPilot_H_ #define _S1AP_Cdma2000OneXPilot_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_Cdma2000OneXPilot */ typedef OCTET_STRING_t S1AP_Cdma2000OneXPilot_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Cdma2000OneXPilot; asn_struct_free_f S1AP_Cdma2000OneXPilot_free; asn_struct_print_f S1AP_Cdma2000OneXPilot_print; asn_constr_check_f S1AP_Cdma2000OneXPilot_constraint; ber_type_decoder_f S1AP_Cdma2000OneXPilot_decode_ber; der_type_encoder_f S1AP_Cdma2000OneXPilot_encode_der; xer_type_decoder_f S1AP_Cdma2000OneXPilot_decode_xer; xer_type_encoder_f S1AP_Cdma2000OneXPilot_encode_xer; oer_type_decoder_f S1AP_Cdma2000OneXPilot_decode_oer; oer_type_encoder_f S1AP_Cdma2000OneXPilot_encode_oer; per_type_decoder_f S1AP_Cdma2000OneXPilot_decode_uper; per_type_encoder_f S1AP_Cdma2000OneXPilot_encode_uper; per_type_decoder_f S1AP_Cdma2000OneXPilot_decode_aper; per_type_encoder_f S1AP_Cdma2000OneXPilot_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Cdma2000OneXPilot_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cdma2000OneXRAND.c000066400000000000000000000017611333553357400212350ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Cdma2000OneXRAND.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_Cdma2000OneXRAND_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Cdma2000OneXRAND = { "Cdma2000OneXRAND", "Cdma2000OneXRAND", &asn_OP_OCTET_STRING, asn_DEF_S1AP_Cdma2000OneXRAND_tags_1, sizeof(asn_DEF_S1AP_Cdma2000OneXRAND_tags_1) /sizeof(asn_DEF_S1AP_Cdma2000OneXRAND_tags_1[0]), /* 1 */ asn_DEF_S1AP_Cdma2000OneXRAND_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Cdma2000OneXRAND_tags_1) /sizeof(asn_DEF_S1AP_Cdma2000OneXRAND_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cdma2000OneXRAND.h000066400000000000000000000025161333553357400212410ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Cdma2000OneXRAND_H_ #define _S1AP_Cdma2000OneXRAND_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_Cdma2000OneXRAND */ typedef OCTET_STRING_t S1AP_Cdma2000OneXRAND_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Cdma2000OneXRAND; asn_struct_free_f S1AP_Cdma2000OneXRAND_free; asn_struct_print_f S1AP_Cdma2000OneXRAND_print; asn_constr_check_f S1AP_Cdma2000OneXRAND_constraint; ber_type_decoder_f S1AP_Cdma2000OneXRAND_decode_ber; der_type_encoder_f S1AP_Cdma2000OneXRAND_encode_der; xer_type_decoder_f S1AP_Cdma2000OneXRAND_decode_xer; xer_type_encoder_f S1AP_Cdma2000OneXRAND_encode_xer; oer_type_decoder_f S1AP_Cdma2000OneXRAND_decode_oer; oer_type_encoder_f S1AP_Cdma2000OneXRAND_encode_oer; per_type_decoder_f S1AP_Cdma2000OneXRAND_decode_uper; per_type_encoder_f S1AP_Cdma2000OneXRAND_encode_uper; per_type_decoder_f S1AP_Cdma2000OneXRAND_decode_aper; per_type_encoder_f S1AP_Cdma2000OneXRAND_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Cdma2000OneXRAND_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cdma2000OneXSRVCCInfo.c000066400000000000000000000060151333553357400222020ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Cdma2000OneXSRVCCInfo.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_Cdma2000OneXSRVCCInfo_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_Cdma2000OneXSRVCCInfo, cdma2000OneXMEID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Cdma2000OneXMEID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cdma2000OneXMEID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_Cdma2000OneXSRVCCInfo, cdma2000OneXMSI), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Cdma2000OneXMSI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cdma2000OneXMSI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_Cdma2000OneXSRVCCInfo, cdma2000OneXPilot), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Cdma2000OneXPilot, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cdma2000OneXPilot" }, { ATF_POINTER, 1, offsetof(struct S1AP_Cdma2000OneXSRVCCInfo, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P32, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_Cdma2000OneXSRVCCInfo_oms_1[] = { 3 }; static const ber_tlv_tag_t asn_DEF_S1AP_Cdma2000OneXSRVCCInfo_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_Cdma2000OneXSRVCCInfo_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* cdma2000OneXMEID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* cdma2000OneXMSI */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* cdma2000OneXPilot */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_Cdma2000OneXSRVCCInfo_specs_1 = { sizeof(struct S1AP_Cdma2000OneXSRVCCInfo), offsetof(struct S1AP_Cdma2000OneXSRVCCInfo, _asn_ctx), asn_MAP_S1AP_Cdma2000OneXSRVCCInfo_tag2el_1, 4, /* Count of tags in the map */ asn_MAP_S1AP_Cdma2000OneXSRVCCInfo_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_Cdma2000OneXSRVCCInfo = { "Cdma2000OneXSRVCCInfo", "Cdma2000OneXSRVCCInfo", &asn_OP_SEQUENCE, asn_DEF_S1AP_Cdma2000OneXSRVCCInfo_tags_1, sizeof(asn_DEF_S1AP_Cdma2000OneXSRVCCInfo_tags_1) /sizeof(asn_DEF_S1AP_Cdma2000OneXSRVCCInfo_tags_1[0]), /* 1 */ asn_DEF_S1AP_Cdma2000OneXSRVCCInfo_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Cdma2000OneXSRVCCInfo_tags_1) /sizeof(asn_DEF_S1AP_Cdma2000OneXSRVCCInfo_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_Cdma2000OneXSRVCCInfo_1, 4, /* Elements count */ &asn_SPC_S1AP_Cdma2000OneXSRVCCInfo_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cdma2000OneXSRVCCInfo.h000066400000000000000000000023571333553357400222140ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Cdma2000OneXSRVCCInfo_H_ #define _S1AP_Cdma2000OneXSRVCCInfo_H_ #include /* Including external dependencies */ #include "S1AP_Cdma2000OneXMEID.h" #include "S1AP_Cdma2000OneXMSI.h" #include "S1AP_Cdma2000OneXPilot.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_Cdma2000OneXSRVCCInfo */ typedef struct S1AP_Cdma2000OneXSRVCCInfo { S1AP_Cdma2000OneXMEID_t cdma2000OneXMEID; S1AP_Cdma2000OneXMSI_t cdma2000OneXMSI; S1AP_Cdma2000OneXPilot_t cdma2000OneXPilot; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_Cdma2000OneXSRVCCInfo_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Cdma2000OneXSRVCCInfo; #ifdef __cplusplus } #endif #endif /* _S1AP_Cdma2000OneXSRVCCInfo_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cdma2000PDU.c000066400000000000000000000016721333553357400203500ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Cdma2000PDU.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_Cdma2000PDU_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Cdma2000PDU = { "Cdma2000PDU", "Cdma2000PDU", &asn_OP_OCTET_STRING, asn_DEF_S1AP_Cdma2000PDU_tags_1, sizeof(asn_DEF_S1AP_Cdma2000PDU_tags_1) /sizeof(asn_DEF_S1AP_Cdma2000PDU_tags_1[0]), /* 1 */ asn_DEF_S1AP_Cdma2000PDU_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Cdma2000PDU_tags_1) /sizeof(asn_DEF_S1AP_Cdma2000PDU_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cdma2000PDU.h000066400000000000000000000023571333553357400203560ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Cdma2000PDU_H_ #define _S1AP_Cdma2000PDU_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_Cdma2000PDU */ typedef OCTET_STRING_t S1AP_Cdma2000PDU_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Cdma2000PDU; asn_struct_free_f S1AP_Cdma2000PDU_free; asn_struct_print_f S1AP_Cdma2000PDU_print; asn_constr_check_f S1AP_Cdma2000PDU_constraint; ber_type_decoder_f S1AP_Cdma2000PDU_decode_ber; der_type_encoder_f S1AP_Cdma2000PDU_encode_der; xer_type_decoder_f S1AP_Cdma2000PDU_decode_xer; xer_type_encoder_f S1AP_Cdma2000PDU_encode_xer; oer_type_decoder_f S1AP_Cdma2000PDU_decode_oer; oer_type_encoder_f S1AP_Cdma2000PDU_encode_oer; per_type_decoder_f S1AP_Cdma2000PDU_decode_uper; per_type_encoder_f S1AP_Cdma2000PDU_encode_uper; per_type_decoder_f S1AP_Cdma2000PDU_decode_aper; per_type_encoder_f S1AP_Cdma2000PDU_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Cdma2000PDU_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cdma2000RATType.c000066400000000000000000000041121333553357400212000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Cdma2000RATType.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_Cdma2000RATType_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_Cdma2000RATType_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_Cdma2000RATType_value2enum_1[] = { { 0, 4, "hRPD" }, { 1, 7, "onexRTT" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_Cdma2000RATType_enum2value_1[] = { 0, /* hRPD(0) */ 1 /* onexRTT(1) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_Cdma2000RATType_specs_1 = { asn_MAP_S1AP_Cdma2000RATType_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_Cdma2000RATType_enum2value_1, /* N => "tag"; sorted by N */ 2, /* Number of elements in the maps */ 3, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_Cdma2000RATType_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Cdma2000RATType = { "Cdma2000RATType", "Cdma2000RATType", &asn_OP_NativeEnumerated, asn_DEF_S1AP_Cdma2000RATType_tags_1, sizeof(asn_DEF_S1AP_Cdma2000RATType_tags_1) /sizeof(asn_DEF_S1AP_Cdma2000RATType_tags_1[0]), /* 1 */ asn_DEF_S1AP_Cdma2000RATType_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Cdma2000RATType_tags_1) /sizeof(asn_DEF_S1AP_Cdma2000RATType_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_Cdma2000RATType_constr_1, &asn_PER_type_S1AP_Cdma2000RATType_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_Cdma2000RATType_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cdma2000RATType.h000066400000000000000000000027601333553357400212140ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Cdma2000RATType_H_ #define _S1AP_Cdma2000RATType_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_Cdma2000RATType { S1AP_Cdma2000RATType_hRPD = 0, S1AP_Cdma2000RATType_onexRTT = 1 /* * Enumeration is extensible */ } e_S1AP_Cdma2000RATType; /* S1AP_Cdma2000RATType */ typedef long S1AP_Cdma2000RATType_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Cdma2000RATType; asn_struct_free_f S1AP_Cdma2000RATType_free; asn_struct_print_f S1AP_Cdma2000RATType_print; asn_constr_check_f S1AP_Cdma2000RATType_constraint; ber_type_decoder_f S1AP_Cdma2000RATType_decode_ber; der_type_encoder_f S1AP_Cdma2000RATType_encode_der; xer_type_decoder_f S1AP_Cdma2000RATType_decode_xer; xer_type_encoder_f S1AP_Cdma2000RATType_encode_xer; oer_type_decoder_f S1AP_Cdma2000RATType_decode_oer; oer_type_encoder_f S1AP_Cdma2000RATType_encode_oer; per_type_decoder_f S1AP_Cdma2000RATType_decode_uper; per_type_encoder_f S1AP_Cdma2000RATType_encode_uper; per_type_decoder_f S1AP_Cdma2000RATType_decode_aper; per_type_encoder_f S1AP_Cdma2000RATType_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Cdma2000RATType_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cdma2000SectorID.c000066400000000000000000000017611333553357400213730ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Cdma2000SectorID.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_Cdma2000SectorID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Cdma2000SectorID = { "Cdma2000SectorID", "Cdma2000SectorID", &asn_OP_OCTET_STRING, asn_DEF_S1AP_Cdma2000SectorID_tags_1, sizeof(asn_DEF_S1AP_Cdma2000SectorID_tags_1) /sizeof(asn_DEF_S1AP_Cdma2000SectorID_tags_1[0]), /* 1 */ asn_DEF_S1AP_Cdma2000SectorID_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Cdma2000SectorID_tags_1) /sizeof(asn_DEF_S1AP_Cdma2000SectorID_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cdma2000SectorID.h000066400000000000000000000025161333553357400213770ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Cdma2000SectorID_H_ #define _S1AP_Cdma2000SectorID_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_Cdma2000SectorID */ typedef OCTET_STRING_t S1AP_Cdma2000SectorID_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Cdma2000SectorID; asn_struct_free_f S1AP_Cdma2000SectorID_free; asn_struct_print_f S1AP_Cdma2000SectorID_print; asn_constr_check_f S1AP_Cdma2000SectorID_constraint; ber_type_decoder_f S1AP_Cdma2000SectorID_decode_ber; der_type_encoder_f S1AP_Cdma2000SectorID_encode_der; xer_type_decoder_f S1AP_Cdma2000SectorID_decode_xer; xer_type_encoder_f S1AP_Cdma2000SectorID_encode_xer; oer_type_decoder_f S1AP_Cdma2000SectorID_decode_oer; oer_type_encoder_f S1AP_Cdma2000SectorID_encode_oer; per_type_decoder_f S1AP_Cdma2000SectorID_decode_uper; per_type_encoder_f S1AP_Cdma2000SectorID_encode_uper; per_type_decoder_f S1AP_Cdma2000SectorID_decode_aper; per_type_encoder_f S1AP_Cdma2000SectorID_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Cdma2000SectorID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cell-Size.c000066400000000000000000000040241333553357400204120ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Cell-Size.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_Cell_Size_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_Cell_Size_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_Cell_Size_value2enum_1[] = { { 0, 9, "verysmall" }, { 1, 5, "small" }, { 2, 6, "medium" }, { 3, 5, "large" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_Cell_Size_enum2value_1[] = { 3, /* large(3) */ 2, /* medium(2) */ 1, /* small(1) */ 0 /* verysmall(0) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_Cell_Size_specs_1 = { asn_MAP_S1AP_Cell_Size_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_Cell_Size_enum2value_1, /* N => "tag"; sorted by N */ 4, /* Number of elements in the maps */ 5, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_Cell_Size_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Cell_Size = { "Cell-Size", "Cell-Size", &asn_OP_NativeEnumerated, asn_DEF_S1AP_Cell_Size_tags_1, sizeof(asn_DEF_S1AP_Cell_Size_tags_1) /sizeof(asn_DEF_S1AP_Cell_Size_tags_1[0]), /* 1 */ asn_DEF_S1AP_Cell_Size_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Cell_Size_tags_1) /sizeof(asn_DEF_S1AP_Cell_Size_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_Cell_Size_constr_1, &asn_PER_type_S1AP_Cell_Size_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_Cell_Size_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Cell-Size.h000066400000000000000000000027421333553357400204240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Cell_Size_H_ #define _S1AP_Cell_Size_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_Cell_Size { S1AP_Cell_Size_verysmall = 0, S1AP_Cell_Size_small = 1, S1AP_Cell_Size_medium = 2, S1AP_Cell_Size_large = 3 /* * Enumeration is extensible */ } e_S1AP_Cell_Size; /* S1AP_Cell-Size */ typedef long S1AP_Cell_Size_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_Cell_Size_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_Cell_Size; extern const asn_INTEGER_specifics_t asn_SPC_Cell_Size_specs_1; asn_struct_free_f Cell_Size_free; asn_struct_print_f Cell_Size_print; asn_constr_check_f Cell_Size_constraint; ber_type_decoder_f Cell_Size_decode_ber; der_type_encoder_f Cell_Size_encode_der; xer_type_decoder_f Cell_Size_decode_xer; xer_type_encoder_f Cell_Size_encode_xer; oer_type_decoder_f Cell_Size_decode_oer; oer_type_encoder_f Cell_Size_encode_oer; per_type_decoder_f Cell_Size_decode_uper; per_type_encoder_f Cell_Size_encode_uper; per_type_decoder_f Cell_Size_decode_aper; per_type_encoder_f Cell_Size_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Cell_Size_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CellAccessMode.c000066400000000000000000000040001333553357400214230ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CellAccessMode.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_CellAccessMode_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_CellAccessMode_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_CellAccessMode_value2enum_1[] = { { 0, 6, "hybrid" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_CellAccessMode_enum2value_1[] = { 0 /* hybrid(0) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_CellAccessMode_specs_1 = { asn_MAP_S1AP_CellAccessMode_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_CellAccessMode_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_CellAccessMode_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_CellAccessMode = { "CellAccessMode", "CellAccessMode", &asn_OP_NativeEnumerated, asn_DEF_S1AP_CellAccessMode_tags_1, sizeof(asn_DEF_S1AP_CellAccessMode_tags_1) /sizeof(asn_DEF_S1AP_CellAccessMode_tags_1[0]), /* 1 */ asn_DEF_S1AP_CellAccessMode_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CellAccessMode_tags_1) /sizeof(asn_DEF_S1AP_CellAccessMode_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_CellAccessMode_constr_1, &asn_PER_type_S1AP_CellAccessMode_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_CellAccessMode_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CellAccessMode.h000066400000000000000000000030051333553357400214340ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CellAccessMode_H_ #define _S1AP_CellAccessMode_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_CellAccessMode { S1AP_CellAccessMode_hybrid = 0 /* * Enumeration is extensible */ } e_S1AP_CellAccessMode; /* S1AP_CellAccessMode */ typedef long S1AP_CellAccessMode_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_CellAccessMode_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CellAccessMode; extern const asn_INTEGER_specifics_t asn_SPC_CellAccessMode_specs_1; asn_struct_free_f CellAccessMode_free; asn_struct_print_f CellAccessMode_print; asn_constr_check_f CellAccessMode_constraint; ber_type_decoder_f CellAccessMode_decode_ber; der_type_encoder_f CellAccessMode_encode_der; xer_type_decoder_f CellAccessMode_decode_xer; xer_type_encoder_f CellAccessMode_encode_xer; oer_type_decoder_f CellAccessMode_decode_oer; oer_type_encoder_f CellAccessMode_encode_oer; per_type_decoder_f CellAccessMode_decode_uper; per_type_encoder_f CellAccessMode_encode_uper; per_type_decoder_f CellAccessMode_decode_aper; per_type_encoder_f CellAccessMode_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_CellAccessMode_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CellBasedMDT.c000066400000000000000000000041661333553357400210150ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CellBasedMDT.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_CellBasedMDT_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellBasedMDT, cellIdListforMDT), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CellIdListforMDT, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cellIdListforMDT" }, { ATF_POINTER, 1, offsetof(struct S1AP_CellBasedMDT, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P31, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_CellBasedMDT_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_CellBasedMDT_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CellBasedMDT_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* cellIdListforMDT */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellBasedMDT_specs_1 = { sizeof(struct S1AP_CellBasedMDT), offsetof(struct S1AP_CellBasedMDT, _asn_ctx), asn_MAP_S1AP_CellBasedMDT_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_CellBasedMDT_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CellBasedMDT = { "CellBasedMDT", "CellBasedMDT", &asn_OP_SEQUENCE, asn_DEF_S1AP_CellBasedMDT_tags_1, sizeof(asn_DEF_S1AP_CellBasedMDT_tags_1) /sizeof(asn_DEF_S1AP_CellBasedMDT_tags_1[0]), /* 1 */ asn_DEF_S1AP_CellBasedMDT_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CellBasedMDT_tags_1) /sizeof(asn_DEF_S1AP_CellBasedMDT_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CellBasedMDT_1, 2, /* Elements count */ &asn_SPC_S1AP_CellBasedMDT_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CellBasedMDT.h000066400000000000000000000022161333553357400210140ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CellBasedMDT_H_ #define _S1AP_CellBasedMDT_H_ #include /* Including external dependencies */ #include "S1AP_CellIdListforMDT.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_CellBasedMDT */ typedef struct S1AP_CellBasedMDT { S1AP_CellIdListforMDT_t cellIdListforMDT; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CellBasedMDT_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CellBasedMDT; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellBasedMDT_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_CellBasedMDT_1[2]; #ifdef __cplusplus } #endif #endif /* _S1AP_CellBasedMDT_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CellID-Broadcast-Item.c000066400000000000000000000044331333553357400225170ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CellID-Broadcast-Item.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_CellID_Broadcast_Item_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellID_Broadcast_Item, eCGI), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_EUTRAN_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "eCGI" }, { ATF_POINTER, 1, offsetof(struct S1AP_CellID_Broadcast_Item, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P29, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_CellID_Broadcast_Item_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_CellID_Broadcast_Item_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CellID_Broadcast_Item_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eCGI */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellID_Broadcast_Item_specs_1 = { sizeof(struct S1AP_CellID_Broadcast_Item), offsetof(struct S1AP_CellID_Broadcast_Item, _asn_ctx), asn_MAP_S1AP_CellID_Broadcast_Item_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_CellID_Broadcast_Item_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CellID_Broadcast_Item = { "CellID-Broadcast-Item", "CellID-Broadcast-Item", &asn_OP_SEQUENCE, asn_DEF_S1AP_CellID_Broadcast_Item_tags_1, sizeof(asn_DEF_S1AP_CellID_Broadcast_Item_tags_1) /sizeof(asn_DEF_S1AP_CellID_Broadcast_Item_tags_1[0]), /* 1 */ asn_DEF_S1AP_CellID_Broadcast_Item_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CellID_Broadcast_Item_tags_1) /sizeof(asn_DEF_S1AP_CellID_Broadcast_Item_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CellID_Broadcast_Item_1, 2, /* Elements count */ &asn_SPC_S1AP_CellID_Broadcast_Item_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CellID-Broadcast-Item.h000066400000000000000000000023071333553357400225220ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CellID_Broadcast_Item_H_ #define _S1AP_CellID_Broadcast_Item_H_ #include /* Including external dependencies */ #include "S1AP_EUTRAN-CGI.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_CellID-Broadcast-Item */ typedef struct S1AP_CellID_Broadcast_Item { S1AP_EUTRAN_CGI_t eCGI; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CellID_Broadcast_Item_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CellID_Broadcast_Item; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellID_Broadcast_Item_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_CellID_Broadcast_Item_1[2]; #ifdef __cplusplus } #endif #endif /* _S1AP_CellID_Broadcast_Item_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CellID-Broadcast.c000066400000000000000000000035071333553357400216240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CellID-Broadcast.h" #include "S1AP_CellID-Broadcast-Item.h" static asn_oer_constraints_t asn_OER_type_S1AP_CellID_Broadcast_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_CellID_Broadcast_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_CellID_Broadcast_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CellID_Broadcast_Item, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CellID_Broadcast_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_CellID_Broadcast_specs_1 = { sizeof(struct S1AP_CellID_Broadcast), offsetof(struct S1AP_CellID_Broadcast, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CellID_Broadcast = { "CellID-Broadcast", "CellID-Broadcast", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_CellID_Broadcast_tags_1, sizeof(asn_DEF_S1AP_CellID_Broadcast_tags_1) /sizeof(asn_DEF_S1AP_CellID_Broadcast_tags_1[0]), /* 1 */ asn_DEF_S1AP_CellID_Broadcast_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CellID_Broadcast_tags_1) /sizeof(asn_DEF_S1AP_CellID_Broadcast_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_CellID_Broadcast_constr_1, &asn_PER_type_S1AP_CellID_Broadcast_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_CellID_Broadcast_1, 1, /* Single element */ &asn_SPC_S1AP_CellID_Broadcast_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CellID-Broadcast.h000066400000000000000000000021561333553357400216300ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CellID_Broadcast_H_ #define _S1AP_CellID_Broadcast_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_CellID_Broadcast_Item; /* S1AP_CellID-Broadcast */ typedef struct S1AP_CellID_Broadcast { A_SEQUENCE_OF(struct S1AP_CellID_Broadcast_Item) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CellID_Broadcast_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CellID_Broadcast; extern asn_SET_OF_specifics_t asn_SPC_S1AP_CellID_Broadcast_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_CellID_Broadcast_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_CellID_Broadcast_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_CellID_Broadcast_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CellID-Cancelled-Item.c000066400000000000000000000052001333553357400224600ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CellID-Cancelled-Item.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_CellID_Cancelled_Item_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellID_Cancelled_Item, eCGI), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_EUTRAN_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "eCGI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellID_Cancelled_Item, numberOfBroadcasts), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_NumberOfBroadcasts, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "numberOfBroadcasts" }, { ATF_POINTER, 1, offsetof(struct S1AP_CellID_Cancelled_Item, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P30, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_CellID_Cancelled_Item_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_CellID_Cancelled_Item_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CellID_Cancelled_Item_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eCGI */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* numberOfBroadcasts */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellID_Cancelled_Item_specs_1 = { sizeof(struct S1AP_CellID_Cancelled_Item), offsetof(struct S1AP_CellID_Cancelled_Item, _asn_ctx), asn_MAP_S1AP_CellID_Cancelled_Item_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_CellID_Cancelled_Item_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CellID_Cancelled_Item = { "CellID-Cancelled-Item", "CellID-Cancelled-Item", &asn_OP_SEQUENCE, asn_DEF_S1AP_CellID_Cancelled_Item_tags_1, sizeof(asn_DEF_S1AP_CellID_Cancelled_Item_tags_1) /sizeof(asn_DEF_S1AP_CellID_Cancelled_Item_tags_1[0]), /* 1 */ asn_DEF_S1AP_CellID_Cancelled_Item_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CellID_Cancelled_Item_tags_1) /sizeof(asn_DEF_S1AP_CellID_Cancelled_Item_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CellID_Cancelled_Item_1, 3, /* Elements count */ &asn_SPC_S1AP_CellID_Cancelled_Item_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CellID-Cancelled-Item.h000066400000000000000000000024341333553357400224730ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CellID_Cancelled_Item_H_ #define _S1AP_CellID_Cancelled_Item_H_ #include /* Including external dependencies */ #include "S1AP_EUTRAN-CGI.h" #include "S1AP_NumberOfBroadcasts.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_CellID-Cancelled-Item */ typedef struct S1AP_CellID_Cancelled_Item { S1AP_EUTRAN_CGI_t eCGI; S1AP_NumberOfBroadcasts_t numberOfBroadcasts; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CellID_Cancelled_Item_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CellID_Cancelled_Item; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellID_Cancelled_Item_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_CellID_Cancelled_Item_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_CellID_Cancelled_Item_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CellID-Cancelled.c000066400000000000000000000035071333553357400215740ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CellID-Cancelled.h" #include "S1AP_CellID-Cancelled-Item.h" static asn_oer_constraints_t asn_OER_type_S1AP_CellID_Cancelled_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_CellID_Cancelled_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_CellID_Cancelled_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CellID_Cancelled_Item, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CellID_Cancelled_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_CellID_Cancelled_specs_1 = { sizeof(struct S1AP_CellID_Cancelled), offsetof(struct S1AP_CellID_Cancelled, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CellID_Cancelled = { "CellID-Cancelled", "CellID-Cancelled", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_CellID_Cancelled_tags_1, sizeof(asn_DEF_S1AP_CellID_Cancelled_tags_1) /sizeof(asn_DEF_S1AP_CellID_Cancelled_tags_1[0]), /* 1 */ asn_DEF_S1AP_CellID_Cancelled_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CellID_Cancelled_tags_1) /sizeof(asn_DEF_S1AP_CellID_Cancelled_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_CellID_Cancelled_constr_1, &asn_PER_type_S1AP_CellID_Cancelled_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_CellID_Cancelled_1, 1, /* Single element */ &asn_SPC_S1AP_CellID_Cancelled_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CellID-Cancelled.h000066400000000000000000000021561333553357400216000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CellID_Cancelled_H_ #define _S1AP_CellID_Cancelled_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_CellID_Cancelled_Item; /* S1AP_CellID-Cancelled */ typedef struct S1AP_CellID_Cancelled { A_SEQUENCE_OF(struct S1AP_CellID_Cancelled_Item) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CellID_Cancelled_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CellID_Cancelled; extern asn_SET_OF_specifics_t asn_SPC_S1AP_CellID_Cancelled_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_CellID_Cancelled_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_CellID_Cancelled_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_CellID_Cancelled_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CellIdListforMDT.c000066400000000000000000000034461333553357400216760ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CellIdListforMDT.h" #include "S1AP_EUTRAN-CGI.h" static asn_oer_constraints_t asn_OER_type_S1AP_CellIdListforMDT_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..32)) */}; asn_per_constraints_t asn_PER_type_S1AP_CellIdListforMDT_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_CellIdListforMDT_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_EUTRAN_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CellIdListforMDT_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_CellIdListforMDT_specs_1 = { sizeof(struct S1AP_CellIdListforMDT), offsetof(struct S1AP_CellIdListforMDT, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CellIdListforMDT = { "CellIdListforMDT", "CellIdListforMDT", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_CellIdListforMDT_tags_1, sizeof(asn_DEF_S1AP_CellIdListforMDT_tags_1) /sizeof(asn_DEF_S1AP_CellIdListforMDT_tags_1[0]), /* 1 */ asn_DEF_S1AP_CellIdListforMDT_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CellIdListforMDT_tags_1) /sizeof(asn_DEF_S1AP_CellIdListforMDT_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_CellIdListforMDT_constr_1, &asn_PER_type_S1AP_CellIdListforMDT_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_CellIdListforMDT_1, 1, /* Single element */ &asn_SPC_S1AP_CellIdListforMDT_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CellIdListforMDT.h000066400000000000000000000021301333553357400216700ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CellIdListforMDT_H_ #define _S1AP_CellIdListforMDT_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_EUTRAN_CGI; /* S1AP_CellIdListforMDT */ typedef struct S1AP_CellIdListforMDT { A_SEQUENCE_OF(struct S1AP_EUTRAN_CGI) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CellIdListforMDT_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CellIdListforMDT; extern asn_SET_OF_specifics_t asn_SPC_S1AP_CellIdListforMDT_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_CellIdListforMDT_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_CellIdListforMDT_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_CellIdListforMDT_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CellIdentifierAndCELevelForCECapableUEs.c000066400000000000000000000060421333553357400260760ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CellIdentifierAndCELevelForCECapableUEs.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_CellIdentifierAndCELevelForCECapableUEs_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellIdentifierAndCELevelForCECapableUEs, global_Cell_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_EUTRAN_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "global-Cell-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellIdentifierAndCELevelForCECapableUEs, cELevel), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CELevel, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cELevel" }, { ATF_POINTER, 1, offsetof(struct S1AP_CellIdentifierAndCELevelForCECapableUEs, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P28, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_CellIdentifierAndCELevelForCECapableUEs_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CellIdentifierAndCELevelForCECapableUEs_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* global-Cell-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* cELevel */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellIdentifierAndCELevelForCECapableUEs_specs_1 = { sizeof(struct S1AP_CellIdentifierAndCELevelForCECapableUEs), offsetof(struct S1AP_CellIdentifierAndCELevelForCECapableUEs, _asn_ctx), asn_MAP_S1AP_CellIdentifierAndCELevelForCECapableUEs_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_CellIdentifierAndCELevelForCECapableUEs_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs = { "CellIdentifierAndCELevelForCECapableUEs", "CellIdentifierAndCELevelForCECapableUEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs_tags_1, sizeof(asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs_tags_1) /sizeof(asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs_tags_1[0]), /* 1 */ asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs_tags_1) /sizeof(asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CellIdentifierAndCELevelForCECapableUEs_1, 3, /* Elements count */ &asn_SPC_S1AP_CellIdentifierAndCELevelForCECapableUEs_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CellIdentifierAndCELevelForCECapableUEs.h000066400000000000000000000026471333553357400261120ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CellIdentifierAndCELevelForCECapableUEs_H_ #define _S1AP_CellIdentifierAndCELevelForCECapableUEs_H_ #include /* Including external dependencies */ #include "S1AP_EUTRAN-CGI.h" #include "S1AP_CELevel.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_CellIdentifierAndCELevelForCECapableUEs */ typedef struct S1AP_CellIdentifierAndCELevelForCECapableUEs { S1AP_EUTRAN_CGI_t global_Cell_ID; S1AP_CELevel_t cELevel; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CellIdentifierAndCELevelForCECapableUEs_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellIdentifierAndCELevelForCECapableUEs_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_CellIdentifierAndCELevelForCECapableUEs_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_CellIdentifierAndCELevelForCECapableUEs_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CellIdentity.c000066400000000000000000000037641333553357400212260ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CellIdentity.h" int S1AP_CellIdentity_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 28)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_CellIdentity_constr_1 CC_NOTUSED = { { 0, 0 }, 28 /* (SIZE(28..28)) */}; asn_per_constraints_t asn_PER_type_S1AP_CellIdentity_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 28, 28 } /* (SIZE(28..28)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_CellIdentity_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_CellIdentity = { "CellIdentity", "CellIdentity", &asn_OP_BIT_STRING, asn_DEF_S1AP_CellIdentity_tags_1, sizeof(asn_DEF_S1AP_CellIdentity_tags_1) /sizeof(asn_DEF_S1AP_CellIdentity_tags_1[0]), /* 1 */ asn_DEF_S1AP_CellIdentity_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CellIdentity_tags_1) /sizeof(asn_DEF_S1AP_CellIdentity_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_CellIdentity_constr_1, &asn_PER_type_S1AP_CellIdentity_constr_1, S1AP_CellIdentity_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CellIdentity.h000066400000000000000000000025041333553357400212220ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CellIdentity_H_ #define _S1AP_CellIdentity_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_CellIdentity */ typedef BIT_STRING_t S1AP_CellIdentity_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_CellIdentity_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CellIdentity; asn_struct_free_f S1AP_CellIdentity_free; asn_struct_print_f S1AP_CellIdentity_print; asn_constr_check_f S1AP_CellIdentity_constraint; ber_type_decoder_f S1AP_CellIdentity_decode_ber; der_type_encoder_f S1AP_CellIdentity_encode_der; xer_type_decoder_f S1AP_CellIdentity_decode_xer; xer_type_encoder_f S1AP_CellIdentity_encode_xer; oer_type_decoder_f S1AP_CellIdentity_decode_oer; oer_type_encoder_f S1AP_CellIdentity_encode_oer; per_type_decoder_f S1AP_CellIdentity_decode_uper; per_type_encoder_f S1AP_CellIdentity_encode_uper; per_type_decoder_f S1AP_CellIdentity_decode_aper; per_type_encoder_f S1AP_CellIdentity_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_CellIdentity_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CellTrafficTrace.c000066400000000000000000000033401333553357400217600ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CellTrafficTrace.h" asn_TYPE_member_t asn_MBR_S1AP_CellTrafficTrace_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellTrafficTrace, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P57, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CellTrafficTrace_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CellTrafficTrace_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellTrafficTrace_specs_1 = { sizeof(struct S1AP_CellTrafficTrace), offsetof(struct S1AP_CellTrafficTrace, _asn_ctx), asn_MAP_S1AP_CellTrafficTrace_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CellTrafficTrace = { "CellTrafficTrace", "CellTrafficTrace", &asn_OP_SEQUENCE, asn_DEF_S1AP_CellTrafficTrace_tags_1, sizeof(asn_DEF_S1AP_CellTrafficTrace_tags_1) /sizeof(asn_DEF_S1AP_CellTrafficTrace_tags_1[0]), /* 1 */ asn_DEF_S1AP_CellTrafficTrace_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CellTrafficTrace_tags_1) /sizeof(asn_DEF_S1AP_CellTrafficTrace_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CellTrafficTrace_1, 1, /* Elements count */ &asn_SPC_S1AP_CellTrafficTrace_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CellTrafficTrace.h000066400000000000000000000020731333553357400217670ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CellTrafficTrace_H_ #define _S1AP_CellTrafficTrace_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_CellTrafficTrace */ typedef struct S1AP_CellTrafficTrace { S1AP_ProtocolIE_Container_6551P57_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CellTrafficTrace_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CellTrafficTrace; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellTrafficTrace_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_CellTrafficTrace_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_CellTrafficTrace_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CellType.c000066400000000000000000000037761333553357400203610ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CellType.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_CellType_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellType, cell_Size), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Cell_Size, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cell-Size" }, { ATF_POINTER, 1, offsetof(struct S1AP_CellType, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P33, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_CellType_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_CellType_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CellType_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* cell-Size */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellType_specs_1 = { sizeof(struct S1AP_CellType), offsetof(struct S1AP_CellType, _asn_ctx), asn_MAP_S1AP_CellType_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_CellType_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CellType = { "CellType", "CellType", &asn_OP_SEQUENCE, asn_DEF_S1AP_CellType_tags_1, sizeof(asn_DEF_S1AP_CellType_tags_1) /sizeof(asn_DEF_S1AP_CellType_tags_1[0]), /* 1 */ asn_DEF_S1AP_CellType_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CellType_tags_1) /sizeof(asn_DEF_S1AP_CellType_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CellType_1, 2, /* Elements count */ &asn_SPC_S1AP_CellType_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CellType.h000066400000000000000000000021251333553357400203510ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CellType_H_ #define _S1AP_CellType_H_ #include /* Including external dependencies */ #include "S1AP_Cell-Size.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_CellType */ typedef struct S1AP_CellType { S1AP_Cell_Size_t cell_Size; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CellType_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CellType; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellType_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_CellType_1[2]; #ifdef __cplusplus } #endif #endif /* _S1AP_CellType_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CompletedCellinEAI-Item.c000066400000000000000000000045111333553357400231020ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CompletedCellinEAI-Item.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_CompletedCellinEAI_Item_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CompletedCellinEAI_Item, eCGI), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_EUTRAN_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "eCGI" }, { ATF_POINTER, 1, offsetof(struct S1AP_CompletedCellinEAI_Item, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P45, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_CompletedCellinEAI_Item_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_CompletedCellinEAI_Item_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CompletedCellinEAI_Item_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eCGI */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CompletedCellinEAI_Item_specs_1 = { sizeof(struct S1AP_CompletedCellinEAI_Item), offsetof(struct S1AP_CompletedCellinEAI_Item, _asn_ctx), asn_MAP_S1AP_CompletedCellinEAI_Item_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_CompletedCellinEAI_Item_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CompletedCellinEAI_Item = { "CompletedCellinEAI-Item", "CompletedCellinEAI-Item", &asn_OP_SEQUENCE, asn_DEF_S1AP_CompletedCellinEAI_Item_tags_1, sizeof(asn_DEF_S1AP_CompletedCellinEAI_Item_tags_1) /sizeof(asn_DEF_S1AP_CompletedCellinEAI_Item_tags_1[0]), /* 1 */ asn_DEF_S1AP_CompletedCellinEAI_Item_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CompletedCellinEAI_Item_tags_1) /sizeof(asn_DEF_S1AP_CompletedCellinEAI_Item_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CompletedCellinEAI_Item_1, 2, /* Elements count */ &asn_SPC_S1AP_CompletedCellinEAI_Item_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CompletedCellinEAI-Item.h000066400000000000000000000023311333553357400231050ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CompletedCellinEAI_Item_H_ #define _S1AP_CompletedCellinEAI_Item_H_ #include /* Including external dependencies */ #include "S1AP_EUTRAN-CGI.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_CompletedCellinEAI-Item */ typedef struct S1AP_CompletedCellinEAI_Item { S1AP_EUTRAN_CGI_t eCGI; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CompletedCellinEAI_Item_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CompletedCellinEAI_Item; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CompletedCellinEAI_Item_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_CompletedCellinEAI_Item_1[2]; #ifdef __cplusplus } #endif #endif /* _S1AP_CompletedCellinEAI_Item_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CompletedCellinEAI.c000066400000000000000000000035651333553357400222160ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CompletedCellinEAI.h" #include "S1AP_CompletedCellinEAI-Item.h" static asn_oer_constraints_t asn_OER_type_S1AP_CompletedCellinEAI_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_CompletedCellinEAI_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_CompletedCellinEAI_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CompletedCellinEAI_Item, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CompletedCellinEAI_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_CompletedCellinEAI_specs_1 = { sizeof(struct S1AP_CompletedCellinEAI), offsetof(struct S1AP_CompletedCellinEAI, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CompletedCellinEAI = { "CompletedCellinEAI", "CompletedCellinEAI", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_CompletedCellinEAI_tags_1, sizeof(asn_DEF_S1AP_CompletedCellinEAI_tags_1) /sizeof(asn_DEF_S1AP_CompletedCellinEAI_tags_1[0]), /* 1 */ asn_DEF_S1AP_CompletedCellinEAI_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CompletedCellinEAI_tags_1) /sizeof(asn_DEF_S1AP_CompletedCellinEAI_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_CompletedCellinEAI_constr_1, &asn_PER_type_S1AP_CompletedCellinEAI_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_CompletedCellinEAI_1, 1, /* Single element */ &asn_SPC_S1AP_CompletedCellinEAI_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CompletedCellinEAI.h000066400000000000000000000022061333553357400222120ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CompletedCellinEAI_H_ #define _S1AP_CompletedCellinEAI_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_CompletedCellinEAI_Item; /* S1AP_CompletedCellinEAI */ typedef struct S1AP_CompletedCellinEAI { A_SEQUENCE_OF(struct S1AP_CompletedCellinEAI_Item) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CompletedCellinEAI_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CompletedCellinEAI; extern asn_SET_OF_specifics_t asn_SPC_S1AP_CompletedCellinEAI_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_CompletedCellinEAI_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_CompletedCellinEAI_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_CompletedCellinEAI_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CompletedCellinTAI-Item.c000066400000000000000000000045121333553357400231220ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CompletedCellinTAI-Item.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_CompletedCellinTAI_Item_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CompletedCellinTAI_Item, eCGI), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_EUTRAN_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "eCGI" }, { ATF_POINTER, 1, offsetof(struct S1AP_CompletedCellinTAI_Item, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P102, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_CompletedCellinTAI_Item_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_CompletedCellinTAI_Item_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CompletedCellinTAI_Item_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eCGI */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CompletedCellinTAI_Item_specs_1 = { sizeof(struct S1AP_CompletedCellinTAI_Item), offsetof(struct S1AP_CompletedCellinTAI_Item, _asn_ctx), asn_MAP_S1AP_CompletedCellinTAI_Item_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_CompletedCellinTAI_Item_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CompletedCellinTAI_Item = { "CompletedCellinTAI-Item", "CompletedCellinTAI-Item", &asn_OP_SEQUENCE, asn_DEF_S1AP_CompletedCellinTAI_Item_tags_1, sizeof(asn_DEF_S1AP_CompletedCellinTAI_Item_tags_1) /sizeof(asn_DEF_S1AP_CompletedCellinTAI_Item_tags_1[0]), /* 1 */ asn_DEF_S1AP_CompletedCellinTAI_Item_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CompletedCellinTAI_Item_tags_1) /sizeof(asn_DEF_S1AP_CompletedCellinTAI_Item_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CompletedCellinTAI_Item_1, 2, /* Elements count */ &asn_SPC_S1AP_CompletedCellinTAI_Item_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CompletedCellinTAI-Item.h000066400000000000000000000023311333553357400231240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CompletedCellinTAI_Item_H_ #define _S1AP_CompletedCellinTAI_Item_H_ #include /* Including external dependencies */ #include "S1AP_EUTRAN-CGI.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_CompletedCellinTAI-Item */ typedef struct S1AP_CompletedCellinTAI_Item { S1AP_EUTRAN_CGI_t eCGI; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CompletedCellinTAI_Item_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CompletedCellinTAI_Item; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CompletedCellinTAI_Item_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_CompletedCellinTAI_Item_1[2]; #ifdef __cplusplus } #endif #endif /* _S1AP_CompletedCellinTAI_Item_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CompletedCellinTAI.c000066400000000000000000000035651333553357400222350ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CompletedCellinTAI.h" #include "S1AP_CompletedCellinTAI-Item.h" static asn_oer_constraints_t asn_OER_type_S1AP_CompletedCellinTAI_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_CompletedCellinTAI_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_CompletedCellinTAI_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CompletedCellinTAI_Item, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CompletedCellinTAI_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_CompletedCellinTAI_specs_1 = { sizeof(struct S1AP_CompletedCellinTAI), offsetof(struct S1AP_CompletedCellinTAI, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CompletedCellinTAI = { "CompletedCellinTAI", "CompletedCellinTAI", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_CompletedCellinTAI_tags_1, sizeof(asn_DEF_S1AP_CompletedCellinTAI_tags_1) /sizeof(asn_DEF_S1AP_CompletedCellinTAI_tags_1[0]), /* 1 */ asn_DEF_S1AP_CompletedCellinTAI_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CompletedCellinTAI_tags_1) /sizeof(asn_DEF_S1AP_CompletedCellinTAI_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_CompletedCellinTAI_constr_1, &asn_PER_type_S1AP_CompletedCellinTAI_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_CompletedCellinTAI_1, 1, /* Single element */ &asn_SPC_S1AP_CompletedCellinTAI_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CompletedCellinTAI.h000066400000000000000000000022061333553357400222310ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CompletedCellinTAI_H_ #define _S1AP_CompletedCellinTAI_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_CompletedCellinTAI_Item; /* S1AP_CompletedCellinTAI */ typedef struct S1AP_CompletedCellinTAI { A_SEQUENCE_OF(struct S1AP_CompletedCellinTAI_Item) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CompletedCellinTAI_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CompletedCellinTAI; extern asn_SET_OF_specifics_t asn_SPC_S1AP_CompletedCellinTAI_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_CompletedCellinTAI_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_CompletedCellinTAI_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_CompletedCellinTAI_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ConcurrentWarningMessageIndicator.c000066400000000000000000000045061333553357400254420ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ConcurrentWarningMessageIndicator.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_ConcurrentWarningMessageIndicator_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_ConcurrentWarningMessageIndicator_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 0, 0, 0, 0 } /* (0..0) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_ConcurrentWarningMessageIndicator_value2enum_1[] = { { 0, 4, "true" } }; static const unsigned int asn_MAP_S1AP_ConcurrentWarningMessageIndicator_enum2value_1[] = { 0 /* true(0) */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_ConcurrentWarningMessageIndicator_specs_1 = { asn_MAP_S1AP_ConcurrentWarningMessageIndicator_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_ConcurrentWarningMessageIndicator_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 0, /* Enumeration is not extensible */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_ConcurrentWarningMessageIndicator_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ConcurrentWarningMessageIndicator = { "ConcurrentWarningMessageIndicator", "ConcurrentWarningMessageIndicator", &asn_OP_NativeEnumerated, asn_DEF_S1AP_ConcurrentWarningMessageIndicator_tags_1, sizeof(asn_DEF_S1AP_ConcurrentWarningMessageIndicator_tags_1) /sizeof(asn_DEF_S1AP_ConcurrentWarningMessageIndicator_tags_1[0]), /* 1 */ asn_DEF_S1AP_ConcurrentWarningMessageIndicator_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ConcurrentWarningMessageIndicator_tags_1) /sizeof(asn_DEF_S1AP_ConcurrentWarningMessageIndicator_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ConcurrentWarningMessageIndicator_constr_1, &asn_PER_type_S1AP_ConcurrentWarningMessageIndicator_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_ConcurrentWarningMessageIndicator_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ConcurrentWarningMessageIndicator.h000066400000000000000000000034621333553357400254470ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ConcurrentWarningMessageIndicator_H_ #define _S1AP_ConcurrentWarningMessageIndicator_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_ConcurrentWarningMessageIndicator { S1AP_ConcurrentWarningMessageIndicator_true = 0 } e_S1AP_ConcurrentWarningMessageIndicator; /* S1AP_ConcurrentWarningMessageIndicator */ typedef long S1AP_ConcurrentWarningMessageIndicator_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ConcurrentWarningMessageIndicator; asn_struct_free_f S1AP_ConcurrentWarningMessageIndicator_free; asn_struct_print_f S1AP_ConcurrentWarningMessageIndicator_print; asn_constr_check_f S1AP_ConcurrentWarningMessageIndicator_constraint; ber_type_decoder_f S1AP_ConcurrentWarningMessageIndicator_decode_ber; der_type_encoder_f S1AP_ConcurrentWarningMessageIndicator_encode_der; xer_type_decoder_f S1AP_ConcurrentWarningMessageIndicator_decode_xer; xer_type_encoder_f S1AP_ConcurrentWarningMessageIndicator_encode_xer; oer_type_decoder_f S1AP_ConcurrentWarningMessageIndicator_decode_oer; oer_type_encoder_f S1AP_ConcurrentWarningMessageIndicator_encode_oer; per_type_decoder_f S1AP_ConcurrentWarningMessageIndicator_decode_uper; per_type_encoder_f S1AP_ConcurrentWarningMessageIndicator_encode_uper; per_type_decoder_f S1AP_ConcurrentWarningMessageIndicator_decode_aper; per_type_encoder_f S1AP_ConcurrentWarningMessageIndicator_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_ConcurrentWarningMessageIndicator_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ConnectionEstablishmentIndication.c000066400000000000000000000040641333553357400254530ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ConnectionEstablishmentIndication.h" asn_TYPE_member_t asn_MBR_S1AP_ConnectionEstablishmentIndication_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ConnectionEstablishmentIndication, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P86, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ConnectionEstablishmentIndication_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ConnectionEstablishmentIndication_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ConnectionEstablishmentIndication_specs_1 = { sizeof(struct S1AP_ConnectionEstablishmentIndication), offsetof(struct S1AP_ConnectionEstablishmentIndication, _asn_ctx), asn_MAP_S1AP_ConnectionEstablishmentIndication_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ConnectionEstablishmentIndication = { "ConnectionEstablishmentIndication", "ConnectionEstablishmentIndication", &asn_OP_SEQUENCE, asn_DEF_S1AP_ConnectionEstablishmentIndication_tags_1, sizeof(asn_DEF_S1AP_ConnectionEstablishmentIndication_tags_1) /sizeof(asn_DEF_S1AP_ConnectionEstablishmentIndication_tags_1[0]), /* 1 */ asn_DEF_S1AP_ConnectionEstablishmentIndication_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ConnectionEstablishmentIndication_tags_1) /sizeof(asn_DEF_S1AP_ConnectionEstablishmentIndication_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ConnectionEstablishmentIndication_1, 1, /* Elements count */ &asn_SPC_S1AP_ConnectionEstablishmentIndication_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ConnectionEstablishmentIndication.h000066400000000000000000000023241333553357400254550ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ConnectionEstablishmentIndication_H_ #define _S1AP_ConnectionEstablishmentIndication_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ConnectionEstablishmentIndication */ typedef struct S1AP_ConnectionEstablishmentIndication { S1AP_ProtocolIE_Container_6551P86_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ConnectionEstablishmentIndication_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ConnectionEstablishmentIndication; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ConnectionEstablishmentIndication_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ConnectionEstablishmentIndication_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_ConnectionEstablishmentIndication_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Correlation-ID.c000066400000000000000000000036751333553357400214110ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Correlation-ID.h" int S1AP_Correlation_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } size = st->size; if((size == 4)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_Correlation_ID_constr_1 CC_NOTUSED = { { 0, 0 }, 4 /* (SIZE(4..4)) */}; static asn_per_constraints_t asn_PER_type_S1AP_Correlation_ID_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 4, 4 } /* (SIZE(4..4)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_Correlation_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Correlation_ID = { "Correlation-ID", "Correlation-ID", &asn_OP_OCTET_STRING, asn_DEF_S1AP_Correlation_ID_tags_1, sizeof(asn_DEF_S1AP_Correlation_ID_tags_1) /sizeof(asn_DEF_S1AP_Correlation_ID_tags_1[0]), /* 1 */ asn_DEF_S1AP_Correlation_ID_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Correlation_ID_tags_1) /sizeof(asn_DEF_S1AP_Correlation_ID_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_Correlation_ID_constr_1, &asn_PER_type_S1AP_Correlation_ID_constr_1, S1AP_Correlation_ID_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Correlation-ID.h000066400000000000000000000024501333553357400214040ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Correlation_ID_H_ #define _S1AP_Correlation_ID_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_Correlation-ID */ typedef OCTET_STRING_t S1AP_Correlation_ID_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Correlation_ID; asn_struct_free_f S1AP_Correlation_ID_free; asn_struct_print_f S1AP_Correlation_ID_print; asn_constr_check_f S1AP_Correlation_ID_constraint; ber_type_decoder_f S1AP_Correlation_ID_decode_ber; der_type_encoder_f S1AP_Correlation_ID_encode_der; xer_type_decoder_f S1AP_Correlation_ID_decode_xer; xer_type_encoder_f S1AP_Correlation_ID_encode_xer; oer_type_decoder_f S1AP_Correlation_ID_decode_oer; oer_type_encoder_f S1AP_Correlation_ID_encode_oer; per_type_decoder_f S1AP_Correlation_ID_decode_uper; per_type_encoder_f S1AP_Correlation_ID_encode_uper; per_type_decoder_f S1AP_Correlation_ID_decode_aper; per_type_encoder_f S1AP_Correlation_ID_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Correlation_ID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Coverage-Level.c000066400000000000000000000040431333553357400214240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Coverage-Level.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_Coverage_Level_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_Coverage_Level_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_Coverage_Level_value2enum_1[] = { { 0, 16, "extendedcoverage" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_Coverage_Level_enum2value_1[] = { 0 /* extendedcoverage(0) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_Coverage_Level_specs_1 = { asn_MAP_S1AP_Coverage_Level_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_Coverage_Level_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_Coverage_Level_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Coverage_Level = { "Coverage-Level", "Coverage-Level", &asn_OP_NativeEnumerated, asn_DEF_S1AP_Coverage_Level_tags_1, sizeof(asn_DEF_S1AP_Coverage_Level_tags_1) /sizeof(asn_DEF_S1AP_Coverage_Level_tags_1[0]), /* 1 */ asn_DEF_S1AP_Coverage_Level_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Coverage_Level_tags_1) /sizeof(asn_DEF_S1AP_Coverage_Level_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_Coverage_Level_constr_1, &asn_PER_type_S1AP_Coverage_Level_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_Coverage_Level_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Coverage-Level.h000066400000000000000000000027031333553357400214320ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Coverage_Level_H_ #define _S1AP_Coverage_Level_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_Coverage_Level { S1AP_Coverage_Level_extendedcoverage = 0 /* * Enumeration is extensible */ } e_S1AP_Coverage_Level; /* S1AP_Coverage-Level */ typedef long S1AP_Coverage_Level_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Coverage_Level; asn_struct_free_f S1AP_Coverage_Level_free; asn_struct_print_f S1AP_Coverage_Level_print; asn_constr_check_f S1AP_Coverage_Level_constraint; ber_type_decoder_f S1AP_Coverage_Level_decode_ber; der_type_encoder_f S1AP_Coverage_Level_encode_der; xer_type_decoder_f S1AP_Coverage_Level_decode_xer; xer_type_encoder_f S1AP_Coverage_Level_encode_xer; oer_type_decoder_f S1AP_Coverage_Level_decode_oer; oer_type_encoder_f S1AP_Coverage_Level_encode_oer; per_type_decoder_f S1AP_Coverage_Level_decode_uper; per_type_encoder_f S1AP_Coverage_Level_encode_uper; per_type_decoder_f S1AP_Coverage_Level_decode_aper; per_type_encoder_f S1AP_Coverage_Level_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Coverage_Level_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Criticality.c000066400000000000000000000037141333553357400211100ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-CommonDataTypes" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Criticality.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_Criticality_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_Criticality_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_Criticality_value2enum_1[] = { { 0, 6, "reject" }, { 1, 6, "ignore" }, { 2, 6, "notify" } }; static const unsigned int asn_MAP_S1AP_Criticality_enum2value_1[] = { 1, /* ignore(1) */ 2, /* notify(2) */ 0 /* reject(0) */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_Criticality_specs_1 = { asn_MAP_S1AP_Criticality_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_Criticality_enum2value_1, /* N => "tag"; sorted by N */ 3, /* Number of elements in the maps */ 0, /* Enumeration is not extensible */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_Criticality_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Criticality = { "Criticality", "Criticality", &asn_OP_NativeEnumerated, asn_DEF_S1AP_Criticality_tags_1, sizeof(asn_DEF_S1AP_Criticality_tags_1) /sizeof(asn_DEF_S1AP_Criticality_tags_1[0]), /* 1 */ asn_DEF_S1AP_Criticality_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Criticality_tags_1) /sizeof(asn_DEF_S1AP_Criticality_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_Criticality_constr_1, &asn_PER_type_S1AP_Criticality_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_Criticality_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Criticality.h000066400000000000000000000027361333553357400211200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-CommonDataTypes" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Criticality_H_ #define _S1AP_Criticality_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_Criticality { S1AP_Criticality_reject = 0, S1AP_Criticality_ignore = 1, S1AP_Criticality_notify = 2 } e_S1AP_Criticality; /* S1AP_Criticality */ typedef long S1AP_Criticality_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_Criticality_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_Criticality; extern const asn_INTEGER_specifics_t asn_SPC_Criticality_specs_1; asn_struct_free_f Criticality_free; asn_struct_print_f Criticality_print; asn_constr_check_f Criticality_constraint; ber_type_decoder_f Criticality_decode_ber; der_type_encoder_f Criticality_encode_der; xer_type_decoder_f Criticality_decode_xer; xer_type_encoder_f Criticality_encode_xer; oer_type_decoder_f Criticality_decode_oer; oer_type_encoder_f Criticality_encode_oer; per_type_decoder_f Criticality_decode_uper; per_type_encoder_f Criticality_encode_uper; per_type_decoder_f Criticality_decode_aper; per_type_encoder_f Criticality_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Criticality_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CriticalityDiagnostics-IE-Item.c000066400000000000000000000062321333553357400244650ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CriticalityDiagnostics-IE-Item.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_CriticalityDiagnostics_IE_Item_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CriticalityDiagnostics_IE_Item, iECriticality), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iECriticality" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CriticalityDiagnostics_IE_Item, iE_ID), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CriticalityDiagnostics_IE_Item, typeOfError), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TypeOfError, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "typeOfError" }, { ATF_POINTER, 1, offsetof(struct S1AP_CriticalityDiagnostics_IE_Item, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P40, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_CriticalityDiagnostics_IE_Item_oms_1[] = { 3 }; static const ber_tlv_tag_t asn_DEF_S1AP_CriticalityDiagnostics_IE_Item_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CriticalityDiagnostics_IE_Item_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* iECriticality */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* iE-ID */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* typeOfError */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CriticalityDiagnostics_IE_Item_specs_1 = { sizeof(struct S1AP_CriticalityDiagnostics_IE_Item), offsetof(struct S1AP_CriticalityDiagnostics_IE_Item, _asn_ctx), asn_MAP_S1AP_CriticalityDiagnostics_IE_Item_tag2el_1, 4, /* Count of tags in the map */ asn_MAP_S1AP_CriticalityDiagnostics_IE_Item_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CriticalityDiagnostics_IE_Item = { "CriticalityDiagnostics-IE-Item", "CriticalityDiagnostics-IE-Item", &asn_OP_SEQUENCE, asn_DEF_S1AP_CriticalityDiagnostics_IE_Item_tags_1, sizeof(asn_DEF_S1AP_CriticalityDiagnostics_IE_Item_tags_1) /sizeof(asn_DEF_S1AP_CriticalityDiagnostics_IE_Item_tags_1[0]), /* 1 */ asn_DEF_S1AP_CriticalityDiagnostics_IE_Item_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CriticalityDiagnostics_IE_Item_tags_1) /sizeof(asn_DEF_S1AP_CriticalityDiagnostics_IE_Item_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CriticalityDiagnostics_IE_Item_1, 4, /* Elements count */ &asn_SPC_S1AP_CriticalityDiagnostics_IE_Item_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CriticalityDiagnostics-IE-Item.h000066400000000000000000000026411333553357400244720ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CriticalityDiagnostics_IE_Item_H_ #define _S1AP_CriticalityDiagnostics_IE_Item_H_ #include /* Including external dependencies */ #include "S1AP_Criticality.h" #include "S1AP_ProtocolIE-ID.h" #include "S1AP_TypeOfError.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_CriticalityDiagnostics-IE-Item */ typedef struct S1AP_CriticalityDiagnostics_IE_Item { S1AP_Criticality_t iECriticality; S1AP_ProtocolIE_ID_t iE_ID; S1AP_TypeOfError_t typeOfError; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CriticalityDiagnostics_IE_Item_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CriticalityDiagnostics_IE_Item; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CriticalityDiagnostics_IE_Item_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_CriticalityDiagnostics_IE_Item_1[4]; #ifdef __cplusplus } #endif #endif /* _S1AP_CriticalityDiagnostics_IE_Item_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CriticalityDiagnostics-IE-List.c000066400000000000000000000041671333553357400245070ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CriticalityDiagnostics-IE-List.h" #include "S1AP_CriticalityDiagnostics-IE-Item.h" static asn_oer_constraints_t asn_OER_type_S1AP_CriticalityDiagnostics_IE_List_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_CriticalityDiagnostics_IE_List_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_CriticalityDiagnostics_IE_List_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics_IE_Item, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CriticalityDiagnostics_IE_List_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_CriticalityDiagnostics_IE_List_specs_1 = { sizeof(struct S1AP_CriticalityDiagnostics_IE_List), offsetof(struct S1AP_CriticalityDiagnostics_IE_List, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CriticalityDiagnostics_IE_List = { "CriticalityDiagnostics-IE-List", "CriticalityDiagnostics-IE-List", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_CriticalityDiagnostics_IE_List_tags_1, sizeof(asn_DEF_S1AP_CriticalityDiagnostics_IE_List_tags_1) /sizeof(asn_DEF_S1AP_CriticalityDiagnostics_IE_List_tags_1[0]), /* 1 */ asn_DEF_S1AP_CriticalityDiagnostics_IE_List_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CriticalityDiagnostics_IE_List_tags_1) /sizeof(asn_DEF_S1AP_CriticalityDiagnostics_IE_List_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_CriticalityDiagnostics_IE_List_constr_1, &asn_PER_type_S1AP_CriticalityDiagnostics_IE_List_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_CriticalityDiagnostics_IE_List_1, 1, /* Single element */ &asn_SPC_S1AP_CriticalityDiagnostics_IE_List_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CriticalityDiagnostics-IE-List.h000066400000000000000000000024141333553357400245050ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CriticalityDiagnostics_IE_List_H_ #define _S1AP_CriticalityDiagnostics_IE_List_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_CriticalityDiagnostics_IE_Item; /* S1AP_CriticalityDiagnostics-IE-List */ typedef struct S1AP_CriticalityDiagnostics_IE_List { A_SEQUENCE_OF(struct S1AP_CriticalityDiagnostics_IE_Item) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CriticalityDiagnostics_IE_List_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CriticalityDiagnostics_IE_List; extern asn_SET_OF_specifics_t asn_SPC_S1AP_CriticalityDiagnostics_IE_List_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_CriticalityDiagnostics_IE_List_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_CriticalityDiagnostics_IE_List_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_CriticalityDiagnostics_IE_List_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CriticalityDiagnostics.c000066400000000000000000000067511333553357400233040ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_CriticalityDiagnostics.h" #include "S1AP_CriticalityDiagnostics-IE-List.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_CriticalityDiagnostics_1[] = { { ATF_POINTER, 5, offsetof(struct S1AP_CriticalityDiagnostics, procedureCode), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProcedureCode, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "procedureCode" }, { ATF_POINTER, 4, offsetof(struct S1AP_CriticalityDiagnostics, triggeringMessage), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TriggeringMessage, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "triggeringMessage" }, { ATF_POINTER, 3, offsetof(struct S1AP_CriticalityDiagnostics, procedureCriticality), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "procedureCriticality" }, { ATF_POINTER, 2, offsetof(struct S1AP_CriticalityDiagnostics, iEsCriticalityDiagnostics), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CriticalityDiagnostics_IE_List, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iEsCriticalityDiagnostics" }, { ATF_POINTER, 1, offsetof(struct S1AP_CriticalityDiagnostics, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P39, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_CriticalityDiagnostics_oms_1[] = { 0, 1, 2, 3, 4 }; static const ber_tlv_tag_t asn_DEF_S1AP_CriticalityDiagnostics_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CriticalityDiagnostics_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* procedureCode */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* triggeringMessage */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* procedureCriticality */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* iEsCriticalityDiagnostics */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_CriticalityDiagnostics_specs_1 = { sizeof(struct S1AP_CriticalityDiagnostics), offsetof(struct S1AP_CriticalityDiagnostics, _asn_ctx), asn_MAP_S1AP_CriticalityDiagnostics_tag2el_1, 5, /* Count of tags in the map */ asn_MAP_S1AP_CriticalityDiagnostics_oms_1, /* Optional members */ 5, 0, /* Root/Additions */ 5, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CriticalityDiagnostics = { "CriticalityDiagnostics", "CriticalityDiagnostics", &asn_OP_SEQUENCE, asn_DEF_S1AP_CriticalityDiagnostics_tags_1, sizeof(asn_DEF_S1AP_CriticalityDiagnostics_tags_1) /sizeof(asn_DEF_S1AP_CriticalityDiagnostics_tags_1[0]), /* 1 */ asn_DEF_S1AP_CriticalityDiagnostics_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_CriticalityDiagnostics_tags_1) /sizeof(asn_DEF_S1AP_CriticalityDiagnostics_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CriticalityDiagnostics_1, 5, /* Elements count */ &asn_SPC_S1AP_CriticalityDiagnostics_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_CriticalityDiagnostics.h000066400000000000000000000026321333553357400233030ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_CriticalityDiagnostics_H_ #define _S1AP_CriticalityDiagnostics_H_ #include /* Including external dependencies */ #include "S1AP_ProcedureCode.h" #include "S1AP_TriggeringMessage.h" #include "S1AP_Criticality.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_CriticalityDiagnostics_IE_List; struct S1AP_ProtocolExtensionContainer; /* S1AP_CriticalityDiagnostics */ typedef struct S1AP_CriticalityDiagnostics { S1AP_ProcedureCode_t *procedureCode; /* OPTIONAL */ S1AP_TriggeringMessage_t *triggeringMessage; /* OPTIONAL */ S1AP_Criticality_t *procedureCriticality; /* OPTIONAL */ struct S1AP_CriticalityDiagnostics_IE_List *iEsCriticalityDiagnostics; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CriticalityDiagnostics_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_CriticalityDiagnostics; #ifdef __cplusplus } #endif #endif /* _S1AP_CriticalityDiagnostics_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_DCN-ID.c000066400000000000000000000033711333553357400175250ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_DCN-ID.h" int S1AP_DCN_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_DCN_ID_constr_1 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; asn_per_constraints_t asn_PER_type_S1AP_DCN_ID_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_DCN_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_DCN_ID = { "DCN-ID", "DCN-ID", &asn_OP_NativeInteger, asn_DEF_S1AP_DCN_ID_tags_1, sizeof(asn_DEF_S1AP_DCN_ID_tags_1) /sizeof(asn_DEF_S1AP_DCN_ID_tags_1[0]), /* 1 */ asn_DEF_S1AP_DCN_ID_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_DCN_ID_tags_1) /sizeof(asn_DEF_S1AP_DCN_ID_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_DCN_ID_constr_1, &asn_PER_type_S1AP_DCN_ID_constr_1, S1AP_DCN_ID_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_DCN-ID.h000066400000000000000000000023071333553357400175300ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_DCN_ID_H_ #define _S1AP_DCN_ID_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_DCN-ID */ typedef long S1AP_DCN_ID_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_DCN_ID_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_DCN_ID; asn_struct_free_f S1AP_DCN_ID_free; asn_struct_print_f S1AP_DCN_ID_print; asn_constr_check_f S1AP_DCN_ID_constraint; ber_type_decoder_f S1AP_DCN_ID_decode_ber; der_type_encoder_f S1AP_DCN_ID_encode_der; xer_type_decoder_f S1AP_DCN_ID_decode_xer; xer_type_encoder_f S1AP_DCN_ID_encode_xer; oer_type_decoder_f S1AP_DCN_ID_decode_oer; oer_type_encoder_f S1AP_DCN_ID_encode_oer; per_type_decoder_f S1AP_DCN_ID_decode_uper; per_type_encoder_f S1AP_DCN_ID_encode_uper; per_type_decoder_f S1AP_DCN_ID_decode_aper; per_type_encoder_f S1AP_DCN_ID_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_DCN_ID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_DL-CP-SecurityInformation.c000066400000000000000000000046271333553357400234460ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_DL-CP-SecurityInformation.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_DL_CP_SecurityInformation_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_DL_CP_SecurityInformation, dl_NAS_MAC), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_DL_NAS_MAC, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "dl-NAS-MAC" }, { ATF_POINTER, 1, offsetof(struct S1AP_DL_CP_SecurityInformation, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P42, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_DL_CP_SecurityInformation_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_DL_CP_SecurityInformation_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_DL_CP_SecurityInformation_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* dl-NAS-MAC */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_DL_CP_SecurityInformation_specs_1 = { sizeof(struct S1AP_DL_CP_SecurityInformation), offsetof(struct S1AP_DL_CP_SecurityInformation, _asn_ctx), asn_MAP_S1AP_DL_CP_SecurityInformation_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_DL_CP_SecurityInformation_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_DL_CP_SecurityInformation = { "DL-CP-SecurityInformation", "DL-CP-SecurityInformation", &asn_OP_SEQUENCE, asn_DEF_S1AP_DL_CP_SecurityInformation_tags_1, sizeof(asn_DEF_S1AP_DL_CP_SecurityInformation_tags_1) /sizeof(asn_DEF_S1AP_DL_CP_SecurityInformation_tags_1[0]), /* 1 */ asn_DEF_S1AP_DL_CP_SecurityInformation_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_DL_CP_SecurityInformation_tags_1) /sizeof(asn_DEF_S1AP_DL_CP_SecurityInformation_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_DL_CP_SecurityInformation_1, 2, /* Elements count */ &asn_SPC_S1AP_DL_CP_SecurityInformation_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_DL-CP-SecurityInformation.h000066400000000000000000000021331333553357400234410ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_DL_CP_SecurityInformation_H_ #define _S1AP_DL_CP_SecurityInformation_H_ #include /* Including external dependencies */ #include "S1AP_DL-NAS-MAC.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_DL-CP-SecurityInformation */ typedef struct S1AP_DL_CP_SecurityInformation { S1AP_DL_NAS_MAC_t dl_NAS_MAC; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_DL_CP_SecurityInformation_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_DL_CP_SecurityInformation; #ifdef __cplusplus } #endif #endif /* _S1AP_DL_CP_SecurityInformation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_DL-Forwarding.c000066400000000000000000000040141333553357400212210ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_DL-Forwarding.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_DL_Forwarding_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_DL_Forwarding_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_DL_Forwarding_value2enum_1[] = { { 0, 22, "dL-Forwarding-proposed" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_DL_Forwarding_enum2value_1[] = { 0 /* dL-Forwarding-proposed(0) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_DL_Forwarding_specs_1 = { asn_MAP_S1AP_DL_Forwarding_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_DL_Forwarding_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_DL_Forwarding_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_DL_Forwarding = { "DL-Forwarding", "DL-Forwarding", &asn_OP_NativeEnumerated, asn_DEF_S1AP_DL_Forwarding_tags_1, sizeof(asn_DEF_S1AP_DL_Forwarding_tags_1) /sizeof(asn_DEF_S1AP_DL_Forwarding_tags_1[0]), /* 1 */ asn_DEF_S1AP_DL_Forwarding_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_DL_Forwarding_tags_1) /sizeof(asn_DEF_S1AP_DL_Forwarding_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_DL_Forwarding_constr_1, &asn_PER_type_S1AP_DL_Forwarding_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_DL_Forwarding_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_DL-Forwarding.h000066400000000000000000000027751333553357400212420ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_DL_Forwarding_H_ #define _S1AP_DL_Forwarding_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_DL_Forwarding { S1AP_DL_Forwarding_dL_Forwarding_proposed = 0 /* * Enumeration is extensible */ } e_S1AP_DL_Forwarding; /* S1AP_DL-Forwarding */ typedef long S1AP_DL_Forwarding_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_DL_Forwarding_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_DL_Forwarding; extern const asn_INTEGER_specifics_t asn_SPC_DL_Forwarding_specs_1; asn_struct_free_f DL_Forwarding_free; asn_struct_print_f DL_Forwarding_print; asn_constr_check_f DL_Forwarding_constraint; ber_type_decoder_f DL_Forwarding_decode_ber; der_type_encoder_f DL_Forwarding_encode_der; xer_type_decoder_f DL_Forwarding_decode_xer; xer_type_encoder_f DL_Forwarding_encode_xer; oer_type_decoder_f DL_Forwarding_decode_oer; oer_type_encoder_f DL_Forwarding_encode_oer; per_type_decoder_f DL_Forwarding_decode_uper; per_type_encoder_f DL_Forwarding_encode_uper; per_type_decoder_f DL_Forwarding_decode_aper; per_type_encoder_f DL_Forwarding_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_DL_Forwarding_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_DL-NAS-MAC.c000066400000000000000000000037221333553357400201430ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_DL-NAS-MAC.h" int S1AP_DL_NAS_MAC_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 16)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_DL_NAS_MAC_constr_1 CC_NOTUSED = { { 0, 0 }, 16 /* (SIZE(16..16)) */}; asn_per_constraints_t asn_PER_type_S1AP_DL_NAS_MAC_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_DL_NAS_MAC_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_DL_NAS_MAC = { "DL-NAS-MAC", "DL-NAS-MAC", &asn_OP_BIT_STRING, asn_DEF_S1AP_DL_NAS_MAC_tags_1, sizeof(asn_DEF_S1AP_DL_NAS_MAC_tags_1) /sizeof(asn_DEF_S1AP_DL_NAS_MAC_tags_1[0]), /* 1 */ asn_DEF_S1AP_DL_NAS_MAC_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_DL_NAS_MAC_tags_1) /sizeof(asn_DEF_S1AP_DL_NAS_MAC_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_DL_NAS_MAC_constr_1, &asn_PER_type_S1AP_DL_NAS_MAC_constr_1, S1AP_DL_NAS_MAC_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_DL-NAS-MAC.h000066400000000000000000000024341333553357400201470ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_DL_NAS_MAC_H_ #define _S1AP_DL_NAS_MAC_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_DL-NAS-MAC */ typedef BIT_STRING_t S1AP_DL_NAS_MAC_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_DL_NAS_MAC_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_DL_NAS_MAC; asn_struct_free_f S1AP_DL_NAS_MAC_free; asn_struct_print_f S1AP_DL_NAS_MAC_print; asn_constr_check_f S1AP_DL_NAS_MAC_constraint; ber_type_decoder_f S1AP_DL_NAS_MAC_decode_ber; der_type_encoder_f S1AP_DL_NAS_MAC_encode_der; xer_type_decoder_f S1AP_DL_NAS_MAC_decode_xer; xer_type_encoder_f S1AP_DL_NAS_MAC_encode_xer; oer_type_decoder_f S1AP_DL_NAS_MAC_decode_oer; oer_type_encoder_f S1AP_DL_NAS_MAC_encode_oer; per_type_decoder_f S1AP_DL_NAS_MAC_decode_uper; per_type_encoder_f S1AP_DL_NAS_MAC_encode_uper; per_type_decoder_f S1AP_DL_NAS_MAC_decode_aper; per_type_encoder_f S1AP_DL_NAS_MAC_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_DL_NAS_MAC_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_DLNASPDUDeliveryAckRequest.c000066400000000000000000000044201333553357400235310ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_DLNASPDUDeliveryAckRequest.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_DLNASPDUDeliveryAckRequest_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_DLNASPDUDeliveryAckRequest_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_DLNASPDUDeliveryAckRequest_value2enum_1[] = { { 0, 9, "requested" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_DLNASPDUDeliveryAckRequest_enum2value_1[] = { 0 /* requested(0) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_DLNASPDUDeliveryAckRequest_specs_1 = { asn_MAP_S1AP_DLNASPDUDeliveryAckRequest_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_DLNASPDUDeliveryAckRequest_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_DLNASPDUDeliveryAckRequest_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_DLNASPDUDeliveryAckRequest = { "DLNASPDUDeliveryAckRequest", "DLNASPDUDeliveryAckRequest", &asn_OP_NativeEnumerated, asn_DEF_S1AP_DLNASPDUDeliveryAckRequest_tags_1, sizeof(asn_DEF_S1AP_DLNASPDUDeliveryAckRequest_tags_1) /sizeof(asn_DEF_S1AP_DLNASPDUDeliveryAckRequest_tags_1[0]), /* 1 */ asn_DEF_S1AP_DLNASPDUDeliveryAckRequest_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_DLNASPDUDeliveryAckRequest_tags_1) /sizeof(asn_DEF_S1AP_DLNASPDUDeliveryAckRequest_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_DLNASPDUDeliveryAckRequest_constr_1, &asn_PER_type_S1AP_DLNASPDUDeliveryAckRequest_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_DLNASPDUDeliveryAckRequest_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_DLNASPDUDeliveryAckRequest.h000066400000000000000000000033041333553357400235360ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_DLNASPDUDeliveryAckRequest_H_ #define _S1AP_DLNASPDUDeliveryAckRequest_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_DLNASPDUDeliveryAckRequest { S1AP_DLNASPDUDeliveryAckRequest_requested = 0 /* * Enumeration is extensible */ } e_S1AP_DLNASPDUDeliveryAckRequest; /* S1AP_DLNASPDUDeliveryAckRequest */ typedef long S1AP_DLNASPDUDeliveryAckRequest_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_DLNASPDUDeliveryAckRequest; asn_struct_free_f S1AP_DLNASPDUDeliveryAckRequest_free; asn_struct_print_f S1AP_DLNASPDUDeliveryAckRequest_print; asn_constr_check_f S1AP_DLNASPDUDeliveryAckRequest_constraint; ber_type_decoder_f S1AP_DLNASPDUDeliveryAckRequest_decode_ber; der_type_encoder_f S1AP_DLNASPDUDeliveryAckRequest_encode_der; xer_type_decoder_f S1AP_DLNASPDUDeliveryAckRequest_decode_xer; xer_type_encoder_f S1AP_DLNASPDUDeliveryAckRequest_encode_xer; oer_type_decoder_f S1AP_DLNASPDUDeliveryAckRequest_decode_oer; oer_type_encoder_f S1AP_DLNASPDUDeliveryAckRequest_encode_oer; per_type_decoder_f S1AP_DLNASPDUDeliveryAckRequest_decode_uper; per_type_encoder_f S1AP_DLNASPDUDeliveryAckRequest_encode_uper; per_type_decoder_f S1AP_DLNASPDUDeliveryAckRequest_decode_aper; per_type_encoder_f S1AP_DLNASPDUDeliveryAckRequest_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_DLNASPDUDeliveryAckRequest_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Data-Forwarding-Not-Possible.c000066400000000000000000000045411333553357400241140ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Data-Forwarding-Not-Possible.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_Data_Forwarding_Not_Possible_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_Data_Forwarding_Not_Possible_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_Data_Forwarding_Not_Possible_value2enum_1[] = { { 0, 28, "data-Forwarding-not-Possible" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_Data_Forwarding_Not_Possible_enum2value_1[] = { 0 /* data-Forwarding-not-Possible(0) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_Data_Forwarding_Not_Possible_specs_1 = { asn_MAP_S1AP_Data_Forwarding_Not_Possible_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_Data_Forwarding_Not_Possible_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_Data_Forwarding_Not_Possible_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Data_Forwarding_Not_Possible = { "Data-Forwarding-Not-Possible", "Data-Forwarding-Not-Possible", &asn_OP_NativeEnumerated, asn_DEF_S1AP_Data_Forwarding_Not_Possible_tags_1, sizeof(asn_DEF_S1AP_Data_Forwarding_Not_Possible_tags_1) /sizeof(asn_DEF_S1AP_Data_Forwarding_Not_Possible_tags_1[0]), /* 1 */ asn_DEF_S1AP_Data_Forwarding_Not_Possible_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Data_Forwarding_Not_Possible_tags_1) /sizeof(asn_DEF_S1AP_Data_Forwarding_Not_Possible_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_Data_Forwarding_Not_Possible_constr_1, &asn_PER_type_S1AP_Data_Forwarding_Not_Possible_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_Data_Forwarding_Not_Possible_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Data-Forwarding-Not-Possible.h000066400000000000000000000034031333553357400241150ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Data_Forwarding_Not_Possible_H_ #define _S1AP_Data_Forwarding_Not_Possible_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_Data_Forwarding_Not_Possible { S1AP_Data_Forwarding_Not_Possible_data_Forwarding_not_Possible = 0 /* * Enumeration is extensible */ } e_S1AP_Data_Forwarding_Not_Possible; /* S1AP_Data-Forwarding-Not-Possible */ typedef long S1AP_Data_Forwarding_Not_Possible_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Data_Forwarding_Not_Possible; asn_struct_free_f S1AP_Data_Forwarding_Not_Possible_free; asn_struct_print_f S1AP_Data_Forwarding_Not_Possible_print; asn_constr_check_f S1AP_Data_Forwarding_Not_Possible_constraint; ber_type_decoder_f S1AP_Data_Forwarding_Not_Possible_decode_ber; der_type_encoder_f S1AP_Data_Forwarding_Not_Possible_encode_der; xer_type_decoder_f S1AP_Data_Forwarding_Not_Possible_decode_xer; xer_type_encoder_f S1AP_Data_Forwarding_Not_Possible_encode_xer; oer_type_decoder_f S1AP_Data_Forwarding_Not_Possible_decode_oer; oer_type_encoder_f S1AP_Data_Forwarding_Not_Possible_encode_oer; per_type_decoder_f S1AP_Data_Forwarding_Not_Possible_decode_uper; per_type_encoder_f S1AP_Data_Forwarding_Not_Possible_encode_uper; per_type_decoder_f S1AP_Data_Forwarding_Not_Possible_decode_aper; per_type_encoder_f S1AP_Data_Forwarding_Not_Possible_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Data_Forwarding_Not_Possible_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_DataCodingScheme.c000066400000000000000000000040671333553357400217540ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_DataCodingScheme.h" int S1AP_DataCodingScheme_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 8)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_DataCodingScheme_constr_1 CC_NOTUSED = { { 0, 0 }, 8 /* (SIZE(8..8)) */}; static asn_per_constraints_t asn_PER_type_S1AP_DataCodingScheme_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 8, 8 } /* (SIZE(8..8)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_DataCodingScheme_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_DataCodingScheme = { "DataCodingScheme", "DataCodingScheme", &asn_OP_BIT_STRING, asn_DEF_S1AP_DataCodingScheme_tags_1, sizeof(asn_DEF_S1AP_DataCodingScheme_tags_1) /sizeof(asn_DEF_S1AP_DataCodingScheme_tags_1[0]), /* 1 */ asn_DEF_S1AP_DataCodingScheme_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_DataCodingScheme_tags_1) /sizeof(asn_DEF_S1AP_DataCodingScheme_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_DataCodingScheme_constr_1, &asn_PER_type_S1AP_DataCodingScheme_constr_1, S1AP_DataCodingScheme_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_DataCodingScheme.h000066400000000000000000000025121333553357400217520ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_DataCodingScheme_H_ #define _S1AP_DataCodingScheme_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_DataCodingScheme */ typedef BIT_STRING_t S1AP_DataCodingScheme_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_DataCodingScheme; asn_struct_free_f S1AP_DataCodingScheme_free; asn_struct_print_f S1AP_DataCodingScheme_print; asn_constr_check_f S1AP_DataCodingScheme_constraint; ber_type_decoder_f S1AP_DataCodingScheme_decode_ber; der_type_encoder_f S1AP_DataCodingScheme_encode_der; xer_type_decoder_f S1AP_DataCodingScheme_decode_xer; xer_type_encoder_f S1AP_DataCodingScheme_encode_xer; oer_type_decoder_f S1AP_DataCodingScheme_decode_oer; oer_type_encoder_f S1AP_DataCodingScheme_encode_oer; per_type_decoder_f S1AP_DataCodingScheme_decode_uper; per_type_encoder_f S1AP_DataCodingScheme_encode_uper; per_type_decoder_f S1AP_DataCodingScheme_decode_aper; per_type_encoder_f S1AP_DataCodingScheme_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_DataCodingScheme_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_DeactivateTrace.c000066400000000000000000000033141333553357400216540ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_DeactivateTrace.h" asn_TYPE_member_t asn_MBR_S1AP_DeactivateTrace_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_DeactivateTrace, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P56, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_DeactivateTrace_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_DeactivateTrace_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_DeactivateTrace_specs_1 = { sizeof(struct S1AP_DeactivateTrace), offsetof(struct S1AP_DeactivateTrace, _asn_ctx), asn_MAP_S1AP_DeactivateTrace_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_DeactivateTrace = { "DeactivateTrace", "DeactivateTrace", &asn_OP_SEQUENCE, asn_DEF_S1AP_DeactivateTrace_tags_1, sizeof(asn_DEF_S1AP_DeactivateTrace_tags_1) /sizeof(asn_DEF_S1AP_DeactivateTrace_tags_1[0]), /* 1 */ asn_DEF_S1AP_DeactivateTrace_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_DeactivateTrace_tags_1) /sizeof(asn_DEF_S1AP_DeactivateTrace_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_DeactivateTrace_1, 1, /* Elements count */ &asn_SPC_S1AP_DeactivateTrace_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_DeactivateTrace.h000066400000000000000000000020621333553357400216600ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_DeactivateTrace_H_ #define _S1AP_DeactivateTrace_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_DeactivateTrace */ typedef struct S1AP_DeactivateTrace { S1AP_ProtocolIE_Container_6551P56_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_DeactivateTrace_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_DeactivateTrace; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_DeactivateTrace_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_DeactivateTrace_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_DeactivateTrace_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Direct-Forwarding-Path-Availability.c000066400000000000000000000047421333553357400254460ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Direct-Forwarding-Path-Availability.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_Direct_Forwarding_Path_Availability_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_Direct_Forwarding_Path_Availability_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_Direct_Forwarding_Path_Availability_value2enum_1[] = { { 0, 19, "directPathAvailable" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_Direct_Forwarding_Path_Availability_enum2value_1[] = { 0 /* directPathAvailable(0) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_Direct_Forwarding_Path_Availability_specs_1 = { asn_MAP_S1AP_Direct_Forwarding_Path_Availability_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_Direct_Forwarding_Path_Availability_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_Direct_Forwarding_Path_Availability_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Direct_Forwarding_Path_Availability = { "Direct-Forwarding-Path-Availability", "Direct-Forwarding-Path-Availability", &asn_OP_NativeEnumerated, asn_DEF_S1AP_Direct_Forwarding_Path_Availability_tags_1, sizeof(asn_DEF_S1AP_Direct_Forwarding_Path_Availability_tags_1) /sizeof(asn_DEF_S1AP_Direct_Forwarding_Path_Availability_tags_1[0]), /* 1 */ asn_DEF_S1AP_Direct_Forwarding_Path_Availability_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Direct_Forwarding_Path_Availability_tags_1) /sizeof(asn_DEF_S1AP_Direct_Forwarding_Path_Availability_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_Direct_Forwarding_Path_Availability_constr_1, &asn_PER_type_S1AP_Direct_Forwarding_Path_Availability_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_Direct_Forwarding_Path_Availability_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Direct-Forwarding-Path-Availability.h000066400000000000000000000036241333553357400254510ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Direct_Forwarding_Path_Availability_H_ #define _S1AP_Direct_Forwarding_Path_Availability_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_Direct_Forwarding_Path_Availability { S1AP_Direct_Forwarding_Path_Availability_directPathAvailable = 0 /* * Enumeration is extensible */ } e_S1AP_Direct_Forwarding_Path_Availability; /* S1AP_Direct-Forwarding-Path-Availability */ typedef long S1AP_Direct_Forwarding_Path_Availability_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Direct_Forwarding_Path_Availability; asn_struct_free_f S1AP_Direct_Forwarding_Path_Availability_free; asn_struct_print_f S1AP_Direct_Forwarding_Path_Availability_print; asn_constr_check_f S1AP_Direct_Forwarding_Path_Availability_constraint; ber_type_decoder_f S1AP_Direct_Forwarding_Path_Availability_decode_ber; der_type_encoder_f S1AP_Direct_Forwarding_Path_Availability_encode_der; xer_type_decoder_f S1AP_Direct_Forwarding_Path_Availability_decode_xer; xer_type_encoder_f S1AP_Direct_Forwarding_Path_Availability_encode_xer; oer_type_decoder_f S1AP_Direct_Forwarding_Path_Availability_decode_oer; oer_type_encoder_f S1AP_Direct_Forwarding_Path_Availability_encode_oer; per_type_decoder_f S1AP_Direct_Forwarding_Path_Availability_decode_uper; per_type_encoder_f S1AP_Direct_Forwarding_Path_Availability_encode_uper; per_type_decoder_f S1AP_Direct_Forwarding_Path_Availability_decode_aper; per_type_encoder_f S1AP_Direct_Forwarding_Path_Availability_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Direct_Forwarding_Path_Availability_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_DownlinkNASTransport.c000066400000000000000000000034601333553357400226720ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_DownlinkNASTransport.h" asn_TYPE_member_t asn_MBR_S1AP_DownlinkNASTransport_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkNASTransport, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P31, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_DownlinkNASTransport_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_DownlinkNASTransport_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_DownlinkNASTransport_specs_1 = { sizeof(struct S1AP_DownlinkNASTransport), offsetof(struct S1AP_DownlinkNASTransport, _asn_ctx), asn_MAP_S1AP_DownlinkNASTransport_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_DownlinkNASTransport = { "DownlinkNASTransport", "DownlinkNASTransport", &asn_OP_SEQUENCE, asn_DEF_S1AP_DownlinkNASTransport_tags_1, sizeof(asn_DEF_S1AP_DownlinkNASTransport_tags_1) /sizeof(asn_DEF_S1AP_DownlinkNASTransport_tags_1[0]), /* 1 */ asn_DEF_S1AP_DownlinkNASTransport_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_DownlinkNASTransport_tags_1) /sizeof(asn_DEF_S1AP_DownlinkNASTransport_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_DownlinkNASTransport_1, 1, /* Elements count */ &asn_SPC_S1AP_DownlinkNASTransport_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_DownlinkNASTransport.h000066400000000000000000000021371333553357400226770ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_DownlinkNASTransport_H_ #define _S1AP_DownlinkNASTransport_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_DownlinkNASTransport */ typedef struct S1AP_DownlinkNASTransport { S1AP_ProtocolIE_Container_6551P31_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_DownlinkNASTransport_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_DownlinkNASTransport; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_DownlinkNASTransport_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_DownlinkNASTransport_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_DownlinkNASTransport_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_DownlinkNonUEAssociatedLPPaTransport.c000066400000000000000000000041601333553357400257500ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_DownlinkNonUEAssociatedLPPaTransport.h" asn_TYPE_member_t asn_MBR_S1AP_DownlinkNonUEAssociatedLPPaTransport_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkNonUEAssociatedLPPaTransport, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P75, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_DownlinkNonUEAssociatedLPPaTransport_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_DownlinkNonUEAssociatedLPPaTransport_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_DownlinkNonUEAssociatedLPPaTransport_specs_1 = { sizeof(struct S1AP_DownlinkNonUEAssociatedLPPaTransport), offsetof(struct S1AP_DownlinkNonUEAssociatedLPPaTransport, _asn_ctx), asn_MAP_S1AP_DownlinkNonUEAssociatedLPPaTransport_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_DownlinkNonUEAssociatedLPPaTransport = { "DownlinkNonUEAssociatedLPPaTransport", "DownlinkNonUEAssociatedLPPaTransport", &asn_OP_SEQUENCE, asn_DEF_S1AP_DownlinkNonUEAssociatedLPPaTransport_tags_1, sizeof(asn_DEF_S1AP_DownlinkNonUEAssociatedLPPaTransport_tags_1) /sizeof(asn_DEF_S1AP_DownlinkNonUEAssociatedLPPaTransport_tags_1[0]), /* 1 */ asn_DEF_S1AP_DownlinkNonUEAssociatedLPPaTransport_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_DownlinkNonUEAssociatedLPPaTransport_tags_1) /sizeof(asn_DEF_S1AP_DownlinkNonUEAssociatedLPPaTransport_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_DownlinkNonUEAssociatedLPPaTransport_1, 1, /* Elements count */ &asn_SPC_S1AP_DownlinkNonUEAssociatedLPPaTransport_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_DownlinkNonUEAssociatedLPPaTransport.h000066400000000000000000000023571333553357400257630ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_DownlinkNonUEAssociatedLPPaTransport_H_ #define _S1AP_DownlinkNonUEAssociatedLPPaTransport_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_DownlinkNonUEAssociatedLPPaTransport */ typedef struct S1AP_DownlinkNonUEAssociatedLPPaTransport { S1AP_ProtocolIE_Container_6551P75_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_DownlinkNonUEAssociatedLPPaTransport_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_DownlinkNonUEAssociatedLPPaTransport; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_DownlinkNonUEAssociatedLPPaTransport_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_DownlinkNonUEAssociatedLPPaTransport_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_DownlinkNonUEAssociatedLPPaTransport_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_DownlinkS1cdma2000tunnelling.c000066400000000000000000000037201333553357400240450ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_DownlinkS1cdma2000tunnelling.h" asn_TYPE_member_t asn_MBR_S1AP_DownlinkS1cdma2000tunnelling_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkS1cdma2000tunnelling, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P49, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_DownlinkS1cdma2000tunnelling_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_DownlinkS1cdma2000tunnelling_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_DownlinkS1cdma2000tunnelling_specs_1 = { sizeof(struct S1AP_DownlinkS1cdma2000tunnelling), offsetof(struct S1AP_DownlinkS1cdma2000tunnelling, _asn_ctx), asn_MAP_S1AP_DownlinkS1cdma2000tunnelling_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_DownlinkS1cdma2000tunnelling = { "DownlinkS1cdma2000tunnelling", "DownlinkS1cdma2000tunnelling", &asn_OP_SEQUENCE, asn_DEF_S1AP_DownlinkS1cdma2000tunnelling_tags_1, sizeof(asn_DEF_S1AP_DownlinkS1cdma2000tunnelling_tags_1) /sizeof(asn_DEF_S1AP_DownlinkS1cdma2000tunnelling_tags_1[0]), /* 1 */ asn_DEF_S1AP_DownlinkS1cdma2000tunnelling_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_DownlinkS1cdma2000tunnelling_tags_1) /sizeof(asn_DEF_S1AP_DownlinkS1cdma2000tunnelling_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_DownlinkS1cdma2000tunnelling_1, 1, /* Elements count */ &asn_SPC_S1AP_DownlinkS1cdma2000tunnelling_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_DownlinkS1cdma2000tunnelling.h000066400000000000000000000022471333553357400240550ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_DownlinkS1cdma2000tunnelling_H_ #define _S1AP_DownlinkS1cdma2000tunnelling_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_DownlinkS1cdma2000tunnelling */ typedef struct S1AP_DownlinkS1cdma2000tunnelling { S1AP_ProtocolIE_Container_6551P49_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_DownlinkS1cdma2000tunnelling_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_DownlinkS1cdma2000tunnelling; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_DownlinkS1cdma2000tunnelling_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_DownlinkS1cdma2000tunnelling_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_DownlinkS1cdma2000tunnelling_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_DownlinkUEAssociatedLPPaTransport.c000066400000000000000000000040641333553357400253000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_DownlinkUEAssociatedLPPaTransport.h" asn_TYPE_member_t asn_MBR_S1AP_DownlinkUEAssociatedLPPaTransport_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkUEAssociatedLPPaTransport, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P73, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_DownlinkUEAssociatedLPPaTransport_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_DownlinkUEAssociatedLPPaTransport_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_DownlinkUEAssociatedLPPaTransport_specs_1 = { sizeof(struct S1AP_DownlinkUEAssociatedLPPaTransport), offsetof(struct S1AP_DownlinkUEAssociatedLPPaTransport, _asn_ctx), asn_MAP_S1AP_DownlinkUEAssociatedLPPaTransport_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_DownlinkUEAssociatedLPPaTransport = { "DownlinkUEAssociatedLPPaTransport", "DownlinkUEAssociatedLPPaTransport", &asn_OP_SEQUENCE, asn_DEF_S1AP_DownlinkUEAssociatedLPPaTransport_tags_1, sizeof(asn_DEF_S1AP_DownlinkUEAssociatedLPPaTransport_tags_1) /sizeof(asn_DEF_S1AP_DownlinkUEAssociatedLPPaTransport_tags_1[0]), /* 1 */ asn_DEF_S1AP_DownlinkUEAssociatedLPPaTransport_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_DownlinkUEAssociatedLPPaTransport_tags_1) /sizeof(asn_DEF_S1AP_DownlinkUEAssociatedLPPaTransport_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_DownlinkUEAssociatedLPPaTransport_1, 1, /* Elements count */ &asn_SPC_S1AP_DownlinkUEAssociatedLPPaTransport_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_DownlinkUEAssociatedLPPaTransport.h000066400000000000000000000023241333553357400253020ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_DownlinkUEAssociatedLPPaTransport_H_ #define _S1AP_DownlinkUEAssociatedLPPaTransport_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_DownlinkUEAssociatedLPPaTransport */ typedef struct S1AP_DownlinkUEAssociatedLPPaTransport { S1AP_ProtocolIE_Container_6551P73_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_DownlinkUEAssociatedLPPaTransport_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_DownlinkUEAssociatedLPPaTransport; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_DownlinkUEAssociatedLPPaTransport_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_DownlinkUEAssociatedLPPaTransport_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_DownlinkUEAssociatedLPPaTransport_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RAB-ID.c000066400000000000000000000034241333553357400177060ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RAB-ID.h" int S1AP_E_RAB_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 15)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_E_RAB_ID_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_E_RAB_ID_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 15 } /* (0..15,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RAB_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RAB_ID = { "E-RAB-ID", "E-RAB-ID", &asn_OP_NativeInteger, asn_DEF_S1AP_E_RAB_ID_tags_1, sizeof(asn_DEF_S1AP_E_RAB_ID_tags_1) /sizeof(asn_DEF_S1AP_E_RAB_ID_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RAB_ID_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RAB_ID_tags_1) /sizeof(asn_DEF_S1AP_E_RAB_ID_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_E_RAB_ID_constr_1, &asn_PER_type_S1AP_E_RAB_ID_constr_1, S1AP_E_RAB_ID_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RAB-ID.h000066400000000000000000000023571333553357400177170ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RAB_ID_H_ #define _S1AP_E_RAB_ID_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_E-RAB-ID */ typedef long S1AP_E_RAB_ID_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_E_RAB_ID_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RAB_ID; asn_struct_free_f S1AP_E_RAB_ID_free; asn_struct_print_f S1AP_E_RAB_ID_print; asn_constr_check_f S1AP_E_RAB_ID_constraint; ber_type_decoder_f S1AP_E_RAB_ID_decode_ber; der_type_encoder_f S1AP_E_RAB_ID_encode_der; xer_type_decoder_f S1AP_E_RAB_ID_decode_xer; xer_type_encoder_f S1AP_E_RAB_ID_encode_xer; oer_type_decoder_f S1AP_E_RAB_ID_decode_oer; oer_type_encoder_f S1AP_E_RAB_ID_encode_oer; per_type_decoder_f S1AP_E_RAB_ID_decode_uper; per_type_encoder_f S1AP_E_RAB_ID_encode_uper; per_type_decoder_f S1AP_E_RAB_ID_decode_aper; per_type_encoder_f S1AP_E_RAB_ID_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RAB_ID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RAB-IE-ContainerList.c000066400000000000000000000526641333553357400224750ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RAB-IE-ContainerList.h" int S1AP_E_RAB_IE_ContainerList_1142P0_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } /* Determine the number of elements */ size = _A_CSEQUENCE_FROM_VOID(sptr)->count; if((size >= 1 && size <= 256)) { /* Perform validation of the inner elements */ return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using S1AP_ProtocolIE_ContainerList_6588P0, * so here we adjust the DEF accordingly. */ int S1AP_E_RAB_IE_ContainerList_1142P1_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } /* Determine the number of elements */ size = _A_CSEQUENCE_FROM_VOID(sptr)->count; if((size >= 1 && size <= 256)) { /* Perform validation of the inner elements */ return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using S1AP_ProtocolIE_ContainerList_6588P1, * so here we adjust the DEF accordingly. */ int S1AP_E_RAB_IE_ContainerList_1142P2_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } /* Determine the number of elements */ size = _A_CSEQUENCE_FROM_VOID(sptr)->count; if((size >= 1 && size <= 256)) { /* Perform validation of the inner elements */ return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using S1AP_ProtocolIE_ContainerList_6588P2, * so here we adjust the DEF accordingly. */ int S1AP_E_RAB_IE_ContainerList_1142P3_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } /* Determine the number of elements */ size = _A_CSEQUENCE_FROM_VOID(sptr)->count; if((size >= 1 && size <= 256)) { /* Perform validation of the inner elements */ return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using S1AP_ProtocolIE_ContainerList_6588P3, * so here we adjust the DEF accordingly. */ int S1AP_E_RAB_IE_ContainerList_1142P4_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } /* Determine the number of elements */ size = _A_CSEQUENCE_FROM_VOID(sptr)->count; if((size >= 1 && size <= 256)) { /* Perform validation of the inner elements */ return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using S1AP_ProtocolIE_ContainerList_6588P4, * so here we adjust the DEF accordingly. */ int S1AP_E_RAB_IE_ContainerList_1142P5_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } /* Determine the number of elements */ size = _A_CSEQUENCE_FROM_VOID(sptr)->count; if((size >= 1 && size <= 256)) { /* Perform validation of the inner elements */ return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using S1AP_ProtocolIE_ContainerList_6588P5, * so here we adjust the DEF accordingly. */ int S1AP_E_RAB_IE_ContainerList_1142P6_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } /* Determine the number of elements */ size = _A_CSEQUENCE_FROM_VOID(sptr)->count; if((size >= 1 && size <= 256)) { /* Perform validation of the inner elements */ return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using S1AP_ProtocolIE_ContainerList_6588P6, * so here we adjust the DEF accordingly. */ int S1AP_E_RAB_IE_ContainerList_1142P7_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } /* Determine the number of elements */ size = _A_CSEQUENCE_FROM_VOID(sptr)->count; if((size >= 1 && size <= 256)) { /* Perform validation of the inner elements */ return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using S1AP_ProtocolIE_ContainerList_6588P7, * so here we adjust the DEF accordingly. */ int S1AP_E_RAB_IE_ContainerList_1142P8_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } /* Determine the number of elements */ size = _A_CSEQUENCE_FROM_VOID(sptr)->count; if((size >= 1 && size <= 256)) { /* Perform validation of the inner elements */ return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using S1AP_ProtocolIE_ContainerList_6588P8, * so here we adjust the DEF accordingly. */ int S1AP_E_RAB_IE_ContainerList_1142P9_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } /* Determine the number of elements */ size = _A_CSEQUENCE_FROM_VOID(sptr)->count; if((size >= 1 && size <= 256)) { /* Perform validation of the inner elements */ return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using S1AP_ProtocolIE_ContainerList_6588P9, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_E_RAB_IE_ContainerList_1142P0_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P0_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_E_RAB_IE_ContainerList_1142P1_constr_2 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P1_constr_2 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_E_RAB_IE_ContainerList_1142P2_constr_3 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P2_constr_3 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_E_RAB_IE_ContainerList_1142P3_constr_4 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P3_constr_4 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_E_RAB_IE_ContainerList_1142P4_constr_5 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P4_constr_5 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_E_RAB_IE_ContainerList_1142P5_constr_6 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P5_constr_6 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_E_RAB_IE_ContainerList_1142P6_constr_7 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P6_constr_7 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_E_RAB_IE_ContainerList_1142P7_constr_8 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P7_constr_8 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_E_RAB_IE_ContainerList_1142P8_constr_9 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P8_constr_9 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_E_RAB_IE_ContainerList_1142P9_constr_10 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P9_constr_10 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P0_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P0 = { "E-RAB-IE-ContainerList", "E-RAB-IE-ContainerList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P0_tags_1, sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P0_tags_1) /sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P0_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P0_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P0_tags_1) /sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P0_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_E_RAB_IE_ContainerList_1142P0_constr_1, &asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P0_constr_1, S1AP_E_RAB_IE_ContainerList_1142P0_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P0_1, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P0_specs_1 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P1_tags_2[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P1 = { "E-RAB-IE-ContainerList", "E-RAB-IE-ContainerList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P1_tags_2, sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P1_tags_2) /sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P1_tags_2[0]), /* 1 */ asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P1_tags_2, /* Same as above */ sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P1_tags_2) /sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P1_tags_2[0]), /* 1 */ { &asn_OER_type_S1AP_E_RAB_IE_ContainerList_1142P1_constr_2, &asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P1_constr_2, S1AP_E_RAB_IE_ContainerList_1142P1_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P1_3, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P1_specs_3 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P2_tags_3[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P2 = { "E-RAB-IE-ContainerList", "E-RAB-IE-ContainerList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P2_tags_3, sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P2_tags_3) /sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P2_tags_3[0]), /* 1 */ asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P2_tags_3, /* Same as above */ sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P2_tags_3) /sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P2_tags_3[0]), /* 1 */ { &asn_OER_type_S1AP_E_RAB_IE_ContainerList_1142P2_constr_3, &asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P2_constr_3, S1AP_E_RAB_IE_ContainerList_1142P2_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P2_5, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P2_specs_5 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P3_tags_4[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P3 = { "E-RAB-IE-ContainerList", "E-RAB-IE-ContainerList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P3_tags_4, sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P3_tags_4) /sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P3_tags_4[0]), /* 1 */ asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P3_tags_4, /* Same as above */ sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P3_tags_4) /sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P3_tags_4[0]), /* 1 */ { &asn_OER_type_S1AP_E_RAB_IE_ContainerList_1142P3_constr_4, &asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P3_constr_4, S1AP_E_RAB_IE_ContainerList_1142P3_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P3_7, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P3_specs_7 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P4_tags_5[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P4 = { "E-RAB-IE-ContainerList", "E-RAB-IE-ContainerList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P4_tags_5, sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P4_tags_5) /sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P4_tags_5[0]), /* 1 */ asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P4_tags_5, /* Same as above */ sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P4_tags_5) /sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P4_tags_5[0]), /* 1 */ { &asn_OER_type_S1AP_E_RAB_IE_ContainerList_1142P4_constr_5, &asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P4_constr_5, S1AP_E_RAB_IE_ContainerList_1142P4_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P4_9, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P4_specs_9 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P5_tags_6[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P5 = { "E-RAB-IE-ContainerList", "E-RAB-IE-ContainerList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P5_tags_6, sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P5_tags_6) /sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P5_tags_6[0]), /* 1 */ asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P5_tags_6, /* Same as above */ sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P5_tags_6) /sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P5_tags_6[0]), /* 1 */ { &asn_OER_type_S1AP_E_RAB_IE_ContainerList_1142P5_constr_6, &asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P5_constr_6, S1AP_E_RAB_IE_ContainerList_1142P5_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P5_11, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P5_specs_11 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P6_tags_7[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P6 = { "E-RAB-IE-ContainerList", "E-RAB-IE-ContainerList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P6_tags_7, sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P6_tags_7) /sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P6_tags_7[0]), /* 1 */ asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P6_tags_7, /* Same as above */ sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P6_tags_7) /sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P6_tags_7[0]), /* 1 */ { &asn_OER_type_S1AP_E_RAB_IE_ContainerList_1142P6_constr_7, &asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P6_constr_7, S1AP_E_RAB_IE_ContainerList_1142P6_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P6_13, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P6_specs_13 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P7_tags_8[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P7 = { "E-RAB-IE-ContainerList", "E-RAB-IE-ContainerList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P7_tags_8, sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P7_tags_8) /sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P7_tags_8[0]), /* 1 */ asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P7_tags_8, /* Same as above */ sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P7_tags_8) /sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P7_tags_8[0]), /* 1 */ { &asn_OER_type_S1AP_E_RAB_IE_ContainerList_1142P7_constr_8, &asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P7_constr_8, S1AP_E_RAB_IE_ContainerList_1142P7_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P7_15, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P7_specs_15 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P8_tags_9[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P8 = { "E-RAB-IE-ContainerList", "E-RAB-IE-ContainerList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P8_tags_9, sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P8_tags_9) /sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P8_tags_9[0]), /* 1 */ asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P8_tags_9, /* Same as above */ sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P8_tags_9) /sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P8_tags_9[0]), /* 1 */ { &asn_OER_type_S1AP_E_RAB_IE_ContainerList_1142P8_constr_9, &asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P8_constr_9, S1AP_E_RAB_IE_ContainerList_1142P8_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P8_17, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P8_specs_17 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P9_tags_10[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P9 = { "E-RAB-IE-ContainerList", "E-RAB-IE-ContainerList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P9_tags_10, sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P9_tags_10) /sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P9_tags_10[0]), /* 1 */ asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P9_tags_10, /* Same as above */ sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P9_tags_10) /sizeof(asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P9_tags_10[0]), /* 1 */ { &asn_OER_type_S1AP_E_RAB_IE_ContainerList_1142P9_constr_10, &asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P9_constr_10, S1AP_E_RAB_IE_ContainerList_1142P9_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P9_19, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P9_specs_19 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RAB-IE-ContainerList.h000066400000000000000000000264731333553357400225010ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RAB_IE_ContainerList_H_ #define _S1AP_E_RAB_IE_ContainerList_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-ContainerList.h" #ifdef __cplusplus extern "C" { #endif /* S1AP_E-RAB-IE-ContainerList */ typedef S1AP_ProtocolIE_ContainerList_6588P0_t S1AP_E_RAB_IE_ContainerList_1142P0_t; typedef S1AP_ProtocolIE_ContainerList_6588P1_t S1AP_E_RAB_IE_ContainerList_1142P1_t; typedef S1AP_ProtocolIE_ContainerList_6588P2_t S1AP_E_RAB_IE_ContainerList_1142P2_t; typedef S1AP_ProtocolIE_ContainerList_6588P3_t S1AP_E_RAB_IE_ContainerList_1142P3_t; typedef S1AP_ProtocolIE_ContainerList_6588P4_t S1AP_E_RAB_IE_ContainerList_1142P4_t; typedef S1AP_ProtocolIE_ContainerList_6588P5_t S1AP_E_RAB_IE_ContainerList_1142P5_t; typedef S1AP_ProtocolIE_ContainerList_6588P6_t S1AP_E_RAB_IE_ContainerList_1142P6_t; typedef S1AP_ProtocolIE_ContainerList_6588P7_t S1AP_E_RAB_IE_ContainerList_1142P7_t; typedef S1AP_ProtocolIE_ContainerList_6588P8_t S1AP_E_RAB_IE_ContainerList_1142P8_t; typedef S1AP_ProtocolIE_ContainerList_6588P9_t S1AP_E_RAB_IE_ContainerList_1142P9_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P0_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P0; asn_struct_free_f S1AP_E_RAB_IE_ContainerList_1142P0_free; asn_struct_print_f S1AP_E_RAB_IE_ContainerList_1142P0_print; asn_constr_check_f S1AP_E_RAB_IE_ContainerList_1142P0_constraint; ber_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P0_decode_ber; der_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P0_encode_der; xer_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P0_decode_xer; xer_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P0_encode_xer; oer_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P0_decode_oer; oer_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P0_encode_oer; per_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P0_decode_uper; per_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P0_encode_uper; per_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P0_decode_aper; per_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P0_encode_aper; extern asn_per_constraints_t asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P1_constr_2; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P1; asn_struct_free_f S1AP_E_RAB_IE_ContainerList_1142P1_free; asn_struct_print_f S1AP_E_RAB_IE_ContainerList_1142P1_print; asn_constr_check_f S1AP_E_RAB_IE_ContainerList_1142P1_constraint; ber_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P1_decode_ber; der_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P1_encode_der; xer_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P1_decode_xer; xer_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P1_encode_xer; oer_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P1_decode_oer; oer_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P1_encode_oer; per_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P1_decode_uper; per_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P1_encode_uper; per_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P1_decode_aper; per_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P1_encode_aper; extern asn_per_constraints_t asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P2_constr_3; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P2; asn_struct_free_f S1AP_E_RAB_IE_ContainerList_1142P2_free; asn_struct_print_f S1AP_E_RAB_IE_ContainerList_1142P2_print; asn_constr_check_f S1AP_E_RAB_IE_ContainerList_1142P2_constraint; ber_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P2_decode_ber; der_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P2_encode_der; xer_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P2_decode_xer; xer_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P2_encode_xer; oer_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P2_decode_oer; oer_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P2_encode_oer; per_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P2_decode_uper; per_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P2_encode_uper; per_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P2_decode_aper; per_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P2_encode_aper; extern asn_per_constraints_t asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P3_constr_4; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P3; asn_struct_free_f S1AP_E_RAB_IE_ContainerList_1142P3_free; asn_struct_print_f S1AP_E_RAB_IE_ContainerList_1142P3_print; asn_constr_check_f S1AP_E_RAB_IE_ContainerList_1142P3_constraint; ber_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P3_decode_ber; der_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P3_encode_der; xer_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P3_decode_xer; xer_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P3_encode_xer; oer_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P3_decode_oer; oer_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P3_encode_oer; per_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P3_decode_uper; per_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P3_encode_uper; per_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P3_decode_aper; per_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P3_encode_aper; extern asn_per_constraints_t asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P4_constr_5; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P4; asn_struct_free_f S1AP_E_RAB_IE_ContainerList_1142P4_free; asn_struct_print_f S1AP_E_RAB_IE_ContainerList_1142P4_print; asn_constr_check_f S1AP_E_RAB_IE_ContainerList_1142P4_constraint; ber_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P4_decode_ber; der_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P4_encode_der; xer_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P4_decode_xer; xer_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P4_encode_xer; oer_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P4_decode_oer; oer_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P4_encode_oer; per_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P4_decode_uper; per_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P4_encode_uper; per_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P4_decode_aper; per_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P4_encode_aper; extern asn_per_constraints_t asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P5_constr_6; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P5; asn_struct_free_f S1AP_E_RAB_IE_ContainerList_1142P5_free; asn_struct_print_f S1AP_E_RAB_IE_ContainerList_1142P5_print; asn_constr_check_f S1AP_E_RAB_IE_ContainerList_1142P5_constraint; ber_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P5_decode_ber; der_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P5_encode_der; xer_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P5_decode_xer; xer_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P5_encode_xer; oer_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P5_decode_oer; oer_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P5_encode_oer; per_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P5_decode_uper; per_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P5_encode_uper; per_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P5_decode_aper; per_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P5_encode_aper; extern asn_per_constraints_t asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P6_constr_7; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P6; asn_struct_free_f S1AP_E_RAB_IE_ContainerList_1142P6_free; asn_struct_print_f S1AP_E_RAB_IE_ContainerList_1142P6_print; asn_constr_check_f S1AP_E_RAB_IE_ContainerList_1142P6_constraint; ber_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P6_decode_ber; der_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P6_encode_der; xer_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P6_decode_xer; xer_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P6_encode_xer; oer_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P6_decode_oer; oer_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P6_encode_oer; per_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P6_decode_uper; per_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P6_encode_uper; per_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P6_decode_aper; per_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P6_encode_aper; extern asn_per_constraints_t asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P7_constr_8; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P7; asn_struct_free_f S1AP_E_RAB_IE_ContainerList_1142P7_free; asn_struct_print_f S1AP_E_RAB_IE_ContainerList_1142P7_print; asn_constr_check_f S1AP_E_RAB_IE_ContainerList_1142P7_constraint; ber_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P7_decode_ber; der_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P7_encode_der; xer_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P7_decode_xer; xer_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P7_encode_xer; oer_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P7_decode_oer; oer_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P7_encode_oer; per_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P7_decode_uper; per_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P7_encode_uper; per_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P7_decode_aper; per_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P7_encode_aper; extern asn_per_constraints_t asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P8_constr_9; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P8; asn_struct_free_f S1AP_E_RAB_IE_ContainerList_1142P8_free; asn_struct_print_f S1AP_E_RAB_IE_ContainerList_1142P8_print; asn_constr_check_f S1AP_E_RAB_IE_ContainerList_1142P8_constraint; ber_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P8_decode_ber; der_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P8_encode_der; xer_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P8_decode_xer; xer_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P8_encode_xer; oer_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P8_decode_oer; oer_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P8_encode_oer; per_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P8_decode_uper; per_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P8_encode_uper; per_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P8_decode_aper; per_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P8_encode_aper; extern asn_per_constraints_t asn_PER_type_S1AP_E_RAB_IE_ContainerList_1142P9_constr_10; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RAB_IE_ContainerList_1142P9; asn_struct_free_f S1AP_E_RAB_IE_ContainerList_1142P9_free; asn_struct_print_f S1AP_E_RAB_IE_ContainerList_1142P9_print; asn_constr_check_f S1AP_E_RAB_IE_ContainerList_1142P9_constraint; ber_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P9_decode_ber; der_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P9_encode_der; xer_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P9_decode_xer; xer_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P9_encode_xer; oer_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P9_decode_oer; oer_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P9_encode_oer; per_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P9_decode_uper; per_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P9_encode_uper; per_type_decoder_f S1AP_E_RAB_IE_ContainerList_1142P9_decode_aper; per_type_encoder_f S1AP_E_RAB_IE_ContainerList_1142P9_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RAB_IE_ContainerList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RAB-IE-ContainerPairList.h000066400000000000000000000007531333553357400233060ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RAB_IE_ContainerPairList_H_ #define _S1AP_E_RAB_IE_ContainerPairList_H_ #include #ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus } #endif #endif /* _S1AP_E_RAB_IE_ContainerPairList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABAdmittedItem.c000066400000000000000000000104011333553357400217000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABAdmittedItem.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_E_RABAdmittedItem_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABAdmittedItem, e_RAB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RAB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABAdmittedItem, transportLayerAddress), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "transportLayerAddress" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABAdmittedItem, gTP_TEID), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_GTP_TEID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "gTP-TEID" }, { ATF_POINTER, 5, offsetof(struct S1AP_E_RABAdmittedItem, dL_transportLayerAddress), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "dL-transportLayerAddress" }, { ATF_POINTER, 4, offsetof(struct S1AP_E_RABAdmittedItem, dL_gTP_TEID), (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_GTP_TEID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "dL-gTP-TEID" }, { ATF_POINTER, 3, offsetof(struct S1AP_E_RABAdmittedItem, uL_TransportLayerAddress), (ASN_TAG_CLASS_CONTEXT | (5 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "uL-TransportLayerAddress" }, { ATF_POINTER, 2, offsetof(struct S1AP_E_RABAdmittedItem, uL_GTP_TEID), (ASN_TAG_CLASS_CONTEXT | (6 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_GTP_TEID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "uL-GTP-TEID" }, { ATF_POINTER, 1, offsetof(struct S1AP_E_RABAdmittedItem, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (7 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P2, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_E_RABAdmittedItem_oms_1[] = { 3, 4, 5, 6, 7 }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABAdmittedItem_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABAdmittedItem_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-RAB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* transportLayerAddress */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* gTP-TEID */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* dL-transportLayerAddress */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* dL-gTP-TEID */ { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 }, /* uL-TransportLayerAddress */ { (ASN_TAG_CLASS_CONTEXT | (6 << 2)), 6, 0, 0 }, /* uL-GTP-TEID */ { (ASN_TAG_CLASS_CONTEXT | (7 << 2)), 7, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABAdmittedItem_specs_1 = { sizeof(struct S1AP_E_RABAdmittedItem), offsetof(struct S1AP_E_RABAdmittedItem, _asn_ctx), asn_MAP_S1AP_E_RABAdmittedItem_tag2el_1, 8, /* Count of tags in the map */ asn_MAP_S1AP_E_RABAdmittedItem_oms_1, /* Optional members */ 5, 0, /* Root/Additions */ 8, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABAdmittedItem = { "E-RABAdmittedItem", "E-RABAdmittedItem", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABAdmittedItem_tags_1, sizeof(asn_DEF_S1AP_E_RABAdmittedItem_tags_1) /sizeof(asn_DEF_S1AP_E_RABAdmittedItem_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABAdmittedItem_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABAdmittedItem_tags_1) /sizeof(asn_DEF_S1AP_E_RABAdmittedItem_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABAdmittedItem_1, 8, /* Elements count */ &asn_SPC_S1AP_E_RABAdmittedItem_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABAdmittedItem.h000066400000000000000000000026471333553357400217220ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABAdmittedItem_H_ #define _S1AP_E_RABAdmittedItem_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-ID.h" #include "S1AP_TransportLayerAddress.h" #include "S1AP_GTP-TEID.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_E-RABAdmittedItem */ typedef struct S1AP_E_RABAdmittedItem { S1AP_E_RAB_ID_t e_RAB_ID; S1AP_TransportLayerAddress_t transportLayerAddress; S1AP_GTP_TEID_t gTP_TEID; S1AP_TransportLayerAddress_t *dL_transportLayerAddress; /* OPTIONAL */ S1AP_GTP_TEID_t *dL_gTP_TEID; /* OPTIONAL */ S1AP_TransportLayerAddress_t *uL_TransportLayerAddress; /* OPTIONAL */ S1AP_GTP_TEID_t *uL_GTP_TEID; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABAdmittedItem_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABAdmittedItem; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABAdmittedItem_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABAdmittedList.c000066400000000000000000000043201333553357400217200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABAdmittedList.h" int S1AP_E_RABAdmittedList_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } /* Determine the number of elements */ size = _A_CSEQUENCE_FROM_VOID(sptr)->count; if((size >= 1 && size <= 256)) { /* Perform validation of the inner elements */ return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using S1AP_E_RAB_IE_ContainerList_1142P2, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_E_RABAdmittedList_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_E_RABAdmittedList_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABAdmittedList_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABAdmittedList = { "E-RABAdmittedList", "E-RABAdmittedList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RABAdmittedList_tags_1, sizeof(asn_DEF_S1AP_E_RABAdmittedList_tags_1) /sizeof(asn_DEF_S1AP_E_RABAdmittedList_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABAdmittedList_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABAdmittedList_tags_1) /sizeof(asn_DEF_S1AP_E_RABAdmittedList_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_E_RABAdmittedList_constr_1, &asn_PER_type_S1AP_E_RABAdmittedList_constr_1, S1AP_E_RABAdmittedList_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P2_5, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P2_specs_5 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABAdmittedList.h000066400000000000000000000026171333553357400217340ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABAdmittedList_H_ #define _S1AP_E_RABAdmittedList_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-IE-ContainerList.h" #ifdef __cplusplus extern "C" { #endif /* S1AP_E-RABAdmittedList */ typedef S1AP_E_RAB_IE_ContainerList_1142P2_t S1AP_E_RABAdmittedList_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABAdmittedList; asn_struct_free_f S1AP_E_RABAdmittedList_free; asn_struct_print_f S1AP_E_RABAdmittedList_print; asn_constr_check_f S1AP_E_RABAdmittedList_constraint; ber_type_decoder_f S1AP_E_RABAdmittedList_decode_ber; der_type_encoder_f S1AP_E_RABAdmittedList_encode_der; xer_type_decoder_f S1AP_E_RABAdmittedList_decode_xer; xer_type_encoder_f S1AP_E_RABAdmittedList_encode_xer; oer_type_decoder_f S1AP_E_RABAdmittedList_decode_oer; oer_type_encoder_f S1AP_E_RABAdmittedList_encode_oer; per_type_decoder_f S1AP_E_RABAdmittedList_decode_uper; per_type_encoder_f S1AP_E_RABAdmittedList_encode_uper; per_type_decoder_f S1AP_E_RABAdmittedList_decode_aper; per_type_encoder_f S1AP_E_RABAdmittedList_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABAdmittedList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABDataForwardingItem.c000066400000000000000000000073751333553357400230610ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABDataForwardingItem.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_E_RABDataForwardingItem_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABDataForwardingItem, e_RAB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RAB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-ID" }, { ATF_POINTER, 5, offsetof(struct S1AP_E_RABDataForwardingItem, dL_transportLayerAddress), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "dL-transportLayerAddress" }, { ATF_POINTER, 4, offsetof(struct S1AP_E_RABDataForwardingItem, dL_gTP_TEID), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_GTP_TEID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "dL-gTP-TEID" }, { ATF_POINTER, 3, offsetof(struct S1AP_E_RABDataForwardingItem, uL_TransportLayerAddress), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "uL-TransportLayerAddress" }, { ATF_POINTER, 2, offsetof(struct S1AP_E_RABDataForwardingItem, uL_GTP_TEID), (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_GTP_TEID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "uL-GTP-TEID" }, { ATF_POINTER, 1, offsetof(struct S1AP_E_RABDataForwardingItem, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (5 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P0, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_E_RABDataForwardingItem_oms_1[] = { 1, 2, 3, 4, 5 }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABDataForwardingItem_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABDataForwardingItem_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-RAB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* dL-transportLayerAddress */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* dL-gTP-TEID */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* uL-TransportLayerAddress */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* uL-GTP-TEID */ { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABDataForwardingItem_specs_1 = { sizeof(struct S1AP_E_RABDataForwardingItem), offsetof(struct S1AP_E_RABDataForwardingItem, _asn_ctx), asn_MAP_S1AP_E_RABDataForwardingItem_tag2el_1, 6, /* Count of tags in the map */ asn_MAP_S1AP_E_RABDataForwardingItem_oms_1, /* Optional members */ 5, 0, /* Root/Additions */ 6, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABDataForwardingItem = { "E-RABDataForwardingItem", "E-RABDataForwardingItem", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABDataForwardingItem_tags_1, sizeof(asn_DEF_S1AP_E_RABDataForwardingItem_tags_1) /sizeof(asn_DEF_S1AP_E_RABDataForwardingItem_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABDataForwardingItem_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABDataForwardingItem_tags_1) /sizeof(asn_DEF_S1AP_E_RABDataForwardingItem_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABDataForwardingItem_1, 6, /* Elements count */ &asn_SPC_S1AP_E_RABDataForwardingItem_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABDataForwardingItem.h000066400000000000000000000025771333553357400230650ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABDataForwardingItem_H_ #define _S1AP_E_RABDataForwardingItem_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-ID.h" #include "S1AP_TransportLayerAddress.h" #include "S1AP_GTP-TEID.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_E-RABDataForwardingItem */ typedef struct S1AP_E_RABDataForwardingItem { S1AP_E_RAB_ID_t e_RAB_ID; S1AP_TransportLayerAddress_t *dL_transportLayerAddress; /* OPTIONAL */ S1AP_GTP_TEID_t *dL_gTP_TEID; /* OPTIONAL */ S1AP_TransportLayerAddress_t *uL_TransportLayerAddress; /* OPTIONAL */ S1AP_GTP_TEID_t *uL_GTP_TEID; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABDataForwardingItem_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABDataForwardingItem; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABDataForwardingItem_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABFailedToResumeItemResumeReq.c000066400000000000000000000055651333553357400246650ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABFailedToResumeItemResumeReq.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_E_RABFailedToResumeItemResumeReq_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedToResumeItemResumeReq, e_RAB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RAB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedToResumeItemResumeReq, cause), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cause" }, { ATF_POINTER, 1, offsetof(struct S1AP_E_RABFailedToResumeItemResumeReq, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P18, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_E_RABFailedToResumeItemResumeReq_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABFailedToResumeItemResumeReq_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABFailedToResumeItemResumeReq_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-RAB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* cause */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABFailedToResumeItemResumeReq_specs_1 = { sizeof(struct S1AP_E_RABFailedToResumeItemResumeReq), offsetof(struct S1AP_E_RABFailedToResumeItemResumeReq, _asn_ctx), asn_MAP_S1AP_E_RABFailedToResumeItemResumeReq_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_E_RABFailedToResumeItemResumeReq_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedToResumeItemResumeReq = { "E-RABFailedToResumeItemResumeReq", "E-RABFailedToResumeItemResumeReq", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABFailedToResumeItemResumeReq_tags_1, sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeReq_tags_1) /sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeReq_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABFailedToResumeItemResumeReq_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeReq_tags_1) /sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeReq_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABFailedToResumeItemResumeReq_1, 3, /* Elements count */ &asn_SPC_S1AP_E_RABFailedToResumeItemResumeReq_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABFailedToResumeItemResumeReq.h000066400000000000000000000022751333553357400246650ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABFailedToResumeItemResumeReq_H_ #define _S1AP_E_RABFailedToResumeItemResumeReq_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-ID.h" #include "S1AP_Cause.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_E-RABFailedToResumeItemResumeReq */ typedef struct S1AP_E_RABFailedToResumeItemResumeReq { S1AP_E_RAB_ID_t e_RAB_ID; S1AP_Cause_t cause; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABFailedToResumeItemResumeReq_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedToResumeItemResumeReq; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABFailedToResumeItemResumeReq_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABFailedToResumeItemResumeRes.c000066400000000000000000000055651333553357400246670ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABFailedToResumeItemResumeRes.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_E_RABFailedToResumeItemResumeRes_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedToResumeItemResumeRes, e_RAB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RAB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedToResumeItemResumeRes, cause), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cause" }, { ATF_POINTER, 1, offsetof(struct S1AP_E_RABFailedToResumeItemResumeRes, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P19, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_E_RABFailedToResumeItemResumeRes_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABFailedToResumeItemResumeRes_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABFailedToResumeItemResumeRes_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-RAB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* cause */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABFailedToResumeItemResumeRes_specs_1 = { sizeof(struct S1AP_E_RABFailedToResumeItemResumeRes), offsetof(struct S1AP_E_RABFailedToResumeItemResumeRes, _asn_ctx), asn_MAP_S1AP_E_RABFailedToResumeItemResumeRes_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_E_RABFailedToResumeItemResumeRes_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedToResumeItemResumeRes = { "E-RABFailedToResumeItemResumeRes", "E-RABFailedToResumeItemResumeRes", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABFailedToResumeItemResumeRes_tags_1, sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeRes_tags_1) /sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeRes_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABFailedToResumeItemResumeRes_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeRes_tags_1) /sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeRes_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABFailedToResumeItemResumeRes_1, 3, /* Elements count */ &asn_SPC_S1AP_E_RABFailedToResumeItemResumeRes_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABFailedToResumeItemResumeRes.h000066400000000000000000000022751333553357400246670ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABFailedToResumeItemResumeRes_H_ #define _S1AP_E_RABFailedToResumeItemResumeRes_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-ID.h" #include "S1AP_Cause.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_E-RABFailedToResumeItemResumeRes */ typedef struct S1AP_E_RABFailedToResumeItemResumeRes { S1AP_E_RAB_ID_t e_RAB_ID; S1AP_Cause_t cause; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABFailedToResumeItemResumeRes_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedToResumeItemResumeRes; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABFailedToResumeItemResumeRes_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABFailedToResumeListResumeReq.c000066400000000000000000000047211333553357400246730ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABFailedToResumeListResumeReq.h" int S1AP_E_RABFailedToResumeListResumeReq_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } /* Determine the number of elements */ size = _A_CSEQUENCE_FROM_VOID(sptr)->count; if((size >= 1 && size <= 256)) { /* Perform validation of the inner elements */ return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using S1AP_E_RAB_IE_ContainerList_1142P8, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_E_RABFailedToResumeListResumeReq_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_E_RABFailedToResumeListResumeReq_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABFailedToResumeListResumeReq_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedToResumeListResumeReq = { "E-RABFailedToResumeListResumeReq", "E-RABFailedToResumeListResumeReq", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RABFailedToResumeListResumeReq_tags_1, sizeof(asn_DEF_S1AP_E_RABFailedToResumeListResumeReq_tags_1) /sizeof(asn_DEF_S1AP_E_RABFailedToResumeListResumeReq_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABFailedToResumeListResumeReq_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABFailedToResumeListResumeReq_tags_1) /sizeof(asn_DEF_S1AP_E_RABFailedToResumeListResumeReq_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_E_RABFailedToResumeListResumeReq_constr_1, &asn_PER_type_S1AP_E_RABFailedToResumeListResumeReq_constr_1, S1AP_E_RABFailedToResumeListResumeReq_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P8_17, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P8_specs_17 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABFailedToResumeListResumeReq.h000066400000000000000000000032541333553357400247000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABFailedToResumeListResumeReq_H_ #define _S1AP_E_RABFailedToResumeListResumeReq_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-IE-ContainerList.h" #ifdef __cplusplus extern "C" { #endif /* S1AP_E-RABFailedToResumeListResumeReq */ typedef S1AP_E_RAB_IE_ContainerList_1142P8_t S1AP_E_RABFailedToResumeListResumeReq_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedToResumeListResumeReq; asn_struct_free_f S1AP_E_RABFailedToResumeListResumeReq_free; asn_struct_print_f S1AP_E_RABFailedToResumeListResumeReq_print; asn_constr_check_f S1AP_E_RABFailedToResumeListResumeReq_constraint; ber_type_decoder_f S1AP_E_RABFailedToResumeListResumeReq_decode_ber; der_type_encoder_f S1AP_E_RABFailedToResumeListResumeReq_encode_der; xer_type_decoder_f S1AP_E_RABFailedToResumeListResumeReq_decode_xer; xer_type_encoder_f S1AP_E_RABFailedToResumeListResumeReq_encode_xer; oer_type_decoder_f S1AP_E_RABFailedToResumeListResumeReq_decode_oer; oer_type_encoder_f S1AP_E_RABFailedToResumeListResumeReq_encode_oer; per_type_decoder_f S1AP_E_RABFailedToResumeListResumeReq_decode_uper; per_type_encoder_f S1AP_E_RABFailedToResumeListResumeReq_encode_uper; per_type_decoder_f S1AP_E_RABFailedToResumeListResumeReq_decode_aper; per_type_encoder_f S1AP_E_RABFailedToResumeListResumeReq_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABFailedToResumeListResumeReq_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABFailedToResumeListResumeRes.c000066400000000000000000000047211333553357400246750ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABFailedToResumeListResumeRes.h" int S1AP_E_RABFailedToResumeListResumeRes_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } /* Determine the number of elements */ size = _A_CSEQUENCE_FROM_VOID(sptr)->count; if((size >= 1 && size <= 256)) { /* Perform validation of the inner elements */ return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using S1AP_E_RAB_IE_ContainerList_1142P9, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_E_RABFailedToResumeListResumeRes_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_E_RABFailedToResumeListResumeRes_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABFailedToResumeListResumeRes_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedToResumeListResumeRes = { "E-RABFailedToResumeListResumeRes", "E-RABFailedToResumeListResumeRes", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RABFailedToResumeListResumeRes_tags_1, sizeof(asn_DEF_S1AP_E_RABFailedToResumeListResumeRes_tags_1) /sizeof(asn_DEF_S1AP_E_RABFailedToResumeListResumeRes_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABFailedToResumeListResumeRes_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABFailedToResumeListResumeRes_tags_1) /sizeof(asn_DEF_S1AP_E_RABFailedToResumeListResumeRes_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_E_RABFailedToResumeListResumeRes_constr_1, &asn_PER_type_S1AP_E_RABFailedToResumeListResumeRes_constr_1, S1AP_E_RABFailedToResumeListResumeRes_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P9_19, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P9_specs_19 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABFailedToResumeListResumeRes.h000066400000000000000000000032541333553357400247020ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABFailedToResumeListResumeRes_H_ #define _S1AP_E_RABFailedToResumeListResumeRes_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-IE-ContainerList.h" #ifdef __cplusplus extern "C" { #endif /* S1AP_E-RABFailedToResumeListResumeRes */ typedef S1AP_E_RAB_IE_ContainerList_1142P9_t S1AP_E_RABFailedToResumeListResumeRes_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedToResumeListResumeRes; asn_struct_free_f S1AP_E_RABFailedToResumeListResumeRes_free; asn_struct_print_f S1AP_E_RABFailedToResumeListResumeRes_print; asn_constr_check_f S1AP_E_RABFailedToResumeListResumeRes_constraint; ber_type_decoder_f S1AP_E_RABFailedToResumeListResumeRes_decode_ber; der_type_encoder_f S1AP_E_RABFailedToResumeListResumeRes_encode_der; xer_type_decoder_f S1AP_E_RABFailedToResumeListResumeRes_decode_xer; xer_type_encoder_f S1AP_E_RABFailedToResumeListResumeRes_encode_xer; oer_type_decoder_f S1AP_E_RABFailedToResumeListResumeRes_decode_oer; oer_type_encoder_f S1AP_E_RABFailedToResumeListResumeRes_encode_oer; per_type_decoder_f S1AP_E_RABFailedToResumeListResumeRes_decode_uper; per_type_encoder_f S1AP_E_RABFailedToResumeListResumeRes_encode_uper; per_type_decoder_f S1AP_E_RABFailedToResumeListResumeRes_decode_aper; per_type_encoder_f S1AP_E_RABFailedToResumeListResumeRes_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABFailedToResumeListResumeRes_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABFailedToSetupItemHOReqAck.c000066400000000000000000000055041333553357400242030ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABFailedToSetupItemHOReqAck.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_E_RABFailedToSetupItemHOReqAck_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedToSetupItemHOReqAck, e_RAB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RAB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedToSetupItemHOReqAck, cause), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cause" }, { ATF_POINTER, 1, offsetof(struct S1AP_E_RABFailedToSetupItemHOReqAck, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P3, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_E_RABFailedToSetupItemHOReqAck_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABFailedToSetupItemHOReqAck_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABFailedToSetupItemHOReqAck_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-RAB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* cause */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABFailedToSetupItemHOReqAck_specs_1 = { sizeof(struct S1AP_E_RABFailedToSetupItemHOReqAck), offsetof(struct S1AP_E_RABFailedToSetupItemHOReqAck, _asn_ctx), asn_MAP_S1AP_E_RABFailedToSetupItemHOReqAck_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_E_RABFailedToSetupItemHOReqAck_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedToSetupItemHOReqAck = { "E-RABFailedToSetupItemHOReqAck", "E-RABFailedToSetupItemHOReqAck", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABFailedToSetupItemHOReqAck_tags_1, sizeof(asn_DEF_S1AP_E_RABFailedToSetupItemHOReqAck_tags_1) /sizeof(asn_DEF_S1AP_E_RABFailedToSetupItemHOReqAck_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABFailedToSetupItemHOReqAck_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABFailedToSetupItemHOReqAck_tags_1) /sizeof(asn_DEF_S1AP_E_RABFailedToSetupItemHOReqAck_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABFailedToSetupItemHOReqAck_1, 3, /* Elements count */ &asn_SPC_S1AP_E_RABFailedToSetupItemHOReqAck_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABFailedToSetupItemHOReqAck.h000066400000000000000000000022571333553357400242120ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABFailedToSetupItemHOReqAck_H_ #define _S1AP_E_RABFailedToSetupItemHOReqAck_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-ID.h" #include "S1AP_Cause.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_E-RABFailedToSetupItemHOReqAck */ typedef struct S1AP_E_RABFailedToSetupItemHOReqAck { S1AP_E_RAB_ID_t e_RAB_ID; S1AP_Cause_t cause; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABFailedToSetupItemHOReqAck_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedToSetupItemHOReqAck; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABFailedToSetupItemHOReqAck_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABFailedtoSetupListHOReqAck.c000066400000000000000000000046551333553357400242660ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABFailedtoSetupListHOReqAck.h" int S1AP_E_RABFailedtoSetupListHOReqAck_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } /* Determine the number of elements */ size = _A_CSEQUENCE_FROM_VOID(sptr)->count; if((size >= 1 && size <= 256)) { /* Perform validation of the inner elements */ return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using S1AP_E_RAB_IE_ContainerList_1142P3, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_E_RABFailedtoSetupListHOReqAck_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_E_RABFailedtoSetupListHOReqAck_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABFailedtoSetupListHOReqAck_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedtoSetupListHOReqAck = { "E-RABFailedtoSetupListHOReqAck", "E-RABFailedtoSetupListHOReqAck", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RABFailedtoSetupListHOReqAck_tags_1, sizeof(asn_DEF_S1AP_E_RABFailedtoSetupListHOReqAck_tags_1) /sizeof(asn_DEF_S1AP_E_RABFailedtoSetupListHOReqAck_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABFailedtoSetupListHOReqAck_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABFailedtoSetupListHOReqAck_tags_1) /sizeof(asn_DEF_S1AP_E_RABFailedtoSetupListHOReqAck_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_E_RABFailedtoSetupListHOReqAck_constr_1, &asn_PER_type_S1AP_E_RABFailedtoSetupListHOReqAck_constr_1, S1AP_E_RABFailedtoSetupListHOReqAck_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P3_7, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P3_specs_7 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABFailedtoSetupListHOReqAck.h000066400000000000000000000032061333553357400242620ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABFailedtoSetupListHOReqAck_H_ #define _S1AP_E_RABFailedtoSetupListHOReqAck_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-IE-ContainerList.h" #ifdef __cplusplus extern "C" { #endif /* S1AP_E-RABFailedtoSetupListHOReqAck */ typedef S1AP_E_RAB_IE_ContainerList_1142P3_t S1AP_E_RABFailedtoSetupListHOReqAck_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedtoSetupListHOReqAck; asn_struct_free_f S1AP_E_RABFailedtoSetupListHOReqAck_free; asn_struct_print_f S1AP_E_RABFailedtoSetupListHOReqAck_print; asn_constr_check_f S1AP_E_RABFailedtoSetupListHOReqAck_constraint; ber_type_decoder_f S1AP_E_RABFailedtoSetupListHOReqAck_decode_ber; der_type_encoder_f S1AP_E_RABFailedtoSetupListHOReqAck_encode_der; xer_type_decoder_f S1AP_E_RABFailedtoSetupListHOReqAck_decode_xer; xer_type_encoder_f S1AP_E_RABFailedtoSetupListHOReqAck_encode_xer; oer_type_decoder_f S1AP_E_RABFailedtoSetupListHOReqAck_decode_oer; oer_type_encoder_f S1AP_E_RABFailedtoSetupListHOReqAck_encode_oer; per_type_decoder_f S1AP_E_RABFailedtoSetupListHOReqAck_decode_uper; per_type_encoder_f S1AP_E_RABFailedtoSetupListHOReqAck_encode_uper; per_type_decoder_f S1AP_E_RABFailedtoSetupListHOReqAck_decode_aper; per_type_encoder_f S1AP_E_RABFailedtoSetupListHOReqAck_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABFailedtoSetupListHOReqAck_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABInformationList.c000066400000000000000000000036451333553357400224630ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABInformationList.h" #include "S1AP_ProtocolIE-SingleContainer.h" static asn_oer_constraints_t asn_OER_type_S1AP_E_RABInformationList_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_E_RABInformationList_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABInformationList_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P12, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABInformationList_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_E_RABInformationList_specs_1 = { sizeof(struct S1AP_E_RABInformationList), offsetof(struct S1AP_E_RABInformationList, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABInformationList = { "E-RABInformationList", "E-RABInformationList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RABInformationList_tags_1, sizeof(asn_DEF_S1AP_E_RABInformationList_tags_1) /sizeof(asn_DEF_S1AP_E_RABInformationList_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABInformationList_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABInformationList_tags_1) /sizeof(asn_DEF_S1AP_E_RABInformationList_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_E_RABInformationList_constr_1, &asn_PER_type_S1AP_E_RABInformationList_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_E_RABInformationList_1, 1, /* Single element */ &asn_SPC_S1AP_E_RABInformationList_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABInformationList.h000066400000000000000000000022401333553357400224560ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABInformationList_H_ #define _S1AP_E_RABInformationList_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolIE_SingleContainer; /* S1AP_E-RABInformationList */ typedef struct S1AP_E_RABInformationList { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABInformationList_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABInformationList; extern asn_SET_OF_specifics_t asn_SPC_S1AP_E_RABInformationList_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABInformationList_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_E_RABInformationList_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABInformationList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABInformationListItem.c000066400000000000000000000053171333553357400233000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABInformationListItem.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_E_RABInformationListItem_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABInformationListItem, e_RAB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RAB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-ID" }, { ATF_POINTER, 2, offsetof(struct S1AP_E_RABInformationListItem, dL_Forwarding), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_DL_Forwarding, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "dL-Forwarding" }, { ATF_POINTER, 1, offsetof(struct S1AP_E_RABInformationListItem, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P49, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_E_RABInformationListItem_oms_1[] = { 1, 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABInformationListItem_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABInformationListItem_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-RAB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* dL-Forwarding */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABInformationListItem_specs_1 = { sizeof(struct S1AP_E_RABInformationListItem), offsetof(struct S1AP_E_RABInformationListItem, _asn_ctx), asn_MAP_S1AP_E_RABInformationListItem_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_E_RABInformationListItem_oms_1, /* Optional members */ 2, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABInformationListItem = { "E-RABInformationListItem", "E-RABInformationListItem", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABInformationListItem_tags_1, sizeof(asn_DEF_S1AP_E_RABInformationListItem_tags_1) /sizeof(asn_DEF_S1AP_E_RABInformationListItem_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABInformationListItem_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABInformationListItem_tags_1) /sizeof(asn_DEF_S1AP_E_RABInformationListItem_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABInformationListItem_1, 3, /* Elements count */ &asn_SPC_S1AP_E_RABInformationListItem_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABInformationListItem.h000066400000000000000000000022431333553357400233000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABInformationListItem_H_ #define _S1AP_E_RABInformationListItem_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-ID.h" #include "S1AP_DL-Forwarding.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_E-RABInformationListItem */ typedef struct S1AP_E_RABInformationListItem { S1AP_E_RAB_ID_t e_RAB_ID; S1AP_DL_Forwarding_t *dL_Forwarding; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABInformationListItem_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABInformationListItem; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABInformationListItem_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABItem.c000066400000000000000000000045041333553357400202330ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABItem.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_E_RABItem_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABItem, e_RAB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RAB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABItem, cause), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cause" }, { ATF_POINTER, 1, offsetof(struct S1AP_E_RABItem, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P50, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_E_RABItem_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABItem_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABItem_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-RAB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* cause */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABItem_specs_1 = { sizeof(struct S1AP_E_RABItem), offsetof(struct S1AP_E_RABItem, _asn_ctx), asn_MAP_S1AP_E_RABItem_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_E_RABItem_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABItem = { "E-RABItem", "E-RABItem", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABItem_tags_1, sizeof(asn_DEF_S1AP_E_RABItem_tags_1) /sizeof(asn_DEF_S1AP_E_RABItem_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABItem_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABItem_tags_1) /sizeof(asn_DEF_S1AP_E_RABItem_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABItem_1, 3, /* Elements count */ &asn_SPC_S1AP_E_RABItem_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABItem.h000066400000000000000000000020231333553357400202320ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABItem_H_ #define _S1AP_E_RABItem_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-ID.h" #include "S1AP_Cause.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_E-RABItem */ typedef struct S1AP_E_RABItem { S1AP_E_RAB_ID_t e_RAB_ID; S1AP_Cause_t cause; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABItem_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABItem; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABItem_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABLevelQoSParameters.c000066400000000000000000000061311333553357400230510ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABLevelQoSParameters.h" #include "S1AP_GBR-QosInformation.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_E_RABLevelQoSParameters_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABLevelQoSParameters, qCI), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_QCI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "qCI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABLevelQoSParameters, allocationRetentionPriority), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_AllocationAndRetentionPriority, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "allocationRetentionPriority" }, { ATF_POINTER, 2, offsetof(struct S1AP_E_RABLevelQoSParameters, gbrQosInformation), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_GBR_QosInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "gbrQosInformation" }, { ATF_POINTER, 1, offsetof(struct S1AP_E_RABLevelQoSParameters, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P51, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_E_RABLevelQoSParameters_oms_1[] = { 2, 3 }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABLevelQoSParameters_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABLevelQoSParameters_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* qCI */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* allocationRetentionPriority */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* gbrQosInformation */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABLevelQoSParameters_specs_1 = { sizeof(struct S1AP_E_RABLevelQoSParameters), offsetof(struct S1AP_E_RABLevelQoSParameters, _asn_ctx), asn_MAP_S1AP_E_RABLevelQoSParameters_tag2el_1, 4, /* Count of tags in the map */ asn_MAP_S1AP_E_RABLevelQoSParameters_oms_1, /* Optional members */ 2, 0, /* Root/Additions */ 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABLevelQoSParameters = { "E-RABLevelQoSParameters", "E-RABLevelQoSParameters", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABLevelQoSParameters_tags_1, sizeof(asn_DEF_S1AP_E_RABLevelQoSParameters_tags_1) /sizeof(asn_DEF_S1AP_E_RABLevelQoSParameters_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABLevelQoSParameters_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABLevelQoSParameters_tags_1) /sizeof(asn_DEF_S1AP_E_RABLevelQoSParameters_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABLevelQoSParameters_1, 4, /* Elements count */ &asn_SPC_S1AP_E_RABLevelQoSParameters_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABLevelQoSParameters.h000066400000000000000000000026431333553357400230620ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABLevelQoSParameters_H_ #define _S1AP_E_RABLevelQoSParameters_H_ #include /* Including external dependencies */ #include "S1AP_QCI.h" #include "S1AP_AllocationAndRetentionPriority.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_GBR_QosInformation; struct S1AP_ProtocolExtensionContainer; /* S1AP_E-RABLevelQoSParameters */ typedef struct S1AP_E_RABLevelQoSParameters { S1AP_QCI_t qCI; S1AP_AllocationAndRetentionPriority_t allocationRetentionPriority; struct S1AP_GBR_QosInformation *gbrQosInformation; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABLevelQoSParameters_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABLevelQoSParameters; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABLevelQoSParameters_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABLevelQoSParameters_1[4]; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABLevelQoSParameters_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABList.c000066400000000000000000000033231333553357400202460ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABList.h" #include "S1AP_ProtocolIE-SingleContainer.h" static asn_oer_constraints_t asn_OER_type_S1AP_E_RABList_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_E_RABList_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_E_RABList_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P13, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABList_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_S1AP_E_RABList_specs_1 = { sizeof(struct S1AP_E_RABList), offsetof(struct S1AP_E_RABList, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABList = { "E-RABList", "E-RABList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RABList_tags_1, sizeof(asn_DEF_S1AP_E_RABList_tags_1) /sizeof(asn_DEF_S1AP_E_RABList_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABList_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABList_tags_1) /sizeof(asn_DEF_S1AP_E_RABList_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_E_RABList_constr_1, &asn_PER_type_S1AP_E_RABList_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_E_RABList_1, 1, /* Single element */ &asn_SPC_S1AP_E_RABList_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABList.h000066400000000000000000000015731333553357400202600ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABList_H_ #define _S1AP_E_RABList_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolIE_SingleContainer; /* S1AP_E-RABList */ typedef struct S1AP_E_RABList { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABList_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABList; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABModificationConfirm.c000066400000000000000000000036001333553357400232540ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABModificationConfirm.h" asn_TYPE_member_t asn_MBR_S1AP_E_RABModificationConfirm_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModificationConfirm, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P78, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABModificationConfirm_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABModificationConfirm_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModificationConfirm_specs_1 = { sizeof(struct S1AP_E_RABModificationConfirm), offsetof(struct S1AP_E_RABModificationConfirm, _asn_ctx), asn_MAP_S1AP_E_RABModificationConfirm_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModificationConfirm = { "E-RABModificationConfirm", "E-RABModificationConfirm", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABModificationConfirm_tags_1, sizeof(asn_DEF_S1AP_E_RABModificationConfirm_tags_1) /sizeof(asn_DEF_S1AP_E_RABModificationConfirm_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABModificationConfirm_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABModificationConfirm_tags_1) /sizeof(asn_DEF_S1AP_E_RABModificationConfirm_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABModificationConfirm_1, 1, /* Elements count */ &asn_SPC_S1AP_E_RABModificationConfirm_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABModificationConfirm.h000066400000000000000000000022031333553357400232570ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABModificationConfirm_H_ #define _S1AP_E_RABModificationConfirm_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_E-RABModificationConfirm */ typedef struct S1AP_E_RABModificationConfirm { S1AP_ProtocolIE_Container_6551P78_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABModificationConfirm_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModificationConfirm; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModificationConfirm_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABModificationConfirm_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABModificationConfirm_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABModificationIndication.c000066400000000000000000000036741333553357400237530ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABModificationIndication.h" asn_TYPE_member_t asn_MBR_S1AP_E_RABModificationIndication_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModificationIndication, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P77, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABModificationIndication_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABModificationIndication_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModificationIndication_specs_1 = { sizeof(struct S1AP_E_RABModificationIndication), offsetof(struct S1AP_E_RABModificationIndication, _asn_ctx), asn_MAP_S1AP_E_RABModificationIndication_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModificationIndication = { "E-RABModificationIndication", "E-RABModificationIndication", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABModificationIndication_tags_1, sizeof(asn_DEF_S1AP_E_RABModificationIndication_tags_1) /sizeof(asn_DEF_S1AP_E_RABModificationIndication_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABModificationIndication_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABModificationIndication_tags_1) /sizeof(asn_DEF_S1AP_E_RABModificationIndication_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABModificationIndication_1, 1, /* Elements count */ &asn_SPC_S1AP_E_RABModificationIndication_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABModificationIndication.h000066400000000000000000000022361333553357400237510ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABModificationIndication_H_ #define _S1AP_E_RABModificationIndication_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_E-RABModificationIndication */ typedef struct S1AP_E_RABModificationIndication { S1AP_ProtocolIE_Container_6551P77_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABModificationIndication_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModificationIndication; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModificationIndication_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABModificationIndication_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABModificationIndication_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABModifyItemBearerModConf.c000066400000000000000000000047351333553357400240000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABModifyItemBearerModConf.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_E_RABModifyItemBearerModConf_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyItemBearerModConf, e_RAB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RAB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-ID" }, { ATF_POINTER, 1, offsetof(struct S1AP_E_RABModifyItemBearerModConf, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P17, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_E_RABModifyItemBearerModConf_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABModifyItemBearerModConf_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABModifyItemBearerModConf_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-RAB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModifyItemBearerModConf_specs_1 = { sizeof(struct S1AP_E_RABModifyItemBearerModConf), offsetof(struct S1AP_E_RABModifyItemBearerModConf, _asn_ctx), asn_MAP_S1AP_E_RABModifyItemBearerModConf_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_E_RABModifyItemBearerModConf_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyItemBearerModConf = { "E-RABModifyItemBearerModConf", "E-RABModifyItemBearerModConf", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABModifyItemBearerModConf_tags_1, sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModConf_tags_1) /sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModConf_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABModifyItemBearerModConf_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModConf_tags_1) /sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModConf_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABModifyItemBearerModConf_1, 2, /* Elements count */ &asn_SPC_S1AP_E_RABModifyItemBearerModConf_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABModifyItemBearerModConf.h000066400000000000000000000021631333553357400237760ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABModifyItemBearerModConf_H_ #define _S1AP_E_RABModifyItemBearerModConf_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-ID.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_E-RABModifyItemBearerModConf */ typedef struct S1AP_E_RABModifyItemBearerModConf { S1AP_E_RAB_ID_t e_RAB_ID; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABModifyItemBearerModConf_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyItemBearerModConf; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABModifyItemBearerModConf_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABModifyItemBearerModRes.c000066400000000000000000000047051333553357400236410ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABModifyItemBearerModRes.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_E_RABModifyItemBearerModRes_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyItemBearerModRes, e_RAB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RAB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-ID" }, { ATF_POINTER, 1, offsetof(struct S1AP_E_RABModifyItemBearerModRes, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P9, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_E_RABModifyItemBearerModRes_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABModifyItemBearerModRes_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABModifyItemBearerModRes_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-RAB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModifyItemBearerModRes_specs_1 = { sizeof(struct S1AP_E_RABModifyItemBearerModRes), offsetof(struct S1AP_E_RABModifyItemBearerModRes, _asn_ctx), asn_MAP_S1AP_E_RABModifyItemBearerModRes_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_E_RABModifyItemBearerModRes_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyItemBearerModRes = { "E-RABModifyItemBearerModRes", "E-RABModifyItemBearerModRes", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABModifyItemBearerModRes_tags_1, sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModRes_tags_1) /sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModRes_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABModifyItemBearerModRes_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModRes_tags_1) /sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModRes_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABModifyItemBearerModRes_1, 2, /* Elements count */ &asn_SPC_S1AP_E_RABModifyItemBearerModRes_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABModifyItemBearerModRes.h000066400000000000000000000021541333553357400236420ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABModifyItemBearerModRes_H_ #define _S1AP_E_RABModifyItemBearerModRes_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-ID.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_E-RABModifyItemBearerModRes */ typedef struct S1AP_E_RABModifyItemBearerModRes { S1AP_E_RAB_ID_t e_RAB_ID; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABModifyItemBearerModRes_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyItemBearerModRes; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABModifyItemBearerModRes_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABModifyListBearerModConf.c000066400000000000000000000041531333553357400240070ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABModifyListBearerModConf.h" #include "S1AP_ProtocolIE-SingleContainer.h" static asn_oer_constraints_t asn_OER_type_S1AP_E_RABModifyListBearerModConf_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_E_RABModifyListBearerModConf_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_E_RABModifyListBearerModConf_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P10, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABModifyListBearerModConf_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_S1AP_E_RABModifyListBearerModConf_specs_1 = { sizeof(struct S1AP_E_RABModifyListBearerModConf), offsetof(struct S1AP_E_RABModifyListBearerModConf, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyListBearerModConf = { "E-RABModifyListBearerModConf", "E-RABModifyListBearerModConf", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RABModifyListBearerModConf_tags_1, sizeof(asn_DEF_S1AP_E_RABModifyListBearerModConf_tags_1) /sizeof(asn_DEF_S1AP_E_RABModifyListBearerModConf_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABModifyListBearerModConf_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABModifyListBearerModConf_tags_1) /sizeof(asn_DEF_S1AP_E_RABModifyListBearerModConf_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_E_RABModifyListBearerModConf_constr_1, &asn_PER_type_S1AP_E_RABModifyListBearerModConf_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_E_RABModifyListBearerModConf_1, 1, /* Single element */ &asn_SPC_S1AP_E_RABModifyListBearerModConf_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABModifyListBearerModConf.h000066400000000000000000000020111333553357400240030ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABModifyListBearerModConf_H_ #define _S1AP_E_RABModifyListBearerModConf_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolIE_SingleContainer; /* S1AP_E-RABModifyListBearerModConf */ typedef struct S1AP_E_RABModifyListBearerModConf { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABModifyListBearerModConf_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyListBearerModConf; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABModifyListBearerModConf_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABModifyListBearerModRes.c000066400000000000000000000041251333553357400236520ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABModifyListBearerModRes.h" #include "S1AP_ProtocolIE-SingleContainer.h" static asn_oer_constraints_t asn_OER_type_S1AP_E_RABModifyListBearerModRes_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_E_RABModifyListBearerModRes_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_E_RABModifyListBearerModRes_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P3, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABModifyListBearerModRes_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_S1AP_E_RABModifyListBearerModRes_specs_1 = { sizeof(struct S1AP_E_RABModifyListBearerModRes), offsetof(struct S1AP_E_RABModifyListBearerModRes, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyListBearerModRes = { "E-RABModifyListBearerModRes", "E-RABModifyListBearerModRes", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RABModifyListBearerModRes_tags_1, sizeof(asn_DEF_S1AP_E_RABModifyListBearerModRes_tags_1) /sizeof(asn_DEF_S1AP_E_RABModifyListBearerModRes_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABModifyListBearerModRes_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABModifyListBearerModRes_tags_1) /sizeof(asn_DEF_S1AP_E_RABModifyListBearerModRes_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_E_RABModifyListBearerModRes_constr_1, &asn_PER_type_S1AP_E_RABModifyListBearerModRes_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_E_RABModifyListBearerModRes_1, 1, /* Single element */ &asn_SPC_S1AP_E_RABModifyListBearerModRes_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABModifyListBearerModRes.h000066400000000000000000000020021333553357400236470ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABModifyListBearerModRes_H_ #define _S1AP_E_RABModifyListBearerModRes_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolIE_SingleContainer; /* S1AP_E-RABModifyListBearerModRes */ typedef struct S1AP_E_RABModifyListBearerModRes { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABModifyListBearerModRes_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyListBearerModRes; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABModifyListBearerModRes_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABModifyRequest.c000066400000000000000000000034101333553357400221300ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABModifyRequest.h" asn_TYPE_member_t asn_MBR_S1AP_E_RABModifyRequest_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyRequest, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P14, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABModifyRequest_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABModifyRequest_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModifyRequest_specs_1 = { sizeof(struct S1AP_E_RABModifyRequest), offsetof(struct S1AP_E_RABModifyRequest, _asn_ctx), asn_MAP_S1AP_E_RABModifyRequest_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyRequest = { "E-RABModifyRequest", "E-RABModifyRequest", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABModifyRequest_tags_1, sizeof(asn_DEF_S1AP_E_RABModifyRequest_tags_1) /sizeof(asn_DEF_S1AP_E_RABModifyRequest_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABModifyRequest_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABModifyRequest_tags_1) /sizeof(asn_DEF_S1AP_E_RABModifyRequest_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABModifyRequest_1, 1, /* Elements count */ &asn_SPC_S1AP_E_RABModifyRequest_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABModifyRequest.h000066400000000000000000000021151333553357400221360ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABModifyRequest_H_ #define _S1AP_E_RABModifyRequest_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_E-RABModifyRequest */ typedef struct S1AP_E_RABModifyRequest { S1AP_ProtocolIE_Container_6551P14_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABModifyRequest_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyRequest; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModifyRequest_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABModifyRequest_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABModifyRequest_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABModifyResponse.c000066400000000000000000000034341333553357400223040ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABModifyResponse.h" asn_TYPE_member_t asn_MBR_S1AP_E_RABModifyResponse_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyResponse, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P15, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABModifyResponse_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABModifyResponse_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModifyResponse_specs_1 = { sizeof(struct S1AP_E_RABModifyResponse), offsetof(struct S1AP_E_RABModifyResponse, _asn_ctx), asn_MAP_S1AP_E_RABModifyResponse_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyResponse = { "E-RABModifyResponse", "E-RABModifyResponse", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABModifyResponse_tags_1, sizeof(asn_DEF_S1AP_E_RABModifyResponse_tags_1) /sizeof(asn_DEF_S1AP_E_RABModifyResponse_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABModifyResponse_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABModifyResponse_tags_1) /sizeof(asn_DEF_S1AP_E_RABModifyResponse_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABModifyResponse_1, 1, /* Elements count */ &asn_SPC_S1AP_E_RABModifyResponse_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABModifyResponse.h000066400000000000000000000021261333553357400223060ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABModifyResponse_H_ #define _S1AP_E_RABModifyResponse_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_E-RABModifyResponse */ typedef struct S1AP_E_RABModifyResponse { S1AP_ProtocolIE_Container_6551P15_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABModifyResponse_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyResponse; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModifyResponse_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABModifyResponse_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABModifyResponse_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABNotToBeModifiedItemBearerModInd.c000066400000000000000000000065521333553357400253500ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABNotToBeModifiedItemBearerModInd.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_E_RABNotToBeModifiedItemBearerModInd_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABNotToBeModifiedItemBearerModInd, e_RAB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RAB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABNotToBeModifiedItemBearerModInd, transportLayerAddress), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "transportLayerAddress" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABNotToBeModifiedItemBearerModInd, dL_GTP_TEID), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_GTP_TEID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "dL-GTP-TEID" }, { ATF_POINTER, 1, offsetof(struct S1AP_E_RABNotToBeModifiedItemBearerModInd, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P15, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_E_RABNotToBeModifiedItemBearerModInd_oms_1[] = { 3 }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModInd_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABNotToBeModifiedItemBearerModInd_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-RAB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* transportLayerAddress */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* dL-GTP-TEID */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABNotToBeModifiedItemBearerModInd_specs_1 = { sizeof(struct S1AP_E_RABNotToBeModifiedItemBearerModInd), offsetof(struct S1AP_E_RABNotToBeModifiedItemBearerModInd, _asn_ctx), asn_MAP_S1AP_E_RABNotToBeModifiedItemBearerModInd_tag2el_1, 4, /* Count of tags in the map */ asn_MAP_S1AP_E_RABNotToBeModifiedItemBearerModInd_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModInd = { "E-RABNotToBeModifiedItemBearerModInd", "E-RABNotToBeModifiedItemBearerModInd", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModInd_tags_1, sizeof(asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModInd_tags_1) /sizeof(asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModInd_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModInd_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModInd_tags_1) /sizeof(asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModInd_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABNotToBeModifiedItemBearerModInd_1, 4, /* Elements count */ &asn_SPC_S1AP_E_RABNotToBeModifiedItemBearerModInd_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABNotToBeModifiedItemBearerModInd.h000066400000000000000000000025031333553357400253450ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABNotToBeModifiedItemBearerModInd_H_ #define _S1AP_E_RABNotToBeModifiedItemBearerModInd_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-ID.h" #include "S1AP_TransportLayerAddress.h" #include "S1AP_GTP-TEID.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_E-RABNotToBeModifiedItemBearerModInd */ typedef struct S1AP_E_RABNotToBeModifiedItemBearerModInd { S1AP_E_RAB_ID_t e_RAB_ID; S1AP_TransportLayerAddress_t transportLayerAddress; S1AP_GTP_TEID_t dL_GTP_TEID; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABNotToBeModifiedItemBearerModInd_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModInd; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABNotToBeModifiedItemBearerModInd_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABNotToBeModifiedListBearerModInd.c000066400000000000000000000050251333553357400253570ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABNotToBeModifiedListBearerModInd.h" int S1AP_E_RABNotToBeModifiedListBearerModInd_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } /* Determine the number of elements */ size = _A_CSEQUENCE_FROM_VOID(sptr)->count; if((size >= 1 && size <= 256)) { /* Perform validation of the inner elements */ return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using S1AP_E_RAB_IE_ContainerList_1142P7, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_E_RABNotToBeModifiedListBearerModInd_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_E_RABNotToBeModifiedListBearerModInd_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABNotToBeModifiedListBearerModInd_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABNotToBeModifiedListBearerModInd = { "E-RABNotToBeModifiedListBearerModInd", "E-RABNotToBeModifiedListBearerModInd", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RABNotToBeModifiedListBearerModInd_tags_1, sizeof(asn_DEF_S1AP_E_RABNotToBeModifiedListBearerModInd_tags_1) /sizeof(asn_DEF_S1AP_E_RABNotToBeModifiedListBearerModInd_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABNotToBeModifiedListBearerModInd_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABNotToBeModifiedListBearerModInd_tags_1) /sizeof(asn_DEF_S1AP_E_RABNotToBeModifiedListBearerModInd_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_E_RABNotToBeModifiedListBearerModInd_constr_1, &asn_PER_type_S1AP_E_RABNotToBeModifiedListBearerModInd_constr_1, S1AP_E_RABNotToBeModifiedListBearerModInd_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P7_15, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P7_specs_15 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABNotToBeModifiedListBearerModInd.h000066400000000000000000000033701333553357400253650ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABNotToBeModifiedListBearerModInd_H_ #define _S1AP_E_RABNotToBeModifiedListBearerModInd_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-IE-ContainerList.h" #ifdef __cplusplus extern "C" { #endif /* S1AP_E-RABNotToBeModifiedListBearerModInd */ typedef S1AP_E_RAB_IE_ContainerList_1142P7_t S1AP_E_RABNotToBeModifiedListBearerModInd_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABNotToBeModifiedListBearerModInd; asn_struct_free_f S1AP_E_RABNotToBeModifiedListBearerModInd_free; asn_struct_print_f S1AP_E_RABNotToBeModifiedListBearerModInd_print; asn_constr_check_f S1AP_E_RABNotToBeModifiedListBearerModInd_constraint; ber_type_decoder_f S1AP_E_RABNotToBeModifiedListBearerModInd_decode_ber; der_type_encoder_f S1AP_E_RABNotToBeModifiedListBearerModInd_encode_der; xer_type_decoder_f S1AP_E_RABNotToBeModifiedListBearerModInd_decode_xer; xer_type_encoder_f S1AP_E_RABNotToBeModifiedListBearerModInd_encode_xer; oer_type_decoder_f S1AP_E_RABNotToBeModifiedListBearerModInd_decode_oer; oer_type_encoder_f S1AP_E_RABNotToBeModifiedListBearerModInd_encode_oer; per_type_decoder_f S1AP_E_RABNotToBeModifiedListBearerModInd_decode_uper; per_type_encoder_f S1AP_E_RABNotToBeModifiedListBearerModInd_encode_uper; per_type_decoder_f S1AP_E_RABNotToBeModifiedListBearerModInd_decode_aper; per_type_encoder_f S1AP_E_RABNotToBeModifiedListBearerModInd_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABNotToBeModifiedListBearerModInd_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABReleaseCommand.c000066400000000000000000000034341333553357400222150ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABReleaseCommand.h" asn_TYPE_member_t asn_MBR_S1AP_E_RABReleaseCommand_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseCommand, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P16, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABReleaseCommand_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABReleaseCommand_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABReleaseCommand_specs_1 = { sizeof(struct S1AP_E_RABReleaseCommand), offsetof(struct S1AP_E_RABReleaseCommand, _asn_ctx), asn_MAP_S1AP_E_RABReleaseCommand_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABReleaseCommand = { "E-RABReleaseCommand", "E-RABReleaseCommand", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABReleaseCommand_tags_1, sizeof(asn_DEF_S1AP_E_RABReleaseCommand_tags_1) /sizeof(asn_DEF_S1AP_E_RABReleaseCommand_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABReleaseCommand_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABReleaseCommand_tags_1) /sizeof(asn_DEF_S1AP_E_RABReleaseCommand_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABReleaseCommand_1, 1, /* Elements count */ &asn_SPC_S1AP_E_RABReleaseCommand_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABReleaseCommand.h000066400000000000000000000021261333553357400222170ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABReleaseCommand_H_ #define _S1AP_E_RABReleaseCommand_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_E-RABReleaseCommand */ typedef struct S1AP_E_RABReleaseCommand { S1AP_ProtocolIE_Container_6551P16_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABReleaseCommand_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABReleaseCommand; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABReleaseCommand_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABReleaseCommand_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABReleaseCommand_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABReleaseIndication.c000066400000000000000000000035301333553357400227150ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABReleaseIndication.h" asn_TYPE_member_t asn_MBR_S1AP_E_RABReleaseIndication_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseIndication, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P18, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABReleaseIndication_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABReleaseIndication_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABReleaseIndication_specs_1 = { sizeof(struct S1AP_E_RABReleaseIndication), offsetof(struct S1AP_E_RABReleaseIndication, _asn_ctx), asn_MAP_S1AP_E_RABReleaseIndication_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABReleaseIndication = { "E-RABReleaseIndication", "E-RABReleaseIndication", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABReleaseIndication_tags_1, sizeof(asn_DEF_S1AP_E_RABReleaseIndication_tags_1) /sizeof(asn_DEF_S1AP_E_RABReleaseIndication_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABReleaseIndication_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABReleaseIndication_tags_1) /sizeof(asn_DEF_S1AP_E_RABReleaseIndication_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABReleaseIndication_1, 1, /* Elements count */ &asn_SPC_S1AP_E_RABReleaseIndication_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABReleaseIndication.h000066400000000000000000000021611333553357400227210ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABReleaseIndication_H_ #define _S1AP_E_RABReleaseIndication_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_E-RABReleaseIndication */ typedef struct S1AP_E_RABReleaseIndication { S1AP_ProtocolIE_Container_6551P18_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABReleaseIndication_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABReleaseIndication; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABReleaseIndication_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABReleaseIndication_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABReleaseIndication_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABReleaseItemBearerRelComp.c000066400000000000000000000047641333553357400241470ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABReleaseItemBearerRelComp.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_E_RABReleaseItemBearerRelComp_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseItemBearerRelComp, e_RAB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RAB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-ID" }, { ATF_POINTER, 1, offsetof(struct S1AP_E_RABReleaseItemBearerRelComp, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P10, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_E_RABReleaseItemBearerRelComp_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABReleaseItemBearerRelComp_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABReleaseItemBearerRelComp_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-RAB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABReleaseItemBearerRelComp_specs_1 = { sizeof(struct S1AP_E_RABReleaseItemBearerRelComp), offsetof(struct S1AP_E_RABReleaseItemBearerRelComp, _asn_ctx), asn_MAP_S1AP_E_RABReleaseItemBearerRelComp_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_E_RABReleaseItemBearerRelComp_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABReleaseItemBearerRelComp = { "E-RABReleaseItemBearerRelComp", "E-RABReleaseItemBearerRelComp", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABReleaseItemBearerRelComp_tags_1, sizeof(asn_DEF_S1AP_E_RABReleaseItemBearerRelComp_tags_1) /sizeof(asn_DEF_S1AP_E_RABReleaseItemBearerRelComp_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABReleaseItemBearerRelComp_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABReleaseItemBearerRelComp_tags_1) /sizeof(asn_DEF_S1AP_E_RABReleaseItemBearerRelComp_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABReleaseItemBearerRelComp_1, 2, /* Elements count */ &asn_SPC_S1AP_E_RABReleaseItemBearerRelComp_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABReleaseItemBearerRelComp.h000066400000000000000000000021721333553357400241430ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABReleaseItemBearerRelComp_H_ #define _S1AP_E_RABReleaseItemBearerRelComp_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-ID.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_E-RABReleaseItemBearerRelComp */ typedef struct S1AP_E_RABReleaseItemBearerRelComp { S1AP_E_RAB_ID_t e_RAB_ID; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABReleaseItemBearerRelComp_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABReleaseItemBearerRelComp; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABReleaseItemBearerRelComp_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABReleaseListBearerRelComp.c000066400000000000000000000041771333553357400241620ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABReleaseListBearerRelComp.h" #include "S1AP_ProtocolIE-SingleContainer.h" static asn_oer_constraints_t asn_OER_type_S1AP_E_RABReleaseListBearerRelComp_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_E_RABReleaseListBearerRelComp_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_E_RABReleaseListBearerRelComp_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P4, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABReleaseListBearerRelComp_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_S1AP_E_RABReleaseListBearerRelComp_specs_1 = { sizeof(struct S1AP_E_RABReleaseListBearerRelComp), offsetof(struct S1AP_E_RABReleaseListBearerRelComp, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABReleaseListBearerRelComp = { "E-RABReleaseListBearerRelComp", "E-RABReleaseListBearerRelComp", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RABReleaseListBearerRelComp_tags_1, sizeof(asn_DEF_S1AP_E_RABReleaseListBearerRelComp_tags_1) /sizeof(asn_DEF_S1AP_E_RABReleaseListBearerRelComp_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABReleaseListBearerRelComp_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABReleaseListBearerRelComp_tags_1) /sizeof(asn_DEF_S1AP_E_RABReleaseListBearerRelComp_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_E_RABReleaseListBearerRelComp_constr_1, &asn_PER_type_S1AP_E_RABReleaseListBearerRelComp_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_E_RABReleaseListBearerRelComp_1, 1, /* Single element */ &asn_SPC_S1AP_E_RABReleaseListBearerRelComp_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABReleaseListBearerRelComp.h000066400000000000000000000020201333553357400241500ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABReleaseListBearerRelComp_H_ #define _S1AP_E_RABReleaseListBearerRelComp_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolIE_SingleContainer; /* S1AP_E-RABReleaseListBearerRelComp */ typedef struct S1AP_E_RABReleaseListBearerRelComp { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABReleaseListBearerRelComp_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABReleaseListBearerRelComp; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABReleaseListBearerRelComp_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABReleaseResponse.c000066400000000000000000000034601333553357400224340ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABReleaseResponse.h" asn_TYPE_member_t asn_MBR_S1AP_E_RABReleaseResponse_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseResponse, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P17, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABReleaseResponse_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABReleaseResponse_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABReleaseResponse_specs_1 = { sizeof(struct S1AP_E_RABReleaseResponse), offsetof(struct S1AP_E_RABReleaseResponse, _asn_ctx), asn_MAP_S1AP_E_RABReleaseResponse_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABReleaseResponse = { "E-RABReleaseResponse", "E-RABReleaseResponse", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABReleaseResponse_tags_1, sizeof(asn_DEF_S1AP_E_RABReleaseResponse_tags_1) /sizeof(asn_DEF_S1AP_E_RABReleaseResponse_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABReleaseResponse_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABReleaseResponse_tags_1) /sizeof(asn_DEF_S1AP_E_RABReleaseResponse_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABReleaseResponse_1, 1, /* Elements count */ &asn_SPC_S1AP_E_RABReleaseResponse_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABReleaseResponse.h000066400000000000000000000021371333553357400224410ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABReleaseResponse_H_ #define _S1AP_E_RABReleaseResponse_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_E-RABReleaseResponse */ typedef struct S1AP_E_RABReleaseResponse { S1AP_ProtocolIE_Container_6551P17_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABReleaseResponse_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABReleaseResponse; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABReleaseResponse_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABReleaseResponse_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABReleaseResponse_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABSetupItemBearerSURes.c000066400000000000000000000061151333553357400233170ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABSetupItemBearerSURes.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_E_RABSetupItemBearerSURes_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupItemBearerSURes, e_RAB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RAB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupItemBearerSURes, transportLayerAddress), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "transportLayerAddress" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupItemBearerSURes, gTP_TEID), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_GTP_TEID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "gTP-TEID" }, { ATF_POINTER, 1, offsetof(struct S1AP_E_RABSetupItemBearerSURes, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P7, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_E_RABSetupItemBearerSURes_oms_1[] = { 3 }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABSetupItemBearerSURes_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABSetupItemBearerSURes_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-RAB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* transportLayerAddress */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* gTP-TEID */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABSetupItemBearerSURes_specs_1 = { sizeof(struct S1AP_E_RABSetupItemBearerSURes), offsetof(struct S1AP_E_RABSetupItemBearerSURes, _asn_ctx), asn_MAP_S1AP_E_RABSetupItemBearerSURes_tag2el_1, 4, /* Count of tags in the map */ asn_MAP_S1AP_E_RABSetupItemBearerSURes_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupItemBearerSURes = { "E-RABSetupItemBearerSURes", "E-RABSetupItemBearerSURes", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABSetupItemBearerSURes_tags_1, sizeof(asn_DEF_S1AP_E_RABSetupItemBearerSURes_tags_1) /sizeof(asn_DEF_S1AP_E_RABSetupItemBearerSURes_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABSetupItemBearerSURes_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABSetupItemBearerSURes_tags_1) /sizeof(asn_DEF_S1AP_E_RABSetupItemBearerSURes_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABSetupItemBearerSURes_1, 4, /* Elements count */ &asn_SPC_S1AP_E_RABSetupItemBearerSURes_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABSetupItemBearerSURes.h000066400000000000000000000023631333553357400233250ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABSetupItemBearerSURes_H_ #define _S1AP_E_RABSetupItemBearerSURes_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-ID.h" #include "S1AP_TransportLayerAddress.h" #include "S1AP_GTP-TEID.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_E-RABSetupItemBearerSURes */ typedef struct S1AP_E_RABSetupItemBearerSURes { S1AP_E_RAB_ID_t e_RAB_ID; S1AP_TransportLayerAddress_t transportLayerAddress; S1AP_GTP_TEID_t gTP_TEID; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABSetupItemBearerSURes_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupItemBearerSURes; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABSetupItemBearerSURes_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABSetupItemCtxtSURes.c000066400000000000000000000060341333553357400230410ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABSetupItemCtxtSURes.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_E_RABSetupItemCtxtSURes_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupItemCtxtSURes, e_RAB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RAB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupItemCtxtSURes, transportLayerAddress), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "transportLayerAddress" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupItemCtxtSURes, gTP_TEID), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_GTP_TEID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "gTP-TEID" }, { ATF_POINTER, 1, offsetof(struct S1AP_E_RABSetupItemCtxtSURes, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P12, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_E_RABSetupItemCtxtSURes_oms_1[] = { 3 }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABSetupItemCtxtSURes_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABSetupItemCtxtSURes_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-RAB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* transportLayerAddress */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* gTP-TEID */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABSetupItemCtxtSURes_specs_1 = { sizeof(struct S1AP_E_RABSetupItemCtxtSURes), offsetof(struct S1AP_E_RABSetupItemCtxtSURes, _asn_ctx), asn_MAP_S1AP_E_RABSetupItemCtxtSURes_tag2el_1, 4, /* Count of tags in the map */ asn_MAP_S1AP_E_RABSetupItemCtxtSURes_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupItemCtxtSURes = { "E-RABSetupItemCtxtSURes", "E-RABSetupItemCtxtSURes", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABSetupItemCtxtSURes_tags_1, sizeof(asn_DEF_S1AP_E_RABSetupItemCtxtSURes_tags_1) /sizeof(asn_DEF_S1AP_E_RABSetupItemCtxtSURes_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABSetupItemCtxtSURes_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABSetupItemCtxtSURes_tags_1) /sizeof(asn_DEF_S1AP_E_RABSetupItemCtxtSURes_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABSetupItemCtxtSURes_1, 4, /* Elements count */ &asn_SPC_S1AP_E_RABSetupItemCtxtSURes_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABSetupItemCtxtSURes.h000066400000000000000000000023451333553357400230470ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABSetupItemCtxtSURes_H_ #define _S1AP_E_RABSetupItemCtxtSURes_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-ID.h" #include "S1AP_TransportLayerAddress.h" #include "S1AP_GTP-TEID.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_E-RABSetupItemCtxtSURes */ typedef struct S1AP_E_RABSetupItemCtxtSURes { S1AP_E_RAB_ID_t e_RAB_ID; S1AP_TransportLayerAddress_t transportLayerAddress; S1AP_GTP_TEID_t gTP_TEID; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABSetupItemCtxtSURes_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupItemCtxtSURes; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABSetupItemCtxtSURes_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABSetupListBearerSURes.c000066400000000000000000000040531333553357400233330ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABSetupListBearerSURes.h" #include "S1AP_ProtocolIE-SingleContainer.h" static asn_oer_constraints_t asn_OER_type_S1AP_E_RABSetupListBearerSURes_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_E_RABSetupListBearerSURes_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_E_RABSetupListBearerSURes_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P1, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABSetupListBearerSURes_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_S1AP_E_RABSetupListBearerSURes_specs_1 = { sizeof(struct S1AP_E_RABSetupListBearerSURes), offsetof(struct S1AP_E_RABSetupListBearerSURes, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupListBearerSURes = { "E-RABSetupListBearerSURes", "E-RABSetupListBearerSURes", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RABSetupListBearerSURes_tags_1, sizeof(asn_DEF_S1AP_E_RABSetupListBearerSURes_tags_1) /sizeof(asn_DEF_S1AP_E_RABSetupListBearerSURes_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABSetupListBearerSURes_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABSetupListBearerSURes_tags_1) /sizeof(asn_DEF_S1AP_E_RABSetupListBearerSURes_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_E_RABSetupListBearerSURes_constr_1, &asn_PER_type_S1AP_E_RABSetupListBearerSURes_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_E_RABSetupListBearerSURes_1, 1, /* Single element */ &asn_SPC_S1AP_E_RABSetupListBearerSURes_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABSetupListBearerSURes.h000066400000000000000000000017641333553357400233460ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABSetupListBearerSURes_H_ #define _S1AP_E_RABSetupListBearerSURes_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolIE_SingleContainer; /* S1AP_E-RABSetupListBearerSURes */ typedef struct S1AP_E_RABSetupListBearerSURes { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABSetupListBearerSURes_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupListBearerSURes; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABSetupListBearerSURes_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABSetupListCtxtSURes.c000066400000000000000000000040011333553357400230460ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABSetupListCtxtSURes.h" #include "S1AP_ProtocolIE-SingleContainer.h" static asn_oer_constraints_t asn_OER_type_S1AP_E_RABSetupListCtxtSURes_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_E_RABSetupListCtxtSURes_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_E_RABSetupListCtxtSURes_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P6, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABSetupListCtxtSURes_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_S1AP_E_RABSetupListCtxtSURes_specs_1 = { sizeof(struct S1AP_E_RABSetupListCtxtSURes), offsetof(struct S1AP_E_RABSetupListCtxtSURes, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupListCtxtSURes = { "E-RABSetupListCtxtSURes", "E-RABSetupListCtxtSURes", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RABSetupListCtxtSURes_tags_1, sizeof(asn_DEF_S1AP_E_RABSetupListCtxtSURes_tags_1) /sizeof(asn_DEF_S1AP_E_RABSetupListCtxtSURes_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABSetupListCtxtSURes_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABSetupListCtxtSURes_tags_1) /sizeof(asn_DEF_S1AP_E_RABSetupListCtxtSURes_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_E_RABSetupListCtxtSURes_constr_1, &asn_PER_type_S1AP_E_RABSetupListCtxtSURes_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_E_RABSetupListCtxtSURes_1, 1, /* Single element */ &asn_SPC_S1AP_E_RABSetupListCtxtSURes_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABSetupListCtxtSURes.h000066400000000000000000000017461333553357400230700ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABSetupListCtxtSURes_H_ #define _S1AP_E_RABSetupListCtxtSURes_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolIE_SingleContainer; /* S1AP_E-RABSetupListCtxtSURes */ typedef struct S1AP_E_RABSetupListCtxtSURes { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABSetupListCtxtSURes_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupListCtxtSURes; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABSetupListCtxtSURes_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABSetupRequest.c000066400000000000000000000033641333553357400220110ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABSetupRequest.h" asn_TYPE_member_t asn_MBR_S1AP_E_RABSetupRequest_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupRequest, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P12, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABSetupRequest_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABSetupRequest_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABSetupRequest_specs_1 = { sizeof(struct S1AP_E_RABSetupRequest), offsetof(struct S1AP_E_RABSetupRequest, _asn_ctx), asn_MAP_S1AP_E_RABSetupRequest_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupRequest = { "E-RABSetupRequest", "E-RABSetupRequest", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABSetupRequest_tags_1, sizeof(asn_DEF_S1AP_E_RABSetupRequest_tags_1) /sizeof(asn_DEF_S1AP_E_RABSetupRequest_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABSetupRequest_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABSetupRequest_tags_1) /sizeof(asn_DEF_S1AP_E_RABSetupRequest_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABSetupRequest_1, 1, /* Elements count */ &asn_SPC_S1AP_E_RABSetupRequest_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABSetupRequest.h000066400000000000000000000021041333553357400220050ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABSetupRequest_H_ #define _S1AP_E_RABSetupRequest_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_E-RABSetupRequest */ typedef struct S1AP_E_RABSetupRequest { S1AP_ProtocolIE_Container_6551P12_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABSetupRequest_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupRequest; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABSetupRequest_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABSetupRequest_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABSetupRequest_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABSetupResponse.c000066400000000000000000000034101333553357400221470ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABSetupResponse.h" asn_TYPE_member_t asn_MBR_S1AP_E_RABSetupResponse_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupResponse, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P13, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABSetupResponse_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABSetupResponse_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABSetupResponse_specs_1 = { sizeof(struct S1AP_E_RABSetupResponse), offsetof(struct S1AP_E_RABSetupResponse, _asn_ctx), asn_MAP_S1AP_E_RABSetupResponse_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupResponse = { "E-RABSetupResponse", "E-RABSetupResponse", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABSetupResponse_tags_1, sizeof(asn_DEF_S1AP_E_RABSetupResponse_tags_1) /sizeof(asn_DEF_S1AP_E_RABSetupResponse_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABSetupResponse_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABSetupResponse_tags_1) /sizeof(asn_DEF_S1AP_E_RABSetupResponse_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABSetupResponse_1, 1, /* Elements count */ &asn_SPC_S1AP_E_RABSetupResponse_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABSetupResponse.h000066400000000000000000000021151333553357400221550ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABSetupResponse_H_ #define _S1AP_E_RABSetupResponse_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_E-RABSetupResponse */ typedef struct S1AP_E_RABSetupResponse { S1AP_ProtocolIE_Container_6551P13_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABSetupResponse_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupResponse; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABSetupResponse_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABSetupResponse_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABSetupResponse_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABSubjecttoDataForwardingList.c000066400000000000000000000047171333553357400247560ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABSubjecttoDataForwardingList.h" int S1AP_E_RABSubjecttoDataForwardingList_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } /* Determine the number of elements */ size = _A_CSEQUENCE_FROM_VOID(sptr)->count; if((size >= 1 && size <= 256)) { /* Perform validation of the inner elements */ return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using S1AP_E_RAB_IE_ContainerList_1142P0, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_E_RABSubjecttoDataForwardingList_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_E_RABSubjecttoDataForwardingList_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABSubjecttoDataForwardingList_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSubjecttoDataForwardingList = { "E-RABSubjecttoDataForwardingList", "E-RABSubjecttoDataForwardingList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RABSubjecttoDataForwardingList_tags_1, sizeof(asn_DEF_S1AP_E_RABSubjecttoDataForwardingList_tags_1) /sizeof(asn_DEF_S1AP_E_RABSubjecttoDataForwardingList_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABSubjecttoDataForwardingList_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABSubjecttoDataForwardingList_tags_1) /sizeof(asn_DEF_S1AP_E_RABSubjecttoDataForwardingList_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_E_RABSubjecttoDataForwardingList_constr_1, &asn_PER_type_S1AP_E_RABSubjecttoDataForwardingList_constr_1, S1AP_E_RABSubjecttoDataForwardingList_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P0_1, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P0_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABSubjecttoDataForwardingList.h000066400000000000000000000032541333553357400247560ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABSubjecttoDataForwardingList_H_ #define _S1AP_E_RABSubjecttoDataForwardingList_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-IE-ContainerList.h" #ifdef __cplusplus extern "C" { #endif /* S1AP_E-RABSubjecttoDataForwardingList */ typedef S1AP_E_RAB_IE_ContainerList_1142P0_t S1AP_E_RABSubjecttoDataForwardingList_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSubjecttoDataForwardingList; asn_struct_free_f S1AP_E_RABSubjecttoDataForwardingList_free; asn_struct_print_f S1AP_E_RABSubjecttoDataForwardingList_print; asn_constr_check_f S1AP_E_RABSubjecttoDataForwardingList_constraint; ber_type_decoder_f S1AP_E_RABSubjecttoDataForwardingList_decode_ber; der_type_encoder_f S1AP_E_RABSubjecttoDataForwardingList_encode_der; xer_type_decoder_f S1AP_E_RABSubjecttoDataForwardingList_decode_xer; xer_type_encoder_f S1AP_E_RABSubjecttoDataForwardingList_encode_xer; oer_type_decoder_f S1AP_E_RABSubjecttoDataForwardingList_decode_oer; oer_type_encoder_f S1AP_E_RABSubjecttoDataForwardingList_encode_oer; per_type_decoder_f S1AP_E_RABSubjecttoDataForwardingList_decode_uper; per_type_encoder_f S1AP_E_RABSubjecttoDataForwardingList_encode_uper; per_type_decoder_f S1AP_E_RABSubjecttoDataForwardingList_decode_aper; per_type_encoder_f S1AP_E_RABSubjecttoDataForwardingList_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABSubjecttoDataForwardingList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeModifiedItemBearerModInd.c000066400000000000000000000064371333553357400246710ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABToBeModifiedItemBearerModInd.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeModifiedItemBearerModInd_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeModifiedItemBearerModInd, e_RAB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RAB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeModifiedItemBearerModInd, transportLayerAddress), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "transportLayerAddress" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeModifiedItemBearerModInd, dL_GTP_TEID), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_GTP_TEID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "dL-GTP-TEID" }, { ATF_POINTER, 1, offsetof(struct S1AP_E_RABToBeModifiedItemBearerModInd, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P14, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_E_RABToBeModifiedItemBearerModInd_oms_1[] = { 3 }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeModifiedItemBearerModInd_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABToBeModifiedItemBearerModInd_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-RAB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* transportLayerAddress */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* dL-GTP-TEID */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeModifiedItemBearerModInd_specs_1 = { sizeof(struct S1AP_E_RABToBeModifiedItemBearerModInd), offsetof(struct S1AP_E_RABToBeModifiedItemBearerModInd, _asn_ctx), asn_MAP_S1AP_E_RABToBeModifiedItemBearerModInd_tag2el_1, 4, /* Count of tags in the map */ asn_MAP_S1AP_E_RABToBeModifiedItemBearerModInd_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeModifiedItemBearerModInd = { "E-RABToBeModifiedItemBearerModInd", "E-RABToBeModifiedItemBearerModInd", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABToBeModifiedItemBearerModInd_tags_1, sizeof(asn_DEF_S1AP_E_RABToBeModifiedItemBearerModInd_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeModifiedItemBearerModInd_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeModifiedItemBearerModInd_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeModifiedItemBearerModInd_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeModifiedItemBearerModInd_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeModifiedItemBearerModInd_1, 4, /* Elements count */ &asn_SPC_S1AP_E_RABToBeModifiedItemBearerModInd_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeModifiedItemBearerModInd.h000066400000000000000000000024561333553357400246730ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABToBeModifiedItemBearerModInd_H_ #define _S1AP_E_RABToBeModifiedItemBearerModInd_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-ID.h" #include "S1AP_TransportLayerAddress.h" #include "S1AP_GTP-TEID.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_E-RABToBeModifiedItemBearerModInd */ typedef struct S1AP_E_RABToBeModifiedItemBearerModInd { S1AP_E_RAB_ID_t e_RAB_ID; S1AP_TransportLayerAddress_t transportLayerAddress; S1AP_GTP_TEID_t dL_GTP_TEID; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeModifiedItemBearerModInd_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeModifiedItemBearerModInd; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABToBeModifiedItemBearerModInd_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeModifiedItemBearerModReq.c000066400000000000000000000064311333553357400247000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABToBeModifiedItemBearerModReq.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeModifiedItemBearerModReq_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeModifiedItemBearerModReq, e_RAB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RAB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeModifiedItemBearerModReq, e_RABLevelQoSParameters), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RABLevelQoSParameters, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RABLevelQoSParameters" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeModifiedItemBearerModReq, nAS_PDU), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_NAS_PDU, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "nAS-PDU" }, { ATF_POINTER, 1, offsetof(struct S1AP_E_RABToBeModifiedItemBearerModReq, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P8, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_E_RABToBeModifiedItemBearerModReq_oms_1[] = { 3 }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeModifiedItemBearerModReq_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABToBeModifiedItemBearerModReq_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-RAB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* e-RABLevelQoSParameters */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* nAS-PDU */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeModifiedItemBearerModReq_specs_1 = { sizeof(struct S1AP_E_RABToBeModifiedItemBearerModReq), offsetof(struct S1AP_E_RABToBeModifiedItemBearerModReq, _asn_ctx), asn_MAP_S1AP_E_RABToBeModifiedItemBearerModReq_tag2el_1, 4, /* Count of tags in the map */ asn_MAP_S1AP_E_RABToBeModifiedItemBearerModReq_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeModifiedItemBearerModReq = { "E-RABToBeModifiedItemBearerModReq", "E-RABToBeModifiedItemBearerModReq", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABToBeModifiedItemBearerModReq_tags_1, sizeof(asn_DEF_S1AP_E_RABToBeModifiedItemBearerModReq_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeModifiedItemBearerModReq_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeModifiedItemBearerModReq_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeModifiedItemBearerModReq_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeModifiedItemBearerModReq_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeModifiedItemBearerModReq_1, 4, /* Elements count */ &asn_SPC_S1AP_E_RABToBeModifiedItemBearerModReq_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeModifiedItemBearerModReq.h000066400000000000000000000024561333553357400247100ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABToBeModifiedItemBearerModReq_H_ #define _S1AP_E_RABToBeModifiedItemBearerModReq_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-ID.h" #include "S1AP_E-RABLevelQoSParameters.h" #include "S1AP_NAS-PDU.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_E-RABToBeModifiedItemBearerModReq */ typedef struct S1AP_E_RABToBeModifiedItemBearerModReq { S1AP_E_RAB_ID_t e_RAB_ID; S1AP_E_RABLevelQoSParameters_t e_RABLevelQoSParameters; S1AP_NAS_PDU_t nAS_PDU; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeModifiedItemBearerModReq_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeModifiedItemBearerModReq; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABToBeModifiedItemBearerModReq_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeModifiedListBearerModInd.c000066400000000000000000000047421333553357400247030ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABToBeModifiedListBearerModInd.h" int S1AP_E_RABToBeModifiedListBearerModInd_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } /* Determine the number of elements */ size = _A_CSEQUENCE_FROM_VOID(sptr)->count; if((size >= 1 && size <= 256)) { /* Perform validation of the inner elements */ return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using S1AP_E_RAB_IE_ContainerList_1142P6, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_E_RABToBeModifiedListBearerModInd_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_E_RABToBeModifiedListBearerModInd_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeModifiedListBearerModInd_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeModifiedListBearerModInd = { "E-RABToBeModifiedListBearerModInd", "E-RABToBeModifiedListBearerModInd", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RABToBeModifiedListBearerModInd_tags_1, sizeof(asn_DEF_S1AP_E_RABToBeModifiedListBearerModInd_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeModifiedListBearerModInd_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeModifiedListBearerModInd_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeModifiedListBearerModInd_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeModifiedListBearerModInd_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_E_RABToBeModifiedListBearerModInd_constr_1, &asn_PER_type_S1AP_E_RABToBeModifiedListBearerModInd_constr_1, S1AP_E_RABToBeModifiedListBearerModInd_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P6_13, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P6_specs_13 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeModifiedListBearerModInd.h000066400000000000000000000032771333553357400247120ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABToBeModifiedListBearerModInd_H_ #define _S1AP_E_RABToBeModifiedListBearerModInd_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-IE-ContainerList.h" #ifdef __cplusplus extern "C" { #endif /* S1AP_E-RABToBeModifiedListBearerModInd */ typedef S1AP_E_RAB_IE_ContainerList_1142P6_t S1AP_E_RABToBeModifiedListBearerModInd_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeModifiedListBearerModInd; asn_struct_free_f S1AP_E_RABToBeModifiedListBearerModInd_free; asn_struct_print_f S1AP_E_RABToBeModifiedListBearerModInd_print; asn_constr_check_f S1AP_E_RABToBeModifiedListBearerModInd_constraint; ber_type_decoder_f S1AP_E_RABToBeModifiedListBearerModInd_decode_ber; der_type_encoder_f S1AP_E_RABToBeModifiedListBearerModInd_encode_der; xer_type_decoder_f S1AP_E_RABToBeModifiedListBearerModInd_decode_xer; xer_type_encoder_f S1AP_E_RABToBeModifiedListBearerModInd_encode_xer; oer_type_decoder_f S1AP_E_RABToBeModifiedListBearerModInd_decode_oer; oer_type_encoder_f S1AP_E_RABToBeModifiedListBearerModInd_encode_oer; per_type_decoder_f S1AP_E_RABToBeModifiedListBearerModInd_decode_uper; per_type_encoder_f S1AP_E_RABToBeModifiedListBearerModInd_encode_uper; per_type_decoder_f S1AP_E_RABToBeModifiedListBearerModInd_decode_aper; per_type_encoder_f S1AP_E_RABToBeModifiedListBearerModInd_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABToBeModifiedListBearerModInd_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeModifiedListBearerModReq.c000066400000000000000000000043231333553357400247130ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABToBeModifiedListBearerModReq.h" #include "S1AP_ProtocolIE-SingleContainer.h" static asn_oer_constraints_t asn_OER_type_S1AP_E_RABToBeModifiedListBearerModReq_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_E_RABToBeModifiedListBearerModReq_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeModifiedListBearerModReq_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P2, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeModifiedListBearerModReq_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_S1AP_E_RABToBeModifiedListBearerModReq_specs_1 = { sizeof(struct S1AP_E_RABToBeModifiedListBearerModReq), offsetof(struct S1AP_E_RABToBeModifiedListBearerModReq, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeModifiedListBearerModReq = { "E-RABToBeModifiedListBearerModReq", "E-RABToBeModifiedListBearerModReq", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RABToBeModifiedListBearerModReq_tags_1, sizeof(asn_DEF_S1AP_E_RABToBeModifiedListBearerModReq_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeModifiedListBearerModReq_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeModifiedListBearerModReq_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeModifiedListBearerModReq_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeModifiedListBearerModReq_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_E_RABToBeModifiedListBearerModReq_constr_1, &asn_PER_type_S1AP_E_RABToBeModifiedListBearerModReq_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_E_RABToBeModifiedListBearerModReq_1, 1, /* Single element */ &asn_SPC_S1AP_E_RABToBeModifiedListBearerModReq_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeModifiedListBearerModReq.h000066400000000000000000000020541333553357400247170ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABToBeModifiedListBearerModReq_H_ #define _S1AP_E_RABToBeModifiedListBearerModReq_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolIE_SingleContainer; /* S1AP_E-RABToBeModifiedListBearerModReq */ typedef struct S1AP_E_RABToBeModifiedListBearerModReq { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeModifiedListBearerModReq_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeModifiedListBearerModReq; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABToBeModifiedListBearerModReq_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeSetupItemBearerSUReq.c000066400000000000000000000075631333553357400240770ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABToBeSetupItemBearerSUReq.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSetupItemBearerSUReq_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReq, e_RAB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RAB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReq, e_RABlevelQoSParameters), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RABLevelQoSParameters, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RABlevelQoSParameters" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReq, transportLayerAddress), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "transportLayerAddress" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReq, gTP_TEID), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_GTP_TEID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "gTP-TEID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReq, nAS_PDU), (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_NAS_PDU, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "nAS-PDU" }, { ATF_POINTER, 1, offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReq, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (5 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P6, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_E_RABToBeSetupItemBearerSUReq_oms_1[] = { 5 }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReq_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABToBeSetupItemBearerSUReq_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-RAB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* e-RABlevelQoSParameters */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* transportLayerAddress */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* gTP-TEID */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* nAS-PDU */ { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSetupItemBearerSUReq_specs_1 = { sizeof(struct S1AP_E_RABToBeSetupItemBearerSUReq), offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReq, _asn_ctx), asn_MAP_S1AP_E_RABToBeSetupItemBearerSUReq_tag2el_1, 6, /* Count of tags in the map */ asn_MAP_S1AP_E_RABToBeSetupItemBearerSUReq_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 6, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReq = { "E-RABToBeSetupItemBearerSUReq", "E-RABToBeSetupItemBearerSUReq", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReq_tags_1, sizeof(asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReq_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReq_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReq_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReq_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReq_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeSetupItemBearerSUReq_1, 6, /* Elements count */ &asn_SPC_S1AP_E_RABToBeSetupItemBearerSUReq_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeSetupItemBearerSUReq.h000066400000000000000000000026471333553357400241020ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABToBeSetupItemBearerSUReq_H_ #define _S1AP_E_RABToBeSetupItemBearerSUReq_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-ID.h" #include "S1AP_E-RABLevelQoSParameters.h" #include "S1AP_TransportLayerAddress.h" #include "S1AP_GTP-TEID.h" #include "S1AP_NAS-PDU.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_E-RABToBeSetupItemBearerSUReq */ typedef struct S1AP_E_RABToBeSetupItemBearerSUReq { S1AP_E_RAB_ID_t e_RAB_ID; S1AP_E_RABLevelQoSParameters_t e_RABlevelQoSParameters; S1AP_TransportLayerAddress_t transportLayerAddress; S1AP_GTP_TEID_t gTP_TEID; S1AP_NAS_PDU_t nAS_PDU; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeSetupItemBearerSUReq_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReq; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABToBeSetupItemBearerSUReq_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeSetupItemCtxtSUReq.c000066400000000000000000000075011333553357400236110ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABToBeSetupItemCtxtSUReq.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSetupItemCtxtSUReq_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReq, e_RAB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RAB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReq, e_RABlevelQoSParameters), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RABLevelQoSParameters, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RABlevelQoSParameters" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReq, transportLayerAddress), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "transportLayerAddress" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReq, gTP_TEID), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_GTP_TEID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "gTP-TEID" }, { ATF_POINTER, 2, offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReq, nAS_PDU), (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_NAS_PDU, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "nAS-PDU" }, { ATF_POINTER, 1, offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReq, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (5 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P11, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_E_RABToBeSetupItemCtxtSUReq_oms_1[] = { 4, 5 }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReq_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABToBeSetupItemCtxtSUReq_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-RAB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* e-RABlevelQoSParameters */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* transportLayerAddress */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* gTP-TEID */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* nAS-PDU */ { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSetupItemCtxtSUReq_specs_1 = { sizeof(struct S1AP_E_RABToBeSetupItemCtxtSUReq), offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReq, _asn_ctx), asn_MAP_S1AP_E_RABToBeSetupItemCtxtSUReq_tag2el_1, 6, /* Count of tags in the map */ asn_MAP_S1AP_E_RABToBeSetupItemCtxtSUReq_oms_1, /* Optional members */ 2, 0, /* Root/Additions */ 6, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReq = { "E-RABToBeSetupItemCtxtSUReq", "E-RABToBeSetupItemCtxtSUReq", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReq_tags_1, sizeof(asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReq_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReq_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReq_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReq_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReq_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeSetupItemCtxtSUReq_1, 6, /* Elements count */ &asn_SPC_S1AP_E_RABToBeSetupItemCtxtSUReq_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeSetupItemCtxtSUReq.h000066400000000000000000000026501333553357400236160ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABToBeSetupItemCtxtSUReq_H_ #define _S1AP_E_RABToBeSetupItemCtxtSUReq_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-ID.h" #include "S1AP_E-RABLevelQoSParameters.h" #include "S1AP_TransportLayerAddress.h" #include "S1AP_GTP-TEID.h" #include "S1AP_NAS-PDU.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_E-RABToBeSetupItemCtxtSUReq */ typedef struct S1AP_E_RABToBeSetupItemCtxtSUReq { S1AP_E_RAB_ID_t e_RAB_ID; S1AP_E_RABLevelQoSParameters_t e_RABlevelQoSParameters; S1AP_TransportLayerAddress_t transportLayerAddress; S1AP_GTP_TEID_t gTP_TEID; S1AP_NAS_PDU_t *nAS_PDU; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeSetupItemCtxtSUReq_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReq; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABToBeSetupItemCtxtSUReq_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeSetupItemHOReq.c000066400000000000000000000066261333553357400227340ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABToBeSetupItemHOReq.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSetupItemHOReq_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemHOReq, e_RAB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RAB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemHOReq, transportLayerAddress), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "transportLayerAddress" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemHOReq, gTP_TEID), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_GTP_TEID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "gTP-TEID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemHOReq, e_RABlevelQosParameters), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RABLevelQoSParameters, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RABlevelQosParameters" }, { ATF_POINTER, 1, offsetof(struct S1AP_E_RABToBeSetupItemHOReq, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P1, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_E_RABToBeSetupItemHOReq_oms_1[] = { 4 }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeSetupItemHOReq_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABToBeSetupItemHOReq_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-RAB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* transportLayerAddress */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* gTP-TEID */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* e-RABlevelQosParameters */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSetupItemHOReq_specs_1 = { sizeof(struct S1AP_E_RABToBeSetupItemHOReq), offsetof(struct S1AP_E_RABToBeSetupItemHOReq, _asn_ctx), asn_MAP_S1AP_E_RABToBeSetupItemHOReq_tag2el_1, 5, /* Count of tags in the map */ asn_MAP_S1AP_E_RABToBeSetupItemHOReq_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 5, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupItemHOReq = { "E-RABToBeSetupItemHOReq", "E-RABToBeSetupItemHOReq", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABToBeSetupItemHOReq_tags_1, sizeof(asn_DEF_S1AP_E_RABToBeSetupItemHOReq_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeSetupItemHOReq_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeSetupItemHOReq_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeSetupItemHOReq_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeSetupItemHOReq_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeSetupItemHOReq_1, 5, /* Elements count */ &asn_SPC_S1AP_E_RABToBeSetupItemHOReq_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeSetupItemHOReq.h000066400000000000000000000025111333553357400227260ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABToBeSetupItemHOReq_H_ #define _S1AP_E_RABToBeSetupItemHOReq_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-ID.h" #include "S1AP_TransportLayerAddress.h" #include "S1AP_GTP-TEID.h" #include "S1AP_E-RABLevelQoSParameters.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_E-RABToBeSetupItemHOReq */ typedef struct S1AP_E_RABToBeSetupItemHOReq { S1AP_E_RAB_ID_t e_RAB_ID; S1AP_TransportLayerAddress_t transportLayerAddress; S1AP_GTP_TEID_t gTP_TEID; S1AP_E_RABLevelQoSParameters_t e_RABlevelQosParameters; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeSetupItemHOReq_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupItemHOReq; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABToBeSetupItemHOReq_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeSetupListBearerSUReq.c000066400000000000000000000041771333553357400241120ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABToBeSetupListBearerSUReq.h" #include "S1AP_ProtocolIE-SingleContainer.h" static asn_oer_constraints_t asn_OER_type_S1AP_E_RABToBeSetupListBearerSUReq_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_E_RABToBeSetupListBearerSUReq_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSetupListBearerSUReq_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P0, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeSetupListBearerSUReq_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_S1AP_E_RABToBeSetupListBearerSUReq_specs_1 = { sizeof(struct S1AP_E_RABToBeSetupListBearerSUReq), offsetof(struct S1AP_E_RABToBeSetupListBearerSUReq, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupListBearerSUReq = { "E-RABToBeSetupListBearerSUReq", "E-RABToBeSetupListBearerSUReq", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RABToBeSetupListBearerSUReq_tags_1, sizeof(asn_DEF_S1AP_E_RABToBeSetupListBearerSUReq_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeSetupListBearerSUReq_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeSetupListBearerSUReq_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeSetupListBearerSUReq_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeSetupListBearerSUReq_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_E_RABToBeSetupListBearerSUReq_constr_1, &asn_PER_type_S1AP_E_RABToBeSetupListBearerSUReq_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_E_RABToBeSetupListBearerSUReq_1, 1, /* Single element */ &asn_SPC_S1AP_E_RABToBeSetupListBearerSUReq_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeSetupListBearerSUReq.h000066400000000000000000000020201333553357400241000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABToBeSetupListBearerSUReq_H_ #define _S1AP_E_RABToBeSetupListBearerSUReq_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolIE_SingleContainer; /* S1AP_E-RABToBeSetupListBearerSUReq */ typedef struct S1AP_E_RABToBeSetupListBearerSUReq { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeSetupListBearerSUReq_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupListBearerSUReq; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABToBeSetupListBearerSUReq_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeSetupListCtxtSUReq.c000066400000000000000000000041251333553357400236250ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABToBeSetupListCtxtSUReq.h" #include "S1AP_ProtocolIE-SingleContainer.h" static asn_oer_constraints_t asn_OER_type_S1AP_E_RABToBeSetupListCtxtSUReq_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_E_RABToBeSetupListCtxtSUReq_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSetupListCtxtSUReq_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P5, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeSetupListCtxtSUReq_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_S1AP_E_RABToBeSetupListCtxtSUReq_specs_1 = { sizeof(struct S1AP_E_RABToBeSetupListCtxtSUReq), offsetof(struct S1AP_E_RABToBeSetupListCtxtSUReq, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupListCtxtSUReq = { "E-RABToBeSetupListCtxtSUReq", "E-RABToBeSetupListCtxtSUReq", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RABToBeSetupListCtxtSUReq_tags_1, sizeof(asn_DEF_S1AP_E_RABToBeSetupListCtxtSUReq_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeSetupListCtxtSUReq_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeSetupListCtxtSUReq_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeSetupListCtxtSUReq_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeSetupListCtxtSUReq_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_E_RABToBeSetupListCtxtSUReq_constr_1, &asn_PER_type_S1AP_E_RABToBeSetupListCtxtSUReq_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_E_RABToBeSetupListCtxtSUReq_1, 1, /* Single element */ &asn_SPC_S1AP_E_RABToBeSetupListCtxtSUReq_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeSetupListCtxtSUReq.h000066400000000000000000000020021333553357400236220ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABToBeSetupListCtxtSUReq_H_ #define _S1AP_E_RABToBeSetupListCtxtSUReq_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolIE_SingleContainer; /* S1AP_E-RABToBeSetupListCtxtSUReq */ typedef struct S1AP_E_RABToBeSetupListCtxtSUReq { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeSetupListCtxtSUReq_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupListCtxtSUReq; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABToBeSetupListCtxtSUReq_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeSetupListHOReq.c000066400000000000000000000044661333553357400227510ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABToBeSetupListHOReq.h" int S1AP_E_RABToBeSetupListHOReq_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } /* Determine the number of elements */ size = _A_CSEQUENCE_FROM_VOID(sptr)->count; if((size >= 1 && size <= 256)) { /* Perform validation of the inner elements */ return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using S1AP_E_RAB_IE_ContainerList_1142P1, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_E_RABToBeSetupListHOReq_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_E_RABToBeSetupListHOReq_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeSetupListHOReq_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupListHOReq = { "E-RABToBeSetupListHOReq", "E-RABToBeSetupListHOReq", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RABToBeSetupListHOReq_tags_1, sizeof(asn_DEF_S1AP_E_RABToBeSetupListHOReq_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeSetupListHOReq_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeSetupListHOReq_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeSetupListHOReq_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeSetupListHOReq_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_E_RABToBeSetupListHOReq_constr_1, &asn_PER_type_S1AP_E_RABToBeSetupListHOReq_constr_1, S1AP_E_RABToBeSetupListHOReq_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P1_3, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P1_specs_3 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeSetupListHOReq.h000066400000000000000000000030011333553357400227360ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABToBeSetupListHOReq_H_ #define _S1AP_E_RABToBeSetupListHOReq_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-IE-ContainerList.h" #ifdef __cplusplus extern "C" { #endif /* S1AP_E-RABToBeSetupListHOReq */ typedef S1AP_E_RAB_IE_ContainerList_1142P1_t S1AP_E_RABToBeSetupListHOReq_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupListHOReq; asn_struct_free_f S1AP_E_RABToBeSetupListHOReq_free; asn_struct_print_f S1AP_E_RABToBeSetupListHOReq_print; asn_constr_check_f S1AP_E_RABToBeSetupListHOReq_constraint; ber_type_decoder_f S1AP_E_RABToBeSetupListHOReq_decode_ber; der_type_encoder_f S1AP_E_RABToBeSetupListHOReq_encode_der; xer_type_decoder_f S1AP_E_RABToBeSetupListHOReq_decode_xer; xer_type_encoder_f S1AP_E_RABToBeSetupListHOReq_encode_xer; oer_type_decoder_f S1AP_E_RABToBeSetupListHOReq_decode_oer; oer_type_encoder_f S1AP_E_RABToBeSetupListHOReq_encode_oer; per_type_decoder_f S1AP_E_RABToBeSetupListHOReq_decode_uper; per_type_encoder_f S1AP_E_RABToBeSetupListHOReq_encode_uper; per_type_decoder_f S1AP_E_RABToBeSetupListHOReq_decode_aper; per_type_encoder_f S1AP_E_RABToBeSetupListHOReq_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABToBeSetupListHOReq_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeSwitchedDLItem.c000066400000000000000000000060331333553357400227170ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABToBeSwitchedDLItem.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSwitchedDLItem_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSwitchedDLItem, e_RAB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RAB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSwitchedDLItem, transportLayerAddress), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "transportLayerAddress" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSwitchedDLItem, gTP_TEID), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_GTP_TEID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "gTP-TEID" }, { ATF_POINTER, 1, offsetof(struct S1AP_E_RABToBeSwitchedDLItem, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P4, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_E_RABToBeSwitchedDLItem_oms_1[] = { 3 }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeSwitchedDLItem_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABToBeSwitchedDLItem_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-RAB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* transportLayerAddress */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* gTP-TEID */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSwitchedDLItem_specs_1 = { sizeof(struct S1AP_E_RABToBeSwitchedDLItem), offsetof(struct S1AP_E_RABToBeSwitchedDLItem, _asn_ctx), asn_MAP_S1AP_E_RABToBeSwitchedDLItem_tag2el_1, 4, /* Count of tags in the map */ asn_MAP_S1AP_E_RABToBeSwitchedDLItem_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSwitchedDLItem = { "E-RABToBeSwitchedDLItem", "E-RABToBeSwitchedDLItem", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABToBeSwitchedDLItem_tags_1, sizeof(asn_DEF_S1AP_E_RABToBeSwitchedDLItem_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeSwitchedDLItem_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeSwitchedDLItem_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeSwitchedDLItem_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeSwitchedDLItem_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeSwitchedDLItem_1, 4, /* Elements count */ &asn_SPC_S1AP_E_RABToBeSwitchedDLItem_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeSwitchedDLItem.h000066400000000000000000000023451333553357400227260ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABToBeSwitchedDLItem_H_ #define _S1AP_E_RABToBeSwitchedDLItem_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-ID.h" #include "S1AP_TransportLayerAddress.h" #include "S1AP_GTP-TEID.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_E-RABToBeSwitchedDLItem */ typedef struct S1AP_E_RABToBeSwitchedDLItem { S1AP_E_RAB_ID_t e_RAB_ID; S1AP_TransportLayerAddress_t transportLayerAddress; S1AP_GTP_TEID_t gTP_TEID; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeSwitchedDLItem_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSwitchedDLItem; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABToBeSwitchedDLItem_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeSwitchedDLList.c000066400000000000000000000044661333553357400227440ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABToBeSwitchedDLList.h" int S1AP_E_RABToBeSwitchedDLList_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } /* Determine the number of elements */ size = _A_CSEQUENCE_FROM_VOID(sptr)->count; if((size >= 1 && size <= 256)) { /* Perform validation of the inner elements */ return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using S1AP_E_RAB_IE_ContainerList_1142P4, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_E_RABToBeSwitchedDLList_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_E_RABToBeSwitchedDLList_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeSwitchedDLList_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSwitchedDLList = { "E-RABToBeSwitchedDLList", "E-RABToBeSwitchedDLList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RABToBeSwitchedDLList_tags_1, sizeof(asn_DEF_S1AP_E_RABToBeSwitchedDLList_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeSwitchedDLList_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeSwitchedDLList_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeSwitchedDLList_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeSwitchedDLList_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_E_RABToBeSwitchedDLList_constr_1, &asn_PER_type_S1AP_E_RABToBeSwitchedDLList_constr_1, S1AP_E_RABToBeSwitchedDLList_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P4_9, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P4_specs_9 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeSwitchedDLList.h000066400000000000000000000030011333553357400227310ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABToBeSwitchedDLList_H_ #define _S1AP_E_RABToBeSwitchedDLList_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-IE-ContainerList.h" #ifdef __cplusplus extern "C" { #endif /* S1AP_E-RABToBeSwitchedDLList */ typedef S1AP_E_RAB_IE_ContainerList_1142P4_t S1AP_E_RABToBeSwitchedDLList_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSwitchedDLList; asn_struct_free_f S1AP_E_RABToBeSwitchedDLList_free; asn_struct_print_f S1AP_E_RABToBeSwitchedDLList_print; asn_constr_check_f S1AP_E_RABToBeSwitchedDLList_constraint; ber_type_decoder_f S1AP_E_RABToBeSwitchedDLList_decode_ber; der_type_encoder_f S1AP_E_RABToBeSwitchedDLList_encode_der; xer_type_decoder_f S1AP_E_RABToBeSwitchedDLList_decode_xer; xer_type_encoder_f S1AP_E_RABToBeSwitchedDLList_encode_xer; oer_type_decoder_f S1AP_E_RABToBeSwitchedDLList_decode_oer; oer_type_encoder_f S1AP_E_RABToBeSwitchedDLList_encode_oer; per_type_decoder_f S1AP_E_RABToBeSwitchedDLList_decode_uper; per_type_encoder_f S1AP_E_RABToBeSwitchedDLList_encode_uper; per_type_decoder_f S1AP_E_RABToBeSwitchedDLList_decode_aper; per_type_encoder_f S1AP_E_RABToBeSwitchedDLList_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABToBeSwitchedDLList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeSwitchedULItem.c000066400000000000000000000060331333553357400227400ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABToBeSwitchedULItem.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSwitchedULItem_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSwitchedULItem, e_RAB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RAB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSwitchedULItem, transportLayerAddress), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "transportLayerAddress" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSwitchedULItem, gTP_TEID), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_GTP_TEID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "gTP-TEID" }, { ATF_POINTER, 1, offsetof(struct S1AP_E_RABToBeSwitchedULItem, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P5, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_E_RABToBeSwitchedULItem_oms_1[] = { 3 }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeSwitchedULItem_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABToBeSwitchedULItem_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-RAB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* transportLayerAddress */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* gTP-TEID */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSwitchedULItem_specs_1 = { sizeof(struct S1AP_E_RABToBeSwitchedULItem), offsetof(struct S1AP_E_RABToBeSwitchedULItem, _asn_ctx), asn_MAP_S1AP_E_RABToBeSwitchedULItem_tag2el_1, 4, /* Count of tags in the map */ asn_MAP_S1AP_E_RABToBeSwitchedULItem_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSwitchedULItem = { "E-RABToBeSwitchedULItem", "E-RABToBeSwitchedULItem", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABToBeSwitchedULItem_tags_1, sizeof(asn_DEF_S1AP_E_RABToBeSwitchedULItem_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeSwitchedULItem_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeSwitchedULItem_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeSwitchedULItem_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeSwitchedULItem_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeSwitchedULItem_1, 4, /* Elements count */ &asn_SPC_S1AP_E_RABToBeSwitchedULItem_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeSwitchedULItem.h000066400000000000000000000023451333553357400227470ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABToBeSwitchedULItem_H_ #define _S1AP_E_RABToBeSwitchedULItem_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-ID.h" #include "S1AP_TransportLayerAddress.h" #include "S1AP_GTP-TEID.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_E-RABToBeSwitchedULItem */ typedef struct S1AP_E_RABToBeSwitchedULItem { S1AP_E_RAB_ID_t e_RAB_ID; S1AP_TransportLayerAddress_t transportLayerAddress; S1AP_GTP_TEID_t gTP_TEID; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeSwitchedULItem_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSwitchedULItem; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABToBeSwitchedULItem_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeSwitchedULList.c000066400000000000000000000044701333553357400227600ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-RABToBeSwitchedULList.h" int S1AP_E_RABToBeSwitchedULList_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } /* Determine the number of elements */ size = _A_CSEQUENCE_FROM_VOID(sptr)->count; if((size >= 1 && size <= 256)) { /* Perform validation of the inner elements */ return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using S1AP_E_RAB_IE_ContainerList_1142P5, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_E_RABToBeSwitchedULList_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_E_RABToBeSwitchedULList_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeSwitchedULList_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSwitchedULList = { "E-RABToBeSwitchedULList", "E-RABToBeSwitchedULList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_E_RABToBeSwitchedULList_tags_1, sizeof(asn_DEF_S1AP_E_RABToBeSwitchedULList_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeSwitchedULList_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeSwitchedULList_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeSwitchedULList_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeSwitchedULList_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_E_RABToBeSwitchedULList_constr_1, &asn_PER_type_S1AP_E_RABToBeSwitchedULList_constr_1, S1AP_E_RABToBeSwitchedULList_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P5_11, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P5_specs_11 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-RABToBeSwitchedULList.h000066400000000000000000000030011333553357400227520ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_RABToBeSwitchedULList_H_ #define _S1AP_E_RABToBeSwitchedULList_H_ #include /* Including external dependencies */ #include "S1AP_E-RAB-IE-ContainerList.h" #ifdef __cplusplus extern "C" { #endif /* S1AP_E-RABToBeSwitchedULList */ typedef S1AP_E_RAB_IE_ContainerList_1142P5_t S1AP_E_RABToBeSwitchedULList_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSwitchedULList; asn_struct_free_f S1AP_E_RABToBeSwitchedULList_free; asn_struct_print_f S1AP_E_RABToBeSwitchedULList_print; asn_constr_check_f S1AP_E_RABToBeSwitchedULList_constraint; ber_type_decoder_f S1AP_E_RABToBeSwitchedULList_decode_ber; der_type_encoder_f S1AP_E_RABToBeSwitchedULList_encode_der; xer_type_decoder_f S1AP_E_RABToBeSwitchedULList_decode_xer; xer_type_encoder_f S1AP_E_RABToBeSwitchedULList_encode_xer; oer_type_decoder_f S1AP_E_RABToBeSwitchedULList_decode_oer; oer_type_encoder_f S1AP_E_RABToBeSwitchedULList_encode_oer; per_type_decoder_f S1AP_E_RABToBeSwitchedULList_decode_uper; per_type_encoder_f S1AP_E_RABToBeSwitchedULList_encode_uper; per_type_decoder_f S1AP_E_RABToBeSwitchedULList_decode_aper; per_type_encoder_f S1AP_E_RABToBeSwitchedULList_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_E_RABToBeSwitchedULList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-UTRAN-Trace-ID.c000066400000000000000000000037301333553357400212270ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_E-UTRAN-Trace-ID.h" int S1AP_E_UTRAN_Trace_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } size = st->size; if((size == 8)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_E_UTRAN_Trace_ID_constr_1 CC_NOTUSED = { { 0, 0 }, 8 /* (SIZE(8..8)) */}; asn_per_constraints_t asn_PER_type_S1AP_E_UTRAN_Trace_ID_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 8, 8 } /* (SIZE(8..8)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_E_UTRAN_Trace_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_UTRAN_Trace_ID = { "E-UTRAN-Trace-ID", "E-UTRAN-Trace-ID", &asn_OP_OCTET_STRING, asn_DEF_S1AP_E_UTRAN_Trace_ID_tags_1, sizeof(asn_DEF_S1AP_E_UTRAN_Trace_ID_tags_1) /sizeof(asn_DEF_S1AP_E_UTRAN_Trace_ID_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_UTRAN_Trace_ID_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_UTRAN_Trace_ID_tags_1) /sizeof(asn_DEF_S1AP_E_UTRAN_Trace_ID_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_E_UTRAN_Trace_ID_constr_1, &asn_PER_type_S1AP_E_UTRAN_Trace_ID_constr_1, S1AP_E_UTRAN_Trace_ID_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_E-UTRAN-Trace-ID.h000066400000000000000000000026301333553357400212320ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_E_UTRAN_Trace_ID_H_ #define _S1AP_E_UTRAN_Trace_ID_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_E-UTRAN-Trace-ID */ typedef OCTET_STRING_t S1AP_E_UTRAN_Trace_ID_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_E_UTRAN_Trace_ID_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_UTRAN_Trace_ID; asn_struct_free_f S1AP_E_UTRAN_Trace_ID_free; asn_struct_print_f S1AP_E_UTRAN_Trace_ID_print; asn_constr_check_f S1AP_E_UTRAN_Trace_ID_constraint; ber_type_decoder_f S1AP_E_UTRAN_Trace_ID_decode_ber; der_type_encoder_f S1AP_E_UTRAN_Trace_ID_encode_der; xer_type_decoder_f S1AP_E_UTRAN_Trace_ID_decode_xer; xer_type_encoder_f S1AP_E_UTRAN_Trace_ID_encode_xer; oer_type_decoder_f S1AP_E_UTRAN_Trace_ID_decode_oer; oer_type_encoder_f S1AP_E_UTRAN_Trace_ID_encode_oer; per_type_decoder_f S1AP_E_UTRAN_Trace_ID_decode_uper; per_type_encoder_f S1AP_E_UTRAN_Trace_ID_encode_uper; per_type_decoder_f S1AP_E_UTRAN_Trace_ID_decode_aper; per_type_encoder_f S1AP_E_UTRAN_Trace_ID_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_E_UTRAN_Trace_ID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EARFCN.c000066400000000000000000000033771333553357400175730ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_EARFCN.h" int S1AP_EARFCN_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 262143)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_EARFCN_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_EARFCN_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 18, -1, 0, 262143 } /* (0..262143,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_EARFCN_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_EARFCN = { "EARFCN", "EARFCN", &asn_OP_NativeInteger, asn_DEF_S1AP_EARFCN_tags_1, sizeof(asn_DEF_S1AP_EARFCN_tags_1) /sizeof(asn_DEF_S1AP_EARFCN_tags_1[0]), /* 1 */ asn_DEF_S1AP_EARFCN_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_EARFCN_tags_1) /sizeof(asn_DEF_S1AP_EARFCN_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_EARFCN_constr_1, &asn_PER_type_S1AP_EARFCN_constr_1, S1AP_EARFCN_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EARFCN.h000066400000000000000000000023071333553357400175700ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_EARFCN_H_ #define _S1AP_EARFCN_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_EARFCN */ typedef long S1AP_EARFCN_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_EARFCN_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_EARFCN; asn_struct_free_f S1AP_EARFCN_free; asn_struct_print_f S1AP_EARFCN_print; asn_constr_check_f S1AP_EARFCN_constraint; ber_type_decoder_f S1AP_EARFCN_decode_ber; der_type_encoder_f S1AP_EARFCN_encode_der; xer_type_decoder_f S1AP_EARFCN_decode_xer; xer_type_encoder_f S1AP_EARFCN_encode_xer; oer_type_decoder_f S1AP_EARFCN_decode_oer; oer_type_encoder_f S1AP_EARFCN_encode_oer; per_type_decoder_f S1AP_EARFCN_decode_uper; per_type_encoder_f S1AP_EARFCN_encode_uper; per_type_decoder_f S1AP_EARFCN_decode_aper; per_type_encoder_f S1AP_EARFCN_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_EARFCN_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ECGI-List.c000066400000000000000000000032261333553357400202460ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ECGI-List.h" #include "S1AP_EUTRAN-CGI.h" static asn_oer_constraints_t asn_OER_type_S1AP_ECGI_List_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_ECGI_List_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_ECGI_List_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_EUTRAN_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ECGI_List_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ECGI_List_specs_1 = { sizeof(struct S1AP_ECGI_List), offsetof(struct S1AP_ECGI_List, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ECGI_List = { "ECGI-List", "ECGI-List", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ECGI_List_tags_1, sizeof(asn_DEF_S1AP_ECGI_List_tags_1) /sizeof(asn_DEF_S1AP_ECGI_List_tags_1[0]), /* 1 */ asn_DEF_S1AP_ECGI_List_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ECGI_List_tags_1) /sizeof(asn_DEF_S1AP_ECGI_List_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ECGI_List_constr_1, &asn_PER_type_S1AP_ECGI_List_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ECGI_List_1, 1, /* Single element */ &asn_SPC_S1AP_ECGI_List_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ECGI-List.h000066400000000000000000000020221333553357400202440ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ECGI_List_H_ #define _S1AP_ECGI_List_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_EUTRAN_CGI; /* S1AP_ECGI-List */ typedef struct S1AP_ECGI_List { A_SEQUENCE_OF(struct S1AP_EUTRAN_CGI) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ECGI_List_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ECGI_List; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ECGI_List_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ECGI_List_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ECGI_List_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_ECGI_List_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ECGIList.c000066400000000000000000000032111333553357400201630ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ECGIList.h" #include "S1AP_EUTRAN-CGI.h" static asn_oer_constraints_t asn_OER_type_S1AP_ECGIList_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ECGIList_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_ECGIList_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_EUTRAN_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ECGIList_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ECGIList_specs_1 = { sizeof(struct S1AP_ECGIList), offsetof(struct S1AP_ECGIList, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ECGIList = { "ECGIList", "ECGIList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ECGIList_tags_1, sizeof(asn_DEF_S1AP_ECGIList_tags_1) /sizeof(asn_DEF_S1AP_ECGIList_tags_1[0]), /* 1 */ asn_DEF_S1AP_ECGIList_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ECGIList_tags_1) /sizeof(asn_DEF_S1AP_ECGIList_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ECGIList_constr_1, &asn_PER_type_S1AP_ECGIList_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ECGIList_1, 1, /* Single element */ &asn_SPC_S1AP_ECGIList_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ECGIList.h000066400000000000000000000020101333553357400201640ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ECGIList_H_ #define _S1AP_ECGIList_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_EUTRAN_CGI; /* S1AP_ECGIList */ typedef struct S1AP_ECGIList { A_SEQUENCE_OF(struct S1AP_EUTRAN_CGI) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ECGIList_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ECGIList; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ECGIList_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ECGIList_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ECGIList_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_ECGIList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ECGIListForRestart.c000066400000000000000000000035501333553357400222050ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ECGIListForRestart.h" #include "S1AP_EUTRAN-CGI.h" static asn_oer_constraints_t asn_OER_type_S1AP_ECGIListForRestart_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_ECGIListForRestart_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_ECGIListForRestart_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_EUTRAN_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ECGIListForRestart_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_S1AP_ECGIListForRestart_specs_1 = { sizeof(struct S1AP_ECGIListForRestart), offsetof(struct S1AP_ECGIListForRestart, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ECGIListForRestart = { "ECGIListForRestart", "ECGIListForRestart", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ECGIListForRestart_tags_1, sizeof(asn_DEF_S1AP_ECGIListForRestart_tags_1) /sizeof(asn_DEF_S1AP_ECGIListForRestart_tags_1[0]), /* 1 */ asn_DEF_S1AP_ECGIListForRestart_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ECGIListForRestart_tags_1) /sizeof(asn_DEF_S1AP_ECGIListForRestart_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ECGIListForRestart_constr_1, &asn_PER_type_S1AP_ECGIListForRestart_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ECGIListForRestart_1, 1, /* Single element */ &asn_SPC_S1AP_ECGIListForRestart_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ECGIListForRestart.h000066400000000000000000000016321333553357400222110ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ECGIListForRestart_H_ #define _S1AP_ECGIListForRestart_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_EUTRAN_CGI; /* S1AP_ECGIListForRestart */ typedef struct S1AP_ECGIListForRestart { A_SEQUENCE_OF(struct S1AP_EUTRAN_CGI) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ECGIListForRestart_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ECGIListForRestart; #ifdef __cplusplus } #endif #endif /* _S1AP_ECGIListForRestart_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENB-ID.c000066400000000000000000000161101333553357400175200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ENB-ID.h" static int memb_S1AP_macroENB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 20)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_homeENB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 28)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_short_macroENB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 18)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_long_macroENB_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 21)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_oer_constraints_t asn_OER_memb_S1AP_macroENB_ID_constr_2 CC_NOTUSED = { { 0, 0 }, 20 /* (SIZE(20..20)) */}; static asn_per_constraints_t asn_PER_memb_S1AP_macroENB_ID_constr_2 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 20, 20 } /* (SIZE(20..20)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_homeENB_ID_constr_3 CC_NOTUSED = { { 0, 0 }, 28 /* (SIZE(28..28)) */}; static asn_per_constraints_t asn_PER_memb_S1AP_homeENB_ID_constr_3 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 28, 28 } /* (SIZE(28..28)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_short_macroENB_ID_constr_5 CC_NOTUSED = { { 0, 0 }, 18 /* (SIZE(18..18)) */}; static asn_per_constraints_t asn_PER_memb_S1AP_short_macroENB_ID_constr_5 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 18, 18 } /* (SIZE(18..18)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_long_macroENB_ID_constr_6 CC_NOTUSED = { { 0, 0 }, 21 /* (SIZE(21..21)) */}; static asn_per_constraints_t asn_PER_memb_S1AP_long_macroENB_ID_constr_6 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 21, 21 } /* (SIZE(21..21)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ENB_ID_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_ENB_ID_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_ENB_ID_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENB_ID, choice.macroENB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_BIT_STRING, 0, { &asn_OER_memb_S1AP_macroENB_ID_constr_2, &asn_PER_memb_S1AP_macroENB_ID_constr_2, memb_S1AP_macroENB_ID_constraint_1 }, 0, 0, /* No default value */ "macroENB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENB_ID, choice.homeENB_ID), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_BIT_STRING, 0, { &asn_OER_memb_S1AP_homeENB_ID_constr_3, &asn_PER_memb_S1AP_homeENB_ID_constr_3, memb_S1AP_homeENB_ID_constraint_1 }, 0, 0, /* No default value */ "homeENB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENB_ID, choice.short_macroENB_ID), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_BIT_STRING, 0, { &asn_OER_memb_S1AP_short_macroENB_ID_constr_5, &asn_PER_memb_S1AP_short_macroENB_ID_constr_5, memb_S1AP_short_macroENB_ID_constraint_1 }, 0, 0, /* No default value */ "short-macroENB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENB_ID, choice.long_macroENB_ID), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_BIT_STRING, 0, { &asn_OER_memb_S1AP_long_macroENB_ID_constr_6, &asn_PER_memb_S1AP_long_macroENB_ID_constr_6, memb_S1AP_long_macroENB_ID_constraint_1 }, 0, 0, /* No default value */ "long-macroENB-ID" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ENB_ID_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* macroENB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* homeENB-ID */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* short-macroENB-ID */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* long-macroENB-ID */ }; asn_CHOICE_specifics_t asn_SPC_S1AP_ENB_ID_specs_1 = { sizeof(struct S1AP_ENB_ID), offsetof(struct S1AP_ENB_ID, _asn_ctx), offsetof(struct S1AP_ENB_ID, present), sizeof(((struct S1AP_ENB_ID *)0)->present), asn_MAP_S1AP_ENB_ID_tag2el_1, 4, /* Count of tags in the map */ 0, 0, 2 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENB_ID = { "ENB-ID", "ENB-ID", &asn_OP_CHOICE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { &asn_OER_type_S1AP_ENB_ID_constr_1, &asn_PER_type_S1AP_ENB_ID_constr_1, CHOICE_constraint }, asn_MBR_S1AP_ENB_ID_1, 4, /* Elements count */ &asn_SPC_S1AP_ENB_ID_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENB-ID.h000066400000000000000000000026501333553357400175310ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ENB_ID_H_ #define _S1AP_ENB_ID_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_ENB_ID_PR { S1AP_ENB_ID_PR_NOTHING, /* No components present */ S1AP_ENB_ID_PR_macroENB_ID, S1AP_ENB_ID_PR_homeENB_ID, /* Extensions may appear below */ S1AP_ENB_ID_PR_short_macroENB_ID, S1AP_ENB_ID_PR_long_macroENB_ID } S1AP_ENB_ID_PR; /* S1AP_ENB-ID */ typedef struct S1AP_ENB_ID { S1AP_ENB_ID_PR present; union S1AP_ENB_ID_u { BIT_STRING_t macroENB_ID; BIT_STRING_t homeENB_ID; /* * This type is extensible, * possible extensions are below. */ BIT_STRING_t short_macroENB_ID; BIT_STRING_t long_macroENB_ID; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ENB_ID_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENB_ID; extern asn_CHOICE_specifics_t asn_SPC_S1AP_ENB_ID_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ENB_ID_1[4]; extern asn_per_constraints_t asn_PER_type_S1AP_ENB_ID_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_ENB_ID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENB-StatusTransfer-TransparentContainer.c000066400000000000000000000054751333553357400263720ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ENB-StatusTransfer-TransparentContainer.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_ENB_StatusTransfer_TransparentContainer_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENB_StatusTransfer_TransparentContainer, bearers_SubjectToStatusTransferList), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Bearers_SubjectToStatusTransferList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "bearers-SubjectToStatusTransferList" }, { ATF_POINTER, 1, offsetof(struct S1AP_ENB_StatusTransfer_TransparentContainer, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P48, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_ENB_StatusTransfer_TransparentContainer_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ENB_StatusTransfer_TransparentContainer_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* bearers-SubjectToStatusTransferList */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENB_StatusTransfer_TransparentContainer_specs_1 = { sizeof(struct S1AP_ENB_StatusTransfer_TransparentContainer), offsetof(struct S1AP_ENB_StatusTransfer_TransparentContainer, _asn_ctx), asn_MAP_S1AP_ENB_StatusTransfer_TransparentContainer_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_ENB_StatusTransfer_TransparentContainer_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer = { "ENB-StatusTransfer-TransparentContainer", "ENB-StatusTransfer-TransparentContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer_tags_1, sizeof(asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer_tags_1) /sizeof(asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer_tags_1[0]), /* 1 */ asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer_tags_1) /sizeof(asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ENB_StatusTransfer_TransparentContainer_1, 2, /* Elements count */ &asn_SPC_S1AP_ENB_StatusTransfer_TransparentContainer_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENB-StatusTransfer-TransparentContainer.h000066400000000000000000000024101333553357400263610ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ENB_StatusTransfer_TransparentContainer_H_ #define _S1AP_ENB_StatusTransfer_TransparentContainer_H_ #include /* Including external dependencies */ #include "S1AP_Bearers-SubjectToStatusTransferList.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_ENB-StatusTransfer-TransparentContainer */ typedef struct S1AP_ENB_StatusTransfer_TransparentContainer { S1AP_Bearers_SubjectToStatusTransferList_t bearers_SubjectToStatusTransferList; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ENB_StatusTransfer_TransparentContainer_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer; #ifdef __cplusplus } #endif #endif /* _S1AP_ENB_StatusTransfer_TransparentContainer_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENB-UE-S1AP-ID.c000066400000000000000000000036141333553357400205360ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ENB-UE-S1AP-ID.h" int S1AP_ENB_UE_S1AP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 16777215)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_ENB_UE_S1AP_ID_constr_1 CC_NOTUSED = { { 4, 1 } /* (0..16777215) */, -1}; asn_per_constraints_t asn_PER_type_S1AP_ENB_UE_S1AP_ID_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 24, -1, 0, 16777215 } /* (0..16777215) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ENB_UE_S1AP_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENB_UE_S1AP_ID = { "ENB-UE-S1AP-ID", "ENB-UE-S1AP-ID", &asn_OP_NativeInteger, asn_DEF_S1AP_ENB_UE_S1AP_ID_tags_1, sizeof(asn_DEF_S1AP_ENB_UE_S1AP_ID_tags_1) /sizeof(asn_DEF_S1AP_ENB_UE_S1AP_ID_tags_1[0]), /* 1 */ asn_DEF_S1AP_ENB_UE_S1AP_ID_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ENB_UE_S1AP_ID_tags_1) /sizeof(asn_DEF_S1AP_ENB_UE_S1AP_ID_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ENB_UE_S1AP_ID_constr_1, &asn_PER_type_S1AP_ENB_UE_S1AP_ID_constr_1, S1AP_ENB_UE_S1AP_ID_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENB-UE-S1AP-ID.h000066400000000000000000000025471333553357400205470ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ENB_UE_S1AP_ID_H_ #define _S1AP_ENB_UE_S1AP_ID_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ENB-UE-S1AP-ID */ typedef long S1AP_ENB_UE_S1AP_ID_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_ENB_UE_S1AP_ID_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENB_UE_S1AP_ID; asn_struct_free_f S1AP_ENB_UE_S1AP_ID_free; asn_struct_print_f S1AP_ENB_UE_S1AP_ID_print; asn_constr_check_f S1AP_ENB_UE_S1AP_ID_constraint; ber_type_decoder_f S1AP_ENB_UE_S1AP_ID_decode_ber; der_type_encoder_f S1AP_ENB_UE_S1AP_ID_encode_der; xer_type_decoder_f S1AP_ENB_UE_S1AP_ID_decode_xer; xer_type_encoder_f S1AP_ENB_UE_S1AP_ID_encode_xer; oer_type_decoder_f S1AP_ENB_UE_S1AP_ID_decode_oer; oer_type_encoder_f S1AP_ENB_UE_S1AP_ID_encode_oer; per_type_decoder_f S1AP_ENB_UE_S1AP_ID_decode_uper; per_type_encoder_f S1AP_ENB_UE_S1AP_ID_encode_uper; per_type_decoder_f S1AP_ENB_UE_S1AP_ID_decode_aper; per_type_encoder_f S1AP_ENB_UE_S1AP_ID_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_ENB_UE_S1AP_ID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBCPRelocationIndication.c000066400000000000000000000036241333553357400235010ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ENBCPRelocationIndication.h" asn_TYPE_member_t asn_MBR_S1AP_ENBCPRelocationIndication_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBCPRelocationIndication, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P89, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ENBCPRelocationIndication_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ENBCPRelocationIndication_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBCPRelocationIndication_specs_1 = { sizeof(struct S1AP_ENBCPRelocationIndication), offsetof(struct S1AP_ENBCPRelocationIndication, _asn_ctx), asn_MAP_S1AP_ENBCPRelocationIndication_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENBCPRelocationIndication = { "ENBCPRelocationIndication", "ENBCPRelocationIndication", &asn_OP_SEQUENCE, asn_DEF_S1AP_ENBCPRelocationIndication_tags_1, sizeof(asn_DEF_S1AP_ENBCPRelocationIndication_tags_1) /sizeof(asn_DEF_S1AP_ENBCPRelocationIndication_tags_1[0]), /* 1 */ asn_DEF_S1AP_ENBCPRelocationIndication_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ENBCPRelocationIndication_tags_1) /sizeof(asn_DEF_S1AP_ENBCPRelocationIndication_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ENBCPRelocationIndication_1, 1, /* Elements count */ &asn_SPC_S1AP_ENBCPRelocationIndication_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBCPRelocationIndication.h000066400000000000000000000022141333553357400235000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ENBCPRelocationIndication_H_ #define _S1AP_ENBCPRelocationIndication_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ENBCPRelocationIndication */ typedef struct S1AP_ENBCPRelocationIndication { S1AP_ProtocolIE_Container_6551P89_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ENBCPRelocationIndication_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENBCPRelocationIndication; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBCPRelocationIndication_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ENBCPRelocationIndication_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_ENBCPRelocationIndication_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBConfigurationTransfer.c000066400000000000000000000036001333553357400234630ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ENBConfigurationTransfer.h" asn_TYPE_member_t asn_MBR_S1AP_ENBConfigurationTransfer_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationTransfer, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P67, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ENBConfigurationTransfer_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ENBConfigurationTransfer_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBConfigurationTransfer_specs_1 = { sizeof(struct S1AP_ENBConfigurationTransfer), offsetof(struct S1AP_ENBConfigurationTransfer, _asn_ctx), asn_MAP_S1AP_ENBConfigurationTransfer_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENBConfigurationTransfer = { "ENBConfigurationTransfer", "ENBConfigurationTransfer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ENBConfigurationTransfer_tags_1, sizeof(asn_DEF_S1AP_ENBConfigurationTransfer_tags_1) /sizeof(asn_DEF_S1AP_ENBConfigurationTransfer_tags_1[0]), /* 1 */ asn_DEF_S1AP_ENBConfigurationTransfer_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ENBConfigurationTransfer_tags_1) /sizeof(asn_DEF_S1AP_ENBConfigurationTransfer_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ENBConfigurationTransfer_1, 1, /* Elements count */ &asn_SPC_S1AP_ENBConfigurationTransfer_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBConfigurationTransfer.h000066400000000000000000000022031333553357400234660ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ENBConfigurationTransfer_H_ #define _S1AP_ENBConfigurationTransfer_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ENBConfigurationTransfer */ typedef struct S1AP_ENBConfigurationTransfer { S1AP_ProtocolIE_Container_6551P67_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ENBConfigurationTransfer_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENBConfigurationTransfer; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBConfigurationTransfer_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ENBConfigurationTransfer_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_ENBConfigurationTransfer_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBConfigurationUpdate.c000066400000000000000000000035301333553357400231230ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ENBConfigurationUpdate.h" asn_TYPE_member_t asn_MBR_S1AP_ENBConfigurationUpdate_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationUpdate, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P43, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ENBConfigurationUpdate_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ENBConfigurationUpdate_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBConfigurationUpdate_specs_1 = { sizeof(struct S1AP_ENBConfigurationUpdate), offsetof(struct S1AP_ENBConfigurationUpdate, _asn_ctx), asn_MAP_S1AP_ENBConfigurationUpdate_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENBConfigurationUpdate = { "ENBConfigurationUpdate", "ENBConfigurationUpdate", &asn_OP_SEQUENCE, asn_DEF_S1AP_ENBConfigurationUpdate_tags_1, sizeof(asn_DEF_S1AP_ENBConfigurationUpdate_tags_1) /sizeof(asn_DEF_S1AP_ENBConfigurationUpdate_tags_1[0]), /* 1 */ asn_DEF_S1AP_ENBConfigurationUpdate_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ENBConfigurationUpdate_tags_1) /sizeof(asn_DEF_S1AP_ENBConfigurationUpdate_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ENBConfigurationUpdate_1, 1, /* Elements count */ &asn_SPC_S1AP_ENBConfigurationUpdate_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBConfigurationUpdate.h000066400000000000000000000021611333553357400231270ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ENBConfigurationUpdate_H_ #define _S1AP_ENBConfigurationUpdate_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ENBConfigurationUpdate */ typedef struct S1AP_ENBConfigurationUpdate { S1AP_ProtocolIE_Container_6551P43_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ENBConfigurationUpdate_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENBConfigurationUpdate; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBConfigurationUpdate_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ENBConfigurationUpdate_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_ENBConfigurationUpdate_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBConfigurationUpdateAcknowledge.c000066400000000000000000000040641333553357400252720ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ENBConfigurationUpdateAcknowledge.h" asn_TYPE_member_t asn_MBR_S1AP_ENBConfigurationUpdateAcknowledge_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationUpdateAcknowledge, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P44, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ENBConfigurationUpdateAcknowledge_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ENBConfigurationUpdateAcknowledge_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBConfigurationUpdateAcknowledge_specs_1 = { sizeof(struct S1AP_ENBConfigurationUpdateAcknowledge), offsetof(struct S1AP_ENBConfigurationUpdateAcknowledge, _asn_ctx), asn_MAP_S1AP_ENBConfigurationUpdateAcknowledge_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENBConfigurationUpdateAcknowledge = { "ENBConfigurationUpdateAcknowledge", "ENBConfigurationUpdateAcknowledge", &asn_OP_SEQUENCE, asn_DEF_S1AP_ENBConfigurationUpdateAcknowledge_tags_1, sizeof(asn_DEF_S1AP_ENBConfigurationUpdateAcknowledge_tags_1) /sizeof(asn_DEF_S1AP_ENBConfigurationUpdateAcknowledge_tags_1[0]), /* 1 */ asn_DEF_S1AP_ENBConfigurationUpdateAcknowledge_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ENBConfigurationUpdateAcknowledge_tags_1) /sizeof(asn_DEF_S1AP_ENBConfigurationUpdateAcknowledge_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ENBConfigurationUpdateAcknowledge_1, 1, /* Elements count */ &asn_SPC_S1AP_ENBConfigurationUpdateAcknowledge_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBConfigurationUpdateAcknowledge.h000066400000000000000000000023241333553357400252740ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ENBConfigurationUpdateAcknowledge_H_ #define _S1AP_ENBConfigurationUpdateAcknowledge_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ENBConfigurationUpdateAcknowledge */ typedef struct S1AP_ENBConfigurationUpdateAcknowledge { S1AP_ProtocolIE_Container_6551P44_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ENBConfigurationUpdateAcknowledge_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENBConfigurationUpdateAcknowledge; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBConfigurationUpdateAcknowledge_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ENBConfigurationUpdateAcknowledge_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_ENBConfigurationUpdateAcknowledge_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBConfigurationUpdateFailure.c000066400000000000000000000037441333553357400244420ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ENBConfigurationUpdateFailure.h" asn_TYPE_member_t asn_MBR_S1AP_ENBConfigurationUpdateFailure_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationUpdateFailure, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P45, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ENBConfigurationUpdateFailure_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ENBConfigurationUpdateFailure_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBConfigurationUpdateFailure_specs_1 = { sizeof(struct S1AP_ENBConfigurationUpdateFailure), offsetof(struct S1AP_ENBConfigurationUpdateFailure, _asn_ctx), asn_MAP_S1AP_ENBConfigurationUpdateFailure_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENBConfigurationUpdateFailure = { "ENBConfigurationUpdateFailure", "ENBConfigurationUpdateFailure", &asn_OP_SEQUENCE, asn_DEF_S1AP_ENBConfigurationUpdateFailure_tags_1, sizeof(asn_DEF_S1AP_ENBConfigurationUpdateFailure_tags_1) /sizeof(asn_DEF_S1AP_ENBConfigurationUpdateFailure_tags_1[0]), /* 1 */ asn_DEF_S1AP_ENBConfigurationUpdateFailure_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ENBConfigurationUpdateFailure_tags_1) /sizeof(asn_DEF_S1AP_ENBConfigurationUpdateFailure_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ENBConfigurationUpdateFailure_1, 1, /* Elements count */ &asn_SPC_S1AP_ENBConfigurationUpdateFailure_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBConfigurationUpdateFailure.h000066400000000000000000000022601333553357400244370ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ENBConfigurationUpdateFailure_H_ #define _S1AP_ENBConfigurationUpdateFailure_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ENBConfigurationUpdateFailure */ typedef struct S1AP_ENBConfigurationUpdateFailure { S1AP_ProtocolIE_Container_6551P45_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ENBConfigurationUpdateFailure_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENBConfigurationUpdateFailure; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBConfigurationUpdateFailure_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ENBConfigurationUpdateFailure_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_ENBConfigurationUpdateFailure_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBDirectInformationTransfer.c000066400000000000000000000037201333553357400242770ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ENBDirectInformationTransfer.h" asn_TYPE_member_t asn_MBR_S1AP_ENBDirectInformationTransfer_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBDirectInformationTransfer, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P65, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ENBDirectInformationTransfer_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ENBDirectInformationTransfer_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBDirectInformationTransfer_specs_1 = { sizeof(struct S1AP_ENBDirectInformationTransfer), offsetof(struct S1AP_ENBDirectInformationTransfer, _asn_ctx), asn_MAP_S1AP_ENBDirectInformationTransfer_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENBDirectInformationTransfer = { "ENBDirectInformationTransfer", "ENBDirectInformationTransfer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ENBDirectInformationTransfer_tags_1, sizeof(asn_DEF_S1AP_ENBDirectInformationTransfer_tags_1) /sizeof(asn_DEF_S1AP_ENBDirectInformationTransfer_tags_1[0]), /* 1 */ asn_DEF_S1AP_ENBDirectInformationTransfer_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ENBDirectInformationTransfer_tags_1) /sizeof(asn_DEF_S1AP_ENBDirectInformationTransfer_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ENBDirectInformationTransfer_1, 1, /* Elements count */ &asn_SPC_S1AP_ENBDirectInformationTransfer_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBDirectInformationTransfer.h000066400000000000000000000022471333553357400243070ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ENBDirectInformationTransfer_H_ #define _S1AP_ENBDirectInformationTransfer_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ENBDirectInformationTransfer */ typedef struct S1AP_ENBDirectInformationTransfer { S1AP_ProtocolIE_Container_6551P65_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ENBDirectInformationTransfer_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENBDirectInformationTransfer; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBDirectInformationTransfer_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ENBDirectInformationTransfer_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_ENBDirectInformationTransfer_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBIndirectX2TransportLayerAddresses.c000066400000000000000000000043111333553357400256720ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ENBIndirectX2TransportLayerAddresses.h" static asn_oer_constraints_t asn_OER_type_S1AP_ENBIndirectX2TransportLayerAddresses_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..2)) */}; static asn_per_constraints_t asn_PER_type_S1AP_ENBIndirectX2TransportLayerAddresses_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 1, 1, 1, 2 } /* (SIZE(1..2)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_ENBIndirectX2TransportLayerAddresses_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ENBIndirectX2TransportLayerAddresses_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_S1AP_ENBIndirectX2TransportLayerAddresses_specs_1 = { sizeof(struct S1AP_ENBIndirectX2TransportLayerAddresses), offsetof(struct S1AP_ENBIndirectX2TransportLayerAddresses, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENBIndirectX2TransportLayerAddresses = { "ENBIndirectX2TransportLayerAddresses", "ENBIndirectX2TransportLayerAddresses", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ENBIndirectX2TransportLayerAddresses_tags_1, sizeof(asn_DEF_S1AP_ENBIndirectX2TransportLayerAddresses_tags_1) /sizeof(asn_DEF_S1AP_ENBIndirectX2TransportLayerAddresses_tags_1[0]), /* 1 */ asn_DEF_S1AP_ENBIndirectX2TransportLayerAddresses_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ENBIndirectX2TransportLayerAddresses_tags_1) /sizeof(asn_DEF_S1AP_ENBIndirectX2TransportLayerAddresses_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ENBIndirectX2TransportLayerAddresses_constr_1, &asn_PER_type_S1AP_ENBIndirectX2TransportLayerAddresses_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ENBIndirectX2TransportLayerAddresses_1, 1, /* Single element */ &asn_SPC_S1AP_ENBIndirectX2TransportLayerAddresses_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBIndirectX2TransportLayerAddresses.h000066400000000000000000000020221333553357400256740ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ENBIndirectX2TransportLayerAddresses_H_ #define _S1AP_ENBIndirectX2TransportLayerAddresses_H_ #include /* Including external dependencies */ #include "S1AP_TransportLayerAddress.h" #include #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ENBIndirectX2TransportLayerAddresses */ typedef struct S1AP_ENBIndirectX2TransportLayerAddresses { A_SEQUENCE_OF(S1AP_TransportLayerAddress_t) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ENBIndirectX2TransportLayerAddresses_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENBIndirectX2TransportLayerAddresses; #ifdef __cplusplus } #endif #endif /* _S1AP_ENBIndirectX2TransportLayerAddresses_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBStatusTransfer.c000066400000000000000000000033641333553357400221460ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ENBStatusTransfer.h" asn_TYPE_member_t asn_MBR_S1AP_ENBStatusTransfer_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBStatusTransfer, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P52, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ENBStatusTransfer_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ENBStatusTransfer_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBStatusTransfer_specs_1 = { sizeof(struct S1AP_ENBStatusTransfer), offsetof(struct S1AP_ENBStatusTransfer, _asn_ctx), asn_MAP_S1AP_ENBStatusTransfer_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENBStatusTransfer = { "ENBStatusTransfer", "ENBStatusTransfer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ENBStatusTransfer_tags_1, sizeof(asn_DEF_S1AP_ENBStatusTransfer_tags_1) /sizeof(asn_DEF_S1AP_ENBStatusTransfer_tags_1[0]), /* 1 */ asn_DEF_S1AP_ENBStatusTransfer_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ENBStatusTransfer_tags_1) /sizeof(asn_DEF_S1AP_ENBStatusTransfer_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ENBStatusTransfer_1, 1, /* Elements count */ &asn_SPC_S1AP_ENBStatusTransfer_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBStatusTransfer.h000066400000000000000000000021041333553357400221420ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ENBStatusTransfer_H_ #define _S1AP_ENBStatusTransfer_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ENBStatusTransfer */ typedef struct S1AP_ENBStatusTransfer { S1AP_ProtocolIE_Container_6551P52_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ENBStatusTransfer_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENBStatusTransfer; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBStatusTransfer_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ENBStatusTransfer_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_ENBStatusTransfer_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBX2ExtTLA.c000066400000000000000000000046461333553357400204750ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ENBX2ExtTLA.h" #include "S1AP_ENBX2GTPTLAs.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_ENBX2ExtTLA_1[] = { { ATF_POINTER, 3, offsetof(struct S1AP_ENBX2ExtTLA, iPsecTLA), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iPsecTLA" }, { ATF_POINTER, 2, offsetof(struct S1AP_ENBX2ExtTLA, gTPTLAa), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ENBX2GTPTLAs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "gTPTLAa" }, { ATF_POINTER, 1, offsetof(struct S1AP_ENBX2ExtTLA, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P118, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_ENBX2ExtTLA_oms_1[] = { 0, 1, 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_ENBX2ExtTLA_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ENBX2ExtTLA_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* iPsecTLA */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* gTPTLAa */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBX2ExtTLA_specs_1 = { sizeof(struct S1AP_ENBX2ExtTLA), offsetof(struct S1AP_ENBX2ExtTLA, _asn_ctx), asn_MAP_S1AP_ENBX2ExtTLA_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_ENBX2ExtTLA_oms_1, /* Optional members */ 3, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENBX2ExtTLA = { "ENBX2ExtTLA", "ENBX2ExtTLA", &asn_OP_SEQUENCE, asn_DEF_S1AP_ENBX2ExtTLA_tags_1, sizeof(asn_DEF_S1AP_ENBX2ExtTLA_tags_1) /sizeof(asn_DEF_S1AP_ENBX2ExtTLA_tags_1[0]), /* 1 */ asn_DEF_S1AP_ENBX2ExtTLA_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ENBX2ExtTLA_tags_1) /sizeof(asn_DEF_S1AP_ENBX2ExtTLA_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ENBX2ExtTLA_1, 3, /* Elements count */ &asn_SPC_S1AP_ENBX2ExtTLA_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBX2ExtTLA.h000066400000000000000000000023431333553357400204720ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ENBX2ExtTLA_H_ #define _S1AP_ENBX2ExtTLA_H_ #include /* Including external dependencies */ #include "S1AP_TransportLayerAddress.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ENBX2GTPTLAs; struct S1AP_ProtocolExtensionContainer; /* S1AP_ENBX2ExtTLA */ typedef struct S1AP_ENBX2ExtTLA { S1AP_TransportLayerAddress_t *iPsecTLA; /* OPTIONAL */ struct S1AP_ENBX2GTPTLAs *gTPTLAa; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ENBX2ExtTLA_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENBX2ExtTLA; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBX2ExtTLA_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ENBX2ExtTLA_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_ENBX2ExtTLA_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBX2ExtTLAs.c000066400000000000000000000033511333553357400206500ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ENBX2ExtTLAs.h" #include "S1AP_ENBX2ExtTLA.h" static asn_oer_constraints_t asn_OER_type_S1AP_ENBX2ExtTLAs_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..16)) */}; static asn_per_constraints_t asn_PER_type_S1AP_ENBX2ExtTLAs_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 4, 4, 1, 16 } /* (SIZE(1..16)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_ENBX2ExtTLAs_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ENBX2ExtTLA, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ENBX2ExtTLAs_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_S1AP_ENBX2ExtTLAs_specs_1 = { sizeof(struct S1AP_ENBX2ExtTLAs), offsetof(struct S1AP_ENBX2ExtTLAs, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENBX2ExtTLAs = { "ENBX2ExtTLAs", "ENBX2ExtTLAs", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ENBX2ExtTLAs_tags_1, sizeof(asn_DEF_S1AP_ENBX2ExtTLAs_tags_1) /sizeof(asn_DEF_S1AP_ENBX2ExtTLAs_tags_1[0]), /* 1 */ asn_DEF_S1AP_ENBX2ExtTLAs_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ENBX2ExtTLAs_tags_1) /sizeof(asn_DEF_S1AP_ENBX2ExtTLAs_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ENBX2ExtTLAs_constr_1, &asn_PER_type_S1AP_ENBX2ExtTLAs_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ENBX2ExtTLAs_1, 1, /* Single element */ &asn_SPC_S1AP_ENBX2ExtTLAs_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBX2ExtTLAs.h000066400000000000000000000015621333553357400206570ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ENBX2ExtTLAs_H_ #define _S1AP_ENBX2ExtTLAs_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ENBX2ExtTLA; /* S1AP_ENBX2ExtTLAs */ typedef struct S1AP_ENBX2ExtTLAs { A_SEQUENCE_OF(struct S1AP_ENBX2ExtTLA) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ENBX2ExtTLAs_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENBX2ExtTLAs; #ifdef __cplusplus } #endif #endif /* _S1AP_ENBX2ExtTLAs_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBX2GTPTLAs.c000066400000000000000000000032771333553357400205510ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ENBX2GTPTLAs.h" static asn_oer_constraints_t asn_OER_type_S1AP_ENBX2GTPTLAs_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..16)) */}; asn_per_constraints_t asn_PER_type_S1AP_ENBX2GTPTLAs_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 4, 4, 1, 16 } /* (SIZE(1..16)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_ENBX2GTPTLAs_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ENBX2GTPTLAs_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ENBX2GTPTLAs_specs_1 = { sizeof(struct S1AP_ENBX2GTPTLAs), offsetof(struct S1AP_ENBX2GTPTLAs, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENBX2GTPTLAs = { "ENBX2GTPTLAs", "ENBX2GTPTLAs", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ENBX2GTPTLAs_tags_1, sizeof(asn_DEF_S1AP_ENBX2GTPTLAs_tags_1) /sizeof(asn_DEF_S1AP_ENBX2GTPTLAs_tags_1[0]), /* 1 */ asn_DEF_S1AP_ENBX2GTPTLAs_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ENBX2GTPTLAs_tags_1) /sizeof(asn_DEF_S1AP_ENBX2GTPTLAs_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ENBX2GTPTLAs_constr_1, &asn_PER_type_S1AP_ENBX2GTPTLAs_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ENBX2GTPTLAs_1, 1, /* Single element */ &asn_SPC_S1AP_ENBX2GTPTLAs_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBX2GTPTLAs.h000066400000000000000000000020521333553357400205440ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ENBX2GTPTLAs_H_ #define _S1AP_ENBX2GTPTLAs_H_ #include /* Including external dependencies */ #include "S1AP_TransportLayerAddress.h" #include #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ENBX2GTPTLAs */ typedef struct S1AP_ENBX2GTPTLAs { A_SEQUENCE_OF(S1AP_TransportLayerAddress_t) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ENBX2GTPTLAs_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENBX2GTPTLAs; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ENBX2GTPTLAs_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ENBX2GTPTLAs_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ENBX2GTPTLAs_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_ENBX2GTPTLAs_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBX2TLAs.c000066400000000000000000000031751333553357400201730ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ENBX2TLAs.h" static asn_oer_constraints_t asn_OER_type_S1AP_ENBX2TLAs_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..2)) */}; asn_per_constraints_t asn_PER_type_S1AP_ENBX2TLAs_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 1, 1, 1, 2 } /* (SIZE(1..2)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_ENBX2TLAs_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ENBX2TLAs_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ENBX2TLAs_specs_1 = { sizeof(struct S1AP_ENBX2TLAs), offsetof(struct S1AP_ENBX2TLAs, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENBX2TLAs = { "ENBX2TLAs", "ENBX2TLAs", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ENBX2TLAs_tags_1, sizeof(asn_DEF_S1AP_ENBX2TLAs_tags_1) /sizeof(asn_DEF_S1AP_ENBX2TLAs_tags_1[0]), /* 1 */ asn_DEF_S1AP_ENBX2TLAs_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ENBX2TLAs_tags_1) /sizeof(asn_DEF_S1AP_ENBX2TLAs_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ENBX2TLAs_constr_1, &asn_PER_type_S1AP_ENBX2TLAs_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ENBX2TLAs_1, 1, /* Single element */ &asn_SPC_S1AP_ENBX2TLAs_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBX2TLAs.h000066400000000000000000000020141333553357400201670ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ENBX2TLAs_H_ #define _S1AP_ENBX2TLAs_H_ #include /* Including external dependencies */ #include "S1AP_TransportLayerAddress.h" #include #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ENBX2TLAs */ typedef struct S1AP_ENBX2TLAs { A_SEQUENCE_OF(S1AP_TransportLayerAddress_t) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ENBX2TLAs_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENBX2TLAs; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ENBX2TLAs_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ENBX2TLAs_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ENBX2TLAs_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_ENBX2TLAs_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBname.c000066400000000000000000000073131333553357400200740ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ENBname.h" static const int permitted_alphabet_table_1[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ 10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ 38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ 64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ }; static const int permitted_alphabet_code2value_1[74] = { 32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, 55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, 75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, 97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, 113,114,115,116,117,118,119,120,121,122,}; static int check_permitted_alphabet_1(const void *sptr) { const int *table = permitted_alphabet_table_1; /* The underlying type is PrintableString */ const PrintableString_t *st = (const PrintableString_t *)sptr; const uint8_t *ch = st->buf; const uint8_t *end = ch + st->size; for(; ch < end; ch++) { uint8_t cv = *ch; if(!table[cv]) return -1; } return 0; } int S1AP_ENBname_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const PrintableString_t *st = (const PrintableString_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } size = st->size; if((size >= 1 && size <= 150) && !check_permitted_alphabet_1(st)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int asn_PER_MAP_S1AP_ENBname_1_v2c(unsigned int value) { if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0])) return -1; return permitted_alphabet_table_1[value] - 1; } static int asn_PER_MAP_S1AP_ENBname_1_c2v(unsigned int code) { if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0])) return -1; return permitted_alphabet_code2value_1[code]; } /* * This type is implemented using PrintableString, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_ENBname_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..MAX)) */}; static asn_per_constraints_t asn_PER_type_S1AP_ENBname_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 150 } /* (SIZE(1..150,...)) */, asn_PER_MAP_S1AP_ENBname_1_v2c, /* Value to PER code map */ asn_PER_MAP_S1AP_ENBname_1_c2v /* PER code to value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ENBname_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENBname = { "ENBname", "ENBname", &asn_OP_PrintableString, asn_DEF_S1AP_ENBname_tags_1, sizeof(asn_DEF_S1AP_ENBname_tags_1) /sizeof(asn_DEF_S1AP_ENBname_tags_1[0]), /* 1 */ asn_DEF_S1AP_ENBname_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ENBname_tags_1) /sizeof(asn_DEF_S1AP_ENBname_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ENBname_constr_1, &asn_PER_type_S1AP_ENBname_constr_1, S1AP_ENBname_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ENBname.h000066400000000000000000000022511333553357400200750ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ENBname_H_ #define _S1AP_ENBname_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ENBname */ typedef PrintableString_t S1AP_ENBname_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENBname; asn_struct_free_f S1AP_ENBname_free; asn_struct_print_f S1AP_ENBname_print; asn_constr_check_f S1AP_ENBname_constraint; ber_type_decoder_f S1AP_ENBname_decode_ber; der_type_encoder_f S1AP_ENBname_encode_der; xer_type_decoder_f S1AP_ENBname_decode_xer; xer_type_encoder_f S1AP_ENBname_encode_xer; oer_type_decoder_f S1AP_ENBname_decode_oer; oer_type_encoder_f S1AP_ENBname_encode_oer; per_type_decoder_f S1AP_ENBname_decode_uper; per_type_encoder_f S1AP_ENBname_encode_uper; per_type_decoder_f S1AP_ENBname_decode_aper; per_type_encoder_f S1AP_ENBname_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_ENBname_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EPLMNs.c000066400000000000000000000030701333553357400176610ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_EPLMNs.h" static asn_oer_constraints_t asn_OER_type_S1AP_EPLMNs_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..15)) */}; asn_per_constraints_t asn_PER_type_S1AP_EPLMNs_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 4, 4, 1, 15 } /* (SIZE(1..15)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_EPLMNs_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_PLMNidentity, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_EPLMNs_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_EPLMNs_specs_1 = { sizeof(struct S1AP_EPLMNs), offsetof(struct S1AP_EPLMNs, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_EPLMNs = { "EPLMNs", "EPLMNs", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_EPLMNs_tags_1, sizeof(asn_DEF_S1AP_EPLMNs_tags_1) /sizeof(asn_DEF_S1AP_EPLMNs_tags_1[0]), /* 1 */ asn_DEF_S1AP_EPLMNs_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_EPLMNs_tags_1) /sizeof(asn_DEF_S1AP_EPLMNs_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_EPLMNs_constr_1, &asn_PER_type_S1AP_EPLMNs_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_EPLMNs_1, 1, /* Single element */ &asn_SPC_S1AP_EPLMNs_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EPLMNs.h000066400000000000000000000017341333553357400176730ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_EPLMNs_H_ #define _S1AP_EPLMNs_H_ #include /* Including external dependencies */ #include "S1AP_PLMNidentity.h" #include #include #ifdef __cplusplus extern "C" { #endif /* S1AP_EPLMNs */ typedef struct S1AP_EPLMNs { A_SEQUENCE_OF(S1AP_PLMNidentity_t) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_EPLMNs_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_EPLMNs; extern asn_SET_OF_specifics_t asn_SPC_S1AP_EPLMNs_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_EPLMNs_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_EPLMNs_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_EPLMNs_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EUTRAN-CGI.c000066400000000000000000000045531333553357400202300ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_EUTRAN-CGI.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_EUTRAN_CGI_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_EUTRAN_CGI, pLMNidentity), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_PLMNidentity, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "pLMNidentity" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_EUTRAN_CGI, cell_ID), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CellIdentity, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cell-ID" }, { ATF_POINTER, 1, offsetof(struct S1AP_EUTRAN_CGI, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P52, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_EUTRAN_CGI_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_EUTRAN_CGI_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_EUTRAN_CGI_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMNidentity */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* cell-ID */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_EUTRAN_CGI_specs_1 = { sizeof(struct S1AP_EUTRAN_CGI), offsetof(struct S1AP_EUTRAN_CGI, _asn_ctx), asn_MAP_S1AP_EUTRAN_CGI_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_EUTRAN_CGI_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_EUTRAN_CGI = { "EUTRAN-CGI", "EUTRAN-CGI", &asn_OP_SEQUENCE, asn_DEF_S1AP_EUTRAN_CGI_tags_1, sizeof(asn_DEF_S1AP_EUTRAN_CGI_tags_1) /sizeof(asn_DEF_S1AP_EUTRAN_CGI_tags_1[0]), /* 1 */ asn_DEF_S1AP_EUTRAN_CGI_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_EUTRAN_CGI_tags_1) /sizeof(asn_DEF_S1AP_EUTRAN_CGI_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_EUTRAN_CGI_1, 3, /* Elements count */ &asn_SPC_S1AP_EUTRAN_CGI_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EUTRAN-CGI.h000066400000000000000000000022561333553357400202330ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_EUTRAN_CGI_H_ #define _S1AP_EUTRAN_CGI_H_ #include /* Including external dependencies */ #include "S1AP_PLMNidentity.h" #include "S1AP_CellIdentity.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_EUTRAN-CGI */ typedef struct S1AP_EUTRAN_CGI { S1AP_PLMNidentity_t pLMNidentity; S1AP_CellIdentity_t cell_ID; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_EUTRAN_CGI_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_EUTRAN_CGI; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_EUTRAN_CGI_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_EUTRAN_CGI_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_EUTRAN_CGI_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EUTRANRoundTripDelayEstimationInfo.c000066400000000000000000000043301333553357400253200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_EUTRANRoundTripDelayEstimationInfo.h" int S1AP_EUTRANRoundTripDelayEstimationInfo_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 2047)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_EUTRANRoundTripDelayEstimationInfo_constr_1 CC_NOTUSED = { { 2, 1 } /* (0..2047) */, -1}; static asn_per_constraints_t asn_PER_type_S1AP_EUTRANRoundTripDelayEstimationInfo_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 11, 11, 0, 2047 } /* (0..2047) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_EUTRANRoundTripDelayEstimationInfo_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_EUTRANRoundTripDelayEstimationInfo = { "EUTRANRoundTripDelayEstimationInfo", "EUTRANRoundTripDelayEstimationInfo", &asn_OP_NativeInteger, asn_DEF_S1AP_EUTRANRoundTripDelayEstimationInfo_tags_1, sizeof(asn_DEF_S1AP_EUTRANRoundTripDelayEstimationInfo_tags_1) /sizeof(asn_DEF_S1AP_EUTRANRoundTripDelayEstimationInfo_tags_1[0]), /* 1 */ asn_DEF_S1AP_EUTRANRoundTripDelayEstimationInfo_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_EUTRANRoundTripDelayEstimationInfo_tags_1) /sizeof(asn_DEF_S1AP_EUTRANRoundTripDelayEstimationInfo_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_EUTRANRoundTripDelayEstimationInfo_constr_1, &asn_PER_type_S1AP_EUTRANRoundTripDelayEstimationInfo_constr_1, S1AP_EUTRANRoundTripDelayEstimationInfo_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EUTRANRoundTripDelayEstimationInfo.h000066400000000000000000000032331333553357400253260ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_EUTRANRoundTripDelayEstimationInfo_H_ #define _S1AP_EUTRANRoundTripDelayEstimationInfo_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_EUTRANRoundTripDelayEstimationInfo */ typedef long S1AP_EUTRANRoundTripDelayEstimationInfo_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_EUTRANRoundTripDelayEstimationInfo; asn_struct_free_f S1AP_EUTRANRoundTripDelayEstimationInfo_free; asn_struct_print_f S1AP_EUTRANRoundTripDelayEstimationInfo_print; asn_constr_check_f S1AP_EUTRANRoundTripDelayEstimationInfo_constraint; ber_type_decoder_f S1AP_EUTRANRoundTripDelayEstimationInfo_decode_ber; der_type_encoder_f S1AP_EUTRANRoundTripDelayEstimationInfo_encode_der; xer_type_decoder_f S1AP_EUTRANRoundTripDelayEstimationInfo_decode_xer; xer_type_encoder_f S1AP_EUTRANRoundTripDelayEstimationInfo_encode_xer; oer_type_decoder_f S1AP_EUTRANRoundTripDelayEstimationInfo_decode_oer; oer_type_encoder_f S1AP_EUTRANRoundTripDelayEstimationInfo_encode_oer; per_type_decoder_f S1AP_EUTRANRoundTripDelayEstimationInfo_decode_uper; per_type_encoder_f S1AP_EUTRANRoundTripDelayEstimationInfo_encode_uper; per_type_decoder_f S1AP_EUTRANRoundTripDelayEstimationInfo_decode_aper; per_type_encoder_f S1AP_EUTRANRoundTripDelayEstimationInfo_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_EUTRANRoundTripDelayEstimationInfo_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EmergencyAreaID-Broadcast-Item.c000066400000000000000000000055761333553357400243600ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_EmergencyAreaID-Broadcast-Item.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_EmergencyAreaID_Broadcast_Item_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_EmergencyAreaID_Broadcast_Item, emergencyAreaID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_EmergencyAreaID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "emergencyAreaID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_EmergencyAreaID_Broadcast_Item, completedCellinEAI), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CompletedCellinEAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "completedCellinEAI" }, { ATF_POINTER, 1, offsetof(struct S1AP_EmergencyAreaID_Broadcast_Item, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P43, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_EmergencyAreaID_Broadcast_Item_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_EmergencyAreaID_Broadcast_Item_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_EmergencyAreaID_Broadcast_Item_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* emergencyAreaID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* completedCellinEAI */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_EmergencyAreaID_Broadcast_Item_specs_1 = { sizeof(struct S1AP_EmergencyAreaID_Broadcast_Item), offsetof(struct S1AP_EmergencyAreaID_Broadcast_Item, _asn_ctx), asn_MAP_S1AP_EmergencyAreaID_Broadcast_Item_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_EmergencyAreaID_Broadcast_Item_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_EmergencyAreaID_Broadcast_Item = { "EmergencyAreaID-Broadcast-Item", "EmergencyAreaID-Broadcast-Item", &asn_OP_SEQUENCE, asn_DEF_S1AP_EmergencyAreaID_Broadcast_Item_tags_1, sizeof(asn_DEF_S1AP_EmergencyAreaID_Broadcast_Item_tags_1) /sizeof(asn_DEF_S1AP_EmergencyAreaID_Broadcast_Item_tags_1[0]), /* 1 */ asn_DEF_S1AP_EmergencyAreaID_Broadcast_Item_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_EmergencyAreaID_Broadcast_Item_tags_1) /sizeof(asn_DEF_S1AP_EmergencyAreaID_Broadcast_Item_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_EmergencyAreaID_Broadcast_Item_1, 3, /* Elements count */ &asn_SPC_S1AP_EmergencyAreaID_Broadcast_Item_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EmergencyAreaID-Broadcast-Item.h000066400000000000000000000026021333553357400243500ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_EmergencyAreaID_Broadcast_Item_H_ #define _S1AP_EmergencyAreaID_Broadcast_Item_H_ #include /* Including external dependencies */ #include "S1AP_EmergencyAreaID.h" #include "S1AP_CompletedCellinEAI.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_EmergencyAreaID-Broadcast-Item */ typedef struct S1AP_EmergencyAreaID_Broadcast_Item { S1AP_EmergencyAreaID_t emergencyAreaID; S1AP_CompletedCellinEAI_t completedCellinEAI; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_EmergencyAreaID_Broadcast_Item_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_EmergencyAreaID_Broadcast_Item; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_EmergencyAreaID_Broadcast_Item_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_EmergencyAreaID_Broadcast_Item_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_EmergencyAreaID_Broadcast_Item_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EmergencyAreaID-Broadcast.c000066400000000000000000000040261333553357400234510ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_EmergencyAreaID-Broadcast.h" #include "S1AP_EmergencyAreaID-Broadcast-Item.h" static asn_oer_constraints_t asn_OER_type_S1AP_EmergencyAreaID_Broadcast_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_EmergencyAreaID_Broadcast_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_EmergencyAreaID_Broadcast_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_EmergencyAreaID_Broadcast_Item, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_EmergencyAreaID_Broadcast_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_EmergencyAreaID_Broadcast_specs_1 = { sizeof(struct S1AP_EmergencyAreaID_Broadcast), offsetof(struct S1AP_EmergencyAreaID_Broadcast, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_EmergencyAreaID_Broadcast = { "EmergencyAreaID-Broadcast", "EmergencyAreaID-Broadcast", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_EmergencyAreaID_Broadcast_tags_1, sizeof(asn_DEF_S1AP_EmergencyAreaID_Broadcast_tags_1) /sizeof(asn_DEF_S1AP_EmergencyAreaID_Broadcast_tags_1[0]), /* 1 */ asn_DEF_S1AP_EmergencyAreaID_Broadcast_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_EmergencyAreaID_Broadcast_tags_1) /sizeof(asn_DEF_S1AP_EmergencyAreaID_Broadcast_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_EmergencyAreaID_Broadcast_constr_1, &asn_PER_type_S1AP_EmergencyAreaID_Broadcast_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_EmergencyAreaID_Broadcast_1, 1, /* Single element */ &asn_SPC_S1AP_EmergencyAreaID_Broadcast_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EmergencyAreaID-Broadcast.h000066400000000000000000000023321333553357400234540ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_EmergencyAreaID_Broadcast_H_ #define _S1AP_EmergencyAreaID_Broadcast_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_EmergencyAreaID_Broadcast_Item; /* S1AP_EmergencyAreaID-Broadcast */ typedef struct S1AP_EmergencyAreaID_Broadcast { A_SEQUENCE_OF(struct S1AP_EmergencyAreaID_Broadcast_Item) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_EmergencyAreaID_Broadcast_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_EmergencyAreaID_Broadcast; extern asn_SET_OF_specifics_t asn_SPC_S1AP_EmergencyAreaID_Broadcast_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_EmergencyAreaID_Broadcast_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_EmergencyAreaID_Broadcast_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_EmergencyAreaID_Broadcast_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EmergencyAreaID-Cancelled-Item.c000066400000000000000000000055761333553357400243300ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_EmergencyAreaID-Cancelled-Item.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_EmergencyAreaID_Cancelled_Item_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_EmergencyAreaID_Cancelled_Item, emergencyAreaID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_EmergencyAreaID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "emergencyAreaID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_EmergencyAreaID_Cancelled_Item, cancelledCellinEAI), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CancelledCellinEAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cancelledCellinEAI" }, { ATF_POINTER, 1, offsetof(struct S1AP_EmergencyAreaID_Cancelled_Item, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P44, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_EmergencyAreaID_Cancelled_Item_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_EmergencyAreaID_Cancelled_Item_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_EmergencyAreaID_Cancelled_Item_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* emergencyAreaID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* cancelledCellinEAI */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_EmergencyAreaID_Cancelled_Item_specs_1 = { sizeof(struct S1AP_EmergencyAreaID_Cancelled_Item), offsetof(struct S1AP_EmergencyAreaID_Cancelled_Item, _asn_ctx), asn_MAP_S1AP_EmergencyAreaID_Cancelled_Item_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_EmergencyAreaID_Cancelled_Item_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_EmergencyAreaID_Cancelled_Item = { "EmergencyAreaID-Cancelled-Item", "EmergencyAreaID-Cancelled-Item", &asn_OP_SEQUENCE, asn_DEF_S1AP_EmergencyAreaID_Cancelled_Item_tags_1, sizeof(asn_DEF_S1AP_EmergencyAreaID_Cancelled_Item_tags_1) /sizeof(asn_DEF_S1AP_EmergencyAreaID_Cancelled_Item_tags_1[0]), /* 1 */ asn_DEF_S1AP_EmergencyAreaID_Cancelled_Item_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_EmergencyAreaID_Cancelled_Item_tags_1) /sizeof(asn_DEF_S1AP_EmergencyAreaID_Cancelled_Item_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_EmergencyAreaID_Cancelled_Item_1, 3, /* Elements count */ &asn_SPC_S1AP_EmergencyAreaID_Cancelled_Item_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EmergencyAreaID-Cancelled-Item.h000066400000000000000000000026021333553357400243200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_EmergencyAreaID_Cancelled_Item_H_ #define _S1AP_EmergencyAreaID_Cancelled_Item_H_ #include /* Including external dependencies */ #include "S1AP_EmergencyAreaID.h" #include "S1AP_CancelledCellinEAI.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_EmergencyAreaID-Cancelled-Item */ typedef struct S1AP_EmergencyAreaID_Cancelled_Item { S1AP_EmergencyAreaID_t emergencyAreaID; S1AP_CancelledCellinEAI_t cancelledCellinEAI; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_EmergencyAreaID_Cancelled_Item_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_EmergencyAreaID_Cancelled_Item; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_EmergencyAreaID_Cancelled_Item_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_EmergencyAreaID_Cancelled_Item_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_EmergencyAreaID_Cancelled_Item_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EmergencyAreaID-Cancelled.c000066400000000000000000000040261333553357400234210ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_EmergencyAreaID-Cancelled.h" #include "S1AP_EmergencyAreaID-Cancelled-Item.h" static asn_oer_constraints_t asn_OER_type_S1AP_EmergencyAreaID_Cancelled_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_EmergencyAreaID_Cancelled_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_EmergencyAreaID_Cancelled_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_EmergencyAreaID_Cancelled_Item, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_EmergencyAreaID_Cancelled_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_EmergencyAreaID_Cancelled_specs_1 = { sizeof(struct S1AP_EmergencyAreaID_Cancelled), offsetof(struct S1AP_EmergencyAreaID_Cancelled, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_EmergencyAreaID_Cancelled = { "EmergencyAreaID-Cancelled", "EmergencyAreaID-Cancelled", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_EmergencyAreaID_Cancelled_tags_1, sizeof(asn_DEF_S1AP_EmergencyAreaID_Cancelled_tags_1) /sizeof(asn_DEF_S1AP_EmergencyAreaID_Cancelled_tags_1[0]), /* 1 */ asn_DEF_S1AP_EmergencyAreaID_Cancelled_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_EmergencyAreaID_Cancelled_tags_1) /sizeof(asn_DEF_S1AP_EmergencyAreaID_Cancelled_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_EmergencyAreaID_Cancelled_constr_1, &asn_PER_type_S1AP_EmergencyAreaID_Cancelled_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_EmergencyAreaID_Cancelled_1, 1, /* Single element */ &asn_SPC_S1AP_EmergencyAreaID_Cancelled_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EmergencyAreaID-Cancelled.h000066400000000000000000000023321333553357400234240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_EmergencyAreaID_Cancelled_H_ #define _S1AP_EmergencyAreaID_Cancelled_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_EmergencyAreaID_Cancelled_Item; /* S1AP_EmergencyAreaID-Cancelled */ typedef struct S1AP_EmergencyAreaID_Cancelled { A_SEQUENCE_OF(struct S1AP_EmergencyAreaID_Cancelled_Item) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_EmergencyAreaID_Cancelled_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_EmergencyAreaID_Cancelled; extern asn_SET_OF_specifics_t asn_SPC_S1AP_EmergencyAreaID_Cancelled_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_EmergencyAreaID_Cancelled_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_EmergencyAreaID_Cancelled_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_EmergencyAreaID_Cancelled_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EmergencyAreaID.c000066400000000000000000000037071333553357400215560ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_EmergencyAreaID.h" int S1AP_EmergencyAreaID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } size = st->size; if((size == 3)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_EmergencyAreaID_constr_1 CC_NOTUSED = { { 0, 0 }, 3 /* (SIZE(3..3)) */}; asn_per_constraints_t asn_PER_type_S1AP_EmergencyAreaID_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 3, 3 } /* (SIZE(3..3)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_EmergencyAreaID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_EmergencyAreaID = { "EmergencyAreaID", "EmergencyAreaID", &asn_OP_OCTET_STRING, asn_DEF_S1AP_EmergencyAreaID_tags_1, sizeof(asn_DEF_S1AP_EmergencyAreaID_tags_1) /sizeof(asn_DEF_S1AP_EmergencyAreaID_tags_1[0]), /* 1 */ asn_DEF_S1AP_EmergencyAreaID_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_EmergencyAreaID_tags_1) /sizeof(asn_DEF_S1AP_EmergencyAreaID_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_EmergencyAreaID_constr_1, &asn_PER_type_S1AP_EmergencyAreaID_constr_1, S1AP_EmergencyAreaID_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EmergencyAreaID.h000066400000000000000000000026041333553357400215560ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_EmergencyAreaID_H_ #define _S1AP_EmergencyAreaID_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_EmergencyAreaID */ typedef OCTET_STRING_t S1AP_EmergencyAreaID_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_EmergencyAreaID_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_EmergencyAreaID; asn_struct_free_f S1AP_EmergencyAreaID_free; asn_struct_print_f S1AP_EmergencyAreaID_print; asn_constr_check_f S1AP_EmergencyAreaID_constraint; ber_type_decoder_f S1AP_EmergencyAreaID_decode_ber; der_type_encoder_f S1AP_EmergencyAreaID_encode_der; xer_type_decoder_f S1AP_EmergencyAreaID_decode_xer; xer_type_encoder_f S1AP_EmergencyAreaID_encode_xer; oer_type_decoder_f S1AP_EmergencyAreaID_decode_oer; oer_type_encoder_f S1AP_EmergencyAreaID_encode_oer; per_type_decoder_f S1AP_EmergencyAreaID_decode_uper; per_type_encoder_f S1AP_EmergencyAreaID_encode_uper; per_type_decoder_f S1AP_EmergencyAreaID_decode_aper; per_type_encoder_f S1AP_EmergencyAreaID_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_EmergencyAreaID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EmergencyAreaIDList.c000066400000000000000000000035271333553357400224120ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_EmergencyAreaIDList.h" static asn_oer_constraints_t asn_OER_type_S1AP_EmergencyAreaIDList_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_EmergencyAreaIDList_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_EmergencyAreaIDList_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_EmergencyAreaID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_EmergencyAreaIDList_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_EmergencyAreaIDList_specs_1 = { sizeof(struct S1AP_EmergencyAreaIDList), offsetof(struct S1AP_EmergencyAreaIDList, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_EmergencyAreaIDList = { "EmergencyAreaIDList", "EmergencyAreaIDList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_EmergencyAreaIDList_tags_1, sizeof(asn_DEF_S1AP_EmergencyAreaIDList_tags_1) /sizeof(asn_DEF_S1AP_EmergencyAreaIDList_tags_1[0]), /* 1 */ asn_DEF_S1AP_EmergencyAreaIDList_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_EmergencyAreaIDList_tags_1) /sizeof(asn_DEF_S1AP_EmergencyAreaIDList_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_EmergencyAreaIDList_constr_1, &asn_PER_type_S1AP_EmergencyAreaIDList_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_EmergencyAreaIDList_1, 1, /* Single element */ &asn_SPC_S1AP_EmergencyAreaIDList_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EmergencyAreaIDList.h000066400000000000000000000021441333553357400224110ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_EmergencyAreaIDList_H_ #define _S1AP_EmergencyAreaIDList_H_ #include /* Including external dependencies */ #include "S1AP_EmergencyAreaID.h" #include #include #ifdef __cplusplus extern "C" { #endif /* S1AP_EmergencyAreaIDList */ typedef struct S1AP_EmergencyAreaIDList { A_SEQUENCE_OF(S1AP_EmergencyAreaID_t) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_EmergencyAreaIDList_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_EmergencyAreaIDList; extern asn_SET_OF_specifics_t asn_SPC_S1AP_EmergencyAreaIDList_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_EmergencyAreaIDList_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_EmergencyAreaIDList_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_EmergencyAreaIDList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EmergencyAreaIDListForRestart.c000066400000000000000000000040661333553357400244250ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_EmergencyAreaIDListForRestart.h" static asn_oer_constraints_t asn_OER_type_S1AP_EmergencyAreaIDListForRestart_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_EmergencyAreaIDListForRestart_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_EmergencyAreaIDListForRestart_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_EmergencyAreaID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_EmergencyAreaIDListForRestart_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_S1AP_EmergencyAreaIDListForRestart_specs_1 = { sizeof(struct S1AP_EmergencyAreaIDListForRestart), offsetof(struct S1AP_EmergencyAreaIDListForRestart, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_EmergencyAreaIDListForRestart = { "EmergencyAreaIDListForRestart", "EmergencyAreaIDListForRestart", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_EmergencyAreaIDListForRestart_tags_1, sizeof(asn_DEF_S1AP_EmergencyAreaIDListForRestart_tags_1) /sizeof(asn_DEF_S1AP_EmergencyAreaIDListForRestart_tags_1[0]), /* 1 */ asn_DEF_S1AP_EmergencyAreaIDListForRestart_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_EmergencyAreaIDListForRestart_tags_1) /sizeof(asn_DEF_S1AP_EmergencyAreaIDListForRestart_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_EmergencyAreaIDListForRestart_constr_1, &asn_PER_type_S1AP_EmergencyAreaIDListForRestart_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_EmergencyAreaIDListForRestart_1, 1, /* Single element */ &asn_SPC_S1AP_EmergencyAreaIDListForRestart_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EmergencyAreaIDListForRestart.h000066400000000000000000000017251333553357400244310ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_EmergencyAreaIDListForRestart_H_ #define _S1AP_EmergencyAreaIDListForRestart_H_ #include /* Including external dependencies */ #include "S1AP_EmergencyAreaID.h" #include #include #ifdef __cplusplus extern "C" { #endif /* S1AP_EmergencyAreaIDListForRestart */ typedef struct S1AP_EmergencyAreaIDListForRestart { A_SEQUENCE_OF(S1AP_EmergencyAreaID_t) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_EmergencyAreaIDListForRestart_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_EmergencyAreaIDListForRestart; #ifdef __cplusplus } #endif #endif /* _S1AP_EmergencyAreaIDListForRestart_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EncryptionAlgorithms.c000066400000000000000000000042211333553357400230060ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_EncryptionAlgorithms.h" int S1AP_EncryptionAlgorithms_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 16)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_EncryptionAlgorithms_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..MAX)) */}; asn_per_constraints_t asn_PER_type_S1AP_EncryptionAlgorithms_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 16, 16 } /* (SIZE(16..16,...)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_EncryptionAlgorithms_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_EncryptionAlgorithms = { "EncryptionAlgorithms", "EncryptionAlgorithms", &asn_OP_BIT_STRING, asn_DEF_S1AP_EncryptionAlgorithms_tags_1, sizeof(asn_DEF_S1AP_EncryptionAlgorithms_tags_1) /sizeof(asn_DEF_S1AP_EncryptionAlgorithms_tags_1[0]), /* 1 */ asn_DEF_S1AP_EncryptionAlgorithms_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_EncryptionAlgorithms_tags_1) /sizeof(asn_DEF_S1AP_EncryptionAlgorithms_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_EncryptionAlgorithms_constr_1, &asn_PER_type_S1AP_EncryptionAlgorithms_constr_1, S1AP_EncryptionAlgorithms_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EncryptionAlgorithms.h000066400000000000000000000027441333553357400230230ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_EncryptionAlgorithms_H_ #define _S1AP_EncryptionAlgorithms_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_EncryptionAlgorithms */ typedef BIT_STRING_t S1AP_EncryptionAlgorithms_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_EncryptionAlgorithms_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_EncryptionAlgorithms; asn_struct_free_f S1AP_EncryptionAlgorithms_free; asn_struct_print_f S1AP_EncryptionAlgorithms_print; asn_constr_check_f S1AP_EncryptionAlgorithms_constraint; ber_type_decoder_f S1AP_EncryptionAlgorithms_decode_ber; der_type_encoder_f S1AP_EncryptionAlgorithms_encode_der; xer_type_decoder_f S1AP_EncryptionAlgorithms_decode_xer; xer_type_encoder_f S1AP_EncryptionAlgorithms_encode_xer; oer_type_decoder_f S1AP_EncryptionAlgorithms_decode_oer; oer_type_encoder_f S1AP_EncryptionAlgorithms_encode_oer; per_type_decoder_f S1AP_EncryptionAlgorithms_decode_uper; per_type_encoder_f S1AP_EncryptionAlgorithms_encode_uper; per_type_decoder_f S1AP_EncryptionAlgorithms_decode_aper; per_type_encoder_f S1AP_EncryptionAlgorithms_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_EncryptionAlgorithms_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EnhancedCoverageRestricted.c000066400000000000000000000044231333553357400240400ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_EnhancedCoverageRestricted.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_EnhancedCoverageRestricted_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_EnhancedCoverageRestricted_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_EnhancedCoverageRestricted_value2enum_1[] = { { 0, 10, "restricted" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_EnhancedCoverageRestricted_enum2value_1[] = { 0 /* restricted(0) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_EnhancedCoverageRestricted_specs_1 = { asn_MAP_S1AP_EnhancedCoverageRestricted_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_EnhancedCoverageRestricted_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_EnhancedCoverageRestricted_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_EnhancedCoverageRestricted = { "EnhancedCoverageRestricted", "EnhancedCoverageRestricted", &asn_OP_NativeEnumerated, asn_DEF_S1AP_EnhancedCoverageRestricted_tags_1, sizeof(asn_DEF_S1AP_EnhancedCoverageRestricted_tags_1) /sizeof(asn_DEF_S1AP_EnhancedCoverageRestricted_tags_1[0]), /* 1 */ asn_DEF_S1AP_EnhancedCoverageRestricted_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_EnhancedCoverageRestricted_tags_1) /sizeof(asn_DEF_S1AP_EnhancedCoverageRestricted_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_EnhancedCoverageRestricted_constr_1, &asn_PER_type_S1AP_EnhancedCoverageRestricted_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_EnhancedCoverageRestricted_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EnhancedCoverageRestricted.h000066400000000000000000000033051333553357400240430ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_EnhancedCoverageRestricted_H_ #define _S1AP_EnhancedCoverageRestricted_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_EnhancedCoverageRestricted { S1AP_EnhancedCoverageRestricted_restricted = 0 /* * Enumeration is extensible */ } e_S1AP_EnhancedCoverageRestricted; /* S1AP_EnhancedCoverageRestricted */ typedef long S1AP_EnhancedCoverageRestricted_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_EnhancedCoverageRestricted; asn_struct_free_f S1AP_EnhancedCoverageRestricted_free; asn_struct_print_f S1AP_EnhancedCoverageRestricted_print; asn_constr_check_f S1AP_EnhancedCoverageRestricted_constraint; ber_type_decoder_f S1AP_EnhancedCoverageRestricted_decode_ber; der_type_encoder_f S1AP_EnhancedCoverageRestricted_encode_der; xer_type_decoder_f S1AP_EnhancedCoverageRestricted_decode_xer; xer_type_encoder_f S1AP_EnhancedCoverageRestricted_encode_xer; oer_type_decoder_f S1AP_EnhancedCoverageRestricted_decode_oer; oer_type_encoder_f S1AP_EnhancedCoverageRestricted_encode_oer; per_type_decoder_f S1AP_EnhancedCoverageRestricted_decode_uper; per_type_encoder_f S1AP_EnhancedCoverageRestricted_encode_uper; per_type_decoder_f S1AP_EnhancedCoverageRestricted_decode_aper; per_type_encoder_f S1AP_EnhancedCoverageRestricted_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_EnhancedCoverageRestricted_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ErrorIndication.c000066400000000000000000000033141333553357400217170ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ErrorIndication.h" asn_TYPE_member_t asn_MBR_S1AP_ErrorIndication_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ErrorIndication, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P39, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ErrorIndication_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ErrorIndication_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ErrorIndication_specs_1 = { sizeof(struct S1AP_ErrorIndication), offsetof(struct S1AP_ErrorIndication, _asn_ctx), asn_MAP_S1AP_ErrorIndication_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ErrorIndication = { "ErrorIndication", "ErrorIndication", &asn_OP_SEQUENCE, asn_DEF_S1AP_ErrorIndication_tags_1, sizeof(asn_DEF_S1AP_ErrorIndication_tags_1) /sizeof(asn_DEF_S1AP_ErrorIndication_tags_1[0]), /* 1 */ asn_DEF_S1AP_ErrorIndication_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ErrorIndication_tags_1) /sizeof(asn_DEF_S1AP_ErrorIndication_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ErrorIndication_1, 1, /* Elements count */ &asn_SPC_S1AP_ErrorIndication_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ErrorIndication.h000066400000000000000000000020621333553357400217230ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ErrorIndication_H_ #define _S1AP_ErrorIndication_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ErrorIndication */ typedef struct S1AP_ErrorIndication { S1AP_ProtocolIE_Container_6551P39_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ErrorIndication_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ErrorIndication; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ErrorIndication_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ErrorIndication_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_ErrorIndication_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EventType.c000066400000000000000000000040551333553357400205520ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_EventType.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_EventType_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_EventType_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_EventType_value2enum_1[] = { { 0, 6, "direct" }, { 1, 20, "change-of-serve-cell" }, { 2, 25, "stop-change-of-serve-cell" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_EventType_enum2value_1[] = { 1, /* change-of-serve-cell(1) */ 0, /* direct(0) */ 2 /* stop-change-of-serve-cell(2) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_EventType_specs_1 = { asn_MAP_S1AP_EventType_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_EventType_enum2value_1, /* N => "tag"; sorted by N */ 3, /* Number of elements in the maps */ 4, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_EventType_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_EventType = { "EventType", "EventType", &asn_OP_NativeEnumerated, asn_DEF_S1AP_EventType_tags_1, sizeof(asn_DEF_S1AP_EventType_tags_1) /sizeof(asn_DEF_S1AP_EventType_tags_1[0]), /* 1 */ asn_DEF_S1AP_EventType_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_EventType_tags_1) /sizeof(asn_DEF_S1AP_EventType_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_EventType_constr_1, &asn_PER_type_S1AP_EventType_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_EventType_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_EventType.h000066400000000000000000000027461333553357400205640ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_EventType_H_ #define _S1AP_EventType_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_EventType { S1AP_EventType_direct = 0, S1AP_EventType_change_of_serve_cell = 1, S1AP_EventType_stop_change_of_serve_cell = 2 /* * Enumeration is extensible */ } e_S1AP_EventType; /* S1AP_EventType */ typedef long S1AP_EventType_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_EventType_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_EventType; extern const asn_INTEGER_specifics_t asn_SPC_EventType_specs_1; asn_struct_free_f EventType_free; asn_struct_print_f EventType_print; asn_constr_check_f EventType_constraint; ber_type_decoder_f EventType_decode_ber; der_type_encoder_f EventType_encode_der; xer_type_decoder_f EventType_decode_xer; xer_type_encoder_f EventType_encode_xer; oer_type_decoder_f EventType_decode_oer; oer_type_encoder_f EventType_encode_oer; per_type_decoder_f EventType_decode_uper; per_type_encoder_f EventType_encode_uper; per_type_decoder_f EventType_decode_aper; per_type_encoder_f EventType_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_EventType_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ExpectedActivityPeriod.c000066400000000000000000000042421333553357400232460ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ExpectedActivityPeriod.h" int S1AP_ExpectedActivityPeriod_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if(((value >= 1 && value <= 30) || (value == 40) || (value == 50) || (value == 60) || (value == 80) || (value == 100) || (value == 120) || (value == 150) || (value >= 180 && value <= 181))) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_ExpectedActivityPeriod_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_ExpectedActivityPeriod_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 181 } /* (1..181,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ExpectedActivityPeriod_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ExpectedActivityPeriod = { "ExpectedActivityPeriod", "ExpectedActivityPeriod", &asn_OP_NativeInteger, asn_DEF_S1AP_ExpectedActivityPeriod_tags_1, sizeof(asn_DEF_S1AP_ExpectedActivityPeriod_tags_1) /sizeof(asn_DEF_S1AP_ExpectedActivityPeriod_tags_1[0]), /* 1 */ asn_DEF_S1AP_ExpectedActivityPeriod_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ExpectedActivityPeriod_tags_1) /sizeof(asn_DEF_S1AP_ExpectedActivityPeriod_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ExpectedActivityPeriod_constr_1, &asn_PER_type_S1AP_ExpectedActivityPeriod_constr_1, S1AP_ExpectedActivityPeriod_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ExpectedActivityPeriod.h000066400000000000000000000030071333553357400232510ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ExpectedActivityPeriod_H_ #define _S1AP_ExpectedActivityPeriod_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ExpectedActivityPeriod */ typedef long S1AP_ExpectedActivityPeriod_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_ExpectedActivityPeriod_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ExpectedActivityPeriod; asn_struct_free_f S1AP_ExpectedActivityPeriod_free; asn_struct_print_f S1AP_ExpectedActivityPeriod_print; asn_constr_check_f S1AP_ExpectedActivityPeriod_constraint; ber_type_decoder_f S1AP_ExpectedActivityPeriod_decode_ber; der_type_encoder_f S1AP_ExpectedActivityPeriod_encode_der; xer_type_decoder_f S1AP_ExpectedActivityPeriod_decode_xer; xer_type_encoder_f S1AP_ExpectedActivityPeriod_encode_xer; oer_type_decoder_f S1AP_ExpectedActivityPeriod_decode_oer; oer_type_encoder_f S1AP_ExpectedActivityPeriod_encode_oer; per_type_decoder_f S1AP_ExpectedActivityPeriod_decode_uper; per_type_encoder_f S1AP_ExpectedActivityPeriod_encode_uper; per_type_decoder_f S1AP_ExpectedActivityPeriod_decode_aper; per_type_encoder_f S1AP_ExpectedActivityPeriod_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_ExpectedActivityPeriod_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ExpectedHOInterval.c000066400000000000000000000045101333553357400223200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ExpectedHOInterval.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_ExpectedHOInterval_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_ExpectedHOInterval_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 6 } /* (0..6,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_ExpectedHOInterval_value2enum_1[] = { { 0, 5, "sec15" }, { 1, 5, "sec30" }, { 2, 5, "sec60" }, { 3, 5, "sec90" }, { 4, 6, "sec120" }, { 5, 6, "sec180" }, { 6, 9, "long-time" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_ExpectedHOInterval_enum2value_1[] = { 6, /* long-time(6) */ 4, /* sec120(4) */ 0, /* sec15(0) */ 5, /* sec180(5) */ 1, /* sec30(1) */ 2, /* sec60(2) */ 3 /* sec90(3) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_ExpectedHOInterval_specs_1 = { asn_MAP_S1AP_ExpectedHOInterval_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_ExpectedHOInterval_enum2value_1, /* N => "tag"; sorted by N */ 7, /* Number of elements in the maps */ 8, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_ExpectedHOInterval_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ExpectedHOInterval = { "ExpectedHOInterval", "ExpectedHOInterval", &asn_OP_NativeEnumerated, asn_DEF_S1AP_ExpectedHOInterval_tags_1, sizeof(asn_DEF_S1AP_ExpectedHOInterval_tags_1) /sizeof(asn_DEF_S1AP_ExpectedHOInterval_tags_1[0]), /* 1 */ asn_DEF_S1AP_ExpectedHOInterval_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ExpectedHOInterval_tags_1) /sizeof(asn_DEF_S1AP_ExpectedHOInterval_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ExpectedHOInterval_constr_1, &asn_PER_type_S1AP_ExpectedHOInterval_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_ExpectedHOInterval_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ExpectedHOInterval.h000066400000000000000000000035021333553357400223250ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ExpectedHOInterval_H_ #define _S1AP_ExpectedHOInterval_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_ExpectedHOInterval { S1AP_ExpectedHOInterval_sec15 = 0, S1AP_ExpectedHOInterval_sec30 = 1, S1AP_ExpectedHOInterval_sec60 = 2, S1AP_ExpectedHOInterval_sec90 = 3, S1AP_ExpectedHOInterval_sec120 = 4, S1AP_ExpectedHOInterval_sec180 = 5, S1AP_ExpectedHOInterval_long_time = 6 /* * Enumeration is extensible */ } e_S1AP_ExpectedHOInterval; /* S1AP_ExpectedHOInterval */ typedef long S1AP_ExpectedHOInterval_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_ExpectedHOInterval_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ExpectedHOInterval; extern const asn_INTEGER_specifics_t asn_SPC_ExpectedHOInterval_specs_1; asn_struct_free_f ExpectedHOInterval_free; asn_struct_print_f ExpectedHOInterval_print; asn_constr_check_f ExpectedHOInterval_constraint; ber_type_decoder_f ExpectedHOInterval_decode_ber; der_type_encoder_f ExpectedHOInterval_encode_der; xer_type_decoder_f ExpectedHOInterval_decode_xer; xer_type_encoder_f ExpectedHOInterval_encode_xer; oer_type_decoder_f ExpectedHOInterval_decode_oer; oer_type_encoder_f ExpectedHOInterval_encode_oer; per_type_decoder_f ExpectedHOInterval_decode_uper; per_type_encoder_f ExpectedHOInterval_encode_uper; per_type_decoder_f ExpectedHOInterval_decode_aper; per_type_encoder_f ExpectedHOInterval_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_ExpectedHOInterval_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ExpectedIdlePeriod.c000066400000000000000000000041361333553357400223310ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ExpectedIdlePeriod.h" int S1AP_ExpectedIdlePeriod_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if(((value >= 1 && value <= 30) || (value == 40) || (value == 50) || (value == 60) || (value == 80) || (value == 100) || (value == 120) || (value == 150) || (value >= 180 && value <= 181))) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_ExpectedIdlePeriod_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_ExpectedIdlePeriod_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 181 } /* (1..181,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ExpectedIdlePeriod_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ExpectedIdlePeriod = { "ExpectedIdlePeriod", "ExpectedIdlePeriod", &asn_OP_NativeInteger, asn_DEF_S1AP_ExpectedIdlePeriod_tags_1, sizeof(asn_DEF_S1AP_ExpectedIdlePeriod_tags_1) /sizeof(asn_DEF_S1AP_ExpectedIdlePeriod_tags_1[0]), /* 1 */ asn_DEF_S1AP_ExpectedIdlePeriod_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ExpectedIdlePeriod_tags_1) /sizeof(asn_DEF_S1AP_ExpectedIdlePeriod_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ExpectedIdlePeriod_constr_1, &asn_PER_type_S1AP_ExpectedIdlePeriod_constr_1, S1AP_ExpectedIdlePeriod_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ExpectedIdlePeriod.h000066400000000000000000000026671333553357400223450ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ExpectedIdlePeriod_H_ #define _S1AP_ExpectedIdlePeriod_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ExpectedIdlePeriod */ typedef long S1AP_ExpectedIdlePeriod_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_ExpectedIdlePeriod_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ExpectedIdlePeriod; asn_struct_free_f S1AP_ExpectedIdlePeriod_free; asn_struct_print_f S1AP_ExpectedIdlePeriod_print; asn_constr_check_f S1AP_ExpectedIdlePeriod_constraint; ber_type_decoder_f S1AP_ExpectedIdlePeriod_decode_ber; der_type_encoder_f S1AP_ExpectedIdlePeriod_encode_der; xer_type_decoder_f S1AP_ExpectedIdlePeriod_decode_xer; xer_type_encoder_f S1AP_ExpectedIdlePeriod_encode_xer; oer_type_decoder_f S1AP_ExpectedIdlePeriod_decode_oer; oer_type_encoder_f S1AP_ExpectedIdlePeriod_encode_oer; per_type_decoder_f S1AP_ExpectedIdlePeriod_decode_uper; per_type_encoder_f S1AP_ExpectedIdlePeriod_encode_uper; per_type_decoder_f S1AP_ExpectedIdlePeriod_decode_aper; per_type_encoder_f S1AP_ExpectedIdlePeriod_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_ExpectedIdlePeriod_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ExpectedUEActivityBehaviour.c000066400000000000000000000064261333553357400242100ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ExpectedUEActivityBehaviour.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_ExpectedUEActivityBehaviour_1[] = { { ATF_POINTER, 4, offsetof(struct S1AP_ExpectedUEActivityBehaviour, expectedActivityPeriod), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ExpectedActivityPeriod, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "expectedActivityPeriod" }, { ATF_POINTER, 3, offsetof(struct S1AP_ExpectedUEActivityBehaviour, expectedIdlePeriod), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ExpectedIdlePeriod, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "expectedIdlePeriod" }, { ATF_POINTER, 2, offsetof(struct S1AP_ExpectedUEActivityBehaviour, sourceofUEActivityBehaviourInformation), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_SourceOfUEActivityBehaviourInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "sourceofUEActivityBehaviourInformation" }, { ATF_POINTER, 1, offsetof(struct S1AP_ExpectedUEActivityBehaviour, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P54, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_ExpectedUEActivityBehaviour_oms_1[] = { 0, 1, 2, 3 }; static const ber_tlv_tag_t asn_DEF_S1AP_ExpectedUEActivityBehaviour_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ExpectedUEActivityBehaviour_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* expectedActivityPeriod */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* expectedIdlePeriod */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* sourceofUEActivityBehaviourInformation */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ExpectedUEActivityBehaviour_specs_1 = { sizeof(struct S1AP_ExpectedUEActivityBehaviour), offsetof(struct S1AP_ExpectedUEActivityBehaviour, _asn_ctx), asn_MAP_S1AP_ExpectedUEActivityBehaviour_tag2el_1, 4, /* Count of tags in the map */ asn_MAP_S1AP_ExpectedUEActivityBehaviour_oms_1, /* Optional members */ 4, 0, /* Root/Additions */ 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ExpectedUEActivityBehaviour = { "ExpectedUEActivityBehaviour", "ExpectedUEActivityBehaviour", &asn_OP_SEQUENCE, asn_DEF_S1AP_ExpectedUEActivityBehaviour_tags_1, sizeof(asn_DEF_S1AP_ExpectedUEActivityBehaviour_tags_1) /sizeof(asn_DEF_S1AP_ExpectedUEActivityBehaviour_tags_1[0]), /* 1 */ asn_DEF_S1AP_ExpectedUEActivityBehaviour_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ExpectedUEActivityBehaviour_tags_1) /sizeof(asn_DEF_S1AP_ExpectedUEActivityBehaviour_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ExpectedUEActivityBehaviour_1, 4, /* Elements count */ &asn_SPC_S1AP_ExpectedUEActivityBehaviour_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ExpectedUEActivityBehaviour.h000066400000000000000000000030721333553357400242070ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ExpectedUEActivityBehaviour_H_ #define _S1AP_ExpectedUEActivityBehaviour_H_ #include /* Including external dependencies */ #include "S1AP_ExpectedActivityPeriod.h" #include "S1AP_ExpectedIdlePeriod.h" #include "S1AP_SourceOfUEActivityBehaviourInformation.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_ExpectedUEActivityBehaviour */ typedef struct S1AP_ExpectedUEActivityBehaviour { S1AP_ExpectedActivityPeriod_t *expectedActivityPeriod; /* OPTIONAL */ S1AP_ExpectedIdlePeriod_t *expectedIdlePeriod; /* OPTIONAL */ S1AP_SourceOfUEActivityBehaviourInformation_t *sourceofUEActivityBehaviourInformation; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ExpectedUEActivityBehaviour_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ExpectedUEActivityBehaviour; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ExpectedUEActivityBehaviour_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ExpectedUEActivityBehaviour_1[4]; #ifdef __cplusplus } #endif #endif /* _S1AP_ExpectedUEActivityBehaviour_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ExpectedUEBehaviour.c000066400000000000000000000053071333553357400224700ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ExpectedUEBehaviour.h" #include "S1AP_ExpectedUEActivityBehaviour.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_ExpectedUEBehaviour_1[] = { { ATF_POINTER, 3, offsetof(struct S1AP_ExpectedUEBehaviour, expectedActivity), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ExpectedUEActivityBehaviour, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "expectedActivity" }, { ATF_POINTER, 2, offsetof(struct S1AP_ExpectedUEBehaviour, expectedHOInterval), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ExpectedHOInterval, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "expectedHOInterval" }, { ATF_POINTER, 1, offsetof(struct S1AP_ExpectedUEBehaviour, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P53, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_ExpectedUEBehaviour_oms_1[] = { 0, 1, 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_ExpectedUEBehaviour_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ExpectedUEBehaviour_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* expectedActivity */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* expectedHOInterval */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_ExpectedUEBehaviour_specs_1 = { sizeof(struct S1AP_ExpectedUEBehaviour), offsetof(struct S1AP_ExpectedUEBehaviour, _asn_ctx), asn_MAP_S1AP_ExpectedUEBehaviour_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_ExpectedUEBehaviour_oms_1, /* Optional members */ 3, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ExpectedUEBehaviour = { "ExpectedUEBehaviour", "ExpectedUEBehaviour", &asn_OP_SEQUENCE, asn_DEF_S1AP_ExpectedUEBehaviour_tags_1, sizeof(asn_DEF_S1AP_ExpectedUEBehaviour_tags_1) /sizeof(asn_DEF_S1AP_ExpectedUEBehaviour_tags_1[0]), /* 1 */ asn_DEF_S1AP_ExpectedUEBehaviour_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ExpectedUEBehaviour_tags_1) /sizeof(asn_DEF_S1AP_ExpectedUEBehaviour_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ExpectedUEBehaviour_1, 3, /* Elements count */ &asn_SPC_S1AP_ExpectedUEBehaviour_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ExpectedUEBehaviour.h000066400000000000000000000023141333553357400224700ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ExpectedUEBehaviour_H_ #define _S1AP_ExpectedUEBehaviour_H_ #include /* Including external dependencies */ #include "S1AP_ExpectedHOInterval.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ExpectedUEActivityBehaviour; struct S1AP_ProtocolExtensionContainer; /* S1AP_ExpectedUEBehaviour */ typedef struct S1AP_ExpectedUEBehaviour { struct S1AP_ExpectedUEActivityBehaviour *expectedActivity; /* OPTIONAL */ S1AP_ExpectedHOInterval_t *expectedHOInterval; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ExpectedUEBehaviour_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ExpectedUEBehaviour; #ifdef __cplusplus } #endif #endif /* _S1AP_ExpectedUEBehaviour_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Extended-UEIdentityIndexValue.c000066400000000000000000000044341333553357400243760ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Extended-UEIdentityIndexValue.h" int S1AP_Extended_UEIdentityIndexValue_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 14)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_Extended_UEIdentityIndexValue_constr_1 CC_NOTUSED = { { 0, 0 }, 14 /* (SIZE(14..14)) */}; static asn_per_constraints_t asn_PER_type_S1AP_Extended_UEIdentityIndexValue_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 14, 14 } /* (SIZE(14..14)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_Extended_UEIdentityIndexValue_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Extended_UEIdentityIndexValue = { "Extended-UEIdentityIndexValue", "Extended-UEIdentityIndexValue", &asn_OP_BIT_STRING, asn_DEF_S1AP_Extended_UEIdentityIndexValue_tags_1, sizeof(asn_DEF_S1AP_Extended_UEIdentityIndexValue_tags_1) /sizeof(asn_DEF_S1AP_Extended_UEIdentityIndexValue_tags_1[0]), /* 1 */ asn_DEF_S1AP_Extended_UEIdentityIndexValue_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Extended_UEIdentityIndexValue_tags_1) /sizeof(asn_DEF_S1AP_Extended_UEIdentityIndexValue_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_Extended_UEIdentityIndexValue_constr_1, &asn_PER_type_S1AP_Extended_UEIdentityIndexValue_constr_1, S1AP_Extended_UEIdentityIndexValue_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Extended-UEIdentityIndexValue.h000066400000000000000000000031011333553357400243710ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Extended_UEIdentityIndexValue_H_ #define _S1AP_Extended_UEIdentityIndexValue_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_Extended-UEIdentityIndexValue */ typedef BIT_STRING_t S1AP_Extended_UEIdentityIndexValue_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Extended_UEIdentityIndexValue; asn_struct_free_f S1AP_Extended_UEIdentityIndexValue_free; asn_struct_print_f S1AP_Extended_UEIdentityIndexValue_print; asn_constr_check_f S1AP_Extended_UEIdentityIndexValue_constraint; ber_type_decoder_f S1AP_Extended_UEIdentityIndexValue_decode_ber; der_type_encoder_f S1AP_Extended_UEIdentityIndexValue_encode_der; xer_type_decoder_f S1AP_Extended_UEIdentityIndexValue_decode_xer; xer_type_encoder_f S1AP_Extended_UEIdentityIndexValue_encode_xer; oer_type_decoder_f S1AP_Extended_UEIdentityIndexValue_decode_oer; oer_type_encoder_f S1AP_Extended_UEIdentityIndexValue_encode_oer; per_type_decoder_f S1AP_Extended_UEIdentityIndexValue_decode_uper; per_type_encoder_f S1AP_Extended_UEIdentityIndexValue_encode_uper; per_type_decoder_f S1AP_Extended_UEIdentityIndexValue_decode_aper; per_type_encoder_f S1AP_Extended_UEIdentityIndexValue_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Extended_UEIdentityIndexValue_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ExtendedRNC-ID.c000066400000000000000000000036151333553357400212250ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ExtendedRNC-ID.h" int S1AP_ExtendedRNC_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 4096 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_ExtendedRNC_ID_constr_1 CC_NOTUSED = { { 2, 1 } /* (4096..65535) */, -1}; asn_per_constraints_t asn_PER_type_S1AP_ExtendedRNC_ID_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 4096, 65535 } /* (4096..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ExtendedRNC_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ExtendedRNC_ID = { "ExtendedRNC-ID", "ExtendedRNC-ID", &asn_OP_NativeInteger, asn_DEF_S1AP_ExtendedRNC_ID_tags_1, sizeof(asn_DEF_S1AP_ExtendedRNC_ID_tags_1) /sizeof(asn_DEF_S1AP_ExtendedRNC_ID_tags_1[0]), /* 1 */ asn_DEF_S1AP_ExtendedRNC_ID_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ExtendedRNC_ID_tags_1) /sizeof(asn_DEF_S1AP_ExtendedRNC_ID_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ExtendedRNC_ID_constr_1, &asn_PER_type_S1AP_ExtendedRNC_ID_constr_1, S1AP_ExtendedRNC_ID_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ExtendedRNC-ID.h000066400000000000000000000025471333553357400212350ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ExtendedRNC_ID_H_ #define _S1AP_ExtendedRNC_ID_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ExtendedRNC-ID */ typedef long S1AP_ExtendedRNC_ID_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_ExtendedRNC_ID_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ExtendedRNC_ID; asn_struct_free_f S1AP_ExtendedRNC_ID_free; asn_struct_print_f S1AP_ExtendedRNC_ID_print; asn_constr_check_f S1AP_ExtendedRNC_ID_constraint; ber_type_decoder_f S1AP_ExtendedRNC_ID_decode_ber; der_type_encoder_f S1AP_ExtendedRNC_ID_encode_der; xer_type_decoder_f S1AP_ExtendedRNC_ID_decode_xer; xer_type_encoder_f S1AP_ExtendedRNC_ID_encode_xer; oer_type_decoder_f S1AP_ExtendedRNC_ID_decode_oer; oer_type_encoder_f S1AP_ExtendedRNC_ID_encode_oer; per_type_decoder_f S1AP_ExtendedRNC_ID_decode_uper; per_type_encoder_f S1AP_ExtendedRNC_ID_encode_uper; per_type_decoder_f S1AP_ExtendedRNC_ID_decode_aper; per_type_encoder_f S1AP_ExtendedRNC_ID_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_ExtendedRNC_ID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ExtendedRepetitionPeriod.c000066400000000000000000000041011333553357400235650ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ExtendedRepetitionPeriod.h" int S1AP_ExtendedRepetitionPeriod_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 4096 && value <= 131071)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_ExtendedRepetitionPeriod_constr_1 CC_NOTUSED = { { 4, 1 } /* (4096..131071) */, -1}; static asn_per_constraints_t asn_PER_type_S1AP_ExtendedRepetitionPeriod_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 17, -1, 4096, 131071 } /* (4096..131071) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ExtendedRepetitionPeriod_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ExtendedRepetitionPeriod = { "ExtendedRepetitionPeriod", "ExtendedRepetitionPeriod", &asn_OP_NativeInteger, asn_DEF_S1AP_ExtendedRepetitionPeriod_tags_1, sizeof(asn_DEF_S1AP_ExtendedRepetitionPeriod_tags_1) /sizeof(asn_DEF_S1AP_ExtendedRepetitionPeriod_tags_1[0]), /* 1 */ asn_DEF_S1AP_ExtendedRepetitionPeriod_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ExtendedRepetitionPeriod_tags_1) /sizeof(asn_DEF_S1AP_ExtendedRepetitionPeriod_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ExtendedRepetitionPeriod_constr_1, &asn_PER_type_S1AP_ExtendedRepetitionPeriod_constr_1, S1AP_ExtendedRepetitionPeriod_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ExtendedRepetitionPeriod.h000066400000000000000000000027351333553357400236050ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ExtendedRepetitionPeriod_H_ #define _S1AP_ExtendedRepetitionPeriod_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ExtendedRepetitionPeriod */ typedef long S1AP_ExtendedRepetitionPeriod_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ExtendedRepetitionPeriod; asn_struct_free_f S1AP_ExtendedRepetitionPeriod_free; asn_struct_print_f S1AP_ExtendedRepetitionPeriod_print; asn_constr_check_f S1AP_ExtendedRepetitionPeriod_constraint; ber_type_decoder_f S1AP_ExtendedRepetitionPeriod_decode_ber; der_type_encoder_f S1AP_ExtendedRepetitionPeriod_encode_der; xer_type_decoder_f S1AP_ExtendedRepetitionPeriod_decode_xer; xer_type_encoder_f S1AP_ExtendedRepetitionPeriod_encode_xer; oer_type_decoder_f S1AP_ExtendedRepetitionPeriod_decode_oer; oer_type_encoder_f S1AP_ExtendedRepetitionPeriod_encode_oer; per_type_decoder_f S1AP_ExtendedRepetitionPeriod_decode_uper; per_type_encoder_f S1AP_ExtendedRepetitionPeriod_encode_uper; per_type_decoder_f S1AP_ExtendedRepetitionPeriod_decode_aper; per_type_encoder_f S1AP_ExtendedRepetitionPeriod_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_ExtendedRepetitionPeriod_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ForbiddenInterRATs.c000066400000000000000000000044771333553357400222670ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ForbiddenInterRATs.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_ForbiddenInterRATs_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_ForbiddenInterRATs_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_ForbiddenInterRATs_value2enum_1[] = { { 0, 3, "all" }, { 1, 5, "geran" }, { 2, 5, "utran" }, { 3, 8, "cdma2000" }, { 4, 13, "geranandutran" }, { 5, 16, "cdma2000andutran" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_ForbiddenInterRATs_enum2value_1[] = { 0, /* all(0) */ 3, /* cdma2000(3) */ 5, /* cdma2000andutran(5) */ 1, /* geran(1) */ 4, /* geranandutran(4) */ 2 /* utran(2) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_ForbiddenInterRATs_specs_1 = { asn_MAP_S1AP_ForbiddenInterRATs_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_ForbiddenInterRATs_enum2value_1, /* N => "tag"; sorted by N */ 6, /* Number of elements in the maps */ 5, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_ForbiddenInterRATs_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ForbiddenInterRATs = { "ForbiddenInterRATs", "ForbiddenInterRATs", &asn_OP_NativeEnumerated, asn_DEF_S1AP_ForbiddenInterRATs_tags_1, sizeof(asn_DEF_S1AP_ForbiddenInterRATs_tags_1) /sizeof(asn_DEF_S1AP_ForbiddenInterRATs_tags_1[0]), /* 1 */ asn_DEF_S1AP_ForbiddenInterRATs_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ForbiddenInterRATs_tags_1) /sizeof(asn_DEF_S1AP_ForbiddenInterRATs_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ForbiddenInterRATs_constr_1, &asn_PER_type_S1AP_ForbiddenInterRATs_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_ForbiddenInterRATs_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ForbiddenInterRATs.h000066400000000000000000000034541333553357400222660ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ForbiddenInterRATs_H_ #define _S1AP_ForbiddenInterRATs_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_ForbiddenInterRATs { S1AP_ForbiddenInterRATs_all = 0, S1AP_ForbiddenInterRATs_geran = 1, S1AP_ForbiddenInterRATs_utran = 2, S1AP_ForbiddenInterRATs_cdma2000 = 3, /* * Enumeration is extensible */ S1AP_ForbiddenInterRATs_geranandutran = 4, S1AP_ForbiddenInterRATs_cdma2000andutran = 5 } e_S1AP_ForbiddenInterRATs; /* S1AP_ForbiddenInterRATs */ typedef long S1AP_ForbiddenInterRATs_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_ForbiddenInterRATs_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ForbiddenInterRATs; extern const asn_INTEGER_specifics_t asn_SPC_ForbiddenInterRATs_specs_1; asn_struct_free_f ForbiddenInterRATs_free; asn_struct_print_f ForbiddenInterRATs_print; asn_constr_check_f ForbiddenInterRATs_constraint; ber_type_decoder_f ForbiddenInterRATs_decode_ber; der_type_encoder_f ForbiddenInterRATs_encode_der; xer_type_decoder_f ForbiddenInterRATs_decode_xer; xer_type_encoder_f ForbiddenInterRATs_encode_xer; oer_type_decoder_f ForbiddenInterRATs_decode_oer; oer_type_encoder_f ForbiddenInterRATs_encode_oer; per_type_decoder_f ForbiddenInterRATs_decode_uper; per_type_encoder_f ForbiddenInterRATs_encode_uper; per_type_decoder_f ForbiddenInterRATs_decode_aper; per_type_encoder_f ForbiddenInterRATs_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_ForbiddenInterRATs_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ForbiddenLACs.c000066400000000000000000000033121333553357400212210ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ForbiddenLACs.h" static asn_oer_constraints_t asn_OER_type_S1AP_ForbiddenLACs_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..4096)) */}; asn_per_constraints_t asn_PER_type_S1AP_ForbiddenLACs_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 12, 12, 1, 4096 } /* (SIZE(1..4096)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_ForbiddenLACs_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_LAC, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ForbiddenLACs_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ForbiddenLACs_specs_1 = { sizeof(struct S1AP_ForbiddenLACs), offsetof(struct S1AP_ForbiddenLACs, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ForbiddenLACs = { "ForbiddenLACs", "ForbiddenLACs", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ForbiddenLACs_tags_1, sizeof(asn_DEF_S1AP_ForbiddenLACs_tags_1) /sizeof(asn_DEF_S1AP_ForbiddenLACs_tags_1[0]), /* 1 */ asn_DEF_S1AP_ForbiddenLACs_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ForbiddenLACs_tags_1) /sizeof(asn_DEF_S1AP_ForbiddenLACs_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ForbiddenLACs_constr_1, &asn_PER_type_S1AP_ForbiddenLACs_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ForbiddenLACs_1, 1, /* Single element */ &asn_SPC_S1AP_ForbiddenLACs_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ForbiddenLACs.h000066400000000000000000000020201333553357400212210ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ForbiddenLACs_H_ #define _S1AP_ForbiddenLACs_H_ #include /* Including external dependencies */ #include "S1AP_LAC.h" #include #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ForbiddenLACs */ typedef struct S1AP_ForbiddenLACs { A_SEQUENCE_OF(S1AP_LAC_t) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ForbiddenLACs_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ForbiddenLACs; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ForbiddenLACs_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ForbiddenLACs_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ForbiddenLACs_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_ForbiddenLACs_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ForbiddenLAs-Item.c000066400000000000000000000050511333553357400220140ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ForbiddenLAs-Item.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_ForbiddenLAs_Item_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ForbiddenLAs_Item, pLMN_Identity), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_PLMNidentity, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "pLMN-Identity" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ForbiddenLAs_Item, forbiddenLACs), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ForbiddenLACs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "forbiddenLACs" }, { ATF_POINTER, 1, offsetof(struct S1AP_ForbiddenLAs_Item, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P56, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_ForbiddenLAs_Item_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_ForbiddenLAs_Item_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ForbiddenLAs_Item_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMN-Identity */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* forbiddenLACs */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ForbiddenLAs_Item_specs_1 = { sizeof(struct S1AP_ForbiddenLAs_Item), offsetof(struct S1AP_ForbiddenLAs_Item, _asn_ctx), asn_MAP_S1AP_ForbiddenLAs_Item_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_ForbiddenLAs_Item_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ForbiddenLAs_Item = { "ForbiddenLAs-Item", "ForbiddenLAs-Item", &asn_OP_SEQUENCE, asn_DEF_S1AP_ForbiddenLAs_Item_tags_1, sizeof(asn_DEF_S1AP_ForbiddenLAs_Item_tags_1) /sizeof(asn_DEF_S1AP_ForbiddenLAs_Item_tags_1[0]), /* 1 */ asn_DEF_S1AP_ForbiddenLAs_Item_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ForbiddenLAs_Item_tags_1) /sizeof(asn_DEF_S1AP_ForbiddenLAs_Item_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ForbiddenLAs_Item_1, 3, /* Elements count */ &asn_SPC_S1AP_ForbiddenLAs_Item_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ForbiddenLAs-Item.h000066400000000000000000000023661333553357400220270ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ForbiddenLAs_Item_H_ #define _S1AP_ForbiddenLAs_Item_H_ #include /* Including external dependencies */ #include "S1AP_PLMNidentity.h" #include "S1AP_ForbiddenLACs.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_ForbiddenLAs-Item */ typedef struct S1AP_ForbiddenLAs_Item { S1AP_PLMNidentity_t pLMN_Identity; S1AP_ForbiddenLACs_t forbiddenLACs; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ForbiddenLAs_Item_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ForbiddenLAs_Item; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ForbiddenLAs_Item_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ForbiddenLAs_Item_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_ForbiddenLAs_Item_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ForbiddenLAs.c000066400000000000000000000033401333553357400211170ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ForbiddenLAs.h" #include "S1AP_ForbiddenLAs-Item.h" static asn_oer_constraints_t asn_OER_type_S1AP_ForbiddenLAs_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..16)) */}; asn_per_constraints_t asn_PER_type_S1AP_ForbiddenLAs_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 4, 4, 1, 16 } /* (SIZE(1..16)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_ForbiddenLAs_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ForbiddenLAs_Item, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ForbiddenLAs_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ForbiddenLAs_specs_1 = { sizeof(struct S1AP_ForbiddenLAs), offsetof(struct S1AP_ForbiddenLAs, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ForbiddenLAs = { "ForbiddenLAs", "ForbiddenLAs", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ForbiddenLAs_tags_1, sizeof(asn_DEF_S1AP_ForbiddenLAs_tags_1) /sizeof(asn_DEF_S1AP_ForbiddenLAs_tags_1[0]), /* 1 */ asn_DEF_S1AP_ForbiddenLAs_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ForbiddenLAs_tags_1) /sizeof(asn_DEF_S1AP_ForbiddenLAs_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ForbiddenLAs_constr_1, &asn_PER_type_S1AP_ForbiddenLAs_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ForbiddenLAs_1, 1, /* Single element */ &asn_SPC_S1AP_ForbiddenLAs_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ForbiddenLAs.h000066400000000000000000000020761333553357400211310ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ForbiddenLAs_H_ #define _S1AP_ForbiddenLAs_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ForbiddenLAs_Item; /* S1AP_ForbiddenLAs */ typedef struct S1AP_ForbiddenLAs { A_SEQUENCE_OF(struct S1AP_ForbiddenLAs_Item) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ForbiddenLAs_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ForbiddenLAs; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ForbiddenLAs_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ForbiddenLAs_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ForbiddenLAs_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_ForbiddenLAs_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ForbiddenTACs.c000066400000000000000000000033121333553357400212310ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ForbiddenTACs.h" static asn_oer_constraints_t asn_OER_type_S1AP_ForbiddenTACs_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..4096)) */}; asn_per_constraints_t asn_PER_type_S1AP_ForbiddenTACs_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 12, 12, 1, 4096 } /* (SIZE(1..4096)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_ForbiddenTACs_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_TAC, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ForbiddenTACs_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ForbiddenTACs_specs_1 = { sizeof(struct S1AP_ForbiddenTACs), offsetof(struct S1AP_ForbiddenTACs, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ForbiddenTACs = { "ForbiddenTACs", "ForbiddenTACs", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ForbiddenTACs_tags_1, sizeof(asn_DEF_S1AP_ForbiddenTACs_tags_1) /sizeof(asn_DEF_S1AP_ForbiddenTACs_tags_1[0]), /* 1 */ asn_DEF_S1AP_ForbiddenTACs_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ForbiddenTACs_tags_1) /sizeof(asn_DEF_S1AP_ForbiddenTACs_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ForbiddenTACs_constr_1, &asn_PER_type_S1AP_ForbiddenTACs_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ForbiddenTACs_1, 1, /* Single element */ &asn_SPC_S1AP_ForbiddenTACs_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ForbiddenTACs.h000066400000000000000000000020201333553357400212310ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ForbiddenTACs_H_ #define _S1AP_ForbiddenTACs_H_ #include /* Including external dependencies */ #include "S1AP_TAC.h" #include #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ForbiddenTACs */ typedef struct S1AP_ForbiddenTACs { A_SEQUENCE_OF(S1AP_TAC_t) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ForbiddenTACs_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ForbiddenTACs; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ForbiddenTACs_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ForbiddenTACs_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ForbiddenTACs_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_ForbiddenTACs_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ForbiddenTAs-Item.c000066400000000000000000000050511333553357400220240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ForbiddenTAs-Item.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_ForbiddenTAs_Item_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ForbiddenTAs_Item, pLMN_Identity), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_PLMNidentity, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "pLMN-Identity" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ForbiddenTAs_Item, forbiddenTACs), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ForbiddenTACs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "forbiddenTACs" }, { ATF_POINTER, 1, offsetof(struct S1AP_ForbiddenTAs_Item, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P55, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_ForbiddenTAs_Item_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_ForbiddenTAs_Item_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ForbiddenTAs_Item_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMN-Identity */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* forbiddenTACs */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ForbiddenTAs_Item_specs_1 = { sizeof(struct S1AP_ForbiddenTAs_Item), offsetof(struct S1AP_ForbiddenTAs_Item, _asn_ctx), asn_MAP_S1AP_ForbiddenTAs_Item_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_ForbiddenTAs_Item_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ForbiddenTAs_Item = { "ForbiddenTAs-Item", "ForbiddenTAs-Item", &asn_OP_SEQUENCE, asn_DEF_S1AP_ForbiddenTAs_Item_tags_1, sizeof(asn_DEF_S1AP_ForbiddenTAs_Item_tags_1) /sizeof(asn_DEF_S1AP_ForbiddenTAs_Item_tags_1[0]), /* 1 */ asn_DEF_S1AP_ForbiddenTAs_Item_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ForbiddenTAs_Item_tags_1) /sizeof(asn_DEF_S1AP_ForbiddenTAs_Item_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ForbiddenTAs_Item_1, 3, /* Elements count */ &asn_SPC_S1AP_ForbiddenTAs_Item_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ForbiddenTAs-Item.h000066400000000000000000000023661333553357400220370ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ForbiddenTAs_Item_H_ #define _S1AP_ForbiddenTAs_Item_H_ #include /* Including external dependencies */ #include "S1AP_PLMNidentity.h" #include "S1AP_ForbiddenTACs.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_ForbiddenTAs-Item */ typedef struct S1AP_ForbiddenTAs_Item { S1AP_PLMNidentity_t pLMN_Identity; S1AP_ForbiddenTACs_t forbiddenTACs; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ForbiddenTAs_Item_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ForbiddenTAs_Item; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ForbiddenTAs_Item_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ForbiddenTAs_Item_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_ForbiddenTAs_Item_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ForbiddenTAs.c000066400000000000000000000033401333553357400211270ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ForbiddenTAs.h" #include "S1AP_ForbiddenTAs-Item.h" static asn_oer_constraints_t asn_OER_type_S1AP_ForbiddenTAs_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..16)) */}; asn_per_constraints_t asn_PER_type_S1AP_ForbiddenTAs_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 4, 4, 1, 16 } /* (SIZE(1..16)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_ForbiddenTAs_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ForbiddenTAs_Item, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ForbiddenTAs_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ForbiddenTAs_specs_1 = { sizeof(struct S1AP_ForbiddenTAs), offsetof(struct S1AP_ForbiddenTAs, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ForbiddenTAs = { "ForbiddenTAs", "ForbiddenTAs", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ForbiddenTAs_tags_1, sizeof(asn_DEF_S1AP_ForbiddenTAs_tags_1) /sizeof(asn_DEF_S1AP_ForbiddenTAs_tags_1[0]), /* 1 */ asn_DEF_S1AP_ForbiddenTAs_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ForbiddenTAs_tags_1) /sizeof(asn_DEF_S1AP_ForbiddenTAs_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ForbiddenTAs_constr_1, &asn_PER_type_S1AP_ForbiddenTAs_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ForbiddenTAs_1, 1, /* Single element */ &asn_SPC_S1AP_ForbiddenTAs_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ForbiddenTAs.h000066400000000000000000000020761333553357400211410ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ForbiddenTAs_H_ #define _S1AP_ForbiddenTAs_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ForbiddenTAs_Item; /* S1AP_ForbiddenTAs */ typedef struct S1AP_ForbiddenTAs { A_SEQUENCE_OF(struct S1AP_ForbiddenTAs_Item) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ForbiddenTAs_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ForbiddenTAs; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ForbiddenTAs_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ForbiddenTAs_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ForbiddenTAs_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_ForbiddenTAs_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_GBR-QosInformation.c000066400000000000000000000065041333553357400222100ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_GBR-QosInformation.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_GBR_QosInformation_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_GBR_QosInformation, e_RAB_MaximumBitrateDL), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_BitRate, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-MaximumBitrateDL" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_GBR_QosInformation, e_RAB_MaximumBitrateUL), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_BitRate, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-MaximumBitrateUL" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_GBR_QosInformation, e_RAB_GuaranteedBitrateDL), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_BitRate, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-GuaranteedBitrateDL" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_GBR_QosInformation, e_RAB_GuaranteedBitrateUL), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_BitRate, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RAB-GuaranteedBitrateUL" }, { ATF_POINTER, 1, offsetof(struct S1AP_GBR_QosInformation, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P57, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_GBR_QosInformation_oms_1[] = { 4 }; static const ber_tlv_tag_t asn_DEF_S1AP_GBR_QosInformation_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_GBR_QosInformation_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-RAB-MaximumBitrateDL */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* e-RAB-MaximumBitrateUL */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* e-RAB-GuaranteedBitrateDL */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* e-RAB-GuaranteedBitrateUL */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_GBR_QosInformation_specs_1 = { sizeof(struct S1AP_GBR_QosInformation), offsetof(struct S1AP_GBR_QosInformation, _asn_ctx), asn_MAP_S1AP_GBR_QosInformation_tag2el_1, 5, /* Count of tags in the map */ asn_MAP_S1AP_GBR_QosInformation_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 5, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_GBR_QosInformation = { "GBR-QosInformation", "GBR-QosInformation", &asn_OP_SEQUENCE, asn_DEF_S1AP_GBR_QosInformation_tags_1, sizeof(asn_DEF_S1AP_GBR_QosInformation_tags_1) /sizeof(asn_DEF_S1AP_GBR_QosInformation_tags_1[0]), /* 1 */ asn_DEF_S1AP_GBR_QosInformation_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_GBR_QosInformation_tags_1) /sizeof(asn_DEF_S1AP_GBR_QosInformation_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_GBR_QosInformation_1, 5, /* Elements count */ &asn_SPC_S1AP_GBR_QosInformation_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_GBR-QosInformation.h000066400000000000000000000024711333553357400222140ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_GBR_QosInformation_H_ #define _S1AP_GBR_QosInformation_H_ #include /* Including external dependencies */ #include "S1AP_BitRate.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_GBR-QosInformation */ typedef struct S1AP_GBR_QosInformation { S1AP_BitRate_t e_RAB_MaximumBitrateDL; S1AP_BitRate_t e_RAB_MaximumBitrateUL; S1AP_BitRate_t e_RAB_GuaranteedBitrateDL; S1AP_BitRate_t e_RAB_GuaranteedBitrateUL; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_GBR_QosInformation_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_GBR_QosInformation; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_GBR_QosInformation_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_GBR_QosInformation_1[5]; #ifdef __cplusplus } #endif #endif /* _S1AP_GBR_QosInformation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_GERAN-Cell-ID.c000066400000000000000000000052271333553357400206340ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_GERAN-Cell-ID.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_GERAN_Cell_ID_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_GERAN_Cell_ID, lAI), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_LAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "lAI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_GERAN_Cell_ID, rAC), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_RAC, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "rAC" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_GERAN_Cell_ID, cI), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cI" }, { ATF_POINTER, 1, offsetof(struct S1AP_GERAN_Cell_ID, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P46, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_GERAN_Cell_ID_oms_1[] = { 3 }; static const ber_tlv_tag_t asn_DEF_S1AP_GERAN_Cell_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_GERAN_Cell_ID_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* lAI */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* rAC */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* cI */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_GERAN_Cell_ID_specs_1 = { sizeof(struct S1AP_GERAN_Cell_ID), offsetof(struct S1AP_GERAN_Cell_ID, _asn_ctx), asn_MAP_S1AP_GERAN_Cell_ID_tag2el_1, 4, /* Count of tags in the map */ asn_MAP_S1AP_GERAN_Cell_ID_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_GERAN_Cell_ID = { "GERAN-Cell-ID", "GERAN-Cell-ID", &asn_OP_SEQUENCE, asn_DEF_S1AP_GERAN_Cell_ID_tags_1, sizeof(asn_DEF_S1AP_GERAN_Cell_ID_tags_1) /sizeof(asn_DEF_S1AP_GERAN_Cell_ID_tags_1[0]), /* 1 */ asn_DEF_S1AP_GERAN_Cell_ID_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_GERAN_Cell_ID_tags_1) /sizeof(asn_DEF_S1AP_GERAN_Cell_ID_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_GERAN_Cell_ID_1, 4, /* Elements count */ &asn_SPC_S1AP_GERAN_Cell_ID_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_GERAN-Cell-ID.h000066400000000000000000000022751333553357400206410ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_GERAN_Cell_ID_H_ #define _S1AP_GERAN_Cell_ID_H_ #include /* Including external dependencies */ #include "S1AP_LAI.h" #include "S1AP_RAC.h" #include "S1AP_CI.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_GERAN-Cell-ID */ typedef struct S1AP_GERAN_Cell_ID { S1AP_LAI_t lAI; S1AP_RAC_t rAC; S1AP_CI_t cI; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_GERAN_Cell_ID_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_GERAN_Cell_ID; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_GERAN_Cell_ID_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_GERAN_Cell_ID_1[4]; #ifdef __cplusplus } #endif #endif /* _S1AP_GERAN_Cell_ID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_GTP-TEID.c000066400000000000000000000035201333553357400200000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_GTP-TEID.h" int S1AP_GTP_TEID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } size = st->size; if((size == 4)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_GTP_TEID_constr_1 CC_NOTUSED = { { 0, 0 }, 4 /* (SIZE(4..4)) */}; asn_per_constraints_t asn_PER_type_S1AP_GTP_TEID_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 4, 4 } /* (SIZE(4..4)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_GTP_TEID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_GTP_TEID = { "GTP-TEID", "GTP-TEID", &asn_OP_OCTET_STRING, asn_DEF_S1AP_GTP_TEID_tags_1, sizeof(asn_DEF_S1AP_GTP_TEID_tags_1) /sizeof(asn_DEF_S1AP_GTP_TEID_tags_1[0]), /* 1 */ asn_DEF_S1AP_GTP_TEID_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_GTP_TEID_tags_1) /sizeof(asn_DEF_S1AP_GTP_TEID_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_GTP_TEID_constr_1, &asn_PER_type_S1AP_GTP_TEID_constr_1, S1AP_GTP_TEID_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_GTP-TEID.h000066400000000000000000000023701333553357400200070ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_GTP_TEID_H_ #define _S1AP_GTP_TEID_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_GTP-TEID */ typedef OCTET_STRING_t S1AP_GTP_TEID_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_GTP_TEID_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_GTP_TEID; asn_struct_free_f S1AP_GTP_TEID_free; asn_struct_print_f S1AP_GTP_TEID_print; asn_constr_check_f S1AP_GTP_TEID_constraint; ber_type_decoder_f S1AP_GTP_TEID_decode_ber; der_type_encoder_f S1AP_GTP_TEID_encode_der; xer_type_decoder_f S1AP_GTP_TEID_decode_xer; xer_type_encoder_f S1AP_GTP_TEID_encode_xer; oer_type_decoder_f S1AP_GTP_TEID_decode_oer; oer_type_encoder_f S1AP_GTP_TEID_encode_oer; per_type_decoder_f S1AP_GTP_TEID_decode_uper; per_type_encoder_f S1AP_GTP_TEID_encode_uper; per_type_decoder_f S1AP_GTP_TEID_decode_aper; per_type_encoder_f S1AP_GTP_TEID_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_GTP_TEID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_GUMMEI.c000066400000000000000000000051131333553357400176060ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_GUMMEI.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_GUMMEI_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_GUMMEI, pLMN_Identity), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_PLMNidentity, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "pLMN-Identity" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_GUMMEI, mME_Group_ID), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_MME_Group_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "mME-Group-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_GUMMEI, mME_Code), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_MME_Code, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "mME-Code" }, { ATF_POINTER, 1, offsetof(struct S1AP_GUMMEI, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P58, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_GUMMEI_oms_1[] = { 3 }; static const ber_tlv_tag_t asn_DEF_S1AP_GUMMEI_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_GUMMEI_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMN-Identity */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* mME-Group-ID */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* mME-Code */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_GUMMEI_specs_1 = { sizeof(struct S1AP_GUMMEI), offsetof(struct S1AP_GUMMEI, _asn_ctx), asn_MAP_S1AP_GUMMEI_tag2el_1, 4, /* Count of tags in the map */ asn_MAP_S1AP_GUMMEI_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_GUMMEI = { "GUMMEI", "GUMMEI", &asn_OP_SEQUENCE, asn_DEF_S1AP_GUMMEI_tags_1, sizeof(asn_DEF_S1AP_GUMMEI_tags_1) /sizeof(asn_DEF_S1AP_GUMMEI_tags_1[0]), /* 1 */ asn_DEF_S1AP_GUMMEI_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_GUMMEI_tags_1) /sizeof(asn_DEF_S1AP_GUMMEI_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_GUMMEI_1, 4, /* Elements count */ &asn_SPC_S1AP_GUMMEI_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_GUMMEI.h000066400000000000000000000023071333553357400176150ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_GUMMEI_H_ #define _S1AP_GUMMEI_H_ #include /* Including external dependencies */ #include "S1AP_PLMNidentity.h" #include "S1AP_MME-Group-ID.h" #include "S1AP_MME-Code.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_GUMMEI */ typedef struct S1AP_GUMMEI { S1AP_PLMNidentity_t pLMN_Identity; S1AP_MME_Group_ID_t mME_Group_ID; S1AP_MME_Code_t mME_Code; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_GUMMEI_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_GUMMEI; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_GUMMEI_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_GUMMEI_1[4]; #ifdef __cplusplus } #endif #endif /* _S1AP_GUMMEI_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_GUMMEIList.c000066400000000000000000000032701333553357400204440ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_GUMMEIList.h" #include "S1AP_GUMMEI.h" static asn_oer_constraints_t asn_OER_type_S1AP_GUMMEIList_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_GUMMEIList_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_GUMMEIList_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_GUMMEI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_GUMMEIList_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_S1AP_GUMMEIList_specs_1 = { sizeof(struct S1AP_GUMMEIList), offsetof(struct S1AP_GUMMEIList, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_GUMMEIList = { "GUMMEIList", "GUMMEIList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_GUMMEIList_tags_1, sizeof(asn_DEF_S1AP_GUMMEIList_tags_1) /sizeof(asn_DEF_S1AP_GUMMEIList_tags_1[0]), /* 1 */ asn_DEF_S1AP_GUMMEIList_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_GUMMEIList_tags_1) /sizeof(asn_DEF_S1AP_GUMMEIList_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_GUMMEIList_constr_1, &asn_PER_type_S1AP_GUMMEIList_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_GUMMEIList_1, 1, /* Single element */ &asn_SPC_S1AP_GUMMEIList_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_GUMMEIList.h000066400000000000000000000015321333553357400204500ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_GUMMEIList_H_ #define _S1AP_GUMMEIList_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_GUMMEI; /* S1AP_GUMMEIList */ typedef struct S1AP_GUMMEIList { A_SEQUENCE_OF(struct S1AP_GUMMEI) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_GUMMEIList_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_GUMMEIList; #ifdef __cplusplus } #endif #endif /* _S1AP_GUMMEIList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_GUMMEIType.c000066400000000000000000000037431333553357400204570ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_GUMMEIType.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_GUMMEIType_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_GUMMEIType_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_GUMMEIType_value2enum_1[] = { { 0, 6, "native" }, { 1, 6, "mapped" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_GUMMEIType_enum2value_1[] = { 1, /* mapped(1) */ 0 /* native(0) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_GUMMEIType_specs_1 = { asn_MAP_S1AP_GUMMEIType_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_GUMMEIType_enum2value_1, /* N => "tag"; sorted by N */ 2, /* Number of elements in the maps */ 3, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_GUMMEIType_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_GUMMEIType = { "GUMMEIType", "GUMMEIType", &asn_OP_NativeEnumerated, asn_DEF_S1AP_GUMMEIType_tags_1, sizeof(asn_DEF_S1AP_GUMMEIType_tags_1) /sizeof(asn_DEF_S1AP_GUMMEIType_tags_1[0]), /* 1 */ asn_DEF_S1AP_GUMMEIType_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_GUMMEIType_tags_1) /sizeof(asn_DEF_S1AP_GUMMEIType_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_GUMMEIType_constr_1, &asn_PER_type_S1AP_GUMMEIType_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_GUMMEIType_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_GUMMEIType.h000066400000000000000000000025761333553357400204670ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_GUMMEIType_H_ #define _S1AP_GUMMEIType_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_GUMMEIType { S1AP_GUMMEIType_native = 0, S1AP_GUMMEIType_mapped = 1 /* * Enumeration is extensible */ } e_S1AP_GUMMEIType; /* S1AP_GUMMEIType */ typedef long S1AP_GUMMEIType_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_GUMMEIType; asn_struct_free_f S1AP_GUMMEIType_free; asn_struct_print_f S1AP_GUMMEIType_print; asn_constr_check_f S1AP_GUMMEIType_constraint; ber_type_decoder_f S1AP_GUMMEIType_decode_ber; der_type_encoder_f S1AP_GUMMEIType_encode_der; xer_type_decoder_f S1AP_GUMMEIType_decode_xer; xer_type_encoder_f S1AP_GUMMEIType_encode_xer; oer_type_decoder_f S1AP_GUMMEIType_decode_oer; oer_type_encoder_f S1AP_GUMMEIType_encode_oer; per_type_decoder_f S1AP_GUMMEIType_decode_uper; per_type_encoder_f S1AP_GUMMEIType_encode_uper; per_type_decoder_f S1AP_GUMMEIType_decode_aper; per_type_encoder_f S1AP_GUMMEIType_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_GUMMEIType_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_GWContextReleaseIndication.c000066400000000000000000000044061333553357400240140ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_GWContextReleaseIndication.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_GWContextReleaseIndication_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_GWContextReleaseIndication_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_GWContextReleaseIndication_value2enum_1[] = { { 0, 4, "true" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_GWContextReleaseIndication_enum2value_1[] = { 0 /* true(0) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_GWContextReleaseIndication_specs_1 = { asn_MAP_S1AP_GWContextReleaseIndication_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_GWContextReleaseIndication_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_GWContextReleaseIndication_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_GWContextReleaseIndication = { "GWContextReleaseIndication", "GWContextReleaseIndication", &asn_OP_NativeEnumerated, asn_DEF_S1AP_GWContextReleaseIndication_tags_1, sizeof(asn_DEF_S1AP_GWContextReleaseIndication_tags_1) /sizeof(asn_DEF_S1AP_GWContextReleaseIndication_tags_1[0]), /* 1 */ asn_DEF_S1AP_GWContextReleaseIndication_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_GWContextReleaseIndication_tags_1) /sizeof(asn_DEF_S1AP_GWContextReleaseIndication_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_GWContextReleaseIndication_constr_1, &asn_PER_type_S1AP_GWContextReleaseIndication_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_GWContextReleaseIndication_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_GWContextReleaseIndication.h000066400000000000000000000032771333553357400240260ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_GWContextReleaseIndication_H_ #define _S1AP_GWContextReleaseIndication_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_GWContextReleaseIndication { S1AP_GWContextReleaseIndication_true = 0 /* * Enumeration is extensible */ } e_S1AP_GWContextReleaseIndication; /* S1AP_GWContextReleaseIndication */ typedef long S1AP_GWContextReleaseIndication_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_GWContextReleaseIndication; asn_struct_free_f S1AP_GWContextReleaseIndication_free; asn_struct_print_f S1AP_GWContextReleaseIndication_print; asn_constr_check_f S1AP_GWContextReleaseIndication_constraint; ber_type_decoder_f S1AP_GWContextReleaseIndication_decode_ber; der_type_encoder_f S1AP_GWContextReleaseIndication_encode_der; xer_type_decoder_f S1AP_GWContextReleaseIndication_decode_xer; xer_type_encoder_f S1AP_GWContextReleaseIndication_encode_xer; oer_type_decoder_f S1AP_GWContextReleaseIndication_decode_oer; oer_type_encoder_f S1AP_GWContextReleaseIndication_encode_oer; per_type_decoder_f S1AP_GWContextReleaseIndication_decode_uper; per_type_encoder_f S1AP_GWContextReleaseIndication_encode_uper; per_type_decoder_f S1AP_GWContextReleaseIndication_decode_aper; per_type_encoder_f S1AP_GWContextReleaseIndication_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_GWContextReleaseIndication_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Global-ENB-ID.c000066400000000000000000000046521333553357400207260ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Global-ENB-ID.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_Global_ENB_ID_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_Global_ENB_ID, pLMNidentity), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_PLMNidentity, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "pLMNidentity" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_Global_ENB_ID, eNB_ID), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_ENB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "eNB-ID" }, { ATF_POINTER, 1, offsetof(struct S1AP_Global_ENB_ID, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P47, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_Global_ENB_ID_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_Global_ENB_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_Global_ENB_ID_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMNidentity */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* eNB-ID */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_Global_ENB_ID_specs_1 = { sizeof(struct S1AP_Global_ENB_ID), offsetof(struct S1AP_Global_ENB_ID, _asn_ctx), asn_MAP_S1AP_Global_ENB_ID_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_Global_ENB_ID_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_Global_ENB_ID = { "Global-ENB-ID", "Global-ENB-ID", &asn_OP_SEQUENCE, asn_DEF_S1AP_Global_ENB_ID_tags_1, sizeof(asn_DEF_S1AP_Global_ENB_ID_tags_1) /sizeof(asn_DEF_S1AP_Global_ENB_ID_tags_1[0]), /* 1 */ asn_DEF_S1AP_Global_ENB_ID_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Global_ENB_ID_tags_1) /sizeof(asn_DEF_S1AP_Global_ENB_ID_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_Global_ENB_ID_1, 3, /* Elements count */ &asn_SPC_S1AP_Global_ENB_ID_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Global-ENB-ID.h000066400000000000000000000022741333553357400207310ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Global_ENB_ID_H_ #define _S1AP_Global_ENB_ID_H_ #include /* Including external dependencies */ #include "S1AP_PLMNidentity.h" #include "S1AP_ENB-ID.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_Global-ENB-ID */ typedef struct S1AP_Global_ENB_ID { S1AP_PLMNidentity_t pLMNidentity; S1AP_ENB_ID_t eNB_ID; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_Global_ENB_ID_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Global_ENB_ID; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_Global_ENB_ID_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_Global_ENB_ID_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_Global_ENB_ID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HFN.c000066400000000000000000000033151333553357400172400ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_HFN.h" int S1AP_HFN_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 1048575)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_HFN_constr_1 CC_NOTUSED = { { 4, 1 } /* (0..1048575) */, -1}; asn_per_constraints_t asn_PER_type_S1AP_HFN_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 20, -1, 0, 1048575 } /* (0..1048575) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_HFN_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_HFN = { "HFN", "HFN", &asn_OP_NativeInteger, asn_DEF_S1AP_HFN_tags_1, sizeof(asn_DEF_S1AP_HFN_tags_1) /sizeof(asn_DEF_S1AP_HFN_tags_1[0]), /* 1 */ asn_DEF_S1AP_HFN_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_HFN_tags_1) /sizeof(asn_DEF_S1AP_HFN_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_HFN_constr_1, &asn_PER_type_S1AP_HFN_constr_1, S1AP_HFN_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HFN.h000066400000000000000000000022131333553357400172410ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_HFN_H_ #define _S1AP_HFN_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_HFN */ typedef long S1AP_HFN_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_HFN_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_HFN; asn_struct_free_f S1AP_HFN_free; asn_struct_print_f S1AP_HFN_print; asn_constr_check_f S1AP_HFN_constraint; ber_type_decoder_f S1AP_HFN_decode_ber; der_type_encoder_f S1AP_HFN_encode_der; xer_type_decoder_f S1AP_HFN_decode_xer; xer_type_encoder_f S1AP_HFN_encode_xer; oer_type_decoder_f S1AP_HFN_decode_oer; oer_type_encoder_f S1AP_HFN_encode_oer; per_type_decoder_f S1AP_HFN_decode_uper; per_type_encoder_f S1AP_HFN_encode_uper; per_type_decoder_f S1AP_HFN_decode_aper; per_type_encoder_f S1AP_HFN_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_HFN_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HFNModified.c000066400000000000000000000035211333553357400207000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_HFNModified.h" int S1AP_HFNModified_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 131071)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_HFNModified_constr_1 CC_NOTUSED = { { 4, 1 } /* (0..131071) */, -1}; asn_per_constraints_t asn_PER_type_S1AP_HFNModified_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 17, -1, 0, 131071 } /* (0..131071) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_HFNModified_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_HFNModified = { "HFNModified", "HFNModified", &asn_OP_NativeInteger, asn_DEF_S1AP_HFNModified_tags_1, sizeof(asn_DEF_S1AP_HFNModified_tags_1) /sizeof(asn_DEF_S1AP_HFNModified_tags_1[0]), /* 1 */ asn_DEF_S1AP_HFNModified_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_HFNModified_tags_1) /sizeof(asn_DEF_S1AP_HFNModified_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_HFNModified_constr_1, &asn_PER_type_S1AP_HFNModified_constr_1, S1AP_HFNModified_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HFNModified.h000066400000000000000000000024531333553357400207100ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_HFNModified_H_ #define _S1AP_HFNModified_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_HFNModified */ typedef long S1AP_HFNModified_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_HFNModified_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_HFNModified; asn_struct_free_f S1AP_HFNModified_free; asn_struct_print_f S1AP_HFNModified_print; asn_constr_check_f S1AP_HFNModified_constraint; ber_type_decoder_f S1AP_HFNModified_decode_ber; der_type_encoder_f S1AP_HFNModified_encode_der; xer_type_decoder_f S1AP_HFNModified_decode_xer; xer_type_encoder_f S1AP_HFNModified_encode_xer; oer_type_decoder_f S1AP_HFNModified_decode_oer; oer_type_encoder_f S1AP_HFNModified_encode_oer; per_type_decoder_f S1AP_HFNModified_decode_uper; per_type_encoder_f S1AP_HFNModified_encode_uper; per_type_decoder_f S1AP_HFNModified_decode_aper; per_type_encoder_f S1AP_HFNModified_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_HFNModified_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HFNforPDCP-SNlength18.c000066400000000000000000000037701333553357400223140ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_HFNforPDCP-SNlength18.h" int S1AP_HFNforPDCP_SNlength18_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 16383)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_HFNforPDCP_SNlength18_constr_1 CC_NOTUSED = { { 2, 1 } /* (0..16383) */, -1}; asn_per_constraints_t asn_PER_type_S1AP_HFNforPDCP_SNlength18_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 14, 14, 0, 16383 } /* (0..16383) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_HFNforPDCP_SNlength18_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_HFNforPDCP_SNlength18 = { "HFNforPDCP-SNlength18", "HFNforPDCP-SNlength18", &asn_OP_NativeInteger, asn_DEF_S1AP_HFNforPDCP_SNlength18_tags_1, sizeof(asn_DEF_S1AP_HFNforPDCP_SNlength18_tags_1) /sizeof(asn_DEF_S1AP_HFNforPDCP_SNlength18_tags_1[0]), /* 1 */ asn_DEF_S1AP_HFNforPDCP_SNlength18_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_HFNforPDCP_SNlength18_tags_1) /sizeof(asn_DEF_S1AP_HFNforPDCP_SNlength18_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_HFNforPDCP_SNlength18_constr_1, &asn_PER_type_S1AP_HFNforPDCP_SNlength18_constr_1, S1AP_HFNforPDCP_SNlength18_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HFNforPDCP-SNlength18.h000066400000000000000000000027631333553357400223220ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_HFNforPDCP_SNlength18_H_ #define _S1AP_HFNforPDCP_SNlength18_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_HFNforPDCP-SNlength18 */ typedef long S1AP_HFNforPDCP_SNlength18_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_HFNforPDCP_SNlength18_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_HFNforPDCP_SNlength18; asn_struct_free_f S1AP_HFNforPDCP_SNlength18_free; asn_struct_print_f S1AP_HFNforPDCP_SNlength18_print; asn_constr_check_f S1AP_HFNforPDCP_SNlength18_constraint; ber_type_decoder_f S1AP_HFNforPDCP_SNlength18_decode_ber; der_type_encoder_f S1AP_HFNforPDCP_SNlength18_encode_der; xer_type_decoder_f S1AP_HFNforPDCP_SNlength18_decode_xer; xer_type_encoder_f S1AP_HFNforPDCP_SNlength18_encode_xer; oer_type_decoder_f S1AP_HFNforPDCP_SNlength18_decode_oer; oer_type_encoder_f S1AP_HFNforPDCP_SNlength18_encode_oer; per_type_decoder_f S1AP_HFNforPDCP_SNlength18_decode_uper; per_type_encoder_f S1AP_HFNforPDCP_SNlength18_encode_uper; per_type_decoder_f S1AP_HFNforPDCP_SNlength18_decode_aper; per_type_encoder_f S1AP_HFNforPDCP_SNlength18_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_HFNforPDCP_SNlength18_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HandoverCancel.c000066400000000000000000000032701333553357400215010ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_HandoverCancel.h" asn_TYPE_member_t asn_MBR_S1AP_HandoverCancel_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCancel, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P10, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_HandoverCancel_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_HandoverCancel_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverCancel_specs_1 = { sizeof(struct S1AP_HandoverCancel), offsetof(struct S1AP_HandoverCancel, _asn_ctx), asn_MAP_S1AP_HandoverCancel_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverCancel = { "HandoverCancel", "HandoverCancel", &asn_OP_SEQUENCE, asn_DEF_S1AP_HandoverCancel_tags_1, sizeof(asn_DEF_S1AP_HandoverCancel_tags_1) /sizeof(asn_DEF_S1AP_HandoverCancel_tags_1[0]), /* 1 */ asn_DEF_S1AP_HandoverCancel_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_HandoverCancel_tags_1) /sizeof(asn_DEF_S1AP_HandoverCancel_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_HandoverCancel_1, 1, /* Elements count */ &asn_SPC_S1AP_HandoverCancel_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HandoverCancel.h000066400000000000000000000020511333553357400215020ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_HandoverCancel_H_ #define _S1AP_HandoverCancel_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_HandoverCancel */ typedef struct S1AP_HandoverCancel { S1AP_ProtocolIE_Container_6551P10_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_HandoverCancel_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverCancel; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverCancel_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_HandoverCancel_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_HandoverCancel_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HandoverCancelAcknowledge.c000066400000000000000000000036241333553357400236500ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_HandoverCancelAcknowledge.h" asn_TYPE_member_t asn_MBR_S1AP_HandoverCancelAcknowledge_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCancelAcknowledge, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P11, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_HandoverCancelAcknowledge_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_HandoverCancelAcknowledge_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverCancelAcknowledge_specs_1 = { sizeof(struct S1AP_HandoverCancelAcknowledge), offsetof(struct S1AP_HandoverCancelAcknowledge, _asn_ctx), asn_MAP_S1AP_HandoverCancelAcknowledge_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverCancelAcknowledge = { "HandoverCancelAcknowledge", "HandoverCancelAcknowledge", &asn_OP_SEQUENCE, asn_DEF_S1AP_HandoverCancelAcknowledge_tags_1, sizeof(asn_DEF_S1AP_HandoverCancelAcknowledge_tags_1) /sizeof(asn_DEF_S1AP_HandoverCancelAcknowledge_tags_1[0]), /* 1 */ asn_DEF_S1AP_HandoverCancelAcknowledge_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_HandoverCancelAcknowledge_tags_1) /sizeof(asn_DEF_S1AP_HandoverCancelAcknowledge_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_HandoverCancelAcknowledge_1, 1, /* Elements count */ &asn_SPC_S1AP_HandoverCancelAcknowledge_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HandoverCancelAcknowledge.h000066400000000000000000000022141333553357400236470ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_HandoverCancelAcknowledge_H_ #define _S1AP_HandoverCancelAcknowledge_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_HandoverCancelAcknowledge */ typedef struct S1AP_HandoverCancelAcknowledge { S1AP_ProtocolIE_Container_6551P11_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_HandoverCancelAcknowledge_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverCancelAcknowledge; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverCancelAcknowledge_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_HandoverCancelAcknowledge_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_HandoverCancelAcknowledge_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HandoverCommand.c000066400000000000000000000033131333553357400216700ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_HandoverCommand.h" asn_TYPE_member_t asn_MBR_S1AP_HandoverCommand_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCommand, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P1, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_HandoverCommand_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_HandoverCommand_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverCommand_specs_1 = { sizeof(struct S1AP_HandoverCommand), offsetof(struct S1AP_HandoverCommand, _asn_ctx), asn_MAP_S1AP_HandoverCommand_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverCommand = { "HandoverCommand", "HandoverCommand", &asn_OP_SEQUENCE, asn_DEF_S1AP_HandoverCommand_tags_1, sizeof(asn_DEF_S1AP_HandoverCommand_tags_1) /sizeof(asn_DEF_S1AP_HandoverCommand_tags_1[0]), /* 1 */ asn_DEF_S1AP_HandoverCommand_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_HandoverCommand_tags_1) /sizeof(asn_DEF_S1AP_HandoverCommand_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_HandoverCommand_1, 1, /* Elements count */ &asn_SPC_S1AP_HandoverCommand_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HandoverCommand.h000066400000000000000000000020611333553357400216740ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_HandoverCommand_H_ #define _S1AP_HandoverCommand_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_HandoverCommand */ typedef struct S1AP_HandoverCommand { S1AP_ProtocolIE_Container_6551P1_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_HandoverCommand_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverCommand; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverCommand_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_HandoverCommand_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_HandoverCommand_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HandoverFailure.c000066400000000000000000000033131333553357400217010ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_HandoverFailure.h" asn_TYPE_member_t asn_MBR_S1AP_HandoverFailure_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverFailure, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P5, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_HandoverFailure_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_HandoverFailure_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverFailure_specs_1 = { sizeof(struct S1AP_HandoverFailure), offsetof(struct S1AP_HandoverFailure, _asn_ctx), asn_MAP_S1AP_HandoverFailure_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverFailure = { "HandoverFailure", "HandoverFailure", &asn_OP_SEQUENCE, asn_DEF_S1AP_HandoverFailure_tags_1, sizeof(asn_DEF_S1AP_HandoverFailure_tags_1) /sizeof(asn_DEF_S1AP_HandoverFailure_tags_1[0]), /* 1 */ asn_DEF_S1AP_HandoverFailure_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_HandoverFailure_tags_1) /sizeof(asn_DEF_S1AP_HandoverFailure_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_HandoverFailure_1, 1, /* Elements count */ &asn_SPC_S1AP_HandoverFailure_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HandoverFailure.h000066400000000000000000000020611333553357400217050ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_HandoverFailure_H_ #define _S1AP_HandoverFailure_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_HandoverFailure */ typedef struct S1AP_HandoverFailure { S1AP_ProtocolIE_Container_6551P5_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_HandoverFailure_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverFailure; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverFailure_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_HandoverFailure_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_HandoverFailure_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HandoverNotify.c000066400000000000000000000032671333553357400215720ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_HandoverNotify.h" asn_TYPE_member_t asn_MBR_S1AP_HandoverNotify_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverNotify, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P6, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_HandoverNotify_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_HandoverNotify_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverNotify_specs_1 = { sizeof(struct S1AP_HandoverNotify), offsetof(struct S1AP_HandoverNotify, _asn_ctx), asn_MAP_S1AP_HandoverNotify_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverNotify = { "HandoverNotify", "HandoverNotify", &asn_OP_SEQUENCE, asn_DEF_S1AP_HandoverNotify_tags_1, sizeof(asn_DEF_S1AP_HandoverNotify_tags_1) /sizeof(asn_DEF_S1AP_HandoverNotify_tags_1[0]), /* 1 */ asn_DEF_S1AP_HandoverNotify_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_HandoverNotify_tags_1) /sizeof(asn_DEF_S1AP_HandoverNotify_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_HandoverNotify_1, 1, /* Elements count */ &asn_SPC_S1AP_HandoverNotify_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HandoverNotify.h000066400000000000000000000020501333553357400215640ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_HandoverNotify_H_ #define _S1AP_HandoverNotify_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_HandoverNotify */ typedef struct S1AP_HandoverNotify { S1AP_ProtocolIE_Container_6551P6_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_HandoverNotify_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverNotify; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverNotify_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_HandoverNotify_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_HandoverNotify_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HandoverPreparationFailure.c000066400000000000000000000036471333553357400241200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_HandoverPreparationFailure.h" asn_TYPE_member_t asn_MBR_S1AP_HandoverPreparationFailure_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverPreparationFailure, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P2, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_HandoverPreparationFailure_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_HandoverPreparationFailure_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverPreparationFailure_specs_1 = { sizeof(struct S1AP_HandoverPreparationFailure), offsetof(struct S1AP_HandoverPreparationFailure, _asn_ctx), asn_MAP_S1AP_HandoverPreparationFailure_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverPreparationFailure = { "HandoverPreparationFailure", "HandoverPreparationFailure", &asn_OP_SEQUENCE, asn_DEF_S1AP_HandoverPreparationFailure_tags_1, sizeof(asn_DEF_S1AP_HandoverPreparationFailure_tags_1) /sizeof(asn_DEF_S1AP_HandoverPreparationFailure_tags_1[0]), /* 1 */ asn_DEF_S1AP_HandoverPreparationFailure_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_HandoverPreparationFailure_tags_1) /sizeof(asn_DEF_S1AP_HandoverPreparationFailure_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_HandoverPreparationFailure_1, 1, /* Elements count */ &asn_SPC_S1AP_HandoverPreparationFailure_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HandoverPreparationFailure.h000066400000000000000000000022241333553357400241130ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_HandoverPreparationFailure_H_ #define _S1AP_HandoverPreparationFailure_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_HandoverPreparationFailure */ typedef struct S1AP_HandoverPreparationFailure { S1AP_ProtocolIE_Container_6551P2_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_HandoverPreparationFailure_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverPreparationFailure; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverPreparationFailure_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_HandoverPreparationFailure_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_HandoverPreparationFailure_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HandoverRequest.c000066400000000000000000000033131333553357400217420ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_HandoverRequest.h" asn_TYPE_member_t asn_MBR_S1AP_HandoverRequest_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequest, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P3, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_HandoverRequest_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_HandoverRequest_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverRequest_specs_1 = { sizeof(struct S1AP_HandoverRequest), offsetof(struct S1AP_HandoverRequest, _asn_ctx), asn_MAP_S1AP_HandoverRequest_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverRequest = { "HandoverRequest", "HandoverRequest", &asn_OP_SEQUENCE, asn_DEF_S1AP_HandoverRequest_tags_1, sizeof(asn_DEF_S1AP_HandoverRequest_tags_1) /sizeof(asn_DEF_S1AP_HandoverRequest_tags_1[0]), /* 1 */ asn_DEF_S1AP_HandoverRequest_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_HandoverRequest_tags_1) /sizeof(asn_DEF_S1AP_HandoverRequest_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_HandoverRequest_1, 1, /* Elements count */ &asn_SPC_S1AP_HandoverRequest_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HandoverRequest.h000066400000000000000000000020611333553357400217460ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_HandoverRequest_H_ #define _S1AP_HandoverRequest_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_HandoverRequest */ typedef struct S1AP_HandoverRequest { S1AP_ProtocolIE_Container_6551P3_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_HandoverRequest_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverRequest; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverRequest_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_HandoverRequest_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_HandoverRequest_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HandoverRequestAcknowledge.c000066400000000000000000000036471333553357400241200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_HandoverRequestAcknowledge.h" asn_TYPE_member_t asn_MBR_S1AP_HandoverRequestAcknowledge_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestAcknowledge, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P4, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_HandoverRequestAcknowledge_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_HandoverRequestAcknowledge_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverRequestAcknowledge_specs_1 = { sizeof(struct S1AP_HandoverRequestAcknowledge), offsetof(struct S1AP_HandoverRequestAcknowledge, _asn_ctx), asn_MAP_S1AP_HandoverRequestAcknowledge_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverRequestAcknowledge = { "HandoverRequestAcknowledge", "HandoverRequestAcknowledge", &asn_OP_SEQUENCE, asn_DEF_S1AP_HandoverRequestAcknowledge_tags_1, sizeof(asn_DEF_S1AP_HandoverRequestAcknowledge_tags_1) /sizeof(asn_DEF_S1AP_HandoverRequestAcknowledge_tags_1[0]), /* 1 */ asn_DEF_S1AP_HandoverRequestAcknowledge_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_HandoverRequestAcknowledge_tags_1) /sizeof(asn_DEF_S1AP_HandoverRequestAcknowledge_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_HandoverRequestAcknowledge_1, 1, /* Elements count */ &asn_SPC_S1AP_HandoverRequestAcknowledge_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HandoverRequestAcknowledge.h000066400000000000000000000022241333553357400241130ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_HandoverRequestAcknowledge_H_ #define _S1AP_HandoverRequestAcknowledge_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_HandoverRequestAcknowledge */ typedef struct S1AP_HandoverRequestAcknowledge { S1AP_ProtocolIE_Container_6551P4_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_HandoverRequestAcknowledge_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverRequestAcknowledge; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverRequestAcknowledge_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_HandoverRequestAcknowledge_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_HandoverRequestAcknowledge_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HandoverRequired.c000066400000000000000000000033371333553357400221000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_HandoverRequired.h" asn_TYPE_member_t asn_MBR_S1AP_HandoverRequired_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequired, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P0, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_HandoverRequired_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_HandoverRequired_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverRequired_specs_1 = { sizeof(struct S1AP_HandoverRequired), offsetof(struct S1AP_HandoverRequired, _asn_ctx), asn_MAP_S1AP_HandoverRequired_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverRequired = { "HandoverRequired", "HandoverRequired", &asn_OP_SEQUENCE, asn_DEF_S1AP_HandoverRequired_tags_1, sizeof(asn_DEF_S1AP_HandoverRequired_tags_1) /sizeof(asn_DEF_S1AP_HandoverRequired_tags_1[0]), /* 1 */ asn_DEF_S1AP_HandoverRequired_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_HandoverRequired_tags_1) /sizeof(asn_DEF_S1AP_HandoverRequired_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_HandoverRequired_1, 1, /* Elements count */ &asn_SPC_S1AP_HandoverRequired_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HandoverRequired.h000066400000000000000000000020721333553357400221000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_HandoverRequired_H_ #define _S1AP_HandoverRequired_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_HandoverRequired */ typedef struct S1AP_HandoverRequired { S1AP_ProtocolIE_Container_6551P0_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_HandoverRequired_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverRequired; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverRequired_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_HandoverRequired_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_HandoverRequired_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HandoverRestrictionList.c000066400000000000000000000074501333553357400234610ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_HandoverRestrictionList.h" #include "S1AP_EPLMNs.h" #include "S1AP_ForbiddenTAs.h" #include "S1AP_ForbiddenLAs.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_HandoverRestrictionList_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRestrictionList, servingPLMN), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_PLMNidentity, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "servingPLMN" }, { ATF_POINTER, 5, offsetof(struct S1AP_HandoverRestrictionList, equivalentPLMNs), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_EPLMNs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "equivalentPLMNs" }, { ATF_POINTER, 4, offsetof(struct S1AP_HandoverRestrictionList, forbiddenTAs), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ForbiddenTAs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "forbiddenTAs" }, { ATF_POINTER, 3, offsetof(struct S1AP_HandoverRestrictionList, forbiddenLAs), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ForbiddenLAs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "forbiddenLAs" }, { ATF_POINTER, 2, offsetof(struct S1AP_HandoverRestrictionList, forbiddenInterRATs), (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ForbiddenInterRATs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "forbiddenInterRATs" }, { ATF_POINTER, 1, offsetof(struct S1AP_HandoverRestrictionList, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (5 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P59, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_HandoverRestrictionList_oms_1[] = { 1, 2, 3, 4, 5 }; static const ber_tlv_tag_t asn_DEF_S1AP_HandoverRestrictionList_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_HandoverRestrictionList_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* servingPLMN */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* equivalentPLMNs */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* forbiddenTAs */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* forbiddenLAs */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* forbiddenInterRATs */ { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverRestrictionList_specs_1 = { sizeof(struct S1AP_HandoverRestrictionList), offsetof(struct S1AP_HandoverRestrictionList, _asn_ctx), asn_MAP_S1AP_HandoverRestrictionList_tag2el_1, 6, /* Count of tags in the map */ asn_MAP_S1AP_HandoverRestrictionList_oms_1, /* Optional members */ 5, 0, /* Root/Additions */ 6, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverRestrictionList = { "HandoverRestrictionList", "HandoverRestrictionList", &asn_OP_SEQUENCE, asn_DEF_S1AP_HandoverRestrictionList_tags_1, sizeof(asn_DEF_S1AP_HandoverRestrictionList_tags_1) /sizeof(asn_DEF_S1AP_HandoverRestrictionList_tags_1[0]), /* 1 */ asn_DEF_S1AP_HandoverRestrictionList_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_HandoverRestrictionList_tags_1) /sizeof(asn_DEF_S1AP_HandoverRestrictionList_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_HandoverRestrictionList_1, 6, /* Elements count */ &asn_SPC_S1AP_HandoverRestrictionList_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HandoverRestrictionList.h000066400000000000000000000026431333553357400234650ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_HandoverRestrictionList_H_ #define _S1AP_HandoverRestrictionList_H_ #include /* Including external dependencies */ #include "S1AP_PLMNidentity.h" #include "S1AP_ForbiddenInterRATs.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_EPLMNs; struct S1AP_ForbiddenTAs; struct S1AP_ForbiddenLAs; struct S1AP_ProtocolExtensionContainer; /* S1AP_HandoverRestrictionList */ typedef struct S1AP_HandoverRestrictionList { S1AP_PLMNidentity_t servingPLMN; struct S1AP_EPLMNs *equivalentPLMNs; /* OPTIONAL */ struct S1AP_ForbiddenTAs *forbiddenTAs; /* OPTIONAL */ struct S1AP_ForbiddenLAs *forbiddenLAs; /* OPTIONAL */ S1AP_ForbiddenInterRATs_t *forbiddenInterRATs; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_HandoverRestrictionList_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverRestrictionList; #ifdef __cplusplus } #endif #endif /* _S1AP_HandoverRestrictionList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HandoverType.c000066400000000000000000000042601333553357400212350ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_HandoverType.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_HandoverType_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_HandoverType_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 4 } /* (0..4,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_HandoverType_value2enum_1[] = { { 0, 8, "intralte" }, { 1, 10, "ltetoutran" }, { 2, 10, "ltetogeran" }, { 3, 10, "utrantolte" }, { 4, 10, "gerantolte" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_HandoverType_enum2value_1[] = { 4, /* gerantolte(4) */ 0, /* intralte(0) */ 2, /* ltetogeran(2) */ 1, /* ltetoutran(1) */ 3 /* utrantolte(3) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_HandoverType_specs_1 = { asn_MAP_S1AP_HandoverType_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_HandoverType_enum2value_1, /* N => "tag"; sorted by N */ 5, /* Number of elements in the maps */ 6, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_HandoverType_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverType = { "HandoverType", "HandoverType", &asn_OP_NativeEnumerated, asn_DEF_S1AP_HandoverType_tags_1, sizeof(asn_DEF_S1AP_HandoverType_tags_1) /sizeof(asn_DEF_S1AP_HandoverType_tags_1[0]), /* 1 */ asn_DEF_S1AP_HandoverType_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_HandoverType_tags_1) /sizeof(asn_DEF_S1AP_HandoverType_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_HandoverType_constr_1, &asn_PER_type_S1AP_HandoverType_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_HandoverType_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_HandoverType.h000066400000000000000000000030331333553357400212370ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_HandoverType_H_ #define _S1AP_HandoverType_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_HandoverType { S1AP_HandoverType_intralte = 0, S1AP_HandoverType_ltetoutran = 1, S1AP_HandoverType_ltetogeran = 2, S1AP_HandoverType_utrantolte = 3, S1AP_HandoverType_gerantolte = 4 /* * Enumeration is extensible */ } e_S1AP_HandoverType; /* S1AP_HandoverType */ typedef long S1AP_HandoverType_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverType; asn_struct_free_f S1AP_HandoverType_free; asn_struct_print_f S1AP_HandoverType_print; asn_constr_check_f S1AP_HandoverType_constraint; ber_type_decoder_f S1AP_HandoverType_decode_ber; der_type_encoder_f S1AP_HandoverType_encode_der; xer_type_decoder_f S1AP_HandoverType_decode_xer; xer_type_encoder_f S1AP_HandoverType_encode_xer; oer_type_decoder_f S1AP_HandoverType_decode_oer; oer_type_encoder_f S1AP_HandoverType_encode_oer; per_type_decoder_f S1AP_HandoverType_decode_uper; per_type_encoder_f S1AP_HandoverType_encode_uper; per_type_decoder_f S1AP_HandoverType_decode_aper; per_type_encoder_f S1AP_HandoverType_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_HandoverType_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_IMSI.c000066400000000000000000000034321333553357400173660ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_IMSI.h" int S1AP_IMSI_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } size = st->size; if((size >= 3 && size <= 8)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_IMSI_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(3..8)) */}; asn_per_constraints_t asn_PER_type_S1AP_IMSI_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 3, 3, 3, 8 } /* (SIZE(3..8)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_IMSI_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_IMSI = { "IMSI", "IMSI", &asn_OP_OCTET_STRING, asn_DEF_S1AP_IMSI_tags_1, sizeof(asn_DEF_S1AP_IMSI_tags_1) /sizeof(asn_DEF_S1AP_IMSI_tags_1[0]), /* 1 */ asn_DEF_S1AP_IMSI_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_IMSI_tags_1) /sizeof(asn_DEF_S1AP_IMSI_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_IMSI_constr_1, &asn_PER_type_S1AP_IMSI_constr_1, S1AP_IMSI_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_IMSI.h000066400000000000000000000022501333553357400173700ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_IMSI_H_ #define _S1AP_IMSI_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_IMSI */ typedef OCTET_STRING_t S1AP_IMSI_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_IMSI_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_IMSI; asn_struct_free_f S1AP_IMSI_free; asn_struct_print_f S1AP_IMSI_print; asn_constr_check_f S1AP_IMSI_constraint; ber_type_decoder_f S1AP_IMSI_decode_ber; der_type_encoder_f S1AP_IMSI_encode_der; xer_type_decoder_f S1AP_IMSI_decode_xer; xer_type_encoder_f S1AP_IMSI_encode_xer; oer_type_decoder_f S1AP_IMSI_decode_oer; oer_type_encoder_f S1AP_IMSI_encode_oer; per_type_decoder_f S1AP_IMSI_decode_uper; per_type_encoder_f S1AP_IMSI_encode_uper; per_type_decoder_f S1AP_IMSI_decode_aper; per_type_encoder_f S1AP_IMSI_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_IMSI_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ImmediateMDT.c000066400000000000000000000063671333553357400211020ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ImmediateMDT.h" #include "S1AP_M1ThresholdEventA2.h" #include "S1AP_M1PeriodicReporting.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_ImmediateMDT_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ImmediateMDT, measurementsToActivate), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_MeasurementsToActivate, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "measurementsToActivate" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ImmediateMDT, m1reportingTrigger), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_M1ReportingTrigger, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "m1reportingTrigger" }, { ATF_POINTER, 3, offsetof(struct S1AP_ImmediateMDT, m1thresholdeventA2), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_M1ThresholdEventA2, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "m1thresholdeventA2" }, { ATF_POINTER, 2, offsetof(struct S1AP_ImmediateMDT, m1periodicReporting), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_M1PeriodicReporting, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "m1periodicReporting" }, { ATF_POINTER, 1, offsetof(struct S1AP_ImmediateMDT, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P60, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_ImmediateMDT_oms_1[] = { 2, 3, 4 }; static const ber_tlv_tag_t asn_DEF_S1AP_ImmediateMDT_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ImmediateMDT_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* measurementsToActivate */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* m1reportingTrigger */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* m1thresholdeventA2 */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* m1periodicReporting */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ImmediateMDT_specs_1 = { sizeof(struct S1AP_ImmediateMDT), offsetof(struct S1AP_ImmediateMDT, _asn_ctx), asn_MAP_S1AP_ImmediateMDT_tag2el_1, 5, /* Count of tags in the map */ asn_MAP_S1AP_ImmediateMDT_oms_1, /* Optional members */ 3, 0, /* Root/Additions */ 5, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ImmediateMDT = { "ImmediateMDT", "ImmediateMDT", &asn_OP_SEQUENCE, asn_DEF_S1AP_ImmediateMDT_tags_1, sizeof(asn_DEF_S1AP_ImmediateMDT_tags_1) /sizeof(asn_DEF_S1AP_ImmediateMDT_tags_1[0]), /* 1 */ asn_DEF_S1AP_ImmediateMDT_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ImmediateMDT_tags_1) /sizeof(asn_DEF_S1AP_ImmediateMDT_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ImmediateMDT_1, 5, /* Elements count */ &asn_SPC_S1AP_ImmediateMDT_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ImmediateMDT.h000066400000000000000000000027001333553357400210720ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ImmediateMDT_H_ #define _S1AP_ImmediateMDT_H_ #include /* Including external dependencies */ #include "S1AP_MeasurementsToActivate.h" #include "S1AP_M1ReportingTrigger.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_M1ThresholdEventA2; struct S1AP_M1PeriodicReporting; struct S1AP_ProtocolExtensionContainer; /* S1AP_ImmediateMDT */ typedef struct S1AP_ImmediateMDT { S1AP_MeasurementsToActivate_t measurementsToActivate; S1AP_M1ReportingTrigger_t m1reportingTrigger; struct S1AP_M1ThresholdEventA2 *m1thresholdeventA2; /* OPTIONAL */ struct S1AP_M1PeriodicReporting *m1periodicReporting; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ImmediateMDT_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ImmediateMDT; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ImmediateMDT_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ImmediateMDT_1[5]; #ifdef __cplusplus } #endif #endif /* _S1AP_ImmediateMDT_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_InformationOnRecommendedCellsAndENBsForPaging.c000066400000000000000000000064561333553357400274760ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_InformationOnRecommendedCellsAndENBsForPaging.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_InformationOnRecommendedCellsAndENBsForPaging_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_InformationOnRecommendedCellsAndENBsForPaging, recommendedCellsForPaging), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_RecommendedCellsForPaging, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "recommendedCellsForPaging" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InformationOnRecommendedCellsAndENBsForPaging, recommendENBsForPaging), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_RecommendedENBsForPaging, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "recommendENBsForPaging" }, { ATF_POINTER, 1, offsetof(struct S1AP_InformationOnRecommendedCellsAndENBsForPaging, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P61, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_InformationOnRecommendedCellsAndENBsForPaging_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_InformationOnRecommendedCellsAndENBsForPaging_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_InformationOnRecommendedCellsAndENBsForPaging_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* recommendedCellsForPaging */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* recommendENBsForPaging */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_InformationOnRecommendedCellsAndENBsForPaging_specs_1 = { sizeof(struct S1AP_InformationOnRecommendedCellsAndENBsForPaging), offsetof(struct S1AP_InformationOnRecommendedCellsAndENBsForPaging, _asn_ctx), asn_MAP_S1AP_InformationOnRecommendedCellsAndENBsForPaging_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_InformationOnRecommendedCellsAndENBsForPaging_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_InformationOnRecommendedCellsAndENBsForPaging = { "InformationOnRecommendedCellsAndENBsForPaging", "InformationOnRecommendedCellsAndENBsForPaging", &asn_OP_SEQUENCE, asn_DEF_S1AP_InformationOnRecommendedCellsAndENBsForPaging_tags_1, sizeof(asn_DEF_S1AP_InformationOnRecommendedCellsAndENBsForPaging_tags_1) /sizeof(asn_DEF_S1AP_InformationOnRecommendedCellsAndENBsForPaging_tags_1[0]), /* 1 */ asn_DEF_S1AP_InformationOnRecommendedCellsAndENBsForPaging_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_InformationOnRecommendedCellsAndENBsForPaging_tags_1) /sizeof(asn_DEF_S1AP_InformationOnRecommendedCellsAndENBsForPaging_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_InformationOnRecommendedCellsAndENBsForPaging_1, 3, /* Elements count */ &asn_SPC_S1AP_InformationOnRecommendedCellsAndENBsForPaging_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_InformationOnRecommendedCellsAndENBsForPaging.h000066400000000000000000000025711333553357400274750ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_InformationOnRecommendedCellsAndENBsForPaging_H_ #define _S1AP_InformationOnRecommendedCellsAndENBsForPaging_H_ #include /* Including external dependencies */ #include "S1AP_RecommendedCellsForPaging.h" #include "S1AP_RecommendedENBsForPaging.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_InformationOnRecommendedCellsAndENBsForPaging */ typedef struct S1AP_InformationOnRecommendedCellsAndENBsForPaging { S1AP_RecommendedCellsForPaging_t recommendedCellsForPaging; S1AP_RecommendedENBsForPaging_t recommendENBsForPaging; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_InformationOnRecommendedCellsAndENBsForPaging_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_InformationOnRecommendedCellsAndENBsForPaging; #ifdef __cplusplus } #endif #endif /* _S1AP_InformationOnRecommendedCellsAndENBsForPaging_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_InitialContextSetupFailure.c000066400000000000000000000036501333553357400241160ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_InitialContextSetupFailure.h" asn_TYPE_member_t asn_MBR_S1AP_InitialContextSetupFailure_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupFailure, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P21, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_InitialContextSetupFailure_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_InitialContextSetupFailure_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_InitialContextSetupFailure_specs_1 = { sizeof(struct S1AP_InitialContextSetupFailure), offsetof(struct S1AP_InitialContextSetupFailure, _asn_ctx), asn_MAP_S1AP_InitialContextSetupFailure_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_InitialContextSetupFailure = { "InitialContextSetupFailure", "InitialContextSetupFailure", &asn_OP_SEQUENCE, asn_DEF_S1AP_InitialContextSetupFailure_tags_1, sizeof(asn_DEF_S1AP_InitialContextSetupFailure_tags_1) /sizeof(asn_DEF_S1AP_InitialContextSetupFailure_tags_1[0]), /* 1 */ asn_DEF_S1AP_InitialContextSetupFailure_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_InitialContextSetupFailure_tags_1) /sizeof(asn_DEF_S1AP_InitialContextSetupFailure_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_InitialContextSetupFailure_1, 1, /* Elements count */ &asn_SPC_S1AP_InitialContextSetupFailure_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_InitialContextSetupFailure.h000066400000000000000000000022251333553357400241200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_InitialContextSetupFailure_H_ #define _S1AP_InitialContextSetupFailure_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_InitialContextSetupFailure */ typedef struct S1AP_InitialContextSetupFailure { S1AP_ProtocolIE_Container_6551P21_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_InitialContextSetupFailure_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_InitialContextSetupFailure; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_InitialContextSetupFailure_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_InitialContextSetupFailure_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_InitialContextSetupFailure_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_InitialContextSetupRequest.c000066400000000000000000000036501333553357400241570ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_InitialContextSetupRequest.h" asn_TYPE_member_t asn_MBR_S1AP_InitialContextSetupRequest_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequest, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P19, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_InitialContextSetupRequest_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_InitialContextSetupRequest_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_InitialContextSetupRequest_specs_1 = { sizeof(struct S1AP_InitialContextSetupRequest), offsetof(struct S1AP_InitialContextSetupRequest, _asn_ctx), asn_MAP_S1AP_InitialContextSetupRequest_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_InitialContextSetupRequest = { "InitialContextSetupRequest", "InitialContextSetupRequest", &asn_OP_SEQUENCE, asn_DEF_S1AP_InitialContextSetupRequest_tags_1, sizeof(asn_DEF_S1AP_InitialContextSetupRequest_tags_1) /sizeof(asn_DEF_S1AP_InitialContextSetupRequest_tags_1[0]), /* 1 */ asn_DEF_S1AP_InitialContextSetupRequest_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_InitialContextSetupRequest_tags_1) /sizeof(asn_DEF_S1AP_InitialContextSetupRequest_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_InitialContextSetupRequest_1, 1, /* Elements count */ &asn_SPC_S1AP_InitialContextSetupRequest_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_InitialContextSetupRequest.h000066400000000000000000000022251333553357400241610ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_InitialContextSetupRequest_H_ #define _S1AP_InitialContextSetupRequest_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_InitialContextSetupRequest */ typedef struct S1AP_InitialContextSetupRequest { S1AP_ProtocolIE_Container_6551P19_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_InitialContextSetupRequest_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_InitialContextSetupRequest; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_InitialContextSetupRequest_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_InitialContextSetupRequest_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_InitialContextSetupRequest_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_InitialContextSetupResponse.c000066400000000000000000000036741333553357400243330ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_InitialContextSetupResponse.h" asn_TYPE_member_t asn_MBR_S1AP_InitialContextSetupResponse_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupResponse, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P20, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_InitialContextSetupResponse_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_InitialContextSetupResponse_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_InitialContextSetupResponse_specs_1 = { sizeof(struct S1AP_InitialContextSetupResponse), offsetof(struct S1AP_InitialContextSetupResponse, _asn_ctx), asn_MAP_S1AP_InitialContextSetupResponse_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_InitialContextSetupResponse = { "InitialContextSetupResponse", "InitialContextSetupResponse", &asn_OP_SEQUENCE, asn_DEF_S1AP_InitialContextSetupResponse_tags_1, sizeof(asn_DEF_S1AP_InitialContextSetupResponse_tags_1) /sizeof(asn_DEF_S1AP_InitialContextSetupResponse_tags_1[0]), /* 1 */ asn_DEF_S1AP_InitialContextSetupResponse_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_InitialContextSetupResponse_tags_1) /sizeof(asn_DEF_S1AP_InitialContextSetupResponse_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_InitialContextSetupResponse_1, 1, /* Elements count */ &asn_SPC_S1AP_InitialContextSetupResponse_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_InitialContextSetupResponse.h000066400000000000000000000022361333553357400243310ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_InitialContextSetupResponse_H_ #define _S1AP_InitialContextSetupResponse_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_InitialContextSetupResponse */ typedef struct S1AP_InitialContextSetupResponse { S1AP_ProtocolIE_Container_6551P20_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_InitialContextSetupResponse_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_InitialContextSetupResponse; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_InitialContextSetupResponse_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_InitialContextSetupResponse_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_InitialContextSetupResponse_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_InitialUEMessage.c000066400000000000000000000033401333553357400217530ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_InitialUEMessage.h" asn_TYPE_member_t asn_MBR_S1AP_InitialUEMessage_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialUEMessage, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P32, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_InitialUEMessage_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_InitialUEMessage_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_InitialUEMessage_specs_1 = { sizeof(struct S1AP_InitialUEMessage), offsetof(struct S1AP_InitialUEMessage, _asn_ctx), asn_MAP_S1AP_InitialUEMessage_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_InitialUEMessage = { "InitialUEMessage", "InitialUEMessage", &asn_OP_SEQUENCE, asn_DEF_S1AP_InitialUEMessage_tags_1, sizeof(asn_DEF_S1AP_InitialUEMessage_tags_1) /sizeof(asn_DEF_S1AP_InitialUEMessage_tags_1[0]), /* 1 */ asn_DEF_S1AP_InitialUEMessage_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_InitialUEMessage_tags_1) /sizeof(asn_DEF_S1AP_InitialUEMessage_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_InitialUEMessage_1, 1, /* Elements count */ &asn_SPC_S1AP_InitialUEMessage_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_InitialUEMessage.h000066400000000000000000000020731333553357400217620ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_InitialUEMessage_H_ #define _S1AP_InitialUEMessage_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_InitialUEMessage */ typedef struct S1AP_InitialUEMessage { S1AP_ProtocolIE_Container_6551P32_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_InitialUEMessage_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_InitialUEMessage; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_InitialUEMessage_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_InitialUEMessage_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_InitialUEMessage_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_InitiatingMessage.c000066400000000000000000001636251333553357400222440ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Descriptions" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_InitiatingMessage.h" static const long asn_VAL_1_S1AP_id_HandoverPreparation = 0; static const long asn_VAL_1_S1AP_reject = 0; static const long asn_VAL_2_S1AP_id_HandoverResourceAllocation = 1; static const long asn_VAL_2_S1AP_reject = 0; static const long asn_VAL_3_S1AP_id_PathSwitchRequest = 3; static const long asn_VAL_3_S1AP_reject = 0; static const long asn_VAL_4_S1AP_id_E_RABSetup = 5; static const long asn_VAL_4_S1AP_reject = 0; static const long asn_VAL_5_S1AP_id_E_RABModify = 6; static const long asn_VAL_5_S1AP_reject = 0; static const long asn_VAL_6_S1AP_id_E_RABRelease = 7; static const long asn_VAL_6_S1AP_reject = 0; static const long asn_VAL_7_S1AP_id_InitialContextSetup = 9; static const long asn_VAL_7_S1AP_reject = 0; static const long asn_VAL_8_S1AP_id_HandoverCancel = 4; static const long asn_VAL_8_S1AP_reject = 0; static const long asn_VAL_9_S1AP_id_Kill = 43; static const long asn_VAL_9_S1AP_reject = 0; static const long asn_VAL_10_S1AP_id_Reset = 14; static const long asn_VAL_10_S1AP_reject = 0; static const long asn_VAL_11_S1AP_id_S1Setup = 17; static const long asn_VAL_11_S1AP_reject = 0; static const long asn_VAL_12_S1AP_id_UEContextModification = 21; static const long asn_VAL_12_S1AP_reject = 0; static const long asn_VAL_13_S1AP_id_UEContextRelease = 23; static const long asn_VAL_13_S1AP_reject = 0; static const long asn_VAL_14_S1AP_id_ENBConfigurationUpdate = 29; static const long asn_VAL_14_S1AP_reject = 0; static const long asn_VAL_15_S1AP_id_MMEConfigurationUpdate = 30; static const long asn_VAL_15_S1AP_reject = 0; static const long asn_VAL_16_S1AP_id_WriteReplaceWarning = 36; static const long asn_VAL_16_S1AP_reject = 0; static const long asn_VAL_17_S1AP_id_UERadioCapabilityMatch = 48; static const long asn_VAL_17_S1AP_reject = 0; static const long asn_VAL_18_S1AP_id_E_RABModificationIndication = 50; static const long asn_VAL_18_S1AP_reject = 0; static const long asn_VAL_19_S1AP_id_UEContextModificationIndication = 53; static const long asn_VAL_19_S1AP_reject = 0; static const long asn_VAL_20_S1AP_id_UEContextSuspend = 55; static const long asn_VAL_20_S1AP_reject = 0; static const long asn_VAL_21_S1AP_id_UEContextResume = 56; static const long asn_VAL_21_S1AP_reject = 0; static const long asn_VAL_22_S1AP_id_HandoverNotification = 2; static const long asn_VAL_22_S1AP_ignore = 1; static const long asn_VAL_23_S1AP_id_E_RABReleaseIndication = 8; static const long asn_VAL_23_S1AP_ignore = 1; static const long asn_VAL_24_S1AP_id_Paging = 10; static const long asn_VAL_24_S1AP_ignore = 1; static const long asn_VAL_25_S1AP_id_downlinkNASTransport = 11; static const long asn_VAL_25_S1AP_ignore = 1; static const long asn_VAL_26_S1AP_id_initialUEMessage = 12; static const long asn_VAL_26_S1AP_ignore = 1; static const long asn_VAL_27_S1AP_id_uplinkNASTransport = 13; static const long asn_VAL_27_S1AP_ignore = 1; static const long asn_VAL_28_S1AP_id_ErrorIndication = 15; static const long asn_VAL_28_S1AP_ignore = 1; static const long asn_VAL_29_S1AP_id_NASNonDeliveryIndication = 16; static const long asn_VAL_29_S1AP_ignore = 1; static const long asn_VAL_30_S1AP_id_UEContextReleaseRequest = 18; static const long asn_VAL_30_S1AP_ignore = 1; static const long asn_VAL_31_S1AP_id_DownlinkS1cdma2000tunnelling = 19; static const long asn_VAL_31_S1AP_ignore = 1; static const long asn_VAL_32_S1AP_id_UplinkS1cdma2000tunnelling = 20; static const long asn_VAL_32_S1AP_ignore = 1; static const long asn_VAL_33_S1AP_id_UECapabilityInfoIndication = 22; static const long asn_VAL_33_S1AP_ignore = 1; static const long asn_VAL_34_S1AP_id_eNBStatusTransfer = 24; static const long asn_VAL_34_S1AP_ignore = 1; static const long asn_VAL_35_S1AP_id_MMEStatusTransfer = 25; static const long asn_VAL_35_S1AP_ignore = 1; static const long asn_VAL_36_S1AP_id_DeactivateTrace = 26; static const long asn_VAL_36_S1AP_ignore = 1; static const long asn_VAL_37_S1AP_id_TraceStart = 27; static const long asn_VAL_37_S1AP_ignore = 1; static const long asn_VAL_38_S1AP_id_TraceFailureIndication = 28; static const long asn_VAL_38_S1AP_ignore = 1; static const long asn_VAL_39_S1AP_id_CellTrafficTrace = 42; static const long asn_VAL_39_S1AP_ignore = 1; static const long asn_VAL_40_S1AP_id_LocationReportingControl = 31; static const long asn_VAL_40_S1AP_ignore = 1; static const long asn_VAL_41_S1AP_id_LocationReportingFailureIndication = 32; static const long asn_VAL_41_S1AP_ignore = 1; static const long asn_VAL_42_S1AP_id_LocationReport = 33; static const long asn_VAL_42_S1AP_ignore = 1; static const long asn_VAL_43_S1AP_id_OverloadStart = 34; static const long asn_VAL_43_S1AP_ignore = 1; static const long asn_VAL_44_S1AP_id_OverloadStop = 35; static const long asn_VAL_44_S1AP_reject = 0; static const long asn_VAL_45_S1AP_id_eNBDirectInformationTransfer = 37; static const long asn_VAL_45_S1AP_ignore = 1; static const long asn_VAL_46_S1AP_id_MMEDirectInformationTransfer = 38; static const long asn_VAL_46_S1AP_ignore = 1; static const long asn_VAL_47_S1AP_id_eNBConfigurationTransfer = 40; static const long asn_VAL_47_S1AP_ignore = 1; static const long asn_VAL_48_S1AP_id_MMEConfigurationTransfer = 41; static const long asn_VAL_48_S1AP_ignore = 1; static const long asn_VAL_49_S1AP_id_PrivateMessage = 39; static const long asn_VAL_49_S1AP_ignore = 1; static const long asn_VAL_50_S1AP_id_downlinkUEAssociatedLPPaTransport = 44; static const long asn_VAL_50_S1AP_ignore = 1; static const long asn_VAL_51_S1AP_id_uplinkUEAssociatedLPPaTransport = 45; static const long asn_VAL_51_S1AP_ignore = 1; static const long asn_VAL_52_S1AP_id_downlinkNonUEAssociatedLPPaTransport = 46; static const long asn_VAL_52_S1AP_ignore = 1; static const long asn_VAL_53_S1AP_id_uplinkNonUEAssociatedLPPaTransport = 47; static const long asn_VAL_53_S1AP_ignore = 1; static const long asn_VAL_54_S1AP_id_PWSRestartIndication = 49; static const long asn_VAL_54_S1AP_ignore = 1; static const long asn_VAL_55_S1AP_id_RerouteNASRequest = 52; static const long asn_VAL_55_S1AP_reject = 0; static const long asn_VAL_56_S1AP_id_PWSFailureIndication = 51; static const long asn_VAL_56_S1AP_ignore = 1; static const long asn_VAL_57_S1AP_id_ConnectionEstablishmentIndication = 54; static const long asn_VAL_57_S1AP_reject = 0; static const long asn_VAL_58_S1AP_id_NASDeliveryIndication = 57; static const long asn_VAL_58_S1AP_ignore = 1; static const long asn_VAL_59_S1AP_id_RetrieveUEInformation = 58; static const long asn_VAL_59_S1AP_reject = 0; static const long asn_VAL_60_S1AP_id_UEInformationTransfer = 59; static const long asn_VAL_60_S1AP_reject = 0; static const long asn_VAL_61_S1AP_id_eNBCPRelocationIndication = 60; static const long asn_VAL_61_S1AP_reject = 0; static const long asn_VAL_62_S1AP_id_MMECPRelocationIndication = 61; static const long asn_VAL_62_S1AP_reject = 0; static const asn_ioc_cell_t asn_IOS_S1AP_S1AP_ELEMENTARY_PROCEDURES_1_rows[] = { { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_HandoverRequired }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_HandoverCommand }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_HandoverPreparationFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_1_S1AP_id_HandoverPreparation }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_1_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_HandoverRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_HandoverRequestAcknowledge }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_HandoverFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_2_S1AP_id_HandoverResourceAllocation }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_2_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_PathSwitchRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_PathSwitchRequestAcknowledge }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_PathSwitchRequestFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_3_S1AP_id_PathSwitchRequest }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_3_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_E_RABSetupRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_E_RABSetupResponse }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_4_S1AP_id_E_RABSetup }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_4_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_E_RABModifyRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_E_RABModifyResponse }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_5_S1AP_id_E_RABModify }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_5_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_E_RABReleaseCommand }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_E_RABReleaseResponse }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_6_S1AP_id_E_RABRelease }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_6_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_InitialContextSetupRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_InitialContextSetupResponse }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_InitialContextSetupFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_7_S1AP_id_InitialContextSetup }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_7_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_HandoverCancel }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_HandoverCancelAcknowledge }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_8_S1AP_id_HandoverCancel }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_8_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_KillRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_KillResponse }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_9_S1AP_id_Kill }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_9_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_Reset }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_ResetAcknowledge }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_10_S1AP_id_Reset }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_10_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_S1SetupRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_S1SetupResponse }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_S1SetupFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_11_S1AP_id_S1Setup }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_11_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UEContextModificationRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UEContextModificationResponse }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UEContextModificationFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_12_S1AP_id_UEContextModification }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_12_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UEContextReleaseCommand }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UEContextReleaseComplete }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_13_S1AP_id_UEContextRelease }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_13_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_ENBConfigurationUpdate }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_ENBConfigurationUpdateAcknowledge }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_ENBConfigurationUpdateFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_14_S1AP_id_ENBConfigurationUpdate }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_14_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_MMEConfigurationUpdate }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_MMEConfigurationUpdateAcknowledge }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_MMEConfigurationUpdateFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_15_S1AP_id_MMEConfigurationUpdate }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_15_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_WriteReplaceWarningRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_WriteReplaceWarningResponse }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_16_S1AP_id_WriteReplaceWarning }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_16_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UERadioCapabilityMatchRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UERadioCapabilityMatchResponse }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_17_S1AP_id_UERadioCapabilityMatch }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_17_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_E_RABModificationIndication }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_E_RABModificationConfirm }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_18_S1AP_id_E_RABModificationIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_18_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UEContextModificationIndication }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UEContextModificationConfirm }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_19_S1AP_id_UEContextModificationIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_19_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UEContextSuspendRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UEContextSuspendResponse }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_20_S1AP_id_UEContextSuspend }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_20_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UEContextResumeRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UEContextResumeResponse }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UEContextResumeFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_21_S1AP_id_UEContextResume }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_21_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_HandoverNotify }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_22_S1AP_id_HandoverNotification }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_22_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_E_RABReleaseIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_23_S1AP_id_E_RABReleaseIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_23_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_Paging }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_24_S1AP_id_Paging }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_24_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_DownlinkNASTransport }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_25_S1AP_id_downlinkNASTransport }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_25_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_InitialUEMessage }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_26_S1AP_id_initialUEMessage }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_26_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UplinkNASTransport }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_27_S1AP_id_uplinkNASTransport }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_27_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_ErrorIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_28_S1AP_id_ErrorIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_28_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_NASNonDeliveryIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_29_S1AP_id_NASNonDeliveryIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_29_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UEContextReleaseRequest }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_30_S1AP_id_UEContextReleaseRequest }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_30_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_DownlinkS1cdma2000tunnelling }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_31_S1AP_id_DownlinkS1cdma2000tunnelling }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_31_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UplinkS1cdma2000tunnelling }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_32_S1AP_id_UplinkS1cdma2000tunnelling }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_32_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UECapabilityInfoIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_33_S1AP_id_UECapabilityInfoIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_33_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_ENBStatusTransfer }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_34_S1AP_id_eNBStatusTransfer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_34_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_MMEStatusTransfer }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_35_S1AP_id_MMEStatusTransfer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_35_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_DeactivateTrace }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_36_S1AP_id_DeactivateTrace }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_36_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_TraceStart }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_37_S1AP_id_TraceStart }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_37_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_TraceFailureIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_38_S1AP_id_TraceFailureIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_38_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_CellTrafficTrace }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_39_S1AP_id_CellTrafficTrace }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_39_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_LocationReportingControl }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_40_S1AP_id_LocationReportingControl }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_40_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_LocationReportingFailureIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_41_S1AP_id_LocationReportingFailureIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_41_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_LocationReport }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_42_S1AP_id_LocationReport }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_42_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_OverloadStart }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_43_S1AP_id_OverloadStart }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_43_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_OverloadStop }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_44_S1AP_id_OverloadStop }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_44_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_ENBDirectInformationTransfer }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_45_S1AP_id_eNBDirectInformationTransfer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_45_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_MMEDirectInformationTransfer }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_46_S1AP_id_MMEDirectInformationTransfer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_46_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_ENBConfigurationTransfer }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_47_S1AP_id_eNBConfigurationTransfer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_47_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_MMEConfigurationTransfer }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_48_S1AP_id_MMEConfigurationTransfer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_48_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_PrivateMessage }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_49_S1AP_id_PrivateMessage }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_49_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_DownlinkUEAssociatedLPPaTransport }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_50_S1AP_id_downlinkUEAssociatedLPPaTransport }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_50_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UplinkUEAssociatedLPPaTransport }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_51_S1AP_id_uplinkUEAssociatedLPPaTransport }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_51_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_DownlinkNonUEAssociatedLPPaTransport }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_52_S1AP_id_downlinkNonUEAssociatedLPPaTransport }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_52_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UplinkNonUEAssociatedLPPaTransport }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_53_S1AP_id_uplinkNonUEAssociatedLPPaTransport }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_53_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_PWSRestartIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_54_S1AP_id_PWSRestartIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_54_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_RerouteNASRequest }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_55_S1AP_id_RerouteNASRequest }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_55_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_PWSFailureIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_56_S1AP_id_PWSFailureIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_56_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_ConnectionEstablishmentIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_57_S1AP_id_ConnectionEstablishmentIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_57_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_NASDeliveryIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_58_S1AP_id_NASDeliveryIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_58_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_RetrieveUEInformation }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_59_S1AP_id_RetrieveUEInformation }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_59_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UEInformationTransfer }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_60_S1AP_id_UEInformationTransfer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_60_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_ENBCPRelocationIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_61_S1AP_id_eNBCPRelocationIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_61_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_MMECPRelocationIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_62_S1AP_id_MMECPRelocationIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_62_S1AP_reject } }; static const asn_ioc_set_t asn_IOS_S1AP_S1AP_ELEMENTARY_PROCEDURES_1[] = { { 62, 5, asn_IOS_S1AP_S1AP_ELEMENTARY_PROCEDURES_1_rows } }; static int memb_S1AP_procedureCode_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 255)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_InitiatingMessage_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_S1AP_ELEMENTARY_PROCEDURES_1; size_t constraining_column = 3; /* &procedureCode */ size_t for_column = 4; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_InitiatingMessage, procedureCode)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_InitiatingMessage_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_S1AP_ELEMENTARY_PROCEDURES_1; size_t constraining_column = 3; /* &procedureCode */ size_t for_column = 0; /* &InitiatingMessage */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_InitiatingMessage, procedureCode)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_oer_constraints_t asn_OER_memb_S1AP_procedureCode_constr_2 CC_NOTUSED = { { 1, 1 } /* (0..255) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_procedureCode_constr_2 CC_NOTUSED = { { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_3 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_3 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_4 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_4 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_4[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.HandoverRequired), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_HandoverRequired, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "HandoverRequired" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.HandoverRequest), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_HandoverRequest, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "HandoverRequest" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.PathSwitchRequest), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_PathSwitchRequest, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "PathSwitchRequest" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.E_RABSetupRequest), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABSetupRequest, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABSetupRequest" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.E_RABModifyRequest), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABModifyRequest, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABModifyRequest" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.E_RABReleaseCommand), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABReleaseCommand, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABReleaseCommand" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.InitialContextSetupRequest), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_InitialContextSetupRequest, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "InitialContextSetupRequest" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.HandoverCancel), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_HandoverCancel, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "HandoverCancel" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.KillRequest), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_KillRequest, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "KillRequest" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.Reset), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_Reset, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Reset" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.S1SetupRequest), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_S1SetupRequest, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "S1SetupRequest" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.UEContextModificationRequest), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextModificationRequest, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEContextModificationRequest" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.UEContextReleaseCommand), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextReleaseCommand, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEContextReleaseCommand" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.ENBConfigurationUpdate), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ENBConfigurationUpdate, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENBConfigurationUpdate" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.MMEConfigurationUpdate), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_MMEConfigurationUpdate, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MMEConfigurationUpdate" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.WriteReplaceWarningRequest), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_WriteReplaceWarningRequest, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "WriteReplaceWarningRequest" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.UERadioCapabilityMatchRequest), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UERadioCapabilityMatchRequest, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UERadioCapabilityMatchRequest" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.E_RABModificationIndication), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABModificationIndication, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABModificationIndication" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.UEContextModificationIndication), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextModificationIndication, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEContextModificationIndication" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.UEContextSuspendRequest), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextSuspendRequest, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEContextSuspendRequest" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.UEContextResumeRequest), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextResumeRequest, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEContextResumeRequest" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.HandoverNotify), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_HandoverNotify, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "HandoverNotify" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.E_RABReleaseIndication), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABReleaseIndication, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABReleaseIndication" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.Paging), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_Paging, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Paging" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.DownlinkNASTransport), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_DownlinkNASTransport, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "DownlinkNASTransport" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.InitialUEMessage), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_InitialUEMessage, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "InitialUEMessage" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.UplinkNASTransport), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UplinkNASTransport, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UplinkNASTransport" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.ErrorIndication), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ErrorIndication, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ErrorIndication" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.NASNonDeliveryIndication), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_NASNonDeliveryIndication, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "NASNonDeliveryIndication" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.UEContextReleaseRequest), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextReleaseRequest, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEContextReleaseRequest" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.DownlinkS1cdma2000tunnelling), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_DownlinkS1cdma2000tunnelling, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "DownlinkS1cdma2000tunnelling" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.UplinkS1cdma2000tunnelling), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UplinkS1cdma2000tunnelling, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UplinkS1cdma2000tunnelling" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.UECapabilityInfoIndication), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UECapabilityInfoIndication, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UECapabilityInfoIndication" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.ENBStatusTransfer), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ENBStatusTransfer, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENBStatusTransfer" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.MMEStatusTransfer), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_MMEStatusTransfer, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MMEStatusTransfer" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.DeactivateTrace), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_DeactivateTrace, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "DeactivateTrace" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.TraceStart), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TraceStart, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TraceStart" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.TraceFailureIndication), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TraceFailureIndication, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TraceFailureIndication" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.CellTrafficTrace), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CellTrafficTrace, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CellTrafficTrace" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.LocationReportingControl), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_LocationReportingControl, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "LocationReportingControl" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.LocationReportingFailureIndication), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_LocationReportingFailureIndication, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "LocationReportingFailureIndication" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.LocationReport), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_LocationReport, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "LocationReport" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.OverloadStart), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_OverloadStart, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "OverloadStart" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.OverloadStop), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_OverloadStop, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "OverloadStop" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.ENBDirectInformationTransfer), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ENBDirectInformationTransfer, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENBDirectInformationTransfer" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.MMEDirectInformationTransfer), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_MMEDirectInformationTransfer, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MMEDirectInformationTransfer" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.ENBConfigurationTransfer), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ENBConfigurationTransfer, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENBConfigurationTransfer" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.MMEConfigurationTransfer), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_MMEConfigurationTransfer, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MMEConfigurationTransfer" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.PrivateMessage), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_PrivateMessage, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "PrivateMessage" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.DownlinkUEAssociatedLPPaTransport), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_DownlinkUEAssociatedLPPaTransport, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "DownlinkUEAssociatedLPPaTransport" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.UplinkUEAssociatedLPPaTransport), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UplinkUEAssociatedLPPaTransport, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UplinkUEAssociatedLPPaTransport" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.DownlinkNonUEAssociatedLPPaTransport), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_DownlinkNonUEAssociatedLPPaTransport, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "DownlinkNonUEAssociatedLPPaTransport" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.UplinkNonUEAssociatedLPPaTransport), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UplinkNonUEAssociatedLPPaTransport, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UplinkNonUEAssociatedLPPaTransport" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.PWSRestartIndication), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_PWSRestartIndication, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "PWSRestartIndication" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.RerouteNASRequest), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_RerouteNASRequest, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "RerouteNASRequest" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.PWSFailureIndication), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_PWSFailureIndication, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "PWSFailureIndication" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.ConnectionEstablishmentIndication), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ConnectionEstablishmentIndication, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ConnectionEstablishmentIndication" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.NASDeliveryIndication), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_NASDeliveryIndication, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "NASDeliveryIndication" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.RetrieveUEInformation), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_RetrieveUEInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "RetrieveUEInformation" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.UEInformationTransfer), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEInformationTransfer, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEInformationTransfer" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.ENBCPRelocationIndication), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ENBCPRelocationIndication, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENBCPRelocationIndication" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage__value, choice.MMECPRelocationIndication), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_MMECPRelocationIndication, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MMECPRelocationIndication" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_4[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 61 }, /* HandoverRequired */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 60 }, /* HandoverRequest */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 59 }, /* PathSwitchRequest */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -3, 58 }, /* E-RABSetupRequest */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -4, 57 }, /* E-RABModifyRequest */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -5, 56 }, /* E-RABReleaseCommand */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 6, -6, 55 }, /* InitialContextSetupRequest */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 7, -7, 54 }, /* HandoverCancel */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 8, -8, 53 }, /* KillRequest */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 9, -9, 52 }, /* Reset */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 10, -10, 51 }, /* S1SetupRequest */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 11, -11, 50 }, /* UEContextModificationRequest */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 12, -12, 49 }, /* UEContextReleaseCommand */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 13, -13, 48 }, /* ENBConfigurationUpdate */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 14, -14, 47 }, /* MMEConfigurationUpdate */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 15, -15, 46 }, /* WriteReplaceWarningRequest */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 16, -16, 45 }, /* UERadioCapabilityMatchRequest */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 17, -17, 44 }, /* E-RABModificationIndication */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 18, -18, 43 }, /* UEContextModificationIndication */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 19, -19, 42 }, /* UEContextSuspendRequest */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 20, -20, 41 }, /* UEContextResumeRequest */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 21, -21, 40 }, /* HandoverNotify */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 22, -22, 39 }, /* E-RABReleaseIndication */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 23, -23, 38 }, /* Paging */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 24, -24, 37 }, /* DownlinkNASTransport */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 25, -25, 36 }, /* InitialUEMessage */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 26, -26, 35 }, /* UplinkNASTransport */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 27, -27, 34 }, /* ErrorIndication */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 28, -28, 33 }, /* NASNonDeliveryIndication */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 29, -29, 32 }, /* UEContextReleaseRequest */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 30, -30, 31 }, /* DownlinkS1cdma2000tunnelling */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 31, -31, 30 }, /* UplinkS1cdma2000tunnelling */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 32, -32, 29 }, /* UECapabilityInfoIndication */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 33, -33, 28 }, /* ENBStatusTransfer */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 34, -34, 27 }, /* MMEStatusTransfer */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 35, -35, 26 }, /* DeactivateTrace */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 36, -36, 25 }, /* TraceStart */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 37, -37, 24 }, /* TraceFailureIndication */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 38, -38, 23 }, /* CellTrafficTrace */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 39, -39, 22 }, /* LocationReportingControl */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 40, -40, 21 }, /* LocationReportingFailureIndication */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 41, -41, 20 }, /* LocationReport */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 42, -42, 19 }, /* OverloadStart */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 43, -43, 18 }, /* OverloadStop */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 44, -44, 17 }, /* ENBDirectInformationTransfer */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 45, -45, 16 }, /* MMEDirectInformationTransfer */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 46, -46, 15 }, /* ENBConfigurationTransfer */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 47, -47, 14 }, /* MMEConfigurationTransfer */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 48, -48, 13 }, /* PrivateMessage */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 49, -49, 12 }, /* DownlinkUEAssociatedLPPaTransport */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 50, -50, 11 }, /* UplinkUEAssociatedLPPaTransport */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 51, -51, 10 }, /* DownlinkNonUEAssociatedLPPaTransport */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 52, -52, 9 }, /* UplinkNonUEAssociatedLPPaTransport */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 53, -53, 8 }, /* PWSRestartIndication */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 54, -54, 7 }, /* RerouteNASRequest */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 55, -55, 6 }, /* PWSFailureIndication */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 56, -56, 5 }, /* ConnectionEstablishmentIndication */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 57, -57, 4 }, /* NASDeliveryIndication */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 58, -58, 3 }, /* RetrieveUEInformation */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 59, -59, 2 }, /* UEInformationTransfer */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 60, -60, 1 }, /* ENBCPRelocationIndication */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 61, -61, 0 } /* MMECPRelocationIndication */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_4 = { sizeof(struct S1AP_InitiatingMessage__value), offsetof(struct S1AP_InitiatingMessage__value, _asn_ctx), offsetof(struct S1AP_InitiatingMessage__value, present), sizeof(((struct S1AP_InitiatingMessage__value *)0)->present), asn_MAP_S1AP_value_tag2el_4, 62, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_4 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_4, 62, /* Elements count */ &asn_SPC_S1AP_value_specs_4 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_InitiatingMessage_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage, procedureCode), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProcedureCode, 0, { &asn_OER_memb_S1AP_procedureCode_constr_2, &asn_PER_memb_S1AP_procedureCode_constr_2, memb_S1AP_procedureCode_constraint_1 }, 0, 0, /* No default value */ "procedureCode" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_InitiatingMessage_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_3, &asn_PER_memb_S1AP_criticality_constr_3, memb_S1AP_criticality_constraint_1 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_InitiatingMessage, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_4, select_InitiatingMessage_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_4, &asn_PER_memb_S1AP_value_constr_4, memb_S1AP_value_constraint_1 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_InitiatingMessage_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_InitiatingMessage_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* procedureCode */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_InitiatingMessage_specs_1 = { sizeof(struct S1AP_InitiatingMessage), offsetof(struct S1AP_InitiatingMessage, _asn_ctx), asn_MAP_S1AP_InitiatingMessage_tag2el_1, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_InitiatingMessage = { "InitiatingMessage", "InitiatingMessage", &asn_OP_SEQUENCE, asn_DEF_S1AP_InitiatingMessage_tags_1, sizeof(asn_DEF_S1AP_InitiatingMessage_tags_1) /sizeof(asn_DEF_S1AP_InitiatingMessage_tags_1[0]), /* 1 */ asn_DEF_S1AP_InitiatingMessage_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_InitiatingMessage_tags_1) /sizeof(asn_DEF_S1AP_InitiatingMessage_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_InitiatingMessage_1, 3, /* Elements count */ &asn_SPC_S1AP_InitiatingMessage_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_InitiatingMessage.h000066400000000000000000000301241333553357400222340ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Descriptions" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_InitiatingMessage_H_ #define _S1AP_InitiatingMessage_H_ #include /* Including external dependencies */ #include "S1AP_ProcedureCode.h" #include "S1AP_Criticality.h" #include #include #include "S1AP_HandoverRequired.h" #include "S1AP_HandoverCommand.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-RABReleaseCommand.h" #include "S1AP_E-RABReleaseResponse.h" #include "S1AP_InitialContextSetupRequest.h" #include "S1AP_InitialContextSetupResponse.h" #include "S1AP_InitialContextSetupFailure.h" #include "S1AP_HandoverCancel.h" #include "S1AP_HandoverCancelAcknowledge.h" #include "S1AP_KillRequest.h" #include "S1AP_KillResponse.h" #include "S1AP_Reset.h" #include "S1AP_ResetAcknowledge.h" #include "S1AP_S1SetupRequest.h" #include "S1AP_S1SetupResponse.h" #include "S1AP_S1SetupFailure.h" #include "S1AP_UEContextModificationRequest.h" #include "S1AP_UEContextModificationResponse.h" #include "S1AP_UEContextModificationFailure.h" #include "S1AP_UEContextReleaseCommand.h" #include "S1AP_UEContextReleaseComplete.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_WriteReplaceWarningRequest.h" #include "S1AP_WriteReplaceWarningResponse.h" #include "S1AP_UERadioCapabilityMatchRequest.h" #include "S1AP_UERadioCapabilityMatchResponse.h" #include "S1AP_E-RABModificationIndication.h" #include "S1AP_E-RABModificationConfirm.h" #include "S1AP_UEContextModificationIndication.h" #include "S1AP_UEContextModificationConfirm.h" #include "S1AP_UEContextSuspendRequest.h" #include "S1AP_UEContextSuspendResponse.h" #include "S1AP_UEContextResumeRequest.h" #include "S1AP_UEContextResumeResponse.h" #include "S1AP_UEContextResumeFailure.h" #include "S1AP_HandoverNotify.h" #include "S1AP_E-RABReleaseIndication.h" #include "S1AP_Paging.h" #include "S1AP_DownlinkNASTransport.h" #include "S1AP_InitialUEMessage.h" #include "S1AP_UplinkNASTransport.h" #include "S1AP_ErrorIndication.h" #include "S1AP_NASNonDeliveryIndication.h" #include "S1AP_UEContextReleaseRequest.h" #include "S1AP_DownlinkS1cdma2000tunnelling.h" #include "S1AP_UplinkS1cdma2000tunnelling.h" #include "S1AP_UECapabilityInfoIndication.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_ENBDirectInformationTransfer.h" #include "S1AP_MMEDirectInformationTransfer.h" #include "S1AP_ENBConfigurationTransfer.h" #include "S1AP_MMEConfigurationTransfer.h" #include "S1AP_PrivateMessage.h" #include "S1AP_DownlinkUEAssociatedLPPaTransport.h" #include "S1AP_UplinkUEAssociatedLPPaTransport.h" #include "S1AP_DownlinkNonUEAssociatedLPPaTransport.h" #include "S1AP_UplinkNonUEAssociatedLPPaTransport.h" #include "S1AP_PWSRestartIndication.h" #include "S1AP_RerouteNASRequest.h" #include "S1AP_PWSFailureIndication.h" #include "S1AP_ConnectionEstablishmentIndication.h" #include "S1AP_NASDeliveryIndication.h" #include "S1AP_RetrieveUEInformation.h" #include "S1AP_UEInformationTransfer.h" #include "S1AP_ENBCPRelocationIndication.h" #include "S1AP_MMECPRelocationIndication.h" #include #include #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_InitiatingMessage__value_PR { S1AP_InitiatingMessage__value_PR_NOTHING, /* No components present */ S1AP_InitiatingMessage__value_PR_HandoverRequired, S1AP_InitiatingMessage__value_PR_HandoverRequest, S1AP_InitiatingMessage__value_PR_PathSwitchRequest, S1AP_InitiatingMessage__value_PR_E_RABSetupRequest, S1AP_InitiatingMessage__value_PR_E_RABModifyRequest, S1AP_InitiatingMessage__value_PR_E_RABReleaseCommand, S1AP_InitiatingMessage__value_PR_InitialContextSetupRequest, S1AP_InitiatingMessage__value_PR_HandoverCancel, S1AP_InitiatingMessage__value_PR_KillRequest, S1AP_InitiatingMessage__value_PR_Reset, S1AP_InitiatingMessage__value_PR_S1SetupRequest, S1AP_InitiatingMessage__value_PR_UEContextModificationRequest, S1AP_InitiatingMessage__value_PR_UEContextReleaseCommand, S1AP_InitiatingMessage__value_PR_ENBConfigurationUpdate, S1AP_InitiatingMessage__value_PR_MMEConfigurationUpdate, S1AP_InitiatingMessage__value_PR_WriteReplaceWarningRequest, S1AP_InitiatingMessage__value_PR_UERadioCapabilityMatchRequest, S1AP_InitiatingMessage__value_PR_E_RABModificationIndication, S1AP_InitiatingMessage__value_PR_UEContextModificationIndication, S1AP_InitiatingMessage__value_PR_UEContextSuspendRequest, S1AP_InitiatingMessage__value_PR_UEContextResumeRequest, S1AP_InitiatingMessage__value_PR_HandoverNotify, S1AP_InitiatingMessage__value_PR_E_RABReleaseIndication, S1AP_InitiatingMessage__value_PR_Paging, S1AP_InitiatingMessage__value_PR_DownlinkNASTransport, S1AP_InitiatingMessage__value_PR_InitialUEMessage, S1AP_InitiatingMessage__value_PR_UplinkNASTransport, S1AP_InitiatingMessage__value_PR_ErrorIndication, S1AP_InitiatingMessage__value_PR_NASNonDeliveryIndication, S1AP_InitiatingMessage__value_PR_UEContextReleaseRequest, S1AP_InitiatingMessage__value_PR_DownlinkS1cdma2000tunnelling, S1AP_InitiatingMessage__value_PR_UplinkS1cdma2000tunnelling, S1AP_InitiatingMessage__value_PR_UECapabilityInfoIndication, S1AP_InitiatingMessage__value_PR_ENBStatusTransfer, S1AP_InitiatingMessage__value_PR_MMEStatusTransfer, S1AP_InitiatingMessage__value_PR_DeactivateTrace, S1AP_InitiatingMessage__value_PR_TraceStart, S1AP_InitiatingMessage__value_PR_TraceFailureIndication, S1AP_InitiatingMessage__value_PR_CellTrafficTrace, S1AP_InitiatingMessage__value_PR_LocationReportingControl, S1AP_InitiatingMessage__value_PR_LocationReportingFailureIndication, S1AP_InitiatingMessage__value_PR_LocationReport, S1AP_InitiatingMessage__value_PR_OverloadStart, S1AP_InitiatingMessage__value_PR_OverloadStop, S1AP_InitiatingMessage__value_PR_ENBDirectInformationTransfer, S1AP_InitiatingMessage__value_PR_MMEDirectInformationTransfer, S1AP_InitiatingMessage__value_PR_ENBConfigurationTransfer, S1AP_InitiatingMessage__value_PR_MMEConfigurationTransfer, S1AP_InitiatingMessage__value_PR_PrivateMessage, S1AP_InitiatingMessage__value_PR_DownlinkUEAssociatedLPPaTransport, S1AP_InitiatingMessage__value_PR_UplinkUEAssociatedLPPaTransport, S1AP_InitiatingMessage__value_PR_DownlinkNonUEAssociatedLPPaTransport, S1AP_InitiatingMessage__value_PR_UplinkNonUEAssociatedLPPaTransport, S1AP_InitiatingMessage__value_PR_PWSRestartIndication, S1AP_InitiatingMessage__value_PR_RerouteNASRequest, S1AP_InitiatingMessage__value_PR_PWSFailureIndication, S1AP_InitiatingMessage__value_PR_ConnectionEstablishmentIndication, S1AP_InitiatingMessage__value_PR_NASDeliveryIndication, S1AP_InitiatingMessage__value_PR_RetrieveUEInformation, S1AP_InitiatingMessage__value_PR_UEInformationTransfer, S1AP_InitiatingMessage__value_PR_ENBCPRelocationIndication, S1AP_InitiatingMessage__value_PR_MMECPRelocationIndication } S1AP_InitiatingMessage__value_PR; /* S1AP_InitiatingMessage */ typedef struct S1AP_InitiatingMessage { S1AP_ProcedureCode_t procedureCode; S1AP_Criticality_t criticality; struct S1AP_InitiatingMessage__value { S1AP_InitiatingMessage__value_PR present; union S1AP_InitiatingMessage__S1AP_value_u { S1AP_HandoverRequired_t HandoverRequired; S1AP_HandoverRequest_t HandoverRequest; S1AP_PathSwitchRequest_t PathSwitchRequest; S1AP_E_RABSetupRequest_t E_RABSetupRequest; S1AP_E_RABModifyRequest_t E_RABModifyRequest; S1AP_E_RABReleaseCommand_t E_RABReleaseCommand; S1AP_InitialContextSetupRequest_t InitialContextSetupRequest; S1AP_HandoverCancel_t HandoverCancel; S1AP_KillRequest_t KillRequest; S1AP_Reset_t Reset; S1AP_S1SetupRequest_t S1SetupRequest; S1AP_UEContextModificationRequest_t UEContextModificationRequest; S1AP_UEContextReleaseCommand_t UEContextReleaseCommand; S1AP_ENBConfigurationUpdate_t ENBConfigurationUpdate; S1AP_MMEConfigurationUpdate_t MMEConfigurationUpdate; S1AP_WriteReplaceWarningRequest_t WriteReplaceWarningRequest; S1AP_UERadioCapabilityMatchRequest_t UERadioCapabilityMatchRequest; S1AP_E_RABModificationIndication_t E_RABModificationIndication; S1AP_UEContextModificationIndication_t UEContextModificationIndication; S1AP_UEContextSuspendRequest_t UEContextSuspendRequest; S1AP_UEContextResumeRequest_t UEContextResumeRequest; S1AP_HandoverNotify_t HandoverNotify; S1AP_E_RABReleaseIndication_t E_RABReleaseIndication; S1AP_Paging_t Paging; S1AP_DownlinkNASTransport_t DownlinkNASTransport; S1AP_InitialUEMessage_t InitialUEMessage; S1AP_UplinkNASTransport_t UplinkNASTransport; S1AP_ErrorIndication_t ErrorIndication; S1AP_NASNonDeliveryIndication_t NASNonDeliveryIndication; S1AP_UEContextReleaseRequest_t UEContextReleaseRequest; S1AP_DownlinkS1cdma2000tunnelling_t DownlinkS1cdma2000tunnelling; S1AP_UplinkS1cdma2000tunnelling_t UplinkS1cdma2000tunnelling; S1AP_UECapabilityInfoIndication_t UECapabilityInfoIndication; S1AP_ENBStatusTransfer_t ENBStatusTransfer; S1AP_MMEStatusTransfer_t MMEStatusTransfer; S1AP_DeactivateTrace_t DeactivateTrace; S1AP_TraceStart_t TraceStart; S1AP_TraceFailureIndication_t TraceFailureIndication; S1AP_CellTrafficTrace_t CellTrafficTrace; S1AP_LocationReportingControl_t LocationReportingControl; S1AP_LocationReportingFailureIndication_t LocationReportingFailureIndication; S1AP_LocationReport_t LocationReport; S1AP_OverloadStart_t OverloadStart; S1AP_OverloadStop_t OverloadStop; S1AP_ENBDirectInformationTransfer_t ENBDirectInformationTransfer; S1AP_MMEDirectInformationTransfer_t MMEDirectInformationTransfer; S1AP_ENBConfigurationTransfer_t ENBConfigurationTransfer; S1AP_MMEConfigurationTransfer_t MMEConfigurationTransfer; S1AP_PrivateMessage_t PrivateMessage; S1AP_DownlinkUEAssociatedLPPaTransport_t DownlinkUEAssociatedLPPaTransport; S1AP_UplinkUEAssociatedLPPaTransport_t UplinkUEAssociatedLPPaTransport; S1AP_DownlinkNonUEAssociatedLPPaTransport_t DownlinkNonUEAssociatedLPPaTransport; S1AP_UplinkNonUEAssociatedLPPaTransport_t UplinkNonUEAssociatedLPPaTransport; S1AP_PWSRestartIndication_t PWSRestartIndication; S1AP_RerouteNASRequest_t RerouteNASRequest; S1AP_PWSFailureIndication_t PWSFailureIndication; S1AP_ConnectionEstablishmentIndication_t ConnectionEstablishmentIndication; S1AP_NASDeliveryIndication_t NASDeliveryIndication; S1AP_RetrieveUEInformation_t RetrieveUEInformation; S1AP_UEInformationTransfer_t UEInformationTransfer; S1AP_ENBCPRelocationIndication_t ENBCPRelocationIndication; S1AP_MMECPRelocationIndication_t MMECPRelocationIndication; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_InitiatingMessage_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_InitiatingMessage; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_InitiatingMessage_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_InitiatingMessage_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_InitiatingMessage_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_IntegrityProtectionAlgorithms.c000066400000000000000000000044521333553357400247070ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_IntegrityProtectionAlgorithms.h" int S1AP_IntegrityProtectionAlgorithms_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 16)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_IntegrityProtectionAlgorithms_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..MAX)) */}; asn_per_constraints_t asn_PER_type_S1AP_IntegrityProtectionAlgorithms_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 16, 16 } /* (SIZE(16..16,...)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_IntegrityProtectionAlgorithms_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_IntegrityProtectionAlgorithms = { "IntegrityProtectionAlgorithms", "IntegrityProtectionAlgorithms", &asn_OP_BIT_STRING, asn_DEF_S1AP_IntegrityProtectionAlgorithms_tags_1, sizeof(asn_DEF_S1AP_IntegrityProtectionAlgorithms_tags_1) /sizeof(asn_DEF_S1AP_IntegrityProtectionAlgorithms_tags_1[0]), /* 1 */ asn_DEF_S1AP_IntegrityProtectionAlgorithms_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_IntegrityProtectionAlgorithms_tags_1) /sizeof(asn_DEF_S1AP_IntegrityProtectionAlgorithms_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_IntegrityProtectionAlgorithms_constr_1, &asn_PER_type_S1AP_IntegrityProtectionAlgorithms_constr_1, S1AP_IntegrityProtectionAlgorithms_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_IntegrityProtectionAlgorithms.h000066400000000000000000000032301333553357400247050ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_IntegrityProtectionAlgorithms_H_ #define _S1AP_IntegrityProtectionAlgorithms_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_IntegrityProtectionAlgorithms */ typedef BIT_STRING_t S1AP_IntegrityProtectionAlgorithms_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_IntegrityProtectionAlgorithms_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_IntegrityProtectionAlgorithms; asn_struct_free_f S1AP_IntegrityProtectionAlgorithms_free; asn_struct_print_f S1AP_IntegrityProtectionAlgorithms_print; asn_constr_check_f S1AP_IntegrityProtectionAlgorithms_constraint; ber_type_decoder_f S1AP_IntegrityProtectionAlgorithms_decode_ber; der_type_encoder_f S1AP_IntegrityProtectionAlgorithms_encode_der; xer_type_decoder_f S1AP_IntegrityProtectionAlgorithms_decode_xer; xer_type_encoder_f S1AP_IntegrityProtectionAlgorithms_encode_xer; oer_type_decoder_f S1AP_IntegrityProtectionAlgorithms_decode_oer; oer_type_encoder_f S1AP_IntegrityProtectionAlgorithms_encode_oer; per_type_decoder_f S1AP_IntegrityProtectionAlgorithms_decode_uper; per_type_encoder_f S1AP_IntegrityProtectionAlgorithms_encode_uper; per_type_decoder_f S1AP_IntegrityProtectionAlgorithms_decode_aper; per_type_encoder_f S1AP_IntegrityProtectionAlgorithms_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_IntegrityProtectionAlgorithms_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_IntendedNumberOfPagingAttempts.c000066400000000000000000000042121333553357400246620ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_IntendedNumberOfPagingAttempts.h" int S1AP_IntendedNumberOfPagingAttempts_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 1 && value <= 16)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_IntendedNumberOfPagingAttempts_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_IntendedNumberOfPagingAttempts_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 1, 16 } /* (1..16,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_IntendedNumberOfPagingAttempts_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_IntendedNumberOfPagingAttempts = { "IntendedNumberOfPagingAttempts", "IntendedNumberOfPagingAttempts", &asn_OP_NativeInteger, asn_DEF_S1AP_IntendedNumberOfPagingAttempts_tags_1, sizeof(asn_DEF_S1AP_IntendedNumberOfPagingAttempts_tags_1) /sizeof(asn_DEF_S1AP_IntendedNumberOfPagingAttempts_tags_1[0]), /* 1 */ asn_DEF_S1AP_IntendedNumberOfPagingAttempts_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_IntendedNumberOfPagingAttempts_tags_1) /sizeof(asn_DEF_S1AP_IntendedNumberOfPagingAttempts_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_IntendedNumberOfPagingAttempts_constr_1, &asn_PER_type_S1AP_IntendedNumberOfPagingAttempts_constr_1, S1AP_IntendedNumberOfPagingAttempts_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_IntendedNumberOfPagingAttempts.h000066400000000000000000000032471333553357400246760ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_IntendedNumberOfPagingAttempts_H_ #define _S1AP_IntendedNumberOfPagingAttempts_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_IntendedNumberOfPagingAttempts */ typedef long S1AP_IntendedNumberOfPagingAttempts_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_IntendedNumberOfPagingAttempts_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_IntendedNumberOfPagingAttempts; asn_struct_free_f S1AP_IntendedNumberOfPagingAttempts_free; asn_struct_print_f S1AP_IntendedNumberOfPagingAttempts_print; asn_constr_check_f S1AP_IntendedNumberOfPagingAttempts_constraint; ber_type_decoder_f S1AP_IntendedNumberOfPagingAttempts_decode_ber; der_type_encoder_f S1AP_IntendedNumberOfPagingAttempts_encode_der; xer_type_decoder_f S1AP_IntendedNumberOfPagingAttempts_decode_xer; xer_type_encoder_f S1AP_IntendedNumberOfPagingAttempts_encode_xer; oer_type_decoder_f S1AP_IntendedNumberOfPagingAttempts_decode_oer; oer_type_encoder_f S1AP_IntendedNumberOfPagingAttempts_encode_oer; per_type_decoder_f S1AP_IntendedNumberOfPagingAttempts_decode_uper; per_type_encoder_f S1AP_IntendedNumberOfPagingAttempts_encode_uper; per_type_decoder_f S1AP_IntendedNumberOfPagingAttempts_decode_aper; per_type_encoder_f S1AP_IntendedNumberOfPagingAttempts_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_IntendedNumberOfPagingAttempts_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Inter-SystemInformationTransferType.c000066400000000000000000000044361333553357400257520ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Inter-SystemInformationTransferType.h" #include "S1AP_RIMTransfer.h" static asn_oer_constraints_t asn_OER_type_S1AP_Inter_SystemInformationTransferType_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_Inter_SystemInformationTransferType_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_Inter_SystemInformationTransferType_1[] = { { ATF_POINTER, 0, offsetof(struct S1AP_Inter_SystemInformationTransferType, choice.rIMTransfer), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_RIMTransfer, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "rIMTransfer" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_Inter_SystemInformationTransferType_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* rIMTransfer */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_Inter_SystemInformationTransferType_specs_1 = { sizeof(struct S1AP_Inter_SystemInformationTransferType), offsetof(struct S1AP_Inter_SystemInformationTransferType, _asn_ctx), offsetof(struct S1AP_Inter_SystemInformationTransferType, present), sizeof(((struct S1AP_Inter_SystemInformationTransferType *)0)->present), asn_MAP_S1AP_Inter_SystemInformationTransferType_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 1 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_Inter_SystemInformationTransferType = { "Inter-SystemInformationTransferType", "Inter-SystemInformationTransferType", &asn_OP_CHOICE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { &asn_OER_type_S1AP_Inter_SystemInformationTransferType_constr_1, &asn_PER_type_S1AP_Inter_SystemInformationTransferType_constr_1, CHOICE_constraint }, asn_MBR_S1AP_Inter_SystemInformationTransferType_1, 1, /* Elements count */ &asn_SPC_S1AP_Inter_SystemInformationTransferType_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Inter-SystemInformationTransferType.h000066400000000000000000000027441333553357400257570ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Inter_SystemInformationTransferType_H_ #define _S1AP_Inter_SystemInformationTransferType_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_Inter_SystemInformationTransferType_PR { S1AP_Inter_SystemInformationTransferType_PR_NOTHING, /* No components present */ S1AP_Inter_SystemInformationTransferType_PR_rIMTransfer /* Extensions may appear below */ } S1AP_Inter_SystemInformationTransferType_PR; /* Forward declarations */ struct S1AP_RIMTransfer; /* S1AP_Inter-SystemInformationTransferType */ typedef struct S1AP_Inter_SystemInformationTransferType { S1AP_Inter_SystemInformationTransferType_PR present; union S1AP_Inter_SystemInformationTransferType_u { struct S1AP_RIMTransfer *rIMTransfer; /* * This type is extensible, * possible extensions are below. */ } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_Inter_SystemInformationTransferType_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Inter_SystemInformationTransferType; #ifdef __cplusplus } #endif #endif /* _S1AP_Inter_SystemInformationTransferType_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_InterfacesToTrace.c000066400000000000000000000041011333553357400221640ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_InterfacesToTrace.h" int S1AP_InterfacesToTrace_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 8)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_InterfacesToTrace_constr_1 CC_NOTUSED = { { 0, 0 }, 8 /* (SIZE(8..8)) */}; asn_per_constraints_t asn_PER_type_S1AP_InterfacesToTrace_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 8, 8 } /* (SIZE(8..8)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_InterfacesToTrace_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_InterfacesToTrace = { "InterfacesToTrace", "InterfacesToTrace", &asn_OP_BIT_STRING, asn_DEF_S1AP_InterfacesToTrace_tags_1, sizeof(asn_DEF_S1AP_InterfacesToTrace_tags_1) /sizeof(asn_DEF_S1AP_InterfacesToTrace_tags_1[0]), /* 1 */ asn_DEF_S1AP_InterfacesToTrace_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_InterfacesToTrace_tags_1) /sizeof(asn_DEF_S1AP_InterfacesToTrace_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_InterfacesToTrace_constr_1, &asn_PER_type_S1AP_InterfacesToTrace_constr_1, S1AP_InterfacesToTrace_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_InterfacesToTrace.h000066400000000000000000000026501333553357400222000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_InterfacesToTrace_H_ #define _S1AP_InterfacesToTrace_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_InterfacesToTrace */ typedef BIT_STRING_t S1AP_InterfacesToTrace_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_InterfacesToTrace_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_InterfacesToTrace; asn_struct_free_f S1AP_InterfacesToTrace_free; asn_struct_print_f S1AP_InterfacesToTrace_print; asn_constr_check_f S1AP_InterfacesToTrace_constraint; ber_type_decoder_f S1AP_InterfacesToTrace_decode_ber; der_type_encoder_f S1AP_InterfacesToTrace_encode_der; xer_type_decoder_f S1AP_InterfacesToTrace_decode_xer; xer_type_encoder_f S1AP_InterfacesToTrace_encode_xer; oer_type_decoder_f S1AP_InterfacesToTrace_decode_oer; oer_type_encoder_f S1AP_InterfacesToTrace_encode_oer; per_type_decoder_f S1AP_InterfacesToTrace_decode_uper; per_type_encoder_f S1AP_InterfacesToTrace_encode_uper; per_type_decoder_f S1AP_InterfacesToTrace_decode_aper; per_type_encoder_f S1AP_InterfacesToTrace_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_InterfacesToTrace_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_KillAllWarningMessages.c000066400000000000000000000041371333553357400231720ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_KillAllWarningMessages.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_KillAllWarningMessages_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_KillAllWarningMessages_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 0, 0, 0, 0 } /* (0..0) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_KillAllWarningMessages_value2enum_1[] = { { 0, 4, "true" } }; static const unsigned int asn_MAP_S1AP_KillAllWarningMessages_enum2value_1[] = { 0 /* true(0) */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_KillAllWarningMessages_specs_1 = { asn_MAP_S1AP_KillAllWarningMessages_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_KillAllWarningMessages_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 0, /* Enumeration is not extensible */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_KillAllWarningMessages_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_KillAllWarningMessages = { "KillAllWarningMessages", "KillAllWarningMessages", &asn_OP_NativeEnumerated, asn_DEF_S1AP_KillAllWarningMessages_tags_1, sizeof(asn_DEF_S1AP_KillAllWarningMessages_tags_1) /sizeof(asn_DEF_S1AP_KillAllWarningMessages_tags_1[0]), /* 1 */ asn_DEF_S1AP_KillAllWarningMessages_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_KillAllWarningMessages_tags_1) /sizeof(asn_DEF_S1AP_KillAllWarningMessages_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_KillAllWarningMessages_constr_1, &asn_PER_type_S1AP_KillAllWarningMessages_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_KillAllWarningMessages_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_KillAllWarningMessages.h000066400000000000000000000031001333553357400231640ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_KillAllWarningMessages_H_ #define _S1AP_KillAllWarningMessages_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_KillAllWarningMessages { S1AP_KillAllWarningMessages_true = 0 } e_S1AP_KillAllWarningMessages; /* S1AP_KillAllWarningMessages */ typedef long S1AP_KillAllWarningMessages_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_KillAllWarningMessages; asn_struct_free_f S1AP_KillAllWarningMessages_free; asn_struct_print_f S1AP_KillAllWarningMessages_print; asn_constr_check_f S1AP_KillAllWarningMessages_constraint; ber_type_decoder_f S1AP_KillAllWarningMessages_decode_ber; der_type_encoder_f S1AP_KillAllWarningMessages_encode_der; xer_type_decoder_f S1AP_KillAllWarningMessages_decode_xer; xer_type_encoder_f S1AP_KillAllWarningMessages_encode_xer; oer_type_decoder_f S1AP_KillAllWarningMessages_decode_oer; oer_type_encoder_f S1AP_KillAllWarningMessages_encode_oer; per_type_decoder_f S1AP_KillAllWarningMessages_decode_uper; per_type_encoder_f S1AP_KillAllWarningMessages_encode_uper; per_type_decoder_f S1AP_KillAllWarningMessages_decode_aper; per_type_encoder_f S1AP_KillAllWarningMessages_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_KillAllWarningMessages_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_KillRequest.c000066400000000000000000000031741333553357400210740ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_KillRequest.h" asn_TYPE_member_t asn_MBR_S1AP_KillRequest_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_KillRequest, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P69, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_KillRequest_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_KillRequest_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_KillRequest_specs_1 = { sizeof(struct S1AP_KillRequest), offsetof(struct S1AP_KillRequest, _asn_ctx), asn_MAP_S1AP_KillRequest_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_KillRequest = { "KillRequest", "KillRequest", &asn_OP_SEQUENCE, asn_DEF_S1AP_KillRequest_tags_1, sizeof(asn_DEF_S1AP_KillRequest_tags_1) /sizeof(asn_DEF_S1AP_KillRequest_tags_1[0]), /* 1 */ asn_DEF_S1AP_KillRequest_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_KillRequest_tags_1) /sizeof(asn_DEF_S1AP_KillRequest_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_KillRequest_1, 1, /* Elements count */ &asn_SPC_S1AP_KillRequest_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_KillRequest.h000066400000000000000000000020161333553357400210730ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_KillRequest_H_ #define _S1AP_KillRequest_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_KillRequest */ typedef struct S1AP_KillRequest { S1AP_ProtocolIE_Container_6551P69_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_KillRequest_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_KillRequest; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_KillRequest_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_KillRequest_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_KillRequest_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_KillResponse.c000066400000000000000000000032201333553357400212320ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_KillResponse.h" asn_TYPE_member_t asn_MBR_S1AP_KillResponse_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_KillResponse, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P70, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_KillResponse_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_KillResponse_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_KillResponse_specs_1 = { sizeof(struct S1AP_KillResponse), offsetof(struct S1AP_KillResponse, _asn_ctx), asn_MAP_S1AP_KillResponse_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_KillResponse = { "KillResponse", "KillResponse", &asn_OP_SEQUENCE, asn_DEF_S1AP_KillResponse_tags_1, sizeof(asn_DEF_S1AP_KillResponse_tags_1) /sizeof(asn_DEF_S1AP_KillResponse_tags_1[0]), /* 1 */ asn_DEF_S1AP_KillResponse_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_KillResponse_tags_1) /sizeof(asn_DEF_S1AP_KillResponse_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_KillResponse_1, 1, /* Elements count */ &asn_SPC_S1AP_KillResponse_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_KillResponse.h000066400000000000000000000020271333553357400212430ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_KillResponse_H_ #define _S1AP_KillResponse_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_KillResponse */ typedef struct S1AP_KillResponse { S1AP_ProtocolIE_Container_6551P70_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_KillResponse_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_KillResponse; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_KillResponse_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_KillResponse_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_KillResponse_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_L3-Information.c000066400000000000000000000017331333553357400213700ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_L3-Information.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_L3_Information_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_L3_Information = { "L3-Information", "L3-Information", &asn_OP_OCTET_STRING, asn_DEF_S1AP_L3_Information_tags_1, sizeof(asn_DEF_S1AP_L3_Information_tags_1) /sizeof(asn_DEF_S1AP_L3_Information_tags_1[0]), /* 1 */ asn_DEF_S1AP_L3_Information_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_L3_Information_tags_1) /sizeof(asn_DEF_S1AP_L3_Information_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_L3-Information.h000066400000000000000000000024501333553357400213720ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_L3_Information_H_ #define _S1AP_L3_Information_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_L3-Information */ typedef OCTET_STRING_t S1AP_L3_Information_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_L3_Information; asn_struct_free_f S1AP_L3_Information_free; asn_struct_print_f S1AP_L3_Information_print; asn_constr_check_f S1AP_L3_Information_constraint; ber_type_decoder_f S1AP_L3_Information_decode_ber; der_type_encoder_f S1AP_L3_Information_encode_der; xer_type_decoder_f S1AP_L3_Information_decode_xer; xer_type_encoder_f S1AP_L3_Information_encode_xer; oer_type_decoder_f S1AP_L3_Information_decode_oer; oer_type_encoder_f S1AP_L3_Information_encode_oer; per_type_decoder_f S1AP_L3_Information_decode_uper; per_type_encoder_f S1AP_L3_Information_encode_uper; per_type_decoder_f S1AP_L3_Information_decode_aper; per_type_encoder_f S1AP_L3_Information_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_L3_Information_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LAC.c000066400000000000000000000033731333553357400172300ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_LAC.h" int S1AP_LAC_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } size = st->size; if((size == 2)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_LAC_constr_1 CC_NOTUSED = { { 0, 0 }, 2 /* (SIZE(2..2)) */}; asn_per_constraints_t asn_PER_type_S1AP_LAC_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 2, 2 } /* (SIZE(2..2)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_LAC_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_LAC = { "LAC", "LAC", &asn_OP_OCTET_STRING, asn_DEF_S1AP_LAC_tags_1, sizeof(asn_DEF_S1AP_LAC_tags_1) /sizeof(asn_DEF_S1AP_LAC_tags_1[0]), /* 1 */ asn_DEF_S1AP_LAC_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_LAC_tags_1) /sizeof(asn_DEF_S1AP_LAC_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_LAC_constr_1, &asn_PER_type_S1AP_LAC_constr_1, S1AP_LAC_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LAC.h000066400000000000000000000022241333553357400172270ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_LAC_H_ #define _S1AP_LAC_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_LAC */ typedef OCTET_STRING_t S1AP_LAC_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_LAC_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_LAC; asn_struct_free_f S1AP_LAC_free; asn_struct_print_f S1AP_LAC_print; asn_constr_check_f S1AP_LAC_constraint; ber_type_decoder_f S1AP_LAC_decode_ber; der_type_encoder_f S1AP_LAC_encode_der; xer_type_decoder_f S1AP_LAC_decode_xer; xer_type_encoder_f S1AP_LAC_encode_xer; oer_type_decoder_f S1AP_LAC_decode_oer; oer_type_encoder_f S1AP_LAC_encode_oer; per_type_decoder_f S1AP_LAC_decode_uper; per_type_encoder_f S1AP_LAC_encode_uper; per_type_decoder_f S1AP_LAC_decode_aper; per_type_encoder_f S1AP_LAC_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_LAC_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LAI.c000066400000000000000000000042561333553357400172370ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_LAI.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_LAI_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_LAI, pLMNidentity), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_PLMNidentity, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "pLMNidentity" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_LAI, lAC), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_LAC, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "lAC" }, { ATF_POINTER, 1, offsetof(struct S1AP_LAI, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P62, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_LAI_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_LAI_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_LAI_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMNidentity */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* lAC */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_LAI_specs_1 = { sizeof(struct S1AP_LAI), offsetof(struct S1AP_LAI, _asn_ctx), asn_MAP_S1AP_LAI_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_LAI_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_LAI = { "LAI", "LAI", &asn_OP_SEQUENCE, asn_DEF_S1AP_LAI_tags_1, sizeof(asn_DEF_S1AP_LAI_tags_1) /sizeof(asn_DEF_S1AP_LAI_tags_1[0]), /* 1 */ asn_DEF_S1AP_LAI_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_LAI_tags_1) /sizeof(asn_DEF_S1AP_LAI_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_LAI_1, 3, /* Elements count */ &asn_SPC_S1AP_LAI_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LAI.h000066400000000000000000000021311333553357400172320ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_LAI_H_ #define _S1AP_LAI_H_ #include /* Including external dependencies */ #include "S1AP_PLMNidentity.h" #include "S1AP_LAC.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_LAI */ typedef struct S1AP_LAI { S1AP_PLMNidentity_t pLMNidentity; S1AP_LAC_t lAC; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_LAI_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_LAI; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_LAI_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_LAI_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_LAI_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LHN-ID.c000066400000000000000000000035171333553357400175440ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_LHN-ID.h" int S1AP_LHN_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } size = st->size; if((size >= 32 && size <= 256)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_LHN_ID_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(32..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_LHN_ID_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 32, 256 } /* (SIZE(32..256)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_LHN_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_LHN_ID = { "LHN-ID", "LHN-ID", &asn_OP_OCTET_STRING, asn_DEF_S1AP_LHN_ID_tags_1, sizeof(asn_DEF_S1AP_LHN_ID_tags_1) /sizeof(asn_DEF_S1AP_LHN_ID_tags_1[0]), /* 1 */ asn_DEF_S1AP_LHN_ID_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_LHN_ID_tags_1) /sizeof(asn_DEF_S1AP_LHN_ID_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_LHN_ID_constr_1, &asn_PER_type_S1AP_LHN_ID_constr_1, S1AP_LHN_ID_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LHN-ID.h000066400000000000000000000022201333553357400175370ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_LHN_ID_H_ #define _S1AP_LHN_ID_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_LHN-ID */ typedef OCTET_STRING_t S1AP_LHN_ID_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_LHN_ID; asn_struct_free_f S1AP_LHN_ID_free; asn_struct_print_f S1AP_LHN_ID_print; asn_constr_check_f S1AP_LHN_ID_constraint; ber_type_decoder_f S1AP_LHN_ID_decode_ber; der_type_encoder_f S1AP_LHN_ID_encode_der; xer_type_decoder_f S1AP_LHN_ID_decode_xer; xer_type_encoder_f S1AP_LHN_ID_encode_xer; oer_type_decoder_f S1AP_LHN_ID_decode_oer; oer_type_encoder_f S1AP_LHN_ID_encode_oer; per_type_decoder_f S1AP_LHN_ID_decode_uper; per_type_encoder_f S1AP_LHN_ID_encode_uper; per_type_decoder_f S1AP_LHN_ID_decode_aper; per_type_encoder_f S1AP_LHN_ID_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_LHN_ID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LPPa-PDU.c000066400000000000000000000016311333553357400200460ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_LPPa-PDU.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_LPPa_PDU_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_LPPa_PDU = { "LPPa-PDU", "LPPa-PDU", &asn_OP_OCTET_STRING, asn_DEF_S1AP_LPPa_PDU_tags_1, sizeof(asn_DEF_S1AP_LPPa_PDU_tags_1) /sizeof(asn_DEF_S1AP_LPPa_PDU_tags_1[0]), /* 1 */ asn_DEF_S1AP_LPPa_PDU_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_LPPa_PDU_tags_1) /sizeof(asn_DEF_S1AP_LPPa_PDU_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LPPa-PDU.h000066400000000000000000000022661333553357400200600ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_LPPa_PDU_H_ #define _S1AP_LPPa_PDU_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_LPPa-PDU */ typedef OCTET_STRING_t S1AP_LPPa_PDU_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_LPPa_PDU; asn_struct_free_f S1AP_LPPa_PDU_free; asn_struct_print_f S1AP_LPPa_PDU_print; asn_constr_check_f S1AP_LPPa_PDU_constraint; ber_type_decoder_f S1AP_LPPa_PDU_decode_ber; der_type_encoder_f S1AP_LPPa_PDU_encode_der; xer_type_decoder_f S1AP_LPPa_PDU_decode_xer; xer_type_encoder_f S1AP_LPPa_PDU_encode_xer; oer_type_decoder_f S1AP_LPPa_PDU_decode_oer; oer_type_encoder_f S1AP_LPPa_PDU_encode_oer; per_type_decoder_f S1AP_LPPa_PDU_decode_uper; per_type_encoder_f S1AP_LPPa_PDU_encode_uper; per_type_decoder_f S1AP_LPPa_PDU_decode_aper; per_type_encoder_f S1AP_LPPa_PDU_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_LPPa_PDU_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LastVisitedCell-Item.c000066400000000000000000000054021333553357400225530ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_LastVisitedCell-Item.h" #include "S1AP_LastVisitedEUTRANCellInformation.h" #include "S1AP_LastVisitedGERANCellInformation.h" static asn_oer_constraints_t asn_OER_type_S1AP_LastVisitedCell_Item_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_LastVisitedCell_Item_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_LastVisitedCell_Item_1[] = { { ATF_POINTER, 0, offsetof(struct S1AP_LastVisitedCell_Item, choice.e_UTRAN_Cell), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_LastVisitedEUTRANCellInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-UTRAN-Cell" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_LastVisitedCell_Item, choice.uTRAN_Cell), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_LastVisitedUTRANCellInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "uTRAN-Cell" }, { ATF_POINTER, 0, offsetof(struct S1AP_LastVisitedCell_Item, choice.gERAN_Cell), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_LastVisitedGERANCellInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "gERAN-Cell" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_LastVisitedCell_Item_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-UTRAN-Cell */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* uTRAN-Cell */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* gERAN-Cell */ }; asn_CHOICE_specifics_t asn_SPC_S1AP_LastVisitedCell_Item_specs_1 = { sizeof(struct S1AP_LastVisitedCell_Item), offsetof(struct S1AP_LastVisitedCell_Item, _asn_ctx), offsetof(struct S1AP_LastVisitedCell_Item, present), sizeof(((struct S1AP_LastVisitedCell_Item *)0)->present), asn_MAP_S1AP_LastVisitedCell_Item_tag2el_1, 3, /* Count of tags in the map */ 0, 0, 3 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_LastVisitedCell_Item = { "LastVisitedCell-Item", "LastVisitedCell-Item", &asn_OP_CHOICE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { &asn_OER_type_S1AP_LastVisitedCell_Item_constr_1, &asn_PER_type_S1AP_LastVisitedCell_Item_constr_1, CHOICE_constraint }, asn_MBR_S1AP_LastVisitedCell_Item_1, 3, /* Elements count */ &asn_SPC_S1AP_LastVisitedCell_Item_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LastVisitedCell-Item.h000066400000000000000000000035001333553357400225550ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_LastVisitedCell_Item_H_ #define _S1AP_LastVisitedCell_Item_H_ #include /* Including external dependencies */ #include "S1AP_LastVisitedUTRANCellInformation.h" #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_LastVisitedCell_Item_PR { S1AP_LastVisitedCell_Item_PR_NOTHING, /* No components present */ S1AP_LastVisitedCell_Item_PR_e_UTRAN_Cell, S1AP_LastVisitedCell_Item_PR_uTRAN_Cell, S1AP_LastVisitedCell_Item_PR_gERAN_Cell /* Extensions may appear below */ } S1AP_LastVisitedCell_Item_PR; /* Forward declarations */ struct S1AP_LastVisitedEUTRANCellInformation; struct S1AP_LastVisitedGERANCellInformation; /* S1AP_LastVisitedCell-Item */ typedef struct S1AP_LastVisitedCell_Item { S1AP_LastVisitedCell_Item_PR present; union S1AP_LastVisitedCell_Item_u { struct S1AP_LastVisitedEUTRANCellInformation *e_UTRAN_Cell; S1AP_LastVisitedUTRANCellInformation_t uTRAN_Cell; struct S1AP_LastVisitedGERANCellInformation *gERAN_Cell; /* * This type is extensible, * possible extensions are below. */ } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_LastVisitedCell_Item_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_LastVisitedCell_Item; extern asn_CHOICE_specifics_t asn_SPC_S1AP_LastVisitedCell_Item_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_LastVisitedCell_Item_1[3]; extern asn_per_constraints_t asn_PER_type_S1AP_LastVisitedCell_Item_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_LastVisitedCell_Item_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LastVisitedEUTRANCellInformation.c000066400000000000000000000063661333553357400250160ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_LastVisitedEUTRANCellInformation.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_LastVisitedEUTRANCellInformation_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_LastVisitedEUTRANCellInformation, global_Cell_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_EUTRAN_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "global-Cell-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_LastVisitedEUTRANCellInformation, cellType), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CellType, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cellType" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_LastVisitedEUTRANCellInformation, time_UE_StayedInCell), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Time_UE_StayedInCell, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "time-UE-StayedInCell" }, { ATF_POINTER, 1, offsetof(struct S1AP_LastVisitedEUTRANCellInformation, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P63, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_LastVisitedEUTRANCellInformation_oms_1[] = { 3 }; static const ber_tlv_tag_t asn_DEF_S1AP_LastVisitedEUTRANCellInformation_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_LastVisitedEUTRANCellInformation_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* global-Cell-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* cellType */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* time-UE-StayedInCell */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_LastVisitedEUTRANCellInformation_specs_1 = { sizeof(struct S1AP_LastVisitedEUTRANCellInformation), offsetof(struct S1AP_LastVisitedEUTRANCellInformation, _asn_ctx), asn_MAP_S1AP_LastVisitedEUTRANCellInformation_tag2el_1, 4, /* Count of tags in the map */ asn_MAP_S1AP_LastVisitedEUTRANCellInformation_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_LastVisitedEUTRANCellInformation = { "LastVisitedEUTRANCellInformation", "LastVisitedEUTRANCellInformation", &asn_OP_SEQUENCE, asn_DEF_S1AP_LastVisitedEUTRANCellInformation_tags_1, sizeof(asn_DEF_S1AP_LastVisitedEUTRANCellInformation_tags_1) /sizeof(asn_DEF_S1AP_LastVisitedEUTRANCellInformation_tags_1[0]), /* 1 */ asn_DEF_S1AP_LastVisitedEUTRANCellInformation_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_LastVisitedEUTRANCellInformation_tags_1) /sizeof(asn_DEF_S1AP_LastVisitedEUTRANCellInformation_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_LastVisitedEUTRANCellInformation_1, 4, /* Elements count */ &asn_SPC_S1AP_LastVisitedEUTRANCellInformation_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LastVisitedEUTRANCellInformation.h000066400000000000000000000027061333553357400250150ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_LastVisitedEUTRANCellInformation_H_ #define _S1AP_LastVisitedEUTRANCellInformation_H_ #include /* Including external dependencies */ #include "S1AP_EUTRAN-CGI.h" #include "S1AP_CellType.h" #include "S1AP_Time-UE-StayedInCell.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_LastVisitedEUTRANCellInformation */ typedef struct S1AP_LastVisitedEUTRANCellInformation { S1AP_EUTRAN_CGI_t global_Cell_ID; S1AP_CellType_t cellType; S1AP_Time_UE_StayedInCell_t time_UE_StayedInCell; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_LastVisitedEUTRANCellInformation_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_LastVisitedEUTRANCellInformation; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_LastVisitedEUTRANCellInformation_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_LastVisitedEUTRANCellInformation_1[4]; #ifdef __cplusplus } #endif #endif /* _S1AP_LastVisitedEUTRANCellInformation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LastVisitedGERANCellInformation.c000066400000000000000000000042041333553357400246410ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_LastVisitedGERANCellInformation.h" static asn_oer_constraints_t asn_OER_type_S1AP_LastVisitedGERANCellInformation_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_LastVisitedGERANCellInformation_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_LastVisitedGERANCellInformation_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_LastVisitedGERANCellInformation, choice.undefined), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_NULL, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "undefined" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_LastVisitedGERANCellInformation_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* undefined */ }; asn_CHOICE_specifics_t asn_SPC_S1AP_LastVisitedGERANCellInformation_specs_1 = { sizeof(struct S1AP_LastVisitedGERANCellInformation), offsetof(struct S1AP_LastVisitedGERANCellInformation, _asn_ctx), offsetof(struct S1AP_LastVisitedGERANCellInformation, present), sizeof(((struct S1AP_LastVisitedGERANCellInformation *)0)->present), asn_MAP_S1AP_LastVisitedGERANCellInformation_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 1 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_LastVisitedGERANCellInformation = { "LastVisitedGERANCellInformation", "LastVisitedGERANCellInformation", &asn_OP_CHOICE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { &asn_OER_type_S1AP_LastVisitedGERANCellInformation_constr_1, &asn_PER_type_S1AP_LastVisitedGERANCellInformation_constr_1, CHOICE_constraint }, asn_MBR_S1AP_LastVisitedGERANCellInformation_1, 1, /* Elements count */ &asn_SPC_S1AP_LastVisitedGERANCellInformation_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LastVisitedGERANCellInformation.h000066400000000000000000000031501333553357400246450ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_LastVisitedGERANCellInformation_H_ #define _S1AP_LastVisitedGERANCellInformation_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_LastVisitedGERANCellInformation_PR { S1AP_LastVisitedGERANCellInformation_PR_NOTHING, /* No components present */ S1AP_LastVisitedGERANCellInformation_PR_undefined /* Extensions may appear below */ } S1AP_LastVisitedGERANCellInformation_PR; /* S1AP_LastVisitedGERANCellInformation */ typedef struct S1AP_LastVisitedGERANCellInformation { S1AP_LastVisitedGERANCellInformation_PR present; union S1AP_LastVisitedGERANCellInformation_u { NULL_t undefined; /* * This type is extensible, * possible extensions are below. */ } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_LastVisitedGERANCellInformation_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_LastVisitedGERANCellInformation; extern asn_CHOICE_specifics_t asn_SPC_S1AP_LastVisitedGERANCellInformation_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_LastVisitedGERANCellInformation_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_LastVisitedGERANCellInformation_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_LastVisitedGERANCellInformation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LastVisitedUTRANCellInformation.c000066400000000000000000000022261333553357400247000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_LastVisitedUTRANCellInformation.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_LastVisitedUTRANCellInformation_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_LastVisitedUTRANCellInformation = { "LastVisitedUTRANCellInformation", "LastVisitedUTRANCellInformation", &asn_OP_OCTET_STRING, asn_DEF_S1AP_LastVisitedUTRANCellInformation_tags_1, sizeof(asn_DEF_S1AP_LastVisitedUTRANCellInformation_tags_1) /sizeof(asn_DEF_S1AP_LastVisitedUTRANCellInformation_tags_1[0]), /* 1 */ asn_DEF_S1AP_LastVisitedUTRANCellInformation_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_LastVisitedUTRANCellInformation_tags_1) /sizeof(asn_DEF_S1AP_LastVisitedUTRANCellInformation_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LastVisitedUTRANCellInformation.h000066400000000000000000000031531333553357400247050ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_LastVisitedUTRANCellInformation_H_ #define _S1AP_LastVisitedUTRANCellInformation_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_LastVisitedUTRANCellInformation */ typedef OCTET_STRING_t S1AP_LastVisitedUTRANCellInformation_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_LastVisitedUTRANCellInformation; asn_struct_free_f S1AP_LastVisitedUTRANCellInformation_free; asn_struct_print_f S1AP_LastVisitedUTRANCellInformation_print; asn_constr_check_f S1AP_LastVisitedUTRANCellInformation_constraint; ber_type_decoder_f S1AP_LastVisitedUTRANCellInformation_decode_ber; der_type_encoder_f S1AP_LastVisitedUTRANCellInformation_encode_der; xer_type_decoder_f S1AP_LastVisitedUTRANCellInformation_decode_xer; xer_type_encoder_f S1AP_LastVisitedUTRANCellInformation_encode_xer; oer_type_decoder_f S1AP_LastVisitedUTRANCellInformation_decode_oer; oer_type_encoder_f S1AP_LastVisitedUTRANCellInformation_encode_oer; per_type_decoder_f S1AP_LastVisitedUTRANCellInformation_decode_uper; per_type_encoder_f S1AP_LastVisitedUTRANCellInformation_encode_uper; per_type_decoder_f S1AP_LastVisitedUTRANCellInformation_decode_aper; per_type_encoder_f S1AP_LastVisitedUTRANCellInformation_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_LastVisitedUTRANCellInformation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Links-to-log.c000066400000000000000000000041211333553357400211000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Links-to-log.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_Links_to_log_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_Links_to_log_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_Links_to_log_value2enum_1[] = { { 0, 6, "uplink" }, { 1, 8, "downlink" }, { 2, 24, "both-uplink-and-downlink" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_Links_to_log_enum2value_1[] = { 2, /* both-uplink-and-downlink(2) */ 1, /* downlink(1) */ 0 /* uplink(0) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_Links_to_log_specs_1 = { asn_MAP_S1AP_Links_to_log_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_Links_to_log_enum2value_1, /* N => "tag"; sorted by N */ 3, /* Number of elements in the maps */ 4, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_Links_to_log_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Links_to_log = { "Links-to-log", "Links-to-log", &asn_OP_NativeEnumerated, asn_DEF_S1AP_Links_to_log_tags_1, sizeof(asn_DEF_S1AP_Links_to_log_tags_1) /sizeof(asn_DEF_S1AP_Links_to_log_tags_1[0]), /* 1 */ asn_DEF_S1AP_Links_to_log_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Links_to_log_tags_1) /sizeof(asn_DEF_S1AP_Links_to_log_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_Links_to_log_constr_1, &asn_PER_type_S1AP_Links_to_log_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_Links_to_log_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Links-to-log.h000066400000000000000000000030471333553357400211130ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Links_to_log_H_ #define _S1AP_Links_to_log_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_Links_to_log { S1AP_Links_to_log_uplink = 0, S1AP_Links_to_log_downlink = 1, S1AP_Links_to_log_both_uplink_and_downlink = 2 /* * Enumeration is extensible */ } e_S1AP_Links_to_log; /* S1AP_Links-to-log */ typedef long S1AP_Links_to_log_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_Links_to_log_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_Links_to_log; extern const asn_INTEGER_specifics_t asn_SPC_Links_to_log_specs_1; asn_struct_free_f Links_to_log_free; asn_struct_print_f Links_to_log_print; asn_constr_check_f Links_to_log_constraint; ber_type_decoder_f Links_to_log_decode_ber; der_type_encoder_f Links_to_log_encode_der; xer_type_decoder_f Links_to_log_decode_xer; xer_type_encoder_f Links_to_log_encode_xer; oer_type_decoder_f Links_to_log_decode_oer; oer_type_encoder_f Links_to_log_encode_oer; per_type_decoder_f Links_to_log_decode_uper; per_type_encoder_f Links_to_log_encode_uper; per_type_decoder_f Links_to_log_decode_aper; per_type_encoder_f Links_to_log_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Links_to_log_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ListeningSubframePattern.c000066400000000000000000000132661333553357400236120ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ListeningSubframePattern.h" #include "S1AP_ProtocolExtensionContainer.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static int memb_S1AP_pattern_offset_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 10239)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_oer_constraints_t asn_OER_type_S1AP_pattern_period_constr_2 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_pattern_period_constr_2 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_pattern_offset_constr_8 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_pattern_offset_constr_8 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 14, 14, 0, 10239 } /* (0..10239,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_pattern_period_value2enum_2[] = { { 0, 6, "ms1280" }, { 1, 6, "ms2560" }, { 2, 6, "ms5120" }, { 3, 7, "ms10240" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_pattern_period_enum2value_2[] = { 3, /* ms10240(3) */ 0, /* ms1280(0) */ 1, /* ms2560(1) */ 2 /* ms5120(2) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_pattern_period_specs_2 = { asn_MAP_S1AP_pattern_period_value2enum_2, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_pattern_period_enum2value_2, /* N => "tag"; sorted by N */ 4, /* Number of elements in the maps */ 5, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_pattern_period_tags_2[] = { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_pattern_period_2 = { "pattern-period", "pattern-period", &asn_OP_NativeEnumerated, asn_DEF_S1AP_pattern_period_tags_2, sizeof(asn_DEF_S1AP_pattern_period_tags_2) /sizeof(asn_DEF_S1AP_pattern_period_tags_2[0]) - 1, /* 1 */ asn_DEF_S1AP_pattern_period_tags_2, /* Same as above */ sizeof(asn_DEF_S1AP_pattern_period_tags_2) /sizeof(asn_DEF_S1AP_pattern_period_tags_2[0]), /* 2 */ { &asn_OER_type_S1AP_pattern_period_constr_2, &asn_PER_type_S1AP_pattern_period_constr_2, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_pattern_period_specs_2 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ListeningSubframePattern_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ListeningSubframePattern, pattern_period), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_pattern_period_2, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "pattern-period" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ListeningSubframePattern, pattern_offset), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, 0, { &asn_OER_memb_S1AP_pattern_offset_constr_8, &asn_PER_memb_S1AP_pattern_offset_constr_8, memb_S1AP_pattern_offset_constraint_1 }, 0, 0, /* No default value */ "pattern-offset" }, { ATF_POINTER, 1, offsetof(struct S1AP_ListeningSubframePattern, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P64, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_ListeningSubframePattern_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_ListeningSubframePattern_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ListeningSubframePattern_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pattern-period */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* pattern-offset */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ListeningSubframePattern_specs_1 = { sizeof(struct S1AP_ListeningSubframePattern), offsetof(struct S1AP_ListeningSubframePattern, _asn_ctx), asn_MAP_S1AP_ListeningSubframePattern_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_ListeningSubframePattern_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ListeningSubframePattern = { "ListeningSubframePattern", "ListeningSubframePattern", &asn_OP_SEQUENCE, asn_DEF_S1AP_ListeningSubframePattern_tags_1, sizeof(asn_DEF_S1AP_ListeningSubframePattern_tags_1) /sizeof(asn_DEF_S1AP_ListeningSubframePattern_tags_1[0]), /* 1 */ asn_DEF_S1AP_ListeningSubframePattern_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ListeningSubframePattern_tags_1) /sizeof(asn_DEF_S1AP_ListeningSubframePattern_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ListeningSubframePattern_1, 3, /* Elements count */ &asn_SPC_S1AP_ListeningSubframePattern_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ListeningSubframePattern.h000066400000000000000000000034201333553357400236060ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ListeningSubframePattern_H_ #define _S1AP_ListeningSubframePattern_H_ #include /* Including external dependencies */ #include #include #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_ListeningSubframePattern__pattern_period { S1AP_ListeningSubframePattern__pattern_period_ms1280 = 0, S1AP_ListeningSubframePattern__pattern_period_ms2560 = 1, S1AP_ListeningSubframePattern__pattern_period_ms5120 = 2, S1AP_ListeningSubframePattern__pattern_period_ms10240 = 3 /* * Enumeration is extensible */ } e_S1AP_ListeningSubframePattern__pattern_period; /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_ListeningSubframePattern */ typedef struct S1AP_ListeningSubframePattern { long pattern_period; long pattern_offset; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ListeningSubframePattern_t; /* Implementation */ /* extern asn_TYPE_descriptor_t asn_DEF_S1AP_pattern_period_2; // (Use -fall-defs-global to expose) */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ListeningSubframePattern; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ListeningSubframePattern_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ListeningSubframePattern_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_ListeningSubframePattern_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LocationReport.c000066400000000000000000000032701333553357400215710ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_LocationReport.h" asn_TYPE_member_t asn_MBR_S1AP_LocationReport_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_LocationReport, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P60, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_LocationReport_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_LocationReport_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_LocationReport_specs_1 = { sizeof(struct S1AP_LocationReport), offsetof(struct S1AP_LocationReport, _asn_ctx), asn_MAP_S1AP_LocationReport_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_LocationReport = { "LocationReport", "LocationReport", &asn_OP_SEQUENCE, asn_DEF_S1AP_LocationReport_tags_1, sizeof(asn_DEF_S1AP_LocationReport_tags_1) /sizeof(asn_DEF_S1AP_LocationReport_tags_1[0]), /* 1 */ asn_DEF_S1AP_LocationReport_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_LocationReport_tags_1) /sizeof(asn_DEF_S1AP_LocationReport_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_LocationReport_1, 1, /* Elements count */ &asn_SPC_S1AP_LocationReport_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LocationReport.h000066400000000000000000000020511333553357400215720ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_LocationReport_H_ #define _S1AP_LocationReport_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_LocationReport */ typedef struct S1AP_LocationReport { S1AP_ProtocolIE_Container_6551P60_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_LocationReport_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_LocationReport; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_LocationReport_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_LocationReport_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_LocationReport_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LocationReportingControl.c000066400000000000000000000036001333553357400236250ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_LocationReportingControl.h" asn_TYPE_member_t asn_MBR_S1AP_LocationReportingControl_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_LocationReportingControl, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P58, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_LocationReportingControl_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_LocationReportingControl_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_LocationReportingControl_specs_1 = { sizeof(struct S1AP_LocationReportingControl), offsetof(struct S1AP_LocationReportingControl, _asn_ctx), asn_MAP_S1AP_LocationReportingControl_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_LocationReportingControl = { "LocationReportingControl", "LocationReportingControl", &asn_OP_SEQUENCE, asn_DEF_S1AP_LocationReportingControl_tags_1, sizeof(asn_DEF_S1AP_LocationReportingControl_tags_1) /sizeof(asn_DEF_S1AP_LocationReportingControl_tags_1[0]), /* 1 */ asn_DEF_S1AP_LocationReportingControl_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_LocationReportingControl_tags_1) /sizeof(asn_DEF_S1AP_LocationReportingControl_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_LocationReportingControl_1, 1, /* Elements count */ &asn_SPC_S1AP_LocationReportingControl_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LocationReportingControl.h000066400000000000000000000022031333553357400236300ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_LocationReportingControl_H_ #define _S1AP_LocationReportingControl_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_LocationReportingControl */ typedef struct S1AP_LocationReportingControl { S1AP_ProtocolIE_Container_6551P58_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_LocationReportingControl_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_LocationReportingControl; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_LocationReportingControl_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_LocationReportingControl_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_LocationReportingControl_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LocationReportingFailureIndication.c000066400000000000000000000041101333553357400255730ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_LocationReportingFailureIndication.h" asn_TYPE_member_t asn_MBR_S1AP_LocationReportingFailureIndication_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_LocationReportingFailureIndication, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P59, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_LocationReportingFailureIndication_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_LocationReportingFailureIndication_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_LocationReportingFailureIndication_specs_1 = { sizeof(struct S1AP_LocationReportingFailureIndication), offsetof(struct S1AP_LocationReportingFailureIndication, _asn_ctx), asn_MAP_S1AP_LocationReportingFailureIndication_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_LocationReportingFailureIndication = { "LocationReportingFailureIndication", "LocationReportingFailureIndication", &asn_OP_SEQUENCE, asn_DEF_S1AP_LocationReportingFailureIndication_tags_1, sizeof(asn_DEF_S1AP_LocationReportingFailureIndication_tags_1) /sizeof(asn_DEF_S1AP_LocationReportingFailureIndication_tags_1[0]), /* 1 */ asn_DEF_S1AP_LocationReportingFailureIndication_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_LocationReportingFailureIndication_tags_1) /sizeof(asn_DEF_S1AP_LocationReportingFailureIndication_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_LocationReportingFailureIndication_1, 1, /* Elements count */ &asn_SPC_S1AP_LocationReportingFailureIndication_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LocationReportingFailureIndication.h000066400000000000000000000023351333553357400256070ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_LocationReportingFailureIndication_H_ #define _S1AP_LocationReportingFailureIndication_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_LocationReportingFailureIndication */ typedef struct S1AP_LocationReportingFailureIndication { S1AP_ProtocolIE_Container_6551P59_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_LocationReportingFailureIndication_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_LocationReportingFailureIndication; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_LocationReportingFailureIndication_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_LocationReportingFailureIndication_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_LocationReportingFailureIndication_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LoggedMBSFNMDT.c000066400000000000000000000056011333553357400211610ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_LoggedMBSFNMDT.h" #include "S1AP_MBSFN-ResultToLog.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_LoggedMBSFNMDT_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_LoggedMBSFNMDT, loggingInterval), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_LoggingInterval, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "loggingInterval" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_LoggedMBSFNMDT, loggingDuration), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_LoggingDuration, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "loggingDuration" }, { ATF_POINTER, 2, offsetof(struct S1AP_LoggedMBSFNMDT, mBSFN_ResultToLog), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_MBSFN_ResultToLog, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "mBSFN-ResultToLog" }, { ATF_POINTER, 1, offsetof(struct S1AP_LoggedMBSFNMDT, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P66, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_LoggedMBSFNMDT_oms_1[] = { 2, 3 }; static const ber_tlv_tag_t asn_DEF_S1AP_LoggedMBSFNMDT_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_LoggedMBSFNMDT_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* loggingInterval */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* loggingDuration */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* mBSFN-ResultToLog */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_LoggedMBSFNMDT_specs_1 = { sizeof(struct S1AP_LoggedMBSFNMDT), offsetof(struct S1AP_LoggedMBSFNMDT, _asn_ctx), asn_MAP_S1AP_LoggedMBSFNMDT_tag2el_1, 4, /* Count of tags in the map */ asn_MAP_S1AP_LoggedMBSFNMDT_oms_1, /* Optional members */ 2, 0, /* Root/Additions */ 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_LoggedMBSFNMDT = { "LoggedMBSFNMDT", "LoggedMBSFNMDT", &asn_OP_SEQUENCE, asn_DEF_S1AP_LoggedMBSFNMDT_tags_1, sizeof(asn_DEF_S1AP_LoggedMBSFNMDT_tags_1) /sizeof(asn_DEF_S1AP_LoggedMBSFNMDT_tags_1[0]), /* 1 */ asn_DEF_S1AP_LoggedMBSFNMDT_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_LoggedMBSFNMDT_tags_1) /sizeof(asn_DEF_S1AP_LoggedMBSFNMDT_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_LoggedMBSFNMDT_1, 4, /* Elements count */ &asn_SPC_S1AP_LoggedMBSFNMDT_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LoggedMBSFNMDT.h000066400000000000000000000023121333553357400211620ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_LoggedMBSFNMDT_H_ #define _S1AP_LoggedMBSFNMDT_H_ #include /* Including external dependencies */ #include "S1AP_LoggingInterval.h" #include "S1AP_LoggingDuration.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_MBSFN_ResultToLog; struct S1AP_ProtocolExtensionContainer; /* S1AP_LoggedMBSFNMDT */ typedef struct S1AP_LoggedMBSFNMDT { S1AP_LoggingInterval_t loggingInterval; S1AP_LoggingDuration_t loggingDuration; struct S1AP_MBSFN_ResultToLog *mBSFN_ResultToLog; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_LoggedMBSFNMDT_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_LoggedMBSFNMDT; #ifdef __cplusplus } #endif #endif /* _S1AP_LoggedMBSFNMDT_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LoggedMDT.c000066400000000000000000000045721333553357400204010ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_LoggedMDT.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_LoggedMDT_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_LoggedMDT, loggingInterval), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_LoggingInterval, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "loggingInterval" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_LoggedMDT, loggingDuration), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_LoggingDuration, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "loggingDuration" }, { ATF_POINTER, 1, offsetof(struct S1AP_LoggedMDT, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P65, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_LoggedMDT_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_LoggedMDT_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_LoggedMDT_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* loggingInterval */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* loggingDuration */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_LoggedMDT_specs_1 = { sizeof(struct S1AP_LoggedMDT), offsetof(struct S1AP_LoggedMDT, _asn_ctx), asn_MAP_S1AP_LoggedMDT_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_LoggedMDT_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_LoggedMDT = { "LoggedMDT", "LoggedMDT", &asn_OP_SEQUENCE, asn_DEF_S1AP_LoggedMDT_tags_1, sizeof(asn_DEF_S1AP_LoggedMDT_tags_1) /sizeof(asn_DEF_S1AP_LoggedMDT_tags_1[0]), /* 1 */ asn_DEF_S1AP_LoggedMDT_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_LoggedMDT_tags_1) /sizeof(asn_DEF_S1AP_LoggedMDT_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_LoggedMDT_1, 3, /* Elements count */ &asn_SPC_S1AP_LoggedMDT_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LoggedMDT.h000066400000000000000000000022741333553357400204030ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_LoggedMDT_H_ #define _S1AP_LoggedMDT_H_ #include /* Including external dependencies */ #include "S1AP_LoggingInterval.h" #include "S1AP_LoggingDuration.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_LoggedMDT */ typedef struct S1AP_LoggedMDT { S1AP_LoggingInterval_t loggingInterval; S1AP_LoggingDuration_t loggingDuration; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_LoggedMDT_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_LoggedMDT; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_LoggedMDT_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_LoggedMDT_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_LoggedMDT_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LoggingDuration.c000066400000000000000000000041551333553357400217240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_LoggingDuration.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_LoggingDuration_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_LoggingDuration_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 3, 3, 0, 5 } /* (0..5) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_LoggingDuration_value2enum_1[] = { { 0, 3, "m10" }, { 1, 3, "m20" }, { 2, 3, "m40" }, { 3, 3, "m60" }, { 4, 3, "m90" }, { 5, 4, "m120" } }; static const unsigned int asn_MAP_S1AP_LoggingDuration_enum2value_1[] = { 0, /* m10(0) */ 5, /* m120(5) */ 1, /* m20(1) */ 2, /* m40(2) */ 3, /* m60(3) */ 4 /* m90(4) */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_LoggingDuration_specs_1 = { asn_MAP_S1AP_LoggingDuration_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_LoggingDuration_enum2value_1, /* N => "tag"; sorted by N */ 6, /* Number of elements in the maps */ 0, /* Enumeration is not extensible */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_LoggingDuration_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_LoggingDuration = { "LoggingDuration", "LoggingDuration", &asn_OP_NativeEnumerated, asn_DEF_S1AP_LoggingDuration_tags_1, sizeof(asn_DEF_S1AP_LoggingDuration_tags_1) /sizeof(asn_DEF_S1AP_LoggingDuration_tags_1[0]), /* 1 */ asn_DEF_S1AP_LoggingDuration_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_LoggingDuration_tags_1) /sizeof(asn_DEF_S1AP_LoggingDuration_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_LoggingDuration_constr_1, &asn_PER_type_S1AP_LoggingDuration_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_LoggingDuration_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LoggingDuration.h000066400000000000000000000032171333553357400217270ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_LoggingDuration_H_ #define _S1AP_LoggingDuration_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_LoggingDuration { S1AP_LoggingDuration_m10 = 0, S1AP_LoggingDuration_m20 = 1, S1AP_LoggingDuration_m40 = 2, S1AP_LoggingDuration_m60 = 3, S1AP_LoggingDuration_m90 = 4, S1AP_LoggingDuration_m120 = 5 } e_S1AP_LoggingDuration; /* S1AP_LoggingDuration */ typedef long S1AP_LoggingDuration_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_LoggingDuration_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_LoggingDuration; extern const asn_INTEGER_specifics_t asn_SPC_LoggingDuration_specs_1; asn_struct_free_f LoggingDuration_free; asn_struct_print_f LoggingDuration_print; asn_constr_check_f LoggingDuration_constraint; ber_type_decoder_f LoggingDuration_decode_ber; der_type_encoder_f LoggingDuration_encode_der; xer_type_decoder_f LoggingDuration_decode_xer; xer_type_encoder_f LoggingDuration_encode_xer; oer_type_decoder_f LoggingDuration_decode_oer; oer_type_encoder_f LoggingDuration_encode_oer; per_type_decoder_f LoggingDuration_decode_uper; per_type_encoder_f LoggingDuration_encode_uper; per_type_decoder_f LoggingDuration_decode_aper; per_type_encoder_f LoggingDuration_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_LoggingDuration_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LoggingInterval.c000066400000000000000000000043331333553357400217210ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_LoggingInterval.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_LoggingInterval_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_LoggingInterval_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 3, 3, 0, 7 } /* (0..7) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_LoggingInterval_value2enum_1[] = { { 0, 5, "ms128" }, { 1, 5, "ms256" }, { 2, 5, "ms512" }, { 3, 6, "ms1024" }, { 4, 6, "ms2048" }, { 5, 6, "ms3072" }, { 6, 6, "ms4096" }, { 7, 6, "ms6144" } }; static const unsigned int asn_MAP_S1AP_LoggingInterval_enum2value_1[] = { 3, /* ms1024(3) */ 0, /* ms128(0) */ 4, /* ms2048(4) */ 1, /* ms256(1) */ 5, /* ms3072(5) */ 6, /* ms4096(6) */ 2, /* ms512(2) */ 7 /* ms6144(7) */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_LoggingInterval_specs_1 = { asn_MAP_S1AP_LoggingInterval_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_LoggingInterval_enum2value_1, /* N => "tag"; sorted by N */ 8, /* Number of elements in the maps */ 0, /* Enumeration is not extensible */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_LoggingInterval_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_LoggingInterval = { "LoggingInterval", "LoggingInterval", &asn_OP_NativeEnumerated, asn_DEF_S1AP_LoggingInterval_tags_1, sizeof(asn_DEF_S1AP_LoggingInterval_tags_1) /sizeof(asn_DEF_S1AP_LoggingInterval_tags_1[0]), /* 1 */ asn_DEF_S1AP_LoggingInterval_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_LoggingInterval_tags_1) /sizeof(asn_DEF_S1AP_LoggingInterval_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_LoggingInterval_constr_1, &asn_PER_type_S1AP_LoggingInterval_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_LoggingInterval_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_LoggingInterval.h000066400000000000000000000033411333553357400217240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_LoggingInterval_H_ #define _S1AP_LoggingInterval_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_LoggingInterval { S1AP_LoggingInterval_ms128 = 0, S1AP_LoggingInterval_ms256 = 1, S1AP_LoggingInterval_ms512 = 2, S1AP_LoggingInterval_ms1024 = 3, S1AP_LoggingInterval_ms2048 = 4, S1AP_LoggingInterval_ms3072 = 5, S1AP_LoggingInterval_ms4096 = 6, S1AP_LoggingInterval_ms6144 = 7 } e_S1AP_LoggingInterval; /* S1AP_LoggingInterval */ typedef long S1AP_LoggingInterval_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_LoggingInterval_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_LoggingInterval; extern const asn_INTEGER_specifics_t asn_SPC_LoggingInterval_specs_1; asn_struct_free_f LoggingInterval_free; asn_struct_print_f LoggingInterval_print; asn_constr_check_f LoggingInterval_constraint; ber_type_decoder_f LoggingInterval_decode_ber; der_type_encoder_f LoggingInterval_encode_der; xer_type_decoder_f LoggingInterval_decode_xer; xer_type_encoder_f LoggingInterval_encode_xer; oer_type_decoder_f LoggingInterval_decode_oer; oer_type_encoder_f LoggingInterval_encode_oer; per_type_decoder_f LoggingInterval_decode_uper; per_type_encoder_f LoggingInterval_encode_uper; per_type_decoder_f LoggingInterval_decode_aper; per_type_encoder_f LoggingInterval_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_LoggingInterval_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M-TMSI.c000066400000000000000000000034561333553357400176010ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_M-TMSI.h" int S1AP_M_TMSI_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } size = st->size; if((size == 4)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_M_TMSI_constr_1 CC_NOTUSED = { { 0, 0 }, 4 /* (SIZE(4..4)) */}; asn_per_constraints_t asn_PER_type_S1AP_M_TMSI_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 4, 4 } /* (SIZE(4..4)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_M_TMSI_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_M_TMSI = { "M-TMSI", "M-TMSI", &asn_OP_OCTET_STRING, asn_DEF_S1AP_M_TMSI_tags_1, sizeof(asn_DEF_S1AP_M_TMSI_tags_1) /sizeof(asn_DEF_S1AP_M_TMSI_tags_1[0]), /* 1 */ asn_DEF_S1AP_M_TMSI_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_M_TMSI_tags_1) /sizeof(asn_DEF_S1AP_M_TMSI_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_M_TMSI_constr_1, &asn_PER_type_S1AP_M_TMSI_constr_1, S1AP_M_TMSI_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M-TMSI.h000066400000000000000000000023201333553357400175730ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_M_TMSI_H_ #define _S1AP_M_TMSI_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_M-TMSI */ typedef OCTET_STRING_t S1AP_M_TMSI_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_M_TMSI_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_M_TMSI; asn_struct_free_f S1AP_M_TMSI_free; asn_struct_print_f S1AP_M_TMSI_print; asn_constr_check_f S1AP_M_TMSI_constraint; ber_type_decoder_f S1AP_M_TMSI_decode_ber; der_type_encoder_f S1AP_M_TMSI_encode_der; xer_type_decoder_f S1AP_M_TMSI_decode_xer; xer_type_encoder_f S1AP_M_TMSI_encode_xer; oer_type_decoder_f S1AP_M_TMSI_decode_oer; oer_type_encoder_f S1AP_M_TMSI_encode_oer; per_type_decoder_f S1AP_M_TMSI_decode_uper; per_type_encoder_f S1AP_M_TMSI_encode_uper; per_type_decoder_f S1AP_M_TMSI_decode_aper; per_type_encoder_f S1AP_M_TMSI_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_M_TMSI_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M1PeriodicReporting.c000066400000000000000000000051401333553357400224510ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_M1PeriodicReporting.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_M1PeriodicReporting_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_M1PeriodicReporting, reportInterval), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ReportIntervalMDT, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "reportInterval" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_M1PeriodicReporting, reportAmount), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ReportAmountMDT, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "reportAmount" }, { ATF_POINTER, 1, offsetof(struct S1AP_M1PeriodicReporting, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P78, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_M1PeriodicReporting_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_M1PeriodicReporting_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_M1PeriodicReporting_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* reportInterval */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* reportAmount */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_M1PeriodicReporting_specs_1 = { sizeof(struct S1AP_M1PeriodicReporting), offsetof(struct S1AP_M1PeriodicReporting, _asn_ctx), asn_MAP_S1AP_M1PeriodicReporting_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_M1PeriodicReporting_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_M1PeriodicReporting = { "M1PeriodicReporting", "M1PeriodicReporting", &asn_OP_SEQUENCE, asn_DEF_S1AP_M1PeriodicReporting_tags_1, sizeof(asn_DEF_S1AP_M1PeriodicReporting_tags_1) /sizeof(asn_DEF_S1AP_M1PeriodicReporting_tags_1[0]), /* 1 */ asn_DEF_S1AP_M1PeriodicReporting_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_M1PeriodicReporting_tags_1) /sizeof(asn_DEF_S1AP_M1PeriodicReporting_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_M1PeriodicReporting_1, 3, /* Elements count */ &asn_SPC_S1AP_M1PeriodicReporting_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M1PeriodicReporting.h000066400000000000000000000024261333553357400224620ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_M1PeriodicReporting_H_ #define _S1AP_M1PeriodicReporting_H_ #include /* Including external dependencies */ #include "S1AP_ReportIntervalMDT.h" #include "S1AP_ReportAmountMDT.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_M1PeriodicReporting */ typedef struct S1AP_M1PeriodicReporting { S1AP_ReportIntervalMDT_t reportInterval; S1AP_ReportAmountMDT_t reportAmount; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_M1PeriodicReporting_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_M1PeriodicReporting; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_M1PeriodicReporting_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_M1PeriodicReporting_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_M1PeriodicReporting_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M1ReportingTrigger.c000066400000000000000000000043461333553357400223250ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_M1ReportingTrigger.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_M1ReportingTrigger_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_M1ReportingTrigger_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_M1ReportingTrigger_value2enum_1[] = { { 0, 8, "periodic" }, { 1, 16, "a2eventtriggered" }, { 2, 25, "a2eventtriggered-periodic" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_M1ReportingTrigger_enum2value_1[] = { 1, /* a2eventtriggered(1) */ 2, /* a2eventtriggered-periodic(2) */ 0 /* periodic(0) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_M1ReportingTrigger_specs_1 = { asn_MAP_S1AP_M1ReportingTrigger_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_M1ReportingTrigger_enum2value_1, /* N => "tag"; sorted by N */ 3, /* Number of elements in the maps */ 3, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_M1ReportingTrigger_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_M1ReportingTrigger = { "M1ReportingTrigger", "M1ReportingTrigger", &asn_OP_NativeEnumerated, asn_DEF_S1AP_M1ReportingTrigger_tags_1, sizeof(asn_DEF_S1AP_M1ReportingTrigger_tags_1) /sizeof(asn_DEF_S1AP_M1ReportingTrigger_tags_1[0]), /* 1 */ asn_DEF_S1AP_M1ReportingTrigger_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_M1ReportingTrigger_tags_1) /sizeof(asn_DEF_S1AP_M1ReportingTrigger_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_M1ReportingTrigger_constr_1, &asn_PER_type_S1AP_M1ReportingTrigger_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_M1ReportingTrigger_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M1ReportingTrigger.h000066400000000000000000000033161333553357400223260ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_M1ReportingTrigger_H_ #define _S1AP_M1ReportingTrigger_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_M1ReportingTrigger { S1AP_M1ReportingTrigger_periodic = 0, S1AP_M1ReportingTrigger_a2eventtriggered = 1, /* * Enumeration is extensible */ S1AP_M1ReportingTrigger_a2eventtriggered_periodic = 2 } e_S1AP_M1ReportingTrigger; /* S1AP_M1ReportingTrigger */ typedef long S1AP_M1ReportingTrigger_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_M1ReportingTrigger_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_M1ReportingTrigger; extern const asn_INTEGER_specifics_t asn_SPC_M1ReportingTrigger_specs_1; asn_struct_free_f M1ReportingTrigger_free; asn_struct_print_f M1ReportingTrigger_print; asn_constr_check_f M1ReportingTrigger_constraint; ber_type_decoder_f M1ReportingTrigger_decode_ber; der_type_encoder_f M1ReportingTrigger_encode_der; xer_type_decoder_f M1ReportingTrigger_decode_xer; xer_type_encoder_f M1ReportingTrigger_encode_xer; oer_type_decoder_f M1ReportingTrigger_decode_oer; oer_type_encoder_f M1ReportingTrigger_encode_oer; per_type_decoder_f M1ReportingTrigger_decode_uper; per_type_encoder_f M1ReportingTrigger_encode_uper; per_type_decoder_f M1ReportingTrigger_decode_aper; per_type_encoder_f M1ReportingTrigger_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_M1ReportingTrigger_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M1ThresholdEventA2.c000066400000000000000000000044231333553357400221450ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_M1ThresholdEventA2.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_M1ThresholdEventA2_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_M1ThresholdEventA2, measurementThreshold), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_MeasurementThresholdA2, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "measurementThreshold" }, { ATF_POINTER, 1, offsetof(struct S1AP_M1ThresholdEventA2, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P106, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_M1ThresholdEventA2_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_M1ThresholdEventA2_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_M1ThresholdEventA2_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* measurementThreshold */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_M1ThresholdEventA2_specs_1 = { sizeof(struct S1AP_M1ThresholdEventA2), offsetof(struct S1AP_M1ThresholdEventA2, _asn_ctx), asn_MAP_S1AP_M1ThresholdEventA2_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_M1ThresholdEventA2_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_M1ThresholdEventA2 = { "M1ThresholdEventA2", "M1ThresholdEventA2", &asn_OP_SEQUENCE, asn_DEF_S1AP_M1ThresholdEventA2_tags_1, sizeof(asn_DEF_S1AP_M1ThresholdEventA2_tags_1) /sizeof(asn_DEF_S1AP_M1ThresholdEventA2_tags_1[0]), /* 1 */ asn_DEF_S1AP_M1ThresholdEventA2_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_M1ThresholdEventA2_tags_1) /sizeof(asn_DEF_S1AP_M1ThresholdEventA2_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_M1ThresholdEventA2_1, 2, /* Elements count */ &asn_SPC_S1AP_M1ThresholdEventA2_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M1ThresholdEventA2.h000066400000000000000000000023241333553357400221500ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_M1ThresholdEventA2_H_ #define _S1AP_M1ThresholdEventA2_H_ #include /* Including external dependencies */ #include "S1AP_MeasurementThresholdA2.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_M1ThresholdEventA2 */ typedef struct S1AP_M1ThresholdEventA2 { S1AP_MeasurementThresholdA2_t measurementThreshold; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_M1ThresholdEventA2_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_M1ThresholdEventA2; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_M1ThresholdEventA2_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_M1ThresholdEventA2_1[2]; #ifdef __cplusplus } #endif #endif /* _S1AP_M1ThresholdEventA2_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M3Configuration.c000066400000000000000000000042511333553357400216340ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_M3Configuration.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_M3Configuration_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_M3Configuration, m3period), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_M3period, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "m3period" }, { ATF_POINTER, 1, offsetof(struct S1AP_M3Configuration, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P67, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_M3Configuration_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_M3Configuration_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_M3Configuration_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* m3period */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_M3Configuration_specs_1 = { sizeof(struct S1AP_M3Configuration), offsetof(struct S1AP_M3Configuration, _asn_ctx), asn_MAP_S1AP_M3Configuration_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_M3Configuration_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_M3Configuration = { "M3Configuration", "M3Configuration", &asn_OP_SEQUENCE, asn_DEF_S1AP_M3Configuration_tags_1, sizeof(asn_DEF_S1AP_M3Configuration_tags_1) /sizeof(asn_DEF_S1AP_M3Configuration_tags_1[0]), /* 1 */ asn_DEF_S1AP_M3Configuration_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_M3Configuration_tags_1) /sizeof(asn_DEF_S1AP_M3Configuration_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_M3Configuration_1, 2, /* Elements count */ &asn_SPC_S1AP_M3Configuration_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M3Configuration.h000066400000000000000000000020171333553357400216370ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_M3Configuration_H_ #define _S1AP_M3Configuration_H_ #include /* Including external dependencies */ #include "S1AP_M3period.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_M3Configuration */ typedef struct S1AP_M3Configuration { S1AP_M3period_t m3period; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_M3Configuration_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_M3Configuration; #ifdef __cplusplus } #endif #endif /* _S1AP_M3Configuration_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M3period.c000066400000000000000000000037241333553357400203130ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_M3period.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_M3period_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_M3period_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_M3period_value2enum_1[] = { { 0, 5, "ms100" }, { 1, 6, "ms1000" }, { 2, 7, "ms10000" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_M3period_enum2value_1[] = { 0, /* ms100(0) */ 1, /* ms1000(1) */ 2 /* ms10000(2) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_M3period_specs_1 = { asn_MAP_S1AP_M3period_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_M3period_enum2value_1, /* N => "tag"; sorted by N */ 3, /* Number of elements in the maps */ 4, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_M3period_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_M3period = { "M3period", "M3period", &asn_OP_NativeEnumerated, asn_DEF_S1AP_M3period_tags_1, sizeof(asn_DEF_S1AP_M3period_tags_1) /sizeof(asn_DEF_S1AP_M3period_tags_1[0]), /* 1 */ asn_DEF_S1AP_M3period_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_M3period_tags_1) /sizeof(asn_DEF_S1AP_M3period_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_M3period_constr_1, &asn_PER_type_S1AP_M3period_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_M3period_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M3period.h000066400000000000000000000026531333553357400203200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_M3period_H_ #define _S1AP_M3period_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_M3period { S1AP_M3period_ms100 = 0, S1AP_M3period_ms1000 = 1, S1AP_M3period_ms10000 = 2 /* * Enumeration is extensible */ } e_S1AP_M3period; /* S1AP_M3period */ typedef long S1AP_M3period_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_M3period_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_M3period; extern const asn_INTEGER_specifics_t asn_SPC_M3period_specs_1; asn_struct_free_f M3period_free; asn_struct_print_f M3period_print; asn_constr_check_f M3period_constraint; ber_type_decoder_f M3period_decode_ber; der_type_encoder_f M3period_encode_der; xer_type_decoder_f M3period_decode_xer; xer_type_encoder_f M3period_encode_xer; oer_type_decoder_f M3period_decode_oer; oer_type_encoder_f M3period_encode_oer; per_type_decoder_f M3period_decode_uper; per_type_encoder_f M3period_encode_uper; per_type_decoder_f M3period_decode_aper; per_type_encoder_f M3period_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_M3period_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M4Configuration.c000066400000000000000000000047711333553357400216440ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_M4Configuration.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_M4Configuration_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_M4Configuration, m4period), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_M4period, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "m4period" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_M4Configuration, m4_links_to_log), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Links_to_log, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "m4-links-to-log" }, { ATF_POINTER, 1, offsetof(struct S1AP_M4Configuration, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P68, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_M4Configuration_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_M4Configuration_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_M4Configuration_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* m4period */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* m4-links-to-log */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_M4Configuration_specs_1 = { sizeof(struct S1AP_M4Configuration), offsetof(struct S1AP_M4Configuration, _asn_ctx), asn_MAP_S1AP_M4Configuration_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_M4Configuration_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_M4Configuration = { "M4Configuration", "M4Configuration", &asn_OP_SEQUENCE, asn_DEF_S1AP_M4Configuration_tags_1, sizeof(asn_DEF_S1AP_M4Configuration_tags_1) /sizeof(asn_DEF_S1AP_M4Configuration_tags_1[0]), /* 1 */ asn_DEF_S1AP_M4Configuration_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_M4Configuration_tags_1) /sizeof(asn_DEF_S1AP_M4Configuration_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_M4Configuration_1, 3, /* Elements count */ &asn_SPC_S1AP_M4Configuration_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M4Configuration.h000066400000000000000000000021251333553357400216400ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_M4Configuration_H_ #define _S1AP_M4Configuration_H_ #include /* Including external dependencies */ #include "S1AP_M4period.h" #include "S1AP_Links-to-log.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_M4Configuration */ typedef struct S1AP_M4Configuration { S1AP_M4period_t m4period; S1AP_Links_to_log_t m4_links_to_log; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_M4Configuration_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_M4Configuration; #ifdef __cplusplus } #endif #endif /* _S1AP_M4Configuration_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M4period.c000066400000000000000000000040441333553357400203100ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_M4period.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_M4period_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_M4period_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 4 } /* (0..4,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_M4period_value2enum_1[] = { { 0, 6, "ms1024" }, { 1, 6, "ms2048" }, { 2, 6, "ms5120" }, { 3, 7, "ms10240" }, { 4, 4, "min1" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_M4period_enum2value_1[] = { 4, /* min1(4) */ 0, /* ms1024(0) */ 3, /* ms10240(3) */ 1, /* ms2048(1) */ 2 /* ms5120(2) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_M4period_specs_1 = { asn_MAP_S1AP_M4period_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_M4period_enum2value_1, /* N => "tag"; sorted by N */ 5, /* Number of elements in the maps */ 6, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_M4period_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_M4period = { "M4period", "M4period", &asn_OP_NativeEnumerated, asn_DEF_S1AP_M4period_tags_1, sizeof(asn_DEF_S1AP_M4period_tags_1) /sizeof(asn_DEF_S1AP_M4period_tags_1[0]), /* 1 */ asn_DEF_S1AP_M4period_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_M4period_tags_1) /sizeof(asn_DEF_S1AP_M4period_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_M4period_constr_1, &asn_PER_type_S1AP_M4period_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_M4period_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M4period.h000066400000000000000000000027401333553357400203160ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_M4period_H_ #define _S1AP_M4period_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_M4period { S1AP_M4period_ms1024 = 0, S1AP_M4period_ms2048 = 1, S1AP_M4period_ms5120 = 2, S1AP_M4period_ms10240 = 3, S1AP_M4period_min1 = 4 /* * Enumeration is extensible */ } e_S1AP_M4period; /* S1AP_M4period */ typedef long S1AP_M4period_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_M4period_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_M4period; extern const asn_INTEGER_specifics_t asn_SPC_M4period_specs_1; asn_struct_free_f M4period_free; asn_struct_print_f M4period_print; asn_constr_check_f M4period_constraint; ber_type_decoder_f M4period_decode_ber; der_type_encoder_f M4period_encode_der; xer_type_decoder_f M4period_decode_xer; xer_type_encoder_f M4period_encode_xer; oer_type_decoder_f M4period_decode_oer; oer_type_encoder_f M4period_encode_oer; per_type_decoder_f M4period_decode_uper; per_type_encoder_f M4period_encode_uper; per_type_decoder_f M4period_decode_aper; per_type_encoder_f M4period_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_M4period_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M5Configuration.c000066400000000000000000000047711333553357400216450ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_M5Configuration.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_M5Configuration_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_M5Configuration, m5period), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_M5period, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "m5period" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_M5Configuration, m5_links_to_log), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Links_to_log, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "m5-links-to-log" }, { ATF_POINTER, 1, offsetof(struct S1AP_M5Configuration, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P69, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_M5Configuration_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_M5Configuration_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_M5Configuration_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* m5period */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* m5-links-to-log */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_M5Configuration_specs_1 = { sizeof(struct S1AP_M5Configuration), offsetof(struct S1AP_M5Configuration, _asn_ctx), asn_MAP_S1AP_M5Configuration_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_M5Configuration_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_M5Configuration = { "M5Configuration", "M5Configuration", &asn_OP_SEQUENCE, asn_DEF_S1AP_M5Configuration_tags_1, sizeof(asn_DEF_S1AP_M5Configuration_tags_1) /sizeof(asn_DEF_S1AP_M5Configuration_tags_1[0]), /* 1 */ asn_DEF_S1AP_M5Configuration_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_M5Configuration_tags_1) /sizeof(asn_DEF_S1AP_M5Configuration_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_M5Configuration_1, 3, /* Elements count */ &asn_SPC_S1AP_M5Configuration_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M5Configuration.h000066400000000000000000000021251333553357400216410ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_M5Configuration_H_ #define _S1AP_M5Configuration_H_ #include /* Including external dependencies */ #include "S1AP_M5period.h" #include "S1AP_Links-to-log.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_M5Configuration */ typedef struct S1AP_M5Configuration { S1AP_M5period_t m5period; S1AP_Links_to_log_t m5_links_to_log; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_M5Configuration_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_M5Configuration; #ifdef __cplusplus } #endif #endif /* _S1AP_M5Configuration_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M5period.c000066400000000000000000000040441333553357400203110ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_M5period.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_M5period_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_M5period_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 4 } /* (0..4,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_M5period_value2enum_1[] = { { 0, 6, "ms1024" }, { 1, 6, "ms2048" }, { 2, 6, "ms5120" }, { 3, 7, "ms10240" }, { 4, 4, "min1" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_M5period_enum2value_1[] = { 4, /* min1(4) */ 0, /* ms1024(0) */ 3, /* ms10240(3) */ 1, /* ms2048(1) */ 2 /* ms5120(2) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_M5period_specs_1 = { asn_MAP_S1AP_M5period_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_M5period_enum2value_1, /* N => "tag"; sorted by N */ 5, /* Number of elements in the maps */ 6, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_M5period_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_M5period = { "M5period", "M5period", &asn_OP_NativeEnumerated, asn_DEF_S1AP_M5period_tags_1, sizeof(asn_DEF_S1AP_M5period_tags_1) /sizeof(asn_DEF_S1AP_M5period_tags_1[0]), /* 1 */ asn_DEF_S1AP_M5period_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_M5period_tags_1) /sizeof(asn_DEF_S1AP_M5period_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_M5period_constr_1, &asn_PER_type_S1AP_M5period_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_M5period_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M5period.h000066400000000000000000000027401333553357400203170ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_M5period_H_ #define _S1AP_M5period_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_M5period { S1AP_M5period_ms1024 = 0, S1AP_M5period_ms2048 = 1, S1AP_M5period_ms5120 = 2, S1AP_M5period_ms10240 = 3, S1AP_M5period_min1 = 4 /* * Enumeration is extensible */ } e_S1AP_M5period; /* S1AP_M5period */ typedef long S1AP_M5period_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_M5period_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_M5period; extern const asn_INTEGER_specifics_t asn_SPC_M5period_specs_1; asn_struct_free_f M5period_free; asn_struct_print_f M5period_print; asn_constr_check_f M5period_constraint; ber_type_decoder_f M5period_decode_ber; der_type_encoder_f M5period_encode_der; xer_type_decoder_f M5period_decode_xer; xer_type_encoder_f M5period_encode_xer; oer_type_decoder_f M5period_decode_oer; oer_type_encoder_f M5period_encode_oer; per_type_decoder_f M5period_decode_uper; per_type_encoder_f M5period_encode_uper; per_type_decoder_f M5period_decode_aper; per_type_encoder_f M5period_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_M5period_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M6Configuration.c000066400000000000000000000055731333553357400216470ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_M6Configuration.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_M6Configuration_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_M6Configuration, m6report_Interval), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_M6report_Interval, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "m6report-Interval" }, { ATF_POINTER, 1, offsetof(struct S1AP_M6Configuration, m6delay_threshold), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_M6delay_threshold, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "m6delay-threshold" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_M6Configuration, m6_links_to_log), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Links_to_log, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "m6-links-to-log" }, { ATF_POINTER, 1, offsetof(struct S1AP_M6Configuration, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P70, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_M6Configuration_oms_1[] = { 1, 3 }; static const ber_tlv_tag_t asn_DEF_S1AP_M6Configuration_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_M6Configuration_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* m6report-Interval */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* m6delay-threshold */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* m6-links-to-log */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_M6Configuration_specs_1 = { sizeof(struct S1AP_M6Configuration), offsetof(struct S1AP_M6Configuration, _asn_ctx), asn_MAP_S1AP_M6Configuration_tag2el_1, 4, /* Count of tags in the map */ asn_MAP_S1AP_M6Configuration_oms_1, /* Optional members */ 2, 0, /* Root/Additions */ 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_M6Configuration = { "M6Configuration", "M6Configuration", &asn_OP_SEQUENCE, asn_DEF_S1AP_M6Configuration_tags_1, sizeof(asn_DEF_S1AP_M6Configuration_tags_1) /sizeof(asn_DEF_S1AP_M6Configuration_tags_1[0]), /* 1 */ asn_DEF_S1AP_M6Configuration_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_M6Configuration_tags_1) /sizeof(asn_DEF_S1AP_M6Configuration_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_M6Configuration_1, 4, /* Elements count */ &asn_SPC_S1AP_M6Configuration_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M6Configuration.h000066400000000000000000000023211333553357400216400ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_M6Configuration_H_ #define _S1AP_M6Configuration_H_ #include /* Including external dependencies */ #include "S1AP_M6report-Interval.h" #include "S1AP_M6delay-threshold.h" #include "S1AP_Links-to-log.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_M6Configuration */ typedef struct S1AP_M6Configuration { S1AP_M6report_Interval_t m6report_Interval; S1AP_M6delay_threshold_t *m6delay_threshold; /* OPTIONAL */ S1AP_Links_to_log_t m6_links_to_log; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_M6Configuration_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_M6Configuration; #ifdef __cplusplus } #endif #endif /* _S1AP_M6Configuration_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M6delay-threshold.c000066400000000000000000000047461333553357400221310ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_M6delay-threshold.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_M6delay_threshold_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_M6delay_threshold_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 11 } /* (0..11,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_M6delay_threshold_value2enum_1[] = { { 0, 4, "ms30" }, { 1, 4, "ms40" }, { 2, 4, "ms50" }, { 3, 4, "ms60" }, { 4, 4, "ms70" }, { 5, 4, "ms80" }, { 6, 4, "ms90" }, { 7, 5, "ms100" }, { 8, 5, "ms150" }, { 9, 5, "ms300" }, { 10, 5, "ms500" }, { 11, 5, "ms750" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_M6delay_threshold_enum2value_1[] = { 7, /* ms100(7) */ 8, /* ms150(8) */ 0, /* ms30(0) */ 9, /* ms300(9) */ 1, /* ms40(1) */ 2, /* ms50(2) */ 10, /* ms500(10) */ 3, /* ms60(3) */ 4, /* ms70(4) */ 11, /* ms750(11) */ 5, /* ms80(5) */ 6 /* ms90(6) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_M6delay_threshold_specs_1 = { asn_MAP_S1AP_M6delay_threshold_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_M6delay_threshold_enum2value_1, /* N => "tag"; sorted by N */ 12, /* Number of elements in the maps */ 13, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_M6delay_threshold_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_M6delay_threshold = { "M6delay-threshold", "M6delay-threshold", &asn_OP_NativeEnumerated, asn_DEF_S1AP_M6delay_threshold_tags_1, sizeof(asn_DEF_S1AP_M6delay_threshold_tags_1) /sizeof(asn_DEF_S1AP_M6delay_threshold_tags_1[0]), /* 1 */ asn_DEF_S1AP_M6delay_threshold_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_M6delay_threshold_tags_1) /sizeof(asn_DEF_S1AP_M6delay_threshold_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_M6delay_threshold_constr_1, &asn_PER_type_S1AP_M6delay_threshold_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_M6delay_threshold_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M6delay-threshold.h000066400000000000000000000037101333553357400221240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_M6delay_threshold_H_ #define _S1AP_M6delay_threshold_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_M6delay_threshold { S1AP_M6delay_threshold_ms30 = 0, S1AP_M6delay_threshold_ms40 = 1, S1AP_M6delay_threshold_ms50 = 2, S1AP_M6delay_threshold_ms60 = 3, S1AP_M6delay_threshold_ms70 = 4, S1AP_M6delay_threshold_ms80 = 5, S1AP_M6delay_threshold_ms90 = 6, S1AP_M6delay_threshold_ms100 = 7, S1AP_M6delay_threshold_ms150 = 8, S1AP_M6delay_threshold_ms300 = 9, S1AP_M6delay_threshold_ms500 = 10, S1AP_M6delay_threshold_ms750 = 11 /* * Enumeration is extensible */ } e_S1AP_M6delay_threshold; /* S1AP_M6delay-threshold */ typedef long S1AP_M6delay_threshold_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_M6delay_threshold_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_M6delay_threshold; extern const asn_INTEGER_specifics_t asn_SPC_M6delay_threshold_specs_1; asn_struct_free_f M6delay_threshold_free; asn_struct_print_f M6delay_threshold_print; asn_constr_check_f M6delay_threshold_constraint; ber_type_decoder_f M6delay_threshold_decode_ber; der_type_encoder_f M6delay_threshold_encode_der; xer_type_decoder_f M6delay_threshold_decode_xer; xer_type_encoder_f M6delay_threshold_encode_xer; oer_type_decoder_f M6delay_threshold_decode_oer; oer_type_encoder_f M6delay_threshold_encode_oer; per_type_decoder_f M6delay_threshold_decode_uper; per_type_encoder_f M6delay_threshold_encode_uper; per_type_decoder_f M6delay_threshold_decode_aper; per_type_encoder_f M6delay_threshold_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_M6delay_threshold_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M6report-Interval.c000066400000000000000000000042741333553357400221320ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_M6report-Interval.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_M6report_Interval_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_M6report_Interval_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_M6report_Interval_value2enum_1[] = { { 0, 6, "ms1024" }, { 1, 6, "ms2048" }, { 2, 6, "ms5120" }, { 3, 7, "ms10240" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_M6report_Interval_enum2value_1[] = { 0, /* ms1024(0) */ 3, /* ms10240(3) */ 1, /* ms2048(1) */ 2 /* ms5120(2) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_M6report_Interval_specs_1 = { asn_MAP_S1AP_M6report_Interval_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_M6report_Interval_enum2value_1, /* N => "tag"; sorted by N */ 4, /* Number of elements in the maps */ 5, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_M6report_Interval_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_M6report_Interval = { "M6report-Interval", "M6report-Interval", &asn_OP_NativeEnumerated, asn_DEF_S1AP_M6report_Interval_tags_1, sizeof(asn_DEF_S1AP_M6report_Interval_tags_1) /sizeof(asn_DEF_S1AP_M6report_Interval_tags_1[0]), /* 1 */ asn_DEF_S1AP_M6report_Interval_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_M6report_Interval_tags_1) /sizeof(asn_DEF_S1AP_M6report_Interval_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_M6report_Interval_constr_1, &asn_PER_type_S1AP_M6report_Interval_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_M6report_Interval_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M6report-Interval.h000066400000000000000000000032721333553357400221340ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_M6report_Interval_H_ #define _S1AP_M6report_Interval_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_M6report_Interval { S1AP_M6report_Interval_ms1024 = 0, S1AP_M6report_Interval_ms2048 = 1, S1AP_M6report_Interval_ms5120 = 2, S1AP_M6report_Interval_ms10240 = 3 /* * Enumeration is extensible */ } e_S1AP_M6report_Interval; /* S1AP_M6report-Interval */ typedef long S1AP_M6report_Interval_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_M6report_Interval_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_M6report_Interval; extern const asn_INTEGER_specifics_t asn_SPC_M6report_Interval_specs_1; asn_struct_free_f M6report_Interval_free; asn_struct_print_f M6report_Interval_print; asn_constr_check_f M6report_Interval_constraint; ber_type_decoder_f M6report_Interval_decode_ber; der_type_encoder_f M6report_Interval_encode_der; xer_type_decoder_f M6report_Interval_decode_xer; xer_type_encoder_f M6report_Interval_encode_xer; oer_type_decoder_f M6report_Interval_decode_oer; oer_type_encoder_f M6report_Interval_encode_oer; per_type_decoder_f M6report_Interval_decode_uper; per_type_encoder_f M6report_Interval_encode_uper; per_type_decoder_f M6report_Interval_decode_aper; per_type_encoder_f M6report_Interval_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_M6report_Interval_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M7Configuration.c000066400000000000000000000047711333553357400216470ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_M7Configuration.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_M7Configuration_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_M7Configuration, m7period), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_M7period, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "m7period" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_M7Configuration, m7_links_to_log), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Links_to_log, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "m7-links-to-log" }, { ATF_POINTER, 1, offsetof(struct S1AP_M7Configuration, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P71, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_M7Configuration_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_M7Configuration_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_M7Configuration_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* m7period */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* m7-links-to-log */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_M7Configuration_specs_1 = { sizeof(struct S1AP_M7Configuration), offsetof(struct S1AP_M7Configuration, _asn_ctx), asn_MAP_S1AP_M7Configuration_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_M7Configuration_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_M7Configuration = { "M7Configuration", "M7Configuration", &asn_OP_SEQUENCE, asn_DEF_S1AP_M7Configuration_tags_1, sizeof(asn_DEF_S1AP_M7Configuration_tags_1) /sizeof(asn_DEF_S1AP_M7Configuration_tags_1[0]), /* 1 */ asn_DEF_S1AP_M7Configuration_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_M7Configuration_tags_1) /sizeof(asn_DEF_S1AP_M7Configuration_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_M7Configuration_1, 3, /* Elements count */ &asn_SPC_S1AP_M7Configuration_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M7Configuration.h000066400000000000000000000021251333553357400216430ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_M7Configuration_H_ #define _S1AP_M7Configuration_H_ #include /* Including external dependencies */ #include "S1AP_M7period.h" #include "S1AP_Links-to-log.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_M7Configuration */ typedef struct S1AP_M7Configuration { S1AP_M7period_t m7period; S1AP_Links_to_log_t m7_links_to_log; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_M7Configuration_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_M7Configuration; #ifdef __cplusplus } #endif #endif /* _S1AP_M7Configuration_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M7period.c000066400000000000000000000034241333553357400203140ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_M7period.h" int S1AP_M7period_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 1 && value <= 60)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_M7period_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_M7period_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 6, 6, 1, 60 } /* (1..60,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_M7period_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_M7period = { "M7period", "M7period", &asn_OP_NativeInteger, asn_DEF_S1AP_M7period_tags_1, sizeof(asn_DEF_S1AP_M7period_tags_1) /sizeof(asn_DEF_S1AP_M7period_tags_1[0]), /* 1 */ asn_DEF_S1AP_M7period_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_M7period_tags_1) /sizeof(asn_DEF_S1AP_M7period_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_M7period_constr_1, &asn_PER_type_S1AP_M7period_constr_1, S1AP_M7period_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_M7period.h000066400000000000000000000023571333553357400203250ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_M7period_H_ #define _S1AP_M7period_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_M7period */ typedef long S1AP_M7period_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_M7period_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_M7period; asn_struct_free_f S1AP_M7period_free; asn_struct_print_f S1AP_M7period_print; asn_constr_check_f S1AP_M7period_constraint; ber_type_decoder_f S1AP_M7period_decode_ber; der_type_encoder_f S1AP_M7period_encode_der; xer_type_decoder_f S1AP_M7period_decode_xer; xer_type_encoder_f S1AP_M7period_encode_xer; oer_type_decoder_f S1AP_M7period_decode_oer; oer_type_encoder_f S1AP_M7period_encode_oer; per_type_decoder_f S1AP_M7period_decode_uper; per_type_encoder_f S1AP_M7period_encode_uper; per_type_decoder_f S1AP_M7period_decode_aper; per_type_encoder_f S1AP_M7period_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_M7period_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MBSFN-ResultToLog.c000066400000000000000000000035161333553357400217160ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MBSFN-ResultToLog.h" #include "S1AP_MBSFN-ResultToLogInfo.h" static asn_oer_constraints_t asn_OER_type_S1AP_MBSFN_ResultToLog_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..8)) */}; asn_per_constraints_t asn_PER_type_S1AP_MBSFN_ResultToLog_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 3, 3, 1, 8 } /* (SIZE(1..8)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_MBSFN_ResultToLog_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_MBSFN_ResultToLogInfo, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_MBSFN_ResultToLog_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_MBSFN_ResultToLog_specs_1 = { sizeof(struct S1AP_MBSFN_ResultToLog), offsetof(struct S1AP_MBSFN_ResultToLog, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MBSFN_ResultToLog = { "MBSFN-ResultToLog", "MBSFN-ResultToLog", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_MBSFN_ResultToLog_tags_1, sizeof(asn_DEF_S1AP_MBSFN_ResultToLog_tags_1) /sizeof(asn_DEF_S1AP_MBSFN_ResultToLog_tags_1[0]), /* 1 */ asn_DEF_S1AP_MBSFN_ResultToLog_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MBSFN_ResultToLog_tags_1) /sizeof(asn_DEF_S1AP_MBSFN_ResultToLog_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_MBSFN_ResultToLog_constr_1, &asn_PER_type_S1AP_MBSFN_ResultToLog_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_MBSFN_ResultToLog_1, 1, /* Single element */ &asn_SPC_S1AP_MBSFN_ResultToLog_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MBSFN-ResultToLog.h000066400000000000000000000021701333553357400217160ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MBSFN_ResultToLog_H_ #define _S1AP_MBSFN_ResultToLog_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_MBSFN_ResultToLogInfo; /* S1AP_MBSFN-ResultToLog */ typedef struct S1AP_MBSFN_ResultToLog { A_SEQUENCE_OF(struct S1AP_MBSFN_ResultToLogInfo) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MBSFN_ResultToLog_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MBSFN_ResultToLog; extern asn_SET_OF_specifics_t asn_SPC_S1AP_MBSFN_ResultToLog_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_MBSFN_ResultToLog_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_MBSFN_ResultToLog_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_MBSFN_ResultToLog_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MBSFN-ResultToLogInfo.c000066400000000000000000000071271333553357400225340ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MBSFN-ResultToLogInfo.h" #include "S1AP_ProtocolExtensionContainer.h" static int memb_S1AP_mBSFN_AreaId_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 255)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_oer_constraints_t asn_OER_memb_S1AP_mBSFN_AreaId_constr_2 CC_NOTUSED = { { 1, 1 } /* (0..255) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_mBSFN_AreaId_constr_2 CC_NOTUSED = { { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_MBSFN_ResultToLogInfo_1[] = { { ATF_POINTER, 1, offsetof(struct S1AP_MBSFN_ResultToLogInfo, mBSFN_AreaId), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, 0, { &asn_OER_memb_S1AP_mBSFN_AreaId_constr_2, &asn_PER_memb_S1AP_mBSFN_AreaId_constr_2, memb_S1AP_mBSFN_AreaId_constraint_1 }, 0, 0, /* No default value */ "mBSFN-AreaId" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_MBSFN_ResultToLogInfo, carrierFreq), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_EARFCN, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "carrierFreq" }, { ATF_POINTER, 1, offsetof(struct S1AP_MBSFN_ResultToLogInfo, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P73, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_MBSFN_ResultToLogInfo_oms_1[] = { 0, 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_MBSFN_ResultToLogInfo_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MBSFN_ResultToLogInfo_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* mBSFN-AreaId */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* carrierFreq */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_MBSFN_ResultToLogInfo_specs_1 = { sizeof(struct S1AP_MBSFN_ResultToLogInfo), offsetof(struct S1AP_MBSFN_ResultToLogInfo, _asn_ctx), asn_MAP_S1AP_MBSFN_ResultToLogInfo_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_MBSFN_ResultToLogInfo_oms_1, /* Optional members */ 2, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MBSFN_ResultToLogInfo = { "MBSFN-ResultToLogInfo", "MBSFN-ResultToLogInfo", &asn_OP_SEQUENCE, asn_DEF_S1AP_MBSFN_ResultToLogInfo_tags_1, sizeof(asn_DEF_S1AP_MBSFN_ResultToLogInfo_tags_1) /sizeof(asn_DEF_S1AP_MBSFN_ResultToLogInfo_tags_1[0]), /* 1 */ asn_DEF_S1AP_MBSFN_ResultToLogInfo_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MBSFN_ResultToLogInfo_tags_1) /sizeof(asn_DEF_S1AP_MBSFN_ResultToLogInfo_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_MBSFN_ResultToLogInfo_1, 3, /* Elements count */ &asn_SPC_S1AP_MBSFN_ResultToLogInfo_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MBSFN-ResultToLogInfo.h000066400000000000000000000024051333553357400225330ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MBSFN_ResultToLogInfo_H_ #define _S1AP_MBSFN_ResultToLogInfo_H_ #include /* Including external dependencies */ #include #include "S1AP_EARFCN.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_MBSFN-ResultToLogInfo */ typedef struct S1AP_MBSFN_ResultToLogInfo { long *mBSFN_AreaId; /* OPTIONAL */ S1AP_EARFCN_t carrierFreq; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MBSFN_ResultToLogInfo_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MBSFN_ResultToLogInfo; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_MBSFN_ResultToLogInfo_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_MBSFN_ResultToLogInfo_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_MBSFN_ResultToLogInfo_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MDT-Activation.c000066400000000000000000000043371333553357400213550ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MDT-Activation.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_MDT_Activation_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_MDT_Activation_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_MDT_Activation_value2enum_1[] = { { 0, 18, "immediate-MDT-only" }, { 1, 23, "immediate-MDT-and-Trace" }, { 2, 15, "logged-MDT-only" }, { 3, 16, "logged-MBSFN-MDT" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_MDT_Activation_enum2value_1[] = { 1, /* immediate-MDT-and-Trace(1) */ 0, /* immediate-MDT-only(0) */ 3, /* logged-MBSFN-MDT(3) */ 2 /* logged-MDT-only(2) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_MDT_Activation_specs_1 = { asn_MAP_S1AP_MDT_Activation_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_MDT_Activation_enum2value_1, /* N => "tag"; sorted by N */ 4, /* Number of elements in the maps */ 4, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_MDT_Activation_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_MDT_Activation = { "MDT-Activation", "MDT-Activation", &asn_OP_NativeEnumerated, asn_DEF_S1AP_MDT_Activation_tags_1, sizeof(asn_DEF_S1AP_MDT_Activation_tags_1) /sizeof(asn_DEF_S1AP_MDT_Activation_tags_1[0]), /* 1 */ asn_DEF_S1AP_MDT_Activation_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MDT_Activation_tags_1) /sizeof(asn_DEF_S1AP_MDT_Activation_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_MDT_Activation_constr_1, &asn_PER_type_S1AP_MDT_Activation_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_MDT_Activation_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MDT-Activation.h000066400000000000000000000032301333553357400213510ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MDT_Activation_H_ #define _S1AP_MDT_Activation_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_MDT_Activation { S1AP_MDT_Activation_immediate_MDT_only = 0, S1AP_MDT_Activation_immediate_MDT_and_Trace = 1, S1AP_MDT_Activation_logged_MDT_only = 2, /* * Enumeration is extensible */ S1AP_MDT_Activation_logged_MBSFN_MDT = 3 } e_S1AP_MDT_Activation; /* S1AP_MDT-Activation */ typedef long S1AP_MDT_Activation_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_MDT_Activation_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_MDT_Activation; extern const asn_INTEGER_specifics_t asn_SPC_MDT_Activation_specs_1; asn_struct_free_f MDT_Activation_free; asn_struct_print_f MDT_Activation_print; asn_constr_check_f MDT_Activation_constraint; ber_type_decoder_f MDT_Activation_decode_ber; der_type_encoder_f MDT_Activation_encode_der; xer_type_decoder_f MDT_Activation_decode_xer; xer_type_encoder_f MDT_Activation_encode_xer; oer_type_decoder_f MDT_Activation_decode_oer; oer_type_encoder_f MDT_Activation_encode_oer; per_type_decoder_f MDT_Activation_decode_uper; per_type_encoder_f MDT_Activation_encode_uper; per_type_decoder_f MDT_Activation_decode_aper; per_type_encoder_f MDT_Activation_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_MDT_Activation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MDT-Configuration.c000066400000000000000000000055651333553357400220670ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MDT-Configuration.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_MDT_Configuration_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MDT_Configuration, mdt_Activation), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_MDT_Activation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "mdt-Activation" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_MDT_Configuration, areaScopeOfMDT), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_AreaScopeOfMDT, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "areaScopeOfMDT" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_MDT_Configuration, mDTMode), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_MDTMode, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "mDTMode" }, { ATF_POINTER, 1, offsetof(struct S1AP_MDT_Configuration, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P72, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_MDT_Configuration_oms_1[] = { 3 }; static const ber_tlv_tag_t asn_DEF_S1AP_MDT_Configuration_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MDT_Configuration_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* mdt-Activation */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* areaScopeOfMDT */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* mDTMode */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_MDT_Configuration_specs_1 = { sizeof(struct S1AP_MDT_Configuration), offsetof(struct S1AP_MDT_Configuration, _asn_ctx), asn_MAP_S1AP_MDT_Configuration_tag2el_1, 4, /* Count of tags in the map */ asn_MAP_S1AP_MDT_Configuration_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MDT_Configuration = { "MDT-Configuration", "MDT-Configuration", &asn_OP_SEQUENCE, asn_DEF_S1AP_MDT_Configuration_tags_1, sizeof(asn_DEF_S1AP_MDT_Configuration_tags_1) /sizeof(asn_DEF_S1AP_MDT_Configuration_tags_1[0]), /* 1 */ asn_DEF_S1AP_MDT_Configuration_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MDT_Configuration_tags_1) /sizeof(asn_DEF_S1AP_MDT_Configuration_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_MDT_Configuration_1, 4, /* Elements count */ &asn_SPC_S1AP_MDT_Configuration_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MDT-Configuration.h000066400000000000000000000022541333553357400220640ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MDT_Configuration_H_ #define _S1AP_MDT_Configuration_H_ #include /* Including external dependencies */ #include "S1AP_MDT-Activation.h" #include "S1AP_AreaScopeOfMDT.h" #include "S1AP_MDTMode.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_MDT-Configuration */ typedef struct S1AP_MDT_Configuration { S1AP_MDT_Activation_t mdt_Activation; S1AP_AreaScopeOfMDT_t areaScopeOfMDT; S1AP_MDTMode_t mDTMode; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MDT_Configuration_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MDT_Configuration; #ifdef __cplusplus } #endif #endif /* _S1AP_MDT_Configuration_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MDT-Location-Info.c000066400000000000000000000041101333553357400217020ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MDT-Location-Info.h" int S1AP_MDT_Location_Info_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 8)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_MDT_Location_Info_constr_1 CC_NOTUSED = { { 0, 0 }, 8 /* (SIZE(8..8)) */}; static asn_per_constraints_t asn_PER_type_S1AP_MDT_Location_Info_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 8, 8 } /* (SIZE(8..8)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_MDT_Location_Info_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_MDT_Location_Info = { "MDT-Location-Info", "MDT-Location-Info", &asn_OP_BIT_STRING, asn_DEF_S1AP_MDT_Location_Info_tags_1, sizeof(asn_DEF_S1AP_MDT_Location_Info_tags_1) /sizeof(asn_DEF_S1AP_MDT_Location_Info_tags_1[0]), /* 1 */ asn_DEF_S1AP_MDT_Location_Info_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MDT_Location_Info_tags_1) /sizeof(asn_DEF_S1AP_MDT_Location_Info_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_MDT_Location_Info_constr_1, &asn_PER_type_S1AP_MDT_Location_Info_constr_1, S1AP_MDT_Location_Info_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MDT-Location-Info.h000066400000000000000000000025351333553357400217200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MDT_Location_Info_H_ #define _S1AP_MDT_Location_Info_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_MDT-Location-Info */ typedef BIT_STRING_t S1AP_MDT_Location_Info_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MDT_Location_Info; asn_struct_free_f S1AP_MDT_Location_Info_free; asn_struct_print_f S1AP_MDT_Location_Info_print; asn_constr_check_f S1AP_MDT_Location_Info_constraint; ber_type_decoder_f S1AP_MDT_Location_Info_decode_ber; der_type_encoder_f S1AP_MDT_Location_Info_encode_der; xer_type_decoder_f S1AP_MDT_Location_Info_decode_xer; xer_type_encoder_f S1AP_MDT_Location_Info_encode_xer; oer_type_decoder_f S1AP_MDT_Location_Info_decode_oer; oer_type_encoder_f S1AP_MDT_Location_Info_encode_oer; per_type_decoder_f S1AP_MDT_Location_Info_decode_uper; per_type_encoder_f S1AP_MDT_Location_Info_encode_uper; per_type_decoder_f S1AP_MDT_Location_Info_decode_aper; per_type_encoder_f S1AP_MDT_Location_Info_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_MDT_Location_Info_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MDTMode-Extension.c000066400000000000000000000021061333553357400220250ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MDTMode-Extension.h" /* * This type is implemented using S1AP_ProtocolIE_SingleContainer_6554P14, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_MDTMode_Extension_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_MDTMode_Extension = { "MDTMode-Extension", "MDTMode-Extension", &asn_OP_SEQUENCE, asn_DEF_S1AP_MDTMode_Extension_tags_1, sizeof(asn_DEF_S1AP_MDTMode_Extension_tags_1) /sizeof(asn_DEF_S1AP_MDTMode_Extension_tags_1[0]), /* 1 */ asn_DEF_S1AP_MDTMode_Extension_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MDTMode_Extension_tags_1) /sizeof(asn_DEF_S1AP_MDTMode_Extension_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_MDTMode_ExtensionIE_57, 3, /* Elements count */ &asn_SPC_S1AP_MDTMode_ExtensionIE_specs_57 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MDTMode-Extension.h000066400000000000000000000026171333553357400220410ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MDTMode_Extension_H_ #define _S1AP_MDTMode_Extension_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-SingleContainer.h" #ifdef __cplusplus extern "C" { #endif /* S1AP_MDTMode-Extension */ typedef S1AP_ProtocolIE_SingleContainer_6554P14_t S1AP_MDTMode_Extension_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MDTMode_Extension; asn_struct_free_f S1AP_MDTMode_Extension_free; asn_struct_print_f S1AP_MDTMode_Extension_print; asn_constr_check_f S1AP_MDTMode_Extension_constraint; ber_type_decoder_f S1AP_MDTMode_Extension_decode_ber; der_type_encoder_f S1AP_MDTMode_Extension_encode_der; xer_type_decoder_f S1AP_MDTMode_Extension_decode_xer; xer_type_encoder_f S1AP_MDTMode_Extension_encode_xer; oer_type_decoder_f S1AP_MDTMode_Extension_decode_oer; oer_type_encoder_f S1AP_MDTMode_Extension_encode_oer; per_type_decoder_f S1AP_MDTMode_Extension_decode_uper; per_type_encoder_f S1AP_MDTMode_Extension_encode_uper; per_type_decoder_f S1AP_MDTMode_Extension_decode_aper; per_type_encoder_f S1AP_MDTMode_Extension_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_MDTMode_Extension_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MDTMode.c000066400000000000000000000047051333553357400200620ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MDTMode.h" #include "S1AP_ImmediateMDT.h" #include "S1AP_LoggedMDT.h" #include "S1AP_MDTMode-Extension.h" static asn_oer_constraints_t asn_OER_type_S1AP_MDTMode_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_MDTMode_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_MDTMode_1[] = { { ATF_POINTER, 0, offsetof(struct S1AP_MDTMode, choice.immediateMDT), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ImmediateMDT, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "immediateMDT" }, { ATF_POINTER, 0, offsetof(struct S1AP_MDTMode, choice.loggedMDT), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_LoggedMDT, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "loggedMDT" }, { ATF_POINTER, 0, offsetof(struct S1AP_MDTMode, choice.mDTMode_Extension), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_MDTMode_Extension, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "mDTMode-Extension" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MDTMode_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* immediateMDT */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* loggedMDT */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* mDTMode-Extension */ }; asn_CHOICE_specifics_t asn_SPC_S1AP_MDTMode_specs_1 = { sizeof(struct S1AP_MDTMode), offsetof(struct S1AP_MDTMode, _asn_ctx), offsetof(struct S1AP_MDTMode, present), sizeof(((struct S1AP_MDTMode *)0)->present), asn_MAP_S1AP_MDTMode_tag2el_1, 3, /* Count of tags in the map */ 0, 0, 2 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MDTMode = { "MDTMode", "MDTMode", &asn_OP_CHOICE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { &asn_OER_type_S1AP_MDTMode_constr_1, &asn_PER_type_S1AP_MDTMode_constr_1, CHOICE_constraint }, asn_MBR_S1AP_MDTMode_1, 3, /* Elements count */ &asn_SPC_S1AP_MDTMode_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MDTMode.h000066400000000000000000000027601333553357400200660ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MDTMode_H_ #define _S1AP_MDTMode_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_MDTMode_PR { S1AP_MDTMode_PR_NOTHING, /* No components present */ S1AP_MDTMode_PR_immediateMDT, S1AP_MDTMode_PR_loggedMDT, /* Extensions may appear below */ S1AP_MDTMode_PR_mDTMode_Extension } S1AP_MDTMode_PR; /* Forward declarations */ struct S1AP_ImmediateMDT; struct S1AP_LoggedMDT; struct S1AP_MDTMode_Extension; /* S1AP_MDTMode */ typedef struct S1AP_MDTMode { S1AP_MDTMode_PR present; union S1AP_MDTMode_u { struct S1AP_ImmediateMDT *immediateMDT; struct S1AP_LoggedMDT *loggedMDT; /* * This type is extensible, * possible extensions are below. */ struct S1AP_MDTMode_Extension *mDTMode_Extension; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MDTMode_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MDTMode; extern asn_CHOICE_specifics_t asn_SPC_S1AP_MDTMode_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_MDTMode_1[3]; extern asn_per_constraints_t asn_PER_type_S1AP_MDTMode_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_MDTMode_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MDTPLMNList.c000066400000000000000000000032661333553357400206010ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MDTPLMNList.h" static asn_oer_constraints_t asn_OER_type_S1AP_MDTPLMNList_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..16)) */}; static asn_per_constraints_t asn_PER_type_S1AP_MDTPLMNList_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 4, 4, 1, 16 } /* (SIZE(1..16)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_MDTPLMNList_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_PLMNidentity, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_MDTPLMNList_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_S1AP_MDTPLMNList_specs_1 = { sizeof(struct S1AP_MDTPLMNList), offsetof(struct S1AP_MDTPLMNList, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MDTPLMNList = { "MDTPLMNList", "MDTPLMNList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_MDTPLMNList_tags_1, sizeof(asn_DEF_S1AP_MDTPLMNList_tags_1) /sizeof(asn_DEF_S1AP_MDTPLMNList_tags_1[0]), /* 1 */ asn_DEF_S1AP_MDTPLMNList_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MDTPLMNList_tags_1) /sizeof(asn_DEF_S1AP_MDTPLMNList_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_MDTPLMNList_constr_1, &asn_PER_type_S1AP_MDTPLMNList_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_MDTPLMNList_1, 1, /* Single element */ &asn_SPC_S1AP_MDTPLMNList_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MDTPLMNList.h000066400000000000000000000015211333553357400205760ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MDTPLMNList_H_ #define _S1AP_MDTPLMNList_H_ #include /* Including external dependencies */ #include "S1AP_PLMNidentity.h" #include #include #ifdef __cplusplus extern "C" { #endif /* S1AP_MDTPLMNList */ typedef struct S1AP_MDTPLMNList { A_SEQUENCE_OF(S1AP_PLMNidentity_t) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MDTPLMNList_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MDTPLMNList; #ifdef __cplusplus } #endif #endif /* _S1AP_MDTPLMNList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MME-Code.c000066400000000000000000000035201333553357400201110ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MME-Code.h" int S1AP_MME_Code_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } size = st->size; if((size == 1)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_MME_Code_constr_1 CC_NOTUSED = { { 0, 0 }, 1 /* (SIZE(1..1)) */}; asn_per_constraints_t asn_PER_type_S1AP_MME_Code_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 1, 1 } /* (SIZE(1..1)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_MME_Code_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_MME_Code = { "MME-Code", "MME-Code", &asn_OP_OCTET_STRING, asn_DEF_S1AP_MME_Code_tags_1, sizeof(asn_DEF_S1AP_MME_Code_tags_1) /sizeof(asn_DEF_S1AP_MME_Code_tags_1[0]), /* 1 */ asn_DEF_S1AP_MME_Code_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MME_Code_tags_1) /sizeof(asn_DEF_S1AP_MME_Code_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_MME_Code_constr_1, &asn_PER_type_S1AP_MME_Code_constr_1, S1AP_MME_Code_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MME-Code.h000066400000000000000000000023701333553357400201200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MME_Code_H_ #define _S1AP_MME_Code_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_MME-Code */ typedef OCTET_STRING_t S1AP_MME_Code_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_MME_Code_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_MME_Code; asn_struct_free_f S1AP_MME_Code_free; asn_struct_print_f S1AP_MME_Code_print; asn_constr_check_f S1AP_MME_Code_constraint; ber_type_decoder_f S1AP_MME_Code_decode_ber; der_type_encoder_f S1AP_MME_Code_encode_der; xer_type_decoder_f S1AP_MME_Code_decode_xer; xer_type_encoder_f S1AP_MME_Code_encode_xer; oer_type_decoder_f S1AP_MME_Code_decode_oer; oer_type_encoder_f S1AP_MME_Code_encode_oer; per_type_decoder_f S1AP_MME_Code_decode_uper; per_type_encoder_f S1AP_MME_Code_encode_uper; per_type_decoder_f S1AP_MME_Code_decode_aper; per_type_encoder_f S1AP_MME_Code_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_MME_Code_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MME-Group-ID.c000066400000000000000000000036241333553357400206320ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MME-Group-ID.h" int S1AP_MME_Group_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } size = st->size; if((size == 2)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_MME_Group_ID_constr_1 CC_NOTUSED = { { 0, 0 }, 2 /* (SIZE(2..2)) */}; asn_per_constraints_t asn_PER_type_S1AP_MME_Group_ID_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 2, 2 } /* (SIZE(2..2)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_MME_Group_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_MME_Group_ID = { "MME-Group-ID", "MME-Group-ID", &asn_OP_OCTET_STRING, asn_DEF_S1AP_MME_Group_ID_tags_1, sizeof(asn_DEF_S1AP_MME_Group_ID_tags_1) /sizeof(asn_DEF_S1AP_MME_Group_ID_tags_1[0]), /* 1 */ asn_DEF_S1AP_MME_Group_ID_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MME_Group_ID_tags_1) /sizeof(asn_DEF_S1AP_MME_Group_ID_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_MME_Group_ID_constr_1, &asn_PER_type_S1AP_MME_Group_ID_constr_1, S1AP_MME_Group_ID_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MME-Group-ID.h000066400000000000000000000025101333553357400206300ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MME_Group_ID_H_ #define _S1AP_MME_Group_ID_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_MME-Group-ID */ typedef OCTET_STRING_t S1AP_MME_Group_ID_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_MME_Group_ID_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_MME_Group_ID; asn_struct_free_f S1AP_MME_Group_ID_free; asn_struct_print_f S1AP_MME_Group_ID_print; asn_constr_check_f S1AP_MME_Group_ID_constraint; ber_type_decoder_f S1AP_MME_Group_ID_decode_ber; der_type_encoder_f S1AP_MME_Group_ID_encode_der; xer_type_decoder_f S1AP_MME_Group_ID_decode_xer; xer_type_encoder_f S1AP_MME_Group_ID_encode_xer; oer_type_decoder_f S1AP_MME_Group_ID_decode_oer; oer_type_encoder_f S1AP_MME_Group_ID_encode_oer; per_type_decoder_f S1AP_MME_Group_ID_decode_uper; per_type_encoder_f S1AP_MME_Group_ID_encode_uper; per_type_decoder_f S1AP_MME_Group_ID_decode_aper; per_type_encoder_f S1AP_MME_Group_ID_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_MME_Group_ID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MME-UE-S1AP-ID.c000066400000000000000000000035671333553357400205570ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MME-UE-S1AP-ID.h" int S1AP_MME_UE_S1AP_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } /* Constraint check succeeded */ return 0; } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_MME_UE_S1AP_ID_constr_1 CC_NOTUSED = { { 4, 1 } /* (0..4294967295) */, -1}; asn_per_constraints_t asn_PER_type_S1AP_MME_UE_S1AP_ID_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 32, -1, 0, 4294967295 } /* (0..4294967295) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_MME_UE_S1AP_ID_specs_1 = { 0, 0, 0, 0, 0, 0, /* Native long size */ 1 /* Unsigned representation */ }; static const ber_tlv_tag_t asn_DEF_S1AP_MME_UE_S1AP_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_MME_UE_S1AP_ID = { "MME-UE-S1AP-ID", "MME-UE-S1AP-ID", &asn_OP_NativeInteger, asn_DEF_S1AP_MME_UE_S1AP_ID_tags_1, sizeof(asn_DEF_S1AP_MME_UE_S1AP_ID_tags_1) /sizeof(asn_DEF_S1AP_MME_UE_S1AP_ID_tags_1[0]), /* 1 */ asn_DEF_S1AP_MME_UE_S1AP_ID_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MME_UE_S1AP_ID_tags_1) /sizeof(asn_DEF_S1AP_MME_UE_S1AP_ID_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_MME_UE_S1AP_ID_constr_1, &asn_PER_type_S1AP_MME_UE_S1AP_ID_constr_1, S1AP_MME_UE_S1AP_ID_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_MME_UE_S1AP_ID_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MME-UE-S1AP-ID.h000066400000000000000000000025641333553357400205600ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MME_UE_S1AP_ID_H_ #define _S1AP_MME_UE_S1AP_ID_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_MME-UE-S1AP-ID */ typedef unsigned long S1AP_MME_UE_S1AP_ID_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_MME_UE_S1AP_ID_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_MME_UE_S1AP_ID; extern const asn_INTEGER_specifics_t asn_SPC_MME_UE_S1AP_ID_specs_1; asn_struct_free_f MME_UE_S1AP_ID_free; asn_struct_print_f MME_UE_S1AP_ID_print; asn_constr_check_f MME_UE_S1AP_ID_constraint; ber_type_decoder_f MME_UE_S1AP_ID_decode_ber; der_type_encoder_f MME_UE_S1AP_ID_encode_der; xer_type_decoder_f MME_UE_S1AP_ID_decode_xer; xer_type_encoder_f MME_UE_S1AP_ID_encode_xer; oer_type_decoder_f MME_UE_S1AP_ID_decode_oer; oer_type_encoder_f MME_UE_S1AP_ID_encode_oer; per_type_decoder_f MME_UE_S1AP_ID_decode_uper; per_type_encoder_f MME_UE_S1AP_ID_encode_uper; per_type_decoder_f MME_UE_S1AP_ID_decode_aper; per_type_encoder_f MME_UE_S1AP_ID_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_MME_UE_S1AP_ID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MMECPRelocationIndication.c000066400000000000000000000036241333553357400235130ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MMECPRelocationIndication.h" asn_TYPE_member_t asn_MBR_S1AP_MMECPRelocationIndication_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMECPRelocationIndication, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P90, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_MMECPRelocationIndication_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MMECPRelocationIndication_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMECPRelocationIndication_specs_1 = { sizeof(struct S1AP_MMECPRelocationIndication), offsetof(struct S1AP_MMECPRelocationIndication, _asn_ctx), asn_MAP_S1AP_MMECPRelocationIndication_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MMECPRelocationIndication = { "MMECPRelocationIndication", "MMECPRelocationIndication", &asn_OP_SEQUENCE, asn_DEF_S1AP_MMECPRelocationIndication_tags_1, sizeof(asn_DEF_S1AP_MMECPRelocationIndication_tags_1) /sizeof(asn_DEF_S1AP_MMECPRelocationIndication_tags_1[0]), /* 1 */ asn_DEF_S1AP_MMECPRelocationIndication_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MMECPRelocationIndication_tags_1) /sizeof(asn_DEF_S1AP_MMECPRelocationIndication_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_MMECPRelocationIndication_1, 1, /* Elements count */ &asn_SPC_S1AP_MMECPRelocationIndication_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MMECPRelocationIndication.h000066400000000000000000000022141333553357400235120ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MMECPRelocationIndication_H_ #define _S1AP_MMECPRelocationIndication_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_MMECPRelocationIndication */ typedef struct S1AP_MMECPRelocationIndication { S1AP_ProtocolIE_Container_6551P90_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MMECPRelocationIndication_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MMECPRelocationIndication; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMECPRelocationIndication_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_MMECPRelocationIndication_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_MMECPRelocationIndication_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MMEConfigurationTransfer.c000066400000000000000000000036001333553357400234750ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MMEConfigurationTransfer.h" asn_TYPE_member_t asn_MBR_S1AP_MMEConfigurationTransfer_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationTransfer, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P68, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_MMEConfigurationTransfer_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MMEConfigurationTransfer_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEConfigurationTransfer_specs_1 = { sizeof(struct S1AP_MMEConfigurationTransfer), offsetof(struct S1AP_MMEConfigurationTransfer, _asn_ctx), asn_MAP_S1AP_MMEConfigurationTransfer_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MMEConfigurationTransfer = { "MMEConfigurationTransfer", "MMEConfigurationTransfer", &asn_OP_SEQUENCE, asn_DEF_S1AP_MMEConfigurationTransfer_tags_1, sizeof(asn_DEF_S1AP_MMEConfigurationTransfer_tags_1) /sizeof(asn_DEF_S1AP_MMEConfigurationTransfer_tags_1[0]), /* 1 */ asn_DEF_S1AP_MMEConfigurationTransfer_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MMEConfigurationTransfer_tags_1) /sizeof(asn_DEF_S1AP_MMEConfigurationTransfer_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_MMEConfigurationTransfer_1, 1, /* Elements count */ &asn_SPC_S1AP_MMEConfigurationTransfer_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MMEConfigurationTransfer.h000066400000000000000000000022031333553357400235000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MMEConfigurationTransfer_H_ #define _S1AP_MMEConfigurationTransfer_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_MMEConfigurationTransfer */ typedef struct S1AP_MMEConfigurationTransfer { S1AP_ProtocolIE_Container_6551P68_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MMEConfigurationTransfer_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MMEConfigurationTransfer; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEConfigurationTransfer_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_MMEConfigurationTransfer_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_MMEConfigurationTransfer_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MMEConfigurationUpdate.c000066400000000000000000000035301333553357400231350ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MMEConfigurationUpdate.h" asn_TYPE_member_t asn_MBR_S1AP_MMEConfigurationUpdate_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationUpdate, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P46, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_MMEConfigurationUpdate_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MMEConfigurationUpdate_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEConfigurationUpdate_specs_1 = { sizeof(struct S1AP_MMEConfigurationUpdate), offsetof(struct S1AP_MMEConfigurationUpdate, _asn_ctx), asn_MAP_S1AP_MMEConfigurationUpdate_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MMEConfigurationUpdate = { "MMEConfigurationUpdate", "MMEConfigurationUpdate", &asn_OP_SEQUENCE, asn_DEF_S1AP_MMEConfigurationUpdate_tags_1, sizeof(asn_DEF_S1AP_MMEConfigurationUpdate_tags_1) /sizeof(asn_DEF_S1AP_MMEConfigurationUpdate_tags_1[0]), /* 1 */ asn_DEF_S1AP_MMEConfigurationUpdate_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MMEConfigurationUpdate_tags_1) /sizeof(asn_DEF_S1AP_MMEConfigurationUpdate_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_MMEConfigurationUpdate_1, 1, /* Elements count */ &asn_SPC_S1AP_MMEConfigurationUpdate_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MMEConfigurationUpdate.h000066400000000000000000000021611333553357400231410ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MMEConfigurationUpdate_H_ #define _S1AP_MMEConfigurationUpdate_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_MMEConfigurationUpdate */ typedef struct S1AP_MMEConfigurationUpdate { S1AP_ProtocolIE_Container_6551P46_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MMEConfigurationUpdate_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MMEConfigurationUpdate; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEConfigurationUpdate_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_MMEConfigurationUpdate_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_MMEConfigurationUpdate_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MMEConfigurationUpdateAcknowledge.c000066400000000000000000000040641333553357400253040ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MMEConfigurationUpdateAcknowledge.h" asn_TYPE_member_t asn_MBR_S1AP_MMEConfigurationUpdateAcknowledge_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationUpdateAcknowledge, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P47, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_MMEConfigurationUpdateAcknowledge_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MMEConfigurationUpdateAcknowledge_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEConfigurationUpdateAcknowledge_specs_1 = { sizeof(struct S1AP_MMEConfigurationUpdateAcknowledge), offsetof(struct S1AP_MMEConfigurationUpdateAcknowledge, _asn_ctx), asn_MAP_S1AP_MMEConfigurationUpdateAcknowledge_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MMEConfigurationUpdateAcknowledge = { "MMEConfigurationUpdateAcknowledge", "MMEConfigurationUpdateAcknowledge", &asn_OP_SEQUENCE, asn_DEF_S1AP_MMEConfigurationUpdateAcknowledge_tags_1, sizeof(asn_DEF_S1AP_MMEConfigurationUpdateAcknowledge_tags_1) /sizeof(asn_DEF_S1AP_MMEConfigurationUpdateAcknowledge_tags_1[0]), /* 1 */ asn_DEF_S1AP_MMEConfigurationUpdateAcknowledge_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MMEConfigurationUpdateAcknowledge_tags_1) /sizeof(asn_DEF_S1AP_MMEConfigurationUpdateAcknowledge_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_MMEConfigurationUpdateAcknowledge_1, 1, /* Elements count */ &asn_SPC_S1AP_MMEConfigurationUpdateAcknowledge_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MMEConfigurationUpdateAcknowledge.h000066400000000000000000000023241333553357400253060ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MMEConfigurationUpdateAcknowledge_H_ #define _S1AP_MMEConfigurationUpdateAcknowledge_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_MMEConfigurationUpdateAcknowledge */ typedef struct S1AP_MMEConfigurationUpdateAcknowledge { S1AP_ProtocolIE_Container_6551P47_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MMEConfigurationUpdateAcknowledge_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MMEConfigurationUpdateAcknowledge; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEConfigurationUpdateAcknowledge_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_MMEConfigurationUpdateAcknowledge_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_MMEConfigurationUpdateAcknowledge_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MMEConfigurationUpdateFailure.c000066400000000000000000000037441333553357400244540ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MMEConfigurationUpdateFailure.h" asn_TYPE_member_t asn_MBR_S1AP_MMEConfigurationUpdateFailure_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationUpdateFailure, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P48, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_MMEConfigurationUpdateFailure_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MMEConfigurationUpdateFailure_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEConfigurationUpdateFailure_specs_1 = { sizeof(struct S1AP_MMEConfigurationUpdateFailure), offsetof(struct S1AP_MMEConfigurationUpdateFailure, _asn_ctx), asn_MAP_S1AP_MMEConfigurationUpdateFailure_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MMEConfigurationUpdateFailure = { "MMEConfigurationUpdateFailure", "MMEConfigurationUpdateFailure", &asn_OP_SEQUENCE, asn_DEF_S1AP_MMEConfigurationUpdateFailure_tags_1, sizeof(asn_DEF_S1AP_MMEConfigurationUpdateFailure_tags_1) /sizeof(asn_DEF_S1AP_MMEConfigurationUpdateFailure_tags_1[0]), /* 1 */ asn_DEF_S1AP_MMEConfigurationUpdateFailure_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MMEConfigurationUpdateFailure_tags_1) /sizeof(asn_DEF_S1AP_MMEConfigurationUpdateFailure_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_MMEConfigurationUpdateFailure_1, 1, /* Elements count */ &asn_SPC_S1AP_MMEConfigurationUpdateFailure_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MMEConfigurationUpdateFailure.h000066400000000000000000000022601333553357400244510ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MMEConfigurationUpdateFailure_H_ #define _S1AP_MMEConfigurationUpdateFailure_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_MMEConfigurationUpdateFailure */ typedef struct S1AP_MMEConfigurationUpdateFailure { S1AP_ProtocolIE_Container_6551P48_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MMEConfigurationUpdateFailure_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MMEConfigurationUpdateFailure; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEConfigurationUpdateFailure_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_MMEConfigurationUpdateFailure_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_MMEConfigurationUpdateFailure_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MMEDirectInformationTransfer.c000066400000000000000000000037201333553357400243110ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MMEDirectInformationTransfer.h" asn_TYPE_member_t asn_MBR_S1AP_MMEDirectInformationTransfer_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEDirectInformationTransfer, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P66, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_MMEDirectInformationTransfer_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MMEDirectInformationTransfer_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEDirectInformationTransfer_specs_1 = { sizeof(struct S1AP_MMEDirectInformationTransfer), offsetof(struct S1AP_MMEDirectInformationTransfer, _asn_ctx), asn_MAP_S1AP_MMEDirectInformationTransfer_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MMEDirectInformationTransfer = { "MMEDirectInformationTransfer", "MMEDirectInformationTransfer", &asn_OP_SEQUENCE, asn_DEF_S1AP_MMEDirectInformationTransfer_tags_1, sizeof(asn_DEF_S1AP_MMEDirectInformationTransfer_tags_1) /sizeof(asn_DEF_S1AP_MMEDirectInformationTransfer_tags_1[0]), /* 1 */ asn_DEF_S1AP_MMEDirectInformationTransfer_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MMEDirectInformationTransfer_tags_1) /sizeof(asn_DEF_S1AP_MMEDirectInformationTransfer_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_MMEDirectInformationTransfer_1, 1, /* Elements count */ &asn_SPC_S1AP_MMEDirectInformationTransfer_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MMEDirectInformationTransfer.h000066400000000000000000000022471333553357400243210ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MMEDirectInformationTransfer_H_ #define _S1AP_MMEDirectInformationTransfer_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_MMEDirectInformationTransfer */ typedef struct S1AP_MMEDirectInformationTransfer { S1AP_ProtocolIE_Container_6551P66_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MMEDirectInformationTransfer_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MMEDirectInformationTransfer; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEDirectInformationTransfer_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_MMEDirectInformationTransfer_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_MMEDirectInformationTransfer_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MMEPagingTarget.c000066400000000000000000000043161333553357400215420ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MMEPagingTarget.h" #include "S1AP_Global-ENB-ID.h" #include "S1AP_TAI.h" static asn_oer_constraints_t asn_OER_type_S1AP_MMEPagingTarget_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_MMEPagingTarget_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_MMEPagingTarget_1[] = { { ATF_POINTER, 0, offsetof(struct S1AP_MMEPagingTarget, choice.global_ENB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Global_ENB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "global-ENB-ID" }, { ATF_POINTER, 0, offsetof(struct S1AP_MMEPagingTarget, choice.tAI), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "tAI" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MMEPagingTarget_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* global-ENB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* tAI */ }; asn_CHOICE_specifics_t asn_SPC_S1AP_MMEPagingTarget_specs_1 = { sizeof(struct S1AP_MMEPagingTarget), offsetof(struct S1AP_MMEPagingTarget, _asn_ctx), offsetof(struct S1AP_MMEPagingTarget, present), sizeof(((struct S1AP_MMEPagingTarget *)0)->present), asn_MAP_S1AP_MMEPagingTarget_tag2el_1, 2, /* Count of tags in the map */ 0, 0, 2 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MMEPagingTarget = { "MMEPagingTarget", "MMEPagingTarget", &asn_OP_CHOICE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { &asn_OER_type_S1AP_MMEPagingTarget_constr_1, &asn_PER_type_S1AP_MMEPagingTarget_constr_1, CHOICE_constraint }, asn_MBR_S1AP_MMEPagingTarget_1, 2, /* Elements count */ &asn_SPC_S1AP_MMEPagingTarget_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MMEPagingTarget.h000066400000000000000000000027571333553357400215560ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MMEPagingTarget_H_ #define _S1AP_MMEPagingTarget_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_MMEPagingTarget_PR { S1AP_MMEPagingTarget_PR_NOTHING, /* No components present */ S1AP_MMEPagingTarget_PR_global_ENB_ID, S1AP_MMEPagingTarget_PR_tAI /* Extensions may appear below */ } S1AP_MMEPagingTarget_PR; /* Forward declarations */ struct S1AP_Global_ENB_ID; struct S1AP_TAI; /* S1AP_MMEPagingTarget */ typedef struct S1AP_MMEPagingTarget { S1AP_MMEPagingTarget_PR present; union S1AP_MMEPagingTarget_u { struct S1AP_Global_ENB_ID *global_ENB_ID; struct S1AP_TAI *tAI; /* * This type is extensible, * possible extensions are below. */ } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MMEPagingTarget_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MMEPagingTarget; extern asn_CHOICE_specifics_t asn_SPC_S1AP_MMEPagingTarget_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_MMEPagingTarget_1[2]; extern asn_per_constraints_t asn_PER_type_S1AP_MMEPagingTarget_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_MMEPagingTarget_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MMERelaySupportIndicator.c000066400000000000000000000043341333553357400234740ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MMERelaySupportIndicator.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_MMERelaySupportIndicator_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_MMERelaySupportIndicator_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_MMERelaySupportIndicator_value2enum_1[] = { { 0, 4, "true" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_MMERelaySupportIndicator_enum2value_1[] = { 0 /* true(0) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_MMERelaySupportIndicator_specs_1 = { asn_MAP_S1AP_MMERelaySupportIndicator_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_MMERelaySupportIndicator_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_MMERelaySupportIndicator_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_MMERelaySupportIndicator = { "MMERelaySupportIndicator", "MMERelaySupportIndicator", &asn_OP_NativeEnumerated, asn_DEF_S1AP_MMERelaySupportIndicator_tags_1, sizeof(asn_DEF_S1AP_MMERelaySupportIndicator_tags_1) /sizeof(asn_DEF_S1AP_MMERelaySupportIndicator_tags_1[0]), /* 1 */ asn_DEF_S1AP_MMERelaySupportIndicator_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MMERelaySupportIndicator_tags_1) /sizeof(asn_DEF_S1AP_MMERelaySupportIndicator_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_MMERelaySupportIndicator_constr_1, &asn_PER_type_S1AP_MMERelaySupportIndicator_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_MMERelaySupportIndicator_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MMERelaySupportIndicator.h000066400000000000000000000032231333553357400234750ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MMERelaySupportIndicator_H_ #define _S1AP_MMERelaySupportIndicator_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_MMERelaySupportIndicator { S1AP_MMERelaySupportIndicator_true = 0 /* * Enumeration is extensible */ } e_S1AP_MMERelaySupportIndicator; /* S1AP_MMERelaySupportIndicator */ typedef long S1AP_MMERelaySupportIndicator_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MMERelaySupportIndicator; asn_struct_free_f S1AP_MMERelaySupportIndicator_free; asn_struct_print_f S1AP_MMERelaySupportIndicator_print; asn_constr_check_f S1AP_MMERelaySupportIndicator_constraint; ber_type_decoder_f S1AP_MMERelaySupportIndicator_decode_ber; der_type_encoder_f S1AP_MMERelaySupportIndicator_encode_der; xer_type_decoder_f S1AP_MMERelaySupportIndicator_decode_xer; xer_type_encoder_f S1AP_MMERelaySupportIndicator_encode_xer; oer_type_decoder_f S1AP_MMERelaySupportIndicator_decode_oer; oer_type_encoder_f S1AP_MMERelaySupportIndicator_encode_oer; per_type_decoder_f S1AP_MMERelaySupportIndicator_decode_uper; per_type_encoder_f S1AP_MMERelaySupportIndicator_encode_uper; per_type_decoder_f S1AP_MMERelaySupportIndicator_decode_aper; per_type_encoder_f S1AP_MMERelaySupportIndicator_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_MMERelaySupportIndicator_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MMEStatusTransfer.c000066400000000000000000000033641333553357400221600ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MMEStatusTransfer.h" asn_TYPE_member_t asn_MBR_S1AP_MMEStatusTransfer_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEStatusTransfer, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P53, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_MMEStatusTransfer_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MMEStatusTransfer_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEStatusTransfer_specs_1 = { sizeof(struct S1AP_MMEStatusTransfer), offsetof(struct S1AP_MMEStatusTransfer, _asn_ctx), asn_MAP_S1AP_MMEStatusTransfer_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MMEStatusTransfer = { "MMEStatusTransfer", "MMEStatusTransfer", &asn_OP_SEQUENCE, asn_DEF_S1AP_MMEStatusTransfer_tags_1, sizeof(asn_DEF_S1AP_MMEStatusTransfer_tags_1) /sizeof(asn_DEF_S1AP_MMEStatusTransfer_tags_1[0]), /* 1 */ asn_DEF_S1AP_MMEStatusTransfer_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MMEStatusTransfer_tags_1) /sizeof(asn_DEF_S1AP_MMEStatusTransfer_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_MMEStatusTransfer_1, 1, /* Elements count */ &asn_SPC_S1AP_MMEStatusTransfer_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MMEStatusTransfer.h000066400000000000000000000021041333553357400221540ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MMEStatusTransfer_H_ #define _S1AP_MMEStatusTransfer_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_MMEStatusTransfer */ typedef struct S1AP_MMEStatusTransfer { S1AP_ProtocolIE_Container_6551P53_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MMEStatusTransfer_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MMEStatusTransfer; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEStatusTransfer_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_MMEStatusTransfer_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_MMEStatusTransfer_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MMEname.c000066400000000000000000000073131333553357400201060ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MMEname.h" static const int permitted_alphabet_table_1[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* */ 1, 0, 0, 0, 0, 0, 0, 2, 3, 4, 0, 5, 6, 7, 8, 9, /* . '() +,-./ */ 10,11,12,13,14,15,16,17,18,19,20, 0, 0,21, 0,22, /* 0123456789: = ? */ 0,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37, /* ABCDEFGHIJKLMNO */ 38,39,40,41,42,43,44,45,46,47,48, 0, 0, 0, 0, 0, /* PQRSTUVWXYZ */ 0,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63, /* abcdefghijklmno */ 64,65,66,67,68,69,70,71,72,73,74, 0, 0, 0, 0, 0, /* pqrstuvwxyz */ }; static const int permitted_alphabet_code2value_1[74] = { 32,39,40,41,43,44,45,46,47,48,49,50,51,52,53,54, 55,56,57,58,61,63,65,66,67,68,69,70,71,72,73,74, 75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90, 97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112, 113,114,115,116,117,118,119,120,121,122,}; static int check_permitted_alphabet_1(const void *sptr) { const int *table = permitted_alphabet_table_1; /* The underlying type is PrintableString */ const PrintableString_t *st = (const PrintableString_t *)sptr; const uint8_t *ch = st->buf; const uint8_t *end = ch + st->size; for(; ch < end; ch++) { uint8_t cv = *ch; if(!table[cv]) return -1; } return 0; } int S1AP_MMEname_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const PrintableString_t *st = (const PrintableString_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } size = st->size; if((size >= 1 && size <= 150) && !check_permitted_alphabet_1(st)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int asn_PER_MAP_S1AP_MMEname_1_v2c(unsigned int value) { if(value >= sizeof(permitted_alphabet_table_1)/sizeof(permitted_alphabet_table_1[0])) return -1; return permitted_alphabet_table_1[value] - 1; } static int asn_PER_MAP_S1AP_MMEname_1_c2v(unsigned int code) { if(code >= sizeof(permitted_alphabet_code2value_1)/sizeof(permitted_alphabet_code2value_1[0])) return -1; return permitted_alphabet_code2value_1[code]; } /* * This type is implemented using PrintableString, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_MMEname_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..MAX)) */}; static asn_per_constraints_t asn_PER_type_S1AP_MMEname_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 7, 7, 32, 122 } /* (32..122) */, { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 150 } /* (SIZE(1..150,...)) */, asn_PER_MAP_S1AP_MMEname_1_v2c, /* Value to PER code map */ asn_PER_MAP_S1AP_MMEname_1_c2v /* PER code to value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_MMEname_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_MMEname = { "MMEname", "MMEname", &asn_OP_PrintableString, asn_DEF_S1AP_MMEname_tags_1, sizeof(asn_DEF_S1AP_MMEname_tags_1) /sizeof(asn_DEF_S1AP_MMEname_tags_1[0]), /* 1 */ asn_DEF_S1AP_MMEname_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MMEname_tags_1) /sizeof(asn_DEF_S1AP_MMEname_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_MMEname_constr_1, &asn_PER_type_S1AP_MMEname_constr_1, S1AP_MMEname_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MMEname.h000066400000000000000000000022511333553357400201070ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MMEname_H_ #define _S1AP_MMEname_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_MMEname */ typedef PrintableString_t S1AP_MMEname_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MMEname; asn_struct_free_f S1AP_MMEname_free; asn_struct_print_f S1AP_MMEname_print; asn_constr_check_f S1AP_MMEname_constraint; ber_type_decoder_f S1AP_MMEname_decode_ber; der_type_encoder_f S1AP_MMEname_encode_der; xer_type_decoder_f S1AP_MMEname_decode_xer; xer_type_encoder_f S1AP_MMEname_encode_xer; oer_type_decoder_f S1AP_MMEname_decode_oer; oer_type_encoder_f S1AP_MMEname_encode_oer; per_type_decoder_f S1AP_MMEname_decode_uper; per_type_encoder_f S1AP_MMEname_encode_uper; per_type_decoder_f S1AP_MMEname_decode_aper; per_type_encoder_f S1AP_MMEname_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_MMEname_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MSClassmark2.c000066400000000000000000000017051333553357400210700ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MSClassmark2.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_MSClassmark2_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_MSClassmark2 = { "MSClassmark2", "MSClassmark2", &asn_OP_OCTET_STRING, asn_DEF_S1AP_MSClassmark2_tags_1, sizeof(asn_DEF_S1AP_MSClassmark2_tags_1) /sizeof(asn_DEF_S1AP_MSClassmark2_tags_1[0]), /* 1 */ asn_DEF_S1AP_MSClassmark2_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MSClassmark2_tags_1) /sizeof(asn_DEF_S1AP_MSClassmark2_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MSClassmark2.h000066400000000000000000000024021333553357400210700ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MSClassmark2_H_ #define _S1AP_MSClassmark2_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_MSClassmark2 */ typedef OCTET_STRING_t S1AP_MSClassmark2_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MSClassmark2; asn_struct_free_f S1AP_MSClassmark2_free; asn_struct_print_f S1AP_MSClassmark2_print; asn_constr_check_f S1AP_MSClassmark2_constraint; ber_type_decoder_f S1AP_MSClassmark2_decode_ber; der_type_encoder_f S1AP_MSClassmark2_encode_der; xer_type_decoder_f S1AP_MSClassmark2_decode_xer; xer_type_encoder_f S1AP_MSClassmark2_encode_xer; oer_type_decoder_f S1AP_MSClassmark2_decode_oer; oer_type_encoder_f S1AP_MSClassmark2_encode_oer; per_type_decoder_f S1AP_MSClassmark2_decode_uper; per_type_encoder_f S1AP_MSClassmark2_encode_uper; per_type_decoder_f S1AP_MSClassmark2_decode_aper; per_type_encoder_f S1AP_MSClassmark2_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_MSClassmark2_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MSClassmark3.c000066400000000000000000000017051333553357400210710ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MSClassmark3.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_MSClassmark3_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_MSClassmark3 = { "MSClassmark3", "MSClassmark3", &asn_OP_OCTET_STRING, asn_DEF_S1AP_MSClassmark3_tags_1, sizeof(asn_DEF_S1AP_MSClassmark3_tags_1) /sizeof(asn_DEF_S1AP_MSClassmark3_tags_1[0]), /* 1 */ asn_DEF_S1AP_MSClassmark3_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MSClassmark3_tags_1) /sizeof(asn_DEF_S1AP_MSClassmark3_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MSClassmark3.h000066400000000000000000000024021333553357400210710ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MSClassmark3_H_ #define _S1AP_MSClassmark3_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_MSClassmark3 */ typedef OCTET_STRING_t S1AP_MSClassmark3_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MSClassmark3; asn_struct_free_f S1AP_MSClassmark3_free; asn_struct_print_f S1AP_MSClassmark3_print; asn_constr_check_f S1AP_MSClassmark3_constraint; ber_type_decoder_f S1AP_MSClassmark3_decode_ber; der_type_encoder_f S1AP_MSClassmark3_encode_der; xer_type_decoder_f S1AP_MSClassmark3_decode_xer; xer_type_encoder_f S1AP_MSClassmark3_encode_xer; oer_type_decoder_f S1AP_MSClassmark3_decode_oer; oer_type_encoder_f S1AP_MSClassmark3_encode_oer; per_type_decoder_f S1AP_MSClassmark3_decode_uper; per_type_encoder_f S1AP_MSClassmark3_encode_uper; per_type_decoder_f S1AP_MSClassmark3_decode_aper; per_type_encoder_f S1AP_MSClassmark3_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_MSClassmark3_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ManagementBasedMDTAllowed.c000066400000000000000000000043671333553357400235250ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ManagementBasedMDTAllowed.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_ManagementBasedMDTAllowed_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_ManagementBasedMDTAllowed_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_ManagementBasedMDTAllowed_value2enum_1[] = { { 0, 7, "allowed" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_ManagementBasedMDTAllowed_enum2value_1[] = { 0 /* allowed(0) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_ManagementBasedMDTAllowed_specs_1 = { asn_MAP_S1AP_ManagementBasedMDTAllowed_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_ManagementBasedMDTAllowed_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_ManagementBasedMDTAllowed_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ManagementBasedMDTAllowed = { "ManagementBasedMDTAllowed", "ManagementBasedMDTAllowed", &asn_OP_NativeEnumerated, asn_DEF_S1AP_ManagementBasedMDTAllowed_tags_1, sizeof(asn_DEF_S1AP_ManagementBasedMDTAllowed_tags_1) /sizeof(asn_DEF_S1AP_ManagementBasedMDTAllowed_tags_1[0]), /* 1 */ asn_DEF_S1AP_ManagementBasedMDTAllowed_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ManagementBasedMDTAllowed_tags_1) /sizeof(asn_DEF_S1AP_ManagementBasedMDTAllowed_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ManagementBasedMDTAllowed_constr_1, &asn_PER_type_S1AP_ManagementBasedMDTAllowed_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_ManagementBasedMDTAllowed_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ManagementBasedMDTAllowed.h000066400000000000000000000032541333553357400235240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ManagementBasedMDTAllowed_H_ #define _S1AP_ManagementBasedMDTAllowed_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_ManagementBasedMDTAllowed { S1AP_ManagementBasedMDTAllowed_allowed = 0 /* * Enumeration is extensible */ } e_S1AP_ManagementBasedMDTAllowed; /* S1AP_ManagementBasedMDTAllowed */ typedef long S1AP_ManagementBasedMDTAllowed_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ManagementBasedMDTAllowed; asn_struct_free_f S1AP_ManagementBasedMDTAllowed_free; asn_struct_print_f S1AP_ManagementBasedMDTAllowed_print; asn_constr_check_f S1AP_ManagementBasedMDTAllowed_constraint; ber_type_decoder_f S1AP_ManagementBasedMDTAllowed_decode_ber; der_type_encoder_f S1AP_ManagementBasedMDTAllowed_encode_der; xer_type_decoder_f S1AP_ManagementBasedMDTAllowed_decode_xer; xer_type_encoder_f S1AP_ManagementBasedMDTAllowed_encode_xer; oer_type_decoder_f S1AP_ManagementBasedMDTAllowed_decode_oer; oer_type_encoder_f S1AP_ManagementBasedMDTAllowed_encode_oer; per_type_decoder_f S1AP_ManagementBasedMDTAllowed_decode_uper; per_type_encoder_f S1AP_ManagementBasedMDTAllowed_encode_uper; per_type_decoder_f S1AP_ManagementBasedMDTAllowed_decode_aper; per_type_encoder_f S1AP_ManagementBasedMDTAllowed_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_ManagementBasedMDTAllowed_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Masked-IMEISV.c000066400000000000000000000040141333553357400210200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Masked-IMEISV.h" int S1AP_Masked_IMEISV_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 64)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_Masked_IMEISV_constr_1 CC_NOTUSED = { { 0, 0 }, 64 /* (SIZE(64..64)) */}; static asn_per_constraints_t asn_PER_type_S1AP_Masked_IMEISV_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 64, 64 } /* (SIZE(64..64)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_Masked_IMEISV_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Masked_IMEISV = { "Masked-IMEISV", "Masked-IMEISV", &asn_OP_BIT_STRING, asn_DEF_S1AP_Masked_IMEISV_tags_1, sizeof(asn_DEF_S1AP_Masked_IMEISV_tags_1) /sizeof(asn_DEF_S1AP_Masked_IMEISV_tags_1[0]), /* 1 */ asn_DEF_S1AP_Masked_IMEISV_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Masked_IMEISV_tags_1) /sizeof(asn_DEF_S1AP_Masked_IMEISV_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_Masked_IMEISV_constr_1, &asn_PER_type_S1AP_Masked_IMEISV_constr_1, S1AP_Masked_IMEISV_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Masked-IMEISV.h000066400000000000000000000024211333553357400210250ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Masked_IMEISV_H_ #define _S1AP_Masked_IMEISV_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_Masked-IMEISV */ typedef BIT_STRING_t S1AP_Masked_IMEISV_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Masked_IMEISV; asn_struct_free_f S1AP_Masked_IMEISV_free; asn_struct_print_f S1AP_Masked_IMEISV_print; asn_constr_check_f S1AP_Masked_IMEISV_constraint; ber_type_decoder_f S1AP_Masked_IMEISV_decode_ber; der_type_encoder_f S1AP_Masked_IMEISV_encode_der; xer_type_decoder_f S1AP_Masked_IMEISV_decode_xer; xer_type_encoder_f S1AP_Masked_IMEISV_encode_xer; oer_type_decoder_f S1AP_Masked_IMEISV_decode_oer; oer_type_encoder_f S1AP_Masked_IMEISV_encode_oer; per_type_decoder_f S1AP_Masked_IMEISV_decode_uper; per_type_encoder_f S1AP_Masked_IMEISV_encode_uper; per_type_decoder_f S1AP_Masked_IMEISV_decode_aper; per_type_encoder_f S1AP_Masked_IMEISV_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Masked_IMEISV_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MeasurementThresholdA2.c000066400000000000000000000045241333553357400231550ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MeasurementThresholdA2.h" static asn_oer_constraints_t asn_OER_type_S1AP_MeasurementThresholdA2_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_MeasurementThresholdA2_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_MeasurementThresholdA2_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MeasurementThresholdA2, choice.threshold_RSRP), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Threshold_RSRP, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "threshold-RSRP" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_MeasurementThresholdA2, choice.threshold_RSRQ), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Threshold_RSRQ, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "threshold-RSRQ" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MeasurementThresholdA2_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* threshold-RSRP */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* threshold-RSRQ */ }; asn_CHOICE_specifics_t asn_SPC_S1AP_MeasurementThresholdA2_specs_1 = { sizeof(struct S1AP_MeasurementThresholdA2), offsetof(struct S1AP_MeasurementThresholdA2, _asn_ctx), offsetof(struct S1AP_MeasurementThresholdA2, present), sizeof(((struct S1AP_MeasurementThresholdA2 *)0)->present), asn_MAP_S1AP_MeasurementThresholdA2_tag2el_1, 2, /* Count of tags in the map */ 0, 0, 2 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MeasurementThresholdA2 = { "MeasurementThresholdA2", "MeasurementThresholdA2", &asn_OP_CHOICE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { &asn_OER_type_S1AP_MeasurementThresholdA2_constr_1, &asn_PER_type_S1AP_MeasurementThresholdA2_constr_1, CHOICE_constraint }, asn_MBR_S1AP_MeasurementThresholdA2_1, 2, /* Elements count */ &asn_SPC_S1AP_MeasurementThresholdA2_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MeasurementThresholdA2.h000066400000000000000000000031721333553357400231600ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MeasurementThresholdA2_H_ #define _S1AP_MeasurementThresholdA2_H_ #include /* Including external dependencies */ #include "S1AP_Threshold-RSRP.h" #include "S1AP_Threshold-RSRQ.h" #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_MeasurementThresholdA2_PR { S1AP_MeasurementThresholdA2_PR_NOTHING, /* No components present */ S1AP_MeasurementThresholdA2_PR_threshold_RSRP, S1AP_MeasurementThresholdA2_PR_threshold_RSRQ /* Extensions may appear below */ } S1AP_MeasurementThresholdA2_PR; /* S1AP_MeasurementThresholdA2 */ typedef struct S1AP_MeasurementThresholdA2 { S1AP_MeasurementThresholdA2_PR present; union S1AP_MeasurementThresholdA2_u { S1AP_Threshold_RSRP_t threshold_RSRP; S1AP_Threshold_RSRQ_t threshold_RSRQ; /* * This type is extensible, * possible extensions are below. */ } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MeasurementThresholdA2_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MeasurementThresholdA2; extern asn_CHOICE_specifics_t asn_SPC_S1AP_MeasurementThresholdA2_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_MeasurementThresholdA2_1[2]; extern asn_per_constraints_t asn_PER_type_S1AP_MeasurementThresholdA2_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_MeasurementThresholdA2_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MeasurementsToActivate.c000066400000000000000000000042261333553357400232630ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MeasurementsToActivate.h" int S1AP_MeasurementsToActivate_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 8)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_MeasurementsToActivate_constr_1 CC_NOTUSED = { { 0, 0 }, 8 /* (SIZE(8..8)) */}; asn_per_constraints_t asn_PER_type_S1AP_MeasurementsToActivate_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 8, 8 } /* (SIZE(8..8)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_MeasurementsToActivate_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_MeasurementsToActivate = { "MeasurementsToActivate", "MeasurementsToActivate", &asn_OP_BIT_STRING, asn_DEF_S1AP_MeasurementsToActivate_tags_1, sizeof(asn_DEF_S1AP_MeasurementsToActivate_tags_1) /sizeof(asn_DEF_S1AP_MeasurementsToActivate_tags_1[0]), /* 1 */ asn_DEF_S1AP_MeasurementsToActivate_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MeasurementsToActivate_tags_1) /sizeof(asn_DEF_S1AP_MeasurementsToActivate_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_MeasurementsToActivate_constr_1, &asn_PER_type_S1AP_MeasurementsToActivate_constr_1, S1AP_MeasurementsToActivate_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MeasurementsToActivate.h000066400000000000000000000030141333553357400232620ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MeasurementsToActivate_H_ #define _S1AP_MeasurementsToActivate_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_MeasurementsToActivate */ typedef BIT_STRING_t S1AP_MeasurementsToActivate_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_MeasurementsToActivate_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_MeasurementsToActivate; asn_struct_free_f S1AP_MeasurementsToActivate_free; asn_struct_print_f S1AP_MeasurementsToActivate_print; asn_constr_check_f S1AP_MeasurementsToActivate_constraint; ber_type_decoder_f S1AP_MeasurementsToActivate_decode_ber; der_type_encoder_f S1AP_MeasurementsToActivate_encode_der; xer_type_decoder_f S1AP_MeasurementsToActivate_decode_xer; xer_type_encoder_f S1AP_MeasurementsToActivate_encode_xer; oer_type_decoder_f S1AP_MeasurementsToActivate_decode_oer; oer_type_encoder_f S1AP_MeasurementsToActivate_encode_oer; per_type_decoder_f S1AP_MeasurementsToActivate_decode_uper; per_type_encoder_f S1AP_MeasurementsToActivate_encode_uper; per_type_decoder_f S1AP_MeasurementsToActivate_decode_aper; per_type_encoder_f S1AP_MeasurementsToActivate_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_MeasurementsToActivate_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MessageIdentifier.c000066400000000000000000000041201333553357400222070ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MessageIdentifier.h" int S1AP_MessageIdentifier_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 16)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_MessageIdentifier_constr_1 CC_NOTUSED = { { 0, 0 }, 16 /* (SIZE(16..16)) */}; static asn_per_constraints_t asn_PER_type_S1AP_MessageIdentifier_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_MessageIdentifier_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_MessageIdentifier = { "MessageIdentifier", "MessageIdentifier", &asn_OP_BIT_STRING, asn_DEF_S1AP_MessageIdentifier_tags_1, sizeof(asn_DEF_S1AP_MessageIdentifier_tags_1) /sizeof(asn_DEF_S1AP_MessageIdentifier_tags_1[0]), /* 1 */ asn_DEF_S1AP_MessageIdentifier_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MessageIdentifier_tags_1) /sizeof(asn_DEF_S1AP_MessageIdentifier_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_MessageIdentifier_constr_1, &asn_PER_type_S1AP_MessageIdentifier_constr_1, S1AP_MessageIdentifier_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MessageIdentifier.h000066400000000000000000000025351333553357400222240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MessageIdentifier_H_ #define _S1AP_MessageIdentifier_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_MessageIdentifier */ typedef BIT_STRING_t S1AP_MessageIdentifier_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MessageIdentifier; asn_struct_free_f S1AP_MessageIdentifier_free; asn_struct_print_f S1AP_MessageIdentifier_print; asn_constr_check_f S1AP_MessageIdentifier_constraint; ber_type_decoder_f S1AP_MessageIdentifier_decode_ber; der_type_encoder_f S1AP_MessageIdentifier_encode_der; xer_type_decoder_f S1AP_MessageIdentifier_decode_xer; xer_type_encoder_f S1AP_MessageIdentifier_encode_xer; oer_type_decoder_f S1AP_MessageIdentifier_decode_oer; oer_type_encoder_f S1AP_MessageIdentifier_encode_oer; per_type_decoder_f S1AP_MessageIdentifier_decode_uper; per_type_encoder_f S1AP_MessageIdentifier_encode_uper; per_type_decoder_f S1AP_MessageIdentifier_decode_aper; per_type_encoder_f S1AP_MessageIdentifier_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_MessageIdentifier_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MobilityInformation.c000066400000000000000000000041621333553357400226240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MobilityInformation.h" int S1AP_MobilityInformation_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 32)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_MobilityInformation_constr_1 CC_NOTUSED = { { 0, 0 }, 32 /* (SIZE(32..32)) */}; static asn_per_constraints_t asn_PER_type_S1AP_MobilityInformation_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 32, 32 } /* (SIZE(32..32)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_MobilityInformation_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_MobilityInformation = { "MobilityInformation", "MobilityInformation", &asn_OP_BIT_STRING, asn_DEF_S1AP_MobilityInformation_tags_1, sizeof(asn_DEF_S1AP_MobilityInformation_tags_1) /sizeof(asn_DEF_S1AP_MobilityInformation_tags_1[0]), /* 1 */ asn_DEF_S1AP_MobilityInformation_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MobilityInformation_tags_1) /sizeof(asn_DEF_S1AP_MobilityInformation_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_MobilityInformation_constr_1, &asn_PER_type_S1AP_MobilityInformation_constr_1, S1AP_MobilityInformation_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MobilityInformation.h000066400000000000000000000026031333553357400226270ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MobilityInformation_H_ #define _S1AP_MobilityInformation_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_MobilityInformation */ typedef BIT_STRING_t S1AP_MobilityInformation_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MobilityInformation; asn_struct_free_f S1AP_MobilityInformation_free; asn_struct_print_f S1AP_MobilityInformation_print; asn_constr_check_f S1AP_MobilityInformation_constraint; ber_type_decoder_f S1AP_MobilityInformation_decode_ber; der_type_encoder_f S1AP_MobilityInformation_encode_der; xer_type_decoder_f S1AP_MobilityInformation_decode_xer; xer_type_encoder_f S1AP_MobilityInformation_encode_xer; oer_type_decoder_f S1AP_MobilityInformation_decode_oer; oer_type_encoder_f S1AP_MobilityInformation_encode_oer; per_type_decoder_f S1AP_MobilityInformation_decode_uper; per_type_encoder_f S1AP_MobilityInformation_encode_uper; per_type_decoder_f S1AP_MobilityInformation_decode_aper; per_type_encoder_f S1AP_MobilityInformation_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_MobilityInformation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MutingAvailabilityIndication.c000066400000000000000000000045561333553357400244350ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MutingAvailabilityIndication.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_MutingAvailabilityIndication_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_MutingAvailabilityIndication_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_MutingAvailabilityIndication_value2enum_1[] = { { 0, 9, "available" }, { 1, 11, "unavailable" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_MutingAvailabilityIndication_enum2value_1[] = { 0, /* available(0) */ 1 /* unavailable(1) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_MutingAvailabilityIndication_specs_1 = { asn_MAP_S1AP_MutingAvailabilityIndication_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_MutingAvailabilityIndication_enum2value_1, /* N => "tag"; sorted by N */ 2, /* Number of elements in the maps */ 3, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_MutingAvailabilityIndication_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_MutingAvailabilityIndication = { "MutingAvailabilityIndication", "MutingAvailabilityIndication", &asn_OP_NativeEnumerated, asn_DEF_S1AP_MutingAvailabilityIndication_tags_1, sizeof(asn_DEF_S1AP_MutingAvailabilityIndication_tags_1) /sizeof(asn_DEF_S1AP_MutingAvailabilityIndication_tags_1[0]), /* 1 */ asn_DEF_S1AP_MutingAvailabilityIndication_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MutingAvailabilityIndication_tags_1) /sizeof(asn_DEF_S1AP_MutingAvailabilityIndication_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_MutingAvailabilityIndication_constr_1, &asn_PER_type_S1AP_MutingAvailabilityIndication_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_MutingAvailabilityIndication_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MutingAvailabilityIndication.h000066400000000000000000000034441333553357400244350ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MutingAvailabilityIndication_H_ #define _S1AP_MutingAvailabilityIndication_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_MutingAvailabilityIndication { S1AP_MutingAvailabilityIndication_available = 0, S1AP_MutingAvailabilityIndication_unavailable = 1 /* * Enumeration is extensible */ } e_S1AP_MutingAvailabilityIndication; /* S1AP_MutingAvailabilityIndication */ typedef long S1AP_MutingAvailabilityIndication_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MutingAvailabilityIndication; asn_struct_free_f S1AP_MutingAvailabilityIndication_free; asn_struct_print_f S1AP_MutingAvailabilityIndication_print; asn_constr_check_f S1AP_MutingAvailabilityIndication_constraint; ber_type_decoder_f S1AP_MutingAvailabilityIndication_decode_ber; der_type_encoder_f S1AP_MutingAvailabilityIndication_encode_der; xer_type_decoder_f S1AP_MutingAvailabilityIndication_decode_xer; xer_type_encoder_f S1AP_MutingAvailabilityIndication_encode_xer; oer_type_decoder_f S1AP_MutingAvailabilityIndication_decode_oer; oer_type_encoder_f S1AP_MutingAvailabilityIndication_encode_oer; per_type_decoder_f S1AP_MutingAvailabilityIndication_decode_uper; per_type_encoder_f S1AP_MutingAvailabilityIndication_encode_uper; per_type_decoder_f S1AP_MutingAvailabilityIndication_decode_aper; per_type_encoder_f S1AP_MutingAvailabilityIndication_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_MutingAvailabilityIndication_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MutingPatternInformation.c000066400000000000000000000137211333553357400236360ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_MutingPatternInformation.h" #include "S1AP_ProtocolExtensionContainer.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static int memb_S1AP_muting_pattern_offset_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 10239)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_oer_constraints_t asn_OER_type_S1AP_muting_pattern_period_constr_2 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_muting_pattern_period_constr_2 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 4 } /* (0..4,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_muting_pattern_offset_constr_9 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_muting_pattern_offset_constr_9 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 14, 14, 0, 10239 } /* (0..10239,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_muting_pattern_period_value2enum_2[] = { { 0, 3, "ms0" }, { 1, 6, "ms1280" }, { 2, 6, "ms2560" }, { 3, 6, "ms5120" }, { 4, 7, "ms10240" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_muting_pattern_period_enum2value_2[] = { 0, /* ms0(0) */ 4, /* ms10240(4) */ 1, /* ms1280(1) */ 2, /* ms2560(2) */ 3 /* ms5120(3) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_muting_pattern_period_specs_2 = { asn_MAP_S1AP_muting_pattern_period_value2enum_2, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_muting_pattern_period_enum2value_2, /* N => "tag"; sorted by N */ 5, /* Number of elements in the maps */ 6, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_muting_pattern_period_tags_2[] = { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_muting_pattern_period_2 = { "muting-pattern-period", "muting-pattern-period", &asn_OP_NativeEnumerated, asn_DEF_S1AP_muting_pattern_period_tags_2, sizeof(asn_DEF_S1AP_muting_pattern_period_tags_2) /sizeof(asn_DEF_S1AP_muting_pattern_period_tags_2[0]) - 1, /* 1 */ asn_DEF_S1AP_muting_pattern_period_tags_2, /* Same as above */ sizeof(asn_DEF_S1AP_muting_pattern_period_tags_2) /sizeof(asn_DEF_S1AP_muting_pattern_period_tags_2[0]), /* 2 */ { &asn_OER_type_S1AP_muting_pattern_period_constr_2, &asn_PER_type_S1AP_muting_pattern_period_constr_2, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_muting_pattern_period_specs_2 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_MutingPatternInformation_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MutingPatternInformation, muting_pattern_period), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_muting_pattern_period_2, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "muting-pattern-period" }, { ATF_POINTER, 2, offsetof(struct S1AP_MutingPatternInformation, muting_pattern_offset), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, 0, { &asn_OER_memb_S1AP_muting_pattern_offset_constr_9, &asn_PER_memb_S1AP_muting_pattern_offset_constr_9, memb_S1AP_muting_pattern_offset_constraint_1 }, 0, 0, /* No default value */ "muting-pattern-offset" }, { ATF_POINTER, 1, offsetof(struct S1AP_MutingPatternInformation, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P74, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_MutingPatternInformation_oms_1[] = { 1, 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_MutingPatternInformation_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MutingPatternInformation_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* muting-pattern-period */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* muting-pattern-offset */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_MutingPatternInformation_specs_1 = { sizeof(struct S1AP_MutingPatternInformation), offsetof(struct S1AP_MutingPatternInformation, _asn_ctx), asn_MAP_S1AP_MutingPatternInformation_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_MutingPatternInformation_oms_1, /* Optional members */ 2, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MutingPatternInformation = { "MutingPatternInformation", "MutingPatternInformation", &asn_OP_SEQUENCE, asn_DEF_S1AP_MutingPatternInformation_tags_1, sizeof(asn_DEF_S1AP_MutingPatternInformation_tags_1) /sizeof(asn_DEF_S1AP_MutingPatternInformation_tags_1[0]), /* 1 */ asn_DEF_S1AP_MutingPatternInformation_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_MutingPatternInformation_tags_1) /sizeof(asn_DEF_S1AP_MutingPatternInformation_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_MutingPatternInformation_1, 3, /* Elements count */ &asn_SPC_S1AP_MutingPatternInformation_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_MutingPatternInformation.h000066400000000000000000000034111333553357400236360ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_MutingPatternInformation_H_ #define _S1AP_MutingPatternInformation_H_ #include /* Including external dependencies */ #include #include #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_MutingPatternInformation__muting_pattern_period { S1AP_MutingPatternInformation__muting_pattern_period_ms0 = 0, S1AP_MutingPatternInformation__muting_pattern_period_ms1280 = 1, S1AP_MutingPatternInformation__muting_pattern_period_ms2560 = 2, S1AP_MutingPatternInformation__muting_pattern_period_ms5120 = 3, S1AP_MutingPatternInformation__muting_pattern_period_ms10240 = 4 /* * Enumeration is extensible */ } e_S1AP_MutingPatternInformation__muting_pattern_period; /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_MutingPatternInformation */ typedef struct S1AP_MutingPatternInformation { long muting_pattern_period; long *muting_pattern_offset; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MutingPatternInformation_t; /* Implementation */ /* extern asn_TYPE_descriptor_t asn_DEF_S1AP_muting_pattern_period_2; // (Use -fall-defs-global to expose) */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_MutingPatternInformation; #ifdef __cplusplus } #endif #endif /* _S1AP_MutingPatternInformation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NAS-PDU.c000066400000000000000000000016161333553357400176760ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_NAS-PDU.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_NAS_PDU_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_NAS_PDU = { "NAS-PDU", "NAS-PDU", &asn_OP_OCTET_STRING, asn_DEF_S1AP_NAS_PDU_tags_1, sizeof(asn_DEF_S1AP_NAS_PDU_tags_1) /sizeof(asn_DEF_S1AP_NAS_PDU_tags_1[0]), /* 1 */ asn_DEF_S1AP_NAS_PDU_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_NAS_PDU_tags_1) /sizeof(asn_DEF_S1AP_NAS_PDU_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NAS-PDU.h000066400000000000000000000022431333553357400177000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_NAS_PDU_H_ #define _S1AP_NAS_PDU_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_NAS-PDU */ typedef OCTET_STRING_t S1AP_NAS_PDU_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_NAS_PDU; asn_struct_free_f S1AP_NAS_PDU_free; asn_struct_print_f S1AP_NAS_PDU_print; asn_constr_check_f S1AP_NAS_PDU_constraint; ber_type_decoder_f S1AP_NAS_PDU_decode_ber; der_type_encoder_f S1AP_NAS_PDU_encode_der; xer_type_decoder_f S1AP_NAS_PDU_decode_xer; xer_type_encoder_f S1AP_NAS_PDU_encode_xer; oer_type_decoder_f S1AP_NAS_PDU_decode_oer; oer_type_encoder_f S1AP_NAS_PDU_encode_oer; per_type_decoder_f S1AP_NAS_PDU_decode_uper; per_type_encoder_f S1AP_NAS_PDU_encode_uper; per_type_decoder_f S1AP_NAS_PDU_decode_aper; per_type_encoder_f S1AP_NAS_PDU_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_NAS_PDU_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NASDeliveryIndication.c000066400000000000000000000035041333553357400227540ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_NASDeliveryIndication.h" asn_TYPE_member_t asn_MBR_S1AP_NASDeliveryIndication_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_NASDeliveryIndication, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P36, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_NASDeliveryIndication_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_NASDeliveryIndication_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_NASDeliveryIndication_specs_1 = { sizeof(struct S1AP_NASDeliveryIndication), offsetof(struct S1AP_NASDeliveryIndication, _asn_ctx), asn_MAP_S1AP_NASDeliveryIndication_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_NASDeliveryIndication = { "NASDeliveryIndication", "NASDeliveryIndication", &asn_OP_SEQUENCE, asn_DEF_S1AP_NASDeliveryIndication_tags_1, sizeof(asn_DEF_S1AP_NASDeliveryIndication_tags_1) /sizeof(asn_DEF_S1AP_NASDeliveryIndication_tags_1[0]), /* 1 */ asn_DEF_S1AP_NASDeliveryIndication_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_NASDeliveryIndication_tags_1) /sizeof(asn_DEF_S1AP_NASDeliveryIndication_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_NASDeliveryIndication_1, 1, /* Elements count */ &asn_SPC_S1AP_NASDeliveryIndication_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NASDeliveryIndication.h000066400000000000000000000021501333553357400227550ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_NASDeliveryIndication_H_ #define _S1AP_NASDeliveryIndication_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_NASDeliveryIndication */ typedef struct S1AP_NASDeliveryIndication { S1AP_ProtocolIE_Container_6551P36_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_NASDeliveryIndication_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_NASDeliveryIndication; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_NASDeliveryIndication_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_NASDeliveryIndication_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_NASDeliveryIndication_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NASNonDeliveryIndication.c000066400000000000000000000036001333553357400234240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_NASNonDeliveryIndication.h" asn_TYPE_member_t asn_MBR_S1AP_NASNonDeliveryIndication_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_NASNonDeliveryIndication, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P34, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_NASNonDeliveryIndication_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_NASNonDeliveryIndication_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_NASNonDeliveryIndication_specs_1 = { sizeof(struct S1AP_NASNonDeliveryIndication), offsetof(struct S1AP_NASNonDeliveryIndication, _asn_ctx), asn_MAP_S1AP_NASNonDeliveryIndication_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_NASNonDeliveryIndication = { "NASNonDeliveryIndication", "NASNonDeliveryIndication", &asn_OP_SEQUENCE, asn_DEF_S1AP_NASNonDeliveryIndication_tags_1, sizeof(asn_DEF_S1AP_NASNonDeliveryIndication_tags_1) /sizeof(asn_DEF_S1AP_NASNonDeliveryIndication_tags_1[0]), /* 1 */ asn_DEF_S1AP_NASNonDeliveryIndication_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_NASNonDeliveryIndication_tags_1) /sizeof(asn_DEF_S1AP_NASNonDeliveryIndication_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_NASNonDeliveryIndication_1, 1, /* Elements count */ &asn_SPC_S1AP_NASNonDeliveryIndication_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NASNonDeliveryIndication.h000066400000000000000000000022031333553357400234270ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_NASNonDeliveryIndication_H_ #define _S1AP_NASNonDeliveryIndication_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_NASNonDeliveryIndication */ typedef struct S1AP_NASNonDeliveryIndication { S1AP_ProtocolIE_Container_6551P34_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_NASNonDeliveryIndication_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_NASNonDeliveryIndication; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_NASNonDeliveryIndication_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_NASNonDeliveryIndication_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_NASNonDeliveryIndication_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NASSecurityParametersfromE-UTRAN.c000066400000000000000000000022411333553357400246770ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_NASSecurityParametersfromE-UTRAN.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_NASSecurityParametersfromE_UTRAN_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_NASSecurityParametersfromE_UTRAN = { "NASSecurityParametersfromE-UTRAN", "NASSecurityParametersfromE-UTRAN", &asn_OP_OCTET_STRING, asn_DEF_S1AP_NASSecurityParametersfromE_UTRAN_tags_1, sizeof(asn_DEF_S1AP_NASSecurityParametersfromE_UTRAN_tags_1) /sizeof(asn_DEF_S1AP_NASSecurityParametersfromE_UTRAN_tags_1[0]), /* 1 */ asn_DEF_S1AP_NASSecurityParametersfromE_UTRAN_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_NASSecurityParametersfromE_UTRAN_tags_1) /sizeof(asn_DEF_S1AP_NASSecurityParametersfromE_UTRAN_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NASSecurityParametersfromE-UTRAN.h000066400000000000000000000031761333553357400247140ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_NASSecurityParametersfromE_UTRAN_H_ #define _S1AP_NASSecurityParametersfromE_UTRAN_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_NASSecurityParametersfromE-UTRAN */ typedef OCTET_STRING_t S1AP_NASSecurityParametersfromE_UTRAN_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_NASSecurityParametersfromE_UTRAN; asn_struct_free_f S1AP_NASSecurityParametersfromE_UTRAN_free; asn_struct_print_f S1AP_NASSecurityParametersfromE_UTRAN_print; asn_constr_check_f S1AP_NASSecurityParametersfromE_UTRAN_constraint; ber_type_decoder_f S1AP_NASSecurityParametersfromE_UTRAN_decode_ber; der_type_encoder_f S1AP_NASSecurityParametersfromE_UTRAN_encode_der; xer_type_decoder_f S1AP_NASSecurityParametersfromE_UTRAN_decode_xer; xer_type_encoder_f S1AP_NASSecurityParametersfromE_UTRAN_encode_xer; oer_type_decoder_f S1AP_NASSecurityParametersfromE_UTRAN_decode_oer; oer_type_encoder_f S1AP_NASSecurityParametersfromE_UTRAN_encode_oer; per_type_decoder_f S1AP_NASSecurityParametersfromE_UTRAN_decode_uper; per_type_encoder_f S1AP_NASSecurityParametersfromE_UTRAN_encode_uper; per_type_decoder_f S1AP_NASSecurityParametersfromE_UTRAN_decode_aper; per_type_encoder_f S1AP_NASSecurityParametersfromE_UTRAN_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_NASSecurityParametersfromE_UTRAN_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NASSecurityParameterstoE-UTRAN.c000066400000000000000000000022131333553357400243550ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_NASSecurityParameterstoE-UTRAN.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_NASSecurityParameterstoE_UTRAN_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_NASSecurityParameterstoE_UTRAN = { "NASSecurityParameterstoE-UTRAN", "NASSecurityParameterstoE-UTRAN", &asn_OP_OCTET_STRING, asn_DEF_S1AP_NASSecurityParameterstoE_UTRAN_tags_1, sizeof(asn_DEF_S1AP_NASSecurityParameterstoE_UTRAN_tags_1) /sizeof(asn_DEF_S1AP_NASSecurityParameterstoE_UTRAN_tags_1[0]), /* 1 */ asn_DEF_S1AP_NASSecurityParameterstoE_UTRAN_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_NASSecurityParameterstoE_UTRAN_tags_1) /sizeof(asn_DEF_S1AP_NASSecurityParameterstoE_UTRAN_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NASSecurityParameterstoE-UTRAN.h000066400000000000000000000031301333553357400243610ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_NASSecurityParameterstoE_UTRAN_H_ #define _S1AP_NASSecurityParameterstoE_UTRAN_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_NASSecurityParameterstoE-UTRAN */ typedef OCTET_STRING_t S1AP_NASSecurityParameterstoE_UTRAN_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_NASSecurityParameterstoE_UTRAN; asn_struct_free_f S1AP_NASSecurityParameterstoE_UTRAN_free; asn_struct_print_f S1AP_NASSecurityParameterstoE_UTRAN_print; asn_constr_check_f S1AP_NASSecurityParameterstoE_UTRAN_constraint; ber_type_decoder_f S1AP_NASSecurityParameterstoE_UTRAN_decode_ber; der_type_encoder_f S1AP_NASSecurityParameterstoE_UTRAN_encode_der; xer_type_decoder_f S1AP_NASSecurityParameterstoE_UTRAN_decode_xer; xer_type_encoder_f S1AP_NASSecurityParameterstoE_UTRAN_encode_xer; oer_type_decoder_f S1AP_NASSecurityParameterstoE_UTRAN_decode_oer; oer_type_encoder_f S1AP_NASSecurityParameterstoE_UTRAN_encode_oer; per_type_decoder_f S1AP_NASSecurityParameterstoE_UTRAN_decode_uper; per_type_encoder_f S1AP_NASSecurityParameterstoE_UTRAN_encode_uper; per_type_decoder_f S1AP_NASSecurityParameterstoE_UTRAN_decode_aper; per_type_encoder_f S1AP_NASSecurityParameterstoE_UTRAN_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_NASSecurityParameterstoE_UTRAN_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NB-IoT-DefaultPagingDRX.c000066400000000000000000000044701333553357400227060ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_NB-IoT-DefaultPagingDRX.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_NB_IoT_DefaultPagingDRX_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_NB_IoT_DefaultPagingDRX_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_NB_IoT_DefaultPagingDRX_value2enum_1[] = { { 0, 4, "v128" }, { 1, 4, "v256" }, { 2, 4, "v512" }, { 3, 5, "v1024" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_NB_IoT_DefaultPagingDRX_enum2value_1[] = { 3, /* v1024(3) */ 0, /* v128(0) */ 1, /* v256(1) */ 2 /* v512(2) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_NB_IoT_DefaultPagingDRX_specs_1 = { asn_MAP_S1AP_NB_IoT_DefaultPagingDRX_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_NB_IoT_DefaultPagingDRX_enum2value_1, /* N => "tag"; sorted by N */ 4, /* Number of elements in the maps */ 5, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_NB_IoT_DefaultPagingDRX_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_NB_IoT_DefaultPagingDRX = { "NB-IoT-DefaultPagingDRX", "NB-IoT-DefaultPagingDRX", &asn_OP_NativeEnumerated, asn_DEF_S1AP_NB_IoT_DefaultPagingDRX_tags_1, sizeof(asn_DEF_S1AP_NB_IoT_DefaultPagingDRX_tags_1) /sizeof(asn_DEF_S1AP_NB_IoT_DefaultPagingDRX_tags_1[0]), /* 1 */ asn_DEF_S1AP_NB_IoT_DefaultPagingDRX_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_NB_IoT_DefaultPagingDRX_tags_1) /sizeof(asn_DEF_S1AP_NB_IoT_DefaultPagingDRX_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_NB_IoT_DefaultPagingDRX_constr_1, &asn_PER_type_S1AP_NB_IoT_DefaultPagingDRX_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_NB_IoT_DefaultPagingDRX_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NB-IoT-DefaultPagingDRX.h000066400000000000000000000033661333553357400227160ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_NB_IoT_DefaultPagingDRX_H_ #define _S1AP_NB_IoT_DefaultPagingDRX_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_NB_IoT_DefaultPagingDRX { S1AP_NB_IoT_DefaultPagingDRX_v128 = 0, S1AP_NB_IoT_DefaultPagingDRX_v256 = 1, S1AP_NB_IoT_DefaultPagingDRX_v512 = 2, S1AP_NB_IoT_DefaultPagingDRX_v1024 = 3 /* * Enumeration is extensible */ } e_S1AP_NB_IoT_DefaultPagingDRX; /* S1AP_NB-IoT-DefaultPagingDRX */ typedef long S1AP_NB_IoT_DefaultPagingDRX_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_NB_IoT_DefaultPagingDRX; asn_struct_free_f S1AP_NB_IoT_DefaultPagingDRX_free; asn_struct_print_f S1AP_NB_IoT_DefaultPagingDRX_print; asn_constr_check_f S1AP_NB_IoT_DefaultPagingDRX_constraint; ber_type_decoder_f S1AP_NB_IoT_DefaultPagingDRX_decode_ber; der_type_encoder_f S1AP_NB_IoT_DefaultPagingDRX_encode_der; xer_type_decoder_f S1AP_NB_IoT_DefaultPagingDRX_decode_xer; xer_type_encoder_f S1AP_NB_IoT_DefaultPagingDRX_encode_xer; oer_type_decoder_f S1AP_NB_IoT_DefaultPagingDRX_decode_oer; oer_type_encoder_f S1AP_NB_IoT_DefaultPagingDRX_encode_oer; per_type_decoder_f S1AP_NB_IoT_DefaultPagingDRX_decode_uper; per_type_encoder_f S1AP_NB_IoT_DefaultPagingDRX_encode_uper; per_type_decoder_f S1AP_NB_IoT_DefaultPagingDRX_decode_aper; per_type_encoder_f S1AP_NB_IoT_DefaultPagingDRX_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_NB_IoT_DefaultPagingDRX_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NB-IoT-Paging-eDRX-Cycle.c000066400000000000000000000053011333553357400226520ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_NB-IoT-Paging-eDRX-Cycle.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_NB_IoT_Paging_eDRX_Cycle_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_NB_IoT_Paging_eDRX_Cycle_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 13 } /* (0..13,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_NB_IoT_Paging_eDRX_Cycle_value2enum_1[] = { { 0, 3, "hf2" }, { 1, 3, "hf4" }, { 2, 3, "hf6" }, { 3, 3, "hf8" }, { 4, 4, "hf10" }, { 5, 4, "hf12" }, { 6, 4, "hf14" }, { 7, 4, "hf16" }, { 8, 4, "hf32" }, { 9, 4, "hf64" }, { 10, 5, "hf128" }, { 11, 5, "hf256" }, { 12, 5, "hf512" }, { 13, 6, "hf1024" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_NB_IoT_Paging_eDRX_Cycle_enum2value_1[] = { 4, /* hf10(4) */ 13, /* hf1024(13) */ 5, /* hf12(5) */ 10, /* hf128(10) */ 6, /* hf14(6) */ 7, /* hf16(7) */ 0, /* hf2(0) */ 11, /* hf256(11) */ 8, /* hf32(8) */ 1, /* hf4(1) */ 12, /* hf512(12) */ 2, /* hf6(2) */ 9, /* hf64(9) */ 3 /* hf8(3) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_NB_IoT_Paging_eDRX_Cycle_specs_1 = { asn_MAP_S1AP_NB_IoT_Paging_eDRX_Cycle_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_NB_IoT_Paging_eDRX_Cycle_enum2value_1, /* N => "tag"; sorted by N */ 14, /* Number of elements in the maps */ 15, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_NB_IoT_Paging_eDRX_Cycle_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_NB_IoT_Paging_eDRX_Cycle = { "NB-IoT-Paging-eDRX-Cycle", "NB-IoT-Paging-eDRX-Cycle", &asn_OP_NativeEnumerated, asn_DEF_S1AP_NB_IoT_Paging_eDRX_Cycle_tags_1, sizeof(asn_DEF_S1AP_NB_IoT_Paging_eDRX_Cycle_tags_1) /sizeof(asn_DEF_S1AP_NB_IoT_Paging_eDRX_Cycle_tags_1[0]), /* 1 */ asn_DEF_S1AP_NB_IoT_Paging_eDRX_Cycle_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_NB_IoT_Paging_eDRX_Cycle_tags_1) /sizeof(asn_DEF_S1AP_NB_IoT_Paging_eDRX_Cycle_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_NB_IoT_Paging_eDRX_Cycle_constr_1, &asn_PER_type_S1AP_NB_IoT_Paging_eDRX_Cycle_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_NB_IoT_Paging_eDRX_Cycle_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NB-IoT-Paging-eDRX-Cycle.h000066400000000000000000000044151333553357400226640ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_NB_IoT_Paging_eDRX_Cycle_H_ #define _S1AP_NB_IoT_Paging_eDRX_Cycle_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_NB_IoT_Paging_eDRX_Cycle { S1AP_NB_IoT_Paging_eDRX_Cycle_hf2 = 0, S1AP_NB_IoT_Paging_eDRX_Cycle_hf4 = 1, S1AP_NB_IoT_Paging_eDRX_Cycle_hf6 = 2, S1AP_NB_IoT_Paging_eDRX_Cycle_hf8 = 3, S1AP_NB_IoT_Paging_eDRX_Cycle_hf10 = 4, S1AP_NB_IoT_Paging_eDRX_Cycle_hf12 = 5, S1AP_NB_IoT_Paging_eDRX_Cycle_hf14 = 6, S1AP_NB_IoT_Paging_eDRX_Cycle_hf16 = 7, S1AP_NB_IoT_Paging_eDRX_Cycle_hf32 = 8, S1AP_NB_IoT_Paging_eDRX_Cycle_hf64 = 9, S1AP_NB_IoT_Paging_eDRX_Cycle_hf128 = 10, S1AP_NB_IoT_Paging_eDRX_Cycle_hf256 = 11, S1AP_NB_IoT_Paging_eDRX_Cycle_hf512 = 12, S1AP_NB_IoT_Paging_eDRX_Cycle_hf1024 = 13 /* * Enumeration is extensible */ } e_S1AP_NB_IoT_Paging_eDRX_Cycle; /* S1AP_NB-IoT-Paging-eDRX-Cycle */ typedef long S1AP_NB_IoT_Paging_eDRX_Cycle_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_NB_IoT_Paging_eDRX_Cycle_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_NB_IoT_Paging_eDRX_Cycle; extern const asn_INTEGER_specifics_t asn_SPC_NB_IoT_Paging_eDRX_Cycle_specs_1; asn_struct_free_f NB_IoT_Paging_eDRX_Cycle_free; asn_struct_print_f NB_IoT_Paging_eDRX_Cycle_print; asn_constr_check_f NB_IoT_Paging_eDRX_Cycle_constraint; ber_type_decoder_f NB_IoT_Paging_eDRX_Cycle_decode_ber; der_type_encoder_f NB_IoT_Paging_eDRX_Cycle_encode_der; xer_type_decoder_f NB_IoT_Paging_eDRX_Cycle_decode_xer; xer_type_encoder_f NB_IoT_Paging_eDRX_Cycle_encode_xer; oer_type_decoder_f NB_IoT_Paging_eDRX_Cycle_decode_oer; oer_type_encoder_f NB_IoT_Paging_eDRX_Cycle_encode_oer; per_type_decoder_f NB_IoT_Paging_eDRX_Cycle_decode_uper; per_type_encoder_f NB_IoT_Paging_eDRX_Cycle_encode_uper; per_type_decoder_f NB_IoT_Paging_eDRX_Cycle_decode_aper; per_type_encoder_f NB_IoT_Paging_eDRX_Cycle_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_NB_IoT_Paging_eDRX_Cycle_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NB-IoT-Paging-eDRXInformation.c000066400000000000000000000056571333553357400240410ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_NB-IoT-Paging-eDRXInformation.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_NB_IoT_Paging_eDRXInformation_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_NB_IoT_Paging_eDRXInformation, nB_IoT_paging_eDRX_Cycle), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_NB_IoT_Paging_eDRX_Cycle, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "nB-IoT-paging-eDRX-Cycle" }, { ATF_POINTER, 2, offsetof(struct S1AP_NB_IoT_Paging_eDRXInformation, nB_IoT_pagingTimeWindow), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_NB_IoT_PagingTimeWindow, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "nB-IoT-pagingTimeWindow" }, { ATF_POINTER, 1, offsetof(struct S1AP_NB_IoT_Paging_eDRXInformation, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P75, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_NB_IoT_Paging_eDRXInformation_oms_1[] = { 1, 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_NB_IoT_Paging_eDRXInformation_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_NB_IoT_Paging_eDRXInformation_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nB-IoT-paging-eDRX-Cycle */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* nB-IoT-pagingTimeWindow */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_NB_IoT_Paging_eDRXInformation_specs_1 = { sizeof(struct S1AP_NB_IoT_Paging_eDRXInformation), offsetof(struct S1AP_NB_IoT_Paging_eDRXInformation, _asn_ctx), asn_MAP_S1AP_NB_IoT_Paging_eDRXInformation_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_NB_IoT_Paging_eDRXInformation_oms_1, /* Optional members */ 2, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_NB_IoT_Paging_eDRXInformation = { "NB-IoT-Paging-eDRXInformation", "NB-IoT-Paging-eDRXInformation", &asn_OP_SEQUENCE, asn_DEF_S1AP_NB_IoT_Paging_eDRXInformation_tags_1, sizeof(asn_DEF_S1AP_NB_IoT_Paging_eDRXInformation_tags_1) /sizeof(asn_DEF_S1AP_NB_IoT_Paging_eDRXInformation_tags_1[0]), /* 1 */ asn_DEF_S1AP_NB_IoT_Paging_eDRXInformation_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_NB_IoT_Paging_eDRXInformation_tags_1) /sizeof(asn_DEF_S1AP_NB_IoT_Paging_eDRXInformation_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_NB_IoT_Paging_eDRXInformation_1, 3, /* Elements count */ &asn_SPC_S1AP_NB_IoT_Paging_eDRXInformation_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NB-IoT-Paging-eDRXInformation.h000066400000000000000000000024241333553357400240330ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_NB_IoT_Paging_eDRXInformation_H_ #define _S1AP_NB_IoT_Paging_eDRXInformation_H_ #include /* Including external dependencies */ #include "S1AP_NB-IoT-Paging-eDRX-Cycle.h" #include "S1AP_NB-IoT-PagingTimeWindow.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_NB-IoT-Paging-eDRXInformation */ typedef struct S1AP_NB_IoT_Paging_eDRXInformation { S1AP_NB_IoT_Paging_eDRX_Cycle_t nB_IoT_paging_eDRX_Cycle; S1AP_NB_IoT_PagingTimeWindow_t *nB_IoT_pagingTimeWindow; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_NB_IoT_Paging_eDRXInformation_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_NB_IoT_Paging_eDRXInformation; #ifdef __cplusplus } #endif #endif /* _S1AP_NB_IoT_Paging_eDRXInformation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NB-IoT-PagingTimeWindow.c000066400000000000000000000053101333553357400230240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_NB-IoT-PagingTimeWindow.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_NB_IoT_PagingTimeWindow_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_NB_IoT_PagingTimeWindow_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 15 } /* (0..15,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_NB_IoT_PagingTimeWindow_value2enum_1[] = { { 0, 2, "s1" }, { 1, 2, "s2" }, { 2, 2, "s3" }, { 3, 2, "s4" }, { 4, 2, "s5" }, { 5, 2, "s6" }, { 6, 2, "s7" }, { 7, 2, "s8" }, { 8, 2, "s9" }, { 9, 3, "s10" }, { 10, 3, "s11" }, { 11, 3, "s12" }, { 12, 3, "s13" }, { 13, 3, "s14" }, { 14, 3, "s15" }, { 15, 3, "s16" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_NB_IoT_PagingTimeWindow_enum2value_1[] = { 0, /* s1(0) */ 9, /* s10(9) */ 10, /* s11(10) */ 11, /* s12(11) */ 12, /* s13(12) */ 13, /* s14(13) */ 14, /* s15(14) */ 15, /* s16(15) */ 1, /* s2(1) */ 2, /* s3(2) */ 3, /* s4(3) */ 4, /* s5(4) */ 5, /* s6(5) */ 6, /* s7(6) */ 7, /* s8(7) */ 8 /* s9(8) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_NB_IoT_PagingTimeWindow_specs_1 = { asn_MAP_S1AP_NB_IoT_PagingTimeWindow_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_NB_IoT_PagingTimeWindow_enum2value_1, /* N => "tag"; sorted by N */ 16, /* Number of elements in the maps */ 17, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_NB_IoT_PagingTimeWindow_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_NB_IoT_PagingTimeWindow = { "NB-IoT-PagingTimeWindow", "NB-IoT-PagingTimeWindow", &asn_OP_NativeEnumerated, asn_DEF_S1AP_NB_IoT_PagingTimeWindow_tags_1, sizeof(asn_DEF_S1AP_NB_IoT_PagingTimeWindow_tags_1) /sizeof(asn_DEF_S1AP_NB_IoT_PagingTimeWindow_tags_1[0]), /* 1 */ asn_DEF_S1AP_NB_IoT_PagingTimeWindow_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_NB_IoT_PagingTimeWindow_tags_1) /sizeof(asn_DEF_S1AP_NB_IoT_PagingTimeWindow_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_NB_IoT_PagingTimeWindow_constr_1, &asn_PER_type_S1AP_NB_IoT_PagingTimeWindow_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_NB_IoT_PagingTimeWindow_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NB-IoT-PagingTimeWindow.h000066400000000000000000000044401333553357400230340ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_NB_IoT_PagingTimeWindow_H_ #define _S1AP_NB_IoT_PagingTimeWindow_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_NB_IoT_PagingTimeWindow { S1AP_NB_IoT_PagingTimeWindow_s1 = 0, S1AP_NB_IoT_PagingTimeWindow_s2 = 1, S1AP_NB_IoT_PagingTimeWindow_s3 = 2, S1AP_NB_IoT_PagingTimeWindow_s4 = 3, S1AP_NB_IoT_PagingTimeWindow_s5 = 4, S1AP_NB_IoT_PagingTimeWindow_s6 = 5, S1AP_NB_IoT_PagingTimeWindow_s7 = 6, S1AP_NB_IoT_PagingTimeWindow_s8 = 7, S1AP_NB_IoT_PagingTimeWindow_s9 = 8, S1AP_NB_IoT_PagingTimeWindow_s10 = 9, S1AP_NB_IoT_PagingTimeWindow_s11 = 10, S1AP_NB_IoT_PagingTimeWindow_s12 = 11, S1AP_NB_IoT_PagingTimeWindow_s13 = 12, S1AP_NB_IoT_PagingTimeWindow_s14 = 13, S1AP_NB_IoT_PagingTimeWindow_s15 = 14, S1AP_NB_IoT_PagingTimeWindow_s16 = 15 /* * Enumeration is extensible */ } e_S1AP_NB_IoT_PagingTimeWindow; /* S1AP_NB-IoT-PagingTimeWindow */ typedef long S1AP_NB_IoT_PagingTimeWindow_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_NB_IoT_PagingTimeWindow_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_NB_IoT_PagingTimeWindow; extern const asn_INTEGER_specifics_t asn_SPC_NB_IoT_PagingTimeWindow_specs_1; asn_struct_free_f NB_IoT_PagingTimeWindow_free; asn_struct_print_f NB_IoT_PagingTimeWindow_print; asn_constr_check_f NB_IoT_PagingTimeWindow_constraint; ber_type_decoder_f NB_IoT_PagingTimeWindow_decode_ber; der_type_encoder_f NB_IoT_PagingTimeWindow_encode_der; xer_type_decoder_f NB_IoT_PagingTimeWindow_decode_xer; xer_type_encoder_f NB_IoT_PagingTimeWindow_encode_xer; oer_type_decoder_f NB_IoT_PagingTimeWindow_decode_oer; oer_type_encoder_f NB_IoT_PagingTimeWindow_encode_oer; per_type_decoder_f NB_IoT_PagingTimeWindow_decode_uper; per_type_encoder_f NB_IoT_PagingTimeWindow_encode_uper; per_type_decoder_f NB_IoT_PagingTimeWindow_decode_aper; per_type_encoder_f NB_IoT_PagingTimeWindow_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_NB_IoT_PagingTimeWindow_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NB-IoT-UEIdentityIndexValue.c000066400000000000000000000043721333553357400236270ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_NB-IoT-UEIdentityIndexValue.h" int S1AP_NB_IoT_UEIdentityIndexValue_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 12)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_NB_IoT_UEIdentityIndexValue_constr_1 CC_NOTUSED = { { 0, 0 }, 12 /* (SIZE(12..12)) */}; static asn_per_constraints_t asn_PER_type_S1AP_NB_IoT_UEIdentityIndexValue_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 12, 12 } /* (SIZE(12..12)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_NB_IoT_UEIdentityIndexValue_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_NB_IoT_UEIdentityIndexValue = { "NB-IoT-UEIdentityIndexValue", "NB-IoT-UEIdentityIndexValue", &asn_OP_BIT_STRING, asn_DEF_S1AP_NB_IoT_UEIdentityIndexValue_tags_1, sizeof(asn_DEF_S1AP_NB_IoT_UEIdentityIndexValue_tags_1) /sizeof(asn_DEF_S1AP_NB_IoT_UEIdentityIndexValue_tags_1[0]), /* 1 */ asn_DEF_S1AP_NB_IoT_UEIdentityIndexValue_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_NB_IoT_UEIdentityIndexValue_tags_1) /sizeof(asn_DEF_S1AP_NB_IoT_UEIdentityIndexValue_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_NB_IoT_UEIdentityIndexValue_constr_1, &asn_PER_type_S1AP_NB_IoT_UEIdentityIndexValue_constr_1, S1AP_NB_IoT_UEIdentityIndexValue_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NB-IoT-UEIdentityIndexValue.h000066400000000000000000000030331333553357400236250ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_NB_IoT_UEIdentityIndexValue_H_ #define _S1AP_NB_IoT_UEIdentityIndexValue_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_NB-IoT-UEIdentityIndexValue */ typedef BIT_STRING_t S1AP_NB_IoT_UEIdentityIndexValue_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_NB_IoT_UEIdentityIndexValue; asn_struct_free_f S1AP_NB_IoT_UEIdentityIndexValue_free; asn_struct_print_f S1AP_NB_IoT_UEIdentityIndexValue_print; asn_constr_check_f S1AP_NB_IoT_UEIdentityIndexValue_constraint; ber_type_decoder_f S1AP_NB_IoT_UEIdentityIndexValue_decode_ber; der_type_encoder_f S1AP_NB_IoT_UEIdentityIndexValue_encode_der; xer_type_decoder_f S1AP_NB_IoT_UEIdentityIndexValue_decode_xer; xer_type_encoder_f S1AP_NB_IoT_UEIdentityIndexValue_encode_xer; oer_type_decoder_f S1AP_NB_IoT_UEIdentityIndexValue_decode_oer; oer_type_encoder_f S1AP_NB_IoT_UEIdentityIndexValue_encode_oer; per_type_decoder_f S1AP_NB_IoT_UEIdentityIndexValue_decode_uper; per_type_encoder_f S1AP_NB_IoT_UEIdentityIndexValue_encode_uper; per_type_decoder_f S1AP_NB_IoT_UEIdentityIndexValue_decode_aper; per_type_encoder_f S1AP_NB_IoT_UEIdentityIndexValue_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_NB_IoT_UEIdentityIndexValue_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NextPagingAreaScope.c000066400000000000000000000042201333553357400224500ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_NextPagingAreaScope.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_NextPagingAreaScope_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_NextPagingAreaScope_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_NextPagingAreaScope_value2enum_1[] = { { 0, 4, "same" }, { 1, 7, "changed" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_NextPagingAreaScope_enum2value_1[] = { 1, /* changed(1) */ 0 /* same(0) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_NextPagingAreaScope_specs_1 = { asn_MAP_S1AP_NextPagingAreaScope_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_NextPagingAreaScope_enum2value_1, /* N => "tag"; sorted by N */ 2, /* Number of elements in the maps */ 3, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_NextPagingAreaScope_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_NextPagingAreaScope = { "NextPagingAreaScope", "NextPagingAreaScope", &asn_OP_NativeEnumerated, asn_DEF_S1AP_NextPagingAreaScope_tags_1, sizeof(asn_DEF_S1AP_NextPagingAreaScope_tags_1) /sizeof(asn_DEF_S1AP_NextPagingAreaScope_tags_1[0]), /* 1 */ asn_DEF_S1AP_NextPagingAreaScope_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_NextPagingAreaScope_tags_1) /sizeof(asn_DEF_S1AP_NextPagingAreaScope_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_NextPagingAreaScope_constr_1, &asn_PER_type_S1AP_NextPagingAreaScope_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_NextPagingAreaScope_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NextPagingAreaScope.h000066400000000000000000000032421333553357400224600ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_NextPagingAreaScope_H_ #define _S1AP_NextPagingAreaScope_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_NextPagingAreaScope { S1AP_NextPagingAreaScope_same = 0, S1AP_NextPagingAreaScope_changed = 1 /* * Enumeration is extensible */ } e_S1AP_NextPagingAreaScope; /* S1AP_NextPagingAreaScope */ typedef long S1AP_NextPagingAreaScope_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_NextPagingAreaScope_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_NextPagingAreaScope; extern const asn_INTEGER_specifics_t asn_SPC_NextPagingAreaScope_specs_1; asn_struct_free_f NextPagingAreaScope_free; asn_struct_print_f NextPagingAreaScope_print; asn_constr_check_f NextPagingAreaScope_constraint; ber_type_decoder_f NextPagingAreaScope_decode_ber; der_type_encoder_f NextPagingAreaScope_encode_der; xer_type_decoder_f NextPagingAreaScope_decode_xer; xer_type_encoder_f NextPagingAreaScope_encode_xer; oer_type_decoder_f NextPagingAreaScope_decode_oer; oer_type_encoder_f NextPagingAreaScope_encode_oer; per_type_decoder_f NextPagingAreaScope_decode_uper; per_type_encoder_f NextPagingAreaScope_encode_uper; per_type_decoder_f NextPagingAreaScope_decode_aper; per_type_encoder_f NextPagingAreaScope_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_NextPagingAreaScope_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NumberOfBroadcasts.c000066400000000000000000000037051333553357400223530ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_NumberOfBroadcasts.h" int S1AP_NumberOfBroadcasts_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_NumberOfBroadcasts_constr_1 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; asn_per_constraints_t asn_PER_type_S1AP_NumberOfBroadcasts_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_NumberOfBroadcasts_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_NumberOfBroadcasts = { "NumberOfBroadcasts", "NumberOfBroadcasts", &asn_OP_NativeInteger, asn_DEF_S1AP_NumberOfBroadcasts_tags_1, sizeof(asn_DEF_S1AP_NumberOfBroadcasts_tags_1) /sizeof(asn_DEF_S1AP_NumberOfBroadcasts_tags_1[0]), /* 1 */ asn_DEF_S1AP_NumberOfBroadcasts_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_NumberOfBroadcasts_tags_1) /sizeof(asn_DEF_S1AP_NumberOfBroadcasts_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_NumberOfBroadcasts_constr_1, &asn_PER_type_S1AP_NumberOfBroadcasts_constr_1, S1AP_NumberOfBroadcasts_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NumberOfBroadcasts.h000066400000000000000000000026671333553357400223660ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_NumberOfBroadcasts_H_ #define _S1AP_NumberOfBroadcasts_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_NumberOfBroadcasts */ typedef long S1AP_NumberOfBroadcasts_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_NumberOfBroadcasts_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_NumberOfBroadcasts; asn_struct_free_f S1AP_NumberOfBroadcasts_free; asn_struct_print_f S1AP_NumberOfBroadcasts_print; asn_constr_check_f S1AP_NumberOfBroadcasts_constraint; ber_type_decoder_f S1AP_NumberOfBroadcasts_decode_ber; der_type_encoder_f S1AP_NumberOfBroadcasts_encode_der; xer_type_decoder_f S1AP_NumberOfBroadcasts_decode_xer; xer_type_encoder_f S1AP_NumberOfBroadcasts_encode_xer; oer_type_decoder_f S1AP_NumberOfBroadcasts_decode_oer; oer_type_encoder_f S1AP_NumberOfBroadcasts_encode_oer; per_type_decoder_f S1AP_NumberOfBroadcasts_decode_uper; per_type_encoder_f S1AP_NumberOfBroadcasts_encode_uper; per_type_decoder_f S1AP_NumberOfBroadcasts_decode_aper; per_type_encoder_f S1AP_NumberOfBroadcasts_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_NumberOfBroadcasts_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NumberofBroadcastRequest.c000066400000000000000000000040621333553357400235760ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_NumberofBroadcastRequest.h" int S1AP_NumberofBroadcastRequest_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_NumberofBroadcastRequest_constr_1 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_type_S1AP_NumberofBroadcastRequest_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_NumberofBroadcastRequest_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_NumberofBroadcastRequest = { "NumberofBroadcastRequest", "NumberofBroadcastRequest", &asn_OP_NativeInteger, asn_DEF_S1AP_NumberofBroadcastRequest_tags_1, sizeof(asn_DEF_S1AP_NumberofBroadcastRequest_tags_1) /sizeof(asn_DEF_S1AP_NumberofBroadcastRequest_tags_1[0]), /* 1 */ asn_DEF_S1AP_NumberofBroadcastRequest_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_NumberofBroadcastRequest_tags_1) /sizeof(asn_DEF_S1AP_NumberofBroadcastRequest_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_NumberofBroadcastRequest_constr_1, &asn_PER_type_S1AP_NumberofBroadcastRequest_constr_1, S1AP_NumberofBroadcastRequest_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_NumberofBroadcastRequest.h000066400000000000000000000027351333553357400236100ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_NumberofBroadcastRequest_H_ #define _S1AP_NumberofBroadcastRequest_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_NumberofBroadcastRequest */ typedef long S1AP_NumberofBroadcastRequest_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_NumberofBroadcastRequest; asn_struct_free_f S1AP_NumberofBroadcastRequest_free; asn_struct_print_f S1AP_NumberofBroadcastRequest_print; asn_constr_check_f S1AP_NumberofBroadcastRequest_constraint; ber_type_decoder_f S1AP_NumberofBroadcastRequest_decode_ber; der_type_encoder_f S1AP_NumberofBroadcastRequest_encode_der; xer_type_decoder_f S1AP_NumberofBroadcastRequest_decode_xer; xer_type_encoder_f S1AP_NumberofBroadcastRequest_encode_xer; oer_type_decoder_f S1AP_NumberofBroadcastRequest_decode_oer; oer_type_encoder_f S1AP_NumberofBroadcastRequest_encode_oer; per_type_decoder_f S1AP_NumberofBroadcastRequest_decode_uper; per_type_encoder_f S1AP_NumberofBroadcastRequest_encode_uper; per_type_decoder_f S1AP_NumberofBroadcastRequest_decode_aper; per_type_encoder_f S1AP_NumberofBroadcastRequest_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_NumberofBroadcastRequest_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_OldBSS-ToNewBSS-Information.c000066400000000000000000000021521333553357400235760ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_OldBSS-ToNewBSS-Information.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_OldBSS_ToNewBSS_Information_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_OldBSS_ToNewBSS_Information = { "OldBSS-ToNewBSS-Information", "OldBSS-ToNewBSS-Information", &asn_OP_OCTET_STRING, asn_DEF_S1AP_OldBSS_ToNewBSS_Information_tags_1, sizeof(asn_DEF_S1AP_OldBSS_ToNewBSS_Information_tags_1) /sizeof(asn_DEF_S1AP_OldBSS_ToNewBSS_Information_tags_1[0]), /* 1 */ asn_DEF_S1AP_OldBSS_ToNewBSS_Information_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_OldBSS_ToNewBSS_Information_tags_1) /sizeof(asn_DEF_S1AP_OldBSS_ToNewBSS_Information_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_OldBSS-ToNewBSS-Information.h000066400000000000000000000030371333553357400236060ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_OldBSS_ToNewBSS_Information_H_ #define _S1AP_OldBSS_ToNewBSS_Information_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_OldBSS-ToNewBSS-Information */ typedef OCTET_STRING_t S1AP_OldBSS_ToNewBSS_Information_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_OldBSS_ToNewBSS_Information; asn_struct_free_f S1AP_OldBSS_ToNewBSS_Information_free; asn_struct_print_f S1AP_OldBSS_ToNewBSS_Information_print; asn_constr_check_f S1AP_OldBSS_ToNewBSS_Information_constraint; ber_type_decoder_f S1AP_OldBSS_ToNewBSS_Information_decode_ber; der_type_encoder_f S1AP_OldBSS_ToNewBSS_Information_encode_der; xer_type_decoder_f S1AP_OldBSS_ToNewBSS_Information_decode_xer; xer_type_encoder_f S1AP_OldBSS_ToNewBSS_Information_encode_xer; oer_type_decoder_f S1AP_OldBSS_ToNewBSS_Information_decode_oer; oer_type_encoder_f S1AP_OldBSS_ToNewBSS_Information_encode_oer; per_type_decoder_f S1AP_OldBSS_ToNewBSS_Information_decode_uper; per_type_encoder_f S1AP_OldBSS_ToNewBSS_Information_encode_uper; per_type_decoder_f S1AP_OldBSS_ToNewBSS_Information_decode_aper; per_type_encoder_f S1AP_OldBSS_ToNewBSS_Information_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_OldBSS_ToNewBSS_Information_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_OverloadAction.c000066400000000000000000000055431333553357400215430ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_OverloadAction.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_OverloadAction_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_OverloadAction_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_OverloadAction_value2enum_1[] = { { 0, 26, "reject-non-emergency-mo-dt" }, { 1, 24, "reject-rrc-cr-signalling" }, { 2, 61, "permit-emergency-sessions-and-mobile-terminated-services-only" }, { 3, 65, "permit-high-priority-sessions-and-mobile-terminated-services-only" }, { 4, 28, "reject-delay-tolerant-access" }, { 5, 89, "permit-high-priority-sessions-and-exception-reporting-and-mobile-terminated-services-only" }, { 6, 56, "not-accept-mo-data-or-delay-tolerant-access-from-CP-CIoT" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_OverloadAction_enum2value_1[] = { 6, /* not-accept-mo-data-or-delay-tolerant-access-from-CP-CIoT(6) */ 2, /* permit-emergency-sessions-and-mobile-terminated-services-only(2) */ 5, /* permit-high-priority-sessions-and-exception-reporting-and-mobile-terminated-services-only(5) */ 3, /* permit-high-priority-sessions-and-mobile-terminated-services-only(3) */ 4, /* reject-delay-tolerant-access(4) */ 0, /* reject-non-emergency-mo-dt(0) */ 1 /* reject-rrc-cr-signalling(1) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_OverloadAction_specs_1 = { asn_MAP_S1AP_OverloadAction_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_OverloadAction_enum2value_1, /* N => "tag"; sorted by N */ 7, /* Number of elements in the maps */ 4, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_OverloadAction_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_OverloadAction = { "OverloadAction", "OverloadAction", &asn_OP_NativeEnumerated, asn_DEF_S1AP_OverloadAction_tags_1, sizeof(asn_DEF_S1AP_OverloadAction_tags_1) /sizeof(asn_DEF_S1AP_OverloadAction_tags_1[0]), /* 1 */ asn_DEF_S1AP_OverloadAction_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_OverloadAction_tags_1) /sizeof(asn_DEF_S1AP_OverloadAction_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_OverloadAction_constr_1, &asn_PER_type_S1AP_OverloadAction_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_OverloadAction_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_OverloadAction.h000066400000000000000000000037761333553357400215560ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_OverloadAction_H_ #define _S1AP_OverloadAction_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_OverloadAction { S1AP_OverloadAction_reject_non_emergency_mo_dt = 0, S1AP_OverloadAction_reject_rrc_cr_signalling = 1, S1AP_OverloadAction_permit_emergency_sessions_and_mobile_terminated_services_only = 2, /* * Enumeration is extensible */ S1AP_OverloadAction_permit_high_priority_sessions_and_mobile_terminated_services_only = 3, S1AP_OverloadAction_reject_delay_tolerant_access = 4, S1AP_OverloadAction_permit_high_priority_sessions_and_exception_reporting_and_mobile_terminated_services_only = 5, S1AP_OverloadAction_not_accept_mo_data_or_delay_tolerant_access_from_CP_CIoT = 6 } e_S1AP_OverloadAction; /* S1AP_OverloadAction */ typedef long S1AP_OverloadAction_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_OverloadAction_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_OverloadAction; extern const asn_INTEGER_specifics_t asn_SPC_OverloadAction_specs_1; asn_struct_free_f OverloadAction_free; asn_struct_print_f OverloadAction_print; asn_constr_check_f OverloadAction_constraint; ber_type_decoder_f OverloadAction_decode_ber; der_type_encoder_f OverloadAction_encode_der; xer_type_decoder_f OverloadAction_decode_xer; xer_type_encoder_f OverloadAction_encode_xer; oer_type_decoder_f OverloadAction_decode_oer; oer_type_encoder_f OverloadAction_encode_oer; per_type_decoder_f OverloadAction_decode_uper; per_type_encoder_f OverloadAction_encode_uper; per_type_decoder_f OverloadAction_decode_aper; per_type_encoder_f OverloadAction_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_OverloadAction_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_OverloadResponse.c000066400000000000000000000036321333553357400221210ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_OverloadResponse.h" static asn_oer_constraints_t asn_OER_type_S1AP_OverloadResponse_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_OverloadResponse_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_OverloadResponse_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_OverloadResponse, choice.overloadAction), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_OverloadAction, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "overloadAction" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_OverloadResponse_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* overloadAction */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_OverloadResponse_specs_1 = { sizeof(struct S1AP_OverloadResponse), offsetof(struct S1AP_OverloadResponse, _asn_ctx), offsetof(struct S1AP_OverloadResponse, present), sizeof(((struct S1AP_OverloadResponse *)0)->present), asn_MAP_S1AP_OverloadResponse_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 1 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_OverloadResponse = { "OverloadResponse", "OverloadResponse", &asn_OP_CHOICE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { &asn_OER_type_S1AP_OverloadResponse_constr_1, &asn_PER_type_S1AP_OverloadResponse_constr_1, CHOICE_constraint }, asn_MBR_S1AP_OverloadResponse_1, 1, /* Elements count */ &asn_SPC_S1AP_OverloadResponse_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_OverloadResponse.h000066400000000000000000000023241333553357400221230ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_OverloadResponse_H_ #define _S1AP_OverloadResponse_H_ #include /* Including external dependencies */ #include "S1AP_OverloadAction.h" #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_OverloadResponse_PR { S1AP_OverloadResponse_PR_NOTHING, /* No components present */ S1AP_OverloadResponse_PR_overloadAction /* Extensions may appear below */ } S1AP_OverloadResponse_PR; /* S1AP_OverloadResponse */ typedef struct S1AP_OverloadResponse { S1AP_OverloadResponse_PR present; union S1AP_OverloadResponse_u { S1AP_OverloadAction_t overloadAction; /* * This type is extensible, * possible extensions are below. */ } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_OverloadResponse_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_OverloadResponse; #ifdef __cplusplus } #endif #endif /* _S1AP_OverloadResponse_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_OverloadStart.c000066400000000000000000000032441333553357400214170ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_OverloadStart.h" asn_TYPE_member_t asn_MBR_S1AP_OverloadStart_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_OverloadStart, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P61, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_OverloadStart_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_OverloadStart_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_OverloadStart_specs_1 = { sizeof(struct S1AP_OverloadStart), offsetof(struct S1AP_OverloadStart, _asn_ctx), asn_MAP_S1AP_OverloadStart_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_OverloadStart = { "OverloadStart", "OverloadStart", &asn_OP_SEQUENCE, asn_DEF_S1AP_OverloadStart_tags_1, sizeof(asn_DEF_S1AP_OverloadStart_tags_1) /sizeof(asn_DEF_S1AP_OverloadStart_tags_1[0]), /* 1 */ asn_DEF_S1AP_OverloadStart_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_OverloadStart_tags_1) /sizeof(asn_DEF_S1AP_OverloadStart_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_OverloadStart_1, 1, /* Elements count */ &asn_SPC_S1AP_OverloadStart_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_OverloadStart.h000066400000000000000000000020401333553357400214150ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_OverloadStart_H_ #define _S1AP_OverloadStart_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_OverloadStart */ typedef struct S1AP_OverloadStart { S1AP_ProtocolIE_Container_6551P61_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_OverloadStart_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_OverloadStart; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_OverloadStart_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_OverloadStart_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_OverloadStart_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_OverloadStop.c000066400000000000000000000032201333553357400212410ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_OverloadStop.h" asn_TYPE_member_t asn_MBR_S1AP_OverloadStop_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_OverloadStop, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P62, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_OverloadStop_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_OverloadStop_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_OverloadStop_specs_1 = { sizeof(struct S1AP_OverloadStop), offsetof(struct S1AP_OverloadStop, _asn_ctx), asn_MAP_S1AP_OverloadStop_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_OverloadStop = { "OverloadStop", "OverloadStop", &asn_OP_SEQUENCE, asn_DEF_S1AP_OverloadStop_tags_1, sizeof(asn_DEF_S1AP_OverloadStop_tags_1) /sizeof(asn_DEF_S1AP_OverloadStop_tags_1[0]), /* 1 */ asn_DEF_S1AP_OverloadStop_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_OverloadStop_tags_1) /sizeof(asn_DEF_S1AP_OverloadStop_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_OverloadStop_1, 1, /* Elements count */ &asn_SPC_S1AP_OverloadStop_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_OverloadStop.h000066400000000000000000000020271333553357400212520ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_OverloadStop_H_ #define _S1AP_OverloadStop_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_OverloadStop */ typedef struct S1AP_OverloadStop { S1AP_ProtocolIE_Container_6551P62_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_OverloadStop_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_OverloadStop; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_OverloadStop_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_OverloadStop_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_OverloadStop_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PDCP-SN.c000066400000000000000000000034061333553357400176720ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_PDCP-SN.h" int S1AP_PDCP_SN_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 4095)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_PDCP_SN_constr_1 CC_NOTUSED = { { 2, 1 } /* (0..4095) */, -1}; asn_per_constraints_t asn_PER_type_S1AP_PDCP_SN_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 12, 12, 0, 4095 } /* (0..4095) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_PDCP_SN_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_PDCP_SN = { "PDCP-SN", "PDCP-SN", &asn_OP_NativeInteger, asn_DEF_S1AP_PDCP_SN_tags_1, sizeof(asn_DEF_S1AP_PDCP_SN_tags_1) /sizeof(asn_DEF_S1AP_PDCP_SN_tags_1[0]), /* 1 */ asn_DEF_S1AP_PDCP_SN_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_PDCP_SN_tags_1) /sizeof(asn_DEF_S1AP_PDCP_SN_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_PDCP_SN_constr_1, &asn_PER_type_S1AP_PDCP_SN_constr_1, S1AP_PDCP_SN_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PDCP-SN.h000066400000000000000000000023331333553357400176750ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_PDCP_SN_H_ #define _S1AP_PDCP_SN_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_PDCP-SN */ typedef long S1AP_PDCP_SN_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_PDCP_SN_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_PDCP_SN; asn_struct_free_f S1AP_PDCP_SN_free; asn_struct_print_f S1AP_PDCP_SN_print; asn_constr_check_f S1AP_PDCP_SN_constraint; ber_type_decoder_f S1AP_PDCP_SN_decode_ber; der_type_encoder_f S1AP_PDCP_SN_encode_der; xer_type_decoder_f S1AP_PDCP_SN_decode_xer; xer_type_encoder_f S1AP_PDCP_SN_encode_xer; oer_type_decoder_f S1AP_PDCP_SN_decode_oer; oer_type_encoder_f S1AP_PDCP_SN_encode_oer; per_type_decoder_f S1AP_PDCP_SN_decode_uper; per_type_encoder_f S1AP_PDCP_SN_encode_uper; per_type_decoder_f S1AP_PDCP_SN_decode_aper; per_type_encoder_f S1AP_PDCP_SN_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_PDCP_SN_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PDCP-SNExtended.c000066400000000000000000000036221333553357400213530ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_PDCP-SNExtended.h" int S1AP_PDCP_SNExtended_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 32767)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_PDCP_SNExtended_constr_1 CC_NOTUSED = { { 2, 1 } /* (0..32767) */, -1}; asn_per_constraints_t asn_PER_type_S1AP_PDCP_SNExtended_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 15, 15, 0, 32767 } /* (0..32767) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_PDCP_SNExtended_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_PDCP_SNExtended = { "PDCP-SNExtended", "PDCP-SNExtended", &asn_OP_NativeInteger, asn_DEF_S1AP_PDCP_SNExtended_tags_1, sizeof(asn_DEF_S1AP_PDCP_SNExtended_tags_1) /sizeof(asn_DEF_S1AP_PDCP_SNExtended_tags_1[0]), /* 1 */ asn_DEF_S1AP_PDCP_SNExtended_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_PDCP_SNExtended_tags_1) /sizeof(asn_DEF_S1AP_PDCP_SNExtended_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_PDCP_SNExtended_constr_1, &asn_PER_type_S1AP_PDCP_SNExtended_constr_1, S1AP_PDCP_SNExtended_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PDCP-SNExtended.h000066400000000000000000000025731333553357400213640ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_PDCP_SNExtended_H_ #define _S1AP_PDCP_SNExtended_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_PDCP-SNExtended */ typedef long S1AP_PDCP_SNExtended_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_PDCP_SNExtended_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_PDCP_SNExtended; asn_struct_free_f S1AP_PDCP_SNExtended_free; asn_struct_print_f S1AP_PDCP_SNExtended_print; asn_constr_check_f S1AP_PDCP_SNExtended_constraint; ber_type_decoder_f S1AP_PDCP_SNExtended_decode_ber; der_type_encoder_f S1AP_PDCP_SNExtended_encode_der; xer_type_decoder_f S1AP_PDCP_SNExtended_decode_xer; xer_type_encoder_f S1AP_PDCP_SNExtended_encode_xer; oer_type_decoder_f S1AP_PDCP_SNExtended_decode_oer; oer_type_encoder_f S1AP_PDCP_SNExtended_encode_oer; per_type_decoder_f S1AP_PDCP_SNExtended_decode_uper; per_type_encoder_f S1AP_PDCP_SNExtended_encode_uper; per_type_decoder_f S1AP_PDCP_SNExtended_decode_aper; per_type_encoder_f S1AP_PDCP_SNExtended_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_PDCP_SNExtended_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PDCP-SNlength18.c000066400000000000000000000036251333553357400212500ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_PDCP-SNlength18.h" int S1AP_PDCP_SNlength18_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 262143)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_PDCP_SNlength18_constr_1 CC_NOTUSED = { { 4, 1 } /* (0..262143) */, -1}; asn_per_constraints_t asn_PER_type_S1AP_PDCP_SNlength18_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 18, -1, 0, 262143 } /* (0..262143) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_PDCP_SNlength18_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_PDCP_SNlength18 = { "PDCP-SNlength18", "PDCP-SNlength18", &asn_OP_NativeInteger, asn_DEF_S1AP_PDCP_SNlength18_tags_1, sizeof(asn_DEF_S1AP_PDCP_SNlength18_tags_1) /sizeof(asn_DEF_S1AP_PDCP_SNlength18_tags_1[0]), /* 1 */ asn_DEF_S1AP_PDCP_SNlength18_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_PDCP_SNlength18_tags_1) /sizeof(asn_DEF_S1AP_PDCP_SNlength18_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_PDCP_SNlength18_constr_1, &asn_PER_type_S1AP_PDCP_SNlength18_constr_1, S1AP_PDCP_SNlength18_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PDCP-SNlength18.h000066400000000000000000000025731333553357400212560ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_PDCP_SNlength18_H_ #define _S1AP_PDCP_SNlength18_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_PDCP-SNlength18 */ typedef long S1AP_PDCP_SNlength18_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_PDCP_SNlength18_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_PDCP_SNlength18; asn_struct_free_f S1AP_PDCP_SNlength18_free; asn_struct_print_f S1AP_PDCP_SNlength18_print; asn_constr_check_f S1AP_PDCP_SNlength18_constraint; ber_type_decoder_f S1AP_PDCP_SNlength18_decode_ber; der_type_encoder_f S1AP_PDCP_SNlength18_encode_der; xer_type_decoder_f S1AP_PDCP_SNlength18_decode_xer; xer_type_encoder_f S1AP_PDCP_SNlength18_encode_xer; oer_type_decoder_f S1AP_PDCP_SNlength18_decode_oer; oer_type_encoder_f S1AP_PDCP_SNlength18_encode_oer; per_type_decoder_f S1AP_PDCP_SNlength18_decode_uper; per_type_encoder_f S1AP_PDCP_SNlength18_encode_uper; per_type_decoder_f S1AP_PDCP_SNlength18_decode_aper; per_type_encoder_f S1AP_PDCP_SNlength18_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_PDCP_SNlength18_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PLMNidentity.c000066400000000000000000000036401333553357400211460ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_PLMNidentity.h" int S1AP_PLMNidentity_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const S1AP_TBCD_STRING_t *st = (const S1AP_TBCD_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } size = st->size; if((size == 3)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using S1AP_TBCD_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_PLMNidentity_constr_1 CC_NOTUSED = { { 0, 0 }, 3 /* (SIZE(3..3)) */}; asn_per_constraints_t asn_PER_type_S1AP_PLMNidentity_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 3, 3 } /* (SIZE(3..3)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_PLMNidentity_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_PLMNidentity = { "PLMNidentity", "PLMNidentity", &asn_OP_OCTET_STRING, asn_DEF_S1AP_PLMNidentity_tags_1, sizeof(asn_DEF_S1AP_PLMNidentity_tags_1) /sizeof(asn_DEF_S1AP_PLMNidentity_tags_1[0]), /* 1 */ asn_DEF_S1AP_PLMNidentity_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_PLMNidentity_tags_1) /sizeof(asn_DEF_S1AP_PLMNidentity_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_PLMNidentity_constr_1, &asn_PER_type_S1AP_PLMNidentity_constr_1, S1AP_PLMNidentity_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PLMNidentity.h000066400000000000000000000025201333553357400211470ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_PLMNidentity_H_ #define _S1AP_PLMNidentity_H_ #include /* Including external dependencies */ #include "S1AP_TBCD-STRING.h" #ifdef __cplusplus extern "C" { #endif /* S1AP_PLMNidentity */ typedef S1AP_TBCD_STRING_t S1AP_PLMNidentity_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_PLMNidentity_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_PLMNidentity; asn_struct_free_f S1AP_PLMNidentity_free; asn_struct_print_f S1AP_PLMNidentity_print; asn_constr_check_f S1AP_PLMNidentity_constraint; ber_type_decoder_f S1AP_PLMNidentity_decode_ber; der_type_encoder_f S1AP_PLMNidentity_encode_der; xer_type_decoder_f S1AP_PLMNidentity_decode_xer; xer_type_encoder_f S1AP_PLMNidentity_encode_xer; oer_type_decoder_f S1AP_PLMNidentity_decode_oer; oer_type_encoder_f S1AP_PLMNidentity_encode_oer; per_type_decoder_f S1AP_PLMNidentity_decode_uper; per_type_encoder_f S1AP_PLMNidentity_encode_uper; per_type_decoder_f S1AP_PLMNidentity_decode_aper; per_type_encoder_f S1AP_PLMNidentity_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_PLMNidentity_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PS-ServiceNotAvailable.c000066400000000000000000000043331333553357400230300ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_PS-ServiceNotAvailable.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_PS_ServiceNotAvailable_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_PS_ServiceNotAvailable_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_PS_ServiceNotAvailable_value2enum_1[] = { { 0, 24, "ps-service-not-available" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_PS_ServiceNotAvailable_enum2value_1[] = { 0 /* ps-service-not-available(0) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_PS_ServiceNotAvailable_specs_1 = { asn_MAP_S1AP_PS_ServiceNotAvailable_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_PS_ServiceNotAvailable_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_PS_ServiceNotAvailable_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_PS_ServiceNotAvailable = { "PS-ServiceNotAvailable", "PS-ServiceNotAvailable", &asn_OP_NativeEnumerated, asn_DEF_S1AP_PS_ServiceNotAvailable_tags_1, sizeof(asn_DEF_S1AP_PS_ServiceNotAvailable_tags_1) /sizeof(asn_DEF_S1AP_PS_ServiceNotAvailable_tags_1[0]), /* 1 */ asn_DEF_S1AP_PS_ServiceNotAvailable_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_PS_ServiceNotAvailable_tags_1) /sizeof(asn_DEF_S1AP_PS_ServiceNotAvailable_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_PS_ServiceNotAvailable_constr_1, &asn_PER_type_S1AP_PS_ServiceNotAvailable_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_PS_ServiceNotAvailable_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PS-ServiceNotAvailable.h000066400000000000000000000031731333553357400230360ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_PS_ServiceNotAvailable_H_ #define _S1AP_PS_ServiceNotAvailable_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_PS_ServiceNotAvailable { S1AP_PS_ServiceNotAvailable_ps_service_not_available = 0 /* * Enumeration is extensible */ } e_S1AP_PS_ServiceNotAvailable; /* S1AP_PS-ServiceNotAvailable */ typedef long S1AP_PS_ServiceNotAvailable_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_PS_ServiceNotAvailable; asn_struct_free_f S1AP_PS_ServiceNotAvailable_free; asn_struct_print_f S1AP_PS_ServiceNotAvailable_print; asn_constr_check_f S1AP_PS_ServiceNotAvailable_constraint; ber_type_decoder_f S1AP_PS_ServiceNotAvailable_decode_ber; der_type_encoder_f S1AP_PS_ServiceNotAvailable_encode_der; xer_type_decoder_f S1AP_PS_ServiceNotAvailable_decode_xer; xer_type_encoder_f S1AP_PS_ServiceNotAvailable_encode_xer; oer_type_decoder_f S1AP_PS_ServiceNotAvailable_decode_oer; oer_type_encoder_f S1AP_PS_ServiceNotAvailable_encode_oer; per_type_decoder_f S1AP_PS_ServiceNotAvailable_decode_uper; per_type_encoder_f S1AP_PS_ServiceNotAvailable_encode_uper; per_type_decoder_f S1AP_PS_ServiceNotAvailable_decode_aper; per_type_encoder_f S1AP_PS_ServiceNotAvailable_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_PS_ServiceNotAvailable_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PWSFailureIndication.c000066400000000000000000000034601333553357400226110ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_PWSFailureIndication.h" asn_TYPE_member_t asn_MBR_S1AP_PWSFailureIndication_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_PWSFailureIndication, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P72, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_PWSFailureIndication_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_PWSFailureIndication_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_PWSFailureIndication_specs_1 = { sizeof(struct S1AP_PWSFailureIndication), offsetof(struct S1AP_PWSFailureIndication, _asn_ctx), asn_MAP_S1AP_PWSFailureIndication_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_PWSFailureIndication = { "PWSFailureIndication", "PWSFailureIndication", &asn_OP_SEQUENCE, asn_DEF_S1AP_PWSFailureIndication_tags_1, sizeof(asn_DEF_S1AP_PWSFailureIndication_tags_1) /sizeof(asn_DEF_S1AP_PWSFailureIndication_tags_1[0]), /* 1 */ asn_DEF_S1AP_PWSFailureIndication_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_PWSFailureIndication_tags_1) /sizeof(asn_DEF_S1AP_PWSFailureIndication_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_PWSFailureIndication_1, 1, /* Elements count */ &asn_SPC_S1AP_PWSFailureIndication_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PWSFailureIndication.h000066400000000000000000000021371333553357400226160ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_PWSFailureIndication_H_ #define _S1AP_PWSFailureIndication_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_PWSFailureIndication */ typedef struct S1AP_PWSFailureIndication { S1AP_ProtocolIE_Container_6551P72_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_PWSFailureIndication_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_PWSFailureIndication; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_PWSFailureIndication_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_PWSFailureIndication_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_PWSFailureIndication_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PWSRestartIndication.c000066400000000000000000000034601333553357400226460ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_PWSRestartIndication.h" asn_TYPE_member_t asn_MBR_S1AP_PWSRestartIndication_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_PWSRestartIndication, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P71, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_PWSRestartIndication_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_PWSRestartIndication_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_PWSRestartIndication_specs_1 = { sizeof(struct S1AP_PWSRestartIndication), offsetof(struct S1AP_PWSRestartIndication, _asn_ctx), asn_MAP_S1AP_PWSRestartIndication_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_PWSRestartIndication = { "PWSRestartIndication", "PWSRestartIndication", &asn_OP_SEQUENCE, asn_DEF_S1AP_PWSRestartIndication_tags_1, sizeof(asn_DEF_S1AP_PWSRestartIndication_tags_1) /sizeof(asn_DEF_S1AP_PWSRestartIndication_tags_1[0]), /* 1 */ asn_DEF_S1AP_PWSRestartIndication_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_PWSRestartIndication_tags_1) /sizeof(asn_DEF_S1AP_PWSRestartIndication_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_PWSRestartIndication_1, 1, /* Elements count */ &asn_SPC_S1AP_PWSRestartIndication_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PWSRestartIndication.h000066400000000000000000000021371333553357400226530ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_PWSRestartIndication_H_ #define _S1AP_PWSRestartIndication_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_PWSRestartIndication */ typedef struct S1AP_PWSRestartIndication { S1AP_ProtocolIE_Container_6551P71_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_PWSRestartIndication_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_PWSRestartIndication; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_PWSRestartIndication_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_PWSRestartIndication_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_PWSRestartIndication_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PWSfailedECGIList.c000066400000000000000000000035231333553357400217300ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_PWSfailedECGIList.h" #include "S1AP_EUTRAN-CGI.h" static asn_oer_constraints_t asn_OER_type_S1AP_PWSfailedECGIList_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_PWSfailedECGIList_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_PWSfailedECGIList_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_EUTRAN_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_PWSfailedECGIList_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_S1AP_PWSfailedECGIList_specs_1 = { sizeof(struct S1AP_PWSfailedECGIList), offsetof(struct S1AP_PWSfailedECGIList, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_PWSfailedECGIList = { "PWSfailedECGIList", "PWSfailedECGIList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_PWSfailedECGIList_tags_1, sizeof(asn_DEF_S1AP_PWSfailedECGIList_tags_1) /sizeof(asn_DEF_S1AP_PWSfailedECGIList_tags_1[0]), /* 1 */ asn_DEF_S1AP_PWSfailedECGIList_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_PWSfailedECGIList_tags_1) /sizeof(asn_DEF_S1AP_PWSfailedECGIList_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_PWSfailedECGIList_constr_1, &asn_PER_type_S1AP_PWSfailedECGIList_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_PWSfailedECGIList_1, 1, /* Single element */ &asn_SPC_S1AP_PWSfailedECGIList_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PWSfailedECGIList.h000066400000000000000000000016231333553357400217340ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_PWSfailedECGIList_H_ #define _S1AP_PWSfailedECGIList_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_EUTRAN_CGI; /* S1AP_PWSfailedECGIList */ typedef struct S1AP_PWSfailedECGIList { A_SEQUENCE_OF(struct S1AP_EUTRAN_CGI) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_PWSfailedECGIList_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_PWSfailedECGIList; #ifdef __cplusplus } #endif #endif /* _S1AP_PWSfailedECGIList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Paging-eDRX-Cycle.c000066400000000000000000000050521333553357400216670ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Paging-eDRX-Cycle.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_Paging_eDRX_Cycle_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_Paging_eDRX_Cycle_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 13 } /* (0..13,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_Paging_eDRX_Cycle_value2enum_1[] = { { 0, 6, "hfhalf" }, { 1, 3, "hf1" }, { 2, 3, "hf2" }, { 3, 3, "hf4" }, { 4, 3, "hf6" }, { 5, 3, "hf8" }, { 6, 4, "hf10" }, { 7, 4, "hf12" }, { 8, 4, "hf14" }, { 9, 4, "hf16" }, { 10, 4, "hf32" }, { 11, 4, "hf64" }, { 12, 5, "hf128" }, { 13, 5, "hf256" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_Paging_eDRX_Cycle_enum2value_1[] = { 1, /* hf1(1) */ 6, /* hf10(6) */ 7, /* hf12(7) */ 12, /* hf128(12) */ 8, /* hf14(8) */ 9, /* hf16(9) */ 2, /* hf2(2) */ 13, /* hf256(13) */ 10, /* hf32(10) */ 3, /* hf4(3) */ 4, /* hf6(4) */ 11, /* hf64(11) */ 5, /* hf8(5) */ 0 /* hfhalf(0) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_Paging_eDRX_Cycle_specs_1 = { asn_MAP_S1AP_Paging_eDRX_Cycle_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_Paging_eDRX_Cycle_enum2value_1, /* N => "tag"; sorted by N */ 14, /* Number of elements in the maps */ 15, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_Paging_eDRX_Cycle_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Paging_eDRX_Cycle = { "Paging-eDRX-Cycle", "Paging-eDRX-Cycle", &asn_OP_NativeEnumerated, asn_DEF_S1AP_Paging_eDRX_Cycle_tags_1, sizeof(asn_DEF_S1AP_Paging_eDRX_Cycle_tags_1) /sizeof(asn_DEF_S1AP_Paging_eDRX_Cycle_tags_1[0]), /* 1 */ asn_DEF_S1AP_Paging_eDRX_Cycle_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Paging_eDRX_Cycle_tags_1) /sizeof(asn_DEF_S1AP_Paging_eDRX_Cycle_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_Paging_eDRX_Cycle_constr_1, &asn_PER_type_S1AP_Paging_eDRX_Cycle_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_Paging_eDRX_Cycle_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Paging-eDRX-Cycle.h000066400000000000000000000040101333553357400216650ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Paging_eDRX_Cycle_H_ #define _S1AP_Paging_eDRX_Cycle_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_Paging_eDRX_Cycle { S1AP_Paging_eDRX_Cycle_hfhalf = 0, S1AP_Paging_eDRX_Cycle_hf1 = 1, S1AP_Paging_eDRX_Cycle_hf2 = 2, S1AP_Paging_eDRX_Cycle_hf4 = 3, S1AP_Paging_eDRX_Cycle_hf6 = 4, S1AP_Paging_eDRX_Cycle_hf8 = 5, S1AP_Paging_eDRX_Cycle_hf10 = 6, S1AP_Paging_eDRX_Cycle_hf12 = 7, S1AP_Paging_eDRX_Cycle_hf14 = 8, S1AP_Paging_eDRX_Cycle_hf16 = 9, S1AP_Paging_eDRX_Cycle_hf32 = 10, S1AP_Paging_eDRX_Cycle_hf64 = 11, S1AP_Paging_eDRX_Cycle_hf128 = 12, S1AP_Paging_eDRX_Cycle_hf256 = 13 /* * Enumeration is extensible */ } e_S1AP_Paging_eDRX_Cycle; /* S1AP_Paging-eDRX-Cycle */ typedef long S1AP_Paging_eDRX_Cycle_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_Paging_eDRX_Cycle_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_Paging_eDRX_Cycle; extern const asn_INTEGER_specifics_t asn_SPC_Paging_eDRX_Cycle_specs_1; asn_struct_free_f Paging_eDRX_Cycle_free; asn_struct_print_f Paging_eDRX_Cycle_print; asn_constr_check_f Paging_eDRX_Cycle_constraint; ber_type_decoder_f Paging_eDRX_Cycle_decode_ber; der_type_encoder_f Paging_eDRX_Cycle_encode_der; xer_type_decoder_f Paging_eDRX_Cycle_decode_xer; xer_type_encoder_f Paging_eDRX_Cycle_encode_xer; oer_type_decoder_f Paging_eDRX_Cycle_decode_oer; oer_type_encoder_f Paging_eDRX_Cycle_encode_oer; per_type_decoder_f Paging_eDRX_Cycle_decode_uper; per_type_encoder_f Paging_eDRX_Cycle_encode_uper; per_type_decoder_f Paging_eDRX_Cycle_decode_aper; per_type_encoder_f Paging_eDRX_Cycle_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Paging_eDRX_Cycle_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Paging-eDRXInformation.c000066400000000000000000000053171333553357400230440ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Paging-eDRXInformation.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_Paging_eDRXInformation_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_Paging_eDRXInformation, paging_eDRX_Cycle), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Paging_eDRX_Cycle, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "paging-eDRX-Cycle" }, { ATF_POINTER, 2, offsetof(struct S1AP_Paging_eDRXInformation, pagingTimeWindow), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_PagingTimeWindow, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "pagingTimeWindow" }, { ATF_POINTER, 1, offsetof(struct S1AP_Paging_eDRXInformation, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P77, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_Paging_eDRXInformation_oms_1[] = { 1, 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_Paging_eDRXInformation_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_Paging_eDRXInformation_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* paging-eDRX-Cycle */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* pagingTimeWindow */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_Paging_eDRXInformation_specs_1 = { sizeof(struct S1AP_Paging_eDRXInformation), offsetof(struct S1AP_Paging_eDRXInformation, _asn_ctx), asn_MAP_S1AP_Paging_eDRXInformation_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_Paging_eDRXInformation_oms_1, /* Optional members */ 2, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_Paging_eDRXInformation = { "Paging-eDRXInformation", "Paging-eDRXInformation", &asn_OP_SEQUENCE, asn_DEF_S1AP_Paging_eDRXInformation_tags_1, sizeof(asn_DEF_S1AP_Paging_eDRXInformation_tags_1) /sizeof(asn_DEF_S1AP_Paging_eDRXInformation_tags_1[0]), /* 1 */ asn_DEF_S1AP_Paging_eDRXInformation_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Paging_eDRXInformation_tags_1) /sizeof(asn_DEF_S1AP_Paging_eDRXInformation_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_Paging_eDRXInformation_1, 3, /* Elements count */ &asn_SPC_S1AP_Paging_eDRXInformation_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Paging-eDRXInformation.h000066400000000000000000000022711333553357400230450ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Paging_eDRXInformation_H_ #define _S1AP_Paging_eDRXInformation_H_ #include /* Including external dependencies */ #include "S1AP_Paging-eDRX-Cycle.h" #include "S1AP_PagingTimeWindow.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_Paging-eDRXInformation */ typedef struct S1AP_Paging_eDRXInformation { S1AP_Paging_eDRX_Cycle_t paging_eDRX_Cycle; S1AP_PagingTimeWindow_t *pagingTimeWindow; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_Paging_eDRXInformation_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Paging_eDRXInformation; #ifdef __cplusplus } #endif #endif /* _S1AP_Paging_eDRXInformation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Paging.c000066400000000000000000000030301333553357400200240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Paging.h" asn_TYPE_member_t asn_MBR_S1AP_Paging_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_Paging, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P22, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_Paging_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_Paging_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_Paging_specs_1 = { sizeof(struct S1AP_Paging), offsetof(struct S1AP_Paging, _asn_ctx), asn_MAP_S1AP_Paging_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_Paging = { "Paging", "Paging", &asn_OP_SEQUENCE, asn_DEF_S1AP_Paging_tags_1, sizeof(asn_DEF_S1AP_Paging_tags_1) /sizeof(asn_DEF_S1AP_Paging_tags_1[0]), /* 1 */ asn_DEF_S1AP_Paging_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Paging_tags_1) /sizeof(asn_DEF_S1AP_Paging_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_Paging_1, 1, /* Elements count */ &asn_SPC_S1AP_Paging_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Paging.h000066400000000000000000000017411333553357400200400ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Paging_H_ #define _S1AP_Paging_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_Paging */ typedef struct S1AP_Paging { S1AP_ProtocolIE_Container_6551P22_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_Paging_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Paging; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_Paging_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_Paging_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_Paging_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PagingAttemptCount.c000066400000000000000000000036761333553357400224140ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_PagingAttemptCount.h" int S1AP_PagingAttemptCount_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 1 && value <= 16)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_PagingAttemptCount_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_PagingAttemptCount_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 1, 16 } /* (1..16,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_PagingAttemptCount_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_PagingAttemptCount = { "PagingAttemptCount", "PagingAttemptCount", &asn_OP_NativeInteger, asn_DEF_S1AP_PagingAttemptCount_tags_1, sizeof(asn_DEF_S1AP_PagingAttemptCount_tags_1) /sizeof(asn_DEF_S1AP_PagingAttemptCount_tags_1[0]), /* 1 */ asn_DEF_S1AP_PagingAttemptCount_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_PagingAttemptCount_tags_1) /sizeof(asn_DEF_S1AP_PagingAttemptCount_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_PagingAttemptCount_constr_1, &asn_PER_type_S1AP_PagingAttemptCount_constr_1, S1AP_PagingAttemptCount_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PagingAttemptCount.h000066400000000000000000000026671333553357400224200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_PagingAttemptCount_H_ #define _S1AP_PagingAttemptCount_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_PagingAttemptCount */ typedef long S1AP_PagingAttemptCount_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_PagingAttemptCount_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_PagingAttemptCount; asn_struct_free_f S1AP_PagingAttemptCount_free; asn_struct_print_f S1AP_PagingAttemptCount_print; asn_constr_check_f S1AP_PagingAttemptCount_constraint; ber_type_decoder_f S1AP_PagingAttemptCount_decode_ber; der_type_encoder_f S1AP_PagingAttemptCount_encode_der; xer_type_decoder_f S1AP_PagingAttemptCount_decode_xer; xer_type_encoder_f S1AP_PagingAttemptCount_encode_xer; oer_type_decoder_f S1AP_PagingAttemptCount_decode_oer; oer_type_encoder_f S1AP_PagingAttemptCount_encode_oer; per_type_decoder_f S1AP_PagingAttemptCount_decode_uper; per_type_encoder_f S1AP_PagingAttemptCount_encode_uper; per_type_decoder_f S1AP_PagingAttemptCount_decode_aper; per_type_encoder_f S1AP_PagingAttemptCount_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_PagingAttemptCount_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PagingAttemptInformation.c000066400000000000000000000062311333553357400235770ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_PagingAttemptInformation.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_PagingAttemptInformation_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_PagingAttemptInformation, pagingAttemptCount), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_PagingAttemptCount, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "pagingAttemptCount" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PagingAttemptInformation, intendedNumberOfPagingAttempts), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_IntendedNumberOfPagingAttempts, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "intendedNumberOfPagingAttempts" }, { ATF_POINTER, 2, offsetof(struct S1AP_PagingAttemptInformation, nextPagingAreaScope), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_NextPagingAreaScope, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "nextPagingAreaScope" }, { ATF_POINTER, 1, offsetof(struct S1AP_PagingAttemptInformation, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P76, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_PagingAttemptInformation_oms_1[] = { 2, 3 }; static const ber_tlv_tag_t asn_DEF_S1AP_PagingAttemptInformation_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_PagingAttemptInformation_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pagingAttemptCount */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* intendedNumberOfPagingAttempts */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* nextPagingAreaScope */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_PagingAttemptInformation_specs_1 = { sizeof(struct S1AP_PagingAttemptInformation), offsetof(struct S1AP_PagingAttemptInformation, _asn_ctx), asn_MAP_S1AP_PagingAttemptInformation_tag2el_1, 4, /* Count of tags in the map */ asn_MAP_S1AP_PagingAttemptInformation_oms_1, /* Optional members */ 2, 0, /* Root/Additions */ 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_PagingAttemptInformation = { "PagingAttemptInformation", "PagingAttemptInformation", &asn_OP_SEQUENCE, asn_DEF_S1AP_PagingAttemptInformation_tags_1, sizeof(asn_DEF_S1AP_PagingAttemptInformation_tags_1) /sizeof(asn_DEF_S1AP_PagingAttemptInformation_tags_1[0]), /* 1 */ asn_DEF_S1AP_PagingAttemptInformation_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_PagingAttemptInformation_tags_1) /sizeof(asn_DEF_S1AP_PagingAttemptInformation_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_PagingAttemptInformation_1, 4, /* Elements count */ &asn_SPC_S1AP_PagingAttemptInformation_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PagingAttemptInformation.h000066400000000000000000000027401333553357400236050ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_PagingAttemptInformation_H_ #define _S1AP_PagingAttemptInformation_H_ #include /* Including external dependencies */ #include "S1AP_PagingAttemptCount.h" #include "S1AP_IntendedNumberOfPagingAttempts.h" #include "S1AP_NextPagingAreaScope.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_PagingAttemptInformation */ typedef struct S1AP_PagingAttemptInformation { S1AP_PagingAttemptCount_t pagingAttemptCount; S1AP_IntendedNumberOfPagingAttempts_t intendedNumberOfPagingAttempts; S1AP_NextPagingAreaScope_t *nextPagingAreaScope; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_PagingAttemptInformation_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_PagingAttemptInformation; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_PagingAttemptInformation_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_PagingAttemptInformation_1[4]; #ifdef __cplusplus } #endif #endif /* _S1AP_PagingAttemptInformation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PagingDRX.c000066400000000000000000000040141333553357400204050ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_PagingDRX.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_PagingDRX_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_PagingDRX_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_PagingDRX_value2enum_1[] = { { 0, 3, "v32" }, { 1, 3, "v64" }, { 2, 4, "v128" }, { 3, 4, "v256" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_PagingDRX_enum2value_1[] = { 2, /* v128(2) */ 3, /* v256(3) */ 0, /* v32(0) */ 1 /* v64(1) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_PagingDRX_specs_1 = { asn_MAP_S1AP_PagingDRX_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_PagingDRX_enum2value_1, /* N => "tag"; sorted by N */ 4, /* Number of elements in the maps */ 5, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_PagingDRX_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_PagingDRX = { "PagingDRX", "PagingDRX", &asn_OP_NativeEnumerated, asn_DEF_S1AP_PagingDRX_tags_1, sizeof(asn_DEF_S1AP_PagingDRX_tags_1) /sizeof(asn_DEF_S1AP_PagingDRX_tags_1[0]), /* 1 */ asn_DEF_S1AP_PagingDRX_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_PagingDRX_tags_1) /sizeof(asn_DEF_S1AP_PagingDRX_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_PagingDRX_constr_1, &asn_PER_type_S1AP_PagingDRX_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_PagingDRX_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PagingDRX.h000066400000000000000000000026251333553357400204200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_PagingDRX_H_ #define _S1AP_PagingDRX_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_PagingDRX { S1AP_PagingDRX_v32 = 0, S1AP_PagingDRX_v64 = 1, S1AP_PagingDRX_v128 = 2, S1AP_PagingDRX_v256 = 3 /* * Enumeration is extensible */ } e_S1AP_PagingDRX; /* S1AP_PagingDRX */ typedef long S1AP_PagingDRX_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_PagingDRX; asn_struct_free_f S1AP_PagingDRX_free; asn_struct_print_f S1AP_PagingDRX_print; asn_constr_check_f S1AP_PagingDRX_constraint; ber_type_decoder_f S1AP_PagingDRX_decode_ber; der_type_encoder_f S1AP_PagingDRX_encode_der; xer_type_decoder_f S1AP_PagingDRX_decode_xer; xer_type_encoder_f S1AP_PagingDRX_encode_xer; oer_type_decoder_f S1AP_PagingDRX_decode_oer; oer_type_encoder_f S1AP_PagingDRX_encode_oer; per_type_decoder_f S1AP_PagingDRX_decode_uper; per_type_encoder_f S1AP_PagingDRX_encode_uper; per_type_decoder_f S1AP_PagingDRX_decode_aper; per_type_encoder_f S1AP_PagingDRX_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_PagingDRX_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PagingPriority.c000066400000000000000000000045651333553357400216040ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_PagingPriority.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_PagingPriority_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_PagingPriority_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 7 } /* (0..7,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_PagingPriority_value2enum_1[] = { { 0, 10, "priolevel1" }, { 1, 10, "priolevel2" }, { 2, 10, "priolevel3" }, { 3, 10, "priolevel4" }, { 4, 10, "priolevel5" }, { 5, 10, "priolevel6" }, { 6, 10, "priolevel7" }, { 7, 10, "priolevel8" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_PagingPriority_enum2value_1[] = { 0, /* priolevel1(0) */ 1, /* priolevel2(1) */ 2, /* priolevel3(2) */ 3, /* priolevel4(3) */ 4, /* priolevel5(4) */ 5, /* priolevel6(5) */ 6, /* priolevel7(6) */ 7 /* priolevel8(7) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_PagingPriority_specs_1 = { asn_MAP_S1AP_PagingPriority_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_PagingPriority_enum2value_1, /* N => "tag"; sorted by N */ 8, /* Number of elements in the maps */ 9, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_PagingPriority_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_PagingPriority = { "PagingPriority", "PagingPriority", &asn_OP_NativeEnumerated, asn_DEF_S1AP_PagingPriority_tags_1, sizeof(asn_DEF_S1AP_PagingPriority_tags_1) /sizeof(asn_DEF_S1AP_PagingPriority_tags_1[0]), /* 1 */ asn_DEF_S1AP_PagingPriority_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_PagingPriority_tags_1) /sizeof(asn_DEF_S1AP_PagingPriority_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_PagingPriority_constr_1, &asn_PER_type_S1AP_PagingPriority_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_PagingPriority_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PagingPriority.h000066400000000000000000000033001333553357400215730ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_PagingPriority_H_ #define _S1AP_PagingPriority_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_PagingPriority { S1AP_PagingPriority_priolevel1 = 0, S1AP_PagingPriority_priolevel2 = 1, S1AP_PagingPriority_priolevel3 = 2, S1AP_PagingPriority_priolevel4 = 3, S1AP_PagingPriority_priolevel5 = 4, S1AP_PagingPriority_priolevel6 = 5, S1AP_PagingPriority_priolevel7 = 6, S1AP_PagingPriority_priolevel8 = 7 /* * Enumeration is extensible */ } e_S1AP_PagingPriority; /* S1AP_PagingPriority */ typedef long S1AP_PagingPriority_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_PagingPriority; asn_struct_free_f S1AP_PagingPriority_free; asn_struct_print_f S1AP_PagingPriority_print; asn_constr_check_f S1AP_PagingPriority_constraint; ber_type_decoder_f S1AP_PagingPriority_decode_ber; der_type_encoder_f S1AP_PagingPriority_encode_der; xer_type_decoder_f S1AP_PagingPriority_decode_xer; xer_type_encoder_f S1AP_PagingPriority_encode_xer; oer_type_decoder_f S1AP_PagingPriority_decode_oer; oer_type_encoder_f S1AP_PagingPriority_encode_oer; per_type_decoder_f S1AP_PagingPriority_decode_uper; per_type_encoder_f S1AP_PagingPriority_encode_uper; per_type_decoder_f S1AP_PagingPriority_decode_aper; per_type_encoder_f S1AP_PagingPriority_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_PagingPriority_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PagingTimeWindow.c000066400000000000000000000050651333553357400220450ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_PagingTimeWindow.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_PagingTimeWindow_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_PagingTimeWindow_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 4, 4, 0, 15 } /* (0..15,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_PagingTimeWindow_value2enum_1[] = { { 0, 2, "s1" }, { 1, 2, "s2" }, { 2, 2, "s3" }, { 3, 2, "s4" }, { 4, 2, "s5" }, { 5, 2, "s6" }, { 6, 2, "s7" }, { 7, 2, "s8" }, { 8, 2, "s9" }, { 9, 3, "s10" }, { 10, 3, "s11" }, { 11, 3, "s12" }, { 12, 3, "s13" }, { 13, 3, "s14" }, { 14, 3, "s15" }, { 15, 3, "s16" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_PagingTimeWindow_enum2value_1[] = { 0, /* s1(0) */ 9, /* s10(9) */ 10, /* s11(10) */ 11, /* s12(11) */ 12, /* s13(12) */ 13, /* s14(13) */ 14, /* s15(14) */ 15, /* s16(15) */ 1, /* s2(1) */ 2, /* s3(2) */ 3, /* s4(3) */ 4, /* s5(4) */ 5, /* s6(5) */ 6, /* s7(6) */ 7, /* s8(7) */ 8 /* s9(8) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_PagingTimeWindow_specs_1 = { asn_MAP_S1AP_PagingTimeWindow_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_PagingTimeWindow_enum2value_1, /* N => "tag"; sorted by N */ 16, /* Number of elements in the maps */ 17, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_PagingTimeWindow_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_PagingTimeWindow = { "PagingTimeWindow", "PagingTimeWindow", &asn_OP_NativeEnumerated, asn_DEF_S1AP_PagingTimeWindow_tags_1, sizeof(asn_DEF_S1AP_PagingTimeWindow_tags_1) /sizeof(asn_DEF_S1AP_PagingTimeWindow_tags_1[0]), /* 1 */ asn_DEF_S1AP_PagingTimeWindow_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_PagingTimeWindow_tags_1) /sizeof(asn_DEF_S1AP_PagingTimeWindow_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_PagingTimeWindow_constr_1, &asn_PER_type_S1AP_PagingTimeWindow_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_PagingTimeWindow_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PagingTimeWindow.h000066400000000000000000000040171333553357400220460ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_PagingTimeWindow_H_ #define _S1AP_PagingTimeWindow_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_PagingTimeWindow { S1AP_PagingTimeWindow_s1 = 0, S1AP_PagingTimeWindow_s2 = 1, S1AP_PagingTimeWindow_s3 = 2, S1AP_PagingTimeWindow_s4 = 3, S1AP_PagingTimeWindow_s5 = 4, S1AP_PagingTimeWindow_s6 = 5, S1AP_PagingTimeWindow_s7 = 6, S1AP_PagingTimeWindow_s8 = 7, S1AP_PagingTimeWindow_s9 = 8, S1AP_PagingTimeWindow_s10 = 9, S1AP_PagingTimeWindow_s11 = 10, S1AP_PagingTimeWindow_s12 = 11, S1AP_PagingTimeWindow_s13 = 12, S1AP_PagingTimeWindow_s14 = 13, S1AP_PagingTimeWindow_s15 = 14, S1AP_PagingTimeWindow_s16 = 15 /* * Enumeration is extensible */ } e_S1AP_PagingTimeWindow; /* S1AP_PagingTimeWindow */ typedef long S1AP_PagingTimeWindow_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_PagingTimeWindow_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_PagingTimeWindow; extern const asn_INTEGER_specifics_t asn_SPC_PagingTimeWindow_specs_1; asn_struct_free_f PagingTimeWindow_free; asn_struct_print_f PagingTimeWindow_print; asn_constr_check_f PagingTimeWindow_constraint; ber_type_decoder_f PagingTimeWindow_decode_ber; der_type_encoder_f PagingTimeWindow_encode_der; xer_type_decoder_f PagingTimeWindow_decode_xer; xer_type_encoder_f PagingTimeWindow_encode_xer; oer_type_decoder_f PagingTimeWindow_decode_oer; oer_type_encoder_f PagingTimeWindow_encode_oer; per_type_decoder_f PagingTimeWindow_decode_uper; per_type_encoder_f PagingTimeWindow_encode_uper; per_type_decoder_f PagingTimeWindow_decode_aper; per_type_encoder_f PagingTimeWindow_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_PagingTimeWindow_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PathSwitchRequest.c000066400000000000000000000033631333553357400222570ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_PathSwitchRequest.h" asn_TYPE_member_t asn_MBR_S1AP_PathSwitchRequest_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequest, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P7, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_PathSwitchRequest_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_PathSwitchRequest_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_PathSwitchRequest_specs_1 = { sizeof(struct S1AP_PathSwitchRequest), offsetof(struct S1AP_PathSwitchRequest, _asn_ctx), asn_MAP_S1AP_PathSwitchRequest_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_PathSwitchRequest = { "PathSwitchRequest", "PathSwitchRequest", &asn_OP_SEQUENCE, asn_DEF_S1AP_PathSwitchRequest_tags_1, sizeof(asn_DEF_S1AP_PathSwitchRequest_tags_1) /sizeof(asn_DEF_S1AP_PathSwitchRequest_tags_1[0]), /* 1 */ asn_DEF_S1AP_PathSwitchRequest_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_PathSwitchRequest_tags_1) /sizeof(asn_DEF_S1AP_PathSwitchRequest_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_PathSwitchRequest_1, 1, /* Elements count */ &asn_SPC_S1AP_PathSwitchRequest_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PathSwitchRequest.h000066400000000000000000000021031333553357400222530ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_PathSwitchRequest_H_ #define _S1AP_PathSwitchRequest_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_PathSwitchRequest */ typedef struct S1AP_PathSwitchRequest { S1AP_ProtocolIE_Container_6551P7_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_PathSwitchRequest_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_PathSwitchRequest; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_PathSwitchRequest_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_PathSwitchRequest_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_PathSwitchRequest_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PathSwitchRequestAcknowledge.c000066400000000000000000000037171333553357400244260ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_PathSwitchRequestAcknowledge.h" asn_TYPE_member_t asn_MBR_S1AP_PathSwitchRequestAcknowledge_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestAcknowledge, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P8, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_PathSwitchRequestAcknowledge_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_PathSwitchRequestAcknowledge_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_PathSwitchRequestAcknowledge_specs_1 = { sizeof(struct S1AP_PathSwitchRequestAcknowledge), offsetof(struct S1AP_PathSwitchRequestAcknowledge, _asn_ctx), asn_MAP_S1AP_PathSwitchRequestAcknowledge_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_PathSwitchRequestAcknowledge = { "PathSwitchRequestAcknowledge", "PathSwitchRequestAcknowledge", &asn_OP_SEQUENCE, asn_DEF_S1AP_PathSwitchRequestAcknowledge_tags_1, sizeof(asn_DEF_S1AP_PathSwitchRequestAcknowledge_tags_1) /sizeof(asn_DEF_S1AP_PathSwitchRequestAcknowledge_tags_1[0]), /* 1 */ asn_DEF_S1AP_PathSwitchRequestAcknowledge_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_PathSwitchRequestAcknowledge_tags_1) /sizeof(asn_DEF_S1AP_PathSwitchRequestAcknowledge_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_PathSwitchRequestAcknowledge_1, 1, /* Elements count */ &asn_SPC_S1AP_PathSwitchRequestAcknowledge_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PathSwitchRequestAcknowledge.h000066400000000000000000000022461333553357400244270ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_PathSwitchRequestAcknowledge_H_ #define _S1AP_PathSwitchRequestAcknowledge_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_PathSwitchRequestAcknowledge */ typedef struct S1AP_PathSwitchRequestAcknowledge { S1AP_ProtocolIE_Container_6551P8_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_PathSwitchRequestAcknowledge_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_PathSwitchRequestAcknowledge; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_PathSwitchRequestAcknowledge_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_PathSwitchRequestAcknowledge_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_PathSwitchRequestAcknowledge_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PathSwitchRequestFailure.c000066400000000000000000000035771333553357400235760ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_PathSwitchRequestFailure.h" asn_TYPE_member_t asn_MBR_S1AP_PathSwitchRequestFailure_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestFailure, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P9, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_PathSwitchRequestFailure_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_PathSwitchRequestFailure_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_PathSwitchRequestFailure_specs_1 = { sizeof(struct S1AP_PathSwitchRequestFailure), offsetof(struct S1AP_PathSwitchRequestFailure, _asn_ctx), asn_MAP_S1AP_PathSwitchRequestFailure_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_PathSwitchRequestFailure = { "PathSwitchRequestFailure", "PathSwitchRequestFailure", &asn_OP_SEQUENCE, asn_DEF_S1AP_PathSwitchRequestFailure_tags_1, sizeof(asn_DEF_S1AP_PathSwitchRequestFailure_tags_1) /sizeof(asn_DEF_S1AP_PathSwitchRequestFailure_tags_1[0]), /* 1 */ asn_DEF_S1AP_PathSwitchRequestFailure_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_PathSwitchRequestFailure_tags_1) /sizeof(asn_DEF_S1AP_PathSwitchRequestFailure_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_PathSwitchRequestFailure_1, 1, /* Elements count */ &asn_SPC_S1AP_PathSwitchRequestFailure_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PathSwitchRequestFailure.h000066400000000000000000000022021333553357400235630ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_PathSwitchRequestFailure_H_ #define _S1AP_PathSwitchRequestFailure_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_PathSwitchRequestFailure */ typedef struct S1AP_PathSwitchRequestFailure { S1AP_ProtocolIE_Container_6551P9_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_PathSwitchRequestFailure_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_PathSwitchRequestFailure; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_PathSwitchRequestFailure_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_PathSwitchRequestFailure_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_PathSwitchRequestFailure_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PedestrianUE.c000066400000000000000000000040311333553357400211510ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_PedestrianUE.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_PedestrianUE_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_PedestrianUE_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_PedestrianUE_value2enum_1[] = { { 0, 10, "authorized" }, { 1, 14, "not-authorized" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_PedestrianUE_enum2value_1[] = { 0, /* authorized(0) */ 1 /* not-authorized(1) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_PedestrianUE_specs_1 = { asn_MAP_S1AP_PedestrianUE_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_PedestrianUE_enum2value_1, /* N => "tag"; sorted by N */ 2, /* Number of elements in the maps */ 3, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_PedestrianUE_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_PedestrianUE = { "PedestrianUE", "PedestrianUE", &asn_OP_NativeEnumerated, asn_DEF_S1AP_PedestrianUE_tags_1, sizeof(asn_DEF_S1AP_PedestrianUE_tags_1) /sizeof(asn_DEF_S1AP_PedestrianUE_tags_1[0]), /* 1 */ asn_DEF_S1AP_PedestrianUE_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_PedestrianUE_tags_1) /sizeof(asn_DEF_S1AP_PedestrianUE_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_PedestrianUE_constr_1, &asn_PER_type_S1AP_PedestrianUE_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_PedestrianUE_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PedestrianUE.h000066400000000000000000000030001333553357400211510ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_PedestrianUE_H_ #define _S1AP_PedestrianUE_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_PedestrianUE { S1AP_PedestrianUE_authorized = 0, S1AP_PedestrianUE_not_authorized = 1 /* * Enumeration is extensible */ } e_S1AP_PedestrianUE; /* S1AP_PedestrianUE */ typedef long S1AP_PedestrianUE_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_PedestrianUE_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_PedestrianUE; extern const asn_INTEGER_specifics_t asn_SPC_PedestrianUE_specs_1; asn_struct_free_f PedestrianUE_free; asn_struct_print_f PedestrianUE_print; asn_constr_check_f PedestrianUE_constraint; ber_type_decoder_f PedestrianUE_decode_ber; der_type_encoder_f PedestrianUE_encode_der; xer_type_decoder_f PedestrianUE_decode_xer; xer_type_encoder_f PedestrianUE_encode_xer; oer_type_decoder_f PedestrianUE_decode_oer; oer_type_encoder_f PedestrianUE_encode_oer; per_type_decoder_f PedestrianUE_decode_uper; per_type_encoder_f PedestrianUE_encode_uper; per_type_decoder_f PedestrianUE_decode_aper; per_type_encoder_f PedestrianUE_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_PedestrianUE_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Port-Number.c000066400000000000000000000036031333553357400207770ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Port-Number.h" int S1AP_Port_Number_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } size = st->size; if((size == 2)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_Port_Number_constr_1 CC_NOTUSED = { { 0, 0 }, 2 /* (SIZE(2..2)) */}; asn_per_constraints_t asn_PER_type_S1AP_Port_Number_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 2, 2 } /* (SIZE(2..2)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_Port_Number_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Port_Number = { "Port-Number", "Port-Number", &asn_OP_OCTET_STRING, asn_DEF_S1AP_Port_Number_tags_1, sizeof(asn_DEF_S1AP_Port_Number_tags_1) /sizeof(asn_DEF_S1AP_Port_Number_tags_1[0]), /* 1 */ asn_DEF_S1AP_Port_Number_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Port_Number_tags_1) /sizeof(asn_DEF_S1AP_Port_Number_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_Port_Number_constr_1, &asn_PER_type_S1AP_Port_Number_constr_1, S1AP_Port_Number_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Port-Number.h000066400000000000000000000024641333553357400210100ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Port_Number_H_ #define _S1AP_Port_Number_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_Port-Number */ typedef OCTET_STRING_t S1AP_Port_Number_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_Port_Number_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_Port_Number; asn_struct_free_f S1AP_Port_Number_free; asn_struct_print_f S1AP_Port_Number_print; asn_constr_check_f S1AP_Port_Number_constraint; ber_type_decoder_f S1AP_Port_Number_decode_ber; der_type_encoder_f S1AP_Port_Number_encode_der; xer_type_decoder_f S1AP_Port_Number_decode_xer; xer_type_encoder_f S1AP_Port_Number_encode_xer; oer_type_decoder_f S1AP_Port_Number_decode_oer; oer_type_encoder_f S1AP_Port_Number_encode_oer; per_type_decoder_f S1AP_Port_Number_decode_uper; per_type_encoder_f S1AP_Port_Number_encode_uper; per_type_decoder_f S1AP_Port_Number_decode_aper; per_type_encoder_f S1AP_Port_Number_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Port_Number_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Pre-emptionCapability.c000066400000000000000000000042731333553357400230320ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Pre-emptionCapability.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_Pre_emptionCapability_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_Pre_emptionCapability_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_Pre_emptionCapability_value2enum_1[] = { { 0, 29, "shall-not-trigger-pre-emption" }, { 1, 23, "may-trigger-pre-emption" } }; static const unsigned int asn_MAP_S1AP_Pre_emptionCapability_enum2value_1[] = { 1, /* may-trigger-pre-emption(1) */ 0 /* shall-not-trigger-pre-emption(0) */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_Pre_emptionCapability_specs_1 = { asn_MAP_S1AP_Pre_emptionCapability_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_Pre_emptionCapability_enum2value_1, /* N => "tag"; sorted by N */ 2, /* Number of elements in the maps */ 0, /* Enumeration is not extensible */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_Pre_emptionCapability_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Pre_emptionCapability = { "Pre-emptionCapability", "Pre-emptionCapability", &asn_OP_NativeEnumerated, asn_DEF_S1AP_Pre_emptionCapability_tags_1, sizeof(asn_DEF_S1AP_Pre_emptionCapability_tags_1) /sizeof(asn_DEF_S1AP_Pre_emptionCapability_tags_1[0]), /* 1 */ asn_DEF_S1AP_Pre_emptionCapability_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Pre_emptionCapability_tags_1) /sizeof(asn_DEF_S1AP_Pre_emptionCapability_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_Pre_emptionCapability_constr_1, &asn_PER_type_S1AP_Pre_emptionCapability_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_Pre_emptionCapability_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Pre-emptionCapability.h000066400000000000000000000033261333553357400230350ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Pre_emptionCapability_H_ #define _S1AP_Pre_emptionCapability_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_Pre_emptionCapability { S1AP_Pre_emptionCapability_shall_not_trigger_pre_emption = 0, S1AP_Pre_emptionCapability_may_trigger_pre_emption = 1 } e_S1AP_Pre_emptionCapability; /* S1AP_Pre-emptionCapability */ typedef long S1AP_Pre_emptionCapability_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_Pre_emptionCapability_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_Pre_emptionCapability; extern const asn_INTEGER_specifics_t asn_SPC_Pre_emptionCapability_specs_1; asn_struct_free_f Pre_emptionCapability_free; asn_struct_print_f Pre_emptionCapability_print; asn_constr_check_f Pre_emptionCapability_constraint; ber_type_decoder_f Pre_emptionCapability_decode_ber; der_type_encoder_f Pre_emptionCapability_encode_der; xer_type_decoder_f Pre_emptionCapability_decode_xer; xer_type_encoder_f Pre_emptionCapability_encode_xer; oer_type_decoder_f Pre_emptionCapability_decode_oer; oer_type_encoder_f Pre_emptionCapability_encode_oer; per_type_decoder_f Pre_emptionCapability_decode_uper; per_type_encoder_f Pre_emptionCapability_encode_uper; per_type_decoder_f Pre_emptionCapability_decode_aper; per_type_encoder_f Pre_emptionCapability_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Pre_emptionCapability_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Pre-emptionVulnerability.c000066400000000000000000000043121333553357400235740ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Pre-emptionVulnerability.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_Pre_emptionVulnerability_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_Pre_emptionVulnerability_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_Pre_emptionVulnerability_value2enum_1[] = { { 0, 16, "not-pre-emptable" }, { 1, 12, "pre-emptable" } }; static const unsigned int asn_MAP_S1AP_Pre_emptionVulnerability_enum2value_1[] = { 0, /* not-pre-emptable(0) */ 1 /* pre-emptable(1) */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_Pre_emptionVulnerability_specs_1 = { asn_MAP_S1AP_Pre_emptionVulnerability_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_Pre_emptionVulnerability_enum2value_1, /* N => "tag"; sorted by N */ 2, /* Number of elements in the maps */ 0, /* Enumeration is not extensible */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_Pre_emptionVulnerability_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Pre_emptionVulnerability = { "Pre-emptionVulnerability", "Pre-emptionVulnerability", &asn_OP_NativeEnumerated, asn_DEF_S1AP_Pre_emptionVulnerability_tags_1, sizeof(asn_DEF_S1AP_Pre_emptionVulnerability_tags_1) /sizeof(asn_DEF_S1AP_Pre_emptionVulnerability_tags_1[0]), /* 1 */ asn_DEF_S1AP_Pre_emptionVulnerability_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Pre_emptionVulnerability_tags_1) /sizeof(asn_DEF_S1AP_Pre_emptionVulnerability_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_Pre_emptionVulnerability_constr_1, &asn_PER_type_S1AP_Pre_emptionVulnerability_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_Pre_emptionVulnerability_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Pre-emptionVulnerability.h000066400000000000000000000034111333553357400236000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Pre_emptionVulnerability_H_ #define _S1AP_Pre_emptionVulnerability_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_Pre_emptionVulnerability { S1AP_Pre_emptionVulnerability_not_pre_emptable = 0, S1AP_Pre_emptionVulnerability_pre_emptable = 1 } e_S1AP_Pre_emptionVulnerability; /* S1AP_Pre-emptionVulnerability */ typedef long S1AP_Pre_emptionVulnerability_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_Pre_emptionVulnerability_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_Pre_emptionVulnerability; extern const asn_INTEGER_specifics_t asn_SPC_Pre_emptionVulnerability_specs_1; asn_struct_free_f Pre_emptionVulnerability_free; asn_struct_print_f Pre_emptionVulnerability_print; asn_constr_check_f Pre_emptionVulnerability_constraint; ber_type_decoder_f Pre_emptionVulnerability_decode_ber; der_type_encoder_f Pre_emptionVulnerability_encode_der; xer_type_decoder_f Pre_emptionVulnerability_decode_xer; xer_type_encoder_f Pre_emptionVulnerability_encode_xer; oer_type_decoder_f Pre_emptionVulnerability_decode_oer; oer_type_encoder_f Pre_emptionVulnerability_encode_oer; per_type_decoder_f Pre_emptionVulnerability_decode_uper; per_type_encoder_f Pre_emptionVulnerability_encode_uper; per_type_decoder_f Pre_emptionVulnerability_decode_aper; per_type_encoder_f Pre_emptionVulnerability_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Pre_emptionVulnerability_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Presence.c000066400000000000000000000036421333553357400203740ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-CommonDataTypes" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Presence.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_Presence_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_Presence_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_Presence_value2enum_1[] = { { 0, 8, "optional" }, { 1, 11, "conditional" }, { 2, 9, "mandatory" } }; static const unsigned int asn_MAP_S1AP_Presence_enum2value_1[] = { 1, /* conditional(1) */ 2, /* mandatory(2) */ 0 /* optional(0) */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_Presence_specs_1 = { asn_MAP_S1AP_Presence_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_Presence_enum2value_1, /* N => "tag"; sorted by N */ 3, /* Number of elements in the maps */ 0, /* Enumeration is not extensible */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_Presence_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Presence = { "Presence", "Presence", &asn_OP_NativeEnumerated, asn_DEF_S1AP_Presence_tags_1, sizeof(asn_DEF_S1AP_Presence_tags_1) /sizeof(asn_DEF_S1AP_Presence_tags_1[0]), /* 1 */ asn_DEF_S1AP_Presence_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Presence_tags_1) /sizeof(asn_DEF_S1AP_Presence_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_Presence_constr_1, &asn_PER_type_S1AP_Presence_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_Presence_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Presence.h000066400000000000000000000026321333553357400203770ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-CommonDataTypes" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Presence_H_ #define _S1AP_Presence_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_Presence { S1AP_Presence_optional = 0, S1AP_Presence_conditional = 1, S1AP_Presence_mandatory = 2 } e_S1AP_Presence; /* S1AP_Presence */ typedef long S1AP_Presence_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_Presence_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_Presence; extern const asn_INTEGER_specifics_t asn_SPC_Presence_specs_1; asn_struct_free_f Presence_free; asn_struct_print_f Presence_print; asn_constr_check_f Presence_constraint; ber_type_decoder_f Presence_decode_ber; der_type_encoder_f Presence_encode_der; xer_type_decoder_f Presence_decode_xer; xer_type_encoder_f Presence_encode_xer; oer_type_decoder_f Presence_decode_oer; oer_type_encoder_f Presence_encode_oer; per_type_decoder_f Presence_decode_uper; per_type_encoder_f Presence_encode_uper; per_type_decoder_f Presence_decode_aper; per_type_encoder_f Presence_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Presence_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PriorityLevel.c000066400000000000000000000035511333553357400214400ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_PriorityLevel.h" int S1AP_PriorityLevel_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 15)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_PriorityLevel_constr_1 CC_NOTUSED = { { 1, 1 } /* (0..15) */, -1}; asn_per_constraints_t asn_PER_type_S1AP_PriorityLevel_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 4, 4, 0, 15 } /* (0..15) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_PriorityLevel_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_PriorityLevel = { "PriorityLevel", "PriorityLevel", &asn_OP_NativeInteger, asn_DEF_S1AP_PriorityLevel_tags_1, sizeof(asn_DEF_S1AP_PriorityLevel_tags_1) /sizeof(asn_DEF_S1AP_PriorityLevel_tags_1[0]), /* 1 */ asn_DEF_S1AP_PriorityLevel_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_PriorityLevel_tags_1) /sizeof(asn_DEF_S1AP_PriorityLevel_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_PriorityLevel_constr_1, &asn_PER_type_S1AP_PriorityLevel_constr_1, S1AP_PriorityLevel_constraint }, 0, 0, /* Defined elsewhere */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PriorityLevel.h000066400000000000000000000030471333553357400214450ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_PriorityLevel_H_ #define _S1AP_PriorityLevel_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_PriorityLevel { S1AP_PriorityLevel_spare = 0, S1AP_PriorityLevel_highest = 1, S1AP_PriorityLevel_lowest = 14, S1AP_PriorityLevel_no_priority = 15 } e_S1AP_PriorityLevel; /* S1AP_PriorityLevel */ typedef long S1AP_PriorityLevel_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_PriorityLevel_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_PriorityLevel; asn_struct_free_f S1AP_PriorityLevel_free; asn_struct_print_f S1AP_PriorityLevel_print; asn_constr_check_f S1AP_PriorityLevel_constraint; ber_type_decoder_f S1AP_PriorityLevel_decode_ber; der_type_encoder_f S1AP_PriorityLevel_encode_der; xer_type_decoder_f S1AP_PriorityLevel_decode_xer; xer_type_encoder_f S1AP_PriorityLevel_encode_xer; oer_type_decoder_f S1AP_PriorityLevel_decode_oer; oer_type_encoder_f S1AP_PriorityLevel_encode_oer; per_type_decoder_f S1AP_PriorityLevel_decode_uper; per_type_encoder_f S1AP_PriorityLevel_encode_uper; per_type_decoder_f S1AP_PriorityLevel_decode_aper; per_type_encoder_f S1AP_PriorityLevel_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_PriorityLevel_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PrivacyIndicator.c000066400000000000000000000041711333553357400221000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_PrivacyIndicator.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_PrivacyIndicator_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_PrivacyIndicator_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_PrivacyIndicator_value2enum_1[] = { { 0, 13, "immediate-MDT" }, { 1, 10, "logged-MDT" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_PrivacyIndicator_enum2value_1[] = { 0, /* immediate-MDT(0) */ 1 /* logged-MDT(1) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_PrivacyIndicator_specs_1 = { asn_MAP_S1AP_PrivacyIndicator_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_PrivacyIndicator_enum2value_1, /* N => "tag"; sorted by N */ 2, /* Number of elements in the maps */ 3, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_PrivacyIndicator_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_PrivacyIndicator = { "PrivacyIndicator", "PrivacyIndicator", &asn_OP_NativeEnumerated, asn_DEF_S1AP_PrivacyIndicator_tags_1, sizeof(asn_DEF_S1AP_PrivacyIndicator_tags_1) /sizeof(asn_DEF_S1AP_PrivacyIndicator_tags_1[0]), /* 1 */ asn_DEF_S1AP_PrivacyIndicator_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_PrivacyIndicator_tags_1) /sizeof(asn_DEF_S1AP_PrivacyIndicator_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_PrivacyIndicator_constr_1, &asn_PER_type_S1AP_PrivacyIndicator_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_PrivacyIndicator_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PrivacyIndicator.h000066400000000000000000000030231333553357400221000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_PrivacyIndicator_H_ #define _S1AP_PrivacyIndicator_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_PrivacyIndicator { S1AP_PrivacyIndicator_immediate_MDT = 0, S1AP_PrivacyIndicator_logged_MDT = 1 /* * Enumeration is extensible */ } e_S1AP_PrivacyIndicator; /* S1AP_PrivacyIndicator */ typedef long S1AP_PrivacyIndicator_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_PrivacyIndicator; asn_struct_free_f S1AP_PrivacyIndicator_free; asn_struct_print_f S1AP_PrivacyIndicator_print; asn_constr_check_f S1AP_PrivacyIndicator_constraint; ber_type_decoder_f S1AP_PrivacyIndicator_decode_ber; der_type_encoder_f S1AP_PrivacyIndicator_encode_der; xer_type_decoder_f S1AP_PrivacyIndicator_decode_xer; xer_type_encoder_f S1AP_PrivacyIndicator_encode_xer; oer_type_decoder_f S1AP_PrivacyIndicator_decode_oer; oer_type_encoder_f S1AP_PrivacyIndicator_encode_oer; per_type_decoder_f S1AP_PrivacyIndicator_decode_uper; per_type_encoder_f S1AP_PrivacyIndicator_encode_uper; per_type_decoder_f S1AP_PrivacyIndicator_decode_aper; per_type_encoder_f S1AP_PrivacyIndicator_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_PrivacyIndicator_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PrivateIE-Container.c000066400000000000000000000040011333553357400223660ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-Containers" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_PrivateIE-Container.h" #include "S1AP_PrivateIE-Field.h" static asn_oer_constraints_t asn_OER_type_S1AP_PrivateIE_Container_6618P0_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_PrivateIE_Container_6618P0_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_PrivateIE_Container_6618P0_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_PrivateMessageIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_PrivateIE_Container_6618P0_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_PrivateIE_Container_6618P0_specs_1 = { sizeof(struct S1AP_PrivateIE_Container_6618P0), offsetof(struct S1AP_PrivateIE_Container_6618P0, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_PrivateIE_Container_6618P0 = { "PrivateIE-Container", "PrivateIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_PrivateIE_Container_6618P0_tags_1, sizeof(asn_DEF_S1AP_PrivateIE_Container_6618P0_tags_1) /sizeof(asn_DEF_S1AP_PrivateIE_Container_6618P0_tags_1[0]), /* 1 */ asn_DEF_S1AP_PrivateIE_Container_6618P0_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_PrivateIE_Container_6618P0_tags_1) /sizeof(asn_DEF_S1AP_PrivateIE_Container_6618P0_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_PrivateIE_Container_6618P0_constr_1, &asn_PER_type_S1AP_PrivateIE_Container_6618P0_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_PrivateIE_Container_6618P0_1, 1, /* Single element */ &asn_SPC_S1AP_PrivateIE_Container_6618P0_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PrivateIE-Container.h000066400000000000000000000022651333553357400224050ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-Containers" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_PrivateIE_Container_H_ #define _S1AP_PrivateIE_Container_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_PrivateMessageIEs; /* S1AP_PrivateIE-Container */ typedef struct S1AP_PrivateIE_Container_6618P0 { A_SEQUENCE_OF(struct S1AP_PrivateMessageIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_PrivateIE_Container_6618P0_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_PrivateIE_Container_6618P0; extern asn_SET_OF_specifics_t asn_SPC_S1AP_PrivateIE_Container_6618P0_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_PrivateIE_Container_6618P0_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_PrivateIE_Container_6618P0_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_PrivateIE_Container_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PrivateIE-Field.c000066400000000000000000000130721333553357400214770ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-Containers" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_PrivateIE-Field.h" static int memb_S1AP_id_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_criticality_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_2 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_2 CC_NOTUSED = { { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_3 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_3 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_4 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_4 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_4 = { sizeof(struct S1AP_PrivateMessageIEs__value), offsetof(struct S1AP_PrivateMessageIEs__value, _asn_ctx), offsetof(struct S1AP_PrivateMessageIEs__value, present), sizeof(((struct S1AP_PrivateMessageIEs__value *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_4 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_value_specs_4 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_PrivateMessageIEs_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_PrivateMessageIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_PrivateIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_2, &asn_PER_memb_S1AP_id_constr_2, memb_S1AP_id_constraint_1 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PrivateMessageIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_3, &asn_PER_memb_S1AP_criticality_constr_3, memb_S1AP_criticality_constraint_1 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_PrivateMessageIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_4, 0, { &asn_OER_memb_S1AP_value_constr_4, &asn_PER_memb_S1AP_value_constr_4, memb_S1AP_value_constraint_1 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_PrivateMessageIEs_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_PrivateMessageIEs_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_PrivateMessageIEs_specs_1 = { sizeof(struct S1AP_PrivateMessageIEs), offsetof(struct S1AP_PrivateMessageIEs, _asn_ctx), asn_MAP_S1AP_PrivateMessageIEs_tag2el_1, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_PrivateMessageIEs = { "PrivateMessageIEs", "PrivateMessageIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_PrivateMessageIEs_tags_1, sizeof(asn_DEF_S1AP_PrivateMessageIEs_tags_1) /sizeof(asn_DEF_S1AP_PrivateMessageIEs_tags_1[0]), /* 1 */ asn_DEF_S1AP_PrivateMessageIEs_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_PrivateMessageIEs_tags_1) /sizeof(asn_DEF_S1AP_PrivateMessageIEs_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_PrivateMessageIEs_1, 3, /* Elements count */ &asn_SPC_S1AP_PrivateMessageIEs_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PrivateIE-Field.h000066400000000000000000000030061333553357400215000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-Containers" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_PrivateIE_Field_H_ #define _S1AP_PrivateIE_Field_H_ #include /* Including external dependencies */ #include "S1AP_PrivateIE-ID.h" #include "S1AP_Criticality.h" #include #include #include #include #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_PrivateMessageIEs__value_PR { S1AP_PrivateMessageIEs__value_PR_NOTHING /* No components present */ } S1AP_PrivateMessageIEs__value_PR; /* S1AP_PrivateIE-Field */ typedef struct S1AP_PrivateMessageIEs { S1AP_PrivateIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_PrivateMessageIEs__value { S1AP_PrivateMessageIEs__value_PR present; union S1AP_PrivateMessageIEs__S1AP_value_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_PrivateMessageIEs_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_PrivateMessageIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_PrivateMessageIEs_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_PrivateMessageIEs_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_PrivateIE_Field_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PrivateIE-ID.c000066400000000000000000000060101333553357400207420ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-CommonDataTypes" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_PrivateIE-ID.h" static int memb_S1AP_local_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_oer_constraints_t asn_OER_memb_S1AP_local_constr_2 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_local_constr_2 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_PrivateIE_ID_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_PrivateIE_ID_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_PrivateIE_ID_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_PrivateIE_ID, choice.local), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, 0, { &asn_OER_memb_S1AP_local_constr_2, &asn_PER_memb_S1AP_local_constr_2, memb_S1AP_local_constraint_1 }, 0, 0, /* No default value */ "local" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PrivateIE_ID, choice.global), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_OBJECT_IDENTIFIER, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "global" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_PrivateIE_ID_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* local */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* global */ }; asn_CHOICE_specifics_t asn_SPC_S1AP_PrivateIE_ID_specs_1 = { sizeof(struct S1AP_PrivateIE_ID), offsetof(struct S1AP_PrivateIE_ID, _asn_ctx), offsetof(struct S1AP_PrivateIE_ID, present), sizeof(((struct S1AP_PrivateIE_ID *)0)->present), asn_MAP_S1AP_PrivateIE_ID_tag2el_1, 2, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_PrivateIE_ID = { "PrivateIE-ID", "PrivateIE-ID", &asn_OP_CHOICE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { &asn_OER_type_S1AP_PrivateIE_ID_constr_1, &asn_PER_type_S1AP_PrivateIE_ID_constr_1, CHOICE_constraint }, asn_MBR_S1AP_PrivateIE_ID_1, 2, /* Elements count */ &asn_SPC_S1AP_PrivateIE_ID_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PrivateIE-ID.h000066400000000000000000000024551333553357400207600ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-CommonDataTypes" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_PrivateIE_ID_H_ #define _S1AP_PrivateIE_ID_H_ #include /* Including external dependencies */ #include #include #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_PrivateIE_ID_PR { S1AP_PrivateIE_ID_PR_NOTHING, /* No components present */ S1AP_PrivateIE_ID_PR_local, S1AP_PrivateIE_ID_PR_global } S1AP_PrivateIE_ID_PR; /* S1AP_PrivateIE-ID */ typedef struct S1AP_PrivateIE_ID { S1AP_PrivateIE_ID_PR present; union S1AP_PrivateIE_ID_u { long local; OBJECT_IDENTIFIER_t global; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_PrivateIE_ID_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_PrivateIE_ID; extern asn_CHOICE_specifics_t asn_SPC_S1AP_PrivateIE_ID_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_PrivateIE_ID_1[2]; extern asn_per_constraints_t asn_PER_type_S1AP_PrivateIE_ID_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_PrivateIE_ID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PrivateMessage.c000066400000000000000000000032631333553357400215460ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_PrivateMessage.h" asn_TYPE_member_t asn_MBR_S1AP_PrivateMessage_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_PrivateMessage, privateIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_PrivateIE_Container_6618P0, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "privateIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_PrivateMessage_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_PrivateMessage_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* privateIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_PrivateMessage_specs_1 = { sizeof(struct S1AP_PrivateMessage), offsetof(struct S1AP_PrivateMessage, _asn_ctx), asn_MAP_S1AP_PrivateMessage_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_PrivateMessage = { "PrivateMessage", "PrivateMessage", &asn_OP_SEQUENCE, asn_DEF_S1AP_PrivateMessage_tags_1, sizeof(asn_DEF_S1AP_PrivateMessage_tags_1) /sizeof(asn_DEF_S1AP_PrivateMessage_tags_1[0]), /* 1 */ asn_DEF_S1AP_PrivateMessage_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_PrivateMessage_tags_1) /sizeof(asn_DEF_S1AP_PrivateMessage_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_PrivateMessage_1, 1, /* Elements count */ &asn_SPC_S1AP_PrivateMessage_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_PrivateMessage.h000066400000000000000000000020451333553357400215500ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_PrivateMessage_H_ #define _S1AP_PrivateMessage_H_ #include /* Including external dependencies */ #include "S1AP_PrivateIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_PrivateMessage */ typedef struct S1AP_PrivateMessage { S1AP_PrivateIE_Container_6618P0_t privateIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_PrivateMessage_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_PrivateMessage; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_PrivateMessage_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_PrivateMessage_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_PrivateMessage_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProSeAuthorized.c000066400000000000000000000051261333553357400217160ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ProSeAuthorized.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_ProSeAuthorized_1[] = { { ATF_POINTER, 3, offsetof(struct S1AP_ProSeAuthorized, proSeDirectDiscovery), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProSeDirectDiscovery, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "proSeDirectDiscovery" }, { ATF_POINTER, 2, offsetof(struct S1AP_ProSeAuthorized, proSeDirectCommunication), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProSeDirectCommunication, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "proSeDirectCommunication" }, { ATF_POINTER, 1, offsetof(struct S1AP_ProSeAuthorized, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P79, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_ProSeAuthorized_oms_1[] = { 0, 1, 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_ProSeAuthorized_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ProSeAuthorized_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* proSeDirectDiscovery */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* proSeDirectCommunication */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_ProSeAuthorized_specs_1 = { sizeof(struct S1AP_ProSeAuthorized), offsetof(struct S1AP_ProSeAuthorized, _asn_ctx), asn_MAP_S1AP_ProSeAuthorized_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_ProSeAuthorized_oms_1, /* Optional members */ 3, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProSeAuthorized = { "ProSeAuthorized", "ProSeAuthorized", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProSeAuthorized_tags_1, sizeof(asn_DEF_S1AP_ProSeAuthorized_tags_1) /sizeof(asn_DEF_S1AP_ProSeAuthorized_tags_1[0]), /* 1 */ asn_DEF_S1AP_ProSeAuthorized_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ProSeAuthorized_tags_1) /sizeof(asn_DEF_S1AP_ProSeAuthorized_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ProSeAuthorized_1, 3, /* Elements count */ &asn_SPC_S1AP_ProSeAuthorized_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProSeAuthorized.h000066400000000000000000000022701333553357400217200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ProSeAuthorized_H_ #define _S1AP_ProSeAuthorized_H_ #include /* Including external dependencies */ #include "S1AP_ProSeDirectDiscovery.h" #include "S1AP_ProSeDirectCommunication.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_ProSeAuthorized */ typedef struct S1AP_ProSeAuthorized { S1AP_ProSeDirectDiscovery_t *proSeDirectDiscovery; /* OPTIONAL */ S1AP_ProSeDirectCommunication_t *proSeDirectCommunication; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProSeAuthorized_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProSeAuthorized; #ifdef __cplusplus } #endif #endif /* _S1AP_ProSeAuthorized_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProSeDirectCommunication.c000066400000000000000000000044251333553357400235410ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ProSeDirectCommunication.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_ProSeDirectCommunication_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_ProSeDirectCommunication_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_ProSeDirectCommunication_value2enum_1[] = { { 0, 10, "authorized" }, { 1, 14, "not-authorized" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_ProSeDirectCommunication_enum2value_1[] = { 0, /* authorized(0) */ 1 /* not-authorized(1) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_ProSeDirectCommunication_specs_1 = { asn_MAP_S1AP_ProSeDirectCommunication_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_ProSeDirectCommunication_enum2value_1, /* N => "tag"; sorted by N */ 2, /* Number of elements in the maps */ 3, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_ProSeDirectCommunication_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProSeDirectCommunication = { "ProSeDirectCommunication", "ProSeDirectCommunication", &asn_OP_NativeEnumerated, asn_DEF_S1AP_ProSeDirectCommunication_tags_1, sizeof(asn_DEF_S1AP_ProSeDirectCommunication_tags_1) /sizeof(asn_DEF_S1AP_ProSeDirectCommunication_tags_1[0]), /* 1 */ asn_DEF_S1AP_ProSeDirectCommunication_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ProSeDirectCommunication_tags_1) /sizeof(asn_DEF_S1AP_ProSeDirectCommunication_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ProSeDirectCommunication_constr_1, &asn_PER_type_S1AP_ProSeDirectCommunication_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_ProSeDirectCommunication_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProSeDirectCommunication.h000066400000000000000000000034541333553357400235470ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ProSeDirectCommunication_H_ #define _S1AP_ProSeDirectCommunication_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_ProSeDirectCommunication { S1AP_ProSeDirectCommunication_authorized = 0, S1AP_ProSeDirectCommunication_not_authorized = 1 /* * Enumeration is extensible */ } e_S1AP_ProSeDirectCommunication; /* S1AP_ProSeDirectCommunication */ typedef long S1AP_ProSeDirectCommunication_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_ProSeDirectCommunication_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProSeDirectCommunication; extern const asn_INTEGER_specifics_t asn_SPC_ProSeDirectCommunication_specs_1; asn_struct_free_f ProSeDirectCommunication_free; asn_struct_print_f ProSeDirectCommunication_print; asn_constr_check_f ProSeDirectCommunication_constraint; ber_type_decoder_f ProSeDirectCommunication_decode_ber; der_type_encoder_f ProSeDirectCommunication_encode_der; xer_type_decoder_f ProSeDirectCommunication_decode_xer; xer_type_encoder_f ProSeDirectCommunication_encode_xer; oer_type_decoder_f ProSeDirectCommunication_decode_oer; oer_type_encoder_f ProSeDirectCommunication_encode_oer; per_type_decoder_f ProSeDirectCommunication_decode_uper; per_type_encoder_f ProSeDirectCommunication_encode_uper; per_type_decoder_f ProSeDirectCommunication_decode_aper; per_type_encoder_f ProSeDirectCommunication_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_ProSeDirectCommunication_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProSeDirectDiscovery.c000066400000000000000000000043011333553357400226740ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ProSeDirectDiscovery.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_ProSeDirectDiscovery_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_ProSeDirectDiscovery_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_ProSeDirectDiscovery_value2enum_1[] = { { 0, 10, "authorized" }, { 1, 14, "not-authorized" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_ProSeDirectDiscovery_enum2value_1[] = { 0, /* authorized(0) */ 1 /* not-authorized(1) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_ProSeDirectDiscovery_specs_1 = { asn_MAP_S1AP_ProSeDirectDiscovery_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_ProSeDirectDiscovery_enum2value_1, /* N => "tag"; sorted by N */ 2, /* Number of elements in the maps */ 3, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_ProSeDirectDiscovery_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProSeDirectDiscovery = { "ProSeDirectDiscovery", "ProSeDirectDiscovery", &asn_OP_NativeEnumerated, asn_DEF_S1AP_ProSeDirectDiscovery_tags_1, sizeof(asn_DEF_S1AP_ProSeDirectDiscovery_tags_1) /sizeof(asn_DEF_S1AP_ProSeDirectDiscovery_tags_1[0]), /* 1 */ asn_DEF_S1AP_ProSeDirectDiscovery_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ProSeDirectDiscovery_tags_1) /sizeof(asn_DEF_S1AP_ProSeDirectDiscovery_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ProSeDirectDiscovery_constr_1, &asn_PER_type_S1AP_ProSeDirectDiscovery_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_ProSeDirectDiscovery_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProSeDirectDiscovery.h000066400000000000000000000033101333553357400227000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ProSeDirectDiscovery_H_ #define _S1AP_ProSeDirectDiscovery_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_ProSeDirectDiscovery { S1AP_ProSeDirectDiscovery_authorized = 0, S1AP_ProSeDirectDiscovery_not_authorized = 1 /* * Enumeration is extensible */ } e_S1AP_ProSeDirectDiscovery; /* S1AP_ProSeDirectDiscovery */ typedef long S1AP_ProSeDirectDiscovery_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_ProSeDirectDiscovery_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProSeDirectDiscovery; extern const asn_INTEGER_specifics_t asn_SPC_ProSeDirectDiscovery_specs_1; asn_struct_free_f ProSeDirectDiscovery_free; asn_struct_print_f ProSeDirectDiscovery_print; asn_constr_check_f ProSeDirectDiscovery_constraint; ber_type_decoder_f ProSeDirectDiscovery_decode_ber; der_type_encoder_f ProSeDirectDiscovery_encode_der; xer_type_decoder_f ProSeDirectDiscovery_decode_xer; xer_type_encoder_f ProSeDirectDiscovery_encode_xer; oer_type_decoder_f ProSeDirectDiscovery_decode_oer; oer_type_encoder_f ProSeDirectDiscovery_encode_oer; per_type_decoder_f ProSeDirectDiscovery_decode_uper; per_type_encoder_f ProSeDirectDiscovery_encode_uper; per_type_decoder_f ProSeDirectDiscovery_decode_aper; per_type_encoder_f ProSeDirectDiscovery_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_ProSeDirectDiscovery_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProSeUEtoNetworkRelaying.c000066400000000000000000000044431333553357400235220ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ProSeUEtoNetworkRelaying.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_ProSeUEtoNetworkRelaying_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_ProSeUEtoNetworkRelaying_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_ProSeUEtoNetworkRelaying_value2enum_1[] = { { 0, 10, "authorized" }, { 1, 14, "not-authorized" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_ProSeUEtoNetworkRelaying_enum2value_1[] = { 0, /* authorized(0) */ 1 /* not-authorized(1) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_ProSeUEtoNetworkRelaying_specs_1 = { asn_MAP_S1AP_ProSeUEtoNetworkRelaying_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_ProSeUEtoNetworkRelaying_enum2value_1, /* N => "tag"; sorted by N */ 2, /* Number of elements in the maps */ 3, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_ProSeUEtoNetworkRelaying_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProSeUEtoNetworkRelaying = { "ProSeUEtoNetworkRelaying", "ProSeUEtoNetworkRelaying", &asn_OP_NativeEnumerated, asn_DEF_S1AP_ProSeUEtoNetworkRelaying_tags_1, sizeof(asn_DEF_S1AP_ProSeUEtoNetworkRelaying_tags_1) /sizeof(asn_DEF_S1AP_ProSeUEtoNetworkRelaying_tags_1[0]), /* 1 */ asn_DEF_S1AP_ProSeUEtoNetworkRelaying_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ProSeUEtoNetworkRelaying_tags_1) /sizeof(asn_DEF_S1AP_ProSeUEtoNetworkRelaying_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ProSeUEtoNetworkRelaying_constr_1, &asn_PER_type_S1AP_ProSeUEtoNetworkRelaying_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_ProSeUEtoNetworkRelaying_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProSeUEtoNetworkRelaying.h000066400000000000000000000033141333553357400235230ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ProSeUEtoNetworkRelaying_H_ #define _S1AP_ProSeUEtoNetworkRelaying_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_ProSeUEtoNetworkRelaying { S1AP_ProSeUEtoNetworkRelaying_authorized = 0, S1AP_ProSeUEtoNetworkRelaying_not_authorized = 1 /* * Enumeration is extensible */ } e_S1AP_ProSeUEtoNetworkRelaying; /* S1AP_ProSeUEtoNetworkRelaying */ typedef long S1AP_ProSeUEtoNetworkRelaying_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProSeUEtoNetworkRelaying; asn_struct_free_f S1AP_ProSeUEtoNetworkRelaying_free; asn_struct_print_f S1AP_ProSeUEtoNetworkRelaying_print; asn_constr_check_f S1AP_ProSeUEtoNetworkRelaying_constraint; ber_type_decoder_f S1AP_ProSeUEtoNetworkRelaying_decode_ber; der_type_encoder_f S1AP_ProSeUEtoNetworkRelaying_encode_der; xer_type_decoder_f S1AP_ProSeUEtoNetworkRelaying_decode_xer; xer_type_encoder_f S1AP_ProSeUEtoNetworkRelaying_encode_xer; oer_type_decoder_f S1AP_ProSeUEtoNetworkRelaying_decode_oer; oer_type_encoder_f S1AP_ProSeUEtoNetworkRelaying_encode_oer; per_type_decoder_f S1AP_ProSeUEtoNetworkRelaying_decode_uper; per_type_encoder_f S1AP_ProSeUEtoNetworkRelaying_encode_uper; per_type_decoder_f S1AP_ProSeUEtoNetworkRelaying_decode_aper; per_type_encoder_f S1AP_ProSeUEtoNetworkRelaying_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_ProSeUEtoNetworkRelaying_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProcedureCode.c000066400000000000000000000035621333553357400213540ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-CommonDataTypes" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ProcedureCode.h" int S1AP_ProcedureCode_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 255)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_ProcedureCode_constr_1 CC_NOTUSED = { { 1, 1 } /* (0..255) */, -1}; asn_per_constraints_t asn_PER_type_S1AP_ProcedureCode_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProcedureCode_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProcedureCode = { "ProcedureCode", "ProcedureCode", &asn_OP_NativeInteger, asn_DEF_S1AP_ProcedureCode_tags_1, sizeof(asn_DEF_S1AP_ProcedureCode_tags_1) /sizeof(asn_DEF_S1AP_ProcedureCode_tags_1[0]), /* 1 */ asn_DEF_S1AP_ProcedureCode_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ProcedureCode_tags_1) /sizeof(asn_DEF_S1AP_ProcedureCode_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ProcedureCode_constr_1, &asn_PER_type_S1AP_ProcedureCode_constr_1, S1AP_ProcedureCode_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProcedureCode.h000066400000000000000000000141011333553357400213500ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-CommonDataTypes" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ProcedureCode_H_ #define _S1AP_ProcedureCode_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ProcedureCode */ typedef long S1AP_ProcedureCode_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_ProcedureCode_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProcedureCode; asn_struct_free_f S1AP_ProcedureCode_free; asn_struct_print_f S1AP_ProcedureCode_print; asn_constr_check_f S1AP_ProcedureCode_constraint; ber_type_decoder_f S1AP_ProcedureCode_decode_ber; der_type_encoder_f S1AP_ProcedureCode_encode_der; xer_type_decoder_f S1AP_ProcedureCode_decode_xer; xer_type_encoder_f S1AP_ProcedureCode_encode_xer; oer_type_decoder_f S1AP_ProcedureCode_decode_oer; oer_type_encoder_f S1AP_ProcedureCode_encode_oer; per_type_decoder_f S1AP_ProcedureCode_decode_uper; per_type_encoder_f S1AP_ProcedureCode_encode_uper; per_type_decoder_f S1AP_ProcedureCode_decode_aper; per_type_encoder_f S1AP_ProcedureCode_encode_aper; #define S1AP_ProcedureCode_id_HandoverPreparation ((S1AP_ProcedureCode_t)0) #define S1AP_ProcedureCode_id_HandoverResourceAllocation ((S1AP_ProcedureCode_t)1) #define S1AP_ProcedureCode_id_HandoverNotification ((S1AP_ProcedureCode_t)2) #define S1AP_ProcedureCode_id_PathSwitchRequest ((S1AP_ProcedureCode_t)3) #define S1AP_ProcedureCode_id_HandoverCancel ((S1AP_ProcedureCode_t)4) #define S1AP_ProcedureCode_id_E_RABSetup ((S1AP_ProcedureCode_t)5) #define S1AP_ProcedureCode_id_E_RABModify ((S1AP_ProcedureCode_t)6) #define S1AP_ProcedureCode_id_E_RABRelease ((S1AP_ProcedureCode_t)7) #define S1AP_ProcedureCode_id_E_RABReleaseIndication ((S1AP_ProcedureCode_t)8) #define S1AP_ProcedureCode_id_InitialContextSetup ((S1AP_ProcedureCode_t)9) #define S1AP_ProcedureCode_id_Paging ((S1AP_ProcedureCode_t)10) #define S1AP_ProcedureCode_id_downlinkNASTransport ((S1AP_ProcedureCode_t)11) #define S1AP_ProcedureCode_id_initialUEMessage ((S1AP_ProcedureCode_t)12) #define S1AP_ProcedureCode_id_uplinkNASTransport ((S1AP_ProcedureCode_t)13) #define S1AP_ProcedureCode_id_Reset ((S1AP_ProcedureCode_t)14) #define S1AP_ProcedureCode_id_ErrorIndication ((S1AP_ProcedureCode_t)15) #define S1AP_ProcedureCode_id_NASNonDeliveryIndication ((S1AP_ProcedureCode_t)16) #define S1AP_ProcedureCode_id_S1Setup ((S1AP_ProcedureCode_t)17) #define S1AP_ProcedureCode_id_UEContextReleaseRequest ((S1AP_ProcedureCode_t)18) #define S1AP_ProcedureCode_id_DownlinkS1cdma2000tunnelling ((S1AP_ProcedureCode_t)19) #define S1AP_ProcedureCode_id_UplinkS1cdma2000tunnelling ((S1AP_ProcedureCode_t)20) #define S1AP_ProcedureCode_id_UEContextModification ((S1AP_ProcedureCode_t)21) #define S1AP_ProcedureCode_id_UECapabilityInfoIndication ((S1AP_ProcedureCode_t)22) #define S1AP_ProcedureCode_id_UEContextRelease ((S1AP_ProcedureCode_t)23) #define S1AP_ProcedureCode_id_eNBStatusTransfer ((S1AP_ProcedureCode_t)24) #define S1AP_ProcedureCode_id_MMEStatusTransfer ((S1AP_ProcedureCode_t)25) #define S1AP_ProcedureCode_id_DeactivateTrace ((S1AP_ProcedureCode_t)26) #define S1AP_ProcedureCode_id_TraceStart ((S1AP_ProcedureCode_t)27) #define S1AP_ProcedureCode_id_TraceFailureIndication ((S1AP_ProcedureCode_t)28) #define S1AP_ProcedureCode_id_ENBConfigurationUpdate ((S1AP_ProcedureCode_t)29) #define S1AP_ProcedureCode_id_MMEConfigurationUpdate ((S1AP_ProcedureCode_t)30) #define S1AP_ProcedureCode_id_LocationReportingControl ((S1AP_ProcedureCode_t)31) #define S1AP_ProcedureCode_id_LocationReportingFailureIndication ((S1AP_ProcedureCode_t)32) #define S1AP_ProcedureCode_id_LocationReport ((S1AP_ProcedureCode_t)33) #define S1AP_ProcedureCode_id_OverloadStart ((S1AP_ProcedureCode_t)34) #define S1AP_ProcedureCode_id_OverloadStop ((S1AP_ProcedureCode_t)35) #define S1AP_ProcedureCode_id_WriteReplaceWarning ((S1AP_ProcedureCode_t)36) #define S1AP_ProcedureCode_id_eNBDirectInformationTransfer ((S1AP_ProcedureCode_t)37) #define S1AP_ProcedureCode_id_MMEDirectInformationTransfer ((S1AP_ProcedureCode_t)38) #define S1AP_ProcedureCode_id_PrivateMessage ((S1AP_ProcedureCode_t)39) #define S1AP_ProcedureCode_id_eNBConfigurationTransfer ((S1AP_ProcedureCode_t)40) #define S1AP_ProcedureCode_id_MMEConfigurationTransfer ((S1AP_ProcedureCode_t)41) #define S1AP_ProcedureCode_id_CellTrafficTrace ((S1AP_ProcedureCode_t)42) #define S1AP_ProcedureCode_id_Kill ((S1AP_ProcedureCode_t)43) #define S1AP_ProcedureCode_id_downlinkUEAssociatedLPPaTransport ((S1AP_ProcedureCode_t)44) #define S1AP_ProcedureCode_id_uplinkUEAssociatedLPPaTransport ((S1AP_ProcedureCode_t)45) #define S1AP_ProcedureCode_id_downlinkNonUEAssociatedLPPaTransport ((S1AP_ProcedureCode_t)46) #define S1AP_ProcedureCode_id_uplinkNonUEAssociatedLPPaTransport ((S1AP_ProcedureCode_t)47) #define S1AP_ProcedureCode_id_UERadioCapabilityMatch ((S1AP_ProcedureCode_t)48) #define S1AP_ProcedureCode_id_PWSRestartIndication ((S1AP_ProcedureCode_t)49) #define S1AP_ProcedureCode_id_E_RABModificationIndication ((S1AP_ProcedureCode_t)50) #define S1AP_ProcedureCode_id_PWSFailureIndication ((S1AP_ProcedureCode_t)51) #define S1AP_ProcedureCode_id_RerouteNASRequest ((S1AP_ProcedureCode_t)52) #define S1AP_ProcedureCode_id_UEContextModificationIndication ((S1AP_ProcedureCode_t)53) #define S1AP_ProcedureCode_id_ConnectionEstablishmentIndication ((S1AP_ProcedureCode_t)54) #define S1AP_ProcedureCode_id_UEContextSuspend ((S1AP_ProcedureCode_t)55) #define S1AP_ProcedureCode_id_UEContextResume ((S1AP_ProcedureCode_t)56) #define S1AP_ProcedureCode_id_NASDeliveryIndication ((S1AP_ProcedureCode_t)57) #define S1AP_ProcedureCode_id_RetrieveUEInformation ((S1AP_ProcedureCode_t)58) #define S1AP_ProcedureCode_id_UEInformationTransfer ((S1AP_ProcedureCode_t)59) #define S1AP_ProcedureCode_id_eNBCPRelocationIndication ((S1AP_ProcedureCode_t)60) #define S1AP_ProcedureCode_id_MMECPRelocationIndication ((S1AP_ProcedureCode_t)61) #ifdef __cplusplus } #endif #endif /* _S1AP_ProcedureCode_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProtocolError-IE-ContainerList.h000066400000000000000000000007671333553357400245240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ProtocolError_IE_ContainerList_H_ #define _S1AP_ProtocolError_IE_ContainerList_H_ #include #ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus } #endif #endif /* _S1AP_ProtocolError_IE_ContainerList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProtocolExtensionContainer.c000066400000000000000000007044171333553357400242010ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-Containers" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ProtocolExtensionContainer.h" #include "S1AP_ProtocolExtensionField.h" static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P0_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P0_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P1_constr_3 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P1_constr_3 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P2_constr_5 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P2_constr_5 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P3_constr_7 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P3_constr_7 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P4_constr_9 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P4_constr_9 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P5_constr_11 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P5_constr_11 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P6_constr_13 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P6_constr_13 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P7_constr_15 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P7_constr_15 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P8_constr_17 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P8_constr_17 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P9_constr_19 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P9_constr_19 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P10_constr_21 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P10_constr_21 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P11_constr_23 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P11_constr_23 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P12_constr_25 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P12_constr_25 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P13_constr_27 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P13_constr_27 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P14_constr_29 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P14_constr_29 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P15_constr_31 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P15_constr_31 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P16_constr_33 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P16_constr_33 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P17_constr_35 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P17_constr_35 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P18_constr_37 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P18_constr_37 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P19_constr_39 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P19_constr_39 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P20_constr_41 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P20_constr_41 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P21_constr_43 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P21_constr_43 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P22_constr_45 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P22_constr_45 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P23_constr_47 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P23_constr_47 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P24_constr_49 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P24_constr_49 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P25_constr_51 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P25_constr_51 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P26_constr_53 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P26_constr_53 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P27_constr_55 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P27_constr_55 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P28_constr_57 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P28_constr_57 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P29_constr_59 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P29_constr_59 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P30_constr_61 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P30_constr_61 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P31_constr_63 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P31_constr_63 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P32_constr_65 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P32_constr_65 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P33_constr_67 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P33_constr_67 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P34_constr_69 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P34_constr_69 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P35_constr_71 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P35_constr_71 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P36_constr_73 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P36_constr_73 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P37_constr_75 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P37_constr_75 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P38_constr_77 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P38_constr_77 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P39_constr_79 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P39_constr_79 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P40_constr_81 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P40_constr_81 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P41_constr_83 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P41_constr_83 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P42_constr_85 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P42_constr_85 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P43_constr_87 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P43_constr_87 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P44_constr_89 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P44_constr_89 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P45_constr_91 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P45_constr_91 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P46_constr_93 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P46_constr_93 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P47_constr_95 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P47_constr_95 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P48_constr_97 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P48_constr_97 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P49_constr_99 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P49_constr_99 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P50_constr_101 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P50_constr_101 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P51_constr_103 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P51_constr_103 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P52_constr_105 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P52_constr_105 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P53_constr_107 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P53_constr_107 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P54_constr_109 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P54_constr_109 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P55_constr_111 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P55_constr_111 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P56_constr_113 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P56_constr_113 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P57_constr_115 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P57_constr_115 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P58_constr_117 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P58_constr_117 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P59_constr_119 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P59_constr_119 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P60_constr_121 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P60_constr_121 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P61_constr_123 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P61_constr_123 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P62_constr_125 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P62_constr_125 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P63_constr_127 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P63_constr_127 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P64_constr_129 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P64_constr_129 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P65_constr_131 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P65_constr_131 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P66_constr_133 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P66_constr_133 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P67_constr_135 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P67_constr_135 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P68_constr_137 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P68_constr_137 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P69_constr_139 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P69_constr_139 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P70_constr_141 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P70_constr_141 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P71_constr_143 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P71_constr_143 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P72_constr_145 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P72_constr_145 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P73_constr_147 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P73_constr_147 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P74_constr_149 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P74_constr_149 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P75_constr_151 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P75_constr_151 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P76_constr_153 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P76_constr_153 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P77_constr_155 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P77_constr_155 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P78_constr_157 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P78_constr_157 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P79_constr_159 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P79_constr_159 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P80_constr_161 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P80_constr_161 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P81_constr_163 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P81_constr_163 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P82_constr_165 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P82_constr_165 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P83_constr_167 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P83_constr_167 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P84_constr_169 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P84_constr_169 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P85_constr_171 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P85_constr_171 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P86_constr_173 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P86_constr_173 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P87_constr_175 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P87_constr_175 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P88_constr_177 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P88_constr_177 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P89_constr_179 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P89_constr_179 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P90_constr_181 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P90_constr_181 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P91_constr_183 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P91_constr_183 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P92_constr_185 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P92_constr_185 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P93_constr_187 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P93_constr_187 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P94_constr_189 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P94_constr_189 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P95_constr_191 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P95_constr_191 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P96_constr_193 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P96_constr_193 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P97_constr_195 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P97_constr_195 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P98_constr_197 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P98_constr_197 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P99_constr_199 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P99_constr_199 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P100_constr_201 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P100_constr_201 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P101_constr_203 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P101_constr_203 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P102_constr_205 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P102_constr_205 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P103_constr_207 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P103_constr_207 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P104_constr_209 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P104_constr_209 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P105_constr_211 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P105_constr_211 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P106_constr_213 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P106_constr_213 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P107_constr_215 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P107_constr_215 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P108_constr_217 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P108_constr_217 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P109_constr_219 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P109_constr_219 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P110_constr_221 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P110_constr_221 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P111_constr_223 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P111_constr_223 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P112_constr_225 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P112_constr_225 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P113_constr_227 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P113_constr_227 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P114_constr_229 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P114_constr_229 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P115_constr_231 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P115_constr_231 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P116_constr_233 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P116_constr_233 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P117_constr_235 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P117_constr_235 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionContainer_6602P118_constr_237 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P118_constr_237 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P0_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABDataForwardingItem_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P0_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P0_specs_1 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P0), offsetof(struct S1AP_ProtocolExtensionContainer_6602P0, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P0 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P0_tags_1, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P0_tags_1) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P0_tags_1[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P0_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P0_tags_1) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P0_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P0_constr_1, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P0_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P0_1, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P0_specs_1 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P1_3[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABToBeSetupItemHOReq_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P1_tags_3[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P1_specs_3 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P1), offsetof(struct S1AP_ProtocolExtensionContainer_6602P1, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P1 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P1_tags_3, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P1_tags_3) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P1_tags_3[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P1_tags_3, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P1_tags_3) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P1_tags_3[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P1_constr_3, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P1_constr_3, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P1_3, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P1_specs_3 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P2_5[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABAdmittedItem_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P2_tags_5[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P2_specs_5 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P2), offsetof(struct S1AP_ProtocolExtensionContainer_6602P2, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P2 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P2_tags_5, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P2_tags_5) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P2_tags_5[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P2_tags_5, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P2_tags_5) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P2_tags_5[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P2_constr_5, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P2_constr_5, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P2_5, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P2_specs_5 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P3_7[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABFailedToSetupItemHOReqAckExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P3_tags_7[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P3_specs_7 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P3), offsetof(struct S1AP_ProtocolExtensionContainer_6602P3, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P3 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P3_tags_7, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P3_tags_7) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P3_tags_7[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P3_tags_7, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P3_tags_7) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P3_tags_7[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P3_constr_7, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P3_constr_7, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P3_7, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P3_specs_7 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P4_9[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABToBeSwitchedDLItem_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P4_tags_9[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P4_specs_9 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P4), offsetof(struct S1AP_ProtocolExtensionContainer_6602P4, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P4 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P4_tags_9, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P4_tags_9) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P4_tags_9[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P4_tags_9, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P4_tags_9) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P4_tags_9[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P4_constr_9, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P4_constr_9, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P4_9, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P4_specs_9 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P5_11[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABToBeSwitchedULItem_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P5_tags_11[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P5_specs_11 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P5), offsetof(struct S1AP_ProtocolExtensionContainer_6602P5, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P5 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P5_tags_11, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P5_tags_11) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P5_tags_11[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P5_tags_11, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P5_tags_11) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P5_tags_11[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P5_constr_11, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P5_constr_11, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P5_11, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P5_specs_11 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P6_13[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReqExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P6_tags_13[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P6_specs_13 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P6), offsetof(struct S1AP_ProtocolExtensionContainer_6602P6, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P6 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P6_tags_13, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P6_tags_13) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P6_tags_13[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P6_tags_13, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P6_tags_13) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P6_tags_13[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P6_constr_13, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P6_constr_13, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P6_13, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P6_specs_13 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P7_15[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABSetupItemBearerSUResExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P7_tags_15[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P7_specs_15 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P7), offsetof(struct S1AP_ProtocolExtensionContainer_6602P7, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P7 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P7_tags_15, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P7_tags_15) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P7_tags_15[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P7_tags_15, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P7_tags_15) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P7_tags_15[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P7_constr_15, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P7_constr_15, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P7_15, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P7_specs_15 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P8_17[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABToBeModifyItemBearerModReqExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P8_tags_17[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P8_specs_17 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P8), offsetof(struct S1AP_ProtocolExtensionContainer_6602P8, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P8 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P8_tags_17, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P8_tags_17) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P8_tags_17[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P8_tags_17, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P8_tags_17) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P8_tags_17[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P8_constr_17, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P8_constr_17, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P8_17, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P8_specs_17 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P9_19[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABModifyItemBearerModResExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P9_tags_19[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P9_specs_19 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P9), offsetof(struct S1AP_ProtocolExtensionContainer_6602P9, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P9 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P9_tags_19, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P9_tags_19) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P9_tags_19[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P9_tags_19, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P9_tags_19) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P9_tags_19[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P9_constr_19, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P9_constr_19, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P9_19, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P9_specs_19 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P10_21[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABReleaseItemBearerRelCompExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P10_tags_21[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P10_specs_21 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P10), offsetof(struct S1AP_ProtocolExtensionContainer_6602P10, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P10 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P10_tags_21, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P10_tags_21) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P10_tags_21[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P10_tags_21, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P10_tags_21) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P10_tags_21[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P10_constr_21, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P10_constr_21, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P10_21, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P10_specs_21 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P11_23[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P11_tags_23[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P11_specs_23 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P11), offsetof(struct S1AP_ProtocolExtensionContainer_6602P11, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P11 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P11_tags_23, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P11_tags_23) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P11_tags_23[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P11_tags_23, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P11_tags_23) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P11_tags_23[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P11_constr_23, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P11_constr_23, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P11_23, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P11_specs_23 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P12_25[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABSetupItemCtxtSUResExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P12_tags_25[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P12_specs_25 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P12), offsetof(struct S1AP_ProtocolExtensionContainer_6602P12, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P12 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P12_tags_25, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P12_tags_25) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P12_tags_25[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P12_tags_25, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P12_tags_25) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P12_tags_25[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P12_constr_25, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P12_constr_25, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P12_25, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P12_specs_25 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P13_27[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TAIItemExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P13_tags_27[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P13_specs_27 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P13), offsetof(struct S1AP_ProtocolExtensionContainer_6602P13, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P13 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P13_tags_27, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P13_tags_27) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P13_tags_27[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P13_tags_27, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P13_tags_27) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P13_tags_27[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P13_constr_27, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P13_constr_27, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P13_27, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P13_specs_27 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P14_29[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P14_tags_29[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P14_specs_29 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P14), offsetof(struct S1AP_ProtocolExtensionContainer_6602P14, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P14 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P14_tags_29, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P14_tags_29) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P14_tags_29[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P14_tags_29, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P14_tags_29) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P14_tags_29[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P14_constr_29, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P14_constr_29, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P14_29, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P14_specs_29 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P15_31[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P15_tags_31[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P15_specs_31 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P15), offsetof(struct S1AP_ProtocolExtensionContainer_6602P15, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P15 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P15_tags_31, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P15_tags_31) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P15_tags_31[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P15_tags_31, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P15_tags_31) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P15_tags_31[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P15_constr_31, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P15_constr_31, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P15_31, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P15_specs_31 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P16_33[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CSGMembershipInfo_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P16_tags_33[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P16_specs_33 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P16), offsetof(struct S1AP_ProtocolExtensionContainer_6602P16, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P16 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P16_tags_33, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P16_tags_33) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P16_tags_33[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P16_tags_33, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P16_tags_33) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P16_tags_33[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P16_constr_33, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P16_constr_33, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P16_33, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P16_specs_33 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P17_35[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABModifyItemBearerModConfExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P17_tags_35[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P17_specs_35 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P17), offsetof(struct S1AP_ProtocolExtensionContainer_6602P17, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P17 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P17_tags_35, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P17_tags_35) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P17_tags_35[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P17_tags_35, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P17_tags_35) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P17_tags_35[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P17_constr_35, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P17_constr_35, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P17_35, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P17_specs_35 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P18_37[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P18_tags_37[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P18_specs_37 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P18), offsetof(struct S1AP_ProtocolExtensionContainer_6602P18, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P18 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P18_tags_37, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P18_tags_37) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P18_tags_37[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P18_tags_37, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P18_tags_37) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P18_tags_37[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P18_constr_37, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P18_constr_37, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P18_37, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P18_specs_37 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P19_39[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P19_tags_39[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P19_specs_39 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P19), offsetof(struct S1AP_ProtocolExtensionContainer_6602P19, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P19 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P19_tags_39, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P19_tags_39) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P19_tags_39[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P19_tags_39, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P19_tags_39) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P19_tags_39[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P19_constr_39, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P19_constr_39, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P19_39, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P19_specs_39 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P20_41[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_Additional_GUTI_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P20_tags_41[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P20_specs_41 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P20), offsetof(struct S1AP_ProtocolExtensionContainer_6602P20, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P20 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P20_tags_41, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P20_tags_41) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P20_tags_41[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P20_tags_41, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P20_tags_41) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P20_tags_41[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P20_constr_41, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P20_constr_41, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P20_41, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P20_specs_41 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P21_43[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_AllocationAndRetentionPriority_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P21_tags_43[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P21_specs_43 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P21), offsetof(struct S1AP_ProtocolExtensionContainer_6602P21, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P21 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P21_tags_43, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P21_tags_43) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P21_tags_43[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P21_tags_43, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P21_tags_43) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P21_tags_43[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P21_constr_43, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P21_constr_43, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P21_43, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P21_specs_43 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P22_45[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_InformationForCECapableUEs_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P22_tags_45[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P22_specs_45 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P22), offsetof(struct S1AP_ProtocolExtensionContainer_6602P22, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P22 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P22_tags_45, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P22_tags_45) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P22_tags_45[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P22_tags_45, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P22_tags_45) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P22_tags_45[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P22_constr_45, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P22_constr_45, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P22_45, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P22_specs_45 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P23_47[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_AssistanceDataForPaging_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P23_tags_47[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P23_specs_47 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P23), offsetof(struct S1AP_ProtocolExtensionContainer_6602P23, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P23 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P23_tags_47, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P23_tags_47) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P23_tags_47[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P23_tags_47, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P23_tags_47) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P23_tags_47[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P23_constr_47, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P23_constr_47, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P23_47, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P23_specs_47 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P24_49[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_AssistanceDataForRecommendedCells_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P24_tags_49[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P24_specs_49 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P24), offsetof(struct S1AP_ProtocolExtensionContainer_6602P24, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P24 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P24_tags_49, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P24_tags_49) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P24_tags_49[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P24_tags_49, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P24_tags_49) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P24_tags_49[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P24_constr_49, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P24_constr_49, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P24_49, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P24_specs_49 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P25_51[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P25_tags_51[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P25_specs_51 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P25), offsetof(struct S1AP_ProtocolExtensionContainer_6602P25, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P25 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P25_tags_51, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P25_tags_51) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P25_tags_51[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P25_tags_51, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P25_tags_51) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P25_tags_51[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P25_constr_51, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P25_constr_51, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P25_51, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P25_specs_51 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P26_53[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CancelledCellinEAI_Item_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P26_tags_53[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P26_specs_53 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P26), offsetof(struct S1AP_ProtocolExtensionContainer_6602P26, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P26 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P26_tags_53, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P26_tags_53) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P26_tags_53[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P26_tags_53, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P26_tags_53) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P26_tags_53[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P26_constr_53, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P26_constr_53, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P26_53, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P26_specs_53 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P27_55[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CancelledCellinTAI_Item_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P27_tags_55[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P27_specs_55 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P27), offsetof(struct S1AP_ProtocolExtensionContainer_6602P27, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P27 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P27_tags_55, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P27_tags_55) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P27_tags_55[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P27_tags_55, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P27_tags_55) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P27_tags_55[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P27_constr_55, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P27_constr_55, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P27_55, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P27_specs_55 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P28_57[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P28_tags_57[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P28_specs_57 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P28), offsetof(struct S1AP_ProtocolExtensionContainer_6602P28, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P28 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P28_tags_57, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P28_tags_57) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P28_tags_57[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P28_tags_57, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P28_tags_57) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P28_tags_57[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P28_constr_57, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P28_constr_57, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P28_57, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P28_specs_57 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P29_59[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CellID_Broadcast_Item_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P29_tags_59[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P29_specs_59 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P29), offsetof(struct S1AP_ProtocolExtensionContainer_6602P29, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P29 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P29_tags_59, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P29_tags_59) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P29_tags_59[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P29_tags_59, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P29_tags_59) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P29_tags_59[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P29_constr_59, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P29_constr_59, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P29_59, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P29_specs_59 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P30_61[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CellID_Cancelled_Item_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P30_tags_61[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P30_specs_61 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P30), offsetof(struct S1AP_ProtocolExtensionContainer_6602P30, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P30 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P30_tags_61, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P30_tags_61) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P30_tags_61[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P30_tags_61, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P30_tags_61) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P30_tags_61[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P30_constr_61, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P30_constr_61, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P30_61, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P30_specs_61 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P31_63[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CellBasedMDT_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P31_tags_63[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P31_specs_63 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P31), offsetof(struct S1AP_ProtocolExtensionContainer_6602P31, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P31 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P31_tags_63, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P31_tags_63) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P31_tags_63[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P31_tags_63, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P31_tags_63) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P31_tags_63[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P31_constr_63, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P31_constr_63, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P31_63, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P31_specs_63 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P32_65[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_Cdma2000OneXSRVCCInfo_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P32_tags_65[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P32_specs_65 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P32), offsetof(struct S1AP_ProtocolExtensionContainer_6602P32, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P32 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P32_tags_65, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P32_tags_65) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P32_tags_65[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P32_tags_65, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P32_tags_65) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P32_tags_65[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P32_constr_65, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P32_constr_65, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P32_65, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P32_specs_65 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P33_67[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CellType_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P33_tags_67[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P33_specs_67 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P33), offsetof(struct S1AP_ProtocolExtensionContainer_6602P33, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P33 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P33_tags_67, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P33_tags_67) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P33_tags_67[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P33_tags_67, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P33_tags_67) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P33_tags_67[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P33_constr_67, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P33_constr_67, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P33_67, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P33_specs_67 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P34_69[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CGI_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P34_tags_69[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P34_specs_69 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P34), offsetof(struct S1AP_ProtocolExtensionContainer_6602P34, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P34 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P34_tags_69, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P34_tags_69) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P34_tags_69[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P34_tags_69, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P34_tags_69) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P34_tags_69[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P34_constr_69, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P34_constr_69, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P34_69, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P34_specs_69 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P35_71[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CSG_IdList_Item_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P35_tags_71[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P35_specs_71 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P35), offsetof(struct S1AP_ProtocolExtensionContainer_6602P35, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P35 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P35_tags_71, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P35_tags_71) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P35_tags_71[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P35_tags_71, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P35_tags_71) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P35_tags_71[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P35_constr_71, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P35_constr_71, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P35_71, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P35_specs_71 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P36_73[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_COUNTvalue_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P36_tags_73[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P36_specs_73 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P36), offsetof(struct S1AP_ProtocolExtensionContainer_6602P36, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P36 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P36_tags_73, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P36_tags_73) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P36_tags_73[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P36_tags_73, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P36_tags_73) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P36_tags_73[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P36_constr_73, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P36_constr_73, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P36_73, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P36_specs_73 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P37_75[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_COUNTValueExtended_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P37_tags_75[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P37_specs_75 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P37), offsetof(struct S1AP_ProtocolExtensionContainer_6602P37, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P37 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P37_tags_75, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P37_tags_75) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P37_tags_75[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P37_tags_75, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P37_tags_75) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P37_tags_75[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P37_constr_75, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P37_constr_75, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P37_75, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P37_specs_75 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P38_77[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_COUNTvaluePDCP_SNlength18_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P38_tags_77[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P38_specs_77 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P38), offsetof(struct S1AP_ProtocolExtensionContainer_6602P38, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P38 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P38_tags_77, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P38_tags_77) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P38_tags_77[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P38_tags_77, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P38_tags_77) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P38_tags_77[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P38_constr_77, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P38_constr_77, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P38_77, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P38_specs_77 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P39_79[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P39_tags_79[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P39_specs_79 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P39), offsetof(struct S1AP_ProtocolExtensionContainer_6602P39, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P39 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P39_tags_79, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P39_tags_79) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P39_tags_79[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P39_tags_79, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P39_tags_79) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P39_tags_79[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P39_constr_79, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P39_constr_79, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P39_79, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P39_specs_79 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P40_81[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics_IE_Item_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P40_tags_81[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P40_specs_81 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P40), offsetof(struct S1AP_ProtocolExtensionContainer_6602P40, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P40 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P40_tags_81, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P40_tags_81) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P40_tags_81[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P40_tags_81, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P40_tags_81) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P40_tags_81[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P40_constr_81, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P40_constr_81, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P40_81, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P40_specs_81 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P41_83[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ServedDCNsItem_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P41_tags_83[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P41_specs_83 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P41), offsetof(struct S1AP_ProtocolExtensionContainer_6602P41, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P41 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P41_tags_83, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P41_tags_83) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P41_tags_83[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P41_tags_83, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P41_tags_83) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P41_tags_83[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P41_constr_83, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P41_constr_83, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P41_83, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P41_specs_83 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P42_85[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_DL_CP_SecurityInformation_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P42_tags_85[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P42_specs_85 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P42), offsetof(struct S1AP_ProtocolExtensionContainer_6602P42, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P42 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P42_tags_85, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P42_tags_85) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P42_tags_85[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P42_tags_85, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P42_tags_85) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P42_tags_85[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P42_constr_85, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P42_constr_85, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P42_85, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P42_specs_85 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P43_87[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P43_tags_87[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P43_specs_87 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P43), offsetof(struct S1AP_ProtocolExtensionContainer_6602P43, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P43 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P43_tags_87, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P43_tags_87) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P43_tags_87[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P43_tags_87, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P43_tags_87) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P43_tags_87[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P43_constr_87, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P43_constr_87, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P43_87, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P43_specs_87 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P44_89[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P44_tags_89[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P44_specs_89 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P44), offsetof(struct S1AP_ProtocolExtensionContainer_6602P44, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P44 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P44_tags_89, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P44_tags_89) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P44_tags_89[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P44_tags_89, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P44_tags_89) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P44_tags_89[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P44_constr_89, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P44_constr_89, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P44_89, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P44_specs_89 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P45_91[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CompletedCellinEAI_Item_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P45_tags_91[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P45_specs_91 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P45), offsetof(struct S1AP_ProtocolExtensionContainer_6602P45, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P45 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P45_tags_91, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P45_tags_91) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P45_tags_91[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P45_tags_91, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P45_tags_91) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P45_tags_91[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P45_constr_91, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P45_constr_91, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P45_91, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P45_specs_91 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P46_93[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_GERAN_Cell_ID_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P46_tags_93[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P46_specs_93 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P46), offsetof(struct S1AP_ProtocolExtensionContainer_6602P46, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P46 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P46_tags_93, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P46_tags_93) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P46_tags_93[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P46_tags_93, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P46_tags_93) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P46_tags_93[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P46_constr_93, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P46_constr_93, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P46_93, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P46_specs_93 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P47_95[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_GlobalENB_ID_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P47_tags_95[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P47_specs_95 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P47), offsetof(struct S1AP_ProtocolExtensionContainer_6602P47, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P47 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P47_tags_95, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P47_tags_95) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P47_tags_95[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P47_tags_95, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P47_tags_95) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P47_tags_95[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P47_constr_95, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P47_constr_95, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P47_95, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P47_specs_95 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P48_97[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P48_tags_97[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P48_specs_97 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P48), offsetof(struct S1AP_ProtocolExtensionContainer_6602P48, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P48 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P48_tags_97, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P48_tags_97) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P48_tags_97[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P48_tags_97, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P48_tags_97) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P48_tags_97[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P48_constr_97, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P48_constr_97, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P48_97, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P48_specs_97 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P49_99[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABInformationListItem_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P49_tags_99[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P49_specs_99 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P49), offsetof(struct S1AP_ProtocolExtensionContainer_6602P49, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P49 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P49_tags_99, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P49_tags_99) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P49_tags_99[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P49_tags_99, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P49_tags_99) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P49_tags_99[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P49_constr_99, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P49_constr_99, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P49_99, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P49_specs_99 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P50_101[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABItem_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P50_tags_101[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P50_specs_101 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P50), offsetof(struct S1AP_ProtocolExtensionContainer_6602P50, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P50 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P50_tags_101, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P50_tags_101) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P50_tags_101[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P50_tags_101, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P50_tags_101) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P50_tags_101[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P50_constr_101, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P50_constr_101, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P50_101, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P50_specs_101 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P51_103[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABQoSParameters_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P51_tags_103[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P51_specs_103 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P51), offsetof(struct S1AP_ProtocolExtensionContainer_6602P51, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P51 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P51_tags_103, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P51_tags_103) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P51_tags_103[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P51_tags_103, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P51_tags_103) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P51_tags_103[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P51_constr_103, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P51_constr_103, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P51_103, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P51_specs_103 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P52_105[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_EUTRAN_CGI_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P52_tags_105[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P52_specs_105 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P52), offsetof(struct S1AP_ProtocolExtensionContainer_6602P52, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P52 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P52_tags_105, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P52_tags_105) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P52_tags_105[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P52_tags_105, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P52_tags_105) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P52_tags_105[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P52_constr_105, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P52_constr_105, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P52_105, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P52_specs_105 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P53_107[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ExpectedUEBehaviour_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P53_tags_107[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P53_specs_107 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P53), offsetof(struct S1AP_ProtocolExtensionContainer_6602P53, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P53 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P53_tags_107, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P53_tags_107) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P53_tags_107[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P53_tags_107, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P53_tags_107) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P53_tags_107[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P53_constr_107, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P53_constr_107, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P53_107, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P53_specs_107 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P54_109[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ExpectedUEActivityBehaviour_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P54_tags_109[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P54_specs_109 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P54), offsetof(struct S1AP_ProtocolExtensionContainer_6602P54, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P54 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P54_tags_109, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P54_tags_109) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P54_tags_109[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P54_tags_109, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P54_tags_109) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P54_tags_109[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P54_constr_109, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P54_constr_109, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P54_109, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P54_specs_109 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P55_111[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ForbiddenTAs_Item_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P55_tags_111[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P55_specs_111 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P55), offsetof(struct S1AP_ProtocolExtensionContainer_6602P55, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P55 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P55_tags_111, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P55_tags_111) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P55_tags_111[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P55_tags_111, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P55_tags_111) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P55_tags_111[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P55_constr_111, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P55_constr_111, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P55_111, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P55_specs_111 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P56_113[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ForbiddenLAs_Item_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P56_tags_113[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P56_specs_113 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P56), offsetof(struct S1AP_ProtocolExtensionContainer_6602P56, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P56 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P56_tags_113, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P56_tags_113) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P56_tags_113[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P56_tags_113, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P56_tags_113) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P56_tags_113[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P56_constr_113, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P56_constr_113, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P56_113, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P56_specs_113 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P57_115[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_GBR_QosInformation_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P57_tags_115[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P57_specs_115 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P57), offsetof(struct S1AP_ProtocolExtensionContainer_6602P57, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P57 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P57_tags_115, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P57_tags_115) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P57_tags_115[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P57_tags_115, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P57_tags_115) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P57_tags_115[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P57_constr_115, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P57_constr_115, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P57_115, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P57_specs_115 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P58_117[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_GUMMEI_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P58_tags_117[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P58_specs_117 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P58), offsetof(struct S1AP_ProtocolExtensionContainer_6602P58, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P58 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P58_tags_117, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P58_tags_117) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P58_tags_117[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P58_tags_117, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P58_tags_117) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P58_tags_117[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P58_constr_117, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P58_constr_117, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P58_117, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P58_specs_117 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P59_119[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_HandoverRestrictionList_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P59_tags_119[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P59_specs_119 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P59), offsetof(struct S1AP_ProtocolExtensionContainer_6602P59, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P59 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P59_tags_119, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P59_tags_119) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P59_tags_119[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P59_tags_119, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P59_tags_119) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P59_tags_119[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P59_constr_119, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P59_constr_119, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P59_119, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P59_specs_119 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P60_121[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ImmediateMDT_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P60_tags_121[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P60_specs_121 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P60), offsetof(struct S1AP_ProtocolExtensionContainer_6602P60, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P60 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P60_tags_121, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P60_tags_121) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P60_tags_121[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P60_tags_121, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P60_tags_121) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P60_tags_121[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P60_constr_121, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P60_constr_121, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P60_121, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P60_specs_121 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P61_123[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P61_tags_123[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P61_specs_123 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P61), offsetof(struct S1AP_ProtocolExtensionContainer_6602P61, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P61 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P61_tags_123, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P61_tags_123) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P61_tags_123[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P61_tags_123, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P61_tags_123) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P61_tags_123[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P61_constr_123, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P61_constr_123, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P61_123, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P61_specs_123 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P62_125[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_LAI_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P62_tags_125[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P62_specs_125 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P62), offsetof(struct S1AP_ProtocolExtensionContainer_6602P62, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P62 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P62_tags_125, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P62_tags_125) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P62_tags_125[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P62_tags_125, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P62_tags_125) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P62_tags_125[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P62_constr_125, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P62_constr_125, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P62_125, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P62_specs_125 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P63_127[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_LastVisitedEUTRANCellInformation_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P63_tags_127[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P63_specs_127 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P63), offsetof(struct S1AP_ProtocolExtensionContainer_6602P63, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P63 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P63_tags_127, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P63_tags_127) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P63_tags_127[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P63_tags_127, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P63_tags_127) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P63_tags_127[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P63_constr_127, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P63_constr_127, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P63_127, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P63_specs_127 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P64_129[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ListeningSubframePattern_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P64_tags_129[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P64_specs_129 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P64), offsetof(struct S1AP_ProtocolExtensionContainer_6602P64, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P64 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P64_tags_129, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P64_tags_129) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P64_tags_129[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P64_tags_129, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P64_tags_129) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P64_tags_129[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P64_constr_129, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P64_constr_129, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P64_129, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P64_specs_129 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P65_131[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_LoggedMDT_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P65_tags_131[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P65_specs_131 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P65), offsetof(struct S1AP_ProtocolExtensionContainer_6602P65, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P65 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P65_tags_131, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P65_tags_131) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P65_tags_131[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P65_tags_131, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P65_tags_131) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P65_tags_131[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P65_constr_131, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P65_constr_131, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P65_131, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P65_specs_131 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P66_133[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_LoggedMBSFNMDT_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P66_tags_133[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P66_specs_133 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P66), offsetof(struct S1AP_ProtocolExtensionContainer_6602P66, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P66 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P66_tags_133, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P66_tags_133) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P66_tags_133[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P66_tags_133, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P66_tags_133) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P66_tags_133[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P66_constr_133, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P66_constr_133, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P66_133, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P66_specs_133 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P67_135[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_M3Configuration_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P67_tags_135[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P67_specs_135 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P67), offsetof(struct S1AP_ProtocolExtensionContainer_6602P67, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P67 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P67_tags_135, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P67_tags_135) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P67_tags_135[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P67_tags_135, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P67_tags_135) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P67_tags_135[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P67_constr_135, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P67_constr_135, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P67_135, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P67_specs_135 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P68_137[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_M4Configuration_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P68_tags_137[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P68_specs_137 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P68), offsetof(struct S1AP_ProtocolExtensionContainer_6602P68, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P68 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P68_tags_137, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P68_tags_137) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P68_tags_137[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P68_tags_137, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P68_tags_137) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P68_tags_137[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P68_constr_137, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P68_constr_137, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P68_137, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P68_specs_137 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P69_139[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_M5Configuration_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P69_tags_139[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P69_specs_139 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P69), offsetof(struct S1AP_ProtocolExtensionContainer_6602P69, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P69 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P69_tags_139, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P69_tags_139) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P69_tags_139[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P69_tags_139, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P69_tags_139) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P69_tags_139[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P69_constr_139, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P69_constr_139, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P69_139, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P69_specs_139 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P70_141[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_M6Configuration_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P70_tags_141[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P70_specs_141 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P70), offsetof(struct S1AP_ProtocolExtensionContainer_6602P70, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P70 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P70_tags_141, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P70_tags_141) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P70_tags_141[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P70_tags_141, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P70_tags_141) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P70_tags_141[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P70_constr_141, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P70_constr_141, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P70_141, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P70_specs_141 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P71_143[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_M7Configuration_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P71_tags_143[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P71_specs_143 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P71), offsetof(struct S1AP_ProtocolExtensionContainer_6602P71, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P71 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P71_tags_143, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P71_tags_143) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P71_tags_143[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P71_tags_143, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P71_tags_143) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P71_tags_143[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P71_constr_143, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P71_constr_143, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P71_143, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P71_specs_143 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P72_145[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_MDT_Configuration_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P72_tags_145[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P72_specs_145 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P72), offsetof(struct S1AP_ProtocolExtensionContainer_6602P72, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P72 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P72_tags_145, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P72_tags_145) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P72_tags_145[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P72_tags_145, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P72_tags_145) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P72_tags_145[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P72_constr_145, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P72_constr_145, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P72_145, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P72_specs_145 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P73_147[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_MBSFN_ResultToLogInfo_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P73_tags_147[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P73_specs_147 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P73), offsetof(struct S1AP_ProtocolExtensionContainer_6602P73, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P73 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P73_tags_147, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P73_tags_147) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P73_tags_147[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P73_tags_147, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P73_tags_147) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P73_tags_147[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P73_constr_147, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P73_constr_147, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P73_147, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P73_specs_147 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P74_149[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_MutingPatternInformation_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P74_tags_149[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P74_specs_149 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P74), offsetof(struct S1AP_ProtocolExtensionContainer_6602P74, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P74 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P74_tags_149, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P74_tags_149) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P74_tags_149[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P74_tags_149, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P74_tags_149) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P74_tags_149[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P74_constr_149, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P74_constr_149, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P74_149, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P74_specs_149 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P75_151[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P75_tags_151[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P75_specs_151 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P75), offsetof(struct S1AP_ProtocolExtensionContainer_6602P75, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P75 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P75_tags_151, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P75_tags_151) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P75_tags_151[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P75_tags_151, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P75_tags_151) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P75_tags_151[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P75_constr_151, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P75_constr_151, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P75_151, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P75_specs_151 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P76_153[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_PagingAttemptInformation_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P76_tags_153[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P76_specs_153 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P76), offsetof(struct S1AP_ProtocolExtensionContainer_6602P76, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P76 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P76_tags_153, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P76_tags_153) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P76_tags_153[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P76_tags_153, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P76_tags_153) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P76_tags_153[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P76_constr_153, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P76_constr_153, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P76_153, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P76_specs_153 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P77_155[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_Paging_eDRXInformation_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P77_tags_155[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P77_specs_155 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P77), offsetof(struct S1AP_ProtocolExtensionContainer_6602P77, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P77 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P77_tags_155, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P77_tags_155) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P77_tags_155[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P77_tags_155, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P77_tags_155) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P77_tags_155[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P77_constr_155, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P77_constr_155, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P77_155, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P77_specs_155 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P78_157[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_M1PeriodicReporting_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P78_tags_157[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P78_specs_157 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P78), offsetof(struct S1AP_ProtocolExtensionContainer_6602P78, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P78 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P78_tags_157, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P78_tags_157) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P78_tags_157[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P78_tags_157, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P78_tags_157) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P78_tags_157[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P78_constr_157, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P78_constr_157, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P78_157, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P78_specs_157 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P79_159[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProSeAuthorized_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P79_tags_159[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P79_specs_159 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P79), offsetof(struct S1AP_ProtocolExtensionContainer_6602P79, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P79 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P79_tags_159, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P79_tags_159) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P79_tags_159[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P79_tags_159, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P79_tags_159) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P79_tags_159[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P79_constr_159, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P79_constr_159, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P79_159, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P79_specs_159 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P80_161[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_RecommendedCellsForPaging_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P80_tags_161[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P80_specs_161 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P80), offsetof(struct S1AP_ProtocolExtensionContainer_6602P80, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P80 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P80_tags_161, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P80_tags_161) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P80_tags_161[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P80_tags_161, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P80_tags_161) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P80_tags_161[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P80_constr_161, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P80_constr_161, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P80_161, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P80_specs_161 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P81_163[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_RecommendedCellsForPagingItem_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P81_tags_163[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P81_specs_163 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P81), offsetof(struct S1AP_ProtocolExtensionContainer_6602P81, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P81 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P81_tags_163, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P81_tags_163) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P81_tags_163[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P81_tags_163, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P81_tags_163) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P81_tags_163[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P81_constr_163, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P81_constr_163, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P81_163, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P81_specs_163 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P82_165[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_RecommendedENBsForPaging_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P82_tags_165[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P82_specs_165 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P82), offsetof(struct S1AP_ProtocolExtensionContainer_6602P82, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P82 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P82_tags_165, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P82_tags_165) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P82_tags_165[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P82_tags_165, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P82_tags_165) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P82_tags_165[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P82_constr_165, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P82_constr_165, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P82_165, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P82_specs_165 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P83_167[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_RecommendedENBItem_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P83_tags_167[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P83_specs_167 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P83), offsetof(struct S1AP_ProtocolExtensionContainer_6602P83, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P83 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P83_tags_167, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P83_tags_167) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P83_tags_167[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P83_tags_167, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P83_tags_167) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P83_tags_167[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P83_constr_167, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P83_constr_167, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P83_167, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P83_specs_167 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P84_169[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_RequestType_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P84_tags_169[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P84_specs_169 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P84), offsetof(struct S1AP_ProtocolExtensionContainer_6602P84, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P84 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P84_tags_169, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P84_tags_169) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P84_tags_169[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P84_tags_169, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P84_tags_169) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P84_tags_169[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P84_constr_169, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P84_constr_169, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P84_169, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P84_specs_169 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P85_171[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_RIMTransfer_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P85_tags_171[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P85_specs_171 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P85), offsetof(struct S1AP_ProtocolExtensionContainer_6602P85, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P85 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P85_tags_171, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P85_tags_171) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P85_tags_171[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P85_tags_171, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P85_tags_171) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P85_tags_171[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P85_constr_171, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P85_constr_171, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P85_171, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P85_specs_171 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P86_173[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_RLFReportInformation_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P86_tags_173[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P86_specs_173 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P86), offsetof(struct S1AP_ProtocolExtensionContainer_6602P86, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P86 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P86_tags_173, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P86_tags_173) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P86_tags_173[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P86_tags_173, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P86_tags_173) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P86_tags_173[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P86_constr_173, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P86_constr_173, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P86_173, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P86_specs_173 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P87_175[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_SecurityContext_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P87_tags_175[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P87_specs_175 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P87), offsetof(struct S1AP_ProtocolExtensionContainer_6602P87, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P87 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P87_tags_175, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P87_tags_175) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P87_tags_175[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P87_tags_175, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P87_tags_175) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P87_tags_175[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P87_constr_175, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P87_constr_175, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P87_175, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P87_specs_175 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P88_177[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_SONInformationReply_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P88_tags_177[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P88_specs_177 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P88), offsetof(struct S1AP_ProtocolExtensionContainer_6602P88, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P88 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P88_tags_177, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P88_tags_177) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P88_tags_177[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P88_tags_177, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P88_tags_177) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P88_tags_177[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P88_constr_177, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P88_constr_177, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P88_177, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P88_specs_177 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P89_179[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_SONConfigurationTransfer_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P89_tags_179[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P89_specs_179 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P89), offsetof(struct S1AP_ProtocolExtensionContainer_6602P89, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P89 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P89_tags_179, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P89_tags_179) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P89_tags_179[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P89_tags_179, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P89_tags_179) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P89_tags_179[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P89_constr_179, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P89_constr_179, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P89_179, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P89_specs_179 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P90_181[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_SynchronisationInformation_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P90_tags_181[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P90_specs_181 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P90), offsetof(struct S1AP_ProtocolExtensionContainer_6602P90, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P90 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P90_tags_181, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P90_tags_181) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P90_tags_181[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P90_tags_181, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P90_tags_181) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P90_tags_181[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P90_constr_181, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P90_constr_181, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P90_181, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P90_specs_181 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P91_183[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_SourceeNB_ID_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P91_tags_183[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P91_specs_183 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P91), offsetof(struct S1AP_ProtocolExtensionContainer_6602P91, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P91 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P91_tags_183, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P91_tags_183) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P91_tags_183[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P91_tags_183, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P91_tags_183) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P91_tags_183[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P91_constr_183, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P91_constr_183, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P91_183, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P91_specs_183 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P92_185[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P92_tags_185[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P92_specs_185 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P92), offsetof(struct S1AP_ProtocolExtensionContainer_6602P92, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P92 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P92_tags_185, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P92_tags_185) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P92_tags_185[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P92_tags_185, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P92_tags_185) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P92_tags_185[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P92_constr_185, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P92_constr_185, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P92_185, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P92_specs_185 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P93_187[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ServedGUMMEIsItem_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P93_tags_187[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P93_specs_187 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P93), offsetof(struct S1AP_ProtocolExtensionContainer_6602P93, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P93 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P93_tags_187, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P93_tags_187) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P93_tags_187[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P93_tags_187, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P93_tags_187) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P93_tags_187[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P93_constr_187, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P93_constr_187, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P93_187, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P93_specs_187 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P94_189[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_SupportedTAs_Item_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P94_tags_189[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P94_specs_189 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P94), offsetof(struct S1AP_ProtocolExtensionContainer_6602P94, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P94 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P94_tags_189, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P94_tags_189) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P94_tags_189[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P94_tags_189, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P94_tags_189) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P94_tags_189[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P94_constr_189, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P94_constr_189, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P94_189, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P94_specs_189 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P95_191[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TimeSynchronisationInfo_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P95_tags_191[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P95_specs_191 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P95), offsetof(struct S1AP_ProtocolExtensionContainer_6602P95, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P95 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P95_tags_191, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P95_tags_191) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P95_tags_191[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P95_tags_191, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P95_tags_191) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P95_tags_191[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P95_constr_191, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P95_constr_191, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P95_191, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P95_specs_191 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P96_193[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_S_TMSI_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P96_tags_193[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P96_specs_193 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P96), offsetof(struct S1AP_ProtocolExtensionContainer_6602P96, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P96 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P96_tags_193, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P96_tags_193) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P96_tags_193[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P96_tags_193, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P96_tags_193) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P96_tags_193[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P96_constr_193, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P96_constr_193, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P96_193, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P96_specs_193 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P97_195[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TAIBasedMDT_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P97_tags_195[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P97_specs_195 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P97), offsetof(struct S1AP_ProtocolExtensionContainer_6602P97, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P97 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P97_tags_195, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P97_tags_195) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P97_tags_195[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P97_tags_195, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P97_tags_195) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P97_tags_195[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P97_constr_195, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P97_constr_195, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P97_195, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P97_specs_195 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P98_197[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TAI_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P98_tags_197[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P98_specs_197 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P98), offsetof(struct S1AP_ProtocolExtensionContainer_6602P98, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P98 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P98_tags_197, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P98_tags_197) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P98_tags_197[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P98_tags_197, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P98_tags_197) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P98_tags_197[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P98_constr_197, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P98_constr_197, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P98_197, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P98_specs_197 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P99_199[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TAI_Broadcast_Item_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P99_tags_199[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P99_specs_199 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P99), offsetof(struct S1AP_ProtocolExtensionContainer_6602P99, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P99 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P99_tags_199, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P99_tags_199) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P99_tags_199[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P99_tags_199, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P99_tags_199) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P99_tags_199[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P99_constr_199, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P99_constr_199, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P99_199, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P99_specs_199 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P100_201[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TAI_Cancelled_Item_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P100_tags_201[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P100_specs_201 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P100), offsetof(struct S1AP_ProtocolExtensionContainer_6602P100, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P100 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P100_tags_201, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P100_tags_201) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P100_tags_201[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P100_tags_201, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P100_tags_201) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P100_tags_201[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P100_constr_201, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P100_constr_201, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P100_201, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P100_specs_201 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P101_203[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TABasedMDT_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P101_tags_203[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P101_specs_203 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P101), offsetof(struct S1AP_ProtocolExtensionContainer_6602P101, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P101 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P101_tags_203, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P101_tags_203) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P101_tags_203[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P101_tags_203, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P101_tags_203) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P101_tags_203[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P101_constr_203, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P101_constr_203, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P101_203, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P101_specs_203 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P102_205[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CompletedCellinTAI_Item_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P102_tags_205[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P102_specs_205 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P102), offsetof(struct S1AP_ProtocolExtensionContainer_6602P102, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P102 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P102_tags_205, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P102_tags_205) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P102_tags_205[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P102_tags_205, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P102_tags_205) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P102_tags_205[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P102_constr_205, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P102_constr_205, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P102_205, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P102_specs_205 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P103_207[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TargeteNB_ID_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P103_tags_207[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P103_specs_207 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P103), offsetof(struct S1AP_ProtocolExtensionContainer_6602P103, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P103 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P103_tags_207, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P103_tags_207) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P103_tags_207[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P103_tags_207, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P103_tags_207) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P103_tags_207[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P103_constr_207, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P103_constr_207, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P103_207, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P103_specs_207 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P104_209[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TargetRNC_ID_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P104_tags_209[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P104_specs_209 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P104), offsetof(struct S1AP_ProtocolExtensionContainer_6602P104, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P104 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P104_tags_209, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P104_tags_209) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P104_tags_209[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P104_tags_209, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P104_tags_209) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P104_tags_209[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P104_constr_209, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P104_constr_209, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P104_209, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P104_specs_209 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P105_211[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P105_tags_211[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P105_specs_211 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P105), offsetof(struct S1AP_ProtocolExtensionContainer_6602P105, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P105 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P105_tags_211, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P105_tags_211) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P105_tags_211[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P105_tags_211, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P105_tags_211) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P105_tags_211[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P105_constr_211, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P105_constr_211, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P105_211, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P105_specs_211 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P106_213[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_M1ThresholdEventA2_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P106_tags_213[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P106_specs_213 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P106), offsetof(struct S1AP_ProtocolExtensionContainer_6602P106, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P106 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P106_tags_213, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P106_tags_213) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P106_tags_213[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P106_tags_213, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P106_tags_213) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P106_tags_213[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P106_constr_213, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P106_constr_213, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P106_213, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P106_specs_213 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P107_215[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TraceActivation_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P107_tags_215[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P107_specs_215 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P107), offsetof(struct S1AP_ProtocolExtensionContainer_6602P107, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P107 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P107_tags_215, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P107_tags_215) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P107_tags_215[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P107_tags_215, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P107_tags_215) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P107_tags_215[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P107_constr_215, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P107_constr_215, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P107_215, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P107_specs_215 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P108_217[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_Tunnel_Information_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P108_tags_217[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P108_specs_217 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P108), offsetof(struct S1AP_ProtocolExtensionContainer_6602P108, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P108 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P108_tags_217, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P108_tags_217) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P108_tags_217[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P108_tags_217, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P108_tags_217) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P108_tags_217[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P108_constr_217, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P108_constr_217, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P108_217, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P108_specs_217 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P109_219[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEAggregate_MaximumBitrates_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P109_tags_219[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P109_specs_219 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P109), offsetof(struct S1AP_ProtocolExtensionContainer_6602P109, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P109 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P109_tags_219, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P109_tags_219) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P109_tags_219[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P109_tags_219, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P109_tags_219) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P109_tags_219[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P109_constr_219, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P109_constr_219, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P109_219, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P109_specs_219 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P110_221[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UE_S1AP_ID_pair_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P110_tags_221[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P110_specs_221 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P110), offsetof(struct S1AP_ProtocolExtensionContainer_6602P110, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P110 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P110_tags_221, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P110_tags_221) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P110_tags_221[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P110_tags_221, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P110_tags_221) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P110_tags_221[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P110_constr_221, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P110_constr_221, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P110_221, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P110_specs_221 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P111_223[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P111_tags_223[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P111_specs_223 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P111), offsetof(struct S1AP_ProtocolExtensionContainer_6602P111, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P111 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P111_tags_223, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P111_tags_223) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P111_tags_223[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P111_tags_223, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P111_tags_223) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P111_tags_223[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P111_constr_223, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P111_constr_223, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P111_223, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P111_specs_223 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P112_225[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UESecurityCapabilities_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P112_tags_225[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P112_specs_225 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P112), offsetof(struct S1AP_ProtocolExtensionContainer_6602P112, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P112 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P112_tags_225, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P112_tags_225) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P112_tags_225[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P112_tags_225, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P112_tags_225) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P112_tags_225[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P112_constr_225, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P112_constr_225, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P112_225, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P112_specs_225 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P113_227[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P113_tags_227[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P113_specs_227 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P113), offsetof(struct S1AP_ProtocolExtensionContainer_6602P113, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P113 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P113_tags_227, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P113_tags_227) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P113_tags_227[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P113_tags_227, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P113_tags_227) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P113_tags_227[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P113_constr_227, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P113_constr_227, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P113_227, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P113_specs_227 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P114_229[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UL_CP_SecurityInformation_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P114_tags_229[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P114_specs_229 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P114), offsetof(struct S1AP_ProtocolExtensionContainer_6602P114, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P114 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P114_tags_229, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P114_tags_229) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P114_tags_229[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P114_tags_229, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P114_tags_229) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P114_tags_229[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P114_constr_229, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P114_constr_229, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P114_229, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P114_specs_229 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P115_231[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UserLocationInformation_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P115_tags_231[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P115_specs_231 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P115), offsetof(struct S1AP_ProtocolExtensionContainer_6602P115, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P115 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P115_tags_231, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P115_tags_231) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P115_tags_231[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P115_tags_231, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P115_tags_231) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P115_tags_231[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P115_constr_231, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P115_constr_231, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P115_231, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P115_specs_231 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P116_233[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_V2XServicesAuthorized_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P116_tags_233[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P116_specs_233 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P116), offsetof(struct S1AP_ProtocolExtensionContainer_6602P116, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P116 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P116_tags_233, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P116_tags_233) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P116_tags_233[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P116_tags_233, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P116_tags_233) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P116_tags_233[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P116_constr_233, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P116_constr_233, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P116_233, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P116_specs_233 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P117_235[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_X2TNLConfigurationInfo_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P117_tags_235[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P117_specs_235 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P117), offsetof(struct S1AP_ProtocolExtensionContainer_6602P117, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P117 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P117_tags_235, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P117_tags_235) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P117_tags_235[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P117_tags_235, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P117_tags_235) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P117_tags_235[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P117_constr_235, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P117_constr_235, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P117_235, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P117_specs_235 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P118_237[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ENBX2ExtTLA_ExtIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P118_tags_237[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P118_specs_237 = { sizeof(struct S1AP_ProtocolExtensionContainer_6602P118), offsetof(struct S1AP_ProtocolExtensionContainer_6602P118, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P118 = { "ProtocolExtensionContainer", "ProtocolExtensionContainer", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolExtensionContainer_6602P118_tags_237, sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P118_tags_237) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P118_tags_237[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionContainer_6602P118_tags_237, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P118_tags_237) /sizeof(asn_DEF_S1AP_ProtocolExtensionContainer_6602P118_tags_237[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionContainer_6602P118_constr_237, &asn_PER_type_S1AP_ProtocolExtensionContainer_6602P118_constr_237, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolExtensionContainer_6602P118_237, 1, /* Single element */ &asn_SPC_S1AP_ProtocolExtensionContainer_6602P118_specs_237 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProtocolExtensionContainer.h000066400000000000000000002236001333553357400241740ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-Containers" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ProtocolExtensionContainer_H_ #define _S1AP_ProtocolExtensionContainer_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_E_RABDataForwardingItem_ExtIEs; struct S1AP_E_RABToBeSetupItemHOReq_ExtIEs; struct S1AP_E_RABAdmittedItem_ExtIEs; struct S1AP_E_RABFailedToSetupItemHOReqAckExtIEs; struct S1AP_E_RABToBeSwitchedDLItem_ExtIEs; struct S1AP_E_RABToBeSwitchedULItem_ExtIEs; struct S1AP_E_RABToBeSetupItemBearerSUReqExtIEs; struct S1AP_E_RABSetupItemBearerSUResExtIEs; struct S1AP_E_RABToBeModifyItemBearerModReqExtIEs; struct S1AP_E_RABModifyItemBearerModResExtIEs; struct S1AP_E_RABReleaseItemBearerRelCompExtIEs; struct S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs; struct S1AP_E_RABSetupItemCtxtSUResExtIEs; struct S1AP_TAIItemExtIEs; struct S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs; struct S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs; struct S1AP_CSGMembershipInfo_ExtIEs; struct S1AP_E_RABModifyItemBearerModConfExtIEs; struct S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs; struct S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs; struct S1AP_Additional_GUTI_ExtIEs; struct S1AP_AllocationAndRetentionPriority_ExtIEs; struct S1AP_InformationForCECapableUEs_ExtIEs; struct S1AP_AssistanceDataForPaging_ExtIEs; struct S1AP_AssistanceDataForRecommendedCells_ExtIEs; struct S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs; struct S1AP_CancelledCellinEAI_Item_ExtIEs; struct S1AP_CancelledCellinTAI_Item_ExtIEs; struct S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs; struct S1AP_CellID_Broadcast_Item_ExtIEs; struct S1AP_CellID_Cancelled_Item_ExtIEs; struct S1AP_CellBasedMDT_ExtIEs; struct S1AP_Cdma2000OneXSRVCCInfo_ExtIEs; struct S1AP_CellType_ExtIEs; struct S1AP_CGI_ExtIEs; struct S1AP_CSG_IdList_Item_ExtIEs; struct S1AP_COUNTvalue_ExtIEs; struct S1AP_COUNTValueExtended_ExtIEs; struct S1AP_COUNTvaluePDCP_SNlength18_ExtIEs; struct S1AP_CriticalityDiagnostics_ExtIEs; struct S1AP_CriticalityDiagnostics_IE_Item_ExtIEs; struct S1AP_ServedDCNsItem_ExtIEs; struct S1AP_DL_CP_SecurityInformation_ExtIEs; struct S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs; struct S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs; struct S1AP_CompletedCellinEAI_Item_ExtIEs; struct S1AP_GERAN_Cell_ID_ExtIEs; struct S1AP_GlobalENB_ID_ExtIEs; struct S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs; struct S1AP_E_RABInformationListItem_ExtIEs; struct S1AP_E_RABItem_ExtIEs; struct S1AP_E_RABQoSParameters_ExtIEs; struct S1AP_EUTRAN_CGI_ExtIEs; struct S1AP_ExpectedUEBehaviour_ExtIEs; struct S1AP_ExpectedUEActivityBehaviour_ExtIEs; struct S1AP_ForbiddenTAs_Item_ExtIEs; struct S1AP_ForbiddenLAs_Item_ExtIEs; struct S1AP_GBR_QosInformation_ExtIEs; struct S1AP_GUMMEI_ExtIEs; struct S1AP_HandoverRestrictionList_ExtIEs; struct S1AP_ImmediateMDT_ExtIEs; struct S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs; struct S1AP_LAI_ExtIEs; struct S1AP_LastVisitedEUTRANCellInformation_ExtIEs; struct S1AP_ListeningSubframePattern_ExtIEs; struct S1AP_LoggedMDT_ExtIEs; struct S1AP_LoggedMBSFNMDT_ExtIEs; struct S1AP_M3Configuration_ExtIEs; struct S1AP_M4Configuration_ExtIEs; struct S1AP_M5Configuration_ExtIEs; struct S1AP_M6Configuration_ExtIEs; struct S1AP_M7Configuration_ExtIEs; struct S1AP_MDT_Configuration_ExtIEs; struct S1AP_MBSFN_ResultToLogInfo_ExtIEs; struct S1AP_MutingPatternInformation_ExtIEs; struct S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs; struct S1AP_PagingAttemptInformation_ExtIEs; struct S1AP_Paging_eDRXInformation_ExtIEs; struct S1AP_M1PeriodicReporting_ExtIEs; struct S1AP_ProSeAuthorized_ExtIEs; struct S1AP_RecommendedCellsForPaging_ExtIEs; struct S1AP_RecommendedCellsForPagingItem_ExtIEs; struct S1AP_RecommendedENBsForPaging_ExtIEs; struct S1AP_RecommendedENBItem_ExtIEs; struct S1AP_RequestType_ExtIEs; struct S1AP_RIMTransfer_ExtIEs; struct S1AP_RLFReportInformation_ExtIEs; struct S1AP_SecurityContext_ExtIEs; struct S1AP_SONInformationReply_ExtIEs; struct S1AP_SONConfigurationTransfer_ExtIEs; struct S1AP_SynchronisationInformation_ExtIEs; struct S1AP_SourceeNB_ID_ExtIEs; struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs; struct S1AP_ServedGUMMEIsItem_ExtIEs; struct S1AP_SupportedTAs_Item_ExtIEs; struct S1AP_TimeSynchronisationInfo_ExtIEs; struct S1AP_S_TMSI_ExtIEs; struct S1AP_TAIBasedMDT_ExtIEs; struct S1AP_TAI_ExtIEs; struct S1AP_TAI_Broadcast_Item_ExtIEs; struct S1AP_TAI_Cancelled_Item_ExtIEs; struct S1AP_TABasedMDT_ExtIEs; struct S1AP_CompletedCellinTAI_Item_ExtIEs; struct S1AP_TargeteNB_ID_ExtIEs; struct S1AP_TargetRNC_ID_ExtIEs; struct S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs; struct S1AP_M1ThresholdEventA2_ExtIEs; struct S1AP_TraceActivation_ExtIEs; struct S1AP_Tunnel_Information_ExtIEs; struct S1AP_UEAggregate_MaximumBitrates_ExtIEs; struct S1AP_UE_S1AP_ID_pair_ExtIEs; struct S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs; struct S1AP_UESecurityCapabilities_ExtIEs; struct S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs; struct S1AP_UL_CP_SecurityInformation_ExtIEs; struct S1AP_UserLocationInformation_ExtIEs; struct S1AP_V2XServicesAuthorized_ExtIEs; struct S1AP_X2TNLConfigurationInfo_ExtIEs; struct S1AP_ENBX2ExtTLA_ExtIEs; /* S1AP_ProtocolExtensionContainer */ typedef struct S1AP_ProtocolExtensionContainer_6602P0 { A_SEQUENCE_OF(struct S1AP_E_RABDataForwardingItem_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P0_t; typedef struct S1AP_ProtocolExtensionContainer_6602P1 { A_SEQUENCE_OF(struct S1AP_E_RABToBeSetupItemHOReq_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P1_t; typedef struct S1AP_ProtocolExtensionContainer_6602P2 { A_SEQUENCE_OF(struct S1AP_E_RABAdmittedItem_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P2_t; typedef struct S1AP_ProtocolExtensionContainer_6602P3 { A_SEQUENCE_OF(struct S1AP_E_RABFailedToSetupItemHOReqAckExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P3_t; typedef struct S1AP_ProtocolExtensionContainer_6602P4 { A_SEQUENCE_OF(struct S1AP_E_RABToBeSwitchedDLItem_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P4_t; typedef struct S1AP_ProtocolExtensionContainer_6602P5 { A_SEQUENCE_OF(struct S1AP_E_RABToBeSwitchedULItem_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P5_t; typedef struct S1AP_ProtocolExtensionContainer_6602P6 { A_SEQUENCE_OF(struct S1AP_E_RABToBeSetupItemBearerSUReqExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P6_t; typedef struct S1AP_ProtocolExtensionContainer_6602P7 { A_SEQUENCE_OF(struct S1AP_E_RABSetupItemBearerSUResExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P7_t; typedef struct S1AP_ProtocolExtensionContainer_6602P8 { A_SEQUENCE_OF(struct S1AP_E_RABToBeModifyItemBearerModReqExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P8_t; typedef struct S1AP_ProtocolExtensionContainer_6602P9 { A_SEQUENCE_OF(struct S1AP_E_RABModifyItemBearerModResExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P9_t; typedef struct S1AP_ProtocolExtensionContainer_6602P10 { A_SEQUENCE_OF(struct S1AP_E_RABReleaseItemBearerRelCompExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P10_t; typedef struct S1AP_ProtocolExtensionContainer_6602P11 { A_SEQUENCE_OF(struct S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P11_t; typedef struct S1AP_ProtocolExtensionContainer_6602P12 { A_SEQUENCE_OF(struct S1AP_E_RABSetupItemCtxtSUResExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P12_t; typedef struct S1AP_ProtocolExtensionContainer_6602P13 { A_SEQUENCE_OF(struct S1AP_TAIItemExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P13_t; typedef struct S1AP_ProtocolExtensionContainer_6602P14 { A_SEQUENCE_OF(struct S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P14_t; typedef struct S1AP_ProtocolExtensionContainer_6602P15 { A_SEQUENCE_OF(struct S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P15_t; typedef struct S1AP_ProtocolExtensionContainer_6602P16 { A_SEQUENCE_OF(struct S1AP_CSGMembershipInfo_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P16_t; typedef struct S1AP_ProtocolExtensionContainer_6602P17 { A_SEQUENCE_OF(struct S1AP_E_RABModifyItemBearerModConfExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P17_t; typedef struct S1AP_ProtocolExtensionContainer_6602P18 { A_SEQUENCE_OF(struct S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P18_t; typedef struct S1AP_ProtocolExtensionContainer_6602P19 { A_SEQUENCE_OF(struct S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P19_t; typedef struct S1AP_ProtocolExtensionContainer_6602P20 { A_SEQUENCE_OF(struct S1AP_Additional_GUTI_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P20_t; typedef struct S1AP_ProtocolExtensionContainer_6602P21 { A_SEQUENCE_OF(struct S1AP_AllocationAndRetentionPriority_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P21_t; typedef struct S1AP_ProtocolExtensionContainer_6602P22 { A_SEQUENCE_OF(struct S1AP_InformationForCECapableUEs_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P22_t; typedef struct S1AP_ProtocolExtensionContainer_6602P23 { A_SEQUENCE_OF(struct S1AP_AssistanceDataForPaging_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P23_t; typedef struct S1AP_ProtocolExtensionContainer_6602P24 { A_SEQUENCE_OF(struct S1AP_AssistanceDataForRecommendedCells_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P24_t; typedef struct S1AP_ProtocolExtensionContainer_6602P25 { A_SEQUENCE_OF(struct S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P25_t; typedef struct S1AP_ProtocolExtensionContainer_6602P26 { A_SEQUENCE_OF(struct S1AP_CancelledCellinEAI_Item_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P26_t; typedef struct S1AP_ProtocolExtensionContainer_6602P27 { A_SEQUENCE_OF(struct S1AP_CancelledCellinTAI_Item_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P27_t; typedef struct S1AP_ProtocolExtensionContainer_6602P28 { A_SEQUENCE_OF(struct S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P28_t; typedef struct S1AP_ProtocolExtensionContainer_6602P29 { A_SEQUENCE_OF(struct S1AP_CellID_Broadcast_Item_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P29_t; typedef struct S1AP_ProtocolExtensionContainer_6602P30 { A_SEQUENCE_OF(struct S1AP_CellID_Cancelled_Item_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P30_t; typedef struct S1AP_ProtocolExtensionContainer_6602P31 { A_SEQUENCE_OF(struct S1AP_CellBasedMDT_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P31_t; typedef struct S1AP_ProtocolExtensionContainer_6602P32 { A_SEQUENCE_OF(struct S1AP_Cdma2000OneXSRVCCInfo_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P32_t; typedef struct S1AP_ProtocolExtensionContainer_6602P33 { A_SEQUENCE_OF(struct S1AP_CellType_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P33_t; typedef struct S1AP_ProtocolExtensionContainer_6602P34 { A_SEQUENCE_OF(struct S1AP_CGI_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P34_t; typedef struct S1AP_ProtocolExtensionContainer_6602P35 { A_SEQUENCE_OF(struct S1AP_CSG_IdList_Item_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P35_t; typedef struct S1AP_ProtocolExtensionContainer_6602P36 { A_SEQUENCE_OF(struct S1AP_COUNTvalue_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P36_t; typedef struct S1AP_ProtocolExtensionContainer_6602P37 { A_SEQUENCE_OF(struct S1AP_COUNTValueExtended_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P37_t; typedef struct S1AP_ProtocolExtensionContainer_6602P38 { A_SEQUENCE_OF(struct S1AP_COUNTvaluePDCP_SNlength18_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P38_t; typedef struct S1AP_ProtocolExtensionContainer_6602P39 { A_SEQUENCE_OF(struct S1AP_CriticalityDiagnostics_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P39_t; typedef struct S1AP_ProtocolExtensionContainer_6602P40 { A_SEQUENCE_OF(struct S1AP_CriticalityDiagnostics_IE_Item_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P40_t; typedef struct S1AP_ProtocolExtensionContainer_6602P41 { A_SEQUENCE_OF(struct S1AP_ServedDCNsItem_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P41_t; typedef struct S1AP_ProtocolExtensionContainer_6602P42 { A_SEQUENCE_OF(struct S1AP_DL_CP_SecurityInformation_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P42_t; typedef struct S1AP_ProtocolExtensionContainer_6602P43 { A_SEQUENCE_OF(struct S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P43_t; typedef struct S1AP_ProtocolExtensionContainer_6602P44 { A_SEQUENCE_OF(struct S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P44_t; typedef struct S1AP_ProtocolExtensionContainer_6602P45 { A_SEQUENCE_OF(struct S1AP_CompletedCellinEAI_Item_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P45_t; typedef struct S1AP_ProtocolExtensionContainer_6602P46 { A_SEQUENCE_OF(struct S1AP_GERAN_Cell_ID_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P46_t; typedef struct S1AP_ProtocolExtensionContainer_6602P47 { A_SEQUENCE_OF(struct S1AP_GlobalENB_ID_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P47_t; typedef struct S1AP_ProtocolExtensionContainer_6602P48 { A_SEQUENCE_OF(struct S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P48_t; typedef struct S1AP_ProtocolExtensionContainer_6602P49 { A_SEQUENCE_OF(struct S1AP_E_RABInformationListItem_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P49_t; typedef struct S1AP_ProtocolExtensionContainer_6602P50 { A_SEQUENCE_OF(struct S1AP_E_RABItem_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P50_t; typedef struct S1AP_ProtocolExtensionContainer_6602P51 { A_SEQUENCE_OF(struct S1AP_E_RABQoSParameters_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P51_t; typedef struct S1AP_ProtocolExtensionContainer_6602P52 { A_SEQUENCE_OF(struct S1AP_EUTRAN_CGI_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P52_t; typedef struct S1AP_ProtocolExtensionContainer_6602P53 { A_SEQUENCE_OF(struct S1AP_ExpectedUEBehaviour_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P53_t; typedef struct S1AP_ProtocolExtensionContainer_6602P54 { A_SEQUENCE_OF(struct S1AP_ExpectedUEActivityBehaviour_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P54_t; typedef struct S1AP_ProtocolExtensionContainer_6602P55 { A_SEQUENCE_OF(struct S1AP_ForbiddenTAs_Item_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P55_t; typedef struct S1AP_ProtocolExtensionContainer_6602P56 { A_SEQUENCE_OF(struct S1AP_ForbiddenLAs_Item_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P56_t; typedef struct S1AP_ProtocolExtensionContainer_6602P57 { A_SEQUENCE_OF(struct S1AP_GBR_QosInformation_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P57_t; typedef struct S1AP_ProtocolExtensionContainer_6602P58 { A_SEQUENCE_OF(struct S1AP_GUMMEI_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P58_t; typedef struct S1AP_ProtocolExtensionContainer_6602P59 { A_SEQUENCE_OF(struct S1AP_HandoverRestrictionList_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P59_t; typedef struct S1AP_ProtocolExtensionContainer_6602P60 { A_SEQUENCE_OF(struct S1AP_ImmediateMDT_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P60_t; typedef struct S1AP_ProtocolExtensionContainer_6602P61 { A_SEQUENCE_OF(struct S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P61_t; typedef struct S1AP_ProtocolExtensionContainer_6602P62 { A_SEQUENCE_OF(struct S1AP_LAI_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P62_t; typedef struct S1AP_ProtocolExtensionContainer_6602P63 { A_SEQUENCE_OF(struct S1AP_LastVisitedEUTRANCellInformation_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P63_t; typedef struct S1AP_ProtocolExtensionContainer_6602P64 { A_SEQUENCE_OF(struct S1AP_ListeningSubframePattern_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P64_t; typedef struct S1AP_ProtocolExtensionContainer_6602P65 { A_SEQUENCE_OF(struct S1AP_LoggedMDT_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P65_t; typedef struct S1AP_ProtocolExtensionContainer_6602P66 { A_SEQUENCE_OF(struct S1AP_LoggedMBSFNMDT_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P66_t; typedef struct S1AP_ProtocolExtensionContainer_6602P67 { A_SEQUENCE_OF(struct S1AP_M3Configuration_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P67_t; typedef struct S1AP_ProtocolExtensionContainer_6602P68 { A_SEQUENCE_OF(struct S1AP_M4Configuration_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P68_t; typedef struct S1AP_ProtocolExtensionContainer_6602P69 { A_SEQUENCE_OF(struct S1AP_M5Configuration_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P69_t; typedef struct S1AP_ProtocolExtensionContainer_6602P70 { A_SEQUENCE_OF(struct S1AP_M6Configuration_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P70_t; typedef struct S1AP_ProtocolExtensionContainer_6602P71 { A_SEQUENCE_OF(struct S1AP_M7Configuration_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P71_t; typedef struct S1AP_ProtocolExtensionContainer_6602P72 { A_SEQUENCE_OF(struct S1AP_MDT_Configuration_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P72_t; typedef struct S1AP_ProtocolExtensionContainer_6602P73 { A_SEQUENCE_OF(struct S1AP_MBSFN_ResultToLogInfo_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P73_t; typedef struct S1AP_ProtocolExtensionContainer_6602P74 { A_SEQUENCE_OF(struct S1AP_MutingPatternInformation_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P74_t; typedef struct S1AP_ProtocolExtensionContainer_6602P75 { A_SEQUENCE_OF(struct S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P75_t; typedef struct S1AP_ProtocolExtensionContainer_6602P76 { A_SEQUENCE_OF(struct S1AP_PagingAttemptInformation_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P76_t; typedef struct S1AP_ProtocolExtensionContainer_6602P77 { A_SEQUENCE_OF(struct S1AP_Paging_eDRXInformation_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P77_t; typedef struct S1AP_ProtocolExtensionContainer_6602P78 { A_SEQUENCE_OF(struct S1AP_M1PeriodicReporting_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P78_t; typedef struct S1AP_ProtocolExtensionContainer_6602P79 { A_SEQUENCE_OF(struct S1AP_ProSeAuthorized_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P79_t; typedef struct S1AP_ProtocolExtensionContainer_6602P80 { A_SEQUENCE_OF(struct S1AP_RecommendedCellsForPaging_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P80_t; typedef struct S1AP_ProtocolExtensionContainer_6602P81 { A_SEQUENCE_OF(struct S1AP_RecommendedCellsForPagingItem_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P81_t; typedef struct S1AP_ProtocolExtensionContainer_6602P82 { A_SEQUENCE_OF(struct S1AP_RecommendedENBsForPaging_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P82_t; typedef struct S1AP_ProtocolExtensionContainer_6602P83 { A_SEQUENCE_OF(struct S1AP_RecommendedENBItem_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P83_t; typedef struct S1AP_ProtocolExtensionContainer_6602P84 { A_SEQUENCE_OF(struct S1AP_RequestType_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P84_t; typedef struct S1AP_ProtocolExtensionContainer_6602P85 { A_SEQUENCE_OF(struct S1AP_RIMTransfer_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P85_t; typedef struct S1AP_ProtocolExtensionContainer_6602P86 { A_SEQUENCE_OF(struct S1AP_RLFReportInformation_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P86_t; typedef struct S1AP_ProtocolExtensionContainer_6602P87 { A_SEQUENCE_OF(struct S1AP_SecurityContext_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P87_t; typedef struct S1AP_ProtocolExtensionContainer_6602P88 { A_SEQUENCE_OF(struct S1AP_SONInformationReply_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P88_t; typedef struct S1AP_ProtocolExtensionContainer_6602P89 { A_SEQUENCE_OF(struct S1AP_SONConfigurationTransfer_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P89_t; typedef struct S1AP_ProtocolExtensionContainer_6602P90 { A_SEQUENCE_OF(struct S1AP_SynchronisationInformation_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P90_t; typedef struct S1AP_ProtocolExtensionContainer_6602P91 { A_SEQUENCE_OF(struct S1AP_SourceeNB_ID_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P91_t; typedef struct S1AP_ProtocolExtensionContainer_6602P92 { A_SEQUENCE_OF(struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P92_t; typedef struct S1AP_ProtocolExtensionContainer_6602P93 { A_SEQUENCE_OF(struct S1AP_ServedGUMMEIsItem_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P93_t; typedef struct S1AP_ProtocolExtensionContainer_6602P94 { A_SEQUENCE_OF(struct S1AP_SupportedTAs_Item_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P94_t; typedef struct S1AP_ProtocolExtensionContainer_6602P95 { A_SEQUENCE_OF(struct S1AP_TimeSynchronisationInfo_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P95_t; typedef struct S1AP_ProtocolExtensionContainer_6602P96 { A_SEQUENCE_OF(struct S1AP_S_TMSI_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P96_t; typedef struct S1AP_ProtocolExtensionContainer_6602P97 { A_SEQUENCE_OF(struct S1AP_TAIBasedMDT_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P97_t; typedef struct S1AP_ProtocolExtensionContainer_6602P98 { A_SEQUENCE_OF(struct S1AP_TAI_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P98_t; typedef struct S1AP_ProtocolExtensionContainer_6602P99 { A_SEQUENCE_OF(struct S1AP_TAI_Broadcast_Item_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P99_t; typedef struct S1AP_ProtocolExtensionContainer_6602P100 { A_SEQUENCE_OF(struct S1AP_TAI_Cancelled_Item_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P100_t; typedef struct S1AP_ProtocolExtensionContainer_6602P101 { A_SEQUENCE_OF(struct S1AP_TABasedMDT_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P101_t; typedef struct S1AP_ProtocolExtensionContainer_6602P102 { A_SEQUENCE_OF(struct S1AP_CompletedCellinTAI_Item_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P102_t; typedef struct S1AP_ProtocolExtensionContainer_6602P103 { A_SEQUENCE_OF(struct S1AP_TargeteNB_ID_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P103_t; typedef struct S1AP_ProtocolExtensionContainer_6602P104 { A_SEQUENCE_OF(struct S1AP_TargetRNC_ID_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P104_t; typedef struct S1AP_ProtocolExtensionContainer_6602P105 { A_SEQUENCE_OF(struct S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P105_t; typedef struct S1AP_ProtocolExtensionContainer_6602P106 { A_SEQUENCE_OF(struct S1AP_M1ThresholdEventA2_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P106_t; typedef struct S1AP_ProtocolExtensionContainer_6602P107 { A_SEQUENCE_OF(struct S1AP_TraceActivation_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P107_t; typedef struct S1AP_ProtocolExtensionContainer_6602P108 { A_SEQUENCE_OF(struct S1AP_Tunnel_Information_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P108_t; typedef struct S1AP_ProtocolExtensionContainer_6602P109 { A_SEQUENCE_OF(struct S1AP_UEAggregate_MaximumBitrates_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P109_t; typedef struct S1AP_ProtocolExtensionContainer_6602P110 { A_SEQUENCE_OF(struct S1AP_UE_S1AP_ID_pair_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P110_t; typedef struct S1AP_ProtocolExtensionContainer_6602P111 { A_SEQUENCE_OF(struct S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P111_t; typedef struct S1AP_ProtocolExtensionContainer_6602P112 { A_SEQUENCE_OF(struct S1AP_UESecurityCapabilities_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P112_t; typedef struct S1AP_ProtocolExtensionContainer_6602P113 { A_SEQUENCE_OF(struct S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P113_t; typedef struct S1AP_ProtocolExtensionContainer_6602P114 { A_SEQUENCE_OF(struct S1AP_UL_CP_SecurityInformation_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P114_t; typedef struct S1AP_ProtocolExtensionContainer_6602P115 { A_SEQUENCE_OF(struct S1AP_UserLocationInformation_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P115_t; typedef struct S1AP_ProtocolExtensionContainer_6602P116 { A_SEQUENCE_OF(struct S1AP_V2XServicesAuthorized_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P116_t; typedef struct S1AP_ProtocolExtensionContainer_6602P117 { A_SEQUENCE_OF(struct S1AP_X2TNLConfigurationInfo_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P117_t; typedef struct S1AP_ProtocolExtensionContainer_6602P118 { A_SEQUENCE_OF(struct S1AP_ENBX2ExtTLA_ExtIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolExtensionContainer_6602P118_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P0; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P0_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P0_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P0_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P1; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P1_specs_3; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P1_3[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P1_constr_3; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P2; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P2_specs_5; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P2_5[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P2_constr_5; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P3; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P3_specs_7; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P3_7[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P3_constr_7; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P4; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P4_specs_9; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P4_9[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P4_constr_9; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P5; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P5_specs_11; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P5_11[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P5_constr_11; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P6; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P6_specs_13; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P6_13[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P6_constr_13; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P7; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P7_specs_15; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P7_15[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P7_constr_15; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P8; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P8_specs_17; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P8_17[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P8_constr_17; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P9; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P9_specs_19; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P9_19[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P9_constr_19; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P10; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P10_specs_21; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P10_21[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P10_constr_21; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P11; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P11_specs_23; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P11_23[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P11_constr_23; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P12; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P12_specs_25; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P12_25[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P12_constr_25; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P13; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P13_specs_27; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P13_27[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P13_constr_27; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P14; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P14_specs_29; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P14_29[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P14_constr_29; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P15; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P15_specs_31; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P15_31[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P15_constr_31; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P16; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P16_specs_33; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P16_33[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P16_constr_33; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P17; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P17_specs_35; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P17_35[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P17_constr_35; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P18; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P18_specs_37; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P18_37[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P18_constr_37; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P19; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P19_specs_39; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P19_39[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P19_constr_39; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P20; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P20_specs_41; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P20_41[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P20_constr_41; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P21; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P21_specs_43; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P21_43[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P21_constr_43; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P22; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P22_specs_45; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P22_45[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P22_constr_45; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P23; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P23_specs_47; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P23_47[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P23_constr_47; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P24; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P24_specs_49; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P24_49[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P24_constr_49; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P25; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P25_specs_51; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P25_51[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P25_constr_51; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P26; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P26_specs_53; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P26_53[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P26_constr_53; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P27; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P27_specs_55; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P27_55[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P27_constr_55; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P28; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P28_specs_57; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P28_57[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P28_constr_57; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P29; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P29_specs_59; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P29_59[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P29_constr_59; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P30; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P30_specs_61; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P30_61[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P30_constr_61; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P31; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P31_specs_63; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P31_63[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P31_constr_63; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P32; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P32_specs_65; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P32_65[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P32_constr_65; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P33; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P33_specs_67; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P33_67[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P33_constr_67; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P34; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P34_specs_69; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P34_69[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P34_constr_69; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P35; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P35_specs_71; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P35_71[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P35_constr_71; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P36; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P36_specs_73; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P36_73[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P36_constr_73; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P37; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P37_specs_75; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P37_75[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P37_constr_75; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P38; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P38_specs_77; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P38_77[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P38_constr_77; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P39; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P39_specs_79; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P39_79[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P39_constr_79; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P40; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P40_specs_81; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P40_81[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P40_constr_81; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P41; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P41_specs_83; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P41_83[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P41_constr_83; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P42; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P42_specs_85; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P42_85[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P42_constr_85; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P43; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P43_specs_87; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P43_87[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P43_constr_87; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P44; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P44_specs_89; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P44_89[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P44_constr_89; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P45; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P45_specs_91; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P45_91[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P45_constr_91; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P46; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P46_specs_93; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P46_93[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P46_constr_93; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P47; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P47_specs_95; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P47_95[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P47_constr_95; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P48; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P48_specs_97; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P48_97[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P48_constr_97; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P49; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P49_specs_99; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P49_99[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P49_constr_99; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P50; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P50_specs_101; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P50_101[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P50_constr_101; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P51; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P51_specs_103; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P51_103[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P51_constr_103; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P52; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P52_specs_105; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P52_105[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P52_constr_105; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P53; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P53_specs_107; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P53_107[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P53_constr_107; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P54; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P54_specs_109; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P54_109[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P54_constr_109; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P55; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P55_specs_111; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P55_111[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P55_constr_111; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P56; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P56_specs_113; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P56_113[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P56_constr_113; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P57; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P57_specs_115; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P57_115[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P57_constr_115; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P58; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P58_specs_117; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P58_117[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P58_constr_117; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P59; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P59_specs_119; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P59_119[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P59_constr_119; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P60; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P60_specs_121; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P60_121[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P60_constr_121; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P61; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P61_specs_123; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P61_123[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P61_constr_123; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P62; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P62_specs_125; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P62_125[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P62_constr_125; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P63; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P63_specs_127; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P63_127[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P63_constr_127; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P64; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P64_specs_129; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P64_129[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P64_constr_129; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P65; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P65_specs_131; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P65_131[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P65_constr_131; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P66; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P66_specs_133; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P66_133[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P66_constr_133; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P67; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P67_specs_135; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P67_135[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P67_constr_135; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P68; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P68_specs_137; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P68_137[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P68_constr_137; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P69; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P69_specs_139; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P69_139[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P69_constr_139; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P70; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P70_specs_141; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P70_141[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P70_constr_141; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P71; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P71_specs_143; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P71_143[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P71_constr_143; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P72; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P72_specs_145; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P72_145[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P72_constr_145; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P73; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P73_specs_147; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P73_147[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P73_constr_147; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P74; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P74_specs_149; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P74_149[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P74_constr_149; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P75; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P75_specs_151; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P75_151[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P75_constr_151; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P76; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P76_specs_153; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P76_153[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P76_constr_153; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P77; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P77_specs_155; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P77_155[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P77_constr_155; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P78; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P78_specs_157; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P78_157[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P78_constr_157; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P79; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P79_specs_159; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P79_159[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P79_constr_159; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P80; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P80_specs_161; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P80_161[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P80_constr_161; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P81; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P81_specs_163; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P81_163[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P81_constr_163; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P82; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P82_specs_165; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P82_165[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P82_constr_165; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P83; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P83_specs_167; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P83_167[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P83_constr_167; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P84; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P84_specs_169; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P84_169[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P84_constr_169; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P85; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P85_specs_171; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P85_171[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P85_constr_171; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P86; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P86_specs_173; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P86_173[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P86_constr_173; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P87; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P87_specs_175; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P87_175[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P87_constr_175; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P88; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P88_specs_177; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P88_177[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P88_constr_177; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P89; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P89_specs_179; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P89_179[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P89_constr_179; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P90; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P90_specs_181; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P90_181[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P90_constr_181; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P91; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P91_specs_183; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P91_183[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P91_constr_183; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P92; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P92_specs_185; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P92_185[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P92_constr_185; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P93; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P93_specs_187; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P93_187[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P93_constr_187; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P94; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P94_specs_189; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P94_189[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P94_constr_189; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P95; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P95_specs_191; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P95_191[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P95_constr_191; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P96; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P96_specs_193; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P96_193[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P96_constr_193; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P97; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P97_specs_195; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P97_195[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P97_constr_195; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P98; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P98_specs_197; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P98_197[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P98_constr_197; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P99; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P99_specs_199; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P99_199[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P99_constr_199; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P100; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P100_specs_201; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P100_201[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P100_constr_201; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P101; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P101_specs_203; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P101_203[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P101_constr_203; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P102; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P102_specs_205; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P102_205[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P102_constr_205; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P103; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P103_specs_207; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P103_207[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P103_constr_207; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P104; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P104_specs_209; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P104_209[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P104_constr_209; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P105; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P105_specs_211; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P105_211[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P105_constr_211; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P106; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P106_specs_213; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P106_213[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P106_constr_213; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P107; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P107_specs_215; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P107_215[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P107_constr_215; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P108; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P108_specs_217; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P108_217[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P108_constr_217; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P109; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P109_specs_219; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P109_219[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P109_constr_219; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P110; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P110_specs_221; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P110_221[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P110_constr_221; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P111; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P111_specs_223; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P111_223[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P111_constr_223; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P112; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P112_specs_225; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P112_225[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P112_constr_225; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P113; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P113_specs_227; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P113_227[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P113_constr_227; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P114; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P114_specs_229; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P114_229[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P114_constr_229; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P115; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P115_specs_231; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P115_231[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P115_constr_231; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P116; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P116_specs_233; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P116_233[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P116_constr_233; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P117; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P117_specs_235; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P117_235[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P117_constr_235; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionContainer_6602P118; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolExtensionContainer_6602P118_specs_237; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolExtensionContainer_6602P118_237[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionContainer_6602P118_constr_237; #ifdef __cplusplus } #endif #endif /* _S1AP_ProtocolExtensionContainer_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProtocolExtensionField.c000066400000000000000000030300371333553357400232730ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-Containers" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ProtocolExtensionField.h" static const long asn_VAL_1_S1AP_id_Data_Forwarding_Not_Possible = 143; static const long asn_VAL_1_S1AP_ignore = 1; static const long asn_VAL_1_S1AP_optional = 0; static const long asn_VAL_2_S1AP_id_BearerType = 233; static const long asn_VAL_2_S1AP_reject = 0; static const long asn_VAL_2_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABToBeSetupItemHOReq_ExtIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_1_S1AP_id_Data_Forwarding_Not_Possible }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_1_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_Data_Forwarding_Not_Possible }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_1_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_2_S1AP_id_BearerType }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_2_S1AP_reject }, { "&Extension", aioc__type, &asn_DEF_S1AP_BearerType }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_2_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABToBeSetupItemHOReq_ExtIEs_1[] = { { 2, 4, asn_IOS_S1AP_E_RABToBeSetupItemHOReq_ExtIEs_1_rows } }; static const long asn_VAL_3_S1AP_id_Correlation_ID = 156; static const long asn_VAL_3_S1AP_ignore = 1; static const long asn_VAL_3_S1AP_optional = 0; static const long asn_VAL_4_S1AP_id_SIPTO_Correlation_ID = 183; static const long asn_VAL_4_S1AP_ignore = 1; static const long asn_VAL_4_S1AP_optional = 0; static const long asn_VAL_5_S1AP_id_BearerType = 233; static const long asn_VAL_5_S1AP_reject = 0; static const long asn_VAL_5_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABToBeSetupItemBearerSUReqExtIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_3_S1AP_id_Correlation_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_3_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_Correlation_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_3_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_4_S1AP_id_SIPTO_Correlation_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_4_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_Correlation_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_4_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_5_S1AP_id_BearerType }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_5_S1AP_reject }, { "&Extension", aioc__type, &asn_DEF_S1AP_BearerType }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_5_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABToBeSetupItemBearerSUReqExtIEs_1[] = { { 3, 4, asn_IOS_S1AP_E_RABToBeSetupItemBearerSUReqExtIEs_1_rows } }; static const long asn_VAL_6_S1AP_id_TransportInformation = 185; static const long asn_VAL_6_S1AP_reject = 0; static const long asn_VAL_6_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABToBeModifyItemBearerModReqExtIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_6_S1AP_id_TransportInformation }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_6_S1AP_reject }, { "&Extension", aioc__type, &asn_DEF_S1AP_TransportInformation }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_6_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABToBeModifyItemBearerModReqExtIEs_1[] = { { 1, 4, asn_IOS_S1AP_E_RABToBeModifyItemBearerModReqExtIEs_1_rows } }; static const long asn_VAL_7_S1AP_id_Correlation_ID = 156; static const long asn_VAL_7_S1AP_ignore = 1; static const long asn_VAL_7_S1AP_optional = 0; static const long asn_VAL_8_S1AP_id_SIPTO_Correlation_ID = 183; static const long asn_VAL_8_S1AP_ignore = 1; static const long asn_VAL_8_S1AP_optional = 0; static const long asn_VAL_9_S1AP_id_BearerType = 233; static const long asn_VAL_9_S1AP_reject = 0; static const long asn_VAL_9_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_7_S1AP_id_Correlation_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_7_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_Correlation_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_7_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_8_S1AP_id_SIPTO_Correlation_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_8_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_Correlation_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_8_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_9_S1AP_id_BearerType }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_9_S1AP_reject }, { "&Extension", aioc__type, &asn_DEF_S1AP_BearerType }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_9_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs_1[] = { { 3, 4, asn_IOS_S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs_1_rows } }; static const long asn_VAL_10_S1AP_id_ULCOUNTValueExtended = 179; static const long asn_VAL_10_S1AP_ignore = 1; static const long asn_VAL_10_S1AP_optional = 0; static const long asn_VAL_11_S1AP_id_DLCOUNTValueExtended = 180; static const long asn_VAL_11_S1AP_ignore = 1; static const long asn_VAL_11_S1AP_optional = 0; static const long asn_VAL_12_S1AP_id_ReceiveStatusOfULPDCPSDUsExtended = 181; static const long asn_VAL_12_S1AP_ignore = 1; static const long asn_VAL_12_S1AP_optional = 0; static const long asn_VAL_13_S1AP_id_ULCOUNTValuePDCP_SNlength18 = 217; static const long asn_VAL_13_S1AP_ignore = 1; static const long asn_VAL_13_S1AP_optional = 0; static const long asn_VAL_14_S1AP_id_DLCOUNTValuePDCP_SNlength18 = 218; static const long asn_VAL_14_S1AP_ignore = 1; static const long asn_VAL_14_S1AP_optional = 0; static const long asn_VAL_15_S1AP_id_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18 = 219; static const long asn_VAL_15_S1AP_ignore = 1; static const long asn_VAL_15_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_10_S1AP_id_ULCOUNTValueExtended }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_10_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_COUNTValueExtended }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_10_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_11_S1AP_id_DLCOUNTValueExtended }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_11_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_COUNTValueExtended }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_11_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_12_S1AP_id_ReceiveStatusOfULPDCPSDUsExtended }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_12_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_ReceiveStatusOfULPDCPSDUsExtended }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_12_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_13_S1AP_id_ULCOUNTValuePDCP_SNlength18 }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_13_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_COUNTvaluePDCP_SNlength18 }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_13_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_14_S1AP_id_DLCOUNTValuePDCP_SNlength18 }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_14_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_COUNTvaluePDCP_SNlength18 }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_14_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_15_S1AP_id_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18 }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_15_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18 }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_15_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs_1[] = { { 6, 4, asn_IOS_S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs_1_rows } }; static const long asn_VAL_16_S1AP_id_M3Configuration = 171; static const long asn_VAL_16_S1AP_ignore = 1; static const long asn_VAL_16_S1AP_conditional = 1; static const long asn_VAL_17_S1AP_id_M4Configuration = 172; static const long asn_VAL_17_S1AP_ignore = 1; static const long asn_VAL_17_S1AP_conditional = 1; static const long asn_VAL_18_S1AP_id_M5Configuration = 173; static const long asn_VAL_18_S1AP_ignore = 1; static const long asn_VAL_18_S1AP_conditional = 1; static const long asn_VAL_19_S1AP_id_MDT_Location_Info = 174; static const long asn_VAL_19_S1AP_ignore = 1; static const long asn_VAL_19_S1AP_optional = 0; static const long asn_VAL_20_S1AP_id_M6Configuration = 220; static const long asn_VAL_20_S1AP_ignore = 1; static const long asn_VAL_20_S1AP_conditional = 1; static const long asn_VAL_21_S1AP_id_M7Configuration = 221; static const long asn_VAL_21_S1AP_ignore = 1; static const long asn_VAL_21_S1AP_conditional = 1; static const asn_ioc_cell_t asn_IOS_S1AP_ImmediateMDT_ExtIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_16_S1AP_id_M3Configuration }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_16_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_M3Configuration }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_16_S1AP_conditional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_17_S1AP_id_M4Configuration }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_17_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_M4Configuration }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_17_S1AP_conditional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_18_S1AP_id_M5Configuration }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_18_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_M5Configuration }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_18_S1AP_conditional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_19_S1AP_id_MDT_Location_Info }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_19_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_MDT_Location_Info }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_19_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_20_S1AP_id_M6Configuration }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_20_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_M6Configuration }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_20_S1AP_conditional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_21_S1AP_id_M7Configuration }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_21_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_M7Configuration }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_21_S1AP_conditional } }; static const asn_ioc_set_t asn_IOS_S1AP_ImmediateMDT_ExtIEs_1[] = { { 6, 4, asn_IOS_S1AP_ImmediateMDT_ExtIEs_1_rows } }; static const long asn_VAL_22_S1AP_id_Time_UE_StayedInCell_EnhancedGranularity = 167; static const long asn_VAL_22_S1AP_ignore = 1; static const long asn_VAL_22_S1AP_optional = 0; static const long asn_VAL_23_S1AP_id_HO_Cause = 168; static const long asn_VAL_23_S1AP_ignore = 1; static const long asn_VAL_23_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_LastVisitedEUTRANCellInformation_ExtIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_22_S1AP_id_Time_UE_StayedInCell_EnhancedGranularity }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_22_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_Time_UE_StayedInCell_EnhancedGranularity }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_22_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_23_S1AP_id_HO_Cause }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_23_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_Cause }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_23_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_LastVisitedEUTRANCellInformation_ExtIEs_1[] = { { 2, 4, asn_IOS_S1AP_LastVisitedEUTRANCellInformation_ExtIEs_1_rows } }; static const long asn_VAL_24_S1AP_id_SignallingBasedMDTPLMNList = 178; static const long asn_VAL_24_S1AP_ignore = 1; static const long asn_VAL_24_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_MDT_Configuration_ExtIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_24_S1AP_id_SignallingBasedMDTPLMNList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_24_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_MDTPLMNList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_24_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_MDT_Configuration_ExtIEs_1[] = { { 1, 4, asn_IOS_S1AP_MDT_Configuration_ExtIEs_1_rows } }; static const long asn_VAL_25_S1AP_id_ProSeUEtoNetworkRelaying = 216; static const long asn_VAL_25_S1AP_ignore = 1; static const long asn_VAL_25_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_ProSeAuthorized_ExtIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_25_S1AP_id_ProSeUEtoNetworkRelaying }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_25_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_ProSeUEtoNetworkRelaying }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_25_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_ProSeAuthorized_ExtIEs_1[] = { { 1, 4, asn_IOS_S1AP_ProSeAuthorized_ExtIEs_1_rows } }; static const long asn_VAL_26_S1AP_id_Time_Synchronisation_Info = 149; static const long asn_VAL_26_S1AP_ignore = 1; static const long asn_VAL_26_S1AP_optional = 0; static const long asn_VAL_27_S1AP_id_Muting_Pattern_Information = 208; static const long asn_VAL_27_S1AP_ignore = 1; static const long asn_VAL_27_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_SONInformationReply_ExtIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_26_S1AP_id_Time_Synchronisation_Info }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_26_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_TimeSynchronisationInfo }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_26_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_27_S1AP_id_Muting_Pattern_Information }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_27_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_MutingPatternInformation }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_27_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_SONInformationReply_ExtIEs_1[] = { { 2, 4, asn_IOS_S1AP_SONInformationReply_ExtIEs_1_rows } }; static const long asn_VAL_28_S1AP_id_x2TNLConfigurationInfo = 152; static const long asn_VAL_28_S1AP_ignore = 1; static const long asn_VAL_28_S1AP_conditional = 1; static const long asn_VAL_29_S1AP_id_Synchronisation_Information = 209; static const long asn_VAL_29_S1AP_ignore = 1; static const long asn_VAL_29_S1AP_conditional = 1; static const asn_ioc_cell_t asn_IOS_S1AP_SONConfigurationTransfer_ExtIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_28_S1AP_id_x2TNLConfigurationInfo }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_28_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_X2TNLConfigurationInfo }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_28_S1AP_conditional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_29_S1AP_id_Synchronisation_Information }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_29_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_SynchronisationInformation }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_29_S1AP_conditional } }; static const asn_ioc_set_t asn_IOS_S1AP_SONConfigurationTransfer_ExtIEs_1[] = { { 2, 4, asn_IOS_S1AP_SONConfigurationTransfer_ExtIEs_1_rows } }; static const long asn_VAL_30_S1AP_id_MobilityInformation = 175; static const long asn_VAL_30_S1AP_ignore = 1; static const long asn_VAL_30_S1AP_optional = 0; static const long asn_VAL_31_S1AP_id_uE_HistoryInformationFromTheUE = 194; static const long asn_VAL_31_S1AP_ignore = 1; static const long asn_VAL_31_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_30_S1AP_id_MobilityInformation }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_30_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_MobilityInformation }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_30_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_31_S1AP_id_uE_HistoryInformationFromTheUE }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_31_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_UE_HistoryInformationFromTheUE }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_31_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_1[] = { { 2, 4, asn_IOS_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_1_rows } }; static const long asn_VAL_32_S1AP_id_RAT_Type = 232; static const long asn_VAL_32_S1AP_reject = 0; static const long asn_VAL_32_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_SupportedTAs_Item_ExtIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_32_S1AP_id_RAT_Type }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_32_S1AP_reject }, { "&Extension", aioc__type, &asn_DEF_S1AP_RAT_Type }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_32_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_SupportedTAs_Item_ExtIEs_1[] = { { 1, 4, asn_IOS_S1AP_SupportedTAs_Item_ExtIEs_1_rows } }; static const long asn_VAL_33_S1AP_id_Muting_Availability_Indication = 207; static const long asn_VAL_33_S1AP_ignore = 1; static const long asn_VAL_33_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_TimeSynchronisationInfo_ExtIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_33_S1AP_id_Muting_Availability_Indication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_33_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_MutingAvailabilityIndication }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_33_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_TimeSynchronisationInfo_ExtIEs_1[] = { { 1, 4, asn_IOS_S1AP_TimeSynchronisationInfo_ExtIEs_1_rows } }; static const long asn_VAL_34_S1AP_id_MDTConfiguration = 162; static const long asn_VAL_34_S1AP_ignore = 1; static const long asn_VAL_34_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_TraceActivation_ExtIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_34_S1AP_id_MDTConfiguration }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_34_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_MDT_Configuration }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_34_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_TraceActivation_ExtIEs_1[] = { { 1, 4, asn_IOS_S1AP_TraceActivation_ExtIEs_1_rows } }; static const long asn_VAL_35_S1AP_id_eNBX2ExtendedTransportLayerAddresses = 153; static const long asn_VAL_35_S1AP_ignore = 1; static const long asn_VAL_35_S1AP_optional = 0; static const long asn_VAL_36_S1AP_id_eNBIndirectX2TransportLayerAddresses = 193; static const long asn_VAL_36_S1AP_ignore = 1; static const long asn_VAL_36_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_X2TNLConfigurationInfo_ExtIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_35_S1AP_id_eNBX2ExtendedTransportLayerAddresses }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_35_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_ENBX2ExtTLAs }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_35_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolExtensionID, &asn_VAL_36_S1AP_id_eNBIndirectX2TransportLayerAddresses }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_36_S1AP_ignore }, { "&Extension", aioc__type, &asn_DEF_S1AP_ENBIndirectX2TransportLayerAddresses }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_36_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_X2TNLConfigurationInfo_ExtIEs_1[] = { { 2, 4, asn_IOS_S1AP_X2TNLConfigurationInfo_ExtIEs_1_rows } }; static int memb_S1AP_id_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_5(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABToBeSetupItemHOReq_ExtIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABToBeSetupItemHOReq_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABToBeSetupItemHOReq_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_5(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABToBeSetupItemHOReq_ExtIEs_S1AP_extensionValue_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABToBeSetupItemHOReq_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Extension */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABToBeSetupItemHOReq_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_extensionValue_constraint_5(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_9(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_9(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_9(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_13(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_13(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_13(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_17(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_17(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_17(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_21(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_21(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_21(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_25(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABToBeSetupItemBearerSUReqExtIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABToBeSetupItemBearerSUReqExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReqExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_25(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABToBeSetupItemBearerSUReqExtIEs_S1AP_extensionValue_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABToBeSetupItemBearerSUReqExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Extension */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReqExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_extensionValue_constraint_25(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_29(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_29(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_29(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_33(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABToBeModifyItemBearerModReqExtIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABToBeModifyItemBearerModReqExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABToBeModifyItemBearerModReqExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_33(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABToBeModifyItemBearerModReqExtIEs_S1AP_extensionValue_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABToBeModifyItemBearerModReqExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Extension */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABToBeModifyItemBearerModReqExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_extensionValue_constraint_33(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_37(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_37(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_37(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_41(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_41(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_41(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_45(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABToBeSetupItemCtxtSUReqExtIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_45(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABToBeSetupItemCtxtSUReqExtIEs_S1AP_extensionValue_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Extension */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_extensionValue_constraint_45(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_49(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_49(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_49(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_53(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_53(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_53(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_57(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_57(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_57(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_61(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_61(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_61(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_65(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_65(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_65(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_69(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_69(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_69(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_73(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_73(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_73(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_77(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_77(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_77(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_81(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_81(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_81(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_85(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_85(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_85(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_89(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_89(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_89(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_93(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_93(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_93(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_97(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_97(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_97(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_101(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_Bearers_SubjectToStatusTransfer_ItemExtIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_101(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_Bearers_SubjectToStatusTransfer_ItemExtIEs_S1AP_extensionValue_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Extension */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_extensionValue_constraint_101(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_105(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_105(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_105(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_109(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_109(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_109(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_113(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_113(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_113(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_117(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_117(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_117(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_121(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_121(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_121(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_125(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_125(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_125(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_129(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_129(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_129(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_133(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_133(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_133(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_137(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_137(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_137(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_141(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_141(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_141(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_145(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_145(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_145(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_149(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_149(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_149(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_153(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_153(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_153(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_157(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_157(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_157(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_161(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_161(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_161(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_165(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_165(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_165(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_169(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_169(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_169(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_173(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_173(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_173(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_177(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_177(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_177(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_181(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_181(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_181(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_185(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_185(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_185(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_189(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_189(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_189(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_193(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_193(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_193(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_197(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_197(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_197(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_201(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_201(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_201(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_205(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_205(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_205(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_209(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_209(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_209(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_213(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_213(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_213(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_217(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_217(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_217(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_221(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_221(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_221(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_225(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_225(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_225(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_229(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_229(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_229(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_233(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_233(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_233(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_237(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_237(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_237(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_241(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_ImmediateMDT_ExtIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ImmediateMDT_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ImmediateMDT_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_241(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_ImmediateMDT_ExtIEs_S1AP_extensionValue_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ImmediateMDT_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Extension */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ImmediateMDT_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_extensionValue_constraint_241(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_245(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_245(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_245(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_249(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_249(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_249(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_253(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_LastVisitedEUTRANCellInformation_ExtIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_LastVisitedEUTRANCellInformation_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_LastVisitedEUTRANCellInformation_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_253(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_LastVisitedEUTRANCellInformation_ExtIEs_S1AP_extensionValue_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_LastVisitedEUTRANCellInformation_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Extension */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_LastVisitedEUTRANCellInformation_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_extensionValue_constraint_253(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_257(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_257(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_257(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_261(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_261(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_261(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_265(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_265(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_265(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_269(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_269(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_269(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_273(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_273(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_273(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_277(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_277(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_277(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_281(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_281(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_281(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_285(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_285(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_285(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_289(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_MDT_Configuration_ExtIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_MDT_Configuration_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_MDT_Configuration_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_289(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_MDT_Configuration_ExtIEs_S1AP_extensionValue_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_MDT_Configuration_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Extension */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_MDT_Configuration_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_extensionValue_constraint_289(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_293(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_293(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_293(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_297(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_297(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_297(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_301(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_301(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_301(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_305(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_305(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_305(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_309(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_309(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_309(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_313(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_313(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_313(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_317(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_ProSeAuthorized_ExtIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ProSeAuthorized_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ProSeAuthorized_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_317(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_ProSeAuthorized_ExtIEs_S1AP_extensionValue_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ProSeAuthorized_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Extension */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ProSeAuthorized_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_extensionValue_constraint_317(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_321(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_321(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_321(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_325(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_325(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_325(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_329(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_329(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_329(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_333(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_333(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_333(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_337(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_337(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_337(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_341(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_341(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_341(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_345(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_345(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_345(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_349(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_349(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_349(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_353(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_SONInformationReply_ExtIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_SONInformationReply_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_SONInformationReply_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_353(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_SONInformationReply_ExtIEs_S1AP_extensionValue_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_SONInformationReply_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Extension */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_SONInformationReply_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_extensionValue_constraint_353(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_357(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_SONConfigurationTransfer_ExtIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_SONConfigurationTransfer_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_SONConfigurationTransfer_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_357(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_SONConfigurationTransfer_ExtIEs_S1AP_extensionValue_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_SONConfigurationTransfer_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Extension */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_SONConfigurationTransfer_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_extensionValue_constraint_357(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_361(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_361(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_361(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_365(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_365(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_365(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_369(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_369(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_S1AP_extensionValue_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Extension */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_extensionValue_constraint_369(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_373(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_373(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_373(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_377(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_SupportedTAs_Item_ExtIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_SupportedTAs_Item_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_SupportedTAs_Item_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_377(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_SupportedTAs_Item_ExtIEs_S1AP_extensionValue_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_SupportedTAs_Item_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Extension */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_SupportedTAs_Item_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_extensionValue_constraint_377(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_381(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_TimeSynchronisationInfo_ExtIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_TimeSynchronisationInfo_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_TimeSynchronisationInfo_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_381(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_TimeSynchronisationInfo_ExtIEs_S1AP_extensionValue_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_TimeSynchronisationInfo_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Extension */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_TimeSynchronisationInfo_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_extensionValue_constraint_381(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_385(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_385(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_385(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_389(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_389(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_389(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_393(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_393(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_393(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_397(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_397(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_397(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_401(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_401(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_401(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_405(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_405(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_405(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_409(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_409(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_409(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_413(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_413(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_413(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_417(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_417(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_417(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_421(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_421(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_421(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_425(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_425(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_425(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_429(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_TraceActivation_ExtIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_TraceActivation_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_TraceActivation_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_429(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_TraceActivation_ExtIEs_S1AP_extensionValue_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_TraceActivation_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Extension */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_TraceActivation_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_extensionValue_constraint_429(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_433(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_433(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_433(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_437(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_437(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_437(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_441(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_441(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_441(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_445(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_445(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_445(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_449(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_449(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_449(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_453(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_453(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_453(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_457(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_457(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_457(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_461(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_461(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_461(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_465(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_465(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_465(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_469(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_X2TNLConfigurationInfo_ExtIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_X2TNLConfigurationInfo_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_X2TNLConfigurationInfo_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_469(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_X2TNLConfigurationInfo_ExtIEs_S1AP_extensionValue_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_X2TNLConfigurationInfo_ExtIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Extension */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_X2TNLConfigurationInfo_ExtIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_extensionValue_constraint_469(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_473(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_473(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_extensionValue_constraint_473(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_2 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_2 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_3 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_3 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_4 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_4 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_6 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_6 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_7 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_7 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_8 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_8 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_10 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_10 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_11 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_11 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_12 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_12 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_14 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_14 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_15 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_15 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_16 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_16 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_18 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_18 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_19 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_19 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_20 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_20 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_22 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_22 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_23 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_23 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_24 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_24 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_26 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_26 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_27 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_27 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_28 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_28 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_30 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_30 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_31 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_31 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_32 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_32 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_34 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_34 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_35 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_35 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_36 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_36 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_38 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_38 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_39 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_39 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_40 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_40 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_42 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_42 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_43 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_43 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_44 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_44 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_46 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_46 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_47 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_47 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_48 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_48 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_50 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_50 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_51 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_51 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_52 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_52 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_54 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_54 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_55 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_55 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_56 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_56 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_58 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_58 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_59 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_59 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_60 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_60 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_62 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_62 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_63 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_63 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_64 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_64 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_66 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_66 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_67 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_67 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_68 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_68 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_70 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_70 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_71 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_71 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_72 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_72 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_74 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_74 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_75 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_75 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_76 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_76 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_78 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_78 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_79 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_79 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_80 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_80 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_82 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_82 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_83 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_83 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_84 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_84 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_86 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_86 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_87 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_87 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_88 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_88 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_90 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_90 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_91 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_91 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_92 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_92 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_94 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_94 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_95 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_95 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_96 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_96 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_98 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_98 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_99 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_99 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_100 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_100 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_102 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_102 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_103 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_103 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_104 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_104 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_106 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_106 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_107 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_107 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_108 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_108 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_110 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_110 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_111 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_111 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_112 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_112 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_114 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_114 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_115 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_115 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_116 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_116 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_118 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_118 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_119 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_119 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_120 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_120 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_122 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_122 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_123 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_123 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_124 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_124 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_126 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_126 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_127 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_127 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_128 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_128 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_130 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_130 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_131 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_131 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_132 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_132 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_134 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_134 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_135 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_135 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_136 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_136 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_138 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_138 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_139 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_139 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_140 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_140 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_142 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_142 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_143 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_143 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_144 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_144 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_146 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_146 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_147 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_147 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_148 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_148 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_150 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_150 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_151 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_151 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_152 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_152 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_154 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_154 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_155 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_155 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_156 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_156 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_158 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_158 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_159 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_159 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_160 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_160 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_162 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_162 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_163 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_163 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_164 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_164 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_166 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_166 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_167 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_167 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_168 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_168 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_170 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_170 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_171 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_171 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_172 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_172 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_174 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_174 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_175 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_175 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_176 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_176 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_178 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_178 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_179 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_179 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_180 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_180 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_182 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_182 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_183 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_183 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_184 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_184 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_186 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_186 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_187 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_187 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_188 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_188 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_190 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_190 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_191 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_191 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_192 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_192 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_194 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_194 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_195 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_195 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_196 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_196 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_198 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_198 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_199 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_199 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_200 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_200 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_202 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_202 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_203 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_203 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_204 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_204 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_206 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_206 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_207 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_207 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_208 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_208 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_210 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_210 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_211 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_211 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_212 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_212 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_214 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_214 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_215 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_215 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_216 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_216 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_218 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_218 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_219 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_219 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_220 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_220 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_222 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_222 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_223 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_223 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_224 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_224 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_226 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_226 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_227 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_227 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_228 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_228 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_230 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_230 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_231 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_231 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_232 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_232 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_234 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_234 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_235 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_235 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_236 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_236 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_238 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_238 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_239 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_239 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_240 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_240 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_242 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_242 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_243 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_243 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_244 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_244 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_246 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_246 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_247 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_247 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_248 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_248 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_250 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_250 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_251 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_251 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_252 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_252 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_254 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_254 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_255 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_255 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_256 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_256 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_258 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_258 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_259 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_259 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_260 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_260 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_262 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_262 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_263 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_263 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_264 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_264 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_266 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_266 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_267 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_267 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_268 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_268 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_270 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_270 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_271 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_271 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_272 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_272 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_274 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_274 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_275 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_275 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_276 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_276 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_278 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_278 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_279 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_279 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_280 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_280 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_282 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_282 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_283 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_283 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_284 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_284 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_286 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_286 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_287 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_287 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_288 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_288 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_290 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_290 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_291 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_291 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_292 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_292 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_294 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_294 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_295 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_295 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_296 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_296 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_298 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_298 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_299 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_299 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_300 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_300 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_302 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_302 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_303 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_303 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_304 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_304 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_306 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_306 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_307 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_307 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_308 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_308 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_310 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_310 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_311 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_311 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_312 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_312 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_314 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_314 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_315 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_315 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_316 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_316 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_318 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_318 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_319 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_319 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_320 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_320 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_322 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_322 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_323 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_323 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_324 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_324 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_326 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_326 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_327 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_327 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_328 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_328 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_330 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_330 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_331 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_331 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_332 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_332 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_334 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_334 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_335 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_335 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_336 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_336 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_338 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_338 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_339 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_339 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_340 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_340 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_342 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_342 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_343 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_343 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_344 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_344 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_346 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_346 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_347 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_347 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_348 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_348 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_350 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_350 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_351 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_351 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_352 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_352 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_354 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_354 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_355 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_355 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_356 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_356 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_358 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_358 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_359 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_359 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_360 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_360 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_362 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_362 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_363 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_363 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_364 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_364 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_366 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_366 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_367 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_367 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_368 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_368 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_370 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_370 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_371 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_371 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_372 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_372 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_374 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_374 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_375 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_375 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_376 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_376 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_378 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_378 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_379 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_379 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_380 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_380 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_382 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_382 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_383 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_383 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_384 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_384 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_386 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_386 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_387 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_387 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_388 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_388 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_390 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_390 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_391 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_391 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_392 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_392 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_394 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_394 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_395 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_395 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_396 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_396 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_398 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_398 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_399 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_399 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_400 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_400 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_402 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_402 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_403 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_403 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_404 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_404 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_406 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_406 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_407 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_407 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_408 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_408 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_410 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_410 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_411 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_411 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_412 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_412 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_414 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_414 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_415 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_415 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_416 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_416 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_418 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_418 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_419 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_419 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_420 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_420 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_422 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_422 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_423 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_423 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_424 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_424 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_426 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_426 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_427 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_427 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_428 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_428 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_430 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_430 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_431 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_431 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_432 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_432 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_434 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_434 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_435 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_435 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_436 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_436 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_438 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_438 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_439 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_439 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_440 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_440 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_442 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_442 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_443 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_443 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_444 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_444 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_446 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_446 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_447 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_447 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_448 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_448 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_450 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_450 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_451 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_451 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_452 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_452 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_454 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_454 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_455 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_455 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_456 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_456 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_458 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_458 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_459 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_459 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_460 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_460 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_462 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_462 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_463 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_463 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_464 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_464 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_466 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_466 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_467 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_467 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_468 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_468 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_470 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_470 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_471 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_471 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_472 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_472 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_474 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_474 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_475 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_475 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_extensionValue_constr_476 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_extensionValue_constr_476 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_4 = { sizeof(struct S1AP_E_RABDataForwardingItem_ExtIEs__extensionValue), offsetof(struct S1AP_E_RABDataForwardingItem_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_E_RABDataForwardingItem_ExtIEs__extensionValue, present), sizeof(((struct S1AP_E_RABDataForwardingItem_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_4 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_4 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABDataForwardingItem_ExtIEs_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABDataForwardingItem_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_2, &asn_PER_memb_S1AP_id_constr_2, memb_S1AP_id_constraint_1 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABDataForwardingItem_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_3, &asn_PER_memb_S1AP_criticality_constr_3, memb_S1AP_criticality_constraint_1 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABDataForwardingItem_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_4, 0, { &asn_OER_memb_S1AP_extensionValue_constr_4, &asn_PER_memb_S1AP_extensionValue_constr_4, memb_S1AP_extensionValue_constraint_1 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABDataForwardingItem_ExtIEs_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABDataForwardingItem_ExtIEs_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABDataForwardingItem_ExtIEs_specs_1 = { sizeof(struct S1AP_E_RABDataForwardingItem_ExtIEs), offsetof(struct S1AP_E_RABDataForwardingItem_ExtIEs, _asn_ctx), asn_MAP_S1AP_E_RABDataForwardingItem_ExtIEs_tag2el_1, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABDataForwardingItem_ExtIEs = { "E-RABDataForwardingItem-ExtIEs", "E-RABDataForwardingItem-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABDataForwardingItem_ExtIEs_tags_1, sizeof(asn_DEF_S1AP_E_RABDataForwardingItem_ExtIEs_tags_1) /sizeof(asn_DEF_S1AP_E_RABDataForwardingItem_ExtIEs_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABDataForwardingItem_ExtIEs_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABDataForwardingItem_ExtIEs_tags_1) /sizeof(asn_DEF_S1AP_E_RABDataForwardingItem_ExtIEs_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABDataForwardingItem_ExtIEs_1, 3, /* Elements count */ &asn_SPC_S1AP_E_RABDataForwardingItem_ExtIEs_specs_1 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_extensionValue_8[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemHOReq_ExtIEs__extensionValue, choice.Data_Forwarding_Not_Possible), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_Data_Forwarding_Not_Possible, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Data-Forwarding-Not-Possible" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemHOReq_ExtIEs__extensionValue, choice.BearerType), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_BearerType, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "BearerType" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_extensionValue_tag2el_8[] = { { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 1 }, /* Data-Forwarding-Not-Possible */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, -1, 0 } /* BearerType */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_8 = { sizeof(struct S1AP_E_RABToBeSetupItemHOReq_ExtIEs__extensionValue), offsetof(struct S1AP_E_RABToBeSetupItemHOReq_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_E_RABToBeSetupItemHOReq_ExtIEs__extensionValue, present), sizeof(((struct S1AP_E_RABToBeSetupItemHOReq_ExtIEs__extensionValue *)0)->present), asn_MAP_S1AP_extensionValue_tag2el_8, 2, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_8 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_extensionValue_8, 2, /* Elements count */ &asn_SPC_S1AP_extensionValue_specs_8 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSetupItemHOReq_ExtIEs_5[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemHOReq_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_6, &asn_PER_memb_S1AP_id_constr_6, memb_S1AP_id_constraint_5 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemHOReq_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_E_RABToBeSetupItemHOReq_ExtIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_7, &asn_PER_memb_S1AP_criticality_constr_7, memb_S1AP_criticality_constraint_5 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemHOReq_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_8, select_E_RABToBeSetupItemHOReq_ExtIEs_S1AP_extensionValue_type, { &asn_OER_memb_S1AP_extensionValue_constr_8, &asn_PER_memb_S1AP_extensionValue_constr_8, memb_S1AP_extensionValue_constraint_5 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeSetupItemHOReq_ExtIEs_tags_5[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABToBeSetupItemHOReq_ExtIEs_tag2el_5[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSetupItemHOReq_ExtIEs_specs_5 = { sizeof(struct S1AP_E_RABToBeSetupItemHOReq_ExtIEs), offsetof(struct S1AP_E_RABToBeSetupItemHOReq_ExtIEs, _asn_ctx), asn_MAP_S1AP_E_RABToBeSetupItemHOReq_ExtIEs_tag2el_5, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupItemHOReq_ExtIEs = { "E-RABToBeSetupItemHOReq-ExtIEs", "E-RABToBeSetupItemHOReq-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABToBeSetupItemHOReq_ExtIEs_tags_5, sizeof(asn_DEF_S1AP_E_RABToBeSetupItemHOReq_ExtIEs_tags_5) /sizeof(asn_DEF_S1AP_E_RABToBeSetupItemHOReq_ExtIEs_tags_5[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeSetupItemHOReq_ExtIEs_tags_5, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeSetupItemHOReq_ExtIEs_tags_5) /sizeof(asn_DEF_S1AP_E_RABToBeSetupItemHOReq_ExtIEs_tags_5[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeSetupItemHOReq_ExtIEs_5, 3, /* Elements count */ &asn_SPC_S1AP_E_RABToBeSetupItemHOReq_ExtIEs_specs_5 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_12 = { sizeof(struct S1AP_E_RABAdmittedItem_ExtIEs__extensionValue), offsetof(struct S1AP_E_RABAdmittedItem_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_E_RABAdmittedItem_ExtIEs__extensionValue, present), sizeof(((struct S1AP_E_RABAdmittedItem_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_12 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_12 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABAdmittedItem_ExtIEs_9[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABAdmittedItem_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_10, &asn_PER_memb_S1AP_id_constr_10, memb_S1AP_id_constraint_9 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABAdmittedItem_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_11, &asn_PER_memb_S1AP_criticality_constr_11, memb_S1AP_criticality_constraint_9 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABAdmittedItem_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_12, 0, { &asn_OER_memb_S1AP_extensionValue_constr_12, &asn_PER_memb_S1AP_extensionValue_constr_12, memb_S1AP_extensionValue_constraint_9 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABAdmittedItem_ExtIEs_tags_9[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABAdmittedItem_ExtIEs_tag2el_9[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABAdmittedItem_ExtIEs_specs_9 = { sizeof(struct S1AP_E_RABAdmittedItem_ExtIEs), offsetof(struct S1AP_E_RABAdmittedItem_ExtIEs, _asn_ctx), asn_MAP_S1AP_E_RABAdmittedItem_ExtIEs_tag2el_9, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABAdmittedItem_ExtIEs = { "E-RABAdmittedItem-ExtIEs", "E-RABAdmittedItem-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABAdmittedItem_ExtIEs_tags_9, sizeof(asn_DEF_S1AP_E_RABAdmittedItem_ExtIEs_tags_9) /sizeof(asn_DEF_S1AP_E_RABAdmittedItem_ExtIEs_tags_9[0]), /* 1 */ asn_DEF_S1AP_E_RABAdmittedItem_ExtIEs_tags_9, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABAdmittedItem_ExtIEs_tags_9) /sizeof(asn_DEF_S1AP_E_RABAdmittedItem_ExtIEs_tags_9[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABAdmittedItem_ExtIEs_9, 3, /* Elements count */ &asn_SPC_S1AP_E_RABAdmittedItem_ExtIEs_specs_9 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_16 = { sizeof(struct S1AP_E_RABFailedToSetupItemHOReqAckExtIEs__extensionValue), offsetof(struct S1AP_E_RABFailedToSetupItemHOReqAckExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_E_RABFailedToSetupItemHOReqAckExtIEs__extensionValue, present), sizeof(((struct S1AP_E_RABFailedToSetupItemHOReqAckExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_16 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_16 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABFailedToSetupItemHOReqAckExtIEs_13[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedToSetupItemHOReqAckExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_14, &asn_PER_memb_S1AP_id_constr_14, memb_S1AP_id_constraint_13 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedToSetupItemHOReqAckExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_15, &asn_PER_memb_S1AP_criticality_constr_15, memb_S1AP_criticality_constraint_13 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedToSetupItemHOReqAckExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_16, 0, { &asn_OER_memb_S1AP_extensionValue_constr_16, &asn_PER_memb_S1AP_extensionValue_constr_16, memb_S1AP_extensionValue_constraint_13 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABFailedToSetupItemHOReqAckExtIEs_tags_13[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABFailedToSetupItemHOReqAckExtIEs_tag2el_13[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABFailedToSetupItemHOReqAckExtIEs_specs_13 = { sizeof(struct S1AP_E_RABFailedToSetupItemHOReqAckExtIEs), offsetof(struct S1AP_E_RABFailedToSetupItemHOReqAckExtIEs, _asn_ctx), asn_MAP_S1AP_E_RABFailedToSetupItemHOReqAckExtIEs_tag2el_13, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedToSetupItemHOReqAckExtIEs = { "E-RABFailedToSetupItemHOReqAckExtIEs", "E-RABFailedToSetupItemHOReqAckExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABFailedToSetupItemHOReqAckExtIEs_tags_13, sizeof(asn_DEF_S1AP_E_RABFailedToSetupItemHOReqAckExtIEs_tags_13) /sizeof(asn_DEF_S1AP_E_RABFailedToSetupItemHOReqAckExtIEs_tags_13[0]), /* 1 */ asn_DEF_S1AP_E_RABFailedToSetupItemHOReqAckExtIEs_tags_13, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABFailedToSetupItemHOReqAckExtIEs_tags_13) /sizeof(asn_DEF_S1AP_E_RABFailedToSetupItemHOReqAckExtIEs_tags_13[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABFailedToSetupItemHOReqAckExtIEs_13, 3, /* Elements count */ &asn_SPC_S1AP_E_RABFailedToSetupItemHOReqAckExtIEs_specs_13 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_20 = { sizeof(struct S1AP_E_RABToBeSwitchedDLItem_ExtIEs__extensionValue), offsetof(struct S1AP_E_RABToBeSwitchedDLItem_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_E_RABToBeSwitchedDLItem_ExtIEs__extensionValue, present), sizeof(((struct S1AP_E_RABToBeSwitchedDLItem_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_20 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_20 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSwitchedDLItem_ExtIEs_17[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSwitchedDLItem_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_18, &asn_PER_memb_S1AP_id_constr_18, memb_S1AP_id_constraint_17 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSwitchedDLItem_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_19, &asn_PER_memb_S1AP_criticality_constr_19, memb_S1AP_criticality_constraint_17 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSwitchedDLItem_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_20, 0, { &asn_OER_memb_S1AP_extensionValue_constr_20, &asn_PER_memb_S1AP_extensionValue_constr_20, memb_S1AP_extensionValue_constraint_17 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeSwitchedDLItem_ExtIEs_tags_17[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABToBeSwitchedDLItem_ExtIEs_tag2el_17[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSwitchedDLItem_ExtIEs_specs_17 = { sizeof(struct S1AP_E_RABToBeSwitchedDLItem_ExtIEs), offsetof(struct S1AP_E_RABToBeSwitchedDLItem_ExtIEs, _asn_ctx), asn_MAP_S1AP_E_RABToBeSwitchedDLItem_ExtIEs_tag2el_17, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSwitchedDLItem_ExtIEs = { "E-RABToBeSwitchedDLItem-ExtIEs", "E-RABToBeSwitchedDLItem-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABToBeSwitchedDLItem_ExtIEs_tags_17, sizeof(asn_DEF_S1AP_E_RABToBeSwitchedDLItem_ExtIEs_tags_17) /sizeof(asn_DEF_S1AP_E_RABToBeSwitchedDLItem_ExtIEs_tags_17[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeSwitchedDLItem_ExtIEs_tags_17, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeSwitchedDLItem_ExtIEs_tags_17) /sizeof(asn_DEF_S1AP_E_RABToBeSwitchedDLItem_ExtIEs_tags_17[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeSwitchedDLItem_ExtIEs_17, 3, /* Elements count */ &asn_SPC_S1AP_E_RABToBeSwitchedDLItem_ExtIEs_specs_17 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_24 = { sizeof(struct S1AP_E_RABToBeSwitchedULItem_ExtIEs__extensionValue), offsetof(struct S1AP_E_RABToBeSwitchedULItem_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_E_RABToBeSwitchedULItem_ExtIEs__extensionValue, present), sizeof(((struct S1AP_E_RABToBeSwitchedULItem_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_24 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_24 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSwitchedULItem_ExtIEs_21[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSwitchedULItem_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_22, &asn_PER_memb_S1AP_id_constr_22, memb_S1AP_id_constraint_21 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSwitchedULItem_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_23, &asn_PER_memb_S1AP_criticality_constr_23, memb_S1AP_criticality_constraint_21 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSwitchedULItem_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_24, 0, { &asn_OER_memb_S1AP_extensionValue_constr_24, &asn_PER_memb_S1AP_extensionValue_constr_24, memb_S1AP_extensionValue_constraint_21 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeSwitchedULItem_ExtIEs_tags_21[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABToBeSwitchedULItem_ExtIEs_tag2el_21[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSwitchedULItem_ExtIEs_specs_21 = { sizeof(struct S1AP_E_RABToBeSwitchedULItem_ExtIEs), offsetof(struct S1AP_E_RABToBeSwitchedULItem_ExtIEs, _asn_ctx), asn_MAP_S1AP_E_RABToBeSwitchedULItem_ExtIEs_tag2el_21, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSwitchedULItem_ExtIEs = { "E-RABToBeSwitchedULItem-ExtIEs", "E-RABToBeSwitchedULItem-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABToBeSwitchedULItem_ExtIEs_tags_21, sizeof(asn_DEF_S1AP_E_RABToBeSwitchedULItem_ExtIEs_tags_21) /sizeof(asn_DEF_S1AP_E_RABToBeSwitchedULItem_ExtIEs_tags_21[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeSwitchedULItem_ExtIEs_tags_21, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeSwitchedULItem_ExtIEs_tags_21) /sizeof(asn_DEF_S1AP_E_RABToBeSwitchedULItem_ExtIEs_tags_21[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeSwitchedULItem_ExtIEs_21, 3, /* Elements count */ &asn_SPC_S1AP_E_RABToBeSwitchedULItem_ExtIEs_specs_21 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_extensionValue_28[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReqExtIEs__extensionValue, choice.Correlation_ID), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_Correlation_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Correlation-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReqExtIEs__extensionValue, choice.BearerType), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_BearerType, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "BearerType" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_extensionValue_tag2el_28[] = { { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 }, /* Correlation-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* BearerType */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_28 = { sizeof(struct S1AP_E_RABToBeSetupItemBearerSUReqExtIEs__extensionValue), offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReqExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReqExtIEs__extensionValue, present), sizeof(((struct S1AP_E_RABToBeSetupItemBearerSUReqExtIEs__extensionValue *)0)->present), asn_MAP_S1AP_extensionValue_tag2el_28, 2, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_28 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_extensionValue_28, 2, /* Elements count */ &asn_SPC_S1AP_extensionValue_specs_28 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSetupItemBearerSUReqExtIEs_25[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReqExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_26, &asn_PER_memb_S1AP_id_constr_26, memb_S1AP_id_constraint_25 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReqExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_E_RABToBeSetupItemBearerSUReqExtIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_27, &asn_PER_memb_S1AP_criticality_constr_27, memb_S1AP_criticality_constraint_25 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReqExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_28, select_E_RABToBeSetupItemBearerSUReqExtIEs_S1AP_extensionValue_type, { &asn_OER_memb_S1AP_extensionValue_constr_28, &asn_PER_memb_S1AP_extensionValue_constr_28, memb_S1AP_extensionValue_constraint_25 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReqExtIEs_tags_25[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABToBeSetupItemBearerSUReqExtIEs_tag2el_25[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSetupItemBearerSUReqExtIEs_specs_25 = { sizeof(struct S1AP_E_RABToBeSetupItemBearerSUReqExtIEs), offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReqExtIEs, _asn_ctx), asn_MAP_S1AP_E_RABToBeSetupItemBearerSUReqExtIEs_tag2el_25, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReqExtIEs = { "E-RABToBeSetupItemBearerSUReqExtIEs", "E-RABToBeSetupItemBearerSUReqExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReqExtIEs_tags_25, sizeof(asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReqExtIEs_tags_25) /sizeof(asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReqExtIEs_tags_25[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReqExtIEs_tags_25, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReqExtIEs_tags_25) /sizeof(asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReqExtIEs_tags_25[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeSetupItemBearerSUReqExtIEs_25, 3, /* Elements count */ &asn_SPC_S1AP_E_RABToBeSetupItemBearerSUReqExtIEs_specs_25 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_32 = { sizeof(struct S1AP_E_RABSetupItemBearerSUResExtIEs__extensionValue), offsetof(struct S1AP_E_RABSetupItemBearerSUResExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_E_RABSetupItemBearerSUResExtIEs__extensionValue, present), sizeof(((struct S1AP_E_RABSetupItemBearerSUResExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_32 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_32 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABSetupItemBearerSUResExtIEs_29[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupItemBearerSUResExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_30, &asn_PER_memb_S1AP_id_constr_30, memb_S1AP_id_constraint_29 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupItemBearerSUResExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_31, &asn_PER_memb_S1AP_criticality_constr_31, memb_S1AP_criticality_constraint_29 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupItemBearerSUResExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_32, 0, { &asn_OER_memb_S1AP_extensionValue_constr_32, &asn_PER_memb_S1AP_extensionValue_constr_32, memb_S1AP_extensionValue_constraint_29 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABSetupItemBearerSUResExtIEs_tags_29[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABSetupItemBearerSUResExtIEs_tag2el_29[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABSetupItemBearerSUResExtIEs_specs_29 = { sizeof(struct S1AP_E_RABSetupItemBearerSUResExtIEs), offsetof(struct S1AP_E_RABSetupItemBearerSUResExtIEs, _asn_ctx), asn_MAP_S1AP_E_RABSetupItemBearerSUResExtIEs_tag2el_29, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupItemBearerSUResExtIEs = { "E-RABSetupItemBearerSUResExtIEs", "E-RABSetupItemBearerSUResExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABSetupItemBearerSUResExtIEs_tags_29, sizeof(asn_DEF_S1AP_E_RABSetupItemBearerSUResExtIEs_tags_29) /sizeof(asn_DEF_S1AP_E_RABSetupItemBearerSUResExtIEs_tags_29[0]), /* 1 */ asn_DEF_S1AP_E_RABSetupItemBearerSUResExtIEs_tags_29, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABSetupItemBearerSUResExtIEs_tags_29) /sizeof(asn_DEF_S1AP_E_RABSetupItemBearerSUResExtIEs_tags_29[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABSetupItemBearerSUResExtIEs_29, 3, /* Elements count */ &asn_SPC_S1AP_E_RABSetupItemBearerSUResExtIEs_specs_29 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_extensionValue_36[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeModifyItemBearerModReqExtIEs__extensionValue, choice.TransportInformation), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TransportInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TransportInformation" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_extensionValue_tag2el_36[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* TransportInformation */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_36 = { sizeof(struct S1AP_E_RABToBeModifyItemBearerModReqExtIEs__extensionValue), offsetof(struct S1AP_E_RABToBeModifyItemBearerModReqExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_E_RABToBeModifyItemBearerModReqExtIEs__extensionValue, present), sizeof(((struct S1AP_E_RABToBeModifyItemBearerModReqExtIEs__extensionValue *)0)->present), asn_MAP_S1AP_extensionValue_tag2el_36, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_36 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_extensionValue_36, 1, /* Elements count */ &asn_SPC_S1AP_extensionValue_specs_36 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeModifyItemBearerModReqExtIEs_33[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeModifyItemBearerModReqExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_34, &asn_PER_memb_S1AP_id_constr_34, memb_S1AP_id_constraint_33 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeModifyItemBearerModReqExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_E_RABToBeModifyItemBearerModReqExtIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_35, &asn_PER_memb_S1AP_criticality_constr_35, memb_S1AP_criticality_constraint_33 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeModifyItemBearerModReqExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_36, select_E_RABToBeModifyItemBearerModReqExtIEs_S1AP_extensionValue_type, { &asn_OER_memb_S1AP_extensionValue_constr_36, &asn_PER_memb_S1AP_extensionValue_constr_36, memb_S1AP_extensionValue_constraint_33 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeModifyItemBearerModReqExtIEs_tags_33[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABToBeModifyItemBearerModReqExtIEs_tag2el_33[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeModifyItemBearerModReqExtIEs_specs_33 = { sizeof(struct S1AP_E_RABToBeModifyItemBearerModReqExtIEs), offsetof(struct S1AP_E_RABToBeModifyItemBearerModReqExtIEs, _asn_ctx), asn_MAP_S1AP_E_RABToBeModifyItemBearerModReqExtIEs_tag2el_33, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeModifyItemBearerModReqExtIEs = { "E-RABToBeModifyItemBearerModReqExtIEs", "E-RABToBeModifyItemBearerModReqExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABToBeModifyItemBearerModReqExtIEs_tags_33, sizeof(asn_DEF_S1AP_E_RABToBeModifyItemBearerModReqExtIEs_tags_33) /sizeof(asn_DEF_S1AP_E_RABToBeModifyItemBearerModReqExtIEs_tags_33[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeModifyItemBearerModReqExtIEs_tags_33, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeModifyItemBearerModReqExtIEs_tags_33) /sizeof(asn_DEF_S1AP_E_RABToBeModifyItemBearerModReqExtIEs_tags_33[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeModifyItemBearerModReqExtIEs_33, 3, /* Elements count */ &asn_SPC_S1AP_E_RABToBeModifyItemBearerModReqExtIEs_specs_33 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_40 = { sizeof(struct S1AP_E_RABModifyItemBearerModResExtIEs__extensionValue), offsetof(struct S1AP_E_RABModifyItemBearerModResExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_E_RABModifyItemBearerModResExtIEs__extensionValue, present), sizeof(((struct S1AP_E_RABModifyItemBearerModResExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_40 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_40 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABModifyItemBearerModResExtIEs_37[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyItemBearerModResExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_38, &asn_PER_memb_S1AP_id_constr_38, memb_S1AP_id_constraint_37 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyItemBearerModResExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_39, &asn_PER_memb_S1AP_criticality_constr_39, memb_S1AP_criticality_constraint_37 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyItemBearerModResExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_40, 0, { &asn_OER_memb_S1AP_extensionValue_constr_40, &asn_PER_memb_S1AP_extensionValue_constr_40, memb_S1AP_extensionValue_constraint_37 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABModifyItemBearerModResExtIEs_tags_37[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABModifyItemBearerModResExtIEs_tag2el_37[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModifyItemBearerModResExtIEs_specs_37 = { sizeof(struct S1AP_E_RABModifyItemBearerModResExtIEs), offsetof(struct S1AP_E_RABModifyItemBearerModResExtIEs, _asn_ctx), asn_MAP_S1AP_E_RABModifyItemBearerModResExtIEs_tag2el_37, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyItemBearerModResExtIEs = { "E-RABModifyItemBearerModResExtIEs", "E-RABModifyItemBearerModResExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABModifyItemBearerModResExtIEs_tags_37, sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModResExtIEs_tags_37) /sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModResExtIEs_tags_37[0]), /* 1 */ asn_DEF_S1AP_E_RABModifyItemBearerModResExtIEs_tags_37, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModResExtIEs_tags_37) /sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModResExtIEs_tags_37[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABModifyItemBearerModResExtIEs_37, 3, /* Elements count */ &asn_SPC_S1AP_E_RABModifyItemBearerModResExtIEs_specs_37 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_44 = { sizeof(struct S1AP_E_RABReleaseItemBearerRelCompExtIEs__extensionValue), offsetof(struct S1AP_E_RABReleaseItemBearerRelCompExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_E_RABReleaseItemBearerRelCompExtIEs__extensionValue, present), sizeof(((struct S1AP_E_RABReleaseItemBearerRelCompExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_44 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_44 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABReleaseItemBearerRelCompExtIEs_41[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseItemBearerRelCompExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_42, &asn_PER_memb_S1AP_id_constr_42, memb_S1AP_id_constraint_41 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseItemBearerRelCompExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_43, &asn_PER_memb_S1AP_criticality_constr_43, memb_S1AP_criticality_constraint_41 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseItemBearerRelCompExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_44, 0, { &asn_OER_memb_S1AP_extensionValue_constr_44, &asn_PER_memb_S1AP_extensionValue_constr_44, memb_S1AP_extensionValue_constraint_41 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABReleaseItemBearerRelCompExtIEs_tags_41[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABReleaseItemBearerRelCompExtIEs_tag2el_41[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABReleaseItemBearerRelCompExtIEs_specs_41 = { sizeof(struct S1AP_E_RABReleaseItemBearerRelCompExtIEs), offsetof(struct S1AP_E_RABReleaseItemBearerRelCompExtIEs, _asn_ctx), asn_MAP_S1AP_E_RABReleaseItemBearerRelCompExtIEs_tag2el_41, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABReleaseItemBearerRelCompExtIEs = { "E-RABReleaseItemBearerRelCompExtIEs", "E-RABReleaseItemBearerRelCompExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABReleaseItemBearerRelCompExtIEs_tags_41, sizeof(asn_DEF_S1AP_E_RABReleaseItemBearerRelCompExtIEs_tags_41) /sizeof(asn_DEF_S1AP_E_RABReleaseItemBearerRelCompExtIEs_tags_41[0]), /* 1 */ asn_DEF_S1AP_E_RABReleaseItemBearerRelCompExtIEs_tags_41, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABReleaseItemBearerRelCompExtIEs_tags_41) /sizeof(asn_DEF_S1AP_E_RABReleaseItemBearerRelCompExtIEs_tags_41[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABReleaseItemBearerRelCompExtIEs_41, 3, /* Elements count */ &asn_SPC_S1AP_E_RABReleaseItemBearerRelCompExtIEs_specs_41 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_extensionValue_48[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs__extensionValue, choice.Correlation_ID), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_Correlation_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Correlation-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs__extensionValue, choice.BearerType), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_BearerType, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "BearerType" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_extensionValue_tag2el_48[] = { { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, 0, 0 }, /* Correlation-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* BearerType */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_48 = { sizeof(struct S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs__extensionValue), offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs__extensionValue, present), sizeof(((struct S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs__extensionValue *)0)->present), asn_MAP_S1AP_extensionValue_tag2el_48, 2, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_48 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_extensionValue_48, 2, /* Elements count */ &asn_SPC_S1AP_extensionValue_specs_48 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs_45[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_46, &asn_PER_memb_S1AP_id_constr_46, memb_S1AP_id_constraint_45 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_E_RABToBeSetupItemCtxtSUReqExtIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_47, &asn_PER_memb_S1AP_criticality_constr_47, memb_S1AP_criticality_constraint_45 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_48, select_E_RABToBeSetupItemCtxtSUReqExtIEs_S1AP_extensionValue_type, { &asn_OER_memb_S1AP_extensionValue_constr_48, &asn_PER_memb_S1AP_extensionValue_constr_48, memb_S1AP_extensionValue_constraint_45 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs_tags_45[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs_tag2el_45[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs_specs_45 = { sizeof(struct S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs), offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs, _asn_ctx), asn_MAP_S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs_tag2el_45, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs = { "E-RABToBeSetupItemCtxtSUReqExtIEs", "E-RABToBeSetupItemCtxtSUReqExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs_tags_45, sizeof(asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs_tags_45) /sizeof(asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs_tags_45[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs_tags_45, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs_tags_45) /sizeof(asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs_tags_45[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs_45, 3, /* Elements count */ &asn_SPC_S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs_specs_45 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_52 = { sizeof(struct S1AP_E_RABSetupItemCtxtSUResExtIEs__extensionValue), offsetof(struct S1AP_E_RABSetupItemCtxtSUResExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_E_RABSetupItemCtxtSUResExtIEs__extensionValue, present), sizeof(((struct S1AP_E_RABSetupItemCtxtSUResExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_52 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_52 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABSetupItemCtxtSUResExtIEs_49[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupItemCtxtSUResExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_50, &asn_PER_memb_S1AP_id_constr_50, memb_S1AP_id_constraint_49 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupItemCtxtSUResExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_51, &asn_PER_memb_S1AP_criticality_constr_51, memb_S1AP_criticality_constraint_49 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupItemCtxtSUResExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_52, 0, { &asn_OER_memb_S1AP_extensionValue_constr_52, &asn_PER_memb_S1AP_extensionValue_constr_52, memb_S1AP_extensionValue_constraint_49 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABSetupItemCtxtSUResExtIEs_tags_49[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABSetupItemCtxtSUResExtIEs_tag2el_49[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABSetupItemCtxtSUResExtIEs_specs_49 = { sizeof(struct S1AP_E_RABSetupItemCtxtSUResExtIEs), offsetof(struct S1AP_E_RABSetupItemCtxtSUResExtIEs, _asn_ctx), asn_MAP_S1AP_E_RABSetupItemCtxtSUResExtIEs_tag2el_49, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupItemCtxtSUResExtIEs = { "E-RABSetupItemCtxtSUResExtIEs", "E-RABSetupItemCtxtSUResExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABSetupItemCtxtSUResExtIEs_tags_49, sizeof(asn_DEF_S1AP_E_RABSetupItemCtxtSUResExtIEs_tags_49) /sizeof(asn_DEF_S1AP_E_RABSetupItemCtxtSUResExtIEs_tags_49[0]), /* 1 */ asn_DEF_S1AP_E_RABSetupItemCtxtSUResExtIEs_tags_49, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABSetupItemCtxtSUResExtIEs_tags_49) /sizeof(asn_DEF_S1AP_E_RABSetupItemCtxtSUResExtIEs_tags_49[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABSetupItemCtxtSUResExtIEs_49, 3, /* Elements count */ &asn_SPC_S1AP_E_RABSetupItemCtxtSUResExtIEs_specs_49 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_56 = { sizeof(struct S1AP_TAIItemExtIEs__extensionValue), offsetof(struct S1AP_TAIItemExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_TAIItemExtIEs__extensionValue, present), sizeof(((struct S1AP_TAIItemExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_56 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_56 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_TAIItemExtIEs_53[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TAIItemExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_54, &asn_PER_memb_S1AP_id_constr_54, memb_S1AP_id_constraint_53 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TAIItemExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_55, &asn_PER_memb_S1AP_criticality_constr_55, memb_S1AP_criticality_constraint_53 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_TAIItemExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_56, 0, { &asn_OER_memb_S1AP_extensionValue_constr_56, &asn_PER_memb_S1AP_extensionValue_constr_56, memb_S1AP_extensionValue_constraint_53 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TAIItemExtIEs_tags_53[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TAIItemExtIEs_tag2el_53[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_TAIItemExtIEs_specs_53 = { sizeof(struct S1AP_TAIItemExtIEs), offsetof(struct S1AP_TAIItemExtIEs, _asn_ctx), asn_MAP_S1AP_TAIItemExtIEs_tag2el_53, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TAIItemExtIEs = { "TAIItemExtIEs", "TAIItemExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_TAIItemExtIEs_tags_53, sizeof(asn_DEF_S1AP_TAIItemExtIEs_tags_53) /sizeof(asn_DEF_S1AP_TAIItemExtIEs_tags_53[0]), /* 1 */ asn_DEF_S1AP_TAIItemExtIEs_tags_53, /* Same as above */ sizeof(asn_DEF_S1AP_TAIItemExtIEs_tags_53) /sizeof(asn_DEF_S1AP_TAIItemExtIEs_tags_53[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TAIItemExtIEs_53, 3, /* Elements count */ &asn_SPC_S1AP_TAIItemExtIEs_specs_53 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_60 = { sizeof(struct S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs__extensionValue), offsetof(struct S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs__extensionValue, present), sizeof(((struct S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_60 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_60 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs_57[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_58, &asn_PER_memb_S1AP_id_constr_58, memb_S1AP_id_constraint_57 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_59, &asn_PER_memb_S1AP_criticality_constr_59, memb_S1AP_criticality_constraint_57 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_60, 0, { &asn_OER_memb_S1AP_extensionValue_constr_60, &asn_PER_memb_S1AP_extensionValue_constr_60, memb_S1AP_extensionValue_constraint_57 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs_tags_57[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs_tag2el_57[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs_specs_57 = { sizeof(struct S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs), offsetof(struct S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs, _asn_ctx), asn_MAP_S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs_tag2el_57, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs = { "E-RABToBeModifiedItemBearerModInd-ExtIEs", "E-RABToBeModifiedItemBearerModInd-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs_tags_57, sizeof(asn_DEF_S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs_tags_57) /sizeof(asn_DEF_S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs_tags_57[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs_tags_57, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs_tags_57) /sizeof(asn_DEF_S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs_tags_57[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs_57, 3, /* Elements count */ &asn_SPC_S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs_specs_57 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_64 = { sizeof(struct S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs__extensionValue), offsetof(struct S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs__extensionValue, present), sizeof(((struct S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_64 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_64 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs_61[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_62, &asn_PER_memb_S1AP_id_constr_62, memb_S1AP_id_constraint_61 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_63, &asn_PER_memb_S1AP_criticality_constr_63, memb_S1AP_criticality_constraint_61 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_64, 0, { &asn_OER_memb_S1AP_extensionValue_constr_64, &asn_PER_memb_S1AP_extensionValue_constr_64, memb_S1AP_extensionValue_constraint_61 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs_tags_61[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs_tag2el_61[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs_specs_61 = { sizeof(struct S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs), offsetof(struct S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs, _asn_ctx), asn_MAP_S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs_tag2el_61, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs = { "E-RABNotToBeModifiedItemBearerModInd-ExtIEs", "E-RABNotToBeModifiedItemBearerModInd-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs_tags_61, sizeof(asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs_tags_61) /sizeof(asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs_tags_61[0]), /* 1 */ asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs_tags_61, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs_tags_61) /sizeof(asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs_tags_61[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs_61, 3, /* Elements count */ &asn_SPC_S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs_specs_61 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_68 = { sizeof(struct S1AP_CSGMembershipInfo_ExtIEs__extensionValue), offsetof(struct S1AP_CSGMembershipInfo_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_CSGMembershipInfo_ExtIEs__extensionValue, present), sizeof(((struct S1AP_CSGMembershipInfo_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_68 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_68 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_CSGMembershipInfo_ExtIEs_65[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CSGMembershipInfo_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_66, &asn_PER_memb_S1AP_id_constr_66, memb_S1AP_id_constraint_65 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CSGMembershipInfo_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_67, &asn_PER_memb_S1AP_criticality_constr_67, memb_S1AP_criticality_constraint_65 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_CSGMembershipInfo_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_68, 0, { &asn_OER_memb_S1AP_extensionValue_constr_68, &asn_PER_memb_S1AP_extensionValue_constr_68, memb_S1AP_extensionValue_constraint_65 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CSGMembershipInfo_ExtIEs_tags_65[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CSGMembershipInfo_ExtIEs_tag2el_65[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CSGMembershipInfo_ExtIEs_specs_65 = { sizeof(struct S1AP_CSGMembershipInfo_ExtIEs), offsetof(struct S1AP_CSGMembershipInfo_ExtIEs, _asn_ctx), asn_MAP_S1AP_CSGMembershipInfo_ExtIEs_tag2el_65, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CSGMembershipInfo_ExtIEs = { "CSGMembershipInfo-ExtIEs", "CSGMembershipInfo-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_CSGMembershipInfo_ExtIEs_tags_65, sizeof(asn_DEF_S1AP_CSGMembershipInfo_ExtIEs_tags_65) /sizeof(asn_DEF_S1AP_CSGMembershipInfo_ExtIEs_tags_65[0]), /* 1 */ asn_DEF_S1AP_CSGMembershipInfo_ExtIEs_tags_65, /* Same as above */ sizeof(asn_DEF_S1AP_CSGMembershipInfo_ExtIEs_tags_65) /sizeof(asn_DEF_S1AP_CSGMembershipInfo_ExtIEs_tags_65[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CSGMembershipInfo_ExtIEs_65, 3, /* Elements count */ &asn_SPC_S1AP_CSGMembershipInfo_ExtIEs_specs_65 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_72 = { sizeof(struct S1AP_E_RABModifyItemBearerModConfExtIEs__extensionValue), offsetof(struct S1AP_E_RABModifyItemBearerModConfExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_E_RABModifyItemBearerModConfExtIEs__extensionValue, present), sizeof(((struct S1AP_E_RABModifyItemBearerModConfExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_72 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_72 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABModifyItemBearerModConfExtIEs_69[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyItemBearerModConfExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_70, &asn_PER_memb_S1AP_id_constr_70, memb_S1AP_id_constraint_69 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyItemBearerModConfExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_71, &asn_PER_memb_S1AP_criticality_constr_71, memb_S1AP_criticality_constraint_69 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyItemBearerModConfExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_72, 0, { &asn_OER_memb_S1AP_extensionValue_constr_72, &asn_PER_memb_S1AP_extensionValue_constr_72, memb_S1AP_extensionValue_constraint_69 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABModifyItemBearerModConfExtIEs_tags_69[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABModifyItemBearerModConfExtIEs_tag2el_69[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModifyItemBearerModConfExtIEs_specs_69 = { sizeof(struct S1AP_E_RABModifyItemBearerModConfExtIEs), offsetof(struct S1AP_E_RABModifyItemBearerModConfExtIEs, _asn_ctx), asn_MAP_S1AP_E_RABModifyItemBearerModConfExtIEs_tag2el_69, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyItemBearerModConfExtIEs = { "E-RABModifyItemBearerModConfExtIEs", "E-RABModifyItemBearerModConfExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABModifyItemBearerModConfExtIEs_tags_69, sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModConfExtIEs_tags_69) /sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModConfExtIEs_tags_69[0]), /* 1 */ asn_DEF_S1AP_E_RABModifyItemBearerModConfExtIEs_tags_69, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModConfExtIEs_tags_69) /sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModConfExtIEs_tags_69[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABModifyItemBearerModConfExtIEs_69, 3, /* Elements count */ &asn_SPC_S1AP_E_RABModifyItemBearerModConfExtIEs_specs_69 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_76 = { sizeof(struct S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs__extensionValue), offsetof(struct S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs__extensionValue, present), sizeof(((struct S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_76 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_76 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs_73[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_74, &asn_PER_memb_S1AP_id_constr_74, memb_S1AP_id_constraint_73 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_75, &asn_PER_memb_S1AP_criticality_constr_75, memb_S1AP_criticality_constraint_73 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_76, 0, { &asn_OER_memb_S1AP_extensionValue_constr_76, &asn_PER_memb_S1AP_extensionValue_constr_76, memb_S1AP_extensionValue_constraint_73 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs_tags_73[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs_tag2el_73[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs_specs_73 = { sizeof(struct S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs), offsetof(struct S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs, _asn_ctx), asn_MAP_S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs_tag2el_73, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs = { "E-RABFailedToResumeItemResumeReq-ExtIEs", "E-RABFailedToResumeItemResumeReq-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs_tags_73, sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs_tags_73) /sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs_tags_73[0]), /* 1 */ asn_DEF_S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs_tags_73, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs_tags_73) /sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs_tags_73[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs_73, 3, /* Elements count */ &asn_SPC_S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs_specs_73 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_80 = { sizeof(struct S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs__extensionValue), offsetof(struct S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs__extensionValue, present), sizeof(((struct S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_80 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_80 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs_77[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_78, &asn_PER_memb_S1AP_id_constr_78, memb_S1AP_id_constraint_77 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_79, &asn_PER_memb_S1AP_criticality_constr_79, memb_S1AP_criticality_constraint_77 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_80, 0, { &asn_OER_memb_S1AP_extensionValue_constr_80, &asn_PER_memb_S1AP_extensionValue_constr_80, memb_S1AP_extensionValue_constraint_77 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs_tags_77[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs_tag2el_77[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs_specs_77 = { sizeof(struct S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs), offsetof(struct S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs, _asn_ctx), asn_MAP_S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs_tag2el_77, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs = { "E-RABFailedToResumeItemResumeRes-ExtIEs", "E-RABFailedToResumeItemResumeRes-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs_tags_77, sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs_tags_77) /sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs_tags_77[0]), /* 1 */ asn_DEF_S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs_tags_77, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs_tags_77) /sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs_tags_77[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs_77, 3, /* Elements count */ &asn_SPC_S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs_specs_77 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_84 = { sizeof(struct S1AP_Additional_GUTI_ExtIEs__extensionValue), offsetof(struct S1AP_Additional_GUTI_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_Additional_GUTI_ExtIEs__extensionValue, present), sizeof(((struct S1AP_Additional_GUTI_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_84 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_84 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_Additional_GUTI_ExtIEs_81[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_Additional_GUTI_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_82, &asn_PER_memb_S1AP_id_constr_82, memb_S1AP_id_constraint_81 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_Additional_GUTI_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_83, &asn_PER_memb_S1AP_criticality_constr_83, memb_S1AP_criticality_constraint_81 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_Additional_GUTI_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_84, 0, { &asn_OER_memb_S1AP_extensionValue_constr_84, &asn_PER_memb_S1AP_extensionValue_constr_84, memb_S1AP_extensionValue_constraint_81 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_Additional_GUTI_ExtIEs_tags_81[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_Additional_GUTI_ExtIEs_tag2el_81[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_Additional_GUTI_ExtIEs_specs_81 = { sizeof(struct S1AP_Additional_GUTI_ExtIEs), offsetof(struct S1AP_Additional_GUTI_ExtIEs, _asn_ctx), asn_MAP_S1AP_Additional_GUTI_ExtIEs_tag2el_81, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_Additional_GUTI_ExtIEs = { "Additional-GUTI-ExtIEs", "Additional-GUTI-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_Additional_GUTI_ExtIEs_tags_81, sizeof(asn_DEF_S1AP_Additional_GUTI_ExtIEs_tags_81) /sizeof(asn_DEF_S1AP_Additional_GUTI_ExtIEs_tags_81[0]), /* 1 */ asn_DEF_S1AP_Additional_GUTI_ExtIEs_tags_81, /* Same as above */ sizeof(asn_DEF_S1AP_Additional_GUTI_ExtIEs_tags_81) /sizeof(asn_DEF_S1AP_Additional_GUTI_ExtIEs_tags_81[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_Additional_GUTI_ExtIEs_81, 3, /* Elements count */ &asn_SPC_S1AP_Additional_GUTI_ExtIEs_specs_81 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_88 = { sizeof(struct S1AP_AllocationAndRetentionPriority_ExtIEs__extensionValue), offsetof(struct S1AP_AllocationAndRetentionPriority_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_AllocationAndRetentionPriority_ExtIEs__extensionValue, present), sizeof(((struct S1AP_AllocationAndRetentionPriority_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_88 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_88 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_AllocationAndRetentionPriority_ExtIEs_85[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_AllocationAndRetentionPriority_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_86, &asn_PER_memb_S1AP_id_constr_86, memb_S1AP_id_constraint_85 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_AllocationAndRetentionPriority_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_87, &asn_PER_memb_S1AP_criticality_constr_87, memb_S1AP_criticality_constraint_85 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_AllocationAndRetentionPriority_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_88, 0, { &asn_OER_memb_S1AP_extensionValue_constr_88, &asn_PER_memb_S1AP_extensionValue_constr_88, memb_S1AP_extensionValue_constraint_85 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_AllocationAndRetentionPriority_ExtIEs_tags_85[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_AllocationAndRetentionPriority_ExtIEs_tag2el_85[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_AllocationAndRetentionPriority_ExtIEs_specs_85 = { sizeof(struct S1AP_AllocationAndRetentionPriority_ExtIEs), offsetof(struct S1AP_AllocationAndRetentionPriority_ExtIEs, _asn_ctx), asn_MAP_S1AP_AllocationAndRetentionPriority_ExtIEs_tag2el_85, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_AllocationAndRetentionPriority_ExtIEs = { "AllocationAndRetentionPriority-ExtIEs", "AllocationAndRetentionPriority-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_AllocationAndRetentionPriority_ExtIEs_tags_85, sizeof(asn_DEF_S1AP_AllocationAndRetentionPriority_ExtIEs_tags_85) /sizeof(asn_DEF_S1AP_AllocationAndRetentionPriority_ExtIEs_tags_85[0]), /* 1 */ asn_DEF_S1AP_AllocationAndRetentionPriority_ExtIEs_tags_85, /* Same as above */ sizeof(asn_DEF_S1AP_AllocationAndRetentionPriority_ExtIEs_tags_85) /sizeof(asn_DEF_S1AP_AllocationAndRetentionPriority_ExtIEs_tags_85[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_AllocationAndRetentionPriority_ExtIEs_85, 3, /* Elements count */ &asn_SPC_S1AP_AllocationAndRetentionPriority_ExtIEs_specs_85 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_92 = { sizeof(struct S1AP_InformationForCECapableUEs_ExtIEs__extensionValue), offsetof(struct S1AP_InformationForCECapableUEs_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_InformationForCECapableUEs_ExtIEs__extensionValue, present), sizeof(((struct S1AP_InformationForCECapableUEs_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_92 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_92 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_InformationForCECapableUEs_ExtIEs_89[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_InformationForCECapableUEs_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_90, &asn_PER_memb_S1AP_id_constr_90, memb_S1AP_id_constraint_89 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InformationForCECapableUEs_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_91, &asn_PER_memb_S1AP_criticality_constr_91, memb_S1AP_criticality_constraint_89 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_InformationForCECapableUEs_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_92, 0, { &asn_OER_memb_S1AP_extensionValue_constr_92, &asn_PER_memb_S1AP_extensionValue_constr_92, memb_S1AP_extensionValue_constraint_89 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_InformationForCECapableUEs_ExtIEs_tags_89[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_InformationForCECapableUEs_ExtIEs_tag2el_89[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_InformationForCECapableUEs_ExtIEs_specs_89 = { sizeof(struct S1AP_InformationForCECapableUEs_ExtIEs), offsetof(struct S1AP_InformationForCECapableUEs_ExtIEs, _asn_ctx), asn_MAP_S1AP_InformationForCECapableUEs_ExtIEs_tag2el_89, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_InformationForCECapableUEs_ExtIEs = { "InformationForCECapableUEs-ExtIEs", "InformationForCECapableUEs-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_InformationForCECapableUEs_ExtIEs_tags_89, sizeof(asn_DEF_S1AP_InformationForCECapableUEs_ExtIEs_tags_89) /sizeof(asn_DEF_S1AP_InformationForCECapableUEs_ExtIEs_tags_89[0]), /* 1 */ asn_DEF_S1AP_InformationForCECapableUEs_ExtIEs_tags_89, /* Same as above */ sizeof(asn_DEF_S1AP_InformationForCECapableUEs_ExtIEs_tags_89) /sizeof(asn_DEF_S1AP_InformationForCECapableUEs_ExtIEs_tags_89[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_InformationForCECapableUEs_ExtIEs_89, 3, /* Elements count */ &asn_SPC_S1AP_InformationForCECapableUEs_ExtIEs_specs_89 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_96 = { sizeof(struct S1AP_AssistanceDataForPaging_ExtIEs__extensionValue), offsetof(struct S1AP_AssistanceDataForPaging_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_AssistanceDataForPaging_ExtIEs__extensionValue, present), sizeof(((struct S1AP_AssistanceDataForPaging_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_96 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_96 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_AssistanceDataForPaging_ExtIEs_93[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_AssistanceDataForPaging_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_94, &asn_PER_memb_S1AP_id_constr_94, memb_S1AP_id_constraint_93 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_AssistanceDataForPaging_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_95, &asn_PER_memb_S1AP_criticality_constr_95, memb_S1AP_criticality_constraint_93 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_AssistanceDataForPaging_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_96, 0, { &asn_OER_memb_S1AP_extensionValue_constr_96, &asn_PER_memb_S1AP_extensionValue_constr_96, memb_S1AP_extensionValue_constraint_93 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_AssistanceDataForPaging_ExtIEs_tags_93[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_AssistanceDataForPaging_ExtIEs_tag2el_93[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_AssistanceDataForPaging_ExtIEs_specs_93 = { sizeof(struct S1AP_AssistanceDataForPaging_ExtIEs), offsetof(struct S1AP_AssistanceDataForPaging_ExtIEs, _asn_ctx), asn_MAP_S1AP_AssistanceDataForPaging_ExtIEs_tag2el_93, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_AssistanceDataForPaging_ExtIEs = { "AssistanceDataForPaging-ExtIEs", "AssistanceDataForPaging-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_AssistanceDataForPaging_ExtIEs_tags_93, sizeof(asn_DEF_S1AP_AssistanceDataForPaging_ExtIEs_tags_93) /sizeof(asn_DEF_S1AP_AssistanceDataForPaging_ExtIEs_tags_93[0]), /* 1 */ asn_DEF_S1AP_AssistanceDataForPaging_ExtIEs_tags_93, /* Same as above */ sizeof(asn_DEF_S1AP_AssistanceDataForPaging_ExtIEs_tags_93) /sizeof(asn_DEF_S1AP_AssistanceDataForPaging_ExtIEs_tags_93[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_AssistanceDataForPaging_ExtIEs_93, 3, /* Elements count */ &asn_SPC_S1AP_AssistanceDataForPaging_ExtIEs_specs_93 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_100 = { sizeof(struct S1AP_AssistanceDataForRecommendedCells_ExtIEs__extensionValue), offsetof(struct S1AP_AssistanceDataForRecommendedCells_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_AssistanceDataForRecommendedCells_ExtIEs__extensionValue, present), sizeof(((struct S1AP_AssistanceDataForRecommendedCells_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_100 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_100 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_AssistanceDataForRecommendedCells_ExtIEs_97[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_AssistanceDataForRecommendedCells_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_98, &asn_PER_memb_S1AP_id_constr_98, memb_S1AP_id_constraint_97 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_AssistanceDataForRecommendedCells_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_99, &asn_PER_memb_S1AP_criticality_constr_99, memb_S1AP_criticality_constraint_97 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_AssistanceDataForRecommendedCells_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_100, 0, { &asn_OER_memb_S1AP_extensionValue_constr_100, &asn_PER_memb_S1AP_extensionValue_constr_100, memb_S1AP_extensionValue_constraint_97 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_AssistanceDataForRecommendedCells_ExtIEs_tags_97[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_AssistanceDataForRecommendedCells_ExtIEs_tag2el_97[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_AssistanceDataForRecommendedCells_ExtIEs_specs_97 = { sizeof(struct S1AP_AssistanceDataForRecommendedCells_ExtIEs), offsetof(struct S1AP_AssistanceDataForRecommendedCells_ExtIEs, _asn_ctx), asn_MAP_S1AP_AssistanceDataForRecommendedCells_ExtIEs_tag2el_97, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_AssistanceDataForRecommendedCells_ExtIEs = { "AssistanceDataForRecommendedCells-ExtIEs", "AssistanceDataForRecommendedCells-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_AssistanceDataForRecommendedCells_ExtIEs_tags_97, sizeof(asn_DEF_S1AP_AssistanceDataForRecommendedCells_ExtIEs_tags_97) /sizeof(asn_DEF_S1AP_AssistanceDataForRecommendedCells_ExtIEs_tags_97[0]), /* 1 */ asn_DEF_S1AP_AssistanceDataForRecommendedCells_ExtIEs_tags_97, /* Same as above */ sizeof(asn_DEF_S1AP_AssistanceDataForRecommendedCells_ExtIEs_tags_97) /sizeof(asn_DEF_S1AP_AssistanceDataForRecommendedCells_ExtIEs_tags_97[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_AssistanceDataForRecommendedCells_ExtIEs_97, 3, /* Elements count */ &asn_SPC_S1AP_AssistanceDataForRecommendedCells_ExtIEs_specs_97 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_extensionValue_104[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs__extensionValue, choice.COUNTValueExtended), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_COUNTValueExtended, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "COUNTValueExtended" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs__extensionValue, choice.ReceiveStatusOfULPDCPSDUsExtended), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_ReceiveStatusOfULPDCPSDUsExtended, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ReceiveStatusOfULPDCPSDUsExtended" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs__extensionValue, choice.COUNTvaluePDCP_SNlength18), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_COUNTvaluePDCP_SNlength18, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "COUNTvaluePDCP-SNlength18" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs__extensionValue, choice.ReceiveStatusOfULPDCPSDUsPDCP_SNlength18), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ReceiveStatusOfULPDCPSDUsPDCP-SNlength18" }, }; static const unsigned asn_MAP_S1AP_extensionValue_to_canonical_104[] = { 1, 3, 0, 2 }; static const unsigned asn_MAP_S1AP_extensionValue_from_canonical_104[] = { 2, 0, 3, 1 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_extensionValue_tag2el_104[] = { { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 1, 0, 1 }, /* ReceiveStatusOfULPDCPSDUsExtended */ { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 3, -1, 0 }, /* ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* COUNTValueExtended */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 0 } /* COUNTvaluePDCP-SNlength18 */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_104 = { sizeof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs__extensionValue), offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs__extensionValue, present), sizeof(((struct S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs__extensionValue *)0)->present), asn_MAP_S1AP_extensionValue_tag2el_104, 4, /* Count of tags in the map */ asn_MAP_S1AP_extensionValue_to_canonical_104, asn_MAP_S1AP_extensionValue_from_canonical_104, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_104 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_extensionValue_104, 4, /* Elements count */ &asn_SPC_S1AP_extensionValue_specs_104 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs_101[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_102, &asn_PER_memb_S1AP_id_constr_102, memb_S1AP_id_constraint_101 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_Bearers_SubjectToStatusTransfer_ItemExtIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_103, &asn_PER_memb_S1AP_criticality_constr_103, memb_S1AP_criticality_constraint_101 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_104, select_Bearers_SubjectToStatusTransfer_ItemExtIEs_S1AP_extensionValue_type, { &asn_OER_memb_S1AP_extensionValue_constr_104, &asn_PER_memb_S1AP_extensionValue_constr_104, memb_S1AP_extensionValue_constraint_101 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs_tags_101[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs_tag2el_101[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs_specs_101 = { sizeof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs), offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs, _asn_ctx), asn_MAP_S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs_tag2el_101, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs = { "Bearers-SubjectToStatusTransfer-ItemExtIEs", "Bearers-SubjectToStatusTransfer-ItemExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs_tags_101, sizeof(asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs_tags_101) /sizeof(asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs_tags_101[0]), /* 1 */ asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs_tags_101, /* Same as above */ sizeof(asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs_tags_101) /sizeof(asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs_tags_101[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs_101, 3, /* Elements count */ &asn_SPC_S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs_specs_101 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_108 = { sizeof(struct S1AP_CancelledCellinEAI_Item_ExtIEs__extensionValue), offsetof(struct S1AP_CancelledCellinEAI_Item_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_CancelledCellinEAI_Item_ExtIEs__extensionValue, present), sizeof(((struct S1AP_CancelledCellinEAI_Item_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_108 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_108 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_CancelledCellinEAI_Item_ExtIEs_105[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CancelledCellinEAI_Item_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_106, &asn_PER_memb_S1AP_id_constr_106, memb_S1AP_id_constraint_105 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CancelledCellinEAI_Item_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_107, &asn_PER_memb_S1AP_criticality_constr_107, memb_S1AP_criticality_constraint_105 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_CancelledCellinEAI_Item_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_108, 0, { &asn_OER_memb_S1AP_extensionValue_constr_108, &asn_PER_memb_S1AP_extensionValue_constr_108, memb_S1AP_extensionValue_constraint_105 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CancelledCellinEAI_Item_ExtIEs_tags_105[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CancelledCellinEAI_Item_ExtIEs_tag2el_105[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CancelledCellinEAI_Item_ExtIEs_specs_105 = { sizeof(struct S1AP_CancelledCellinEAI_Item_ExtIEs), offsetof(struct S1AP_CancelledCellinEAI_Item_ExtIEs, _asn_ctx), asn_MAP_S1AP_CancelledCellinEAI_Item_ExtIEs_tag2el_105, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CancelledCellinEAI_Item_ExtIEs = { "CancelledCellinEAI-Item-ExtIEs", "CancelledCellinEAI-Item-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_CancelledCellinEAI_Item_ExtIEs_tags_105, sizeof(asn_DEF_S1AP_CancelledCellinEAI_Item_ExtIEs_tags_105) /sizeof(asn_DEF_S1AP_CancelledCellinEAI_Item_ExtIEs_tags_105[0]), /* 1 */ asn_DEF_S1AP_CancelledCellinEAI_Item_ExtIEs_tags_105, /* Same as above */ sizeof(asn_DEF_S1AP_CancelledCellinEAI_Item_ExtIEs_tags_105) /sizeof(asn_DEF_S1AP_CancelledCellinEAI_Item_ExtIEs_tags_105[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CancelledCellinEAI_Item_ExtIEs_105, 3, /* Elements count */ &asn_SPC_S1AP_CancelledCellinEAI_Item_ExtIEs_specs_105 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_112 = { sizeof(struct S1AP_CancelledCellinTAI_Item_ExtIEs__extensionValue), offsetof(struct S1AP_CancelledCellinTAI_Item_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_CancelledCellinTAI_Item_ExtIEs__extensionValue, present), sizeof(((struct S1AP_CancelledCellinTAI_Item_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_112 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_112 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_CancelledCellinTAI_Item_ExtIEs_109[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CancelledCellinTAI_Item_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_110, &asn_PER_memb_S1AP_id_constr_110, memb_S1AP_id_constraint_109 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CancelledCellinTAI_Item_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_111, &asn_PER_memb_S1AP_criticality_constr_111, memb_S1AP_criticality_constraint_109 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_CancelledCellinTAI_Item_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_112, 0, { &asn_OER_memb_S1AP_extensionValue_constr_112, &asn_PER_memb_S1AP_extensionValue_constr_112, memb_S1AP_extensionValue_constraint_109 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CancelledCellinTAI_Item_ExtIEs_tags_109[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CancelledCellinTAI_Item_ExtIEs_tag2el_109[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CancelledCellinTAI_Item_ExtIEs_specs_109 = { sizeof(struct S1AP_CancelledCellinTAI_Item_ExtIEs), offsetof(struct S1AP_CancelledCellinTAI_Item_ExtIEs, _asn_ctx), asn_MAP_S1AP_CancelledCellinTAI_Item_ExtIEs_tag2el_109, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CancelledCellinTAI_Item_ExtIEs = { "CancelledCellinTAI-Item-ExtIEs", "CancelledCellinTAI-Item-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_CancelledCellinTAI_Item_ExtIEs_tags_109, sizeof(asn_DEF_S1AP_CancelledCellinTAI_Item_ExtIEs_tags_109) /sizeof(asn_DEF_S1AP_CancelledCellinTAI_Item_ExtIEs_tags_109[0]), /* 1 */ asn_DEF_S1AP_CancelledCellinTAI_Item_ExtIEs_tags_109, /* Same as above */ sizeof(asn_DEF_S1AP_CancelledCellinTAI_Item_ExtIEs_tags_109) /sizeof(asn_DEF_S1AP_CancelledCellinTAI_Item_ExtIEs_tags_109[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CancelledCellinTAI_Item_ExtIEs_109, 3, /* Elements count */ &asn_SPC_S1AP_CancelledCellinTAI_Item_ExtIEs_specs_109 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_116 = { sizeof(struct S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs__extensionValue), offsetof(struct S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs__extensionValue, present), sizeof(((struct S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_116 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_116 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs_113[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_114, &asn_PER_memb_S1AP_id_constr_114, memb_S1AP_id_constraint_113 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_115, &asn_PER_memb_S1AP_criticality_constr_115, memb_S1AP_criticality_constraint_113 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_116, 0, { &asn_OER_memb_S1AP_extensionValue_constr_116, &asn_PER_memb_S1AP_extensionValue_constr_116, memb_S1AP_extensionValue_constraint_113 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs_tags_113[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs_tag2el_113[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs_specs_113 = { sizeof(struct S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs), offsetof(struct S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs, _asn_ctx), asn_MAP_S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs_tag2el_113, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs = { "CellIdentifierAndCELevelForCECapableUEs-ExtIEs", "CellIdentifierAndCELevelForCECapableUEs-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs_tags_113, sizeof(asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs_tags_113) /sizeof(asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs_tags_113[0]), /* 1 */ asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs_tags_113, /* Same as above */ sizeof(asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs_tags_113) /sizeof(asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs_tags_113[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs_113, 3, /* Elements count */ &asn_SPC_S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs_specs_113 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_120 = { sizeof(struct S1AP_CellID_Broadcast_Item_ExtIEs__extensionValue), offsetof(struct S1AP_CellID_Broadcast_Item_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_CellID_Broadcast_Item_ExtIEs__extensionValue, present), sizeof(((struct S1AP_CellID_Broadcast_Item_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_120 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_120 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_CellID_Broadcast_Item_ExtIEs_117[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellID_Broadcast_Item_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_118, &asn_PER_memb_S1AP_id_constr_118, memb_S1AP_id_constraint_117 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellID_Broadcast_Item_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_119, &asn_PER_memb_S1AP_criticality_constr_119, memb_S1AP_criticality_constraint_117 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_CellID_Broadcast_Item_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_120, 0, { &asn_OER_memb_S1AP_extensionValue_constr_120, &asn_PER_memb_S1AP_extensionValue_constr_120, memb_S1AP_extensionValue_constraint_117 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CellID_Broadcast_Item_ExtIEs_tags_117[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CellID_Broadcast_Item_ExtIEs_tag2el_117[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellID_Broadcast_Item_ExtIEs_specs_117 = { sizeof(struct S1AP_CellID_Broadcast_Item_ExtIEs), offsetof(struct S1AP_CellID_Broadcast_Item_ExtIEs, _asn_ctx), asn_MAP_S1AP_CellID_Broadcast_Item_ExtIEs_tag2el_117, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CellID_Broadcast_Item_ExtIEs = { "CellID-Broadcast-Item-ExtIEs", "CellID-Broadcast-Item-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_CellID_Broadcast_Item_ExtIEs_tags_117, sizeof(asn_DEF_S1AP_CellID_Broadcast_Item_ExtIEs_tags_117) /sizeof(asn_DEF_S1AP_CellID_Broadcast_Item_ExtIEs_tags_117[0]), /* 1 */ asn_DEF_S1AP_CellID_Broadcast_Item_ExtIEs_tags_117, /* Same as above */ sizeof(asn_DEF_S1AP_CellID_Broadcast_Item_ExtIEs_tags_117) /sizeof(asn_DEF_S1AP_CellID_Broadcast_Item_ExtIEs_tags_117[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CellID_Broadcast_Item_ExtIEs_117, 3, /* Elements count */ &asn_SPC_S1AP_CellID_Broadcast_Item_ExtIEs_specs_117 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_124 = { sizeof(struct S1AP_CellID_Cancelled_Item_ExtIEs__extensionValue), offsetof(struct S1AP_CellID_Cancelled_Item_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_CellID_Cancelled_Item_ExtIEs__extensionValue, present), sizeof(((struct S1AP_CellID_Cancelled_Item_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_124 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_124 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_CellID_Cancelled_Item_ExtIEs_121[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellID_Cancelled_Item_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_122, &asn_PER_memb_S1AP_id_constr_122, memb_S1AP_id_constraint_121 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellID_Cancelled_Item_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_123, &asn_PER_memb_S1AP_criticality_constr_123, memb_S1AP_criticality_constraint_121 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_CellID_Cancelled_Item_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_124, 0, { &asn_OER_memb_S1AP_extensionValue_constr_124, &asn_PER_memb_S1AP_extensionValue_constr_124, memb_S1AP_extensionValue_constraint_121 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CellID_Cancelled_Item_ExtIEs_tags_121[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CellID_Cancelled_Item_ExtIEs_tag2el_121[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellID_Cancelled_Item_ExtIEs_specs_121 = { sizeof(struct S1AP_CellID_Cancelled_Item_ExtIEs), offsetof(struct S1AP_CellID_Cancelled_Item_ExtIEs, _asn_ctx), asn_MAP_S1AP_CellID_Cancelled_Item_ExtIEs_tag2el_121, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CellID_Cancelled_Item_ExtIEs = { "CellID-Cancelled-Item-ExtIEs", "CellID-Cancelled-Item-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_CellID_Cancelled_Item_ExtIEs_tags_121, sizeof(asn_DEF_S1AP_CellID_Cancelled_Item_ExtIEs_tags_121) /sizeof(asn_DEF_S1AP_CellID_Cancelled_Item_ExtIEs_tags_121[0]), /* 1 */ asn_DEF_S1AP_CellID_Cancelled_Item_ExtIEs_tags_121, /* Same as above */ sizeof(asn_DEF_S1AP_CellID_Cancelled_Item_ExtIEs_tags_121) /sizeof(asn_DEF_S1AP_CellID_Cancelled_Item_ExtIEs_tags_121[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CellID_Cancelled_Item_ExtIEs_121, 3, /* Elements count */ &asn_SPC_S1AP_CellID_Cancelled_Item_ExtIEs_specs_121 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_128 = { sizeof(struct S1AP_CellBasedMDT_ExtIEs__extensionValue), offsetof(struct S1AP_CellBasedMDT_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_CellBasedMDT_ExtIEs__extensionValue, present), sizeof(((struct S1AP_CellBasedMDT_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_128 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_128 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_CellBasedMDT_ExtIEs_125[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellBasedMDT_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_126, &asn_PER_memb_S1AP_id_constr_126, memb_S1AP_id_constraint_125 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellBasedMDT_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_127, &asn_PER_memb_S1AP_criticality_constr_127, memb_S1AP_criticality_constraint_125 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_CellBasedMDT_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_128, 0, { &asn_OER_memb_S1AP_extensionValue_constr_128, &asn_PER_memb_S1AP_extensionValue_constr_128, memb_S1AP_extensionValue_constraint_125 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CellBasedMDT_ExtIEs_tags_125[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CellBasedMDT_ExtIEs_tag2el_125[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellBasedMDT_ExtIEs_specs_125 = { sizeof(struct S1AP_CellBasedMDT_ExtIEs), offsetof(struct S1AP_CellBasedMDT_ExtIEs, _asn_ctx), asn_MAP_S1AP_CellBasedMDT_ExtIEs_tag2el_125, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CellBasedMDT_ExtIEs = { "CellBasedMDT-ExtIEs", "CellBasedMDT-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_CellBasedMDT_ExtIEs_tags_125, sizeof(asn_DEF_S1AP_CellBasedMDT_ExtIEs_tags_125) /sizeof(asn_DEF_S1AP_CellBasedMDT_ExtIEs_tags_125[0]), /* 1 */ asn_DEF_S1AP_CellBasedMDT_ExtIEs_tags_125, /* Same as above */ sizeof(asn_DEF_S1AP_CellBasedMDT_ExtIEs_tags_125) /sizeof(asn_DEF_S1AP_CellBasedMDT_ExtIEs_tags_125[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CellBasedMDT_ExtIEs_125, 3, /* Elements count */ &asn_SPC_S1AP_CellBasedMDT_ExtIEs_specs_125 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_132 = { sizeof(struct S1AP_Cdma2000OneXSRVCCInfo_ExtIEs__extensionValue), offsetof(struct S1AP_Cdma2000OneXSRVCCInfo_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_Cdma2000OneXSRVCCInfo_ExtIEs__extensionValue, present), sizeof(((struct S1AP_Cdma2000OneXSRVCCInfo_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_132 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_132 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_Cdma2000OneXSRVCCInfo_ExtIEs_129[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_Cdma2000OneXSRVCCInfo_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_130, &asn_PER_memb_S1AP_id_constr_130, memb_S1AP_id_constraint_129 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_Cdma2000OneXSRVCCInfo_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_131, &asn_PER_memb_S1AP_criticality_constr_131, memb_S1AP_criticality_constraint_129 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_Cdma2000OneXSRVCCInfo_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_132, 0, { &asn_OER_memb_S1AP_extensionValue_constr_132, &asn_PER_memb_S1AP_extensionValue_constr_132, memb_S1AP_extensionValue_constraint_129 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_Cdma2000OneXSRVCCInfo_ExtIEs_tags_129[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_Cdma2000OneXSRVCCInfo_ExtIEs_tag2el_129[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_Cdma2000OneXSRVCCInfo_ExtIEs_specs_129 = { sizeof(struct S1AP_Cdma2000OneXSRVCCInfo_ExtIEs), offsetof(struct S1AP_Cdma2000OneXSRVCCInfo_ExtIEs, _asn_ctx), asn_MAP_S1AP_Cdma2000OneXSRVCCInfo_ExtIEs_tag2el_129, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_Cdma2000OneXSRVCCInfo_ExtIEs = { "Cdma2000OneXSRVCCInfo-ExtIEs", "Cdma2000OneXSRVCCInfo-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_Cdma2000OneXSRVCCInfo_ExtIEs_tags_129, sizeof(asn_DEF_S1AP_Cdma2000OneXSRVCCInfo_ExtIEs_tags_129) /sizeof(asn_DEF_S1AP_Cdma2000OneXSRVCCInfo_ExtIEs_tags_129[0]), /* 1 */ asn_DEF_S1AP_Cdma2000OneXSRVCCInfo_ExtIEs_tags_129, /* Same as above */ sizeof(asn_DEF_S1AP_Cdma2000OneXSRVCCInfo_ExtIEs_tags_129) /sizeof(asn_DEF_S1AP_Cdma2000OneXSRVCCInfo_ExtIEs_tags_129[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_Cdma2000OneXSRVCCInfo_ExtIEs_129, 3, /* Elements count */ &asn_SPC_S1AP_Cdma2000OneXSRVCCInfo_ExtIEs_specs_129 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_136 = { sizeof(struct S1AP_CellType_ExtIEs__extensionValue), offsetof(struct S1AP_CellType_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_CellType_ExtIEs__extensionValue, present), sizeof(((struct S1AP_CellType_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_136 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_136 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_CellType_ExtIEs_133[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellType_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_134, &asn_PER_memb_S1AP_id_constr_134, memb_S1AP_id_constraint_133 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellType_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_135, &asn_PER_memb_S1AP_criticality_constr_135, memb_S1AP_criticality_constraint_133 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_CellType_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_136, 0, { &asn_OER_memb_S1AP_extensionValue_constr_136, &asn_PER_memb_S1AP_extensionValue_constr_136, memb_S1AP_extensionValue_constraint_133 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CellType_ExtIEs_tags_133[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CellType_ExtIEs_tag2el_133[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellType_ExtIEs_specs_133 = { sizeof(struct S1AP_CellType_ExtIEs), offsetof(struct S1AP_CellType_ExtIEs, _asn_ctx), asn_MAP_S1AP_CellType_ExtIEs_tag2el_133, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CellType_ExtIEs = { "CellType-ExtIEs", "CellType-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_CellType_ExtIEs_tags_133, sizeof(asn_DEF_S1AP_CellType_ExtIEs_tags_133) /sizeof(asn_DEF_S1AP_CellType_ExtIEs_tags_133[0]), /* 1 */ asn_DEF_S1AP_CellType_ExtIEs_tags_133, /* Same as above */ sizeof(asn_DEF_S1AP_CellType_ExtIEs_tags_133) /sizeof(asn_DEF_S1AP_CellType_ExtIEs_tags_133[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CellType_ExtIEs_133, 3, /* Elements count */ &asn_SPC_S1AP_CellType_ExtIEs_specs_133 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_140 = { sizeof(struct S1AP_CGI_ExtIEs__extensionValue), offsetof(struct S1AP_CGI_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_CGI_ExtIEs__extensionValue, present), sizeof(((struct S1AP_CGI_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_140 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_140 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_CGI_ExtIEs_137[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CGI_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_138, &asn_PER_memb_S1AP_id_constr_138, memb_S1AP_id_constraint_137 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CGI_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_139, &asn_PER_memb_S1AP_criticality_constr_139, memb_S1AP_criticality_constraint_137 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_CGI_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_140, 0, { &asn_OER_memb_S1AP_extensionValue_constr_140, &asn_PER_memb_S1AP_extensionValue_constr_140, memb_S1AP_extensionValue_constraint_137 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CGI_ExtIEs_tags_137[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CGI_ExtIEs_tag2el_137[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CGI_ExtIEs_specs_137 = { sizeof(struct S1AP_CGI_ExtIEs), offsetof(struct S1AP_CGI_ExtIEs, _asn_ctx), asn_MAP_S1AP_CGI_ExtIEs_tag2el_137, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CGI_ExtIEs = { "CGI-ExtIEs", "CGI-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_CGI_ExtIEs_tags_137, sizeof(asn_DEF_S1AP_CGI_ExtIEs_tags_137) /sizeof(asn_DEF_S1AP_CGI_ExtIEs_tags_137[0]), /* 1 */ asn_DEF_S1AP_CGI_ExtIEs_tags_137, /* Same as above */ sizeof(asn_DEF_S1AP_CGI_ExtIEs_tags_137) /sizeof(asn_DEF_S1AP_CGI_ExtIEs_tags_137[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CGI_ExtIEs_137, 3, /* Elements count */ &asn_SPC_S1AP_CGI_ExtIEs_specs_137 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_144 = { sizeof(struct S1AP_CSG_IdList_Item_ExtIEs__extensionValue), offsetof(struct S1AP_CSG_IdList_Item_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_CSG_IdList_Item_ExtIEs__extensionValue, present), sizeof(((struct S1AP_CSG_IdList_Item_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_144 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_144 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_CSG_IdList_Item_ExtIEs_141[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CSG_IdList_Item_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_142, &asn_PER_memb_S1AP_id_constr_142, memb_S1AP_id_constraint_141 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CSG_IdList_Item_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_143, &asn_PER_memb_S1AP_criticality_constr_143, memb_S1AP_criticality_constraint_141 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_CSG_IdList_Item_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_144, 0, { &asn_OER_memb_S1AP_extensionValue_constr_144, &asn_PER_memb_S1AP_extensionValue_constr_144, memb_S1AP_extensionValue_constraint_141 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CSG_IdList_Item_ExtIEs_tags_141[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CSG_IdList_Item_ExtIEs_tag2el_141[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CSG_IdList_Item_ExtIEs_specs_141 = { sizeof(struct S1AP_CSG_IdList_Item_ExtIEs), offsetof(struct S1AP_CSG_IdList_Item_ExtIEs, _asn_ctx), asn_MAP_S1AP_CSG_IdList_Item_ExtIEs_tag2el_141, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CSG_IdList_Item_ExtIEs = { "CSG-IdList-Item-ExtIEs", "CSG-IdList-Item-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_CSG_IdList_Item_ExtIEs_tags_141, sizeof(asn_DEF_S1AP_CSG_IdList_Item_ExtIEs_tags_141) /sizeof(asn_DEF_S1AP_CSG_IdList_Item_ExtIEs_tags_141[0]), /* 1 */ asn_DEF_S1AP_CSG_IdList_Item_ExtIEs_tags_141, /* Same as above */ sizeof(asn_DEF_S1AP_CSG_IdList_Item_ExtIEs_tags_141) /sizeof(asn_DEF_S1AP_CSG_IdList_Item_ExtIEs_tags_141[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CSG_IdList_Item_ExtIEs_141, 3, /* Elements count */ &asn_SPC_S1AP_CSG_IdList_Item_ExtIEs_specs_141 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_148 = { sizeof(struct S1AP_COUNTvalue_ExtIEs__extensionValue), offsetof(struct S1AP_COUNTvalue_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_COUNTvalue_ExtIEs__extensionValue, present), sizeof(((struct S1AP_COUNTvalue_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_148 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_148 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_COUNTvalue_ExtIEs_145[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_COUNTvalue_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_146, &asn_PER_memb_S1AP_id_constr_146, memb_S1AP_id_constraint_145 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_COUNTvalue_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_147, &asn_PER_memb_S1AP_criticality_constr_147, memb_S1AP_criticality_constraint_145 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_COUNTvalue_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_148, 0, { &asn_OER_memb_S1AP_extensionValue_constr_148, &asn_PER_memb_S1AP_extensionValue_constr_148, memb_S1AP_extensionValue_constraint_145 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_COUNTvalue_ExtIEs_tags_145[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_COUNTvalue_ExtIEs_tag2el_145[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_COUNTvalue_ExtIEs_specs_145 = { sizeof(struct S1AP_COUNTvalue_ExtIEs), offsetof(struct S1AP_COUNTvalue_ExtIEs, _asn_ctx), asn_MAP_S1AP_COUNTvalue_ExtIEs_tag2el_145, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_COUNTvalue_ExtIEs = { "COUNTvalue-ExtIEs", "COUNTvalue-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_COUNTvalue_ExtIEs_tags_145, sizeof(asn_DEF_S1AP_COUNTvalue_ExtIEs_tags_145) /sizeof(asn_DEF_S1AP_COUNTvalue_ExtIEs_tags_145[0]), /* 1 */ asn_DEF_S1AP_COUNTvalue_ExtIEs_tags_145, /* Same as above */ sizeof(asn_DEF_S1AP_COUNTvalue_ExtIEs_tags_145) /sizeof(asn_DEF_S1AP_COUNTvalue_ExtIEs_tags_145[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_COUNTvalue_ExtIEs_145, 3, /* Elements count */ &asn_SPC_S1AP_COUNTvalue_ExtIEs_specs_145 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_152 = { sizeof(struct S1AP_COUNTValueExtended_ExtIEs__extensionValue), offsetof(struct S1AP_COUNTValueExtended_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_COUNTValueExtended_ExtIEs__extensionValue, present), sizeof(((struct S1AP_COUNTValueExtended_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_152 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_152 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_COUNTValueExtended_ExtIEs_149[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_COUNTValueExtended_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_150, &asn_PER_memb_S1AP_id_constr_150, memb_S1AP_id_constraint_149 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_COUNTValueExtended_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_151, &asn_PER_memb_S1AP_criticality_constr_151, memb_S1AP_criticality_constraint_149 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_COUNTValueExtended_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_152, 0, { &asn_OER_memb_S1AP_extensionValue_constr_152, &asn_PER_memb_S1AP_extensionValue_constr_152, memb_S1AP_extensionValue_constraint_149 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_COUNTValueExtended_ExtIEs_tags_149[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_COUNTValueExtended_ExtIEs_tag2el_149[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_COUNTValueExtended_ExtIEs_specs_149 = { sizeof(struct S1AP_COUNTValueExtended_ExtIEs), offsetof(struct S1AP_COUNTValueExtended_ExtIEs, _asn_ctx), asn_MAP_S1AP_COUNTValueExtended_ExtIEs_tag2el_149, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_COUNTValueExtended_ExtIEs = { "COUNTValueExtended-ExtIEs", "COUNTValueExtended-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_COUNTValueExtended_ExtIEs_tags_149, sizeof(asn_DEF_S1AP_COUNTValueExtended_ExtIEs_tags_149) /sizeof(asn_DEF_S1AP_COUNTValueExtended_ExtIEs_tags_149[0]), /* 1 */ asn_DEF_S1AP_COUNTValueExtended_ExtIEs_tags_149, /* Same as above */ sizeof(asn_DEF_S1AP_COUNTValueExtended_ExtIEs_tags_149) /sizeof(asn_DEF_S1AP_COUNTValueExtended_ExtIEs_tags_149[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_COUNTValueExtended_ExtIEs_149, 3, /* Elements count */ &asn_SPC_S1AP_COUNTValueExtended_ExtIEs_specs_149 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_156 = { sizeof(struct S1AP_COUNTvaluePDCP_SNlength18_ExtIEs__extensionValue), offsetof(struct S1AP_COUNTvaluePDCP_SNlength18_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_COUNTvaluePDCP_SNlength18_ExtIEs__extensionValue, present), sizeof(((struct S1AP_COUNTvaluePDCP_SNlength18_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_156 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_156 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_COUNTvaluePDCP_SNlength18_ExtIEs_153[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_COUNTvaluePDCP_SNlength18_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_154, &asn_PER_memb_S1AP_id_constr_154, memb_S1AP_id_constraint_153 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_COUNTvaluePDCP_SNlength18_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_155, &asn_PER_memb_S1AP_criticality_constr_155, memb_S1AP_criticality_constraint_153 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_COUNTvaluePDCP_SNlength18_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_156, 0, { &asn_OER_memb_S1AP_extensionValue_constr_156, &asn_PER_memb_S1AP_extensionValue_constr_156, memb_S1AP_extensionValue_constraint_153 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_COUNTvaluePDCP_SNlength18_ExtIEs_tags_153[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_COUNTvaluePDCP_SNlength18_ExtIEs_tag2el_153[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_COUNTvaluePDCP_SNlength18_ExtIEs_specs_153 = { sizeof(struct S1AP_COUNTvaluePDCP_SNlength18_ExtIEs), offsetof(struct S1AP_COUNTvaluePDCP_SNlength18_ExtIEs, _asn_ctx), asn_MAP_S1AP_COUNTvaluePDCP_SNlength18_ExtIEs_tag2el_153, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_COUNTvaluePDCP_SNlength18_ExtIEs = { "COUNTvaluePDCP-SNlength18-ExtIEs", "COUNTvaluePDCP-SNlength18-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_COUNTvaluePDCP_SNlength18_ExtIEs_tags_153, sizeof(asn_DEF_S1AP_COUNTvaluePDCP_SNlength18_ExtIEs_tags_153) /sizeof(asn_DEF_S1AP_COUNTvaluePDCP_SNlength18_ExtIEs_tags_153[0]), /* 1 */ asn_DEF_S1AP_COUNTvaluePDCP_SNlength18_ExtIEs_tags_153, /* Same as above */ sizeof(asn_DEF_S1AP_COUNTvaluePDCP_SNlength18_ExtIEs_tags_153) /sizeof(asn_DEF_S1AP_COUNTvaluePDCP_SNlength18_ExtIEs_tags_153[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_COUNTvaluePDCP_SNlength18_ExtIEs_153, 3, /* Elements count */ &asn_SPC_S1AP_COUNTvaluePDCP_SNlength18_ExtIEs_specs_153 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_160 = { sizeof(struct S1AP_CriticalityDiagnostics_ExtIEs__extensionValue), offsetof(struct S1AP_CriticalityDiagnostics_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_CriticalityDiagnostics_ExtIEs__extensionValue, present), sizeof(((struct S1AP_CriticalityDiagnostics_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_160 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_160 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_CriticalityDiagnostics_ExtIEs_157[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CriticalityDiagnostics_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_158, &asn_PER_memb_S1AP_id_constr_158, memb_S1AP_id_constraint_157 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CriticalityDiagnostics_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_159, &asn_PER_memb_S1AP_criticality_constr_159, memb_S1AP_criticality_constraint_157 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_CriticalityDiagnostics_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_160, 0, { &asn_OER_memb_S1AP_extensionValue_constr_160, &asn_PER_memb_S1AP_extensionValue_constr_160, memb_S1AP_extensionValue_constraint_157 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CriticalityDiagnostics_ExtIEs_tags_157[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CriticalityDiagnostics_ExtIEs_tag2el_157[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CriticalityDiagnostics_ExtIEs_specs_157 = { sizeof(struct S1AP_CriticalityDiagnostics_ExtIEs), offsetof(struct S1AP_CriticalityDiagnostics_ExtIEs, _asn_ctx), asn_MAP_S1AP_CriticalityDiagnostics_ExtIEs_tag2el_157, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CriticalityDiagnostics_ExtIEs = { "CriticalityDiagnostics-ExtIEs", "CriticalityDiagnostics-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_CriticalityDiagnostics_ExtIEs_tags_157, sizeof(asn_DEF_S1AP_CriticalityDiagnostics_ExtIEs_tags_157) /sizeof(asn_DEF_S1AP_CriticalityDiagnostics_ExtIEs_tags_157[0]), /* 1 */ asn_DEF_S1AP_CriticalityDiagnostics_ExtIEs_tags_157, /* Same as above */ sizeof(asn_DEF_S1AP_CriticalityDiagnostics_ExtIEs_tags_157) /sizeof(asn_DEF_S1AP_CriticalityDiagnostics_ExtIEs_tags_157[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CriticalityDiagnostics_ExtIEs_157, 3, /* Elements count */ &asn_SPC_S1AP_CriticalityDiagnostics_ExtIEs_specs_157 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_164 = { sizeof(struct S1AP_CriticalityDiagnostics_IE_Item_ExtIEs__extensionValue), offsetof(struct S1AP_CriticalityDiagnostics_IE_Item_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_CriticalityDiagnostics_IE_Item_ExtIEs__extensionValue, present), sizeof(((struct S1AP_CriticalityDiagnostics_IE_Item_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_164 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_164 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_CriticalityDiagnostics_IE_Item_ExtIEs_161[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CriticalityDiagnostics_IE_Item_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_162, &asn_PER_memb_S1AP_id_constr_162, memb_S1AP_id_constraint_161 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CriticalityDiagnostics_IE_Item_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_163, &asn_PER_memb_S1AP_criticality_constr_163, memb_S1AP_criticality_constraint_161 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_CriticalityDiagnostics_IE_Item_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_164, 0, { &asn_OER_memb_S1AP_extensionValue_constr_164, &asn_PER_memb_S1AP_extensionValue_constr_164, memb_S1AP_extensionValue_constraint_161 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CriticalityDiagnostics_IE_Item_ExtIEs_tags_161[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CriticalityDiagnostics_IE_Item_ExtIEs_tag2el_161[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CriticalityDiagnostics_IE_Item_ExtIEs_specs_161 = { sizeof(struct S1AP_CriticalityDiagnostics_IE_Item_ExtIEs), offsetof(struct S1AP_CriticalityDiagnostics_IE_Item_ExtIEs, _asn_ctx), asn_MAP_S1AP_CriticalityDiagnostics_IE_Item_ExtIEs_tag2el_161, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CriticalityDiagnostics_IE_Item_ExtIEs = { "CriticalityDiagnostics-IE-Item-ExtIEs", "CriticalityDiagnostics-IE-Item-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_CriticalityDiagnostics_IE_Item_ExtIEs_tags_161, sizeof(asn_DEF_S1AP_CriticalityDiagnostics_IE_Item_ExtIEs_tags_161) /sizeof(asn_DEF_S1AP_CriticalityDiagnostics_IE_Item_ExtIEs_tags_161[0]), /* 1 */ asn_DEF_S1AP_CriticalityDiagnostics_IE_Item_ExtIEs_tags_161, /* Same as above */ sizeof(asn_DEF_S1AP_CriticalityDiagnostics_IE_Item_ExtIEs_tags_161) /sizeof(asn_DEF_S1AP_CriticalityDiagnostics_IE_Item_ExtIEs_tags_161[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CriticalityDiagnostics_IE_Item_ExtIEs_161, 3, /* Elements count */ &asn_SPC_S1AP_CriticalityDiagnostics_IE_Item_ExtIEs_specs_161 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_168 = { sizeof(struct S1AP_ServedDCNsItem_ExtIEs__extensionValue), offsetof(struct S1AP_ServedDCNsItem_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_ServedDCNsItem_ExtIEs__extensionValue, present), sizeof(((struct S1AP_ServedDCNsItem_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_168 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_168 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ServedDCNsItem_ExtIEs_165[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ServedDCNsItem_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_166, &asn_PER_memb_S1AP_id_constr_166, memb_S1AP_id_constraint_165 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ServedDCNsItem_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_167, &asn_PER_memb_S1AP_criticality_constr_167, memb_S1AP_criticality_constraint_165 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_ServedDCNsItem_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_168, 0, { &asn_OER_memb_S1AP_extensionValue_constr_168, &asn_PER_memb_S1AP_extensionValue_constr_168, memb_S1AP_extensionValue_constraint_165 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ServedDCNsItem_ExtIEs_tags_165[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ServedDCNsItem_ExtIEs_tag2el_165[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ServedDCNsItem_ExtIEs_specs_165 = { sizeof(struct S1AP_ServedDCNsItem_ExtIEs), offsetof(struct S1AP_ServedDCNsItem_ExtIEs, _asn_ctx), asn_MAP_S1AP_ServedDCNsItem_ExtIEs_tag2el_165, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ServedDCNsItem_ExtIEs = { "ServedDCNsItem-ExtIEs", "ServedDCNsItem-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_ServedDCNsItem_ExtIEs_tags_165, sizeof(asn_DEF_S1AP_ServedDCNsItem_ExtIEs_tags_165) /sizeof(asn_DEF_S1AP_ServedDCNsItem_ExtIEs_tags_165[0]), /* 1 */ asn_DEF_S1AP_ServedDCNsItem_ExtIEs_tags_165, /* Same as above */ sizeof(asn_DEF_S1AP_ServedDCNsItem_ExtIEs_tags_165) /sizeof(asn_DEF_S1AP_ServedDCNsItem_ExtIEs_tags_165[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ServedDCNsItem_ExtIEs_165, 3, /* Elements count */ &asn_SPC_S1AP_ServedDCNsItem_ExtIEs_specs_165 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_172 = { sizeof(struct S1AP_DL_CP_SecurityInformation_ExtIEs__extensionValue), offsetof(struct S1AP_DL_CP_SecurityInformation_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_DL_CP_SecurityInformation_ExtIEs__extensionValue, present), sizeof(((struct S1AP_DL_CP_SecurityInformation_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_172 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_172 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_DL_CP_SecurityInformation_ExtIEs_169[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_DL_CP_SecurityInformation_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_170, &asn_PER_memb_S1AP_id_constr_170, memb_S1AP_id_constraint_169 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DL_CP_SecurityInformation_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_171, &asn_PER_memb_S1AP_criticality_constr_171, memb_S1AP_criticality_constraint_169 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_DL_CP_SecurityInformation_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_172, 0, { &asn_OER_memb_S1AP_extensionValue_constr_172, &asn_PER_memb_S1AP_extensionValue_constr_172, memb_S1AP_extensionValue_constraint_169 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_DL_CP_SecurityInformation_ExtIEs_tags_169[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_DL_CP_SecurityInformation_ExtIEs_tag2el_169[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_DL_CP_SecurityInformation_ExtIEs_specs_169 = { sizeof(struct S1AP_DL_CP_SecurityInformation_ExtIEs), offsetof(struct S1AP_DL_CP_SecurityInformation_ExtIEs, _asn_ctx), asn_MAP_S1AP_DL_CP_SecurityInformation_ExtIEs_tag2el_169, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_DL_CP_SecurityInformation_ExtIEs = { "DL-CP-SecurityInformation-ExtIEs", "DL-CP-SecurityInformation-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_DL_CP_SecurityInformation_ExtIEs_tags_169, sizeof(asn_DEF_S1AP_DL_CP_SecurityInformation_ExtIEs_tags_169) /sizeof(asn_DEF_S1AP_DL_CP_SecurityInformation_ExtIEs_tags_169[0]), /* 1 */ asn_DEF_S1AP_DL_CP_SecurityInformation_ExtIEs_tags_169, /* Same as above */ sizeof(asn_DEF_S1AP_DL_CP_SecurityInformation_ExtIEs_tags_169) /sizeof(asn_DEF_S1AP_DL_CP_SecurityInformation_ExtIEs_tags_169[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_DL_CP_SecurityInformation_ExtIEs_169, 3, /* Elements count */ &asn_SPC_S1AP_DL_CP_SecurityInformation_ExtIEs_specs_169 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_176 = { sizeof(struct S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs__extensionValue), offsetof(struct S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs__extensionValue, present), sizeof(((struct S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_176 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_176 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs_173[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_174, &asn_PER_memb_S1AP_id_constr_174, memb_S1AP_id_constraint_173 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_175, &asn_PER_memb_S1AP_criticality_constr_175, memb_S1AP_criticality_constraint_173 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_176, 0, { &asn_OER_memb_S1AP_extensionValue_constr_176, &asn_PER_memb_S1AP_extensionValue_constr_176, memb_S1AP_extensionValue_constraint_173 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs_tags_173[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs_tag2el_173[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs_specs_173 = { sizeof(struct S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs), offsetof(struct S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs, _asn_ctx), asn_MAP_S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs_tag2el_173, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs = { "EmergencyAreaID-Broadcast-Item-ExtIEs", "EmergencyAreaID-Broadcast-Item-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs_tags_173, sizeof(asn_DEF_S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs_tags_173) /sizeof(asn_DEF_S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs_tags_173[0]), /* 1 */ asn_DEF_S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs_tags_173, /* Same as above */ sizeof(asn_DEF_S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs_tags_173) /sizeof(asn_DEF_S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs_tags_173[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs_173, 3, /* Elements count */ &asn_SPC_S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs_specs_173 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_180 = { sizeof(struct S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs__extensionValue), offsetof(struct S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs__extensionValue, present), sizeof(((struct S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_180 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_180 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs_177[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_178, &asn_PER_memb_S1AP_id_constr_178, memb_S1AP_id_constraint_177 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_179, &asn_PER_memb_S1AP_criticality_constr_179, memb_S1AP_criticality_constraint_177 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_180, 0, { &asn_OER_memb_S1AP_extensionValue_constr_180, &asn_PER_memb_S1AP_extensionValue_constr_180, memb_S1AP_extensionValue_constraint_177 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs_tags_177[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs_tag2el_177[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs_specs_177 = { sizeof(struct S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs), offsetof(struct S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs, _asn_ctx), asn_MAP_S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs_tag2el_177, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs = { "EmergencyAreaID-Cancelled-Item-ExtIEs", "EmergencyAreaID-Cancelled-Item-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs_tags_177, sizeof(asn_DEF_S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs_tags_177) /sizeof(asn_DEF_S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs_tags_177[0]), /* 1 */ asn_DEF_S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs_tags_177, /* Same as above */ sizeof(asn_DEF_S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs_tags_177) /sizeof(asn_DEF_S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs_tags_177[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs_177, 3, /* Elements count */ &asn_SPC_S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs_specs_177 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_184 = { sizeof(struct S1AP_CompletedCellinEAI_Item_ExtIEs__extensionValue), offsetof(struct S1AP_CompletedCellinEAI_Item_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_CompletedCellinEAI_Item_ExtIEs__extensionValue, present), sizeof(((struct S1AP_CompletedCellinEAI_Item_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_184 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_184 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_CompletedCellinEAI_Item_ExtIEs_181[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CompletedCellinEAI_Item_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_182, &asn_PER_memb_S1AP_id_constr_182, memb_S1AP_id_constraint_181 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CompletedCellinEAI_Item_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_183, &asn_PER_memb_S1AP_criticality_constr_183, memb_S1AP_criticality_constraint_181 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_CompletedCellinEAI_Item_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_184, 0, { &asn_OER_memb_S1AP_extensionValue_constr_184, &asn_PER_memb_S1AP_extensionValue_constr_184, memb_S1AP_extensionValue_constraint_181 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CompletedCellinEAI_Item_ExtIEs_tags_181[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CompletedCellinEAI_Item_ExtIEs_tag2el_181[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CompletedCellinEAI_Item_ExtIEs_specs_181 = { sizeof(struct S1AP_CompletedCellinEAI_Item_ExtIEs), offsetof(struct S1AP_CompletedCellinEAI_Item_ExtIEs, _asn_ctx), asn_MAP_S1AP_CompletedCellinEAI_Item_ExtIEs_tag2el_181, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CompletedCellinEAI_Item_ExtIEs = { "CompletedCellinEAI-Item-ExtIEs", "CompletedCellinEAI-Item-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_CompletedCellinEAI_Item_ExtIEs_tags_181, sizeof(asn_DEF_S1AP_CompletedCellinEAI_Item_ExtIEs_tags_181) /sizeof(asn_DEF_S1AP_CompletedCellinEAI_Item_ExtIEs_tags_181[0]), /* 1 */ asn_DEF_S1AP_CompletedCellinEAI_Item_ExtIEs_tags_181, /* Same as above */ sizeof(asn_DEF_S1AP_CompletedCellinEAI_Item_ExtIEs_tags_181) /sizeof(asn_DEF_S1AP_CompletedCellinEAI_Item_ExtIEs_tags_181[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CompletedCellinEAI_Item_ExtIEs_181, 3, /* Elements count */ &asn_SPC_S1AP_CompletedCellinEAI_Item_ExtIEs_specs_181 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_188 = { sizeof(struct S1AP_GERAN_Cell_ID_ExtIEs__extensionValue), offsetof(struct S1AP_GERAN_Cell_ID_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_GERAN_Cell_ID_ExtIEs__extensionValue, present), sizeof(((struct S1AP_GERAN_Cell_ID_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_188 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_188 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_GERAN_Cell_ID_ExtIEs_185[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_GERAN_Cell_ID_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_186, &asn_PER_memb_S1AP_id_constr_186, memb_S1AP_id_constraint_185 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_GERAN_Cell_ID_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_187, &asn_PER_memb_S1AP_criticality_constr_187, memb_S1AP_criticality_constraint_185 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_GERAN_Cell_ID_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_188, 0, { &asn_OER_memb_S1AP_extensionValue_constr_188, &asn_PER_memb_S1AP_extensionValue_constr_188, memb_S1AP_extensionValue_constraint_185 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_GERAN_Cell_ID_ExtIEs_tags_185[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_GERAN_Cell_ID_ExtIEs_tag2el_185[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_GERAN_Cell_ID_ExtIEs_specs_185 = { sizeof(struct S1AP_GERAN_Cell_ID_ExtIEs), offsetof(struct S1AP_GERAN_Cell_ID_ExtIEs, _asn_ctx), asn_MAP_S1AP_GERAN_Cell_ID_ExtIEs_tag2el_185, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_GERAN_Cell_ID_ExtIEs = { "GERAN-Cell-ID-ExtIEs", "GERAN-Cell-ID-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_GERAN_Cell_ID_ExtIEs_tags_185, sizeof(asn_DEF_S1AP_GERAN_Cell_ID_ExtIEs_tags_185) /sizeof(asn_DEF_S1AP_GERAN_Cell_ID_ExtIEs_tags_185[0]), /* 1 */ asn_DEF_S1AP_GERAN_Cell_ID_ExtIEs_tags_185, /* Same as above */ sizeof(asn_DEF_S1AP_GERAN_Cell_ID_ExtIEs_tags_185) /sizeof(asn_DEF_S1AP_GERAN_Cell_ID_ExtIEs_tags_185[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_GERAN_Cell_ID_ExtIEs_185, 3, /* Elements count */ &asn_SPC_S1AP_GERAN_Cell_ID_ExtIEs_specs_185 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_192 = { sizeof(struct S1AP_GlobalENB_ID_ExtIEs__extensionValue), offsetof(struct S1AP_GlobalENB_ID_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_GlobalENB_ID_ExtIEs__extensionValue, present), sizeof(((struct S1AP_GlobalENB_ID_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_192 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_192 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_GlobalENB_ID_ExtIEs_189[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_GlobalENB_ID_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_190, &asn_PER_memb_S1AP_id_constr_190, memb_S1AP_id_constraint_189 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_GlobalENB_ID_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_191, &asn_PER_memb_S1AP_criticality_constr_191, memb_S1AP_criticality_constraint_189 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_GlobalENB_ID_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_192, 0, { &asn_OER_memb_S1AP_extensionValue_constr_192, &asn_PER_memb_S1AP_extensionValue_constr_192, memb_S1AP_extensionValue_constraint_189 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_GlobalENB_ID_ExtIEs_tags_189[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_GlobalENB_ID_ExtIEs_tag2el_189[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_GlobalENB_ID_ExtIEs_specs_189 = { sizeof(struct S1AP_GlobalENB_ID_ExtIEs), offsetof(struct S1AP_GlobalENB_ID_ExtIEs, _asn_ctx), asn_MAP_S1AP_GlobalENB_ID_ExtIEs_tag2el_189, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_GlobalENB_ID_ExtIEs = { "GlobalENB-ID-ExtIEs", "GlobalENB-ID-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_GlobalENB_ID_ExtIEs_tags_189, sizeof(asn_DEF_S1AP_GlobalENB_ID_ExtIEs_tags_189) /sizeof(asn_DEF_S1AP_GlobalENB_ID_ExtIEs_tags_189[0]), /* 1 */ asn_DEF_S1AP_GlobalENB_ID_ExtIEs_tags_189, /* Same as above */ sizeof(asn_DEF_S1AP_GlobalENB_ID_ExtIEs_tags_189) /sizeof(asn_DEF_S1AP_GlobalENB_ID_ExtIEs_tags_189[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_GlobalENB_ID_ExtIEs_189, 3, /* Elements count */ &asn_SPC_S1AP_GlobalENB_ID_ExtIEs_specs_189 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_196 = { sizeof(struct S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs__extensionValue), offsetof(struct S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs__extensionValue, present), sizeof(((struct S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_196 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_196 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs_193[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_194, &asn_PER_memb_S1AP_id_constr_194, memb_S1AP_id_constraint_193 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_195, &asn_PER_memb_S1AP_criticality_constr_195, memb_S1AP_criticality_constraint_193 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_196, 0, { &asn_OER_memb_S1AP_extensionValue_constr_196, &asn_PER_memb_S1AP_extensionValue_constr_196, memb_S1AP_extensionValue_constraint_193 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs_tags_193[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs_tag2el_193[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs_specs_193 = { sizeof(struct S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs), offsetof(struct S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs, _asn_ctx), asn_MAP_S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs_tag2el_193, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs = { "ENB-StatusTransfer-TransparentContainer-ExtIEs", "ENB-StatusTransfer-TransparentContainer-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs_tags_193, sizeof(asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs_tags_193) /sizeof(asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs_tags_193[0]), /* 1 */ asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs_tags_193, /* Same as above */ sizeof(asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs_tags_193) /sizeof(asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs_tags_193[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs_193, 3, /* Elements count */ &asn_SPC_S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs_specs_193 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_200 = { sizeof(struct S1AP_E_RABInformationListItem_ExtIEs__extensionValue), offsetof(struct S1AP_E_RABInformationListItem_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_E_RABInformationListItem_ExtIEs__extensionValue, present), sizeof(((struct S1AP_E_RABInformationListItem_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_200 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_200 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABInformationListItem_ExtIEs_197[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABInformationListItem_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_198, &asn_PER_memb_S1AP_id_constr_198, memb_S1AP_id_constraint_197 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABInformationListItem_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_199, &asn_PER_memb_S1AP_criticality_constr_199, memb_S1AP_criticality_constraint_197 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABInformationListItem_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_200, 0, { &asn_OER_memb_S1AP_extensionValue_constr_200, &asn_PER_memb_S1AP_extensionValue_constr_200, memb_S1AP_extensionValue_constraint_197 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABInformationListItem_ExtIEs_tags_197[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABInformationListItem_ExtIEs_tag2el_197[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABInformationListItem_ExtIEs_specs_197 = { sizeof(struct S1AP_E_RABInformationListItem_ExtIEs), offsetof(struct S1AP_E_RABInformationListItem_ExtIEs, _asn_ctx), asn_MAP_S1AP_E_RABInformationListItem_ExtIEs_tag2el_197, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABInformationListItem_ExtIEs = { "E-RABInformationListItem-ExtIEs", "E-RABInformationListItem-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABInformationListItem_ExtIEs_tags_197, sizeof(asn_DEF_S1AP_E_RABInformationListItem_ExtIEs_tags_197) /sizeof(asn_DEF_S1AP_E_RABInformationListItem_ExtIEs_tags_197[0]), /* 1 */ asn_DEF_S1AP_E_RABInformationListItem_ExtIEs_tags_197, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABInformationListItem_ExtIEs_tags_197) /sizeof(asn_DEF_S1AP_E_RABInformationListItem_ExtIEs_tags_197[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABInformationListItem_ExtIEs_197, 3, /* Elements count */ &asn_SPC_S1AP_E_RABInformationListItem_ExtIEs_specs_197 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_204 = { sizeof(struct S1AP_E_RABItem_ExtIEs__extensionValue), offsetof(struct S1AP_E_RABItem_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_E_RABItem_ExtIEs__extensionValue, present), sizeof(((struct S1AP_E_RABItem_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_204 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_204 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABItem_ExtIEs_201[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABItem_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_202, &asn_PER_memb_S1AP_id_constr_202, memb_S1AP_id_constraint_201 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABItem_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_203, &asn_PER_memb_S1AP_criticality_constr_203, memb_S1AP_criticality_constraint_201 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABItem_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_204, 0, { &asn_OER_memb_S1AP_extensionValue_constr_204, &asn_PER_memb_S1AP_extensionValue_constr_204, memb_S1AP_extensionValue_constraint_201 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABItem_ExtIEs_tags_201[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABItem_ExtIEs_tag2el_201[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABItem_ExtIEs_specs_201 = { sizeof(struct S1AP_E_RABItem_ExtIEs), offsetof(struct S1AP_E_RABItem_ExtIEs, _asn_ctx), asn_MAP_S1AP_E_RABItem_ExtIEs_tag2el_201, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABItem_ExtIEs = { "E-RABItem-ExtIEs", "E-RABItem-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABItem_ExtIEs_tags_201, sizeof(asn_DEF_S1AP_E_RABItem_ExtIEs_tags_201) /sizeof(asn_DEF_S1AP_E_RABItem_ExtIEs_tags_201[0]), /* 1 */ asn_DEF_S1AP_E_RABItem_ExtIEs_tags_201, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABItem_ExtIEs_tags_201) /sizeof(asn_DEF_S1AP_E_RABItem_ExtIEs_tags_201[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABItem_ExtIEs_201, 3, /* Elements count */ &asn_SPC_S1AP_E_RABItem_ExtIEs_specs_201 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_208 = { sizeof(struct S1AP_E_RABQoSParameters_ExtIEs__extensionValue), offsetof(struct S1AP_E_RABQoSParameters_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_E_RABQoSParameters_ExtIEs__extensionValue, present), sizeof(((struct S1AP_E_RABQoSParameters_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_208 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_208 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABQoSParameters_ExtIEs_205[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABQoSParameters_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_206, &asn_PER_memb_S1AP_id_constr_206, memb_S1AP_id_constraint_205 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABQoSParameters_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_207, &asn_PER_memb_S1AP_criticality_constr_207, memb_S1AP_criticality_constraint_205 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABQoSParameters_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_208, 0, { &asn_OER_memb_S1AP_extensionValue_constr_208, &asn_PER_memb_S1AP_extensionValue_constr_208, memb_S1AP_extensionValue_constraint_205 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABQoSParameters_ExtIEs_tags_205[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABQoSParameters_ExtIEs_tag2el_205[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABQoSParameters_ExtIEs_specs_205 = { sizeof(struct S1AP_E_RABQoSParameters_ExtIEs), offsetof(struct S1AP_E_RABQoSParameters_ExtIEs, _asn_ctx), asn_MAP_S1AP_E_RABQoSParameters_ExtIEs_tag2el_205, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABQoSParameters_ExtIEs = { "E-RABQoSParameters-ExtIEs", "E-RABQoSParameters-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABQoSParameters_ExtIEs_tags_205, sizeof(asn_DEF_S1AP_E_RABQoSParameters_ExtIEs_tags_205) /sizeof(asn_DEF_S1AP_E_RABQoSParameters_ExtIEs_tags_205[0]), /* 1 */ asn_DEF_S1AP_E_RABQoSParameters_ExtIEs_tags_205, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABQoSParameters_ExtIEs_tags_205) /sizeof(asn_DEF_S1AP_E_RABQoSParameters_ExtIEs_tags_205[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABQoSParameters_ExtIEs_205, 3, /* Elements count */ &asn_SPC_S1AP_E_RABQoSParameters_ExtIEs_specs_205 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_212 = { sizeof(struct S1AP_EUTRAN_CGI_ExtIEs__extensionValue), offsetof(struct S1AP_EUTRAN_CGI_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_EUTRAN_CGI_ExtIEs__extensionValue, present), sizeof(((struct S1AP_EUTRAN_CGI_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_212 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_212 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_EUTRAN_CGI_ExtIEs_209[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_EUTRAN_CGI_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_210, &asn_PER_memb_S1AP_id_constr_210, memb_S1AP_id_constraint_209 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_EUTRAN_CGI_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_211, &asn_PER_memb_S1AP_criticality_constr_211, memb_S1AP_criticality_constraint_209 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_EUTRAN_CGI_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_212, 0, { &asn_OER_memb_S1AP_extensionValue_constr_212, &asn_PER_memb_S1AP_extensionValue_constr_212, memb_S1AP_extensionValue_constraint_209 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_EUTRAN_CGI_ExtIEs_tags_209[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_EUTRAN_CGI_ExtIEs_tag2el_209[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_EUTRAN_CGI_ExtIEs_specs_209 = { sizeof(struct S1AP_EUTRAN_CGI_ExtIEs), offsetof(struct S1AP_EUTRAN_CGI_ExtIEs, _asn_ctx), asn_MAP_S1AP_EUTRAN_CGI_ExtIEs_tag2el_209, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_EUTRAN_CGI_ExtIEs = { "EUTRAN-CGI-ExtIEs", "EUTRAN-CGI-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_EUTRAN_CGI_ExtIEs_tags_209, sizeof(asn_DEF_S1AP_EUTRAN_CGI_ExtIEs_tags_209) /sizeof(asn_DEF_S1AP_EUTRAN_CGI_ExtIEs_tags_209[0]), /* 1 */ asn_DEF_S1AP_EUTRAN_CGI_ExtIEs_tags_209, /* Same as above */ sizeof(asn_DEF_S1AP_EUTRAN_CGI_ExtIEs_tags_209) /sizeof(asn_DEF_S1AP_EUTRAN_CGI_ExtIEs_tags_209[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_EUTRAN_CGI_ExtIEs_209, 3, /* Elements count */ &asn_SPC_S1AP_EUTRAN_CGI_ExtIEs_specs_209 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_216 = { sizeof(struct S1AP_ExpectedUEBehaviour_ExtIEs__extensionValue), offsetof(struct S1AP_ExpectedUEBehaviour_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_ExpectedUEBehaviour_ExtIEs__extensionValue, present), sizeof(((struct S1AP_ExpectedUEBehaviour_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_216 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_216 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ExpectedUEBehaviour_ExtIEs_213[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ExpectedUEBehaviour_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_214, &asn_PER_memb_S1AP_id_constr_214, memb_S1AP_id_constraint_213 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ExpectedUEBehaviour_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_215, &asn_PER_memb_S1AP_criticality_constr_215, memb_S1AP_criticality_constraint_213 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_ExpectedUEBehaviour_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_216, 0, { &asn_OER_memb_S1AP_extensionValue_constr_216, &asn_PER_memb_S1AP_extensionValue_constr_216, memb_S1AP_extensionValue_constraint_213 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ExpectedUEBehaviour_ExtIEs_tags_213[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ExpectedUEBehaviour_ExtIEs_tag2el_213[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ExpectedUEBehaviour_ExtIEs_specs_213 = { sizeof(struct S1AP_ExpectedUEBehaviour_ExtIEs), offsetof(struct S1AP_ExpectedUEBehaviour_ExtIEs, _asn_ctx), asn_MAP_S1AP_ExpectedUEBehaviour_ExtIEs_tag2el_213, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ExpectedUEBehaviour_ExtIEs = { "ExpectedUEBehaviour-ExtIEs", "ExpectedUEBehaviour-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_ExpectedUEBehaviour_ExtIEs_tags_213, sizeof(asn_DEF_S1AP_ExpectedUEBehaviour_ExtIEs_tags_213) /sizeof(asn_DEF_S1AP_ExpectedUEBehaviour_ExtIEs_tags_213[0]), /* 1 */ asn_DEF_S1AP_ExpectedUEBehaviour_ExtIEs_tags_213, /* Same as above */ sizeof(asn_DEF_S1AP_ExpectedUEBehaviour_ExtIEs_tags_213) /sizeof(asn_DEF_S1AP_ExpectedUEBehaviour_ExtIEs_tags_213[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ExpectedUEBehaviour_ExtIEs_213, 3, /* Elements count */ &asn_SPC_S1AP_ExpectedUEBehaviour_ExtIEs_specs_213 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_220 = { sizeof(struct S1AP_ExpectedUEActivityBehaviour_ExtIEs__extensionValue), offsetof(struct S1AP_ExpectedUEActivityBehaviour_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_ExpectedUEActivityBehaviour_ExtIEs__extensionValue, present), sizeof(((struct S1AP_ExpectedUEActivityBehaviour_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_220 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_220 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ExpectedUEActivityBehaviour_ExtIEs_217[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ExpectedUEActivityBehaviour_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_218, &asn_PER_memb_S1AP_id_constr_218, memb_S1AP_id_constraint_217 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ExpectedUEActivityBehaviour_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_219, &asn_PER_memb_S1AP_criticality_constr_219, memb_S1AP_criticality_constraint_217 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_ExpectedUEActivityBehaviour_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_220, 0, { &asn_OER_memb_S1AP_extensionValue_constr_220, &asn_PER_memb_S1AP_extensionValue_constr_220, memb_S1AP_extensionValue_constraint_217 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ExpectedUEActivityBehaviour_ExtIEs_tags_217[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ExpectedUEActivityBehaviour_ExtIEs_tag2el_217[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ExpectedUEActivityBehaviour_ExtIEs_specs_217 = { sizeof(struct S1AP_ExpectedUEActivityBehaviour_ExtIEs), offsetof(struct S1AP_ExpectedUEActivityBehaviour_ExtIEs, _asn_ctx), asn_MAP_S1AP_ExpectedUEActivityBehaviour_ExtIEs_tag2el_217, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ExpectedUEActivityBehaviour_ExtIEs = { "ExpectedUEActivityBehaviour-ExtIEs", "ExpectedUEActivityBehaviour-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_ExpectedUEActivityBehaviour_ExtIEs_tags_217, sizeof(asn_DEF_S1AP_ExpectedUEActivityBehaviour_ExtIEs_tags_217) /sizeof(asn_DEF_S1AP_ExpectedUEActivityBehaviour_ExtIEs_tags_217[0]), /* 1 */ asn_DEF_S1AP_ExpectedUEActivityBehaviour_ExtIEs_tags_217, /* Same as above */ sizeof(asn_DEF_S1AP_ExpectedUEActivityBehaviour_ExtIEs_tags_217) /sizeof(asn_DEF_S1AP_ExpectedUEActivityBehaviour_ExtIEs_tags_217[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ExpectedUEActivityBehaviour_ExtIEs_217, 3, /* Elements count */ &asn_SPC_S1AP_ExpectedUEActivityBehaviour_ExtIEs_specs_217 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_224 = { sizeof(struct S1AP_ForbiddenTAs_Item_ExtIEs__extensionValue), offsetof(struct S1AP_ForbiddenTAs_Item_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_ForbiddenTAs_Item_ExtIEs__extensionValue, present), sizeof(((struct S1AP_ForbiddenTAs_Item_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_224 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_224 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ForbiddenTAs_Item_ExtIEs_221[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ForbiddenTAs_Item_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_222, &asn_PER_memb_S1AP_id_constr_222, memb_S1AP_id_constraint_221 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ForbiddenTAs_Item_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_223, &asn_PER_memb_S1AP_criticality_constr_223, memb_S1AP_criticality_constraint_221 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_ForbiddenTAs_Item_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_224, 0, { &asn_OER_memb_S1AP_extensionValue_constr_224, &asn_PER_memb_S1AP_extensionValue_constr_224, memb_S1AP_extensionValue_constraint_221 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ForbiddenTAs_Item_ExtIEs_tags_221[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ForbiddenTAs_Item_ExtIEs_tag2el_221[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ForbiddenTAs_Item_ExtIEs_specs_221 = { sizeof(struct S1AP_ForbiddenTAs_Item_ExtIEs), offsetof(struct S1AP_ForbiddenTAs_Item_ExtIEs, _asn_ctx), asn_MAP_S1AP_ForbiddenTAs_Item_ExtIEs_tag2el_221, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ForbiddenTAs_Item_ExtIEs = { "ForbiddenTAs-Item-ExtIEs", "ForbiddenTAs-Item-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_ForbiddenTAs_Item_ExtIEs_tags_221, sizeof(asn_DEF_S1AP_ForbiddenTAs_Item_ExtIEs_tags_221) /sizeof(asn_DEF_S1AP_ForbiddenTAs_Item_ExtIEs_tags_221[0]), /* 1 */ asn_DEF_S1AP_ForbiddenTAs_Item_ExtIEs_tags_221, /* Same as above */ sizeof(asn_DEF_S1AP_ForbiddenTAs_Item_ExtIEs_tags_221) /sizeof(asn_DEF_S1AP_ForbiddenTAs_Item_ExtIEs_tags_221[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ForbiddenTAs_Item_ExtIEs_221, 3, /* Elements count */ &asn_SPC_S1AP_ForbiddenTAs_Item_ExtIEs_specs_221 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_228 = { sizeof(struct S1AP_ForbiddenLAs_Item_ExtIEs__extensionValue), offsetof(struct S1AP_ForbiddenLAs_Item_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_ForbiddenLAs_Item_ExtIEs__extensionValue, present), sizeof(((struct S1AP_ForbiddenLAs_Item_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_228 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_228 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ForbiddenLAs_Item_ExtIEs_225[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ForbiddenLAs_Item_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_226, &asn_PER_memb_S1AP_id_constr_226, memb_S1AP_id_constraint_225 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ForbiddenLAs_Item_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_227, &asn_PER_memb_S1AP_criticality_constr_227, memb_S1AP_criticality_constraint_225 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_ForbiddenLAs_Item_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_228, 0, { &asn_OER_memb_S1AP_extensionValue_constr_228, &asn_PER_memb_S1AP_extensionValue_constr_228, memb_S1AP_extensionValue_constraint_225 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ForbiddenLAs_Item_ExtIEs_tags_225[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ForbiddenLAs_Item_ExtIEs_tag2el_225[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ForbiddenLAs_Item_ExtIEs_specs_225 = { sizeof(struct S1AP_ForbiddenLAs_Item_ExtIEs), offsetof(struct S1AP_ForbiddenLAs_Item_ExtIEs, _asn_ctx), asn_MAP_S1AP_ForbiddenLAs_Item_ExtIEs_tag2el_225, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ForbiddenLAs_Item_ExtIEs = { "ForbiddenLAs-Item-ExtIEs", "ForbiddenLAs-Item-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_ForbiddenLAs_Item_ExtIEs_tags_225, sizeof(asn_DEF_S1AP_ForbiddenLAs_Item_ExtIEs_tags_225) /sizeof(asn_DEF_S1AP_ForbiddenLAs_Item_ExtIEs_tags_225[0]), /* 1 */ asn_DEF_S1AP_ForbiddenLAs_Item_ExtIEs_tags_225, /* Same as above */ sizeof(asn_DEF_S1AP_ForbiddenLAs_Item_ExtIEs_tags_225) /sizeof(asn_DEF_S1AP_ForbiddenLAs_Item_ExtIEs_tags_225[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ForbiddenLAs_Item_ExtIEs_225, 3, /* Elements count */ &asn_SPC_S1AP_ForbiddenLAs_Item_ExtIEs_specs_225 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_232 = { sizeof(struct S1AP_GBR_QosInformation_ExtIEs__extensionValue), offsetof(struct S1AP_GBR_QosInformation_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_GBR_QosInformation_ExtIEs__extensionValue, present), sizeof(((struct S1AP_GBR_QosInformation_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_232 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_232 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_GBR_QosInformation_ExtIEs_229[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_GBR_QosInformation_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_230, &asn_PER_memb_S1AP_id_constr_230, memb_S1AP_id_constraint_229 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_GBR_QosInformation_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_231, &asn_PER_memb_S1AP_criticality_constr_231, memb_S1AP_criticality_constraint_229 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_GBR_QosInformation_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_232, 0, { &asn_OER_memb_S1AP_extensionValue_constr_232, &asn_PER_memb_S1AP_extensionValue_constr_232, memb_S1AP_extensionValue_constraint_229 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_GBR_QosInformation_ExtIEs_tags_229[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_GBR_QosInformation_ExtIEs_tag2el_229[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_GBR_QosInformation_ExtIEs_specs_229 = { sizeof(struct S1AP_GBR_QosInformation_ExtIEs), offsetof(struct S1AP_GBR_QosInformation_ExtIEs, _asn_ctx), asn_MAP_S1AP_GBR_QosInformation_ExtIEs_tag2el_229, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_GBR_QosInformation_ExtIEs = { "GBR-QosInformation-ExtIEs", "GBR-QosInformation-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_GBR_QosInformation_ExtIEs_tags_229, sizeof(asn_DEF_S1AP_GBR_QosInformation_ExtIEs_tags_229) /sizeof(asn_DEF_S1AP_GBR_QosInformation_ExtIEs_tags_229[0]), /* 1 */ asn_DEF_S1AP_GBR_QosInformation_ExtIEs_tags_229, /* Same as above */ sizeof(asn_DEF_S1AP_GBR_QosInformation_ExtIEs_tags_229) /sizeof(asn_DEF_S1AP_GBR_QosInformation_ExtIEs_tags_229[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_GBR_QosInformation_ExtIEs_229, 3, /* Elements count */ &asn_SPC_S1AP_GBR_QosInformation_ExtIEs_specs_229 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_236 = { sizeof(struct S1AP_GUMMEI_ExtIEs__extensionValue), offsetof(struct S1AP_GUMMEI_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_GUMMEI_ExtIEs__extensionValue, present), sizeof(((struct S1AP_GUMMEI_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_236 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_236 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_GUMMEI_ExtIEs_233[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_GUMMEI_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_234, &asn_PER_memb_S1AP_id_constr_234, memb_S1AP_id_constraint_233 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_GUMMEI_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_235, &asn_PER_memb_S1AP_criticality_constr_235, memb_S1AP_criticality_constraint_233 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_GUMMEI_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_236, 0, { &asn_OER_memb_S1AP_extensionValue_constr_236, &asn_PER_memb_S1AP_extensionValue_constr_236, memb_S1AP_extensionValue_constraint_233 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_GUMMEI_ExtIEs_tags_233[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_GUMMEI_ExtIEs_tag2el_233[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_GUMMEI_ExtIEs_specs_233 = { sizeof(struct S1AP_GUMMEI_ExtIEs), offsetof(struct S1AP_GUMMEI_ExtIEs, _asn_ctx), asn_MAP_S1AP_GUMMEI_ExtIEs_tag2el_233, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_GUMMEI_ExtIEs = { "GUMMEI-ExtIEs", "GUMMEI-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_GUMMEI_ExtIEs_tags_233, sizeof(asn_DEF_S1AP_GUMMEI_ExtIEs_tags_233) /sizeof(asn_DEF_S1AP_GUMMEI_ExtIEs_tags_233[0]), /* 1 */ asn_DEF_S1AP_GUMMEI_ExtIEs_tags_233, /* Same as above */ sizeof(asn_DEF_S1AP_GUMMEI_ExtIEs_tags_233) /sizeof(asn_DEF_S1AP_GUMMEI_ExtIEs_tags_233[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_GUMMEI_ExtIEs_233, 3, /* Elements count */ &asn_SPC_S1AP_GUMMEI_ExtIEs_specs_233 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_240 = { sizeof(struct S1AP_HandoverRestrictionList_ExtIEs__extensionValue), offsetof(struct S1AP_HandoverRestrictionList_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_HandoverRestrictionList_ExtIEs__extensionValue, present), sizeof(((struct S1AP_HandoverRestrictionList_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_240 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_240 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_HandoverRestrictionList_ExtIEs_237[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRestrictionList_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_238, &asn_PER_memb_S1AP_id_constr_238, memb_S1AP_id_constraint_237 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRestrictionList_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_239, &asn_PER_memb_S1AP_criticality_constr_239, memb_S1AP_criticality_constraint_237 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRestrictionList_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_240, 0, { &asn_OER_memb_S1AP_extensionValue_constr_240, &asn_PER_memb_S1AP_extensionValue_constr_240, memb_S1AP_extensionValue_constraint_237 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_HandoverRestrictionList_ExtIEs_tags_237[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_HandoverRestrictionList_ExtIEs_tag2el_237[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverRestrictionList_ExtIEs_specs_237 = { sizeof(struct S1AP_HandoverRestrictionList_ExtIEs), offsetof(struct S1AP_HandoverRestrictionList_ExtIEs, _asn_ctx), asn_MAP_S1AP_HandoverRestrictionList_ExtIEs_tag2el_237, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverRestrictionList_ExtIEs = { "HandoverRestrictionList-ExtIEs", "HandoverRestrictionList-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_HandoverRestrictionList_ExtIEs_tags_237, sizeof(asn_DEF_S1AP_HandoverRestrictionList_ExtIEs_tags_237) /sizeof(asn_DEF_S1AP_HandoverRestrictionList_ExtIEs_tags_237[0]), /* 1 */ asn_DEF_S1AP_HandoverRestrictionList_ExtIEs_tags_237, /* Same as above */ sizeof(asn_DEF_S1AP_HandoverRestrictionList_ExtIEs_tags_237) /sizeof(asn_DEF_S1AP_HandoverRestrictionList_ExtIEs_tags_237[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_HandoverRestrictionList_ExtIEs_237, 3, /* Elements count */ &asn_SPC_S1AP_HandoverRestrictionList_ExtIEs_specs_237 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_extensionValue_244[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ImmediateMDT_ExtIEs__extensionValue, choice.M3Configuration), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_M3Configuration, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "M3Configuration" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ImmediateMDT_ExtIEs__extensionValue, choice.M4Configuration), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_M4Configuration, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "M4Configuration" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ImmediateMDT_ExtIEs__extensionValue, choice.M5Configuration), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_M5Configuration, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "M5Configuration" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ImmediateMDT_ExtIEs__extensionValue, choice.MDT_Location_Info), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_MDT_Location_Info, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MDT-Location-Info" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ImmediateMDT_ExtIEs__extensionValue, choice.M6Configuration), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_M6Configuration, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "M6Configuration" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ImmediateMDT_ExtIEs__extensionValue, choice.M7Configuration), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_M7Configuration, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "M7Configuration" }, }; static const unsigned asn_MAP_S1AP_extensionValue_to_canonical_244[] = { 3, 0, 1, 2, 4, 5 }; static const unsigned asn_MAP_S1AP_extensionValue_from_canonical_244[] = { 1, 2, 3, 0, 4, 5 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_extensionValue_tag2el_244[] = { { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 3, 0, 0 }, /* MDT-Location-Info */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 4 }, /* M3Configuration */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 3 }, /* M4Configuration */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 2 }, /* M5Configuration */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -3, 1 }, /* M6Configuration */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -4, 0 } /* M7Configuration */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_244 = { sizeof(struct S1AP_ImmediateMDT_ExtIEs__extensionValue), offsetof(struct S1AP_ImmediateMDT_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_ImmediateMDT_ExtIEs__extensionValue, present), sizeof(((struct S1AP_ImmediateMDT_ExtIEs__extensionValue *)0)->present), asn_MAP_S1AP_extensionValue_tag2el_244, 6, /* Count of tags in the map */ asn_MAP_S1AP_extensionValue_to_canonical_244, asn_MAP_S1AP_extensionValue_from_canonical_244, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_244 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_extensionValue_244, 6, /* Elements count */ &asn_SPC_S1AP_extensionValue_specs_244 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ImmediateMDT_ExtIEs_241[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ImmediateMDT_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_242, &asn_PER_memb_S1AP_id_constr_242, memb_S1AP_id_constraint_241 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ImmediateMDT_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_ImmediateMDT_ExtIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_243, &asn_PER_memb_S1AP_criticality_constr_243, memb_S1AP_criticality_constraint_241 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_ImmediateMDT_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_244, select_ImmediateMDT_ExtIEs_S1AP_extensionValue_type, { &asn_OER_memb_S1AP_extensionValue_constr_244, &asn_PER_memb_S1AP_extensionValue_constr_244, memb_S1AP_extensionValue_constraint_241 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ImmediateMDT_ExtIEs_tags_241[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ImmediateMDT_ExtIEs_tag2el_241[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ImmediateMDT_ExtIEs_specs_241 = { sizeof(struct S1AP_ImmediateMDT_ExtIEs), offsetof(struct S1AP_ImmediateMDT_ExtIEs, _asn_ctx), asn_MAP_S1AP_ImmediateMDT_ExtIEs_tag2el_241, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ImmediateMDT_ExtIEs = { "ImmediateMDT-ExtIEs", "ImmediateMDT-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_ImmediateMDT_ExtIEs_tags_241, sizeof(asn_DEF_S1AP_ImmediateMDT_ExtIEs_tags_241) /sizeof(asn_DEF_S1AP_ImmediateMDT_ExtIEs_tags_241[0]), /* 1 */ asn_DEF_S1AP_ImmediateMDT_ExtIEs_tags_241, /* Same as above */ sizeof(asn_DEF_S1AP_ImmediateMDT_ExtIEs_tags_241) /sizeof(asn_DEF_S1AP_ImmediateMDT_ExtIEs_tags_241[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ImmediateMDT_ExtIEs_241, 3, /* Elements count */ &asn_SPC_S1AP_ImmediateMDT_ExtIEs_specs_241 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_248 = { sizeof(struct S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs__extensionValue), offsetof(struct S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs__extensionValue, present), sizeof(((struct S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_248 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_248 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs_245[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_246, &asn_PER_memb_S1AP_id_constr_246, memb_S1AP_id_constraint_245 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_247, &asn_PER_memb_S1AP_criticality_constr_247, memb_S1AP_criticality_constraint_245 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_248, 0, { &asn_OER_memb_S1AP_extensionValue_constr_248, &asn_PER_memb_S1AP_extensionValue_constr_248, memb_S1AP_extensionValue_constraint_245 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs_tags_245[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs_tag2el_245[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs_specs_245 = { sizeof(struct S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs), offsetof(struct S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs, _asn_ctx), asn_MAP_S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs_tag2el_245, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs = { "InformationOnRecommendedCellsAndENBsForPaging-ExtIEs", "InformationOnRecommendedCellsAndENBsForPaging-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs_tags_245, sizeof(asn_DEF_S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs_tags_245) /sizeof(asn_DEF_S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs_tags_245[0]), /* 1 */ asn_DEF_S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs_tags_245, /* Same as above */ sizeof(asn_DEF_S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs_tags_245) /sizeof(asn_DEF_S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs_tags_245[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs_245, 3, /* Elements count */ &asn_SPC_S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs_specs_245 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_252 = { sizeof(struct S1AP_LAI_ExtIEs__extensionValue), offsetof(struct S1AP_LAI_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_LAI_ExtIEs__extensionValue, present), sizeof(((struct S1AP_LAI_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_252 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_252 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_LAI_ExtIEs_249[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_LAI_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_250, &asn_PER_memb_S1AP_id_constr_250, memb_S1AP_id_constraint_249 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_LAI_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_251, &asn_PER_memb_S1AP_criticality_constr_251, memb_S1AP_criticality_constraint_249 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_LAI_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_252, 0, { &asn_OER_memb_S1AP_extensionValue_constr_252, &asn_PER_memb_S1AP_extensionValue_constr_252, memb_S1AP_extensionValue_constraint_249 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_LAI_ExtIEs_tags_249[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_LAI_ExtIEs_tag2el_249[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_LAI_ExtIEs_specs_249 = { sizeof(struct S1AP_LAI_ExtIEs), offsetof(struct S1AP_LAI_ExtIEs, _asn_ctx), asn_MAP_S1AP_LAI_ExtIEs_tag2el_249, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_LAI_ExtIEs = { "LAI-ExtIEs", "LAI-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_LAI_ExtIEs_tags_249, sizeof(asn_DEF_S1AP_LAI_ExtIEs_tags_249) /sizeof(asn_DEF_S1AP_LAI_ExtIEs_tags_249[0]), /* 1 */ asn_DEF_S1AP_LAI_ExtIEs_tags_249, /* Same as above */ sizeof(asn_DEF_S1AP_LAI_ExtIEs_tags_249) /sizeof(asn_DEF_S1AP_LAI_ExtIEs_tags_249[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_LAI_ExtIEs_249, 3, /* Elements count */ &asn_SPC_S1AP_LAI_ExtIEs_specs_249 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_extensionValue_256[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_LastVisitedEUTRANCellInformation_ExtIEs__extensionValue, choice.Time_UE_StayedInCell_EnhancedGranularity), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_Time_UE_StayedInCell_EnhancedGranularity, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Time-UE-StayedInCell-EnhancedGranularity" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_LastVisitedEUTRANCellInformation_ExtIEs__extensionValue, choice.Cause), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cause" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_extensionValue_tag2el_256[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* Time-UE-StayedInCell-EnhancedGranularity */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* radioNetwork */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* transport */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* nas */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 }, /* protocol */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 1, 0, 0 } /* misc */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_256 = { sizeof(struct S1AP_LastVisitedEUTRANCellInformation_ExtIEs__extensionValue), offsetof(struct S1AP_LastVisitedEUTRANCellInformation_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_LastVisitedEUTRANCellInformation_ExtIEs__extensionValue, present), sizeof(((struct S1AP_LastVisitedEUTRANCellInformation_ExtIEs__extensionValue *)0)->present), asn_MAP_S1AP_extensionValue_tag2el_256, 6, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_256 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_extensionValue_256, 2, /* Elements count */ &asn_SPC_S1AP_extensionValue_specs_256 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_LastVisitedEUTRANCellInformation_ExtIEs_253[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_LastVisitedEUTRANCellInformation_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_254, &asn_PER_memb_S1AP_id_constr_254, memb_S1AP_id_constraint_253 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_LastVisitedEUTRANCellInformation_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_LastVisitedEUTRANCellInformation_ExtIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_255, &asn_PER_memb_S1AP_criticality_constr_255, memb_S1AP_criticality_constraint_253 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_LastVisitedEUTRANCellInformation_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_256, select_LastVisitedEUTRANCellInformation_ExtIEs_S1AP_extensionValue_type, { &asn_OER_memb_S1AP_extensionValue_constr_256, &asn_PER_memb_S1AP_extensionValue_constr_256, memb_S1AP_extensionValue_constraint_253 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_LastVisitedEUTRANCellInformation_ExtIEs_tags_253[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_LastVisitedEUTRANCellInformation_ExtIEs_tag2el_253[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_LastVisitedEUTRANCellInformation_ExtIEs_specs_253 = { sizeof(struct S1AP_LastVisitedEUTRANCellInformation_ExtIEs), offsetof(struct S1AP_LastVisitedEUTRANCellInformation_ExtIEs, _asn_ctx), asn_MAP_S1AP_LastVisitedEUTRANCellInformation_ExtIEs_tag2el_253, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_LastVisitedEUTRANCellInformation_ExtIEs = { "LastVisitedEUTRANCellInformation-ExtIEs", "LastVisitedEUTRANCellInformation-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_LastVisitedEUTRANCellInformation_ExtIEs_tags_253, sizeof(asn_DEF_S1AP_LastVisitedEUTRANCellInformation_ExtIEs_tags_253) /sizeof(asn_DEF_S1AP_LastVisitedEUTRANCellInformation_ExtIEs_tags_253[0]), /* 1 */ asn_DEF_S1AP_LastVisitedEUTRANCellInformation_ExtIEs_tags_253, /* Same as above */ sizeof(asn_DEF_S1AP_LastVisitedEUTRANCellInformation_ExtIEs_tags_253) /sizeof(asn_DEF_S1AP_LastVisitedEUTRANCellInformation_ExtIEs_tags_253[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_LastVisitedEUTRANCellInformation_ExtIEs_253, 3, /* Elements count */ &asn_SPC_S1AP_LastVisitedEUTRANCellInformation_ExtIEs_specs_253 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_260 = { sizeof(struct S1AP_ListeningSubframePattern_ExtIEs__extensionValue), offsetof(struct S1AP_ListeningSubframePattern_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_ListeningSubframePattern_ExtIEs__extensionValue, present), sizeof(((struct S1AP_ListeningSubframePattern_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_260 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_260 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ListeningSubframePattern_ExtIEs_257[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ListeningSubframePattern_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_258, &asn_PER_memb_S1AP_id_constr_258, memb_S1AP_id_constraint_257 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ListeningSubframePattern_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_259, &asn_PER_memb_S1AP_criticality_constr_259, memb_S1AP_criticality_constraint_257 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_ListeningSubframePattern_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_260, 0, { &asn_OER_memb_S1AP_extensionValue_constr_260, &asn_PER_memb_S1AP_extensionValue_constr_260, memb_S1AP_extensionValue_constraint_257 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ListeningSubframePattern_ExtIEs_tags_257[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ListeningSubframePattern_ExtIEs_tag2el_257[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ListeningSubframePattern_ExtIEs_specs_257 = { sizeof(struct S1AP_ListeningSubframePattern_ExtIEs), offsetof(struct S1AP_ListeningSubframePattern_ExtIEs, _asn_ctx), asn_MAP_S1AP_ListeningSubframePattern_ExtIEs_tag2el_257, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ListeningSubframePattern_ExtIEs = { "ListeningSubframePattern-ExtIEs", "ListeningSubframePattern-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_ListeningSubframePattern_ExtIEs_tags_257, sizeof(asn_DEF_S1AP_ListeningSubframePattern_ExtIEs_tags_257) /sizeof(asn_DEF_S1AP_ListeningSubframePattern_ExtIEs_tags_257[0]), /* 1 */ asn_DEF_S1AP_ListeningSubframePattern_ExtIEs_tags_257, /* Same as above */ sizeof(asn_DEF_S1AP_ListeningSubframePattern_ExtIEs_tags_257) /sizeof(asn_DEF_S1AP_ListeningSubframePattern_ExtIEs_tags_257[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ListeningSubframePattern_ExtIEs_257, 3, /* Elements count */ &asn_SPC_S1AP_ListeningSubframePattern_ExtIEs_specs_257 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_264 = { sizeof(struct S1AP_LoggedMDT_ExtIEs__extensionValue), offsetof(struct S1AP_LoggedMDT_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_LoggedMDT_ExtIEs__extensionValue, present), sizeof(((struct S1AP_LoggedMDT_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_264 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_264 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_LoggedMDT_ExtIEs_261[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_LoggedMDT_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_262, &asn_PER_memb_S1AP_id_constr_262, memb_S1AP_id_constraint_261 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_LoggedMDT_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_263, &asn_PER_memb_S1AP_criticality_constr_263, memb_S1AP_criticality_constraint_261 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_LoggedMDT_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_264, 0, { &asn_OER_memb_S1AP_extensionValue_constr_264, &asn_PER_memb_S1AP_extensionValue_constr_264, memb_S1AP_extensionValue_constraint_261 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_LoggedMDT_ExtIEs_tags_261[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_LoggedMDT_ExtIEs_tag2el_261[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_LoggedMDT_ExtIEs_specs_261 = { sizeof(struct S1AP_LoggedMDT_ExtIEs), offsetof(struct S1AP_LoggedMDT_ExtIEs, _asn_ctx), asn_MAP_S1AP_LoggedMDT_ExtIEs_tag2el_261, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_LoggedMDT_ExtIEs = { "LoggedMDT-ExtIEs", "LoggedMDT-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_LoggedMDT_ExtIEs_tags_261, sizeof(asn_DEF_S1AP_LoggedMDT_ExtIEs_tags_261) /sizeof(asn_DEF_S1AP_LoggedMDT_ExtIEs_tags_261[0]), /* 1 */ asn_DEF_S1AP_LoggedMDT_ExtIEs_tags_261, /* Same as above */ sizeof(asn_DEF_S1AP_LoggedMDT_ExtIEs_tags_261) /sizeof(asn_DEF_S1AP_LoggedMDT_ExtIEs_tags_261[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_LoggedMDT_ExtIEs_261, 3, /* Elements count */ &asn_SPC_S1AP_LoggedMDT_ExtIEs_specs_261 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_268 = { sizeof(struct S1AP_LoggedMBSFNMDT_ExtIEs__extensionValue), offsetof(struct S1AP_LoggedMBSFNMDT_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_LoggedMBSFNMDT_ExtIEs__extensionValue, present), sizeof(((struct S1AP_LoggedMBSFNMDT_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_268 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_268 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_LoggedMBSFNMDT_ExtIEs_265[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_LoggedMBSFNMDT_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_266, &asn_PER_memb_S1AP_id_constr_266, memb_S1AP_id_constraint_265 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_LoggedMBSFNMDT_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_267, &asn_PER_memb_S1AP_criticality_constr_267, memb_S1AP_criticality_constraint_265 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_LoggedMBSFNMDT_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_268, 0, { &asn_OER_memb_S1AP_extensionValue_constr_268, &asn_PER_memb_S1AP_extensionValue_constr_268, memb_S1AP_extensionValue_constraint_265 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_LoggedMBSFNMDT_ExtIEs_tags_265[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_LoggedMBSFNMDT_ExtIEs_tag2el_265[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_LoggedMBSFNMDT_ExtIEs_specs_265 = { sizeof(struct S1AP_LoggedMBSFNMDT_ExtIEs), offsetof(struct S1AP_LoggedMBSFNMDT_ExtIEs, _asn_ctx), asn_MAP_S1AP_LoggedMBSFNMDT_ExtIEs_tag2el_265, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_LoggedMBSFNMDT_ExtIEs = { "LoggedMBSFNMDT-ExtIEs", "LoggedMBSFNMDT-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_LoggedMBSFNMDT_ExtIEs_tags_265, sizeof(asn_DEF_S1AP_LoggedMBSFNMDT_ExtIEs_tags_265) /sizeof(asn_DEF_S1AP_LoggedMBSFNMDT_ExtIEs_tags_265[0]), /* 1 */ asn_DEF_S1AP_LoggedMBSFNMDT_ExtIEs_tags_265, /* Same as above */ sizeof(asn_DEF_S1AP_LoggedMBSFNMDT_ExtIEs_tags_265) /sizeof(asn_DEF_S1AP_LoggedMBSFNMDT_ExtIEs_tags_265[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_LoggedMBSFNMDT_ExtIEs_265, 3, /* Elements count */ &asn_SPC_S1AP_LoggedMBSFNMDT_ExtIEs_specs_265 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_272 = { sizeof(struct S1AP_M3Configuration_ExtIEs__extensionValue), offsetof(struct S1AP_M3Configuration_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_M3Configuration_ExtIEs__extensionValue, present), sizeof(((struct S1AP_M3Configuration_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_272 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_272 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_M3Configuration_ExtIEs_269[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_M3Configuration_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_270, &asn_PER_memb_S1AP_id_constr_270, memb_S1AP_id_constraint_269 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_M3Configuration_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_271, &asn_PER_memb_S1AP_criticality_constr_271, memb_S1AP_criticality_constraint_269 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_M3Configuration_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_272, 0, { &asn_OER_memb_S1AP_extensionValue_constr_272, &asn_PER_memb_S1AP_extensionValue_constr_272, memb_S1AP_extensionValue_constraint_269 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_M3Configuration_ExtIEs_tags_269[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_M3Configuration_ExtIEs_tag2el_269[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_M3Configuration_ExtIEs_specs_269 = { sizeof(struct S1AP_M3Configuration_ExtIEs), offsetof(struct S1AP_M3Configuration_ExtIEs, _asn_ctx), asn_MAP_S1AP_M3Configuration_ExtIEs_tag2el_269, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_M3Configuration_ExtIEs = { "M3Configuration-ExtIEs", "M3Configuration-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_M3Configuration_ExtIEs_tags_269, sizeof(asn_DEF_S1AP_M3Configuration_ExtIEs_tags_269) /sizeof(asn_DEF_S1AP_M3Configuration_ExtIEs_tags_269[0]), /* 1 */ asn_DEF_S1AP_M3Configuration_ExtIEs_tags_269, /* Same as above */ sizeof(asn_DEF_S1AP_M3Configuration_ExtIEs_tags_269) /sizeof(asn_DEF_S1AP_M3Configuration_ExtIEs_tags_269[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_M3Configuration_ExtIEs_269, 3, /* Elements count */ &asn_SPC_S1AP_M3Configuration_ExtIEs_specs_269 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_276 = { sizeof(struct S1AP_M4Configuration_ExtIEs__extensionValue), offsetof(struct S1AP_M4Configuration_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_M4Configuration_ExtIEs__extensionValue, present), sizeof(((struct S1AP_M4Configuration_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_276 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_276 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_M4Configuration_ExtIEs_273[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_M4Configuration_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_274, &asn_PER_memb_S1AP_id_constr_274, memb_S1AP_id_constraint_273 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_M4Configuration_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_275, &asn_PER_memb_S1AP_criticality_constr_275, memb_S1AP_criticality_constraint_273 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_M4Configuration_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_276, 0, { &asn_OER_memb_S1AP_extensionValue_constr_276, &asn_PER_memb_S1AP_extensionValue_constr_276, memb_S1AP_extensionValue_constraint_273 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_M4Configuration_ExtIEs_tags_273[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_M4Configuration_ExtIEs_tag2el_273[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_M4Configuration_ExtIEs_specs_273 = { sizeof(struct S1AP_M4Configuration_ExtIEs), offsetof(struct S1AP_M4Configuration_ExtIEs, _asn_ctx), asn_MAP_S1AP_M4Configuration_ExtIEs_tag2el_273, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_M4Configuration_ExtIEs = { "M4Configuration-ExtIEs", "M4Configuration-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_M4Configuration_ExtIEs_tags_273, sizeof(asn_DEF_S1AP_M4Configuration_ExtIEs_tags_273) /sizeof(asn_DEF_S1AP_M4Configuration_ExtIEs_tags_273[0]), /* 1 */ asn_DEF_S1AP_M4Configuration_ExtIEs_tags_273, /* Same as above */ sizeof(asn_DEF_S1AP_M4Configuration_ExtIEs_tags_273) /sizeof(asn_DEF_S1AP_M4Configuration_ExtIEs_tags_273[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_M4Configuration_ExtIEs_273, 3, /* Elements count */ &asn_SPC_S1AP_M4Configuration_ExtIEs_specs_273 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_280 = { sizeof(struct S1AP_M5Configuration_ExtIEs__extensionValue), offsetof(struct S1AP_M5Configuration_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_M5Configuration_ExtIEs__extensionValue, present), sizeof(((struct S1AP_M5Configuration_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_280 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_280 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_M5Configuration_ExtIEs_277[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_M5Configuration_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_278, &asn_PER_memb_S1AP_id_constr_278, memb_S1AP_id_constraint_277 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_M5Configuration_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_279, &asn_PER_memb_S1AP_criticality_constr_279, memb_S1AP_criticality_constraint_277 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_M5Configuration_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_280, 0, { &asn_OER_memb_S1AP_extensionValue_constr_280, &asn_PER_memb_S1AP_extensionValue_constr_280, memb_S1AP_extensionValue_constraint_277 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_M5Configuration_ExtIEs_tags_277[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_M5Configuration_ExtIEs_tag2el_277[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_M5Configuration_ExtIEs_specs_277 = { sizeof(struct S1AP_M5Configuration_ExtIEs), offsetof(struct S1AP_M5Configuration_ExtIEs, _asn_ctx), asn_MAP_S1AP_M5Configuration_ExtIEs_tag2el_277, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_M5Configuration_ExtIEs = { "M5Configuration-ExtIEs", "M5Configuration-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_M5Configuration_ExtIEs_tags_277, sizeof(asn_DEF_S1AP_M5Configuration_ExtIEs_tags_277) /sizeof(asn_DEF_S1AP_M5Configuration_ExtIEs_tags_277[0]), /* 1 */ asn_DEF_S1AP_M5Configuration_ExtIEs_tags_277, /* Same as above */ sizeof(asn_DEF_S1AP_M5Configuration_ExtIEs_tags_277) /sizeof(asn_DEF_S1AP_M5Configuration_ExtIEs_tags_277[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_M5Configuration_ExtIEs_277, 3, /* Elements count */ &asn_SPC_S1AP_M5Configuration_ExtIEs_specs_277 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_284 = { sizeof(struct S1AP_M6Configuration_ExtIEs__extensionValue), offsetof(struct S1AP_M6Configuration_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_M6Configuration_ExtIEs__extensionValue, present), sizeof(((struct S1AP_M6Configuration_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_284 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_284 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_M6Configuration_ExtIEs_281[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_M6Configuration_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_282, &asn_PER_memb_S1AP_id_constr_282, memb_S1AP_id_constraint_281 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_M6Configuration_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_283, &asn_PER_memb_S1AP_criticality_constr_283, memb_S1AP_criticality_constraint_281 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_M6Configuration_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_284, 0, { &asn_OER_memb_S1AP_extensionValue_constr_284, &asn_PER_memb_S1AP_extensionValue_constr_284, memb_S1AP_extensionValue_constraint_281 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_M6Configuration_ExtIEs_tags_281[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_M6Configuration_ExtIEs_tag2el_281[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_M6Configuration_ExtIEs_specs_281 = { sizeof(struct S1AP_M6Configuration_ExtIEs), offsetof(struct S1AP_M6Configuration_ExtIEs, _asn_ctx), asn_MAP_S1AP_M6Configuration_ExtIEs_tag2el_281, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_M6Configuration_ExtIEs = { "M6Configuration-ExtIEs", "M6Configuration-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_M6Configuration_ExtIEs_tags_281, sizeof(asn_DEF_S1AP_M6Configuration_ExtIEs_tags_281) /sizeof(asn_DEF_S1AP_M6Configuration_ExtIEs_tags_281[0]), /* 1 */ asn_DEF_S1AP_M6Configuration_ExtIEs_tags_281, /* Same as above */ sizeof(asn_DEF_S1AP_M6Configuration_ExtIEs_tags_281) /sizeof(asn_DEF_S1AP_M6Configuration_ExtIEs_tags_281[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_M6Configuration_ExtIEs_281, 3, /* Elements count */ &asn_SPC_S1AP_M6Configuration_ExtIEs_specs_281 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_288 = { sizeof(struct S1AP_M7Configuration_ExtIEs__extensionValue), offsetof(struct S1AP_M7Configuration_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_M7Configuration_ExtIEs__extensionValue, present), sizeof(((struct S1AP_M7Configuration_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_288 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_288 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_M7Configuration_ExtIEs_285[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_M7Configuration_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_286, &asn_PER_memb_S1AP_id_constr_286, memb_S1AP_id_constraint_285 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_M7Configuration_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_287, &asn_PER_memb_S1AP_criticality_constr_287, memb_S1AP_criticality_constraint_285 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_M7Configuration_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_288, 0, { &asn_OER_memb_S1AP_extensionValue_constr_288, &asn_PER_memb_S1AP_extensionValue_constr_288, memb_S1AP_extensionValue_constraint_285 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_M7Configuration_ExtIEs_tags_285[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_M7Configuration_ExtIEs_tag2el_285[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_M7Configuration_ExtIEs_specs_285 = { sizeof(struct S1AP_M7Configuration_ExtIEs), offsetof(struct S1AP_M7Configuration_ExtIEs, _asn_ctx), asn_MAP_S1AP_M7Configuration_ExtIEs_tag2el_285, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_M7Configuration_ExtIEs = { "M7Configuration-ExtIEs", "M7Configuration-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_M7Configuration_ExtIEs_tags_285, sizeof(asn_DEF_S1AP_M7Configuration_ExtIEs_tags_285) /sizeof(asn_DEF_S1AP_M7Configuration_ExtIEs_tags_285[0]), /* 1 */ asn_DEF_S1AP_M7Configuration_ExtIEs_tags_285, /* Same as above */ sizeof(asn_DEF_S1AP_M7Configuration_ExtIEs_tags_285) /sizeof(asn_DEF_S1AP_M7Configuration_ExtIEs_tags_285[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_M7Configuration_ExtIEs_285, 3, /* Elements count */ &asn_SPC_S1AP_M7Configuration_ExtIEs_specs_285 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_extensionValue_292[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MDT_Configuration_ExtIEs__extensionValue, choice.MDTPLMNList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_MDTPLMNList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MDTPLMNList" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_extensionValue_tag2el_292[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* MDTPLMNList */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_292 = { sizeof(struct S1AP_MDT_Configuration_ExtIEs__extensionValue), offsetof(struct S1AP_MDT_Configuration_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_MDT_Configuration_ExtIEs__extensionValue, present), sizeof(((struct S1AP_MDT_Configuration_ExtIEs__extensionValue *)0)->present), asn_MAP_S1AP_extensionValue_tag2el_292, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_292 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_extensionValue_292, 1, /* Elements count */ &asn_SPC_S1AP_extensionValue_specs_292 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_MDT_Configuration_ExtIEs_289[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MDT_Configuration_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_290, &asn_PER_memb_S1AP_id_constr_290, memb_S1AP_id_constraint_289 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_MDT_Configuration_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_MDT_Configuration_ExtIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_291, &asn_PER_memb_S1AP_criticality_constr_291, memb_S1AP_criticality_constraint_289 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_MDT_Configuration_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_292, select_MDT_Configuration_ExtIEs_S1AP_extensionValue_type, { &asn_OER_memb_S1AP_extensionValue_constr_292, &asn_PER_memb_S1AP_extensionValue_constr_292, memb_S1AP_extensionValue_constraint_289 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_MDT_Configuration_ExtIEs_tags_289[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MDT_Configuration_ExtIEs_tag2el_289[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_MDT_Configuration_ExtIEs_specs_289 = { sizeof(struct S1AP_MDT_Configuration_ExtIEs), offsetof(struct S1AP_MDT_Configuration_ExtIEs, _asn_ctx), asn_MAP_S1AP_MDT_Configuration_ExtIEs_tag2el_289, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MDT_Configuration_ExtIEs = { "MDT-Configuration-ExtIEs", "MDT-Configuration-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_MDT_Configuration_ExtIEs_tags_289, sizeof(asn_DEF_S1AP_MDT_Configuration_ExtIEs_tags_289) /sizeof(asn_DEF_S1AP_MDT_Configuration_ExtIEs_tags_289[0]), /* 1 */ asn_DEF_S1AP_MDT_Configuration_ExtIEs_tags_289, /* Same as above */ sizeof(asn_DEF_S1AP_MDT_Configuration_ExtIEs_tags_289) /sizeof(asn_DEF_S1AP_MDT_Configuration_ExtIEs_tags_289[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_MDT_Configuration_ExtIEs_289, 3, /* Elements count */ &asn_SPC_S1AP_MDT_Configuration_ExtIEs_specs_289 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_296 = { sizeof(struct S1AP_MBSFN_ResultToLogInfo_ExtIEs__extensionValue), offsetof(struct S1AP_MBSFN_ResultToLogInfo_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_MBSFN_ResultToLogInfo_ExtIEs__extensionValue, present), sizeof(((struct S1AP_MBSFN_ResultToLogInfo_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_296 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_296 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_MBSFN_ResultToLogInfo_ExtIEs_293[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MBSFN_ResultToLogInfo_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_294, &asn_PER_memb_S1AP_id_constr_294, memb_S1AP_id_constraint_293 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_MBSFN_ResultToLogInfo_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_295, &asn_PER_memb_S1AP_criticality_constr_295, memb_S1AP_criticality_constraint_293 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_MBSFN_ResultToLogInfo_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_296, 0, { &asn_OER_memb_S1AP_extensionValue_constr_296, &asn_PER_memb_S1AP_extensionValue_constr_296, memb_S1AP_extensionValue_constraint_293 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_MBSFN_ResultToLogInfo_ExtIEs_tags_293[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MBSFN_ResultToLogInfo_ExtIEs_tag2el_293[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_MBSFN_ResultToLogInfo_ExtIEs_specs_293 = { sizeof(struct S1AP_MBSFN_ResultToLogInfo_ExtIEs), offsetof(struct S1AP_MBSFN_ResultToLogInfo_ExtIEs, _asn_ctx), asn_MAP_S1AP_MBSFN_ResultToLogInfo_ExtIEs_tag2el_293, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MBSFN_ResultToLogInfo_ExtIEs = { "MBSFN-ResultToLogInfo-ExtIEs", "MBSFN-ResultToLogInfo-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_MBSFN_ResultToLogInfo_ExtIEs_tags_293, sizeof(asn_DEF_S1AP_MBSFN_ResultToLogInfo_ExtIEs_tags_293) /sizeof(asn_DEF_S1AP_MBSFN_ResultToLogInfo_ExtIEs_tags_293[0]), /* 1 */ asn_DEF_S1AP_MBSFN_ResultToLogInfo_ExtIEs_tags_293, /* Same as above */ sizeof(asn_DEF_S1AP_MBSFN_ResultToLogInfo_ExtIEs_tags_293) /sizeof(asn_DEF_S1AP_MBSFN_ResultToLogInfo_ExtIEs_tags_293[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_MBSFN_ResultToLogInfo_ExtIEs_293, 3, /* Elements count */ &asn_SPC_S1AP_MBSFN_ResultToLogInfo_ExtIEs_specs_293 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_300 = { sizeof(struct S1AP_MutingPatternInformation_ExtIEs__extensionValue), offsetof(struct S1AP_MutingPatternInformation_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_MutingPatternInformation_ExtIEs__extensionValue, present), sizeof(((struct S1AP_MutingPatternInformation_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_300 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_300 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_MutingPatternInformation_ExtIEs_297[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MutingPatternInformation_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_298, &asn_PER_memb_S1AP_id_constr_298, memb_S1AP_id_constraint_297 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_MutingPatternInformation_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_299, &asn_PER_memb_S1AP_criticality_constr_299, memb_S1AP_criticality_constraint_297 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_MutingPatternInformation_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_300, 0, { &asn_OER_memb_S1AP_extensionValue_constr_300, &asn_PER_memb_S1AP_extensionValue_constr_300, memb_S1AP_extensionValue_constraint_297 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_MutingPatternInformation_ExtIEs_tags_297[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MutingPatternInformation_ExtIEs_tag2el_297[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_MutingPatternInformation_ExtIEs_specs_297 = { sizeof(struct S1AP_MutingPatternInformation_ExtIEs), offsetof(struct S1AP_MutingPatternInformation_ExtIEs, _asn_ctx), asn_MAP_S1AP_MutingPatternInformation_ExtIEs_tag2el_297, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MutingPatternInformation_ExtIEs = { "MutingPatternInformation-ExtIEs", "MutingPatternInformation-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_MutingPatternInformation_ExtIEs_tags_297, sizeof(asn_DEF_S1AP_MutingPatternInformation_ExtIEs_tags_297) /sizeof(asn_DEF_S1AP_MutingPatternInformation_ExtIEs_tags_297[0]), /* 1 */ asn_DEF_S1AP_MutingPatternInformation_ExtIEs_tags_297, /* Same as above */ sizeof(asn_DEF_S1AP_MutingPatternInformation_ExtIEs_tags_297) /sizeof(asn_DEF_S1AP_MutingPatternInformation_ExtIEs_tags_297[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_MutingPatternInformation_ExtIEs_297, 3, /* Elements count */ &asn_SPC_S1AP_MutingPatternInformation_ExtIEs_specs_297 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_304 = { sizeof(struct S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs__extensionValue), offsetof(struct S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs__extensionValue, present), sizeof(((struct S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_304 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_304 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs_301[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_302, &asn_PER_memb_S1AP_id_constr_302, memb_S1AP_id_constraint_301 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_303, &asn_PER_memb_S1AP_criticality_constr_303, memb_S1AP_criticality_constraint_301 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_304, 0, { &asn_OER_memb_S1AP_extensionValue_constr_304, &asn_PER_memb_S1AP_extensionValue_constr_304, memb_S1AP_extensionValue_constraint_301 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs_tags_301[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs_tag2el_301[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs_specs_301 = { sizeof(struct S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs), offsetof(struct S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs, _asn_ctx), asn_MAP_S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs_tag2el_301, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs = { "NB-IoT-Paging-eDRXInformation-ExtIEs", "NB-IoT-Paging-eDRXInformation-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs_tags_301, sizeof(asn_DEF_S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs_tags_301) /sizeof(asn_DEF_S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs_tags_301[0]), /* 1 */ asn_DEF_S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs_tags_301, /* Same as above */ sizeof(asn_DEF_S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs_tags_301) /sizeof(asn_DEF_S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs_tags_301[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs_301, 3, /* Elements count */ &asn_SPC_S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs_specs_301 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_308 = { sizeof(struct S1AP_PagingAttemptInformation_ExtIEs__extensionValue), offsetof(struct S1AP_PagingAttemptInformation_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_PagingAttemptInformation_ExtIEs__extensionValue, present), sizeof(((struct S1AP_PagingAttemptInformation_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_308 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_308 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_PagingAttemptInformation_ExtIEs_305[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_PagingAttemptInformation_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_306, &asn_PER_memb_S1AP_id_constr_306, memb_S1AP_id_constraint_305 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PagingAttemptInformation_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_307, &asn_PER_memb_S1AP_criticality_constr_307, memb_S1AP_criticality_constraint_305 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_PagingAttemptInformation_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_308, 0, { &asn_OER_memb_S1AP_extensionValue_constr_308, &asn_PER_memb_S1AP_extensionValue_constr_308, memb_S1AP_extensionValue_constraint_305 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_PagingAttemptInformation_ExtIEs_tags_305[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_PagingAttemptInformation_ExtIEs_tag2el_305[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_PagingAttemptInformation_ExtIEs_specs_305 = { sizeof(struct S1AP_PagingAttemptInformation_ExtIEs), offsetof(struct S1AP_PagingAttemptInformation_ExtIEs, _asn_ctx), asn_MAP_S1AP_PagingAttemptInformation_ExtIEs_tag2el_305, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_PagingAttemptInformation_ExtIEs = { "PagingAttemptInformation-ExtIEs", "PagingAttemptInformation-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_PagingAttemptInformation_ExtIEs_tags_305, sizeof(asn_DEF_S1AP_PagingAttemptInformation_ExtIEs_tags_305) /sizeof(asn_DEF_S1AP_PagingAttemptInformation_ExtIEs_tags_305[0]), /* 1 */ asn_DEF_S1AP_PagingAttemptInformation_ExtIEs_tags_305, /* Same as above */ sizeof(asn_DEF_S1AP_PagingAttemptInformation_ExtIEs_tags_305) /sizeof(asn_DEF_S1AP_PagingAttemptInformation_ExtIEs_tags_305[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_PagingAttemptInformation_ExtIEs_305, 3, /* Elements count */ &asn_SPC_S1AP_PagingAttemptInformation_ExtIEs_specs_305 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_312 = { sizeof(struct S1AP_Paging_eDRXInformation_ExtIEs__extensionValue), offsetof(struct S1AP_Paging_eDRXInformation_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_Paging_eDRXInformation_ExtIEs__extensionValue, present), sizeof(((struct S1AP_Paging_eDRXInformation_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_312 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_312 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_Paging_eDRXInformation_ExtIEs_309[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_Paging_eDRXInformation_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_310, &asn_PER_memb_S1AP_id_constr_310, memb_S1AP_id_constraint_309 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_Paging_eDRXInformation_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_311, &asn_PER_memb_S1AP_criticality_constr_311, memb_S1AP_criticality_constraint_309 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_Paging_eDRXInformation_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_312, 0, { &asn_OER_memb_S1AP_extensionValue_constr_312, &asn_PER_memb_S1AP_extensionValue_constr_312, memb_S1AP_extensionValue_constraint_309 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_Paging_eDRXInformation_ExtIEs_tags_309[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_Paging_eDRXInformation_ExtIEs_tag2el_309[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_Paging_eDRXInformation_ExtIEs_specs_309 = { sizeof(struct S1AP_Paging_eDRXInformation_ExtIEs), offsetof(struct S1AP_Paging_eDRXInformation_ExtIEs, _asn_ctx), asn_MAP_S1AP_Paging_eDRXInformation_ExtIEs_tag2el_309, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_Paging_eDRXInformation_ExtIEs = { "Paging-eDRXInformation-ExtIEs", "Paging-eDRXInformation-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_Paging_eDRXInformation_ExtIEs_tags_309, sizeof(asn_DEF_S1AP_Paging_eDRXInformation_ExtIEs_tags_309) /sizeof(asn_DEF_S1AP_Paging_eDRXInformation_ExtIEs_tags_309[0]), /* 1 */ asn_DEF_S1AP_Paging_eDRXInformation_ExtIEs_tags_309, /* Same as above */ sizeof(asn_DEF_S1AP_Paging_eDRXInformation_ExtIEs_tags_309) /sizeof(asn_DEF_S1AP_Paging_eDRXInformation_ExtIEs_tags_309[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_Paging_eDRXInformation_ExtIEs_309, 3, /* Elements count */ &asn_SPC_S1AP_Paging_eDRXInformation_ExtIEs_specs_309 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_316 = { sizeof(struct S1AP_M1PeriodicReporting_ExtIEs__extensionValue), offsetof(struct S1AP_M1PeriodicReporting_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_M1PeriodicReporting_ExtIEs__extensionValue, present), sizeof(((struct S1AP_M1PeriodicReporting_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_316 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_316 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_M1PeriodicReporting_ExtIEs_313[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_M1PeriodicReporting_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_314, &asn_PER_memb_S1AP_id_constr_314, memb_S1AP_id_constraint_313 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_M1PeriodicReporting_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_315, &asn_PER_memb_S1AP_criticality_constr_315, memb_S1AP_criticality_constraint_313 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_M1PeriodicReporting_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_316, 0, { &asn_OER_memb_S1AP_extensionValue_constr_316, &asn_PER_memb_S1AP_extensionValue_constr_316, memb_S1AP_extensionValue_constraint_313 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_M1PeriodicReporting_ExtIEs_tags_313[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_M1PeriodicReporting_ExtIEs_tag2el_313[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_M1PeriodicReporting_ExtIEs_specs_313 = { sizeof(struct S1AP_M1PeriodicReporting_ExtIEs), offsetof(struct S1AP_M1PeriodicReporting_ExtIEs, _asn_ctx), asn_MAP_S1AP_M1PeriodicReporting_ExtIEs_tag2el_313, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_M1PeriodicReporting_ExtIEs = { "M1PeriodicReporting-ExtIEs", "M1PeriodicReporting-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_M1PeriodicReporting_ExtIEs_tags_313, sizeof(asn_DEF_S1AP_M1PeriodicReporting_ExtIEs_tags_313) /sizeof(asn_DEF_S1AP_M1PeriodicReporting_ExtIEs_tags_313[0]), /* 1 */ asn_DEF_S1AP_M1PeriodicReporting_ExtIEs_tags_313, /* Same as above */ sizeof(asn_DEF_S1AP_M1PeriodicReporting_ExtIEs_tags_313) /sizeof(asn_DEF_S1AP_M1PeriodicReporting_ExtIEs_tags_313[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_M1PeriodicReporting_ExtIEs_313, 3, /* Elements count */ &asn_SPC_S1AP_M1PeriodicReporting_ExtIEs_specs_313 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_extensionValue_320[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ProSeAuthorized_ExtIEs__extensionValue, choice.ProSeUEtoNetworkRelaying), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_ProSeUEtoNetworkRelaying, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ProSeUEtoNetworkRelaying" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_extensionValue_tag2el_320[] = { { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* ProSeUEtoNetworkRelaying */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_320 = { sizeof(struct S1AP_ProSeAuthorized_ExtIEs__extensionValue), offsetof(struct S1AP_ProSeAuthorized_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_ProSeAuthorized_ExtIEs__extensionValue, present), sizeof(((struct S1AP_ProSeAuthorized_ExtIEs__extensionValue *)0)->present), asn_MAP_S1AP_extensionValue_tag2el_320, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_320 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_extensionValue_320, 1, /* Elements count */ &asn_SPC_S1AP_extensionValue_specs_320 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProSeAuthorized_ExtIEs_317[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ProSeAuthorized_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_318, &asn_PER_memb_S1AP_id_constr_318, memb_S1AP_id_constraint_317 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ProSeAuthorized_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_ProSeAuthorized_ExtIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_319, &asn_PER_memb_S1AP_criticality_constr_319, memb_S1AP_criticality_constraint_317 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_ProSeAuthorized_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_320, select_ProSeAuthorized_ExtIEs_S1AP_extensionValue_type, { &asn_OER_memb_S1AP_extensionValue_constr_320, &asn_PER_memb_S1AP_extensionValue_constr_320, memb_S1AP_extensionValue_constraint_317 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProSeAuthorized_ExtIEs_tags_317[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ProSeAuthorized_ExtIEs_tag2el_317[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ProSeAuthorized_ExtIEs_specs_317 = { sizeof(struct S1AP_ProSeAuthorized_ExtIEs), offsetof(struct S1AP_ProSeAuthorized_ExtIEs, _asn_ctx), asn_MAP_S1AP_ProSeAuthorized_ExtIEs_tag2el_317, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProSeAuthorized_ExtIEs = { "ProSeAuthorized-ExtIEs", "ProSeAuthorized-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProSeAuthorized_ExtIEs_tags_317, sizeof(asn_DEF_S1AP_ProSeAuthorized_ExtIEs_tags_317) /sizeof(asn_DEF_S1AP_ProSeAuthorized_ExtIEs_tags_317[0]), /* 1 */ asn_DEF_S1AP_ProSeAuthorized_ExtIEs_tags_317, /* Same as above */ sizeof(asn_DEF_S1AP_ProSeAuthorized_ExtIEs_tags_317) /sizeof(asn_DEF_S1AP_ProSeAuthorized_ExtIEs_tags_317[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ProSeAuthorized_ExtIEs_317, 3, /* Elements count */ &asn_SPC_S1AP_ProSeAuthorized_ExtIEs_specs_317 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_324 = { sizeof(struct S1AP_RecommendedCellsForPaging_ExtIEs__extensionValue), offsetof(struct S1AP_RecommendedCellsForPaging_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_RecommendedCellsForPaging_ExtIEs__extensionValue, present), sizeof(((struct S1AP_RecommendedCellsForPaging_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_324 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_324 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_RecommendedCellsForPaging_ExtIEs_321[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedCellsForPaging_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_322, &asn_PER_memb_S1AP_id_constr_322, memb_S1AP_id_constraint_321 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedCellsForPaging_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_323, &asn_PER_memb_S1AP_criticality_constr_323, memb_S1AP_criticality_constraint_321 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedCellsForPaging_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_324, 0, { &asn_OER_memb_S1AP_extensionValue_constr_324, &asn_PER_memb_S1AP_extensionValue_constr_324, memb_S1AP_extensionValue_constraint_321 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_RecommendedCellsForPaging_ExtIEs_tags_321[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_RecommendedCellsForPaging_ExtIEs_tag2el_321[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_RecommendedCellsForPaging_ExtIEs_specs_321 = { sizeof(struct S1AP_RecommendedCellsForPaging_ExtIEs), offsetof(struct S1AP_RecommendedCellsForPaging_ExtIEs, _asn_ctx), asn_MAP_S1AP_RecommendedCellsForPaging_ExtIEs_tag2el_321, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedCellsForPaging_ExtIEs = { "RecommendedCellsForPaging-ExtIEs", "RecommendedCellsForPaging-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_RecommendedCellsForPaging_ExtIEs_tags_321, sizeof(asn_DEF_S1AP_RecommendedCellsForPaging_ExtIEs_tags_321) /sizeof(asn_DEF_S1AP_RecommendedCellsForPaging_ExtIEs_tags_321[0]), /* 1 */ asn_DEF_S1AP_RecommendedCellsForPaging_ExtIEs_tags_321, /* Same as above */ sizeof(asn_DEF_S1AP_RecommendedCellsForPaging_ExtIEs_tags_321) /sizeof(asn_DEF_S1AP_RecommendedCellsForPaging_ExtIEs_tags_321[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_RecommendedCellsForPaging_ExtIEs_321, 3, /* Elements count */ &asn_SPC_S1AP_RecommendedCellsForPaging_ExtIEs_specs_321 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_328 = { sizeof(struct S1AP_RecommendedCellsForPagingItem_ExtIEs__extensionValue), offsetof(struct S1AP_RecommendedCellsForPagingItem_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_RecommendedCellsForPagingItem_ExtIEs__extensionValue, present), sizeof(((struct S1AP_RecommendedCellsForPagingItem_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_328 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_328 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_RecommendedCellsForPagingItem_ExtIEs_325[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedCellsForPagingItem_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_326, &asn_PER_memb_S1AP_id_constr_326, memb_S1AP_id_constraint_325 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedCellsForPagingItem_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_327, &asn_PER_memb_S1AP_criticality_constr_327, memb_S1AP_criticality_constraint_325 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedCellsForPagingItem_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_328, 0, { &asn_OER_memb_S1AP_extensionValue_constr_328, &asn_PER_memb_S1AP_extensionValue_constr_328, memb_S1AP_extensionValue_constraint_325 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_RecommendedCellsForPagingItem_ExtIEs_tags_325[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_RecommendedCellsForPagingItem_ExtIEs_tag2el_325[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_RecommendedCellsForPagingItem_ExtIEs_specs_325 = { sizeof(struct S1AP_RecommendedCellsForPagingItem_ExtIEs), offsetof(struct S1AP_RecommendedCellsForPagingItem_ExtIEs, _asn_ctx), asn_MAP_S1AP_RecommendedCellsForPagingItem_ExtIEs_tag2el_325, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedCellsForPagingItem_ExtIEs = { "RecommendedCellsForPagingItem-ExtIEs", "RecommendedCellsForPagingItem-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_RecommendedCellsForPagingItem_ExtIEs_tags_325, sizeof(asn_DEF_S1AP_RecommendedCellsForPagingItem_ExtIEs_tags_325) /sizeof(asn_DEF_S1AP_RecommendedCellsForPagingItem_ExtIEs_tags_325[0]), /* 1 */ asn_DEF_S1AP_RecommendedCellsForPagingItem_ExtIEs_tags_325, /* Same as above */ sizeof(asn_DEF_S1AP_RecommendedCellsForPagingItem_ExtIEs_tags_325) /sizeof(asn_DEF_S1AP_RecommendedCellsForPagingItem_ExtIEs_tags_325[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_RecommendedCellsForPagingItem_ExtIEs_325, 3, /* Elements count */ &asn_SPC_S1AP_RecommendedCellsForPagingItem_ExtIEs_specs_325 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_332 = { sizeof(struct S1AP_RecommendedENBsForPaging_ExtIEs__extensionValue), offsetof(struct S1AP_RecommendedENBsForPaging_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_RecommendedENBsForPaging_ExtIEs__extensionValue, present), sizeof(((struct S1AP_RecommendedENBsForPaging_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_332 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_332 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_RecommendedENBsForPaging_ExtIEs_329[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedENBsForPaging_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_330, &asn_PER_memb_S1AP_id_constr_330, memb_S1AP_id_constraint_329 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedENBsForPaging_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_331, &asn_PER_memb_S1AP_criticality_constr_331, memb_S1AP_criticality_constraint_329 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedENBsForPaging_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_332, 0, { &asn_OER_memb_S1AP_extensionValue_constr_332, &asn_PER_memb_S1AP_extensionValue_constr_332, memb_S1AP_extensionValue_constraint_329 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_RecommendedENBsForPaging_ExtIEs_tags_329[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_RecommendedENBsForPaging_ExtIEs_tag2el_329[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_RecommendedENBsForPaging_ExtIEs_specs_329 = { sizeof(struct S1AP_RecommendedENBsForPaging_ExtIEs), offsetof(struct S1AP_RecommendedENBsForPaging_ExtIEs, _asn_ctx), asn_MAP_S1AP_RecommendedENBsForPaging_ExtIEs_tag2el_329, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedENBsForPaging_ExtIEs = { "RecommendedENBsForPaging-ExtIEs", "RecommendedENBsForPaging-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_RecommendedENBsForPaging_ExtIEs_tags_329, sizeof(asn_DEF_S1AP_RecommendedENBsForPaging_ExtIEs_tags_329) /sizeof(asn_DEF_S1AP_RecommendedENBsForPaging_ExtIEs_tags_329[0]), /* 1 */ asn_DEF_S1AP_RecommendedENBsForPaging_ExtIEs_tags_329, /* Same as above */ sizeof(asn_DEF_S1AP_RecommendedENBsForPaging_ExtIEs_tags_329) /sizeof(asn_DEF_S1AP_RecommendedENBsForPaging_ExtIEs_tags_329[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_RecommendedENBsForPaging_ExtIEs_329, 3, /* Elements count */ &asn_SPC_S1AP_RecommendedENBsForPaging_ExtIEs_specs_329 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_336 = { sizeof(struct S1AP_RecommendedENBItem_ExtIEs__extensionValue), offsetof(struct S1AP_RecommendedENBItem_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_RecommendedENBItem_ExtIEs__extensionValue, present), sizeof(((struct S1AP_RecommendedENBItem_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_336 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_336 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_RecommendedENBItem_ExtIEs_333[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedENBItem_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_334, &asn_PER_memb_S1AP_id_constr_334, memb_S1AP_id_constraint_333 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedENBItem_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_335, &asn_PER_memb_S1AP_criticality_constr_335, memb_S1AP_criticality_constraint_333 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedENBItem_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_336, 0, { &asn_OER_memb_S1AP_extensionValue_constr_336, &asn_PER_memb_S1AP_extensionValue_constr_336, memb_S1AP_extensionValue_constraint_333 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_RecommendedENBItem_ExtIEs_tags_333[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_RecommendedENBItem_ExtIEs_tag2el_333[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_RecommendedENBItem_ExtIEs_specs_333 = { sizeof(struct S1AP_RecommendedENBItem_ExtIEs), offsetof(struct S1AP_RecommendedENBItem_ExtIEs, _asn_ctx), asn_MAP_S1AP_RecommendedENBItem_ExtIEs_tag2el_333, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedENBItem_ExtIEs = { "RecommendedENBItem-ExtIEs", "RecommendedENBItem-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_RecommendedENBItem_ExtIEs_tags_333, sizeof(asn_DEF_S1AP_RecommendedENBItem_ExtIEs_tags_333) /sizeof(asn_DEF_S1AP_RecommendedENBItem_ExtIEs_tags_333[0]), /* 1 */ asn_DEF_S1AP_RecommendedENBItem_ExtIEs_tags_333, /* Same as above */ sizeof(asn_DEF_S1AP_RecommendedENBItem_ExtIEs_tags_333) /sizeof(asn_DEF_S1AP_RecommendedENBItem_ExtIEs_tags_333[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_RecommendedENBItem_ExtIEs_333, 3, /* Elements count */ &asn_SPC_S1AP_RecommendedENBItem_ExtIEs_specs_333 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_340 = { sizeof(struct S1AP_RequestType_ExtIEs__extensionValue), offsetof(struct S1AP_RequestType_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_RequestType_ExtIEs__extensionValue, present), sizeof(((struct S1AP_RequestType_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_340 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_340 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_RequestType_ExtIEs_337[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RequestType_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_338, &asn_PER_memb_S1AP_id_constr_338, memb_S1AP_id_constraint_337 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_RequestType_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_339, &asn_PER_memb_S1AP_criticality_constr_339, memb_S1AP_criticality_constraint_337 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_RequestType_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_340, 0, { &asn_OER_memb_S1AP_extensionValue_constr_340, &asn_PER_memb_S1AP_extensionValue_constr_340, memb_S1AP_extensionValue_constraint_337 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_RequestType_ExtIEs_tags_337[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_RequestType_ExtIEs_tag2el_337[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_RequestType_ExtIEs_specs_337 = { sizeof(struct S1AP_RequestType_ExtIEs), offsetof(struct S1AP_RequestType_ExtIEs, _asn_ctx), asn_MAP_S1AP_RequestType_ExtIEs_tag2el_337, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_RequestType_ExtIEs = { "RequestType-ExtIEs", "RequestType-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_RequestType_ExtIEs_tags_337, sizeof(asn_DEF_S1AP_RequestType_ExtIEs_tags_337) /sizeof(asn_DEF_S1AP_RequestType_ExtIEs_tags_337[0]), /* 1 */ asn_DEF_S1AP_RequestType_ExtIEs_tags_337, /* Same as above */ sizeof(asn_DEF_S1AP_RequestType_ExtIEs_tags_337) /sizeof(asn_DEF_S1AP_RequestType_ExtIEs_tags_337[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_RequestType_ExtIEs_337, 3, /* Elements count */ &asn_SPC_S1AP_RequestType_ExtIEs_specs_337 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_344 = { sizeof(struct S1AP_RIMTransfer_ExtIEs__extensionValue), offsetof(struct S1AP_RIMTransfer_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_RIMTransfer_ExtIEs__extensionValue, present), sizeof(((struct S1AP_RIMTransfer_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_344 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_344 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_RIMTransfer_ExtIEs_341[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RIMTransfer_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_342, &asn_PER_memb_S1AP_id_constr_342, memb_S1AP_id_constraint_341 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_RIMTransfer_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_343, &asn_PER_memb_S1AP_criticality_constr_343, memb_S1AP_criticality_constraint_341 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_RIMTransfer_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_344, 0, { &asn_OER_memb_S1AP_extensionValue_constr_344, &asn_PER_memb_S1AP_extensionValue_constr_344, memb_S1AP_extensionValue_constraint_341 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_RIMTransfer_ExtIEs_tags_341[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_RIMTransfer_ExtIEs_tag2el_341[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_RIMTransfer_ExtIEs_specs_341 = { sizeof(struct S1AP_RIMTransfer_ExtIEs), offsetof(struct S1AP_RIMTransfer_ExtIEs, _asn_ctx), asn_MAP_S1AP_RIMTransfer_ExtIEs_tag2el_341, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_RIMTransfer_ExtIEs = { "RIMTransfer-ExtIEs", "RIMTransfer-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_RIMTransfer_ExtIEs_tags_341, sizeof(asn_DEF_S1AP_RIMTransfer_ExtIEs_tags_341) /sizeof(asn_DEF_S1AP_RIMTransfer_ExtIEs_tags_341[0]), /* 1 */ asn_DEF_S1AP_RIMTransfer_ExtIEs_tags_341, /* Same as above */ sizeof(asn_DEF_S1AP_RIMTransfer_ExtIEs_tags_341) /sizeof(asn_DEF_S1AP_RIMTransfer_ExtIEs_tags_341[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_RIMTransfer_ExtIEs_341, 3, /* Elements count */ &asn_SPC_S1AP_RIMTransfer_ExtIEs_specs_341 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_348 = { sizeof(struct S1AP_RLFReportInformation_ExtIEs__extensionValue), offsetof(struct S1AP_RLFReportInformation_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_RLFReportInformation_ExtIEs__extensionValue, present), sizeof(((struct S1AP_RLFReportInformation_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_348 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_348 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_RLFReportInformation_ExtIEs_345[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RLFReportInformation_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_346, &asn_PER_memb_S1AP_id_constr_346, memb_S1AP_id_constraint_345 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_RLFReportInformation_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_347, &asn_PER_memb_S1AP_criticality_constr_347, memb_S1AP_criticality_constraint_345 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_RLFReportInformation_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_348, 0, { &asn_OER_memb_S1AP_extensionValue_constr_348, &asn_PER_memb_S1AP_extensionValue_constr_348, memb_S1AP_extensionValue_constraint_345 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_RLFReportInformation_ExtIEs_tags_345[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_RLFReportInformation_ExtIEs_tag2el_345[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_RLFReportInformation_ExtIEs_specs_345 = { sizeof(struct S1AP_RLFReportInformation_ExtIEs), offsetof(struct S1AP_RLFReportInformation_ExtIEs, _asn_ctx), asn_MAP_S1AP_RLFReportInformation_ExtIEs_tag2el_345, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_RLFReportInformation_ExtIEs = { "RLFReportInformation-ExtIEs", "RLFReportInformation-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_RLFReportInformation_ExtIEs_tags_345, sizeof(asn_DEF_S1AP_RLFReportInformation_ExtIEs_tags_345) /sizeof(asn_DEF_S1AP_RLFReportInformation_ExtIEs_tags_345[0]), /* 1 */ asn_DEF_S1AP_RLFReportInformation_ExtIEs_tags_345, /* Same as above */ sizeof(asn_DEF_S1AP_RLFReportInformation_ExtIEs_tags_345) /sizeof(asn_DEF_S1AP_RLFReportInformation_ExtIEs_tags_345[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_RLFReportInformation_ExtIEs_345, 3, /* Elements count */ &asn_SPC_S1AP_RLFReportInformation_ExtIEs_specs_345 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_352 = { sizeof(struct S1AP_SecurityContext_ExtIEs__extensionValue), offsetof(struct S1AP_SecurityContext_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_SecurityContext_ExtIEs__extensionValue, present), sizeof(((struct S1AP_SecurityContext_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_352 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_352 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_SecurityContext_ExtIEs_349[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_SecurityContext_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_350, &asn_PER_memb_S1AP_id_constr_350, memb_S1AP_id_constraint_349 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SecurityContext_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_351, &asn_PER_memb_S1AP_criticality_constr_351, memb_S1AP_criticality_constraint_349 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_SecurityContext_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_352, 0, { &asn_OER_memb_S1AP_extensionValue_constr_352, &asn_PER_memb_S1AP_extensionValue_constr_352, memb_S1AP_extensionValue_constraint_349 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_SecurityContext_ExtIEs_tags_349[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_SecurityContext_ExtIEs_tag2el_349[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_SecurityContext_ExtIEs_specs_349 = { sizeof(struct S1AP_SecurityContext_ExtIEs), offsetof(struct S1AP_SecurityContext_ExtIEs, _asn_ctx), asn_MAP_S1AP_SecurityContext_ExtIEs_tag2el_349, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_SecurityContext_ExtIEs = { "SecurityContext-ExtIEs", "SecurityContext-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_SecurityContext_ExtIEs_tags_349, sizeof(asn_DEF_S1AP_SecurityContext_ExtIEs_tags_349) /sizeof(asn_DEF_S1AP_SecurityContext_ExtIEs_tags_349[0]), /* 1 */ asn_DEF_S1AP_SecurityContext_ExtIEs_tags_349, /* Same as above */ sizeof(asn_DEF_S1AP_SecurityContext_ExtIEs_tags_349) /sizeof(asn_DEF_S1AP_SecurityContext_ExtIEs_tags_349[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_SecurityContext_ExtIEs_349, 3, /* Elements count */ &asn_SPC_S1AP_SecurityContext_ExtIEs_specs_349 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_extensionValue_356[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_SONInformationReply_ExtIEs__extensionValue, choice.TimeSynchronisationInfo), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TimeSynchronisationInfo, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TimeSynchronisationInfo" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SONInformationReply_ExtIEs__extensionValue, choice.MutingPatternInformation), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_MutingPatternInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MutingPatternInformation" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_extensionValue_tag2el_356[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* TimeSynchronisationInfo */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 } /* MutingPatternInformation */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_356 = { sizeof(struct S1AP_SONInformationReply_ExtIEs__extensionValue), offsetof(struct S1AP_SONInformationReply_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_SONInformationReply_ExtIEs__extensionValue, present), sizeof(((struct S1AP_SONInformationReply_ExtIEs__extensionValue *)0)->present), asn_MAP_S1AP_extensionValue_tag2el_356, 2, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_356 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_extensionValue_356, 2, /* Elements count */ &asn_SPC_S1AP_extensionValue_specs_356 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_SONInformationReply_ExtIEs_353[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_SONInformationReply_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_354, &asn_PER_memb_S1AP_id_constr_354, memb_S1AP_id_constraint_353 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SONInformationReply_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_SONInformationReply_ExtIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_355, &asn_PER_memb_S1AP_criticality_constr_355, memb_S1AP_criticality_constraint_353 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_SONInformationReply_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_356, select_SONInformationReply_ExtIEs_S1AP_extensionValue_type, { &asn_OER_memb_S1AP_extensionValue_constr_356, &asn_PER_memb_S1AP_extensionValue_constr_356, memb_S1AP_extensionValue_constraint_353 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_SONInformationReply_ExtIEs_tags_353[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_SONInformationReply_ExtIEs_tag2el_353[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_SONInformationReply_ExtIEs_specs_353 = { sizeof(struct S1AP_SONInformationReply_ExtIEs), offsetof(struct S1AP_SONInformationReply_ExtIEs, _asn_ctx), asn_MAP_S1AP_SONInformationReply_ExtIEs_tag2el_353, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_SONInformationReply_ExtIEs = { "SONInformationReply-ExtIEs", "SONInformationReply-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_SONInformationReply_ExtIEs_tags_353, sizeof(asn_DEF_S1AP_SONInformationReply_ExtIEs_tags_353) /sizeof(asn_DEF_S1AP_SONInformationReply_ExtIEs_tags_353[0]), /* 1 */ asn_DEF_S1AP_SONInformationReply_ExtIEs_tags_353, /* Same as above */ sizeof(asn_DEF_S1AP_SONInformationReply_ExtIEs_tags_353) /sizeof(asn_DEF_S1AP_SONInformationReply_ExtIEs_tags_353[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_SONInformationReply_ExtIEs_353, 3, /* Elements count */ &asn_SPC_S1AP_SONInformationReply_ExtIEs_specs_353 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_extensionValue_360[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_SONConfigurationTransfer_ExtIEs__extensionValue, choice.X2TNLConfigurationInfo), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_X2TNLConfigurationInfo, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "X2TNLConfigurationInfo" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SONConfigurationTransfer_ExtIEs__extensionValue, choice.SynchronisationInformation), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_SynchronisationInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SynchronisationInformation" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_extensionValue_tag2el_360[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* X2TNLConfigurationInfo */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 } /* SynchronisationInformation */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_360 = { sizeof(struct S1AP_SONConfigurationTransfer_ExtIEs__extensionValue), offsetof(struct S1AP_SONConfigurationTransfer_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_SONConfigurationTransfer_ExtIEs__extensionValue, present), sizeof(((struct S1AP_SONConfigurationTransfer_ExtIEs__extensionValue *)0)->present), asn_MAP_S1AP_extensionValue_tag2el_360, 2, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_360 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_extensionValue_360, 2, /* Elements count */ &asn_SPC_S1AP_extensionValue_specs_360 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_SONConfigurationTransfer_ExtIEs_357[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_SONConfigurationTransfer_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_358, &asn_PER_memb_S1AP_id_constr_358, memb_S1AP_id_constraint_357 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SONConfigurationTransfer_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_SONConfigurationTransfer_ExtIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_359, &asn_PER_memb_S1AP_criticality_constr_359, memb_S1AP_criticality_constraint_357 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_SONConfigurationTransfer_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_360, select_SONConfigurationTransfer_ExtIEs_S1AP_extensionValue_type, { &asn_OER_memb_S1AP_extensionValue_constr_360, &asn_PER_memb_S1AP_extensionValue_constr_360, memb_S1AP_extensionValue_constraint_357 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_SONConfigurationTransfer_ExtIEs_tags_357[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_SONConfigurationTransfer_ExtIEs_tag2el_357[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_SONConfigurationTransfer_ExtIEs_specs_357 = { sizeof(struct S1AP_SONConfigurationTransfer_ExtIEs), offsetof(struct S1AP_SONConfigurationTransfer_ExtIEs, _asn_ctx), asn_MAP_S1AP_SONConfigurationTransfer_ExtIEs_tag2el_357, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_SONConfigurationTransfer_ExtIEs = { "SONConfigurationTransfer-ExtIEs", "SONConfigurationTransfer-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_SONConfigurationTransfer_ExtIEs_tags_357, sizeof(asn_DEF_S1AP_SONConfigurationTransfer_ExtIEs_tags_357) /sizeof(asn_DEF_S1AP_SONConfigurationTransfer_ExtIEs_tags_357[0]), /* 1 */ asn_DEF_S1AP_SONConfigurationTransfer_ExtIEs_tags_357, /* Same as above */ sizeof(asn_DEF_S1AP_SONConfigurationTransfer_ExtIEs_tags_357) /sizeof(asn_DEF_S1AP_SONConfigurationTransfer_ExtIEs_tags_357[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_SONConfigurationTransfer_ExtIEs_357, 3, /* Elements count */ &asn_SPC_S1AP_SONConfigurationTransfer_ExtIEs_specs_357 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_364 = { sizeof(struct S1AP_SynchronisationInformation_ExtIEs__extensionValue), offsetof(struct S1AP_SynchronisationInformation_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_SynchronisationInformation_ExtIEs__extensionValue, present), sizeof(((struct S1AP_SynchronisationInformation_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_364 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_364 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_SynchronisationInformation_ExtIEs_361[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_SynchronisationInformation_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_362, &asn_PER_memb_S1AP_id_constr_362, memb_S1AP_id_constraint_361 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SynchronisationInformation_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_363, &asn_PER_memb_S1AP_criticality_constr_363, memb_S1AP_criticality_constraint_361 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_SynchronisationInformation_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_364, 0, { &asn_OER_memb_S1AP_extensionValue_constr_364, &asn_PER_memb_S1AP_extensionValue_constr_364, memb_S1AP_extensionValue_constraint_361 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_SynchronisationInformation_ExtIEs_tags_361[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_SynchronisationInformation_ExtIEs_tag2el_361[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_SynchronisationInformation_ExtIEs_specs_361 = { sizeof(struct S1AP_SynchronisationInformation_ExtIEs), offsetof(struct S1AP_SynchronisationInformation_ExtIEs, _asn_ctx), asn_MAP_S1AP_SynchronisationInformation_ExtIEs_tag2el_361, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_SynchronisationInformation_ExtIEs = { "SynchronisationInformation-ExtIEs", "SynchronisationInformation-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_SynchronisationInformation_ExtIEs_tags_361, sizeof(asn_DEF_S1AP_SynchronisationInformation_ExtIEs_tags_361) /sizeof(asn_DEF_S1AP_SynchronisationInformation_ExtIEs_tags_361[0]), /* 1 */ asn_DEF_S1AP_SynchronisationInformation_ExtIEs_tags_361, /* Same as above */ sizeof(asn_DEF_S1AP_SynchronisationInformation_ExtIEs_tags_361) /sizeof(asn_DEF_S1AP_SynchronisationInformation_ExtIEs_tags_361[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_SynchronisationInformation_ExtIEs_361, 3, /* Elements count */ &asn_SPC_S1AP_SynchronisationInformation_ExtIEs_specs_361 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_368 = { sizeof(struct S1AP_SourceeNB_ID_ExtIEs__extensionValue), offsetof(struct S1AP_SourceeNB_ID_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_SourceeNB_ID_ExtIEs__extensionValue, present), sizeof(((struct S1AP_SourceeNB_ID_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_368 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_368 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_SourceeNB_ID_ExtIEs_365[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_SourceeNB_ID_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_366, &asn_PER_memb_S1AP_id_constr_366, memb_S1AP_id_constraint_365 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SourceeNB_ID_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_367, &asn_PER_memb_S1AP_criticality_constr_367, memb_S1AP_criticality_constraint_365 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_SourceeNB_ID_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_368, 0, { &asn_OER_memb_S1AP_extensionValue_constr_368, &asn_PER_memb_S1AP_extensionValue_constr_368, memb_S1AP_extensionValue_constraint_365 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_SourceeNB_ID_ExtIEs_tags_365[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_SourceeNB_ID_ExtIEs_tag2el_365[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_SourceeNB_ID_ExtIEs_specs_365 = { sizeof(struct S1AP_SourceeNB_ID_ExtIEs), offsetof(struct S1AP_SourceeNB_ID_ExtIEs, _asn_ctx), asn_MAP_S1AP_SourceeNB_ID_ExtIEs_tag2el_365, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_SourceeNB_ID_ExtIEs = { "SourceeNB-ID-ExtIEs", "SourceeNB-ID-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_SourceeNB_ID_ExtIEs_tags_365, sizeof(asn_DEF_S1AP_SourceeNB_ID_ExtIEs_tags_365) /sizeof(asn_DEF_S1AP_SourceeNB_ID_ExtIEs_tags_365[0]), /* 1 */ asn_DEF_S1AP_SourceeNB_ID_ExtIEs_tags_365, /* Same as above */ sizeof(asn_DEF_S1AP_SourceeNB_ID_ExtIEs_tags_365) /sizeof(asn_DEF_S1AP_SourceeNB_ID_ExtIEs_tags_365[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_SourceeNB_ID_ExtIEs_365, 3, /* Elements count */ &asn_SPC_S1AP_SourceeNB_ID_ExtIEs_specs_365 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_extensionValue_372[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs__extensionValue, choice.MobilityInformation), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_MobilityInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MobilityInformation" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs__extensionValue, choice.UE_HistoryInformationFromTheUE), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_UE_HistoryInformationFromTheUE, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UE-HistoryInformationFromTheUE" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_extensionValue_tag2el_372[] = { { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 0 }, /* MobilityInformation */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 } /* UE-HistoryInformationFromTheUE */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_372 = { sizeof(struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs__extensionValue), offsetof(struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs__extensionValue, present), sizeof(((struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs__extensionValue *)0)->present), asn_MAP_S1AP_extensionValue_tag2el_372, 2, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_372 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_extensionValue_372, 2, /* Elements count */ &asn_SPC_S1AP_extensionValue_specs_372 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_369[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_370, &asn_PER_memb_S1AP_id_constr_370, memb_S1AP_id_constraint_369 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_371, &asn_PER_memb_S1AP_criticality_constr_371, memb_S1AP_criticality_constraint_369 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_372, select_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_S1AP_extensionValue_type, { &asn_OER_memb_S1AP_extensionValue_constr_372, &asn_PER_memb_S1AP_extensionValue_constr_372, memb_S1AP_extensionValue_constraint_369 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_tags_369[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_tag2el_369[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_specs_369 = { sizeof(struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs), offsetof(struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs, _asn_ctx), asn_MAP_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_tag2el_369, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs = { "SourceeNB-ToTargeteNB-TransparentContainer-ExtIEs", "SourceeNB-ToTargeteNB-TransparentContainer-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_tags_369, sizeof(asn_DEF_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_tags_369) /sizeof(asn_DEF_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_tags_369[0]), /* 1 */ asn_DEF_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_tags_369, /* Same as above */ sizeof(asn_DEF_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_tags_369) /sizeof(asn_DEF_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_tags_369[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_369, 3, /* Elements count */ &asn_SPC_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_specs_369 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_376 = { sizeof(struct S1AP_ServedGUMMEIsItem_ExtIEs__extensionValue), offsetof(struct S1AP_ServedGUMMEIsItem_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_ServedGUMMEIsItem_ExtIEs__extensionValue, present), sizeof(((struct S1AP_ServedGUMMEIsItem_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_376 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_376 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ServedGUMMEIsItem_ExtIEs_373[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ServedGUMMEIsItem_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_374, &asn_PER_memb_S1AP_id_constr_374, memb_S1AP_id_constraint_373 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ServedGUMMEIsItem_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_375, &asn_PER_memb_S1AP_criticality_constr_375, memb_S1AP_criticality_constraint_373 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_ServedGUMMEIsItem_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_376, 0, { &asn_OER_memb_S1AP_extensionValue_constr_376, &asn_PER_memb_S1AP_extensionValue_constr_376, memb_S1AP_extensionValue_constraint_373 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ServedGUMMEIsItem_ExtIEs_tags_373[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ServedGUMMEIsItem_ExtIEs_tag2el_373[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ServedGUMMEIsItem_ExtIEs_specs_373 = { sizeof(struct S1AP_ServedGUMMEIsItem_ExtIEs), offsetof(struct S1AP_ServedGUMMEIsItem_ExtIEs, _asn_ctx), asn_MAP_S1AP_ServedGUMMEIsItem_ExtIEs_tag2el_373, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ServedGUMMEIsItem_ExtIEs = { "ServedGUMMEIsItem-ExtIEs", "ServedGUMMEIsItem-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_ServedGUMMEIsItem_ExtIEs_tags_373, sizeof(asn_DEF_S1AP_ServedGUMMEIsItem_ExtIEs_tags_373) /sizeof(asn_DEF_S1AP_ServedGUMMEIsItem_ExtIEs_tags_373[0]), /* 1 */ asn_DEF_S1AP_ServedGUMMEIsItem_ExtIEs_tags_373, /* Same as above */ sizeof(asn_DEF_S1AP_ServedGUMMEIsItem_ExtIEs_tags_373) /sizeof(asn_DEF_S1AP_ServedGUMMEIsItem_ExtIEs_tags_373[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ServedGUMMEIsItem_ExtIEs_373, 3, /* Elements count */ &asn_SPC_S1AP_ServedGUMMEIsItem_ExtIEs_specs_373 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_extensionValue_380[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_SupportedTAs_Item_ExtIEs__extensionValue, choice.RAT_Type), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_RAT_Type, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "RAT-Type" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_extensionValue_tag2el_380[] = { { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* RAT-Type */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_380 = { sizeof(struct S1AP_SupportedTAs_Item_ExtIEs__extensionValue), offsetof(struct S1AP_SupportedTAs_Item_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_SupportedTAs_Item_ExtIEs__extensionValue, present), sizeof(((struct S1AP_SupportedTAs_Item_ExtIEs__extensionValue *)0)->present), asn_MAP_S1AP_extensionValue_tag2el_380, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_380 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_extensionValue_380, 1, /* Elements count */ &asn_SPC_S1AP_extensionValue_specs_380 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_SupportedTAs_Item_ExtIEs_377[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_SupportedTAs_Item_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_378, &asn_PER_memb_S1AP_id_constr_378, memb_S1AP_id_constraint_377 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SupportedTAs_Item_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_SupportedTAs_Item_ExtIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_379, &asn_PER_memb_S1AP_criticality_constr_379, memb_S1AP_criticality_constraint_377 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_SupportedTAs_Item_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_380, select_SupportedTAs_Item_ExtIEs_S1AP_extensionValue_type, { &asn_OER_memb_S1AP_extensionValue_constr_380, &asn_PER_memb_S1AP_extensionValue_constr_380, memb_S1AP_extensionValue_constraint_377 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_SupportedTAs_Item_ExtIEs_tags_377[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_SupportedTAs_Item_ExtIEs_tag2el_377[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_SupportedTAs_Item_ExtIEs_specs_377 = { sizeof(struct S1AP_SupportedTAs_Item_ExtIEs), offsetof(struct S1AP_SupportedTAs_Item_ExtIEs, _asn_ctx), asn_MAP_S1AP_SupportedTAs_Item_ExtIEs_tag2el_377, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_SupportedTAs_Item_ExtIEs = { "SupportedTAs-Item-ExtIEs", "SupportedTAs-Item-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_SupportedTAs_Item_ExtIEs_tags_377, sizeof(asn_DEF_S1AP_SupportedTAs_Item_ExtIEs_tags_377) /sizeof(asn_DEF_S1AP_SupportedTAs_Item_ExtIEs_tags_377[0]), /* 1 */ asn_DEF_S1AP_SupportedTAs_Item_ExtIEs_tags_377, /* Same as above */ sizeof(asn_DEF_S1AP_SupportedTAs_Item_ExtIEs_tags_377) /sizeof(asn_DEF_S1AP_SupportedTAs_Item_ExtIEs_tags_377[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_SupportedTAs_Item_ExtIEs_377, 3, /* Elements count */ &asn_SPC_S1AP_SupportedTAs_Item_ExtIEs_specs_377 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_extensionValue_384[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TimeSynchronisationInfo_ExtIEs__extensionValue, choice.MutingAvailabilityIndication), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_MutingAvailabilityIndication, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MutingAvailabilityIndication" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_extensionValue_tag2el_384[] = { { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, 0, 0 } /* MutingAvailabilityIndication */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_384 = { sizeof(struct S1AP_TimeSynchronisationInfo_ExtIEs__extensionValue), offsetof(struct S1AP_TimeSynchronisationInfo_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_TimeSynchronisationInfo_ExtIEs__extensionValue, present), sizeof(((struct S1AP_TimeSynchronisationInfo_ExtIEs__extensionValue *)0)->present), asn_MAP_S1AP_extensionValue_tag2el_384, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_384 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_extensionValue_384, 1, /* Elements count */ &asn_SPC_S1AP_extensionValue_specs_384 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_TimeSynchronisationInfo_ExtIEs_381[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TimeSynchronisationInfo_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_382, &asn_PER_memb_S1AP_id_constr_382, memb_S1AP_id_constraint_381 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TimeSynchronisationInfo_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_TimeSynchronisationInfo_ExtIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_383, &asn_PER_memb_S1AP_criticality_constr_383, memb_S1AP_criticality_constraint_381 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_TimeSynchronisationInfo_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_384, select_TimeSynchronisationInfo_ExtIEs_S1AP_extensionValue_type, { &asn_OER_memb_S1AP_extensionValue_constr_384, &asn_PER_memb_S1AP_extensionValue_constr_384, memb_S1AP_extensionValue_constraint_381 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TimeSynchronisationInfo_ExtIEs_tags_381[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TimeSynchronisationInfo_ExtIEs_tag2el_381[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_TimeSynchronisationInfo_ExtIEs_specs_381 = { sizeof(struct S1AP_TimeSynchronisationInfo_ExtIEs), offsetof(struct S1AP_TimeSynchronisationInfo_ExtIEs, _asn_ctx), asn_MAP_S1AP_TimeSynchronisationInfo_ExtIEs_tag2el_381, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TimeSynchronisationInfo_ExtIEs = { "TimeSynchronisationInfo-ExtIEs", "TimeSynchronisationInfo-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_TimeSynchronisationInfo_ExtIEs_tags_381, sizeof(asn_DEF_S1AP_TimeSynchronisationInfo_ExtIEs_tags_381) /sizeof(asn_DEF_S1AP_TimeSynchronisationInfo_ExtIEs_tags_381[0]), /* 1 */ asn_DEF_S1AP_TimeSynchronisationInfo_ExtIEs_tags_381, /* Same as above */ sizeof(asn_DEF_S1AP_TimeSynchronisationInfo_ExtIEs_tags_381) /sizeof(asn_DEF_S1AP_TimeSynchronisationInfo_ExtIEs_tags_381[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TimeSynchronisationInfo_ExtIEs_381, 3, /* Elements count */ &asn_SPC_S1AP_TimeSynchronisationInfo_ExtIEs_specs_381 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_388 = { sizeof(struct S1AP_S_TMSI_ExtIEs__extensionValue), offsetof(struct S1AP_S_TMSI_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_S_TMSI_ExtIEs__extensionValue, present), sizeof(((struct S1AP_S_TMSI_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_388 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_388 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_S_TMSI_ExtIEs_385[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_S_TMSI_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_386, &asn_PER_memb_S1AP_id_constr_386, memb_S1AP_id_constraint_385 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_S_TMSI_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_387, &asn_PER_memb_S1AP_criticality_constr_387, memb_S1AP_criticality_constraint_385 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_S_TMSI_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_388, 0, { &asn_OER_memb_S1AP_extensionValue_constr_388, &asn_PER_memb_S1AP_extensionValue_constr_388, memb_S1AP_extensionValue_constraint_385 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_S_TMSI_ExtIEs_tags_385[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_S_TMSI_ExtIEs_tag2el_385[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_S_TMSI_ExtIEs_specs_385 = { sizeof(struct S1AP_S_TMSI_ExtIEs), offsetof(struct S1AP_S_TMSI_ExtIEs, _asn_ctx), asn_MAP_S1AP_S_TMSI_ExtIEs_tag2el_385, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_S_TMSI_ExtIEs = { "S-TMSI-ExtIEs", "S-TMSI-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_S_TMSI_ExtIEs_tags_385, sizeof(asn_DEF_S1AP_S_TMSI_ExtIEs_tags_385) /sizeof(asn_DEF_S1AP_S_TMSI_ExtIEs_tags_385[0]), /* 1 */ asn_DEF_S1AP_S_TMSI_ExtIEs_tags_385, /* Same as above */ sizeof(asn_DEF_S1AP_S_TMSI_ExtIEs_tags_385) /sizeof(asn_DEF_S1AP_S_TMSI_ExtIEs_tags_385[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_S_TMSI_ExtIEs_385, 3, /* Elements count */ &asn_SPC_S1AP_S_TMSI_ExtIEs_specs_385 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_392 = { sizeof(struct S1AP_TAIBasedMDT_ExtIEs__extensionValue), offsetof(struct S1AP_TAIBasedMDT_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_TAIBasedMDT_ExtIEs__extensionValue, present), sizeof(((struct S1AP_TAIBasedMDT_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_392 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_392 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_TAIBasedMDT_ExtIEs_389[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TAIBasedMDT_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_390, &asn_PER_memb_S1AP_id_constr_390, memb_S1AP_id_constraint_389 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TAIBasedMDT_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_391, &asn_PER_memb_S1AP_criticality_constr_391, memb_S1AP_criticality_constraint_389 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_TAIBasedMDT_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_392, 0, { &asn_OER_memb_S1AP_extensionValue_constr_392, &asn_PER_memb_S1AP_extensionValue_constr_392, memb_S1AP_extensionValue_constraint_389 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TAIBasedMDT_ExtIEs_tags_389[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TAIBasedMDT_ExtIEs_tag2el_389[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_TAIBasedMDT_ExtIEs_specs_389 = { sizeof(struct S1AP_TAIBasedMDT_ExtIEs), offsetof(struct S1AP_TAIBasedMDT_ExtIEs, _asn_ctx), asn_MAP_S1AP_TAIBasedMDT_ExtIEs_tag2el_389, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TAIBasedMDT_ExtIEs = { "TAIBasedMDT-ExtIEs", "TAIBasedMDT-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_TAIBasedMDT_ExtIEs_tags_389, sizeof(asn_DEF_S1AP_TAIBasedMDT_ExtIEs_tags_389) /sizeof(asn_DEF_S1AP_TAIBasedMDT_ExtIEs_tags_389[0]), /* 1 */ asn_DEF_S1AP_TAIBasedMDT_ExtIEs_tags_389, /* Same as above */ sizeof(asn_DEF_S1AP_TAIBasedMDT_ExtIEs_tags_389) /sizeof(asn_DEF_S1AP_TAIBasedMDT_ExtIEs_tags_389[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TAIBasedMDT_ExtIEs_389, 3, /* Elements count */ &asn_SPC_S1AP_TAIBasedMDT_ExtIEs_specs_389 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_396 = { sizeof(struct S1AP_TAI_ExtIEs__extensionValue), offsetof(struct S1AP_TAI_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_TAI_ExtIEs__extensionValue, present), sizeof(((struct S1AP_TAI_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_396 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_396 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_TAI_ExtIEs_393[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TAI_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_394, &asn_PER_memb_S1AP_id_constr_394, memb_S1AP_id_constraint_393 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TAI_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_395, &asn_PER_memb_S1AP_criticality_constr_395, memb_S1AP_criticality_constraint_393 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_TAI_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_396, 0, { &asn_OER_memb_S1AP_extensionValue_constr_396, &asn_PER_memb_S1AP_extensionValue_constr_396, memb_S1AP_extensionValue_constraint_393 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TAI_ExtIEs_tags_393[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TAI_ExtIEs_tag2el_393[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_TAI_ExtIEs_specs_393 = { sizeof(struct S1AP_TAI_ExtIEs), offsetof(struct S1AP_TAI_ExtIEs, _asn_ctx), asn_MAP_S1AP_TAI_ExtIEs_tag2el_393, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TAI_ExtIEs = { "TAI-ExtIEs", "TAI-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_TAI_ExtIEs_tags_393, sizeof(asn_DEF_S1AP_TAI_ExtIEs_tags_393) /sizeof(asn_DEF_S1AP_TAI_ExtIEs_tags_393[0]), /* 1 */ asn_DEF_S1AP_TAI_ExtIEs_tags_393, /* Same as above */ sizeof(asn_DEF_S1AP_TAI_ExtIEs_tags_393) /sizeof(asn_DEF_S1AP_TAI_ExtIEs_tags_393[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TAI_ExtIEs_393, 3, /* Elements count */ &asn_SPC_S1AP_TAI_ExtIEs_specs_393 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_400 = { sizeof(struct S1AP_TAI_Broadcast_Item_ExtIEs__extensionValue), offsetof(struct S1AP_TAI_Broadcast_Item_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_TAI_Broadcast_Item_ExtIEs__extensionValue, present), sizeof(((struct S1AP_TAI_Broadcast_Item_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_400 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_400 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_TAI_Broadcast_Item_ExtIEs_397[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TAI_Broadcast_Item_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_398, &asn_PER_memb_S1AP_id_constr_398, memb_S1AP_id_constraint_397 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TAI_Broadcast_Item_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_399, &asn_PER_memb_S1AP_criticality_constr_399, memb_S1AP_criticality_constraint_397 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_TAI_Broadcast_Item_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_400, 0, { &asn_OER_memb_S1AP_extensionValue_constr_400, &asn_PER_memb_S1AP_extensionValue_constr_400, memb_S1AP_extensionValue_constraint_397 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TAI_Broadcast_Item_ExtIEs_tags_397[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TAI_Broadcast_Item_ExtIEs_tag2el_397[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_TAI_Broadcast_Item_ExtIEs_specs_397 = { sizeof(struct S1AP_TAI_Broadcast_Item_ExtIEs), offsetof(struct S1AP_TAI_Broadcast_Item_ExtIEs, _asn_ctx), asn_MAP_S1AP_TAI_Broadcast_Item_ExtIEs_tag2el_397, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TAI_Broadcast_Item_ExtIEs = { "TAI-Broadcast-Item-ExtIEs", "TAI-Broadcast-Item-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_TAI_Broadcast_Item_ExtIEs_tags_397, sizeof(asn_DEF_S1AP_TAI_Broadcast_Item_ExtIEs_tags_397) /sizeof(asn_DEF_S1AP_TAI_Broadcast_Item_ExtIEs_tags_397[0]), /* 1 */ asn_DEF_S1AP_TAI_Broadcast_Item_ExtIEs_tags_397, /* Same as above */ sizeof(asn_DEF_S1AP_TAI_Broadcast_Item_ExtIEs_tags_397) /sizeof(asn_DEF_S1AP_TAI_Broadcast_Item_ExtIEs_tags_397[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TAI_Broadcast_Item_ExtIEs_397, 3, /* Elements count */ &asn_SPC_S1AP_TAI_Broadcast_Item_ExtIEs_specs_397 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_404 = { sizeof(struct S1AP_TAI_Cancelled_Item_ExtIEs__extensionValue), offsetof(struct S1AP_TAI_Cancelled_Item_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_TAI_Cancelled_Item_ExtIEs__extensionValue, present), sizeof(((struct S1AP_TAI_Cancelled_Item_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_404 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_404 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_TAI_Cancelled_Item_ExtIEs_401[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TAI_Cancelled_Item_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_402, &asn_PER_memb_S1AP_id_constr_402, memb_S1AP_id_constraint_401 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TAI_Cancelled_Item_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_403, &asn_PER_memb_S1AP_criticality_constr_403, memb_S1AP_criticality_constraint_401 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_TAI_Cancelled_Item_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_404, 0, { &asn_OER_memb_S1AP_extensionValue_constr_404, &asn_PER_memb_S1AP_extensionValue_constr_404, memb_S1AP_extensionValue_constraint_401 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TAI_Cancelled_Item_ExtIEs_tags_401[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TAI_Cancelled_Item_ExtIEs_tag2el_401[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_TAI_Cancelled_Item_ExtIEs_specs_401 = { sizeof(struct S1AP_TAI_Cancelled_Item_ExtIEs), offsetof(struct S1AP_TAI_Cancelled_Item_ExtIEs, _asn_ctx), asn_MAP_S1AP_TAI_Cancelled_Item_ExtIEs_tag2el_401, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TAI_Cancelled_Item_ExtIEs = { "TAI-Cancelled-Item-ExtIEs", "TAI-Cancelled-Item-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_TAI_Cancelled_Item_ExtIEs_tags_401, sizeof(asn_DEF_S1AP_TAI_Cancelled_Item_ExtIEs_tags_401) /sizeof(asn_DEF_S1AP_TAI_Cancelled_Item_ExtIEs_tags_401[0]), /* 1 */ asn_DEF_S1AP_TAI_Cancelled_Item_ExtIEs_tags_401, /* Same as above */ sizeof(asn_DEF_S1AP_TAI_Cancelled_Item_ExtIEs_tags_401) /sizeof(asn_DEF_S1AP_TAI_Cancelled_Item_ExtIEs_tags_401[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TAI_Cancelled_Item_ExtIEs_401, 3, /* Elements count */ &asn_SPC_S1AP_TAI_Cancelled_Item_ExtIEs_specs_401 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_408 = { sizeof(struct S1AP_TABasedMDT_ExtIEs__extensionValue), offsetof(struct S1AP_TABasedMDT_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_TABasedMDT_ExtIEs__extensionValue, present), sizeof(((struct S1AP_TABasedMDT_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_408 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_408 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_TABasedMDT_ExtIEs_405[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TABasedMDT_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_406, &asn_PER_memb_S1AP_id_constr_406, memb_S1AP_id_constraint_405 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TABasedMDT_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_407, &asn_PER_memb_S1AP_criticality_constr_407, memb_S1AP_criticality_constraint_405 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_TABasedMDT_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_408, 0, { &asn_OER_memb_S1AP_extensionValue_constr_408, &asn_PER_memb_S1AP_extensionValue_constr_408, memb_S1AP_extensionValue_constraint_405 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TABasedMDT_ExtIEs_tags_405[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TABasedMDT_ExtIEs_tag2el_405[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_TABasedMDT_ExtIEs_specs_405 = { sizeof(struct S1AP_TABasedMDT_ExtIEs), offsetof(struct S1AP_TABasedMDT_ExtIEs, _asn_ctx), asn_MAP_S1AP_TABasedMDT_ExtIEs_tag2el_405, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TABasedMDT_ExtIEs = { "TABasedMDT-ExtIEs", "TABasedMDT-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_TABasedMDT_ExtIEs_tags_405, sizeof(asn_DEF_S1AP_TABasedMDT_ExtIEs_tags_405) /sizeof(asn_DEF_S1AP_TABasedMDT_ExtIEs_tags_405[0]), /* 1 */ asn_DEF_S1AP_TABasedMDT_ExtIEs_tags_405, /* Same as above */ sizeof(asn_DEF_S1AP_TABasedMDT_ExtIEs_tags_405) /sizeof(asn_DEF_S1AP_TABasedMDT_ExtIEs_tags_405[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TABasedMDT_ExtIEs_405, 3, /* Elements count */ &asn_SPC_S1AP_TABasedMDT_ExtIEs_specs_405 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_412 = { sizeof(struct S1AP_CompletedCellinTAI_Item_ExtIEs__extensionValue), offsetof(struct S1AP_CompletedCellinTAI_Item_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_CompletedCellinTAI_Item_ExtIEs__extensionValue, present), sizeof(((struct S1AP_CompletedCellinTAI_Item_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_412 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_412 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_CompletedCellinTAI_Item_ExtIEs_409[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CompletedCellinTAI_Item_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_410, &asn_PER_memb_S1AP_id_constr_410, memb_S1AP_id_constraint_409 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CompletedCellinTAI_Item_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_411, &asn_PER_memb_S1AP_criticality_constr_411, memb_S1AP_criticality_constraint_409 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_CompletedCellinTAI_Item_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_412, 0, { &asn_OER_memb_S1AP_extensionValue_constr_412, &asn_PER_memb_S1AP_extensionValue_constr_412, memb_S1AP_extensionValue_constraint_409 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CompletedCellinTAI_Item_ExtIEs_tags_409[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CompletedCellinTAI_Item_ExtIEs_tag2el_409[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CompletedCellinTAI_Item_ExtIEs_specs_409 = { sizeof(struct S1AP_CompletedCellinTAI_Item_ExtIEs), offsetof(struct S1AP_CompletedCellinTAI_Item_ExtIEs, _asn_ctx), asn_MAP_S1AP_CompletedCellinTAI_Item_ExtIEs_tag2el_409, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CompletedCellinTAI_Item_ExtIEs = { "CompletedCellinTAI-Item-ExtIEs", "CompletedCellinTAI-Item-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_CompletedCellinTAI_Item_ExtIEs_tags_409, sizeof(asn_DEF_S1AP_CompletedCellinTAI_Item_ExtIEs_tags_409) /sizeof(asn_DEF_S1AP_CompletedCellinTAI_Item_ExtIEs_tags_409[0]), /* 1 */ asn_DEF_S1AP_CompletedCellinTAI_Item_ExtIEs_tags_409, /* Same as above */ sizeof(asn_DEF_S1AP_CompletedCellinTAI_Item_ExtIEs_tags_409) /sizeof(asn_DEF_S1AP_CompletedCellinTAI_Item_ExtIEs_tags_409[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CompletedCellinTAI_Item_ExtIEs_409, 3, /* Elements count */ &asn_SPC_S1AP_CompletedCellinTAI_Item_ExtIEs_specs_409 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_416 = { sizeof(struct S1AP_TargeteNB_ID_ExtIEs__extensionValue), offsetof(struct S1AP_TargeteNB_ID_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_TargeteNB_ID_ExtIEs__extensionValue, present), sizeof(((struct S1AP_TargeteNB_ID_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_416 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_416 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_TargeteNB_ID_ExtIEs_413[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TargeteNB_ID_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_414, &asn_PER_memb_S1AP_id_constr_414, memb_S1AP_id_constraint_413 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TargeteNB_ID_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_415, &asn_PER_memb_S1AP_criticality_constr_415, memb_S1AP_criticality_constraint_413 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_TargeteNB_ID_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_416, 0, { &asn_OER_memb_S1AP_extensionValue_constr_416, &asn_PER_memb_S1AP_extensionValue_constr_416, memb_S1AP_extensionValue_constraint_413 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TargeteNB_ID_ExtIEs_tags_413[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TargeteNB_ID_ExtIEs_tag2el_413[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_TargeteNB_ID_ExtIEs_specs_413 = { sizeof(struct S1AP_TargeteNB_ID_ExtIEs), offsetof(struct S1AP_TargeteNB_ID_ExtIEs, _asn_ctx), asn_MAP_S1AP_TargeteNB_ID_ExtIEs_tag2el_413, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TargeteNB_ID_ExtIEs = { "TargeteNB-ID-ExtIEs", "TargeteNB-ID-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_TargeteNB_ID_ExtIEs_tags_413, sizeof(asn_DEF_S1AP_TargeteNB_ID_ExtIEs_tags_413) /sizeof(asn_DEF_S1AP_TargeteNB_ID_ExtIEs_tags_413[0]), /* 1 */ asn_DEF_S1AP_TargeteNB_ID_ExtIEs_tags_413, /* Same as above */ sizeof(asn_DEF_S1AP_TargeteNB_ID_ExtIEs_tags_413) /sizeof(asn_DEF_S1AP_TargeteNB_ID_ExtIEs_tags_413[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TargeteNB_ID_ExtIEs_413, 3, /* Elements count */ &asn_SPC_S1AP_TargeteNB_ID_ExtIEs_specs_413 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_420 = { sizeof(struct S1AP_TargetRNC_ID_ExtIEs__extensionValue), offsetof(struct S1AP_TargetRNC_ID_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_TargetRNC_ID_ExtIEs__extensionValue, present), sizeof(((struct S1AP_TargetRNC_ID_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_420 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_420 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_TargetRNC_ID_ExtIEs_417[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TargetRNC_ID_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_418, &asn_PER_memb_S1AP_id_constr_418, memb_S1AP_id_constraint_417 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TargetRNC_ID_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_419, &asn_PER_memb_S1AP_criticality_constr_419, memb_S1AP_criticality_constraint_417 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_TargetRNC_ID_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_420, 0, { &asn_OER_memb_S1AP_extensionValue_constr_420, &asn_PER_memb_S1AP_extensionValue_constr_420, memb_S1AP_extensionValue_constraint_417 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TargetRNC_ID_ExtIEs_tags_417[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TargetRNC_ID_ExtIEs_tag2el_417[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_TargetRNC_ID_ExtIEs_specs_417 = { sizeof(struct S1AP_TargetRNC_ID_ExtIEs), offsetof(struct S1AP_TargetRNC_ID_ExtIEs, _asn_ctx), asn_MAP_S1AP_TargetRNC_ID_ExtIEs_tag2el_417, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TargetRNC_ID_ExtIEs = { "TargetRNC-ID-ExtIEs", "TargetRNC-ID-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_TargetRNC_ID_ExtIEs_tags_417, sizeof(asn_DEF_S1AP_TargetRNC_ID_ExtIEs_tags_417) /sizeof(asn_DEF_S1AP_TargetRNC_ID_ExtIEs_tags_417[0]), /* 1 */ asn_DEF_S1AP_TargetRNC_ID_ExtIEs_tags_417, /* Same as above */ sizeof(asn_DEF_S1AP_TargetRNC_ID_ExtIEs_tags_417) /sizeof(asn_DEF_S1AP_TargetRNC_ID_ExtIEs_tags_417[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TargetRNC_ID_ExtIEs_417, 3, /* Elements count */ &asn_SPC_S1AP_TargetRNC_ID_ExtIEs_specs_417 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_424 = { sizeof(struct S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs__extensionValue), offsetof(struct S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs__extensionValue, present), sizeof(((struct S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_424 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_424 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs_421[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_422, &asn_PER_memb_S1AP_id_constr_422, memb_S1AP_id_constraint_421 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_423, &asn_PER_memb_S1AP_criticality_constr_423, memb_S1AP_criticality_constraint_421 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_424, 0, { &asn_OER_memb_S1AP_extensionValue_constr_424, &asn_PER_memb_S1AP_extensionValue_constr_424, memb_S1AP_extensionValue_constraint_421 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs_tags_421[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs_tag2el_421[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs_specs_421 = { sizeof(struct S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs), offsetof(struct S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs, _asn_ctx), asn_MAP_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs_tag2el_421, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs = { "TargeteNB-ToSourceeNB-TransparentContainer-ExtIEs", "TargeteNB-ToSourceeNB-TransparentContainer-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs_tags_421, sizeof(asn_DEF_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs_tags_421) /sizeof(asn_DEF_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs_tags_421[0]), /* 1 */ asn_DEF_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs_tags_421, /* Same as above */ sizeof(asn_DEF_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs_tags_421) /sizeof(asn_DEF_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs_tags_421[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs_421, 3, /* Elements count */ &asn_SPC_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs_specs_421 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_428 = { sizeof(struct S1AP_M1ThresholdEventA2_ExtIEs__extensionValue), offsetof(struct S1AP_M1ThresholdEventA2_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_M1ThresholdEventA2_ExtIEs__extensionValue, present), sizeof(((struct S1AP_M1ThresholdEventA2_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_428 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_428 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_M1ThresholdEventA2_ExtIEs_425[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_M1ThresholdEventA2_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_426, &asn_PER_memb_S1AP_id_constr_426, memb_S1AP_id_constraint_425 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_M1ThresholdEventA2_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_427, &asn_PER_memb_S1AP_criticality_constr_427, memb_S1AP_criticality_constraint_425 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_M1ThresholdEventA2_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_428, 0, { &asn_OER_memb_S1AP_extensionValue_constr_428, &asn_PER_memb_S1AP_extensionValue_constr_428, memb_S1AP_extensionValue_constraint_425 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_M1ThresholdEventA2_ExtIEs_tags_425[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_M1ThresholdEventA2_ExtIEs_tag2el_425[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_M1ThresholdEventA2_ExtIEs_specs_425 = { sizeof(struct S1AP_M1ThresholdEventA2_ExtIEs), offsetof(struct S1AP_M1ThresholdEventA2_ExtIEs, _asn_ctx), asn_MAP_S1AP_M1ThresholdEventA2_ExtIEs_tag2el_425, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_M1ThresholdEventA2_ExtIEs = { "M1ThresholdEventA2-ExtIEs", "M1ThresholdEventA2-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_M1ThresholdEventA2_ExtIEs_tags_425, sizeof(asn_DEF_S1AP_M1ThresholdEventA2_ExtIEs_tags_425) /sizeof(asn_DEF_S1AP_M1ThresholdEventA2_ExtIEs_tags_425[0]), /* 1 */ asn_DEF_S1AP_M1ThresholdEventA2_ExtIEs_tags_425, /* Same as above */ sizeof(asn_DEF_S1AP_M1ThresholdEventA2_ExtIEs_tags_425) /sizeof(asn_DEF_S1AP_M1ThresholdEventA2_ExtIEs_tags_425[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_M1ThresholdEventA2_ExtIEs_425, 3, /* Elements count */ &asn_SPC_S1AP_M1ThresholdEventA2_ExtIEs_specs_425 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_extensionValue_432[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TraceActivation_ExtIEs__extensionValue, choice.MDT_Configuration), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_MDT_Configuration, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MDT-Configuration" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_extensionValue_tag2el_432[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* MDT-Configuration */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_432 = { sizeof(struct S1AP_TraceActivation_ExtIEs__extensionValue), offsetof(struct S1AP_TraceActivation_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_TraceActivation_ExtIEs__extensionValue, present), sizeof(((struct S1AP_TraceActivation_ExtIEs__extensionValue *)0)->present), asn_MAP_S1AP_extensionValue_tag2el_432, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_432 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_extensionValue_432, 1, /* Elements count */ &asn_SPC_S1AP_extensionValue_specs_432 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_TraceActivation_ExtIEs_429[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TraceActivation_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_430, &asn_PER_memb_S1AP_id_constr_430, memb_S1AP_id_constraint_429 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TraceActivation_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_TraceActivation_ExtIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_431, &asn_PER_memb_S1AP_criticality_constr_431, memb_S1AP_criticality_constraint_429 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_TraceActivation_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_432, select_TraceActivation_ExtIEs_S1AP_extensionValue_type, { &asn_OER_memb_S1AP_extensionValue_constr_432, &asn_PER_memb_S1AP_extensionValue_constr_432, memb_S1AP_extensionValue_constraint_429 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TraceActivation_ExtIEs_tags_429[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TraceActivation_ExtIEs_tag2el_429[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_TraceActivation_ExtIEs_specs_429 = { sizeof(struct S1AP_TraceActivation_ExtIEs), offsetof(struct S1AP_TraceActivation_ExtIEs, _asn_ctx), asn_MAP_S1AP_TraceActivation_ExtIEs_tag2el_429, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TraceActivation_ExtIEs = { "TraceActivation-ExtIEs", "TraceActivation-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_TraceActivation_ExtIEs_tags_429, sizeof(asn_DEF_S1AP_TraceActivation_ExtIEs_tags_429) /sizeof(asn_DEF_S1AP_TraceActivation_ExtIEs_tags_429[0]), /* 1 */ asn_DEF_S1AP_TraceActivation_ExtIEs_tags_429, /* Same as above */ sizeof(asn_DEF_S1AP_TraceActivation_ExtIEs_tags_429) /sizeof(asn_DEF_S1AP_TraceActivation_ExtIEs_tags_429[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TraceActivation_ExtIEs_429, 3, /* Elements count */ &asn_SPC_S1AP_TraceActivation_ExtIEs_specs_429 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_436 = { sizeof(struct S1AP_Tunnel_Information_ExtIEs__extensionValue), offsetof(struct S1AP_Tunnel_Information_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_Tunnel_Information_ExtIEs__extensionValue, present), sizeof(((struct S1AP_Tunnel_Information_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_436 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_436 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_Tunnel_Information_ExtIEs_433[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_Tunnel_Information_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_434, &asn_PER_memb_S1AP_id_constr_434, memb_S1AP_id_constraint_433 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_Tunnel_Information_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_435, &asn_PER_memb_S1AP_criticality_constr_435, memb_S1AP_criticality_constraint_433 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_Tunnel_Information_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_436, 0, { &asn_OER_memb_S1AP_extensionValue_constr_436, &asn_PER_memb_S1AP_extensionValue_constr_436, memb_S1AP_extensionValue_constraint_433 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_Tunnel_Information_ExtIEs_tags_433[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_Tunnel_Information_ExtIEs_tag2el_433[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_Tunnel_Information_ExtIEs_specs_433 = { sizeof(struct S1AP_Tunnel_Information_ExtIEs), offsetof(struct S1AP_Tunnel_Information_ExtIEs, _asn_ctx), asn_MAP_S1AP_Tunnel_Information_ExtIEs_tag2el_433, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_Tunnel_Information_ExtIEs = { "Tunnel-Information-ExtIEs", "Tunnel-Information-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_Tunnel_Information_ExtIEs_tags_433, sizeof(asn_DEF_S1AP_Tunnel_Information_ExtIEs_tags_433) /sizeof(asn_DEF_S1AP_Tunnel_Information_ExtIEs_tags_433[0]), /* 1 */ asn_DEF_S1AP_Tunnel_Information_ExtIEs_tags_433, /* Same as above */ sizeof(asn_DEF_S1AP_Tunnel_Information_ExtIEs_tags_433) /sizeof(asn_DEF_S1AP_Tunnel_Information_ExtIEs_tags_433[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_Tunnel_Information_ExtIEs_433, 3, /* Elements count */ &asn_SPC_S1AP_Tunnel_Information_ExtIEs_specs_433 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_440 = { sizeof(struct S1AP_UEAggregate_MaximumBitrates_ExtIEs__extensionValue), offsetof(struct S1AP_UEAggregate_MaximumBitrates_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_UEAggregate_MaximumBitrates_ExtIEs__extensionValue, present), sizeof(((struct S1AP_UEAggregate_MaximumBitrates_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_440 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_440 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UEAggregate_MaximumBitrates_ExtIEs_437[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEAggregate_MaximumBitrates_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_438, &asn_PER_memb_S1AP_id_constr_438, memb_S1AP_id_constraint_437 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEAggregate_MaximumBitrates_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_439, &asn_PER_memb_S1AP_criticality_constr_439, memb_S1AP_criticality_constraint_437 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UEAggregate_MaximumBitrates_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_440, 0, { &asn_OER_memb_S1AP_extensionValue_constr_440, &asn_PER_memb_S1AP_extensionValue_constr_440, memb_S1AP_extensionValue_constraint_437 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEAggregate_MaximumBitrates_ExtIEs_tags_437[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEAggregate_MaximumBitrates_ExtIEs_tag2el_437[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEAggregate_MaximumBitrates_ExtIEs_specs_437 = { sizeof(struct S1AP_UEAggregate_MaximumBitrates_ExtIEs), offsetof(struct S1AP_UEAggregate_MaximumBitrates_ExtIEs, _asn_ctx), asn_MAP_S1AP_UEAggregate_MaximumBitrates_ExtIEs_tag2el_437, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEAggregate_MaximumBitrates_ExtIEs = { "UEAggregate-MaximumBitrates-ExtIEs", "UEAggregate-MaximumBitrates-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEAggregate_MaximumBitrates_ExtIEs_tags_437, sizeof(asn_DEF_S1AP_UEAggregate_MaximumBitrates_ExtIEs_tags_437) /sizeof(asn_DEF_S1AP_UEAggregate_MaximumBitrates_ExtIEs_tags_437[0]), /* 1 */ asn_DEF_S1AP_UEAggregate_MaximumBitrates_ExtIEs_tags_437, /* Same as above */ sizeof(asn_DEF_S1AP_UEAggregate_MaximumBitrates_ExtIEs_tags_437) /sizeof(asn_DEF_S1AP_UEAggregate_MaximumBitrates_ExtIEs_tags_437[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEAggregate_MaximumBitrates_ExtIEs_437, 3, /* Elements count */ &asn_SPC_S1AP_UEAggregate_MaximumBitrates_ExtIEs_specs_437 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_444 = { sizeof(struct S1AP_UE_S1AP_ID_pair_ExtIEs__extensionValue), offsetof(struct S1AP_UE_S1AP_ID_pair_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_UE_S1AP_ID_pair_ExtIEs__extensionValue, present), sizeof(((struct S1AP_UE_S1AP_ID_pair_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_444 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_444 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UE_S1AP_ID_pair_ExtIEs_441[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UE_S1AP_ID_pair_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_442, &asn_PER_memb_S1AP_id_constr_442, memb_S1AP_id_constraint_441 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UE_S1AP_ID_pair_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_443, &asn_PER_memb_S1AP_criticality_constr_443, memb_S1AP_criticality_constraint_441 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UE_S1AP_ID_pair_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_444, 0, { &asn_OER_memb_S1AP_extensionValue_constr_444, &asn_PER_memb_S1AP_extensionValue_constr_444, memb_S1AP_extensionValue_constraint_441 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UE_S1AP_ID_pair_ExtIEs_tags_441[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UE_S1AP_ID_pair_ExtIEs_tag2el_441[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UE_S1AP_ID_pair_ExtIEs_specs_441 = { sizeof(struct S1AP_UE_S1AP_ID_pair_ExtIEs), offsetof(struct S1AP_UE_S1AP_ID_pair_ExtIEs, _asn_ctx), asn_MAP_S1AP_UE_S1AP_ID_pair_ExtIEs_tag2el_441, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UE_S1AP_ID_pair_ExtIEs = { "UE-S1AP-ID-pair-ExtIEs", "UE-S1AP-ID-pair-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UE_S1AP_ID_pair_ExtIEs_tags_441, sizeof(asn_DEF_S1AP_UE_S1AP_ID_pair_ExtIEs_tags_441) /sizeof(asn_DEF_S1AP_UE_S1AP_ID_pair_ExtIEs_tags_441[0]), /* 1 */ asn_DEF_S1AP_UE_S1AP_ID_pair_ExtIEs_tags_441, /* Same as above */ sizeof(asn_DEF_S1AP_UE_S1AP_ID_pair_ExtIEs_tags_441) /sizeof(asn_DEF_S1AP_UE_S1AP_ID_pair_ExtIEs_tags_441[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UE_S1AP_ID_pair_ExtIEs_441, 3, /* Elements count */ &asn_SPC_S1AP_UE_S1AP_ID_pair_ExtIEs_specs_441 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_448 = { sizeof(struct S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs__extensionValue), offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs__extensionValue, present), sizeof(((struct S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_448 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_448 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs_445[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_446, &asn_PER_memb_S1AP_id_constr_446, memb_S1AP_id_constraint_445 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_447, &asn_PER_memb_S1AP_criticality_constr_447, memb_S1AP_criticality_constraint_445 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_448, 0, { &asn_OER_memb_S1AP_extensionValue_constr_448, &asn_PER_memb_S1AP_extensionValue_constr_448, memb_S1AP_extensionValue_constraint_445 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs_tags_445[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs_tag2el_445[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs_specs_445 = { sizeof(struct S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs), offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs, _asn_ctx), asn_MAP_S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs_tag2el_445, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs = { "UE-associatedLogicalS1-ConnectionItemExtIEs", "UE-associatedLogicalS1-ConnectionItemExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs_tags_445, sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs_tags_445) /sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs_tags_445[0]), /* 1 */ asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs_tags_445, /* Same as above */ sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs_tags_445) /sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs_tags_445[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs_445, 3, /* Elements count */ &asn_SPC_S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs_specs_445 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_452 = { sizeof(struct S1AP_UESecurityCapabilities_ExtIEs__extensionValue), offsetof(struct S1AP_UESecurityCapabilities_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_UESecurityCapabilities_ExtIEs__extensionValue, present), sizeof(((struct S1AP_UESecurityCapabilities_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_452 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_452 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UESecurityCapabilities_ExtIEs_449[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UESecurityCapabilities_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_450, &asn_PER_memb_S1AP_id_constr_450, memb_S1AP_id_constraint_449 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UESecurityCapabilities_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_451, &asn_PER_memb_S1AP_criticality_constr_451, memb_S1AP_criticality_constraint_449 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UESecurityCapabilities_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_452, 0, { &asn_OER_memb_S1AP_extensionValue_constr_452, &asn_PER_memb_S1AP_extensionValue_constr_452, memb_S1AP_extensionValue_constraint_449 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UESecurityCapabilities_ExtIEs_tags_449[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UESecurityCapabilities_ExtIEs_tag2el_449[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UESecurityCapabilities_ExtIEs_specs_449 = { sizeof(struct S1AP_UESecurityCapabilities_ExtIEs), offsetof(struct S1AP_UESecurityCapabilities_ExtIEs, _asn_ctx), asn_MAP_S1AP_UESecurityCapabilities_ExtIEs_tag2el_449, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UESecurityCapabilities_ExtIEs = { "UESecurityCapabilities-ExtIEs", "UESecurityCapabilities-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UESecurityCapabilities_ExtIEs_tags_449, sizeof(asn_DEF_S1AP_UESecurityCapabilities_ExtIEs_tags_449) /sizeof(asn_DEF_S1AP_UESecurityCapabilities_ExtIEs_tags_449[0]), /* 1 */ asn_DEF_S1AP_UESecurityCapabilities_ExtIEs_tags_449, /* Same as above */ sizeof(asn_DEF_S1AP_UESecurityCapabilities_ExtIEs_tags_449) /sizeof(asn_DEF_S1AP_UESecurityCapabilities_ExtIEs_tags_449[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UESecurityCapabilities_ExtIEs_449, 3, /* Elements count */ &asn_SPC_S1AP_UESecurityCapabilities_ExtIEs_specs_449 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_456 = { sizeof(struct S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs__extensionValue), offsetof(struct S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs__extensionValue, present), sizeof(((struct S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_456 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_456 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs_453[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_454, &asn_PER_memb_S1AP_id_constr_454, memb_S1AP_id_constraint_453 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_455, &asn_PER_memb_S1AP_criticality_constr_455, memb_S1AP_criticality_constraint_453 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_456, 0, { &asn_OER_memb_S1AP_extensionValue_constr_456, &asn_PER_memb_S1AP_extensionValue_constr_456, memb_S1AP_extensionValue_constraint_453 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs_tags_453[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs_tag2el_453[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs_specs_453 = { sizeof(struct S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs), offsetof(struct S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs, _asn_ctx), asn_MAP_S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs_tag2el_453, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs = { "UE-Sidelink-Aggregate-MaximumBitrates-ExtIEs", "UE-Sidelink-Aggregate-MaximumBitrates-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs_tags_453, sizeof(asn_DEF_S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs_tags_453) /sizeof(asn_DEF_S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs_tags_453[0]), /* 1 */ asn_DEF_S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs_tags_453, /* Same as above */ sizeof(asn_DEF_S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs_tags_453) /sizeof(asn_DEF_S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs_tags_453[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs_453, 3, /* Elements count */ &asn_SPC_S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs_specs_453 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_460 = { sizeof(struct S1AP_UL_CP_SecurityInformation_ExtIEs__extensionValue), offsetof(struct S1AP_UL_CP_SecurityInformation_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_UL_CP_SecurityInformation_ExtIEs__extensionValue, present), sizeof(((struct S1AP_UL_CP_SecurityInformation_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_460 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_460 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UL_CP_SecurityInformation_ExtIEs_457[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UL_CP_SecurityInformation_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_458, &asn_PER_memb_S1AP_id_constr_458, memb_S1AP_id_constraint_457 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UL_CP_SecurityInformation_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_459, &asn_PER_memb_S1AP_criticality_constr_459, memb_S1AP_criticality_constraint_457 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UL_CP_SecurityInformation_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_460, 0, { &asn_OER_memb_S1AP_extensionValue_constr_460, &asn_PER_memb_S1AP_extensionValue_constr_460, memb_S1AP_extensionValue_constraint_457 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UL_CP_SecurityInformation_ExtIEs_tags_457[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UL_CP_SecurityInformation_ExtIEs_tag2el_457[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UL_CP_SecurityInformation_ExtIEs_specs_457 = { sizeof(struct S1AP_UL_CP_SecurityInformation_ExtIEs), offsetof(struct S1AP_UL_CP_SecurityInformation_ExtIEs, _asn_ctx), asn_MAP_S1AP_UL_CP_SecurityInformation_ExtIEs_tag2el_457, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UL_CP_SecurityInformation_ExtIEs = { "UL-CP-SecurityInformation-ExtIEs", "UL-CP-SecurityInformation-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UL_CP_SecurityInformation_ExtIEs_tags_457, sizeof(asn_DEF_S1AP_UL_CP_SecurityInformation_ExtIEs_tags_457) /sizeof(asn_DEF_S1AP_UL_CP_SecurityInformation_ExtIEs_tags_457[0]), /* 1 */ asn_DEF_S1AP_UL_CP_SecurityInformation_ExtIEs_tags_457, /* Same as above */ sizeof(asn_DEF_S1AP_UL_CP_SecurityInformation_ExtIEs_tags_457) /sizeof(asn_DEF_S1AP_UL_CP_SecurityInformation_ExtIEs_tags_457[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UL_CP_SecurityInformation_ExtIEs_457, 3, /* Elements count */ &asn_SPC_S1AP_UL_CP_SecurityInformation_ExtIEs_specs_457 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_464 = { sizeof(struct S1AP_UserLocationInformation_ExtIEs__extensionValue), offsetof(struct S1AP_UserLocationInformation_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_UserLocationInformation_ExtIEs__extensionValue, present), sizeof(((struct S1AP_UserLocationInformation_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_464 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_464 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UserLocationInformation_ExtIEs_461[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UserLocationInformation_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_462, &asn_PER_memb_S1AP_id_constr_462, memb_S1AP_id_constraint_461 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UserLocationInformation_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_463, &asn_PER_memb_S1AP_criticality_constr_463, memb_S1AP_criticality_constraint_461 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UserLocationInformation_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_464, 0, { &asn_OER_memb_S1AP_extensionValue_constr_464, &asn_PER_memb_S1AP_extensionValue_constr_464, memb_S1AP_extensionValue_constraint_461 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UserLocationInformation_ExtIEs_tags_461[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UserLocationInformation_ExtIEs_tag2el_461[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UserLocationInformation_ExtIEs_specs_461 = { sizeof(struct S1AP_UserLocationInformation_ExtIEs), offsetof(struct S1AP_UserLocationInformation_ExtIEs, _asn_ctx), asn_MAP_S1AP_UserLocationInformation_ExtIEs_tag2el_461, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UserLocationInformation_ExtIEs = { "UserLocationInformation-ExtIEs", "UserLocationInformation-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UserLocationInformation_ExtIEs_tags_461, sizeof(asn_DEF_S1AP_UserLocationInformation_ExtIEs_tags_461) /sizeof(asn_DEF_S1AP_UserLocationInformation_ExtIEs_tags_461[0]), /* 1 */ asn_DEF_S1AP_UserLocationInformation_ExtIEs_tags_461, /* Same as above */ sizeof(asn_DEF_S1AP_UserLocationInformation_ExtIEs_tags_461) /sizeof(asn_DEF_S1AP_UserLocationInformation_ExtIEs_tags_461[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UserLocationInformation_ExtIEs_461, 3, /* Elements count */ &asn_SPC_S1AP_UserLocationInformation_ExtIEs_specs_461 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_468 = { sizeof(struct S1AP_V2XServicesAuthorized_ExtIEs__extensionValue), offsetof(struct S1AP_V2XServicesAuthorized_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_V2XServicesAuthorized_ExtIEs__extensionValue, present), sizeof(((struct S1AP_V2XServicesAuthorized_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_468 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_468 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_V2XServicesAuthorized_ExtIEs_465[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_V2XServicesAuthorized_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_466, &asn_PER_memb_S1AP_id_constr_466, memb_S1AP_id_constraint_465 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_V2XServicesAuthorized_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_467, &asn_PER_memb_S1AP_criticality_constr_467, memb_S1AP_criticality_constraint_465 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_V2XServicesAuthorized_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_468, 0, { &asn_OER_memb_S1AP_extensionValue_constr_468, &asn_PER_memb_S1AP_extensionValue_constr_468, memb_S1AP_extensionValue_constraint_465 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_V2XServicesAuthorized_ExtIEs_tags_465[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_V2XServicesAuthorized_ExtIEs_tag2el_465[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_V2XServicesAuthorized_ExtIEs_specs_465 = { sizeof(struct S1AP_V2XServicesAuthorized_ExtIEs), offsetof(struct S1AP_V2XServicesAuthorized_ExtIEs, _asn_ctx), asn_MAP_S1AP_V2XServicesAuthorized_ExtIEs_tag2el_465, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_V2XServicesAuthorized_ExtIEs = { "V2XServicesAuthorized-ExtIEs", "V2XServicesAuthorized-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_V2XServicesAuthorized_ExtIEs_tags_465, sizeof(asn_DEF_S1AP_V2XServicesAuthorized_ExtIEs_tags_465) /sizeof(asn_DEF_S1AP_V2XServicesAuthorized_ExtIEs_tags_465[0]), /* 1 */ asn_DEF_S1AP_V2XServicesAuthorized_ExtIEs_tags_465, /* Same as above */ sizeof(asn_DEF_S1AP_V2XServicesAuthorized_ExtIEs_tags_465) /sizeof(asn_DEF_S1AP_V2XServicesAuthorized_ExtIEs_tags_465[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_V2XServicesAuthorized_ExtIEs_465, 3, /* Elements count */ &asn_SPC_S1AP_V2XServicesAuthorized_ExtIEs_specs_465 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_extensionValue_472[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_X2TNLConfigurationInfo_ExtIEs__extensionValue, choice.ENBX2ExtTLAs), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ENBX2ExtTLAs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENBX2ExtTLAs" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_X2TNLConfigurationInfo_ExtIEs__extensionValue, choice.ENBIndirectX2TransportLayerAddresses), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ENBIndirectX2TransportLayerAddresses, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENBIndirectX2TransportLayerAddresses" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_extensionValue_tag2el_472[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* ENBX2ExtTLAs */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 } /* ENBIndirectX2TransportLayerAddresses */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_472 = { sizeof(struct S1AP_X2TNLConfigurationInfo_ExtIEs__extensionValue), offsetof(struct S1AP_X2TNLConfigurationInfo_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_X2TNLConfigurationInfo_ExtIEs__extensionValue, present), sizeof(((struct S1AP_X2TNLConfigurationInfo_ExtIEs__extensionValue *)0)->present), asn_MAP_S1AP_extensionValue_tag2el_472, 2, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_472 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_extensionValue_472, 2, /* Elements count */ &asn_SPC_S1AP_extensionValue_specs_472 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_X2TNLConfigurationInfo_ExtIEs_469[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_X2TNLConfigurationInfo_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_470, &asn_PER_memb_S1AP_id_constr_470, memb_S1AP_id_constraint_469 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_X2TNLConfigurationInfo_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_X2TNLConfigurationInfo_ExtIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_471, &asn_PER_memb_S1AP_criticality_constr_471, memb_S1AP_criticality_constraint_469 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_X2TNLConfigurationInfo_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_472, select_X2TNLConfigurationInfo_ExtIEs_S1AP_extensionValue_type, { &asn_OER_memb_S1AP_extensionValue_constr_472, &asn_PER_memb_S1AP_extensionValue_constr_472, memb_S1AP_extensionValue_constraint_469 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_X2TNLConfigurationInfo_ExtIEs_tags_469[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_X2TNLConfigurationInfo_ExtIEs_tag2el_469[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_X2TNLConfigurationInfo_ExtIEs_specs_469 = { sizeof(struct S1AP_X2TNLConfigurationInfo_ExtIEs), offsetof(struct S1AP_X2TNLConfigurationInfo_ExtIEs, _asn_ctx), asn_MAP_S1AP_X2TNLConfigurationInfo_ExtIEs_tag2el_469, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_X2TNLConfigurationInfo_ExtIEs = { "X2TNLConfigurationInfo-ExtIEs", "X2TNLConfigurationInfo-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_X2TNLConfigurationInfo_ExtIEs_tags_469, sizeof(asn_DEF_S1AP_X2TNLConfigurationInfo_ExtIEs_tags_469) /sizeof(asn_DEF_S1AP_X2TNLConfigurationInfo_ExtIEs_tags_469[0]), /* 1 */ asn_DEF_S1AP_X2TNLConfigurationInfo_ExtIEs_tags_469, /* Same as above */ sizeof(asn_DEF_S1AP_X2TNLConfigurationInfo_ExtIEs_tags_469) /sizeof(asn_DEF_S1AP_X2TNLConfigurationInfo_ExtIEs_tags_469[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_X2TNLConfigurationInfo_ExtIEs_469, 3, /* Elements count */ &asn_SPC_S1AP_X2TNLConfigurationInfo_ExtIEs_specs_469 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_extensionValue_specs_476 = { sizeof(struct S1AP_ENBX2ExtTLA_ExtIEs__extensionValue), offsetof(struct S1AP_ENBX2ExtTLA_ExtIEs__extensionValue, _asn_ctx), offsetof(struct S1AP_ENBX2ExtTLA_ExtIEs__extensionValue, present), sizeof(((struct S1AP_ENBX2ExtTLA_ExtIEs__extensionValue *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_extensionValue_476 = { "extensionValue", "extensionValue", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_extensionValue_specs_476 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ENBX2ExtTLA_ExtIEs_473[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBX2ExtTLA_ExtIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionID, 0, { &asn_OER_memb_S1AP_id_constr_474, &asn_PER_memb_S1AP_id_constr_474, memb_S1AP_id_constraint_473 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBX2ExtTLA_ExtIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_475, &asn_PER_memb_S1AP_criticality_constr_475, memb_S1AP_criticality_constraint_473 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBX2ExtTLA_ExtIEs, extensionValue), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_extensionValue_476, 0, { &asn_OER_memb_S1AP_extensionValue_constr_476, &asn_PER_memb_S1AP_extensionValue_constr_476, memb_S1AP_extensionValue_constraint_473 }, 0, 0, /* No default value */ "extensionValue" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ENBX2ExtTLA_ExtIEs_tags_473[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ENBX2ExtTLA_ExtIEs_tag2el_473[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* extensionValue */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBX2ExtTLA_ExtIEs_specs_473 = { sizeof(struct S1AP_ENBX2ExtTLA_ExtIEs), offsetof(struct S1AP_ENBX2ExtTLA_ExtIEs, _asn_ctx), asn_MAP_S1AP_ENBX2ExtTLA_ExtIEs_tag2el_473, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENBX2ExtTLA_ExtIEs = { "ENBX2ExtTLA-ExtIEs", "ENBX2ExtTLA-ExtIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_ENBX2ExtTLA_ExtIEs_tags_473, sizeof(asn_DEF_S1AP_ENBX2ExtTLA_ExtIEs_tags_473) /sizeof(asn_DEF_S1AP_ENBX2ExtTLA_ExtIEs_tags_473[0]), /* 1 */ asn_DEF_S1AP_ENBX2ExtTLA_ExtIEs_tags_473, /* Same as above */ sizeof(asn_DEF_S1AP_ENBX2ExtTLA_ExtIEs_tags_473) /sizeof(asn_DEF_S1AP_ENBX2ExtTLA_ExtIEs_tags_473[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ENBX2ExtTLA_ExtIEs_473, 3, /* Elements count */ &asn_SPC_S1AP_ENBX2ExtTLA_ExtIEs_specs_473 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProtocolExtensionField.h000066400000000000000000003627111333553357400233040ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-Containers" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ProtocolExtensionField_H_ #define _S1AP_ProtocolExtensionField_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolExtensionID.h" #include "S1AP_Criticality.h" #include #include #include #include #include #include "S1AP_Data-Forwarding-Not-Possible.h" #include "S1AP_Presence.h" #include "S1AP_BearerType.h" #include "S1AP_Correlation-ID.h" #include "S1AP_TransportInformation.h" #include "S1AP_COUNTValueExtended.h" #include "S1AP_ReceiveStatusOfULPDCPSDUsExtended.h" #include "S1AP_COUNTvaluePDCP-SNlength18.h" #include "S1AP_ReceiveStatusOfULPDCPSDUsPDCP-SNlength18.h" #include "S1AP_M3Configuration.h" #include "S1AP_M4Configuration.h" #include "S1AP_M5Configuration.h" #include "S1AP_MDT-Location-Info.h" #include "S1AP_M6Configuration.h" #include "S1AP_M7Configuration.h" #include "S1AP_Time-UE-StayedInCell-EnhancedGranularity.h" #include "S1AP_Cause.h" #include "S1AP_MDTPLMNList.h" #include "S1AP_ProSeUEtoNetworkRelaying.h" #include "S1AP_TimeSynchronisationInfo.h" #include "S1AP_MutingPatternInformation.h" #include "S1AP_X2TNLConfigurationInfo.h" #include "S1AP_SynchronisationInformation.h" #include "S1AP_MobilityInformation.h" #include "S1AP_UE-HistoryInformationFromTheUE.h" #include "S1AP_RAT-Type.h" #include "S1AP_MutingAvailabilityIndication.h" #include "S1AP_MDT-Configuration.h" #include "S1AP_ENBX2ExtTLAs.h" #include "S1AP_ENBIndirectX2TransportLayerAddresses.h" #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_E_RABDataForwardingItem_ExtIEs__extensionValue_PR { S1AP_E_RABDataForwardingItem_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_E_RABDataForwardingItem_ExtIEs__extensionValue_PR; typedef enum S1AP_E_RABToBeSetupItemHOReq_ExtIEs__extensionValue_PR { S1AP_E_RABToBeSetupItemHOReq_ExtIEs__extensionValue_PR_NOTHING, /* No components present */ S1AP_E_RABToBeSetupItemHOReq_ExtIEs__extensionValue_PR_Data_Forwarding_Not_Possible, S1AP_E_RABToBeSetupItemHOReq_ExtIEs__extensionValue_PR_BearerType } S1AP_E_RABToBeSetupItemHOReq_ExtIEs__extensionValue_PR; typedef enum S1AP_E_RABAdmittedItem_ExtIEs__extensionValue_PR { S1AP_E_RABAdmittedItem_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_E_RABAdmittedItem_ExtIEs__extensionValue_PR; typedef enum S1AP_E_RABFailedToSetupItemHOReqAckExtIEs__extensionValue_PR { S1AP_E_RABFailedToSetupItemHOReqAckExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_E_RABFailedToSetupItemHOReqAckExtIEs__extensionValue_PR; typedef enum S1AP_E_RABToBeSwitchedDLItem_ExtIEs__extensionValue_PR { S1AP_E_RABToBeSwitchedDLItem_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_E_RABToBeSwitchedDLItem_ExtIEs__extensionValue_PR; typedef enum S1AP_E_RABToBeSwitchedULItem_ExtIEs__extensionValue_PR { S1AP_E_RABToBeSwitchedULItem_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_E_RABToBeSwitchedULItem_ExtIEs__extensionValue_PR; typedef enum S1AP_E_RABToBeSetupItemBearerSUReqExtIEs__extensionValue_PR { S1AP_E_RABToBeSetupItemBearerSUReqExtIEs__extensionValue_PR_NOTHING, /* No components present */ S1AP_E_RABToBeSetupItemBearerSUReqExtIEs__extensionValue_PR_Correlation_ID, S1AP_E_RABToBeSetupItemBearerSUReqExtIEs__extensionValue_PR_BearerType } S1AP_E_RABToBeSetupItemBearerSUReqExtIEs__extensionValue_PR; typedef enum S1AP_E_RABSetupItemBearerSUResExtIEs__extensionValue_PR { S1AP_E_RABSetupItemBearerSUResExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_E_RABSetupItemBearerSUResExtIEs__extensionValue_PR; typedef enum S1AP_E_RABToBeModifyItemBearerModReqExtIEs__extensionValue_PR { S1AP_E_RABToBeModifyItemBearerModReqExtIEs__extensionValue_PR_NOTHING, /* No components present */ S1AP_E_RABToBeModifyItemBearerModReqExtIEs__extensionValue_PR_TransportInformation } S1AP_E_RABToBeModifyItemBearerModReqExtIEs__extensionValue_PR; typedef enum S1AP_E_RABModifyItemBearerModResExtIEs__extensionValue_PR { S1AP_E_RABModifyItemBearerModResExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_E_RABModifyItemBearerModResExtIEs__extensionValue_PR; typedef enum S1AP_E_RABReleaseItemBearerRelCompExtIEs__extensionValue_PR { S1AP_E_RABReleaseItemBearerRelCompExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_E_RABReleaseItemBearerRelCompExtIEs__extensionValue_PR; typedef enum S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs__extensionValue_PR { S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs__extensionValue_PR_NOTHING, /* No components present */ S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs__extensionValue_PR_Correlation_ID, S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs__extensionValue_PR_BearerType } S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs__extensionValue_PR; typedef enum S1AP_E_RABSetupItemCtxtSUResExtIEs__extensionValue_PR { S1AP_E_RABSetupItemCtxtSUResExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_E_RABSetupItemCtxtSUResExtIEs__extensionValue_PR; typedef enum S1AP_TAIItemExtIEs__extensionValue_PR { S1AP_TAIItemExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_TAIItemExtIEs__extensionValue_PR; typedef enum S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs__extensionValue_PR { S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs__extensionValue_PR; typedef enum S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs__extensionValue_PR { S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs__extensionValue_PR; typedef enum S1AP_CSGMembershipInfo_ExtIEs__extensionValue_PR { S1AP_CSGMembershipInfo_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_CSGMembershipInfo_ExtIEs__extensionValue_PR; typedef enum S1AP_E_RABModifyItemBearerModConfExtIEs__extensionValue_PR { S1AP_E_RABModifyItemBearerModConfExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_E_RABModifyItemBearerModConfExtIEs__extensionValue_PR; typedef enum S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs__extensionValue_PR { S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs__extensionValue_PR; typedef enum S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs__extensionValue_PR { S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs__extensionValue_PR; typedef enum S1AP_Additional_GUTI_ExtIEs__extensionValue_PR { S1AP_Additional_GUTI_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_Additional_GUTI_ExtIEs__extensionValue_PR; typedef enum S1AP_AllocationAndRetentionPriority_ExtIEs__extensionValue_PR { S1AP_AllocationAndRetentionPriority_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_AllocationAndRetentionPriority_ExtIEs__extensionValue_PR; typedef enum S1AP_InformationForCECapableUEs_ExtIEs__extensionValue_PR { S1AP_InformationForCECapableUEs_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_InformationForCECapableUEs_ExtIEs__extensionValue_PR; typedef enum S1AP_AssistanceDataForPaging_ExtIEs__extensionValue_PR { S1AP_AssistanceDataForPaging_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_AssistanceDataForPaging_ExtIEs__extensionValue_PR; typedef enum S1AP_AssistanceDataForRecommendedCells_ExtIEs__extensionValue_PR { S1AP_AssistanceDataForRecommendedCells_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_AssistanceDataForRecommendedCells_ExtIEs__extensionValue_PR; typedef enum S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs__extensionValue_PR { S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs__extensionValue_PR_NOTHING, /* No components present */ S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs__extensionValue_PR_COUNTValueExtended, S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs__extensionValue_PR_ReceiveStatusOfULPDCPSDUsExtended, S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs__extensionValue_PR_COUNTvaluePDCP_SNlength18, S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs__extensionValue_PR_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18 } S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs__extensionValue_PR; typedef enum S1AP_CancelledCellinEAI_Item_ExtIEs__extensionValue_PR { S1AP_CancelledCellinEAI_Item_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_CancelledCellinEAI_Item_ExtIEs__extensionValue_PR; typedef enum S1AP_CancelledCellinTAI_Item_ExtIEs__extensionValue_PR { S1AP_CancelledCellinTAI_Item_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_CancelledCellinTAI_Item_ExtIEs__extensionValue_PR; typedef enum S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs__extensionValue_PR { S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs__extensionValue_PR; typedef enum S1AP_CellID_Broadcast_Item_ExtIEs__extensionValue_PR { S1AP_CellID_Broadcast_Item_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_CellID_Broadcast_Item_ExtIEs__extensionValue_PR; typedef enum S1AP_CellID_Cancelled_Item_ExtIEs__extensionValue_PR { S1AP_CellID_Cancelled_Item_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_CellID_Cancelled_Item_ExtIEs__extensionValue_PR; typedef enum S1AP_CellBasedMDT_ExtIEs__extensionValue_PR { S1AP_CellBasedMDT_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_CellBasedMDT_ExtIEs__extensionValue_PR; typedef enum S1AP_Cdma2000OneXSRVCCInfo_ExtIEs__extensionValue_PR { S1AP_Cdma2000OneXSRVCCInfo_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_Cdma2000OneXSRVCCInfo_ExtIEs__extensionValue_PR; typedef enum S1AP_CellType_ExtIEs__extensionValue_PR { S1AP_CellType_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_CellType_ExtIEs__extensionValue_PR; typedef enum S1AP_CGI_ExtIEs__extensionValue_PR { S1AP_CGI_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_CGI_ExtIEs__extensionValue_PR; typedef enum S1AP_CSG_IdList_Item_ExtIEs__extensionValue_PR { S1AP_CSG_IdList_Item_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_CSG_IdList_Item_ExtIEs__extensionValue_PR; typedef enum S1AP_COUNTvalue_ExtIEs__extensionValue_PR { S1AP_COUNTvalue_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_COUNTvalue_ExtIEs__extensionValue_PR; typedef enum S1AP_COUNTValueExtended_ExtIEs__extensionValue_PR { S1AP_COUNTValueExtended_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_COUNTValueExtended_ExtIEs__extensionValue_PR; typedef enum S1AP_COUNTvaluePDCP_SNlength18_ExtIEs__extensionValue_PR { S1AP_COUNTvaluePDCP_SNlength18_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_COUNTvaluePDCP_SNlength18_ExtIEs__extensionValue_PR; typedef enum S1AP_CriticalityDiagnostics_ExtIEs__extensionValue_PR { S1AP_CriticalityDiagnostics_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_CriticalityDiagnostics_ExtIEs__extensionValue_PR; typedef enum S1AP_CriticalityDiagnostics_IE_Item_ExtIEs__extensionValue_PR { S1AP_CriticalityDiagnostics_IE_Item_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_CriticalityDiagnostics_IE_Item_ExtIEs__extensionValue_PR; typedef enum S1AP_ServedDCNsItem_ExtIEs__extensionValue_PR { S1AP_ServedDCNsItem_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_ServedDCNsItem_ExtIEs__extensionValue_PR; typedef enum S1AP_DL_CP_SecurityInformation_ExtIEs__extensionValue_PR { S1AP_DL_CP_SecurityInformation_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_DL_CP_SecurityInformation_ExtIEs__extensionValue_PR; typedef enum S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs__extensionValue_PR { S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs__extensionValue_PR; typedef enum S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs__extensionValue_PR { S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs__extensionValue_PR; typedef enum S1AP_CompletedCellinEAI_Item_ExtIEs__extensionValue_PR { S1AP_CompletedCellinEAI_Item_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_CompletedCellinEAI_Item_ExtIEs__extensionValue_PR; typedef enum S1AP_GERAN_Cell_ID_ExtIEs__extensionValue_PR { S1AP_GERAN_Cell_ID_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_GERAN_Cell_ID_ExtIEs__extensionValue_PR; typedef enum S1AP_GlobalENB_ID_ExtIEs__extensionValue_PR { S1AP_GlobalENB_ID_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_GlobalENB_ID_ExtIEs__extensionValue_PR; typedef enum S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs__extensionValue_PR { S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs__extensionValue_PR; typedef enum S1AP_E_RABInformationListItem_ExtIEs__extensionValue_PR { S1AP_E_RABInformationListItem_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_E_RABInformationListItem_ExtIEs__extensionValue_PR; typedef enum S1AP_E_RABItem_ExtIEs__extensionValue_PR { S1AP_E_RABItem_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_E_RABItem_ExtIEs__extensionValue_PR; typedef enum S1AP_E_RABQoSParameters_ExtIEs__extensionValue_PR { S1AP_E_RABQoSParameters_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_E_RABQoSParameters_ExtIEs__extensionValue_PR; typedef enum S1AP_EUTRAN_CGI_ExtIEs__extensionValue_PR { S1AP_EUTRAN_CGI_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_EUTRAN_CGI_ExtIEs__extensionValue_PR; typedef enum S1AP_ExpectedUEBehaviour_ExtIEs__extensionValue_PR { S1AP_ExpectedUEBehaviour_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_ExpectedUEBehaviour_ExtIEs__extensionValue_PR; typedef enum S1AP_ExpectedUEActivityBehaviour_ExtIEs__extensionValue_PR { S1AP_ExpectedUEActivityBehaviour_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_ExpectedUEActivityBehaviour_ExtIEs__extensionValue_PR; typedef enum S1AP_ForbiddenTAs_Item_ExtIEs__extensionValue_PR { S1AP_ForbiddenTAs_Item_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_ForbiddenTAs_Item_ExtIEs__extensionValue_PR; typedef enum S1AP_ForbiddenLAs_Item_ExtIEs__extensionValue_PR { S1AP_ForbiddenLAs_Item_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_ForbiddenLAs_Item_ExtIEs__extensionValue_PR; typedef enum S1AP_GBR_QosInformation_ExtIEs__extensionValue_PR { S1AP_GBR_QosInformation_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_GBR_QosInformation_ExtIEs__extensionValue_PR; typedef enum S1AP_GUMMEI_ExtIEs__extensionValue_PR { S1AP_GUMMEI_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_GUMMEI_ExtIEs__extensionValue_PR; typedef enum S1AP_HandoverRestrictionList_ExtIEs__extensionValue_PR { S1AP_HandoverRestrictionList_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_HandoverRestrictionList_ExtIEs__extensionValue_PR; typedef enum S1AP_ImmediateMDT_ExtIEs__extensionValue_PR { S1AP_ImmediateMDT_ExtIEs__extensionValue_PR_NOTHING, /* No components present */ S1AP_ImmediateMDT_ExtIEs__extensionValue_PR_M3Configuration, S1AP_ImmediateMDT_ExtIEs__extensionValue_PR_M4Configuration, S1AP_ImmediateMDT_ExtIEs__extensionValue_PR_M5Configuration, S1AP_ImmediateMDT_ExtIEs__extensionValue_PR_MDT_Location_Info, S1AP_ImmediateMDT_ExtIEs__extensionValue_PR_M6Configuration, S1AP_ImmediateMDT_ExtIEs__extensionValue_PR_M7Configuration } S1AP_ImmediateMDT_ExtIEs__extensionValue_PR; typedef enum S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs__extensionValue_PR { S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs__extensionValue_PR; typedef enum S1AP_LAI_ExtIEs__extensionValue_PR { S1AP_LAI_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_LAI_ExtIEs__extensionValue_PR; typedef enum S1AP_LastVisitedEUTRANCellInformation_ExtIEs__extensionValue_PR { S1AP_LastVisitedEUTRANCellInformation_ExtIEs__extensionValue_PR_NOTHING, /* No components present */ S1AP_LastVisitedEUTRANCellInformation_ExtIEs__extensionValue_PR_Time_UE_StayedInCell_EnhancedGranularity, S1AP_LastVisitedEUTRANCellInformation_ExtIEs__extensionValue_PR_Cause } S1AP_LastVisitedEUTRANCellInformation_ExtIEs__extensionValue_PR; typedef enum S1AP_ListeningSubframePattern_ExtIEs__extensionValue_PR { S1AP_ListeningSubframePattern_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_ListeningSubframePattern_ExtIEs__extensionValue_PR; typedef enum S1AP_LoggedMDT_ExtIEs__extensionValue_PR { S1AP_LoggedMDT_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_LoggedMDT_ExtIEs__extensionValue_PR; typedef enum S1AP_LoggedMBSFNMDT_ExtIEs__extensionValue_PR { S1AP_LoggedMBSFNMDT_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_LoggedMBSFNMDT_ExtIEs__extensionValue_PR; typedef enum S1AP_M3Configuration_ExtIEs__extensionValue_PR { S1AP_M3Configuration_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_M3Configuration_ExtIEs__extensionValue_PR; typedef enum S1AP_M4Configuration_ExtIEs__extensionValue_PR { S1AP_M4Configuration_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_M4Configuration_ExtIEs__extensionValue_PR; typedef enum S1AP_M5Configuration_ExtIEs__extensionValue_PR { S1AP_M5Configuration_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_M5Configuration_ExtIEs__extensionValue_PR; typedef enum S1AP_M6Configuration_ExtIEs__extensionValue_PR { S1AP_M6Configuration_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_M6Configuration_ExtIEs__extensionValue_PR; typedef enum S1AP_M7Configuration_ExtIEs__extensionValue_PR { S1AP_M7Configuration_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_M7Configuration_ExtIEs__extensionValue_PR; typedef enum S1AP_MDT_Configuration_ExtIEs__extensionValue_PR { S1AP_MDT_Configuration_ExtIEs__extensionValue_PR_NOTHING, /* No components present */ S1AP_MDT_Configuration_ExtIEs__extensionValue_PR_MDTPLMNList } S1AP_MDT_Configuration_ExtIEs__extensionValue_PR; typedef enum S1AP_MBSFN_ResultToLogInfo_ExtIEs__extensionValue_PR { S1AP_MBSFN_ResultToLogInfo_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_MBSFN_ResultToLogInfo_ExtIEs__extensionValue_PR; typedef enum S1AP_MutingPatternInformation_ExtIEs__extensionValue_PR { S1AP_MutingPatternInformation_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_MutingPatternInformation_ExtIEs__extensionValue_PR; typedef enum S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs__extensionValue_PR { S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs__extensionValue_PR; typedef enum S1AP_PagingAttemptInformation_ExtIEs__extensionValue_PR { S1AP_PagingAttemptInformation_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_PagingAttemptInformation_ExtIEs__extensionValue_PR; typedef enum S1AP_Paging_eDRXInformation_ExtIEs__extensionValue_PR { S1AP_Paging_eDRXInformation_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_Paging_eDRXInformation_ExtIEs__extensionValue_PR; typedef enum S1AP_M1PeriodicReporting_ExtIEs__extensionValue_PR { S1AP_M1PeriodicReporting_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_M1PeriodicReporting_ExtIEs__extensionValue_PR; typedef enum S1AP_ProSeAuthorized_ExtIEs__extensionValue_PR { S1AP_ProSeAuthorized_ExtIEs__extensionValue_PR_NOTHING, /* No components present */ S1AP_ProSeAuthorized_ExtIEs__extensionValue_PR_ProSeUEtoNetworkRelaying } S1AP_ProSeAuthorized_ExtIEs__extensionValue_PR; typedef enum S1AP_RecommendedCellsForPaging_ExtIEs__extensionValue_PR { S1AP_RecommendedCellsForPaging_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_RecommendedCellsForPaging_ExtIEs__extensionValue_PR; typedef enum S1AP_RecommendedCellsForPagingItem_ExtIEs__extensionValue_PR { S1AP_RecommendedCellsForPagingItem_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_RecommendedCellsForPagingItem_ExtIEs__extensionValue_PR; typedef enum S1AP_RecommendedENBsForPaging_ExtIEs__extensionValue_PR { S1AP_RecommendedENBsForPaging_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_RecommendedENBsForPaging_ExtIEs__extensionValue_PR; typedef enum S1AP_RecommendedENBItem_ExtIEs__extensionValue_PR { S1AP_RecommendedENBItem_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_RecommendedENBItem_ExtIEs__extensionValue_PR; typedef enum S1AP_RequestType_ExtIEs__extensionValue_PR { S1AP_RequestType_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_RequestType_ExtIEs__extensionValue_PR; typedef enum S1AP_RIMTransfer_ExtIEs__extensionValue_PR { S1AP_RIMTransfer_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_RIMTransfer_ExtIEs__extensionValue_PR; typedef enum S1AP_RLFReportInformation_ExtIEs__extensionValue_PR { S1AP_RLFReportInformation_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_RLFReportInformation_ExtIEs__extensionValue_PR; typedef enum S1AP_SecurityContext_ExtIEs__extensionValue_PR { S1AP_SecurityContext_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_SecurityContext_ExtIEs__extensionValue_PR; typedef enum S1AP_SONInformationReply_ExtIEs__extensionValue_PR { S1AP_SONInformationReply_ExtIEs__extensionValue_PR_NOTHING, /* No components present */ S1AP_SONInformationReply_ExtIEs__extensionValue_PR_TimeSynchronisationInfo, S1AP_SONInformationReply_ExtIEs__extensionValue_PR_MutingPatternInformation } S1AP_SONInformationReply_ExtIEs__extensionValue_PR; typedef enum S1AP_SONConfigurationTransfer_ExtIEs__extensionValue_PR { S1AP_SONConfigurationTransfer_ExtIEs__extensionValue_PR_NOTHING, /* No components present */ S1AP_SONConfigurationTransfer_ExtIEs__extensionValue_PR_X2TNLConfigurationInfo, S1AP_SONConfigurationTransfer_ExtIEs__extensionValue_PR_SynchronisationInformation } S1AP_SONConfigurationTransfer_ExtIEs__extensionValue_PR; typedef enum S1AP_SynchronisationInformation_ExtIEs__extensionValue_PR { S1AP_SynchronisationInformation_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_SynchronisationInformation_ExtIEs__extensionValue_PR; typedef enum S1AP_SourceeNB_ID_ExtIEs__extensionValue_PR { S1AP_SourceeNB_ID_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_SourceeNB_ID_ExtIEs__extensionValue_PR; typedef enum S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs__extensionValue_PR { S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs__extensionValue_PR_NOTHING, /* No components present */ S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs__extensionValue_PR_MobilityInformation, S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs__extensionValue_PR_UE_HistoryInformationFromTheUE } S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs__extensionValue_PR; typedef enum S1AP_ServedGUMMEIsItem_ExtIEs__extensionValue_PR { S1AP_ServedGUMMEIsItem_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_ServedGUMMEIsItem_ExtIEs__extensionValue_PR; typedef enum S1AP_SupportedTAs_Item_ExtIEs__extensionValue_PR { S1AP_SupportedTAs_Item_ExtIEs__extensionValue_PR_NOTHING, /* No components present */ S1AP_SupportedTAs_Item_ExtIEs__extensionValue_PR_RAT_Type } S1AP_SupportedTAs_Item_ExtIEs__extensionValue_PR; typedef enum S1AP_TimeSynchronisationInfo_ExtIEs__extensionValue_PR { S1AP_TimeSynchronisationInfo_ExtIEs__extensionValue_PR_NOTHING, /* No components present */ S1AP_TimeSynchronisationInfo_ExtIEs__extensionValue_PR_MutingAvailabilityIndication } S1AP_TimeSynchronisationInfo_ExtIEs__extensionValue_PR; typedef enum S1AP_S_TMSI_ExtIEs__extensionValue_PR { S1AP_S_TMSI_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_S_TMSI_ExtIEs__extensionValue_PR; typedef enum S1AP_TAIBasedMDT_ExtIEs__extensionValue_PR { S1AP_TAIBasedMDT_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_TAIBasedMDT_ExtIEs__extensionValue_PR; typedef enum S1AP_TAI_ExtIEs__extensionValue_PR { S1AP_TAI_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_TAI_ExtIEs__extensionValue_PR; typedef enum S1AP_TAI_Broadcast_Item_ExtIEs__extensionValue_PR { S1AP_TAI_Broadcast_Item_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_TAI_Broadcast_Item_ExtIEs__extensionValue_PR; typedef enum S1AP_TAI_Cancelled_Item_ExtIEs__extensionValue_PR { S1AP_TAI_Cancelled_Item_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_TAI_Cancelled_Item_ExtIEs__extensionValue_PR; typedef enum S1AP_TABasedMDT_ExtIEs__extensionValue_PR { S1AP_TABasedMDT_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_TABasedMDT_ExtIEs__extensionValue_PR; typedef enum S1AP_CompletedCellinTAI_Item_ExtIEs__extensionValue_PR { S1AP_CompletedCellinTAI_Item_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_CompletedCellinTAI_Item_ExtIEs__extensionValue_PR; typedef enum S1AP_TargeteNB_ID_ExtIEs__extensionValue_PR { S1AP_TargeteNB_ID_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_TargeteNB_ID_ExtIEs__extensionValue_PR; typedef enum S1AP_TargetRNC_ID_ExtIEs__extensionValue_PR { S1AP_TargetRNC_ID_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_TargetRNC_ID_ExtIEs__extensionValue_PR; typedef enum S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs__extensionValue_PR { S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs__extensionValue_PR; typedef enum S1AP_M1ThresholdEventA2_ExtIEs__extensionValue_PR { S1AP_M1ThresholdEventA2_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_M1ThresholdEventA2_ExtIEs__extensionValue_PR; typedef enum S1AP_TraceActivation_ExtIEs__extensionValue_PR { S1AP_TraceActivation_ExtIEs__extensionValue_PR_NOTHING, /* No components present */ S1AP_TraceActivation_ExtIEs__extensionValue_PR_MDT_Configuration } S1AP_TraceActivation_ExtIEs__extensionValue_PR; typedef enum S1AP_Tunnel_Information_ExtIEs__extensionValue_PR { S1AP_Tunnel_Information_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_Tunnel_Information_ExtIEs__extensionValue_PR; typedef enum S1AP_UEAggregate_MaximumBitrates_ExtIEs__extensionValue_PR { S1AP_UEAggregate_MaximumBitrates_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_UEAggregate_MaximumBitrates_ExtIEs__extensionValue_PR; typedef enum S1AP_UE_S1AP_ID_pair_ExtIEs__extensionValue_PR { S1AP_UE_S1AP_ID_pair_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_UE_S1AP_ID_pair_ExtIEs__extensionValue_PR; typedef enum S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs__extensionValue_PR { S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs__extensionValue_PR; typedef enum S1AP_UESecurityCapabilities_ExtIEs__extensionValue_PR { S1AP_UESecurityCapabilities_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_UESecurityCapabilities_ExtIEs__extensionValue_PR; typedef enum S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs__extensionValue_PR { S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs__extensionValue_PR; typedef enum S1AP_UL_CP_SecurityInformation_ExtIEs__extensionValue_PR { S1AP_UL_CP_SecurityInformation_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_UL_CP_SecurityInformation_ExtIEs__extensionValue_PR; typedef enum S1AP_UserLocationInformation_ExtIEs__extensionValue_PR { S1AP_UserLocationInformation_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_UserLocationInformation_ExtIEs__extensionValue_PR; typedef enum S1AP_V2XServicesAuthorized_ExtIEs__extensionValue_PR { S1AP_V2XServicesAuthorized_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_V2XServicesAuthorized_ExtIEs__extensionValue_PR; typedef enum S1AP_X2TNLConfigurationInfo_ExtIEs__extensionValue_PR { S1AP_X2TNLConfigurationInfo_ExtIEs__extensionValue_PR_NOTHING, /* No components present */ S1AP_X2TNLConfigurationInfo_ExtIEs__extensionValue_PR_ENBX2ExtTLAs, S1AP_X2TNLConfigurationInfo_ExtIEs__extensionValue_PR_ENBIndirectX2TransportLayerAddresses } S1AP_X2TNLConfigurationInfo_ExtIEs__extensionValue_PR; typedef enum S1AP_ENBX2ExtTLA_ExtIEs__extensionValue_PR { S1AP_ENBX2ExtTLA_ExtIEs__extensionValue_PR_NOTHING /* No components present */ } S1AP_ENBX2ExtTLA_ExtIEs__extensionValue_PR; /* S1AP_ProtocolExtensionField */ typedef struct S1AP_E_RABDataForwardingItem_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABDataForwardingItem_ExtIEs__extensionValue { S1AP_E_RABDataForwardingItem_ExtIEs__extensionValue_PR present; union S1AP_E_RABDataForwardingItem_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABDataForwardingItem_ExtIEs_t; typedef struct S1AP_E_RABToBeSetupItemHOReq_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABToBeSetupItemHOReq_ExtIEs__extensionValue { S1AP_E_RABToBeSetupItemHOReq_ExtIEs__extensionValue_PR present; union S1AP_E_RABToBeSetupItemHOReq_ExtIEs__S1AP_extensionValue_u { S1AP_Data_Forwarding_Not_Possible_t Data_Forwarding_Not_Possible; S1AP_BearerType_t BearerType; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeSetupItemHOReq_ExtIEs_t; typedef struct S1AP_E_RABAdmittedItem_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABAdmittedItem_ExtIEs__extensionValue { S1AP_E_RABAdmittedItem_ExtIEs__extensionValue_PR present; union S1AP_E_RABAdmittedItem_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABAdmittedItem_ExtIEs_t; typedef struct S1AP_E_RABFailedToSetupItemHOReqAckExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABFailedToSetupItemHOReqAckExtIEs__extensionValue { S1AP_E_RABFailedToSetupItemHOReqAckExtIEs__extensionValue_PR present; union S1AP_E_RABFailedToSetupItemHOReqAckExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABFailedToSetupItemHOReqAckExtIEs_t; typedef struct S1AP_E_RABToBeSwitchedDLItem_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABToBeSwitchedDLItem_ExtIEs__extensionValue { S1AP_E_RABToBeSwitchedDLItem_ExtIEs__extensionValue_PR present; union S1AP_E_RABToBeSwitchedDLItem_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeSwitchedDLItem_ExtIEs_t; typedef struct S1AP_E_RABToBeSwitchedULItem_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABToBeSwitchedULItem_ExtIEs__extensionValue { S1AP_E_RABToBeSwitchedULItem_ExtIEs__extensionValue_PR present; union S1AP_E_RABToBeSwitchedULItem_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeSwitchedULItem_ExtIEs_t; typedef struct S1AP_E_RABToBeSetupItemBearerSUReqExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABToBeSetupItemBearerSUReqExtIEs__extensionValue { S1AP_E_RABToBeSetupItemBearerSUReqExtIEs__extensionValue_PR present; union S1AP_E_RABToBeSetupItemBearerSUReqExtIEs__S1AP_extensionValue_u { S1AP_Correlation_ID_t Correlation_ID; S1AP_BearerType_t BearerType; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeSetupItemBearerSUReqExtIEs_t; typedef struct S1AP_E_RABSetupItemBearerSUResExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABSetupItemBearerSUResExtIEs__extensionValue { S1AP_E_RABSetupItemBearerSUResExtIEs__extensionValue_PR present; union S1AP_E_RABSetupItemBearerSUResExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABSetupItemBearerSUResExtIEs_t; typedef struct S1AP_E_RABToBeModifyItemBearerModReqExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABToBeModifyItemBearerModReqExtIEs__extensionValue { S1AP_E_RABToBeModifyItemBearerModReqExtIEs__extensionValue_PR present; union S1AP_E_RABToBeModifyItemBearerModReqExtIEs__S1AP_extensionValue_u { S1AP_TransportInformation_t TransportInformation; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeModifyItemBearerModReqExtIEs_t; typedef struct S1AP_E_RABModifyItemBearerModResExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABModifyItemBearerModResExtIEs__extensionValue { S1AP_E_RABModifyItemBearerModResExtIEs__extensionValue_PR present; union S1AP_E_RABModifyItemBearerModResExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABModifyItemBearerModResExtIEs_t; typedef struct S1AP_E_RABReleaseItemBearerRelCompExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABReleaseItemBearerRelCompExtIEs__extensionValue { S1AP_E_RABReleaseItemBearerRelCompExtIEs__extensionValue_PR present; union S1AP_E_RABReleaseItemBearerRelCompExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABReleaseItemBearerRelCompExtIEs_t; typedef struct S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs__extensionValue { S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs__extensionValue_PR present; union S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs__S1AP_extensionValue_u { S1AP_Correlation_ID_t Correlation_ID; S1AP_BearerType_t BearerType; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs_t; typedef struct S1AP_E_RABSetupItemCtxtSUResExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABSetupItemCtxtSUResExtIEs__extensionValue { S1AP_E_RABSetupItemCtxtSUResExtIEs__extensionValue_PR present; union S1AP_E_RABSetupItemCtxtSUResExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABSetupItemCtxtSUResExtIEs_t; typedef struct S1AP_TAIItemExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_TAIItemExtIEs__extensionValue { S1AP_TAIItemExtIEs__extensionValue_PR present; union S1AP_TAIItemExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TAIItemExtIEs_t; typedef struct S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs__extensionValue { S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs__extensionValue_PR present; union S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs_t; typedef struct S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs__extensionValue { S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs__extensionValue_PR present; union S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs_t; typedef struct S1AP_CSGMembershipInfo_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_CSGMembershipInfo_ExtIEs__extensionValue { S1AP_CSGMembershipInfo_ExtIEs__extensionValue_PR present; union S1AP_CSGMembershipInfo_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CSGMembershipInfo_ExtIEs_t; typedef struct S1AP_E_RABModifyItemBearerModConfExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABModifyItemBearerModConfExtIEs__extensionValue { S1AP_E_RABModifyItemBearerModConfExtIEs__extensionValue_PR present; union S1AP_E_RABModifyItemBearerModConfExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABModifyItemBearerModConfExtIEs_t; typedef struct S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs__extensionValue { S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs__extensionValue_PR present; union S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs_t; typedef struct S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs__extensionValue { S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs__extensionValue_PR present; union S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs_t; typedef struct S1AP_Additional_GUTI_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_Additional_GUTI_ExtIEs__extensionValue { S1AP_Additional_GUTI_ExtIEs__extensionValue_PR present; union S1AP_Additional_GUTI_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_Additional_GUTI_ExtIEs_t; typedef struct S1AP_AllocationAndRetentionPriority_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_AllocationAndRetentionPriority_ExtIEs__extensionValue { S1AP_AllocationAndRetentionPriority_ExtIEs__extensionValue_PR present; union S1AP_AllocationAndRetentionPriority_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_AllocationAndRetentionPriority_ExtIEs_t; typedef struct S1AP_InformationForCECapableUEs_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_InformationForCECapableUEs_ExtIEs__extensionValue { S1AP_InformationForCECapableUEs_ExtIEs__extensionValue_PR present; union S1AP_InformationForCECapableUEs_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_InformationForCECapableUEs_ExtIEs_t; typedef struct S1AP_AssistanceDataForPaging_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_AssistanceDataForPaging_ExtIEs__extensionValue { S1AP_AssistanceDataForPaging_ExtIEs__extensionValue_PR present; union S1AP_AssistanceDataForPaging_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_AssistanceDataForPaging_ExtIEs_t; typedef struct S1AP_AssistanceDataForRecommendedCells_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_AssistanceDataForRecommendedCells_ExtIEs__extensionValue { S1AP_AssistanceDataForRecommendedCells_ExtIEs__extensionValue_PR present; union S1AP_AssistanceDataForRecommendedCells_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_AssistanceDataForRecommendedCells_ExtIEs_t; typedef struct S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs__extensionValue { S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs__extensionValue_PR present; union S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs__S1AP_extensionValue_u { S1AP_COUNTValueExtended_t COUNTValueExtended; S1AP_ReceiveStatusOfULPDCPSDUsExtended_t ReceiveStatusOfULPDCPSDUsExtended; S1AP_COUNTvaluePDCP_SNlength18_t COUNTvaluePDCP_SNlength18; S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_t ReceiveStatusOfULPDCPSDUsPDCP_SNlength18; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs_t; typedef struct S1AP_CancelledCellinEAI_Item_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_CancelledCellinEAI_Item_ExtIEs__extensionValue { S1AP_CancelledCellinEAI_Item_ExtIEs__extensionValue_PR present; union S1AP_CancelledCellinEAI_Item_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CancelledCellinEAI_Item_ExtIEs_t; typedef struct S1AP_CancelledCellinTAI_Item_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_CancelledCellinTAI_Item_ExtIEs__extensionValue { S1AP_CancelledCellinTAI_Item_ExtIEs__extensionValue_PR present; union S1AP_CancelledCellinTAI_Item_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CancelledCellinTAI_Item_ExtIEs_t; typedef struct S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs__extensionValue { S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs__extensionValue_PR present; union S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs_t; typedef struct S1AP_CellID_Broadcast_Item_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_CellID_Broadcast_Item_ExtIEs__extensionValue { S1AP_CellID_Broadcast_Item_ExtIEs__extensionValue_PR present; union S1AP_CellID_Broadcast_Item_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CellID_Broadcast_Item_ExtIEs_t; typedef struct S1AP_CellID_Cancelled_Item_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_CellID_Cancelled_Item_ExtIEs__extensionValue { S1AP_CellID_Cancelled_Item_ExtIEs__extensionValue_PR present; union S1AP_CellID_Cancelled_Item_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CellID_Cancelled_Item_ExtIEs_t; typedef struct S1AP_CellBasedMDT_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_CellBasedMDT_ExtIEs__extensionValue { S1AP_CellBasedMDT_ExtIEs__extensionValue_PR present; union S1AP_CellBasedMDT_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CellBasedMDT_ExtIEs_t; typedef struct S1AP_Cdma2000OneXSRVCCInfo_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_Cdma2000OneXSRVCCInfo_ExtIEs__extensionValue { S1AP_Cdma2000OneXSRVCCInfo_ExtIEs__extensionValue_PR present; union S1AP_Cdma2000OneXSRVCCInfo_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_Cdma2000OneXSRVCCInfo_ExtIEs_t; typedef struct S1AP_CellType_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_CellType_ExtIEs__extensionValue { S1AP_CellType_ExtIEs__extensionValue_PR present; union S1AP_CellType_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CellType_ExtIEs_t; typedef struct S1AP_CGI_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_CGI_ExtIEs__extensionValue { S1AP_CGI_ExtIEs__extensionValue_PR present; union S1AP_CGI_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CGI_ExtIEs_t; typedef struct S1AP_CSG_IdList_Item_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_CSG_IdList_Item_ExtIEs__extensionValue { S1AP_CSG_IdList_Item_ExtIEs__extensionValue_PR present; union S1AP_CSG_IdList_Item_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CSG_IdList_Item_ExtIEs_t; typedef struct S1AP_COUNTvalue_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_COUNTvalue_ExtIEs__extensionValue { S1AP_COUNTvalue_ExtIEs__extensionValue_PR present; union S1AP_COUNTvalue_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_COUNTvalue_ExtIEs_t; typedef struct S1AP_COUNTValueExtended_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_COUNTValueExtended_ExtIEs__extensionValue { S1AP_COUNTValueExtended_ExtIEs__extensionValue_PR present; union S1AP_COUNTValueExtended_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_COUNTValueExtended_ExtIEs_t; typedef struct S1AP_COUNTvaluePDCP_SNlength18_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_COUNTvaluePDCP_SNlength18_ExtIEs__extensionValue { S1AP_COUNTvaluePDCP_SNlength18_ExtIEs__extensionValue_PR present; union S1AP_COUNTvaluePDCP_SNlength18_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_COUNTvaluePDCP_SNlength18_ExtIEs_t; typedef struct S1AP_CriticalityDiagnostics_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_CriticalityDiagnostics_ExtIEs__extensionValue { S1AP_CriticalityDiagnostics_ExtIEs__extensionValue_PR present; union S1AP_CriticalityDiagnostics_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CriticalityDiagnostics_ExtIEs_t; typedef struct S1AP_CriticalityDiagnostics_IE_Item_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_CriticalityDiagnostics_IE_Item_ExtIEs__extensionValue { S1AP_CriticalityDiagnostics_IE_Item_ExtIEs__extensionValue_PR present; union S1AP_CriticalityDiagnostics_IE_Item_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CriticalityDiagnostics_IE_Item_ExtIEs_t; typedef struct S1AP_ServedDCNsItem_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_ServedDCNsItem_ExtIEs__extensionValue { S1AP_ServedDCNsItem_ExtIEs__extensionValue_PR present; union S1AP_ServedDCNsItem_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ServedDCNsItem_ExtIEs_t; typedef struct S1AP_DL_CP_SecurityInformation_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_DL_CP_SecurityInformation_ExtIEs__extensionValue { S1AP_DL_CP_SecurityInformation_ExtIEs__extensionValue_PR present; union S1AP_DL_CP_SecurityInformation_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_DL_CP_SecurityInformation_ExtIEs_t; typedef struct S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs__extensionValue { S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs__extensionValue_PR present; union S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs_t; typedef struct S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs__extensionValue { S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs__extensionValue_PR present; union S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs_t; typedef struct S1AP_CompletedCellinEAI_Item_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_CompletedCellinEAI_Item_ExtIEs__extensionValue { S1AP_CompletedCellinEAI_Item_ExtIEs__extensionValue_PR present; union S1AP_CompletedCellinEAI_Item_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CompletedCellinEAI_Item_ExtIEs_t; typedef struct S1AP_GERAN_Cell_ID_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_GERAN_Cell_ID_ExtIEs__extensionValue { S1AP_GERAN_Cell_ID_ExtIEs__extensionValue_PR present; union S1AP_GERAN_Cell_ID_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_GERAN_Cell_ID_ExtIEs_t; typedef struct S1AP_GlobalENB_ID_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_GlobalENB_ID_ExtIEs__extensionValue { S1AP_GlobalENB_ID_ExtIEs__extensionValue_PR present; union S1AP_GlobalENB_ID_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_GlobalENB_ID_ExtIEs_t; typedef struct S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs__extensionValue { S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs__extensionValue_PR present; union S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs_t; typedef struct S1AP_E_RABInformationListItem_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABInformationListItem_ExtIEs__extensionValue { S1AP_E_RABInformationListItem_ExtIEs__extensionValue_PR present; union S1AP_E_RABInformationListItem_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABInformationListItem_ExtIEs_t; typedef struct S1AP_E_RABItem_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABItem_ExtIEs__extensionValue { S1AP_E_RABItem_ExtIEs__extensionValue_PR present; union S1AP_E_RABItem_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABItem_ExtIEs_t; typedef struct S1AP_E_RABQoSParameters_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABQoSParameters_ExtIEs__extensionValue { S1AP_E_RABQoSParameters_ExtIEs__extensionValue_PR present; union S1AP_E_RABQoSParameters_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABQoSParameters_ExtIEs_t; typedef struct S1AP_EUTRAN_CGI_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_EUTRAN_CGI_ExtIEs__extensionValue { S1AP_EUTRAN_CGI_ExtIEs__extensionValue_PR present; union S1AP_EUTRAN_CGI_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_EUTRAN_CGI_ExtIEs_t; typedef struct S1AP_ExpectedUEBehaviour_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_ExpectedUEBehaviour_ExtIEs__extensionValue { S1AP_ExpectedUEBehaviour_ExtIEs__extensionValue_PR present; union S1AP_ExpectedUEBehaviour_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ExpectedUEBehaviour_ExtIEs_t; typedef struct S1AP_ExpectedUEActivityBehaviour_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_ExpectedUEActivityBehaviour_ExtIEs__extensionValue { S1AP_ExpectedUEActivityBehaviour_ExtIEs__extensionValue_PR present; union S1AP_ExpectedUEActivityBehaviour_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ExpectedUEActivityBehaviour_ExtIEs_t; typedef struct S1AP_ForbiddenTAs_Item_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_ForbiddenTAs_Item_ExtIEs__extensionValue { S1AP_ForbiddenTAs_Item_ExtIEs__extensionValue_PR present; union S1AP_ForbiddenTAs_Item_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ForbiddenTAs_Item_ExtIEs_t; typedef struct S1AP_ForbiddenLAs_Item_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_ForbiddenLAs_Item_ExtIEs__extensionValue { S1AP_ForbiddenLAs_Item_ExtIEs__extensionValue_PR present; union S1AP_ForbiddenLAs_Item_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ForbiddenLAs_Item_ExtIEs_t; typedef struct S1AP_GBR_QosInformation_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_GBR_QosInformation_ExtIEs__extensionValue { S1AP_GBR_QosInformation_ExtIEs__extensionValue_PR present; union S1AP_GBR_QosInformation_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_GBR_QosInformation_ExtIEs_t; typedef struct S1AP_GUMMEI_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_GUMMEI_ExtIEs__extensionValue { S1AP_GUMMEI_ExtIEs__extensionValue_PR present; union S1AP_GUMMEI_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_GUMMEI_ExtIEs_t; typedef struct S1AP_HandoverRestrictionList_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_HandoverRestrictionList_ExtIEs__extensionValue { S1AP_HandoverRestrictionList_ExtIEs__extensionValue_PR present; union S1AP_HandoverRestrictionList_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_HandoverRestrictionList_ExtIEs_t; typedef struct S1AP_ImmediateMDT_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_ImmediateMDT_ExtIEs__extensionValue { S1AP_ImmediateMDT_ExtIEs__extensionValue_PR present; union S1AP_ImmediateMDT_ExtIEs__S1AP_extensionValue_u { S1AP_M3Configuration_t M3Configuration; S1AP_M4Configuration_t M4Configuration; S1AP_M5Configuration_t M5Configuration; S1AP_MDT_Location_Info_t MDT_Location_Info; S1AP_M6Configuration_t M6Configuration; S1AP_M7Configuration_t M7Configuration; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ImmediateMDT_ExtIEs_t; typedef struct S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs__extensionValue { S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs__extensionValue_PR present; union S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs_t; typedef struct S1AP_LAI_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_LAI_ExtIEs__extensionValue { S1AP_LAI_ExtIEs__extensionValue_PR present; union S1AP_LAI_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_LAI_ExtIEs_t; typedef struct S1AP_LastVisitedEUTRANCellInformation_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_LastVisitedEUTRANCellInformation_ExtIEs__extensionValue { S1AP_LastVisitedEUTRANCellInformation_ExtIEs__extensionValue_PR present; union S1AP_LastVisitedEUTRANCellInformation_ExtIEs__S1AP_extensionValue_u { S1AP_Time_UE_StayedInCell_EnhancedGranularity_t Time_UE_StayedInCell_EnhancedGranularity; S1AP_Cause_t Cause; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_LastVisitedEUTRANCellInformation_ExtIEs_t; typedef struct S1AP_ListeningSubframePattern_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_ListeningSubframePattern_ExtIEs__extensionValue { S1AP_ListeningSubframePattern_ExtIEs__extensionValue_PR present; union S1AP_ListeningSubframePattern_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ListeningSubframePattern_ExtIEs_t; typedef struct S1AP_LoggedMDT_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_LoggedMDT_ExtIEs__extensionValue { S1AP_LoggedMDT_ExtIEs__extensionValue_PR present; union S1AP_LoggedMDT_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_LoggedMDT_ExtIEs_t; typedef struct S1AP_LoggedMBSFNMDT_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_LoggedMBSFNMDT_ExtIEs__extensionValue { S1AP_LoggedMBSFNMDT_ExtIEs__extensionValue_PR present; union S1AP_LoggedMBSFNMDT_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_LoggedMBSFNMDT_ExtIEs_t; typedef struct S1AP_M3Configuration_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_M3Configuration_ExtIEs__extensionValue { S1AP_M3Configuration_ExtIEs__extensionValue_PR present; union S1AP_M3Configuration_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_M3Configuration_ExtIEs_t; typedef struct S1AP_M4Configuration_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_M4Configuration_ExtIEs__extensionValue { S1AP_M4Configuration_ExtIEs__extensionValue_PR present; union S1AP_M4Configuration_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_M4Configuration_ExtIEs_t; typedef struct S1AP_M5Configuration_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_M5Configuration_ExtIEs__extensionValue { S1AP_M5Configuration_ExtIEs__extensionValue_PR present; union S1AP_M5Configuration_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_M5Configuration_ExtIEs_t; typedef struct S1AP_M6Configuration_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_M6Configuration_ExtIEs__extensionValue { S1AP_M6Configuration_ExtIEs__extensionValue_PR present; union S1AP_M6Configuration_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_M6Configuration_ExtIEs_t; typedef struct S1AP_M7Configuration_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_M7Configuration_ExtIEs__extensionValue { S1AP_M7Configuration_ExtIEs__extensionValue_PR present; union S1AP_M7Configuration_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_M7Configuration_ExtIEs_t; typedef struct S1AP_MDT_Configuration_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_MDT_Configuration_ExtIEs__extensionValue { S1AP_MDT_Configuration_ExtIEs__extensionValue_PR present; union S1AP_MDT_Configuration_ExtIEs__S1AP_extensionValue_u { S1AP_MDTPLMNList_t MDTPLMNList; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MDT_Configuration_ExtIEs_t; typedef struct S1AP_MBSFN_ResultToLogInfo_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_MBSFN_ResultToLogInfo_ExtIEs__extensionValue { S1AP_MBSFN_ResultToLogInfo_ExtIEs__extensionValue_PR present; union S1AP_MBSFN_ResultToLogInfo_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MBSFN_ResultToLogInfo_ExtIEs_t; typedef struct S1AP_MutingPatternInformation_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_MutingPatternInformation_ExtIEs__extensionValue { S1AP_MutingPatternInformation_ExtIEs__extensionValue_PR present; union S1AP_MutingPatternInformation_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MutingPatternInformation_ExtIEs_t; typedef struct S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs__extensionValue { S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs__extensionValue_PR present; union S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs_t; typedef struct S1AP_PagingAttemptInformation_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_PagingAttemptInformation_ExtIEs__extensionValue { S1AP_PagingAttemptInformation_ExtIEs__extensionValue_PR present; union S1AP_PagingAttemptInformation_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_PagingAttemptInformation_ExtIEs_t; typedef struct S1AP_Paging_eDRXInformation_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_Paging_eDRXInformation_ExtIEs__extensionValue { S1AP_Paging_eDRXInformation_ExtIEs__extensionValue_PR present; union S1AP_Paging_eDRXInformation_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_Paging_eDRXInformation_ExtIEs_t; typedef struct S1AP_M1PeriodicReporting_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_M1PeriodicReporting_ExtIEs__extensionValue { S1AP_M1PeriodicReporting_ExtIEs__extensionValue_PR present; union S1AP_M1PeriodicReporting_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_M1PeriodicReporting_ExtIEs_t; typedef struct S1AP_ProSeAuthorized_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_ProSeAuthorized_ExtIEs__extensionValue { S1AP_ProSeAuthorized_ExtIEs__extensionValue_PR present; union S1AP_ProSeAuthorized_ExtIEs__S1AP_extensionValue_u { S1AP_ProSeUEtoNetworkRelaying_t ProSeUEtoNetworkRelaying; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProSeAuthorized_ExtIEs_t; typedef struct S1AP_RecommendedCellsForPaging_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_RecommendedCellsForPaging_ExtIEs__extensionValue { S1AP_RecommendedCellsForPaging_ExtIEs__extensionValue_PR present; union S1AP_RecommendedCellsForPaging_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_RecommendedCellsForPaging_ExtIEs_t; typedef struct S1AP_RecommendedCellsForPagingItem_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_RecommendedCellsForPagingItem_ExtIEs__extensionValue { S1AP_RecommendedCellsForPagingItem_ExtIEs__extensionValue_PR present; union S1AP_RecommendedCellsForPagingItem_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_RecommendedCellsForPagingItem_ExtIEs_t; typedef struct S1AP_RecommendedENBsForPaging_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_RecommendedENBsForPaging_ExtIEs__extensionValue { S1AP_RecommendedENBsForPaging_ExtIEs__extensionValue_PR present; union S1AP_RecommendedENBsForPaging_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_RecommendedENBsForPaging_ExtIEs_t; typedef struct S1AP_RecommendedENBItem_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_RecommendedENBItem_ExtIEs__extensionValue { S1AP_RecommendedENBItem_ExtIEs__extensionValue_PR present; union S1AP_RecommendedENBItem_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_RecommendedENBItem_ExtIEs_t; typedef struct S1AP_RequestType_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_RequestType_ExtIEs__extensionValue { S1AP_RequestType_ExtIEs__extensionValue_PR present; union S1AP_RequestType_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_RequestType_ExtIEs_t; typedef struct S1AP_RIMTransfer_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_RIMTransfer_ExtIEs__extensionValue { S1AP_RIMTransfer_ExtIEs__extensionValue_PR present; union S1AP_RIMTransfer_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_RIMTransfer_ExtIEs_t; typedef struct S1AP_RLFReportInformation_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_RLFReportInformation_ExtIEs__extensionValue { S1AP_RLFReportInformation_ExtIEs__extensionValue_PR present; union S1AP_RLFReportInformation_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_RLFReportInformation_ExtIEs_t; typedef struct S1AP_SecurityContext_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_SecurityContext_ExtIEs__extensionValue { S1AP_SecurityContext_ExtIEs__extensionValue_PR present; union S1AP_SecurityContext_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_SecurityContext_ExtIEs_t; typedef struct S1AP_SONInformationReply_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_SONInformationReply_ExtIEs__extensionValue { S1AP_SONInformationReply_ExtIEs__extensionValue_PR present; union S1AP_SONInformationReply_ExtIEs__S1AP_extensionValue_u { S1AP_TimeSynchronisationInfo_t TimeSynchronisationInfo; S1AP_MutingPatternInformation_t MutingPatternInformation; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_SONInformationReply_ExtIEs_t; typedef struct S1AP_SONConfigurationTransfer_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_SONConfigurationTransfer_ExtIEs__extensionValue { S1AP_SONConfigurationTransfer_ExtIEs__extensionValue_PR present; union S1AP_SONConfigurationTransfer_ExtIEs__S1AP_extensionValue_u { S1AP_X2TNLConfigurationInfo_t X2TNLConfigurationInfo; S1AP_SynchronisationInformation_t SynchronisationInformation; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_SONConfigurationTransfer_ExtIEs_t; typedef struct S1AP_SynchronisationInformation_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_SynchronisationInformation_ExtIEs__extensionValue { S1AP_SynchronisationInformation_ExtIEs__extensionValue_PR present; union S1AP_SynchronisationInformation_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_SynchronisationInformation_ExtIEs_t; typedef struct S1AP_SourceeNB_ID_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_SourceeNB_ID_ExtIEs__extensionValue { S1AP_SourceeNB_ID_ExtIEs__extensionValue_PR present; union S1AP_SourceeNB_ID_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_SourceeNB_ID_ExtIEs_t; typedef struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs__extensionValue { S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs__extensionValue_PR present; union S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs__S1AP_extensionValue_u { S1AP_MobilityInformation_t MobilityInformation; S1AP_UE_HistoryInformationFromTheUE_t UE_HistoryInformationFromTheUE; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_t; typedef struct S1AP_ServedGUMMEIsItem_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_ServedGUMMEIsItem_ExtIEs__extensionValue { S1AP_ServedGUMMEIsItem_ExtIEs__extensionValue_PR present; union S1AP_ServedGUMMEIsItem_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ServedGUMMEIsItem_ExtIEs_t; typedef struct S1AP_SupportedTAs_Item_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_SupportedTAs_Item_ExtIEs__extensionValue { S1AP_SupportedTAs_Item_ExtIEs__extensionValue_PR present; union S1AP_SupportedTAs_Item_ExtIEs__S1AP_extensionValue_u { S1AP_RAT_Type_t RAT_Type; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_SupportedTAs_Item_ExtIEs_t; typedef struct S1AP_TimeSynchronisationInfo_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_TimeSynchronisationInfo_ExtIEs__extensionValue { S1AP_TimeSynchronisationInfo_ExtIEs__extensionValue_PR present; union S1AP_TimeSynchronisationInfo_ExtIEs__S1AP_extensionValue_u { S1AP_MutingAvailabilityIndication_t MutingAvailabilityIndication; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TimeSynchronisationInfo_ExtIEs_t; typedef struct S1AP_S_TMSI_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_S_TMSI_ExtIEs__extensionValue { S1AP_S_TMSI_ExtIEs__extensionValue_PR present; union S1AP_S_TMSI_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_S_TMSI_ExtIEs_t; typedef struct S1AP_TAIBasedMDT_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_TAIBasedMDT_ExtIEs__extensionValue { S1AP_TAIBasedMDT_ExtIEs__extensionValue_PR present; union S1AP_TAIBasedMDT_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TAIBasedMDT_ExtIEs_t; typedef struct S1AP_TAI_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_TAI_ExtIEs__extensionValue { S1AP_TAI_ExtIEs__extensionValue_PR present; union S1AP_TAI_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TAI_ExtIEs_t; typedef struct S1AP_TAI_Broadcast_Item_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_TAI_Broadcast_Item_ExtIEs__extensionValue { S1AP_TAI_Broadcast_Item_ExtIEs__extensionValue_PR present; union S1AP_TAI_Broadcast_Item_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TAI_Broadcast_Item_ExtIEs_t; typedef struct S1AP_TAI_Cancelled_Item_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_TAI_Cancelled_Item_ExtIEs__extensionValue { S1AP_TAI_Cancelled_Item_ExtIEs__extensionValue_PR present; union S1AP_TAI_Cancelled_Item_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TAI_Cancelled_Item_ExtIEs_t; typedef struct S1AP_TABasedMDT_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_TABasedMDT_ExtIEs__extensionValue { S1AP_TABasedMDT_ExtIEs__extensionValue_PR present; union S1AP_TABasedMDT_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TABasedMDT_ExtIEs_t; typedef struct S1AP_CompletedCellinTAI_Item_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_CompletedCellinTAI_Item_ExtIEs__extensionValue { S1AP_CompletedCellinTAI_Item_ExtIEs__extensionValue_PR present; union S1AP_CompletedCellinTAI_Item_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CompletedCellinTAI_Item_ExtIEs_t; typedef struct S1AP_TargeteNB_ID_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_TargeteNB_ID_ExtIEs__extensionValue { S1AP_TargeteNB_ID_ExtIEs__extensionValue_PR present; union S1AP_TargeteNB_ID_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TargeteNB_ID_ExtIEs_t; typedef struct S1AP_TargetRNC_ID_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_TargetRNC_ID_ExtIEs__extensionValue { S1AP_TargetRNC_ID_ExtIEs__extensionValue_PR present; union S1AP_TargetRNC_ID_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TargetRNC_ID_ExtIEs_t; typedef struct S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs__extensionValue { S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs__extensionValue_PR present; union S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs_t; typedef struct S1AP_M1ThresholdEventA2_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_M1ThresholdEventA2_ExtIEs__extensionValue { S1AP_M1ThresholdEventA2_ExtIEs__extensionValue_PR present; union S1AP_M1ThresholdEventA2_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_M1ThresholdEventA2_ExtIEs_t; typedef struct S1AP_TraceActivation_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_TraceActivation_ExtIEs__extensionValue { S1AP_TraceActivation_ExtIEs__extensionValue_PR present; union S1AP_TraceActivation_ExtIEs__S1AP_extensionValue_u { S1AP_MDT_Configuration_t MDT_Configuration; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TraceActivation_ExtIEs_t; typedef struct S1AP_Tunnel_Information_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_Tunnel_Information_ExtIEs__extensionValue { S1AP_Tunnel_Information_ExtIEs__extensionValue_PR present; union S1AP_Tunnel_Information_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_Tunnel_Information_ExtIEs_t; typedef struct S1AP_UEAggregate_MaximumBitrates_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_UEAggregate_MaximumBitrates_ExtIEs__extensionValue { S1AP_UEAggregate_MaximumBitrates_ExtIEs__extensionValue_PR present; union S1AP_UEAggregate_MaximumBitrates_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEAggregate_MaximumBitrates_ExtIEs_t; typedef struct S1AP_UE_S1AP_ID_pair_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_UE_S1AP_ID_pair_ExtIEs__extensionValue { S1AP_UE_S1AP_ID_pair_ExtIEs__extensionValue_PR present; union S1AP_UE_S1AP_ID_pair_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UE_S1AP_ID_pair_ExtIEs_t; typedef struct S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs__extensionValue { S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs__extensionValue_PR present; union S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs_t; typedef struct S1AP_UESecurityCapabilities_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_UESecurityCapabilities_ExtIEs__extensionValue { S1AP_UESecurityCapabilities_ExtIEs__extensionValue_PR present; union S1AP_UESecurityCapabilities_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UESecurityCapabilities_ExtIEs_t; typedef struct S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs__extensionValue { S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs__extensionValue_PR present; union S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs_t; typedef struct S1AP_UL_CP_SecurityInformation_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_UL_CP_SecurityInformation_ExtIEs__extensionValue { S1AP_UL_CP_SecurityInformation_ExtIEs__extensionValue_PR present; union S1AP_UL_CP_SecurityInformation_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UL_CP_SecurityInformation_ExtIEs_t; typedef struct S1AP_UserLocationInformation_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_UserLocationInformation_ExtIEs__extensionValue { S1AP_UserLocationInformation_ExtIEs__extensionValue_PR present; union S1AP_UserLocationInformation_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UserLocationInformation_ExtIEs_t; typedef struct S1AP_V2XServicesAuthorized_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_V2XServicesAuthorized_ExtIEs__extensionValue { S1AP_V2XServicesAuthorized_ExtIEs__extensionValue_PR present; union S1AP_V2XServicesAuthorized_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_V2XServicesAuthorized_ExtIEs_t; typedef struct S1AP_X2TNLConfigurationInfo_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_X2TNLConfigurationInfo_ExtIEs__extensionValue { S1AP_X2TNLConfigurationInfo_ExtIEs__extensionValue_PR present; union S1AP_X2TNLConfigurationInfo_ExtIEs__S1AP_extensionValue_u { S1AP_ENBX2ExtTLAs_t ENBX2ExtTLAs; S1AP_ENBIndirectX2TransportLayerAddresses_t ENBIndirectX2TransportLayerAddresses; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_X2TNLConfigurationInfo_ExtIEs_t; typedef struct S1AP_ENBX2ExtTLA_ExtIEs { S1AP_ProtocolExtensionID_t id; S1AP_Criticality_t criticality; struct S1AP_ENBX2ExtTLA_ExtIEs__extensionValue { S1AP_ENBX2ExtTLA_ExtIEs__extensionValue_PR present; union S1AP_ENBX2ExtTLA_ExtIEs__S1AP_extensionValue_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } extensionValue; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ENBX2ExtTLA_ExtIEs_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABDataForwardingItem_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABDataForwardingItem_ExtIEs_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABDataForwardingItem_ExtIEs_1[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupItemHOReq_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSetupItemHOReq_ExtIEs_specs_5; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSetupItemHOReq_ExtIEs_5[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABAdmittedItem_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABAdmittedItem_ExtIEs_specs_9; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABAdmittedItem_ExtIEs_9[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedToSetupItemHOReqAckExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABFailedToSetupItemHOReqAckExtIEs_specs_13; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABFailedToSetupItemHOReqAckExtIEs_13[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSwitchedDLItem_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSwitchedDLItem_ExtIEs_specs_17; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSwitchedDLItem_ExtIEs_17[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSwitchedULItem_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSwitchedULItem_ExtIEs_specs_21; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSwitchedULItem_ExtIEs_21[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReqExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSetupItemBearerSUReqExtIEs_specs_25; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSetupItemBearerSUReqExtIEs_25[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupItemBearerSUResExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABSetupItemBearerSUResExtIEs_specs_29; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABSetupItemBearerSUResExtIEs_29[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeModifyItemBearerModReqExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeModifyItemBearerModReqExtIEs_specs_33; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeModifyItemBearerModReqExtIEs_33[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyItemBearerModResExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModifyItemBearerModResExtIEs_specs_37; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABModifyItemBearerModResExtIEs_37[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABReleaseItemBearerRelCompExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABReleaseItemBearerRelCompExtIEs_specs_41; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABReleaseItemBearerRelCompExtIEs_41[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs_specs_45; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSetupItemCtxtSUReqExtIEs_45[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupItemCtxtSUResExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABSetupItemCtxtSUResExtIEs_specs_49; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABSetupItemCtxtSUResExtIEs_49[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_TAIItemExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_TAIItemExtIEs_specs_53; extern asn_TYPE_member_t asn_MBR_S1AP_TAIItemExtIEs_53[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs_specs_57; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeModifiedItemBearerModInd_ExtIEs_57[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs_specs_61; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABNotToBeModifiedItemBearerModInd_ExtIEs_61[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CSGMembershipInfo_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CSGMembershipInfo_ExtIEs_specs_65; extern asn_TYPE_member_t asn_MBR_S1AP_CSGMembershipInfo_ExtIEs_65[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyItemBearerModConfExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModifyItemBearerModConfExtIEs_specs_69; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABModifyItemBearerModConfExtIEs_69[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs_specs_73; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABFailedToResumeItemResumeReq_ExtIEs_73[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs_specs_77; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABFailedToResumeItemResumeRes_ExtIEs_77[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_Additional_GUTI_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_Additional_GUTI_ExtIEs_specs_81; extern asn_TYPE_member_t asn_MBR_S1AP_Additional_GUTI_ExtIEs_81[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_AllocationAndRetentionPriority_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_AllocationAndRetentionPriority_ExtIEs_specs_85; extern asn_TYPE_member_t asn_MBR_S1AP_AllocationAndRetentionPriority_ExtIEs_85[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_InformationForCECapableUEs_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_InformationForCECapableUEs_ExtIEs_specs_89; extern asn_TYPE_member_t asn_MBR_S1AP_InformationForCECapableUEs_ExtIEs_89[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_AssistanceDataForPaging_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_AssistanceDataForPaging_ExtIEs_specs_93; extern asn_TYPE_member_t asn_MBR_S1AP_AssistanceDataForPaging_ExtIEs_93[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_AssistanceDataForRecommendedCells_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_AssistanceDataForRecommendedCells_ExtIEs_specs_97; extern asn_TYPE_member_t asn_MBR_S1AP_AssistanceDataForRecommendedCells_ExtIEs_97[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs_specs_101; extern asn_TYPE_member_t asn_MBR_S1AP_Bearers_SubjectToStatusTransfer_ItemExtIEs_101[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CancelledCellinEAI_Item_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CancelledCellinEAI_Item_ExtIEs_specs_105; extern asn_TYPE_member_t asn_MBR_S1AP_CancelledCellinEAI_Item_ExtIEs_105[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CancelledCellinTAI_Item_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CancelledCellinTAI_Item_ExtIEs_specs_109; extern asn_TYPE_member_t asn_MBR_S1AP_CancelledCellinTAI_Item_ExtIEs_109[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs_specs_113; extern asn_TYPE_member_t asn_MBR_S1AP_CellIdentifierAndCELevelForCECapableUEs_ExtIEs_113[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CellID_Broadcast_Item_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellID_Broadcast_Item_ExtIEs_specs_117; extern asn_TYPE_member_t asn_MBR_S1AP_CellID_Broadcast_Item_ExtIEs_117[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CellID_Cancelled_Item_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellID_Cancelled_Item_ExtIEs_specs_121; extern asn_TYPE_member_t asn_MBR_S1AP_CellID_Cancelled_Item_ExtIEs_121[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CellBasedMDT_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellBasedMDT_ExtIEs_specs_125; extern asn_TYPE_member_t asn_MBR_S1AP_CellBasedMDT_ExtIEs_125[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_Cdma2000OneXSRVCCInfo_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_Cdma2000OneXSRVCCInfo_ExtIEs_specs_129; extern asn_TYPE_member_t asn_MBR_S1AP_Cdma2000OneXSRVCCInfo_ExtIEs_129[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CellType_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellType_ExtIEs_specs_133; extern asn_TYPE_member_t asn_MBR_S1AP_CellType_ExtIEs_133[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CGI_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CGI_ExtIEs_specs_137; extern asn_TYPE_member_t asn_MBR_S1AP_CGI_ExtIEs_137[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CSG_IdList_Item_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CSG_IdList_Item_ExtIEs_specs_141; extern asn_TYPE_member_t asn_MBR_S1AP_CSG_IdList_Item_ExtIEs_141[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_COUNTvalue_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_COUNTvalue_ExtIEs_specs_145; extern asn_TYPE_member_t asn_MBR_S1AP_COUNTvalue_ExtIEs_145[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_COUNTValueExtended_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_COUNTValueExtended_ExtIEs_specs_149; extern asn_TYPE_member_t asn_MBR_S1AP_COUNTValueExtended_ExtIEs_149[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_COUNTvaluePDCP_SNlength18_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_COUNTvaluePDCP_SNlength18_ExtIEs_specs_153; extern asn_TYPE_member_t asn_MBR_S1AP_COUNTvaluePDCP_SNlength18_ExtIEs_153[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CriticalityDiagnostics_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CriticalityDiagnostics_ExtIEs_specs_157; extern asn_TYPE_member_t asn_MBR_S1AP_CriticalityDiagnostics_ExtIEs_157[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CriticalityDiagnostics_IE_Item_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CriticalityDiagnostics_IE_Item_ExtIEs_specs_161; extern asn_TYPE_member_t asn_MBR_S1AP_CriticalityDiagnostics_IE_Item_ExtIEs_161[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ServedDCNsItem_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ServedDCNsItem_ExtIEs_specs_165; extern asn_TYPE_member_t asn_MBR_S1AP_ServedDCNsItem_ExtIEs_165[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_DL_CP_SecurityInformation_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_DL_CP_SecurityInformation_ExtIEs_specs_169; extern asn_TYPE_member_t asn_MBR_S1AP_DL_CP_SecurityInformation_ExtIEs_169[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs_specs_173; extern asn_TYPE_member_t asn_MBR_S1AP_EmergencyAreaID_Broadcast_Item_ExtIEs_173[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs_specs_177; extern asn_TYPE_member_t asn_MBR_S1AP_EmergencyAreaID_Cancelled_Item_ExtIEs_177[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CompletedCellinEAI_Item_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CompletedCellinEAI_Item_ExtIEs_specs_181; extern asn_TYPE_member_t asn_MBR_S1AP_CompletedCellinEAI_Item_ExtIEs_181[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_GERAN_Cell_ID_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_GERAN_Cell_ID_ExtIEs_specs_185; extern asn_TYPE_member_t asn_MBR_S1AP_GERAN_Cell_ID_ExtIEs_185[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_GlobalENB_ID_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_GlobalENB_ID_ExtIEs_specs_189; extern asn_TYPE_member_t asn_MBR_S1AP_GlobalENB_ID_ExtIEs_189[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs_specs_193; extern asn_TYPE_member_t asn_MBR_S1AP_ENB_StatusTransfer_TransparentContainer_ExtIEs_193[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABInformationListItem_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABInformationListItem_ExtIEs_specs_197; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABInformationListItem_ExtIEs_197[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABItem_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABItem_ExtIEs_specs_201; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABItem_ExtIEs_201[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABQoSParameters_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABQoSParameters_ExtIEs_specs_205; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABQoSParameters_ExtIEs_205[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_EUTRAN_CGI_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_EUTRAN_CGI_ExtIEs_specs_209; extern asn_TYPE_member_t asn_MBR_S1AP_EUTRAN_CGI_ExtIEs_209[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ExpectedUEBehaviour_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ExpectedUEBehaviour_ExtIEs_specs_213; extern asn_TYPE_member_t asn_MBR_S1AP_ExpectedUEBehaviour_ExtIEs_213[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ExpectedUEActivityBehaviour_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ExpectedUEActivityBehaviour_ExtIEs_specs_217; extern asn_TYPE_member_t asn_MBR_S1AP_ExpectedUEActivityBehaviour_ExtIEs_217[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ForbiddenTAs_Item_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ForbiddenTAs_Item_ExtIEs_specs_221; extern asn_TYPE_member_t asn_MBR_S1AP_ForbiddenTAs_Item_ExtIEs_221[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ForbiddenLAs_Item_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ForbiddenLAs_Item_ExtIEs_specs_225; extern asn_TYPE_member_t asn_MBR_S1AP_ForbiddenLAs_Item_ExtIEs_225[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_GBR_QosInformation_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_GBR_QosInformation_ExtIEs_specs_229; extern asn_TYPE_member_t asn_MBR_S1AP_GBR_QosInformation_ExtIEs_229[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_GUMMEI_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_GUMMEI_ExtIEs_specs_233; extern asn_TYPE_member_t asn_MBR_S1AP_GUMMEI_ExtIEs_233[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverRestrictionList_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverRestrictionList_ExtIEs_specs_237; extern asn_TYPE_member_t asn_MBR_S1AP_HandoverRestrictionList_ExtIEs_237[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ImmediateMDT_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ImmediateMDT_ExtIEs_specs_241; extern asn_TYPE_member_t asn_MBR_S1AP_ImmediateMDT_ExtIEs_241[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs_specs_245; extern asn_TYPE_member_t asn_MBR_S1AP_InformationOnRecommendedCellsAndENBsForPaging_ExtIEs_245[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_LAI_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_LAI_ExtIEs_specs_249; extern asn_TYPE_member_t asn_MBR_S1AP_LAI_ExtIEs_249[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_LastVisitedEUTRANCellInformation_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_LastVisitedEUTRANCellInformation_ExtIEs_specs_253; extern asn_TYPE_member_t asn_MBR_S1AP_LastVisitedEUTRANCellInformation_ExtIEs_253[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ListeningSubframePattern_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ListeningSubframePattern_ExtIEs_specs_257; extern asn_TYPE_member_t asn_MBR_S1AP_ListeningSubframePattern_ExtIEs_257[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_LoggedMDT_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_LoggedMDT_ExtIEs_specs_261; extern asn_TYPE_member_t asn_MBR_S1AP_LoggedMDT_ExtIEs_261[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_LoggedMBSFNMDT_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_LoggedMBSFNMDT_ExtIEs_specs_265; extern asn_TYPE_member_t asn_MBR_S1AP_LoggedMBSFNMDT_ExtIEs_265[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_M3Configuration_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_M3Configuration_ExtIEs_specs_269; extern asn_TYPE_member_t asn_MBR_S1AP_M3Configuration_ExtIEs_269[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_M4Configuration_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_M4Configuration_ExtIEs_specs_273; extern asn_TYPE_member_t asn_MBR_S1AP_M4Configuration_ExtIEs_273[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_M5Configuration_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_M5Configuration_ExtIEs_specs_277; extern asn_TYPE_member_t asn_MBR_S1AP_M5Configuration_ExtIEs_277[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_M6Configuration_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_M6Configuration_ExtIEs_specs_281; extern asn_TYPE_member_t asn_MBR_S1AP_M6Configuration_ExtIEs_281[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_M7Configuration_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_M7Configuration_ExtIEs_specs_285; extern asn_TYPE_member_t asn_MBR_S1AP_M7Configuration_ExtIEs_285[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_MDT_Configuration_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_MDT_Configuration_ExtIEs_specs_289; extern asn_TYPE_member_t asn_MBR_S1AP_MDT_Configuration_ExtIEs_289[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_MBSFN_ResultToLogInfo_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_MBSFN_ResultToLogInfo_ExtIEs_specs_293; extern asn_TYPE_member_t asn_MBR_S1AP_MBSFN_ResultToLogInfo_ExtIEs_293[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_MutingPatternInformation_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_MutingPatternInformation_ExtIEs_specs_297; extern asn_TYPE_member_t asn_MBR_S1AP_MutingPatternInformation_ExtIEs_297[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs_specs_301; extern asn_TYPE_member_t asn_MBR_S1AP_NB_IoT_Paging_eDRXInformation_ExtIEs_301[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_PagingAttemptInformation_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_PagingAttemptInformation_ExtIEs_specs_305; extern asn_TYPE_member_t asn_MBR_S1AP_PagingAttemptInformation_ExtIEs_305[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_Paging_eDRXInformation_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_Paging_eDRXInformation_ExtIEs_specs_309; extern asn_TYPE_member_t asn_MBR_S1AP_Paging_eDRXInformation_ExtIEs_309[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_M1PeriodicReporting_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_M1PeriodicReporting_ExtIEs_specs_313; extern asn_TYPE_member_t asn_MBR_S1AP_M1PeriodicReporting_ExtIEs_313[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProSeAuthorized_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ProSeAuthorized_ExtIEs_specs_317; extern asn_TYPE_member_t asn_MBR_S1AP_ProSeAuthorized_ExtIEs_317[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedCellsForPaging_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_RecommendedCellsForPaging_ExtIEs_specs_321; extern asn_TYPE_member_t asn_MBR_S1AP_RecommendedCellsForPaging_ExtIEs_321[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedCellsForPagingItem_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_RecommendedCellsForPagingItem_ExtIEs_specs_325; extern asn_TYPE_member_t asn_MBR_S1AP_RecommendedCellsForPagingItem_ExtIEs_325[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedENBsForPaging_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_RecommendedENBsForPaging_ExtIEs_specs_329; extern asn_TYPE_member_t asn_MBR_S1AP_RecommendedENBsForPaging_ExtIEs_329[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedENBItem_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_RecommendedENBItem_ExtIEs_specs_333; extern asn_TYPE_member_t asn_MBR_S1AP_RecommendedENBItem_ExtIEs_333[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_RequestType_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_RequestType_ExtIEs_specs_337; extern asn_TYPE_member_t asn_MBR_S1AP_RequestType_ExtIEs_337[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_RIMTransfer_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_RIMTransfer_ExtIEs_specs_341; extern asn_TYPE_member_t asn_MBR_S1AP_RIMTransfer_ExtIEs_341[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_RLFReportInformation_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_RLFReportInformation_ExtIEs_specs_345; extern asn_TYPE_member_t asn_MBR_S1AP_RLFReportInformation_ExtIEs_345[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_SecurityContext_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_SecurityContext_ExtIEs_specs_349; extern asn_TYPE_member_t asn_MBR_S1AP_SecurityContext_ExtIEs_349[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_SONInformationReply_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_SONInformationReply_ExtIEs_specs_353; extern asn_TYPE_member_t asn_MBR_S1AP_SONInformationReply_ExtIEs_353[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_SONConfigurationTransfer_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_SONConfigurationTransfer_ExtIEs_specs_357; extern asn_TYPE_member_t asn_MBR_S1AP_SONConfigurationTransfer_ExtIEs_357[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_SynchronisationInformation_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_SynchronisationInformation_ExtIEs_specs_361; extern asn_TYPE_member_t asn_MBR_S1AP_SynchronisationInformation_ExtIEs_361[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_SourceeNB_ID_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_SourceeNB_ID_ExtIEs_specs_365; extern asn_TYPE_member_t asn_MBR_S1AP_SourceeNB_ID_ExtIEs_365[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_specs_369; extern asn_TYPE_member_t asn_MBR_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_ExtIEs_369[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ServedGUMMEIsItem_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ServedGUMMEIsItem_ExtIEs_specs_373; extern asn_TYPE_member_t asn_MBR_S1AP_ServedGUMMEIsItem_ExtIEs_373[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_SupportedTAs_Item_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_SupportedTAs_Item_ExtIEs_specs_377; extern asn_TYPE_member_t asn_MBR_S1AP_SupportedTAs_Item_ExtIEs_377[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_TimeSynchronisationInfo_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_TimeSynchronisationInfo_ExtIEs_specs_381; extern asn_TYPE_member_t asn_MBR_S1AP_TimeSynchronisationInfo_ExtIEs_381[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_S_TMSI_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_S_TMSI_ExtIEs_specs_385; extern asn_TYPE_member_t asn_MBR_S1AP_S_TMSI_ExtIEs_385[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_TAIBasedMDT_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_TAIBasedMDT_ExtIEs_specs_389; extern asn_TYPE_member_t asn_MBR_S1AP_TAIBasedMDT_ExtIEs_389[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_TAI_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_TAI_ExtIEs_specs_393; extern asn_TYPE_member_t asn_MBR_S1AP_TAI_ExtIEs_393[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_TAI_Broadcast_Item_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_TAI_Broadcast_Item_ExtIEs_specs_397; extern asn_TYPE_member_t asn_MBR_S1AP_TAI_Broadcast_Item_ExtIEs_397[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_TAI_Cancelled_Item_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_TAI_Cancelled_Item_ExtIEs_specs_401; extern asn_TYPE_member_t asn_MBR_S1AP_TAI_Cancelled_Item_ExtIEs_401[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_TABasedMDT_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_TABasedMDT_ExtIEs_specs_405; extern asn_TYPE_member_t asn_MBR_S1AP_TABasedMDT_ExtIEs_405[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CompletedCellinTAI_Item_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CompletedCellinTAI_Item_ExtIEs_specs_409; extern asn_TYPE_member_t asn_MBR_S1AP_CompletedCellinTAI_Item_ExtIEs_409[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_TargeteNB_ID_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_TargeteNB_ID_ExtIEs_specs_413; extern asn_TYPE_member_t asn_MBR_S1AP_TargeteNB_ID_ExtIEs_413[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_TargetRNC_ID_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_TargetRNC_ID_ExtIEs_specs_417; extern asn_TYPE_member_t asn_MBR_S1AP_TargetRNC_ID_ExtIEs_417[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs_specs_421; extern asn_TYPE_member_t asn_MBR_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_ExtIEs_421[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_M1ThresholdEventA2_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_M1ThresholdEventA2_ExtIEs_specs_425; extern asn_TYPE_member_t asn_MBR_S1AP_M1ThresholdEventA2_ExtIEs_425[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_TraceActivation_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_TraceActivation_ExtIEs_specs_429; extern asn_TYPE_member_t asn_MBR_S1AP_TraceActivation_ExtIEs_429[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_Tunnel_Information_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_Tunnel_Information_ExtIEs_specs_433; extern asn_TYPE_member_t asn_MBR_S1AP_Tunnel_Information_ExtIEs_433[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEAggregate_MaximumBitrates_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEAggregate_MaximumBitrates_ExtIEs_specs_437; extern asn_TYPE_member_t asn_MBR_S1AP_UEAggregate_MaximumBitrates_ExtIEs_437[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UE_S1AP_ID_pair_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UE_S1AP_ID_pair_ExtIEs_specs_441; extern asn_TYPE_member_t asn_MBR_S1AP_UE_S1AP_ID_pair_ExtIEs_441[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs_specs_445; extern asn_TYPE_member_t asn_MBR_S1AP_UE_associatedLogicalS1_ConnectionItemExtIEs_445[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UESecurityCapabilities_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UESecurityCapabilities_ExtIEs_specs_449; extern asn_TYPE_member_t asn_MBR_S1AP_UESecurityCapabilities_ExtIEs_449[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs_specs_453; extern asn_TYPE_member_t asn_MBR_S1AP_UE_Sidelink_Aggregate_MaximumBitrates_ExtIEs_453[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UL_CP_SecurityInformation_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UL_CP_SecurityInformation_ExtIEs_specs_457; extern asn_TYPE_member_t asn_MBR_S1AP_UL_CP_SecurityInformation_ExtIEs_457[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UserLocationInformation_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UserLocationInformation_ExtIEs_specs_461; extern asn_TYPE_member_t asn_MBR_S1AP_UserLocationInformation_ExtIEs_461[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_V2XServicesAuthorized_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_V2XServicesAuthorized_ExtIEs_specs_465; extern asn_TYPE_member_t asn_MBR_S1AP_V2XServicesAuthorized_ExtIEs_465[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_X2TNLConfigurationInfo_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_X2TNLConfigurationInfo_ExtIEs_specs_469; extern asn_TYPE_member_t asn_MBR_S1AP_X2TNLConfigurationInfo_ExtIEs_469[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENBX2ExtTLA_ExtIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBX2ExtTLA_ExtIEs_specs_473; extern asn_TYPE_member_t asn_MBR_S1AP_ENBX2ExtTLA_ExtIEs_473[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_ProtocolExtensionField_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProtocolExtensionID.c000066400000000000000000000037421333553357400225440ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-CommonDataTypes" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ProtocolExtensionID.h" int S1AP_ProtocolExtensionID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolExtensionID_constr_1 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionID_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolExtensionID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionID = { "ProtocolExtensionID", "ProtocolExtensionID", &asn_OP_NativeInteger, asn_DEF_S1AP_ProtocolExtensionID_tags_1, sizeof(asn_DEF_S1AP_ProtocolExtensionID_tags_1) /sizeof(asn_DEF_S1AP_ProtocolExtensionID_tags_1[0]), /* 1 */ asn_DEF_S1AP_ProtocolExtensionID_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolExtensionID_tags_1) /sizeof(asn_DEF_S1AP_ProtocolExtensionID_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolExtensionID_constr_1, &asn_PER_type_S1AP_ProtocolExtensionID_constr_1, S1AP_ProtocolExtensionID_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProtocolExtensionID.h000066400000000000000000000027271333553357400225530ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-CommonDataTypes" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ProtocolExtensionID_H_ #define _S1AP_ProtocolExtensionID_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ProtocolExtensionID */ typedef long S1AP_ProtocolExtensionID_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolExtensionID_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolExtensionID; asn_struct_free_f S1AP_ProtocolExtensionID_free; asn_struct_print_f S1AP_ProtocolExtensionID_print; asn_constr_check_f S1AP_ProtocolExtensionID_constraint; ber_type_decoder_f S1AP_ProtocolExtensionID_decode_ber; der_type_encoder_f S1AP_ProtocolExtensionID_encode_der; xer_type_decoder_f S1AP_ProtocolExtensionID_decode_xer; xer_type_encoder_f S1AP_ProtocolExtensionID_encode_xer; oer_type_decoder_f S1AP_ProtocolExtensionID_decode_oer; oer_type_encoder_f S1AP_ProtocolExtensionID_encode_oer; per_type_decoder_f S1AP_ProtocolExtensionID_decode_uper; per_type_encoder_f S1AP_ProtocolExtensionID_encode_uper; per_type_decoder_f S1AP_ProtocolExtensionID_decode_aper; per_type_encoder_f S1AP_ProtocolExtensionID_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_ProtocolExtensionID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProtocolIE-Container.c000066400000000000000000005033011333553357400225640ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-Containers" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ProtocolIE-Container.h" #include "S1AP_ProtocolIE-Field.h" static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P0_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P0_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P1_constr_3 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P1_constr_3 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P2_constr_5 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P2_constr_5 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P3_constr_7 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P3_constr_7 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P4_constr_9 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P4_constr_9 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P5_constr_11 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P5_constr_11 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P6_constr_13 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P6_constr_13 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P7_constr_15 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P7_constr_15 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P8_constr_17 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P8_constr_17 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P9_constr_19 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P9_constr_19 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P10_constr_21 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P10_constr_21 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P11_constr_23 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P11_constr_23 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P12_constr_25 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P12_constr_25 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P13_constr_27 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P13_constr_27 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P14_constr_29 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P14_constr_29 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P15_constr_31 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P15_constr_31 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P16_constr_33 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P16_constr_33 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P17_constr_35 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P17_constr_35 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P18_constr_37 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P18_constr_37 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P19_constr_39 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P19_constr_39 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P20_constr_41 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P20_constr_41 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P21_constr_43 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P21_constr_43 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P22_constr_45 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P22_constr_45 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P23_constr_47 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P23_constr_47 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P24_constr_49 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P24_constr_49 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P25_constr_51 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P25_constr_51 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P26_constr_53 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P26_constr_53 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P27_constr_55 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P27_constr_55 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P28_constr_57 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P28_constr_57 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P29_constr_59 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P29_constr_59 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P30_constr_61 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P30_constr_61 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P31_constr_63 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P31_constr_63 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P32_constr_65 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P32_constr_65 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P33_constr_67 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P33_constr_67 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P34_constr_69 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P34_constr_69 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P35_constr_71 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P35_constr_71 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P36_constr_73 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P36_constr_73 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P37_constr_75 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P37_constr_75 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P38_constr_77 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P38_constr_77 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P39_constr_79 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P39_constr_79 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P40_constr_81 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P40_constr_81 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P41_constr_83 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P41_constr_83 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P42_constr_85 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P42_constr_85 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P43_constr_87 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P43_constr_87 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P44_constr_89 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P44_constr_89 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P45_constr_91 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P45_constr_91 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P46_constr_93 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P46_constr_93 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P47_constr_95 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P47_constr_95 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P48_constr_97 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P48_constr_97 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P49_constr_99 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P49_constr_99 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P50_constr_101 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P50_constr_101 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P51_constr_103 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P51_constr_103 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P52_constr_105 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P52_constr_105 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P53_constr_107 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P53_constr_107 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P54_constr_109 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P54_constr_109 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P55_constr_111 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P55_constr_111 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P56_constr_113 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P56_constr_113 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P57_constr_115 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P57_constr_115 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P58_constr_117 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P58_constr_117 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P59_constr_119 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P59_constr_119 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P60_constr_121 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P60_constr_121 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P61_constr_123 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P61_constr_123 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P62_constr_125 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P62_constr_125 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P63_constr_127 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P63_constr_127 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P64_constr_129 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P64_constr_129 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P65_constr_131 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P65_constr_131 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P66_constr_133 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P66_constr_133 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P67_constr_135 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P67_constr_135 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P68_constr_137 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P68_constr_137 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P69_constr_139 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P69_constr_139 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P70_constr_141 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P70_constr_141 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P71_constr_143 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P71_constr_143 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P72_constr_145 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P72_constr_145 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P73_constr_147 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P73_constr_147 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P74_constr_149 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P74_constr_149 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P75_constr_151 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P75_constr_151 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P76_constr_153 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P76_constr_153 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P77_constr_155 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P77_constr_155 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P78_constr_157 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P78_constr_157 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P79_constr_159 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P79_constr_159 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P80_constr_161 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P80_constr_161 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P81_constr_163 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P81_constr_163 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P82_constr_165 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P82_constr_165 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P83_constr_167 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P83_constr_167 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P84_constr_169 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P84_constr_169 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P85_constr_171 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P85_constr_171 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P86_constr_173 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P86_constr_173 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P87_constr_175 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P87_constr_175 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P88_constr_177 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P88_constr_177 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P89_constr_179 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P89_constr_179 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_Container_6551P90_constr_181 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P90_constr_181 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (SIZE(0..65535)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P0_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_HandoverRequiredIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P0_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P0_specs_1 = { sizeof(struct S1AP_ProtocolIE_Container_6551P0), offsetof(struct S1AP_ProtocolIE_Container_6551P0, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P0 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P0_tags_1, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P0_tags_1) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P0_tags_1[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P0_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P0_tags_1) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P0_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P0_constr_1, &asn_PER_type_S1AP_ProtocolIE_Container_6551P0_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P0_1, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P0_specs_1 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P1_3[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_HandoverCommandIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P1_tags_3[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P1_specs_3 = { sizeof(struct S1AP_ProtocolIE_Container_6551P1), offsetof(struct S1AP_ProtocolIE_Container_6551P1, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P1 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P1_tags_3, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P1_tags_3) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P1_tags_3[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P1_tags_3, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P1_tags_3) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P1_tags_3[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P1_constr_3, &asn_PER_type_S1AP_ProtocolIE_Container_6551P1_constr_3, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P1_3, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P1_specs_3 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P2_5[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_HandoverPreparationFailureIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P2_tags_5[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P2_specs_5 = { sizeof(struct S1AP_ProtocolIE_Container_6551P2), offsetof(struct S1AP_ProtocolIE_Container_6551P2, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P2 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P2_tags_5, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P2_tags_5) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P2_tags_5[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P2_tags_5, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P2_tags_5) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P2_tags_5[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P2_constr_5, &asn_PER_type_S1AP_ProtocolIE_Container_6551P2_constr_5, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P2_5, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P2_specs_5 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P3_7[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_HandoverRequestIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P3_tags_7[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P3_specs_7 = { sizeof(struct S1AP_ProtocolIE_Container_6551P3), offsetof(struct S1AP_ProtocolIE_Container_6551P3, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P3 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P3_tags_7, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P3_tags_7) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P3_tags_7[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P3_tags_7, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P3_tags_7) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P3_tags_7[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P3_constr_7, &asn_PER_type_S1AP_ProtocolIE_Container_6551P3_constr_7, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P3_7, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P3_specs_7 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P4_9[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_HandoverRequestAcknowledgeIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P4_tags_9[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P4_specs_9 = { sizeof(struct S1AP_ProtocolIE_Container_6551P4), offsetof(struct S1AP_ProtocolIE_Container_6551P4, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P4 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P4_tags_9, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P4_tags_9) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P4_tags_9[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P4_tags_9, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P4_tags_9) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P4_tags_9[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P4_constr_9, &asn_PER_type_S1AP_ProtocolIE_Container_6551P4_constr_9, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P4_9, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P4_specs_9 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P5_11[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_HandoverFailureIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P5_tags_11[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P5_specs_11 = { sizeof(struct S1AP_ProtocolIE_Container_6551P5), offsetof(struct S1AP_ProtocolIE_Container_6551P5, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P5 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P5_tags_11, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P5_tags_11) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P5_tags_11[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P5_tags_11, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P5_tags_11) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P5_tags_11[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P5_constr_11, &asn_PER_type_S1AP_ProtocolIE_Container_6551P5_constr_11, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P5_11, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P5_specs_11 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P6_13[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_HandoverNotifyIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P6_tags_13[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P6_specs_13 = { sizeof(struct S1AP_ProtocolIE_Container_6551P6), offsetof(struct S1AP_ProtocolIE_Container_6551P6, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P6 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P6_tags_13, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P6_tags_13) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P6_tags_13[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P6_tags_13, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P6_tags_13) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P6_tags_13[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P6_constr_13, &asn_PER_type_S1AP_ProtocolIE_Container_6551P6_constr_13, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P6_13, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P6_specs_13 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P7_15[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_PathSwitchRequestIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P7_tags_15[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P7_specs_15 = { sizeof(struct S1AP_ProtocolIE_Container_6551P7), offsetof(struct S1AP_ProtocolIE_Container_6551P7, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P7 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P7_tags_15, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P7_tags_15) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P7_tags_15[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P7_tags_15, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P7_tags_15) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P7_tags_15[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P7_constr_15, &asn_PER_type_S1AP_ProtocolIE_Container_6551P7_constr_15, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P7_15, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P7_specs_15 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P8_17[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_PathSwitchRequestAcknowledgeIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P8_tags_17[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P8_specs_17 = { sizeof(struct S1AP_ProtocolIE_Container_6551P8), offsetof(struct S1AP_ProtocolIE_Container_6551P8, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P8 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P8_tags_17, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P8_tags_17) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P8_tags_17[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P8_tags_17, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P8_tags_17) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P8_tags_17[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P8_constr_17, &asn_PER_type_S1AP_ProtocolIE_Container_6551P8_constr_17, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P8_17, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P8_specs_17 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P9_19[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_PathSwitchRequestFailureIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P9_tags_19[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P9_specs_19 = { sizeof(struct S1AP_ProtocolIE_Container_6551P9), offsetof(struct S1AP_ProtocolIE_Container_6551P9, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P9 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P9_tags_19, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P9_tags_19) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P9_tags_19[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P9_tags_19, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P9_tags_19) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P9_tags_19[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P9_constr_19, &asn_PER_type_S1AP_ProtocolIE_Container_6551P9_constr_19, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P9_19, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P9_specs_19 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P10_21[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_HandoverCancelIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P10_tags_21[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P10_specs_21 = { sizeof(struct S1AP_ProtocolIE_Container_6551P10), offsetof(struct S1AP_ProtocolIE_Container_6551P10, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P10 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P10_tags_21, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P10_tags_21) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P10_tags_21[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P10_tags_21, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P10_tags_21) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P10_tags_21[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P10_constr_21, &asn_PER_type_S1AP_ProtocolIE_Container_6551P10_constr_21, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P10_21, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P10_specs_21 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P11_23[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_HandoverCancelAcknowledgeIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P11_tags_23[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P11_specs_23 = { sizeof(struct S1AP_ProtocolIE_Container_6551P11), offsetof(struct S1AP_ProtocolIE_Container_6551P11, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P11 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P11_tags_23, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P11_tags_23) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P11_tags_23[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P11_tags_23, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P11_tags_23) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P11_tags_23[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P11_constr_23, &asn_PER_type_S1AP_ProtocolIE_Container_6551P11_constr_23, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P11_23, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P11_specs_23 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P12_25[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABSetupRequestIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P12_tags_25[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P12_specs_25 = { sizeof(struct S1AP_ProtocolIE_Container_6551P12), offsetof(struct S1AP_ProtocolIE_Container_6551P12, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P12 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P12_tags_25, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P12_tags_25) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P12_tags_25[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P12_tags_25, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P12_tags_25) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P12_tags_25[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P12_constr_25, &asn_PER_type_S1AP_ProtocolIE_Container_6551P12_constr_25, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P12_25, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P12_specs_25 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P13_27[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABSetupResponseIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P13_tags_27[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P13_specs_27 = { sizeof(struct S1AP_ProtocolIE_Container_6551P13), offsetof(struct S1AP_ProtocolIE_Container_6551P13, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P13 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P13_tags_27, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P13_tags_27) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P13_tags_27[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P13_tags_27, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P13_tags_27) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P13_tags_27[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P13_constr_27, &asn_PER_type_S1AP_ProtocolIE_Container_6551P13_constr_27, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P13_27, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P13_specs_27 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P14_29[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABModifyRequestIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P14_tags_29[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P14_specs_29 = { sizeof(struct S1AP_ProtocolIE_Container_6551P14), offsetof(struct S1AP_ProtocolIE_Container_6551P14, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P14 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P14_tags_29, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P14_tags_29) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P14_tags_29[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P14_tags_29, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P14_tags_29) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P14_tags_29[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P14_constr_29, &asn_PER_type_S1AP_ProtocolIE_Container_6551P14_constr_29, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P14_29, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P14_specs_29 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P15_31[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABModifyResponseIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P15_tags_31[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P15_specs_31 = { sizeof(struct S1AP_ProtocolIE_Container_6551P15), offsetof(struct S1AP_ProtocolIE_Container_6551P15, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P15 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P15_tags_31, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P15_tags_31) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P15_tags_31[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P15_tags_31, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P15_tags_31) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P15_tags_31[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P15_constr_31, &asn_PER_type_S1AP_ProtocolIE_Container_6551P15_constr_31, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P15_31, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P15_specs_31 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P16_33[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABReleaseCommandIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P16_tags_33[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P16_specs_33 = { sizeof(struct S1AP_ProtocolIE_Container_6551P16), offsetof(struct S1AP_ProtocolIE_Container_6551P16, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P16 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P16_tags_33, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P16_tags_33) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P16_tags_33[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P16_tags_33, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P16_tags_33) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P16_tags_33[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P16_constr_33, &asn_PER_type_S1AP_ProtocolIE_Container_6551P16_constr_33, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P16_33, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P16_specs_33 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P17_35[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABReleaseResponseIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P17_tags_35[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P17_specs_35 = { sizeof(struct S1AP_ProtocolIE_Container_6551P17), offsetof(struct S1AP_ProtocolIE_Container_6551P17, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P17 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P17_tags_35, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P17_tags_35) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P17_tags_35[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P17_tags_35, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P17_tags_35) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P17_tags_35[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P17_constr_35, &asn_PER_type_S1AP_ProtocolIE_Container_6551P17_constr_35, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P17_35, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P17_specs_35 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P18_37[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABReleaseIndicationIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P18_tags_37[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P18_specs_37 = { sizeof(struct S1AP_ProtocolIE_Container_6551P18), offsetof(struct S1AP_ProtocolIE_Container_6551P18, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P18 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P18_tags_37, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P18_tags_37) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P18_tags_37[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P18_tags_37, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P18_tags_37) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P18_tags_37[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P18_constr_37, &asn_PER_type_S1AP_ProtocolIE_Container_6551P18_constr_37, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P18_37, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P18_specs_37 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P19_39[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_InitialContextSetupRequestIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P19_tags_39[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P19_specs_39 = { sizeof(struct S1AP_ProtocolIE_Container_6551P19), offsetof(struct S1AP_ProtocolIE_Container_6551P19, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P19 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P19_tags_39, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P19_tags_39) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P19_tags_39[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P19_tags_39, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P19_tags_39) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P19_tags_39[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P19_constr_39, &asn_PER_type_S1AP_ProtocolIE_Container_6551P19_constr_39, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P19_39, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P19_specs_39 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P20_41[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_InitialContextSetupResponseIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P20_tags_41[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P20_specs_41 = { sizeof(struct S1AP_ProtocolIE_Container_6551P20), offsetof(struct S1AP_ProtocolIE_Container_6551P20, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P20 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P20_tags_41, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P20_tags_41) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P20_tags_41[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P20_tags_41, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P20_tags_41) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P20_tags_41[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P20_constr_41, &asn_PER_type_S1AP_ProtocolIE_Container_6551P20_constr_41, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P20_41, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P20_specs_41 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P21_43[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_InitialContextSetupFailureIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P21_tags_43[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P21_specs_43 = { sizeof(struct S1AP_ProtocolIE_Container_6551P21), offsetof(struct S1AP_ProtocolIE_Container_6551P21, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P21 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P21_tags_43, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P21_tags_43) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P21_tags_43[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P21_tags_43, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P21_tags_43) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P21_tags_43[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P21_constr_43, &asn_PER_type_S1AP_ProtocolIE_Container_6551P21_constr_43, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P21_43, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P21_specs_43 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P22_45[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_PagingIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P22_tags_45[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P22_specs_45 = { sizeof(struct S1AP_ProtocolIE_Container_6551P22), offsetof(struct S1AP_ProtocolIE_Container_6551P22, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P22 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P22_tags_45, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P22_tags_45) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P22_tags_45[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P22_tags_45, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P22_tags_45) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P22_tags_45[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P22_constr_45, &asn_PER_type_S1AP_ProtocolIE_Container_6551P22_constr_45, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P22_45, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P22_specs_45 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P23_47[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextReleaseRequest_IEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P23_tags_47[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P23_specs_47 = { sizeof(struct S1AP_ProtocolIE_Container_6551P23), offsetof(struct S1AP_ProtocolIE_Container_6551P23, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P23 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P23_tags_47, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P23_tags_47) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P23_tags_47[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P23_tags_47, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P23_tags_47) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P23_tags_47[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P23_constr_47, &asn_PER_type_S1AP_ProtocolIE_Container_6551P23_constr_47, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P23_47, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P23_specs_47 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P24_49[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextReleaseCommand_IEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P24_tags_49[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P24_specs_49 = { sizeof(struct S1AP_ProtocolIE_Container_6551P24), offsetof(struct S1AP_ProtocolIE_Container_6551P24, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P24 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P24_tags_49, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P24_tags_49) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P24_tags_49[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P24_tags_49, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P24_tags_49) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P24_tags_49[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P24_constr_49, &asn_PER_type_S1AP_ProtocolIE_Container_6551P24_constr_49, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P24_49, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P24_specs_49 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P25_51[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextReleaseComplete_IEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P25_tags_51[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P25_specs_51 = { sizeof(struct S1AP_ProtocolIE_Container_6551P25), offsetof(struct S1AP_ProtocolIE_Container_6551P25, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P25 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P25_tags_51, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P25_tags_51) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P25_tags_51[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P25_tags_51, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P25_tags_51) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P25_tags_51[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P25_constr_51, &asn_PER_type_S1AP_ProtocolIE_Container_6551P25_constr_51, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P25_51, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P25_specs_51 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P26_53[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextModificationRequestIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P26_tags_53[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P26_specs_53 = { sizeof(struct S1AP_ProtocolIE_Container_6551P26), offsetof(struct S1AP_ProtocolIE_Container_6551P26, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P26 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P26_tags_53, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P26_tags_53) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P26_tags_53[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P26_tags_53, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P26_tags_53) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P26_tags_53[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P26_constr_53, &asn_PER_type_S1AP_ProtocolIE_Container_6551P26_constr_53, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P26_53, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P26_specs_53 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P27_55[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextModificationResponseIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P27_tags_55[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P27_specs_55 = { sizeof(struct S1AP_ProtocolIE_Container_6551P27), offsetof(struct S1AP_ProtocolIE_Container_6551P27, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P27 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P27_tags_55, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P27_tags_55) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P27_tags_55[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P27_tags_55, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P27_tags_55) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P27_tags_55[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P27_constr_55, &asn_PER_type_S1AP_ProtocolIE_Container_6551P27_constr_55, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P27_55, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P27_specs_55 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P28_57[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextModificationFailureIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P28_tags_57[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P28_specs_57 = { sizeof(struct S1AP_ProtocolIE_Container_6551P28), offsetof(struct S1AP_ProtocolIE_Container_6551P28, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P28 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P28_tags_57, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P28_tags_57) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P28_tags_57[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P28_tags_57, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P28_tags_57) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P28_tags_57[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P28_constr_57, &asn_PER_type_S1AP_ProtocolIE_Container_6551P28_constr_57, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P28_57, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P28_specs_57 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P29_59[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UERadioCapabilityMatchRequestIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P29_tags_59[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P29_specs_59 = { sizeof(struct S1AP_ProtocolIE_Container_6551P29), offsetof(struct S1AP_ProtocolIE_Container_6551P29, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P29 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P29_tags_59, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P29_tags_59) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P29_tags_59[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P29_tags_59, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P29_tags_59) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P29_tags_59[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P29_constr_59, &asn_PER_type_S1AP_ProtocolIE_Container_6551P29_constr_59, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P29_59, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P29_specs_59 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P30_61[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UERadioCapabilityMatchResponseIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P30_tags_61[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P30_specs_61 = { sizeof(struct S1AP_ProtocolIE_Container_6551P30), offsetof(struct S1AP_ProtocolIE_Container_6551P30, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P30 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P30_tags_61, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P30_tags_61) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P30_tags_61[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P30_tags_61, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P30_tags_61) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P30_tags_61[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P30_constr_61, &asn_PER_type_S1AP_ProtocolIE_Container_6551P30_constr_61, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P30_61, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P30_specs_61 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P31_63[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_DownlinkNASTransport_IEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P31_tags_63[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P31_specs_63 = { sizeof(struct S1AP_ProtocolIE_Container_6551P31), offsetof(struct S1AP_ProtocolIE_Container_6551P31, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P31 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P31_tags_63, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P31_tags_63) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P31_tags_63[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P31_tags_63, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P31_tags_63) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P31_tags_63[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P31_constr_63, &asn_PER_type_S1AP_ProtocolIE_Container_6551P31_constr_63, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P31_63, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P31_specs_63 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P32_65[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_InitialUEMessage_IEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P32_tags_65[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P32_specs_65 = { sizeof(struct S1AP_ProtocolIE_Container_6551P32), offsetof(struct S1AP_ProtocolIE_Container_6551P32, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P32 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P32_tags_65, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P32_tags_65) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P32_tags_65[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P32_tags_65, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P32_tags_65) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P32_tags_65[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P32_constr_65, &asn_PER_type_S1AP_ProtocolIE_Container_6551P32_constr_65, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P32_65, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P32_specs_65 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P33_67[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UplinkNASTransport_IEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P33_tags_67[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P33_specs_67 = { sizeof(struct S1AP_ProtocolIE_Container_6551P33), offsetof(struct S1AP_ProtocolIE_Container_6551P33, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P33 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P33_tags_67, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P33_tags_67) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P33_tags_67[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P33_tags_67, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P33_tags_67) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P33_tags_67[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P33_constr_67, &asn_PER_type_S1AP_ProtocolIE_Container_6551P33_constr_67, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P33_67, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P33_specs_67 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P34_69[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_NASNonDeliveryIndication_IEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P34_tags_69[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P34_specs_69 = { sizeof(struct S1AP_ProtocolIE_Container_6551P34), offsetof(struct S1AP_ProtocolIE_Container_6551P34, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P34 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P34_tags_69, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P34_tags_69) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P34_tags_69[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P34_tags_69, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P34_tags_69) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P34_tags_69[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P34_constr_69, &asn_PER_type_S1AP_ProtocolIE_Container_6551P34_constr_69, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P34_69, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P34_specs_69 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P35_71[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_RerouteNASRequest_IEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P35_tags_71[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P35_specs_71 = { sizeof(struct S1AP_ProtocolIE_Container_6551P35), offsetof(struct S1AP_ProtocolIE_Container_6551P35, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P35 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P35_tags_71, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P35_tags_71) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P35_tags_71[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P35_tags_71, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P35_tags_71) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P35_tags_71[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P35_constr_71, &asn_PER_type_S1AP_ProtocolIE_Container_6551P35_constr_71, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P35_71, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P35_specs_71 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P36_73[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_NASDeliveryIndicationIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P36_tags_73[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P36_specs_73 = { sizeof(struct S1AP_ProtocolIE_Container_6551P36), offsetof(struct S1AP_ProtocolIE_Container_6551P36, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P36 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P36_tags_73, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P36_tags_73) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P36_tags_73[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P36_tags_73, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P36_tags_73) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P36_tags_73[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P36_constr_73, &asn_PER_type_S1AP_ProtocolIE_Container_6551P36_constr_73, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P36_73, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P36_specs_73 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P37_75[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ResetIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P37_tags_75[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P37_specs_75 = { sizeof(struct S1AP_ProtocolIE_Container_6551P37), offsetof(struct S1AP_ProtocolIE_Container_6551P37, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P37 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P37_tags_75, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P37_tags_75) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P37_tags_75[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P37_tags_75, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P37_tags_75) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P37_tags_75[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P37_constr_75, &asn_PER_type_S1AP_ProtocolIE_Container_6551P37_constr_75, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P37_75, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P37_specs_75 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P38_77[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ResetAcknowledgeIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P38_tags_77[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P38_specs_77 = { sizeof(struct S1AP_ProtocolIE_Container_6551P38), offsetof(struct S1AP_ProtocolIE_Container_6551P38, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P38 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P38_tags_77, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P38_tags_77) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P38_tags_77[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P38_tags_77, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P38_tags_77) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P38_tags_77[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P38_constr_77, &asn_PER_type_S1AP_ProtocolIE_Container_6551P38_constr_77, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P38_77, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P38_specs_77 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P39_79[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ErrorIndicationIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P39_tags_79[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P39_specs_79 = { sizeof(struct S1AP_ProtocolIE_Container_6551P39), offsetof(struct S1AP_ProtocolIE_Container_6551P39, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P39 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P39_tags_79, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P39_tags_79) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P39_tags_79[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P39_tags_79, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P39_tags_79) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P39_tags_79[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P39_constr_79, &asn_PER_type_S1AP_ProtocolIE_Container_6551P39_constr_79, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P39_79, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P39_specs_79 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P40_81[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_S1SetupRequestIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P40_tags_81[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P40_specs_81 = { sizeof(struct S1AP_ProtocolIE_Container_6551P40), offsetof(struct S1AP_ProtocolIE_Container_6551P40, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P40 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P40_tags_81, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P40_tags_81) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P40_tags_81[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P40_tags_81, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P40_tags_81) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P40_tags_81[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P40_constr_81, &asn_PER_type_S1AP_ProtocolIE_Container_6551P40_constr_81, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P40_81, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P40_specs_81 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P41_83[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_S1SetupResponseIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P41_tags_83[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P41_specs_83 = { sizeof(struct S1AP_ProtocolIE_Container_6551P41), offsetof(struct S1AP_ProtocolIE_Container_6551P41, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P41 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P41_tags_83, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P41_tags_83) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P41_tags_83[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P41_tags_83, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P41_tags_83) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P41_tags_83[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P41_constr_83, &asn_PER_type_S1AP_ProtocolIE_Container_6551P41_constr_83, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P41_83, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P41_specs_83 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P42_85[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_S1SetupFailureIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P42_tags_85[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P42_specs_85 = { sizeof(struct S1AP_ProtocolIE_Container_6551P42), offsetof(struct S1AP_ProtocolIE_Container_6551P42, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P42 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P42_tags_85, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P42_tags_85) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P42_tags_85[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P42_tags_85, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P42_tags_85) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P42_tags_85[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P42_constr_85, &asn_PER_type_S1AP_ProtocolIE_Container_6551P42_constr_85, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P42_85, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P42_specs_85 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P43_87[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ENBConfigurationUpdateIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P43_tags_87[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P43_specs_87 = { sizeof(struct S1AP_ProtocolIE_Container_6551P43), offsetof(struct S1AP_ProtocolIE_Container_6551P43, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P43 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P43_tags_87, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P43_tags_87) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P43_tags_87[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P43_tags_87, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P43_tags_87) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P43_tags_87[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P43_constr_87, &asn_PER_type_S1AP_ProtocolIE_Container_6551P43_constr_87, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P43_87, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P43_specs_87 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P44_89[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ENBConfigurationUpdateAcknowledgeIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P44_tags_89[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P44_specs_89 = { sizeof(struct S1AP_ProtocolIE_Container_6551P44), offsetof(struct S1AP_ProtocolIE_Container_6551P44, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P44 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P44_tags_89, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P44_tags_89) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P44_tags_89[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P44_tags_89, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P44_tags_89) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P44_tags_89[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P44_constr_89, &asn_PER_type_S1AP_ProtocolIE_Container_6551P44_constr_89, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P44_89, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P44_specs_89 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P45_91[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ENBConfigurationUpdateFailureIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P45_tags_91[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P45_specs_91 = { sizeof(struct S1AP_ProtocolIE_Container_6551P45), offsetof(struct S1AP_ProtocolIE_Container_6551P45, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P45 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P45_tags_91, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P45_tags_91) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P45_tags_91[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P45_tags_91, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P45_tags_91) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P45_tags_91[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P45_constr_91, &asn_PER_type_S1AP_ProtocolIE_Container_6551P45_constr_91, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P45_91, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P45_specs_91 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P46_93[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_MMEConfigurationUpdateIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P46_tags_93[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P46_specs_93 = { sizeof(struct S1AP_ProtocolIE_Container_6551P46), offsetof(struct S1AP_ProtocolIE_Container_6551P46, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P46 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P46_tags_93, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P46_tags_93) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P46_tags_93[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P46_tags_93, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P46_tags_93) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P46_tags_93[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P46_constr_93, &asn_PER_type_S1AP_ProtocolIE_Container_6551P46_constr_93, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P46_93, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P46_specs_93 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P47_95[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_MMEConfigurationUpdateAcknowledgeIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P47_tags_95[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P47_specs_95 = { sizeof(struct S1AP_ProtocolIE_Container_6551P47), offsetof(struct S1AP_ProtocolIE_Container_6551P47, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P47 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P47_tags_95, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P47_tags_95) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P47_tags_95[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P47_tags_95, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P47_tags_95) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P47_tags_95[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P47_constr_95, &asn_PER_type_S1AP_ProtocolIE_Container_6551P47_constr_95, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P47_95, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P47_specs_95 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P48_97[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_MMEConfigurationUpdateFailureIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P48_tags_97[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P48_specs_97 = { sizeof(struct S1AP_ProtocolIE_Container_6551P48), offsetof(struct S1AP_ProtocolIE_Container_6551P48, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P48 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P48_tags_97, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P48_tags_97) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P48_tags_97[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P48_tags_97, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P48_tags_97) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P48_tags_97[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P48_constr_97, &asn_PER_type_S1AP_ProtocolIE_Container_6551P48_constr_97, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P48_97, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P48_specs_97 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P49_99[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_DownlinkS1cdma2000tunnellingIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P49_tags_99[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P49_specs_99 = { sizeof(struct S1AP_ProtocolIE_Container_6551P49), offsetof(struct S1AP_ProtocolIE_Container_6551P49, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P49 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P49_tags_99, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P49_tags_99) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P49_tags_99[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P49_tags_99, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P49_tags_99) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P49_tags_99[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P49_constr_99, &asn_PER_type_S1AP_ProtocolIE_Container_6551P49_constr_99, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P49_99, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P49_specs_99 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P50_101[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UplinkS1cdma2000tunnellingIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P50_tags_101[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P50_specs_101 = { sizeof(struct S1AP_ProtocolIE_Container_6551P50), offsetof(struct S1AP_ProtocolIE_Container_6551P50, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P50 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P50_tags_101, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P50_tags_101) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P50_tags_101[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P50_tags_101, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P50_tags_101) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P50_tags_101[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P50_constr_101, &asn_PER_type_S1AP_ProtocolIE_Container_6551P50_constr_101, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P50_101, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P50_specs_101 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P51_103[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UECapabilityInfoIndicationIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P51_tags_103[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P51_specs_103 = { sizeof(struct S1AP_ProtocolIE_Container_6551P51), offsetof(struct S1AP_ProtocolIE_Container_6551P51, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P51 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P51_tags_103, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P51_tags_103) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P51_tags_103[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P51_tags_103, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P51_tags_103) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P51_tags_103[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P51_constr_103, &asn_PER_type_S1AP_ProtocolIE_Container_6551P51_constr_103, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P51_103, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P51_specs_103 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P52_105[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ENBStatusTransferIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P52_tags_105[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P52_specs_105 = { sizeof(struct S1AP_ProtocolIE_Container_6551P52), offsetof(struct S1AP_ProtocolIE_Container_6551P52, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P52 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P52_tags_105, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P52_tags_105) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P52_tags_105[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P52_tags_105, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P52_tags_105) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P52_tags_105[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P52_constr_105, &asn_PER_type_S1AP_ProtocolIE_Container_6551P52_constr_105, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P52_105, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P52_specs_105 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P53_107[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_MMEStatusTransferIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P53_tags_107[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P53_specs_107 = { sizeof(struct S1AP_ProtocolIE_Container_6551P53), offsetof(struct S1AP_ProtocolIE_Container_6551P53, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P53 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P53_tags_107, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P53_tags_107) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P53_tags_107[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P53_tags_107, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P53_tags_107) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P53_tags_107[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P53_constr_107, &asn_PER_type_S1AP_ProtocolIE_Container_6551P53_constr_107, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P53_107, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P53_specs_107 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P54_109[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TraceStartIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P54_tags_109[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P54_specs_109 = { sizeof(struct S1AP_ProtocolIE_Container_6551P54), offsetof(struct S1AP_ProtocolIE_Container_6551P54, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P54 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P54_tags_109, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P54_tags_109) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P54_tags_109[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P54_tags_109, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P54_tags_109) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P54_tags_109[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P54_constr_109, &asn_PER_type_S1AP_ProtocolIE_Container_6551P54_constr_109, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P54_109, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P54_specs_109 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P55_111[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TraceFailureIndicationIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P55_tags_111[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P55_specs_111 = { sizeof(struct S1AP_ProtocolIE_Container_6551P55), offsetof(struct S1AP_ProtocolIE_Container_6551P55, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P55 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P55_tags_111, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P55_tags_111) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P55_tags_111[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P55_tags_111, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P55_tags_111) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P55_tags_111[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P55_constr_111, &asn_PER_type_S1AP_ProtocolIE_Container_6551P55_constr_111, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P55_111, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P55_specs_111 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P56_113[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_DeactivateTraceIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P56_tags_113[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P56_specs_113 = { sizeof(struct S1AP_ProtocolIE_Container_6551P56), offsetof(struct S1AP_ProtocolIE_Container_6551P56, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P56 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P56_tags_113, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P56_tags_113) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P56_tags_113[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P56_tags_113, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P56_tags_113) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P56_tags_113[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P56_constr_113, &asn_PER_type_S1AP_ProtocolIE_Container_6551P56_constr_113, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P56_113, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P56_specs_113 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P57_115[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CellTrafficTraceIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P57_tags_115[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P57_specs_115 = { sizeof(struct S1AP_ProtocolIE_Container_6551P57), offsetof(struct S1AP_ProtocolIE_Container_6551P57, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P57 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P57_tags_115, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P57_tags_115) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P57_tags_115[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P57_tags_115, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P57_tags_115) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P57_tags_115[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P57_constr_115, &asn_PER_type_S1AP_ProtocolIE_Container_6551P57_constr_115, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P57_115, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P57_specs_115 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P58_117[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_LocationReportingControlIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P58_tags_117[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P58_specs_117 = { sizeof(struct S1AP_ProtocolIE_Container_6551P58), offsetof(struct S1AP_ProtocolIE_Container_6551P58, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P58 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P58_tags_117, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P58_tags_117) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P58_tags_117[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P58_tags_117, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P58_tags_117) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P58_tags_117[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P58_constr_117, &asn_PER_type_S1AP_ProtocolIE_Container_6551P58_constr_117, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P58_117, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P58_specs_117 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P59_119[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_LocationReportingFailureIndicationIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P59_tags_119[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P59_specs_119 = { sizeof(struct S1AP_ProtocolIE_Container_6551P59), offsetof(struct S1AP_ProtocolIE_Container_6551P59, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P59 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P59_tags_119, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P59_tags_119) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P59_tags_119[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P59_tags_119, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P59_tags_119) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P59_tags_119[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P59_constr_119, &asn_PER_type_S1AP_ProtocolIE_Container_6551P59_constr_119, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P59_119, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P59_specs_119 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P60_121[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_LocationReportIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P60_tags_121[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P60_specs_121 = { sizeof(struct S1AP_ProtocolIE_Container_6551P60), offsetof(struct S1AP_ProtocolIE_Container_6551P60, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P60 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P60_tags_121, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P60_tags_121) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P60_tags_121[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P60_tags_121, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P60_tags_121) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P60_tags_121[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P60_constr_121, &asn_PER_type_S1AP_ProtocolIE_Container_6551P60_constr_121, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P60_121, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P60_specs_121 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P61_123[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_OverloadStartIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P61_tags_123[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P61_specs_123 = { sizeof(struct S1AP_ProtocolIE_Container_6551P61), offsetof(struct S1AP_ProtocolIE_Container_6551P61, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P61 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P61_tags_123, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P61_tags_123) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P61_tags_123[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P61_tags_123, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P61_tags_123) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P61_tags_123[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P61_constr_123, &asn_PER_type_S1AP_ProtocolIE_Container_6551P61_constr_123, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P61_123, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P61_specs_123 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P62_125[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_OverloadStopIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P62_tags_125[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P62_specs_125 = { sizeof(struct S1AP_ProtocolIE_Container_6551P62), offsetof(struct S1AP_ProtocolIE_Container_6551P62, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P62 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P62_tags_125, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P62_tags_125) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P62_tags_125[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P62_tags_125, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P62_tags_125) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P62_tags_125[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P62_constr_125, &asn_PER_type_S1AP_ProtocolIE_Container_6551P62_constr_125, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P62_125, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P62_specs_125 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P63_127[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_WriteReplaceWarningRequestIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P63_tags_127[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P63_specs_127 = { sizeof(struct S1AP_ProtocolIE_Container_6551P63), offsetof(struct S1AP_ProtocolIE_Container_6551P63, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P63 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P63_tags_127, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P63_tags_127) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P63_tags_127[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P63_tags_127, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P63_tags_127) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P63_tags_127[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P63_constr_127, &asn_PER_type_S1AP_ProtocolIE_Container_6551P63_constr_127, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P63_127, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P63_specs_127 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P64_129[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_WriteReplaceWarningResponseIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P64_tags_129[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P64_specs_129 = { sizeof(struct S1AP_ProtocolIE_Container_6551P64), offsetof(struct S1AP_ProtocolIE_Container_6551P64, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P64 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P64_tags_129, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P64_tags_129) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P64_tags_129[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P64_tags_129, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P64_tags_129) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P64_tags_129[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P64_constr_129, &asn_PER_type_S1AP_ProtocolIE_Container_6551P64_constr_129, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P64_129, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P64_specs_129 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P65_131[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ENBDirectInformationTransferIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P65_tags_131[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P65_specs_131 = { sizeof(struct S1AP_ProtocolIE_Container_6551P65), offsetof(struct S1AP_ProtocolIE_Container_6551P65, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P65 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P65_tags_131, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P65_tags_131) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P65_tags_131[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P65_tags_131, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P65_tags_131) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P65_tags_131[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P65_constr_131, &asn_PER_type_S1AP_ProtocolIE_Container_6551P65_constr_131, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P65_131, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P65_specs_131 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P66_133[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_MMEDirectInformationTransferIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P66_tags_133[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P66_specs_133 = { sizeof(struct S1AP_ProtocolIE_Container_6551P66), offsetof(struct S1AP_ProtocolIE_Container_6551P66, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P66 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P66_tags_133, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P66_tags_133) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P66_tags_133[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P66_tags_133, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P66_tags_133) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P66_tags_133[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P66_constr_133, &asn_PER_type_S1AP_ProtocolIE_Container_6551P66_constr_133, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P66_133, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P66_specs_133 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P67_135[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ENBConfigurationTransferIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P67_tags_135[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P67_specs_135 = { sizeof(struct S1AP_ProtocolIE_Container_6551P67), offsetof(struct S1AP_ProtocolIE_Container_6551P67, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P67 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P67_tags_135, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P67_tags_135) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P67_tags_135[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P67_tags_135, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P67_tags_135) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P67_tags_135[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P67_constr_135, &asn_PER_type_S1AP_ProtocolIE_Container_6551P67_constr_135, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P67_135, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P67_specs_135 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P68_137[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_MMEConfigurationTransferIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P68_tags_137[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P68_specs_137 = { sizeof(struct S1AP_ProtocolIE_Container_6551P68), offsetof(struct S1AP_ProtocolIE_Container_6551P68, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P68 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P68_tags_137, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P68_tags_137) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P68_tags_137[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P68_tags_137, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P68_tags_137) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P68_tags_137[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P68_constr_137, &asn_PER_type_S1AP_ProtocolIE_Container_6551P68_constr_137, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P68_137, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P68_specs_137 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P69_139[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_KillRequestIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P69_tags_139[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P69_specs_139 = { sizeof(struct S1AP_ProtocolIE_Container_6551P69), offsetof(struct S1AP_ProtocolIE_Container_6551P69, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P69 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P69_tags_139, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P69_tags_139) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P69_tags_139[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P69_tags_139, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P69_tags_139) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P69_tags_139[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P69_constr_139, &asn_PER_type_S1AP_ProtocolIE_Container_6551P69_constr_139, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P69_139, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P69_specs_139 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P70_141[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_KillResponseIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P70_tags_141[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P70_specs_141 = { sizeof(struct S1AP_ProtocolIE_Container_6551P70), offsetof(struct S1AP_ProtocolIE_Container_6551P70, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P70 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P70_tags_141, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P70_tags_141) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P70_tags_141[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P70_tags_141, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P70_tags_141) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P70_tags_141[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P70_constr_141, &asn_PER_type_S1AP_ProtocolIE_Container_6551P70_constr_141, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P70_141, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P70_specs_141 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P71_143[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_PWSRestartIndicationIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P71_tags_143[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P71_specs_143 = { sizeof(struct S1AP_ProtocolIE_Container_6551P71), offsetof(struct S1AP_ProtocolIE_Container_6551P71, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P71 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P71_tags_143, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P71_tags_143) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P71_tags_143[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P71_tags_143, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P71_tags_143) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P71_tags_143[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P71_constr_143, &asn_PER_type_S1AP_ProtocolIE_Container_6551P71_constr_143, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P71_143, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P71_specs_143 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P72_145[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_PWSFailureIndicationIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P72_tags_145[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P72_specs_145 = { sizeof(struct S1AP_ProtocolIE_Container_6551P72), offsetof(struct S1AP_ProtocolIE_Container_6551P72, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P72 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P72_tags_145, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P72_tags_145) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P72_tags_145[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P72_tags_145, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P72_tags_145) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P72_tags_145[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P72_constr_145, &asn_PER_type_S1AP_ProtocolIE_Container_6551P72_constr_145, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P72_145, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P72_specs_145 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P73_147[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_DownlinkUEAssociatedLPPaTransport_IEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P73_tags_147[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P73_specs_147 = { sizeof(struct S1AP_ProtocolIE_Container_6551P73), offsetof(struct S1AP_ProtocolIE_Container_6551P73, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P73 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P73_tags_147, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P73_tags_147) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P73_tags_147[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P73_tags_147, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P73_tags_147) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P73_tags_147[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P73_constr_147, &asn_PER_type_S1AP_ProtocolIE_Container_6551P73_constr_147, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P73_147, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P73_specs_147 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P74_149[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UplinkUEAssociatedLPPaTransport_IEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P74_tags_149[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P74_specs_149 = { sizeof(struct S1AP_ProtocolIE_Container_6551P74), offsetof(struct S1AP_ProtocolIE_Container_6551P74, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P74 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P74_tags_149, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P74_tags_149) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P74_tags_149[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P74_tags_149, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P74_tags_149) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P74_tags_149[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P74_constr_149, &asn_PER_type_S1AP_ProtocolIE_Container_6551P74_constr_149, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P74_149, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P74_specs_149 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P75_151[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P75_tags_151[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P75_specs_151 = { sizeof(struct S1AP_ProtocolIE_Container_6551P75), offsetof(struct S1AP_ProtocolIE_Container_6551P75, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P75 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P75_tags_151, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P75_tags_151) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P75_tags_151[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P75_tags_151, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P75_tags_151) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P75_tags_151[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P75_constr_151, &asn_PER_type_S1AP_ProtocolIE_Container_6551P75_constr_151, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P75_151, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P75_specs_151 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P76_153[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UplinkNonUEAssociatedLPPaTransport_IEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P76_tags_153[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P76_specs_153 = { sizeof(struct S1AP_ProtocolIE_Container_6551P76), offsetof(struct S1AP_ProtocolIE_Container_6551P76, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P76 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P76_tags_153, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P76_tags_153) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P76_tags_153[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P76_tags_153, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P76_tags_153) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P76_tags_153[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P76_constr_153, &asn_PER_type_S1AP_ProtocolIE_Container_6551P76_constr_153, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P76_153, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P76_specs_153 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P77_155[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABModificationIndicationIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P77_tags_155[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P77_specs_155 = { sizeof(struct S1AP_ProtocolIE_Container_6551P77), offsetof(struct S1AP_ProtocolIE_Container_6551P77, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P77 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P77_tags_155, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P77_tags_155) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P77_tags_155[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P77_tags_155, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P77_tags_155) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P77_tags_155[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P77_constr_155, &asn_PER_type_S1AP_ProtocolIE_Container_6551P77_constr_155, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P77_155, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P77_specs_155 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P78_157[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABModificationConfirmIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P78_tags_157[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P78_specs_157 = { sizeof(struct S1AP_ProtocolIE_Container_6551P78), offsetof(struct S1AP_ProtocolIE_Container_6551P78, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P78 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P78_tags_157, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P78_tags_157) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P78_tags_157[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P78_tags_157, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P78_tags_157) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P78_tags_157[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P78_constr_157, &asn_PER_type_S1AP_ProtocolIE_Container_6551P78_constr_157, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P78_157, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P78_specs_157 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P79_159[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextModificationIndicationIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P79_tags_159[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P79_specs_159 = { sizeof(struct S1AP_ProtocolIE_Container_6551P79), offsetof(struct S1AP_ProtocolIE_Container_6551P79, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P79 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P79_tags_159, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P79_tags_159) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P79_tags_159[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P79_tags_159, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P79_tags_159) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P79_tags_159[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P79_constr_159, &asn_PER_type_S1AP_ProtocolIE_Container_6551P79_constr_159, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P79_159, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P79_specs_159 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P80_161[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextModificationConfirmIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P80_tags_161[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P80_specs_161 = { sizeof(struct S1AP_ProtocolIE_Container_6551P80), offsetof(struct S1AP_ProtocolIE_Container_6551P80, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P80 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P80_tags_161, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P80_tags_161) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P80_tags_161[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P80_tags_161, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P80_tags_161) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P80_tags_161[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P80_constr_161, &asn_PER_type_S1AP_ProtocolIE_Container_6551P80_constr_161, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P80_161, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P80_specs_161 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P81_163[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextSuspendRequestIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P81_tags_163[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P81_specs_163 = { sizeof(struct S1AP_ProtocolIE_Container_6551P81), offsetof(struct S1AP_ProtocolIE_Container_6551P81, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P81 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P81_tags_163, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P81_tags_163) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P81_tags_163[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P81_tags_163, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P81_tags_163) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P81_tags_163[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P81_constr_163, &asn_PER_type_S1AP_ProtocolIE_Container_6551P81_constr_163, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P81_163, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P81_specs_163 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P82_165[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextSuspendResponseIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P82_tags_165[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P82_specs_165 = { sizeof(struct S1AP_ProtocolIE_Container_6551P82), offsetof(struct S1AP_ProtocolIE_Container_6551P82, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P82 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P82_tags_165, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P82_tags_165) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P82_tags_165[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P82_tags_165, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P82_tags_165) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P82_tags_165[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P82_constr_165, &asn_PER_type_S1AP_ProtocolIE_Container_6551P82_constr_165, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P82_165, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P82_specs_165 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P83_167[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextResumeRequestIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P83_tags_167[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P83_specs_167 = { sizeof(struct S1AP_ProtocolIE_Container_6551P83), offsetof(struct S1AP_ProtocolIE_Container_6551P83, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P83 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P83_tags_167, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P83_tags_167) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P83_tags_167[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P83_tags_167, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P83_tags_167) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P83_tags_167[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P83_constr_167, &asn_PER_type_S1AP_ProtocolIE_Container_6551P83_constr_167, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P83_167, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P83_specs_167 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P84_169[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextResumeResponseIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P84_tags_169[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P84_specs_169 = { sizeof(struct S1AP_ProtocolIE_Container_6551P84), offsetof(struct S1AP_ProtocolIE_Container_6551P84, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P84 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P84_tags_169, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P84_tags_169) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P84_tags_169[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P84_tags_169, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P84_tags_169) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P84_tags_169[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P84_constr_169, &asn_PER_type_S1AP_ProtocolIE_Container_6551P84_constr_169, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P84_169, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P84_specs_169 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P85_171[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextResumeFailureIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P85_tags_171[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P85_specs_171 = { sizeof(struct S1AP_ProtocolIE_Container_6551P85), offsetof(struct S1AP_ProtocolIE_Container_6551P85, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P85 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P85_tags_171, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P85_tags_171) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P85_tags_171[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P85_tags_171, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P85_tags_171) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P85_tags_171[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P85_constr_171, &asn_PER_type_S1AP_ProtocolIE_Container_6551P85_constr_171, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P85_171, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P85_specs_171 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P86_173[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ConnectionEstablishmentIndicationIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P86_tags_173[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P86_specs_173 = { sizeof(struct S1AP_ProtocolIE_Container_6551P86), offsetof(struct S1AP_ProtocolIE_Container_6551P86, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P86 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P86_tags_173, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P86_tags_173) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P86_tags_173[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P86_tags_173, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P86_tags_173) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P86_tags_173[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P86_constr_173, &asn_PER_type_S1AP_ProtocolIE_Container_6551P86_constr_173, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P86_173, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P86_specs_173 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P87_175[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_RetrieveUEInformationIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P87_tags_175[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P87_specs_175 = { sizeof(struct S1AP_ProtocolIE_Container_6551P87), offsetof(struct S1AP_ProtocolIE_Container_6551P87, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P87 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P87_tags_175, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P87_tags_175) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P87_tags_175[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P87_tags_175, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P87_tags_175) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P87_tags_175[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P87_constr_175, &asn_PER_type_S1AP_ProtocolIE_Container_6551P87_constr_175, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P87_175, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P87_specs_175 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P88_177[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEInformationTransferIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P88_tags_177[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P88_specs_177 = { sizeof(struct S1AP_ProtocolIE_Container_6551P88), offsetof(struct S1AP_ProtocolIE_Container_6551P88, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P88 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P88_tags_177, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P88_tags_177) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P88_tags_177[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P88_tags_177, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P88_tags_177) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P88_tags_177[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P88_constr_177, &asn_PER_type_S1AP_ProtocolIE_Container_6551P88_constr_177, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P88_177, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P88_specs_177 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P89_179[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ENBCPRelocationIndicationIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P89_tags_179[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P89_specs_179 = { sizeof(struct S1AP_ProtocolIE_Container_6551P89), offsetof(struct S1AP_ProtocolIE_Container_6551P89, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P89 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P89_tags_179, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P89_tags_179) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P89_tags_179[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P89_tags_179, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P89_tags_179) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P89_tags_179[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P89_constr_179, &asn_PER_type_S1AP_ProtocolIE_Container_6551P89_constr_179, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P89_179, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P89_specs_179 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P90_181[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_MMECPRelocationIndicationIEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_Container_6551P90_tags_181[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P90_specs_181 = { sizeof(struct S1AP_ProtocolIE_Container_6551P90), offsetof(struct S1AP_ProtocolIE_Container_6551P90, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P90 = { "ProtocolIE-Container", "ProtocolIE-Container", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_Container_6551P90_tags_181, sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P90_tags_181) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P90_tags_181[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_Container_6551P90_tags_181, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P90_tags_181) /sizeof(asn_DEF_S1AP_ProtocolIE_Container_6551P90_tags_181[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_Container_6551P90_constr_181, &asn_PER_type_S1AP_ProtocolIE_Container_6551P90_constr_181, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_Container_6551P90_181, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_Container_6551P90_specs_181 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProtocolIE-Container.h000066400000000000000000001514561333553357400226030ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-Containers" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ProtocolIE_Container_H_ #define _S1AP_ProtocolIE_Container_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_HandoverRequiredIEs; struct S1AP_HandoverCommandIEs; struct S1AP_HandoverPreparationFailureIEs; struct S1AP_HandoverRequestIEs; struct S1AP_HandoverRequestAcknowledgeIEs; struct S1AP_HandoverFailureIEs; struct S1AP_HandoverNotifyIEs; struct S1AP_PathSwitchRequestIEs; struct S1AP_PathSwitchRequestAcknowledgeIEs; struct S1AP_PathSwitchRequestFailureIEs; struct S1AP_HandoverCancelIEs; struct S1AP_HandoverCancelAcknowledgeIEs; struct S1AP_E_RABSetupRequestIEs; struct S1AP_E_RABSetupResponseIEs; struct S1AP_E_RABModifyRequestIEs; struct S1AP_E_RABModifyResponseIEs; struct S1AP_E_RABReleaseCommandIEs; struct S1AP_E_RABReleaseResponseIEs; struct S1AP_E_RABReleaseIndicationIEs; struct S1AP_InitialContextSetupRequestIEs; struct S1AP_InitialContextSetupResponseIEs; struct S1AP_InitialContextSetupFailureIEs; struct S1AP_PagingIEs; struct S1AP_UEContextReleaseRequest_IEs; struct S1AP_UEContextReleaseCommand_IEs; struct S1AP_UEContextReleaseComplete_IEs; struct S1AP_UEContextModificationRequestIEs; struct S1AP_UEContextModificationResponseIEs; struct S1AP_UEContextModificationFailureIEs; struct S1AP_UERadioCapabilityMatchRequestIEs; struct S1AP_UERadioCapabilityMatchResponseIEs; struct S1AP_DownlinkNASTransport_IEs; struct S1AP_InitialUEMessage_IEs; struct S1AP_UplinkNASTransport_IEs; struct S1AP_NASNonDeliveryIndication_IEs; struct S1AP_RerouteNASRequest_IEs; struct S1AP_NASDeliveryIndicationIEs; struct S1AP_ResetIEs; struct S1AP_ResetAcknowledgeIEs; struct S1AP_ErrorIndicationIEs; struct S1AP_S1SetupRequestIEs; struct S1AP_S1SetupResponseIEs; struct S1AP_S1SetupFailureIEs; struct S1AP_ENBConfigurationUpdateIEs; struct S1AP_ENBConfigurationUpdateAcknowledgeIEs; struct S1AP_ENBConfigurationUpdateFailureIEs; struct S1AP_MMEConfigurationUpdateIEs; struct S1AP_MMEConfigurationUpdateAcknowledgeIEs; struct S1AP_MMEConfigurationUpdateFailureIEs; struct S1AP_DownlinkS1cdma2000tunnellingIEs; struct S1AP_UplinkS1cdma2000tunnellingIEs; struct S1AP_UECapabilityInfoIndicationIEs; struct S1AP_ENBStatusTransferIEs; struct S1AP_MMEStatusTransferIEs; struct S1AP_TraceStartIEs; struct S1AP_TraceFailureIndicationIEs; struct S1AP_DeactivateTraceIEs; struct S1AP_CellTrafficTraceIEs; struct S1AP_LocationReportingControlIEs; struct S1AP_LocationReportingFailureIndicationIEs; struct S1AP_LocationReportIEs; struct S1AP_OverloadStartIEs; struct S1AP_OverloadStopIEs; struct S1AP_WriteReplaceWarningRequestIEs; struct S1AP_WriteReplaceWarningResponseIEs; struct S1AP_ENBDirectInformationTransferIEs; struct S1AP_MMEDirectInformationTransferIEs; struct S1AP_ENBConfigurationTransferIEs; struct S1AP_MMEConfigurationTransferIEs; struct S1AP_KillRequestIEs; struct S1AP_KillResponseIEs; struct S1AP_PWSRestartIndicationIEs; struct S1AP_PWSFailureIndicationIEs; struct S1AP_DownlinkUEAssociatedLPPaTransport_IEs; struct S1AP_UplinkUEAssociatedLPPaTransport_IEs; struct S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs; struct S1AP_UplinkNonUEAssociatedLPPaTransport_IEs; struct S1AP_E_RABModificationIndicationIEs; struct S1AP_E_RABModificationConfirmIEs; struct S1AP_UEContextModificationIndicationIEs; struct S1AP_UEContextModificationConfirmIEs; struct S1AP_UEContextSuspendRequestIEs; struct S1AP_UEContextSuspendResponseIEs; struct S1AP_UEContextResumeRequestIEs; struct S1AP_UEContextResumeResponseIEs; struct S1AP_UEContextResumeFailureIEs; struct S1AP_ConnectionEstablishmentIndicationIEs; struct S1AP_RetrieveUEInformationIEs; struct S1AP_UEInformationTransferIEs; struct S1AP_ENBCPRelocationIndicationIEs; struct S1AP_MMECPRelocationIndicationIEs; /* S1AP_ProtocolIE-Container */ typedef struct S1AP_ProtocolIE_Container_6551P0 { A_SEQUENCE_OF(struct S1AP_HandoverRequiredIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P0_t; typedef struct S1AP_ProtocolIE_Container_6551P1 { A_SEQUENCE_OF(struct S1AP_HandoverCommandIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P1_t; typedef struct S1AP_ProtocolIE_Container_6551P2 { A_SEQUENCE_OF(struct S1AP_HandoverPreparationFailureIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P2_t; typedef struct S1AP_ProtocolIE_Container_6551P3 { A_SEQUENCE_OF(struct S1AP_HandoverRequestIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P3_t; typedef struct S1AP_ProtocolIE_Container_6551P4 { A_SEQUENCE_OF(struct S1AP_HandoverRequestAcknowledgeIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P4_t; typedef struct S1AP_ProtocolIE_Container_6551P5 { A_SEQUENCE_OF(struct S1AP_HandoverFailureIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P5_t; typedef struct S1AP_ProtocolIE_Container_6551P6 { A_SEQUENCE_OF(struct S1AP_HandoverNotifyIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P6_t; typedef struct S1AP_ProtocolIE_Container_6551P7 { A_SEQUENCE_OF(struct S1AP_PathSwitchRequestIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P7_t; typedef struct S1AP_ProtocolIE_Container_6551P8 { A_SEQUENCE_OF(struct S1AP_PathSwitchRequestAcknowledgeIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P8_t; typedef struct S1AP_ProtocolIE_Container_6551P9 { A_SEQUENCE_OF(struct S1AP_PathSwitchRequestFailureIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P9_t; typedef struct S1AP_ProtocolIE_Container_6551P10 { A_SEQUENCE_OF(struct S1AP_HandoverCancelIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P10_t; typedef struct S1AP_ProtocolIE_Container_6551P11 { A_SEQUENCE_OF(struct S1AP_HandoverCancelAcknowledgeIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P11_t; typedef struct S1AP_ProtocolIE_Container_6551P12 { A_SEQUENCE_OF(struct S1AP_E_RABSetupRequestIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P12_t; typedef struct S1AP_ProtocolIE_Container_6551P13 { A_SEQUENCE_OF(struct S1AP_E_RABSetupResponseIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P13_t; typedef struct S1AP_ProtocolIE_Container_6551P14 { A_SEQUENCE_OF(struct S1AP_E_RABModifyRequestIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P14_t; typedef struct S1AP_ProtocolIE_Container_6551P15 { A_SEQUENCE_OF(struct S1AP_E_RABModifyResponseIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P15_t; typedef struct S1AP_ProtocolIE_Container_6551P16 { A_SEQUENCE_OF(struct S1AP_E_RABReleaseCommandIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P16_t; typedef struct S1AP_ProtocolIE_Container_6551P17 { A_SEQUENCE_OF(struct S1AP_E_RABReleaseResponseIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P17_t; typedef struct S1AP_ProtocolIE_Container_6551P18 { A_SEQUENCE_OF(struct S1AP_E_RABReleaseIndicationIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P18_t; typedef struct S1AP_ProtocolIE_Container_6551P19 { A_SEQUENCE_OF(struct S1AP_InitialContextSetupRequestIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P19_t; typedef struct S1AP_ProtocolIE_Container_6551P20 { A_SEQUENCE_OF(struct S1AP_InitialContextSetupResponseIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P20_t; typedef struct S1AP_ProtocolIE_Container_6551P21 { A_SEQUENCE_OF(struct S1AP_InitialContextSetupFailureIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P21_t; typedef struct S1AP_ProtocolIE_Container_6551P22 { A_SEQUENCE_OF(struct S1AP_PagingIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P22_t; typedef struct S1AP_ProtocolIE_Container_6551P23 { A_SEQUENCE_OF(struct S1AP_UEContextReleaseRequest_IEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P23_t; typedef struct S1AP_ProtocolIE_Container_6551P24 { A_SEQUENCE_OF(struct S1AP_UEContextReleaseCommand_IEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P24_t; typedef struct S1AP_ProtocolIE_Container_6551P25 { A_SEQUENCE_OF(struct S1AP_UEContextReleaseComplete_IEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P25_t; typedef struct S1AP_ProtocolIE_Container_6551P26 { A_SEQUENCE_OF(struct S1AP_UEContextModificationRequestIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P26_t; typedef struct S1AP_ProtocolIE_Container_6551P27 { A_SEQUENCE_OF(struct S1AP_UEContextModificationResponseIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P27_t; typedef struct S1AP_ProtocolIE_Container_6551P28 { A_SEQUENCE_OF(struct S1AP_UEContextModificationFailureIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P28_t; typedef struct S1AP_ProtocolIE_Container_6551P29 { A_SEQUENCE_OF(struct S1AP_UERadioCapabilityMatchRequestIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P29_t; typedef struct S1AP_ProtocolIE_Container_6551P30 { A_SEQUENCE_OF(struct S1AP_UERadioCapabilityMatchResponseIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P30_t; typedef struct S1AP_ProtocolIE_Container_6551P31 { A_SEQUENCE_OF(struct S1AP_DownlinkNASTransport_IEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P31_t; typedef struct S1AP_ProtocolIE_Container_6551P32 { A_SEQUENCE_OF(struct S1AP_InitialUEMessage_IEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P32_t; typedef struct S1AP_ProtocolIE_Container_6551P33 { A_SEQUENCE_OF(struct S1AP_UplinkNASTransport_IEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P33_t; typedef struct S1AP_ProtocolIE_Container_6551P34 { A_SEQUENCE_OF(struct S1AP_NASNonDeliveryIndication_IEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P34_t; typedef struct S1AP_ProtocolIE_Container_6551P35 { A_SEQUENCE_OF(struct S1AP_RerouteNASRequest_IEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P35_t; typedef struct S1AP_ProtocolIE_Container_6551P36 { A_SEQUENCE_OF(struct S1AP_NASDeliveryIndicationIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P36_t; typedef struct S1AP_ProtocolIE_Container_6551P37 { A_SEQUENCE_OF(struct S1AP_ResetIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P37_t; typedef struct S1AP_ProtocolIE_Container_6551P38 { A_SEQUENCE_OF(struct S1AP_ResetAcknowledgeIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P38_t; typedef struct S1AP_ProtocolIE_Container_6551P39 { A_SEQUENCE_OF(struct S1AP_ErrorIndicationIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P39_t; typedef struct S1AP_ProtocolIE_Container_6551P40 { A_SEQUENCE_OF(struct S1AP_S1SetupRequestIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P40_t; typedef struct S1AP_ProtocolIE_Container_6551P41 { A_SEQUENCE_OF(struct S1AP_S1SetupResponseIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P41_t; typedef struct S1AP_ProtocolIE_Container_6551P42 { A_SEQUENCE_OF(struct S1AP_S1SetupFailureIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P42_t; typedef struct S1AP_ProtocolIE_Container_6551P43 { A_SEQUENCE_OF(struct S1AP_ENBConfigurationUpdateIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P43_t; typedef struct S1AP_ProtocolIE_Container_6551P44 { A_SEQUENCE_OF(struct S1AP_ENBConfigurationUpdateAcknowledgeIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P44_t; typedef struct S1AP_ProtocolIE_Container_6551P45 { A_SEQUENCE_OF(struct S1AP_ENBConfigurationUpdateFailureIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P45_t; typedef struct S1AP_ProtocolIE_Container_6551P46 { A_SEQUENCE_OF(struct S1AP_MMEConfigurationUpdateIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P46_t; typedef struct S1AP_ProtocolIE_Container_6551P47 { A_SEQUENCE_OF(struct S1AP_MMEConfigurationUpdateAcknowledgeIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P47_t; typedef struct S1AP_ProtocolIE_Container_6551P48 { A_SEQUENCE_OF(struct S1AP_MMEConfigurationUpdateFailureIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P48_t; typedef struct S1AP_ProtocolIE_Container_6551P49 { A_SEQUENCE_OF(struct S1AP_DownlinkS1cdma2000tunnellingIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P49_t; typedef struct S1AP_ProtocolIE_Container_6551P50 { A_SEQUENCE_OF(struct S1AP_UplinkS1cdma2000tunnellingIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P50_t; typedef struct S1AP_ProtocolIE_Container_6551P51 { A_SEQUENCE_OF(struct S1AP_UECapabilityInfoIndicationIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P51_t; typedef struct S1AP_ProtocolIE_Container_6551P52 { A_SEQUENCE_OF(struct S1AP_ENBStatusTransferIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P52_t; typedef struct S1AP_ProtocolIE_Container_6551P53 { A_SEQUENCE_OF(struct S1AP_MMEStatusTransferIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P53_t; typedef struct S1AP_ProtocolIE_Container_6551P54 { A_SEQUENCE_OF(struct S1AP_TraceStartIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P54_t; typedef struct S1AP_ProtocolIE_Container_6551P55 { A_SEQUENCE_OF(struct S1AP_TraceFailureIndicationIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P55_t; typedef struct S1AP_ProtocolIE_Container_6551P56 { A_SEQUENCE_OF(struct S1AP_DeactivateTraceIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P56_t; typedef struct S1AP_ProtocolIE_Container_6551P57 { A_SEQUENCE_OF(struct S1AP_CellTrafficTraceIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P57_t; typedef struct S1AP_ProtocolIE_Container_6551P58 { A_SEQUENCE_OF(struct S1AP_LocationReportingControlIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P58_t; typedef struct S1AP_ProtocolIE_Container_6551P59 { A_SEQUENCE_OF(struct S1AP_LocationReportingFailureIndicationIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P59_t; typedef struct S1AP_ProtocolIE_Container_6551P60 { A_SEQUENCE_OF(struct S1AP_LocationReportIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P60_t; typedef struct S1AP_ProtocolIE_Container_6551P61 { A_SEQUENCE_OF(struct S1AP_OverloadStartIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P61_t; typedef struct S1AP_ProtocolIE_Container_6551P62 { A_SEQUENCE_OF(struct S1AP_OverloadStopIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P62_t; typedef struct S1AP_ProtocolIE_Container_6551P63 { A_SEQUENCE_OF(struct S1AP_WriteReplaceWarningRequestIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P63_t; typedef struct S1AP_ProtocolIE_Container_6551P64 { A_SEQUENCE_OF(struct S1AP_WriteReplaceWarningResponseIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P64_t; typedef struct S1AP_ProtocolIE_Container_6551P65 { A_SEQUENCE_OF(struct S1AP_ENBDirectInformationTransferIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P65_t; typedef struct S1AP_ProtocolIE_Container_6551P66 { A_SEQUENCE_OF(struct S1AP_MMEDirectInformationTransferIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P66_t; typedef struct S1AP_ProtocolIE_Container_6551P67 { A_SEQUENCE_OF(struct S1AP_ENBConfigurationTransferIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P67_t; typedef struct S1AP_ProtocolIE_Container_6551P68 { A_SEQUENCE_OF(struct S1AP_MMEConfigurationTransferIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P68_t; typedef struct S1AP_ProtocolIE_Container_6551P69 { A_SEQUENCE_OF(struct S1AP_KillRequestIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P69_t; typedef struct S1AP_ProtocolIE_Container_6551P70 { A_SEQUENCE_OF(struct S1AP_KillResponseIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P70_t; typedef struct S1AP_ProtocolIE_Container_6551P71 { A_SEQUENCE_OF(struct S1AP_PWSRestartIndicationIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P71_t; typedef struct S1AP_ProtocolIE_Container_6551P72 { A_SEQUENCE_OF(struct S1AP_PWSFailureIndicationIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P72_t; typedef struct S1AP_ProtocolIE_Container_6551P73 { A_SEQUENCE_OF(struct S1AP_DownlinkUEAssociatedLPPaTransport_IEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P73_t; typedef struct S1AP_ProtocolIE_Container_6551P74 { A_SEQUENCE_OF(struct S1AP_UplinkUEAssociatedLPPaTransport_IEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P74_t; typedef struct S1AP_ProtocolIE_Container_6551P75 { A_SEQUENCE_OF(struct S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P75_t; typedef struct S1AP_ProtocolIE_Container_6551P76 { A_SEQUENCE_OF(struct S1AP_UplinkNonUEAssociatedLPPaTransport_IEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P76_t; typedef struct S1AP_ProtocolIE_Container_6551P77 { A_SEQUENCE_OF(struct S1AP_E_RABModificationIndicationIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P77_t; typedef struct S1AP_ProtocolIE_Container_6551P78 { A_SEQUENCE_OF(struct S1AP_E_RABModificationConfirmIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P78_t; typedef struct S1AP_ProtocolIE_Container_6551P79 { A_SEQUENCE_OF(struct S1AP_UEContextModificationIndicationIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P79_t; typedef struct S1AP_ProtocolIE_Container_6551P80 { A_SEQUENCE_OF(struct S1AP_UEContextModificationConfirmIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P80_t; typedef struct S1AP_ProtocolIE_Container_6551P81 { A_SEQUENCE_OF(struct S1AP_UEContextSuspendRequestIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P81_t; typedef struct S1AP_ProtocolIE_Container_6551P82 { A_SEQUENCE_OF(struct S1AP_UEContextSuspendResponseIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P82_t; typedef struct S1AP_ProtocolIE_Container_6551P83 { A_SEQUENCE_OF(struct S1AP_UEContextResumeRequestIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P83_t; typedef struct S1AP_ProtocolIE_Container_6551P84 { A_SEQUENCE_OF(struct S1AP_UEContextResumeResponseIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P84_t; typedef struct S1AP_ProtocolIE_Container_6551P85 { A_SEQUENCE_OF(struct S1AP_UEContextResumeFailureIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P85_t; typedef struct S1AP_ProtocolIE_Container_6551P86 { A_SEQUENCE_OF(struct S1AP_ConnectionEstablishmentIndicationIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P86_t; typedef struct S1AP_ProtocolIE_Container_6551P87 { A_SEQUENCE_OF(struct S1AP_RetrieveUEInformationIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P87_t; typedef struct S1AP_ProtocolIE_Container_6551P88 { A_SEQUENCE_OF(struct S1AP_UEInformationTransferIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P88_t; typedef struct S1AP_ProtocolIE_Container_6551P89 { A_SEQUENCE_OF(struct S1AP_ENBCPRelocationIndicationIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P89_t; typedef struct S1AP_ProtocolIE_Container_6551P90 { A_SEQUENCE_OF(struct S1AP_MMECPRelocationIndicationIEs) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_Container_6551P90_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P0; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P0_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P0_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P0_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P1; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P1_specs_3; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P1_3[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P1_constr_3; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P2; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P2_specs_5; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P2_5[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P2_constr_5; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P3; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P3_specs_7; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P3_7[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P3_constr_7; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P4; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P4_specs_9; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P4_9[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P4_constr_9; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P5; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P5_specs_11; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P5_11[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P5_constr_11; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P6; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P6_specs_13; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P6_13[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P6_constr_13; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P7; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P7_specs_15; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P7_15[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P7_constr_15; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P8; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P8_specs_17; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P8_17[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P8_constr_17; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P9; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P9_specs_19; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P9_19[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P9_constr_19; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P10; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P10_specs_21; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P10_21[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P10_constr_21; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P11; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P11_specs_23; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P11_23[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P11_constr_23; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P12; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P12_specs_25; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P12_25[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P12_constr_25; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P13; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P13_specs_27; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P13_27[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P13_constr_27; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P14; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P14_specs_29; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P14_29[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P14_constr_29; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P15; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P15_specs_31; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P15_31[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P15_constr_31; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P16; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P16_specs_33; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P16_33[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P16_constr_33; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P17; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P17_specs_35; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P17_35[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P17_constr_35; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P18; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P18_specs_37; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P18_37[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P18_constr_37; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P19; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P19_specs_39; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P19_39[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P19_constr_39; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P20; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P20_specs_41; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P20_41[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P20_constr_41; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P21; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P21_specs_43; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P21_43[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P21_constr_43; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P22; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P22_specs_45; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P22_45[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P22_constr_45; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P23; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P23_specs_47; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P23_47[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P23_constr_47; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P24; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P24_specs_49; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P24_49[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P24_constr_49; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P25; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P25_specs_51; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P25_51[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P25_constr_51; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P26; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P26_specs_53; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P26_53[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P26_constr_53; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P27; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P27_specs_55; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P27_55[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P27_constr_55; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P28; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P28_specs_57; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P28_57[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P28_constr_57; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P29; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P29_specs_59; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P29_59[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P29_constr_59; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P30; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P30_specs_61; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P30_61[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P30_constr_61; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P31; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P31_specs_63; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P31_63[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P31_constr_63; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P32; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P32_specs_65; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P32_65[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P32_constr_65; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P33; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P33_specs_67; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P33_67[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P33_constr_67; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P34; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P34_specs_69; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P34_69[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P34_constr_69; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P35; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P35_specs_71; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P35_71[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P35_constr_71; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P36; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P36_specs_73; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P36_73[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P36_constr_73; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P37; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P37_specs_75; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P37_75[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P37_constr_75; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P38; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P38_specs_77; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P38_77[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P38_constr_77; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P39; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P39_specs_79; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P39_79[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P39_constr_79; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P40; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P40_specs_81; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P40_81[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P40_constr_81; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P41; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P41_specs_83; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P41_83[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P41_constr_83; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P42; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P42_specs_85; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P42_85[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P42_constr_85; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P43; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P43_specs_87; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P43_87[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P43_constr_87; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P44; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P44_specs_89; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P44_89[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P44_constr_89; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P45; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P45_specs_91; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P45_91[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P45_constr_91; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P46; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P46_specs_93; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P46_93[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P46_constr_93; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P47; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P47_specs_95; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P47_95[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P47_constr_95; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P48; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P48_specs_97; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P48_97[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P48_constr_97; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P49; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P49_specs_99; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P49_99[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P49_constr_99; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P50; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P50_specs_101; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P50_101[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P50_constr_101; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P51; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P51_specs_103; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P51_103[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P51_constr_103; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P52; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P52_specs_105; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P52_105[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P52_constr_105; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P53; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P53_specs_107; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P53_107[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P53_constr_107; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P54; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P54_specs_109; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P54_109[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P54_constr_109; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P55; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P55_specs_111; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P55_111[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P55_constr_111; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P56; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P56_specs_113; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P56_113[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P56_constr_113; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P57; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P57_specs_115; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P57_115[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P57_constr_115; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P58; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P58_specs_117; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P58_117[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P58_constr_117; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P59; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P59_specs_119; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P59_119[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P59_constr_119; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P60; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P60_specs_121; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P60_121[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P60_constr_121; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P61; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P61_specs_123; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P61_123[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P61_constr_123; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P62; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P62_specs_125; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P62_125[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P62_constr_125; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P63; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P63_specs_127; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P63_127[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P63_constr_127; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P64; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P64_specs_129; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P64_129[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P64_constr_129; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P65; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P65_specs_131; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P65_131[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P65_constr_131; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P66; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P66_specs_133; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P66_133[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P66_constr_133; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P67; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P67_specs_135; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P67_135[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P67_constr_135; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P68; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P68_specs_137; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P68_137[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P68_constr_137; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P69; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P69_specs_139; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P69_139[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P69_constr_139; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P70; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P70_specs_141; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P70_141[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P70_constr_141; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P71; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P71_specs_143; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P71_143[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P71_constr_143; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P72; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P72_specs_145; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P72_145[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P72_constr_145; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P73; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P73_specs_147; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P73_147[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P73_constr_147; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P74; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P74_specs_149; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P74_149[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P74_constr_149; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P75; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P75_specs_151; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P75_151[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P75_constr_151; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P76; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P76_specs_153; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P76_153[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P76_constr_153; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P77; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P77_specs_155; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P77_155[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P77_constr_155; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P78; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P78_specs_157; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P78_157[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P78_constr_157; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P79; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P79_specs_159; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P79_159[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P79_constr_159; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P80; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P80_specs_161; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P80_161[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P80_constr_161; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P81; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P81_specs_163; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P81_163[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P81_constr_163; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P82; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P82_specs_165; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P82_165[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P82_constr_165; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P83; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P83_specs_167; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P83_167[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P83_constr_167; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P84; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P84_specs_169; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P84_169[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P84_constr_169; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P85; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P85_specs_171; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P85_171[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P85_constr_171; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P86; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P86_specs_173; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P86_173[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P86_constr_173; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P87; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P87_specs_175; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P87_175[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P87_constr_175; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P88; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P88_specs_177; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P88_177[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P88_constr_177; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P89; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P89_specs_179; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P89_179[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P89_constr_179; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_Container_6551P90; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_Container_6551P90_specs_181; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_Container_6551P90_181[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_Container_6551P90_constr_181; #ifdef __cplusplus } #endif #endif /* _S1AP_ProtocolIE_Container_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProtocolIE-ContainerList.c000066400000000000000000000450551333553357400234270ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-Containers" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ProtocolIE-ContainerList.h" #include "S1AP_ProtocolIE-SingleContainer.h" static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_ContainerList_6588P0_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P0_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_ContainerList_6588P1_constr_3 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P1_constr_3 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_ContainerList_6588P2_constr_5 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P2_constr_5 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_ContainerList_6588P3_constr_7 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P3_constr_7 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_ContainerList_6588P4_constr_9 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P4_constr_9 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_ContainerList_6588P5_constr_11 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P5_constr_11 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_ContainerList_6588P6_constr_13 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P6_constr_13 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_ContainerList_6588P7_constr_15 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P7_constr_15 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_ContainerList_6588P8_constr_17 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P8_constr_17 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_ContainerList_6588P9_constr_19 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P9_constr_19 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_ContainerList_6588P0_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P18, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P0_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_ContainerList_6588P0_specs_1 = { sizeof(struct S1AP_ProtocolIE_ContainerList_6588P0), offsetof(struct S1AP_ProtocolIE_ContainerList_6588P0, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P0 = { "ProtocolIE-ContainerList", "ProtocolIE-ContainerList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_ContainerList_6588P0_tags_1, sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P0_tags_1) /sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P0_tags_1[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_ContainerList_6588P0_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P0_tags_1) /sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P0_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_ContainerList_6588P0_constr_1, &asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P0_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P0_1, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P0_specs_1 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_ContainerList_6588P1_3[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P19, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P1_tags_3[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_ContainerList_6588P1_specs_3 = { sizeof(struct S1AP_ProtocolIE_ContainerList_6588P1), offsetof(struct S1AP_ProtocolIE_ContainerList_6588P1, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P1 = { "ProtocolIE-ContainerList", "ProtocolIE-ContainerList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_ContainerList_6588P1_tags_3, sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P1_tags_3) /sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P1_tags_3[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_ContainerList_6588P1_tags_3, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P1_tags_3) /sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P1_tags_3[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_ContainerList_6588P1_constr_3, &asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P1_constr_3, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P1_3, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P1_specs_3 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_ContainerList_6588P2_5[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P20, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P2_tags_5[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_ContainerList_6588P2_specs_5 = { sizeof(struct S1AP_ProtocolIE_ContainerList_6588P2), offsetof(struct S1AP_ProtocolIE_ContainerList_6588P2, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P2 = { "ProtocolIE-ContainerList", "ProtocolIE-ContainerList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_ContainerList_6588P2_tags_5, sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P2_tags_5) /sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P2_tags_5[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_ContainerList_6588P2_tags_5, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P2_tags_5) /sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P2_tags_5[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_ContainerList_6588P2_constr_5, &asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P2_constr_5, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P2_5, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P2_specs_5 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_ContainerList_6588P3_7[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P21, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P3_tags_7[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_ContainerList_6588P3_specs_7 = { sizeof(struct S1AP_ProtocolIE_ContainerList_6588P3), offsetof(struct S1AP_ProtocolIE_ContainerList_6588P3, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P3 = { "ProtocolIE-ContainerList", "ProtocolIE-ContainerList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_ContainerList_6588P3_tags_7, sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P3_tags_7) /sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P3_tags_7[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_ContainerList_6588P3_tags_7, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P3_tags_7) /sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P3_tags_7[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_ContainerList_6588P3_constr_7, &asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P3_constr_7, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P3_7, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P3_specs_7 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_ContainerList_6588P4_9[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P22, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P4_tags_9[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_ContainerList_6588P4_specs_9 = { sizeof(struct S1AP_ProtocolIE_ContainerList_6588P4), offsetof(struct S1AP_ProtocolIE_ContainerList_6588P4, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P4 = { "ProtocolIE-ContainerList", "ProtocolIE-ContainerList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_ContainerList_6588P4_tags_9, sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P4_tags_9) /sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P4_tags_9[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_ContainerList_6588P4_tags_9, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P4_tags_9) /sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P4_tags_9[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_ContainerList_6588P4_constr_9, &asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P4_constr_9, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P4_9, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P4_specs_9 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_ContainerList_6588P5_11[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P23, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P5_tags_11[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_ContainerList_6588P5_specs_11 = { sizeof(struct S1AP_ProtocolIE_ContainerList_6588P5), offsetof(struct S1AP_ProtocolIE_ContainerList_6588P5, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P5 = { "ProtocolIE-ContainerList", "ProtocolIE-ContainerList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_ContainerList_6588P5_tags_11, sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P5_tags_11) /sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P5_tags_11[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_ContainerList_6588P5_tags_11, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P5_tags_11) /sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P5_tags_11[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_ContainerList_6588P5_constr_11, &asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P5_constr_11, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P5_11, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P5_specs_11 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_ContainerList_6588P6_13[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P24, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P6_tags_13[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_ContainerList_6588P6_specs_13 = { sizeof(struct S1AP_ProtocolIE_ContainerList_6588P6), offsetof(struct S1AP_ProtocolIE_ContainerList_6588P6, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P6 = { "ProtocolIE-ContainerList", "ProtocolIE-ContainerList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_ContainerList_6588P6_tags_13, sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P6_tags_13) /sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P6_tags_13[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_ContainerList_6588P6_tags_13, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P6_tags_13) /sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P6_tags_13[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_ContainerList_6588P6_constr_13, &asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P6_constr_13, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P6_13, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P6_specs_13 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_ContainerList_6588P7_15[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P25, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P7_tags_15[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_ContainerList_6588P7_specs_15 = { sizeof(struct S1AP_ProtocolIE_ContainerList_6588P7), offsetof(struct S1AP_ProtocolIE_ContainerList_6588P7, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P7 = { "ProtocolIE-ContainerList", "ProtocolIE-ContainerList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_ContainerList_6588P7_tags_15, sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P7_tags_15) /sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P7_tags_15[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_ContainerList_6588P7_tags_15, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P7_tags_15) /sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P7_tags_15[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_ContainerList_6588P7_constr_15, &asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P7_constr_15, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P7_15, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P7_specs_15 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_ContainerList_6588P8_17[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P26, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P8_tags_17[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_ContainerList_6588P8_specs_17 = { sizeof(struct S1AP_ProtocolIE_ContainerList_6588P8), offsetof(struct S1AP_ProtocolIE_ContainerList_6588P8, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P8 = { "ProtocolIE-ContainerList", "ProtocolIE-ContainerList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_ContainerList_6588P8_tags_17, sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P8_tags_17) /sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P8_tags_17[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_ContainerList_6588P8_tags_17, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P8_tags_17) /sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P8_tags_17[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_ContainerList_6588P8_constr_17, &asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P8_constr_17, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P8_17, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P8_specs_17 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_ContainerList_6588P9_19[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P27, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P9_tags_19[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_ContainerList_6588P9_specs_19 = { sizeof(struct S1AP_ProtocolIE_ContainerList_6588P9), offsetof(struct S1AP_ProtocolIE_ContainerList_6588P9, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P9 = { "ProtocolIE-ContainerList", "ProtocolIE-ContainerList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ProtocolIE_ContainerList_6588P9_tags_19, sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P9_tags_19) /sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P9_tags_19[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_ContainerList_6588P9_tags_19, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P9_tags_19) /sizeof(asn_DEF_S1AP_ProtocolIE_ContainerList_6588P9_tags_19[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_ContainerList_6588P9_constr_19, &asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P9_constr_19, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ProtocolIE_ContainerList_6588P9_19, 1, /* Single element */ &asn_SPC_S1AP_ProtocolIE_ContainerList_6588P9_specs_19 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProtocolIE-ContainerList.h000066400000000000000000000143231333553357400234260ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-Containers" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ProtocolIE_ContainerList_H_ #define _S1AP_ProtocolIE_ContainerList_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolIE_SingleContainer; /* S1AP_ProtocolIE-ContainerList */ typedef struct S1AP_ProtocolIE_ContainerList_6588P0 { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_ContainerList_6588P0_t; typedef struct S1AP_ProtocolIE_ContainerList_6588P1 { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_ContainerList_6588P1_t; typedef struct S1AP_ProtocolIE_ContainerList_6588P2 { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_ContainerList_6588P2_t; typedef struct S1AP_ProtocolIE_ContainerList_6588P3 { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_ContainerList_6588P3_t; typedef struct S1AP_ProtocolIE_ContainerList_6588P4 { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_ContainerList_6588P4_t; typedef struct S1AP_ProtocolIE_ContainerList_6588P5 { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_ContainerList_6588P5_t; typedef struct S1AP_ProtocolIE_ContainerList_6588P6 { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_ContainerList_6588P6_t; typedef struct S1AP_ProtocolIE_ContainerList_6588P7 { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_ContainerList_6588P7_t; typedef struct S1AP_ProtocolIE_ContainerList_6588P8 { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_ContainerList_6588P8_t; typedef struct S1AP_ProtocolIE_ContainerList_6588P9 { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ProtocolIE_ContainerList_6588P9_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P0; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_ContainerList_6588P0_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_ContainerList_6588P0_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P0_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P1; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_ContainerList_6588P1_specs_3; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_ContainerList_6588P1_3[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P1_constr_3; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P2; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_ContainerList_6588P2_specs_5; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_ContainerList_6588P2_5[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P2_constr_5; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P3; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_ContainerList_6588P3_specs_7; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_ContainerList_6588P3_7[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P3_constr_7; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P4; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_ContainerList_6588P4_specs_9; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_ContainerList_6588P4_9[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P4_constr_9; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P5; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_ContainerList_6588P5_specs_11; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_ContainerList_6588P5_11[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P5_constr_11; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P6; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_ContainerList_6588P6_specs_13; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_ContainerList_6588P6_13[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P6_constr_13; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P7; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_ContainerList_6588P7_specs_15; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_ContainerList_6588P7_15[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P7_constr_15; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P8; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_ContainerList_6588P8_specs_17; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_ContainerList_6588P8_17[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P8_constr_17; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_ContainerList_6588P9; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ProtocolIE_ContainerList_6588P9_specs_19; extern asn_TYPE_member_t asn_MBR_S1AP_ProtocolIE_ContainerList_6588P9_19[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_ContainerList_6588P9_constr_19; #ifdef __cplusplus } #endif #endif /* _S1AP_ProtocolIE_ContainerList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProtocolIE-ContainerPair.h000066400000000000000000000007431333553357400234070ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-Containers" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ProtocolIE_ContainerPair_H_ #define _S1AP_ProtocolIE_ContainerPair_H_ #include #ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus } #endif #endif /* _S1AP_ProtocolIE_ContainerPair_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProtocolIE-ContainerPairList.h000066400000000000000000000007571333553357400242500ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-Containers" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ProtocolIE_ContainerPairList_H_ #define _S1AP_ProtocolIE_ContainerPairList_H_ #include #ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus } #endif #endif /* _S1AP_ProtocolIE_ContainerPairList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProtocolIE-Field.c000066400000000000000000054445221333553357400217030ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-Containers" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ProtocolIE-Field.h" static const long asn_VAL_119_S1AP_id_E_RABToBeSetupItemBearerSUReq = 17; static const long asn_VAL_119_S1AP_reject = 0; static const long asn_VAL_119_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABToBeSetupItemBearerSUReqIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_119_S1AP_id_E_RABToBeSetupItemBearerSUReq }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_119_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReq }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_119_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABToBeSetupItemBearerSUReqIEs_1[] = { { 1, 4, asn_IOS_S1AP_E_RABToBeSetupItemBearerSUReqIEs_1_rows } }; static const long asn_VAL_125_S1AP_id_E_RABSetupItemBearerSURes = 39; static const long asn_VAL_125_S1AP_ignore = 1; static const long asn_VAL_125_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABSetupItemBearerSUResIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_125_S1AP_id_E_RABSetupItemBearerSURes }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_125_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABSetupItemBearerSURes }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_125_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABSetupItemBearerSUResIEs_1[] = { { 1, 4, asn_IOS_S1AP_E_RABSetupItemBearerSUResIEs_1_rows } }; static const long asn_VAL_130_S1AP_id_E_RABToBeModifiedItemBearerModReq = 36; static const long asn_VAL_130_S1AP_reject = 0; static const long asn_VAL_130_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABToBeModifiedItemBearerModReqIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_130_S1AP_id_E_RABToBeModifiedItemBearerModReq }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_130_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABToBeModifiedItemBearerModReq }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_130_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABToBeModifiedItemBearerModReqIEs_1[] = { { 1, 4, asn_IOS_S1AP_E_RABToBeModifiedItemBearerModReqIEs_1_rows } }; static const long asn_VAL_136_S1AP_id_E_RABModifyItemBearerModRes = 37; static const long asn_VAL_136_S1AP_ignore = 1; static const long asn_VAL_136_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABModifyItemBearerModResIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_136_S1AP_id_E_RABModifyItemBearerModRes }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_136_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABModifyItemBearerModRes }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_136_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABModifyItemBearerModResIEs_1[] = { { 1, 4, asn_IOS_S1AP_E_RABModifyItemBearerModResIEs_1_rows } }; static const long asn_VAL_148_S1AP_id_E_RABReleaseItemBearerRelComp = 15; static const long asn_VAL_148_S1AP_ignore = 1; static const long asn_VAL_148_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABReleaseItemBearerRelCompIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_148_S1AP_id_E_RABReleaseItemBearerRelComp }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_148_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABReleaseItemBearerRelComp }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_148_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABReleaseItemBearerRelCompIEs_1[] = { { 1, 4, asn_IOS_S1AP_E_RABReleaseItemBearerRelCompIEs_1_rows } }; static const long asn_VAL_179_S1AP_id_E_RABToBeSetupItemCtxtSUReq = 52; static const long asn_VAL_179_S1AP_reject = 0; static const long asn_VAL_179_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABToBeSetupItemCtxtSUReqIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_179_S1AP_id_E_RABToBeSetupItemCtxtSUReq }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_179_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReq }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_179_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABToBeSetupItemCtxtSUReqIEs_1[] = { { 1, 4, asn_IOS_S1AP_E_RABToBeSetupItemCtxtSUReqIEs_1_rows } }; static const long asn_VAL_185_S1AP_id_E_RABSetupItemCtxtSURes = 50; static const long asn_VAL_185_S1AP_ignore = 1; static const long asn_VAL_185_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABSetupItemCtxtSUResIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_185_S1AP_id_E_RABSetupItemCtxtSURes }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_185_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABSetupItemCtxtSURes }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_185_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABSetupItemCtxtSUResIEs_1[] = { { 1, 4, asn_IOS_S1AP_E_RABSetupItemCtxtSUResIEs_1_rows } }; static const long asn_VAL_203_S1AP_id_TAIItem = 47; static const long asn_VAL_203_S1AP_ignore = 1; static const long asn_VAL_203_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_TAIItemIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_203_S1AP_id_TAIItem }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_203_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_TAIItem }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_203_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_TAIItemIEs_1[] = { { 1, 4, asn_IOS_S1AP_TAIItemIEs_1_rows } }; static const long asn_VAL_294_S1AP_id_UE_associatedLogicalS1_ConnectionItem = 91; static const long asn_VAL_294_S1AP_reject = 0; static const long asn_VAL_294_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_UE_associatedLogicalS1_ConnectionItemRes_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_294_S1AP_id_UE_associatedLogicalS1_ConnectionItem }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_294_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItem }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_294_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_UE_associatedLogicalS1_ConnectionItemRes_1[] = { { 1, 4, asn_IOS_S1AP_UE_associatedLogicalS1_ConnectionItemRes_1_rows } }; static const long asn_VAL_297_S1AP_id_UE_associatedLogicalS1_ConnectionItem = 91; static const long asn_VAL_297_S1AP_ignore = 1; static const long asn_VAL_297_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_UE_associatedLogicalS1_ConnectionItemResAck_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_297_S1AP_id_UE_associatedLogicalS1_ConnectionItem }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_297_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItem }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_297_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_UE_associatedLogicalS1_ConnectionItemResAck_1[] = { { 1, 4, asn_IOS_S1AP_UE_associatedLogicalS1_ConnectionItemResAck_1_rows } }; static const long asn_VAL_452_S1AP_id_E_RABModifyItemBearerModConf = 204; static const long asn_VAL_452_S1AP_ignore = 1; static const long asn_VAL_452_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABModifyItemBearerModConfIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_452_S1AP_id_E_RABModifyItemBearerModConf }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_452_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABModifyItemBearerModConf }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_452_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABModifyItemBearerModConfIEs_1[] = { { 1, 4, asn_IOS_S1AP_E_RABModifyItemBearerModConfIEs_1_rows } }; static const long asn_VAL_499_S1AP_id_Bearers_SubjectToStatusTransfer_Item = 89; static const long asn_VAL_499_S1AP_ignore = 1; static const long asn_VAL_499_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_499_S1AP_id_Bearers_SubjectToStatusTransfer_Item }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_499_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_Item }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_499_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_1[] = { { 1, 4, asn_IOS_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_1_rows } }; static const long asn_VAL_500_S1AP_id_E_RABInformationListItem = 78; static const long asn_VAL_500_S1AP_ignore = 1; static const long asn_VAL_500_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABInformationListIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_500_S1AP_id_E_RABInformationListItem }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_500_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABInformationListItem }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_500_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABInformationListIEs_1[] = { { 1, 4, asn_IOS_S1AP_E_RABInformationListIEs_1_rows } }; static const long asn_VAL_501_S1AP_id_E_RABItem = 35; static const long asn_VAL_501_S1AP_ignore = 1; static const long asn_VAL_501_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABItemIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_501_S1AP_id_E_RABItem }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_501_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABItem }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_501_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABItemIEs_1[] = { { 1, 4, asn_IOS_S1AP_E_RABItemIEs_1_rows } }; static const long asn_VAL_502_S1AP_id_LoggedMBSFNMDT = 197; static const long asn_VAL_502_S1AP_ignore = 1; static const long asn_VAL_502_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_MDTMode_ExtensionIE_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_502_S1AP_id_LoggedMBSFNMDT }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_502_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_LoggedMBSFNMDT }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_502_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_MDTMode_ExtensionIE_1[] = { { 1, 4, asn_IOS_S1AP_MDTMode_ExtensionIE_1_rows } }; static const long asn_VAL_503_S1AP_id_RecommendedCellItem = 214; static const long asn_VAL_503_S1AP_ignore = 1; static const long asn_VAL_503_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_RecommendedCellItemIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_503_S1AP_id_RecommendedCellItem }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_503_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_RecommendedCellItem }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_503_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_RecommendedCellItemIEs_1[] = { { 1, 4, asn_IOS_S1AP_RecommendedCellItemIEs_1_rows } }; static const long asn_VAL_504_S1AP_id_RecommendedENBItem = 215; static const long asn_VAL_504_S1AP_ignore = 1; static const long asn_VAL_504_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_RecommendedENBItemIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_504_S1AP_id_RecommendedENBItem }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_504_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_RecommendedENBItem }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_504_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_RecommendedENBItemIEs_1[] = { { 1, 4, asn_IOS_S1AP_RecommendedENBItemIEs_1_rows } }; static const long asn_VAL_505_S1AP_id_SON_Information_Report = 206; static const long asn_VAL_505_S1AP_ignore = 1; static const long asn_VAL_505_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_SONInformation_ExtensionIE_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_505_S1AP_id_SON_Information_Report }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_505_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_SONInformationReport }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_505_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_SONInformation_ExtensionIE_1[] = { { 1, 4, asn_IOS_S1AP_SONInformation_ExtensionIE_1_rows } }; static const long asn_VAL_1_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_1_S1AP_reject = 0; static const long asn_VAL_1_S1AP_mandatory = 2; static const long asn_VAL_2_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_2_S1AP_reject = 0; static const long asn_VAL_2_S1AP_mandatory = 2; static const long asn_VAL_3_S1AP_id_HandoverType = 1; static const long asn_VAL_3_S1AP_reject = 0; static const long asn_VAL_3_S1AP_mandatory = 2; static const long asn_VAL_4_S1AP_id_Cause = 2; static const long asn_VAL_4_S1AP_ignore = 1; static const long asn_VAL_4_S1AP_mandatory = 2; static const long asn_VAL_5_S1AP_id_TargetID = 4; static const long asn_VAL_5_S1AP_reject = 0; static const long asn_VAL_5_S1AP_mandatory = 2; static const long asn_VAL_6_S1AP_id_Direct_Forwarding_Path_Availability = 79; static const long asn_VAL_6_S1AP_ignore = 1; static const long asn_VAL_6_S1AP_optional = 0; static const long asn_VAL_7_S1AP_id_SRVCCHOIndication = 125; static const long asn_VAL_7_S1AP_reject = 0; static const long asn_VAL_7_S1AP_optional = 0; static const long asn_VAL_8_S1AP_id_Source_ToTarget_TransparentContainer = 104; static const long asn_VAL_8_S1AP_reject = 0; static const long asn_VAL_8_S1AP_mandatory = 2; static const long asn_VAL_9_S1AP_id_Source_ToTarget_TransparentContainer_Secondary = 138; static const long asn_VAL_9_S1AP_reject = 0; static const long asn_VAL_9_S1AP_optional = 0; static const long asn_VAL_10_S1AP_id_MSClassmark2 = 132; static const long asn_VAL_10_S1AP_reject = 0; static const long asn_VAL_10_S1AP_conditional = 1; static const long asn_VAL_11_S1AP_id_MSClassmark3 = 133; static const long asn_VAL_11_S1AP_ignore = 1; static const long asn_VAL_11_S1AP_conditional = 1; static const long asn_VAL_12_S1AP_id_CSG_Id = 127; static const long asn_VAL_12_S1AP_reject = 0; static const long asn_VAL_12_S1AP_optional = 0; static const long asn_VAL_13_S1AP_id_CellAccessMode = 145; static const long asn_VAL_13_S1AP_reject = 0; static const long asn_VAL_13_S1AP_optional = 0; static const long asn_VAL_14_S1AP_id_PS_ServiceNotAvailable = 150; static const long asn_VAL_14_S1AP_ignore = 1; static const long asn_VAL_14_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_HandoverRequiredIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_1_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_1_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_1_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_2_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_2_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_2_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_3_S1AP_id_HandoverType }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_3_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_HandoverType }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_3_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_4_S1AP_id_Cause }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_4_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Cause }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_4_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_5_S1AP_id_TargetID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_5_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_TargetID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_5_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_6_S1AP_id_Direct_Forwarding_Path_Availability }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_6_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Direct_Forwarding_Path_Availability }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_6_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_7_S1AP_id_SRVCCHOIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_7_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_SRVCCHOIndication }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_7_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_8_S1AP_id_Source_ToTarget_TransparentContainer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_8_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_Source_ToTarget_TransparentContainer }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_8_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_9_S1AP_id_Source_ToTarget_TransparentContainer_Secondary }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_9_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_Source_ToTarget_TransparentContainer }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_9_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_10_S1AP_id_MSClassmark2 }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_10_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MSClassmark2 }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_10_S1AP_conditional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_11_S1AP_id_MSClassmark3 }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_11_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MSClassmark3 }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_11_S1AP_conditional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_12_S1AP_id_CSG_Id }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_12_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_CSG_Id }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_12_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_13_S1AP_id_CellAccessMode }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_13_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_CellAccessMode }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_13_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_14_S1AP_id_PS_ServiceNotAvailable }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_14_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_PS_ServiceNotAvailable }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_14_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_HandoverRequiredIEs_1[] = { { 14, 4, asn_IOS_S1AP_HandoverRequiredIEs_1_rows } }; static const long asn_VAL_15_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_15_S1AP_reject = 0; static const long asn_VAL_15_S1AP_mandatory = 2; static const long asn_VAL_16_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_16_S1AP_reject = 0; static const long asn_VAL_16_S1AP_mandatory = 2; static const long asn_VAL_17_S1AP_id_HandoverType = 1; static const long asn_VAL_17_S1AP_reject = 0; static const long asn_VAL_17_S1AP_mandatory = 2; static const long asn_VAL_18_S1AP_id_NASSecurityParametersfromE_UTRAN = 135; static const long asn_VAL_18_S1AP_reject = 0; static const long asn_VAL_18_S1AP_conditional = 1; static const long asn_VAL_19_S1AP_id_E_RABSubjecttoDataForwardingList = 12; static const long asn_VAL_19_S1AP_ignore = 1; static const long asn_VAL_19_S1AP_optional = 0; static const long asn_VAL_20_S1AP_id_E_RABtoReleaseListHOCmd = 13; static const long asn_VAL_20_S1AP_ignore = 1; static const long asn_VAL_20_S1AP_optional = 0; static const long asn_VAL_21_S1AP_id_Target_ToSource_TransparentContainer = 123; static const long asn_VAL_21_S1AP_reject = 0; static const long asn_VAL_21_S1AP_mandatory = 2; static const long asn_VAL_22_S1AP_id_Target_ToSource_TransparentContainer_Secondary = 139; static const long asn_VAL_22_S1AP_reject = 0; static const long asn_VAL_22_S1AP_optional = 0; static const long asn_VAL_23_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_23_S1AP_ignore = 1; static const long asn_VAL_23_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_HandoverCommandIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_15_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_15_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_15_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_16_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_16_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_16_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_17_S1AP_id_HandoverType }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_17_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_HandoverType }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_17_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_18_S1AP_id_NASSecurityParametersfromE_UTRAN }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_18_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_NASSecurityParametersfromE_UTRAN }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_18_S1AP_conditional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_19_S1AP_id_E_RABSubjecttoDataForwardingList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_19_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABSubjecttoDataForwardingList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_19_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_20_S1AP_id_E_RABtoReleaseListHOCmd }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_20_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_20_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_21_S1AP_id_Target_ToSource_TransparentContainer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_21_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_Target_ToSource_TransparentContainer }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_21_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_22_S1AP_id_Target_ToSource_TransparentContainer_Secondary }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_22_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_Target_ToSource_TransparentContainer }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_22_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_23_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_23_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_23_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_HandoverCommandIEs_1[] = { { 9, 4, asn_IOS_S1AP_HandoverCommandIEs_1_rows } }; static const long asn_VAL_25_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_25_S1AP_ignore = 1; static const long asn_VAL_25_S1AP_mandatory = 2; static const long asn_VAL_26_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_26_S1AP_ignore = 1; static const long asn_VAL_26_S1AP_mandatory = 2; static const long asn_VAL_27_S1AP_id_Cause = 2; static const long asn_VAL_27_S1AP_ignore = 1; static const long asn_VAL_27_S1AP_mandatory = 2; static const long asn_VAL_28_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_28_S1AP_ignore = 1; static const long asn_VAL_28_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_HandoverPreparationFailureIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_25_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_25_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_25_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_26_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_26_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_26_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_27_S1AP_id_Cause }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_27_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Cause }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_27_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_28_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_28_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_28_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_HandoverPreparationFailureIEs_1[] = { { 4, 4, asn_IOS_S1AP_HandoverPreparationFailureIEs_1_rows } }; static const long asn_VAL_29_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_29_S1AP_reject = 0; static const long asn_VAL_29_S1AP_mandatory = 2; static const long asn_VAL_30_S1AP_id_HandoverType = 1; static const long asn_VAL_30_S1AP_reject = 0; static const long asn_VAL_30_S1AP_mandatory = 2; static const long asn_VAL_31_S1AP_id_Cause = 2; static const long asn_VAL_31_S1AP_ignore = 1; static const long asn_VAL_31_S1AP_mandatory = 2; static const long asn_VAL_32_S1AP_id_uEaggregateMaximumBitrate = 66; static const long asn_VAL_32_S1AP_reject = 0; static const long asn_VAL_32_S1AP_mandatory = 2; static const long asn_VAL_33_S1AP_id_E_RABToBeSetupListHOReq = 53; static const long asn_VAL_33_S1AP_reject = 0; static const long asn_VAL_33_S1AP_mandatory = 2; static const long asn_VAL_34_S1AP_id_Source_ToTarget_TransparentContainer = 104; static const long asn_VAL_34_S1AP_reject = 0; static const long asn_VAL_34_S1AP_mandatory = 2; static const long asn_VAL_35_S1AP_id_UESecurityCapabilities = 107; static const long asn_VAL_35_S1AP_reject = 0; static const long asn_VAL_35_S1AP_mandatory = 2; static const long asn_VAL_36_S1AP_id_HandoverRestrictionList = 41; static const long asn_VAL_36_S1AP_ignore = 1; static const long asn_VAL_36_S1AP_optional = 0; static const long asn_VAL_37_S1AP_id_TraceActivation = 25; static const long asn_VAL_37_S1AP_ignore = 1; static const long asn_VAL_37_S1AP_optional = 0; static const long asn_VAL_38_S1AP_id_RequestType = 98; static const long asn_VAL_38_S1AP_ignore = 1; static const long asn_VAL_38_S1AP_optional = 0; static const long asn_VAL_39_S1AP_id_SRVCCOperationPossible = 124; static const long asn_VAL_39_S1AP_ignore = 1; static const long asn_VAL_39_S1AP_optional = 0; static const long asn_VAL_40_S1AP_id_SecurityContext = 40; static const long asn_VAL_40_S1AP_reject = 0; static const long asn_VAL_40_S1AP_mandatory = 2; static const long asn_VAL_41_S1AP_id_NASSecurityParameterstoE_UTRAN = 136; static const long asn_VAL_41_S1AP_reject = 0; static const long asn_VAL_41_S1AP_conditional = 1; static const long asn_VAL_42_S1AP_id_CSG_Id = 127; static const long asn_VAL_42_S1AP_reject = 0; static const long asn_VAL_42_S1AP_optional = 0; static const long asn_VAL_43_S1AP_id_CSGMembershipStatus = 146; static const long asn_VAL_43_S1AP_ignore = 1; static const long asn_VAL_43_S1AP_optional = 0; static const long asn_VAL_44_S1AP_id_GUMMEI_ID = 75; static const long asn_VAL_44_S1AP_ignore = 1; static const long asn_VAL_44_S1AP_optional = 0; static const long asn_VAL_45_S1AP_id_MME_UE_S1AP_ID_2 = 158; static const long asn_VAL_45_S1AP_ignore = 1; static const long asn_VAL_45_S1AP_optional = 0; static const long asn_VAL_46_S1AP_id_ManagementBasedMDTAllowed = 165; static const long asn_VAL_46_S1AP_ignore = 1; static const long asn_VAL_46_S1AP_optional = 0; static const long asn_VAL_47_S1AP_id_ManagementBasedMDTPLMNList = 177; static const long asn_VAL_47_S1AP_ignore = 1; static const long asn_VAL_47_S1AP_optional = 0; static const long asn_VAL_48_S1AP_id_Masked_IMEISV = 192; static const long asn_VAL_48_S1AP_ignore = 1; static const long asn_VAL_48_S1AP_optional = 0; static const long asn_VAL_49_S1AP_id_ExpectedUEBehaviour = 196; static const long asn_VAL_49_S1AP_ignore = 1; static const long asn_VAL_49_S1AP_optional = 0; static const long asn_VAL_50_S1AP_id_ProSeAuthorized = 195; static const long asn_VAL_50_S1AP_ignore = 1; static const long asn_VAL_50_S1AP_optional = 0; static const long asn_VAL_51_S1AP_id_UEUserPlaneCIoTSupportIndicator = 241; static const long asn_VAL_51_S1AP_ignore = 1; static const long asn_VAL_51_S1AP_optional = 0; static const long asn_VAL_52_S1AP_id_V2XServicesAuthorized = 240; static const long asn_VAL_52_S1AP_ignore = 1; static const long asn_VAL_52_S1AP_optional = 0; static const long asn_VAL_53_S1AP_id_UESidelinkAggregateMaximumBitrate = 248; static const long asn_VAL_53_S1AP_ignore = 1; static const long asn_VAL_53_S1AP_optional = 0; static const long asn_VAL_54_S1AP_id_EnhancedCoverageRestricted = 251; static const long asn_VAL_54_S1AP_ignore = 1; static const long asn_VAL_54_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_HandoverRequestIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_29_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_29_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_29_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_30_S1AP_id_HandoverType }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_30_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_HandoverType }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_30_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_31_S1AP_id_Cause }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_31_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Cause }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_31_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_32_S1AP_id_uEaggregateMaximumBitrate }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_32_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_UEAggregateMaximumBitrate }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_32_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_33_S1AP_id_E_RABToBeSetupListHOReq }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_33_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABToBeSetupListHOReq }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_33_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_34_S1AP_id_Source_ToTarget_TransparentContainer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_34_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_Source_ToTarget_TransparentContainer }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_34_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_35_S1AP_id_UESecurityCapabilities }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_35_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_UESecurityCapabilities }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_35_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_36_S1AP_id_HandoverRestrictionList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_36_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_HandoverRestrictionList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_36_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_37_S1AP_id_TraceActivation }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_37_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_TraceActivation }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_37_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_38_S1AP_id_RequestType }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_38_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_RequestType }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_38_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_39_S1AP_id_SRVCCOperationPossible }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_39_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_SRVCCOperationPossible }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_39_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_40_S1AP_id_SecurityContext }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_40_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_SecurityContext }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_40_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_41_S1AP_id_NASSecurityParameterstoE_UTRAN }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_41_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_NASSecurityParameterstoE_UTRAN }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_41_S1AP_conditional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_42_S1AP_id_CSG_Id }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_42_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_CSG_Id }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_42_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_43_S1AP_id_CSGMembershipStatus }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_43_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CSGMembershipStatus }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_43_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_44_S1AP_id_GUMMEI_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_44_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_GUMMEI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_44_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_45_S1AP_id_MME_UE_S1AP_ID_2 }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_45_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_45_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_46_S1AP_id_ManagementBasedMDTAllowed }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_46_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ManagementBasedMDTAllowed }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_46_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_47_S1AP_id_ManagementBasedMDTPLMNList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_47_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MDTPLMNList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_47_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_48_S1AP_id_Masked_IMEISV }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_48_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Masked_IMEISV }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_48_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_49_S1AP_id_ExpectedUEBehaviour }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_49_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ExpectedUEBehaviour }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_49_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_50_S1AP_id_ProSeAuthorized }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_50_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ProSeAuthorized }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_50_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_51_S1AP_id_UEUserPlaneCIoTSupportIndicator }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_51_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UEUserPlaneCIoTSupportIndicator }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_51_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_52_S1AP_id_V2XServicesAuthorized }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_52_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_V2XServicesAuthorized }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_52_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_53_S1AP_id_UESidelinkAggregateMaximumBitrate }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_53_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UESidelinkAggregateMaximumBitrate }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_53_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_54_S1AP_id_EnhancedCoverageRestricted }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_54_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_EnhancedCoverageRestricted }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_54_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_HandoverRequestIEs_1[] = { { 26, 4, asn_IOS_S1AP_HandoverRequestIEs_1_rows } }; static const long asn_VAL_56_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_56_S1AP_ignore = 1; static const long asn_VAL_56_S1AP_mandatory = 2; static const long asn_VAL_57_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_57_S1AP_ignore = 1; static const long asn_VAL_57_S1AP_mandatory = 2; static const long asn_VAL_58_S1AP_id_E_RABAdmittedList = 18; static const long asn_VAL_58_S1AP_ignore = 1; static const long asn_VAL_58_S1AP_mandatory = 2; static const long asn_VAL_59_S1AP_id_E_RABFailedToSetupListHOReqAck = 19; static const long asn_VAL_59_S1AP_ignore = 1; static const long asn_VAL_59_S1AP_optional = 0; static const long asn_VAL_60_S1AP_id_Target_ToSource_TransparentContainer = 123; static const long asn_VAL_60_S1AP_reject = 0; static const long asn_VAL_60_S1AP_mandatory = 2; static const long asn_VAL_61_S1AP_id_CSG_Id = 127; static const long asn_VAL_61_S1AP_ignore = 1; static const long asn_VAL_61_S1AP_optional = 0; static const long asn_VAL_62_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_62_S1AP_ignore = 1; static const long asn_VAL_62_S1AP_optional = 0; static const long asn_VAL_63_S1AP_id_CellAccessMode = 145; static const long asn_VAL_63_S1AP_ignore = 1; static const long asn_VAL_63_S1AP_optional = 0; static const long asn_VAL_64_S1AP_id_CE_mode_B_SupportIndicator = 242; static const long asn_VAL_64_S1AP_ignore = 1; static const long asn_VAL_64_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_HandoverRequestAcknowledgeIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_56_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_56_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_56_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_57_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_57_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_57_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_58_S1AP_id_E_RABAdmittedList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_58_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABAdmittedList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_58_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_59_S1AP_id_E_RABFailedToSetupListHOReqAck }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_59_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABFailedtoSetupListHOReqAck }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_59_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_60_S1AP_id_Target_ToSource_TransparentContainer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_60_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_Target_ToSource_TransparentContainer }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_60_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_61_S1AP_id_CSG_Id }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_61_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CSG_Id }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_61_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_62_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_62_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_62_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_63_S1AP_id_CellAccessMode }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_63_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CellAccessMode }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_63_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_64_S1AP_id_CE_mode_B_SupportIndicator }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_64_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CE_mode_B_SupportIndicator }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_64_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_HandoverRequestAcknowledgeIEs_1[] = { { 9, 4, asn_IOS_S1AP_HandoverRequestAcknowledgeIEs_1_rows } }; static const long asn_VAL_67_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_67_S1AP_ignore = 1; static const long asn_VAL_67_S1AP_mandatory = 2; static const long asn_VAL_68_S1AP_id_Cause = 2; static const long asn_VAL_68_S1AP_ignore = 1; static const long asn_VAL_68_S1AP_mandatory = 2; static const long asn_VAL_69_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_69_S1AP_ignore = 1; static const long asn_VAL_69_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_HandoverFailureIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_67_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_67_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_67_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_68_S1AP_id_Cause }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_68_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Cause }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_68_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_69_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_69_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_69_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_HandoverFailureIEs_1[] = { { 3, 4, asn_IOS_S1AP_HandoverFailureIEs_1_rows } }; static const long asn_VAL_70_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_70_S1AP_reject = 0; static const long asn_VAL_70_S1AP_mandatory = 2; static const long asn_VAL_71_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_71_S1AP_reject = 0; static const long asn_VAL_71_S1AP_mandatory = 2; static const long asn_VAL_72_S1AP_id_EUTRAN_CGI = 100; static const long asn_VAL_72_S1AP_ignore = 1; static const long asn_VAL_72_S1AP_mandatory = 2; static const long asn_VAL_73_S1AP_id_TAI = 67; static const long asn_VAL_73_S1AP_ignore = 1; static const long asn_VAL_73_S1AP_mandatory = 2; static const long asn_VAL_74_S1AP_id_Tunnel_Information_for_BBF = 176; static const long asn_VAL_74_S1AP_ignore = 1; static const long asn_VAL_74_S1AP_optional = 0; static const long asn_VAL_75_S1AP_id_LHN_ID = 186; static const long asn_VAL_75_S1AP_ignore = 1; static const long asn_VAL_75_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_HandoverNotifyIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_70_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_70_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_70_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_71_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_71_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_71_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_72_S1AP_id_EUTRAN_CGI }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_72_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_EUTRAN_CGI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_72_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_73_S1AP_id_TAI }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_73_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_TAI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_73_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_74_S1AP_id_Tunnel_Information_for_BBF }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_74_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_TunnelInformation }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_74_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_75_S1AP_id_LHN_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_75_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_LHN_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_75_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_HandoverNotifyIEs_1[] = { { 6, 4, asn_IOS_S1AP_HandoverNotifyIEs_1_rows } }; static const long asn_VAL_76_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_76_S1AP_reject = 0; static const long asn_VAL_76_S1AP_mandatory = 2; static const long asn_VAL_77_S1AP_id_E_RABToBeSwitchedDLList = 22; static const long asn_VAL_77_S1AP_reject = 0; static const long asn_VAL_77_S1AP_mandatory = 2; static const long asn_VAL_78_S1AP_id_SourceMME_UE_S1AP_ID = 88; static const long asn_VAL_78_S1AP_reject = 0; static const long asn_VAL_78_S1AP_mandatory = 2; static const long asn_VAL_79_S1AP_id_EUTRAN_CGI = 100; static const long asn_VAL_79_S1AP_ignore = 1; static const long asn_VAL_79_S1AP_mandatory = 2; static const long asn_VAL_80_S1AP_id_TAI = 67; static const long asn_VAL_80_S1AP_ignore = 1; static const long asn_VAL_80_S1AP_mandatory = 2; static const long asn_VAL_81_S1AP_id_UESecurityCapabilities = 107; static const long asn_VAL_81_S1AP_ignore = 1; static const long asn_VAL_81_S1AP_mandatory = 2; static const long asn_VAL_82_S1AP_id_CSG_Id = 127; static const long asn_VAL_82_S1AP_ignore = 1; static const long asn_VAL_82_S1AP_optional = 0; static const long asn_VAL_83_S1AP_id_CellAccessMode = 145; static const long asn_VAL_83_S1AP_ignore = 1; static const long asn_VAL_83_S1AP_optional = 0; static const long asn_VAL_84_S1AP_id_SourceMME_GUMMEI = 157; static const long asn_VAL_84_S1AP_ignore = 1; static const long asn_VAL_84_S1AP_optional = 0; static const long asn_VAL_85_S1AP_id_CSGMembershipStatus = 146; static const long asn_VAL_85_S1AP_ignore = 1; static const long asn_VAL_85_S1AP_optional = 0; static const long asn_VAL_86_S1AP_id_Tunnel_Information_for_BBF = 176; static const long asn_VAL_86_S1AP_ignore = 1; static const long asn_VAL_86_S1AP_optional = 0; static const long asn_VAL_87_S1AP_id_LHN_ID = 186; static const long asn_VAL_87_S1AP_ignore = 1; static const long asn_VAL_87_S1AP_optional = 0; static const long asn_VAL_88_S1AP_id_RRC_Resume_Cause = 245; static const long asn_VAL_88_S1AP_ignore = 1; static const long asn_VAL_88_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_PathSwitchRequestIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_76_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_76_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_76_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_77_S1AP_id_E_RABToBeSwitchedDLList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_77_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABToBeSwitchedDLList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_77_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_78_S1AP_id_SourceMME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_78_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_78_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_79_S1AP_id_EUTRAN_CGI }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_79_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_EUTRAN_CGI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_79_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_80_S1AP_id_TAI }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_80_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_TAI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_80_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_81_S1AP_id_UESecurityCapabilities }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_81_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UESecurityCapabilities }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_81_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_82_S1AP_id_CSG_Id }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_82_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CSG_Id }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_82_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_83_S1AP_id_CellAccessMode }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_83_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CellAccessMode }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_83_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_84_S1AP_id_SourceMME_GUMMEI }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_84_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_GUMMEI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_84_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_85_S1AP_id_CSGMembershipStatus }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_85_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CSGMembershipStatus }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_85_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_86_S1AP_id_Tunnel_Information_for_BBF }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_86_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_TunnelInformation }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_86_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_87_S1AP_id_LHN_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_87_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_LHN_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_87_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_88_S1AP_id_RRC_Resume_Cause }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_88_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_RRC_Establishment_Cause }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_88_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_PathSwitchRequestIEs_1[] = { { 13, 4, asn_IOS_S1AP_PathSwitchRequestIEs_1_rows } }; static const long asn_VAL_90_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_90_S1AP_ignore = 1; static const long asn_VAL_90_S1AP_mandatory = 2; static const long asn_VAL_91_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_91_S1AP_ignore = 1; static const long asn_VAL_91_S1AP_mandatory = 2; static const long asn_VAL_92_S1AP_id_uEaggregateMaximumBitrate = 66; static const long asn_VAL_92_S1AP_ignore = 1; static const long asn_VAL_92_S1AP_optional = 0; static const long asn_VAL_93_S1AP_id_E_RABToBeSwitchedULList = 95; static const long asn_VAL_93_S1AP_ignore = 1; static const long asn_VAL_93_S1AP_optional = 0; static const long asn_VAL_94_S1AP_id_E_RABToBeReleasedList = 33; static const long asn_VAL_94_S1AP_ignore = 1; static const long asn_VAL_94_S1AP_optional = 0; static const long asn_VAL_95_S1AP_id_SecurityContext = 40; static const long asn_VAL_95_S1AP_reject = 0; static const long asn_VAL_95_S1AP_mandatory = 2; static const long asn_VAL_96_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_96_S1AP_ignore = 1; static const long asn_VAL_96_S1AP_optional = 0; static const long asn_VAL_97_S1AP_id_MME_UE_S1AP_ID_2 = 158; static const long asn_VAL_97_S1AP_ignore = 1; static const long asn_VAL_97_S1AP_optional = 0; static const long asn_VAL_98_S1AP_id_CSGMembershipStatus = 146; static const long asn_VAL_98_S1AP_ignore = 1; static const long asn_VAL_98_S1AP_optional = 0; static const long asn_VAL_99_S1AP_id_ProSeAuthorized = 195; static const long asn_VAL_99_S1AP_ignore = 1; static const long asn_VAL_99_S1AP_optional = 0; static const long asn_VAL_100_S1AP_id_UEUserPlaneCIoTSupportIndicator = 241; static const long asn_VAL_100_S1AP_ignore = 1; static const long asn_VAL_100_S1AP_optional = 0; static const long asn_VAL_101_S1AP_id_V2XServicesAuthorized = 240; static const long asn_VAL_101_S1AP_ignore = 1; static const long asn_VAL_101_S1AP_optional = 0; static const long asn_VAL_102_S1AP_id_UESidelinkAggregateMaximumBitrate = 248; static const long asn_VAL_102_S1AP_ignore = 1; static const long asn_VAL_102_S1AP_optional = 0; static const long asn_VAL_103_S1AP_id_EnhancedCoverageRestricted = 251; static const long asn_VAL_103_S1AP_ignore = 1; static const long asn_VAL_103_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_PathSwitchRequestAcknowledgeIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_90_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_90_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_90_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_91_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_91_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_91_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_92_S1AP_id_uEaggregateMaximumBitrate }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_92_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UEAggregateMaximumBitrate }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_92_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_93_S1AP_id_E_RABToBeSwitchedULList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_93_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABToBeSwitchedULList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_93_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_94_S1AP_id_E_RABToBeReleasedList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_94_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_94_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_95_S1AP_id_SecurityContext }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_95_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_SecurityContext }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_95_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_96_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_96_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_96_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_97_S1AP_id_MME_UE_S1AP_ID_2 }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_97_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_97_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_98_S1AP_id_CSGMembershipStatus }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_98_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CSGMembershipStatus }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_98_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_99_S1AP_id_ProSeAuthorized }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_99_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ProSeAuthorized }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_99_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_100_S1AP_id_UEUserPlaneCIoTSupportIndicator }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_100_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UEUserPlaneCIoTSupportIndicator }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_100_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_101_S1AP_id_V2XServicesAuthorized }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_101_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_V2XServicesAuthorized }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_101_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_102_S1AP_id_UESidelinkAggregateMaximumBitrate }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_102_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UESidelinkAggregateMaximumBitrate }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_102_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_103_S1AP_id_EnhancedCoverageRestricted }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_103_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_EnhancedCoverageRestricted }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_103_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_PathSwitchRequestAcknowledgeIEs_1[] = { { 14, 4, asn_IOS_S1AP_PathSwitchRequestAcknowledgeIEs_1_rows } }; static const long asn_VAL_105_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_105_S1AP_ignore = 1; static const long asn_VAL_105_S1AP_mandatory = 2; static const long asn_VAL_106_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_106_S1AP_ignore = 1; static const long asn_VAL_106_S1AP_mandatory = 2; static const long asn_VAL_107_S1AP_id_Cause = 2; static const long asn_VAL_107_S1AP_ignore = 1; static const long asn_VAL_107_S1AP_mandatory = 2; static const long asn_VAL_108_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_108_S1AP_ignore = 1; static const long asn_VAL_108_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_PathSwitchRequestFailureIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_105_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_105_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_105_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_106_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_106_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_106_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_107_S1AP_id_Cause }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_107_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Cause }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_107_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_108_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_108_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_108_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_PathSwitchRequestFailureIEs_1[] = { { 4, 4, asn_IOS_S1AP_PathSwitchRequestFailureIEs_1_rows } }; static const long asn_VAL_109_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_109_S1AP_reject = 0; static const long asn_VAL_109_S1AP_mandatory = 2; static const long asn_VAL_110_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_110_S1AP_reject = 0; static const long asn_VAL_110_S1AP_mandatory = 2; static const long asn_VAL_111_S1AP_id_Cause = 2; static const long asn_VAL_111_S1AP_ignore = 1; static const long asn_VAL_111_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_HandoverCancelIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_109_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_109_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_109_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_110_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_110_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_110_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_111_S1AP_id_Cause }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_111_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Cause }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_111_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_HandoverCancelIEs_1[] = { { 3, 4, asn_IOS_S1AP_HandoverCancelIEs_1_rows } }; static const long asn_VAL_112_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_112_S1AP_ignore = 1; static const long asn_VAL_112_S1AP_mandatory = 2; static const long asn_VAL_113_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_113_S1AP_ignore = 1; static const long asn_VAL_113_S1AP_mandatory = 2; static const long asn_VAL_114_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_114_S1AP_ignore = 1; static const long asn_VAL_114_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_HandoverCancelAcknowledgeIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_112_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_112_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_112_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_113_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_113_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_113_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_114_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_114_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_114_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_HandoverCancelAcknowledgeIEs_1[] = { { 3, 4, asn_IOS_S1AP_HandoverCancelAcknowledgeIEs_1_rows } }; static const long asn_VAL_115_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_115_S1AP_reject = 0; static const long asn_VAL_115_S1AP_mandatory = 2; static const long asn_VAL_116_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_116_S1AP_reject = 0; static const long asn_VAL_116_S1AP_mandatory = 2; static const long asn_VAL_117_S1AP_id_uEaggregateMaximumBitrate = 66; static const long asn_VAL_117_S1AP_reject = 0; static const long asn_VAL_117_S1AP_optional = 0; static const long asn_VAL_118_S1AP_id_E_RABToBeSetupListBearerSUReq = 16; static const long asn_VAL_118_S1AP_reject = 0; static const long asn_VAL_118_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABSetupRequestIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_115_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_115_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_115_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_116_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_116_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_116_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_117_S1AP_id_uEaggregateMaximumBitrate }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_117_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_UEAggregateMaximumBitrate }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_117_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_118_S1AP_id_E_RABToBeSetupListBearerSUReq }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_118_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABToBeSetupListBearerSUReq }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_118_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABSetupRequestIEs_1[] = { { 4, 4, asn_IOS_S1AP_E_RABSetupRequestIEs_1_rows } }; static const long asn_VAL_120_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_120_S1AP_ignore = 1; static const long asn_VAL_120_S1AP_mandatory = 2; static const long asn_VAL_121_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_121_S1AP_ignore = 1; static const long asn_VAL_121_S1AP_mandatory = 2; static const long asn_VAL_122_S1AP_id_E_RABSetupListBearerSURes = 28; static const long asn_VAL_122_S1AP_ignore = 1; static const long asn_VAL_122_S1AP_optional = 0; static const long asn_VAL_123_S1AP_id_E_RABFailedToSetupListBearerSURes = 29; static const long asn_VAL_123_S1AP_ignore = 1; static const long asn_VAL_123_S1AP_optional = 0; static const long asn_VAL_124_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_124_S1AP_ignore = 1; static const long asn_VAL_124_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABSetupResponseIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_120_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_120_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_120_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_121_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_121_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_121_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_122_S1AP_id_E_RABSetupListBearerSURes }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_122_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABSetupListBearerSURes }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_122_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_123_S1AP_id_E_RABFailedToSetupListBearerSURes }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_123_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_123_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_124_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_124_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_124_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABSetupResponseIEs_1[] = { { 5, 4, asn_IOS_S1AP_E_RABSetupResponseIEs_1_rows } }; static const long asn_VAL_126_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_126_S1AP_reject = 0; static const long asn_VAL_126_S1AP_mandatory = 2; static const long asn_VAL_127_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_127_S1AP_reject = 0; static const long asn_VAL_127_S1AP_mandatory = 2; static const long asn_VAL_128_S1AP_id_uEaggregateMaximumBitrate = 66; static const long asn_VAL_128_S1AP_reject = 0; static const long asn_VAL_128_S1AP_optional = 0; static const long asn_VAL_129_S1AP_id_E_RABToBeModifiedListBearerModReq = 30; static const long asn_VAL_129_S1AP_reject = 0; static const long asn_VAL_129_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABModifyRequestIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_126_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_126_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_126_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_127_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_127_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_127_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_128_S1AP_id_uEaggregateMaximumBitrate }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_128_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_UEAggregateMaximumBitrate }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_128_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_129_S1AP_id_E_RABToBeModifiedListBearerModReq }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_129_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABToBeModifiedListBearerModReq }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_129_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABModifyRequestIEs_1[] = { { 4, 4, asn_IOS_S1AP_E_RABModifyRequestIEs_1_rows } }; static const long asn_VAL_131_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_131_S1AP_ignore = 1; static const long asn_VAL_131_S1AP_mandatory = 2; static const long asn_VAL_132_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_132_S1AP_ignore = 1; static const long asn_VAL_132_S1AP_mandatory = 2; static const long asn_VAL_133_S1AP_id_E_RABModifyListBearerModRes = 31; static const long asn_VAL_133_S1AP_ignore = 1; static const long asn_VAL_133_S1AP_optional = 0; static const long asn_VAL_134_S1AP_id_E_RABFailedToModifyList = 32; static const long asn_VAL_134_S1AP_ignore = 1; static const long asn_VAL_134_S1AP_optional = 0; static const long asn_VAL_135_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_135_S1AP_ignore = 1; static const long asn_VAL_135_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABModifyResponseIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_131_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_131_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_131_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_132_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_132_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_132_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_133_S1AP_id_E_RABModifyListBearerModRes }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_133_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABModifyListBearerModRes }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_133_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_134_S1AP_id_E_RABFailedToModifyList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_134_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_134_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_135_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_135_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_135_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABModifyResponseIEs_1[] = { { 5, 4, asn_IOS_S1AP_E_RABModifyResponseIEs_1_rows } }; static const long asn_VAL_137_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_137_S1AP_reject = 0; static const long asn_VAL_137_S1AP_mandatory = 2; static const long asn_VAL_138_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_138_S1AP_reject = 0; static const long asn_VAL_138_S1AP_mandatory = 2; static const long asn_VAL_139_S1AP_id_uEaggregateMaximumBitrate = 66; static const long asn_VAL_139_S1AP_reject = 0; static const long asn_VAL_139_S1AP_optional = 0; static const long asn_VAL_140_S1AP_id_E_RABToBeReleasedList = 33; static const long asn_VAL_140_S1AP_ignore = 1; static const long asn_VAL_140_S1AP_mandatory = 2; static const long asn_VAL_141_S1AP_id_NAS_PDU = 26; static const long asn_VAL_141_S1AP_ignore = 1; static const long asn_VAL_141_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABReleaseCommandIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_137_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_137_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_137_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_138_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_138_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_138_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_139_S1AP_id_uEaggregateMaximumBitrate }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_139_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_UEAggregateMaximumBitrate }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_139_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_140_S1AP_id_E_RABToBeReleasedList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_140_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_140_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_141_S1AP_id_NAS_PDU }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_141_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_NAS_PDU }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_141_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABReleaseCommandIEs_1[] = { { 5, 4, asn_IOS_S1AP_E_RABReleaseCommandIEs_1_rows } }; static const long asn_VAL_142_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_142_S1AP_ignore = 1; static const long asn_VAL_142_S1AP_mandatory = 2; static const long asn_VAL_143_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_143_S1AP_ignore = 1; static const long asn_VAL_143_S1AP_mandatory = 2; static const long asn_VAL_144_S1AP_id_E_RABReleaseListBearerRelComp = 69; static const long asn_VAL_144_S1AP_ignore = 1; static const long asn_VAL_144_S1AP_optional = 0; static const long asn_VAL_145_S1AP_id_E_RABFailedToReleaseList = 34; static const long asn_VAL_145_S1AP_ignore = 1; static const long asn_VAL_145_S1AP_optional = 0; static const long asn_VAL_146_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_146_S1AP_ignore = 1; static const long asn_VAL_146_S1AP_optional = 0; static const long asn_VAL_147_S1AP_id_UserLocationInformation = 189; static const long asn_VAL_147_S1AP_ignore = 1; static const long asn_VAL_147_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABReleaseResponseIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_142_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_142_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_142_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_143_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_143_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_143_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_144_S1AP_id_E_RABReleaseListBearerRelComp }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_144_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABReleaseListBearerRelComp }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_144_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_145_S1AP_id_E_RABFailedToReleaseList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_145_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_145_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_146_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_146_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_146_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_147_S1AP_id_UserLocationInformation }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_147_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UserLocationInformation }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_147_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABReleaseResponseIEs_1[] = { { 6, 4, asn_IOS_S1AP_E_RABReleaseResponseIEs_1_rows } }; static const long asn_VAL_149_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_149_S1AP_reject = 0; static const long asn_VAL_149_S1AP_mandatory = 2; static const long asn_VAL_150_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_150_S1AP_reject = 0; static const long asn_VAL_150_S1AP_mandatory = 2; static const long asn_VAL_151_S1AP_id_E_RABReleasedList = 110; static const long asn_VAL_151_S1AP_ignore = 1; static const long asn_VAL_151_S1AP_mandatory = 2; static const long asn_VAL_152_S1AP_id_UserLocationInformation = 189; static const long asn_VAL_152_S1AP_ignore = 1; static const long asn_VAL_152_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABReleaseIndicationIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_149_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_149_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_149_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_150_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_150_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_150_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_151_S1AP_id_E_RABReleasedList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_151_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_151_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_152_S1AP_id_UserLocationInformation }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_152_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UserLocationInformation }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_152_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABReleaseIndicationIEs_1[] = { { 4, 4, asn_IOS_S1AP_E_RABReleaseIndicationIEs_1_rows } }; static const long asn_VAL_153_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_153_S1AP_reject = 0; static const long asn_VAL_153_S1AP_mandatory = 2; static const long asn_VAL_154_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_154_S1AP_reject = 0; static const long asn_VAL_154_S1AP_mandatory = 2; static const long asn_VAL_155_S1AP_id_uEaggregateMaximumBitrate = 66; static const long asn_VAL_155_S1AP_reject = 0; static const long asn_VAL_155_S1AP_mandatory = 2; static const long asn_VAL_156_S1AP_id_E_RABToBeSetupListCtxtSUReq = 24; static const long asn_VAL_156_S1AP_reject = 0; static const long asn_VAL_156_S1AP_mandatory = 2; static const long asn_VAL_157_S1AP_id_UESecurityCapabilities = 107; static const long asn_VAL_157_S1AP_reject = 0; static const long asn_VAL_157_S1AP_mandatory = 2; static const long asn_VAL_158_S1AP_id_SecurityKey = 73; static const long asn_VAL_158_S1AP_reject = 0; static const long asn_VAL_158_S1AP_mandatory = 2; static const long asn_VAL_159_S1AP_id_TraceActivation = 25; static const long asn_VAL_159_S1AP_ignore = 1; static const long asn_VAL_159_S1AP_optional = 0; static const long asn_VAL_160_S1AP_id_HandoverRestrictionList = 41; static const long asn_VAL_160_S1AP_ignore = 1; static const long asn_VAL_160_S1AP_optional = 0; static const long asn_VAL_161_S1AP_id_UERadioCapability = 74; static const long asn_VAL_161_S1AP_ignore = 1; static const long asn_VAL_161_S1AP_optional = 0; static const long asn_VAL_162_S1AP_id_SubscriberProfileIDforRFP = 106; static const long asn_VAL_162_S1AP_ignore = 1; static const long asn_VAL_162_S1AP_optional = 0; static const long asn_VAL_163_S1AP_id_CSFallbackIndicator = 108; static const long asn_VAL_163_S1AP_reject = 0; static const long asn_VAL_163_S1AP_optional = 0; static const long asn_VAL_164_S1AP_id_SRVCCOperationPossible = 124; static const long asn_VAL_164_S1AP_ignore = 1; static const long asn_VAL_164_S1AP_optional = 0; static const long asn_VAL_165_S1AP_id_CSGMembershipStatus = 146; static const long asn_VAL_165_S1AP_ignore = 1; static const long asn_VAL_165_S1AP_optional = 0; static const long asn_VAL_166_S1AP_id_RegisteredLAI = 159; static const long asn_VAL_166_S1AP_ignore = 1; static const long asn_VAL_166_S1AP_optional = 0; static const long asn_VAL_167_S1AP_id_GUMMEI_ID = 75; static const long asn_VAL_167_S1AP_ignore = 1; static const long asn_VAL_167_S1AP_optional = 0; static const long asn_VAL_168_S1AP_id_MME_UE_S1AP_ID_2 = 158; static const long asn_VAL_168_S1AP_ignore = 1; static const long asn_VAL_168_S1AP_optional = 0; static const long asn_VAL_169_S1AP_id_ManagementBasedMDTAllowed = 165; static const long asn_VAL_169_S1AP_ignore = 1; static const long asn_VAL_169_S1AP_optional = 0; static const long asn_VAL_170_S1AP_id_ManagementBasedMDTPLMNList = 177; static const long asn_VAL_170_S1AP_ignore = 1; static const long asn_VAL_170_S1AP_optional = 0; static const long asn_VAL_171_S1AP_id_AdditionalCSFallbackIndicator = 187; static const long asn_VAL_171_S1AP_ignore = 1; static const long asn_VAL_171_S1AP_conditional = 1; static const long asn_VAL_172_S1AP_id_Masked_IMEISV = 192; static const long asn_VAL_172_S1AP_ignore = 1; static const long asn_VAL_172_S1AP_optional = 0; static const long asn_VAL_173_S1AP_id_ExpectedUEBehaviour = 196; static const long asn_VAL_173_S1AP_ignore = 1; static const long asn_VAL_173_S1AP_optional = 0; static const long asn_VAL_174_S1AP_id_ProSeAuthorized = 195; static const long asn_VAL_174_S1AP_ignore = 1; static const long asn_VAL_174_S1AP_optional = 0; static const long asn_VAL_175_S1AP_id_UEUserPlaneCIoTSupportIndicator = 241; static const long asn_VAL_175_S1AP_ignore = 1; static const long asn_VAL_175_S1AP_optional = 0; static const long asn_VAL_176_S1AP_id_V2XServicesAuthorized = 240; static const long asn_VAL_176_S1AP_ignore = 1; static const long asn_VAL_176_S1AP_optional = 0; static const long asn_VAL_177_S1AP_id_UESidelinkAggregateMaximumBitrate = 248; static const long asn_VAL_177_S1AP_ignore = 1; static const long asn_VAL_177_S1AP_optional = 0; static const long asn_VAL_178_S1AP_id_EnhancedCoverageRestricted = 251; static const long asn_VAL_178_S1AP_ignore = 1; static const long asn_VAL_178_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_InitialContextSetupRequestIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_153_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_153_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_153_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_154_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_154_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_154_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_155_S1AP_id_uEaggregateMaximumBitrate }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_155_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_UEAggregateMaximumBitrate }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_155_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_156_S1AP_id_E_RABToBeSetupListCtxtSUReq }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_156_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABToBeSetupListCtxtSUReq }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_156_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_157_S1AP_id_UESecurityCapabilities }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_157_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_UESecurityCapabilities }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_157_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_158_S1AP_id_SecurityKey }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_158_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_SecurityKey }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_158_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_159_S1AP_id_TraceActivation }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_159_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_TraceActivation }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_159_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_160_S1AP_id_HandoverRestrictionList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_160_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_HandoverRestrictionList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_160_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_161_S1AP_id_UERadioCapability }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_161_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UERadioCapability }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_161_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_162_S1AP_id_SubscriberProfileIDforRFP }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_162_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_SubscriberProfileIDforRFP }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_162_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_163_S1AP_id_CSFallbackIndicator }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_163_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_CSFallbackIndicator }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_163_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_164_S1AP_id_SRVCCOperationPossible }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_164_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_SRVCCOperationPossible }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_164_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_165_S1AP_id_CSGMembershipStatus }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_165_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CSGMembershipStatus }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_165_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_166_S1AP_id_RegisteredLAI }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_166_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_LAI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_166_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_167_S1AP_id_GUMMEI_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_167_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_GUMMEI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_167_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_168_S1AP_id_MME_UE_S1AP_ID_2 }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_168_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_168_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_169_S1AP_id_ManagementBasedMDTAllowed }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_169_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ManagementBasedMDTAllowed }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_169_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_170_S1AP_id_ManagementBasedMDTPLMNList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_170_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MDTPLMNList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_170_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_171_S1AP_id_AdditionalCSFallbackIndicator }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_171_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_AdditionalCSFallbackIndicator }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_171_S1AP_conditional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_172_S1AP_id_Masked_IMEISV }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_172_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Masked_IMEISV }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_172_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_173_S1AP_id_ExpectedUEBehaviour }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_173_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ExpectedUEBehaviour }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_173_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_174_S1AP_id_ProSeAuthorized }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_174_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ProSeAuthorized }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_174_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_175_S1AP_id_UEUserPlaneCIoTSupportIndicator }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_175_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UEUserPlaneCIoTSupportIndicator }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_175_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_176_S1AP_id_V2XServicesAuthorized }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_176_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_V2XServicesAuthorized }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_176_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_177_S1AP_id_UESidelinkAggregateMaximumBitrate }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_177_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UESidelinkAggregateMaximumBitrate }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_177_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_178_S1AP_id_EnhancedCoverageRestricted }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_178_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_EnhancedCoverageRestricted }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_178_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_InitialContextSetupRequestIEs_1[] = { { 26, 4, asn_IOS_S1AP_InitialContextSetupRequestIEs_1_rows } }; static const long asn_VAL_180_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_180_S1AP_ignore = 1; static const long asn_VAL_180_S1AP_mandatory = 2; static const long asn_VAL_181_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_181_S1AP_ignore = 1; static const long asn_VAL_181_S1AP_mandatory = 2; static const long asn_VAL_182_S1AP_id_E_RABSetupListCtxtSURes = 51; static const long asn_VAL_182_S1AP_ignore = 1; static const long asn_VAL_182_S1AP_mandatory = 2; static const long asn_VAL_183_S1AP_id_E_RABFailedToSetupListCtxtSURes = 48; static const long asn_VAL_183_S1AP_ignore = 1; static const long asn_VAL_183_S1AP_optional = 0; static const long asn_VAL_184_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_184_S1AP_ignore = 1; static const long asn_VAL_184_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_InitialContextSetupResponseIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_180_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_180_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_180_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_181_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_181_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_181_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_182_S1AP_id_E_RABSetupListCtxtSURes }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_182_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABSetupListCtxtSURes }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_182_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_183_S1AP_id_E_RABFailedToSetupListCtxtSURes }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_183_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_183_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_184_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_184_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_184_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_InitialContextSetupResponseIEs_1[] = { { 5, 4, asn_IOS_S1AP_InitialContextSetupResponseIEs_1_rows } }; static const long asn_VAL_186_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_186_S1AP_ignore = 1; static const long asn_VAL_186_S1AP_mandatory = 2; static const long asn_VAL_187_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_187_S1AP_ignore = 1; static const long asn_VAL_187_S1AP_mandatory = 2; static const long asn_VAL_188_S1AP_id_Cause = 2; static const long asn_VAL_188_S1AP_ignore = 1; static const long asn_VAL_188_S1AP_mandatory = 2; static const long asn_VAL_189_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_189_S1AP_ignore = 1; static const long asn_VAL_189_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_InitialContextSetupFailureIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_186_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_186_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_186_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_187_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_187_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_187_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_188_S1AP_id_Cause }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_188_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Cause }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_188_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_189_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_189_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_189_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_InitialContextSetupFailureIEs_1[] = { { 4, 4, asn_IOS_S1AP_InitialContextSetupFailureIEs_1_rows } }; static const long asn_VAL_190_S1AP_id_UEIdentityIndexValue = 80; static const long asn_VAL_190_S1AP_ignore = 1; static const long asn_VAL_190_S1AP_mandatory = 2; static const long asn_VAL_191_S1AP_id_UEPagingID = 43; static const long asn_VAL_191_S1AP_ignore = 1; static const long asn_VAL_191_S1AP_mandatory = 2; static const long asn_VAL_192_S1AP_id_pagingDRX = 44; static const long asn_VAL_192_S1AP_ignore = 1; static const long asn_VAL_192_S1AP_optional = 0; static const long asn_VAL_193_S1AP_id_CNDomain = 109; static const long asn_VAL_193_S1AP_ignore = 1; static const long asn_VAL_193_S1AP_mandatory = 2; static const long asn_VAL_194_S1AP_id_TAIList = 46; static const long asn_VAL_194_S1AP_ignore = 1; static const long asn_VAL_194_S1AP_mandatory = 2; static const long asn_VAL_195_S1AP_id_CSG_IdList = 128; static const long asn_VAL_195_S1AP_ignore = 1; static const long asn_VAL_195_S1AP_optional = 0; static const long asn_VAL_196_S1AP_id_PagingPriority = 151; static const long asn_VAL_196_S1AP_ignore = 1; static const long asn_VAL_196_S1AP_optional = 0; static const long asn_VAL_197_S1AP_id_UERadioCapabilityForPaging = 198; static const long asn_VAL_197_S1AP_ignore = 1; static const long asn_VAL_197_S1AP_optional = 0; static const long asn_VAL_198_S1AP_id_AssistanceDataForPaging = 211; static const long asn_VAL_198_S1AP_ignore = 1; static const long asn_VAL_198_S1AP_optional = 0; static const long asn_VAL_199_S1AP_id_Paging_eDRXInformation = 227; static const long asn_VAL_199_S1AP_ignore = 1; static const long asn_VAL_199_S1AP_optional = 0; static const long asn_VAL_200_S1AP_id_extended_UEIdentityIndexValue = 231; static const long asn_VAL_200_S1AP_ignore = 1; static const long asn_VAL_200_S1AP_optional = 0; static const long asn_VAL_201_S1AP_id_NB_IoT_Paging_eDRXInformation = 239; static const long asn_VAL_201_S1AP_ignore = 1; static const long asn_VAL_201_S1AP_optional = 0; static const long asn_VAL_202_S1AP_id_NB_IoT_UEIdentityIndexValue = 244; static const long asn_VAL_202_S1AP_ignore = 1; static const long asn_VAL_202_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_PagingIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_190_S1AP_id_UEIdentityIndexValue }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_190_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UEIdentityIndexValue }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_190_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_191_S1AP_id_UEPagingID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_191_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UEPagingID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_191_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_192_S1AP_id_pagingDRX }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_192_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_PagingDRX }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_192_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_193_S1AP_id_CNDomain }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_193_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CNDomain }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_193_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_194_S1AP_id_TAIList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_194_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_TAIList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_194_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_195_S1AP_id_CSG_IdList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_195_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CSG_IdList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_195_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_196_S1AP_id_PagingPriority }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_196_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_PagingPriority }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_196_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_197_S1AP_id_UERadioCapabilityForPaging }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_197_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UERadioCapabilityForPaging }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_197_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_198_S1AP_id_AssistanceDataForPaging }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_198_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_AssistanceDataForPaging }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_198_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_199_S1AP_id_Paging_eDRXInformation }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_199_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Paging_eDRXInformation }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_199_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_200_S1AP_id_extended_UEIdentityIndexValue }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_200_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Extended_UEIdentityIndexValue }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_200_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_201_S1AP_id_NB_IoT_Paging_eDRXInformation }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_201_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_NB_IoT_Paging_eDRXInformation }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_201_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_202_S1AP_id_NB_IoT_UEIdentityIndexValue }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_202_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_NB_IoT_UEIdentityIndexValue }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_202_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_PagingIEs_1[] = { { 13, 4, asn_IOS_S1AP_PagingIEs_1_rows } }; static const long asn_VAL_204_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_204_S1AP_reject = 0; static const long asn_VAL_204_S1AP_mandatory = 2; static const long asn_VAL_205_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_205_S1AP_reject = 0; static const long asn_VAL_205_S1AP_mandatory = 2; static const long asn_VAL_206_S1AP_id_Cause = 2; static const long asn_VAL_206_S1AP_ignore = 1; static const long asn_VAL_206_S1AP_mandatory = 2; static const long asn_VAL_207_S1AP_id_GWContextReleaseIndication = 164; static const long asn_VAL_207_S1AP_reject = 0; static const long asn_VAL_207_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_UEContextReleaseRequest_IEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_204_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_204_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_204_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_205_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_205_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_205_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_206_S1AP_id_Cause }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_206_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Cause }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_206_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_207_S1AP_id_GWContextReleaseIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_207_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_GWContextReleaseIndication }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_207_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_UEContextReleaseRequest_IEs_1[] = { { 4, 4, asn_IOS_S1AP_UEContextReleaseRequest_IEs_1_rows } }; static const long asn_VAL_208_S1AP_id_UE_S1AP_IDs = 99; static const long asn_VAL_208_S1AP_reject = 0; static const long asn_VAL_208_S1AP_mandatory = 2; static const long asn_VAL_209_S1AP_id_Cause = 2; static const long asn_VAL_209_S1AP_ignore = 1; static const long asn_VAL_209_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_UEContextReleaseCommand_IEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_208_S1AP_id_UE_S1AP_IDs }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_208_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_UE_S1AP_IDs }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_208_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_209_S1AP_id_Cause }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_209_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Cause }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_209_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_UEContextReleaseCommand_IEs_1[] = { { 2, 4, asn_IOS_S1AP_UEContextReleaseCommand_IEs_1_rows } }; static const long asn_VAL_210_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_210_S1AP_ignore = 1; static const long asn_VAL_210_S1AP_mandatory = 2; static const long asn_VAL_211_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_211_S1AP_ignore = 1; static const long asn_VAL_211_S1AP_mandatory = 2; static const long asn_VAL_212_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_212_S1AP_ignore = 1; static const long asn_VAL_212_S1AP_optional = 0; static const long asn_VAL_213_S1AP_id_UserLocationInformation = 189; static const long asn_VAL_213_S1AP_ignore = 1; static const long asn_VAL_213_S1AP_optional = 0; static const long asn_VAL_214_S1AP_id_InformationOnRecommendedCellsAndENBsForPaging = 213; static const long asn_VAL_214_S1AP_ignore = 1; static const long asn_VAL_214_S1AP_optional = 0; static const long asn_VAL_215_S1AP_id_CellIdentifierAndCELevelForCECapableUEs = 212; static const long asn_VAL_215_S1AP_ignore = 1; static const long asn_VAL_215_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_UEContextReleaseComplete_IEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_210_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_210_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_210_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_211_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_211_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_211_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_212_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_212_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_212_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_213_S1AP_id_UserLocationInformation }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_213_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UserLocationInformation }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_213_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_214_S1AP_id_InformationOnRecommendedCellsAndENBsForPaging }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_214_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_InformationOnRecommendedCellsAndENBsForPaging }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_214_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_215_S1AP_id_CellIdentifierAndCELevelForCECapableUEs }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_215_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_215_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_UEContextReleaseComplete_IEs_1[] = { { 6, 4, asn_IOS_S1AP_UEContextReleaseComplete_IEs_1_rows } }; static const long asn_VAL_216_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_216_S1AP_reject = 0; static const long asn_VAL_216_S1AP_mandatory = 2; static const long asn_VAL_217_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_217_S1AP_reject = 0; static const long asn_VAL_217_S1AP_mandatory = 2; static const long asn_VAL_218_S1AP_id_SecurityKey = 73; static const long asn_VAL_218_S1AP_reject = 0; static const long asn_VAL_218_S1AP_optional = 0; static const long asn_VAL_219_S1AP_id_SubscriberProfileIDforRFP = 106; static const long asn_VAL_219_S1AP_ignore = 1; static const long asn_VAL_219_S1AP_optional = 0; static const long asn_VAL_220_S1AP_id_uEaggregateMaximumBitrate = 66; static const long asn_VAL_220_S1AP_ignore = 1; static const long asn_VAL_220_S1AP_optional = 0; static const long asn_VAL_221_S1AP_id_CSFallbackIndicator = 108; static const long asn_VAL_221_S1AP_reject = 0; static const long asn_VAL_221_S1AP_optional = 0; static const long asn_VAL_222_S1AP_id_UESecurityCapabilities = 107; static const long asn_VAL_222_S1AP_reject = 0; static const long asn_VAL_222_S1AP_optional = 0; static const long asn_VAL_223_S1AP_id_CSGMembershipStatus = 146; static const long asn_VAL_223_S1AP_ignore = 1; static const long asn_VAL_223_S1AP_optional = 0; static const long asn_VAL_224_S1AP_id_RegisteredLAI = 159; static const long asn_VAL_224_S1AP_ignore = 1; static const long asn_VAL_224_S1AP_optional = 0; static const long asn_VAL_225_S1AP_id_AdditionalCSFallbackIndicator = 187; static const long asn_VAL_225_S1AP_ignore = 1; static const long asn_VAL_225_S1AP_conditional = 1; static const long asn_VAL_226_S1AP_id_ProSeAuthorized = 195; static const long asn_VAL_226_S1AP_ignore = 1; static const long asn_VAL_226_S1AP_optional = 0; static const long asn_VAL_227_S1AP_id_SRVCCOperationPossible = 124; static const long asn_VAL_227_S1AP_ignore = 1; static const long asn_VAL_227_S1AP_optional = 0; static const long asn_VAL_228_S1AP_id_SRVCCOperationNotPossible = 243; static const long asn_VAL_228_S1AP_ignore = 1; static const long asn_VAL_228_S1AP_optional = 0; static const long asn_VAL_229_S1AP_id_V2XServicesAuthorized = 240; static const long asn_VAL_229_S1AP_ignore = 1; static const long asn_VAL_229_S1AP_optional = 0; static const long asn_VAL_230_S1AP_id_UESidelinkAggregateMaximumBitrate = 248; static const long asn_VAL_230_S1AP_ignore = 1; static const long asn_VAL_230_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_UEContextModificationRequestIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_216_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_216_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_216_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_217_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_217_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_217_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_218_S1AP_id_SecurityKey }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_218_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_SecurityKey }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_218_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_219_S1AP_id_SubscriberProfileIDforRFP }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_219_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_SubscriberProfileIDforRFP }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_219_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_220_S1AP_id_uEaggregateMaximumBitrate }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_220_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UEAggregateMaximumBitrate }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_220_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_221_S1AP_id_CSFallbackIndicator }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_221_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_CSFallbackIndicator }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_221_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_222_S1AP_id_UESecurityCapabilities }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_222_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_UESecurityCapabilities }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_222_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_223_S1AP_id_CSGMembershipStatus }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_223_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CSGMembershipStatus }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_223_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_224_S1AP_id_RegisteredLAI }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_224_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_LAI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_224_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_225_S1AP_id_AdditionalCSFallbackIndicator }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_225_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_AdditionalCSFallbackIndicator }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_225_S1AP_conditional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_226_S1AP_id_ProSeAuthorized }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_226_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ProSeAuthorized }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_226_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_227_S1AP_id_SRVCCOperationPossible }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_227_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_SRVCCOperationPossible }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_227_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_228_S1AP_id_SRVCCOperationNotPossible }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_228_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_SRVCCOperationNotPossible }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_228_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_229_S1AP_id_V2XServicesAuthorized }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_229_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_V2XServicesAuthorized }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_229_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_230_S1AP_id_UESidelinkAggregateMaximumBitrate }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_230_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UESidelinkAggregateMaximumBitrate }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_230_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_UEContextModificationRequestIEs_1[] = { { 15, 4, asn_IOS_S1AP_UEContextModificationRequestIEs_1_rows } }; static const long asn_VAL_231_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_231_S1AP_ignore = 1; static const long asn_VAL_231_S1AP_mandatory = 2; static const long asn_VAL_232_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_232_S1AP_ignore = 1; static const long asn_VAL_232_S1AP_mandatory = 2; static const long asn_VAL_233_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_233_S1AP_ignore = 1; static const long asn_VAL_233_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_UEContextModificationResponseIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_231_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_231_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_231_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_232_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_232_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_232_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_233_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_233_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_233_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_UEContextModificationResponseIEs_1[] = { { 3, 4, asn_IOS_S1AP_UEContextModificationResponseIEs_1_rows } }; static const long asn_VAL_234_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_234_S1AP_ignore = 1; static const long asn_VAL_234_S1AP_mandatory = 2; static const long asn_VAL_235_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_235_S1AP_ignore = 1; static const long asn_VAL_235_S1AP_mandatory = 2; static const long asn_VAL_236_S1AP_id_Cause = 2; static const long asn_VAL_236_S1AP_ignore = 1; static const long asn_VAL_236_S1AP_mandatory = 2; static const long asn_VAL_237_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_237_S1AP_ignore = 1; static const long asn_VAL_237_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_UEContextModificationFailureIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_234_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_234_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_234_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_235_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_235_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_235_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_236_S1AP_id_Cause }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_236_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Cause }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_236_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_237_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_237_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_237_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_UEContextModificationFailureIEs_1[] = { { 4, 4, asn_IOS_S1AP_UEContextModificationFailureIEs_1_rows } }; static const long asn_VAL_238_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_238_S1AP_reject = 0; static const long asn_VAL_238_S1AP_mandatory = 2; static const long asn_VAL_239_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_239_S1AP_reject = 0; static const long asn_VAL_239_S1AP_mandatory = 2; static const long asn_VAL_240_S1AP_id_UERadioCapability = 74; static const long asn_VAL_240_S1AP_ignore = 1; static const long asn_VAL_240_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_UERadioCapabilityMatchRequestIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_238_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_238_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_238_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_239_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_239_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_239_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_240_S1AP_id_UERadioCapability }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_240_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UERadioCapability }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_240_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_UERadioCapabilityMatchRequestIEs_1[] = { { 3, 4, asn_IOS_S1AP_UERadioCapabilityMatchRequestIEs_1_rows } }; static const long asn_VAL_241_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_241_S1AP_ignore = 1; static const long asn_VAL_241_S1AP_mandatory = 2; static const long asn_VAL_242_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_242_S1AP_ignore = 1; static const long asn_VAL_242_S1AP_mandatory = 2; static const long asn_VAL_243_S1AP_id_VoiceSupportMatchIndicator = 169; static const long asn_VAL_243_S1AP_reject = 0; static const long asn_VAL_243_S1AP_mandatory = 2; static const long asn_VAL_244_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_244_S1AP_ignore = 1; static const long asn_VAL_244_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_UERadioCapabilityMatchResponseIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_241_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_241_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_241_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_242_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_242_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_242_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_243_S1AP_id_VoiceSupportMatchIndicator }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_243_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_VoiceSupportMatchIndicator }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_243_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_244_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_244_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_244_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_UERadioCapabilityMatchResponseIEs_1[] = { { 4, 4, asn_IOS_S1AP_UERadioCapabilityMatchResponseIEs_1_rows } }; static const long asn_VAL_245_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_245_S1AP_reject = 0; static const long asn_VAL_245_S1AP_mandatory = 2; static const long asn_VAL_246_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_246_S1AP_reject = 0; static const long asn_VAL_246_S1AP_mandatory = 2; static const long asn_VAL_247_S1AP_id_NAS_PDU = 26; static const long asn_VAL_247_S1AP_reject = 0; static const long asn_VAL_247_S1AP_mandatory = 2; static const long asn_VAL_248_S1AP_id_HandoverRestrictionList = 41; static const long asn_VAL_248_S1AP_ignore = 1; static const long asn_VAL_248_S1AP_optional = 0; static const long asn_VAL_249_S1AP_id_SubscriberProfileIDforRFP = 106; static const long asn_VAL_249_S1AP_ignore = 1; static const long asn_VAL_249_S1AP_optional = 0; static const long asn_VAL_250_S1AP_id_SRVCCOperationPossible = 124; static const long asn_VAL_250_S1AP_ignore = 1; static const long asn_VAL_250_S1AP_optional = 0; static const long asn_VAL_251_S1AP_id_UERadioCapability = 74; static const long asn_VAL_251_S1AP_ignore = 1; static const long asn_VAL_251_S1AP_optional = 0; static const long asn_VAL_252_S1AP_id_DLNASPDUDeliveryAckRequest = 249; static const long asn_VAL_252_S1AP_ignore = 1; static const long asn_VAL_252_S1AP_optional = 0; static const long asn_VAL_253_S1AP_id_EnhancedCoverageRestricted = 251; static const long asn_VAL_253_S1AP_ignore = 1; static const long asn_VAL_253_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_DownlinkNASTransport_IEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_245_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_245_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_245_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_246_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_246_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_246_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_247_S1AP_id_NAS_PDU }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_247_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_NAS_PDU }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_247_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_248_S1AP_id_HandoverRestrictionList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_248_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_HandoverRestrictionList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_248_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_249_S1AP_id_SubscriberProfileIDforRFP }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_249_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_SubscriberProfileIDforRFP }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_249_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_250_S1AP_id_SRVCCOperationPossible }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_250_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_SRVCCOperationPossible }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_250_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_251_S1AP_id_UERadioCapability }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_251_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UERadioCapability }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_251_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_252_S1AP_id_DLNASPDUDeliveryAckRequest }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_252_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_DLNASPDUDeliveryAckRequest }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_252_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_253_S1AP_id_EnhancedCoverageRestricted }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_253_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_EnhancedCoverageRestricted }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_253_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_DownlinkNASTransport_IEs_1[] = { { 9, 4, asn_IOS_S1AP_DownlinkNASTransport_IEs_1_rows } }; static const long asn_VAL_254_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_254_S1AP_reject = 0; static const long asn_VAL_254_S1AP_mandatory = 2; static const long asn_VAL_255_S1AP_id_NAS_PDU = 26; static const long asn_VAL_255_S1AP_reject = 0; static const long asn_VAL_255_S1AP_mandatory = 2; static const long asn_VAL_256_S1AP_id_TAI = 67; static const long asn_VAL_256_S1AP_reject = 0; static const long asn_VAL_256_S1AP_mandatory = 2; static const long asn_VAL_257_S1AP_id_EUTRAN_CGI = 100; static const long asn_VAL_257_S1AP_ignore = 1; static const long asn_VAL_257_S1AP_mandatory = 2; static const long asn_VAL_258_S1AP_id_RRC_Establishment_Cause = 134; static const long asn_VAL_258_S1AP_ignore = 1; static const long asn_VAL_258_S1AP_mandatory = 2; static const long asn_VAL_259_S1AP_id_S_TMSI = 96; static const long asn_VAL_259_S1AP_reject = 0; static const long asn_VAL_259_S1AP_optional = 0; static const long asn_VAL_260_S1AP_id_CSG_Id = 127; static const long asn_VAL_260_S1AP_reject = 0; static const long asn_VAL_260_S1AP_optional = 0; static const long asn_VAL_261_S1AP_id_GUMMEI_ID = 75; static const long asn_VAL_261_S1AP_reject = 0; static const long asn_VAL_261_S1AP_optional = 0; static const long asn_VAL_262_S1AP_id_CellAccessMode = 145; static const long asn_VAL_262_S1AP_reject = 0; static const long asn_VAL_262_S1AP_optional = 0; static const long asn_VAL_263_S1AP_id_GW_TransportLayerAddress = 155; static const long asn_VAL_263_S1AP_ignore = 1; static const long asn_VAL_263_S1AP_optional = 0; static const long asn_VAL_264_S1AP_id_RelayNode_Indicator = 160; static const long asn_VAL_264_S1AP_reject = 0; static const long asn_VAL_264_S1AP_optional = 0; static const long asn_VAL_265_S1AP_id_GUMMEIType = 170; static const long asn_VAL_265_S1AP_ignore = 1; static const long asn_VAL_265_S1AP_optional = 0; static const long asn_VAL_266_S1AP_id_Tunnel_Information_for_BBF = 176; static const long asn_VAL_266_S1AP_ignore = 1; static const long asn_VAL_266_S1AP_optional = 0; static const long asn_VAL_267_S1AP_id_SIPTO_L_GW_TransportLayerAddress = 184; static const long asn_VAL_267_S1AP_ignore = 1; static const long asn_VAL_267_S1AP_optional = 0; static const long asn_VAL_268_S1AP_id_LHN_ID = 186; static const long asn_VAL_268_S1AP_ignore = 1; static const long asn_VAL_268_S1AP_optional = 0; static const long asn_VAL_269_S1AP_id_MME_Group_ID = 223; static const long asn_VAL_269_S1AP_ignore = 1; static const long asn_VAL_269_S1AP_optional = 0; static const long asn_VAL_270_S1AP_id_UE_Usage_Type = 230; static const long asn_VAL_270_S1AP_ignore = 1; static const long asn_VAL_270_S1AP_optional = 0; static const long asn_VAL_271_S1AP_id_CE_mode_B_SupportIndicator = 242; static const long asn_VAL_271_S1AP_ignore = 1; static const long asn_VAL_271_S1AP_optional = 0; static const long asn_VAL_272_S1AP_id_DCN_ID = 246; static const long asn_VAL_272_S1AP_ignore = 1; static const long asn_VAL_272_S1AP_optional = 0; static const long asn_VAL_273_S1AP_id_Coverage_Level = 250; static const long asn_VAL_273_S1AP_ignore = 1; static const long asn_VAL_273_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_InitialUEMessage_IEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_254_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_254_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_254_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_255_S1AP_id_NAS_PDU }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_255_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_NAS_PDU }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_255_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_256_S1AP_id_TAI }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_256_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_TAI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_256_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_257_S1AP_id_EUTRAN_CGI }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_257_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_EUTRAN_CGI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_257_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_258_S1AP_id_RRC_Establishment_Cause }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_258_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_RRC_Establishment_Cause }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_258_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_259_S1AP_id_S_TMSI }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_259_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_S_TMSI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_259_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_260_S1AP_id_CSG_Id }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_260_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_CSG_Id }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_260_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_261_S1AP_id_GUMMEI_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_261_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_GUMMEI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_261_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_262_S1AP_id_CellAccessMode }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_262_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_CellAccessMode }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_262_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_263_S1AP_id_GW_TransportLayerAddress }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_263_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_TransportLayerAddress }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_263_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_264_S1AP_id_RelayNode_Indicator }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_264_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_RelayNode_Indicator }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_264_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_265_S1AP_id_GUMMEIType }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_265_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_GUMMEIType }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_265_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_266_S1AP_id_Tunnel_Information_for_BBF }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_266_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_TunnelInformation }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_266_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_267_S1AP_id_SIPTO_L_GW_TransportLayerAddress }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_267_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_TransportLayerAddress }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_267_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_268_S1AP_id_LHN_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_268_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_LHN_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_268_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_269_S1AP_id_MME_Group_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_269_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_Group_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_269_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_270_S1AP_id_UE_Usage_Type }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_270_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UE_Usage_Type }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_270_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_271_S1AP_id_CE_mode_B_SupportIndicator }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_271_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CE_mode_B_SupportIndicator }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_271_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_272_S1AP_id_DCN_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_272_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_DCN_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_272_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_273_S1AP_id_Coverage_Level }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_273_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Coverage_Level }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_273_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_InitialUEMessage_IEs_1[] = { { 20, 4, asn_IOS_S1AP_InitialUEMessage_IEs_1_rows } }; static const long asn_VAL_274_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_274_S1AP_reject = 0; static const long asn_VAL_274_S1AP_mandatory = 2; static const long asn_VAL_275_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_275_S1AP_reject = 0; static const long asn_VAL_275_S1AP_mandatory = 2; static const long asn_VAL_276_S1AP_id_NAS_PDU = 26; static const long asn_VAL_276_S1AP_reject = 0; static const long asn_VAL_276_S1AP_mandatory = 2; static const long asn_VAL_277_S1AP_id_EUTRAN_CGI = 100; static const long asn_VAL_277_S1AP_ignore = 1; static const long asn_VAL_277_S1AP_mandatory = 2; static const long asn_VAL_278_S1AP_id_TAI = 67; static const long asn_VAL_278_S1AP_ignore = 1; static const long asn_VAL_278_S1AP_mandatory = 2; static const long asn_VAL_279_S1AP_id_GW_TransportLayerAddress = 155; static const long asn_VAL_279_S1AP_ignore = 1; static const long asn_VAL_279_S1AP_optional = 0; static const long asn_VAL_280_S1AP_id_SIPTO_L_GW_TransportLayerAddress = 184; static const long asn_VAL_280_S1AP_ignore = 1; static const long asn_VAL_280_S1AP_optional = 0; static const long asn_VAL_281_S1AP_id_LHN_ID = 186; static const long asn_VAL_281_S1AP_ignore = 1; static const long asn_VAL_281_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_UplinkNASTransport_IEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_274_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_274_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_274_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_275_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_275_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_275_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_276_S1AP_id_NAS_PDU }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_276_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_NAS_PDU }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_276_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_277_S1AP_id_EUTRAN_CGI }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_277_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_EUTRAN_CGI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_277_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_278_S1AP_id_TAI }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_278_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_TAI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_278_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_279_S1AP_id_GW_TransportLayerAddress }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_279_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_TransportLayerAddress }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_279_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_280_S1AP_id_SIPTO_L_GW_TransportLayerAddress }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_280_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_TransportLayerAddress }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_280_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_281_S1AP_id_LHN_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_281_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_LHN_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_281_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_UplinkNASTransport_IEs_1[] = { { 8, 4, asn_IOS_S1AP_UplinkNASTransport_IEs_1_rows } }; static const long asn_VAL_282_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_282_S1AP_reject = 0; static const long asn_VAL_282_S1AP_mandatory = 2; static const long asn_VAL_283_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_283_S1AP_reject = 0; static const long asn_VAL_283_S1AP_mandatory = 2; static const long asn_VAL_284_S1AP_id_NAS_PDU = 26; static const long asn_VAL_284_S1AP_ignore = 1; static const long asn_VAL_284_S1AP_mandatory = 2; static const long asn_VAL_285_S1AP_id_Cause = 2; static const long asn_VAL_285_S1AP_ignore = 1; static const long asn_VAL_285_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_NASNonDeliveryIndication_IEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_282_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_282_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_282_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_283_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_283_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_283_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_284_S1AP_id_NAS_PDU }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_284_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_NAS_PDU }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_284_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_285_S1AP_id_Cause }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_285_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Cause }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_285_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_NASNonDeliveryIndication_IEs_1[] = { { 4, 4, asn_IOS_S1AP_NASNonDeliveryIndication_IEs_1_rows } }; static const long asn_VAL_286_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_286_S1AP_reject = 0; static const long asn_VAL_286_S1AP_mandatory = 2; static const long asn_VAL_287_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_287_S1AP_ignore = 1; static const long asn_VAL_287_S1AP_optional = 0; static const long asn_VAL_288_S1AP_id_S1_Message = 225; static const long asn_VAL_288_S1AP_reject = 0; static const long asn_VAL_288_S1AP_mandatory = 2; static const long asn_VAL_289_S1AP_id_MME_Group_ID = 223; static const long asn_VAL_289_S1AP_reject = 0; static const long asn_VAL_289_S1AP_mandatory = 2; static const long asn_VAL_290_S1AP_id_Additional_GUTI = 224; static const long asn_VAL_290_S1AP_ignore = 1; static const long asn_VAL_290_S1AP_optional = 0; static const long asn_VAL_291_S1AP_id_UE_Usage_Type = 230; static const long asn_VAL_291_S1AP_ignore = 1; static const long asn_VAL_291_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_RerouteNASRequest_IEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_286_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_286_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_286_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_287_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_287_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_287_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_288_S1AP_id_S1_Message }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_288_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_OCTET_STRING }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_288_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_289_S1AP_id_MME_Group_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_289_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_Group_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_289_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_290_S1AP_id_Additional_GUTI }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_290_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Additional_GUTI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_290_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_291_S1AP_id_UE_Usage_Type }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_291_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UE_Usage_Type }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_291_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_RerouteNASRequest_IEs_1[] = { { 6, 4, asn_IOS_S1AP_RerouteNASRequest_IEs_1_rows } }; static const long asn_VAL_292_S1AP_id_Cause = 2; static const long asn_VAL_292_S1AP_ignore = 1; static const long asn_VAL_292_S1AP_mandatory = 2; static const long asn_VAL_293_S1AP_id_ResetType = 92; static const long asn_VAL_293_S1AP_reject = 0; static const long asn_VAL_293_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_ResetIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_292_S1AP_id_Cause }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_292_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Cause }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_292_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_293_S1AP_id_ResetType }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_293_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ResetType }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_293_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_ResetIEs_1[] = { { 2, 4, asn_IOS_S1AP_ResetIEs_1_rows } }; static const long asn_VAL_295_S1AP_id_UE_associatedLogicalS1_ConnectionListResAck = 93; static const long asn_VAL_295_S1AP_ignore = 1; static const long asn_VAL_295_S1AP_optional = 0; static const long asn_VAL_296_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_296_S1AP_ignore = 1; static const long asn_VAL_296_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_ResetAcknowledgeIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_295_S1AP_id_UE_associatedLogicalS1_ConnectionListResAck }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_295_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionListResAck }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_295_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_296_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_296_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_296_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_ResetAcknowledgeIEs_1[] = { { 2, 4, asn_IOS_S1AP_ResetAcknowledgeIEs_1_rows } }; static const long asn_VAL_298_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_298_S1AP_ignore = 1; static const long asn_VAL_298_S1AP_optional = 0; static const long asn_VAL_299_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_299_S1AP_ignore = 1; static const long asn_VAL_299_S1AP_optional = 0; static const long asn_VAL_300_S1AP_id_Cause = 2; static const long asn_VAL_300_S1AP_ignore = 1; static const long asn_VAL_300_S1AP_optional = 0; static const long asn_VAL_301_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_301_S1AP_ignore = 1; static const long asn_VAL_301_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_ErrorIndicationIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_298_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_298_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_298_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_299_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_299_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_299_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_300_S1AP_id_Cause }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_300_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Cause }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_300_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_301_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_301_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_301_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_ErrorIndicationIEs_1[] = { { 4, 4, asn_IOS_S1AP_ErrorIndicationIEs_1_rows } }; static const long asn_VAL_302_S1AP_id_Global_ENB_ID = 59; static const long asn_VAL_302_S1AP_reject = 0; static const long asn_VAL_302_S1AP_mandatory = 2; static const long asn_VAL_303_S1AP_id_eNBname = 60; static const long asn_VAL_303_S1AP_ignore = 1; static const long asn_VAL_303_S1AP_optional = 0; static const long asn_VAL_304_S1AP_id_SupportedTAs = 64; static const long asn_VAL_304_S1AP_reject = 0; static const long asn_VAL_304_S1AP_mandatory = 2; static const long asn_VAL_305_S1AP_id_DefaultPagingDRX = 137; static const long asn_VAL_305_S1AP_ignore = 1; static const long asn_VAL_305_S1AP_mandatory = 2; static const long asn_VAL_306_S1AP_id_CSG_IdList = 128; static const long asn_VAL_306_S1AP_reject = 0; static const long asn_VAL_306_S1AP_optional = 0; static const long asn_VAL_307_S1AP_id_UE_RetentionInformation = 228; static const long asn_VAL_307_S1AP_ignore = 1; static const long asn_VAL_307_S1AP_optional = 0; static const long asn_VAL_308_S1AP_id_NB_IoT_DefaultPagingDRX = 234; static const long asn_VAL_308_S1AP_ignore = 1; static const long asn_VAL_308_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_S1SetupRequestIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_302_S1AP_id_Global_ENB_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_302_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_Global_ENB_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_302_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_303_S1AP_id_eNBname }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_303_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ENBname }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_303_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_304_S1AP_id_SupportedTAs }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_304_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_SupportedTAs }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_304_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_305_S1AP_id_DefaultPagingDRX }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_305_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_PagingDRX }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_305_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_306_S1AP_id_CSG_IdList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_306_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_CSG_IdList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_306_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_307_S1AP_id_UE_RetentionInformation }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_307_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UE_RetentionInformation }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_307_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_308_S1AP_id_NB_IoT_DefaultPagingDRX }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_308_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_NB_IoT_DefaultPagingDRX }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_308_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_S1SetupRequestIEs_1[] = { { 7, 4, asn_IOS_S1AP_S1SetupRequestIEs_1_rows } }; static const long asn_VAL_309_S1AP_id_MMEname = 61; static const long asn_VAL_309_S1AP_ignore = 1; static const long asn_VAL_309_S1AP_optional = 0; static const long asn_VAL_310_S1AP_id_ServedGUMMEIs = 105; static const long asn_VAL_310_S1AP_reject = 0; static const long asn_VAL_310_S1AP_mandatory = 2; static const long asn_VAL_311_S1AP_id_RelativeMMECapacity = 87; static const long asn_VAL_311_S1AP_ignore = 1; static const long asn_VAL_311_S1AP_mandatory = 2; static const long asn_VAL_312_S1AP_id_MMERelaySupportIndicator = 163; static const long asn_VAL_312_S1AP_ignore = 1; static const long asn_VAL_312_S1AP_optional = 0; static const long asn_VAL_313_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_313_S1AP_ignore = 1; static const long asn_VAL_313_S1AP_optional = 0; static const long asn_VAL_314_S1AP_id_UE_RetentionInformation = 228; static const long asn_VAL_314_S1AP_ignore = 1; static const long asn_VAL_314_S1AP_optional = 0; static const long asn_VAL_315_S1AP_id_ServedDCNs = 247; static const long asn_VAL_315_S1AP_ignore = 1; static const long asn_VAL_315_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_S1SetupResponseIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_309_S1AP_id_MMEname }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_309_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MMEname }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_309_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_310_S1AP_id_ServedGUMMEIs }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_310_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ServedGUMMEIs }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_310_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_311_S1AP_id_RelativeMMECapacity }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_311_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_RelativeMMECapacity }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_311_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_312_S1AP_id_MMERelaySupportIndicator }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_312_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MMERelaySupportIndicator }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_312_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_313_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_313_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_313_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_314_S1AP_id_UE_RetentionInformation }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_314_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UE_RetentionInformation }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_314_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_315_S1AP_id_ServedDCNs }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_315_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ServedDCNs }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_315_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_S1SetupResponseIEs_1[] = { { 7, 4, asn_IOS_S1AP_S1SetupResponseIEs_1_rows } }; static const long asn_VAL_316_S1AP_id_Cause = 2; static const long asn_VAL_316_S1AP_ignore = 1; static const long asn_VAL_316_S1AP_mandatory = 2; static const long asn_VAL_317_S1AP_id_TimeToWait = 65; static const long asn_VAL_317_S1AP_ignore = 1; static const long asn_VAL_317_S1AP_optional = 0; static const long asn_VAL_318_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_318_S1AP_ignore = 1; static const long asn_VAL_318_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_S1SetupFailureIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_316_S1AP_id_Cause }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_316_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Cause }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_316_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_317_S1AP_id_TimeToWait }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_317_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_TimeToWait }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_317_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_318_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_318_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_318_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_S1SetupFailureIEs_1[] = { { 3, 4, asn_IOS_S1AP_S1SetupFailureIEs_1_rows } }; static const long asn_VAL_319_S1AP_id_eNBname = 60; static const long asn_VAL_319_S1AP_ignore = 1; static const long asn_VAL_319_S1AP_optional = 0; static const long asn_VAL_320_S1AP_id_SupportedTAs = 64; static const long asn_VAL_320_S1AP_reject = 0; static const long asn_VAL_320_S1AP_optional = 0; static const long asn_VAL_321_S1AP_id_CSG_IdList = 128; static const long asn_VAL_321_S1AP_reject = 0; static const long asn_VAL_321_S1AP_optional = 0; static const long asn_VAL_322_S1AP_id_DefaultPagingDRX = 137; static const long asn_VAL_322_S1AP_ignore = 1; static const long asn_VAL_322_S1AP_optional = 0; static const long asn_VAL_323_S1AP_id_NB_IoT_DefaultPagingDRX = 234; static const long asn_VAL_323_S1AP_ignore = 1; static const long asn_VAL_323_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_ENBConfigurationUpdateIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_319_S1AP_id_eNBname }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_319_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ENBname }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_319_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_320_S1AP_id_SupportedTAs }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_320_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_SupportedTAs }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_320_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_321_S1AP_id_CSG_IdList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_321_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_CSG_IdList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_321_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_322_S1AP_id_DefaultPagingDRX }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_322_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_PagingDRX }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_322_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_323_S1AP_id_NB_IoT_DefaultPagingDRX }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_323_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_NB_IoT_DefaultPagingDRX }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_323_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_ENBConfigurationUpdateIEs_1[] = { { 5, 4, asn_IOS_S1AP_ENBConfigurationUpdateIEs_1_rows } }; static const long asn_VAL_324_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_324_S1AP_ignore = 1; static const long asn_VAL_324_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_ENBConfigurationUpdateAcknowledgeIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_324_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_324_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_324_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_ENBConfigurationUpdateAcknowledgeIEs_1[] = { { 1, 4, asn_IOS_S1AP_ENBConfigurationUpdateAcknowledgeIEs_1_rows } }; static const long asn_VAL_325_S1AP_id_Cause = 2; static const long asn_VAL_325_S1AP_ignore = 1; static const long asn_VAL_325_S1AP_mandatory = 2; static const long asn_VAL_326_S1AP_id_TimeToWait = 65; static const long asn_VAL_326_S1AP_ignore = 1; static const long asn_VAL_326_S1AP_optional = 0; static const long asn_VAL_327_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_327_S1AP_ignore = 1; static const long asn_VAL_327_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_ENBConfigurationUpdateFailureIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_325_S1AP_id_Cause }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_325_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Cause }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_325_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_326_S1AP_id_TimeToWait }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_326_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_TimeToWait }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_326_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_327_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_327_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_327_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_ENBConfigurationUpdateFailureIEs_1[] = { { 3, 4, asn_IOS_S1AP_ENBConfigurationUpdateFailureIEs_1_rows } }; static const long asn_VAL_328_S1AP_id_MMEname = 61; static const long asn_VAL_328_S1AP_ignore = 1; static const long asn_VAL_328_S1AP_optional = 0; static const long asn_VAL_329_S1AP_id_ServedGUMMEIs = 105; static const long asn_VAL_329_S1AP_reject = 0; static const long asn_VAL_329_S1AP_optional = 0; static const long asn_VAL_330_S1AP_id_RelativeMMECapacity = 87; static const long asn_VAL_330_S1AP_reject = 0; static const long asn_VAL_330_S1AP_optional = 0; static const long asn_VAL_331_S1AP_id_ServedDCNs = 247; static const long asn_VAL_331_S1AP_ignore = 1; static const long asn_VAL_331_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_MMEConfigurationUpdateIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_328_S1AP_id_MMEname }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_328_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MMEname }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_328_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_329_S1AP_id_ServedGUMMEIs }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_329_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ServedGUMMEIs }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_329_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_330_S1AP_id_RelativeMMECapacity }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_330_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_RelativeMMECapacity }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_330_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_331_S1AP_id_ServedDCNs }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_331_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ServedDCNs }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_331_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_MMEConfigurationUpdateIEs_1[] = { { 4, 4, asn_IOS_S1AP_MMEConfigurationUpdateIEs_1_rows } }; static const long asn_VAL_332_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_332_S1AP_ignore = 1; static const long asn_VAL_332_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_MMEConfigurationUpdateAcknowledgeIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_332_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_332_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_332_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_MMEConfigurationUpdateAcknowledgeIEs_1[] = { { 1, 4, asn_IOS_S1AP_MMEConfigurationUpdateAcknowledgeIEs_1_rows } }; static const long asn_VAL_333_S1AP_id_Cause = 2; static const long asn_VAL_333_S1AP_ignore = 1; static const long asn_VAL_333_S1AP_mandatory = 2; static const long asn_VAL_334_S1AP_id_TimeToWait = 65; static const long asn_VAL_334_S1AP_ignore = 1; static const long asn_VAL_334_S1AP_optional = 0; static const long asn_VAL_335_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_335_S1AP_ignore = 1; static const long asn_VAL_335_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_MMEConfigurationUpdateFailureIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_333_S1AP_id_Cause }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_333_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Cause }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_333_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_334_S1AP_id_TimeToWait }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_334_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_TimeToWait }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_334_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_335_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_335_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_335_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_MMEConfigurationUpdateFailureIEs_1[] = { { 3, 4, asn_IOS_S1AP_MMEConfigurationUpdateFailureIEs_1_rows } }; static const long asn_VAL_336_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_336_S1AP_reject = 0; static const long asn_VAL_336_S1AP_mandatory = 2; static const long asn_VAL_337_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_337_S1AP_reject = 0; static const long asn_VAL_337_S1AP_mandatory = 2; static const long asn_VAL_338_S1AP_id_E_RABSubjecttoDataForwardingList = 12; static const long asn_VAL_338_S1AP_ignore = 1; static const long asn_VAL_338_S1AP_optional = 0; static const long asn_VAL_339_S1AP_id_cdma2000HOStatus = 83; static const long asn_VAL_339_S1AP_ignore = 1; static const long asn_VAL_339_S1AP_optional = 0; static const long asn_VAL_340_S1AP_id_cdma2000RATType = 71; static const long asn_VAL_340_S1AP_reject = 0; static const long asn_VAL_340_S1AP_mandatory = 2; static const long asn_VAL_341_S1AP_id_cdma2000PDU = 70; static const long asn_VAL_341_S1AP_reject = 0; static const long asn_VAL_341_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_DownlinkS1cdma2000tunnellingIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_336_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_336_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_336_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_337_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_337_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_337_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_338_S1AP_id_E_RABSubjecttoDataForwardingList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_338_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABSubjecttoDataForwardingList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_338_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_339_S1AP_id_cdma2000HOStatus }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_339_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Cdma2000HOStatus }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_339_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_340_S1AP_id_cdma2000RATType }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_340_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_Cdma2000RATType }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_340_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_341_S1AP_id_cdma2000PDU }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_341_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_Cdma2000PDU }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_341_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_DownlinkS1cdma2000tunnellingIEs_1[] = { { 6, 4, asn_IOS_S1AP_DownlinkS1cdma2000tunnellingIEs_1_rows } }; static const long asn_VAL_342_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_342_S1AP_reject = 0; static const long asn_VAL_342_S1AP_mandatory = 2; static const long asn_VAL_343_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_343_S1AP_reject = 0; static const long asn_VAL_343_S1AP_mandatory = 2; static const long asn_VAL_344_S1AP_id_cdma2000RATType = 71; static const long asn_VAL_344_S1AP_reject = 0; static const long asn_VAL_344_S1AP_mandatory = 2; static const long asn_VAL_345_S1AP_id_cdma2000SectorID = 72; static const long asn_VAL_345_S1AP_reject = 0; static const long asn_VAL_345_S1AP_mandatory = 2; static const long asn_VAL_346_S1AP_id_cdma2000HORequiredIndication = 84; static const long asn_VAL_346_S1AP_ignore = 1; static const long asn_VAL_346_S1AP_optional = 0; static const long asn_VAL_347_S1AP_id_cdma2000OneXSRVCCInfo = 102; static const long asn_VAL_347_S1AP_reject = 0; static const long asn_VAL_347_S1AP_optional = 0; static const long asn_VAL_348_S1AP_id_cdma2000OneXRAND = 97; static const long asn_VAL_348_S1AP_reject = 0; static const long asn_VAL_348_S1AP_optional = 0; static const long asn_VAL_349_S1AP_id_cdma2000PDU = 70; static const long asn_VAL_349_S1AP_reject = 0; static const long asn_VAL_349_S1AP_mandatory = 2; static const long asn_VAL_350_S1AP_id_EUTRANRoundTripDelayEstimationInfo = 140; static const long asn_VAL_350_S1AP_ignore = 1; static const long asn_VAL_350_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_UplinkS1cdma2000tunnellingIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_342_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_342_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_342_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_343_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_343_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_343_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_344_S1AP_id_cdma2000RATType }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_344_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_Cdma2000RATType }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_344_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_345_S1AP_id_cdma2000SectorID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_345_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_Cdma2000SectorID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_345_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_346_S1AP_id_cdma2000HORequiredIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_346_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Cdma2000HORequiredIndication }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_346_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_347_S1AP_id_cdma2000OneXSRVCCInfo }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_347_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_Cdma2000OneXSRVCCInfo }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_347_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_348_S1AP_id_cdma2000OneXRAND }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_348_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_Cdma2000OneXRAND }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_348_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_349_S1AP_id_cdma2000PDU }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_349_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_Cdma2000PDU }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_349_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_350_S1AP_id_EUTRANRoundTripDelayEstimationInfo }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_350_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_EUTRANRoundTripDelayEstimationInfo }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_350_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_UplinkS1cdma2000tunnellingIEs_1[] = { { 9, 4, asn_IOS_S1AP_UplinkS1cdma2000tunnellingIEs_1_rows } }; static const long asn_VAL_351_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_351_S1AP_reject = 0; static const long asn_VAL_351_S1AP_mandatory = 2; static const long asn_VAL_352_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_352_S1AP_reject = 0; static const long asn_VAL_352_S1AP_mandatory = 2; static const long asn_VAL_353_S1AP_id_UERadioCapability = 74; static const long asn_VAL_353_S1AP_ignore = 1; static const long asn_VAL_353_S1AP_mandatory = 2; static const long asn_VAL_354_S1AP_id_UERadioCapabilityForPaging = 198; static const long asn_VAL_354_S1AP_ignore = 1; static const long asn_VAL_354_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_UECapabilityInfoIndicationIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_351_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_351_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_351_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_352_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_352_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_352_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_353_S1AP_id_UERadioCapability }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_353_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UERadioCapability }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_353_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_354_S1AP_id_UERadioCapabilityForPaging }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_354_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UERadioCapabilityForPaging }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_354_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_UECapabilityInfoIndicationIEs_1[] = { { 4, 4, asn_IOS_S1AP_UECapabilityInfoIndicationIEs_1_rows } }; static const long asn_VAL_355_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_355_S1AP_reject = 0; static const long asn_VAL_355_S1AP_mandatory = 2; static const long asn_VAL_356_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_356_S1AP_reject = 0; static const long asn_VAL_356_S1AP_mandatory = 2; static const long asn_VAL_357_S1AP_id_eNB_StatusTransfer_TransparentContainer = 90; static const long asn_VAL_357_S1AP_reject = 0; static const long asn_VAL_357_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_ENBStatusTransferIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_355_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_355_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_355_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_356_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_356_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_356_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_357_S1AP_id_eNB_StatusTransfer_TransparentContainer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_357_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_357_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_ENBStatusTransferIEs_1[] = { { 3, 4, asn_IOS_S1AP_ENBStatusTransferIEs_1_rows } }; static const long asn_VAL_358_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_358_S1AP_reject = 0; static const long asn_VAL_358_S1AP_mandatory = 2; static const long asn_VAL_359_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_359_S1AP_reject = 0; static const long asn_VAL_359_S1AP_mandatory = 2; static const long asn_VAL_360_S1AP_id_eNB_StatusTransfer_TransparentContainer = 90; static const long asn_VAL_360_S1AP_reject = 0; static const long asn_VAL_360_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_MMEStatusTransferIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_358_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_358_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_358_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_359_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_359_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_359_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_360_S1AP_id_eNB_StatusTransfer_TransparentContainer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_360_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_360_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_MMEStatusTransferIEs_1[] = { { 3, 4, asn_IOS_S1AP_MMEStatusTransferIEs_1_rows } }; static const long asn_VAL_361_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_361_S1AP_reject = 0; static const long asn_VAL_361_S1AP_mandatory = 2; static const long asn_VAL_362_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_362_S1AP_reject = 0; static const long asn_VAL_362_S1AP_mandatory = 2; static const long asn_VAL_363_S1AP_id_TraceActivation = 25; static const long asn_VAL_363_S1AP_ignore = 1; static const long asn_VAL_363_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_TraceStartIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_361_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_361_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_361_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_362_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_362_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_362_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_363_S1AP_id_TraceActivation }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_363_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_TraceActivation }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_363_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_TraceStartIEs_1[] = { { 3, 4, asn_IOS_S1AP_TraceStartIEs_1_rows } }; static const long asn_VAL_364_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_364_S1AP_reject = 0; static const long asn_VAL_364_S1AP_mandatory = 2; static const long asn_VAL_365_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_365_S1AP_reject = 0; static const long asn_VAL_365_S1AP_mandatory = 2; static const long asn_VAL_366_S1AP_id_E_UTRAN_Trace_ID = 86; static const long asn_VAL_366_S1AP_ignore = 1; static const long asn_VAL_366_S1AP_mandatory = 2; static const long asn_VAL_367_S1AP_id_Cause = 2; static const long asn_VAL_367_S1AP_ignore = 1; static const long asn_VAL_367_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_TraceFailureIndicationIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_364_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_364_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_364_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_365_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_365_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_365_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_366_S1AP_id_E_UTRAN_Trace_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_366_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_UTRAN_Trace_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_366_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_367_S1AP_id_Cause }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_367_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Cause }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_367_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_TraceFailureIndicationIEs_1[] = { { 4, 4, asn_IOS_S1AP_TraceFailureIndicationIEs_1_rows } }; static const long asn_VAL_368_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_368_S1AP_reject = 0; static const long asn_VAL_368_S1AP_mandatory = 2; static const long asn_VAL_369_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_369_S1AP_reject = 0; static const long asn_VAL_369_S1AP_mandatory = 2; static const long asn_VAL_370_S1AP_id_E_UTRAN_Trace_ID = 86; static const long asn_VAL_370_S1AP_ignore = 1; static const long asn_VAL_370_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_DeactivateTraceIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_368_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_368_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_368_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_369_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_369_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_369_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_370_S1AP_id_E_UTRAN_Trace_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_370_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_UTRAN_Trace_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_370_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_DeactivateTraceIEs_1[] = { { 3, 4, asn_IOS_S1AP_DeactivateTraceIEs_1_rows } }; static const long asn_VAL_371_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_371_S1AP_reject = 0; static const long asn_VAL_371_S1AP_mandatory = 2; static const long asn_VAL_372_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_372_S1AP_reject = 0; static const long asn_VAL_372_S1AP_mandatory = 2; static const long asn_VAL_373_S1AP_id_E_UTRAN_Trace_ID = 86; static const long asn_VAL_373_S1AP_ignore = 1; static const long asn_VAL_373_S1AP_mandatory = 2; static const long asn_VAL_374_S1AP_id_EUTRAN_CGI = 100; static const long asn_VAL_374_S1AP_ignore = 1; static const long asn_VAL_374_S1AP_mandatory = 2; static const long asn_VAL_375_S1AP_id_TraceCollectionEntityIPAddress = 131; static const long asn_VAL_375_S1AP_ignore = 1; static const long asn_VAL_375_S1AP_mandatory = 2; static const long asn_VAL_376_S1AP_id_PrivacyIndicator = 166; static const long asn_VAL_376_S1AP_ignore = 1; static const long asn_VAL_376_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_CellTrafficTraceIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_371_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_371_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_371_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_372_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_372_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_372_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_373_S1AP_id_E_UTRAN_Trace_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_373_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_UTRAN_Trace_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_373_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_374_S1AP_id_EUTRAN_CGI }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_374_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_EUTRAN_CGI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_374_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_375_S1AP_id_TraceCollectionEntityIPAddress }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_375_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_TransportLayerAddress }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_375_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_376_S1AP_id_PrivacyIndicator }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_376_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_PrivacyIndicator }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_376_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_CellTrafficTraceIEs_1[] = { { 6, 4, asn_IOS_S1AP_CellTrafficTraceIEs_1_rows } }; static const long asn_VAL_377_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_377_S1AP_reject = 0; static const long asn_VAL_377_S1AP_mandatory = 2; static const long asn_VAL_378_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_378_S1AP_reject = 0; static const long asn_VAL_378_S1AP_mandatory = 2; static const long asn_VAL_379_S1AP_id_RequestType = 98; static const long asn_VAL_379_S1AP_ignore = 1; static const long asn_VAL_379_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_LocationReportingControlIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_377_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_377_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_377_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_378_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_378_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_378_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_379_S1AP_id_RequestType }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_379_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_RequestType }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_379_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_LocationReportingControlIEs_1[] = { { 3, 4, asn_IOS_S1AP_LocationReportingControlIEs_1_rows } }; static const long asn_VAL_380_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_380_S1AP_reject = 0; static const long asn_VAL_380_S1AP_mandatory = 2; static const long asn_VAL_381_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_381_S1AP_reject = 0; static const long asn_VAL_381_S1AP_mandatory = 2; static const long asn_VAL_382_S1AP_id_Cause = 2; static const long asn_VAL_382_S1AP_ignore = 1; static const long asn_VAL_382_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_LocationReportingFailureIndicationIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_380_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_380_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_380_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_381_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_381_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_381_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_382_S1AP_id_Cause }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_382_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Cause }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_382_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_LocationReportingFailureIndicationIEs_1[] = { { 3, 4, asn_IOS_S1AP_LocationReportingFailureIndicationIEs_1_rows } }; static const long asn_VAL_383_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_383_S1AP_reject = 0; static const long asn_VAL_383_S1AP_mandatory = 2; static const long asn_VAL_384_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_384_S1AP_reject = 0; static const long asn_VAL_384_S1AP_mandatory = 2; static const long asn_VAL_385_S1AP_id_EUTRAN_CGI = 100; static const long asn_VAL_385_S1AP_ignore = 1; static const long asn_VAL_385_S1AP_mandatory = 2; static const long asn_VAL_386_S1AP_id_TAI = 67; static const long asn_VAL_386_S1AP_ignore = 1; static const long asn_VAL_386_S1AP_mandatory = 2; static const long asn_VAL_387_S1AP_id_RequestType = 98; static const long asn_VAL_387_S1AP_ignore = 1; static const long asn_VAL_387_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_LocationReportIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_383_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_383_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_383_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_384_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_384_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_384_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_385_S1AP_id_EUTRAN_CGI }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_385_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_EUTRAN_CGI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_385_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_386_S1AP_id_TAI }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_386_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_TAI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_386_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_387_S1AP_id_RequestType }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_387_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_RequestType }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_387_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_LocationReportIEs_1[] = { { 5, 4, asn_IOS_S1AP_LocationReportIEs_1_rows } }; static const long asn_VAL_388_S1AP_id_OverloadResponse = 101; static const long asn_VAL_388_S1AP_reject = 0; static const long asn_VAL_388_S1AP_mandatory = 2; static const long asn_VAL_389_S1AP_id_GUMMEIList = 154; static const long asn_VAL_389_S1AP_ignore = 1; static const long asn_VAL_389_S1AP_optional = 0; static const long asn_VAL_390_S1AP_id_TrafficLoadReductionIndication = 161; static const long asn_VAL_390_S1AP_ignore = 1; static const long asn_VAL_390_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_OverloadStartIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_388_S1AP_id_OverloadResponse }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_388_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_OverloadResponse }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_388_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_389_S1AP_id_GUMMEIList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_389_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_GUMMEIList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_389_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_390_S1AP_id_TrafficLoadReductionIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_390_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_TrafficLoadReductionIndication }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_390_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_OverloadStartIEs_1[] = { { 3, 4, asn_IOS_S1AP_OverloadStartIEs_1_rows } }; static const long asn_VAL_391_S1AP_id_GUMMEIList = 154; static const long asn_VAL_391_S1AP_ignore = 1; static const long asn_VAL_391_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_OverloadStopIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_391_S1AP_id_GUMMEIList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_391_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_GUMMEIList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_391_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_OverloadStopIEs_1[] = { { 1, 4, asn_IOS_S1AP_OverloadStopIEs_1_rows } }; static const long asn_VAL_392_S1AP_id_MessageIdentifier = 111; static const long asn_VAL_392_S1AP_reject = 0; static const long asn_VAL_392_S1AP_mandatory = 2; static const long asn_VAL_393_S1AP_id_SerialNumber = 112; static const long asn_VAL_393_S1AP_reject = 0; static const long asn_VAL_393_S1AP_mandatory = 2; static const long asn_VAL_394_S1AP_id_WarningAreaList = 113; static const long asn_VAL_394_S1AP_ignore = 1; static const long asn_VAL_394_S1AP_optional = 0; static const long asn_VAL_395_S1AP_id_RepetitionPeriod = 114; static const long asn_VAL_395_S1AP_reject = 0; static const long asn_VAL_395_S1AP_mandatory = 2; static const long asn_VAL_396_S1AP_id_ExtendedRepetitionPeriod = 144; static const long asn_VAL_396_S1AP_reject = 0; static const long asn_VAL_396_S1AP_optional = 0; static const long asn_VAL_397_S1AP_id_NumberofBroadcastRequest = 115; static const long asn_VAL_397_S1AP_reject = 0; static const long asn_VAL_397_S1AP_mandatory = 2; static const long asn_VAL_398_S1AP_id_WarningType = 116; static const long asn_VAL_398_S1AP_ignore = 1; static const long asn_VAL_398_S1AP_optional = 0; static const long asn_VAL_399_S1AP_id_WarningSecurityInfo = 117; static const long asn_VAL_399_S1AP_ignore = 1; static const long asn_VAL_399_S1AP_optional = 0; static const long asn_VAL_400_S1AP_id_DataCodingScheme = 118; static const long asn_VAL_400_S1AP_ignore = 1; static const long asn_VAL_400_S1AP_optional = 0; static const long asn_VAL_401_S1AP_id_WarningMessageContents = 119; static const long asn_VAL_401_S1AP_ignore = 1; static const long asn_VAL_401_S1AP_optional = 0; static const long asn_VAL_402_S1AP_id_ConcurrentWarningMessageIndicator = 142; static const long asn_VAL_402_S1AP_reject = 0; static const long asn_VAL_402_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_WriteReplaceWarningRequestIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_392_S1AP_id_MessageIdentifier }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_392_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MessageIdentifier }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_392_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_393_S1AP_id_SerialNumber }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_393_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_SerialNumber }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_393_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_394_S1AP_id_WarningAreaList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_394_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_WarningAreaList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_394_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_395_S1AP_id_RepetitionPeriod }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_395_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_RepetitionPeriod }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_395_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_396_S1AP_id_ExtendedRepetitionPeriod }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_396_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ExtendedRepetitionPeriod }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_396_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_397_S1AP_id_NumberofBroadcastRequest }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_397_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_NumberofBroadcastRequest }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_397_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_398_S1AP_id_WarningType }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_398_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_WarningType }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_398_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_399_S1AP_id_WarningSecurityInfo }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_399_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_WarningSecurityInfo }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_399_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_400_S1AP_id_DataCodingScheme }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_400_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_DataCodingScheme }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_400_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_401_S1AP_id_WarningMessageContents }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_401_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_WarningMessageContents }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_401_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_402_S1AP_id_ConcurrentWarningMessageIndicator }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_402_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ConcurrentWarningMessageIndicator }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_402_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_WriteReplaceWarningRequestIEs_1[] = { { 11, 4, asn_IOS_S1AP_WriteReplaceWarningRequestIEs_1_rows } }; static const long asn_VAL_403_S1AP_id_MessageIdentifier = 111; static const long asn_VAL_403_S1AP_reject = 0; static const long asn_VAL_403_S1AP_mandatory = 2; static const long asn_VAL_404_S1AP_id_SerialNumber = 112; static const long asn_VAL_404_S1AP_reject = 0; static const long asn_VAL_404_S1AP_mandatory = 2; static const long asn_VAL_405_S1AP_id_BroadcastCompletedAreaList = 120; static const long asn_VAL_405_S1AP_ignore = 1; static const long asn_VAL_405_S1AP_optional = 0; static const long asn_VAL_406_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_406_S1AP_ignore = 1; static const long asn_VAL_406_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_WriteReplaceWarningResponseIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_403_S1AP_id_MessageIdentifier }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_403_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MessageIdentifier }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_403_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_404_S1AP_id_SerialNumber }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_404_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_SerialNumber }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_404_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_405_S1AP_id_BroadcastCompletedAreaList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_405_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_BroadcastCompletedAreaList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_405_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_406_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_406_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_406_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_WriteReplaceWarningResponseIEs_1[] = { { 4, 4, asn_IOS_S1AP_WriteReplaceWarningResponseIEs_1_rows } }; static const long asn_VAL_407_S1AP_id_Inter_SystemInformationTransferTypeEDT = 121; static const long asn_VAL_407_S1AP_reject = 0; static const long asn_VAL_407_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_ENBDirectInformationTransferIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_407_S1AP_id_Inter_SystemInformationTransferTypeEDT }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_407_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_Inter_SystemInformationTransferType }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_407_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_ENBDirectInformationTransferIEs_1[] = { { 1, 4, asn_IOS_S1AP_ENBDirectInformationTransferIEs_1_rows } }; static const long asn_VAL_408_S1AP_id_Inter_SystemInformationTransferTypeMDT = 122; static const long asn_VAL_408_S1AP_reject = 0; static const long asn_VAL_408_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_MMEDirectInformationTransferIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_408_S1AP_id_Inter_SystemInformationTransferTypeMDT }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_408_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_Inter_SystemInformationTransferType }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_408_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_MMEDirectInformationTransferIEs_1[] = { { 1, 4, asn_IOS_S1AP_MMEDirectInformationTransferIEs_1_rows } }; static const long asn_VAL_409_S1AP_id_SONConfigurationTransferECT = 129; static const long asn_VAL_409_S1AP_ignore = 1; static const long asn_VAL_409_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_ENBConfigurationTransferIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_409_S1AP_id_SONConfigurationTransferECT }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_409_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_SONConfigurationTransfer }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_409_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_ENBConfigurationTransferIEs_1[] = { { 1, 4, asn_IOS_S1AP_ENBConfigurationTransferIEs_1_rows } }; static const long asn_VAL_410_S1AP_id_SONConfigurationTransferMCT = 130; static const long asn_VAL_410_S1AP_ignore = 1; static const long asn_VAL_410_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_MMEConfigurationTransferIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_410_S1AP_id_SONConfigurationTransferMCT }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_410_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_SONConfigurationTransfer }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_410_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_MMEConfigurationTransferIEs_1[] = { { 1, 4, asn_IOS_S1AP_MMEConfigurationTransferIEs_1_rows } }; static const long asn_VAL_411_S1AP_id_MessageIdentifier = 111; static const long asn_VAL_411_S1AP_reject = 0; static const long asn_VAL_411_S1AP_mandatory = 2; static const long asn_VAL_412_S1AP_id_SerialNumber = 112; static const long asn_VAL_412_S1AP_reject = 0; static const long asn_VAL_412_S1AP_mandatory = 2; static const long asn_VAL_413_S1AP_id_WarningAreaList = 113; static const long asn_VAL_413_S1AP_ignore = 1; static const long asn_VAL_413_S1AP_optional = 0; static const long asn_VAL_414_S1AP_id_KillAllWarningMessages = 191; static const long asn_VAL_414_S1AP_reject = 0; static const long asn_VAL_414_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_KillRequestIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_411_S1AP_id_MessageIdentifier }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_411_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MessageIdentifier }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_411_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_412_S1AP_id_SerialNumber }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_412_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_SerialNumber }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_412_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_413_S1AP_id_WarningAreaList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_413_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_WarningAreaList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_413_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_414_S1AP_id_KillAllWarningMessages }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_414_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_KillAllWarningMessages }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_414_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_KillRequestIEs_1[] = { { 4, 4, asn_IOS_S1AP_KillRequestIEs_1_rows } }; static const long asn_VAL_415_S1AP_id_MessageIdentifier = 111; static const long asn_VAL_415_S1AP_reject = 0; static const long asn_VAL_415_S1AP_mandatory = 2; static const long asn_VAL_416_S1AP_id_SerialNumber = 112; static const long asn_VAL_416_S1AP_reject = 0; static const long asn_VAL_416_S1AP_mandatory = 2; static const long asn_VAL_417_S1AP_id_BroadcastCancelledAreaList = 141; static const long asn_VAL_417_S1AP_ignore = 1; static const long asn_VAL_417_S1AP_optional = 0; static const long asn_VAL_418_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_418_S1AP_ignore = 1; static const long asn_VAL_418_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_KillResponseIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_415_S1AP_id_MessageIdentifier }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_415_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MessageIdentifier }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_415_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_416_S1AP_id_SerialNumber }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_416_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_SerialNumber }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_416_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_417_S1AP_id_BroadcastCancelledAreaList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_417_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_BroadcastCancelledAreaList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_417_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_418_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_418_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_418_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_KillResponseIEs_1[] = { { 4, 4, asn_IOS_S1AP_KillResponseIEs_1_rows } }; static const long asn_VAL_419_S1AP_id_ECGIListForRestart = 182; static const long asn_VAL_419_S1AP_reject = 0; static const long asn_VAL_419_S1AP_mandatory = 2; static const long asn_VAL_420_S1AP_id_Global_ENB_ID = 59; static const long asn_VAL_420_S1AP_reject = 0; static const long asn_VAL_420_S1AP_mandatory = 2; static const long asn_VAL_421_S1AP_id_TAIListForRestart = 188; static const long asn_VAL_421_S1AP_reject = 0; static const long asn_VAL_421_S1AP_mandatory = 2; static const long asn_VAL_422_S1AP_id_EmergencyAreaIDListForRestart = 190; static const long asn_VAL_422_S1AP_reject = 0; static const long asn_VAL_422_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_PWSRestartIndicationIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_419_S1AP_id_ECGIListForRestart }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_419_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ECGIListForRestart }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_419_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_420_S1AP_id_Global_ENB_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_420_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_Global_ENB_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_420_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_421_S1AP_id_TAIListForRestart }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_421_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_TAIListForRestart }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_421_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_422_S1AP_id_EmergencyAreaIDListForRestart }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_422_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_EmergencyAreaIDListForRestart }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_422_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_PWSRestartIndicationIEs_1[] = { { 4, 4, asn_IOS_S1AP_PWSRestartIndicationIEs_1_rows } }; static const long asn_VAL_423_S1AP_id_PWSfailedECGIList = 222; static const long asn_VAL_423_S1AP_reject = 0; static const long asn_VAL_423_S1AP_mandatory = 2; static const long asn_VAL_424_S1AP_id_Global_ENB_ID = 59; static const long asn_VAL_424_S1AP_reject = 0; static const long asn_VAL_424_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_PWSFailureIndicationIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_423_S1AP_id_PWSfailedECGIList }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_423_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_PWSfailedECGIList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_423_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_424_S1AP_id_Global_ENB_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_424_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_Global_ENB_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_424_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_PWSFailureIndicationIEs_1[] = { { 2, 4, asn_IOS_S1AP_PWSFailureIndicationIEs_1_rows } }; static const long asn_VAL_425_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_425_S1AP_reject = 0; static const long asn_VAL_425_S1AP_mandatory = 2; static const long asn_VAL_426_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_426_S1AP_reject = 0; static const long asn_VAL_426_S1AP_mandatory = 2; static const long asn_VAL_427_S1AP_id_Routing_ID = 148; static const long asn_VAL_427_S1AP_reject = 0; static const long asn_VAL_427_S1AP_mandatory = 2; static const long asn_VAL_428_S1AP_id_LPPa_PDU = 147; static const long asn_VAL_428_S1AP_reject = 0; static const long asn_VAL_428_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_DownlinkUEAssociatedLPPaTransport_IEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_425_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_425_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_425_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_426_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_426_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_426_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_427_S1AP_id_Routing_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_427_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_Routing_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_427_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_428_S1AP_id_LPPa_PDU }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_428_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_LPPa_PDU }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_428_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_DownlinkUEAssociatedLPPaTransport_IEs_1[] = { { 4, 4, asn_IOS_S1AP_DownlinkUEAssociatedLPPaTransport_IEs_1_rows } }; static const long asn_VAL_429_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_429_S1AP_reject = 0; static const long asn_VAL_429_S1AP_mandatory = 2; static const long asn_VAL_430_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_430_S1AP_reject = 0; static const long asn_VAL_430_S1AP_mandatory = 2; static const long asn_VAL_431_S1AP_id_Routing_ID = 148; static const long asn_VAL_431_S1AP_reject = 0; static const long asn_VAL_431_S1AP_mandatory = 2; static const long asn_VAL_432_S1AP_id_LPPa_PDU = 147; static const long asn_VAL_432_S1AP_reject = 0; static const long asn_VAL_432_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_UplinkUEAssociatedLPPaTransport_IEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_429_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_429_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_429_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_430_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_430_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_430_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_431_S1AP_id_Routing_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_431_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_Routing_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_431_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_432_S1AP_id_LPPa_PDU }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_432_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_LPPa_PDU }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_432_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_UplinkUEAssociatedLPPaTransport_IEs_1[] = { { 4, 4, asn_IOS_S1AP_UplinkUEAssociatedLPPaTransport_IEs_1_rows } }; static const long asn_VAL_433_S1AP_id_Routing_ID = 148; static const long asn_VAL_433_S1AP_reject = 0; static const long asn_VAL_433_S1AP_mandatory = 2; static const long asn_VAL_434_S1AP_id_LPPa_PDU = 147; static const long asn_VAL_434_S1AP_reject = 0; static const long asn_VAL_434_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_433_S1AP_id_Routing_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_433_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_Routing_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_433_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_434_S1AP_id_LPPa_PDU }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_434_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_LPPa_PDU }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_434_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs_1[] = { { 2, 4, asn_IOS_S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs_1_rows } }; static const long asn_VAL_435_S1AP_id_Routing_ID = 148; static const long asn_VAL_435_S1AP_reject = 0; static const long asn_VAL_435_S1AP_mandatory = 2; static const long asn_VAL_436_S1AP_id_LPPa_PDU = 147; static const long asn_VAL_436_S1AP_reject = 0; static const long asn_VAL_436_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_UplinkNonUEAssociatedLPPaTransport_IEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_435_S1AP_id_Routing_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_435_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_Routing_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_435_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_436_S1AP_id_LPPa_PDU }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_436_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_LPPa_PDU }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_436_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_UplinkNonUEAssociatedLPPaTransport_IEs_1[] = { { 2, 4, asn_IOS_S1AP_UplinkNonUEAssociatedLPPaTransport_IEs_1_rows } }; static const long asn_VAL_437_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_437_S1AP_reject = 0; static const long asn_VAL_437_S1AP_mandatory = 2; static const long asn_VAL_438_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_438_S1AP_reject = 0; static const long asn_VAL_438_S1AP_mandatory = 2; static const long asn_VAL_439_S1AP_id_E_RABToBeModifiedListBearerModInd = 199; static const long asn_VAL_439_S1AP_reject = 0; static const long asn_VAL_439_S1AP_mandatory = 2; static const long asn_VAL_440_S1AP_id_E_RABNotToBeModifiedListBearerModInd = 201; static const long asn_VAL_440_S1AP_reject = 0; static const long asn_VAL_440_S1AP_optional = 0; static const long asn_VAL_441_S1AP_id_CSGMembershipInfo = 226; static const long asn_VAL_441_S1AP_reject = 0; static const long asn_VAL_441_S1AP_optional = 0; static const long asn_VAL_442_S1AP_id_Tunnel_Information_for_BBF = 176; static const long asn_VAL_442_S1AP_ignore = 1; static const long asn_VAL_442_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABModificationIndicationIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_437_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_437_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_437_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_438_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_438_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_438_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_439_S1AP_id_E_RABToBeModifiedListBearerModInd }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_439_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABToBeModifiedListBearerModInd }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_439_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_440_S1AP_id_E_RABNotToBeModifiedListBearerModInd }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_440_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABNotToBeModifiedListBearerModInd }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_440_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_441_S1AP_id_CSGMembershipInfo }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_441_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_CSGMembershipInfo }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_441_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_442_S1AP_id_Tunnel_Information_for_BBF }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_442_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_TunnelInformation }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_442_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABModificationIndicationIEs_1[] = { { 6, 4, asn_IOS_S1AP_E_RABModificationIndicationIEs_1_rows } }; static const long asn_VAL_445_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_445_S1AP_ignore = 1; static const long asn_VAL_445_S1AP_mandatory = 2; static const long asn_VAL_446_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_446_S1AP_ignore = 1; static const long asn_VAL_446_S1AP_mandatory = 2; static const long asn_VAL_447_S1AP_id_E_RABModifyListBearerModConf = 203; static const long asn_VAL_447_S1AP_ignore = 1; static const long asn_VAL_447_S1AP_optional = 0; static const long asn_VAL_448_S1AP_id_E_RABFailedToModifyListBearerModConf = 205; static const long asn_VAL_448_S1AP_ignore = 1; static const long asn_VAL_448_S1AP_optional = 0; static const long asn_VAL_449_S1AP_id_E_RABToBeReleasedListBearerModConf = 210; static const long asn_VAL_449_S1AP_ignore = 1; static const long asn_VAL_449_S1AP_optional = 0; static const long asn_VAL_450_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_450_S1AP_ignore = 1; static const long asn_VAL_450_S1AP_optional = 0; static const long asn_VAL_451_S1AP_id_CSGMembershipStatus = 146; static const long asn_VAL_451_S1AP_ignore = 1; static const long asn_VAL_451_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABModificationConfirmIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_445_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_445_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_445_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_446_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_446_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_446_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_447_S1AP_id_E_RABModifyListBearerModConf }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_447_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABModifyListBearerModConf }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_447_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_448_S1AP_id_E_RABFailedToModifyListBearerModConf }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_448_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_448_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_449_S1AP_id_E_RABToBeReleasedListBearerModConf }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_449_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABList }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_449_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_450_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_450_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_450_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_451_S1AP_id_CSGMembershipStatus }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_451_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CSGMembershipStatus }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_451_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABModificationConfirmIEs_1[] = { { 7, 4, asn_IOS_S1AP_E_RABModificationConfirmIEs_1_rows } }; static const long asn_VAL_453_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_453_S1AP_reject = 0; static const long asn_VAL_453_S1AP_mandatory = 2; static const long asn_VAL_454_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_454_S1AP_reject = 0; static const long asn_VAL_454_S1AP_mandatory = 2; static const long asn_VAL_455_S1AP_id_CSGMembershipInfo = 226; static const long asn_VAL_455_S1AP_reject = 0; static const long asn_VAL_455_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_UEContextModificationIndicationIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_453_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_453_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_453_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_454_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_454_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_454_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_455_S1AP_id_CSGMembershipInfo }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_455_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_CSGMembershipInfo }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_455_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_UEContextModificationIndicationIEs_1[] = { { 3, 4, asn_IOS_S1AP_UEContextModificationIndicationIEs_1_rows } }; static const long asn_VAL_456_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_456_S1AP_ignore = 1; static const long asn_VAL_456_S1AP_mandatory = 2; static const long asn_VAL_457_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_457_S1AP_ignore = 1; static const long asn_VAL_457_S1AP_mandatory = 2; static const long asn_VAL_458_S1AP_id_CSGMembershipStatus = 146; static const long asn_VAL_458_S1AP_ignore = 1; static const long asn_VAL_458_S1AP_optional = 0; static const long asn_VAL_459_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_459_S1AP_ignore = 1; static const long asn_VAL_459_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_UEContextModificationConfirmIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_456_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_456_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_456_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_457_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_457_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_457_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_458_S1AP_id_CSGMembershipStatus }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_458_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CSGMembershipStatus }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_458_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_459_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_459_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_459_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_UEContextModificationConfirmIEs_1[] = { { 4, 4, asn_IOS_S1AP_UEContextModificationConfirmIEs_1_rows } }; static const long asn_VAL_460_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_460_S1AP_reject = 0; static const long asn_VAL_460_S1AP_mandatory = 2; static const long asn_VAL_461_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_461_S1AP_reject = 0; static const long asn_VAL_461_S1AP_mandatory = 2; static const long asn_VAL_462_S1AP_id_InformationOnRecommendedCellsAndENBsForPaging = 213; static const long asn_VAL_462_S1AP_ignore = 1; static const long asn_VAL_462_S1AP_optional = 0; static const long asn_VAL_463_S1AP_id_CellIdentifierAndCELevelForCECapableUEs = 212; static const long asn_VAL_463_S1AP_ignore = 1; static const long asn_VAL_463_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_UEContextSuspendRequestIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_460_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_460_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_460_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_461_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_461_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_461_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_462_S1AP_id_InformationOnRecommendedCellsAndENBsForPaging }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_462_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_InformationOnRecommendedCellsAndENBsForPaging }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_462_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_463_S1AP_id_CellIdentifierAndCELevelForCECapableUEs }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_463_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_463_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_UEContextSuspendRequestIEs_1[] = { { 4, 4, asn_IOS_S1AP_UEContextSuspendRequestIEs_1_rows } }; static const long asn_VAL_464_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_464_S1AP_ignore = 1; static const long asn_VAL_464_S1AP_mandatory = 2; static const long asn_VAL_465_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_465_S1AP_ignore = 1; static const long asn_VAL_465_S1AP_mandatory = 2; static const long asn_VAL_466_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_466_S1AP_ignore = 1; static const long asn_VAL_466_S1AP_optional = 0; static const long asn_VAL_467_S1AP_id_SecurityContext = 40; static const long asn_VAL_467_S1AP_reject = 0; static const long asn_VAL_467_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_UEContextSuspendResponseIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_464_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_464_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_464_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_465_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_465_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_465_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_466_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_466_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_466_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_467_S1AP_id_SecurityContext }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_467_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_SecurityContext }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_467_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_UEContextSuspendResponseIEs_1[] = { { 4, 4, asn_IOS_S1AP_UEContextSuspendResponseIEs_1_rows } }; static const long asn_VAL_468_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_468_S1AP_reject = 0; static const long asn_VAL_468_S1AP_mandatory = 2; static const long asn_VAL_469_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_469_S1AP_reject = 0; static const long asn_VAL_469_S1AP_mandatory = 2; static const long asn_VAL_470_S1AP_id_E_RABFailedToResumeListResumeReq = 235; static const long asn_VAL_470_S1AP_reject = 0; static const long asn_VAL_470_S1AP_optional = 0; static const long asn_VAL_471_S1AP_id_RRC_Resume_Cause = 245; static const long asn_VAL_471_S1AP_ignore = 1; static const long asn_VAL_471_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_UEContextResumeRequestIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_468_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_468_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_468_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_469_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_469_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_469_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_470_S1AP_id_E_RABFailedToResumeListResumeReq }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_470_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABFailedToResumeListResumeReq }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_470_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_471_S1AP_id_RRC_Resume_Cause }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_471_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_RRC_Establishment_Cause }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_471_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_UEContextResumeRequestIEs_1[] = { { 4, 4, asn_IOS_S1AP_UEContextResumeRequestIEs_1_rows } }; static const long asn_VAL_473_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_473_S1AP_ignore = 1; static const long asn_VAL_473_S1AP_mandatory = 2; static const long asn_VAL_474_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_474_S1AP_ignore = 1; static const long asn_VAL_474_S1AP_mandatory = 2; static const long asn_VAL_475_S1AP_id_E_RABFailedToResumeListResumeRes = 237; static const long asn_VAL_475_S1AP_reject = 0; static const long asn_VAL_475_S1AP_optional = 0; static const long asn_VAL_476_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_476_S1AP_ignore = 1; static const long asn_VAL_476_S1AP_optional = 0; static const long asn_VAL_477_S1AP_id_SecurityContext = 40; static const long asn_VAL_477_S1AP_reject = 0; static const long asn_VAL_477_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_UEContextResumeResponseIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_473_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_473_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_473_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_474_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_474_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_474_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_475_S1AP_id_E_RABFailedToResumeListResumeRes }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_475_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABFailedToResumeListResumeRes }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_475_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_476_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_476_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_476_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_477_S1AP_id_SecurityContext }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_477_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_SecurityContext }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_477_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_UEContextResumeResponseIEs_1[] = { { 5, 4, asn_IOS_S1AP_UEContextResumeResponseIEs_1_rows } }; static const long asn_VAL_479_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_479_S1AP_ignore = 1; static const long asn_VAL_479_S1AP_mandatory = 2; static const long asn_VAL_480_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_480_S1AP_ignore = 1; static const long asn_VAL_480_S1AP_mandatory = 2; static const long asn_VAL_481_S1AP_id_Cause = 2; static const long asn_VAL_481_S1AP_ignore = 1; static const long asn_VAL_481_S1AP_mandatory = 2; static const long asn_VAL_482_S1AP_id_CriticalityDiagnostics = 58; static const long asn_VAL_482_S1AP_ignore = 1; static const long asn_VAL_482_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_UEContextResumeFailureIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_479_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_479_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_479_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_480_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_480_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_480_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_481_S1AP_id_Cause }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_481_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_Cause }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_481_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_482_S1AP_id_CriticalityDiagnostics }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_482_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_CriticalityDiagnostics }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_482_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_UEContextResumeFailureIEs_1[] = { { 4, 4, asn_IOS_S1AP_UEContextResumeFailureIEs_1_rows } }; static const long asn_VAL_483_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_483_S1AP_ignore = 1; static const long asn_VAL_483_S1AP_mandatory = 2; static const long asn_VAL_484_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_484_S1AP_ignore = 1; static const long asn_VAL_484_S1AP_mandatory = 2; static const long asn_VAL_485_S1AP_id_UERadioCapability = 74; static const long asn_VAL_485_S1AP_ignore = 1; static const long asn_VAL_485_S1AP_optional = 0; static const long asn_VAL_486_S1AP_id_EnhancedCoverageRestricted = 251; static const long asn_VAL_486_S1AP_ignore = 1; static const long asn_VAL_486_S1AP_optional = 0; static const long asn_VAL_487_S1AP_id_DL_CP_SecurityInformation = 253; static const long asn_VAL_487_S1AP_ignore = 1; static const long asn_VAL_487_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_ConnectionEstablishmentIndicationIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_483_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_483_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_483_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_484_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_484_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_484_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_485_S1AP_id_UERadioCapability }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_485_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UERadioCapability }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_485_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_486_S1AP_id_EnhancedCoverageRestricted }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_486_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_EnhancedCoverageRestricted }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_486_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_487_S1AP_id_DL_CP_SecurityInformation }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_487_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_DL_CP_SecurityInformation }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_487_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_ConnectionEstablishmentIndicationIEs_1[] = { { 5, 4, asn_IOS_S1AP_ConnectionEstablishmentIndicationIEs_1_rows } }; static const long asn_VAL_488_S1AP_id_S_TMSI = 96; static const long asn_VAL_488_S1AP_reject = 0; static const long asn_VAL_488_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_RetrieveUEInformationIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_488_S1AP_id_S_TMSI }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_488_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_S_TMSI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_488_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_RetrieveUEInformationIEs_1[] = { { 1, 4, asn_IOS_S1AP_RetrieveUEInformationIEs_1_rows } }; static const long asn_VAL_489_S1AP_id_S_TMSI = 96; static const long asn_VAL_489_S1AP_reject = 0; static const long asn_VAL_489_S1AP_mandatory = 2; static const long asn_VAL_490_S1AP_id_UE_Level_QoS_Parameters = 252; static const long asn_VAL_490_S1AP_ignore = 1; static const long asn_VAL_490_S1AP_optional = 0; static const long asn_VAL_491_S1AP_id_UERadioCapability = 74; static const long asn_VAL_491_S1AP_ignore = 1; static const long asn_VAL_491_S1AP_optional = 0; static const asn_ioc_cell_t asn_IOS_S1AP_UEInformationTransferIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_489_S1AP_id_S_TMSI }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_489_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_S_TMSI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_489_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_490_S1AP_id_UE_Level_QoS_Parameters }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_490_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABLevelQoSParameters }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_490_S1AP_optional }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_491_S1AP_id_UERadioCapability }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_491_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_UERadioCapability }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_491_S1AP_optional } }; static const asn_ioc_set_t asn_IOS_S1AP_UEInformationTransferIEs_1[] = { { 3, 4, asn_IOS_S1AP_UEInformationTransferIEs_1_rows } }; static const long asn_VAL_492_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_492_S1AP_reject = 0; static const long asn_VAL_492_S1AP_mandatory = 2; static const long asn_VAL_493_S1AP_id_S_TMSI = 96; static const long asn_VAL_493_S1AP_reject = 0; static const long asn_VAL_493_S1AP_mandatory = 2; static const long asn_VAL_494_S1AP_id_EUTRAN_CGI = 100; static const long asn_VAL_494_S1AP_ignore = 1; static const long asn_VAL_494_S1AP_mandatory = 2; static const long asn_VAL_495_S1AP_id_TAI = 67; static const long asn_VAL_495_S1AP_ignore = 1; static const long asn_VAL_495_S1AP_mandatory = 2; static const long asn_VAL_496_S1AP_id_UL_CP_SecurityInformation = 254; static const long asn_VAL_496_S1AP_reject = 0; static const long asn_VAL_496_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_ENBCPRelocationIndicationIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_492_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_492_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_492_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_493_S1AP_id_S_TMSI }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_493_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_S_TMSI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_493_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_494_S1AP_id_EUTRAN_CGI }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_494_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_EUTRAN_CGI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_494_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_495_S1AP_id_TAI }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_495_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_TAI }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_495_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_496_S1AP_id_UL_CP_SecurityInformation }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_496_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_UL_CP_SecurityInformation }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_496_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_ENBCPRelocationIndicationIEs_1[] = { { 5, 4, asn_IOS_S1AP_ENBCPRelocationIndicationIEs_1_rows } }; static const long asn_VAL_497_S1AP_id_MME_UE_S1AP_ID = 0; static const long asn_VAL_497_S1AP_reject = 0; static const long asn_VAL_497_S1AP_mandatory = 2; static const long asn_VAL_498_S1AP_id_eNB_UE_S1AP_ID = 8; static const long asn_VAL_498_S1AP_reject = 0; static const long asn_VAL_498_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_MMECPRelocationIndicationIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_497_S1AP_id_MME_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_497_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_MME_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_497_S1AP_mandatory }, { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_498_S1AP_id_eNB_UE_S1AP_ID }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_498_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_ENB_UE_S1AP_ID }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_498_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_MMECPRelocationIndicationIEs_1[] = { { 2, 4, asn_IOS_S1AP_MMECPRelocationIndicationIEs_1_rows } }; static const long asn_VAL_24_S1AP_id_E_RABDataForwardingItem = 14; static const long asn_VAL_24_S1AP_ignore = 1; static const long asn_VAL_24_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABDataForwardingItemIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_24_S1AP_id_E_RABDataForwardingItem }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_24_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABDataForwardingItem }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_24_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABDataForwardingItemIEs_1[] = { { 1, 4, asn_IOS_S1AP_E_RABDataForwardingItemIEs_1_rows } }; static const long asn_VAL_55_S1AP_id_E_RABToBeSetupItemHOReq = 27; static const long asn_VAL_55_S1AP_reject = 0; static const long asn_VAL_55_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABToBeSetupItemHOReqIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_55_S1AP_id_E_RABToBeSetupItemHOReq }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_55_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABToBeSetupItemHOReq }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_55_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABToBeSetupItemHOReqIEs_1[] = { { 1, 4, asn_IOS_S1AP_E_RABToBeSetupItemHOReqIEs_1_rows } }; static const long asn_VAL_65_S1AP_id_E_RABAdmittedItem = 20; static const long asn_VAL_65_S1AP_ignore = 1; static const long asn_VAL_65_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABAdmittedItemIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_65_S1AP_id_E_RABAdmittedItem }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_65_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABAdmittedItem }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_65_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABAdmittedItemIEs_1[] = { { 1, 4, asn_IOS_S1AP_E_RABAdmittedItemIEs_1_rows } }; static const long asn_VAL_66_S1AP_id_E_RABFailedtoSetupItemHOReqAck = 21; static const long asn_VAL_66_S1AP_ignore = 1; static const long asn_VAL_66_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABFailedtoSetupItemHOReqAckIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_66_S1AP_id_E_RABFailedtoSetupItemHOReqAck }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_66_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABFailedToSetupItemHOReqAck }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_66_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABFailedtoSetupItemHOReqAckIEs_1[] = { { 1, 4, asn_IOS_S1AP_E_RABFailedtoSetupItemHOReqAckIEs_1_rows } }; static const long asn_VAL_89_S1AP_id_E_RABToBeSwitchedDLItem = 23; static const long asn_VAL_89_S1AP_reject = 0; static const long asn_VAL_89_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABToBeSwitchedDLItemIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_89_S1AP_id_E_RABToBeSwitchedDLItem }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_89_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABToBeSwitchedDLItem }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_89_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABToBeSwitchedDLItemIEs_1[] = { { 1, 4, asn_IOS_S1AP_E_RABToBeSwitchedDLItemIEs_1_rows } }; static const long asn_VAL_104_S1AP_id_E_RABToBeSwitchedULItem = 94; static const long asn_VAL_104_S1AP_ignore = 1; static const long asn_VAL_104_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABToBeSwitchedULItemIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_104_S1AP_id_E_RABToBeSwitchedULItem }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_104_S1AP_ignore }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABToBeSwitchedULItem }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_104_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABToBeSwitchedULItemIEs_1[] = { { 1, 4, asn_IOS_S1AP_E_RABToBeSwitchedULItemIEs_1_rows } }; static const long asn_VAL_443_S1AP_id_E_RABToBeModifiedItemBearerModInd = 200; static const long asn_VAL_443_S1AP_reject = 0; static const long asn_VAL_443_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABToBeModifiedItemBearerModIndIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_443_S1AP_id_E_RABToBeModifiedItemBearerModInd }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_443_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABToBeModifiedItemBearerModInd }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_443_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABToBeModifiedItemBearerModIndIEs_1[] = { { 1, 4, asn_IOS_S1AP_E_RABToBeModifiedItemBearerModIndIEs_1_rows } }; static const long asn_VAL_444_S1AP_id_E_RABNotToBeModifiedItemBearerModInd = 202; static const long asn_VAL_444_S1AP_reject = 0; static const long asn_VAL_444_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_444_S1AP_id_E_RABNotToBeModifiedItemBearerModInd }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_444_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModInd }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_444_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_1[] = { { 1, 4, asn_IOS_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_1_rows } }; static const long asn_VAL_472_S1AP_id_E_RABFailedToResumeItemResumeReq = 236; static const long asn_VAL_472_S1AP_reject = 0; static const long asn_VAL_472_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABFailedToResumeItemResumeReqIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_472_S1AP_id_E_RABFailedToResumeItemResumeReq }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_472_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABFailedToResumeItemResumeReq }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_472_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABFailedToResumeItemResumeReqIEs_1[] = { { 1, 4, asn_IOS_S1AP_E_RABFailedToResumeItemResumeReqIEs_1_rows } }; static const long asn_VAL_478_S1AP_id_E_RABFailedToResumeItemResumeRes = 238; static const long asn_VAL_478_S1AP_reject = 0; static const long asn_VAL_478_S1AP_mandatory = 2; static const asn_ioc_cell_t asn_IOS_S1AP_E_RABFailedToResumeItemResumeResIEs_1_rows[] = { { "&id", aioc__value, &asn_DEF_S1AP_ProtocolIE_ID, &asn_VAL_478_S1AP_id_E_RABFailedToResumeItemResumeRes }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_478_S1AP_reject }, { "&Value", aioc__type, &asn_DEF_S1AP_E_RABFailedToResumeItemResumeRes }, { "&presence", aioc__value, &asn_DEF_S1AP_Presence, &asn_VAL_478_S1AP_mandatory } }; static const asn_ioc_set_t asn_IOS_S1AP_E_RABFailedToResumeItemResumeResIEs_1[] = { { 1, 4, asn_IOS_S1AP_E_RABFailedToResumeItemResumeResIEs_1_rows } }; static int memb_S1AP_id_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABToBeSetupItemBearerSUReqIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABToBeSetupItemBearerSUReqIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReqIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABToBeSetupItemBearerSUReqIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABToBeSetupItemBearerSUReqIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReqIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_5(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABSetupItemBearerSUResIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABSetupItemBearerSUResIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABSetupItemBearerSUResIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_5(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABSetupItemBearerSUResIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABSetupItemBearerSUResIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABSetupItemBearerSUResIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_5(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_9(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABToBeModifiedItemBearerModReqIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABToBeModifiedItemBearerModReqIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABToBeModifiedItemBearerModReqIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_9(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABToBeModifiedItemBearerModReqIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABToBeModifiedItemBearerModReqIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABToBeModifiedItemBearerModReqIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_9(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_13(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABModifyItemBearerModResIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABModifyItemBearerModResIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABModifyItemBearerModResIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_13(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABModifyItemBearerModResIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABModifyItemBearerModResIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABModifyItemBearerModResIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_13(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_17(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABReleaseItemBearerRelCompIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABReleaseItemBearerRelCompIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABReleaseItemBearerRelCompIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_17(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABReleaseItemBearerRelCompIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABReleaseItemBearerRelCompIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABReleaseItemBearerRelCompIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_17(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_21(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABToBeSetupItemCtxtSUReqIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABToBeSetupItemCtxtSUReqIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReqIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_21(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABToBeSetupItemCtxtSUReqIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABToBeSetupItemCtxtSUReqIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReqIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_21(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_25(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABSetupItemCtxtSUResIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABSetupItemCtxtSUResIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABSetupItemCtxtSUResIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_25(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABSetupItemCtxtSUResIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABSetupItemCtxtSUResIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABSetupItemCtxtSUResIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_25(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_29(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_TAIItemIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_TAIItemIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_TAIItemIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_29(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_TAIItemIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_TAIItemIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_TAIItemIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_29(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_33(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UE_associatedLogicalS1_ConnectionItemRes_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UE_associatedLogicalS1_ConnectionItemRes_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemRes, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_33(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UE_associatedLogicalS1_ConnectionItemRes_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UE_associatedLogicalS1_ConnectionItemRes_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemRes, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_33(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_37(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UE_associatedLogicalS1_ConnectionItemResAck_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UE_associatedLogicalS1_ConnectionItemResAck_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemResAck, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_37(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UE_associatedLogicalS1_ConnectionItemResAck_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UE_associatedLogicalS1_ConnectionItemResAck_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemResAck, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_37(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_41(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABModifyItemBearerModConfIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABModifyItemBearerModConfIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABModifyItemBearerModConfIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_41(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABModifyItemBearerModConfIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABModifyItemBearerModConfIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABModifyItemBearerModConfIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_41(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_45(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_Bearers_SubjectToStatusTransfer_ItemIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_45(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_Bearers_SubjectToStatusTransfer_ItemIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_45(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_49(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABInformationListIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABInformationListIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABInformationListIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_49(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABInformationListIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABInformationListIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABInformationListIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_49(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_53(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABItemIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABItemIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABItemIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_53(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABItemIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABItemIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABItemIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_53(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_57(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_MDTMode_ExtensionIE_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_MDTMode_ExtensionIE_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_MDTMode_ExtensionIE, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_57(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_MDTMode_ExtensionIE_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_MDTMode_ExtensionIE_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_MDTMode_ExtensionIE, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_57(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_61(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_RecommendedCellItemIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_RecommendedCellItemIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_RecommendedCellItemIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_61(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_RecommendedCellItemIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_RecommendedCellItemIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_RecommendedCellItemIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_61(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_65(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_RecommendedENBItemIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_RecommendedENBItemIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_RecommendedENBItemIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_65(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_RecommendedENBItemIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_RecommendedENBItemIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_RecommendedENBItemIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_65(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_69(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_SONInformation_ExtensionIE_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_SONInformation_ExtensionIE_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_SONInformation_ExtensionIE, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_69(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_SONInformation_ExtensionIE_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_SONInformation_ExtensionIE_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_SONInformation_ExtensionIE, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_69(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_73(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_HandoverRequiredIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_HandoverRequiredIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_HandoverRequiredIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_73(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_HandoverRequiredIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_HandoverRequiredIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_HandoverRequiredIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_73(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_77(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_HandoverCommandIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_HandoverCommandIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_HandoverCommandIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_77(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_HandoverCommandIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_HandoverCommandIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_HandoverCommandIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_77(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_81(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_HandoverPreparationFailureIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_HandoverPreparationFailureIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_HandoverPreparationFailureIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_81(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_HandoverPreparationFailureIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_HandoverPreparationFailureIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_HandoverPreparationFailureIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_81(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_85(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_HandoverRequestIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_HandoverRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_HandoverRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_85(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_HandoverRequestIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_HandoverRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_HandoverRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_85(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_89(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_HandoverRequestAcknowledgeIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_HandoverRequestAcknowledgeIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_HandoverRequestAcknowledgeIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_89(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_HandoverRequestAcknowledgeIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_HandoverRequestAcknowledgeIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_HandoverRequestAcknowledgeIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_89(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_93(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_HandoverFailureIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_HandoverFailureIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_HandoverFailureIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_93(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_HandoverFailureIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_HandoverFailureIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_HandoverFailureIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_93(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_97(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_HandoverNotifyIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_HandoverNotifyIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_HandoverNotifyIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_97(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_HandoverNotifyIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_HandoverNotifyIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_HandoverNotifyIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_97(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_101(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_PathSwitchRequestIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_PathSwitchRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_PathSwitchRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_101(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_PathSwitchRequestIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_PathSwitchRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_PathSwitchRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_101(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_105(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_PathSwitchRequestAcknowledgeIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_PathSwitchRequestAcknowledgeIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_PathSwitchRequestAcknowledgeIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_105(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_PathSwitchRequestAcknowledgeIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_PathSwitchRequestAcknowledgeIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_PathSwitchRequestAcknowledgeIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_105(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_109(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_PathSwitchRequestFailureIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_PathSwitchRequestFailureIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_PathSwitchRequestFailureIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_109(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_PathSwitchRequestFailureIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_PathSwitchRequestFailureIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_PathSwitchRequestFailureIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_109(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_113(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_HandoverCancelIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_HandoverCancelIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_HandoverCancelIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_113(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_HandoverCancelIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_HandoverCancelIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_HandoverCancelIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_113(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_117(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_HandoverCancelAcknowledgeIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_HandoverCancelAcknowledgeIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_HandoverCancelAcknowledgeIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_117(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_HandoverCancelAcknowledgeIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_HandoverCancelAcknowledgeIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_HandoverCancelAcknowledgeIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_117(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_121(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABSetupRequestIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABSetupRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABSetupRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_121(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABSetupRequestIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABSetupRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABSetupRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_121(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_125(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABSetupResponseIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABSetupResponseIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABSetupResponseIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_125(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABSetupResponseIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABSetupResponseIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABSetupResponseIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_125(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_129(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABModifyRequestIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABModifyRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABModifyRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_129(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABModifyRequestIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABModifyRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABModifyRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_129(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_133(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABModifyResponseIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABModifyResponseIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABModifyResponseIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_133(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABModifyResponseIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABModifyResponseIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABModifyResponseIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_133(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_137(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABReleaseCommandIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABReleaseCommandIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABReleaseCommandIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_137(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABReleaseCommandIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABReleaseCommandIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABReleaseCommandIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_137(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_141(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABReleaseResponseIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABReleaseResponseIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABReleaseResponseIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_141(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABReleaseResponseIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABReleaseResponseIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABReleaseResponseIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_141(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_145(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABReleaseIndicationIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABReleaseIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABReleaseIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_145(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABReleaseIndicationIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABReleaseIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABReleaseIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_145(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_149(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_InitialContextSetupRequestIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_InitialContextSetupRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_InitialContextSetupRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_149(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_InitialContextSetupRequestIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_InitialContextSetupRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_InitialContextSetupRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_149(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_153(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_InitialContextSetupResponseIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_InitialContextSetupResponseIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_InitialContextSetupResponseIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_153(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_InitialContextSetupResponseIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_InitialContextSetupResponseIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_InitialContextSetupResponseIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_153(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_157(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_InitialContextSetupFailureIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_InitialContextSetupFailureIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_InitialContextSetupFailureIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_157(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_InitialContextSetupFailureIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_InitialContextSetupFailureIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_InitialContextSetupFailureIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_157(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_161(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_PagingIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_PagingIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_PagingIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_161(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_PagingIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_PagingIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_PagingIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_161(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_165(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UEContextReleaseRequest_IEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextReleaseRequest_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextReleaseRequest_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_165(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UEContextReleaseRequest_IEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextReleaseRequest_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextReleaseRequest_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_165(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_169(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UEContextReleaseCommand_IEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextReleaseCommand_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextReleaseCommand_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_169(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UEContextReleaseCommand_IEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextReleaseCommand_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextReleaseCommand_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_169(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_173(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UEContextReleaseComplete_IEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextReleaseComplete_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextReleaseComplete_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_173(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UEContextReleaseComplete_IEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextReleaseComplete_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextReleaseComplete_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_173(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_177(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UEContextModificationRequestIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextModificationRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextModificationRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_177(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UEContextModificationRequestIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextModificationRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextModificationRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_177(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_181(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UEContextModificationResponseIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextModificationResponseIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextModificationResponseIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_181(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UEContextModificationResponseIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextModificationResponseIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextModificationResponseIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_181(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_185(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UEContextModificationFailureIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextModificationFailureIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextModificationFailureIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_185(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UEContextModificationFailureIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextModificationFailureIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextModificationFailureIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_185(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_189(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UERadioCapabilityMatchRequestIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UERadioCapabilityMatchRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UERadioCapabilityMatchRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_189(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UERadioCapabilityMatchRequestIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UERadioCapabilityMatchRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UERadioCapabilityMatchRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_189(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_193(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UERadioCapabilityMatchResponseIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UERadioCapabilityMatchResponseIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UERadioCapabilityMatchResponseIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_193(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UERadioCapabilityMatchResponseIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UERadioCapabilityMatchResponseIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UERadioCapabilityMatchResponseIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_193(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_197(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_DownlinkNASTransport_IEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_DownlinkNASTransport_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_DownlinkNASTransport_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_197(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_DownlinkNASTransport_IEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_DownlinkNASTransport_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_DownlinkNASTransport_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_197(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_201(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_InitialUEMessage_IEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_InitialUEMessage_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_InitialUEMessage_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_201(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_InitialUEMessage_IEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_InitialUEMessage_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_InitialUEMessage_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_201(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_205(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UplinkNASTransport_IEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UplinkNASTransport_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UplinkNASTransport_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_205(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UplinkNASTransport_IEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UplinkNASTransport_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UplinkNASTransport_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_205(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_209(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_NASNonDeliveryIndication_IEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_NASNonDeliveryIndication_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_NASNonDeliveryIndication_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_209(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_NASNonDeliveryIndication_IEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_NASNonDeliveryIndication_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_NASNonDeliveryIndication_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_209(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_213(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_RerouteNASRequest_IEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_RerouteNASRequest_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_RerouteNASRequest_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_213(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_RerouteNASRequest_IEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_RerouteNASRequest_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_RerouteNASRequest_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_213(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_217(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static int memb_S1AP_criticality_constraint_217(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_value_constraint_217(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_221(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_ResetIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ResetIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ResetIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_221(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_ResetIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ResetIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ResetIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_221(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_225(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_ResetAcknowledgeIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ResetAcknowledgeIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ResetAcknowledgeIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_225(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_ResetAcknowledgeIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ResetAcknowledgeIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ResetAcknowledgeIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_225(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_229(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_ErrorIndicationIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ErrorIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ErrorIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_229(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_ErrorIndicationIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ErrorIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ErrorIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_229(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_233(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_S1SetupRequestIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_S1SetupRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_S1SetupRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_233(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_S1SetupRequestIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_S1SetupRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_S1SetupRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_233(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_237(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_S1SetupResponseIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_S1SetupResponseIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_S1SetupResponseIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_237(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_S1SetupResponseIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_S1SetupResponseIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_S1SetupResponseIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_237(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_241(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_S1SetupFailureIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_S1SetupFailureIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_S1SetupFailureIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_241(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_S1SetupFailureIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_S1SetupFailureIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_S1SetupFailureIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_241(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_245(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_ENBConfigurationUpdateIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ENBConfigurationUpdateIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ENBConfigurationUpdateIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_245(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_ENBConfigurationUpdateIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ENBConfigurationUpdateIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ENBConfigurationUpdateIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_245(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_249(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_ENBConfigurationUpdateAcknowledgeIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ENBConfigurationUpdateAcknowledgeIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ENBConfigurationUpdateAcknowledgeIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_249(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_ENBConfigurationUpdateAcknowledgeIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ENBConfigurationUpdateAcknowledgeIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ENBConfigurationUpdateAcknowledgeIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_249(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_253(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_ENBConfigurationUpdateFailureIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ENBConfigurationUpdateFailureIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ENBConfigurationUpdateFailureIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_253(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_ENBConfigurationUpdateFailureIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ENBConfigurationUpdateFailureIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ENBConfigurationUpdateFailureIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_253(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_257(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_MMEConfigurationUpdateIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_MMEConfigurationUpdateIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_MMEConfigurationUpdateIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_257(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_MMEConfigurationUpdateIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_MMEConfigurationUpdateIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_MMEConfigurationUpdateIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_257(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_261(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_MMEConfigurationUpdateAcknowledgeIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_MMEConfigurationUpdateAcknowledgeIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_MMEConfigurationUpdateAcknowledgeIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_261(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_MMEConfigurationUpdateAcknowledgeIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_MMEConfigurationUpdateAcknowledgeIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_MMEConfigurationUpdateAcknowledgeIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_261(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_265(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_MMEConfigurationUpdateFailureIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_MMEConfigurationUpdateFailureIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_MMEConfigurationUpdateFailureIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_265(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_MMEConfigurationUpdateFailureIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_MMEConfigurationUpdateFailureIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_MMEConfigurationUpdateFailureIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_265(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_269(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_DownlinkS1cdma2000tunnellingIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_DownlinkS1cdma2000tunnellingIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_DownlinkS1cdma2000tunnellingIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_269(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_DownlinkS1cdma2000tunnellingIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_DownlinkS1cdma2000tunnellingIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_DownlinkS1cdma2000tunnellingIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_269(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_273(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UplinkS1cdma2000tunnellingIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UplinkS1cdma2000tunnellingIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UplinkS1cdma2000tunnellingIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_273(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UplinkS1cdma2000tunnellingIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UplinkS1cdma2000tunnellingIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UplinkS1cdma2000tunnellingIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_273(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_277(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UECapabilityInfoIndicationIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UECapabilityInfoIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UECapabilityInfoIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_277(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UECapabilityInfoIndicationIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UECapabilityInfoIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UECapabilityInfoIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_277(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_281(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_ENBStatusTransferIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ENBStatusTransferIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ENBStatusTransferIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_281(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_ENBStatusTransferIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ENBStatusTransferIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ENBStatusTransferIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_281(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_285(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_MMEStatusTransferIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_MMEStatusTransferIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_MMEStatusTransferIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_285(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_MMEStatusTransferIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_MMEStatusTransferIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_MMEStatusTransferIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_285(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_289(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_TraceStartIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_TraceStartIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_TraceStartIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_289(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_TraceStartIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_TraceStartIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_TraceStartIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_289(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_293(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_TraceFailureIndicationIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_TraceFailureIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_TraceFailureIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_293(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_TraceFailureIndicationIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_TraceFailureIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_TraceFailureIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_293(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_297(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_DeactivateTraceIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_DeactivateTraceIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_DeactivateTraceIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_297(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_DeactivateTraceIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_DeactivateTraceIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_DeactivateTraceIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_297(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_301(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_CellTrafficTraceIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_CellTrafficTraceIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_CellTrafficTraceIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_301(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_CellTrafficTraceIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_CellTrafficTraceIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_CellTrafficTraceIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_301(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_305(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_LocationReportingControlIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_LocationReportingControlIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_LocationReportingControlIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_305(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_LocationReportingControlIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_LocationReportingControlIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_LocationReportingControlIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_305(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_309(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_LocationReportingFailureIndicationIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_LocationReportingFailureIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_LocationReportingFailureIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_309(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_LocationReportingFailureIndicationIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_LocationReportingFailureIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_LocationReportingFailureIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_309(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_313(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_LocationReportIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_LocationReportIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_LocationReportIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_313(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_LocationReportIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_LocationReportIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_LocationReportIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_313(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_317(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_OverloadStartIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_OverloadStartIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_OverloadStartIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_317(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_OverloadStartIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_OverloadStartIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_OverloadStartIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_317(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_321(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_OverloadStopIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_OverloadStopIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_OverloadStopIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_321(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_OverloadStopIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_OverloadStopIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_OverloadStopIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_321(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_325(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_WriteReplaceWarningRequestIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_WriteReplaceWarningRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_WriteReplaceWarningRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_325(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_WriteReplaceWarningRequestIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_WriteReplaceWarningRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_WriteReplaceWarningRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_325(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_329(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_WriteReplaceWarningResponseIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_WriteReplaceWarningResponseIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_WriteReplaceWarningResponseIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_329(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_WriteReplaceWarningResponseIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_WriteReplaceWarningResponseIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_WriteReplaceWarningResponseIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_329(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_333(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_ENBDirectInformationTransferIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ENBDirectInformationTransferIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ENBDirectInformationTransferIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_333(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_ENBDirectInformationTransferIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ENBDirectInformationTransferIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ENBDirectInformationTransferIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_333(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_337(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_MMEDirectInformationTransferIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_MMEDirectInformationTransferIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_MMEDirectInformationTransferIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_337(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_MMEDirectInformationTransferIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_MMEDirectInformationTransferIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_MMEDirectInformationTransferIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_337(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_341(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_ENBConfigurationTransferIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ENBConfigurationTransferIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ENBConfigurationTransferIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_341(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_ENBConfigurationTransferIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ENBConfigurationTransferIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ENBConfigurationTransferIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_341(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_345(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_MMEConfigurationTransferIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_MMEConfigurationTransferIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_MMEConfigurationTransferIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_345(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_MMEConfigurationTransferIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_MMEConfigurationTransferIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_MMEConfigurationTransferIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_345(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_349(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_KillRequestIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_KillRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_KillRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_349(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_KillRequestIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_KillRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_KillRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_349(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_353(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_KillResponseIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_KillResponseIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_KillResponseIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_353(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_KillResponseIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_KillResponseIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_KillResponseIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_353(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_357(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_PWSRestartIndicationIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_PWSRestartIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_PWSRestartIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_357(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_PWSRestartIndicationIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_PWSRestartIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_PWSRestartIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_357(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_361(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_PWSFailureIndicationIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_PWSFailureIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_PWSFailureIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_361(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_PWSFailureIndicationIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_PWSFailureIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_PWSFailureIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_361(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_365(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_DownlinkUEAssociatedLPPaTransport_IEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_DownlinkUEAssociatedLPPaTransport_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_DownlinkUEAssociatedLPPaTransport_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_365(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_DownlinkUEAssociatedLPPaTransport_IEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_DownlinkUEAssociatedLPPaTransport_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_DownlinkUEAssociatedLPPaTransport_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_365(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_369(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UplinkUEAssociatedLPPaTransport_IEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UplinkUEAssociatedLPPaTransport_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UplinkUEAssociatedLPPaTransport_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_369(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UplinkUEAssociatedLPPaTransport_IEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UplinkUEAssociatedLPPaTransport_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UplinkUEAssociatedLPPaTransport_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_369(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_373(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_DownlinkNonUEAssociatedLPPaTransport_IEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_373(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_DownlinkNonUEAssociatedLPPaTransport_IEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_373(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_377(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UplinkNonUEAssociatedLPPaTransport_IEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UplinkNonUEAssociatedLPPaTransport_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UplinkNonUEAssociatedLPPaTransport_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_377(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UplinkNonUEAssociatedLPPaTransport_IEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UplinkNonUEAssociatedLPPaTransport_IEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UplinkNonUEAssociatedLPPaTransport_IEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_377(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_381(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABModificationIndicationIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABModificationIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABModificationIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_381(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABModificationIndicationIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABModificationIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABModificationIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_381(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_385(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABModificationConfirmIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABModificationConfirmIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABModificationConfirmIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_385(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABModificationConfirmIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABModificationConfirmIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABModificationConfirmIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_385(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_389(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UEContextModificationIndicationIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextModificationIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextModificationIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_389(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UEContextModificationIndicationIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextModificationIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextModificationIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_389(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_393(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UEContextModificationConfirmIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextModificationConfirmIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextModificationConfirmIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_393(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UEContextModificationConfirmIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextModificationConfirmIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextModificationConfirmIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_393(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_397(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UEContextSuspendRequestIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextSuspendRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextSuspendRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_397(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UEContextSuspendRequestIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextSuspendRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextSuspendRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_397(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_401(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UEContextSuspendResponseIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextSuspendResponseIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextSuspendResponseIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_401(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UEContextSuspendResponseIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextSuspendResponseIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextSuspendResponseIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_401(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_405(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UEContextResumeRequestIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextResumeRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextResumeRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_405(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UEContextResumeRequestIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextResumeRequestIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextResumeRequestIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_405(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_409(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UEContextResumeResponseIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextResumeResponseIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextResumeResponseIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_409(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UEContextResumeResponseIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextResumeResponseIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextResumeResponseIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_409(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_413(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UEContextResumeFailureIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextResumeFailureIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextResumeFailureIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_413(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UEContextResumeFailureIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEContextResumeFailureIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEContextResumeFailureIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_413(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_417(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_ConnectionEstablishmentIndicationIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ConnectionEstablishmentIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ConnectionEstablishmentIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_417(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_ConnectionEstablishmentIndicationIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ConnectionEstablishmentIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ConnectionEstablishmentIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_417(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_421(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_RetrieveUEInformationIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_RetrieveUEInformationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_RetrieveUEInformationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_421(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_RetrieveUEInformationIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_RetrieveUEInformationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_RetrieveUEInformationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_421(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_425(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UEInformationTransferIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEInformationTransferIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEInformationTransferIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_425(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UEInformationTransferIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_UEInformationTransferIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UEInformationTransferIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_425(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_429(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_ENBCPRelocationIndicationIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ENBCPRelocationIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ENBCPRelocationIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_429(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_ENBCPRelocationIndicationIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_ENBCPRelocationIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_ENBCPRelocationIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_429(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_433(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_MMECPRelocationIndicationIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_MMECPRelocationIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_MMECPRelocationIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_433(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_MMECPRelocationIndicationIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_MMECPRelocationIndicationIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_MMECPRelocationIndicationIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_433(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_437(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABDataForwardingItemIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABDataForwardingItemIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABDataForwardingItemIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_437(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABDataForwardingItemIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABDataForwardingItemIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABDataForwardingItemIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_437(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_441(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABToBeSetupItemHOReqIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABToBeSetupItemHOReqIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABToBeSetupItemHOReqIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_441(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABToBeSetupItemHOReqIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABToBeSetupItemHOReqIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABToBeSetupItemHOReqIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_441(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_445(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABAdmittedItemIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABAdmittedItemIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABAdmittedItemIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_445(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABAdmittedItemIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABAdmittedItemIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABAdmittedItemIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_445(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_449(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABFailedtoSetupItemHOReqAckIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABFailedtoSetupItemHOReqAckIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABFailedtoSetupItemHOReqAckIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_449(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABFailedtoSetupItemHOReqAckIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABFailedtoSetupItemHOReqAckIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABFailedtoSetupItemHOReqAckIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_449(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_453(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABToBeSwitchedDLItemIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABToBeSwitchedDLItemIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABToBeSwitchedDLItemIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_453(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABToBeSwitchedDLItemIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABToBeSwitchedDLItemIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABToBeSwitchedDLItemIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_453(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_457(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABToBeSwitchedULItemIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABToBeSwitchedULItemIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABToBeSwitchedULItemIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_457(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABToBeSwitchedULItemIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABToBeSwitchedULItemIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABToBeSwitchedULItemIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_457(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_461(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABToBeModifiedItemBearerModIndIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABToBeModifiedItemBearerModIndIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABToBeModifiedItemBearerModIndIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_461(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABToBeModifiedItemBearerModIndIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABToBeModifiedItemBearerModIndIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABToBeModifiedItemBearerModIndIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_461(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_465(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABNotToBeModifiedItemBearerModIndIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABNotToBeModifiedItemBearerModIndIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_465(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABNotToBeModifiedItemBearerModIndIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABNotToBeModifiedItemBearerModIndIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_465(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_469(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABFailedToResumeItemResumeReqIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABFailedToResumeItemResumeReqIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABFailedToResumeItemResumeReqIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_469(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABFailedToResumeItemResumeReqIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABFailedToResumeItemResumeReqIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABFailedToResumeItemResumeReqIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_469(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static int memb_S1AP_id_constraint_473(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_E_RABFailedToResumeItemResumeResIEs_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABFailedToResumeItemResumeResIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 1; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABFailedToResumeItemResumeResIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_473(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_E_RABFailedToResumeItemResumeResIEs_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_E_RABFailedToResumeItemResumeResIEs_1; size_t constraining_column = 0; /* &id */ size_t for_column = 2; /* &Value */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_E_RABFailedToResumeItemResumeResIEs, id)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_473(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_2 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_2 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_3 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_3 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_4 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_4 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_6 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_6 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_7 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_7 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_8 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_8 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_10 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_10 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_11 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_11 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_12 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_12 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_14 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_14 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_15 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_15 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_16 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_16 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_18 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_18 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_19 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_19 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_20 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_20 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_22 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_22 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_23 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_23 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_24 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_24 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_26 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_26 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_27 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_27 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_28 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_28 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_30 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_30 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_31 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_31 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_32 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_32 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_34 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_34 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_35 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_35 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_36 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_36 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_38 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_38 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_39 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_39 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_40 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_40 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_42 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_42 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_43 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_43 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_44 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_44 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_46 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_46 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_47 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_47 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_48 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_48 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_50 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_50 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_51 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_51 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_52 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_52 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_54 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_54 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_55 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_55 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_56 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_56 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_58 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_58 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_59 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_59 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_60 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_60 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_62 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_62 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_63 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_63 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_64 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_64 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_66 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_66 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_67 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_67 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_68 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_68 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_70 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_70 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_71 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_71 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_72 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_72 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_74 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_74 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_75 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_75 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_76 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_76 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_78 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_78 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_79 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_79 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_80 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_80 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_82 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_82 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_83 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_83 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_84 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_84 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_86 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_86 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_87 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_87 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_88 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_88 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_90 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_90 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_91 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_91 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_92 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_92 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_94 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_94 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_95 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_95 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_96 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_96 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_98 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_98 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_99 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_99 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_100 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_100 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_102 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_102 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_103 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_103 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_104 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_104 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_106 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_106 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_107 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_107 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_108 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_108 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_110 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_110 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_111 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_111 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_112 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_112 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_114 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_114 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_115 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_115 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_116 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_116 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_118 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_118 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_119 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_119 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_120 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_120 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_122 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_122 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_123 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_123 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_124 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_124 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_126 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_126 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_127 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_127 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_128 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_128 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_130 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_130 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_131 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_131 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_132 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_132 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_134 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_134 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_135 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_135 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_136 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_136 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_138 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_138 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_139 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_139 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_140 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_140 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_142 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_142 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_143 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_143 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_144 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_144 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_146 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_146 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_147 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_147 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_148 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_148 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_150 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_150 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_151 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_151 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_152 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_152 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_154 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_154 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_155 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_155 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_156 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_156 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_158 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_158 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_159 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_159 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_160 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_160 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_162 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_162 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_163 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_163 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_164 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_164 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_166 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_166 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_167 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_167 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_168 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_168 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_170 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_170 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_171 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_171 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_172 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_172 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_174 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_174 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_175 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_175 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_176 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_176 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_178 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_178 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_179 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_179 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_180 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_180 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_182 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_182 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_183 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_183 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_184 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_184 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_186 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_186 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_187 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_187 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_188 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_188 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_190 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_190 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_191 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_191 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_192 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_192 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_194 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_194 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_195 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_195 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_196 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_196 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_198 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_198 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_199 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_199 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_200 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_200 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_202 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_202 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_203 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_203 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_204 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_204 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_206 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_206 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_207 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_207 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_208 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_208 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_210 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_210 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_211 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_211 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_212 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_212 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_214 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_214 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_215 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_215 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_216 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_216 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_218 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_218 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_219 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_219 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_220 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_220 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_222 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_222 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_223 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_223 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_224 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_224 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_226 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_226 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_227 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_227 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_228 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_228 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_230 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_230 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_231 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_231 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_232 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_232 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_234 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_234 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_235 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_235 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_236 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_236 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_238 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_238 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_239 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_239 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_240 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_240 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_242 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_242 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_243 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_243 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_244 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_244 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_246 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_246 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_247 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_247 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_248 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_248 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_250 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_250 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_251 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_251 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_252 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_252 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_254 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_254 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_255 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_255 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_256 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_256 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_258 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_258 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_259 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_259 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_260 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_260 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_262 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_262 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_263 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_263 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_264 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_264 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_266 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_266 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_267 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_267 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_268 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_268 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_270 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_270 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_271 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_271 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_272 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_272 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_274 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_274 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_275 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_275 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_276 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_276 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_278 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_278 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_279 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_279 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_280 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_280 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_282 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_282 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_283 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_283 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_284 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_284 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_286 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_286 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_287 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_287 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_288 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_288 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_290 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_290 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_291 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_291 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_292 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_292 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_294 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_294 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_295 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_295 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_296 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_296 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_298 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_298 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_299 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_299 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_300 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_300 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_302 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_302 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_303 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_303 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_304 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_304 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_306 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_306 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_307 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_307 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_308 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_308 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_310 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_310 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_311 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_311 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_312 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_312 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_314 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_314 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_315 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_315 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_316 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_316 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_318 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_318 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_319 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_319 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_320 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_320 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_322 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_322 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_323 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_323 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_324 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_324 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_326 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_326 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_327 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_327 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_328 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_328 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_330 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_330 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_331 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_331 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_332 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_332 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_334 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_334 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_335 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_335 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_336 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_336 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_338 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_338 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_339 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_339 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_340 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_340 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_342 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_342 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_343 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_343 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_344 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_344 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_346 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_346 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_347 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_347 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_348 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_348 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_350 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_350 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_351 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_351 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_352 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_352 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_354 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_354 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_355 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_355 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_356 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_356 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_358 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_358 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_359 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_359 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_360 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_360 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_362 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_362 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_363 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_363 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_364 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_364 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_366 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_366 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_367 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_367 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_368 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_368 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_370 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_370 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_371 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_371 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_372 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_372 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_374 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_374 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_375 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_375 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_376 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_376 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_378 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_378 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_379 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_379 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_380 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_380 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_382 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_382 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_383 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_383 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_384 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_384 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_386 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_386 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_387 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_387 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_388 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_388 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_390 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_390 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_391 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_391 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_392 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_392 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_394 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_394 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_395 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_395 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_396 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_396 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_398 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_398 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_399 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_399 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_400 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_400 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_402 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_402 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_403 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_403 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_404 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_404 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_406 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_406 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_407 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_407 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_408 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_408 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_410 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_410 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_411 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_411 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_412 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_412 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_414 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_414 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_415 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_415 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_416 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_416 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_418 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_418 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_419 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_419 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_420 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_420 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_422 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_422 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_423 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_423 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_424 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_424 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_426 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_426 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_427 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_427 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_428 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_428 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_430 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_430 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_431 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_431 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_432 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_432 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_434 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_434 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_435 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_435 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_436 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_436 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_438 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_438 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_439 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_439 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_440 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_440 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_442 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_442 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_443 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_443 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_444 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_444 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_446 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_446 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_447 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_447 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_448 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_448 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_450 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_450 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_451 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_451 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_452 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_452 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_454 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_454 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_455 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_455 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_456 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_456 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_458 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_458 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_459 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_459 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_460 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_460 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_462 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_462 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_463 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_463 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_464 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_464 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_466 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_466 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_467 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_467 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_468 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_468 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_470 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_470 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_471 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_471 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_472 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_472 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_id_constr_474 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_id_constr_474 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_475 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_475 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_476 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_476 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_4[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReqIEs__value, choice.E_RABToBeSetupItemBearerSUReq), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReq, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABToBeSetupItemBearerSUReq" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_4[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E-RABToBeSetupItemBearerSUReq */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_4 = { sizeof(struct S1AP_E_RABToBeSetupItemBearerSUReqIEs__value), offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReqIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReqIEs__value, present), sizeof(((struct S1AP_E_RABToBeSetupItemBearerSUReqIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_4, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_4 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_4, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_4 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSetupItemBearerSUReqIEs_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReqIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_2, &asn_PER_memb_S1AP_id_constr_2, memb_S1AP_id_constraint_1 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReqIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_E_RABToBeSetupItemBearerSUReqIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_3, &asn_PER_memb_S1AP_criticality_constr_3, memb_S1AP_criticality_constraint_1 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReqIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_4, select_E_RABToBeSetupItemBearerSUReqIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_4, &asn_PER_memb_S1AP_value_constr_4, memb_S1AP_value_constraint_1 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReqIEs_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABToBeSetupItemBearerSUReqIEs_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSetupItemBearerSUReqIEs_specs_1 = { sizeof(struct S1AP_E_RABToBeSetupItemBearerSUReqIEs), offsetof(struct S1AP_E_RABToBeSetupItemBearerSUReqIEs, _asn_ctx), asn_MAP_S1AP_E_RABToBeSetupItemBearerSUReqIEs_tag2el_1, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReqIEs = { "E-RABToBeSetupItemBearerSUReqIEs", "E-RABToBeSetupItemBearerSUReqIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReqIEs_tags_1, sizeof(asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReqIEs_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReqIEs_tags_1[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReqIEs_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReqIEs_tags_1) /sizeof(asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReqIEs_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeSetupItemBearerSUReqIEs_1, 3, /* Elements count */ &asn_SPC_S1AP_E_RABToBeSetupItemBearerSUReqIEs_specs_1 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_8[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupItemBearerSUResIEs__value, choice.E_RABSetupItemBearerSURes), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABSetupItemBearerSURes, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABSetupItemBearerSURes" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_8[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E-RABSetupItemBearerSURes */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_8 = { sizeof(struct S1AP_E_RABSetupItemBearerSUResIEs__value), offsetof(struct S1AP_E_RABSetupItemBearerSUResIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABSetupItemBearerSUResIEs__value, present), sizeof(((struct S1AP_E_RABSetupItemBearerSUResIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_8, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_8 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_8, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_8 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABSetupItemBearerSUResIEs_5[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupItemBearerSUResIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_6, &asn_PER_memb_S1AP_id_constr_6, memb_S1AP_id_constraint_5 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupItemBearerSUResIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_E_RABSetupItemBearerSUResIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_7, &asn_PER_memb_S1AP_criticality_constr_7, memb_S1AP_criticality_constraint_5 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupItemBearerSUResIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_8, select_E_RABSetupItemBearerSUResIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_8, &asn_PER_memb_S1AP_value_constr_8, memb_S1AP_value_constraint_5 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABSetupItemBearerSUResIEs_tags_5[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABSetupItemBearerSUResIEs_tag2el_5[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABSetupItemBearerSUResIEs_specs_5 = { sizeof(struct S1AP_E_RABSetupItemBearerSUResIEs), offsetof(struct S1AP_E_RABSetupItemBearerSUResIEs, _asn_ctx), asn_MAP_S1AP_E_RABSetupItemBearerSUResIEs_tag2el_5, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupItemBearerSUResIEs = { "E-RABSetupItemBearerSUResIEs", "E-RABSetupItemBearerSUResIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABSetupItemBearerSUResIEs_tags_5, sizeof(asn_DEF_S1AP_E_RABSetupItemBearerSUResIEs_tags_5) /sizeof(asn_DEF_S1AP_E_RABSetupItemBearerSUResIEs_tags_5[0]), /* 1 */ asn_DEF_S1AP_E_RABSetupItemBearerSUResIEs_tags_5, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABSetupItemBearerSUResIEs_tags_5) /sizeof(asn_DEF_S1AP_E_RABSetupItemBearerSUResIEs_tags_5[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABSetupItemBearerSUResIEs_5, 3, /* Elements count */ &asn_SPC_S1AP_E_RABSetupItemBearerSUResIEs_specs_5 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_12[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeModifiedItemBearerModReqIEs__value, choice.E_RABToBeModifiedItemBearerModReq), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABToBeModifiedItemBearerModReq, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABToBeModifiedItemBearerModReq" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_12[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E-RABToBeModifiedItemBearerModReq */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_12 = { sizeof(struct S1AP_E_RABToBeModifiedItemBearerModReqIEs__value), offsetof(struct S1AP_E_RABToBeModifiedItemBearerModReqIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABToBeModifiedItemBearerModReqIEs__value, present), sizeof(((struct S1AP_E_RABToBeModifiedItemBearerModReqIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_12, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_12 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_12, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_12 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeModifiedItemBearerModReqIEs_9[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeModifiedItemBearerModReqIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_10, &asn_PER_memb_S1AP_id_constr_10, memb_S1AP_id_constraint_9 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeModifiedItemBearerModReqIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_E_RABToBeModifiedItemBearerModReqIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_11, &asn_PER_memb_S1AP_criticality_constr_11, memb_S1AP_criticality_constraint_9 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeModifiedItemBearerModReqIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_12, select_E_RABToBeModifiedItemBearerModReqIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_12, &asn_PER_memb_S1AP_value_constr_12, memb_S1AP_value_constraint_9 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeModifiedItemBearerModReqIEs_tags_9[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABToBeModifiedItemBearerModReqIEs_tag2el_9[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeModifiedItemBearerModReqIEs_specs_9 = { sizeof(struct S1AP_E_RABToBeModifiedItemBearerModReqIEs), offsetof(struct S1AP_E_RABToBeModifiedItemBearerModReqIEs, _asn_ctx), asn_MAP_S1AP_E_RABToBeModifiedItemBearerModReqIEs_tag2el_9, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeModifiedItemBearerModReqIEs = { "E-RABToBeModifiedItemBearerModReqIEs", "E-RABToBeModifiedItemBearerModReqIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABToBeModifiedItemBearerModReqIEs_tags_9, sizeof(asn_DEF_S1AP_E_RABToBeModifiedItemBearerModReqIEs_tags_9) /sizeof(asn_DEF_S1AP_E_RABToBeModifiedItemBearerModReqIEs_tags_9[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeModifiedItemBearerModReqIEs_tags_9, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeModifiedItemBearerModReqIEs_tags_9) /sizeof(asn_DEF_S1AP_E_RABToBeModifiedItemBearerModReqIEs_tags_9[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeModifiedItemBearerModReqIEs_9, 3, /* Elements count */ &asn_SPC_S1AP_E_RABToBeModifiedItemBearerModReqIEs_specs_9 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_16[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyItemBearerModResIEs__value, choice.E_RABModifyItemBearerModRes), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABModifyItemBearerModRes, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABModifyItemBearerModRes" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_16[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E-RABModifyItemBearerModRes */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_16 = { sizeof(struct S1AP_E_RABModifyItemBearerModResIEs__value), offsetof(struct S1AP_E_RABModifyItemBearerModResIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABModifyItemBearerModResIEs__value, present), sizeof(((struct S1AP_E_RABModifyItemBearerModResIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_16, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_16 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_16, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_16 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABModifyItemBearerModResIEs_13[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyItemBearerModResIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_14, &asn_PER_memb_S1AP_id_constr_14, memb_S1AP_id_constraint_13 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyItemBearerModResIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_E_RABModifyItemBearerModResIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_15, &asn_PER_memb_S1AP_criticality_constr_15, memb_S1AP_criticality_constraint_13 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyItemBearerModResIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_16, select_E_RABModifyItemBearerModResIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_16, &asn_PER_memb_S1AP_value_constr_16, memb_S1AP_value_constraint_13 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABModifyItemBearerModResIEs_tags_13[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABModifyItemBearerModResIEs_tag2el_13[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModifyItemBearerModResIEs_specs_13 = { sizeof(struct S1AP_E_RABModifyItemBearerModResIEs), offsetof(struct S1AP_E_RABModifyItemBearerModResIEs, _asn_ctx), asn_MAP_S1AP_E_RABModifyItemBearerModResIEs_tag2el_13, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyItemBearerModResIEs = { "E-RABModifyItemBearerModResIEs", "E-RABModifyItemBearerModResIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABModifyItemBearerModResIEs_tags_13, sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModResIEs_tags_13) /sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModResIEs_tags_13[0]), /* 1 */ asn_DEF_S1AP_E_RABModifyItemBearerModResIEs_tags_13, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModResIEs_tags_13) /sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModResIEs_tags_13[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABModifyItemBearerModResIEs_13, 3, /* Elements count */ &asn_SPC_S1AP_E_RABModifyItemBearerModResIEs_specs_13 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_20[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseItemBearerRelCompIEs__value, choice.E_RABReleaseItemBearerRelComp), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABReleaseItemBearerRelComp, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABReleaseItemBearerRelComp" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_20[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E-RABReleaseItemBearerRelComp */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_20 = { sizeof(struct S1AP_E_RABReleaseItemBearerRelCompIEs__value), offsetof(struct S1AP_E_RABReleaseItemBearerRelCompIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABReleaseItemBearerRelCompIEs__value, present), sizeof(((struct S1AP_E_RABReleaseItemBearerRelCompIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_20, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_20 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_20, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_20 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABReleaseItemBearerRelCompIEs_17[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseItemBearerRelCompIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_18, &asn_PER_memb_S1AP_id_constr_18, memb_S1AP_id_constraint_17 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseItemBearerRelCompIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_E_RABReleaseItemBearerRelCompIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_19, &asn_PER_memb_S1AP_criticality_constr_19, memb_S1AP_criticality_constraint_17 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseItemBearerRelCompIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_20, select_E_RABReleaseItemBearerRelCompIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_20, &asn_PER_memb_S1AP_value_constr_20, memb_S1AP_value_constraint_17 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABReleaseItemBearerRelCompIEs_tags_17[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABReleaseItemBearerRelCompIEs_tag2el_17[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABReleaseItemBearerRelCompIEs_specs_17 = { sizeof(struct S1AP_E_RABReleaseItemBearerRelCompIEs), offsetof(struct S1AP_E_RABReleaseItemBearerRelCompIEs, _asn_ctx), asn_MAP_S1AP_E_RABReleaseItemBearerRelCompIEs_tag2el_17, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABReleaseItemBearerRelCompIEs = { "E-RABReleaseItemBearerRelCompIEs", "E-RABReleaseItemBearerRelCompIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABReleaseItemBearerRelCompIEs_tags_17, sizeof(asn_DEF_S1AP_E_RABReleaseItemBearerRelCompIEs_tags_17) /sizeof(asn_DEF_S1AP_E_RABReleaseItemBearerRelCompIEs_tags_17[0]), /* 1 */ asn_DEF_S1AP_E_RABReleaseItemBearerRelCompIEs_tags_17, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABReleaseItemBearerRelCompIEs_tags_17) /sizeof(asn_DEF_S1AP_E_RABReleaseItemBearerRelCompIEs_tags_17[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABReleaseItemBearerRelCompIEs_17, 3, /* Elements count */ &asn_SPC_S1AP_E_RABReleaseItemBearerRelCompIEs_specs_17 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_24[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReqIEs__value, choice.E_RABToBeSetupItemCtxtSUReq), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReq, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABToBeSetupItemCtxtSUReq" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_24[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E-RABToBeSetupItemCtxtSUReq */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_24 = { sizeof(struct S1AP_E_RABToBeSetupItemCtxtSUReqIEs__value), offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReqIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReqIEs__value, present), sizeof(((struct S1AP_E_RABToBeSetupItemCtxtSUReqIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_24, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_24 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_24, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_24 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSetupItemCtxtSUReqIEs_21[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReqIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_22, &asn_PER_memb_S1AP_id_constr_22, memb_S1AP_id_constraint_21 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReqIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_E_RABToBeSetupItemCtxtSUReqIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_23, &asn_PER_memb_S1AP_criticality_constr_23, memb_S1AP_criticality_constraint_21 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReqIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_24, select_E_RABToBeSetupItemCtxtSUReqIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_24, &asn_PER_memb_S1AP_value_constr_24, memb_S1AP_value_constraint_21 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReqIEs_tags_21[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABToBeSetupItemCtxtSUReqIEs_tag2el_21[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSetupItemCtxtSUReqIEs_specs_21 = { sizeof(struct S1AP_E_RABToBeSetupItemCtxtSUReqIEs), offsetof(struct S1AP_E_RABToBeSetupItemCtxtSUReqIEs, _asn_ctx), asn_MAP_S1AP_E_RABToBeSetupItemCtxtSUReqIEs_tag2el_21, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReqIEs = { "E-RABToBeSetupItemCtxtSUReqIEs", "E-RABToBeSetupItemCtxtSUReqIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReqIEs_tags_21, sizeof(asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReqIEs_tags_21) /sizeof(asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReqIEs_tags_21[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReqIEs_tags_21, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReqIEs_tags_21) /sizeof(asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReqIEs_tags_21[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeSetupItemCtxtSUReqIEs_21, 3, /* Elements count */ &asn_SPC_S1AP_E_RABToBeSetupItemCtxtSUReqIEs_specs_21 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_28[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupItemCtxtSUResIEs__value, choice.E_RABSetupItemCtxtSURes), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABSetupItemCtxtSURes, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABSetupItemCtxtSURes" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_28[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E-RABSetupItemCtxtSURes */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_28 = { sizeof(struct S1AP_E_RABSetupItemCtxtSUResIEs__value), offsetof(struct S1AP_E_RABSetupItemCtxtSUResIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABSetupItemCtxtSUResIEs__value, present), sizeof(((struct S1AP_E_RABSetupItemCtxtSUResIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_28, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_28 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_28, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_28 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABSetupItemCtxtSUResIEs_25[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupItemCtxtSUResIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_26, &asn_PER_memb_S1AP_id_constr_26, memb_S1AP_id_constraint_25 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupItemCtxtSUResIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_E_RABSetupItemCtxtSUResIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_27, &asn_PER_memb_S1AP_criticality_constr_27, memb_S1AP_criticality_constraint_25 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupItemCtxtSUResIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_28, select_E_RABSetupItemCtxtSUResIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_28, &asn_PER_memb_S1AP_value_constr_28, memb_S1AP_value_constraint_25 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABSetupItemCtxtSUResIEs_tags_25[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABSetupItemCtxtSUResIEs_tag2el_25[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABSetupItemCtxtSUResIEs_specs_25 = { sizeof(struct S1AP_E_RABSetupItemCtxtSUResIEs), offsetof(struct S1AP_E_RABSetupItemCtxtSUResIEs, _asn_ctx), asn_MAP_S1AP_E_RABSetupItemCtxtSUResIEs_tag2el_25, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupItemCtxtSUResIEs = { "E-RABSetupItemCtxtSUResIEs", "E-RABSetupItemCtxtSUResIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABSetupItemCtxtSUResIEs_tags_25, sizeof(asn_DEF_S1AP_E_RABSetupItemCtxtSUResIEs_tags_25) /sizeof(asn_DEF_S1AP_E_RABSetupItemCtxtSUResIEs_tags_25[0]), /* 1 */ asn_DEF_S1AP_E_RABSetupItemCtxtSUResIEs_tags_25, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABSetupItemCtxtSUResIEs_tags_25) /sizeof(asn_DEF_S1AP_E_RABSetupItemCtxtSUResIEs_tags_25[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABSetupItemCtxtSUResIEs_25, 3, /* Elements count */ &asn_SPC_S1AP_E_RABSetupItemCtxtSUResIEs_specs_25 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_32[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TAIItemIEs__value, choice.TAIItem), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TAIItem, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TAIItem" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_32[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* TAIItem */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_32 = { sizeof(struct S1AP_TAIItemIEs__value), offsetof(struct S1AP_TAIItemIEs__value, _asn_ctx), offsetof(struct S1AP_TAIItemIEs__value, present), sizeof(((struct S1AP_TAIItemIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_32, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_32 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_32, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_32 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_TAIItemIEs_29[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TAIItemIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_30, &asn_PER_memb_S1AP_id_constr_30, memb_S1AP_id_constraint_29 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TAIItemIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_TAIItemIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_31, &asn_PER_memb_S1AP_criticality_constr_31, memb_S1AP_criticality_constraint_29 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_TAIItemIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_32, select_TAIItemIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_32, &asn_PER_memb_S1AP_value_constr_32, memb_S1AP_value_constraint_29 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TAIItemIEs_tags_29[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TAIItemIEs_tag2el_29[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_TAIItemIEs_specs_29 = { sizeof(struct S1AP_TAIItemIEs), offsetof(struct S1AP_TAIItemIEs, _asn_ctx), asn_MAP_S1AP_TAIItemIEs_tag2el_29, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TAIItemIEs = { "TAIItemIEs", "TAIItemIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_TAIItemIEs_tags_29, sizeof(asn_DEF_S1AP_TAIItemIEs_tags_29) /sizeof(asn_DEF_S1AP_TAIItemIEs_tags_29[0]), /* 1 */ asn_DEF_S1AP_TAIItemIEs_tags_29, /* Same as above */ sizeof(asn_DEF_S1AP_TAIItemIEs_tags_29) /sizeof(asn_DEF_S1AP_TAIItemIEs_tags_29[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TAIItemIEs_29, 3, /* Elements count */ &asn_SPC_S1AP_TAIItemIEs_specs_29 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_36[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemRes__value, choice.UE_associatedLogicalS1_ConnectionItem), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItem, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UE-associatedLogicalS1-ConnectionItem" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_36[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* UE-associatedLogicalS1-ConnectionItem */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_36 = { sizeof(struct S1AP_UE_associatedLogicalS1_ConnectionItemRes__value), offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemRes__value, _asn_ctx), offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemRes__value, present), sizeof(((struct S1AP_UE_associatedLogicalS1_ConnectionItemRes__value *)0)->present), asn_MAP_S1AP_value_tag2el_36, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_36 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_36, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_36 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UE_associatedLogicalS1_ConnectionItemRes_33[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemRes, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_34, &asn_PER_memb_S1AP_id_constr_34, memb_S1AP_id_constraint_33 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemRes, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UE_associatedLogicalS1_ConnectionItemRes_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_35, &asn_PER_memb_S1AP_criticality_constr_35, memb_S1AP_criticality_constraint_33 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemRes, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_36, select_UE_associatedLogicalS1_ConnectionItemRes_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_36, &asn_PER_memb_S1AP_value_constr_36, memb_S1AP_value_constraint_33 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemRes_tags_33[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UE_associatedLogicalS1_ConnectionItemRes_tag2el_33[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UE_associatedLogicalS1_ConnectionItemRes_specs_33 = { sizeof(struct S1AP_UE_associatedLogicalS1_ConnectionItemRes), offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemRes, _asn_ctx), asn_MAP_S1AP_UE_associatedLogicalS1_ConnectionItemRes_tag2el_33, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemRes = { "UE-associatedLogicalS1-ConnectionItemRes", "UE-associatedLogicalS1-ConnectionItemRes", &asn_OP_SEQUENCE, asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemRes_tags_33, sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemRes_tags_33) /sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemRes_tags_33[0]), /* 1 */ asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemRes_tags_33, /* Same as above */ sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemRes_tags_33) /sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemRes_tags_33[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UE_associatedLogicalS1_ConnectionItemRes_33, 3, /* Elements count */ &asn_SPC_S1AP_UE_associatedLogicalS1_ConnectionItemRes_specs_33 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_40[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemResAck__value, choice.UE_associatedLogicalS1_ConnectionItem), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItem, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UE-associatedLogicalS1-ConnectionItem" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_40[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* UE-associatedLogicalS1-ConnectionItem */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_40 = { sizeof(struct S1AP_UE_associatedLogicalS1_ConnectionItemResAck__value), offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemResAck__value, _asn_ctx), offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemResAck__value, present), sizeof(((struct S1AP_UE_associatedLogicalS1_ConnectionItemResAck__value *)0)->present), asn_MAP_S1AP_value_tag2el_40, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_40 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_40, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_40 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UE_associatedLogicalS1_ConnectionItemResAck_37[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemResAck, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_38, &asn_PER_memb_S1AP_id_constr_38, memb_S1AP_id_constraint_37 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemResAck, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UE_associatedLogicalS1_ConnectionItemResAck_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_39, &asn_PER_memb_S1AP_criticality_constr_39, memb_S1AP_criticality_constraint_37 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemResAck, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_40, select_UE_associatedLogicalS1_ConnectionItemResAck_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_40, &asn_PER_memb_S1AP_value_constr_40, memb_S1AP_value_constraint_37 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemResAck_tags_37[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UE_associatedLogicalS1_ConnectionItemResAck_tag2el_37[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UE_associatedLogicalS1_ConnectionItemResAck_specs_37 = { sizeof(struct S1AP_UE_associatedLogicalS1_ConnectionItemResAck), offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItemResAck, _asn_ctx), asn_MAP_S1AP_UE_associatedLogicalS1_ConnectionItemResAck_tag2el_37, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemResAck = { "UE-associatedLogicalS1-ConnectionItemResAck", "UE-associatedLogicalS1-ConnectionItemResAck", &asn_OP_SEQUENCE, asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemResAck_tags_37, sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemResAck_tags_37) /sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemResAck_tags_37[0]), /* 1 */ asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemResAck_tags_37, /* Same as above */ sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemResAck_tags_37) /sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemResAck_tags_37[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UE_associatedLogicalS1_ConnectionItemResAck_37, 3, /* Elements count */ &asn_SPC_S1AP_UE_associatedLogicalS1_ConnectionItemResAck_specs_37 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_44[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyItemBearerModConfIEs__value, choice.E_RABModifyItemBearerModConf), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABModifyItemBearerModConf, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABModifyItemBearerModConf" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_44[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E-RABModifyItemBearerModConf */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_44 = { sizeof(struct S1AP_E_RABModifyItemBearerModConfIEs__value), offsetof(struct S1AP_E_RABModifyItemBearerModConfIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABModifyItemBearerModConfIEs__value, present), sizeof(((struct S1AP_E_RABModifyItemBearerModConfIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_44, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_44 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_44, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_44 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABModifyItemBearerModConfIEs_41[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyItemBearerModConfIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_42, &asn_PER_memb_S1AP_id_constr_42, memb_S1AP_id_constraint_41 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyItemBearerModConfIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_E_RABModifyItemBearerModConfIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_43, &asn_PER_memb_S1AP_criticality_constr_43, memb_S1AP_criticality_constraint_41 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyItemBearerModConfIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_44, select_E_RABModifyItemBearerModConfIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_44, &asn_PER_memb_S1AP_value_constr_44, memb_S1AP_value_constraint_41 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABModifyItemBearerModConfIEs_tags_41[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABModifyItemBearerModConfIEs_tag2el_41[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModifyItemBearerModConfIEs_specs_41 = { sizeof(struct S1AP_E_RABModifyItemBearerModConfIEs), offsetof(struct S1AP_E_RABModifyItemBearerModConfIEs, _asn_ctx), asn_MAP_S1AP_E_RABModifyItemBearerModConfIEs_tag2el_41, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyItemBearerModConfIEs = { "E-RABModifyItemBearerModConfIEs", "E-RABModifyItemBearerModConfIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABModifyItemBearerModConfIEs_tags_41, sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModConfIEs_tags_41) /sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModConfIEs_tags_41[0]), /* 1 */ asn_DEF_S1AP_E_RABModifyItemBearerModConfIEs_tags_41, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModConfIEs_tags_41) /sizeof(asn_DEF_S1AP_E_RABModifyItemBearerModConfIEs_tags_41[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABModifyItemBearerModConfIEs_41, 3, /* Elements count */ &asn_SPC_S1AP_E_RABModifyItemBearerModConfIEs_specs_41 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_48[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemIEs__value, choice.Bearers_SubjectToStatusTransfer_Item), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_Item, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Bearers-SubjectToStatusTransfer-Item" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_48[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* Bearers-SubjectToStatusTransfer-Item */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_48 = { sizeof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemIEs__value), offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemIEs__value, _asn_ctx), offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemIEs__value, present), sizeof(((struct S1AP_Bearers_SubjectToStatusTransfer_ItemIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_48, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_48 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_48, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_48 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_45[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_46, &asn_PER_memb_S1AP_id_constr_46, memb_S1AP_id_constraint_45 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_Bearers_SubjectToStatusTransfer_ItemIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_47, &asn_PER_memb_S1AP_criticality_constr_47, memb_S1AP_criticality_constraint_45 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_48, select_Bearers_SubjectToStatusTransfer_ItemIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_48, &asn_PER_memb_S1AP_value_constr_48, memb_S1AP_value_constraint_45 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_tags_45[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_tag2el_45[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_specs_45 = { sizeof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemIEs), offsetof(struct S1AP_Bearers_SubjectToStatusTransfer_ItemIEs, _asn_ctx), asn_MAP_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_tag2el_45, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs = { "Bearers-SubjectToStatusTransfer-ItemIEs", "Bearers-SubjectToStatusTransfer-ItemIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_tags_45, sizeof(asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_tags_45) /sizeof(asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_tags_45[0]), /* 1 */ asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_tags_45, /* Same as above */ sizeof(asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_tags_45) /sizeof(asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_tags_45[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_45, 3, /* Elements count */ &asn_SPC_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_specs_45 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_52[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABInformationListIEs__value, choice.E_RABInformationListItem), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABInformationListItem, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABInformationListItem" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_52[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E-RABInformationListItem */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_52 = { sizeof(struct S1AP_E_RABInformationListIEs__value), offsetof(struct S1AP_E_RABInformationListIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABInformationListIEs__value, present), sizeof(((struct S1AP_E_RABInformationListIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_52, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_52 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_52, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_52 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABInformationListIEs_49[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABInformationListIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_50, &asn_PER_memb_S1AP_id_constr_50, memb_S1AP_id_constraint_49 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABInformationListIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_E_RABInformationListIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_51, &asn_PER_memb_S1AP_criticality_constr_51, memb_S1AP_criticality_constraint_49 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABInformationListIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_52, select_E_RABInformationListIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_52, &asn_PER_memb_S1AP_value_constr_52, memb_S1AP_value_constraint_49 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABInformationListIEs_tags_49[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABInformationListIEs_tag2el_49[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABInformationListIEs_specs_49 = { sizeof(struct S1AP_E_RABInformationListIEs), offsetof(struct S1AP_E_RABInformationListIEs, _asn_ctx), asn_MAP_S1AP_E_RABInformationListIEs_tag2el_49, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABInformationListIEs = { "E-RABInformationListIEs", "E-RABInformationListIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABInformationListIEs_tags_49, sizeof(asn_DEF_S1AP_E_RABInformationListIEs_tags_49) /sizeof(asn_DEF_S1AP_E_RABInformationListIEs_tags_49[0]), /* 1 */ asn_DEF_S1AP_E_RABInformationListIEs_tags_49, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABInformationListIEs_tags_49) /sizeof(asn_DEF_S1AP_E_RABInformationListIEs_tags_49[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABInformationListIEs_49, 3, /* Elements count */ &asn_SPC_S1AP_E_RABInformationListIEs_specs_49 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_56[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABItemIEs__value, choice.E_RABItem), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABItem, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABItem" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_56[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E-RABItem */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_56 = { sizeof(struct S1AP_E_RABItemIEs__value), offsetof(struct S1AP_E_RABItemIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABItemIEs__value, present), sizeof(((struct S1AP_E_RABItemIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_56, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_56 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_56, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_56 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABItemIEs_53[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABItemIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_54, &asn_PER_memb_S1AP_id_constr_54, memb_S1AP_id_constraint_53 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABItemIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_E_RABItemIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_55, &asn_PER_memb_S1AP_criticality_constr_55, memb_S1AP_criticality_constraint_53 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABItemIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_56, select_E_RABItemIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_56, &asn_PER_memb_S1AP_value_constr_56, memb_S1AP_value_constraint_53 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABItemIEs_tags_53[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABItemIEs_tag2el_53[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABItemIEs_specs_53 = { sizeof(struct S1AP_E_RABItemIEs), offsetof(struct S1AP_E_RABItemIEs, _asn_ctx), asn_MAP_S1AP_E_RABItemIEs_tag2el_53, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABItemIEs = { "E-RABItemIEs", "E-RABItemIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABItemIEs_tags_53, sizeof(asn_DEF_S1AP_E_RABItemIEs_tags_53) /sizeof(asn_DEF_S1AP_E_RABItemIEs_tags_53[0]), /* 1 */ asn_DEF_S1AP_E_RABItemIEs_tags_53, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABItemIEs_tags_53) /sizeof(asn_DEF_S1AP_E_RABItemIEs_tags_53[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABItemIEs_53, 3, /* Elements count */ &asn_SPC_S1AP_E_RABItemIEs_specs_53 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_60[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MDTMode_ExtensionIE__value, choice.LoggedMBSFNMDT), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_LoggedMBSFNMDT, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "LoggedMBSFNMDT" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_60[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* LoggedMBSFNMDT */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_60 = { sizeof(struct S1AP_MDTMode_ExtensionIE__value), offsetof(struct S1AP_MDTMode_ExtensionIE__value, _asn_ctx), offsetof(struct S1AP_MDTMode_ExtensionIE__value, present), sizeof(((struct S1AP_MDTMode_ExtensionIE__value *)0)->present), asn_MAP_S1AP_value_tag2el_60, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_60 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_60, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_60 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_MDTMode_ExtensionIE_57[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MDTMode_ExtensionIE, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_58, &asn_PER_memb_S1AP_id_constr_58, memb_S1AP_id_constraint_57 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_MDTMode_ExtensionIE, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_MDTMode_ExtensionIE_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_59, &asn_PER_memb_S1AP_criticality_constr_59, memb_S1AP_criticality_constraint_57 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_MDTMode_ExtensionIE, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_60, select_MDTMode_ExtensionIE_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_60, &asn_PER_memb_S1AP_value_constr_60, memb_S1AP_value_constraint_57 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_MDTMode_ExtensionIE_tags_57[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MDTMode_ExtensionIE_tag2el_57[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_MDTMode_ExtensionIE_specs_57 = { sizeof(struct S1AP_MDTMode_ExtensionIE), offsetof(struct S1AP_MDTMode_ExtensionIE, _asn_ctx), asn_MAP_S1AP_MDTMode_ExtensionIE_tag2el_57, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MDTMode_ExtensionIE = { "MDTMode-ExtensionIE", "MDTMode-ExtensionIE", &asn_OP_SEQUENCE, asn_DEF_S1AP_MDTMode_ExtensionIE_tags_57, sizeof(asn_DEF_S1AP_MDTMode_ExtensionIE_tags_57) /sizeof(asn_DEF_S1AP_MDTMode_ExtensionIE_tags_57[0]), /* 1 */ asn_DEF_S1AP_MDTMode_ExtensionIE_tags_57, /* Same as above */ sizeof(asn_DEF_S1AP_MDTMode_ExtensionIE_tags_57) /sizeof(asn_DEF_S1AP_MDTMode_ExtensionIE_tags_57[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_MDTMode_ExtensionIE_57, 3, /* Elements count */ &asn_SPC_S1AP_MDTMode_ExtensionIE_specs_57 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_64[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedCellItemIEs__value, choice.RecommendedCellItem), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_RecommendedCellItem, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "RecommendedCellItem" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_64[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RecommendedCellItem */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_64 = { sizeof(struct S1AP_RecommendedCellItemIEs__value), offsetof(struct S1AP_RecommendedCellItemIEs__value, _asn_ctx), offsetof(struct S1AP_RecommendedCellItemIEs__value, present), sizeof(((struct S1AP_RecommendedCellItemIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_64, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_64 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_64, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_64 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_RecommendedCellItemIEs_61[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedCellItemIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_62, &asn_PER_memb_S1AP_id_constr_62, memb_S1AP_id_constraint_61 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedCellItemIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_RecommendedCellItemIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_63, &asn_PER_memb_S1AP_criticality_constr_63, memb_S1AP_criticality_constraint_61 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedCellItemIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_64, select_RecommendedCellItemIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_64, &asn_PER_memb_S1AP_value_constr_64, memb_S1AP_value_constraint_61 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_RecommendedCellItemIEs_tags_61[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_RecommendedCellItemIEs_tag2el_61[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_RecommendedCellItemIEs_specs_61 = { sizeof(struct S1AP_RecommendedCellItemIEs), offsetof(struct S1AP_RecommendedCellItemIEs, _asn_ctx), asn_MAP_S1AP_RecommendedCellItemIEs_tag2el_61, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedCellItemIEs = { "RecommendedCellItemIEs", "RecommendedCellItemIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_RecommendedCellItemIEs_tags_61, sizeof(asn_DEF_S1AP_RecommendedCellItemIEs_tags_61) /sizeof(asn_DEF_S1AP_RecommendedCellItemIEs_tags_61[0]), /* 1 */ asn_DEF_S1AP_RecommendedCellItemIEs_tags_61, /* Same as above */ sizeof(asn_DEF_S1AP_RecommendedCellItemIEs_tags_61) /sizeof(asn_DEF_S1AP_RecommendedCellItemIEs_tags_61[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_RecommendedCellItemIEs_61, 3, /* Elements count */ &asn_SPC_S1AP_RecommendedCellItemIEs_specs_61 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_68[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedENBItemIEs__value, choice.RecommendedENBItem), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_RecommendedENBItem, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "RecommendedENBItem" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_68[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* RecommendedENBItem */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_68 = { sizeof(struct S1AP_RecommendedENBItemIEs__value), offsetof(struct S1AP_RecommendedENBItemIEs__value, _asn_ctx), offsetof(struct S1AP_RecommendedENBItemIEs__value, present), sizeof(((struct S1AP_RecommendedENBItemIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_68, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_68 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_68, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_68 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_RecommendedENBItemIEs_65[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedENBItemIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_66, &asn_PER_memb_S1AP_id_constr_66, memb_S1AP_id_constraint_65 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedENBItemIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_RecommendedENBItemIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_67, &asn_PER_memb_S1AP_criticality_constr_67, memb_S1AP_criticality_constraint_65 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedENBItemIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_68, select_RecommendedENBItemIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_68, &asn_PER_memb_S1AP_value_constr_68, memb_S1AP_value_constraint_65 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_RecommendedENBItemIEs_tags_65[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_RecommendedENBItemIEs_tag2el_65[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_RecommendedENBItemIEs_specs_65 = { sizeof(struct S1AP_RecommendedENBItemIEs), offsetof(struct S1AP_RecommendedENBItemIEs, _asn_ctx), asn_MAP_S1AP_RecommendedENBItemIEs_tag2el_65, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedENBItemIEs = { "RecommendedENBItemIEs", "RecommendedENBItemIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_RecommendedENBItemIEs_tags_65, sizeof(asn_DEF_S1AP_RecommendedENBItemIEs_tags_65) /sizeof(asn_DEF_S1AP_RecommendedENBItemIEs_tags_65[0]), /* 1 */ asn_DEF_S1AP_RecommendedENBItemIEs_tags_65, /* Same as above */ sizeof(asn_DEF_S1AP_RecommendedENBItemIEs_tags_65) /sizeof(asn_DEF_S1AP_RecommendedENBItemIEs_tags_65[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_RecommendedENBItemIEs_65, 3, /* Elements count */ &asn_SPC_S1AP_RecommendedENBItemIEs_specs_65 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_72[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_SONInformation_ExtensionIE__value, choice.SONInformationReport), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_SONInformationReport, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SONInformationReport" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_72[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* rLFReportInformation */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_72 = { sizeof(struct S1AP_SONInformation_ExtensionIE__value), offsetof(struct S1AP_SONInformation_ExtensionIE__value, _asn_ctx), offsetof(struct S1AP_SONInformation_ExtensionIE__value, present), sizeof(((struct S1AP_SONInformation_ExtensionIE__value *)0)->present), asn_MAP_S1AP_value_tag2el_72, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_72 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_72, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_72 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_SONInformation_ExtensionIE_69[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_SONInformation_ExtensionIE, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_70, &asn_PER_memb_S1AP_id_constr_70, memb_S1AP_id_constraint_69 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SONInformation_ExtensionIE, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_SONInformation_ExtensionIE_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_71, &asn_PER_memb_S1AP_criticality_constr_71, memb_S1AP_criticality_constraint_69 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_SONInformation_ExtensionIE, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_72, select_SONInformation_ExtensionIE_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_72, &asn_PER_memb_S1AP_value_constr_72, memb_S1AP_value_constraint_69 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_SONInformation_ExtensionIE_tags_69[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_SONInformation_ExtensionIE_tag2el_69[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_SONInformation_ExtensionIE_specs_69 = { sizeof(struct S1AP_SONInformation_ExtensionIE), offsetof(struct S1AP_SONInformation_ExtensionIE, _asn_ctx), asn_MAP_S1AP_SONInformation_ExtensionIE_tag2el_69, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_SONInformation_ExtensionIE = { "SONInformation-ExtensionIE", "SONInformation-ExtensionIE", &asn_OP_SEQUENCE, asn_DEF_S1AP_SONInformation_ExtensionIE_tags_69, sizeof(asn_DEF_S1AP_SONInformation_ExtensionIE_tags_69) /sizeof(asn_DEF_S1AP_SONInformation_ExtensionIE_tags_69[0]), /* 1 */ asn_DEF_S1AP_SONInformation_ExtensionIE_tags_69, /* Same as above */ sizeof(asn_DEF_S1AP_SONInformation_ExtensionIE_tags_69) /sizeof(asn_DEF_S1AP_SONInformation_ExtensionIE_tags_69[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_SONInformation_ExtensionIE_69, 3, /* Elements count */ &asn_SPC_S1AP_SONInformation_ExtensionIE_specs_69 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_76[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequiredIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequiredIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequiredIEs__value, choice.HandoverType), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_HandoverType, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "HandoverType" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequiredIEs__value, choice.Cause), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cause" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequiredIEs__value, choice.TargetID), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_TargetID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TargetID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequiredIEs__value, choice.Direct_Forwarding_Path_Availability), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_Direct_Forwarding_Path_Availability, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Direct-Forwarding-Path-Availability" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequiredIEs__value, choice.SRVCCHOIndication), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_SRVCCHOIndication, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SRVCCHOIndication" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequiredIEs__value, choice.Source_ToTarget_TransparentContainer), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_Source_ToTarget_TransparentContainer, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Source-ToTarget-TransparentContainer" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequiredIEs__value, choice.MSClassmark2), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_MSClassmark2, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MSClassmark2" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequiredIEs__value, choice.MSClassmark3), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_MSClassmark3, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MSClassmark3" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequiredIEs__value, choice.CSG_Id), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_CSG_Id, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CSG-Id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequiredIEs__value, choice.CellAccessMode), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_CellAccessMode, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CellAccessMode" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequiredIEs__value, choice.PS_ServiceNotAvailable), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_PS_ServiceNotAvailable, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "PS-ServiceNotAvailable" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_76[] = { 0, 1, 10, 7, 8, 9, 2, 5, 6, 11, 12, 3, 4 }; static const unsigned asn_MAP_S1AP_value_from_canonical_76[] = { 0, 1, 6, 11, 12, 7, 8, 3, 4, 5, 2, 9, 10 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_76[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 10, 0, 0 }, /* CSG-Id */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 7, 0, 2 }, /* Source-ToTarget-TransparentContainer */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 8, -1, 1 }, /* MSClassmark2 */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 9, -2, 0 }, /* MSClassmark3 */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 2, 0, 4 }, /* HandoverType */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 5, -1, 3 }, /* Direct-Forwarding-Path-Availability */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 6, -2, 2 }, /* SRVCCHOIndication */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 11, -3, 1 }, /* CellAccessMode */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 12, -4, 0 }, /* PS-ServiceNotAvailable */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 3, 0, 1 }, /* radioNetwork */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 4, -1, 0 }, /* targeteNB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 3, 0, 1 }, /* transport */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 4, -1, 0 }, /* targetRNC-ID */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 3, 0, 1 }, /* nas */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 4, -1, 0 }, /* cGI */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* protocol */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 3, 0, 0 } /* misc */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_76 = { sizeof(struct S1AP_HandoverRequiredIEs__value), offsetof(struct S1AP_HandoverRequiredIEs__value, _asn_ctx), offsetof(struct S1AP_HandoverRequiredIEs__value, present), sizeof(((struct S1AP_HandoverRequiredIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_76, 19, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_76, asn_MAP_S1AP_value_from_canonical_76, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_76 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_76, 13, /* Elements count */ &asn_SPC_S1AP_value_specs_76 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_HandoverRequiredIEs_73[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequiredIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_74, &asn_PER_memb_S1AP_id_constr_74, memb_S1AP_id_constraint_73 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequiredIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_HandoverRequiredIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_75, &asn_PER_memb_S1AP_criticality_constr_75, memb_S1AP_criticality_constraint_73 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequiredIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_76, select_HandoverRequiredIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_76, &asn_PER_memb_S1AP_value_constr_76, memb_S1AP_value_constraint_73 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_HandoverRequiredIEs_tags_73[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_HandoverRequiredIEs_tag2el_73[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverRequiredIEs_specs_73 = { sizeof(struct S1AP_HandoverRequiredIEs), offsetof(struct S1AP_HandoverRequiredIEs, _asn_ctx), asn_MAP_S1AP_HandoverRequiredIEs_tag2el_73, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverRequiredIEs = { "HandoverRequiredIEs", "HandoverRequiredIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_HandoverRequiredIEs_tags_73, sizeof(asn_DEF_S1AP_HandoverRequiredIEs_tags_73) /sizeof(asn_DEF_S1AP_HandoverRequiredIEs_tags_73[0]), /* 1 */ asn_DEF_S1AP_HandoverRequiredIEs_tags_73, /* Same as above */ sizeof(asn_DEF_S1AP_HandoverRequiredIEs_tags_73) /sizeof(asn_DEF_S1AP_HandoverRequiredIEs_tags_73[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_HandoverRequiredIEs_73, 3, /* Elements count */ &asn_SPC_S1AP_HandoverRequiredIEs_specs_73 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_80[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCommandIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCommandIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCommandIEs__value, choice.HandoverType), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_HandoverType, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "HandoverType" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCommandIEs__value, choice.NASSecurityParametersfromE_UTRAN), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_NASSecurityParametersfromE_UTRAN, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "NASSecurityParametersfromE-UTRAN" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCommandIEs__value, choice.E_RABSubjecttoDataForwardingList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABSubjecttoDataForwardingList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABSubjecttoDataForwardingList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCommandIEs__value, choice.E_RABList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCommandIEs__value, choice.Target_ToSource_TransparentContainer), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_Target_ToSource_TransparentContainer, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Target-ToSource-TransparentContainer" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCommandIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_80[] = { 0, 1, 3, 6, 2, 4, 5, 7 }; static const unsigned asn_MAP_S1AP_value_from_canonical_80[] = { 0, 1, 4, 2, 5, 6, 3, 7 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_80[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 3, 0, 1 }, /* NASSecurityParametersfromE-UTRAN */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 6, -1, 0 }, /* Target-ToSource-TransparentContainer */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 2, 0, 0 }, /* HandoverType */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, 0, 2 }, /* E-RABSubjecttoDataForwardingList */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -1, 1 }, /* E-RABList */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 7, -2, 0 } /* CriticalityDiagnostics */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_80 = { sizeof(struct S1AP_HandoverCommandIEs__value), offsetof(struct S1AP_HandoverCommandIEs__value, _asn_ctx), offsetof(struct S1AP_HandoverCommandIEs__value, present), sizeof(((struct S1AP_HandoverCommandIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_80, 8, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_80, asn_MAP_S1AP_value_from_canonical_80, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_80 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_80, 8, /* Elements count */ &asn_SPC_S1AP_value_specs_80 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_HandoverCommandIEs_77[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCommandIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_78, &asn_PER_memb_S1AP_id_constr_78, memb_S1AP_id_constraint_77 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCommandIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_HandoverCommandIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_79, &asn_PER_memb_S1AP_criticality_constr_79, memb_S1AP_criticality_constraint_77 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCommandIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_80, select_HandoverCommandIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_80, &asn_PER_memb_S1AP_value_constr_80, memb_S1AP_value_constraint_77 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_HandoverCommandIEs_tags_77[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_HandoverCommandIEs_tag2el_77[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverCommandIEs_specs_77 = { sizeof(struct S1AP_HandoverCommandIEs), offsetof(struct S1AP_HandoverCommandIEs, _asn_ctx), asn_MAP_S1AP_HandoverCommandIEs_tag2el_77, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverCommandIEs = { "HandoverCommandIEs", "HandoverCommandIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_HandoverCommandIEs_tags_77, sizeof(asn_DEF_S1AP_HandoverCommandIEs_tags_77) /sizeof(asn_DEF_S1AP_HandoverCommandIEs_tags_77[0]), /* 1 */ asn_DEF_S1AP_HandoverCommandIEs_tags_77, /* Same as above */ sizeof(asn_DEF_S1AP_HandoverCommandIEs_tags_77) /sizeof(asn_DEF_S1AP_HandoverCommandIEs_tags_77[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_HandoverCommandIEs_77, 3, /* Elements count */ &asn_SPC_S1AP_HandoverCommandIEs_specs_77 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_84[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverPreparationFailureIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverPreparationFailureIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverPreparationFailureIEs__value, choice.Cause), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cause" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverPreparationFailureIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_84[] = { 0, 1, 3, 2 }; static const unsigned asn_MAP_S1AP_value_from_canonical_84[] = { 0, 1, 3, 2 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_84[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, 0, 0 }, /* CriticalityDiagnostics */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* radioNetwork */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* transport */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* nas */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* protocol */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 2, 0, 0 } /* misc */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_84 = { sizeof(struct S1AP_HandoverPreparationFailureIEs__value), offsetof(struct S1AP_HandoverPreparationFailureIEs__value, _asn_ctx), offsetof(struct S1AP_HandoverPreparationFailureIEs__value, present), sizeof(((struct S1AP_HandoverPreparationFailureIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_84, 8, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_84, asn_MAP_S1AP_value_from_canonical_84, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_84 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_84, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_84 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_HandoverPreparationFailureIEs_81[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverPreparationFailureIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_82, &asn_PER_memb_S1AP_id_constr_82, memb_S1AP_id_constraint_81 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverPreparationFailureIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_HandoverPreparationFailureIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_83, &asn_PER_memb_S1AP_criticality_constr_83, memb_S1AP_criticality_constraint_81 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverPreparationFailureIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_84, select_HandoverPreparationFailureIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_84, &asn_PER_memb_S1AP_value_constr_84, memb_S1AP_value_constraint_81 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_HandoverPreparationFailureIEs_tags_81[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_HandoverPreparationFailureIEs_tag2el_81[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverPreparationFailureIEs_specs_81 = { sizeof(struct S1AP_HandoverPreparationFailureIEs), offsetof(struct S1AP_HandoverPreparationFailureIEs, _asn_ctx), asn_MAP_S1AP_HandoverPreparationFailureIEs_tag2el_81, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverPreparationFailureIEs = { "HandoverPreparationFailureIEs", "HandoverPreparationFailureIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_HandoverPreparationFailureIEs_tags_81, sizeof(asn_DEF_S1AP_HandoverPreparationFailureIEs_tags_81) /sizeof(asn_DEF_S1AP_HandoverPreparationFailureIEs_tags_81[0]), /* 1 */ asn_DEF_S1AP_HandoverPreparationFailureIEs_tags_81, /* Same as above */ sizeof(asn_DEF_S1AP_HandoverPreparationFailureIEs_tags_81) /sizeof(asn_DEF_S1AP_HandoverPreparationFailureIEs_tags_81[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_HandoverPreparationFailureIEs_81, 3, /* Elements count */ &asn_SPC_S1AP_HandoverPreparationFailureIEs_specs_81 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_88[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.HandoverType), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_HandoverType, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "HandoverType" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.Cause), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cause" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.UEAggregateMaximumBitrate), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEAggregateMaximumBitrate, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEAggregateMaximumBitrate" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.E_RABToBeSetupListHOReq), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABToBeSetupListHOReq, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABToBeSetupListHOReq" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.Source_ToTarget_TransparentContainer), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_Source_ToTarget_TransparentContainer, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Source-ToTarget-TransparentContainer" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.UESecurityCapabilities), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UESecurityCapabilities, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UESecurityCapabilities" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.HandoverRestrictionList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_HandoverRestrictionList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "HandoverRestrictionList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.TraceActivation), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TraceActivation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TraceActivation" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.RequestType), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_RequestType, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "RequestType" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.SRVCCOperationPossible), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_SRVCCOperationPossible, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SRVCCOperationPossible" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.SecurityContext), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_SecurityContext, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SecurityContext" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.NASSecurityParameterstoE_UTRAN), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_NASSecurityParameterstoE_UTRAN, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "NASSecurityParameterstoE-UTRAN" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.CSG_Id), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_CSG_Id, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CSG-Id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.CSGMembershipStatus), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_CSGMembershipStatus, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CSGMembershipStatus" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.GUMMEI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_GUMMEI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "GUMMEI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.ManagementBasedMDTAllowed), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_ManagementBasedMDTAllowed, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ManagementBasedMDTAllowed" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.MDTPLMNList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_MDTPLMNList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MDTPLMNList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.Masked_IMEISV), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_Masked_IMEISV, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Masked-IMEISV" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.ExpectedUEBehaviour), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ExpectedUEBehaviour, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ExpectedUEBehaviour" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.ProSeAuthorized), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProSeAuthorized, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ProSeAuthorized" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.UEUserPlaneCIoTSupportIndicator), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_UEUserPlaneCIoTSupportIndicator, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEUserPlaneCIoTSupportIndicator" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.V2XServicesAuthorized), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_V2XServicesAuthorized, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "V2XServicesAuthorized" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.UESidelinkAggregateMaximumBitrate), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UESidelinkAggregateMaximumBitrate, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UESidelinkAggregateMaximumBitrate" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs__value, choice.EnhancedCoverageRestricted), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_EnhancedCoverageRestricted, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "EnhancedCoverageRestricted" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_88[] = { 0, 13, 18, 5, 12, 1, 10, 14, 16, 21, 24, 3, 4, 6, 7, 8, 9, 11, 15, 17, 19, 20, 22, 23, 2 }; static const unsigned asn_MAP_S1AP_value_from_canonical_88[] = { 0, 5, 24, 11, 12, 3, 13, 14, 15, 16, 6, 17, 4, 1, 7, 18, 8, 19, 2, 20, 21, 9, 22, 23, 10 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_88[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 13, 0, 1 }, /* CSG-Id */ { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 18, -1, 0 }, /* Masked-IMEISV */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 5, 0, 1 }, /* Source-ToTarget-TransparentContainer */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 12, -1, 0 }, /* NASSecurityParameterstoE-UTRAN */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 5 }, /* HandoverType */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 10, -1, 4 }, /* SRVCCOperationPossible */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 14, -2, 3 }, /* CSGMembershipStatus */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 16, -3, 2 }, /* ManagementBasedMDTAllowed */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 21, -4, 1 }, /* UEUserPlaneCIoTSupportIndicator */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 24, -5, 0 }, /* EnhancedCoverageRestricted */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, 0, 12 }, /* UEAggregateMaximumBitrate */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -1, 11 }, /* E-RABToBeSetupListHOReq */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 6, -2, 10 }, /* UESecurityCapabilities */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 7, -3, 9 }, /* HandoverRestrictionList */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 8, -4, 8 }, /* TraceActivation */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 9, -5, 7 }, /* RequestType */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 11, -6, 6 }, /* SecurityContext */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 15, -7, 5 }, /* GUMMEI */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 17, -8, 4 }, /* MDTPLMNList */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 19, -9, 3 }, /* ExpectedUEBehaviour */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 20, -10, 2 }, /* ProSeAuthorized */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 22, -11, 1 }, /* V2XServicesAuthorized */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 23, -12, 0 }, /* UESidelinkAggregateMaximumBitrate */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* radioNetwork */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* transport */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* nas */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* protocol */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 2, 0, 0 } /* misc */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_88 = { sizeof(struct S1AP_HandoverRequestIEs__value), offsetof(struct S1AP_HandoverRequestIEs__value, _asn_ctx), offsetof(struct S1AP_HandoverRequestIEs__value, present), sizeof(((struct S1AP_HandoverRequestIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_88, 29, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_88, asn_MAP_S1AP_value_from_canonical_88, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_88 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_88, 25, /* Elements count */ &asn_SPC_S1AP_value_specs_88 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_HandoverRequestIEs_85[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_86, &asn_PER_memb_S1AP_id_constr_86, memb_S1AP_id_constraint_85 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_HandoverRequestIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_87, &asn_PER_memb_S1AP_criticality_constr_87, memb_S1AP_criticality_constraint_85 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_88, select_HandoverRequestIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_88, &asn_PER_memb_S1AP_value_constr_88, memb_S1AP_value_constraint_85 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_HandoverRequestIEs_tags_85[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_HandoverRequestIEs_tag2el_85[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverRequestIEs_specs_85 = { sizeof(struct S1AP_HandoverRequestIEs), offsetof(struct S1AP_HandoverRequestIEs, _asn_ctx), asn_MAP_S1AP_HandoverRequestIEs_tag2el_85, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverRequestIEs = { "HandoverRequestIEs", "HandoverRequestIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_HandoverRequestIEs_tags_85, sizeof(asn_DEF_S1AP_HandoverRequestIEs_tags_85) /sizeof(asn_DEF_S1AP_HandoverRequestIEs_tags_85[0]), /* 1 */ asn_DEF_S1AP_HandoverRequestIEs_tags_85, /* Same as above */ sizeof(asn_DEF_S1AP_HandoverRequestIEs_tags_85) /sizeof(asn_DEF_S1AP_HandoverRequestIEs_tags_85[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_HandoverRequestIEs_85, 3, /* Elements count */ &asn_SPC_S1AP_HandoverRequestIEs_specs_85 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_92[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestAcknowledgeIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestAcknowledgeIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestAcknowledgeIEs__value, choice.E_RABAdmittedList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABAdmittedList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABAdmittedList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestAcknowledgeIEs__value, choice.E_RABFailedtoSetupListHOReqAck), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABFailedtoSetupListHOReqAck, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABFailedtoSetupListHOReqAck" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestAcknowledgeIEs__value, choice.Target_ToSource_TransparentContainer), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_Target_ToSource_TransparentContainer, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Target-ToSource-TransparentContainer" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestAcknowledgeIEs__value, choice.CSG_Id), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_CSG_Id, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CSG-Id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestAcknowledgeIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestAcknowledgeIEs__value, choice.CellAccessMode), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_CellAccessMode, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CellAccessMode" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestAcknowledgeIEs__value, choice.CE_mode_B_SupportIndicator), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_CE_mode_B_SupportIndicator, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CE-mode-B-SupportIndicator" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_92[] = { 0, 1, 5, 4, 7, 8, 2, 3, 6 }; static const unsigned asn_MAP_S1AP_value_from_canonical_92[] = { 0, 1, 6, 7, 3, 2, 8, 4, 5 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_92[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 5, 0, 0 }, /* CSG-Id */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 4, 0, 0 }, /* Target-ToSource-TransparentContainer */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 7, 0, 1 }, /* CellAccessMode */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 8, -1, 0 }, /* CE-mode-B-SupportIndicator */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 2 }, /* E-RABAdmittedList */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 1 }, /* E-RABFailedtoSetupListHOReqAck */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 6, -2, 0 } /* CriticalityDiagnostics */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_92 = { sizeof(struct S1AP_HandoverRequestAcknowledgeIEs__value), offsetof(struct S1AP_HandoverRequestAcknowledgeIEs__value, _asn_ctx), offsetof(struct S1AP_HandoverRequestAcknowledgeIEs__value, present), sizeof(((struct S1AP_HandoverRequestAcknowledgeIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_92, 9, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_92, asn_MAP_S1AP_value_from_canonical_92, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_92 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_92, 9, /* Elements count */ &asn_SPC_S1AP_value_specs_92 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_HandoverRequestAcknowledgeIEs_89[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestAcknowledgeIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_90, &asn_PER_memb_S1AP_id_constr_90, memb_S1AP_id_constraint_89 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestAcknowledgeIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_HandoverRequestAcknowledgeIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_91, &asn_PER_memb_S1AP_criticality_constr_91, memb_S1AP_criticality_constraint_89 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverRequestAcknowledgeIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_92, select_HandoverRequestAcknowledgeIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_92, &asn_PER_memb_S1AP_value_constr_92, memb_S1AP_value_constraint_89 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_HandoverRequestAcknowledgeIEs_tags_89[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_HandoverRequestAcknowledgeIEs_tag2el_89[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverRequestAcknowledgeIEs_specs_89 = { sizeof(struct S1AP_HandoverRequestAcknowledgeIEs), offsetof(struct S1AP_HandoverRequestAcknowledgeIEs, _asn_ctx), asn_MAP_S1AP_HandoverRequestAcknowledgeIEs_tag2el_89, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverRequestAcknowledgeIEs = { "HandoverRequestAcknowledgeIEs", "HandoverRequestAcknowledgeIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_HandoverRequestAcknowledgeIEs_tags_89, sizeof(asn_DEF_S1AP_HandoverRequestAcknowledgeIEs_tags_89) /sizeof(asn_DEF_S1AP_HandoverRequestAcknowledgeIEs_tags_89[0]), /* 1 */ asn_DEF_S1AP_HandoverRequestAcknowledgeIEs_tags_89, /* Same as above */ sizeof(asn_DEF_S1AP_HandoverRequestAcknowledgeIEs_tags_89) /sizeof(asn_DEF_S1AP_HandoverRequestAcknowledgeIEs_tags_89[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_HandoverRequestAcknowledgeIEs_89, 3, /* Elements count */ &asn_SPC_S1AP_HandoverRequestAcknowledgeIEs_specs_89 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_96[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverFailureIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverFailureIEs__value, choice.Cause), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cause" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverFailureIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_96[] = { 0, 2, 1 }; static const unsigned asn_MAP_S1AP_value_from_canonical_96[] = { 0, 2, 1 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_96[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 }, /* CriticalityDiagnostics */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* radioNetwork */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* transport */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* nas */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 }, /* protocol */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 1, 0, 0 } /* misc */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_96 = { sizeof(struct S1AP_HandoverFailureIEs__value), offsetof(struct S1AP_HandoverFailureIEs__value, _asn_ctx), offsetof(struct S1AP_HandoverFailureIEs__value, present), sizeof(((struct S1AP_HandoverFailureIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_96, 7, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_96, asn_MAP_S1AP_value_from_canonical_96, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_96 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_96, 3, /* Elements count */ &asn_SPC_S1AP_value_specs_96 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_HandoverFailureIEs_93[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverFailureIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_94, &asn_PER_memb_S1AP_id_constr_94, memb_S1AP_id_constraint_93 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverFailureIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_HandoverFailureIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_95, &asn_PER_memb_S1AP_criticality_constr_95, memb_S1AP_criticality_constraint_93 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverFailureIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_96, select_HandoverFailureIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_96, &asn_PER_memb_S1AP_value_constr_96, memb_S1AP_value_constraint_93 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_HandoverFailureIEs_tags_93[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_HandoverFailureIEs_tag2el_93[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverFailureIEs_specs_93 = { sizeof(struct S1AP_HandoverFailureIEs), offsetof(struct S1AP_HandoverFailureIEs, _asn_ctx), asn_MAP_S1AP_HandoverFailureIEs_tag2el_93, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverFailureIEs = { "HandoverFailureIEs", "HandoverFailureIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_HandoverFailureIEs_tags_93, sizeof(asn_DEF_S1AP_HandoverFailureIEs_tags_93) /sizeof(asn_DEF_S1AP_HandoverFailureIEs_tags_93[0]), /* 1 */ asn_DEF_S1AP_HandoverFailureIEs_tags_93, /* Same as above */ sizeof(asn_DEF_S1AP_HandoverFailureIEs_tags_93) /sizeof(asn_DEF_S1AP_HandoverFailureIEs_tags_93[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_HandoverFailureIEs_93, 3, /* Elements count */ &asn_SPC_S1AP_HandoverFailureIEs_specs_93 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_100[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverNotifyIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverNotifyIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverNotifyIEs__value, choice.EUTRAN_CGI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_EUTRAN_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "EUTRAN-CGI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverNotifyIEs__value, choice.TAI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TAI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverNotifyIEs__value, choice.TunnelInformation), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TunnelInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TunnelInformation" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverNotifyIEs__value, choice.LHN_ID), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_LHN_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "LHN-ID" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_100[] = { 0, 1, 5, 2, 3, 4 }; static const unsigned asn_MAP_S1AP_value_from_canonical_100[] = { 0, 1, 3, 4, 5, 2 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_100[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 5, 0, 0 }, /* LHN-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 2 }, /* EUTRAN-CGI */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 1 }, /* TAI */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -2, 0 } /* TunnelInformation */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_100 = { sizeof(struct S1AP_HandoverNotifyIEs__value), offsetof(struct S1AP_HandoverNotifyIEs__value, _asn_ctx), offsetof(struct S1AP_HandoverNotifyIEs__value, present), sizeof(((struct S1AP_HandoverNotifyIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_100, 6, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_100, asn_MAP_S1AP_value_from_canonical_100, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_100 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_100, 6, /* Elements count */ &asn_SPC_S1AP_value_specs_100 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_HandoverNotifyIEs_97[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverNotifyIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_98, &asn_PER_memb_S1AP_id_constr_98, memb_S1AP_id_constraint_97 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverNotifyIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_HandoverNotifyIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_99, &asn_PER_memb_S1AP_criticality_constr_99, memb_S1AP_criticality_constraint_97 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverNotifyIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_100, select_HandoverNotifyIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_100, &asn_PER_memb_S1AP_value_constr_100, memb_S1AP_value_constraint_97 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_HandoverNotifyIEs_tags_97[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_HandoverNotifyIEs_tag2el_97[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverNotifyIEs_specs_97 = { sizeof(struct S1AP_HandoverNotifyIEs), offsetof(struct S1AP_HandoverNotifyIEs, _asn_ctx), asn_MAP_S1AP_HandoverNotifyIEs_tag2el_97, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverNotifyIEs = { "HandoverNotifyIEs", "HandoverNotifyIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_HandoverNotifyIEs_tags_97, sizeof(asn_DEF_S1AP_HandoverNotifyIEs_tags_97) /sizeof(asn_DEF_S1AP_HandoverNotifyIEs_tags_97[0]), /* 1 */ asn_DEF_S1AP_HandoverNotifyIEs_tags_97, /* Same as above */ sizeof(asn_DEF_S1AP_HandoverNotifyIEs_tags_97) /sizeof(asn_DEF_S1AP_HandoverNotifyIEs_tags_97[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_HandoverNotifyIEs_97, 3, /* Elements count */ &asn_SPC_S1AP_HandoverNotifyIEs_specs_97 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_104[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestIEs__value, choice.E_RABToBeSwitchedDLList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABToBeSwitchedDLList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABToBeSwitchedDLList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestIEs__value, choice.EUTRAN_CGI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_EUTRAN_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "EUTRAN-CGI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestIEs__value, choice.TAI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TAI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestIEs__value, choice.UESecurityCapabilities), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UESecurityCapabilities, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UESecurityCapabilities" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestIEs__value, choice.CSG_Id), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_CSG_Id, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CSG-Id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestIEs__value, choice.CellAccessMode), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_CellAccessMode, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CellAccessMode" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestIEs__value, choice.GUMMEI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_GUMMEI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "GUMMEI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestIEs__value, choice.CSGMembershipStatus), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_CSGMembershipStatus, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CSGMembershipStatus" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestIEs__value, choice.TunnelInformation), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TunnelInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TunnelInformation" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestIEs__value, choice.LHN_ID), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_LHN_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "LHN-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestIEs__value, choice.RRC_Establishment_Cause), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_RRC_Establishment_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "RRC-Establishment-Cause" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_104[] = { 0, 2, 6, 11, 7, 9, 12, 1, 3, 4, 5, 8, 10 }; static const unsigned asn_MAP_S1AP_value_from_canonical_104[] = { 0, 7, 1, 8, 9, 10, 2, 4, 11, 5, 12, 3, 6 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_104[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -1, 0 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 6, 0, 0 }, /* CSG-Id */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 11, 0, 0 }, /* LHN-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 7, 0, 2 }, /* CellAccessMode */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 9, -1, 1 }, /* CSGMembershipStatus */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 12, -2, 0 }, /* RRC-Establishment-Cause */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 5 }, /* E-RABToBeSwitchedDLList */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 4 }, /* EUTRAN-CGI */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -2, 3 }, /* TAI */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -3, 2 }, /* UESecurityCapabilities */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 8, -4, 1 }, /* GUMMEI */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 10, -5, 0 } /* TunnelInformation */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_104 = { sizeof(struct S1AP_PathSwitchRequestIEs__value), offsetof(struct S1AP_PathSwitchRequestIEs__value, _asn_ctx), offsetof(struct S1AP_PathSwitchRequestIEs__value, present), sizeof(((struct S1AP_PathSwitchRequestIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_104, 13, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_104, asn_MAP_S1AP_value_from_canonical_104, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_104 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_104, 13, /* Elements count */ &asn_SPC_S1AP_value_specs_104 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_PathSwitchRequestIEs_101[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_102, &asn_PER_memb_S1AP_id_constr_102, memb_S1AP_id_constraint_101 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_PathSwitchRequestIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_103, &asn_PER_memb_S1AP_criticality_constr_103, memb_S1AP_criticality_constraint_101 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_104, select_PathSwitchRequestIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_104, &asn_PER_memb_S1AP_value_constr_104, memb_S1AP_value_constraint_101 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_PathSwitchRequestIEs_tags_101[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_PathSwitchRequestIEs_tag2el_101[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_PathSwitchRequestIEs_specs_101 = { sizeof(struct S1AP_PathSwitchRequestIEs), offsetof(struct S1AP_PathSwitchRequestIEs, _asn_ctx), asn_MAP_S1AP_PathSwitchRequestIEs_tag2el_101, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_PathSwitchRequestIEs = { "PathSwitchRequestIEs", "PathSwitchRequestIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_PathSwitchRequestIEs_tags_101, sizeof(asn_DEF_S1AP_PathSwitchRequestIEs_tags_101) /sizeof(asn_DEF_S1AP_PathSwitchRequestIEs_tags_101[0]), /* 1 */ asn_DEF_S1AP_PathSwitchRequestIEs_tags_101, /* Same as above */ sizeof(asn_DEF_S1AP_PathSwitchRequestIEs_tags_101) /sizeof(asn_DEF_S1AP_PathSwitchRequestIEs_tags_101[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_PathSwitchRequestIEs_101, 3, /* Elements count */ &asn_SPC_S1AP_PathSwitchRequestIEs_specs_101 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_108[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestAcknowledgeIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestAcknowledgeIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestAcknowledgeIEs__value, choice.UEAggregateMaximumBitrate), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEAggregateMaximumBitrate, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEAggregateMaximumBitrate" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestAcknowledgeIEs__value, choice.E_RABToBeSwitchedULList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABToBeSwitchedULList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABToBeSwitchedULList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestAcknowledgeIEs__value, choice.E_RABList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestAcknowledgeIEs__value, choice.SecurityContext), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_SecurityContext, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SecurityContext" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestAcknowledgeIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestAcknowledgeIEs__value, choice.CSGMembershipStatus), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_CSGMembershipStatus, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CSGMembershipStatus" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestAcknowledgeIEs__value, choice.ProSeAuthorized), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProSeAuthorized, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ProSeAuthorized" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestAcknowledgeIEs__value, choice.UEUserPlaneCIoTSupportIndicator), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_UEUserPlaneCIoTSupportIndicator, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEUserPlaneCIoTSupportIndicator" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestAcknowledgeIEs__value, choice.V2XServicesAuthorized), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_V2XServicesAuthorized, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "V2XServicesAuthorized" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestAcknowledgeIEs__value, choice.UESidelinkAggregateMaximumBitrate), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UESidelinkAggregateMaximumBitrate, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UESidelinkAggregateMaximumBitrate" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestAcknowledgeIEs__value, choice.EnhancedCoverageRestricted), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_EnhancedCoverageRestricted, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "EnhancedCoverageRestricted" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_108[] = { 0, 1, 7, 9, 12, 2, 3, 4, 5, 6, 8, 10, 11 }; static const unsigned asn_MAP_S1AP_value_from_canonical_108[] = { 0, 1, 5, 6, 7, 8, 9, 2, 10, 3, 11, 12, 4 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_108[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 7, 0, 2 }, /* CSGMembershipStatus */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 9, -1, 1 }, /* UEUserPlaneCIoTSupportIndicator */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 12, -2, 0 }, /* EnhancedCoverageRestricted */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 7 }, /* UEAggregateMaximumBitrate */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 6 }, /* E-RABToBeSwitchedULList */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -2, 5 }, /* E-RABList */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -3, 4 }, /* SecurityContext */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 6, -4, 3 }, /* CriticalityDiagnostics */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 8, -5, 2 }, /* ProSeAuthorized */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 10, -6, 1 }, /* V2XServicesAuthorized */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 11, -7, 0 } /* UESidelinkAggregateMaximumBitrate */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_108 = { sizeof(struct S1AP_PathSwitchRequestAcknowledgeIEs__value), offsetof(struct S1AP_PathSwitchRequestAcknowledgeIEs__value, _asn_ctx), offsetof(struct S1AP_PathSwitchRequestAcknowledgeIEs__value, present), sizeof(((struct S1AP_PathSwitchRequestAcknowledgeIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_108, 13, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_108, asn_MAP_S1AP_value_from_canonical_108, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_108 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_108, 13, /* Elements count */ &asn_SPC_S1AP_value_specs_108 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_PathSwitchRequestAcknowledgeIEs_105[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestAcknowledgeIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_106, &asn_PER_memb_S1AP_id_constr_106, memb_S1AP_id_constraint_105 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestAcknowledgeIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_PathSwitchRequestAcknowledgeIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_107, &asn_PER_memb_S1AP_criticality_constr_107, memb_S1AP_criticality_constraint_105 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestAcknowledgeIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_108, select_PathSwitchRequestAcknowledgeIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_108, &asn_PER_memb_S1AP_value_constr_108, memb_S1AP_value_constraint_105 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_PathSwitchRequestAcknowledgeIEs_tags_105[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_PathSwitchRequestAcknowledgeIEs_tag2el_105[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_PathSwitchRequestAcknowledgeIEs_specs_105 = { sizeof(struct S1AP_PathSwitchRequestAcknowledgeIEs), offsetof(struct S1AP_PathSwitchRequestAcknowledgeIEs, _asn_ctx), asn_MAP_S1AP_PathSwitchRequestAcknowledgeIEs_tag2el_105, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_PathSwitchRequestAcknowledgeIEs = { "PathSwitchRequestAcknowledgeIEs", "PathSwitchRequestAcknowledgeIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_PathSwitchRequestAcknowledgeIEs_tags_105, sizeof(asn_DEF_S1AP_PathSwitchRequestAcknowledgeIEs_tags_105) /sizeof(asn_DEF_S1AP_PathSwitchRequestAcknowledgeIEs_tags_105[0]), /* 1 */ asn_DEF_S1AP_PathSwitchRequestAcknowledgeIEs_tags_105, /* Same as above */ sizeof(asn_DEF_S1AP_PathSwitchRequestAcknowledgeIEs_tags_105) /sizeof(asn_DEF_S1AP_PathSwitchRequestAcknowledgeIEs_tags_105[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_PathSwitchRequestAcknowledgeIEs_105, 3, /* Elements count */ &asn_SPC_S1AP_PathSwitchRequestAcknowledgeIEs_specs_105 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_112[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestFailureIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestFailureIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestFailureIEs__value, choice.Cause), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cause" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestFailureIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_112[] = { 0, 1, 3, 2 }; static const unsigned asn_MAP_S1AP_value_from_canonical_112[] = { 0, 1, 3, 2 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_112[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, 0, 0 }, /* CriticalityDiagnostics */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* radioNetwork */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* transport */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* nas */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* protocol */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 2, 0, 0 } /* misc */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_112 = { sizeof(struct S1AP_PathSwitchRequestFailureIEs__value), offsetof(struct S1AP_PathSwitchRequestFailureIEs__value, _asn_ctx), offsetof(struct S1AP_PathSwitchRequestFailureIEs__value, present), sizeof(((struct S1AP_PathSwitchRequestFailureIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_112, 8, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_112, asn_MAP_S1AP_value_from_canonical_112, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_112 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_112, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_112 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_PathSwitchRequestFailureIEs_109[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestFailureIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_110, &asn_PER_memb_S1AP_id_constr_110, memb_S1AP_id_constraint_109 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestFailureIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_PathSwitchRequestFailureIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_111, &asn_PER_memb_S1AP_criticality_constr_111, memb_S1AP_criticality_constraint_109 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_PathSwitchRequestFailureIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_112, select_PathSwitchRequestFailureIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_112, &asn_PER_memb_S1AP_value_constr_112, memb_S1AP_value_constraint_109 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_PathSwitchRequestFailureIEs_tags_109[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_PathSwitchRequestFailureIEs_tag2el_109[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_PathSwitchRequestFailureIEs_specs_109 = { sizeof(struct S1AP_PathSwitchRequestFailureIEs), offsetof(struct S1AP_PathSwitchRequestFailureIEs, _asn_ctx), asn_MAP_S1AP_PathSwitchRequestFailureIEs_tag2el_109, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_PathSwitchRequestFailureIEs = { "PathSwitchRequestFailureIEs", "PathSwitchRequestFailureIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_PathSwitchRequestFailureIEs_tags_109, sizeof(asn_DEF_S1AP_PathSwitchRequestFailureIEs_tags_109) /sizeof(asn_DEF_S1AP_PathSwitchRequestFailureIEs_tags_109[0]), /* 1 */ asn_DEF_S1AP_PathSwitchRequestFailureIEs_tags_109, /* Same as above */ sizeof(asn_DEF_S1AP_PathSwitchRequestFailureIEs_tags_109) /sizeof(asn_DEF_S1AP_PathSwitchRequestFailureIEs_tags_109[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_PathSwitchRequestFailureIEs_109, 3, /* Elements count */ &asn_SPC_S1AP_PathSwitchRequestFailureIEs_specs_109 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_116[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCancelIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCancelIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCancelIEs__value, choice.Cause), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cause" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_116[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* radioNetwork */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* transport */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* nas */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* protocol */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 2, 0, 0 } /* misc */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_116 = { sizeof(struct S1AP_HandoverCancelIEs__value), offsetof(struct S1AP_HandoverCancelIEs__value, _asn_ctx), offsetof(struct S1AP_HandoverCancelIEs__value, present), sizeof(((struct S1AP_HandoverCancelIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_116, 7, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_116 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_116, 3, /* Elements count */ &asn_SPC_S1AP_value_specs_116 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_HandoverCancelIEs_113[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCancelIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_114, &asn_PER_memb_S1AP_id_constr_114, memb_S1AP_id_constraint_113 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCancelIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_HandoverCancelIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_115, &asn_PER_memb_S1AP_criticality_constr_115, memb_S1AP_criticality_constraint_113 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCancelIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_116, select_HandoverCancelIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_116, &asn_PER_memb_S1AP_value_constr_116, memb_S1AP_value_constraint_113 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_HandoverCancelIEs_tags_113[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_HandoverCancelIEs_tag2el_113[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverCancelIEs_specs_113 = { sizeof(struct S1AP_HandoverCancelIEs), offsetof(struct S1AP_HandoverCancelIEs, _asn_ctx), asn_MAP_S1AP_HandoverCancelIEs_tag2el_113, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverCancelIEs = { "HandoverCancelIEs", "HandoverCancelIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_HandoverCancelIEs_tags_113, sizeof(asn_DEF_S1AP_HandoverCancelIEs_tags_113) /sizeof(asn_DEF_S1AP_HandoverCancelIEs_tags_113[0]), /* 1 */ asn_DEF_S1AP_HandoverCancelIEs_tags_113, /* Same as above */ sizeof(asn_DEF_S1AP_HandoverCancelIEs_tags_113) /sizeof(asn_DEF_S1AP_HandoverCancelIEs_tags_113[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_HandoverCancelIEs_113, 3, /* Elements count */ &asn_SPC_S1AP_HandoverCancelIEs_specs_113 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_120[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCancelAcknowledgeIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCancelAcknowledgeIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCancelAcknowledgeIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_120[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 } /* CriticalityDiagnostics */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_120 = { sizeof(struct S1AP_HandoverCancelAcknowledgeIEs__value), offsetof(struct S1AP_HandoverCancelAcknowledgeIEs__value, _asn_ctx), offsetof(struct S1AP_HandoverCancelAcknowledgeIEs__value, present), sizeof(((struct S1AP_HandoverCancelAcknowledgeIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_120, 3, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_120 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_120, 3, /* Elements count */ &asn_SPC_S1AP_value_specs_120 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_HandoverCancelAcknowledgeIEs_117[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCancelAcknowledgeIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_118, &asn_PER_memb_S1AP_id_constr_118, memb_S1AP_id_constraint_117 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCancelAcknowledgeIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_HandoverCancelAcknowledgeIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_119, &asn_PER_memb_S1AP_criticality_constr_119, memb_S1AP_criticality_constraint_117 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_HandoverCancelAcknowledgeIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_120, select_HandoverCancelAcknowledgeIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_120, &asn_PER_memb_S1AP_value_constr_120, memb_S1AP_value_constraint_117 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_HandoverCancelAcknowledgeIEs_tags_117[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_HandoverCancelAcknowledgeIEs_tag2el_117[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverCancelAcknowledgeIEs_specs_117 = { sizeof(struct S1AP_HandoverCancelAcknowledgeIEs), offsetof(struct S1AP_HandoverCancelAcknowledgeIEs, _asn_ctx), asn_MAP_S1AP_HandoverCancelAcknowledgeIEs_tag2el_117, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverCancelAcknowledgeIEs = { "HandoverCancelAcknowledgeIEs", "HandoverCancelAcknowledgeIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_HandoverCancelAcknowledgeIEs_tags_117, sizeof(asn_DEF_S1AP_HandoverCancelAcknowledgeIEs_tags_117) /sizeof(asn_DEF_S1AP_HandoverCancelAcknowledgeIEs_tags_117[0]), /* 1 */ asn_DEF_S1AP_HandoverCancelAcknowledgeIEs_tags_117, /* Same as above */ sizeof(asn_DEF_S1AP_HandoverCancelAcknowledgeIEs_tags_117) /sizeof(asn_DEF_S1AP_HandoverCancelAcknowledgeIEs_tags_117[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_HandoverCancelAcknowledgeIEs_117, 3, /* Elements count */ &asn_SPC_S1AP_HandoverCancelAcknowledgeIEs_specs_117 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_124[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupRequestIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupRequestIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupRequestIEs__value, choice.UEAggregateMaximumBitrate), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEAggregateMaximumBitrate, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEAggregateMaximumBitrate" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupRequestIEs__value, choice.E_RABToBeSetupListBearerSUReq), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABToBeSetupListBearerSUReq, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABToBeSetupListBearerSUReq" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_124[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 1 }, /* UEAggregateMaximumBitrate */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 0 } /* E-RABToBeSetupListBearerSUReq */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_124 = { sizeof(struct S1AP_E_RABSetupRequestIEs__value), offsetof(struct S1AP_E_RABSetupRequestIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABSetupRequestIEs__value, present), sizeof(((struct S1AP_E_RABSetupRequestIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_124, 4, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_124 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_124, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_124 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABSetupRequestIEs_121[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupRequestIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_122, &asn_PER_memb_S1AP_id_constr_122, memb_S1AP_id_constraint_121 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupRequestIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_E_RABSetupRequestIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_123, &asn_PER_memb_S1AP_criticality_constr_123, memb_S1AP_criticality_constraint_121 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupRequestIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_124, select_E_RABSetupRequestIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_124, &asn_PER_memb_S1AP_value_constr_124, memb_S1AP_value_constraint_121 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABSetupRequestIEs_tags_121[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABSetupRequestIEs_tag2el_121[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABSetupRequestIEs_specs_121 = { sizeof(struct S1AP_E_RABSetupRequestIEs), offsetof(struct S1AP_E_RABSetupRequestIEs, _asn_ctx), asn_MAP_S1AP_E_RABSetupRequestIEs_tag2el_121, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupRequestIEs = { "E-RABSetupRequestIEs", "E-RABSetupRequestIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABSetupRequestIEs_tags_121, sizeof(asn_DEF_S1AP_E_RABSetupRequestIEs_tags_121) /sizeof(asn_DEF_S1AP_E_RABSetupRequestIEs_tags_121[0]), /* 1 */ asn_DEF_S1AP_E_RABSetupRequestIEs_tags_121, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABSetupRequestIEs_tags_121) /sizeof(asn_DEF_S1AP_E_RABSetupRequestIEs_tags_121[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABSetupRequestIEs_121, 3, /* Elements count */ &asn_SPC_S1AP_E_RABSetupRequestIEs_specs_121 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_128[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupResponseIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupResponseIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupResponseIEs__value, choice.E_RABSetupListBearerSURes), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABSetupListBearerSURes, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABSetupListBearerSURes" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupResponseIEs__value, choice.E_RABList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupResponseIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_128[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 2 }, /* E-RABSetupListBearerSURes */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 1 }, /* E-RABList */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -2, 0 } /* CriticalityDiagnostics */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_128 = { sizeof(struct S1AP_E_RABSetupResponseIEs__value), offsetof(struct S1AP_E_RABSetupResponseIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABSetupResponseIEs__value, present), sizeof(((struct S1AP_E_RABSetupResponseIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_128, 5, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_128 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_128, 5, /* Elements count */ &asn_SPC_S1AP_value_specs_128 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABSetupResponseIEs_125[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupResponseIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_126, &asn_PER_memb_S1AP_id_constr_126, memb_S1AP_id_constraint_125 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupResponseIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_E_RABSetupResponseIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_127, &asn_PER_memb_S1AP_criticality_constr_127, memb_S1AP_criticality_constraint_125 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABSetupResponseIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_128, select_E_RABSetupResponseIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_128, &asn_PER_memb_S1AP_value_constr_128, memb_S1AP_value_constraint_125 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABSetupResponseIEs_tags_125[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABSetupResponseIEs_tag2el_125[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABSetupResponseIEs_specs_125 = { sizeof(struct S1AP_E_RABSetupResponseIEs), offsetof(struct S1AP_E_RABSetupResponseIEs, _asn_ctx), asn_MAP_S1AP_E_RABSetupResponseIEs_tag2el_125, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupResponseIEs = { "E-RABSetupResponseIEs", "E-RABSetupResponseIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABSetupResponseIEs_tags_125, sizeof(asn_DEF_S1AP_E_RABSetupResponseIEs_tags_125) /sizeof(asn_DEF_S1AP_E_RABSetupResponseIEs_tags_125[0]), /* 1 */ asn_DEF_S1AP_E_RABSetupResponseIEs_tags_125, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABSetupResponseIEs_tags_125) /sizeof(asn_DEF_S1AP_E_RABSetupResponseIEs_tags_125[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABSetupResponseIEs_125, 3, /* Elements count */ &asn_SPC_S1AP_E_RABSetupResponseIEs_specs_125 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_132[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyRequestIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyRequestIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyRequestIEs__value, choice.UEAggregateMaximumBitrate), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEAggregateMaximumBitrate, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEAggregateMaximumBitrate" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyRequestIEs__value, choice.E_RABToBeModifiedListBearerModReq), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABToBeModifiedListBearerModReq, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABToBeModifiedListBearerModReq" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_132[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 1 }, /* UEAggregateMaximumBitrate */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 0 } /* E-RABToBeModifiedListBearerModReq */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_132 = { sizeof(struct S1AP_E_RABModifyRequestIEs__value), offsetof(struct S1AP_E_RABModifyRequestIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABModifyRequestIEs__value, present), sizeof(((struct S1AP_E_RABModifyRequestIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_132, 4, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_132 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_132, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_132 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABModifyRequestIEs_129[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyRequestIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_130, &asn_PER_memb_S1AP_id_constr_130, memb_S1AP_id_constraint_129 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyRequestIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_E_RABModifyRequestIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_131, &asn_PER_memb_S1AP_criticality_constr_131, memb_S1AP_criticality_constraint_129 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyRequestIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_132, select_E_RABModifyRequestIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_132, &asn_PER_memb_S1AP_value_constr_132, memb_S1AP_value_constraint_129 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABModifyRequestIEs_tags_129[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABModifyRequestIEs_tag2el_129[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModifyRequestIEs_specs_129 = { sizeof(struct S1AP_E_RABModifyRequestIEs), offsetof(struct S1AP_E_RABModifyRequestIEs, _asn_ctx), asn_MAP_S1AP_E_RABModifyRequestIEs_tag2el_129, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyRequestIEs = { "E-RABModifyRequestIEs", "E-RABModifyRequestIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABModifyRequestIEs_tags_129, sizeof(asn_DEF_S1AP_E_RABModifyRequestIEs_tags_129) /sizeof(asn_DEF_S1AP_E_RABModifyRequestIEs_tags_129[0]), /* 1 */ asn_DEF_S1AP_E_RABModifyRequestIEs_tags_129, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABModifyRequestIEs_tags_129) /sizeof(asn_DEF_S1AP_E_RABModifyRequestIEs_tags_129[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABModifyRequestIEs_129, 3, /* Elements count */ &asn_SPC_S1AP_E_RABModifyRequestIEs_specs_129 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_136[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyResponseIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyResponseIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyResponseIEs__value, choice.E_RABModifyListBearerModRes), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABModifyListBearerModRes, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABModifyListBearerModRes" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyResponseIEs__value, choice.E_RABList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyResponseIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_136[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 2 }, /* E-RABModifyListBearerModRes */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 1 }, /* E-RABList */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -2, 0 } /* CriticalityDiagnostics */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_136 = { sizeof(struct S1AP_E_RABModifyResponseIEs__value), offsetof(struct S1AP_E_RABModifyResponseIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABModifyResponseIEs__value, present), sizeof(((struct S1AP_E_RABModifyResponseIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_136, 5, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_136 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_136, 5, /* Elements count */ &asn_SPC_S1AP_value_specs_136 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABModifyResponseIEs_133[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyResponseIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_134, &asn_PER_memb_S1AP_id_constr_134, memb_S1AP_id_constraint_133 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyResponseIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_E_RABModifyResponseIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_135, &asn_PER_memb_S1AP_criticality_constr_135, memb_S1AP_criticality_constraint_133 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModifyResponseIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_136, select_E_RABModifyResponseIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_136, &asn_PER_memb_S1AP_value_constr_136, memb_S1AP_value_constraint_133 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABModifyResponseIEs_tags_133[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABModifyResponseIEs_tag2el_133[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModifyResponseIEs_specs_133 = { sizeof(struct S1AP_E_RABModifyResponseIEs), offsetof(struct S1AP_E_RABModifyResponseIEs, _asn_ctx), asn_MAP_S1AP_E_RABModifyResponseIEs_tag2el_133, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyResponseIEs = { "E-RABModifyResponseIEs", "E-RABModifyResponseIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABModifyResponseIEs_tags_133, sizeof(asn_DEF_S1AP_E_RABModifyResponseIEs_tags_133) /sizeof(asn_DEF_S1AP_E_RABModifyResponseIEs_tags_133[0]), /* 1 */ asn_DEF_S1AP_E_RABModifyResponseIEs_tags_133, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABModifyResponseIEs_tags_133) /sizeof(asn_DEF_S1AP_E_RABModifyResponseIEs_tags_133[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABModifyResponseIEs_133, 3, /* Elements count */ &asn_SPC_S1AP_E_RABModifyResponseIEs_specs_133 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_140[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseCommandIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseCommandIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseCommandIEs__value, choice.UEAggregateMaximumBitrate), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEAggregateMaximumBitrate, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEAggregateMaximumBitrate" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseCommandIEs__value, choice.E_RABList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseCommandIEs__value, choice.NAS_PDU), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_NAS_PDU, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "NAS-PDU" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_140[] = { 0, 1, 4, 2, 3 }; static const unsigned asn_MAP_S1AP_value_from_canonical_140[] = { 0, 1, 3, 4, 2 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_140[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 4, 0, 0 }, /* NAS-PDU */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 1 }, /* UEAggregateMaximumBitrate */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 0 } /* E-RABList */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_140 = { sizeof(struct S1AP_E_RABReleaseCommandIEs__value), offsetof(struct S1AP_E_RABReleaseCommandIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABReleaseCommandIEs__value, present), sizeof(((struct S1AP_E_RABReleaseCommandIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_140, 5, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_140, asn_MAP_S1AP_value_from_canonical_140, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_140 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_140, 5, /* Elements count */ &asn_SPC_S1AP_value_specs_140 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABReleaseCommandIEs_137[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseCommandIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_138, &asn_PER_memb_S1AP_id_constr_138, memb_S1AP_id_constraint_137 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseCommandIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_E_RABReleaseCommandIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_139, &asn_PER_memb_S1AP_criticality_constr_139, memb_S1AP_criticality_constraint_137 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseCommandIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_140, select_E_RABReleaseCommandIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_140, &asn_PER_memb_S1AP_value_constr_140, memb_S1AP_value_constraint_137 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABReleaseCommandIEs_tags_137[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABReleaseCommandIEs_tag2el_137[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABReleaseCommandIEs_specs_137 = { sizeof(struct S1AP_E_RABReleaseCommandIEs), offsetof(struct S1AP_E_RABReleaseCommandIEs, _asn_ctx), asn_MAP_S1AP_E_RABReleaseCommandIEs_tag2el_137, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABReleaseCommandIEs = { "E-RABReleaseCommandIEs", "E-RABReleaseCommandIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABReleaseCommandIEs_tags_137, sizeof(asn_DEF_S1AP_E_RABReleaseCommandIEs_tags_137) /sizeof(asn_DEF_S1AP_E_RABReleaseCommandIEs_tags_137[0]), /* 1 */ asn_DEF_S1AP_E_RABReleaseCommandIEs_tags_137, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABReleaseCommandIEs_tags_137) /sizeof(asn_DEF_S1AP_E_RABReleaseCommandIEs_tags_137[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABReleaseCommandIEs_137, 3, /* Elements count */ &asn_SPC_S1AP_E_RABReleaseCommandIEs_specs_137 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_144[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseResponseIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseResponseIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseResponseIEs__value, choice.E_RABReleaseListBearerRelComp), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABReleaseListBearerRelComp, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABReleaseListBearerRelComp" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseResponseIEs__value, choice.E_RABList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseResponseIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseResponseIEs__value, choice.UserLocationInformation), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UserLocationInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UserLocationInformation" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_144[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 3 }, /* E-RABReleaseListBearerRelComp */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 2 }, /* E-RABList */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -2, 1 }, /* CriticalityDiagnostics */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -3, 0 } /* UserLocationInformation */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_144 = { sizeof(struct S1AP_E_RABReleaseResponseIEs__value), offsetof(struct S1AP_E_RABReleaseResponseIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABReleaseResponseIEs__value, present), sizeof(((struct S1AP_E_RABReleaseResponseIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_144, 6, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_144 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_144, 6, /* Elements count */ &asn_SPC_S1AP_value_specs_144 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABReleaseResponseIEs_141[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseResponseIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_142, &asn_PER_memb_S1AP_id_constr_142, memb_S1AP_id_constraint_141 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseResponseIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_E_RABReleaseResponseIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_143, &asn_PER_memb_S1AP_criticality_constr_143, memb_S1AP_criticality_constraint_141 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseResponseIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_144, select_E_RABReleaseResponseIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_144, &asn_PER_memb_S1AP_value_constr_144, memb_S1AP_value_constraint_141 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABReleaseResponseIEs_tags_141[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABReleaseResponseIEs_tag2el_141[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABReleaseResponseIEs_specs_141 = { sizeof(struct S1AP_E_RABReleaseResponseIEs), offsetof(struct S1AP_E_RABReleaseResponseIEs, _asn_ctx), asn_MAP_S1AP_E_RABReleaseResponseIEs_tag2el_141, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABReleaseResponseIEs = { "E-RABReleaseResponseIEs", "E-RABReleaseResponseIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABReleaseResponseIEs_tags_141, sizeof(asn_DEF_S1AP_E_RABReleaseResponseIEs_tags_141) /sizeof(asn_DEF_S1AP_E_RABReleaseResponseIEs_tags_141[0]), /* 1 */ asn_DEF_S1AP_E_RABReleaseResponseIEs_tags_141, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABReleaseResponseIEs_tags_141) /sizeof(asn_DEF_S1AP_E_RABReleaseResponseIEs_tags_141[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABReleaseResponseIEs_141, 3, /* Elements count */ &asn_SPC_S1AP_E_RABReleaseResponseIEs_specs_141 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_148[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseIndicationIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseIndicationIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseIndicationIEs__value, choice.E_RABList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseIndicationIEs__value, choice.UserLocationInformation), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UserLocationInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UserLocationInformation" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_148[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 1 }, /* E-RABList */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 0 } /* UserLocationInformation */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_148 = { sizeof(struct S1AP_E_RABReleaseIndicationIEs__value), offsetof(struct S1AP_E_RABReleaseIndicationIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABReleaseIndicationIEs__value, present), sizeof(((struct S1AP_E_RABReleaseIndicationIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_148, 4, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_148 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_148, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_148 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABReleaseIndicationIEs_145[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseIndicationIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_146, &asn_PER_memb_S1AP_id_constr_146, memb_S1AP_id_constraint_145 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseIndicationIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_E_RABReleaseIndicationIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_147, &asn_PER_memb_S1AP_criticality_constr_147, memb_S1AP_criticality_constraint_145 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABReleaseIndicationIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_148, select_E_RABReleaseIndicationIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_148, &asn_PER_memb_S1AP_value_constr_148, memb_S1AP_value_constraint_145 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABReleaseIndicationIEs_tags_145[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABReleaseIndicationIEs_tag2el_145[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABReleaseIndicationIEs_specs_145 = { sizeof(struct S1AP_E_RABReleaseIndicationIEs), offsetof(struct S1AP_E_RABReleaseIndicationIEs, _asn_ctx), asn_MAP_S1AP_E_RABReleaseIndicationIEs_tag2el_145, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABReleaseIndicationIEs = { "E-RABReleaseIndicationIEs", "E-RABReleaseIndicationIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABReleaseIndicationIEs_tags_145, sizeof(asn_DEF_S1AP_E_RABReleaseIndicationIEs_tags_145) /sizeof(asn_DEF_S1AP_E_RABReleaseIndicationIEs_tags_145[0]), /* 1 */ asn_DEF_S1AP_E_RABReleaseIndicationIEs_tags_145, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABReleaseIndicationIEs_tags_145) /sizeof(asn_DEF_S1AP_E_RABReleaseIndicationIEs_tags_145[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABReleaseIndicationIEs_145, 3, /* Elements count */ &asn_SPC_S1AP_E_RABReleaseIndicationIEs_specs_145 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_152[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.UEAggregateMaximumBitrate), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEAggregateMaximumBitrate, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEAggregateMaximumBitrate" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.E_RABToBeSetupListCtxtSUReq), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABToBeSetupListCtxtSUReq, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABToBeSetupListCtxtSUReq" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.UESecurityCapabilities), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UESecurityCapabilities, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UESecurityCapabilities" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.SecurityKey), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_SecurityKey, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SecurityKey" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.TraceActivation), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TraceActivation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TraceActivation" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.HandoverRestrictionList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_HandoverRestrictionList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "HandoverRestrictionList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.UERadioCapability), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_UERadioCapability, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UERadioCapability" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.SubscriberProfileIDforRFP), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_SubscriberProfileIDforRFP, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SubscriberProfileIDforRFP" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.CSFallbackIndicator), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_CSFallbackIndicator, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CSFallbackIndicator" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.SRVCCOperationPossible), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_SRVCCOperationPossible, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SRVCCOperationPossible" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.CSGMembershipStatus), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_CSGMembershipStatus, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CSGMembershipStatus" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.LAI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_LAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "LAI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.GUMMEI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_GUMMEI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "GUMMEI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.ManagementBasedMDTAllowed), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_ManagementBasedMDTAllowed, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ManagementBasedMDTAllowed" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.MDTPLMNList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_MDTPLMNList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MDTPLMNList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.AdditionalCSFallbackIndicator), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_AdditionalCSFallbackIndicator, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "AdditionalCSFallbackIndicator" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.Masked_IMEISV), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_Masked_IMEISV, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Masked-IMEISV" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.ExpectedUEBehaviour), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ExpectedUEBehaviour, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ExpectedUEBehaviour" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.ProSeAuthorized), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProSeAuthorized, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ProSeAuthorized" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.UEUserPlaneCIoTSupportIndicator), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_UEUserPlaneCIoTSupportIndicator, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEUserPlaneCIoTSupportIndicator" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.V2XServicesAuthorized), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_V2XServicesAuthorized, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "V2XServicesAuthorized" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.UESidelinkAggregateMaximumBitrate), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UESidelinkAggregateMaximumBitrate, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UESidelinkAggregateMaximumBitrate" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs__value, choice.EnhancedCoverageRestricted), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_EnhancedCoverageRestricted, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "EnhancedCoverageRestricted" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_152[] = { 0, 1, 9, 5, 18, 8, 10, 11, 12, 15, 17, 21, 24, 2, 3, 4, 6, 7, 13, 14, 16, 19, 20, 22, 23 }; static const unsigned asn_MAP_S1AP_value_from_canonical_152[] = { 0, 1, 13, 14, 15, 3, 16, 17, 5, 2, 6, 7, 8, 18, 19, 9, 20, 10, 4, 21, 22, 11, 23, 24, 12 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_152[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 1 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 9, -2, 0 }, /* SubscriberProfileIDforRFP */ { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 5, 0, 1 }, /* SecurityKey */ { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 18, -1, 0 }, /* Masked-IMEISV */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 8, 0, 0 }, /* UERadioCapability */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 10, 0, 6 }, /* CSFallbackIndicator */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 11, -1, 5 }, /* SRVCCOperationPossible */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 12, -2, 4 }, /* CSGMembershipStatus */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 15, -3, 3 }, /* ManagementBasedMDTAllowed */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 17, -4, 2 }, /* AdditionalCSFallbackIndicator */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 21, -5, 1 }, /* UEUserPlaneCIoTSupportIndicator */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 24, -6, 0 }, /* EnhancedCoverageRestricted */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 11 }, /* UEAggregateMaximumBitrate */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 10 }, /* E-RABToBeSetupListCtxtSUReq */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -2, 9 }, /* UESecurityCapabilities */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 6, -3, 8 }, /* TraceActivation */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 7, -4, 7 }, /* HandoverRestrictionList */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 13, -5, 6 }, /* LAI */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 14, -6, 5 }, /* GUMMEI */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 16, -7, 4 }, /* MDTPLMNList */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 19, -8, 3 }, /* ExpectedUEBehaviour */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 20, -9, 2 }, /* ProSeAuthorized */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 22, -10, 1 }, /* V2XServicesAuthorized */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 23, -11, 0 } /* UESidelinkAggregateMaximumBitrate */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_152 = { sizeof(struct S1AP_InitialContextSetupRequestIEs__value), offsetof(struct S1AP_InitialContextSetupRequestIEs__value, _asn_ctx), offsetof(struct S1AP_InitialContextSetupRequestIEs__value, present), sizeof(((struct S1AP_InitialContextSetupRequestIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_152, 25, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_152, asn_MAP_S1AP_value_from_canonical_152, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_152 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_152, 25, /* Elements count */ &asn_SPC_S1AP_value_specs_152 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_InitialContextSetupRequestIEs_149[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_150, &asn_PER_memb_S1AP_id_constr_150, memb_S1AP_id_constraint_149 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_InitialContextSetupRequestIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_151, &asn_PER_memb_S1AP_criticality_constr_151, memb_S1AP_criticality_constraint_149 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupRequestIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_152, select_InitialContextSetupRequestIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_152, &asn_PER_memb_S1AP_value_constr_152, memb_S1AP_value_constraint_149 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_InitialContextSetupRequestIEs_tags_149[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_InitialContextSetupRequestIEs_tag2el_149[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_InitialContextSetupRequestIEs_specs_149 = { sizeof(struct S1AP_InitialContextSetupRequestIEs), offsetof(struct S1AP_InitialContextSetupRequestIEs, _asn_ctx), asn_MAP_S1AP_InitialContextSetupRequestIEs_tag2el_149, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_InitialContextSetupRequestIEs = { "InitialContextSetupRequestIEs", "InitialContextSetupRequestIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_InitialContextSetupRequestIEs_tags_149, sizeof(asn_DEF_S1AP_InitialContextSetupRequestIEs_tags_149) /sizeof(asn_DEF_S1AP_InitialContextSetupRequestIEs_tags_149[0]), /* 1 */ asn_DEF_S1AP_InitialContextSetupRequestIEs_tags_149, /* Same as above */ sizeof(asn_DEF_S1AP_InitialContextSetupRequestIEs_tags_149) /sizeof(asn_DEF_S1AP_InitialContextSetupRequestIEs_tags_149[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_InitialContextSetupRequestIEs_149, 3, /* Elements count */ &asn_SPC_S1AP_InitialContextSetupRequestIEs_specs_149 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_156[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupResponseIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupResponseIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupResponseIEs__value, choice.E_RABSetupListCtxtSURes), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABSetupListCtxtSURes, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABSetupListCtxtSURes" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupResponseIEs__value, choice.E_RABList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupResponseIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_156[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 2 }, /* E-RABSetupListCtxtSURes */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 1 }, /* E-RABList */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -2, 0 } /* CriticalityDiagnostics */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_156 = { sizeof(struct S1AP_InitialContextSetupResponseIEs__value), offsetof(struct S1AP_InitialContextSetupResponseIEs__value, _asn_ctx), offsetof(struct S1AP_InitialContextSetupResponseIEs__value, present), sizeof(((struct S1AP_InitialContextSetupResponseIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_156, 5, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_156 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_156, 5, /* Elements count */ &asn_SPC_S1AP_value_specs_156 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_InitialContextSetupResponseIEs_153[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupResponseIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_154, &asn_PER_memb_S1AP_id_constr_154, memb_S1AP_id_constraint_153 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupResponseIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_InitialContextSetupResponseIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_155, &asn_PER_memb_S1AP_criticality_constr_155, memb_S1AP_criticality_constraint_153 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupResponseIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_156, select_InitialContextSetupResponseIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_156, &asn_PER_memb_S1AP_value_constr_156, memb_S1AP_value_constraint_153 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_InitialContextSetupResponseIEs_tags_153[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_InitialContextSetupResponseIEs_tag2el_153[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_InitialContextSetupResponseIEs_specs_153 = { sizeof(struct S1AP_InitialContextSetupResponseIEs), offsetof(struct S1AP_InitialContextSetupResponseIEs, _asn_ctx), asn_MAP_S1AP_InitialContextSetupResponseIEs_tag2el_153, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_InitialContextSetupResponseIEs = { "InitialContextSetupResponseIEs", "InitialContextSetupResponseIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_InitialContextSetupResponseIEs_tags_153, sizeof(asn_DEF_S1AP_InitialContextSetupResponseIEs_tags_153) /sizeof(asn_DEF_S1AP_InitialContextSetupResponseIEs_tags_153[0]), /* 1 */ asn_DEF_S1AP_InitialContextSetupResponseIEs_tags_153, /* Same as above */ sizeof(asn_DEF_S1AP_InitialContextSetupResponseIEs_tags_153) /sizeof(asn_DEF_S1AP_InitialContextSetupResponseIEs_tags_153[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_InitialContextSetupResponseIEs_153, 3, /* Elements count */ &asn_SPC_S1AP_InitialContextSetupResponseIEs_specs_153 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_160[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupFailureIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupFailureIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupFailureIEs__value, choice.Cause), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cause" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupFailureIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_160[] = { 0, 1, 3, 2 }; static const unsigned asn_MAP_S1AP_value_from_canonical_160[] = { 0, 1, 3, 2 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_160[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, 0, 0 }, /* CriticalityDiagnostics */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* radioNetwork */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* transport */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* nas */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* protocol */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 2, 0, 0 } /* misc */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_160 = { sizeof(struct S1AP_InitialContextSetupFailureIEs__value), offsetof(struct S1AP_InitialContextSetupFailureIEs__value, _asn_ctx), offsetof(struct S1AP_InitialContextSetupFailureIEs__value, present), sizeof(((struct S1AP_InitialContextSetupFailureIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_160, 8, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_160, asn_MAP_S1AP_value_from_canonical_160, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_160 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_160, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_160 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_InitialContextSetupFailureIEs_157[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupFailureIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_158, &asn_PER_memb_S1AP_id_constr_158, memb_S1AP_id_constraint_157 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupFailureIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_InitialContextSetupFailureIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_159, &asn_PER_memb_S1AP_criticality_constr_159, memb_S1AP_criticality_constraint_157 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialContextSetupFailureIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_160, select_InitialContextSetupFailureIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_160, &asn_PER_memb_S1AP_value_constr_160, memb_S1AP_value_constraint_157 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_InitialContextSetupFailureIEs_tags_157[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_InitialContextSetupFailureIEs_tag2el_157[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_InitialContextSetupFailureIEs_specs_157 = { sizeof(struct S1AP_InitialContextSetupFailureIEs), offsetof(struct S1AP_InitialContextSetupFailureIEs, _asn_ctx), asn_MAP_S1AP_InitialContextSetupFailureIEs_tag2el_157, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_InitialContextSetupFailureIEs = { "InitialContextSetupFailureIEs", "InitialContextSetupFailureIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_InitialContextSetupFailureIEs_tags_157, sizeof(asn_DEF_S1AP_InitialContextSetupFailureIEs_tags_157) /sizeof(asn_DEF_S1AP_InitialContextSetupFailureIEs_tags_157[0]), /* 1 */ asn_DEF_S1AP_InitialContextSetupFailureIEs_tags_157, /* Same as above */ sizeof(asn_DEF_S1AP_InitialContextSetupFailureIEs_tags_157) /sizeof(asn_DEF_S1AP_InitialContextSetupFailureIEs_tags_157[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_InitialContextSetupFailureIEs_157, 3, /* Elements count */ &asn_SPC_S1AP_InitialContextSetupFailureIEs_specs_157 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_164[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_PagingIEs__value, choice.UEIdentityIndexValue), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_UEIdentityIndexValue, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEIdentityIndexValue" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PagingIEs__value, choice.UEPagingID), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_UEPagingID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEPagingID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PagingIEs__value, choice.PagingDRX), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_PagingDRX, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "PagingDRX" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PagingIEs__value, choice.CNDomain), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_CNDomain, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CNDomain" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PagingIEs__value, choice.TAIList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TAIList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TAIList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PagingIEs__value, choice.CSG_IdList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CSG_IdList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CSG-IdList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PagingIEs__value, choice.PagingPriority), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_PagingPriority, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "PagingPriority" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PagingIEs__value, choice.UERadioCapabilityForPaging), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_UERadioCapabilityForPaging, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UERadioCapabilityForPaging" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PagingIEs__value, choice.AssistanceDataForPaging), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_AssistanceDataForPaging, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "AssistanceDataForPaging" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PagingIEs__value, choice.Paging_eDRXInformation), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_Paging_eDRXInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Paging-eDRXInformation" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PagingIEs__value, choice.Extended_UEIdentityIndexValue), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_Extended_UEIdentityIndexValue, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Extended-UEIdentityIndexValue" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PagingIEs__value, choice.NB_IoT_Paging_eDRXInformation), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_NB_IoT_Paging_eDRXInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "NB-IoT-Paging-eDRXInformation" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PagingIEs__value, choice.NB_IoT_UEIdentityIndexValue), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_NB_IoT_UEIdentityIndexValue, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "NB-IoT-UEIdentityIndexValue" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_164[] = { 0, 10, 12, 7, 2, 3, 6, 4, 5, 8, 9, 11, 1 }; static const unsigned asn_MAP_S1AP_value_from_canonical_164[] = { 0, 12, 4, 5, 7, 8, 6, 3, 9, 10, 1, 11, 2 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_164[] = { { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 2 }, /* UEIdentityIndexValue */ { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 10, -1, 1 }, /* Extended-UEIdentityIndexValue */ { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 12, -2, 0 }, /* NB-IoT-UEIdentityIndexValue */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 7, 0, 0 }, /* UERadioCapabilityForPaging */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 2, 0, 2 }, /* PagingDRX */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 3, -1, 1 }, /* CNDomain */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 6, -2, 0 }, /* PagingPriority */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, 0, 4 }, /* TAIList */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -1, 3 }, /* CSG-IdList */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 8, -2, 2 }, /* AssistanceDataForPaging */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 9, -3, 1 }, /* Paging-eDRXInformation */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 11, -4, 0 }, /* NB-IoT-Paging-eDRXInformation */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, 0, 0 }, /* s-TMSI */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iMSI */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_164 = { sizeof(struct S1AP_PagingIEs__value), offsetof(struct S1AP_PagingIEs__value, _asn_ctx), offsetof(struct S1AP_PagingIEs__value, present), sizeof(((struct S1AP_PagingIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_164, 14, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_164, asn_MAP_S1AP_value_from_canonical_164, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_164 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_164, 13, /* Elements count */ &asn_SPC_S1AP_value_specs_164 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_PagingIEs_161[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_PagingIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_162, &asn_PER_memb_S1AP_id_constr_162, memb_S1AP_id_constraint_161 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PagingIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_PagingIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_163, &asn_PER_memb_S1AP_criticality_constr_163, memb_S1AP_criticality_constraint_161 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_PagingIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_164, select_PagingIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_164, &asn_PER_memb_S1AP_value_constr_164, memb_S1AP_value_constraint_161 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_PagingIEs_tags_161[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_PagingIEs_tag2el_161[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_PagingIEs_specs_161 = { sizeof(struct S1AP_PagingIEs), offsetof(struct S1AP_PagingIEs, _asn_ctx), asn_MAP_S1AP_PagingIEs_tag2el_161, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_PagingIEs = { "PagingIEs", "PagingIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_PagingIEs_tags_161, sizeof(asn_DEF_S1AP_PagingIEs_tags_161) /sizeof(asn_DEF_S1AP_PagingIEs_tags_161[0]), /* 1 */ asn_DEF_S1AP_PagingIEs_tags_161, /* Same as above */ sizeof(asn_DEF_S1AP_PagingIEs_tags_161) /sizeof(asn_DEF_S1AP_PagingIEs_tags_161[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_PagingIEs_161, 3, /* Elements count */ &asn_SPC_S1AP_PagingIEs_specs_161 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_168[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseRequest_IEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseRequest_IEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseRequest_IEs__value, choice.Cause), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cause" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseRequest_IEs__value, choice.GWContextReleaseIndication), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_GWContextReleaseIndication, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "GWContextReleaseIndication" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_168[] = { 0, 1, 3, 2 }; static const unsigned asn_MAP_S1AP_value_from_canonical_168[] = { 0, 1, 3, 2 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_168[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 3, 0, 0 }, /* GWContextReleaseIndication */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* radioNetwork */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* transport */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* nas */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* protocol */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 2, 0, 0 } /* misc */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_168 = { sizeof(struct S1AP_UEContextReleaseRequest_IEs__value), offsetof(struct S1AP_UEContextReleaseRequest_IEs__value, _asn_ctx), offsetof(struct S1AP_UEContextReleaseRequest_IEs__value, present), sizeof(((struct S1AP_UEContextReleaseRequest_IEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_168, 8, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_168, asn_MAP_S1AP_value_from_canonical_168, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_168 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_168, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_168 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UEContextReleaseRequest_IEs_165[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseRequest_IEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_166, &asn_PER_memb_S1AP_id_constr_166, memb_S1AP_id_constraint_165 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseRequest_IEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UEContextReleaseRequest_IEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_167, &asn_PER_memb_S1AP_criticality_constr_167, memb_S1AP_criticality_constraint_165 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseRequest_IEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_168, select_UEContextReleaseRequest_IEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_168, &asn_PER_memb_S1AP_value_constr_168, memb_S1AP_value_constraint_165 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextReleaseRequest_IEs_tags_165[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextReleaseRequest_IEs_tag2el_165[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextReleaseRequest_IEs_specs_165 = { sizeof(struct S1AP_UEContextReleaseRequest_IEs), offsetof(struct S1AP_UEContextReleaseRequest_IEs, _asn_ctx), asn_MAP_S1AP_UEContextReleaseRequest_IEs_tag2el_165, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextReleaseRequest_IEs = { "UEContextReleaseRequest-IEs", "UEContextReleaseRequest-IEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextReleaseRequest_IEs_tags_165, sizeof(asn_DEF_S1AP_UEContextReleaseRequest_IEs_tags_165) /sizeof(asn_DEF_S1AP_UEContextReleaseRequest_IEs_tags_165[0]), /* 1 */ asn_DEF_S1AP_UEContextReleaseRequest_IEs_tags_165, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextReleaseRequest_IEs_tags_165) /sizeof(asn_DEF_S1AP_UEContextReleaseRequest_IEs_tags_165[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextReleaseRequest_IEs_165, 3, /* Elements count */ &asn_SPC_S1AP_UEContextReleaseRequest_IEs_specs_165 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_172[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseCommand_IEs__value, choice.UE_S1AP_IDs), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_UE_S1AP_IDs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UE-S1AP-IDs" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseCommand_IEs__value, choice.Cause), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cause" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_172[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 1 }, /* uE-S1AP-ID-pair */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, -1, 0 }, /* radioNetwork */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 1 }, /* mME-UE-S1AP-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, -1, 0 }, /* transport */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 1, 0, 0 }, /* nas */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 1, 0, 0 }, /* protocol */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 1, 0, 0 } /* misc */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_172 = { sizeof(struct S1AP_UEContextReleaseCommand_IEs__value), offsetof(struct S1AP_UEContextReleaseCommand_IEs__value, _asn_ctx), offsetof(struct S1AP_UEContextReleaseCommand_IEs__value, present), sizeof(((struct S1AP_UEContextReleaseCommand_IEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_172, 7, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_172 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_172, 2, /* Elements count */ &asn_SPC_S1AP_value_specs_172 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UEContextReleaseCommand_IEs_169[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseCommand_IEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_170, &asn_PER_memb_S1AP_id_constr_170, memb_S1AP_id_constraint_169 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseCommand_IEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UEContextReleaseCommand_IEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_171, &asn_PER_memb_S1AP_criticality_constr_171, memb_S1AP_criticality_constraint_169 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseCommand_IEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_172, select_UEContextReleaseCommand_IEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_172, &asn_PER_memb_S1AP_value_constr_172, memb_S1AP_value_constraint_169 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextReleaseCommand_IEs_tags_169[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextReleaseCommand_IEs_tag2el_169[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextReleaseCommand_IEs_specs_169 = { sizeof(struct S1AP_UEContextReleaseCommand_IEs), offsetof(struct S1AP_UEContextReleaseCommand_IEs, _asn_ctx), asn_MAP_S1AP_UEContextReleaseCommand_IEs_tag2el_169, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextReleaseCommand_IEs = { "UEContextReleaseCommand-IEs", "UEContextReleaseCommand-IEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextReleaseCommand_IEs_tags_169, sizeof(asn_DEF_S1AP_UEContextReleaseCommand_IEs_tags_169) /sizeof(asn_DEF_S1AP_UEContextReleaseCommand_IEs_tags_169[0]), /* 1 */ asn_DEF_S1AP_UEContextReleaseCommand_IEs_tags_169, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextReleaseCommand_IEs_tags_169) /sizeof(asn_DEF_S1AP_UEContextReleaseCommand_IEs_tags_169[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextReleaseCommand_IEs_169, 3, /* Elements count */ &asn_SPC_S1AP_UEContextReleaseCommand_IEs_specs_169 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_176[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseComplete_IEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseComplete_IEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseComplete_IEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseComplete_IEs__value, choice.UserLocationInformation), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UserLocationInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UserLocationInformation" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseComplete_IEs__value, choice.InformationOnRecommendedCellsAndENBsForPaging), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_InformationOnRecommendedCellsAndENBsForPaging, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "InformationOnRecommendedCellsAndENBsForPaging" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseComplete_IEs__value, choice.CellIdentifierAndCELevelForCECapableUEs), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CellIdentifierAndCELevelForCECapableUEs" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_176[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 3 }, /* CriticalityDiagnostics */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 2 }, /* UserLocationInformation */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -2, 1 }, /* InformationOnRecommendedCellsAndENBsForPaging */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -3, 0 } /* CellIdentifierAndCELevelForCECapableUEs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_176 = { sizeof(struct S1AP_UEContextReleaseComplete_IEs__value), offsetof(struct S1AP_UEContextReleaseComplete_IEs__value, _asn_ctx), offsetof(struct S1AP_UEContextReleaseComplete_IEs__value, present), sizeof(((struct S1AP_UEContextReleaseComplete_IEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_176, 6, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_176 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_176, 6, /* Elements count */ &asn_SPC_S1AP_value_specs_176 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UEContextReleaseComplete_IEs_173[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseComplete_IEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_174, &asn_PER_memb_S1AP_id_constr_174, memb_S1AP_id_constraint_173 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseComplete_IEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UEContextReleaseComplete_IEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_175, &asn_PER_memb_S1AP_criticality_constr_175, memb_S1AP_criticality_constraint_173 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseComplete_IEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_176, select_UEContextReleaseComplete_IEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_176, &asn_PER_memb_S1AP_value_constr_176, memb_S1AP_value_constraint_173 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextReleaseComplete_IEs_tags_173[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextReleaseComplete_IEs_tag2el_173[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextReleaseComplete_IEs_specs_173 = { sizeof(struct S1AP_UEContextReleaseComplete_IEs), offsetof(struct S1AP_UEContextReleaseComplete_IEs, _asn_ctx), asn_MAP_S1AP_UEContextReleaseComplete_IEs_tag2el_173, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextReleaseComplete_IEs = { "UEContextReleaseComplete-IEs", "UEContextReleaseComplete-IEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextReleaseComplete_IEs_tags_173, sizeof(asn_DEF_S1AP_UEContextReleaseComplete_IEs_tags_173) /sizeof(asn_DEF_S1AP_UEContextReleaseComplete_IEs_tags_173[0]), /* 1 */ asn_DEF_S1AP_UEContextReleaseComplete_IEs_tags_173, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextReleaseComplete_IEs_tags_173) /sizeof(asn_DEF_S1AP_UEContextReleaseComplete_IEs_tags_173[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextReleaseComplete_IEs_173, 3, /* Elements count */ &asn_SPC_S1AP_UEContextReleaseComplete_IEs_specs_173 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_180[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationRequestIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationRequestIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationRequestIEs__value, choice.SecurityKey), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_SecurityKey, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SecurityKey" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationRequestIEs__value, choice.SubscriberProfileIDforRFP), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_SubscriberProfileIDforRFP, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SubscriberProfileIDforRFP" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationRequestIEs__value, choice.UEAggregateMaximumBitrate), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEAggregateMaximumBitrate, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEAggregateMaximumBitrate" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationRequestIEs__value, choice.CSFallbackIndicator), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_CSFallbackIndicator, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CSFallbackIndicator" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationRequestIEs__value, choice.UESecurityCapabilities), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UESecurityCapabilities, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UESecurityCapabilities" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationRequestIEs__value, choice.CSGMembershipStatus), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_CSGMembershipStatus, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CSGMembershipStatus" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationRequestIEs__value, choice.LAI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_LAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "LAI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationRequestIEs__value, choice.AdditionalCSFallbackIndicator), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_AdditionalCSFallbackIndicator, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "AdditionalCSFallbackIndicator" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationRequestIEs__value, choice.ProSeAuthorized), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProSeAuthorized, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ProSeAuthorized" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationRequestIEs__value, choice.SRVCCOperationPossible), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_SRVCCOperationPossible, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SRVCCOperationPossible" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationRequestIEs__value, choice.SRVCCOperationNotPossible), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_SRVCCOperationNotPossible, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SRVCCOperationNotPossible" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationRequestIEs__value, choice.V2XServicesAuthorized), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_V2XServicesAuthorized, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "V2XServicesAuthorized" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationRequestIEs__value, choice.UESidelinkAggregateMaximumBitrate), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UESidelinkAggregateMaximumBitrate, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UESidelinkAggregateMaximumBitrate" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_180[] = { 0, 1, 3, 2, 5, 7, 9, 11, 12, 4, 6, 8, 10, 13, 14 }; static const unsigned asn_MAP_S1AP_value_from_canonical_180[] = { 0, 1, 3, 2, 9, 4, 10, 5, 11, 6, 12, 7, 8, 13, 14 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_180[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 1 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, -2, 0 }, /* SubscriberProfileIDforRFP */ { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 2, 0, 0 }, /* SecurityKey */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 5, 0, 4 }, /* CSFallbackIndicator */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 7, -1, 3 }, /* CSGMembershipStatus */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 9, -2, 2 }, /* AdditionalCSFallbackIndicator */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 11, -3, 1 }, /* SRVCCOperationPossible */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 12, -4, 0 }, /* SRVCCOperationNotPossible */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, 0, 5 }, /* UEAggregateMaximumBitrate */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 6, -1, 4 }, /* UESecurityCapabilities */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 8, -2, 3 }, /* LAI */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 10, -3, 2 }, /* ProSeAuthorized */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 13, -4, 1 }, /* V2XServicesAuthorized */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 14, -5, 0 } /* UESidelinkAggregateMaximumBitrate */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_180 = { sizeof(struct S1AP_UEContextModificationRequestIEs__value), offsetof(struct S1AP_UEContextModificationRequestIEs__value, _asn_ctx), offsetof(struct S1AP_UEContextModificationRequestIEs__value, present), sizeof(((struct S1AP_UEContextModificationRequestIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_180, 15, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_180, asn_MAP_S1AP_value_from_canonical_180, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_180 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_180, 15, /* Elements count */ &asn_SPC_S1AP_value_specs_180 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UEContextModificationRequestIEs_177[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationRequestIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_178, &asn_PER_memb_S1AP_id_constr_178, memb_S1AP_id_constraint_177 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationRequestIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UEContextModificationRequestIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_179, &asn_PER_memb_S1AP_criticality_constr_179, memb_S1AP_criticality_constraint_177 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationRequestIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_180, select_UEContextModificationRequestIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_180, &asn_PER_memb_S1AP_value_constr_180, memb_S1AP_value_constraint_177 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextModificationRequestIEs_tags_177[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextModificationRequestIEs_tag2el_177[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextModificationRequestIEs_specs_177 = { sizeof(struct S1AP_UEContextModificationRequestIEs), offsetof(struct S1AP_UEContextModificationRequestIEs, _asn_ctx), asn_MAP_S1AP_UEContextModificationRequestIEs_tag2el_177, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextModificationRequestIEs = { "UEContextModificationRequestIEs", "UEContextModificationRequestIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextModificationRequestIEs_tags_177, sizeof(asn_DEF_S1AP_UEContextModificationRequestIEs_tags_177) /sizeof(asn_DEF_S1AP_UEContextModificationRequestIEs_tags_177[0]), /* 1 */ asn_DEF_S1AP_UEContextModificationRequestIEs_tags_177, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextModificationRequestIEs_tags_177) /sizeof(asn_DEF_S1AP_UEContextModificationRequestIEs_tags_177[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextModificationRequestIEs_177, 3, /* Elements count */ &asn_SPC_S1AP_UEContextModificationRequestIEs_specs_177 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_184[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationResponseIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationResponseIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationResponseIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_184[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 } /* CriticalityDiagnostics */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_184 = { sizeof(struct S1AP_UEContextModificationResponseIEs__value), offsetof(struct S1AP_UEContextModificationResponseIEs__value, _asn_ctx), offsetof(struct S1AP_UEContextModificationResponseIEs__value, present), sizeof(((struct S1AP_UEContextModificationResponseIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_184, 3, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_184 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_184, 3, /* Elements count */ &asn_SPC_S1AP_value_specs_184 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UEContextModificationResponseIEs_181[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationResponseIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_182, &asn_PER_memb_S1AP_id_constr_182, memb_S1AP_id_constraint_181 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationResponseIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UEContextModificationResponseIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_183, &asn_PER_memb_S1AP_criticality_constr_183, memb_S1AP_criticality_constraint_181 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationResponseIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_184, select_UEContextModificationResponseIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_184, &asn_PER_memb_S1AP_value_constr_184, memb_S1AP_value_constraint_181 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextModificationResponseIEs_tags_181[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextModificationResponseIEs_tag2el_181[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextModificationResponseIEs_specs_181 = { sizeof(struct S1AP_UEContextModificationResponseIEs), offsetof(struct S1AP_UEContextModificationResponseIEs, _asn_ctx), asn_MAP_S1AP_UEContextModificationResponseIEs_tag2el_181, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextModificationResponseIEs = { "UEContextModificationResponseIEs", "UEContextModificationResponseIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextModificationResponseIEs_tags_181, sizeof(asn_DEF_S1AP_UEContextModificationResponseIEs_tags_181) /sizeof(asn_DEF_S1AP_UEContextModificationResponseIEs_tags_181[0]), /* 1 */ asn_DEF_S1AP_UEContextModificationResponseIEs_tags_181, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextModificationResponseIEs_tags_181) /sizeof(asn_DEF_S1AP_UEContextModificationResponseIEs_tags_181[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextModificationResponseIEs_181, 3, /* Elements count */ &asn_SPC_S1AP_UEContextModificationResponseIEs_specs_181 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_188[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationFailureIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationFailureIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationFailureIEs__value, choice.Cause), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cause" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationFailureIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_188[] = { 0, 1, 3, 2 }; static const unsigned asn_MAP_S1AP_value_from_canonical_188[] = { 0, 1, 3, 2 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_188[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, 0, 0 }, /* CriticalityDiagnostics */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* radioNetwork */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* transport */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* nas */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* protocol */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 2, 0, 0 } /* misc */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_188 = { sizeof(struct S1AP_UEContextModificationFailureIEs__value), offsetof(struct S1AP_UEContextModificationFailureIEs__value, _asn_ctx), offsetof(struct S1AP_UEContextModificationFailureIEs__value, present), sizeof(((struct S1AP_UEContextModificationFailureIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_188, 8, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_188, asn_MAP_S1AP_value_from_canonical_188, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_188 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_188, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_188 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UEContextModificationFailureIEs_185[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationFailureIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_186, &asn_PER_memb_S1AP_id_constr_186, memb_S1AP_id_constraint_185 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationFailureIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UEContextModificationFailureIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_187, &asn_PER_memb_S1AP_criticality_constr_187, memb_S1AP_criticality_constraint_185 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationFailureIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_188, select_UEContextModificationFailureIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_188, &asn_PER_memb_S1AP_value_constr_188, memb_S1AP_value_constraint_185 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextModificationFailureIEs_tags_185[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextModificationFailureIEs_tag2el_185[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextModificationFailureIEs_specs_185 = { sizeof(struct S1AP_UEContextModificationFailureIEs), offsetof(struct S1AP_UEContextModificationFailureIEs, _asn_ctx), asn_MAP_S1AP_UEContextModificationFailureIEs_tag2el_185, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextModificationFailureIEs = { "UEContextModificationFailureIEs", "UEContextModificationFailureIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextModificationFailureIEs_tags_185, sizeof(asn_DEF_S1AP_UEContextModificationFailureIEs_tags_185) /sizeof(asn_DEF_S1AP_UEContextModificationFailureIEs_tags_185[0]), /* 1 */ asn_DEF_S1AP_UEContextModificationFailureIEs_tags_185, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextModificationFailureIEs_tags_185) /sizeof(asn_DEF_S1AP_UEContextModificationFailureIEs_tags_185[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextModificationFailureIEs_185, 3, /* Elements count */ &asn_SPC_S1AP_UEContextModificationFailureIEs_specs_185 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_192[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UERadioCapabilityMatchRequestIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UERadioCapabilityMatchRequestIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UERadioCapabilityMatchRequestIEs__value, choice.UERadioCapability), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_UERadioCapability, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UERadioCapability" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_192[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, 0, 0 } /* UERadioCapability */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_192 = { sizeof(struct S1AP_UERadioCapabilityMatchRequestIEs__value), offsetof(struct S1AP_UERadioCapabilityMatchRequestIEs__value, _asn_ctx), offsetof(struct S1AP_UERadioCapabilityMatchRequestIEs__value, present), sizeof(((struct S1AP_UERadioCapabilityMatchRequestIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_192, 3, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_192 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_192, 3, /* Elements count */ &asn_SPC_S1AP_value_specs_192 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UERadioCapabilityMatchRequestIEs_189[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UERadioCapabilityMatchRequestIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_190, &asn_PER_memb_S1AP_id_constr_190, memb_S1AP_id_constraint_189 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UERadioCapabilityMatchRequestIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UERadioCapabilityMatchRequestIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_191, &asn_PER_memb_S1AP_criticality_constr_191, memb_S1AP_criticality_constraint_189 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UERadioCapabilityMatchRequestIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_192, select_UERadioCapabilityMatchRequestIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_192, &asn_PER_memb_S1AP_value_constr_192, memb_S1AP_value_constraint_189 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UERadioCapabilityMatchRequestIEs_tags_189[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UERadioCapabilityMatchRequestIEs_tag2el_189[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UERadioCapabilityMatchRequestIEs_specs_189 = { sizeof(struct S1AP_UERadioCapabilityMatchRequestIEs), offsetof(struct S1AP_UERadioCapabilityMatchRequestIEs, _asn_ctx), asn_MAP_S1AP_UERadioCapabilityMatchRequestIEs_tag2el_189, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UERadioCapabilityMatchRequestIEs = { "UERadioCapabilityMatchRequestIEs", "UERadioCapabilityMatchRequestIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UERadioCapabilityMatchRequestIEs_tags_189, sizeof(asn_DEF_S1AP_UERadioCapabilityMatchRequestIEs_tags_189) /sizeof(asn_DEF_S1AP_UERadioCapabilityMatchRequestIEs_tags_189[0]), /* 1 */ asn_DEF_S1AP_UERadioCapabilityMatchRequestIEs_tags_189, /* Same as above */ sizeof(asn_DEF_S1AP_UERadioCapabilityMatchRequestIEs_tags_189) /sizeof(asn_DEF_S1AP_UERadioCapabilityMatchRequestIEs_tags_189[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UERadioCapabilityMatchRequestIEs_189, 3, /* Elements count */ &asn_SPC_S1AP_UERadioCapabilityMatchRequestIEs_specs_189 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_196[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UERadioCapabilityMatchResponseIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UERadioCapabilityMatchResponseIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UERadioCapabilityMatchResponseIEs__value, choice.VoiceSupportMatchIndicator), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_VoiceSupportMatchIndicator, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "VoiceSupportMatchIndicator" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UERadioCapabilityMatchResponseIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_196[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 2, 0, 0 }, /* VoiceSupportMatchIndicator */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, 0, 0 } /* CriticalityDiagnostics */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_196 = { sizeof(struct S1AP_UERadioCapabilityMatchResponseIEs__value), offsetof(struct S1AP_UERadioCapabilityMatchResponseIEs__value, _asn_ctx), offsetof(struct S1AP_UERadioCapabilityMatchResponseIEs__value, present), sizeof(((struct S1AP_UERadioCapabilityMatchResponseIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_196, 4, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_196 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_196, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_196 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UERadioCapabilityMatchResponseIEs_193[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UERadioCapabilityMatchResponseIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_194, &asn_PER_memb_S1AP_id_constr_194, memb_S1AP_id_constraint_193 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UERadioCapabilityMatchResponseIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UERadioCapabilityMatchResponseIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_195, &asn_PER_memb_S1AP_criticality_constr_195, memb_S1AP_criticality_constraint_193 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UERadioCapabilityMatchResponseIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_196, select_UERadioCapabilityMatchResponseIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_196, &asn_PER_memb_S1AP_value_constr_196, memb_S1AP_value_constraint_193 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UERadioCapabilityMatchResponseIEs_tags_193[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UERadioCapabilityMatchResponseIEs_tag2el_193[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UERadioCapabilityMatchResponseIEs_specs_193 = { sizeof(struct S1AP_UERadioCapabilityMatchResponseIEs), offsetof(struct S1AP_UERadioCapabilityMatchResponseIEs, _asn_ctx), asn_MAP_S1AP_UERadioCapabilityMatchResponseIEs_tag2el_193, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UERadioCapabilityMatchResponseIEs = { "UERadioCapabilityMatchResponseIEs", "UERadioCapabilityMatchResponseIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UERadioCapabilityMatchResponseIEs_tags_193, sizeof(asn_DEF_S1AP_UERadioCapabilityMatchResponseIEs_tags_193) /sizeof(asn_DEF_S1AP_UERadioCapabilityMatchResponseIEs_tags_193[0]), /* 1 */ asn_DEF_S1AP_UERadioCapabilityMatchResponseIEs_tags_193, /* Same as above */ sizeof(asn_DEF_S1AP_UERadioCapabilityMatchResponseIEs_tags_193) /sizeof(asn_DEF_S1AP_UERadioCapabilityMatchResponseIEs_tags_193[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UERadioCapabilityMatchResponseIEs_193, 3, /* Elements count */ &asn_SPC_S1AP_UERadioCapabilityMatchResponseIEs_specs_193 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_200[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkNASTransport_IEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkNASTransport_IEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkNASTransport_IEs__value, choice.NAS_PDU), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_NAS_PDU, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "NAS-PDU" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkNASTransport_IEs__value, choice.HandoverRestrictionList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_HandoverRestrictionList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "HandoverRestrictionList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkNASTransport_IEs__value, choice.SubscriberProfileIDforRFP), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_SubscriberProfileIDforRFP, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SubscriberProfileIDforRFP" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkNASTransport_IEs__value, choice.SRVCCOperationPossible), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_SRVCCOperationPossible, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SRVCCOperationPossible" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkNASTransport_IEs__value, choice.UERadioCapability), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_UERadioCapability, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UERadioCapability" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkNASTransport_IEs__value, choice.DLNASPDUDeliveryAckRequest), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_DLNASPDUDeliveryAckRequest, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "DLNASPDUDeliveryAckRequest" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkNASTransport_IEs__value, choice.EnhancedCoverageRestricted), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_EnhancedCoverageRestricted, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "EnhancedCoverageRestricted" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_200[] = { 0, 1, 4, 2, 6, 5, 7, 8, 3 }; static const unsigned asn_MAP_S1AP_value_from_canonical_200[] = { 0, 1, 3, 8, 2, 5, 4, 6, 7 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_200[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 1 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 4, -2, 0 }, /* SubscriberProfileIDforRFP */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, 0, 1 }, /* NAS-PDU */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 6, -1, 0 }, /* UERadioCapability */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 5, 0, 2 }, /* SRVCCOperationPossible */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 7, -1, 1 }, /* DLNASPDUDeliveryAckRequest */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 8, -2, 0 }, /* EnhancedCoverageRestricted */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, 0, 0 } /* HandoverRestrictionList */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_200 = { sizeof(struct S1AP_DownlinkNASTransport_IEs__value), offsetof(struct S1AP_DownlinkNASTransport_IEs__value, _asn_ctx), offsetof(struct S1AP_DownlinkNASTransport_IEs__value, present), sizeof(((struct S1AP_DownlinkNASTransport_IEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_200, 9, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_200, asn_MAP_S1AP_value_from_canonical_200, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_200 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_200, 9, /* Elements count */ &asn_SPC_S1AP_value_specs_200 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_DownlinkNASTransport_IEs_197[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkNASTransport_IEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_198, &asn_PER_memb_S1AP_id_constr_198, memb_S1AP_id_constraint_197 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkNASTransport_IEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_DownlinkNASTransport_IEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_199, &asn_PER_memb_S1AP_criticality_constr_199, memb_S1AP_criticality_constraint_197 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkNASTransport_IEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_200, select_DownlinkNASTransport_IEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_200, &asn_PER_memb_S1AP_value_constr_200, memb_S1AP_value_constraint_197 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_DownlinkNASTransport_IEs_tags_197[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_DownlinkNASTransport_IEs_tag2el_197[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_DownlinkNASTransport_IEs_specs_197 = { sizeof(struct S1AP_DownlinkNASTransport_IEs), offsetof(struct S1AP_DownlinkNASTransport_IEs, _asn_ctx), asn_MAP_S1AP_DownlinkNASTransport_IEs_tag2el_197, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_DownlinkNASTransport_IEs = { "DownlinkNASTransport-IEs", "DownlinkNASTransport-IEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_DownlinkNASTransport_IEs_tags_197, sizeof(asn_DEF_S1AP_DownlinkNASTransport_IEs_tags_197) /sizeof(asn_DEF_S1AP_DownlinkNASTransport_IEs_tags_197[0]), /* 1 */ asn_DEF_S1AP_DownlinkNASTransport_IEs_tags_197, /* Same as above */ sizeof(asn_DEF_S1AP_DownlinkNASTransport_IEs_tags_197) /sizeof(asn_DEF_S1AP_DownlinkNASTransport_IEs_tags_197[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_DownlinkNASTransport_IEs_197, 3, /* Elements count */ &asn_SPC_S1AP_DownlinkNASTransport_IEs_specs_197 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_204[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialUEMessage_IEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialUEMessage_IEs__value, choice.NAS_PDU), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_NAS_PDU, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "NAS-PDU" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialUEMessage_IEs__value, choice.TAI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TAI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialUEMessage_IEs__value, choice.EUTRAN_CGI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_EUTRAN_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "EUTRAN-CGI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialUEMessage_IEs__value, choice.RRC_Establishment_Cause), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_RRC_Establishment_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "RRC-Establishment-Cause" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialUEMessage_IEs__value, choice.S_TMSI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_S_TMSI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "S-TMSI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialUEMessage_IEs__value, choice.CSG_Id), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_CSG_Id, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CSG-Id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialUEMessage_IEs__value, choice.GUMMEI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_GUMMEI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "GUMMEI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialUEMessage_IEs__value, choice.CellAccessMode), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_CellAccessMode, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CellAccessMode" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialUEMessage_IEs__value, choice.TransportLayerAddress), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TransportLayerAddress" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialUEMessage_IEs__value, choice.RelayNode_Indicator), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_RelayNode_Indicator, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "RelayNode-Indicator" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialUEMessage_IEs__value, choice.GUMMEIType), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_GUMMEIType, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "GUMMEIType" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialUEMessage_IEs__value, choice.TunnelInformation), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TunnelInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TunnelInformation" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialUEMessage_IEs__value, choice.LHN_ID), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_LHN_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "LHN-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialUEMessage_IEs__value, choice.MME_Group_ID), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_MME_Group_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-Group-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialUEMessage_IEs__value, choice.UE_Usage_Type), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_UE_Usage_Type, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UE-Usage-Type" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialUEMessage_IEs__value, choice.CE_mode_B_SupportIndicator), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_CE_mode_B_SupportIndicator, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CE-mode-B-SupportIndicator" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialUEMessage_IEs__value, choice.DCN_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_DCN_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "DCN-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialUEMessage_IEs__value, choice.Coverage_Level), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_Coverage_Level, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Coverage-Level" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_204[] = { 0, 15, 17, 6, 9, 1, 13, 14, 4, 8, 10, 11, 16, 18, 2, 3, 5, 7, 12 }; static const unsigned asn_MAP_S1AP_value_from_canonical_204[] = { 0, 5, 14, 15, 8, 16, 3, 17, 9, 4, 10, 11, 18, 6, 7, 1, 12, 2, 13 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_204[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 15, -1, 1 }, /* UE-Usage-Type */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 17, -2, 0 }, /* DCN-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 6, 0, 1 }, /* CSG-Id */ { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 9, -1, 0 }, /* TransportLayerAddress */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 2 }, /* NAS-PDU */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 13, -1, 1 }, /* LHN-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 14, -2, 0 }, /* MME-Group-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 4, 0, 5 }, /* RRC-Establishment-Cause */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 8, -1, 4 }, /* CellAccessMode */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 10, -2, 3 }, /* RelayNode-Indicator */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 11, -3, 2 }, /* GUMMEIType */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 16, -4, 1 }, /* CE-mode-B-SupportIndicator */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 18, -5, 0 }, /* Coverage-Level */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 4 }, /* TAI */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 3 }, /* EUTRAN-CGI */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -2, 2 }, /* S-TMSI */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 7, -3, 1 }, /* GUMMEI */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 12, -4, 0 } /* TunnelInformation */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_204 = { sizeof(struct S1AP_InitialUEMessage_IEs__value), offsetof(struct S1AP_InitialUEMessage_IEs__value, _asn_ctx), offsetof(struct S1AP_InitialUEMessage_IEs__value, present), sizeof(((struct S1AP_InitialUEMessage_IEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_204, 19, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_204, asn_MAP_S1AP_value_from_canonical_204, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_204 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_204, 19, /* Elements count */ &asn_SPC_S1AP_value_specs_204 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_InitialUEMessage_IEs_201[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialUEMessage_IEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_202, &asn_PER_memb_S1AP_id_constr_202, memb_S1AP_id_constraint_201 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialUEMessage_IEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_InitialUEMessage_IEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_203, &asn_PER_memb_S1AP_criticality_constr_203, memb_S1AP_criticality_constraint_201 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_InitialUEMessage_IEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_204, select_InitialUEMessage_IEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_204, &asn_PER_memb_S1AP_value_constr_204, memb_S1AP_value_constraint_201 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_InitialUEMessage_IEs_tags_201[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_InitialUEMessage_IEs_tag2el_201[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_InitialUEMessage_IEs_specs_201 = { sizeof(struct S1AP_InitialUEMessage_IEs), offsetof(struct S1AP_InitialUEMessage_IEs, _asn_ctx), asn_MAP_S1AP_InitialUEMessage_IEs_tag2el_201, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_InitialUEMessage_IEs = { "InitialUEMessage-IEs", "InitialUEMessage-IEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_InitialUEMessage_IEs_tags_201, sizeof(asn_DEF_S1AP_InitialUEMessage_IEs_tags_201) /sizeof(asn_DEF_S1AP_InitialUEMessage_IEs_tags_201[0]), /* 1 */ asn_DEF_S1AP_InitialUEMessage_IEs_tags_201, /* Same as above */ sizeof(asn_DEF_S1AP_InitialUEMessage_IEs_tags_201) /sizeof(asn_DEF_S1AP_InitialUEMessage_IEs_tags_201[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_InitialUEMessage_IEs_201, 3, /* Elements count */ &asn_SPC_S1AP_InitialUEMessage_IEs_specs_201 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_208[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkNASTransport_IEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkNASTransport_IEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkNASTransport_IEs__value, choice.NAS_PDU), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_NAS_PDU, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "NAS-PDU" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkNASTransport_IEs__value, choice.EUTRAN_CGI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_EUTRAN_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "EUTRAN-CGI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkNASTransport_IEs__value, choice.TAI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TAI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkNASTransport_IEs__value, choice.TransportLayerAddress), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TransportLayerAddress" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkNASTransport_IEs__value, choice.LHN_ID), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_LHN_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "LHN-ID" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_208[] = { 0, 1, 5, 2, 6, 3, 4 }; static const unsigned asn_MAP_S1AP_value_from_canonical_208[] = { 0, 1, 3, 5, 6, 2, 4 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_208[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 5, 0, 0 }, /* TransportLayerAddress */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, 0, 1 }, /* NAS-PDU */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 6, -1, 0 }, /* LHN-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, 0, 1 }, /* EUTRAN-CGI */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -1, 0 } /* TAI */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_208 = { sizeof(struct S1AP_UplinkNASTransport_IEs__value), offsetof(struct S1AP_UplinkNASTransport_IEs__value, _asn_ctx), offsetof(struct S1AP_UplinkNASTransport_IEs__value, present), sizeof(((struct S1AP_UplinkNASTransport_IEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_208, 7, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_208, asn_MAP_S1AP_value_from_canonical_208, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_208 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_208, 7, /* Elements count */ &asn_SPC_S1AP_value_specs_208 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UplinkNASTransport_IEs_205[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkNASTransport_IEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_206, &asn_PER_memb_S1AP_id_constr_206, memb_S1AP_id_constraint_205 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkNASTransport_IEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UplinkNASTransport_IEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_207, &asn_PER_memb_S1AP_criticality_constr_207, memb_S1AP_criticality_constraint_205 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkNASTransport_IEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_208, select_UplinkNASTransport_IEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_208, &asn_PER_memb_S1AP_value_constr_208, memb_S1AP_value_constraint_205 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UplinkNASTransport_IEs_tags_205[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UplinkNASTransport_IEs_tag2el_205[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UplinkNASTransport_IEs_specs_205 = { sizeof(struct S1AP_UplinkNASTransport_IEs), offsetof(struct S1AP_UplinkNASTransport_IEs, _asn_ctx), asn_MAP_S1AP_UplinkNASTransport_IEs_tag2el_205, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UplinkNASTransport_IEs = { "UplinkNASTransport-IEs", "UplinkNASTransport-IEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UplinkNASTransport_IEs_tags_205, sizeof(asn_DEF_S1AP_UplinkNASTransport_IEs_tags_205) /sizeof(asn_DEF_S1AP_UplinkNASTransport_IEs_tags_205[0]), /* 1 */ asn_DEF_S1AP_UplinkNASTransport_IEs_tags_205, /* Same as above */ sizeof(asn_DEF_S1AP_UplinkNASTransport_IEs_tags_205) /sizeof(asn_DEF_S1AP_UplinkNASTransport_IEs_tags_205[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UplinkNASTransport_IEs_205, 3, /* Elements count */ &asn_SPC_S1AP_UplinkNASTransport_IEs_specs_205 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_212[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_NASNonDeliveryIndication_IEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_NASNonDeliveryIndication_IEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_NASNonDeliveryIndication_IEs__value, choice.NAS_PDU), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_NAS_PDU, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "NAS-PDU" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_NASNonDeliveryIndication_IEs__value, choice.Cause), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cause" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_212[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, 0, 0 }, /* NAS-PDU */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 3, 0, 0 }, /* radioNetwork */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 3, 0, 0 }, /* transport */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 3, 0, 0 }, /* nas */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* protocol */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 3, 0, 0 } /* misc */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_212 = { sizeof(struct S1AP_NASNonDeliveryIndication_IEs__value), offsetof(struct S1AP_NASNonDeliveryIndication_IEs__value, _asn_ctx), offsetof(struct S1AP_NASNonDeliveryIndication_IEs__value, present), sizeof(((struct S1AP_NASNonDeliveryIndication_IEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_212, 8, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_212 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_212, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_212 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_NASNonDeliveryIndication_IEs_209[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_NASNonDeliveryIndication_IEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_210, &asn_PER_memb_S1AP_id_constr_210, memb_S1AP_id_constraint_209 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_NASNonDeliveryIndication_IEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_NASNonDeliveryIndication_IEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_211, &asn_PER_memb_S1AP_criticality_constr_211, memb_S1AP_criticality_constraint_209 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_NASNonDeliveryIndication_IEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_212, select_NASNonDeliveryIndication_IEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_212, &asn_PER_memb_S1AP_value_constr_212, memb_S1AP_value_constraint_209 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_NASNonDeliveryIndication_IEs_tags_209[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_NASNonDeliveryIndication_IEs_tag2el_209[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_NASNonDeliveryIndication_IEs_specs_209 = { sizeof(struct S1AP_NASNonDeliveryIndication_IEs), offsetof(struct S1AP_NASNonDeliveryIndication_IEs, _asn_ctx), asn_MAP_S1AP_NASNonDeliveryIndication_IEs_tag2el_209, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_NASNonDeliveryIndication_IEs = { "NASNonDeliveryIndication-IEs", "NASNonDeliveryIndication-IEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_NASNonDeliveryIndication_IEs_tags_209, sizeof(asn_DEF_S1AP_NASNonDeliveryIndication_IEs_tags_209) /sizeof(asn_DEF_S1AP_NASNonDeliveryIndication_IEs_tags_209[0]), /* 1 */ asn_DEF_S1AP_NASNonDeliveryIndication_IEs_tags_209, /* Same as above */ sizeof(asn_DEF_S1AP_NASNonDeliveryIndication_IEs_tags_209) /sizeof(asn_DEF_S1AP_NASNonDeliveryIndication_IEs_tags_209[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_NASNonDeliveryIndication_IEs_209, 3, /* Elements count */ &asn_SPC_S1AP_NASNonDeliveryIndication_IEs_specs_209 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_216[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RerouteNASRequest_IEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_RerouteNASRequest_IEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_RerouteNASRequest_IEs__value, choice.OCTET_STRING), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_OCTET_STRING, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "OCTET STRING" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_RerouteNASRequest_IEs__value, choice.MME_Group_ID), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_MME_Group_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-Group-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_RerouteNASRequest_IEs__value, choice.Additional_GUTI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_Additional_GUTI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Additional-GUTI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_RerouteNASRequest_IEs__value, choice.UE_Usage_Type), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_UE_Usage_Type, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UE-Usage-Type" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_216[] = { 0, 1, 5, 2, 3, 4 }; static const unsigned asn_MAP_S1AP_value_from_canonical_216[] = { 0, 1, 3, 4, 5, 2 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_216[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 5, -2, 0 }, /* UE-Usage-Type */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, 0, 1 }, /* OCTET STRING */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 3, -1, 0 }, /* MME-Group-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, 0, 0 } /* Additional-GUTI */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_216 = { sizeof(struct S1AP_RerouteNASRequest_IEs__value), offsetof(struct S1AP_RerouteNASRequest_IEs__value, _asn_ctx), offsetof(struct S1AP_RerouteNASRequest_IEs__value, present), sizeof(((struct S1AP_RerouteNASRequest_IEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_216, 6, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_216, asn_MAP_S1AP_value_from_canonical_216, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_216 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_216, 6, /* Elements count */ &asn_SPC_S1AP_value_specs_216 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_RerouteNASRequest_IEs_213[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RerouteNASRequest_IEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_214, &asn_PER_memb_S1AP_id_constr_214, memb_S1AP_id_constraint_213 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_RerouteNASRequest_IEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_RerouteNASRequest_IEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_215, &asn_PER_memb_S1AP_criticality_constr_215, memb_S1AP_criticality_constraint_213 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_RerouteNASRequest_IEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_216, select_RerouteNASRequest_IEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_216, &asn_PER_memb_S1AP_value_constr_216, memb_S1AP_value_constraint_213 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_RerouteNASRequest_IEs_tags_213[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_RerouteNASRequest_IEs_tag2el_213[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_RerouteNASRequest_IEs_specs_213 = { sizeof(struct S1AP_RerouteNASRequest_IEs), offsetof(struct S1AP_RerouteNASRequest_IEs, _asn_ctx), asn_MAP_S1AP_RerouteNASRequest_IEs_tag2el_213, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_RerouteNASRequest_IEs = { "RerouteNASRequest-IEs", "RerouteNASRequest-IEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_RerouteNASRequest_IEs_tags_213, sizeof(asn_DEF_S1AP_RerouteNASRequest_IEs_tags_213) /sizeof(asn_DEF_S1AP_RerouteNASRequest_IEs_tags_213[0]), /* 1 */ asn_DEF_S1AP_RerouteNASRequest_IEs_tags_213, /* Same as above */ sizeof(asn_DEF_S1AP_RerouteNASRequest_IEs_tags_213) /sizeof(asn_DEF_S1AP_RerouteNASRequest_IEs_tags_213[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_RerouteNASRequest_IEs_213, 3, /* Elements count */ &asn_SPC_S1AP_RerouteNASRequest_IEs_specs_213 /* Additional specs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_220 = { sizeof(struct S1AP_NASDeliveryIndicationIEs__value), offsetof(struct S1AP_NASDeliveryIndicationIEs__value, _asn_ctx), offsetof(struct S1AP_NASDeliveryIndicationIEs__value, present), sizeof(((struct S1AP_NASDeliveryIndicationIEs__value *)0)->present), 0, /* No top level tags */ 0, /* No tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_220 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, 0, 0, /* No members */ &asn_SPC_S1AP_value_specs_220 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_NASDeliveryIndicationIEs_217[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_NASDeliveryIndicationIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_218, &asn_PER_memb_S1AP_id_constr_218, memb_S1AP_id_constraint_217 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_NASDeliveryIndicationIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, 0, { &asn_OER_memb_S1AP_criticality_constr_219, &asn_PER_memb_S1AP_criticality_constr_219, memb_S1AP_criticality_constraint_217 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_NASDeliveryIndicationIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_220, 0, { &asn_OER_memb_S1AP_value_constr_220, &asn_PER_memb_S1AP_value_constr_220, memb_S1AP_value_constraint_217 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_NASDeliveryIndicationIEs_tags_217[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_NASDeliveryIndicationIEs_tag2el_217[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_NASDeliveryIndicationIEs_specs_217 = { sizeof(struct S1AP_NASDeliveryIndicationIEs), offsetof(struct S1AP_NASDeliveryIndicationIEs, _asn_ctx), asn_MAP_S1AP_NASDeliveryIndicationIEs_tag2el_217, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_NASDeliveryIndicationIEs = { "NASDeliveryIndicationIEs", "NASDeliveryIndicationIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_NASDeliveryIndicationIEs_tags_217, sizeof(asn_DEF_S1AP_NASDeliveryIndicationIEs_tags_217) /sizeof(asn_DEF_S1AP_NASDeliveryIndicationIEs_tags_217[0]), /* 1 */ asn_DEF_S1AP_NASDeliveryIndicationIEs_tags_217, /* Same as above */ sizeof(asn_DEF_S1AP_NASDeliveryIndicationIEs_tags_217) /sizeof(asn_DEF_S1AP_NASDeliveryIndicationIEs_tags_217[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_NASDeliveryIndicationIEs_217, 3, /* Elements count */ &asn_SPC_S1AP_NASDeliveryIndicationIEs_specs_217 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_224[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ResetIEs__value, choice.Cause), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cause" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ResetIEs__value, choice.ResetType), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_ResetType, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ResetType" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_224[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 1 }, /* radioNetwork */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 1, -1, 0 }, /* s1-Interface */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 1 }, /* transport */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, -1, 0 }, /* partOfS1-Interface */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 0, 0, 0 }, /* nas */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 0, 0, 0 }, /* protocol */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 0, 0, 0 } /* misc */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_224 = { sizeof(struct S1AP_ResetIEs__value), offsetof(struct S1AP_ResetIEs__value, _asn_ctx), offsetof(struct S1AP_ResetIEs__value, present), sizeof(((struct S1AP_ResetIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_224, 7, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_224 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_224, 2, /* Elements count */ &asn_SPC_S1AP_value_specs_224 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ResetIEs_221[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ResetIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_222, &asn_PER_memb_S1AP_id_constr_222, memb_S1AP_id_constraint_221 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ResetIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_ResetIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_223, &asn_PER_memb_S1AP_criticality_constr_223, memb_S1AP_criticality_constraint_221 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_ResetIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_224, select_ResetIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_224, &asn_PER_memb_S1AP_value_constr_224, memb_S1AP_value_constraint_221 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ResetIEs_tags_221[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ResetIEs_tag2el_221[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ResetIEs_specs_221 = { sizeof(struct S1AP_ResetIEs), offsetof(struct S1AP_ResetIEs, _asn_ctx), asn_MAP_S1AP_ResetIEs_tag2el_221, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ResetIEs = { "ResetIEs", "ResetIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_ResetIEs_tags_221, sizeof(asn_DEF_S1AP_ResetIEs_tags_221) /sizeof(asn_DEF_S1AP_ResetIEs_tags_221[0]), /* 1 */ asn_DEF_S1AP_ResetIEs_tags_221, /* Same as above */ sizeof(asn_DEF_S1AP_ResetIEs_tags_221) /sizeof(asn_DEF_S1AP_ResetIEs_tags_221[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ResetIEs_221, 3, /* Elements count */ &asn_SPC_S1AP_ResetIEs_specs_221 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_228[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ResetAcknowledgeIEs__value, choice.UE_associatedLogicalS1_ConnectionListResAck), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionListResAck, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UE-associatedLogicalS1-ConnectionListResAck" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ResetAcknowledgeIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_228[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* UE-associatedLogicalS1-ConnectionListResAck */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 } /* CriticalityDiagnostics */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_228 = { sizeof(struct S1AP_ResetAcknowledgeIEs__value), offsetof(struct S1AP_ResetAcknowledgeIEs__value, _asn_ctx), offsetof(struct S1AP_ResetAcknowledgeIEs__value, present), sizeof(((struct S1AP_ResetAcknowledgeIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_228, 2, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_228 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_228, 2, /* Elements count */ &asn_SPC_S1AP_value_specs_228 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ResetAcknowledgeIEs_225[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ResetAcknowledgeIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_226, &asn_PER_memb_S1AP_id_constr_226, memb_S1AP_id_constraint_225 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ResetAcknowledgeIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_ResetAcknowledgeIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_227, &asn_PER_memb_S1AP_criticality_constr_227, memb_S1AP_criticality_constraint_225 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_ResetAcknowledgeIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_228, select_ResetAcknowledgeIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_228, &asn_PER_memb_S1AP_value_constr_228, memb_S1AP_value_constraint_225 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ResetAcknowledgeIEs_tags_225[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ResetAcknowledgeIEs_tag2el_225[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ResetAcknowledgeIEs_specs_225 = { sizeof(struct S1AP_ResetAcknowledgeIEs), offsetof(struct S1AP_ResetAcknowledgeIEs, _asn_ctx), asn_MAP_S1AP_ResetAcknowledgeIEs_tag2el_225, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ResetAcknowledgeIEs = { "ResetAcknowledgeIEs", "ResetAcknowledgeIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_ResetAcknowledgeIEs_tags_225, sizeof(asn_DEF_S1AP_ResetAcknowledgeIEs_tags_225) /sizeof(asn_DEF_S1AP_ResetAcknowledgeIEs_tags_225[0]), /* 1 */ asn_DEF_S1AP_ResetAcknowledgeIEs_tags_225, /* Same as above */ sizeof(asn_DEF_S1AP_ResetAcknowledgeIEs_tags_225) /sizeof(asn_DEF_S1AP_ResetAcknowledgeIEs_tags_225[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ResetAcknowledgeIEs_225, 3, /* Elements count */ &asn_SPC_S1AP_ResetAcknowledgeIEs_specs_225 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_232[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ErrorIndicationIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ErrorIndicationIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ErrorIndicationIEs__value, choice.Cause), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cause" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ErrorIndicationIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_232[] = { 0, 1, 3, 2 }; static const unsigned asn_MAP_S1AP_value_from_canonical_232[] = { 0, 1, 3, 2 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_232[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, 0, 0 }, /* CriticalityDiagnostics */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* radioNetwork */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* transport */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* nas */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* protocol */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 2, 0, 0 } /* misc */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_232 = { sizeof(struct S1AP_ErrorIndicationIEs__value), offsetof(struct S1AP_ErrorIndicationIEs__value, _asn_ctx), offsetof(struct S1AP_ErrorIndicationIEs__value, present), sizeof(((struct S1AP_ErrorIndicationIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_232, 8, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_232, asn_MAP_S1AP_value_from_canonical_232, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_232 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_232, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_232 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ErrorIndicationIEs_229[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ErrorIndicationIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_230, &asn_PER_memb_S1AP_id_constr_230, memb_S1AP_id_constraint_229 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ErrorIndicationIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_ErrorIndicationIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_231, &asn_PER_memb_S1AP_criticality_constr_231, memb_S1AP_criticality_constraint_229 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_ErrorIndicationIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_232, select_ErrorIndicationIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_232, &asn_PER_memb_S1AP_value_constr_232, memb_S1AP_value_constraint_229 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ErrorIndicationIEs_tags_229[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ErrorIndicationIEs_tag2el_229[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ErrorIndicationIEs_specs_229 = { sizeof(struct S1AP_ErrorIndicationIEs), offsetof(struct S1AP_ErrorIndicationIEs, _asn_ctx), asn_MAP_S1AP_ErrorIndicationIEs_tag2el_229, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ErrorIndicationIEs = { "ErrorIndicationIEs", "ErrorIndicationIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_ErrorIndicationIEs_tags_229, sizeof(asn_DEF_S1AP_ErrorIndicationIEs_tags_229) /sizeof(asn_DEF_S1AP_ErrorIndicationIEs_tags_229[0]), /* 1 */ asn_DEF_S1AP_ErrorIndicationIEs_tags_229, /* Same as above */ sizeof(asn_DEF_S1AP_ErrorIndicationIEs_tags_229) /sizeof(asn_DEF_S1AP_ErrorIndicationIEs_tags_229[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ErrorIndicationIEs_229, 3, /* Elements count */ &asn_SPC_S1AP_ErrorIndicationIEs_specs_229 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_236[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupRequestIEs__value, choice.Global_ENB_ID), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_Global_ENB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Global-ENB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupRequestIEs__value, choice.ENBname), (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)), 0, &asn_DEF_S1AP_ENBname, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENBname" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupRequestIEs__value, choice.SupportedTAs), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_SupportedTAs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SupportedTAs" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupRequestIEs__value, choice.PagingDRX), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_PagingDRX, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "PagingDRX" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupRequestIEs__value, choice.CSG_IdList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CSG_IdList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CSG-IdList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupRequestIEs__value, choice.UE_RetentionInformation), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_UE_RetentionInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UE-RetentionInformation" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupRequestIEs__value, choice.NB_IoT_DefaultPagingDRX), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_NB_IoT_DefaultPagingDRX, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "NB-IoT-DefaultPagingDRX" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_236[] = { 3, 5, 6, 0, 2, 4, 1 }; static const unsigned asn_MAP_S1AP_value_from_canonical_236[] = { 3, 6, 4, 0, 5, 1, 2 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_236[] = { { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 3, 0, 2 }, /* PagingDRX */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 5, -1, 1 }, /* UE-RetentionInformation */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 6, -2, 0 }, /* NB-IoT-DefaultPagingDRX */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 2 }, /* Global-ENB-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 1 }, /* SupportedTAs */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -2, 0 }, /* CSG-IdList */ { (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)), 1, 0, 0 } /* ENBname */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_236 = { sizeof(struct S1AP_S1SetupRequestIEs__value), offsetof(struct S1AP_S1SetupRequestIEs__value, _asn_ctx), offsetof(struct S1AP_S1SetupRequestIEs__value, present), sizeof(((struct S1AP_S1SetupRequestIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_236, 7, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_236, asn_MAP_S1AP_value_from_canonical_236, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_236 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_236, 7, /* Elements count */ &asn_SPC_S1AP_value_specs_236 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_S1SetupRequestIEs_233[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupRequestIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_234, &asn_PER_memb_S1AP_id_constr_234, memb_S1AP_id_constraint_233 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupRequestIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_S1SetupRequestIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_235, &asn_PER_memb_S1AP_criticality_constr_235, memb_S1AP_criticality_constraint_233 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupRequestIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_236, select_S1SetupRequestIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_236, &asn_PER_memb_S1AP_value_constr_236, memb_S1AP_value_constraint_233 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_S1SetupRequestIEs_tags_233[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_S1SetupRequestIEs_tag2el_233[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_S1SetupRequestIEs_specs_233 = { sizeof(struct S1AP_S1SetupRequestIEs), offsetof(struct S1AP_S1SetupRequestIEs, _asn_ctx), asn_MAP_S1AP_S1SetupRequestIEs_tag2el_233, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_S1SetupRequestIEs = { "S1SetupRequestIEs", "S1SetupRequestIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_S1SetupRequestIEs_tags_233, sizeof(asn_DEF_S1AP_S1SetupRequestIEs_tags_233) /sizeof(asn_DEF_S1AP_S1SetupRequestIEs_tags_233[0]), /* 1 */ asn_DEF_S1AP_S1SetupRequestIEs_tags_233, /* Same as above */ sizeof(asn_DEF_S1AP_S1SetupRequestIEs_tags_233) /sizeof(asn_DEF_S1AP_S1SetupRequestIEs_tags_233[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_S1SetupRequestIEs_233, 3, /* Elements count */ &asn_SPC_S1AP_S1SetupRequestIEs_specs_233 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_240[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupResponseIEs__value, choice.MMEname), (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)), 0, &asn_DEF_S1AP_MMEname, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MMEname" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupResponseIEs__value, choice.ServedGUMMEIs), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ServedGUMMEIs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ServedGUMMEIs" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupResponseIEs__value, choice.RelativeMMECapacity), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_RelativeMMECapacity, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "RelativeMMECapacity" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupResponseIEs__value, choice.MMERelaySupportIndicator), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_MMERelaySupportIndicator, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MMERelaySupportIndicator" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupResponseIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupResponseIEs__value, choice.UE_RetentionInformation), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_UE_RetentionInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UE-RetentionInformation" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupResponseIEs__value, choice.ServedDCNs), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ServedDCNs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ServedDCNs" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_240[] = { 2, 3, 5, 1, 4, 6, 0 }; static const unsigned asn_MAP_S1AP_value_from_canonical_240[] = { 6, 3, 0, 1, 4, 2, 5 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_240[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 0 }, /* RelativeMMECapacity */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 3, 0, 1 }, /* MMERelaySupportIndicator */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 5, -1, 0 }, /* UE-RetentionInformation */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 2 }, /* ServedGUMMEIs */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -1, 1 }, /* CriticalityDiagnostics */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 6, -2, 0 }, /* ServedDCNs */ { (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)), 0, 0, 0 } /* MMEname */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_240 = { sizeof(struct S1AP_S1SetupResponseIEs__value), offsetof(struct S1AP_S1SetupResponseIEs__value, _asn_ctx), offsetof(struct S1AP_S1SetupResponseIEs__value, present), sizeof(((struct S1AP_S1SetupResponseIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_240, 7, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_240, asn_MAP_S1AP_value_from_canonical_240, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_240 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_240, 7, /* Elements count */ &asn_SPC_S1AP_value_specs_240 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_S1SetupResponseIEs_237[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupResponseIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_238, &asn_PER_memb_S1AP_id_constr_238, memb_S1AP_id_constraint_237 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupResponseIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_S1SetupResponseIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_239, &asn_PER_memb_S1AP_criticality_constr_239, memb_S1AP_criticality_constraint_237 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupResponseIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_240, select_S1SetupResponseIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_240, &asn_PER_memb_S1AP_value_constr_240, memb_S1AP_value_constraint_237 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_S1SetupResponseIEs_tags_237[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_S1SetupResponseIEs_tag2el_237[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_S1SetupResponseIEs_specs_237 = { sizeof(struct S1AP_S1SetupResponseIEs), offsetof(struct S1AP_S1SetupResponseIEs, _asn_ctx), asn_MAP_S1AP_S1SetupResponseIEs_tag2el_237, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_S1SetupResponseIEs = { "S1SetupResponseIEs", "S1SetupResponseIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_S1SetupResponseIEs_tags_237, sizeof(asn_DEF_S1AP_S1SetupResponseIEs_tags_237) /sizeof(asn_DEF_S1AP_S1SetupResponseIEs_tags_237[0]), /* 1 */ asn_DEF_S1AP_S1SetupResponseIEs_tags_237, /* Same as above */ sizeof(asn_DEF_S1AP_S1SetupResponseIEs_tags_237) /sizeof(asn_DEF_S1AP_S1SetupResponseIEs_tags_237[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_S1SetupResponseIEs_237, 3, /* Elements count */ &asn_SPC_S1AP_S1SetupResponseIEs_specs_237 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_244[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupFailureIEs__value, choice.Cause), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cause" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupFailureIEs__value, choice.TimeToWait), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_TimeToWait, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TimeToWait" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupFailureIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_244[] = { 1, 2, 0 }; static const unsigned asn_MAP_S1AP_value_from_canonical_244[] = { 2, 0, 1 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_244[] = { { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 }, /* TimeToWait */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 }, /* CriticalityDiagnostics */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* radioNetwork */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* transport */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 0, 0, 0 }, /* nas */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 0, 0, 0 }, /* protocol */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 0, 0, 0 } /* misc */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_244 = { sizeof(struct S1AP_S1SetupFailureIEs__value), offsetof(struct S1AP_S1SetupFailureIEs__value, _asn_ctx), offsetof(struct S1AP_S1SetupFailureIEs__value, present), sizeof(((struct S1AP_S1SetupFailureIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_244, 7, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_244, asn_MAP_S1AP_value_from_canonical_244, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_244 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_244, 3, /* Elements count */ &asn_SPC_S1AP_value_specs_244 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_S1SetupFailureIEs_241[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupFailureIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_242, &asn_PER_memb_S1AP_id_constr_242, memb_S1AP_id_constraint_241 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupFailureIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_S1SetupFailureIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_243, &asn_PER_memb_S1AP_criticality_constr_243, memb_S1AP_criticality_constraint_241 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupFailureIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_244, select_S1SetupFailureIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_244, &asn_PER_memb_S1AP_value_constr_244, memb_S1AP_value_constraint_241 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_S1SetupFailureIEs_tags_241[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_S1SetupFailureIEs_tag2el_241[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_S1SetupFailureIEs_specs_241 = { sizeof(struct S1AP_S1SetupFailureIEs), offsetof(struct S1AP_S1SetupFailureIEs, _asn_ctx), asn_MAP_S1AP_S1SetupFailureIEs_tag2el_241, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_S1SetupFailureIEs = { "S1SetupFailureIEs", "S1SetupFailureIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_S1SetupFailureIEs_tags_241, sizeof(asn_DEF_S1AP_S1SetupFailureIEs_tags_241) /sizeof(asn_DEF_S1AP_S1SetupFailureIEs_tags_241[0]), /* 1 */ asn_DEF_S1AP_S1SetupFailureIEs_tags_241, /* Same as above */ sizeof(asn_DEF_S1AP_S1SetupFailureIEs_tags_241) /sizeof(asn_DEF_S1AP_S1SetupFailureIEs_tags_241[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_S1SetupFailureIEs_241, 3, /* Elements count */ &asn_SPC_S1AP_S1SetupFailureIEs_specs_241 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_248[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationUpdateIEs__value, choice.ENBname), (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)), 0, &asn_DEF_S1AP_ENBname, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENBname" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationUpdateIEs__value, choice.SupportedTAs), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_SupportedTAs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SupportedTAs" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationUpdateIEs__value, choice.CSG_IdList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CSG_IdList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CSG-IdList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationUpdateIEs__value, choice.PagingDRX), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_PagingDRX, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "PagingDRX" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationUpdateIEs__value, choice.NB_IoT_DefaultPagingDRX), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_NB_IoT_DefaultPagingDRX, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "NB-IoT-DefaultPagingDRX" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_248[] = { 3, 4, 1, 2, 0 }; static const unsigned asn_MAP_S1AP_value_from_canonical_248[] = { 4, 2, 3, 0, 1 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_248[] = { { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 3, 0, 1 }, /* PagingDRX */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 4, -1, 0 }, /* NB-IoT-DefaultPagingDRX */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 1 }, /* SupportedTAs */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 0 }, /* CSG-IdList */ { (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)), 0, 0, 0 } /* ENBname */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_248 = { sizeof(struct S1AP_ENBConfigurationUpdateIEs__value), offsetof(struct S1AP_ENBConfigurationUpdateIEs__value, _asn_ctx), offsetof(struct S1AP_ENBConfigurationUpdateIEs__value, present), sizeof(((struct S1AP_ENBConfigurationUpdateIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_248, 5, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_248, asn_MAP_S1AP_value_from_canonical_248, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_248 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_248, 5, /* Elements count */ &asn_SPC_S1AP_value_specs_248 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ENBConfigurationUpdateIEs_245[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationUpdateIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_246, &asn_PER_memb_S1AP_id_constr_246, memb_S1AP_id_constraint_245 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationUpdateIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_ENBConfigurationUpdateIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_247, &asn_PER_memb_S1AP_criticality_constr_247, memb_S1AP_criticality_constraint_245 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationUpdateIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_248, select_ENBConfigurationUpdateIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_248, &asn_PER_memb_S1AP_value_constr_248, memb_S1AP_value_constraint_245 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ENBConfigurationUpdateIEs_tags_245[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ENBConfigurationUpdateIEs_tag2el_245[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBConfigurationUpdateIEs_specs_245 = { sizeof(struct S1AP_ENBConfigurationUpdateIEs), offsetof(struct S1AP_ENBConfigurationUpdateIEs, _asn_ctx), asn_MAP_S1AP_ENBConfigurationUpdateIEs_tag2el_245, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENBConfigurationUpdateIEs = { "ENBConfigurationUpdateIEs", "ENBConfigurationUpdateIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_ENBConfigurationUpdateIEs_tags_245, sizeof(asn_DEF_S1AP_ENBConfigurationUpdateIEs_tags_245) /sizeof(asn_DEF_S1AP_ENBConfigurationUpdateIEs_tags_245[0]), /* 1 */ asn_DEF_S1AP_ENBConfigurationUpdateIEs_tags_245, /* Same as above */ sizeof(asn_DEF_S1AP_ENBConfigurationUpdateIEs_tags_245) /sizeof(asn_DEF_S1AP_ENBConfigurationUpdateIEs_tags_245[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ENBConfigurationUpdateIEs_245, 3, /* Elements count */ &asn_SPC_S1AP_ENBConfigurationUpdateIEs_specs_245 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_252[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationUpdateAcknowledgeIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_252[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* CriticalityDiagnostics */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_252 = { sizeof(struct S1AP_ENBConfigurationUpdateAcknowledgeIEs__value), offsetof(struct S1AP_ENBConfigurationUpdateAcknowledgeIEs__value, _asn_ctx), offsetof(struct S1AP_ENBConfigurationUpdateAcknowledgeIEs__value, present), sizeof(((struct S1AP_ENBConfigurationUpdateAcknowledgeIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_252, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_252 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_252, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_252 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ENBConfigurationUpdateAcknowledgeIEs_249[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationUpdateAcknowledgeIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_250, &asn_PER_memb_S1AP_id_constr_250, memb_S1AP_id_constraint_249 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationUpdateAcknowledgeIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_ENBConfigurationUpdateAcknowledgeIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_251, &asn_PER_memb_S1AP_criticality_constr_251, memb_S1AP_criticality_constraint_249 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationUpdateAcknowledgeIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_252, select_ENBConfigurationUpdateAcknowledgeIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_252, &asn_PER_memb_S1AP_value_constr_252, memb_S1AP_value_constraint_249 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ENBConfigurationUpdateAcknowledgeIEs_tags_249[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ENBConfigurationUpdateAcknowledgeIEs_tag2el_249[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBConfigurationUpdateAcknowledgeIEs_specs_249 = { sizeof(struct S1AP_ENBConfigurationUpdateAcknowledgeIEs), offsetof(struct S1AP_ENBConfigurationUpdateAcknowledgeIEs, _asn_ctx), asn_MAP_S1AP_ENBConfigurationUpdateAcknowledgeIEs_tag2el_249, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENBConfigurationUpdateAcknowledgeIEs = { "ENBConfigurationUpdateAcknowledgeIEs", "ENBConfigurationUpdateAcknowledgeIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_ENBConfigurationUpdateAcknowledgeIEs_tags_249, sizeof(asn_DEF_S1AP_ENBConfigurationUpdateAcknowledgeIEs_tags_249) /sizeof(asn_DEF_S1AP_ENBConfigurationUpdateAcknowledgeIEs_tags_249[0]), /* 1 */ asn_DEF_S1AP_ENBConfigurationUpdateAcknowledgeIEs_tags_249, /* Same as above */ sizeof(asn_DEF_S1AP_ENBConfigurationUpdateAcknowledgeIEs_tags_249) /sizeof(asn_DEF_S1AP_ENBConfigurationUpdateAcknowledgeIEs_tags_249[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ENBConfigurationUpdateAcknowledgeIEs_249, 3, /* Elements count */ &asn_SPC_S1AP_ENBConfigurationUpdateAcknowledgeIEs_specs_249 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_256[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationUpdateFailureIEs__value, choice.Cause), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cause" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationUpdateFailureIEs__value, choice.TimeToWait), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_TimeToWait, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TimeToWait" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationUpdateFailureIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_256[] = { 1, 2, 0 }; static const unsigned asn_MAP_S1AP_value_from_canonical_256[] = { 2, 0, 1 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_256[] = { { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 }, /* TimeToWait */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 }, /* CriticalityDiagnostics */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* radioNetwork */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* transport */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 0, 0, 0 }, /* nas */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 0, 0, 0 }, /* protocol */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 0, 0, 0 } /* misc */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_256 = { sizeof(struct S1AP_ENBConfigurationUpdateFailureIEs__value), offsetof(struct S1AP_ENBConfigurationUpdateFailureIEs__value, _asn_ctx), offsetof(struct S1AP_ENBConfigurationUpdateFailureIEs__value, present), sizeof(((struct S1AP_ENBConfigurationUpdateFailureIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_256, 7, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_256, asn_MAP_S1AP_value_from_canonical_256, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_256 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_256, 3, /* Elements count */ &asn_SPC_S1AP_value_specs_256 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ENBConfigurationUpdateFailureIEs_253[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationUpdateFailureIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_254, &asn_PER_memb_S1AP_id_constr_254, memb_S1AP_id_constraint_253 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationUpdateFailureIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_ENBConfigurationUpdateFailureIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_255, &asn_PER_memb_S1AP_criticality_constr_255, memb_S1AP_criticality_constraint_253 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationUpdateFailureIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_256, select_ENBConfigurationUpdateFailureIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_256, &asn_PER_memb_S1AP_value_constr_256, memb_S1AP_value_constraint_253 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ENBConfigurationUpdateFailureIEs_tags_253[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ENBConfigurationUpdateFailureIEs_tag2el_253[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBConfigurationUpdateFailureIEs_specs_253 = { sizeof(struct S1AP_ENBConfigurationUpdateFailureIEs), offsetof(struct S1AP_ENBConfigurationUpdateFailureIEs, _asn_ctx), asn_MAP_S1AP_ENBConfigurationUpdateFailureIEs_tag2el_253, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENBConfigurationUpdateFailureIEs = { "ENBConfigurationUpdateFailureIEs", "ENBConfigurationUpdateFailureIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_ENBConfigurationUpdateFailureIEs_tags_253, sizeof(asn_DEF_S1AP_ENBConfigurationUpdateFailureIEs_tags_253) /sizeof(asn_DEF_S1AP_ENBConfigurationUpdateFailureIEs_tags_253[0]), /* 1 */ asn_DEF_S1AP_ENBConfigurationUpdateFailureIEs_tags_253, /* Same as above */ sizeof(asn_DEF_S1AP_ENBConfigurationUpdateFailureIEs_tags_253) /sizeof(asn_DEF_S1AP_ENBConfigurationUpdateFailureIEs_tags_253[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ENBConfigurationUpdateFailureIEs_253, 3, /* Elements count */ &asn_SPC_S1AP_ENBConfigurationUpdateFailureIEs_specs_253 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_260[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationUpdateIEs__value, choice.MMEname), (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)), 0, &asn_DEF_S1AP_MMEname, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MMEname" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationUpdateIEs__value, choice.ServedGUMMEIs), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ServedGUMMEIs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ServedGUMMEIs" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationUpdateIEs__value, choice.RelativeMMECapacity), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_RelativeMMECapacity, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "RelativeMMECapacity" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationUpdateIEs__value, choice.ServedDCNs), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ServedDCNs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ServedDCNs" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_260[] = { 2, 1, 3, 0 }; static const unsigned asn_MAP_S1AP_value_from_canonical_260[] = { 3, 1, 0, 2 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_260[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 0 }, /* RelativeMMECapacity */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 1 }, /* ServedGUMMEIs */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 0 }, /* ServedDCNs */ { (ASN_TAG_CLASS_UNIVERSAL | (19 << 2)), 0, 0, 0 } /* MMEname */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_260 = { sizeof(struct S1AP_MMEConfigurationUpdateIEs__value), offsetof(struct S1AP_MMEConfigurationUpdateIEs__value, _asn_ctx), offsetof(struct S1AP_MMEConfigurationUpdateIEs__value, present), sizeof(((struct S1AP_MMEConfigurationUpdateIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_260, 4, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_260, asn_MAP_S1AP_value_from_canonical_260, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_260 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_260, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_260 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_MMEConfigurationUpdateIEs_257[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationUpdateIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_258, &asn_PER_memb_S1AP_id_constr_258, memb_S1AP_id_constraint_257 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationUpdateIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_MMEConfigurationUpdateIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_259, &asn_PER_memb_S1AP_criticality_constr_259, memb_S1AP_criticality_constraint_257 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationUpdateIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_260, select_MMEConfigurationUpdateIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_260, &asn_PER_memb_S1AP_value_constr_260, memb_S1AP_value_constraint_257 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_MMEConfigurationUpdateIEs_tags_257[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MMEConfigurationUpdateIEs_tag2el_257[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEConfigurationUpdateIEs_specs_257 = { sizeof(struct S1AP_MMEConfigurationUpdateIEs), offsetof(struct S1AP_MMEConfigurationUpdateIEs, _asn_ctx), asn_MAP_S1AP_MMEConfigurationUpdateIEs_tag2el_257, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MMEConfigurationUpdateIEs = { "MMEConfigurationUpdateIEs", "MMEConfigurationUpdateIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_MMEConfigurationUpdateIEs_tags_257, sizeof(asn_DEF_S1AP_MMEConfigurationUpdateIEs_tags_257) /sizeof(asn_DEF_S1AP_MMEConfigurationUpdateIEs_tags_257[0]), /* 1 */ asn_DEF_S1AP_MMEConfigurationUpdateIEs_tags_257, /* Same as above */ sizeof(asn_DEF_S1AP_MMEConfigurationUpdateIEs_tags_257) /sizeof(asn_DEF_S1AP_MMEConfigurationUpdateIEs_tags_257[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_MMEConfigurationUpdateIEs_257, 3, /* Elements count */ &asn_SPC_S1AP_MMEConfigurationUpdateIEs_specs_257 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_264[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationUpdateAcknowledgeIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_264[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* CriticalityDiagnostics */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_264 = { sizeof(struct S1AP_MMEConfigurationUpdateAcknowledgeIEs__value), offsetof(struct S1AP_MMEConfigurationUpdateAcknowledgeIEs__value, _asn_ctx), offsetof(struct S1AP_MMEConfigurationUpdateAcknowledgeIEs__value, present), sizeof(((struct S1AP_MMEConfigurationUpdateAcknowledgeIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_264, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_264 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_264, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_264 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_MMEConfigurationUpdateAcknowledgeIEs_261[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationUpdateAcknowledgeIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_262, &asn_PER_memb_S1AP_id_constr_262, memb_S1AP_id_constraint_261 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationUpdateAcknowledgeIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_MMEConfigurationUpdateAcknowledgeIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_263, &asn_PER_memb_S1AP_criticality_constr_263, memb_S1AP_criticality_constraint_261 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationUpdateAcknowledgeIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_264, select_MMEConfigurationUpdateAcknowledgeIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_264, &asn_PER_memb_S1AP_value_constr_264, memb_S1AP_value_constraint_261 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_MMEConfigurationUpdateAcknowledgeIEs_tags_261[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MMEConfigurationUpdateAcknowledgeIEs_tag2el_261[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEConfigurationUpdateAcknowledgeIEs_specs_261 = { sizeof(struct S1AP_MMEConfigurationUpdateAcknowledgeIEs), offsetof(struct S1AP_MMEConfigurationUpdateAcknowledgeIEs, _asn_ctx), asn_MAP_S1AP_MMEConfigurationUpdateAcknowledgeIEs_tag2el_261, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MMEConfigurationUpdateAcknowledgeIEs = { "MMEConfigurationUpdateAcknowledgeIEs", "MMEConfigurationUpdateAcknowledgeIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_MMEConfigurationUpdateAcknowledgeIEs_tags_261, sizeof(asn_DEF_S1AP_MMEConfigurationUpdateAcknowledgeIEs_tags_261) /sizeof(asn_DEF_S1AP_MMEConfigurationUpdateAcknowledgeIEs_tags_261[0]), /* 1 */ asn_DEF_S1AP_MMEConfigurationUpdateAcknowledgeIEs_tags_261, /* Same as above */ sizeof(asn_DEF_S1AP_MMEConfigurationUpdateAcknowledgeIEs_tags_261) /sizeof(asn_DEF_S1AP_MMEConfigurationUpdateAcknowledgeIEs_tags_261[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_MMEConfigurationUpdateAcknowledgeIEs_261, 3, /* Elements count */ &asn_SPC_S1AP_MMEConfigurationUpdateAcknowledgeIEs_specs_261 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_268[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationUpdateFailureIEs__value, choice.Cause), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cause" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationUpdateFailureIEs__value, choice.TimeToWait), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_TimeToWait, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TimeToWait" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationUpdateFailureIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_268[] = { 1, 2, 0 }; static const unsigned asn_MAP_S1AP_value_from_canonical_268[] = { 2, 0, 1 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_268[] = { { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 }, /* TimeToWait */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 }, /* CriticalityDiagnostics */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* radioNetwork */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 0, 0, 0 }, /* transport */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 0, 0, 0 }, /* nas */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 0, 0, 0 }, /* protocol */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 0, 0, 0 } /* misc */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_268 = { sizeof(struct S1AP_MMEConfigurationUpdateFailureIEs__value), offsetof(struct S1AP_MMEConfigurationUpdateFailureIEs__value, _asn_ctx), offsetof(struct S1AP_MMEConfigurationUpdateFailureIEs__value, present), sizeof(((struct S1AP_MMEConfigurationUpdateFailureIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_268, 7, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_268, asn_MAP_S1AP_value_from_canonical_268, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_268 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_268, 3, /* Elements count */ &asn_SPC_S1AP_value_specs_268 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_MMEConfigurationUpdateFailureIEs_265[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationUpdateFailureIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_266, &asn_PER_memb_S1AP_id_constr_266, memb_S1AP_id_constraint_265 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationUpdateFailureIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_MMEConfigurationUpdateFailureIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_267, &asn_PER_memb_S1AP_criticality_constr_267, memb_S1AP_criticality_constraint_265 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationUpdateFailureIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_268, select_MMEConfigurationUpdateFailureIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_268, &asn_PER_memb_S1AP_value_constr_268, memb_S1AP_value_constraint_265 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_MMEConfigurationUpdateFailureIEs_tags_265[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MMEConfigurationUpdateFailureIEs_tag2el_265[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEConfigurationUpdateFailureIEs_specs_265 = { sizeof(struct S1AP_MMEConfigurationUpdateFailureIEs), offsetof(struct S1AP_MMEConfigurationUpdateFailureIEs, _asn_ctx), asn_MAP_S1AP_MMEConfigurationUpdateFailureIEs_tag2el_265, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MMEConfigurationUpdateFailureIEs = { "MMEConfigurationUpdateFailureIEs", "MMEConfigurationUpdateFailureIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_MMEConfigurationUpdateFailureIEs_tags_265, sizeof(asn_DEF_S1AP_MMEConfigurationUpdateFailureIEs_tags_265) /sizeof(asn_DEF_S1AP_MMEConfigurationUpdateFailureIEs_tags_265[0]), /* 1 */ asn_DEF_S1AP_MMEConfigurationUpdateFailureIEs_tags_265, /* Same as above */ sizeof(asn_DEF_S1AP_MMEConfigurationUpdateFailureIEs_tags_265) /sizeof(asn_DEF_S1AP_MMEConfigurationUpdateFailureIEs_tags_265[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_MMEConfigurationUpdateFailureIEs_265, 3, /* Elements count */ &asn_SPC_S1AP_MMEConfigurationUpdateFailureIEs_specs_265 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_272[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkS1cdma2000tunnellingIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkS1cdma2000tunnellingIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkS1cdma2000tunnellingIEs__value, choice.E_RABSubjecttoDataForwardingList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABSubjecttoDataForwardingList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABSubjecttoDataForwardingList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkS1cdma2000tunnellingIEs__value, choice.Cdma2000HOStatus), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_Cdma2000HOStatus, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cdma2000HOStatus" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkS1cdma2000tunnellingIEs__value, choice.Cdma2000RATType), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_Cdma2000RATType, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cdma2000RATType" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkS1cdma2000tunnellingIEs__value, choice.Cdma2000PDU), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_Cdma2000PDU, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cdma2000PDU" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_272[] = { 0, 1, 5, 3, 4, 2 }; static const unsigned asn_MAP_S1AP_value_from_canonical_272[] = { 0, 1, 5, 3, 4, 2 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_272[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 5, 0, 0 }, /* Cdma2000PDU */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 3, 0, 1 }, /* Cdma2000HOStatus */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 4, -1, 0 }, /* Cdma2000RATType */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 } /* E-RABSubjecttoDataForwardingList */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_272 = { sizeof(struct S1AP_DownlinkS1cdma2000tunnellingIEs__value), offsetof(struct S1AP_DownlinkS1cdma2000tunnellingIEs__value, _asn_ctx), offsetof(struct S1AP_DownlinkS1cdma2000tunnellingIEs__value, present), sizeof(((struct S1AP_DownlinkS1cdma2000tunnellingIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_272, 6, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_272, asn_MAP_S1AP_value_from_canonical_272, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_272 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_272, 6, /* Elements count */ &asn_SPC_S1AP_value_specs_272 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_DownlinkS1cdma2000tunnellingIEs_269[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkS1cdma2000tunnellingIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_270, &asn_PER_memb_S1AP_id_constr_270, memb_S1AP_id_constraint_269 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkS1cdma2000tunnellingIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_DownlinkS1cdma2000tunnellingIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_271, &asn_PER_memb_S1AP_criticality_constr_271, memb_S1AP_criticality_constraint_269 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkS1cdma2000tunnellingIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_272, select_DownlinkS1cdma2000tunnellingIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_272, &asn_PER_memb_S1AP_value_constr_272, memb_S1AP_value_constraint_269 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_DownlinkS1cdma2000tunnellingIEs_tags_269[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_DownlinkS1cdma2000tunnellingIEs_tag2el_269[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_DownlinkS1cdma2000tunnellingIEs_specs_269 = { sizeof(struct S1AP_DownlinkS1cdma2000tunnellingIEs), offsetof(struct S1AP_DownlinkS1cdma2000tunnellingIEs, _asn_ctx), asn_MAP_S1AP_DownlinkS1cdma2000tunnellingIEs_tag2el_269, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_DownlinkS1cdma2000tunnellingIEs = { "DownlinkS1cdma2000tunnellingIEs", "DownlinkS1cdma2000tunnellingIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_DownlinkS1cdma2000tunnellingIEs_tags_269, sizeof(asn_DEF_S1AP_DownlinkS1cdma2000tunnellingIEs_tags_269) /sizeof(asn_DEF_S1AP_DownlinkS1cdma2000tunnellingIEs_tags_269[0]), /* 1 */ asn_DEF_S1AP_DownlinkS1cdma2000tunnellingIEs_tags_269, /* Same as above */ sizeof(asn_DEF_S1AP_DownlinkS1cdma2000tunnellingIEs_tags_269) /sizeof(asn_DEF_S1AP_DownlinkS1cdma2000tunnellingIEs_tags_269[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_DownlinkS1cdma2000tunnellingIEs_269, 3, /* Elements count */ &asn_SPC_S1AP_DownlinkS1cdma2000tunnellingIEs_specs_269 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_276[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkS1cdma2000tunnellingIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkS1cdma2000tunnellingIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkS1cdma2000tunnellingIEs__value, choice.Cdma2000RATType), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_Cdma2000RATType, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cdma2000RATType" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkS1cdma2000tunnellingIEs__value, choice.Cdma2000SectorID), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_Cdma2000SectorID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cdma2000SectorID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkS1cdma2000tunnellingIEs__value, choice.Cdma2000HORequiredIndication), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_Cdma2000HORequiredIndication, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cdma2000HORequiredIndication" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkS1cdma2000tunnellingIEs__value, choice.Cdma2000OneXSRVCCInfo), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_Cdma2000OneXSRVCCInfo, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cdma2000OneXSRVCCInfo" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkS1cdma2000tunnellingIEs__value, choice.Cdma2000OneXRAND), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_Cdma2000OneXRAND, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cdma2000OneXRAND" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkS1cdma2000tunnellingIEs__value, choice.Cdma2000PDU), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_Cdma2000PDU, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cdma2000PDU" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkS1cdma2000tunnellingIEs__value, choice.EUTRANRoundTripDelayEstimationInfo), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_EUTRANRoundTripDelayEstimationInfo, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "EUTRANRoundTripDelayEstimationInfo" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_276[] = { 0, 1, 8, 3, 6, 7, 2, 4, 5 }; static const unsigned asn_MAP_S1AP_value_from_canonical_276[] = { 0, 1, 6, 3, 7, 8, 4, 5, 2 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_276[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 1 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 8, -2, 0 }, /* EUTRANRoundTripDelayEstimationInfo */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 3, 0, 2 }, /* Cdma2000SectorID */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 6, -1, 1 }, /* Cdma2000OneXRAND */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 7, -2, 0 }, /* Cdma2000PDU */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 2, 0, 1 }, /* Cdma2000RATType */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 4, -1, 0 }, /* Cdma2000HORequiredIndication */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, 0, 0 } /* Cdma2000OneXSRVCCInfo */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_276 = { sizeof(struct S1AP_UplinkS1cdma2000tunnellingIEs__value), offsetof(struct S1AP_UplinkS1cdma2000tunnellingIEs__value, _asn_ctx), offsetof(struct S1AP_UplinkS1cdma2000tunnellingIEs__value, present), sizeof(((struct S1AP_UplinkS1cdma2000tunnellingIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_276, 9, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_276, asn_MAP_S1AP_value_from_canonical_276, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_276 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_276, 9, /* Elements count */ &asn_SPC_S1AP_value_specs_276 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UplinkS1cdma2000tunnellingIEs_273[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkS1cdma2000tunnellingIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_274, &asn_PER_memb_S1AP_id_constr_274, memb_S1AP_id_constraint_273 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkS1cdma2000tunnellingIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UplinkS1cdma2000tunnellingIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_275, &asn_PER_memb_S1AP_criticality_constr_275, memb_S1AP_criticality_constraint_273 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkS1cdma2000tunnellingIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_276, select_UplinkS1cdma2000tunnellingIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_276, &asn_PER_memb_S1AP_value_constr_276, memb_S1AP_value_constraint_273 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UplinkS1cdma2000tunnellingIEs_tags_273[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UplinkS1cdma2000tunnellingIEs_tag2el_273[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UplinkS1cdma2000tunnellingIEs_specs_273 = { sizeof(struct S1AP_UplinkS1cdma2000tunnellingIEs), offsetof(struct S1AP_UplinkS1cdma2000tunnellingIEs, _asn_ctx), asn_MAP_S1AP_UplinkS1cdma2000tunnellingIEs_tag2el_273, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UplinkS1cdma2000tunnellingIEs = { "UplinkS1cdma2000tunnellingIEs", "UplinkS1cdma2000tunnellingIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UplinkS1cdma2000tunnellingIEs_tags_273, sizeof(asn_DEF_S1AP_UplinkS1cdma2000tunnellingIEs_tags_273) /sizeof(asn_DEF_S1AP_UplinkS1cdma2000tunnellingIEs_tags_273[0]), /* 1 */ asn_DEF_S1AP_UplinkS1cdma2000tunnellingIEs_tags_273, /* Same as above */ sizeof(asn_DEF_S1AP_UplinkS1cdma2000tunnellingIEs_tags_273) /sizeof(asn_DEF_S1AP_UplinkS1cdma2000tunnellingIEs_tags_273[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UplinkS1cdma2000tunnellingIEs_273, 3, /* Elements count */ &asn_SPC_S1AP_UplinkS1cdma2000tunnellingIEs_specs_273 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_280[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UECapabilityInfoIndicationIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UECapabilityInfoIndicationIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UECapabilityInfoIndicationIEs__value, choice.UERadioCapability), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_UERadioCapability, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UERadioCapability" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UECapabilityInfoIndicationIEs__value, choice.UERadioCapabilityForPaging), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_UERadioCapabilityForPaging, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UERadioCapabilityForPaging" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_280[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, 0, 1 }, /* UERadioCapability */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 3, -1, 0 } /* UERadioCapabilityForPaging */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_280 = { sizeof(struct S1AP_UECapabilityInfoIndicationIEs__value), offsetof(struct S1AP_UECapabilityInfoIndicationIEs__value, _asn_ctx), offsetof(struct S1AP_UECapabilityInfoIndicationIEs__value, present), sizeof(((struct S1AP_UECapabilityInfoIndicationIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_280, 4, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_280 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_280, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_280 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UECapabilityInfoIndicationIEs_277[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UECapabilityInfoIndicationIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_278, &asn_PER_memb_S1AP_id_constr_278, memb_S1AP_id_constraint_277 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UECapabilityInfoIndicationIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UECapabilityInfoIndicationIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_279, &asn_PER_memb_S1AP_criticality_constr_279, memb_S1AP_criticality_constraint_277 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UECapabilityInfoIndicationIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_280, select_UECapabilityInfoIndicationIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_280, &asn_PER_memb_S1AP_value_constr_280, memb_S1AP_value_constraint_277 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UECapabilityInfoIndicationIEs_tags_277[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UECapabilityInfoIndicationIEs_tag2el_277[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UECapabilityInfoIndicationIEs_specs_277 = { sizeof(struct S1AP_UECapabilityInfoIndicationIEs), offsetof(struct S1AP_UECapabilityInfoIndicationIEs, _asn_ctx), asn_MAP_S1AP_UECapabilityInfoIndicationIEs_tag2el_277, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UECapabilityInfoIndicationIEs = { "UECapabilityInfoIndicationIEs", "UECapabilityInfoIndicationIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UECapabilityInfoIndicationIEs_tags_277, sizeof(asn_DEF_S1AP_UECapabilityInfoIndicationIEs_tags_277) /sizeof(asn_DEF_S1AP_UECapabilityInfoIndicationIEs_tags_277[0]), /* 1 */ asn_DEF_S1AP_UECapabilityInfoIndicationIEs_tags_277, /* Same as above */ sizeof(asn_DEF_S1AP_UECapabilityInfoIndicationIEs_tags_277) /sizeof(asn_DEF_S1AP_UECapabilityInfoIndicationIEs_tags_277[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UECapabilityInfoIndicationIEs_277, 3, /* Elements count */ &asn_SPC_S1AP_UECapabilityInfoIndicationIEs_specs_277 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_284[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBStatusTransferIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBStatusTransferIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBStatusTransferIEs__value, choice.ENB_StatusTransfer_TransparentContainer), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-StatusTransfer-TransparentContainer" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_284[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 } /* ENB-StatusTransfer-TransparentContainer */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_284 = { sizeof(struct S1AP_ENBStatusTransferIEs__value), offsetof(struct S1AP_ENBStatusTransferIEs__value, _asn_ctx), offsetof(struct S1AP_ENBStatusTransferIEs__value, present), sizeof(((struct S1AP_ENBStatusTransferIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_284, 3, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_284 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_284, 3, /* Elements count */ &asn_SPC_S1AP_value_specs_284 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ENBStatusTransferIEs_281[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBStatusTransferIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_282, &asn_PER_memb_S1AP_id_constr_282, memb_S1AP_id_constraint_281 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBStatusTransferIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_ENBStatusTransferIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_283, &asn_PER_memb_S1AP_criticality_constr_283, memb_S1AP_criticality_constraint_281 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBStatusTransferIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_284, select_ENBStatusTransferIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_284, &asn_PER_memb_S1AP_value_constr_284, memb_S1AP_value_constraint_281 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ENBStatusTransferIEs_tags_281[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ENBStatusTransferIEs_tag2el_281[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBStatusTransferIEs_specs_281 = { sizeof(struct S1AP_ENBStatusTransferIEs), offsetof(struct S1AP_ENBStatusTransferIEs, _asn_ctx), asn_MAP_S1AP_ENBStatusTransferIEs_tag2el_281, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENBStatusTransferIEs = { "ENBStatusTransferIEs", "ENBStatusTransferIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_ENBStatusTransferIEs_tags_281, sizeof(asn_DEF_S1AP_ENBStatusTransferIEs_tags_281) /sizeof(asn_DEF_S1AP_ENBStatusTransferIEs_tags_281[0]), /* 1 */ asn_DEF_S1AP_ENBStatusTransferIEs_tags_281, /* Same as above */ sizeof(asn_DEF_S1AP_ENBStatusTransferIEs_tags_281) /sizeof(asn_DEF_S1AP_ENBStatusTransferIEs_tags_281[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ENBStatusTransferIEs_281, 3, /* Elements count */ &asn_SPC_S1AP_ENBStatusTransferIEs_specs_281 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_288[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEStatusTransferIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEStatusTransferIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEStatusTransferIEs__value, choice.ENB_StatusTransfer_TransparentContainer), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-StatusTransfer-TransparentContainer" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_288[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 } /* ENB-StatusTransfer-TransparentContainer */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_288 = { sizeof(struct S1AP_MMEStatusTransferIEs__value), offsetof(struct S1AP_MMEStatusTransferIEs__value, _asn_ctx), offsetof(struct S1AP_MMEStatusTransferIEs__value, present), sizeof(((struct S1AP_MMEStatusTransferIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_288, 3, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_288 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_288, 3, /* Elements count */ &asn_SPC_S1AP_value_specs_288 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_MMEStatusTransferIEs_285[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEStatusTransferIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_286, &asn_PER_memb_S1AP_id_constr_286, memb_S1AP_id_constraint_285 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEStatusTransferIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_MMEStatusTransferIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_287, &asn_PER_memb_S1AP_criticality_constr_287, memb_S1AP_criticality_constraint_285 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEStatusTransferIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_288, select_MMEStatusTransferIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_288, &asn_PER_memb_S1AP_value_constr_288, memb_S1AP_value_constraint_285 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_MMEStatusTransferIEs_tags_285[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MMEStatusTransferIEs_tag2el_285[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEStatusTransferIEs_specs_285 = { sizeof(struct S1AP_MMEStatusTransferIEs), offsetof(struct S1AP_MMEStatusTransferIEs, _asn_ctx), asn_MAP_S1AP_MMEStatusTransferIEs_tag2el_285, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MMEStatusTransferIEs = { "MMEStatusTransferIEs", "MMEStatusTransferIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_MMEStatusTransferIEs_tags_285, sizeof(asn_DEF_S1AP_MMEStatusTransferIEs_tags_285) /sizeof(asn_DEF_S1AP_MMEStatusTransferIEs_tags_285[0]), /* 1 */ asn_DEF_S1AP_MMEStatusTransferIEs_tags_285, /* Same as above */ sizeof(asn_DEF_S1AP_MMEStatusTransferIEs_tags_285) /sizeof(asn_DEF_S1AP_MMEStatusTransferIEs_tags_285[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_MMEStatusTransferIEs_285, 3, /* Elements count */ &asn_SPC_S1AP_MMEStatusTransferIEs_specs_285 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_292[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TraceStartIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TraceStartIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TraceStartIEs__value, choice.TraceActivation), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TraceActivation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TraceActivation" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_292[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 } /* TraceActivation */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_292 = { sizeof(struct S1AP_TraceStartIEs__value), offsetof(struct S1AP_TraceStartIEs__value, _asn_ctx), offsetof(struct S1AP_TraceStartIEs__value, present), sizeof(((struct S1AP_TraceStartIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_292, 3, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_292 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_292, 3, /* Elements count */ &asn_SPC_S1AP_value_specs_292 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_TraceStartIEs_289[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TraceStartIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_290, &asn_PER_memb_S1AP_id_constr_290, memb_S1AP_id_constraint_289 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TraceStartIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_TraceStartIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_291, &asn_PER_memb_S1AP_criticality_constr_291, memb_S1AP_criticality_constraint_289 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_TraceStartIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_292, select_TraceStartIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_292, &asn_PER_memb_S1AP_value_constr_292, memb_S1AP_value_constraint_289 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TraceStartIEs_tags_289[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TraceStartIEs_tag2el_289[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_TraceStartIEs_specs_289 = { sizeof(struct S1AP_TraceStartIEs), offsetof(struct S1AP_TraceStartIEs, _asn_ctx), asn_MAP_S1AP_TraceStartIEs_tag2el_289, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TraceStartIEs = { "TraceStartIEs", "TraceStartIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_TraceStartIEs_tags_289, sizeof(asn_DEF_S1AP_TraceStartIEs_tags_289) /sizeof(asn_DEF_S1AP_TraceStartIEs_tags_289[0]), /* 1 */ asn_DEF_S1AP_TraceStartIEs_tags_289, /* Same as above */ sizeof(asn_DEF_S1AP_TraceStartIEs_tags_289) /sizeof(asn_DEF_S1AP_TraceStartIEs_tags_289[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TraceStartIEs_289, 3, /* Elements count */ &asn_SPC_S1AP_TraceStartIEs_specs_289 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_296[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TraceFailureIndicationIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TraceFailureIndicationIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TraceFailureIndicationIEs__value, choice.E_UTRAN_Trace_ID), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_E_UTRAN_Trace_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-UTRAN-Trace-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TraceFailureIndicationIEs__value, choice.Cause), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cause" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_296[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, 0, 0 }, /* E-UTRAN-Trace-ID */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 3, 0, 0 }, /* radioNetwork */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 3, 0, 0 }, /* transport */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 3, 0, 0 }, /* nas */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* protocol */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 3, 0, 0 } /* misc */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_296 = { sizeof(struct S1AP_TraceFailureIndicationIEs__value), offsetof(struct S1AP_TraceFailureIndicationIEs__value, _asn_ctx), offsetof(struct S1AP_TraceFailureIndicationIEs__value, present), sizeof(((struct S1AP_TraceFailureIndicationIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_296, 8, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_296 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_296, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_296 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_TraceFailureIndicationIEs_293[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TraceFailureIndicationIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_294, &asn_PER_memb_S1AP_id_constr_294, memb_S1AP_id_constraint_293 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TraceFailureIndicationIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_TraceFailureIndicationIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_295, &asn_PER_memb_S1AP_criticality_constr_295, memb_S1AP_criticality_constraint_293 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_TraceFailureIndicationIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_296, select_TraceFailureIndicationIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_296, &asn_PER_memb_S1AP_value_constr_296, memb_S1AP_value_constraint_293 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TraceFailureIndicationIEs_tags_293[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TraceFailureIndicationIEs_tag2el_293[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_TraceFailureIndicationIEs_specs_293 = { sizeof(struct S1AP_TraceFailureIndicationIEs), offsetof(struct S1AP_TraceFailureIndicationIEs, _asn_ctx), asn_MAP_S1AP_TraceFailureIndicationIEs_tag2el_293, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TraceFailureIndicationIEs = { "TraceFailureIndicationIEs", "TraceFailureIndicationIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_TraceFailureIndicationIEs_tags_293, sizeof(asn_DEF_S1AP_TraceFailureIndicationIEs_tags_293) /sizeof(asn_DEF_S1AP_TraceFailureIndicationIEs_tags_293[0]), /* 1 */ asn_DEF_S1AP_TraceFailureIndicationIEs_tags_293, /* Same as above */ sizeof(asn_DEF_S1AP_TraceFailureIndicationIEs_tags_293) /sizeof(asn_DEF_S1AP_TraceFailureIndicationIEs_tags_293[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TraceFailureIndicationIEs_293, 3, /* Elements count */ &asn_SPC_S1AP_TraceFailureIndicationIEs_specs_293 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_300[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_DeactivateTraceIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DeactivateTraceIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DeactivateTraceIEs__value, choice.E_UTRAN_Trace_ID), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_E_UTRAN_Trace_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-UTRAN-Trace-ID" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_300[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, 0, 0 } /* E-UTRAN-Trace-ID */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_300 = { sizeof(struct S1AP_DeactivateTraceIEs__value), offsetof(struct S1AP_DeactivateTraceIEs__value, _asn_ctx), offsetof(struct S1AP_DeactivateTraceIEs__value, present), sizeof(((struct S1AP_DeactivateTraceIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_300, 3, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_300 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_300, 3, /* Elements count */ &asn_SPC_S1AP_value_specs_300 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_DeactivateTraceIEs_297[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_DeactivateTraceIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_298, &asn_PER_memb_S1AP_id_constr_298, memb_S1AP_id_constraint_297 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DeactivateTraceIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_DeactivateTraceIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_299, &asn_PER_memb_S1AP_criticality_constr_299, memb_S1AP_criticality_constraint_297 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_DeactivateTraceIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_300, select_DeactivateTraceIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_300, &asn_PER_memb_S1AP_value_constr_300, memb_S1AP_value_constraint_297 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_DeactivateTraceIEs_tags_297[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_DeactivateTraceIEs_tag2el_297[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_DeactivateTraceIEs_specs_297 = { sizeof(struct S1AP_DeactivateTraceIEs), offsetof(struct S1AP_DeactivateTraceIEs, _asn_ctx), asn_MAP_S1AP_DeactivateTraceIEs_tag2el_297, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_DeactivateTraceIEs = { "DeactivateTraceIEs", "DeactivateTraceIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_DeactivateTraceIEs_tags_297, sizeof(asn_DEF_S1AP_DeactivateTraceIEs_tags_297) /sizeof(asn_DEF_S1AP_DeactivateTraceIEs_tags_297[0]), /* 1 */ asn_DEF_S1AP_DeactivateTraceIEs_tags_297, /* Same as above */ sizeof(asn_DEF_S1AP_DeactivateTraceIEs_tags_297) /sizeof(asn_DEF_S1AP_DeactivateTraceIEs_tags_297[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_DeactivateTraceIEs_297, 3, /* Elements count */ &asn_SPC_S1AP_DeactivateTraceIEs_specs_297 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_304[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellTrafficTraceIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellTrafficTraceIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellTrafficTraceIEs__value, choice.E_UTRAN_Trace_ID), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_E_UTRAN_Trace_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-UTRAN-Trace-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellTrafficTraceIEs__value, choice.EUTRAN_CGI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_EUTRAN_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "EUTRAN-CGI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellTrafficTraceIEs__value, choice.TransportLayerAddress), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TransportLayerAddress" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellTrafficTraceIEs__value, choice.PrivacyIndicator), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_PrivacyIndicator, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "PrivacyIndicator" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_304[] = { 0, 1, 4, 2, 5, 3 }; static const unsigned asn_MAP_S1AP_value_from_canonical_304[] = { 0, 1, 3, 5, 2, 4 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_304[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 4, 0, 0 }, /* TransportLayerAddress */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, 0, 0 }, /* E-UTRAN-Trace-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 5, 0, 0 }, /* PrivacyIndicator */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, 0, 0 } /* EUTRAN-CGI */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_304 = { sizeof(struct S1AP_CellTrafficTraceIEs__value), offsetof(struct S1AP_CellTrafficTraceIEs__value, _asn_ctx), offsetof(struct S1AP_CellTrafficTraceIEs__value, present), sizeof(((struct S1AP_CellTrafficTraceIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_304, 6, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_304, asn_MAP_S1AP_value_from_canonical_304, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_304 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_304, 6, /* Elements count */ &asn_SPC_S1AP_value_specs_304 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_CellTrafficTraceIEs_301[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellTrafficTraceIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_302, &asn_PER_memb_S1AP_id_constr_302, memb_S1AP_id_constraint_301 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_CellTrafficTraceIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_CellTrafficTraceIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_303, &asn_PER_memb_S1AP_criticality_constr_303, memb_S1AP_criticality_constraint_301 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_CellTrafficTraceIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_304, select_CellTrafficTraceIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_304, &asn_PER_memb_S1AP_value_constr_304, memb_S1AP_value_constraint_301 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_CellTrafficTraceIEs_tags_301[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_CellTrafficTraceIEs_tag2el_301[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellTrafficTraceIEs_specs_301 = { sizeof(struct S1AP_CellTrafficTraceIEs), offsetof(struct S1AP_CellTrafficTraceIEs, _asn_ctx), asn_MAP_S1AP_CellTrafficTraceIEs_tag2el_301, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_CellTrafficTraceIEs = { "CellTrafficTraceIEs", "CellTrafficTraceIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_CellTrafficTraceIEs_tags_301, sizeof(asn_DEF_S1AP_CellTrafficTraceIEs_tags_301) /sizeof(asn_DEF_S1AP_CellTrafficTraceIEs_tags_301[0]), /* 1 */ asn_DEF_S1AP_CellTrafficTraceIEs_tags_301, /* Same as above */ sizeof(asn_DEF_S1AP_CellTrafficTraceIEs_tags_301) /sizeof(asn_DEF_S1AP_CellTrafficTraceIEs_tags_301[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_CellTrafficTraceIEs_301, 3, /* Elements count */ &asn_SPC_S1AP_CellTrafficTraceIEs_specs_301 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_308[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_LocationReportingControlIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_LocationReportingControlIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_LocationReportingControlIEs__value, choice.RequestType), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_RequestType, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "RequestType" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_308[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 } /* RequestType */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_308 = { sizeof(struct S1AP_LocationReportingControlIEs__value), offsetof(struct S1AP_LocationReportingControlIEs__value, _asn_ctx), offsetof(struct S1AP_LocationReportingControlIEs__value, present), sizeof(((struct S1AP_LocationReportingControlIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_308, 3, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_308 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_308, 3, /* Elements count */ &asn_SPC_S1AP_value_specs_308 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_LocationReportingControlIEs_305[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_LocationReportingControlIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_306, &asn_PER_memb_S1AP_id_constr_306, memb_S1AP_id_constraint_305 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_LocationReportingControlIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_LocationReportingControlIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_307, &asn_PER_memb_S1AP_criticality_constr_307, memb_S1AP_criticality_constraint_305 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_LocationReportingControlIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_308, select_LocationReportingControlIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_308, &asn_PER_memb_S1AP_value_constr_308, memb_S1AP_value_constraint_305 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_LocationReportingControlIEs_tags_305[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_LocationReportingControlIEs_tag2el_305[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_LocationReportingControlIEs_specs_305 = { sizeof(struct S1AP_LocationReportingControlIEs), offsetof(struct S1AP_LocationReportingControlIEs, _asn_ctx), asn_MAP_S1AP_LocationReportingControlIEs_tag2el_305, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_LocationReportingControlIEs = { "LocationReportingControlIEs", "LocationReportingControlIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_LocationReportingControlIEs_tags_305, sizeof(asn_DEF_S1AP_LocationReportingControlIEs_tags_305) /sizeof(asn_DEF_S1AP_LocationReportingControlIEs_tags_305[0]), /* 1 */ asn_DEF_S1AP_LocationReportingControlIEs_tags_305, /* Same as above */ sizeof(asn_DEF_S1AP_LocationReportingControlIEs_tags_305) /sizeof(asn_DEF_S1AP_LocationReportingControlIEs_tags_305[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_LocationReportingControlIEs_305, 3, /* Elements count */ &asn_SPC_S1AP_LocationReportingControlIEs_specs_305 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_312[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_LocationReportingFailureIndicationIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_LocationReportingFailureIndicationIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_LocationReportingFailureIndicationIEs__value, choice.Cause), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cause" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_312[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* radioNetwork */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* transport */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* nas */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* protocol */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 2, 0, 0 } /* misc */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_312 = { sizeof(struct S1AP_LocationReportingFailureIndicationIEs__value), offsetof(struct S1AP_LocationReportingFailureIndicationIEs__value, _asn_ctx), offsetof(struct S1AP_LocationReportingFailureIndicationIEs__value, present), sizeof(((struct S1AP_LocationReportingFailureIndicationIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_312, 7, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_312 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_312, 3, /* Elements count */ &asn_SPC_S1AP_value_specs_312 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_LocationReportingFailureIndicationIEs_309[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_LocationReportingFailureIndicationIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_310, &asn_PER_memb_S1AP_id_constr_310, memb_S1AP_id_constraint_309 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_LocationReportingFailureIndicationIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_LocationReportingFailureIndicationIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_311, &asn_PER_memb_S1AP_criticality_constr_311, memb_S1AP_criticality_constraint_309 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_LocationReportingFailureIndicationIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_312, select_LocationReportingFailureIndicationIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_312, &asn_PER_memb_S1AP_value_constr_312, memb_S1AP_value_constraint_309 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_LocationReportingFailureIndicationIEs_tags_309[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_LocationReportingFailureIndicationIEs_tag2el_309[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_LocationReportingFailureIndicationIEs_specs_309 = { sizeof(struct S1AP_LocationReportingFailureIndicationIEs), offsetof(struct S1AP_LocationReportingFailureIndicationIEs, _asn_ctx), asn_MAP_S1AP_LocationReportingFailureIndicationIEs_tag2el_309, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_LocationReportingFailureIndicationIEs = { "LocationReportingFailureIndicationIEs", "LocationReportingFailureIndicationIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_LocationReportingFailureIndicationIEs_tags_309, sizeof(asn_DEF_S1AP_LocationReportingFailureIndicationIEs_tags_309) /sizeof(asn_DEF_S1AP_LocationReportingFailureIndicationIEs_tags_309[0]), /* 1 */ asn_DEF_S1AP_LocationReportingFailureIndicationIEs_tags_309, /* Same as above */ sizeof(asn_DEF_S1AP_LocationReportingFailureIndicationIEs_tags_309) /sizeof(asn_DEF_S1AP_LocationReportingFailureIndicationIEs_tags_309[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_LocationReportingFailureIndicationIEs_309, 3, /* Elements count */ &asn_SPC_S1AP_LocationReportingFailureIndicationIEs_specs_309 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_316[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_LocationReportIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_LocationReportIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_LocationReportIEs__value, choice.EUTRAN_CGI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_EUTRAN_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "EUTRAN-CGI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_LocationReportIEs__value, choice.TAI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TAI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_LocationReportIEs__value, choice.RequestType), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_RequestType, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "RequestType" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_316[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 2 }, /* EUTRAN-CGI */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 1 }, /* TAI */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -2, 0 } /* RequestType */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_316 = { sizeof(struct S1AP_LocationReportIEs__value), offsetof(struct S1AP_LocationReportIEs__value, _asn_ctx), offsetof(struct S1AP_LocationReportIEs__value, present), sizeof(((struct S1AP_LocationReportIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_316, 5, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_316 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_316, 5, /* Elements count */ &asn_SPC_S1AP_value_specs_316 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_LocationReportIEs_313[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_LocationReportIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_314, &asn_PER_memb_S1AP_id_constr_314, memb_S1AP_id_constraint_313 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_LocationReportIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_LocationReportIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_315, &asn_PER_memb_S1AP_criticality_constr_315, memb_S1AP_criticality_constraint_313 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_LocationReportIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_316, select_LocationReportIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_316, &asn_PER_memb_S1AP_value_constr_316, memb_S1AP_value_constraint_313 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_LocationReportIEs_tags_313[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_LocationReportIEs_tag2el_313[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_LocationReportIEs_specs_313 = { sizeof(struct S1AP_LocationReportIEs), offsetof(struct S1AP_LocationReportIEs, _asn_ctx), asn_MAP_S1AP_LocationReportIEs_tag2el_313, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_LocationReportIEs = { "LocationReportIEs", "LocationReportIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_LocationReportIEs_tags_313, sizeof(asn_DEF_S1AP_LocationReportIEs_tags_313) /sizeof(asn_DEF_S1AP_LocationReportIEs_tags_313[0]), /* 1 */ asn_DEF_S1AP_LocationReportIEs_tags_313, /* Same as above */ sizeof(asn_DEF_S1AP_LocationReportIEs_tags_313) /sizeof(asn_DEF_S1AP_LocationReportIEs_tags_313[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_LocationReportIEs_313, 3, /* Elements count */ &asn_SPC_S1AP_LocationReportIEs_specs_313 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_320[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_OverloadStartIEs__value, choice.OverloadResponse), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_OverloadResponse, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "OverloadResponse" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_OverloadStartIEs__value, choice.GUMMEIList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_GUMMEIList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "GUMMEIList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_OverloadStartIEs__value, choice.TrafficLoadReductionIndication), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_TrafficLoadReductionIndication, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TrafficLoadReductionIndication" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_320[] = { 2, 1, 0 }; static const unsigned asn_MAP_S1AP_value_from_canonical_320[] = { 2, 1, 0 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_320[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, 0, 0 }, /* TrafficLoadReductionIndication */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* GUMMEIList */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* overloadAction */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_320 = { sizeof(struct S1AP_OverloadStartIEs__value), offsetof(struct S1AP_OverloadStartIEs__value, _asn_ctx), offsetof(struct S1AP_OverloadStartIEs__value, present), sizeof(((struct S1AP_OverloadStartIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_320, 3, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_320, asn_MAP_S1AP_value_from_canonical_320, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_320 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_320, 3, /* Elements count */ &asn_SPC_S1AP_value_specs_320 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_OverloadStartIEs_317[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_OverloadStartIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_318, &asn_PER_memb_S1AP_id_constr_318, memb_S1AP_id_constraint_317 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_OverloadStartIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_OverloadStartIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_319, &asn_PER_memb_S1AP_criticality_constr_319, memb_S1AP_criticality_constraint_317 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_OverloadStartIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_320, select_OverloadStartIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_320, &asn_PER_memb_S1AP_value_constr_320, memb_S1AP_value_constraint_317 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_OverloadStartIEs_tags_317[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_OverloadStartIEs_tag2el_317[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_OverloadStartIEs_specs_317 = { sizeof(struct S1AP_OverloadStartIEs), offsetof(struct S1AP_OverloadStartIEs, _asn_ctx), asn_MAP_S1AP_OverloadStartIEs_tag2el_317, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_OverloadStartIEs = { "OverloadStartIEs", "OverloadStartIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_OverloadStartIEs_tags_317, sizeof(asn_DEF_S1AP_OverloadStartIEs_tags_317) /sizeof(asn_DEF_S1AP_OverloadStartIEs_tags_317[0]), /* 1 */ asn_DEF_S1AP_OverloadStartIEs_tags_317, /* Same as above */ sizeof(asn_DEF_S1AP_OverloadStartIEs_tags_317) /sizeof(asn_DEF_S1AP_OverloadStartIEs_tags_317[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_OverloadStartIEs_317, 3, /* Elements count */ &asn_SPC_S1AP_OverloadStartIEs_specs_317 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_324[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_OverloadStopIEs__value, choice.GUMMEIList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_GUMMEIList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "GUMMEIList" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_324[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* GUMMEIList */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_324 = { sizeof(struct S1AP_OverloadStopIEs__value), offsetof(struct S1AP_OverloadStopIEs__value, _asn_ctx), offsetof(struct S1AP_OverloadStopIEs__value, present), sizeof(((struct S1AP_OverloadStopIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_324, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_324 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_324, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_324 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_OverloadStopIEs_321[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_OverloadStopIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_322, &asn_PER_memb_S1AP_id_constr_322, memb_S1AP_id_constraint_321 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_OverloadStopIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_OverloadStopIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_323, &asn_PER_memb_S1AP_criticality_constr_323, memb_S1AP_criticality_constraint_321 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_OverloadStopIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_324, select_OverloadStopIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_324, &asn_PER_memb_S1AP_value_constr_324, memb_S1AP_value_constraint_321 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_OverloadStopIEs_tags_321[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_OverloadStopIEs_tag2el_321[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_OverloadStopIEs_specs_321 = { sizeof(struct S1AP_OverloadStopIEs), offsetof(struct S1AP_OverloadStopIEs, _asn_ctx), asn_MAP_S1AP_OverloadStopIEs_tag2el_321, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_OverloadStopIEs = { "OverloadStopIEs", "OverloadStopIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_OverloadStopIEs_tags_321, sizeof(asn_DEF_S1AP_OverloadStopIEs_tags_321) /sizeof(asn_DEF_S1AP_OverloadStopIEs_tags_321[0]), /* 1 */ asn_DEF_S1AP_OverloadStopIEs_tags_321, /* Same as above */ sizeof(asn_DEF_S1AP_OverloadStopIEs_tags_321) /sizeof(asn_DEF_S1AP_OverloadStopIEs_tags_321[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_OverloadStopIEs_321, 3, /* Elements count */ &asn_SPC_S1AP_OverloadStopIEs_specs_321 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_328[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_WriteReplaceWarningRequestIEs__value, choice.MessageIdentifier), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_MessageIdentifier, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MessageIdentifier" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_WriteReplaceWarningRequestIEs__value, choice.SerialNumber), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_SerialNumber, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SerialNumber" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_WriteReplaceWarningRequestIEs__value, choice.WarningAreaList), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_WarningAreaList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "WarningAreaList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_WriteReplaceWarningRequestIEs__value, choice.RepetitionPeriod), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_RepetitionPeriod, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "RepetitionPeriod" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_WriteReplaceWarningRequestIEs__value, choice.ExtendedRepetitionPeriod), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ExtendedRepetitionPeriod, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ExtendedRepetitionPeriod" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_WriteReplaceWarningRequestIEs__value, choice.NumberofBroadcastRequest), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_NumberofBroadcastRequest, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "NumberofBroadcastRequest" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_WriteReplaceWarningRequestIEs__value, choice.WarningType), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_WarningType, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "WarningType" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_WriteReplaceWarningRequestIEs__value, choice.WarningSecurityInfo), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_WarningSecurityInfo, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "WarningSecurityInfo" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_WriteReplaceWarningRequestIEs__value, choice.DataCodingScheme), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_DataCodingScheme, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "DataCodingScheme" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_WriteReplaceWarningRequestIEs__value, choice.WarningMessageContents), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_WarningMessageContents, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "WarningMessageContents" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_WriteReplaceWarningRequestIEs__value, choice.ConcurrentWarningMessageIndicator), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_ConcurrentWarningMessageIndicator, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ConcurrentWarningMessageIndicator" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_328[] = { 3, 4, 5, 0, 1, 8, 6, 7, 9, 10, 2 }; static const unsigned asn_MAP_S1AP_value_from_canonical_328[] = { 3, 4, 10, 0, 1, 2, 6, 7, 5, 8, 9 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_328[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 3, 0, 2 }, /* RepetitionPeriod */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 4, -1, 1 }, /* ExtendedRepetitionPeriod */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 5, -2, 0 }, /* NumberofBroadcastRequest */ { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 2 }, /* MessageIdentifier */ { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 1, -1, 1 }, /* SerialNumber */ { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 8, -2, 0 }, /* DataCodingScheme */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 6, 0, 2 }, /* WarningType */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 7, -1, 1 }, /* WarningSecurityInfo */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 9, -2, 0 }, /* WarningMessageContents */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 10, 0, 0 }, /* ConcurrentWarningMessageIndicator */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* cellIDList */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* trackingAreaListforWarning */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* emergencyAreaIDList */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_328 = { sizeof(struct S1AP_WriteReplaceWarningRequestIEs__value), offsetof(struct S1AP_WriteReplaceWarningRequestIEs__value, _asn_ctx), offsetof(struct S1AP_WriteReplaceWarningRequestIEs__value, present), sizeof(((struct S1AP_WriteReplaceWarningRequestIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_328, 13, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_328, asn_MAP_S1AP_value_from_canonical_328, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_328 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_328, 11, /* Elements count */ &asn_SPC_S1AP_value_specs_328 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_WriteReplaceWarningRequestIEs_325[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_WriteReplaceWarningRequestIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_326, &asn_PER_memb_S1AP_id_constr_326, memb_S1AP_id_constraint_325 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_WriteReplaceWarningRequestIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_WriteReplaceWarningRequestIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_327, &asn_PER_memb_S1AP_criticality_constr_327, memb_S1AP_criticality_constraint_325 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_WriteReplaceWarningRequestIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_328, select_WriteReplaceWarningRequestIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_328, &asn_PER_memb_S1AP_value_constr_328, memb_S1AP_value_constraint_325 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_WriteReplaceWarningRequestIEs_tags_325[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_WriteReplaceWarningRequestIEs_tag2el_325[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_WriteReplaceWarningRequestIEs_specs_325 = { sizeof(struct S1AP_WriteReplaceWarningRequestIEs), offsetof(struct S1AP_WriteReplaceWarningRequestIEs, _asn_ctx), asn_MAP_S1AP_WriteReplaceWarningRequestIEs_tag2el_325, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_WriteReplaceWarningRequestIEs = { "WriteReplaceWarningRequestIEs", "WriteReplaceWarningRequestIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_WriteReplaceWarningRequestIEs_tags_325, sizeof(asn_DEF_S1AP_WriteReplaceWarningRequestIEs_tags_325) /sizeof(asn_DEF_S1AP_WriteReplaceWarningRequestIEs_tags_325[0]), /* 1 */ asn_DEF_S1AP_WriteReplaceWarningRequestIEs_tags_325, /* Same as above */ sizeof(asn_DEF_S1AP_WriteReplaceWarningRequestIEs_tags_325) /sizeof(asn_DEF_S1AP_WriteReplaceWarningRequestIEs_tags_325[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_WriteReplaceWarningRequestIEs_325, 3, /* Elements count */ &asn_SPC_S1AP_WriteReplaceWarningRequestIEs_specs_325 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_332[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_WriteReplaceWarningResponseIEs__value, choice.MessageIdentifier), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_MessageIdentifier, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MessageIdentifier" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_WriteReplaceWarningResponseIEs__value, choice.SerialNumber), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_SerialNumber, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SerialNumber" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_WriteReplaceWarningResponseIEs__value, choice.BroadcastCompletedAreaList), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_BroadcastCompletedAreaList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "BroadcastCompletedAreaList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_WriteReplaceWarningResponseIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_332[] = { 0, 1, 3, 2 }; static const unsigned asn_MAP_S1AP_value_from_canonical_332[] = { 0, 1, 3, 2 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_332[] = { { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 1 }, /* MessageIdentifier */ { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 1, -1, 0 }, /* SerialNumber */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, 0, 0 }, /* CriticalityDiagnostics */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* cellID-Broadcast */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* tAI-Broadcast */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* emergencyAreaID-Broadcast */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_332 = { sizeof(struct S1AP_WriteReplaceWarningResponseIEs__value), offsetof(struct S1AP_WriteReplaceWarningResponseIEs__value, _asn_ctx), offsetof(struct S1AP_WriteReplaceWarningResponseIEs__value, present), sizeof(((struct S1AP_WriteReplaceWarningResponseIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_332, 6, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_332, asn_MAP_S1AP_value_from_canonical_332, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_332 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_332, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_332 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_WriteReplaceWarningResponseIEs_329[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_WriteReplaceWarningResponseIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_330, &asn_PER_memb_S1AP_id_constr_330, memb_S1AP_id_constraint_329 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_WriteReplaceWarningResponseIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_WriteReplaceWarningResponseIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_331, &asn_PER_memb_S1AP_criticality_constr_331, memb_S1AP_criticality_constraint_329 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_WriteReplaceWarningResponseIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_332, select_WriteReplaceWarningResponseIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_332, &asn_PER_memb_S1AP_value_constr_332, memb_S1AP_value_constraint_329 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_WriteReplaceWarningResponseIEs_tags_329[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_WriteReplaceWarningResponseIEs_tag2el_329[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_WriteReplaceWarningResponseIEs_specs_329 = { sizeof(struct S1AP_WriteReplaceWarningResponseIEs), offsetof(struct S1AP_WriteReplaceWarningResponseIEs, _asn_ctx), asn_MAP_S1AP_WriteReplaceWarningResponseIEs_tag2el_329, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_WriteReplaceWarningResponseIEs = { "WriteReplaceWarningResponseIEs", "WriteReplaceWarningResponseIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_WriteReplaceWarningResponseIEs_tags_329, sizeof(asn_DEF_S1AP_WriteReplaceWarningResponseIEs_tags_329) /sizeof(asn_DEF_S1AP_WriteReplaceWarningResponseIEs_tags_329[0]), /* 1 */ asn_DEF_S1AP_WriteReplaceWarningResponseIEs_tags_329, /* Same as above */ sizeof(asn_DEF_S1AP_WriteReplaceWarningResponseIEs_tags_329) /sizeof(asn_DEF_S1AP_WriteReplaceWarningResponseIEs_tags_329[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_WriteReplaceWarningResponseIEs_329, 3, /* Elements count */ &asn_SPC_S1AP_WriteReplaceWarningResponseIEs_specs_329 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_336[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBDirectInformationTransferIEs__value, choice.Inter_SystemInformationTransferType), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_Inter_SystemInformationTransferType, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Inter-SystemInformationTransferType" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_336[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* rIMTransfer */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_336 = { sizeof(struct S1AP_ENBDirectInformationTransferIEs__value), offsetof(struct S1AP_ENBDirectInformationTransferIEs__value, _asn_ctx), offsetof(struct S1AP_ENBDirectInformationTransferIEs__value, present), sizeof(((struct S1AP_ENBDirectInformationTransferIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_336, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_336 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_336, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_336 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ENBDirectInformationTransferIEs_333[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBDirectInformationTransferIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_334, &asn_PER_memb_S1AP_id_constr_334, memb_S1AP_id_constraint_333 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBDirectInformationTransferIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_ENBDirectInformationTransferIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_335, &asn_PER_memb_S1AP_criticality_constr_335, memb_S1AP_criticality_constraint_333 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBDirectInformationTransferIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_336, select_ENBDirectInformationTransferIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_336, &asn_PER_memb_S1AP_value_constr_336, memb_S1AP_value_constraint_333 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ENBDirectInformationTransferIEs_tags_333[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ENBDirectInformationTransferIEs_tag2el_333[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBDirectInformationTransferIEs_specs_333 = { sizeof(struct S1AP_ENBDirectInformationTransferIEs), offsetof(struct S1AP_ENBDirectInformationTransferIEs, _asn_ctx), asn_MAP_S1AP_ENBDirectInformationTransferIEs_tag2el_333, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENBDirectInformationTransferIEs = { "ENBDirectInformationTransferIEs", "ENBDirectInformationTransferIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_ENBDirectInformationTransferIEs_tags_333, sizeof(asn_DEF_S1AP_ENBDirectInformationTransferIEs_tags_333) /sizeof(asn_DEF_S1AP_ENBDirectInformationTransferIEs_tags_333[0]), /* 1 */ asn_DEF_S1AP_ENBDirectInformationTransferIEs_tags_333, /* Same as above */ sizeof(asn_DEF_S1AP_ENBDirectInformationTransferIEs_tags_333) /sizeof(asn_DEF_S1AP_ENBDirectInformationTransferIEs_tags_333[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ENBDirectInformationTransferIEs_333, 3, /* Elements count */ &asn_SPC_S1AP_ENBDirectInformationTransferIEs_specs_333 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_340[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEDirectInformationTransferIEs__value, choice.Inter_SystemInformationTransferType), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_Inter_SystemInformationTransferType, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Inter-SystemInformationTransferType" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_340[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* rIMTransfer */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_340 = { sizeof(struct S1AP_MMEDirectInformationTransferIEs__value), offsetof(struct S1AP_MMEDirectInformationTransferIEs__value, _asn_ctx), offsetof(struct S1AP_MMEDirectInformationTransferIEs__value, present), sizeof(((struct S1AP_MMEDirectInformationTransferIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_340, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_340 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_340, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_340 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_MMEDirectInformationTransferIEs_337[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEDirectInformationTransferIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_338, &asn_PER_memb_S1AP_id_constr_338, memb_S1AP_id_constraint_337 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEDirectInformationTransferIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_MMEDirectInformationTransferIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_339, &asn_PER_memb_S1AP_criticality_constr_339, memb_S1AP_criticality_constraint_337 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEDirectInformationTransferIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_340, select_MMEDirectInformationTransferIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_340, &asn_PER_memb_S1AP_value_constr_340, memb_S1AP_value_constraint_337 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_MMEDirectInformationTransferIEs_tags_337[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MMEDirectInformationTransferIEs_tag2el_337[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEDirectInformationTransferIEs_specs_337 = { sizeof(struct S1AP_MMEDirectInformationTransferIEs), offsetof(struct S1AP_MMEDirectInformationTransferIEs, _asn_ctx), asn_MAP_S1AP_MMEDirectInformationTransferIEs_tag2el_337, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MMEDirectInformationTransferIEs = { "MMEDirectInformationTransferIEs", "MMEDirectInformationTransferIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_MMEDirectInformationTransferIEs_tags_337, sizeof(asn_DEF_S1AP_MMEDirectInformationTransferIEs_tags_337) /sizeof(asn_DEF_S1AP_MMEDirectInformationTransferIEs_tags_337[0]), /* 1 */ asn_DEF_S1AP_MMEDirectInformationTransferIEs_tags_337, /* Same as above */ sizeof(asn_DEF_S1AP_MMEDirectInformationTransferIEs_tags_337) /sizeof(asn_DEF_S1AP_MMEDirectInformationTransferIEs_tags_337[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_MMEDirectInformationTransferIEs_337, 3, /* Elements count */ &asn_SPC_S1AP_MMEDirectInformationTransferIEs_specs_337 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_344[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationTransferIEs__value, choice.SONConfigurationTransfer), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_SONConfigurationTransfer, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SONConfigurationTransfer" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_344[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* SONConfigurationTransfer */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_344 = { sizeof(struct S1AP_ENBConfigurationTransferIEs__value), offsetof(struct S1AP_ENBConfigurationTransferIEs__value, _asn_ctx), offsetof(struct S1AP_ENBConfigurationTransferIEs__value, present), sizeof(((struct S1AP_ENBConfigurationTransferIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_344, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_344 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_344, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_344 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ENBConfigurationTransferIEs_341[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationTransferIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_342, &asn_PER_memb_S1AP_id_constr_342, memb_S1AP_id_constraint_341 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationTransferIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_ENBConfigurationTransferIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_343, &asn_PER_memb_S1AP_criticality_constr_343, memb_S1AP_criticality_constraint_341 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBConfigurationTransferIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_344, select_ENBConfigurationTransferIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_344, &asn_PER_memb_S1AP_value_constr_344, memb_S1AP_value_constraint_341 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ENBConfigurationTransferIEs_tags_341[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ENBConfigurationTransferIEs_tag2el_341[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBConfigurationTransferIEs_specs_341 = { sizeof(struct S1AP_ENBConfigurationTransferIEs), offsetof(struct S1AP_ENBConfigurationTransferIEs, _asn_ctx), asn_MAP_S1AP_ENBConfigurationTransferIEs_tag2el_341, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENBConfigurationTransferIEs = { "ENBConfigurationTransferIEs", "ENBConfigurationTransferIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_ENBConfigurationTransferIEs_tags_341, sizeof(asn_DEF_S1AP_ENBConfigurationTransferIEs_tags_341) /sizeof(asn_DEF_S1AP_ENBConfigurationTransferIEs_tags_341[0]), /* 1 */ asn_DEF_S1AP_ENBConfigurationTransferIEs_tags_341, /* Same as above */ sizeof(asn_DEF_S1AP_ENBConfigurationTransferIEs_tags_341) /sizeof(asn_DEF_S1AP_ENBConfigurationTransferIEs_tags_341[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ENBConfigurationTransferIEs_341, 3, /* Elements count */ &asn_SPC_S1AP_ENBConfigurationTransferIEs_specs_341 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_348[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationTransferIEs__value, choice.SONConfigurationTransfer), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_SONConfigurationTransfer, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SONConfigurationTransfer" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_348[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* SONConfigurationTransfer */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_348 = { sizeof(struct S1AP_MMEConfigurationTransferIEs__value), offsetof(struct S1AP_MMEConfigurationTransferIEs__value, _asn_ctx), offsetof(struct S1AP_MMEConfigurationTransferIEs__value, present), sizeof(((struct S1AP_MMEConfigurationTransferIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_348, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_348 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_348, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_348 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_MMEConfigurationTransferIEs_345[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationTransferIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_346, &asn_PER_memb_S1AP_id_constr_346, memb_S1AP_id_constraint_345 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationTransferIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_MMEConfigurationTransferIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_347, &asn_PER_memb_S1AP_criticality_constr_347, memb_S1AP_criticality_constraint_345 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_MMEConfigurationTransferIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_348, select_MMEConfigurationTransferIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_348, &asn_PER_memb_S1AP_value_constr_348, memb_S1AP_value_constraint_345 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_MMEConfigurationTransferIEs_tags_345[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MMEConfigurationTransferIEs_tag2el_345[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEConfigurationTransferIEs_specs_345 = { sizeof(struct S1AP_MMEConfigurationTransferIEs), offsetof(struct S1AP_MMEConfigurationTransferIEs, _asn_ctx), asn_MAP_S1AP_MMEConfigurationTransferIEs_tag2el_345, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MMEConfigurationTransferIEs = { "MMEConfigurationTransferIEs", "MMEConfigurationTransferIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_MMEConfigurationTransferIEs_tags_345, sizeof(asn_DEF_S1AP_MMEConfigurationTransferIEs_tags_345) /sizeof(asn_DEF_S1AP_MMEConfigurationTransferIEs_tags_345[0]), /* 1 */ asn_DEF_S1AP_MMEConfigurationTransferIEs_tags_345, /* Same as above */ sizeof(asn_DEF_S1AP_MMEConfigurationTransferIEs_tags_345) /sizeof(asn_DEF_S1AP_MMEConfigurationTransferIEs_tags_345[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_MMEConfigurationTransferIEs_345, 3, /* Elements count */ &asn_SPC_S1AP_MMEConfigurationTransferIEs_specs_345 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_352[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_KillRequestIEs__value, choice.MessageIdentifier), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_MessageIdentifier, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MessageIdentifier" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_KillRequestIEs__value, choice.SerialNumber), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_SerialNumber, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SerialNumber" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_KillRequestIEs__value, choice.WarningAreaList), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_WarningAreaList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "WarningAreaList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_KillRequestIEs__value, choice.KillAllWarningMessages), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_KillAllWarningMessages, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "KillAllWarningMessages" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_352[] = { 0, 1, 3, 2 }; static const unsigned asn_MAP_S1AP_value_from_canonical_352[] = { 0, 1, 3, 2 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_352[] = { { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 1 }, /* MessageIdentifier */ { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 1, -1, 0 }, /* SerialNumber */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 3, 0, 0 }, /* KillAllWarningMessages */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* cellIDList */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* trackingAreaListforWarning */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* emergencyAreaIDList */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_352 = { sizeof(struct S1AP_KillRequestIEs__value), offsetof(struct S1AP_KillRequestIEs__value, _asn_ctx), offsetof(struct S1AP_KillRequestIEs__value, present), sizeof(((struct S1AP_KillRequestIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_352, 6, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_352, asn_MAP_S1AP_value_from_canonical_352, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_352 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_352, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_352 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_KillRequestIEs_349[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_KillRequestIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_350, &asn_PER_memb_S1AP_id_constr_350, memb_S1AP_id_constraint_349 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_KillRequestIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_KillRequestIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_351, &asn_PER_memb_S1AP_criticality_constr_351, memb_S1AP_criticality_constraint_349 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_KillRequestIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_352, select_KillRequestIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_352, &asn_PER_memb_S1AP_value_constr_352, memb_S1AP_value_constraint_349 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_KillRequestIEs_tags_349[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_KillRequestIEs_tag2el_349[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_KillRequestIEs_specs_349 = { sizeof(struct S1AP_KillRequestIEs), offsetof(struct S1AP_KillRequestIEs, _asn_ctx), asn_MAP_S1AP_KillRequestIEs_tag2el_349, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_KillRequestIEs = { "KillRequestIEs", "KillRequestIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_KillRequestIEs_tags_349, sizeof(asn_DEF_S1AP_KillRequestIEs_tags_349) /sizeof(asn_DEF_S1AP_KillRequestIEs_tags_349[0]), /* 1 */ asn_DEF_S1AP_KillRequestIEs_tags_349, /* Same as above */ sizeof(asn_DEF_S1AP_KillRequestIEs_tags_349) /sizeof(asn_DEF_S1AP_KillRequestIEs_tags_349[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_KillRequestIEs_349, 3, /* Elements count */ &asn_SPC_S1AP_KillRequestIEs_specs_349 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_356[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_KillResponseIEs__value, choice.MessageIdentifier), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_MessageIdentifier, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MessageIdentifier" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_KillResponseIEs__value, choice.SerialNumber), (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, &asn_DEF_S1AP_SerialNumber, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SerialNumber" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_KillResponseIEs__value, choice.BroadcastCancelledAreaList), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_BroadcastCancelledAreaList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "BroadcastCancelledAreaList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_KillResponseIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_356[] = { 0, 1, 3, 2 }; static const unsigned asn_MAP_S1AP_value_from_canonical_356[] = { 0, 1, 3, 2 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_356[] = { { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 0, 0, 1 }, /* MessageIdentifier */ { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)), 1, -1, 0 }, /* SerialNumber */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, 0, 0 }, /* CriticalityDiagnostics */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* cellID-Cancelled */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* tAI-Cancelled */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* emergencyAreaID-Cancelled */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_356 = { sizeof(struct S1AP_KillResponseIEs__value), offsetof(struct S1AP_KillResponseIEs__value, _asn_ctx), offsetof(struct S1AP_KillResponseIEs__value, present), sizeof(((struct S1AP_KillResponseIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_356, 6, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_356, asn_MAP_S1AP_value_from_canonical_356, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_356 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_356, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_356 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_KillResponseIEs_353[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_KillResponseIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_354, &asn_PER_memb_S1AP_id_constr_354, memb_S1AP_id_constraint_353 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_KillResponseIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_KillResponseIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_355, &asn_PER_memb_S1AP_criticality_constr_355, memb_S1AP_criticality_constraint_353 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_KillResponseIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_356, select_KillResponseIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_356, &asn_PER_memb_S1AP_value_constr_356, memb_S1AP_value_constraint_353 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_KillResponseIEs_tags_353[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_KillResponseIEs_tag2el_353[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_KillResponseIEs_specs_353 = { sizeof(struct S1AP_KillResponseIEs), offsetof(struct S1AP_KillResponseIEs, _asn_ctx), asn_MAP_S1AP_KillResponseIEs_tag2el_353, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_KillResponseIEs = { "KillResponseIEs", "KillResponseIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_KillResponseIEs_tags_353, sizeof(asn_DEF_S1AP_KillResponseIEs_tags_353) /sizeof(asn_DEF_S1AP_KillResponseIEs_tags_353[0]), /* 1 */ asn_DEF_S1AP_KillResponseIEs_tags_353, /* Same as above */ sizeof(asn_DEF_S1AP_KillResponseIEs_tags_353) /sizeof(asn_DEF_S1AP_KillResponseIEs_tags_353[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_KillResponseIEs_353, 3, /* Elements count */ &asn_SPC_S1AP_KillResponseIEs_specs_353 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_360[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_PWSRestartIndicationIEs__value, choice.ECGIListForRestart), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ECGIListForRestart, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ECGIListForRestart" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PWSRestartIndicationIEs__value, choice.Global_ENB_ID), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_Global_ENB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Global-ENB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PWSRestartIndicationIEs__value, choice.TAIListForRestart), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TAIListForRestart, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TAIListForRestart" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PWSRestartIndicationIEs__value, choice.EmergencyAreaIDListForRestart), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_EmergencyAreaIDListForRestart, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "EmergencyAreaIDListForRestart" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_360[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 3 }, /* ECGIListForRestart */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 2 }, /* Global-ENB-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 1 }, /* TAIListForRestart */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -3, 0 } /* EmergencyAreaIDListForRestart */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_360 = { sizeof(struct S1AP_PWSRestartIndicationIEs__value), offsetof(struct S1AP_PWSRestartIndicationIEs__value, _asn_ctx), offsetof(struct S1AP_PWSRestartIndicationIEs__value, present), sizeof(((struct S1AP_PWSRestartIndicationIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_360, 4, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_360 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_360, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_360 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_PWSRestartIndicationIEs_357[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_PWSRestartIndicationIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_358, &asn_PER_memb_S1AP_id_constr_358, memb_S1AP_id_constraint_357 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PWSRestartIndicationIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_PWSRestartIndicationIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_359, &asn_PER_memb_S1AP_criticality_constr_359, memb_S1AP_criticality_constraint_357 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_PWSRestartIndicationIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_360, select_PWSRestartIndicationIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_360, &asn_PER_memb_S1AP_value_constr_360, memb_S1AP_value_constraint_357 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_PWSRestartIndicationIEs_tags_357[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_PWSRestartIndicationIEs_tag2el_357[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_PWSRestartIndicationIEs_specs_357 = { sizeof(struct S1AP_PWSRestartIndicationIEs), offsetof(struct S1AP_PWSRestartIndicationIEs, _asn_ctx), asn_MAP_S1AP_PWSRestartIndicationIEs_tag2el_357, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_PWSRestartIndicationIEs = { "PWSRestartIndicationIEs", "PWSRestartIndicationIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_PWSRestartIndicationIEs_tags_357, sizeof(asn_DEF_S1AP_PWSRestartIndicationIEs_tags_357) /sizeof(asn_DEF_S1AP_PWSRestartIndicationIEs_tags_357[0]), /* 1 */ asn_DEF_S1AP_PWSRestartIndicationIEs_tags_357, /* Same as above */ sizeof(asn_DEF_S1AP_PWSRestartIndicationIEs_tags_357) /sizeof(asn_DEF_S1AP_PWSRestartIndicationIEs_tags_357[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_PWSRestartIndicationIEs_357, 3, /* Elements count */ &asn_SPC_S1AP_PWSRestartIndicationIEs_specs_357 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_364[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_PWSFailureIndicationIEs__value, choice.PWSfailedECGIList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_PWSfailedECGIList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "PWSfailedECGIList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PWSFailureIndicationIEs__value, choice.Global_ENB_ID), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_Global_ENB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Global-ENB-ID" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_364[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* PWSfailedECGIList */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 } /* Global-ENB-ID */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_364 = { sizeof(struct S1AP_PWSFailureIndicationIEs__value), offsetof(struct S1AP_PWSFailureIndicationIEs__value, _asn_ctx), offsetof(struct S1AP_PWSFailureIndicationIEs__value, present), sizeof(((struct S1AP_PWSFailureIndicationIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_364, 2, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_364 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_364, 2, /* Elements count */ &asn_SPC_S1AP_value_specs_364 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_PWSFailureIndicationIEs_361[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_PWSFailureIndicationIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_362, &asn_PER_memb_S1AP_id_constr_362, memb_S1AP_id_constraint_361 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_PWSFailureIndicationIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_PWSFailureIndicationIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_363, &asn_PER_memb_S1AP_criticality_constr_363, memb_S1AP_criticality_constraint_361 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_PWSFailureIndicationIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_364, select_PWSFailureIndicationIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_364, &asn_PER_memb_S1AP_value_constr_364, memb_S1AP_value_constraint_361 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_PWSFailureIndicationIEs_tags_361[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_PWSFailureIndicationIEs_tag2el_361[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_PWSFailureIndicationIEs_specs_361 = { sizeof(struct S1AP_PWSFailureIndicationIEs), offsetof(struct S1AP_PWSFailureIndicationIEs, _asn_ctx), asn_MAP_S1AP_PWSFailureIndicationIEs_tag2el_361, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_PWSFailureIndicationIEs = { "PWSFailureIndicationIEs", "PWSFailureIndicationIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_PWSFailureIndicationIEs_tags_361, sizeof(asn_DEF_S1AP_PWSFailureIndicationIEs_tags_361) /sizeof(asn_DEF_S1AP_PWSFailureIndicationIEs_tags_361[0]), /* 1 */ asn_DEF_S1AP_PWSFailureIndicationIEs_tags_361, /* Same as above */ sizeof(asn_DEF_S1AP_PWSFailureIndicationIEs_tags_361) /sizeof(asn_DEF_S1AP_PWSFailureIndicationIEs_tags_361[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_PWSFailureIndicationIEs_361, 3, /* Elements count */ &asn_SPC_S1AP_PWSFailureIndicationIEs_specs_361 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_368[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkUEAssociatedLPPaTransport_IEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkUEAssociatedLPPaTransport_IEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkUEAssociatedLPPaTransport_IEs__value, choice.Routing_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_Routing_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Routing-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkUEAssociatedLPPaTransport_IEs__value, choice.LPPa_PDU), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_LPPa_PDU, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "LPPa-PDU" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_368[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 1 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -2, 0 }, /* Routing-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 3, 0, 0 } /* LPPa-PDU */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_368 = { sizeof(struct S1AP_DownlinkUEAssociatedLPPaTransport_IEs__value), offsetof(struct S1AP_DownlinkUEAssociatedLPPaTransport_IEs__value, _asn_ctx), offsetof(struct S1AP_DownlinkUEAssociatedLPPaTransport_IEs__value, present), sizeof(((struct S1AP_DownlinkUEAssociatedLPPaTransport_IEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_368, 4, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_368 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_368, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_368 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_DownlinkUEAssociatedLPPaTransport_IEs_365[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkUEAssociatedLPPaTransport_IEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_366, &asn_PER_memb_S1AP_id_constr_366, memb_S1AP_id_constraint_365 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkUEAssociatedLPPaTransport_IEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_DownlinkUEAssociatedLPPaTransport_IEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_367, &asn_PER_memb_S1AP_criticality_constr_367, memb_S1AP_criticality_constraint_365 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkUEAssociatedLPPaTransport_IEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_368, select_DownlinkUEAssociatedLPPaTransport_IEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_368, &asn_PER_memb_S1AP_value_constr_368, memb_S1AP_value_constraint_365 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_DownlinkUEAssociatedLPPaTransport_IEs_tags_365[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_DownlinkUEAssociatedLPPaTransport_IEs_tag2el_365[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_DownlinkUEAssociatedLPPaTransport_IEs_specs_365 = { sizeof(struct S1AP_DownlinkUEAssociatedLPPaTransport_IEs), offsetof(struct S1AP_DownlinkUEAssociatedLPPaTransport_IEs, _asn_ctx), asn_MAP_S1AP_DownlinkUEAssociatedLPPaTransport_IEs_tag2el_365, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_DownlinkUEAssociatedLPPaTransport_IEs = { "DownlinkUEAssociatedLPPaTransport-IEs", "DownlinkUEAssociatedLPPaTransport-IEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_DownlinkUEAssociatedLPPaTransport_IEs_tags_365, sizeof(asn_DEF_S1AP_DownlinkUEAssociatedLPPaTransport_IEs_tags_365) /sizeof(asn_DEF_S1AP_DownlinkUEAssociatedLPPaTransport_IEs_tags_365[0]), /* 1 */ asn_DEF_S1AP_DownlinkUEAssociatedLPPaTransport_IEs_tags_365, /* Same as above */ sizeof(asn_DEF_S1AP_DownlinkUEAssociatedLPPaTransport_IEs_tags_365) /sizeof(asn_DEF_S1AP_DownlinkUEAssociatedLPPaTransport_IEs_tags_365[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_DownlinkUEAssociatedLPPaTransport_IEs_365, 3, /* Elements count */ &asn_SPC_S1AP_DownlinkUEAssociatedLPPaTransport_IEs_specs_365 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_372[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkUEAssociatedLPPaTransport_IEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkUEAssociatedLPPaTransport_IEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkUEAssociatedLPPaTransport_IEs__value, choice.Routing_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_Routing_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Routing-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkUEAssociatedLPPaTransport_IEs__value, choice.LPPa_PDU), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_LPPa_PDU, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "LPPa-PDU" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_372[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 2 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 1 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 2, -2, 0 }, /* Routing-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 3, 0, 0 } /* LPPa-PDU */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_372 = { sizeof(struct S1AP_UplinkUEAssociatedLPPaTransport_IEs__value), offsetof(struct S1AP_UplinkUEAssociatedLPPaTransport_IEs__value, _asn_ctx), offsetof(struct S1AP_UplinkUEAssociatedLPPaTransport_IEs__value, present), sizeof(((struct S1AP_UplinkUEAssociatedLPPaTransport_IEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_372, 4, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_372 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_372, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_372 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UplinkUEAssociatedLPPaTransport_IEs_369[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkUEAssociatedLPPaTransport_IEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_370, &asn_PER_memb_S1AP_id_constr_370, memb_S1AP_id_constraint_369 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkUEAssociatedLPPaTransport_IEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UplinkUEAssociatedLPPaTransport_IEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_371, &asn_PER_memb_S1AP_criticality_constr_371, memb_S1AP_criticality_constraint_369 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkUEAssociatedLPPaTransport_IEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_372, select_UplinkUEAssociatedLPPaTransport_IEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_372, &asn_PER_memb_S1AP_value_constr_372, memb_S1AP_value_constraint_369 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UplinkUEAssociatedLPPaTransport_IEs_tags_369[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UplinkUEAssociatedLPPaTransport_IEs_tag2el_369[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UplinkUEAssociatedLPPaTransport_IEs_specs_369 = { sizeof(struct S1AP_UplinkUEAssociatedLPPaTransport_IEs), offsetof(struct S1AP_UplinkUEAssociatedLPPaTransport_IEs, _asn_ctx), asn_MAP_S1AP_UplinkUEAssociatedLPPaTransport_IEs_tag2el_369, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UplinkUEAssociatedLPPaTransport_IEs = { "UplinkUEAssociatedLPPaTransport-IEs", "UplinkUEAssociatedLPPaTransport-IEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UplinkUEAssociatedLPPaTransport_IEs_tags_369, sizeof(asn_DEF_S1AP_UplinkUEAssociatedLPPaTransport_IEs_tags_369) /sizeof(asn_DEF_S1AP_UplinkUEAssociatedLPPaTransport_IEs_tags_369[0]), /* 1 */ asn_DEF_S1AP_UplinkUEAssociatedLPPaTransport_IEs_tags_369, /* Same as above */ sizeof(asn_DEF_S1AP_UplinkUEAssociatedLPPaTransport_IEs_tags_369) /sizeof(asn_DEF_S1AP_UplinkUEAssociatedLPPaTransport_IEs_tags_369[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UplinkUEAssociatedLPPaTransport_IEs_369, 3, /* Elements count */ &asn_SPC_S1AP_UplinkUEAssociatedLPPaTransport_IEs_specs_369 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_376[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs__value, choice.Routing_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_Routing_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Routing-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs__value, choice.LPPa_PDU), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_LPPa_PDU, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "LPPa-PDU" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_376[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* Routing-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 } /* LPPa-PDU */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_376 = { sizeof(struct S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs__value), offsetof(struct S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs__value, _asn_ctx), offsetof(struct S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs__value, present), sizeof(((struct S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_376, 2, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_376 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_376, 2, /* Elements count */ &asn_SPC_S1AP_value_specs_376 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs_373[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_374, &asn_PER_memb_S1AP_id_constr_374, memb_S1AP_id_constraint_373 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_DownlinkNonUEAssociatedLPPaTransport_IEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_375, &asn_PER_memb_S1AP_criticality_constr_375, memb_S1AP_criticality_constraint_373 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_376, select_DownlinkNonUEAssociatedLPPaTransport_IEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_376, &asn_PER_memb_S1AP_value_constr_376, memb_S1AP_value_constraint_373 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs_tags_373[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs_tag2el_373[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs_specs_373 = { sizeof(struct S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs), offsetof(struct S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs, _asn_ctx), asn_MAP_S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs_tag2el_373, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs = { "DownlinkNonUEAssociatedLPPaTransport-IEs", "DownlinkNonUEAssociatedLPPaTransport-IEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs_tags_373, sizeof(asn_DEF_S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs_tags_373) /sizeof(asn_DEF_S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs_tags_373[0]), /* 1 */ asn_DEF_S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs_tags_373, /* Same as above */ sizeof(asn_DEF_S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs_tags_373) /sizeof(asn_DEF_S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs_tags_373[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs_373, 3, /* Elements count */ &asn_SPC_S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs_specs_373 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_380[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkNonUEAssociatedLPPaTransport_IEs__value, choice.Routing_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_Routing_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Routing-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkNonUEAssociatedLPPaTransport_IEs__value, choice.LPPa_PDU), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_LPPa_PDU, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "LPPa-PDU" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_380[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* Routing-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 1, 0, 0 } /* LPPa-PDU */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_380 = { sizeof(struct S1AP_UplinkNonUEAssociatedLPPaTransport_IEs__value), offsetof(struct S1AP_UplinkNonUEAssociatedLPPaTransport_IEs__value, _asn_ctx), offsetof(struct S1AP_UplinkNonUEAssociatedLPPaTransport_IEs__value, present), sizeof(((struct S1AP_UplinkNonUEAssociatedLPPaTransport_IEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_380, 2, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_380 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_380, 2, /* Elements count */ &asn_SPC_S1AP_value_specs_380 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UplinkNonUEAssociatedLPPaTransport_IEs_377[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkNonUEAssociatedLPPaTransport_IEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_378, &asn_PER_memb_S1AP_id_constr_378, memb_S1AP_id_constraint_377 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkNonUEAssociatedLPPaTransport_IEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UplinkNonUEAssociatedLPPaTransport_IEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_379, &asn_PER_memb_S1AP_criticality_constr_379, memb_S1AP_criticality_constraint_377 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkNonUEAssociatedLPPaTransport_IEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_380, select_UplinkNonUEAssociatedLPPaTransport_IEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_380, &asn_PER_memb_S1AP_value_constr_380, memb_S1AP_value_constraint_377 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UplinkNonUEAssociatedLPPaTransport_IEs_tags_377[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UplinkNonUEAssociatedLPPaTransport_IEs_tag2el_377[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UplinkNonUEAssociatedLPPaTransport_IEs_specs_377 = { sizeof(struct S1AP_UplinkNonUEAssociatedLPPaTransport_IEs), offsetof(struct S1AP_UplinkNonUEAssociatedLPPaTransport_IEs, _asn_ctx), asn_MAP_S1AP_UplinkNonUEAssociatedLPPaTransport_IEs_tag2el_377, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UplinkNonUEAssociatedLPPaTransport_IEs = { "UplinkNonUEAssociatedLPPaTransport-IEs", "UplinkNonUEAssociatedLPPaTransport-IEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UplinkNonUEAssociatedLPPaTransport_IEs_tags_377, sizeof(asn_DEF_S1AP_UplinkNonUEAssociatedLPPaTransport_IEs_tags_377) /sizeof(asn_DEF_S1AP_UplinkNonUEAssociatedLPPaTransport_IEs_tags_377[0]), /* 1 */ asn_DEF_S1AP_UplinkNonUEAssociatedLPPaTransport_IEs_tags_377, /* Same as above */ sizeof(asn_DEF_S1AP_UplinkNonUEAssociatedLPPaTransport_IEs_tags_377) /sizeof(asn_DEF_S1AP_UplinkNonUEAssociatedLPPaTransport_IEs_tags_377[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UplinkNonUEAssociatedLPPaTransport_IEs_377, 3, /* Elements count */ &asn_SPC_S1AP_UplinkNonUEAssociatedLPPaTransport_IEs_specs_377 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_384[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModificationIndicationIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModificationIndicationIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModificationIndicationIEs__value, choice.E_RABToBeModifiedListBearerModInd), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABToBeModifiedListBearerModInd, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABToBeModifiedListBearerModInd" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModificationIndicationIEs__value, choice.E_RABNotToBeModifiedListBearerModInd), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABNotToBeModifiedListBearerModInd, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABNotToBeModifiedListBearerModInd" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModificationIndicationIEs__value, choice.CSGMembershipInfo), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CSGMembershipInfo, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CSGMembershipInfo" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModificationIndicationIEs__value, choice.TunnelInformation), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TunnelInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TunnelInformation" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_384[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 3 }, /* E-RABToBeModifiedListBearerModInd */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 2 }, /* E-RABNotToBeModifiedListBearerModInd */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -2, 1 }, /* CSGMembershipInfo */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -3, 0 } /* TunnelInformation */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_384 = { sizeof(struct S1AP_E_RABModificationIndicationIEs__value), offsetof(struct S1AP_E_RABModificationIndicationIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABModificationIndicationIEs__value, present), sizeof(((struct S1AP_E_RABModificationIndicationIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_384, 6, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_384 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_384, 6, /* Elements count */ &asn_SPC_S1AP_value_specs_384 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABModificationIndicationIEs_381[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModificationIndicationIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_382, &asn_PER_memb_S1AP_id_constr_382, memb_S1AP_id_constraint_381 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModificationIndicationIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_E_RABModificationIndicationIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_383, &asn_PER_memb_S1AP_criticality_constr_383, memb_S1AP_criticality_constraint_381 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModificationIndicationIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_384, select_E_RABModificationIndicationIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_384, &asn_PER_memb_S1AP_value_constr_384, memb_S1AP_value_constraint_381 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABModificationIndicationIEs_tags_381[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABModificationIndicationIEs_tag2el_381[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModificationIndicationIEs_specs_381 = { sizeof(struct S1AP_E_RABModificationIndicationIEs), offsetof(struct S1AP_E_RABModificationIndicationIEs, _asn_ctx), asn_MAP_S1AP_E_RABModificationIndicationIEs_tag2el_381, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModificationIndicationIEs = { "E-RABModificationIndicationIEs", "E-RABModificationIndicationIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABModificationIndicationIEs_tags_381, sizeof(asn_DEF_S1AP_E_RABModificationIndicationIEs_tags_381) /sizeof(asn_DEF_S1AP_E_RABModificationIndicationIEs_tags_381[0]), /* 1 */ asn_DEF_S1AP_E_RABModificationIndicationIEs_tags_381, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABModificationIndicationIEs_tags_381) /sizeof(asn_DEF_S1AP_E_RABModificationIndicationIEs_tags_381[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABModificationIndicationIEs_381, 3, /* Elements count */ &asn_SPC_S1AP_E_RABModificationIndicationIEs_specs_381 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_388[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModificationConfirmIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModificationConfirmIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModificationConfirmIEs__value, choice.E_RABModifyListBearerModConf), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABModifyListBearerModConf, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABModifyListBearerModConf" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModificationConfirmIEs__value, choice.E_RABList), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModificationConfirmIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModificationConfirmIEs__value, choice.CSGMembershipStatus), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_CSGMembershipStatus, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CSGMembershipStatus" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_388[] = { 0, 1, 5, 2, 3, 4 }; static const unsigned asn_MAP_S1AP_value_from_canonical_388[] = { 0, 1, 3, 4, 5, 2 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_388[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 5, 0, 0 }, /* CSGMembershipStatus */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 2 }, /* E-RABModifyListBearerModConf */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 1 }, /* E-RABList */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -2, 0 } /* CriticalityDiagnostics */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_388 = { sizeof(struct S1AP_E_RABModificationConfirmIEs__value), offsetof(struct S1AP_E_RABModificationConfirmIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABModificationConfirmIEs__value, present), sizeof(((struct S1AP_E_RABModificationConfirmIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_388, 6, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_388, asn_MAP_S1AP_value_from_canonical_388, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_388 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_388, 6, /* Elements count */ &asn_SPC_S1AP_value_specs_388 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABModificationConfirmIEs_385[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModificationConfirmIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_386, &asn_PER_memb_S1AP_id_constr_386, memb_S1AP_id_constraint_385 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModificationConfirmIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_E_RABModificationConfirmIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_387, &asn_PER_memb_S1AP_criticality_constr_387, memb_S1AP_criticality_constraint_385 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABModificationConfirmIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_388, select_E_RABModificationConfirmIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_388, &asn_PER_memb_S1AP_value_constr_388, memb_S1AP_value_constraint_385 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABModificationConfirmIEs_tags_385[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABModificationConfirmIEs_tag2el_385[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModificationConfirmIEs_specs_385 = { sizeof(struct S1AP_E_RABModificationConfirmIEs), offsetof(struct S1AP_E_RABModificationConfirmIEs, _asn_ctx), asn_MAP_S1AP_E_RABModificationConfirmIEs_tag2el_385, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModificationConfirmIEs = { "E-RABModificationConfirmIEs", "E-RABModificationConfirmIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABModificationConfirmIEs_tags_385, sizeof(asn_DEF_S1AP_E_RABModificationConfirmIEs_tags_385) /sizeof(asn_DEF_S1AP_E_RABModificationConfirmIEs_tags_385[0]), /* 1 */ asn_DEF_S1AP_E_RABModificationConfirmIEs_tags_385, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABModificationConfirmIEs_tags_385) /sizeof(asn_DEF_S1AP_E_RABModificationConfirmIEs_tags_385[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABModificationConfirmIEs_385, 3, /* Elements count */ &asn_SPC_S1AP_E_RABModificationConfirmIEs_specs_385 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_392[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationIndicationIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationIndicationIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationIndicationIEs__value, choice.CSGMembershipInfo), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CSGMembershipInfo, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CSGMembershipInfo" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_392[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 } /* CSGMembershipInfo */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_392 = { sizeof(struct S1AP_UEContextModificationIndicationIEs__value), offsetof(struct S1AP_UEContextModificationIndicationIEs__value, _asn_ctx), offsetof(struct S1AP_UEContextModificationIndicationIEs__value, present), sizeof(((struct S1AP_UEContextModificationIndicationIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_392, 3, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_392 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_392, 3, /* Elements count */ &asn_SPC_S1AP_value_specs_392 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UEContextModificationIndicationIEs_389[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationIndicationIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_390, &asn_PER_memb_S1AP_id_constr_390, memb_S1AP_id_constraint_389 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationIndicationIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UEContextModificationIndicationIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_391, &asn_PER_memb_S1AP_criticality_constr_391, memb_S1AP_criticality_constraint_389 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationIndicationIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_392, select_UEContextModificationIndicationIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_392, &asn_PER_memb_S1AP_value_constr_392, memb_S1AP_value_constraint_389 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextModificationIndicationIEs_tags_389[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextModificationIndicationIEs_tag2el_389[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextModificationIndicationIEs_specs_389 = { sizeof(struct S1AP_UEContextModificationIndicationIEs), offsetof(struct S1AP_UEContextModificationIndicationIEs, _asn_ctx), asn_MAP_S1AP_UEContextModificationIndicationIEs_tag2el_389, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextModificationIndicationIEs = { "UEContextModificationIndicationIEs", "UEContextModificationIndicationIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextModificationIndicationIEs_tags_389, sizeof(asn_DEF_S1AP_UEContextModificationIndicationIEs_tags_389) /sizeof(asn_DEF_S1AP_UEContextModificationIndicationIEs_tags_389[0]), /* 1 */ asn_DEF_S1AP_UEContextModificationIndicationIEs_tags_389, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextModificationIndicationIEs_tags_389) /sizeof(asn_DEF_S1AP_UEContextModificationIndicationIEs_tags_389[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextModificationIndicationIEs_389, 3, /* Elements count */ &asn_SPC_S1AP_UEContextModificationIndicationIEs_specs_389 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_396[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationConfirmIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationConfirmIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationConfirmIEs__value, choice.CSGMembershipStatus), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_CSGMembershipStatus, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CSGMembershipStatus" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationConfirmIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_396[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 2, 0, 0 }, /* CSGMembershipStatus */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, 0, 0 } /* CriticalityDiagnostics */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_396 = { sizeof(struct S1AP_UEContextModificationConfirmIEs__value), offsetof(struct S1AP_UEContextModificationConfirmIEs__value, _asn_ctx), offsetof(struct S1AP_UEContextModificationConfirmIEs__value, present), sizeof(((struct S1AP_UEContextModificationConfirmIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_396, 4, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_396 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_396, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_396 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UEContextModificationConfirmIEs_393[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationConfirmIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_394, &asn_PER_memb_S1AP_id_constr_394, memb_S1AP_id_constraint_393 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationConfirmIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UEContextModificationConfirmIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_395, &asn_PER_memb_S1AP_criticality_constr_395, memb_S1AP_criticality_constraint_393 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationConfirmIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_396, select_UEContextModificationConfirmIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_396, &asn_PER_memb_S1AP_value_constr_396, memb_S1AP_value_constraint_393 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextModificationConfirmIEs_tags_393[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextModificationConfirmIEs_tag2el_393[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextModificationConfirmIEs_specs_393 = { sizeof(struct S1AP_UEContextModificationConfirmIEs), offsetof(struct S1AP_UEContextModificationConfirmIEs, _asn_ctx), asn_MAP_S1AP_UEContextModificationConfirmIEs_tag2el_393, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextModificationConfirmIEs = { "UEContextModificationConfirmIEs", "UEContextModificationConfirmIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextModificationConfirmIEs_tags_393, sizeof(asn_DEF_S1AP_UEContextModificationConfirmIEs_tags_393) /sizeof(asn_DEF_S1AP_UEContextModificationConfirmIEs_tags_393[0]), /* 1 */ asn_DEF_S1AP_UEContextModificationConfirmIEs_tags_393, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextModificationConfirmIEs_tags_393) /sizeof(asn_DEF_S1AP_UEContextModificationConfirmIEs_tags_393[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextModificationConfirmIEs_393, 3, /* Elements count */ &asn_SPC_S1AP_UEContextModificationConfirmIEs_specs_393 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_400[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextSuspendRequestIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextSuspendRequestIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextSuspendRequestIEs__value, choice.InformationOnRecommendedCellsAndENBsForPaging), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_InformationOnRecommendedCellsAndENBsForPaging, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "InformationOnRecommendedCellsAndENBsForPaging" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextSuspendRequestIEs__value, choice.CellIdentifierAndCELevelForCECapableUEs), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CellIdentifierAndCELevelForCECapableUEs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CellIdentifierAndCELevelForCECapableUEs" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_400[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 1 }, /* InformationOnRecommendedCellsAndENBsForPaging */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 0 } /* CellIdentifierAndCELevelForCECapableUEs */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_400 = { sizeof(struct S1AP_UEContextSuspendRequestIEs__value), offsetof(struct S1AP_UEContextSuspendRequestIEs__value, _asn_ctx), offsetof(struct S1AP_UEContextSuspendRequestIEs__value, present), sizeof(((struct S1AP_UEContextSuspendRequestIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_400, 4, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_400 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_400, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_400 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UEContextSuspendRequestIEs_397[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextSuspendRequestIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_398, &asn_PER_memb_S1AP_id_constr_398, memb_S1AP_id_constraint_397 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextSuspendRequestIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UEContextSuspendRequestIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_399, &asn_PER_memb_S1AP_criticality_constr_399, memb_S1AP_criticality_constraint_397 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextSuspendRequestIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_400, select_UEContextSuspendRequestIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_400, &asn_PER_memb_S1AP_value_constr_400, memb_S1AP_value_constraint_397 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextSuspendRequestIEs_tags_397[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextSuspendRequestIEs_tag2el_397[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextSuspendRequestIEs_specs_397 = { sizeof(struct S1AP_UEContextSuspendRequestIEs), offsetof(struct S1AP_UEContextSuspendRequestIEs, _asn_ctx), asn_MAP_S1AP_UEContextSuspendRequestIEs_tag2el_397, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextSuspendRequestIEs = { "UEContextSuspendRequestIEs", "UEContextSuspendRequestIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextSuspendRequestIEs_tags_397, sizeof(asn_DEF_S1AP_UEContextSuspendRequestIEs_tags_397) /sizeof(asn_DEF_S1AP_UEContextSuspendRequestIEs_tags_397[0]), /* 1 */ asn_DEF_S1AP_UEContextSuspendRequestIEs_tags_397, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextSuspendRequestIEs_tags_397) /sizeof(asn_DEF_S1AP_UEContextSuspendRequestIEs_tags_397[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextSuspendRequestIEs_397, 3, /* Elements count */ &asn_SPC_S1AP_UEContextSuspendRequestIEs_specs_397 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_404[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextSuspendResponseIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextSuspendResponseIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextSuspendResponseIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextSuspendResponseIEs__value, choice.SecurityContext), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_SecurityContext, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SecurityContext" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_404[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 1 }, /* CriticalityDiagnostics */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 0 } /* SecurityContext */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_404 = { sizeof(struct S1AP_UEContextSuspendResponseIEs__value), offsetof(struct S1AP_UEContextSuspendResponseIEs__value, _asn_ctx), offsetof(struct S1AP_UEContextSuspendResponseIEs__value, present), sizeof(((struct S1AP_UEContextSuspendResponseIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_404, 4, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_404 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_404, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_404 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UEContextSuspendResponseIEs_401[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextSuspendResponseIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_402, &asn_PER_memb_S1AP_id_constr_402, memb_S1AP_id_constraint_401 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextSuspendResponseIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UEContextSuspendResponseIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_403, &asn_PER_memb_S1AP_criticality_constr_403, memb_S1AP_criticality_constraint_401 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextSuspendResponseIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_404, select_UEContextSuspendResponseIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_404, &asn_PER_memb_S1AP_value_constr_404, memb_S1AP_value_constraint_401 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextSuspendResponseIEs_tags_401[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextSuspendResponseIEs_tag2el_401[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextSuspendResponseIEs_specs_401 = { sizeof(struct S1AP_UEContextSuspendResponseIEs), offsetof(struct S1AP_UEContextSuspendResponseIEs, _asn_ctx), asn_MAP_S1AP_UEContextSuspendResponseIEs_tag2el_401, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextSuspendResponseIEs = { "UEContextSuspendResponseIEs", "UEContextSuspendResponseIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextSuspendResponseIEs_tags_401, sizeof(asn_DEF_S1AP_UEContextSuspendResponseIEs_tags_401) /sizeof(asn_DEF_S1AP_UEContextSuspendResponseIEs_tags_401[0]), /* 1 */ asn_DEF_S1AP_UEContextSuspendResponseIEs_tags_401, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextSuspendResponseIEs_tags_401) /sizeof(asn_DEF_S1AP_UEContextSuspendResponseIEs_tags_401[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextSuspendResponseIEs_401, 3, /* Elements count */ &asn_SPC_S1AP_UEContextSuspendResponseIEs_specs_401 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_408[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeRequestIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeRequestIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeRequestIEs__value, choice.E_RABFailedToResumeListResumeReq), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABFailedToResumeListResumeReq, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABFailedToResumeListResumeReq" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeRequestIEs__value, choice.RRC_Establishment_Cause), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_RRC_Establishment_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "RRC-Establishment-Cause" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_408[] = { 0, 1, 3, 2 }; static const unsigned asn_MAP_S1AP_value_from_canonical_408[] = { 0, 1, 3, 2 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_408[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 3, 0, 0 }, /* RRC-Establishment-Cause */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 0 } /* E-RABFailedToResumeListResumeReq */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_408 = { sizeof(struct S1AP_UEContextResumeRequestIEs__value), offsetof(struct S1AP_UEContextResumeRequestIEs__value, _asn_ctx), offsetof(struct S1AP_UEContextResumeRequestIEs__value, present), sizeof(((struct S1AP_UEContextResumeRequestIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_408, 4, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_408, asn_MAP_S1AP_value_from_canonical_408, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_408 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_408, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_408 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UEContextResumeRequestIEs_405[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeRequestIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_406, &asn_PER_memb_S1AP_id_constr_406, memb_S1AP_id_constraint_405 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeRequestIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UEContextResumeRequestIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_407, &asn_PER_memb_S1AP_criticality_constr_407, memb_S1AP_criticality_constraint_405 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeRequestIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_408, select_UEContextResumeRequestIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_408, &asn_PER_memb_S1AP_value_constr_408, memb_S1AP_value_constraint_405 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextResumeRequestIEs_tags_405[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextResumeRequestIEs_tag2el_405[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextResumeRequestIEs_specs_405 = { sizeof(struct S1AP_UEContextResumeRequestIEs), offsetof(struct S1AP_UEContextResumeRequestIEs, _asn_ctx), asn_MAP_S1AP_UEContextResumeRequestIEs_tag2el_405, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextResumeRequestIEs = { "UEContextResumeRequestIEs", "UEContextResumeRequestIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextResumeRequestIEs_tags_405, sizeof(asn_DEF_S1AP_UEContextResumeRequestIEs_tags_405) /sizeof(asn_DEF_S1AP_UEContextResumeRequestIEs_tags_405[0]), /* 1 */ asn_DEF_S1AP_UEContextResumeRequestIEs_tags_405, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextResumeRequestIEs_tags_405) /sizeof(asn_DEF_S1AP_UEContextResumeRequestIEs_tags_405[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextResumeRequestIEs_405, 3, /* Elements count */ &asn_SPC_S1AP_UEContextResumeRequestIEs_specs_405 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_412[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeResponseIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeResponseIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeResponseIEs__value, choice.E_RABFailedToResumeListResumeRes), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABFailedToResumeListResumeRes, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABFailedToResumeListResumeRes" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeResponseIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeResponseIEs__value, choice.SecurityContext), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_SecurityContext, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "SecurityContext" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_412[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, 0, 2 }, /* E-RABFailedToResumeListResumeRes */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -1, 1 }, /* CriticalityDiagnostics */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -2, 0 } /* SecurityContext */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_412 = { sizeof(struct S1AP_UEContextResumeResponseIEs__value), offsetof(struct S1AP_UEContextResumeResponseIEs__value, _asn_ctx), offsetof(struct S1AP_UEContextResumeResponseIEs__value, present), sizeof(((struct S1AP_UEContextResumeResponseIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_412, 5, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_412 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_412, 5, /* Elements count */ &asn_SPC_S1AP_value_specs_412 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UEContextResumeResponseIEs_409[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeResponseIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_410, &asn_PER_memb_S1AP_id_constr_410, memb_S1AP_id_constraint_409 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeResponseIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UEContextResumeResponseIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_411, &asn_PER_memb_S1AP_criticality_constr_411, memb_S1AP_criticality_constraint_409 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeResponseIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_412, select_UEContextResumeResponseIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_412, &asn_PER_memb_S1AP_value_constr_412, memb_S1AP_value_constraint_409 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextResumeResponseIEs_tags_409[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextResumeResponseIEs_tag2el_409[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextResumeResponseIEs_specs_409 = { sizeof(struct S1AP_UEContextResumeResponseIEs), offsetof(struct S1AP_UEContextResumeResponseIEs, _asn_ctx), asn_MAP_S1AP_UEContextResumeResponseIEs_tag2el_409, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextResumeResponseIEs = { "UEContextResumeResponseIEs", "UEContextResumeResponseIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextResumeResponseIEs_tags_409, sizeof(asn_DEF_S1AP_UEContextResumeResponseIEs_tags_409) /sizeof(asn_DEF_S1AP_UEContextResumeResponseIEs_tags_409[0]), /* 1 */ asn_DEF_S1AP_UEContextResumeResponseIEs_tags_409, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextResumeResponseIEs_tags_409) /sizeof(asn_DEF_S1AP_UEContextResumeResponseIEs_tags_409[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextResumeResponseIEs_409, 3, /* Elements count */ &asn_SPC_S1AP_UEContextResumeResponseIEs_specs_409 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_416[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeFailureIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeFailureIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeFailureIEs__value, choice.Cause), -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_Cause, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "Cause" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeFailureIEs__value, choice.CriticalityDiagnostics), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_CriticalityDiagnostics, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "CriticalityDiagnostics" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_416[] = { 0, 1, 3, 2 }; static const unsigned asn_MAP_S1AP_value_from_canonical_416[] = { 0, 1, 3, 2 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_416[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, 0, 0 }, /* CriticalityDiagnostics */ { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 2, 0, 0 }, /* radioNetwork */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 2, 0, 0 }, /* transport */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* nas */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 2, 0, 0 }, /* protocol */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 2, 0, 0 } /* misc */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_416 = { sizeof(struct S1AP_UEContextResumeFailureIEs__value), offsetof(struct S1AP_UEContextResumeFailureIEs__value, _asn_ctx), offsetof(struct S1AP_UEContextResumeFailureIEs__value, present), sizeof(((struct S1AP_UEContextResumeFailureIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_416, 8, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_416, asn_MAP_S1AP_value_from_canonical_416, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_416 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_416, 4, /* Elements count */ &asn_SPC_S1AP_value_specs_416 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UEContextResumeFailureIEs_413[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeFailureIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_414, &asn_PER_memb_S1AP_id_constr_414, memb_S1AP_id_constraint_413 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeFailureIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UEContextResumeFailureIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_415, &asn_PER_memb_S1AP_criticality_constr_415, memb_S1AP_criticality_constraint_413 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeFailureIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_416, select_UEContextResumeFailureIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_416, &asn_PER_memb_S1AP_value_constr_416, memb_S1AP_value_constraint_413 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextResumeFailureIEs_tags_413[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextResumeFailureIEs_tag2el_413[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextResumeFailureIEs_specs_413 = { sizeof(struct S1AP_UEContextResumeFailureIEs), offsetof(struct S1AP_UEContextResumeFailureIEs, _asn_ctx), asn_MAP_S1AP_UEContextResumeFailureIEs_tag2el_413, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextResumeFailureIEs = { "UEContextResumeFailureIEs", "UEContextResumeFailureIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextResumeFailureIEs_tags_413, sizeof(asn_DEF_S1AP_UEContextResumeFailureIEs_tags_413) /sizeof(asn_DEF_S1AP_UEContextResumeFailureIEs_tags_413[0]), /* 1 */ asn_DEF_S1AP_UEContextResumeFailureIEs_tags_413, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextResumeFailureIEs_tags_413) /sizeof(asn_DEF_S1AP_UEContextResumeFailureIEs_tags_413[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextResumeFailureIEs_413, 3, /* Elements count */ &asn_SPC_S1AP_UEContextResumeFailureIEs_specs_413 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_420[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ConnectionEstablishmentIndicationIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ConnectionEstablishmentIndicationIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ConnectionEstablishmentIndicationIEs__value, choice.UERadioCapability), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_UERadioCapability, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UERadioCapability" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ConnectionEstablishmentIndicationIEs__value, choice.EnhancedCoverageRestricted), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_EnhancedCoverageRestricted, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "EnhancedCoverageRestricted" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ConnectionEstablishmentIndicationIEs__value, choice.DL_CP_SecurityInformation), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_DL_CP_SecurityInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "DL-CP-SecurityInformation" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_420[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, 0, 0 }, /* UERadioCapability */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 3, 0, 0 }, /* EnhancedCoverageRestricted */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, 0, 0 } /* DL-CP-SecurityInformation */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_420 = { sizeof(struct S1AP_ConnectionEstablishmentIndicationIEs__value), offsetof(struct S1AP_ConnectionEstablishmentIndicationIEs__value, _asn_ctx), offsetof(struct S1AP_ConnectionEstablishmentIndicationIEs__value, present), sizeof(((struct S1AP_ConnectionEstablishmentIndicationIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_420, 5, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_420 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_420, 5, /* Elements count */ &asn_SPC_S1AP_value_specs_420 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ConnectionEstablishmentIndicationIEs_417[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ConnectionEstablishmentIndicationIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_418, &asn_PER_memb_S1AP_id_constr_418, memb_S1AP_id_constraint_417 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ConnectionEstablishmentIndicationIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_ConnectionEstablishmentIndicationIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_419, &asn_PER_memb_S1AP_criticality_constr_419, memb_S1AP_criticality_constraint_417 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_ConnectionEstablishmentIndicationIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_420, select_ConnectionEstablishmentIndicationIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_420, &asn_PER_memb_S1AP_value_constr_420, memb_S1AP_value_constraint_417 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ConnectionEstablishmentIndicationIEs_tags_417[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ConnectionEstablishmentIndicationIEs_tag2el_417[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ConnectionEstablishmentIndicationIEs_specs_417 = { sizeof(struct S1AP_ConnectionEstablishmentIndicationIEs), offsetof(struct S1AP_ConnectionEstablishmentIndicationIEs, _asn_ctx), asn_MAP_S1AP_ConnectionEstablishmentIndicationIEs_tag2el_417, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ConnectionEstablishmentIndicationIEs = { "ConnectionEstablishmentIndicationIEs", "ConnectionEstablishmentIndicationIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_ConnectionEstablishmentIndicationIEs_tags_417, sizeof(asn_DEF_S1AP_ConnectionEstablishmentIndicationIEs_tags_417) /sizeof(asn_DEF_S1AP_ConnectionEstablishmentIndicationIEs_tags_417[0]), /* 1 */ asn_DEF_S1AP_ConnectionEstablishmentIndicationIEs_tags_417, /* Same as above */ sizeof(asn_DEF_S1AP_ConnectionEstablishmentIndicationIEs_tags_417) /sizeof(asn_DEF_S1AP_ConnectionEstablishmentIndicationIEs_tags_417[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ConnectionEstablishmentIndicationIEs_417, 3, /* Elements count */ &asn_SPC_S1AP_ConnectionEstablishmentIndicationIEs_specs_417 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_424[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RetrieveUEInformationIEs__value, choice.S_TMSI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_S_TMSI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "S-TMSI" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_424[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* S-TMSI */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_424 = { sizeof(struct S1AP_RetrieveUEInformationIEs__value), offsetof(struct S1AP_RetrieveUEInformationIEs__value, _asn_ctx), offsetof(struct S1AP_RetrieveUEInformationIEs__value, present), sizeof(((struct S1AP_RetrieveUEInformationIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_424, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_424 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_424, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_424 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_RetrieveUEInformationIEs_421[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RetrieveUEInformationIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_422, &asn_PER_memb_S1AP_id_constr_422, memb_S1AP_id_constraint_421 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_RetrieveUEInformationIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_RetrieveUEInformationIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_423, &asn_PER_memb_S1AP_criticality_constr_423, memb_S1AP_criticality_constraint_421 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_RetrieveUEInformationIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_424, select_RetrieveUEInformationIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_424, &asn_PER_memb_S1AP_value_constr_424, memb_S1AP_value_constraint_421 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_RetrieveUEInformationIEs_tags_421[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_RetrieveUEInformationIEs_tag2el_421[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_RetrieveUEInformationIEs_specs_421 = { sizeof(struct S1AP_RetrieveUEInformationIEs), offsetof(struct S1AP_RetrieveUEInformationIEs, _asn_ctx), asn_MAP_S1AP_RetrieveUEInformationIEs_tag2el_421, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_RetrieveUEInformationIEs = { "RetrieveUEInformationIEs", "RetrieveUEInformationIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_RetrieveUEInformationIEs_tags_421, sizeof(asn_DEF_S1AP_RetrieveUEInformationIEs_tags_421) /sizeof(asn_DEF_S1AP_RetrieveUEInformationIEs_tags_421[0]), /* 1 */ asn_DEF_S1AP_RetrieveUEInformationIEs_tags_421, /* Same as above */ sizeof(asn_DEF_S1AP_RetrieveUEInformationIEs_tags_421) /sizeof(asn_DEF_S1AP_RetrieveUEInformationIEs_tags_421[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_RetrieveUEInformationIEs_421, 3, /* Elements count */ &asn_SPC_S1AP_RetrieveUEInformationIEs_specs_421 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_428[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEInformationTransferIEs__value, choice.S_TMSI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_S_TMSI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "S-TMSI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEInformationTransferIEs__value, choice.E_RABLevelQoSParameters), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABLevelQoSParameters, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABLevelQoSParameters" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEInformationTransferIEs__value, choice.UERadioCapability), (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_UERadioCapability, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UERadioCapability" }, }; static const unsigned asn_MAP_S1AP_value_to_canonical_428[] = { 2, 0, 1 }; static const unsigned asn_MAP_S1AP_value_from_canonical_428[] = { 1, 2, 0 }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_428[] = { { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 2, 0, 0 }, /* UERadioCapability */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 1 }, /* S-TMSI */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 0 } /* E-RABLevelQoSParameters */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_428 = { sizeof(struct S1AP_UEInformationTransferIEs__value), offsetof(struct S1AP_UEInformationTransferIEs__value, _asn_ctx), offsetof(struct S1AP_UEInformationTransferIEs__value, present), sizeof(((struct S1AP_UEInformationTransferIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_428, 3, /* Count of tags in the map */ asn_MAP_S1AP_value_to_canonical_428, asn_MAP_S1AP_value_from_canonical_428, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_428 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_428, 3, /* Elements count */ &asn_SPC_S1AP_value_specs_428 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UEInformationTransferIEs_425[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEInformationTransferIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_426, &asn_PER_memb_S1AP_id_constr_426, memb_S1AP_id_constraint_425 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEInformationTransferIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UEInformationTransferIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_427, &asn_PER_memb_S1AP_criticality_constr_427, memb_S1AP_criticality_constraint_425 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UEInformationTransferIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_428, select_UEInformationTransferIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_428, &asn_PER_memb_S1AP_value_constr_428, memb_S1AP_value_constraint_425 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEInformationTransferIEs_tags_425[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEInformationTransferIEs_tag2el_425[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEInformationTransferIEs_specs_425 = { sizeof(struct S1AP_UEInformationTransferIEs), offsetof(struct S1AP_UEInformationTransferIEs, _asn_ctx), asn_MAP_S1AP_UEInformationTransferIEs_tag2el_425, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEInformationTransferIEs = { "UEInformationTransferIEs", "UEInformationTransferIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEInformationTransferIEs_tags_425, sizeof(asn_DEF_S1AP_UEInformationTransferIEs_tags_425) /sizeof(asn_DEF_S1AP_UEInformationTransferIEs_tags_425[0]), /* 1 */ asn_DEF_S1AP_UEInformationTransferIEs_tags_425, /* Same as above */ sizeof(asn_DEF_S1AP_UEInformationTransferIEs_tags_425) /sizeof(asn_DEF_S1AP_UEInformationTransferIEs_tags_425[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEInformationTransferIEs_425, 3, /* Elements count */ &asn_SPC_S1AP_UEInformationTransferIEs_specs_425 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_432[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBCPRelocationIndicationIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBCPRelocationIndicationIEs__value, choice.S_TMSI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_S_TMSI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "S-TMSI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBCPRelocationIndicationIEs__value, choice.EUTRAN_CGI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_EUTRAN_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "EUTRAN-CGI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBCPRelocationIndicationIEs__value, choice.TAI), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "TAI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBCPRelocationIndicationIEs__value, choice.UL_CP_SecurityInformation), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UL_CP_SecurityInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UL-CP-SecurityInformation" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_432[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* ENB-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 3 }, /* S-TMSI */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -1, 2 }, /* EUTRAN-CGI */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -2, 1 }, /* TAI */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -3, 0 } /* UL-CP-SecurityInformation */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_432 = { sizeof(struct S1AP_ENBCPRelocationIndicationIEs__value), offsetof(struct S1AP_ENBCPRelocationIndicationIEs__value, _asn_ctx), offsetof(struct S1AP_ENBCPRelocationIndicationIEs__value, present), sizeof(((struct S1AP_ENBCPRelocationIndicationIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_432, 5, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_432 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_432, 5, /* Elements count */ &asn_SPC_S1AP_value_specs_432 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_ENBCPRelocationIndicationIEs_429[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBCPRelocationIndicationIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_430, &asn_PER_memb_S1AP_id_constr_430, memb_S1AP_id_constraint_429 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBCPRelocationIndicationIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_ENBCPRelocationIndicationIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_431, &asn_PER_memb_S1AP_criticality_constr_431, memb_S1AP_criticality_constraint_429 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_ENBCPRelocationIndicationIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_432, select_ENBCPRelocationIndicationIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_432, &asn_PER_memb_S1AP_value_constr_432, memb_S1AP_value_constraint_429 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ENBCPRelocationIndicationIEs_tags_429[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ENBCPRelocationIndicationIEs_tag2el_429[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBCPRelocationIndicationIEs_specs_429 = { sizeof(struct S1AP_ENBCPRelocationIndicationIEs), offsetof(struct S1AP_ENBCPRelocationIndicationIEs, _asn_ctx), asn_MAP_S1AP_ENBCPRelocationIndicationIEs_tag2el_429, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ENBCPRelocationIndicationIEs = { "ENBCPRelocationIndicationIEs", "ENBCPRelocationIndicationIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_ENBCPRelocationIndicationIEs_tags_429, sizeof(asn_DEF_S1AP_ENBCPRelocationIndicationIEs_tags_429) /sizeof(asn_DEF_S1AP_ENBCPRelocationIndicationIEs_tags_429[0]), /* 1 */ asn_DEF_S1AP_ENBCPRelocationIndicationIEs_tags_429, /* Same as above */ sizeof(asn_DEF_S1AP_ENBCPRelocationIndicationIEs_tags_429) /sizeof(asn_DEF_S1AP_ENBCPRelocationIndicationIEs_tags_429[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ENBCPRelocationIndicationIEs_429, 3, /* Elements count */ &asn_SPC_S1AP_ENBCPRelocationIndicationIEs_specs_429 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_436[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMECPRelocationIndicationIEs__value, choice.MME_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMECPRelocationIndicationIEs__value, choice.ENB_UE_S1AP_ID), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENB-UE-S1AP-ID" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_436[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 1 }, /* MME-UE-S1AP-ID */ { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 1, -1, 0 } /* ENB-UE-S1AP-ID */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_436 = { sizeof(struct S1AP_MMECPRelocationIndicationIEs__value), offsetof(struct S1AP_MMECPRelocationIndicationIEs__value, _asn_ctx), offsetof(struct S1AP_MMECPRelocationIndicationIEs__value, present), sizeof(((struct S1AP_MMECPRelocationIndicationIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_436, 2, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_436 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_436, 2, /* Elements count */ &asn_SPC_S1AP_value_specs_436 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_MMECPRelocationIndicationIEs_433[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMECPRelocationIndicationIEs, id), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_434, &asn_PER_memb_S1AP_id_constr_434, memb_S1AP_id_constraint_433 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_MMECPRelocationIndicationIEs, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_MMECPRelocationIndicationIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_435, &asn_PER_memb_S1AP_criticality_constr_435, memb_S1AP_criticality_constraint_433 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_MMECPRelocationIndicationIEs, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_436, select_MMECPRelocationIndicationIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_436, &asn_PER_memb_S1AP_value_constr_436, memb_S1AP_value_constraint_433 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_MMECPRelocationIndicationIEs_tags_433[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_MMECPRelocationIndicationIEs_tag2el_433[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMECPRelocationIndicationIEs_specs_433 = { sizeof(struct S1AP_MMECPRelocationIndicationIEs), offsetof(struct S1AP_MMECPRelocationIndicationIEs, _asn_ctx), asn_MAP_S1AP_MMECPRelocationIndicationIEs_tag2el_433, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_MMECPRelocationIndicationIEs = { "MMECPRelocationIndicationIEs", "MMECPRelocationIndicationIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_MMECPRelocationIndicationIEs_tags_433, sizeof(asn_DEF_S1AP_MMECPRelocationIndicationIEs_tags_433) /sizeof(asn_DEF_S1AP_MMECPRelocationIndicationIEs_tags_433[0]), /* 1 */ asn_DEF_S1AP_MMECPRelocationIndicationIEs_tags_433, /* Same as above */ sizeof(asn_DEF_S1AP_MMECPRelocationIndicationIEs_tags_433) /sizeof(asn_DEF_S1AP_MMECPRelocationIndicationIEs_tags_433[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_MMECPRelocationIndicationIEs_433, 3, /* Elements count */ &asn_SPC_S1AP_MMECPRelocationIndicationIEs_specs_433 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_440[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABDataForwardingItemIEs__value, choice.E_RABDataForwardingItem), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABDataForwardingItem, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABDataForwardingItem" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_440[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E-RABDataForwardingItem */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_440 = { sizeof(struct S1AP_E_RABDataForwardingItemIEs__value), offsetof(struct S1AP_E_RABDataForwardingItemIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABDataForwardingItemIEs__value, present), sizeof(((struct S1AP_E_RABDataForwardingItemIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_440, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_440 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_440, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_440 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABDataForwardingItemIEs_437[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABDataForwardingItemIEs, id), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_438, &asn_PER_memb_S1AP_id_constr_438, memb_S1AP_id_constraint_437 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABDataForwardingItemIEs, criticality), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_Criticality, select_E_RABDataForwardingItemIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_439, &asn_PER_memb_S1AP_criticality_constr_439, memb_S1AP_criticality_constraint_437 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABDataForwardingItemIEs, value), -1 /* Ambiguous tag (ANY?) */, 0, &asn_DEF_S1AP_value_440, select_E_RABDataForwardingItemIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_440, &asn_PER_memb_S1AP_value_constr_440, memb_S1AP_value_constraint_437 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABDataForwardingItemIEs_tags_437[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABDataForwardingItemIEs_tag2el_437[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABDataForwardingItemIEs_specs_437 = { sizeof(struct S1AP_E_RABDataForwardingItemIEs), offsetof(struct S1AP_E_RABDataForwardingItemIEs, _asn_ctx), asn_MAP_S1AP_E_RABDataForwardingItemIEs_tag2el_437, 2, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABDataForwardingItemIEs = { "E-RABDataForwardingItemIEs", "E-RABDataForwardingItemIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABDataForwardingItemIEs_tags_437, sizeof(asn_DEF_S1AP_E_RABDataForwardingItemIEs_tags_437) /sizeof(asn_DEF_S1AP_E_RABDataForwardingItemIEs_tags_437[0]), /* 1 */ asn_DEF_S1AP_E_RABDataForwardingItemIEs_tags_437, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABDataForwardingItemIEs_tags_437) /sizeof(asn_DEF_S1AP_E_RABDataForwardingItemIEs_tags_437[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABDataForwardingItemIEs_437, 3, /* Elements count */ &asn_SPC_S1AP_E_RABDataForwardingItemIEs_specs_437 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_444[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemHOReqIEs__value, choice.E_RABToBeSetupItemHOReq), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABToBeSetupItemHOReq, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABToBeSetupItemHOReq" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_444[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E-RABToBeSetupItemHOReq */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_444 = { sizeof(struct S1AP_E_RABToBeSetupItemHOReqIEs__value), offsetof(struct S1AP_E_RABToBeSetupItemHOReqIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABToBeSetupItemHOReqIEs__value, present), sizeof(((struct S1AP_E_RABToBeSetupItemHOReqIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_444, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_444 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_444, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_444 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSetupItemHOReqIEs_441[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemHOReqIEs, id), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_442, &asn_PER_memb_S1AP_id_constr_442, memb_S1AP_id_constraint_441 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemHOReqIEs, criticality), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_Criticality, select_E_RABToBeSetupItemHOReqIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_443, &asn_PER_memb_S1AP_criticality_constr_443, memb_S1AP_criticality_constraint_441 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSetupItemHOReqIEs, value), -1 /* Ambiguous tag (ANY?) */, 0, &asn_DEF_S1AP_value_444, select_E_RABToBeSetupItemHOReqIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_444, &asn_PER_memb_S1AP_value_constr_444, memb_S1AP_value_constraint_441 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeSetupItemHOReqIEs_tags_441[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABToBeSetupItemHOReqIEs_tag2el_441[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSetupItemHOReqIEs_specs_441 = { sizeof(struct S1AP_E_RABToBeSetupItemHOReqIEs), offsetof(struct S1AP_E_RABToBeSetupItemHOReqIEs, _asn_ctx), asn_MAP_S1AP_E_RABToBeSetupItemHOReqIEs_tag2el_441, 2, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupItemHOReqIEs = { "E-RABToBeSetupItemHOReqIEs", "E-RABToBeSetupItemHOReqIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABToBeSetupItemHOReqIEs_tags_441, sizeof(asn_DEF_S1AP_E_RABToBeSetupItemHOReqIEs_tags_441) /sizeof(asn_DEF_S1AP_E_RABToBeSetupItemHOReqIEs_tags_441[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeSetupItemHOReqIEs_tags_441, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeSetupItemHOReqIEs_tags_441) /sizeof(asn_DEF_S1AP_E_RABToBeSetupItemHOReqIEs_tags_441[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeSetupItemHOReqIEs_441, 3, /* Elements count */ &asn_SPC_S1AP_E_RABToBeSetupItemHOReqIEs_specs_441 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_448[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABAdmittedItemIEs__value, choice.E_RABAdmittedItem), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABAdmittedItem, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABAdmittedItem" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_448[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E-RABAdmittedItem */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_448 = { sizeof(struct S1AP_E_RABAdmittedItemIEs__value), offsetof(struct S1AP_E_RABAdmittedItemIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABAdmittedItemIEs__value, present), sizeof(((struct S1AP_E_RABAdmittedItemIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_448, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_448 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_448, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_448 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABAdmittedItemIEs_445[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABAdmittedItemIEs, id), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_446, &asn_PER_memb_S1AP_id_constr_446, memb_S1AP_id_constraint_445 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABAdmittedItemIEs, criticality), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_Criticality, select_E_RABAdmittedItemIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_447, &asn_PER_memb_S1AP_criticality_constr_447, memb_S1AP_criticality_constraint_445 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABAdmittedItemIEs, value), -1 /* Ambiguous tag (ANY?) */, 0, &asn_DEF_S1AP_value_448, select_E_RABAdmittedItemIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_448, &asn_PER_memb_S1AP_value_constr_448, memb_S1AP_value_constraint_445 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABAdmittedItemIEs_tags_445[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABAdmittedItemIEs_tag2el_445[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABAdmittedItemIEs_specs_445 = { sizeof(struct S1AP_E_RABAdmittedItemIEs), offsetof(struct S1AP_E_RABAdmittedItemIEs, _asn_ctx), asn_MAP_S1AP_E_RABAdmittedItemIEs_tag2el_445, 2, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABAdmittedItemIEs = { "E-RABAdmittedItemIEs", "E-RABAdmittedItemIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABAdmittedItemIEs_tags_445, sizeof(asn_DEF_S1AP_E_RABAdmittedItemIEs_tags_445) /sizeof(asn_DEF_S1AP_E_RABAdmittedItemIEs_tags_445[0]), /* 1 */ asn_DEF_S1AP_E_RABAdmittedItemIEs_tags_445, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABAdmittedItemIEs_tags_445) /sizeof(asn_DEF_S1AP_E_RABAdmittedItemIEs_tags_445[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABAdmittedItemIEs_445, 3, /* Elements count */ &asn_SPC_S1AP_E_RABAdmittedItemIEs_specs_445 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_452[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedtoSetupItemHOReqAckIEs__value, choice.E_RABFailedToSetupItemHOReqAck), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABFailedToSetupItemHOReqAck, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABFailedToSetupItemHOReqAck" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_452[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E-RABFailedToSetupItemHOReqAck */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_452 = { sizeof(struct S1AP_E_RABFailedtoSetupItemHOReqAckIEs__value), offsetof(struct S1AP_E_RABFailedtoSetupItemHOReqAckIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABFailedtoSetupItemHOReqAckIEs__value, present), sizeof(((struct S1AP_E_RABFailedtoSetupItemHOReqAckIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_452, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_452 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_452, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_452 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABFailedtoSetupItemHOReqAckIEs_449[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedtoSetupItemHOReqAckIEs, id), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_450, &asn_PER_memb_S1AP_id_constr_450, memb_S1AP_id_constraint_449 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedtoSetupItemHOReqAckIEs, criticality), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_Criticality, select_E_RABFailedtoSetupItemHOReqAckIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_451, &asn_PER_memb_S1AP_criticality_constr_451, memb_S1AP_criticality_constraint_449 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedtoSetupItemHOReqAckIEs, value), -1 /* Ambiguous tag (ANY?) */, 0, &asn_DEF_S1AP_value_452, select_E_RABFailedtoSetupItemHOReqAckIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_452, &asn_PER_memb_S1AP_value_constr_452, memb_S1AP_value_constraint_449 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABFailedtoSetupItemHOReqAckIEs_tags_449[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABFailedtoSetupItemHOReqAckIEs_tag2el_449[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABFailedtoSetupItemHOReqAckIEs_specs_449 = { sizeof(struct S1AP_E_RABFailedtoSetupItemHOReqAckIEs), offsetof(struct S1AP_E_RABFailedtoSetupItemHOReqAckIEs, _asn_ctx), asn_MAP_S1AP_E_RABFailedtoSetupItemHOReqAckIEs_tag2el_449, 2, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedtoSetupItemHOReqAckIEs = { "E-RABFailedtoSetupItemHOReqAckIEs", "E-RABFailedtoSetupItemHOReqAckIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABFailedtoSetupItemHOReqAckIEs_tags_449, sizeof(asn_DEF_S1AP_E_RABFailedtoSetupItemHOReqAckIEs_tags_449) /sizeof(asn_DEF_S1AP_E_RABFailedtoSetupItemHOReqAckIEs_tags_449[0]), /* 1 */ asn_DEF_S1AP_E_RABFailedtoSetupItemHOReqAckIEs_tags_449, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABFailedtoSetupItemHOReqAckIEs_tags_449) /sizeof(asn_DEF_S1AP_E_RABFailedtoSetupItemHOReqAckIEs_tags_449[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABFailedtoSetupItemHOReqAckIEs_449, 3, /* Elements count */ &asn_SPC_S1AP_E_RABFailedtoSetupItemHOReqAckIEs_specs_449 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_456[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSwitchedDLItemIEs__value, choice.E_RABToBeSwitchedDLItem), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABToBeSwitchedDLItem, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABToBeSwitchedDLItem" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_456[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E-RABToBeSwitchedDLItem */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_456 = { sizeof(struct S1AP_E_RABToBeSwitchedDLItemIEs__value), offsetof(struct S1AP_E_RABToBeSwitchedDLItemIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABToBeSwitchedDLItemIEs__value, present), sizeof(((struct S1AP_E_RABToBeSwitchedDLItemIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_456, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_456 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_456, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_456 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSwitchedDLItemIEs_453[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSwitchedDLItemIEs, id), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_454, &asn_PER_memb_S1AP_id_constr_454, memb_S1AP_id_constraint_453 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSwitchedDLItemIEs, criticality), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_Criticality, select_E_RABToBeSwitchedDLItemIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_455, &asn_PER_memb_S1AP_criticality_constr_455, memb_S1AP_criticality_constraint_453 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSwitchedDLItemIEs, value), -1 /* Ambiguous tag (ANY?) */, 0, &asn_DEF_S1AP_value_456, select_E_RABToBeSwitchedDLItemIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_456, &asn_PER_memb_S1AP_value_constr_456, memb_S1AP_value_constraint_453 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeSwitchedDLItemIEs_tags_453[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABToBeSwitchedDLItemIEs_tag2el_453[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSwitchedDLItemIEs_specs_453 = { sizeof(struct S1AP_E_RABToBeSwitchedDLItemIEs), offsetof(struct S1AP_E_RABToBeSwitchedDLItemIEs, _asn_ctx), asn_MAP_S1AP_E_RABToBeSwitchedDLItemIEs_tag2el_453, 2, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSwitchedDLItemIEs = { "E-RABToBeSwitchedDLItemIEs", "E-RABToBeSwitchedDLItemIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABToBeSwitchedDLItemIEs_tags_453, sizeof(asn_DEF_S1AP_E_RABToBeSwitchedDLItemIEs_tags_453) /sizeof(asn_DEF_S1AP_E_RABToBeSwitchedDLItemIEs_tags_453[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeSwitchedDLItemIEs_tags_453, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeSwitchedDLItemIEs_tags_453) /sizeof(asn_DEF_S1AP_E_RABToBeSwitchedDLItemIEs_tags_453[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeSwitchedDLItemIEs_453, 3, /* Elements count */ &asn_SPC_S1AP_E_RABToBeSwitchedDLItemIEs_specs_453 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_460[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSwitchedULItemIEs__value, choice.E_RABToBeSwitchedULItem), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABToBeSwitchedULItem, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABToBeSwitchedULItem" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_460[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E-RABToBeSwitchedULItem */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_460 = { sizeof(struct S1AP_E_RABToBeSwitchedULItemIEs__value), offsetof(struct S1AP_E_RABToBeSwitchedULItemIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABToBeSwitchedULItemIEs__value, present), sizeof(((struct S1AP_E_RABToBeSwitchedULItemIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_460, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_460 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_460, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_460 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSwitchedULItemIEs_457[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSwitchedULItemIEs, id), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_458, &asn_PER_memb_S1AP_id_constr_458, memb_S1AP_id_constraint_457 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSwitchedULItemIEs, criticality), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_Criticality, select_E_RABToBeSwitchedULItemIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_459, &asn_PER_memb_S1AP_criticality_constr_459, memb_S1AP_criticality_constraint_457 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeSwitchedULItemIEs, value), -1 /* Ambiguous tag (ANY?) */, 0, &asn_DEF_S1AP_value_460, select_E_RABToBeSwitchedULItemIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_460, &asn_PER_memb_S1AP_value_constr_460, memb_S1AP_value_constraint_457 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeSwitchedULItemIEs_tags_457[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABToBeSwitchedULItemIEs_tag2el_457[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSwitchedULItemIEs_specs_457 = { sizeof(struct S1AP_E_RABToBeSwitchedULItemIEs), offsetof(struct S1AP_E_RABToBeSwitchedULItemIEs, _asn_ctx), asn_MAP_S1AP_E_RABToBeSwitchedULItemIEs_tag2el_457, 2, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSwitchedULItemIEs = { "E-RABToBeSwitchedULItemIEs", "E-RABToBeSwitchedULItemIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABToBeSwitchedULItemIEs_tags_457, sizeof(asn_DEF_S1AP_E_RABToBeSwitchedULItemIEs_tags_457) /sizeof(asn_DEF_S1AP_E_RABToBeSwitchedULItemIEs_tags_457[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeSwitchedULItemIEs_tags_457, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeSwitchedULItemIEs_tags_457) /sizeof(asn_DEF_S1AP_E_RABToBeSwitchedULItemIEs_tags_457[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeSwitchedULItemIEs_457, 3, /* Elements count */ &asn_SPC_S1AP_E_RABToBeSwitchedULItemIEs_specs_457 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_464[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeModifiedItemBearerModIndIEs__value, choice.E_RABToBeModifiedItemBearerModInd), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABToBeModifiedItemBearerModInd, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABToBeModifiedItemBearerModInd" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_464[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E-RABToBeModifiedItemBearerModInd */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_464 = { sizeof(struct S1AP_E_RABToBeModifiedItemBearerModIndIEs__value), offsetof(struct S1AP_E_RABToBeModifiedItemBearerModIndIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABToBeModifiedItemBearerModIndIEs__value, present), sizeof(((struct S1AP_E_RABToBeModifiedItemBearerModIndIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_464, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_464 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_464, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_464 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeModifiedItemBearerModIndIEs_461[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeModifiedItemBearerModIndIEs, id), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_462, &asn_PER_memb_S1AP_id_constr_462, memb_S1AP_id_constraint_461 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeModifiedItemBearerModIndIEs, criticality), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_Criticality, select_E_RABToBeModifiedItemBearerModIndIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_463, &asn_PER_memb_S1AP_criticality_constr_463, memb_S1AP_criticality_constraint_461 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABToBeModifiedItemBearerModIndIEs, value), -1 /* Ambiguous tag (ANY?) */, 0, &asn_DEF_S1AP_value_464, select_E_RABToBeModifiedItemBearerModIndIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_464, &asn_PER_memb_S1AP_value_constr_464, memb_S1AP_value_constraint_461 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABToBeModifiedItemBearerModIndIEs_tags_461[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABToBeModifiedItemBearerModIndIEs_tag2el_461[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeModifiedItemBearerModIndIEs_specs_461 = { sizeof(struct S1AP_E_RABToBeModifiedItemBearerModIndIEs), offsetof(struct S1AP_E_RABToBeModifiedItemBearerModIndIEs, _asn_ctx), asn_MAP_S1AP_E_RABToBeModifiedItemBearerModIndIEs_tag2el_461, 2, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeModifiedItemBearerModIndIEs = { "E-RABToBeModifiedItemBearerModIndIEs", "E-RABToBeModifiedItemBearerModIndIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABToBeModifiedItemBearerModIndIEs_tags_461, sizeof(asn_DEF_S1AP_E_RABToBeModifiedItemBearerModIndIEs_tags_461) /sizeof(asn_DEF_S1AP_E_RABToBeModifiedItemBearerModIndIEs_tags_461[0]), /* 1 */ asn_DEF_S1AP_E_RABToBeModifiedItemBearerModIndIEs_tags_461, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABToBeModifiedItemBearerModIndIEs_tags_461) /sizeof(asn_DEF_S1AP_E_RABToBeModifiedItemBearerModIndIEs_tags_461[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeModifiedItemBearerModIndIEs_461, 3, /* Elements count */ &asn_SPC_S1AP_E_RABToBeModifiedItemBearerModIndIEs_specs_461 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_468[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABNotToBeModifiedItemBearerModIndIEs__value, choice.E_RABNotToBeModifiedItemBearerModInd), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModInd, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABNotToBeModifiedItemBearerModInd" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_468[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E-RABNotToBeModifiedItemBearerModInd */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_468 = { sizeof(struct S1AP_E_RABNotToBeModifiedItemBearerModIndIEs__value), offsetof(struct S1AP_E_RABNotToBeModifiedItemBearerModIndIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABNotToBeModifiedItemBearerModIndIEs__value, present), sizeof(((struct S1AP_E_RABNotToBeModifiedItemBearerModIndIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_468, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_468 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_468, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_468 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_465[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABNotToBeModifiedItemBearerModIndIEs, id), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_466, &asn_PER_memb_S1AP_id_constr_466, memb_S1AP_id_constraint_465 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABNotToBeModifiedItemBearerModIndIEs, criticality), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_Criticality, select_E_RABNotToBeModifiedItemBearerModIndIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_467, &asn_PER_memb_S1AP_criticality_constr_467, memb_S1AP_criticality_constraint_465 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABNotToBeModifiedItemBearerModIndIEs, value), -1 /* Ambiguous tag (ANY?) */, 0, &asn_DEF_S1AP_value_468, select_E_RABNotToBeModifiedItemBearerModIndIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_468, &asn_PER_memb_S1AP_value_constr_468, memb_S1AP_value_constraint_465 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_tags_465[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_tag2el_465[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_specs_465 = { sizeof(struct S1AP_E_RABNotToBeModifiedItemBearerModIndIEs), offsetof(struct S1AP_E_RABNotToBeModifiedItemBearerModIndIEs, _asn_ctx), asn_MAP_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_tag2el_465, 2, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs = { "E-RABNotToBeModifiedItemBearerModIndIEs", "E-RABNotToBeModifiedItemBearerModIndIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_tags_465, sizeof(asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_tags_465) /sizeof(asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_tags_465[0]), /* 1 */ asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_tags_465, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_tags_465) /sizeof(asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_tags_465[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_465, 3, /* Elements count */ &asn_SPC_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_specs_465 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_472[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedToResumeItemResumeReqIEs__value, choice.E_RABFailedToResumeItemResumeReq), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABFailedToResumeItemResumeReq, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABFailedToResumeItemResumeReq" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_472[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E-RABFailedToResumeItemResumeReq */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_472 = { sizeof(struct S1AP_E_RABFailedToResumeItemResumeReqIEs__value), offsetof(struct S1AP_E_RABFailedToResumeItemResumeReqIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABFailedToResumeItemResumeReqIEs__value, present), sizeof(((struct S1AP_E_RABFailedToResumeItemResumeReqIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_472, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_472 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_472, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_472 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABFailedToResumeItemResumeReqIEs_469[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedToResumeItemResumeReqIEs, id), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_470, &asn_PER_memb_S1AP_id_constr_470, memb_S1AP_id_constraint_469 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedToResumeItemResumeReqIEs, criticality), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_Criticality, select_E_RABFailedToResumeItemResumeReqIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_471, &asn_PER_memb_S1AP_criticality_constr_471, memb_S1AP_criticality_constraint_469 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedToResumeItemResumeReqIEs, value), -1 /* Ambiguous tag (ANY?) */, 0, &asn_DEF_S1AP_value_472, select_E_RABFailedToResumeItemResumeReqIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_472, &asn_PER_memb_S1AP_value_constr_472, memb_S1AP_value_constraint_469 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABFailedToResumeItemResumeReqIEs_tags_469[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABFailedToResumeItemResumeReqIEs_tag2el_469[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABFailedToResumeItemResumeReqIEs_specs_469 = { sizeof(struct S1AP_E_RABFailedToResumeItemResumeReqIEs), offsetof(struct S1AP_E_RABFailedToResumeItemResumeReqIEs, _asn_ctx), asn_MAP_S1AP_E_RABFailedToResumeItemResumeReqIEs_tag2el_469, 2, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedToResumeItemResumeReqIEs = { "E-RABFailedToResumeItemResumeReqIEs", "E-RABFailedToResumeItemResumeReqIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABFailedToResumeItemResumeReqIEs_tags_469, sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeReqIEs_tags_469) /sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeReqIEs_tags_469[0]), /* 1 */ asn_DEF_S1AP_E_RABFailedToResumeItemResumeReqIEs_tags_469, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeReqIEs_tags_469) /sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeReqIEs_tags_469[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABFailedToResumeItemResumeReqIEs_469, 3, /* Elements count */ &asn_SPC_S1AP_E_RABFailedToResumeItemResumeReqIEs_specs_469 /* Additional specs */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_476[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedToResumeItemResumeResIEs__value, choice.E_RABFailedToResumeItemResumeRes), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABFailedToResumeItemResumeRes, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABFailedToResumeItemResumeRes" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_476[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 0 } /* E-RABFailedToResumeItemResumeRes */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_476 = { sizeof(struct S1AP_E_RABFailedToResumeItemResumeResIEs__value), offsetof(struct S1AP_E_RABFailedToResumeItemResumeResIEs__value, _asn_ctx), offsetof(struct S1AP_E_RABFailedToResumeItemResumeResIEs__value, present), sizeof(((struct S1AP_E_RABFailedToResumeItemResumeResIEs__value *)0)->present), asn_MAP_S1AP_value_tag2el_476, 1, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_476 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_476, 1, /* Elements count */ &asn_SPC_S1AP_value_specs_476 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_E_RABFailedToResumeItemResumeResIEs_473[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedToResumeItemResumeResIEs, id), (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_ID, 0, { &asn_OER_memb_S1AP_id_constr_474, &asn_PER_memb_S1AP_id_constr_474, memb_S1AP_id_constraint_473 }, 0, 0, /* No default value */ "id" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedToResumeItemResumeResIEs, criticality), (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 0, &asn_DEF_S1AP_Criticality, select_E_RABFailedToResumeItemResumeResIEs_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_475, &asn_PER_memb_S1AP_criticality_constr_475, memb_S1AP_criticality_constraint_473 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_E_RABFailedToResumeItemResumeResIEs, value), -1 /* Ambiguous tag (ANY?) */, 0, &asn_DEF_S1AP_value_476, select_E_RABFailedToResumeItemResumeResIEs_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_476, &asn_PER_memb_S1AP_value_constr_476, memb_S1AP_value_constraint_473 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_E_RABFailedToResumeItemResumeResIEs_tags_473[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_E_RABFailedToResumeItemResumeResIEs_tag2el_473[] = { { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)), 0, 0, 0 }, /* id */ { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)), 1, 0, 0 } /* criticality */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABFailedToResumeItemResumeResIEs_specs_473 = { sizeof(struct S1AP_E_RABFailedToResumeItemResumeResIEs), offsetof(struct S1AP_E_RABFailedToResumeItemResumeResIEs, _asn_ctx), asn_MAP_S1AP_E_RABFailedToResumeItemResumeResIEs_tag2el_473, 2, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedToResumeItemResumeResIEs = { "E-RABFailedToResumeItemResumeResIEs", "E-RABFailedToResumeItemResumeResIEs", &asn_OP_SEQUENCE, asn_DEF_S1AP_E_RABFailedToResumeItemResumeResIEs_tags_473, sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeResIEs_tags_473) /sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeResIEs_tags_473[0]), /* 1 */ asn_DEF_S1AP_E_RABFailedToResumeItemResumeResIEs_tags_473, /* Same as above */ sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeResIEs_tags_473) /sizeof(asn_DEF_S1AP_E_RABFailedToResumeItemResumeResIEs_tags_473[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABFailedToResumeItemResumeResIEs_473, 3, /* Elements count */ &asn_SPC_S1AP_E_RABFailedToResumeItemResumeResIEs_specs_473 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProtocolIE-Field.h000066400000000000000000005125431333553357400217020ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-Containers" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ProtocolIE_Field_H_ #define _S1AP_ProtocolIE_Field_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-ID.h" #include "S1AP_Criticality.h" #include #include #include "S1AP_E-RABToBeSetupItemBearerSUReq.h" #include "S1AP_Presence.h" #include #include #include #include "S1AP_E-RABSetupItemBearerSURes.h" #include "S1AP_E-RABToBeModifiedItemBearerModReq.h" #include "S1AP_E-RABModifyItemBearerModRes.h" #include "S1AP_E-RABReleaseItemBearerRelComp.h" #include "S1AP_E-RABToBeSetupItemCtxtSUReq.h" #include "S1AP_E-RABSetupItemCtxtSURes.h" #include "S1AP_TAIItem.h" #include "S1AP_UE-associatedLogicalS1-ConnectionItem.h" #include "S1AP_E-RABModifyItemBearerModConf.h" #include "S1AP_Bearers-SubjectToStatusTransfer-Item.h" #include "S1AP_E-RABInformationListItem.h" #include "S1AP_E-RABItem.h" #include "S1AP_LoggedMBSFNMDT.h" #include "S1AP_RecommendedCellItem.h" #include "S1AP_RecommendedENBItem.h" #include "S1AP_SONInformationReport.h" #include "S1AP_MME-UE-S1AP-ID.h" #include "S1AP_ENB-UE-S1AP-ID.h" #include "S1AP_HandoverType.h" #include "S1AP_Cause.h" #include "S1AP_TargetID.h" #include "S1AP_Direct-Forwarding-Path-Availability.h" #include "S1AP_SRVCCHOIndication.h" #include "S1AP_Source-ToTarget-TransparentContainer.h" #include "S1AP_MSClassmark2.h" #include "S1AP_MSClassmark3.h" #include "S1AP_CSG-Id.h" #include "S1AP_CellAccessMode.h" #include "S1AP_PS-ServiceNotAvailable.h" #include "S1AP_NASSecurityParametersfromE-UTRAN.h" #include "S1AP_E-RABSubjecttoDataForwardingList.h" #include "S1AP_E-RABList.h" #include "S1AP_Target-ToSource-TransparentContainer.h" #include "S1AP_CriticalityDiagnostics.h" #include "S1AP_UEAggregateMaximumBitrate.h" #include "S1AP_E-RABToBeSetupListHOReq.h" #include "S1AP_UESecurityCapabilities.h" #include "S1AP_HandoverRestrictionList.h" #include "S1AP_TraceActivation.h" #include "S1AP_RequestType.h" #include "S1AP_SRVCCOperationPossible.h" #include "S1AP_SecurityContext.h" #include "S1AP_NASSecurityParameterstoE-UTRAN.h" #include "S1AP_CSGMembershipStatus.h" #include "S1AP_GUMMEI.h" #include "S1AP_ManagementBasedMDTAllowed.h" #include "S1AP_MDTPLMNList.h" #include "S1AP_Masked-IMEISV.h" #include "S1AP_ExpectedUEBehaviour.h" #include "S1AP_ProSeAuthorized.h" #include "S1AP_UEUserPlaneCIoTSupportIndicator.h" #include "S1AP_V2XServicesAuthorized.h" #include "S1AP_UESidelinkAggregateMaximumBitrate.h" #include "S1AP_EnhancedCoverageRestricted.h" #include "S1AP_E-RABAdmittedList.h" #include "S1AP_E-RABFailedtoSetupListHOReqAck.h" #include "S1AP_CE-mode-B-SupportIndicator.h" #include "S1AP_EUTRAN-CGI.h" #include "S1AP_TAI.h" #include "S1AP_TunnelInformation.h" #include "S1AP_LHN-ID.h" #include "S1AP_E-RABToBeSwitchedDLList.h" #include "S1AP_RRC-Establishment-Cause.h" #include "S1AP_E-RABToBeSwitchedULList.h" #include "S1AP_E-RABToBeSetupListBearerSUReq.h" #include "S1AP_E-RABSetupListBearerSURes.h" #include "S1AP_E-RABToBeModifiedListBearerModReq.h" #include "S1AP_E-RABModifyListBearerModRes.h" #include "S1AP_NAS-PDU.h" #include "S1AP_E-RABReleaseListBearerRelComp.h" #include "S1AP_UserLocationInformation.h" #include "S1AP_E-RABToBeSetupListCtxtSUReq.h" #include "S1AP_SecurityKey.h" #include "S1AP_UERadioCapability.h" #include "S1AP_SubscriberProfileIDforRFP.h" #include "S1AP_CSFallbackIndicator.h" #include "S1AP_LAI.h" #include "S1AP_AdditionalCSFallbackIndicator.h" #include "S1AP_E-RABSetupListCtxtSURes.h" #include "S1AP_UEIdentityIndexValue.h" #include "S1AP_UEPagingID.h" #include "S1AP_PagingDRX.h" #include "S1AP_CNDomain.h" #include "S1AP_TAIList.h" #include "S1AP_CSG-IdList.h" #include "S1AP_PagingPriority.h" #include "S1AP_UERadioCapabilityForPaging.h" #include "S1AP_AssistanceDataForPaging.h" #include "S1AP_Paging-eDRXInformation.h" #include "S1AP_Extended-UEIdentityIndexValue.h" #include "S1AP_NB-IoT-Paging-eDRXInformation.h" #include "S1AP_NB-IoT-UEIdentityIndexValue.h" #include "S1AP_GWContextReleaseIndication.h" #include "S1AP_UE-S1AP-IDs.h" #include "S1AP_InformationOnRecommendedCellsAndENBsForPaging.h" #include "S1AP_CellIdentifierAndCELevelForCECapableUEs.h" #include "S1AP_SRVCCOperationNotPossible.h" #include "S1AP_VoiceSupportMatchIndicator.h" #include "S1AP_DLNASPDUDeliveryAckRequest.h" #include "S1AP_S-TMSI.h" #include "S1AP_TransportLayerAddress.h" #include "S1AP_RelayNode-Indicator.h" #include "S1AP_GUMMEIType.h" #include "S1AP_MME-Group-ID.h" #include "S1AP_UE-Usage-Type.h" #include "S1AP_DCN-ID.h" #include "S1AP_Coverage-Level.h" #include #include "S1AP_Additional-GUTI.h" #include "S1AP_ResetType.h" #include "S1AP_UE-associatedLogicalS1-ConnectionListResAck.h" #include "S1AP_Global-ENB-ID.h" #include "S1AP_ENBname.h" #include "S1AP_SupportedTAs.h" #include "S1AP_UE-RetentionInformation.h" #include "S1AP_NB-IoT-DefaultPagingDRX.h" #include "S1AP_MMEname.h" #include "S1AP_ServedGUMMEIs.h" #include "S1AP_RelativeMMECapacity.h" #include "S1AP_MMERelaySupportIndicator.h" #include "S1AP_ServedDCNs.h" #include "S1AP_TimeToWait.h" #include "S1AP_Cdma2000HOStatus.h" #include "S1AP_Cdma2000RATType.h" #include "S1AP_Cdma2000PDU.h" #include "S1AP_Cdma2000SectorID.h" #include "S1AP_Cdma2000HORequiredIndication.h" #include "S1AP_Cdma2000OneXSRVCCInfo.h" #include "S1AP_Cdma2000OneXRAND.h" #include "S1AP_EUTRANRoundTripDelayEstimationInfo.h" #include "S1AP_ENB-StatusTransfer-TransparentContainer.h" #include "S1AP_E-UTRAN-Trace-ID.h" #include "S1AP_PrivacyIndicator.h" #include "S1AP_OverloadResponse.h" #include "S1AP_GUMMEIList.h" #include "S1AP_TrafficLoadReductionIndication.h" #include "S1AP_MessageIdentifier.h" #include "S1AP_SerialNumber.h" #include "S1AP_WarningAreaList.h" #include "S1AP_RepetitionPeriod.h" #include "S1AP_ExtendedRepetitionPeriod.h" #include "S1AP_NumberofBroadcastRequest.h" #include "S1AP_WarningType.h" #include "S1AP_WarningSecurityInfo.h" #include "S1AP_DataCodingScheme.h" #include "S1AP_WarningMessageContents.h" #include "S1AP_ConcurrentWarningMessageIndicator.h" #include "S1AP_BroadcastCompletedAreaList.h" #include "S1AP_Inter-SystemInformationTransferType.h" #include "S1AP_SONConfigurationTransfer.h" #include "S1AP_KillAllWarningMessages.h" #include "S1AP_BroadcastCancelledAreaList.h" #include "S1AP_ECGIListForRestart.h" #include "S1AP_TAIListForRestart.h" #include "S1AP_EmergencyAreaIDListForRestart.h" #include "S1AP_PWSfailedECGIList.h" #include "S1AP_Routing-ID.h" #include "S1AP_LPPa-PDU.h" #include "S1AP_E-RABToBeModifiedListBearerModInd.h" #include "S1AP_E-RABNotToBeModifiedListBearerModInd.h" #include "S1AP_CSGMembershipInfo.h" #include "S1AP_E-RABModifyListBearerModConf.h" #include "S1AP_E-RABFailedToResumeListResumeReq.h" #include "S1AP_E-RABFailedToResumeListResumeRes.h" #include "S1AP_DL-CP-SecurityInformation.h" #include "S1AP_E-RABLevelQoSParameters.h" #include "S1AP_UL-CP-SecurityInformation.h" #include "S1AP_E-RABDataForwardingItem.h" #include "S1AP_E-RABToBeSetupItemHOReq.h" #include "S1AP_E-RABAdmittedItem.h" #include "S1AP_E-RABFailedToSetupItemHOReqAck.h" #include "S1AP_E-RABToBeSwitchedDLItem.h" #include "S1AP_E-RABToBeSwitchedULItem.h" #include "S1AP_E-RABToBeModifiedItemBearerModInd.h" #include "S1AP_E-RABNotToBeModifiedItemBearerModInd.h" #include "S1AP_E-RABFailedToResumeItemResumeReq.h" #include "S1AP_E-RABFailedToResumeItemResumeRes.h" #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_E_RABToBeSetupItemBearerSUReqIEs__value_PR { S1AP_E_RABToBeSetupItemBearerSUReqIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABToBeSetupItemBearerSUReqIEs__value_PR_E_RABToBeSetupItemBearerSUReq } S1AP_E_RABToBeSetupItemBearerSUReqIEs__value_PR; typedef enum S1AP_E_RABSetupItemBearerSUResIEs__value_PR { S1AP_E_RABSetupItemBearerSUResIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABSetupItemBearerSUResIEs__value_PR_E_RABSetupItemBearerSURes } S1AP_E_RABSetupItemBearerSUResIEs__value_PR; typedef enum S1AP_E_RABToBeModifiedItemBearerModReqIEs__value_PR { S1AP_E_RABToBeModifiedItemBearerModReqIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABToBeModifiedItemBearerModReqIEs__value_PR_E_RABToBeModifiedItemBearerModReq } S1AP_E_RABToBeModifiedItemBearerModReqIEs__value_PR; typedef enum S1AP_E_RABModifyItemBearerModResIEs__value_PR { S1AP_E_RABModifyItemBearerModResIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABModifyItemBearerModResIEs__value_PR_E_RABModifyItemBearerModRes } S1AP_E_RABModifyItemBearerModResIEs__value_PR; typedef enum S1AP_E_RABReleaseItemBearerRelCompIEs__value_PR { S1AP_E_RABReleaseItemBearerRelCompIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABReleaseItemBearerRelCompIEs__value_PR_E_RABReleaseItemBearerRelComp } S1AP_E_RABReleaseItemBearerRelCompIEs__value_PR; typedef enum S1AP_E_RABToBeSetupItemCtxtSUReqIEs__value_PR { S1AP_E_RABToBeSetupItemCtxtSUReqIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABToBeSetupItemCtxtSUReqIEs__value_PR_E_RABToBeSetupItemCtxtSUReq } S1AP_E_RABToBeSetupItemCtxtSUReqIEs__value_PR; typedef enum S1AP_E_RABSetupItemCtxtSUResIEs__value_PR { S1AP_E_RABSetupItemCtxtSUResIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABSetupItemCtxtSUResIEs__value_PR_E_RABSetupItemCtxtSURes } S1AP_E_RABSetupItemCtxtSUResIEs__value_PR; typedef enum S1AP_TAIItemIEs__value_PR { S1AP_TAIItemIEs__value_PR_NOTHING, /* No components present */ S1AP_TAIItemIEs__value_PR_TAIItem } S1AP_TAIItemIEs__value_PR; typedef enum S1AP_UE_associatedLogicalS1_ConnectionItemRes__value_PR { S1AP_UE_associatedLogicalS1_ConnectionItemRes__value_PR_NOTHING, /* No components present */ S1AP_UE_associatedLogicalS1_ConnectionItemRes__value_PR_UE_associatedLogicalS1_ConnectionItem } S1AP_UE_associatedLogicalS1_ConnectionItemRes__value_PR; typedef enum S1AP_UE_associatedLogicalS1_ConnectionItemResAck__value_PR { S1AP_UE_associatedLogicalS1_ConnectionItemResAck__value_PR_NOTHING, /* No components present */ S1AP_UE_associatedLogicalS1_ConnectionItemResAck__value_PR_UE_associatedLogicalS1_ConnectionItem } S1AP_UE_associatedLogicalS1_ConnectionItemResAck__value_PR; typedef enum S1AP_E_RABModifyItemBearerModConfIEs__value_PR { S1AP_E_RABModifyItemBearerModConfIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABModifyItemBearerModConfIEs__value_PR_E_RABModifyItemBearerModConf } S1AP_E_RABModifyItemBearerModConfIEs__value_PR; typedef enum S1AP_Bearers_SubjectToStatusTransfer_ItemIEs__value_PR { S1AP_Bearers_SubjectToStatusTransfer_ItemIEs__value_PR_NOTHING, /* No components present */ S1AP_Bearers_SubjectToStatusTransfer_ItemIEs__value_PR_Bearers_SubjectToStatusTransfer_Item } S1AP_Bearers_SubjectToStatusTransfer_ItemIEs__value_PR; typedef enum S1AP_E_RABInformationListIEs__value_PR { S1AP_E_RABInformationListIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABInformationListIEs__value_PR_E_RABInformationListItem } S1AP_E_RABInformationListIEs__value_PR; typedef enum S1AP_E_RABItemIEs__value_PR { S1AP_E_RABItemIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABItemIEs__value_PR_E_RABItem } S1AP_E_RABItemIEs__value_PR; typedef enum S1AP_MDTMode_ExtensionIE__value_PR { S1AP_MDTMode_ExtensionIE__value_PR_NOTHING, /* No components present */ S1AP_MDTMode_ExtensionIE__value_PR_LoggedMBSFNMDT } S1AP_MDTMode_ExtensionIE__value_PR; typedef enum S1AP_RecommendedCellItemIEs__value_PR { S1AP_RecommendedCellItemIEs__value_PR_NOTHING, /* No components present */ S1AP_RecommendedCellItemIEs__value_PR_RecommendedCellItem } S1AP_RecommendedCellItemIEs__value_PR; typedef enum S1AP_RecommendedENBItemIEs__value_PR { S1AP_RecommendedENBItemIEs__value_PR_NOTHING, /* No components present */ S1AP_RecommendedENBItemIEs__value_PR_RecommendedENBItem } S1AP_RecommendedENBItemIEs__value_PR; typedef enum S1AP_SONInformation_ExtensionIE__value_PR { S1AP_SONInformation_ExtensionIE__value_PR_NOTHING, /* No components present */ S1AP_SONInformation_ExtensionIE__value_PR_SONInformationReport } S1AP_SONInformation_ExtensionIE__value_PR; typedef enum S1AP_HandoverRequiredIEs__value_PR { S1AP_HandoverRequiredIEs__value_PR_NOTHING, /* No components present */ S1AP_HandoverRequiredIEs__value_PR_MME_UE_S1AP_ID, S1AP_HandoverRequiredIEs__value_PR_ENB_UE_S1AP_ID, S1AP_HandoverRequiredIEs__value_PR_HandoverType, S1AP_HandoverRequiredIEs__value_PR_Cause, S1AP_HandoverRequiredIEs__value_PR_TargetID, S1AP_HandoverRequiredIEs__value_PR_Direct_Forwarding_Path_Availability, S1AP_HandoverRequiredIEs__value_PR_SRVCCHOIndication, S1AP_HandoverRequiredIEs__value_PR_Source_ToTarget_TransparentContainer, S1AP_HandoverRequiredIEs__value_PR_MSClassmark2, S1AP_HandoverRequiredIEs__value_PR_MSClassmark3, S1AP_HandoverRequiredIEs__value_PR_CSG_Id, S1AP_HandoverRequiredIEs__value_PR_CellAccessMode, S1AP_HandoverRequiredIEs__value_PR_PS_ServiceNotAvailable } S1AP_HandoverRequiredIEs__value_PR; typedef enum S1AP_HandoverCommandIEs__value_PR { S1AP_HandoverCommandIEs__value_PR_NOTHING, /* No components present */ S1AP_HandoverCommandIEs__value_PR_MME_UE_S1AP_ID, S1AP_HandoverCommandIEs__value_PR_ENB_UE_S1AP_ID, S1AP_HandoverCommandIEs__value_PR_HandoverType, S1AP_HandoverCommandIEs__value_PR_NASSecurityParametersfromE_UTRAN, S1AP_HandoverCommandIEs__value_PR_E_RABSubjecttoDataForwardingList, S1AP_HandoverCommandIEs__value_PR_E_RABList, S1AP_HandoverCommandIEs__value_PR_Target_ToSource_TransparentContainer, S1AP_HandoverCommandIEs__value_PR_CriticalityDiagnostics } S1AP_HandoverCommandIEs__value_PR; typedef enum S1AP_HandoverPreparationFailureIEs__value_PR { S1AP_HandoverPreparationFailureIEs__value_PR_NOTHING, /* No components present */ S1AP_HandoverPreparationFailureIEs__value_PR_MME_UE_S1AP_ID, S1AP_HandoverPreparationFailureIEs__value_PR_ENB_UE_S1AP_ID, S1AP_HandoverPreparationFailureIEs__value_PR_Cause, S1AP_HandoverPreparationFailureIEs__value_PR_CriticalityDiagnostics } S1AP_HandoverPreparationFailureIEs__value_PR; typedef enum S1AP_HandoverRequestIEs__value_PR { S1AP_HandoverRequestIEs__value_PR_NOTHING, /* No components present */ S1AP_HandoverRequestIEs__value_PR_MME_UE_S1AP_ID, S1AP_HandoverRequestIEs__value_PR_HandoverType, S1AP_HandoverRequestIEs__value_PR_Cause, S1AP_HandoverRequestIEs__value_PR_UEAggregateMaximumBitrate, S1AP_HandoverRequestIEs__value_PR_E_RABToBeSetupListHOReq, S1AP_HandoverRequestIEs__value_PR_Source_ToTarget_TransparentContainer, S1AP_HandoverRequestIEs__value_PR_UESecurityCapabilities, S1AP_HandoverRequestIEs__value_PR_HandoverRestrictionList, S1AP_HandoverRequestIEs__value_PR_TraceActivation, S1AP_HandoverRequestIEs__value_PR_RequestType, S1AP_HandoverRequestIEs__value_PR_SRVCCOperationPossible, S1AP_HandoverRequestIEs__value_PR_SecurityContext, S1AP_HandoverRequestIEs__value_PR_NASSecurityParameterstoE_UTRAN, S1AP_HandoverRequestIEs__value_PR_CSG_Id, S1AP_HandoverRequestIEs__value_PR_CSGMembershipStatus, S1AP_HandoverRequestIEs__value_PR_GUMMEI, S1AP_HandoverRequestIEs__value_PR_ManagementBasedMDTAllowed, S1AP_HandoverRequestIEs__value_PR_MDTPLMNList, S1AP_HandoverRequestIEs__value_PR_Masked_IMEISV, S1AP_HandoverRequestIEs__value_PR_ExpectedUEBehaviour, S1AP_HandoverRequestIEs__value_PR_ProSeAuthorized, S1AP_HandoverRequestIEs__value_PR_UEUserPlaneCIoTSupportIndicator, S1AP_HandoverRequestIEs__value_PR_V2XServicesAuthorized, S1AP_HandoverRequestIEs__value_PR_UESidelinkAggregateMaximumBitrate, S1AP_HandoverRequestIEs__value_PR_EnhancedCoverageRestricted } S1AP_HandoverRequestIEs__value_PR; typedef enum S1AP_HandoverRequestAcknowledgeIEs__value_PR { S1AP_HandoverRequestAcknowledgeIEs__value_PR_NOTHING, /* No components present */ S1AP_HandoverRequestAcknowledgeIEs__value_PR_MME_UE_S1AP_ID, S1AP_HandoverRequestAcknowledgeIEs__value_PR_ENB_UE_S1AP_ID, S1AP_HandoverRequestAcknowledgeIEs__value_PR_E_RABAdmittedList, S1AP_HandoverRequestAcknowledgeIEs__value_PR_E_RABFailedtoSetupListHOReqAck, S1AP_HandoverRequestAcknowledgeIEs__value_PR_Target_ToSource_TransparentContainer, S1AP_HandoverRequestAcknowledgeIEs__value_PR_CSG_Id, S1AP_HandoverRequestAcknowledgeIEs__value_PR_CriticalityDiagnostics, S1AP_HandoverRequestAcknowledgeIEs__value_PR_CellAccessMode, S1AP_HandoverRequestAcknowledgeIEs__value_PR_CE_mode_B_SupportIndicator } S1AP_HandoverRequestAcknowledgeIEs__value_PR; typedef enum S1AP_HandoverFailureIEs__value_PR { S1AP_HandoverFailureIEs__value_PR_NOTHING, /* No components present */ S1AP_HandoverFailureIEs__value_PR_MME_UE_S1AP_ID, S1AP_HandoverFailureIEs__value_PR_Cause, S1AP_HandoverFailureIEs__value_PR_CriticalityDiagnostics } S1AP_HandoverFailureIEs__value_PR; typedef enum S1AP_HandoverNotifyIEs__value_PR { S1AP_HandoverNotifyIEs__value_PR_NOTHING, /* No components present */ S1AP_HandoverNotifyIEs__value_PR_MME_UE_S1AP_ID, S1AP_HandoverNotifyIEs__value_PR_ENB_UE_S1AP_ID, S1AP_HandoverNotifyIEs__value_PR_EUTRAN_CGI, S1AP_HandoverNotifyIEs__value_PR_TAI, S1AP_HandoverNotifyIEs__value_PR_TunnelInformation, S1AP_HandoverNotifyIEs__value_PR_LHN_ID } S1AP_HandoverNotifyIEs__value_PR; typedef enum S1AP_PathSwitchRequestIEs__value_PR { S1AP_PathSwitchRequestIEs__value_PR_NOTHING, /* No components present */ S1AP_PathSwitchRequestIEs__value_PR_ENB_UE_S1AP_ID, S1AP_PathSwitchRequestIEs__value_PR_E_RABToBeSwitchedDLList, S1AP_PathSwitchRequestIEs__value_PR_MME_UE_S1AP_ID, S1AP_PathSwitchRequestIEs__value_PR_EUTRAN_CGI, S1AP_PathSwitchRequestIEs__value_PR_TAI, S1AP_PathSwitchRequestIEs__value_PR_UESecurityCapabilities, S1AP_PathSwitchRequestIEs__value_PR_CSG_Id, S1AP_PathSwitchRequestIEs__value_PR_CellAccessMode, S1AP_PathSwitchRequestIEs__value_PR_GUMMEI, S1AP_PathSwitchRequestIEs__value_PR_CSGMembershipStatus, S1AP_PathSwitchRequestIEs__value_PR_TunnelInformation, S1AP_PathSwitchRequestIEs__value_PR_LHN_ID, S1AP_PathSwitchRequestIEs__value_PR_RRC_Establishment_Cause } S1AP_PathSwitchRequestIEs__value_PR; typedef enum S1AP_PathSwitchRequestAcknowledgeIEs__value_PR { S1AP_PathSwitchRequestAcknowledgeIEs__value_PR_NOTHING, /* No components present */ S1AP_PathSwitchRequestAcknowledgeIEs__value_PR_MME_UE_S1AP_ID, S1AP_PathSwitchRequestAcknowledgeIEs__value_PR_ENB_UE_S1AP_ID, S1AP_PathSwitchRequestAcknowledgeIEs__value_PR_UEAggregateMaximumBitrate, S1AP_PathSwitchRequestAcknowledgeIEs__value_PR_E_RABToBeSwitchedULList, S1AP_PathSwitchRequestAcknowledgeIEs__value_PR_E_RABList, S1AP_PathSwitchRequestAcknowledgeIEs__value_PR_SecurityContext, S1AP_PathSwitchRequestAcknowledgeIEs__value_PR_CriticalityDiagnostics, S1AP_PathSwitchRequestAcknowledgeIEs__value_PR_CSGMembershipStatus, S1AP_PathSwitchRequestAcknowledgeIEs__value_PR_ProSeAuthorized, S1AP_PathSwitchRequestAcknowledgeIEs__value_PR_UEUserPlaneCIoTSupportIndicator, S1AP_PathSwitchRequestAcknowledgeIEs__value_PR_V2XServicesAuthorized, S1AP_PathSwitchRequestAcknowledgeIEs__value_PR_UESidelinkAggregateMaximumBitrate, S1AP_PathSwitchRequestAcknowledgeIEs__value_PR_EnhancedCoverageRestricted } S1AP_PathSwitchRequestAcknowledgeIEs__value_PR; typedef enum S1AP_PathSwitchRequestFailureIEs__value_PR { S1AP_PathSwitchRequestFailureIEs__value_PR_NOTHING, /* No components present */ S1AP_PathSwitchRequestFailureIEs__value_PR_MME_UE_S1AP_ID, S1AP_PathSwitchRequestFailureIEs__value_PR_ENB_UE_S1AP_ID, S1AP_PathSwitchRequestFailureIEs__value_PR_Cause, S1AP_PathSwitchRequestFailureIEs__value_PR_CriticalityDiagnostics } S1AP_PathSwitchRequestFailureIEs__value_PR; typedef enum S1AP_HandoverCancelIEs__value_PR { S1AP_HandoverCancelIEs__value_PR_NOTHING, /* No components present */ S1AP_HandoverCancelIEs__value_PR_MME_UE_S1AP_ID, S1AP_HandoverCancelIEs__value_PR_ENB_UE_S1AP_ID, S1AP_HandoverCancelIEs__value_PR_Cause } S1AP_HandoverCancelIEs__value_PR; typedef enum S1AP_HandoverCancelAcknowledgeIEs__value_PR { S1AP_HandoverCancelAcknowledgeIEs__value_PR_NOTHING, /* No components present */ S1AP_HandoverCancelAcknowledgeIEs__value_PR_MME_UE_S1AP_ID, S1AP_HandoverCancelAcknowledgeIEs__value_PR_ENB_UE_S1AP_ID, S1AP_HandoverCancelAcknowledgeIEs__value_PR_CriticalityDiagnostics } S1AP_HandoverCancelAcknowledgeIEs__value_PR; typedef enum S1AP_E_RABSetupRequestIEs__value_PR { S1AP_E_RABSetupRequestIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABSetupRequestIEs__value_PR_MME_UE_S1AP_ID, S1AP_E_RABSetupRequestIEs__value_PR_ENB_UE_S1AP_ID, S1AP_E_RABSetupRequestIEs__value_PR_UEAggregateMaximumBitrate, S1AP_E_RABSetupRequestIEs__value_PR_E_RABToBeSetupListBearerSUReq } S1AP_E_RABSetupRequestIEs__value_PR; typedef enum S1AP_E_RABSetupResponseIEs__value_PR { S1AP_E_RABSetupResponseIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABSetupResponseIEs__value_PR_MME_UE_S1AP_ID, S1AP_E_RABSetupResponseIEs__value_PR_ENB_UE_S1AP_ID, S1AP_E_RABSetupResponseIEs__value_PR_E_RABSetupListBearerSURes, S1AP_E_RABSetupResponseIEs__value_PR_E_RABList, S1AP_E_RABSetupResponseIEs__value_PR_CriticalityDiagnostics } S1AP_E_RABSetupResponseIEs__value_PR; typedef enum S1AP_E_RABModifyRequestIEs__value_PR { S1AP_E_RABModifyRequestIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABModifyRequestIEs__value_PR_MME_UE_S1AP_ID, S1AP_E_RABModifyRequestIEs__value_PR_ENB_UE_S1AP_ID, S1AP_E_RABModifyRequestIEs__value_PR_UEAggregateMaximumBitrate, S1AP_E_RABModifyRequestIEs__value_PR_E_RABToBeModifiedListBearerModReq } S1AP_E_RABModifyRequestIEs__value_PR; typedef enum S1AP_E_RABModifyResponseIEs__value_PR { S1AP_E_RABModifyResponseIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABModifyResponseIEs__value_PR_MME_UE_S1AP_ID, S1AP_E_RABModifyResponseIEs__value_PR_ENB_UE_S1AP_ID, S1AP_E_RABModifyResponseIEs__value_PR_E_RABModifyListBearerModRes, S1AP_E_RABModifyResponseIEs__value_PR_E_RABList, S1AP_E_RABModifyResponseIEs__value_PR_CriticalityDiagnostics } S1AP_E_RABModifyResponseIEs__value_PR; typedef enum S1AP_E_RABReleaseCommandIEs__value_PR { S1AP_E_RABReleaseCommandIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABReleaseCommandIEs__value_PR_MME_UE_S1AP_ID, S1AP_E_RABReleaseCommandIEs__value_PR_ENB_UE_S1AP_ID, S1AP_E_RABReleaseCommandIEs__value_PR_UEAggregateMaximumBitrate, S1AP_E_RABReleaseCommandIEs__value_PR_E_RABList, S1AP_E_RABReleaseCommandIEs__value_PR_NAS_PDU } S1AP_E_RABReleaseCommandIEs__value_PR; typedef enum S1AP_E_RABReleaseResponseIEs__value_PR { S1AP_E_RABReleaseResponseIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABReleaseResponseIEs__value_PR_MME_UE_S1AP_ID, S1AP_E_RABReleaseResponseIEs__value_PR_ENB_UE_S1AP_ID, S1AP_E_RABReleaseResponseIEs__value_PR_E_RABReleaseListBearerRelComp, S1AP_E_RABReleaseResponseIEs__value_PR_E_RABList, S1AP_E_RABReleaseResponseIEs__value_PR_CriticalityDiagnostics, S1AP_E_RABReleaseResponseIEs__value_PR_UserLocationInformation } S1AP_E_RABReleaseResponseIEs__value_PR; typedef enum S1AP_E_RABReleaseIndicationIEs__value_PR { S1AP_E_RABReleaseIndicationIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABReleaseIndicationIEs__value_PR_MME_UE_S1AP_ID, S1AP_E_RABReleaseIndicationIEs__value_PR_ENB_UE_S1AP_ID, S1AP_E_RABReleaseIndicationIEs__value_PR_E_RABList, S1AP_E_RABReleaseIndicationIEs__value_PR_UserLocationInformation } S1AP_E_RABReleaseIndicationIEs__value_PR; typedef enum S1AP_InitialContextSetupRequestIEs__value_PR { S1AP_InitialContextSetupRequestIEs__value_PR_NOTHING, /* No components present */ S1AP_InitialContextSetupRequestIEs__value_PR_MME_UE_S1AP_ID, S1AP_InitialContextSetupRequestIEs__value_PR_ENB_UE_S1AP_ID, S1AP_InitialContextSetupRequestIEs__value_PR_UEAggregateMaximumBitrate, S1AP_InitialContextSetupRequestIEs__value_PR_E_RABToBeSetupListCtxtSUReq, S1AP_InitialContextSetupRequestIEs__value_PR_UESecurityCapabilities, S1AP_InitialContextSetupRequestIEs__value_PR_SecurityKey, S1AP_InitialContextSetupRequestIEs__value_PR_TraceActivation, S1AP_InitialContextSetupRequestIEs__value_PR_HandoverRestrictionList, S1AP_InitialContextSetupRequestIEs__value_PR_UERadioCapability, S1AP_InitialContextSetupRequestIEs__value_PR_SubscriberProfileIDforRFP, S1AP_InitialContextSetupRequestIEs__value_PR_CSFallbackIndicator, S1AP_InitialContextSetupRequestIEs__value_PR_SRVCCOperationPossible, S1AP_InitialContextSetupRequestIEs__value_PR_CSGMembershipStatus, S1AP_InitialContextSetupRequestIEs__value_PR_LAI, S1AP_InitialContextSetupRequestIEs__value_PR_GUMMEI, S1AP_InitialContextSetupRequestIEs__value_PR_ManagementBasedMDTAllowed, S1AP_InitialContextSetupRequestIEs__value_PR_MDTPLMNList, S1AP_InitialContextSetupRequestIEs__value_PR_AdditionalCSFallbackIndicator, S1AP_InitialContextSetupRequestIEs__value_PR_Masked_IMEISV, S1AP_InitialContextSetupRequestIEs__value_PR_ExpectedUEBehaviour, S1AP_InitialContextSetupRequestIEs__value_PR_ProSeAuthorized, S1AP_InitialContextSetupRequestIEs__value_PR_UEUserPlaneCIoTSupportIndicator, S1AP_InitialContextSetupRequestIEs__value_PR_V2XServicesAuthorized, S1AP_InitialContextSetupRequestIEs__value_PR_UESidelinkAggregateMaximumBitrate, S1AP_InitialContextSetupRequestIEs__value_PR_EnhancedCoverageRestricted } S1AP_InitialContextSetupRequestIEs__value_PR; typedef enum S1AP_InitialContextSetupResponseIEs__value_PR { S1AP_InitialContextSetupResponseIEs__value_PR_NOTHING, /* No components present */ S1AP_InitialContextSetupResponseIEs__value_PR_MME_UE_S1AP_ID, S1AP_InitialContextSetupResponseIEs__value_PR_ENB_UE_S1AP_ID, S1AP_InitialContextSetupResponseIEs__value_PR_E_RABSetupListCtxtSURes, S1AP_InitialContextSetupResponseIEs__value_PR_E_RABList, S1AP_InitialContextSetupResponseIEs__value_PR_CriticalityDiagnostics } S1AP_InitialContextSetupResponseIEs__value_PR; typedef enum S1AP_InitialContextSetupFailureIEs__value_PR { S1AP_InitialContextSetupFailureIEs__value_PR_NOTHING, /* No components present */ S1AP_InitialContextSetupFailureIEs__value_PR_MME_UE_S1AP_ID, S1AP_InitialContextSetupFailureIEs__value_PR_ENB_UE_S1AP_ID, S1AP_InitialContextSetupFailureIEs__value_PR_Cause, S1AP_InitialContextSetupFailureIEs__value_PR_CriticalityDiagnostics } S1AP_InitialContextSetupFailureIEs__value_PR; typedef enum S1AP_PagingIEs__value_PR { S1AP_PagingIEs__value_PR_NOTHING, /* No components present */ S1AP_PagingIEs__value_PR_UEIdentityIndexValue, S1AP_PagingIEs__value_PR_UEPagingID, S1AP_PagingIEs__value_PR_PagingDRX, S1AP_PagingIEs__value_PR_CNDomain, S1AP_PagingIEs__value_PR_TAIList, S1AP_PagingIEs__value_PR_CSG_IdList, S1AP_PagingIEs__value_PR_PagingPriority, S1AP_PagingIEs__value_PR_UERadioCapabilityForPaging, S1AP_PagingIEs__value_PR_AssistanceDataForPaging, S1AP_PagingIEs__value_PR_Paging_eDRXInformation, S1AP_PagingIEs__value_PR_Extended_UEIdentityIndexValue, S1AP_PagingIEs__value_PR_NB_IoT_Paging_eDRXInformation, S1AP_PagingIEs__value_PR_NB_IoT_UEIdentityIndexValue } S1AP_PagingIEs__value_PR; typedef enum S1AP_UEContextReleaseRequest_IEs__value_PR { S1AP_UEContextReleaseRequest_IEs__value_PR_NOTHING, /* No components present */ S1AP_UEContextReleaseRequest_IEs__value_PR_MME_UE_S1AP_ID, S1AP_UEContextReleaseRequest_IEs__value_PR_ENB_UE_S1AP_ID, S1AP_UEContextReleaseRequest_IEs__value_PR_Cause, S1AP_UEContextReleaseRequest_IEs__value_PR_GWContextReleaseIndication } S1AP_UEContextReleaseRequest_IEs__value_PR; typedef enum S1AP_UEContextReleaseCommand_IEs__value_PR { S1AP_UEContextReleaseCommand_IEs__value_PR_NOTHING, /* No components present */ S1AP_UEContextReleaseCommand_IEs__value_PR_UE_S1AP_IDs, S1AP_UEContextReleaseCommand_IEs__value_PR_Cause } S1AP_UEContextReleaseCommand_IEs__value_PR; typedef enum S1AP_UEContextReleaseComplete_IEs__value_PR { S1AP_UEContextReleaseComplete_IEs__value_PR_NOTHING, /* No components present */ S1AP_UEContextReleaseComplete_IEs__value_PR_MME_UE_S1AP_ID, S1AP_UEContextReleaseComplete_IEs__value_PR_ENB_UE_S1AP_ID, S1AP_UEContextReleaseComplete_IEs__value_PR_CriticalityDiagnostics, S1AP_UEContextReleaseComplete_IEs__value_PR_UserLocationInformation, S1AP_UEContextReleaseComplete_IEs__value_PR_InformationOnRecommendedCellsAndENBsForPaging, S1AP_UEContextReleaseComplete_IEs__value_PR_CellIdentifierAndCELevelForCECapableUEs } S1AP_UEContextReleaseComplete_IEs__value_PR; typedef enum S1AP_UEContextModificationRequestIEs__value_PR { S1AP_UEContextModificationRequestIEs__value_PR_NOTHING, /* No components present */ S1AP_UEContextModificationRequestIEs__value_PR_MME_UE_S1AP_ID, S1AP_UEContextModificationRequestIEs__value_PR_ENB_UE_S1AP_ID, S1AP_UEContextModificationRequestIEs__value_PR_SecurityKey, S1AP_UEContextModificationRequestIEs__value_PR_SubscriberProfileIDforRFP, S1AP_UEContextModificationRequestIEs__value_PR_UEAggregateMaximumBitrate, S1AP_UEContextModificationRequestIEs__value_PR_CSFallbackIndicator, S1AP_UEContextModificationRequestIEs__value_PR_UESecurityCapabilities, S1AP_UEContextModificationRequestIEs__value_PR_CSGMembershipStatus, S1AP_UEContextModificationRequestIEs__value_PR_LAI, S1AP_UEContextModificationRequestIEs__value_PR_AdditionalCSFallbackIndicator, S1AP_UEContextModificationRequestIEs__value_PR_ProSeAuthorized, S1AP_UEContextModificationRequestIEs__value_PR_SRVCCOperationPossible, S1AP_UEContextModificationRequestIEs__value_PR_SRVCCOperationNotPossible, S1AP_UEContextModificationRequestIEs__value_PR_V2XServicesAuthorized, S1AP_UEContextModificationRequestIEs__value_PR_UESidelinkAggregateMaximumBitrate } S1AP_UEContextModificationRequestIEs__value_PR; typedef enum S1AP_UEContextModificationResponseIEs__value_PR { S1AP_UEContextModificationResponseIEs__value_PR_NOTHING, /* No components present */ S1AP_UEContextModificationResponseIEs__value_PR_MME_UE_S1AP_ID, S1AP_UEContextModificationResponseIEs__value_PR_ENB_UE_S1AP_ID, S1AP_UEContextModificationResponseIEs__value_PR_CriticalityDiagnostics } S1AP_UEContextModificationResponseIEs__value_PR; typedef enum S1AP_UEContextModificationFailureIEs__value_PR { S1AP_UEContextModificationFailureIEs__value_PR_NOTHING, /* No components present */ S1AP_UEContextModificationFailureIEs__value_PR_MME_UE_S1AP_ID, S1AP_UEContextModificationFailureIEs__value_PR_ENB_UE_S1AP_ID, S1AP_UEContextModificationFailureIEs__value_PR_Cause, S1AP_UEContextModificationFailureIEs__value_PR_CriticalityDiagnostics } S1AP_UEContextModificationFailureIEs__value_PR; typedef enum S1AP_UERadioCapabilityMatchRequestIEs__value_PR { S1AP_UERadioCapabilityMatchRequestIEs__value_PR_NOTHING, /* No components present */ S1AP_UERadioCapabilityMatchRequestIEs__value_PR_MME_UE_S1AP_ID, S1AP_UERadioCapabilityMatchRequestIEs__value_PR_ENB_UE_S1AP_ID, S1AP_UERadioCapabilityMatchRequestIEs__value_PR_UERadioCapability } S1AP_UERadioCapabilityMatchRequestIEs__value_PR; typedef enum S1AP_UERadioCapabilityMatchResponseIEs__value_PR { S1AP_UERadioCapabilityMatchResponseIEs__value_PR_NOTHING, /* No components present */ S1AP_UERadioCapabilityMatchResponseIEs__value_PR_MME_UE_S1AP_ID, S1AP_UERadioCapabilityMatchResponseIEs__value_PR_ENB_UE_S1AP_ID, S1AP_UERadioCapabilityMatchResponseIEs__value_PR_VoiceSupportMatchIndicator, S1AP_UERadioCapabilityMatchResponseIEs__value_PR_CriticalityDiagnostics } S1AP_UERadioCapabilityMatchResponseIEs__value_PR; typedef enum S1AP_DownlinkNASTransport_IEs__value_PR { S1AP_DownlinkNASTransport_IEs__value_PR_NOTHING, /* No components present */ S1AP_DownlinkNASTransport_IEs__value_PR_MME_UE_S1AP_ID, S1AP_DownlinkNASTransport_IEs__value_PR_ENB_UE_S1AP_ID, S1AP_DownlinkNASTransport_IEs__value_PR_NAS_PDU, S1AP_DownlinkNASTransport_IEs__value_PR_HandoverRestrictionList, S1AP_DownlinkNASTransport_IEs__value_PR_SubscriberProfileIDforRFP, S1AP_DownlinkNASTransport_IEs__value_PR_SRVCCOperationPossible, S1AP_DownlinkNASTransport_IEs__value_PR_UERadioCapability, S1AP_DownlinkNASTransport_IEs__value_PR_DLNASPDUDeliveryAckRequest, S1AP_DownlinkNASTransport_IEs__value_PR_EnhancedCoverageRestricted } S1AP_DownlinkNASTransport_IEs__value_PR; typedef enum S1AP_InitialUEMessage_IEs__value_PR { S1AP_InitialUEMessage_IEs__value_PR_NOTHING, /* No components present */ S1AP_InitialUEMessage_IEs__value_PR_ENB_UE_S1AP_ID, S1AP_InitialUEMessage_IEs__value_PR_NAS_PDU, S1AP_InitialUEMessage_IEs__value_PR_TAI, S1AP_InitialUEMessage_IEs__value_PR_EUTRAN_CGI, S1AP_InitialUEMessage_IEs__value_PR_RRC_Establishment_Cause, S1AP_InitialUEMessage_IEs__value_PR_S_TMSI, S1AP_InitialUEMessage_IEs__value_PR_CSG_Id, S1AP_InitialUEMessage_IEs__value_PR_GUMMEI, S1AP_InitialUEMessage_IEs__value_PR_CellAccessMode, S1AP_InitialUEMessage_IEs__value_PR_TransportLayerAddress, S1AP_InitialUEMessage_IEs__value_PR_RelayNode_Indicator, S1AP_InitialUEMessage_IEs__value_PR_GUMMEIType, S1AP_InitialUEMessage_IEs__value_PR_TunnelInformation, S1AP_InitialUEMessage_IEs__value_PR_LHN_ID, S1AP_InitialUEMessage_IEs__value_PR_MME_Group_ID, S1AP_InitialUEMessage_IEs__value_PR_UE_Usage_Type, S1AP_InitialUEMessage_IEs__value_PR_CE_mode_B_SupportIndicator, S1AP_InitialUEMessage_IEs__value_PR_DCN_ID, S1AP_InitialUEMessage_IEs__value_PR_Coverage_Level } S1AP_InitialUEMessage_IEs__value_PR; typedef enum S1AP_UplinkNASTransport_IEs__value_PR { S1AP_UplinkNASTransport_IEs__value_PR_NOTHING, /* No components present */ S1AP_UplinkNASTransport_IEs__value_PR_MME_UE_S1AP_ID, S1AP_UplinkNASTransport_IEs__value_PR_ENB_UE_S1AP_ID, S1AP_UplinkNASTransport_IEs__value_PR_NAS_PDU, S1AP_UplinkNASTransport_IEs__value_PR_EUTRAN_CGI, S1AP_UplinkNASTransport_IEs__value_PR_TAI, S1AP_UplinkNASTransport_IEs__value_PR_TransportLayerAddress, S1AP_UplinkNASTransport_IEs__value_PR_LHN_ID } S1AP_UplinkNASTransport_IEs__value_PR; typedef enum S1AP_NASNonDeliveryIndication_IEs__value_PR { S1AP_NASNonDeliveryIndication_IEs__value_PR_NOTHING, /* No components present */ S1AP_NASNonDeliveryIndication_IEs__value_PR_MME_UE_S1AP_ID, S1AP_NASNonDeliveryIndication_IEs__value_PR_ENB_UE_S1AP_ID, S1AP_NASNonDeliveryIndication_IEs__value_PR_NAS_PDU, S1AP_NASNonDeliveryIndication_IEs__value_PR_Cause } S1AP_NASNonDeliveryIndication_IEs__value_PR; typedef enum S1AP_RerouteNASRequest_IEs__value_PR { S1AP_RerouteNASRequest_IEs__value_PR_NOTHING, /* No components present */ S1AP_RerouteNASRequest_IEs__value_PR_ENB_UE_S1AP_ID, S1AP_RerouteNASRequest_IEs__value_PR_MME_UE_S1AP_ID, S1AP_RerouteNASRequest_IEs__value_PR_OCTET_STRING, S1AP_RerouteNASRequest_IEs__value_PR_MME_Group_ID, S1AP_RerouteNASRequest_IEs__value_PR_Additional_GUTI, S1AP_RerouteNASRequest_IEs__value_PR_UE_Usage_Type } S1AP_RerouteNASRequest_IEs__value_PR; typedef enum S1AP_NASDeliveryIndicationIEs__value_PR { S1AP_NASDeliveryIndicationIEs__value_PR_NOTHING /* No components present */ } S1AP_NASDeliveryIndicationIEs__value_PR; typedef enum S1AP_ResetIEs__value_PR { S1AP_ResetIEs__value_PR_NOTHING, /* No components present */ S1AP_ResetIEs__value_PR_Cause, S1AP_ResetIEs__value_PR_ResetType } S1AP_ResetIEs__value_PR; typedef enum S1AP_ResetAcknowledgeIEs__value_PR { S1AP_ResetAcknowledgeIEs__value_PR_NOTHING, /* No components present */ S1AP_ResetAcknowledgeIEs__value_PR_UE_associatedLogicalS1_ConnectionListResAck, S1AP_ResetAcknowledgeIEs__value_PR_CriticalityDiagnostics } S1AP_ResetAcknowledgeIEs__value_PR; typedef enum S1AP_ErrorIndicationIEs__value_PR { S1AP_ErrorIndicationIEs__value_PR_NOTHING, /* No components present */ S1AP_ErrorIndicationIEs__value_PR_MME_UE_S1AP_ID, S1AP_ErrorIndicationIEs__value_PR_ENB_UE_S1AP_ID, S1AP_ErrorIndicationIEs__value_PR_Cause, S1AP_ErrorIndicationIEs__value_PR_CriticalityDiagnostics } S1AP_ErrorIndicationIEs__value_PR; typedef enum S1AP_S1SetupRequestIEs__value_PR { S1AP_S1SetupRequestIEs__value_PR_NOTHING, /* No components present */ S1AP_S1SetupRequestIEs__value_PR_Global_ENB_ID, S1AP_S1SetupRequestIEs__value_PR_ENBname, S1AP_S1SetupRequestIEs__value_PR_SupportedTAs, S1AP_S1SetupRequestIEs__value_PR_PagingDRX, S1AP_S1SetupRequestIEs__value_PR_CSG_IdList, S1AP_S1SetupRequestIEs__value_PR_UE_RetentionInformation, S1AP_S1SetupRequestIEs__value_PR_NB_IoT_DefaultPagingDRX } S1AP_S1SetupRequestIEs__value_PR; typedef enum S1AP_S1SetupResponseIEs__value_PR { S1AP_S1SetupResponseIEs__value_PR_NOTHING, /* No components present */ S1AP_S1SetupResponseIEs__value_PR_MMEname, S1AP_S1SetupResponseIEs__value_PR_ServedGUMMEIs, S1AP_S1SetupResponseIEs__value_PR_RelativeMMECapacity, S1AP_S1SetupResponseIEs__value_PR_MMERelaySupportIndicator, S1AP_S1SetupResponseIEs__value_PR_CriticalityDiagnostics, S1AP_S1SetupResponseIEs__value_PR_UE_RetentionInformation, S1AP_S1SetupResponseIEs__value_PR_ServedDCNs } S1AP_S1SetupResponseIEs__value_PR; typedef enum S1AP_S1SetupFailureIEs__value_PR { S1AP_S1SetupFailureIEs__value_PR_NOTHING, /* No components present */ S1AP_S1SetupFailureIEs__value_PR_Cause, S1AP_S1SetupFailureIEs__value_PR_TimeToWait, S1AP_S1SetupFailureIEs__value_PR_CriticalityDiagnostics } S1AP_S1SetupFailureIEs__value_PR; typedef enum S1AP_ENBConfigurationUpdateIEs__value_PR { S1AP_ENBConfigurationUpdateIEs__value_PR_NOTHING, /* No components present */ S1AP_ENBConfigurationUpdateIEs__value_PR_ENBname, S1AP_ENBConfigurationUpdateIEs__value_PR_SupportedTAs, S1AP_ENBConfigurationUpdateIEs__value_PR_CSG_IdList, S1AP_ENBConfigurationUpdateIEs__value_PR_PagingDRX, S1AP_ENBConfigurationUpdateIEs__value_PR_NB_IoT_DefaultPagingDRX } S1AP_ENBConfigurationUpdateIEs__value_PR; typedef enum S1AP_ENBConfigurationUpdateAcknowledgeIEs__value_PR { S1AP_ENBConfigurationUpdateAcknowledgeIEs__value_PR_NOTHING, /* No components present */ S1AP_ENBConfigurationUpdateAcknowledgeIEs__value_PR_CriticalityDiagnostics } S1AP_ENBConfigurationUpdateAcknowledgeIEs__value_PR; typedef enum S1AP_ENBConfigurationUpdateFailureIEs__value_PR { S1AP_ENBConfigurationUpdateFailureIEs__value_PR_NOTHING, /* No components present */ S1AP_ENBConfigurationUpdateFailureIEs__value_PR_Cause, S1AP_ENBConfigurationUpdateFailureIEs__value_PR_TimeToWait, S1AP_ENBConfigurationUpdateFailureIEs__value_PR_CriticalityDiagnostics } S1AP_ENBConfigurationUpdateFailureIEs__value_PR; typedef enum S1AP_MMEConfigurationUpdateIEs__value_PR { S1AP_MMEConfigurationUpdateIEs__value_PR_NOTHING, /* No components present */ S1AP_MMEConfigurationUpdateIEs__value_PR_MMEname, S1AP_MMEConfigurationUpdateIEs__value_PR_ServedGUMMEIs, S1AP_MMEConfigurationUpdateIEs__value_PR_RelativeMMECapacity, S1AP_MMEConfigurationUpdateIEs__value_PR_ServedDCNs } S1AP_MMEConfigurationUpdateIEs__value_PR; typedef enum S1AP_MMEConfigurationUpdateAcknowledgeIEs__value_PR { S1AP_MMEConfigurationUpdateAcknowledgeIEs__value_PR_NOTHING, /* No components present */ S1AP_MMEConfigurationUpdateAcknowledgeIEs__value_PR_CriticalityDiagnostics } S1AP_MMEConfigurationUpdateAcknowledgeIEs__value_PR; typedef enum S1AP_MMEConfigurationUpdateFailureIEs__value_PR { S1AP_MMEConfigurationUpdateFailureIEs__value_PR_NOTHING, /* No components present */ S1AP_MMEConfigurationUpdateFailureIEs__value_PR_Cause, S1AP_MMEConfigurationUpdateFailureIEs__value_PR_TimeToWait, S1AP_MMEConfigurationUpdateFailureIEs__value_PR_CriticalityDiagnostics } S1AP_MMEConfigurationUpdateFailureIEs__value_PR; typedef enum S1AP_DownlinkS1cdma2000tunnellingIEs__value_PR { S1AP_DownlinkS1cdma2000tunnellingIEs__value_PR_NOTHING, /* No components present */ S1AP_DownlinkS1cdma2000tunnellingIEs__value_PR_MME_UE_S1AP_ID, S1AP_DownlinkS1cdma2000tunnellingIEs__value_PR_ENB_UE_S1AP_ID, S1AP_DownlinkS1cdma2000tunnellingIEs__value_PR_E_RABSubjecttoDataForwardingList, S1AP_DownlinkS1cdma2000tunnellingIEs__value_PR_Cdma2000HOStatus, S1AP_DownlinkS1cdma2000tunnellingIEs__value_PR_Cdma2000RATType, S1AP_DownlinkS1cdma2000tunnellingIEs__value_PR_Cdma2000PDU } S1AP_DownlinkS1cdma2000tunnellingIEs__value_PR; typedef enum S1AP_UplinkS1cdma2000tunnellingIEs__value_PR { S1AP_UplinkS1cdma2000tunnellingIEs__value_PR_NOTHING, /* No components present */ S1AP_UplinkS1cdma2000tunnellingIEs__value_PR_MME_UE_S1AP_ID, S1AP_UplinkS1cdma2000tunnellingIEs__value_PR_ENB_UE_S1AP_ID, S1AP_UplinkS1cdma2000tunnellingIEs__value_PR_Cdma2000RATType, S1AP_UplinkS1cdma2000tunnellingIEs__value_PR_Cdma2000SectorID, S1AP_UplinkS1cdma2000tunnellingIEs__value_PR_Cdma2000HORequiredIndication, S1AP_UplinkS1cdma2000tunnellingIEs__value_PR_Cdma2000OneXSRVCCInfo, S1AP_UplinkS1cdma2000tunnellingIEs__value_PR_Cdma2000OneXRAND, S1AP_UplinkS1cdma2000tunnellingIEs__value_PR_Cdma2000PDU, S1AP_UplinkS1cdma2000tunnellingIEs__value_PR_EUTRANRoundTripDelayEstimationInfo } S1AP_UplinkS1cdma2000tunnellingIEs__value_PR; typedef enum S1AP_UECapabilityInfoIndicationIEs__value_PR { S1AP_UECapabilityInfoIndicationIEs__value_PR_NOTHING, /* No components present */ S1AP_UECapabilityInfoIndicationIEs__value_PR_MME_UE_S1AP_ID, S1AP_UECapabilityInfoIndicationIEs__value_PR_ENB_UE_S1AP_ID, S1AP_UECapabilityInfoIndicationIEs__value_PR_UERadioCapability, S1AP_UECapabilityInfoIndicationIEs__value_PR_UERadioCapabilityForPaging } S1AP_UECapabilityInfoIndicationIEs__value_PR; typedef enum S1AP_ENBStatusTransferIEs__value_PR { S1AP_ENBStatusTransferIEs__value_PR_NOTHING, /* No components present */ S1AP_ENBStatusTransferIEs__value_PR_MME_UE_S1AP_ID, S1AP_ENBStatusTransferIEs__value_PR_ENB_UE_S1AP_ID, S1AP_ENBStatusTransferIEs__value_PR_ENB_StatusTransfer_TransparentContainer } S1AP_ENBStatusTransferIEs__value_PR; typedef enum S1AP_MMEStatusTransferIEs__value_PR { S1AP_MMEStatusTransferIEs__value_PR_NOTHING, /* No components present */ S1AP_MMEStatusTransferIEs__value_PR_MME_UE_S1AP_ID, S1AP_MMEStatusTransferIEs__value_PR_ENB_UE_S1AP_ID, S1AP_MMEStatusTransferIEs__value_PR_ENB_StatusTransfer_TransparentContainer } S1AP_MMEStatusTransferIEs__value_PR; typedef enum S1AP_TraceStartIEs__value_PR { S1AP_TraceStartIEs__value_PR_NOTHING, /* No components present */ S1AP_TraceStartIEs__value_PR_MME_UE_S1AP_ID, S1AP_TraceStartIEs__value_PR_ENB_UE_S1AP_ID, S1AP_TraceStartIEs__value_PR_TraceActivation } S1AP_TraceStartIEs__value_PR; typedef enum S1AP_TraceFailureIndicationIEs__value_PR { S1AP_TraceFailureIndicationIEs__value_PR_NOTHING, /* No components present */ S1AP_TraceFailureIndicationIEs__value_PR_MME_UE_S1AP_ID, S1AP_TraceFailureIndicationIEs__value_PR_ENB_UE_S1AP_ID, S1AP_TraceFailureIndicationIEs__value_PR_E_UTRAN_Trace_ID, S1AP_TraceFailureIndicationIEs__value_PR_Cause } S1AP_TraceFailureIndicationIEs__value_PR; typedef enum S1AP_DeactivateTraceIEs__value_PR { S1AP_DeactivateTraceIEs__value_PR_NOTHING, /* No components present */ S1AP_DeactivateTraceIEs__value_PR_MME_UE_S1AP_ID, S1AP_DeactivateTraceIEs__value_PR_ENB_UE_S1AP_ID, S1AP_DeactivateTraceIEs__value_PR_E_UTRAN_Trace_ID } S1AP_DeactivateTraceIEs__value_PR; typedef enum S1AP_CellTrafficTraceIEs__value_PR { S1AP_CellTrafficTraceIEs__value_PR_NOTHING, /* No components present */ S1AP_CellTrafficTraceIEs__value_PR_MME_UE_S1AP_ID, S1AP_CellTrafficTraceIEs__value_PR_ENB_UE_S1AP_ID, S1AP_CellTrafficTraceIEs__value_PR_E_UTRAN_Trace_ID, S1AP_CellTrafficTraceIEs__value_PR_EUTRAN_CGI, S1AP_CellTrafficTraceIEs__value_PR_TransportLayerAddress, S1AP_CellTrafficTraceIEs__value_PR_PrivacyIndicator } S1AP_CellTrafficTraceIEs__value_PR; typedef enum S1AP_LocationReportingControlIEs__value_PR { S1AP_LocationReportingControlIEs__value_PR_NOTHING, /* No components present */ S1AP_LocationReportingControlIEs__value_PR_MME_UE_S1AP_ID, S1AP_LocationReportingControlIEs__value_PR_ENB_UE_S1AP_ID, S1AP_LocationReportingControlIEs__value_PR_RequestType } S1AP_LocationReportingControlIEs__value_PR; typedef enum S1AP_LocationReportingFailureIndicationIEs__value_PR { S1AP_LocationReportingFailureIndicationIEs__value_PR_NOTHING, /* No components present */ S1AP_LocationReportingFailureIndicationIEs__value_PR_MME_UE_S1AP_ID, S1AP_LocationReportingFailureIndicationIEs__value_PR_ENB_UE_S1AP_ID, S1AP_LocationReportingFailureIndicationIEs__value_PR_Cause } S1AP_LocationReportingFailureIndicationIEs__value_PR; typedef enum S1AP_LocationReportIEs__value_PR { S1AP_LocationReportIEs__value_PR_NOTHING, /* No components present */ S1AP_LocationReportIEs__value_PR_MME_UE_S1AP_ID, S1AP_LocationReportIEs__value_PR_ENB_UE_S1AP_ID, S1AP_LocationReportIEs__value_PR_EUTRAN_CGI, S1AP_LocationReportIEs__value_PR_TAI, S1AP_LocationReportIEs__value_PR_RequestType } S1AP_LocationReportIEs__value_PR; typedef enum S1AP_OverloadStartIEs__value_PR { S1AP_OverloadStartIEs__value_PR_NOTHING, /* No components present */ S1AP_OverloadStartIEs__value_PR_OverloadResponse, S1AP_OverloadStartIEs__value_PR_GUMMEIList, S1AP_OverloadStartIEs__value_PR_TrafficLoadReductionIndication } S1AP_OverloadStartIEs__value_PR; typedef enum S1AP_OverloadStopIEs__value_PR { S1AP_OverloadStopIEs__value_PR_NOTHING, /* No components present */ S1AP_OverloadStopIEs__value_PR_GUMMEIList } S1AP_OverloadStopIEs__value_PR; typedef enum S1AP_WriteReplaceWarningRequestIEs__value_PR { S1AP_WriteReplaceWarningRequestIEs__value_PR_NOTHING, /* No components present */ S1AP_WriteReplaceWarningRequestIEs__value_PR_MessageIdentifier, S1AP_WriteReplaceWarningRequestIEs__value_PR_SerialNumber, S1AP_WriteReplaceWarningRequestIEs__value_PR_WarningAreaList, S1AP_WriteReplaceWarningRequestIEs__value_PR_RepetitionPeriod, S1AP_WriteReplaceWarningRequestIEs__value_PR_ExtendedRepetitionPeriod, S1AP_WriteReplaceWarningRequestIEs__value_PR_NumberofBroadcastRequest, S1AP_WriteReplaceWarningRequestIEs__value_PR_WarningType, S1AP_WriteReplaceWarningRequestIEs__value_PR_WarningSecurityInfo, S1AP_WriteReplaceWarningRequestIEs__value_PR_DataCodingScheme, S1AP_WriteReplaceWarningRequestIEs__value_PR_WarningMessageContents, S1AP_WriteReplaceWarningRequestIEs__value_PR_ConcurrentWarningMessageIndicator } S1AP_WriteReplaceWarningRequestIEs__value_PR; typedef enum S1AP_WriteReplaceWarningResponseIEs__value_PR { S1AP_WriteReplaceWarningResponseIEs__value_PR_NOTHING, /* No components present */ S1AP_WriteReplaceWarningResponseIEs__value_PR_MessageIdentifier, S1AP_WriteReplaceWarningResponseIEs__value_PR_SerialNumber, S1AP_WriteReplaceWarningResponseIEs__value_PR_BroadcastCompletedAreaList, S1AP_WriteReplaceWarningResponseIEs__value_PR_CriticalityDiagnostics } S1AP_WriteReplaceWarningResponseIEs__value_PR; typedef enum S1AP_ENBDirectInformationTransferIEs__value_PR { S1AP_ENBDirectInformationTransferIEs__value_PR_NOTHING, /* No components present */ S1AP_ENBDirectInformationTransferIEs__value_PR_Inter_SystemInformationTransferType } S1AP_ENBDirectInformationTransferIEs__value_PR; typedef enum S1AP_MMEDirectInformationTransferIEs__value_PR { S1AP_MMEDirectInformationTransferIEs__value_PR_NOTHING, /* No components present */ S1AP_MMEDirectInformationTransferIEs__value_PR_Inter_SystemInformationTransferType } S1AP_MMEDirectInformationTransferIEs__value_PR; typedef enum S1AP_ENBConfigurationTransferIEs__value_PR { S1AP_ENBConfigurationTransferIEs__value_PR_NOTHING, /* No components present */ S1AP_ENBConfigurationTransferIEs__value_PR_SONConfigurationTransfer } S1AP_ENBConfigurationTransferIEs__value_PR; typedef enum S1AP_MMEConfigurationTransferIEs__value_PR { S1AP_MMEConfigurationTransferIEs__value_PR_NOTHING, /* No components present */ S1AP_MMEConfigurationTransferIEs__value_PR_SONConfigurationTransfer } S1AP_MMEConfigurationTransferIEs__value_PR; typedef enum S1AP_KillRequestIEs__value_PR { S1AP_KillRequestIEs__value_PR_NOTHING, /* No components present */ S1AP_KillRequestIEs__value_PR_MessageIdentifier, S1AP_KillRequestIEs__value_PR_SerialNumber, S1AP_KillRequestIEs__value_PR_WarningAreaList, S1AP_KillRequestIEs__value_PR_KillAllWarningMessages } S1AP_KillRequestIEs__value_PR; typedef enum S1AP_KillResponseIEs__value_PR { S1AP_KillResponseIEs__value_PR_NOTHING, /* No components present */ S1AP_KillResponseIEs__value_PR_MessageIdentifier, S1AP_KillResponseIEs__value_PR_SerialNumber, S1AP_KillResponseIEs__value_PR_BroadcastCancelledAreaList, S1AP_KillResponseIEs__value_PR_CriticalityDiagnostics } S1AP_KillResponseIEs__value_PR; typedef enum S1AP_PWSRestartIndicationIEs__value_PR { S1AP_PWSRestartIndicationIEs__value_PR_NOTHING, /* No components present */ S1AP_PWSRestartIndicationIEs__value_PR_ECGIListForRestart, S1AP_PWSRestartIndicationIEs__value_PR_Global_ENB_ID, S1AP_PWSRestartIndicationIEs__value_PR_TAIListForRestart, S1AP_PWSRestartIndicationIEs__value_PR_EmergencyAreaIDListForRestart } S1AP_PWSRestartIndicationIEs__value_PR; typedef enum S1AP_PWSFailureIndicationIEs__value_PR { S1AP_PWSFailureIndicationIEs__value_PR_NOTHING, /* No components present */ S1AP_PWSFailureIndicationIEs__value_PR_PWSfailedECGIList, S1AP_PWSFailureIndicationIEs__value_PR_Global_ENB_ID } S1AP_PWSFailureIndicationIEs__value_PR; typedef enum S1AP_DownlinkUEAssociatedLPPaTransport_IEs__value_PR { S1AP_DownlinkUEAssociatedLPPaTransport_IEs__value_PR_NOTHING, /* No components present */ S1AP_DownlinkUEAssociatedLPPaTransport_IEs__value_PR_MME_UE_S1AP_ID, S1AP_DownlinkUEAssociatedLPPaTransport_IEs__value_PR_ENB_UE_S1AP_ID, S1AP_DownlinkUEAssociatedLPPaTransport_IEs__value_PR_Routing_ID, S1AP_DownlinkUEAssociatedLPPaTransport_IEs__value_PR_LPPa_PDU } S1AP_DownlinkUEAssociatedLPPaTransport_IEs__value_PR; typedef enum S1AP_UplinkUEAssociatedLPPaTransport_IEs__value_PR { S1AP_UplinkUEAssociatedLPPaTransport_IEs__value_PR_NOTHING, /* No components present */ S1AP_UplinkUEAssociatedLPPaTransport_IEs__value_PR_MME_UE_S1AP_ID, S1AP_UplinkUEAssociatedLPPaTransport_IEs__value_PR_ENB_UE_S1AP_ID, S1AP_UplinkUEAssociatedLPPaTransport_IEs__value_PR_Routing_ID, S1AP_UplinkUEAssociatedLPPaTransport_IEs__value_PR_LPPa_PDU } S1AP_UplinkUEAssociatedLPPaTransport_IEs__value_PR; typedef enum S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs__value_PR { S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs__value_PR_NOTHING, /* No components present */ S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs__value_PR_Routing_ID, S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs__value_PR_LPPa_PDU } S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs__value_PR; typedef enum S1AP_UplinkNonUEAssociatedLPPaTransport_IEs__value_PR { S1AP_UplinkNonUEAssociatedLPPaTransport_IEs__value_PR_NOTHING, /* No components present */ S1AP_UplinkNonUEAssociatedLPPaTransport_IEs__value_PR_Routing_ID, S1AP_UplinkNonUEAssociatedLPPaTransport_IEs__value_PR_LPPa_PDU } S1AP_UplinkNonUEAssociatedLPPaTransport_IEs__value_PR; typedef enum S1AP_E_RABModificationIndicationIEs__value_PR { S1AP_E_RABModificationIndicationIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABModificationIndicationIEs__value_PR_MME_UE_S1AP_ID, S1AP_E_RABModificationIndicationIEs__value_PR_ENB_UE_S1AP_ID, S1AP_E_RABModificationIndicationIEs__value_PR_E_RABToBeModifiedListBearerModInd, S1AP_E_RABModificationIndicationIEs__value_PR_E_RABNotToBeModifiedListBearerModInd, S1AP_E_RABModificationIndicationIEs__value_PR_CSGMembershipInfo, S1AP_E_RABModificationIndicationIEs__value_PR_TunnelInformation } S1AP_E_RABModificationIndicationIEs__value_PR; typedef enum S1AP_E_RABModificationConfirmIEs__value_PR { S1AP_E_RABModificationConfirmIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABModificationConfirmIEs__value_PR_MME_UE_S1AP_ID, S1AP_E_RABModificationConfirmIEs__value_PR_ENB_UE_S1AP_ID, S1AP_E_RABModificationConfirmIEs__value_PR_E_RABModifyListBearerModConf, S1AP_E_RABModificationConfirmIEs__value_PR_E_RABList, S1AP_E_RABModificationConfirmIEs__value_PR_CriticalityDiagnostics, S1AP_E_RABModificationConfirmIEs__value_PR_CSGMembershipStatus } S1AP_E_RABModificationConfirmIEs__value_PR; typedef enum S1AP_UEContextModificationIndicationIEs__value_PR { S1AP_UEContextModificationIndicationIEs__value_PR_NOTHING, /* No components present */ S1AP_UEContextModificationIndicationIEs__value_PR_MME_UE_S1AP_ID, S1AP_UEContextModificationIndicationIEs__value_PR_ENB_UE_S1AP_ID, S1AP_UEContextModificationIndicationIEs__value_PR_CSGMembershipInfo } S1AP_UEContextModificationIndicationIEs__value_PR; typedef enum S1AP_UEContextModificationConfirmIEs__value_PR { S1AP_UEContextModificationConfirmIEs__value_PR_NOTHING, /* No components present */ S1AP_UEContextModificationConfirmIEs__value_PR_MME_UE_S1AP_ID, S1AP_UEContextModificationConfirmIEs__value_PR_ENB_UE_S1AP_ID, S1AP_UEContextModificationConfirmIEs__value_PR_CSGMembershipStatus, S1AP_UEContextModificationConfirmIEs__value_PR_CriticalityDiagnostics } S1AP_UEContextModificationConfirmIEs__value_PR; typedef enum S1AP_UEContextSuspendRequestIEs__value_PR { S1AP_UEContextSuspendRequestIEs__value_PR_NOTHING, /* No components present */ S1AP_UEContextSuspendRequestIEs__value_PR_MME_UE_S1AP_ID, S1AP_UEContextSuspendRequestIEs__value_PR_ENB_UE_S1AP_ID, S1AP_UEContextSuspendRequestIEs__value_PR_InformationOnRecommendedCellsAndENBsForPaging, S1AP_UEContextSuspendRequestIEs__value_PR_CellIdentifierAndCELevelForCECapableUEs } S1AP_UEContextSuspendRequestIEs__value_PR; typedef enum S1AP_UEContextSuspendResponseIEs__value_PR { S1AP_UEContextSuspendResponseIEs__value_PR_NOTHING, /* No components present */ S1AP_UEContextSuspendResponseIEs__value_PR_MME_UE_S1AP_ID, S1AP_UEContextSuspendResponseIEs__value_PR_ENB_UE_S1AP_ID, S1AP_UEContextSuspendResponseIEs__value_PR_CriticalityDiagnostics, S1AP_UEContextSuspendResponseIEs__value_PR_SecurityContext } S1AP_UEContextSuspendResponseIEs__value_PR; typedef enum S1AP_UEContextResumeRequestIEs__value_PR { S1AP_UEContextResumeRequestIEs__value_PR_NOTHING, /* No components present */ S1AP_UEContextResumeRequestIEs__value_PR_MME_UE_S1AP_ID, S1AP_UEContextResumeRequestIEs__value_PR_ENB_UE_S1AP_ID, S1AP_UEContextResumeRequestIEs__value_PR_E_RABFailedToResumeListResumeReq, S1AP_UEContextResumeRequestIEs__value_PR_RRC_Establishment_Cause } S1AP_UEContextResumeRequestIEs__value_PR; typedef enum S1AP_UEContextResumeResponseIEs__value_PR { S1AP_UEContextResumeResponseIEs__value_PR_NOTHING, /* No components present */ S1AP_UEContextResumeResponseIEs__value_PR_MME_UE_S1AP_ID, S1AP_UEContextResumeResponseIEs__value_PR_ENB_UE_S1AP_ID, S1AP_UEContextResumeResponseIEs__value_PR_E_RABFailedToResumeListResumeRes, S1AP_UEContextResumeResponseIEs__value_PR_CriticalityDiagnostics, S1AP_UEContextResumeResponseIEs__value_PR_SecurityContext } S1AP_UEContextResumeResponseIEs__value_PR; typedef enum S1AP_UEContextResumeFailureIEs__value_PR { S1AP_UEContextResumeFailureIEs__value_PR_NOTHING, /* No components present */ S1AP_UEContextResumeFailureIEs__value_PR_MME_UE_S1AP_ID, S1AP_UEContextResumeFailureIEs__value_PR_ENB_UE_S1AP_ID, S1AP_UEContextResumeFailureIEs__value_PR_Cause, S1AP_UEContextResumeFailureIEs__value_PR_CriticalityDiagnostics } S1AP_UEContextResumeFailureIEs__value_PR; typedef enum S1AP_ConnectionEstablishmentIndicationIEs__value_PR { S1AP_ConnectionEstablishmentIndicationIEs__value_PR_NOTHING, /* No components present */ S1AP_ConnectionEstablishmentIndicationIEs__value_PR_MME_UE_S1AP_ID, S1AP_ConnectionEstablishmentIndicationIEs__value_PR_ENB_UE_S1AP_ID, S1AP_ConnectionEstablishmentIndicationIEs__value_PR_UERadioCapability, S1AP_ConnectionEstablishmentIndicationIEs__value_PR_EnhancedCoverageRestricted, S1AP_ConnectionEstablishmentIndicationIEs__value_PR_DL_CP_SecurityInformation } S1AP_ConnectionEstablishmentIndicationIEs__value_PR; typedef enum S1AP_RetrieveUEInformationIEs__value_PR { S1AP_RetrieveUEInformationIEs__value_PR_NOTHING, /* No components present */ S1AP_RetrieveUEInformationIEs__value_PR_S_TMSI } S1AP_RetrieveUEInformationIEs__value_PR; typedef enum S1AP_UEInformationTransferIEs__value_PR { S1AP_UEInformationTransferIEs__value_PR_NOTHING, /* No components present */ S1AP_UEInformationTransferIEs__value_PR_S_TMSI, S1AP_UEInformationTransferIEs__value_PR_E_RABLevelQoSParameters, S1AP_UEInformationTransferIEs__value_PR_UERadioCapability } S1AP_UEInformationTransferIEs__value_PR; typedef enum S1AP_ENBCPRelocationIndicationIEs__value_PR { S1AP_ENBCPRelocationIndicationIEs__value_PR_NOTHING, /* No components present */ S1AP_ENBCPRelocationIndicationIEs__value_PR_ENB_UE_S1AP_ID, S1AP_ENBCPRelocationIndicationIEs__value_PR_S_TMSI, S1AP_ENBCPRelocationIndicationIEs__value_PR_EUTRAN_CGI, S1AP_ENBCPRelocationIndicationIEs__value_PR_TAI, S1AP_ENBCPRelocationIndicationIEs__value_PR_UL_CP_SecurityInformation } S1AP_ENBCPRelocationIndicationIEs__value_PR; typedef enum S1AP_MMECPRelocationIndicationIEs__value_PR { S1AP_MMECPRelocationIndicationIEs__value_PR_NOTHING, /* No components present */ S1AP_MMECPRelocationIndicationIEs__value_PR_MME_UE_S1AP_ID, S1AP_MMECPRelocationIndicationIEs__value_PR_ENB_UE_S1AP_ID } S1AP_MMECPRelocationIndicationIEs__value_PR; typedef enum S1AP_E_RABDataForwardingItemIEs__value_PR { S1AP_E_RABDataForwardingItemIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABDataForwardingItemIEs__value_PR_E_RABDataForwardingItem } S1AP_E_RABDataForwardingItemIEs__value_PR; typedef enum S1AP_E_RABToBeSetupItemHOReqIEs__value_PR { S1AP_E_RABToBeSetupItemHOReqIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABToBeSetupItemHOReqIEs__value_PR_E_RABToBeSetupItemHOReq } S1AP_E_RABToBeSetupItemHOReqIEs__value_PR; typedef enum S1AP_E_RABAdmittedItemIEs__value_PR { S1AP_E_RABAdmittedItemIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABAdmittedItemIEs__value_PR_E_RABAdmittedItem } S1AP_E_RABAdmittedItemIEs__value_PR; typedef enum S1AP_E_RABFailedtoSetupItemHOReqAckIEs__value_PR { S1AP_E_RABFailedtoSetupItemHOReqAckIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABFailedtoSetupItemHOReqAckIEs__value_PR_E_RABFailedToSetupItemHOReqAck } S1AP_E_RABFailedtoSetupItemHOReqAckIEs__value_PR; typedef enum S1AP_E_RABToBeSwitchedDLItemIEs__value_PR { S1AP_E_RABToBeSwitchedDLItemIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABToBeSwitchedDLItemIEs__value_PR_E_RABToBeSwitchedDLItem } S1AP_E_RABToBeSwitchedDLItemIEs__value_PR; typedef enum S1AP_E_RABToBeSwitchedULItemIEs__value_PR { S1AP_E_RABToBeSwitchedULItemIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABToBeSwitchedULItemIEs__value_PR_E_RABToBeSwitchedULItem } S1AP_E_RABToBeSwitchedULItemIEs__value_PR; typedef enum S1AP_E_RABToBeModifiedItemBearerModIndIEs__value_PR { S1AP_E_RABToBeModifiedItemBearerModIndIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABToBeModifiedItemBearerModIndIEs__value_PR_E_RABToBeModifiedItemBearerModInd } S1AP_E_RABToBeModifiedItemBearerModIndIEs__value_PR; typedef enum S1AP_E_RABNotToBeModifiedItemBearerModIndIEs__value_PR { S1AP_E_RABNotToBeModifiedItemBearerModIndIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABNotToBeModifiedItemBearerModIndIEs__value_PR_E_RABNotToBeModifiedItemBearerModInd } S1AP_E_RABNotToBeModifiedItemBearerModIndIEs__value_PR; typedef enum S1AP_E_RABFailedToResumeItemResumeReqIEs__value_PR { S1AP_E_RABFailedToResumeItemResumeReqIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABFailedToResumeItemResumeReqIEs__value_PR_E_RABFailedToResumeItemResumeReq } S1AP_E_RABFailedToResumeItemResumeReqIEs__value_PR; typedef enum S1AP_E_RABFailedToResumeItemResumeResIEs__value_PR { S1AP_E_RABFailedToResumeItemResumeResIEs__value_PR_NOTHING, /* No components present */ S1AP_E_RABFailedToResumeItemResumeResIEs__value_PR_E_RABFailedToResumeItemResumeRes } S1AP_E_RABFailedToResumeItemResumeResIEs__value_PR; /* S1AP_ProtocolIE-Field */ typedef struct S1AP_E_RABToBeSetupItemBearerSUReqIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABToBeSetupItemBearerSUReqIEs__value { S1AP_E_RABToBeSetupItemBearerSUReqIEs__value_PR present; union S1AP_E_RABToBeSetupItemBearerSUReqIEs__S1AP_value_u { S1AP_E_RABToBeSetupItemBearerSUReq_t E_RABToBeSetupItemBearerSUReq; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeSetupItemBearerSUReqIEs_t; typedef struct S1AP_E_RABSetupItemBearerSUResIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABSetupItemBearerSUResIEs__value { S1AP_E_RABSetupItemBearerSUResIEs__value_PR present; union S1AP_E_RABSetupItemBearerSUResIEs__S1AP_value_u { S1AP_E_RABSetupItemBearerSURes_t E_RABSetupItemBearerSURes; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABSetupItemBearerSUResIEs_t; typedef struct S1AP_E_RABToBeModifiedItemBearerModReqIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABToBeModifiedItemBearerModReqIEs__value { S1AP_E_RABToBeModifiedItemBearerModReqIEs__value_PR present; union S1AP_E_RABToBeModifiedItemBearerModReqIEs__S1AP_value_u { S1AP_E_RABToBeModifiedItemBearerModReq_t E_RABToBeModifiedItemBearerModReq; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeModifiedItemBearerModReqIEs_t; typedef struct S1AP_E_RABModifyItemBearerModResIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABModifyItemBearerModResIEs__value { S1AP_E_RABModifyItemBearerModResIEs__value_PR present; union S1AP_E_RABModifyItemBearerModResIEs__S1AP_value_u { S1AP_E_RABModifyItemBearerModRes_t E_RABModifyItemBearerModRes; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABModifyItemBearerModResIEs_t; typedef struct S1AP_E_RABReleaseItemBearerRelCompIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABReleaseItemBearerRelCompIEs__value { S1AP_E_RABReleaseItemBearerRelCompIEs__value_PR present; union S1AP_E_RABReleaseItemBearerRelCompIEs__S1AP_value_u { S1AP_E_RABReleaseItemBearerRelComp_t E_RABReleaseItemBearerRelComp; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABReleaseItemBearerRelCompIEs_t; typedef struct S1AP_E_RABToBeSetupItemCtxtSUReqIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABToBeSetupItemCtxtSUReqIEs__value { S1AP_E_RABToBeSetupItemCtxtSUReqIEs__value_PR present; union S1AP_E_RABToBeSetupItemCtxtSUReqIEs__S1AP_value_u { S1AP_E_RABToBeSetupItemCtxtSUReq_t E_RABToBeSetupItemCtxtSUReq; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeSetupItemCtxtSUReqIEs_t; typedef struct S1AP_E_RABSetupItemCtxtSUResIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABSetupItemCtxtSUResIEs__value { S1AP_E_RABSetupItemCtxtSUResIEs__value_PR present; union S1AP_E_RABSetupItemCtxtSUResIEs__S1AP_value_u { S1AP_E_RABSetupItemCtxtSURes_t E_RABSetupItemCtxtSURes; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABSetupItemCtxtSUResIEs_t; typedef struct S1AP_TAIItemIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_TAIItemIEs__value { S1AP_TAIItemIEs__value_PR present; union S1AP_TAIItemIEs__S1AP_value_u { S1AP_TAIItem_t TAIItem; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TAIItemIEs_t; typedef struct S1AP_UE_associatedLogicalS1_ConnectionItemRes { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_UE_associatedLogicalS1_ConnectionItemRes__value { S1AP_UE_associatedLogicalS1_ConnectionItemRes__value_PR present; union S1AP_UE_associatedLogicalS1_ConnectionItemRes__S1AP_value_u { S1AP_UE_associatedLogicalS1_ConnectionItem_t UE_associatedLogicalS1_ConnectionItem; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UE_associatedLogicalS1_ConnectionItemRes_t; typedef struct S1AP_UE_associatedLogicalS1_ConnectionItemResAck { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_UE_associatedLogicalS1_ConnectionItemResAck__value { S1AP_UE_associatedLogicalS1_ConnectionItemResAck__value_PR present; union S1AP_UE_associatedLogicalS1_ConnectionItemResAck__S1AP_value_u { S1AP_UE_associatedLogicalS1_ConnectionItem_t UE_associatedLogicalS1_ConnectionItem; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UE_associatedLogicalS1_ConnectionItemResAck_t; typedef struct S1AP_E_RABModifyItemBearerModConfIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABModifyItemBearerModConfIEs__value { S1AP_E_RABModifyItemBearerModConfIEs__value_PR present; union S1AP_E_RABModifyItemBearerModConfIEs__S1AP_value_u { S1AP_E_RABModifyItemBearerModConf_t E_RABModifyItemBearerModConf; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABModifyItemBearerModConfIEs_t; typedef struct S1AP_Bearers_SubjectToStatusTransfer_ItemIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_Bearers_SubjectToStatusTransfer_ItemIEs__value { S1AP_Bearers_SubjectToStatusTransfer_ItemIEs__value_PR present; union S1AP_Bearers_SubjectToStatusTransfer_ItemIEs__S1AP_value_u { S1AP_Bearers_SubjectToStatusTransfer_Item_t Bearers_SubjectToStatusTransfer_Item; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_t; typedef struct S1AP_E_RABInformationListIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABInformationListIEs__value { S1AP_E_RABInformationListIEs__value_PR present; union S1AP_E_RABInformationListIEs__S1AP_value_u { S1AP_E_RABInformationListItem_t E_RABInformationListItem; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABInformationListIEs_t; typedef struct S1AP_E_RABItemIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABItemIEs__value { S1AP_E_RABItemIEs__value_PR present; union S1AP_E_RABItemIEs__S1AP_value_u { S1AP_E_RABItem_t E_RABItem; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABItemIEs_t; typedef struct S1AP_MDTMode_ExtensionIE { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_MDTMode_ExtensionIE__value { S1AP_MDTMode_ExtensionIE__value_PR present; union S1AP_MDTMode_ExtensionIE__S1AP_value_u { S1AP_LoggedMBSFNMDT_t LoggedMBSFNMDT; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MDTMode_ExtensionIE_t; typedef struct S1AP_RecommendedCellItemIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_RecommendedCellItemIEs__value { S1AP_RecommendedCellItemIEs__value_PR present; union S1AP_RecommendedCellItemIEs__S1AP_value_u { S1AP_RecommendedCellItem_t RecommendedCellItem; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_RecommendedCellItemIEs_t; typedef struct S1AP_RecommendedENBItemIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_RecommendedENBItemIEs__value { S1AP_RecommendedENBItemIEs__value_PR present; union S1AP_RecommendedENBItemIEs__S1AP_value_u { S1AP_RecommendedENBItem_t RecommendedENBItem; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_RecommendedENBItemIEs_t; typedef struct S1AP_SONInformation_ExtensionIE { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_SONInformation_ExtensionIE__value { S1AP_SONInformation_ExtensionIE__value_PR present; union S1AP_SONInformation_ExtensionIE__S1AP_value_u { S1AP_SONInformationReport_t SONInformationReport; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_SONInformation_ExtensionIE_t; typedef struct S1AP_HandoverRequiredIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_HandoverRequiredIEs__value { S1AP_HandoverRequiredIEs__value_PR present; union S1AP_HandoverRequiredIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_HandoverType_t HandoverType; S1AP_Cause_t Cause; S1AP_TargetID_t TargetID; S1AP_Direct_Forwarding_Path_Availability_t Direct_Forwarding_Path_Availability; S1AP_SRVCCHOIndication_t SRVCCHOIndication; S1AP_Source_ToTarget_TransparentContainer_t Source_ToTarget_TransparentContainer; S1AP_MSClassmark2_t MSClassmark2; S1AP_MSClassmark3_t MSClassmark3; S1AP_CSG_Id_t CSG_Id; S1AP_CellAccessMode_t CellAccessMode; S1AP_PS_ServiceNotAvailable_t PS_ServiceNotAvailable; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_HandoverRequiredIEs_t; typedef struct S1AP_HandoverCommandIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_HandoverCommandIEs__value { S1AP_HandoverCommandIEs__value_PR present; union S1AP_HandoverCommandIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_HandoverType_t HandoverType; S1AP_NASSecurityParametersfromE_UTRAN_t NASSecurityParametersfromE_UTRAN; S1AP_E_RABSubjecttoDataForwardingList_t E_RABSubjecttoDataForwardingList; S1AP_E_RABList_t E_RABList; S1AP_Target_ToSource_TransparentContainer_t Target_ToSource_TransparentContainer; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_HandoverCommandIEs_t; typedef struct S1AP_HandoverPreparationFailureIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_HandoverPreparationFailureIEs__value { S1AP_HandoverPreparationFailureIEs__value_PR present; union S1AP_HandoverPreparationFailureIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_Cause_t Cause; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_HandoverPreparationFailureIEs_t; typedef struct S1AP_HandoverRequestIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_HandoverRequestIEs__value { S1AP_HandoverRequestIEs__value_PR present; union S1AP_HandoverRequestIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_HandoverType_t HandoverType; S1AP_Cause_t Cause; S1AP_UEAggregateMaximumBitrate_t UEAggregateMaximumBitrate; S1AP_E_RABToBeSetupListHOReq_t E_RABToBeSetupListHOReq; S1AP_Source_ToTarget_TransparentContainer_t Source_ToTarget_TransparentContainer; S1AP_UESecurityCapabilities_t UESecurityCapabilities; S1AP_HandoverRestrictionList_t HandoverRestrictionList; S1AP_TraceActivation_t TraceActivation; S1AP_RequestType_t RequestType; S1AP_SRVCCOperationPossible_t SRVCCOperationPossible; S1AP_SecurityContext_t SecurityContext; S1AP_NASSecurityParameterstoE_UTRAN_t NASSecurityParameterstoE_UTRAN; S1AP_CSG_Id_t CSG_Id; S1AP_CSGMembershipStatus_t CSGMembershipStatus; S1AP_GUMMEI_t GUMMEI; S1AP_ManagementBasedMDTAllowed_t ManagementBasedMDTAllowed; S1AP_MDTPLMNList_t MDTPLMNList; S1AP_Masked_IMEISV_t Masked_IMEISV; S1AP_ExpectedUEBehaviour_t ExpectedUEBehaviour; S1AP_ProSeAuthorized_t ProSeAuthorized; S1AP_UEUserPlaneCIoTSupportIndicator_t UEUserPlaneCIoTSupportIndicator; S1AP_V2XServicesAuthorized_t V2XServicesAuthorized; S1AP_UESidelinkAggregateMaximumBitrate_t UESidelinkAggregateMaximumBitrate; S1AP_EnhancedCoverageRestricted_t EnhancedCoverageRestricted; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_HandoverRequestIEs_t; typedef struct S1AP_HandoverRequestAcknowledgeIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_HandoverRequestAcknowledgeIEs__value { S1AP_HandoverRequestAcknowledgeIEs__value_PR present; union S1AP_HandoverRequestAcknowledgeIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_E_RABAdmittedList_t E_RABAdmittedList; S1AP_E_RABFailedtoSetupListHOReqAck_t E_RABFailedtoSetupListHOReqAck; S1AP_Target_ToSource_TransparentContainer_t Target_ToSource_TransparentContainer; S1AP_CSG_Id_t CSG_Id; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; S1AP_CellAccessMode_t CellAccessMode; S1AP_CE_mode_B_SupportIndicator_t CE_mode_B_SupportIndicator; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_HandoverRequestAcknowledgeIEs_t; typedef struct S1AP_HandoverFailureIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_HandoverFailureIEs__value { S1AP_HandoverFailureIEs__value_PR present; union S1AP_HandoverFailureIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_Cause_t Cause; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_HandoverFailureIEs_t; typedef struct S1AP_HandoverNotifyIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_HandoverNotifyIEs__value { S1AP_HandoverNotifyIEs__value_PR present; union S1AP_HandoverNotifyIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_EUTRAN_CGI_t EUTRAN_CGI; S1AP_TAI_t TAI; S1AP_TunnelInformation_t TunnelInformation; S1AP_LHN_ID_t LHN_ID; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_HandoverNotifyIEs_t; typedef struct S1AP_PathSwitchRequestIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_PathSwitchRequestIEs__value { S1AP_PathSwitchRequestIEs__value_PR present; union S1AP_PathSwitchRequestIEs__S1AP_value_u { S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_E_RABToBeSwitchedDLList_t E_RABToBeSwitchedDLList; S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_EUTRAN_CGI_t EUTRAN_CGI; S1AP_TAI_t TAI; S1AP_UESecurityCapabilities_t UESecurityCapabilities; S1AP_CSG_Id_t CSG_Id; S1AP_CellAccessMode_t CellAccessMode; S1AP_GUMMEI_t GUMMEI; S1AP_CSGMembershipStatus_t CSGMembershipStatus; S1AP_TunnelInformation_t TunnelInformation; S1AP_LHN_ID_t LHN_ID; S1AP_RRC_Establishment_Cause_t RRC_Establishment_Cause; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_PathSwitchRequestIEs_t; typedef struct S1AP_PathSwitchRequestAcknowledgeIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_PathSwitchRequestAcknowledgeIEs__value { S1AP_PathSwitchRequestAcknowledgeIEs__value_PR present; union S1AP_PathSwitchRequestAcknowledgeIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_UEAggregateMaximumBitrate_t UEAggregateMaximumBitrate; S1AP_E_RABToBeSwitchedULList_t E_RABToBeSwitchedULList; S1AP_E_RABList_t E_RABList; S1AP_SecurityContext_t SecurityContext; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; S1AP_CSGMembershipStatus_t CSGMembershipStatus; S1AP_ProSeAuthorized_t ProSeAuthorized; S1AP_UEUserPlaneCIoTSupportIndicator_t UEUserPlaneCIoTSupportIndicator; S1AP_V2XServicesAuthorized_t V2XServicesAuthorized; S1AP_UESidelinkAggregateMaximumBitrate_t UESidelinkAggregateMaximumBitrate; S1AP_EnhancedCoverageRestricted_t EnhancedCoverageRestricted; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_PathSwitchRequestAcknowledgeIEs_t; typedef struct S1AP_PathSwitchRequestFailureIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_PathSwitchRequestFailureIEs__value { S1AP_PathSwitchRequestFailureIEs__value_PR present; union S1AP_PathSwitchRequestFailureIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_Cause_t Cause; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_PathSwitchRequestFailureIEs_t; typedef struct S1AP_HandoverCancelIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_HandoverCancelIEs__value { S1AP_HandoverCancelIEs__value_PR present; union S1AP_HandoverCancelIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_Cause_t Cause; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_HandoverCancelIEs_t; typedef struct S1AP_HandoverCancelAcknowledgeIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_HandoverCancelAcknowledgeIEs__value { S1AP_HandoverCancelAcknowledgeIEs__value_PR present; union S1AP_HandoverCancelAcknowledgeIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_HandoverCancelAcknowledgeIEs_t; typedef struct S1AP_E_RABSetupRequestIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABSetupRequestIEs__value { S1AP_E_RABSetupRequestIEs__value_PR present; union S1AP_E_RABSetupRequestIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_UEAggregateMaximumBitrate_t UEAggregateMaximumBitrate; S1AP_E_RABToBeSetupListBearerSUReq_t E_RABToBeSetupListBearerSUReq; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABSetupRequestIEs_t; typedef struct S1AP_E_RABSetupResponseIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABSetupResponseIEs__value { S1AP_E_RABSetupResponseIEs__value_PR present; union S1AP_E_RABSetupResponseIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_E_RABSetupListBearerSURes_t E_RABSetupListBearerSURes; S1AP_E_RABList_t E_RABList; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABSetupResponseIEs_t; typedef struct S1AP_E_RABModifyRequestIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABModifyRequestIEs__value { S1AP_E_RABModifyRequestIEs__value_PR present; union S1AP_E_RABModifyRequestIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_UEAggregateMaximumBitrate_t UEAggregateMaximumBitrate; S1AP_E_RABToBeModifiedListBearerModReq_t E_RABToBeModifiedListBearerModReq; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABModifyRequestIEs_t; typedef struct S1AP_E_RABModifyResponseIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABModifyResponseIEs__value { S1AP_E_RABModifyResponseIEs__value_PR present; union S1AP_E_RABModifyResponseIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_E_RABModifyListBearerModRes_t E_RABModifyListBearerModRes; S1AP_E_RABList_t E_RABList; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABModifyResponseIEs_t; typedef struct S1AP_E_RABReleaseCommandIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABReleaseCommandIEs__value { S1AP_E_RABReleaseCommandIEs__value_PR present; union S1AP_E_RABReleaseCommandIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_UEAggregateMaximumBitrate_t UEAggregateMaximumBitrate; S1AP_E_RABList_t E_RABList; S1AP_NAS_PDU_t NAS_PDU; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABReleaseCommandIEs_t; typedef struct S1AP_E_RABReleaseResponseIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABReleaseResponseIEs__value { S1AP_E_RABReleaseResponseIEs__value_PR present; union S1AP_E_RABReleaseResponseIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_E_RABReleaseListBearerRelComp_t E_RABReleaseListBearerRelComp; S1AP_E_RABList_t E_RABList; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; S1AP_UserLocationInformation_t UserLocationInformation; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABReleaseResponseIEs_t; typedef struct S1AP_E_RABReleaseIndicationIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABReleaseIndicationIEs__value { S1AP_E_RABReleaseIndicationIEs__value_PR present; union S1AP_E_RABReleaseIndicationIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_E_RABList_t E_RABList; S1AP_UserLocationInformation_t UserLocationInformation; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABReleaseIndicationIEs_t; typedef struct S1AP_InitialContextSetupRequestIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_InitialContextSetupRequestIEs__value { S1AP_InitialContextSetupRequestIEs__value_PR present; union S1AP_InitialContextSetupRequestIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_UEAggregateMaximumBitrate_t UEAggregateMaximumBitrate; S1AP_E_RABToBeSetupListCtxtSUReq_t E_RABToBeSetupListCtxtSUReq; S1AP_UESecurityCapabilities_t UESecurityCapabilities; S1AP_SecurityKey_t SecurityKey; S1AP_TraceActivation_t TraceActivation; S1AP_HandoverRestrictionList_t HandoverRestrictionList; S1AP_UERadioCapability_t UERadioCapability; S1AP_SubscriberProfileIDforRFP_t SubscriberProfileIDforRFP; S1AP_CSFallbackIndicator_t CSFallbackIndicator; S1AP_SRVCCOperationPossible_t SRVCCOperationPossible; S1AP_CSGMembershipStatus_t CSGMembershipStatus; S1AP_LAI_t LAI; S1AP_GUMMEI_t GUMMEI; S1AP_ManagementBasedMDTAllowed_t ManagementBasedMDTAllowed; S1AP_MDTPLMNList_t MDTPLMNList; S1AP_AdditionalCSFallbackIndicator_t AdditionalCSFallbackIndicator; S1AP_Masked_IMEISV_t Masked_IMEISV; S1AP_ExpectedUEBehaviour_t ExpectedUEBehaviour; S1AP_ProSeAuthorized_t ProSeAuthorized; S1AP_UEUserPlaneCIoTSupportIndicator_t UEUserPlaneCIoTSupportIndicator; S1AP_V2XServicesAuthorized_t V2XServicesAuthorized; S1AP_UESidelinkAggregateMaximumBitrate_t UESidelinkAggregateMaximumBitrate; S1AP_EnhancedCoverageRestricted_t EnhancedCoverageRestricted; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_InitialContextSetupRequestIEs_t; typedef struct S1AP_InitialContextSetupResponseIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_InitialContextSetupResponseIEs__value { S1AP_InitialContextSetupResponseIEs__value_PR present; union S1AP_InitialContextSetupResponseIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_E_RABSetupListCtxtSURes_t E_RABSetupListCtxtSURes; S1AP_E_RABList_t E_RABList; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_InitialContextSetupResponseIEs_t; typedef struct S1AP_InitialContextSetupFailureIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_InitialContextSetupFailureIEs__value { S1AP_InitialContextSetupFailureIEs__value_PR present; union S1AP_InitialContextSetupFailureIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_Cause_t Cause; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_InitialContextSetupFailureIEs_t; typedef struct S1AP_PagingIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_PagingIEs__value { S1AP_PagingIEs__value_PR present; union S1AP_PagingIEs__S1AP_value_u { S1AP_UEIdentityIndexValue_t UEIdentityIndexValue; S1AP_UEPagingID_t UEPagingID; S1AP_PagingDRX_t PagingDRX; S1AP_CNDomain_t CNDomain; S1AP_TAIList_t TAIList; S1AP_CSG_IdList_t CSG_IdList; S1AP_PagingPriority_t PagingPriority; S1AP_UERadioCapabilityForPaging_t UERadioCapabilityForPaging; S1AP_AssistanceDataForPaging_t AssistanceDataForPaging; S1AP_Paging_eDRXInformation_t Paging_eDRXInformation; S1AP_Extended_UEIdentityIndexValue_t Extended_UEIdentityIndexValue; S1AP_NB_IoT_Paging_eDRXInformation_t NB_IoT_Paging_eDRXInformation; S1AP_NB_IoT_UEIdentityIndexValue_t NB_IoT_UEIdentityIndexValue; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_PagingIEs_t; typedef struct S1AP_UEContextReleaseRequest_IEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_UEContextReleaseRequest_IEs__value { S1AP_UEContextReleaseRequest_IEs__value_PR present; union S1AP_UEContextReleaseRequest_IEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_Cause_t Cause; S1AP_GWContextReleaseIndication_t GWContextReleaseIndication; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextReleaseRequest_IEs_t; typedef struct S1AP_UEContextReleaseCommand_IEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_UEContextReleaseCommand_IEs__value { S1AP_UEContextReleaseCommand_IEs__value_PR present; union S1AP_UEContextReleaseCommand_IEs__S1AP_value_u { S1AP_UE_S1AP_IDs_t UE_S1AP_IDs; S1AP_Cause_t Cause; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextReleaseCommand_IEs_t; typedef struct S1AP_UEContextReleaseComplete_IEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_UEContextReleaseComplete_IEs__value { S1AP_UEContextReleaseComplete_IEs__value_PR present; union S1AP_UEContextReleaseComplete_IEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; S1AP_UserLocationInformation_t UserLocationInformation; S1AP_InformationOnRecommendedCellsAndENBsForPaging_t InformationOnRecommendedCellsAndENBsForPaging; S1AP_CellIdentifierAndCELevelForCECapableUEs_t CellIdentifierAndCELevelForCECapableUEs; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextReleaseComplete_IEs_t; typedef struct S1AP_UEContextModificationRequestIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_UEContextModificationRequestIEs__value { S1AP_UEContextModificationRequestIEs__value_PR present; union S1AP_UEContextModificationRequestIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_SecurityKey_t SecurityKey; S1AP_SubscriberProfileIDforRFP_t SubscriberProfileIDforRFP; S1AP_UEAggregateMaximumBitrate_t UEAggregateMaximumBitrate; S1AP_CSFallbackIndicator_t CSFallbackIndicator; S1AP_UESecurityCapabilities_t UESecurityCapabilities; S1AP_CSGMembershipStatus_t CSGMembershipStatus; S1AP_LAI_t LAI; S1AP_AdditionalCSFallbackIndicator_t AdditionalCSFallbackIndicator; S1AP_ProSeAuthorized_t ProSeAuthorized; S1AP_SRVCCOperationPossible_t SRVCCOperationPossible; S1AP_SRVCCOperationNotPossible_t SRVCCOperationNotPossible; S1AP_V2XServicesAuthorized_t V2XServicesAuthorized; S1AP_UESidelinkAggregateMaximumBitrate_t UESidelinkAggregateMaximumBitrate; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextModificationRequestIEs_t; typedef struct S1AP_UEContextModificationResponseIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_UEContextModificationResponseIEs__value { S1AP_UEContextModificationResponseIEs__value_PR present; union S1AP_UEContextModificationResponseIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextModificationResponseIEs_t; typedef struct S1AP_UEContextModificationFailureIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_UEContextModificationFailureIEs__value { S1AP_UEContextModificationFailureIEs__value_PR present; union S1AP_UEContextModificationFailureIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_Cause_t Cause; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextModificationFailureIEs_t; typedef struct S1AP_UERadioCapabilityMatchRequestIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_UERadioCapabilityMatchRequestIEs__value { S1AP_UERadioCapabilityMatchRequestIEs__value_PR present; union S1AP_UERadioCapabilityMatchRequestIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_UERadioCapability_t UERadioCapability; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UERadioCapabilityMatchRequestIEs_t; typedef struct S1AP_UERadioCapabilityMatchResponseIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_UERadioCapabilityMatchResponseIEs__value { S1AP_UERadioCapabilityMatchResponseIEs__value_PR present; union S1AP_UERadioCapabilityMatchResponseIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_VoiceSupportMatchIndicator_t VoiceSupportMatchIndicator; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UERadioCapabilityMatchResponseIEs_t; typedef struct S1AP_DownlinkNASTransport_IEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_DownlinkNASTransport_IEs__value { S1AP_DownlinkNASTransport_IEs__value_PR present; union S1AP_DownlinkNASTransport_IEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_NAS_PDU_t NAS_PDU; S1AP_HandoverRestrictionList_t HandoverRestrictionList; S1AP_SubscriberProfileIDforRFP_t SubscriberProfileIDforRFP; S1AP_SRVCCOperationPossible_t SRVCCOperationPossible; S1AP_UERadioCapability_t UERadioCapability; S1AP_DLNASPDUDeliveryAckRequest_t DLNASPDUDeliveryAckRequest; S1AP_EnhancedCoverageRestricted_t EnhancedCoverageRestricted; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_DownlinkNASTransport_IEs_t; typedef struct S1AP_InitialUEMessage_IEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_InitialUEMessage_IEs__value { S1AP_InitialUEMessage_IEs__value_PR present; union S1AP_InitialUEMessage_IEs__S1AP_value_u { S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_NAS_PDU_t NAS_PDU; S1AP_TAI_t TAI; S1AP_EUTRAN_CGI_t EUTRAN_CGI; S1AP_RRC_Establishment_Cause_t RRC_Establishment_Cause; S1AP_S_TMSI_t S_TMSI; S1AP_CSG_Id_t CSG_Id; S1AP_GUMMEI_t GUMMEI; S1AP_CellAccessMode_t CellAccessMode; S1AP_TransportLayerAddress_t TransportLayerAddress; S1AP_RelayNode_Indicator_t RelayNode_Indicator; S1AP_GUMMEIType_t GUMMEIType; S1AP_TunnelInformation_t TunnelInformation; S1AP_LHN_ID_t LHN_ID; S1AP_MME_Group_ID_t MME_Group_ID; S1AP_UE_Usage_Type_t UE_Usage_Type; S1AP_CE_mode_B_SupportIndicator_t CE_mode_B_SupportIndicator; S1AP_DCN_ID_t DCN_ID; S1AP_Coverage_Level_t Coverage_Level; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_InitialUEMessage_IEs_t; typedef struct S1AP_UplinkNASTransport_IEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_UplinkNASTransport_IEs__value { S1AP_UplinkNASTransport_IEs__value_PR present; union S1AP_UplinkNASTransport_IEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_NAS_PDU_t NAS_PDU; S1AP_EUTRAN_CGI_t EUTRAN_CGI; S1AP_TAI_t TAI; S1AP_TransportLayerAddress_t TransportLayerAddress; S1AP_LHN_ID_t LHN_ID; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UplinkNASTransport_IEs_t; typedef struct S1AP_NASNonDeliveryIndication_IEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_NASNonDeliveryIndication_IEs__value { S1AP_NASNonDeliveryIndication_IEs__value_PR present; union S1AP_NASNonDeliveryIndication_IEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_NAS_PDU_t NAS_PDU; S1AP_Cause_t Cause; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_NASNonDeliveryIndication_IEs_t; typedef struct S1AP_RerouteNASRequest_IEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_RerouteNASRequest_IEs__value { S1AP_RerouteNASRequest_IEs__value_PR present; union S1AP_RerouteNASRequest_IEs__S1AP_value_u { S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; OCTET_STRING_t OCTET_STRING; S1AP_MME_Group_ID_t MME_Group_ID; S1AP_Additional_GUTI_t Additional_GUTI; S1AP_UE_Usage_Type_t UE_Usage_Type; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_RerouteNASRequest_IEs_t; typedef struct S1AP_NASDeliveryIndicationIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_NASDeliveryIndicationIEs__value { S1AP_NASDeliveryIndicationIEs__value_PR present; union S1AP_NASDeliveryIndicationIEs__S1AP_value_u { } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_NASDeliveryIndicationIEs_t; typedef struct S1AP_ResetIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_ResetIEs__value { S1AP_ResetIEs__value_PR present; union S1AP_ResetIEs__S1AP_value_u { S1AP_Cause_t Cause; S1AP_ResetType_t ResetType; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ResetIEs_t; typedef struct S1AP_ResetAcknowledgeIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_ResetAcknowledgeIEs__value { S1AP_ResetAcknowledgeIEs__value_PR present; union S1AP_ResetAcknowledgeIEs__S1AP_value_u { S1AP_UE_associatedLogicalS1_ConnectionListResAck_t UE_associatedLogicalS1_ConnectionListResAck; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ResetAcknowledgeIEs_t; typedef struct S1AP_ErrorIndicationIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_ErrorIndicationIEs__value { S1AP_ErrorIndicationIEs__value_PR present; union S1AP_ErrorIndicationIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_Cause_t Cause; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ErrorIndicationIEs_t; typedef struct S1AP_S1SetupRequestIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_S1SetupRequestIEs__value { S1AP_S1SetupRequestIEs__value_PR present; union S1AP_S1SetupRequestIEs__S1AP_value_u { S1AP_Global_ENB_ID_t Global_ENB_ID; S1AP_ENBname_t ENBname; S1AP_SupportedTAs_t SupportedTAs; S1AP_PagingDRX_t PagingDRX; S1AP_CSG_IdList_t CSG_IdList; S1AP_UE_RetentionInformation_t UE_RetentionInformation; S1AP_NB_IoT_DefaultPagingDRX_t NB_IoT_DefaultPagingDRX; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_S1SetupRequestIEs_t; typedef struct S1AP_S1SetupResponseIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_S1SetupResponseIEs__value { S1AP_S1SetupResponseIEs__value_PR present; union S1AP_S1SetupResponseIEs__S1AP_value_u { S1AP_MMEname_t MMEname; S1AP_ServedGUMMEIs_t ServedGUMMEIs; S1AP_RelativeMMECapacity_t RelativeMMECapacity; S1AP_MMERelaySupportIndicator_t MMERelaySupportIndicator; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; S1AP_UE_RetentionInformation_t UE_RetentionInformation; S1AP_ServedDCNs_t ServedDCNs; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_S1SetupResponseIEs_t; typedef struct S1AP_S1SetupFailureIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_S1SetupFailureIEs__value { S1AP_S1SetupFailureIEs__value_PR present; union S1AP_S1SetupFailureIEs__S1AP_value_u { S1AP_Cause_t Cause; S1AP_TimeToWait_t TimeToWait; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_S1SetupFailureIEs_t; typedef struct S1AP_ENBConfigurationUpdateIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_ENBConfigurationUpdateIEs__value { S1AP_ENBConfigurationUpdateIEs__value_PR present; union S1AP_ENBConfigurationUpdateIEs__S1AP_value_u { S1AP_ENBname_t ENBname; S1AP_SupportedTAs_t SupportedTAs; S1AP_CSG_IdList_t CSG_IdList; S1AP_PagingDRX_t PagingDRX; S1AP_NB_IoT_DefaultPagingDRX_t NB_IoT_DefaultPagingDRX; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ENBConfigurationUpdateIEs_t; typedef struct S1AP_ENBConfigurationUpdateAcknowledgeIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_ENBConfigurationUpdateAcknowledgeIEs__value { S1AP_ENBConfigurationUpdateAcknowledgeIEs__value_PR present; union S1AP_ENBConfigurationUpdateAcknowledgeIEs__S1AP_value_u { S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ENBConfigurationUpdateAcknowledgeIEs_t; typedef struct S1AP_ENBConfigurationUpdateFailureIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_ENBConfigurationUpdateFailureIEs__value { S1AP_ENBConfigurationUpdateFailureIEs__value_PR present; union S1AP_ENBConfigurationUpdateFailureIEs__S1AP_value_u { S1AP_Cause_t Cause; S1AP_TimeToWait_t TimeToWait; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ENBConfigurationUpdateFailureIEs_t; typedef struct S1AP_MMEConfigurationUpdateIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_MMEConfigurationUpdateIEs__value { S1AP_MMEConfigurationUpdateIEs__value_PR present; union S1AP_MMEConfigurationUpdateIEs__S1AP_value_u { S1AP_MMEname_t MMEname; S1AP_ServedGUMMEIs_t ServedGUMMEIs; S1AP_RelativeMMECapacity_t RelativeMMECapacity; S1AP_ServedDCNs_t ServedDCNs; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MMEConfigurationUpdateIEs_t; typedef struct S1AP_MMEConfigurationUpdateAcknowledgeIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_MMEConfigurationUpdateAcknowledgeIEs__value { S1AP_MMEConfigurationUpdateAcknowledgeIEs__value_PR present; union S1AP_MMEConfigurationUpdateAcknowledgeIEs__S1AP_value_u { S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MMEConfigurationUpdateAcknowledgeIEs_t; typedef struct S1AP_MMEConfigurationUpdateFailureIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_MMEConfigurationUpdateFailureIEs__value { S1AP_MMEConfigurationUpdateFailureIEs__value_PR present; union S1AP_MMEConfigurationUpdateFailureIEs__S1AP_value_u { S1AP_Cause_t Cause; S1AP_TimeToWait_t TimeToWait; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MMEConfigurationUpdateFailureIEs_t; typedef struct S1AP_DownlinkS1cdma2000tunnellingIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_DownlinkS1cdma2000tunnellingIEs__value { S1AP_DownlinkS1cdma2000tunnellingIEs__value_PR present; union S1AP_DownlinkS1cdma2000tunnellingIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_E_RABSubjecttoDataForwardingList_t E_RABSubjecttoDataForwardingList; S1AP_Cdma2000HOStatus_t Cdma2000HOStatus; S1AP_Cdma2000RATType_t Cdma2000RATType; S1AP_Cdma2000PDU_t Cdma2000PDU; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_DownlinkS1cdma2000tunnellingIEs_t; typedef struct S1AP_UplinkS1cdma2000tunnellingIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_UplinkS1cdma2000tunnellingIEs__value { S1AP_UplinkS1cdma2000tunnellingIEs__value_PR present; union S1AP_UplinkS1cdma2000tunnellingIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_Cdma2000RATType_t Cdma2000RATType; S1AP_Cdma2000SectorID_t Cdma2000SectorID; S1AP_Cdma2000HORequiredIndication_t Cdma2000HORequiredIndication; S1AP_Cdma2000OneXSRVCCInfo_t Cdma2000OneXSRVCCInfo; S1AP_Cdma2000OneXRAND_t Cdma2000OneXRAND; S1AP_Cdma2000PDU_t Cdma2000PDU; S1AP_EUTRANRoundTripDelayEstimationInfo_t EUTRANRoundTripDelayEstimationInfo; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UplinkS1cdma2000tunnellingIEs_t; typedef struct S1AP_UECapabilityInfoIndicationIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_UECapabilityInfoIndicationIEs__value { S1AP_UECapabilityInfoIndicationIEs__value_PR present; union S1AP_UECapabilityInfoIndicationIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_UERadioCapability_t UERadioCapability; S1AP_UERadioCapabilityForPaging_t UERadioCapabilityForPaging; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UECapabilityInfoIndicationIEs_t; typedef struct S1AP_ENBStatusTransferIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_ENBStatusTransferIEs__value { S1AP_ENBStatusTransferIEs__value_PR present; union S1AP_ENBStatusTransferIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_ENB_StatusTransfer_TransparentContainer_t ENB_StatusTransfer_TransparentContainer; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ENBStatusTransferIEs_t; typedef struct S1AP_MMEStatusTransferIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_MMEStatusTransferIEs__value { S1AP_MMEStatusTransferIEs__value_PR present; union S1AP_MMEStatusTransferIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_ENB_StatusTransfer_TransparentContainer_t ENB_StatusTransfer_TransparentContainer; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MMEStatusTransferIEs_t; typedef struct S1AP_TraceStartIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_TraceStartIEs__value { S1AP_TraceStartIEs__value_PR present; union S1AP_TraceStartIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_TraceActivation_t TraceActivation; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TraceStartIEs_t; typedef struct S1AP_TraceFailureIndicationIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_TraceFailureIndicationIEs__value { S1AP_TraceFailureIndicationIEs__value_PR present; union S1AP_TraceFailureIndicationIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_E_UTRAN_Trace_ID_t E_UTRAN_Trace_ID; S1AP_Cause_t Cause; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TraceFailureIndicationIEs_t; typedef struct S1AP_DeactivateTraceIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_DeactivateTraceIEs__value { S1AP_DeactivateTraceIEs__value_PR present; union S1AP_DeactivateTraceIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_E_UTRAN_Trace_ID_t E_UTRAN_Trace_ID; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_DeactivateTraceIEs_t; typedef struct S1AP_CellTrafficTraceIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_CellTrafficTraceIEs__value { S1AP_CellTrafficTraceIEs__value_PR present; union S1AP_CellTrafficTraceIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_E_UTRAN_Trace_ID_t E_UTRAN_Trace_ID; S1AP_EUTRAN_CGI_t EUTRAN_CGI; S1AP_TransportLayerAddress_t TransportLayerAddress; S1AP_PrivacyIndicator_t PrivacyIndicator; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_CellTrafficTraceIEs_t; typedef struct S1AP_LocationReportingControlIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_LocationReportingControlIEs__value { S1AP_LocationReportingControlIEs__value_PR present; union S1AP_LocationReportingControlIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_RequestType_t RequestType; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_LocationReportingControlIEs_t; typedef struct S1AP_LocationReportingFailureIndicationIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_LocationReportingFailureIndicationIEs__value { S1AP_LocationReportingFailureIndicationIEs__value_PR present; union S1AP_LocationReportingFailureIndicationIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_Cause_t Cause; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_LocationReportingFailureIndicationIEs_t; typedef struct S1AP_LocationReportIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_LocationReportIEs__value { S1AP_LocationReportIEs__value_PR present; union S1AP_LocationReportIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_EUTRAN_CGI_t EUTRAN_CGI; S1AP_TAI_t TAI; S1AP_RequestType_t RequestType; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_LocationReportIEs_t; typedef struct S1AP_OverloadStartIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_OverloadStartIEs__value { S1AP_OverloadStartIEs__value_PR present; union S1AP_OverloadStartIEs__S1AP_value_u { S1AP_OverloadResponse_t OverloadResponse; S1AP_GUMMEIList_t GUMMEIList; S1AP_TrafficLoadReductionIndication_t TrafficLoadReductionIndication; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_OverloadStartIEs_t; typedef struct S1AP_OverloadStopIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_OverloadStopIEs__value { S1AP_OverloadStopIEs__value_PR present; union S1AP_OverloadStopIEs__S1AP_value_u { S1AP_GUMMEIList_t GUMMEIList; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_OverloadStopIEs_t; typedef struct S1AP_WriteReplaceWarningRequestIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_WriteReplaceWarningRequestIEs__value { S1AP_WriteReplaceWarningRequestIEs__value_PR present; union S1AP_WriteReplaceWarningRequestIEs__S1AP_value_u { S1AP_MessageIdentifier_t MessageIdentifier; S1AP_SerialNumber_t SerialNumber; S1AP_WarningAreaList_t WarningAreaList; S1AP_RepetitionPeriod_t RepetitionPeriod; S1AP_ExtendedRepetitionPeriod_t ExtendedRepetitionPeriod; S1AP_NumberofBroadcastRequest_t NumberofBroadcastRequest; S1AP_WarningType_t WarningType; S1AP_WarningSecurityInfo_t WarningSecurityInfo; S1AP_DataCodingScheme_t DataCodingScheme; S1AP_WarningMessageContents_t WarningMessageContents; S1AP_ConcurrentWarningMessageIndicator_t ConcurrentWarningMessageIndicator; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_WriteReplaceWarningRequestIEs_t; typedef struct S1AP_WriteReplaceWarningResponseIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_WriteReplaceWarningResponseIEs__value { S1AP_WriteReplaceWarningResponseIEs__value_PR present; union S1AP_WriteReplaceWarningResponseIEs__S1AP_value_u { S1AP_MessageIdentifier_t MessageIdentifier; S1AP_SerialNumber_t SerialNumber; S1AP_BroadcastCompletedAreaList_t BroadcastCompletedAreaList; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_WriteReplaceWarningResponseIEs_t; typedef struct S1AP_ENBDirectInformationTransferIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_ENBDirectInformationTransferIEs__value { S1AP_ENBDirectInformationTransferIEs__value_PR present; union S1AP_ENBDirectInformationTransferIEs__S1AP_value_u { S1AP_Inter_SystemInformationTransferType_t Inter_SystemInformationTransferType; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ENBDirectInformationTransferIEs_t; typedef struct S1AP_MMEDirectInformationTransferIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_MMEDirectInformationTransferIEs__value { S1AP_MMEDirectInformationTransferIEs__value_PR present; union S1AP_MMEDirectInformationTransferIEs__S1AP_value_u { S1AP_Inter_SystemInformationTransferType_t Inter_SystemInformationTransferType; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MMEDirectInformationTransferIEs_t; typedef struct S1AP_ENBConfigurationTransferIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_ENBConfigurationTransferIEs__value { S1AP_ENBConfigurationTransferIEs__value_PR present; union S1AP_ENBConfigurationTransferIEs__S1AP_value_u { S1AP_SONConfigurationTransfer_t SONConfigurationTransfer; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ENBConfigurationTransferIEs_t; typedef struct S1AP_MMEConfigurationTransferIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_MMEConfigurationTransferIEs__value { S1AP_MMEConfigurationTransferIEs__value_PR present; union S1AP_MMEConfigurationTransferIEs__S1AP_value_u { S1AP_SONConfigurationTransfer_t SONConfigurationTransfer; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MMEConfigurationTransferIEs_t; typedef struct S1AP_KillRequestIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_KillRequestIEs__value { S1AP_KillRequestIEs__value_PR present; union S1AP_KillRequestIEs__S1AP_value_u { S1AP_MessageIdentifier_t MessageIdentifier; S1AP_SerialNumber_t SerialNumber; S1AP_WarningAreaList_t WarningAreaList; S1AP_KillAllWarningMessages_t KillAllWarningMessages; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_KillRequestIEs_t; typedef struct S1AP_KillResponseIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_KillResponseIEs__value { S1AP_KillResponseIEs__value_PR present; union S1AP_KillResponseIEs__S1AP_value_u { S1AP_MessageIdentifier_t MessageIdentifier; S1AP_SerialNumber_t SerialNumber; S1AP_BroadcastCancelledAreaList_t BroadcastCancelledAreaList; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_KillResponseIEs_t; typedef struct S1AP_PWSRestartIndicationIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_PWSRestartIndicationIEs__value { S1AP_PWSRestartIndicationIEs__value_PR present; union S1AP_PWSRestartIndicationIEs__S1AP_value_u { S1AP_ECGIListForRestart_t ECGIListForRestart; S1AP_Global_ENB_ID_t Global_ENB_ID; S1AP_TAIListForRestart_t TAIListForRestart; S1AP_EmergencyAreaIDListForRestart_t EmergencyAreaIDListForRestart; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_PWSRestartIndicationIEs_t; typedef struct S1AP_PWSFailureIndicationIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_PWSFailureIndicationIEs__value { S1AP_PWSFailureIndicationIEs__value_PR present; union S1AP_PWSFailureIndicationIEs__S1AP_value_u { S1AP_PWSfailedECGIList_t PWSfailedECGIList; S1AP_Global_ENB_ID_t Global_ENB_ID; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_PWSFailureIndicationIEs_t; typedef struct S1AP_DownlinkUEAssociatedLPPaTransport_IEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_DownlinkUEAssociatedLPPaTransport_IEs__value { S1AP_DownlinkUEAssociatedLPPaTransport_IEs__value_PR present; union S1AP_DownlinkUEAssociatedLPPaTransport_IEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_Routing_ID_t Routing_ID; S1AP_LPPa_PDU_t LPPa_PDU; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_DownlinkUEAssociatedLPPaTransport_IEs_t; typedef struct S1AP_UplinkUEAssociatedLPPaTransport_IEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_UplinkUEAssociatedLPPaTransport_IEs__value { S1AP_UplinkUEAssociatedLPPaTransport_IEs__value_PR present; union S1AP_UplinkUEAssociatedLPPaTransport_IEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_Routing_ID_t Routing_ID; S1AP_LPPa_PDU_t LPPa_PDU; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UplinkUEAssociatedLPPaTransport_IEs_t; typedef struct S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs__value { S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs__value_PR present; union S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs__S1AP_value_u { S1AP_Routing_ID_t Routing_ID; S1AP_LPPa_PDU_t LPPa_PDU; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs_t; typedef struct S1AP_UplinkNonUEAssociatedLPPaTransport_IEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_UplinkNonUEAssociatedLPPaTransport_IEs__value { S1AP_UplinkNonUEAssociatedLPPaTransport_IEs__value_PR present; union S1AP_UplinkNonUEAssociatedLPPaTransport_IEs__S1AP_value_u { S1AP_Routing_ID_t Routing_ID; S1AP_LPPa_PDU_t LPPa_PDU; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UplinkNonUEAssociatedLPPaTransport_IEs_t; typedef struct S1AP_E_RABModificationIndicationIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABModificationIndicationIEs__value { S1AP_E_RABModificationIndicationIEs__value_PR present; union S1AP_E_RABModificationIndicationIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_E_RABToBeModifiedListBearerModInd_t E_RABToBeModifiedListBearerModInd; S1AP_E_RABNotToBeModifiedListBearerModInd_t E_RABNotToBeModifiedListBearerModInd; S1AP_CSGMembershipInfo_t CSGMembershipInfo; S1AP_TunnelInformation_t TunnelInformation; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABModificationIndicationIEs_t; typedef struct S1AP_E_RABModificationConfirmIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABModificationConfirmIEs__value { S1AP_E_RABModificationConfirmIEs__value_PR present; union S1AP_E_RABModificationConfirmIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_E_RABModifyListBearerModConf_t E_RABModifyListBearerModConf; S1AP_E_RABList_t E_RABList; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; S1AP_CSGMembershipStatus_t CSGMembershipStatus; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABModificationConfirmIEs_t; typedef struct S1AP_UEContextModificationIndicationIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_UEContextModificationIndicationIEs__value { S1AP_UEContextModificationIndicationIEs__value_PR present; union S1AP_UEContextModificationIndicationIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_CSGMembershipInfo_t CSGMembershipInfo; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextModificationIndicationIEs_t; typedef struct S1AP_UEContextModificationConfirmIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_UEContextModificationConfirmIEs__value { S1AP_UEContextModificationConfirmIEs__value_PR present; union S1AP_UEContextModificationConfirmIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_CSGMembershipStatus_t CSGMembershipStatus; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextModificationConfirmIEs_t; typedef struct S1AP_UEContextSuspendRequestIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_UEContextSuspendRequestIEs__value { S1AP_UEContextSuspendRequestIEs__value_PR present; union S1AP_UEContextSuspendRequestIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_InformationOnRecommendedCellsAndENBsForPaging_t InformationOnRecommendedCellsAndENBsForPaging; S1AP_CellIdentifierAndCELevelForCECapableUEs_t CellIdentifierAndCELevelForCECapableUEs; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextSuspendRequestIEs_t; typedef struct S1AP_UEContextSuspendResponseIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_UEContextSuspendResponseIEs__value { S1AP_UEContextSuspendResponseIEs__value_PR present; union S1AP_UEContextSuspendResponseIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; S1AP_SecurityContext_t SecurityContext; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextSuspendResponseIEs_t; typedef struct S1AP_UEContextResumeRequestIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_UEContextResumeRequestIEs__value { S1AP_UEContextResumeRequestIEs__value_PR present; union S1AP_UEContextResumeRequestIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_E_RABFailedToResumeListResumeReq_t E_RABFailedToResumeListResumeReq; S1AP_RRC_Establishment_Cause_t RRC_Establishment_Cause; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextResumeRequestIEs_t; typedef struct S1AP_UEContextResumeResponseIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_UEContextResumeResponseIEs__value { S1AP_UEContextResumeResponseIEs__value_PR present; union S1AP_UEContextResumeResponseIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_E_RABFailedToResumeListResumeRes_t E_RABFailedToResumeListResumeRes; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; S1AP_SecurityContext_t SecurityContext; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextResumeResponseIEs_t; typedef struct S1AP_UEContextResumeFailureIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_UEContextResumeFailureIEs__value { S1AP_UEContextResumeFailureIEs__value_PR present; union S1AP_UEContextResumeFailureIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_Cause_t Cause; S1AP_CriticalityDiagnostics_t CriticalityDiagnostics; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextResumeFailureIEs_t; typedef struct S1AP_ConnectionEstablishmentIndicationIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_ConnectionEstablishmentIndicationIEs__value { S1AP_ConnectionEstablishmentIndicationIEs__value_PR present; union S1AP_ConnectionEstablishmentIndicationIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_UERadioCapability_t UERadioCapability; S1AP_EnhancedCoverageRestricted_t EnhancedCoverageRestricted; S1AP_DL_CP_SecurityInformation_t DL_CP_SecurityInformation; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ConnectionEstablishmentIndicationIEs_t; typedef struct S1AP_RetrieveUEInformationIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_RetrieveUEInformationIEs__value { S1AP_RetrieveUEInformationIEs__value_PR present; union S1AP_RetrieveUEInformationIEs__S1AP_value_u { S1AP_S_TMSI_t S_TMSI; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_RetrieveUEInformationIEs_t; typedef struct S1AP_UEInformationTransferIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_UEInformationTransferIEs__value { S1AP_UEInformationTransferIEs__value_PR present; union S1AP_UEInformationTransferIEs__S1AP_value_u { S1AP_S_TMSI_t S_TMSI; S1AP_E_RABLevelQoSParameters_t E_RABLevelQoSParameters; S1AP_UERadioCapability_t UERadioCapability; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEInformationTransferIEs_t; typedef struct S1AP_ENBCPRelocationIndicationIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_ENBCPRelocationIndicationIEs__value { S1AP_ENBCPRelocationIndicationIEs__value_PR present; union S1AP_ENBCPRelocationIndicationIEs__S1AP_value_u { S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; S1AP_S_TMSI_t S_TMSI; S1AP_EUTRAN_CGI_t EUTRAN_CGI; S1AP_TAI_t TAI; S1AP_UL_CP_SecurityInformation_t UL_CP_SecurityInformation; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ENBCPRelocationIndicationIEs_t; typedef struct S1AP_MMECPRelocationIndicationIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_MMECPRelocationIndicationIEs__value { S1AP_MMECPRelocationIndicationIEs__value_PR present; union S1AP_MMECPRelocationIndicationIEs__S1AP_value_u { S1AP_MME_UE_S1AP_ID_t MME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t ENB_UE_S1AP_ID; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_MMECPRelocationIndicationIEs_t; typedef struct S1AP_E_RABDataForwardingItemIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABDataForwardingItemIEs__value { S1AP_E_RABDataForwardingItemIEs__value_PR present; union S1AP_E_RABDataForwardingItemIEs__S1AP_value_u { S1AP_E_RABDataForwardingItem_t E_RABDataForwardingItem; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABDataForwardingItemIEs_t; typedef struct S1AP_E_RABToBeSetupItemHOReqIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABToBeSetupItemHOReqIEs__value { S1AP_E_RABToBeSetupItemHOReqIEs__value_PR present; union S1AP_E_RABToBeSetupItemHOReqIEs__S1AP_value_u { S1AP_E_RABToBeSetupItemHOReq_t E_RABToBeSetupItemHOReq; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeSetupItemHOReqIEs_t; typedef struct S1AP_E_RABAdmittedItemIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABAdmittedItemIEs__value { S1AP_E_RABAdmittedItemIEs__value_PR present; union S1AP_E_RABAdmittedItemIEs__S1AP_value_u { S1AP_E_RABAdmittedItem_t E_RABAdmittedItem; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABAdmittedItemIEs_t; typedef struct S1AP_E_RABFailedtoSetupItemHOReqAckIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABFailedtoSetupItemHOReqAckIEs__value { S1AP_E_RABFailedtoSetupItemHOReqAckIEs__value_PR present; union S1AP_E_RABFailedtoSetupItemHOReqAckIEs__S1AP_value_u { S1AP_E_RABFailedToSetupItemHOReqAck_t E_RABFailedToSetupItemHOReqAck; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABFailedtoSetupItemHOReqAckIEs_t; typedef struct S1AP_E_RABToBeSwitchedDLItemIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABToBeSwitchedDLItemIEs__value { S1AP_E_RABToBeSwitchedDLItemIEs__value_PR present; union S1AP_E_RABToBeSwitchedDLItemIEs__S1AP_value_u { S1AP_E_RABToBeSwitchedDLItem_t E_RABToBeSwitchedDLItem; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeSwitchedDLItemIEs_t; typedef struct S1AP_E_RABToBeSwitchedULItemIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABToBeSwitchedULItemIEs__value { S1AP_E_RABToBeSwitchedULItemIEs__value_PR present; union S1AP_E_RABToBeSwitchedULItemIEs__S1AP_value_u { S1AP_E_RABToBeSwitchedULItem_t E_RABToBeSwitchedULItem; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeSwitchedULItemIEs_t; typedef struct S1AP_E_RABToBeModifiedItemBearerModIndIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABToBeModifiedItemBearerModIndIEs__value { S1AP_E_RABToBeModifiedItemBearerModIndIEs__value_PR present; union S1AP_E_RABToBeModifiedItemBearerModIndIEs__S1AP_value_u { S1AP_E_RABToBeModifiedItemBearerModInd_t E_RABToBeModifiedItemBearerModInd; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABToBeModifiedItemBearerModIndIEs_t; typedef struct S1AP_E_RABNotToBeModifiedItemBearerModIndIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABNotToBeModifiedItemBearerModIndIEs__value { S1AP_E_RABNotToBeModifiedItemBearerModIndIEs__value_PR present; union S1AP_E_RABNotToBeModifiedItemBearerModIndIEs__S1AP_value_u { S1AP_E_RABNotToBeModifiedItemBearerModInd_t E_RABNotToBeModifiedItemBearerModInd; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_t; typedef struct S1AP_E_RABFailedToResumeItemResumeReqIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABFailedToResumeItemResumeReqIEs__value { S1AP_E_RABFailedToResumeItemResumeReqIEs__value_PR present; union S1AP_E_RABFailedToResumeItemResumeReqIEs__S1AP_value_u { S1AP_E_RABFailedToResumeItemResumeReq_t E_RABFailedToResumeItemResumeReq; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABFailedToResumeItemResumeReqIEs_t; typedef struct S1AP_E_RABFailedToResumeItemResumeResIEs { S1AP_ProtocolIE_ID_t id; S1AP_Criticality_t criticality; struct S1AP_E_RABFailedToResumeItemResumeResIEs__value { S1AP_E_RABFailedToResumeItemResumeResIEs__value_PR present; union S1AP_E_RABFailedToResumeItemResumeResIEs__S1AP_value_u { S1AP_E_RABFailedToResumeItemResumeRes_t E_RABFailedToResumeItemResumeRes; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_E_RABFailedToResumeItemResumeResIEs_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupItemBearerSUReqIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSetupItemBearerSUReqIEs_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSetupItemBearerSUReqIEs_1[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupItemBearerSUResIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABSetupItemBearerSUResIEs_specs_5; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABSetupItemBearerSUResIEs_5[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeModifiedItemBearerModReqIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeModifiedItemBearerModReqIEs_specs_9; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeModifiedItemBearerModReqIEs_9[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyItemBearerModResIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModifyItemBearerModResIEs_specs_13; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABModifyItemBearerModResIEs_13[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABReleaseItemBearerRelCompIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABReleaseItemBearerRelCompIEs_specs_17; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABReleaseItemBearerRelCompIEs_17[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupItemCtxtSUReqIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSetupItemCtxtSUReqIEs_specs_21; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSetupItemCtxtSUReqIEs_21[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupItemCtxtSUResIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABSetupItemCtxtSUResIEs_specs_25; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABSetupItemCtxtSUResIEs_25[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_TAIItemIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_TAIItemIEs_specs_29; extern asn_TYPE_member_t asn_MBR_S1AP_TAIItemIEs_29[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemRes; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UE_associatedLogicalS1_ConnectionItemRes_specs_33; extern asn_TYPE_member_t asn_MBR_S1AP_UE_associatedLogicalS1_ConnectionItemRes_33[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItemResAck; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UE_associatedLogicalS1_ConnectionItemResAck_specs_37; extern asn_TYPE_member_t asn_MBR_S1AP_UE_associatedLogicalS1_ConnectionItemResAck_37[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyItemBearerModConfIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModifyItemBearerModConfIEs_specs_41; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABModifyItemBearerModConfIEs_41[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_specs_45; extern asn_TYPE_member_t asn_MBR_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_45[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABInformationListIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABInformationListIEs_specs_49; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABInformationListIEs_49[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABItemIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABItemIEs_specs_53; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABItemIEs_53[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_MDTMode_ExtensionIE; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_MDTMode_ExtensionIE_specs_57; extern asn_TYPE_member_t asn_MBR_S1AP_MDTMode_ExtensionIE_57[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedCellItemIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_RecommendedCellItemIEs_specs_61; extern asn_TYPE_member_t asn_MBR_S1AP_RecommendedCellItemIEs_61[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedENBItemIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_RecommendedENBItemIEs_specs_65; extern asn_TYPE_member_t asn_MBR_S1AP_RecommendedENBItemIEs_65[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_SONInformation_ExtensionIE; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_SONInformation_ExtensionIE_specs_69; extern asn_TYPE_member_t asn_MBR_S1AP_SONInformation_ExtensionIE_69[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverRequiredIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverRequiredIEs_specs_73; extern asn_TYPE_member_t asn_MBR_S1AP_HandoverRequiredIEs_73[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverCommandIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverCommandIEs_specs_77; extern asn_TYPE_member_t asn_MBR_S1AP_HandoverCommandIEs_77[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverPreparationFailureIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverPreparationFailureIEs_specs_81; extern asn_TYPE_member_t asn_MBR_S1AP_HandoverPreparationFailureIEs_81[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverRequestIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverRequestIEs_specs_85; extern asn_TYPE_member_t asn_MBR_S1AP_HandoverRequestIEs_85[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverRequestAcknowledgeIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverRequestAcknowledgeIEs_specs_89; extern asn_TYPE_member_t asn_MBR_S1AP_HandoverRequestAcknowledgeIEs_89[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverFailureIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverFailureIEs_specs_93; extern asn_TYPE_member_t asn_MBR_S1AP_HandoverFailureIEs_93[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverNotifyIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverNotifyIEs_specs_97; extern asn_TYPE_member_t asn_MBR_S1AP_HandoverNotifyIEs_97[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_PathSwitchRequestIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_PathSwitchRequestIEs_specs_101; extern asn_TYPE_member_t asn_MBR_S1AP_PathSwitchRequestIEs_101[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_PathSwitchRequestAcknowledgeIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_PathSwitchRequestAcknowledgeIEs_specs_105; extern asn_TYPE_member_t asn_MBR_S1AP_PathSwitchRequestAcknowledgeIEs_105[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_PathSwitchRequestFailureIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_PathSwitchRequestFailureIEs_specs_109; extern asn_TYPE_member_t asn_MBR_S1AP_PathSwitchRequestFailureIEs_109[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverCancelIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverCancelIEs_specs_113; extern asn_TYPE_member_t asn_MBR_S1AP_HandoverCancelIEs_113[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_HandoverCancelAcknowledgeIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_HandoverCancelAcknowledgeIEs_specs_117; extern asn_TYPE_member_t asn_MBR_S1AP_HandoverCancelAcknowledgeIEs_117[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupRequestIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABSetupRequestIEs_specs_121; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABSetupRequestIEs_121[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABSetupResponseIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABSetupResponseIEs_specs_125; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABSetupResponseIEs_125[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyRequestIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModifyRequestIEs_specs_129; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABModifyRequestIEs_129[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModifyResponseIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModifyResponseIEs_specs_133; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABModifyResponseIEs_133[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABReleaseCommandIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABReleaseCommandIEs_specs_137; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABReleaseCommandIEs_137[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABReleaseResponseIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABReleaseResponseIEs_specs_141; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABReleaseResponseIEs_141[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABReleaseIndicationIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABReleaseIndicationIEs_specs_145; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABReleaseIndicationIEs_145[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_InitialContextSetupRequestIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_InitialContextSetupRequestIEs_specs_149; extern asn_TYPE_member_t asn_MBR_S1AP_InitialContextSetupRequestIEs_149[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_InitialContextSetupResponseIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_InitialContextSetupResponseIEs_specs_153; extern asn_TYPE_member_t asn_MBR_S1AP_InitialContextSetupResponseIEs_153[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_InitialContextSetupFailureIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_InitialContextSetupFailureIEs_specs_157; extern asn_TYPE_member_t asn_MBR_S1AP_InitialContextSetupFailureIEs_157[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_PagingIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_PagingIEs_specs_161; extern asn_TYPE_member_t asn_MBR_S1AP_PagingIEs_161[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextReleaseRequest_IEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextReleaseRequest_IEs_specs_165; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextReleaseRequest_IEs_165[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextReleaseCommand_IEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextReleaseCommand_IEs_specs_169; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextReleaseCommand_IEs_169[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextReleaseComplete_IEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextReleaseComplete_IEs_specs_173; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextReleaseComplete_IEs_173[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextModificationRequestIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextModificationRequestIEs_specs_177; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextModificationRequestIEs_177[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextModificationResponseIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextModificationResponseIEs_specs_181; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextModificationResponseIEs_181[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextModificationFailureIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextModificationFailureIEs_specs_185; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextModificationFailureIEs_185[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UERadioCapabilityMatchRequestIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UERadioCapabilityMatchRequestIEs_specs_189; extern asn_TYPE_member_t asn_MBR_S1AP_UERadioCapabilityMatchRequestIEs_189[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UERadioCapabilityMatchResponseIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UERadioCapabilityMatchResponseIEs_specs_193; extern asn_TYPE_member_t asn_MBR_S1AP_UERadioCapabilityMatchResponseIEs_193[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_DownlinkNASTransport_IEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_DownlinkNASTransport_IEs_specs_197; extern asn_TYPE_member_t asn_MBR_S1AP_DownlinkNASTransport_IEs_197[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_InitialUEMessage_IEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_InitialUEMessage_IEs_specs_201; extern asn_TYPE_member_t asn_MBR_S1AP_InitialUEMessage_IEs_201[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UplinkNASTransport_IEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UplinkNASTransport_IEs_specs_205; extern asn_TYPE_member_t asn_MBR_S1AP_UplinkNASTransport_IEs_205[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_NASNonDeliveryIndication_IEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_NASNonDeliveryIndication_IEs_specs_209; extern asn_TYPE_member_t asn_MBR_S1AP_NASNonDeliveryIndication_IEs_209[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_RerouteNASRequest_IEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_RerouteNASRequest_IEs_specs_213; extern asn_TYPE_member_t asn_MBR_S1AP_RerouteNASRequest_IEs_213[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_NASDeliveryIndicationIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_NASDeliveryIndicationIEs_specs_217; extern asn_TYPE_member_t asn_MBR_S1AP_NASDeliveryIndicationIEs_217[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ResetIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ResetIEs_specs_221; extern asn_TYPE_member_t asn_MBR_S1AP_ResetIEs_221[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ResetAcknowledgeIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ResetAcknowledgeIEs_specs_225; extern asn_TYPE_member_t asn_MBR_S1AP_ResetAcknowledgeIEs_225[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ErrorIndicationIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ErrorIndicationIEs_specs_229; extern asn_TYPE_member_t asn_MBR_S1AP_ErrorIndicationIEs_229[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_S1SetupRequestIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_S1SetupRequestIEs_specs_233; extern asn_TYPE_member_t asn_MBR_S1AP_S1SetupRequestIEs_233[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_S1SetupResponseIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_S1SetupResponseIEs_specs_237; extern asn_TYPE_member_t asn_MBR_S1AP_S1SetupResponseIEs_237[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_S1SetupFailureIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_S1SetupFailureIEs_specs_241; extern asn_TYPE_member_t asn_MBR_S1AP_S1SetupFailureIEs_241[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENBConfigurationUpdateIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBConfigurationUpdateIEs_specs_245; extern asn_TYPE_member_t asn_MBR_S1AP_ENBConfigurationUpdateIEs_245[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENBConfigurationUpdateAcknowledgeIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBConfigurationUpdateAcknowledgeIEs_specs_249; extern asn_TYPE_member_t asn_MBR_S1AP_ENBConfigurationUpdateAcknowledgeIEs_249[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENBConfigurationUpdateFailureIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBConfigurationUpdateFailureIEs_specs_253; extern asn_TYPE_member_t asn_MBR_S1AP_ENBConfigurationUpdateFailureIEs_253[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_MMEConfigurationUpdateIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEConfigurationUpdateIEs_specs_257; extern asn_TYPE_member_t asn_MBR_S1AP_MMEConfigurationUpdateIEs_257[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_MMEConfigurationUpdateAcknowledgeIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEConfigurationUpdateAcknowledgeIEs_specs_261; extern asn_TYPE_member_t asn_MBR_S1AP_MMEConfigurationUpdateAcknowledgeIEs_261[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_MMEConfigurationUpdateFailureIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEConfigurationUpdateFailureIEs_specs_265; extern asn_TYPE_member_t asn_MBR_S1AP_MMEConfigurationUpdateFailureIEs_265[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_DownlinkS1cdma2000tunnellingIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_DownlinkS1cdma2000tunnellingIEs_specs_269; extern asn_TYPE_member_t asn_MBR_S1AP_DownlinkS1cdma2000tunnellingIEs_269[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UplinkS1cdma2000tunnellingIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UplinkS1cdma2000tunnellingIEs_specs_273; extern asn_TYPE_member_t asn_MBR_S1AP_UplinkS1cdma2000tunnellingIEs_273[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UECapabilityInfoIndicationIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UECapabilityInfoIndicationIEs_specs_277; extern asn_TYPE_member_t asn_MBR_S1AP_UECapabilityInfoIndicationIEs_277[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENBStatusTransferIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBStatusTransferIEs_specs_281; extern asn_TYPE_member_t asn_MBR_S1AP_ENBStatusTransferIEs_281[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_MMEStatusTransferIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEStatusTransferIEs_specs_285; extern asn_TYPE_member_t asn_MBR_S1AP_MMEStatusTransferIEs_285[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_TraceStartIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_TraceStartIEs_specs_289; extern asn_TYPE_member_t asn_MBR_S1AP_TraceStartIEs_289[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_TraceFailureIndicationIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_TraceFailureIndicationIEs_specs_293; extern asn_TYPE_member_t asn_MBR_S1AP_TraceFailureIndicationIEs_293[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_DeactivateTraceIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_DeactivateTraceIEs_specs_297; extern asn_TYPE_member_t asn_MBR_S1AP_DeactivateTraceIEs_297[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_CellTrafficTraceIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_CellTrafficTraceIEs_specs_301; extern asn_TYPE_member_t asn_MBR_S1AP_CellTrafficTraceIEs_301[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_LocationReportingControlIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_LocationReportingControlIEs_specs_305; extern asn_TYPE_member_t asn_MBR_S1AP_LocationReportingControlIEs_305[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_LocationReportingFailureIndicationIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_LocationReportingFailureIndicationIEs_specs_309; extern asn_TYPE_member_t asn_MBR_S1AP_LocationReportingFailureIndicationIEs_309[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_LocationReportIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_LocationReportIEs_specs_313; extern asn_TYPE_member_t asn_MBR_S1AP_LocationReportIEs_313[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_OverloadStartIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_OverloadStartIEs_specs_317; extern asn_TYPE_member_t asn_MBR_S1AP_OverloadStartIEs_317[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_OverloadStopIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_OverloadStopIEs_specs_321; extern asn_TYPE_member_t asn_MBR_S1AP_OverloadStopIEs_321[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_WriteReplaceWarningRequestIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_WriteReplaceWarningRequestIEs_specs_325; extern asn_TYPE_member_t asn_MBR_S1AP_WriteReplaceWarningRequestIEs_325[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_WriteReplaceWarningResponseIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_WriteReplaceWarningResponseIEs_specs_329; extern asn_TYPE_member_t asn_MBR_S1AP_WriteReplaceWarningResponseIEs_329[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENBDirectInformationTransferIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBDirectInformationTransferIEs_specs_333; extern asn_TYPE_member_t asn_MBR_S1AP_ENBDirectInformationTransferIEs_333[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_MMEDirectInformationTransferIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEDirectInformationTransferIEs_specs_337; extern asn_TYPE_member_t asn_MBR_S1AP_MMEDirectInformationTransferIEs_337[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENBConfigurationTransferIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBConfigurationTransferIEs_specs_341; extern asn_TYPE_member_t asn_MBR_S1AP_ENBConfigurationTransferIEs_341[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_MMEConfigurationTransferIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMEConfigurationTransferIEs_specs_345; extern asn_TYPE_member_t asn_MBR_S1AP_MMEConfigurationTransferIEs_345[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_KillRequestIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_KillRequestIEs_specs_349; extern asn_TYPE_member_t asn_MBR_S1AP_KillRequestIEs_349[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_KillResponseIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_KillResponseIEs_specs_353; extern asn_TYPE_member_t asn_MBR_S1AP_KillResponseIEs_353[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_PWSRestartIndicationIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_PWSRestartIndicationIEs_specs_357; extern asn_TYPE_member_t asn_MBR_S1AP_PWSRestartIndicationIEs_357[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_PWSFailureIndicationIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_PWSFailureIndicationIEs_specs_361; extern asn_TYPE_member_t asn_MBR_S1AP_PWSFailureIndicationIEs_361[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_DownlinkUEAssociatedLPPaTransport_IEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_DownlinkUEAssociatedLPPaTransport_IEs_specs_365; extern asn_TYPE_member_t asn_MBR_S1AP_DownlinkUEAssociatedLPPaTransport_IEs_365[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UplinkUEAssociatedLPPaTransport_IEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UplinkUEAssociatedLPPaTransport_IEs_specs_369; extern asn_TYPE_member_t asn_MBR_S1AP_UplinkUEAssociatedLPPaTransport_IEs_369[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs_specs_373; extern asn_TYPE_member_t asn_MBR_S1AP_DownlinkNonUEAssociatedLPPaTransport_IEs_373[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UplinkNonUEAssociatedLPPaTransport_IEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UplinkNonUEAssociatedLPPaTransport_IEs_specs_377; extern asn_TYPE_member_t asn_MBR_S1AP_UplinkNonUEAssociatedLPPaTransport_IEs_377[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModificationIndicationIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModificationIndicationIEs_specs_381; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABModificationIndicationIEs_381[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABModificationConfirmIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABModificationConfirmIEs_specs_385; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABModificationConfirmIEs_385[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextModificationIndicationIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextModificationIndicationIEs_specs_389; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextModificationIndicationIEs_389[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextModificationConfirmIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextModificationConfirmIEs_specs_393; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextModificationConfirmIEs_393[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextSuspendRequestIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextSuspendRequestIEs_specs_397; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextSuspendRequestIEs_397[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextSuspendResponseIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextSuspendResponseIEs_specs_401; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextSuspendResponseIEs_401[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextResumeRequestIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextResumeRequestIEs_specs_405; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextResumeRequestIEs_405[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextResumeResponseIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextResumeResponseIEs_specs_409; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextResumeResponseIEs_409[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextResumeFailureIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextResumeFailureIEs_specs_413; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextResumeFailureIEs_413[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ConnectionEstablishmentIndicationIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ConnectionEstablishmentIndicationIEs_specs_417; extern asn_TYPE_member_t asn_MBR_S1AP_ConnectionEstablishmentIndicationIEs_417[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_RetrieveUEInformationIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_RetrieveUEInformationIEs_specs_421; extern asn_TYPE_member_t asn_MBR_S1AP_RetrieveUEInformationIEs_421[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEInformationTransferIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEInformationTransferIEs_specs_425; extern asn_TYPE_member_t asn_MBR_S1AP_UEInformationTransferIEs_425[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ENBCPRelocationIndicationIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ENBCPRelocationIndicationIEs_specs_429; extern asn_TYPE_member_t asn_MBR_S1AP_ENBCPRelocationIndicationIEs_429[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_MMECPRelocationIndicationIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_MMECPRelocationIndicationIEs_specs_433; extern asn_TYPE_member_t asn_MBR_S1AP_MMECPRelocationIndicationIEs_433[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABDataForwardingItemIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABDataForwardingItemIEs_specs_437; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABDataForwardingItemIEs_437[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSetupItemHOReqIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSetupItemHOReqIEs_specs_441; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSetupItemHOReqIEs_441[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABAdmittedItemIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABAdmittedItemIEs_specs_445; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABAdmittedItemIEs_445[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedtoSetupItemHOReqAckIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABFailedtoSetupItemHOReqAckIEs_specs_449; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABFailedtoSetupItemHOReqAckIEs_449[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSwitchedDLItemIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSwitchedDLItemIEs_specs_453; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSwitchedDLItemIEs_453[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeSwitchedULItemIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeSwitchedULItemIEs_specs_457; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeSwitchedULItemIEs_457[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABToBeModifiedItemBearerModIndIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABToBeModifiedItemBearerModIndIEs_specs_461; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABToBeModifiedItemBearerModIndIEs_461[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_specs_465; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_465[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedToResumeItemResumeReqIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABFailedToResumeItemResumeReqIEs_specs_469; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABFailedToResumeItemResumeReqIEs_469[3]; extern asn_TYPE_descriptor_t asn_DEF_S1AP_E_RABFailedToResumeItemResumeResIEs; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_E_RABFailedToResumeItemResumeResIEs_specs_473; extern asn_TYPE_member_t asn_MBR_S1AP_E_RABFailedToResumeItemResumeResIEs_473[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_ProtocolIE_Field_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProtocolIE-FieldPair.h000066400000000000000000000007271333553357400225120ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-Containers" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ProtocolIE_FieldPair_H_ #define _S1AP_ProtocolIE_FieldPair_H_ #include #ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus } #endif #endif /* _S1AP_ProtocolIE_FieldPair_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProtocolIE-ID.c000066400000000000000000000035741333553357400211450ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-CommonDataTypes" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ProtocolIE-ID.h" int S1AP_ProtocolIE_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 65535)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_ProtocolIE_ID_constr_1 CC_NOTUSED = { { 2, 1 } /* (0..65535) */, -1}; asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_ID_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 65535 } /* (0..65535) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_ID = { "ProtocolIE-ID", "ProtocolIE-ID", &asn_OP_NativeInteger, asn_DEF_S1AP_ProtocolIE_ID_tags_1, sizeof(asn_DEF_S1AP_ProtocolIE_ID_tags_1) /sizeof(asn_DEF_S1AP_ProtocolIE_ID_tags_1[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_ID_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_ID_tags_1) /sizeof(asn_DEF_S1AP_ProtocolIE_ID_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ProtocolIE_ID_constr_1, &asn_PER_type_S1AP_ProtocolIE_ID_constr_1, S1AP_ProtocolIE_ID_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProtocolIE-ID.h000066400000000000000000000476611333553357400211570ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-CommonDataTypes" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ProtocolIE_ID_H_ #define _S1AP_ProtocolIE_ID_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ProtocolIE-ID */ typedef long S1AP_ProtocolIE_ID_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_ProtocolIE_ID_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_ID; asn_struct_free_f S1AP_ProtocolIE_ID_free; asn_struct_print_f S1AP_ProtocolIE_ID_print; asn_constr_check_f S1AP_ProtocolIE_ID_constraint; ber_type_decoder_f S1AP_ProtocolIE_ID_decode_ber; der_type_encoder_f S1AP_ProtocolIE_ID_encode_der; xer_type_decoder_f S1AP_ProtocolIE_ID_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_ID_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_ID_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_ID_encode_oer; per_type_decoder_f S1AP_ProtocolIE_ID_decode_uper; per_type_encoder_f S1AP_ProtocolIE_ID_encode_uper; per_type_decoder_f S1AP_ProtocolIE_ID_decode_aper; per_type_encoder_f S1AP_ProtocolIE_ID_encode_aper; #define S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID ((S1AP_ProtocolIE_ID_t)0) #define S1AP_ProtocolIE_ID_id_HandoverType ((S1AP_ProtocolIE_ID_t)1) #define S1AP_ProtocolIE_ID_id_Cause ((S1AP_ProtocolIE_ID_t)2) #define S1AP_ProtocolIE_ID_id_SourceID ((S1AP_ProtocolIE_ID_t)3) #define S1AP_ProtocolIE_ID_id_TargetID ((S1AP_ProtocolIE_ID_t)4) #define S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID ((S1AP_ProtocolIE_ID_t)8) #define S1AP_ProtocolIE_ID_id_E_RABSubjecttoDataForwardingList ((S1AP_ProtocolIE_ID_t)12) #define S1AP_ProtocolIE_ID_id_E_RABtoReleaseListHOCmd ((S1AP_ProtocolIE_ID_t)13) #define S1AP_ProtocolIE_ID_id_E_RABDataForwardingItem ((S1AP_ProtocolIE_ID_t)14) #define S1AP_ProtocolIE_ID_id_E_RABReleaseItemBearerRelComp ((S1AP_ProtocolIE_ID_t)15) #define S1AP_ProtocolIE_ID_id_E_RABToBeSetupListBearerSUReq ((S1AP_ProtocolIE_ID_t)16) #define S1AP_ProtocolIE_ID_id_E_RABToBeSetupItemBearerSUReq ((S1AP_ProtocolIE_ID_t)17) #define S1AP_ProtocolIE_ID_id_E_RABAdmittedList ((S1AP_ProtocolIE_ID_t)18) #define S1AP_ProtocolIE_ID_id_E_RABFailedToSetupListHOReqAck ((S1AP_ProtocolIE_ID_t)19) #define S1AP_ProtocolIE_ID_id_E_RABAdmittedItem ((S1AP_ProtocolIE_ID_t)20) #define S1AP_ProtocolIE_ID_id_E_RABFailedtoSetupItemHOReqAck ((S1AP_ProtocolIE_ID_t)21) #define S1AP_ProtocolIE_ID_id_E_RABToBeSwitchedDLList ((S1AP_ProtocolIE_ID_t)22) #define S1AP_ProtocolIE_ID_id_E_RABToBeSwitchedDLItem ((S1AP_ProtocolIE_ID_t)23) #define S1AP_ProtocolIE_ID_id_E_RABToBeSetupListCtxtSUReq ((S1AP_ProtocolIE_ID_t)24) #define S1AP_ProtocolIE_ID_id_TraceActivation ((S1AP_ProtocolIE_ID_t)25) #define S1AP_ProtocolIE_ID_id_NAS_PDU ((S1AP_ProtocolIE_ID_t)26) #define S1AP_ProtocolIE_ID_id_E_RABToBeSetupItemHOReq ((S1AP_ProtocolIE_ID_t)27) #define S1AP_ProtocolIE_ID_id_E_RABSetupListBearerSURes ((S1AP_ProtocolIE_ID_t)28) #define S1AP_ProtocolIE_ID_id_E_RABFailedToSetupListBearerSURes ((S1AP_ProtocolIE_ID_t)29) #define S1AP_ProtocolIE_ID_id_E_RABToBeModifiedListBearerModReq ((S1AP_ProtocolIE_ID_t)30) #define S1AP_ProtocolIE_ID_id_E_RABModifyListBearerModRes ((S1AP_ProtocolIE_ID_t)31) #define S1AP_ProtocolIE_ID_id_E_RABFailedToModifyList ((S1AP_ProtocolIE_ID_t)32) #define S1AP_ProtocolIE_ID_id_E_RABToBeReleasedList ((S1AP_ProtocolIE_ID_t)33) #define S1AP_ProtocolIE_ID_id_E_RABFailedToReleaseList ((S1AP_ProtocolIE_ID_t)34) #define S1AP_ProtocolIE_ID_id_E_RABItem ((S1AP_ProtocolIE_ID_t)35) #define S1AP_ProtocolIE_ID_id_E_RABToBeModifiedItemBearerModReq ((S1AP_ProtocolIE_ID_t)36) #define S1AP_ProtocolIE_ID_id_E_RABModifyItemBearerModRes ((S1AP_ProtocolIE_ID_t)37) #define S1AP_ProtocolIE_ID_id_E_RABReleaseItem ((S1AP_ProtocolIE_ID_t)38) #define S1AP_ProtocolIE_ID_id_E_RABSetupItemBearerSURes ((S1AP_ProtocolIE_ID_t)39) #define S1AP_ProtocolIE_ID_id_SecurityContext ((S1AP_ProtocolIE_ID_t)40) #define S1AP_ProtocolIE_ID_id_HandoverRestrictionList ((S1AP_ProtocolIE_ID_t)41) #define S1AP_ProtocolIE_ID_id_UEPagingID ((S1AP_ProtocolIE_ID_t)43) #define S1AP_ProtocolIE_ID_id_pagingDRX ((S1AP_ProtocolIE_ID_t)44) #define S1AP_ProtocolIE_ID_id_TAIList ((S1AP_ProtocolIE_ID_t)46) #define S1AP_ProtocolIE_ID_id_TAIItem ((S1AP_ProtocolIE_ID_t)47) #define S1AP_ProtocolIE_ID_id_E_RABFailedToSetupListCtxtSURes ((S1AP_ProtocolIE_ID_t)48) #define S1AP_ProtocolIE_ID_id_E_RABReleaseItemHOCmd ((S1AP_ProtocolIE_ID_t)49) #define S1AP_ProtocolIE_ID_id_E_RABSetupItemCtxtSURes ((S1AP_ProtocolIE_ID_t)50) #define S1AP_ProtocolIE_ID_id_E_RABSetupListCtxtSURes ((S1AP_ProtocolIE_ID_t)51) #define S1AP_ProtocolIE_ID_id_E_RABToBeSetupItemCtxtSUReq ((S1AP_ProtocolIE_ID_t)52) #define S1AP_ProtocolIE_ID_id_E_RABToBeSetupListHOReq ((S1AP_ProtocolIE_ID_t)53) #define S1AP_ProtocolIE_ID_id_GERANtoLTEHOInformationRes ((S1AP_ProtocolIE_ID_t)55) #define S1AP_ProtocolIE_ID_id_UTRANtoLTEHOInformationRes ((S1AP_ProtocolIE_ID_t)57) #define S1AP_ProtocolIE_ID_id_CriticalityDiagnostics ((S1AP_ProtocolIE_ID_t)58) #define S1AP_ProtocolIE_ID_id_Global_ENB_ID ((S1AP_ProtocolIE_ID_t)59) #define S1AP_ProtocolIE_ID_id_eNBname ((S1AP_ProtocolIE_ID_t)60) #define S1AP_ProtocolIE_ID_id_MMEname ((S1AP_ProtocolIE_ID_t)61) #define S1AP_ProtocolIE_ID_id_ServedPLMNs ((S1AP_ProtocolIE_ID_t)63) #define S1AP_ProtocolIE_ID_id_SupportedTAs ((S1AP_ProtocolIE_ID_t)64) #define S1AP_ProtocolIE_ID_id_TimeToWait ((S1AP_ProtocolIE_ID_t)65) #define S1AP_ProtocolIE_ID_id_uEaggregateMaximumBitrate ((S1AP_ProtocolIE_ID_t)66) #define S1AP_ProtocolIE_ID_id_TAI ((S1AP_ProtocolIE_ID_t)67) #define S1AP_ProtocolIE_ID_id_E_RABReleaseListBearerRelComp ((S1AP_ProtocolIE_ID_t)69) #define S1AP_ProtocolIE_ID_id_cdma2000PDU ((S1AP_ProtocolIE_ID_t)70) #define S1AP_ProtocolIE_ID_id_cdma2000RATType ((S1AP_ProtocolIE_ID_t)71) #define S1AP_ProtocolIE_ID_id_cdma2000SectorID ((S1AP_ProtocolIE_ID_t)72) #define S1AP_ProtocolIE_ID_id_SecurityKey ((S1AP_ProtocolIE_ID_t)73) #define S1AP_ProtocolIE_ID_id_UERadioCapability ((S1AP_ProtocolIE_ID_t)74) #define S1AP_ProtocolIE_ID_id_GUMMEI_ID ((S1AP_ProtocolIE_ID_t)75) #define S1AP_ProtocolIE_ID_id_E_RABInformationListItem ((S1AP_ProtocolIE_ID_t)78) #define S1AP_ProtocolIE_ID_id_Direct_Forwarding_Path_Availability ((S1AP_ProtocolIE_ID_t)79) #define S1AP_ProtocolIE_ID_id_UEIdentityIndexValue ((S1AP_ProtocolIE_ID_t)80) #define S1AP_ProtocolIE_ID_id_cdma2000HOStatus ((S1AP_ProtocolIE_ID_t)83) #define S1AP_ProtocolIE_ID_id_cdma2000HORequiredIndication ((S1AP_ProtocolIE_ID_t)84) #define S1AP_ProtocolIE_ID_id_E_UTRAN_Trace_ID ((S1AP_ProtocolIE_ID_t)86) #define S1AP_ProtocolIE_ID_id_RelativeMMECapacity ((S1AP_ProtocolIE_ID_t)87) #define S1AP_ProtocolIE_ID_id_SourceMME_UE_S1AP_ID ((S1AP_ProtocolIE_ID_t)88) #define S1AP_ProtocolIE_ID_id_Bearers_SubjectToStatusTransfer_Item ((S1AP_ProtocolIE_ID_t)89) #define S1AP_ProtocolIE_ID_id_eNB_StatusTransfer_TransparentContainer ((S1AP_ProtocolIE_ID_t)90) #define S1AP_ProtocolIE_ID_id_UE_associatedLogicalS1_ConnectionItem ((S1AP_ProtocolIE_ID_t)91) #define S1AP_ProtocolIE_ID_id_ResetType ((S1AP_ProtocolIE_ID_t)92) #define S1AP_ProtocolIE_ID_id_UE_associatedLogicalS1_ConnectionListResAck ((S1AP_ProtocolIE_ID_t)93) #define S1AP_ProtocolIE_ID_id_E_RABToBeSwitchedULItem ((S1AP_ProtocolIE_ID_t)94) #define S1AP_ProtocolIE_ID_id_E_RABToBeSwitchedULList ((S1AP_ProtocolIE_ID_t)95) #define S1AP_ProtocolIE_ID_id_S_TMSI ((S1AP_ProtocolIE_ID_t)96) #define S1AP_ProtocolIE_ID_id_cdma2000OneXRAND ((S1AP_ProtocolIE_ID_t)97) #define S1AP_ProtocolIE_ID_id_RequestType ((S1AP_ProtocolIE_ID_t)98) #define S1AP_ProtocolIE_ID_id_UE_S1AP_IDs ((S1AP_ProtocolIE_ID_t)99) #define S1AP_ProtocolIE_ID_id_EUTRAN_CGI ((S1AP_ProtocolIE_ID_t)100) #define S1AP_ProtocolIE_ID_id_OverloadResponse ((S1AP_ProtocolIE_ID_t)101) #define S1AP_ProtocolIE_ID_id_cdma2000OneXSRVCCInfo ((S1AP_ProtocolIE_ID_t)102) #define S1AP_ProtocolIE_ID_id_E_RABFailedToBeReleasedList ((S1AP_ProtocolIE_ID_t)103) #define S1AP_ProtocolIE_ID_id_Source_ToTarget_TransparentContainer ((S1AP_ProtocolIE_ID_t)104) #define S1AP_ProtocolIE_ID_id_ServedGUMMEIs ((S1AP_ProtocolIE_ID_t)105) #define S1AP_ProtocolIE_ID_id_SubscriberProfileIDforRFP ((S1AP_ProtocolIE_ID_t)106) #define S1AP_ProtocolIE_ID_id_UESecurityCapabilities ((S1AP_ProtocolIE_ID_t)107) #define S1AP_ProtocolIE_ID_id_CSFallbackIndicator ((S1AP_ProtocolIE_ID_t)108) #define S1AP_ProtocolIE_ID_id_CNDomain ((S1AP_ProtocolIE_ID_t)109) #define S1AP_ProtocolIE_ID_id_E_RABReleasedList ((S1AP_ProtocolIE_ID_t)110) #define S1AP_ProtocolIE_ID_id_MessageIdentifier ((S1AP_ProtocolIE_ID_t)111) #define S1AP_ProtocolIE_ID_id_SerialNumber ((S1AP_ProtocolIE_ID_t)112) #define S1AP_ProtocolIE_ID_id_WarningAreaList ((S1AP_ProtocolIE_ID_t)113) #define S1AP_ProtocolIE_ID_id_RepetitionPeriod ((S1AP_ProtocolIE_ID_t)114) #define S1AP_ProtocolIE_ID_id_NumberofBroadcastRequest ((S1AP_ProtocolIE_ID_t)115) #define S1AP_ProtocolIE_ID_id_WarningType ((S1AP_ProtocolIE_ID_t)116) #define S1AP_ProtocolIE_ID_id_WarningSecurityInfo ((S1AP_ProtocolIE_ID_t)117) #define S1AP_ProtocolIE_ID_id_DataCodingScheme ((S1AP_ProtocolIE_ID_t)118) #define S1AP_ProtocolIE_ID_id_WarningMessageContents ((S1AP_ProtocolIE_ID_t)119) #define S1AP_ProtocolIE_ID_id_BroadcastCompletedAreaList ((S1AP_ProtocolIE_ID_t)120) #define S1AP_ProtocolIE_ID_id_Inter_SystemInformationTransferTypeEDT ((S1AP_ProtocolIE_ID_t)121) #define S1AP_ProtocolIE_ID_id_Inter_SystemInformationTransferTypeMDT ((S1AP_ProtocolIE_ID_t)122) #define S1AP_ProtocolIE_ID_id_Target_ToSource_TransparentContainer ((S1AP_ProtocolIE_ID_t)123) #define S1AP_ProtocolIE_ID_id_SRVCCOperationPossible ((S1AP_ProtocolIE_ID_t)124) #define S1AP_ProtocolIE_ID_id_SRVCCHOIndication ((S1AP_ProtocolIE_ID_t)125) #define S1AP_ProtocolIE_ID_id_NAS_DownlinkCount ((S1AP_ProtocolIE_ID_t)126) #define S1AP_ProtocolIE_ID_id_CSG_Id ((S1AP_ProtocolIE_ID_t)127) #define S1AP_ProtocolIE_ID_id_CSG_IdList ((S1AP_ProtocolIE_ID_t)128) #define S1AP_ProtocolIE_ID_id_SONConfigurationTransferECT ((S1AP_ProtocolIE_ID_t)129) #define S1AP_ProtocolIE_ID_id_SONConfigurationTransferMCT ((S1AP_ProtocolIE_ID_t)130) #define S1AP_ProtocolIE_ID_id_TraceCollectionEntityIPAddress ((S1AP_ProtocolIE_ID_t)131) #define S1AP_ProtocolIE_ID_id_MSClassmark2 ((S1AP_ProtocolIE_ID_t)132) #define S1AP_ProtocolIE_ID_id_MSClassmark3 ((S1AP_ProtocolIE_ID_t)133) #define S1AP_ProtocolIE_ID_id_RRC_Establishment_Cause ((S1AP_ProtocolIE_ID_t)134) #define S1AP_ProtocolIE_ID_id_NASSecurityParametersfromE_UTRAN ((S1AP_ProtocolIE_ID_t)135) #define S1AP_ProtocolIE_ID_id_NASSecurityParameterstoE_UTRAN ((S1AP_ProtocolIE_ID_t)136) #define S1AP_ProtocolIE_ID_id_DefaultPagingDRX ((S1AP_ProtocolIE_ID_t)137) #define S1AP_ProtocolIE_ID_id_Source_ToTarget_TransparentContainer_Secondary ((S1AP_ProtocolIE_ID_t)138) #define S1AP_ProtocolIE_ID_id_Target_ToSource_TransparentContainer_Secondary ((S1AP_ProtocolIE_ID_t)139) #define S1AP_ProtocolIE_ID_id_EUTRANRoundTripDelayEstimationInfo ((S1AP_ProtocolIE_ID_t)140) #define S1AP_ProtocolIE_ID_id_BroadcastCancelledAreaList ((S1AP_ProtocolIE_ID_t)141) #define S1AP_ProtocolIE_ID_id_ConcurrentWarningMessageIndicator ((S1AP_ProtocolIE_ID_t)142) #define S1AP_ProtocolIE_ID_id_Data_Forwarding_Not_Possible ((S1AP_ProtocolIE_ID_t)143) #define S1AP_ProtocolIE_ID_id_ExtendedRepetitionPeriod ((S1AP_ProtocolIE_ID_t)144) #define S1AP_ProtocolIE_ID_id_CellAccessMode ((S1AP_ProtocolIE_ID_t)145) #define S1AP_ProtocolIE_ID_id_CSGMembershipStatus ((S1AP_ProtocolIE_ID_t)146) #define S1AP_ProtocolIE_ID_id_LPPa_PDU ((S1AP_ProtocolIE_ID_t)147) #define S1AP_ProtocolIE_ID_id_Routing_ID ((S1AP_ProtocolIE_ID_t)148) #define S1AP_ProtocolIE_ID_id_Time_Synchronisation_Info ((S1AP_ProtocolIE_ID_t)149) #define S1AP_ProtocolIE_ID_id_PS_ServiceNotAvailable ((S1AP_ProtocolIE_ID_t)150) #define S1AP_ProtocolIE_ID_id_PagingPriority ((S1AP_ProtocolIE_ID_t)151) #define S1AP_ProtocolIE_ID_id_x2TNLConfigurationInfo ((S1AP_ProtocolIE_ID_t)152) #define S1AP_ProtocolIE_ID_id_eNBX2ExtendedTransportLayerAddresses ((S1AP_ProtocolIE_ID_t)153) #define S1AP_ProtocolIE_ID_id_GUMMEIList ((S1AP_ProtocolIE_ID_t)154) #define S1AP_ProtocolIE_ID_id_GW_TransportLayerAddress ((S1AP_ProtocolIE_ID_t)155) #define S1AP_ProtocolIE_ID_id_Correlation_ID ((S1AP_ProtocolIE_ID_t)156) #define S1AP_ProtocolIE_ID_id_SourceMME_GUMMEI ((S1AP_ProtocolIE_ID_t)157) #define S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID_2 ((S1AP_ProtocolIE_ID_t)158) #define S1AP_ProtocolIE_ID_id_RegisteredLAI ((S1AP_ProtocolIE_ID_t)159) #define S1AP_ProtocolIE_ID_id_RelayNode_Indicator ((S1AP_ProtocolIE_ID_t)160) #define S1AP_ProtocolIE_ID_id_TrafficLoadReductionIndication ((S1AP_ProtocolIE_ID_t)161) #define S1AP_ProtocolIE_ID_id_MDTConfiguration ((S1AP_ProtocolIE_ID_t)162) #define S1AP_ProtocolIE_ID_id_MMERelaySupportIndicator ((S1AP_ProtocolIE_ID_t)163) #define S1AP_ProtocolIE_ID_id_GWContextReleaseIndication ((S1AP_ProtocolIE_ID_t)164) #define S1AP_ProtocolIE_ID_id_ManagementBasedMDTAllowed ((S1AP_ProtocolIE_ID_t)165) #define S1AP_ProtocolIE_ID_id_PrivacyIndicator ((S1AP_ProtocolIE_ID_t)166) #define S1AP_ProtocolIE_ID_id_Time_UE_StayedInCell_EnhancedGranularity ((S1AP_ProtocolIE_ID_t)167) #define S1AP_ProtocolIE_ID_id_HO_Cause ((S1AP_ProtocolIE_ID_t)168) #define S1AP_ProtocolIE_ID_id_VoiceSupportMatchIndicator ((S1AP_ProtocolIE_ID_t)169) #define S1AP_ProtocolIE_ID_id_GUMMEIType ((S1AP_ProtocolIE_ID_t)170) #define S1AP_ProtocolIE_ID_id_M3Configuration ((S1AP_ProtocolIE_ID_t)171) #define S1AP_ProtocolIE_ID_id_M4Configuration ((S1AP_ProtocolIE_ID_t)172) #define S1AP_ProtocolIE_ID_id_M5Configuration ((S1AP_ProtocolIE_ID_t)173) #define S1AP_ProtocolIE_ID_id_MDT_Location_Info ((S1AP_ProtocolIE_ID_t)174) #define S1AP_ProtocolIE_ID_id_MobilityInformation ((S1AP_ProtocolIE_ID_t)175) #define S1AP_ProtocolIE_ID_id_Tunnel_Information_for_BBF ((S1AP_ProtocolIE_ID_t)176) #define S1AP_ProtocolIE_ID_id_ManagementBasedMDTPLMNList ((S1AP_ProtocolIE_ID_t)177) #define S1AP_ProtocolIE_ID_id_SignallingBasedMDTPLMNList ((S1AP_ProtocolIE_ID_t)178) #define S1AP_ProtocolIE_ID_id_ULCOUNTValueExtended ((S1AP_ProtocolIE_ID_t)179) #define S1AP_ProtocolIE_ID_id_DLCOUNTValueExtended ((S1AP_ProtocolIE_ID_t)180) #define S1AP_ProtocolIE_ID_id_ReceiveStatusOfULPDCPSDUsExtended ((S1AP_ProtocolIE_ID_t)181) #define S1AP_ProtocolIE_ID_id_ECGIListForRestart ((S1AP_ProtocolIE_ID_t)182) #define S1AP_ProtocolIE_ID_id_SIPTO_Correlation_ID ((S1AP_ProtocolIE_ID_t)183) #define S1AP_ProtocolIE_ID_id_SIPTO_L_GW_TransportLayerAddress ((S1AP_ProtocolIE_ID_t)184) #define S1AP_ProtocolIE_ID_id_TransportInformation ((S1AP_ProtocolIE_ID_t)185) #define S1AP_ProtocolIE_ID_id_LHN_ID ((S1AP_ProtocolIE_ID_t)186) #define S1AP_ProtocolIE_ID_id_AdditionalCSFallbackIndicator ((S1AP_ProtocolIE_ID_t)187) #define S1AP_ProtocolIE_ID_id_TAIListForRestart ((S1AP_ProtocolIE_ID_t)188) #define S1AP_ProtocolIE_ID_id_UserLocationInformation ((S1AP_ProtocolIE_ID_t)189) #define S1AP_ProtocolIE_ID_id_EmergencyAreaIDListForRestart ((S1AP_ProtocolIE_ID_t)190) #define S1AP_ProtocolIE_ID_id_KillAllWarningMessages ((S1AP_ProtocolIE_ID_t)191) #define S1AP_ProtocolIE_ID_id_Masked_IMEISV ((S1AP_ProtocolIE_ID_t)192) #define S1AP_ProtocolIE_ID_id_eNBIndirectX2TransportLayerAddresses ((S1AP_ProtocolIE_ID_t)193) #define S1AP_ProtocolIE_ID_id_uE_HistoryInformationFromTheUE ((S1AP_ProtocolIE_ID_t)194) #define S1AP_ProtocolIE_ID_id_ProSeAuthorized ((S1AP_ProtocolIE_ID_t)195) #define S1AP_ProtocolIE_ID_id_ExpectedUEBehaviour ((S1AP_ProtocolIE_ID_t)196) #define S1AP_ProtocolIE_ID_id_LoggedMBSFNMDT ((S1AP_ProtocolIE_ID_t)197) #define S1AP_ProtocolIE_ID_id_UERadioCapabilityForPaging ((S1AP_ProtocolIE_ID_t)198) #define S1AP_ProtocolIE_ID_id_E_RABToBeModifiedListBearerModInd ((S1AP_ProtocolIE_ID_t)199) #define S1AP_ProtocolIE_ID_id_E_RABToBeModifiedItemBearerModInd ((S1AP_ProtocolIE_ID_t)200) #define S1AP_ProtocolIE_ID_id_E_RABNotToBeModifiedListBearerModInd ((S1AP_ProtocolIE_ID_t)201) #define S1AP_ProtocolIE_ID_id_E_RABNotToBeModifiedItemBearerModInd ((S1AP_ProtocolIE_ID_t)202) #define S1AP_ProtocolIE_ID_id_E_RABModifyListBearerModConf ((S1AP_ProtocolIE_ID_t)203) #define S1AP_ProtocolIE_ID_id_E_RABModifyItemBearerModConf ((S1AP_ProtocolIE_ID_t)204) #define S1AP_ProtocolIE_ID_id_E_RABFailedToModifyListBearerModConf ((S1AP_ProtocolIE_ID_t)205) #define S1AP_ProtocolIE_ID_id_SON_Information_Report ((S1AP_ProtocolIE_ID_t)206) #define S1AP_ProtocolIE_ID_id_Muting_Availability_Indication ((S1AP_ProtocolIE_ID_t)207) #define S1AP_ProtocolIE_ID_id_Muting_Pattern_Information ((S1AP_ProtocolIE_ID_t)208) #define S1AP_ProtocolIE_ID_id_Synchronisation_Information ((S1AP_ProtocolIE_ID_t)209) #define S1AP_ProtocolIE_ID_id_E_RABToBeReleasedListBearerModConf ((S1AP_ProtocolIE_ID_t)210) #define S1AP_ProtocolIE_ID_id_AssistanceDataForPaging ((S1AP_ProtocolIE_ID_t)211) #define S1AP_ProtocolIE_ID_id_CellIdentifierAndCELevelForCECapableUEs ((S1AP_ProtocolIE_ID_t)212) #define S1AP_ProtocolIE_ID_id_InformationOnRecommendedCellsAndENBsForPaging ((S1AP_ProtocolIE_ID_t)213) #define S1AP_ProtocolIE_ID_id_RecommendedCellItem ((S1AP_ProtocolIE_ID_t)214) #define S1AP_ProtocolIE_ID_id_RecommendedENBItem ((S1AP_ProtocolIE_ID_t)215) #define S1AP_ProtocolIE_ID_id_ProSeUEtoNetworkRelaying ((S1AP_ProtocolIE_ID_t)216) #define S1AP_ProtocolIE_ID_id_ULCOUNTValuePDCP_SNlength18 ((S1AP_ProtocolIE_ID_t)217) #define S1AP_ProtocolIE_ID_id_DLCOUNTValuePDCP_SNlength18 ((S1AP_ProtocolIE_ID_t)218) #define S1AP_ProtocolIE_ID_id_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18 ((S1AP_ProtocolIE_ID_t)219) #define S1AP_ProtocolIE_ID_id_M6Configuration ((S1AP_ProtocolIE_ID_t)220) #define S1AP_ProtocolIE_ID_id_M7Configuration ((S1AP_ProtocolIE_ID_t)221) #define S1AP_ProtocolIE_ID_id_PWSfailedECGIList ((S1AP_ProtocolIE_ID_t)222) #define S1AP_ProtocolIE_ID_id_MME_Group_ID ((S1AP_ProtocolIE_ID_t)223) #define S1AP_ProtocolIE_ID_id_Additional_GUTI ((S1AP_ProtocolIE_ID_t)224) #define S1AP_ProtocolIE_ID_id_S1_Message ((S1AP_ProtocolIE_ID_t)225) #define S1AP_ProtocolIE_ID_id_CSGMembershipInfo ((S1AP_ProtocolIE_ID_t)226) #define S1AP_ProtocolIE_ID_id_Paging_eDRXInformation ((S1AP_ProtocolIE_ID_t)227) #define S1AP_ProtocolIE_ID_id_UE_RetentionInformation ((S1AP_ProtocolIE_ID_t)228) #define S1AP_ProtocolIE_ID_id_UE_Usage_Type ((S1AP_ProtocolIE_ID_t)230) #define S1AP_ProtocolIE_ID_id_extended_UEIdentityIndexValue ((S1AP_ProtocolIE_ID_t)231) #define S1AP_ProtocolIE_ID_id_RAT_Type ((S1AP_ProtocolIE_ID_t)232) #define S1AP_ProtocolIE_ID_id_BearerType ((S1AP_ProtocolIE_ID_t)233) #define S1AP_ProtocolIE_ID_id_NB_IoT_DefaultPagingDRX ((S1AP_ProtocolIE_ID_t)234) #define S1AP_ProtocolIE_ID_id_E_RABFailedToResumeListResumeReq ((S1AP_ProtocolIE_ID_t)235) #define S1AP_ProtocolIE_ID_id_E_RABFailedToResumeItemResumeReq ((S1AP_ProtocolIE_ID_t)236) #define S1AP_ProtocolIE_ID_id_E_RABFailedToResumeListResumeRes ((S1AP_ProtocolIE_ID_t)237) #define S1AP_ProtocolIE_ID_id_E_RABFailedToResumeItemResumeRes ((S1AP_ProtocolIE_ID_t)238) #define S1AP_ProtocolIE_ID_id_NB_IoT_Paging_eDRXInformation ((S1AP_ProtocolIE_ID_t)239) #define S1AP_ProtocolIE_ID_id_V2XServicesAuthorized ((S1AP_ProtocolIE_ID_t)240) #define S1AP_ProtocolIE_ID_id_UEUserPlaneCIoTSupportIndicator ((S1AP_ProtocolIE_ID_t)241) #define S1AP_ProtocolIE_ID_id_CE_mode_B_SupportIndicator ((S1AP_ProtocolIE_ID_t)242) #define S1AP_ProtocolIE_ID_id_SRVCCOperationNotPossible ((S1AP_ProtocolIE_ID_t)243) #define S1AP_ProtocolIE_ID_id_NB_IoT_UEIdentityIndexValue ((S1AP_ProtocolIE_ID_t)244) #define S1AP_ProtocolIE_ID_id_RRC_Resume_Cause ((S1AP_ProtocolIE_ID_t)245) #define S1AP_ProtocolIE_ID_id_DCN_ID ((S1AP_ProtocolIE_ID_t)246) #define S1AP_ProtocolIE_ID_id_ServedDCNs ((S1AP_ProtocolIE_ID_t)247) #define S1AP_ProtocolIE_ID_id_UESidelinkAggregateMaximumBitrate ((S1AP_ProtocolIE_ID_t)248) #define S1AP_ProtocolIE_ID_id_DLNASPDUDeliveryAckRequest ((S1AP_ProtocolIE_ID_t)249) #define S1AP_ProtocolIE_ID_id_Coverage_Level ((S1AP_ProtocolIE_ID_t)250) #define S1AP_ProtocolIE_ID_id_EnhancedCoverageRestricted ((S1AP_ProtocolIE_ID_t)251) #define S1AP_ProtocolIE_ID_id_UE_Level_QoS_Parameters ((S1AP_ProtocolIE_ID_t)252) #define S1AP_ProtocolIE_ID_id_DL_CP_SecurityInformation ((S1AP_ProtocolIE_ID_t)253) #define S1AP_ProtocolIE_ID_id_UL_CP_SecurityInformation ((S1AP_ProtocolIE_ID_t)254) #ifdef __cplusplus } #endif #endif /* _S1AP_ProtocolIE_ID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProtocolIE-SingleContainer.c000066400000000000000000000675641333553357400237460ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-Containers" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ProtocolIE-SingleContainer.h" /* * This type is implemented using S1AP_E_RABToBeSetupItemBearerSUReqIEs, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_E_RABSetupItemBearerSUResIEs, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_E_RABToBeModifiedItemBearerModReqIEs, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_E_RABModifyItemBearerModResIEs, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_E_RABReleaseItemBearerRelCompIEs, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_E_RABToBeSetupItemCtxtSUReqIEs, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_E_RABSetupItemCtxtSUResIEs, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_TAIItemIEs, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_UE_associatedLogicalS1_ConnectionItemRes, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_UE_associatedLogicalS1_ConnectionItemResAck, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_E_RABModifyItemBearerModConfIEs, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_Bearers_SubjectToStatusTransfer_ItemIEs, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_E_RABInformationListIEs, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_E_RABItemIEs, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_MDTMode_ExtensionIE, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_RecommendedCellItemIEs, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_RecommendedENBItemIEs, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_SONInformation_ExtensionIE, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_E_RABDataForwardingItemIEs, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_E_RABToBeSetupItemHOReqIEs, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_E_RABAdmittedItemIEs, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_E_RABFailedtoSetupItemHOReqAckIEs, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_E_RABToBeSwitchedDLItemIEs, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_E_RABToBeSwitchedULItemIEs, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_E_RABToBeModifiedItemBearerModIndIEs, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_E_RABNotToBeModifiedItemBearerModIndIEs, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_E_RABFailedToResumeItemResumeReqIEs, * so here we adjust the DEF accordingly. */ /* * This type is implemented using S1AP_E_RABFailedToResumeItemResumeResIEs, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P0_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P0 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P0_tags_1, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P0_tags_1) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P0_tags_1[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P0_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P0_tags_1) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P0_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeSetupItemBearerSUReqIEs_1, 3, /* Elements count */ &asn_SPC_S1AP_E_RABToBeSetupItemBearerSUReqIEs_specs_1 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P1_tags_2[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P1 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P1_tags_2, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P1_tags_2) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P1_tags_2[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P1_tags_2, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P1_tags_2) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P1_tags_2[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABSetupItemBearerSUResIEs_5, 3, /* Elements count */ &asn_SPC_S1AP_E_RABSetupItemBearerSUResIEs_specs_5 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P2_tags_3[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P2 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P2_tags_3, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P2_tags_3) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P2_tags_3[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P2_tags_3, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P2_tags_3) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P2_tags_3[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeModifiedItemBearerModReqIEs_9, 3, /* Elements count */ &asn_SPC_S1AP_E_RABToBeModifiedItemBearerModReqIEs_specs_9 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P3_tags_4[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P3 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P3_tags_4, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P3_tags_4) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P3_tags_4[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P3_tags_4, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P3_tags_4) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P3_tags_4[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABModifyItemBearerModResIEs_13, 3, /* Elements count */ &asn_SPC_S1AP_E_RABModifyItemBearerModResIEs_specs_13 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P4_tags_5[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P4 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P4_tags_5, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P4_tags_5) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P4_tags_5[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P4_tags_5, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P4_tags_5) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P4_tags_5[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABReleaseItemBearerRelCompIEs_17, 3, /* Elements count */ &asn_SPC_S1AP_E_RABReleaseItemBearerRelCompIEs_specs_17 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P5_tags_6[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P5 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P5_tags_6, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P5_tags_6) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P5_tags_6[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P5_tags_6, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P5_tags_6) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P5_tags_6[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeSetupItemCtxtSUReqIEs_21, 3, /* Elements count */ &asn_SPC_S1AP_E_RABToBeSetupItemCtxtSUReqIEs_specs_21 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P6_tags_7[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P6 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P6_tags_7, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P6_tags_7) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P6_tags_7[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P6_tags_7, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P6_tags_7) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P6_tags_7[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABSetupItemCtxtSUResIEs_25, 3, /* Elements count */ &asn_SPC_S1AP_E_RABSetupItemCtxtSUResIEs_specs_25 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P7_tags_8[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P7 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P7_tags_8, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P7_tags_8) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P7_tags_8[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P7_tags_8, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P7_tags_8) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P7_tags_8[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TAIItemIEs_29, 3, /* Elements count */ &asn_SPC_S1AP_TAIItemIEs_specs_29 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P8_tags_9[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P8 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P8_tags_9, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P8_tags_9) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P8_tags_9[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P8_tags_9, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P8_tags_9) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P8_tags_9[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UE_associatedLogicalS1_ConnectionItemRes_33, 3, /* Elements count */ &asn_SPC_S1AP_UE_associatedLogicalS1_ConnectionItemRes_specs_33 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P9_tags_10[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P9 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P9_tags_10, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P9_tags_10) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P9_tags_10[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P9_tags_10, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P9_tags_10) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P9_tags_10[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UE_associatedLogicalS1_ConnectionItemResAck_37, 3, /* Elements count */ &asn_SPC_S1AP_UE_associatedLogicalS1_ConnectionItemResAck_specs_37 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P10_tags_11[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P10 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P10_tags_11, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P10_tags_11) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P10_tags_11[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P10_tags_11, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P10_tags_11) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P10_tags_11[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABModifyItemBearerModConfIEs_41, 3, /* Elements count */ &asn_SPC_S1AP_E_RABModifyItemBearerModConfIEs_specs_41 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P11_tags_12[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P11 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P11_tags_12, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P11_tags_12) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P11_tags_12[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P11_tags_12, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P11_tags_12) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P11_tags_12[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_45, 3, /* Elements count */ &asn_SPC_S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_specs_45 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P12_tags_13[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P12 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P12_tags_13, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P12_tags_13) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P12_tags_13[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P12_tags_13, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P12_tags_13) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P12_tags_13[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABInformationListIEs_49, 3, /* Elements count */ &asn_SPC_S1AP_E_RABInformationListIEs_specs_49 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P13_tags_14[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P13 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P13_tags_14, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P13_tags_14) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P13_tags_14[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P13_tags_14, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P13_tags_14) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P13_tags_14[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABItemIEs_53, 3, /* Elements count */ &asn_SPC_S1AP_E_RABItemIEs_specs_53 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P14_tags_15[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P14 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P14_tags_15, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P14_tags_15) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P14_tags_15[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P14_tags_15, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P14_tags_15) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P14_tags_15[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_MDTMode_ExtensionIE_57, 3, /* Elements count */ &asn_SPC_S1AP_MDTMode_ExtensionIE_specs_57 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P15_tags_16[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P15 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P15_tags_16, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P15_tags_16) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P15_tags_16[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P15_tags_16, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P15_tags_16) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P15_tags_16[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_RecommendedCellItemIEs_61, 3, /* Elements count */ &asn_SPC_S1AP_RecommendedCellItemIEs_specs_61 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P16_tags_17[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P16 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P16_tags_17, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P16_tags_17) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P16_tags_17[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P16_tags_17, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P16_tags_17) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P16_tags_17[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_RecommendedENBItemIEs_65, 3, /* Elements count */ &asn_SPC_S1AP_RecommendedENBItemIEs_specs_65 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P17_tags_18[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P17 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P17_tags_18, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P17_tags_18) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P17_tags_18[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P17_tags_18, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P17_tags_18) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P17_tags_18[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_SONInformation_ExtensionIE_69, 3, /* Elements count */ &asn_SPC_S1AP_SONInformation_ExtensionIE_specs_69 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P18_tags_19[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P18 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P18_tags_19, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P18_tags_19) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P18_tags_19[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P18_tags_19, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P18_tags_19) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P18_tags_19[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABDataForwardingItemIEs_437, 3, /* Elements count */ &asn_SPC_S1AP_E_RABDataForwardingItemIEs_specs_437 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P19_tags_20[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P19 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P19_tags_20, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P19_tags_20) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P19_tags_20[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P19_tags_20, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P19_tags_20) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P19_tags_20[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeSetupItemHOReqIEs_441, 3, /* Elements count */ &asn_SPC_S1AP_E_RABToBeSetupItemHOReqIEs_specs_441 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P20_tags_21[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P20 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P20_tags_21, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P20_tags_21) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P20_tags_21[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P20_tags_21, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P20_tags_21) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P20_tags_21[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABAdmittedItemIEs_445, 3, /* Elements count */ &asn_SPC_S1AP_E_RABAdmittedItemIEs_specs_445 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P21_tags_22[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P21 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P21_tags_22, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P21_tags_22) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P21_tags_22[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P21_tags_22, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P21_tags_22) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P21_tags_22[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABFailedtoSetupItemHOReqAckIEs_449, 3, /* Elements count */ &asn_SPC_S1AP_E_RABFailedtoSetupItemHOReqAckIEs_specs_449 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P22_tags_23[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P22 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P22_tags_23, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P22_tags_23) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P22_tags_23[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P22_tags_23, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P22_tags_23) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P22_tags_23[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeSwitchedDLItemIEs_453, 3, /* Elements count */ &asn_SPC_S1AP_E_RABToBeSwitchedDLItemIEs_specs_453 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P23_tags_24[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P23 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P23_tags_24, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P23_tags_24) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P23_tags_24[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P23_tags_24, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P23_tags_24) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P23_tags_24[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeSwitchedULItemIEs_457, 3, /* Elements count */ &asn_SPC_S1AP_E_RABToBeSwitchedULItemIEs_specs_457 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P24_tags_25[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P24 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P24_tags_25, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P24_tags_25) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P24_tags_25[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P24_tags_25, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P24_tags_25) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P24_tags_25[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABToBeModifiedItemBearerModIndIEs_461, 3, /* Elements count */ &asn_SPC_S1AP_E_RABToBeModifiedItemBearerModIndIEs_specs_461 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P25_tags_26[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P25 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P25_tags_26, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P25_tags_26) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P25_tags_26[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P25_tags_26, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P25_tags_26) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P25_tags_26[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_465, 3, /* Elements count */ &asn_SPC_S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_specs_465 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P26_tags_27[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P26 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P26_tags_27, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P26_tags_27) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P26_tags_27[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P26_tags_27, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P26_tags_27) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P26_tags_27[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABFailedToResumeItemResumeReqIEs_469, 3, /* Elements count */ &asn_SPC_S1AP_E_RABFailedToResumeItemResumeReqIEs_specs_469 /* Additional specs */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P27_tags_28[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P27 = { "ProtocolIE-SingleContainer", "ProtocolIE-SingleContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P27_tags_28, sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P27_tags_28) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P27_tags_28[0]), /* 1 */ asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P27_tags_28, /* Same as above */ sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P27_tags_28) /sizeof(asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P27_tags_28[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_E_RABFailedToResumeItemResumeResIEs_473, 3, /* Elements count */ &asn_SPC_S1AP_E_RABFailedToResumeItemResumeResIEs_specs_473 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ProtocolIE-SingleContainer.h000066400000000000000000000740501333553357400237370ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-Containers" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ProtocolIE_SingleContainer_H_ #define _S1AP_ProtocolIE_SingleContainer_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Field.h" #ifdef __cplusplus extern "C" { #endif /* S1AP_ProtocolIE-SingleContainer */ typedef S1AP_E_RABToBeSetupItemBearerSUReqIEs_t S1AP_ProtocolIE_SingleContainer_6554P0_t; typedef S1AP_E_RABSetupItemBearerSUResIEs_t S1AP_ProtocolIE_SingleContainer_6554P1_t; typedef S1AP_E_RABToBeModifiedItemBearerModReqIEs_t S1AP_ProtocolIE_SingleContainer_6554P2_t; typedef S1AP_E_RABModifyItemBearerModResIEs_t S1AP_ProtocolIE_SingleContainer_6554P3_t; typedef S1AP_E_RABReleaseItemBearerRelCompIEs_t S1AP_ProtocolIE_SingleContainer_6554P4_t; typedef S1AP_E_RABToBeSetupItemCtxtSUReqIEs_t S1AP_ProtocolIE_SingleContainer_6554P5_t; typedef S1AP_E_RABSetupItemCtxtSUResIEs_t S1AP_ProtocolIE_SingleContainer_6554P6_t; typedef S1AP_TAIItemIEs_t S1AP_ProtocolIE_SingleContainer_6554P7_t; typedef S1AP_UE_associatedLogicalS1_ConnectionItemRes_t S1AP_ProtocolIE_SingleContainer_6554P8_t; typedef S1AP_UE_associatedLogicalS1_ConnectionItemResAck_t S1AP_ProtocolIE_SingleContainer_6554P9_t; typedef S1AP_E_RABModifyItemBearerModConfIEs_t S1AP_ProtocolIE_SingleContainer_6554P10_t; typedef S1AP_Bearers_SubjectToStatusTransfer_ItemIEs_t S1AP_ProtocolIE_SingleContainer_6554P11_t; typedef S1AP_E_RABInformationListIEs_t S1AP_ProtocolIE_SingleContainer_6554P12_t; typedef S1AP_E_RABItemIEs_t S1AP_ProtocolIE_SingleContainer_6554P13_t; typedef S1AP_MDTMode_ExtensionIE_t S1AP_ProtocolIE_SingleContainer_6554P14_t; typedef S1AP_RecommendedCellItemIEs_t S1AP_ProtocolIE_SingleContainer_6554P15_t; typedef S1AP_RecommendedENBItemIEs_t S1AP_ProtocolIE_SingleContainer_6554P16_t; typedef S1AP_SONInformation_ExtensionIE_t S1AP_ProtocolIE_SingleContainer_6554P17_t; typedef S1AP_E_RABDataForwardingItemIEs_t S1AP_ProtocolIE_SingleContainer_6554P18_t; typedef S1AP_E_RABToBeSetupItemHOReqIEs_t S1AP_ProtocolIE_SingleContainer_6554P19_t; typedef S1AP_E_RABAdmittedItemIEs_t S1AP_ProtocolIE_SingleContainer_6554P20_t; typedef S1AP_E_RABFailedtoSetupItemHOReqAckIEs_t S1AP_ProtocolIE_SingleContainer_6554P21_t; typedef S1AP_E_RABToBeSwitchedDLItemIEs_t S1AP_ProtocolIE_SingleContainer_6554P22_t; typedef S1AP_E_RABToBeSwitchedULItemIEs_t S1AP_ProtocolIE_SingleContainer_6554P23_t; typedef S1AP_E_RABToBeModifiedItemBearerModIndIEs_t S1AP_ProtocolIE_SingleContainer_6554P24_t; typedef S1AP_E_RABNotToBeModifiedItemBearerModIndIEs_t S1AP_ProtocolIE_SingleContainer_6554P25_t; typedef S1AP_E_RABFailedToResumeItemResumeReqIEs_t S1AP_ProtocolIE_SingleContainer_6554P26_t; typedef S1AP_E_RABFailedToResumeItemResumeResIEs_t S1AP_ProtocolIE_SingleContainer_6554P27_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P0; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P0_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P0_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P0_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P0_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P0_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P0_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P0_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P0_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P0_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P0_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P0_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P0_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P0_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P1; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P1_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P1_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P1_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P1_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P1_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P1_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P1_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P1_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P1_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P1_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P1_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P1_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P1_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P2; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P2_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P2_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P2_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P2_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P2_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P2_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P2_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P2_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P2_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P2_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P2_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P2_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P2_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P3; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P3_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P3_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P3_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P3_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P3_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P3_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P3_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P3_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P3_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P3_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P3_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P3_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P3_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P4; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P4_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P4_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P4_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P4_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P4_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P4_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P4_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P4_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P4_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P4_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P4_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P4_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P4_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P5; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P5_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P5_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P5_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P5_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P5_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P5_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P5_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P5_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P5_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P5_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P5_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P5_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P5_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P6; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P6_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P6_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P6_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P6_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P6_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P6_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P6_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P6_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P6_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P6_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P6_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P6_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P6_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P7; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P7_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P7_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P7_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P7_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P7_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P7_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P7_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P7_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P7_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P7_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P7_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P7_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P7_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P8; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P8_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P8_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P8_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P8_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P8_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P8_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P8_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P8_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P8_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P8_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P8_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P8_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P8_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P9; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P9_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P9_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P9_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P9_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P9_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P9_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P9_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P9_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P9_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P9_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P9_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P9_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P9_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P10; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P10_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P10_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P10_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P10_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P10_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P10_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P10_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P10_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P10_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P10_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P10_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P10_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P10_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P11; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P11_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P11_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P11_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P11_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P11_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P11_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P11_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P11_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P11_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P11_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P11_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P11_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P11_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P12; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P12_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P12_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P12_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P12_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P12_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P12_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P12_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P12_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P12_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P12_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P12_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P12_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P12_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P13; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P13_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P13_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P13_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P13_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P13_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P13_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P13_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P13_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P13_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P13_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P13_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P13_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P13_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P14; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P14_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P14_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P14_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P14_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P14_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P14_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P14_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P14_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P14_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P14_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P14_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P14_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P14_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P15; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P15_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P15_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P15_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P15_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P15_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P15_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P15_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P15_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P15_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P15_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P15_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P15_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P15_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P16; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P16_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P16_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P16_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P16_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P16_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P16_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P16_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P16_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P16_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P16_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P16_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P16_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P16_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P17; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P17_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P17_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P17_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P17_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P17_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P17_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P17_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P17_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P17_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P17_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P17_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P17_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P17_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P18; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P18_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P18_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P18_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P18_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P18_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P18_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P18_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P18_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P18_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P18_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P18_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P18_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P18_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P19; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P19_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P19_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P19_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P19_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P19_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P19_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P19_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P19_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P19_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P19_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P19_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P19_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P19_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P20; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P20_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P20_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P20_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P20_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P20_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P20_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P20_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P20_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P20_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P20_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P20_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P20_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P20_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P21; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P21_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P21_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P21_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P21_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P21_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P21_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P21_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P21_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P21_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P21_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P21_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P21_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P21_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P22; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P22_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P22_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P22_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P22_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P22_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P22_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P22_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P22_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P22_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P22_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P22_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P22_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P22_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P23; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P23_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P23_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P23_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P23_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P23_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P23_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P23_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P23_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P23_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P23_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P23_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P23_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P23_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P24; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P24_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P24_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P24_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P24_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P24_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P24_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P24_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P24_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P24_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P24_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P24_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P24_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P24_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P25; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P25_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P25_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P25_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P25_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P25_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P25_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P25_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P25_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P25_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P25_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P25_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P25_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P25_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P26; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P26_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P26_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P26_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P26_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P26_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P26_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P26_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P26_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P26_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P26_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P26_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P26_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P26_encode_aper; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P27; asn_struct_free_f S1AP_ProtocolIE_SingleContainer_6554P27_free; asn_struct_print_f S1AP_ProtocolIE_SingleContainer_6554P27_print; asn_constr_check_f S1AP_ProtocolIE_SingleContainer_6554P27_constraint; ber_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P27_decode_ber; der_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P27_encode_der; xer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P27_decode_xer; xer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P27_encode_xer; oer_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P27_decode_oer; oer_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P27_encode_oer; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P27_decode_uper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P27_encode_uper; per_type_decoder_f S1AP_ProtocolIE_SingleContainer_6554P27_decode_aper; per_type_encoder_f S1AP_ProtocolIE_SingleContainer_6554P27_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_ProtocolIE_SingleContainer_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_QCI.c000066400000000000000000000032741333553357400172450ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_QCI.h" int S1AP_QCI_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 255)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_QCI_constr_1 CC_NOTUSED = { { 1, 1 } /* (0..255) */, -1}; asn_per_constraints_t asn_PER_type_S1AP_QCI_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_QCI_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_QCI = { "QCI", "QCI", &asn_OP_NativeInteger, asn_DEF_S1AP_QCI_tags_1, sizeof(asn_DEF_S1AP_QCI_tags_1) /sizeof(asn_DEF_S1AP_QCI_tags_1[0]), /* 1 */ asn_DEF_S1AP_QCI_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_QCI_tags_1) /sizeof(asn_DEF_S1AP_QCI_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_QCI_constr_1, &asn_PER_type_S1AP_QCI_constr_1, S1AP_QCI_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_QCI.h000066400000000000000000000022131333553357400172420ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_QCI_H_ #define _S1AP_QCI_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_QCI */ typedef long S1AP_QCI_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_QCI_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_QCI; asn_struct_free_f S1AP_QCI_free; asn_struct_print_f S1AP_QCI_print; asn_constr_check_f S1AP_QCI_constraint; ber_type_decoder_f S1AP_QCI_decode_ber; der_type_encoder_f S1AP_QCI_encode_der; xer_type_decoder_f S1AP_QCI_decode_xer; xer_type_encoder_f S1AP_QCI_encode_xer; oer_type_decoder_f S1AP_QCI_decode_oer; oer_type_encoder_f S1AP_QCI_encode_oer; per_type_decoder_f S1AP_QCI_decode_uper; per_type_encoder_f S1AP_QCI_encode_uper; per_type_decoder_f S1AP_QCI_decode_aper; per_type_encoder_f S1AP_QCI_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_QCI_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RAC.c000066400000000000000000000033731333553357400172360ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_RAC.h" int S1AP_RAC_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } size = st->size; if((size == 1)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_RAC_constr_1 CC_NOTUSED = { { 0, 0 }, 1 /* (SIZE(1..1)) */}; asn_per_constraints_t asn_PER_type_S1AP_RAC_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 1, 1 } /* (SIZE(1..1)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_RAC_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_RAC = { "RAC", "RAC", &asn_OP_OCTET_STRING, asn_DEF_S1AP_RAC_tags_1, sizeof(asn_DEF_S1AP_RAC_tags_1) /sizeof(asn_DEF_S1AP_RAC_tags_1[0]), /* 1 */ asn_DEF_S1AP_RAC_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_RAC_tags_1) /sizeof(asn_DEF_S1AP_RAC_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_RAC_constr_1, &asn_PER_type_S1AP_RAC_constr_1, S1AP_RAC_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RAC.h000066400000000000000000000022241333553357400172350ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_RAC_H_ #define _S1AP_RAC_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_RAC */ typedef OCTET_STRING_t S1AP_RAC_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_RAC_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_RAC; asn_struct_free_f S1AP_RAC_free; asn_struct_print_f S1AP_RAC_print; asn_constr_check_f S1AP_RAC_constraint; ber_type_decoder_f S1AP_RAC_decode_ber; der_type_encoder_f S1AP_RAC_encode_der; xer_type_decoder_f S1AP_RAC_decode_xer; xer_type_encoder_f S1AP_RAC_encode_xer; oer_type_decoder_f S1AP_RAC_decode_oer; oer_type_encoder_f S1AP_RAC_encode_oer; per_type_decoder_f S1AP_RAC_decode_uper; per_type_encoder_f S1AP_RAC_encode_uper; per_type_decoder_f S1AP_RAC_decode_aper; per_type_encoder_f S1AP_RAC_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_RAC_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RAT-Type.c000066400000000000000000000036161333553357400201760ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_RAT-Type.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_RAT_Type_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_RAT_Type_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_RAT_Type_value2enum_1[] = { { 0, 5, "nbiot" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_RAT_Type_enum2value_1[] = { 0 /* nbiot(0) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_RAT_Type_specs_1 = { asn_MAP_S1AP_RAT_Type_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_RAT_Type_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_RAT_Type_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_RAT_Type = { "RAT-Type", "RAT-Type", &asn_OP_NativeEnumerated, asn_DEF_S1AP_RAT_Type_tags_1, sizeof(asn_DEF_S1AP_RAT_Type_tags_1) /sizeof(asn_DEF_S1AP_RAT_Type_tags_1[0]), /* 1 */ asn_DEF_S1AP_RAT_Type_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_RAT_Type_tags_1) /sizeof(asn_DEF_S1AP_RAT_Type_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_RAT_Type_constr_1, &asn_PER_type_S1AP_RAT_Type_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_RAT_Type_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RAT-Type.h000066400000000000000000000024641333553357400202030ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_RAT_Type_H_ #define _S1AP_RAT_Type_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_RAT_Type { S1AP_RAT_Type_nbiot = 0 /* * Enumeration is extensible */ } e_S1AP_RAT_Type; /* S1AP_RAT-Type */ typedef long S1AP_RAT_Type_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_RAT_Type; asn_struct_free_f S1AP_RAT_Type_free; asn_struct_print_f S1AP_RAT_Type_print; asn_constr_check_f S1AP_RAT_Type_constraint; ber_type_decoder_f S1AP_RAT_Type_decode_ber; der_type_encoder_f S1AP_RAT_Type_encode_der; xer_type_decoder_f S1AP_RAT_Type_decode_xer; xer_type_encoder_f S1AP_RAT_Type_encode_xer; oer_type_decoder_f S1AP_RAT_Type_decode_oer; oer_type_encoder_f S1AP_RAT_Type_encode_oer; per_type_decoder_f S1AP_RAT_Type_decode_uper; per_type_encoder_f S1AP_RAT_Type_encode_uper; per_type_decoder_f S1AP_RAT_Type_decode_aper; per_type_encoder_f S1AP_RAT_Type_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_RAT_Type_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RIMInformation.c000066400000000000000000000017331333553357400214640ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_RIMInformation.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_RIMInformation_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_RIMInformation = { "RIMInformation", "RIMInformation", &asn_OP_OCTET_STRING, asn_DEF_S1AP_RIMInformation_tags_1, sizeof(asn_DEF_S1AP_RIMInformation_tags_1) /sizeof(asn_DEF_S1AP_RIMInformation_tags_1[0]), /* 1 */ asn_DEF_S1AP_RIMInformation_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_RIMInformation_tags_1) /sizeof(asn_DEF_S1AP_RIMInformation_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RIMInformation.h000066400000000000000000000024501333553357400214660ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_RIMInformation_H_ #define _S1AP_RIMInformation_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_RIMInformation */ typedef OCTET_STRING_t S1AP_RIMInformation_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_RIMInformation; asn_struct_free_f S1AP_RIMInformation_free; asn_struct_print_f S1AP_RIMInformation_print; asn_constr_check_f S1AP_RIMInformation_constraint; ber_type_decoder_f S1AP_RIMInformation_decode_ber; der_type_encoder_f S1AP_RIMInformation_encode_der; xer_type_decoder_f S1AP_RIMInformation_decode_xer; xer_type_encoder_f S1AP_RIMInformation_encode_xer; oer_type_decoder_f S1AP_RIMInformation_decode_oer; oer_type_encoder_f S1AP_RIMInformation_encode_oer; per_type_decoder_f S1AP_RIMInformation_decode_uper; per_type_encoder_f S1AP_RIMInformation_encode_uper; per_type_decoder_f S1AP_RIMInformation_decode_aper; per_type_encoder_f S1AP_RIMInformation_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_RIMInformation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RIMRoutingAddress.c000066400000000000000000000072231333553357400221340ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_RIMRoutingAddress.h" #include "S1AP_GERAN-Cell-ID.h" #include "S1AP_TargetRNC-ID.h" static int memb_S1AP_eHRPD_Sector_ID_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } size = st->size; if((size == 16)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_oer_constraints_t asn_OER_memb_S1AP_eHRPD_Sector_ID_constr_5 CC_NOTUSED = { { 0, 0 }, 16 /* (SIZE(16..16)) */}; static asn_per_constraints_t asn_PER_memb_S1AP_eHRPD_Sector_ID_constr_5 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_type_S1AP_RIMRoutingAddress_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_RIMRoutingAddress_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_RIMRoutingAddress_1[] = { { ATF_POINTER, 0, offsetof(struct S1AP_RIMRoutingAddress, choice.gERAN_Cell_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_GERAN_Cell_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "gERAN-Cell-ID" }, { ATF_POINTER, 0, offsetof(struct S1AP_RIMRoutingAddress, choice.targetRNC_ID), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TargetRNC_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "targetRNC-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_RIMRoutingAddress, choice.eHRPD_Sector_ID), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_OCTET_STRING, 0, { &asn_OER_memb_S1AP_eHRPD_Sector_ID_constr_5, &asn_PER_memb_S1AP_eHRPD_Sector_ID_constr_5, memb_S1AP_eHRPD_Sector_ID_constraint_1 }, 0, 0, /* No default value */ "eHRPD-Sector-ID" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_RIMRoutingAddress_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* gERAN-Cell-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* targetRNC-ID */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* eHRPD-Sector-ID */ }; asn_CHOICE_specifics_t asn_SPC_S1AP_RIMRoutingAddress_specs_1 = { sizeof(struct S1AP_RIMRoutingAddress), offsetof(struct S1AP_RIMRoutingAddress, _asn_ctx), offsetof(struct S1AP_RIMRoutingAddress, present), sizeof(((struct S1AP_RIMRoutingAddress *)0)->present), asn_MAP_S1AP_RIMRoutingAddress_tag2el_1, 3, /* Count of tags in the map */ 0, 0, 1 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_RIMRoutingAddress = { "RIMRoutingAddress", "RIMRoutingAddress", &asn_OP_CHOICE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { &asn_OER_type_S1AP_RIMRoutingAddress_constr_1, &asn_PER_type_S1AP_RIMRoutingAddress_constr_1, CHOICE_constraint }, asn_MBR_S1AP_RIMRoutingAddress_1, 3, /* Elements count */ &asn_SPC_S1AP_RIMRoutingAddress_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RIMRoutingAddress.h000066400000000000000000000032341333553357400221370ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_RIMRoutingAddress_H_ #define _S1AP_RIMRoutingAddress_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_RIMRoutingAddress_PR { S1AP_RIMRoutingAddress_PR_NOTHING, /* No components present */ S1AP_RIMRoutingAddress_PR_gERAN_Cell_ID, /* Extensions may appear below */ S1AP_RIMRoutingAddress_PR_targetRNC_ID, S1AP_RIMRoutingAddress_PR_eHRPD_Sector_ID } S1AP_RIMRoutingAddress_PR; /* Forward declarations */ struct S1AP_GERAN_Cell_ID; struct S1AP_TargetRNC_ID; /* S1AP_RIMRoutingAddress */ typedef struct S1AP_RIMRoutingAddress { S1AP_RIMRoutingAddress_PR present; union S1AP_RIMRoutingAddress_u { struct S1AP_GERAN_Cell_ID *gERAN_Cell_ID; /* * This type is extensible, * possible extensions are below. */ struct S1AP_TargetRNC_ID *targetRNC_ID; OCTET_STRING_t eHRPD_Sector_ID; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_RIMRoutingAddress_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_RIMRoutingAddress; extern asn_CHOICE_specifics_t asn_SPC_S1AP_RIMRoutingAddress_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_RIMRoutingAddress_1[3]; extern asn_per_constraints_t asn_PER_type_S1AP_RIMRoutingAddress_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_RIMRoutingAddress_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RIMTransfer.c000066400000000000000000000047251333553357400207670ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_RIMTransfer.h" #include "S1AP_RIMRoutingAddress.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_RIMTransfer_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RIMTransfer, rIMInformation), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_RIMInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "rIMInformation" }, { ATF_POINTER, 2, offsetof(struct S1AP_RIMTransfer, rIMRoutingAddress), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_RIMRoutingAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "rIMRoutingAddress" }, { ATF_POINTER, 1, offsetof(struct S1AP_RIMTransfer, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P85, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_RIMTransfer_oms_1[] = { 1, 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_RIMTransfer_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_RIMTransfer_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* rIMInformation */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* rIMRoutingAddress */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_RIMTransfer_specs_1 = { sizeof(struct S1AP_RIMTransfer), offsetof(struct S1AP_RIMTransfer, _asn_ctx), asn_MAP_S1AP_RIMTransfer_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_RIMTransfer_oms_1, /* Optional members */ 2, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_RIMTransfer = { "RIMTransfer", "RIMTransfer", &asn_OP_SEQUENCE, asn_DEF_S1AP_RIMTransfer_tags_1, sizeof(asn_DEF_S1AP_RIMTransfer_tags_1) /sizeof(asn_DEF_S1AP_RIMTransfer_tags_1[0]), /* 1 */ asn_DEF_S1AP_RIMTransfer_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_RIMTransfer_tags_1) /sizeof(asn_DEF_S1AP_RIMTransfer_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_RIMTransfer_1, 3, /* Elements count */ &asn_SPC_S1AP_RIMTransfer_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RIMTransfer.h000066400000000000000000000023401333553357400207630ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_RIMTransfer_H_ #define _S1AP_RIMTransfer_H_ #include /* Including external dependencies */ #include "S1AP_RIMInformation.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_RIMRoutingAddress; struct S1AP_ProtocolExtensionContainer; /* S1AP_RIMTransfer */ typedef struct S1AP_RIMTransfer { S1AP_RIMInformation_t rIMInformation; struct S1AP_RIMRoutingAddress *rIMRoutingAddress; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_RIMTransfer_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_RIMTransfer; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_RIMTransfer_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_RIMTransfer_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_RIMTransfer_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RLFReportInformation.c000066400000000000000000000054211333553357400226520ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_RLFReportInformation.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_RLFReportInformation_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RLFReportInformation, uE_RLF_Report_Container), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_UE_RLF_Report_Container, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "uE-RLF-Report-Container" }, { ATF_POINTER, 2, offsetof(struct S1AP_RLFReportInformation, uE_RLF_Report_Container_for_extended_bands), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_UE_RLF_Report_Container_for_extended_bands, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "uE-RLF-Report-Container-for-extended-bands" }, { ATF_POINTER, 1, offsetof(struct S1AP_RLFReportInformation, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P86, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_RLFReportInformation_oms_1[] = { 1, 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_RLFReportInformation_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_RLFReportInformation_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* uE-RLF-Report-Container */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* uE-RLF-Report-Container-for-extended-bands */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_RLFReportInformation_specs_1 = { sizeof(struct S1AP_RLFReportInformation), offsetof(struct S1AP_RLFReportInformation, _asn_ctx), asn_MAP_S1AP_RLFReportInformation_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_RLFReportInformation_oms_1, /* Optional members */ 2, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_RLFReportInformation = { "RLFReportInformation", "RLFReportInformation", &asn_OP_SEQUENCE, asn_DEF_S1AP_RLFReportInformation_tags_1, sizeof(asn_DEF_S1AP_RLFReportInformation_tags_1) /sizeof(asn_DEF_S1AP_RLFReportInformation_tags_1[0]), /* 1 */ asn_DEF_S1AP_RLFReportInformation_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_RLFReportInformation_tags_1) /sizeof(asn_DEF_S1AP_RLFReportInformation_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_RLFReportInformation_1, 3, /* Elements count */ &asn_SPC_S1AP_RLFReportInformation_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RLFReportInformation.h000066400000000000000000000026271333553357400226640ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_RLFReportInformation_H_ #define _S1AP_RLFReportInformation_H_ #include /* Including external dependencies */ #include "S1AP_UE-RLF-Report-Container.h" #include "S1AP_UE-RLF-Report-Container-for-extended-bands.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_RLFReportInformation */ typedef struct S1AP_RLFReportInformation { S1AP_UE_RLF_Report_Container_t uE_RLF_Report_Container; S1AP_UE_RLF_Report_Container_for_extended_bands_t *uE_RLF_Report_Container_for_extended_bands; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_RLFReportInformation_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_RLFReportInformation; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_RLFReportInformation_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_RLFReportInformation_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_RLFReportInformation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RNC-ID.c000066400000000000000000000033651333553357400175460ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_RNC-ID.h" int S1AP_RNC_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 4095)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_RNC_ID_constr_1 CC_NOTUSED = { { 2, 1 } /* (0..4095) */, -1}; asn_per_constraints_t asn_PER_type_S1AP_RNC_ID_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 12, 12, 0, 4095 } /* (0..4095) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_RNC_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_RNC_ID = { "RNC-ID", "RNC-ID", &asn_OP_NativeInteger, asn_DEF_S1AP_RNC_ID_tags_1, sizeof(asn_DEF_S1AP_RNC_ID_tags_1) /sizeof(asn_DEF_S1AP_RNC_ID_tags_1[0]), /* 1 */ asn_DEF_S1AP_RNC_ID_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_RNC_ID_tags_1) /sizeof(asn_DEF_S1AP_RNC_ID_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_RNC_ID_constr_1, &asn_PER_type_S1AP_RNC_ID_constr_1, S1AP_RNC_ID_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RNC-ID.h000066400000000000000000000023071333553357400175460ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_RNC_ID_H_ #define _S1AP_RNC_ID_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_RNC-ID */ typedef long S1AP_RNC_ID_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_RNC_ID_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_RNC_ID; asn_struct_free_f S1AP_RNC_ID_free; asn_struct_print_f S1AP_RNC_ID_print; asn_constr_check_f S1AP_RNC_ID_constraint; ber_type_decoder_f S1AP_RNC_ID_decode_ber; der_type_encoder_f S1AP_RNC_ID_encode_der; xer_type_decoder_f S1AP_RNC_ID_decode_xer; xer_type_encoder_f S1AP_RNC_ID_encode_xer; oer_type_decoder_f S1AP_RNC_ID_decode_oer; oer_type_encoder_f S1AP_RNC_ID_encode_oer; per_type_decoder_f S1AP_RNC_ID_decode_uper; per_type_encoder_f S1AP_RNC_ID_encode_uper; per_type_decoder_f S1AP_RNC_ID_decode_aper; per_type_encoder_f S1AP_RNC_ID_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_RNC_ID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RRC-Container.c000066400000000000000000000017201333553357400211710ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_RRC-Container.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_RRC_Container_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_RRC_Container = { "RRC-Container", "RRC-Container", &asn_OP_OCTET_STRING, asn_DEF_S1AP_RRC_Container_tags_1, sizeof(asn_DEF_S1AP_RRC_Container_tags_1) /sizeof(asn_DEF_S1AP_RRC_Container_tags_1[0]), /* 1 */ asn_DEF_S1AP_RRC_Container_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_RRC_Container_tags_1) /sizeof(asn_DEF_S1AP_RRC_Container_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RRC-Container.h000066400000000000000000000024251333553357400212010ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_RRC_Container_H_ #define _S1AP_RRC_Container_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_RRC-Container */ typedef OCTET_STRING_t S1AP_RRC_Container_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_RRC_Container; asn_struct_free_f S1AP_RRC_Container_free; asn_struct_print_f S1AP_RRC_Container_print; asn_constr_check_f S1AP_RRC_Container_constraint; ber_type_decoder_f S1AP_RRC_Container_decode_ber; der_type_encoder_f S1AP_RRC_Container_encode_der; xer_type_decoder_f S1AP_RRC_Container_decode_xer; xer_type_encoder_f S1AP_RRC_Container_encode_xer; oer_type_decoder_f S1AP_RRC_Container_decode_oer; oer_type_encoder_f S1AP_RRC_Container_encode_oer; per_type_decoder_f S1AP_RRC_Container_decode_uper; per_type_encoder_f S1AP_RRC_Container_encode_uper; per_type_decoder_f S1AP_RRC_Container_decode_aper; per_type_encoder_f S1AP_RRC_Container_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_RRC_Container_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RRC-Establishment-Cause.c000066400000000000000000000051371333553357400231150ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_RRC-Establishment-Cause.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_RRC_Establishment_Cause_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_RRC_Establishment_Cause_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 4 } /* (0..4,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_RRC_Establishment_Cause_value2enum_1[] = { { 0, 9, "emergency" }, { 1, 18, "highPriorityAccess" }, { 2, 9, "mt-Access" }, { 3, 13, "mo-Signalling" }, { 4, 7, "mo-Data" }, { 5, 20, "delay-TolerantAccess" }, { 6, 12, "mo-VoiceCall" }, { 7, 16, "mo-ExceptionData" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_RRC_Establishment_Cause_enum2value_1[] = { 5, /* delay-TolerantAccess(5) */ 0, /* emergency(0) */ 1, /* highPriorityAccess(1) */ 4, /* mo-Data(4) */ 7, /* mo-ExceptionData(7) */ 3, /* mo-Signalling(3) */ 6, /* mo-VoiceCall(6) */ 2 /* mt-Access(2) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_RRC_Establishment_Cause_specs_1 = { asn_MAP_S1AP_RRC_Establishment_Cause_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_RRC_Establishment_Cause_enum2value_1, /* N => "tag"; sorted by N */ 8, /* Number of elements in the maps */ 6, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_RRC_Establishment_Cause_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_RRC_Establishment_Cause = { "RRC-Establishment-Cause", "RRC-Establishment-Cause", &asn_OP_NativeEnumerated, asn_DEF_S1AP_RRC_Establishment_Cause_tags_1, sizeof(asn_DEF_S1AP_RRC_Establishment_Cause_tags_1) /sizeof(asn_DEF_S1AP_RRC_Establishment_Cause_tags_1[0]), /* 1 */ asn_DEF_S1AP_RRC_Establishment_Cause_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_RRC_Establishment_Cause_tags_1) /sizeof(asn_DEF_S1AP_RRC_Establishment_Cause_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_RRC_Establishment_Cause_constr_1, &asn_PER_type_S1AP_RRC_Establishment_Cause_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_RRC_Establishment_Cause_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RRC-Establishment-Cause.h000066400000000000000000000037351333553357400231240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_RRC_Establishment_Cause_H_ #define _S1AP_RRC_Establishment_Cause_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_RRC_Establishment_Cause { S1AP_RRC_Establishment_Cause_emergency = 0, S1AP_RRC_Establishment_Cause_highPriorityAccess = 1, S1AP_RRC_Establishment_Cause_mt_Access = 2, S1AP_RRC_Establishment_Cause_mo_Signalling = 3, S1AP_RRC_Establishment_Cause_mo_Data = 4, /* * Enumeration is extensible */ S1AP_RRC_Establishment_Cause_delay_TolerantAccess = 5, S1AP_RRC_Establishment_Cause_mo_VoiceCall = 6, S1AP_RRC_Establishment_Cause_mo_ExceptionData = 7 } e_S1AP_RRC_Establishment_Cause; /* S1AP_RRC-Establishment-Cause */ typedef long S1AP_RRC_Establishment_Cause_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_RRC_Establishment_Cause; asn_struct_free_f S1AP_RRC_Establishment_Cause_free; asn_struct_print_f S1AP_RRC_Establishment_Cause_print; asn_constr_check_f S1AP_RRC_Establishment_Cause_constraint; ber_type_decoder_f S1AP_RRC_Establishment_Cause_decode_ber; der_type_encoder_f S1AP_RRC_Establishment_Cause_encode_der; xer_type_decoder_f S1AP_RRC_Establishment_Cause_decode_xer; xer_type_encoder_f S1AP_RRC_Establishment_Cause_encode_xer; oer_type_decoder_f S1AP_RRC_Establishment_Cause_decode_oer; oer_type_encoder_f S1AP_RRC_Establishment_Cause_encode_oer; per_type_decoder_f S1AP_RRC_Establishment_Cause_decode_uper; per_type_encoder_f S1AP_RRC_Establishment_Cause_encode_uper; per_type_decoder_f S1AP_RRC_Establishment_Cause_decode_aper; per_type_encoder_f S1AP_RRC_Establishment_Cause_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_RRC_Establishment_Cause_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ReceiveStatusOfULPDCPSDUsExtended.c000066400000000000000000000045701333553357400250340ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ReceiveStatusOfULPDCPSDUsExtended.h" int S1AP_ReceiveStatusOfULPDCPSDUsExtended_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size >= 1 && size <= 16384)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_ReceiveStatusOfULPDCPSDUsExtended_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..16384)) */}; static asn_per_constraints_t asn_PER_type_S1AP_ReceiveStatusOfULPDCPSDUsExtended_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 14, 14, 1, 16384 } /* (SIZE(1..16384)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ReceiveStatusOfULPDCPSDUsExtended_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ReceiveStatusOfULPDCPSDUsExtended = { "ReceiveStatusOfULPDCPSDUsExtended", "ReceiveStatusOfULPDCPSDUsExtended", &asn_OP_BIT_STRING, asn_DEF_S1AP_ReceiveStatusOfULPDCPSDUsExtended_tags_1, sizeof(asn_DEF_S1AP_ReceiveStatusOfULPDCPSDUsExtended_tags_1) /sizeof(asn_DEF_S1AP_ReceiveStatusOfULPDCPSDUsExtended_tags_1[0]), /* 1 */ asn_DEF_S1AP_ReceiveStatusOfULPDCPSDUsExtended_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ReceiveStatusOfULPDCPSDUsExtended_tags_1) /sizeof(asn_DEF_S1AP_ReceiveStatusOfULPDCPSDUsExtended_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ReceiveStatusOfULPDCPSDUsExtended_constr_1, &asn_PER_type_S1AP_ReceiveStatusOfULPDCPSDUsExtended_constr_1, S1AP_ReceiveStatusOfULPDCPSDUsExtended_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ReceiveStatusOfULPDCPSDUsExtended.h000066400000000000000000000032151333553357400250340ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ReceiveStatusOfULPDCPSDUsExtended_H_ #define _S1AP_ReceiveStatusOfULPDCPSDUsExtended_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ReceiveStatusOfULPDCPSDUsExtended */ typedef BIT_STRING_t S1AP_ReceiveStatusOfULPDCPSDUsExtended_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ReceiveStatusOfULPDCPSDUsExtended; asn_struct_free_f S1AP_ReceiveStatusOfULPDCPSDUsExtended_free; asn_struct_print_f S1AP_ReceiveStatusOfULPDCPSDUsExtended_print; asn_constr_check_f S1AP_ReceiveStatusOfULPDCPSDUsExtended_constraint; ber_type_decoder_f S1AP_ReceiveStatusOfULPDCPSDUsExtended_decode_ber; der_type_encoder_f S1AP_ReceiveStatusOfULPDCPSDUsExtended_encode_der; xer_type_decoder_f S1AP_ReceiveStatusOfULPDCPSDUsExtended_decode_xer; xer_type_encoder_f S1AP_ReceiveStatusOfULPDCPSDUsExtended_encode_xer; oer_type_decoder_f S1AP_ReceiveStatusOfULPDCPSDUsExtended_decode_oer; oer_type_encoder_f S1AP_ReceiveStatusOfULPDCPSDUsExtended_encode_oer; per_type_decoder_f S1AP_ReceiveStatusOfULPDCPSDUsExtended_decode_uper; per_type_encoder_f S1AP_ReceiveStatusOfULPDCPSDUsExtended_encode_uper; per_type_decoder_f S1AP_ReceiveStatusOfULPDCPSDUsExtended_decode_aper; per_type_encoder_f S1AP_ReceiveStatusOfULPDCPSDUsExtended_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_ReceiveStatusOfULPDCPSDUsExtended_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ReceiveStatusOfULPDCPSDUsPDCP-SNlength18.c000066400000000000000000000047621333553357400257160ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ReceiveStatusOfULPDCPSDUsPDCP-SNlength18.h" int S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size >= 1 && size <= 131072)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..131072)) */}; static asn_per_constraints_t asn_PER_type_S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 17, -1, 1, 131072 } /* (SIZE(1..131072)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18 = { "ReceiveStatusOfULPDCPSDUsPDCP-SNlength18", "ReceiveStatusOfULPDCPSDUsPDCP-SNlength18", &asn_OP_BIT_STRING, asn_DEF_S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_tags_1, sizeof(asn_DEF_S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_tags_1) /sizeof(asn_DEF_S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_tags_1[0]), /* 1 */ asn_DEF_S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_tags_1) /sizeof(asn_DEF_S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_constr_1, &asn_PER_type_S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_constr_1, S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ReceiveStatusOfULPDCPSDUsPDCP-SNlength18.h000066400000000000000000000034221333553357400257130ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_H_ #define _S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 */ typedef BIT_STRING_t S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18; asn_struct_free_f S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_free; asn_struct_print_f S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_print; asn_constr_check_f S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_constraint; ber_type_decoder_f S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_decode_ber; der_type_encoder_f S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_encode_der; xer_type_decoder_f S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_decode_xer; xer_type_encoder_f S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_encode_xer; oer_type_decoder_f S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_decode_oer; oer_type_encoder_f S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_encode_oer; per_type_decoder_f S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_decode_uper; per_type_encoder_f S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_encode_uper; per_type_decoder_f S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_decode_aper; per_type_encoder_f S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_ReceiveStatusOfULPDCPSDUsPDCP_SNlength18_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ReceiveStatusofULPDCPSDUs.c000066400000000000000000000043411333553357400234070ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ReceiveStatusofULPDCPSDUs.h" int S1AP_ReceiveStatusofULPDCPSDUs_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 4096)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_ReceiveStatusofULPDCPSDUs_constr_1 CC_NOTUSED = { { 0, 0 }, 4096 /* (SIZE(4096..4096)) */}; asn_per_constraints_t asn_PER_type_S1AP_ReceiveStatusofULPDCPSDUs_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 4096, 4096 } /* (SIZE(4096..4096)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_ReceiveStatusofULPDCPSDUs_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ReceiveStatusofULPDCPSDUs = { "ReceiveStatusofULPDCPSDUs", "ReceiveStatusofULPDCPSDUs", &asn_OP_BIT_STRING, asn_DEF_S1AP_ReceiveStatusofULPDCPSDUs_tags_1, sizeof(asn_DEF_S1AP_ReceiveStatusofULPDCPSDUs_tags_1) /sizeof(asn_DEF_S1AP_ReceiveStatusofULPDCPSDUs_tags_1[0]), /* 1 */ asn_DEF_S1AP_ReceiveStatusofULPDCPSDUs_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ReceiveStatusofULPDCPSDUs_tags_1) /sizeof(asn_DEF_S1AP_ReceiveStatusofULPDCPSDUs_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ReceiveStatusofULPDCPSDUs_constr_1, &asn_PER_type_S1AP_ReceiveStatusofULPDCPSDUs_constr_1, S1AP_ReceiveStatusofULPDCPSDUs_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ReceiveStatusofULPDCPSDUs.h000066400000000000000000000031101333553357400234050ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ReceiveStatusofULPDCPSDUs_H_ #define _S1AP_ReceiveStatusofULPDCPSDUs_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ReceiveStatusofULPDCPSDUs */ typedef BIT_STRING_t S1AP_ReceiveStatusofULPDCPSDUs_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_ReceiveStatusofULPDCPSDUs_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ReceiveStatusofULPDCPSDUs; asn_struct_free_f S1AP_ReceiveStatusofULPDCPSDUs_free; asn_struct_print_f S1AP_ReceiveStatusofULPDCPSDUs_print; asn_constr_check_f S1AP_ReceiveStatusofULPDCPSDUs_constraint; ber_type_decoder_f S1AP_ReceiveStatusofULPDCPSDUs_decode_ber; der_type_encoder_f S1AP_ReceiveStatusofULPDCPSDUs_encode_der; xer_type_decoder_f S1AP_ReceiveStatusofULPDCPSDUs_decode_xer; xer_type_encoder_f S1AP_ReceiveStatusofULPDCPSDUs_encode_xer; oer_type_decoder_f S1AP_ReceiveStatusofULPDCPSDUs_decode_oer; oer_type_encoder_f S1AP_ReceiveStatusofULPDCPSDUs_encode_oer; per_type_decoder_f S1AP_ReceiveStatusofULPDCPSDUs_decode_uper; per_type_encoder_f S1AP_ReceiveStatusofULPDCPSDUs_encode_uper; per_type_decoder_f S1AP_ReceiveStatusofULPDCPSDUs_decode_aper; per_type_encoder_f S1AP_ReceiveStatusofULPDCPSDUs_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_ReceiveStatusofULPDCPSDUs_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RecommendedCellItem.c000066400000000000000000000071401333553357400224660ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_RecommendedCellItem.h" #include "S1AP_ProtocolExtensionContainer.h" static int memb_S1AP_timeStayedInCell_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 4095)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_oer_constraints_t asn_OER_memb_S1AP_timeStayedInCell_constr_3 CC_NOTUSED = { { 2, 1 } /* (0..4095) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_timeStayedInCell_constr_3 CC_NOTUSED = { { APC_CONSTRAINED, 12, 12, 0, 4095 } /* (0..4095) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_RecommendedCellItem_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedCellItem, eUTRAN_CGI), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_EUTRAN_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "eUTRAN-CGI" }, { ATF_POINTER, 2, offsetof(struct S1AP_RecommendedCellItem, timeStayedInCell), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, 0, { &asn_OER_memb_S1AP_timeStayedInCell_constr_3, &asn_PER_memb_S1AP_timeStayedInCell_constr_3, memb_S1AP_timeStayedInCell_constraint_1 }, 0, 0, /* No default value */ "timeStayedInCell" }, { ATF_POINTER, 1, offsetof(struct S1AP_RecommendedCellItem, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P81, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_RecommendedCellItem_oms_1[] = { 1, 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_RecommendedCellItem_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_RecommendedCellItem_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eUTRAN-CGI */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* timeStayedInCell */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_RecommendedCellItem_specs_1 = { sizeof(struct S1AP_RecommendedCellItem), offsetof(struct S1AP_RecommendedCellItem, _asn_ctx), asn_MAP_S1AP_RecommendedCellItem_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_RecommendedCellItem_oms_1, /* Optional members */ 2, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedCellItem = { "RecommendedCellItem", "RecommendedCellItem", &asn_OP_SEQUENCE, asn_DEF_S1AP_RecommendedCellItem_tags_1, sizeof(asn_DEF_S1AP_RecommendedCellItem_tags_1) /sizeof(asn_DEF_S1AP_RecommendedCellItem_tags_1[0]), /* 1 */ asn_DEF_S1AP_RecommendedCellItem_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_RecommendedCellItem_tags_1) /sizeof(asn_DEF_S1AP_RecommendedCellItem_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_RecommendedCellItem_1, 3, /* Elements count */ &asn_SPC_S1AP_RecommendedCellItem_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RecommendedCellItem.h000066400000000000000000000021641333553357400224740ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_RecommendedCellItem_H_ #define _S1AP_RecommendedCellItem_H_ #include /* Including external dependencies */ #include "S1AP_EUTRAN-CGI.h" #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_RecommendedCellItem */ typedef struct S1AP_RecommendedCellItem { S1AP_EUTRAN_CGI_t eUTRAN_CGI; long *timeStayedInCell; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_RecommendedCellItem_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedCellItem; #ifdef __cplusplus } #endif #endif /* _S1AP_RecommendedCellItem_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RecommendedCellList.c000066400000000000000000000036151333553357400225060ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_RecommendedCellList.h" #include "S1AP_ProtocolIE-SingleContainer.h" static asn_oer_constraints_t asn_OER_type_S1AP_RecommendedCellList_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..16)) */}; asn_per_constraints_t asn_PER_type_S1AP_RecommendedCellList_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 4, 4, 1, 16 } /* (SIZE(1..16)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_RecommendedCellList_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P15, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_RecommendedCellList_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_RecommendedCellList_specs_1 = { sizeof(struct S1AP_RecommendedCellList), offsetof(struct S1AP_RecommendedCellList, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedCellList = { "RecommendedCellList", "RecommendedCellList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_RecommendedCellList_tags_1, sizeof(asn_DEF_S1AP_RecommendedCellList_tags_1) /sizeof(asn_DEF_S1AP_RecommendedCellList_tags_1[0]), /* 1 */ asn_DEF_S1AP_RecommendedCellList_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_RecommendedCellList_tags_1) /sizeof(asn_DEF_S1AP_RecommendedCellList_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_RecommendedCellList_constr_1, &asn_PER_type_S1AP_RecommendedCellList_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_RecommendedCellList_1, 1, /* Single element */ &asn_SPC_S1AP_RecommendedCellList_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RecommendedCellList.h000066400000000000000000000022261333553357400225100ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_RecommendedCellList_H_ #define _S1AP_RecommendedCellList_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolIE_SingleContainer; /* S1AP_RecommendedCellList */ typedef struct S1AP_RecommendedCellList { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_RecommendedCellList_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedCellList; extern asn_SET_OF_specifics_t asn_SPC_S1AP_RecommendedCellList_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_RecommendedCellList_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_RecommendedCellList_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_RecommendedCellList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RecommendedCellsForPaging.c000066400000000000000000000046551333553357400236370ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_RecommendedCellsForPaging.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_RecommendedCellsForPaging_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedCellsForPaging, recommendedCellList), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_RecommendedCellList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "recommendedCellList" }, { ATF_POINTER, 1, offsetof(struct S1AP_RecommendedCellsForPaging, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P80, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_RecommendedCellsForPaging_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_RecommendedCellsForPaging_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_RecommendedCellsForPaging_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* recommendedCellList */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_RecommendedCellsForPaging_specs_1 = { sizeof(struct S1AP_RecommendedCellsForPaging), offsetof(struct S1AP_RecommendedCellsForPaging, _asn_ctx), asn_MAP_S1AP_RecommendedCellsForPaging_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_RecommendedCellsForPaging_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedCellsForPaging = { "RecommendedCellsForPaging", "RecommendedCellsForPaging", &asn_OP_SEQUENCE, asn_DEF_S1AP_RecommendedCellsForPaging_tags_1, sizeof(asn_DEF_S1AP_RecommendedCellsForPaging_tags_1) /sizeof(asn_DEF_S1AP_RecommendedCellsForPaging_tags_1[0]), /* 1 */ asn_DEF_S1AP_RecommendedCellsForPaging_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_RecommendedCellsForPaging_tags_1) /sizeof(asn_DEF_S1AP_RecommendedCellsForPaging_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_RecommendedCellsForPaging_1, 2, /* Elements count */ &asn_SPC_S1AP_RecommendedCellsForPaging_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RecommendedCellsForPaging.h000066400000000000000000000024141333553357400236330ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_RecommendedCellsForPaging_H_ #define _S1AP_RecommendedCellsForPaging_H_ #include /* Including external dependencies */ #include "S1AP_RecommendedCellList.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_RecommendedCellsForPaging */ typedef struct S1AP_RecommendedCellsForPaging { S1AP_RecommendedCellList_t recommendedCellList; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_RecommendedCellsForPaging_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedCellsForPaging; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_RecommendedCellsForPaging_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_RecommendedCellsForPaging_1[2]; #ifdef __cplusplus } #endif #endif /* _S1AP_RecommendedCellsForPaging_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RecommendedENBItem.c000066400000000000000000000044121333553357400222120ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_RecommendedENBItem.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_RecommendedENBItem_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedENBItem, mMEPagingTarget), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_MMEPagingTarget, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "mMEPagingTarget" }, { ATF_POINTER, 1, offsetof(struct S1AP_RecommendedENBItem, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P83, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_RecommendedENBItem_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_RecommendedENBItem_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_RecommendedENBItem_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* mMEPagingTarget */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_RecommendedENBItem_specs_1 = { sizeof(struct S1AP_RecommendedENBItem), offsetof(struct S1AP_RecommendedENBItem, _asn_ctx), asn_MAP_S1AP_RecommendedENBItem_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_RecommendedENBItem_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedENBItem = { "RecommendedENBItem", "RecommendedENBItem", &asn_OP_SEQUENCE, asn_DEF_S1AP_RecommendedENBItem_tags_1, sizeof(asn_DEF_S1AP_RecommendedENBItem_tags_1) /sizeof(asn_DEF_S1AP_RecommendedENBItem_tags_1[0]), /* 1 */ asn_DEF_S1AP_RecommendedENBItem_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_RecommendedENBItem_tags_1) /sizeof(asn_DEF_S1AP_RecommendedENBItem_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_RecommendedENBItem_1, 2, /* Elements count */ &asn_SPC_S1AP_RecommendedENBItem_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RecommendedENBItem.h000066400000000000000000000020711333553357400222160ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_RecommendedENBItem_H_ #define _S1AP_RecommendedENBItem_H_ #include /* Including external dependencies */ #include "S1AP_MMEPagingTarget.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_RecommendedENBItem */ typedef struct S1AP_RecommendedENBItem { S1AP_MMEPagingTarget_t mMEPagingTarget; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_RecommendedENBItem_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedENBItem; #ifdef __cplusplus } #endif #endif /* _S1AP_RecommendedENBItem_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RecommendedENBList.c000066400000000000000000000035701333553357400222330ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_RecommendedENBList.h" #include "S1AP_ProtocolIE-SingleContainer.h" static asn_oer_constraints_t asn_OER_type_S1AP_RecommendedENBList_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..16)) */}; asn_per_constraints_t asn_PER_type_S1AP_RecommendedENBList_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 4, 4, 1, 16 } /* (SIZE(1..16)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_RecommendedENBList_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P16, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_RecommendedENBList_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_RecommendedENBList_specs_1 = { sizeof(struct S1AP_RecommendedENBList), offsetof(struct S1AP_RecommendedENBList, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedENBList = { "RecommendedENBList", "RecommendedENBList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_RecommendedENBList_tags_1, sizeof(asn_DEF_S1AP_RecommendedENBList_tags_1) /sizeof(asn_DEF_S1AP_RecommendedENBList_tags_1[0]), /* 1 */ asn_DEF_S1AP_RecommendedENBList_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_RecommendedENBList_tags_1) /sizeof(asn_DEF_S1AP_RecommendedENBList_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_RecommendedENBList_constr_1, &asn_PER_type_S1AP_RecommendedENBList_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_RecommendedENBList_1, 1, /* Single element */ &asn_SPC_S1AP_RecommendedENBList_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RecommendedENBList.h000066400000000000000000000022141333553357400222320ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_RecommendedENBList_H_ #define _S1AP_RecommendedENBList_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolIE_SingleContainer; /* S1AP_RecommendedENBList */ typedef struct S1AP_RecommendedENBList { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_RecommendedENBList_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedENBList; extern asn_SET_OF_specifics_t asn_SPC_S1AP_RecommendedENBList_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_RecommendedENBList_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_RecommendedENBList_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_RecommendedENBList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RecommendedENBsForPaging.c000066400000000000000000000046221333553357400233560ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_RecommendedENBsForPaging.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_RecommendedENBsForPaging_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RecommendedENBsForPaging, recommendedENBList), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_RecommendedENBList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "recommendedENBList" }, { ATF_POINTER, 1, offsetof(struct S1AP_RecommendedENBsForPaging, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P82, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_RecommendedENBsForPaging_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_RecommendedENBsForPaging_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_RecommendedENBsForPaging_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* recommendedENBList */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_RecommendedENBsForPaging_specs_1 = { sizeof(struct S1AP_RecommendedENBsForPaging), offsetof(struct S1AP_RecommendedENBsForPaging, _asn_ctx), asn_MAP_S1AP_RecommendedENBsForPaging_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_RecommendedENBsForPaging_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedENBsForPaging = { "RecommendedENBsForPaging", "RecommendedENBsForPaging", &asn_OP_SEQUENCE, asn_DEF_S1AP_RecommendedENBsForPaging_tags_1, sizeof(asn_DEF_S1AP_RecommendedENBsForPaging_tags_1) /sizeof(asn_DEF_S1AP_RecommendedENBsForPaging_tags_1[0]), /* 1 */ asn_DEF_S1AP_RecommendedENBsForPaging_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_RecommendedENBsForPaging_tags_1) /sizeof(asn_DEF_S1AP_RecommendedENBsForPaging_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_RecommendedENBsForPaging_1, 2, /* Elements count */ &asn_SPC_S1AP_RecommendedENBsForPaging_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RecommendedENBsForPaging.h000066400000000000000000000024001333553357400233530ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_RecommendedENBsForPaging_H_ #define _S1AP_RecommendedENBsForPaging_H_ #include /* Including external dependencies */ #include "S1AP_RecommendedENBList.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_RecommendedENBsForPaging */ typedef struct S1AP_RecommendedENBsForPaging { S1AP_RecommendedENBList_t recommendedENBList; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_RecommendedENBsForPaging_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_RecommendedENBsForPaging; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_RecommendedENBsForPaging_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_RecommendedENBsForPaging_1[2]; #ifdef __cplusplus } #endif #endif /* _S1AP_RecommendedENBsForPaging_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RelativeMMECapacity.c000066400000000000000000000037141333553357400224200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_RelativeMMECapacity.h" int S1AP_RelativeMMECapacity_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 255)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_RelativeMMECapacity_constr_1 CC_NOTUSED = { { 1, 1 } /* (0..255) */, -1}; asn_per_constraints_t asn_PER_type_S1AP_RelativeMMECapacity_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_RelativeMMECapacity_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_RelativeMMECapacity = { "RelativeMMECapacity", "RelativeMMECapacity", &asn_OP_NativeInteger, asn_DEF_S1AP_RelativeMMECapacity_tags_1, sizeof(asn_DEF_S1AP_RelativeMMECapacity_tags_1) /sizeof(asn_DEF_S1AP_RelativeMMECapacity_tags_1[0]), /* 1 */ asn_DEF_S1AP_RelativeMMECapacity_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_RelativeMMECapacity_tags_1) /sizeof(asn_DEF_S1AP_RelativeMMECapacity_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_RelativeMMECapacity_constr_1, &asn_PER_type_S1AP_RelativeMMECapacity_constr_1, S1AP_RelativeMMECapacity_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RelativeMMECapacity.h000066400000000000000000000027131333553357400224230ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_RelativeMMECapacity_H_ #define _S1AP_RelativeMMECapacity_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_RelativeMMECapacity */ typedef long S1AP_RelativeMMECapacity_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_RelativeMMECapacity_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_RelativeMMECapacity; asn_struct_free_f S1AP_RelativeMMECapacity_free; asn_struct_print_f S1AP_RelativeMMECapacity_print; asn_constr_check_f S1AP_RelativeMMECapacity_constraint; ber_type_decoder_f S1AP_RelativeMMECapacity_decode_ber; der_type_encoder_f S1AP_RelativeMMECapacity_encode_der; xer_type_decoder_f S1AP_RelativeMMECapacity_decode_xer; xer_type_encoder_f S1AP_RelativeMMECapacity_encode_xer; oer_type_decoder_f S1AP_RelativeMMECapacity_decode_oer; oer_type_encoder_f S1AP_RelativeMMECapacity_encode_oer; per_type_decoder_f S1AP_RelativeMMECapacity_decode_uper; per_type_encoder_f S1AP_RelativeMMECapacity_encode_uper; per_type_decoder_f S1AP_RelativeMMECapacity_decode_aper; per_type_encoder_f S1AP_RelativeMMECapacity_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_RelativeMMECapacity_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RelayNode-Indicator.c000066400000000000000000000041631333553357400224230ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_RelayNode-Indicator.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_RelayNode_Indicator_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_RelayNode_Indicator_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_RelayNode_Indicator_value2enum_1[] = { { 0, 4, "true" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_RelayNode_Indicator_enum2value_1[] = { 0 /* true(0) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_RelayNode_Indicator_specs_1 = { asn_MAP_S1AP_RelayNode_Indicator_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_RelayNode_Indicator_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_RelayNode_Indicator_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_RelayNode_Indicator = { "RelayNode-Indicator", "RelayNode-Indicator", &asn_OP_NativeEnumerated, asn_DEF_S1AP_RelayNode_Indicator_tags_1, sizeof(asn_DEF_S1AP_RelayNode_Indicator_tags_1) /sizeof(asn_DEF_S1AP_RelayNode_Indicator_tags_1[0]), /* 1 */ asn_DEF_S1AP_RelayNode_Indicator_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_RelayNode_Indicator_tags_1) /sizeof(asn_DEF_S1AP_RelayNode_Indicator_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_RelayNode_Indicator_constr_1, &asn_PER_type_S1AP_RelayNode_Indicator_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_RelayNode_Indicator_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RelayNode-Indicator.h000066400000000000000000000030451333553357400224260ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_RelayNode_Indicator_H_ #define _S1AP_RelayNode_Indicator_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_RelayNode_Indicator { S1AP_RelayNode_Indicator_true = 0 /* * Enumeration is extensible */ } e_S1AP_RelayNode_Indicator; /* S1AP_RelayNode-Indicator */ typedef long S1AP_RelayNode_Indicator_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_RelayNode_Indicator; asn_struct_free_f S1AP_RelayNode_Indicator_free; asn_struct_print_f S1AP_RelayNode_Indicator_print; asn_constr_check_f S1AP_RelayNode_Indicator_constraint; ber_type_decoder_f S1AP_RelayNode_Indicator_decode_ber; der_type_encoder_f S1AP_RelayNode_Indicator_encode_der; xer_type_decoder_f S1AP_RelayNode_Indicator_decode_xer; xer_type_encoder_f S1AP_RelayNode_Indicator_encode_xer; oer_type_decoder_f S1AP_RelayNode_Indicator_decode_oer; oer_type_encoder_f S1AP_RelayNode_Indicator_encode_oer; per_type_decoder_f S1AP_RelayNode_Indicator_decode_uper; per_type_encoder_f S1AP_RelayNode_Indicator_encode_uper; per_type_decoder_f S1AP_RelayNode_Indicator_decode_aper; per_type_encoder_f S1AP_RelayNode_Indicator_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_RelayNode_Indicator_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RepetitionPeriod.c000066400000000000000000000036461333553357400221210ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_RepetitionPeriod.h" int S1AP_RepetitionPeriod_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 4095)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_RepetitionPeriod_constr_1 CC_NOTUSED = { { 2, 1 } /* (0..4095) */, -1}; static asn_per_constraints_t asn_PER_type_S1AP_RepetitionPeriod_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 12, 12, 0, 4095 } /* (0..4095) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_RepetitionPeriod_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_RepetitionPeriod = { "RepetitionPeriod", "RepetitionPeriod", &asn_OP_NativeInteger, asn_DEF_S1AP_RepetitionPeriod_tags_1, sizeof(asn_DEF_S1AP_RepetitionPeriod_tags_1) /sizeof(asn_DEF_S1AP_RepetitionPeriod_tags_1[0]), /* 1 */ asn_DEF_S1AP_RepetitionPeriod_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_RepetitionPeriod_tags_1) /sizeof(asn_DEF_S1AP_RepetitionPeriod_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_RepetitionPeriod_constr_1, &asn_PER_type_S1AP_RepetitionPeriod_constr_1, S1AP_RepetitionPeriod_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RepetitionPeriod.h000066400000000000000000000025051333553357400221170ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_RepetitionPeriod_H_ #define _S1AP_RepetitionPeriod_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_RepetitionPeriod */ typedef long S1AP_RepetitionPeriod_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_RepetitionPeriod; asn_struct_free_f S1AP_RepetitionPeriod_free; asn_struct_print_f S1AP_RepetitionPeriod_print; asn_constr_check_f S1AP_RepetitionPeriod_constraint; ber_type_decoder_f S1AP_RepetitionPeriod_decode_ber; der_type_encoder_f S1AP_RepetitionPeriod_encode_der; xer_type_decoder_f S1AP_RepetitionPeriod_decode_xer; xer_type_encoder_f S1AP_RepetitionPeriod_encode_xer; oer_type_decoder_f S1AP_RepetitionPeriod_decode_oer; oer_type_encoder_f S1AP_RepetitionPeriod_encode_oer; per_type_decoder_f S1AP_RepetitionPeriod_decode_uper; per_type_encoder_f S1AP_RepetitionPeriod_encode_uper; per_type_decoder_f S1AP_RepetitionPeriod_decode_aper; per_type_encoder_f S1AP_RepetitionPeriod_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_RepetitionPeriod_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ReportAmountMDT.c000066400000000000000000000042651333553357400216360ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ReportAmountMDT.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_ReportAmountMDT_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_ReportAmountMDT_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 3, 3, 0, 7 } /* (0..7) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_ReportAmountMDT_value2enum_1[] = { { 0, 2, "r1" }, { 1, 2, "r2" }, { 2, 2, "r4" }, { 3, 2, "r8" }, { 4, 3, "r16" }, { 5, 3, "r32" }, { 6, 3, "r64" }, { 7, 9, "rinfinity" } }; static const unsigned int asn_MAP_S1AP_ReportAmountMDT_enum2value_1[] = { 0, /* r1(0) */ 4, /* r16(4) */ 1, /* r2(1) */ 5, /* r32(5) */ 2, /* r4(2) */ 6, /* r64(6) */ 3, /* r8(3) */ 7 /* rinfinity(7) */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_ReportAmountMDT_specs_1 = { asn_MAP_S1AP_ReportAmountMDT_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_ReportAmountMDT_enum2value_1, /* N => "tag"; sorted by N */ 8, /* Number of elements in the maps */ 0, /* Enumeration is not extensible */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_ReportAmountMDT_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ReportAmountMDT = { "ReportAmountMDT", "ReportAmountMDT", &asn_OP_NativeEnumerated, asn_DEF_S1AP_ReportAmountMDT_tags_1, sizeof(asn_DEF_S1AP_ReportAmountMDT_tags_1) /sizeof(asn_DEF_S1AP_ReportAmountMDT_tags_1[0]), /* 1 */ asn_DEF_S1AP_ReportAmountMDT_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ReportAmountMDT_tags_1) /sizeof(asn_DEF_S1AP_ReportAmountMDT_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ReportAmountMDT_constr_1, &asn_PER_type_S1AP_ReportAmountMDT_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_ReportAmountMDT_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ReportAmountMDT.h000066400000000000000000000033161333553357400216370ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ReportAmountMDT_H_ #define _S1AP_ReportAmountMDT_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_ReportAmountMDT { S1AP_ReportAmountMDT_r1 = 0, S1AP_ReportAmountMDT_r2 = 1, S1AP_ReportAmountMDT_r4 = 2, S1AP_ReportAmountMDT_r8 = 3, S1AP_ReportAmountMDT_r16 = 4, S1AP_ReportAmountMDT_r32 = 5, S1AP_ReportAmountMDT_r64 = 6, S1AP_ReportAmountMDT_rinfinity = 7 } e_S1AP_ReportAmountMDT; /* S1AP_ReportAmountMDT */ typedef long S1AP_ReportAmountMDT_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_ReportAmountMDT_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ReportAmountMDT; extern const asn_INTEGER_specifics_t asn_SPC_ReportAmountMDT_specs_1; asn_struct_free_f ReportAmountMDT_free; asn_struct_print_f ReportAmountMDT_print; asn_constr_check_f ReportAmountMDT_constraint; ber_type_decoder_f ReportAmountMDT_decode_ber; der_type_encoder_f ReportAmountMDT_encode_der; xer_type_decoder_f ReportAmountMDT_decode_xer; xer_type_encoder_f ReportAmountMDT_encode_xer; oer_type_decoder_f ReportAmountMDT_decode_oer; oer_type_encoder_f ReportAmountMDT_encode_oer; per_type_decoder_f ReportAmountMDT_decode_uper; per_type_encoder_f ReportAmountMDT_encode_uper; per_type_decoder_f ReportAmountMDT_decode_aper; per_type_encoder_f ReportAmountMDT_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_ReportAmountMDT_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ReportArea.c000066400000000000000000000036501333553357400206730ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ReportArea.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_ReportArea_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_ReportArea_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_ReportArea_value2enum_1[] = { { 0, 4, "ecgi" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_ReportArea_enum2value_1[] = { 0 /* ecgi(0) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_ReportArea_specs_1 = { asn_MAP_S1AP_ReportArea_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_ReportArea_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_ReportArea_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ReportArea = { "ReportArea", "ReportArea", &asn_OP_NativeEnumerated, asn_DEF_S1AP_ReportArea_tags_1, sizeof(asn_DEF_S1AP_ReportArea_tags_1) /sizeof(asn_DEF_S1AP_ReportArea_tags_1[0]), /* 1 */ asn_DEF_S1AP_ReportArea_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ReportArea_tags_1) /sizeof(asn_DEF_S1AP_ReportArea_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ReportArea_constr_1, &asn_PER_type_S1AP_ReportArea_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_ReportArea_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ReportArea.h000066400000000000000000000026431333553357400207010ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ReportArea_H_ #define _S1AP_ReportArea_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_ReportArea { S1AP_ReportArea_ecgi = 0 /* * Enumeration is extensible */ } e_S1AP_ReportArea; /* S1AP_ReportArea */ typedef long S1AP_ReportArea_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_ReportArea_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ReportArea; extern const asn_INTEGER_specifics_t asn_SPC_ReportArea_specs_1; asn_struct_free_f ReportArea_free; asn_struct_print_f ReportArea_print; asn_constr_check_f ReportArea_constraint; ber_type_decoder_f ReportArea_decode_ber; der_type_encoder_f ReportArea_encode_der; xer_type_decoder_f ReportArea_decode_xer; xer_type_encoder_f ReportArea_encode_xer; oer_type_decoder_f ReportArea_decode_oer; oer_type_encoder_f ReportArea_encode_oer; per_type_decoder_f ReportArea_decode_uper; per_type_encoder_f ReportArea_encode_uper; per_type_decoder_f ReportArea_decode_aper; per_type_encoder_f ReportArea_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_ReportArea_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ReportIntervalMDT.c000066400000000000000000000047201333553357400221530ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ReportIntervalMDT.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_ReportIntervalMDT_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_ReportIntervalMDT_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 4, 4, 0, 12 } /* (0..12) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_ReportIntervalMDT_value2enum_1[] = { { 0, 5, "ms120" }, { 1, 5, "ms240" }, { 2, 5, "ms480" }, { 3, 5, "ms640" }, { 4, 6, "ms1024" }, { 5, 6, "ms2048" }, { 6, 6, "ms5120" }, { 7, 7, "ms10240" }, { 8, 4, "min1" }, { 9, 4, "min6" }, { 10, 5, "min12" }, { 11, 5, "min30" }, { 12, 5, "min60" } }; static const unsigned int asn_MAP_S1AP_ReportIntervalMDT_enum2value_1[] = { 8, /* min1(8) */ 10, /* min12(10) */ 11, /* min30(11) */ 9, /* min6(9) */ 12, /* min60(12) */ 4, /* ms1024(4) */ 7, /* ms10240(7) */ 0, /* ms120(0) */ 5, /* ms2048(5) */ 1, /* ms240(1) */ 2, /* ms480(2) */ 6, /* ms5120(6) */ 3 /* ms640(3) */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_ReportIntervalMDT_specs_1 = { asn_MAP_S1AP_ReportIntervalMDT_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_ReportIntervalMDT_enum2value_1, /* N => "tag"; sorted by N */ 13, /* Number of elements in the maps */ 0, /* Enumeration is not extensible */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_ReportIntervalMDT_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ReportIntervalMDT = { "ReportIntervalMDT", "ReportIntervalMDT", &asn_OP_NativeEnumerated, asn_DEF_S1AP_ReportIntervalMDT_tags_1, sizeof(asn_DEF_S1AP_ReportIntervalMDT_tags_1) /sizeof(asn_DEF_S1AP_ReportIntervalMDT_tags_1[0]), /* 1 */ asn_DEF_S1AP_ReportIntervalMDT_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ReportIntervalMDT_tags_1) /sizeof(asn_DEF_S1AP_ReportIntervalMDT_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ReportIntervalMDT_constr_1, &asn_PER_type_S1AP_ReportIntervalMDT_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_ReportIntervalMDT_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ReportIntervalMDT.h000066400000000000000000000037171333553357400221650ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ReportIntervalMDT_H_ #define _S1AP_ReportIntervalMDT_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_ReportIntervalMDT { S1AP_ReportIntervalMDT_ms120 = 0, S1AP_ReportIntervalMDT_ms240 = 1, S1AP_ReportIntervalMDT_ms480 = 2, S1AP_ReportIntervalMDT_ms640 = 3, S1AP_ReportIntervalMDT_ms1024 = 4, S1AP_ReportIntervalMDT_ms2048 = 5, S1AP_ReportIntervalMDT_ms5120 = 6, S1AP_ReportIntervalMDT_ms10240 = 7, S1AP_ReportIntervalMDT_min1 = 8, S1AP_ReportIntervalMDT_min6 = 9, S1AP_ReportIntervalMDT_min12 = 10, S1AP_ReportIntervalMDT_min30 = 11, S1AP_ReportIntervalMDT_min60 = 12 } e_S1AP_ReportIntervalMDT; /* S1AP_ReportIntervalMDT */ typedef long S1AP_ReportIntervalMDT_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_ReportIntervalMDT_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ReportIntervalMDT; extern const asn_INTEGER_specifics_t asn_SPC_ReportIntervalMDT_specs_1; asn_struct_free_f ReportIntervalMDT_free; asn_struct_print_f ReportIntervalMDT_print; asn_constr_check_f ReportIntervalMDT_constraint; ber_type_decoder_f ReportIntervalMDT_decode_ber; der_type_encoder_f ReportIntervalMDT_encode_der; xer_type_decoder_f ReportIntervalMDT_decode_xer; xer_type_encoder_f ReportIntervalMDT_encode_xer; oer_type_decoder_f ReportIntervalMDT_decode_oer; oer_type_encoder_f ReportIntervalMDT_encode_oer; per_type_decoder_f ReportIntervalMDT_decode_uper; per_type_encoder_f ReportIntervalMDT_encode_uper; per_type_decoder_f ReportIntervalMDT_decode_aper; per_type_encoder_f ReportIntervalMDT_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_ReportIntervalMDT_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RequestType.c000066400000000000000000000046141333553357400211220ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_RequestType.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_RequestType_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RequestType, eventType), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_EventType, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "eventType" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_RequestType, reportArea), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ReportArea, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "reportArea" }, { ATF_POINTER, 1, offsetof(struct S1AP_RequestType, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P84, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_RequestType_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_RequestType_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_RequestType_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eventType */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* reportArea */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_RequestType_specs_1 = { sizeof(struct S1AP_RequestType), offsetof(struct S1AP_RequestType, _asn_ctx), asn_MAP_S1AP_RequestType_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_RequestType_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_RequestType = { "RequestType", "RequestType", &asn_OP_SEQUENCE, asn_DEF_S1AP_RequestType_tags_1, sizeof(asn_DEF_S1AP_RequestType_tags_1) /sizeof(asn_DEF_S1AP_RequestType_tags_1[0]), /* 1 */ asn_DEF_S1AP_RequestType_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_RequestType_tags_1) /sizeof(asn_DEF_S1AP_RequestType_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_RequestType_1, 3, /* Elements count */ &asn_SPC_S1AP_RequestType_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RequestType.h000066400000000000000000000020631333553357400211230ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_RequestType_H_ #define _S1AP_RequestType_H_ #include /* Including external dependencies */ #include "S1AP_EventType.h" #include "S1AP_ReportArea.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_RequestType */ typedef struct S1AP_RequestType { S1AP_EventType_t eventType; S1AP_ReportArea_t reportArea; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_RequestType_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_RequestType; #ifdef __cplusplus } #endif #endif /* _S1AP_RequestType_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RerouteNASRequest.c000066400000000000000000000033641333553357400221710ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_RerouteNASRequest.h" asn_TYPE_member_t asn_MBR_S1AP_RerouteNASRequest_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RerouteNASRequest, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P35, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_RerouteNASRequest_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_RerouteNASRequest_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_RerouteNASRequest_specs_1 = { sizeof(struct S1AP_RerouteNASRequest), offsetof(struct S1AP_RerouteNASRequest, _asn_ctx), asn_MAP_S1AP_RerouteNASRequest_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_RerouteNASRequest = { "RerouteNASRequest", "RerouteNASRequest", &asn_OP_SEQUENCE, asn_DEF_S1AP_RerouteNASRequest_tags_1, sizeof(asn_DEF_S1AP_RerouteNASRequest_tags_1) /sizeof(asn_DEF_S1AP_RerouteNASRequest_tags_1[0]), /* 1 */ asn_DEF_S1AP_RerouteNASRequest_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_RerouteNASRequest_tags_1) /sizeof(asn_DEF_S1AP_RerouteNASRequest_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_RerouteNASRequest_1, 1, /* Elements count */ &asn_SPC_S1AP_RerouteNASRequest_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RerouteNASRequest.h000066400000000000000000000021041333553357400221650ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_RerouteNASRequest_H_ #define _S1AP_RerouteNASRequest_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_RerouteNASRequest */ typedef struct S1AP_RerouteNASRequest { S1AP_ProtocolIE_Container_6551P35_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_RerouteNASRequest_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_RerouteNASRequest; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_RerouteNASRequest_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_RerouteNASRequest_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_RerouteNASRequest_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Reset.c000066400000000000000000000030041333553357400177020ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Reset.h" asn_TYPE_member_t asn_MBR_S1AP_Reset_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_Reset, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P37, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_Reset_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_Reset_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_Reset_specs_1 = { sizeof(struct S1AP_Reset), offsetof(struct S1AP_Reset, _asn_ctx), asn_MAP_S1AP_Reset_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_Reset = { "Reset", "Reset", &asn_OP_SEQUENCE, asn_DEF_S1AP_Reset_tags_1, sizeof(asn_DEF_S1AP_Reset_tags_1) /sizeof(asn_DEF_S1AP_Reset_tags_1[0]), /* 1 */ asn_DEF_S1AP_Reset_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Reset_tags_1) /sizeof(asn_DEF_S1AP_Reset_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_Reset_1, 1, /* Elements count */ &asn_SPC_S1AP_Reset_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Reset.h000066400000000000000000000017301333553357400177130ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Reset_H_ #define _S1AP_Reset_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_Reset */ typedef struct S1AP_Reset { S1AP_ProtocolIE_Container_6551P37_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_Reset_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Reset; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_Reset_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_Reset_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_Reset_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ResetAcknowledge.c000066400000000000000000000033401333553357400220510ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ResetAcknowledge.h" asn_TYPE_member_t asn_MBR_S1AP_ResetAcknowledge_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ResetAcknowledge, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P38, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ResetAcknowledge_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ResetAcknowledge_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ResetAcknowledge_specs_1 = { sizeof(struct S1AP_ResetAcknowledge), offsetof(struct S1AP_ResetAcknowledge, _asn_ctx), asn_MAP_S1AP_ResetAcknowledge_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ResetAcknowledge = { "ResetAcknowledge", "ResetAcknowledge", &asn_OP_SEQUENCE, asn_DEF_S1AP_ResetAcknowledge_tags_1, sizeof(asn_DEF_S1AP_ResetAcknowledge_tags_1) /sizeof(asn_DEF_S1AP_ResetAcknowledge_tags_1[0]), /* 1 */ asn_DEF_S1AP_ResetAcknowledge_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ResetAcknowledge_tags_1) /sizeof(asn_DEF_S1AP_ResetAcknowledge_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ResetAcknowledge_1, 1, /* Elements count */ &asn_SPC_S1AP_ResetAcknowledge_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ResetAcknowledge.h000066400000000000000000000020731333553357400220600ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ResetAcknowledge_H_ #define _S1AP_ResetAcknowledge_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ResetAcknowledge */ typedef struct S1AP_ResetAcknowledge { S1AP_ProtocolIE_Container_6551P38_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ResetAcknowledge_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ResetAcknowledge; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ResetAcknowledge_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ResetAcknowledge_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_ResetAcknowledge_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ResetAll.c000066400000000000000000000036211333553357400203400ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ResetAll.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_ResetAll_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_ResetAll_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_ResetAll_value2enum_1[] = { { 0, 9, "reset-all" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_ResetAll_enum2value_1[] = { 0 /* reset-all(0) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_ResetAll_specs_1 = { asn_MAP_S1AP_ResetAll_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_ResetAll_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_ResetAll_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_ResetAll = { "ResetAll", "ResetAll", &asn_OP_NativeEnumerated, asn_DEF_S1AP_ResetAll_tags_1, sizeof(asn_DEF_S1AP_ResetAll_tags_1) /sizeof(asn_DEF_S1AP_ResetAll_tags_1[0]), /* 1 */ asn_DEF_S1AP_ResetAll_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ResetAll_tags_1) /sizeof(asn_DEF_S1AP_ResetAll_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ResetAll_constr_1, &asn_PER_type_S1AP_ResetAll_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_ResetAll_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ResetAll.h000066400000000000000000000026011333553357400203420ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ResetAll_H_ #define _S1AP_ResetAll_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_ResetAll { S1AP_ResetAll_reset_all = 0 /* * Enumeration is extensible */ } e_S1AP_ResetAll; /* S1AP_ResetAll */ typedef long S1AP_ResetAll_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_ResetAll_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_ResetAll; extern const asn_INTEGER_specifics_t asn_SPC_ResetAll_specs_1; asn_struct_free_f ResetAll_free; asn_struct_print_f ResetAll_print; asn_constr_check_f ResetAll_constraint; ber_type_decoder_f ResetAll_decode_ber; der_type_encoder_f ResetAll_encode_der; xer_type_decoder_f ResetAll_decode_xer; xer_type_encoder_f ResetAll_encode_xer; oer_type_decoder_f ResetAll_decode_oer; oer_type_encoder_f ResetAll_encode_oer; per_type_decoder_f ResetAll_decode_uper; per_type_encoder_f ResetAll_encode_uper; per_type_decoder_f ResetAll_decode_aper; per_type_encoder_f ResetAll_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_ResetAll_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ResetType.c000066400000000000000000000043031333553357400205470ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ResetType.h" #include "S1AP_UE-associatedLogicalS1-ConnectionListRes.h" static asn_oer_constraints_t asn_OER_type_S1AP_ResetType_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_ResetType_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_ResetType_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ResetType, choice.s1_Interface), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ResetAll, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "s1-Interface" }, { ATF_POINTER, 0, offsetof(struct S1AP_ResetType, choice.partOfS1_Interface), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionListRes, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "partOfS1-Interface" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ResetType_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* s1-Interface */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* partOfS1-Interface */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_ResetType_specs_1 = { sizeof(struct S1AP_ResetType), offsetof(struct S1AP_ResetType, _asn_ctx), offsetof(struct S1AP_ResetType, present), sizeof(((struct S1AP_ResetType *)0)->present), asn_MAP_S1AP_ResetType_tag2el_1, 2, /* Count of tags in the map */ 0, 0, 2 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ResetType = { "ResetType", "ResetType", &asn_OP_CHOICE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { &asn_OER_type_S1AP_ResetType_constr_1, &asn_PER_type_S1AP_ResetType_constr_1, CHOICE_constraint }, asn_MBR_S1AP_ResetType_1, 2, /* Elements count */ &asn_SPC_S1AP_ResetType_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ResetType.h000066400000000000000000000024671333553357400205650ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ResetType_H_ #define _S1AP_ResetType_H_ #include /* Including external dependencies */ #include "S1AP_ResetAll.h" #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_ResetType_PR { S1AP_ResetType_PR_NOTHING, /* No components present */ S1AP_ResetType_PR_s1_Interface, S1AP_ResetType_PR_partOfS1_Interface /* Extensions may appear below */ } S1AP_ResetType_PR; /* Forward declarations */ struct S1AP_UE_associatedLogicalS1_ConnectionListRes; /* S1AP_ResetType */ typedef struct S1AP_ResetType { S1AP_ResetType_PR present; union S1AP_ResetType_u { S1AP_ResetAll_t s1_Interface; struct S1AP_UE_associatedLogicalS1_ConnectionListRes *partOfS1_Interface; /* * This type is extensible, * possible extensions are below. */ } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ResetType_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ResetType; #ifdef __cplusplus } #endif #endif /* _S1AP_ResetType_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RetrieveUEInformation.c000066400000000000000000000035041333553357400230520ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_RetrieveUEInformation.h" asn_TYPE_member_t asn_MBR_S1AP_RetrieveUEInformation_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_RetrieveUEInformation, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P87, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_RetrieveUEInformation_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_RetrieveUEInformation_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_RetrieveUEInformation_specs_1 = { sizeof(struct S1AP_RetrieveUEInformation), offsetof(struct S1AP_RetrieveUEInformation, _asn_ctx), asn_MAP_S1AP_RetrieveUEInformation_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_RetrieveUEInformation = { "RetrieveUEInformation", "RetrieveUEInformation", &asn_OP_SEQUENCE, asn_DEF_S1AP_RetrieveUEInformation_tags_1, sizeof(asn_DEF_S1AP_RetrieveUEInformation_tags_1) /sizeof(asn_DEF_S1AP_RetrieveUEInformation_tags_1[0]), /* 1 */ asn_DEF_S1AP_RetrieveUEInformation_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_RetrieveUEInformation_tags_1) /sizeof(asn_DEF_S1AP_RetrieveUEInformation_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_RetrieveUEInformation_1, 1, /* Elements count */ &asn_SPC_S1AP_RetrieveUEInformation_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_RetrieveUEInformation.h000066400000000000000000000021501333553357400230530ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_RetrieveUEInformation_H_ #define _S1AP_RetrieveUEInformation_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_RetrieveUEInformation */ typedef struct S1AP_RetrieveUEInformation { S1AP_ProtocolIE_Container_6551P87_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_RetrieveUEInformation_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_RetrieveUEInformation; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_RetrieveUEInformation_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_RetrieveUEInformation_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_RetrieveUEInformation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Routing-ID.c000066400000000000000000000034721333553357400205520ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Routing-ID.h" int S1AP_Routing_ID_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 255)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_Routing_ID_constr_1 CC_NOTUSED = { { 1, 1 } /* (0..255) */, -1}; static asn_per_constraints_t asn_PER_type_S1AP_Routing_ID_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_Routing_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Routing_ID = { "Routing-ID", "Routing-ID", &asn_OP_NativeInteger, asn_DEF_S1AP_Routing_ID_tags_1, sizeof(asn_DEF_S1AP_Routing_ID_tags_1) /sizeof(asn_DEF_S1AP_Routing_ID_tags_1[0]), /* 1 */ asn_DEF_S1AP_Routing_ID_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Routing_ID_tags_1) /sizeof(asn_DEF_S1AP_Routing_ID_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_Routing_ID_constr_1, &asn_PER_type_S1AP_Routing_ID_constr_1, S1AP_Routing_ID_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Routing-ID.h000066400000000000000000000023231333553357400205510ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Routing_ID_H_ #define _S1AP_Routing_ID_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_Routing-ID */ typedef long S1AP_Routing_ID_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Routing_ID; asn_struct_free_f S1AP_Routing_ID_free; asn_struct_print_f S1AP_Routing_ID_print; asn_constr_check_f S1AP_Routing_ID_constraint; ber_type_decoder_f S1AP_Routing_ID_decode_ber; der_type_encoder_f S1AP_Routing_ID_encode_der; xer_type_decoder_f S1AP_Routing_ID_decode_xer; xer_type_encoder_f S1AP_Routing_ID_encode_xer; oer_type_decoder_f S1AP_Routing_ID_decode_oer; oer_type_encoder_f S1AP_Routing_ID_encode_oer; per_type_decoder_f S1AP_Routing_ID_decode_uper; per_type_encoder_f S1AP_Routing_ID_encode_uper; per_type_decoder_f S1AP_Routing_ID_decode_aper; per_type_encoder_f S1AP_Routing_ID_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Routing_ID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_S-TMSI.c000066400000000000000000000043461333553357400176060ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_S-TMSI.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_S_TMSI_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_S_TMSI, mMEC), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_MME_Code, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "mMEC" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_S_TMSI, m_TMSI), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_M_TMSI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "m-TMSI" }, { ATF_POINTER, 1, offsetof(struct S1AP_S_TMSI, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P96, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_S_TMSI_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_S_TMSI_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_S_TMSI_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* mMEC */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* m-TMSI */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_S_TMSI_specs_1 = { sizeof(struct S1AP_S_TMSI), offsetof(struct S1AP_S_TMSI, _asn_ctx), asn_MAP_S1AP_S_TMSI_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_S_TMSI_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_S_TMSI = { "S-TMSI", "S-TMSI", &asn_OP_SEQUENCE, asn_DEF_S1AP_S_TMSI_tags_1, sizeof(asn_DEF_S1AP_S_TMSI_tags_1) /sizeof(asn_DEF_S1AP_S_TMSI_tags_1[0]), /* 1 */ asn_DEF_S1AP_S_TMSI_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_S_TMSI_tags_1) /sizeof(asn_DEF_S1AP_S_TMSI_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_S_TMSI_1, 3, /* Elements count */ &asn_SPC_S1AP_S_TMSI_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_S-TMSI.h000066400000000000000000000021551333553357400176070ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_S_TMSI_H_ #define _S1AP_S_TMSI_H_ #include /* Including external dependencies */ #include "S1AP_MME-Code.h" #include "S1AP_M-TMSI.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_S-TMSI */ typedef struct S1AP_S_TMSI { S1AP_MME_Code_t mMEC; S1AP_M_TMSI_t m_TMSI; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_S_TMSI_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_S_TMSI; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_S_TMSI_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_S_TMSI_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_S_TMSI_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_S1AP-PDU.c000066400000000000000000000051071333553357400177600ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Descriptions" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_S1AP-PDU.h" #include "S1AP_InitiatingMessage.h" #include "S1AP_SuccessfulOutcome.h" #include "S1AP_UnsuccessfulOutcome.h" static asn_oer_constraints_t asn_OER_type_S1AP_S1AP_PDU_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_S1AP_PDU_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_S1AP_PDU_1[] = { { ATF_POINTER, 0, offsetof(struct S1AP_S1AP_PDU, choice.initiatingMessage), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_InitiatingMessage, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "initiatingMessage" }, { ATF_POINTER, 0, offsetof(struct S1AP_S1AP_PDU, choice.successfulOutcome), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_SuccessfulOutcome, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "successfulOutcome" }, { ATF_POINTER, 0, offsetof(struct S1AP_S1AP_PDU, choice.unsuccessfulOutcome), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_UnsuccessfulOutcome, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "unsuccessfulOutcome" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_S1AP_PDU_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* initiatingMessage */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* successfulOutcome */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* unsuccessfulOutcome */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_S1AP_PDU_specs_1 = { sizeof(struct S1AP_S1AP_PDU), offsetof(struct S1AP_S1AP_PDU, _asn_ctx), offsetof(struct S1AP_S1AP_PDU, present), sizeof(((struct S1AP_S1AP_PDU *)0)->present), asn_MAP_S1AP_S1AP_PDU_tag2el_1, 3, /* Count of tags in the map */ 0, 0, 3 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_S1AP_PDU = { "S1AP-PDU", "S1AP-PDU", &asn_OP_CHOICE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { &asn_OER_type_S1AP_S1AP_PDU_constr_1, &asn_PER_type_S1AP_S1AP_PDU_constr_1, CHOICE_constraint }, asn_MBR_S1AP_S1AP_PDU_1, 3, /* Elements count */ &asn_SPC_S1AP_S1AP_PDU_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_S1AP-PDU.h000066400000000000000000000026311333553357400177640ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Descriptions" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_S1AP_PDU_H_ #define _S1AP_S1AP_PDU_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_S1AP_PDU_PR { S1AP_S1AP_PDU_PR_NOTHING, /* No components present */ S1AP_S1AP_PDU_PR_initiatingMessage, S1AP_S1AP_PDU_PR_successfulOutcome, S1AP_S1AP_PDU_PR_unsuccessfulOutcome /* Extensions may appear below */ } S1AP_S1AP_PDU_PR; /* Forward declarations */ struct S1AP_InitiatingMessage; struct S1AP_SuccessfulOutcome; struct S1AP_UnsuccessfulOutcome; /* S1AP_S1AP-PDU */ typedef struct S1AP_S1AP_PDU { S1AP_S1AP_PDU_PR present; union S1AP_S1AP_PDU_u { struct S1AP_InitiatingMessage *initiatingMessage; struct S1AP_SuccessfulOutcome *successfulOutcome; struct S1AP_UnsuccessfulOutcome *unsuccessfulOutcome; /* * This type is extensible, * possible extensions are below. */ } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_S1AP_PDU_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_S1AP_PDU; #ifdef __cplusplus } #endif #endif /* _S1AP_S1AP_PDU_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_S1SetupFailure.c000066400000000000000000000032701333553357400214410ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_S1SetupFailure.h" asn_TYPE_member_t asn_MBR_S1AP_S1SetupFailure_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupFailure, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P42, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_S1SetupFailure_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_S1SetupFailure_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_S1SetupFailure_specs_1 = { sizeof(struct S1AP_S1SetupFailure), offsetof(struct S1AP_S1SetupFailure, _asn_ctx), asn_MAP_S1AP_S1SetupFailure_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_S1SetupFailure = { "S1SetupFailure", "S1SetupFailure", &asn_OP_SEQUENCE, asn_DEF_S1AP_S1SetupFailure_tags_1, sizeof(asn_DEF_S1AP_S1SetupFailure_tags_1) /sizeof(asn_DEF_S1AP_S1SetupFailure_tags_1[0]), /* 1 */ asn_DEF_S1AP_S1SetupFailure_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_S1SetupFailure_tags_1) /sizeof(asn_DEF_S1AP_S1SetupFailure_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_S1SetupFailure_1, 1, /* Elements count */ &asn_SPC_S1AP_S1SetupFailure_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_S1SetupFailure.h000066400000000000000000000020511333553357400214420ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_S1SetupFailure_H_ #define _S1AP_S1SetupFailure_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_S1SetupFailure */ typedef struct S1AP_S1SetupFailure { S1AP_ProtocolIE_Container_6551P42_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_S1SetupFailure_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_S1SetupFailure; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_S1SetupFailure_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_S1SetupFailure_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_S1SetupFailure_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_S1SetupRequest.c000066400000000000000000000032701333553357400215020ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_S1SetupRequest.h" asn_TYPE_member_t asn_MBR_S1AP_S1SetupRequest_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupRequest, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P40, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_S1SetupRequest_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_S1SetupRequest_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_S1SetupRequest_specs_1 = { sizeof(struct S1AP_S1SetupRequest), offsetof(struct S1AP_S1SetupRequest, _asn_ctx), asn_MAP_S1AP_S1SetupRequest_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_S1SetupRequest = { "S1SetupRequest", "S1SetupRequest", &asn_OP_SEQUENCE, asn_DEF_S1AP_S1SetupRequest_tags_1, sizeof(asn_DEF_S1AP_S1SetupRequest_tags_1) /sizeof(asn_DEF_S1AP_S1SetupRequest_tags_1[0]), /* 1 */ asn_DEF_S1AP_S1SetupRequest_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_S1SetupRequest_tags_1) /sizeof(asn_DEF_S1AP_S1SetupRequest_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_S1SetupRequest_1, 1, /* Elements count */ &asn_SPC_S1AP_S1SetupRequest_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_S1SetupRequest.h000066400000000000000000000020511333553357400215030ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_S1SetupRequest_H_ #define _S1AP_S1SetupRequest_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_S1SetupRequest */ typedef struct S1AP_S1SetupRequest { S1AP_ProtocolIE_Container_6551P40_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_S1SetupRequest_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_S1SetupRequest; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_S1SetupRequest_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_S1SetupRequest_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_S1SetupRequest_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_S1SetupResponse.c000066400000000000000000000033141333553357400216470ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_S1SetupResponse.h" asn_TYPE_member_t asn_MBR_S1AP_S1SetupResponse_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_S1SetupResponse, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P41, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_S1SetupResponse_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_S1SetupResponse_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_S1SetupResponse_specs_1 = { sizeof(struct S1AP_S1SetupResponse), offsetof(struct S1AP_S1SetupResponse, _asn_ctx), asn_MAP_S1AP_S1SetupResponse_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_S1SetupResponse = { "S1SetupResponse", "S1SetupResponse", &asn_OP_SEQUENCE, asn_DEF_S1AP_S1SetupResponse_tags_1, sizeof(asn_DEF_S1AP_S1SetupResponse_tags_1) /sizeof(asn_DEF_S1AP_S1SetupResponse_tags_1[0]), /* 1 */ asn_DEF_S1AP_S1SetupResponse_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_S1SetupResponse_tags_1) /sizeof(asn_DEF_S1AP_S1SetupResponse_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_S1SetupResponse_1, 1, /* Elements count */ &asn_SPC_S1AP_S1SetupResponse_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_S1SetupResponse.h000066400000000000000000000020621333553357400216530ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_S1SetupResponse_H_ #define _S1AP_S1SetupResponse_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_S1SetupResponse */ typedef struct S1AP_S1SetupResponse { S1AP_ProtocolIE_Container_6551P41_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_S1SetupResponse_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_S1SetupResponse; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_S1SetupResponse_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_S1SetupResponse_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_S1SetupResponse_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SONConfigurationTransfer.c000066400000000000000000000060601333553357400235210ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_SONConfigurationTransfer.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_SONConfigurationTransfer_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_SONConfigurationTransfer, targeteNB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TargeteNB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "targeteNB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SONConfigurationTransfer, sourceeNB_ID), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_SourceeNB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "sourceeNB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SONConfigurationTransfer, sONInformation), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_SONInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "sONInformation" }, { ATF_POINTER, 1, offsetof(struct S1AP_SONConfigurationTransfer, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P89, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_SONConfigurationTransfer_oms_1[] = { 3 }; static const ber_tlv_tag_t asn_DEF_S1AP_SONConfigurationTransfer_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_SONConfigurationTransfer_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* targeteNB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* sourceeNB-ID */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* sONInformation */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_SONConfigurationTransfer_specs_1 = { sizeof(struct S1AP_SONConfigurationTransfer), offsetof(struct S1AP_SONConfigurationTransfer, _asn_ctx), asn_MAP_S1AP_SONConfigurationTransfer_tag2el_1, 4, /* Count of tags in the map */ asn_MAP_S1AP_SONConfigurationTransfer_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_SONConfigurationTransfer = { "SONConfigurationTransfer", "SONConfigurationTransfer", &asn_OP_SEQUENCE, asn_DEF_S1AP_SONConfigurationTransfer_tags_1, sizeof(asn_DEF_S1AP_SONConfigurationTransfer_tags_1) /sizeof(asn_DEF_S1AP_SONConfigurationTransfer_tags_1[0]), /* 1 */ asn_DEF_S1AP_SONConfigurationTransfer_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_SONConfigurationTransfer_tags_1) /sizeof(asn_DEF_S1AP_SONConfigurationTransfer_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_SONConfigurationTransfer_1, 4, /* Elements count */ &asn_SPC_S1AP_SONConfigurationTransfer_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SONConfigurationTransfer.h000066400000000000000000000023461333553357400235310ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_SONConfigurationTransfer_H_ #define _S1AP_SONConfigurationTransfer_H_ #include /* Including external dependencies */ #include "S1AP_TargeteNB-ID.h" #include "S1AP_SourceeNB-ID.h" #include "S1AP_SONInformation.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_SONConfigurationTransfer */ typedef struct S1AP_SONConfigurationTransfer { S1AP_TargeteNB_ID_t targeteNB_ID; S1AP_SourceeNB_ID_t sourceeNB_ID; S1AP_SONInformation_t sONInformation; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_SONConfigurationTransfer_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_SONConfigurationTransfer; #ifdef __cplusplus } #endif #endif /* _S1AP_SONConfigurationTransfer_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SONInformation-Extension.c000066400000000000000000000022411333553357400234410ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_SONInformation-Extension.h" /* * This type is implemented using S1AP_ProtocolIE_SingleContainer_6554P17, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_SONInformation_Extension_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_SONInformation_Extension = { "SONInformation-Extension", "SONInformation-Extension", &asn_OP_SEQUENCE, asn_DEF_S1AP_SONInformation_Extension_tags_1, sizeof(asn_DEF_S1AP_SONInformation_Extension_tags_1) /sizeof(asn_DEF_S1AP_SONInformation_Extension_tags_1[0]), /* 1 */ asn_DEF_S1AP_SONInformation_Extension_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_SONInformation_Extension_tags_1) /sizeof(asn_DEF_S1AP_SONInformation_Extension_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_SONInformation_ExtensionIE_69, 3, /* Elements count */ &asn_SPC_S1AP_SONInformation_ExtensionIE_specs_69 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SONInformation-Extension.h000066400000000000000000000030241333553357400234460ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_SONInformation_Extension_H_ #define _S1AP_SONInformation_Extension_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-SingleContainer.h" #ifdef __cplusplus extern "C" { #endif /* S1AP_SONInformation-Extension */ typedef S1AP_ProtocolIE_SingleContainer_6554P17_t S1AP_SONInformation_Extension_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_SONInformation_Extension; asn_struct_free_f S1AP_SONInformation_Extension_free; asn_struct_print_f S1AP_SONInformation_Extension_print; asn_constr_check_f S1AP_SONInformation_Extension_constraint; ber_type_decoder_f S1AP_SONInformation_Extension_decode_ber; der_type_encoder_f S1AP_SONInformation_Extension_encode_der; xer_type_decoder_f S1AP_SONInformation_Extension_decode_xer; xer_type_encoder_f S1AP_SONInformation_Extension_encode_xer; oer_type_decoder_f S1AP_SONInformation_Extension_decode_oer; oer_type_encoder_f S1AP_SONInformation_Extension_encode_oer; per_type_decoder_f S1AP_SONInformation_Extension_decode_uper; per_type_encoder_f S1AP_SONInformation_Extension_encode_uper; per_type_decoder_f S1AP_SONInformation_Extension_decode_aper; per_type_encoder_f S1AP_SONInformation_Extension_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_SONInformation_Extension_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SONInformation.c000066400000000000000000000052621333553357400214750ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_SONInformation.h" #include "S1AP_SONInformationReply.h" #include "S1AP_SONInformation-Extension.h" static asn_oer_constraints_t asn_OER_type_S1AP_SONInformation_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_SONInformation_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_SONInformation_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_SONInformation, choice.sONInformationRequest), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_SONInformationRequest, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "sONInformationRequest" }, { ATF_POINTER, 0, offsetof(struct S1AP_SONInformation, choice.sONInformationReply), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_SONInformationReply, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "sONInformationReply" }, { ATF_POINTER, 0, offsetof(struct S1AP_SONInformation, choice.sONInformation_Extension), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_SONInformation_Extension, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "sONInformation-Extension" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_SONInformation_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sONInformationRequest */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* sONInformationReply */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* sONInformation-Extension */ }; asn_CHOICE_specifics_t asn_SPC_S1AP_SONInformation_specs_1 = { sizeof(struct S1AP_SONInformation), offsetof(struct S1AP_SONInformation, _asn_ctx), offsetof(struct S1AP_SONInformation, present), sizeof(((struct S1AP_SONInformation *)0)->present), asn_MAP_S1AP_SONInformation_tag2el_1, 3, /* Count of tags in the map */ 0, 0, 2 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_SONInformation = { "SONInformation", "SONInformation", &asn_OP_CHOICE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { &asn_OER_type_S1AP_SONInformation_constr_1, &asn_PER_type_S1AP_SONInformation_constr_1, CHOICE_constraint }, asn_MBR_S1AP_SONInformation_1, 3, /* Elements count */ &asn_SPC_S1AP_SONInformation_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SONInformation.h000066400000000000000000000033261333553357400215010ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_SONInformation_H_ #define _S1AP_SONInformation_H_ #include /* Including external dependencies */ #include "S1AP_SONInformationRequest.h" #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_SONInformation_PR { S1AP_SONInformation_PR_NOTHING, /* No components present */ S1AP_SONInformation_PR_sONInformationRequest, S1AP_SONInformation_PR_sONInformationReply, /* Extensions may appear below */ S1AP_SONInformation_PR_sONInformation_Extension } S1AP_SONInformation_PR; /* Forward declarations */ struct S1AP_SONInformationReply; struct S1AP_SONInformation_Extension; /* S1AP_SONInformation */ typedef struct S1AP_SONInformation { S1AP_SONInformation_PR present; union S1AP_SONInformation_u { S1AP_SONInformationRequest_t sONInformationRequest; struct S1AP_SONInformationReply *sONInformationReply; /* * This type is extensible, * possible extensions are below. */ struct S1AP_SONInformation_Extension *sONInformation_Extension; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_SONInformation_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_SONInformation; extern asn_CHOICE_specifics_t asn_SPC_S1AP_SONInformation_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_SONInformation_1[3]; extern asn_per_constraints_t asn_PER_type_S1AP_SONInformation_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_SONInformation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SONInformationReply.c000066400000000000000000000045331333553357400225110ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_SONInformationReply.h" #include "S1AP_X2TNLConfigurationInfo.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_SONInformationReply_1[] = { { ATF_POINTER, 2, offsetof(struct S1AP_SONInformationReply, x2TNLConfigurationInfo), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_X2TNLConfigurationInfo, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "x2TNLConfigurationInfo" }, { ATF_POINTER, 1, offsetof(struct S1AP_SONInformationReply, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P88, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_SONInformationReply_oms_1[] = { 0, 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_SONInformationReply_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_SONInformationReply_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* x2TNLConfigurationInfo */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_SONInformationReply_specs_1 = { sizeof(struct S1AP_SONInformationReply), offsetof(struct S1AP_SONInformationReply, _asn_ctx), asn_MAP_S1AP_SONInformationReply_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_SONInformationReply_oms_1, /* Optional members */ 2, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_SONInformationReply = { "SONInformationReply", "SONInformationReply", &asn_OP_SEQUENCE, asn_DEF_S1AP_SONInformationReply_tags_1, sizeof(asn_DEF_S1AP_SONInformationReply_tags_1) /sizeof(asn_DEF_S1AP_SONInformationReply_tags_1[0]), /* 1 */ asn_DEF_S1AP_SONInformationReply_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_SONInformationReply_tags_1) /sizeof(asn_DEF_S1AP_SONInformationReply_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_SONInformationReply_1, 2, /* Elements count */ &asn_SPC_S1AP_SONInformationReply_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SONInformationReply.h000066400000000000000000000023561333553357400225170ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_SONInformationReply_H_ #define _S1AP_SONInformationReply_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_X2TNLConfigurationInfo; struct S1AP_ProtocolExtensionContainer; /* S1AP_SONInformationReply */ typedef struct S1AP_SONInformationReply { struct S1AP_X2TNLConfigurationInfo *x2TNLConfigurationInfo; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_SONInformationReply_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_SONInformationReply; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_SONInformationReply_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_SONInformationReply_1[2]; #ifdef __cplusplus } #endif #endif /* _S1AP_SONInformationReply_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SONInformationReport.c000066400000000000000000000040451333553357400226670ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_SONInformationReport.h" #include "S1AP_RLFReportInformation.h" static asn_oer_constraints_t asn_OER_type_S1AP_SONInformationReport_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_SONInformationReport_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_SONInformationReport_1[] = { { ATF_POINTER, 0, offsetof(struct S1AP_SONInformationReport, choice.rLFReportInformation), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_RLFReportInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "rLFReportInformation" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_SONInformationReport_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* rLFReportInformation */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_SONInformationReport_specs_1 = { sizeof(struct S1AP_SONInformationReport), offsetof(struct S1AP_SONInformationReport, _asn_ctx), offsetof(struct S1AP_SONInformationReport, present), sizeof(((struct S1AP_SONInformationReport *)0)->present), asn_MAP_S1AP_SONInformationReport_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 1 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_SONInformationReport = { "SONInformationReport", "SONInformationReport", &asn_OP_CHOICE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { &asn_OER_type_S1AP_SONInformationReport_constr_1, &asn_PER_type_S1AP_SONInformationReport_constr_1, CHOICE_constraint }, asn_MBR_S1AP_SONInformationReport_1, 1, /* Elements count */ &asn_SPC_S1AP_SONInformationReport_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SONInformationReport.h000066400000000000000000000024741333553357400227000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_SONInformationReport_H_ #define _S1AP_SONInformationReport_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_SONInformationReport_PR { S1AP_SONInformationReport_PR_NOTHING, /* No components present */ S1AP_SONInformationReport_PR_rLFReportInformation /* Extensions may appear below */ } S1AP_SONInformationReport_PR; /* Forward declarations */ struct S1AP_RLFReportInformation; /* S1AP_SONInformationReport */ typedef struct S1AP_SONInformationReport { S1AP_SONInformationReport_PR present; union S1AP_SONInformationReport_u { struct S1AP_RLFReportInformation *rLFReportInformation; /* * This type is extensible, * possible extensions are below. */ } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_SONInformationReport_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_SONInformationReport; #ifdef __cplusplus } #endif #endif /* _S1AP_SONInformationReport_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SONInformationRequest.c000066400000000000000000000046041333553357400230450ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_SONInformationRequest.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_SONInformationRequest_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_SONInformationRequest_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_SONInformationRequest_value2enum_1[] = { { 0, 24, "x2TNL-Configuration-Info" }, { 1, 25, "time-Synchronisation-Info" }, { 2, 15, "activate-Muting" }, { 3, 17, "deactivate-Muting" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_SONInformationRequest_enum2value_1[] = { 2, /* activate-Muting(2) */ 3, /* deactivate-Muting(3) */ 1, /* time-Synchronisation-Info(1) */ 0 /* x2TNL-Configuration-Info(0) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_SONInformationRequest_specs_1 = { asn_MAP_S1AP_SONInformationRequest_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_SONInformationRequest_enum2value_1, /* N => "tag"; sorted by N */ 4, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_SONInformationRequest_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_SONInformationRequest = { "SONInformationRequest", "SONInformationRequest", &asn_OP_NativeEnumerated, asn_DEF_S1AP_SONInformationRequest_tags_1, sizeof(asn_DEF_S1AP_SONInformationRequest_tags_1) /sizeof(asn_DEF_S1AP_SONInformationRequest_tags_1[0]), /* 1 */ asn_DEF_S1AP_SONInformationRequest_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_SONInformationRequest_tags_1) /sizeof(asn_DEF_S1AP_SONInformationRequest_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_SONInformationRequest_constr_1, &asn_PER_type_S1AP_SONInformationRequest_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_SONInformationRequest_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SONInformationRequest.h000066400000000000000000000035361333553357400230550ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_SONInformationRequest_H_ #define _S1AP_SONInformationRequest_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_SONInformationRequest { S1AP_SONInformationRequest_x2TNL_Configuration_Info = 0, /* * Enumeration is extensible */ S1AP_SONInformationRequest_time_Synchronisation_Info = 1, S1AP_SONInformationRequest_activate_Muting = 2, S1AP_SONInformationRequest_deactivate_Muting = 3 } e_S1AP_SONInformationRequest; /* S1AP_SONInformationRequest */ typedef long S1AP_SONInformationRequest_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_SONInformationRequest_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_SONInformationRequest; extern const asn_INTEGER_specifics_t asn_SPC_SONInformationRequest_specs_1; asn_struct_free_f SONInformationRequest_free; asn_struct_print_f SONInformationRequest_print; asn_constr_check_f SONInformationRequest_constraint; ber_type_decoder_f SONInformationRequest_decode_ber; der_type_encoder_f SONInformationRequest_encode_der; xer_type_decoder_f SONInformationRequest_decode_xer; xer_type_encoder_f SONInformationRequest_encode_xer; oer_type_decoder_f SONInformationRequest_decode_oer; oer_type_encoder_f SONInformationRequest_encode_oer; per_type_decoder_f SONInformationRequest_decode_uper; per_type_encoder_f SONInformationRequest_encode_uper; per_type_decoder_f SONInformationRequest_decode_aper; per_type_encoder_f SONInformationRequest_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_SONInformationRequest_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SRVCCHOIndication.c000066400000000000000000000041701333553357400217360ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_SRVCCHOIndication.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_SRVCCHOIndication_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_SRVCCHOIndication_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_SRVCCHOIndication_value2enum_1[] = { { 0, 7, "pSandCS" }, { 1, 6, "cSonly" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_SRVCCHOIndication_enum2value_1[] = { 1, /* cSonly(1) */ 0 /* pSandCS(0) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_SRVCCHOIndication_specs_1 = { asn_MAP_S1AP_SRVCCHOIndication_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_SRVCCHOIndication_enum2value_1, /* N => "tag"; sorted by N */ 2, /* Number of elements in the maps */ 3, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_SRVCCHOIndication_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_SRVCCHOIndication = { "SRVCCHOIndication", "SRVCCHOIndication", &asn_OP_NativeEnumerated, asn_DEF_S1AP_SRVCCHOIndication_tags_1, sizeof(asn_DEF_S1AP_SRVCCHOIndication_tags_1) /sizeof(asn_DEF_S1AP_SRVCCHOIndication_tags_1[0]), /* 1 */ asn_DEF_S1AP_SRVCCHOIndication_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_SRVCCHOIndication_tags_1) /sizeof(asn_DEF_S1AP_SRVCCHOIndication_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_SRVCCHOIndication_constr_1, &asn_PER_type_S1AP_SRVCCHOIndication_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_SRVCCHOIndication_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SRVCCHOIndication.h000066400000000000000000000030401333553357400217360ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_SRVCCHOIndication_H_ #define _S1AP_SRVCCHOIndication_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_SRVCCHOIndication { S1AP_SRVCCHOIndication_pSandCS = 0, S1AP_SRVCCHOIndication_cSonly = 1 /* * Enumeration is extensible */ } e_S1AP_SRVCCHOIndication; /* S1AP_SRVCCHOIndication */ typedef long S1AP_SRVCCHOIndication_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_SRVCCHOIndication; asn_struct_free_f S1AP_SRVCCHOIndication_free; asn_struct_print_f S1AP_SRVCCHOIndication_print; asn_constr_check_f S1AP_SRVCCHOIndication_constraint; ber_type_decoder_f S1AP_SRVCCHOIndication_decode_ber; der_type_encoder_f S1AP_SRVCCHOIndication_encode_der; xer_type_decoder_f S1AP_SRVCCHOIndication_decode_xer; xer_type_encoder_f S1AP_SRVCCHOIndication_encode_xer; oer_type_decoder_f S1AP_SRVCCHOIndication_decode_oer; oer_type_encoder_f S1AP_SRVCCHOIndication_encode_oer; per_type_decoder_f S1AP_SRVCCHOIndication_decode_uper; per_type_encoder_f S1AP_SRVCCHOIndication_encode_uper; per_type_decoder_f S1AP_SRVCCHOIndication_decode_aper; per_type_encoder_f S1AP_SRVCCHOIndication_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_SRVCCHOIndication_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SRVCCOperationNotPossible.c000066400000000000000000000044001333553357400235440ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_SRVCCOperationNotPossible.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_SRVCCOperationNotPossible_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_SRVCCOperationNotPossible_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_SRVCCOperationNotPossible_value2enum_1[] = { { 0, 11, "notPossible" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_SRVCCOperationNotPossible_enum2value_1[] = { 0 /* notPossible(0) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_SRVCCOperationNotPossible_specs_1 = { asn_MAP_S1AP_SRVCCOperationNotPossible_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_SRVCCOperationNotPossible_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_SRVCCOperationNotPossible_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_SRVCCOperationNotPossible = { "SRVCCOperationNotPossible", "SRVCCOperationNotPossible", &asn_OP_NativeEnumerated, asn_DEF_S1AP_SRVCCOperationNotPossible_tags_1, sizeof(asn_DEF_S1AP_SRVCCOperationNotPossible_tags_1) /sizeof(asn_DEF_S1AP_SRVCCOperationNotPossible_tags_1[0]), /* 1 */ asn_DEF_S1AP_SRVCCOperationNotPossible_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_SRVCCOperationNotPossible_tags_1) /sizeof(asn_DEF_S1AP_SRVCCOperationNotPossible_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_SRVCCOperationNotPossible_constr_1, &asn_PER_type_S1AP_SRVCCOperationNotPossible_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_SRVCCOperationNotPossible_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SRVCCOperationNotPossible.h000066400000000000000000000032601333553357400235540ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_SRVCCOperationNotPossible_H_ #define _S1AP_SRVCCOperationNotPossible_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_SRVCCOperationNotPossible { S1AP_SRVCCOperationNotPossible_notPossible = 0 /* * Enumeration is extensible */ } e_S1AP_SRVCCOperationNotPossible; /* S1AP_SRVCCOperationNotPossible */ typedef long S1AP_SRVCCOperationNotPossible_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_SRVCCOperationNotPossible; asn_struct_free_f S1AP_SRVCCOperationNotPossible_free; asn_struct_print_f S1AP_SRVCCOperationNotPossible_print; asn_constr_check_f S1AP_SRVCCOperationNotPossible_constraint; ber_type_decoder_f S1AP_SRVCCOperationNotPossible_decode_ber; der_type_encoder_f S1AP_SRVCCOperationNotPossible_encode_der; xer_type_decoder_f S1AP_SRVCCOperationNotPossible_decode_xer; xer_type_encoder_f S1AP_SRVCCOperationNotPossible_encode_xer; oer_type_decoder_f S1AP_SRVCCOperationNotPossible_decode_oer; oer_type_encoder_f S1AP_SRVCCOperationNotPossible_encode_oer; per_type_decoder_f S1AP_SRVCCOperationNotPossible_decode_uper; per_type_encoder_f S1AP_SRVCCOperationNotPossible_encode_uper; per_type_decoder_f S1AP_SRVCCOperationNotPossible_decode_aper; per_type_encoder_f S1AP_SRVCCOperationNotPossible_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_SRVCCOperationNotPossible_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SRVCCOperationPossible.c000066400000000000000000000042721333553357400230720ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_SRVCCOperationPossible.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_SRVCCOperationPossible_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_SRVCCOperationPossible_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_SRVCCOperationPossible_value2enum_1[] = { { 0, 8, "possible" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_SRVCCOperationPossible_enum2value_1[] = { 0 /* possible(0) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_SRVCCOperationPossible_specs_1 = { asn_MAP_S1AP_SRVCCOperationPossible_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_SRVCCOperationPossible_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_SRVCCOperationPossible_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_SRVCCOperationPossible = { "SRVCCOperationPossible", "SRVCCOperationPossible", &asn_OP_NativeEnumerated, asn_DEF_S1AP_SRVCCOperationPossible_tags_1, sizeof(asn_DEF_S1AP_SRVCCOperationPossible_tags_1) /sizeof(asn_DEF_S1AP_SRVCCOperationPossible_tags_1[0]), /* 1 */ asn_DEF_S1AP_SRVCCOperationPossible_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_SRVCCOperationPossible_tags_1) /sizeof(asn_DEF_S1AP_SRVCCOperationPossible_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_SRVCCOperationPossible_constr_1, &asn_PER_type_S1AP_SRVCCOperationPossible_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_SRVCCOperationPossible_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SRVCCOperationPossible.h000066400000000000000000000031531333553357400230740ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_SRVCCOperationPossible_H_ #define _S1AP_SRVCCOperationPossible_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_SRVCCOperationPossible { S1AP_SRVCCOperationPossible_possible = 0 /* * Enumeration is extensible */ } e_S1AP_SRVCCOperationPossible; /* S1AP_SRVCCOperationPossible */ typedef long S1AP_SRVCCOperationPossible_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_SRVCCOperationPossible; asn_struct_free_f S1AP_SRVCCOperationPossible_free; asn_struct_print_f S1AP_SRVCCOperationPossible_print; asn_constr_check_f S1AP_SRVCCOperationPossible_constraint; ber_type_decoder_f S1AP_SRVCCOperationPossible_decode_ber; der_type_encoder_f S1AP_SRVCCOperationPossible_encode_der; xer_type_decoder_f S1AP_SRVCCOperationPossible_decode_xer; xer_type_encoder_f S1AP_SRVCCOperationPossible_encode_xer; oer_type_decoder_f S1AP_SRVCCOperationPossible_decode_oer; oer_type_encoder_f S1AP_SRVCCOperationPossible_encode_oer; per_type_decoder_f S1AP_SRVCCOperationPossible_decode_uper; per_type_encoder_f S1AP_SRVCCOperationPossible_encode_uper; per_type_decoder_f S1AP_SRVCCOperationPossible_decode_aper; per_type_encoder_f S1AP_SRVCCOperationPossible_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_SRVCCOperationPossible_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SecurityContext.c000066400000000000000000000070461333553357400220060ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_SecurityContext.h" #include "S1AP_ProtocolExtensionContainer.h" static int memb_S1AP_nextHopChainingCount_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 7)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_oer_constraints_t asn_OER_memb_S1AP_nextHopChainingCount_constr_2 CC_NOTUSED = { { 1, 1 } /* (0..7) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_nextHopChainingCount_constr_2 CC_NOTUSED = { { APC_CONSTRAINED, 3, 3, 0, 7 } /* (0..7) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_SecurityContext_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_SecurityContext, nextHopChainingCount), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_NativeInteger, 0, { &asn_OER_memb_S1AP_nextHopChainingCount_constr_2, &asn_PER_memb_S1AP_nextHopChainingCount_constr_2, memb_S1AP_nextHopChainingCount_constraint_1 }, 0, 0, /* No default value */ "nextHopChainingCount" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SecurityContext, nextHopParameter), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_SecurityKey, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "nextHopParameter" }, { ATF_POINTER, 1, offsetof(struct S1AP_SecurityContext, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P87, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_SecurityContext_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_SecurityContext_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_SecurityContext_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* nextHopChainingCount */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* nextHopParameter */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_SecurityContext_specs_1 = { sizeof(struct S1AP_SecurityContext), offsetof(struct S1AP_SecurityContext, _asn_ctx), asn_MAP_S1AP_SecurityContext_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_SecurityContext_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_SecurityContext = { "SecurityContext", "SecurityContext", &asn_OP_SEQUENCE, asn_DEF_S1AP_SecurityContext_tags_1, sizeof(asn_DEF_S1AP_SecurityContext_tags_1) /sizeof(asn_DEF_S1AP_SecurityContext_tags_1[0]), /* 1 */ asn_DEF_S1AP_SecurityContext_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_SecurityContext_tags_1) /sizeof(asn_DEF_S1AP_SecurityContext_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_SecurityContext_1, 3, /* Elements count */ &asn_SPC_S1AP_SecurityContext_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SecurityContext.h000066400000000000000000000021251333553357400220040ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_SecurityContext_H_ #define _S1AP_SecurityContext_H_ #include /* Including external dependencies */ #include #include "S1AP_SecurityKey.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_SecurityContext */ typedef struct S1AP_SecurityContext { long nextHopChainingCount; S1AP_SecurityKey_t nextHopParameter; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_SecurityContext_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_SecurityContext; #ifdef __cplusplus } #endif #endif /* _S1AP_SecurityContext_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SecurityKey.c000066400000000000000000000037531333553357400211130ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_SecurityKey.h" int S1AP_SecurityKey_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 256)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_SecurityKey_constr_1 CC_NOTUSED = { { 0, 0 }, 256 /* (SIZE(256..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_SecurityKey_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 256, 256 } /* (SIZE(256..256)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_SecurityKey_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_SecurityKey = { "SecurityKey", "SecurityKey", &asn_OP_BIT_STRING, asn_DEF_S1AP_SecurityKey_tags_1, sizeof(asn_DEF_S1AP_SecurityKey_tags_1) /sizeof(asn_DEF_S1AP_SecurityKey_tags_1[0]), /* 1 */ asn_DEF_S1AP_SecurityKey_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_SecurityKey_tags_1) /sizeof(asn_DEF_S1AP_SecurityKey_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_SecurityKey_constr_1, &asn_PER_type_S1AP_SecurityKey_constr_1, S1AP_SecurityKey_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SecurityKey.h000066400000000000000000000024601333553357400211120ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_SecurityKey_H_ #define _S1AP_SecurityKey_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_SecurityKey */ typedef BIT_STRING_t S1AP_SecurityKey_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_SecurityKey_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_SecurityKey; asn_struct_free_f S1AP_SecurityKey_free; asn_struct_print_f S1AP_SecurityKey_print; asn_constr_check_f S1AP_SecurityKey_constraint; ber_type_decoder_f S1AP_SecurityKey_decode_ber; der_type_encoder_f S1AP_SecurityKey_encode_der; xer_type_decoder_f S1AP_SecurityKey_decode_xer; xer_type_encoder_f S1AP_SecurityKey_encode_xer; oer_type_decoder_f S1AP_SecurityKey_decode_oer; oer_type_encoder_f S1AP_SecurityKey_encode_oer; per_type_decoder_f S1AP_SecurityKey_decode_uper; per_type_encoder_f S1AP_SecurityKey_encode_uper; per_type_decoder_f S1AP_SecurityKey_decode_aper; per_type_encoder_f S1AP_SecurityKey_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_SecurityKey_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SerialNumber.c000066400000000000000000000037731333553357400212250ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_SerialNumber.h" int S1AP_SerialNumber_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 16)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_SerialNumber_constr_1 CC_NOTUSED = { { 0, 0 }, 16 /* (SIZE(16..16)) */}; static asn_per_constraints_t asn_PER_type_S1AP_SerialNumber_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_SerialNumber_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_SerialNumber = { "SerialNumber", "SerialNumber", &asn_OP_BIT_STRING, asn_DEF_S1AP_SerialNumber_tags_1, sizeof(asn_DEF_S1AP_SerialNumber_tags_1) /sizeof(asn_DEF_S1AP_SerialNumber_tags_1[0]), /* 1 */ asn_DEF_S1AP_SerialNumber_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_SerialNumber_tags_1) /sizeof(asn_DEF_S1AP_SerialNumber_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_SerialNumber_constr_1, &asn_PER_type_S1AP_SerialNumber_constr_1, S1AP_SerialNumber_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SerialNumber.h000066400000000000000000000023761333553357400212300ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_SerialNumber_H_ #define _S1AP_SerialNumber_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_SerialNumber */ typedef BIT_STRING_t S1AP_SerialNumber_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_SerialNumber; asn_struct_free_f S1AP_SerialNumber_free; asn_struct_print_f S1AP_SerialNumber_print; asn_constr_check_f S1AP_SerialNumber_constraint; ber_type_decoder_f S1AP_SerialNumber_decode_ber; der_type_encoder_f S1AP_SerialNumber_encode_der; xer_type_decoder_f S1AP_SerialNumber_decode_xer; xer_type_encoder_f S1AP_SerialNumber_encode_xer; oer_type_decoder_f S1AP_SerialNumber_decode_oer; oer_type_encoder_f S1AP_SerialNumber_encode_oer; per_type_decoder_f S1AP_SerialNumber_decode_uper; per_type_encoder_f S1AP_SerialNumber_encode_uper; per_type_decoder_f S1AP_SerialNumber_decode_aper; per_type_encoder_f S1AP_SerialNumber_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_SerialNumber_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ServedDCNs.c000066400000000000000000000033051333553357400205640ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ServedDCNs.h" #include "S1AP_ServedDCNsItem.h" static asn_oer_constraints_t asn_OER_type_S1AP_ServedDCNs_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..32)) */}; static asn_per_constraints_t asn_PER_type_S1AP_ServedDCNs_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 6, 6, 0, 32 } /* (SIZE(0..32)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_ServedDCNs_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ServedDCNsItem, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ServedDCNs_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_S1AP_ServedDCNs_specs_1 = { sizeof(struct S1AP_ServedDCNs), offsetof(struct S1AP_ServedDCNs, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ServedDCNs = { "ServedDCNs", "ServedDCNs", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ServedDCNs_tags_1, sizeof(asn_DEF_S1AP_ServedDCNs_tags_1) /sizeof(asn_DEF_S1AP_ServedDCNs_tags_1[0]), /* 1 */ asn_DEF_S1AP_ServedDCNs_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ServedDCNs_tags_1) /sizeof(asn_DEF_S1AP_ServedDCNs_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ServedDCNs_constr_1, &asn_PER_type_S1AP_ServedDCNs_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ServedDCNs_1, 1, /* Single element */ &asn_SPC_S1AP_ServedDCNs_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ServedDCNs.h000066400000000000000000000015521333553357400205730ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ServedDCNs_H_ #define _S1AP_ServedDCNs_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ServedDCNsItem; /* S1AP_ServedDCNs */ typedef struct S1AP_ServedDCNs { A_SEQUENCE_OF(struct S1AP_ServedDCNsItem) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ServedDCNs_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ServedDCNs; #ifdef __cplusplus } #endif #endif /* _S1AP_ServedDCNs_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ServedDCNsItem.c000066400000000000000000000047361333553357400214140ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ServedDCNsItem.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_ServedDCNsItem_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ServedDCNsItem, dCN_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_DCN_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "dCN-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ServedDCNsItem, relativeDCNCapacity), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_RelativeMMECapacity, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "relativeDCNCapacity" }, { ATF_POINTER, 1, offsetof(struct S1AP_ServedDCNsItem, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P41, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_ServedDCNsItem_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_ServedDCNsItem_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ServedDCNsItem_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* dCN-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* relativeDCNCapacity */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ServedDCNsItem_specs_1 = { sizeof(struct S1AP_ServedDCNsItem), offsetof(struct S1AP_ServedDCNsItem, _asn_ctx), asn_MAP_S1AP_ServedDCNsItem_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_ServedDCNsItem_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ServedDCNsItem = { "ServedDCNsItem", "ServedDCNsItem", &asn_OP_SEQUENCE, asn_DEF_S1AP_ServedDCNsItem_tags_1, sizeof(asn_DEF_S1AP_ServedDCNsItem_tags_1) /sizeof(asn_DEF_S1AP_ServedDCNsItem_tags_1[0]), /* 1 */ asn_DEF_S1AP_ServedDCNsItem_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ServedDCNsItem_tags_1) /sizeof(asn_DEF_S1AP_ServedDCNsItem_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ServedDCNsItem_1, 3, /* Elements count */ &asn_SPC_S1AP_ServedDCNsItem_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ServedDCNsItem.h000066400000000000000000000023321333553357400214070ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ServedDCNsItem_H_ #define _S1AP_ServedDCNsItem_H_ #include /* Including external dependencies */ #include "S1AP_DCN-ID.h" #include "S1AP_RelativeMMECapacity.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_ServedDCNsItem */ typedef struct S1AP_ServedDCNsItem { S1AP_DCN_ID_t dCN_ID; S1AP_RelativeMMECapacity_t relativeDCNCapacity; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ServedDCNsItem_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ServedDCNsItem; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ServedDCNsItem_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ServedDCNsItem_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_ServedDCNsItem_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ServedGUMMEIs.c000066400000000000000000000034071333553357400211460ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ServedGUMMEIs.h" #include "S1AP_ServedGUMMEIsItem.h" static asn_oer_constraints_t asn_OER_type_S1AP_ServedGUMMEIs_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..8)) */}; static asn_per_constraints_t asn_PER_type_S1AP_ServedGUMMEIs_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 3, 3, 1, 8 } /* (SIZE(1..8)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_ServedGUMMEIs_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ServedGUMMEIsItem, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ServedGUMMEIs_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_S1AP_ServedGUMMEIs_specs_1 = { sizeof(struct S1AP_ServedGUMMEIs), offsetof(struct S1AP_ServedGUMMEIs, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ServedGUMMEIs = { "ServedGUMMEIs", "ServedGUMMEIs", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ServedGUMMEIs_tags_1, sizeof(asn_DEF_S1AP_ServedGUMMEIs_tags_1) /sizeof(asn_DEF_S1AP_ServedGUMMEIs_tags_1[0]), /* 1 */ asn_DEF_S1AP_ServedGUMMEIs_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ServedGUMMEIs_tags_1) /sizeof(asn_DEF_S1AP_ServedGUMMEIs_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ServedGUMMEIs_constr_1, &asn_PER_type_S1AP_ServedGUMMEIs_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ServedGUMMEIs_1, 1, /* Single element */ &asn_SPC_S1AP_ServedGUMMEIs_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ServedGUMMEIs.h000066400000000000000000000016051333553357400211510ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ServedGUMMEIs_H_ #define _S1AP_ServedGUMMEIs_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ServedGUMMEIsItem; /* S1AP_ServedGUMMEIs */ typedef struct S1AP_ServedGUMMEIs { A_SEQUENCE_OF(struct S1AP_ServedGUMMEIsItem) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ServedGUMMEIs_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ServedGUMMEIs; #ifdef __cplusplus } #endif #endif /* _S1AP_ServedGUMMEIs_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ServedGUMMEIsItem.c000066400000000000000000000055531333553357400217710ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ServedGUMMEIsItem.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_ServedGUMMEIsItem_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_ServedGUMMEIsItem, servedPLMNs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ServedPLMNs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "servedPLMNs" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ServedGUMMEIsItem, servedGroupIDs), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ServedGroupIDs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "servedGroupIDs" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_ServedGUMMEIsItem, servedMMECs), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ServedMMECs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "servedMMECs" }, { ATF_POINTER, 1, offsetof(struct S1AP_ServedGUMMEIsItem, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P93, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_ServedGUMMEIsItem_oms_1[] = { 3 }; static const ber_tlv_tag_t asn_DEF_S1AP_ServedGUMMEIsItem_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_ServedGUMMEIsItem_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* servedPLMNs */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* servedGroupIDs */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* servedMMECs */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_ServedGUMMEIsItem_specs_1 = { sizeof(struct S1AP_ServedGUMMEIsItem), offsetof(struct S1AP_ServedGUMMEIsItem, _asn_ctx), asn_MAP_S1AP_ServedGUMMEIsItem_tag2el_1, 4, /* Count of tags in the map */ asn_MAP_S1AP_ServedGUMMEIsItem_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ServedGUMMEIsItem = { "ServedGUMMEIsItem", "ServedGUMMEIsItem", &asn_OP_SEQUENCE, asn_DEF_S1AP_ServedGUMMEIsItem_tags_1, sizeof(asn_DEF_S1AP_ServedGUMMEIsItem_tags_1) /sizeof(asn_DEF_S1AP_ServedGUMMEIsItem_tags_1[0]), /* 1 */ asn_DEF_S1AP_ServedGUMMEIsItem_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ServedGUMMEIsItem_tags_1) /sizeof(asn_DEF_S1AP_ServedGUMMEIsItem_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_ServedGUMMEIsItem_1, 4, /* Elements count */ &asn_SPC_S1AP_ServedGUMMEIsItem_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ServedGUMMEIsItem.h000066400000000000000000000024651333553357400217750ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ServedGUMMEIsItem_H_ #define _S1AP_ServedGUMMEIsItem_H_ #include /* Including external dependencies */ #include "S1AP_ServedPLMNs.h" #include "S1AP_ServedGroupIDs.h" #include "S1AP_ServedMMECs.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_ServedGUMMEIsItem */ typedef struct S1AP_ServedGUMMEIsItem { S1AP_ServedPLMNs_t servedPLMNs; S1AP_ServedGroupIDs_t servedGroupIDs; S1AP_ServedMMECs_t servedMMECs; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ServedGUMMEIsItem_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ServedGUMMEIsItem; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_ServedGUMMEIsItem_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ServedGUMMEIsItem_1[4]; #ifdef __cplusplus } #endif #endif /* _S1AP_ServedGUMMEIsItem_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ServedGroupIDs.c000066400000000000000000000033531333553357400214740ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ServedGroupIDs.h" static asn_oer_constraints_t asn_OER_type_S1AP_ServedGroupIDs_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_ServedGroupIDs_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_ServedGroupIDs_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_MME_Group_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ServedGroupIDs_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ServedGroupIDs_specs_1 = { sizeof(struct S1AP_ServedGroupIDs), offsetof(struct S1AP_ServedGroupIDs, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ServedGroupIDs = { "ServedGroupIDs", "ServedGroupIDs", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ServedGroupIDs_tags_1, sizeof(asn_DEF_S1AP_ServedGroupIDs_tags_1) /sizeof(asn_DEF_S1AP_ServedGroupIDs_tags_1[0]), /* 1 */ asn_DEF_S1AP_ServedGroupIDs_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ServedGroupIDs_tags_1) /sizeof(asn_DEF_S1AP_ServedGroupIDs_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ServedGroupIDs_constr_1, &asn_PER_type_S1AP_ServedGroupIDs_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ServedGroupIDs_1, 1, /* Single element */ &asn_SPC_S1AP_ServedGroupIDs_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ServedGroupIDs.h000066400000000000000000000020541333553357400214760ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ServedGroupIDs_H_ #define _S1AP_ServedGroupIDs_H_ #include /* Including external dependencies */ #include "S1AP_MME-Group-ID.h" #include #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ServedGroupIDs */ typedef struct S1AP_ServedGroupIDs { A_SEQUENCE_OF(S1AP_MME_Group_ID_t) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ServedGroupIDs_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ServedGroupIDs; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ServedGroupIDs_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ServedGroupIDs_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ServedGroupIDs_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_ServedGroupIDs_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ServedMMECs.c000066400000000000000000000032401333553357400206770ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ServedMMECs.h" static asn_oer_constraints_t asn_OER_type_S1AP_ServedMMECs_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_ServedMMECs_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_ServedMMECs_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_MME_Code, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ServedMMECs_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ServedMMECs_specs_1 = { sizeof(struct S1AP_ServedMMECs), offsetof(struct S1AP_ServedMMECs, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ServedMMECs = { "ServedMMECs", "ServedMMECs", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ServedMMECs_tags_1, sizeof(asn_DEF_S1AP_ServedMMECs_tags_1) /sizeof(asn_DEF_S1AP_ServedMMECs_tags_1[0]), /* 1 */ asn_DEF_S1AP_ServedMMECs_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ServedMMECs_tags_1) /sizeof(asn_DEF_S1AP_ServedMMECs_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ServedMMECs_constr_1, &asn_PER_type_S1AP_ServedMMECs_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ServedMMECs_1, 1, /* Single element */ &asn_SPC_S1AP_ServedMMECs_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ServedMMECs.h000066400000000000000000000020061333553357400207030ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ServedMMECs_H_ #define _S1AP_ServedMMECs_H_ #include /* Including external dependencies */ #include "S1AP_MME-Code.h" #include #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ServedMMECs */ typedef struct S1AP_ServedMMECs { A_SEQUENCE_OF(S1AP_MME_Code_t) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ServedMMECs_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ServedMMECs; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ServedMMECs_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ServedMMECs_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ServedMMECs_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_ServedMMECs_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ServedPLMNs.c000066400000000000000000000032411333553357400207250ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_ServedPLMNs.h" static asn_oer_constraints_t asn_OER_type_S1AP_ServedPLMNs_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..32)) */}; asn_per_constraints_t asn_PER_type_S1AP_ServedPLMNs_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 5, 5, 1, 32 } /* (SIZE(1..32)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_ServedPLMNs_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_PLMNidentity, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_ServedPLMNs_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_ServedPLMNs_specs_1 = { sizeof(struct S1AP_ServedPLMNs), offsetof(struct S1AP_ServedPLMNs, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_ServedPLMNs = { "ServedPLMNs", "ServedPLMNs", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_ServedPLMNs_tags_1, sizeof(asn_DEF_S1AP_ServedPLMNs_tags_1) /sizeof(asn_DEF_S1AP_ServedPLMNs_tags_1[0]), /* 1 */ asn_DEF_S1AP_ServedPLMNs_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_ServedPLMNs_tags_1) /sizeof(asn_DEF_S1AP_ServedPLMNs_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_ServedPLMNs_constr_1, &asn_PER_type_S1AP_ServedPLMNs_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_ServedPLMNs_1, 1, /* Single element */ &asn_SPC_S1AP_ServedPLMNs_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_ServedPLMNs.h000066400000000000000000000020161333553357400207310ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_ServedPLMNs_H_ #define _S1AP_ServedPLMNs_H_ #include /* Including external dependencies */ #include "S1AP_PLMNidentity.h" #include #include #ifdef __cplusplus extern "C" { #endif /* S1AP_ServedPLMNs */ typedef struct S1AP_ServedPLMNs { A_SEQUENCE_OF(S1AP_PLMNidentity_t) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_ServedPLMNs_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_ServedPLMNs; extern asn_SET_OF_specifics_t asn_SPC_S1AP_ServedPLMNs_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_ServedPLMNs_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_ServedPLMNs_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_ServedPLMNs_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Source-ToTarget-TransparentContainer.c000066400000000000000000000023151333553357400257550ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Source-ToTarget-TransparentContainer.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_Source_ToTarget_TransparentContainer_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Source_ToTarget_TransparentContainer = { "Source-ToTarget-TransparentContainer", "Source-ToTarget-TransparentContainer", &asn_OP_OCTET_STRING, asn_DEF_S1AP_Source_ToTarget_TransparentContainer_tags_1, sizeof(asn_DEF_S1AP_Source_ToTarget_TransparentContainer_tags_1) /sizeof(asn_DEF_S1AP_Source_ToTarget_TransparentContainer_tags_1[0]), /* 1 */ asn_DEF_S1AP_Source_ToTarget_TransparentContainer_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Source_ToTarget_TransparentContainer_tags_1) /sizeof(asn_DEF_S1AP_Source_ToTarget_TransparentContainer_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Source-ToTarget-TransparentContainer.h000066400000000000000000000033121333553357400257600ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Source_ToTarget_TransparentContainer_H_ #define _S1AP_Source_ToTarget_TransparentContainer_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_Source-ToTarget-TransparentContainer */ typedef OCTET_STRING_t S1AP_Source_ToTarget_TransparentContainer_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Source_ToTarget_TransparentContainer; asn_struct_free_f S1AP_Source_ToTarget_TransparentContainer_free; asn_struct_print_f S1AP_Source_ToTarget_TransparentContainer_print; asn_constr_check_f S1AP_Source_ToTarget_TransparentContainer_constraint; ber_type_decoder_f S1AP_Source_ToTarget_TransparentContainer_decode_ber; der_type_encoder_f S1AP_Source_ToTarget_TransparentContainer_encode_der; xer_type_decoder_f S1AP_Source_ToTarget_TransparentContainer_decode_xer; xer_type_encoder_f S1AP_Source_ToTarget_TransparentContainer_encode_xer; oer_type_decoder_f S1AP_Source_ToTarget_TransparentContainer_decode_oer; oer_type_encoder_f S1AP_Source_ToTarget_TransparentContainer_encode_oer; per_type_decoder_f S1AP_Source_ToTarget_TransparentContainer_decode_uper; per_type_encoder_f S1AP_Source_ToTarget_TransparentContainer_encode_uper; per_type_decoder_f S1AP_Source_ToTarget_TransparentContainer_decode_aper; per_type_encoder_f S1AP_Source_ToTarget_TransparentContainer_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Source_ToTarget_TransparentContainer_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SourceBSS-ToTargetBSS-TransparentContainer.c000066400000000000000000000024171333553357400267000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_SourceBSS-ToTargetBSS-TransparentContainer.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_SourceBSS_ToTargetBSS_TransparentContainer_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_SourceBSS_ToTargetBSS_TransparentContainer = { "SourceBSS-ToTargetBSS-TransparentContainer", "SourceBSS-ToTargetBSS-TransparentContainer", &asn_OP_OCTET_STRING, asn_DEF_S1AP_SourceBSS_ToTargetBSS_TransparentContainer_tags_1, sizeof(asn_DEF_S1AP_SourceBSS_ToTargetBSS_TransparentContainer_tags_1) /sizeof(asn_DEF_S1AP_SourceBSS_ToTargetBSS_TransparentContainer_tags_1[0]), /* 1 */ asn_DEF_S1AP_SourceBSS_ToTargetBSS_TransparentContainer_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_SourceBSS_ToTargetBSS_TransparentContainer_tags_1) /sizeof(asn_DEF_S1AP_SourceBSS_ToTargetBSS_TransparentContainer_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SourceBSS-ToTargetBSS-TransparentContainer.h000066400000000000000000000034741333553357400267110ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_SourceBSS_ToTargetBSS_TransparentContainer_H_ #define _S1AP_SourceBSS_ToTargetBSS_TransparentContainer_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_SourceBSS-ToTargetBSS-TransparentContainer */ typedef OCTET_STRING_t S1AP_SourceBSS_ToTargetBSS_TransparentContainer_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_SourceBSS_ToTargetBSS_TransparentContainer; asn_struct_free_f S1AP_SourceBSS_ToTargetBSS_TransparentContainer_free; asn_struct_print_f S1AP_SourceBSS_ToTargetBSS_TransparentContainer_print; asn_constr_check_f S1AP_SourceBSS_ToTargetBSS_TransparentContainer_constraint; ber_type_decoder_f S1AP_SourceBSS_ToTargetBSS_TransparentContainer_decode_ber; der_type_encoder_f S1AP_SourceBSS_ToTargetBSS_TransparentContainer_encode_der; xer_type_decoder_f S1AP_SourceBSS_ToTargetBSS_TransparentContainer_decode_xer; xer_type_encoder_f S1AP_SourceBSS_ToTargetBSS_TransparentContainer_encode_xer; oer_type_decoder_f S1AP_SourceBSS_ToTargetBSS_TransparentContainer_decode_oer; oer_type_encoder_f S1AP_SourceBSS_ToTargetBSS_TransparentContainer_encode_oer; per_type_decoder_f S1AP_SourceBSS_ToTargetBSS_TransparentContainer_decode_uper; per_type_encoder_f S1AP_SourceBSS_ToTargetBSS_TransparentContainer_encode_uper; per_type_decoder_f S1AP_SourceBSS_ToTargetBSS_TransparentContainer_decode_aper; per_type_encoder_f S1AP_SourceBSS_ToTargetBSS_TransparentContainer_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_SourceBSS_ToTargetBSS_TransparentContainer_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SourceOfUEActivityBehaviourInformation.c000066400000000000000000000051171333553357400263760ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_SourceOfUEActivityBehaviourInformation.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_SourceOfUEActivityBehaviourInformation_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_SourceOfUEActivityBehaviourInformation_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_SourceOfUEActivityBehaviourInformation_value2enum_1[] = { { 0, 24, "subscription-information" }, { 1, 10, "statistics" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_SourceOfUEActivityBehaviourInformation_enum2value_1[] = { 1, /* statistics(1) */ 0 /* subscription-information(0) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_SourceOfUEActivityBehaviourInformation_specs_1 = { asn_MAP_S1AP_SourceOfUEActivityBehaviourInformation_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_SourceOfUEActivityBehaviourInformation_enum2value_1, /* N => "tag"; sorted by N */ 2, /* Number of elements in the maps */ 3, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_SourceOfUEActivityBehaviourInformation_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_SourceOfUEActivityBehaviourInformation = { "SourceOfUEActivityBehaviourInformation", "SourceOfUEActivityBehaviourInformation", &asn_OP_NativeEnumerated, asn_DEF_S1AP_SourceOfUEActivityBehaviourInformation_tags_1, sizeof(asn_DEF_S1AP_SourceOfUEActivityBehaviourInformation_tags_1) /sizeof(asn_DEF_S1AP_SourceOfUEActivityBehaviourInformation_tags_1[0]), /* 1 */ asn_DEF_S1AP_SourceOfUEActivityBehaviourInformation_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_SourceOfUEActivityBehaviourInformation_tags_1) /sizeof(asn_DEF_S1AP_SourceOfUEActivityBehaviourInformation_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_SourceOfUEActivityBehaviourInformation_constr_1, &asn_PER_type_S1AP_SourceOfUEActivityBehaviourInformation_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_SourceOfUEActivityBehaviourInformation_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SourceOfUEActivityBehaviourInformation.h000066400000000000000000000042241333553357400264010ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_SourceOfUEActivityBehaviourInformation_H_ #define _S1AP_SourceOfUEActivityBehaviourInformation_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_SourceOfUEActivityBehaviourInformation { S1AP_SourceOfUEActivityBehaviourInformation_subscription_information = 0, S1AP_SourceOfUEActivityBehaviourInformation_statistics = 1 /* * Enumeration is extensible */ } e_S1AP_SourceOfUEActivityBehaviourInformation; /* S1AP_SourceOfUEActivityBehaviourInformation */ typedef long S1AP_SourceOfUEActivityBehaviourInformation_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_SourceOfUEActivityBehaviourInformation_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_SourceOfUEActivityBehaviourInformation; extern const asn_INTEGER_specifics_t asn_SPC_SourceOfUEActivityBehaviourInformation_specs_1; asn_struct_free_f SourceOfUEActivityBehaviourInformation_free; asn_struct_print_f SourceOfUEActivityBehaviourInformation_print; asn_constr_check_f SourceOfUEActivityBehaviourInformation_constraint; ber_type_decoder_f SourceOfUEActivityBehaviourInformation_decode_ber; der_type_encoder_f SourceOfUEActivityBehaviourInformation_encode_der; xer_type_decoder_f SourceOfUEActivityBehaviourInformation_decode_xer; xer_type_encoder_f SourceOfUEActivityBehaviourInformation_encode_xer; oer_type_decoder_f SourceOfUEActivityBehaviourInformation_decode_oer; oer_type_encoder_f SourceOfUEActivityBehaviourInformation_encode_oer; per_type_decoder_f SourceOfUEActivityBehaviourInformation_decode_uper; per_type_encoder_f SourceOfUEActivityBehaviourInformation_encode_uper; per_type_decoder_f SourceOfUEActivityBehaviourInformation_decode_aper; per_type_encoder_f SourceOfUEActivityBehaviourInformation_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_SourceOfUEActivityBehaviourInformation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SourceRNC-ToTargetRNC-TransparentContainer.c000066400000000000000000000024171333553357400266660ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_SourceRNC-ToTargetRNC-TransparentContainer.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_SourceRNC_ToTargetRNC_TransparentContainer_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_SourceRNC_ToTargetRNC_TransparentContainer = { "SourceRNC-ToTargetRNC-TransparentContainer", "SourceRNC-ToTargetRNC-TransparentContainer", &asn_OP_OCTET_STRING, asn_DEF_S1AP_SourceRNC_ToTargetRNC_TransparentContainer_tags_1, sizeof(asn_DEF_S1AP_SourceRNC_ToTargetRNC_TransparentContainer_tags_1) /sizeof(asn_DEF_S1AP_SourceRNC_ToTargetRNC_TransparentContainer_tags_1[0]), /* 1 */ asn_DEF_S1AP_SourceRNC_ToTargetRNC_TransparentContainer_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_SourceRNC_ToTargetRNC_TransparentContainer_tags_1) /sizeof(asn_DEF_S1AP_SourceRNC_ToTargetRNC_TransparentContainer_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SourceRNC-ToTargetRNC-TransparentContainer.h000066400000000000000000000034741333553357400266770ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_SourceRNC_ToTargetRNC_TransparentContainer_H_ #define _S1AP_SourceRNC_ToTargetRNC_TransparentContainer_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_SourceRNC-ToTargetRNC-TransparentContainer */ typedef OCTET_STRING_t S1AP_SourceRNC_ToTargetRNC_TransparentContainer_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_SourceRNC_ToTargetRNC_TransparentContainer; asn_struct_free_f S1AP_SourceRNC_ToTargetRNC_TransparentContainer_free; asn_struct_print_f S1AP_SourceRNC_ToTargetRNC_TransparentContainer_print; asn_constr_check_f S1AP_SourceRNC_ToTargetRNC_TransparentContainer_constraint; ber_type_decoder_f S1AP_SourceRNC_ToTargetRNC_TransparentContainer_decode_ber; der_type_encoder_f S1AP_SourceRNC_ToTargetRNC_TransparentContainer_encode_der; xer_type_decoder_f S1AP_SourceRNC_ToTargetRNC_TransparentContainer_decode_xer; xer_type_encoder_f S1AP_SourceRNC_ToTargetRNC_TransparentContainer_encode_xer; oer_type_decoder_f S1AP_SourceRNC_ToTargetRNC_TransparentContainer_decode_oer; oer_type_encoder_f S1AP_SourceRNC_ToTargetRNC_TransparentContainer_encode_oer; per_type_decoder_f S1AP_SourceRNC_ToTargetRNC_TransparentContainer_decode_uper; per_type_encoder_f S1AP_SourceRNC_ToTargetRNC_TransparentContainer_encode_uper; per_type_decoder_f S1AP_SourceRNC_ToTargetRNC_TransparentContainer_decode_aper; per_type_encoder_f S1AP_SourceRNC_ToTargetRNC_TransparentContainer_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_SourceRNC_ToTargetRNC_TransparentContainer_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SourceeNB-ID.c000066400000000000000000000046461333553357400207540ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_SourceeNB-ID.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_SourceeNB_ID_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_SourceeNB_ID, global_ENB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Global_ENB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "global-ENB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SourceeNB_ID, selected_TAI), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "selected-TAI" }, { ATF_POINTER, 1, offsetof(struct S1AP_SourceeNB_ID, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P91, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_SourceeNB_ID_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_SourceeNB_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_SourceeNB_ID_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* global-ENB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* selected-TAI */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_SourceeNB_ID_specs_1 = { sizeof(struct S1AP_SourceeNB_ID), offsetof(struct S1AP_SourceeNB_ID, _asn_ctx), asn_MAP_S1AP_SourceeNB_ID_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_SourceeNB_ID_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_SourceeNB_ID = { "SourceeNB-ID", "SourceeNB-ID", &asn_OP_SEQUENCE, asn_DEF_S1AP_SourceeNB_ID_tags_1, sizeof(asn_DEF_S1AP_SourceeNB_ID_tags_1) /sizeof(asn_DEF_S1AP_SourceeNB_ID_tags_1[0]), /* 1 */ asn_DEF_S1AP_SourceeNB_ID_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_SourceeNB_ID_tags_1) /sizeof(asn_DEF_S1AP_SourceeNB_ID_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_SourceeNB_ID_1, 3, /* Elements count */ &asn_SPC_S1AP_SourceeNB_ID_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SourceeNB-ID.h000066400000000000000000000021551333553357400207520ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_SourceeNB_ID_H_ #define _S1AP_SourceeNB_ID_H_ #include /* Including external dependencies */ #include "S1AP_Global-ENB-ID.h" #include "S1AP_TAI.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_SourceeNB-ID */ typedef struct S1AP_SourceeNB_ID { S1AP_Global_ENB_ID_t global_ENB_ID; S1AP_TAI_t selected_TAI; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_SourceeNB_ID_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_SourceeNB_ID; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_SourceeNB_ID_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_SourceeNB_ID_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_SourceeNB_ID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SourceeNB-ToTargeteNB-TransparentContainer.c000066400000000000000000000105301333553357400267250ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_SourceeNB-ToTargeteNB-TransparentContainer.h" #include "S1AP_E-RABInformationList.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer, rRC_Container), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_RRC_Container, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "rRC-Container" }, { ATF_POINTER, 1, offsetof(struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer, e_RABInformationList), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_RABInformationList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-RABInformationList" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer, targetCell_ID), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_EUTRAN_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "targetCell-ID" }, { ATF_POINTER, 1, offsetof(struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer, subscriberProfileIDforRFP), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_SubscriberProfileIDforRFP, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "subscriberProfileIDforRFP" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer, uE_HistoryInformation), (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_UE_HistoryInformation, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "uE-HistoryInformation" }, { ATF_POINTER, 1, offsetof(struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (5 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P92, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_oms_1[] = { 1, 3, 5 }; static const ber_tlv_tag_t asn_DEF_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* rRC-Container */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* e-RABInformationList */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* targetCell-ID */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* subscriberProfileIDforRFP */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 }, /* uE-HistoryInformation */ { (ASN_TAG_CLASS_CONTEXT | (5 << 2)), 5, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_specs_1 = { sizeof(struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer), offsetof(struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer, _asn_ctx), asn_MAP_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_tag2el_1, 6, /* Count of tags in the map */ asn_MAP_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_oms_1, /* Optional members */ 3, 0, /* Root/Additions */ 6, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_SourceeNB_ToTargeteNB_TransparentContainer = { "SourceeNB-ToTargeteNB-TransparentContainer", "SourceeNB-ToTargeteNB-TransparentContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_tags_1, sizeof(asn_DEF_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_tags_1) /sizeof(asn_DEF_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_tags_1[0]), /* 1 */ asn_DEF_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_tags_1) /sizeof(asn_DEF_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_1, 6, /* Elements count */ &asn_SPC_S1AP_SourceeNB_ToTargeteNB_TransparentContainer_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SourceeNB-ToTargeteNB-TransparentContainer.h000066400000000000000000000031341333553357400267340ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_SourceeNB_ToTargeteNB_TransparentContainer_H_ #define _S1AP_SourceeNB_ToTargeteNB_TransparentContainer_H_ #include /* Including external dependencies */ #include "S1AP_RRC-Container.h" #include "S1AP_EUTRAN-CGI.h" #include "S1AP_SubscriberProfileIDforRFP.h" #include "S1AP_UE-HistoryInformation.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_E_RABInformationList; struct S1AP_ProtocolExtensionContainer; /* S1AP_SourceeNB-ToTargeteNB-TransparentContainer */ typedef struct S1AP_SourceeNB_ToTargeteNB_TransparentContainer { S1AP_RRC_Container_t rRC_Container; struct S1AP_E_RABInformationList *e_RABInformationList; /* OPTIONAL */ S1AP_EUTRAN_CGI_t targetCell_ID; S1AP_SubscriberProfileIDforRFP_t *subscriberProfileIDforRFP; /* OPTIONAL */ S1AP_UE_HistoryInformation_t uE_HistoryInformation; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_SourceeNB_ToTargeteNB_TransparentContainer_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_SourceeNB_ToTargeteNB_TransparentContainer; #ifdef __cplusplus } #endif #endif /* _S1AP_SourceeNB_ToTargeteNB_TransparentContainer_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_StratumLevel.c000066400000000000000000000035251333553357400212570ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_StratumLevel.h" int S1AP_StratumLevel_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 3)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_StratumLevel_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_StratumLevel_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 3 } /* (0..3,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_StratumLevel_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_StratumLevel = { "StratumLevel", "StratumLevel", &asn_OP_NativeInteger, asn_DEF_S1AP_StratumLevel_tags_1, sizeof(asn_DEF_S1AP_StratumLevel_tags_1) /sizeof(asn_DEF_S1AP_StratumLevel_tags_1[0]), /* 1 */ asn_DEF_S1AP_StratumLevel_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_StratumLevel_tags_1) /sizeof(asn_DEF_S1AP_StratumLevel_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_StratumLevel_constr_1, &asn_PER_type_S1AP_StratumLevel_constr_1, S1AP_StratumLevel_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_StratumLevel.h000066400000000000000000000024771333553357400212710ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_StratumLevel_H_ #define _S1AP_StratumLevel_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_StratumLevel */ typedef long S1AP_StratumLevel_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_StratumLevel_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_StratumLevel; asn_struct_free_f S1AP_StratumLevel_free; asn_struct_print_f S1AP_StratumLevel_print; asn_constr_check_f S1AP_StratumLevel_constraint; ber_type_decoder_f S1AP_StratumLevel_decode_ber; der_type_encoder_f S1AP_StratumLevel_encode_der; xer_type_decoder_f S1AP_StratumLevel_decode_xer; xer_type_encoder_f S1AP_StratumLevel_encode_xer; oer_type_decoder_f S1AP_StratumLevel_decode_oer; oer_type_encoder_f S1AP_StratumLevel_encode_oer; per_type_decoder_f S1AP_StratumLevel_decode_uper; per_type_encoder_f S1AP_StratumLevel_encode_uper; per_type_decoder_f S1AP_StratumLevel_decode_aper; per_type_encoder_f S1AP_StratumLevel_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_StratumLevel_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SubscriberProfileIDforRFP.c000066400000000000000000000040621333553357400235450ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_SubscriberProfileIDforRFP.h" int S1AP_SubscriberProfileIDforRFP_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 1 && value <= 256)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_SubscriberProfileIDforRFP_constr_1 CC_NOTUSED = { { 2, 1 } /* (1..256) */, -1}; asn_per_constraints_t asn_PER_type_S1AP_SubscriberProfileIDforRFP_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 8, 8, 1, 256 } /* (1..256) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_SubscriberProfileIDforRFP_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_SubscriberProfileIDforRFP = { "SubscriberProfileIDforRFP", "SubscriberProfileIDforRFP", &asn_OP_NativeInteger, asn_DEF_S1AP_SubscriberProfileIDforRFP_tags_1, sizeof(asn_DEF_S1AP_SubscriberProfileIDforRFP_tags_1) /sizeof(asn_DEF_S1AP_SubscriberProfileIDforRFP_tags_1[0]), /* 1 */ asn_DEF_S1AP_SubscriberProfileIDforRFP_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_SubscriberProfileIDforRFP_tags_1) /sizeof(asn_DEF_S1AP_SubscriberProfileIDforRFP_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_SubscriberProfileIDforRFP_constr_1, &asn_PER_type_S1AP_SubscriberProfileIDforRFP_constr_1, S1AP_SubscriberProfileIDforRFP_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SubscriberProfileIDforRFP.h000066400000000000000000000031031333553357400235450ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_SubscriberProfileIDforRFP_H_ #define _S1AP_SubscriberProfileIDforRFP_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_SubscriberProfileIDforRFP */ typedef long S1AP_SubscriberProfileIDforRFP_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_SubscriberProfileIDforRFP_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_SubscriberProfileIDforRFP; asn_struct_free_f S1AP_SubscriberProfileIDforRFP_free; asn_struct_print_f S1AP_SubscriberProfileIDforRFP_print; asn_constr_check_f S1AP_SubscriberProfileIDforRFP_constraint; ber_type_decoder_f S1AP_SubscriberProfileIDforRFP_decode_ber; der_type_encoder_f S1AP_SubscriberProfileIDforRFP_encode_der; xer_type_decoder_f S1AP_SubscriberProfileIDforRFP_decode_xer; xer_type_encoder_f S1AP_SubscriberProfileIDforRFP_encode_xer; oer_type_decoder_f S1AP_SubscriberProfileIDforRFP_decode_oer; oer_type_encoder_f S1AP_SubscriberProfileIDforRFP_encode_oer; per_type_decoder_f S1AP_SubscriberProfileIDforRFP_decode_uper; per_type_encoder_f S1AP_SubscriberProfileIDforRFP_encode_uper; per_type_decoder_f S1AP_SubscriberProfileIDforRFP_decode_aper; per_type_encoder_f S1AP_SubscriberProfileIDforRFP_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_SubscriberProfileIDforRFP_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SuccessfulOutcome.c000066400000000000000000001277511333553357400223130ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Descriptions" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_SuccessfulOutcome.h" static const long asn_VAL_1_S1AP_id_HandoverPreparation = 0; static const long asn_VAL_1_S1AP_reject = 0; static const long asn_VAL_2_S1AP_id_HandoverResourceAllocation = 1; static const long asn_VAL_2_S1AP_reject = 0; static const long asn_VAL_3_S1AP_id_PathSwitchRequest = 3; static const long asn_VAL_3_S1AP_reject = 0; static const long asn_VAL_4_S1AP_id_E_RABSetup = 5; static const long asn_VAL_4_S1AP_reject = 0; static const long asn_VAL_5_S1AP_id_E_RABModify = 6; static const long asn_VAL_5_S1AP_reject = 0; static const long asn_VAL_6_S1AP_id_E_RABRelease = 7; static const long asn_VAL_6_S1AP_reject = 0; static const long asn_VAL_7_S1AP_id_InitialContextSetup = 9; static const long asn_VAL_7_S1AP_reject = 0; static const long asn_VAL_8_S1AP_id_HandoverCancel = 4; static const long asn_VAL_8_S1AP_reject = 0; static const long asn_VAL_9_S1AP_id_Kill = 43; static const long asn_VAL_9_S1AP_reject = 0; static const long asn_VAL_10_S1AP_id_Reset = 14; static const long asn_VAL_10_S1AP_reject = 0; static const long asn_VAL_11_S1AP_id_S1Setup = 17; static const long asn_VAL_11_S1AP_reject = 0; static const long asn_VAL_12_S1AP_id_UEContextModification = 21; static const long asn_VAL_12_S1AP_reject = 0; static const long asn_VAL_13_S1AP_id_UEContextRelease = 23; static const long asn_VAL_13_S1AP_reject = 0; static const long asn_VAL_14_S1AP_id_ENBConfigurationUpdate = 29; static const long asn_VAL_14_S1AP_reject = 0; static const long asn_VAL_15_S1AP_id_MMEConfigurationUpdate = 30; static const long asn_VAL_15_S1AP_reject = 0; static const long asn_VAL_16_S1AP_id_WriteReplaceWarning = 36; static const long asn_VAL_16_S1AP_reject = 0; static const long asn_VAL_17_S1AP_id_UERadioCapabilityMatch = 48; static const long asn_VAL_17_S1AP_reject = 0; static const long asn_VAL_18_S1AP_id_E_RABModificationIndication = 50; static const long asn_VAL_18_S1AP_reject = 0; static const long asn_VAL_19_S1AP_id_UEContextModificationIndication = 53; static const long asn_VAL_19_S1AP_reject = 0; static const long asn_VAL_20_S1AP_id_UEContextSuspend = 55; static const long asn_VAL_20_S1AP_reject = 0; static const long asn_VAL_21_S1AP_id_UEContextResume = 56; static const long asn_VAL_21_S1AP_reject = 0; static const long asn_VAL_22_S1AP_id_HandoverNotification = 2; static const long asn_VAL_22_S1AP_ignore = 1; static const long asn_VAL_23_S1AP_id_E_RABReleaseIndication = 8; static const long asn_VAL_23_S1AP_ignore = 1; static const long asn_VAL_24_S1AP_id_Paging = 10; static const long asn_VAL_24_S1AP_ignore = 1; static const long asn_VAL_25_S1AP_id_downlinkNASTransport = 11; static const long asn_VAL_25_S1AP_ignore = 1; static const long asn_VAL_26_S1AP_id_initialUEMessage = 12; static const long asn_VAL_26_S1AP_ignore = 1; static const long asn_VAL_27_S1AP_id_uplinkNASTransport = 13; static const long asn_VAL_27_S1AP_ignore = 1; static const long asn_VAL_28_S1AP_id_ErrorIndication = 15; static const long asn_VAL_28_S1AP_ignore = 1; static const long asn_VAL_29_S1AP_id_NASNonDeliveryIndication = 16; static const long asn_VAL_29_S1AP_ignore = 1; static const long asn_VAL_30_S1AP_id_UEContextReleaseRequest = 18; static const long asn_VAL_30_S1AP_ignore = 1; static const long asn_VAL_31_S1AP_id_DownlinkS1cdma2000tunnelling = 19; static const long asn_VAL_31_S1AP_ignore = 1; static const long asn_VAL_32_S1AP_id_UplinkS1cdma2000tunnelling = 20; static const long asn_VAL_32_S1AP_ignore = 1; static const long asn_VAL_33_S1AP_id_UECapabilityInfoIndication = 22; static const long asn_VAL_33_S1AP_ignore = 1; static const long asn_VAL_34_S1AP_id_eNBStatusTransfer = 24; static const long asn_VAL_34_S1AP_ignore = 1; static const long asn_VAL_35_S1AP_id_MMEStatusTransfer = 25; static const long asn_VAL_35_S1AP_ignore = 1; static const long asn_VAL_36_S1AP_id_DeactivateTrace = 26; static const long asn_VAL_36_S1AP_ignore = 1; static const long asn_VAL_37_S1AP_id_TraceStart = 27; static const long asn_VAL_37_S1AP_ignore = 1; static const long asn_VAL_38_S1AP_id_TraceFailureIndication = 28; static const long asn_VAL_38_S1AP_ignore = 1; static const long asn_VAL_39_S1AP_id_CellTrafficTrace = 42; static const long asn_VAL_39_S1AP_ignore = 1; static const long asn_VAL_40_S1AP_id_LocationReportingControl = 31; static const long asn_VAL_40_S1AP_ignore = 1; static const long asn_VAL_41_S1AP_id_LocationReportingFailureIndication = 32; static const long asn_VAL_41_S1AP_ignore = 1; static const long asn_VAL_42_S1AP_id_LocationReport = 33; static const long asn_VAL_42_S1AP_ignore = 1; static const long asn_VAL_43_S1AP_id_OverloadStart = 34; static const long asn_VAL_43_S1AP_ignore = 1; static const long asn_VAL_44_S1AP_id_OverloadStop = 35; static const long asn_VAL_44_S1AP_reject = 0; static const long asn_VAL_45_S1AP_id_eNBDirectInformationTransfer = 37; static const long asn_VAL_45_S1AP_ignore = 1; static const long asn_VAL_46_S1AP_id_MMEDirectInformationTransfer = 38; static const long asn_VAL_46_S1AP_ignore = 1; static const long asn_VAL_47_S1AP_id_eNBConfigurationTransfer = 40; static const long asn_VAL_47_S1AP_ignore = 1; static const long asn_VAL_48_S1AP_id_MMEConfigurationTransfer = 41; static const long asn_VAL_48_S1AP_ignore = 1; static const long asn_VAL_49_S1AP_id_PrivateMessage = 39; static const long asn_VAL_49_S1AP_ignore = 1; static const long asn_VAL_50_S1AP_id_downlinkUEAssociatedLPPaTransport = 44; static const long asn_VAL_50_S1AP_ignore = 1; static const long asn_VAL_51_S1AP_id_uplinkUEAssociatedLPPaTransport = 45; static const long asn_VAL_51_S1AP_ignore = 1; static const long asn_VAL_52_S1AP_id_downlinkNonUEAssociatedLPPaTransport = 46; static const long asn_VAL_52_S1AP_ignore = 1; static const long asn_VAL_53_S1AP_id_uplinkNonUEAssociatedLPPaTransport = 47; static const long asn_VAL_53_S1AP_ignore = 1; static const long asn_VAL_54_S1AP_id_PWSRestartIndication = 49; static const long asn_VAL_54_S1AP_ignore = 1; static const long asn_VAL_55_S1AP_id_RerouteNASRequest = 52; static const long asn_VAL_55_S1AP_reject = 0; static const long asn_VAL_56_S1AP_id_PWSFailureIndication = 51; static const long asn_VAL_56_S1AP_ignore = 1; static const long asn_VAL_57_S1AP_id_ConnectionEstablishmentIndication = 54; static const long asn_VAL_57_S1AP_reject = 0; static const long asn_VAL_58_S1AP_id_NASDeliveryIndication = 57; static const long asn_VAL_58_S1AP_ignore = 1; static const long asn_VAL_59_S1AP_id_RetrieveUEInformation = 58; static const long asn_VAL_59_S1AP_reject = 0; static const long asn_VAL_60_S1AP_id_UEInformationTransfer = 59; static const long asn_VAL_60_S1AP_reject = 0; static const long asn_VAL_61_S1AP_id_eNBCPRelocationIndication = 60; static const long asn_VAL_61_S1AP_reject = 0; static const long asn_VAL_62_S1AP_id_MMECPRelocationIndication = 61; static const long asn_VAL_62_S1AP_reject = 0; static const asn_ioc_cell_t asn_IOS_S1AP_S1AP_ELEMENTARY_PROCEDURES_1_rows[] = { { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_HandoverRequired }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_HandoverCommand }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_HandoverPreparationFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_1_S1AP_id_HandoverPreparation }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_1_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_HandoverRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_HandoverRequestAcknowledge }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_HandoverFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_2_S1AP_id_HandoverResourceAllocation }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_2_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_PathSwitchRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_PathSwitchRequestAcknowledge }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_PathSwitchRequestFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_3_S1AP_id_PathSwitchRequest }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_3_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_E_RABSetupRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_E_RABSetupResponse }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_4_S1AP_id_E_RABSetup }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_4_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_E_RABModifyRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_E_RABModifyResponse }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_5_S1AP_id_E_RABModify }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_5_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_E_RABReleaseCommand }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_E_RABReleaseResponse }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_6_S1AP_id_E_RABRelease }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_6_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_InitialContextSetupRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_InitialContextSetupResponse }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_InitialContextSetupFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_7_S1AP_id_InitialContextSetup }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_7_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_HandoverCancel }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_HandoverCancelAcknowledge }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_8_S1AP_id_HandoverCancel }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_8_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_KillRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_KillResponse }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_9_S1AP_id_Kill }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_9_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_Reset }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_ResetAcknowledge }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_10_S1AP_id_Reset }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_10_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_S1SetupRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_S1SetupResponse }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_S1SetupFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_11_S1AP_id_S1Setup }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_11_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UEContextModificationRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UEContextModificationResponse }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UEContextModificationFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_12_S1AP_id_UEContextModification }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_12_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UEContextReleaseCommand }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UEContextReleaseComplete }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_13_S1AP_id_UEContextRelease }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_13_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_ENBConfigurationUpdate }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_ENBConfigurationUpdateAcknowledge }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_ENBConfigurationUpdateFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_14_S1AP_id_ENBConfigurationUpdate }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_14_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_MMEConfigurationUpdate }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_MMEConfigurationUpdateAcknowledge }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_MMEConfigurationUpdateFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_15_S1AP_id_MMEConfigurationUpdate }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_15_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_WriteReplaceWarningRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_WriteReplaceWarningResponse }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_16_S1AP_id_WriteReplaceWarning }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_16_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UERadioCapabilityMatchRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UERadioCapabilityMatchResponse }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_17_S1AP_id_UERadioCapabilityMatch }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_17_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_E_RABModificationIndication }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_E_RABModificationConfirm }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_18_S1AP_id_E_RABModificationIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_18_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UEContextModificationIndication }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UEContextModificationConfirm }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_19_S1AP_id_UEContextModificationIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_19_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UEContextSuspendRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UEContextSuspendResponse }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_20_S1AP_id_UEContextSuspend }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_20_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UEContextResumeRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UEContextResumeResponse }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UEContextResumeFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_21_S1AP_id_UEContextResume }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_21_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_HandoverNotify }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_22_S1AP_id_HandoverNotification }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_22_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_E_RABReleaseIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_23_S1AP_id_E_RABReleaseIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_23_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_Paging }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_24_S1AP_id_Paging }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_24_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_DownlinkNASTransport }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_25_S1AP_id_downlinkNASTransport }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_25_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_InitialUEMessage }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_26_S1AP_id_initialUEMessage }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_26_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UplinkNASTransport }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_27_S1AP_id_uplinkNASTransport }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_27_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_ErrorIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_28_S1AP_id_ErrorIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_28_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_NASNonDeliveryIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_29_S1AP_id_NASNonDeliveryIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_29_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UEContextReleaseRequest }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_30_S1AP_id_UEContextReleaseRequest }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_30_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_DownlinkS1cdma2000tunnelling }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_31_S1AP_id_DownlinkS1cdma2000tunnelling }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_31_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UplinkS1cdma2000tunnelling }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_32_S1AP_id_UplinkS1cdma2000tunnelling }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_32_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UECapabilityInfoIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_33_S1AP_id_UECapabilityInfoIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_33_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_ENBStatusTransfer }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_34_S1AP_id_eNBStatusTransfer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_34_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_MMEStatusTransfer }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_35_S1AP_id_MMEStatusTransfer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_35_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_DeactivateTrace }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_36_S1AP_id_DeactivateTrace }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_36_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_TraceStart }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_37_S1AP_id_TraceStart }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_37_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_TraceFailureIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_38_S1AP_id_TraceFailureIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_38_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_CellTrafficTrace }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_39_S1AP_id_CellTrafficTrace }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_39_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_LocationReportingControl }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_40_S1AP_id_LocationReportingControl }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_40_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_LocationReportingFailureIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_41_S1AP_id_LocationReportingFailureIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_41_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_LocationReport }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_42_S1AP_id_LocationReport }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_42_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_OverloadStart }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_43_S1AP_id_OverloadStart }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_43_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_OverloadStop }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_44_S1AP_id_OverloadStop }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_44_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_ENBDirectInformationTransfer }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_45_S1AP_id_eNBDirectInformationTransfer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_45_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_MMEDirectInformationTransfer }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_46_S1AP_id_MMEDirectInformationTransfer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_46_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_ENBConfigurationTransfer }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_47_S1AP_id_eNBConfigurationTransfer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_47_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_MMEConfigurationTransfer }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_48_S1AP_id_MMEConfigurationTransfer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_48_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_PrivateMessage }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_49_S1AP_id_PrivateMessage }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_49_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_DownlinkUEAssociatedLPPaTransport }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_50_S1AP_id_downlinkUEAssociatedLPPaTransport }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_50_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UplinkUEAssociatedLPPaTransport }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_51_S1AP_id_uplinkUEAssociatedLPPaTransport }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_51_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_DownlinkNonUEAssociatedLPPaTransport }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_52_S1AP_id_downlinkNonUEAssociatedLPPaTransport }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_52_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UplinkNonUEAssociatedLPPaTransport }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_53_S1AP_id_uplinkNonUEAssociatedLPPaTransport }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_53_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_PWSRestartIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_54_S1AP_id_PWSRestartIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_54_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_RerouteNASRequest }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_55_S1AP_id_RerouteNASRequest }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_55_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_PWSFailureIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_56_S1AP_id_PWSFailureIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_56_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_ConnectionEstablishmentIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_57_S1AP_id_ConnectionEstablishmentIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_57_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_NASDeliveryIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_58_S1AP_id_NASDeliveryIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_58_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_RetrieveUEInformation }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_59_S1AP_id_RetrieveUEInformation }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_59_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UEInformationTransfer }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_60_S1AP_id_UEInformationTransfer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_60_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_ENBCPRelocationIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_61_S1AP_id_eNBCPRelocationIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_61_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_MMECPRelocationIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_62_S1AP_id_MMECPRelocationIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_62_S1AP_reject } }; static const asn_ioc_set_t asn_IOS_S1AP_S1AP_ELEMENTARY_PROCEDURES_1[] = { { 62, 5, asn_IOS_S1AP_S1AP_ELEMENTARY_PROCEDURES_1_rows } }; static int memb_S1AP_procedureCode_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 255)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_SuccessfulOutcome_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_S1AP_ELEMENTARY_PROCEDURES_1; size_t constraining_column = 3; /* &procedureCode */ size_t for_column = 4; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_SuccessfulOutcome, procedureCode)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_SuccessfulOutcome_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_S1AP_ELEMENTARY_PROCEDURES_1; size_t constraining_column = 3; /* &procedureCode */ size_t for_column = 1; /* &SuccessfulOutcome */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_SuccessfulOutcome, procedureCode)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_oer_constraints_t asn_OER_memb_S1AP_procedureCode_constr_2 CC_NOTUSED = { { 1, 1 } /* (0..255) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_procedureCode_constr_2 CC_NOTUSED = { { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_3 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_3 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_4 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_4 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_4[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome__value, choice.HandoverCommand), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_HandoverCommand, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "HandoverCommand" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome__value, choice.HandoverRequestAcknowledge), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_HandoverRequestAcknowledge, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "HandoverRequestAcknowledge" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome__value, choice.PathSwitchRequestAcknowledge), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_PathSwitchRequestAcknowledge, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "PathSwitchRequestAcknowledge" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome__value, choice.E_RABSetupResponse), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABSetupResponse, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABSetupResponse" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome__value, choice.E_RABModifyResponse), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABModifyResponse, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABModifyResponse" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome__value, choice.E_RABReleaseResponse), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABReleaseResponse, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABReleaseResponse" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome__value, choice.InitialContextSetupResponse), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_InitialContextSetupResponse, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "InitialContextSetupResponse" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome__value, choice.HandoverCancelAcknowledge), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_HandoverCancelAcknowledge, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "HandoverCancelAcknowledge" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome__value, choice.KillResponse), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_KillResponse, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "KillResponse" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome__value, choice.ResetAcknowledge), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ResetAcknowledge, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ResetAcknowledge" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome__value, choice.S1SetupResponse), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_S1SetupResponse, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "S1SetupResponse" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome__value, choice.UEContextModificationResponse), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextModificationResponse, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEContextModificationResponse" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome__value, choice.UEContextReleaseComplete), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextReleaseComplete, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEContextReleaseComplete" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome__value, choice.ENBConfigurationUpdateAcknowledge), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ENBConfigurationUpdateAcknowledge, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENBConfigurationUpdateAcknowledge" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome__value, choice.MMEConfigurationUpdateAcknowledge), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_MMEConfigurationUpdateAcknowledge, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MMEConfigurationUpdateAcknowledge" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome__value, choice.WriteReplaceWarningResponse), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_WriteReplaceWarningResponse, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "WriteReplaceWarningResponse" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome__value, choice.UERadioCapabilityMatchResponse), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UERadioCapabilityMatchResponse, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UERadioCapabilityMatchResponse" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome__value, choice.E_RABModificationConfirm), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_E_RABModificationConfirm, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "E-RABModificationConfirm" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome__value, choice.UEContextModificationConfirm), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextModificationConfirm, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEContextModificationConfirm" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome__value, choice.UEContextSuspendResponse), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextSuspendResponse, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEContextSuspendResponse" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome__value, choice.UEContextResumeResponse), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextResumeResponse, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEContextResumeResponse" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_4[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 20 }, /* HandoverCommand */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 19 }, /* HandoverRequestAcknowledge */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 18 }, /* PathSwitchRequestAcknowledge */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -3, 17 }, /* E-RABSetupResponse */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -4, 16 }, /* E-RABModifyResponse */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -5, 15 }, /* E-RABReleaseResponse */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 6, -6, 14 }, /* InitialContextSetupResponse */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 7, -7, 13 }, /* HandoverCancelAcknowledge */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 8, -8, 12 }, /* KillResponse */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 9, -9, 11 }, /* ResetAcknowledge */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 10, -10, 10 }, /* S1SetupResponse */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 11, -11, 9 }, /* UEContextModificationResponse */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 12, -12, 8 }, /* UEContextReleaseComplete */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 13, -13, 7 }, /* ENBConfigurationUpdateAcknowledge */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 14, -14, 6 }, /* MMEConfigurationUpdateAcknowledge */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 15, -15, 5 }, /* WriteReplaceWarningResponse */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 16, -16, 4 }, /* UERadioCapabilityMatchResponse */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 17, -17, 3 }, /* E-RABModificationConfirm */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 18, -18, 2 }, /* UEContextModificationConfirm */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 19, -19, 1 }, /* UEContextSuspendResponse */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 20, -20, 0 } /* UEContextResumeResponse */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_4 = { sizeof(struct S1AP_SuccessfulOutcome__value), offsetof(struct S1AP_SuccessfulOutcome__value, _asn_ctx), offsetof(struct S1AP_SuccessfulOutcome__value, present), sizeof(((struct S1AP_SuccessfulOutcome__value *)0)->present), asn_MAP_S1AP_value_tag2el_4, 21, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_4 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_4, 21, /* Elements count */ &asn_SPC_S1AP_value_specs_4 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_SuccessfulOutcome_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome, procedureCode), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProcedureCode, 0, { &asn_OER_memb_S1AP_procedureCode_constr_2, &asn_PER_memb_S1AP_procedureCode_constr_2, memb_S1AP_procedureCode_constraint_1 }, 0, 0, /* No default value */ "procedureCode" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_SuccessfulOutcome_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_3, &asn_PER_memb_S1AP_criticality_constr_3, memb_S1AP_criticality_constraint_1 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_SuccessfulOutcome, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_4, select_SuccessfulOutcome_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_4, &asn_PER_memb_S1AP_value_constr_4, memb_S1AP_value_constraint_1 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_SuccessfulOutcome_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_SuccessfulOutcome_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* procedureCode */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_SuccessfulOutcome_specs_1 = { sizeof(struct S1AP_SuccessfulOutcome), offsetof(struct S1AP_SuccessfulOutcome, _asn_ctx), asn_MAP_S1AP_SuccessfulOutcome_tag2el_1, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_SuccessfulOutcome = { "SuccessfulOutcome", "SuccessfulOutcome", &asn_OP_SEQUENCE, asn_DEF_S1AP_SuccessfulOutcome_tags_1, sizeof(asn_DEF_S1AP_SuccessfulOutcome_tags_1) /sizeof(asn_DEF_S1AP_SuccessfulOutcome_tags_1[0]), /* 1 */ asn_DEF_S1AP_SuccessfulOutcome_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_SuccessfulOutcome_tags_1) /sizeof(asn_DEF_S1AP_SuccessfulOutcome_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_SuccessfulOutcome_1, 3, /* Elements count */ &asn_SPC_S1AP_SuccessfulOutcome_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SuccessfulOutcome.h000066400000000000000000000173021333553357400223060ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Descriptions" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_SuccessfulOutcome_H_ #define _S1AP_SuccessfulOutcome_H_ #include /* Including external dependencies */ #include "S1AP_ProcedureCode.h" #include "S1AP_Criticality.h" #include #include #include "S1AP_HandoverRequired.h" #include "S1AP_HandoverCommand.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-RABReleaseCommand.h" #include "S1AP_E-RABReleaseResponse.h" #include "S1AP_InitialContextSetupRequest.h" #include "S1AP_InitialContextSetupResponse.h" #include "S1AP_InitialContextSetupFailure.h" #include "S1AP_HandoverCancel.h" #include "S1AP_HandoverCancelAcknowledge.h" #include "S1AP_KillRequest.h" #include "S1AP_KillResponse.h" #include "S1AP_Reset.h" #include "S1AP_ResetAcknowledge.h" #include "S1AP_S1SetupRequest.h" #include "S1AP_S1SetupResponse.h" #include "S1AP_S1SetupFailure.h" #include "S1AP_UEContextModificationRequest.h" #include "S1AP_UEContextModificationResponse.h" #include "S1AP_UEContextModificationFailure.h" #include "S1AP_UEContextReleaseCommand.h" #include "S1AP_UEContextReleaseComplete.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_WriteReplaceWarningRequest.h" #include "S1AP_WriteReplaceWarningResponse.h" #include "S1AP_UERadioCapabilityMatchRequest.h" #include "S1AP_UERadioCapabilityMatchResponse.h" #include "S1AP_E-RABModificationIndication.h" #include "S1AP_E-RABModificationConfirm.h" #include "S1AP_UEContextModificationIndication.h" #include "S1AP_UEContextModificationConfirm.h" #include "S1AP_UEContextSuspendRequest.h" #include "S1AP_UEContextSuspendResponse.h" #include "S1AP_UEContextResumeRequest.h" #include "S1AP_UEContextResumeResponse.h" #include "S1AP_UEContextResumeFailure.h" #include "S1AP_HandoverNotify.h" #include "S1AP_E-RABReleaseIndication.h" #include "S1AP_Paging.h" #include "S1AP_DownlinkNASTransport.h" #include "S1AP_InitialUEMessage.h" #include "S1AP_UplinkNASTransport.h" #include "S1AP_ErrorIndication.h" #include "S1AP_NASNonDeliveryIndication.h" #include "S1AP_UEContextReleaseRequest.h" #include "S1AP_DownlinkS1cdma2000tunnelling.h" #include "S1AP_UplinkS1cdma2000tunnelling.h" #include "S1AP_UECapabilityInfoIndication.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_ENBDirectInformationTransfer.h" #include "S1AP_MMEDirectInformationTransfer.h" #include "S1AP_ENBConfigurationTransfer.h" #include "S1AP_MMEConfigurationTransfer.h" #include "S1AP_PrivateMessage.h" #include "S1AP_DownlinkUEAssociatedLPPaTransport.h" #include "S1AP_UplinkUEAssociatedLPPaTransport.h" #include "S1AP_DownlinkNonUEAssociatedLPPaTransport.h" #include "S1AP_UplinkNonUEAssociatedLPPaTransport.h" #include "S1AP_PWSRestartIndication.h" #include "S1AP_RerouteNASRequest.h" #include "S1AP_PWSFailureIndication.h" #include "S1AP_ConnectionEstablishmentIndication.h" #include "S1AP_NASDeliveryIndication.h" #include "S1AP_RetrieveUEInformation.h" #include "S1AP_UEInformationTransfer.h" #include "S1AP_ENBCPRelocationIndication.h" #include "S1AP_MMECPRelocationIndication.h" #include #include #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_SuccessfulOutcome__value_PR { S1AP_SuccessfulOutcome__value_PR_NOTHING, /* No components present */ S1AP_SuccessfulOutcome__value_PR_HandoverCommand, S1AP_SuccessfulOutcome__value_PR_HandoverRequestAcknowledge, S1AP_SuccessfulOutcome__value_PR_PathSwitchRequestAcknowledge, S1AP_SuccessfulOutcome__value_PR_E_RABSetupResponse, S1AP_SuccessfulOutcome__value_PR_E_RABModifyResponse, S1AP_SuccessfulOutcome__value_PR_E_RABReleaseResponse, S1AP_SuccessfulOutcome__value_PR_InitialContextSetupResponse, S1AP_SuccessfulOutcome__value_PR_HandoverCancelAcknowledge, S1AP_SuccessfulOutcome__value_PR_KillResponse, S1AP_SuccessfulOutcome__value_PR_ResetAcknowledge, S1AP_SuccessfulOutcome__value_PR_S1SetupResponse, S1AP_SuccessfulOutcome__value_PR_UEContextModificationResponse, S1AP_SuccessfulOutcome__value_PR_UEContextReleaseComplete, S1AP_SuccessfulOutcome__value_PR_ENBConfigurationUpdateAcknowledge, S1AP_SuccessfulOutcome__value_PR_MMEConfigurationUpdateAcknowledge, S1AP_SuccessfulOutcome__value_PR_WriteReplaceWarningResponse, S1AP_SuccessfulOutcome__value_PR_UERadioCapabilityMatchResponse, S1AP_SuccessfulOutcome__value_PR_E_RABModificationConfirm, S1AP_SuccessfulOutcome__value_PR_UEContextModificationConfirm, S1AP_SuccessfulOutcome__value_PR_UEContextSuspendResponse, S1AP_SuccessfulOutcome__value_PR_UEContextResumeResponse } S1AP_SuccessfulOutcome__value_PR; /* S1AP_SuccessfulOutcome */ typedef struct S1AP_SuccessfulOutcome { S1AP_ProcedureCode_t procedureCode; S1AP_Criticality_t criticality; struct S1AP_SuccessfulOutcome__value { S1AP_SuccessfulOutcome__value_PR present; union S1AP_SuccessfulOutcome__S1AP_value_u { S1AP_HandoverCommand_t HandoverCommand; S1AP_HandoverRequestAcknowledge_t HandoverRequestAcknowledge; S1AP_PathSwitchRequestAcknowledge_t PathSwitchRequestAcknowledge; S1AP_E_RABSetupResponse_t E_RABSetupResponse; S1AP_E_RABModifyResponse_t E_RABModifyResponse; S1AP_E_RABReleaseResponse_t E_RABReleaseResponse; S1AP_InitialContextSetupResponse_t InitialContextSetupResponse; S1AP_HandoverCancelAcknowledge_t HandoverCancelAcknowledge; S1AP_KillResponse_t KillResponse; S1AP_ResetAcknowledge_t ResetAcknowledge; S1AP_S1SetupResponse_t S1SetupResponse; S1AP_UEContextModificationResponse_t UEContextModificationResponse; S1AP_UEContextReleaseComplete_t UEContextReleaseComplete; S1AP_ENBConfigurationUpdateAcknowledge_t ENBConfigurationUpdateAcknowledge; S1AP_MMEConfigurationUpdateAcknowledge_t MMEConfigurationUpdateAcknowledge; S1AP_WriteReplaceWarningResponse_t WriteReplaceWarningResponse; S1AP_UERadioCapabilityMatchResponse_t UERadioCapabilityMatchResponse; S1AP_E_RABModificationConfirm_t E_RABModificationConfirm; S1AP_UEContextModificationConfirm_t UEContextModificationConfirm; S1AP_UEContextSuspendResponse_t UEContextSuspendResponse; S1AP_UEContextResumeResponse_t UEContextResumeResponse; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_SuccessfulOutcome_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_SuccessfulOutcome; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_SuccessfulOutcome_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_SuccessfulOutcome_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_SuccessfulOutcome_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SupportedTAs-Item.c000066400000000000000000000047761333553357400221320ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_SupportedTAs-Item.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_SupportedTAs_Item_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_SupportedTAs_Item, tAC), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TAC, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "tAC" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_SupportedTAs_Item, broadcastPLMNs), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_BPLMNs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "broadcastPLMNs" }, { ATF_POINTER, 1, offsetof(struct S1AP_SupportedTAs_Item, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P94, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_SupportedTAs_Item_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_SupportedTAs_Item_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_SupportedTAs_Item_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* tAC */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* broadcastPLMNs */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_SupportedTAs_Item_specs_1 = { sizeof(struct S1AP_SupportedTAs_Item), offsetof(struct S1AP_SupportedTAs_Item, _asn_ctx), asn_MAP_S1AP_SupportedTAs_Item_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_SupportedTAs_Item_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_SupportedTAs_Item = { "SupportedTAs-Item", "SupportedTAs-Item", &asn_OP_SEQUENCE, asn_DEF_S1AP_SupportedTAs_Item_tags_1, sizeof(asn_DEF_S1AP_SupportedTAs_Item_tags_1) /sizeof(asn_DEF_S1AP_SupportedTAs_Item_tags_1[0]), /* 1 */ asn_DEF_S1AP_SupportedTAs_Item_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_SupportedTAs_Item_tags_1) /sizeof(asn_DEF_S1AP_SupportedTAs_Item_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_SupportedTAs_Item_1, 3, /* Elements count */ &asn_SPC_S1AP_SupportedTAs_Item_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SupportedTAs-Item.h000066400000000000000000000023151333553357400221220ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_SupportedTAs_Item_H_ #define _S1AP_SupportedTAs_Item_H_ #include /* Including external dependencies */ #include "S1AP_TAC.h" #include "S1AP_BPLMNs.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_SupportedTAs-Item */ typedef struct S1AP_SupportedTAs_Item { S1AP_TAC_t tAC; S1AP_BPLMNs_t broadcastPLMNs; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_SupportedTAs_Item_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_SupportedTAs_Item; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_SupportedTAs_Item_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_SupportedTAs_Item_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_SupportedTAs_Item_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SupportedTAs.c000066400000000000000000000033701333553357400212230ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_SupportedTAs.h" #include "S1AP_SupportedTAs-Item.h" static asn_oer_constraints_t asn_OER_type_S1AP_SupportedTAs_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_SupportedTAs_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_SupportedTAs_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_SupportedTAs_Item, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_SupportedTAs_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_S1AP_SupportedTAs_specs_1 = { sizeof(struct S1AP_SupportedTAs), offsetof(struct S1AP_SupportedTAs, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_SupportedTAs = { "SupportedTAs", "SupportedTAs", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_SupportedTAs_tags_1, sizeof(asn_DEF_S1AP_SupportedTAs_tags_1) /sizeof(asn_DEF_S1AP_SupportedTAs_tags_1[0]), /* 1 */ asn_DEF_S1AP_SupportedTAs_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_SupportedTAs_tags_1) /sizeof(asn_DEF_S1AP_SupportedTAs_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_SupportedTAs_constr_1, &asn_PER_type_S1AP_SupportedTAs_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_SupportedTAs_1, 1, /* Single element */ &asn_SPC_S1AP_SupportedTAs_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SupportedTAs.h000066400000000000000000000015761333553357400212360ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_SupportedTAs_H_ #define _S1AP_SupportedTAs_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_SupportedTAs_Item; /* S1AP_SupportedTAs */ typedef struct S1AP_SupportedTAs { A_SEQUENCE_OF(struct S1AP_SupportedTAs_Item) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_SupportedTAs_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_SupportedTAs; #ifdef __cplusplus } #endif #endif /* _S1AP_SupportedTAs_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SynchronisationInformation.c000066400000000000000000000063731333553357400242340ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_SynchronisationInformation.h" #include "S1AP_ListeningSubframePattern.h" #include "S1AP_ECGI-List.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_SynchronisationInformation_1[] = { { ATF_POINTER, 4, offsetof(struct S1AP_SynchronisationInformation, sourceStratumLevel), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_StratumLevel, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "sourceStratumLevel" }, { ATF_POINTER, 3, offsetof(struct S1AP_SynchronisationInformation, listeningSubframePattern), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ListeningSubframePattern, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "listeningSubframePattern" }, { ATF_POINTER, 2, offsetof(struct S1AP_SynchronisationInformation, aggressoreCGI_List), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ECGI_List, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "aggressoreCGI-List" }, { ATF_POINTER, 1, offsetof(struct S1AP_SynchronisationInformation, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P90, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_SynchronisationInformation_oms_1[] = { 0, 1, 2, 3 }; static const ber_tlv_tag_t asn_DEF_S1AP_SynchronisationInformation_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_SynchronisationInformation_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* sourceStratumLevel */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* listeningSubframePattern */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* aggressoreCGI-List */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_SynchronisationInformation_specs_1 = { sizeof(struct S1AP_SynchronisationInformation), offsetof(struct S1AP_SynchronisationInformation, _asn_ctx), asn_MAP_S1AP_SynchronisationInformation_tag2el_1, 4, /* Count of tags in the map */ asn_MAP_S1AP_SynchronisationInformation_oms_1, /* Optional members */ 4, 0, /* Root/Additions */ 4, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_SynchronisationInformation = { "SynchronisationInformation", "SynchronisationInformation", &asn_OP_SEQUENCE, asn_DEF_S1AP_SynchronisationInformation_tags_1, sizeof(asn_DEF_S1AP_SynchronisationInformation_tags_1) /sizeof(asn_DEF_S1AP_SynchronisationInformation_tags_1[0]), /* 1 */ asn_DEF_S1AP_SynchronisationInformation_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_SynchronisationInformation_tags_1) /sizeof(asn_DEF_S1AP_SynchronisationInformation_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_SynchronisationInformation_1, 4, /* Elements count */ &asn_SPC_S1AP_SynchronisationInformation_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SynchronisationInformation.h000066400000000000000000000025051333553357400242320ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_SynchronisationInformation_H_ #define _S1AP_SynchronisationInformation_H_ #include /* Including external dependencies */ #include "S1AP_StratumLevel.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ListeningSubframePattern; struct S1AP_ECGI_List; struct S1AP_ProtocolExtensionContainer; /* S1AP_SynchronisationInformation */ typedef struct S1AP_SynchronisationInformation { S1AP_StratumLevel_t *sourceStratumLevel; /* OPTIONAL */ struct S1AP_ListeningSubframePattern *listeningSubframePattern; /* OPTIONAL */ struct S1AP_ECGI_List *aggressoreCGI_List; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_SynchronisationInformation_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_SynchronisationInformation; #ifdef __cplusplus } #endif #endif /* _S1AP_SynchronisationInformation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SynchronisationStatus.c000066400000000000000000000043241333553357400232240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_SynchronisationStatus.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_SynchronisationStatus_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_SynchronisationStatus_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_SynchronisationStatus_value2enum_1[] = { { 0, 11, "synchronous" }, { 1, 12, "asynchronous" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_SynchronisationStatus_enum2value_1[] = { 1, /* asynchronous(1) */ 0 /* synchronous(0) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_SynchronisationStatus_specs_1 = { asn_MAP_S1AP_SynchronisationStatus_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_SynchronisationStatus_enum2value_1, /* N => "tag"; sorted by N */ 2, /* Number of elements in the maps */ 3, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_SynchronisationStatus_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_SynchronisationStatus = { "SynchronisationStatus", "SynchronisationStatus", &asn_OP_NativeEnumerated, asn_DEF_S1AP_SynchronisationStatus_tags_1, sizeof(asn_DEF_S1AP_SynchronisationStatus_tags_1) /sizeof(asn_DEF_S1AP_SynchronisationStatus_tags_1[0]), /* 1 */ asn_DEF_S1AP_SynchronisationStatus_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_SynchronisationStatus_tags_1) /sizeof(asn_DEF_S1AP_SynchronisationStatus_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_SynchronisationStatus_constr_1, &asn_PER_type_S1AP_SynchronisationStatus_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_SynchronisationStatus_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_SynchronisationStatus.h000066400000000000000000000033401333553357400232260ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_SynchronisationStatus_H_ #define _S1AP_SynchronisationStatus_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_SynchronisationStatus { S1AP_SynchronisationStatus_synchronous = 0, S1AP_SynchronisationStatus_asynchronous = 1 /* * Enumeration is extensible */ } e_S1AP_SynchronisationStatus; /* S1AP_SynchronisationStatus */ typedef long S1AP_SynchronisationStatus_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_SynchronisationStatus_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_SynchronisationStatus; extern const asn_INTEGER_specifics_t asn_SPC_SynchronisationStatus_specs_1; asn_struct_free_f SynchronisationStatus_free; asn_struct_print_f SynchronisationStatus_print; asn_constr_check_f SynchronisationStatus_constraint; ber_type_decoder_f SynchronisationStatus_decode_ber; der_type_encoder_f SynchronisationStatus_encode_der; xer_type_decoder_f SynchronisationStatus_decode_xer; xer_type_encoder_f SynchronisationStatus_encode_xer; oer_type_decoder_f SynchronisationStatus_decode_oer; oer_type_encoder_f SynchronisationStatus_encode_oer; per_type_decoder_f SynchronisationStatus_decode_uper; per_type_encoder_f SynchronisationStatus_encode_uper; per_type_decoder_f SynchronisationStatus_decode_aper; per_type_encoder_f SynchronisationStatus_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_SynchronisationStatus_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TABasedMDT.c000066400000000000000000000040711333553357400204350ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TABasedMDT.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_TABasedMDT_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TABasedMDT, tAListforMDT), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TAListforMDT, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "tAListforMDT" }, { ATF_POINTER, 1, offsetof(struct S1AP_TABasedMDT, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P101, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_TABasedMDT_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_TABasedMDT_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TABasedMDT_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* tAListforMDT */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_TABasedMDT_specs_1 = { sizeof(struct S1AP_TABasedMDT), offsetof(struct S1AP_TABasedMDT, _asn_ctx), asn_MAP_S1AP_TABasedMDT_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_TABasedMDT_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TABasedMDT = { "TABasedMDT", "TABasedMDT", &asn_OP_SEQUENCE, asn_DEF_S1AP_TABasedMDT_tags_1, sizeof(asn_DEF_S1AP_TABasedMDT_tags_1) /sizeof(asn_DEF_S1AP_TABasedMDT_tags_1[0]), /* 1 */ asn_DEF_S1AP_TABasedMDT_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TABasedMDT_tags_1) /sizeof(asn_DEF_S1AP_TABasedMDT_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TABasedMDT_1, 2, /* Elements count */ &asn_SPC_S1AP_TABasedMDT_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TABasedMDT.h000066400000000000000000000021601333553357400204370ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TABasedMDT_H_ #define _S1AP_TABasedMDT_H_ #include /* Including external dependencies */ #include "S1AP_TAListforMDT.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_TABasedMDT */ typedef struct S1AP_TABasedMDT { S1AP_TAListforMDT_t tAListforMDT; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TABasedMDT_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TABasedMDT; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_TABasedMDT_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_TABasedMDT_1[2]; #ifdef __cplusplus } #endif #endif /* _S1AP_TABasedMDT_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAC.c000066400000000000000000000033731333553357400172400ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TAC.h" int S1AP_TAC_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } size = st->size; if((size == 2)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_TAC_constr_1 CC_NOTUSED = { { 0, 0 }, 2 /* (SIZE(2..2)) */}; asn_per_constraints_t asn_PER_type_S1AP_TAC_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 2, 2 } /* (SIZE(2..2)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_TAC_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_TAC = { "TAC", "TAC", &asn_OP_OCTET_STRING, asn_DEF_S1AP_TAC_tags_1, sizeof(asn_DEF_S1AP_TAC_tags_1) /sizeof(asn_DEF_S1AP_TAC_tags_1[0]), /* 1 */ asn_DEF_S1AP_TAC_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TAC_tags_1) /sizeof(asn_DEF_S1AP_TAC_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_TAC_constr_1, &asn_PER_type_S1AP_TAC_constr_1, S1AP_TAC_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAC.h000066400000000000000000000022241333553357400172370ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TAC_H_ #define _S1AP_TAC_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_TAC */ typedef OCTET_STRING_t S1AP_TAC_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_TAC_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_TAC; asn_struct_free_f S1AP_TAC_free; asn_struct_print_f S1AP_TAC_print; asn_constr_check_f S1AP_TAC_constraint; ber_type_decoder_f S1AP_TAC_decode_ber; der_type_encoder_f S1AP_TAC_encode_der; xer_type_decoder_f S1AP_TAC_decode_xer; xer_type_encoder_f S1AP_TAC_encode_xer; oer_type_decoder_f S1AP_TAC_decode_oer; oer_type_encoder_f S1AP_TAC_encode_oer; per_type_decoder_f S1AP_TAC_decode_uper; per_type_encoder_f S1AP_TAC_encode_uper; per_type_decoder_f S1AP_TAC_decode_aper; per_type_encoder_f S1AP_TAC_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_TAC_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAI-Broadcast-Item.c000066400000000000000000000050561333553357400220420ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TAI-Broadcast-Item.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_TAI_Broadcast_Item_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TAI_Broadcast_Item, tAI), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "tAI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TAI_Broadcast_Item, completedCellinTAI), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CompletedCellinTAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "completedCellinTAI" }, { ATF_POINTER, 1, offsetof(struct S1AP_TAI_Broadcast_Item, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P99, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_TAI_Broadcast_Item_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_TAI_Broadcast_Item_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TAI_Broadcast_Item_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* tAI */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* completedCellinTAI */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_TAI_Broadcast_Item_specs_1 = { sizeof(struct S1AP_TAI_Broadcast_Item), offsetof(struct S1AP_TAI_Broadcast_Item, _asn_ctx), asn_MAP_S1AP_TAI_Broadcast_Item_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_TAI_Broadcast_Item_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TAI_Broadcast_Item = { "TAI-Broadcast-Item", "TAI-Broadcast-Item", &asn_OP_SEQUENCE, asn_DEF_S1AP_TAI_Broadcast_Item_tags_1, sizeof(asn_DEF_S1AP_TAI_Broadcast_Item_tags_1) /sizeof(asn_DEF_S1AP_TAI_Broadcast_Item_tags_1[0]), /* 1 */ asn_DEF_S1AP_TAI_Broadcast_Item_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TAI_Broadcast_Item_tags_1) /sizeof(asn_DEF_S1AP_TAI_Broadcast_Item_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TAI_Broadcast_Item_1, 3, /* Elements count */ &asn_SPC_S1AP_TAI_Broadcast_Item_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAI-Broadcast-Item.h000066400000000000000000000023621333553357400220440ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TAI_Broadcast_Item_H_ #define _S1AP_TAI_Broadcast_Item_H_ #include /* Including external dependencies */ #include "S1AP_TAI.h" #include "S1AP_CompletedCellinTAI.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_TAI-Broadcast-Item */ typedef struct S1AP_TAI_Broadcast_Item { S1AP_TAI_t tAI; S1AP_CompletedCellinTAI_t completedCellinTAI; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TAI_Broadcast_Item_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TAI_Broadcast_Item; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_TAI_Broadcast_Item_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_TAI_Broadcast_Item_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_TAI_Broadcast_Item_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAI-Broadcast.c000066400000000000000000000034021333553357400211370ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TAI-Broadcast.h" #include "S1AP_TAI-Broadcast-Item.h" static asn_oer_constraints_t asn_OER_type_S1AP_TAI_Broadcast_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_TAI_Broadcast_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_TAI_Broadcast_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TAI_Broadcast_Item, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TAI_Broadcast_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_TAI_Broadcast_specs_1 = { sizeof(struct S1AP_TAI_Broadcast), offsetof(struct S1AP_TAI_Broadcast, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TAI_Broadcast = { "TAI-Broadcast", "TAI-Broadcast", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_TAI_Broadcast_tags_1, sizeof(asn_DEF_S1AP_TAI_Broadcast_tags_1) /sizeof(asn_DEF_S1AP_TAI_Broadcast_tags_1[0]), /* 1 */ asn_DEF_S1AP_TAI_Broadcast_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TAI_Broadcast_tags_1) /sizeof(asn_DEF_S1AP_TAI_Broadcast_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_TAI_Broadcast_constr_1, &asn_PER_type_S1AP_TAI_Broadcast_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_TAI_Broadcast_1, 1, /* Single element */ &asn_SPC_S1AP_TAI_Broadcast_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAI-Broadcast.h000066400000000000000000000021121333553357400211410ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TAI_Broadcast_H_ #define _S1AP_TAI_Broadcast_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_TAI_Broadcast_Item; /* S1AP_TAI-Broadcast */ typedef struct S1AP_TAI_Broadcast { A_SEQUENCE_OF(struct S1AP_TAI_Broadcast_Item) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TAI_Broadcast_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TAI_Broadcast; extern asn_SET_OF_specifics_t asn_SPC_S1AP_TAI_Broadcast_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_TAI_Broadcast_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_TAI_Broadcast_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_TAI_Broadcast_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAI-Cancelled-Item.c000066400000000000000000000050571333553357400220130ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TAI-Cancelled-Item.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_TAI_Cancelled_Item_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TAI_Cancelled_Item, tAI), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "tAI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TAI_Cancelled_Item, cancelledCellinTAI), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CancelledCellinTAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cancelledCellinTAI" }, { ATF_POINTER, 1, offsetof(struct S1AP_TAI_Cancelled_Item, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P100, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_TAI_Cancelled_Item_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_TAI_Cancelled_Item_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TAI_Cancelled_Item_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* tAI */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* cancelledCellinTAI */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_TAI_Cancelled_Item_specs_1 = { sizeof(struct S1AP_TAI_Cancelled_Item), offsetof(struct S1AP_TAI_Cancelled_Item, _asn_ctx), asn_MAP_S1AP_TAI_Cancelled_Item_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_TAI_Cancelled_Item_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TAI_Cancelled_Item = { "TAI-Cancelled-Item", "TAI-Cancelled-Item", &asn_OP_SEQUENCE, asn_DEF_S1AP_TAI_Cancelled_Item_tags_1, sizeof(asn_DEF_S1AP_TAI_Cancelled_Item_tags_1) /sizeof(asn_DEF_S1AP_TAI_Cancelled_Item_tags_1[0]), /* 1 */ asn_DEF_S1AP_TAI_Cancelled_Item_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TAI_Cancelled_Item_tags_1) /sizeof(asn_DEF_S1AP_TAI_Cancelled_Item_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TAI_Cancelled_Item_1, 3, /* Elements count */ &asn_SPC_S1AP_TAI_Cancelled_Item_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAI-Cancelled-Item.h000066400000000000000000000023621333553357400220140ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TAI_Cancelled_Item_H_ #define _S1AP_TAI_Cancelled_Item_H_ #include /* Including external dependencies */ #include "S1AP_TAI.h" #include "S1AP_CancelledCellinTAI.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_TAI-Cancelled-Item */ typedef struct S1AP_TAI_Cancelled_Item { S1AP_TAI_t tAI; S1AP_CancelledCellinTAI_t cancelledCellinTAI; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TAI_Cancelled_Item_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TAI_Cancelled_Item; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_TAI_Cancelled_Item_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_TAI_Cancelled_Item_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_TAI_Cancelled_Item_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAI-Cancelled.c000066400000000000000000000034021333553357400211070ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TAI-Cancelled.h" #include "S1AP_TAI-Cancelled-Item.h" static asn_oer_constraints_t asn_OER_type_S1AP_TAI_Cancelled_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_TAI_Cancelled_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_TAI_Cancelled_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TAI_Cancelled_Item, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TAI_Cancelled_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_TAI_Cancelled_specs_1 = { sizeof(struct S1AP_TAI_Cancelled), offsetof(struct S1AP_TAI_Cancelled, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TAI_Cancelled = { "TAI-Cancelled", "TAI-Cancelled", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_TAI_Cancelled_tags_1, sizeof(asn_DEF_S1AP_TAI_Cancelled_tags_1) /sizeof(asn_DEF_S1AP_TAI_Cancelled_tags_1[0]), /* 1 */ asn_DEF_S1AP_TAI_Cancelled_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TAI_Cancelled_tags_1) /sizeof(asn_DEF_S1AP_TAI_Cancelled_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_TAI_Cancelled_constr_1, &asn_PER_type_S1AP_TAI_Cancelled_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_TAI_Cancelled_1, 1, /* Single element */ &asn_SPC_S1AP_TAI_Cancelled_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAI-Cancelled.h000066400000000000000000000021121333553357400211110ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TAI_Cancelled_H_ #define _S1AP_TAI_Cancelled_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_TAI_Cancelled_Item; /* S1AP_TAI-Cancelled */ typedef struct S1AP_TAI_Cancelled { A_SEQUENCE_OF(struct S1AP_TAI_Cancelled_Item) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TAI_Cancelled_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TAI_Cancelled; extern asn_SET_OF_specifics_t asn_SPC_S1AP_TAI_Cancelled_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_TAI_Cancelled_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_TAI_Cancelled_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_TAI_Cancelled_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAI.c000066400000000000000000000042561333553357400172470ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TAI.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_TAI_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TAI, pLMNidentity), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_PLMNidentity, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "pLMNidentity" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TAI, tAC), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TAC, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "tAC" }, { ATF_POINTER, 1, offsetof(struct S1AP_TAI, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P98, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_TAI_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_TAI_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TAI_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* pLMNidentity */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* tAC */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_TAI_specs_1 = { sizeof(struct S1AP_TAI), offsetof(struct S1AP_TAI, _asn_ctx), asn_MAP_S1AP_TAI_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_TAI_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TAI = { "TAI", "TAI", &asn_OP_SEQUENCE, asn_DEF_S1AP_TAI_tags_1, sizeof(asn_DEF_S1AP_TAI_tags_1) /sizeof(asn_DEF_S1AP_TAI_tags_1[0]), /* 1 */ asn_DEF_S1AP_TAI_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TAI_tags_1) /sizeof(asn_DEF_S1AP_TAI_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TAI_1, 3, /* Elements count */ &asn_SPC_S1AP_TAI_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAI.h000066400000000000000000000021311333553357400172420ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TAI_H_ #define _S1AP_TAI_H_ #include /* Including external dependencies */ #include "S1AP_PLMNidentity.h" #include "S1AP_TAC.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_TAI */ typedef struct S1AP_TAI { S1AP_PLMNidentity_t pLMNidentity; S1AP_TAC_t tAC; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TAI_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TAI; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_TAI_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_TAI_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_TAI_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAIBasedMDT.c000066400000000000000000000041231333553357400205440ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TAIBasedMDT.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_TAIBasedMDT_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TAIBasedMDT, tAIListforMDT), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TAIListforMDT, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "tAIListforMDT" }, { ATF_POINTER, 1, offsetof(struct S1AP_TAIBasedMDT, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P97, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_TAIBasedMDT_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_TAIBasedMDT_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TAIBasedMDT_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* tAIListforMDT */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_TAIBasedMDT_specs_1 = { sizeof(struct S1AP_TAIBasedMDT), offsetof(struct S1AP_TAIBasedMDT, _asn_ctx), asn_MAP_S1AP_TAIBasedMDT_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_TAIBasedMDT_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TAIBasedMDT = { "TAIBasedMDT", "TAIBasedMDT", &asn_OP_SEQUENCE, asn_DEF_S1AP_TAIBasedMDT_tags_1, sizeof(asn_DEF_S1AP_TAIBasedMDT_tags_1) /sizeof(asn_DEF_S1AP_TAIBasedMDT_tags_1[0]), /* 1 */ asn_DEF_S1AP_TAIBasedMDT_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TAIBasedMDT_tags_1) /sizeof(asn_DEF_S1AP_TAIBasedMDT_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TAIBasedMDT_1, 2, /* Elements count */ &asn_SPC_S1AP_TAIBasedMDT_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAIBasedMDT.h000066400000000000000000000021741333553357400205550ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TAIBasedMDT_H_ #define _S1AP_TAIBasedMDT_H_ #include /* Including external dependencies */ #include "S1AP_TAIListforMDT.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_TAIBasedMDT */ typedef struct S1AP_TAIBasedMDT { S1AP_TAIListforMDT_t tAIListforMDT; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TAIBasedMDT_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TAIBasedMDT; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_TAIBasedMDT_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_TAIBasedMDT_1[2]; #ifdef __cplusplus } #endif #endif /* _S1AP_TAIBasedMDT_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAIItem.c000066400000000000000000000037461333553357400200710ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TAIItem.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_TAIItem_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TAIItem, tAI), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "tAI" }, { ATF_POINTER, 1, offsetof(struct S1AP_TAIItem, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P13, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_TAIItem_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_TAIItem_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TAIItem_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* tAI */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_TAIItem_specs_1 = { sizeof(struct S1AP_TAIItem), offsetof(struct S1AP_TAIItem, _asn_ctx), asn_MAP_S1AP_TAIItem_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_TAIItem_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TAIItem = { "TAIItem", "TAIItem", &asn_OP_SEQUENCE, asn_DEF_S1AP_TAIItem_tags_1, sizeof(asn_DEF_S1AP_TAIItem_tags_1) /sizeof(asn_DEF_S1AP_TAIItem_tags_1[0]), /* 1 */ asn_DEF_S1AP_TAIItem_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TAIItem_tags_1) /sizeof(asn_DEF_S1AP_TAIItem_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TAIItem_1, 2, /* Elements count */ &asn_SPC_S1AP_TAIItem_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAIItem.h000066400000000000000000000017211333553357400200650ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TAIItem_H_ #define _S1AP_TAIItem_H_ #include /* Including external dependencies */ #include "S1AP_TAI.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_TAIItem */ typedef struct S1AP_TAIItem { S1AP_TAI_t tAI; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TAIItem_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TAIItem; #ifdef __cplusplus } #endif #endif /* _S1AP_TAIItem_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAIList.c000066400000000000000000000032611333553357400200760ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TAIList.h" #include "S1AP_ProtocolIE-SingleContainer.h" static asn_oer_constraints_t asn_OER_type_S1AP_TAIList_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_TAIList_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_TAIList_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P7, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TAIList_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_S1AP_TAIList_specs_1 = { sizeof(struct S1AP_TAIList), offsetof(struct S1AP_TAIList, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TAIList = { "TAIList", "TAIList", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_TAIList_tags_1, sizeof(asn_DEF_S1AP_TAIList_tags_1) /sizeof(asn_DEF_S1AP_TAIList_tags_1[0]), /* 1 */ asn_DEF_S1AP_TAIList_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TAIList_tags_1) /sizeof(asn_DEF_S1AP_TAIList_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_TAIList_constr_1, &asn_PER_type_S1AP_TAIList_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_TAIList_1, 1, /* Single element */ &asn_SPC_S1AP_TAIList_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAIList.h000066400000000000000000000015661333553357400201110ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TAIList_H_ #define _S1AP_TAIList_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolIE_SingleContainer; /* S1AP_TAIList */ typedef struct S1AP_TAIList { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TAIList_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TAIList; #ifdef __cplusplus } #endif #endif /* _S1AP_TAIList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAIListForRestart.c000066400000000000000000000035121333553357400221110ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TAIListForRestart.h" #include "S1AP_TAI.h" static asn_oer_constraints_t asn_OER_type_S1AP_TAIListForRestart_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..2048)) */}; static asn_per_constraints_t asn_PER_type_S1AP_TAIListForRestart_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 11, 11, 1, 2048 } /* (SIZE(1..2048)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_TAIListForRestart_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TAIListForRestart_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_S1AP_TAIListForRestart_specs_1 = { sizeof(struct S1AP_TAIListForRestart), offsetof(struct S1AP_TAIListForRestart, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TAIListForRestart = { "TAIListForRestart", "TAIListForRestart", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_TAIListForRestart_tags_1, sizeof(asn_DEF_S1AP_TAIListForRestart_tags_1) /sizeof(asn_DEF_S1AP_TAIListForRestart_tags_1[0]), /* 1 */ asn_DEF_S1AP_TAIListForRestart_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TAIListForRestart_tags_1) /sizeof(asn_DEF_S1AP_TAIListForRestart_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_TAIListForRestart_constr_1, &asn_PER_type_S1AP_TAIListForRestart_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_TAIListForRestart_1, 1, /* Single element */ &asn_SPC_S1AP_TAIListForRestart_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAIListForRestart.h000066400000000000000000000016051333553357400221170ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TAIListForRestart_H_ #define _S1AP_TAIListForRestart_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_TAI; /* S1AP_TAIListForRestart */ typedef struct S1AP_TAIListForRestart { A_SEQUENCE_OF(struct S1AP_TAI) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TAIListForRestart_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TAIListForRestart; #ifdef __cplusplus } #endif #endif /* _S1AP_TAIListForRestart_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAIListforMDT.c000066400000000000000000000033261333553357400211540ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TAIListforMDT.h" #include "S1AP_TAI.h" static asn_oer_constraints_t asn_OER_type_S1AP_TAIListforMDT_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..8)) */}; asn_per_constraints_t asn_PER_type_S1AP_TAIListforMDT_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 3, 3, 1, 8 } /* (SIZE(1..8)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_TAIListforMDT_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TAIListforMDT_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_TAIListforMDT_specs_1 = { sizeof(struct S1AP_TAIListforMDT), offsetof(struct S1AP_TAIListforMDT, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TAIListforMDT = { "TAIListforMDT", "TAIListforMDT", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_TAIListforMDT_tags_1, sizeof(asn_DEF_S1AP_TAIListforMDT_tags_1) /sizeof(asn_DEF_S1AP_TAIListforMDT_tags_1[0]), /* 1 */ asn_DEF_S1AP_TAIListforMDT_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TAIListforMDT_tags_1) /sizeof(asn_DEF_S1AP_TAIListforMDT_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_TAIListforMDT_constr_1, &asn_PER_type_S1AP_TAIListforMDT_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_TAIListforMDT_1, 1, /* Single element */ &asn_SPC_S1AP_TAIListforMDT_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAIListforMDT.h000066400000000000000000000020541333553357400211560ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TAIListforMDT_H_ #define _S1AP_TAIListforMDT_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_TAI; /* S1AP_TAIListforMDT */ typedef struct S1AP_TAIListforMDT { A_SEQUENCE_OF(struct S1AP_TAI) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TAIListforMDT_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TAIListforMDT; extern asn_SET_OF_specifics_t asn_SPC_S1AP_TAIListforMDT_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_TAIListforMDT_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_TAIListforMDT_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_TAIListforMDT_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAIListforWarning.c000066400000000000000000000034701333553357400221350ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TAIListforWarning.h" #include "S1AP_TAI.h" static asn_oer_constraints_t asn_OER_type_S1AP_TAIListforWarning_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..65535)) */}; asn_per_constraints_t asn_PER_type_S1AP_TAIListforWarning_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 16, 16, 1, 65535 } /* (SIZE(1..65535)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_TAIListforWarning_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_TAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TAIListforWarning_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_TAIListforWarning_specs_1 = { sizeof(struct S1AP_TAIListforWarning), offsetof(struct S1AP_TAIListforWarning, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TAIListforWarning = { "TAIListforWarning", "TAIListforWarning", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_TAIListforWarning_tags_1, sizeof(asn_DEF_S1AP_TAIListforWarning_tags_1) /sizeof(asn_DEF_S1AP_TAIListforWarning_tags_1[0]), /* 1 */ asn_DEF_S1AP_TAIListforWarning_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TAIListforWarning_tags_1) /sizeof(asn_DEF_S1AP_TAIListforWarning_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_TAIListforWarning_constr_1, &asn_PER_type_S1AP_TAIListforWarning_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_TAIListforWarning_1, 1, /* Single element */ &asn_SPC_S1AP_TAIListforWarning_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAIListforWarning.h000066400000000000000000000021241333553357400221350ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TAIListforWarning_H_ #define _S1AP_TAIListforWarning_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_TAI; /* S1AP_TAIListforWarning */ typedef struct S1AP_TAIListforWarning { A_SEQUENCE_OF(struct S1AP_TAI) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TAIListforWarning_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TAIListforWarning; extern asn_SET_OF_specifics_t asn_SPC_S1AP_TAIListforWarning_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_TAIListforWarning_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_TAIListforWarning_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_TAIListforWarning_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAListforMDT.c000066400000000000000000000032521333553357400210410ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TAListforMDT.h" static asn_oer_constraints_t asn_OER_type_S1AP_TAListforMDT_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..8)) */}; asn_per_constraints_t asn_PER_type_S1AP_TAListforMDT_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 3, 3, 1, 8 } /* (SIZE(1..8)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_TAListforMDT_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)), 0, &asn_DEF_S1AP_TAC, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TAListforMDT_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_TAListforMDT_specs_1 = { sizeof(struct S1AP_TAListforMDT), offsetof(struct S1AP_TAListforMDT, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TAListforMDT = { "TAListforMDT", "TAListforMDT", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_TAListforMDT_tags_1, sizeof(asn_DEF_S1AP_TAListforMDT_tags_1) /sizeof(asn_DEF_S1AP_TAListforMDT_tags_1[0]), /* 1 */ asn_DEF_S1AP_TAListforMDT_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TAListforMDT_tags_1) /sizeof(asn_DEF_S1AP_TAListforMDT_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_TAListforMDT_constr_1, &asn_PER_type_S1AP_TAListforMDT_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_TAListforMDT_1, 1, /* Single element */ &asn_SPC_S1AP_TAListforMDT_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TAListforMDT.h000066400000000000000000000020061333553357400210420ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TAListforMDT_H_ #define _S1AP_TAListforMDT_H_ #include /* Including external dependencies */ #include "S1AP_TAC.h" #include #include #ifdef __cplusplus extern "C" { #endif /* S1AP_TAListforMDT */ typedef struct S1AP_TAListforMDT { A_SEQUENCE_OF(S1AP_TAC_t) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TAListforMDT_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TAListforMDT; extern asn_SET_OF_specifics_t asn_SPC_S1AP_TAListforMDT_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_TAListforMDT_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_TAListforMDT_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_TAListforMDT_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TBCD-STRING.c000066400000000000000000000036031333553357400203450ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TBCD-STRING.h" int S1AP_TBCD_STRING_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } size = st->size; if((size == 3)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_TBCD_STRING_constr_1 CC_NOTUSED = { { 0, 0 }, 3 /* (SIZE(3..3)) */}; asn_per_constraints_t asn_PER_type_S1AP_TBCD_STRING_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 3, 3 } /* (SIZE(3..3)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_TBCD_STRING_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_TBCD_STRING = { "TBCD-STRING", "TBCD-STRING", &asn_OP_OCTET_STRING, asn_DEF_S1AP_TBCD_STRING_tags_1, sizeof(asn_DEF_S1AP_TBCD_STRING_tags_1) /sizeof(asn_DEF_S1AP_TBCD_STRING_tags_1[0]), /* 1 */ asn_DEF_S1AP_TBCD_STRING_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TBCD_STRING_tags_1) /sizeof(asn_DEF_S1AP_TBCD_STRING_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_TBCD_STRING_constr_1, &asn_PER_type_S1AP_TBCD_STRING_constr_1, S1AP_TBCD_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TBCD-STRING.h000066400000000000000000000024641333553357400203560ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TBCD_STRING_H_ #define _S1AP_TBCD_STRING_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_TBCD-STRING */ typedef OCTET_STRING_t S1AP_TBCD_STRING_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_TBCD_STRING_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_TBCD_STRING; asn_struct_free_f S1AP_TBCD_STRING_free; asn_struct_print_f S1AP_TBCD_STRING_print; asn_constr_check_f S1AP_TBCD_STRING_constraint; ber_type_decoder_f S1AP_TBCD_STRING_decode_ber; der_type_encoder_f S1AP_TBCD_STRING_encode_der; xer_type_decoder_f S1AP_TBCD_STRING_decode_xer; xer_type_encoder_f S1AP_TBCD_STRING_encode_xer; oer_type_decoder_f S1AP_TBCD_STRING_decode_oer; oer_type_encoder_f S1AP_TBCD_STRING_encode_oer; per_type_decoder_f S1AP_TBCD_STRING_decode_uper; per_type_encoder_f S1AP_TBCD_STRING_encode_uper; per_type_decoder_f S1AP_TBCD_STRING_decode_aper; per_type_encoder_f S1AP_TBCD_STRING_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_TBCD_STRING_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Target-ToSource-TransparentContainer.c000066400000000000000000000023151333553357400257550ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Target-ToSource-TransparentContainer.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_Target_ToSource_TransparentContainer_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Target_ToSource_TransparentContainer = { "Target-ToSource-TransparentContainer", "Target-ToSource-TransparentContainer", &asn_OP_OCTET_STRING, asn_DEF_S1AP_Target_ToSource_TransparentContainer_tags_1, sizeof(asn_DEF_S1AP_Target_ToSource_TransparentContainer_tags_1) /sizeof(asn_DEF_S1AP_Target_ToSource_TransparentContainer_tags_1[0]), /* 1 */ asn_DEF_S1AP_Target_ToSource_TransparentContainer_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Target_ToSource_TransparentContainer_tags_1) /sizeof(asn_DEF_S1AP_Target_ToSource_TransparentContainer_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Target-ToSource-TransparentContainer.h000066400000000000000000000033121333553357400257600ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Target_ToSource_TransparentContainer_H_ #define _S1AP_Target_ToSource_TransparentContainer_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_Target-ToSource-TransparentContainer */ typedef OCTET_STRING_t S1AP_Target_ToSource_TransparentContainer_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Target_ToSource_TransparentContainer; asn_struct_free_f S1AP_Target_ToSource_TransparentContainer_free; asn_struct_print_f S1AP_Target_ToSource_TransparentContainer_print; asn_constr_check_f S1AP_Target_ToSource_TransparentContainer_constraint; ber_type_decoder_f S1AP_Target_ToSource_TransparentContainer_decode_ber; der_type_encoder_f S1AP_Target_ToSource_TransparentContainer_encode_der; xer_type_decoder_f S1AP_Target_ToSource_TransparentContainer_decode_xer; xer_type_encoder_f S1AP_Target_ToSource_TransparentContainer_encode_xer; oer_type_decoder_f S1AP_Target_ToSource_TransparentContainer_decode_oer; oer_type_encoder_f S1AP_Target_ToSource_TransparentContainer_encode_oer; per_type_decoder_f S1AP_Target_ToSource_TransparentContainer_decode_uper; per_type_encoder_f S1AP_Target_ToSource_TransparentContainer_encode_uper; per_type_decoder_f S1AP_Target_ToSource_TransparentContainer_decode_aper; per_type_encoder_f S1AP_Target_ToSource_TransparentContainer_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Target_ToSource_TransparentContainer_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TargetBSS-ToSourceBSS-TransparentContainer.c000066400000000000000000000024171333553357400267000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TargetBSS-ToSourceBSS-TransparentContainer.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_TargetBSS_ToSourceBSS_TransparentContainer_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_TargetBSS_ToSourceBSS_TransparentContainer = { "TargetBSS-ToSourceBSS-TransparentContainer", "TargetBSS-ToSourceBSS-TransparentContainer", &asn_OP_OCTET_STRING, asn_DEF_S1AP_TargetBSS_ToSourceBSS_TransparentContainer_tags_1, sizeof(asn_DEF_S1AP_TargetBSS_ToSourceBSS_TransparentContainer_tags_1) /sizeof(asn_DEF_S1AP_TargetBSS_ToSourceBSS_TransparentContainer_tags_1[0]), /* 1 */ asn_DEF_S1AP_TargetBSS_ToSourceBSS_TransparentContainer_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TargetBSS_ToSourceBSS_TransparentContainer_tags_1) /sizeof(asn_DEF_S1AP_TargetBSS_ToSourceBSS_TransparentContainer_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TargetBSS-ToSourceBSS-TransparentContainer.h000066400000000000000000000034741333553357400267110ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TargetBSS_ToSourceBSS_TransparentContainer_H_ #define _S1AP_TargetBSS_ToSourceBSS_TransparentContainer_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_TargetBSS-ToSourceBSS-TransparentContainer */ typedef OCTET_STRING_t S1AP_TargetBSS_ToSourceBSS_TransparentContainer_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TargetBSS_ToSourceBSS_TransparentContainer; asn_struct_free_f S1AP_TargetBSS_ToSourceBSS_TransparentContainer_free; asn_struct_print_f S1AP_TargetBSS_ToSourceBSS_TransparentContainer_print; asn_constr_check_f S1AP_TargetBSS_ToSourceBSS_TransparentContainer_constraint; ber_type_decoder_f S1AP_TargetBSS_ToSourceBSS_TransparentContainer_decode_ber; der_type_encoder_f S1AP_TargetBSS_ToSourceBSS_TransparentContainer_encode_der; xer_type_decoder_f S1AP_TargetBSS_ToSourceBSS_TransparentContainer_decode_xer; xer_type_encoder_f S1AP_TargetBSS_ToSourceBSS_TransparentContainer_encode_xer; oer_type_decoder_f S1AP_TargetBSS_ToSourceBSS_TransparentContainer_decode_oer; oer_type_encoder_f S1AP_TargetBSS_ToSourceBSS_TransparentContainer_encode_oer; per_type_decoder_f S1AP_TargetBSS_ToSourceBSS_TransparentContainer_decode_uper; per_type_encoder_f S1AP_TargetBSS_ToSourceBSS_TransparentContainer_encode_uper; per_type_decoder_f S1AP_TargetBSS_ToSourceBSS_TransparentContainer_decode_aper; per_type_encoder_f S1AP_TargetBSS_ToSourceBSS_TransparentContainer_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_TargetBSS_ToSourceBSS_TransparentContainer_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TargetID.c000066400000000000000000000046701333553357400202750ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TargetID.h" #include "S1AP_TargeteNB-ID.h" #include "S1AP_TargetRNC-ID.h" #include "S1AP_CGI.h" static asn_oer_constraints_t asn_OER_type_S1AP_TargetID_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_TargetID_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_TargetID_1[] = { { ATF_POINTER, 0, offsetof(struct S1AP_TargetID, choice.targeteNB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TargeteNB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "targeteNB-ID" }, { ATF_POINTER, 0, offsetof(struct S1AP_TargetID, choice.targetRNC_ID), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TargetRNC_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "targetRNC-ID" }, { ATF_POINTER, 0, offsetof(struct S1AP_TargetID, choice.cGI), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cGI" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TargetID_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* targeteNB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* targetRNC-ID */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* cGI */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_TargetID_specs_1 = { sizeof(struct S1AP_TargetID), offsetof(struct S1AP_TargetID, _asn_ctx), offsetof(struct S1AP_TargetID, present), sizeof(((struct S1AP_TargetID *)0)->present), asn_MAP_S1AP_TargetID_tag2el_1, 3, /* Count of tags in the map */ 0, 0, 3 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TargetID = { "TargetID", "TargetID", &asn_OP_CHOICE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { &asn_OER_type_S1AP_TargetID_constr_1, &asn_PER_type_S1AP_TargetID_constr_1, CHOICE_constraint }, asn_MBR_S1AP_TargetID_1, 3, /* Elements count */ &asn_SPC_S1AP_TargetID_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TargetID.h000066400000000000000000000024441333553357400202770ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TargetID_H_ #define _S1AP_TargetID_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_TargetID_PR { S1AP_TargetID_PR_NOTHING, /* No components present */ S1AP_TargetID_PR_targeteNB_ID, S1AP_TargetID_PR_targetRNC_ID, S1AP_TargetID_PR_cGI /* Extensions may appear below */ } S1AP_TargetID_PR; /* Forward declarations */ struct S1AP_TargeteNB_ID; struct S1AP_TargetRNC_ID; struct S1AP_CGI; /* S1AP_TargetID */ typedef struct S1AP_TargetID { S1AP_TargetID_PR present; union S1AP_TargetID_u { struct S1AP_TargeteNB_ID *targeteNB_ID; struct S1AP_TargetRNC_ID *targetRNC_ID; struct S1AP_CGI *cGI; /* * This type is extensible, * possible extensions are below. */ } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TargetID_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TargetID; #ifdef __cplusplus } #endif #endif /* _S1AP_TargetID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TargetRNC-ID.c000066400000000000000000000057411333553357400207150ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TargetRNC-ID.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_TargetRNC_ID_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TargetRNC_ID, lAI), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_LAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "lAI" }, { ATF_POINTER, 1, offsetof(struct S1AP_TargetRNC_ID, rAC), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_RAC, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "rAC" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TargetRNC_ID, rNC_ID), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_RNC_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "rNC-ID" }, { ATF_POINTER, 2, offsetof(struct S1AP_TargetRNC_ID, extendedRNC_ID), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ExtendedRNC_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "extendedRNC-ID" }, { ATF_POINTER, 1, offsetof(struct S1AP_TargetRNC_ID, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P104, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_TargetRNC_ID_oms_1[] = { 1, 3, 4 }; static const ber_tlv_tag_t asn_DEF_S1AP_TargetRNC_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TargetRNC_ID_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* lAI */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* rAC */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* rNC-ID */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* extendedRNC-ID */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_TargetRNC_ID_specs_1 = { sizeof(struct S1AP_TargetRNC_ID), offsetof(struct S1AP_TargetRNC_ID, _asn_ctx), asn_MAP_S1AP_TargetRNC_ID_tag2el_1, 5, /* Count of tags in the map */ asn_MAP_S1AP_TargetRNC_ID_oms_1, /* Optional members */ 3, 0, /* Root/Additions */ 5, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TargetRNC_ID = { "TargetRNC-ID", "TargetRNC-ID", &asn_OP_SEQUENCE, asn_DEF_S1AP_TargetRNC_ID_tags_1, sizeof(asn_DEF_S1AP_TargetRNC_ID_tags_1) /sizeof(asn_DEF_S1AP_TargetRNC_ID_tags_1[0]), /* 1 */ asn_DEF_S1AP_TargetRNC_ID_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TargetRNC_ID_tags_1) /sizeof(asn_DEF_S1AP_TargetRNC_ID_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TargetRNC_ID_1, 5, /* Elements count */ &asn_SPC_S1AP_TargetRNC_ID_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TargetRNC-ID.h000066400000000000000000000024471333553357400207220ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TargetRNC_ID_H_ #define _S1AP_TargetRNC_ID_H_ #include /* Including external dependencies */ #include "S1AP_LAI.h" #include "S1AP_RAC.h" #include "S1AP_RNC-ID.h" #include "S1AP_ExtendedRNC-ID.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_TargetRNC-ID */ typedef struct S1AP_TargetRNC_ID { S1AP_LAI_t lAI; S1AP_RAC_t *rAC; /* OPTIONAL */ S1AP_RNC_ID_t rNC_ID; S1AP_ExtendedRNC_ID_t *extendedRNC_ID; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TargetRNC_ID_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TargetRNC_ID; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_TargetRNC_ID_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_TargetRNC_ID_1[5]; #ifdef __cplusplus } #endif #endif /* _S1AP_TargetRNC_ID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TargetRNC-ToSourceRNC-TransparentContainer.c000066400000000000000000000024171333553357400266660ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TargetRNC-ToSourceRNC-TransparentContainer.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_TargetRNC_ToSourceRNC_TransparentContainer_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_TargetRNC_ToSourceRNC_TransparentContainer = { "TargetRNC-ToSourceRNC-TransparentContainer", "TargetRNC-ToSourceRNC-TransparentContainer", &asn_OP_OCTET_STRING, asn_DEF_S1AP_TargetRNC_ToSourceRNC_TransparentContainer_tags_1, sizeof(asn_DEF_S1AP_TargetRNC_ToSourceRNC_TransparentContainer_tags_1) /sizeof(asn_DEF_S1AP_TargetRNC_ToSourceRNC_TransparentContainer_tags_1[0]), /* 1 */ asn_DEF_S1AP_TargetRNC_ToSourceRNC_TransparentContainer_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TargetRNC_ToSourceRNC_TransparentContainer_tags_1) /sizeof(asn_DEF_S1AP_TargetRNC_ToSourceRNC_TransparentContainer_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TargetRNC-ToSourceRNC-TransparentContainer.h000066400000000000000000000034741333553357400266770ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TargetRNC_ToSourceRNC_TransparentContainer_H_ #define _S1AP_TargetRNC_ToSourceRNC_TransparentContainer_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_TargetRNC-ToSourceRNC-TransparentContainer */ typedef OCTET_STRING_t S1AP_TargetRNC_ToSourceRNC_TransparentContainer_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TargetRNC_ToSourceRNC_TransparentContainer; asn_struct_free_f S1AP_TargetRNC_ToSourceRNC_TransparentContainer_free; asn_struct_print_f S1AP_TargetRNC_ToSourceRNC_TransparentContainer_print; asn_constr_check_f S1AP_TargetRNC_ToSourceRNC_TransparentContainer_constraint; ber_type_decoder_f S1AP_TargetRNC_ToSourceRNC_TransparentContainer_decode_ber; der_type_encoder_f S1AP_TargetRNC_ToSourceRNC_TransparentContainer_encode_der; xer_type_decoder_f S1AP_TargetRNC_ToSourceRNC_TransparentContainer_decode_xer; xer_type_encoder_f S1AP_TargetRNC_ToSourceRNC_TransparentContainer_encode_xer; oer_type_decoder_f S1AP_TargetRNC_ToSourceRNC_TransparentContainer_decode_oer; oer_type_encoder_f S1AP_TargetRNC_ToSourceRNC_TransparentContainer_encode_oer; per_type_decoder_f S1AP_TargetRNC_ToSourceRNC_TransparentContainer_decode_uper; per_type_encoder_f S1AP_TargetRNC_ToSourceRNC_TransparentContainer_encode_uper; per_type_decoder_f S1AP_TargetRNC_ToSourceRNC_TransparentContainer_decode_aper; per_type_encoder_f S1AP_TargetRNC_ToSourceRNC_TransparentContainer_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_TargetRNC_ToSourceRNC_TransparentContainer_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TargeteNB-ID.c000066400000000000000000000046461333553357400207420ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TargeteNB-ID.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_TargeteNB_ID_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TargeteNB_ID, global_ENB_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Global_ENB_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "global-ENB-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TargeteNB_ID, selected_TAI), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "selected-TAI" }, { ATF_POINTER, 1, offsetof(struct S1AP_TargeteNB_ID, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P103, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_TargeteNB_ID_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_TargeteNB_ID_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TargeteNB_ID_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* global-ENB-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* selected-TAI */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_TargeteNB_ID_specs_1 = { sizeof(struct S1AP_TargeteNB_ID), offsetof(struct S1AP_TargeteNB_ID, _asn_ctx), asn_MAP_S1AP_TargeteNB_ID_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_TargeteNB_ID_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TargeteNB_ID = { "TargeteNB-ID", "TargeteNB-ID", &asn_OP_SEQUENCE, asn_DEF_S1AP_TargeteNB_ID_tags_1, sizeof(asn_DEF_S1AP_TargeteNB_ID_tags_1) /sizeof(asn_DEF_S1AP_TargeteNB_ID_tags_1[0]), /* 1 */ asn_DEF_S1AP_TargeteNB_ID_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TargeteNB_ID_tags_1) /sizeof(asn_DEF_S1AP_TargeteNB_ID_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TargeteNB_ID_1, 3, /* Elements count */ &asn_SPC_S1AP_TargeteNB_ID_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TargeteNB-ID.h000066400000000000000000000022661333553357400207430ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TargeteNB_ID_H_ #define _S1AP_TargeteNB_ID_H_ #include /* Including external dependencies */ #include "S1AP_Global-ENB-ID.h" #include "S1AP_TAI.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_TargeteNB-ID */ typedef struct S1AP_TargeteNB_ID { S1AP_Global_ENB_ID_t global_ENB_ID; S1AP_TAI_t selected_TAI; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TargeteNB_ID_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TargeteNB_ID; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_TargeteNB_ID_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_TargeteNB_ID_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_TargeteNB_ID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TargeteNB-ToSourceeNB-TransparentContainer.c000066400000000000000000000054531333553357400267350ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TargeteNB-ToSourceeNB-TransparentContainer.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TargeteNB_ToSourceeNB_TransparentContainer, rRC_Container), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_RRC_Container, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "rRC-Container" }, { ATF_POINTER, 1, offsetof(struct S1AP_TargeteNB_ToSourceeNB_TransparentContainer, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P105, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* rRC-Container */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_specs_1 = { sizeof(struct S1AP_TargeteNB_ToSourceeNB_TransparentContainer), offsetof(struct S1AP_TargeteNB_ToSourceeNB_TransparentContainer, _asn_ctx), asn_MAP_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TargeteNB_ToSourceeNB_TransparentContainer = { "TargeteNB-ToSourceeNB-TransparentContainer", "TargeteNB-ToSourceeNB-TransparentContainer", &asn_OP_SEQUENCE, asn_DEF_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_tags_1, sizeof(asn_DEF_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_tags_1) /sizeof(asn_DEF_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_tags_1[0]), /* 1 */ asn_DEF_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_tags_1) /sizeof(asn_DEF_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_1, 2, /* Elements count */ &asn_SPC_S1AP_TargeteNB_ToSourceeNB_TransparentContainer_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TargeteNB-ToSourceeNB-TransparentContainer.h000066400000000000000000000023331333553357400267340ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TargeteNB_ToSourceeNB_TransparentContainer_H_ #define _S1AP_TargeteNB_ToSourceeNB_TransparentContainer_H_ #include /* Including external dependencies */ #include "S1AP_RRC-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_TargeteNB-ToSourceeNB-TransparentContainer */ typedef struct S1AP_TargeteNB_ToSourceeNB_TransparentContainer { S1AP_RRC_Container_t rRC_Container; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TargeteNB_ToSourceeNB_TransparentContainer_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TargeteNB_ToSourceeNB_TransparentContainer; #ifdef __cplusplus } #endif #endif /* _S1AP_TargeteNB_ToSourceeNB_TransparentContainer_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Threshold-RSRP.c000066400000000000000000000035631333553357400213520ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Threshold-RSRP.h" int S1AP_Threshold_RSRP_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 97)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_Threshold_RSRP_constr_1 CC_NOTUSED = { { 1, 1 } /* (0..97) */, -1}; asn_per_constraints_t asn_PER_type_S1AP_Threshold_RSRP_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 7, 7, 0, 97 } /* (0..97) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_Threshold_RSRP_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Threshold_RSRP = { "Threshold-RSRP", "Threshold-RSRP", &asn_OP_NativeInteger, asn_DEF_S1AP_Threshold_RSRP_tags_1, sizeof(asn_DEF_S1AP_Threshold_RSRP_tags_1) /sizeof(asn_DEF_S1AP_Threshold_RSRP_tags_1[0]), /* 1 */ asn_DEF_S1AP_Threshold_RSRP_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Threshold_RSRP_tags_1) /sizeof(asn_DEF_S1AP_Threshold_RSRP_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_Threshold_RSRP_constr_1, &asn_PER_type_S1AP_Threshold_RSRP_constr_1, S1AP_Threshold_RSRP_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Threshold-RSRP.h000066400000000000000000000025471333553357400213600ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Threshold_RSRP_H_ #define _S1AP_Threshold_RSRP_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_Threshold-RSRP */ typedef long S1AP_Threshold_RSRP_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_Threshold_RSRP_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_Threshold_RSRP; asn_struct_free_f S1AP_Threshold_RSRP_free; asn_struct_print_f S1AP_Threshold_RSRP_print; asn_constr_check_f S1AP_Threshold_RSRP_constraint; ber_type_decoder_f S1AP_Threshold_RSRP_decode_ber; der_type_encoder_f S1AP_Threshold_RSRP_encode_der; xer_type_decoder_f S1AP_Threshold_RSRP_decode_xer; xer_type_encoder_f S1AP_Threshold_RSRP_encode_xer; oer_type_decoder_f S1AP_Threshold_RSRP_decode_oer; oer_type_encoder_f S1AP_Threshold_RSRP_encode_oer; per_type_decoder_f S1AP_Threshold_RSRP_decode_uper; per_type_encoder_f S1AP_Threshold_RSRP_encode_uper; per_type_decoder_f S1AP_Threshold_RSRP_decode_aper; per_type_encoder_f S1AP_Threshold_RSRP_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Threshold_RSRP_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Threshold-RSRQ.c000066400000000000000000000035631333553357400213530ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Threshold-RSRQ.h" int S1AP_Threshold_RSRQ_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 34)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_Threshold_RSRQ_constr_1 CC_NOTUSED = { { 1, 1 } /* (0..34) */, -1}; asn_per_constraints_t asn_PER_type_S1AP_Threshold_RSRQ_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 6, 6, 0, 34 } /* (0..34) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_Threshold_RSRQ_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Threshold_RSRQ = { "Threshold-RSRQ", "Threshold-RSRQ", &asn_OP_NativeInteger, asn_DEF_S1AP_Threshold_RSRQ_tags_1, sizeof(asn_DEF_S1AP_Threshold_RSRQ_tags_1) /sizeof(asn_DEF_S1AP_Threshold_RSRQ_tags_1[0]), /* 1 */ asn_DEF_S1AP_Threshold_RSRQ_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Threshold_RSRQ_tags_1) /sizeof(asn_DEF_S1AP_Threshold_RSRQ_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_Threshold_RSRQ_constr_1, &asn_PER_type_S1AP_Threshold_RSRQ_constr_1, S1AP_Threshold_RSRQ_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Threshold-RSRQ.h000066400000000000000000000025471333553357400213610ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Threshold_RSRQ_H_ #define _S1AP_Threshold_RSRQ_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_Threshold-RSRQ */ typedef long S1AP_Threshold_RSRQ_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_Threshold_RSRQ_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_Threshold_RSRQ; asn_struct_free_f S1AP_Threshold_RSRQ_free; asn_struct_print_f S1AP_Threshold_RSRQ_print; asn_constr_check_f S1AP_Threshold_RSRQ_constraint; ber_type_decoder_f S1AP_Threshold_RSRQ_decode_ber; der_type_encoder_f S1AP_Threshold_RSRQ_encode_der; xer_type_decoder_f S1AP_Threshold_RSRQ_decode_xer; xer_type_encoder_f S1AP_Threshold_RSRQ_encode_xer; oer_type_decoder_f S1AP_Threshold_RSRQ_decode_oer; oer_type_encoder_f S1AP_Threshold_RSRQ_encode_oer; per_type_decoder_f S1AP_Threshold_RSRQ_decode_uper; per_type_encoder_f S1AP_Threshold_RSRQ_encode_uper; per_type_decoder_f S1AP_Threshold_RSRQ_decode_aper; per_type_encoder_f S1AP_Threshold_RSRQ_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Threshold_RSRQ_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Time-UE-StayedInCell-EnhancedGranularity.c000066400000000000000000000045021333553357400262740ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Time-UE-StayedInCell-EnhancedGranularity.h" int S1AP_Time_UE_StayedInCell_EnhancedGranularity_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 40950)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_Time_UE_StayedInCell_EnhancedGranularity_constr_1 CC_NOTUSED = { { 2, 1 } /* (0..40950) */, -1}; static asn_per_constraints_t asn_PER_type_S1AP_Time_UE_StayedInCell_EnhancedGranularity_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 16, 16, 0, 40950 } /* (0..40950) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_Time_UE_StayedInCell_EnhancedGranularity_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Time_UE_StayedInCell_EnhancedGranularity = { "Time-UE-StayedInCell-EnhancedGranularity", "Time-UE-StayedInCell-EnhancedGranularity", &asn_OP_NativeInteger, asn_DEF_S1AP_Time_UE_StayedInCell_EnhancedGranularity_tags_1, sizeof(asn_DEF_S1AP_Time_UE_StayedInCell_EnhancedGranularity_tags_1) /sizeof(asn_DEF_S1AP_Time_UE_StayedInCell_EnhancedGranularity_tags_1[0]), /* 1 */ asn_DEF_S1AP_Time_UE_StayedInCell_EnhancedGranularity_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Time_UE_StayedInCell_EnhancedGranularity_tags_1) /sizeof(asn_DEF_S1AP_Time_UE_StayedInCell_EnhancedGranularity_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_Time_UE_StayedInCell_EnhancedGranularity_constr_1, &asn_PER_type_S1AP_Time_UE_StayedInCell_EnhancedGranularity_constr_1, S1AP_Time_UE_StayedInCell_EnhancedGranularity_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Time-UE-StayedInCell-EnhancedGranularity.h000066400000000000000000000034151333553357400263030ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Time_UE_StayedInCell_EnhancedGranularity_H_ #define _S1AP_Time_UE_StayedInCell_EnhancedGranularity_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_Time-UE-StayedInCell-EnhancedGranularity */ typedef long S1AP_Time_UE_StayedInCell_EnhancedGranularity_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_Time_UE_StayedInCell_EnhancedGranularity; asn_struct_free_f S1AP_Time_UE_StayedInCell_EnhancedGranularity_free; asn_struct_print_f S1AP_Time_UE_StayedInCell_EnhancedGranularity_print; asn_constr_check_f S1AP_Time_UE_StayedInCell_EnhancedGranularity_constraint; ber_type_decoder_f S1AP_Time_UE_StayedInCell_EnhancedGranularity_decode_ber; der_type_encoder_f S1AP_Time_UE_StayedInCell_EnhancedGranularity_encode_der; xer_type_decoder_f S1AP_Time_UE_StayedInCell_EnhancedGranularity_decode_xer; xer_type_encoder_f S1AP_Time_UE_StayedInCell_EnhancedGranularity_encode_xer; oer_type_decoder_f S1AP_Time_UE_StayedInCell_EnhancedGranularity_decode_oer; oer_type_encoder_f S1AP_Time_UE_StayedInCell_EnhancedGranularity_encode_oer; per_type_decoder_f S1AP_Time_UE_StayedInCell_EnhancedGranularity_decode_uper; per_type_encoder_f S1AP_Time_UE_StayedInCell_EnhancedGranularity_encode_uper; per_type_decoder_f S1AP_Time_UE_StayedInCell_EnhancedGranularity_decode_aper; per_type_encoder_f S1AP_Time_UE_StayedInCell_EnhancedGranularity_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Time_UE_StayedInCell_EnhancedGranularity_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Time-UE-StayedInCell.c000066400000000000000000000037431333553357400223550ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_Time-UE-StayedInCell.h" int S1AP_Time_UE_StayedInCell_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 4095)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_Time_UE_StayedInCell_constr_1 CC_NOTUSED = { { 2, 1 } /* (0..4095) */, -1}; asn_per_constraints_t asn_PER_type_S1AP_Time_UE_StayedInCell_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 12, 12, 0, 4095 } /* (0..4095) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_Time_UE_StayedInCell_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_Time_UE_StayedInCell = { "Time-UE-StayedInCell", "Time-UE-StayedInCell", &asn_OP_NativeInteger, asn_DEF_S1AP_Time_UE_StayedInCell_tags_1, sizeof(asn_DEF_S1AP_Time_UE_StayedInCell_tags_1) /sizeof(asn_DEF_S1AP_Time_UE_StayedInCell_tags_1[0]), /* 1 */ asn_DEF_S1AP_Time_UE_StayedInCell_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_Time_UE_StayedInCell_tags_1) /sizeof(asn_DEF_S1AP_Time_UE_StayedInCell_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_Time_UE_StayedInCell_constr_1, &asn_PER_type_S1AP_Time_UE_StayedInCell_constr_1, S1AP_Time_UE_StayedInCell_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_Time-UE-StayedInCell.h000066400000000000000000000027371333553357400223640ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_Time_UE_StayedInCell_H_ #define _S1AP_Time_UE_StayedInCell_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_Time-UE-StayedInCell */ typedef long S1AP_Time_UE_StayedInCell_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_Time_UE_StayedInCell_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_Time_UE_StayedInCell; asn_struct_free_f S1AP_Time_UE_StayedInCell_free; asn_struct_print_f S1AP_Time_UE_StayedInCell_print; asn_constr_check_f S1AP_Time_UE_StayedInCell_constraint; ber_type_decoder_f S1AP_Time_UE_StayedInCell_decode_ber; der_type_encoder_f S1AP_Time_UE_StayedInCell_encode_der; xer_type_decoder_f S1AP_Time_UE_StayedInCell_decode_xer; xer_type_encoder_f S1AP_Time_UE_StayedInCell_encode_xer; oer_type_decoder_f S1AP_Time_UE_StayedInCell_decode_oer; oer_type_encoder_f S1AP_Time_UE_StayedInCell_encode_oer; per_type_decoder_f S1AP_Time_UE_StayedInCell_decode_uper; per_type_encoder_f S1AP_Time_UE_StayedInCell_encode_uper; per_type_decoder_f S1AP_Time_UE_StayedInCell_decode_aper; per_type_encoder_f S1AP_Time_UE_StayedInCell_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_Time_UE_StayedInCell_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TimeSynchronisationInfo.c000066400000000000000000000053441333553357400234560ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TimeSynchronisationInfo.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_TimeSynchronisationInfo_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TimeSynchronisationInfo, stratumLevel), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_StratumLevel, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "stratumLevel" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TimeSynchronisationInfo, synchronisationStatus), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_SynchronisationStatus, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "synchronisationStatus" }, { ATF_POINTER, 1, offsetof(struct S1AP_TimeSynchronisationInfo, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P95, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_TimeSynchronisationInfo_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_TimeSynchronisationInfo_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TimeSynchronisationInfo_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* stratumLevel */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* synchronisationStatus */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_TimeSynchronisationInfo_specs_1 = { sizeof(struct S1AP_TimeSynchronisationInfo), offsetof(struct S1AP_TimeSynchronisationInfo, _asn_ctx), asn_MAP_S1AP_TimeSynchronisationInfo_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_TimeSynchronisationInfo_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TimeSynchronisationInfo = { "TimeSynchronisationInfo", "TimeSynchronisationInfo", &asn_OP_SEQUENCE, asn_DEF_S1AP_TimeSynchronisationInfo_tags_1, sizeof(asn_DEF_S1AP_TimeSynchronisationInfo_tags_1) /sizeof(asn_DEF_S1AP_TimeSynchronisationInfo_tags_1[0]), /* 1 */ asn_DEF_S1AP_TimeSynchronisationInfo_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TimeSynchronisationInfo_tags_1) /sizeof(asn_DEF_S1AP_TimeSynchronisationInfo_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TimeSynchronisationInfo_1, 3, /* Elements count */ &asn_SPC_S1AP_TimeSynchronisationInfo_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TimeSynchronisationInfo.h000066400000000000000000000022611333553357400234560ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TimeSynchronisationInfo_H_ #define _S1AP_TimeSynchronisationInfo_H_ #include /* Including external dependencies */ #include "S1AP_StratumLevel.h" #include "S1AP_SynchronisationStatus.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_TimeSynchronisationInfo */ typedef struct S1AP_TimeSynchronisationInfo { S1AP_StratumLevel_t stratumLevel; S1AP_SynchronisationStatus_t synchronisationStatus; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TimeSynchronisationInfo_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TimeSynchronisationInfo; #ifdef __cplusplus } #endif #endif /* _S1AP_TimeSynchronisationInfo_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TimeToWait.c000066400000000000000000000041511333553357400206520ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TimeToWait.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_TimeToWait_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_TimeToWait_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 5 } /* (0..5,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_TimeToWait_value2enum_1[] = { { 0, 3, "v1s" }, { 1, 3, "v2s" }, { 2, 3, "v5s" }, { 3, 4, "v10s" }, { 4, 4, "v20s" }, { 5, 4, "v60s" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_TimeToWait_enum2value_1[] = { 3, /* v10s(3) */ 0, /* v1s(0) */ 4, /* v20s(4) */ 1, /* v2s(1) */ 2, /* v5s(2) */ 5 /* v60s(5) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_TimeToWait_specs_1 = { asn_MAP_S1AP_TimeToWait_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_TimeToWait_enum2value_1, /* N => "tag"; sorted by N */ 6, /* Number of elements in the maps */ 7, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_TimeToWait_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_TimeToWait = { "TimeToWait", "TimeToWait", &asn_OP_NativeEnumerated, asn_DEF_S1AP_TimeToWait_tags_1, sizeof(asn_DEF_S1AP_TimeToWait_tags_1) /sizeof(asn_DEF_S1AP_TimeToWait_tags_1[0]), /* 1 */ asn_DEF_S1AP_TimeToWait_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TimeToWait_tags_1) /sizeof(asn_DEF_S1AP_TimeToWait_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_TimeToWait_constr_1, &asn_PER_type_S1AP_TimeToWait_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_TimeToWait_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TimeToWait.h000066400000000000000000000027431333553357400206640ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TimeToWait_H_ #define _S1AP_TimeToWait_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_TimeToWait { S1AP_TimeToWait_v1s = 0, S1AP_TimeToWait_v2s = 1, S1AP_TimeToWait_v5s = 2, S1AP_TimeToWait_v10s = 3, S1AP_TimeToWait_v20s = 4, S1AP_TimeToWait_v60s = 5 /* * Enumeration is extensible */ } e_S1AP_TimeToWait; /* S1AP_TimeToWait */ typedef long S1AP_TimeToWait_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TimeToWait; asn_struct_free_f S1AP_TimeToWait_free; asn_struct_print_f S1AP_TimeToWait_print; asn_constr_check_f S1AP_TimeToWait_constraint; ber_type_decoder_f S1AP_TimeToWait_decode_ber; der_type_encoder_f S1AP_TimeToWait_encode_der; xer_type_decoder_f S1AP_TimeToWait_decode_xer; xer_type_encoder_f S1AP_TimeToWait_encode_xer; oer_type_decoder_f S1AP_TimeToWait_decode_oer; oer_type_encoder_f S1AP_TimeToWait_encode_oer; per_type_decoder_f S1AP_TimeToWait_decode_uper; per_type_encoder_f S1AP_TimeToWait_encode_uper; per_type_decoder_f S1AP_TimeToWait_decode_aper; per_type_encoder_f S1AP_TimeToWait_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_TimeToWait_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TraceActivation.c000066400000000000000000000063521333553357400217110ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TraceActivation.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_TraceActivation_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TraceActivation, e_UTRAN_Trace_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_E_UTRAN_Trace_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "e-UTRAN-Trace-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TraceActivation, interfacesToTrace), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_InterfacesToTrace, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "interfacesToTrace" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TraceActivation, traceDepth), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TraceDepth, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "traceDepth" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TraceActivation, traceCollectionEntityIPAddress), (ASN_TAG_CLASS_CONTEXT | (3 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "traceCollectionEntityIPAddress" }, { ATF_POINTER, 1, offsetof(struct S1AP_TraceActivation, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (4 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P107, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_TraceActivation_oms_1[] = { 4 }; static const ber_tlv_tag_t asn_DEF_S1AP_TraceActivation_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TraceActivation_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* e-UTRAN-Trace-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* interfacesToTrace */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 }, /* traceDepth */ { (ASN_TAG_CLASS_CONTEXT | (3 << 2)), 3, 0, 0 }, /* traceCollectionEntityIPAddress */ { (ASN_TAG_CLASS_CONTEXT | (4 << 2)), 4, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_TraceActivation_specs_1 = { sizeof(struct S1AP_TraceActivation), offsetof(struct S1AP_TraceActivation, _asn_ctx), asn_MAP_S1AP_TraceActivation_tag2el_1, 5, /* Count of tags in the map */ asn_MAP_S1AP_TraceActivation_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 5, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TraceActivation = { "TraceActivation", "TraceActivation", &asn_OP_SEQUENCE, asn_DEF_S1AP_TraceActivation_tags_1, sizeof(asn_DEF_S1AP_TraceActivation_tags_1) /sizeof(asn_DEF_S1AP_TraceActivation_tags_1[0]), /* 1 */ asn_DEF_S1AP_TraceActivation_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TraceActivation_tags_1) /sizeof(asn_DEF_S1AP_TraceActivation_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TraceActivation_1, 5, /* Elements count */ &asn_SPC_S1AP_TraceActivation_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TraceActivation.h000066400000000000000000000024351333553357400217140ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TraceActivation_H_ #define _S1AP_TraceActivation_H_ #include /* Including external dependencies */ #include "S1AP_E-UTRAN-Trace-ID.h" #include "S1AP_InterfacesToTrace.h" #include "S1AP_TraceDepth.h" #include "S1AP_TransportLayerAddress.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_TraceActivation */ typedef struct S1AP_TraceActivation { S1AP_E_UTRAN_Trace_ID_t e_UTRAN_Trace_ID; S1AP_InterfacesToTrace_t interfacesToTrace; S1AP_TraceDepth_t traceDepth; S1AP_TransportLayerAddress_t traceCollectionEntityIPAddress; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TraceActivation_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TraceActivation; #ifdef __cplusplus } #endif #endif /* _S1AP_TraceActivation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TraceDepth.c000066400000000000000000000044701333553357400206530ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TraceDepth.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_TraceDepth_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_TraceDepth_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 3, 3, 0, 5 } /* (0..5,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_TraceDepth_value2enum_1[] = { { 0, 7, "minimum" }, { 1, 6, "medium" }, { 2, 7, "maximum" }, { 3, 37, "minimumWithoutVendorSpecificExtension" }, { 4, 36, "mediumWithoutVendorSpecificExtension" }, { 5, 37, "maximumWithoutVendorSpecificExtension" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_TraceDepth_enum2value_1[] = { 2, /* maximum(2) */ 5, /* maximumWithoutVendorSpecificExtension(5) */ 1, /* medium(1) */ 4, /* mediumWithoutVendorSpecificExtension(4) */ 0, /* minimum(0) */ 3 /* minimumWithoutVendorSpecificExtension(3) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_TraceDepth_specs_1 = { asn_MAP_S1AP_TraceDepth_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_TraceDepth_enum2value_1, /* N => "tag"; sorted by N */ 6, /* Number of elements in the maps */ 7, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_TraceDepth_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_TraceDepth = { "TraceDepth", "TraceDepth", &asn_OP_NativeEnumerated, asn_DEF_S1AP_TraceDepth_tags_1, sizeof(asn_DEF_S1AP_TraceDepth_tags_1) /sizeof(asn_DEF_S1AP_TraceDepth_tags_1[0]), /* 1 */ asn_DEF_S1AP_TraceDepth_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TraceDepth_tags_1) /sizeof(asn_DEF_S1AP_TraceDepth_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_TraceDepth_constr_1, &asn_PER_type_S1AP_TraceDepth_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_TraceDepth_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TraceDepth.h000066400000000000000000000032241333553357400206540ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TraceDepth_H_ #define _S1AP_TraceDepth_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_TraceDepth { S1AP_TraceDepth_minimum = 0, S1AP_TraceDepth_medium = 1, S1AP_TraceDepth_maximum = 2, S1AP_TraceDepth_minimumWithoutVendorSpecificExtension = 3, S1AP_TraceDepth_mediumWithoutVendorSpecificExtension = 4, S1AP_TraceDepth_maximumWithoutVendorSpecificExtension = 5 /* * Enumeration is extensible */ } e_S1AP_TraceDepth; /* S1AP_TraceDepth */ typedef long S1AP_TraceDepth_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_TraceDepth_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_TraceDepth; extern const asn_INTEGER_specifics_t asn_SPC_TraceDepth_specs_1; asn_struct_free_f TraceDepth_free; asn_struct_print_f TraceDepth_print; asn_constr_check_f TraceDepth_constraint; ber_type_decoder_f TraceDepth_decode_ber; der_type_encoder_f TraceDepth_encode_der; xer_type_decoder_f TraceDepth_decode_xer; xer_type_encoder_f TraceDepth_encode_xer; oer_type_decoder_f TraceDepth_decode_oer; oer_type_encoder_f TraceDepth_encode_oer; per_type_decoder_f TraceDepth_decode_uper; per_type_encoder_f TraceDepth_encode_uper; per_type_decoder_f TraceDepth_decode_aper; per_type_encoder_f TraceDepth_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_TraceDepth_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TraceFailureIndication.c000066400000000000000000000035301333553357400231740ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TraceFailureIndication.h" asn_TYPE_member_t asn_MBR_S1AP_TraceFailureIndication_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TraceFailureIndication, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P55, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TraceFailureIndication_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TraceFailureIndication_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_TraceFailureIndication_specs_1 = { sizeof(struct S1AP_TraceFailureIndication), offsetof(struct S1AP_TraceFailureIndication, _asn_ctx), asn_MAP_S1AP_TraceFailureIndication_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TraceFailureIndication = { "TraceFailureIndication", "TraceFailureIndication", &asn_OP_SEQUENCE, asn_DEF_S1AP_TraceFailureIndication_tags_1, sizeof(asn_DEF_S1AP_TraceFailureIndication_tags_1) /sizeof(asn_DEF_S1AP_TraceFailureIndication_tags_1[0]), /* 1 */ asn_DEF_S1AP_TraceFailureIndication_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TraceFailureIndication_tags_1) /sizeof(asn_DEF_S1AP_TraceFailureIndication_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TraceFailureIndication_1, 1, /* Elements count */ &asn_SPC_S1AP_TraceFailureIndication_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TraceFailureIndication.h000066400000000000000000000021611333553357400232000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TraceFailureIndication_H_ #define _S1AP_TraceFailureIndication_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_TraceFailureIndication */ typedef struct S1AP_TraceFailureIndication { S1AP_ProtocolIE_Container_6551P55_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TraceFailureIndication_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TraceFailureIndication; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_TraceFailureIndication_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_TraceFailureIndication_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_TraceFailureIndication_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TraceStart.c000066400000000000000000000031501333553357400206760ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TraceStart.h" asn_TYPE_member_t asn_MBR_S1AP_TraceStart_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TraceStart, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P54, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TraceStart_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TraceStart_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_TraceStart_specs_1 = { sizeof(struct S1AP_TraceStart), offsetof(struct S1AP_TraceStart, _asn_ctx), asn_MAP_S1AP_TraceStart_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TraceStart = { "TraceStart", "TraceStart", &asn_OP_SEQUENCE, asn_DEF_S1AP_TraceStart_tags_1, sizeof(asn_DEF_S1AP_TraceStart_tags_1) /sizeof(asn_DEF_S1AP_TraceStart_tags_1[0]), /* 1 */ asn_DEF_S1AP_TraceStart_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TraceStart_tags_1) /sizeof(asn_DEF_S1AP_TraceStart_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TraceStart_1, 1, /* Elements count */ &asn_SPC_S1AP_TraceStart_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TraceStart.h000066400000000000000000000020051333553357400207010ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TraceStart_H_ #define _S1AP_TraceStart_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_TraceStart */ typedef struct S1AP_TraceStart { S1AP_ProtocolIE_Container_6551P54_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TraceStart_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TraceStart; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_TraceStart_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_TraceStart_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_TraceStart_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TrafficLoadReductionIndication.c000066400000000000000000000042121333553357400246570ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TrafficLoadReductionIndication.h" int S1AP_TrafficLoadReductionIndication_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 1 && value <= 99)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_TrafficLoadReductionIndication_constr_1 CC_NOTUSED = { { 1, 1 } /* (1..99) */, -1}; static asn_per_constraints_t asn_PER_type_S1AP_TrafficLoadReductionIndication_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 7, 7, 1, 99 } /* (1..99) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_TrafficLoadReductionIndication_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_TrafficLoadReductionIndication = { "TrafficLoadReductionIndication", "TrafficLoadReductionIndication", &asn_OP_NativeInteger, asn_DEF_S1AP_TrafficLoadReductionIndication_tags_1, sizeof(asn_DEF_S1AP_TrafficLoadReductionIndication_tags_1) /sizeof(asn_DEF_S1AP_TrafficLoadReductionIndication_tags_1[0]), /* 1 */ asn_DEF_S1AP_TrafficLoadReductionIndication_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TrafficLoadReductionIndication_tags_1) /sizeof(asn_DEF_S1AP_TrafficLoadReductionIndication_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_TrafficLoadReductionIndication_constr_1, &asn_PER_type_S1AP_TrafficLoadReductionIndication_constr_1, S1AP_TrafficLoadReductionIndication_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TrafficLoadReductionIndication.h000066400000000000000000000031171333553357400246670ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TrafficLoadReductionIndication_H_ #define _S1AP_TrafficLoadReductionIndication_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_TrafficLoadReductionIndication */ typedef long S1AP_TrafficLoadReductionIndication_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TrafficLoadReductionIndication; asn_struct_free_f S1AP_TrafficLoadReductionIndication_free; asn_struct_print_f S1AP_TrafficLoadReductionIndication_print; asn_constr_check_f S1AP_TrafficLoadReductionIndication_constraint; ber_type_decoder_f S1AP_TrafficLoadReductionIndication_decode_ber; der_type_encoder_f S1AP_TrafficLoadReductionIndication_encode_der; xer_type_decoder_f S1AP_TrafficLoadReductionIndication_decode_xer; xer_type_encoder_f S1AP_TrafficLoadReductionIndication_encode_xer; oer_type_decoder_f S1AP_TrafficLoadReductionIndication_decode_oer; oer_type_encoder_f S1AP_TrafficLoadReductionIndication_encode_oer; per_type_decoder_f S1AP_TrafficLoadReductionIndication_decode_uper; per_type_encoder_f S1AP_TrafficLoadReductionIndication_encode_uper; per_type_decoder_f S1AP_TrafficLoadReductionIndication_decode_aper; per_type_encoder_f S1AP_TrafficLoadReductionIndication_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_TrafficLoadReductionIndication_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TransportInformation.c000066400000000000000000000042211333553357400230240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TransportInformation.h" static asn_TYPE_member_t asn_MBR_S1AP_TransportInformation_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TransportInformation, transportLayerAddress), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "transportLayerAddress" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_TransportInformation, uL_GTP_TEID), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_GTP_TEID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "uL-GTP-TEID" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_TransportInformation_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TransportInformation_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* transportLayerAddress */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* uL-GTP-TEID */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_TransportInformation_specs_1 = { sizeof(struct S1AP_TransportInformation), offsetof(struct S1AP_TransportInformation, _asn_ctx), asn_MAP_S1AP_TransportInformation_tag2el_1, 2, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TransportInformation = { "TransportInformation", "TransportInformation", &asn_OP_SEQUENCE, asn_DEF_S1AP_TransportInformation_tags_1, sizeof(asn_DEF_S1AP_TransportInformation_tags_1) /sizeof(asn_DEF_S1AP_TransportInformation_tags_1[0]), /* 1 */ asn_DEF_S1AP_TransportInformation_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TransportInformation_tags_1) /sizeof(asn_DEF_S1AP_TransportInformation_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TransportInformation_1, 2, /* Elements count */ &asn_SPC_S1AP_TransportInformation_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TransportInformation.h000066400000000000000000000020101333553357400230230ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TransportInformation_H_ #define _S1AP_TransportInformation_H_ #include /* Including external dependencies */ #include "S1AP_TransportLayerAddress.h" #include "S1AP_GTP-TEID.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_TransportInformation */ typedef struct S1AP_TransportInformation { S1AP_TransportLayerAddress_t transportLayerAddress; S1AP_GTP_TEID_t uL_GTP_TEID; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TransportInformation_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TransportInformation; #ifdef __cplusplus } #endif #endif /* _S1AP_TransportInformation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TransportLayerAddress.c000066400000000000000000000042601333553357400231240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TransportLayerAddress.h" int S1AP_TransportLayerAddress_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size >= 1 && size <= 160)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_TransportLayerAddress_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(0..MAX)) */}; asn_per_constraints_t asn_PER_type_S1AP_TransportLayerAddress_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED | APC_EXTENSIBLE, 8, 8, 1, 160 } /* (SIZE(1..160,...)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_TransportLayerAddress_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_TransportLayerAddress = { "TransportLayerAddress", "TransportLayerAddress", &asn_OP_BIT_STRING, asn_DEF_S1AP_TransportLayerAddress_tags_1, sizeof(asn_DEF_S1AP_TransportLayerAddress_tags_1) /sizeof(asn_DEF_S1AP_TransportLayerAddress_tags_1[0]), /* 1 */ asn_DEF_S1AP_TransportLayerAddress_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TransportLayerAddress_tags_1) /sizeof(asn_DEF_S1AP_TransportLayerAddress_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_TransportLayerAddress_constr_1, &asn_PER_type_S1AP_TransportLayerAddress_constr_1, S1AP_TransportLayerAddress_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TransportLayerAddress.h000066400000000000000000000027701333553357400231350ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TransportLayerAddress_H_ #define _S1AP_TransportLayerAddress_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_TransportLayerAddress */ typedef BIT_STRING_t S1AP_TransportLayerAddress_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_TransportLayerAddress_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_TransportLayerAddress; asn_struct_free_f S1AP_TransportLayerAddress_free; asn_struct_print_f S1AP_TransportLayerAddress_print; asn_constr_check_f S1AP_TransportLayerAddress_constraint; ber_type_decoder_f S1AP_TransportLayerAddress_decode_ber; der_type_encoder_f S1AP_TransportLayerAddress_encode_der; xer_type_decoder_f S1AP_TransportLayerAddress_decode_xer; xer_type_encoder_f S1AP_TransportLayerAddress_encode_xer; oer_type_decoder_f S1AP_TransportLayerAddress_decode_oer; oer_type_encoder_f S1AP_TransportLayerAddress_encode_oer; per_type_decoder_f S1AP_TransportLayerAddress_decode_uper; per_type_encoder_f S1AP_TransportLayerAddress_encode_uper; per_type_decoder_f S1AP_TransportLayerAddress_decode_aper; per_type_encoder_f S1AP_TransportLayerAddress_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_TransportLayerAddress_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TriggeringMessage.c000066400000000000000000000042331333553357400222330ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-CommonDataTypes" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TriggeringMessage.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_TriggeringMessage_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_TriggeringMessage_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_TriggeringMessage_value2enum_1[] = { { 0, 18, "initiating-message" }, { 1, 18, "successful-outcome" }, { 2, 21, "unsuccessfull-outcome" } }; static const unsigned int asn_MAP_S1AP_TriggeringMessage_enum2value_1[] = { 0, /* initiating-message(0) */ 1, /* successful-outcome(1) */ 2 /* unsuccessfull-outcome(2) */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_TriggeringMessage_specs_1 = { asn_MAP_S1AP_TriggeringMessage_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_TriggeringMessage_enum2value_1, /* N => "tag"; sorted by N */ 3, /* Number of elements in the maps */ 0, /* Enumeration is not extensible */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_TriggeringMessage_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_TriggeringMessage = { "TriggeringMessage", "TriggeringMessage", &asn_OP_NativeEnumerated, asn_DEF_S1AP_TriggeringMessage_tags_1, sizeof(asn_DEF_S1AP_TriggeringMessage_tags_1) /sizeof(asn_DEF_S1AP_TriggeringMessage_tags_1[0]), /* 1 */ asn_DEF_S1AP_TriggeringMessage_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TriggeringMessage_tags_1) /sizeof(asn_DEF_S1AP_TriggeringMessage_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_TriggeringMessage_constr_1, &asn_PER_type_S1AP_TriggeringMessage_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_TriggeringMessage_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TriggeringMessage.h000066400000000000000000000032411333553357400222360ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-CommonDataTypes" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TriggeringMessage_H_ #define _S1AP_TriggeringMessage_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_TriggeringMessage { S1AP_TriggeringMessage_initiating_message = 0, S1AP_TriggeringMessage_successful_outcome = 1, S1AP_TriggeringMessage_unsuccessfull_outcome = 2 } e_S1AP_TriggeringMessage; /* S1AP_TriggeringMessage */ typedef long S1AP_TriggeringMessage_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_TriggeringMessage_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_TriggeringMessage; extern const asn_INTEGER_specifics_t asn_SPC_TriggeringMessage_specs_1; asn_struct_free_f TriggeringMessage_free; asn_struct_print_f TriggeringMessage_print; asn_constr_check_f TriggeringMessage_constraint; ber_type_decoder_f TriggeringMessage_decode_ber; der_type_encoder_f TriggeringMessage_encode_der; xer_type_decoder_f TriggeringMessage_decode_xer; xer_type_encoder_f TriggeringMessage_encode_xer; oer_type_decoder_f TriggeringMessage_decode_oer; oer_type_encoder_f TriggeringMessage_encode_oer; per_type_decoder_f TriggeringMessage_decode_uper; per_type_encoder_f TriggeringMessage_encode_uper; per_type_decoder_f TriggeringMessage_decode_aper; per_type_encoder_f TriggeringMessage_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_TriggeringMessage_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TunnelInformation.c000066400000000000000000000051401333553357400222760ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TunnelInformation.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_TunnelInformation_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_TunnelInformation, transportLayerAddress), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TransportLayerAddress, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "transportLayerAddress" }, { ATF_POINTER, 2, offsetof(struct S1AP_TunnelInformation, uDP_Port_Number), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Port_Number, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "uDP-Port-Number" }, { ATF_POINTER, 1, offsetof(struct S1AP_TunnelInformation, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P108, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_TunnelInformation_oms_1[] = { 1, 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_TunnelInformation_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_TunnelInformation_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* transportLayerAddress */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* uDP-Port-Number */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_TunnelInformation_specs_1 = { sizeof(struct S1AP_TunnelInformation), offsetof(struct S1AP_TunnelInformation, _asn_ctx), asn_MAP_S1AP_TunnelInformation_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_TunnelInformation_oms_1, /* Optional members */ 2, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_TunnelInformation = { "TunnelInformation", "TunnelInformation", &asn_OP_SEQUENCE, asn_DEF_S1AP_TunnelInformation_tags_1, sizeof(asn_DEF_S1AP_TunnelInformation_tags_1) /sizeof(asn_DEF_S1AP_TunnelInformation_tags_1[0]), /* 1 */ asn_DEF_S1AP_TunnelInformation_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TunnelInformation_tags_1) /sizeof(asn_DEF_S1AP_TunnelInformation_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_TunnelInformation_1, 3, /* Elements count */ &asn_SPC_S1AP_TunnelInformation_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TunnelInformation.h000066400000000000000000000022271333553357400223060ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TunnelInformation_H_ #define _S1AP_TunnelInformation_H_ #include /* Including external dependencies */ #include "S1AP_TransportLayerAddress.h" #include "S1AP_Port-Number.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_TunnelInformation */ typedef struct S1AP_TunnelInformation { S1AP_TransportLayerAddress_t transportLayerAddress; S1AP_Port_Number_t *uDP_Port_Number; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_TunnelInformation_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_TunnelInformation; #ifdef __cplusplus } #endif #endif /* _S1AP_TunnelInformation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TypeOfError.c000066400000000000000000000037751333553357400210570ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_TypeOfError.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_TypeOfError_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_TypeOfError_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_TypeOfError_value2enum_1[] = { { 0, 14, "not-understood" }, { 1, 7, "missing" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_TypeOfError_enum2value_1[] = { 1, /* missing(1) */ 0 /* not-understood(0) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_TypeOfError_specs_1 = { asn_MAP_S1AP_TypeOfError_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_TypeOfError_enum2value_1, /* N => "tag"; sorted by N */ 2, /* Number of elements in the maps */ 3, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_TypeOfError_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_TypeOfError = { "TypeOfError", "TypeOfError", &asn_OP_NativeEnumerated, asn_DEF_S1AP_TypeOfError_tags_1, sizeof(asn_DEF_S1AP_TypeOfError_tags_1) /sizeof(asn_DEF_S1AP_TypeOfError_tags_1[0]), /* 1 */ asn_DEF_S1AP_TypeOfError_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_TypeOfError_tags_1) /sizeof(asn_DEF_S1AP_TypeOfError_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_TypeOfError_constr_1, &asn_PER_type_S1AP_TypeOfError_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_TypeOfError_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_TypeOfError.h000066400000000000000000000027441333553357400210570ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_TypeOfError_H_ #define _S1AP_TypeOfError_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_TypeOfError { S1AP_TypeOfError_not_understood = 0, S1AP_TypeOfError_missing = 1 /* * Enumeration is extensible */ } e_S1AP_TypeOfError; /* S1AP_TypeOfError */ typedef long S1AP_TypeOfError_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_TypeOfError_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_TypeOfError; extern const asn_INTEGER_specifics_t asn_SPC_TypeOfError_specs_1; asn_struct_free_f TypeOfError_free; asn_struct_print_f TypeOfError_print; asn_constr_check_f TypeOfError_constraint; ber_type_decoder_f TypeOfError_decode_ber; der_type_encoder_f TypeOfError_encode_der; xer_type_decoder_f TypeOfError_decode_xer; xer_type_encoder_f TypeOfError_encode_xer; oer_type_decoder_f TypeOfError_decode_oer; oer_type_encoder_f TypeOfError_encode_oer; per_type_decoder_f TypeOfError_decode_uper; per_type_encoder_f TypeOfError_encode_uper; per_type_decoder_f TypeOfError_decode_aper; per_type_encoder_f TypeOfError_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_TypeOfError_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UE-HistoryInformation.c000066400000000000000000000036261333553357400230100ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UE-HistoryInformation.h" #include "S1AP_LastVisitedCell-Item.h" static asn_oer_constraints_t asn_OER_type_S1AP_UE_HistoryInformation_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..16)) */}; asn_per_constraints_t asn_PER_type_S1AP_UE_HistoryInformation_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 4, 4, 1, 16 } /* (SIZE(1..16)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_UE_HistoryInformation_1[] = { { ATF_POINTER, 0, 0, -1 /* Ambiguous tag (CHOICE?) */, 0, &asn_DEF_S1AP_LastVisitedCell_Item, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UE_HistoryInformation_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_UE_HistoryInformation_specs_1 = { sizeof(struct S1AP_UE_HistoryInformation), offsetof(struct S1AP_UE_HistoryInformation, _asn_ctx), 2, /* XER encoding is XMLValueList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UE_HistoryInformation = { "UE-HistoryInformation", "UE-HistoryInformation", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_UE_HistoryInformation_tags_1, sizeof(asn_DEF_S1AP_UE_HistoryInformation_tags_1) /sizeof(asn_DEF_S1AP_UE_HistoryInformation_tags_1[0]), /* 1 */ asn_DEF_S1AP_UE_HistoryInformation_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UE_HistoryInformation_tags_1) /sizeof(asn_DEF_S1AP_UE_HistoryInformation_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_UE_HistoryInformation_constr_1, &asn_PER_type_S1AP_UE_HistoryInformation_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_UE_HistoryInformation_1, 1, /* Single element */ &asn_SPC_S1AP_UE_HistoryInformation_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UE-HistoryInformation.h000066400000000000000000000022361333553357400230110ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UE_HistoryInformation_H_ #define _S1AP_UE_HistoryInformation_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_LastVisitedCell_Item; /* S1AP_UE-HistoryInformation */ typedef struct S1AP_UE_HistoryInformation { A_SEQUENCE_OF(struct S1AP_LastVisitedCell_Item) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UE_HistoryInformation_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UE_HistoryInformation; extern asn_SET_OF_specifics_t asn_SPC_S1AP_UE_HistoryInformation_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UE_HistoryInformation_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_UE_HistoryInformation_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_UE_HistoryInformation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UE-HistoryInformationFromTheUE.c000066400000000000000000000022131333553357400245160ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UE-HistoryInformationFromTheUE.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_UE_HistoryInformationFromTheUE_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_UE_HistoryInformationFromTheUE = { "UE-HistoryInformationFromTheUE", "UE-HistoryInformationFromTheUE", &asn_OP_OCTET_STRING, asn_DEF_S1AP_UE_HistoryInformationFromTheUE_tags_1, sizeof(asn_DEF_S1AP_UE_HistoryInformationFromTheUE_tags_1) /sizeof(asn_DEF_S1AP_UE_HistoryInformationFromTheUE_tags_1[0]), /* 1 */ asn_DEF_S1AP_UE_HistoryInformationFromTheUE_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UE_HistoryInformationFromTheUE_tags_1) /sizeof(asn_DEF_S1AP_UE_HistoryInformationFromTheUE_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UE-HistoryInformationFromTheUE.h000066400000000000000000000031301333553357400245220ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UE_HistoryInformationFromTheUE_H_ #define _S1AP_UE_HistoryInformationFromTheUE_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UE-HistoryInformationFromTheUE */ typedef OCTET_STRING_t S1AP_UE_HistoryInformationFromTheUE_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UE_HistoryInformationFromTheUE; asn_struct_free_f S1AP_UE_HistoryInformationFromTheUE_free; asn_struct_print_f S1AP_UE_HistoryInformationFromTheUE_print; asn_constr_check_f S1AP_UE_HistoryInformationFromTheUE_constraint; ber_type_decoder_f S1AP_UE_HistoryInformationFromTheUE_decode_ber; der_type_encoder_f S1AP_UE_HistoryInformationFromTheUE_encode_der; xer_type_decoder_f S1AP_UE_HistoryInformationFromTheUE_decode_xer; xer_type_encoder_f S1AP_UE_HistoryInformationFromTheUE_encode_xer; oer_type_decoder_f S1AP_UE_HistoryInformationFromTheUE_decode_oer; oer_type_encoder_f S1AP_UE_HistoryInformationFromTheUE_encode_oer; per_type_decoder_f S1AP_UE_HistoryInformationFromTheUE_decode_uper; per_type_encoder_f S1AP_UE_HistoryInformationFromTheUE_encode_uper; per_type_decoder_f S1AP_UE_HistoryInformationFromTheUE_decode_aper; per_type_encoder_f S1AP_UE_HistoryInformationFromTheUE_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_UE_HistoryInformationFromTheUE_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UE-RLF-Report-Container-for-extended-bands.c000066400000000000000000000024171333553357400264210ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UE-RLF-Report-Container-for-extended-bands.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_UE_RLF_Report_Container_for_extended_bands_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_UE_RLF_Report_Container_for_extended_bands = { "UE-RLF-Report-Container-for-extended-bands", "UE-RLF-Report-Container-for-extended-bands", &asn_OP_OCTET_STRING, asn_DEF_S1AP_UE_RLF_Report_Container_for_extended_bands_tags_1, sizeof(asn_DEF_S1AP_UE_RLF_Report_Container_for_extended_bands_tags_1) /sizeof(asn_DEF_S1AP_UE_RLF_Report_Container_for_extended_bands_tags_1[0]), /* 1 */ asn_DEF_S1AP_UE_RLF_Report_Container_for_extended_bands_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UE_RLF_Report_Container_for_extended_bands_tags_1) /sizeof(asn_DEF_S1AP_UE_RLF_Report_Container_for_extended_bands_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UE-RLF-Report-Container-for-extended-bands.h000066400000000000000000000034741333553357400264320ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UE_RLF_Report_Container_for_extended_bands_H_ #define _S1AP_UE_RLF_Report_Container_for_extended_bands_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UE-RLF-Report-Container-for-extended-bands */ typedef OCTET_STRING_t S1AP_UE_RLF_Report_Container_for_extended_bands_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UE_RLF_Report_Container_for_extended_bands; asn_struct_free_f S1AP_UE_RLF_Report_Container_for_extended_bands_free; asn_struct_print_f S1AP_UE_RLF_Report_Container_for_extended_bands_print; asn_constr_check_f S1AP_UE_RLF_Report_Container_for_extended_bands_constraint; ber_type_decoder_f S1AP_UE_RLF_Report_Container_for_extended_bands_decode_ber; der_type_encoder_f S1AP_UE_RLF_Report_Container_for_extended_bands_encode_der; xer_type_decoder_f S1AP_UE_RLF_Report_Container_for_extended_bands_decode_xer; xer_type_encoder_f S1AP_UE_RLF_Report_Container_for_extended_bands_encode_xer; oer_type_decoder_f S1AP_UE_RLF_Report_Container_for_extended_bands_decode_oer; oer_type_encoder_f S1AP_UE_RLF_Report_Container_for_extended_bands_encode_oer; per_type_decoder_f S1AP_UE_RLF_Report_Container_for_extended_bands_decode_uper; per_type_encoder_f S1AP_UE_RLF_Report_Container_for_extended_bands_encode_uper; per_type_decoder_f S1AP_UE_RLF_Report_Container_for_extended_bands_decode_aper; per_type_encoder_f S1AP_UE_RLF_Report_Container_for_extended_bands_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_UE_RLF_Report_Container_for_extended_bands_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UE-RLF-Report-Container.c000066400000000000000000000020761333553357400227530ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UE-RLF-Report-Container.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_UE_RLF_Report_Container_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_UE_RLF_Report_Container = { "UE-RLF-Report-Container", "UE-RLF-Report-Container", &asn_OP_OCTET_STRING, asn_DEF_S1AP_UE_RLF_Report_Container_tags_1, sizeof(asn_DEF_S1AP_UE_RLF_Report_Container_tags_1) /sizeof(asn_DEF_S1AP_UE_RLF_Report_Container_tags_1[0]), /* 1 */ asn_DEF_S1AP_UE_RLF_Report_Container_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UE_RLF_Report_Container_tags_1) /sizeof(asn_DEF_S1AP_UE_RLF_Report_Container_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UE-RLF-Report-Container.h000066400000000000000000000027231333553357400227570ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UE_RLF_Report_Container_H_ #define _S1AP_UE_RLF_Report_Container_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UE-RLF-Report-Container */ typedef OCTET_STRING_t S1AP_UE_RLF_Report_Container_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UE_RLF_Report_Container; asn_struct_free_f S1AP_UE_RLF_Report_Container_free; asn_struct_print_f S1AP_UE_RLF_Report_Container_print; asn_constr_check_f S1AP_UE_RLF_Report_Container_constraint; ber_type_decoder_f S1AP_UE_RLF_Report_Container_decode_ber; der_type_encoder_f S1AP_UE_RLF_Report_Container_encode_der; xer_type_decoder_f S1AP_UE_RLF_Report_Container_decode_xer; xer_type_encoder_f S1AP_UE_RLF_Report_Container_encode_xer; oer_type_decoder_f S1AP_UE_RLF_Report_Container_decode_oer; oer_type_encoder_f S1AP_UE_RLF_Report_Container_encode_oer; per_type_decoder_f S1AP_UE_RLF_Report_Container_decode_uper; per_type_encoder_f S1AP_UE_RLF_Report_Container_encode_uper; per_type_decoder_f S1AP_UE_RLF_Report_Container_decode_aper; per_type_encoder_f S1AP_UE_RLF_Report_Container_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_UE_RLF_Report_Container_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UE-RetentionInformation.c000066400000000000000000000043301333553357400233070ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UE-RetentionInformation.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_UE_RetentionInformation_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_UE_RetentionInformation_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_UE_RetentionInformation_value2enum_1[] = { { 0, 12, "ues-retained" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_UE_RetentionInformation_enum2value_1[] = { 0 /* ues-retained(0) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_UE_RetentionInformation_specs_1 = { asn_MAP_S1AP_UE_RetentionInformation_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_UE_RetentionInformation_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_UE_RetentionInformation_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_UE_RetentionInformation = { "UE-RetentionInformation", "UE-RetentionInformation", &asn_OP_NativeEnumerated, asn_DEF_S1AP_UE_RetentionInformation_tags_1, sizeof(asn_DEF_S1AP_UE_RetentionInformation_tags_1) /sizeof(asn_DEF_S1AP_UE_RetentionInformation_tags_1[0]), /* 1 */ asn_DEF_S1AP_UE_RetentionInformation_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UE_RetentionInformation_tags_1) /sizeof(asn_DEF_S1AP_UE_RetentionInformation_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_UE_RetentionInformation_constr_1, &asn_PER_type_S1AP_UE_RetentionInformation_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_UE_RetentionInformation_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UE-RetentionInformation.h000066400000000000000000000032051333553357400233140ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UE_RetentionInformation_H_ #define _S1AP_UE_RetentionInformation_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_UE_RetentionInformation { S1AP_UE_RetentionInformation_ues_retained = 0 /* * Enumeration is extensible */ } e_S1AP_UE_RetentionInformation; /* S1AP_UE-RetentionInformation */ typedef long S1AP_UE_RetentionInformation_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UE_RetentionInformation; asn_struct_free_f S1AP_UE_RetentionInformation_free; asn_struct_print_f S1AP_UE_RetentionInformation_print; asn_constr_check_f S1AP_UE_RetentionInformation_constraint; ber_type_decoder_f S1AP_UE_RetentionInformation_decode_ber; der_type_encoder_f S1AP_UE_RetentionInformation_encode_der; xer_type_decoder_f S1AP_UE_RetentionInformation_decode_xer; xer_type_encoder_f S1AP_UE_RetentionInformation_encode_xer; oer_type_decoder_f S1AP_UE_RetentionInformation_decode_oer; oer_type_encoder_f S1AP_UE_RetentionInformation_encode_oer; per_type_decoder_f S1AP_UE_RetentionInformation_decode_uper; per_type_encoder_f S1AP_UE_RetentionInformation_encode_uper; per_type_decoder_f S1AP_UE_RetentionInformation_decode_aper; per_type_encoder_f S1AP_UE_RetentionInformation_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_UE_RetentionInformation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UE-S1AP-ID-pair.c000066400000000000000000000050031333553357400210570ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UE-S1AP-ID-pair.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_UE_S1AP_ID_pair_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UE_S1AP_ID_pair, mME_UE_S1AP_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "mME-UE-S1AP-ID" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UE_S1AP_ID_pair, eNB_UE_S1AP_ID), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "eNB-UE-S1AP-ID" }, { ATF_POINTER, 1, offsetof(struct S1AP_UE_S1AP_ID_pair, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P110, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_UE_S1AP_ID_pair_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_UE_S1AP_ID_pair_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UE_S1AP_ID_pair_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* mME-UE-S1AP-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* eNB-UE-S1AP-ID */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UE_S1AP_ID_pair_specs_1 = { sizeof(struct S1AP_UE_S1AP_ID_pair), offsetof(struct S1AP_UE_S1AP_ID_pair, _asn_ctx), asn_MAP_S1AP_UE_S1AP_ID_pair_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_UE_S1AP_ID_pair_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UE_S1AP_ID_pair = { "UE-S1AP-ID-pair", "UE-S1AP-ID-pair", &asn_OP_SEQUENCE, asn_DEF_S1AP_UE_S1AP_ID_pair_tags_1, sizeof(asn_DEF_S1AP_UE_S1AP_ID_pair_tags_1) /sizeof(asn_DEF_S1AP_UE_S1AP_ID_pair_tags_1[0]), /* 1 */ asn_DEF_S1AP_UE_S1AP_ID_pair_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UE_S1AP_ID_pair_tags_1) /sizeof(asn_DEF_S1AP_UE_S1AP_ID_pair_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UE_S1AP_ID_pair_1, 3, /* Elements count */ &asn_SPC_S1AP_UE_S1AP_ID_pair_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UE-S1AP-ID-pair.h000066400000000000000000000023541333553357400210720ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UE_S1AP_ID_pair_H_ #define _S1AP_UE_S1AP_ID_pair_H_ #include /* Including external dependencies */ #include "S1AP_MME-UE-S1AP-ID.h" #include "S1AP_ENB-UE-S1AP-ID.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_UE-S1AP-ID-pair */ typedef struct S1AP_UE_S1AP_ID_pair { S1AP_MME_UE_S1AP_ID_t mME_UE_S1AP_ID; S1AP_ENB_UE_S1AP_ID_t eNB_UE_S1AP_ID; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UE_S1AP_ID_pair_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UE_S1AP_ID_pair; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UE_S1AP_ID_pair_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UE_S1AP_ID_pair_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_UE_S1AP_ID_pair_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UE-S1AP-IDs.c000066400000000000000000000042631333553357400203200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UE-S1AP-IDs.h" #include "S1AP_UE-S1AP-ID-pair.h" static asn_oer_constraints_t asn_OER_type_S1AP_UE_S1AP_IDs_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_UE_S1AP_IDs_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_UE_S1AP_IDs_1[] = { { ATF_POINTER, 0, offsetof(struct S1AP_UE_S1AP_IDs, choice.uE_S1AP_ID_pair), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_UE_S1AP_ID_pair, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "uE-S1AP-ID-pair" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UE_S1AP_IDs, choice.mME_UE_S1AP_ID), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "mME-UE-S1AP-ID" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UE_S1AP_IDs_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* uE-S1AP-ID-pair */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* mME-UE-S1AP-ID */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_UE_S1AP_IDs_specs_1 = { sizeof(struct S1AP_UE_S1AP_IDs), offsetof(struct S1AP_UE_S1AP_IDs, _asn_ctx), offsetof(struct S1AP_UE_S1AP_IDs, present), sizeof(((struct S1AP_UE_S1AP_IDs *)0)->present), asn_MAP_S1AP_UE_S1AP_IDs_tag2el_1, 2, /* Count of tags in the map */ 0, 0, 2 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UE_S1AP_IDs = { "UE-S1AP-IDs", "UE-S1AP-IDs", &asn_OP_CHOICE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { &asn_OER_type_S1AP_UE_S1AP_IDs_constr_1, &asn_PER_type_S1AP_UE_S1AP_IDs_constr_1, CHOICE_constraint }, asn_MBR_S1AP_UE_S1AP_IDs_1, 2, /* Elements count */ &asn_SPC_S1AP_UE_S1AP_IDs_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UE-S1AP-IDs.h000066400000000000000000000024421333553357400203220ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UE_S1AP_IDs_H_ #define _S1AP_UE_S1AP_IDs_H_ #include /* Including external dependencies */ #include "S1AP_MME-UE-S1AP-ID.h" #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_UE_S1AP_IDs_PR { S1AP_UE_S1AP_IDs_PR_NOTHING, /* No components present */ S1AP_UE_S1AP_IDs_PR_uE_S1AP_ID_pair, S1AP_UE_S1AP_IDs_PR_mME_UE_S1AP_ID /* Extensions may appear below */ } S1AP_UE_S1AP_IDs_PR; /* Forward declarations */ struct S1AP_UE_S1AP_ID_pair; /* S1AP_UE-S1AP-IDs */ typedef struct S1AP_UE_S1AP_IDs { S1AP_UE_S1AP_IDs_PR present; union S1AP_UE_S1AP_IDs_u { struct S1AP_UE_S1AP_ID_pair *uE_S1AP_ID_pair; S1AP_MME_UE_S1AP_ID_t mME_UE_S1AP_ID; /* * This type is extensible, * possible extensions are below. */ } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UE_S1AP_IDs_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UE_S1AP_IDs; #ifdef __cplusplus } #endif #endif /* _S1AP_UE_S1AP_IDs_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UE-Usage-Type.c000066400000000000000000000035551333553357400211250ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UE-Usage-Type.h" int S1AP_UE_Usage_Type_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 255)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using NativeInteger, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_UE_Usage_Type_constr_1 CC_NOTUSED = { { 1, 1 } /* (0..255) */, -1}; static asn_per_constraints_t asn_PER_type_S1AP_UE_Usage_Type_constr_1 CC_NOTUSED = { { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_UE_Usage_Type_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (2 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_UE_Usage_Type = { "UE-Usage-Type", "UE-Usage-Type", &asn_OP_NativeInteger, asn_DEF_S1AP_UE_Usage_Type_tags_1, sizeof(asn_DEF_S1AP_UE_Usage_Type_tags_1) /sizeof(asn_DEF_S1AP_UE_Usage_Type_tags_1[0]), /* 1 */ asn_DEF_S1AP_UE_Usage_Type_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UE_Usage_Type_tags_1) /sizeof(asn_DEF_S1AP_UE_Usage_Type_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_UE_Usage_Type_constr_1, &asn_PER_type_S1AP_UE_Usage_Type_constr_1, S1AP_UE_Usage_Type_constraint }, 0, 0, /* No members */ 0 /* No specifics */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UE-Usage-Type.h000066400000000000000000000024141333553357400211230ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UE_Usage_Type_H_ #define _S1AP_UE_Usage_Type_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UE-Usage-Type */ typedef long S1AP_UE_Usage_Type_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UE_Usage_Type; asn_struct_free_f S1AP_UE_Usage_Type_free; asn_struct_print_f S1AP_UE_Usage_Type_print; asn_constr_check_f S1AP_UE_Usage_Type_constraint; ber_type_decoder_f S1AP_UE_Usage_Type_decode_ber; der_type_encoder_f S1AP_UE_Usage_Type_encode_der; xer_type_decoder_f S1AP_UE_Usage_Type_decode_xer; xer_type_encoder_f S1AP_UE_Usage_Type_encode_xer; oer_type_decoder_f S1AP_UE_Usage_Type_decode_oer; oer_type_encoder_f S1AP_UE_Usage_Type_encode_oer; per_type_decoder_f S1AP_UE_Usage_Type_decode_uper; per_type_encoder_f S1AP_UE_Usage_Type_encode_uper; per_type_decoder_f S1AP_UE_Usage_Type_decode_aper; per_type_encoder_f S1AP_UE_Usage_Type_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_UE_Usage_Type_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UE-associatedLogicalS1-ConnectionItem.c000066400000000000000000000060471333553357400256730ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UE-associatedLogicalS1-ConnectionItem.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_UE_associatedLogicalS1_ConnectionItem_1[] = { { ATF_POINTER, 3, offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItem, mME_UE_S1AP_ID), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_MME_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "mME-UE-S1AP-ID" }, { ATF_POINTER, 2, offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItem, eNB_UE_S1AP_ID), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ENB_UE_S1AP_ID, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "eNB-UE-S1AP-ID" }, { ATF_POINTER, 1, offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItem, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P111, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_UE_associatedLogicalS1_ConnectionItem_oms_1[] = { 0, 1, 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItem_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UE_associatedLogicalS1_ConnectionItem_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* mME-UE-S1AP-ID */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* eNB-UE-S1AP-ID */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_UE_associatedLogicalS1_ConnectionItem_specs_1 = { sizeof(struct S1AP_UE_associatedLogicalS1_ConnectionItem), offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionItem, _asn_ctx), asn_MAP_S1AP_UE_associatedLogicalS1_ConnectionItem_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_UE_associatedLogicalS1_ConnectionItem_oms_1, /* Optional members */ 3, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItem = { "UE-associatedLogicalS1-ConnectionItem", "UE-associatedLogicalS1-ConnectionItem", &asn_OP_SEQUENCE, asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItem_tags_1, sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItem_tags_1) /sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItem_tags_1[0]), /* 1 */ asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItem_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItem_tags_1) /sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItem_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UE_associatedLogicalS1_ConnectionItem_1, 3, /* Elements count */ &asn_SPC_S1AP_UE_associatedLogicalS1_ConnectionItem_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UE-associatedLogicalS1-ConnectionItem.h000066400000000000000000000024421333553357400256730ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UE_associatedLogicalS1_ConnectionItem_H_ #define _S1AP_UE_associatedLogicalS1_ConnectionItem_H_ #include /* Including external dependencies */ #include "S1AP_MME-UE-S1AP-ID.h" #include "S1AP_ENB-UE-S1AP-ID.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_UE-associatedLogicalS1-ConnectionItem */ typedef struct S1AP_UE_associatedLogicalS1_ConnectionItem { S1AP_MME_UE_S1AP_ID_t *mME_UE_S1AP_ID; /* OPTIONAL */ S1AP_ENB_UE_S1AP_ID_t *eNB_UE_S1AP_ID; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UE_associatedLogicalS1_ConnectionItem_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionItem; #ifdef __cplusplus } #endif #endif /* _S1AP_UE_associatedLogicalS1_ConnectionItem_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UE-associatedLogicalS1-ConnectionListRes.c000066400000000000000000000045211333553357400263550ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UE-associatedLogicalS1-ConnectionListRes.h" #include "S1AP_ProtocolIE-SingleContainer.h" static asn_oer_constraints_t asn_OER_type_S1AP_UE_associatedLogicalS1_ConnectionListRes_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; asn_per_constraints_t asn_PER_type_S1AP_UE_associatedLogicalS1_ConnectionListRes_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; asn_TYPE_member_t asn_MBR_S1AP_UE_associatedLogicalS1_ConnectionListRes_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P8, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionListRes_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; asn_SET_OF_specifics_t asn_SPC_S1AP_UE_associatedLogicalS1_ConnectionListRes_specs_1 = { sizeof(struct S1AP_UE_associatedLogicalS1_ConnectionListRes), offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionListRes, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionListRes = { "UE-associatedLogicalS1-ConnectionListRes", "UE-associatedLogicalS1-ConnectionListRes", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionListRes_tags_1, sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionListRes_tags_1) /sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionListRes_tags_1[0]), /* 1 */ asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionListRes_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionListRes_tags_1) /sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionListRes_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_UE_associatedLogicalS1_ConnectionListRes_constr_1, &asn_PER_type_S1AP_UE_associatedLogicalS1_ConnectionListRes_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_UE_associatedLogicalS1_ConnectionListRes_1, 1, /* Single element */ &asn_SPC_S1AP_UE_associatedLogicalS1_ConnectionListRes_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UE-associatedLogicalS1-ConnectionListRes.h000066400000000000000000000025611333553357400263640ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UE_associatedLogicalS1_ConnectionListRes_H_ #define _S1AP_UE_associatedLogicalS1_ConnectionListRes_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolIE_SingleContainer; /* S1AP_UE-associatedLogicalS1-ConnectionListRes */ typedef struct S1AP_UE_associatedLogicalS1_ConnectionListRes { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UE_associatedLogicalS1_ConnectionListRes_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionListRes; extern asn_SET_OF_specifics_t asn_SPC_S1AP_UE_associatedLogicalS1_ConnectionListRes_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UE_associatedLogicalS1_ConnectionListRes_1[1]; extern asn_per_constraints_t asn_PER_type_S1AP_UE_associatedLogicalS1_ConnectionListRes_constr_1; #ifdef __cplusplus } #endif #endif /* _S1AP_UE_associatedLogicalS1_ConnectionListRes_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UE-associatedLogicalS1-ConnectionListResAck.c000066400000000000000000000046451333553357400270030ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UE-associatedLogicalS1-ConnectionListResAck.h" #include "S1AP_ProtocolIE-SingleContainer.h" static asn_oer_constraints_t asn_OER_type_S1AP_UE_associatedLogicalS1_ConnectionListResAck_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..256)) */}; static asn_per_constraints_t asn_PER_type_S1AP_UE_associatedLogicalS1_ConnectionListResAck_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 8, 8, 1, 256 } /* (SIZE(1..256)) */, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_UE_associatedLogicalS1_ConnectionListResAck_1[] = { { ATF_POINTER, 0, 0, (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ProtocolIE_SingleContainer_6554P9, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionListResAck_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static asn_SET_OF_specifics_t asn_SPC_S1AP_UE_associatedLogicalS1_ConnectionListResAck_specs_1 = { sizeof(struct S1AP_UE_associatedLogicalS1_ConnectionListResAck), offsetof(struct S1AP_UE_associatedLogicalS1_ConnectionListResAck, _asn_ctx), 0, /* XER encoding is XMLDelimitedItemList */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionListResAck = { "UE-associatedLogicalS1-ConnectionListResAck", "UE-associatedLogicalS1-ConnectionListResAck", &asn_OP_SEQUENCE_OF, asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionListResAck_tags_1, sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionListResAck_tags_1) /sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionListResAck_tags_1[0]), /* 1 */ asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionListResAck_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionListResAck_tags_1) /sizeof(asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionListResAck_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_UE_associatedLogicalS1_ConnectionListResAck_constr_1, &asn_PER_type_S1AP_UE_associatedLogicalS1_ConnectionListResAck_constr_1, SEQUENCE_OF_constraint }, asn_MBR_S1AP_UE_associatedLogicalS1_ConnectionListResAck_1, 1, /* Single element */ &asn_SPC_S1AP_UE_associatedLogicalS1_ConnectionListResAck_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UE-associatedLogicalS1-ConnectionListResAck.h000066400000000000000000000021621333553357400270000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UE_associatedLogicalS1_ConnectionListResAck_H_ #define _S1AP_UE_associatedLogicalS1_ConnectionListResAck_H_ #include /* Including external dependencies */ #include #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolIE_SingleContainer; /* S1AP_UE-associatedLogicalS1-ConnectionListResAck */ typedef struct S1AP_UE_associatedLogicalS1_ConnectionListResAck { A_SEQUENCE_OF(struct S1AP_ProtocolIE_SingleContainer) list; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UE_associatedLogicalS1_ConnectionListResAck_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UE_associatedLogicalS1_ConnectionListResAck; #ifdef __cplusplus } #endif #endif /* _S1AP_UE_associatedLogicalS1_ConnectionListResAck_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEAggregateMaximumBitrate.c000066400000000000000000000055011333553357400236150ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UEAggregateMaximumBitrate.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_UEAggregateMaximumBitrate_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEAggregateMaximumBitrate, uEaggregateMaximumBitRateDL), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_BitRate, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "uEaggregateMaximumBitRateDL" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEAggregateMaximumBitrate, uEaggregateMaximumBitRateUL), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_BitRate, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "uEaggregateMaximumBitRateUL" }, { ATF_POINTER, 1, offsetof(struct S1AP_UEAggregateMaximumBitrate, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P109, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_UEAggregateMaximumBitrate_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_UEAggregateMaximumBitrate_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEAggregateMaximumBitrate_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* uEaggregateMaximumBitRateDL */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* uEaggregateMaximumBitRateUL */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEAggregateMaximumBitrate_specs_1 = { sizeof(struct S1AP_UEAggregateMaximumBitrate), offsetof(struct S1AP_UEAggregateMaximumBitrate, _asn_ctx), asn_MAP_S1AP_UEAggregateMaximumBitrate_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_UEAggregateMaximumBitrate_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEAggregateMaximumBitrate = { "UEAggregateMaximumBitrate", "UEAggregateMaximumBitrate", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEAggregateMaximumBitrate_tags_1, sizeof(asn_DEF_S1AP_UEAggregateMaximumBitrate_tags_1) /sizeof(asn_DEF_S1AP_UEAggregateMaximumBitrate_tags_1[0]), /* 1 */ asn_DEF_S1AP_UEAggregateMaximumBitrate_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UEAggregateMaximumBitrate_tags_1) /sizeof(asn_DEF_S1AP_UEAggregateMaximumBitrate_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEAggregateMaximumBitrate_1, 3, /* Elements count */ &asn_SPC_S1AP_UEAggregateMaximumBitrate_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEAggregateMaximumBitrate.h000066400000000000000000000022241333553357400236210ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UEAggregateMaximumBitrate_H_ #define _S1AP_UEAggregateMaximumBitrate_H_ #include /* Including external dependencies */ #include "S1AP_BitRate.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_UEAggregateMaximumBitrate */ typedef struct S1AP_UEAggregateMaximumBitrate { S1AP_BitRate_t uEaggregateMaximumBitRateDL; S1AP_BitRate_t uEaggregateMaximumBitRateUL; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEAggregateMaximumBitrate_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEAggregateMaximumBitrate; #ifdef __cplusplus } #endif #endif /* _S1AP_UEAggregateMaximumBitrate_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UECapabilityInfoIndication.c000066400000000000000000000036501333553357400237600ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UECapabilityInfoIndication.h" asn_TYPE_member_t asn_MBR_S1AP_UECapabilityInfoIndication_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UECapabilityInfoIndication, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P51, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UECapabilityInfoIndication_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UECapabilityInfoIndication_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UECapabilityInfoIndication_specs_1 = { sizeof(struct S1AP_UECapabilityInfoIndication), offsetof(struct S1AP_UECapabilityInfoIndication, _asn_ctx), asn_MAP_S1AP_UECapabilityInfoIndication_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UECapabilityInfoIndication = { "UECapabilityInfoIndication", "UECapabilityInfoIndication", &asn_OP_SEQUENCE, asn_DEF_S1AP_UECapabilityInfoIndication_tags_1, sizeof(asn_DEF_S1AP_UECapabilityInfoIndication_tags_1) /sizeof(asn_DEF_S1AP_UECapabilityInfoIndication_tags_1[0]), /* 1 */ asn_DEF_S1AP_UECapabilityInfoIndication_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UECapabilityInfoIndication_tags_1) /sizeof(asn_DEF_S1AP_UECapabilityInfoIndication_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UECapabilityInfoIndication_1, 1, /* Elements count */ &asn_SPC_S1AP_UECapabilityInfoIndication_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UECapabilityInfoIndication.h000066400000000000000000000022251333553357400237620ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UECapabilityInfoIndication_H_ #define _S1AP_UECapabilityInfoIndication_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UECapabilityInfoIndication */ typedef struct S1AP_UECapabilityInfoIndication { S1AP_ProtocolIE_Container_6551P51_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UECapabilityInfoIndication_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UECapabilityInfoIndication; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UECapabilityInfoIndication_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UECapabilityInfoIndication_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_UECapabilityInfoIndication_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextModificationConfirm.c000066400000000000000000000037201333553357400243470ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UEContextModificationConfirm.h" asn_TYPE_member_t asn_MBR_S1AP_UEContextModificationConfirm_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationConfirm, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P80, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextModificationConfirm_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextModificationConfirm_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextModificationConfirm_specs_1 = { sizeof(struct S1AP_UEContextModificationConfirm), offsetof(struct S1AP_UEContextModificationConfirm, _asn_ctx), asn_MAP_S1AP_UEContextModificationConfirm_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextModificationConfirm = { "UEContextModificationConfirm", "UEContextModificationConfirm", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextModificationConfirm_tags_1, sizeof(asn_DEF_S1AP_UEContextModificationConfirm_tags_1) /sizeof(asn_DEF_S1AP_UEContextModificationConfirm_tags_1[0]), /* 1 */ asn_DEF_S1AP_UEContextModificationConfirm_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextModificationConfirm_tags_1) /sizeof(asn_DEF_S1AP_UEContextModificationConfirm_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextModificationConfirm_1, 1, /* Elements count */ &asn_SPC_S1AP_UEContextModificationConfirm_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextModificationConfirm.h000066400000000000000000000022471333553357400243570ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UEContextModificationConfirm_H_ #define _S1AP_UEContextModificationConfirm_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UEContextModificationConfirm */ typedef struct S1AP_UEContextModificationConfirm { S1AP_ProtocolIE_Container_6551P80_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextModificationConfirm_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextModificationConfirm; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextModificationConfirm_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextModificationConfirm_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_UEContextModificationConfirm_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextModificationFailure.c000066400000000000000000000037201333553357400243410ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UEContextModificationFailure.h" asn_TYPE_member_t asn_MBR_S1AP_UEContextModificationFailure_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationFailure, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P28, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextModificationFailure_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextModificationFailure_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextModificationFailure_specs_1 = { sizeof(struct S1AP_UEContextModificationFailure), offsetof(struct S1AP_UEContextModificationFailure, _asn_ctx), asn_MAP_S1AP_UEContextModificationFailure_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextModificationFailure = { "UEContextModificationFailure", "UEContextModificationFailure", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextModificationFailure_tags_1, sizeof(asn_DEF_S1AP_UEContextModificationFailure_tags_1) /sizeof(asn_DEF_S1AP_UEContextModificationFailure_tags_1[0]), /* 1 */ asn_DEF_S1AP_UEContextModificationFailure_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextModificationFailure_tags_1) /sizeof(asn_DEF_S1AP_UEContextModificationFailure_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextModificationFailure_1, 1, /* Elements count */ &asn_SPC_S1AP_UEContextModificationFailure_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextModificationFailure.h000066400000000000000000000022471333553357400243510ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UEContextModificationFailure_H_ #define _S1AP_UEContextModificationFailure_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UEContextModificationFailure */ typedef struct S1AP_UEContextModificationFailure { S1AP_ProtocolIE_Container_6551P28_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextModificationFailure_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextModificationFailure; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextModificationFailure_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextModificationFailure_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_UEContextModificationFailure_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextModificationIndication.c000066400000000000000000000040141333553357400250300ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UEContextModificationIndication.h" asn_TYPE_member_t asn_MBR_S1AP_UEContextModificationIndication_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationIndication, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P79, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextModificationIndication_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextModificationIndication_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextModificationIndication_specs_1 = { sizeof(struct S1AP_UEContextModificationIndication), offsetof(struct S1AP_UEContextModificationIndication, _asn_ctx), asn_MAP_S1AP_UEContextModificationIndication_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextModificationIndication = { "UEContextModificationIndication", "UEContextModificationIndication", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextModificationIndication_tags_1, sizeof(asn_DEF_S1AP_UEContextModificationIndication_tags_1) /sizeof(asn_DEF_S1AP_UEContextModificationIndication_tags_1[0]), /* 1 */ asn_DEF_S1AP_UEContextModificationIndication_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextModificationIndication_tags_1) /sizeof(asn_DEF_S1AP_UEContextModificationIndication_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextModificationIndication_1, 1, /* Elements count */ &asn_SPC_S1AP_UEContextModificationIndication_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextModificationIndication.h000066400000000000000000000023021333553357400250330ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UEContextModificationIndication_H_ #define _S1AP_UEContextModificationIndication_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UEContextModificationIndication */ typedef struct S1AP_UEContextModificationIndication { S1AP_ProtocolIE_Container_6551P79_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextModificationIndication_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextModificationIndication; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextModificationIndication_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextModificationIndication_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_UEContextModificationIndication_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextModificationRequest.c000066400000000000000000000037201333553357400244020ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UEContextModificationRequest.h" asn_TYPE_member_t asn_MBR_S1AP_UEContextModificationRequest_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationRequest, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P26, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextModificationRequest_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextModificationRequest_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextModificationRequest_specs_1 = { sizeof(struct S1AP_UEContextModificationRequest), offsetof(struct S1AP_UEContextModificationRequest, _asn_ctx), asn_MAP_S1AP_UEContextModificationRequest_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextModificationRequest = { "UEContextModificationRequest", "UEContextModificationRequest", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextModificationRequest_tags_1, sizeof(asn_DEF_S1AP_UEContextModificationRequest_tags_1) /sizeof(asn_DEF_S1AP_UEContextModificationRequest_tags_1[0]), /* 1 */ asn_DEF_S1AP_UEContextModificationRequest_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextModificationRequest_tags_1) /sizeof(asn_DEF_S1AP_UEContextModificationRequest_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextModificationRequest_1, 1, /* Elements count */ &asn_SPC_S1AP_UEContextModificationRequest_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextModificationRequest.h000066400000000000000000000022471333553357400244120ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UEContextModificationRequest_H_ #define _S1AP_UEContextModificationRequest_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UEContextModificationRequest */ typedef struct S1AP_UEContextModificationRequest { S1AP_ProtocolIE_Container_6551P26_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextModificationRequest_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextModificationRequest; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextModificationRequest_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextModificationRequest_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_UEContextModificationRequest_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextModificationResponse.c000066400000000000000000000037441333553357400245560ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UEContextModificationResponse.h" asn_TYPE_member_t asn_MBR_S1AP_UEContextModificationResponse_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextModificationResponse, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P27, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextModificationResponse_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextModificationResponse_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextModificationResponse_specs_1 = { sizeof(struct S1AP_UEContextModificationResponse), offsetof(struct S1AP_UEContextModificationResponse, _asn_ctx), asn_MAP_S1AP_UEContextModificationResponse_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextModificationResponse = { "UEContextModificationResponse", "UEContextModificationResponse", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextModificationResponse_tags_1, sizeof(asn_DEF_S1AP_UEContextModificationResponse_tags_1) /sizeof(asn_DEF_S1AP_UEContextModificationResponse_tags_1[0]), /* 1 */ asn_DEF_S1AP_UEContextModificationResponse_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextModificationResponse_tags_1) /sizeof(asn_DEF_S1AP_UEContextModificationResponse_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextModificationResponse_1, 1, /* Elements count */ &asn_SPC_S1AP_UEContextModificationResponse_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextModificationResponse.h000066400000000000000000000022601333553357400245530ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UEContextModificationResponse_H_ #define _S1AP_UEContextModificationResponse_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UEContextModificationResponse */ typedef struct S1AP_UEContextModificationResponse { S1AP_ProtocolIE_Container_6551P27_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextModificationResponse_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextModificationResponse; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextModificationResponse_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextModificationResponse_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_UEContextModificationResponse_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextReleaseCommand.c000066400000000000000000000035541333553357400233100ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UEContextReleaseCommand.h" asn_TYPE_member_t asn_MBR_S1AP_UEContextReleaseCommand_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseCommand, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P24, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextReleaseCommand_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextReleaseCommand_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextReleaseCommand_specs_1 = { sizeof(struct S1AP_UEContextReleaseCommand), offsetof(struct S1AP_UEContextReleaseCommand, _asn_ctx), asn_MAP_S1AP_UEContextReleaseCommand_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextReleaseCommand = { "UEContextReleaseCommand", "UEContextReleaseCommand", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextReleaseCommand_tags_1, sizeof(asn_DEF_S1AP_UEContextReleaseCommand_tags_1) /sizeof(asn_DEF_S1AP_UEContextReleaseCommand_tags_1[0]), /* 1 */ asn_DEF_S1AP_UEContextReleaseCommand_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextReleaseCommand_tags_1) /sizeof(asn_DEF_S1AP_UEContextReleaseCommand_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextReleaseCommand_1, 1, /* Elements count */ &asn_SPC_S1AP_UEContextReleaseCommand_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextReleaseCommand.h000066400000000000000000000021721333553357400233100ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UEContextReleaseCommand_H_ #define _S1AP_UEContextReleaseCommand_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UEContextReleaseCommand */ typedef struct S1AP_UEContextReleaseCommand { S1AP_ProtocolIE_Container_6551P24_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextReleaseCommand_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextReleaseCommand; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextReleaseCommand_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextReleaseCommand_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_UEContextReleaseCommand_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextReleaseComplete.c000066400000000000000000000036001333553357400234720ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UEContextReleaseComplete.h" asn_TYPE_member_t asn_MBR_S1AP_UEContextReleaseComplete_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseComplete, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P25, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextReleaseComplete_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextReleaseComplete_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextReleaseComplete_specs_1 = { sizeof(struct S1AP_UEContextReleaseComplete), offsetof(struct S1AP_UEContextReleaseComplete, _asn_ctx), asn_MAP_S1AP_UEContextReleaseComplete_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextReleaseComplete = { "UEContextReleaseComplete", "UEContextReleaseComplete", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextReleaseComplete_tags_1, sizeof(asn_DEF_S1AP_UEContextReleaseComplete_tags_1) /sizeof(asn_DEF_S1AP_UEContextReleaseComplete_tags_1[0]), /* 1 */ asn_DEF_S1AP_UEContextReleaseComplete_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextReleaseComplete_tags_1) /sizeof(asn_DEF_S1AP_UEContextReleaseComplete_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextReleaseComplete_1, 1, /* Elements count */ &asn_SPC_S1AP_UEContextReleaseComplete_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextReleaseComplete.h000066400000000000000000000022031333553357400234750ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UEContextReleaseComplete_H_ #define _S1AP_UEContextReleaseComplete_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UEContextReleaseComplete */ typedef struct S1AP_UEContextReleaseComplete { S1AP_ProtocolIE_Container_6551P25_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextReleaseComplete_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextReleaseComplete; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextReleaseComplete_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextReleaseComplete_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_UEContextReleaseComplete_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextReleaseRequest.c000066400000000000000000000035541333553357400233620ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UEContextReleaseRequest.h" asn_TYPE_member_t asn_MBR_S1AP_UEContextReleaseRequest_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextReleaseRequest, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P23, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextReleaseRequest_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextReleaseRequest_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextReleaseRequest_specs_1 = { sizeof(struct S1AP_UEContextReleaseRequest), offsetof(struct S1AP_UEContextReleaseRequest, _asn_ctx), asn_MAP_S1AP_UEContextReleaseRequest_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextReleaseRequest = { "UEContextReleaseRequest", "UEContextReleaseRequest", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextReleaseRequest_tags_1, sizeof(asn_DEF_S1AP_UEContextReleaseRequest_tags_1) /sizeof(asn_DEF_S1AP_UEContextReleaseRequest_tags_1[0]), /* 1 */ asn_DEF_S1AP_UEContextReleaseRequest_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextReleaseRequest_tags_1) /sizeof(asn_DEF_S1AP_UEContextReleaseRequest_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextReleaseRequest_1, 1, /* Elements count */ &asn_SPC_S1AP_UEContextReleaseRequest_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextReleaseRequest.h000066400000000000000000000021721333553357400233620ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UEContextReleaseRequest_H_ #define _S1AP_UEContextReleaseRequest_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UEContextReleaseRequest */ typedef struct S1AP_UEContextReleaseRequest { S1AP_ProtocolIE_Container_6551P23_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextReleaseRequest_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextReleaseRequest; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextReleaseRequest_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextReleaseRequest_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_UEContextReleaseRequest_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextResumeFailure.c000066400000000000000000000035301333553357400231730ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UEContextResumeFailure.h" asn_TYPE_member_t asn_MBR_S1AP_UEContextResumeFailure_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeFailure, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P85, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextResumeFailure_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextResumeFailure_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextResumeFailure_specs_1 = { sizeof(struct S1AP_UEContextResumeFailure), offsetof(struct S1AP_UEContextResumeFailure, _asn_ctx), asn_MAP_S1AP_UEContextResumeFailure_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextResumeFailure = { "UEContextResumeFailure", "UEContextResumeFailure", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextResumeFailure_tags_1, sizeof(asn_DEF_S1AP_UEContextResumeFailure_tags_1) /sizeof(asn_DEF_S1AP_UEContextResumeFailure_tags_1[0]), /* 1 */ asn_DEF_S1AP_UEContextResumeFailure_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextResumeFailure_tags_1) /sizeof(asn_DEF_S1AP_UEContextResumeFailure_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextResumeFailure_1, 1, /* Elements count */ &asn_SPC_S1AP_UEContextResumeFailure_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextResumeFailure.h000066400000000000000000000021611333553357400231770ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UEContextResumeFailure_H_ #define _S1AP_UEContextResumeFailure_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UEContextResumeFailure */ typedef struct S1AP_UEContextResumeFailure { S1AP_ProtocolIE_Container_6551P85_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextResumeFailure_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextResumeFailure; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextResumeFailure_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextResumeFailure_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_UEContextResumeFailure_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextResumeRequest.c000066400000000000000000000035301333553357400232340ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UEContextResumeRequest.h" asn_TYPE_member_t asn_MBR_S1AP_UEContextResumeRequest_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeRequest, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P83, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextResumeRequest_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextResumeRequest_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextResumeRequest_specs_1 = { sizeof(struct S1AP_UEContextResumeRequest), offsetof(struct S1AP_UEContextResumeRequest, _asn_ctx), asn_MAP_S1AP_UEContextResumeRequest_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextResumeRequest = { "UEContextResumeRequest", "UEContextResumeRequest", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextResumeRequest_tags_1, sizeof(asn_DEF_S1AP_UEContextResumeRequest_tags_1) /sizeof(asn_DEF_S1AP_UEContextResumeRequest_tags_1[0]), /* 1 */ asn_DEF_S1AP_UEContextResumeRequest_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextResumeRequest_tags_1) /sizeof(asn_DEF_S1AP_UEContextResumeRequest_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextResumeRequest_1, 1, /* Elements count */ &asn_SPC_S1AP_UEContextResumeRequest_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextResumeRequest.h000066400000000000000000000021611333553357400232400ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UEContextResumeRequest_H_ #define _S1AP_UEContextResumeRequest_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UEContextResumeRequest */ typedef struct S1AP_UEContextResumeRequest { S1AP_ProtocolIE_Container_6551P83_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextResumeRequest_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextResumeRequest; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextResumeRequest_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextResumeRequest_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_UEContextResumeRequest_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextResumeResponse.c000066400000000000000000000035541333553357400234100ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UEContextResumeResponse.h" asn_TYPE_member_t asn_MBR_S1AP_UEContextResumeResponse_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextResumeResponse, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P84, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextResumeResponse_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextResumeResponse_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextResumeResponse_specs_1 = { sizeof(struct S1AP_UEContextResumeResponse), offsetof(struct S1AP_UEContextResumeResponse, _asn_ctx), asn_MAP_S1AP_UEContextResumeResponse_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextResumeResponse = { "UEContextResumeResponse", "UEContextResumeResponse", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextResumeResponse_tags_1, sizeof(asn_DEF_S1AP_UEContextResumeResponse_tags_1) /sizeof(asn_DEF_S1AP_UEContextResumeResponse_tags_1[0]), /* 1 */ asn_DEF_S1AP_UEContextResumeResponse_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextResumeResponse_tags_1) /sizeof(asn_DEF_S1AP_UEContextResumeResponse_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextResumeResponse_1, 1, /* Elements count */ &asn_SPC_S1AP_UEContextResumeResponse_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextResumeResponse.h000066400000000000000000000021721333553357400234100ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UEContextResumeResponse_H_ #define _S1AP_UEContextResumeResponse_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UEContextResumeResponse */ typedef struct S1AP_UEContextResumeResponse { S1AP_ProtocolIE_Container_6551P84_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextResumeResponse_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextResumeResponse; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextResumeResponse_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextResumeResponse_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_UEContextResumeResponse_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextSuspendRequest.c000066400000000000000000000035541333553357400234230ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UEContextSuspendRequest.h" asn_TYPE_member_t asn_MBR_S1AP_UEContextSuspendRequest_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextSuspendRequest, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P81, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextSuspendRequest_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextSuspendRequest_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextSuspendRequest_specs_1 = { sizeof(struct S1AP_UEContextSuspendRequest), offsetof(struct S1AP_UEContextSuspendRequest, _asn_ctx), asn_MAP_S1AP_UEContextSuspendRequest_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextSuspendRequest = { "UEContextSuspendRequest", "UEContextSuspendRequest", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextSuspendRequest_tags_1, sizeof(asn_DEF_S1AP_UEContextSuspendRequest_tags_1) /sizeof(asn_DEF_S1AP_UEContextSuspendRequest_tags_1[0]), /* 1 */ asn_DEF_S1AP_UEContextSuspendRequest_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextSuspendRequest_tags_1) /sizeof(asn_DEF_S1AP_UEContextSuspendRequest_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextSuspendRequest_1, 1, /* Elements count */ &asn_SPC_S1AP_UEContextSuspendRequest_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextSuspendRequest.h000066400000000000000000000021721333553357400234230ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UEContextSuspendRequest_H_ #define _S1AP_UEContextSuspendRequest_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UEContextSuspendRequest */ typedef struct S1AP_UEContextSuspendRequest { S1AP_ProtocolIE_Container_6551P81_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextSuspendRequest_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextSuspendRequest; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextSuspendRequest_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextSuspendRequest_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_UEContextSuspendRequest_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextSuspendResponse.c000066400000000000000000000036001333553357400235610ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UEContextSuspendResponse.h" asn_TYPE_member_t asn_MBR_S1AP_UEContextSuspendResponse_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEContextSuspendResponse, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P82, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEContextSuspendResponse_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEContextSuspendResponse_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextSuspendResponse_specs_1 = { sizeof(struct S1AP_UEContextSuspendResponse), offsetof(struct S1AP_UEContextSuspendResponse, _asn_ctx), asn_MAP_S1AP_UEContextSuspendResponse_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextSuspendResponse = { "UEContextSuspendResponse", "UEContextSuspendResponse", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEContextSuspendResponse_tags_1, sizeof(asn_DEF_S1AP_UEContextSuspendResponse_tags_1) /sizeof(asn_DEF_S1AP_UEContextSuspendResponse_tags_1[0]), /* 1 */ asn_DEF_S1AP_UEContextSuspendResponse_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UEContextSuspendResponse_tags_1) /sizeof(asn_DEF_S1AP_UEContextSuspendResponse_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEContextSuspendResponse_1, 1, /* Elements count */ &asn_SPC_S1AP_UEContextSuspendResponse_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEContextSuspendResponse.h000066400000000000000000000022031333553357400235640ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UEContextSuspendResponse_H_ #define _S1AP_UEContextSuspendResponse_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UEContextSuspendResponse */ typedef struct S1AP_UEContextSuspendResponse { S1AP_ProtocolIE_Container_6551P82_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEContextSuspendResponse_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEContextSuspendResponse; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEContextSuspendResponse_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UEContextSuspendResponse_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_UEContextSuspendResponse_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEIdentityIndexValue.c000066400000000000000000000042031333553357400226320ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UEIdentityIndexValue.h" int S1AP_UEIdentityIndexValue_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 10)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_UEIdentityIndexValue_constr_1 CC_NOTUSED = { { 0, 0 }, 10 /* (SIZE(10..10)) */}; static asn_per_constraints_t asn_PER_type_S1AP_UEIdentityIndexValue_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 10, 10 } /* (SIZE(10..10)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_UEIdentityIndexValue_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEIdentityIndexValue = { "UEIdentityIndexValue", "UEIdentityIndexValue", &asn_OP_BIT_STRING, asn_DEF_S1AP_UEIdentityIndexValue_tags_1, sizeof(asn_DEF_S1AP_UEIdentityIndexValue_tags_1) /sizeof(asn_DEF_S1AP_UEIdentityIndexValue_tags_1[0]), /* 1 */ asn_DEF_S1AP_UEIdentityIndexValue_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UEIdentityIndexValue_tags_1) /sizeof(asn_DEF_S1AP_UEIdentityIndexValue_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_UEIdentityIndexValue_constr_1, &asn_PER_type_S1AP_UEIdentityIndexValue_constr_1, S1AP_UEIdentityIndexValue_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEIdentityIndexValue.h000066400000000000000000000026261333553357400226460ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UEIdentityIndexValue_H_ #define _S1AP_UEIdentityIndexValue_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UEIdentityIndexValue */ typedef BIT_STRING_t S1AP_UEIdentityIndexValue_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEIdentityIndexValue; asn_struct_free_f S1AP_UEIdentityIndexValue_free; asn_struct_print_f S1AP_UEIdentityIndexValue_print; asn_constr_check_f S1AP_UEIdentityIndexValue_constraint; ber_type_decoder_f S1AP_UEIdentityIndexValue_decode_ber; der_type_encoder_f S1AP_UEIdentityIndexValue_encode_der; xer_type_decoder_f S1AP_UEIdentityIndexValue_decode_xer; xer_type_encoder_f S1AP_UEIdentityIndexValue_encode_xer; oer_type_decoder_f S1AP_UEIdentityIndexValue_decode_oer; oer_type_encoder_f S1AP_UEIdentityIndexValue_encode_oer; per_type_decoder_f S1AP_UEIdentityIndexValue_decode_uper; per_type_encoder_f S1AP_UEIdentityIndexValue_encode_uper; per_type_decoder_f S1AP_UEIdentityIndexValue_decode_aper; per_type_encoder_f S1AP_UEIdentityIndexValue_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_UEIdentityIndexValue_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEInformationTransfer.c000066400000000000000000000035041333553357400230510ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UEInformationTransfer.h" asn_TYPE_member_t asn_MBR_S1AP_UEInformationTransfer_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEInformationTransfer, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P88, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UEInformationTransfer_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEInformationTransfer_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEInformationTransfer_specs_1 = { sizeof(struct S1AP_UEInformationTransfer), offsetof(struct S1AP_UEInformationTransfer, _asn_ctx), asn_MAP_S1AP_UEInformationTransfer_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEInformationTransfer = { "UEInformationTransfer", "UEInformationTransfer", &asn_OP_SEQUENCE, asn_DEF_S1AP_UEInformationTransfer_tags_1, sizeof(asn_DEF_S1AP_UEInformationTransfer_tags_1) /sizeof(asn_DEF_S1AP_UEInformationTransfer_tags_1[0]), /* 1 */ asn_DEF_S1AP_UEInformationTransfer_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UEInformationTransfer_tags_1) /sizeof(asn_DEF_S1AP_UEInformationTransfer_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UEInformationTransfer_1, 1, /* Elements count */ &asn_SPC_S1AP_UEInformationTransfer_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEInformationTransfer.h000066400000000000000000000021501333553357400230520ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UEInformationTransfer_H_ #define _S1AP_UEInformationTransfer_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UEInformationTransfer */ typedef struct S1AP_UEInformationTransfer { S1AP_ProtocolIE_Container_6551P88_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEInformationTransfer_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEInformationTransfer; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UEInformationTransfer_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UEInformationTransfer_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_UEInformationTransfer_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEPagingID.c000066400000000000000000000041121333553357400204750ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UEPagingID.h" #include "S1AP_S-TMSI.h" static asn_oer_constraints_t asn_OER_type_S1AP_UEPagingID_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_UEPagingID_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_UEPagingID_1[] = { { ATF_POINTER, 0, offsetof(struct S1AP_UEPagingID, choice.s_TMSI), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_S_TMSI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "s-TMSI" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UEPagingID, choice.iMSI), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_IMSI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iMSI" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UEPagingID_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* s-TMSI */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iMSI */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_UEPagingID_specs_1 = { sizeof(struct S1AP_UEPagingID), offsetof(struct S1AP_UEPagingID, _asn_ctx), offsetof(struct S1AP_UEPagingID, present), sizeof(((struct S1AP_UEPagingID *)0)->present), asn_MAP_S1AP_UEPagingID_tag2el_1, 2, /* Count of tags in the map */ 0, 0, 2 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEPagingID = { "UEPagingID", "UEPagingID", &asn_OP_CHOICE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { &asn_OER_type_S1AP_UEPagingID_constr_1, &asn_PER_type_S1AP_UEPagingID_constr_1, CHOICE_constraint }, asn_MBR_S1AP_UEPagingID_1, 2, /* Elements count */ &asn_SPC_S1AP_UEPagingID_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEPagingID.h000066400000000000000000000023101333553357400205000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UEPagingID_H_ #define _S1AP_UEPagingID_H_ #include /* Including external dependencies */ #include "S1AP_IMSI.h" #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_UEPagingID_PR { S1AP_UEPagingID_PR_NOTHING, /* No components present */ S1AP_UEPagingID_PR_s_TMSI, S1AP_UEPagingID_PR_iMSI /* Extensions may appear below */ } S1AP_UEPagingID_PR; /* Forward declarations */ struct S1AP_S_TMSI; /* S1AP_UEPagingID */ typedef struct S1AP_UEPagingID { S1AP_UEPagingID_PR present; union S1AP_UEPagingID_u { struct S1AP_S_TMSI *s_TMSI; S1AP_IMSI_t iMSI; /* * This type is extensible, * possible extensions are below. */ } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UEPagingID_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEPagingID; #ifdef __cplusplus } #endif #endif /* _S1AP_UEPagingID_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UERadioCapability.c000066400000000000000000000017741333553357400221260ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UERadioCapability.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_UERadioCapability_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_UERadioCapability = { "UERadioCapability", "UERadioCapability", &asn_OP_OCTET_STRING, asn_DEF_S1AP_UERadioCapability_tags_1, sizeof(asn_DEF_S1AP_UERadioCapability_tags_1) /sizeof(asn_DEF_S1AP_UERadioCapability_tags_1[0]), /* 1 */ asn_DEF_S1AP_UERadioCapability_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UERadioCapability_tags_1) /sizeof(asn_DEF_S1AP_UERadioCapability_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UERadioCapability.h000066400000000000000000000025411333553357400221240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UERadioCapability_H_ #define _S1AP_UERadioCapability_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UERadioCapability */ typedef OCTET_STRING_t S1AP_UERadioCapability_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UERadioCapability; asn_struct_free_f S1AP_UERadioCapability_free; asn_struct_print_f S1AP_UERadioCapability_print; asn_constr_check_f S1AP_UERadioCapability_constraint; ber_type_decoder_f S1AP_UERadioCapability_decode_ber; der_type_encoder_f S1AP_UERadioCapability_encode_der; xer_type_decoder_f S1AP_UERadioCapability_decode_xer; xer_type_encoder_f S1AP_UERadioCapability_encode_xer; oer_type_decoder_f S1AP_UERadioCapability_decode_oer; oer_type_encoder_f S1AP_UERadioCapability_encode_oer; per_type_decoder_f S1AP_UERadioCapability_decode_uper; per_type_encoder_f S1AP_UERadioCapability_encode_uper; per_type_decoder_f S1AP_UERadioCapability_decode_aper; per_type_encoder_f S1AP_UERadioCapability_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_UERadioCapability_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UERadioCapabilityForPaging.c000066400000000000000000000021371333553357400237150ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UERadioCapabilityForPaging.h" /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static const ber_tlv_tag_t asn_DEF_S1AP_UERadioCapabilityForPaging_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_UERadioCapabilityForPaging = { "UERadioCapabilityForPaging", "UERadioCapabilityForPaging", &asn_OP_OCTET_STRING, asn_DEF_S1AP_UERadioCapabilityForPaging_tags_1, sizeof(asn_DEF_S1AP_UERadioCapabilityForPaging_tags_1) /sizeof(asn_DEF_S1AP_UERadioCapabilityForPaging_tags_1[0]), /* 1 */ asn_DEF_S1AP_UERadioCapabilityForPaging_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UERadioCapabilityForPaging_tags_1) /sizeof(asn_DEF_S1AP_UERadioCapabilityForPaging_tags_1[0]), /* 1 */ { 0, 0, OCTET_STRING_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UERadioCapabilityForPaging.h000066400000000000000000000030141333553357400237150ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UERadioCapabilityForPaging_H_ #define _S1AP_UERadioCapabilityForPaging_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UERadioCapabilityForPaging */ typedef OCTET_STRING_t S1AP_UERadioCapabilityForPaging_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UERadioCapabilityForPaging; asn_struct_free_f S1AP_UERadioCapabilityForPaging_free; asn_struct_print_f S1AP_UERadioCapabilityForPaging_print; asn_constr_check_f S1AP_UERadioCapabilityForPaging_constraint; ber_type_decoder_f S1AP_UERadioCapabilityForPaging_decode_ber; der_type_encoder_f S1AP_UERadioCapabilityForPaging_encode_der; xer_type_decoder_f S1AP_UERadioCapabilityForPaging_decode_xer; xer_type_encoder_f S1AP_UERadioCapabilityForPaging_encode_xer; oer_type_decoder_f S1AP_UERadioCapabilityForPaging_decode_oer; oer_type_encoder_f S1AP_UERadioCapabilityForPaging_encode_oer; per_type_decoder_f S1AP_UERadioCapabilityForPaging_decode_uper; per_type_encoder_f S1AP_UERadioCapabilityForPaging_encode_uper; per_type_decoder_f S1AP_UERadioCapabilityForPaging_decode_aper; per_type_encoder_f S1AP_UERadioCapabilityForPaging_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_UERadioCapabilityForPaging_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UERadioCapabilityMatchRequest.c000066400000000000000000000037441333553357400244530ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UERadioCapabilityMatchRequest.h" asn_TYPE_member_t asn_MBR_S1AP_UERadioCapabilityMatchRequest_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UERadioCapabilityMatchRequest, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P29, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UERadioCapabilityMatchRequest_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UERadioCapabilityMatchRequest_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UERadioCapabilityMatchRequest_specs_1 = { sizeof(struct S1AP_UERadioCapabilityMatchRequest), offsetof(struct S1AP_UERadioCapabilityMatchRequest, _asn_ctx), asn_MAP_S1AP_UERadioCapabilityMatchRequest_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UERadioCapabilityMatchRequest = { "UERadioCapabilityMatchRequest", "UERadioCapabilityMatchRequest", &asn_OP_SEQUENCE, asn_DEF_S1AP_UERadioCapabilityMatchRequest_tags_1, sizeof(asn_DEF_S1AP_UERadioCapabilityMatchRequest_tags_1) /sizeof(asn_DEF_S1AP_UERadioCapabilityMatchRequest_tags_1[0]), /* 1 */ asn_DEF_S1AP_UERadioCapabilityMatchRequest_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UERadioCapabilityMatchRequest_tags_1) /sizeof(asn_DEF_S1AP_UERadioCapabilityMatchRequest_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UERadioCapabilityMatchRequest_1, 1, /* Elements count */ &asn_SPC_S1AP_UERadioCapabilityMatchRequest_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UERadioCapabilityMatchRequest.h000066400000000000000000000022601333553357400244500ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UERadioCapabilityMatchRequest_H_ #define _S1AP_UERadioCapabilityMatchRequest_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UERadioCapabilityMatchRequest */ typedef struct S1AP_UERadioCapabilityMatchRequest { S1AP_ProtocolIE_Container_6551P29_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UERadioCapabilityMatchRequest_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UERadioCapabilityMatchRequest; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UERadioCapabilityMatchRequest_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UERadioCapabilityMatchRequest_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_UERadioCapabilityMatchRequest_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UERadioCapabilityMatchResponse.c000066400000000000000000000037701333553357400246200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UERadioCapabilityMatchResponse.h" asn_TYPE_member_t asn_MBR_S1AP_UERadioCapabilityMatchResponse_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UERadioCapabilityMatchResponse, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P30, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UERadioCapabilityMatchResponse_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UERadioCapabilityMatchResponse_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UERadioCapabilityMatchResponse_specs_1 = { sizeof(struct S1AP_UERadioCapabilityMatchResponse), offsetof(struct S1AP_UERadioCapabilityMatchResponse, _asn_ctx), asn_MAP_S1AP_UERadioCapabilityMatchResponse_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UERadioCapabilityMatchResponse = { "UERadioCapabilityMatchResponse", "UERadioCapabilityMatchResponse", &asn_OP_SEQUENCE, asn_DEF_S1AP_UERadioCapabilityMatchResponse_tags_1, sizeof(asn_DEF_S1AP_UERadioCapabilityMatchResponse_tags_1) /sizeof(asn_DEF_S1AP_UERadioCapabilityMatchResponse_tags_1[0]), /* 1 */ asn_DEF_S1AP_UERadioCapabilityMatchResponse_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UERadioCapabilityMatchResponse_tags_1) /sizeof(asn_DEF_S1AP_UERadioCapabilityMatchResponse_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UERadioCapabilityMatchResponse_1, 1, /* Elements count */ &asn_SPC_S1AP_UERadioCapabilityMatchResponse_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UERadioCapabilityMatchResponse.h000066400000000000000000000022711333553357400246200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UERadioCapabilityMatchResponse_H_ #define _S1AP_UERadioCapabilityMatchResponse_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UERadioCapabilityMatchResponse */ typedef struct S1AP_UERadioCapabilityMatchResponse { S1AP_ProtocolIE_Container_6551P30_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UERadioCapabilityMatchResponse_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UERadioCapabilityMatchResponse; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UERadioCapabilityMatchResponse_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UERadioCapabilityMatchResponse_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_UERadioCapabilityMatchResponse_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UESecurityCapabilities.c000066400000000000000000000054151333553357400232030ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UESecurityCapabilities.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_UESecurityCapabilities_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UESecurityCapabilities, encryptionAlgorithms), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_EncryptionAlgorithms, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "encryptionAlgorithms" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UESecurityCapabilities, integrityProtectionAlgorithms), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_IntegrityProtectionAlgorithms, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "integrityProtectionAlgorithms" }, { ATF_POINTER, 1, offsetof(struct S1AP_UESecurityCapabilities, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P112, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_UESecurityCapabilities_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_UESecurityCapabilities_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UESecurityCapabilities_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* encryptionAlgorithms */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* integrityProtectionAlgorithms */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_UESecurityCapabilities_specs_1 = { sizeof(struct S1AP_UESecurityCapabilities), offsetof(struct S1AP_UESecurityCapabilities, _asn_ctx), asn_MAP_S1AP_UESecurityCapabilities_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_UESecurityCapabilities_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UESecurityCapabilities = { "UESecurityCapabilities", "UESecurityCapabilities", &asn_OP_SEQUENCE, asn_DEF_S1AP_UESecurityCapabilities_tags_1, sizeof(asn_DEF_S1AP_UESecurityCapabilities_tags_1) /sizeof(asn_DEF_S1AP_UESecurityCapabilities_tags_1[0]), /* 1 */ asn_DEF_S1AP_UESecurityCapabilities_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UESecurityCapabilities_tags_1) /sizeof(asn_DEF_S1AP_UESecurityCapabilities_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UESecurityCapabilities_1, 3, /* Elements count */ &asn_SPC_S1AP_UESecurityCapabilities_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UESecurityCapabilities.h000066400000000000000000000023321333553357400232030ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UESecurityCapabilities_H_ #define _S1AP_UESecurityCapabilities_H_ #include /* Including external dependencies */ #include "S1AP_EncryptionAlgorithms.h" #include "S1AP_IntegrityProtectionAlgorithms.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_UESecurityCapabilities */ typedef struct S1AP_UESecurityCapabilities { S1AP_EncryptionAlgorithms_t encryptionAlgorithms; S1AP_IntegrityProtectionAlgorithms_t integrityProtectionAlgorithms; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UESecurityCapabilities_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UESecurityCapabilities; #ifdef __cplusplus } #endif #endif /* _S1AP_UESecurityCapabilities_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UESidelinkAggregateMaximumBitrate.c000066400000000000000000000052221333553357400253000ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UESidelinkAggregateMaximumBitrate.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_UESidelinkAggregateMaximumBitrate_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UESidelinkAggregateMaximumBitrate, uESidelinkAggregateMaximumBitRate), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_BitRate, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "uESidelinkAggregateMaximumBitRate" }, { ATF_POINTER, 1, offsetof(struct S1AP_UESidelinkAggregateMaximumBitrate, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P113, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_UESidelinkAggregateMaximumBitrate_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_UESidelinkAggregateMaximumBitrate_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UESidelinkAggregateMaximumBitrate_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* uESidelinkAggregateMaximumBitRate */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_UESidelinkAggregateMaximumBitrate_specs_1 = { sizeof(struct S1AP_UESidelinkAggregateMaximumBitrate), offsetof(struct S1AP_UESidelinkAggregateMaximumBitrate, _asn_ctx), asn_MAP_S1AP_UESidelinkAggregateMaximumBitrate_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_UESidelinkAggregateMaximumBitrate_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UESidelinkAggregateMaximumBitrate = { "UESidelinkAggregateMaximumBitrate", "UESidelinkAggregateMaximumBitrate", &asn_OP_SEQUENCE, asn_DEF_S1AP_UESidelinkAggregateMaximumBitrate_tags_1, sizeof(asn_DEF_S1AP_UESidelinkAggregateMaximumBitrate_tags_1) /sizeof(asn_DEF_S1AP_UESidelinkAggregateMaximumBitrate_tags_1[0]), /* 1 */ asn_DEF_S1AP_UESidelinkAggregateMaximumBitrate_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UESidelinkAggregateMaximumBitrate_tags_1) /sizeof(asn_DEF_S1AP_UESidelinkAggregateMaximumBitrate_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UESidelinkAggregateMaximumBitrate_1, 2, /* Elements count */ &asn_SPC_S1AP_UESidelinkAggregateMaximumBitrate_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UESidelinkAggregateMaximumBitrate.h000066400000000000000000000022441333553357400253060ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UESidelinkAggregateMaximumBitrate_H_ #define _S1AP_UESidelinkAggregateMaximumBitrate_H_ #include /* Including external dependencies */ #include "S1AP_BitRate.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_UESidelinkAggregateMaximumBitrate */ typedef struct S1AP_UESidelinkAggregateMaximumBitrate { S1AP_BitRate_t uESidelinkAggregateMaximumBitRate; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UESidelinkAggregateMaximumBitrate_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UESidelinkAggregateMaximumBitrate; #ifdef __cplusplus } #endif #endif /* _S1AP_UESidelinkAggregateMaximumBitrate_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEUserPlaneCIoTSupportIndicator.c000066400000000000000000000045711333553357400247330ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UEUserPlaneCIoTSupportIndicator.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_UEUserPlaneCIoTSupportIndicator_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_UEUserPlaneCIoTSupportIndicator_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 0, 0, 0, 0 } /* (0..0,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_UEUserPlaneCIoTSupportIndicator_value2enum_1[] = { { 0, 9, "supported" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_UEUserPlaneCIoTSupportIndicator_enum2value_1[] = { 0 /* supported(0) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_UEUserPlaneCIoTSupportIndicator_specs_1 = { asn_MAP_S1AP_UEUserPlaneCIoTSupportIndicator_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_UEUserPlaneCIoTSupportIndicator_enum2value_1, /* N => "tag"; sorted by N */ 1, /* Number of elements in the maps */ 2, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_UEUserPlaneCIoTSupportIndicator_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_UEUserPlaneCIoTSupportIndicator = { "UEUserPlaneCIoTSupportIndicator", "UEUserPlaneCIoTSupportIndicator", &asn_OP_NativeEnumerated, asn_DEF_S1AP_UEUserPlaneCIoTSupportIndicator_tags_1, sizeof(asn_DEF_S1AP_UEUserPlaneCIoTSupportIndicator_tags_1) /sizeof(asn_DEF_S1AP_UEUserPlaneCIoTSupportIndicator_tags_1[0]), /* 1 */ asn_DEF_S1AP_UEUserPlaneCIoTSupportIndicator_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UEUserPlaneCIoTSupportIndicator_tags_1) /sizeof(asn_DEF_S1AP_UEUserPlaneCIoTSupportIndicator_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_UEUserPlaneCIoTSupportIndicator_constr_1, &asn_PER_type_S1AP_UEUserPlaneCIoTSupportIndicator_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_UEUserPlaneCIoTSupportIndicator_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UEUserPlaneCIoTSupportIndicator.h000066400000000000000000000034621333553357400247360ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UEUserPlaneCIoTSupportIndicator_H_ #define _S1AP_UEUserPlaneCIoTSupportIndicator_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_UEUserPlaneCIoTSupportIndicator { S1AP_UEUserPlaneCIoTSupportIndicator_supported = 0 /* * Enumeration is extensible */ } e_S1AP_UEUserPlaneCIoTSupportIndicator; /* S1AP_UEUserPlaneCIoTSupportIndicator */ typedef long S1AP_UEUserPlaneCIoTSupportIndicator_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UEUserPlaneCIoTSupportIndicator; asn_struct_free_f S1AP_UEUserPlaneCIoTSupportIndicator_free; asn_struct_print_f S1AP_UEUserPlaneCIoTSupportIndicator_print; asn_constr_check_f S1AP_UEUserPlaneCIoTSupportIndicator_constraint; ber_type_decoder_f S1AP_UEUserPlaneCIoTSupportIndicator_decode_ber; der_type_encoder_f S1AP_UEUserPlaneCIoTSupportIndicator_encode_der; xer_type_decoder_f S1AP_UEUserPlaneCIoTSupportIndicator_decode_xer; xer_type_encoder_f S1AP_UEUserPlaneCIoTSupportIndicator_encode_xer; oer_type_decoder_f S1AP_UEUserPlaneCIoTSupportIndicator_decode_oer; oer_type_encoder_f S1AP_UEUserPlaneCIoTSupportIndicator_encode_oer; per_type_decoder_f S1AP_UEUserPlaneCIoTSupportIndicator_decode_uper; per_type_encoder_f S1AP_UEUserPlaneCIoTSupportIndicator_encode_uper; per_type_decoder_f S1AP_UEUserPlaneCIoTSupportIndicator_decode_aper; per_type_encoder_f S1AP_UEUserPlaneCIoTSupportIndicator_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_UEUserPlaneCIoTSupportIndicator_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UL-CP-SecurityInformation.c000066400000000000000000000053511333553357400234620ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UL-CP-SecurityInformation.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_UL_CP_SecurityInformation_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UL_CP_SecurityInformation, ul_NAS_MAC), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_UL_NAS_MAC, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ul-NAS-MAC" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UL_CP_SecurityInformation, ul_NAS_Count), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_UL_NAS_Count, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ul-NAS-Count" }, { ATF_POINTER, 1, offsetof(struct S1AP_UL_CP_SecurityInformation, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P114, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_UL_CP_SecurityInformation_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_UL_CP_SecurityInformation_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UL_CP_SecurityInformation_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* ul-NAS-MAC */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* ul-NAS-Count */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_UL_CP_SecurityInformation_specs_1 = { sizeof(struct S1AP_UL_CP_SecurityInformation), offsetof(struct S1AP_UL_CP_SecurityInformation, _asn_ctx), asn_MAP_S1AP_UL_CP_SecurityInformation_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_UL_CP_SecurityInformation_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UL_CP_SecurityInformation = { "UL-CP-SecurityInformation", "UL-CP-SecurityInformation", &asn_OP_SEQUENCE, asn_DEF_S1AP_UL_CP_SecurityInformation_tags_1, sizeof(asn_DEF_S1AP_UL_CP_SecurityInformation_tags_1) /sizeof(asn_DEF_S1AP_UL_CP_SecurityInformation_tags_1[0]), /* 1 */ asn_DEF_S1AP_UL_CP_SecurityInformation_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UL_CP_SecurityInformation_tags_1) /sizeof(asn_DEF_S1AP_UL_CP_SecurityInformation_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UL_CP_SecurityInformation_1, 3, /* Elements count */ &asn_SPC_S1AP_UL_CP_SecurityInformation_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UL-CP-SecurityInformation.h000066400000000000000000000022361333553357400234660ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UL_CP_SecurityInformation_H_ #define _S1AP_UL_CP_SecurityInformation_H_ #include /* Including external dependencies */ #include "S1AP_UL-NAS-MAC.h" #include "S1AP_UL-NAS-Count.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_UL-CP-SecurityInformation */ typedef struct S1AP_UL_CP_SecurityInformation { S1AP_UL_NAS_MAC_t ul_NAS_MAC; S1AP_UL_NAS_Count_t ul_NAS_Count; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UL_CP_SecurityInformation_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UL_CP_SecurityInformation; #ifdef __cplusplus } #endif #endif /* _S1AP_UL_CP_SecurityInformation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UL-NAS-Count.c000066400000000000000000000037541333553357400206610ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UL-NAS-Count.h" int S1AP_UL_NAS_Count_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 5)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_UL_NAS_Count_constr_1 CC_NOTUSED = { { 0, 0 }, 5 /* (SIZE(5..5)) */}; asn_per_constraints_t asn_PER_type_S1AP_UL_NAS_Count_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 5, 5 } /* (SIZE(5..5)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_UL_NAS_Count_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_UL_NAS_Count = { "UL-NAS-Count", "UL-NAS-Count", &asn_OP_BIT_STRING, asn_DEF_S1AP_UL_NAS_Count_tags_1, sizeof(asn_DEF_S1AP_UL_NAS_Count_tags_1) /sizeof(asn_DEF_S1AP_UL_NAS_Count_tags_1[0]), /* 1 */ asn_DEF_S1AP_UL_NAS_Count_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UL_NAS_Count_tags_1) /sizeof(asn_DEF_S1AP_UL_NAS_Count_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_UL_NAS_Count_constr_1, &asn_PER_type_S1AP_UL_NAS_Count_constr_1, S1AP_UL_NAS_Count_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UL-NAS-Count.h000066400000000000000000000025041333553357400206560ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UL_NAS_Count_H_ #define _S1AP_UL_NAS_Count_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UL-NAS-Count */ typedef BIT_STRING_t S1AP_UL_NAS_Count_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_UL_NAS_Count_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UL_NAS_Count; asn_struct_free_f S1AP_UL_NAS_Count_free; asn_struct_print_f S1AP_UL_NAS_Count_print; asn_constr_check_f S1AP_UL_NAS_Count_constraint; ber_type_decoder_f S1AP_UL_NAS_Count_decode_ber; der_type_encoder_f S1AP_UL_NAS_Count_encode_der; xer_type_decoder_f S1AP_UL_NAS_Count_decode_xer; xer_type_encoder_f S1AP_UL_NAS_Count_encode_xer; oer_type_decoder_f S1AP_UL_NAS_Count_decode_oer; oer_type_encoder_f S1AP_UL_NAS_Count_encode_oer; per_type_decoder_f S1AP_UL_NAS_Count_decode_uper; per_type_encoder_f S1AP_UL_NAS_Count_encode_uper; per_type_decoder_f S1AP_UL_NAS_Count_decode_aper; per_type_encoder_f S1AP_UL_NAS_Count_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_UL_NAS_Count_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UL-NAS-MAC.c000066400000000000000000000037221333553357400201640ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UL-NAS-MAC.h" int S1AP_UL_NAS_MAC_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const BIT_STRING_t *st = (const BIT_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(st->size > 0) { /* Size in bits */ size = 8 * st->size - (st->bits_unused & 0x07); } else { size = 0; } if((size == 16)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using BIT_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_UL_NAS_MAC_constr_1 CC_NOTUSED = { { 0, 0 }, 16 /* (SIZE(16..16)) */}; asn_per_constraints_t asn_PER_type_S1AP_UL_NAS_MAC_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 16, 16 } /* (SIZE(16..16)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_UL_NAS_MAC_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (3 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_UL_NAS_MAC = { "UL-NAS-MAC", "UL-NAS-MAC", &asn_OP_BIT_STRING, asn_DEF_S1AP_UL_NAS_MAC_tags_1, sizeof(asn_DEF_S1AP_UL_NAS_MAC_tags_1) /sizeof(asn_DEF_S1AP_UL_NAS_MAC_tags_1[0]), /* 1 */ asn_DEF_S1AP_UL_NAS_MAC_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UL_NAS_MAC_tags_1) /sizeof(asn_DEF_S1AP_UL_NAS_MAC_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_UL_NAS_MAC_constr_1, &asn_PER_type_S1AP_UL_NAS_MAC_constr_1, S1AP_UL_NAS_MAC_constraint }, 0, 0, /* No members */ &asn_SPC_BIT_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UL-NAS-MAC.h000066400000000000000000000024341333553357400201700ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UL_NAS_MAC_H_ #define _S1AP_UL_NAS_MAC_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UL-NAS-MAC */ typedef BIT_STRING_t S1AP_UL_NAS_MAC_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_UL_NAS_MAC_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_UL_NAS_MAC; asn_struct_free_f S1AP_UL_NAS_MAC_free; asn_struct_print_f S1AP_UL_NAS_MAC_print; asn_constr_check_f S1AP_UL_NAS_MAC_constraint; ber_type_decoder_f S1AP_UL_NAS_MAC_decode_ber; der_type_encoder_f S1AP_UL_NAS_MAC_encode_der; xer_type_decoder_f S1AP_UL_NAS_MAC_decode_xer; xer_type_encoder_f S1AP_UL_NAS_MAC_encode_xer; oer_type_decoder_f S1AP_UL_NAS_MAC_decode_oer; oer_type_encoder_f S1AP_UL_NAS_MAC_encode_oer; per_type_decoder_f S1AP_UL_NAS_MAC_decode_uper; per_type_encoder_f S1AP_UL_NAS_MAC_encode_uper; per_type_decoder_f S1AP_UL_NAS_MAC_decode_aper; per_type_encoder_f S1AP_UL_NAS_MAC_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_UL_NAS_MAC_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UnsuccessfulOutcome.c000066400000000000000000001175021333553357400226470ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Descriptions" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UnsuccessfulOutcome.h" static const long asn_VAL_1_S1AP_id_HandoverPreparation = 0; static const long asn_VAL_1_S1AP_reject = 0; static const long asn_VAL_2_S1AP_id_HandoverResourceAllocation = 1; static const long asn_VAL_2_S1AP_reject = 0; static const long asn_VAL_3_S1AP_id_PathSwitchRequest = 3; static const long asn_VAL_3_S1AP_reject = 0; static const long asn_VAL_4_S1AP_id_E_RABSetup = 5; static const long asn_VAL_4_S1AP_reject = 0; static const long asn_VAL_5_S1AP_id_E_RABModify = 6; static const long asn_VAL_5_S1AP_reject = 0; static const long asn_VAL_6_S1AP_id_E_RABRelease = 7; static const long asn_VAL_6_S1AP_reject = 0; static const long asn_VAL_7_S1AP_id_InitialContextSetup = 9; static const long asn_VAL_7_S1AP_reject = 0; static const long asn_VAL_8_S1AP_id_HandoverCancel = 4; static const long asn_VAL_8_S1AP_reject = 0; static const long asn_VAL_9_S1AP_id_Kill = 43; static const long asn_VAL_9_S1AP_reject = 0; static const long asn_VAL_10_S1AP_id_Reset = 14; static const long asn_VAL_10_S1AP_reject = 0; static const long asn_VAL_11_S1AP_id_S1Setup = 17; static const long asn_VAL_11_S1AP_reject = 0; static const long asn_VAL_12_S1AP_id_UEContextModification = 21; static const long asn_VAL_12_S1AP_reject = 0; static const long asn_VAL_13_S1AP_id_UEContextRelease = 23; static const long asn_VAL_13_S1AP_reject = 0; static const long asn_VAL_14_S1AP_id_ENBConfigurationUpdate = 29; static const long asn_VAL_14_S1AP_reject = 0; static const long asn_VAL_15_S1AP_id_MMEConfigurationUpdate = 30; static const long asn_VAL_15_S1AP_reject = 0; static const long asn_VAL_16_S1AP_id_WriteReplaceWarning = 36; static const long asn_VAL_16_S1AP_reject = 0; static const long asn_VAL_17_S1AP_id_UERadioCapabilityMatch = 48; static const long asn_VAL_17_S1AP_reject = 0; static const long asn_VAL_18_S1AP_id_E_RABModificationIndication = 50; static const long asn_VAL_18_S1AP_reject = 0; static const long asn_VAL_19_S1AP_id_UEContextModificationIndication = 53; static const long asn_VAL_19_S1AP_reject = 0; static const long asn_VAL_20_S1AP_id_UEContextSuspend = 55; static const long asn_VAL_20_S1AP_reject = 0; static const long asn_VAL_21_S1AP_id_UEContextResume = 56; static const long asn_VAL_21_S1AP_reject = 0; static const long asn_VAL_22_S1AP_id_HandoverNotification = 2; static const long asn_VAL_22_S1AP_ignore = 1; static const long asn_VAL_23_S1AP_id_E_RABReleaseIndication = 8; static const long asn_VAL_23_S1AP_ignore = 1; static const long asn_VAL_24_S1AP_id_Paging = 10; static const long asn_VAL_24_S1AP_ignore = 1; static const long asn_VAL_25_S1AP_id_downlinkNASTransport = 11; static const long asn_VAL_25_S1AP_ignore = 1; static const long asn_VAL_26_S1AP_id_initialUEMessage = 12; static const long asn_VAL_26_S1AP_ignore = 1; static const long asn_VAL_27_S1AP_id_uplinkNASTransport = 13; static const long asn_VAL_27_S1AP_ignore = 1; static const long asn_VAL_28_S1AP_id_ErrorIndication = 15; static const long asn_VAL_28_S1AP_ignore = 1; static const long asn_VAL_29_S1AP_id_NASNonDeliveryIndication = 16; static const long asn_VAL_29_S1AP_ignore = 1; static const long asn_VAL_30_S1AP_id_UEContextReleaseRequest = 18; static const long asn_VAL_30_S1AP_ignore = 1; static const long asn_VAL_31_S1AP_id_DownlinkS1cdma2000tunnelling = 19; static const long asn_VAL_31_S1AP_ignore = 1; static const long asn_VAL_32_S1AP_id_UplinkS1cdma2000tunnelling = 20; static const long asn_VAL_32_S1AP_ignore = 1; static const long asn_VAL_33_S1AP_id_UECapabilityInfoIndication = 22; static const long asn_VAL_33_S1AP_ignore = 1; static const long asn_VAL_34_S1AP_id_eNBStatusTransfer = 24; static const long asn_VAL_34_S1AP_ignore = 1; static const long asn_VAL_35_S1AP_id_MMEStatusTransfer = 25; static const long asn_VAL_35_S1AP_ignore = 1; static const long asn_VAL_36_S1AP_id_DeactivateTrace = 26; static const long asn_VAL_36_S1AP_ignore = 1; static const long asn_VAL_37_S1AP_id_TraceStart = 27; static const long asn_VAL_37_S1AP_ignore = 1; static const long asn_VAL_38_S1AP_id_TraceFailureIndication = 28; static const long asn_VAL_38_S1AP_ignore = 1; static const long asn_VAL_39_S1AP_id_CellTrafficTrace = 42; static const long asn_VAL_39_S1AP_ignore = 1; static const long asn_VAL_40_S1AP_id_LocationReportingControl = 31; static const long asn_VAL_40_S1AP_ignore = 1; static const long asn_VAL_41_S1AP_id_LocationReportingFailureIndication = 32; static const long asn_VAL_41_S1AP_ignore = 1; static const long asn_VAL_42_S1AP_id_LocationReport = 33; static const long asn_VAL_42_S1AP_ignore = 1; static const long asn_VAL_43_S1AP_id_OverloadStart = 34; static const long asn_VAL_43_S1AP_ignore = 1; static const long asn_VAL_44_S1AP_id_OverloadStop = 35; static const long asn_VAL_44_S1AP_reject = 0; static const long asn_VAL_45_S1AP_id_eNBDirectInformationTransfer = 37; static const long asn_VAL_45_S1AP_ignore = 1; static const long asn_VAL_46_S1AP_id_MMEDirectInformationTransfer = 38; static const long asn_VAL_46_S1AP_ignore = 1; static const long asn_VAL_47_S1AP_id_eNBConfigurationTransfer = 40; static const long asn_VAL_47_S1AP_ignore = 1; static const long asn_VAL_48_S1AP_id_MMEConfigurationTransfer = 41; static const long asn_VAL_48_S1AP_ignore = 1; static const long asn_VAL_49_S1AP_id_PrivateMessage = 39; static const long asn_VAL_49_S1AP_ignore = 1; static const long asn_VAL_50_S1AP_id_downlinkUEAssociatedLPPaTransport = 44; static const long asn_VAL_50_S1AP_ignore = 1; static const long asn_VAL_51_S1AP_id_uplinkUEAssociatedLPPaTransport = 45; static const long asn_VAL_51_S1AP_ignore = 1; static const long asn_VAL_52_S1AP_id_downlinkNonUEAssociatedLPPaTransport = 46; static const long asn_VAL_52_S1AP_ignore = 1; static const long asn_VAL_53_S1AP_id_uplinkNonUEAssociatedLPPaTransport = 47; static const long asn_VAL_53_S1AP_ignore = 1; static const long asn_VAL_54_S1AP_id_PWSRestartIndication = 49; static const long asn_VAL_54_S1AP_ignore = 1; static const long asn_VAL_55_S1AP_id_RerouteNASRequest = 52; static const long asn_VAL_55_S1AP_reject = 0; static const long asn_VAL_56_S1AP_id_PWSFailureIndication = 51; static const long asn_VAL_56_S1AP_ignore = 1; static const long asn_VAL_57_S1AP_id_ConnectionEstablishmentIndication = 54; static const long asn_VAL_57_S1AP_reject = 0; static const long asn_VAL_58_S1AP_id_NASDeliveryIndication = 57; static const long asn_VAL_58_S1AP_ignore = 1; static const long asn_VAL_59_S1AP_id_RetrieveUEInformation = 58; static const long asn_VAL_59_S1AP_reject = 0; static const long asn_VAL_60_S1AP_id_UEInformationTransfer = 59; static const long asn_VAL_60_S1AP_reject = 0; static const long asn_VAL_61_S1AP_id_eNBCPRelocationIndication = 60; static const long asn_VAL_61_S1AP_reject = 0; static const long asn_VAL_62_S1AP_id_MMECPRelocationIndication = 61; static const long asn_VAL_62_S1AP_reject = 0; static const asn_ioc_cell_t asn_IOS_S1AP_S1AP_ELEMENTARY_PROCEDURES_1_rows[] = { { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_HandoverRequired }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_HandoverCommand }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_HandoverPreparationFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_1_S1AP_id_HandoverPreparation }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_1_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_HandoverRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_HandoverRequestAcknowledge }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_HandoverFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_2_S1AP_id_HandoverResourceAllocation }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_2_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_PathSwitchRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_PathSwitchRequestAcknowledge }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_PathSwitchRequestFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_3_S1AP_id_PathSwitchRequest }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_3_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_E_RABSetupRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_E_RABSetupResponse }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_4_S1AP_id_E_RABSetup }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_4_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_E_RABModifyRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_E_RABModifyResponse }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_5_S1AP_id_E_RABModify }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_5_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_E_RABReleaseCommand }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_E_RABReleaseResponse }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_6_S1AP_id_E_RABRelease }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_6_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_InitialContextSetupRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_InitialContextSetupResponse }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_InitialContextSetupFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_7_S1AP_id_InitialContextSetup }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_7_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_HandoverCancel }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_HandoverCancelAcknowledge }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_8_S1AP_id_HandoverCancel }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_8_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_KillRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_KillResponse }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_9_S1AP_id_Kill }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_9_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_Reset }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_ResetAcknowledge }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_10_S1AP_id_Reset }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_10_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_S1SetupRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_S1SetupResponse }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_S1SetupFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_11_S1AP_id_S1Setup }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_11_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UEContextModificationRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UEContextModificationResponse }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UEContextModificationFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_12_S1AP_id_UEContextModification }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_12_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UEContextReleaseCommand }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UEContextReleaseComplete }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_13_S1AP_id_UEContextRelease }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_13_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_ENBConfigurationUpdate }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_ENBConfigurationUpdateAcknowledge }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_ENBConfigurationUpdateFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_14_S1AP_id_ENBConfigurationUpdate }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_14_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_MMEConfigurationUpdate }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_MMEConfigurationUpdateAcknowledge }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_MMEConfigurationUpdateFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_15_S1AP_id_MMEConfigurationUpdate }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_15_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_WriteReplaceWarningRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_WriteReplaceWarningResponse }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_16_S1AP_id_WriteReplaceWarning }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_16_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UERadioCapabilityMatchRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UERadioCapabilityMatchResponse }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_17_S1AP_id_UERadioCapabilityMatch }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_17_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_E_RABModificationIndication }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_E_RABModificationConfirm }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_18_S1AP_id_E_RABModificationIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_18_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UEContextModificationIndication }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UEContextModificationConfirm }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_19_S1AP_id_UEContextModificationIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_19_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UEContextSuspendRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UEContextSuspendResponse }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_20_S1AP_id_UEContextSuspend }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_20_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UEContextResumeRequest }, { "&SuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UEContextResumeResponse }, { "&UnsuccessfulOutcome", aioc__type, &asn_DEF_S1AP_UEContextResumeFailure }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_21_S1AP_id_UEContextResume }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_21_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_HandoverNotify }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_22_S1AP_id_HandoverNotification }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_22_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_E_RABReleaseIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_23_S1AP_id_E_RABReleaseIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_23_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_Paging }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_24_S1AP_id_Paging }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_24_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_DownlinkNASTransport }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_25_S1AP_id_downlinkNASTransport }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_25_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_InitialUEMessage }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_26_S1AP_id_initialUEMessage }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_26_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UplinkNASTransport }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_27_S1AP_id_uplinkNASTransport }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_27_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_ErrorIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_28_S1AP_id_ErrorIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_28_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_NASNonDeliveryIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_29_S1AP_id_NASNonDeliveryIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_29_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UEContextReleaseRequest }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_30_S1AP_id_UEContextReleaseRequest }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_30_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_DownlinkS1cdma2000tunnelling }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_31_S1AP_id_DownlinkS1cdma2000tunnelling }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_31_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UplinkS1cdma2000tunnelling }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_32_S1AP_id_UplinkS1cdma2000tunnelling }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_32_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UECapabilityInfoIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_33_S1AP_id_UECapabilityInfoIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_33_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_ENBStatusTransfer }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_34_S1AP_id_eNBStatusTransfer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_34_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_MMEStatusTransfer }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_35_S1AP_id_MMEStatusTransfer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_35_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_DeactivateTrace }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_36_S1AP_id_DeactivateTrace }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_36_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_TraceStart }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_37_S1AP_id_TraceStart }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_37_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_TraceFailureIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_38_S1AP_id_TraceFailureIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_38_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_CellTrafficTrace }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_39_S1AP_id_CellTrafficTrace }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_39_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_LocationReportingControl }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_40_S1AP_id_LocationReportingControl }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_40_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_LocationReportingFailureIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_41_S1AP_id_LocationReportingFailureIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_41_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_LocationReport }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_42_S1AP_id_LocationReport }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_42_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_OverloadStart }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_43_S1AP_id_OverloadStart }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_43_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_OverloadStop }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_44_S1AP_id_OverloadStop }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_44_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_ENBDirectInformationTransfer }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_45_S1AP_id_eNBDirectInformationTransfer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_45_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_MMEDirectInformationTransfer }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_46_S1AP_id_MMEDirectInformationTransfer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_46_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_ENBConfigurationTransfer }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_47_S1AP_id_eNBConfigurationTransfer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_47_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_MMEConfigurationTransfer }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_48_S1AP_id_MMEConfigurationTransfer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_48_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_PrivateMessage }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_49_S1AP_id_PrivateMessage }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_49_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_DownlinkUEAssociatedLPPaTransport }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_50_S1AP_id_downlinkUEAssociatedLPPaTransport }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_50_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UplinkUEAssociatedLPPaTransport }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_51_S1AP_id_uplinkUEAssociatedLPPaTransport }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_51_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_DownlinkNonUEAssociatedLPPaTransport }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_52_S1AP_id_downlinkNonUEAssociatedLPPaTransport }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_52_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UplinkNonUEAssociatedLPPaTransport }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_53_S1AP_id_uplinkNonUEAssociatedLPPaTransport }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_53_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_PWSRestartIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_54_S1AP_id_PWSRestartIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_54_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_RerouteNASRequest }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_55_S1AP_id_RerouteNASRequest }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_55_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_PWSFailureIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_56_S1AP_id_PWSFailureIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_56_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_ConnectionEstablishmentIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_57_S1AP_id_ConnectionEstablishmentIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_57_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_NASDeliveryIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_58_S1AP_id_NASDeliveryIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_58_S1AP_ignore }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_RetrieveUEInformation }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_59_S1AP_id_RetrieveUEInformation }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_59_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_UEInformationTransfer }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_60_S1AP_id_UEInformationTransfer }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_60_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_ENBCPRelocationIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_61_S1AP_id_eNBCPRelocationIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_61_S1AP_reject }, { "&InitiatingMessage", aioc__type, &asn_DEF_S1AP_MMECPRelocationIndication }, { "&SuccessfulOutcome", }, { "&UnsuccessfulOutcome", }, { "&procedureCode", aioc__value, &asn_DEF_S1AP_ProcedureCode, &asn_VAL_62_S1AP_id_MMECPRelocationIndication }, { "&criticality", aioc__value, &asn_DEF_S1AP_Criticality, &asn_VAL_62_S1AP_reject } }; static const asn_ioc_set_t asn_IOS_S1AP_S1AP_ELEMENTARY_PROCEDURES_1[] = { { 62, 5, asn_IOS_S1AP_S1AP_ELEMENTARY_PROCEDURES_1_rows } }; static int memb_S1AP_procedureCode_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { long value; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } value = *(const long *)sptr; if((value >= 0 && value <= 255)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } static asn_type_selector_result_t select_UnsuccessfulOutcome_S1AP_criticality_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_S1AP_ELEMENTARY_PROCEDURES_1; size_t constraining_column = 3; /* &procedureCode */ size_t for_column = 4; /* &criticality */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UnsuccessfulOutcome, procedureCode)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_criticality_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_type_selector_result_t select_UnsuccessfulOutcome_S1AP_value_type(const asn_TYPE_descriptor_t *parent_type, const void *parent_sptr) { asn_type_selector_result_t result = {0, 0}; const asn_ioc_set_t *itable = asn_IOS_S1AP_S1AP_ELEMENTARY_PROCEDURES_1; size_t constraining_column = 3; /* &procedureCode */ size_t for_column = 2; /* &UnsuccessfulOutcome */ size_t row, presence_index = 0; const long *constraining_value = (const long *)((const char *)parent_sptr + offsetof(struct S1AP_UnsuccessfulOutcome, procedureCode)); for(row=0; row < itable->rows_count; row++) { const asn_ioc_cell_t *constraining_cell = &itable->rows[row * itable->columns_count + constraining_column]; const asn_ioc_cell_t *type_cell = &itable->rows[row * itable->columns_count + for_column]; if(type_cell->cell_kind == aioc__undefined) continue; presence_index++; if(constraining_cell->type_descriptor->op->compare_struct(constraining_cell->type_descriptor, constraining_value, constraining_cell->value_sptr) == 0) { result.type_descriptor = type_cell->type_descriptor; result.presence_index = presence_index; break; } } return result; } static int memb_S1AP_value_constraint_1(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } if(1 /* No applicable constraints whatsoever */) { /* Nothing is here. See below */ } return td->encoding_constraints.general_constraints(td, sptr, ctfailcb, app_key); } static asn_oer_constraints_t asn_OER_memb_S1AP_procedureCode_constr_2 CC_NOTUSED = { { 1, 1 } /* (0..255) */, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_procedureCode_constr_2 CC_NOTUSED = { { APC_CONSTRAINED, 8, 8, 0, 255 } /* (0..255) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_criticality_constr_3 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_criticality_constr_3 CC_NOTUSED = { { APC_CONSTRAINED, 2, 2, 0, 2 } /* (0..2) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_oer_constraints_t asn_OER_memb_S1AP_value_constr_4 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_memb_S1AP_value_constr_4 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_value_4[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UnsuccessfulOutcome__value, choice.HandoverPreparationFailure), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_HandoverPreparationFailure, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "HandoverPreparationFailure" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UnsuccessfulOutcome__value, choice.HandoverFailure), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_HandoverFailure, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "HandoverFailure" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UnsuccessfulOutcome__value, choice.PathSwitchRequestFailure), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_PathSwitchRequestFailure, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "PathSwitchRequestFailure" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UnsuccessfulOutcome__value, choice.InitialContextSetupFailure), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_InitialContextSetupFailure, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "InitialContextSetupFailure" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UnsuccessfulOutcome__value, choice.S1SetupFailure), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_S1SetupFailure, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "S1SetupFailure" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UnsuccessfulOutcome__value, choice.UEContextModificationFailure), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextModificationFailure, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEContextModificationFailure" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UnsuccessfulOutcome__value, choice.ENBConfigurationUpdateFailure), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_ENBConfigurationUpdateFailure, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "ENBConfigurationUpdateFailure" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UnsuccessfulOutcome__value, choice.MMEConfigurationUpdateFailure), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_MMEConfigurationUpdateFailure, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "MMEConfigurationUpdateFailure" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UnsuccessfulOutcome__value, choice.UEContextResumeFailure), (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, &asn_DEF_S1AP_UEContextResumeFailure, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "UEContextResumeFailure" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_value_tag2el_4[] = { { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 0, 0, 8 }, /* HandoverPreparationFailure */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, -1, 7 }, /* HandoverFailure */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 2, -2, 6 }, /* PathSwitchRequestFailure */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 3, -3, 5 }, /* InitialContextSetupFailure */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 4, -4, 4 }, /* S1SetupFailure */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 5, -5, 3 }, /* UEContextModificationFailure */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 6, -6, 2 }, /* ENBConfigurationUpdateFailure */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 7, -7, 1 }, /* MMEConfigurationUpdateFailure */ { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 8, -8, 0 } /* UEContextResumeFailure */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_value_specs_4 = { sizeof(struct S1AP_UnsuccessfulOutcome__value), offsetof(struct S1AP_UnsuccessfulOutcome__value, _asn_ctx), offsetof(struct S1AP_UnsuccessfulOutcome__value, present), sizeof(((struct S1AP_UnsuccessfulOutcome__value *)0)->present), asn_MAP_S1AP_value_tag2el_4, 9, /* Count of tags in the map */ 0, 0, -1 /* Extensions start */ }; static /* Use -fall-defs-global to expose */ asn_TYPE_descriptor_t asn_DEF_S1AP_value_4 = { "value", "value", &asn_OP_OPEN_TYPE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { 0, 0, OPEN_TYPE_constraint }, asn_MBR_S1AP_value_4, 9, /* Elements count */ &asn_SPC_S1AP_value_specs_4 /* Additional specs */ }; asn_TYPE_member_t asn_MBR_S1AP_UnsuccessfulOutcome_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UnsuccessfulOutcome, procedureCode), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProcedureCode, 0, { &asn_OER_memb_S1AP_procedureCode_constr_2, &asn_PER_memb_S1AP_procedureCode_constr_2, memb_S1AP_procedureCode_constraint_1 }, 0, 0, /* No default value */ "procedureCode" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UnsuccessfulOutcome, criticality), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_Criticality, select_UnsuccessfulOutcome_S1AP_criticality_type, { &asn_OER_memb_S1AP_criticality_constr_3, &asn_PER_memb_S1AP_criticality_constr_3, memb_S1AP_criticality_constraint_1 }, 0, 0, /* No default value */ "criticality" }, { ATF_OPEN_TYPE | ATF_NOFLAGS, 0, offsetof(struct S1AP_UnsuccessfulOutcome, value), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), +1, /* EXPLICIT tag at current level */ &asn_DEF_S1AP_value_4, select_UnsuccessfulOutcome_S1AP_value_type, { &asn_OER_memb_S1AP_value_constr_4, &asn_PER_memb_S1AP_value_constr_4, memb_S1AP_value_constraint_1 }, 0, 0, /* No default value */ "value" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UnsuccessfulOutcome_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UnsuccessfulOutcome_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* procedureCode */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* criticality */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* value */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UnsuccessfulOutcome_specs_1 = { sizeof(struct S1AP_UnsuccessfulOutcome), offsetof(struct S1AP_UnsuccessfulOutcome, _asn_ctx), asn_MAP_S1AP_UnsuccessfulOutcome_tag2el_1, 3, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ -1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UnsuccessfulOutcome = { "UnsuccessfulOutcome", "UnsuccessfulOutcome", &asn_OP_SEQUENCE, asn_DEF_S1AP_UnsuccessfulOutcome_tags_1, sizeof(asn_DEF_S1AP_UnsuccessfulOutcome_tags_1) /sizeof(asn_DEF_S1AP_UnsuccessfulOutcome_tags_1[0]), /* 1 */ asn_DEF_S1AP_UnsuccessfulOutcome_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UnsuccessfulOutcome_tags_1) /sizeof(asn_DEF_S1AP_UnsuccessfulOutcome_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UnsuccessfulOutcome_1, 3, /* Elements count */ &asn_SPC_S1AP_UnsuccessfulOutcome_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UnsuccessfulOutcome.h000066400000000000000000000145111333553357400226500ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Descriptions" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UnsuccessfulOutcome_H_ #define _S1AP_UnsuccessfulOutcome_H_ #include /* Including external dependencies */ #include "S1AP_ProcedureCode.h" #include "S1AP_Criticality.h" #include #include #include "S1AP_HandoverRequired.h" #include "S1AP_HandoverCommand.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-RABReleaseCommand.h" #include "S1AP_E-RABReleaseResponse.h" #include "S1AP_InitialContextSetupRequest.h" #include "S1AP_InitialContextSetupResponse.h" #include "S1AP_InitialContextSetupFailure.h" #include "S1AP_HandoverCancel.h" #include "S1AP_HandoverCancelAcknowledge.h" #include "S1AP_KillRequest.h" #include "S1AP_KillResponse.h" #include "S1AP_Reset.h" #include "S1AP_ResetAcknowledge.h" #include "S1AP_S1SetupRequest.h" #include "S1AP_S1SetupResponse.h" #include "S1AP_S1SetupFailure.h" #include "S1AP_UEContextModificationRequest.h" #include "S1AP_UEContextModificationResponse.h" #include "S1AP_UEContextModificationFailure.h" #include "S1AP_UEContextReleaseCommand.h" #include "S1AP_UEContextReleaseComplete.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_WriteReplaceWarningRequest.h" #include "S1AP_WriteReplaceWarningResponse.h" #include "S1AP_UERadioCapabilityMatchRequest.h" #include "S1AP_UERadioCapabilityMatchResponse.h" #include "S1AP_E-RABModificationIndication.h" #include "S1AP_E-RABModificationConfirm.h" #include "S1AP_UEContextModificationIndication.h" #include "S1AP_UEContextModificationConfirm.h" #include "S1AP_UEContextSuspendRequest.h" #include "S1AP_UEContextSuspendResponse.h" #include "S1AP_UEContextResumeRequest.h" #include "S1AP_UEContextResumeResponse.h" #include "S1AP_UEContextResumeFailure.h" #include "S1AP_HandoverNotify.h" #include "S1AP_E-RABReleaseIndication.h" #include "S1AP_Paging.h" #include "S1AP_DownlinkNASTransport.h" #include "S1AP_InitialUEMessage.h" #include "S1AP_UplinkNASTransport.h" #include "S1AP_ErrorIndication.h" #include "S1AP_NASNonDeliveryIndication.h" #include "S1AP_UEContextReleaseRequest.h" #include "S1AP_DownlinkS1cdma2000tunnelling.h" #include "S1AP_UplinkS1cdma2000tunnelling.h" #include "S1AP_UECapabilityInfoIndication.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_ENBDirectInformationTransfer.h" #include "S1AP_MMEDirectInformationTransfer.h" #include "S1AP_ENBConfigurationTransfer.h" #include "S1AP_MMEConfigurationTransfer.h" #include "S1AP_PrivateMessage.h" #include "S1AP_DownlinkUEAssociatedLPPaTransport.h" #include "S1AP_UplinkUEAssociatedLPPaTransport.h" #include "S1AP_DownlinkNonUEAssociatedLPPaTransport.h" #include "S1AP_UplinkNonUEAssociatedLPPaTransport.h" #include "S1AP_PWSRestartIndication.h" #include "S1AP_RerouteNASRequest.h" #include "S1AP_PWSFailureIndication.h" #include "S1AP_ConnectionEstablishmentIndication.h" #include "S1AP_NASDeliveryIndication.h" #include "S1AP_RetrieveUEInformation.h" #include "S1AP_UEInformationTransfer.h" #include "S1AP_ENBCPRelocationIndication.h" #include "S1AP_MMECPRelocationIndication.h" #include #include #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_UnsuccessfulOutcome__value_PR { S1AP_UnsuccessfulOutcome__value_PR_NOTHING, /* No components present */ S1AP_UnsuccessfulOutcome__value_PR_HandoverPreparationFailure, S1AP_UnsuccessfulOutcome__value_PR_HandoverFailure, S1AP_UnsuccessfulOutcome__value_PR_PathSwitchRequestFailure, S1AP_UnsuccessfulOutcome__value_PR_InitialContextSetupFailure, S1AP_UnsuccessfulOutcome__value_PR_S1SetupFailure, S1AP_UnsuccessfulOutcome__value_PR_UEContextModificationFailure, S1AP_UnsuccessfulOutcome__value_PR_ENBConfigurationUpdateFailure, S1AP_UnsuccessfulOutcome__value_PR_MMEConfigurationUpdateFailure, S1AP_UnsuccessfulOutcome__value_PR_UEContextResumeFailure } S1AP_UnsuccessfulOutcome__value_PR; /* S1AP_UnsuccessfulOutcome */ typedef struct S1AP_UnsuccessfulOutcome { S1AP_ProcedureCode_t procedureCode; S1AP_Criticality_t criticality; struct S1AP_UnsuccessfulOutcome__value { S1AP_UnsuccessfulOutcome__value_PR present; union S1AP_UnsuccessfulOutcome__S1AP_value_u { S1AP_HandoverPreparationFailure_t HandoverPreparationFailure; S1AP_HandoverFailure_t HandoverFailure; S1AP_PathSwitchRequestFailure_t PathSwitchRequestFailure; S1AP_InitialContextSetupFailure_t InitialContextSetupFailure; S1AP_S1SetupFailure_t S1SetupFailure; S1AP_UEContextModificationFailure_t UEContextModificationFailure; S1AP_ENBConfigurationUpdateFailure_t ENBConfigurationUpdateFailure; S1AP_MMEConfigurationUpdateFailure_t MMEConfigurationUpdateFailure; S1AP_UEContextResumeFailure_t UEContextResumeFailure; } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } value; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UnsuccessfulOutcome_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UnsuccessfulOutcome; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UnsuccessfulOutcome_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UnsuccessfulOutcome_1[3]; #ifdef __cplusplus } #endif #endif /* _S1AP_UnsuccessfulOutcome_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UplinkNASTransport.c000066400000000000000000000034101333553357400223420ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UplinkNASTransport.h" asn_TYPE_member_t asn_MBR_S1AP_UplinkNASTransport_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkNASTransport, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P33, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UplinkNASTransport_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UplinkNASTransport_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UplinkNASTransport_specs_1 = { sizeof(struct S1AP_UplinkNASTransport), offsetof(struct S1AP_UplinkNASTransport, _asn_ctx), asn_MAP_S1AP_UplinkNASTransport_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UplinkNASTransport = { "UplinkNASTransport", "UplinkNASTransport", &asn_OP_SEQUENCE, asn_DEF_S1AP_UplinkNASTransport_tags_1, sizeof(asn_DEF_S1AP_UplinkNASTransport_tags_1) /sizeof(asn_DEF_S1AP_UplinkNASTransport_tags_1[0]), /* 1 */ asn_DEF_S1AP_UplinkNASTransport_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UplinkNASTransport_tags_1) /sizeof(asn_DEF_S1AP_UplinkNASTransport_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UplinkNASTransport_1, 1, /* Elements count */ &asn_SPC_S1AP_UplinkNASTransport_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UplinkNASTransport.h000066400000000000000000000021151333553357400223500ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UplinkNASTransport_H_ #define _S1AP_UplinkNASTransport_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UplinkNASTransport */ typedef struct S1AP_UplinkNASTransport { S1AP_ProtocolIE_Container_6551P33_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UplinkNASTransport_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UplinkNASTransport; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UplinkNASTransport_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UplinkNASTransport_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_UplinkNASTransport_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UplinkNonUEAssociatedLPPaTransport.c000066400000000000000000000041101333553357400254200ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UplinkNonUEAssociatedLPPaTransport.h" asn_TYPE_member_t asn_MBR_S1AP_UplinkNonUEAssociatedLPPaTransport_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkNonUEAssociatedLPPaTransport, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P76, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UplinkNonUEAssociatedLPPaTransport_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UplinkNonUEAssociatedLPPaTransport_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UplinkNonUEAssociatedLPPaTransport_specs_1 = { sizeof(struct S1AP_UplinkNonUEAssociatedLPPaTransport), offsetof(struct S1AP_UplinkNonUEAssociatedLPPaTransport, _asn_ctx), asn_MAP_S1AP_UplinkNonUEAssociatedLPPaTransport_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UplinkNonUEAssociatedLPPaTransport = { "UplinkNonUEAssociatedLPPaTransport", "UplinkNonUEAssociatedLPPaTransport", &asn_OP_SEQUENCE, asn_DEF_S1AP_UplinkNonUEAssociatedLPPaTransport_tags_1, sizeof(asn_DEF_S1AP_UplinkNonUEAssociatedLPPaTransport_tags_1) /sizeof(asn_DEF_S1AP_UplinkNonUEAssociatedLPPaTransport_tags_1[0]), /* 1 */ asn_DEF_S1AP_UplinkNonUEAssociatedLPPaTransport_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UplinkNonUEAssociatedLPPaTransport_tags_1) /sizeof(asn_DEF_S1AP_UplinkNonUEAssociatedLPPaTransport_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UplinkNonUEAssociatedLPPaTransport_1, 1, /* Elements count */ &asn_SPC_S1AP_UplinkNonUEAssociatedLPPaTransport_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UplinkNonUEAssociatedLPPaTransport.h000066400000000000000000000023351333553357400254340ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UplinkNonUEAssociatedLPPaTransport_H_ #define _S1AP_UplinkNonUEAssociatedLPPaTransport_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UplinkNonUEAssociatedLPPaTransport */ typedef struct S1AP_UplinkNonUEAssociatedLPPaTransport { S1AP_ProtocolIE_Container_6551P76_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UplinkNonUEAssociatedLPPaTransport_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UplinkNonUEAssociatedLPPaTransport; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UplinkNonUEAssociatedLPPaTransport_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UplinkNonUEAssociatedLPPaTransport_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_UplinkNonUEAssociatedLPPaTransport_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UplinkS1cdma2000tunnelling.c000066400000000000000000000036501333553357400235240ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UplinkS1cdma2000tunnelling.h" asn_TYPE_member_t asn_MBR_S1AP_UplinkS1cdma2000tunnelling_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkS1cdma2000tunnelling, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P50, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UplinkS1cdma2000tunnelling_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UplinkS1cdma2000tunnelling_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UplinkS1cdma2000tunnelling_specs_1 = { sizeof(struct S1AP_UplinkS1cdma2000tunnelling), offsetof(struct S1AP_UplinkS1cdma2000tunnelling, _asn_ctx), asn_MAP_S1AP_UplinkS1cdma2000tunnelling_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UplinkS1cdma2000tunnelling = { "UplinkS1cdma2000tunnelling", "UplinkS1cdma2000tunnelling", &asn_OP_SEQUENCE, asn_DEF_S1AP_UplinkS1cdma2000tunnelling_tags_1, sizeof(asn_DEF_S1AP_UplinkS1cdma2000tunnelling_tags_1) /sizeof(asn_DEF_S1AP_UplinkS1cdma2000tunnelling_tags_1[0]), /* 1 */ asn_DEF_S1AP_UplinkS1cdma2000tunnelling_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UplinkS1cdma2000tunnelling_tags_1) /sizeof(asn_DEF_S1AP_UplinkS1cdma2000tunnelling_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UplinkS1cdma2000tunnelling_1, 1, /* Elements count */ &asn_SPC_S1AP_UplinkS1cdma2000tunnelling_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UplinkS1cdma2000tunnelling.h000066400000000000000000000022251333553357400235260ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UplinkS1cdma2000tunnelling_H_ #define _S1AP_UplinkS1cdma2000tunnelling_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UplinkS1cdma2000tunnelling */ typedef struct S1AP_UplinkS1cdma2000tunnelling { S1AP_ProtocolIE_Container_6551P50_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UplinkS1cdma2000tunnelling_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UplinkS1cdma2000tunnelling; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UplinkS1cdma2000tunnelling_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UplinkS1cdma2000tunnelling_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_UplinkS1cdma2000tunnelling_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UplinkUEAssociatedLPPaTransport.c000066400000000000000000000040141333553357400247500ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UplinkUEAssociatedLPPaTransport.h" asn_TYPE_member_t asn_MBR_S1AP_UplinkUEAssociatedLPPaTransport_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UplinkUEAssociatedLPPaTransport, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P74, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_UplinkUEAssociatedLPPaTransport_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UplinkUEAssociatedLPPaTransport_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_UplinkUEAssociatedLPPaTransport_specs_1 = { sizeof(struct S1AP_UplinkUEAssociatedLPPaTransport), offsetof(struct S1AP_UplinkUEAssociatedLPPaTransport, _asn_ctx), asn_MAP_S1AP_UplinkUEAssociatedLPPaTransport_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UplinkUEAssociatedLPPaTransport = { "UplinkUEAssociatedLPPaTransport", "UplinkUEAssociatedLPPaTransport", &asn_OP_SEQUENCE, asn_DEF_S1AP_UplinkUEAssociatedLPPaTransport_tags_1, sizeof(asn_DEF_S1AP_UplinkUEAssociatedLPPaTransport_tags_1) /sizeof(asn_DEF_S1AP_UplinkUEAssociatedLPPaTransport_tags_1[0]), /* 1 */ asn_DEF_S1AP_UplinkUEAssociatedLPPaTransport_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UplinkUEAssociatedLPPaTransport_tags_1) /sizeof(asn_DEF_S1AP_UplinkUEAssociatedLPPaTransport_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UplinkUEAssociatedLPPaTransport_1, 1, /* Elements count */ &asn_SPC_S1AP_UplinkUEAssociatedLPPaTransport_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UplinkUEAssociatedLPPaTransport.h000066400000000000000000000023021333553357400247530ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UplinkUEAssociatedLPPaTransport_H_ #define _S1AP_UplinkUEAssociatedLPPaTransport_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_UplinkUEAssociatedLPPaTransport */ typedef struct S1AP_UplinkUEAssociatedLPPaTransport { S1AP_ProtocolIE_Container_6551P74_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UplinkUEAssociatedLPPaTransport_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UplinkUEAssociatedLPPaTransport; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_UplinkUEAssociatedLPPaTransport_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_UplinkUEAssociatedLPPaTransport_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_UplinkUEAssociatedLPPaTransport_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UserLocationInformation.c000066400000000000000000000052251333553357400234440ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_UserLocationInformation.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_UserLocationInformation_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_UserLocationInformation, eutran_cgi), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_EUTRAN_CGI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "eutran-cgi" }, { ATF_NOFLAGS, 0, offsetof(struct S1AP_UserLocationInformation, tai), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TAI, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "tai" }, { ATF_POINTER, 1, offsetof(struct S1AP_UserLocationInformation, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P115, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_UserLocationInformation_oms_1[] = { 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_UserLocationInformation_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_UserLocationInformation_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eutran-cgi */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* tai */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_UserLocationInformation_specs_1 = { sizeof(struct S1AP_UserLocationInformation), offsetof(struct S1AP_UserLocationInformation, _asn_ctx), asn_MAP_S1AP_UserLocationInformation_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_UserLocationInformation_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_UserLocationInformation = { "UserLocationInformation", "UserLocationInformation", &asn_OP_SEQUENCE, asn_DEF_S1AP_UserLocationInformation_tags_1, sizeof(asn_DEF_S1AP_UserLocationInformation_tags_1) /sizeof(asn_DEF_S1AP_UserLocationInformation_tags_1[0]), /* 1 */ asn_DEF_S1AP_UserLocationInformation_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_UserLocationInformation_tags_1) /sizeof(asn_DEF_S1AP_UserLocationInformation_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_UserLocationInformation_1, 3, /* Elements count */ &asn_SPC_S1AP_UserLocationInformation_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_UserLocationInformation.h000066400000000000000000000021651333553357400234510ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_UserLocationInformation_H_ #define _S1AP_UserLocationInformation_H_ #include /* Including external dependencies */ #include "S1AP_EUTRAN-CGI.h" #include "S1AP_TAI.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_UserLocationInformation */ typedef struct S1AP_UserLocationInformation { S1AP_EUTRAN_CGI_t eutran_cgi; S1AP_TAI_t tai; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_UserLocationInformation_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_UserLocationInformation; #ifdef __cplusplus } #endif #endif /* _S1AP_UserLocationInformation_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_V2XServicesAuthorized.c000066400000000000000000000052131333553357400230060ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_V2XServicesAuthorized.h" #include "S1AP_ProtocolExtensionContainer.h" static asn_TYPE_member_t asn_MBR_S1AP_V2XServicesAuthorized_1[] = { { ATF_POINTER, 3, offsetof(struct S1AP_V2XServicesAuthorized, vehicleUE), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_VehicleUE, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "vehicleUE" }, { ATF_POINTER, 2, offsetof(struct S1AP_V2XServicesAuthorized, pedestrianUE), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_PedestrianUE, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "pedestrianUE" }, { ATF_POINTER, 1, offsetof(struct S1AP_V2XServicesAuthorized, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P116, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_V2XServicesAuthorized_oms_1[] = { 0, 1, 2 }; static const ber_tlv_tag_t asn_DEF_S1AP_V2XServicesAuthorized_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_V2XServicesAuthorized_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* vehicleUE */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* pedestrianUE */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* iE-Extensions */ }; static asn_SEQUENCE_specifics_t asn_SPC_S1AP_V2XServicesAuthorized_specs_1 = { sizeof(struct S1AP_V2XServicesAuthorized), offsetof(struct S1AP_V2XServicesAuthorized, _asn_ctx), asn_MAP_S1AP_V2XServicesAuthorized_tag2el_1, 3, /* Count of tags in the map */ asn_MAP_S1AP_V2XServicesAuthorized_oms_1, /* Optional members */ 3, 0, /* Root/Additions */ 3, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_V2XServicesAuthorized = { "V2XServicesAuthorized", "V2XServicesAuthorized", &asn_OP_SEQUENCE, asn_DEF_S1AP_V2XServicesAuthorized_tags_1, sizeof(asn_DEF_S1AP_V2XServicesAuthorized_tags_1) /sizeof(asn_DEF_S1AP_V2XServicesAuthorized_tags_1[0]), /* 1 */ asn_DEF_S1AP_V2XServicesAuthorized_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_V2XServicesAuthorized_tags_1) /sizeof(asn_DEF_S1AP_V2XServicesAuthorized_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_V2XServicesAuthorized_1, 3, /* Elements count */ &asn_SPC_S1AP_V2XServicesAuthorized_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_V2XServicesAuthorized.h000066400000000000000000000022351333553357400230140ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_V2XServicesAuthorized_H_ #define _S1AP_V2XServicesAuthorized_H_ #include /* Including external dependencies */ #include "S1AP_VehicleUE.h" #include "S1AP_PedestrianUE.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_V2XServicesAuthorized */ typedef struct S1AP_V2XServicesAuthorized { S1AP_VehicleUE_t *vehicleUE; /* OPTIONAL */ S1AP_PedestrianUE_t *pedestrianUE; /* OPTIONAL */ struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_V2XServicesAuthorized_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_V2XServicesAuthorized; #ifdef __cplusplus } #endif #endif /* _S1AP_V2XServicesAuthorized_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_VehicleUE.c000066400000000000000000000037321333553357400204410ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_VehicleUE.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_VehicleUE_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; asn_per_constraints_t asn_PER_type_S1AP_VehicleUE_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_VehicleUE_value2enum_1[] = { { 0, 10, "authorized" }, { 1, 14, "not-authorized" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_VehicleUE_enum2value_1[] = { 0, /* authorized(0) */ 1 /* not-authorized(1) */ /* This list is extensible */ }; const asn_INTEGER_specifics_t asn_SPC_S1AP_VehicleUE_specs_1 = { asn_MAP_S1AP_VehicleUE_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_VehicleUE_enum2value_1, /* N => "tag"; sorted by N */ 2, /* Number of elements in the maps */ 3, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_VehicleUE_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_VehicleUE = { "VehicleUE", "VehicleUE", &asn_OP_NativeEnumerated, asn_DEF_S1AP_VehicleUE_tags_1, sizeof(asn_DEF_S1AP_VehicleUE_tags_1) /sizeof(asn_DEF_S1AP_VehicleUE_tags_1[0]), /* 1 */ asn_DEF_S1AP_VehicleUE_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_VehicleUE_tags_1) /sizeof(asn_DEF_S1AP_VehicleUE_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_VehicleUE_constr_1, &asn_PER_type_S1AP_VehicleUE_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_VehicleUE_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_VehicleUE.h000066400000000000000000000026651333553357400204520ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_VehicleUE_H_ #define _S1AP_VehicleUE_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_VehicleUE { S1AP_VehicleUE_authorized = 0, S1AP_VehicleUE_not_authorized = 1 /* * Enumeration is extensible */ } e_S1AP_VehicleUE; /* S1AP_VehicleUE */ typedef long S1AP_VehicleUE_t; /* Implementation */ extern asn_per_constraints_t asn_PER_type_S1AP_VehicleUE_constr_1; extern asn_TYPE_descriptor_t asn_DEF_S1AP_VehicleUE; extern const asn_INTEGER_specifics_t asn_SPC_VehicleUE_specs_1; asn_struct_free_f VehicleUE_free; asn_struct_print_f VehicleUE_print; asn_constr_check_f VehicleUE_constraint; ber_type_decoder_f VehicleUE_decode_ber; der_type_encoder_f VehicleUE_encode_der; xer_type_decoder_f VehicleUE_decode_xer; xer_type_encoder_f VehicleUE_encode_xer; oer_type_decoder_f VehicleUE_decode_oer; oer_type_encoder_f VehicleUE_encode_oer; per_type_decoder_f VehicleUE_decode_uper; per_type_encoder_f VehicleUE_encode_uper; per_type_decoder_f VehicleUE_decode_aper; per_type_encoder_f VehicleUE_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_VehicleUE_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_VoiceSupportMatchIndicator.c000066400000000000000000000045101333553357400240770ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_VoiceSupportMatchIndicator.h" /* * This type is implemented using NativeEnumerated, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_VoiceSupportMatchIndicator_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_VoiceSupportMatchIndicator_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 1, 1, 0, 1 } /* (0..1,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static const asn_INTEGER_enum_map_t asn_MAP_S1AP_VoiceSupportMatchIndicator_value2enum_1[] = { { 0, 9, "supported" }, { 1, 13, "not-supported" } /* This list is extensible */ }; static const unsigned int asn_MAP_S1AP_VoiceSupportMatchIndicator_enum2value_1[] = { 1, /* not-supported(1) */ 0 /* supported(0) */ /* This list is extensible */ }; static const asn_INTEGER_specifics_t asn_SPC_S1AP_VoiceSupportMatchIndicator_specs_1 = { asn_MAP_S1AP_VoiceSupportMatchIndicator_value2enum_1, /* "tag" => N; sorted by tag */ asn_MAP_S1AP_VoiceSupportMatchIndicator_enum2value_1, /* N => "tag"; sorted by N */ 2, /* Number of elements in the maps */ 3, /* Extensions before this member */ 1, /* Strict enumeration */ 0, /* Native long size */ 0 }; static const ber_tlv_tag_t asn_DEF_S1AP_VoiceSupportMatchIndicator_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (10 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_VoiceSupportMatchIndicator = { "VoiceSupportMatchIndicator", "VoiceSupportMatchIndicator", &asn_OP_NativeEnumerated, asn_DEF_S1AP_VoiceSupportMatchIndicator_tags_1, sizeof(asn_DEF_S1AP_VoiceSupportMatchIndicator_tags_1) /sizeof(asn_DEF_S1AP_VoiceSupportMatchIndicator_tags_1[0]), /* 1 */ asn_DEF_S1AP_VoiceSupportMatchIndicator_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_VoiceSupportMatchIndicator_tags_1) /sizeof(asn_DEF_S1AP_VoiceSupportMatchIndicator_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_VoiceSupportMatchIndicator_constr_1, &asn_PER_type_S1AP_VoiceSupportMatchIndicator_constr_1, NativeEnumerated_constraint }, 0, 0, /* Defined elsewhere */ &asn_SPC_S1AP_VoiceSupportMatchIndicator_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_VoiceSupportMatchIndicator.h000066400000000000000000000033701333553357400241070ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_VoiceSupportMatchIndicator_H_ #define _S1AP_VoiceSupportMatchIndicator_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_VoiceSupportMatchIndicator { S1AP_VoiceSupportMatchIndicator_supported = 0, S1AP_VoiceSupportMatchIndicator_not_supported = 1 /* * Enumeration is extensible */ } e_S1AP_VoiceSupportMatchIndicator; /* S1AP_VoiceSupportMatchIndicator */ typedef long S1AP_VoiceSupportMatchIndicator_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_VoiceSupportMatchIndicator; asn_struct_free_f S1AP_VoiceSupportMatchIndicator_free; asn_struct_print_f S1AP_VoiceSupportMatchIndicator_print; asn_constr_check_f S1AP_VoiceSupportMatchIndicator_constraint; ber_type_decoder_f S1AP_VoiceSupportMatchIndicator_decode_ber; der_type_encoder_f S1AP_VoiceSupportMatchIndicator_encode_der; xer_type_decoder_f S1AP_VoiceSupportMatchIndicator_decode_xer; xer_type_encoder_f S1AP_VoiceSupportMatchIndicator_encode_xer; oer_type_decoder_f S1AP_VoiceSupportMatchIndicator_decode_oer; oer_type_encoder_f S1AP_VoiceSupportMatchIndicator_encode_oer; per_type_decoder_f S1AP_VoiceSupportMatchIndicator_decode_uper; per_type_encoder_f S1AP_VoiceSupportMatchIndicator_encode_uper; per_type_decoder_f S1AP_VoiceSupportMatchIndicator_decode_aper; per_type_encoder_f S1AP_VoiceSupportMatchIndicator_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_VoiceSupportMatchIndicator_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_WarningAreaList.c000066400000000000000000000053011333553357400216540ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_WarningAreaList.h" #include "S1AP_ECGIList.h" #include "S1AP_TAIListforWarning.h" #include "S1AP_EmergencyAreaIDList.h" static asn_oer_constraints_t asn_OER_type_S1AP_WarningAreaList_constr_1 CC_NOTUSED = { { 0, 0 }, -1}; static asn_per_constraints_t asn_PER_type_S1AP_WarningAreaList_constr_1 CC_NOTUSED = { { APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */, { APC_UNCONSTRAINED, -1, -1, 0, 0 }, 0, 0 /* No PER value map */ }; static asn_TYPE_member_t asn_MBR_S1AP_WarningAreaList_1[] = { { ATF_POINTER, 0, offsetof(struct S1AP_WarningAreaList, choice.cellIDList), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ECGIList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "cellIDList" }, { ATF_POINTER, 0, offsetof(struct S1AP_WarningAreaList, choice.trackingAreaListforWarning), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_TAIListforWarning, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "trackingAreaListforWarning" }, { ATF_POINTER, 0, offsetof(struct S1AP_WarningAreaList, choice.emergencyAreaIDList), (ASN_TAG_CLASS_CONTEXT | (2 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_EmergencyAreaIDList, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "emergencyAreaIDList" }, }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_WarningAreaList_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* cellIDList */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 }, /* trackingAreaListforWarning */ { (ASN_TAG_CLASS_CONTEXT | (2 << 2)), 2, 0, 0 } /* emergencyAreaIDList */ }; static asn_CHOICE_specifics_t asn_SPC_S1AP_WarningAreaList_specs_1 = { sizeof(struct S1AP_WarningAreaList), offsetof(struct S1AP_WarningAreaList, _asn_ctx), offsetof(struct S1AP_WarningAreaList, present), sizeof(((struct S1AP_WarningAreaList *)0)->present), asn_MAP_S1AP_WarningAreaList_tag2el_1, 3, /* Count of tags in the map */ 0, 0, 3 /* Extensions start */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_WarningAreaList = { "WarningAreaList", "WarningAreaList", &asn_OP_CHOICE, 0, /* No effective tags (pointer) */ 0, /* No effective tags (count) */ 0, /* No tags (pointer) */ 0, /* No tags (count) */ { &asn_OER_type_S1AP_WarningAreaList_constr_1, &asn_PER_type_S1AP_WarningAreaList_constr_1, CHOICE_constraint }, asn_MBR_S1AP_WarningAreaList_1, 3, /* Elements count */ &asn_SPC_S1AP_WarningAreaList_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_WarningAreaList.h000066400000000000000000000027471333553357400216740ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_WarningAreaList_H_ #define _S1AP_WarningAreaList_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* Dependencies */ typedef enum S1AP_WarningAreaList_PR { S1AP_WarningAreaList_PR_NOTHING, /* No components present */ S1AP_WarningAreaList_PR_cellIDList, S1AP_WarningAreaList_PR_trackingAreaListforWarning, S1AP_WarningAreaList_PR_emergencyAreaIDList /* Extensions may appear below */ } S1AP_WarningAreaList_PR; /* Forward declarations */ struct S1AP_ECGIList; struct S1AP_TAIListforWarning; struct S1AP_EmergencyAreaIDList; /* S1AP_WarningAreaList */ typedef struct S1AP_WarningAreaList { S1AP_WarningAreaList_PR present; union S1AP_WarningAreaList_u { struct S1AP_ECGIList *cellIDList; struct S1AP_TAIListforWarning *trackingAreaListforWarning; struct S1AP_EmergencyAreaIDList *emergencyAreaIDList; /* * This type is extensible, * possible extensions are below. */ } choice; /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_WarningAreaList_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_WarningAreaList; #ifdef __cplusplus } #endif #endif /* _S1AP_WarningAreaList_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_WarningMessageContents.c000066400000000000000000000041411333553357400232530ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_WarningMessageContents.h" int S1AP_WarningMessageContents_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } size = st->size; if((size >= 1 && size <= 9600)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_WarningMessageContents_constr_1 CC_NOTUSED = { { 0, 0 }, -1 /* (SIZE(1..9600)) */}; static asn_per_constraints_t asn_PER_type_S1AP_WarningMessageContents_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 14, 14, 1, 9600 } /* (SIZE(1..9600)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_WarningMessageContents_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_WarningMessageContents = { "WarningMessageContents", "WarningMessageContents", &asn_OP_OCTET_STRING, asn_DEF_S1AP_WarningMessageContents_tags_1, sizeof(asn_DEF_S1AP_WarningMessageContents_tags_1) /sizeof(asn_DEF_S1AP_WarningMessageContents_tags_1[0]), /* 1 */ asn_DEF_S1AP_WarningMessageContents_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_WarningMessageContents_tags_1) /sizeof(asn_DEF_S1AP_WarningMessageContents_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_WarningMessageContents_constr_1, &asn_PER_type_S1AP_WarningMessageContents_constr_1, S1AP_WarningMessageContents_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_WarningMessageContents.h000066400000000000000000000027001333553357400232570ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_WarningMessageContents_H_ #define _S1AP_WarningMessageContents_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_WarningMessageContents */ typedef OCTET_STRING_t S1AP_WarningMessageContents_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_WarningMessageContents; asn_struct_free_f S1AP_WarningMessageContents_free; asn_struct_print_f S1AP_WarningMessageContents_print; asn_constr_check_f S1AP_WarningMessageContents_constraint; ber_type_decoder_f S1AP_WarningMessageContents_decode_ber; der_type_encoder_f S1AP_WarningMessageContents_encode_der; xer_type_decoder_f S1AP_WarningMessageContents_decode_xer; xer_type_encoder_f S1AP_WarningMessageContents_encode_xer; oer_type_decoder_f S1AP_WarningMessageContents_decode_oer; oer_type_encoder_f S1AP_WarningMessageContents_encode_oer; per_type_decoder_f S1AP_WarningMessageContents_decode_uper; per_type_encoder_f S1AP_WarningMessageContents_encode_uper; per_type_decoder_f S1AP_WarningMessageContents_decode_aper; per_type_encoder_f S1AP_WarningMessageContents_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_WarningMessageContents_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_WarningSecurityInfo.c000066400000000000000000000040321333553357400225730ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_WarningSecurityInfo.h" int S1AP_WarningSecurityInfo_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } size = st->size; if((size == 50)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_WarningSecurityInfo_constr_1 CC_NOTUSED = { { 0, 0 }, 50 /* (SIZE(50..50)) */}; static asn_per_constraints_t asn_PER_type_S1AP_WarningSecurityInfo_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 50, 50 } /* (SIZE(50..50)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_WarningSecurityInfo_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_WarningSecurityInfo = { "WarningSecurityInfo", "WarningSecurityInfo", &asn_OP_OCTET_STRING, asn_DEF_S1AP_WarningSecurityInfo_tags_1, sizeof(asn_DEF_S1AP_WarningSecurityInfo_tags_1) /sizeof(asn_DEF_S1AP_WarningSecurityInfo_tags_1[0]), /* 1 */ asn_DEF_S1AP_WarningSecurityInfo_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_WarningSecurityInfo_tags_1) /sizeof(asn_DEF_S1AP_WarningSecurityInfo_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_WarningSecurityInfo_constr_1, &asn_PER_type_S1AP_WarningSecurityInfo_constr_1, S1AP_WarningSecurityInfo_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_WarningSecurityInfo.h000066400000000000000000000026071333553357400226060ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_WarningSecurityInfo_H_ #define _S1AP_WarningSecurityInfo_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_WarningSecurityInfo */ typedef OCTET_STRING_t S1AP_WarningSecurityInfo_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_WarningSecurityInfo; asn_struct_free_f S1AP_WarningSecurityInfo_free; asn_struct_print_f S1AP_WarningSecurityInfo_print; asn_constr_check_f S1AP_WarningSecurityInfo_constraint; ber_type_decoder_f S1AP_WarningSecurityInfo_decode_ber; der_type_encoder_f S1AP_WarningSecurityInfo_encode_der; xer_type_decoder_f S1AP_WarningSecurityInfo_decode_xer; xer_type_encoder_f S1AP_WarningSecurityInfo_encode_xer; oer_type_decoder_f S1AP_WarningSecurityInfo_decode_oer; oer_type_encoder_f S1AP_WarningSecurityInfo_encode_oer; per_type_decoder_f S1AP_WarningSecurityInfo_decode_uper; per_type_encoder_f S1AP_WarningSecurityInfo_encode_uper; per_type_decoder_f S1AP_WarningSecurityInfo_decode_aper; per_type_encoder_f S1AP_WarningSecurityInfo_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_WarningSecurityInfo_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_WarningType.c000066400000000000000000000036121333553357400210740ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_WarningType.h" int S1AP_WarningType_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const OCTET_STRING_t *st = (const OCTET_STRING_t *)sptr; size_t size; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } size = st->size; if((size == 2)) { /* Constraint check succeeded */ return 0; } else { ASN__CTFAIL(app_key, td, sptr, "%s: constraint failed (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } /* * This type is implemented using OCTET_STRING, * so here we adjust the DEF accordingly. */ static asn_oer_constraints_t asn_OER_type_S1AP_WarningType_constr_1 CC_NOTUSED = { { 0, 0 }, 2 /* (SIZE(2..2)) */}; static asn_per_constraints_t asn_PER_type_S1AP_WarningType_constr_1 CC_NOTUSED = { { APC_UNCONSTRAINED, -1, -1, 0, 0 }, { APC_CONSTRAINED, 0, 0, 2, 2 } /* (SIZE(2..2)) */, 0, 0 /* No PER value map */ }; static const ber_tlv_tag_t asn_DEF_S1AP_WarningType_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (4 << 2)) }; asn_TYPE_descriptor_t asn_DEF_S1AP_WarningType = { "WarningType", "WarningType", &asn_OP_OCTET_STRING, asn_DEF_S1AP_WarningType_tags_1, sizeof(asn_DEF_S1AP_WarningType_tags_1) /sizeof(asn_DEF_S1AP_WarningType_tags_1[0]), /* 1 */ asn_DEF_S1AP_WarningType_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_WarningType_tags_1) /sizeof(asn_DEF_S1AP_WarningType_tags_1[0]), /* 1 */ { &asn_OER_type_S1AP_WarningType_constr_1, &asn_PER_type_S1AP_WarningType_constr_1, S1AP_WarningType_constraint }, 0, 0, /* No members */ &asn_SPC_OCTET_STRING_specs /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_WarningType.h000066400000000000000000000023571333553357400211060ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_WarningType_H_ #define _S1AP_WarningType_H_ #include /* Including external dependencies */ #include #ifdef __cplusplus extern "C" { #endif /* S1AP_WarningType */ typedef OCTET_STRING_t S1AP_WarningType_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_WarningType; asn_struct_free_f S1AP_WarningType_free; asn_struct_print_f S1AP_WarningType_print; asn_constr_check_f S1AP_WarningType_constraint; ber_type_decoder_f S1AP_WarningType_decode_ber; der_type_encoder_f S1AP_WarningType_encode_der; xer_type_decoder_f S1AP_WarningType_decode_xer; xer_type_encoder_f S1AP_WarningType_encode_xer; oer_type_decoder_f S1AP_WarningType_decode_oer; oer_type_encoder_f S1AP_WarningType_encode_oer; per_type_decoder_f S1AP_WarningType_decode_uper; per_type_encoder_f S1AP_WarningType_encode_uper; per_type_decoder_f S1AP_WarningType_decode_aper; per_type_encoder_f S1AP_WarningType_encode_aper; #ifdef __cplusplus } #endif #endif /* _S1AP_WarningType_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_WriteReplaceWarningRequest.c000066400000000000000000000036501333553357400241140ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_WriteReplaceWarningRequest.h" asn_TYPE_member_t asn_MBR_S1AP_WriteReplaceWarningRequest_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_WriteReplaceWarningRequest, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P63, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_WriteReplaceWarningRequest_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_WriteReplaceWarningRequest_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_WriteReplaceWarningRequest_specs_1 = { sizeof(struct S1AP_WriteReplaceWarningRequest), offsetof(struct S1AP_WriteReplaceWarningRequest, _asn_ctx), asn_MAP_S1AP_WriteReplaceWarningRequest_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_WriteReplaceWarningRequest = { "WriteReplaceWarningRequest", "WriteReplaceWarningRequest", &asn_OP_SEQUENCE, asn_DEF_S1AP_WriteReplaceWarningRequest_tags_1, sizeof(asn_DEF_S1AP_WriteReplaceWarningRequest_tags_1) /sizeof(asn_DEF_S1AP_WriteReplaceWarningRequest_tags_1[0]), /* 1 */ asn_DEF_S1AP_WriteReplaceWarningRequest_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_WriteReplaceWarningRequest_tags_1) /sizeof(asn_DEF_S1AP_WriteReplaceWarningRequest_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_WriteReplaceWarningRequest_1, 1, /* Elements count */ &asn_SPC_S1AP_WriteReplaceWarningRequest_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_WriteReplaceWarningRequest.h000066400000000000000000000022251333553357400241160ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_WriteReplaceWarningRequest_H_ #define _S1AP_WriteReplaceWarningRequest_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_WriteReplaceWarningRequest */ typedef struct S1AP_WriteReplaceWarningRequest { S1AP_ProtocolIE_Container_6551P63_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_WriteReplaceWarningRequest_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_WriteReplaceWarningRequest; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_WriteReplaceWarningRequest_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_WriteReplaceWarningRequest_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_WriteReplaceWarningRequest_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_WriteReplaceWarningResponse.c000066400000000000000000000036741333553357400242700ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_WriteReplaceWarningResponse.h" asn_TYPE_member_t asn_MBR_S1AP_WriteReplaceWarningResponse_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_WriteReplaceWarningResponse, protocolIEs), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolIE_Container_6551P64, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "protocolIEs" }, }; static const ber_tlv_tag_t asn_DEF_S1AP_WriteReplaceWarningResponse_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_WriteReplaceWarningResponse_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* protocolIEs */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_WriteReplaceWarningResponse_specs_1 = { sizeof(struct S1AP_WriteReplaceWarningResponse), offsetof(struct S1AP_WriteReplaceWarningResponse, _asn_ctx), asn_MAP_S1AP_WriteReplaceWarningResponse_tag2el_1, 1, /* Count of tags in the map */ 0, 0, 0, /* Optional elements (not needed) */ 1, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_WriteReplaceWarningResponse = { "WriteReplaceWarningResponse", "WriteReplaceWarningResponse", &asn_OP_SEQUENCE, asn_DEF_S1AP_WriteReplaceWarningResponse_tags_1, sizeof(asn_DEF_S1AP_WriteReplaceWarningResponse_tags_1) /sizeof(asn_DEF_S1AP_WriteReplaceWarningResponse_tags_1[0]), /* 1 */ asn_DEF_S1AP_WriteReplaceWarningResponse_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_WriteReplaceWarningResponse_tags_1) /sizeof(asn_DEF_S1AP_WriteReplaceWarningResponse_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_WriteReplaceWarningResponse_1, 1, /* Elements count */ &asn_SPC_S1AP_WriteReplaceWarningResponse_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_WriteReplaceWarningResponse.h000066400000000000000000000022361333553357400242660ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-PDU-Contents" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_WriteReplaceWarningResponse_H_ #define _S1AP_WriteReplaceWarningResponse_H_ #include /* Including external dependencies */ #include "S1AP_ProtocolIE-Container.h" #include #ifdef __cplusplus extern "C" { #endif /* S1AP_WriteReplaceWarningResponse */ typedef struct S1AP_WriteReplaceWarningResponse { S1AP_ProtocolIE_Container_6551P64_t protocolIEs; /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_WriteReplaceWarningResponse_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_WriteReplaceWarningResponse; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_WriteReplaceWarningResponse_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_WriteReplaceWarningResponse_1[1]; #ifdef __cplusplus } #endif #endif /* _S1AP_WriteReplaceWarningResponse_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_X2TNLConfigurationInfo.c000066400000000000000000000045721333553357400230460ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #include "S1AP_X2TNLConfigurationInfo.h" #include "S1AP_ProtocolExtensionContainer.h" asn_TYPE_member_t asn_MBR_S1AP_X2TNLConfigurationInfo_1[] = { { ATF_NOFLAGS, 0, offsetof(struct S1AP_X2TNLConfigurationInfo, eNBX2TransportLayerAddresses), (ASN_TAG_CLASS_CONTEXT | (0 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ENBX2TLAs, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "eNBX2TransportLayerAddresses" }, { ATF_POINTER, 1, offsetof(struct S1AP_X2TNLConfigurationInfo, iE_Extensions), (ASN_TAG_CLASS_CONTEXT | (1 << 2)), -1, /* IMPLICIT tag at current level */ &asn_DEF_S1AP_ProtocolExtensionContainer_6602P117, 0, { 0, 0, 0 }, 0, 0, /* No default value */ "iE-Extensions" }, }; static const int asn_MAP_S1AP_X2TNLConfigurationInfo_oms_1[] = { 1 }; static const ber_tlv_tag_t asn_DEF_S1AP_X2TNLConfigurationInfo_tags_1[] = { (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)) }; static const asn_TYPE_tag2member_t asn_MAP_S1AP_X2TNLConfigurationInfo_tag2el_1[] = { { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* eNBX2TransportLayerAddresses */ { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* iE-Extensions */ }; asn_SEQUENCE_specifics_t asn_SPC_S1AP_X2TNLConfigurationInfo_specs_1 = { sizeof(struct S1AP_X2TNLConfigurationInfo), offsetof(struct S1AP_X2TNLConfigurationInfo, _asn_ctx), asn_MAP_S1AP_X2TNLConfigurationInfo_tag2el_1, 2, /* Count of tags in the map */ asn_MAP_S1AP_X2TNLConfigurationInfo_oms_1, /* Optional members */ 1, 0, /* Root/Additions */ 2, /* First extension addition */ }; asn_TYPE_descriptor_t asn_DEF_S1AP_X2TNLConfigurationInfo = { "X2TNLConfigurationInfo", "X2TNLConfigurationInfo", &asn_OP_SEQUENCE, asn_DEF_S1AP_X2TNLConfigurationInfo_tags_1, sizeof(asn_DEF_S1AP_X2TNLConfigurationInfo_tags_1) /sizeof(asn_DEF_S1AP_X2TNLConfigurationInfo_tags_1[0]), /* 1 */ asn_DEF_S1AP_X2TNLConfigurationInfo_tags_1, /* Same as above */ sizeof(asn_DEF_S1AP_X2TNLConfigurationInfo_tags_1) /sizeof(asn_DEF_S1AP_X2TNLConfigurationInfo_tags_1[0]), /* 1 */ { 0, 0, SEQUENCE_constraint }, asn_MBR_S1AP_X2TNLConfigurationInfo_1, 2, /* Elements count */ &asn_SPC_S1AP_X2TNLConfigurationInfo_specs_1 /* Additional specs */ }; nextepc-0.3.10/lib/s1ap/asn1c/S1AP_X2TNLConfigurationInfo.h000066400000000000000000000023461333553357400230500ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "../support/r14.4.0/36413-e40.asn" * `asn1c -pdu=all -fcompound-names -findirect-choice -fno-include-deps` */ #ifndef _S1AP_X2TNLConfigurationInfo_H_ #define _S1AP_X2TNLConfigurationInfo_H_ #include /* Including external dependencies */ #include "S1AP_ENBX2TLAs.h" #include #ifdef __cplusplus extern "C" { #endif /* Forward declarations */ struct S1AP_ProtocolExtensionContainer; /* S1AP_X2TNLConfigurationInfo */ typedef struct S1AP_X2TNLConfigurationInfo { S1AP_ENBX2TLAs_t eNBX2TransportLayerAddresses; struct S1AP_ProtocolExtensionContainer *iE_Extensions; /* OPTIONAL */ /* * This type is extensible, * possible extensions are below. */ /* Context for parsing across buffer boundaries */ asn_struct_ctx_t _asn_ctx; } S1AP_X2TNLConfigurationInfo_t; /* Implementation */ extern asn_TYPE_descriptor_t asn_DEF_S1AP_X2TNLConfigurationInfo; extern asn_SEQUENCE_specifics_t asn_SPC_S1AP_X2TNLConfigurationInfo_specs_1; extern asn_TYPE_member_t asn_MBR_S1AP_X2TNLConfigurationInfo_1[2]; #ifdef __cplusplus } #endif #endif /* _S1AP_X2TNLConfigurationInfo_H_ */ #include nextepc-0.3.10/lib/s1ap/asn1c/S1AP_asn_constant.h000066400000000000000000000031741333553357400213270ustar00rootroot00000000000000/* * Generated by asn1c-0.9.29 (http://lionet.info/asn1c) */ #ifndef _S1AP_ASN_CONSTANT_H #define _S1AP_ASN_CONSTANT_H #ifdef __cplusplus extern "C" { #endif #define S1AP_maxPrivateIEs (65535) #define S1AP_maxProtocolExtensions (65535) #define S1AP_maxProtocolIEs (65535) #define S1AP_maxnoofCSGs (256) #define S1AP_maxnoofE_RABs (256) #define S1AP_maxnoofTAIs (256) #define S1AP_maxnoofTACs (256) #define S1AP_maxnoofErrors (256) #define S1AP_maxnoofBPLMNs (6) #define S1AP_maxnoofPLMNsPerMME (32) #define S1AP_maxnoofEPLMNs (15) #define S1AP_maxnoofEPLMNsPlusOne (16) #define S1AP_maxnoofForbLACs (4096) #define S1AP_maxnoofForbTACs (4096) #define S1AP_maxnoofIndividualS1ConnectionsToReset (256) #define S1AP_maxnoofCells (16) #define S1AP_maxnoofCellsineNB (256) #define S1AP_maxnoofTAIforWarning (65535) #define S1AP_maxnoofCellID (65535) #define S1AP_maxnoofDCNs (32) #define S1AP_maxnoofEmergencyAreaID (65535) #define S1AP_maxnoofCellinTAI (65535) #define S1AP_maxnoofCellinEAI (65535) #define S1AP_maxnoofeNBX2TLAs (2) #define S1AP_maxnoofeNBX2ExtTLAs (16) #define S1AP_maxnoofeNBX2GTPTLAs (16) #define S1AP_maxnoofRATs (8) #define S1AP_maxnoofGroupIDs (65535) #define S1AP_maxnoofMMECs (256) #define S1AP_maxnoofCellIDforMDT (32) #define S1AP_maxnoofTAforMDT (8) #define S1AP_maxnoofMDTPLMNs (16) #define S1AP_maxnoofCellsforRestart (256) #define S1AP_maxnoofRestartTAIs (2048) #define S1AP_maxnoofRestartEmergencyAreaIDs (256) #define S1AP_maxEARFCN (262143) #define S1AP_maxnoofMBSFNAreaMDT (8) #define S1AP_maxnoofRecommendedCells (16) #define S1AP_maxnoofRecommendedENBs (16) #ifdef __cplusplus } #endif #endif /* _S1AP_ASN_CONSTANT_H */ nextepc-0.3.10/lib/s1ap/asn1c/asn_SEQUENCE_OF.c000066400000000000000000000015601333553357400204760ustar00rootroot00000000000000/*- * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include typedef A_SEQUENCE_OF(void) asn_sequence; void asn_sequence_del(void *asn_sequence_of_x, int number, int _do_free) { asn_sequence *as = (asn_sequence *)asn_sequence_of_x; if(as) { void *ptr; int n; if(number < 0 || number >= as->count) return; /* Nothing to delete */ if(_do_free && as->free) { ptr = as->array[number]; } else { ptr = 0; } /* * Shift all elements to the left to hide the gap. */ --as->count; for(n = number; n < as->count; n++) as->array[n] = as->array[n+1]; /* * Invoke the third-party function only when the state * of the parent structure is consistent. */ if(ptr) as->free(ptr); } } nextepc-0.3.10/lib/s1ap/asn1c/asn_SEQUENCE_OF.h000066400000000000000000000027341333553357400205070ustar00rootroot00000000000000/*- * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef ASN_SEQUENCE_OF_H #define ASN_SEQUENCE_OF_H #include #ifdef __cplusplus extern "C" { #endif /* * SEQUENCE OF is the same as SET OF with a tiny difference: * the delete operation preserves the initial order of elements * and thus MAY operate in non-constant time. */ #define A_SEQUENCE_OF(type) A_SET_OF(type) #define ASN_SEQUENCE_ADD(headptr, ptr) \ asn_sequence_add((headptr), (ptr)) /*********************************************** * Implementation of the SEQUENCE OF structure. */ #define asn_sequence_add asn_set_add #define asn_sequence_empty asn_set_empty /* * Delete the element from the set by its number (base 0). * This is NOT a constant-time operation. * The order of elements is preserved. * If _do_free is given AND the (*free) is initialized, the element * will be freed using the custom (*free) function as well. */ void asn_sequence_del(void *asn_sequence_of_x, int number, int _do_free); /* * Cope with different conversions requirements to/from void in C and C++. * This is mostly useful for support library. */ typedef A_SEQUENCE_OF(void) asn_anonymous_sequence_; #define _A_SEQUENCE_FROM_VOID(ptr) ((asn_anonymous_sequence_ *)(ptr)) #define _A_CSEQUENCE_FROM_VOID(ptr) ((const asn_anonymous_sequence_ *)(ptr)) #ifdef __cplusplus } #endif #endif /* ASN_SEQUENCE_OF_H */ nextepc-0.3.10/lib/s1ap/asn1c/asn_SET_OF.c000066400000000000000000000032521333553357400177210ustar00rootroot00000000000000/*- * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include /* * Add another element into the set. */ int asn_set_add(void *asn_set_of_x, void *ptr) { asn_anonymous_set_ *as = _A_SET_FROM_VOID(asn_set_of_x); if(as == 0 || ptr == 0) { errno = EINVAL; /* Invalid arguments */ return -1; } /* * Make sure there's enough space to insert an element. */ if(as->count == as->size) { int _newsize = as->size ? (as->size << 1) : 4; void *_new_arr; _new_arr = REALLOC(as->array, _newsize * sizeof(as->array[0])); if(_new_arr) { as->array = (void **)_new_arr; as->size = _newsize; } else { /* ENOMEM */ return -1; } } as->array[as->count++] = ptr; return 0; } void asn_set_del(void *asn_set_of_x, int number, int _do_free) { asn_anonymous_set_ *as = _A_SET_FROM_VOID(asn_set_of_x); if(as) { void *ptr; if(number < 0 || number >= as->count) return; if(_do_free && as->free) { ptr = as->array[number]; } else { ptr = 0; } as->array[number] = as->array[--as->count]; /* * Invoke the third-party function only when the state * of the parent structure is consistent. */ if(ptr) as->free(ptr); } } /* * Free the contents of the set, do not free the set itself. */ void asn_set_empty(void *asn_set_of_x) { asn_anonymous_set_ *as = _A_SET_FROM_VOID(asn_set_of_x); if(as) { if(as->array) { if(as->free) { while(as->count--) as->free(as->array[as->count]); } FREEMEM(as->array); as->array = 0; } as->count = 0; as->size = 0; } } nextepc-0.3.10/lib/s1ap/asn1c/asn_SET_OF.h000066400000000000000000000040431333553357400177250ustar00rootroot00000000000000/*- * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef ASN_SET_OF_H #define ASN_SET_OF_H #ifdef __cplusplus #define A_SET_OF(type) \ struct { \ type **array; \ int count; /* Meaningful size */ \ int size; /* Allocated size */ \ void (*free)(decltype(*array)); \ } #else /* C */ #define A_SET_OF(type) \ struct { \ type **array; \ int count; /* Meaningful size */ \ int size; /* Allocated size */ \ void (*free)(type *); \ } #endif #ifdef __cplusplus extern "C" { #endif #define ASN_SET_ADD(headptr, ptr) \ asn_set_add((headptr), (ptr)) /******************************************* * Implementation of the SET OF structure. */ /* * Add another structure into the set by its pointer. * RETURN VALUES: * 0 for success and -1/errno for failure. */ int asn_set_add(void *asn_set_of_x, void *ptr); /* * Delete the element from the set by its number (base 0). * This is a constant-time operation. The order of elements before the * deleted ones is guaranteed, the order of elements after the deleted * one is NOT guaranteed. * If _do_free is given AND the (*free) is initialized, the element * will be freed using the custom (*free) function as well. */ void asn_set_del(void *asn_set_of_x, int number, int _do_free); /* * Empty the contents of the set. Will free the elements, if (*free) is given. * Will NOT free the set itself. */ void asn_set_empty(void *asn_set_of_x); /* * Cope with different conversions requirements to/from void in C and C++. * This is mostly useful for support library. */ typedef A_SET_OF(void) asn_anonymous_set_; #define _A_SET_FROM_VOID(ptr) ((asn_anonymous_set_ *)(ptr)) #define _A_CSET_FROM_VOID(ptr) ((const asn_anonymous_set_ *)(ptr)) #ifdef __cplusplus } #endif #endif /* ASN_SET_OF_H */ nextepc-0.3.10/lib/s1ap/asn1c/asn_application.c000066400000000000000000000354511333553357400212130ustar00rootroot00000000000000/* * Copyright (c) 2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include static asn_enc_rval_t asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, enum asn_transfer_syntax syntax, const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_consume_bytes_f *callback, void *callback_key); struct callback_count_bytes_key { asn_app_consume_bytes_f *callback; void *callback_key; size_t computed_size; }; /* * Encoder which just counts bytes that come through it. */ static int callback_count_bytes_cb(const void *data, size_t size, void *keyp) { struct callback_count_bytes_key *key = keyp; int ret; ret = key->callback(data, size, key->callback_key); if(ret >= 0) { key->computed_size += size; } return ret; } struct overrun_encoder_key { void *buffer; size_t buffer_size; size_t computed_size; }; struct dynamic_encoder_key { void *buffer; size_t buffer_size; size_t computed_size; }; struct callback_failure_catch_key { asn_app_consume_bytes_f *callback; void *callback_key; int callback_failed; }; /* * Encoder which doesn't stop counting bytes * even if it reaches the end of the buffer. */ static int overrun_encoder_cb(const void *data, size_t size, void *keyp) { struct overrun_encoder_key *key = keyp; if(key->computed_size + size > key->buffer_size) { /* * Avoid accident on the next call: * stop adding bytes to the buffer. */ key->buffer_size = 0; } else { memcpy((char *)key->buffer + key->computed_size, data, size); } key->computed_size += size; return 0; } /* * Encoder which dynamically allocates output, and continues * to count even if allocation failed. */ static int dynamic_encoder_cb(const void *data, size_t size, void *keyp) { struct dynamic_encoder_key *key = keyp; if(key->buffer) { if(key->computed_size + size >= key->buffer_size) { void *p; size_t new_size = key->buffer_size; do { new_size *= 2; } while(new_size <= key->computed_size + size); p = REALLOC(key->buffer, new_size); if(p) { key->buffer = p; key->buffer_size = new_size; } else { FREEMEM(key->buffer); key->buffer = 0; key->buffer_size = 0; key->computed_size += size; return 0; } } memcpy((char *)key->buffer + key->computed_size, data, size); } key->computed_size += size; return 0; } /* * Encoder which help convert the application level encoder failure into EIO. */ static int callback_failure_catch_cb(const void *data, size_t size, void *keyp) { struct callback_failure_catch_key *key = keyp; int ret; ret = key->callback(data, size, key->callback_key); if(ret < 0) { key->callback_failed = 1; } return ret; } asn_enc_rval_t asn_encode(const asn_codec_ctx_t *opt_codec_ctx, enum asn_transfer_syntax syntax, const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_consume_bytes_f *callback, void *callback_key) { struct callback_failure_catch_key cb_key; asn_enc_rval_t er; if(!callback) { errno = EINVAL; ASN__ENCODE_FAILED; } cb_key.callback = callback; cb_key.callback_key = callback_key; cb_key.callback_failed = 0; er = asn_encode_internal(opt_codec_ctx, syntax, td, sptr, callback_failure_catch_cb, &cb_key); if(cb_key.callback_failed) { assert(er.encoded == -1); assert(errno == EBADF); errno = EIO; } return er; } asn_enc_rval_t asn_encode_to_buffer(const asn_codec_ctx_t *opt_codec_ctx, enum asn_transfer_syntax syntax, const asn_TYPE_descriptor_t *td, const void *sptr, void *buffer, size_t buffer_size) { struct overrun_encoder_key buf_key; asn_enc_rval_t er; if(buffer_size > 0 && !buffer) { errno = EINVAL; ASN__ENCODE_FAILED; } buf_key.buffer = buffer; buf_key.buffer_size = buffer_size; buf_key.computed_size = 0; er = asn_encode_internal(opt_codec_ctx, syntax, td, sptr, overrun_encoder_cb, &buf_key); if(er.encoded >= 0 && (size_t)er.encoded != buf_key.computed_size) { ASN_DEBUG("asn_encode() returned %" ASN_PRI_SSIZE " yet produced %" ASN_PRI_SIZE " bytes", er.encoded, buf_key.computed_size); assert(er.encoded < 0 || (size_t)er.encoded == buf_key.computed_size); } return er; } asn_encode_to_new_buffer_result_t asn_encode_to_new_buffer(const asn_codec_ctx_t *opt_codec_ctx, enum asn_transfer_syntax syntax, const asn_TYPE_descriptor_t *td, const void *sptr) { struct dynamic_encoder_key buf_key; asn_encode_to_new_buffer_result_t res; buf_key.buffer_size = 16; buf_key.buffer = MALLOC(buf_key.buffer_size); buf_key.computed_size = 0; res.result = asn_encode_internal(opt_codec_ctx, syntax, td, sptr, dynamic_encoder_cb, &buf_key); if(res.result.encoded >= 0 && (size_t)res.result.encoded != buf_key.computed_size) { ASN_DEBUG("asn_encode() returned %" ASN_PRI_SSIZE " yet produced %" ASN_PRI_SIZE " bytes", res.result.encoded, buf_key.computed_size); assert(res.result.encoded < 0 || (size_t)res.result.encoded == buf_key.computed_size); } res.buffer = buf_key.buffer; /* 0-terminate just in case. */ if(res.buffer) { assert(buf_key.computed_size < buf_key.buffer_size); ((char *)res.buffer)[buf_key.computed_size] = '\0'; } return res; } static asn_enc_rval_t asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx, enum asn_transfer_syntax syntax, const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_consume_bytes_f *callback, void *callback_key) { asn_enc_rval_t er; enum xer_encoder_flags_e xer_flags = XER_F_CANONICAL; (void)opt_codec_ctx; /* Parameters are not checked on encode yet. */ if(!td || !sptr) { errno = EINVAL; ASN__ENCODE_FAILED; } switch(syntax) { case ATS_NONSTANDARD_PLAINTEXT: if(td->op->print_struct) { struct callback_count_bytes_key cb_key; cb_key.callback = callback; cb_key.callback_key = callback_key; cb_key.computed_size = 0; if(td->op->print_struct(td, sptr, 1, callback_count_bytes_cb, &cb_key) < 0 || callback_count_bytes_cb("\n", 1, &cb_key) < 0) { errno = EBADF; /* Structure has incorrect form. */ er.encoded = -1; er.failed_type = td; er.structure_ptr = sptr; } else { er.encoded = cb_key.computed_size; er.failed_type = 0; er.structure_ptr = 0; } } else { errno = ENOENT; /* Transfer syntax is not defined for this type. */ ASN__ENCODE_FAILED; } break; case ATS_RANDOM: errno = ENOENT; /* Randomization doesn't make sense on output. */ ASN__ENCODE_FAILED; case ATS_BER: /* BER is a superset of DER. */ /* Fall through. */ case ATS_DER: if(td->op->der_encoder) { er = der_encode(td, sptr, callback, callback_key); if(er.encoded == -1) { if(er.failed_type && er.failed_type->op->der_encoder) { errno = EBADF; /* Structure has incorrect form. */ } else { errno = ENOENT; /* DER is not defined for this type. */ } } } else { errno = ENOENT; /* Transfer syntax is not defined for this type. */ ASN__ENCODE_FAILED; } break; case ATS_CER: errno = ENOENT; /* Transfer syntax is not defined for any type. */ ASN__ENCODE_FAILED; #ifdef ASN_DISABLE_OER_SUPPORT case ATS_BASIC_OER: case ATS_CANONICAL_OER: errno = ENOENT; /* PER is not defined. */ ASN__ENCODE_FAILED; break; #else /* ASN_DISABLE_OER_SUPPORT */ case ATS_BASIC_OER: /* CANONICAL-OER is a superset of BASIC-OER. */ /* Fall through. */ case ATS_CANONICAL_OER: if(td->op->oer_encoder) { er = oer_encode(td, sptr, callback, callback_key); if(er.encoded == -1) { if(er.failed_type && er.failed_type->op->oer_encoder) { errno = EBADF; /* Structure has incorrect form. */ } else { errno = ENOENT; /* OER is not defined for this type. */ } } } else { errno = ENOENT; /* Transfer syntax is not defined for this type. */ ASN__ENCODE_FAILED; } break; #endif /* ASN_DISABLE_OER_SUPPORT */ #ifdef ASN_DISABLE_PER_SUPPORT case ATS_UNALIGNED_BASIC_PER: case ATS_UNALIGNED_CANONICAL_PER: case ATS_ALIGNED_BASIC_PER: case ATS_ALIGNED_CANONICAL_PER: errno = ENOENT; /* PER is not defined. */ ASN__ENCODE_FAILED; break; #else /* ASN_DISABLE_PER_SUPPORT */ case ATS_UNALIGNED_BASIC_PER: /* CANONICAL-UPER is a superset of BASIC-UPER. */ /* Fall through. */ case ATS_UNALIGNED_CANONICAL_PER: if(td->op->uper_encoder) { er = uper_encode(td, 0, sptr, callback, callback_key); if(er.encoded == -1) { if(er.failed_type && er.failed_type->op->uper_encoder) { errno = EBADF; /* Structure has incorrect form. */ } else { errno = ENOENT; /* UPER is not defined for this type. */ } } else { ASN_DEBUG("Complete encoded in %ld bits", (long)er.encoded); if(er.encoded == 0) { /* Enforce "Complete Encoding" of X.691 #11.1 */ if(callback("\0", 1, callback_key) < 0) { errno = EBADF; ASN__ENCODE_FAILED; } er.encoded = 8; /* Exactly 8 zero bits is added. */ } /* Convert bits into bytes */ er.encoded = (er.encoded + 7) >> 3; } } else { errno = ENOENT; /* Transfer syntax is not defined for this type. */ ASN__ENCODE_FAILED; } break; case ATS_ALIGNED_BASIC_PER: /* CANONICAL-APER is a superset of BASIC-APER. */ /* Fall through. */ case ATS_ALIGNED_CANONICAL_PER: if(td->op->aper_encoder) { er = aper_encode(td, 0, sptr, callback, callback_key); if(er.encoded == -1) { if(er.failed_type && er.failed_type->op->aper_encoder) { errno = EBADF; /* Structure has incorrect form. */ } else { errno = ENOENT; /* APER is not defined for this type. */ } } else { ASN_DEBUG("Complete encoded in %ld bits", (long)er.encoded); if(er.encoded == 0) { /* Enforce "Complete Encoding" of X.691 #11.1 */ if(callback("\0", 1, callback_key) < 0) { errno = EBADF; ASN__ENCODE_FAILED; } er.encoded = 8; /* Exactly 8 zero bits is added. */ } /* Convert bits into bytes */ er.encoded = (er.encoded + 7) >> 3; } } else { errno = ENOENT; /* Transfer syntax is not defined for this type. */ ASN__ENCODE_FAILED; } break; #endif /* ASN_DISABLE_PER_SUPPORT */ case ATS_BASIC_XER: /* CANONICAL-XER is a superset of BASIC-XER. */ xer_flags &= ~XER_F_CANONICAL; xer_flags |= XER_F_BASIC; /* Fall through. */ case ATS_CANONICAL_XER: if(td->op->xer_encoder) { er = xer_encode(td, sptr, xer_flags, callback, callback_key); if(er.encoded == -1) { if(er.failed_type && er.failed_type->op->xer_encoder) { errno = EBADF; /* Structure has incorrect form. */ } else { errno = ENOENT; /* XER is not defined for this type. */ } } } else { errno = ENOENT; /* Transfer syntax is not defined for this type. */ ASN__ENCODE_FAILED; } break; default: errno = ENOENT; ASN__ENCODE_FAILED; } return er; } asn_dec_rval_t asn_decode(const asn_codec_ctx_t *opt_codec_ctx, enum asn_transfer_syntax syntax, const asn_TYPE_descriptor_t *td, void **sptr, const void *buffer, size_t size) { if(!td || !td->op || !sptr || (size && !buffer)) { ASN__DECODE_FAILED; } switch(syntax) { case ATS_CER: case ATS_NONSTANDARD_PLAINTEXT: default: errno = ENOENT; ASN__DECODE_FAILED; case ATS_RANDOM: if(!td->op->random_fill) { ASN__DECODE_FAILED; } else { if(asn_random_fill(td, sptr, 16000) == 0) { asn_dec_rval_t ret = {RC_OK, 0}; return ret; } else { ASN__DECODE_FAILED; } } break; case ATS_DER: case ATS_BER: return ber_decode(opt_codec_ctx, td, sptr, buffer, size); case ATS_BASIC_OER: case ATS_CANONICAL_OER: #ifdef ASN_DISABLE_OER_SUPPORT errno = ENOENT; ASN__DECODE_FAILED; #else return oer_decode(opt_codec_ctx, td, sptr, buffer, size); #endif case ATS_UNALIGNED_BASIC_PER: case ATS_UNALIGNED_CANONICAL_PER: #ifdef ASN_DISABLE_PER_SUPPORT errno = ENOENT; ASN__DECODE_FAILED; #else return uper_decode_complete(opt_codec_ctx, td, sptr, buffer, size); #endif case ATS_ALIGNED_BASIC_PER: case ATS_ALIGNED_CANONICAL_PER: #ifdef ASN_DISABLE_PER_SUPPORT errno = ENOENT; ASN__DECODE_FAILED; #else return aper_decode_complete(opt_codec_ctx, td, sptr, buffer, size); #endif case ATS_BASIC_XER: case ATS_CANONICAL_XER: return xer_decode(opt_codec_ctx, td, sptr, buffer, size); } } nextepc-0.3.10/lib/s1ap/asn1c/asn_application.h000066400000000000000000000140311333553357400212070ustar00rootroot00000000000000/*- * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ /* * Application-level ASN.1 callbacks. */ #ifndef ASN_APPLICATION_H #define ASN_APPLICATION_H #include "asn_system.h" /* for platform-dependent types */ #include "asn_codecs.h" /* for ASN.1 codecs specifics */ #ifdef __cplusplus extern "C" { #endif /* * A selection of ASN.1 Transfer Syntaxes to use with generalized * encoders and decoders declared further in this .h file. */ enum asn_transfer_syntax { /* Avoid appearance of a default transfer syntax. */ ATS_INVALID = 0, /* Plaintext output (not conforming to any standard), for debugging. */ ATS_NONSTANDARD_PLAINTEXT, /* Returns a randomly generatede structure. */ ATS_RANDOM, /* * X.690: * BER: Basic Encoding Rules. * DER: Distinguished Encoding Rules. * CER: Canonical Encoding Rules. * DER and CER are more strict variants of BER. */ ATS_BER, ATS_DER, ATS_CER, /* Only decoding is supported */ /* * X.696: * OER: Octet Encoding Rules. * CANONICAL-OER is a more strict variant of BASIC-OER. */ ATS_BASIC_OER, ATS_CANONICAL_OER, /* * X.691: * PER: Packed Encoding Rules. * CANONICAL-PER is a more strict variant of BASIC-PER. * NOTE: Produces or consumes a complete encoding (X.691 (08/2015) #11.1). */ ATS_UNALIGNED_BASIC_PER, ATS_UNALIGNED_CANONICAL_PER, ATS_ALIGNED_BASIC_PER, ATS_ALIGNED_CANONICAL_PER, /* * X.693: * XER: XML Encoding Rules. * CANONICAL-XER is a more strict variant of BASIC-XER. */ ATS_BASIC_XER, ATS_CANONICAL_XER }; /* * A generic encoder for any supported transfer syntax. * RETURN VALUES: * The (.encoded) field of the return value is REDEFINED to mean the following: * >=0: The computed size of the encoded data. Can exceed the (buffer_size). * -1: Error encoding the structure. See the error code in (errno): * EINVAL: Incorrect parameters to the function, such as NULLs. * ENOENT: Encoding transfer syntax is not defined (for this type). * EBADF: The structure has invalid form or content constraint failed. * The (.failed_type) and (.structure_ptr) MIGHT be set to the appropriate * values at the place of failure, if at all possible. * WARNING: The (.encoded) field of the return value can exceed the buffer_size. * This is similar to snprintf(3) contract which might return values * greater than the buffer size. */ asn_enc_rval_t asn_encode_to_buffer( const asn_codec_ctx_t *opt_codec_parameters, /* See asn_codecs.h */ enum asn_transfer_syntax, const struct asn_TYPE_descriptor_s *type_to_encode, const void *structure_to_encode, void *buffer, size_t buffer_size); /* * A variant of asn_encode_to_buffer() with automatically allocated buffer. * RETURN VALUES: * On success, returns a newly allocated (.buffer) containing the whole message. * The message size is returned in (.result.encoded). * On failure: * (.buffer) is NULL, * (.result.encoded) as in asn_encode_to_buffer(), * The errno codes as in asn_encode_to_buffer(), plus the following: * ENOMEM: Memory allocation failed due to system or internal limits. * The user is responsible for freeing the (.buffer). */ typedef struct asn_encode_to_new_buffer_result_s { void *buffer; /* NULL if failed to encode. */ asn_enc_rval_t result; } asn_encode_to_new_buffer_result_t; asn_encode_to_new_buffer_result_t asn_encode_to_new_buffer( const asn_codec_ctx_t *opt_codec_parameters, /* See asn_codecs.h */ enum asn_transfer_syntax, const struct asn_TYPE_descriptor_s *type_to_encode, const void *structure_to_encode); /* * Generic type of an application-defined callback to return various * types of data to the application. * EXPECTED RETURN VALUES: * -1: Failed to consume bytes. Abort the mission. * Non-negative return values indicate success, and ignored. */ typedef int(asn_app_consume_bytes_f)(const void *buffer, size_t size, void *application_specific_key); /* * A generic encoder for any supported transfer syntax. * Returns the comprehensive encoding result descriptor (see asn_codecs.h). * RETURN VALUES: * The negative (.encoded) field of the return values is accompanied with the * following error codes (errno): * EINVAL: Incorrect parameters to the function, such as NULLs. * ENOENT: Encoding transfer syntax is not defined (for this type). * EBADF: The structure has invalid form or content constraint failed. * EIO: The (callback) has returned negative value during encoding. */ asn_enc_rval_t asn_encode( const asn_codec_ctx_t *opt_codec_parameters, /* See asn_codecs.h */ enum asn_transfer_syntax, const struct asn_TYPE_descriptor_s *type_to_encode, const void *structure_to_encode, asn_app_consume_bytes_f *callback, void *callback_key); /* * A generic decoder for any supported transfer syntax. */ asn_dec_rval_t asn_decode( const asn_codec_ctx_t *opt_codec_parameters, enum asn_transfer_syntax, const struct asn_TYPE_descriptor_s *type_to_decode, void **structure_ptr, /* Pointer to a target structure's pointer */ const void *buffer, /* Data to be decoded */ size_t size /* Size of that buffer */ ); /* * A callback of this type is called whenever constraint validation fails * on some ASN.1 type. See "constraints.h" for more details on constraint * validation. * This callback specifies a descriptor of the ASN.1 type which failed * the constraint check, as well as human readable message on what * particular constraint has failed. */ typedef void (asn_app_constraint_failed_f)(void *application_specific_key, const struct asn_TYPE_descriptor_s *type_descriptor_which_failed, const void *structure_which_failed_ptr, const char *error_message_format, ...) CC_PRINTFLIKE(4, 5); #ifdef __cplusplus } #endif #include "constr_TYPE.h" /* for asn_TYPE_descriptor_t */ #endif /* ASN_APPLICATION_H */ nextepc-0.3.10/lib/s1ap/asn1c/asn_bit_data.c000066400000000000000000000200531333553357400204470ustar00rootroot00000000000000/* * Copyright (c) 2005-2017 Lev Walkin . * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include /* * Create a contiguous non-refillable bit data structure. * Can be freed by FREEMEM(). */ asn_bit_data_t * asn_bit_data_new_contiguous(const void *data, size_t size_bits) { size_t size_bytes = (size_bits + 7) / 8; asn_bit_data_t *pd; uint8_t *bytes; /* Get the extensions map */ pd = CALLOC(1, sizeof(*pd) + size_bytes + 1); if(!pd) { return NULL; } bytes = (void *)(((char *)pd) + sizeof(*pd)); memcpy(bytes, data, size_bytes); bytes[size_bytes] = 0; pd->buffer = bytes; pd->nboff = 0; pd->nbits = size_bits; return pd; } char * asn_bit_data_string(asn_bit_data_t *pd) { static char buf[2][32]; static int n; n = (n+1) % 2; snprintf(buf[n], sizeof(buf[n]), "{m=%" ASN_PRI_SIZE " span %" ASN_PRI_SIZE "[%" ASN_PRI_SIZE "..%" ASN_PRI_SIZE "] (%" ASN_PRI_SIZE ")}", pd->moved, ((uintptr_t)(pd->buffer) & 0xf), pd->nboff, pd->nbits, pd->nbits - pd->nboff); return buf[n]; } void asn_get_undo(asn_bit_data_t *pd, int nbits) { if((ssize_t)pd->nboff < nbits) { assert((ssize_t)pd->nboff < nbits); } else { pd->nboff -= nbits; pd->moved -= nbits; } } /* * Extract a small number of bits (<= 31) from the specified PER data pointer. */ int32_t asn_get_few_bits(asn_bit_data_t *pd, int nbits) { size_t off; /* Next after last bit offset */ ssize_t nleft; /* Number of bits left in this stream */ uint32_t accum; const uint8_t *buf; if(nbits < 0) return -1; nleft = pd->nbits - pd->nboff; if(nbits > nleft) { int32_t tailv, vhead; if(!pd->refill || nbits > 31) return -1; /* Accumulate unused bytes before refill */ ASN_DEBUG("Obtain the rest %d bits (want %d)", (int)nleft, (int)nbits); tailv = asn_get_few_bits(pd, nleft); if(tailv < 0) return -1; /* Refill (replace pd contents with new data) */ if(pd->refill(pd)) return -1; nbits -= nleft; vhead = asn_get_few_bits(pd, nbits); /* Combine the rest of previous pd with the head of new one */ tailv = (tailv << nbits) | vhead; /* Could == -1 */ return tailv; } /* * Normalize position indicator. */ if(pd->nboff >= 8) { pd->buffer += (pd->nboff >> 3); pd->nbits -= (pd->nboff & ~0x07); pd->nboff &= 0x07; } pd->moved += nbits; pd->nboff += nbits; off = pd->nboff; buf = pd->buffer; /* * Extract specified number of bits. */ if(off <= 8) accum = nbits ? (buf[0]) >> (8 - off) : 0; else if(off <= 16) accum = ((buf[0] << 8) + buf[1]) >> (16 - off); else if(off <= 24) accum = ((buf[0] << 16) + (buf[1] << 8) + buf[2]) >> (24 - off); else if(off <= 31) accum = (((uint32_t)buf[0] << 24) + (buf[1] << 16) + (buf[2] << 8) + (buf[3])) >> (32 - off); else if(nbits <= 31) { asn_bit_data_t tpd = *pd; /* Here are we with our 31-bits limit plus 1..7 bits offset. */ asn_get_undo(&tpd, nbits); /* The number of available bits in the stream allow * for the following operations to take place without * invoking the ->refill() function */ accum = asn_get_few_bits(&tpd, nbits - 24) << 24; accum |= asn_get_few_bits(&tpd, 24); } else { asn_get_undo(pd, nbits); return -1; } accum &= (((uint32_t)1 << nbits) - 1); ASN_DEBUG(" [PER got %2d<=%2d bits => span %d %+ld[%d..%d]:%02x (%d) => 0x%x]", (int)nbits, (int)nleft, (int)pd->moved, (((long)pd->buffer) & 0xf), (int)pd->nboff, (int)pd->nbits, ((pd->buffer != NULL)?pd->buffer[0]:0), (int)(pd->nbits - pd->nboff), (int)accum); return accum; } /* * Extract a large number of bits from the specified PER data pointer. */ int asn_get_many_bits(asn_bit_data_t *pd, uint8_t *dst, int alright, int nbits) { int32_t value; if(alright && (nbits & 7)) { /* Perform right alignment of a first few bits */ value = asn_get_few_bits(pd, nbits & 0x07); if(value < 0) return -1; *dst++ = value; /* value is already right-aligned */ nbits &= ~7; } while(nbits) { if(nbits >= 24) { value = asn_get_few_bits(pd, 24); if(value < 0) return -1; *(dst++) = value >> 16; *(dst++) = value >> 8; *(dst++) = value; nbits -= 24; } else { value = asn_get_few_bits(pd, nbits); if(value < 0) return -1; if(nbits & 7) { /* implies left alignment */ value <<= 8 - (nbits & 7), nbits += 8 - (nbits & 7); if(nbits > 24) *dst++ = value >> 24; } if(nbits > 16) *dst++ = value >> 16; if(nbits > 8) *dst++ = value >> 8; *dst++ = value; break; } } return 0; } /* * Put a small number of bits (<= 31). */ int asn_put_few_bits(asn_bit_outp_t *po, uint32_t bits, int obits) { size_t off; /* Next after last bit offset */ size_t omsk; /* Existing last byte meaningful bits mask */ uint8_t *buf; if(obits <= 0 || obits >= 32) return obits ? -1 : 0; ASN_DEBUG("[PER put %d bits %x to %p+%d bits]", obits, (int)bits, (void *)po->buffer, (int)po->nboff); /* * Normalize position indicator. */ if(po->nboff >= 8) { po->buffer += (po->nboff >> 3); po->nbits -= (po->nboff & ~0x07); po->nboff &= 0x07; } /* * Flush whole-bytes output, if necessary. */ if(po->nboff + obits > po->nbits) { size_t complete_bytes; if(!po->buffer) po->buffer = po->tmpspace; complete_bytes = (po->buffer - po->tmpspace); ASN_DEBUG("[PER output %ld complete + %ld]", (long)complete_bytes, (long)po->flushed_bytes); if(po->output(po->tmpspace, complete_bytes, po->op_key) < 0) return -1; if(po->nboff) po->tmpspace[0] = po->buffer[0]; po->buffer = po->tmpspace; po->nbits = 8 * sizeof(po->tmpspace); po->flushed_bytes += complete_bytes; } /* * Now, due to sizeof(tmpspace), we are guaranteed large enough space. */ buf = po->buffer; omsk = ~((1 << (8 - po->nboff)) - 1); off = (po->nboff + obits); /* Clear data of debris before meaningful bits */ bits &= (((uint32_t)1 << obits) - 1); ASN_DEBUG("[PER out %d %u/%x (t=%d,o=%d) %x&%x=%x]", obits, (int)bits, (int)bits, (int)po->nboff, (int)off, buf[0], (int)(omsk&0xff), (int)(buf[0] & omsk)); if(off <= 8) /* Completely within 1 byte */ po->nboff = off, bits <<= (8 - off), buf[0] = (buf[0] & omsk) | bits; else if(off <= 16) po->nboff = off, bits <<= (16 - off), buf[0] = (buf[0] & omsk) | (bits >> 8), buf[1] = bits; else if(off <= 24) po->nboff = off, bits <<= (24 - off), buf[0] = (buf[0] & omsk) | (bits >> 16), buf[1] = bits >> 8, buf[2] = bits; else if(off <= 31) po->nboff = off, bits <<= (32 - off), buf[0] = (buf[0] & omsk) | (bits >> 24), buf[1] = bits >> 16, buf[2] = bits >> 8, buf[3] = bits; else { if(asn_put_few_bits(po, bits >> (obits - 24), 24)) return -1; if(asn_put_few_bits(po, bits, obits - 24)) return -1; } ASN_DEBUG("[PER out %u/%x => %02x buf+%ld]", (int)bits, (int)bits, buf[0], (long)(po->buffer - po->tmpspace)); return 0; } /* * Output a large number of bits. */ int asn_put_many_bits(asn_bit_outp_t *po, const uint8_t *src, int nbits) { while(nbits) { uint32_t value; if(nbits >= 24) { value = (src[0] << 16) | (src[1] << 8) | src[2]; src += 3; nbits -= 24; if(asn_put_few_bits(po, value, 24)) return -1; } else { value = src[0]; if(nbits > 8) value = (value << 8) | src[1]; if(nbits > 16) value = (value << 8) | src[2]; if(nbits & 0x07) value >>= (8 - (nbits & 0x07)); if(asn_put_few_bits(po, value, nbits)) return -1; break; } } return 0; } int asn_put_aligned_flush(asn_bit_outp_t *po) { uint32_t unused_bits = (0x7 & (8 - (po->nboff & 0x07))); size_t complete_bytes = (po->buffer ? po->buffer - po->tmpspace : 0) + ((po->nboff + 7) >> 3); if(unused_bits) { po->buffer[po->nboff >> 3] &= ~0u << unused_bits; } if(po->output(po->tmpspace, complete_bytes, po->op_key) < 0) { return -1; } else { po->buffer = po->tmpspace; po->nboff = 0; po->nbits = 8 * sizeof(po->tmpspace); po->flushed_bytes += complete_bytes; return 0; } } nextepc-0.3.10/lib/s1ap/asn1c/asn_bit_data.h000066400000000000000000000052561333553357400204640ustar00rootroot00000000000000/* * Copyright (c) 2005-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef ASN_BIT_DATA #define ASN_BIT_DATA #include /* Platform-specific types */ #ifdef __cplusplus extern "C" { #endif /* * This structure describes a position inside an incoming PER bit stream. */ typedef struct asn_bit_data_s { const uint8_t *buffer; /* Pointer to the octet stream */ size_t nboff; /* Bit offset to the meaningful bit */ size_t nbits; /* Number of bits in the stream */ size_t moved; /* Number of bits moved through this bit stream */ int (*refill)(struct asn_bit_data_s *); void *refill_key; } asn_bit_data_t; /* * Create a contiguous non-refillable bit data structure. * Can be freed by FREEMEM(). */ asn_bit_data_t *asn_bit_data_new_contiguous(const void *data, size_t size_bits); /* * Extract a small number of bits (<= 31) from the specified PER data pointer. * This function returns -1 if the specified number of bits could not be * extracted due to EOD or other conditions. */ int32_t asn_get_few_bits(asn_bit_data_t *, int get_nbits); /* Undo the immediately preceeding "get_few_bits" operation */ void asn_get_undo(asn_bit_data_t *, int get_nbits); /* * Extract a large number of bits from the specified PER data pointer. * This function returns -1 if the specified number of bits could not be * extracted due to EOD or other conditions. */ int asn_get_many_bits(asn_bit_data_t *, uint8_t *dst, int right_align, int get_nbits); /* Non-thread-safe debugging function, don't use it */ char *asn_bit_data_string(asn_bit_data_t *); /* * This structure supports forming bit output. */ typedef struct asn_bit_outp_s { uint8_t *buffer; /* Pointer into the (tmpspace) */ size_t nboff; /* Bit offset to the meaningful bit */ size_t nbits; /* Number of bits left in (tmpspace) */ uint8_t tmpspace[32]; /* Preliminary storage to hold data */ int (*output)(const void *data, size_t size, void *op_key); void *op_key; /* Key for (output) data callback */ size_t flushed_bytes; /* Bytes already flushed through (output) */ } asn_bit_outp_t; /* Output a small number of bits (<= 31) */ int asn_put_few_bits(asn_bit_outp_t *, uint32_t bits, int obits); /* Output a large number of bits */ int asn_put_many_bits(asn_bit_outp_t *, const uint8_t *src, int put_nbits); /* * Flush whole bytes (0 or more) through (outper) member. * The least significant bits which are not used are guaranteed to be set to 0. * Returns -1 if callback returns -1. Otherwise, 0. */ int asn_put_aligned_flush(asn_bit_outp_t *); #ifdef __cplusplus } #endif #endif /* ASN_BIT_DATA */ nextepc-0.3.10/lib/s1ap/asn1c/asn_codecs.h000066400000000000000000000065641333553357400201600ustar00rootroot00000000000000/* * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef ASN_CODECS_H #define ASN_CODECS_H #ifdef __cplusplus extern "C" { #endif struct asn_TYPE_descriptor_s; /* Forward declaration */ /* * This structure defines a set of parameters that may be passed * to every ASN.1 encoder or decoder function. * WARNING: if max_stack_size member is set, and you are calling the * function pointers of the asn_TYPE_descriptor_t directly, * this structure must be ALLOCATED ON THE STACK! * If you can't always satisfy this requirement, use ber_decode(), * xer_decode() and uper_decode() functions instead. */ typedef struct asn_codec_ctx_s { /* * Limit the decoder routines to use no (much) more stack than a given * number of bytes. Most of decoders are stack-based, and this * would protect against stack overflows if the number of nested * encodings is high. * The OCTET STRING, BIT STRING and ANY BER decoders are heap-based, * and are safe from this kind of overflow. * A value from getrlimit(RLIMIT_STACK) may be used to initialize * this variable. Be careful in multithreaded environments, as the * stack size is rather limited. */ size_t max_stack_size; /* 0 disables stack bounds checking */ } asn_codec_ctx_t; /* * Type of the return value of the encoding functions (der_encode, xer_encode). */ typedef struct asn_enc_rval_s { /* * Number of bytes encoded. * -1 indicates failure to encode the structure. * In this case, the members below this one are meaningful. */ ssize_t encoded; /* * Members meaningful when (encoded == -1), for post mortem analysis. */ /* Type which cannot be encoded */ const struct asn_TYPE_descriptor_s *failed_type; /* Pointer to the structure of that type */ const void *structure_ptr; } asn_enc_rval_t; #define ASN__ENCODE_FAILED do { \ asn_enc_rval_t tmp_error; \ tmp_error.encoded = -1; \ tmp_error.failed_type = td; \ tmp_error.structure_ptr = sptr; \ ASN_DEBUG("Failed to encode element %s", td ? td->name : ""); \ return tmp_error; \ } while(0) #define ASN__ENCODED_OK(rval) do { \ rval.structure_ptr = 0; \ rval.failed_type = 0; \ return rval; \ } while(0) /* * Type of the return value of the decoding functions (ber_decode, xer_decode) * * Please note that the number of consumed bytes is ALWAYS meaningful, * even if code==RC_FAIL. This is to indicate the number of successfully * decoded bytes, hence providing a possibility to fail with more diagnostics * (i.e., print the offending remainder of the buffer). */ enum asn_dec_rval_code_e { RC_OK, /* Decoded successfully */ RC_WMORE, /* More data expected, call again */ RC_FAIL /* Failure to decode data */ }; typedef struct asn_dec_rval_s { enum asn_dec_rval_code_e code; /* Result code */ size_t consumed; /* Number of bytes consumed */ } asn_dec_rval_t; #define ASN__DECODE_FAILED do { \ asn_dec_rval_t tmp_error; \ tmp_error.code = RC_FAIL; \ tmp_error.consumed = 0; \ ASN_DEBUG("Failed to decode element %s", td ? td->name : ""); \ return tmp_error; \ } while(0) #define ASN__DECODE_STARVED do { \ asn_dec_rval_t tmp_error; \ tmp_error.code = RC_WMORE; \ tmp_error.consumed = 0; \ return tmp_error; \ } while(0) #ifdef __cplusplus } #endif #endif /* ASN_CODECS_H */ nextepc-0.3.10/lib/s1ap/asn1c/asn_codecs_prim.c000066400000000000000000000174121333553357400211740ustar00rootroot00000000000000/*- * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include /* * Decode an always-primitive type. */ asn_dec_rval_t ber_decode_primitive(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **sptr, const void *buf_ptr, size_t size, int tag_mode) { ASN__PRIMITIVE_TYPE_t *st = (ASN__PRIMITIVE_TYPE_t *)*sptr; asn_dec_rval_t rval; ber_tlv_len_t length = 0; /* =0 to avoid [incorrect] warning. */ /* * If the structure is not there, allocate it. */ if(st == NULL) { st = (ASN__PRIMITIVE_TYPE_t *)CALLOC(1, sizeof(*st)); if(st == NULL) ASN__DECODE_FAILED; *sptr = (void *)st; } ASN_DEBUG("Decoding %s as plain primitive (tm=%d)", td->name, tag_mode); /* * Check tags and extract value length. */ rval = ber_check_tags(opt_codec_ctx, td, 0, buf_ptr, size, tag_mode, 0, &length, 0); if(rval.code != RC_OK) return rval; ASN_DEBUG("%s length is %d bytes", td->name, (int)length); /* * Make sure we have this length. */ buf_ptr = ((const char *)buf_ptr) + rval.consumed; size -= rval.consumed; if(length > (ber_tlv_len_t)size) { rval.code = RC_WMORE; rval.consumed = 0; return rval; } st->size = (int)length; /* The following better be optimized away. */ if(sizeof(st->size) != sizeof(length) && (ber_tlv_len_t)st->size != length) { st->size = 0; ASN__DECODE_FAILED; } st->buf = (uint8_t *)MALLOC(length + 1); if(!st->buf) { st->size = 0; ASN__DECODE_FAILED; } memcpy(st->buf, buf_ptr, length); st->buf[length] = '\0'; /* Just in case */ rval.code = RC_OK; rval.consumed += length; ASN_DEBUG("Took %ld/%ld bytes to encode %s", (long)rval.consumed, (long)length, td->name); return rval; } /* * Encode an always-primitive type using DER. */ asn_enc_rval_t der_encode_primitive(const asn_TYPE_descriptor_t *td, const void *sptr, int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key) { asn_enc_rval_t erval; const ASN__PRIMITIVE_TYPE_t *st = (const ASN__PRIMITIVE_TYPE_t *)sptr; ASN_DEBUG("%s %s as a primitive type (tm=%d)", cb?"Encoding":"Estimating", td->name, tag_mode); erval.encoded = der_write_tags(td, st->size, tag_mode, 0, tag, cb, app_key); ASN_DEBUG("%s wrote tags %d", td->name, (int)erval.encoded); if(erval.encoded == -1) { erval.failed_type = td; erval.structure_ptr = sptr; return erval; } if(cb && st->buf) { if(cb(st->buf, st->size, app_key) < 0) { erval.encoded = -1; erval.failed_type = td; erval.structure_ptr = sptr; return erval; } } else { assert(st->buf || st->size == 0); } erval.encoded += st->size; ASN__ENCODED_OK(erval); } void ASN__PRIMITIVE_TYPE_free(const asn_TYPE_descriptor_t *td, void *sptr, enum asn_struct_free_method method) { ASN__PRIMITIVE_TYPE_t *st = (ASN__PRIMITIVE_TYPE_t *)sptr; if(!td || !sptr) return; ASN_DEBUG("Freeing %s as a primitive type", td->name); if(st->buf) FREEMEM(st->buf); switch(method) { case ASFM_FREE_EVERYTHING: FREEMEM(sptr); break; case ASFM_FREE_UNDERLYING: break; case ASFM_FREE_UNDERLYING_AND_RESET: memset(sptr, 0, sizeof(ASN__PRIMITIVE_TYPE_t)); break; } } /* * Local internal type passed around as an argument. */ struct xdp_arg_s { const asn_TYPE_descriptor_t *type_descriptor; void *struct_key; xer_primitive_body_decoder_f *prim_body_decoder; int decoded_something; int want_more; }; /* * Since some kinds of primitive values can be encoded using value-specific * tags (, , etc), the primitive decoder must * be supplied with such tags to parse them as needed. */ static int xer_decode__unexpected_tag(void *key, const void *chunk_buf, size_t chunk_size) { struct xdp_arg_s *arg = (struct xdp_arg_s *)key; enum xer_pbd_rval bret; /* * The chunk_buf is guaranteed to start at '<'. */ assert(chunk_size && ((const char *)chunk_buf)[0] == 0x3c); /* * Decoding was performed once already. Prohibit doing it again. */ if(arg->decoded_something) return -1; bret = arg->prim_body_decoder(arg->type_descriptor, arg->struct_key, chunk_buf, chunk_size); switch(bret) { case XPBD_SYSTEM_FAILURE: case XPBD_DECODER_LIMIT: case XPBD_BROKEN_ENCODING: break; case XPBD_BODY_CONSUMED: /* Tag decoded successfully */ arg->decoded_something = 1; /* Fall through */ case XPBD_NOT_BODY_IGNORE: /* Safe to proceed further */ return 0; } return -1; } static ssize_t xer_decode__primitive_body(void *key, const void *chunk_buf, size_t chunk_size, int have_more) { struct xdp_arg_s *arg = (struct xdp_arg_s *)key; enum xer_pbd_rval bret; size_t lead_wsp_size; if(arg->decoded_something) { if(xer_whitespace_span(chunk_buf, chunk_size) == chunk_size) { /* * Example: * "123 " * ^- chunk_buf position. */ return chunk_size; } /* * Decoding was done once already. Prohibit doing it again. */ return -1; } if(!have_more) { /* * If we've received something like "1", we can't really * tell whether it is really `1` or `123`, until we know * that there is no more data coming. * The have_more argument will be set to 1 once something * like this is available to the caller of this callback: * "1want_more = 1; return -1; } lead_wsp_size = xer_whitespace_span(chunk_buf, chunk_size); chunk_buf = (const char *)chunk_buf + lead_wsp_size; chunk_size -= lead_wsp_size; bret = arg->prim_body_decoder(arg->type_descriptor, arg->struct_key, chunk_buf, chunk_size); switch(bret) { case XPBD_SYSTEM_FAILURE: case XPBD_DECODER_LIMIT: case XPBD_BROKEN_ENCODING: break; case XPBD_BODY_CONSUMED: /* Tag decoded successfully */ arg->decoded_something = 1; /* Fall through */ case XPBD_NOT_BODY_IGNORE: /* Safe to proceed further */ return lead_wsp_size + chunk_size; } return -1; } asn_dec_rval_t xer_decode_primitive(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **sptr, size_t struct_size, const char *opt_mname, const void *buf_ptr, size_t size, xer_primitive_body_decoder_f *prim_body_decoder) { const char *xml_tag = opt_mname ? opt_mname : td->xml_tag; asn_struct_ctx_t s_ctx; struct xdp_arg_s s_arg; asn_dec_rval_t rc; /* * Create the structure if does not exist. */ if(!*sptr) { *sptr = CALLOC(1, struct_size); if(!*sptr) ASN__DECODE_FAILED; } memset(&s_ctx, 0, sizeof(s_ctx)); s_arg.type_descriptor = td; s_arg.struct_key = *sptr; s_arg.prim_body_decoder = prim_body_decoder; s_arg.decoded_something = 0; s_arg.want_more = 0; rc = xer_decode_general(opt_codec_ctx, &s_ctx, &s_arg, xml_tag, buf_ptr, size, xer_decode__unexpected_tag, xer_decode__primitive_body); switch(rc.code) { case RC_OK: if(!s_arg.decoded_something) { char ch; ASN_DEBUG("Primitive body is not recognized, " "supplying empty one"); /* * Decoding opportunity has come and gone. * Where's the result? * Try to feed with empty body, see if it eats it. */ if(prim_body_decoder(s_arg.type_descriptor, s_arg.struct_key, &ch, 0) != XPBD_BODY_CONSUMED) { /* * This decoder does not like empty stuff. */ ASN__DECODE_FAILED; } } break; case RC_WMORE: /* * Redo the whole thing later. * We don't have a context to save intermediate parsing state. */ rc.consumed = 0; break; case RC_FAIL: rc.consumed = 0; if(s_arg.want_more) rc.code = RC_WMORE; else ASN__DECODE_FAILED; break; } return rc; } nextepc-0.3.10/lib/s1ap/asn1c/asn_codecs_prim.h000066400000000000000000000032461333553357400212010ustar00rootroot00000000000000/*- * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef ASN_CODECS_PRIM_H #define ASN_CODECS_PRIM_H #include #ifdef __cplusplus extern "C" { #endif typedef struct ASN__PRIMITIVE_TYPE_s { uint8_t *buf; /* Buffer with consecutive primitive encoding bytes */ size_t size; /* Size of the buffer */ } ASN__PRIMITIVE_TYPE_t; /* Do not use this type directly! */ asn_struct_free_f ASN__PRIMITIVE_TYPE_free; ber_type_decoder_f ber_decode_primitive; der_type_encoder_f der_encode_primitive; /* * A callback specification for the xer_decode_primitive() function below. */ enum xer_pbd_rval { XPBD_SYSTEM_FAILURE, /* System failure (memory shortage, etc) */ XPBD_DECODER_LIMIT, /* Hit some decoder limitation or deficiency */ XPBD_BROKEN_ENCODING, /* Encoding of a primitive body is broken */ XPBD_NOT_BODY_IGNORE, /* Not a body format, but safe to ignore */ XPBD_BODY_CONSUMED /* Body is recognized and consumed */ }; typedef enum xer_pbd_rval(xer_primitive_body_decoder_f)( const asn_TYPE_descriptor_t *td, void *struct_ptr, const void *chunk_buf, size_t chunk_size); /* * Specific function to decode simple primitive types. * Also see xer_decode_general() in xer_decoder.h */ asn_dec_rval_t xer_decode_primitive( const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *type_descriptor, void **struct_ptr, size_t struct_size, const char *opt_mname, const void *buf_ptr, size_t size, xer_primitive_body_decoder_f *prim_body_decoder); #ifdef __cplusplus } #endif #endif /* ASN_CODECS_PRIM_H */ nextepc-0.3.10/lib/s1ap/asn1c/asn_internal.c000066400000000000000000000020251333553357400205130ustar00rootroot00000000000000#include ssize_t asn__format_to_callback(int (*cb)(const void *, size_t, void *key), void *key, const char *fmt, ...) { char scratch[64]; char *buf = scratch; size_t buf_size = sizeof(scratch); int wrote; int cb_ret; do { va_list args; va_start(args, fmt); wrote = vsnprintf(buf, buf_size, fmt, args); if(wrote < (ssize_t)buf_size) { if(wrote < 0) { if(buf != scratch) FREEMEM(buf); return -1; } break; } buf_size <<= 1; if(buf == scratch) { buf = MALLOC(buf_size); if(!buf) return -1; } else { void *p = REALLOC(buf, buf_size); if(!p) { FREEMEM(buf); return -1; } buf = p; } } while(1); cb_ret = cb(buf, wrote, key); if(buf != scratch) FREEMEM(buf); if(cb_ret < 0) { return -1; } return wrote; } nextepc-0.3.10/lib/s1ap/asn1c/asn_internal.h000066400000000000000000000126541333553357400205310ustar00rootroot00000000000000/* * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ /* * Declarations internally useful for the ASN.1 support code. */ #ifndef ASN_INTERNAL_H #define ASN_INTERNAL_H #define __EXTENSIONS__ /* for Sun */ #include "asn_application.h" /* Application-visible API */ #ifndef __NO_ASSERT_H__ /* Include assert.h only for internal use. */ #include /* for assert() macro */ #endif #ifdef __cplusplus extern "C" { #endif /* Environment version might be used to avoid running with the old library */ #define ASN1C_ENVIRONMENT_VERSION 923 /* Compile-time version */ int get_asn1c_environment_version(void); /* Run-time version */ #if 0 /* modified by acetcom */ #define CALLOC(nmemb, size) calloc(nmemb, size) #define MALLOC(size) malloc(size) #define REALLOC(oldptr, size) realloc(oldptr, size) #define FREEMEM(ptr) free(ptr) #else #include "core_pkbuf.h" #define CALLOC(nmemb, size) core_calloc(nmemb, size) #define MALLOC(size) core_malloc(size) #define REALLOC(oldptr, size) core_realloc(oldptr, size) #define FREEMEM(ptr) CORE_FREE(ptr) #endif #define asn_debug_indent 0 #define ASN_DEBUG_INDENT_ADD(i) do{}while(0) #ifdef EMIT_ASN_DEBUG #warning "Use ASN_EMIT_DEBUG instead of EMIT_ASN_DEBUG" #define ASN_EMIT_DEBUG EMIT_ASN_DEBUG #endif /* * A macro for debugging the ASN.1 internals. * You may enable or override it. */ #ifndef ASN_DEBUG /* If debugging code is not defined elsewhere... */ #if ASN_EMIT_DEBUG == 1 /* And it was asked to emit this code... */ #if __STDC_VERSION__ >= 199901L #ifdef ASN_THREAD_SAFE /* Thread safety requires sacrifice in output indentation: * Retain empty definition of ASN_DEBUG_INDENT_ADD. */ #else /* !ASN_THREAD_SAFE */ #undef ASN_DEBUG_INDENT_ADD #undef asn_debug_indent int asn_debug_indent; #define ASN_DEBUG_INDENT_ADD(i) do { asn_debug_indent += i; } while(0) #endif /* ASN_THREAD_SAFE */ #define ASN_DEBUG(fmt, args...) do { \ int adi = asn_debug_indent; \ while(adi--) fprintf(stderr, " "); \ fprintf(stderr, fmt, ##args); \ fprintf(stderr, " (%s:%d)\n", \ __FILE__, __LINE__); \ } while(0) #else /* !C99 */ void CC_PRINTFLIKE(1, 2) ASN_DEBUG_f(const char *fmt, ...); #define ASN_DEBUG ASN_DEBUG_f #endif /* C99 */ #else /* ASN_EMIT_DEBUG != 1 */ #if __STDC_VERSION__ >= 199901L #define ASN_DEBUG(...) do{}while(0) #else /* not C99 */ static void CC_PRINTFLIKE(1, 2) ASN_DEBUG(const char *fmt, ...) { (void)fmt; } #endif /* C99 or better */ #endif /* ASN_EMIT_DEBUG */ #endif /* ASN_DEBUG */ /* * Print to a callback. * The callback is expected to return negative values on error. * 0 and positive values are treated as success. * RETURN VALUES: * -1: Failed to format or invoke the callback. * >0: Size of the data that got delivered to the callback. */ ssize_t CC_PRINTFLIKE(3, 4) asn__format_to_callback( int (*callback)(const void *, size_t, void *key), void *key, const char *fmt, ...); /* * Invoke the application-supplied callback and fail, if something is wrong. */ #define ASN__E_cbc(buf, size) (cb((buf), (size), app_key) < 0) #define ASN__E_CALLBACK(size, foo) \ do { \ if(foo) goto cb_failed; \ er.encoded += (size); \ } while(0) #define ASN__CALLBACK(buf, size) ASN__E_CALLBACK(size, ASN__E_cbc(buf, size)) #define ASN__CALLBACK2(buf1, size1, buf2, size2) \ ASN__E_CALLBACK((size1) + (size2), \ ASN__E_cbc(buf1, size1) || ASN__E_cbc(buf2, size2)) #define ASN__CALLBACK3(buf1, size1, buf2, size2, buf3, size3) \ ASN__E_CALLBACK((size1) + (size2) + (size3), \ ASN__E_cbc(buf1, size1) || ASN__E_cbc(buf2, size2) \ || ASN__E_cbc(buf3, size3)) #define ASN__TEXT_INDENT(nl, level) \ do { \ int tmp_level = (level); \ int tmp_nl = ((nl) != 0); \ int tmp_i; \ if(tmp_nl) ASN__CALLBACK("\n", 1); \ if(tmp_level < 0) tmp_level = 0; \ for(tmp_i = 0; tmp_i < tmp_level; tmp_i++) ASN__CALLBACK(" ", 4); \ } while(0) #define _i_INDENT(nl) do { \ int tmp_i; \ if((nl) && cb("\n", 1, app_key) < 0) \ return -1; \ for(tmp_i = 0; tmp_i < ilevel; tmp_i++) \ if(cb(" ", 4, app_key) < 0) \ return -1; \ } while(0) /* * Check stack against overflow, if limit is set. */ #define ASN__DEFAULT_STACK_MAX (30000) static int CC_NOTUSED ASN__STACK_OVERFLOW_CHECK(const asn_codec_ctx_t *ctx) { if(ctx && ctx->max_stack_size) { /* ctx MUST be allocated on the stack */ ptrdiff_t usedstack = ((const char *)ctx - (const char *)&ctx); if(usedstack > 0) usedstack = -usedstack; /* grows up! */ /* double negative required to avoid int wrap-around */ if(usedstack < -(ptrdiff_t)ctx->max_stack_size) { ASN_DEBUG("Stack limit %ld reached", (long)ctx->max_stack_size); return -1; } } return 0; } #ifdef __cplusplus } #endif #endif /* ASN_INTERNAL_H */ nextepc-0.3.10/lib/s1ap/asn1c/asn_ioc.h000066400000000000000000000020451333553357400174600ustar00rootroot00000000000000/* * Run-time support for Information Object Classes. * Copyright (c) 2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef ASN_IOC_H #define ASN_IOC_H #include /* Platform-specific types */ #ifdef __cplusplus extern "C" { #endif struct asn_TYPE_descriptor_s; struct asn_ioc_cell_s; /* * X.681, #13 */ typedef struct asn_ioc_set_s { size_t rows_count; size_t columns_count; const struct asn_ioc_cell_s *rows; } asn_ioc_set_t; typedef struct asn_ioc_cell_s { const char *field_name; /* Is equal to corresponding column_name */ enum { aioc__undefined = 0, aioc__value, aioc__type, aioc__open_type, } cell_kind; struct asn_TYPE_descriptor_s *type_descriptor; const void *value_sptr; struct { size_t types_count; struct { unsigned choice_position; } *types; } open_type; } asn_ioc_cell_t; #ifdef __cplusplus } #endif #endif /* ASN_IOC_H */ nextepc-0.3.10/lib/s1ap/asn1c/asn_random_fill.c000066400000000000000000000027121333553357400211700ustar00rootroot00000000000000/* * Copyright (c) 2017 Lev Walkin . * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include int asn_random_fill(const struct asn_TYPE_descriptor_s *td, void **struct_ptr, size_t length) { if(td && td->op->random_fill) { asn_random_fill_result_t res = td->op->random_fill(td, struct_ptr, 0, length); return (res.code == ARFILL_OK) ? 0 : -1; } else { return -1; } } static uintmax_t asn__intmax_range(intmax_t lb, intmax_t ub) { assert(lb <= ub); if((ub < 0) == (lb < 0)) { return ub - lb; } else if(lb < 0) { return 1 + ((uintmax_t)ub + (uintmax_t)-(lb + 1)); } else { assert(!"Unreachable"); return 0; } } intmax_t asn_random_between(intmax_t lb, intmax_t rb) { if(lb == rb) { return lb; } else { const uintmax_t intmax_max = ((~(uintmax_t)0) >> 1); uintmax_t range = asn__intmax_range(lb, rb); uintmax_t value = 0; uintmax_t got_entropy = 0; assert(RAND_MAX > 0xffffff); /* Seen 7ffffffd! */ assert(range < intmax_max); for(; got_entropy < range;) { got_entropy = (got_entropy << 24) | 0xffffff; value = (value << 24) | (random() % 0xffffff); } return lb + (intmax_t)(value % (range + 1)); } } nextepc-0.3.10/lib/s1ap/asn1c/asn_random_fill.h000066400000000000000000000037341333553357400212020ustar00rootroot00000000000000/* * Copyright (c) 2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef ASN_RANDOM_FILL #define ASN_RANDOM_FILL /* Forward declarations */ struct asn_TYPE_descriptor_s; struct asn_encoding_constraints_s; /* * Initialize a structure with random data according to the type specification * and optional member constraints. * ARGUMENTS: * (max_length) - See (approx_max_length_limit). * (memb_constraints) - Member constraints, if exist. * The type can be constrained differently according * to PER and OER specifications, so we find a value * at the intersection of these constraints. * In case the return differs from ARFILL_OK, the (struct_ptr) contents * and (current_length) value remain in their original state. */ typedef struct asn_random_fill_result_s { enum { ARFILL_FAILED = -1, /* System error (memory?) */ ARFILL_OK = 0, /* Initialization succeeded */ ARFILL_SKIPPED = 1 /* Not done due to (length?) constraint */ } code; size_t length; /* Approximate number of bytes created. */ } asn_random_fill_result_t; typedef asn_random_fill_result_t(asn_random_fill_f)( const struct asn_TYPE_descriptor_s *td, void **struct_ptr, const struct asn_encoding_constraints_s *memb_constraints, size_t max_length); /* * Returns 0 if the structure was properly initialized, -1 otherwise. * The (approx_max_length_limit) specifies the approximate limit of the * resulting structure in units closely resembling bytes. The actual result * might be several times larger or smaller than the length limit. */ int asn_random_fill(const struct asn_TYPE_descriptor_s *td, void **struct_ptr, size_t approx_max_length_limit); /* * Returns a random number between min and max. */ intmax_t asn_random_between(intmax_t min, intmax_t max); #endif /* ASN_RANDOM_FILL */ nextepc-0.3.10/lib/s1ap/asn1c/asn_system.h000066400000000000000000000075131333553357400202370ustar00rootroot00000000000000/* * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ /* * Miscellaneous system-dependent types. */ #ifndef ASN_SYSTEM_H #define ASN_SYSTEM_H #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifndef _DEFAULT_SOURCE #define _DEFAULT_SOURCE 1 #endif #ifndef _BSD_SOURCE #define _BSD_SOURCE /* for snprintf() on some linux systems */ #endif #include /* For snprintf(3) */ #include /* For *alloc(3) */ #include /* For memcpy(3) */ #include /* For size_t */ #include /* For LONG_MAX */ #include /* For va_start */ #include /* for offsetof and ptrdiff_t */ #ifdef _WIN32 #include #define snprintf _snprintf #define vsnprintf _vsnprintf /* To avoid linking with ws2_32.lib, here's the definition of ntohl() */ #define sys_ntohl(l) ((((l) << 24) & 0xff000000) \ | (((l) << 8) & 0xff0000) \ | (((l) >> 8) & 0xff00) \ | ((l >> 24) & 0xff)) #ifdef _MSC_VER /* MSVS.Net */ #ifndef __cplusplus #define inline __inline #endif #ifndef ASSUMESTDTYPES /* Standard types have been defined elsewhere */ #define ssize_t SSIZE_T #if _MSC_VER < 1600 typedef char int8_t; typedef short int16_t; typedef int int32_t; typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #else /* _MSC_VER >= 1600 */ #include #endif /* _MSC_VER < 1600 */ #endif /* ASSUMESTDTYPES */ #define WIN32_LEAN_AND_MEAN #include #include #define isnan _isnan #define finite _finite #define copysign _copysign #define ilogb _logb #else /* !_MSC_VER */ #include #endif /* _MSC_VER */ #else /* !_WIN32 */ #if defined(__vxworks) #include #else /* !defined(__vxworks) */ #include /* C99 specifies this file */ #include /* for ntohl() */ #define sys_ntohl(foo) ntohl(foo) #endif /* defined(__vxworks) */ #endif /* _WIN32 */ #if __GNUC__ >= 3 || defined(__clang__) #define CC_ATTRIBUTE(attr) __attribute__((attr)) #else #define CC_ATTRIBUTE(attr) #endif #define CC_PRINTFLIKE(fmt, var) CC_ATTRIBUTE(format(printf, fmt, var)) #define CC_NOTUSED CC_ATTRIBUTE(unused) #ifndef CC_ATTR_NO_SANITIZE #define CC_ATTR_NO_SANITIZE(what) CC_ATTRIBUTE(no_sanitize(what)) #endif /* Figure out if thread safety is requested */ #if !defined(ASN_THREAD_SAFE) && (defined(THREAD_SAFE) || defined(_REENTRANT)) #define ASN_THREAD_SAFE #endif /* Thread safety */ #ifndef offsetof /* If not defined by */ #define offsetof(s, m) ((ptrdiff_t)&(((s *)0)->m) - (ptrdiff_t)((s *)0)) #endif /* offsetof */ #ifndef MIN /* Suitable for comparing primitive types (integers) */ #if defined(__GNUC__) #define MIN(a,b) ({ __typeof a _a = a; __typeof b _b = b; \ ((_a)<(_b)?(_a):(_b)); }) #else /* !__GNUC__ */ #define MIN(a,b) ((a)<(b)?(a):(b)) /* Unsafe variant */ #endif /* __GNUC__ */ #endif /* MIN */ #if __STDC_VERSION__ >= 199901L #ifndef SIZE_MAX #define SIZE_MAX ((~((size_t)0)) >> 1) #endif #ifndef RSIZE_MAX /* C11, Annex K */ #define RSIZE_MAX (SIZE_MAX >> 1) #endif #ifndef RSSIZE_MAX /* Halve signed size even further than unsigned */ #define RSSIZE_MAX ((ssize_t)(RSIZE_MAX >> 1)) #endif #else /* Old compiler */ #undef SIZE_MAX #undef RSIZE_MAX #undef RSSIZE_MAX #define SIZE_MAX ((~((size_t)0)) >> 1) #define RSIZE_MAX (SIZE_MAX >> 1) #define RSSIZE_MAX ((ssize_t)(RSIZE_MAX >> 1)) #endif #if __STDC_VERSION__ >= 199901L #define ASN_PRI_SIZE "zu" #define ASN_PRI_SSIZE "zd" #define ASN_PRIuMAX PRIuMAX #define ASN_PRIdMAX PRIdMAX #else #define ASN_PRI_SIZE "lu" #define ASN_PRI_SSIZE "ld" #if LLONG_MAX > LONG_MAX #define ASN_PRIuMAX "llu" #define ASN_PRIdMAX "lld" #else #define ASN_PRIuMAX "lu" #define ASN_PRIdMAX "ld" #endif #endif #endif /* ASN_SYSTEM_H */ nextepc-0.3.10/lib/s1ap/asn1c/ber_decoder.c000066400000000000000000000171501333553357400203000ustar00rootroot00000000000000/*- * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #undef ADVANCE #define ADVANCE(num_bytes) do { \ size_t num = num_bytes; \ ptr = ((const char *)ptr) + num; \ size -= num; \ consumed_myself += num; \ } while(0) #undef RETURN #define RETURN(_code) do { \ asn_dec_rval_t rval; \ rval.code = _code; \ if(opt_ctx) opt_ctx->step = step; /* Save context */ \ if(_code == RC_OK || opt_ctx) \ rval.consumed = consumed_myself; \ else \ rval.consumed = 0; /* Context-free */ \ return rval; \ } while(0) /* * The BER decoder of any type. */ asn_dec_rval_t ber_decode(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *type_descriptor, void **struct_ptr, const void *ptr, size_t size) { asn_codec_ctx_t s_codec_ctx; /* * Stack checker requires that the codec context * must be allocated on the stack. */ if(opt_codec_ctx) { if(opt_codec_ctx->max_stack_size) { s_codec_ctx = *opt_codec_ctx; opt_codec_ctx = &s_codec_ctx; } } else { /* If context is not given, be security-conscious anyway */ memset(&s_codec_ctx, 0, sizeof(s_codec_ctx)); s_codec_ctx.max_stack_size = ASN__DEFAULT_STACK_MAX; opt_codec_ctx = &s_codec_ctx; } /* * Invoke type-specific decoder. */ return type_descriptor->op->ber_decoder(opt_codec_ctx, type_descriptor, struct_ptr, /* Pointer to the destination structure */ ptr, size, /* Buffer and its size */ 0 /* Default tag mode is 0 */ ); } /* * Check the set of >> tags matches the definition. */ asn_dec_rval_t ber_check_tags(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, asn_struct_ctx_t *opt_ctx, const void *ptr, size_t size, int tag_mode, int last_tag_form, ber_tlv_len_t *last_length, int *opt_tlv_form) { ssize_t consumed_myself = 0; ssize_t tag_len; ssize_t len_len; ber_tlv_tag_t tlv_tag; ber_tlv_len_t tlv_len; ber_tlv_len_t limit_len = -1; int expect_00_terminators = 0; int tlv_constr = -1; /* If CHOICE, opt_tlv_form is not given */ int step = opt_ctx ? opt_ctx->step : 0; /* Where we left previously */ int tagno; /* * Make sure we didn't exceed the maximum stack size. */ if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) RETURN(RC_FAIL); /* * So what does all this implicit skip stuff mean? * Imagine two types, * A ::= [5] IMPLICIT T * B ::= [2] EXPLICIT T * Where T is defined as * T ::= [4] IMPLICIT SEQUENCE { ... } * * Let's say, we are starting to decode type A, given the * following TLV stream: <5> <0>. What does this mean? * It means that the type A contains type T which is, * in turn, empty. * Remember though, that we are still in A. We cannot * just pass control to the type T decoder. Why? Because * the type T decoder expects <4> <0>, not <5> <0>. * So, we must make sure we are going to receive <5> while * still in A, then pass control to the T decoder, indicating * that the tag <4> was implicitly skipped. The decoder of T * hence will be prepared to treat <4> as valid tag, and decode * it appropriately. */ tagno = step /* Continuing where left previously */ + (tag_mode==1?-1:0) ; ASN_DEBUG("ber_check_tags(%s, size=%ld, tm=%d, step=%d, tagno=%d)", td->name, (long)size, tag_mode, step, tagno); /* assert(td->tags_count >= 1) May not be the case for CHOICE or ANY */ if(tag_mode == 0 && tagno == (int)td->tags_count) { /* * This must be the _untagged_ ANY type, * which outermost tag isn't known in advance. * Fetch the tag and length separately. */ tag_len = ber_fetch_tag(ptr, size, &tlv_tag); switch(tag_len) { case -1: RETURN(RC_FAIL); case 0: RETURN(RC_WMORE); } tlv_constr = BER_TLV_CONSTRUCTED(ptr); len_len = ber_fetch_length(tlv_constr, (const char *)ptr + tag_len, size - tag_len, &tlv_len); switch(len_len) { case -1: RETURN(RC_FAIL); case 0: RETURN(RC_WMORE); } ASN_DEBUG("Advancing %ld in ANY case", (long)(tag_len + len_len)); ADVANCE(tag_len + len_len); } else { assert(tagno < (int)td->tags_count); /* At least one loop */ } for((void)tagno; tagno < (int)td->tags_count; tagno++, step++) { /* * Fetch and process T from TLV. */ tag_len = ber_fetch_tag(ptr, size, &tlv_tag); ASN_DEBUG("Fetching tag from {%p,%ld}: " "len %ld, step %d, tagno %d got %s", ptr, (long)size, (long)tag_len, step, tagno, ber_tlv_tag_string(tlv_tag)); switch(tag_len) { case -1: RETURN(RC_FAIL); case 0: RETURN(RC_WMORE); } tlv_constr = BER_TLV_CONSTRUCTED(ptr); /* * If {I}, don't check anything. * If {I,B,C}, check B and C unless we're at I. */ if(tag_mode != 0 && step == 0) { /* * We don't expect tag to match here. * It's just because we don't know how the tag * is supposed to look like. */ } else { assert(tagno >= 0); /* Guaranteed by the code above */ if(tlv_tag != td->tags[tagno]) { /* * Unexpected tag. Too bad. */ ASN_DEBUG("Expected: %s, " "expectation failed (tn=%d, tm=%d)", ber_tlv_tag_string(td->tags[tagno]), tagno, tag_mode ); RETURN(RC_FAIL); } } /* * Attention: if there are more tags expected, * ensure that the current tag is presented * in constructed form (it contains other tags!). * If this one is the last one, check that the tag form * matches the one given in descriptor. */ if(tagno < ((int)td->tags_count - 1)) { if(tlv_constr == 0) { ASN_DEBUG("tlv_constr = %d, expfail", tlv_constr); RETURN(RC_FAIL); } } else { if(last_tag_form != tlv_constr && last_tag_form != -1) { ASN_DEBUG("last_tag_form %d != %d", last_tag_form, tlv_constr); RETURN(RC_FAIL); } } /* * Fetch and process L from TLV. */ len_len = ber_fetch_length(tlv_constr, (const char *)ptr + tag_len, size - tag_len, &tlv_len); ASN_DEBUG("Fetching len = %ld", (long)len_len); switch(len_len) { case -1: RETURN(RC_FAIL); case 0: RETURN(RC_WMORE); } /* * FIXME * As of today, the chain of tags * must either contain several indefinite length TLVs, * or several definite length ones. * No mixing is allowed. */ if(tlv_len == -1) { /* * Indefinite length. */ if(limit_len == -1) { expect_00_terminators++; } else { ASN_DEBUG("Unexpected indefinite length " "in a chain of definite lengths"); RETURN(RC_FAIL); } ADVANCE(tag_len + len_len); continue; } else { if(expect_00_terminators) { ASN_DEBUG("Unexpected definite length " "in a chain of indefinite lengths"); RETURN(RC_FAIL); } } /* * Check that multiple TLVs specify ever decreasing length, * which is consistent. */ if(limit_len == -1) { limit_len = tlv_len + tag_len + len_len; if(limit_len < 0) { /* Too great tlv_len value? */ RETURN(RC_FAIL); } } else if(limit_len != tlv_len + tag_len + len_len) { /* * Inner TLV specifies length which is inconsistent * with the outer TLV's length value. */ ASN_DEBUG("Outer TLV is %ld and inner is %ld", (long)limit_len, (long)tlv_len); RETURN(RC_FAIL); } ADVANCE(tag_len + len_len); limit_len -= (tag_len + len_len); if((ssize_t)size > limit_len) { /* * Make sure that we won't consume more bytes * from the parent frame than the inferred limit. */ size = limit_len; } } if(opt_tlv_form) *opt_tlv_form = tlv_constr; if(expect_00_terminators) *last_length = -expect_00_terminators; else *last_length = tlv_len; RETURN(RC_OK); } nextepc-0.3.10/lib/s1ap/asn1c/ber_decoder.h000066400000000000000000000043031333553357400203010ustar00rootroot00000000000000/*- * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _BER_DECODER_H_ #define _BER_DECODER_H_ #include #ifdef __cplusplus extern "C" { #endif struct asn_TYPE_descriptor_s; /* Forward declaration */ struct asn_codec_ctx_s; /* Forward declaration */ /* * The BER decoder of any type. * This function may be invoked directly from the application. * Decodes BER, DER and CER data (DER and CER are different subsets of BER). * * NOTE: Use the der_encode() function (der_encoder.h) to produce encoding * which is compliant with ber_decode(). */ asn_dec_rval_t ber_decode( const struct asn_codec_ctx_s *opt_codec_ctx, const struct asn_TYPE_descriptor_s *type_descriptor, void **struct_ptr, /* Pointer to a target structure's pointer */ const void *buffer, /* Data to be decoded */ size_t size /* Size of that buffer */ ); /* * Type of generic function which decodes the byte stream into the structure. */ typedef asn_dec_rval_t(ber_type_decoder_f)( const struct asn_codec_ctx_s *opt_codec_ctx, const struct asn_TYPE_descriptor_s *type_descriptor, void **struct_ptr, const void *buf_ptr, size_t size, int tag_mode); /******************************* * INTERNALLY USEFUL FUNCTIONS * *******************************/ /* * Check that all tags correspond to the type definition (as given in head). * On return, last_length would contain either a non-negative length of the * value part of the last TLV, or the negative number of expected * "end of content" sequences. The number may only be negative if the * head->last_tag_form is non-zero. */ asn_dec_rval_t ber_check_tags( const struct asn_codec_ctx_s *opt_codec_ctx, /* codec options */ const struct asn_TYPE_descriptor_s *type_descriptor, asn_struct_ctx_t *opt_ctx, /* saved decoding context */ const void *ptr, size_t size, int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ int last_tag_form, /* {-1,0:1}: any, primitive, constr */ ber_tlv_len_t *last_length, int *opt_tlv_form /* optional tag form */ ); #ifdef __cplusplus } #endif #endif /* _BER_DECODER_H_ */ nextepc-0.3.10/lib/s1ap/asn1c/ber_tlv_length.c000066400000000000000000000065661333553357400210520ustar00rootroot00000000000000/*- * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include ssize_t ber_fetch_length(int _is_constructed, const void *bufptr, size_t size, ber_tlv_len_t *len_r) { const uint8_t *buf = (const uint8_t *)bufptr; unsigned oct; if(size == 0) return 0; /* Want more */ oct = *(const uint8_t *)buf; if((oct & 0x80) == 0) { /* * Short definite length. */ *len_r = oct; /* & 0x7F */ return 1; } else { ber_tlv_len_t len; size_t skipped; if(_is_constructed && oct == 0x80) { *len_r = -1; /* Indefinite length */ return 1; } if(oct == 0xff) { /* Reserved in standard for future use. */ return -1; } oct &= 0x7F; /* Leave only the 7 LS bits */ for(len = 0, buf++, skipped = 1; oct && (++skipped <= size); buf++, oct--) { /* Verify that we won't overflow. */ if(!(len >> ((8 * sizeof(len)) - (8+1)))) { len = (len << 8) | *buf; } else { /* Too large length value. */ return -1; } } if(oct == 0) { if(len < 0 || len > RSSIZE_MAX) { /* Length value out of sane range. */ return -1; } *len_r = len; return skipped; } return 0; /* Want more */ } } ssize_t ber_skip_length(const asn_codec_ctx_t *opt_codec_ctx, int _is_constructed, const void *ptr, size_t size) { ber_tlv_len_t vlen; /* Length of V in TLV */ ssize_t tl; /* Length of L in TLV */ ssize_t ll; /* Length of L in TLV */ size_t skip; /* * Make sure we didn't exceed the maximum stack size. */ if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) return -1; /* * Determine the size of L in TLV. */ ll = ber_fetch_length(_is_constructed, ptr, size, &vlen); if(ll <= 0) return ll; /* * Definite length. */ if(vlen >= 0) { skip = ll + vlen; if(skip > size) return 0; /* Want more */ return skip; } /* * Indefinite length! */ ASN_DEBUG("Skipping indefinite length"); for(skip = ll, ptr = ((const char *)ptr) + ll, size -= ll;;) { ber_tlv_tag_t tag; /* Fetch the tag */ tl = ber_fetch_tag(ptr, size, &tag); if(tl <= 0) return tl; ll = ber_skip_length(opt_codec_ctx, BER_TLV_CONSTRUCTED(ptr), ((const char *)ptr) + tl, size - tl); if(ll <= 0) return ll; skip += tl + ll; /* * This may be the end of the indefinite length structure, * two consecutive 0 octets. * Check if it is true. */ if(((const uint8_t *)ptr)[0] == 0 && ((const uint8_t *)ptr)[1] == 0) return skip; ptr = ((const char *)ptr) + tl + ll; size -= tl + ll; } /* UNREACHABLE */ } size_t der_tlv_length_serialize(ber_tlv_len_t len, void *bufp, size_t size) { size_t required_size; /* Size of len encoding */ uint8_t *buf = (uint8_t *)bufp; uint8_t *end; int i; if(len <= 127) { /* Encoded in 1 octet */ if(size) *buf = (uint8_t)len; return 1; } /* * Compute the size of the subsequent bytes. */ for(required_size = 1, i = 8; i < 8 * (int)sizeof(len); i += 8) { if(len >> i) required_size++; else break; } if(size <= required_size) return required_size + 1; *buf++ = (uint8_t)(0x80 | required_size); /* Length of the encoding */ /* * Produce the len encoding, space permitting. */ end = buf + required_size; for(i -= 8; buf < end; i -= 8, buf++) *buf = (uint8_t)(len >> i); return required_size + 1; } nextepc-0.3.10/lib/s1ap/asn1c/ber_tlv_length.h000066400000000000000000000030101333553357400210340ustar00rootroot00000000000000/*- * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _BER_TLV_LENGTH_H_ #define _BER_TLV_LENGTH_H_ #ifdef __cplusplus extern "C" { #endif typedef ssize_t ber_tlv_len_t; /* * This function tries to fetch the length of the BER TLV value and place it * in *len_r. * RETURN VALUES: * 0: More data expected than bufptr contains. * -1: Fatal error deciphering length. * >0: Number of bytes used from bufptr. * On return with >0, len_r is constrained as -1..MAX, where -1 mean * that the value is of indefinite length. */ ssize_t ber_fetch_length(int _is_constructed, const void *bufptr, size_t size, ber_tlv_len_t *len_r); /* * This function expects bufptr to be positioned over L in TLV. * It returns number of bytes occupied by L and V together, suitable * for skipping. The function properly handles indefinite length. * RETURN VALUES: * Standard {-1,0,>0} convention. */ ssize_t ber_skip_length( const struct asn_codec_ctx_s *opt_codec_ctx, /* optional context */ int _is_constructed, const void *bufptr, size_t size); /* * This function serializes the length (L from TLV) in DER format. * It always returns number of bytes necessary to represent the length, * it is a caller's responsibility to check the return value * against the supplied buffer's size. */ size_t der_tlv_length_serialize(ber_tlv_len_t len, void *bufptr, size_t size); #ifdef __cplusplus } #endif #endif /* _BER_TLV_LENGTH_H_ */ nextepc-0.3.10/lib/s1ap/asn1c/ber_tlv_tag.c000066400000000000000000000061641333553357400203360ustar00rootroot00000000000000/*- * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include ssize_t ber_fetch_tag(const void *ptr, size_t size, ber_tlv_tag_t *tag_r) { ber_tlv_tag_t val; ber_tlv_tag_t tclass; size_t skipped; if(size == 0) return 0; val = *(const uint8_t *)ptr; tclass = (val >> 6); if((val &= 0x1F) != 0x1F) { /* * Simple form: everything encoded in a single octet. * Tag Class is encoded using two least significant bits. */ *tag_r = (val << 2) | tclass; return 1; } /* * Each octet contains 7 bits of useful information. * The MSB is 0 if it is the last octet of the tag. */ for(val = 0, ptr = ((const char *)ptr) + 1, skipped = 2; skipped <= size; ptr = ((const char *)ptr) + 1, skipped++) { unsigned int oct = *(const uint8_t *)ptr; if(oct & 0x80) { val = (val << 7) | (oct & 0x7F); /* * Make sure there are at least 9 bits spare * at the MS side of a value. */ if(val >> ((8 * sizeof(val)) - 9)) { /* * We would not be able to accomodate * any more tag bits. */ return -1; } } else { val = (val << 7) | oct; *tag_r = (val << 2) | tclass; return skipped; } } return 0; /* Want more */ } ssize_t ber_tlv_tag_fwrite(ber_tlv_tag_t tag, FILE *f) { char buf[sizeof("[APPLICATION ]") + 32]; ssize_t ret; ret = ber_tlv_tag_snprint(tag, buf, sizeof(buf)); if(ret >= (ssize_t)sizeof(buf) || ret < 2) { errno = EPERM; return -1; } return fwrite(buf, 1, ret, f); } ssize_t ber_tlv_tag_snprint(ber_tlv_tag_t tag, char *buf, size_t size) { const char *type = 0; int ret; switch(tag & 0x3) { case ASN_TAG_CLASS_UNIVERSAL: type = "UNIVERSAL "; break; case ASN_TAG_CLASS_APPLICATION: type = "APPLICATION "; break; case ASN_TAG_CLASS_CONTEXT: type = ""; break; case ASN_TAG_CLASS_PRIVATE: type = "PRIVATE "; break; } ret = snprintf(buf, size, "[%s%u]", type, ((unsigned)tag) >> 2); if(ret <= 0 && size) buf[0] = '\0'; /* against broken libc's */ return ret; } char * ber_tlv_tag_string(ber_tlv_tag_t tag) { static char buf[sizeof("[APPLICATION ]") + 32]; (void)ber_tlv_tag_snprint(tag, buf, sizeof(buf)); return buf; } size_t ber_tlv_tag_serialize(ber_tlv_tag_t tag, void *bufp, size_t size) { int tclass = BER_TAG_CLASS(tag); ber_tlv_tag_t tval = BER_TAG_VALUE(tag); uint8_t *buf = (uint8_t *)bufp; uint8_t *end; size_t required_size; size_t i; if(tval <= 30) { /* Encoded in 1 octet */ if(size) buf[0] = (tclass << 6) | tval; return 1; } else if(size) { *buf++ = (tclass << 6) | 0x1F; size--; } /* * Compute the size of the subsequent bytes. */ for(required_size = 1, i = 7; i < 8 * sizeof(tval); i += 7) { if(tval >> i) required_size++; else break; } if(size < required_size) return required_size + 1; /* * Fill in the buffer, space permitting. */ end = buf + required_size - 1; for(i -= 7; buf < end; i -= 7, buf++) *buf = 0x80 | ((tval >> i) & 0x7F); *buf = (tval & 0x7F); /* Last octet without high bit */ return required_size + 1; } nextepc-0.3.10/lib/s1ap/asn1c/ber_tlv_tag.h000066400000000000000000000034531333553357400203410ustar00rootroot00000000000000/*- * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _BER_TLV_TAG_H_ #define _BER_TLV_TAG_H_ #ifdef __cplusplus extern "C" { #endif enum asn_tag_class { ASN_TAG_CLASS_UNIVERSAL = 0, /* 0b00 */ ASN_TAG_CLASS_APPLICATION = 1, /* 0b01 */ ASN_TAG_CLASS_CONTEXT = 2, /* 0b10 */ ASN_TAG_CLASS_PRIVATE = 3 /* 0b11 */ }; typedef unsigned ber_tlv_tag_t; /* BER TAG from Tag-Length-Value */ /* * Tag class is encoded together with tag value for optimization purposes. */ #define BER_TAG_CLASS(tag) ((tag) & 0x3) #define BER_TAG_VALUE(tag) ((tag) >> 2) #define BER_TLV_CONSTRUCTED(tagptr) (((*(const uint8_t *)tagptr)&0x20)?1:0) #define BER_TAGS_EQUAL(tag1, tag2) ((tag1) == (tag2)) /* * Several functions for printing the TAG in the canonical form * (i.e. "[PRIVATE 0]"). * Return values correspond to their libc counterparts (if any). */ ssize_t ber_tlv_tag_snprint(ber_tlv_tag_t tag, char *buf, size_t buflen); ssize_t ber_tlv_tag_fwrite(ber_tlv_tag_t tag, FILE *); char *ber_tlv_tag_string(ber_tlv_tag_t tag); /* * This function tries to fetch the tag from the input stream. * RETURN VALUES: * 0: More data expected than bufptr contains. * -1: Fatal error deciphering tag. * >0: Number of bytes used from bufptr. tag_r will contain the tag. */ ssize_t ber_fetch_tag(const void *bufptr, size_t size, ber_tlv_tag_t *tag_r); /* * This function serializes the tag (T from TLV) in BER format. * It always returns number of bytes necessary to represent the tag, * it is a caller's responsibility to check the return value * against the supplied buffer's size. */ size_t ber_tlv_tag_serialize(ber_tlv_tag_t tag, void *bufptr, size_t size); #ifdef __cplusplus } #endif #endif /* _BER_TLV_TAG_H_ */ nextepc-0.3.10/lib/s1ap/asn1c/constr_CHOICE.c000066400000000000000000001207211333553357400203640ustar00rootroot00000000000000/* * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include /* * Number of bytes left for this structure. * (ctx->left) indicates the number of bytes _transferred_ for the structure. * (size) contains the number of bytes in the buffer passed. */ #define LEFT ((size<(size_t)ctx->left)?size:(size_t)ctx->left) /* * If the subprocessor function returns with an indication that it wants * more data, it may well be a fatal decoding problem, because the * size is constrained by the 's L, even if the buffer size allows * reading more data. * For example, consider the buffer containing the following TLVs: * ... * The TLV length clearly indicates that one byte is expected in V, but * if the V processor returns with "want more data" even if the buffer * contains way more data than the V processor have seen. */ #define SIZE_VIOLATION (ctx->left >= 0 && (size_t)ctx->left <= size) /* * This macro "eats" the part of the buffer which is definitely "consumed", * i.e. was correctly converted into local representation or rightfully skipped. */ #undef ADVANCE #define ADVANCE(num_bytes) do { \ size_t num = num_bytes; \ ptr = ((const char *)ptr) + num;\ size -= num; \ if(ctx->left >= 0) \ ctx->left -= num; \ consumed_myself += num; \ } while(0) /* * Switch to the next phase of parsing. */ #undef NEXT_PHASE #define NEXT_PHASE(ctx) do { \ ctx->phase++; \ ctx->step = 0; \ } while(0) /* * Return a standardized complex structure. */ #undef RETURN #define RETURN(_code) do { \ rval.code = _code; \ rval.consumed = consumed_myself;\ return rval; \ } while(0) /* * See the definitions. */ static unsigned _fetch_present_idx(const void *struct_ptr, unsigned off, unsigned size); static void _set_present_idx(void *sptr, unsigned offset, unsigned size, unsigned pres); static const void *_get_member_ptr(const asn_TYPE_descriptor_t *, const void *sptr, asn_TYPE_member_t **elm, unsigned *present); /* * Tags are canonically sorted in the tag to member table. */ static int _search4tag(const void *ap, const void *bp) { const asn_TYPE_tag2member_t *a = (const asn_TYPE_tag2member_t *)ap; const asn_TYPE_tag2member_t *b = (const asn_TYPE_tag2member_t *)bp; int a_class = BER_TAG_CLASS(a->el_tag); int b_class = BER_TAG_CLASS(b->el_tag); if(a_class == b_class) { ber_tlv_tag_t a_value = BER_TAG_VALUE(a->el_tag); ber_tlv_tag_t b_value = BER_TAG_VALUE(b->el_tag); if(a_value == b_value) return 0; else if(a_value < b_value) return -1; else return 1; } else if(a_class < b_class) { return -1; } else { return 1; } } /* * The decoder of the CHOICE type. */ asn_dec_rval_t CHOICE_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **struct_ptr, const void *ptr, size_t size, int tag_mode) { /* * Bring closer parts of structure description. */ const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; asn_TYPE_member_t *elements = td->elements; /* * Parts of the structure being constructed. */ void *st = *struct_ptr; /* Target structure. */ asn_struct_ctx_t *ctx; /* Decoder context */ ber_tlv_tag_t tlv_tag; /* T from TLV */ ssize_t tag_len; /* Length of TLV's T */ asn_dec_rval_t rval; /* Return code from subparsers */ ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ ASN_DEBUG("Decoding %s as CHOICE", td->name); /* * Create the target structure if it is not present already. */ if(st == 0) { st = *struct_ptr = CALLOC(1, specs->struct_size); if(st == 0) { RETURN(RC_FAIL); } } /* * Restore parsing context. */ ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); /* * Start to parse where left previously */ switch(ctx->phase) { case 0: /* * PHASE 0. * Check that the set of tags associated with given structure * perfectly fits our expectations. */ if(tag_mode || td->tags_count) { rval = ber_check_tags(opt_codec_ctx, td, ctx, ptr, size, tag_mode, -1, &ctx->left, 0); if(rval.code != RC_OK) { ASN_DEBUG("%s tagging check failed: %d", td->name, rval.code); return rval; } if(ctx->left >= 0) { /* ?Substracted below! */ ctx->left += rval.consumed; } ADVANCE(rval.consumed); } else { ctx->left = -1; } NEXT_PHASE(ctx); ASN_DEBUG("Structure consumes %ld bytes, buffer %ld", (long)ctx->left, (long)size); /* Fall through */ case 1: /* * Fetch the T from TLV. */ tag_len = ber_fetch_tag(ptr, LEFT, &tlv_tag); ASN_DEBUG("In %s CHOICE tag length %d", td->name, (int)tag_len); switch(tag_len) { case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); /* Fall through */ case -1: RETURN(RC_FAIL); } do { const asn_TYPE_tag2member_t *t2m; asn_TYPE_tag2member_t key; key.el_tag = tlv_tag; t2m = (const asn_TYPE_tag2member_t *)bsearch(&key, specs->tag2el, specs->tag2el_count, sizeof(specs->tag2el[0]), _search4tag); if(t2m) { /* * Found the element corresponding to the tag. */ NEXT_PHASE(ctx); ctx->step = t2m->el_no; break; } else if(specs->ext_start == -1) { ASN_DEBUG("Unexpected tag %s " "in non-extensible CHOICE %s", ber_tlv_tag_string(tlv_tag), td->name); RETURN(RC_FAIL); } else { /* Skip this tag */ ssize_t skip; ASN_DEBUG("Skipping unknown tag %s", ber_tlv_tag_string(tlv_tag)); skip = ber_skip_length(opt_codec_ctx, BER_TLV_CONSTRUCTED(ptr), (const char *)ptr + tag_len, LEFT - tag_len); switch(skip) { case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); /* Fall through */ case -1: RETURN(RC_FAIL); } ADVANCE(skip + tag_len); RETURN(RC_OK); } } while(0); case 2: /* * PHASE 2. * Read in the element. */ do { asn_TYPE_member_t *elm;/* CHOICE's element */ void *memb_ptr; /* Pointer to the member */ void **memb_ptr2; /* Pointer to that pointer */ elm = &elements[ctx->step]; /* * Compute the position of the member inside a structure, * and also a type of containment (it may be contained * as pointer or using inline inclusion). */ if(elm->flags & ATF_POINTER) { /* Member is a pointer to another structure */ memb_ptr2 = (void **)((char *)st + elm->memb_offset); } else { /* * A pointer to a pointer * holding the start of the structure */ memb_ptr = (char *)st + elm->memb_offset; memb_ptr2 = &memb_ptr; } /* Set presence to be able to free it properly at any time */ _set_present_idx(st, specs->pres_offset, specs->pres_size, ctx->step + 1); /* * Invoke the member fetch routine according to member's type */ rval = elm->type->op->ber_decoder(opt_codec_ctx, elm->type, memb_ptr2, ptr, LEFT, elm->tag_mode); switch(rval.code) { case RC_OK: break; case RC_WMORE: /* More data expected */ if(!SIZE_VIOLATION) { ADVANCE(rval.consumed); RETURN(RC_WMORE); } RETURN(RC_FAIL); case RC_FAIL: /* Fatal error */ RETURN(rval.code); } /* switch(rval) */ ADVANCE(rval.consumed); } while(0); NEXT_PHASE(ctx); /* Fall through */ case 3: ASN_DEBUG("CHOICE %s Leftover: %ld, size = %ld, tm=%d, tc=%d", td->name, (long)ctx->left, (long)size, tag_mode, td->tags_count); if(ctx->left > 0) { /* * The type must be fully decoded * by the CHOICE member-specific decoder. */ RETURN(RC_FAIL); } if(ctx->left == -1 && !(tag_mode || td->tags_count)) { /* * This is an untagged CHOICE. * It doesn't contain nothing * except for the member itself, including all its tags. * The decoding is completed. */ NEXT_PHASE(ctx); break; } /* * Read in the "end of data chunks"'s. */ while(ctx->left < 0) { ssize_t tl; tl = ber_fetch_tag(ptr, LEFT, &tlv_tag); switch(tl) { case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); /* Fall through */ case -1: RETURN(RC_FAIL); } /* * Expected <0><0>... */ if(((const uint8_t *)ptr)[0] == 0) { if(LEFT < 2) { if(SIZE_VIOLATION) RETURN(RC_FAIL); else RETURN(RC_WMORE); } else if(((const uint8_t *)ptr)[1] == 0) { /* * Correctly finished with <0><0>. */ ADVANCE(2); ctx->left++; continue; } } else { ASN_DEBUG("Unexpected continuation in %s", td->name); RETURN(RC_FAIL); } /* UNREACHABLE */ } NEXT_PHASE(ctx); case 4: /* No meaningful work here */ break; } RETURN(RC_OK); } asn_enc_rval_t CHOICE_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key) { const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; asn_TYPE_member_t *elm; /* CHOICE element */ asn_enc_rval_t erval; const void *memb_ptr; size_t computed_size = 0; unsigned present; if(!sptr) ASN__ENCODE_FAILED; ASN_DEBUG("%s %s as CHOICE", cb?"Encoding":"Estimating", td->name); present = _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size); /* * If the structure was not initialized, it cannot be encoded: * can't deduce what to encode in the choice type. */ if(present == 0 || present > td->elements_count) { if(present == 0 && td->elements_count == 0) { /* The CHOICE is empty?! */ erval.encoded = 0; ASN__ENCODED_OK(erval); } ASN__ENCODE_FAILED; } /* * Seek over the present member of the structure. */ elm = &td->elements[present-1]; if(elm->flags & ATF_POINTER) { memb_ptr = *(const void *const *)((const char *)sptr + elm->memb_offset); if(memb_ptr == 0) { if(elm->optional) { erval.encoded = 0; ASN__ENCODED_OK(erval); } /* Mandatory element absent */ ASN__ENCODE_FAILED; } } else { memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); } /* * If the CHOICE itself is tagged EXPLICIT: * T ::= [2] EXPLICIT CHOICE { ... } * Then emit the appropriate tags. */ if(tag_mode == 1 || td->tags_count) { /* * For this, we need to pre-compute the member. */ ssize_t ret; /* Encode member with its tag */ erval = elm->type->op->der_encoder(elm->type, memb_ptr, elm->tag_mode, elm->tag, 0, 0); if(erval.encoded == -1) return erval; /* Encode CHOICE with parent or my own tag */ ret = der_write_tags(td, erval.encoded, tag_mode, 1, tag, cb, app_key); if(ret == -1) ASN__ENCODE_FAILED; computed_size += ret; } /* * Encode the single underlying member. */ erval = elm->type->op->der_encoder(elm->type, memb_ptr, elm->tag_mode, elm->tag, cb, app_key); if(erval.encoded == -1) return erval; ASN_DEBUG("Encoded CHOICE member in %ld bytes (+%ld)", (long)erval.encoded, (long)computed_size); erval.encoded += computed_size; return erval; } ber_tlv_tag_t CHOICE_outmost_tag(const asn_TYPE_descriptor_t *td, const void *ptr, int tag_mode, ber_tlv_tag_t tag) { const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; unsigned present; assert(tag_mode == 0); (void)tag_mode; assert(tag == 0); (void)tag; /* * Figure out which CHOICE element is encoded. */ present = _fetch_present_idx(ptr, specs->pres_offset, specs->pres_size); if(present > 0 && present <= td->elements_count) { const asn_TYPE_member_t *elm = &td->elements[present-1]; const void *memb_ptr; if(elm->flags & ATF_POINTER) { memb_ptr = *(const void * const *) ((const char *)ptr + elm->memb_offset); } else { memb_ptr = (const void *) ((const char *)ptr + elm->memb_offset); } return asn_TYPE_outmost_tag(elm->type, memb_ptr, elm->tag_mode, elm->tag); } else { return (ber_tlv_tag_t)-1; } } int CHOICE_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; unsigned present; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } /* * Figure out which CHOICE element is encoded. */ present = _fetch_present_idx(sptr, specs->pres_offset,specs->pres_size); if(present > 0 && present <= td->elements_count) { asn_TYPE_member_t *elm = &td->elements[present-1]; const void *memb_ptr; if(elm->flags & ATF_POINTER) { memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); if(!memb_ptr) { if(elm->optional) return 0; ASN__CTFAIL(app_key, td, sptr, "%s: mandatory CHOICE element %s absent (%s:%d)", td->name, elm->name, __FILE__, __LINE__); return -1; } } else { memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); } if(elm->encoding_constraints.general_constraints) { return elm->encoding_constraints.general_constraints(elm->type, memb_ptr, ctfailcb, app_key); } else { return elm->type->encoding_constraints.general_constraints(elm->type, memb_ptr, ctfailcb, app_key); } } else { ASN__CTFAIL(app_key, td, sptr, "%s: no CHOICE element given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } } #undef XER_ADVANCE #define XER_ADVANCE(num_bytes) do { \ size_t num = num_bytes; \ buf_ptr = (const void *)(((const char *)buf_ptr) + num); \ size -= num; \ consumed_myself += num; \ } while(0) /* * Decode the XER (XML) data. */ asn_dec_rval_t CHOICE_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **struct_ptr, const char *opt_mname, const void *buf_ptr, size_t size) { /* * Bring closer parts of structure description. */ const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; const char *xml_tag = opt_mname ? opt_mname : td->xml_tag; /* * Parts of the structure being constructed. */ void *st = *struct_ptr; /* Target structure. */ asn_struct_ctx_t *ctx; /* Decoder context */ asn_dec_rval_t rval; /* Return value of a decoder */ ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ size_t edx; /* Element index */ /* * Create the target structure if it is not present already. */ if(st == 0) { st = *struct_ptr = CALLOC(1, specs->struct_size); if(st == 0) RETURN(RC_FAIL); } /* * Restore parsing context. */ ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); if(ctx->phase == 0 && !*xml_tag) ctx->phase = 1; /* Skip the outer tag checking phase */ /* * Phases of XER/XML processing: * Phase 0: Check that the opening tag matches our expectations. * Phase 1: Processing body and reacting on closing tag. * Phase 2: Processing inner type. * Phase 3: Only waiting for closing tag. * Phase 4: Skipping unknown extensions. * Phase 5: PHASED OUT */ for(edx = ctx->step; ctx->phase <= 4;) { pxer_chunk_type_e ch_type; /* XER chunk type */ ssize_t ch_size; /* Chunk size */ xer_check_tag_e tcv; /* Tag check value */ asn_TYPE_member_t *elm; /* * Go inside the member. */ if(ctx->phase == 2) { asn_dec_rval_t tmprval; void *memb_ptr; /* Pointer to the member */ void **memb_ptr2; /* Pointer to that pointer */ unsigned old_present; elm = &td->elements[edx]; if(elm->flags & ATF_POINTER) { /* Member is a pointer to another structure */ memb_ptr2 = (void **)((char *)st + elm->memb_offset); } else { memb_ptr = (char *)st + elm->memb_offset; memb_ptr2 = &memb_ptr; } /* Start/Continue decoding the inner member */ tmprval = elm->type->op->xer_decoder(opt_codec_ctx, elm->type, memb_ptr2, elm->name, buf_ptr, size); XER_ADVANCE(tmprval.consumed); ASN_DEBUG("XER/CHOICE: itdf: [%s] code=%d", elm->type->name, tmprval.code); old_present = _fetch_present_idx(st, specs->pres_offset, specs->pres_size); assert(old_present == 0 || old_present == edx + 1); /* Record what we've got */ _set_present_idx(st, specs->pres_offset, specs->pres_size, edx + 1); if(tmprval.code != RC_OK) RETURN(tmprval.code); ctx->phase = 3; /* Fall through */ } /* No need to wait for closing tag; special mode. */ if(ctx->phase == 3 && !*xml_tag) { ctx->phase = 5; /* Phase out */ RETURN(RC_OK); } /* * Get the next part of the XML stream. */ ch_size = xer_next_token(&ctx->context, buf_ptr, size, &ch_type); if(ch_size == -1) { RETURN(RC_FAIL); } else { switch(ch_type) { case PXER_WMORE: RETURN(RC_WMORE); case PXER_COMMENT: /* Got XML comment */ case PXER_TEXT: /* Ignore free-standing text */ XER_ADVANCE(ch_size); /* Skip silently */ continue; case PXER_TAG: break; /* Check the rest down there */ } } tcv = xer_check_tag(buf_ptr, ch_size, xml_tag); ASN_DEBUG("XER/CHOICE checked [%c%c%c%c] vs [%s], tcv=%d", ch_size>0?((const uint8_t *)buf_ptr)[0]:'?', ch_size>1?((const uint8_t *)buf_ptr)[1]:'?', ch_size>2?((const uint8_t *)buf_ptr)[2]:'?', ch_size>3?((const uint8_t *)buf_ptr)[3]:'?', xml_tag, tcv); /* Skip the extensions section */ if(ctx->phase == 4) { ASN_DEBUG("skip_unknown(%d, %ld)", tcv, (long)ctx->left); switch(xer_skip_unknown(tcv, &ctx->left)) { case -1: ctx->phase = 5; RETURN(RC_FAIL); case 1: ctx->phase = 3; /* Fall through */ case 0: XER_ADVANCE(ch_size); continue; case 2: ctx->phase = 3; break; } } switch(tcv) { case XCT_BOTH: break; /* No CHOICE? */ case XCT_CLOSING: if(ctx->phase != 3) break; XER_ADVANCE(ch_size); ctx->phase = 5; /* Phase out */ RETURN(RC_OK); case XCT_OPENING: if(ctx->phase == 0) { XER_ADVANCE(ch_size); ctx->phase = 1; /* Processing body phase */ continue; } /* Fall through */ case XCT_UNKNOWN_OP: case XCT_UNKNOWN_BO: if(ctx->phase != 1) break; /* Really unexpected */ /* * Search which inner member corresponds to this tag. */ for(edx = 0; edx < td->elements_count; edx++) { elm = &td->elements[edx]; tcv = xer_check_tag(buf_ptr,ch_size,elm->name); switch(tcv) { case XCT_BOTH: case XCT_OPENING: /* * Process this member. */ ctx->step = edx; ctx->phase = 2; break; case XCT_UNKNOWN_OP: case XCT_UNKNOWN_BO: continue; default: edx = td->elements_count; break; /* Phase out */ } break; } if(edx != td->elements_count) continue; /* It is expected extension */ if(specs->ext_start != -1) { ASN_DEBUG("Got anticipated extension"); /* * Check for (XCT_BOTH or XCT_UNKNOWN_BO) * By using a mask. Only record a pure * tags. */ if(tcv & XCT_CLOSING) { /* Found without body */ ctx->phase = 3; /* Terminating */ } else { ctx->left = 1; ctx->phase = 4; /* Skip ...'s */ } XER_ADVANCE(ch_size); continue; } /* Fall through */ default: break; } ASN_DEBUG("Unexpected XML tag [%c%c%c%c] in CHOICE [%s]" " (ph=%d, tag=%s)", ch_size>0?((const uint8_t *)buf_ptr)[0]:'?', ch_size>1?((const uint8_t *)buf_ptr)[1]:'?', ch_size>2?((const uint8_t *)buf_ptr)[2]:'?', ch_size>3?((const uint8_t *)buf_ptr)[3]:'?', td->name, ctx->phase, xml_tag); break; } ctx->phase = 5; /* Phase out, just in case */ RETURN(RC_FAIL); } asn_enc_rval_t CHOICE_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, void *app_key) { const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; asn_enc_rval_t er; unsigned present; if(!sptr) ASN__ENCODE_FAILED; /* * Figure out which CHOICE element is encoded. */ present = _fetch_present_idx(sptr, specs->pres_offset,specs->pres_size); if(present == 0 || present > td->elements_count) { ASN__ENCODE_FAILED; } else { asn_enc_rval_t tmper; asn_TYPE_member_t *elm = &td->elements[present-1]; const void *memb_ptr; const char *mname = elm->name; unsigned int mlen = strlen(mname); if(elm->flags & ATF_POINTER) { memb_ptr = *(const void *const *)((const char *)sptr + elm->memb_offset); if(!memb_ptr) ASN__ENCODE_FAILED; } else { memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); } er.encoded = 0; if(!(flags & XER_F_CANONICAL)) ASN__TEXT_INDENT(1, ilevel); ASN__CALLBACK3("<", 1, mname, mlen, ">", 1); tmper = elm->type->op->xer_encoder(elm->type, memb_ptr, ilevel + 1, flags, cb, app_key); if(tmper.encoded == -1) return tmper; er.encoded += tmper.encoded; ASN__CALLBACK3("", 1); } if(!(flags & XER_F_CANONICAL)) ASN__TEXT_INDENT(1, ilevel - 1); ASN__ENCODED_OK(er); cb_failed: ASN__ENCODE_FAILED; } asn_dec_rval_t CHOICE_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; asn_dec_rval_t rv; const asn_per_constraint_t *ct; asn_TYPE_member_t *elm; /* CHOICE's element */ void *memb_ptr; void **memb_ptr2; void *st = *sptr; int value; if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) ASN__DECODE_FAILED; /* * Create the target structure if it is not present already. */ if(!st) { st = *sptr = CALLOC(1, specs->struct_size); if(!st) ASN__DECODE_FAILED; } if(constraints) ct = &constraints->value; else if(td->encoding_constraints.per_constraints) ct = &td->encoding_constraints.per_constraints->value; else ct = 0; if(ct && ct->flags & APC_EXTENSIBLE) { value = per_get_few_bits(pd, 1); if(value < 0) ASN__DECODE_STARVED; if(value) ct = 0; /* Not restricted */ } if(ct && ct->range_bits >= 0) { value = per_get_few_bits(pd, ct->range_bits); if(value < 0) ASN__DECODE_STARVED; ASN_DEBUG("CHOICE %s got index %d in range %d", td->name, value, ct->range_bits); if(value > ct->upper_bound) ASN__DECODE_FAILED; } else { if(specs->ext_start == -1) ASN__DECODE_FAILED; value = uper_get_nsnnwn(pd); if(value < 0) ASN__DECODE_STARVED; value += specs->ext_start; if((unsigned)value >= td->elements_count) ASN__DECODE_FAILED; } /* Adjust if canonical order is different from natural order */ if(specs->from_canonical_order) { ASN_DEBUG("CHOICE presence from wire %d", value); value = specs->from_canonical_order[value]; ASN_DEBUG("CHOICE presence index effective %d", value); } /* Set presence to be able to free it later */ _set_present_idx(st, specs->pres_offset, specs->pres_size, value + 1); elm = &td->elements[value]; if(elm->flags & ATF_POINTER) { /* Member is a pointer to another structure */ memb_ptr2 = (void **)((char *)st + elm->memb_offset); } else { memb_ptr = (char *)st + elm->memb_offset; memb_ptr2 = &memb_ptr; } ASN_DEBUG("Discovered CHOICE %s encodes %s", td->name, elm->name); if(ct && ct->range_bits >= 0) { rv = elm->type->op->uper_decoder(opt_codec_ctx, elm->type, elm->encoding_constraints.per_constraints, memb_ptr2, pd); } else { rv = uper_open_type_get(opt_codec_ctx, elm->type, elm->encoding_constraints.per_constraints, memb_ptr2, pd); } if(rv.code != RC_OK) ASN_DEBUG("Failed to decode %s in %s (CHOICE) %d", elm->name, td->name, rv.code); return rv; } asn_enc_rval_t CHOICE_encode_uper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; asn_TYPE_member_t *elm; /* CHOICE's element */ const asn_per_constraint_t *ct; const void *memb_ptr; unsigned present; int present_enc; if(!sptr) ASN__ENCODE_FAILED; ASN_DEBUG("Encoding %s as CHOICE", td->name); if(constraints) ct = &constraints->value; else if(td->encoding_constraints.per_constraints) ct = &td->encoding_constraints.per_constraints->value; else ct = 0; present = _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size); /* * If the structure was not initialized properly, it cannot be encoded: * can't deduce what to encode in the choice type. */ if(present == 0 || present > td->elements_count) ASN__ENCODE_FAILED; else present--; ASN_DEBUG("Encoding %s CHOICE element %d", td->name, present); /* Adjust if canonical order is different from natural order */ if(specs->to_canonical_order) present_enc = specs->to_canonical_order[present]; else present_enc = present; if(ct && ct->range_bits >= 0) { if(present_enc < ct->lower_bound || present_enc > ct->upper_bound) { if(ct->flags & APC_EXTENSIBLE) { ASN_DEBUG( "CHOICE member %d (enc %d) is an extension (%ld..%ld)", present, present_enc, ct->lower_bound, ct->upper_bound); if(per_put_few_bits(po, 1, 1)) ASN__ENCODE_FAILED; } else { ASN__ENCODE_FAILED; } ct = 0; } } if(ct && ct->flags & APC_EXTENSIBLE) { ASN_DEBUG("CHOICE member %d (enc %d) is not an extension (%ld..%ld)", present, present_enc, ct->lower_bound, ct->upper_bound); if(per_put_few_bits(po, 0, 1)) ASN__ENCODE_FAILED; } elm = &td->elements[present]; ASN_DEBUG("CHOICE member \"%s\" %d (as %d)", elm->name, present, present_enc); if(elm->flags & ATF_POINTER) { /* Member is a pointer to another structure */ memb_ptr = *(const void *const *)((const char *)sptr + elm->memb_offset); if(!memb_ptr) ASN__ENCODE_FAILED; } else { memb_ptr = (const char *)sptr + elm->memb_offset; } if(ct && ct->range_bits >= 0) { if(per_put_few_bits(po, present_enc, ct->range_bits)) ASN__ENCODE_FAILED; return elm->type->op->uper_encoder( elm->type, elm->encoding_constraints.per_constraints, memb_ptr, po); } else { asn_enc_rval_t rval; if(specs->ext_start == -1) ASN__ENCODE_FAILED; if(uper_put_nsnnwn(po, present_enc - specs->ext_start)) ASN__ENCODE_FAILED; if(uper_open_type_put(elm->type, elm->encoding_constraints.per_constraints, memb_ptr, po)) ASN__ENCODE_FAILED; rval.encoded = 0; ASN__ENCODED_OK(rval); } } asn_dec_rval_t CHOICE_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; asn_dec_rval_t rv; const asn_per_constraint_t *ct; asn_TYPE_member_t *elm; /* CHOICE's element */ void *memb_ptr; void **memb_ptr2; void *st = *sptr; int value; if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) ASN__DECODE_FAILED; /* * Create the target structure if it is not present already. */ if(!st) { st = *sptr = CALLOC(1, specs->struct_size); if(!st) ASN__DECODE_FAILED; } if(constraints) ct = &constraints->value; else if(td->encoding_constraints.per_constraints) ct = &td->encoding_constraints.per_constraints->value; else ct = 0; if(ct && ct->flags & APC_EXTENSIBLE) { value = per_get_few_bits(pd, 1); if(value < 0) ASN__DECODE_STARVED; if(value) ct = 0; /* Not restricted */ } if(ct && ct->range_bits >= 0) { value = per_get_few_bits(pd, ct->range_bits); if(value < 0) ASN__DECODE_STARVED; ASN_DEBUG("CHOICE %s got index %d in range %d", td->name, value, ct->range_bits); if(value > ct->upper_bound) ASN__DECODE_FAILED; } else { if(specs->ext_start == -1) ASN__DECODE_FAILED; value = uper_get_nsnnwn(pd); if(value < 0) ASN__DECODE_STARVED; value += specs->ext_start; if((unsigned)value >= td->elements_count) ASN__DECODE_FAILED; } /* Adjust if canonical order is different from natural order */ if(specs->from_canonical_order) value = specs->from_canonical_order[value]; /* Set presence to be able to free it later */ _set_present_idx(st, specs->pres_offset, specs->pres_size, value + 1); elm = &td->elements[value]; if(elm->flags & ATF_POINTER) { /* Member is a pointer to another structure */ memb_ptr2 = (void **)((char *)st + elm->memb_offset); } else { memb_ptr = (char *)st + elm->memb_offset; memb_ptr2 = &memb_ptr; } ASN_DEBUG("Discovered CHOICE %s encodes %s", td->name, elm->name); if(ct && ct->range_bits >= 0) { rv = elm->type->op->aper_decoder(opt_codec_ctx, elm->type, elm->encoding_constraints.per_constraints, memb_ptr2, pd); } else { rv = uper_open_type_get(opt_codec_ctx, elm->type, elm->encoding_constraints.per_constraints, memb_ptr2, pd); } if(rv.code != RC_OK) ASN_DEBUG("Failed to decode %s in %s (CHOICE) %d", elm->name, td->name, rv.code); return rv; } asn_enc_rval_t CHOICE_encode_aper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; const asn_TYPE_member_t *elm; /* CHOICE's element */ const asn_per_constraint_t *ct; const void *memb_ptr; int present; if(!sptr) ASN__ENCODE_FAILED; ASN_DEBUG("Encoding %s as CHOICE using ALIGNED PER", td->name); if(constraints) ct = &constraints->value; else if(td->encoding_constraints.per_constraints) ct = &td->encoding_constraints.per_constraints->value; else ct = 0; present = _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size); /* * If the structure was not initialized properly, it cannot be encoded: * can't deduce what to encode in the choice type. */ if(present <= 0 || (unsigned)present > td->elements_count) ASN__ENCODE_FAILED; else present--; /* Adjust if canonical order is different from natural order */ if(specs->to_canonical_order) present = specs->to_canonical_order[present]; ASN_DEBUG("Encoding %s CHOICE element %d", td->name, present); if(ct && ct->range_bits >= 0) { if(present < ct->lower_bound || present > ct->upper_bound) { if(ct->flags & APC_EXTENSIBLE) { if(per_put_few_bits(po, 1, 1)) ASN__ENCODE_FAILED; } else { ASN__ENCODE_FAILED; } ct = 0; } } if(ct && ct->flags & APC_EXTENSIBLE) { if(per_put_few_bits(po, 0, 1)) ASN__ENCODE_FAILED; } elm = &td->elements[present]; if(elm->flags & ATF_POINTER) { /* Member is a pointer to another structure */ memb_ptr = *(const void *const *)((const char *)sptr + elm->memb_offset); if(!memb_ptr) ASN__ENCODE_FAILED; } else { memb_ptr = (const char *)sptr + elm->memb_offset; } if(ct && ct->range_bits >= 0) { if(per_put_few_bits(po, present, ct->range_bits)) ASN__ENCODE_FAILED; return elm->type->op->aper_encoder(elm->type, elm->encoding_constraints.per_constraints, memb_ptr, po); } else { asn_enc_rval_t rval; if(specs->ext_start == -1) ASN__ENCODE_FAILED; if(aper_put_nsnnwn(po, ct->range_bits, present - specs->ext_start)) ASN__ENCODE_FAILED; if(aper_open_type_put(elm->type, elm->encoding_constraints.per_constraints, memb_ptr, po)) ASN__ENCODE_FAILED; rval.encoded = 0; ASN__ENCODED_OK(rval); } } int CHOICE_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; unsigned present; if(!sptr) return (cb("", 8, app_key) < 0) ? -1 : 0; /* * Figure out which CHOICE element is encoded. */ present = _fetch_present_idx(sptr, specs->pres_offset,specs->pres_size); /* * Print that element. */ if(present > 0 && present <= td->elements_count) { asn_TYPE_member_t *elm = &td->elements[present-1]; const void *memb_ptr; if(elm->flags & ATF_POINTER) { memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); if(!memb_ptr) return (cb("", 8, app_key) < 0) ? -1 : 0; } else { memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); } /* Print member's name and stuff */ if(0) { if(cb(elm->name, strlen(elm->name), app_key) < 0 || cb(": ", 2, app_key) < 0) return -1; } return elm->type->op->print_struct(elm->type, memb_ptr, ilevel, cb, app_key); } else { return (cb("", 8, app_key) < 0) ? -1 : 0; } } void CHOICE_free(const asn_TYPE_descriptor_t *td, void *ptr, enum asn_struct_free_method method) { const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; unsigned present; if(!td || !ptr) return; ASN_DEBUG("Freeing %s as CHOICE", td->name); /* * Figure out which CHOICE element is encoded. */ present = _fetch_present_idx(ptr, specs->pres_offset, specs->pres_size); /* * Free that element. */ if(present > 0 && present <= td->elements_count) { asn_TYPE_member_t *elm = &td->elements[present-1]; void *memb_ptr; if(elm->flags & ATF_POINTER) { memb_ptr = *(void **)((char *)ptr + elm->memb_offset); if(memb_ptr) ASN_STRUCT_FREE(*elm->type, memb_ptr); } else { memb_ptr = (void *)((char *)ptr + elm->memb_offset); ASN_STRUCT_FREE_CONTENTS_ONLY(*elm->type, memb_ptr); } } switch(method) { case ASFM_FREE_EVERYTHING: FREEMEM(ptr); break; case ASFM_FREE_UNDERLYING: break; case ASFM_FREE_UNDERLYING_AND_RESET: memset(ptr, 0, specs->struct_size); break; } } /* * The following functions functions offer protection against -fshort-enums, * compatible with little- and big-endian machines. * If assertion is triggered, either disable -fshort-enums, or add an entry * here with the ->pres_size of your target stracture. * Unless the target structure is packed, the ".present" member * is guaranteed to be aligned properly. ASN.1 compiler itself does not * produce packed code. */ static unsigned _fetch_present_idx(const void *struct_ptr, unsigned pres_offset, unsigned pres_size) { const void *present_ptr; unsigned present; present_ptr = ((const char *)struct_ptr) + pres_offset; switch(pres_size) { case sizeof(int): present = *(const unsigned int *)present_ptr; break; case sizeof(short): present = *(const unsigned short *)present_ptr; break; case sizeof(char): present = *(const unsigned char *)present_ptr; break; default: /* ANSI C mandates enum to be equivalent to integer */ assert(pres_size != sizeof(int)); return 0; /* If not aborted, pass back safe value */ } return present; } static void _set_present_idx(void *struct_ptr, unsigned pres_offset, unsigned pres_size, unsigned present) { void *present_ptr; present_ptr = ((char *)struct_ptr) + pres_offset; switch(pres_size) { case sizeof(int): *(unsigned int *)present_ptr = present; break; case sizeof(short): *(unsigned short *)present_ptr = present; break; case sizeof(char): *(unsigned char *)present_ptr = present; break; default: /* ANSI C mandates enum to be equivalent to integer */ assert(pres_size != sizeof(int)); } } static const void * _get_member_ptr(const asn_TYPE_descriptor_t *td, const void *sptr, asn_TYPE_member_t **elm_ptr, unsigned *present_out) { const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; unsigned present; if(!sptr) { *elm_ptr = NULL; *present_out = 0; return NULL; } /* * Figure out which CHOICE element is encoded. */ present = _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size); *present_out = present; /* * The presence index is intentionally 1-based to avoid * treating zeroed structure as a valid one. */ if(present > 0 && present <= td->elements_count) { asn_TYPE_member_t *const elm = &td->elements[present - 1]; const void *memb_ptr; if(elm->flags & ATF_POINTER) { memb_ptr = *(const void *const *)((const char *)sptr + elm->memb_offset); } else { memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); } *elm_ptr = elm; return memb_ptr; } else { *elm_ptr = NULL; return NULL; } } int CHOICE_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const void *bptr) { asn_TYPE_member_t *aelm; asn_TYPE_member_t *belm; unsigned apresent = 0; unsigned bpresent = 0; const void *amember = _get_member_ptr(td, aptr, &aelm, &apresent); const void *bmember = _get_member_ptr(td, bptr, &belm, &bpresent); if(amember && bmember) { if(apresent == bpresent) { assert(aelm == belm); return aelm->type->op->compare_struct(aelm->type, amember, bmember); } else if(apresent < bpresent) { return -1; } else { return 1; } } else if(!amember) { return -1; } else { return 1; } } /* * Return the 1-based choice variant presence index. * Returns 0 in case of error. */ unsigned CHOICE_variant_get_presence(const asn_TYPE_descriptor_t *td, const void *sptr) { const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; return _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size); } /* * Sets or resets the 1-based choice variant presence index. * In case a previous index is not zero, the currently selected structure * member is freed and zeroed-out first. * Returns 0 on success and -1 on error. */ int CHOICE_variant_set_presence(const asn_TYPE_descriptor_t *td, void *sptr, unsigned present) { const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; unsigned old_present; if(!sptr) { return -1; } if(present > td->elements_count) return -1; old_present = _fetch_present_idx(sptr, specs->pres_offset, specs->pres_size); if(present == old_present) return 0; if(old_present != 0) { assert(old_present <= td->elements_count); ASN_STRUCT_RESET(*td, sptr); } _set_present_idx(sptr, specs->pres_offset, specs->pres_size, present); return 0; } asn_random_fill_result_t CHOICE_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, const asn_encoding_constraints_t *constr, size_t max_length) { const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; asn_random_fill_result_t res; asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; const asn_TYPE_member_t *elm; unsigned present; void *memb_ptr; /* Pointer to the member */ void **memb_ptr2; /* Pointer to that pointer */ void *st = *sptr; if(max_length == 0) return result_skipped; (void)constr; if(st == NULL) { st = CALLOC(1, specs->struct_size); if(st == NULL) { return result_failed; } } present = asn_random_between(1, td->elements_count); elm = &td->elements[present - 1]; if(elm->flags & ATF_POINTER) { /* Member is a pointer to another structure */ memb_ptr2 = (void **)((char *)st + elm->memb_offset); } else { memb_ptr = (char *)st + elm->memb_offset; memb_ptr2 = &memb_ptr; } res = elm->type->op->random_fill(elm->type, memb_ptr2, &elm->encoding_constraints, max_length); _set_present_idx(st, specs->pres_offset, specs->pres_size, present); if(res.code == ARFILL_OK) { *sptr = st; } else { if(st == *sptr) { ASN_STRUCT_RESET(*td, st); } else { ASN_STRUCT_FREE(*td, st); } } return res; } asn_TYPE_operation_t asn_OP_CHOICE = { CHOICE_free, CHOICE_print, CHOICE_compare, CHOICE_decode_ber, CHOICE_encode_der, CHOICE_decode_xer, CHOICE_encode_xer, #ifdef ASN_DISABLE_OER_SUPPORT 0, 0, #else CHOICE_decode_oer, CHOICE_encode_oer, #endif /* ASN_DISABLE_OER_SUPPORT */ #ifdef ASN_DISABLE_PER_SUPPORT 0, 0, 0, 0, #else CHOICE_decode_uper, CHOICE_encode_uper, CHOICE_decode_aper, CHOICE_encode_aper, #endif /* ASN_DISABLE_PER_SUPPORT */ CHOICE_random_fill, CHOICE_outmost_tag }; nextepc-0.3.10/lib/s1ap/asn1c/constr_CHOICE.h000066400000000000000000000044671333553357400204010ustar00rootroot00000000000000/* * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _CONSTR_CHOICE_H_ #define _CONSTR_CHOICE_H_ #include #ifdef __cplusplus extern "C" { #endif typedef struct asn_CHOICE_specifics_s { /* * Target structure description. */ unsigned struct_size; /* Size of the target structure. */ unsigned ctx_offset; /* Offset of the asn_codec_ctx_t member */ unsigned pres_offset; /* Identifier of the present member */ unsigned pres_size; /* Size of the identifier (enum) */ /* * Tags to members mapping table. */ const asn_TYPE_tag2member_t *tag2el; unsigned tag2el_count; /* Canonical ordering of CHOICE elements, for PER */ const unsigned *to_canonical_order; const unsigned *from_canonical_order; /* * Extensions-related stuff. */ signed ext_start; /* First member of extensions, or -1 */ } asn_CHOICE_specifics_t; /* * A set specialized functions dealing with the CHOICE type. */ asn_struct_free_f CHOICE_free; asn_struct_print_f CHOICE_print; asn_struct_compare_f CHOICE_compare; asn_constr_check_f CHOICE_constraint; ber_type_decoder_f CHOICE_decode_ber; der_type_encoder_f CHOICE_encode_der; xer_type_decoder_f CHOICE_decode_xer; xer_type_encoder_f CHOICE_encode_xer; oer_type_decoder_f CHOICE_decode_oer; oer_type_encoder_f CHOICE_encode_oer; per_type_decoder_f CHOICE_decode_uper; per_type_encoder_f CHOICE_encode_uper; per_type_decoder_f CHOICE_decode_aper; per_type_encoder_f CHOICE_encode_aper; asn_outmost_tag_f CHOICE_outmost_tag; asn_random_fill_f CHOICE_random_fill; extern asn_TYPE_operation_t asn_OP_CHOICE; /* * Return the 1-based choice variant presence index. * Returns 0 in case of error. */ unsigned CHOICE_variant_get_presence(const asn_TYPE_descriptor_t *td, const void *structure_ptr); /* * Sets or resets the 1-based choice variant presence index. * In case a previous index is not zero, the currently selected structure * member is freed and zeroed-out first. * Returns 0 on success and -1 on error. */ int CHOICE_variant_set_presence(const asn_TYPE_descriptor_t *td, void *structure_ptr, unsigned present); #ifdef __cplusplus } #endif #endif /* _CONSTR_CHOICE_H_ */ nextepc-0.3.10/lib/s1ap/asn1c/constr_CHOICE_oer.c000066400000000000000000000254331333553357400212350ustar00rootroot00000000000000/* * Copyright (c) 2017 Lev Walkin . * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef ASN_DISABLE_OER_SUPPORT #include #include #include /* * Return a standardized complex structure. */ #undef RETURN #define RETURN(_code) \ do { \ asn_dec_rval_t rval; \ rval.code = _code; \ rval.consumed = consumed_myself; \ return rval; \ } while(0) #undef ADVANCE #define ADVANCE(num_bytes) \ do { \ size_t num = num_bytes; \ ptr = ((const char *)ptr) + num; \ size -= num; \ consumed_myself += num; \ } while(0) /* * Switch to the next phase of parsing. */ #undef NEXT_PHASE #define NEXT_PHASE(ctx) \ do { \ ctx->phase++; \ ctx->step = 0; \ } while(0) #undef SET_PHASE #define SET_PHASE(ctx, value) \ do { \ ctx->phase = value; \ ctx->step = 0; \ } while(0) /* * Tags are canonically sorted in the tag to member table. */ static int _search4tag(const void *ap, const void *bp) { const asn_TYPE_tag2member_t *a = (const asn_TYPE_tag2member_t *)ap; const asn_TYPE_tag2member_t *b = (const asn_TYPE_tag2member_t *)bp; int a_class = BER_TAG_CLASS(a->el_tag); int b_class = BER_TAG_CLASS(b->el_tag); if(a_class == b_class) { ber_tlv_tag_t a_value = BER_TAG_VALUE(a->el_tag); ber_tlv_tag_t b_value = BER_TAG_VALUE(b->el_tag); if(a_value == b_value) return 0; else if(a_value < b_value) return -1; else return 1; } else if(a_class < b_class) { return -1; } else { return 1; } } /* * X.696 (08/2015) #8.7 Encoding of tags */ static ssize_t oer_fetch_tag(const void *ptr, size_t size, ber_tlv_tag_t *tag_r) { ber_tlv_tag_t val; ber_tlv_tag_t tclass; size_t skipped; if(size == 0) return 0; val = *(const uint8_t *)ptr; tclass = (val >> 6); if((val & 0x3F) != 0x3F) { /* #8.7.1 */ *tag_r = ((val & 0x3F) << 2) | tclass; return 1; } /* * Each octet contains 7 bits of useful information. * The MSB is 0 if it is the last octet of the tag. */ for(val = 0, ptr = ((const char *)ptr) + 1, skipped = 2; skipped <= size; ptr = ((const char *)ptr) + 1, skipped++) { unsigned int oct = *(const uint8_t *)ptr; if(oct & 0x80) { val = (val << 7) | (oct & 0x7F); /* * Make sure there are at least 9 bits spare * at the MS side of a value. */ if(val >> ((8 * sizeof(val)) - 9)) { /* * We would not be able to accomodate * any more tag bits. */ return -1; } } else { val = (val << 7) | oct; *tag_r = (val << 2) | tclass; return skipped; } } return 0; /* Want more */ } asn_dec_rval_t CHOICE_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_oer_constraints_t *constraints, void **struct_ptr, const void *ptr, size_t size) { /* * Bring closer parts of structure description. */ const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; asn_TYPE_member_t *elements = td->elements; /* * Parts of the structure being constructed. */ void *st = *struct_ptr; /* Target structure. */ asn_struct_ctx_t *ctx; /* Decoder context */ ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ (void)constraints; ASN_DEBUG("Decoding %s as CHOICE", td->name); /* * Create the target structure if it is not present already. */ if(st == 0) { st = *struct_ptr = CALLOC(1, specs->struct_size); if(st == 0) { RETURN(RC_FAIL); } } /* * Restore parsing context. */ ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); switch(ctx->phase) { case 0: { /* * Discover the tag. */ ber_tlv_tag_t tlv_tag; /* T from TLV */ ssize_t tag_len; /* Length of TLV's T */ tag_len = oer_fetch_tag(ptr, size, &tlv_tag); switch(tag_len) { case 0: ASN__DECODE_STARVED; case -1: ASN__DECODE_FAILED; } do { const asn_TYPE_tag2member_t *t2m; asn_TYPE_tag2member_t key = {0, 0, 0, 0}; key.el_tag = tlv_tag; t2m = (const asn_TYPE_tag2member_t *)bsearch( &key, specs->tag2el, specs->tag2el_count, sizeof(specs->tag2el[0]), _search4tag); if(t2m) { /* * Found the element corresponding to the tag. */ NEXT_PHASE(ctx); ctx->step = t2m->el_no; break; } else if(specs->ext_start == -1) { ASN_DEBUG( "Unexpected tag %s " "in non-extensible CHOICE %s", ber_tlv_tag_string(tlv_tag), td->name); RETURN(RC_FAIL); } else { /* Skip open type extension */ ASN_DEBUG( "Not implemented skipping open type extension for tag %s", ber_tlv_tag_string(tlv_tag)); RETURN(RC_FAIL); } } while(0); ADVANCE(tag_len); } /* Fall through */ case 1: { asn_TYPE_member_t *elm = &elements[ctx->step]; /* CHOICE's element */ void *memb_ptr; /* Pointer to the member */ void **memb_ptr2; /* Pointer to that pointer */ asn_dec_rval_t rval; /* * Compute the position of the member inside a structure, * and also a type of containment (it may be contained * as pointer or using inline inclusion). */ if(elm->flags & ATF_POINTER) { /* Member is a pointer to another structure */ memb_ptr2 = (void **)((char *)st + elm->memb_offset); } else { /* * A pointer to a pointer * holding the start of the structure */ memb_ptr = (char *)st + elm->memb_offset; memb_ptr2 = &memb_ptr; } /* Set presence to be able to free it properly at any time */ (void)CHOICE_variant_set_presence(td, st, ctx->step + 1); if(specs->ext_start >= 0 && specs->ext_start <= ctx->step) { ssize_t got = oer_open_type_get(opt_codec_ctx, elm->type, elm->encoding_constraints.oer_constraints, memb_ptr2, ptr, size); if(got < 0) ASN__DECODE_FAILED; if(got == 0) ASN__DECODE_STARVED; rval.code = RC_OK; rval.consumed = got; } else { rval = elm->type->op->oer_decoder( opt_codec_ctx, elm->type, elm->encoding_constraints.oer_constraints, memb_ptr2, ptr, size); } rval.consumed += consumed_myself; switch(rval.code) { case RC_OK: NEXT_PHASE(ctx); case RC_WMORE: break; case RC_FAIL: SET_PHASE(ctx, 3); /* => 3 */ } return rval; } case 2: /* Already decoded everything */ RETURN(RC_OK); case 3: /* Failed to decode, after all */ RETURN(RC_FAIL); } RETURN(RC_FAIL); } /* * X.696 (08/2015) #8.7 Encoding of tags */ static ssize_t oer_put_tag(ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key) { uint8_t tclass = BER_TAG_CLASS(tag); ber_tlv_tag_t tval = BER_TAG_VALUE(tag); if(tval < 0x3F) { uint8_t b = (uint8_t)((tclass << 6) | tval); if(cb(&b, 1, app_key) < 0) { return -1; } return 1; } else { uint8_t buf[1 + 2 * sizeof(tval)]; uint8_t *b = &buf[sizeof(buf)-1]; /* Last addressable */ size_t encoded; for(; ; tval >>= 7) { if(tval >> 7) { *b-- = 0x80 | (tval & 0x7f); } else { *b-- = tval & 0x7f; break; } } *b = (uint8_t)((tclass << 6) | 0x3F); encoded = sizeof(buf) - (b - buf); if(cb(b, encoded, app_key) < 0) { return -1; } return encoded; } } /* * Encode as Canonical OER. */ asn_enc_rval_t CHOICE_encode_oer(const asn_TYPE_descriptor_t *td, const asn_oer_constraints_t *constraints, const void *sptr, asn_app_consume_bytes_f *cb, void *app_key) { const asn_CHOICE_specifics_t *specs = (const asn_CHOICE_specifics_t *)td->specifics; asn_TYPE_member_t *elm; /* CHOICE element */ unsigned present; const void *memb_ptr; ber_tlv_tag_t tag; ssize_t tag_len; asn_enc_rval_t er = {0, 0, 0}; (void)constraints; if(!sptr) ASN__ENCODE_FAILED; ASN_DEBUG("OER %s encoding as CHOICE", td->name); present = CHOICE_variant_get_presence(td, sptr); if(present == 0 || present > td->elements_count) { ASN_DEBUG("CHOICE %s member is not selected", td->name); ASN__ENCODE_FAILED; } elm = &td->elements[present-1]; if(elm->flags & ATF_POINTER) { memb_ptr = *(const void *const *)((const char *)sptr + elm->memb_offset); if(memb_ptr == 0) { /* Mandatory element absent */ ASN__ENCODE_FAILED; } } else { memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); } tag = asn_TYPE_outmost_tag(elm->type, memb_ptr, elm->tag_mode, elm->tag); if(tag == 0) { ASN__ENCODE_FAILED; } tag_len = oer_put_tag(tag, cb, app_key); if(tag_len < 0) { ASN__ENCODE_FAILED; } if(specs->ext_start >= 0 && (unsigned)specs->ext_start <= (present-1)) { ssize_t encoded = oer_open_type_put(elm->type, elm->encoding_constraints.oer_constraints, memb_ptr, cb, app_key); if(encoded < 0) ASN__ENCODE_FAILED; er.encoded = tag_len + encoded; } else { er = elm->type->op->oer_encoder( elm->type, elm->encoding_constraints.oer_constraints, memb_ptr, cb, app_key); if(er.encoded >= 0) er.encoded += tag_len; } return er; } #endif /* ASN_DISABLE_OER_SUPPORT */ nextepc-0.3.10/lib/s1ap/asn1c/constr_SEQUENCE.c000066400000000000000000001622011333553357400206410ustar00rootroot00000000000000/* * Copyright (c) 2003-2017 Lev Walkin . * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include #include /* * Number of bytes left for this structure. * (ctx->left) indicates the number of bytes _transferred_ for the structure. * (size) contains the number of bytes in the buffer passed. */ #define LEFT ((size<(size_t)ctx->left)?size:(size_t)ctx->left) /* * If the subprocessor function returns with an indication that it wants * more data, it may well be a fatal decoding problem, because the * size is constrained by the 's L, even if the buffer size allows * reading more data. * For example, consider the buffer containing the following TLVs: * ... * The TLV length clearly indicates that one byte is expected in V, but * if the V processor returns with "want more data" even if the buffer * contains way more data than the V processor have seen. */ #define SIZE_VIOLATION (ctx->left >= 0 && (size_t)ctx->left <= size) /* * This macro "eats" the part of the buffer which is definitely "consumed", * i.e. was correctly converted into local representation or rightfully skipped. */ #undef ADVANCE #define ADVANCE(num_bytes) do { \ size_t num = num_bytes; \ ptr = ((const char *)ptr) + num; \ size -= num; \ if(ctx->left >= 0) \ ctx->left -= num; \ consumed_myself += num; \ } while(0) /* * Switch to the next phase of parsing. */ #undef NEXT_PHASE #undef PHASE_OUT #define NEXT_PHASE(ctx) do { \ ctx->phase++; \ ctx->step = 0; \ } while(0) #define PHASE_OUT(ctx) do { ctx->phase = 10; } while(0) /* * Return a standardized complex structure. */ #undef RETURN #define RETURN(_code) do { \ rval.code = _code; \ rval.consumed = consumed_myself;\ return rval; \ } while(0) /* * Check whether we are inside the extensions group. */ #define IN_EXTENSION_GROUP(specs, memb_idx) \ ((specs)->first_extension >= 0 \ && (unsigned)(specs)->first_extension <= (memb_idx)) /* * Tags are canonically sorted in the tag2element map. */ static int _t2e_cmp(const void *ap, const void *bp) { const asn_TYPE_tag2member_t *a = (const asn_TYPE_tag2member_t *)ap; const asn_TYPE_tag2member_t *b = (const asn_TYPE_tag2member_t *)bp; int a_class = BER_TAG_CLASS(a->el_tag); int b_class = BER_TAG_CLASS(b->el_tag); if(a_class == b_class) { ber_tlv_tag_t a_value = BER_TAG_VALUE(a->el_tag); ber_tlv_tag_t b_value = BER_TAG_VALUE(b->el_tag); if(a_value == b_value) { if(a->el_no > b->el_no) return 1; /* * Important: we do not check * for a->el_no <= b->el_no! */ return 0; } else if(a_value < b_value) return -1; else return 1; } else if(a_class < b_class) { return -1; } else { return 1; } } /* * The decoder of the SEQUENCE type. */ asn_dec_rval_t SEQUENCE_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **struct_ptr, const void *ptr, size_t size, int tag_mode) { /* * Bring closer parts of structure description. */ const asn_SEQUENCE_specifics_t *specs = (const asn_SEQUENCE_specifics_t *)td->specifics; const asn_TYPE_member_t *elements = td->elements; /* * Parts of the structure being constructed. */ void *st = *struct_ptr; /* Target structure. */ asn_struct_ctx_t *ctx; /* Decoder context */ ber_tlv_tag_t tlv_tag; /* T from TLV */ asn_dec_rval_t rval; /* Return code from subparsers */ ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ size_t edx; /* SEQUENCE element's index */ ASN_DEBUG("Decoding %s as SEQUENCE", td->name); /* * Create the target structure if it is not present already. */ if(st == 0) { st = *struct_ptr = CALLOC(1, specs->struct_size); if(st == 0) { RETURN(RC_FAIL); } } /* * Restore parsing context. */ ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); /* * Start to parse where left previously */ switch(ctx->phase) { case 0: /* * PHASE 0. * Check that the set of tags associated with given structure * perfectly fits our expectations. */ rval = ber_check_tags(opt_codec_ctx, td, ctx, ptr, size, tag_mode, 1, &ctx->left, 0); if(rval.code != RC_OK) { ASN_DEBUG("%s tagging check failed: %d", td->name, rval.code); return rval; } if(ctx->left >= 0) ctx->left += rval.consumed; /* ?Substracted below! */ ADVANCE(rval.consumed); NEXT_PHASE(ctx); ASN_DEBUG("Structure consumes %ld bytes, buffer %ld", (long)ctx->left, (long)size); /* Fall through */ case 1: /* * PHASE 1. * From the place where we've left it previously, * try to decode the next member from the list of * this structure's elements. * (ctx->step) stores the member being processed * between invocations and the microphase {0,1} of parsing * that member: * step = ( * 2 + ). */ for(edx = ((size_t)ctx->step >> 1); edx < td->elements_count; edx++, ctx->step = (ctx->step & ~1) + 2) { void *memb_ptr; /* Pointer to the member */ void **memb_ptr2; /* Pointer to that pointer */ ssize_t tag_len; /* Length of TLV's T */ size_t opt_edx_end; /* Next non-optional element */ size_t n; int use_bsearch; if(ctx->step & 1) goto microphase2; /* * MICROPHASE 1: Synchronize decoding. */ ASN_DEBUG("In %s SEQUENCE left %d, edx=%" ASN_PRI_SIZE " flags=%d" " opt=%d ec=%d", td->name, (int)ctx->left, edx, elements[edx].flags, elements[edx].optional, td->elements_count); if(ctx->left == 0 /* No more stuff is expected */ && ( /* Explicit OPTIONAL specification reaches the end */ (edx + elements[edx].optional == td->elements_count) || /* All extensions are optional */ IN_EXTENSION_GROUP(specs, edx))) { ASN_DEBUG("End of SEQUENCE %s", td->name); /* * Found the legitimate end of the structure. */ PHASE_OUT(ctx); RETURN(RC_OK); } /* * Fetch the T from TLV. */ tag_len = ber_fetch_tag(ptr, LEFT, &tlv_tag); ASN_DEBUG("Current tag in %s SEQUENCE for element %" ASN_PRI_SIZE " " "(%s) is %s encoded in %d bytes, of frame %ld", td->name, edx, elements[edx].name, ber_tlv_tag_string(tlv_tag), (int)tag_len, (long)LEFT); switch(tag_len) { case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); /* Fall through */ case -1: RETURN(RC_FAIL); } if(ctx->left < 0 && ((const uint8_t *)ptr)[0] == 0) { if(LEFT < 2) { if(SIZE_VIOLATION) { RETURN(RC_FAIL); } else { RETURN(RC_WMORE); } } else if(((const uint8_t *)ptr)[1] == 0) { ASN_DEBUG("edx = %" ASN_PRI_SIZE ", opt = %d, ec=%d", edx, elements[edx].optional, td->elements_count); if((edx + elements[edx].optional == td->elements_count) || IN_EXTENSION_GROUP(specs, edx)) { /* * Yeah, baby! Found the terminator * of the indefinite length structure. */ /* * Proceed to the canonical * finalization function. * No advancing is necessary. */ goto phase3; } } } /* * Find the next available type with this tag. */ use_bsearch = 0; opt_edx_end = edx + elements[edx].optional + 1; if(opt_edx_end > td->elements_count) opt_edx_end = td->elements_count; /* Cap */ else if(opt_edx_end - edx > 8) { /* Limit the scope of linear search... */ opt_edx_end = edx + 8; use_bsearch = 1; /* ... and resort to bsearch() */ } for(n = edx; n < opt_edx_end; n++) { if(BER_TAGS_EQUAL(tlv_tag, elements[n].tag)) { /* * Found element corresponding to the tag * being looked at. * Reposition over the right element. */ edx = n; ctx->step = 1 + 2 * edx; /* Remember! */ goto microphase2; } else if(elements[n].flags & ATF_ANY_TYPE) { /* * This is the ANY type, which may bear * any flag whatsoever. */ edx = n; ctx->step = 1 + 2 * edx; /* Remember! */ goto microphase2; } else if(elements[n].tag == (ber_tlv_tag_t)-1) { use_bsearch = 1; break; } } if(use_bsearch) { /* * Resort to a binary search over * sorted array of tags. */ const asn_TYPE_tag2member_t *t2m; asn_TYPE_tag2member_t key = {0, 0, 0, 0}; key.el_tag = tlv_tag; key.el_no = edx; t2m = (const asn_TYPE_tag2member_t *)bsearch(&key, specs->tag2el, specs->tag2el_count, sizeof(specs->tag2el[0]), _t2e_cmp); if(t2m) { const asn_TYPE_tag2member_t *best = 0; const asn_TYPE_tag2member_t *t2m_f, *t2m_l; size_t edx_max = edx + elements[edx].optional; /* * Rewind to the first element with that tag, * `cause bsearch() does not guarantee order. */ t2m_f = t2m + t2m->toff_first; t2m_l = t2m + t2m->toff_last; for(t2m = t2m_f; t2m <= t2m_l; t2m++) { if(t2m->el_no > edx_max) break; if(t2m->el_no < edx) continue; best = t2m; } if(best) { edx = best->el_no; ctx->step = 1 + 2 * edx; goto microphase2; } } n = opt_edx_end; } if(n == opt_edx_end) { /* * If tag is unknown, it may be either * an unknown (thus, incorrect) tag, * or an extension (...), * or an end of the indefinite-length structure. */ if(!IN_EXTENSION_GROUP(specs, edx + elements[edx].optional)) { ASN_DEBUG("Unexpected tag %s (at %" ASN_PRI_SIZE ")", ber_tlv_tag_string(tlv_tag), edx); ASN_DEBUG("Expected tag %s (%s)%s", ber_tlv_tag_string(elements[edx].tag), elements[edx].name, elements[edx].optional ?" or alternatives":""); RETURN(RC_FAIL); } else { /* Skip this tag */ ssize_t skip; edx += elements[edx].optional; ASN_DEBUG("Skipping unexpected %s (at %" ASN_PRI_SIZE ")", ber_tlv_tag_string(tlv_tag), edx); skip = ber_skip_length(opt_codec_ctx, BER_TLV_CONSTRUCTED(ptr), (const char *)ptr + tag_len, LEFT - tag_len); ASN_DEBUG("Skip length %d in %s", (int)skip, td->name); switch(skip) { case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); /* Fall through */ case -1: RETURN(RC_FAIL); } ADVANCE(skip + tag_len); ctx->step -= 2; edx--; continue; /* Try again with the next tag */ } } /* * MICROPHASE 2: Invoke the member-specific decoder. */ ctx->step |= 1; /* Confirm entering next microphase */ microphase2: ASN_DEBUG("Inside SEQUENCE %s MF2", td->name); /* * Compute the position of the member inside a structure, * and also a type of containment (it may be contained * as pointer or using inline inclusion). */ if(elements[edx].flags & ATF_POINTER) { /* Member is a pointer to another structure */ memb_ptr2 = (void **)((char *)st + elements[edx].memb_offset); } else { /* * A pointer to a pointer * holding the start of the structure */ memb_ptr = (char *)st + elements[edx].memb_offset; memb_ptr2 = &memb_ptr; } /* * Invoke the member fetch routine according to member's type */ if(elements[edx].flags & ATF_OPEN_TYPE) { rval = OPEN_TYPE_ber_get(opt_codec_ctx, td, st, &elements[edx], ptr, LEFT); } else { rval = elements[edx].type->op->ber_decoder(opt_codec_ctx, elements[edx].type, memb_ptr2, ptr, LEFT, elements[edx].tag_mode); } ASN_DEBUG("In %s SEQUENCE decoded %" ASN_PRI_SIZE " %s of %d " "in %d bytes rval.code %d, size=%d", td->name, edx, elements[edx].type->name, (int)LEFT, (int)rval.consumed, rval.code, (int)size); switch(rval.code) { case RC_OK: break; case RC_WMORE: /* More data expected */ if(!SIZE_VIOLATION) { ADVANCE(rval.consumed); RETURN(RC_WMORE); } ASN_DEBUG("Size violation (c->l=%ld <= s=%ld)", (long)ctx->left, (long)size); /* Fall through */ case RC_FAIL: /* Fatal error */ RETURN(RC_FAIL); } /* switch(rval) */ ADVANCE(rval.consumed); } /* for(all structure members) */ phase3: ctx->phase = 3; /* Fall through */ case 3: /* 00 and other tags expected */ case 4: /* only 00's expected */ ASN_DEBUG("SEQUENCE %s Leftover: %ld, size = %ld", td->name, (long)ctx->left, (long)size); /* * Skip everything until the end of the SEQUENCE. */ while(ctx->left) { ssize_t tl, ll; tl = ber_fetch_tag(ptr, LEFT, &tlv_tag); switch(tl) { case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); /* Fall through */ case -1: RETURN(RC_FAIL); } /* * If expected <0><0>... */ if(ctx->left < 0 && ((const uint8_t *)ptr)[0] == 0) { if(LEFT < 2) { if(SIZE_VIOLATION) RETURN(RC_FAIL); else RETURN(RC_WMORE); } else if(((const uint8_t *)ptr)[1] == 0) { /* * Correctly finished with <0><0>. */ ADVANCE(2); ctx->left++; ctx->phase = 4; continue; } } if(!IN_EXTENSION_GROUP(specs, td->elements_count) || ctx->phase == 4) { ASN_DEBUG("Unexpected continuation " "of a non-extensible type " "%s (SEQUENCE): %s", td->name, ber_tlv_tag_string(tlv_tag)); RETURN(RC_FAIL); } ll = ber_skip_length(opt_codec_ctx, BER_TLV_CONSTRUCTED(ptr), (const char *)ptr + tl, LEFT - tl); switch(ll) { case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); /* Fall through */ case -1: RETURN(RC_FAIL); } ADVANCE(tl + ll); } PHASE_OUT(ctx); } RETURN(RC_OK); } /* * The DER encoder of the SEQUENCE type. */ asn_enc_rval_t SEQUENCE_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key) { size_t computed_size = 0; asn_enc_rval_t erval; ssize_t ret; size_t edx; ASN_DEBUG("%s %s as SEQUENCE", cb?"Encoding":"Estimating", td->name); /* * Gather the length of the underlying members sequence. */ for(edx = 0; edx < td->elements_count; edx++) { asn_TYPE_member_t *elm = &td->elements[edx]; const void *memb_ptr; /* Pointer to the member */ const void *const *memb_ptr2; /* Pointer to that pointer */ if(elm->flags & ATF_POINTER) { memb_ptr2 = (const void *const *)((const char *)sptr + elm->memb_offset); if(!*memb_ptr2) { ASN_DEBUG("Element %s %" ASN_PRI_SIZE " not present", elm->name, edx); if(elm->optional) continue; /* Mandatory element is missing */ ASN__ENCODE_FAILED; } } else { memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); memb_ptr2 = &memb_ptr; } /* Eliminate default values */ if(elm->default_value_cmp && elm->default_value_cmp(*memb_ptr2) == 0) continue; erval = elm->type->op->der_encoder(elm->type, *memb_ptr2, elm->tag_mode, elm->tag, 0, 0); if(erval.encoded == -1) return erval; computed_size += erval.encoded; ASN_DEBUG("Member %" ASN_PRI_SIZE " %s estimated %ld bytes", edx, elm->name, (long)erval.encoded); } /* * Encode the TLV for the sequence itself. */ ret = der_write_tags(td, computed_size, tag_mode, 1, tag, cb, app_key); ASN_DEBUG("Wrote tags: %ld (+%ld)", (long)ret, (long)computed_size); if(ret == -1) ASN__ENCODE_FAILED; erval.encoded = computed_size + ret; if(!cb) ASN__ENCODED_OK(erval); /* * Encode all members. */ for(edx = 0; edx < td->elements_count; edx++) { asn_TYPE_member_t *elm = &td->elements[edx]; asn_enc_rval_t tmperval; const void *memb_ptr; /* Pointer to the member */ const void *const *memb_ptr2; /* Pointer to that pointer */ if(elm->flags & ATF_POINTER) { memb_ptr2 = (const void *const *)((const char *)sptr + elm->memb_offset); if(!*memb_ptr2) continue; } else { memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); memb_ptr2 = &memb_ptr; } /* Eliminate default values */ if(elm->default_value_cmp && elm->default_value_cmp(*memb_ptr2) == 0) continue; tmperval = elm->type->op->der_encoder(elm->type, *memb_ptr2, elm->tag_mode, elm->tag, cb, app_key); if(tmperval.encoded == -1) return tmperval; computed_size -= tmperval.encoded; ASN_DEBUG("Member %" ASN_PRI_SIZE " %s of SEQUENCE %s encoded in %ld bytes", edx, elm->name, td->name, (long)tmperval.encoded); } if(computed_size != 0) /* * Encoded size is not equal to the computed size. */ ASN__ENCODE_FAILED; ASN__ENCODED_OK(erval); } #undef XER_ADVANCE #define XER_ADVANCE(num_bytes) \ do { \ size_t num = (num_bytes); \ ptr = ((const char *)ptr) + num; \ size -= num; \ consumed_myself += num; \ } while(0) /* * Decode the XER (XML) data. */ asn_dec_rval_t SEQUENCE_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **struct_ptr, const char *opt_mname, const void *ptr, size_t size) { /* * Bring closer parts of structure description. */ const asn_SEQUENCE_specifics_t *specs = (const asn_SEQUENCE_specifics_t *)td->specifics; asn_TYPE_member_t *elements = td->elements; const char *xml_tag = opt_mname ? opt_mname : td->xml_tag; /* * ... and parts of the structure being constructed. */ void *st = *struct_ptr; /* Target structure. */ asn_struct_ctx_t *ctx; /* Decoder context */ asn_dec_rval_t rval; /* Return value from a decoder */ ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ size_t edx; /* Element index */ /* * Create the target structure if it is not present already. */ if(st == 0) { st = *struct_ptr = CALLOC(1, specs->struct_size); if(st == 0) RETURN(RC_FAIL); } /* * Restore parsing context. */ ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); /* * Phases of XER/XML processing: * Phase 0: Check that the opening tag matches our expectations. * Phase 1: Processing body and reacting on closing tag. * Phase 2: Processing inner type. * Phase 3: Skipping unknown extensions. * Phase 4: PHASED OUT */ for(edx = ctx->step; ctx->phase <= 3;) { pxer_chunk_type_e ch_type; /* XER chunk type */ ssize_t ch_size; /* Chunk size */ xer_check_tag_e tcv; /* Tag check value */ asn_TYPE_member_t *elm; /* * Go inside the inner member of a sequence. */ if(ctx->phase == 2) { asn_dec_rval_t tmprval; void *memb_ptr_dontuse; /* Pointer to the member */ void **memb_ptr2; /* Pointer to that pointer */ elm = &td->elements[edx]; if(elm->flags & ATF_POINTER) { /* Member is a pointer to another structure */ memb_ptr2 = (void **)((char *)st + elm->memb_offset); } else { memb_ptr_dontuse = (char *)st + elm->memb_offset; memb_ptr2 = &memb_ptr_dontuse; /* Only use of memb_ptr_dontuse */ } if(elm->flags & ATF_OPEN_TYPE) { tmprval = OPEN_TYPE_xer_get(opt_codec_ctx, td, st, elm, ptr, size); } else { /* Invoke the inner type decoder, m.b. multiple times */ tmprval = elm->type->op->xer_decoder(opt_codec_ctx, elm->type, memb_ptr2, elm->name, ptr, size); } XER_ADVANCE(tmprval.consumed); if(tmprval.code != RC_OK) RETURN(tmprval.code); ctx->phase = 1; /* Back to body processing */ ctx->step = ++edx; ASN_DEBUG("XER/SEQUENCE phase => %d, step => %d", ctx->phase, ctx->step); /* Fall through */ } /* * Get the next part of the XML stream. */ ch_size = xer_next_token(&ctx->context, ptr, size, &ch_type); if(ch_size == -1) { RETURN(RC_FAIL); } else { switch(ch_type) { case PXER_WMORE: RETURN(RC_WMORE); case PXER_COMMENT: /* Got XML comment */ case PXER_TEXT: /* Ignore free-standing text */ XER_ADVANCE(ch_size); /* Skip silently */ continue; case PXER_TAG: break; /* Check the rest down there */ } } tcv = xer_check_tag(ptr, ch_size, xml_tag); ASN_DEBUG("XER/SEQUENCE: tcv = %d, ph=%d [%s]", tcv, ctx->phase, xml_tag); /* Skip the extensions section */ if(ctx->phase == 3) { switch(xer_skip_unknown(tcv, &ctx->left)) { case -1: ctx->phase = 4; RETURN(RC_FAIL); case 0: XER_ADVANCE(ch_size); continue; case 1: XER_ADVANCE(ch_size); ctx->phase = 1; continue; case 2: ctx->phase = 1; break; } } switch(tcv) { case XCT_CLOSING: if(ctx->phase == 0) break; ctx->phase = 0; /* Fall through */ case XCT_BOTH: if(ctx->phase == 0) { if(edx >= td->elements_count || /* Explicit OPTIONAL specs reaches the end */ (edx + elements[edx].optional == td->elements_count) || /* All extensions are optional */ IN_EXTENSION_GROUP(specs, edx)) { XER_ADVANCE(ch_size); ctx->phase = 4; /* Phase out */ RETURN(RC_OK); } else { ASN_DEBUG("Premature end of XER SEQUENCE"); RETURN(RC_FAIL); } } /* Fall through */ case XCT_OPENING: if(ctx->phase == 0) { XER_ADVANCE(ch_size); ctx->phase = 1; /* Processing body phase */ continue; } /* Fall through */ case XCT_UNKNOWN_OP: case XCT_UNKNOWN_BO: ASN_DEBUG("XER/SEQUENCE: tcv=%d, ph=%d, edx=%" ASN_PRI_SIZE "", tcv, ctx->phase, edx); if(ctx->phase != 1) { break; /* Really unexpected */ } if(edx < td->elements_count) { /* * Search which member corresponds to this tag. */ size_t n; size_t edx_end = edx + elements[edx].optional + 1; if(edx_end > td->elements_count) edx_end = td->elements_count; for(n = edx; n < edx_end; n++) { elm = &td->elements[n]; tcv = xer_check_tag(ptr, ch_size, elm->name); switch(tcv) { case XCT_BOTH: case XCT_OPENING: /* * Process this member. */ ctx->step = edx = n; ctx->phase = 2; break; case XCT_UNKNOWN_OP: case XCT_UNKNOWN_BO: continue; default: n = edx_end; break; /* Phase out */ } break; } if(n != edx_end) continue; } else { ASN_DEBUG("Out of defined members: %" ASN_PRI_SIZE "/%u", edx, td->elements_count); } /* It is expected extension */ if(IN_EXTENSION_GROUP(specs, edx + (edx < td->elements_count ? elements[edx].optional : 0))) { ASN_DEBUG("Got anticipated extension at %" ASN_PRI_SIZE "", edx); /* * Check for (XCT_BOTH or XCT_UNKNOWN_BO) * By using a mask. Only record a pure * tags. */ if(tcv & XCT_CLOSING) { /* Found without body */ } else { ctx->left = 1; ctx->phase = 3; /* Skip ...'s */ } XER_ADVANCE(ch_size); continue; } /* Fall through */ default: break; } ASN_DEBUG("Unexpected XML tag in SEQUENCE [%c%c%c%c%c%c]", size>0?((const char *)ptr)[0]:'.', size>1?((const char *)ptr)[1]:'.', size>2?((const char *)ptr)[2]:'.', size>3?((const char *)ptr)[3]:'.', size>4?((const char *)ptr)[4]:'.', size>5?((const char *)ptr)[5]:'.'); break; } ctx->phase = 4; /* "Phase out" on hard failure */ RETURN(RC_FAIL); } asn_enc_rval_t SEQUENCE_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, void *app_key) { asn_enc_rval_t er; int xcan = (flags & XER_F_CANONICAL); asn_TYPE_descriptor_t *tmp_def_val_td = 0; void *tmp_def_val = 0; size_t edx; if(!sptr) ASN__ENCODE_FAILED; er.encoded = 0; for(edx = 0; edx < td->elements_count; edx++) { asn_enc_rval_t tmper; asn_TYPE_member_t *elm = &td->elements[edx]; const void *memb_ptr; const char *mname = elm->name; unsigned int mlen = strlen(mname); if(elm->flags & ATF_POINTER) { memb_ptr = *(const void *const *)((const char *)sptr + elm->memb_offset); if(!memb_ptr) { assert(tmp_def_val == 0); if(elm->default_value_set) { if(elm->default_value_set(&tmp_def_val)) { ASN__ENCODE_FAILED; } else { memb_ptr = tmp_def_val; tmp_def_val_td = elm->type; } } else if(elm->optional) { continue; } else { /* Mandatory element is missing */ ASN__ENCODE_FAILED; } } } else { memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); } if(!xcan) ASN__TEXT_INDENT(1, ilevel); ASN__CALLBACK3("<", 1, mname, mlen, ">", 1); /* Print the member itself */ tmper = elm->type->op->xer_encoder(elm->type, memb_ptr, ilevel + 1, flags, cb, app_key); if(tmp_def_val) { ASN_STRUCT_FREE(*tmp_def_val_td, tmp_def_val); tmp_def_val = 0; } if(tmper.encoded == -1) return tmper; er.encoded += tmper.encoded; ASN__CALLBACK3("", 1); } if(!xcan) ASN__TEXT_INDENT(1, ilevel - 1); ASN__ENCODED_OK(er); cb_failed: if(tmp_def_val) ASN_STRUCT_FREE(*tmp_def_val_td, tmp_def_val); ASN__ENCODE_FAILED; } int SEQUENCE_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { size_t edx; int ret; if(!sptr) return (cb("", 8, app_key) < 0) ? -1 : 0; /* Dump preamble */ if(cb(td->name, strlen(td->name), app_key) < 0 || cb(" ::= {", 6, app_key) < 0) return -1; for(edx = 0; edx < td->elements_count; edx++) { asn_TYPE_member_t *elm = &td->elements[edx]; const void *memb_ptr; if(elm->flags & ATF_POINTER) { memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); if(!memb_ptr) { if(elm->optional) continue; /* Print line */ /* Fall through */ } } else { memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); } /* Indentation */ _i_INDENT(1); /* Print the member's name and stuff */ if(cb(elm->name, strlen(elm->name), app_key) < 0 || cb(": ", 2, app_key) < 0) return -1; /* Print the member itself */ ret = elm->type->op->print_struct(elm->type, memb_ptr, ilevel + 1, cb, app_key); if(ret) return ret; } ilevel--; _i_INDENT(1); return (cb("}", 1, app_key) < 0) ? -1 : 0; } void SEQUENCE_free(const asn_TYPE_descriptor_t *td, void *sptr, enum asn_struct_free_method method) { size_t edx; const asn_SEQUENCE_specifics_t *specs = (const asn_SEQUENCE_specifics_t *)td->specifics; asn_struct_ctx_t *ctx; /* Decoder context */ if(!td || !sptr) return; ASN_DEBUG("Freeing %s as SEQUENCE", td->name); for(edx = 0; edx < td->elements_count; edx++) { asn_TYPE_member_t *elm = &td->elements[edx]; void *memb_ptr; if(elm->flags & ATF_POINTER) { memb_ptr = *(void **)((char *)sptr + elm->memb_offset); if(memb_ptr) ASN_STRUCT_FREE(*elm->type, memb_ptr); } else { memb_ptr = (void *)((char *)sptr + elm->memb_offset); ASN_STRUCT_FREE_CONTENTS_ONLY(*elm->type, memb_ptr); } } /* Clean parsing context */ ctx = (asn_struct_ctx_t *)((char *)sptr + specs->ctx_offset); FREEMEM(ctx->ptr); switch(method) { case ASFM_FREE_EVERYTHING: FREEMEM(sptr); break; case ASFM_FREE_UNDERLYING: break; case ASFM_FREE_UNDERLYING_AND_RESET: memset( sptr, 0, ((const asn_SEQUENCE_specifics_t *)(td->specifics))->struct_size); break; } } int SEQUENCE_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { size_t edx; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } /* * Iterate over structure members and check their validity. */ for(edx = 0; edx < td->elements_count; edx++) { asn_TYPE_member_t *elm = &td->elements[edx]; const void *memb_ptr; if(elm->flags & ATF_POINTER) { memb_ptr = *(const void * const *)((const char *)sptr + elm->memb_offset); if(!memb_ptr) { if(elm->optional) continue; ASN__CTFAIL(app_key, td, sptr, "%s: mandatory element %s absent (%s:%d)", td->name, elm->name, __FILE__, __LINE__); return -1; } } else { memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); } if(elm->encoding_constraints.general_constraints) { int ret = elm->encoding_constraints.general_constraints(elm->type, memb_ptr, ctfailcb, app_key); if(ret) return ret; } else { return elm->type->encoding_constraints.general_constraints(elm->type, memb_ptr, ctfailcb, app_key); } } return 0; } #ifndef ASN_DISABLE_PER_SUPPORT asn_dec_rval_t SEQUENCE_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { const asn_SEQUENCE_specifics_t *specs = (const asn_SEQUENCE_specifics_t *)td->specifics; void *st = *sptr; /* Target structure. */ int extpresent; /* Extension additions are present */ uint8_t *opres; /* Presence of optional root members */ asn_per_data_t opmd; asn_dec_rval_t rv; size_t edx; (void)constraints; if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) ASN__DECODE_FAILED; if(!st) { st = *sptr = CALLOC(1, specs->struct_size); if(!st) ASN__DECODE_FAILED; } ASN_DEBUG("Decoding %s as SEQUENCE (UPER)", td->name); /* Handle extensions */ if(specs->first_extension < 0) { extpresent = 0; } else { extpresent = per_get_few_bits(pd, 1); if(extpresent < 0) ASN__DECODE_STARVED; } /* Prepare a place and read-in the presence bitmap */ memset(&opmd, 0, sizeof(opmd)); if(specs->roms_count) { opres = (uint8_t *)MALLOC(((specs->roms_count + 7) >> 3) + 1); if(!opres) ASN__DECODE_FAILED; /* Get the presence map */ if(per_get_many_bits(pd, opres, 0, specs->roms_count)) { FREEMEM(opres); ASN__DECODE_STARVED; } opmd.buffer = opres; opmd.nbits = specs->roms_count; ASN_DEBUG("Read in presence bitmap for %s of %d bits (%x..)", td->name, specs->roms_count, *opres); } else { opres = 0; } /* * Get the sequence ROOT elements. */ for(edx = 0; edx < (specs->first_extension < 0 ? td->elements_count : (size_t)specs->first_extension); edx++) { asn_TYPE_member_t *elm = &td->elements[edx]; void *memb_ptr; /* Pointer to the member */ void **memb_ptr2; /* Pointer to that pointer */ assert(!IN_EXTENSION_GROUP(specs, edx)); /* Fetch the pointer to this member */ if(elm->flags & ATF_POINTER) { memb_ptr2 = (void **)((char *)st + elm->memb_offset); } else { memb_ptr = (char *)st + elm->memb_offset; memb_ptr2 = &memb_ptr; } /* Deal with optionality */ if(elm->optional) { int present = per_get_few_bits(&opmd, 1); ASN_DEBUG("Member %s->%s is optional, p=%d (%d->%d)", td->name, elm->name, present, (int)opmd.nboff, (int)opmd.nbits); if(present == 0) { /* This element is not present */ if(elm->default_value_set) { /* Fill-in DEFAULT */ if(elm->default_value_set(memb_ptr2)) { FREEMEM(opres); ASN__DECODE_FAILED; } ASN_DEBUG("Filled-in default"); } /* The member is just not present */ continue; } /* Fall through */ } /* Fetch the member from the stream */ ASN_DEBUG("Decoding member \"%s\" in %s", elm->name, td->name); if(elm->flags & ATF_OPEN_TYPE) { rv = OPEN_TYPE_uper_get(opt_codec_ctx, td, st, elm, pd); } else { rv = elm->type->op->uper_decoder(opt_codec_ctx, elm->type, elm->encoding_constraints.per_constraints, memb_ptr2, pd); } if(rv.code != RC_OK) { ASN_DEBUG("Failed decode %s in %s", elm->name, td->name); FREEMEM(opres); return rv; } } /* Optionality map is not needed anymore */ FREEMEM(opres); /* * Deal with extensions. */ if(extpresent) { ssize_t bmlength; uint8_t *epres; /* Presence of extension members */ asn_per_data_t epmd; bmlength = uper_get_nslength(pd); if(bmlength < 0) ASN__DECODE_STARVED; ASN_DEBUG("Extensions %" ASN_PRI_SSIZE " present in %s", bmlength, td->name); epres = (uint8_t *)MALLOC((bmlength + 15) >> 3); if(!epres) ASN__DECODE_STARVED; /* Get the extensions map */ if(per_get_many_bits(pd, epres, 0, bmlength)) { FREEMEM(epres); ASN__DECODE_STARVED; } memset(&epmd, 0, sizeof(epmd)); epmd.buffer = epres; epmd.nbits = bmlength; ASN_DEBUG("Read in extensions bitmap for %s of %ld bits (%x..)", td->name, (long)bmlength, *epres); /* Go over extensions and read them in */ for(edx = specs->first_extension; edx < td->elements_count; edx++) { asn_TYPE_member_t *elm = &td->elements[edx]; void *memb_ptr; /* Pointer to the member */ void **memb_ptr2; /* Pointer to that pointer */ int present; /* Fetch the pointer to this member */ if(elm->flags & ATF_POINTER) { memb_ptr2 = (void **)((char *)st + elm->memb_offset); } else { memb_ptr = (void *)((char *)st + elm->memb_offset); memb_ptr2 = &memb_ptr; } present = per_get_few_bits(&epmd, 1); if(present <= 0) { if(present < 0) break; /* No more extensions */ continue; } ASN_DEBUG("Decoding member %s in %s %p", elm->name, td->name, *memb_ptr2); rv = uper_open_type_get(opt_codec_ctx, elm->type, elm->encoding_constraints.per_constraints, memb_ptr2, pd); if(rv.code != RC_OK) { FREEMEM(epres); return rv; } } /* Skip over overflow extensions which aren't present * in this system's version of the protocol */ for(;;) { ASN_DEBUG("Getting overflow extensions"); switch(per_get_few_bits(&epmd, 1)) { case -1: break; case 0: continue; default: if(uper_open_type_skip(opt_codec_ctx, pd)) { FREEMEM(epres); ASN__DECODE_STARVED; } ASN_DEBUG("Skipped overflow extension"); continue; } break; } FREEMEM(epres); } if(specs->first_extension >= 0) { unsigned i; /* Fill DEFAULT members in extensions */ for(i = specs->roms_count; i < specs->roms_count + specs->aoms_count; i++) { asn_TYPE_member_t *elm; void **memb_ptr2; /* Pointer to member pointer */ edx = specs->oms[i]; elm = &td->elements[edx]; if(!elm->default_value_set) continue; /* Fetch the pointer to this member */ if(elm->flags & ATF_POINTER) { memb_ptr2 = (void **)((char *)st + elm->memb_offset); if(*memb_ptr2) continue; } else { continue; /* Extensions are all optionals */ } /* Set default value */ if(elm->default_value_set(memb_ptr2)) { ASN__DECODE_FAILED; } } } rv.consumed = 0; rv.code = RC_OK; return rv; } static int SEQUENCE__handle_extensions(const asn_TYPE_descriptor_t *td, const void *sptr, asn_per_outp_t *po1, asn_per_outp_t *po2) { const asn_SEQUENCE_specifics_t *specs = (const asn_SEQUENCE_specifics_t *)td->specifics; int exts_present = 0; int exts_count = 0; size_t edx; if(specs->first_extension < 0) { return 0; } /* Find out which extensions are present */ for(edx = specs->first_extension; edx < td->elements_count; edx++) { asn_TYPE_member_t *elm = &td->elements[edx]; const void *memb_ptr; /* Pointer to the member */ const void *const *memb_ptr2; /* Pointer to that pointer */ int present; /* Fetch the pointer to this member */ if(elm->flags & ATF_POINTER) { memb_ptr2 = (const void *const *)((const char *)sptr + elm->memb_offset); present = (*memb_ptr2 != 0); } else { memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); memb_ptr2 = &memb_ptr; present = 1; } ASN_DEBUG("checking %s:%s (@%" ASN_PRI_SIZE ") present => %d", elm->name, elm->type->name, edx, present); exts_count++; exts_present += present; /* Encode as presence marker */ if(po1 && per_put_few_bits(po1, present, 1)) { return -1; } /* Encode as open type field */ if(po2 && present && uper_open_type_put(elm->type, elm->encoding_constraints.per_constraints, *memb_ptr2, po2)) return -1; } return exts_present ? exts_count : 0; } asn_enc_rval_t SEQUENCE_encode_uper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { const asn_SEQUENCE_specifics_t *specs = (const asn_SEQUENCE_specifics_t *)td->specifics; asn_enc_rval_t er; int n_extensions; size_t edx; size_t i; (void)constraints; if(!sptr) ASN__ENCODE_FAILED; er.encoded = 0; ASN_DEBUG("Encoding %s as SEQUENCE (UPER)", td->name); /* * X.691#18.1 Whether structure is extensible * and whether to encode extensions */ if(specs->first_extension < 0) { n_extensions = 0; /* There are no extensions to encode */ } else { n_extensions = SEQUENCE__handle_extensions(td, sptr, 0, 0); if(n_extensions < 0) ASN__ENCODE_FAILED; if(per_put_few_bits(po, n_extensions ? 1 : 0, 1)) { ASN__ENCODE_FAILED; } } /* Encode a presence bitmap */ for(i = 0; i < specs->roms_count; i++) { asn_TYPE_member_t *elm; const void *memb_ptr; /* Pointer to the member */ const void *const *memb_ptr2; /* Pointer to that pointer */ int present; edx = specs->oms[i]; elm = &td->elements[edx]; /* Fetch the pointer to this member */ if(elm->flags & ATF_POINTER) { memb_ptr2 = (const void *const *)((const char *)sptr + elm->memb_offset); present = (*memb_ptr2 != 0); } else { memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); memb_ptr2 = &memb_ptr; present = 1; } /* Eliminate default values */ if(present && elm->default_value_cmp && elm->default_value_cmp(*memb_ptr2) == 0) present = 0; ASN_DEBUG("Element %s %s %s->%s is %s", elm->flags & ATF_POINTER ? "ptr" : "inline", elm->default_value_cmp ? "def" : "wtv", td->name, elm->name, present ? "present" : "absent"); if(per_put_few_bits(po, present, 1)) ASN__ENCODE_FAILED; } /* * Encode the sequence ROOT elements. */ ASN_DEBUG("first_extension = %d, elements = %d", specs->first_extension, td->elements_count); for(edx = 0; edx < ((specs->first_extension < 0) ? td->elements_count : (size_t)specs->first_extension); edx++) { asn_TYPE_member_t *elm = &td->elements[edx]; const void *memb_ptr; /* Pointer to the member */ const void *const *memb_ptr2; /* Pointer to that pointer */ ASN_DEBUG("About to encode %s", elm->type->name); /* Fetch the pointer to this member */ if(elm->flags & ATF_POINTER) { memb_ptr2 = (const void *const *)((const char *)sptr + elm->memb_offset); if(!*memb_ptr2) { ASN_DEBUG("Element %s %" ASN_PRI_SIZE " not present", elm->name, edx); if(elm->optional) continue; /* Mandatory element is missing */ ASN__ENCODE_FAILED; } } else { memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); memb_ptr2 = &memb_ptr; } /* Eliminate default values */ if(elm->default_value_cmp && elm->default_value_cmp(*memb_ptr2) == 0) continue; ASN_DEBUG("Encoding %s->%s:%s", td->name, elm->name, elm->type->name); er = elm->type->op->uper_encoder( elm->type, elm->encoding_constraints.per_constraints, *memb_ptr2, po); if(er.encoded == -1) return er; } /* No extensions to encode */ if(!n_extensions) ASN__ENCODED_OK(er); ASN_DEBUG("Length of extensions %d bit-map", n_extensions); /* #18.8. Write down the presence bit-map length. */ if(uper_put_nslength(po, n_extensions)) ASN__ENCODE_FAILED; ASN_DEBUG("Bit-map of %d elements", n_extensions); /* #18.7. Encoding the extensions presence bit-map. */ /* TODO: act upon NOTE in #18.7 for canonical PER */ if(SEQUENCE__handle_extensions(td, sptr, po, 0) != n_extensions) ASN__ENCODE_FAILED; ASN_DEBUG("Writing %d extensions", n_extensions); /* #18.9. Encode extensions as open type fields. */ if(SEQUENCE__handle_extensions(td, sptr, 0, po) != n_extensions) ASN__ENCODE_FAILED; ASN__ENCODED_OK(er); } asn_dec_rval_t SEQUENCE_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { const asn_SEQUENCE_specifics_t *specs = (const asn_SEQUENCE_specifics_t *)td->specifics; void *st = *sptr; /* Target structure. */ int extpresent; /* Extension additions are present */ uint8_t *opres; /* Presence of optional root members */ asn_per_data_t opmd; asn_dec_rval_t rv; size_t edx; (void)constraints; if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) ASN__DECODE_FAILED; if(!st) { st = *sptr = CALLOC(1, specs->struct_size); if(!st) ASN__DECODE_FAILED; } ASN_DEBUG("Decoding %s as SEQUENCE (APER)", td->name); /* Handle extensions */ if(specs->first_extension < 0) { extpresent = 0; } else { extpresent = per_get_few_bits(pd, 1); if(extpresent < 0) ASN__DECODE_STARVED; } /* Prepare a place and read-in the presence bitmap */ memset(&opmd, 0, sizeof(opmd)); if(specs->roms_count) { opres = (uint8_t *)MALLOC(((specs->roms_count + 7) >> 3) + 1); if(!opres) ASN__DECODE_FAILED; /* Get the presence map */ if(per_get_many_bits(pd, opres, 0, specs->roms_count)) { FREEMEM(opres); ASN__DECODE_STARVED; } opmd.buffer = opres; opmd.nbits = specs->roms_count; ASN_DEBUG("Read in presence bitmap for %s of %d bits (%x..)", td->name, specs->roms_count, *opres); } else { opres = 0; } /* * Get the sequence ROOT elements. */ for(edx = 0; edx < td->elements_count; edx++) { asn_TYPE_member_t *elm = &td->elements[edx]; void *memb_ptr; /* Pointer to the member */ void **memb_ptr2; /* Pointer to that pointer */ #if 0 int padding; #endif if(IN_EXTENSION_GROUP(specs, edx)) continue; /* Fetch the pointer to this member */ if(elm->flags & ATF_POINTER) { memb_ptr2 = (void **)((char *)st + elm->memb_offset); } else { memb_ptr = (char *)st + elm->memb_offset; memb_ptr2 = &memb_ptr; } #if 0 /* Get Padding */ padding = (8 - (pd->moved % 8)) % 8; if(padding > 0) ASN_DEBUG("For element %s,offset= %ld Padding bits = %d", td->name, pd->moved, padding); #if 0 /* old way of removing padding */ per_get_few_bits(pd, padding); #else /* Experimental fix proposed by @mhanna123 */ if(edx != (td->elements_count-1)) per_get_few_bits(pd, padding); else { if(specs->roms_count && (padding > 0)) ASN_DEBUG(">>>>> not skipping padding of %d bits for element:%ld out of %d", padding, edx, td->elements_count); else per_get_few_bits(pd, padding); } #endif /* dealing with padding */ #endif /* Deal with optionality */ if(elm->optional) { int present = per_get_few_bits(&opmd, 1); ASN_DEBUG("Member %s->%s is optional, p=%d (%d->%d)", td->name, elm->name, present, (int)opmd.nboff, (int)opmd.nbits); if(present == 0) { /* This element is not present */ if(elm->default_value_set) { /* Fill-in DEFAULT */ if(elm->default_value_set(memb_ptr2)) { FREEMEM(opres); ASN__DECODE_FAILED; } ASN_DEBUG("Filled-in default"); } /* The member is just not present */ continue; } /* Fall through */ } /* Fetch the member from the stream */ ASN_DEBUG("Decoding member \"%s\" in %s", elm->name, td->name); if(elm->flags & ATF_OPEN_TYPE) { rv = OPEN_TYPE_aper_get(opt_codec_ctx, td, st, elm, pd); } else { rv = elm->type->op->aper_decoder(opt_codec_ctx, elm->type, elm->encoding_constraints.per_constraints, memb_ptr2, pd); } if(rv.code != RC_OK) { ASN_DEBUG("Failed decode %s in %s", elm->name, td->name); FREEMEM(opres); return rv; } } /* Optionality map is not needed anymore */ FREEMEM(opres); /* * Deal with extensions. */ if(extpresent) { ssize_t bmlength; uint8_t *epres; /* Presence of extension members */ asn_per_data_t epmd; bmlength = aper_get_nslength(pd); if(bmlength < 0) ASN__DECODE_STARVED; ASN_DEBUG("Extensions %" ASN_PRI_SSIZE " present in %s", bmlength, td->name); epres = (uint8_t *)MALLOC((bmlength + 15) >> 3); if(!epres) ASN__DECODE_STARVED; /* Get the extensions map */ if(per_get_many_bits(pd, epres, 0, bmlength)) ASN__DECODE_STARVED; memset(&epmd, 0, sizeof(epmd)); epmd.buffer = epres; epmd.nbits = bmlength; ASN_DEBUG("Read in extensions bitmap for %s of %ld bits (%x..)", td->name, bmlength, *epres); /* Go over extensions and read them in */ for(edx = specs->first_extension; edx < td->elements_count; edx++) { asn_TYPE_member_t *elm = &td->elements[edx]; void *memb_ptr; /* Pointer to the member */ void **memb_ptr2; /* Pointer to that pointer */ int present; if(!IN_EXTENSION_GROUP(specs, edx)) { ASN_DEBUG("%ld is not extension", edx); continue; } /* Fetch the pointer to this member */ if(elm->flags & ATF_POINTER) { memb_ptr2 = (void **)((char *)st + elm->memb_offset); } else { memb_ptr = (void *)((char *)st + elm->memb_offset); memb_ptr2 = &memb_ptr; } present = per_get_few_bits(&epmd, 1); if(present <= 0) { if(present < 0) break; /* No more extensions */ continue; } ASN_DEBUG("Decoding member %s in %s %p", elm->name, td->name, *memb_ptr2); rv = aper_open_type_get(opt_codec_ctx, elm->type, elm->encoding_constraints.per_constraints, memb_ptr2, pd); if(rv.code != RC_OK) { FREEMEM(epres); return rv; } } /* Skip over overflow extensions which aren't present * in this system's version of the protocol */ for(;;) { ASN_DEBUG("Getting overflow extensions"); switch(per_get_few_bits(&epmd, 1)) { case -1: break; case 0: continue; default: if(aper_open_type_skip(opt_codec_ctx, pd)) { FREEMEM(epres); ASN__DECODE_STARVED; } } break; } FREEMEM(epres); } /* Fill DEFAULT members in extensions */ for(edx = specs->roms_count; edx < specs->roms_count + specs->aoms_count; edx++) { asn_TYPE_member_t *elm = &td->elements[edx]; void **memb_ptr2; /* Pointer to member pointer */ if(!elm->default_value_set) continue; /* Fetch the pointer to this member */ if(elm->flags & ATF_POINTER) { memb_ptr2 = (void **)((char *)st + elm->memb_offset); if(*memb_ptr2) continue; } else { continue; /* Extensions are all optionals */ } /* Set default value */ if(elm->default_value_set(memb_ptr2)) { ASN__DECODE_FAILED; } } rv.consumed = 0; rv.code = RC_OK; return rv; } static int SEQUENCE_handle_extensions_aper(const asn_TYPE_descriptor_t *td, const void *sptr, asn_per_outp_t *po1, asn_per_outp_t *po2) { const asn_SEQUENCE_specifics_t *specs = (const asn_SEQUENCE_specifics_t *)td->specifics; int exts_present = 0; int exts_count = 0; size_t edx; if(specs->first_extension < 0) { return 0; } /* Find out which extensions are present */ for(edx = specs->first_extension; edx < td->elements_count; edx++) { asn_TYPE_member_t *elm = &td->elements[edx]; const void *memb_ptr; /* Pointer to the member */ const void * const *memb_ptr2; /* Pointer to that pointer */ int present; if(!IN_EXTENSION_GROUP(specs, edx)) { ASN_DEBUG("%s (@%ld) is not extension", elm->type->name, edx); continue; } /* Fetch the pointer to this member */ if(elm->flags & ATF_POINTER) { memb_ptr2 = (const void * const *)((const char *)sptr + elm->memb_offset); present = (*memb_ptr2 != 0); } else { memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); memb_ptr2 = &memb_ptr; present = 1; } ASN_DEBUG("checking %s (@%ld) present => %d", elm->type->name, edx, present); exts_count++; exts_present += present; /* Encode as presence marker */ if(po1 && per_put_few_bits(po1, present, 1)) return -1; /* Encode as open type field */ if(po2 && present && aper_open_type_put(elm->type, elm->encoding_constraints.per_constraints, *memb_ptr2, po2)) return -1; } return exts_present ? exts_count : 0; } asn_enc_rval_t SEQUENCE_encode_aper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { const asn_SEQUENCE_specifics_t *specs = (const asn_SEQUENCE_specifics_t *)td->specifics; asn_enc_rval_t er; int n_extensions; size_t edx; size_t i; (void)constraints; if(!sptr) ASN__ENCODE_FAILED; er.encoded = 0; ASN_DEBUG("Encoding %s as SEQUENCE (APER)", td->name); /* * X.691#18.1 Whether structure is extensible * and whether to encode extensions */ if(specs->first_extension < 0) { n_extensions = 0; /* There are no extensions to encode */ } else { n_extensions = SEQUENCE_handle_extensions_aper(td, sptr, 0, 0); if(n_extensions < 0) ASN__ENCODE_FAILED; if(per_put_few_bits(po, n_extensions ? 1 : 0, 1)) { ASN__ENCODE_FAILED; } } /* Encode a presence bitmap */ for(i = 0; i < specs->roms_count; i++) { asn_TYPE_member_t *elm; const void *memb_ptr; /* Pointer to the member */ const void * const *memb_ptr2; /* Pointer to that pointer */ int present; edx = specs->oms[i]; elm = &td->elements[edx]; /* Fetch the pointer to this member */ if(elm->flags & ATF_POINTER) { memb_ptr2 = (const void * const *)((const char *)sptr + elm->memb_offset); present = (*memb_ptr2 != 0); } else { memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); memb_ptr2 = &memb_ptr; present = 1; } /* Eliminate default values */ if(present && elm->default_value_cmp && elm->default_value_cmp(memb_ptr2) == 1) present = 0; ASN_DEBUG("Element %s %s %s->%s is %s", elm->flags & ATF_POINTER ? "ptr" : "inline", elm->default_value_cmp ? "def" : "wtv", td->name, elm->name, present ? "present" : "absent"); if(per_put_few_bits(po, present, 1)) ASN__ENCODE_FAILED; } /* * Encode the sequence ROOT elements. */ ASN_DEBUG("first_extension = %d, elements = %d", specs->first_extension, td->elements_count); for(edx = 0; edx < ((specs->first_extension < 0) ? td->elements_count : (size_t)specs->first_extension); edx++) { asn_TYPE_member_t *elm = &td->elements[edx]; const void *memb_ptr; /* Pointer to the member */ const void * const *memb_ptr2; /* Pointer to that pointer */ if(IN_EXTENSION_GROUP(specs, edx)) continue; ASN_DEBUG("About to encode %s", elm->type->name); /* Fetch the pointer to this member */ if(elm->flags & ATF_POINTER) { memb_ptr2 = (const void * const *)((const char *)sptr + elm->memb_offset); if(!*memb_ptr2) { ASN_DEBUG("Element %s %ld not present", elm->name, edx); if(elm->optional) continue; /* Mandatory element is missing */ ASN__ENCODE_FAILED; } } else { memb_ptr = (const void *)((const char *)sptr + elm->memb_offset); memb_ptr2 = &memb_ptr; } /* Eliminate default values */ if(elm->default_value_cmp && elm->default_value_cmp(memb_ptr2) == 1) continue; ASN_DEBUG("Encoding %s->%s", td->name, elm->name); er = elm->type->op->aper_encoder(elm->type, elm->encoding_constraints.per_constraints, *memb_ptr2, po); if(er.encoded == -1) return er; } /* No extensions to encode */ if(!n_extensions) ASN__ENCODED_OK(er); ASN_DEBUG("Length of %d bit-map", n_extensions); /* #18.8. Write down the presence bit-map length. */ if(aper_put_nslength(po, n_extensions)) ASN__ENCODE_FAILED; ASN_DEBUG("Bit-map of %d elements", n_extensions); /* #18.7. Encoding the extensions presence bit-map. */ /* TODO: act upon NOTE in #18.7 for canonical PER */ if(SEQUENCE_handle_extensions_aper(td, sptr, po, 0) != n_extensions) ASN__ENCODE_FAILED; ASN_DEBUG("Writing %d extensions", n_extensions); /* #18.9. Encode extensions as open type fields. */ if(SEQUENCE_handle_extensions_aper(td, sptr, 0, po) != n_extensions) ASN__ENCODE_FAILED; ASN__ENCODED_OK(er); } #endif /* ASN_DISABLE_PER_SUPPORT */ int SEQUENCE_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const void *bptr) { size_t edx; for(edx = 0; edx < td->elements_count; edx++) { asn_TYPE_member_t *elm = &td->elements[edx]; const void *amemb; const void *bmemb; int ret; if(elm->flags & ATF_POINTER) { amemb = *(const void *const *)((const char *)aptr + elm->memb_offset); bmemb = *(const void *const *)((const char *)bptr + elm->memb_offset); if(!amemb) { if(!bmemb) continue; if(elm->default_value_cmp && elm->default_value_cmp(bmemb) == 0) { /* A is absent, but B is present and equal to DEFAULT */ continue; } return -1; } else if(!bmemb) { if(elm->default_value_cmp && elm->default_value_cmp(amemb) == 0) { /* B is absent, but A is present and equal to DEFAULT */ continue; } return 1; } } else { amemb = (const void *)((const char *)aptr + elm->memb_offset); bmemb = (const void *)((const char *)bptr + elm->memb_offset); } ret = elm->type->op->compare_struct(elm->type, amemb, bmemb); if(ret != 0) return ret; } return 0; } asn_TYPE_operation_t asn_OP_SEQUENCE = { SEQUENCE_free, SEQUENCE_print, SEQUENCE_compare, SEQUENCE_decode_ber, SEQUENCE_encode_der, SEQUENCE_decode_xer, SEQUENCE_encode_xer, #ifdef ASN_DISABLE_OER_SUPPORT 0, 0, #else SEQUENCE_decode_oer, SEQUENCE_encode_oer, #endif /* ASN_DISABLE_OER_SUPPORT */ #ifdef ASN_DISABLE_PER_SUPPORT 0, 0, 0, 0, #else SEQUENCE_decode_uper, SEQUENCE_encode_uper, SEQUENCE_decode_aper, SEQUENCE_encode_aper, #endif /* ASN_DISABLE_PER_SUPPORT */ SEQUENCE_random_fill, 0 /* Use generic outmost tag fetcher */ }; asn_random_fill_result_t SEQUENCE_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, const asn_encoding_constraints_t *constr, size_t max_length) { const asn_SEQUENCE_specifics_t *specs = (const asn_SEQUENCE_specifics_t *)td->specifics; asn_random_fill_result_t result_ok = {ARFILL_OK, 0}; asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; void *st = *sptr; size_t edx; if(max_length == 0) return result_skipped; (void)constr; if(st == NULL) { st = CALLOC(1, specs->struct_size); if(st == NULL) { return result_failed; } } for(edx = 0; edx < td->elements_count; edx++) { const asn_TYPE_member_t *elm = &td->elements[edx]; void *memb_ptr; /* Pointer to the member */ void **memb_ptr2; /* Pointer to that pointer */ asn_random_fill_result_t tmpres; if(elm->optional && asn_random_between(0, 4) == 2) { /* Sometimes decide not to fill the optional value */ continue; } if(elm->flags & ATF_POINTER) { /* Member is a pointer to another structure */ memb_ptr2 = (void **)((char *)st + elm->memb_offset); } else { memb_ptr = (char *)st + elm->memb_offset; memb_ptr2 = &memb_ptr; } tmpres = elm->type->op->random_fill( elm->type, memb_ptr2, &elm->encoding_constraints, max_length > result_ok.length ? max_length - result_ok.length : 0); switch(tmpres.code) { case ARFILL_OK: result_ok.length += tmpres.length; continue; case ARFILL_SKIPPED: assert(!(elm->flags & ATF_POINTER) || *memb_ptr2 == NULL); continue; case ARFILL_FAILED: if(st == *sptr) { ASN_STRUCT_RESET(*td, st); } else { ASN_STRUCT_FREE(*td, st); } return tmpres; } } *sptr = st; return result_ok; } nextepc-0.3.10/lib/s1ap/asn1c/constr_SEQUENCE.h000066400000000000000000000036311333553357400206470ustar00rootroot00000000000000/*- * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _CONSTR_SEQUENCE_H_ #define _CONSTR_SEQUENCE_H_ #include #ifdef __cplusplus extern "C" { #endif typedef struct asn_SEQUENCE_specifics_s { /* * Target structure description. */ unsigned struct_size; /* Size of the target structure. */ unsigned ctx_offset; /* Offset of the asn_struct_ctx_t member */ /* * Tags to members mapping table (sorted). */ const asn_TYPE_tag2member_t *tag2el; unsigned tag2el_count; /* * Optional members of the extensions root (roms) or additions (aoms). * Meaningful for PER. */ const int *oms; /* Optional MemberS */ unsigned roms_count; /* Root optional members count */ unsigned aoms_count; /* Additions optional members count */ /* * Description of an extensions group. * Root components are clustered at the beginning of the structure, * whereas extensions are clustered at the end. -1 means not extensible. */ signed first_extension; /* First extension addition */ } asn_SEQUENCE_specifics_t; /* * A set specialized functions dealing with the SEQUENCE type. */ asn_struct_free_f SEQUENCE_free; asn_struct_print_f SEQUENCE_print; asn_struct_compare_f SEQUENCE_compare; asn_constr_check_f SEQUENCE_constraint; ber_type_decoder_f SEQUENCE_decode_ber; der_type_encoder_f SEQUENCE_encode_der; xer_type_decoder_f SEQUENCE_decode_xer; xer_type_encoder_f SEQUENCE_encode_xer; oer_type_decoder_f SEQUENCE_decode_oer; oer_type_encoder_f SEQUENCE_encode_oer; per_type_decoder_f SEQUENCE_decode_uper; per_type_encoder_f SEQUENCE_encode_uper; per_type_decoder_f SEQUENCE_decode_aper; per_type_encoder_f SEQUENCE_encode_aper; asn_random_fill_f SEQUENCE_random_fill; extern asn_TYPE_operation_t asn_OP_SEQUENCE; #ifdef __cplusplus } #endif #endif /* _CONSTR_SEQUENCE_H_ */ nextepc-0.3.10/lib/s1ap/asn1c/constr_SEQUENCE_OF.c000066400000000000000000000242551333553357400212330ustar00rootroot00000000000000/*- * Copyright (c) 2003, 2004, 2006 Lev Walkin . * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include /* * The DER encoder of the SEQUENCE OF type. */ asn_enc_rval_t SEQUENCE_OF_encode_der(const asn_TYPE_descriptor_t *td, const void *ptr, int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key) { asn_TYPE_member_t *elm = td->elements; const asn_anonymous_sequence_ *list = _A_CSEQUENCE_FROM_VOID(ptr); size_t computed_size = 0; ssize_t encoding_size = 0; asn_enc_rval_t erval; int edx; ASN_DEBUG("Estimating size of SEQUENCE OF %s", td->name); /* * Gather the length of the underlying members sequence. */ for(edx = 0; edx < list->count; edx++) { void *memb_ptr = list->array[edx]; if(!memb_ptr) continue; erval = elm->type->op->der_encoder(elm->type, memb_ptr, 0, elm->tag, 0, 0); if(erval.encoded == -1) return erval; computed_size += erval.encoded; } /* * Encode the TLV for the sequence itself. */ encoding_size = der_write_tags(td, computed_size, tag_mode, 1, tag, cb, app_key); if(encoding_size == -1) { erval.encoded = -1; erval.failed_type = td; erval.structure_ptr = ptr; return erval; } computed_size += encoding_size; if(!cb) { erval.encoded = computed_size; ASN__ENCODED_OK(erval); } ASN_DEBUG("Encoding members of SEQUENCE OF %s", td->name); /* * Encode all members. */ for(edx = 0; edx < list->count; edx++) { void *memb_ptr = list->array[edx]; if(!memb_ptr) continue; erval = elm->type->op->der_encoder(elm->type, memb_ptr, 0, elm->tag, cb, app_key); if(erval.encoded == -1) return erval; encoding_size += erval.encoded; } if(computed_size != (size_t)encoding_size) { /* * Encoded size is not equal to the computed size. */ erval.encoded = -1; erval.failed_type = td; erval.structure_ptr = ptr; } else { erval.encoded = computed_size; erval.structure_ptr = 0; erval.failed_type = 0; } return erval; } asn_enc_rval_t SEQUENCE_OF_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, void *app_key) { asn_enc_rval_t er; const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics; const asn_TYPE_member_t *elm = td->elements; const asn_anonymous_sequence_ *list = _A_CSEQUENCE_FROM_VOID(sptr); const char *mname = specs->as_XMLValueList ? 0 : ((*elm->name) ? elm->name : elm->type->xml_tag); size_t mlen = mname ? strlen(mname) : 0; int xcan = (flags & XER_F_CANONICAL); int i; if(!sptr) ASN__ENCODE_FAILED; er.encoded = 0; for(i = 0; i < list->count; i++) { asn_enc_rval_t tmper; void *memb_ptr = list->array[i]; if(!memb_ptr) continue; if(mname) { if(!xcan) ASN__TEXT_INDENT(1, ilevel); ASN__CALLBACK3("<", 1, mname, mlen, ">", 1); } tmper = elm->type->op->xer_encoder(elm->type, memb_ptr, ilevel + 1, flags, cb, app_key); if(tmper.encoded == -1) return tmper; er.encoded += tmper.encoded; if(tmper.encoded == 0 && specs->as_XMLValueList) { const char *name = elm->type->xml_tag; size_t len = strlen(name); if(!xcan) ASN__TEXT_INDENT(1, ilevel + 1); ASN__CALLBACK3("<", 1, name, len, "/>", 2); } if(mname) { ASN__CALLBACK3("", 1); } } if(!xcan) ASN__TEXT_INDENT(1, ilevel - 1); ASN__ENCODED_OK(er); cb_failed: ASN__ENCODE_FAILED; } #ifndef ASN_DISABLE_PER_SUPPORT asn_enc_rval_t SEQUENCE_OF_encode_uper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { const asn_anonymous_sequence_ *list; const asn_per_constraint_t *ct; asn_enc_rval_t er; const asn_TYPE_member_t *elm = td->elements; size_t encoded_edx; if(!sptr) ASN__ENCODE_FAILED; list = _A_CSEQUENCE_FROM_VOID(sptr); er.encoded = 0; ASN_DEBUG("Encoding %s as SEQUENCE OF (%d)", td->name, list->count); if(constraints) ct = &constraints->size; else if(td->encoding_constraints.per_constraints) ct = &td->encoding_constraints.per_constraints->size; else ct = 0; /* If extensible constraint, check if size is in root */ if(ct) { int not_in_root = (list->count < ct->lower_bound || list->count > ct->upper_bound); ASN_DEBUG("lb %ld ub %ld %s", ct->lower_bound, ct->upper_bound, ct->flags & APC_EXTENSIBLE ? "ext" : "fix"); if(ct->flags & APC_EXTENSIBLE) { /* Declare whether size is in extension root */ if(per_put_few_bits(po, not_in_root, 1)) ASN__ENCODE_FAILED; if(not_in_root) ct = 0; } else if(not_in_root && ct->effective_bits >= 0) { ASN__ENCODE_FAILED; } } if(ct && ct->effective_bits >= 0) { /* X.691, #19.5: No length determinant */ if(per_put_few_bits(po, list->count - ct->lower_bound, ct->effective_bits)) ASN__ENCODE_FAILED; } else if(list->count == 0) { /* When the list is empty add only the length determinant * X.691, #20.6 and #11.9.4.1 */ if (uper_put_length(po, 0, 0)) { ASN__ENCODE_FAILED; } ASN__ENCODED_OK(er); } for(encoded_edx = 0; (ssize_t)encoded_edx < list->count;) { ssize_t may_encode; size_t edx; int need_eom = 0; if(ct && ct->effective_bits >= 0) { may_encode = list->count; } else { may_encode = uper_put_length(po, list->count - encoded_edx, &need_eom); if(may_encode < 0) ASN__ENCODE_FAILED; } for(edx = encoded_edx; edx < encoded_edx + may_encode; edx++) { void *memb_ptr = list->array[edx]; if(!memb_ptr) ASN__ENCODE_FAILED; er = elm->type->op->uper_encoder( elm->type, elm->encoding_constraints.per_constraints, memb_ptr, po); if(er.encoded == -1) ASN__ENCODE_FAILED; } if(need_eom && uper_put_length(po, 0, 0)) ASN__ENCODE_FAILED; /* End of Message length */ encoded_edx += may_encode; } ASN__ENCODED_OK(er); } asn_enc_rval_t SEQUENCE_OF_encode_aper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { const asn_anonymous_sequence_ *list; const asn_per_constraint_t *ct; asn_enc_rval_t er; asn_TYPE_member_t *elm = td->elements; int seq; if(!sptr) ASN__ENCODE_FAILED; list = _A_CSEQUENCE_FROM_VOID(sptr); er.encoded = 0; ASN_DEBUG("Encoding %s as SEQUENCE OF size (%d) using ALIGNED PER", td->name, list->count); if(constraints) ct = &constraints->size; else if(td->encoding_constraints.per_constraints) ct = &td->encoding_constraints.per_constraints->size; else ct = 0; /* If extensible constraint, check if size is in root */ if(ct) { int not_in_root = (list->count < ct->lower_bound || list->count > ct->upper_bound); ASN_DEBUG("lb %ld ub %ld %s", ct->lower_bound, ct->upper_bound, ct->flags & APC_EXTENSIBLE ? "ext" : "fix"); if(ct->flags & APC_EXTENSIBLE) { /* Declare whether size is in extension root */ if(per_put_few_bits(po, not_in_root, 1)) ASN__ENCODE_FAILED; if(not_in_root) ct = 0; } else if(not_in_root && ct->effective_bits >= 0) ASN__ENCODE_FAILED; } if(ct && ct->effective_bits >= 0) { /* X.691, #19.5: No length determinant */ /* if(per_put_few_bits(po, list->count - ct->lower_bound, ct->effective_bits)) ASN__ENCODE_FAILED; */ if (aper_put_length(po, ct->upper_bound - ct->lower_bound + 1, list->count - ct->lower_bound) < 0) ASN__ENCODE_FAILED; } for(seq = -1; seq < list->count;) { ssize_t mayEncode; if(seq < 0) seq = 0; if(ct && ct->effective_bits >= 0) { mayEncode = list->count; } else { mayEncode = aper_put_length(po, -1, list->count - seq); if(mayEncode < 0) ASN__ENCODE_FAILED; } while(mayEncode--) { void *memb_ptr = list->array[seq++]; if(!memb_ptr) ASN__ENCODE_FAILED; er = elm->type->op->aper_encoder(elm->type, elm->encoding_constraints.per_constraints, memb_ptr, po); if(er.encoded == -1) ASN__ENCODE_FAILED; } } ASN__ENCODED_OK(er); } #endif /* ASN_DISABLE_PER_SUPPORT */ int SEQUENCE_OF_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const void *bptr) { const asn_anonymous_sequence_ *a = _A_CSEQUENCE_FROM_VOID(aptr); const asn_anonymous_sequence_ *b = _A_CSEQUENCE_FROM_VOID(bptr); ssize_t idx; if(a && b) { ssize_t common_length = (a->count < b->count ? a->count : b->count); for(idx = 0; idx < common_length; idx++) { int ret = td->elements->type->op->compare_struct( td->elements->type, a->array[idx], b->array[idx]); if(ret) return ret; } if(idx < b->count) /* more elements in b */ return -1; /* a is shorter, so put it first */ if(idx < a->count) return 1; } else if(!a) { return -1; } else if(!b) { return 1; } return 0; } asn_TYPE_operation_t asn_OP_SEQUENCE_OF = { SEQUENCE_OF_free, SEQUENCE_OF_print, SEQUENCE_OF_compare, SEQUENCE_OF_decode_ber, SEQUENCE_OF_encode_der, SEQUENCE_OF_decode_xer, SEQUENCE_OF_encode_xer, #ifdef ASN_DISABLE_OER_SUPPORT 0, 0, #else SEQUENCE_OF_decode_oer, /* Same as SET OF decoder. */ SEQUENCE_OF_encode_oer, /* Same as SET OF encoder */ #endif /* ASN_DISABLE_OER_SUPPORT */ #ifdef ASN_DISABLE_PER_SUPPORT 0, 0, 0, 0, #else SEQUENCE_OF_decode_uper, /* Same as SET OF decoder */ SEQUENCE_OF_encode_uper, SEQUENCE_OF_decode_aper, SEQUENCE_OF_encode_aper, #endif /* ASN_DISABLE_PER_SUPPORT */ SEQUENCE_OF_random_fill, 0 /* Use generic outmost tag fetcher */ }; nextepc-0.3.10/lib/s1ap/asn1c/constr_SEQUENCE_OF.h000066400000000000000000000023621333553357400212330ustar00rootroot00000000000000/*- * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _CONSTR_SEQUENCE_OF_H_ #define _CONSTR_SEQUENCE_OF_H_ #include #include /* Implemented using SET OF */ #ifdef __cplusplus extern "C" { #endif /* * A set specialized functions dealing with the SEQUENCE OF type. * Generally implemented using SET OF. */ asn_struct_compare_f SEQUENCE_OF_compare; der_type_encoder_f SEQUENCE_OF_encode_der; xer_type_encoder_f SEQUENCE_OF_encode_xer; per_type_encoder_f SEQUENCE_OF_encode_uper; per_type_encoder_f SEQUENCE_OF_encode_aper; extern asn_TYPE_operation_t asn_OP_SEQUENCE_OF; #define SEQUENCE_OF_free SET_OF_free #define SEQUENCE_OF_print SET_OF_print #define SEQUENCE_OF_constraint SET_OF_constraint #define SEQUENCE_OF_decode_ber SET_OF_decode_ber #define SEQUENCE_OF_decode_xer SET_OF_decode_xer #define SEQUENCE_OF_decode_oer SET_OF_decode_oer #define SEQUENCE_OF_encode_oer SET_OF_encode_oer #define SEQUENCE_OF_decode_uper SET_OF_decode_uper #define SEQUENCE_OF_decode_aper SET_OF_decode_aper #define SEQUENCE_OF_random_fill SET_OF_random_fill #ifdef __cplusplus } #endif #endif /* _CONSTR_SET_OF_H_ */ nextepc-0.3.10/lib/s1ap/asn1c/constr_SEQUENCE_oer.c000066400000000000000000000436511333553357400215150ustar00rootroot00000000000000/* * Copyright (c) 2017 Lev Walkin . * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef ASN_DISABLE_OER_SUPPORT #include #include #include #include /* * This macro "eats" the part of the buffer which is definitely "consumed", * i.e. was correctly converted into local representation or rightfully skipped. */ #undef ADVANCE #define ADVANCE(num_bytes) \ do { \ size_t num = num_bytes; \ ptr = ((const char *)ptr) + num; \ size -= num; \ consumed_myself += num; \ } while(0) /* * Switch to the next phase of parsing. */ #undef NEXT_PHASE #undef PHASE_OUT #define NEXT_PHASE(ctx) \ do { \ ctx->phase++; \ ctx->step = 0; \ } while(0) /* * Check whether we are inside the extensions group. */ #define IN_EXTENSION_GROUP(specs, memb_idx) \ ((specs)->first_extension >= 0 \ && (unsigned)(specs)->first_extension <= (memb_idx)) #define IN_ROOT_GROUP_PRED(edx) \ edx < (specs->first_extension < 0 ? td->elements_count \ : (size_t)specs->first_extension) #define FOR_IN_ROOT_GROUP(edx) for(edx = 0; IN_ROOT_GROUP_PRED(edx); edx++) /* * Return a standardized complex structure. */ #undef RETURN #define RETURN(_code) do { \ rval.code = _code; \ rval.consumed = consumed_myself;\ return rval; \ } while(0) /* * Return pointer to a member. */ static void ** element_ptrptr(void *struct_ptr, asn_TYPE_member_t *elm, void **tmp_save_ptr) { if(elm->flags & ATF_POINTER) { /* Member is a pointer to another structure */ return (void **)((char *)struct_ptr + elm->memb_offset); } else { assert(tmp_save_ptr); *tmp_save_ptr = (void *)((char *)struct_ptr + elm->memb_offset); return tmp_save_ptr; } } static const void * element_ptr(const void *struct_ptr, const asn_TYPE_member_t *elm) { if(elm->flags & ATF_POINTER) { /* Member is a pointer to another structure */ return *(const void *const *)((const char *)struct_ptr + elm->memb_offset); } else { return (const void *)((const char *)struct_ptr + elm->memb_offset); } } asn_dec_rval_t SEQUENCE_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_oer_constraints_t *constraints, void **struct_ptr, const void *ptr, size_t size) { const asn_SEQUENCE_specifics_t *specs = (const asn_SEQUENCE_specifics_t *)td->specifics; asn_dec_rval_t rval = {RC_OK, 0}; void *st = *struct_ptr; /* Target structure */ asn_struct_ctx_t *ctx; /* Decoder context */ size_t consumed_myself = 0; /* Consumed bytes from ptr. */ (void)constraints; if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) ASN__DECODE_FAILED; /* * Create the target structure if it is not present already. */ if(st == 0) { st = *struct_ptr = CALLOC(1, specs->struct_size); if(st == 0) { RETURN(RC_FAIL); } } /* * Restore parsing context. */ ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); /* * Start to parse where left previously. */ switch(ctx->phase) { case 0: { /* * Fetch preamble. */ asn_bit_data_t *preamble; int has_extensions_bit = (specs->first_extension >= 0); size_t preamble_bits = (has_extensions_bit + specs->roms_count); size_t preamble_bytes = ((7 + preamble_bits) >> 3); ASN_DEBUG("OER SEQUENCE %s Decoding PHASE 0", td->name); ASN_DEBUG( "Expecting preamble bits %" ASN_PRI_SIZE " for %s (including %d extension bits)", preamble_bits, td->name, has_extensions_bit); if(preamble_bytes > size) { ASN__DECODE_STARVED; } preamble = asn_bit_data_new_contiguous(ptr, preamble_bits); if(!preamble) { RETURN(RC_FAIL); } preamble->nboff = has_extensions_bit; ctx->ptr = preamble; ADVANCE(preamble_bytes); } NEXT_PHASE(ctx); /* FALL THROUGH */ case 1: { /* Decode components of the extension root */ asn_bit_data_t *preamble = ctx->ptr; size_t edx; ASN_DEBUG("OER SEQUENCE %s Decoding PHASE 1 (Root)", td->name); assert(preamble); for(edx = (ctx->step >> 1); IN_ROOT_GROUP_PRED(edx); edx++, ctx->step = (ctx->step & ~1) + 2) { asn_TYPE_member_t *elm = &td->elements[edx]; ASN_DEBUG("Decoding %s->%s", td->name, elm->name); assert(!IN_EXTENSION_GROUP(specs, edx)); if(ctx->step & 1) { goto microphase2_decode_continues; } if(elm->optional) { int32_t present = asn_get_few_bits(preamble, 1); if(present < 0) { ASN_DEBUG("Presence map ended prematurely: %d", present); RETURN(RC_FAIL); } else if(present == 0) { if(elm->default_value_set) { /* Fill-in DEFAULT */ void *tmp; if(elm->default_value_set( element_ptrptr(st, elm, &tmp))) { RETURN(RC_FAIL); } } /* The member is not present. */ continue; } /* Present OPTIONAL or DEFAULT component. */ } /* * MICROPHASE 2: Invoke the member-specific decoder. */ ctx->step |= 1; /* Confirm entering next microphase */ microphase2_decode_continues: if(elm->flags & ATF_OPEN_TYPE) { rval = OPEN_TYPE_oer_get(opt_codec_ctx, td, st, elm, ptr, size); } else { void *save_memb_ptr; /* Temporary reference. */ void **memb_ptr2; /* Pointer to a pointer to a memmber */ memb_ptr2 = element_ptrptr(st, elm, &save_memb_ptr); rval = elm->type->op->oer_decoder( opt_codec_ctx, elm->type, elm->encoding_constraints.oer_constraints, memb_ptr2, ptr, size); } switch(rval.code) { case RC_OK: ADVANCE(rval.consumed); break; case RC_WMORE: ASN_DEBUG("More bytes needed at element %s \"%s\"", td->name, elm->name); ADVANCE(rval.consumed); RETURN(RC_WMORE); case RC_FAIL: ASN_DEBUG("Decoding failed at element %s \"%s\"", td->name, elm->name); RETURN(RC_FAIL); } } /* for(all root members) */ } NEXT_PHASE(ctx); /* FALL THROUGH */ case 2: assert(ctx->ptr); { /* Cleanup preamble. */ asn_bit_data_t *preamble = ctx->ptr; asn_bit_data_t *extadds; int has_extensions_bit = (specs->first_extension >= 0); int extensions_present = has_extensions_bit && (preamble->buffer == NULL || (((const uint8_t *)preamble->buffer)[0] & 0x80)); uint8_t unused_bits; size_t len = 0; ssize_t len_len; ASN_DEBUG("OER SEQUENCE %s Decoding PHASE 2", td->name); preamble->buffer = 0; /* Will do extensions_present==1 next time. */ if(!extensions_present) { ctx->phase = 10; RETURN(RC_OK); } /* * X.696 (08/2015) #16.1 (c), #16.4 * Read in the extension addition presence bitmap. */ len_len = oer_fetch_length(ptr, size, &len); if(len_len > 0) { ADVANCE(len_len); } else if(len_len < 0) { RETURN(RC_FAIL); } else { RETURN(RC_WMORE); } if(len == 0) { /* 16.4.1-2 */ RETURN(RC_FAIL); } else if(len > size) { RETURN(RC_WMORE); } /* Account for unused bits */ unused_bits = 0x7 & *(const uint8_t *)ptr; ADVANCE(1); len--; if(unused_bits && len == 0) { RETURN(RC_FAIL); } /* Get the extensions map */ extadds = asn_bit_data_new_contiguous(ptr, len * 8 - unused_bits); if(!extadds) { RETURN(RC_FAIL); } FREEMEM(preamble); ctx->ptr = extadds; ADVANCE(len); } NEXT_PHASE(ctx); ctx->step = (specs->first_extension < 0 ? td->elements_count : (size_t)specs->first_extension); /* Fall through */ case 3: ASN_DEBUG("OER SEQUENCE %s Decoding PHASE 3 (Extensions)", td->name); for(; ctx->step < (signed)td->elements_count; ctx->step++) { asn_bit_data_t *extadds = ctx->ptr; size_t edx = ctx->step; asn_TYPE_member_t *elm = &td->elements[edx]; void *tmp_memb_ptr; void **memb_ptr2 = element_ptrptr(st, elm, &tmp_memb_ptr); switch(asn_get_few_bits(extadds, 1)) { case -1: /* * Not every one of our extensions is known to the remote side. * Continue filling in their defaults though. */ /* Fall through */ case 0: /* Fill-in DEFAULT */ if(elm->default_value_set && elm->default_value_set(memb_ptr2)) { RETURN(RC_FAIL); } continue; case 1: { /* Read OER open type */ ssize_t ot_size = oer_open_type_get(opt_codec_ctx, elm->type, elm->encoding_constraints.oer_constraints, memb_ptr2, ptr, size); assert(ot_size <= (ssize_t)size); if(ot_size > 0) { ADVANCE(ot_size); } else if(ot_size < 0) { RETURN(RC_FAIL); } else { /* Roll back open type parsing */ asn_get_undo(extadds, 1); RETURN(RC_WMORE); } break; } default: RETURN(RC_FAIL); } } NEXT_PHASE(ctx); /* Fall through */ case 4: ASN_DEBUG("OER SEQUENCE %s Decoding PHASE 4", td->name); /* Read in the rest of Open Types while ignoring them */ for(;;) { asn_bit_data_t *extadds = ctx->ptr; switch(asn_get_few_bits(extadds, 1)) { case 0: continue; case 1: { ssize_t skipped = oer_open_type_skip(ptr, size); if(skipped > 0) { ADVANCE(skipped); } else if(skipped < 0) { RETURN(RC_FAIL); } else { asn_get_undo(extadds, 1); RETURN(RC_WMORE); } continue; } case -1: /* No more Open Type encoded components */ break; default: RETURN(RC_FAIL); } break; } } RETURN(RC_OK); } /* * Encode as Canonical OER. */ asn_enc_rval_t SEQUENCE_encode_oer(const asn_TYPE_descriptor_t *td, const asn_oer_constraints_t *constraints, const void *sptr, asn_app_consume_bytes_f *cb, void *app_key) { const asn_SEQUENCE_specifics_t *specs = (const asn_SEQUENCE_specifics_t *)td->specifics; size_t computed_size = 0; int has_extensions_bit = (specs->first_extension >= 0); size_t preamble_bits = (has_extensions_bit + specs->roms_count); uint32_t has_extensions = 0; size_t edx; int ret; (void)constraints; if(preamble_bits) { asn_bit_outp_t preamble; memset(&preamble, 0, sizeof(preamble)); preamble.output = cb; preamble.op_key = app_key; if(has_extensions_bit) { for(edx = specs->first_extension; edx < td->elements_count; edx++) { asn_TYPE_member_t *elm = &td->elements[edx]; const void *memb_ptr = element_ptr(sptr, elm); if(memb_ptr) { if(elm->default_value_cmp && elm->default_value_cmp(memb_ptr) == 0) { /* Do not encode default values in extensions */ } else { has_extensions = 1; break; } } } ret = asn_put_few_bits(&preamble, has_extensions, 1); assert(ret == 0); if(ret < 0) { ASN__ENCODE_FAILED; } } /* * Encode optional components bitmap. */ if(specs->roms_count) { FOR_IN_ROOT_GROUP(edx) { asn_TYPE_member_t *elm = &td->elements[edx]; if(IN_EXTENSION_GROUP(specs, edx)) break; if(elm->optional) { const void *memb_ptr = element_ptr(sptr, elm); uint32_t has_component = memb_ptr != NULL; if(has_component && elm->default_value_cmp && elm->default_value_cmp(memb_ptr) == 0) { has_component = 0; } ret = asn_put_few_bits(&preamble, has_component, 1); if(ret < 0) { ASN__ENCODE_FAILED; } } } } asn_put_aligned_flush(&preamble); computed_size += preamble.flushed_bytes; } /* if(preamble_bits) */ /* * Put root components and extensions root. */ for(edx = 0; edx < td->elements_count; edx++) { asn_TYPE_member_t *elm = &td->elements[edx]; asn_enc_rval_t er; const void *memb_ptr; if(IN_EXTENSION_GROUP(specs, edx)) break; memb_ptr = element_ptr(sptr, elm); if(memb_ptr) { if(elm->default_value_cmp && elm->default_value_cmp(memb_ptr) == 0) { /* Skip default values in encoding */ continue; } } else { if(elm->optional) continue; /* Mandatory element is missing */ ASN__ENCODE_FAILED; } if(!elm->type->op->oer_encoder) { ASN_DEBUG("OER encoder is not defined for type %s", elm->type->name); ASN__ENCODE_FAILED; } er = elm->type->op->oer_encoder( elm->type, elm->encoding_constraints.oer_constraints, memb_ptr, cb, app_key); if(er.encoded == -1) { ASN_DEBUG("... while encoding %s member \"%s\"\n", td->name, elm->name); return er; } computed_size += er.encoded; } /* * Before encode extensions, encode extensions additions presense bitmap # X.696 (08/2015) #16.4. */ if(has_extensions) { asn_bit_outp_t extadds; /* Special case allowing us to use exactly one byte for #8.6 */ size_t aoms_length_bits = specs->aoms_count; size_t aoms_length_bytes = (7 + aoms_length_bits) >> 3; uint8_t unused_bits = 0x07 & (8 - (aoms_length_bits & 0x07)); assert(1 + aoms_length_bytes <= 127); memset(&extadds, 0, sizeof(extadds)); extadds.output = cb; extadds.op_key = app_key; /* #8.6 length determinant */ ret = asn_put_few_bits(&extadds, (1 + aoms_length_bytes), 8); if(ret < 0) ASN__ENCODE_FAILED; /* Number of unused bytes, #16.4.2 */ ret = asn_put_few_bits(&extadds, unused_bits, 8); if(ret < 0) ASN__ENCODE_FAILED; /* Encode presence bitmap #16.4.3 */ for(edx = specs->first_extension; edx < td->elements_count; edx++) { asn_TYPE_member_t *elm = &td->elements[edx]; const void *memb_ptr = element_ptr(sptr, elm); if(memb_ptr && elm->default_value_cmp && elm->default_value_cmp(memb_ptr) == 0) { memb_ptr = 0; /* Do not encode default value. */ } ret |= asn_put_few_bits(&extadds, memb_ptr ? 1 : 0, 1); } if(ret < 0) ASN__ENCODE_FAILED; asn_put_aligned_flush(&extadds); computed_size += extadds.flushed_bytes; /* Now, encode extensions */ for(edx = specs->first_extension; edx < td->elements_count; edx++) { asn_TYPE_member_t *elm = &td->elements[edx]; const void *memb_ptr = element_ptr(sptr, elm); if(memb_ptr) { if(elm->default_value_cmp && elm->default_value_cmp(memb_ptr) == 0) { /* Do not encode default value. */ } else { ssize_t wrote = oer_open_type_put( elm->type, elm->encoding_constraints.oer_constraints, memb_ptr, cb, app_key); if(wrote == -1) { ASN__ENCODE_FAILED; } computed_size += wrote; } } else if(!elm->optional) { ASN__ENCODE_FAILED; } } } /* if(has_extensions) */ { asn_enc_rval_t er = {0, 0, 0}; er.encoded = computed_size; ASN__ENCODED_OK(er); } } #endif /* ASN_DISABLE_OER_SUPPORT */ nextepc-0.3.10/lib/s1ap/asn1c/constr_SET_OF.c000066400000000000000000001143041333553357400204510ustar00rootroot00000000000000/* * Copyright (c) 2003-2017 Lev Walkin . * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include /* * Number of bytes left for this structure. * (ctx->left) indicates the number of bytes _transferred_ for the structure. * (size) contains the number of bytes in the buffer passed. */ #define LEFT ((size<(size_t)ctx->left)?size:(size_t)ctx->left) /* * If the subprocessor function returns with an indication that it wants * more data, it may well be a fatal decoding problem, because the * size is constrained by the 's L, even if the buffer size allows * reading more data. * For example, consider the buffer containing the following TLVs: * ... * The TLV length clearly indicates that one byte is expected in V, but * if the V processor returns with "want more data" even if the buffer * contains way more data than the V processor have seen. */ #define SIZE_VIOLATION (ctx->left >= 0 && (size_t)ctx->left <= size) /* * This macro "eats" the part of the buffer which is definitely "consumed", * i.e. was correctly converted into local representation or rightfully skipped. */ #undef ADVANCE #define ADVANCE(num_bytes) do { \ size_t num = num_bytes; \ ptr = ((const char *)ptr) + num;\ size -= num; \ if(ctx->left >= 0) \ ctx->left -= num; \ consumed_myself += num; \ } while(0) /* * Switch to the next phase of parsing. */ #undef NEXT_PHASE #undef PHASE_OUT #define NEXT_PHASE(ctx) do { \ ctx->phase++; \ ctx->step = 0; \ } while(0) #define PHASE_OUT(ctx) do { ctx->phase = 10; } while(0) /* * Return a standardized complex structure. */ #undef RETURN #define RETURN(_code) do { \ rval.code = _code; \ rval.consumed = consumed_myself;\ return rval; \ } while(0) /* * The decoder of the SET OF type. */ asn_dec_rval_t SET_OF_decode_ber(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **struct_ptr, const void *ptr, size_t size, int tag_mode) { /* * Bring closer parts of structure description. */ const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics; const asn_TYPE_member_t *elm = td->elements; /* Single one */ /* * Parts of the structure being constructed. */ void *st = *struct_ptr; /* Target structure. */ asn_struct_ctx_t *ctx; /* Decoder context */ ber_tlv_tag_t tlv_tag; /* T from TLV */ asn_dec_rval_t rval; /* Return code from subparsers */ ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ ASN_DEBUG("Decoding %s as SET OF", td->name); /* * Create the target structure if it is not present already. */ if(st == 0) { st = *struct_ptr = CALLOC(1, specs->struct_size); if(st == 0) { RETURN(RC_FAIL); } } /* * Restore parsing context. */ ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); /* * Start to parse where left previously */ switch(ctx->phase) { case 0: /* * PHASE 0. * Check that the set of tags associated with given structure * perfectly fits our expectations. */ rval = ber_check_tags(opt_codec_ctx, td, ctx, ptr, size, tag_mode, 1, &ctx->left, 0); if(rval.code != RC_OK) { ASN_DEBUG("%s tagging check failed: %d", td->name, rval.code); return rval; } if(ctx->left >= 0) ctx->left += rval.consumed; /* ?Substracted below! */ ADVANCE(rval.consumed); ASN_DEBUG("Structure consumes %ld bytes, " "buffer %ld", (long)ctx->left, (long)size); NEXT_PHASE(ctx); /* Fall through */ case 1: /* * PHASE 1. * From the place where we've left it previously, * try to decode the next item. */ for(;; ctx->step = 0) { ssize_t tag_len; /* Length of TLV's T */ if(ctx->step & 1) goto microphase2; /* * MICROPHASE 1: Synchronize decoding. */ if(ctx->left == 0) { ASN_DEBUG("End of SET OF %s", td->name); /* * No more things to decode. * Exit out of here. */ PHASE_OUT(ctx); RETURN(RC_OK); } /* * Fetch the T from TLV. */ tag_len = ber_fetch_tag(ptr, LEFT, &tlv_tag); switch(tag_len) { case 0: if(!SIZE_VIOLATION) RETURN(RC_WMORE); /* Fall through */ case -1: RETURN(RC_FAIL); } if(ctx->left < 0 && ((const uint8_t *)ptr)[0] == 0) { if(LEFT < 2) { if(SIZE_VIOLATION) RETURN(RC_FAIL); else RETURN(RC_WMORE); } else if(((const uint8_t *)ptr)[1] == 0) { /* * Found the terminator of the * indefinite length structure. */ break; } } /* Outmost tag may be unknown and cannot be fetched/compared */ if(elm->tag != (ber_tlv_tag_t)-1) { if(BER_TAGS_EQUAL(tlv_tag, elm->tag)) { /* * The new list member of expected type has arrived. */ } else { ASN_DEBUG("Unexpected tag %s fixed SET OF %s", ber_tlv_tag_string(tlv_tag), td->name); ASN_DEBUG("%s SET OF has tag %s", td->name, ber_tlv_tag_string(elm->tag)); RETURN(RC_FAIL); } } /* * MICROPHASE 2: Invoke the member-specific decoder. */ ctx->step |= 1; /* Confirm entering next microphase */ microphase2: /* * Invoke the member fetch routine according to member's type */ rval = elm->type->op->ber_decoder(opt_codec_ctx, elm->type, &ctx->ptr, ptr, LEFT, 0); ASN_DEBUG("In %s SET OF %s code %d consumed %d", td->name, elm->type->name, rval.code, (int)rval.consumed); switch(rval.code) { case RC_OK: { asn_anonymous_set_ *list = _A_SET_FROM_VOID(st); if(ASN_SET_ADD(list, ctx->ptr) != 0) RETURN(RC_FAIL); else ctx->ptr = 0; } break; case RC_WMORE: /* More data expected */ if(!SIZE_VIOLATION) { ADVANCE(rval.consumed); RETURN(RC_WMORE); } /* Fall through */ case RC_FAIL: /* Fatal error */ ASN_STRUCT_FREE(*elm->type, ctx->ptr); ctx->ptr = 0; RETURN(RC_FAIL); } /* switch(rval) */ ADVANCE(rval.consumed); } /* for(all list members) */ NEXT_PHASE(ctx); case 2: /* * Read in all "end of content" TLVs. */ while(ctx->left < 0) { if(LEFT < 2) { if(LEFT > 0 && ((const char *)ptr)[0] != 0) { /* Unexpected tag */ RETURN(RC_FAIL); } else { RETURN(RC_WMORE); } } if(((const char *)ptr)[0] == 0 && ((const char *)ptr)[1] == 0) { ADVANCE(2); ctx->left++; } else { RETURN(RC_FAIL); } } PHASE_OUT(ctx); } RETURN(RC_OK); } /* * Internally visible buffer holding a single encoded element. */ struct _el_buffer { uint8_t *buf; size_t length; size_t allocated_size; unsigned bits_unused; }; /* Append bytes to the above structure */ static int _el_addbytes(const void *buffer, size_t size, void *el_buf_ptr) { struct _el_buffer *el_buf = (struct _el_buffer *)el_buf_ptr; if(el_buf->length + size > el_buf->allocated_size) { size_t new_size = el_buf->allocated_size ? el_buf->allocated_size : 8; void *p; do { new_size <<= 2; } while(el_buf->length + size > new_size); p = REALLOC(el_buf->buf, new_size); if(p) { el_buf->buf = p; el_buf->allocated_size = new_size; } else { return -1; } } memcpy(el_buf->buf + el_buf->length, buffer, size); el_buf->length += size; return 0; } static void assert_unused_bits(const struct _el_buffer* p) { if(p->length) { assert((p->buf[p->length-1] & ~(0xff << p->bits_unused)) == 0); } else { assert(p->bits_unused == 0); } } static int _el_buf_cmp(const void *ap, const void *bp) { const struct _el_buffer *a = (const struct _el_buffer *)ap; const struct _el_buffer *b = (const struct _el_buffer *)bp; size_t common_len; int ret = 0; if(a->length < b->length) common_len = a->length; else common_len = b->length; if (a->buf && b->buf) { ret = memcmp(a->buf, b->buf, common_len); } if(ret == 0) { if(a->length < b->length) ret = -1; else if(a->length > b->length) ret = 1; /* Ignore unused bits. */ assert_unused_bits(a); assert_unused_bits(b); } return ret; } static void SET_OF__encode_sorted_free(struct _el_buffer *el_buf, size_t count) { size_t i; for(i = 0; i < count; i++) { FREEMEM(el_buf[i].buf); } FREEMEM(el_buf); } enum SET_OF__encode_method { SOES_DER, /* Distinguished Encoding Rules */ SOES_CUPER /* Canonical Unaligned Packed Encoding Rules */ }; static struct _el_buffer * SET_OF__encode_sorted(const asn_TYPE_member_t *elm, const asn_anonymous_set_ *list, enum SET_OF__encode_method method) { static struct _el_buffer *encoded_els; int edx; encoded_els = (struct _el_buffer *)CALLOC(list->count, sizeof(encoded_els[0])); if(encoded_els == NULL) { return NULL; } /* * Encode all members. */ for(edx = 0; edx < list->count; edx++) { const void *memb_ptr = list->array[edx]; struct _el_buffer *encoding_el = &encoded_els[edx]; asn_enc_rval_t erval; if(!memb_ptr) break; /* * Encode the member into the prepared space. */ switch(method) { case SOES_DER: erval = elm->type->op->der_encoder(elm->type, memb_ptr, 0, elm->tag, _el_addbytes, encoding_el); break; case SOES_CUPER: erval = uper_encode(elm->type, elm->encoding_constraints.per_constraints, memb_ptr, _el_addbytes, encoding_el); if(erval.encoded != -1) { size_t extra_bits = erval.encoded % 8; assert(encoding_el->length == (size_t)(erval.encoded + 7) / 8); encoding_el->bits_unused = (8 - extra_bits) & 0x7; } break; default: assert(!"Unreachable"); break; } if(erval.encoded < 0) break; } if(edx == list->count) { /* * Sort the encoded elements according to their encoding. */ qsort(encoded_els, list->count, sizeof(encoded_els[0]), _el_buf_cmp); return encoded_els; } else { SET_OF__encode_sorted_free(encoded_els, edx); return NULL; } } /* * The DER encoder of the SET OF type. */ asn_enc_rval_t SET_OF_encode_der(const asn_TYPE_descriptor_t *td, const void *sptr, int tag_mode, ber_tlv_tag_t tag, asn_app_consume_bytes_f *cb, void *app_key) { const asn_TYPE_member_t *elm = td->elements; const asn_anonymous_set_ *list = _A_CSET_FROM_VOID(sptr); size_t computed_size = 0; ssize_t encoding_size = 0; struct _el_buffer *encoded_els; int edx; ASN_DEBUG("Estimating size for SET OF %s", td->name); /* * Gather the length of the underlying members sequence. */ for(edx = 0; edx < list->count; edx++) { void *memb_ptr = list->array[edx]; asn_enc_rval_t erval; if(!memb_ptr) ASN__ENCODE_FAILED; erval = elm->type->op->der_encoder(elm->type, memb_ptr, 0, elm->tag, 0, 0); if(erval.encoded == -1) return erval; computed_size += erval.encoded; } /* * Encode the TLV for the sequence itself. */ encoding_size = der_write_tags(td, computed_size, tag_mode, 1, tag, cb, app_key); if(encoding_size < 0) { ASN__ENCODE_FAILED; } computed_size += encoding_size; if(!cb || list->count == 0) { asn_enc_rval_t erval; erval.encoded = computed_size; ASN__ENCODED_OK(erval); } ASN_DEBUG("Encoding members of %s SET OF", td->name); /* * DER mandates dynamic sorting of the SET OF elements * according to their encodings. Build an array of the * encoded elements. */ encoded_els = SET_OF__encode_sorted(elm, list, SOES_DER); /* * Report encoded elements to the application. * Dispose of temporary sorted members table. */ for(edx = 0; edx < list->count; edx++) { struct _el_buffer *encoded_el = &encoded_els[edx]; /* Report encoded chunks to the application */ if(cb(encoded_el->buf, encoded_el->length, app_key) < 0) { break; } else { encoding_size += encoded_el->length; } } SET_OF__encode_sorted_free(encoded_els, list->count); if(edx == list->count) { asn_enc_rval_t erval; assert(computed_size == (size_t)encoding_size); erval.encoded = computed_size; ASN__ENCODED_OK(erval); } else { ASN__ENCODE_FAILED; } } #undef XER_ADVANCE #define XER_ADVANCE(num_bytes) do { \ size_t num = num_bytes; \ buf_ptr = ((const char *)buf_ptr) + num;\ size -= num; \ consumed_myself += num; \ } while(0) /* * Decode the XER (XML) data. */ asn_dec_rval_t SET_OF_decode_xer(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **struct_ptr, const char *opt_mname, const void *buf_ptr, size_t size) { /* * Bring closer parts of structure description. */ const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics; const asn_TYPE_member_t *element = td->elements; const char *elm_tag; const char *xml_tag = opt_mname ? opt_mname : td->xml_tag; /* * ... and parts of the structure being constructed. */ void *st = *struct_ptr; /* Target structure. */ asn_struct_ctx_t *ctx; /* Decoder context */ asn_dec_rval_t rval; /* Return value from a decoder */ ssize_t consumed_myself = 0; /* Consumed bytes from ptr */ /* * Create the target structure if it is not present already. */ if(st == 0) { st = *struct_ptr = CALLOC(1, specs->struct_size); if(st == 0) RETURN(RC_FAIL); } /* Which tag is expected for the downstream */ if(specs->as_XMLValueList) { elm_tag = (specs->as_XMLValueList == 1) ? 0 : ""; } else { elm_tag = (*element->name) ? element->name : element->type->xml_tag; } /* * Restore parsing context. */ ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); /* * Phases of XER/XML processing: * Phase 0: Check that the opening tag matches our expectations. * Phase 1: Processing body and reacting on closing tag. * Phase 2: Processing inner type. */ for(; ctx->phase <= 2;) { pxer_chunk_type_e ch_type; /* XER chunk type */ ssize_t ch_size; /* Chunk size */ xer_check_tag_e tcv; /* Tag check value */ /* * Go inside the inner member of a set. */ if(ctx->phase == 2) { asn_dec_rval_t tmprval; /* Invoke the inner type decoder, m.b. multiple times */ ASN_DEBUG("XER/SET OF element [%s]", elm_tag); tmprval = element->type->op->xer_decoder(opt_codec_ctx, element->type, &ctx->ptr, elm_tag, buf_ptr, size); if(tmprval.code == RC_OK) { asn_anonymous_set_ *list = _A_SET_FROM_VOID(st); if(ASN_SET_ADD(list, ctx->ptr) != 0) RETURN(RC_FAIL); ctx->ptr = 0; XER_ADVANCE(tmprval.consumed); } else { XER_ADVANCE(tmprval.consumed); RETURN(tmprval.code); } ctx->phase = 1; /* Back to body processing */ ASN_DEBUG("XER/SET OF phase => %d", ctx->phase); /* Fall through */ } /* * Get the next part of the XML stream. */ ch_size = xer_next_token(&ctx->context, buf_ptr, size, &ch_type); if(ch_size == -1) { RETURN(RC_FAIL); } else { switch(ch_type) { case PXER_WMORE: RETURN(RC_WMORE); case PXER_COMMENT: /* Got XML comment */ case PXER_TEXT: /* Ignore free-standing text */ XER_ADVANCE(ch_size); /* Skip silently */ continue; case PXER_TAG: break; /* Check the rest down there */ } } tcv = xer_check_tag(buf_ptr, ch_size, xml_tag); ASN_DEBUG("XER/SET OF: tcv = %d, ph=%d t=%s", tcv, ctx->phase, xml_tag); switch(tcv) { case XCT_CLOSING: if(ctx->phase == 0) break; ctx->phase = 0; /* Fall through */ case XCT_BOTH: if(ctx->phase == 0) { /* No more things to decode */ XER_ADVANCE(ch_size); ctx->phase = 3; /* Phase out */ RETURN(RC_OK); } /* Fall through */ case XCT_OPENING: if(ctx->phase == 0) { XER_ADVANCE(ch_size); ctx->phase = 1; /* Processing body phase */ continue; } /* Fall through */ case XCT_UNKNOWN_OP: case XCT_UNKNOWN_BO: ASN_DEBUG("XER/SET OF: tcv=%d, ph=%d", tcv, ctx->phase); if(ctx->phase == 1) { /* * Process a single possible member. */ ctx->phase = 2; continue; } /* Fall through */ default: break; } ASN_DEBUG("Unexpected XML tag in SET OF"); break; } ctx->phase = 3; /* "Phase out" on hard failure */ RETURN(RC_FAIL); } typedef struct xer_tmp_enc_s { void *buffer; size_t offset; size_t size; } xer_tmp_enc_t; static int SET_OF_encode_xer_callback(const void *buffer, size_t size, void *key) { xer_tmp_enc_t *t = (xer_tmp_enc_t *)key; if(t->offset + size >= t->size) { size_t newsize = (t->size << 2) + size; void *p = REALLOC(t->buffer, newsize); if(!p) return -1; t->buffer = p; t->size = newsize; } memcpy((char *)t->buffer + t->offset, buffer, size); t->offset += size; return 0; } static int SET_OF_xer_order(const void *aptr, const void *bptr) { const xer_tmp_enc_t *a = (const xer_tmp_enc_t *)aptr; const xer_tmp_enc_t *b = (const xer_tmp_enc_t *)bptr; size_t minlen = a->offset; int ret; if(b->offset < minlen) minlen = b->offset; /* Well-formed UTF-8 has this nice lexicographical property... */ ret = memcmp(a->buffer, b->buffer, minlen); if(ret != 0) return ret; if(a->offset == b->offset) return 0; if(a->offset == minlen) return -1; return 1; } asn_enc_rval_t SET_OF_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, enum xer_encoder_flags_e flags, asn_app_consume_bytes_f *cb, void *app_key) { asn_enc_rval_t er; const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics; const asn_TYPE_member_t *elm = td->elements; const asn_anonymous_set_ *list = _A_CSET_FROM_VOID(sptr); const char *mname = specs->as_XMLValueList ? 0 : ((*elm->name) ? elm->name : elm->type->xml_tag); size_t mlen = mname ? strlen(mname) : 0; int xcan = (flags & XER_F_CANONICAL); xer_tmp_enc_t *encs = 0; size_t encs_count = 0; void *original_app_key = app_key; asn_app_consume_bytes_f *original_cb = cb; int i; if(!sptr) ASN__ENCODE_FAILED; if(xcan) { encs = (xer_tmp_enc_t *)MALLOC(list->count * sizeof(encs[0])); if(!encs) ASN__ENCODE_FAILED; cb = SET_OF_encode_xer_callback; } er.encoded = 0; for(i = 0; i < list->count; i++) { asn_enc_rval_t tmper; void *memb_ptr = list->array[i]; if(!memb_ptr) continue; if(encs) { memset(&encs[encs_count], 0, sizeof(encs[0])); app_key = &encs[encs_count]; encs_count++; } if(mname) { if(!xcan) ASN__TEXT_INDENT(1, ilevel); ASN__CALLBACK3("<", 1, mname, mlen, ">", 1); } if(!xcan && specs->as_XMLValueList == 1) ASN__TEXT_INDENT(1, ilevel + 1); tmper = elm->type->op->xer_encoder(elm->type, memb_ptr, ilevel + (specs->as_XMLValueList != 2), flags, cb, app_key); if(tmper.encoded == -1) return tmper; er.encoded += tmper.encoded; if(tmper.encoded == 0 && specs->as_XMLValueList) { const char *name = elm->type->xml_tag; size_t len = strlen(name); ASN__CALLBACK3("<", 1, name, len, "/>", 2); } if(mname) { ASN__CALLBACK3("", 1); } } if(!xcan) ASN__TEXT_INDENT(1, ilevel - 1); if(encs) { xer_tmp_enc_t *enc = encs; xer_tmp_enc_t *end = encs + encs_count; ssize_t control_size = 0; er.encoded = 0; cb = original_cb; app_key = original_app_key; qsort(encs, encs_count, sizeof(encs[0]), SET_OF_xer_order); for(; enc < end; enc++) { ASN__CALLBACK(enc->buffer, enc->offset); FREEMEM(enc->buffer); enc->buffer = 0; control_size += enc->offset; } assert(control_size == er.encoded); } goto cleanup; cb_failed: ASN__ENCODE_FAILED; cleanup: if(encs) { size_t n; for(n = 0; n < encs_count; n++) { FREEMEM(encs[n].buffer); } FREEMEM(encs); } ASN__ENCODED_OK(er); } int SET_OF_print(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel, asn_app_consume_bytes_f *cb, void *app_key) { asn_TYPE_member_t *elm = td->elements; const asn_anonymous_set_ *list = _A_CSET_FROM_VOID(sptr); int ret; int i; if(!sptr) return (cb("", 8, app_key) < 0) ? -1 : 0; /* Dump preamble */ if(cb(td->name, strlen(td->name), app_key) < 0 || cb(" ::= {", 6, app_key) < 0) return -1; for(i = 0; i < list->count; i++) { const void *memb_ptr = list->array[i]; if(!memb_ptr) continue; _i_INDENT(1); ret = elm->type->op->print_struct(elm->type, memb_ptr, ilevel + 1, cb, app_key); if(ret) return ret; } ilevel--; _i_INDENT(1); return (cb("}", 1, app_key) < 0) ? -1 : 0; } void SET_OF_free(const asn_TYPE_descriptor_t *td, void *ptr, enum asn_struct_free_method method) { if(td && ptr) { const asn_SET_OF_specifics_t *specs; asn_TYPE_member_t *elm = td->elements; asn_anonymous_set_ *list = _A_SET_FROM_VOID(ptr); asn_struct_ctx_t *ctx; /* Decoder context */ int i; /* * Could not use set_of_empty() because of (*free) * incompatibility. */ for(i = 0; i < list->count; i++) { void *memb_ptr = list->array[i]; if(memb_ptr) ASN_STRUCT_FREE(*elm->type, memb_ptr); } list->count = 0; /* No meaningful elements left */ asn_set_empty(list); /* Remove (list->array) */ specs = (const asn_SET_OF_specifics_t *)td->specifics; ctx = (asn_struct_ctx_t *)((char *)ptr + specs->ctx_offset); if(ctx->ptr) { ASN_STRUCT_FREE(*elm->type, ctx->ptr); ctx->ptr = 0; } switch(method) { case ASFM_FREE_EVERYTHING: FREEMEM(ptr); break; case ASFM_FREE_UNDERLYING: break; case ASFM_FREE_UNDERLYING_AND_RESET: memset(ptr, 0, specs->struct_size); break; } } } int SET_OF_constraint(const asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, void *app_key) { const asn_TYPE_member_t *elm = td->elements; asn_constr_check_f *constr; const asn_anonymous_set_ *list = _A_CSET_FROM_VOID(sptr); int i; if(!sptr) { ASN__CTFAIL(app_key, td, sptr, "%s: value not given (%s:%d)", td->name, __FILE__, __LINE__); return -1; } constr = elm->encoding_constraints.general_constraints; if(!constr) constr = elm->type->encoding_constraints.general_constraints; /* * Iterate over the members of an array. * Validate each in turn, until one fails. */ for(i = 0; i < list->count; i++) { const void *memb_ptr = list->array[i]; int ret; if(!memb_ptr) continue; ret = constr(elm->type, memb_ptr, ctfailcb, app_key); if(ret) return ret; } return 0; } #ifndef ASN_DISABLE_PER_SUPPORT asn_dec_rval_t SET_OF_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { asn_dec_rval_t rv; const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics; const asn_TYPE_member_t *elm = td->elements; /* Single one */ void *st = *sptr; asn_anonymous_set_ *list; const asn_per_constraint_t *ct; int repeat = 0; ssize_t nelems; if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) ASN__DECODE_FAILED; /* * Create the target structure if it is not present already. */ if(!st) { st = *sptr = CALLOC(1, specs->struct_size); if(!st) ASN__DECODE_FAILED; } list = _A_SET_FROM_VOID(st); /* Figure out which constraints to use */ if(constraints) ct = &constraints->size; else if(td->encoding_constraints.per_constraints) ct = &td->encoding_constraints.per_constraints->size; else ct = 0; if(ct && ct->flags & APC_EXTENSIBLE) { int value = per_get_few_bits(pd, 1); if(value < 0) ASN__DECODE_STARVED; if(value) ct = 0; /* Not restricted! */ } if(ct && ct->effective_bits >= 0) { /* X.691, #19.5: No length determinant */ nelems = per_get_few_bits(pd, ct->effective_bits); ASN_DEBUG("Preparing to fetch %ld+%ld elements from %s", (long)nelems, ct->lower_bound, td->name); if(nelems < 0) ASN__DECODE_STARVED; nelems += ct->lower_bound; } else { nelems = -1; } do { int i; if(nelems < 0) { nelems = uper_get_length(pd, -1, 0, &repeat); ASN_DEBUG("Got to decode %" ASN_PRI_SSIZE " elements (eff %d)", nelems, (int)(ct ? ct->effective_bits : -1)); if(nelems < 0) ASN__DECODE_STARVED; } for(i = 0; i < nelems; i++) { void *ptr = 0; ASN_DEBUG("SET OF %s decoding", elm->type->name); rv = elm->type->op->uper_decoder(opt_codec_ctx, elm->type, elm->encoding_constraints.per_constraints, &ptr, pd); ASN_DEBUG("%s SET OF %s decoded %d, %p", td->name, elm->type->name, rv.code, ptr); if(rv.code == RC_OK) { if(ASN_SET_ADD(list, ptr) == 0) { if(rv.consumed == 0 && nelems > 200) { /* Protect from SET OF NULL compression bombs. */ ASN__DECODE_FAILED; } continue; } ASN_DEBUG("Failed to add element into %s", td->name); /* Fall through */ rv.code = RC_FAIL; } else { ASN_DEBUG("Failed decoding %s of %s (SET OF)", elm->type->name, td->name); } if(ptr) ASN_STRUCT_FREE(*elm->type, ptr); return rv; } nelems = -1; /* Allow uper_get_length() */ } while(repeat); ASN_DEBUG("Decoded %s as SET OF", td->name); rv.code = RC_OK; rv.consumed = 0; return rv; } asn_enc_rval_t SET_OF_encode_uper(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { const asn_anonymous_set_ *list; const asn_per_constraint_t *ct; const asn_TYPE_member_t *elm = td->elements; struct _el_buffer *encoded_els; asn_enc_rval_t er; size_t encoded_edx; if(!sptr) ASN__ENCODE_FAILED; list = _A_CSET_FROM_VOID(sptr); er.encoded = 0; ASN_DEBUG("Encoding %s as SEQUENCE OF (%d)", td->name, list->count); if(constraints) ct = &constraints->size; else if(td->encoding_constraints.per_constraints) ct = &td->encoding_constraints.per_constraints->size; else ct = 0; /* If extensible constraint, check if size is in root */ if(ct) { int not_in_root = (list->count < ct->lower_bound || list->count > ct->upper_bound); ASN_DEBUG("lb %ld ub %ld %s", ct->lower_bound, ct->upper_bound, ct->flags & APC_EXTENSIBLE ? "ext" : "fix"); if(ct->flags & APC_EXTENSIBLE) { /* Declare whether size is in extension root */ if(per_put_few_bits(po, not_in_root, 1)) ASN__ENCODE_FAILED; if(not_in_root) ct = 0; } else if(not_in_root && ct->effective_bits >= 0) { ASN__ENCODE_FAILED; } } if(ct && ct->effective_bits >= 0) { /* X.691, #19.5: No length determinant */ if(per_put_few_bits(po, list->count - ct->lower_bound, ct->effective_bits)) ASN__ENCODE_FAILED; } else if(list->count == 0) { /* When the list is empty add only the length determinant * X.691, #20.6 and #11.9.4.1 */ if (uper_put_length(po, 0, 0)) { ASN__ENCODE_FAILED; } ASN__ENCODED_OK(er); } /* * Canonical UPER #22.1 mandates dynamic sorting of the SET OF elements * according to their encodings. Build an array of the encoded elements. */ encoded_els = SET_OF__encode_sorted(elm, list, SOES_CUPER); for(encoded_edx = 0; (ssize_t)encoded_edx < list->count;) { ssize_t may_encode; size_t edx; int need_eom = 0; if(ct && ct->effective_bits >= 0) { may_encode = list->count; } else { may_encode = uper_put_length(po, list->count - encoded_edx, &need_eom); if(may_encode < 0) ASN__ENCODE_FAILED; } for(edx = encoded_edx; edx < encoded_edx + may_encode; edx++) { const struct _el_buffer *el = &encoded_els[edx]; if(asn_put_many_bits(po, el->buf, (8 * el->length) - el->bits_unused) < 0) { break; } } if(need_eom && uper_put_length(po, 0, 0)) ASN__ENCODE_FAILED; /* End of Message length */ encoded_edx += may_encode; } SET_OF__encode_sorted_free(encoded_els, list->count); if((ssize_t)encoded_edx == list->count) { ASN__ENCODED_OK(er); } else { ASN__ENCODE_FAILED; } } asn_dec_rval_t SET_OF_decode_aper(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { asn_dec_rval_t rv; const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics; const asn_TYPE_member_t *elm = td->elements; /* Single one */ void *st = *sptr; asn_anonymous_set_ *list; const asn_per_constraint_t *ct; int repeat = 0; ssize_t nelems; if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) ASN__DECODE_FAILED; /* * Create the target structure if it is not present already. */ if(!st) { st = *sptr = CALLOC(1, specs->struct_size); if(!st) ASN__DECODE_FAILED; } list = _A_SET_FROM_VOID(st); /* Figure out which constraints to use */ if(constraints) ct = &constraints->size; else if(td->encoding_constraints.per_constraints) ct = &td->encoding_constraints.per_constraints->size; else ct = 0; if(ct && ct->flags & APC_EXTENSIBLE) { int value = per_get_few_bits(pd, 1); if(value < 0) ASN__DECODE_STARVED; if(value) ct = 0; /* Not restricted! */ } if(ct && ct->effective_bits >= 0) { /* X.691, #19.5: No length determinant */ nelems = aper_get_nsnnwn(pd, ct->upper_bound - ct->lower_bound + 1); ASN_DEBUG("Preparing to fetch %ld+%ld elements from %s", (long)nelems, ct->lower_bound, td->name); if(nelems < 0) ASN__DECODE_STARVED; nelems += ct->lower_bound; } else { nelems = -1; } do { int i; if(nelems < 0) { nelems = aper_get_length(pd, ct ? ct->upper_bound - ct->lower_bound + 1 : -1, ct ? ct->effective_bits : -1, &repeat); ASN_DEBUG("Got to decode %d elements (eff %d)", (int)nelems, (int)(ct ? ct->effective_bits : -1)); if(nelems < 0) ASN__DECODE_STARVED; } for(i = 0; i < nelems; i++) { void *ptr = 0; ASN_DEBUG("SET OF %s decoding", elm->type->name); rv = elm->type->op->aper_decoder(opt_codec_ctx, elm->type, elm->encoding_constraints.per_constraints, &ptr, pd); ASN_DEBUG("%s SET OF %s decoded %d, %p", td->name, elm->type->name, rv.code, ptr); if(rv.code == RC_OK) { if(ASN_SET_ADD(list, ptr) == 0) continue; ASN_DEBUG("Failed to add element into %s", td->name); /* Fall through */ rv.code = RC_FAIL; } else { ASN_DEBUG("Failed decoding %s of %s (SET OF)", elm->type->name, td->name); } if(ptr) ASN_STRUCT_FREE(*elm->type, ptr); return rv; } nelems = -1; /* Allow uper_get_length() */ } while(repeat); ASN_DEBUG("Decoded %s as SET OF", td->name); rv.code = RC_OK; rv.consumed = 0; return rv; } #endif /* ASN_DISABLE_PER_SUPPORT */ struct comparable_ptr { const asn_TYPE_descriptor_t *td; const void *sptr; }; static int SET_OF__compare_cb(const void *aptr, const void *bptr) { const struct comparable_ptr *a = aptr; const struct comparable_ptr *b = bptr; assert(a->td == b->td); return a->td->op->compare_struct(a->td, a->sptr, b->sptr); } int SET_OF_compare(const asn_TYPE_descriptor_t *td, const void *aptr, const void *bptr) { const asn_anonymous_set_ *a = _A_CSET_FROM_VOID(aptr); const asn_anonymous_set_ *b = _A_CSET_FROM_VOID(bptr); if(a && b) { struct comparable_ptr *asorted; struct comparable_ptr *bsorted; ssize_t common_length; ssize_t idx; if(a->count == 0) { if(b->count) return -1; return 0; } else if(b->count == 0) { return 1; } asorted = MALLOC(a->count * sizeof(asorted[0])); bsorted = MALLOC(b->count * sizeof(bsorted[0])); if(!asorted || !bsorted) { FREEMEM(asorted); FREEMEM(bsorted); return -1; } for(idx = 0; idx < a->count; idx++) { asorted[idx].td = td->elements->type; asorted[idx].sptr = a->array[idx]; } for(idx = 0; idx < b->count; idx++) { bsorted[idx].td = td->elements->type; bsorted[idx].sptr = b->array[idx]; } qsort(asorted, a->count, sizeof(asorted[0]), SET_OF__compare_cb); qsort(bsorted, b->count, sizeof(bsorted[0]), SET_OF__compare_cb); common_length = (a->count < b->count ? a->count : b->count); for(idx = 0; idx < common_length; idx++) { int ret = td->elements->type->op->compare_struct( td->elements->type, asorted[idx].sptr, bsorted[idx].sptr); if(ret) { FREEMEM(asorted); FREEMEM(bsorted); return ret; } } FREEMEM(asorted); FREEMEM(bsorted); if(idx < b->count) /* more elements in b */ return -1; /* a is shorter, so put it first */ if(idx < a->count) return 1; } else if(!a) { return -1; } else if(!b) { return 1; } return 0; } asn_TYPE_operation_t asn_OP_SET_OF = { SET_OF_free, SET_OF_print, SET_OF_compare, SET_OF_decode_ber, SET_OF_encode_der, SET_OF_decode_xer, SET_OF_encode_xer, #ifdef ASN_DISABLE_OER_SUPPORT 0, 0, #else SET_OF_decode_oer, SET_OF_encode_oer, #endif #ifdef ASN_DISABLE_PER_SUPPORT 0, 0, 0, 0, #else SET_OF_decode_uper, SET_OF_encode_uper, SET_OF_decode_aper, 0, /* SET_OF_encode_aper */ #endif /* ASN_DISABLE_PER_SUPPORT */ SET_OF_random_fill, 0 /* Use generic outmost tag fetcher */ }; asn_random_fill_result_t SET_OF_random_fill(const asn_TYPE_descriptor_t *td, void **sptr, const asn_encoding_constraints_t *constraints, size_t max_length) { const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics; asn_random_fill_result_t res_ok = {ARFILL_OK, 0}; asn_random_fill_result_t result_failed = {ARFILL_FAILED, 0}; asn_random_fill_result_t result_skipped = {ARFILL_SKIPPED, 0}; const asn_TYPE_member_t *elm = td->elements; void *st = *sptr; long max_elements = 5; long slb = 0; /* Lower size bound */ long sub = 0; /* Upper size bound */ size_t rnd_len; if(max_length == 0) return result_skipped; if(st == NULL) { st = (*sptr = CALLOC(1, specs->struct_size)); if(st == NULL) { return result_failed; } } switch(asn_random_between(0, 6)) { case 0: max_elements = 0; break; case 1: max_elements = 1; break; case 2: max_elements = 5; break; case 3: max_elements = max_length; break; case 4: max_elements = max_length / 2; break; case 5: max_elements = max_length / 4; break; default: break; } sub = slb + max_elements; if(!constraints || !constraints->per_constraints) constraints = &td->encoding_constraints; if(constraints->per_constraints) { const asn_per_constraint_t *pc = &constraints->per_constraints->size; if(pc->flags & APC_SEMI_CONSTRAINED) { slb = pc->lower_bound; sub = pc->lower_bound + max_elements; } else if(pc->flags & APC_CONSTRAINED) { slb = pc->lower_bound; sub = pc->upper_bound; if(sub - slb > max_elements) sub = slb + max_elements; } } /* Bias towards edges of allowed space */ switch(asn_random_between(-1, 4)) { default: case -1: /* Prepare lengths somewhat outside of constrained range. */ if(constraints->per_constraints && (constraints->per_constraints->size.flags & APC_EXTENSIBLE)) { switch(asn_random_between(0, 5)) { default: case 0: rnd_len = 0; break; case 1: if(slb > 0) { rnd_len = slb - 1; } else { rnd_len = 0; } break; case 2: rnd_len = asn_random_between(0, slb); break; case 3: if(sub < (ssize_t)max_length) { rnd_len = sub + 1; } else { rnd_len = max_length; } break; case 4: if(sub < (ssize_t)max_length) { rnd_len = asn_random_between(sub + 1, max_length); } else { rnd_len = max_length; } break; case 5: rnd_len = max_length; break; } break; } /* Fall through */ case 0: rnd_len = asn_random_between(slb, sub); break; case 1: if(slb < sub) { rnd_len = asn_random_between(slb + 1, sub); break; } /* Fall through */ case 2: rnd_len = asn_random_between(slb, slb); break; case 3: if(slb < sub) { rnd_len = asn_random_between(slb, sub - 1); break; } /* Fall through */ case 4: rnd_len = asn_random_between(sub, sub); break; } for(; rnd_len > 0; rnd_len--) { asn_anonymous_set_ *list = _A_SET_FROM_VOID(st); void *ptr = 0; asn_random_fill_result_t tmpres = elm->type->op->random_fill( elm->type, &ptr, &elm->encoding_constraints, (max_length > res_ok.length ? max_length - res_ok.length : 0) / rnd_len); switch(tmpres.code) { case ARFILL_OK: ASN_SET_ADD(list, ptr); res_ok.length += tmpres.length; break; case ARFILL_SKIPPED: break; case ARFILL_FAILED: assert(ptr == 0); return tmpres; } } return res_ok; } nextepc-0.3.10/lib/s1ap/asn1c/constr_SET_OF.h000066400000000000000000000025411333553357400204550ustar00rootroot00000000000000/*- * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef CONSTR_SET_OF_H #define CONSTR_SET_OF_H #include #ifdef __cplusplus extern "C" { #endif typedef struct asn_SET_OF_specifics_s { /* * Target structure description. */ unsigned struct_size; /* Size of the target structure. */ unsigned ctx_offset; /* Offset of the asn_struct_ctx_t member */ /* XER-specific stuff */ int as_XMLValueList; /* The member type must be encoded like this */ } asn_SET_OF_specifics_t; /* * A set specialized functions dealing with the SET OF type. */ asn_struct_free_f SET_OF_free; asn_struct_print_f SET_OF_print; asn_struct_compare_f SET_OF_compare; asn_constr_check_f SET_OF_constraint; ber_type_decoder_f SET_OF_decode_ber; der_type_encoder_f SET_OF_encode_der; xer_type_decoder_f SET_OF_decode_xer; xer_type_encoder_f SET_OF_encode_xer; oer_type_decoder_f SET_OF_decode_oer; oer_type_encoder_f SET_OF_encode_oer; per_type_decoder_f SET_OF_decode_uper; per_type_encoder_f SET_OF_encode_uper; per_type_decoder_f SET_OF_decode_aper; per_type_encoder_f SET_OF_encode_aper; asn_random_fill_f SET_OF_random_fill; extern asn_TYPE_operation_t asn_OP_SET_OF; #ifdef __cplusplus } #endif #endif /* CONSTR_SET_OF_H */ nextepc-0.3.10/lib/s1ap/asn1c/constr_SET_OF_oer.c000066400000000000000000000175131333553357400213220ustar00rootroot00000000000000/* * Copyright (c) 2017 Lev Walkin . * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef ASN_DISABLE_OER_SUPPORT #include #include #include #include /* * This macro "eats" the part of the buffer which is definitely "consumed", * i.e. was correctly converted into local representation or rightfully skipped. */ #undef ADVANCE #define ADVANCE(num_bytes) \ do { \ size_t num = num_bytes; \ ptr = ((const char *)ptr) + num; \ size -= num; \ consumed_myself += num; \ } while(0) /* * Switch to the next phase of parsing. */ #undef NEXT_PHASE #define NEXT_PHASE(ctx) \ do { \ ctx->phase++; \ ctx->step = 0; \ } while(0) #undef SET_PHASE #define SET_PHASE(ctx, value) \ do { \ ctx->phase = value; \ ctx->step = 0; \ } while(0) /* * Return a standardized complex structure. */ #undef RETURN #define RETURN(_code) \ do { \ asn_dec_rval_t rval; \ rval.code = _code; \ rval.consumed = consumed_myself; \ return rval; \ } while(0) /* * The SEQUENCE OF and SET OF values utilize a "quantity field". * It is is a pointless combination of #8.6 (length determinant, capable * of encoding tiny and huge numbers in the shortest possible number of octets) * and the variable sized integer. What could have been encoded by #8.6 alone * is required to be encoded by #8.6 followed by that number of unsigned octets. * This doesn't make too much sense. It seems that the original version of OER * standard have been using the unconstrained unsigned integer as a quantity * field, and this legacy have gone through ISO/ITU-T standardization process. */ static ssize_t oer_fetch_quantity(const void *ptr, size_t size, size_t *qty_r) { const uint8_t *b; const uint8_t *bend; size_t len = 0; size_t qty; ssize_t len_len = oer_fetch_length(ptr, size, &len); if(len_len <= 0) { *qty_r = 0; return len_len; } if((len_len + len) > size) { *qty_r = 0; return 0; } b = (const uint8_t *)ptr + len_len; bend = b + len; /* Skip the leading 0-bytes */ for(; b < bend && *b == 0; b++) { } if((bend - b) > (ssize_t)sizeof(size_t)) { /* Length is not representable by the native size_t type */ *qty_r = 0; return -1; } for(qty = 0; b < bend; b++) { qty = (qty << 8) + *b; } if(qty > RSIZE_MAX) { /* A bit of C11 validation */ *qty_r = 0; return -1; } *qty_r = qty; assert((size_t)len_len + len == (size_t)(bend - (const uint8_t *)ptr)); return len_len + len; } asn_dec_rval_t SET_OF_decode_oer(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_oer_constraints_t *constraints, void **struct_ptr, const void *ptr, size_t size) { const asn_SET_OF_specifics_t *specs = (const asn_SET_OF_specifics_t *)td->specifics; asn_dec_rval_t rval = {RC_OK, 0}; void *st = *struct_ptr; /* Target structure */ asn_struct_ctx_t *ctx; /* Decoder context */ size_t consumed_myself = 0; /* Consumed bytes from ptr. */ (void)constraints; if(ASN__STACK_OVERFLOW_CHECK(opt_codec_ctx)) ASN__DECODE_FAILED; /* * Create the target structure if it is not present already. */ if(st == 0) { st = *struct_ptr = CALLOC(1, specs->struct_size); if(st == 0) { RETURN(RC_FAIL); } } /* * Restore parsing context. */ ctx = (asn_struct_ctx_t *)((char *)st + specs->ctx_offset); /* * Start to parse where left previously. */ switch(ctx->phase) { case 0: { /* * Fetch number of elements to decode. */ size_t length = 0; size_t len_size = oer_fetch_quantity(ptr, size, &length); switch(len_size) { case 0: RETURN(RC_WMORE); case -1: RETURN(RC_FAIL); default: ADVANCE(len_size); ctx->left = length; } } NEXT_PHASE(ctx); /* FALL THROUGH */ case 1: { /* Decode components of the extension root */ asn_TYPE_member_t *elm = td->elements; asn_anonymous_set_ *list = _A_SET_FROM_VOID(st); const void *base_ptr = ptr; ber_tlv_len_t base_ctx_left = ctx->left; assert(td->elements_count == 1); ASN_DEBUG("OER SET OF %s Decoding PHASE 1", td->name); for(; ctx->left > 0; ctx->left--) { asn_dec_rval_t rv = elm->type->op->oer_decoder( opt_codec_ctx, elm->type, elm->encoding_constraints.oer_constraints, &ctx->ptr, ptr, size); ADVANCE(rv.consumed); switch(rv.code) { case RC_OK: if(ASN_SET_ADD(list, ctx->ptr) != 0) { RETURN(RC_FAIL); } else { ctx->ptr = 0; /* * This check is to avoid compression bomb with * specs like SEQUENCE/SET OF NULL which don't * consume data at all. */ if(rv.consumed == 0 && base_ptr == ptr && (base_ctx_left - ctx->left) > 200) { ASN__DECODE_FAILED; } break; } case RC_WMORE: RETURN(RC_WMORE); case RC_FAIL: ASN_STRUCT_FREE(*elm->type, ctx->ptr); ctx->ptr = 0; SET_PHASE(ctx, 3); RETURN(RC_FAIL); } } /* Decoded decently. */ NEXT_PHASE(ctx); } /* Fall through */ case 2: /* Ignore fully decoded */ assert(ctx->left == 0); RETURN(RC_OK); case 3: /* Failed to decode. */ RETURN(RC_FAIL); } return rval; } static ssize_t oer_put_quantity(size_t qty, asn_app_consume_bytes_f *cb, void *app_key) { uint8_t buf[1 + sizeof(size_t)]; uint8_t *b = &buf[sizeof(size_t)]; /* Last addressable */ size_t encoded; do { *b-- = qty; qty >>= 8; } while(qty); *b = sizeof(buf) - (b-buf) - 1; encoded = sizeof(buf) - (b-buf); if(cb(b, encoded, app_key) < 0) return -1; return encoded; } /* * Encode as Canonical OER. */ asn_enc_rval_t SET_OF_encode_oer(const asn_TYPE_descriptor_t *td, const asn_oer_constraints_t *constraints, const void *sptr, asn_app_consume_bytes_f *cb, void *app_key) { const asn_TYPE_member_t *elm; const asn_anonymous_set_ *list; size_t computed_size = 0; ssize_t qty_len; int n; (void)constraints; if(!sptr) ASN__ENCODE_FAILED; elm = td->elements; list = _A_CSET_FROM_VOID(sptr); qty_len = oer_put_quantity(list->count, cb, app_key); if(qty_len < 0) { ASN__ENCODE_FAILED; } computed_size += qty_len; for(n = 0; n < list->count; n++) { void *memb_ptr = list->array[n]; asn_enc_rval_t er; er = elm->type->op->oer_encoder( elm->type, elm->encoding_constraints.oer_constraints, memb_ptr, cb, app_key); if(er.encoded < 0) { return er; } else { computed_size += er.encoded; } } { asn_enc_rval_t erval; erval.encoded = computed_size; ASN__ENCODED_OK(erval); } } #endif /* ASN_DISABLE_OER_SUPPORT */ nextepc-0.3.10/lib/s1ap/asn1c/constr_TYPE.c000066400000000000000000000034731333553357400202170ustar00rootroot00000000000000/*- * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include /* * Version of the ASN.1 infrastructure shipped with compiler. */ int get_asn1c_environment_version() { return ASN1C_ENVIRONMENT_VERSION; } static asn_app_consume_bytes_f _print2fp; /* * Return the outmost tag of the type. */ ber_tlv_tag_t asn_TYPE_outmost_tag(const asn_TYPE_descriptor_t *type_descriptor, const void *struct_ptr, int tag_mode, ber_tlv_tag_t tag) { if(tag_mode) return tag; if(type_descriptor->tags_count) return type_descriptor->tags[0]; return type_descriptor->op->outmost_tag(type_descriptor, struct_ptr, 0, 0); } /* * Print the target language's structure in human readable form. */ int asn_fprint(FILE *stream, const asn_TYPE_descriptor_t *td, const void *struct_ptr) { if(!stream) stream = stdout; if(!td || !struct_ptr) { errno = EINVAL; return -1; } /* Invoke type-specific printer */ if(td->op->print_struct(td, struct_ptr, 1, _print2fp, stream)) { return -1; } /* Terminate the output */ if(_print2fp("\n", 1, stream)) { return -1; } return fflush(stream); } /* Dump the data into the specified stdio stream */ static int _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; } /* * Some compilers do not support variable args macros. * This function is a replacement of ASN_DEBUG() macro. */ void ASN_DEBUG_f(const char *fmt, ...); void ASN_DEBUG_f(const char *fmt, ...) { va_list ap; va_start(ap, fmt); vfprintf(stderr, fmt, ap); fprintf(stderr, "\n"); va_end(ap); } nextepc-0.3.10/lib/s1ap/asn1c/constr_TYPE.h000066400000000000000000000240051333553357400202160ustar00rootroot00000000000000/* * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ /* * This file contains the declaration structure called "ASN.1 Type Definition", * which holds all information necessary for encoding and decoding routines. * This structure even contains pointer to these encoding and decoding routines * for each defined ASN.1 type. */ #ifndef _CONSTR_TYPE_H_ #define _CONSTR_TYPE_H_ #include #include #ifdef __cplusplus extern "C" { #endif struct asn_TYPE_descriptor_s; /* Forward declaration */ struct asn_TYPE_member_s; /* Forward declaration */ /* * This type provides the context information for various ASN.1 routines, * primarily ones doing decoding. A member _asn_ctx of this type must be * included into certain target language's structures, such as compound types. */ typedef struct asn_struct_ctx_s { short phase; /* Decoding phase */ short step; /* Elementary step of a phase */ int context; /* Other context information */ void *ptr; /* Decoder-specific stuff (stack elements) */ ber_tlv_len_t left; /* Number of bytes left, -1 for indefinite */ } asn_struct_ctx_t; #include /* Basic Encoding Rules decoder */ #include /* Distinguished Encoding Rules encoder */ #include /* Decoder of XER (XML, text) */ #include /* Encoder into XER (XML, text) */ #include /* Packet Encoding Rules decoder */ #include /* Packet Encoding Rules encoder */ #include /* Subtype constraints support */ #include /* Random structures support */ #ifdef ASN_DISABLE_OER_SUPPORT typedef void (oer_type_decoder_f)(); typedef void (oer_type_encoder_f)(); typedef void asn_oer_constraints_t; #else #include /* Octet Encoding Rules encoder */ #include /* Octet Encoding Rules encoder */ #endif /* * Free the structure according to its specification. * Use one of ASN_STRUCT_{FREE,RESET,CONTENTS_ONLY} macros instead. * Do not use directly. */ enum asn_struct_free_method { ASFM_FREE_EVERYTHING, /* free(struct_ptr) and underlying members */ ASFM_FREE_UNDERLYING, /* free underlying members */ ASFM_FREE_UNDERLYING_AND_RESET /* FREE_UNDERLYING + memset(0) */ }; typedef void (asn_struct_free_f)( const struct asn_TYPE_descriptor_s *type_descriptor, void *struct_ptr, enum asn_struct_free_method); /* * Free the structure including freeing the memory pointed to by ptr itself. */ #define ASN_STRUCT_FREE(asn_DEF, ptr) \ (asn_DEF).op->free_struct(&(asn_DEF), (ptr), ASFM_FREE_EVERYTHING) /* * Free the memory used by the members of the structure without freeing the * the structure pointer itself. * ZERO-OUT the structure to the safe clean state. * (Retaining the pointer may be useful in case the structure is allocated * statically or arranged on the stack, yet its elements are dynamic.) */ #define ASN_STRUCT_RESET(asn_DEF, ptr) \ (asn_DEF).op->free_struct(&(asn_DEF), (ptr), ASFM_FREE_UNDERLYING_AND_RESET) /* * Free memory used by the members of the structure without freeing * the structure pointer itself. * (Retaining the pointer may be useful in case the structure is allocated * statically or arranged on the stack, yet its elements are dynamic.) * AVOID using it in the application code; * Use a safer ASN_STRUCT_RESET() instead. */ #define ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF, ptr) \ (asn_DEF).op->free_struct(&(asn_DEF), (ptr), ASFM_FREE_UNDERLYING) /* * Print the structure according to its specification. */ typedef int(asn_struct_print_f)( const struct asn_TYPE_descriptor_s *type_descriptor, const void *struct_ptr, int level, /* Indentation level */ asn_app_consume_bytes_f *callback, void *app_key); /* * Compare two structs between each other. * Returns <0 if struct_A is "smaller" than struct_B, >0 if "greater", * and =0 if "equal to", for some type-specific, stable definition of * "smaller", "greater" and "equal to". */ typedef int (asn_struct_compare_f)( const struct asn_TYPE_descriptor_s *type_descriptor, const void *struct_A, const void *struct_B); /* * Return the outmost tag of the type. * If the type is untagged CHOICE, the dynamic operation is performed. * NOTE: This function pointer type is only useful internally. * Do not use it in your application. */ typedef ber_tlv_tag_t (asn_outmost_tag_f)( const struct asn_TYPE_descriptor_s *type_descriptor, const void *struct_ptr, int tag_mode, ber_tlv_tag_t tag); /* The instance of the above function type; used internally. */ asn_outmost_tag_f asn_TYPE_outmost_tag; /* * Fetch the desired type of the Open Type based on the * Information Object Set driven constraints. */ typedef struct asn_type_selector_result_s { const struct asn_TYPE_descriptor_s *type_descriptor; /* Type encoded. */ unsigned presence_index; /* Associated choice variant. */ } asn_type_selector_result_t; typedef asn_type_selector_result_t(asn_type_selector_f)( const struct asn_TYPE_descriptor_s *parent_type_descriptor, const void *parent_structure_ptr); /* * Generalized functions for dealing with the speciic type. * May be directly invoked by applications. */ typedef struct asn_TYPE_operation_s { asn_struct_free_f *free_struct; /* Free the structure */ asn_struct_print_f *print_struct; /* Human readable output */ asn_struct_compare_f *compare_struct; /* Compare two structures */ ber_type_decoder_f *ber_decoder; /* Generic BER decoder */ der_type_encoder_f *der_encoder; /* Canonical DER encoder */ xer_type_decoder_f *xer_decoder; /* Generic XER decoder */ xer_type_encoder_f *xer_encoder; /* [Canonical] XER encoder */ oer_type_decoder_f *oer_decoder; /* Generic OER decoder */ oer_type_encoder_f *oer_encoder; /* Canonical OER encoder */ per_type_decoder_f *uper_decoder; /* Unaligned PER decoder */ per_type_encoder_f *uper_encoder; /* Unaligned PER encoder */ per_type_decoder_f *aper_decoder; /* Aligned PER decoder */ per_type_encoder_f *aper_encoder; /* Aligned PER encoder */ asn_random_fill_f *random_fill; /* Initialize with a random value */ asn_outmost_tag_f *outmost_tag; /* */ } asn_TYPE_operation_t; /* * A constraints tuple specifying both the OER and PER constraints. */ typedef struct asn_encoding_constraints_s { const struct asn_oer_constraints_s *oer_constraints; const struct asn_per_constraints_s *per_constraints; asn_constr_check_f *general_constraints; } asn_encoding_constraints_t; /* * The definitive description of the destination language's structure. */ typedef struct asn_TYPE_descriptor_s { const char *name; /* A name of the ASN.1 type. "" in some cases. */ const char *xml_tag; /* Name used in XML tag */ /* * Generalized functions for dealing with the specific type. * May be directly invoked by applications. */ asn_TYPE_operation_t *op; /*********************************************************************** * Internally useful members. Not to be used by applications directly. * **********************************************************************/ /* * Tags that are expected to occur. */ const ber_tlv_tag_t *tags; /* Effective tags sequence for this type */ unsigned tags_count; /* Number of tags which are expected */ const ber_tlv_tag_t *all_tags; /* Every tag for BER/containment */ unsigned all_tags_count; /* Number of tags */ /* OER, PER, and general constraints */ asn_encoding_constraints_t encoding_constraints; /* * An ASN.1 production type members (members of SEQUENCE, SET, CHOICE). */ struct asn_TYPE_member_s *elements; unsigned elements_count; /* * Additional information describing the type, used by appropriate * functions above. */ const void *specifics; } asn_TYPE_descriptor_t; /* * This type describes an element of the constructed type, * i.e. SEQUENCE, SET, CHOICE, etc. */ enum asn_TYPE_flags_e { ATF_NOFLAGS, ATF_POINTER = 0x01, /* Represented by the pointer */ ATF_OPEN_TYPE = 0x02, /* Open Type */ ATF_ANY_TYPE = 0x04 /* ANY type (deprecated!) */ }; typedef struct asn_TYPE_member_s { enum asn_TYPE_flags_e flags; /* Element's presentation flags */ unsigned optional; /* Following optional members, including current */ unsigned memb_offset; /* Offset of the element */ ber_tlv_tag_t tag; /* Outmost (most immediate) tag */ int tag_mode; /* IMPLICIT/no/EXPLICIT tag at current level */ asn_TYPE_descriptor_t *type; /* Member type descriptor */ asn_type_selector_f *type_selector; /* IoS runtime type selector */ asn_encoding_constraints_t encoding_constraints; int (*default_value_cmp)(const void *sptr); /* Compare DEFAULT */ int (*default_value_set)(void **sptr); /* Set DEFAULT */ const char *name; /* ASN.1 identifier of the element */ } asn_TYPE_member_t; /* * BER tag to element number mapping. */ typedef struct asn_TYPE_tag2member_s { ber_tlv_tag_t el_tag; /* Outmost tag of the member */ unsigned el_no; /* Index of the associated member, base 0 */ int toff_first; /* First occurence of the el_tag, relative */ int toff_last; /* Last occurence of the el_tag, relative */ } asn_TYPE_tag2member_t; /* * This function prints out the contents of the target language's structure * (struct_ptr) into the file pointer (stream) in human readable form. * RETURN VALUES: * 0: The structure is printed. * -1: Problem dumping the structure. * (See also xer_fprint() in xer_encoder.h) */ int asn_fprint(FILE *stream, /* Destination stream descriptor */ const asn_TYPE_descriptor_t *td, /* ASN.1 type descriptor */ const void *struct_ptr); /* Structure to be printed */ #ifdef __cplusplus } #endif #endif /* _CONSTR_TYPE_H_ */ nextepc-0.3.10/lib/s1ap/asn1c/constraints.c000066400000000000000000000046451333553357400204170ustar00rootroot00000000000000#include #include int asn_generic_no_constraint(const asn_TYPE_descriptor_t *type_descriptor, const void *struct_ptr, asn_app_constraint_failed_f *cb, void *key) { (void)type_descriptor; /* Unused argument */ (void)struct_ptr; /* Unused argument */ (void)cb; /* Unused argument */ (void)key; /* Unused argument */ /* Nothing to check */ return 0; } int asn_generic_unknown_constraint(const asn_TYPE_descriptor_t *type_descriptor, const void *struct_ptr, asn_app_constraint_failed_f *cb, void *key) { (void)type_descriptor; /* Unused argument */ (void)struct_ptr; /* Unused argument */ (void)cb; /* Unused argument */ (void)key; /* Unused argument */ /* Unknown how to check */ return 0; } struct errbufDesc { const asn_TYPE_descriptor_t *failed_type; const void *failed_struct_ptr; char *errbuf; size_t errlen; }; static void _asn_i_ctfailcb(void *key, const asn_TYPE_descriptor_t *td, const void *sptr, const char *fmt, ...) { struct errbufDesc *arg = key; va_list ap; ssize_t vlen; ssize_t maxlen; arg->failed_type = td; arg->failed_struct_ptr = sptr; maxlen = arg->errlen; if(maxlen <= 0) return; va_start(ap, fmt); vlen = vsnprintf(arg->errbuf, maxlen, fmt, ap); va_end(ap); if(vlen >= maxlen) { arg->errbuf[maxlen-1] = '\0'; /* Ensuring libc correctness */ arg->errlen = maxlen - 1; /* Not counting termination */ return; } else if(vlen >= 0) { arg->errbuf[vlen] = '\0'; /* Ensuring libc correctness */ arg->errlen = vlen; /* Not counting termination */ } else { /* * The libc on this system is broken. */ vlen = sizeof("") - 1; maxlen--; arg->errlen = vlen < maxlen ? vlen : maxlen; memcpy(arg->errbuf, "", arg->errlen); arg->errbuf[arg->errlen] = 0; } return; } int asn_check_constraints(const asn_TYPE_descriptor_t *type_descriptor, const void *struct_ptr, char *errbuf, size_t *errlen) { struct errbufDesc arg; int ret; arg.failed_type = 0; arg.failed_struct_ptr = 0; arg.errbuf = errbuf; arg.errlen = errlen ? *errlen : 0; ret = type_descriptor->encoding_constraints.general_constraints( type_descriptor, struct_ptr, _asn_i_ctfailcb, &arg); if(ret == -1 && errlen) *errlen = arg.errlen; return ret; } nextepc-0.3.10/lib/s1ap/asn1c/constraints.h000066400000000000000000000037271333553357400204240ustar00rootroot00000000000000/*- * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef ASN1_CONSTRAINTS_VALIDATOR_H #define ASN1_CONSTRAINTS_VALIDATOR_H #include /* Platform-dependent types */ #ifdef __cplusplus extern "C" { #endif struct asn_TYPE_descriptor_s; /* Forward declaration */ /* * Validate the structure according to the ASN.1 constraints. * If errbuf and errlen are given, they shall be pointing to the appropriate * buffer space and its length before calling this function. Alternatively, * they could be passed as NULL's. If constraints validation fails, * errlen will contain the actual number of bytes taken from the errbuf * to encode an error message (properly 0-terminated). * * RETURN VALUES: * This function returns 0 in case all ASN.1 constraints are met * and -1 if one or more constraints were failed. */ int asn_check_constraints( const struct asn_TYPE_descriptor_s *type_descriptor, const void *struct_ptr, /* Target language's structure */ char *errbuf, /* Returned error description */ size_t *errlen /* Length of the error description */ ); /* * Generic type for constraint checking callback, * associated with every type descriptor. */ typedef int(asn_constr_check_f)( const struct asn_TYPE_descriptor_s *type_descriptor, const void *struct_ptr, asn_app_constraint_failed_f *optional_callback, /* Log the error */ void *optional_app_key /* Opaque key passed to a callback */ ); /******************************* * INTERNALLY USEFUL FUNCTIONS * *******************************/ asn_constr_check_f asn_generic_no_constraint; /* No constraint whatsoever */ asn_constr_check_f asn_generic_unknown_constraint; /* Not fully supported */ /* * Invoke the callback with a complete error message. */ #define ASN__CTFAIL if(ctfailcb) ctfailcb #ifdef __cplusplus } #endif #endif /* ASN1_CONSTRAINTS_VALIDATOR_H */ nextepc-0.3.10/lib/s1ap/asn1c/der_encoder.c000066400000000000000000000123101333553357400203050ustar00rootroot00000000000000/*- * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include static ssize_t der_write_TL(ber_tlv_tag_t tag, ber_tlv_len_t len, asn_app_consume_bytes_f *cb, void *app_key, int constructed); /* * The DER encoder of any type. */ asn_enc_rval_t der_encode(const asn_TYPE_descriptor_t *type_descriptor, const void *struct_ptr, asn_app_consume_bytes_f *consume_bytes, void *app_key) { ASN_DEBUG("DER encoder invoked for %s", type_descriptor->name); /* * Invoke type-specific encoder. */ return type_descriptor->op->der_encoder( type_descriptor, struct_ptr, /* Pointer to the destination structure */ 0, 0, consume_bytes, app_key); } /* * Argument type and callback necessary for der_encode_to_buffer(). */ typedef struct enc_to_buf_arg { void *buffer; size_t left; } enc_to_buf_arg; static int encode_to_buffer_cb(const void *buffer, size_t size, void *key) { enc_to_buf_arg *arg = (enc_to_buf_arg *)key; if(arg->left < size) return -1; /* Data exceeds the available buffer size */ memcpy(arg->buffer, buffer, size); arg->buffer = ((char *)arg->buffer) + size; arg->left -= size; return 0; } /* * A variant of the der_encode() which encodes the data into the provided buffer */ asn_enc_rval_t der_encode_to_buffer(const asn_TYPE_descriptor_t *type_descriptor, const void *struct_ptr, void *buffer, size_t buffer_size) { enc_to_buf_arg arg; asn_enc_rval_t ec; arg.buffer = buffer; arg.left = buffer_size; ec = type_descriptor->op->der_encoder(type_descriptor, struct_ptr, /* Pointer to the destination structure */ 0, 0, encode_to_buffer_cb, &arg); if(ec.encoded != -1) { assert(ec.encoded == (ssize_t)(buffer_size - arg.left)); /* Return the encoded contents size */ } return ec; } /* * Write out leading TL[v] sequence according to the type definition. */ ssize_t der_write_tags(const asn_TYPE_descriptor_t *sd, size_t struct_length, int tag_mode, int last_tag_form, ber_tlv_tag_t tag, /* EXPLICIT or IMPLICIT tag */ asn_app_consume_bytes_f *cb, void *app_key) { #define ASN1_DER_MAX_TAGS_COUNT 4 ber_tlv_tag_t tags_buf_scratch[ASN1_DER_MAX_TAGS_COUNT * sizeof(ber_tlv_tag_t)]; ssize_t lens[ASN1_DER_MAX_TAGS_COUNT * sizeof(ssize_t)]; const ber_tlv_tag_t *tags; /* Copy of tags stream */ int tags_count; /* Number of tags */ size_t overall_length; int i; ASN_DEBUG("Writing tags (%s, tm=%d, tc=%d, tag=%s, mtc=%d)", sd->name, tag_mode, sd->tags_count, ber_tlv_tag_string(tag), tag_mode ?(sd->tags_count+1 -((tag_mode == -1) && sd->tags_count)) :sd->tags_count ); if(sd->tags_count + 1 > ASN1_DER_MAX_TAGS_COUNT) { ASN_DEBUG("System limit %d on tags count", ASN1_DER_MAX_TAGS_COUNT); return -1; } if(tag_mode) { /* * Instead of doing shaman dance like we do in ber_check_tags(), * allocate a small array on the stack * and initialize it appropriately. */ int stag_offset; ber_tlv_tag_t *tags_buf = tags_buf_scratch; tags_count = sd->tags_count + 1 /* EXPLICIT or IMPLICIT tag is given */ - ((tag_mode == -1) && sd->tags_count); /* Copy tags over */ tags_buf[0] = tag; stag_offset = -1 + ((tag_mode == -1) && sd->tags_count); for(i = 1; i < tags_count; i++) tags_buf[i] = sd->tags[i + stag_offset]; tags = tags_buf; } else { tags = sd->tags; tags_count = sd->tags_count; } /* No tags to write */ if(tags_count == 0) return 0; /* * Array of tags is initialized. * Now, compute the size of the TLV pairs, from right to left. */ overall_length = struct_length; for(i = tags_count - 1; i >= 0; --i) { lens[i] = der_write_TL(tags[i], overall_length, 0, 0, 0); if(lens[i] == -1) return -1; overall_length += lens[i]; lens[i] = overall_length - lens[i]; } if(!cb) return overall_length - struct_length; ASN_DEBUG("Encoding %s TL sequence (%d elements)", sd->name, tags_count); /* * Encode the TL sequence for real. */ for(i = 0; i < tags_count; i++) { ssize_t len; int _constr; /* Check if this tag happens to be constructed */ _constr = (last_tag_form || i < (tags_count - 1)); len = der_write_TL(tags[i], lens[i], cb, app_key, _constr); if(len == -1) return -1; } return overall_length - struct_length; } static ssize_t der_write_TL(ber_tlv_tag_t tag, ber_tlv_len_t len, asn_app_consume_bytes_f *cb, void *app_key, int constructed) { uint8_t buf[32]; size_t size = 0; int buf_size = cb?sizeof(buf):0; ssize_t tmp; /* Serialize tag (T from TLV) into possibly zero-length buffer */ tmp = ber_tlv_tag_serialize(tag, buf, buf_size); if(tmp == -1 || tmp > (ssize_t)sizeof(buf)) return -1; size += tmp; /* Serialize length (L from TLV) into possibly zero-length buffer */ tmp = der_tlv_length_serialize(len, buf+size, buf_size?buf_size-size:0); if(tmp == -1) return -1; size += tmp; if(size > sizeof(buf)) return -1; /* * If callback is specified, invoke it, and check its return value. */ if(cb) { if(constructed) *buf |= 0x20; if(cb(buf, size, app_key) < 0) return -1; } return size; } nextepc-0.3.10/lib/s1ap/asn1c/der_encoder.h000066400000000000000000000044101333553357400203140ustar00rootroot00000000000000/*- * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _DER_ENCODER_H_ #define _DER_ENCODER_H_ #include #ifdef __cplusplus extern "C" { #endif struct asn_TYPE_descriptor_s; /* Forward declaration */ /* * The DER encoder of any type. May be invoked by the application. * Produces DER- and BER-compliant encoding. (DER is a subset of BER). * * NOTE: Use the ber_decode() function (ber_decoder.h) to decode data * produced by der_encode(). */ asn_enc_rval_t der_encode(const struct asn_TYPE_descriptor_s *type_descriptor, const void *struct_ptr, /* Structure to be encoded */ asn_app_consume_bytes_f *consume_bytes_cb, void *app_key /* Arbitrary callback argument */ ); /* A variant of der_encode() which encodes data into the pre-allocated buffer */ asn_enc_rval_t der_encode_to_buffer( const struct asn_TYPE_descriptor_s *type_descriptor, const void *struct_ptr, /* Structure to be encoded */ void *buffer, /* Pre-allocated buffer */ size_t buffer_size /* Initial buffer size (maximum) */ ); /* * Type of the generic DER encoder. */ typedef asn_enc_rval_t(der_type_encoder_f)( const struct asn_TYPE_descriptor_s *type_descriptor, const void *struct_ptr, /* Structure to be encoded */ int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ ber_tlv_tag_t tag, asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */ void *app_key /* Arbitrary callback argument */ ); /******************************* * INTERNALLY USEFUL FUNCTIONS * *******************************/ /* * Write out leading TL[v] sequence according to the type definition. */ ssize_t der_write_tags(const struct asn_TYPE_descriptor_s *type_descriptor, size_t struct_length, int tag_mode, /* {-1,0,1}: IMPLICIT, no, EXPLICIT */ int last_tag_form, /* {0,!0}: prim, constructed */ ber_tlv_tag_t tag, asn_app_consume_bytes_f *consume_bytes_cb, void *app_key); #ifdef __cplusplus } #endif #endif /* _DER_ENCODER_H_ */ nextepc-0.3.10/lib/s1ap/asn1c/oer_decoder.c000066400000000000000000000107001333553357400203070ustar00rootroot00000000000000/* * Copyright (c) 2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include /* * The OER decoder of any type. */ asn_dec_rval_t oer_decode(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *type_descriptor, void **struct_ptr, const void *ptr, size_t size) { asn_codec_ctx_t s_codec_ctx; /* * Stack checker requires that the codec context * must be allocated on the stack. */ if(opt_codec_ctx) { if(opt_codec_ctx->max_stack_size) { s_codec_ctx = *opt_codec_ctx; opt_codec_ctx = &s_codec_ctx; } } else { /* If context is not given, be security-conscious anyway */ memset(&s_codec_ctx, 0, sizeof(s_codec_ctx)); s_codec_ctx.max_stack_size = ASN__DEFAULT_STACK_MAX; opt_codec_ctx = &s_codec_ctx; } /* * Invoke type-specific decoder. */ return type_descriptor->op->oer_decoder(opt_codec_ctx, type_descriptor, 0, struct_ptr, /* Pointer to the destination structure */ ptr, size /* Buffer and its size */ ); } /* * Open Type is encoded as a length (#8.6) followed by that number of bytes. * Since we're just skipping, reading the length would be enough. */ ssize_t oer_open_type_skip(const void *bufptr, size_t size) { size_t len = 0; return oer_fetch_length(bufptr, size, &len); } /* * Read the Open Type (X.696 (08/2015), #30). * RETURN VALUES: * 0: More data expected than bufptr contains. * -1: Fatal error deciphering length. * >0: Number of bytes used from bufptr. */ ssize_t oer_open_type_get(const asn_codec_ctx_t *opt_codec_ctx, const struct asn_TYPE_descriptor_s *td, const asn_oer_constraints_t *constraints, void **struct_ptr, const void *bufptr, size_t size) { asn_dec_rval_t dr; size_t container_len = 0; ssize_t len_len; enum asn_struct_free_method dispose_method = (*struct_ptr) ? ASFM_FREE_UNDERLYING_AND_RESET : ASFM_FREE_EVERYTHING; /* Get the size of a length determinant */ len_len = oer_fetch_length(bufptr, size, &container_len); if(len_len <= 0) { return len_len; /* Error or more data expected */ } /* * len_len can't be bigger than size, but size without len_len * should be bigger or equal to container length */ if(size - len_len < container_len) { /* More data is expected */ return 0; } dr = td->op->oer_decoder(opt_codec_ctx, td, constraints, struct_ptr, (const uint8_t *)bufptr + len_len, container_len); if(dr.code == RC_OK) { return len_len + container_len; } else { /* Even if RC_WMORE, we can't get more data into a closed container. */ td->op->free_struct(td, *struct_ptr, dispose_method); *struct_ptr = NULL; return -1; } } asn_dec_rval_t oer_decode_primitive(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_oer_constraints_t *constraints, void **sptr, const void *ptr, size_t size) { ASN__PRIMITIVE_TYPE_t *st = (ASN__PRIMITIVE_TYPE_t *)*sptr; asn_dec_rval_t rval = {RC_OK, 0}; size_t expected_length = 0; ssize_t len_len; (void)td; (void)opt_codec_ctx; (void)constraints; if(!st) { st = (ASN__PRIMITIVE_TYPE_t *)(*sptr = CALLOC( 1, sizeof(ASN__PRIMITIVE_TYPE_t))); if(!st) ASN__DECODE_FAILED; } /* * X.696 (08/2015) #27.2 * Encode length determinant as _number of octets_, but only * if upper bound is not equal to lower bound. */ len_len = oer_fetch_length(ptr, size, &expected_length); if(len_len > 0) { rval.consumed = len_len; ptr = (const char *)ptr + len_len; size -= len_len; } else if(len_len == 0) { ASN__DECODE_STARVED; } else if(len_len < 0) { ASN__DECODE_FAILED; } if(size < expected_length) { ASN__DECODE_STARVED; } else { uint8_t *buf = MALLOC(expected_length + 1); if(buf == NULL) { ASN__DECODE_FAILED; } else { memcpy(buf, ptr, expected_length); buf[expected_length] = '\0'; } FREEMEM(st->buf); st->buf = buf; st->size = expected_length; rval.consumed += expected_length; return rval; } } nextepc-0.3.10/lib/s1ap/asn1c/oer_decoder.h000066400000000000000000000042141333553357400203170ustar00rootroot00000000000000/* * Copyright (c) 2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef OER_DECODER_H #define OER_DECODER_H #include #include #ifdef __cplusplus extern "C" { #endif struct asn_TYPE_descriptor_s; /* Forward declaration */ struct asn_codec_ctx_s; /* Forward declaration */ /* * The Octet Encoding Rules (OER, X.696 08/2015) decoder for any given type. * This function may be invoked directly by the application. * Parses CANONICAL-OER and BASIC-OER. */ asn_dec_rval_t oer_decode(const struct asn_codec_ctx_s *opt_codec_ctx, const struct asn_TYPE_descriptor_s *type_descriptor, void **struct_ptr, /* Pointer to a target structure's pointer */ const void *buffer, /* Data to be decoded */ size_t size /* Size of that buffer */ ); /* * Type of generic function which decodes the byte stream into the structure. */ typedef asn_dec_rval_t(oer_type_decoder_f)( const struct asn_codec_ctx_s *opt_codec_ctx, const struct asn_TYPE_descriptor_s *type_descriptor, const asn_oer_constraints_t *constraints, void **struct_ptr, const void *buf_ptr, size_t size); /* * Swallow the Open Type (X.696 (08/2015), #30) into /dev/null. * RETURN VALUES: * -1: Fatal error deciphering length. * 0: More data expected than bufptr contains. * >0: Number of bytes used from bufptr. */ ssize_t oer_open_type_skip(const void *bufptr, size_t size); /* * Read the Open Type (X.696 (08/2015), #30). * RETURN VALUES: * 0: More data expected than bufptr contains. * -1: Fatal error deciphering length. * >0: Number of bytes used from bufptr. */ ssize_t oer_open_type_get(const asn_codec_ctx_t *opt_codec_ctx, const struct asn_TYPE_descriptor_s *td, const asn_oer_constraints_t *constraints, void **struct_ptr, const void *bufptr, size_t size); /* * Length-prefixed buffer decoding for primitive types. */ oer_type_decoder_f oer_decode_primitive; #ifdef __cplusplus } #endif #endif /* OER_DECODER_H */ nextepc-0.3.10/lib/s1ap/asn1c/oer_encoder.c000066400000000000000000000101561333553357400203260ustar00rootroot00000000000000/* * Copyright (c) 2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include /* * The OER encoder of any type. */ asn_enc_rval_t oer_encode(const asn_TYPE_descriptor_t *type_descriptor, const void *struct_ptr, asn_app_consume_bytes_f *consume_bytes, void *app_key) { ASN_DEBUG("OER encoder invoked for %s", type_descriptor->name); /* * Invoke type-specific encoder. */ return type_descriptor->op->oer_encoder( type_descriptor, 0, struct_ptr, /* Pointer to the destination structure */ consume_bytes, app_key); } /* * Argument type and callback necessary for oer_encode_to_buffer(). */ typedef struct enc_to_buf_arg { void *buffer; size_t left; } enc_to_buf_arg; static int encode_to_buffer_cb(const void *buffer, size_t size, void *key) { enc_to_buf_arg *arg = (enc_to_buf_arg *)key; if(arg->left < size) return -1; /* Data exceeds the available buffer size */ memcpy(arg->buffer, buffer, size); arg->buffer = ((char *)arg->buffer) + size; arg->left -= size; return 0; } /* * A variant of the oer_encode() which encodes the data into the provided buffer */ asn_enc_rval_t oer_encode_to_buffer(const asn_TYPE_descriptor_t *type_descriptor, const asn_oer_constraints_t *constraints, const void *struct_ptr, /* Structure to be encoded */ void *buffer, /* Pre-allocated buffer */ size_t buffer_size /* Initial buffer size (maximum) */ ) { enc_to_buf_arg arg; asn_enc_rval_t ec; arg.buffer = buffer; arg.left = buffer_size; if(type_descriptor->op->oer_encoder == NULL) { ec.encoded = -1; ec.failed_type = type_descriptor; ec.structure_ptr = struct_ptr; ASN_DEBUG("OER encoder is not defined for %s", type_descriptor->name); } else { ec = type_descriptor->op->oer_encoder( type_descriptor, constraints, struct_ptr, /* Pointer to the destination structure */ encode_to_buffer_cb, &arg); if(ec.encoded != -1) { assert(ec.encoded == (ssize_t)(buffer_size - arg.left)); /* Return the encoded contents size */ } } return ec; } asn_enc_rval_t oer_encode_primitive(const asn_TYPE_descriptor_t *td, const asn_oer_constraints_t *constraints, const void *sptr, asn_app_consume_bytes_f *cb, void *app_key) { const ASN__PRIMITIVE_TYPE_t *st = (const ASN__PRIMITIVE_TYPE_t *)sptr; asn_enc_rval_t er = {0, 0, 0}; ssize_t ret; (void)constraints; if(!st) ASN__ENCODE_FAILED; ASN_DEBUG("Encoding %s (%" ASN_PRI_SIZE " bytes)", td ? td->name : "", st->size); /* * X.696 (08/2015) #27.2 */ ret = oer_serialize_length(st->size, cb, app_key); if(ret < 0) { ASN__ENCODE_FAILED; } er.encoded += ret; er.encoded += st->size; if(cb(st->buf, st->size, app_key) < 0) { ASN__ENCODE_FAILED; } else { ASN__ENCODED_OK(er); } } static int oer__count_bytes(const void *buffer, size_t size, void *bytes_ptr) { size_t *bytes = bytes_ptr; (void)buffer; *bytes += size; return 0; } ssize_t oer_open_type_put(const asn_TYPE_descriptor_t *td, const asn_oer_constraints_t *constraints, const void *sptr, asn_app_consume_bytes_f *cb, void *app_key) { size_t serialized_byte_count = 0; asn_enc_rval_t er; ssize_t len_len; er = td->op->oer_encoder(td, constraints, sptr, oer__count_bytes, &serialized_byte_count); if(er.encoded < 0) return -1; assert(serialized_byte_count == (size_t)er.encoded); len_len = oer_serialize_length(serialized_byte_count, cb, app_key); if(len_len == -1) return -1; er = td->op->oer_encoder(td, constraints, sptr, cb, app_key); if(er.encoded < 0) return -1; assert(serialized_byte_count == (size_t)er.encoded); return len_len + er.encoded; } nextepc-0.3.10/lib/s1ap/asn1c/oer_encoder.h000066400000000000000000000043561333553357400203400ustar00rootroot00000000000000/* * Copyright (c) 2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef OER_ENCODER_H #define OER_ENCODER_H #include #ifdef __cplusplus extern "C" { #endif struct asn_TYPE_descriptor_s; /* Forward declaration */ /* * The Octet Encoding Rules (OER, X.696 08/2015) encoder for any type. * This function may be invoked directly by the application. * Produces CANONICAL-OER output compatible with CANONICAL-OER * and BASIC-OER decoders. */ asn_enc_rval_t oer_encode(const struct asn_TYPE_descriptor_s *type_descriptor, const void *struct_ptr, /* Structure to be encoded */ asn_app_consume_bytes_f *consume_bytes_cb, void *app_key /* Arbitrary callback argument */ ); /* A variant of oer_encode() which encodes data into the pre-allocated buffer */ asn_enc_rval_t oer_encode_to_buffer( const struct asn_TYPE_descriptor_s *type_descriptor, const asn_oer_constraints_t *constraints, const void *struct_ptr, /* Structure to be encoded */ void *buffer, /* Pre-allocated buffer */ size_t buffer_size /* Initial buffer size (maximum) */ ); /* * Type of the generic OER encoder. */ typedef asn_enc_rval_t(oer_type_encoder_f)( const struct asn_TYPE_descriptor_s *type_descriptor, const asn_oer_constraints_t *constraints, const void *struct_ptr, /* Structure to be encoded */ asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */ void *app_key /* Arbitrary callback argument */ ); /* * Write out the Open Type (X.696 (08/2015), #30). * RETURN VALUES: * -1: Fatal error encoding the type. * >0: Number of bytes serialized. */ ssize_t oer_open_type_put(const struct asn_TYPE_descriptor_s *td, const asn_oer_constraints_t *constraints, const void *struct_ptr, asn_app_consume_bytes_f *consume_bytes_cb, void *app_key); /* * Length-prefixed buffer encoding for primitive types. */ oer_type_encoder_f oer_encode_primitive; #ifdef __cplusplus } #endif #endif /* OER_ENCODER_H */ nextepc-0.3.10/lib/s1ap/asn1c/oer_support.c000066400000000000000000000055331333553357400204260ustar00rootroot00000000000000/* * Copyright (c) 2017 Lev Walkin . * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include /* * Fetch the length determinant (X.696 08/2015, #8.6) into *len_r. * RETURN VALUES: * 0: More data expected than bufptr contains. * -1: Fatal error deciphering length. * >0: Number of bytes used from bufptr. */ ssize_t oer_fetch_length(const void *bufptr, size_t size, size_t *len_r) { uint8_t first_byte; size_t len_len; /* Length of the length determinant */ const uint8_t *b; const uint8_t *bend; size_t len; if(size == 0) { *len_r = 0; return 0; } first_byte = *(const uint8_t *)bufptr; if((first_byte & 0x80) == 0) { /* Short form */ *len_r = first_byte; /* 0..127 */ return 1; } len_len = (first_byte & 0x7f); if((1 + len_len) > size) { *len_r = 0; return 0; } b = (const uint8_t *)bufptr + 1; bend = b + len_len; for(; b < bend && *b == 0; b++) { /* Skip the leading 0-bytes */ } if((bend - b) > (ssize_t)sizeof(size_t)) { /* Length is not representable by the native size_t type */ *len_r = 0; return -1; } for(len = 0; b < bend; b++) { len = (len << 8) + *b; } if(len > RSIZE_MAX) { /* A bit of C11 validation */ *len_r = 0; return -1; } *len_r = len; assert(len_len + 1 == (size_t)(bend - (const uint8_t *)bufptr)); return len_len + 1; } /* * Serialize OER length. Returns the number of bytes serialized * or -1 if a given callback returned with negative result. */ ssize_t oer_serialize_length(size_t length, asn_app_consume_bytes_f *cb, void *app_key) { uint8_t scratch[1 + sizeof(length)]; uint8_t *sp = scratch; int littleEndian = 1; /* Run-time detection */ const uint8_t *pstart; const uint8_t *pend; const uint8_t *p; int add; if(length <= 127) { uint8_t b = length; if(cb(&b, 1, app_key) < 0) { return -1; } return 1; } if(*(char *)&littleEndian) { pstart = (const uint8_t *)&length + sizeof(length) - 1; pend = (const uint8_t *)&length; add = -1; } else { pstart = (const uint8_t *)&length; pend = pstart + sizeof(length); add = 1; } for(p = pstart; p != pend; p += add) { /* Skip leading zeros. */ if(*p) break; } for(sp = scratch + 1; ; p += add) { *sp++ = *p; if(p == pend) break; } assert((sp - scratch) - 1 <= 0x7f); scratch[0] = 0x80 + ((sp - scratch) - 1); if(cb(scratch, sp - scratch, app_key) < 0) { return -1; } return sp - scratch; } nextepc-0.3.10/lib/s1ap/asn1c/oer_support.h000066400000000000000000000024101333553357400204220ustar00rootroot00000000000000/* * Copyright (c) 2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef OER_SUPPORT_H #define OER_SUPPORT_H #include /* Platform-specific types */ #ifdef __cplusplus extern "C" { #endif /* * Pre-computed OER constraints. */ typedef struct asn_oer_constraint_number_s { unsigned width; /* ±8,4,2,1 fixed bytes */ unsigned positive; /* 1 for unsigned number, 0 for signed */ } asn_oer_constraint_number_t; typedef struct asn_oer_constraints_s { asn_oer_constraint_number_t value; ssize_t size; /* -1 (no constraint) or >= 0 */ } asn_oer_constraints_t; /* * Fetch the length determinant (X.696 (08/2015), #8.6) into *len_r. * RETURN VALUES: * 0: More data expected than bufptr contains. * -1: Fatal error deciphering length. * >0: Number of bytes used from bufptr. */ ssize_t oer_fetch_length(const void *bufptr, size_t size, size_t *len_r); /* * Serialize OER length. Returns the number of bytes serialized * or -1 if a given callback returned with negative result. */ ssize_t oer_serialize_length(size_t length, asn_app_consume_bytes_f *cb, void *app_key); #ifdef __cplusplus } #endif #endif /* OER_SUPPORT_H */ nextepc-0.3.10/lib/s1ap/asn1c/per_decoder.c000066400000000000000000000117101333553357400203120ustar00rootroot00000000000000#include #include #include /* * Decode a "Production of a complete encoding", X.691#10.1. * The complete encoding contains at least one byte, and is an integral * multiple of 8 bytes. */ asn_dec_rval_t uper_decode_complete(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **sptr, const void *buffer, size_t size) { asn_dec_rval_t rval; rval = uper_decode(opt_codec_ctx, td, sptr, buffer, size, 0, 0); if(rval.consumed) { /* * We've always given 8-aligned data, * so convert bits to integral bytes. */ rval.consumed += 7; rval.consumed >>= 3; } else if(rval.code == RC_OK) { if(size) { if(((const uint8_t *)buffer)[0] == 0) { rval.consumed = 1; /* 1 byte */ } else { ASN_DEBUG("Expecting single zeroed byte"); rval.code = RC_FAIL; } } else { /* Must contain at least 8 bits. */ rval.code = RC_WMORE; } } return rval; } asn_dec_rval_t uper_decode(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **sptr, const void *buffer, size_t size, int skip_bits, int unused_bits) { asn_codec_ctx_t s_codec_ctx; asn_dec_rval_t rval; asn_per_data_t pd; if(skip_bits < 0 || skip_bits > 7 || unused_bits < 0 || unused_bits > 7 || (unused_bits > 0 && !size)) ASN__DECODE_FAILED; /* * Stack checker requires that the codec context * must be allocated on the stack. */ if(opt_codec_ctx) { if(opt_codec_ctx->max_stack_size) { s_codec_ctx = *opt_codec_ctx; opt_codec_ctx = &s_codec_ctx; } } else { /* If context is not given, be security-conscious anyway */ memset(&s_codec_ctx, 0, sizeof(s_codec_ctx)); s_codec_ctx.max_stack_size = ASN__DEFAULT_STACK_MAX; opt_codec_ctx = &s_codec_ctx; } /* Fill in the position indicator */ memset(&pd, 0, sizeof(pd)); pd.buffer = (const uint8_t *)buffer; pd.nboff = skip_bits; pd.nbits = 8 * size - unused_bits; /* 8 is CHAR_BIT from */ if(pd.nboff > pd.nbits) ASN__DECODE_FAILED; /* * Invoke type-specific decoder. */ if(!td->op->uper_decoder) ASN__DECODE_FAILED; /* PER is not compiled in */ rval = td->op->uper_decoder(opt_codec_ctx, td, 0, sptr, &pd); if(rval.code == RC_OK) { /* Return the number of consumed bits */ rval.consumed = ((pd.buffer - (const uint8_t *)buffer) << 3) + pd.nboff - skip_bits; ASN_DEBUG("PER decoding consumed %ld, counted %ld", (long)rval.consumed, (long)pd.moved); assert(rval.consumed == pd.moved); } else { /* PER codec is not a restartable */ rval.consumed = 0; } return rval; } asn_dec_rval_t aper_decode_complete(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **sptr, const void *buffer, size_t size) { asn_dec_rval_t rval; rval = aper_decode(opt_codec_ctx, td, sptr, buffer, size, 0, 0); if(rval.consumed) { /* * We've always given 8-aligned data, * so convert bits to integral bytes. */ rval.consumed += 7; rval.consumed >>= 3; } else if(rval.code == RC_OK) { if(size) { if(((const uint8_t *)buffer)[0] == 0) { rval.consumed = 1; /* 1 byte */ } else { ASN_DEBUG("Expecting single zeroed byte"); rval.code = RC_FAIL; } } else { /* Must contain at least 8 bits. */ rval.code = RC_WMORE; } } return rval; } asn_dec_rval_t aper_decode(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **sptr, const void *buffer, size_t size, int skip_bits, int unused_bits) { asn_codec_ctx_t s_codec_ctx; asn_dec_rval_t rval; asn_per_data_t pd; if(skip_bits < 0 || skip_bits > 7 || unused_bits < 0 || unused_bits > 7 || (unused_bits > 0 && !size)) ASN__DECODE_FAILED; /* * Stack checker requires that the codec context * must be allocated on the stack. */ if(opt_codec_ctx) { if(opt_codec_ctx->max_stack_size) { s_codec_ctx = *opt_codec_ctx; opt_codec_ctx = &s_codec_ctx; } } else { /* If context is not given, be security-conscious anyway */ memset(&s_codec_ctx, 0, sizeof(s_codec_ctx)); s_codec_ctx.max_stack_size = ASN__DEFAULT_STACK_MAX; opt_codec_ctx = &s_codec_ctx; } /* Fill in the position indicator */ memset(&pd, 0, sizeof(pd)); pd.buffer = (const uint8_t *)buffer; pd.nboff = skip_bits; pd.nbits = 8 * size - unused_bits; /* 8 is CHAR_BIT from */ if(pd.nboff > pd.nbits) ASN__DECODE_FAILED; /* * Invoke type-specific decoder. */ if(!td->op->aper_decoder) ASN__DECODE_FAILED; /* PER is not compiled in */ rval = td->op->aper_decoder(opt_codec_ctx, td, 0, sptr, &pd); if(rval.code == RC_OK) { /* Return the number of consumed bits */ rval.consumed = ((pd.buffer - (const uint8_t *)buffer) << 3) + pd.nboff - skip_bits; ASN_DEBUG("PER decoding consumed %zu, counted %zu", rval.consumed, pd.moved); assert(rval.consumed == pd.moved); } else { /* PER codec is not a restartable */ rval.consumed = 0; } return rval; } nextepc-0.3.10/lib/s1ap/asn1c/per_decoder.h000066400000000000000000000056741333553357400203330ustar00rootroot00000000000000/*- * Copyright (c) 2005-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _PER_DECODER_H_ #define _PER_DECODER_H_ #include #include #ifdef __cplusplus extern "C" { #endif struct asn_TYPE_descriptor_s; /* Forward declaration */ /* * Unaligned PER decoder of a "complete encoding" as per X.691 (08/2015) #11.1. * On success, this call always returns (.consumed >= 1), as per #11.1.3. */ asn_dec_rval_t uper_decode_complete( const struct asn_codec_ctx_s *opt_codec_ctx, const struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */ void **struct_ptr, /* Pointer to a target structure's pointer */ const void *buffer, /* Data to be decoded */ size_t size /* Size of data buffer */ ); /* * Unaligned PER decoder of any ASN.1 type. May be invoked by the application. * WARNING: This call returns the number of BITS read from the stream. Beware. */ asn_dec_rval_t uper_decode( const struct asn_codec_ctx_s *opt_codec_ctx, const struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */ void **struct_ptr, /* Pointer to a target structure's pointer */ const void *buffer, /* Data to be decoded */ size_t size, /* Size of the input data buffer, in bytes */ int skip_bits, /* Number of unused leading bits, 0..7 */ int unused_bits /* Number of unused tailing bits, 0..7 */ ); /* * Aligned PER decoder of a "complete encoding" as per X.691#10.1. * On success, this call always returns (.consumed >= 1), in BITS, as per X.691#10.1.3. */ asn_dec_rval_t aper_decode_complete( const struct asn_codec_ctx_s *opt_codec_ctx, const struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */ void **struct_ptr, /* Pointer to a target structure's pointer */ const void *buffer, /* Data to be decoded */ size_t size /* Size of data buffer */ ); /* * Aligned PER decoder of any ASN.1 type. May be invoked by the application. * WARNING: This call returns the number of BITS read from the stream. Beware. */ asn_dec_rval_t aper_decode( const struct asn_codec_ctx_s *opt_codec_ctx, const struct asn_TYPE_descriptor_s *type_descriptor, /* Type to decode */ void **struct_ptr, /* Pointer to a target structure's pointer */ const void *buffer, /* Data to be decoded */ size_t size, /* Size of data buffer */ int skip_bits, /* Number of unused leading bits, 0..7 */ int unused_bits /* Number of unused tailing bits, 0..7 */ ); /* * Type of the type-specific PER decoder function. */ typedef asn_dec_rval_t(per_type_decoder_f)( const asn_codec_ctx_t *opt_codec_ctx, const struct asn_TYPE_descriptor_s *type_descriptor, const asn_per_constraints_t *constraints, void **struct_ptr, asn_per_data_t *per_data); #ifdef __cplusplus } #endif #endif /* _PER_DECODER_H_ */ nextepc-0.3.10/lib/s1ap/asn1c/per_encoder.c000066400000000000000000000145471333553357400203370ustar00rootroot00000000000000#include #include #include static int _uper_encode_flush_outp(asn_per_outp_t *po); static int ignore_output(const void *data, size_t size, void *app_key) { (void)data; (void)size; (void)app_key; return 0; } asn_enc_rval_t uper_encode(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_app_consume_bytes_f *cb, void *app_key) { asn_per_outp_t po; asn_enc_rval_t er; /* * Invoke type-specific encoder. */ if(!td || !td->op->uper_encoder) ASN__ENCODE_FAILED; /* PER is not compiled in */ po.buffer = po.tmpspace; po.nboff = 0; po.nbits = 8 * sizeof(po.tmpspace); po.output = cb ? cb : ignore_output; po.op_key = app_key; po.flushed_bytes = 0; er = td->op->uper_encoder(td, constraints, sptr, &po); if(er.encoded != -1) { size_t bits_to_flush; bits_to_flush = ((po.buffer - po.tmpspace) << 3) + po.nboff; /* Set number of bits encoded to a firm value */ er.encoded = (po.flushed_bytes << 3) + bits_to_flush; if(_uper_encode_flush_outp(&po)) ASN__ENCODE_FAILED; } return er; } /* * Argument type and callback necessary for uper_encode_to_buffer(). */ typedef struct enc_to_buf_arg { void *buffer; size_t left; } enc_to_buf_arg; static int encode_to_buffer_cb(const void *buffer, size_t size, void *key) { enc_to_buf_arg *arg = (enc_to_buf_arg *)key; if(arg->left < size) return -1; /* Data exceeds the available buffer size */ memcpy(arg->buffer, buffer, size); arg->buffer = ((char *)arg->buffer) + size; arg->left -= size; return 0; } asn_enc_rval_t uper_encode_to_buffer(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, void *buffer, size_t buffer_size) { enc_to_buf_arg key; key.buffer = buffer; key.left = buffer_size; if(td) ASN_DEBUG("Encoding \"%s\" using UNALIGNED PER", td->name); return uper_encode(td, constraints, sptr, encode_to_buffer_cb, &key); } typedef struct enc_dyn_arg { void *buffer; size_t length; size_t allocated; } enc_dyn_arg; static int encode_dyn_cb(const void *buffer, size_t size, void *key) { enc_dyn_arg *arg = key; if(arg->length + size >= arg->allocated) { size_t new_size = arg->allocated ? arg->allocated : 8; void *p; do { new_size <<= 2; } while(arg->length + size >= new_size); p = REALLOC(arg->buffer, new_size); if(!p) { FREEMEM(arg->buffer); memset(arg, 0, sizeof(*arg)); return -1; } arg->buffer = p; arg->allocated = new_size; } memcpy(((char *)arg->buffer) + arg->length, buffer, size); arg->length += size; return 0; } ssize_t uper_encode_to_new_buffer(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, void **buffer_r) { asn_enc_rval_t er; enc_dyn_arg key; memset(&key, 0, sizeof(key)); er = uper_encode(td, constraints, sptr, encode_dyn_cb, &key); switch(er.encoded) { case -1: FREEMEM(key.buffer); return -1; case 0: FREEMEM(key.buffer); key.buffer = MALLOC(1); if(key.buffer) { *(char *)key.buffer = '\0'; *buffer_r = key.buffer; return 1; } else { return -1; } default: *buffer_r = key.buffer; ASN_DEBUG("Complete encoded in %ld bits", (long)er.encoded); return ((er.encoded + 7) >> 3); } } /* * Internally useful functions. */ /* Flush partially filled buffer */ static int _uper_encode_flush_outp(asn_per_outp_t *po) { uint8_t *buf; if(po->nboff == 0 && po->buffer == po->tmpspace) return 0; buf = po->buffer + (po->nboff >> 3); /* Make sure we account for the last, partially filled */ if(po->nboff & 0x07) { buf[0] &= 0xff << (8 - (po->nboff & 0x07)); buf++; } return po->output(po->tmpspace, buf - po->tmpspace, po->op_key); } asn_enc_rval_t aper_encode_to_buffer(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, void *buffer, size_t buffer_size) { enc_to_buf_arg key; key.buffer = buffer; key.left = buffer_size; if(td) ASN_DEBUG("Encoding \"%s\" using ALIGNED PER", td->name); return aper_encode(td, constraints, sptr, encode_to_buffer_cb, &key); } ssize_t aper_encode_to_new_buffer(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, void **buffer_r) { asn_enc_rval_t er; enc_dyn_arg key; memset(&key, 0, sizeof(key)); er = aper_encode(td, constraints, sptr, encode_dyn_cb, &key); switch(er.encoded) { case -1: FREEMEM(key.buffer); return -1; case 0: FREEMEM(key.buffer); key.buffer = MALLOC(1); if(key.buffer) { *(char *)key.buffer = '\0'; *buffer_r = key.buffer; return 1; } else { return -1; } default: *buffer_r = key.buffer; ASN_DEBUG("Complete encoded in %ld bits", (long)er.encoded); return ((er.encoded + 7) >> 3); } } static int _aper_encode_flush_outp(asn_per_outp_t *po) { uint8_t *buf; if(po->nboff == 0 && po->buffer == po->tmpspace) return 0; buf = po->buffer + (po->nboff >> 3); /* Make sure we account for the last, partially filled */ if(po->nboff & 0x07) { buf[0] &= 0xff << (8 - (po->nboff & 0x07)); buf++; } if (po->output) { return po->output(po->tmpspace, buf - po->tmpspace, po->op_key); } return 0; } asn_enc_rval_t aper_encode(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_app_consume_bytes_f *cb, void *app_key) { asn_per_outp_t po; asn_enc_rval_t er; /* * Invoke type-specific encoder. */ if(!td || !td->op->aper_encoder) ASN__ENCODE_FAILED; /* PER is not compiled in */ po.buffer = po.tmpspace; po.nboff = 0; po.nbits = 8 * sizeof(po.tmpspace); po.output = cb; po.op_key = app_key; po.flushed_bytes = 0; er = td->op->aper_encoder(td, constraints, sptr, &po); if(er.encoded != -1) { size_t bits_to_flush; bits_to_flush = ((po.buffer - po.tmpspace) << 3) + po.nboff; /* Set number of bits encoded to a firm value */ er.encoded = (po.flushed_bytes << 3) + bits_to_flush; if(_aper_encode_flush_outp(&po)) ASN__ENCODE_FAILED; } return er; } nextepc-0.3.10/lib/s1ap/asn1c/per_encoder.h000066400000000000000000000063351333553357400203400ustar00rootroot00000000000000/*- * Copyright (c) 2006-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _PER_ENCODER_H_ #define _PER_ENCODER_H_ #include #include #ifdef __cplusplus extern "C" { #endif struct asn_TYPE_descriptor_s; /* Forward declaration */ /* * Unaligned PER encoder of any ASN.1 type. May be invoked by the application. * WARNING: This function returns the number of encoded bits in the .encoded * field of the return value. Use the following formula to convert to bytes: * bytes = ((.encoded + 7) / 8) */ asn_enc_rval_t uper_encode( const struct asn_TYPE_descriptor_s *type_descriptor, const asn_per_constraints_t *constraints, const void *struct_ptr, /* Structure to be encoded */ asn_app_consume_bytes_f *consume_bytes_cb, /* Data collector */ void *app_key /* Arbitrary callback argument */ ); asn_enc_rval_t aper_encode( const struct asn_TYPE_descriptor_s *type_descriptor, const asn_per_constraints_t *constraints, const void *struct_ptr, /* Structure to be encoded */ asn_app_consume_bytes_f *consume_bytes_cb, /* Data collector */ void *app_key /* Arbitrary callback argument */ ); /* * A variant of uper_encode() which encodes data into the existing buffer * WARNING: This function returns the number of encoded bits in the .encoded * field of the return value. */ asn_enc_rval_t uper_encode_to_buffer( const struct asn_TYPE_descriptor_s *type_descriptor, const asn_per_constraints_t *constraints, const void *struct_ptr, /* Structure to be encoded */ void *buffer, /* Pre-allocated buffer */ size_t buffer_size /* Initial buffer size (max) */ ); asn_enc_rval_t aper_encode_to_buffer( const struct asn_TYPE_descriptor_s *type_descriptor, const asn_per_constraints_t *constraints, const void *struct_ptr, /* Structure to be encoded */ void *buffer, /* Pre-allocated buffer */ size_t buffer_size /* Initial buffer size (max) */ ); /* * A variant of uper_encode_to_buffer() which allocates buffer itself. * Returns the number of bytes in the buffer or -1 in case of failure. * WARNING: This function produces a "Production of the complete encoding", * with length of at least one octet. Contrast this to precise bit-packing * encoding of uper_encode() and uper_encode_to_buffer(). */ ssize_t uper_encode_to_new_buffer( const struct asn_TYPE_descriptor_s *type_descriptor, const asn_per_constraints_t *constraints, const void *struct_ptr, /* Structure to be encoded */ void **buffer_r /* Buffer allocated and returned */ ); ssize_t aper_encode_to_new_buffer( const struct asn_TYPE_descriptor_s *td, const asn_per_constraints_t *constraints, const void *sptr, void **buffer_r ); /* * Type of the generic PER encoder function. */ typedef asn_enc_rval_t(per_type_encoder_f)( const struct asn_TYPE_descriptor_s *type_descriptor, const asn_per_constraints_t *constraints, const void *struct_ptr, asn_per_outp_t *per_output); #ifdef __cplusplus } #endif #endif /* _PER_ENCODER_H_ */ nextepc-0.3.10/lib/s1ap/asn1c/per_opentype.c000066400000000000000000000326751333553357400205650ustar00rootroot00000000000000/* * Copyright (c) 2007 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include #include typedef struct uper_ugot_key { asn_per_data_t oldpd; /* Old per data source */ size_t unclaimed; size_t ot_moved; /* Number of bits moved by OT processing */ int repeat; } uper_ugot_key; static int uper_ugot_refill(asn_per_data_t *pd); static int per_skip_bits(asn_per_data_t *pd, int skip_nbits); static asn_dec_rval_t uper_sot_suck(const asn_codec_ctx_t *, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd); /* * Encode an "open type field". * #10.1, #10.2 */ int uper_open_type_put(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { void *buf; void *bptr; ssize_t size; ASN_DEBUG("Open type put %s ...", td->name); size = uper_encode_to_new_buffer(td, constraints, sptr, &buf); if(size <= 0) return -1; ASN_DEBUG("Open type put %s of length %" ASN_PRI_SSIZE " + overhead (1byte?)", td->name, size); bptr = buf; do { int need_eom = 0; ssize_t may_save = uper_put_length(po, size, &need_eom); ASN_DEBUG("Prepending length %" ASN_PRI_SSIZE " to %s and allowing to save %" ASN_PRI_SSIZE, size, td->name, may_save); if(may_save < 0) break; if(per_put_many_bits(po, bptr, may_save * 8)) break; bptr = (char *)bptr + may_save; size -= may_save; if(need_eom && uper_put_length(po, 0, 0)) { FREEMEM(buf); return -1; } } while(size); FREEMEM(buf); if(size) return -1; return 0; } static asn_dec_rval_t uper_open_type_get_simple(const asn_codec_ctx_t *ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { asn_dec_rval_t rv; ssize_t chunk_bytes; int repeat; uint8_t *buf = 0; size_t bufLen = 0; size_t bufSize = 0; asn_per_data_t spd; size_t padding; ASN__STACK_OVERFLOW_CHECK(ctx); ASN_DEBUG("Getting open type %s...", td->name); do { chunk_bytes = uper_get_length(pd, -1, 0, &repeat); if(chunk_bytes < 0) { FREEMEM(buf); ASN__DECODE_STARVED; } if(bufLen + chunk_bytes > bufSize) { void *ptr; bufSize = chunk_bytes + (bufSize << 2); ptr = REALLOC(buf, bufSize); if(!ptr) { FREEMEM(buf); ASN__DECODE_FAILED; } buf = ptr; } if(per_get_many_bits(pd, buf + bufLen, 0, chunk_bytes << 3)) { FREEMEM(buf); ASN__DECODE_STARVED; } bufLen += chunk_bytes; } while(repeat); ASN_DEBUG("Getting open type %s encoded in %ld bytes", td->name, (long)bufLen); memset(&spd, 0, sizeof(spd)); spd.buffer = buf; spd.nbits = bufLen << 3; ASN_DEBUG_INDENT_ADD(+4); rv = td->op->uper_decoder(ctx, td, constraints, sptr, &spd); ASN_DEBUG_INDENT_ADD(-4); if(rv.code == RC_OK) { /* Check padding validity */ padding = spd.nbits - spd.nboff; if (((padding > 0 && padding < 8) || /* X.691#10.1.3 */ (spd.nboff == 0 && spd.nbits == 8 && spd.buffer == buf)) && per_get_few_bits(&spd, padding) == 0) { /* Everything is cool */ FREEMEM(buf); return rv; } FREEMEM(buf); if(padding >= 8) { ASN_DEBUG("Too large padding %d in open type", (int)padding); ASN__DECODE_FAILED; } else { ASN_DEBUG("No padding"); } } else { FREEMEM(buf); /* rv.code could be RC_WMORE, nonsense in this context */ rv.code = RC_FAIL; /* Noone would give us more */ } return rv; } static asn_dec_rval_t CC_NOTUSED uper_open_type_get_complex(const asn_codec_ctx_t *ctx, const asn_TYPE_descriptor_t *td, asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { uper_ugot_key arg; asn_dec_rval_t rv; ssize_t padding; ASN__STACK_OVERFLOW_CHECK(ctx); ASN_DEBUG("Getting open type %s from %s", td->name, asn_bit_data_string(pd)); arg.oldpd = *pd; arg.unclaimed = 0; arg.ot_moved = 0; arg.repeat = 1; pd->refill = uper_ugot_refill; pd->refill_key = &arg; pd->nbits = pd->nboff; /* 0 good bits at this point, will refill */ pd->moved = 0; /* This now counts the open type size in bits */ ASN_DEBUG_INDENT_ADD(+4); rv = td->op->uper_decoder(ctx, td, constraints, sptr, pd); ASN_DEBUG_INDENT_ADD(-4); #define UPDRESTOREPD do { \ /* buffer and nboff are valid, preserve them. */ \ pd->nbits = arg.oldpd.nbits - (pd->moved - arg.ot_moved); \ pd->moved = arg.oldpd.moved + (pd->moved - arg.ot_moved); \ pd->refill = arg.oldpd.refill; \ pd->refill_key = arg.oldpd.refill_key; \ } while(0) if(rv.code != RC_OK) { UPDRESTOREPD; return rv; } ASN_DEBUG("OpenType %s pd%s old%s unclaimed=%d, repeat=%d", td->name, asn_bit_data_string(pd), asn_bit_data_string(&arg.oldpd), (int)arg.unclaimed, (int)arg.repeat); padding = pd->moved % 8; if(padding) { int32_t pvalue; if(padding > 7) { ASN_DEBUG("Too large padding %d in open type", (int)padding); rv.code = RC_FAIL; UPDRESTOREPD; return rv; } padding = 8 - padding; ASN_DEBUG("Getting padding of %d bits", (int)padding); pvalue = per_get_few_bits(pd, padding); switch(pvalue) { case -1: ASN_DEBUG("Padding skip failed"); UPDRESTOREPD; ASN__DECODE_STARVED; case 0: break; default: ASN_DEBUG("Non-blank padding (%d bits 0x%02x)", (int)padding, (int)pvalue); UPDRESTOREPD; ASN__DECODE_FAILED; } } if(pd->nboff != pd->nbits) { ASN_DEBUG("Open type %s overhead pd%s old%s", td->name, asn_bit_data_string(pd), asn_bit_data_string(&arg.oldpd)); if(1) { UPDRESTOREPD; ASN__DECODE_FAILED; } else { arg.unclaimed += pd->nbits - pd->nboff; } } /* Adjust pd back so it points to original data */ UPDRESTOREPD; /* Skip data not consumed by the decoder */ if(arg.unclaimed) { ASN_DEBUG("Getting unclaimed %d", (int)arg.unclaimed); switch(per_skip_bits(pd, arg.unclaimed)) { case -1: ASN_DEBUG("Claim of %d failed", (int)arg.unclaimed); ASN__DECODE_STARVED; case 0: ASN_DEBUG("Got claim of %d", (int)arg.unclaimed); break; default: /* Padding must be blank */ ASN_DEBUG("Non-blank unconsumed padding"); ASN__DECODE_FAILED; } arg.unclaimed = 0; } if(arg.repeat) { ASN_DEBUG("Not consumed the whole thing"); rv.code = RC_FAIL; return rv; } return rv; } asn_dec_rval_t uper_open_type_get(const asn_codec_ctx_t *ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { return uper_open_type_get_simple(ctx, td, constraints, sptr, pd); } int uper_open_type_skip(const asn_codec_ctx_t *ctx, asn_per_data_t *pd) { asn_TYPE_descriptor_t s_td; asn_TYPE_operation_t s_op; asn_dec_rval_t rv; s_td.name = ""; s_td.op = &s_op; s_op.uper_decoder = uper_sot_suck; rv = uper_open_type_get(ctx, &s_td, 0, 0, pd); if(rv.code != RC_OK) return -1; else return 0; } /* * Internal functions. */ static asn_dec_rval_t uper_sot_suck(const asn_codec_ctx_t *ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { asn_dec_rval_t rv; (void)ctx; (void)td; (void)constraints; (void)sptr; while(per_get_few_bits(pd, 1) >= 0); rv.code = RC_OK; rv.consumed = pd->moved; return rv; } static int uper_ugot_refill(asn_per_data_t *pd) { uper_ugot_key *arg = pd->refill_key; ssize_t next_chunk_bytes, next_chunk_bits; ssize_t avail; asn_per_data_t *oldpd = &arg->oldpd; ASN_DEBUG("REFILLING pd->moved=%ld, oldpd->moved=%ld", (long)pd->moved, (long)oldpd->moved); /* Advance our position to where pd is */ oldpd->buffer = pd->buffer; oldpd->nboff = pd->nboff; oldpd->nbits -= pd->moved - arg->ot_moved; oldpd->moved += pd->moved - arg->ot_moved; arg->ot_moved = pd->moved; if(arg->unclaimed) { /* Refill the container */ if(per_get_few_bits(oldpd, 1)) return -1; if(oldpd->nboff == 0) { assert(0); return -1; } pd->buffer = oldpd->buffer; pd->nboff = oldpd->nboff - 1; pd->nbits = oldpd->nbits; ASN_DEBUG("UNCLAIMED <- return from (pd->moved=%ld)", (long)pd->moved); return 0; } if(!arg->repeat) { ASN_DEBUG("Want more but refill doesn't have it"); return -1; } next_chunk_bytes = uper_get_length(oldpd, -1, 0, &arg->repeat); ASN_DEBUG("Open type LENGTH %ld bytes at off %ld, repeat %ld", (long)next_chunk_bytes, (long)oldpd->moved, (long)arg->repeat); if(next_chunk_bytes < 0) return -1; if(next_chunk_bytes == 0) { pd->refill = 0; /* No more refills, naturally */ assert(!arg->repeat); /* Implementation guarantee */ } next_chunk_bits = next_chunk_bytes << 3; avail = oldpd->nbits - oldpd->nboff; if(avail >= next_chunk_bits) { pd->nbits = oldpd->nboff + next_chunk_bits; arg->unclaimed = 0; ASN_DEBUG("!+Parent frame %ld bits, alloting %ld [%ld..%ld] (%ld)", (long)next_chunk_bits, (long)oldpd->moved, (long)oldpd->nboff, (long)oldpd->nbits, (long)(oldpd->nbits - oldpd->nboff)); } else { pd->nbits = oldpd->nbits; arg->unclaimed = next_chunk_bits - avail; ASN_DEBUG("!-Parent frame %ld, require %ld, will claim %ld", (long)avail, (long)next_chunk_bits, (long)arg->unclaimed); } pd->buffer = oldpd->buffer; pd->nboff = oldpd->nboff; ASN_DEBUG("Refilled pd%s old%s", asn_bit_data_string(pd), asn_bit_data_string(oldpd)); return 0; } static int per_skip_bits(asn_per_data_t *pd, int skip_nbits) { int hasNonZeroBits = 0; while(skip_nbits > 0) { int skip; /* per_get_few_bits() is more efficient when nbits <= 24 */ if(skip_nbits < 24) skip = skip_nbits; else skip = 24; skip_nbits -= skip; switch(per_get_few_bits(pd, skip)) { case -1: return -1; /* Starving */ case 0: continue; /* Skipped empty space */ default: hasNonZeroBits = 1; continue; } } return hasNonZeroBits; } static asn_dec_rval_t aper_open_type_get_simple(const asn_codec_ctx_t *ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { asn_dec_rval_t rv; ssize_t chunk_bytes; int repeat; uint8_t *buf = 0; size_t bufLen = 0; size_t bufSize = 0; asn_per_data_t spd; size_t padding; ASN__STACK_OVERFLOW_CHECK(ctx); ASN_DEBUG("Getting open type %s...", td->name); do { chunk_bytes = aper_get_length(pd, -1, -1, &repeat); if(chunk_bytes < 0) { FREEMEM(buf); ASN__DECODE_STARVED; } if(bufLen + chunk_bytes > bufSize) { void *ptr; bufSize = chunk_bytes + (bufSize << 2); ptr = REALLOC(buf, bufSize); if(!ptr) { FREEMEM(buf); ASN__DECODE_FAILED; } buf = ptr; } if(per_get_many_bits(pd, buf + bufLen, 0, chunk_bytes << 3)) { FREEMEM(buf); ASN__DECODE_STARVED; } bufLen += chunk_bytes; } while(repeat); ASN_DEBUG("Getting open type %s encoded in %ld bytes", td->name, (long)bufLen); memset(&spd, 0, sizeof(spd)); spd.buffer = buf; spd.nbits = bufLen << 3; ASN_DEBUG_INDENT_ADD(+4); rv = td->op->aper_decoder(ctx, td, constraints, sptr, &spd); ASN_DEBUG_INDENT_ADD(-4); if(rv.code == RC_OK) { /* Check padding validity */ padding = spd.nbits - spd.nboff; if (((padding > 0 && padding < 8) || /* X.691#10.1.3 */ (spd.nboff == 0 && spd.nbits == 8 && spd.buffer == buf)) && per_get_few_bits(&spd, padding) == 0) { /* Everything is cool */ FREEMEM(buf); return rv; } FREEMEM(buf); if(padding >= 8) { ASN_DEBUG("Too large padding %d in open type", (int)padding); ASN__DECODE_FAILED; } else { ASN_DEBUG("No padding"); } } else { FREEMEM(buf); /* rv.code could be RC_WMORE, nonsense in this context */ rv.code = RC_FAIL; /* Noone would give us more */ } return rv; } int aper_open_type_put(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po) { void *buf; void *bptr; ssize_t size; size_t toGo; ASN_DEBUG("Open type put %s ...", td->name); size = aper_encode_to_new_buffer(td, constraints, sptr, &buf); if(size <= 0) return -1; for(bptr = buf, toGo = size; toGo;) { ssize_t maySave = aper_put_length(po, -1, toGo); if(maySave < 0) break; if(per_put_many_bits(po, bptr, maySave * 8)) break; bptr = (char *)bptr + maySave; toGo -= maySave; } FREEMEM(buf); if(toGo) return -1; ASN_DEBUG("Open type put %s of length %ld + overhead (1byte?)", td->name, size); return 0; } asn_dec_rval_t aper_open_type_get(const asn_codec_ctx_t *ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd) { return aper_open_type_get_simple(ctx, td, constraints, sptr, pd); } int aper_open_type_skip(const asn_codec_ctx_t *ctx, asn_per_data_t *pd) { asn_TYPE_descriptor_t s_td; asn_dec_rval_t rv; asn_TYPE_operation_t op_t; memset(&op_t, 0, sizeof(op_t)); s_td.name = ""; s_td.op = &op_t; s_td.op->aper_decoder = uper_sot_suck; rv = aper_open_type_get(ctx, &s_td, 0, 0, pd); if(rv.code != RC_OK) return -1; else return 0; } nextepc-0.3.10/lib/s1ap/asn1c/per_opentype.h000066400000000000000000000027631333553357400205650ustar00rootroot00000000000000/* * Copyright (c) 2007-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _PER_OPENTYPE_H_ #define _PER_OPENTYPE_H_ #ifdef __cplusplus extern "C" { #endif asn_dec_rval_t uper_open_type_get(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd); int uper_open_type_skip(const asn_codec_ctx_t *opt_codec_ctx, asn_per_data_t *pd); /* * X.691 (2015/08), #11.2 * Returns -1 if error is encountered. 0 if all OK. */ int uper_open_type_put(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po); asn_dec_rval_t aper_open_type_get(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, void **sptr, asn_per_data_t *pd); int aper_open_type_skip(const asn_codec_ctx_t *opt_codec_ctx, asn_per_data_t *pd); int aper_open_type_put(const asn_TYPE_descriptor_t *td, const asn_per_constraints_t *constraints, const void *sptr, asn_per_outp_t *po); #ifdef __cplusplus } #endif #endif /* _PER_OPENTYPE_H_ */ nextepc-0.3.10/lib/s1ap/asn1c/per_support.c000066400000000000000000000266311333553357400204310ustar00rootroot00000000000000/* * Copyright (c) 2005-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include /* * X.691-201508 #10.9 General rules for encoding a length determinant. * Get the optionally constrained length "n" from the stream. */ ssize_t uper_get_length(asn_per_data_t *pd, int ebits, size_t lower_bound, int *repeat) { ssize_t value; *repeat = 0; /* #11.9.4.1 Encoding if constrained (according to effective bits) */ if(ebits >= 0 && ebits <= 16) { value = per_get_few_bits(pd, ebits); if(value >= 0) value += lower_bound; return value; } value = per_get_few_bits(pd, 8); if((value & 0x80) == 0) { /* #11.9.3.6 */ return (value & 0x7F); } else if((value & 0x40) == 0) { /* #11.9.3.7 */ /* bit 8 ... set to 1 and bit 7 ... set to zero */ value = ((value & 0x3f) << 8) | per_get_few_bits(pd, 8); return value; /* potential -1 from per_get_few_bits passes through. */ } else if(value < 0) { ASN_DEBUG("END of stream reached for PER"); return -1; } value &= 0x3f; /* this is "m" from X.691, #11.9.3.8 */ if(value < 1 || value > 4) { return -1; /* Prohibited by #11.9.3.8 */ } *repeat = 1; return (16384 * value); } /* * Get the normally small length "n". * This procedure used to decode length of extensions bit-maps * for SET and SEQUENCE types. */ ssize_t uper_get_nslength(asn_per_data_t *pd) { ssize_t length; ASN_DEBUG("Getting normally small length"); if(per_get_few_bits(pd, 1) == 0) { length = per_get_few_bits(pd, 6) + 1; if(length <= 0) return -1; ASN_DEBUG("l=%d", (int)length); return length; } else { int repeat; length = uper_get_length(pd, -1, 0, &repeat); if(length >= 0 && !repeat) return length; return -1; /* Error, or do not support >16K extensions */ } } /* * Get the normally small non-negative whole number. * X.691, #10.6 */ ssize_t uper_get_nsnnwn(asn_per_data_t *pd) { ssize_t value; value = per_get_few_bits(pd, 7); if(value & 64) { /* implicit (value < 0) */ value &= 63; value <<= 2; value |= per_get_few_bits(pd, 2); if(value & 128) /* implicit (value < 0) */ return -1; if(value == 0) return 0; if(value >= 3) return -1; value = per_get_few_bits(pd, 8 * value); return value; } return value; } /* * X.691-11/2008, #11.6 * Encoding of a normally small non-negative whole number */ int uper_put_nsnnwn(asn_per_outp_t *po, int n) { int bytes; if(n <= 63) { if(n < 0) return -1; return per_put_few_bits(po, n, 7); } if(n < 256) bytes = 1; else if(n < 65536) bytes = 2; else if(n < 256 * 65536) bytes = 3; else return -1; /* This is not a "normally small" value */ if(per_put_few_bits(po, bytes, 8)) return -1; return per_put_few_bits(po, n, 8 * bytes); } /* X.691-2008/11, #11.5.6 -> #11.3 */ int uper_get_constrained_whole_number(asn_per_data_t *pd, unsigned long *out_value, int nbits) { unsigned long lhalf; /* Lower half of the number*/ long half; if(nbits <= 31) { half = per_get_few_bits(pd, nbits); if(half < 0) return -1; *out_value = half; return 0; } if((size_t)nbits > 8 * sizeof(*out_value)) return -1; /* RANGE */ half = per_get_few_bits(pd, 31); if(half < 0) return -1; if(uper_get_constrained_whole_number(pd, &lhalf, nbits - 31)) return -1; *out_value = ((unsigned long)half << (nbits - 31)) | lhalf; return 0; } /* X.691-2008/11, #11.5.6 -> #11.3 */ int uper_put_constrained_whole_number_u(asn_per_outp_t *po, unsigned long v, int nbits) { if(nbits <= 31) { return per_put_few_bits(po, v, nbits); } else { /* Put higher portion first, followed by lower 31-bit */ if(uper_put_constrained_whole_number_u(po, v >> 31, nbits - 31)) return -1; return per_put_few_bits(po, v, 31); } } /* * X.691 (08/2015) #11.9 "General rules for encoding a length determinant" * Put the length "n" (or part of it) into the stream. */ ssize_t uper_put_length(asn_per_outp_t *po, size_t length, int *need_eom) { int dummy = 0; if(!need_eom) need_eom = &dummy; if(length <= 127) { /* #11.9.3.6 */ *need_eom = 0; return per_put_few_bits(po, length, 8) ? -1 : (ssize_t)length; } else if(length < 16384) { /* #10.9.3.7 */ *need_eom = 0; return per_put_few_bits(po, length|0x8000, 16) ? -1 : (ssize_t)length; } *need_eom = 0 == (length & 16383); length >>= 14; if(length > 4) { *need_eom = 0; length = 4; } return per_put_few_bits(po, 0xC0 | length, 8) ? -1 : (ssize_t)(length << 14); } /* * Put the normally small length "n" into the stream. * This procedure used to encode length of extensions bit-maps * for SET and SEQUENCE types. */ int uper_put_nslength(asn_per_outp_t *po, size_t length) { if(length <= 64) { /* #11.9.3.4 */ if(length == 0) return -1; return per_put_few_bits(po, length - 1, 7) ? -1 : 0; } else { int need_eom = 0; if(uper_put_length(po, length, &need_eom) != (ssize_t)length || need_eom) { /* This might happen in case of >16K extensions */ return -1; } } return 0; } static int per__long_range(long lb, long ub, unsigned long *range_r) { unsigned long bounds_range; if((ub < 0) == (lb < 0)) { bounds_range = ub - lb; } else if(lb < 0) { assert(ub >= 0); bounds_range = 1 + ((unsigned long)ub + (unsigned long)-(lb + 1)); } else { assert(!"Unreachable"); return -1; } *range_r = bounds_range; return 0; } int per_long_range_rebase(long v, long lb, long ub, unsigned long *output) { unsigned long range; assert(lb <= ub); if(v < lb || v > ub || per__long_range(lb, ub, &range) < 0) { /* Range error. */ return -1; } /* * Fundamentally what we're doing is returning (v-lb). * However, this triggers undefined behavior when the word width * of signed (v) is the same as the size of unsigned (*output). * In practice, it triggers the UndefinedSanitizer. Therefore we shall * compute the ranges accurately to avoid C's undefined behavior. */ if((v < 0) == (lb < 0)) { *output = v-lb; return 0; } else if(v < 0) { unsigned long rebased = 1 + (unsigned long)-(v+1) + (unsigned long)lb; assert(rebased <= range); /* By construction */ *output = rebased; return 0; } else if(lb < 0) { unsigned long rebased = 1 + (unsigned long)-(lb+1) + (unsigned long)v; assert(rebased <= range); /* By construction */ *output = rebased; return 0; } else { assert(!"Unreachable"); return -1; } } int per_long_range_unrebase(unsigned long inp, long lb, long ub, long *outp) { unsigned long range; if(per__long_range(lb, ub, &range) != 0) { return -1; } if(inp > range) { /* * We can encode something in the given number of bits that technically * exceeds the range. This is an avenue for security errors, * so we don't allow that. */ return -1; } if(inp <= LONG_MAX) { *outp = (long)inp + lb; } else { *outp = (lb + LONG_MAX + 1) + (long)((inp - LONG_MAX) - 1); } return 0; } int32_t aper_get_align(asn_per_data_t *pd) { if(pd->nboff & 0x7) { ASN_DEBUG("Aligning %ld bits", 8 - ((unsigned long)pd->nboff & 0x7)); return per_get_few_bits(pd, 8 - (pd->nboff & 0x7)); } return 0; } ssize_t aper_get_length(asn_per_data_t *pd, int range, int ebits, int *repeat) { ssize_t value; *repeat = 0; if (range <= 65536 && range >= 0) return aper_get_nsnnwn(pd, range); if (aper_get_align(pd) < 0) return -1; if(ebits >= 0) return per_get_few_bits(pd, ebits); value = per_get_few_bits(pd, 8); if(value < 0) return -1; if((value & 128) == 0) /* #10.9.3.6 */ return (value & 0x7F); if((value & 64) == 0) { /* #10.9.3.7 */ value = ((value & 63) << 8) | per_get_few_bits(pd, 8); if(value < 0) return -1; return value; } value &= 63; /* this is "m" from X.691, #10.9.3.8 */ if(value < 1 || value > 4) return -1; *repeat = 1; return (16384 * value); } ssize_t aper_get_nslength(asn_per_data_t *pd) { ssize_t length; ASN_DEBUG("Getting normally small length"); if(per_get_few_bits(pd, 1) == 0) { length = per_get_few_bits(pd, 6) + 1; if(length <= 0) return -1; ASN_DEBUG("l=%ld", length); return length; } else { int repeat; length = aper_get_length(pd, -1, -1, &repeat); if(length >= 0 && !repeat) return length; return -1; /* Error, or do not support >16K extensions */ } } ssize_t aper_get_nsnnwn(asn_per_data_t *pd, int range) { ssize_t value; int bytes = 0; ASN_DEBUG("getting nsnnwn with range %d", range); if(range <= 255) { int i; if (range < 0) return -1; /* 1 -> 8 bits */ for (i = 1; i <= 8; i++) { int upper = 1 << i; if (upper >= range) break; } value = per_get_few_bits(pd, i); return value; } else if (range == 256){ /* 1 byte */ bytes = 1; } else if (range <= 65536) { /* 2 bytes */ bytes = 2; } else { return -1; } if (aper_get_align(pd) < 0) return -1; value = per_get_few_bits(pd, 8 * bytes); return value; } int aper_put_align(asn_per_outp_t *po) { if(po->nboff & 0x7) { ASN_DEBUG("Aligning %ld bits", 8 - ((unsigned long)po->nboff & 0x7)); if(per_put_few_bits(po, 0x00, (8 - (po->nboff & 0x7)))) return -1; } return 0; } ssize_t aper_put_length(asn_per_outp_t *po, int range, size_t length) { ASN_DEBUG("APER put length %zu with range %d", length, range); /* 10.9 X.691 Note 2 */ if (range <= 65536 && range >= 0) return aper_put_nsnnwn(po, range, length); if (aper_put_align(po) < 0) return -1; if(length <= 127) /* #10.9.3.6 */{ return per_put_few_bits(po, length, 8) ? -1 : (ssize_t)length; } else if(length < 16384) /* #10.9.3.7 */ return per_put_few_bits(po, length|0x8000, 16) ? -1 : (ssize_t)length; length >>= 14; if(length > 4) length = 4; return per_put_few_bits(po, 0xC0 | length, 8) ? -1 : (ssize_t)(length << 14); } int aper_put_nslength(asn_per_outp_t *po, size_t length) { if(length <= 64) { /* #10.9.3.4 */ if(length == 0) return -1; return per_put_few_bits(po, length-1, 7) ? -1 : 0; } else { if(aper_put_length(po, -1, length) != (ssize_t)length) { /* This might happen in case of >16K extensions */ return -1; } } return 0; } int aper_put_nsnnwn(asn_per_outp_t *po, int range, int number) { int bytes; ASN_DEBUG("aper put nsnnwn %d with range %d", number, range); /* 10.5.7.1 X.691 */ if(range < 0) { int i; for (i = 1; ; i++) { int bits = 1 << (8 * i); if (number <= bits) break; } bytes = i; assert(i <= 4); } if(range <= 255) { int i; for (i = 1; i <= 8; i++) { int bits = 1 << i; if (range <= bits) break; } return per_put_few_bits(po, number, i); } else if(range == 256) { bytes = 1; } else if(range <= 65536) { bytes = 2; } else { /* Ranges > 64K */ int i; for (i = 1; ; i++) { int bits = 1 << (8 * i); if (range <= bits) break; } assert(i <= 4); bytes = i; } if(aper_put_align(po) < 0) /* Aligning on octet */ return -1; /* if(per_put_few_bits(po, bytes, 8)) return -1; */ return per_put_few_bits(po, number, 8 * bytes); } nextepc-0.3.10/lib/s1ap/asn1c/per_support.h000066400000000000000000000102531333553357400204270ustar00rootroot00000000000000/* * Copyright (c) 2005-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _PER_SUPPORT_H_ #define _PER_SUPPORT_H_ #include /* Platform-specific types */ #include #ifdef __cplusplus extern "C" { #endif /* * Pre-computed PER constraints. */ typedef struct asn_per_constraint_s { enum asn_per_constraint_flags { APC_UNCONSTRAINED = 0x0, /* No PER visible constraints */ APC_SEMI_CONSTRAINED = 0x1, /* Constrained at "lb" */ APC_CONSTRAINED = 0x2, /* Fully constrained */ APC_EXTENSIBLE = 0x4 /* May have extension */ } flags; int range_bits; /* Full number of bits in the range */ int effective_bits; /* Effective bits */ long lower_bound; /* "lb" value */ long upper_bound; /* "ub" value */ } asn_per_constraint_t; typedef struct asn_per_constraints_s { asn_per_constraint_t value; asn_per_constraint_t size; int (*value2code)(unsigned int value); int (*code2value)(unsigned int code); } asn_per_constraints_t; /* Temporary compatibility layer. Will get removed. */ typedef struct asn_bit_data_s asn_per_data_t; #define per_get_few_bits(data, bits) asn_get_few_bits(data, bits) #define per_get_undo(data, bits) asn_get_undo(data, bits) #define per_get_many_bits(data, dst, align, bits) \ asn_get_many_bits(data, dst, align, bits) /* * X.691 (08/2015) #11.9 "General rules for encoding a length determinant" * Get the length "n" from the Unaligned PER stream. */ ssize_t uper_get_length(asn_per_data_t *pd, int effective_bound_bits, size_t lower_bound, int *repeat); ssize_t aper_get_length(asn_per_data_t *pd, int range, int effective_bound_bits, int *repeat); /* * Get the normally small length "n". */ ssize_t uper_get_nslength(asn_per_data_t *pd); ssize_t aper_get_nslength(asn_per_data_t *pd); /* * Get the normally small non-negative whole number. */ ssize_t uper_get_nsnnwn(asn_per_data_t *pd); ssize_t aper_get_nsnnwn(asn_per_data_t *pd, int range); /* X.691-2008/11, #11.5.6 */ int uper_get_constrained_whole_number(asn_per_data_t *pd, unsigned long *v, int nbits); /* Temporary compatibility layer. Will get removed. */ typedef struct asn_bit_outp_s asn_per_outp_t; #define per_put_few_bits(out, bits, obits) asn_put_few_bits(out, bits, obits) #define per_put_many_bits(out, src, nbits) asn_put_many_bits(out, src, nbits) #define per_put_aligned_flush(out) asn_put_aligned_flush(out) /* * Rebase the given value as an offset into the range specified by the * lower bound (lb) and upper bound (ub). * RETURN VALUES: * -1: Conversion failed due to range problems. * 0: Conversion was successful. */ int per_long_range_rebase(long v, long lb, long ub, unsigned long *output); /* The inverse operation: restores the value by the offset and its bounds. */ int per_long_range_unrebase(unsigned long inp, long lb, long ub, long *outp); /* X.691-2008/11, #11.5 */ int uper_put_constrained_whole_number_u(asn_per_outp_t *po, unsigned long v, int nbits); /* * X.691 (08/2015) #11.9 "General rules for encoding a length determinant" * Put the length "whole_length" to the Unaligned PER stream. * If (opt_need_eom) is given, it will be set to 1 if final 0-length is needed. * In that case, invoke uper_put_length(po, 0, 0) after encoding the last block. * This function returns the number of units which may be flushed * in the next units saving iteration. */ ssize_t uper_put_length(asn_per_outp_t *po, size_t whole_length, int *opt_need_eom); ssize_t aper_put_length(asn_per_outp_t *po, int range, size_t length); /* Align the current bit position to octet bundary */ int aper_put_align(asn_per_outp_t *po); int32_t aper_get_align(asn_per_data_t *pd); /* * Put the normally small length "n" to the Unaligned PER stream. * Returns 0 or -1. */ int uper_put_nslength(asn_per_outp_t *po, size_t length); int aper_put_nslength(asn_per_outp_t *po, size_t length); /* * Put the normally small non-negative whole number. */ int uper_put_nsnnwn(asn_per_outp_t *po, int n); int aper_put_nsnnwn(asn_per_outp_t *po, int range, int number); #ifdef __cplusplus } #endif #endif /* _PER_SUPPORT_H_ */ nextepc-0.3.10/lib/s1ap/asn1c/xer_decoder.c000066400000000000000000000212451333553357400203260ustar00rootroot00000000000000/* * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include /* XER/XML parsing support */ /* * Decode the XER encoding of a given type. */ asn_dec_rval_t xer_decode(const asn_codec_ctx_t *opt_codec_ctx, const asn_TYPE_descriptor_t *td, void **struct_ptr, const void *buffer, size_t size) { asn_codec_ctx_t s_codec_ctx; /* * Stack checker requires that the codec context * must be allocated on the stack. */ if(opt_codec_ctx) { if(opt_codec_ctx->max_stack_size) { s_codec_ctx = *opt_codec_ctx; opt_codec_ctx = &s_codec_ctx; } } else { /* If context is not given, be security-conscious anyway */ memset(&s_codec_ctx, 0, sizeof(s_codec_ctx)); s_codec_ctx.max_stack_size = ASN__DEFAULT_STACK_MAX; opt_codec_ctx = &s_codec_ctx; } /* * Invoke type-specific decoder. */ return td->op->xer_decoder(opt_codec_ctx, td, struct_ptr, 0, buffer, size); } struct xer__cb_arg { pxml_chunk_type_e chunk_type; size_t chunk_size; const void *chunk_buf; int callback_not_invoked; }; static int xer__token_cb(pxml_chunk_type_e type, const void *_chunk_data, size_t _chunk_size, void *key) { struct xer__cb_arg *arg = (struct xer__cb_arg *)key; arg->chunk_type = type; arg->chunk_size = _chunk_size; arg->chunk_buf = _chunk_data; arg->callback_not_invoked = 0; return -1; /* Terminate the XML parsing */ } /* * Fetch the next token from the XER/XML stream. */ ssize_t xer_next_token(int *stateContext, const void *buffer, size_t size, pxer_chunk_type_e *ch_type) { struct xer__cb_arg arg; int new_stateContext = *stateContext; ssize_t ret; arg.callback_not_invoked = 1; ret = pxml_parse(&new_stateContext, buffer, size, xer__token_cb, &arg); if(ret < 0) return -1; if(arg.callback_not_invoked) { assert(ret == 0); /* No data was consumed */ *ch_type = PXER_WMORE; return 0; /* Try again with more data */ } else { assert(arg.chunk_size); assert(arg.chunk_buf == buffer); } /* * Translate the XML chunk types into more convenient ones. */ switch(arg.chunk_type) { case PXML_TEXT: *ch_type = PXER_TEXT; break; case PXML_TAG: *ch_type = PXER_WMORE; return 0; /* Want more */ case PXML_TAG_END: *ch_type = PXER_TAG; break; case PXML_COMMENT: case PXML_COMMENT_END: *ch_type = PXER_COMMENT; break; } *stateContext = new_stateContext; return arg.chunk_size; } #define CSLASH 0x2f /* '/' */ #define LANGLE 0x3c /* '<' */ #define RANGLE 0x3e /* '>' */ xer_check_tag_e xer_check_tag(const void *buf_ptr, int size, const char *need_tag) { const char *buf = (const char *)buf_ptr; const char *end; xer_check_tag_e ct = XCT_OPENING; if(size < 2 || buf[0] != LANGLE || buf[size-1] != RANGLE) { if(size >= 2) ASN_DEBUG("Broken XML tag: \"%c...%c\"", buf[0], buf[size - 1]); return XCT_BROKEN; } /* * Determine the tag class. */ if(buf[1] == CSLASH) { buf += 2; /* advance past "" */ ct = XCT_CLOSING; if(size > 0 && buf[size-1] == CSLASH) return XCT_BROKEN; /* */ } else { buf++; /* advance past "<" */ size -= 2; /* strip "<" and ">" */ if(size > 0 && buf[size-1] == CSLASH) { ct = XCT_BOTH; size--; /* One more, for "/" */ } } /* Sometimes we don't care about the tag */ if(!need_tag || !*need_tag) return (xer_check_tag_e)(XCT__UNK__MASK | ct); /* * Determine the tag name. */ for(end = buf + size; buf < end; buf++, need_tag++) { int b = *buf, n = *need_tag; if(b != n) { if(n == 0) { switch(b) { case 0x09: case 0x0a: case 0x0c: case 0x0d: case 0x20: /* "": whitespace is normal */ return ct; } } return (xer_check_tag_e)(XCT__UNK__MASK | ct); } if(b == 0) return XCT_BROKEN; /* Embedded 0 in buf?! */ } if(*need_tag) return (xer_check_tag_e)(XCT__UNK__MASK | ct); return ct; } #undef ADVANCE #define ADVANCE(num_bytes) do { \ size_t num = (num_bytes); \ buf_ptr = ((const char *)buf_ptr) + num; \ size -= num; \ consumed_myself += num; \ } while(0) #undef RETURN #define RETURN(_code) do { \ rval.code = _code; \ rval.consumed = consumed_myself; \ if(rval.code != RC_OK) \ ASN_DEBUG("Failed with %d", rval.code); \ return rval; \ } while(0) #define XER_GOT_BODY(chunk_buf, chunk_size, size) do { \ ssize_t converted_size = body_receiver \ (struct_key, chunk_buf, chunk_size, \ (size_t)chunk_size < size); \ if(converted_size == -1) RETURN(RC_FAIL); \ if(converted_size == 0 \ && size == (size_t)chunk_size) \ RETURN(RC_WMORE); \ chunk_size = converted_size; \ } while(0) #define XER_GOT_EMPTY() do { \ if(body_receiver(struct_key, 0, 0, size > 0) == -1) \ RETURN(RC_FAIL); \ } while(0) /* * Generalized function for decoding the primitive values. */ asn_dec_rval_t xer_decode_general(const asn_codec_ctx_t *opt_codec_ctx, asn_struct_ctx_t *ctx, /* Type decoder context */ void *struct_key, const char *xml_tag, /* Expected XML tag */ const void *buf_ptr, size_t size, int (*opt_unexpected_tag_decoder) (void *struct_key, const void *chunk_buf, size_t chunk_size), ssize_t (*body_receiver) (void *struct_key, const void *chunk_buf, size_t chunk_size, int have_more) ) { asn_dec_rval_t rval; ssize_t consumed_myself = 0; (void)opt_codec_ctx; /* * Phases of XER/XML processing: * Phase 0: Check that the opening tag matches our expectations. * Phase 1: Processing body and reacting on closing tag. */ if(ctx->phase > 1) RETURN(RC_FAIL); for(;;) { pxer_chunk_type_e ch_type; /* XER chunk type */ ssize_t ch_size; /* Chunk size */ xer_check_tag_e tcv; /* Tag check value */ /* * Get the next part of the XML stream. */ ch_size = xer_next_token(&ctx->context, buf_ptr, size, &ch_type); if(ch_size == -1) { RETURN(RC_FAIL); } else { switch(ch_type) { case PXER_WMORE: RETURN(RC_WMORE); case PXER_COMMENT: /* Got XML comment */ ADVANCE(ch_size); /* Skip silently */ continue; case PXER_TEXT: if(ctx->phase == 0) { /* * We have to ignore whitespace here, * but in order to be forward compatible * with EXTENDED-XER (EMBED-VALUES, #25) * any text is just ignored here. */ } else { XER_GOT_BODY(buf_ptr, ch_size, size); } ADVANCE(ch_size); continue; case PXER_TAG: break; /* Check the rest down there */ } } assert(ch_type == PXER_TAG && size); tcv = xer_check_tag(buf_ptr, ch_size, xml_tag); /* * Phase 0: * Expecting the opening tag * for the type being processed. * Phase 1: * Waiting for the closing XML tag. */ switch(tcv) { case XCT_BOTH: if(ctx->phase) break; /* Finished decoding of an empty element */ XER_GOT_EMPTY(); ADVANCE(ch_size); ctx->phase = 2; /* Phase out */ RETURN(RC_OK); case XCT_OPENING: if(ctx->phase) break; ADVANCE(ch_size); ctx->phase = 1; /* Processing body phase */ continue; case XCT_CLOSING: if(!ctx->phase) break; ADVANCE(ch_size); ctx->phase = 2; /* Phase out */ RETURN(RC_OK); case XCT_UNKNOWN_BO: /* * Certain tags in the body may be expected. */ if(opt_unexpected_tag_decoder && opt_unexpected_tag_decoder(struct_key, buf_ptr, ch_size) >= 0) { /* Tag's processed fine */ ADVANCE(ch_size); if(!ctx->phase) { /* We are not expecting * the closing tag anymore. */ ctx->phase = 2; /* Phase out */ RETURN(RC_OK); } continue; } /* Fall through */ default: break; /* Unexpected tag */ } ASN_DEBUG("Unexpected XML tag (expected \"%s\")", xml_tag); break; /* Dark and mysterious things have just happened */ } RETURN(RC_FAIL); } size_t xer_whitespace_span(const void *chunk_buf, size_t chunk_size) { const char *p = (const char *)chunk_buf; const char *pend = p + chunk_size; for(; p < pend; p++) { switch(*p) { /* X.693, #8.1.4 * HORISONTAL TAB (9) * LINE FEED (10) * CARRIAGE RETURN (13) * SPACE (32) */ case 0x09: case 0x0a: case 0x0d: case 0x20: continue; default: break; } break; } return (p - (const char *)chunk_buf); } /* * This is a vastly simplified, non-validating XML tree skipper. */ int xer_skip_unknown(xer_check_tag_e tcv, ber_tlv_len_t *depth) { assert(*depth > 0); switch(tcv) { case XCT_BOTH: case XCT_UNKNOWN_BO: /* These negate each other. */ return 0; case XCT_OPENING: case XCT_UNKNOWN_OP: ++(*depth); return 0; case XCT_CLOSING: case XCT_UNKNOWN_CL: if(--(*depth) == 0) return (tcv == XCT_CLOSING) ? 2 : 1; return 0; default: return -1; } } nextepc-0.3.10/lib/s1ap/asn1c/xer_decoder.h000066400000000000000000000070171333553357400203340ustar00rootroot00000000000000/*- * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _XER_DECODER_H_ #define _XER_DECODER_H_ #include #ifdef __cplusplus extern "C" { #endif struct asn_TYPE_descriptor_s; /* Forward declaration */ /* * The XER decoder of any ASN.1 type. May be invoked by the application. * Decodes CANONICAL-XER and BASIC-XER. */ asn_dec_rval_t xer_decode( const struct asn_codec_ctx_s *opt_codec_ctx, const struct asn_TYPE_descriptor_s *type_descriptor, void **struct_ptr, /* Pointer to a target structure's pointer */ const void *buffer, /* Data to be decoded */ size_t size /* Size of data buffer */ ); /* * Type of the type-specific XER decoder function. */ typedef asn_dec_rval_t(xer_type_decoder_f)( const asn_codec_ctx_t *opt_codec_ctx, const struct asn_TYPE_descriptor_s *type_descriptor, void **struct_ptr, const char *opt_mname, /* Member name */ const void *buf_ptr, size_t size); /******************************* * INTERNALLY USEFUL FUNCTIONS * *******************************/ /* * Generalized function for decoding the primitive values. * Used by more specialized functions, such as OCTET_STRING_decode_xer_utf8 * and others. This function should not be used by applications, as its API * is subject to changes. */ asn_dec_rval_t xer_decode_general( const asn_codec_ctx_t *opt_codec_ctx, asn_struct_ctx_t *ctx, /* Type decoder context */ void *struct_key, /* Treated as opaque pointer */ const char *xml_tag, /* Expected XML tag name */ const void *buf_ptr, size_t size, int (*opt_unexpected_tag_decoder)(void *struct_key, const void *chunk_buf, size_t chunk_size), ssize_t (*body_receiver)(void *struct_key, const void *chunk_buf, size_t chunk_size, int have_more)); /* * Fetch the next XER (XML) token from the stream. * The function returns the number of bytes occupied by the chunk type, * returned in the _ch_type. The _ch_type is only set (and valid) when * the return value is >= 0. */ typedef enum pxer_chunk_type { PXER_WMORE, /* Chunk type is not clear, more data expected. */ PXER_TAG, /* Complete XER tag */ PXER_TEXT, /* Plain text between XER tags */ PXER_COMMENT /* A comment, may be part of */ } pxer_chunk_type_e; ssize_t xer_next_token(int *stateContext, const void *buffer, size_t size, pxer_chunk_type_e *_ch_type); /* * This function checks the buffer against the tag name is expected to occur. */ typedef enum xer_check_tag { XCT_BROKEN = 0, /* The tag is broken */ XCT_OPENING = 1, /* This is the tag */ XCT_CLOSING = 2, /* This is the tag */ XCT_BOTH = 3, /* This is the tag */ XCT__UNK__MASK = 4, /* Mask of everything unexpected */ XCT_UNKNOWN_OP = 5, /* Unexpected tag */ XCT_UNKNOWN_CL = 6, /* Unexpected tag */ XCT_UNKNOWN_BO = 7 /* Unexpected tag */ } xer_check_tag_e; xer_check_tag_e xer_check_tag(const void *buf_ptr, int size, const char *need_tag); /* * Get the number of bytes consisting entirely of XER whitespace characters. * RETURN VALUES: * >=0: Number of whitespace characters in the string. */ size_t xer_whitespace_span(const void *chunk_buf, size_t chunk_size); /* * Skip the series of anticipated extensions. */ int xer_skip_unknown(xer_check_tag_e tcv, ber_tlv_len_t *depth); #ifdef __cplusplus } #endif #endif /* _XER_DECODER_H_ */ nextepc-0.3.10/lib/s1ap/asn1c/xer_encoder.c000066400000000000000000000155671333553357400203520ustar00rootroot00000000000000/*- * Copyright (c) 2003, 2004 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include #include /* * The XER encoder of any type. May be invoked by the application. */ asn_enc_rval_t xer_encode(const asn_TYPE_descriptor_t *td, const void *sptr, enum xer_encoder_flags_e xer_flags, asn_app_consume_bytes_f *cb, void *app_key) { asn_enc_rval_t er = {0, 0, 0}; asn_enc_rval_t tmper; const char *mname; size_t mlen; int xcan = (xer_flags & XER_F_CANONICAL) ? 1 : 2; if(!td || !sptr) goto cb_failed; mname = td->xml_tag; mlen = strlen(mname); ASN__CALLBACK3("<", 1, mname, mlen, ">", 1); tmper = td->op->xer_encoder(td, sptr, 1, xer_flags, cb, app_key); if(tmper.encoded == -1) return tmper; er.encoded += tmper.encoded; ASN__CALLBACK3("\n", xcan); ASN__ENCODED_OK(er); cb_failed: ASN__ENCODE_FAILED; } /* * This is a helper function for xer_fprint, which directs all incoming data * into the provided file descriptor. */ static int 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; } int xer_fprint(FILE *stream, const asn_TYPE_descriptor_t *td, const void *sptr) { asn_enc_rval_t er; if(!stream) stream = stdout; if(!td || !sptr) return -1; er = xer_encode(td, sptr, XER_F_BASIC, xer__print2fp, stream); if(er.encoded == -1) return -1; return fflush(stream); } struct xer_buffer { char *buffer; size_t buffer_size; size_t allocated_size; }; static int xer__buffer_append(const void *buffer, size_t size, void *app_key) { struct xer_buffer *xb = app_key; while(xb->buffer_size + size + 1 > xb->allocated_size) { size_t new_size = 2 * (xb->allocated_size ? xb->allocated_size : 64); char *new_buf = MALLOC(new_size); if(!new_buf) return -1; if (xb->buffer) { memcpy(new_buf, xb->buffer, xb->buffer_size); } FREEMEM(xb->buffer); xb->buffer = new_buf; xb->allocated_size = new_size; } memcpy(xb->buffer + xb->buffer_size, buffer, size); xb->buffer_size += size; xb->buffer[xb->buffer_size] = '\0'; return 0; } enum xer_equivalence_e xer_equivalent(const struct asn_TYPE_descriptor_s *td, const void *struct1, const void *struct2, FILE *opt_debug_stream) { struct xer_buffer xb1 = {0, 0, 0}; struct xer_buffer xb2 = {0, 0, 0}; asn_enc_rval_t e1, e2; asn_dec_rval_t rval; void *sptr = NULL; if(!td || !struct1 || !struct2) { if(opt_debug_stream) { if(!td) fprintf(opt_debug_stream, "Type descriptor missing\n"); if(!struct1) fprintf(opt_debug_stream, "Structure 1 missing\n"); if(!struct2) fprintf(opt_debug_stream, "Structure 2 missing\n"); } return XEQ_FAILURE; } e1 = xer_encode(td, struct1, XER_F_BASIC, xer__buffer_append, &xb1); if(e1.encoded == -1) { if(opt_debug_stream) { fprintf(stderr, "XER Encoding of %s failed\n", td->name); } FREEMEM(xb1.buffer); return XEQ_ENCODE1_FAILED; } e2 = xer_encode(td, struct2, XER_F_BASIC, xer__buffer_append, &xb2); if(e2.encoded == -1) { if(opt_debug_stream) { fprintf(stderr, "XER Encoding of %s failed\n", td->name); } FREEMEM(xb1.buffer); FREEMEM(xb2.buffer); return XEQ_ENCODE1_FAILED; } if(xb1.buffer_size != xb2.buffer_size || memcmp(xb1.buffer, xb2.buffer, xb1.buffer_size) != 0) { if(opt_debug_stream) { fprintf(opt_debug_stream, "Structures XER-encoded into different byte streams:\n=== " "Structure 1 ===\n%s\n=== Structure 2 ===\n%s\n", xb1.buffer, xb2.buffer); } FREEMEM(xb1.buffer); FREEMEM(xb2.buffer); return XEQ_DIFFERENT; } else { if(opt_debug_stream) { fprintf(opt_debug_stream, "Both structures encoded into the same XER byte stream " "of size %" ASN_PRI_SIZE ":\n%s", xb1.buffer_size, xb1.buffer); } } rval = xer_decode(NULL, td, (void **)&sptr, xb1.buffer, xb1.buffer_size); switch(rval.code) { case RC_OK: break; case RC_WMORE: if(opt_debug_stream) { fprintf(opt_debug_stream, "Structure %s XER decode unexpectedly requires " "more data:\n%s\n", td->name, xb1.buffer); } /* Fall through */ case RC_FAIL: default: if(opt_debug_stream) { fprintf(opt_debug_stream, "Structure %s XER decoding resulted in failure.\n", td->name); } ASN_STRUCT_FREE(*td, sptr); FREEMEM(xb1.buffer); FREEMEM(xb2.buffer); return XEQ_DECODE_FAILED; } if(rval.consumed != xb1.buffer_size && ((rval.consumed > xb1.buffer_size) || xer_whitespace_span(xb1.buffer + rval.consumed, xb1.buffer_size - rval.consumed) != (xb1.buffer_size - rval.consumed))) { if(opt_debug_stream) { fprintf(opt_debug_stream, "Round-trip decode of %s required less bytes (%" ASN_PRI_SIZE ") than " "encoded (%" ASN_PRI_SIZE ")\n", td->name, rval.consumed, xb1.buffer_size); } ASN_STRUCT_FREE(*td, sptr); FREEMEM(xb1.buffer); FREEMEM(xb2.buffer); return XEQ_ROUND_TRIP_FAILED; } /* * Reuse xb2 to encode newly decoded structure. */ FREEMEM(xb2.buffer); memset(&xb2, 0, sizeof(xb2)); e2 = xer_encode(td, sptr, XER_F_BASIC, xer__buffer_append, &xb2); if(e2.encoded == -1) { if(opt_debug_stream) { fprintf(stderr, "XER Encoding of round-trip decode of %s failed\n", td->name); } ASN_STRUCT_FREE(*td, sptr); FREEMEM(xb1.buffer); FREEMEM(xb2.buffer); return XEQ_ROUND_TRIP_FAILED; } ASN_STRUCT_FREE(*td, sptr); sptr = 0; if(xb1.buffer_size != xb2.buffer_size || memcmp(xb1.buffer, xb2.buffer, xb1.buffer_size) != 0) { if(opt_debug_stream) { fprintf(opt_debug_stream, "XER Encoding of round-trip decode of %s resulted in " "different byte stream:\n" "=== Original ===\n%s\n" "=== Round-tripped ===\n%s\n", xb1.buffer, xb2.buffer, td->name); } FREEMEM(xb1.buffer); FREEMEM(xb2.buffer); return XEQ_ROUND_TRIP_FAILED; } FREEMEM(xb1.buffer); FREEMEM(xb2.buffer); return XEQ_SUCCESS; } nextepc-0.3.10/lib/s1ap/asn1c/xer_encoder.h000066400000000000000000000057111333553357400203450ustar00rootroot00000000000000/*- * Copyright (c) 2004-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _XER_ENCODER_H_ #define _XER_ENCODER_H_ #include #ifdef __cplusplus extern "C" { #endif struct asn_TYPE_descriptor_s; /* Forward declaration */ /* Flags used by the xer_encode() and (*xer_type_encoder_f), defined below */ enum xer_encoder_flags_e { /* Mode of encoding */ XER_F_BASIC = 0x01, /* BASIC-XER (pretty-printing) */ XER_F_CANONICAL = 0x02 /* Canonical XER (strict rules) */ }; /* * The XER encoder of any type. May be invoked by the application. * Produces CANONICAL-XER and BASIC-XER depending on the (xer_flags). */ asn_enc_rval_t xer_encode(const struct asn_TYPE_descriptor_s *type_descriptor, const void *struct_ptr, /* Structure to be encoded */ enum xer_encoder_flags_e xer_flags, asn_app_consume_bytes_f *consume_bytes_cb, void *app_key /* Arbitrary callback argument */ ); /* * The variant of the above function which dumps the BASIC-XER (XER_F_BASIC) * output into the chosen file pointer. * RETURN VALUES: * 0: The structure is printed. * -1: Problem printing the structure. * WARNING: No sensible errno value is returned. */ int xer_fprint(FILE *stream, const struct asn_TYPE_descriptor_s *td, const void *struct_ptr); /* * A helper function that uses XER encoding/decoding to verify that: * - Both structures encode into the same BASIC XER. * - Both resulting XER byte streams can be decoded back. * - Both decoded structures encode into the same BASIC XER (round-trip). * All of this verifies equivalence between structures and a round-trip. * ARGUMENTS: * (opt_debug_stream) - If specified, prints ongoing details. */ enum xer_equivalence_e { XEQ_SUCCESS, /* The only completely positive return value */ XEQ_FAILURE, /* General failure */ XEQ_ENCODE1_FAILED, /* First sructure XER encoding failed */ XEQ_ENCODE2_FAILED, /* Second structure XER encoding failed */ XEQ_DIFFERENT, /* Structures encoded into different XER */ XEQ_DECODE_FAILED, /* Decode of the XER data failed */ XEQ_ROUND_TRIP_FAILED /* Bad round-trip */ }; enum xer_equivalence_e xer_equivalent( const struct asn_TYPE_descriptor_s *type_descriptor, const void *struct1, const void *struct2, FILE *opt_debug_stream); /* * Type of the generic XER encoder. */ typedef asn_enc_rval_t(xer_type_encoder_f)( const struct asn_TYPE_descriptor_s *type_descriptor, const void *struct_ptr, /* Structure to be encoded */ int ilevel, /* Level of indentation */ enum xer_encoder_flags_e xer_flags, asn_app_consume_bytes_f *consume_bytes_cb, /* Callback */ void *app_key /* Arbitrary callback argument */ ); #ifdef __cplusplus } #endif #endif /* _XER_ENCODER_H_ */ nextepc-0.3.10/lib/s1ap/asn1c/xer_support.c000066400000000000000000000126401333553357400204340ustar00rootroot00000000000000/* * Copyright (c) 2003, 2004 X/IO Labs, xiolabs.com. * Copyright (c) 2003, 2004, 2005 Lev Walkin . * All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #include #include /* Parser states */ typedef enum { ST_TEXT, ST_TAG_START, ST_TAG_BODY, ST_TAG_QUOTE_WAIT, ST_TAG_QUOTED_STRING, ST_TAG_UNQUOTED_STRING, ST_COMMENT_WAIT_DASH1, /* ""[0] */ ST_COMMENT_CLO_RT /* "-->"[1] */ } pstate_e; static const int _charclass[256] = { 0,0,0,0,0,0,0,0, 0,1,1,0,1,1,0,0, 0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 1,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0, 2,2,2,2,2,2,2,2, 2,2,0,0,0,0,0,0, /* 01234567 89 */ 0,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3, /* ABCDEFG HIJKLMNO */ 3,3,3,3,3,3,3,3, 3,3,3,0,0,0,0,0, /* PQRSTUVW XYZ */ 0,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3, /* abcdefg hijklmno */ 3,3,3,3,3,3,3,3, 3,3,3,0,0,0,0,0 /* pqrstuvw xyz */ }; #define WHITESPACE(c) (_charclass[(unsigned char)(c)] == 1) #define ALNUM(c) (_charclass[(unsigned char)(c)] >= 2) #define ALPHA(c) (_charclass[(unsigned char)(c)] == 3) /* Aliases for characters, ASCII/UTF-8 */ #define EXCLAM 0x21 /* '!' */ #define CQUOTE 0x22 /* '"' */ #define CDASH 0x2d /* '-' */ #define CSLASH 0x2f /* '/' */ #define LANGLE 0x3c /* '<' */ #define CEQUAL 0x3d /* '=' */ #define RANGLE 0x3e /* '>' */ #define CQUEST 0x3f /* '?' */ /* Invoke token callback */ #define TOKEN_CB_CALL(type, _ns, _current_too, _final) do { \ int _ret; \ pstate_e ns = _ns; \ ssize_t _sz = (p - chunk_start) + _current_too; \ if (!_sz) { \ /* Shortcut */ \ state = _ns; \ break; \ } \ _ret = cb(type, chunk_start, _sz, key); \ if(_ret < _sz) { \ if(_current_too && _ret == -1) \ state = ns; \ goto finish; \ } \ chunk_start = p + _current_too; \ state = ns; \ } while(0) #define TOKEN_CB(_type, _ns, _current_too) \ TOKEN_CB_CALL(_type, _ns, _current_too, 0) #define PXML_TAG_FINAL_CHUNK_TYPE PXML_TAG_END #define PXML_COMMENT_FINAL_CHUNK_TYPE PXML_COMMENT_END #define TOKEN_CB_FINAL(_type, _ns, _current_too) \ TOKEN_CB_CALL( _type ## _FINAL_CHUNK_TYPE , _ns, _current_too, 1) /* * Parser itself */ ssize_t pxml_parse(int *stateContext, const void *xmlbuf, size_t size, pxml_callback_f *cb, void *key) { pstate_e state = (pstate_e)*stateContext; const char *chunk_start = (const char *)xmlbuf; const char *p = chunk_start; const char *end = p + size; for(; p < end; p++) { int C = *(const unsigned char *)p; switch(state) { case ST_TEXT: /* * Initial state: we're in the middle of some text, * or just have started. */ if (C == LANGLE) /* We're now in the tag, probably */ TOKEN_CB(PXML_TEXT, ST_TAG_START, 0); break; case ST_TAG_START: if (ALPHA(C) || (C == CSLASH)) state = ST_TAG_BODY; else if (C == EXCLAM) state = ST_COMMENT_WAIT_DASH1; else /* * Not characters and not whitespace. * Must be something like "3 < 4". */ TOKEN_CB(PXML_TEXT, ST_TEXT, 1);/* Flush as data */ break; case ST_TAG_BODY: switch(C) { case RANGLE: /* End of the tag */ TOKEN_CB_FINAL(PXML_TAG, ST_TEXT, 1); break; case LANGLE: /* * The previous tag wasn't completed, but still * recognized as valid. (Mozilla-compatible) */ TOKEN_CB_FINAL(PXML_TAG, ST_TAG_START, 0); break; case CEQUAL: state = ST_TAG_QUOTE_WAIT; break; } break; case ST_TAG_QUOTE_WAIT: /* * State after the equal sign ("=") in the tag. */ switch(C) { case CQUOTE: state = ST_TAG_QUOTED_STRING; break; case RANGLE: /* End of the tag */ TOKEN_CB_FINAL(PXML_TAG, ST_TEXT, 1); break; default: if(!WHITESPACE(C)) /* Unquoted string value */ state = ST_TAG_UNQUOTED_STRING; } break; case ST_TAG_QUOTED_STRING: /* * Tag attribute's string value in quotes. */ if(C == CQUOTE) { /* Return back to the tag state */ state = ST_TAG_BODY; } break; case ST_TAG_UNQUOTED_STRING: if(C == RANGLE) { /* End of the tag */ TOKEN_CB_FINAL(PXML_TAG, ST_TEXT, 1); } else if(WHITESPACE(C)) { /* Return back to the tag state */ state = ST_TAG_BODY; } break; case ST_COMMENT_WAIT_DASH1: if(C == CDASH) { state = ST_COMMENT_WAIT_DASH2; } else { /* Some ordinary tag. */ state = ST_TAG_BODY; } break; case ST_COMMENT_WAIT_DASH2: if(C == CDASH) { /* Seen "<--" */ state = ST_COMMENT; } else { /* Some ordinary tag */ state = ST_TAG_BODY; } break; case ST_COMMENT: if(C == CDASH) { state = ST_COMMENT_CLO_DASH2; } break; case ST_COMMENT_CLO_DASH2: if(C == CDASH) { state = ST_COMMENT_CLO_RT; } else { /* This is not an end of a comment */ state = ST_COMMENT; } break; case ST_COMMENT_CLO_RT: if(C == RANGLE) { TOKEN_CB_FINAL(PXML_COMMENT, ST_TEXT, 1); } else if(C == CDASH) { /* Maintain current state, still waiting for '>' */ } else { state = ST_COMMENT; } break; } /* switch(*ptr) */ } /* for() */ /* * Flush the partially processed chunk, state permitting. */ if(p - chunk_start) { switch (state) { case ST_COMMENT: TOKEN_CB(PXML_COMMENT, state, 0); break; case ST_TEXT: TOKEN_CB(PXML_TEXT, state, 0); break; default: break; /* a no-op */ } } finish: *stateContext = (int)state; return chunk_start - (const char *)xmlbuf; } nextepc-0.3.10/lib/s1ap/asn1c/xer_support.h000066400000000000000000000034231333553357400204400ustar00rootroot00000000000000/* * Copyright (c) 2003, 2004 X/IO Labs, xiolabs.com. * Copyright (c) 2003-2017 Lev Walkin . All rights reserved. * Redistribution and modifications are permitted subject to BSD license. */ #ifndef _XER_SUPPORT_H_ #define _XER_SUPPORT_H_ #include /* Platform-specific types */ #ifdef __cplusplus extern "C" { #endif /* * Types of data transferred to the application. */ typedef enum { PXML_TEXT, /* Plain text between XML tags. */ PXML_TAG, /* A tag, starting with '<'. */ PXML_COMMENT, /* An XML comment, including "". */ /* * The following chunk types are reported if the chunk * terminates the specified XML element. */ PXML_TAG_END, /* Tag ended */ PXML_COMMENT_END /* Comment ended */ } pxml_chunk_type_e; /* * Callback function that is called by the parser when parsed data is * available. The _opaque is the pointer to a field containing opaque user * data specified in pxml_create() call. The chunk type is _type and the text * data is the piece of buffer identified by _bufid (as supplied to * pxml_feed() call) starting at offset _offset and of _size bytes size. * The chunk is NOT '\0'-terminated. */ typedef int (pxml_callback_f)(pxml_chunk_type_e _type, const void *_chunk_data, size_t _chunk_size, void *_key); /* * Parse the given buffer as it were a chunk of XML data. * Invoke the specified callback each time the meaninful data is found. * This function returns number of bytes consumed from the bufer. * It will always be lesser than or equal to the specified _size. * The next invocation of this function must account the difference. */ ssize_t pxml_parse(int *_stateContext, const void *_buf, size_t _size, pxml_callback_f *cb, void *_key); #ifdef __cplusplus } #endif #endif /* _XER_SUPPORT_H_ */ nextepc-0.3.10/lib/s1ap/s1ap_asn1c.h000066400000000000000000000470571333553357400170050ustar00rootroot00000000000000#ifndef __S1AP_ASN1C_H__ #define __S1AP_ASN1C_H__ #if HAVE_CONFIG_H #include "config.h" #endif #include "S1AP_Additional-GUTI.h" #include "S1AP_AdditionalCSFallbackIndicator.h" #include "S1AP_AllocationAndRetentionPriority.h" #include "S1AP_AreaScopeOfMDT.h" #include "S1AP_AssistanceDataForCECapableUEs.h" #include "S1AP_AssistanceDataForPaging.h" #include "S1AP_AssistanceDataForRecommendedCells.h" #include "S1AP_BPLMNs.h" #include "S1AP_BearerType.h" #include "S1AP_Bearers-SubjectToStatusTransfer-Item.h" #include "S1AP_Bearers-SubjectToStatusTransferList.h" #include "S1AP_BitRate.h" #include "S1AP_BroadcastCancelledAreaList.h" #include "S1AP_BroadcastCompletedAreaList.h" #include "S1AP_CE-mode-B-SupportIndicator.h" #include "S1AP_CELevel.h" #include "S1AP_CGI.h" #include "S1AP_CI.h" #include "S1AP_CNDomain.h" #include "S1AP_COUNTValueExtended.h" #include "S1AP_COUNTvalue.h" #include "S1AP_COUNTvaluePDCP-SNlength18.h" #include "S1AP_CSFallbackIndicator.h" #include "S1AP_CSG-Id.h" #include "S1AP_CSG-IdList-Item.h" #include "S1AP_CSG-IdList.h" #include "S1AP_CSGMembershipInfo.h" #include "S1AP_CSGMembershipStatus.h" #include "S1AP_CancelledCellinEAI-Item.h" #include "S1AP_CancelledCellinEAI.h" #include "S1AP_CancelledCellinTAI-Item.h" #include "S1AP_CancelledCellinTAI.h" #include "S1AP_Cause.h" #include "S1AP_CauseMisc.h" #include "S1AP_CauseNas.h" #include "S1AP_CauseProtocol.h" #include "S1AP_CauseRadioNetwork.h" #include "S1AP_CauseTransport.h" #include "S1AP_Cdma2000HORequiredIndication.h" #include "S1AP_Cdma2000HOStatus.h" #include "S1AP_Cdma2000OneXMEID.h" #include "S1AP_Cdma2000OneXMSI.h" #include "S1AP_Cdma2000OneXPilot.h" #include "S1AP_Cdma2000OneXRAND.h" #include "S1AP_Cdma2000OneXSRVCCInfo.h" #include "S1AP_Cdma2000PDU.h" #include "S1AP_Cdma2000RATType.h" #include "S1AP_Cdma2000SectorID.h" #include "S1AP_Cell-Size.h" #include "S1AP_CellAccessMode.h" #include "S1AP_CellBasedMDT.h" #include "S1AP_CellID-Broadcast-Item.h" #include "S1AP_CellID-Broadcast.h" #include "S1AP_CellID-Cancelled-Item.h" #include "S1AP_CellID-Cancelled.h" #include "S1AP_CellIdListforMDT.h" #include "S1AP_CellIdentifierAndCELevelForCECapableUEs.h" #include "S1AP_CellIdentity.h" #include "S1AP_CellTrafficTrace.h" #include "S1AP_CellType.h" #include "S1AP_CompletedCellinEAI-Item.h" #include "S1AP_CompletedCellinEAI.h" #include "S1AP_CompletedCellinTAI-Item.h" #include "S1AP_CompletedCellinTAI.h" #include "S1AP_ConcurrentWarningMessageIndicator.h" #include "S1AP_ConnectionEstablishmentIndication.h" #include "S1AP_Correlation-ID.h" #include "S1AP_Coverage-Level.h" #include "S1AP_Criticality.h" #include "S1AP_CriticalityDiagnostics-IE-Item.h" #include "S1AP_CriticalityDiagnostics-IE-List.h" #include "S1AP_CriticalityDiagnostics.h" #include "S1AP_DCN-ID.h" #include "S1AP_DL-CP-SecurityInformation.h" #include "S1AP_DL-Forwarding.h" #include "S1AP_DL-NAS-MAC.h" #include "S1AP_DLNASPDUDeliveryAckRequest.h" #include "S1AP_Data-Forwarding-Not-Possible.h" #include "S1AP_DataCodingScheme.h" #include "S1AP_DeactivateTrace.h" #include "S1AP_Direct-Forwarding-Path-Availability.h" #include "S1AP_DownlinkNASTransport.h" #include "S1AP_DownlinkNonUEAssociatedLPPaTransport.h" #include "S1AP_DownlinkS1cdma2000tunnelling.h" #include "S1AP_DownlinkUEAssociatedLPPaTransport.h" #include "S1AP_E-RAB-ID.h" #include "S1AP_E-RAB-IE-ContainerList.h" #include "S1AP_E-RAB-IE-ContainerPairList.h" #include "S1AP_E-RABAdmittedItem.h" #include "S1AP_E-RABAdmittedList.h" #include "S1AP_E-RABDataForwardingItem.h" #include "S1AP_E-RABFailedToResumeItemResumeReq.h" #include "S1AP_E-RABFailedToResumeItemResumeRes.h" #include "S1AP_E-RABFailedToResumeListResumeReq.h" #include "S1AP_E-RABFailedToResumeListResumeRes.h" #include "S1AP_E-RABFailedToSetupItemHOReqAck.h" #include "S1AP_E-RABFailedtoSetupListHOReqAck.h" #include "S1AP_E-RABInformationList.h" #include "S1AP_E-RABInformationListItem.h" #include "S1AP_E-RABItem.h" #include "S1AP_E-RABLevelQoSParameters.h" #include "S1AP_E-RABList.h" #include "S1AP_E-RABModificationConfirm.h" #include "S1AP_E-RABModificationIndication.h" #include "S1AP_E-RABModifyItemBearerModConf.h" #include "S1AP_E-RABModifyItemBearerModRes.h" #include "S1AP_E-RABModifyListBearerModConf.h" #include "S1AP_E-RABModifyListBearerModRes.h" #include "S1AP_E-RABModifyRequest.h" #include "S1AP_E-RABModifyResponse.h" #include "S1AP_E-RABNotToBeModifiedItemBearerModInd.h" #include "S1AP_E-RABNotToBeModifiedListBearerModInd.h" #include "S1AP_E-RABReleaseCommand.h" #include "S1AP_E-RABReleaseIndication.h" #include "S1AP_E-RABReleaseItemBearerRelComp.h" #include "S1AP_E-RABReleaseListBearerRelComp.h" #include "S1AP_E-RABReleaseResponse.h" #include "S1AP_E-RABSetupItemBearerSURes.h" #include "S1AP_E-RABSetupItemCtxtSURes.h" #include "S1AP_E-RABSetupListBearerSURes.h" #include "S1AP_E-RABSetupListCtxtSURes.h" #include "S1AP_E-RABSetupRequest.h" #include "S1AP_E-RABSetupResponse.h" #include "S1AP_E-RABSubjecttoDataForwardingList.h" #include "S1AP_E-RABToBeModifiedItemBearerModInd.h" #include "S1AP_E-RABToBeModifiedItemBearerModReq.h" #include "S1AP_E-RABToBeModifiedListBearerModInd.h" #include "S1AP_E-RABToBeModifiedListBearerModReq.h" #include "S1AP_E-RABToBeSetupItemBearerSUReq.h" #include "S1AP_E-RABToBeSetupItemCtxtSUReq.h" #include "S1AP_E-RABToBeSetupItemHOReq.h" #include "S1AP_E-RABToBeSetupListBearerSUReq.h" #include "S1AP_E-RABToBeSetupListCtxtSUReq.h" #include "S1AP_E-RABToBeSetupListHOReq.h" #include "S1AP_E-RABToBeSwitchedDLItem.h" #include "S1AP_E-RABToBeSwitchedDLList.h" #include "S1AP_E-RABToBeSwitchedULItem.h" #include "S1AP_E-RABToBeSwitchedULList.h" #include "S1AP_E-UTRAN-Trace-ID.h" #include "S1AP_EARFCN.h" #include "S1AP_ECGI-List.h" #include "S1AP_ECGIList.h" #include "S1AP_ECGIListForRestart.h" #include "S1AP_ENB-ID.h" #include "S1AP_ENB-StatusTransfer-TransparentContainer.h" #include "S1AP_ENB-UE-S1AP-ID.h" #include "S1AP_ENBCPRelocationIndication.h" #include "S1AP_ENBConfigurationTransfer.h" #include "S1AP_ENBConfigurationUpdate.h" #include "S1AP_ENBConfigurationUpdateAcknowledge.h" #include "S1AP_ENBConfigurationUpdateFailure.h" #include "S1AP_ENBDirectInformationTransfer.h" #include "S1AP_ENBIndirectX2TransportLayerAddresses.h" #include "S1AP_ENBStatusTransfer.h" #include "S1AP_ENBX2ExtTLA.h" #include "S1AP_ENBX2ExtTLAs.h" #include "S1AP_ENBX2GTPTLAs.h" #include "S1AP_ENBX2TLAs.h" #include "S1AP_ENBname.h" #include "S1AP_EPLMNs.h" #include "S1AP_EUTRAN-CGI.h" #include "S1AP_EUTRANRoundTripDelayEstimationInfo.h" #include "S1AP_EmergencyAreaID-Broadcast-Item.h" #include "S1AP_EmergencyAreaID-Broadcast.h" #include "S1AP_EmergencyAreaID-Cancelled-Item.h" #include "S1AP_EmergencyAreaID-Cancelled.h" #include "S1AP_EmergencyAreaID.h" #include "S1AP_EmergencyAreaIDList.h" #include "S1AP_EmergencyAreaIDListForRestart.h" #include "S1AP_EncryptionAlgorithms.h" #include "S1AP_EnhancedCoverageRestricted.h" #include "S1AP_ErrorIndication.h" #include "S1AP_EventType.h" #include "S1AP_ExpectedActivityPeriod.h" #include "S1AP_ExpectedHOInterval.h" #include "S1AP_ExpectedIdlePeriod.h" #include "S1AP_ExpectedUEActivityBehaviour.h" #include "S1AP_ExpectedUEBehaviour.h" #include "S1AP_Extended-UEIdentityIndexValue.h" #include "S1AP_ExtendedRNC-ID.h" #include "S1AP_ExtendedRepetitionPeriod.h" #include "S1AP_ForbiddenInterRATs.h" #include "S1AP_ForbiddenLACs.h" #include "S1AP_ForbiddenLAs-Item.h" #include "S1AP_ForbiddenLAs.h" #include "S1AP_ForbiddenTACs.h" #include "S1AP_ForbiddenTAs-Item.h" #include "S1AP_ForbiddenTAs.h" #include "S1AP_GBR-QosInformation.h" #include "S1AP_GERAN-Cell-ID.h" #include "S1AP_GTP-TEID.h" #include "S1AP_GUMMEI.h" #include "S1AP_GUMMEIList.h" #include "S1AP_GUMMEIType.h" #include "S1AP_GWContextReleaseIndication.h" #include "S1AP_Global-ENB-ID.h" #include "S1AP_HFN.h" #include "S1AP_HFNModified.h" #include "S1AP_HFNforPDCP-SNlength18.h" #include "S1AP_HandoverCancel.h" #include "S1AP_HandoverCancelAcknowledge.h" #include "S1AP_HandoverCommand.h" #include "S1AP_HandoverFailure.h" #include "S1AP_HandoverNotify.h" #include "S1AP_HandoverPreparationFailure.h" #include "S1AP_HandoverRequest.h" #include "S1AP_HandoverRequestAcknowledge.h" #include "S1AP_HandoverRequired.h" #include "S1AP_HandoverRestrictionList.h" #include "S1AP_HandoverType.h" #include "S1AP_IMSI.h" #include "S1AP_ImmediateMDT.h" #include "S1AP_InformationOnRecommendedCellsAndENBsForPaging.h" #include "S1AP_InitialContextSetupFailure.h" #include "S1AP_InitialContextSetupRequest.h" #include "S1AP_InitialContextSetupResponse.h" #include "S1AP_InitialUEMessage.h" #include "S1AP_InitiatingMessage.h" #include "S1AP_IntegrityProtectionAlgorithms.h" #include "S1AP_IntendedNumberOfPagingAttempts.h" #include "S1AP_Inter-SystemInformationTransferType.h" #include "S1AP_InterfacesToTrace.h" #include "S1AP_KillAllWarningMessages.h" #include "S1AP_KillRequest.h" #include "S1AP_KillResponse.h" #include "S1AP_L3-Information.h" #include "S1AP_LAC.h" #include "S1AP_LAI.h" #include "S1AP_LHN-ID.h" #include "S1AP_LPPa-PDU.h" #include "S1AP_LastVisitedCell-Item.h" #include "S1AP_LastVisitedEUTRANCellInformation.h" #include "S1AP_LastVisitedGERANCellInformation.h" #include "S1AP_LastVisitedUTRANCellInformation.h" #include "S1AP_Links-to-log.h" #include "S1AP_ListeningSubframePattern.h" #include "S1AP_LocationReport.h" #include "S1AP_LocationReportingControl.h" #include "S1AP_LocationReportingFailureIndication.h" #include "S1AP_LoggedMBSFNMDT.h" #include "S1AP_LoggedMDT.h" #include "S1AP_LoggingDuration.h" #include "S1AP_LoggingInterval.h" #include "S1AP_M-TMSI.h" #include "S1AP_M1PeriodicReporting.h" #include "S1AP_M1ReportingTrigger.h" #include "S1AP_M1ThresholdEventA2.h" #include "S1AP_M3Configuration.h" #include "S1AP_M3period.h" #include "S1AP_M4Configuration.h" #include "S1AP_M4period.h" #include "S1AP_M5Configuration.h" #include "S1AP_M5period.h" #include "S1AP_M6Configuration.h" #include "S1AP_M6delay-threshold.h" #include "S1AP_M6report-Interval.h" #include "S1AP_M7Configuration.h" #include "S1AP_M7period.h" #include "S1AP_MBSFN-ResultToLog.h" #include "S1AP_MBSFN-ResultToLogInfo.h" #include "S1AP_MDT-Activation.h" #include "S1AP_MDT-Configuration.h" #include "S1AP_MDT-Location-Info.h" #include "S1AP_MDTMode-Extension.h" #include "S1AP_MDTMode.h" #include "S1AP_MDTPLMNList.h" #include "S1AP_MME-Code.h" #include "S1AP_MME-Group-ID.h" #include "S1AP_MME-UE-S1AP-ID.h" #include "S1AP_MMECPRelocationIndication.h" #include "S1AP_MMEConfigurationTransfer.h" #include "S1AP_MMEConfigurationUpdate.h" #include "S1AP_MMEConfigurationUpdateAcknowledge.h" #include "S1AP_MMEConfigurationUpdateFailure.h" #include "S1AP_MMEDirectInformationTransfer.h" #include "S1AP_MMEPagingTarget.h" #include "S1AP_MMERelaySupportIndicator.h" #include "S1AP_MMEStatusTransfer.h" #include "S1AP_MMEname.h" #include "S1AP_MSClassmark2.h" #include "S1AP_MSClassmark3.h" #include "S1AP_ManagementBasedMDTAllowed.h" #include "S1AP_Masked-IMEISV.h" #include "S1AP_MeasurementThresholdA2.h" #include "S1AP_MeasurementsToActivate.h" #include "S1AP_MessageIdentifier.h" #include "S1AP_MobilityInformation.h" #include "S1AP_MutingAvailabilityIndication.h" #include "S1AP_MutingPatternInformation.h" #include "S1AP_NAS-PDU.h" #include "S1AP_NASDeliveryIndication.h" #include "S1AP_NASNonDeliveryIndication.h" #include "S1AP_NASSecurityParametersfromE-UTRAN.h" #include "S1AP_NASSecurityParameterstoE-UTRAN.h" #include "S1AP_NB-IoT-DefaultPagingDRX.h" #include "S1AP_NB-IoT-Paging-eDRX-Cycle.h" #include "S1AP_NB-IoT-Paging-eDRXInformation.h" #include "S1AP_NB-IoT-PagingTimeWindow.h" #include "S1AP_NB-IoT-UEIdentityIndexValue.h" #include "S1AP_NextPagingAreaScope.h" #include "S1AP_NumberOfBroadcasts.h" #include "S1AP_NumberofBroadcastRequest.h" #include "S1AP_OldBSS-ToNewBSS-Information.h" #include "S1AP_OverloadAction.h" #include "S1AP_OverloadResponse.h" #include "S1AP_OverloadStart.h" #include "S1AP_OverloadStop.h" #include "S1AP_PDCP-SN.h" #include "S1AP_PDCP-SNExtended.h" #include "S1AP_PDCP-SNlength18.h" #include "S1AP_PLMNidentity.h" #include "S1AP_PS-ServiceNotAvailable.h" #include "S1AP_PWSFailureIndication.h" #include "S1AP_PWSRestartIndication.h" #include "S1AP_PWSfailedECGIList.h" #include "S1AP_Paging-eDRX-Cycle.h" #include "S1AP_Paging-eDRXInformation.h" #include "S1AP_Paging.h" #include "S1AP_PagingAttemptCount.h" #include "S1AP_PagingAttemptInformation.h" #include "S1AP_PagingDRX.h" #include "S1AP_PagingPriority.h" #include "S1AP_PagingTimeWindow.h" #include "S1AP_PathSwitchRequest.h" #include "S1AP_PathSwitchRequestAcknowledge.h" #include "S1AP_PathSwitchRequestFailure.h" #include "S1AP_PedestrianUE.h" #include "S1AP_Port-Number.h" #include "S1AP_Pre-emptionCapability.h" #include "S1AP_Pre-emptionVulnerability.h" #include "S1AP_Presence.h" #include "S1AP_PriorityLevel.h" #include "S1AP_PrivacyIndicator.h" #include "S1AP_PrivateIE-Container.h" #include "S1AP_PrivateIE-Field.h" #include "S1AP_PrivateIE-ID.h" #include "S1AP_PrivateMessage.h" #include "S1AP_ProSeAuthorized.h" #include "S1AP_ProSeDirectCommunication.h" #include "S1AP_ProSeDirectDiscovery.h" #include "S1AP_ProSeUEtoNetworkRelaying.h" #include "S1AP_ProcedureCode.h" #include "S1AP_ProtocolError-IE-ContainerList.h" #include "S1AP_ProtocolExtensionContainer.h" #include "S1AP_ProtocolExtensionField.h" #include "S1AP_ProtocolExtensionID.h" #include "S1AP_ProtocolIE-Container.h" #include "S1AP_ProtocolIE-ContainerList.h" #include "S1AP_ProtocolIE-ContainerPair.h" #include "S1AP_ProtocolIE-ContainerPairList.h" #include "S1AP_ProtocolIE-Field.h" #include "S1AP_ProtocolIE-FieldPair.h" #include "S1AP_ProtocolIE-ID.h" #include "S1AP_ProtocolIE-SingleContainer.h" #include "S1AP_QCI.h" #include "S1AP_RAC.h" #include "S1AP_RAT-Type.h" #include "S1AP_RIMInformation.h" #include "S1AP_RIMRoutingAddress.h" #include "S1AP_RIMTransfer.h" #include "S1AP_RLFReportInformation.h" #include "S1AP_RNC-ID.h" #include "S1AP_RRC-Container.h" #include "S1AP_RRC-Establishment-Cause.h" #include "S1AP_ReceiveStatusOfULPDCPSDUsExtended.h" #include "S1AP_ReceiveStatusOfULPDCPSDUsPDCP-SNlength18.h" #include "S1AP_ReceiveStatusofULPDCPSDUs.h" #include "S1AP_RecommendedCellItem.h" #include "S1AP_RecommendedCellList.h" #include "S1AP_RecommendedCellsForPaging.h" #include "S1AP_RecommendedENBItem.h" #include "S1AP_RecommendedENBList.h" #include "S1AP_RecommendedENBsForPaging.h" #include "S1AP_RelativeMMECapacity.h" #include "S1AP_RelayNode-Indicator.h" #include "S1AP_RepetitionPeriod.h" #include "S1AP_ReportAmountMDT.h" #include "S1AP_ReportArea.h" #include "S1AP_ReportIntervalMDT.h" #include "S1AP_RequestType.h" #include "S1AP_RerouteNASRequest.h" #include "S1AP_Reset.h" #include "S1AP_ResetAcknowledge.h" #include "S1AP_ResetAll.h" #include "S1AP_ResetType.h" #include "S1AP_RetrieveUEInformation.h" #include "S1AP_Routing-ID.h" #include "S1AP_S-TMSI.h" #include "S1AP_S1AP-PDU.h" #include "S1AP_S1SetupFailure.h" #include "S1AP_S1SetupRequest.h" #include "S1AP_S1SetupResponse.h" #include "S1AP_SONConfigurationTransfer.h" #include "S1AP_SONInformation-Extension.h" #include "S1AP_SONInformation.h" #include "S1AP_SONInformationReply.h" #include "S1AP_SONInformationReport.h" #include "S1AP_SONInformationRequest.h" #include "S1AP_SRVCCHOIndication.h" #include "S1AP_SRVCCOperationNotPossible.h" #include "S1AP_SRVCCOperationPossible.h" #include "S1AP_SecurityContext.h" #include "S1AP_SecurityKey.h" #include "S1AP_SerialNumber.h" #include "S1AP_ServedDCNs.h" #include "S1AP_ServedDCNsItem.h" #include "S1AP_ServedGUMMEIs.h" #include "S1AP_ServedGUMMEIsItem.h" #include "S1AP_ServedGroupIDs.h" #include "S1AP_ServedMMECs.h" #include "S1AP_ServedPLMNs.h" #include "S1AP_Source-ToTarget-TransparentContainer.h" #include "S1AP_SourceBSS-ToTargetBSS-TransparentContainer.h" #include "S1AP_SourceOfUEActivityBehaviourInformation.h" #include "S1AP_SourceRNC-ToTargetRNC-TransparentContainer.h" #include "S1AP_SourceeNB-ID.h" #include "S1AP_SourceeNB-ToTargeteNB-TransparentContainer.h" #include "S1AP_StratumLevel.h" #include "S1AP_SubscriberProfileIDforRFP.h" #include "S1AP_SuccessfulOutcome.h" #include "S1AP_SupportedTAs-Item.h" #include "S1AP_SupportedTAs.h" #include "S1AP_SynchronisationInformation.h" #include "S1AP_SynchronisationStatus.h" #include "S1AP_TABasedMDT.h" #include "S1AP_TAC.h" #include "S1AP_TAI-Broadcast-Item.h" #include "S1AP_TAI-Broadcast.h" #include "S1AP_TAI-Cancelled-Item.h" #include "S1AP_TAI-Cancelled.h" #include "S1AP_TAI.h" #include "S1AP_TAIBasedMDT.h" #include "S1AP_TAIItem.h" #include "S1AP_TAIList.h" #include "S1AP_TAIListForRestart.h" #include "S1AP_TAIListforMDT.h" #include "S1AP_TAIListforWarning.h" #include "S1AP_TAListforMDT.h" #include "S1AP_TBCD-STRING.h" #include "S1AP_Target-ToSource-TransparentContainer.h" #include "S1AP_TargetBSS-ToSourceBSS-TransparentContainer.h" #include "S1AP_TargetID.h" #include "S1AP_TargetRNC-ID.h" #include "S1AP_TargetRNC-ToSourceRNC-TransparentContainer.h" #include "S1AP_TargeteNB-ID.h" #include "S1AP_TargeteNB-ToSourceeNB-TransparentContainer.h" #include "S1AP_Threshold-RSRP.h" #include "S1AP_Threshold-RSRQ.h" #include "S1AP_Time-UE-StayedInCell-EnhancedGranularity.h" #include "S1AP_Time-UE-StayedInCell.h" #include "S1AP_TimeSynchronisationInfo.h" #include "S1AP_TimeToWait.h" #include "S1AP_TraceActivation.h" #include "S1AP_TraceDepth.h" #include "S1AP_TraceFailureIndication.h" #include "S1AP_TraceStart.h" #include "S1AP_TrafficLoadReductionIndication.h" #include "S1AP_TransportInformation.h" #include "S1AP_TransportLayerAddress.h" #include "S1AP_TriggeringMessage.h" #include "S1AP_TunnelInformation.h" #include "S1AP_TypeOfError.h" #include "S1AP_UE-HistoryInformation.h" #include "S1AP_UE-HistoryInformationFromTheUE.h" #include "S1AP_UE-RLF-Report-Container-for-extended-bands.h" #include "S1AP_UE-RLF-Report-Container.h" #include "S1AP_UE-RetentionInformation.h" #include "S1AP_UE-S1AP-ID-pair.h" #include "S1AP_UE-S1AP-IDs.h" #include "S1AP_UE-Usage-Type.h" #include "S1AP_UE-associatedLogicalS1-ConnectionItem.h" #include "S1AP_UE-associatedLogicalS1-ConnectionListRes.h" #include "S1AP_UE-associatedLogicalS1-ConnectionListResAck.h" #include "S1AP_UEAggregateMaximumBitrate.h" #include "S1AP_UECapabilityInfoIndication.h" #include "S1AP_UEContextModificationConfirm.h" #include "S1AP_UEContextModificationFailure.h" #include "S1AP_UEContextModificationIndication.h" #include "S1AP_UEContextModificationRequest.h" #include "S1AP_UEContextModificationResponse.h" #include "S1AP_UEContextReleaseCommand.h" #include "S1AP_UEContextReleaseComplete.h" #include "S1AP_UEContextReleaseRequest.h" #include "S1AP_UEContextResumeFailure.h" #include "S1AP_UEContextResumeRequest.h" #include "S1AP_UEContextResumeResponse.h" #include "S1AP_UEContextSuspendRequest.h" #include "S1AP_UEContextSuspendResponse.h" #include "S1AP_UEIdentityIndexValue.h" #include "S1AP_UEInformationTransfer.h" #include "S1AP_UEPagingID.h" #include "S1AP_UERadioCapability.h" #include "S1AP_UERadioCapabilityForPaging.h" #include "S1AP_UERadioCapabilityMatchRequest.h" #include "S1AP_UERadioCapabilityMatchResponse.h" #include "S1AP_UESecurityCapabilities.h" #include "S1AP_UESidelinkAggregateMaximumBitrate.h" #include "S1AP_UEUserPlaneCIoTSupportIndicator.h" #include "S1AP_UL-CP-SecurityInformation.h" #include "S1AP_UL-NAS-Count.h" #include "S1AP_UL-NAS-MAC.h" #include "S1AP_UnsuccessfulOutcome.h" #include "S1AP_UplinkNASTransport.h" #include "S1AP_UplinkNonUEAssociatedLPPaTransport.h" #include "S1AP_UplinkS1cdma2000tunnelling.h" #include "S1AP_UplinkUEAssociatedLPPaTransport.h" #include "S1AP_UserLocationInformation.h" #include "S1AP_V2XServicesAuthorized.h" #include "S1AP_VehicleUE.h" #include "S1AP_VoiceSupportMatchIndicator.h" #include "S1AP_WarningAreaList.h" #include "S1AP_WarningMessageContents.h" #include "S1AP_WarningSecurityInfo.h" #include "S1AP_WarningType.h" #include "S1AP_WriteReplaceWarningRequest.h" #include "S1AP_WriteReplaceWarningResponse.h" #include "S1AP_X2TNLConfigurationInfo.h" #include "S1AP_asn_constant.h" #endif nextepc-0.3.10/lib/s1ap/s1ap_decoder.c000066400000000000000000000013511333553357400173630ustar00rootroot00000000000000#define TRACE_MODULE _s1ap_decoder #include "s1ap_message.h" status_t s1ap_decode_pdu(s1ap_message_t *message, pkbuf_t *pkbuf) { asn_dec_rval_t dec_ret = {0}; d_assert(message, return CORE_ERROR,); d_assert(pkbuf, return CORE_ERROR,); d_assert(pkbuf->payload, return CORE_ERROR,); memset((void *)message, 0, sizeof(s1ap_message_t)); dec_ret = aper_decode(NULL, &asn_DEF_S1AP_S1AP_PDU, (void **)&message, pkbuf->payload, pkbuf->len, 0, 0); if (dec_ret.code != RC_OK) { d_error("Failed to decode S1AP-PDU[%d]", dec_ret.code); return CORE_ERROR; } if (g_trace_mask && TRACE_MODULE >= 25) asn_fprint(stdout, &asn_DEF_S1AP_S1AP_PDU, message); return CORE_OK; } nextepc-0.3.10/lib/s1ap/s1ap_encoder.c000066400000000000000000000014221333553357400173740ustar00rootroot00000000000000#define TRACE_MODULE _s1ap_encoder #include "3gpp_types.h" #include "s1ap_message.h" status_t s1ap_encode_pdu(pkbuf_t **pkbuf, s1ap_message_t *message) { asn_enc_rval_t enc_ret = {0}; d_assert(message, return CORE_ERROR,); if (g_trace_mask && TRACE_MODULE >= 25) asn_fprint(stdout, &asn_DEF_S1AP_S1AP_PDU, message); *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); d_assert(*pkbuf, return CORE_ERROR,); enc_ret = aper_encode_to_buffer(&asn_DEF_S1AP_S1AP_PDU, NULL, message, (*pkbuf)->payload, MAX_SDU_LEN); if (enc_ret.encoded < 0) { d_error("Failed to decode S1AP-PDU[%d]", enc_ret.encoded); pkbuf_free(*pkbuf); return CORE_ERROR; } (*pkbuf)->len = (enc_ret.encoded >> 3); return CORE_OK; } nextepc-0.3.10/lib/s1ap/s1ap_free.c000066400000000000000000000003641333553357400167020ustar00rootroot00000000000000#define TRACE_MODULE _s1ap_free #include "s1ap_message.h" status_t s1ap_free_pdu(s1ap_message_t *message) { d_assert(message, return CORE_ERROR,); ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_S1AP_S1AP_PDU, message); return CORE_OK; } nextepc-0.3.10/lib/s1ap/s1ap_message.h000066400000000000000000000022141333553357400174060ustar00rootroot00000000000000#ifndef _S1AP_MESSAGE_H__ #define _S1AP_MESSAGE_H__ #include "core_pkbuf.h" #include "s1ap_asn1c.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* Octets */ #define S1AP_CLEAR_DATA(__dATA) \ do { \ d_assert((__dATA), , "Null param"); \ if ((__dATA)->buf) \ { \ CORE_FREE((__dATA)->buf); \ (__dATA)->buf = NULL; \ (__dATA)->size = 0; \ } \ } while(0) #define S1AP_STORE_DATA(__dST, __sRC) \ do { \ d_assert((__sRC),, "Null param") \ d_assert((__sRC)->buf,, "Null param") \ d_assert((__dST),, "Null param") \ S1AP_CLEAR_DATA(__dST); \ (__dST)->size = (__sRC)->size; \ (__dST)->buf = core_calloc((__dST)->size, sizeof(c_uint8_t)); \ memcpy((__dST)->buf, (__sRC)->buf, (__dST)->size); \ } while(0) typedef struct S1AP_S1AP_PDU s1ap_message_t; CORE_DECLARE(int) s1ap_decode_pdu(s1ap_message_t *message, pkbuf_t *pkbuf); CORE_DECLARE(int) s1ap_encode_pdu(pkbuf_t **pkbuf, s1ap_message_t *message); CORE_DECLARE(int) s1ap_free_pdu(s1ap_message_t *message); #ifdef __cplusplus } #endif /* __cplusplus */ #endif nextepc-0.3.10/lib/s1ap/support/000077500000000000000000000000001333553357400164025ustar00rootroot00000000000000nextepc-0.3.10/lib/s1ap/support/README.md000066400000000000000000000030321333553357400176570ustar00rootroot00000000000000Modify 36413-e40.txt to 36413-e40.asn =========================================== user@host ~/Documents/git/nextepc/lib/s1ap/support/r14.4.0$ \ diff 36413-e40.txt 36413-e40.asn Use brchiu git's fork for asn1c =========================================== user@host ~/Documents/git$ \ git clone https://github.com/velichkov/asn1c.git asn1c.velichkov user@host ~/Documents/git$ \ git checkout s1ap user@host Documents/git/asn1c$ \ autoreconf -fi;./configure;make ASN.1 encoder/decoder =========================================== user@host ~/Documents/git/nextepc/lib/s1ap/asn1c$ \ ASN1C_PREFIX=S1AP_ ../../../../asn1c.velichkov/asn1c/asn1c -pdu=all \ -fcompound-names -findirect-choice -fno-include-deps \ ../support/r14.4.0/36413-e40.asn Update Files =========================================== user@host ~/Documents/git/nextepc/lib/s1ap/s1ap/asn1c$ \ diff Makefile.am Makefile.am.libasncodec user@host ~/Documents/git/nextepc/lib/s1ap/asn1c$ \ git diff asn_internal.h Remove unnecessary files =========================================== user@host ~/Documents/git/nextepc/lib/s1ap/s1ap/asn1c$ \ rm -f S1AP_E-RAB-IE-ContainerPairList.c \ S1AP_ProtocolError-IE-ContainerList.c \ S1AP_ProtocolIE-ContainerPair.c S1AP_ProtocolIE-FieldPair.c \ S1AP_ProtocolIE-ContainerPairList.c user@host ~/Documents/git/nextepc/lib/s1ap/asn1c$ \ rm -f Makefile.am.asn1convert Makefile.am.libasncodec user@host ~/Documents/git/nextepc/lib/s1ap/asn1c$ \ rm -f converter-example.mk converter-example.c pdu_collection.c nextepc-0.3.10/lib/s1ap/support/r14.4.0/000077500000000000000000000000001333553357400173105ustar00rootroot00000000000000nextepc-0.3.10/lib/s1ap/support/r14.4.0/36413-e40.asn000066400000000000000000006405711333553357400210760ustar00rootroot00000000000000 -- ************************************************************** -- -- 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, DownlinkS1cdma2000tunnelling, 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-RABModificationIndication, E-RABModificationConfirm, E-RABReleaseCommand, E-RABReleaseResponse, E-RABReleaseIndication, E-RABSetupRequest, E-RABSetupResponse, TraceFailureIndication, TraceStart, UECapabilityInfoIndication, UEContextModificationFailure, UEContextModificationRequest, UEContextModificationResponse, UEContextReleaseCommand, UEContextReleaseComplete, UEContextReleaseRequest, UERadioCapabilityMatchRequest, UERadioCapabilityMatchResponse, UplinkUEAssociatedLPPaTransport, UplinkNASTransport, UplinkNonUEAssociatedLPPaTransport, UplinkS1cdma2000tunnelling, WriteReplaceWarningRequest, WriteReplaceWarningResponse, ENBConfigurationTransfer, MMEConfigurationTransfer, PWSRestartIndication, UEContextModificationIndication, UEContextModificationConfirm, RerouteNASRequest, PWSFailureIndication, UEContextSuspendRequest, UEContextSuspendResponse, UEContextResumeRequest, UEContextResumeResponse, UEContextResumeFailure, ConnectionEstablishmentIndication, NASDeliveryIndication, RetrieveUEInformation, UEInformationTransfer, ENBCPRelocationIndication, MMECPRelocationIndication FROM S1AP-PDU-Contents id-CellTrafficTrace, id-DeactivateTrace, id-downlinkUEAssociatedLPPaTransport, id-downlinkNASTransport, id-downlinkNonUEAssociatedLPPaTransport, id-DownlinkS1cdma2000tunnelling, 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-RABModificationIndication, id-E-RABRelease, id-E-RABReleaseIndication, id-E-RABSetup, id-TraceFailureIndication, id-TraceStart, id-UECapabilityInfoIndication, id-UEContextModification, id-UEContextRelease, id-UEContextReleaseRequest, id-UERadioCapabilityMatch, id-uplinkUEAssociatedLPPaTransport, id-uplinkNASTransport, id-uplinkNonUEAssociatedLPPaTransport, id-UplinkS1cdma2000tunnelling, id-WriteReplaceWarning, id-eNBConfigurationTransfer, id-MMEConfigurationTransfer, id-PWSRestartIndication, id-UEContextModificationIndication, id-RerouteNASRequest, id-PWSFailureIndication, id-UEContextSuspend, id-UEContextResume, id-ConnectionEstablishmentIndication, id-NASDeliveryIndication, id-RetrieveUEInformation, id-UEInformationTransfer, id-eNBCPRelocationIndication, id-MMECPRelocationIndication 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 , ..., uERadioCapabilityMatch | e-RABModificationIndication | uEContextModificationIndication | uEContextSuspend | uEContextResume } S1AP-ELEMENTARY-PROCEDURES-CLASS-2 S1AP-ELEMENTARY-PROCEDURE ::= { handoverNotification | e-RABReleaseIndication | paging | downlinkNASTransport | initialUEMessage | uplinkNASTransport | errorIndication | nASNonDeliveryIndication | uEContextReleaseRequest | downlinkS1cdma2000tunnelling | uplinkS1cdma2000tunnelling | uECapabilityInfoIndication | eNBStatusTransfer | mMEStatusTransfer | deactivateTrace | traceStart | traceFailureIndication | cellTrafficTrace | locationReportingControl | locationReportingFailureIndication | locationReport | overloadStart | overloadStop | eNBDirectInformationTransfer | mMEDirectInformationTransfer | eNBConfigurationTransfer | mMEConfigurationTransfer | privateMessage , ..., downlinkUEAssociatedLPPaTransport | uplinkUEAssociatedLPPaTransport | downlinkNonUEAssociatedLPPaTransport | uplinkNonUEAssociatedLPPaTransport | pWSRestartIndication | rerouteNASRequest | pWSFailureIndication | connectionEstablishmentIndication | nASDeliveryIndication | retrieveUEInformation | uEInformationTransfer | eNBCPRelocationIndication | mMECPRelocationIndication } -- ************************************************************** -- -- 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 } downlinkS1cdma2000tunnelling S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE DownlinkS1cdma2000tunnelling PROCEDURE CODE id-DownlinkS1cdma2000tunnelling CRITICALITY ignore } uplinkS1cdma2000tunnelling S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE UplinkS1cdma2000tunnelling PROCEDURE CODE id-UplinkS1cdma2000tunnelling 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 } pWSRestartIndication S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE PWSRestartIndication PROCEDURE CODE id-PWSRestartIndication 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 } uERadioCapabilityMatch S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE UERadioCapabilityMatchRequest SUCCESSFUL OUTCOME UERadioCapabilityMatchResponse PROCEDURE CODE id-UERadioCapabilityMatch CRITICALITY reject } e-RABModificationIndication S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE E-RABModificationIndication SUCCESSFUL OUTCOME E-RABModificationConfirm PROCEDURE CODE id-E-RABModificationIndication CRITICALITY reject } uEContextModificationIndication S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE UEContextModificationIndication SUCCESSFUL OUTCOME UEContextModificationConfirm PROCEDURE CODE id-UEContextModificationIndication CRITICALITY reject } rerouteNASRequest S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE RerouteNASRequest PROCEDURE CODE id-RerouteNASRequest CRITICALITY reject } pWSFailureIndication S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE PWSFailureIndication PROCEDURE CODE id-PWSFailureIndication CRITICALITY ignore } uEContextSuspend S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE UEContextSuspendRequest SUCCESSFUL OUTCOME UEContextSuspendResponse PROCEDURE CODE id-UEContextSuspend CRITICALITY reject } uEContextResume S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE UEContextResumeRequest SUCCESSFUL OUTCOME UEContextResumeResponse UNSUCCESSFUL OUTCOME UEContextResumeFailure PROCEDURE CODE id-UEContextResume CRITICALITY reject } connectionEstablishmentIndication S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE ConnectionEstablishmentIndication PROCEDURE CODE id-ConnectionEstablishmentIndication CRITICALITY reject } nASDeliveryIndication S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE NASDeliveryIndication PROCEDURE CODE id-NASDeliveryIndication CRITICALITY ignore } retrieveUEInformation S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE RetrieveUEInformation PROCEDURE CODE id-RetrieveUEInformation CRITICALITY reject } uEInformationTransfer S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE UEInformationTransfer PROCEDURE CODE id-UEInformationTransfer CRITICALITY reject } eNBCPRelocationIndication S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE ENBCPRelocationIndication PROCEDURE CODE id-eNBCPRelocationIndication CRITICALITY reject } mMECPRelocationIndication S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE MMECPRelocationIndication PROCEDURE CODE id-MMECPRelocationIndication CRITICALITY reject } END -- ************************************************************** -- -- PDU definitions for S1AP. -- -- ************************************************************** S1AP-PDU-Contents { itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-PDU-Contents (1) } DEFINITIONS AUTOMATIC TAGS ::= BEGIN -- ************************************************************** -- -- IE parameter types from other modules. -- -- ************************************************************** IMPORTS UEAggregateMaximumBitrate, BearerType, Cause, CellAccessMode, Cdma2000HORequiredIndication, Cdma2000HOStatus, Cdma2000OneXSRVCCInfo, Cdma2000OneXRAND, Cdma2000PDU, Cdma2000RATType, Cdma2000SectorID, EUTRANRoundTripDelayEstimationInfo, CNDomain, ConcurrentWarningMessageIndicator, CriticalityDiagnostics, CSFallbackIndicator, CSG-Id, CSG-IdList, CSGMembershipStatus, Data-Forwarding-Not-Possible, Direct-Forwarding-Path-Availability, Global-ENB-ID, EUTRAN-CGI, ENBname, ENB-StatusTransfer-TransparentContainer, ENB-UE-S1AP-ID, ExtendedRepetitionPeriod, GTP-TEID, GUMMEI, GUMMEIType, HandoverRestrictionList, HandoverType, Masked-IMEISV, LAI, LPPa-PDU, ManagementBasedMDTAllowed, MDTPLMNList, MMEname, MMERelaySupportIndicator, MME-UE-S1AP-ID, MSClassmark2, MSClassmark3, NAS-PDU, NASSecurityParametersfromE-UTRAN, NASSecurityParameterstoE-UTRAN, OverloadResponse, PagingDRX, PagingPriority, PLMNidentity, ProSeAuthorized, RIMTransfer, RelativeMMECapacity, RequestType, E-RAB-ID, E-RABLevelQoSParameters, E-RABList, RelayNode-Indicator, Routing-ID, SecurityKey, SecurityContext, ServedGUMMEIs, SONConfigurationTransfer, Source-ToTarget-TransparentContainer, SourceBSS-ToTargetBSS-TransparentContainer, SourceeNB-ToTargeteNB-TransparentContainer, SourceRNC-ToTargetRNC-TransparentContainer, SubscriberProfileIDforRFP, SRVCCOperationNotPossible, SRVCCOperationPossible, SRVCCHOIndication, SupportedTAs, TAI, Target-ToSource-TransparentContainer, TargetBSS-ToSourceBSS-TransparentContainer, TargeteNB-ToSourceeNB-TransparentContainer, TargetID, TargetRNC-ToSourceRNC-TransparentContainer, TimeToWait, TraceActivation, TrafficLoadReductionIndication, E-UTRAN-Trace-ID, TransportLayerAddress, UEIdentityIndexValue, UEPagingID, UERadioCapability, UERadioCapabilityForPaging, UE-RetentionInformation, UE-S1AP-IDs, UE-associatedLogicalS1-ConnectionItem, UESecurityCapabilities, S-TMSI, MessageIdentifier, SerialNumber, WarningAreaList, RepetitionPeriod, NumberofBroadcastRequest, WarningType, WarningSecurityInfo, DataCodingScheme, WarningMessageContents, BroadcastCompletedAreaList, RRC-Establishment-Cause, BroadcastCancelledAreaList, PS-ServiceNotAvailable, GUMMEIList, Correlation-ID, GWContextReleaseIndication, PrivacyIndicator, VoiceSupportMatchIndicator, TunnelInformation, KillAllWarningMessages, TransportInformation, LHN-ID, UserLocationInformation, AdditionalCSFallbackIndicator, ECGIListForRestart, TAIListForRestart, EmergencyAreaIDListForRestart, ExpectedUEBehaviour, Paging-eDRXInformation, Extended-UEIdentityIndexValue, MME-Group-ID, Additional-GUTI, PWSfailedECGIList, CellIdentifierAndCELevelForCECapableUEs, AssistanceDataForPaging, InformationOnRecommendedCellsAndENBsForPaging, UE-Usage-Type, UEUserPlaneCIoTSupportIndicator, NB-IoT-DefaultPagingDRX, NB-IoT-Paging-eDRXInformation, CE-mode-B-SupportIndicator, NB-IoT-UEIdentityIndexValue, V2XServicesAuthorized, DCN-ID, ServedDCNs, UESidelinkAggregateMaximumBitrate, DLNASPDUDeliveryAckRequest, Coverage-Level, EnhancedCoverageRestricted, DL-CP-SecurityInformation, UL-CP-SecurityInformation FROM S1AP-IEs PrivateIE-Container{}, ProtocolExtensionContainer{}, ProtocolIE-Container{}, ProtocolIE-ContainerList{}, ProtocolIE-ContainerPair{}, ProtocolIE-ContainerPairList{}, ProtocolIE-SingleContainer{}, S1AP-PRIVATE-IES, S1AP-PROTOCOL-EXTENSION, S1AP-PROTOCOL-IES, S1AP-PROTOCOL-IES-PAIR FROM S1AP-Containers id-AssistanceDataForPaging, id-uEaggregateMaximumBitrate, id-BearerType, id-Cause, id-CellAccessMode, id-CellIdentifierAndCELevelForCECapableUEs, id-cdma2000HORequiredIndication, id-cdma2000HOStatus, id-cdma2000OneXSRVCCInfo, id-cdma2000OneXRAND, id-cdma2000PDU, id-cdma2000RATType, id-cdma2000SectorID, id-EUTRANRoundTripDelayEstimationInfo, id-CNDomain, id-ConcurrentWarningMessageIndicator, id-CriticalityDiagnostics, id-CSFallbackIndicator, id-CSG-Id, id-CSG-IdList, id-CSGMembershipStatus, id-Data-Forwarding-Not-Possible, 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-GUMMEIType, id-HandoverRestrictionList, id-HandoverType, id-Masked-IMEISV, id-InformationOnRecommendedCellsAndENBsForPaging, id-InitialContextSetup, id-Inter-SystemInformationTransferTypeEDT, id-Inter-SystemInformationTransferTypeMDT, id-LPPa-PDU, id-NAS-DownlinkCount, id-ManagementBasedMDTAllowed, id-ManagementBasedMDTPLMNList, 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-PagingPriority, id-RelativeMMECapacity, id-RequestType, id-Routing-ID, 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-RABFailedToResumeListResumeReq, id-E-RABFailedToResumeItemResumeReq, id-E-RABFailedToResumeListResumeRes, id-E-RABFailedToResumeItemResumeRes, 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-RABToBeModifiedListBearerModInd, id-E-RABToBeModifiedItemBearerModInd, id-E-RABNotToBeModifiedListBearerModInd, id-E-RABNotToBeModifiedItemBearerModInd, id-E-RABModifyListBearerModConf, id-E-RABModifyItemBearerModConf, id-E-RABFailedToModifyListBearerModConf, id-E-RABToBeReleasedListBearerModConf, 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-ProSeAuthorized, 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-SRVCCOperationNotPossible, 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-TrafficLoadReductionIndication, id-E-UTRAN-Trace-ID, id-UEIdentityIndexValue, id-UEPagingID, id-UERadioCapability, id-UERadioCapabilityForPaging, id-UTRANtoLTEHOInformationRes, id-UE-associatedLogicalS1-ConnectionListResAck, id-UE-associatedLogicalS1-ConnectionItem, id-UE-RetentionInformation, id-UESecurityCapabilities, id-UE-S1AP-IDs, id-V2XServicesAuthorized, id-ResetType, id-MessageIdentifier, id-SerialNumber, id-WarningAreaList, id-RepetitionPeriod, id-NumberofBroadcastRequest, id-WarningType, id-WarningSecurityInfo, id-DataCodingScheme, id-WarningMessageContents, id-BroadcastCompletedAreaList, id-BroadcastCancelledAreaList, id-RRC-Establishment-Cause, id-TraceCollectionEntityIPAddress, maxnoofTAIs, maxnoofErrors, maxnoofE-RABs, maxnoofIndividualS1ConnectionsToReset, maxnoofEmergencyAreaID, maxnoofCellID, maxnoofTAIforWarning, maxnoofCellinTAI, maxnoofCellinEAI, id-ExtendedRepetitionPeriod, id-PS-ServiceNotAvailable, id-RegisteredLAI, id-GUMMEIList, id-SourceMME-GUMMEI, id-MME-UE-S1AP-ID-2, id-GW-TransportLayerAddress, id-RelayNode-Indicator, id-Correlation-ID, id-MMERelaySupportIndicator, id-GWContextReleaseIndication, id-PrivacyIndicator, id-VoiceSupportMatchIndicator, id-Tunnel-Information-for-BBF, id-SIPTO-Correlation-ID, id-SIPTO-L-GW-TransportLayerAddress, id-KillAllWarningMessages, id-TransportInformation, id-LHN-ID, id-UserLocationInformation, id-AdditionalCSFallbackIndicator, id-ECGIListForRestart, id-TAIListForRestart, id-EmergencyAreaIDListForRestart, id-ExpectedUEBehaviour, id-Paging-eDRXInformation, id-extended-UEIdentityIndexValue, id-CSGMembershipInfo, id-MME-Group-ID, id-Additional-GUTI, id-S1-Message, id-PWSfailedECGIList, id-PWSFailureIndication, id-UE-Usage-Type, id-UEUserPlaneCIoTSupportIndicator, id-NB-IoT-DefaultPagingDRX, id-NB-IoT-Paging-eDRXInformation, id-CE-mode-B-SupportIndicator, id-NB-IoT-UEIdentityIndexValue, id-RRC-Resume-Cause, id-DCN-ID, id-ServedDCNs, id-UESidelinkAggregateMaximumBitrate, id-DLNASPDUDeliveryAckRequest, id-Coverage-Level, id-EnhancedCoverageRestricted, id-UE-Level-QoS-Parameters, id-DL-CP-SecurityInformation, id-UL-CP-SecurityInformation FROM S1AP-Constants; -- ************************************************************** -- -- Common Container Lists -- -- ************************************************************** E-RAB-IE-ContainerList { S1AP-PROTOCOL-IES : IEsSetParam } ::= ProtocolIE-ContainerList { 1, maxnoofE-RABs, {IEsSetParam} } E-RAB-IE-ContainerPairList { S1AP-PROTOCOL-IES-PAIR : IEsSetParam } ::= ProtocolIE-ContainerPairList { 1, maxnoofE-RABs, {IEsSetParam} } ProtocolError-IE-ContainerList { S1AP-PROTOCOL-IES : IEsSetParam } ::= ProtocolIE-ContainerList { 1, maxnoofE-RABs, {IEsSetParam} } -- ************************************************************** -- -- HANDOVER PREPARATION ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Handover Required -- -- ************************************************************** HandoverRequired ::= SEQUENCE { protocolIEs ProtocolIE-Container { { HandoverRequiredIEs} }, ... } HandoverRequiredIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-HandoverType CRITICALITY reject TYPE HandoverType PRESENCE mandatory}| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| { ID id-TargetID CRITICALITY reject TYPE TargetID PRESENCE mandatory}| { ID id-Direct-Forwarding-Path-Availability CRITICALITY ignore TYPE Direct-Forwarding-Path-Availability PRESENCE optional}| { ID id-SRVCCHOIndication CRITICALITY reject TYPE SRVCCHOIndication PRESENCE optional}| { ID id-Source-ToTarget-TransparentContainer CRITICALITY reject TYPE Source-ToTarget-TransparentContainer PRESENCE mandatory}| { ID id-Source-ToTarget-TransparentContainer-Secondary CRITICALITY reject TYPE Source-ToTarget-TransparentContainer PRESENCE optional}| { ID id-MSClassmark2 CRITICALITY reject TYPE MSClassmark2 PRESENCE conditional}| { ID id-MSClassmark3 CRITICALITY ignore TYPE MSClassmark3 PRESENCE conditional}| { ID id-CSG-Id CRITICALITY reject TYPE CSG-Id PRESENCE optional}| { ID id-CellAccessMode CRITICALITY reject TYPE CellAccessMode PRESENCE optional}| { ID id-PS-ServiceNotAvailable CRITICALITY ignore TYPE PS-ServiceNotAvailable PRESENCE optional}, ... } -- ************************************************************** -- -- Handover Command -- -- ************************************************************** HandoverCommand ::= SEQUENCE { protocolIEs ProtocolIE-Container { { HandoverCommandIEs} }, ... } HandoverCommandIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-HandoverType CRITICALITY reject TYPE HandoverType PRESENCE mandatory}| { ID id-NASSecurityParametersfromE-UTRAN CRITICALITY reject TYPE NASSecurityParametersfromE-UTRAN PRESENCE conditional -- This IE shall be present if HandoverType IE is set to value "LTEtoUTRAN" or "LTEtoGERAN" --}| { ID id-E-RABSubjecttoDataForwardingList CRITICALITY ignore TYPE E-RABSubjecttoDataForwardingList PRESENCE optional}| { ID id-E-RABtoReleaseListHOCmd CRITICALITY ignore TYPE E-RABList PRESENCE optional}| { ID id-Target-ToSource-TransparentContainer CRITICALITY reject TYPE Target-ToSource-TransparentContainer PRESENCE mandatory}| { ID id-Target-ToSource-TransparentContainer-Secondary CRITICALITY reject TYPE Target-ToSource-TransparentContainer PRESENCE optional}| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, ... } E-RABSubjecttoDataForwardingList ::= E-RAB-IE-ContainerList { {E-RABDataForwardingItemIEs} } E-RABDataForwardingItemIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABDataForwardingItem CRITICALITY ignore TYPE E-RABDataForwardingItem PRESENCE mandatory }, ... } E-RABDataForwardingItem ::= SEQUENCE { e-RAB-ID E-RAB-ID, dL-transportLayerAddress TransportLayerAddress OPTIONAL, dL-gTP-TEID GTP-TEID OPTIONAL, uL-TransportLayerAddress TransportLayerAddress OPTIONAL, uL-GTP-TEID GTP-TEID OPTIONAL, iE-Extensions ProtocolExtensionContainer { { E-RABDataForwardingItem-ExtIEs} } OPTIONAL, ... } E-RABDataForwardingItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- Handover Preparation Failure -- -- ************************************************************** HandoverPreparationFailure ::= SEQUENCE { protocolIEs ProtocolIE-Container { { HandoverPreparationFailureIEs} }, ... } HandoverPreparationFailureIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- HANDOVER RESOURCE ALLOCATION ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Handover Request -- -- ************************************************************** HandoverRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { {HandoverRequestIEs} }, ... } HandoverRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-HandoverType CRITICALITY reject TYPE HandoverType PRESENCE mandatory}| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| { ID id-uEaggregateMaximumBitrate CRITICALITY reject TYPE UEAggregateMaximumBitrate PRESENCE mandatory}| { ID id-E-RABToBeSetupListHOReq CRITICALITY reject TYPE E-RABToBeSetupListHOReq PRESENCE mandatory}| { ID id-Source-ToTarget-TransparentContainer CRITICALITY reject TYPE Source-ToTarget-TransparentContainer PRESENCE mandatory}| { ID id-UESecurityCapabilities CRITICALITY reject TYPE UESecurityCapabilities PRESENCE mandatory}| { ID id-HandoverRestrictionList CRITICALITY ignore TYPE HandoverRestrictionList PRESENCE optional}| { ID id-TraceActivation CRITICALITY ignore TYPE TraceActivation PRESENCE optional}| { ID id-RequestType CRITICALITY ignore TYPE RequestType PRESENCE optional}| { ID id-SRVCCOperationPossible CRITICALITY ignore TYPE SRVCCOperationPossible PRESENCE optional}| { ID id-SecurityContext CRITICALITY reject TYPE SecurityContext PRESENCE mandatory}| { ID id-NASSecurityParameterstoE-UTRAN CRITICALITY reject TYPE NASSecurityParameterstoE-UTRAN PRESENCE conditional -- This IE shall be present if the Handover Type IE is set to the value "UTRANtoLTE" or "GERANtoLTE" -- }| { ID id-CSG-Id CRITICALITY reject TYPE CSG-Id PRESENCE optional}| { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| { ID id-GUMMEI-ID CRITICALITY ignore TYPE GUMMEI PRESENCE optional}| { ID id-MME-UE-S1AP-ID-2 CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE optional}| { ID id-ManagementBasedMDTAllowed CRITICALITY ignore TYPE ManagementBasedMDTAllowed PRESENCE optional}| { ID id-ManagementBasedMDTPLMNList CRITICALITY ignore TYPE MDTPLMNList PRESENCE optional}| { ID id-Masked-IMEISV CRITICALITY ignore TYPE Masked-IMEISV PRESENCE optional}| { ID id-ExpectedUEBehaviour CRITICALITY ignore TYPE ExpectedUEBehaviour PRESENCE optional}| { ID id-ProSeAuthorized CRITICALITY ignore TYPE ProSeAuthorized PRESENCE optional}| { ID id-UEUserPlaneCIoTSupportIndicator CRITICALITY ignore TYPE UEUserPlaneCIoTSupportIndicator PRESENCE optional}| { ID id-V2XServicesAuthorized CRITICALITY ignore TYPE V2XServicesAuthorized PRESENCE optional}| { ID id-UESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE UESidelinkAggregateMaximumBitrate PRESENCE optional}| { ID id-EnhancedCoverageRestricted CRITICALITY ignore TYPE EnhancedCoverageRestricted PRESENCE optional}, ... } E-RABToBeSetupListHOReq ::= E-RAB-IE-ContainerList { {E-RABToBeSetupItemHOReqIEs} } E-RABToBeSetupItemHOReqIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABToBeSetupItemHOReq CRITICALITY reject TYPE E-RABToBeSetupItemHOReq PRESENCE mandatory }, ... } E-RABToBeSetupItemHOReq ::= SEQUENCE { e-RAB-ID E-RAB-ID, transportLayerAddress TransportLayerAddress, gTP-TEID GTP-TEID, e-RABlevelQosParameters E-RABLevelQoSParameters, iE-Extensions ProtocolExtensionContainer { {E-RABToBeSetupItemHOReq-ExtIEs} } OPTIONAL, ... } E-RABToBeSetupItemHOReq-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { { ID id-Data-Forwarding-Not-Possible CRITICALITY ignore EXTENSION Data-Forwarding-Not-Possible PRESENCE optional}| { ID id-BearerType CRITICALITY reject EXTENSION BearerType PRESENCE optional}, ... } -- ************************************************************** -- -- Handover Request Acknowledge -- -- ************************************************************** HandoverRequestAcknowledge ::= SEQUENCE { protocolIEs ProtocolIE-Container { {HandoverRequestAcknowledgeIEs} }, ... } HandoverRequestAcknowledgeIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-E-RABAdmittedList CRITICALITY ignore TYPE E-RABAdmittedList PRESENCE mandatory}| { ID id-E-RABFailedToSetupListHOReqAck CRITICALITY ignore TYPE E-RABFailedtoSetupListHOReqAck PRESENCE optional}| { ID id-Target-ToSource-TransparentContainer CRITICALITY reject TYPE Target-ToSource-TransparentContainer PRESENCE mandatory}| { ID id-CSG-Id CRITICALITY ignore TYPE CSG-Id PRESENCE optional}| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| { ID id-CellAccessMode CRITICALITY ignore TYPE CellAccessMode PRESENCE optional}| { ID id-CE-mode-B-SupportIndicator CRITICALITY ignore TYPE CE-mode-B-SupportIndicator PRESENCE optional}, ... } E-RABAdmittedList ::= E-RAB-IE-ContainerList { {E-RABAdmittedItemIEs} } E-RABAdmittedItemIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABAdmittedItem CRITICALITY ignore TYPE E-RABAdmittedItem PRESENCE mandatory }, ... } E-RABAdmittedItem ::= SEQUENCE { e-RAB-ID E-RAB-ID, transportLayerAddress TransportLayerAddress, gTP-TEID GTP-TEID, dL-transportLayerAddress TransportLayerAddress OPTIONAL, dL-gTP-TEID GTP-TEID OPTIONAL, uL-TransportLayerAddress TransportLayerAddress OPTIONAL, uL-GTP-TEID GTP-TEID OPTIONAL, iE-Extensions ProtocolExtensionContainer { {E-RABAdmittedItem-ExtIEs} } OPTIONAL, ... } E-RABAdmittedItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } E-RABFailedtoSetupListHOReqAck ::= E-RAB-IE-ContainerList { {E-RABFailedtoSetupItemHOReqAckIEs} } E-RABFailedtoSetupItemHOReqAckIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABFailedtoSetupItemHOReqAck CRITICALITY ignore TYPE E-RABFailedToSetupItemHOReqAck PRESENCE mandatory }, ... } E-RABFailedToSetupItemHOReqAck ::= SEQUENCE { e-RAB-ID E-RAB-ID, cause Cause, iE-Extensions ProtocolExtensionContainer { { E-RABFailedToSetupItemHOReqAckExtIEs} } OPTIONAL, ... } E-RABFailedToSetupItemHOReqAckExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- Handover Failure -- -- ************************************************************** HandoverFailure ::= SEQUENCE { protocolIEs ProtocolIE-Container { { HandoverFailureIEs} }, ... } HandoverFailureIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- HANDOVER NOTIFICATION ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Handover Notify -- -- ************************************************************** HandoverNotify ::= SEQUENCE { protocolIEs ProtocolIE-Container { { HandoverNotifyIEs} }, ... } HandoverNotifyIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory}| { ID id-TAI CRITICALITY ignore TYPE TAI PRESENCE mandatory}| -- Extension for Release 11 to support BBAI -- { ID id-Tunnel-Information-for-BBF CRITICALITY ignore TYPE TunnelInformation PRESENCE optional}| { ID id-LHN-ID CRITICALITY ignore TYPE LHN-ID PRESENCE optional}, ... } -- ************************************************************** -- -- PATH SWITCH REQUEST ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Path Switch Request -- -- ************************************************************** PathSwitchRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { { PathSwitchRequestIEs} }, ... } PathSwitchRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-E-RABToBeSwitchedDLList CRITICALITY reject TYPE E-RABToBeSwitchedDLList PRESENCE mandatory}| { ID id-SourceMME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory}| { ID id-TAI CRITICALITY ignore TYPE TAI PRESENCE mandatory}| { ID id-UESecurityCapabilities CRITICALITY ignore TYPE UESecurityCapabilities PRESENCE mandatory}| { ID id-CSG-Id CRITICALITY ignore TYPE CSG-Id PRESENCE optional}| { ID id-CellAccessMode CRITICALITY ignore TYPE CellAccessMode PRESENCE optional}| { ID id-SourceMME-GUMMEI CRITICALITY ignore TYPE GUMMEI PRESENCE optional}| { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| -- Extension for Release 11 to support BBAI -- { ID id-Tunnel-Information-for-BBF CRITICALITY ignore TYPE TunnelInformation PRESENCE optional}| { ID id-LHN-ID CRITICALITY ignore TYPE LHN-ID PRESENCE optional}| { ID id-RRC-Resume-Cause CRITICALITY ignore TYPE RRC-Establishment-Cause PRESENCE optional }, ... } E-RABToBeSwitchedDLList ::= E-RAB-IE-ContainerList { {E-RABToBeSwitchedDLItemIEs} } E-RABToBeSwitchedDLItemIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABToBeSwitchedDLItem CRITICALITY reject TYPE E-RABToBeSwitchedDLItem PRESENCE mandatory }, ... } E-RABToBeSwitchedDLItem ::= SEQUENCE { e-RAB-ID E-RAB-ID, transportLayerAddress TransportLayerAddress, gTP-TEID GTP-TEID, iE-Extensions ProtocolExtensionContainer { { E-RABToBeSwitchedDLItem-ExtIEs} } OPTIONAL, ... } E-RABToBeSwitchedDLItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- Path Switch Request Acknowledge -- -- ************************************************************** PathSwitchRequestAcknowledge ::= SEQUENCE { protocolIEs ProtocolIE-Container { { PathSwitchRequestAcknowledgeIEs} }, ... } PathSwitchRequestAcknowledgeIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-uEaggregateMaximumBitrate CRITICALITY ignore TYPE UEAggregateMaximumBitrate PRESENCE optional}| { ID id-E-RABToBeSwitchedULList CRITICALITY ignore TYPE E-RABToBeSwitchedULList PRESENCE optional}| { ID id-E-RABToBeReleasedList CRITICALITY ignore TYPE E-RABList PRESENCE optional}| { ID id-SecurityContext CRITICALITY reject TYPE SecurityContext PRESENCE mandatory}| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| { ID id-MME-UE-S1AP-ID-2 CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE optional}| { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| { ID id-ProSeAuthorized CRITICALITY ignore TYPE ProSeAuthorized PRESENCE optional}| { ID id-UEUserPlaneCIoTSupportIndicator CRITICALITY ignore TYPE UEUserPlaneCIoTSupportIndicator PRESENCE optional}| { ID id-V2XServicesAuthorized CRITICALITY ignore TYPE V2XServicesAuthorized PRESENCE optional}| { ID id-UESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE UESidelinkAggregateMaximumBitrate PRESENCE optional}| { ID id-EnhancedCoverageRestricted CRITICALITY ignore TYPE EnhancedCoverageRestricted PRESENCE optional}, ... } E-RABToBeSwitchedULList ::= E-RAB-IE-ContainerList { {E-RABToBeSwitchedULItemIEs} } E-RABToBeSwitchedULItemIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABToBeSwitchedULItem CRITICALITY ignore TYPE E-RABToBeSwitchedULItem PRESENCE mandatory }, ... } E-RABToBeSwitchedULItem ::= SEQUENCE { e-RAB-ID E-RAB-ID, transportLayerAddress TransportLayerAddress, gTP-TEID GTP-TEID, iE-Extensions ProtocolExtensionContainer { { E-RABToBeSwitchedULItem-ExtIEs} } OPTIONAL, ... } E-RABToBeSwitchedULItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- Path Switch Request Failure -- -- ************************************************************** PathSwitchRequestFailure ::= SEQUENCE { protocolIEs ProtocolIE-Container { { PathSwitchRequestFailureIEs} }, ... } PathSwitchRequestFailureIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- HANDOVER CANCEL ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Handover Cancel -- -- ************************************************************** HandoverCancel ::= SEQUENCE { protocolIEs ProtocolIE-Container { { HandoverCancelIEs} }, ... } HandoverCancelIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, ... } -- ************************************************************** -- -- Handover Cancel Request Acknowledge -- -- ************************************************************** HandoverCancelAcknowledge ::= SEQUENCE { protocolIEs ProtocolIE-Container { { HandoverCancelAcknowledgeIEs} }, ... } HandoverCancelAcknowledgeIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- E-RAB SETUP ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- E-RAB Setup Request -- -- ************************************************************** E-RABSetupRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { {E-RABSetupRequestIEs} }, ... } E-RABSetupRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-uEaggregateMaximumBitrate CRITICALITY reject TYPE UEAggregateMaximumBitrate PRESENCE optional }| { ID id-E-RABToBeSetupListBearerSUReq CRITICALITY reject TYPE E-RABToBeSetupListBearerSUReq PRESENCE mandatory }, ... } E-RABToBeSetupListBearerSUReq ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABToBeSetupItemBearerSUReqIEs} } E-RABToBeSetupItemBearerSUReqIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABToBeSetupItemBearerSUReq CRITICALITY reject TYPE E-RABToBeSetupItemBearerSUReq PRESENCE mandatory }, ... } E-RABToBeSetupItemBearerSUReq ::= SEQUENCE { e-RAB-ID E-RAB-ID, e-RABlevelQoSParameters E-RABLevelQoSParameters, transportLayerAddress TransportLayerAddress, gTP-TEID GTP-TEID, nAS-PDU NAS-PDU, iE-Extensions ProtocolExtensionContainer { {E-RABToBeSetupItemBearerSUReqExtIEs} } OPTIONAL, ... } E-RABToBeSetupItemBearerSUReqExtIEs S1AP-PROTOCOL-EXTENSION ::= { { ID id-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}| { ID id-SIPTO-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}| { ID id-BearerType CRITICALITY reject EXTENSION BearerType PRESENCE optional}, ... } -- ************************************************************** -- -- E-RAB Setup Response -- -- ************************************************************** E-RABSetupResponse ::= SEQUENCE { protocolIEs ProtocolIE-Container { {E-RABSetupResponseIEs} }, ... } E-RABSetupResponseIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-E-RABSetupListBearerSURes CRITICALITY ignore TYPE E-RABSetupListBearerSURes PRESENCE optional }| { ID id-E-RABFailedToSetupListBearerSURes CRITICALITY ignore TYPE E-RABList PRESENCE optional }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } E-RABSetupListBearerSURes ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABSetupItemBearerSUResIEs} } E-RABSetupItemBearerSUResIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABSetupItemBearerSURes CRITICALITY ignore TYPE E-RABSetupItemBearerSURes PRESENCE mandatory }, ... } E-RABSetupItemBearerSURes ::= SEQUENCE { e-RAB-ID E-RAB-ID, transportLayerAddress TransportLayerAddress, gTP-TEID GTP-TEID, iE-Extensions ProtocolExtensionContainer { {E-RABSetupItemBearerSUResExtIEs} } OPTIONAL, ... } E-RABSetupItemBearerSUResExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- E-RAB MODIFY ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- E-RAB Modify Request -- -- ************************************************************** E-RABModifyRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { {E-RABModifyRequestIEs} }, ... } E-RABModifyRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-uEaggregateMaximumBitrate CRITICALITY reject TYPE UEAggregateMaximumBitrate PRESENCE optional }| { ID id-E-RABToBeModifiedListBearerModReq CRITICALITY reject TYPE E-RABToBeModifiedListBearerModReq PRESENCE mandatory }, ... } E-RABToBeModifiedListBearerModReq ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABToBeModifiedItemBearerModReqIEs} } E-RABToBeModifiedItemBearerModReqIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABToBeModifiedItemBearerModReq CRITICALITY reject TYPE E-RABToBeModifiedItemBearerModReq PRESENCE mandatory }, ... } E-RABToBeModifiedItemBearerModReq ::= SEQUENCE { e-RAB-ID E-RAB-ID, e-RABLevelQoSParameters E-RABLevelQoSParameters, nAS-PDU NAS-PDU, iE-Extensions ProtocolExtensionContainer { {E-RABToBeModifyItemBearerModReqExtIEs} } OPTIONAL, ... } E-RABToBeModifyItemBearerModReqExtIEs S1AP-PROTOCOL-EXTENSION ::= { { ID id-TransportInformation CRITICALITY reject EXTENSION TransportInformation PRESENCE optional}, ... } -- ************************************************************** -- -- E-RAB Modify Response -- -- ************************************************************** E-RABModifyResponse ::= SEQUENCE { protocolIEs ProtocolIE-Container { {E-RABModifyResponseIEs} }, ... } E-RABModifyResponseIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-E-RABModifyListBearerModRes CRITICALITY ignore TYPE E-RABModifyListBearerModRes PRESENCE optional }| { ID id-E-RABFailedToModifyList CRITICALITY ignore TYPE E-RABList PRESENCE optional }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } E-RABModifyListBearerModRes ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABModifyItemBearerModResIEs} } E-RABModifyItemBearerModResIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABModifyItemBearerModRes CRITICALITY ignore TYPE E-RABModifyItemBearerModRes PRESENCE mandatory}, ... } E-RABModifyItemBearerModRes ::= SEQUENCE { e-RAB-ID E-RAB-ID, iE-Extensions ProtocolExtensionContainer { {E-RABModifyItemBearerModResExtIEs} } OPTIONAL, ... } E-RABModifyItemBearerModResExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- E-RAB RELEASE ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- E-RAB Release Command -- -- ************************************************************** E-RABReleaseCommand ::= SEQUENCE { protocolIEs ProtocolIE-Container { {E-RABReleaseCommandIEs} }, ... } E-RABReleaseCommandIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-uEaggregateMaximumBitrate CRITICALITY reject TYPE UEAggregateMaximumBitrate PRESENCE optional }| { ID id-E-RABToBeReleasedList CRITICALITY ignore TYPE E-RABList PRESENCE mandatory }| { ID id-NAS-PDU CRITICALITY ignore TYPE NAS-PDU PRESENCE optional }, ... } -- ************************************************************** -- -- E-RAB Release Response -- -- ************************************************************** E-RABReleaseResponse ::= SEQUENCE { protocolIEs ProtocolIE-Container { { E-RABReleaseResponseIEs } }, ... } E-RABReleaseResponseIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-E-RABReleaseListBearerRelComp CRITICALITY ignore TYPE E-RABReleaseListBearerRelComp PRESENCE optional }| { ID id-E-RABFailedToReleaseList CRITICALITY ignore TYPE E-RABList PRESENCE optional }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| -- Extension for Release 12 to support User Location Information -- { ID id-UserLocationInformation CRITICALITY ignore TYPE UserLocationInformation PRESENCE optional }, ... } E-RABReleaseListBearerRelComp ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABReleaseItemBearerRelCompIEs} } E-RABReleaseItemBearerRelCompIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABReleaseItemBearerRelComp CRITICALITY ignore TYPE E-RABReleaseItemBearerRelComp PRESENCE mandatory }, ... } E-RABReleaseItemBearerRelComp ::= SEQUENCE { e-RAB-ID E-RAB-ID, iE-Extensions ProtocolExtensionContainer { {E-RABReleaseItemBearerRelCompExtIEs} } OPTIONAL, ... } E-RABReleaseItemBearerRelCompExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- E-RAB RELEASE INDICATION ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- E-RAB Release Indication -- -- ************************************************************** E-RABReleaseIndication ::= SEQUENCE { protocolIEs ProtocolIE-Container { {E-RABReleaseIndicationIEs} }, ... } E-RABReleaseIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-E-RABReleasedList CRITICALITY ignore TYPE E-RABList PRESENCE mandatory }| -- Extension for Release 12 to support User Location Information -- { ID id-UserLocationInformation CRITICALITY ignore TYPE UserLocationInformation PRESENCE optional }, ... } -- ************************************************************** -- -- INITIAL CONTEXT SETUP ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Initial Context Setup Request -- -- ************************************************************** InitialContextSetupRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { {InitialContextSetupRequestIEs} }, ... } InitialContextSetupRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-uEaggregateMaximumBitrate CRITICALITY reject TYPE UEAggregateMaximumBitrate PRESENCE mandatory}| { ID id-E-RABToBeSetupListCtxtSUReq CRITICALITY reject TYPE E-RABToBeSetupListCtxtSUReq PRESENCE mandatory}| { ID id-UESecurityCapabilities CRITICALITY reject TYPE UESecurityCapabilities PRESENCE mandatory}| { ID id-SecurityKey CRITICALITY reject TYPE SecurityKey PRESENCE mandatory}| { ID id-TraceActivation CRITICALITY ignore TYPE TraceActivation PRESENCE optional}| { ID id-HandoverRestrictionList CRITICALITY ignore TYPE HandoverRestrictionList PRESENCE optional}| { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE optional}| { ID id-SubscriberProfileIDforRFP CRITICALITY ignore TYPE SubscriberProfileIDforRFP PRESENCE optional}| { ID id-CSFallbackIndicator CRITICALITY reject TYPE CSFallbackIndicator PRESENCE optional}| { ID id-SRVCCOperationPossible CRITICALITY ignore TYPE SRVCCOperationPossible PRESENCE optional}| { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| { ID id-RegisteredLAI CRITICALITY ignore TYPE LAI PRESENCE optional}| { ID id-GUMMEI-ID CRITICALITY ignore TYPE GUMMEI PRESENCE optional}| { ID id-MME-UE-S1AP-ID-2 CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE optional}| { ID id-ManagementBasedMDTAllowed CRITICALITY ignore TYPE ManagementBasedMDTAllowed PRESENCE optional}| { ID id-ManagementBasedMDTPLMNList CRITICALITY ignore TYPE MDTPLMNList PRESENCE optional}| { ID id-AdditionalCSFallbackIndicator CRITICALITY ignore TYPE AdditionalCSFallbackIndicator PRESENCE conditional}| { ID id-Masked-IMEISV CRITICALITY ignore TYPE Masked-IMEISV PRESENCE optional}| { ID id-ExpectedUEBehaviour CRITICALITY ignore TYPE ExpectedUEBehaviour PRESENCE optional}| { ID id-ProSeAuthorized CRITICALITY ignore TYPE ProSeAuthorized PRESENCE optional}| { ID id-UEUserPlaneCIoTSupportIndicator CRITICALITY ignore TYPE UEUserPlaneCIoTSupportIndicator PRESENCE optional}| { ID id-V2XServicesAuthorized CRITICALITY ignore TYPE V2XServicesAuthorized PRESENCE optional}| { ID id-UESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE UESidelinkAggregateMaximumBitrate PRESENCE optional}| { ID id-EnhancedCoverageRestricted CRITICALITY ignore TYPE EnhancedCoverageRestricted PRESENCE optional}, ... } E-RABToBeSetupListCtxtSUReq ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABToBeSetupItemCtxtSUReqIEs} } E-RABToBeSetupItemCtxtSUReqIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABToBeSetupItemCtxtSUReq CRITICALITY reject TYPE E-RABToBeSetupItemCtxtSUReq PRESENCE mandatory }, ... } E-RABToBeSetupItemCtxtSUReq ::= SEQUENCE { e-RAB-ID E-RAB-ID, e-RABlevelQoSParameters E-RABLevelQoSParameters, transportLayerAddress TransportLayerAddress, gTP-TEID GTP-TEID, nAS-PDU NAS-PDU OPTIONAL, iE-Extensions ProtocolExtensionContainer { {E-RABToBeSetupItemCtxtSUReqExtIEs} } OPTIONAL, ... } E-RABToBeSetupItemCtxtSUReqExtIEs S1AP-PROTOCOL-EXTENSION ::= { { ID id-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}| { ID id-SIPTO-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}| { ID id-BearerType CRITICALITY reject EXTENSION BearerType PRESENCE optional}, ... } -- ************************************************************** -- -- Initial Context Setup Response -- -- ************************************************************** InitialContextSetupResponse ::= SEQUENCE { protocolIEs ProtocolIE-Container { {InitialContextSetupResponseIEs} }, ... } InitialContextSetupResponseIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-E-RABSetupListCtxtSURes CRITICALITY ignore TYPE E-RABSetupListCtxtSURes PRESENCE mandatory }| { ID id-E-RABFailedToSetupListCtxtSURes CRITICALITY ignore TYPE E-RABList PRESENCE optional }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } E-RABSetupListCtxtSURes ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABSetupItemCtxtSUResIEs} } E-RABSetupItemCtxtSUResIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABSetupItemCtxtSURes CRITICALITY ignore TYPE E-RABSetupItemCtxtSURes PRESENCE mandatory }, ... } E-RABSetupItemCtxtSURes ::= SEQUENCE { e-RAB-ID E-RAB-ID, transportLayerAddress TransportLayerAddress, gTP-TEID GTP-TEID, iE-Extensions ProtocolExtensionContainer { {E-RABSetupItemCtxtSUResExtIEs} } OPTIONAL, ... } E-RABSetupItemCtxtSUResExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- Initial Context Setup Failure -- -- ************************************************************** InitialContextSetupFailure ::= SEQUENCE { protocolIEs ProtocolIE-Container { {InitialContextSetupFailureIEs} }, ... } InitialContextSetupFailureIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- PAGING ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Paging -- -- ************************************************************** Paging ::= SEQUENCE { protocolIEs ProtocolIE-Container {{PagingIEs}}, ... } PagingIEs S1AP-PROTOCOL-IES ::= { { ID id-UEIdentityIndexValue CRITICALITY ignore TYPE UEIdentityIndexValue PRESENCE mandatory}| { ID id-UEPagingID CRITICALITY ignore TYPE UEPagingID PRESENCE mandatory}| { ID id-pagingDRX CRITICALITY ignore TYPE PagingDRX PRESENCE optional}| { ID id-CNDomain CRITICALITY ignore TYPE CNDomain PRESENCE mandatory}| { ID id-TAIList CRITICALITY ignore TYPE TAIList PRESENCE mandatory}| { ID id-CSG-IdList CRITICALITY ignore TYPE CSG-IdList PRESENCE optional}| { ID id-PagingPriority CRITICALITY ignore TYPE PagingPriority PRESENCE optional}| { ID id-UERadioCapabilityForPaging CRITICALITY ignore TYPE UERadioCapabilityForPaging PRESENCE optional}| -- Extension for Release 13 to support Paging Optimisation and Coverage Enhancement paging -- { ID id-AssistanceDataForPaging CRITICALITY ignore TYPE AssistanceDataForPaging PRESENCE optional}| { ID id-Paging-eDRXInformation CRITICALITY ignore TYPE Paging-eDRXInformation PRESENCE optional}| { ID id-extended-UEIdentityIndexValue CRITICALITY ignore TYPE Extended-UEIdentityIndexValue PRESENCE optional}| { ID id-NB-IoT-Paging-eDRXInformation CRITICALITY ignore TYPE NB-IoT-Paging-eDRXInformation PRESENCE optional}| { ID id-NB-IoT-UEIdentityIndexValue CRITICALITY ignore TYPE NB-IoT-UEIdentityIndexValue PRESENCE optional}, ... } TAIList::= SEQUENCE (SIZE(1.. maxnoofTAIs)) OF ProtocolIE-SingleContainer {{TAIItemIEs}} TAIItemIEs S1AP-PROTOCOL-IES ::= { { ID id-TAIItem CRITICALITY ignore TYPE TAIItem PRESENCE mandatory }, ... } TAIItem ::= SEQUENCE { tAI TAI, iE-Extensions ProtocolExtensionContainer { {TAIItemExtIEs} } OPTIONAL, ... } TAIItemExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- UE CONTEXT RELEASE ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- UE Context Release Request -- -- ************************************************************** UEContextReleaseRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container {{UEContextReleaseRequest-IEs}}, ... } UEContextReleaseRequest-IEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| { ID id-GWContextReleaseIndication CRITICALITY reject TYPE GWContextReleaseIndication PRESENCE optional }, ... } -- ************************************************************** -- -- UE Context Release Command -- -- ************************************************************** UEContextReleaseCommand ::= SEQUENCE { protocolIEs ProtocolIE-Container {{UEContextReleaseCommand-IEs}}, ... } UEContextReleaseCommand-IEs S1AP-PROTOCOL-IES ::= { { ID id-UE-S1AP-IDs CRITICALITY reject TYPE UE-S1AP-IDs PRESENCE mandatory }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, ... } -- ************************************************************** -- -- UE Context Release Complete -- -- ************************************************************** UEContextReleaseComplete ::= SEQUENCE { protocolIEs ProtocolIE-Container {{UEContextReleaseComplete-IEs}}, ... } UEContextReleaseComplete-IEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| -- Extension for Release 12 to support User Location Information -- { ID id-UserLocationInformation CRITICALITY ignore TYPE UserLocationInformation PRESENCE optional}| -- Extension for Release 13 to support Paging Optimisation { ID id-InformationOnRecommendedCellsAndENBsForPaging CRITICALITY ignore TYPE InformationOnRecommendedCellsAndENBsForPaging PRESENCE optional}| -- Extension for Release 13 to support coverage enhancement paging - { ID id-CellIdentifierAndCELevelForCECapableUEs CRITICALITY ignore TYPE CellIdentifierAndCELevelForCECapableUEs PRESENCE optional}, ... } -- ************************************************************** -- -- UE CONTEXT MODIFICATION ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- UE Context Modification Request -- -- ************************************************************** UEContextModificationRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UEContextModificationRequestIEs} }, ... } UEContextModificationRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-SecurityKey CRITICALITY reject TYPE SecurityKey PRESENCE optional}| { ID id-SubscriberProfileIDforRFP CRITICALITY ignore TYPE SubscriberProfileIDforRFP PRESENCE optional}| { ID id-uEaggregateMaximumBitrate CRITICALITY ignore TYPE UEAggregateMaximumBitrate PRESENCE optional}| { ID id-CSFallbackIndicator CRITICALITY reject TYPE CSFallbackIndicator PRESENCE optional}| { ID id-UESecurityCapabilities CRITICALITY reject TYPE UESecurityCapabilities PRESENCE optional}| { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| { ID id-RegisteredLAI CRITICALITY ignore TYPE LAI PRESENCE optional}| { ID id-AdditionalCSFallbackIndicator CRITICALITY ignore TYPE AdditionalCSFallbackIndicator PRESENCE conditional}| { ID id-ProSeAuthorized CRITICALITY ignore TYPE ProSeAuthorized PRESENCE optional}| { ID id-SRVCCOperationPossible CRITICALITY ignore TYPE SRVCCOperationPossible PRESENCE optional}| { ID id-SRVCCOperationNotPossible CRITICALITY ignore TYPE SRVCCOperationNotPossible PRESENCE optional}| { ID id-V2XServicesAuthorized CRITICALITY ignore TYPE V2XServicesAuthorized PRESENCE optional}| { ID id-UESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE UESidelinkAggregateMaximumBitrate PRESENCE optional}, ... } -- ************************************************************** -- -- UE Context Modification Response -- -- ************************************************************** UEContextModificationResponse ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UEContextModificationResponseIEs} }, ... } UEContextModificationResponseIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- UE Context Modification Failure -- -- ************************************************************** UEContextModificationFailure ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UEContextModificationFailureIEs} }, ... } UEContextModificationFailureIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- UE RADIO CAPABILITY MATCH ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- UE Radio Capability Match Request -- -- ************************************************************** UERadioCapabilityMatchRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UERadioCapabilityMatchRequestIEs} }, ... } UERadioCapabilityMatchRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE optional }, ... } -- ************************************************************** -- -- UE Radio Capability Match Response -- -- ************************************************************** UERadioCapabilityMatchResponse ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UERadioCapabilityMatchResponseIEs} }, ... } UERadioCapabilityMatchResponseIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-VoiceSupportMatchIndicator CRITICALITY reject TYPE VoiceSupportMatchIndicator PRESENCE mandatory }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- NAS TRANSPORT ELEMENTARY PROCEDURES -- -- ************************************************************** -- ************************************************************** -- -- DOWNLINK NAS TRANSPORT -- -- ************************************************************** DownlinkNASTransport ::= SEQUENCE { protocolIEs ProtocolIE-Container {{DownlinkNASTransport-IEs}}, ... } DownlinkNASTransport-IEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-NAS-PDU CRITICALITY reject TYPE NAS-PDU PRESENCE mandatory}| { ID id-HandoverRestrictionList CRITICALITY ignore TYPE HandoverRestrictionList PRESENCE optional}| { ID id-SubscriberProfileIDforRFP CRITICALITY ignore TYPE SubscriberProfileIDforRFP PRESENCE optional}| { ID id-SRVCCOperationPossible CRITICALITY ignore TYPE SRVCCOperationPossible PRESENCE optional}| { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE optional}| { ID id-DLNASPDUDeliveryAckRequest CRITICALITY ignore TYPE DLNASPDUDeliveryAckRequest PRESENCE optional}| { ID id-EnhancedCoverageRestricted CRITICALITY ignore TYPE EnhancedCoverageRestricted PRESENCE optional}, ... } -- ************************************************************** -- -- INITIAL UE MESSAGE -- -- ************************************************************** InitialUEMessage ::= SEQUENCE { protocolIEs ProtocolIE-Container {{InitialUEMessage-IEs}}, ... } InitialUEMessage-IEs S1AP-PROTOCOL-IES ::= { { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-NAS-PDU CRITICALITY reject TYPE NAS-PDU PRESENCE mandatory}| { ID id-TAI CRITICALITY reject TYPE TAI PRESENCE mandatory}| { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory}| { ID id-RRC-Establishment-Cause CRITICALITY ignore TYPE RRC-Establishment-Cause PRESENCE mandatory}| { ID id-S-TMSI CRITICALITY reject TYPE S-TMSI PRESENCE optional}| { ID id-CSG-Id CRITICALITY reject TYPE CSG-Id PRESENCE optional}| { ID id-GUMMEI-ID CRITICALITY reject TYPE GUMMEI PRESENCE optional}| { ID id-CellAccessMode CRITICALITY reject TYPE CellAccessMode PRESENCE optional}| { ID id-GW-TransportLayerAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE optional}| { ID id-RelayNode-Indicator CRITICALITY reject TYPE RelayNode-Indicator PRESENCE optional}| { ID id-GUMMEIType CRITICALITY ignore TYPE GUMMEIType PRESENCE optional}| -- Extension for Release 11 to support BBAI -- { ID id-Tunnel-Information-for-BBF CRITICALITY ignore TYPE TunnelInformation PRESENCE optional}| { ID id-SIPTO-L-GW-TransportLayerAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE optional}| { ID id-LHN-ID CRITICALITY ignore TYPE LHN-ID PRESENCE optional}| { ID id-MME-Group-ID CRITICALITY ignore TYPE MME-Group-ID PRESENCE optional}| { ID id-UE-Usage-Type CRITICALITY ignore TYPE UE-Usage-Type PRESENCE optional}| { ID id-CE-mode-B-SupportIndicator CRITICALITY ignore TYPE CE-mode-B-SupportIndicator PRESENCE optional}| { ID id-DCN-ID CRITICALITY ignore TYPE DCN-ID PRESENCE optional}| { ID id-Coverage-Level CRITICALITY ignore TYPE Coverage-Level PRESENCE optional}, ... } -- ************************************************************** -- -- UPLINK NAS TRANSPORT -- -- ************************************************************** UplinkNASTransport ::= SEQUENCE { protocolIEs ProtocolIE-Container {{UplinkNASTransport-IEs}}, ... } UplinkNASTransport-IEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-NAS-PDU CRITICALITY reject TYPE NAS-PDU PRESENCE mandatory}| { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory}| { ID id-TAI CRITICALITY ignore TYPE TAI PRESENCE mandatory}| { ID id-GW-TransportLayerAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE optional}| { ID id-SIPTO-L-GW-TransportLayerAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE optional}| { ID id-LHN-ID CRITICALITY ignore TYPE LHN-ID PRESENCE optional}, ... } -- ************************************************************** -- -- NAS NON DELIVERY INDICATION -- -- ************************************************************** NASNonDeliveryIndication ::= SEQUENCE { protocolIEs ProtocolIE-Container {{NASNonDeliveryIndication-IEs}}, ... } NASNonDeliveryIndication-IEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-NAS-PDU CRITICALITY ignore TYPE NAS-PDU PRESENCE mandatory }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, ... } -- ************************************************************** -- -- REROUTE NAS REQUEST -- -- ************************************************************** RerouteNASRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container {{RerouteNASRequest-IEs}}, ... } RerouteNASRequest-IEs S1AP-PROTOCOL-IES ::= { { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE optional}| { ID id-S1-Message CRITICALITY reject TYPE OCTET STRING PRESENCE mandatory}| { ID id-MME-Group-ID CRITICALITY reject TYPE MME-Group-ID PRESENCE mandatory}| { ID id-Additional-GUTI CRITICALITY ignore TYPE Additional-GUTI PRESENCE optional}| { ID id-UE-Usage-Type CRITICALITY ignore TYPE UE-Usage-Type PRESENCE optional}, ... } -- ************************************************************** -- -- NAS DELIVERY INDICATION -- -- ************************************************************** NASDeliveryIndication ::= SEQUENCE { protocolIEs ProtocolIE-Container { { NASDeliveryIndicationIEs} }, ... } NASDeliveryIndicationIEs S1AP-PROTOCOL-IES ::= { ... } -- ************************************************************** -- -- RESET ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Reset -- -- ************************************************************** Reset ::= SEQUENCE { protocolIEs ProtocolIE-Container { {ResetIEs} }, ... } ResetIEs S1AP-PROTOCOL-IES ::= { { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| { ID id-ResetType CRITICALITY reject TYPE ResetType PRESENCE mandatory }, ... } ResetType ::= CHOICE { s1-Interface ResetAll, partOfS1-Interface UE-associatedLogicalS1-ConnectionListRes, ... } ResetAll ::= ENUMERATED { reset-all, ... } UE-associatedLogicalS1-ConnectionListRes ::= SEQUENCE (SIZE(1.. maxnoofIndividualS1ConnectionsToReset)) OF ProtocolIE-SingleContainer { { UE-associatedLogicalS1-ConnectionItemRes } } UE-associatedLogicalS1-ConnectionItemRes S1AP-PROTOCOL-IES ::= { { ID id-UE-associatedLogicalS1-ConnectionItem CRITICALITY reject TYPE UE-associatedLogicalS1-ConnectionItem PRESENCE mandatory}, ... } -- ************************************************************** -- -- Reset Acknowledge -- -- ************************************************************** ResetAcknowledge ::= SEQUENCE { protocolIEs ProtocolIE-Container { {ResetAcknowledgeIEs} }, ... } ResetAcknowledgeIEs S1AP-PROTOCOL-IES ::= { { ID id-UE-associatedLogicalS1-ConnectionListResAck CRITICALITY ignore TYPE UE-associatedLogicalS1-ConnectionListResAck PRESENCE optional }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } UE-associatedLogicalS1-ConnectionListResAck ::= SEQUENCE (SIZE(1.. maxnoofIndividualS1ConnectionsToReset)) OF ProtocolIE-SingleContainer { { UE-associatedLogicalS1-ConnectionItemResAck } } UE-associatedLogicalS1-ConnectionItemResAck S1AP-PROTOCOL-IES ::= { { ID id-UE-associatedLogicalS1-ConnectionItem CRITICALITY ignore TYPE UE-associatedLogicalS1-ConnectionItem PRESENCE mandatory }, ... } -- ************************************************************** -- -- ERROR INDICATION ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Error Indication -- -- ************************************************************** ErrorIndication ::= SEQUENCE { protocolIEs ProtocolIE-Container {{ErrorIndicationIEs}}, ... } ErrorIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE optional }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE optional }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE optional }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- S1 SETUP ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- S1 Setup Request -- -- ************************************************************** S1SetupRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { {S1SetupRequestIEs} }, ... } S1SetupRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-Global-ENB-ID CRITICALITY reject TYPE Global-ENB-ID PRESENCE mandatory}| { ID id-eNBname CRITICALITY ignore TYPE ENBname PRESENCE optional}| { ID id-SupportedTAs CRITICALITY reject TYPE SupportedTAs PRESENCE mandatory}| { ID id-DefaultPagingDRX CRITICALITY ignore TYPE PagingDRX PRESENCE mandatory}| { ID id-CSG-IdList CRITICALITY reject TYPE CSG-IdList PRESENCE optional}| { ID id-UE-RetentionInformation CRITICALITY ignore TYPE UE-RetentionInformation PRESENCE optional}| { ID id-NB-IoT-DefaultPagingDRX CRITICALITY ignore TYPE NB-IoT-DefaultPagingDRX PRESENCE optional}, ... } -- ************************************************************** -- -- S1 Setup Response -- -- ************************************************************** S1SetupResponse ::= SEQUENCE { protocolIEs ProtocolIE-Container { {S1SetupResponseIEs} }, ... } S1SetupResponseIEs S1AP-PROTOCOL-IES ::= { { ID id-MMEname CRITICALITY ignore TYPE MMEname PRESENCE optional}| { ID id-ServedGUMMEIs CRITICALITY reject TYPE ServedGUMMEIs PRESENCE mandatory}| { ID id-RelativeMMECapacity CRITICALITY ignore TYPE RelativeMMECapacity PRESENCE mandatory}| { ID id-MMERelaySupportIndicator CRITICALITY ignore TYPE MMERelaySupportIndicator PRESENCE optional}| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| { ID id-UE-RetentionInformation CRITICALITY ignore TYPE UE-RetentionInformation PRESENCE optional}| { ID id-ServedDCNs CRITICALITY ignore TYPE ServedDCNs PRESENCE optional}, ... } -- ************************************************************** -- -- S1 Setup Failure -- -- ************************************************************** S1SetupFailure ::= SEQUENCE { protocolIEs ProtocolIE-Container { {S1SetupFailureIEs} }, ... } S1SetupFailureIEs S1AP-PROTOCOL-IES ::= { { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- ENB CONFIGURATION UPDATE ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- eNB Configuration Update -- -- ************************************************************** ENBConfigurationUpdate ::= SEQUENCE { protocolIEs ProtocolIE-Container { {ENBConfigurationUpdateIEs} }, ... } ENBConfigurationUpdateIEs S1AP-PROTOCOL-IES ::= { { ID id-eNBname CRITICALITY ignore TYPE ENBname PRESENCE optional}| { ID id-SupportedTAs CRITICALITY reject TYPE SupportedTAs PRESENCE optional}| { ID id-CSG-IdList CRITICALITY reject TYPE CSG-IdList PRESENCE optional}| { ID id-DefaultPagingDRX CRITICALITY ignore TYPE PagingDRX PRESENCE optional}| { ID id-NB-IoT-DefaultPagingDRX CRITICALITY ignore TYPE NB-IoT-DefaultPagingDRX PRESENCE optional}, ... } -- ************************************************************** -- -- eNB Configuration Update Acknowledge -- -- ************************************************************** ENBConfigurationUpdateAcknowledge ::= SEQUENCE { protocolIEs ProtocolIE-Container { {ENBConfigurationUpdateAcknowledgeIEs} }, ... } ENBConfigurationUpdateAcknowledgeIEs S1AP-PROTOCOL-IES ::= { { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- eNB Configuration Update Failure -- -- ************************************************************** ENBConfigurationUpdateFailure ::= SEQUENCE { protocolIEs ProtocolIE-Container { {ENBConfigurationUpdateFailureIEs} }, ... } ENBConfigurationUpdateFailureIEs S1AP-PROTOCOL-IES ::= { { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- MME CONFIGURATION UPDATE ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- MME Configuration Update -- -- ************************************************************** MMEConfigurationUpdate ::= SEQUENCE { protocolIEs ProtocolIE-Container { {MMEConfigurationUpdateIEs} }, ... } MMEConfigurationUpdateIEs S1AP-PROTOCOL-IES ::= { { ID id-MMEname CRITICALITY ignore TYPE MMEname PRESENCE optional }| { ID id-ServedGUMMEIs CRITICALITY reject TYPE ServedGUMMEIs PRESENCE optional }| { ID id-RelativeMMECapacity CRITICALITY reject TYPE RelativeMMECapacity PRESENCE optional }| { ID id-ServedDCNs CRITICALITY ignore TYPE ServedDCNs PRESENCE optional}, ... } -- ************************************************************** -- -- MME Configuration Update Acknowledge -- -- ************************************************************** MMEConfigurationUpdateAcknowledge ::= SEQUENCE { protocolIEs ProtocolIE-Container { {MMEConfigurationUpdateAcknowledgeIEs} }, ... } MMEConfigurationUpdateAcknowledgeIEs S1AP-PROTOCOL-IES ::= { { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- MME Configuration Update Failure -- -- ************************************************************** MMEConfigurationUpdateFailure ::= SEQUENCE { protocolIEs ProtocolIE-Container { {MMEConfigurationUpdateFailureIEs} }, ... } MMEConfigurationUpdateFailureIEs S1AP-PROTOCOL-IES ::= { { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- DOWNLINK S1 CDMA2000 TUNNELLING ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Downlink S1 CDMA2000 Tunnelling -- -- ************************************************************** DownlinkS1cdma2000tunnelling ::= SEQUENCE { protocolIEs ProtocolIE-Container { {DownlinkS1cdma2000tunnellingIEs} }, ... } DownlinkS1cdma2000tunnellingIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-E-RABSubjecttoDataForwardingList CRITICALITY ignore TYPE E-RABSubjecttoDataForwardingList PRESENCE optional }| { ID id-cdma2000HOStatus CRITICALITY ignore TYPE Cdma2000HOStatus PRESENCE optional }| { ID id-cdma2000RATType CRITICALITY reject TYPE Cdma2000RATType PRESENCE mandatory }| { ID id-cdma2000PDU CRITICALITY reject TYPE Cdma2000PDU PRESENCE mandatory }, ... } -- ************************************************************** -- -- UPLINK S1 CDMA2000 TUNNELLING ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Uplink S1 CDMA2000 Tunnelling -- -- ************************************************************** UplinkS1cdma2000tunnelling ::= SEQUENCE { protocolIEs ProtocolIE-Container { {UplinkS1cdma2000tunnellingIEs} }, ... } UplinkS1cdma2000tunnellingIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-cdma2000RATType CRITICALITY reject TYPE Cdma2000RATType PRESENCE mandatory }| { ID id-cdma2000SectorID CRITICALITY reject TYPE Cdma2000SectorID PRESENCE mandatory }| { ID id-cdma2000HORequiredIndication CRITICALITY ignore TYPE Cdma2000HORequiredIndication PRESENCE optional }| { ID id-cdma2000OneXSRVCCInfo CRITICALITY reject TYPE Cdma2000OneXSRVCCInfo PRESENCE optional }| { ID id-cdma2000OneXRAND CRITICALITY reject TYPE Cdma2000OneXRAND PRESENCE optional }| { ID id-cdma2000PDU CRITICALITY reject TYPE Cdma2000PDU PRESENCE mandatory }| { ID id-EUTRANRoundTripDelayEstimationInfo CRITICALITY ignore TYPE EUTRANRoundTripDelayEstimationInfo PRESENCE optional }, -- Extension for Release 9 to assist target HRPD access with the acquisition of the UE -- ... } -- ************************************************************** -- -- UE CAPABILITY INFO INDICATION ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- UE Capability Info Indication -- -- ************************************************************** UECapabilityInfoIndication ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UECapabilityInfoIndicationIEs} }, ... } UECapabilityInfoIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE mandatory}| { ID id-UERadioCapabilityForPaging CRITICALITY ignore TYPE UERadioCapabilityForPaging PRESENCE optional}, ... } -- ************************************************************** -- -- eNB STATUS TRANSFER ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- eNB Status Transfer -- -- ************************************************************** ENBStatusTransfer ::= SEQUENCE { protocolIEs ProtocolIE-Container { {ENBStatusTransferIEs} }, ... } ENBStatusTransferIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-StatusTransfer-TransparentContainer CRITICALITY reject TYPE ENB-StatusTransfer-TransparentContainer PRESENCE mandatory}, ... } -- ************************************************************** -- -- MME STATUS TRANSFER ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- MME Status Transfer -- -- ************************************************************** MMEStatusTransfer ::= SEQUENCE { protocolIEs ProtocolIE-Container { {MMEStatusTransferIEs} }, ... } MMEStatusTransferIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-StatusTransfer-TransparentContainer CRITICALITY reject TYPE ENB-StatusTransfer-TransparentContainer PRESENCE mandatory}, ... } -- ************************************************************** -- -- TRACE ELEMENTARY PROCEDURES -- -- ************************************************************** -- ************************************************************** -- -- Trace Start -- -- ************************************************************** TraceStart ::= SEQUENCE { protocolIEs ProtocolIE-Container { {TraceStartIEs} }, ... } TraceStartIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-TraceActivation CRITICALITY ignore TYPE TraceActivation PRESENCE mandatory }, ... } -- ************************************************************** -- -- Trace Failure Indication -- -- ************************************************************** TraceFailureIndication ::= SEQUENCE { protocolIEs ProtocolIE-Container { {TraceFailureIndicationIEs} }, ... } TraceFailureIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-E-UTRAN-Trace-ID CRITICALITY ignore TYPE E-UTRAN-Trace-ID PRESENCE mandatory }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, ... } -- ************************************************************** -- -- DEACTIVATE TRACE ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Deactivate Trace -- -- ************************************************************** DeactivateTrace ::= SEQUENCE { protocolIEs ProtocolIE-Container { { DeactivateTraceIEs} }, ... } DeactivateTraceIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-E-UTRAN-Trace-ID CRITICALITY ignore TYPE E-UTRAN-Trace-ID PRESENCE mandatory }, ... } -- ************************************************************** -- -- CELL TRAFFIC TRACE ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Cell Traffic Trace -- -- ************************************************************** CellTrafficTrace ::= SEQUENCE { protocolIEs ProtocolIE-Container { { CellTrafficTraceIEs } }, ... } CellTrafficTraceIEs S1AP-PROTOCOL-IES ::= { {ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| {ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| {ID id-E-UTRAN-Trace-ID CRITICALITY ignore TYPE E-UTRAN-Trace-ID PRESENCE mandatory }| {ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory }| {ID id-TraceCollectionEntityIPAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE mandatory }| {ID id-PrivacyIndicator CRITICALITY ignore TYPE PrivacyIndicator PRESENCE optional }, ... } -- ************************************************************** -- -- LOCATION ELEMENTARY PROCEDURES -- -- ************************************************************** -- ************************************************************** -- -- Location Reporting Control -- -- ************************************************************** LocationReportingControl ::= SEQUENCE { protocolIEs ProtocolIE-Container { { LocationReportingControlIEs} }, ... } LocationReportingControlIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-RequestType CRITICALITY ignore TYPE RequestType PRESENCE mandatory }, ... } -- ************************************************************** -- -- Location Report Failure Indication -- -- ************************************************************** LocationReportingFailureIndication ::= SEQUENCE { protocolIEs ProtocolIE-Container { { LocationReportingFailureIndicationIEs} }, ... } LocationReportingFailureIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, ... } -- ************************************************************** -- -- Location Report -- -- ************************************************************** LocationReport ::= SEQUENCE { protocolIEs ProtocolIE-Container { { LocationReportIEs} }, ... } LocationReportIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory }| { ID id-TAI CRITICALITY ignore TYPE TAI PRESENCE mandatory }| { ID id-RequestType CRITICALITY ignore TYPE RequestType PRESENCE mandatory }, ... } -- ************************************************************** -- -- OVERLOAD ELEMENTARY PROCEDURES -- -- ************************************************************** -- ************************************************************** -- -- Overload Start -- -- ************************************************************** OverloadStart ::= SEQUENCE { protocolIEs ProtocolIE-Container { {OverloadStartIEs} }, ... } OverloadStartIEs S1AP-PROTOCOL-IES ::= { { ID id-OverloadResponse CRITICALITY reject TYPE OverloadResponse PRESENCE mandatory }| { ID id-GUMMEIList CRITICALITY ignore TYPE GUMMEIList PRESENCE optional }| { ID id-TrafficLoadReductionIndication CRITICALITY ignore TYPE TrafficLoadReductionIndication PRESENCE optional }, ... } -- ************************************************************** -- -- Overload Stop -- -- ************************************************************** OverloadStop ::= SEQUENCE { protocolIEs ProtocolIE-Container { {OverloadStopIEs} }, ... } OverloadStopIEs S1AP-PROTOCOL-IES ::= { { ID id-GUMMEIList CRITICALITY ignore TYPE GUMMEIList PRESENCE optional }, ... } -- ************************************************************** -- -- WRITE-REPLACE WARNING ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Write-Replace Warning Request -- -- ************************************************************** WriteReplaceWarningRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { {WriteReplaceWarningRequestIEs} }, ... } WriteReplaceWarningRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-MessageIdentifier CRITICALITY reject TYPE MessageIdentifier PRESENCE mandatory }| { ID id-SerialNumber CRITICALITY reject TYPE SerialNumber PRESENCE mandatory }| { ID id-WarningAreaList CRITICALITY ignore TYPE WarningAreaList PRESENCE optional }| { ID id-RepetitionPeriod CRITICALITY reject TYPE RepetitionPeriod PRESENCE mandatory }| { ID id-ExtendedRepetitionPeriod CRITICALITY reject TYPE ExtendedRepetitionPeriod PRESENCE optional }| { ID id-NumberofBroadcastRequest CRITICALITY reject TYPE NumberofBroadcastRequest PRESENCE mandatory }| { ID id-WarningType CRITICALITY ignore TYPE WarningType PRESENCE optional }| { ID id-WarningSecurityInfo CRITICALITY ignore TYPE WarningSecurityInfo PRESENCE optional }| { ID id-DataCodingScheme CRITICALITY ignore TYPE DataCodingScheme PRESENCE optional }| { ID id-WarningMessageContents CRITICALITY ignore TYPE WarningMessageContents PRESENCE optional }| { ID id-ConcurrentWarningMessageIndicator CRITICALITY reject TYPE ConcurrentWarningMessageIndicator PRESENCE optional }, ... } -- ************************************************************** -- -- Write-Replace Warning Response -- -- ************************************************************** WriteReplaceWarningResponse ::= SEQUENCE { protocolIEs ProtocolIE-Container { {WriteReplaceWarningResponseIEs} }, ... } WriteReplaceWarningResponseIEs S1AP-PROTOCOL-IES ::= { { ID id-MessageIdentifier CRITICALITY reject TYPE MessageIdentifier PRESENCE mandatory }| { ID id-SerialNumber CRITICALITY reject TYPE SerialNumber PRESENCE mandatory }| { ID id-BroadcastCompletedAreaList CRITICALITY ignore TYPE BroadcastCompletedAreaList PRESENCE optional }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- eNB DIRECT INFORMATION TRANSFER ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- eNB Direct Information Transfer -- -- ************************************************************** ENBDirectInformationTransfer ::= SEQUENCE { protocolIEs ProtocolIE-Container {{ ENBDirectInformationTransferIEs}}, ... } ENBDirectInformationTransferIEs S1AP-PROTOCOL-IES ::= { { ID id-Inter-SystemInformationTransferTypeEDT CRITICALITY reject TYPE Inter-SystemInformationTransferType PRESENCE mandatory }, ... } Inter-SystemInformationTransferType ::= CHOICE { rIMTransfer RIMTransfer, ... } -- ************************************************************** -- -- MME DIRECT INFORMATION TRANSFER ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- MME Direct Information Transfer -- -- ************************************************************** MMEDirectInformationTransfer ::= SEQUENCE { protocolIEs ProtocolIE-Container {{ MMEDirectInformationTransferIEs}}, ... } MMEDirectInformationTransferIEs S1AP-PROTOCOL-IES ::= { { ID id-Inter-SystemInformationTransferTypeMDT CRITICALITY reject TYPE Inter-SystemInformationTransferType PRESENCE mandatory }, ... } -- ************************************************************** -- -- eNB CONFIGURATION TRANSFER ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- eNB Configuration Transfer -- -- ************************************************************** ENBConfigurationTransfer ::= SEQUENCE { protocolIEs ProtocolIE-Container {{ ENBConfigurationTransferIEs}}, ... } ENBConfigurationTransferIEs S1AP-PROTOCOL-IES ::= { { ID id-SONConfigurationTransferECT CRITICALITY ignore TYPE SONConfigurationTransfer PRESENCE optional }, ... } -- ************************************************************** -- -- MME CONFIGURATION TRANSFER ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- MME Configuration Transfer -- -- ************************************************************** MMEConfigurationTransfer ::= SEQUENCE { protocolIEs ProtocolIE-Container {{ MMEConfigurationTransferIEs}}, ... } MMEConfigurationTransferIEs S1AP-PROTOCOL-IES ::= { { ID id-SONConfigurationTransferMCT CRITICALITY ignore TYPE SONConfigurationTransfer PRESENCE optional }, ... } -- ************************************************************** -- -- PRIVATE MESSAGE ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Private Message -- -- ************************************************************** PrivateMessage ::= SEQUENCE { privateIEs PrivateIE-Container {{PrivateMessageIEs}}, ... } PrivateMessageIEs S1AP-PRIVATE-IES ::= { ... } -- ************************************************************** -- -- KILL PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Kill Request -- -- ************************************************************** KillRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { {KillRequestIEs} }, ... } KillRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-MessageIdentifier CRITICALITY reject TYPE MessageIdentifier PRESENCE mandatory}| { ID id-SerialNumber CRITICALITY reject TYPE SerialNumber PRESENCE mandatory}| { ID id-WarningAreaList CRITICALITY ignore TYPE WarningAreaList PRESENCE optional}| { ID id-KillAllWarningMessages CRITICALITY reject TYPE KillAllWarningMessages PRESENCE optional}, ... } -- ************************************************************** -- -- Kill Response -- -- ************************************************************** KillResponse ::= SEQUENCE { protocolIEs ProtocolIE-Container { {KillResponseIEs} }, ... } KillResponseIEs S1AP-PROTOCOL-IES ::= { { ID id-MessageIdentifier CRITICALITY reject TYPE MessageIdentifier PRESENCE mandatory }| { ID id-SerialNumber CRITICALITY reject TYPE SerialNumber PRESENCE mandatory }| { ID id-BroadcastCancelledAreaList CRITICALITY ignore TYPE BroadcastCancelledAreaList PRESENCE optional }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- PWS RESTART INDICATION PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- PWS Restart Indication -- -- ************************************************************** PWSRestartIndication::= SEQUENCE { protocolIEs ProtocolIE-Container {{ PWSRestartIndicationIEs}}, ... } PWSRestartIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-ECGIListForRestart CRITICALITY reject TYPE ECGIListForRestart PRESENCE mandatory}| { ID id-Global-ENB-ID CRITICALITY reject TYPE Global-ENB-ID PRESENCE mandatory}| { ID id-TAIListForRestart CRITICALITY reject TYPE TAIListForRestart PRESENCE mandatory}| { ID id-EmergencyAreaIDListForRestart CRITICALITY reject TYPE EmergencyAreaIDListForRestart PRESENCE optional}, ... } -- ************************************************************** -- -- PWS Failure Indication -- -- ************************************************************** PWSFailureIndication::= SEQUENCE { protocolIEs ProtocolIE-Container {{ PWSFailureIndicationIEs}}, ... } PWSFailureIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-PWSfailedECGIList CRITICALITY reject TYPE PWSfailedECGIList PRESENCE mandatory}| { ID id-Global-ENB-ID CRITICALITY reject TYPE Global-ENB-ID PRESENCE mandatory}, ... } -- ************************************************************** -- -- LPPA TRANSPORT ELEMENTARY PROCEDURES -- -- ************************************************************** -- ************************************************************** -- -- DOWNLINK UE ASSOCIATED LPPA TRANSPORT -- -- ************************************************************** DownlinkUEAssociatedLPPaTransport ::= SEQUENCE { protocolIEs ProtocolIE-Container {{DownlinkUEAssociatedLPPaTransport-IEs}}, ... } DownlinkUEAssociatedLPPaTransport-IEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-Routing-ID CRITICALITY reject TYPE Routing-ID PRESENCE mandatory }| { ID id-LPPa-PDU CRITICALITY reject TYPE LPPa-PDU PRESENCE mandatory }, ... } -- ************************************************************** -- -- UPLINK UE ASSOCIATED LPPA TRANSPORT -- -- ************************************************************** UplinkUEAssociatedLPPaTransport ::= SEQUENCE { protocolIEs ProtocolIE-Container {{UplinkUEAssociatedLPPaTransport-IEs}}, ... } UplinkUEAssociatedLPPaTransport-IEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-Routing-ID CRITICALITY reject TYPE Routing-ID PRESENCE mandatory }| { ID id-LPPa-PDU CRITICALITY reject TYPE LPPa-PDU PRESENCE mandatory }, ... } -- ************************************************************** -- -- DOWNLINK NON UE ASSOCIATED LPPA TRANSPORT -- -- ************************************************************** DownlinkNonUEAssociatedLPPaTransport ::= SEQUENCE { protocolIEs ProtocolIE-Container {{DownlinkNonUEAssociatedLPPaTransport-IEs}}, ... } DownlinkNonUEAssociatedLPPaTransport-IEs S1AP-PROTOCOL-IES ::= { { ID id-Routing-ID CRITICALITY reject TYPE Routing-ID PRESENCE mandatory }| { ID id-LPPa-PDU CRITICALITY reject TYPE LPPa-PDU PRESENCE mandatory }, ... } -- ************************************************************** -- -- UPLINK NON UE ASSOCIATED LPPA TRANSPORT -- -- ************************************************************** UplinkNonUEAssociatedLPPaTransport ::= SEQUENCE { protocolIEs ProtocolIE-Container {{UplinkNonUEAssociatedLPPaTransport-IEs}}, ... } UplinkNonUEAssociatedLPPaTransport-IEs S1AP-PROTOCOL-IES ::= { { ID id-Routing-ID CRITICALITY reject TYPE Routing-ID PRESENCE mandatory }| { ID id-LPPa-PDU CRITICALITY reject TYPE LPPa-PDU PRESENCE mandatory }, ... } -- ************************************************************** -- -- E-RAB MODIFICATION INDICATION ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- E-RAB Modification Indication -- -- ************************************************************** E-RABModificationIndication ::= SEQUENCE { protocolIEs ProtocolIE-Container { { E-RABModificationIndicationIEs} }, ... } E-RABModificationIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-E-RABToBeModifiedListBearerModInd CRITICALITY reject TYPE E-RABToBeModifiedListBearerModInd PRESENCE mandatory}| { ID id-E-RABNotToBeModifiedListBearerModInd CRITICALITY reject TYPE E-RABNotToBeModifiedListBearerModInd PRESENCE optional}| { ID id-CSGMembershipInfo CRITICALITY reject TYPE CSGMembershipInfo PRESENCE optional}| -- Extension for Release 11 to support BBAI -- { ID id-Tunnel-Information-for-BBF CRITICALITY ignore TYPE TunnelInformation PRESENCE optional}, ... } E-RABToBeModifiedListBearerModInd ::= E-RAB-IE-ContainerList { {E-RABToBeModifiedItemBearerModIndIEs} } E-RABToBeModifiedItemBearerModIndIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABToBeModifiedItemBearerModInd CRITICALITY reject TYPE E-RABToBeModifiedItemBearerModInd PRESENCE mandatory}, ... } E-RABToBeModifiedItemBearerModInd ::= SEQUENCE { e-RAB-ID E-RAB-ID, transportLayerAddress TransportLayerAddress, dL-GTP-TEID GTP-TEID, iE-Extensions ProtocolExtensionContainer { { E-RABToBeModifiedItemBearerModInd-ExtIEs} } OPTIONAL, ... } E-RABToBeModifiedItemBearerModInd-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } E-RABNotToBeModifiedListBearerModInd ::= E-RAB-IE-ContainerList { {E-RABNotToBeModifiedItemBearerModIndIEs} } E-RABNotToBeModifiedItemBearerModIndIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABNotToBeModifiedItemBearerModInd CRITICALITY reject TYPE E-RABNotToBeModifiedItemBearerModInd PRESENCE mandatory}, ... } E-RABNotToBeModifiedItemBearerModInd ::= SEQUENCE { e-RAB-ID E-RAB-ID, transportLayerAddress TransportLayerAddress, dL-GTP-TEID GTP-TEID, iE-Extensions ProtocolExtensionContainer { { E-RABNotToBeModifiedItemBearerModInd-ExtIEs} } OPTIONAL, ... } E-RABNotToBeModifiedItemBearerModInd-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } CSGMembershipInfo ::= SEQUENCE { cSGMembershipStatus CSGMembershipStatus, cSG-Id CSG-Id, cellAccessMode CellAccessMode OPTIONAL, pLMNidentity PLMNidentity OPTIONAL, iE-Extensions ProtocolExtensionContainer { { CSGMembershipInfo-ExtIEs} } OPTIONAL, ... } CSGMembershipInfo-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- E-RAB Modification Confirm -- -- ************************************************************** E-RABModificationConfirm ::= SEQUENCE { protocolIEs ProtocolIE-Container { {E-RABModificationConfirmIEs} }, ... } E-RABModificationConfirmIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-E-RABModifyListBearerModConf CRITICALITY ignore TYPE E-RABModifyListBearerModConf PRESENCE optional}| { ID id-E-RABFailedToModifyListBearerModConf CRITICALITY ignore TYPE E-RABList PRESENCE optional}| { ID id-E-RABToBeReleasedListBearerModConf CRITICALITY ignore TYPE E-RABList PRESENCE optional}| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}, ... } E-RABModifyListBearerModConf ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABModifyItemBearerModConfIEs} } E-RABModifyItemBearerModConfIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABModifyItemBearerModConf CRITICALITY ignore TYPE E-RABModifyItemBearerModConf PRESENCE mandatory}, ... } E-RABModifyItemBearerModConf ::= SEQUENCE { e-RAB-ID E-RAB-ID, iE-Extensions ProtocolExtensionContainer { {E-RABModifyItemBearerModConfExtIEs} } OPTIONAL, ... } E-RABModifyItemBearerModConfExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- UE CONTEXT MODIFICATION INDICATION ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- UE Context Modification Indication -- -- ************************************************************** UEContextModificationIndication ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UEContextModificationIndicationIEs} }, ... } UEContextModificationIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-CSGMembershipInfo CRITICALITY reject TYPE CSGMembershipInfo PRESENCE optional}, ... } -- ************************************************************** -- -- UE Context Modification Confirm -- -- ************************************************************** UEContextModificationConfirm ::= SEQUENCE { protocolIEs ProtocolIE-Container { {UEContextModificationConfirmIEs} }, ... } UEContextModificationConfirmIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, ... } -- ************************************************************** -- -- UE CONTEXT SUSPEND ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- UE Context Suspend Request -- -- ************************************************************** UEContextSuspendRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UEContextSuspendRequestIEs} }, ... } UEContextSuspendRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-InformationOnRecommendedCellsAndENBsForPaging CRITICALITY ignore TYPE InformationOnRecommendedCellsAndENBsForPaging PRESENCE optional}| { ID id-CellIdentifierAndCELevelForCECapableUEs CRITICALITY ignore TYPE CellIdentifierAndCELevelForCECapableUEs PRESENCE optional}, ... } -- ************************************************************** -- -- UE Context Suspend Response -- -- ************************************************************** UEContextSuspendResponse ::= SEQUENCE { protocolIEs ProtocolIE-Container { {UEContextSuspendResponseIEs} }, ... } UEContextSuspendResponseIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| { ID id-SecurityContext CRITICALITY reject TYPE SecurityContext PRESENCE optional}, ... } -- ************************************************************** -- -- UE CONTEXT RESUME ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- UE Context Resume Request -- -- ************************************************************** UEContextResumeRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UEContextResumeRequestIEs} }, ... } UEContextResumeRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-E-RABFailedToResumeListResumeReq CRITICALITY reject TYPE E-RABFailedToResumeListResumeReq PRESENCE optional}| { ID id-RRC-Resume-Cause CRITICALITY ignore TYPE RRC-Establishment-Cause PRESENCE optional}, ... } E-RABFailedToResumeListResumeReq ::= E-RAB-IE-ContainerList { {E-RABFailedToResumeItemResumeReqIEs} } E-RABFailedToResumeItemResumeReqIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABFailedToResumeItemResumeReq CRITICALITY reject TYPE E-RABFailedToResumeItemResumeReq PRESENCE mandatory}, ... } E-RABFailedToResumeItemResumeReq ::= SEQUENCE { e-RAB-ID E-RAB-ID, cause Cause, iE-Extensions ProtocolExtensionContainer { { E-RABFailedToResumeItemResumeReq-ExtIEs} } OPTIONAL, ... } E-RABFailedToResumeItemResumeReq-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- UE Context Resume Response -- -- ************************************************************** UEContextResumeResponse ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UEContextResumeResponseIEs} }, ... } UEContextResumeResponseIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-E-RABFailedToResumeListResumeRes CRITICALITY reject TYPE E-RABFailedToResumeListResumeRes PRESENCE optional}| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| { ID id-SecurityContext CRITICALITY reject TYPE SecurityContext PRESENCE optional}, ... } E-RABFailedToResumeListResumeRes ::= E-RAB-IE-ContainerList { {E-RABFailedToResumeItemResumeResIEs} } E-RABFailedToResumeItemResumeResIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABFailedToResumeItemResumeRes CRITICALITY reject TYPE E-RABFailedToResumeItemResumeRes PRESENCE mandatory}, ... } E-RABFailedToResumeItemResumeRes ::= SEQUENCE { e-RAB-ID E-RAB-ID, cause Cause, iE-Extensions ProtocolExtensionContainer { { E-RABFailedToResumeItemResumeRes-ExtIEs} } OPTIONAL, ... } E-RABFailedToResumeItemResumeRes-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- UE Context Resume Failure -- -- ************************************************************** UEContextResumeFailure ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UEContextResumeFailureIEs} }, ... } UEContextResumeFailureIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, ... } -- ************************************************************** -- -- Connection Establishment Indication -- -- ************************************************************** ConnectionEstablishmentIndication::= SEQUENCE { protocolIEs ProtocolIE-Container { {ConnectionEstablishmentIndicationIEs} }, ... } ConnectionEstablishmentIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE optional }| { ID id-EnhancedCoverageRestricted CRITICALITY ignore TYPE EnhancedCoverageRestricted PRESENCE optional }| { ID id-DL-CP-SecurityInformation CRITICALITY ignore TYPE DL-CP-SecurityInformation PRESENCE optional }, ... } -- ************************************************************** -- -- Retrieve UE Information -- -- ************************************************************** RetrieveUEInformation ::= SEQUENCE { protocolIEs ProtocolIE-Container { { RetrieveUEInformationIEs} }, ... } RetrieveUEInformationIEs S1AP-PROTOCOL-IES ::= { { ID id-S-TMSI CRITICALITY reject TYPE S-TMSI PRESENCE mandatory}, ... } -- ************************************************************** -- UE Information Transfer -- -- ************************************************************** UEInformationTransfer ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UEInformationTransferIEs} }, ... } UEInformationTransferIEs S1AP-PROTOCOL-IES ::= { { ID id-S-TMSI CRITICALITY reject TYPE S-TMSI PRESENCE mandatory}| { ID id-UE-Level-QoS-Parameters CRITICALITY ignore TYPE E-RABLevelQoSParameters PRESENCE optional}| { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE optional}, ... } -- ************************************************************** -- -- eNB CP Relocation Indication -- -- ************************************************************** ENBCPRelocationIndication ::= SEQUENCE { protocolIEs ProtocolIE-Container { { ENBCPRelocationIndicationIEs} }, ... } ENBCPRelocationIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-S-TMSI CRITICALITY reject TYPE S-TMSI PRESENCE mandatory}| { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory}| { ID id-TAI CRITICALITY ignore TYPE TAI PRESENCE mandatory}| { ID id-UL-CP-SecurityInformation CRITICALITY reject TYPE UL-CP-SecurityInformation PRESENCE mandatory}, ... } -- ************************************************************** -- -- MME CP Relocation Indication -- -- ************************************************************** MMECPRelocationIndication ::= SEQUENCE { protocolIEs ProtocolIE-Container { { MMECPRelocationIndicationIEs} }, ... } MMECPRelocationIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}, ... } END -- ************************************************************** -- -- Information Element Definitions -- -- ************************************************************** S1AP-IEs { itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-IEs (2) } DEFINITIONS AUTOMATIC TAGS ::= BEGIN IMPORTS id-E-RABInformationListItem, id-E-RABItem, id-Bearers-SubjectToStatusTransfer-Item, id-Time-Synchronisation-Info, id-x2TNLConfigurationInfo, id-eNBX2ExtendedTransportLayerAddresses, id-MDTConfiguration, id-Time-UE-StayedInCell-EnhancedGranularity, id-HO-Cause, id-M3Configuration, id-M4Configuration, id-M5Configuration, id-MDT-Location-Info, id-SignallingBasedMDTPLMNList, id-MobilityInformation, id-ULCOUNTValueExtended, id-DLCOUNTValueExtended, id-ReceiveStatusOfULPDCPSDUsExtended, id-eNBIndirectX2TransportLayerAddresses, id-Muting-Availability-Indication, id-Muting-Pattern-Information, id-Synchronisation-Information, id-uE-HistoryInformationFromTheUE, id-LoggedMBSFNMDT, id-SON-Information-Report, id-RecommendedCellItem, id-RecommendedENBItem, id-ProSeUEtoNetworkRelaying, id-ULCOUNTValuePDCP-SNlength18, id-DLCOUNTValuePDCP-SNlength18, id-ReceiveStatusOfULPDCPSDUsPDCP-SNlength18, id-M6Configuration, id-M7Configuration, id-RAT-Type, maxnoofCSGs, maxnoofE-RABs, maxnoofErrors, maxnoofBPLMNs, maxnoofPLMNsPerMME, maxnoofTACs, maxnoofEPLMNs, maxnoofEPLMNsPlusOne, maxnoofForbLACs, maxnoofForbTACs, maxnoofCells, maxnoofCellID, maxnoofDCNs, maxnoofEmergencyAreaID, maxnoofTAIforWarning, maxnoofCellinTAI, maxnoofCellinEAI, maxnoofeNBX2TLAs, maxnoofeNBX2ExtTLAs, maxnoofeNBX2GTPTLAs, maxnoofRATs, maxnoofGroupIDs, maxnoofMMECs, maxnoofTAforMDT, maxnoofCellIDforMDT, maxnoofMDTPLMNs, maxnoofCellsforRestart, maxnoofRestartTAIs, maxnoofRestartEmergencyAreaIDs, maxnoofMBSFNAreaMDT, maxEARFCN, maxnoofCellsineNB, maxnoofRecommendedCells, maxnoofRecommendedENBs FROM S1AP-Constants Criticality, ProcedureCode, ProtocolIE-ID, TriggeringMessage FROM S1AP-CommonDataTypes ProtocolExtensionContainer{}, S1AP-PROTOCOL-EXTENSION, ProtocolIE-SingleContainer{}, S1AP-PROTOCOL-IES FROM S1AP-Containers; -- A Additional-GUTI::= SEQUENCE { gUMMEI GUMMEI, m-TMSI M-TMSI, iE-Extensions ProtocolExtensionContainer { {Additional-GUTI-ExtIEs} } OPTIONAL, ... } Additional-GUTI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } AreaScopeOfMDT ::= CHOICE { cellBased CellBasedMDT, tABased TABasedMDT, pLMNWide NULL, ..., tAIBased TAIBasedMDT } AllocationAndRetentionPriority ::= SEQUENCE { priorityLevel PriorityLevel, pre-emptionCapability Pre-emptionCapability, pre-emptionVulnerability Pre-emptionVulnerability, iE-Extensions ProtocolExtensionContainer { {AllocationAndRetentionPriority-ExtIEs} } OPTIONAL, ... } AllocationAndRetentionPriority-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } AssistanceDataForCECapableUEs ::= SEQUENCE { cellIdentifierAndCELevelForCECapableUEs CellIdentifierAndCELevelForCECapableUEs, iE-Extensions ProtocolExtensionContainer { { InformationForCECapableUEs-ExtIEs} } OPTIONAL, ... } InformationForCECapableUEs-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } AssistanceDataForPaging ::= SEQUENCE { assistanceDataForRecommendedCells AssistanceDataForRecommendedCells OPTIONAL, assistanceDataForCECapableUEs AssistanceDataForCECapableUEs OPTIONAL, pagingAttemptInformation PagingAttemptInformation OPTIONAL, iE-Extensions ProtocolExtensionContainer { { AssistanceDataForPaging-ExtIEs} } OPTIONAL, ... } AssistanceDataForPaging-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } AssistanceDataForRecommendedCells ::= SEQUENCE { recommendedCellsForPaging RecommendedCellsForPaging, iE-Extensions ProtocolExtensionContainer { { AssistanceDataForRecommendedCells-ExtIEs} } OPTIONAL, ... } AssistanceDataForRecommendedCells-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- B Bearers-SubjectToStatusTransferList ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { { Bearers-SubjectToStatusTransfer-ItemIEs } } Bearers-SubjectToStatusTransfer-ItemIEs S1AP-PROTOCOL-IES ::= { { ID id-Bearers-SubjectToStatusTransfer-Item CRITICALITY ignore TYPE Bearers-SubjectToStatusTransfer-Item PRESENCE mandatory }, ... } Bearers-SubjectToStatusTransfer-Item ::= SEQUENCE { e-RAB-ID E-RAB-ID, uL-COUNTvalue COUNTvalue, dL-COUNTvalue COUNTvalue, receiveStatusofULPDCPSDUs ReceiveStatusofULPDCPSDUs OPTIONAL, iE-Extensions ProtocolExtensionContainer { {Bearers-SubjectToStatusTransfer-ItemExtIEs} } OPTIONAL, ... } Bearers-SubjectToStatusTransfer-ItemExtIEs S1AP-PROTOCOL-EXTENSION ::= { { ID id-ULCOUNTValueExtended CRITICALITY ignore EXTENSION COUNTValueExtended PRESENCE optional}| { ID id-DLCOUNTValueExtended CRITICALITY ignore EXTENSION COUNTValueExtended PRESENCE optional}| { ID id-ReceiveStatusOfULPDCPSDUsExtended CRITICALITY ignore EXTENSION ReceiveStatusOfULPDCPSDUsExtended PRESENCE optional}| { ID id-ULCOUNTValuePDCP-SNlength18 CRITICALITY ignore EXTENSION COUNTvaluePDCP-SNlength18 PRESENCE optional}| { ID id-DLCOUNTValuePDCP-SNlength18 CRITICALITY ignore EXTENSION COUNTvaluePDCP-SNlength18 PRESENCE optional}| { ID id-ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 CRITICALITY ignore EXTENSION ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 PRESENCE optional}, ... } BearerType ::= ENUMERATED { non-IP, ... } BitRate ::= INTEGER (0..10000000000) BPLMNs ::= SEQUENCE (SIZE(1.. maxnoofBPLMNs)) OF PLMNidentity BroadcastCancelledAreaList ::= CHOICE { cellID-Cancelled CellID-Cancelled, tAI-Cancelled TAI-Cancelled, emergencyAreaID-Cancelled EmergencyAreaID-Cancelled, ... } BroadcastCompletedAreaList ::= CHOICE { cellID-Broadcast CellID-Broadcast, tAI-Broadcast TAI-Broadcast, emergencyAreaID-Broadcast EmergencyAreaID-Broadcast, ... } -- C CancelledCellinEAI ::= SEQUENCE (SIZE(1..maxnoofCellinEAI)) OF CancelledCellinEAI-Item CancelledCellinEAI-Item ::= SEQUENCE { eCGI EUTRAN-CGI, numberOfBroadcasts NumberOfBroadcasts, iE-Extensions ProtocolExtensionContainer { {CancelledCellinEAI-Item-ExtIEs} } OPTIONAL, ... } CancelledCellinEAI-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } CancelledCellinTAI ::= SEQUENCE (SIZE(1..maxnoofCellinTAI)) OF CancelledCellinTAI-Item CancelledCellinTAI-Item ::= SEQUENCE{ eCGI EUTRAN-CGI, numberOfBroadcasts NumberOfBroadcasts, iE-Extensions ProtocolExtensionContainer { {CancelledCellinTAI-Item-ExtIEs} } OPTIONAL, ... } CancelledCellinTAI-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } Cause ::= CHOICE { radioNetwork CauseRadioNetwork, transport CauseTransport, nas CauseNas, protocol CauseProtocol, misc CauseMisc, ... } CauseMisc ::= ENUMERATED { control-processing-overload, not-enough-user-plane-processing-resources, hardware-failure, om-intervention, unspecified, unknown-PLMN, ... } CauseProtocol ::= ENUMERATED { transfer-syntax-error, abstract-syntax-error-reject, abstract-syntax-error-ignore-and-notify, message-not-compatible-with-receiver-state, semantic-error, abstract-syntax-error-falsely-constructed-message, unspecified, ... } CauseRadioNetwork ::= ENUMERATED { unspecified, tx2relocoverall-expiry, successful-handover, release-due-to-eutran-generated-reason, handover-cancelled, partial-handover, ho-failure-in-target-EPC-eNB-or-target-system, ho-target-not-allowed, tS1relocoverall-expiry, tS1relocprep-expiry, cell-not-available, unknown-targetID, no-radio-resources-available-in-target-cell, unknown-mme-ue-s1ap-id, unknown-enb-ue-s1ap-id, unknown-pair-ue-s1ap-id, handover-desirable-for-radio-reason, time-critical-handover, resource-optimisation-handover, reduce-load-in-serving-cell, user-inactivity, radio-connection-with-ue-lost, load-balancing-tau-required, cs-fallback-triggered, ue-not-available-for-ps-service, radio-resources-not-available, failure-in-radio-interface-procedure, invalid-qos-combination, interrat-redirection, interaction-with-other-procedure, unknown-E-RAB-ID, multiple-E-RAB-ID-instances, encryption-and-or-integrity-protection-algorithms-not-supported, s1-intra-system-handover-triggered, s1-inter-system-handover-triggered, x2-handover-triggered, ..., redirection-towards-1xRTT, not-supported-QCI-value, invalid-CSG-Id, release-due-to-pre-emption } CauseTransport ::= ENUMERATED { transport-resource-unavailable, unspecified, ... } CauseNas ::= ENUMERATED { normal-release, authentication-failure, detach, unspecified, ..., csg-subscription-expiry } CellAccessMode ::= ENUMERATED { hybrid, ... } CellIdentifierAndCELevelForCECapableUEs ::= SEQUENCE { global-Cell-ID EUTRAN-CGI, cELevel CELevel, iE-Extensions ProtocolExtensionContainer { { CellIdentifierAndCELevelForCECapableUEs-ExtIEs} } OPTIONAL, ... } CellIdentifierAndCELevelForCECapableUEs-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- Coverage Enhancement level encoded according to TS 36.331 [16] -- CELevel ::= OCTET STRING CE-mode-B-SupportIndicator ::= ENUMERATED { supported, ... } CellIdentity ::= BIT STRING (SIZE (28)) CellID-Broadcast ::= SEQUENCE (SIZE(1..maxnoofCellID)) OF CellID-Broadcast-Item CellID-Broadcast-Item ::= SEQUENCE { eCGI EUTRAN-CGI, iE-Extensions ProtocolExtensionContainer { {CellID-Broadcast-Item-ExtIEs} } OPTIONAL, ... } CellID-Broadcast-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } CellID-Cancelled::= SEQUENCE (SIZE(1..maxnoofCellID)) OF CellID-Cancelled-Item CellID-Cancelled-Item ::= SEQUENCE { eCGI EUTRAN-CGI, numberOfBroadcasts NumberOfBroadcasts, iE-Extensions ProtocolExtensionContainer { {CellID-Cancelled-Item-ExtIEs} } OPTIONAL, ... } CellID-Cancelled-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } CellBasedMDT::= SEQUENCE { cellIdListforMDT CellIdListforMDT, iE-Extensions ProtocolExtensionContainer { {CellBasedMDT-ExtIEs} } OPTIONAL, ... } CellBasedMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } CellIdListforMDT ::= SEQUENCE (SIZE(1..maxnoofCellIDforMDT)) OF EUTRAN-CGI Cdma2000PDU ::= OCTET STRING Cdma2000RATType ::= ENUMERATED { hRPD, onexRTT, ... } Cdma2000SectorID ::= OCTET STRING Cdma2000HOStatus ::= ENUMERATED { hOSuccess, hOFailure, ... } Cdma2000HORequiredIndication ::= ENUMERATED { true, ... } Cdma2000OneXSRVCCInfo ::= SEQUENCE { cdma2000OneXMEID Cdma2000OneXMEID, cdma2000OneXMSI Cdma2000OneXMSI, cdma2000OneXPilot Cdma2000OneXPilot, iE-Extensions ProtocolExtensionContainer { {Cdma2000OneXSRVCCInfo-ExtIEs} } OPTIONAL, ... } Cdma2000OneXSRVCCInfo-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } Cdma2000OneXMEID ::= OCTET STRING Cdma2000OneXMSI ::= OCTET STRING Cdma2000OneXPilot ::= OCTET STRING Cdma2000OneXRAND ::= OCTET STRING Cell-Size ::= ENUMERATED {verysmall, small, medium, large, ...} CellType ::= SEQUENCE { cell-Size Cell-Size, iE-Extensions ProtocolExtensionContainer { { CellType-ExtIEs}} OPTIONAL, ... } CellType-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } CGI ::= SEQUENCE { pLMNidentity PLMNidentity, lAC LAC, cI CI, rAC RAC OPTIONAL, iE-Extensions ProtocolExtensionContainer { {CGI-ExtIEs} } OPTIONAL, ... } CGI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } CI ::= OCTET STRING (SIZE (2)) CNDomain ::= ENUMERATED { ps, cs } ConcurrentWarningMessageIndicator ::= ENUMERATED { true } Correlation-ID ::= OCTET STRING (SIZE (4)) CSFallbackIndicator ::= ENUMERATED { cs-fallback-required, ..., cs-fallback-high-priority } AdditionalCSFallbackIndicator ::= ENUMERATED { no-restriction, restriction, ... } CSG-Id ::= BIT STRING (SIZE (27)) CSG-IdList ::= SEQUENCE (SIZE (1.. maxnoofCSGs)) OF CSG-IdList-Item CSG-IdList-Item ::= SEQUENCE { cSG-Id CSG-Id, iE-Extensions ProtocolExtensionContainer { {CSG-IdList-Item-ExtIEs} } OPTIONAL, ... } CSG-IdList-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } CSGMembershipStatus ::= ENUMERATED { member, not-member } COUNTvalue ::= SEQUENCE { pDCP-SN PDCP-SN, hFN HFN, iE-Extensions ProtocolExtensionContainer { {COUNTvalue-ExtIEs} } OPTIONAL, ... } COUNTvalue-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } COUNTValueExtended ::= SEQUENCE { pDCP-SNExtended PDCP-SNExtended, hFNModified HFNModified, iE-Extensions ProtocolExtensionContainer { {COUNTValueExtended-ExtIEs} } OPTIONAL, ... } COUNTValueExtended-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } COUNTvaluePDCP-SNlength18 ::= SEQUENCE { pDCP-SNlength18 PDCP-SNlength18, hFNforPDCP-SNlength18 HFNforPDCP-SNlength18, iE-Extensions ProtocolExtensionContainer { {COUNTvaluePDCP-SNlength18-ExtIEs} } OPTIONAL, ... } COUNTvaluePDCP-SNlength18-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } Coverage-Level ::= ENUMERATED { extendedcoverage, ... } CriticalityDiagnostics ::= SEQUENCE { procedureCode ProcedureCode OPTIONAL, triggeringMessage TriggeringMessage OPTIONAL, procedureCriticality Criticality OPTIONAL, iEsCriticalityDiagnostics CriticalityDiagnostics-IE-List OPTIONAL, iE-Extensions ProtocolExtensionContainer {{CriticalityDiagnostics-ExtIEs}} OPTIONAL, ... } CriticalityDiagnostics-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } CriticalityDiagnostics-IE-List ::= SEQUENCE (SIZE (1.. maxnoofErrors)) OF CriticalityDiagnostics-IE-Item CriticalityDiagnostics-IE-Item ::= SEQUENCE { iECriticality Criticality, iE-ID ProtocolIE-ID, typeOfError TypeOfError, iE-Extensions ProtocolExtensionContainer {{CriticalityDiagnostics-IE-Item-ExtIEs}} OPTIONAL, ... } CriticalityDiagnostics-IE-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- D DataCodingScheme ::= BIT STRING (SIZE (8)) DCN-ID ::= INTEGER (0..65535) ServedDCNs ::= SEQUENCE (SIZE(0..maxnoofDCNs)) OF ServedDCNsItem ServedDCNsItem ::= SEQUENCE { dCN-ID DCN-ID, relativeDCNCapacity RelativeMMECapacity, iE-Extensions ProtocolExtensionContainer { {ServedDCNsItem-ExtIEs} } OPTIONAL, ... } ServedDCNsItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } DL-CP-SecurityInformation ::= SEQUENCE { dl-NAS-MAC DL-NAS-MAC, iE-Extensions ProtocolExtensionContainer { { DL-CP-SecurityInformation-ExtIEs} } OPTIONAL, ... } DL-CP-SecurityInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } DL-Forwarding ::= ENUMERATED { dL-Forwarding-proposed, ... } DL-NAS-MAC ::= BIT STRING (SIZE (16)) Direct-Forwarding-Path-Availability ::= ENUMERATED { directPathAvailable, ... } Data-Forwarding-Not-Possible ::= ENUMERATED { data-Forwarding-not-Possible, ... } DLNASPDUDeliveryAckRequest ::= ENUMERATED { requested, ... } -- E EARFCN ::= INTEGER(0..maxEARFCN, ...) ECGIList ::= SEQUENCE (SIZE(1..maxnoofCellID)) OF EUTRAN-CGI PWSfailedECGIList ::= SEQUENCE (SIZE(1..maxnoofCellsineNB)) OF EUTRAN-CGI EmergencyAreaIDList ::= SEQUENCE (SIZE(1..maxnoofEmergencyAreaID)) OF EmergencyAreaID EmergencyAreaID ::= OCTET STRING (SIZE (3)) EmergencyAreaID-Broadcast ::= SEQUENCE (SIZE(1..maxnoofEmergencyAreaID)) OF EmergencyAreaID-Broadcast-Item EmergencyAreaID-Broadcast-Item ::= SEQUENCE { emergencyAreaID EmergencyAreaID, completedCellinEAI CompletedCellinEAI, iE-Extensions ProtocolExtensionContainer { {EmergencyAreaID-Broadcast-Item-ExtIEs} } OPTIONAL, ... } EmergencyAreaID-Broadcast-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } EmergencyAreaID-Cancelled ::= SEQUENCE (SIZE(1..maxnoofEmergencyAreaID)) OF EmergencyAreaID-Cancelled-Item EmergencyAreaID-Cancelled-Item ::= SEQUENCE { emergencyAreaID EmergencyAreaID, cancelledCellinEAI CancelledCellinEAI, iE-Extensions ProtocolExtensionContainer { {EmergencyAreaID-Cancelled-Item-ExtIEs} } OPTIONAL, ... } EmergencyAreaID-Cancelled-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } CompletedCellinEAI ::= SEQUENCE (SIZE(1..maxnoofCellinEAI)) OF CompletedCellinEAI-Item CompletedCellinEAI-Item ::= SEQUENCE { eCGI EUTRAN-CGI, iE-Extensions ProtocolExtensionContainer { {CompletedCellinEAI-Item-ExtIEs} } OPTIONAL, ... } CompletedCellinEAI-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } ECGI-List ::= SEQUENCE (SIZE(1..maxnoofCellsineNB)) OF EUTRAN-CGI EmergencyAreaIDListForRestart ::= SEQUENCE (SIZE(1..maxnoofRestartEmergencyAreaIDs)) OF EmergencyAreaID ENB-ID ::= CHOICE { macroENB-ID BIT STRING (SIZE(20)), homeENB-ID BIT STRING (SIZE(28)), ... , short-macroENB-ID BIT STRING (SIZE(18)), long-macroENB-ID BIT STRING (SIZE(21)) } GERAN-Cell-ID ::= SEQUENCE { lAI LAI, rAC RAC, cI CI, iE-Extensions ProtocolExtensionContainer { { GERAN-Cell-ID-ExtIEs} } OPTIONAL, ... } GERAN-Cell-ID-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } Global-ENB-ID ::= SEQUENCE { pLMNidentity PLMNidentity, eNB-ID ENB-ID, iE-Extensions ProtocolExtensionContainer { {GlobalENB-ID-ExtIEs} } OPTIONAL, ... } GlobalENB-ID-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } GUMMEIList::= SEQUENCE (SIZE (1.. maxnoofMMECs)) OF GUMMEI ENB-StatusTransfer-TransparentContainer ::= SEQUENCE { bearers-SubjectToStatusTransferList Bearers-SubjectToStatusTransferList, iE-Extensions ProtocolExtensionContainer { {ENB-StatusTransfer-TransparentContainer-ExtIEs} } OPTIONAL, ... } ENB-StatusTransfer-TransparentContainer-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } ENB-UE-S1AP-ID ::= INTEGER (0..16777215) ENBname ::= PrintableString (SIZE (1..150,...)) ENBX2TLAs ::= SEQUENCE (SIZE(1.. maxnoofeNBX2TLAs)) OF TransportLayerAddress EncryptionAlgorithms ::= BIT STRING (SIZE (16,...)) EnhancedCoverageRestricted ::= ENUMERATED { restricted, ... } EPLMNs ::= SEQUENCE (SIZE(1..maxnoofEPLMNs)) OF PLMNidentity EventType ::= ENUMERATED { direct, change-of-serve-cell, stop-change-of-serve-cell, ... } E-RAB-ID ::= INTEGER (0..15, ...) E-RABInformationList ::= SEQUENCE (SIZE (1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { { E-RABInformationListIEs } } E-RABInformationListIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABInformationListItem CRITICALITY ignore TYPE E-RABInformationListItem PRESENCE mandatory }, ... } E-RABInformationListItem ::= SEQUENCE { e-RAB-ID E-RAB-ID, dL-Forwarding DL-Forwarding OPTIONAL, iE-Extensions ProtocolExtensionContainer { {E-RABInformationListItem-ExtIEs} } OPTIONAL, ... } E-RABInformationListItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } E-RABList ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABItemIEs} } E-RABItemIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABItem CRITICALITY ignore TYPE E-RABItem PRESENCE mandatory }, ... } E-RABItem ::= SEQUENCE { e-RAB-ID E-RAB-ID, cause Cause, iE-Extensions ProtocolExtensionContainer { {E-RABItem-ExtIEs} } OPTIONAL, ... } E-RABItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } E-RABLevelQoSParameters ::= SEQUENCE { qCI QCI, allocationRetentionPriority AllocationAndRetentionPriority, gbrQosInformation GBR-QosInformation OPTIONAL, iE-Extensions ProtocolExtensionContainer { {E-RABQoSParameters-ExtIEs} } OPTIONAL, ... } E-RABQoSParameters-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } EUTRAN-CGI ::= SEQUENCE { pLMNidentity PLMNidentity, cell-ID CellIdentity, iE-Extensions ProtocolExtensionContainer { {EUTRAN-CGI-ExtIEs} } OPTIONAL, ... } EUTRAN-CGI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } EUTRANRoundTripDelayEstimationInfo ::= INTEGER (0..2047) ExpectedUEBehaviour ::= SEQUENCE { expectedActivity ExpectedUEActivityBehaviour OPTIONAL, expectedHOInterval ExpectedHOInterval OPTIONAL, iE-Extensions ProtocolExtensionContainer { { ExpectedUEBehaviour-ExtIEs} } OPTIONAL, ... } ExpectedUEBehaviour-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } ExpectedUEActivityBehaviour ::= SEQUENCE { expectedActivityPeriod ExpectedActivityPeriod OPTIONAL, expectedIdlePeriod ExpectedIdlePeriod OPTIONAL, sourceofUEActivityBehaviourInformation SourceOfUEActivityBehaviourInformation OPTIONAL, iE-Extensions ProtocolExtensionContainer { { ExpectedUEActivityBehaviour-ExtIEs} } OPTIONAL, ... } ExpectedUEActivityBehaviour-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } ExpectedActivityPeriod ::= INTEGER (1..30|40|50|60|80|100|120|150|180|181,...) ExpectedIdlePeriod ::= INTEGER (1..30|40|50|60|80|100|120|150|180|181,...) SourceOfUEActivityBehaviourInformation ::= ENUMERATED { subscription-information, statistics, ... } ExpectedHOInterval ::= ENUMERATED { sec15, sec30, sec60, sec90, sec120, sec180, long-time, ... } ExtendedRNC-ID ::= INTEGER (4096..65535) ExtendedRepetitionPeriod ::= INTEGER (4096..131071) Extended-UEIdentityIndexValue ::= BIT STRING (SIZE (14)) -- F ForbiddenInterRATs ::= ENUMERATED { all, geran, utran, cdma2000, ..., geranandutran, cdma2000andutran } ForbiddenTAs ::= SEQUENCE (SIZE(1.. maxnoofEPLMNsPlusOne)) OF ForbiddenTAs-Item ForbiddenTAs-Item ::= SEQUENCE { pLMN-Identity PLMNidentity, forbiddenTACs ForbiddenTACs, iE-Extensions ProtocolExtensionContainer { {ForbiddenTAs-Item-ExtIEs} } OPTIONAL, ... } ForbiddenTAs-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } ForbiddenTACs ::= SEQUENCE (SIZE(1..maxnoofForbTACs)) OF TAC ForbiddenLAs ::= SEQUENCE (SIZE(1..maxnoofEPLMNsPlusOne)) OF ForbiddenLAs-Item ForbiddenLAs-Item ::= SEQUENCE { pLMN-Identity PLMNidentity, forbiddenLACs ForbiddenLACs, iE-Extensions ProtocolExtensionContainer { {ForbiddenLAs-Item-ExtIEs} } OPTIONAL, ... } ForbiddenLAs-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } ForbiddenLACs ::= SEQUENCE (SIZE(1..maxnoofForbLACs)) OF LAC -- G GBR-QosInformation ::= SEQUENCE { e-RAB-MaximumBitrateDL BitRate, e-RAB-MaximumBitrateUL BitRate, e-RAB-GuaranteedBitrateDL BitRate, e-RAB-GuaranteedBitrateUL BitRate, iE-Extensions ProtocolExtensionContainer { { GBR-QosInformation-ExtIEs} } OPTIONAL, ... } GBR-QosInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } GTP-TEID ::= OCTET STRING (SIZE (4)) GUMMEI ::= SEQUENCE { pLMN-Identity PLMNidentity, mME-Group-ID MME-Group-ID, mME-Code MME-Code, iE-Extensions ProtocolExtensionContainer { {GUMMEI-ExtIEs} } OPTIONAL, ... } GUMMEI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } GUMMEIType ::= ENUMERATED { native, mapped, ... } GWContextReleaseIndication ::= ENUMERATED { true, ... } -- H HandoverRestrictionList ::= SEQUENCE { servingPLMN PLMNidentity, equivalentPLMNs EPLMNs OPTIONAL, forbiddenTAs ForbiddenTAs OPTIONAL, forbiddenLAs ForbiddenLAs OPTIONAL, forbiddenInterRATs ForbiddenInterRATs OPTIONAL, iE-Extensions ProtocolExtensionContainer { {HandoverRestrictionList-ExtIEs} } OPTIONAL, ... } HandoverRestrictionList-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } HandoverType ::= ENUMERATED { intralte, ltetoutran, ltetogeran, utrantolte, gerantolte, ... } HFN ::= INTEGER (0..1048575) HFNModified ::= INTEGER (0..131071) HFNforPDCP-SNlength18 ::= INTEGER (0..16383) -- I Masked-IMEISV ::= BIT STRING (SIZE (64)) ImmediateMDT ::= SEQUENCE { measurementsToActivate MeasurementsToActivate, m1reportingTrigger M1ReportingTrigger, m1thresholdeventA2 M1ThresholdEventA2 OPTIONAL, -- Included in case of event-triggered, or event-triggered periodic reporting for measurement M1 m1periodicReporting M1PeriodicReporting OPTIONAL, -- Included in case of periodic or event-triggered periodic reporting iE-Extensions ProtocolExtensionContainer { { ImmediateMDT-ExtIEs} } OPTIONAL, ... } ImmediateMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { { ID id-M3Configuration CRITICALITY ignore EXTENSION M3Configuration PRESENCE conditional}| { ID id-M4Configuration CRITICALITY ignore EXTENSION M4Configuration PRESENCE conditional}| { ID id-M5Configuration CRITICALITY ignore EXTENSION M5Configuration PRESENCE conditional}| { ID id-MDT-Location-Info CRITICALITY ignore EXTENSION MDT-Location-Info PRESENCE optional}| { ID id-M6Configuration CRITICALITY ignore EXTENSION M6Configuration PRESENCE conditional}| { ID id-M7Configuration CRITICALITY ignore EXTENSION M7Configuration PRESENCE conditional}, ... } IMSI ::= OCTET STRING (SIZE (3..8)) InformationOnRecommendedCellsAndENBsForPaging ::= SEQUENCE { recommendedCellsForPaging RecommendedCellsForPaging, recommendENBsForPaging RecommendedENBsForPaging, iE-Extensions ProtocolExtensionContainer { { InformationOnRecommendedCellsAndENBsForPaging-ExtIEs} } OPTIONAL, ... } InformationOnRecommendedCellsAndENBsForPaging-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } IntegrityProtectionAlgorithms ::= BIT STRING (SIZE (16,...)) IntendedNumberOfPagingAttempts ::= INTEGER (1..16, ...) InterfacesToTrace ::= BIT STRING (SIZE (8)) -- J -- K KillAllWarningMessages ::= ENUMERATED {true} -- L LAC ::= OCTET STRING (SIZE (2)) LAI ::= SEQUENCE { pLMNidentity PLMNidentity, lAC LAC, iE-Extensions ProtocolExtensionContainer { {LAI-ExtIEs} } OPTIONAL, ... } LAI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } LastVisitedCell-Item ::= CHOICE { e-UTRAN-Cell LastVisitedEUTRANCellInformation, uTRAN-Cell LastVisitedUTRANCellInformation, gERAN-Cell LastVisitedGERANCellInformation, ... } LastVisitedEUTRANCellInformation ::= SEQUENCE { global-Cell-ID EUTRAN-CGI, cellType CellType, time-UE-StayedInCell Time-UE-StayedInCell, iE-Extensions ProtocolExtensionContainer { { LastVisitedEUTRANCellInformation-ExtIEs} } OPTIONAL, ... } LastVisitedEUTRANCellInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { -- Extension for Rel-11 to support enhanced granularity for time UE stayed in cell -- { ID id-Time-UE-StayedInCell-EnhancedGranularity CRITICALITY ignore EXTENSION Time-UE-StayedInCell-EnhancedGranularity PRESENCE optional}| { ID id-HO-Cause CRITICALITY ignore EXTENSION Cause PRESENCE optional}, ... } LastVisitedUTRANCellInformation ::= OCTET STRING LastVisitedGERANCellInformation ::= CHOICE { undefined NULL, ... } L3-Information ::= OCTET STRING -- This is a dummy IE used only as a reference to the actual definition in relevant specification. LPPa-PDU ::= OCTET STRING LHN-ID ::= OCTET STRING(SIZE (32..256)) Links-to-log ::= ENUMERATED {uplink, downlink, both-uplink-and-downlink, ...} ListeningSubframePattern ::= SEQUENCE { pattern-period ENUMERATED {ms1280, ms2560, ms5120, ms10240, ...}, pattern-offset INTEGER (0..10239, ...), iE-Extensions ProtocolExtensionContainer { { ListeningSubframePattern-ExtIEs} } OPTIONAL, ... } ListeningSubframePattern-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } LoggedMDT ::= SEQUENCE { loggingInterval LoggingInterval, loggingDuration LoggingDuration, iE-Extensions ProtocolExtensionContainer { {LoggedMDT-ExtIEs} } OPTIONAL, ... } LoggedMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } LoggingInterval ::= ENUMERATED {ms128, ms256, ms512, ms1024, ms2048, ms3072, ms4096, ms6144} LoggingDuration ::= ENUMERATED {m10, m20, m40, m60, m90, m120} LoggedMBSFNMDT ::= SEQUENCE { loggingInterval LoggingInterval, loggingDuration LoggingDuration, mBSFN-ResultToLog MBSFN-ResultToLog OPTIONAL, iE-Extensions ProtocolExtensionContainer { { LoggedMBSFNMDT-ExtIEs } } OPTIONAL, ... } LoggedMBSFNMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- M M3Configuration ::= SEQUENCE { m3period M3period, iE-Extensions ProtocolExtensionContainer { { M3Configuration-ExtIEs} } OPTIONAL, ... } M3Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } M3period ::= ENUMERATED {ms100, ms1000, ms10000, ... } M4Configuration ::= SEQUENCE { m4period M4period, m4-links-to-log Links-to-log, iE-Extensions ProtocolExtensionContainer { { M4Configuration-ExtIEs} } OPTIONAL, ... } M4Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } M4period ::= ENUMERATED {ms1024, ms2048, ms5120, ms10240, min1, ... } M5Configuration ::= SEQUENCE { m5period M5period, m5-links-to-log Links-to-log, iE-Extensions ProtocolExtensionContainer { { M5Configuration-ExtIEs} } OPTIONAL, ... } M5Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } M5period ::= ENUMERATED {ms1024, ms2048, ms5120, ms10240, min1, ... } M6Configuration ::= SEQUENCE { m6report-Interval M6report-Interval, m6delay-threshold M6delay-threshold OPTIONAL, -- This IE shall be present if the M6 Links to log IE is set to "uplink" or to "both-uplink-and-downlink" -- m6-links-to-log Links-to-log, iE-Extensions ProtocolExtensionContainer { { M6Configuration-ExtIEs} } OPTIONAL, ... } M6Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } M6report-Interval ::= ENUMERATED { ms1024, ms2048, ms5120, ms10240, ... } M6delay-threshold ::= ENUMERATED { ms30, ms40, ms50, ms60, ms70, ms80, ms90, ms100, ms150, ms300, ms500, ms750, ... } M7Configuration ::= SEQUENCE { m7period M7period, m7-links-to-log Links-to-log, iE-Extensions ProtocolExtensionContainer { { M7Configuration-ExtIEs} } OPTIONAL, ... } M7Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } M7period ::= INTEGER(1..60, ...) MDT-Activation ::= ENUMERATED { immediate-MDT-only, immediate-MDT-and-Trace, logged-MDT-only, ..., logged-MBSFN-MDT } MDT-Location-Info ::= BIT STRING (SIZE (8)) MDT-Configuration ::= SEQUENCE { mdt-Activation MDT-Activation, areaScopeOfMDT AreaScopeOfMDT, mDTMode MDTMode, iE-Extensions ProtocolExtensionContainer { { MDT-Configuration-ExtIEs} } OPTIONAL, ... } MDT-Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { { ID id-SignallingBasedMDTPLMNList CRITICALITY ignore EXTENSION MDTPLMNList PRESENCE optional }, ... } ManagementBasedMDTAllowed ::= ENUMERATED {allowed, ...} MBSFN-ResultToLog ::= SEQUENCE (SIZE(1..maxnoofMBSFNAreaMDT)) OF MBSFN-ResultToLogInfo MBSFN-ResultToLogInfo ::= SEQUENCE { mBSFN-AreaId INTEGER (0..255) OPTIONAL, carrierFreq EARFCN, iE-Extensions ProtocolExtensionContainer { { MBSFN-ResultToLogInfo-ExtIEs} } OPTIONAL, ... } MBSFN-ResultToLogInfo-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } MDTPLMNList ::= SEQUENCE (SIZE(1..maxnoofMDTPLMNs)) OF PLMNidentity PrivacyIndicator ::= ENUMERATED { immediate-MDT, logged-MDT, ... } MDTMode ::= CHOICE { immediateMDT ImmediateMDT, loggedMDT LoggedMDT, ..., mDTMode-Extension MDTMode-Extension } MDTMode-Extension ::= ProtocolIE-SingleContainer {{ MDTMode-ExtensionIE }} MDTMode-ExtensionIE S1AP-PROTOCOL-IES ::= { { ID id-LoggedMBSFNMDT CRITICALITY ignore TYPE LoggedMBSFNMDT PRESENCE mandatory} } MeasurementsToActivate ::= BIT STRING (SIZE (8)) MeasurementThresholdA2 ::= CHOICE { threshold-RSRP Threshold-RSRP, threshold-RSRQ Threshold-RSRQ, ... } MessageIdentifier ::= BIT STRING (SIZE (16)) MobilityInformation ::= BIT STRING (SIZE(32)) MMEname ::= PrintableString (SIZE (1..150,...)) MMEPagingTarget ::= CHOICE { global-ENB-ID Global-ENB-ID, tAI TAI, ... } MMERelaySupportIndicator ::= ENUMERATED {true, ...} MME-Group-ID ::= OCTET STRING (SIZE (2)) MME-Code ::= OCTET STRING (SIZE (1)) MME-UE-S1AP-ID ::= INTEGER (0..4294967295) M-TMSI ::= OCTET STRING (SIZE (4)) MSClassmark2 ::= OCTET STRING MSClassmark3 ::= OCTET STRING MutingAvailabilityIndication ::= ENUMERATED { available, unavailable, ... } MutingPatternInformation ::= SEQUENCE { muting-pattern-period ENUMERATED {ms0, ms1280, ms2560, ms5120, ms10240, ...}, muting-pattern-offset INTEGER (0..10239, ...) OPTIONAL, iE-Extensions ProtocolExtensionContainer { {MutingPatternInformation-ExtIEs} } OPTIONAL, ... } MutingPatternInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- N NAS-PDU ::= OCTET STRING NASSecurityParametersfromE-UTRAN ::= OCTET STRING NASSecurityParameterstoE-UTRAN ::= OCTET STRING NB-IoT-DefaultPagingDRX ::= ENUMERATED { v128, v256, v512, v1024, ... } NB-IoT-Paging-eDRXInformation ::= SEQUENCE { nB-IoT-paging-eDRX-Cycle NB-IoT-Paging-eDRX-Cycle, nB-IoT-pagingTimeWindow NB-IoT-PagingTimeWindow OPTIONAL, iE-Extensions ProtocolExtensionContainer { { NB-IoT-Paging-eDRXInformation-ExtIEs} } OPTIONAL, ... } NB-IoT-Paging-eDRXInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } NB-IoT-Paging-eDRX-Cycle ::= ENUMERATED{hf2, hf4, hf6, hf8, hf10, hf12, hf14, hf16, hf32, hf64, hf128, hf256, hf512, hf1024, ...} NB-IoT-PagingTimeWindow ::= ENUMERATED{s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, ...} NB-IoT-UEIdentityIndexValue ::= BIT STRING (SIZE (12)) NextPagingAreaScope ::= ENUMERATED { same, changed, ... } NumberofBroadcastRequest ::= INTEGER (0..65535) NumberOfBroadcasts ::= INTEGER (0..65535) -- O OldBSS-ToNewBSS-Information ::= OCTET STRING -- This is a dummy IE used only as a reference to the actual definition in relevant specification. OverloadAction ::= ENUMERATED { reject-non-emergency-mo-dt, reject-rrc-cr-signalling, permit-emergency-sessions-and-mobile-terminated-services-only, ..., permit-high-priority-sessions-and-mobile-terminated-services-only, reject-delay-tolerant-access, permit-high-priority-sessions-and-exception-reporting-and-mobile-terminated-services-only, not-accept-mo-data-or-delay-tolerant-access-from-CP-CIoT } OverloadResponse ::= CHOICE { overloadAction OverloadAction, ... } -- P PagingAttemptInformation ::= SEQUENCE { pagingAttemptCount PagingAttemptCount, intendedNumberOfPagingAttempts IntendedNumberOfPagingAttempts, nextPagingAreaScope NextPagingAreaScope OPTIONAL, iE-Extensions ProtocolExtensionContainer { { PagingAttemptInformation-ExtIEs} } OPTIONAL, ... } PagingAttemptInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } PagingAttemptCount ::= INTEGER (1..16, ...) Paging-eDRXInformation ::= SEQUENCE { paging-eDRX-Cycle Paging-eDRX-Cycle, pagingTimeWindow PagingTimeWindow OPTIONAL, iE-Extensions ProtocolExtensionContainer { { Paging-eDRXInformation-ExtIEs} } OPTIONAL, ... } Paging-eDRXInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } Paging-eDRX-Cycle ::= ENUMERATED{hfhalf, hf1, hf2, hf4, hf6, hf8, hf10, hf12, hf14, hf16, hf32, hf64, hf128, hf256, ...} PagingTimeWindow ::= ENUMERATED{s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, ...} PagingDRX ::= ENUMERATED { v32, v64, v128, v256, ... } PagingPriority ::= ENUMERATED { priolevel1, priolevel2, priolevel3, priolevel4, priolevel5, priolevel6, priolevel7, priolevel8, ... } PDCP-SN ::= INTEGER (0..4095) PDCP-SNExtended ::= INTEGER (0..32767) PDCP-SNlength18 ::= INTEGER (0..262143) M1PeriodicReporting ::= SEQUENCE { reportInterval ReportIntervalMDT, reportAmount ReportAmountMDT, iE-Extensions ProtocolExtensionContainer { { M1PeriodicReporting-ExtIEs} } OPTIONAL, ... } M1PeriodicReporting-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } PLMNidentity ::= TBCD-STRING Port-Number ::= OCTET STRING (SIZE (2)) Pre-emptionCapability ::= ENUMERATED { shall-not-trigger-pre-emption, may-trigger-pre-emption } Pre-emptionVulnerability ::= ENUMERATED { not-pre-emptable, pre-emptable } PriorityLevel ::= INTEGER { spare (0), highest (1), lowest (14), no-priority (15) } (0..15) ProSeAuthorized ::= SEQUENCE { proSeDirectDiscovery ProSeDirectDiscovery OPTIONAL, proSeDirectCommunication ProSeDirectCommunication OPTIONAL, iE-Extensions ProtocolExtensionContainer { {ProSeAuthorized-ExtIEs} } OPTIONAL, ... } ProSeAuthorized-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { { ID id-ProSeUEtoNetworkRelaying CRITICALITY ignore EXTENSION ProSeUEtoNetworkRelaying PRESENCE optional}, ... } ProSeDirectDiscovery ::= ENUMERATED { authorized, not-authorized, ... } ProSeUEtoNetworkRelaying ::= ENUMERATED { authorized, not-authorized, ... } ProSeDirectCommunication ::= ENUMERATED { authorized, not-authorized, ... } PS-ServiceNotAvailable ::= ENUMERATED { ps-service-not-available, ... } -- Q QCI ::= INTEGER (0..255) -- R ReceiveStatusofULPDCPSDUs ::= BIT STRING (SIZE(4096)) ReceiveStatusOfULPDCPSDUsExtended ::= BIT STRING (SIZE(1..16384)) ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 ::= BIT STRING (SIZE(1..131072)) RecommendedCellsForPaging ::= SEQUENCE { recommendedCellList RecommendedCellList, iE-Extensions ProtocolExtensionContainer { { RecommendedCellsForPaging-ExtIEs} } OPTIONAL, ... } RecommendedCellsForPaging-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } RecommendedCellList ::= SEQUENCE (SIZE(1.. maxnoofRecommendedCells)) OF ProtocolIE-SingleContainer { { RecommendedCellItemIEs } } RecommendedCellItemIEs S1AP-PROTOCOL-IES ::= { { ID id-RecommendedCellItem CRITICALITY ignore TYPE RecommendedCellItem PRESENCE mandatory }, ... } RecommendedCellItem::= SEQUENCE { eUTRAN-CGI EUTRAN-CGI, timeStayedInCell INTEGER (0..4095) OPTIONAL, iE-Extensions ProtocolExtensionContainer { { RecommendedCellsForPagingItem-ExtIEs} } OPTIONAL, ... } RecommendedCellsForPagingItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } RecommendedENBsForPaging ::= SEQUENCE { recommendedENBList RecommendedENBList, iE-Extensions ProtocolExtensionContainer { { RecommendedENBsForPaging-ExtIEs} } OPTIONAL, ... } RecommendedENBsForPaging-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } RecommendedENBList::= SEQUENCE (SIZE(1.. maxnoofRecommendedENBs)) OF ProtocolIE-SingleContainer { { RecommendedENBItemIEs } } RecommendedENBItemIEs S1AP-PROTOCOL-IES ::= { { ID id-RecommendedENBItem CRITICALITY ignore TYPE RecommendedENBItem PRESENCE mandatory }, ... } RecommendedENBItem ::= SEQUENCE { mMEPagingTarget MMEPagingTarget, iE-Extensions ProtocolExtensionContainer { { RecommendedENBItem-ExtIEs} } OPTIONAL, ... } RecommendedENBItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } RelativeMMECapacity ::= INTEGER (0..255) RelayNode-Indicator ::= ENUMERATED { true, ... } RAC ::= OCTET STRING (SIZE (1)) RAT-Type ::= ENUMERATED { nbiot, ... } ReportAmountMDT ::= ENUMERATED{r1, r2, r4, r8, r16, r32, r64, rinfinity} ReportIntervalMDT ::= ENUMERATED {ms120, ms240, ms480, ms640, ms1024, ms2048, ms5120, ms10240, min1, min6, min12, min30, min60} M1ReportingTrigger ::= ENUMERATED{ periodic, a2eventtriggered, ..., a2eventtriggered-periodic } RequestType ::= SEQUENCE { eventType EventType, reportArea ReportArea, iE-Extensions ProtocolExtensionContainer { { RequestType-ExtIEs} } OPTIONAL, ... } RequestType-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } RIMTransfer ::= SEQUENCE { rIMInformation RIMInformation, rIMRoutingAddress RIMRoutingAddress OPTIONAL, iE-Extensions ProtocolExtensionContainer { { RIMTransfer-ExtIEs} } OPTIONAL, ... } RIMTransfer-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } RIMInformation ::= OCTET STRING RIMRoutingAddress ::= CHOICE { gERAN-Cell-ID GERAN-Cell-ID, ..., targetRNC-ID TargetRNC-ID, eHRPD-Sector-ID OCTET STRING (SIZE(16)) } ReportArea ::= ENUMERATED { ecgi, ... } RepetitionPeriod ::= INTEGER (0..4095) RLFReportInformation ::= SEQUENCE { uE-RLF-Report-Container UE-RLF-Report-Container, uE-RLF-Report-Container-for-extended-bands UE-RLF-Report-Container-for-extended-bands OPTIONAL, iE-Extensions ProtocolExtensionContainer {{ RLFReportInformation-ExtIEs}} OPTIONAL, ... } RLFReportInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } RNC-ID ::= INTEGER (0..4095) RRC-Container ::= OCTET STRING RRC-Establishment-Cause ::= ENUMERATED { emergency, highPriorityAccess, mt-Access, mo-Signalling, mo-Data, ..., delay-TolerantAccess, mo-VoiceCall, mo-ExceptionData } ECGIListForRestart ::= SEQUENCE (SIZE(1..maxnoofCellsforRestart)) OF EUTRAN-CGI Routing-ID ::= INTEGER (0..255) -- S SecurityKey ::= BIT STRING (SIZE(256)) SecurityContext ::= SEQUENCE { nextHopChainingCount INTEGER (0..7), nextHopParameter SecurityKey, iE-Extensions ProtocolExtensionContainer { { SecurityContext-ExtIEs} } OPTIONAL, ... } SecurityContext-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } SerialNumber ::= BIT STRING (SIZE (16)) SONInformation ::= CHOICE{ sONInformationRequest SONInformationRequest, sONInformationReply SONInformationReply, ..., sONInformation-Extension SONInformation-Extension } SONInformation-Extension ::= ProtocolIE-SingleContainer {{ SONInformation-ExtensionIE }} SONInformation-ExtensionIE S1AP-PROTOCOL-IES ::= { { ID id-SON-Information-Report CRITICALITY ignore TYPE SONInformationReport PRESENCE mandatory} } SONInformationRequest ::= ENUMERATED { x2TNL-Configuration-Info, ..., time-Synchronisation-Info, activate-Muting, deactivate-Muting} SONInformationReply ::= SEQUENCE { x2TNLConfigurationInfo X2TNLConfigurationInfo OPTIONAL, iE-Extensions ProtocolExtensionContainer {{SONInformationReply-ExtIEs}} OPTIONAL, ... } SONInformationReply-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { -- Extension for Release 9 to transfer Time synchronisation information -- {ID id-Time-Synchronisation-Info CRITICALITY ignore EXTENSION TimeSynchronisationInfo PRESENCE optional}, ..., {ID id-Muting-Pattern-Information CRITICALITY ignore EXTENSION MutingPatternInformation PRESENCE optional} } SONInformationReport ::= CHOICE{ rLFReportInformation RLFReportInformation, ... } SONConfigurationTransfer ::= SEQUENCE { targeteNB-ID TargeteNB-ID, sourceeNB-ID SourceeNB-ID, sONInformation SONInformation, iE-Extensions ProtocolExtensionContainer { { SONConfigurationTransfer-ExtIEs} } OPTIONAL, ... } SONConfigurationTransfer-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { -- Extension for Release 10 to transfer the IP addresses of the eNB initiating the ANR action -- {ID id-x2TNLConfigurationInfo CRITICALITY ignore EXTENSION X2TNLConfigurationInfo PRESENCE conditional -- This IE shall be present if the SON Information IE contains the SON Information Request IE and the SON Information Request IE is set to "X2TNL Configuration Info" --}| -- Extension for Release 12 to transfer information concerning the source cell of synchronisation and the aggressor cell -- {ID id-Synchronisation-Information CRITICALITY ignore EXTENSION SynchronisationInformation PRESENCE conditional -- This IE shall be present if the SON Information IE contains the SON Information Request IE set to " Activate Muting " --}, ... } SynchronisationInformation ::= SEQUENCE { sourceStratumLevel StratumLevel OPTIONAL, listeningSubframePattern ListeningSubframePattern OPTIONAL, aggressoreCGI-List ECGI-List OPTIONAL, iE-Extensions ProtocolExtensionContainer { {SynchronisationInformation-ExtIEs} } OPTIONAL, ... } SynchronisationInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } Source-ToTarget-TransparentContainer ::= OCTET STRING -- This IE includes a transparent container from the source RAN node to the target RAN node. -- The octets of the OCTET STRING are encoded according to the specifications of the target system. SourceBSS-ToTargetBSS-TransparentContainer ::= OCTET STRING -- This is a dummy IE used only as a reference to the actual definition in relevant specification. SourceeNB-ID ::= SEQUENCE { global-ENB-ID Global-ENB-ID, selected-TAI TAI, iE-Extensions ProtocolExtensionContainer { {SourceeNB-ID-ExtIEs} } OPTIONAL } SourceeNB-ID-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } SRVCCOperationNotPossible ::= ENUMERATED { notPossible, ... } SRVCCOperationPossible ::= ENUMERATED { possible, ... } SRVCCHOIndication ::= ENUMERATED { pSandCS, cSonly, ... } SourceeNB-ToTargeteNB-TransparentContainer ::= SEQUENCE { rRC-Container RRC-Container, e-RABInformationList E-RABInformationList OPTIONAL, targetCell-ID EUTRAN-CGI, subscriberProfileIDforRFP SubscriberProfileIDforRFP OPTIONAL, uE-HistoryInformation UE-HistoryInformation, iE-Extensions ProtocolExtensionContainer { {SourceeNB-ToTargeteNB-TransparentContainer-ExtIEs} } OPTIONAL, ... } SourceeNB-ToTargeteNB-TransparentContainer-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { {ID id-MobilityInformation CRITICALITY ignore EXTENSION MobilityInformation PRESENCE optional}| {ID id-uE-HistoryInformationFromTheUE CRITICALITY ignore EXTENSION UE-HistoryInformationFromTheUE PRESENCE optional}, ... } SourceRNC-ToTargetRNC-TransparentContainer ::= OCTET STRING -- This is a dummy IE used only as a reference to the actual definition in relevant specification. ServedGUMMEIs ::= SEQUENCE (SIZE (1.. maxnoofRATs)) OF ServedGUMMEIsItem ServedGUMMEIsItem ::= SEQUENCE { servedPLMNs ServedPLMNs, servedGroupIDs ServedGroupIDs, servedMMECs ServedMMECs, iE-Extensions ProtocolExtensionContainer { {ServedGUMMEIsItem-ExtIEs} } OPTIONAL, ... } ServedGUMMEIsItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } ServedGroupIDs ::= SEQUENCE (SIZE(1.. maxnoofGroupIDs)) OF MME-Group-ID ServedMMECs ::= SEQUENCE (SIZE(1.. maxnoofMMECs)) OF MME-Code ServedPLMNs ::= SEQUENCE (SIZE(1.. maxnoofPLMNsPerMME)) OF PLMNidentity SubscriberProfileIDforRFP ::= INTEGER (1..256) SupportedTAs ::= SEQUENCE (SIZE(1.. maxnoofTACs)) OF SupportedTAs-Item SupportedTAs-Item ::= SEQUENCE { tAC TAC, broadcastPLMNs BPLMNs, iE-Extensions ProtocolExtensionContainer { {SupportedTAs-Item-ExtIEs} } OPTIONAL, ... } SupportedTAs-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { -- Extension for Release 13 to transfer RAT-Type per TAC -- {ID id-RAT-Type CRITICALITY reject EXTENSION RAT-Type PRESENCE optional}, ... } StratumLevel ::= INTEGER (0..3, ...) SynchronisationStatus ::= ENUMERATED { synchronous, asynchronous, ... } TimeSynchronisationInfo ::= SEQUENCE { stratumLevel StratumLevel, synchronisationStatus SynchronisationStatus, iE-Extensions ProtocolExtensionContainer { { TimeSynchronisationInfo-ExtIEs} } OPTIONAL, ... } TimeSynchronisationInfo-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { -- Extension for Release 12 to transfer Muting Availability Indication -- {ID id-Muting-Availability-Indication CRITICALITY ignore EXTENSION MutingAvailabilityIndication PRESENCE optional}, ... } S-TMSI ::= SEQUENCE { mMEC MME-Code, m-TMSI M-TMSI, iE-Extensions ProtocolExtensionContainer { {S-TMSI-ExtIEs} } OPTIONAL, ... } S-TMSI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- T TAC ::= OCTET STRING (SIZE (2)) TAIBasedMDT ::= SEQUENCE { tAIListforMDT TAIListforMDT, iE-Extensions ProtocolExtensionContainer { {TAIBasedMDT-ExtIEs} } OPTIONAL, ... } TAIBasedMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } TAIListforMDT ::= SEQUENCE (SIZE(1..maxnoofTAforMDT)) OF TAI TAIListforWarning ::= SEQUENCE (SIZE(1..maxnoofTAIforWarning)) OF TAI TAI ::= SEQUENCE { pLMNidentity PLMNidentity, tAC TAC, iE-Extensions ProtocolExtensionContainer { {TAI-ExtIEs} } OPTIONAL, ... } TAI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } TAI-Broadcast ::= SEQUENCE (SIZE(1..maxnoofTAIforWarning)) OF TAI-Broadcast-Item TAI-Broadcast-Item ::= SEQUENCE { tAI TAI, completedCellinTAI CompletedCellinTAI, iE-Extensions ProtocolExtensionContainer { {TAI-Broadcast-Item-ExtIEs} } OPTIONAL, ... } TAI-Broadcast-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } TAI-Cancelled ::= SEQUENCE (SIZE(1..maxnoofTAIforWarning)) OF TAI-Cancelled-Item TAI-Cancelled-Item ::= SEQUENCE { tAI TAI, cancelledCellinTAI CancelledCellinTAI, iE-Extensions ProtocolExtensionContainer { {TAI-Cancelled-Item-ExtIEs} } OPTIONAL, ... } TAI-Cancelled-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } TABasedMDT ::= SEQUENCE { tAListforMDT TAListforMDT, iE-Extensions ProtocolExtensionContainer { {TABasedMDT-ExtIEs} } OPTIONAL, ... } TABasedMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } TAListforMDT ::= SEQUENCE (SIZE(1..maxnoofTAforMDT)) OF TAC CompletedCellinTAI ::= SEQUENCE (SIZE(1..maxnoofCellinTAI)) OF CompletedCellinTAI-Item CompletedCellinTAI-Item ::= SEQUENCE{ eCGI EUTRAN-CGI, iE-Extensions ProtocolExtensionContainer { {CompletedCellinTAI-Item-ExtIEs} } OPTIONAL, ... } CompletedCellinTAI-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } TBCD-STRING ::= OCTET STRING (SIZE (3)) TargetID ::= CHOICE { targeteNB-ID TargeteNB-ID, targetRNC-ID TargetRNC-ID, cGI CGI, ... } TargeteNB-ID ::= SEQUENCE { global-ENB-ID Global-ENB-ID, selected-TAI TAI, iE-Extensions ProtocolExtensionContainer { {TargeteNB-ID-ExtIEs} } OPTIONAL, ... } TargeteNB-ID-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } TargetRNC-ID ::= SEQUENCE { lAI LAI, rAC RAC OPTIONAL, rNC-ID RNC-ID, extendedRNC-ID ExtendedRNC-ID OPTIONAL, iE-Extensions ProtocolExtensionContainer { {TargetRNC-ID-ExtIEs} } OPTIONAL, ... } TargetRNC-ID-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } TargeteNB-ToSourceeNB-TransparentContainer ::= SEQUENCE { rRC-Container RRC-Container, iE-Extensions ProtocolExtensionContainer { {TargeteNB-ToSourceeNB-TransparentContainer-ExtIEs} } OPTIONAL, ... } TargeteNB-ToSourceeNB-TransparentContainer-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } Target-ToSource-TransparentContainer ::= OCTET STRING -- This IE includes a transparent container from the target RAN node to the source RAN node. -- The octets of the OCTET STRING are coded according to the specifications of the target system. TargetRNC-ToSourceRNC-TransparentContainer ::= OCTET STRING -- This is a dummy IE used only as a reference to the actual definition in relevant specification. TargetBSS-ToSourceBSS-TransparentContainer ::= OCTET STRING -- This is a dummy IE used only as a reference to the actual definition in relevant specification. M1ThresholdEventA2 ::= SEQUENCE { measurementThreshold MeasurementThresholdA2, iE-Extensions ProtocolExtensionContainer { { M1ThresholdEventA2-ExtIEs} } OPTIONAL, ... } M1ThresholdEventA2-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } Threshold-RSRP ::= INTEGER(0..97) Threshold-RSRQ ::= INTEGER(0..34) TimeToWait ::= ENUMERATED {v1s, v2s, v5s, v10s, v20s, v60s, ...} Time-UE-StayedInCell ::= INTEGER (0..4095) Time-UE-StayedInCell-EnhancedGranularity ::= INTEGER (0..40950) TransportInformation ::= SEQUENCE { transportLayerAddress TransportLayerAddress, uL-GTP-TEID GTP-TEID, ... } TransportLayerAddress ::= BIT STRING (SIZE(1..160, ...)) TraceActivation ::= SEQUENCE { e-UTRAN-Trace-ID E-UTRAN-Trace-ID, interfacesToTrace InterfacesToTrace, traceDepth TraceDepth, traceCollectionEntityIPAddress TransportLayerAddress, iE-Extensions ProtocolExtensionContainer { { TraceActivation-ExtIEs} } OPTIONAL, ... } TraceActivation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { -- Extension for Rel-10 to support MDT -- { ID id-MDTConfiguration CRITICALITY ignore EXTENSION MDT-Configuration PRESENCE optional }, ... } TraceDepth ::= ENUMERATED { minimum, medium, maximum, minimumWithoutVendorSpecificExtension, mediumWithoutVendorSpecificExtension, maximumWithoutVendorSpecificExtension, ... } E-UTRAN-Trace-ID ::= OCTET STRING (SIZE (8)) TrafficLoadReductionIndication ::= INTEGER (1..99) TunnelInformation ::= SEQUENCE { transportLayerAddress TransportLayerAddress, uDP-Port-Number Port-Number OPTIONAL, iE-Extensions ProtocolExtensionContainer { {Tunnel-Information-ExtIEs} } OPTIONAL, ... } Tunnel-Information-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } TypeOfError ::= ENUMERATED { not-understood, missing, ... } TAIListForRestart ::= SEQUENCE (SIZE(1..maxnoofRestartTAIs)) OF TAI -- U UEAggregateMaximumBitrate ::= SEQUENCE { uEaggregateMaximumBitRateDL BitRate, uEaggregateMaximumBitRateUL BitRate, iE-Extensions ProtocolExtensionContainer { {UEAggregate-MaximumBitrates-ExtIEs} } OPTIONAL, ... } UEAggregate-MaximumBitrates-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } UE-RetentionInformation ::= ENUMERATED { ues-retained, ...} UE-S1AP-IDs ::= CHOICE{ uE-S1AP-ID-pair UE-S1AP-ID-pair, mME-UE-S1AP-ID MME-UE-S1AP-ID, ... } UE-S1AP-ID-pair ::= SEQUENCE{ mME-UE-S1AP-ID MME-UE-S1AP-ID, eNB-UE-S1AP-ID ENB-UE-S1AP-ID, iE-Extensions ProtocolExtensionContainer { {UE-S1AP-ID-pair-ExtIEs} } OPTIONAL, ... } UE-S1AP-ID-pair-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } UE-associatedLogicalS1-ConnectionItem ::= SEQUENCE { mME-UE-S1AP-ID MME-UE-S1AP-ID OPTIONAL, eNB-UE-S1AP-ID ENB-UE-S1AP-ID OPTIONAL, iE-Extensions ProtocolExtensionContainer { { UE-associatedLogicalS1-ConnectionItemExtIEs} } OPTIONAL, ... } UE-associatedLogicalS1-ConnectionItemExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } UEIdentityIndexValue ::= BIT STRING (SIZE (10)) UE-HistoryInformation ::= SEQUENCE (SIZE(1..maxnoofCells)) OF LastVisitedCell-Item UE-HistoryInformationFromTheUE ::= OCTET STRING -- This IE is a transparent container and shall be encoded as the VisitedCellInfoList field contained in the UEInformationResponse message as defined in TS 36.331 [16] UEPagingID ::= CHOICE { s-TMSI S-TMSI, iMSI IMSI, ... } UERadioCapability ::= OCTET STRING UERadioCapabilityForPaging ::= OCTET STRING UE-RLF-Report-Container ::= OCTET STRING -- This IE is a transparent container and shall be encoded as the rlf-Report-r9 field contained in the UEInformationResponse message as defined in TS 36.331 [16] UE-RLF-Report-Container-for-extended-bands ::= OCTET STRING -- This IE is a transparent container and shall be encoded as the rlf-Report-v9e0 contained in the UEInformationResponse message as defined in TS 36.331 [16] UESecurityCapabilities ::= SEQUENCE { encryptionAlgorithms EncryptionAlgorithms, integrityProtectionAlgorithms IntegrityProtectionAlgorithms, iE-Extensions ProtocolExtensionContainer { { UESecurityCapabilities-ExtIEs} } OPTIONAL, ... } UESecurityCapabilities-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } UESidelinkAggregateMaximumBitrate ::= SEQUENCE { uESidelinkAggregateMaximumBitRate BitRate, iE-Extensions ProtocolExtensionContainer { {UE-Sidelink-Aggregate-MaximumBitrates-ExtIEs} } OPTIONAL, ... } UE-Sidelink-Aggregate-MaximumBitrates-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } UE-Usage-Type ::= INTEGER (0..255) UL-CP-SecurityInformation ::= SEQUENCE { ul-NAS-MAC UL-NAS-MAC, ul-NAS-Count UL-NAS-Count, iE-Extensions ProtocolExtensionContainer { { UL-CP-SecurityInformation-ExtIEs} } OPTIONAL, ... } UL-CP-SecurityInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } UL-NAS-MAC ::= BIT STRING (SIZE (16)) UL-NAS-Count ::= BIT STRING (SIZE (5)) UserLocationInformation ::= SEQUENCE { eutran-cgi EUTRAN-CGI, tai TAI, iE-Extensions ProtocolExtensionContainer { { UserLocationInformation-ExtIEs} } OPTIONAL, ... } UserLocationInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } UEUserPlaneCIoTSupportIndicator ::= ENUMERATED { supported, ... } -- V VoiceSupportMatchIndicator ::= ENUMERATED { supported, not-supported, ... } V2XServicesAuthorized ::= SEQUENCE { vehicleUE VehicleUE OPTIONAL, pedestrianUE PedestrianUE OPTIONAL, iE-Extensions ProtocolExtensionContainer { {V2XServicesAuthorized-ExtIEs} } OPTIONAL, ... } V2XServicesAuthorized-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } VehicleUE ::= ENUMERATED { authorized, not-authorized, ... } PedestrianUE ::= ENUMERATED { authorized, not-authorized, ... } -- W WarningAreaList ::= CHOICE { cellIDList ECGIList, trackingAreaListforWarning TAIListforWarning, emergencyAreaIDList EmergencyAreaIDList, ... } WarningType ::= OCTET STRING (SIZE (2)) WarningSecurityInfo ::= OCTET STRING (SIZE (50)) WarningMessageContents ::= OCTET STRING (SIZE(1..9600)) -- X X2TNLConfigurationInfo ::= SEQUENCE { eNBX2TransportLayerAddresses ENBX2TLAs, iE-Extensions ProtocolExtensionContainer { { X2TNLConfigurationInfo-ExtIEs} } OPTIONAL, ... } X2TNLConfigurationInfo-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { -- Extension for Release 10 to transfer the IPsec and U-plane addresses during ANR action -- {ID id-eNBX2ExtendedTransportLayerAddresses CRITICALITY ignore EXTENSION ENBX2ExtTLAs PRESENCE optional}| -- Extension for Release 12 to transfer the IP addresses of the X2 GW -- {ID id-eNBIndirectX2TransportLayerAddresses CRITICALITY ignore EXTENSION ENBIndirectX2TransportLayerAddresses PRESENCE optional}, ... } ENBX2ExtTLAs ::= SEQUENCE (SIZE(1.. maxnoofeNBX2ExtTLAs)) OF ENBX2ExtTLA ENBX2ExtTLA ::= SEQUENCE { iPsecTLA TransportLayerAddress OPTIONAL, gTPTLAa ENBX2GTPTLAs OPTIONAL, iE-Extensions ProtocolExtensionContainer { { ENBX2ExtTLA-ExtIEs} } OPTIONAL, ... } ENBX2ExtTLA-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } ENBX2GTPTLAs ::= SEQUENCE (SIZE(1.. maxnoofeNBX2GTPTLAs)) OF TransportLayerAddress ENBIndirectX2TransportLayerAddresses ::= SEQUENCE (SIZE(1..maxnoofeNBX2TLAs)) OF TransportLayerAddress -- Y -- Z END -- ************************************************************** -- -- 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) ProtocolExtensionID ::= INTEGER (0..65535) ProtocolIE-ID ::= INTEGER (0..65535) TriggeringMessage ::= ENUMERATED { initiating-message, successful-outcome, unsuccessfull-outcome } END -- ************************************************************** -- -- 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-DownlinkS1cdma2000tunnelling ProcedureCode ::= 19 id-UplinkS1cdma2000tunnelling 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 id-UERadioCapabilityMatch ProcedureCode ::= 48 id-PWSRestartIndication ProcedureCode ::= 49 id-E-RABModificationIndication ProcedureCode ::= 50 id-PWSFailureIndication ProcedureCode ::= 51 id-RerouteNASRequest ProcedureCode ::= 52 id-UEContextModificationIndication ProcedureCode ::= 53 id-ConnectionEstablishmentIndication ProcedureCode ::= 54 id-UEContextSuspend ProcedureCode ::= 55 id-UEContextResume ProcedureCode ::= 56 id-NASDeliveryIndication ProcedureCode ::= 57 id-RetrieveUEInformation ProcedureCode ::= 58 id-UEInformationTransfer ProcedureCode ::= 59 id-eNBCPRelocationIndication ProcedureCode ::= 60 id-MMECPRelocationIndication ProcedureCode ::= 61 -- ************************************************************** -- -- Extension constants -- -- ************************************************************** maxPrivateIEs INTEGER ::= 65535 maxProtocolExtensions INTEGER ::= 65535 maxProtocolIEs INTEGER ::= 65535 -- ************************************************************** -- -- Lists -- -- ************************************************************** maxnoofCSGs INTEGER ::= 256 maxnoofE-RABs INTEGER ::= 256 maxnoofTAIs INTEGER ::= 256 maxnoofTACs INTEGER ::= 256 maxnoofErrors INTEGER ::= 256 maxnoofBPLMNs INTEGER ::= 6 maxnoofPLMNsPerMME INTEGER ::= 32 maxnoofEPLMNs INTEGER ::= 15 maxnoofEPLMNsPlusOne INTEGER ::= 16 maxnoofForbLACs INTEGER ::= 4096 maxnoofForbTACs INTEGER ::= 4096 maxnoofIndividualS1ConnectionsToReset INTEGER ::= 256 maxnoofCells INTEGER ::= 16 maxnoofCellsineNB INTEGER ::= 256 maxnoofTAIforWarning INTEGER ::= 65535 maxnoofCellID INTEGER ::= 65535 maxnoofDCNs INTEGER ::= 32 maxnoofEmergencyAreaID INTEGER ::= 65535 maxnoofCellinTAI INTEGER ::= 65535 maxnoofCellinEAI INTEGER ::= 65535 maxnoofeNBX2TLAs INTEGER ::= 2 maxnoofeNBX2ExtTLAs INTEGER ::= 16 maxnoofeNBX2GTPTLAs INTEGER ::= 16 maxnoofRATs INTEGER ::= 8 maxnoofGroupIDs INTEGER ::= 65535 maxnoofMMECs INTEGER ::= 256 maxnoofCellIDforMDT INTEGER ::= 32 maxnoofTAforMDT INTEGER ::= 8 maxnoofMDTPLMNs INTEGER ::= 16 maxnoofCellsforRestart INTEGER ::= 256 maxnoofRestartTAIs INTEGER ::= 2048 maxnoofRestartEmergencyAreaIDs INTEGER ::= 256 maxEARFCN INTEGER ::= 262143 maxnoofMBSFNAreaMDT INTEGER ::= 8 maxnoofRecommendedCells INTEGER ::= 16 maxnoofRecommendedENBs INTEGER ::= 16 -- ************************************************************** -- -- 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-Synchronisation-Info ProtocolIE-ID ::= 149 id-PS-ServiceNotAvailable ProtocolIE-ID ::= 150 id-PagingPriority ProtocolIE-ID ::= 151 id-x2TNLConfigurationInfo ProtocolIE-ID ::= 152 id-eNBX2ExtendedTransportLayerAddresses ProtocolIE-ID ::= 153 id-GUMMEIList ProtocolIE-ID ::= 154 id-GW-TransportLayerAddress ProtocolIE-ID ::= 155 id-Correlation-ID ProtocolIE-ID ::= 156 id-SourceMME-GUMMEI ProtocolIE-ID ::= 157 id-MME-UE-S1AP-ID-2 ProtocolIE-ID ::= 158 id-RegisteredLAI ProtocolIE-ID ::= 159 id-RelayNode-Indicator ProtocolIE-ID ::= 160 id-TrafficLoadReductionIndication ProtocolIE-ID ::= 161 id-MDTConfiguration ProtocolIE-ID ::= 162 id-MMERelaySupportIndicator ProtocolIE-ID ::= 163 id-GWContextReleaseIndication ProtocolIE-ID ::= 164 id-ManagementBasedMDTAllowed ProtocolIE-ID ::= 165 id-PrivacyIndicator ProtocolIE-ID ::= 166 id-Time-UE-StayedInCell-EnhancedGranularity ProtocolIE-ID ::= 167 id-HO-Cause ProtocolIE-ID ::= 168 id-VoiceSupportMatchIndicator ProtocolIE-ID ::= 169 id-GUMMEIType ProtocolIE-ID ::= 170 id-M3Configuration ProtocolIE-ID ::= 171 id-M4Configuration ProtocolIE-ID ::= 172 id-M5Configuration ProtocolIE-ID ::= 173 id-MDT-Location-Info ProtocolIE-ID ::= 174 id-MobilityInformation ProtocolIE-ID ::= 175 id-Tunnel-Information-for-BBF ProtocolIE-ID ::= 176 id-ManagementBasedMDTPLMNList ProtocolIE-ID ::= 177 id-SignallingBasedMDTPLMNList ProtocolIE-ID ::= 178 id-ULCOUNTValueExtended ProtocolIE-ID ::= 179 id-DLCOUNTValueExtended ProtocolIE-ID ::= 180 id-ReceiveStatusOfULPDCPSDUsExtended ProtocolIE-ID ::= 181 id-ECGIListForRestart ProtocolIE-ID ::= 182 id-SIPTO-Correlation-ID ProtocolIE-ID ::= 183 id-SIPTO-L-GW-TransportLayerAddress ProtocolIE-ID ::= 184 id-TransportInformation ProtocolIE-ID ::= 185 id-LHN-ID ProtocolIE-ID ::= 186 id-AdditionalCSFallbackIndicator ProtocolIE-ID ::= 187 id-TAIListForRestart ProtocolIE-ID ::= 188 id-UserLocationInformation ProtocolIE-ID ::= 189 id-EmergencyAreaIDListForRestart ProtocolIE-ID ::= 190 id-KillAllWarningMessages ProtocolIE-ID ::= 191 id-Masked-IMEISV ProtocolIE-ID ::= 192 id-eNBIndirectX2TransportLayerAddresses ProtocolIE-ID ::= 193 id-uE-HistoryInformationFromTheUE ProtocolIE-ID ::= 194 id-ProSeAuthorized ProtocolIE-ID ::= 195 id-ExpectedUEBehaviour ProtocolIE-ID ::= 196 id-LoggedMBSFNMDT ProtocolIE-ID ::= 197 id-UERadioCapabilityForPaging ProtocolIE-ID ::= 198 id-E-RABToBeModifiedListBearerModInd ProtocolIE-ID ::= 199 id-E-RABToBeModifiedItemBearerModInd ProtocolIE-ID ::= 200 id-E-RABNotToBeModifiedListBearerModInd ProtocolIE-ID ::= 201 id-E-RABNotToBeModifiedItemBearerModInd ProtocolIE-ID ::= 202 id-E-RABModifyListBearerModConf ProtocolIE-ID ::= 203 id-E-RABModifyItemBearerModConf ProtocolIE-ID ::= 204 id-E-RABFailedToModifyListBearerModConf ProtocolIE-ID ::= 205 id-SON-Information-Report ProtocolIE-ID ::= 206 id-Muting-Availability-Indication ProtocolIE-ID ::= 207 id-Muting-Pattern-Information ProtocolIE-ID ::= 208 id-Synchronisation-Information ProtocolIE-ID ::= 209 id-E-RABToBeReleasedListBearerModConf ProtocolIE-ID ::= 210 id-AssistanceDataForPaging ProtocolIE-ID ::= 211 id-CellIdentifierAndCELevelForCECapableUEs ProtocolIE-ID ::= 212 id-InformationOnRecommendedCellsAndENBsForPaging ProtocolIE-ID ::= 213 id-RecommendedCellItem ProtocolIE-ID ::= 214 id-RecommendedENBItem ProtocolIE-ID ::= 215 id-ProSeUEtoNetworkRelaying ProtocolIE-ID ::= 216 id-ULCOUNTValuePDCP-SNlength18 ProtocolIE-ID ::= 217 id-DLCOUNTValuePDCP-SNlength18 ProtocolIE-ID ::= 218 id-ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 ProtocolIE-ID ::= 219 id-M6Configuration ProtocolIE-ID ::= 220 id-M7Configuration ProtocolIE-ID ::= 221 id-PWSfailedECGIList ProtocolIE-ID ::= 222 id-MME-Group-ID ProtocolIE-ID ::= 223 id-Additional-GUTI ProtocolIE-ID ::= 224 id-S1-Message ProtocolIE-ID ::= 225 id-CSGMembershipInfo ProtocolIE-ID ::= 226 id-Paging-eDRXInformation ProtocolIE-ID ::= 227 id-UE-RetentionInformation ProtocolIE-ID ::= 228 id-UE-Usage-Type ProtocolIE-ID ::= 230 id-extended-UEIdentityIndexValue ProtocolIE-ID ::= 231 id-RAT-Type ProtocolIE-ID ::= 232 id-BearerType ProtocolIE-ID ::= 233 id-NB-IoT-DefaultPagingDRX ProtocolIE-ID ::= 234 id-E-RABFailedToResumeListResumeReq ProtocolIE-ID ::= 235 id-E-RABFailedToResumeItemResumeReq ProtocolIE-ID ::= 236 id-E-RABFailedToResumeListResumeRes ProtocolIE-ID ::= 237 id-E-RABFailedToResumeItemResumeRes ProtocolIE-ID ::= 238 id-NB-IoT-Paging-eDRXInformation ProtocolIE-ID ::= 239 id-V2XServicesAuthorized ProtocolIE-ID ::= 240 id-UEUserPlaneCIoTSupportIndicator ProtocolIE-ID ::= 241 id-CE-mode-B-SupportIndicator ProtocolIE-ID ::= 242 id-SRVCCOperationNotPossible ProtocolIE-ID ::= 243 id-NB-IoT-UEIdentityIndexValue ProtocolIE-ID ::= 244 id-RRC-Resume-Cause ProtocolIE-ID ::= 245 id-DCN-ID ProtocolIE-ID ::= 246 id-ServedDCNs ProtocolIE-ID ::= 247 id-UESidelinkAggregateMaximumBitrate ProtocolIE-ID ::= 248 id-DLNASPDUDeliveryAckRequest ProtocolIE-ID ::= 249 id-Coverage-Level ProtocolIE-ID ::= 250 id-EnhancedCoverageRestricted ProtocolIE-ID ::= 251 id-UE-Level-QoS-Parameters ProtocolIE-ID ::= 252 id-DL-CP-SecurityInformation ProtocolIE-ID ::= 253 id-UL-CP-SecurityInformation ProtocolIE-ID ::= 254 END -- ************************************************************** -- -- 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 nextepc-0.3.10/lib/s1ap/support/r14.4.0/36413-e40.txt000066400000000000000000006575421333553357400211420ustar00rootroot00000000000000 9.3.2 Elementary Procedure Definitions -- ************************************************************** -- -- 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, DownlinkS1cdma2000tunnelling, 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-RABModificationIndication, E-RABModificationConfirm, E-RABReleaseCommand, E-RABReleaseResponse, E-RABReleaseIndication, E-RABSetupRequest, E-RABSetupResponse, TraceFailureIndication, TraceStart, UECapabilityInfoIndication, UEContextModificationFailure, UEContextModificationRequest, UEContextModificationResponse, UEContextReleaseCommand, UEContextReleaseComplete, UEContextReleaseRequest, UERadioCapabilityMatchRequest, UERadioCapabilityMatchResponse, UplinkUEAssociatedLPPaTransport, UplinkNASTransport, UplinkNonUEAssociatedLPPaTransport, UplinkS1cdma2000tunnelling, WriteReplaceWarningRequest, WriteReplaceWarningResponse, ENBConfigurationTransfer, MMEConfigurationTransfer, PWSRestartIndication, UEContextModificationIndication, UEContextModificationConfirm, RerouteNASRequest, PWSFailureIndication, UEContextSuspendRequest, UEContextSuspendResponse, UEContextResumeRequest, UEContextResumeResponse, UEContextResumeFailure, ConnectionEstablishmentIndication, NASDeliveryIndication, RetrieveUEInformation, UEInformationTransfer, ENBCPRelocationIndication, MMECPRelocationIndication FROM S1AP-PDU-Contents id-CellTrafficTrace, id-DeactivateTrace, id-downlinkUEAssociatedLPPaTransport, id-downlinkNASTransport, id-downlinkNonUEAssociatedLPPaTransport, id-DownlinkS1cdma2000tunnelling, 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-RABModificationIndication, id-E-RABRelease, id-E-RABReleaseIndication, id-E-RABSetup, id-TraceFailureIndication, id-TraceStart, id-UECapabilityInfoIndication, id-UEContextModification, id-UEContextRelease, id-UEContextReleaseRequest, id-UERadioCapabilityMatch, id-uplinkUEAssociatedLPPaTransport, id-uplinkNASTransport, id-uplinkNonUEAssociatedLPPaTransport, id-UplinkS1cdma2000tunnelling, id-WriteReplaceWarning, id-eNBConfigurationTransfer, id-MMEConfigurationTransfer, id-PWSRestartIndication, id-UEContextModificationIndication, id-RerouteNASRequest, id-PWSFailureIndication, id-UEContextSuspend, id-UEContextResume, id-ConnectionEstablishmentIndication, id-NASDeliveryIndication, id-RetrieveUEInformation, id-UEInformationTransfer, id-eNBCPRelocationIndication, id-MMECPRelocationIndication 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 , ..., uERadioCapabilityMatch | e-RABModificationIndication | uEContextModificationIndication | uEContextSuspend | uEContextResume } S1AP-ELEMENTARY-PROCEDURES-CLASS-2 S1AP-ELEMENTARY-PROCEDURE ::= { handoverNotification | e-RABReleaseIndication | paging | downlinkNASTransport | initialUEMessage | uplinkNASTransport | errorIndication | nASNonDeliveryIndication | uEContextReleaseRequest | downlinkS1cdma2000tunnelling | uplinkS1cdma2000tunnelling | uECapabilityInfoIndication | eNBStatusTransfer | mMEStatusTransfer | deactivateTrace | traceStart | traceFailureIndication | cellTrafficTrace | locationReportingControl | locationReportingFailureIndication | locationReport | overloadStart | overloadStop | eNBDirectInformationTransfer | mMEDirectInformationTransfer | eNBConfigurationTransfer | mMEConfigurationTransfer | privateMessage , ..., downlinkUEAssociatedLPPaTransport | uplinkUEAssociatedLPPaTransport | downlinkNonUEAssociatedLPPaTransport | uplinkNonUEAssociatedLPPaTransport | pWSRestartIndication | rerouteNASRequest | pWSFailureIndication | connectionEstablishmentIndication | nASDeliveryIndication | retrieveUEInformation | uEInformationTransfer | eNBCPRelocationIndication | mMECPRelocationIndication } -- ************************************************************** -- -- 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 } downlinkS1cdma2000tunnelling S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE DownlinkS1cdma2000tunnelling PROCEDURE CODE id-DownlinkS1cdma2000tunnelling CRITICALITY ignore } uplinkS1cdma2000tunnelling S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE UplinkS1cdma2000tunnelling PROCEDURE CODE id-UplinkS1cdma2000tunnelling 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 } pWSRestartIndication S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE PWSRestartIndication PROCEDURE CODE id-PWSRestartIndication 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 } uERadioCapabilityMatch S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE UERadioCapabilityMatchRequest SUCCESSFUL OUTCOME UERadioCapabilityMatchResponse PROCEDURE CODE id-UERadioCapabilityMatch CRITICALITY reject } e-RABModificationIndication S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE E-RABModificationIndication SUCCESSFUL OUTCOME E-RABModificationConfirm PROCEDURE CODE id-E-RABModificationIndication CRITICALITY reject } uEContextModificationIndication S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE UEContextModificationIndication SUCCESSFUL OUTCOME UEContextModificationConfirm PROCEDURE CODE id-UEContextModificationIndication CRITICALITY reject } rerouteNASRequest S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE RerouteNASRequest PROCEDURE CODE id-RerouteNASRequest CRITICALITY reject } pWSFailureIndication S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE PWSFailureIndication PROCEDURE CODE id-PWSFailureIndication CRITICALITY ignore } uEContextSuspend S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE UEContextSuspendRequest SUCCESSFUL OUTCOME UEContextSuspendResponse PROCEDURE CODE id-UEContextSuspend CRITICALITY reject } uEContextResume S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE UEContextResumeRequest SUCCESSFUL OUTCOME UEContextResumeResponse UNSUCCESSFUL OUTCOME UEContextResumeFailure PROCEDURE CODE id-UEContextResume CRITICALITY reject } connectionEstablishmentIndication S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE ConnectionEstablishmentIndication PROCEDURE CODE id-ConnectionEstablishmentIndication CRITICALITY reject } nASDeliveryIndication S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE NASDeliveryIndication PROCEDURE CODE id-NASDeliveryIndication CRITICALITY ignore } retrieveUEInformation S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE RetrieveUEInformation PROCEDURE CODE id-RetrieveUEInformation CRITICALITY reject } uEInformationTransfer S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE UEInformationTransfer PROCEDURE CODE id-UEInformationTransfer CRITICALITY reject } eNBCPRelocationIndication S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE ENBCPRelocationIndication PROCEDURE CODE id-eNBCPRelocationIndication CRITICALITY reject } mMECPRelocationIndication S1AP-ELEMENTARY-PROCEDURE ::= { INITIATING MESSAGE MMECPRelocationIndication PROCEDURE CODE id-MMECPRelocationIndication CRITICALITY reject } END 9.3.3 PDU Definitions -- ************************************************************** -- -- PDU definitions for S1AP. -- -- ************************************************************** S1AP-PDU-Contents { itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-PDU-Contents (1) } DEFINITIONS AUTOMATIC TAGS ::= BEGIN -- ************************************************************** -- -- IE parameter types from other modules. -- -- ************************************************************** IMPORTS UEAggregateMaximumBitrate, BearerType, Cause, CellAccessMode, Cdma2000HORequiredIndication, Cdma2000HOStatus, Cdma2000OneXSRVCCInfo, Cdma2000OneXRAND, Cdma2000PDU, Cdma2000RATType, Cdma2000SectorID, EUTRANRoundTripDelayEstimationInfo, CNDomain, ConcurrentWarningMessageIndicator, CriticalityDiagnostics, CSFallbackIndicator, CSG-Id, CSG-IdList, CSGMembershipStatus, Data-Forwarding-Not-Possible, Direct-Forwarding-Path-Availability, Global-ENB-ID, EUTRAN-CGI, ENBname, ENB-StatusTransfer-TransparentContainer, ENB-UE-S1AP-ID, ExtendedRepetitionPeriod, GTP-TEID, GUMMEI, GUMMEIType, HandoverRestrictionList, HandoverType, Masked-IMEISV, LAI, LPPa-PDU, ManagementBasedMDTAllowed, MDTPLMNList, MMEname, MMERelaySupportIndicator, MME-UE-S1AP-ID, MSClassmark2, MSClassmark3, NAS-PDU, NASSecurityParametersfromE-UTRAN, NASSecurityParameterstoE-UTRAN, OverloadResponse, PagingDRX, PagingPriority, PLMNidentity, ProSeAuthorized, RIMTransfer, RelativeMMECapacity, RequestType, E-RAB-ID, E-RABLevelQoSParameters, E-RABList, RelayNode-Indicator, Routing-ID, SecurityKey, SecurityContext, ServedGUMMEIs, SONConfigurationTransfer, Source-ToTarget-TransparentContainer, SourceBSS-ToTargetBSS-TransparentContainer, SourceeNB-ToTargeteNB-TransparentContainer, SourceRNC-ToTargetRNC-TransparentContainer, SubscriberProfileIDforRFP, SRVCCOperationNotPossible, SRVCCOperationPossible, SRVCCHOIndication, SupportedTAs, TAI, Target-ToSource-TransparentContainer, TargetBSS-ToSourceBSS-TransparentContainer, TargeteNB-ToSourceeNB-TransparentContainer, TargetID, TargetRNC-ToSourceRNC-TransparentContainer, TimeToWait, TraceActivation, TrafficLoadReductionIndication, E-UTRAN-Trace-ID, TransportLayerAddress, UEIdentityIndexValue, UEPagingID, UERadioCapability, UERadioCapabilityForPaging, UE-RetentionInformation, UE-S1AP-IDs, UE-associatedLogicalS1-ConnectionItem, UESecurityCapabilities, S-TMSI, MessageIdentifier, SerialNumber, WarningAreaList, RepetitionPeriod, NumberofBroadcastRequest, WarningType, WarningSecurityInfo, DataCodingScheme, WarningMessageContents, BroadcastCompletedAreaList, RRC-Establishment-Cause, BroadcastCancelledAreaList, PS-ServiceNotAvailable, GUMMEIList, Correlation-ID, GWContextReleaseIndication, PrivacyIndicator, VoiceSupportMatchIndicator, TunnelInformation, KillAllWarningMessages, TransportInformation, LHN-ID, UserLocationInformation, AdditionalCSFallbackIndicator, ECGIListForRestart, TAIListForRestart, EmergencyAreaIDListForRestart, ExpectedUEBehaviour, Paging-eDRXInformation, Extended-UEIdentityIndexValue, MME-Group-ID, Additional-GUTI, PWSfailedECGIList, CellIdentifierAndCELevelForCECapableUEs, AssistanceDataForPaging, InformationOnRecommendedCellsAndENBsForPaging, UE-Usage-Type, UEUserPlaneCIoTSupportIndicator, NB-IoT-DefaultPagingDRX, NB-IoT-Paging-eDRXInformation, CE-mode-B-SupportIndicator, NB-IoT-UEIdentityIndexValue, V2XServicesAuthorized, DCN-ID, ServedDCNs, UESidelinkAggregateMaximumBitrate, DLNASPDUDeliveryAckRequest, Coverage-Level, EnhancedCoverageRestricted, DL-CP-SecurityInformation, UL-CP-SecurityInformation FROM S1AP-IEs PrivateIE-Container{}, ProtocolExtensionContainer{}, ProtocolIE-Container{}, ProtocolIE-ContainerList{}, ProtocolIE-ContainerPair{}, ProtocolIE-ContainerPairList{}, ProtocolIE-SingleContainer{}, S1AP-PRIVATE-IES, S1AP-PROTOCOL-EXTENSION, S1AP-PROTOCOL-IES, S1AP-PROTOCOL-IES-PAIR FROM S1AP-Containers id-AssistanceDataForPaging, id-uEaggregateMaximumBitrate, id-BearerType, id-Cause, id-CellAccessMode, id-CellIdentifierAndCELevelForCECapableUEs, id-cdma2000HORequiredIndication, id-cdma2000HOStatus, id-cdma2000OneXSRVCCInfo, id-cdma2000OneXRAND, id-cdma2000PDU, id-cdma2000RATType, id-cdma2000SectorID, id-EUTRANRoundTripDelayEstimationInfo, id-CNDomain, id-ConcurrentWarningMessageIndicator, id-CriticalityDiagnostics, id-CSFallbackIndicator, id-CSG-Id, id-CSG-IdList, id-CSGMembershipStatus, id-Data-Forwarding-Not-Possible, 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-GUMMEIType, id-HandoverRestrictionList, id-HandoverType, id-Masked-IMEISV, id-InformationOnRecommendedCellsAndENBsForPaging, id-InitialContextSetup, id-Inter-SystemInformationTransferTypeEDT, id-Inter-SystemInformationTransferTypeMDT, id-LPPa-PDU, id-NAS-DownlinkCount, id-ManagementBasedMDTAllowed, id-ManagementBasedMDTPLMNList, 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-PagingPriority, id-RelativeMMECapacity, id-RequestType, id-Routing-ID, 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-RABFailedToResumeListResumeReq, id-E-RABFailedToResumeItemResumeReq, id-E-RABFailedToResumeListResumeRes, id-E-RABFailedToResumeItemResumeRes, 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-RABToBeModifiedListBearerModInd, id-E-RABToBeModifiedItemBearerModInd, id-E-RABNotToBeModifiedListBearerModInd, id-E-RABNotToBeModifiedItemBearerModInd, id-E-RABModifyListBearerModConf, id-E-RABModifyItemBearerModConf, id-E-RABFailedToModifyListBearerModConf, id-E-RABToBeReleasedListBearerModConf, 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-ProSeAuthorized, 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-SRVCCOperationNotPossible, 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-TrafficLoadReductionIndication, id-E-UTRAN-Trace-ID, id-UEIdentityIndexValue, id-UEPagingID, id-UERadioCapability, id-UERadioCapabilityForPaging, id-UTRANtoLTEHOInformationRes, id-UE-associatedLogicalS1-ConnectionListResAck, id-UE-associatedLogicalS1-ConnectionItem, id-UE-RetentionInformation, id-UESecurityCapabilities, id-UE-S1AP-IDs, id-V2XServicesAuthorized, id-ResetType, id-MessageIdentifier, id-SerialNumber, id-WarningAreaList, id-RepetitionPeriod, id-NumberofBroadcastRequest, id-WarningType, id-WarningSecurityInfo, id-DataCodingScheme, id-WarningMessageContents, id-BroadcastCompletedAreaList, id-BroadcastCancelledAreaList, id-RRC-Establishment-Cause, id-TraceCollectionEntityIPAddress, maxnoofTAIs, maxnoofErrors, maxnoofE-RABs, maxnoofIndividualS1ConnectionsToReset, maxnoofEmergencyAreaID, maxnoofCellID, maxnoofTAIforWarning, maxnoofCellinTAI, maxnoofCellinEAI, id-ExtendedRepetitionPeriod, id-PS-ServiceNotAvailable, id-RegisteredLAI, id-GUMMEIList, id-SourceMME-GUMMEI, id-MME-UE-S1AP-ID-2, id-GW-TransportLayerAddress, id-RelayNode-Indicator, id-Correlation-ID, id-MMERelaySupportIndicator, id-GWContextReleaseIndication, id-PrivacyIndicator, id-VoiceSupportMatchIndicator, id-Tunnel-Information-for-BBF, id-SIPTO-Correlation-ID, id-SIPTO-L-GW-TransportLayerAddress, id-KillAllWarningMessages, id-TransportInformation, id-LHN-ID, id-UserLocationInformation, id-AdditionalCSFallbackIndicator, id-ECGIListForRestart, id-TAIListForRestart, id-EmergencyAreaIDListForRestart, id-ExpectedUEBehaviour, id-Paging-eDRXInformation, id-extended-UEIdentityIndexValue, id-CSGMembershipInfo, id-MME-Group-ID, id-Additional-GUTI, id-S1-Message, id-PWSfailedECGIList, id-PWSFailureIndication, id-UE-Usage-Type, id-UEUserPlaneCIoTSupportIndicator, id-NB-IoT-DefaultPagingDRX, id-NB-IoT-Paging-eDRXInformation, id-CE-mode-B-SupportIndicator, id-NB-IoT-UEIdentityIndexValue, id-RRC-Resume-Cause, id-DCN-ID, id-ServedDCNs, id-UESidelinkAggregateMaximumBitrate, id-DLNASPDUDeliveryAckRequest, id-Coverage-Level, id-EnhancedCoverageRestricted, id-UE-Level-QoS-Parameters, id-DL-CP-SecurityInformation, id-UL-CP-SecurityInformation FROM S1AP-Constants; -- ************************************************************** -- -- Common Container Lists -- -- ************************************************************** E-RAB-IE-ContainerList { S1AP-PROTOCOL-IES : IEsSetParam } ::= ProtocolIE-ContainerList { 1, maxnoofE-RABs, {IEsSetParam} } E-RAB-IE-ContainerPairList { S1AP-PROTOCOL-IES-PAIR : IEsSetParam } ::= ProtocolIE-ContainerPairList { 1, maxnoofE-RABs, {IEsSetParam} } ProtocolError-IE-ContainerList { S1AP-PROTOCOL-IES : IEsSetParam } ::= ProtocolIE-ContainerList { 1, maxnoofE-RABs, {IEsSetParam} } -- ************************************************************** -- -- HANDOVER PREPARATION ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Handover Required -- -- ************************************************************** HandoverRequired ::= SEQUENCE { protocolIEs ProtocolIE-Container { { HandoverRequiredIEs} }, ... } HandoverRequiredIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-HandoverType CRITICALITY reject TYPE HandoverType PRESENCE mandatory}| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| { ID id-TargetID CRITICALITY reject TYPE TargetID PRESENCE mandatory}| { ID id-Direct-Forwarding-Path-Availability CRITICALITY ignore TYPE Direct-Forwarding-Path-Availability PRESENCE optional}| { ID id-SRVCCHOIndication CRITICALITY reject TYPE SRVCCHOIndication PRESENCE optional}| { ID id-Source-ToTarget-TransparentContainer CRITICALITY reject TYPE Source-ToTarget-TransparentContainer PRESENCE mandatory}| { ID id-Source-ToTarget-TransparentContainer-Secondary CRITICALITY reject TYPE Source-ToTarget-TransparentContainer PRESENCE optional}| { ID id-MSClassmark2 CRITICALITY reject TYPE MSClassmark2 PRESENCE conditional}| { ID id-MSClassmark3 CRITICALITY ignore TYPE MSClassmark3 PRESENCE conditional}| { ID id-CSG-Id CRITICALITY reject TYPE CSG-Id PRESENCE optional}| { ID id-CellAccessMode CRITICALITY reject TYPE CellAccessMode PRESENCE optional}| { ID id-PS-ServiceNotAvailable CRITICALITY ignore TYPE PS-ServiceNotAvailable PRESENCE optional}, ... } -- ************************************************************** -- -- Handover Command -- -- ************************************************************** HandoverCommand ::= SEQUENCE { protocolIEs ProtocolIE-Container { { HandoverCommandIEs} }, ... } HandoverCommandIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-HandoverType CRITICALITY reject TYPE HandoverType PRESENCE mandatory}| { ID id-NASSecurityParametersfromE-UTRAN CRITICALITY reject TYPE NASSecurityParametersfromE-UTRAN PRESENCE conditional -- This IE shall be present if HandoverType IE is set to value "LTEtoUTRAN" or "LTEtoGERAN" --}| { ID id-E-RABSubjecttoDataForwardingList CRITICALITY ignore TYPE E-RABSubjecttoDataForwardingList PRESENCE optional}| { ID id-E-RABtoReleaseListHOCmd CRITICALITY ignore TYPE E-RABList PRESENCE optional}| { ID id-Target-ToSource-TransparentContainer CRITICALITY reject TYPE Target-ToSource-TransparentContainer PRESENCE mandatory}| { ID id-Target-ToSource-TransparentContainer-Secondary CRITICALITY reject TYPE Target-ToSource-TransparentContainer PRESENCE optional}| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, ... } E-RABSubjecttoDataForwardingList ::= E-RAB-IE-ContainerList { {E-RABDataForwardingItemIEs} } E-RABDataForwardingItemIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABDataForwardingItem CRITICALITY ignore TYPE E-RABDataForwardingItem PRESENCE mandatory }, ... } E-RABDataForwardingItem ::= SEQUENCE { e-RAB-ID E-RAB-ID, dL-transportLayerAddress TransportLayerAddress OPTIONAL, dL-gTP-TEID GTP-TEID OPTIONAL, uL-TransportLayerAddress TransportLayerAddress OPTIONAL, uL-GTP-TEID GTP-TEID OPTIONAL, iE-Extensions ProtocolExtensionContainer { { E-RABDataForwardingItem-ExtIEs} } OPTIONAL, ... } E-RABDataForwardingItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- Handover Preparation Failure -- -- ************************************************************** HandoverPreparationFailure ::= SEQUENCE { protocolIEs ProtocolIE-Container { { HandoverPreparationFailureIEs} }, ... } HandoverPreparationFailureIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- HANDOVER RESOURCE ALLOCATION ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Handover Request -- -- ************************************************************** HandoverRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { {HandoverRequestIEs} }, ... } HandoverRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-HandoverType CRITICALITY reject TYPE HandoverType PRESENCE mandatory}| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| { ID id-uEaggregateMaximumBitrate CRITICALITY reject TYPE UEAggregateMaximumBitrate PRESENCE mandatory}| { ID id-E-RABToBeSetupListHOReq CRITICALITY reject TYPE E-RABToBeSetupListHOReq PRESENCE mandatory}| { ID id-Source-ToTarget-TransparentContainer CRITICALITY reject TYPE Source-ToTarget-TransparentContainer PRESENCE mandatory}| { ID id-UESecurityCapabilities CRITICALITY reject TYPE UESecurityCapabilities PRESENCE mandatory}| { ID id-HandoverRestrictionList CRITICALITY ignore TYPE HandoverRestrictionList PRESENCE optional}| { ID id-TraceActivation CRITICALITY ignore TYPE TraceActivation PRESENCE optional}| { ID id-RequestType CRITICALITY ignore TYPE RequestType PRESENCE optional}| { ID id-SRVCCOperationPossible CRITICALITY ignore TYPE SRVCCOperationPossible PRESENCE optional}| { ID id-SecurityContext CRITICALITY reject TYPE SecurityContext PRESENCE mandatory}| { ID id-NASSecurityParameterstoE-UTRAN CRITICALITY reject TYPE NASSecurityParameterstoE-UTRAN PRESENCE conditional -- This IE shall be present if the Handover Type IE is set to the value "UTRANtoLTE" or "GERANtoLTE" -- }| { ID id-CSG-Id CRITICALITY reject TYPE CSG-Id PRESENCE optional}| { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| { ID id-GUMMEI-ID CRITICALITY ignore TYPE GUMMEI PRESENCE optional}| { ID id-MME-UE-S1AP-ID-2 CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE optional}| { ID id-ManagementBasedMDTAllowed CRITICALITY ignore TYPE ManagementBasedMDTAllowed PRESENCE optional}| { ID id-ManagementBasedMDTPLMNList CRITICALITY ignore TYPE MDTPLMNList PRESENCE optional}| { ID id-Masked-IMEISV CRITICALITY ignore TYPE Masked-IMEISV PRESENCE optional}| { ID id-ExpectedUEBehaviour CRITICALITY ignore TYPE ExpectedUEBehaviour PRESENCE optional}| { ID id-ProSeAuthorized CRITICALITY ignore TYPE ProSeAuthorized PRESENCE optional}| { ID id-UEUserPlaneCIoTSupportIndicator CRITICALITY ignore TYPE UEUserPlaneCIoTSupportIndicator PRESENCE optional}| { ID id-V2XServicesAuthorized CRITICALITY ignore TYPE V2XServicesAuthorized PRESENCE optional}| { ID id-UESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE UESidelinkAggregateMaximumBitrate PRESENCE optional}| { ID id-EnhancedCoverageRestricted CRITICALITY ignore TYPE EnhancedCoverageRestricted PRESENCE optional}, ... } E-RABToBeSetupListHOReq ::= E-RAB-IE-ContainerList { {E-RABToBeSetupItemHOReqIEs} } E-RABToBeSetupItemHOReqIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABToBeSetupItemHOReq CRITICALITY reject TYPE E-RABToBeSetupItemHOReq PRESENCE mandatory }, ... } E-RABToBeSetupItemHOReq ::= SEQUENCE { e-RAB-ID E-RAB-ID, transportLayerAddress TransportLayerAddress, gTP-TEID GTP-TEID, e-RABlevelQosParameters E-RABLevelQoSParameters, iE-Extensions ProtocolExtensionContainer { {E-RABToBeSetupItemHOReq-ExtIEs} } OPTIONAL, ... } E-RABToBeSetupItemHOReq-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { { ID id-Data-Forwarding-Not-Possible CRITICALITY ignore EXTENSION Data-Forwarding-Not-Possible PRESENCE optional}| { ID id-BearerType CRITICALITY reject EXTENSION BearerType PRESENCE optional}, ... } -- ************************************************************** -- -- Handover Request Acknowledge -- -- ************************************************************** HandoverRequestAcknowledge ::= SEQUENCE { protocolIEs ProtocolIE-Container { {HandoverRequestAcknowledgeIEs} }, ... } HandoverRequestAcknowledgeIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-E-RABAdmittedList CRITICALITY ignore TYPE E-RABAdmittedList PRESENCE mandatory}| { ID id-E-RABFailedToSetupListHOReqAck CRITICALITY ignore TYPE E-RABFailedtoSetupListHOReqAck PRESENCE optional}| { ID id-Target-ToSource-TransparentContainer CRITICALITY reject TYPE Target-ToSource-TransparentContainer PRESENCE mandatory}| { ID id-CSG-Id CRITICALITY ignore TYPE CSG-Id PRESENCE optional}| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| { ID id-CellAccessMode CRITICALITY ignore TYPE CellAccessMode PRESENCE optional}| { ID id-CE-mode-B-SupportIndicator CRITICALITY ignore TYPE CE-mode-B-SupportIndicator PRESENCE optional}, ... } E-RABAdmittedList ::= E-RAB-IE-ContainerList { {E-RABAdmittedItemIEs} } E-RABAdmittedItemIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABAdmittedItem CRITICALITY ignore TYPE E-RABAdmittedItem PRESENCE mandatory }, ... } E-RABAdmittedItem ::= SEQUENCE { e-RAB-ID E-RAB-ID, transportLayerAddress TransportLayerAddress, gTP-TEID GTP-TEID, dL-transportLayerAddress TransportLayerAddress OPTIONAL, dL-gTP-TEID GTP-TEID OPTIONAL, uL-TransportLayerAddress TransportLayerAddress OPTIONAL, uL-GTP-TEID GTP-TEID OPTIONAL, iE-Extensions ProtocolExtensionContainer { {E-RABAdmittedItem-ExtIEs} } OPTIONAL, ... } E-RABAdmittedItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } E-RABFailedtoSetupListHOReqAck ::= E-RAB-IE-ContainerList { {E-RABFailedtoSetupItemHOReqAckIEs} } E-RABFailedtoSetupItemHOReqAckIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABFailedtoSetupItemHOReqAck CRITICALITY ignore TYPE E-RABFailedToSetupItemHOReqAck PRESENCE mandatory }, ... } E-RABFailedToSetupItemHOReqAck ::= SEQUENCE { e-RAB-ID E-RAB-ID, cause Cause, iE-Extensions ProtocolExtensionContainer { { E-RABFailedToSetupItemHOReqAckExtIEs} } OPTIONAL, ... } E-RABFailedToSetupItemHOReqAckExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- Handover Failure -- -- ************************************************************** HandoverFailure ::= SEQUENCE { protocolIEs ProtocolIE-Container { { HandoverFailureIEs} }, ... } HandoverFailureIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- HANDOVER NOTIFICATION ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Handover Notify -- -- ************************************************************** HandoverNotify ::= SEQUENCE { protocolIEs ProtocolIE-Container { { HandoverNotifyIEs} }, ... } HandoverNotifyIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory}| { ID id-TAI CRITICALITY ignore TYPE TAI PRESENCE mandatory}| -- Extension for Release 11 to support BBAI -- { ID id-Tunnel-Information-for-BBF CRITICALITY ignore TYPE TunnelInformation PRESENCE optional}| { ID id-LHN-ID CRITICALITY ignore TYPE LHN-ID PRESENCE optional}, ... } -- ************************************************************** -- -- PATH SWITCH REQUEST ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Path Switch Request -- -- ************************************************************** PathSwitchRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { { PathSwitchRequestIEs} }, ... } PathSwitchRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-E-RABToBeSwitchedDLList CRITICALITY reject TYPE E-RABToBeSwitchedDLList PRESENCE mandatory}| { ID id-SourceMME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory}| { ID id-TAI CRITICALITY ignore TYPE TAI PRESENCE mandatory}| { ID id-UESecurityCapabilities CRITICALITY ignore TYPE UESecurityCapabilities PRESENCE mandatory}| { ID id-CSG-Id CRITICALITY ignore TYPE CSG-Id PRESENCE optional}| { ID id-CellAccessMode CRITICALITY ignore TYPE CellAccessMode PRESENCE optional}| { ID id-SourceMME-GUMMEI CRITICALITY ignore TYPE GUMMEI PRESENCE optional}| { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| -- Extension for Release 11 to support BBAI -- { ID id-Tunnel-Information-for-BBF CRITICALITY ignore TYPE TunnelInformation PRESENCE optional}| { ID id-LHN-ID CRITICALITY ignore TYPE LHN-ID PRESENCE optional}| { ID id-RRC-Resume-Cause CRITICALITY ignore TYPE RRC-Establishment-Cause PRESENCE optional }, ... } E-RABToBeSwitchedDLList ::= E-RAB-IE-ContainerList { {E-RABToBeSwitchedDLItemIEs} } E-RABToBeSwitchedDLItemIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABToBeSwitchedDLItem CRITICALITY reject TYPE E-RABToBeSwitchedDLItem PRESENCE mandatory }, ... } E-RABToBeSwitchedDLItem ::= SEQUENCE { e-RAB-ID E-RAB-ID, transportLayerAddress TransportLayerAddress, gTP-TEID GTP-TEID, iE-Extensions ProtocolExtensionContainer { { E-RABToBeSwitchedDLItem-ExtIEs} } OPTIONAL, ... } E-RABToBeSwitchedDLItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- Path Switch Request Acknowledge -- -- ************************************************************** PathSwitchRequestAcknowledge ::= SEQUENCE { protocolIEs ProtocolIE-Container { { PathSwitchRequestAcknowledgeIEs} }, ... } PathSwitchRequestAcknowledgeIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-uEaggregateMaximumBitrate CRITICALITY ignore TYPE UEAggregateMaximumBitrate PRESENCE optional}| { ID id-E-RABToBeSwitchedULList CRITICALITY ignore TYPE E-RABToBeSwitchedULList PRESENCE optional}| { ID id-E-RABToBeReleasedList CRITICALITY ignore TYPE E-RABList PRESENCE optional}| { ID id-SecurityContext CRITICALITY reject TYPE SecurityContext PRESENCE mandatory}| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| { ID id-MME-UE-S1AP-ID-2 CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE optional}| { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| { ID id-ProSeAuthorized CRITICALITY ignore TYPE ProSeAuthorized PRESENCE optional}| { ID id-UEUserPlaneCIoTSupportIndicator CRITICALITY ignore TYPE UEUserPlaneCIoTSupportIndicator PRESENCE optional}| { ID id-V2XServicesAuthorized CRITICALITY ignore TYPE V2XServicesAuthorized PRESENCE optional}| { ID id-UESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE UESidelinkAggregateMaximumBitrate PRESENCE optional}| { ID id-EnhancedCoverageRestricted CRITICALITY ignore TYPE EnhancedCoverageRestricted PRESENCE optional}, ... } E-RABToBeSwitchedULList ::= E-RAB-IE-ContainerList { {E-RABToBeSwitchedULItemIEs} } E-RABToBeSwitchedULItemIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABToBeSwitchedULItem CRITICALITY ignore TYPE E-RABToBeSwitchedULItem PRESENCE mandatory }, ... } E-RABToBeSwitchedULItem ::= SEQUENCE { e-RAB-ID E-RAB-ID, transportLayerAddress TransportLayerAddress, gTP-TEID GTP-TEID, iE-Extensions ProtocolExtensionContainer { { E-RABToBeSwitchedULItem-ExtIEs} } OPTIONAL, ... } E-RABToBeSwitchedULItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- Path Switch Request Failure -- -- ************************************************************** PathSwitchRequestFailure ::= SEQUENCE { protocolIEs ProtocolIE-Container { { PathSwitchRequestFailureIEs} }, ... } PathSwitchRequestFailureIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- HANDOVER CANCEL ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Handover Cancel -- -- ************************************************************** HandoverCancel ::= SEQUENCE { protocolIEs ProtocolIE-Container { { HandoverCancelIEs} }, ... } HandoverCancelIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, ... } -- ************************************************************** -- -- Handover Cancel Request Acknowledge -- -- ************************************************************** HandoverCancelAcknowledge ::= SEQUENCE { protocolIEs ProtocolIE-Container { { HandoverCancelAcknowledgeIEs} }, ... } HandoverCancelAcknowledgeIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- E-RAB SETUP ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- E-RAB Setup Request -- -- ************************************************************** E-RABSetupRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { {E-RABSetupRequestIEs} }, ... } E-RABSetupRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-uEaggregateMaximumBitrate CRITICALITY reject TYPE UEAggregateMaximumBitrate PRESENCE optional }| { ID id-E-RABToBeSetupListBearerSUReq CRITICALITY reject TYPE E-RABToBeSetupListBearerSUReq PRESENCE mandatory }, ... } E-RABToBeSetupListBearerSUReq ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABToBeSetupItemBearerSUReqIEs} } E-RABToBeSetupItemBearerSUReqIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABToBeSetupItemBearerSUReq CRITICALITY reject TYPE E-RABToBeSetupItemBearerSUReq PRESENCE mandatory }, ... } E-RABToBeSetupItemBearerSUReq ::= SEQUENCE { e-RAB-ID E-RAB-ID, e-RABlevelQoSParameters E-RABLevelQoSParameters, transportLayerAddress TransportLayerAddress, gTP-TEID GTP-TEID, nAS-PDU NAS-PDU, iE-Extensions ProtocolExtensionContainer { {E-RABToBeSetupItemBearerSUReqExtIEs} } OPTIONAL, ... } E-RABToBeSetupItemBearerSUReqExtIEs S1AP-PROTOCOL-EXTENSION ::= { { ID id-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}| { ID id-SIPTO-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}| { ID id-BearerType CRITICALITY reject EXTENSION BearerType PRESENCE optional}, ... } -- ************************************************************** -- -- E-RAB Setup Response -- -- ************************************************************** E-RABSetupResponse ::= SEQUENCE { protocolIEs ProtocolIE-Container { {E-RABSetupResponseIEs} }, ... } E-RABSetupResponseIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-E-RABSetupListBearerSURes CRITICALITY ignore TYPE E-RABSetupListBearerSURes PRESENCE optional }| { ID id-E-RABFailedToSetupListBearerSURes CRITICALITY ignore TYPE E-RABList PRESENCE optional }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } E-RABSetupListBearerSURes ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABSetupItemBearerSUResIEs} } E-RABSetupItemBearerSUResIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABSetupItemBearerSURes CRITICALITY ignore TYPE E-RABSetupItemBearerSURes PRESENCE mandatory }, ... } E-RABSetupItemBearerSURes ::= SEQUENCE { e-RAB-ID E-RAB-ID, transportLayerAddress TransportLayerAddress, gTP-TEID GTP-TEID, iE-Extensions ProtocolExtensionContainer { {E-RABSetupItemBearerSUResExtIEs} } OPTIONAL, ... } E-RABSetupItemBearerSUResExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- E-RAB MODIFY ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- E-RAB Modify Request -- -- ************************************************************** E-RABModifyRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { {E-RABModifyRequestIEs} }, ... } E-RABModifyRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-uEaggregateMaximumBitrate CRITICALITY reject TYPE UEAggregateMaximumBitrate PRESENCE optional }| { ID id-E-RABToBeModifiedListBearerModReq CRITICALITY reject TYPE E-RABToBeModifiedListBearerModReq PRESENCE mandatory }, ... } E-RABToBeModifiedListBearerModReq ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABToBeModifiedItemBearerModReqIEs} } E-RABToBeModifiedItemBearerModReqIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABToBeModifiedItemBearerModReq CRITICALITY reject TYPE E-RABToBeModifiedItemBearerModReq PRESENCE mandatory }, ... } E-RABToBeModifiedItemBearerModReq ::= SEQUENCE { e-RAB-ID E-RAB-ID, e-RABLevelQoSParameters E-RABLevelQoSParameters, nAS-PDU NAS-PDU, iE-Extensions ProtocolExtensionContainer { {E-RABToBeModifyItemBearerModReqExtIEs} } OPTIONAL, ... } E-RABToBeModifyItemBearerModReqExtIEs S1AP-PROTOCOL-EXTENSION ::= { { ID id-TransportInformation CRITICALITY reject EXTENSION TransportInformation PRESENCE optional}, ... } -- ************************************************************** -- -- E-RAB Modify Response -- -- ************************************************************** E-RABModifyResponse ::= SEQUENCE { protocolIEs ProtocolIE-Container { {E-RABModifyResponseIEs} }, ... } E-RABModifyResponseIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-E-RABModifyListBearerModRes CRITICALITY ignore TYPE E-RABModifyListBearerModRes PRESENCE optional }| { ID id-E-RABFailedToModifyList CRITICALITY ignore TYPE E-RABList PRESENCE optional }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } E-RABModifyListBearerModRes ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABModifyItemBearerModResIEs} } E-RABModifyItemBearerModResIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABModifyItemBearerModRes CRITICALITY ignore TYPE E-RABModifyItemBearerModRes PRESENCE mandatory}, ... } E-RABModifyItemBearerModRes ::= SEQUENCE { e-RAB-ID E-RAB-ID, iE-Extensions ProtocolExtensionContainer { {E-RABModifyItemBearerModResExtIEs} } OPTIONAL, ... } E-RABModifyItemBearerModResExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- E-RAB RELEASE ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- E-RAB Release Command -- -- ************************************************************** E-RABReleaseCommand ::= SEQUENCE { protocolIEs ProtocolIE-Container { {E-RABReleaseCommandIEs} }, ... } E-RABReleaseCommandIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-uEaggregateMaximumBitrate CRITICALITY reject TYPE UEAggregateMaximumBitrate PRESENCE optional }| { ID id-E-RABToBeReleasedList CRITICALITY ignore TYPE E-RABList PRESENCE mandatory }| { ID id-NAS-PDU CRITICALITY ignore TYPE NAS-PDU PRESENCE optional }, ... } -- ************************************************************** -- -- E-RAB Release Response -- -- ************************************************************** E-RABReleaseResponse ::= SEQUENCE { protocolIEs ProtocolIE-Container { { E-RABReleaseResponseIEs } }, ... } E-RABReleaseResponseIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-E-RABReleaseListBearerRelComp CRITICALITY ignore TYPE E-RABReleaseListBearerRelComp PRESENCE optional }| { ID id-E-RABFailedToReleaseList CRITICALITY ignore TYPE E-RABList PRESENCE optional }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }| -- Extension for Release 12 to support User Location Information -- { ID id-UserLocationInformation CRITICALITY ignore TYPE UserLocationInformation PRESENCE optional }, ... } E-RABReleaseListBearerRelComp ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABReleaseItemBearerRelCompIEs} } E-RABReleaseItemBearerRelCompIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABReleaseItemBearerRelComp CRITICALITY ignore TYPE E-RABReleaseItemBearerRelComp PRESENCE mandatory }, ... } E-RABReleaseItemBearerRelComp ::= SEQUENCE { e-RAB-ID E-RAB-ID, iE-Extensions ProtocolExtensionContainer { {E-RABReleaseItemBearerRelCompExtIEs} } OPTIONAL, ... } E-RABReleaseItemBearerRelCompExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- E-RAB RELEASE INDICATION ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- E-RAB Release Indication -- -- ************************************************************** E-RABReleaseIndication ::= SEQUENCE { protocolIEs ProtocolIE-Container { {E-RABReleaseIndicationIEs} }, ... } E-RABReleaseIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-E-RABReleasedList CRITICALITY ignore TYPE E-RABList PRESENCE mandatory }| -- Extension for Release 12 to support User Location Information -- { ID id-UserLocationInformation CRITICALITY ignore TYPE UserLocationInformation PRESENCE optional }, ... } -- ************************************************************** -- -- INITIAL CONTEXT SETUP ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Initial Context Setup Request -- -- ************************************************************** InitialContextSetupRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { {InitialContextSetupRequestIEs} }, ... } InitialContextSetupRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-uEaggregateMaximumBitrate CRITICALITY reject TYPE UEAggregateMaximumBitrate PRESENCE mandatory}| { ID id-E-RABToBeSetupListCtxtSUReq CRITICALITY reject TYPE E-RABToBeSetupListCtxtSUReq PRESENCE mandatory}| { ID id-UESecurityCapabilities CRITICALITY reject TYPE UESecurityCapabilities PRESENCE mandatory}| { ID id-SecurityKey CRITICALITY reject TYPE SecurityKey PRESENCE mandatory}| { ID id-TraceActivation CRITICALITY ignore TYPE TraceActivation PRESENCE optional}| { ID id-HandoverRestrictionList CRITICALITY ignore TYPE HandoverRestrictionList PRESENCE optional}| { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE optional}| { ID id-SubscriberProfileIDforRFP CRITICALITY ignore TYPE SubscriberProfileIDforRFP PRESENCE optional}| { ID id-CSFallbackIndicator CRITICALITY reject TYPE CSFallbackIndicator PRESENCE optional}| { ID id-SRVCCOperationPossible CRITICALITY ignore TYPE SRVCCOperationPossible PRESENCE optional}| { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| { ID id-RegisteredLAI CRITICALITY ignore TYPE LAI PRESENCE optional}| { ID id-GUMMEI-ID CRITICALITY ignore TYPE GUMMEI PRESENCE optional}| { ID id-MME-UE-S1AP-ID-2 CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE optional}| { ID id-ManagementBasedMDTAllowed CRITICALITY ignore TYPE ManagementBasedMDTAllowed PRESENCE optional}| { ID id-ManagementBasedMDTPLMNList CRITICALITY ignore TYPE MDTPLMNList PRESENCE optional}| { ID id-AdditionalCSFallbackIndicator CRITICALITY ignore TYPE AdditionalCSFallbackIndicator PRESENCE conditional}| { ID id-Masked-IMEISV CRITICALITY ignore TYPE Masked-IMEISV PRESENCE optional}| { ID id-ExpectedUEBehaviour CRITICALITY ignore TYPE ExpectedUEBehaviour PRESENCE optional}| { ID id-ProSeAuthorized CRITICALITY ignore TYPE ProSeAuthorized PRESENCE optional}| { ID id-UEUserPlaneCIoTSupportIndicator CRITICALITY ignore TYPE UEUserPlaneCIoTSupportIndicator PRESENCE optional}| { ID id-V2XServicesAuthorized CRITICALITY ignore TYPE V2XServicesAuthorized PRESENCE optional}| { ID id-UESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE UESidelinkAggregateMaximumBitrate PRESENCE optional}| { ID id-EnhancedCoverageRestricted CRITICALITY ignore TYPE EnhancedCoverageRestricted PRESENCE optional}, ... } E-RABToBeSetupListCtxtSUReq ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABToBeSetupItemCtxtSUReqIEs} } E-RABToBeSetupItemCtxtSUReqIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABToBeSetupItemCtxtSUReq CRITICALITY reject TYPE E-RABToBeSetupItemCtxtSUReq PRESENCE mandatory }, ... } E-RABToBeSetupItemCtxtSUReq ::= SEQUENCE { e-RAB-ID E-RAB-ID, e-RABlevelQoSParameters E-RABLevelQoSParameters, transportLayerAddress TransportLayerAddress, gTP-TEID GTP-TEID, nAS-PDU NAS-PDU OPTIONAL, iE-Extensions ProtocolExtensionContainer { {E-RABToBeSetupItemCtxtSUReqExtIEs} } OPTIONAL, ... } E-RABToBeSetupItemCtxtSUReqExtIEs S1AP-PROTOCOL-EXTENSION ::= { { ID id-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}| { ID id-SIPTO-Correlation-ID CRITICALITY ignore EXTENSION Correlation-ID PRESENCE optional}| { ID id-BearerType CRITICALITY reject EXTENSION BearerType PRESENCE optional}, ... } -- ************************************************************** -- -- Initial Context Setup Response -- -- ************************************************************** InitialContextSetupResponse ::= SEQUENCE { protocolIEs ProtocolIE-Container { {InitialContextSetupResponseIEs} }, ... } InitialContextSetupResponseIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-E-RABSetupListCtxtSURes CRITICALITY ignore TYPE E-RABSetupListCtxtSURes PRESENCE mandatory }| { ID id-E-RABFailedToSetupListCtxtSURes CRITICALITY ignore TYPE E-RABList PRESENCE optional }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } E-RABSetupListCtxtSURes ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABSetupItemCtxtSUResIEs} } E-RABSetupItemCtxtSUResIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABSetupItemCtxtSURes CRITICALITY ignore TYPE E-RABSetupItemCtxtSURes PRESENCE mandatory }, ... } E-RABSetupItemCtxtSURes ::= SEQUENCE { e-RAB-ID E-RAB-ID, transportLayerAddress TransportLayerAddress, gTP-TEID GTP-TEID, iE-Extensions ProtocolExtensionContainer { {E-RABSetupItemCtxtSUResExtIEs} } OPTIONAL, ... } E-RABSetupItemCtxtSUResExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- Initial Context Setup Failure -- -- ************************************************************** InitialContextSetupFailure ::= SEQUENCE { protocolIEs ProtocolIE-Container { {InitialContextSetupFailureIEs} }, ... } InitialContextSetupFailureIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- PAGING ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Paging -- -- ************************************************************** Paging ::= SEQUENCE { protocolIEs ProtocolIE-Container {{PagingIEs}}, ... } PagingIEs S1AP-PROTOCOL-IES ::= { { ID id-UEIdentityIndexValue CRITICALITY ignore TYPE UEIdentityIndexValue PRESENCE mandatory}| { ID id-UEPagingID CRITICALITY ignore TYPE UEPagingID PRESENCE mandatory}| { ID id-pagingDRX CRITICALITY ignore TYPE PagingDRX PRESENCE optional}| { ID id-CNDomain CRITICALITY ignore TYPE CNDomain PRESENCE mandatory}| { ID id-TAIList CRITICALITY ignore TYPE TAIList PRESENCE mandatory}| { ID id-CSG-IdList CRITICALITY ignore TYPE CSG-IdList PRESENCE optional}| { ID id-PagingPriority CRITICALITY ignore TYPE PagingPriority PRESENCE optional}| { ID id-UERadioCapabilityForPaging CRITICALITY ignore TYPE UERadioCapabilityForPaging PRESENCE optional}| -- Extension for Release 13 to support Paging Optimisation and Coverage Enhancement paging -- { ID id-AssistanceDataForPaging CRITICALITY ignore TYPE AssistanceDataForPaging PRESENCE optional}| { ID id-Paging-eDRXInformation CRITICALITY ignore TYPE Paging-eDRXInformation PRESENCE optional}| { ID id-extended-UEIdentityIndexValue CRITICALITY ignore TYPE Extended-UEIdentityIndexValue PRESENCE optional}| { ID id-NB-IoT-Paging-eDRXInformation CRITICALITY ignore TYPE NB-IoT-Paging-eDRXInformation PRESENCE optional}| { ID id-NB-IoT-UEIdentityIndexValue CRITICALITY ignore TYPE NB-IoT-UEIdentityIndexValue PRESENCE optional}, ... } TAIList::= SEQUENCE (SIZE(1.. maxnoofTAIs)) OF ProtocolIE-SingleContainer {{TAIItemIEs}} TAIItemIEs S1AP-PROTOCOL-IES ::= { { ID id-TAIItem CRITICALITY ignore TYPE TAIItem PRESENCE mandatory }, ... } TAIItem ::= SEQUENCE { tAI TAI, iE-Extensions ProtocolExtensionContainer { {TAIItemExtIEs} } OPTIONAL, ... } TAIItemExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- UE CONTEXT RELEASE ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- UE Context Release Request -- -- ************************************************************** UEContextReleaseRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container {{UEContextReleaseRequest-IEs}}, ... } UEContextReleaseRequest-IEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| { ID id-GWContextReleaseIndication CRITICALITY reject TYPE GWContextReleaseIndication PRESENCE optional }, ... } -- ************************************************************** -- -- UE Context Release Command -- -- ************************************************************** UEContextReleaseCommand ::= SEQUENCE { protocolIEs ProtocolIE-Container {{UEContextReleaseCommand-IEs}}, ... } UEContextReleaseCommand-IEs S1AP-PROTOCOL-IES ::= { { ID id-UE-S1AP-IDs CRITICALITY reject TYPE UE-S1AP-IDs PRESENCE mandatory }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, ... } -- ************************************************************** -- -- UE Context Release Complete -- -- ************************************************************** UEContextReleaseComplete ::= SEQUENCE { protocolIEs ProtocolIE-Container {{UEContextReleaseComplete-IEs}}, ... } UEContextReleaseComplete-IEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| -- Extension for Release 12 to support User Location Information -- { ID id-UserLocationInformation CRITICALITY ignore TYPE UserLocationInformation PRESENCE optional}| -- Extension for Release 13 to support Paging Optimisation { ID id-InformationOnRecommendedCellsAndENBsForPaging CRITICALITY ignore TYPE InformationOnRecommendedCellsAndENBsForPaging PRESENCE optional}| -- Extension for Release 13 to support coverage enhancement paging - { ID id-CellIdentifierAndCELevelForCECapableUEs CRITICALITY ignore TYPE CellIdentifierAndCELevelForCECapableUEs PRESENCE optional}, ... } -- ************************************************************** -- -- UE CONTEXT MODIFICATION ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- UE Context Modification Request -- -- ************************************************************** UEContextModificationRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UEContextModificationRequestIEs} }, ... } UEContextModificationRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-SecurityKey CRITICALITY reject TYPE SecurityKey PRESENCE optional}| { ID id-SubscriberProfileIDforRFP CRITICALITY ignore TYPE SubscriberProfileIDforRFP PRESENCE optional}| { ID id-uEaggregateMaximumBitrate CRITICALITY ignore TYPE UEAggregateMaximumBitrate PRESENCE optional}| { ID id-CSFallbackIndicator CRITICALITY reject TYPE CSFallbackIndicator PRESENCE optional}| { ID id-UESecurityCapabilities CRITICALITY reject TYPE UESecurityCapabilities PRESENCE optional}| { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| { ID id-RegisteredLAI CRITICALITY ignore TYPE LAI PRESENCE optional}| { ID id-AdditionalCSFallbackIndicator CRITICALITY ignore TYPE AdditionalCSFallbackIndicator PRESENCE conditional}| { ID id-ProSeAuthorized CRITICALITY ignore TYPE ProSeAuthorized PRESENCE optional}| { ID id-SRVCCOperationPossible CRITICALITY ignore TYPE SRVCCOperationPossible PRESENCE optional}| { ID id-SRVCCOperationNotPossible CRITICALITY ignore TYPE SRVCCOperationNotPossible PRESENCE optional}| { ID id-V2XServicesAuthorized CRITICALITY ignore TYPE V2XServicesAuthorized PRESENCE optional}| { ID id-UESidelinkAggregateMaximumBitrate CRITICALITY ignore TYPE UESidelinkAggregateMaximumBitrate PRESENCE optional}, ... } -- ************************************************************** -- -- UE Context Modification Response -- -- ************************************************************** UEContextModificationResponse ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UEContextModificationResponseIEs} }, ... } UEContextModificationResponseIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- UE Context Modification Failure -- -- ************************************************************** UEContextModificationFailure ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UEContextModificationFailureIEs} }, ... } UEContextModificationFailureIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- UE RADIO CAPABILITY MATCH ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- UE Radio Capability Match Request -- -- ************************************************************** UERadioCapabilityMatchRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UERadioCapabilityMatchRequestIEs} }, ... } UERadioCapabilityMatchRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE optional }, ... } -- ************************************************************** -- -- UE Radio Capability Match Response -- -- ************************************************************** UERadioCapabilityMatchResponse ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UERadioCapabilityMatchResponseIEs} }, ... } UERadioCapabilityMatchResponseIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-VoiceSupportMatchIndicator CRITICALITY reject TYPE VoiceSupportMatchIndicator PRESENCE mandatory }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- NAS TRANSPORT ELEMENTARY PROCEDURES -- -- ************************************************************** -- ************************************************************** -- -- DOWNLINK NAS TRANSPORT -- -- ************************************************************** DownlinkNASTransport ::= SEQUENCE { protocolIEs ProtocolIE-Container {{DownlinkNASTransport-IEs}}, ... } DownlinkNASTransport-IEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-NAS-PDU CRITICALITY reject TYPE NAS-PDU PRESENCE mandatory}| { ID id-HandoverRestrictionList CRITICALITY ignore TYPE HandoverRestrictionList PRESENCE optional}| { ID id-SubscriberProfileIDforRFP CRITICALITY ignore TYPE SubscriberProfileIDforRFP PRESENCE optional}| { ID id-SRVCCOperationPossible CRITICALITY ignore TYPE SRVCCOperationPossible PRESENCE optional}| { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE optional}| { ID id-DLNASPDUDeliveryAckRequest CRITICALITY ignore TYPE DLNASPDUDeliveryAckRequest PRESENCE optional}| { ID id-EnhancedCoverageRestricted CRITICALITY ignore TYPE EnhancedCoverageRestricted PRESENCE optional}, ... } -- ************************************************************** -- -- INITIAL UE MESSAGE -- -- ************************************************************** InitialUEMessage ::= SEQUENCE { protocolIEs ProtocolIE-Container {{InitialUEMessage-IEs}}, ... } InitialUEMessage-IEs S1AP-PROTOCOL-IES ::= { { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-NAS-PDU CRITICALITY reject TYPE NAS-PDU PRESENCE mandatory}| { ID id-TAI CRITICALITY reject TYPE TAI PRESENCE mandatory}| { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory}| { ID id-RRC-Establishment-Cause CRITICALITY ignore TYPE RRC-Establishment-Cause PRESENCE mandatory}| { ID id-S-TMSI CRITICALITY reject TYPE S-TMSI PRESENCE optional}| { ID id-CSG-Id CRITICALITY reject TYPE CSG-Id PRESENCE optional}| { ID id-GUMMEI-ID CRITICALITY reject TYPE GUMMEI PRESENCE optional}| { ID id-CellAccessMode CRITICALITY reject TYPE CellAccessMode PRESENCE optional}| { ID id-GW-TransportLayerAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE optional}| { ID id-RelayNode-Indicator CRITICALITY reject TYPE RelayNode-Indicator PRESENCE optional}| { ID id-GUMMEIType CRITICALITY ignore TYPE GUMMEIType PRESENCE optional}| -- Extension for Release 11 to support BBAI -- { ID id-Tunnel-Information-for-BBF CRITICALITY ignore TYPE TunnelInformation PRESENCE optional}| { ID id-SIPTO-L-GW-TransportLayerAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE optional}| { ID id-LHN-ID CRITICALITY ignore TYPE LHN-ID PRESENCE optional}| { ID id-MME-Group-ID CRITICALITY ignore TYPE MME-Group-ID PRESENCE optional}| { ID id-UE-Usage-Type CRITICALITY ignore TYPE UE-Usage-Type PRESENCE optional}| { ID id-CE-mode-B-SupportIndicator CRITICALITY ignore TYPE CE-mode-B-SupportIndicator PRESENCE optional}| { ID id-DCN-ID CRITICALITY ignore TYPE DCN-ID PRESENCE optional}| { ID id-Coverage-Level CRITICALITY ignore TYPE Coverage-Level PRESENCE optional}, ... } -- ************************************************************** -- -- UPLINK NAS TRANSPORT -- -- ************************************************************** UplinkNASTransport ::= SEQUENCE { protocolIEs ProtocolIE-Container {{UplinkNASTransport-IEs}}, ... } UplinkNASTransport-IEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-NAS-PDU CRITICALITY reject TYPE NAS-PDU PRESENCE mandatory}| { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory}| { ID id-TAI CRITICALITY ignore TYPE TAI PRESENCE mandatory}| { ID id-GW-TransportLayerAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE optional}| { ID id-SIPTO-L-GW-TransportLayerAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE optional}| { ID id-LHN-ID CRITICALITY ignore TYPE LHN-ID PRESENCE optional}, ... } -- ************************************************************** -- -- NAS NON DELIVERY INDICATION -- -- ************************************************************** NASNonDeliveryIndication ::= SEQUENCE { protocolIEs ProtocolIE-Container {{NASNonDeliveryIndication-IEs}}, ... } NASNonDeliveryIndication-IEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-NAS-PDU CRITICALITY ignore TYPE NAS-PDU PRESENCE mandatory }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, ... } -- ************************************************************** -- -- REROUTE NAS REQUEST -- -- ************************************************************** RerouteNASRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container {{RerouteNASRequest-IEs}}, ... } RerouteNASRequest-IEs S1AP-PROTOCOL-IES ::= { { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE optional}| { ID id-S1-Message CRITICALITY reject TYPE OCTET STRING PRESENCE mandatory}| { ID id-MME-Group-ID CRITICALITY reject TYPE MME-Group-ID PRESENCE mandatory}| { ID id-Additional-GUTI CRITICALITY ignore TYPE Additional-GUTI PRESENCE optional}| { ID id-UE-Usage-Type CRITICALITY ignore TYPE UE-Usage-Type PRESENCE optional}, ... } -- ************************************************************** -- -- NAS DELIVERY INDICATION -- -- ************************************************************** NASDeliveryIndication ::= SEQUENCE { protocolIEs ProtocolIE-Container { { NASDeliveryIndicationIEs} }, ... } NASDeliveryIndicationIEs S1AP-PROTOCOL-IES ::= { ... } -- ************************************************************** -- -- RESET ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Reset -- -- ************************************************************** Reset ::= SEQUENCE { protocolIEs ProtocolIE-Container { {ResetIEs} }, ... } ResetIEs S1AP-PROTOCOL-IES ::= { { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| { ID id-ResetType CRITICALITY reject TYPE ResetType PRESENCE mandatory }, ... } ResetType ::= CHOICE { s1-Interface ResetAll, partOfS1-Interface UE-associatedLogicalS1-ConnectionListRes, ... } ResetAll ::= ENUMERATED { reset-all, ... } UE-associatedLogicalS1-ConnectionListRes ::= SEQUENCE (SIZE(1.. maxnoofIndividualS1ConnectionsToReset)) OF ProtocolIE-SingleContainer { { UE-associatedLogicalS1-ConnectionItemRes } } UE-associatedLogicalS1-ConnectionItemRes S1AP-PROTOCOL-IES ::= { { ID id-UE-associatedLogicalS1-ConnectionItem CRITICALITY reject TYPE UE-associatedLogicalS1-ConnectionItem PRESENCE mandatory}, ... } -- ************************************************************** -- -- Reset Acknowledge -- -- ************************************************************** ResetAcknowledge ::= SEQUENCE { protocolIEs ProtocolIE-Container { {ResetAcknowledgeIEs} }, ... } ResetAcknowledgeIEs S1AP-PROTOCOL-IES ::= { { ID id-UE-associatedLogicalS1-ConnectionListResAck CRITICALITY ignore TYPE UE-associatedLogicalS1-ConnectionListResAck PRESENCE optional }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } UE-associatedLogicalS1-ConnectionListResAck ::= SEQUENCE (SIZE(1.. maxnoofIndividualS1ConnectionsToReset)) OF ProtocolIE-SingleContainer { { UE-associatedLogicalS1-ConnectionItemResAck } } UE-associatedLogicalS1-ConnectionItemResAck S1AP-PROTOCOL-IES ::= { { ID id-UE-associatedLogicalS1-ConnectionItem CRITICALITY ignore TYPE UE-associatedLogicalS1-ConnectionItem PRESENCE mandatory }, ... } -- ************************************************************** -- -- ERROR INDICATION ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Error Indication -- -- ************************************************************** ErrorIndication ::= SEQUENCE { protocolIEs ProtocolIE-Container {{ErrorIndicationIEs}}, ... } ErrorIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE optional }| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE optional }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE optional }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- S1 SETUP ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- S1 Setup Request -- -- ************************************************************** S1SetupRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { {S1SetupRequestIEs} }, ... } S1SetupRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-Global-ENB-ID CRITICALITY reject TYPE Global-ENB-ID PRESENCE mandatory}| { ID id-eNBname CRITICALITY ignore TYPE ENBname PRESENCE optional}| { ID id-SupportedTAs CRITICALITY reject TYPE SupportedTAs PRESENCE mandatory}| { ID id-DefaultPagingDRX CRITICALITY ignore TYPE PagingDRX PRESENCE mandatory}| { ID id-CSG-IdList CRITICALITY reject TYPE CSG-IdList PRESENCE optional}| { ID id-UE-RetentionInformation CRITICALITY ignore TYPE UE-RetentionInformation PRESENCE optional}| { ID id-NB-IoT-DefaultPagingDRX CRITICALITY ignore TYPE NB-IoT-DefaultPagingDRX PRESENCE optional}, ... } -- ************************************************************** -- -- S1 Setup Response -- -- ************************************************************** S1SetupResponse ::= SEQUENCE { protocolIEs ProtocolIE-Container { {S1SetupResponseIEs} }, ... } S1SetupResponseIEs S1AP-PROTOCOL-IES ::= { { ID id-MMEname CRITICALITY ignore TYPE MMEname PRESENCE optional}| { ID id-ServedGUMMEIs CRITICALITY reject TYPE ServedGUMMEIs PRESENCE mandatory}| { ID id-RelativeMMECapacity CRITICALITY ignore TYPE RelativeMMECapacity PRESENCE mandatory}| { ID id-MMERelaySupportIndicator CRITICALITY ignore TYPE MMERelaySupportIndicator PRESENCE optional}| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| { ID id-UE-RetentionInformation CRITICALITY ignore TYPE UE-RetentionInformation PRESENCE optional}| { ID id-ServedDCNs CRITICALITY ignore TYPE ServedDCNs PRESENCE optional}, ... } -- ************************************************************** -- -- S1 Setup Failure -- -- ************************************************************** S1SetupFailure ::= SEQUENCE { protocolIEs ProtocolIE-Container { {S1SetupFailureIEs} }, ... } S1SetupFailureIEs S1AP-PROTOCOL-IES ::= { { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- ENB CONFIGURATION UPDATE ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- eNB Configuration Update -- -- ************************************************************** ENBConfigurationUpdate ::= SEQUENCE { protocolIEs ProtocolIE-Container { {ENBConfigurationUpdateIEs} }, ... } ENBConfigurationUpdateIEs S1AP-PROTOCOL-IES ::= { { ID id-eNBname CRITICALITY ignore TYPE ENBname PRESENCE optional}| { ID id-SupportedTAs CRITICALITY reject TYPE SupportedTAs PRESENCE optional}| { ID id-CSG-IdList CRITICALITY reject TYPE CSG-IdList PRESENCE optional}| { ID id-DefaultPagingDRX CRITICALITY ignore TYPE PagingDRX PRESENCE optional}| { ID id-NB-IoT-DefaultPagingDRX CRITICALITY ignore TYPE NB-IoT-DefaultPagingDRX PRESENCE optional}, ... } -- ************************************************************** -- -- eNB Configuration Update Acknowledge -- -- ************************************************************** ENBConfigurationUpdateAcknowledge ::= SEQUENCE { protocolIEs ProtocolIE-Container { {ENBConfigurationUpdateAcknowledgeIEs} }, ... } ENBConfigurationUpdateAcknowledgeIEs S1AP-PROTOCOL-IES ::= { { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- eNB Configuration Update Failure -- -- ************************************************************** ENBConfigurationUpdateFailure ::= SEQUENCE { protocolIEs ProtocolIE-Container { {ENBConfigurationUpdateFailureIEs} }, ... } ENBConfigurationUpdateFailureIEs S1AP-PROTOCOL-IES ::= { { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- MME CONFIGURATION UPDATE ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- MME Configuration Update -- -- ************************************************************** MMEConfigurationUpdate ::= SEQUENCE { protocolIEs ProtocolIE-Container { {MMEConfigurationUpdateIEs} }, ... } MMEConfigurationUpdateIEs S1AP-PROTOCOL-IES ::= { { ID id-MMEname CRITICALITY ignore TYPE MMEname PRESENCE optional }| { ID id-ServedGUMMEIs CRITICALITY reject TYPE ServedGUMMEIs PRESENCE optional }| { ID id-RelativeMMECapacity CRITICALITY reject TYPE RelativeMMECapacity PRESENCE optional }| { ID id-ServedDCNs CRITICALITY ignore TYPE ServedDCNs PRESENCE optional}, ... } -- ************************************************************** -- -- MME Configuration Update Acknowledge -- -- ************************************************************** MMEConfigurationUpdateAcknowledge ::= SEQUENCE { protocolIEs ProtocolIE-Container { {MMEConfigurationUpdateAcknowledgeIEs} }, ... } MMEConfigurationUpdateAcknowledgeIEs S1AP-PROTOCOL-IES ::= { { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- MME Configuration Update Failure -- -- ************************************************************** MMEConfigurationUpdateFailure ::= SEQUENCE { protocolIEs ProtocolIE-Container { {MMEConfigurationUpdateFailureIEs} }, ... } MMEConfigurationUpdateFailureIEs S1AP-PROTOCOL-IES ::= { { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }| { ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- DOWNLINK S1 CDMA2000 TUNNELLING ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Downlink S1 CDMA2000 Tunnelling -- -- ************************************************************** DownlinkS1cdma2000tunnelling ::= SEQUENCE { protocolIEs ProtocolIE-Container { {DownlinkS1cdma2000tunnellingIEs} }, ... } DownlinkS1cdma2000tunnellingIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-E-RABSubjecttoDataForwardingList CRITICALITY ignore TYPE E-RABSubjecttoDataForwardingList PRESENCE optional }| { ID id-cdma2000HOStatus CRITICALITY ignore TYPE Cdma2000HOStatus PRESENCE optional }| { ID id-cdma2000RATType CRITICALITY reject TYPE Cdma2000RATType PRESENCE mandatory }| { ID id-cdma2000PDU CRITICALITY reject TYPE Cdma2000PDU PRESENCE mandatory }, ... } -- ************************************************************** -- -- UPLINK S1 CDMA2000 TUNNELLING ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Uplink S1 CDMA2000 Tunnelling -- -- ************************************************************** UplinkS1cdma2000tunnelling ::= SEQUENCE { protocolIEs ProtocolIE-Container { {UplinkS1cdma2000tunnellingIEs} }, ... } UplinkS1cdma2000tunnellingIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-cdma2000RATType CRITICALITY reject TYPE Cdma2000RATType PRESENCE mandatory }| { ID id-cdma2000SectorID CRITICALITY reject TYPE Cdma2000SectorID PRESENCE mandatory }| { ID id-cdma2000HORequiredIndication CRITICALITY ignore TYPE Cdma2000HORequiredIndication PRESENCE optional }| { ID id-cdma2000OneXSRVCCInfo CRITICALITY reject TYPE Cdma2000OneXSRVCCInfo PRESENCE optional }| { ID id-cdma2000OneXRAND CRITICALITY reject TYPE Cdma2000OneXRAND PRESENCE optional }| { ID id-cdma2000PDU CRITICALITY reject TYPE Cdma2000PDU PRESENCE mandatory }| { ID id-EUTRANRoundTripDelayEstimationInfo CRITICALITY ignore TYPE EUTRANRoundTripDelayEstimationInfo PRESENCE optional }, -- Extension for Release 9 to assist target HRPD access with the acquisition of the UE -- ... } -- ************************************************************** -- -- UE CAPABILITY INFO INDICATION ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- UE Capability Info Indication -- -- ************************************************************** UECapabilityInfoIndication ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UECapabilityInfoIndicationIEs} }, ... } UECapabilityInfoIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE mandatory}| { ID id-UERadioCapabilityForPaging CRITICALITY ignore TYPE UERadioCapabilityForPaging PRESENCE optional}, ... } -- ************************************************************** -- -- eNB STATUS TRANSFER ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- eNB Status Transfer -- -- ************************************************************** ENBStatusTransfer ::= SEQUENCE { protocolIEs ProtocolIE-Container { {ENBStatusTransferIEs} }, ... } ENBStatusTransferIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-StatusTransfer-TransparentContainer CRITICALITY reject TYPE ENB-StatusTransfer-TransparentContainer PRESENCE mandatory}, ... } -- ************************************************************** -- -- MME STATUS TRANSFER ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- MME Status Transfer -- -- ************************************************************** MMEStatusTransfer ::= SEQUENCE { protocolIEs ProtocolIE-Container { {MMEStatusTransferIEs} }, ... } MMEStatusTransferIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-StatusTransfer-TransparentContainer CRITICALITY reject TYPE ENB-StatusTransfer-TransparentContainer PRESENCE mandatory}, ... } -- ************************************************************** -- -- TRACE ELEMENTARY PROCEDURES -- -- ************************************************************** -- ************************************************************** -- -- Trace Start -- -- ************************************************************** TraceStart ::= SEQUENCE { protocolIEs ProtocolIE-Container { {TraceStartIEs} }, ... } TraceStartIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-TraceActivation CRITICALITY ignore TYPE TraceActivation PRESENCE mandatory }, ... } -- ************************************************************** -- -- Trace Failure Indication -- -- ************************************************************** TraceFailureIndication ::= SEQUENCE { protocolIEs ProtocolIE-Container { {TraceFailureIndicationIEs} }, ... } TraceFailureIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-E-UTRAN-Trace-ID CRITICALITY ignore TYPE E-UTRAN-Trace-ID PRESENCE mandatory }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, ... } -- ************************************************************** -- -- DEACTIVATE TRACE ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Deactivate Trace -- -- ************************************************************** DeactivateTrace ::= SEQUENCE { protocolIEs ProtocolIE-Container { { DeactivateTraceIEs} }, ... } DeactivateTraceIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-E-UTRAN-Trace-ID CRITICALITY ignore TYPE E-UTRAN-Trace-ID PRESENCE mandatory }, ... } -- ************************************************************** -- -- CELL TRAFFIC TRACE ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Cell Traffic Trace -- -- ************************************************************** CellTrafficTrace ::= SEQUENCE { protocolIEs ProtocolIE-Container { { CellTrafficTraceIEs } }, ... } CellTrafficTraceIEs S1AP-PROTOCOL-IES ::= { {ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| {ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| {ID id-E-UTRAN-Trace-ID CRITICALITY ignore TYPE E-UTRAN-Trace-ID PRESENCE mandatory }| {ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory }| {ID id-TraceCollectionEntityIPAddress CRITICALITY ignore TYPE TransportLayerAddress PRESENCE mandatory }| {ID id-PrivacyIndicator CRITICALITY ignore TYPE PrivacyIndicator PRESENCE optional }, ... } -- ************************************************************** -- -- LOCATION ELEMENTARY PROCEDURES -- -- ************************************************************** -- ************************************************************** -- -- Location Reporting Control -- -- ************************************************************** LocationReportingControl ::= SEQUENCE { protocolIEs ProtocolIE-Container { { LocationReportingControlIEs} }, ... } LocationReportingControlIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-RequestType CRITICALITY ignore TYPE RequestType PRESENCE mandatory }, ... } -- ************************************************************** -- -- Location Report Failure Indication -- -- ************************************************************** LocationReportingFailureIndication ::= SEQUENCE { protocolIEs ProtocolIE-Container { { LocationReportingFailureIndicationIEs} }, ... } LocationReportingFailureIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }, ... } -- ************************************************************** -- -- Location Report -- -- ************************************************************** LocationReport ::= SEQUENCE { protocolIEs ProtocolIE-Container { { LocationReportIEs} }, ... } LocationReportIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory }| { ID id-TAI CRITICALITY ignore TYPE TAI PRESENCE mandatory }| { ID id-RequestType CRITICALITY ignore TYPE RequestType PRESENCE mandatory }, ... } -- ************************************************************** -- -- OVERLOAD ELEMENTARY PROCEDURES -- -- ************************************************************** -- ************************************************************** -- -- Overload Start -- -- ************************************************************** OverloadStart ::= SEQUENCE { protocolIEs ProtocolIE-Container { {OverloadStartIEs} }, ... } OverloadStartIEs S1AP-PROTOCOL-IES ::= { { ID id-OverloadResponse CRITICALITY reject TYPE OverloadResponse PRESENCE mandatory }| { ID id-GUMMEIList CRITICALITY ignore TYPE GUMMEIList PRESENCE optional }| { ID id-TrafficLoadReductionIndication CRITICALITY ignore TYPE TrafficLoadReductionIndication PRESENCE optional }, ... } -- ************************************************************** -- -- Overload Stop -- -- ************************************************************** OverloadStop ::= SEQUENCE { protocolIEs ProtocolIE-Container { {OverloadStopIEs} }, ... } OverloadStopIEs S1AP-PROTOCOL-IES ::= { { ID id-GUMMEIList CRITICALITY ignore TYPE GUMMEIList PRESENCE optional }, ... } -- ************************************************************** -- -- WRITE-REPLACE WARNING ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Write-Replace Warning Request -- -- ************************************************************** WriteReplaceWarningRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { {WriteReplaceWarningRequestIEs} }, ... } WriteReplaceWarningRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-MessageIdentifier CRITICALITY reject TYPE MessageIdentifier PRESENCE mandatory }| { ID id-SerialNumber CRITICALITY reject TYPE SerialNumber PRESENCE mandatory }| { ID id-WarningAreaList CRITICALITY ignore TYPE WarningAreaList PRESENCE optional }| { ID id-RepetitionPeriod CRITICALITY reject TYPE RepetitionPeriod PRESENCE mandatory }| { ID id-ExtendedRepetitionPeriod CRITICALITY reject TYPE ExtendedRepetitionPeriod PRESENCE optional }| { ID id-NumberofBroadcastRequest CRITICALITY reject TYPE NumberofBroadcastRequest PRESENCE mandatory }| { ID id-WarningType CRITICALITY ignore TYPE WarningType PRESENCE optional }| { ID id-WarningSecurityInfo CRITICALITY ignore TYPE WarningSecurityInfo PRESENCE optional }| { ID id-DataCodingScheme CRITICALITY ignore TYPE DataCodingScheme PRESENCE optional }| { ID id-WarningMessageContents CRITICALITY ignore TYPE WarningMessageContents PRESENCE optional }| { ID id-ConcurrentWarningMessageIndicator CRITICALITY reject TYPE ConcurrentWarningMessageIndicator PRESENCE optional }, ... } -- ************************************************************** -- -- Write-Replace Warning Response -- -- ************************************************************** WriteReplaceWarningResponse ::= SEQUENCE { protocolIEs ProtocolIE-Container { {WriteReplaceWarningResponseIEs} }, ... } WriteReplaceWarningResponseIEs S1AP-PROTOCOL-IES ::= { { ID id-MessageIdentifier CRITICALITY reject TYPE MessageIdentifier PRESENCE mandatory }| { ID id-SerialNumber CRITICALITY reject TYPE SerialNumber PRESENCE mandatory }| { ID id-BroadcastCompletedAreaList CRITICALITY ignore TYPE BroadcastCompletedAreaList PRESENCE optional }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- eNB DIRECT INFORMATION TRANSFER ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- eNB Direct Information Transfer -- -- ************************************************************** ENBDirectInformationTransfer ::= SEQUENCE { protocolIEs ProtocolIE-Container {{ ENBDirectInformationTransferIEs}}, ... } ENBDirectInformationTransferIEs S1AP-PROTOCOL-IES ::= { { ID id-Inter-SystemInformationTransferTypeEDT CRITICALITY reject TYPE Inter-SystemInformationTransferType PRESENCE mandatory }, ... } Inter-SystemInformationTransferType ::= CHOICE { rIMTransfer RIMTransfer, ... } -- ************************************************************** -- -- MME DIRECT INFORMATION TRANSFER ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- MME Direct Information Transfer -- -- ************************************************************** MMEDirectInformationTransfer ::= SEQUENCE { protocolIEs ProtocolIE-Container {{ MMEDirectInformationTransferIEs}}, ... } MMEDirectInformationTransferIEs S1AP-PROTOCOL-IES ::= { { ID id-Inter-SystemInformationTransferTypeMDT CRITICALITY reject TYPE Inter-SystemInformationTransferType PRESENCE mandatory }, ... } -- ************************************************************** -- -- eNB CONFIGURATION TRANSFER ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- eNB Configuration Transfer -- -- ************************************************************** ENBConfigurationTransfer ::= SEQUENCE { protocolIEs ProtocolIE-Container {{ ENBConfigurationTransferIEs}}, ... } ENBConfigurationTransferIEs S1AP-PROTOCOL-IES ::= { { ID id-SONConfigurationTransferECT CRITICALITY ignore TYPE SONConfigurationTransfer PRESENCE optional }, ... } -- ************************************************************** -- -- MME CONFIGURATION TRANSFER ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- MME Configuration Transfer -- -- ************************************************************** MMEConfigurationTransfer ::= SEQUENCE { protocolIEs ProtocolIE-Container {{ MMEConfigurationTransferIEs}}, ... } MMEConfigurationTransferIEs S1AP-PROTOCOL-IES ::= { { ID id-SONConfigurationTransferMCT CRITICALITY ignore TYPE SONConfigurationTransfer PRESENCE optional }, ... } -- ************************************************************** -- -- PRIVATE MESSAGE ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Private Message -- -- ************************************************************** PrivateMessage ::= SEQUENCE { privateIEs PrivateIE-Container {{PrivateMessageIEs}}, ... } PrivateMessageIEs S1AP-PRIVATE-IES ::= { ... } -- ************************************************************** -- -- KILL PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- Kill Request -- -- ************************************************************** KillRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { {KillRequestIEs} }, ... } KillRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-MessageIdentifier CRITICALITY reject TYPE MessageIdentifier PRESENCE mandatory}| { ID id-SerialNumber CRITICALITY reject TYPE SerialNumber PRESENCE mandatory}| { ID id-WarningAreaList CRITICALITY ignore TYPE WarningAreaList PRESENCE optional}| { ID id-KillAllWarningMessages CRITICALITY reject TYPE KillAllWarningMessages PRESENCE optional}, ... } -- ************************************************************** -- -- Kill Response -- -- ************************************************************** KillResponse ::= SEQUENCE { protocolIEs ProtocolIE-Container { {KillResponseIEs} }, ... } KillResponseIEs S1AP-PROTOCOL-IES ::= { { ID id-MessageIdentifier CRITICALITY reject TYPE MessageIdentifier PRESENCE mandatory }| { ID id-SerialNumber CRITICALITY reject TYPE SerialNumber PRESENCE mandatory }| { ID id-BroadcastCancelledAreaList CRITICALITY ignore TYPE BroadcastCancelledAreaList PRESENCE optional }| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, ... } -- ************************************************************** -- -- PWS RESTART INDICATION PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- PWS Restart Indication -- -- ************************************************************** PWSRestartIndication::= SEQUENCE { protocolIEs ProtocolIE-Container {{ PWSRestartIndicationIEs}}, ... } PWSRestartIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-ECGIListForRestart CRITICALITY reject TYPE ECGIListForRestart PRESENCE mandatory}| { ID id-Global-ENB-ID CRITICALITY reject TYPE Global-ENB-ID PRESENCE mandatory}| { ID id-TAIListForRestart CRITICALITY reject TYPE TAIListForRestart PRESENCE mandatory}| { ID id-EmergencyAreaIDListForRestart CRITICALITY reject TYPE EmergencyAreaIDListForRestart PRESENCE optional}, ... } -- ************************************************************** -- -- PWS Failure Indication -- -- ************************************************************** PWSFailureIndication::= SEQUENCE { protocolIEs ProtocolIE-Container {{ PWSFailureIndicationIEs}}, ... } PWSFailureIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-PWSfailedECGIList CRITICALITY reject TYPE PWSfailedECGIList PRESENCE mandatory}| { ID id-Global-ENB-ID CRITICALITY reject TYPE Global-ENB-ID PRESENCE mandatory}, ... } -- ************************************************************** -- -- LPPA TRANSPORT ELEMENTARY PROCEDURES -- -- ************************************************************** -- ************************************************************** -- -- DOWNLINK UE ASSOCIATED LPPA TRANSPORT -- -- ************************************************************** DownlinkUEAssociatedLPPaTransport ::= SEQUENCE { protocolIEs ProtocolIE-Container {{DownlinkUEAssociatedLPPaTransport-IEs}}, ... } DownlinkUEAssociatedLPPaTransport-IEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-Routing-ID CRITICALITY reject TYPE Routing-ID PRESENCE mandatory }| { ID id-LPPa-PDU CRITICALITY reject TYPE LPPa-PDU PRESENCE mandatory }, ... } -- ************************************************************** -- -- UPLINK UE ASSOCIATED LPPA TRANSPORT -- -- ************************************************************** UplinkUEAssociatedLPPaTransport ::= SEQUENCE { protocolIEs ProtocolIE-Container {{UplinkUEAssociatedLPPaTransport-IEs}}, ... } UplinkUEAssociatedLPPaTransport-IEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory }| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory }| { ID id-Routing-ID CRITICALITY reject TYPE Routing-ID PRESENCE mandatory }| { ID id-LPPa-PDU CRITICALITY reject TYPE LPPa-PDU PRESENCE mandatory }, ... } -- ************************************************************** -- -- DOWNLINK NON UE ASSOCIATED LPPA TRANSPORT -- -- ************************************************************** DownlinkNonUEAssociatedLPPaTransport ::= SEQUENCE { protocolIEs ProtocolIE-Container {{DownlinkNonUEAssociatedLPPaTransport-IEs}}, ... } DownlinkNonUEAssociatedLPPaTransport-IEs S1AP-PROTOCOL-IES ::= { { ID id-Routing-ID CRITICALITY reject TYPE Routing-ID PRESENCE mandatory }| { ID id-LPPa-PDU CRITICALITY reject TYPE LPPa-PDU PRESENCE mandatory }, ... } -- ************************************************************** -- -- UPLINK NON UE ASSOCIATED LPPA TRANSPORT -- -- ************************************************************** UplinkNonUEAssociatedLPPaTransport ::= SEQUENCE { protocolIEs ProtocolIE-Container {{UplinkNonUEAssociatedLPPaTransport-IEs}}, ... } UplinkNonUEAssociatedLPPaTransport-IEs S1AP-PROTOCOL-IES ::= { { ID id-Routing-ID CRITICALITY reject TYPE Routing-ID PRESENCE mandatory }| { ID id-LPPa-PDU CRITICALITY reject TYPE LPPa-PDU PRESENCE mandatory }, ... } -- ************************************************************** -- -- E-RAB MODIFICATION INDICATION ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- E-RAB Modification Indication -- -- ************************************************************** E-RABModificationIndication ::= SEQUENCE { protocolIEs ProtocolIE-Container { { E-RABModificationIndicationIEs} }, ... } E-RABModificationIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-E-RABToBeModifiedListBearerModInd CRITICALITY reject TYPE E-RABToBeModifiedListBearerModInd PRESENCE mandatory}| { ID id-E-RABNotToBeModifiedListBearerModInd CRITICALITY reject TYPE E-RABNotToBeModifiedListBearerModInd PRESENCE optional}| { ID id-CSGMembershipInfo CRITICALITY reject TYPE CSGMembershipInfo PRESENCE optional}| -- Extension for Release 11 to support BBAI -- { ID id-Tunnel-Information-for-BBF CRITICALITY ignore TYPE TunnelInformation PRESENCE optional}, ... } E-RABToBeModifiedListBearerModInd ::= E-RAB-IE-ContainerList { {E-RABToBeModifiedItemBearerModIndIEs} } E-RABToBeModifiedItemBearerModIndIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABToBeModifiedItemBearerModInd CRITICALITY reject TYPE E-RABToBeModifiedItemBearerModInd PRESENCE mandatory}, ... } E-RABToBeModifiedItemBearerModInd ::= SEQUENCE { e-RAB-ID E-RAB-ID, transportLayerAddress TransportLayerAddress, dL-GTP-TEID GTP-TEID, iE-Extensions ProtocolExtensionContainer { { E-RABToBeModifiedItemBearerModInd-ExtIEs} } OPTIONAL, ... } E-RABToBeModifiedItemBearerModInd-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } E-RABNotToBeModifiedListBearerModInd ::= E-RAB-IE-ContainerList { {E-RABNotToBeModifiedItemBearerModIndIEs} } E-RABNotToBeModifiedItemBearerModIndIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABNotToBeModifiedItemBearerModInd CRITICALITY reject TYPE E-RABNotToBeModifiedItemBearerModInd PRESENCE mandatory}, ... } E-RABNotToBeModifiedItemBearerModInd ::= SEQUENCE { e-RAB-ID E-RAB-ID, transportLayerAddress TransportLayerAddress, dL-GTP-TEID GTP-TEID, iE-Extensions ProtocolExtensionContainer { { E-RABNotToBeModifiedItemBearerModInd-ExtIEs} } OPTIONAL, ... } E-RABNotToBeModifiedItemBearerModInd-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } CSGMembershipInfo ::= SEQUENCE { cSGMembershipStatus CSGMembershipStatus, cSG-Id CSG-Id, cellAccessMode CellAccessMode OPTIONAL, pLMNidentity PLMNidentity OPTIONAL, iE-Extensions ProtocolExtensionContainer { { CSGMembershipInfo-ExtIEs} } OPTIONAL, ... } CSGMembershipInfo-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- E-RAB Modification Confirm -- -- ************************************************************** E-RABModificationConfirm ::= SEQUENCE { protocolIEs ProtocolIE-Container { {E-RABModificationConfirmIEs} }, ... } E-RABModificationConfirmIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-E-RABModifyListBearerModConf CRITICALITY ignore TYPE E-RABModifyListBearerModConf PRESENCE optional}| { ID id-E-RABFailedToModifyListBearerModConf CRITICALITY ignore TYPE E-RABList PRESENCE optional}| { ID id-E-RABToBeReleasedListBearerModConf CRITICALITY ignore TYPE E-RABList PRESENCE optional}| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}, ... } E-RABModifyListBearerModConf ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABModifyItemBearerModConfIEs} } E-RABModifyItemBearerModConfIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABModifyItemBearerModConf CRITICALITY ignore TYPE E-RABModifyItemBearerModConf PRESENCE mandatory}, ... } E-RABModifyItemBearerModConf ::= SEQUENCE { e-RAB-ID E-RAB-ID, iE-Extensions ProtocolExtensionContainer { {E-RABModifyItemBearerModConfExtIEs} } OPTIONAL, ... } E-RABModifyItemBearerModConfExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- UE CONTEXT MODIFICATION INDICATION ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- UE Context Modification Indication -- -- ************************************************************** UEContextModificationIndication ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UEContextModificationIndicationIEs} }, ... } UEContextModificationIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-CSGMembershipInfo CRITICALITY reject TYPE CSGMembershipInfo PRESENCE optional}, ... } -- ************************************************************** -- -- UE Context Modification Confirm -- -- ************************************************************** UEContextModificationConfirm ::= SEQUENCE { protocolIEs ProtocolIE-Container { {UEContextModificationConfirmIEs} }, ... } UEContextModificationConfirmIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-CSGMembershipStatus CRITICALITY ignore TYPE CSGMembershipStatus PRESENCE optional}| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, ... } -- ************************************************************** -- -- UE CONTEXT SUSPEND ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- UE Context Suspend Request -- -- ************************************************************** UEContextSuspendRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UEContextSuspendRequestIEs} }, ... } UEContextSuspendRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-InformationOnRecommendedCellsAndENBsForPaging CRITICALITY ignore TYPE InformationOnRecommendedCellsAndENBsForPaging PRESENCE optional}| { ID id-CellIdentifierAndCELevelForCECapableUEs CRITICALITY ignore TYPE CellIdentifierAndCELevelForCECapableUEs PRESENCE optional}, ... } -- ************************************************************** -- -- UE Context Suspend Response -- -- ************************************************************** UEContextSuspendResponse ::= SEQUENCE { protocolIEs ProtocolIE-Container { {UEContextSuspendResponseIEs} }, ... } UEContextSuspendResponseIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| { ID id-SecurityContext CRITICALITY reject TYPE SecurityContext PRESENCE optional}, ... } -- ************************************************************** -- -- UE CONTEXT RESUME ELEMENTARY PROCEDURE -- -- ************************************************************** -- ************************************************************** -- -- UE Context Resume Request -- -- ************************************************************** UEContextResumeRequest ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UEContextResumeRequestIEs} }, ... } UEContextResumeRequestIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-E-RABFailedToResumeListResumeReq CRITICALITY reject TYPE E-RABFailedToResumeListResumeReq PRESENCE optional}| { ID id-RRC-Resume-Cause CRITICALITY ignore TYPE RRC-Establishment-Cause PRESENCE optional}, ... } E-RABFailedToResumeListResumeReq ::= E-RAB-IE-ContainerList { {E-RABFailedToResumeItemResumeReqIEs} } E-RABFailedToResumeItemResumeReqIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABFailedToResumeItemResumeReq CRITICALITY reject TYPE E-RABFailedToResumeItemResumeReq PRESENCE mandatory}, ... } E-RABFailedToResumeItemResumeReq ::= SEQUENCE { e-RAB-ID E-RAB-ID, cause Cause, iE-Extensions ProtocolExtensionContainer { { E-RABFailedToResumeItemResumeReq-ExtIEs} } OPTIONAL, ... } E-RABFailedToResumeItemResumeReq-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- UE Context Resume Response -- -- ************************************************************** UEContextResumeResponse ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UEContextResumeResponseIEs} }, ... } UEContextResumeResponseIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-E-RABFailedToResumeListResumeRes CRITICALITY reject TYPE E-RABFailedToResumeListResumeRes PRESENCE optional}| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}| { ID id-SecurityContext CRITICALITY reject TYPE SecurityContext PRESENCE optional}, ... } E-RABFailedToResumeListResumeRes ::= E-RAB-IE-ContainerList { {E-RABFailedToResumeItemResumeResIEs} } E-RABFailedToResumeItemResumeResIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABFailedToResumeItemResumeRes CRITICALITY reject TYPE E-RABFailedToResumeItemResumeRes PRESENCE mandatory}, ... } E-RABFailedToResumeItemResumeRes ::= SEQUENCE { e-RAB-ID E-RAB-ID, cause Cause, iE-Extensions ProtocolExtensionContainer { { E-RABFailedToResumeItemResumeRes-ExtIEs} } OPTIONAL, ... } E-RABFailedToResumeItemResumeRes-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- ************************************************************** -- -- UE Context Resume Failure -- -- ************************************************************** UEContextResumeFailure ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UEContextResumeFailureIEs} }, ... } UEContextResumeFailureIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}| { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional}, ... } -- ************************************************************** -- -- Connection Establishment Indication -- -- ************************************************************** ConnectionEstablishmentIndication::= SEQUENCE { protocolIEs ProtocolIE-Container { {ConnectionEstablishmentIndicationIEs} }, ... } ConnectionEstablishmentIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY ignore TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY ignore TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE optional }| { ID id-EnhancedCoverageRestricted CRITICALITY ignore TYPE EnhancedCoverageRestricted PRESENCE optional }| { ID id-DL-CP-SecurityInformation CRITICALITY ignore TYPE DL-CP-SecurityInformation PRESENCE optional }, ... } -- ************************************************************** -- -- Retrieve UE Information -- -- ************************************************************** RetrieveUEInformation ::= SEQUENCE { protocolIEs ProtocolIE-Container { { RetrieveUEInformationIEs} }, ... } RetrieveUEInformationIEs S1AP-PROTOCOL-IES ::= { { ID id-S-TMSI CRITICALITY reject TYPE S-TMSI PRESENCE mandatory}, ... } -- ************************************************************** -- UE Information Transfer -- -- ************************************************************** UEInformationTransfer ::= SEQUENCE { protocolIEs ProtocolIE-Container { { UEInformationTransferIEs} }, ... } UEInformationTransferIEs S1AP-PROTOCOL-IES ::= { { ID id-S-TMSI CRITICALITY reject TYPE S-TMSI PRESENCE mandatory}| { ID id-UE-Level-QoS-Parameters CRITICALITY ignore TYPE E-RABLevelQoSParameters PRESENCE optional}| { ID id-UERadioCapability CRITICALITY ignore TYPE UERadioCapability PRESENCE optional}, ... } -- ************************************************************** -- -- eNB CP Relocation Indication -- -- ************************************************************** ENBCPRelocationIndication ::= SEQUENCE { protocolIEs ProtocolIE-Container { { ENBCPRelocationIndicationIEs} }, ... } ENBCPRelocationIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}| { ID id-S-TMSI CRITICALITY reject TYPE S-TMSI PRESENCE mandatory}| { ID id-EUTRAN-CGI CRITICALITY ignore TYPE EUTRAN-CGI PRESENCE mandatory}| { ID id-TAI CRITICALITY ignore TYPE TAI PRESENCE mandatory}| { ID id-UL-CP-SecurityInformation CRITICALITY reject TYPE UL-CP-SecurityInformation PRESENCE mandatory}, ... } -- ************************************************************** -- -- MME CP Relocation Indication -- -- ************************************************************** MMECPRelocationIndication ::= SEQUENCE { protocolIEs ProtocolIE-Container { { MMECPRelocationIndicationIEs} }, ... } MMECPRelocationIndicationIEs S1AP-PROTOCOL-IES ::= { { ID id-MME-UE-S1AP-ID CRITICALITY reject TYPE MME-UE-S1AP-ID PRESENCE mandatory}| { ID id-eNB-UE-S1AP-ID CRITICALITY reject TYPE ENB-UE-S1AP-ID PRESENCE mandatory}, ... } END 9.3.4 Information Element Definitions -- ************************************************************** -- -- Information Element Definitions -- -- ************************************************************** S1AP-IEs { itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) eps-Access (21) modules (3) s1ap (1) version1 (1) s1ap-IEs (2) } DEFINITIONS AUTOMATIC TAGS ::= BEGIN IMPORTS id-E-RABInformationListItem, id-E-RABItem, id-Bearers-SubjectToStatusTransfer-Item, id-Time-Synchronisation-Info, id-x2TNLConfigurationInfo, id-eNBX2ExtendedTransportLayerAddresses, id-MDTConfiguration, id-Time-UE-StayedInCell-EnhancedGranularity, id-HO-Cause, id-M3Configuration, id-M4Configuration, id-M5Configuration, id-MDT-Location-Info, id-SignallingBasedMDTPLMNList, id-MobilityInformation, id-ULCOUNTValueExtended, id-DLCOUNTValueExtended, id-ReceiveStatusOfULPDCPSDUsExtended, id-eNBIndirectX2TransportLayerAddresses, id-Muting-Availability-Indication, id-Muting-Pattern-Information, id-Synchronisation-Information, id-uE-HistoryInformationFromTheUE, id-LoggedMBSFNMDT, id-SON-Information-Report, id-RecommendedCellItem, id-RecommendedENBItem, id-ProSeUEtoNetworkRelaying, id-ULCOUNTValuePDCP-SNlength18, id-DLCOUNTValuePDCP-SNlength18, id-ReceiveStatusOfULPDCPSDUsPDCP-SNlength18, id-M6Configuration, id-M7Configuration, id-RAT-Type, maxnoofCSGs, maxnoofE-RABs, maxnoofErrors, maxnoofBPLMNs, maxnoofPLMNsPerMME, maxnoofTACs, maxnoofEPLMNs, maxnoofEPLMNsPlusOne, maxnoofForbLACs, maxnoofForbTACs, maxnoofCells, maxnoofCellID, maxnoofDCNs, maxnoofEmergencyAreaID, maxnoofTAIforWarning, maxnoofCellinTAI, maxnoofCellinEAI, maxnoofeNBX2TLAs, maxnoofeNBX2ExtTLAs, maxnoofeNBX2GTPTLAs, maxnoofRATs, maxnoofGroupIDs, maxnoofMMECs, maxnoofTAforMDT, maxnoofCellIDforMDT, maxnoofMDTPLMNs, maxnoofCellsforRestart, maxnoofRestartTAIs, maxnoofRestartEmergencyAreaIDs, maxnoofMBSFNAreaMDT, maxEARFCN, maxnoofCellsineNB, maxnoofRecommendedCells, maxnoofRecommendedENBs FROM S1AP-Constants Criticality, ProcedureCode, ProtocolIE-ID, TriggeringMessage FROM S1AP-CommonDataTypes ProtocolExtensionContainer{}, S1AP-PROTOCOL-EXTENSION, ProtocolIE-SingleContainer{}, S1AP-PROTOCOL-IES FROM S1AP-Containers; -- A Additional-GUTI::= SEQUENCE { gUMMEI GUMMEI, m-TMSI M-TMSI, iE-Extensions ProtocolExtensionContainer { {Additional-GUTI-ExtIEs} } OPTIONAL, ... } Additional-GUTI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } AreaScopeOfMDT ::= CHOICE { cellBased CellBasedMDT, tABased TABasedMDT, pLMNWide NULL, ..., tAIBased TAIBasedMDT } AllocationAndRetentionPriority ::= SEQUENCE { priorityLevel PriorityLevel, pre-emptionCapability Pre-emptionCapability, pre-emptionVulnerability Pre-emptionVulnerability, iE-Extensions ProtocolExtensionContainer { {AllocationAndRetentionPriority-ExtIEs} } OPTIONAL, ... } AllocationAndRetentionPriority-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } AssistanceDataForCECapableUEs ::= SEQUENCE { cellIdentifierAndCELevelForCECapableUEs CellIdentifierAndCELevelForCECapableUEs, iE-Extensions ProtocolExtensionContainer { { InformationForCECapableUEs-ExtIEs} } OPTIONAL, ... } InformationForCECapableUEs-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } AssistanceDataForPaging ::= SEQUENCE { assistanceDataForRecommendedCells AssistanceDataForRecommendedCells OPTIONAL, assistanceDataForCECapableUEs AssistanceDataForCECapableUEs OPTIONAL, pagingAttemptInformation PagingAttemptInformation OPTIONAL, iE-Extensions ProtocolExtensionContainer { { AssistanceDataForPaging-ExtIEs} } OPTIONAL, ... } AssistanceDataForPaging-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } AssistanceDataForRecommendedCells ::= SEQUENCE { recommendedCellsForPaging RecommendedCellsForPaging, iE-Extensions ProtocolExtensionContainer { { AssistanceDataForRecommendedCells-ExtIEs} } OPTIONAL, ... } AssistanceDataForRecommendedCells-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- B Bearers-SubjectToStatusTransferList ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { { Bearers-SubjectToStatusTransfer-ItemIEs } } Bearers-SubjectToStatusTransfer-ItemIEs S1AP-PROTOCOL-IES ::= { { ID id-Bearers-SubjectToStatusTransfer-Item CRITICALITY ignore TYPE Bearers-SubjectToStatusTransfer-Item PRESENCE mandatory }, ... } Bearers-SubjectToStatusTransfer-Item ::= SEQUENCE { e-RAB-ID E-RAB-ID, uL-COUNTvalue COUNTvalue, dL-COUNTvalue COUNTvalue, receiveStatusofULPDCPSDUs ReceiveStatusofULPDCPSDUs OPTIONAL, iE-Extensions ProtocolExtensionContainer { {Bearers-SubjectToStatusTransfer-ItemExtIEs} } OPTIONAL, ... } Bearers-SubjectToStatusTransfer-ItemExtIEs S1AP-PROTOCOL-EXTENSION ::= { { ID id-ULCOUNTValueExtended CRITICALITY ignore EXTENSION COUNTValueExtended PRESENCE optional}| { ID id-DLCOUNTValueExtended CRITICALITY ignore EXTENSION COUNTValueExtended PRESENCE optional}| { ID id-ReceiveStatusOfULPDCPSDUsExtended CRITICALITY ignore EXTENSION ReceiveStatusOfULPDCPSDUsExtended PRESENCE optional}| { ID id-ULCOUNTValuePDCP-SNlength18 CRITICALITY ignore EXTENSION COUNTvaluePDCP-SNlength18 PRESENCE optional}| { ID id-DLCOUNTValuePDCP-SNlength18 CRITICALITY ignore EXTENSION COUNTvaluePDCP-SNlength18 PRESENCE optional}| { ID id-ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 CRITICALITY ignore EXTENSION ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 PRESENCE optional}, ... } BearerType ::= ENUMERATED { non-IP, ... } BitRate ::= INTEGER (0..10000000000) BPLMNs ::= SEQUENCE (SIZE(1.. maxnoofBPLMNs)) OF PLMNidentity BroadcastCancelledAreaList ::= CHOICE { cellID-Cancelled CellID-Cancelled, tAI-Cancelled TAI-Cancelled, emergencyAreaID-Cancelled EmergencyAreaID-Cancelled, ... } BroadcastCompletedAreaList ::= CHOICE { cellID-Broadcast CellID-Broadcast, tAI-Broadcast TAI-Broadcast, emergencyAreaID-Broadcast EmergencyAreaID-Broadcast, ... } -- C CancelledCellinEAI ::= SEQUENCE (SIZE(1..maxnoofCellinEAI)) OF CancelledCellinEAI-Item CancelledCellinEAI-Item ::= SEQUENCE { eCGI EUTRAN-CGI, numberOfBroadcasts NumberOfBroadcasts, iE-Extensions ProtocolExtensionContainer { {CancelledCellinEAI-Item-ExtIEs} } OPTIONAL, ... } CancelledCellinEAI-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } CancelledCellinTAI ::= SEQUENCE (SIZE(1..maxnoofCellinTAI)) OF CancelledCellinTAI-Item CancelledCellinTAI-Item ::= SEQUENCE{ eCGI EUTRAN-CGI, numberOfBroadcasts NumberOfBroadcasts, iE-Extensions ProtocolExtensionContainer { {CancelledCellinTAI-Item-ExtIEs} } OPTIONAL, ... } CancelledCellinTAI-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } Cause ::= CHOICE { radioNetwork CauseRadioNetwork, transport CauseTransport, nas CauseNas, protocol CauseProtocol, misc CauseMisc, ... } CauseMisc ::= ENUMERATED { control-processing-overload, not-enough-user-plane-processing-resources, hardware-failure, om-intervention, unspecified, unknown-PLMN, ... } CauseProtocol ::= ENUMERATED { transfer-syntax-error, abstract-syntax-error-reject, abstract-syntax-error-ignore-and-notify, message-not-compatible-with-receiver-state, semantic-error, abstract-syntax-error-falsely-constructed-message, unspecified, ... } CauseRadioNetwork ::= ENUMERATED { unspecified, tx2relocoverall-expiry, successful-handover, release-due-to-eutran-generated-reason, handover-cancelled, partial-handover, ho-failure-in-target-EPC-eNB-or-target-system, ho-target-not-allowed, tS1relocoverall-expiry, tS1relocprep-expiry, cell-not-available, unknown-targetID, no-radio-resources-available-in-target-cell, unknown-mme-ue-s1ap-id, unknown-enb-ue-s1ap-id, unknown-pair-ue-s1ap-id, handover-desirable-for-radio-reason, time-critical-handover, resource-optimisation-handover, reduce-load-in-serving-cell, user-inactivity, radio-connection-with-ue-lost, load-balancing-tau-required, cs-fallback-triggered, ue-not-available-for-ps-service, radio-resources-not-available, failure-in-radio-interface-procedure, invalid-qos-combination, interrat-redirection, interaction-with-other-procedure, unknown-E-RAB-ID, multiple-E-RAB-ID-instances, encryption-and-or-integrity-protection-algorithms-not-supported, s1-intra-system-handover-triggered, s1-inter-system-handover-triggered, x2-handover-triggered, ..., redirection-towards-1xRTT, not-supported-QCI-value, invalid-CSG-Id, release-due-to-pre-emption } CauseTransport ::= ENUMERATED { transport-resource-unavailable, unspecified, ... } CauseNas ::= ENUMERATED { normal-release, authentication-failure, detach, unspecified, ..., csg-subscription-expiry } CellAccessMode ::= ENUMERATED { hybrid, ... } CellIdentifierAndCELevelForCECapableUEs ::= SEQUENCE { global-Cell-ID EUTRAN-CGI, cELevel CELevel, iE-Extensions ProtocolExtensionContainer { { CellIdentifierAndCELevelForCECapableUEs-ExtIEs} } OPTIONAL, ... } CellIdentifierAndCELevelForCECapableUEs-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- Coverage Enhancement level encoded according to TS 36.331 [16] -- CELevel ::= OCTET STRING CE-mode-B-SupportIndicator ::= ENUMERATED { supported, ... } CellIdentity ::= BIT STRING (SIZE (28)) CellID-Broadcast ::= SEQUENCE (SIZE(1..maxnoofCellID)) OF CellID-Broadcast-Item CellID-Broadcast-Item ::= SEQUENCE { eCGI EUTRAN-CGI, iE-Extensions ProtocolExtensionContainer { {CellID-Broadcast-Item-ExtIEs} } OPTIONAL, ... } CellID-Broadcast-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } CellID-Cancelled::= SEQUENCE (SIZE(1..maxnoofCellID)) OF CellID-Cancelled-Item CellID-Cancelled-Item ::= SEQUENCE { eCGI EUTRAN-CGI, numberOfBroadcasts NumberOfBroadcasts, iE-Extensions ProtocolExtensionContainer { {CellID-Cancelled-Item-ExtIEs} } OPTIONAL, ... } CellID-Cancelled-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } CellBasedMDT::= SEQUENCE { cellIdListforMDT CellIdListforMDT, iE-Extensions ProtocolExtensionContainer { {CellBasedMDT-ExtIEs} } OPTIONAL, ... } CellBasedMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } CellIdListforMDT ::= SEQUENCE (SIZE(1..maxnoofCellIDforMDT)) OF EUTRAN-CGI Cdma2000PDU ::= OCTET STRING Cdma2000RATType ::= ENUMERATED { hRPD, onexRTT, ... } Cdma2000SectorID ::= OCTET STRING Cdma2000HOStatus ::= ENUMERATED { hOSuccess, hOFailure, ... } Cdma2000HORequiredIndication ::= ENUMERATED { true, ... } Cdma2000OneXSRVCCInfo ::= SEQUENCE { cdma2000OneXMEID Cdma2000OneXMEID, cdma2000OneXMSI Cdma2000OneXMSI, cdma2000OneXPilot Cdma2000OneXPilot, iE-Extensions ProtocolExtensionContainer { {Cdma2000OneXSRVCCInfo-ExtIEs} } OPTIONAL, ... } Cdma2000OneXSRVCCInfo-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } Cdma2000OneXMEID ::= OCTET STRING Cdma2000OneXMSI ::= OCTET STRING Cdma2000OneXPilot ::= OCTET STRING Cdma2000OneXRAND ::= OCTET STRING Cell-Size ::= ENUMERATED {verysmall, small, medium, large, ...} CellType ::= SEQUENCE { cell-Size Cell-Size, iE-Extensions ProtocolExtensionContainer { { CellType-ExtIEs}} OPTIONAL, ... } CellType-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } CGI ::= SEQUENCE { pLMNidentity PLMNidentity, lAC LAC, cI CI, rAC RAC OPTIONAL, iE-Extensions ProtocolExtensionContainer { {CGI-ExtIEs} } OPTIONAL, ... } CGI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } CI ::= OCTET STRING (SIZE (2)) CNDomain ::= ENUMERATED { ps, cs } ConcurrentWarningMessageIndicator ::= ENUMERATED { true } Correlation-ID ::= OCTET STRING (SIZE (4)) CSFallbackIndicator ::= ENUMERATED { cs-fallback-required, ..., cs-fallback-high-priority } AdditionalCSFallbackIndicator ::= ENUMERATED { no-restriction, restriction, ... } CSG-Id ::= BIT STRING (SIZE (27)) CSG-IdList ::= SEQUENCE (SIZE (1.. maxnoofCSGs)) OF CSG-IdList-Item CSG-IdList-Item ::= SEQUENCE { cSG-Id CSG-Id, iE-Extensions ProtocolExtensionContainer { {CSG-IdList-Item-ExtIEs} } OPTIONAL, ... } CSG-IdList-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } CSGMembershipStatus ::= ENUMERATED { member, not-member } COUNTvalue ::= SEQUENCE { pDCP-SN PDCP-SN, hFN HFN, iE-Extensions ProtocolExtensionContainer { {COUNTvalue-ExtIEs} } OPTIONAL, ... } COUNTvalue-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } COUNTValueExtended ::= SEQUENCE { pDCP-SNExtended PDCP-SNExtended, hFNModified HFNModified, iE-Extensions ProtocolExtensionContainer { {COUNTValueExtended-ExtIEs} } OPTIONAL, ... } COUNTValueExtended-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } COUNTvaluePDCP-SNlength18 ::= SEQUENCE { pDCP-SNlength18 PDCP-SNlength18, hFNforPDCP-SNlength18 HFNforPDCP-SNlength18, iE-Extensions ProtocolExtensionContainer { {COUNTvaluePDCP-SNlength18-ExtIEs} } OPTIONAL, ... } COUNTvaluePDCP-SNlength18-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } Coverage-Level ::= ENUMERATED { extendedcoverage, ... } CriticalityDiagnostics ::= SEQUENCE { procedureCode ProcedureCode OPTIONAL, triggeringMessage TriggeringMessage OPTIONAL, procedureCriticality Criticality OPTIONAL, iEsCriticalityDiagnostics CriticalityDiagnostics-IE-List OPTIONAL, iE-Extensions ProtocolExtensionContainer {{CriticalityDiagnostics-ExtIEs}} OPTIONAL, ... } CriticalityDiagnostics-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } CriticalityDiagnostics-IE-List ::= SEQUENCE (SIZE (1.. maxnoofErrors)) OF CriticalityDiagnostics-IE-Item CriticalityDiagnostics-IE-Item ::= SEQUENCE { iECriticality Criticality, iE-ID ProtocolIE-ID, typeOfError TypeOfError, iE-Extensions ProtocolExtensionContainer {{CriticalityDiagnostics-IE-Item-ExtIEs}} OPTIONAL, ... } CriticalityDiagnostics-IE-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- D DataCodingScheme ::= BIT STRING (SIZE (8)) DCN-ID ::= INTEGER (0..65535) ServedDCNs ::= SEQUENCE (SIZE(0..maxnoofDCNs)) OF ServedDCNsItem ServedDCNsItem ::= SEQUENCE { dCN-ID DCN-ID, relativeDCNCapacity RelativeMMECapacity, iE-Extensions ProtocolExtensionContainer { {ServedDCNsItem-ExtIEs} } OPTIONAL, ... } ServedDCNsItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } DL-CP-SecurityInformation ::= SEQUENCE { dl-NAS-MAC DL-NAS-MAC, iE-Extensions ProtocolExtensionContainer { { DL-CP-SecurityInformation-ExtIEs} } OPTIONAL, ... } DL-CP-SecurityInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } DL-Forwarding ::= ENUMERATED { dL-Forwarding-proposed, ... } DL-NAS-MAC ::= BIT STRING (SIZE (16)) Direct-Forwarding-Path-Availability ::= ENUMERATED { directPathAvailable, ... } Data-Forwarding-Not-Possible ::= ENUMERATED { data-Forwarding-not-Possible, ... } DLNASPDUDeliveryAckRequest ::= ENUMERATED { requested, ... } -- E EARFCN ::= INTEGER(0..maxEARFCN, ...) ECGIList ::= SEQUENCE (SIZE(1..maxnoofCellID)) OF EUTRAN-CGI PWSfailedECGIList ::= SEQUENCE (SIZE(1..maxnoofCellsineNB)) OF EUTRAN-CGI EmergencyAreaIDList ::= SEQUENCE (SIZE(1..maxnoofEmergencyAreaID)) OF EmergencyAreaID EmergencyAreaID ::= OCTET STRING (SIZE (3)) EmergencyAreaID-Broadcast ::= SEQUENCE (SIZE(1..maxnoofEmergencyAreaID)) OF EmergencyAreaID-Broadcast-Item EmergencyAreaID-Broadcast-Item ::= SEQUENCE { emergencyAreaID EmergencyAreaID, completedCellinEAI CompletedCellinEAI, iE-Extensions ProtocolExtensionContainer { {EmergencyAreaID-Broadcast-Item-ExtIEs} } OPTIONAL, ... } EmergencyAreaID-Broadcast-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } EmergencyAreaID-Cancelled ::= SEQUENCE (SIZE(1..maxnoofEmergencyAreaID)) OF EmergencyAreaID-Cancelled-Item EmergencyAreaID-Cancelled-Item ::= SEQUENCE { emergencyAreaID EmergencyAreaID, cancelledCellinEAI CancelledCellinEAI, iE-Extensions ProtocolExtensionContainer { {EmergencyAreaID-Cancelled-Item-ExtIEs} } OPTIONAL, ... } EmergencyAreaID-Cancelled-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } CompletedCellinEAI ::= SEQUENCE (SIZE(1..maxnoofCellinEAI)) OF CompletedCellinEAI-Item CompletedCellinEAI-Item ::= SEQUENCE { eCGI EUTRAN-CGI, iE-Extensions ProtocolExtensionContainer { {CompletedCellinEAI-Item-ExtIEs} } OPTIONAL, ... } CompletedCellinEAI-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } ECGI-List ::= SEQUENCE (SIZE(1..maxnoofCellsineNB)) OF EUTRAN-CGI EmergencyAreaIDListForRestart ::= SEQUENCE (SIZE(1..maxnoofRestartEmergencyAreaIDs)) OF EmergencyAreaID ENB-ID ::= CHOICE { macroENB-ID BIT STRING (SIZE(20)), homeENB-ID BIT STRING (SIZE(28)), ... , short-macroENB-ID BIT STRING (SIZE(18)), long-macroENB-ID BIT STRING (SIZE(21)) } GERAN-Cell-ID ::= SEQUENCE { lAI LAI, rAC RAC, cI CI, iE-Extensions ProtocolExtensionContainer { { GERAN-Cell-ID-ExtIEs} } OPTIONAL, ... } GERAN-Cell-ID-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } Global-ENB-ID ::= SEQUENCE { pLMNidentity PLMNidentity, eNB-ID ENB-ID, iE-Extensions ProtocolExtensionContainer { {GlobalENB-ID-ExtIEs} } OPTIONAL, ... } GlobalENB-ID-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } GUMMEIList::= SEQUENCE (SIZE (1.. maxnoofMMECs)) OF GUMMEI ENB-StatusTransfer-TransparentContainer ::= SEQUENCE { bearers-SubjectToStatusTransferList Bearers-SubjectToStatusTransferList, iE-Extensions ProtocolExtensionContainer { {ENB-StatusTransfer-TransparentContainer-ExtIEs} } OPTIONAL, ... } ENB-StatusTransfer-TransparentContainer-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } ENB-UE-S1AP-ID ::= INTEGER (0..16777215) ENBname ::= PrintableString (SIZE (1..150,...)) ENBX2TLAs ::= SEQUENCE (SIZE(1.. maxnoofeNBX2TLAs)) OF TransportLayerAddress EncryptionAlgorithms ::= BIT STRING (SIZE (16,...)) EnhancedCoverageRestricted ::= ENUMERATED { restricted, ... } EPLMNs ::= SEQUENCE (SIZE(1..maxnoofEPLMNs)) OF PLMNidentity EventType ::= ENUMERATED { direct, change-of-serve-cell, stop-change-of-serve-cell, ... } E-RAB-ID ::= INTEGER (0..15, ...) E-RABInformationList ::= SEQUENCE (SIZE (1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { { E-RABInformationListIEs } } E-RABInformationListIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABInformationListItem CRITICALITY ignore TYPE E-RABInformationListItem PRESENCE mandatory }, ... } E-RABInformationListItem ::= SEQUENCE { e-RAB-ID E-RAB-ID, dL-Forwarding DL-Forwarding OPTIONAL, iE-Extensions ProtocolExtensionContainer { {E-RABInformationListItem-ExtIEs} } OPTIONAL, ... } E-RABInformationListItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } E-RABList ::= SEQUENCE (SIZE(1.. maxnoofE-RABs)) OF ProtocolIE-SingleContainer { {E-RABItemIEs} } E-RABItemIEs S1AP-PROTOCOL-IES ::= { { ID id-E-RABItem CRITICALITY ignore TYPE E-RABItem PRESENCE mandatory }, ... } E-RABItem ::= SEQUENCE { e-RAB-ID E-RAB-ID, cause Cause, iE-Extensions ProtocolExtensionContainer { {E-RABItem-ExtIEs} } OPTIONAL, ... } E-RABItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } E-RABLevelQoSParameters ::= SEQUENCE { qCI QCI, allocationRetentionPriority AllocationAndRetentionPriority, gbrQosInformation GBR-QosInformation OPTIONAL, iE-Extensions ProtocolExtensionContainer { {E-RABQoSParameters-ExtIEs} } OPTIONAL, ... } E-RABQoSParameters-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } EUTRAN-CGI ::= SEQUENCE { pLMNidentity PLMNidentity, cell-ID CellIdentity, iE-Extensions ProtocolExtensionContainer { {EUTRAN-CGI-ExtIEs} } OPTIONAL, ... } EUTRAN-CGI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } EUTRANRoundTripDelayEstimationInfo ::= INTEGER (0..2047) ExpectedUEBehaviour ::= SEQUENCE { expectedActivity ExpectedUEActivityBehaviour OPTIONAL, expectedHOInterval ExpectedHOInterval OPTIONAL, iE-Extensions ProtocolExtensionContainer { { ExpectedUEBehaviour-ExtIEs} } OPTIONAL, ... } ExpectedUEBehaviour-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } ExpectedUEActivityBehaviour ::= SEQUENCE { expectedActivityPeriod ExpectedActivityPeriod OPTIONAL, expectedIdlePeriod ExpectedIdlePeriod OPTIONAL, sourceofUEActivityBehaviourInformation SourceOfUEActivityBehaviourInformation OPTIONAL, iE-Extensions ProtocolExtensionContainer { { ExpectedUEActivityBehaviour-ExtIEs} } OPTIONAL, ... } ExpectedUEActivityBehaviour-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } ExpectedActivityPeriod ::= INTEGER (1..30|40|50|60|80|100|120|150|180|181,...) ExpectedIdlePeriod ::= INTEGER (1..30|40|50|60|80|100|120|150|180|181,...) SourceOfUEActivityBehaviourInformation ::= ENUMERATED { subscription-information, statistics, ... } ExpectedHOInterval ::= ENUMERATED { sec15, sec30, sec60, sec90, sec120, sec180, long-time, ... } ExtendedRNC-ID ::= INTEGER (4096..65535) ExtendedRepetitionPeriod ::= INTEGER (4096..131071) Extended-UEIdentityIndexValue ::= BIT STRING (SIZE (14)) -- F ForbiddenInterRATs ::= ENUMERATED { all, geran, utran, cdma2000, ..., geranandutran, cdma2000andutran } ForbiddenTAs ::= SEQUENCE (SIZE(1.. maxnoofEPLMNsPlusOne)) OF ForbiddenTAs-Item ForbiddenTAs-Item ::= SEQUENCE { pLMN-Identity PLMNidentity, forbiddenTACs ForbiddenTACs, iE-Extensions ProtocolExtensionContainer { {ForbiddenTAs-Item-ExtIEs} } OPTIONAL, ... } ForbiddenTAs-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } ForbiddenTACs ::= SEQUENCE (SIZE(1..maxnoofForbTACs)) OF TAC ForbiddenLAs ::= SEQUENCE (SIZE(1..maxnoofEPLMNsPlusOne)) OF ForbiddenLAs-Item ForbiddenLAs-Item ::= SEQUENCE { pLMN-Identity PLMNidentity, forbiddenLACs ForbiddenLACs, iE-Extensions ProtocolExtensionContainer { {ForbiddenLAs-Item-ExtIEs} } OPTIONAL, ... } ForbiddenLAs-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } ForbiddenLACs ::= SEQUENCE (SIZE(1..maxnoofForbLACs)) OF LAC -- G GBR-QosInformation ::= SEQUENCE { e-RAB-MaximumBitrateDL BitRate, e-RAB-MaximumBitrateUL BitRate, e-RAB-GuaranteedBitrateDL BitRate, e-RAB-GuaranteedBitrateUL BitRate, iE-Extensions ProtocolExtensionContainer { { GBR-QosInformation-ExtIEs} } OPTIONAL, ... } GBR-QosInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } GTP-TEID ::= OCTET STRING (SIZE (4)) GUMMEI ::= SEQUENCE { pLMN-Identity PLMNidentity, mME-Group-ID MME-Group-ID, mME-Code MME-Code, iE-Extensions ProtocolExtensionContainer { {GUMMEI-ExtIEs} } OPTIONAL, ... } GUMMEI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } GUMMEIType ::= ENUMERATED { native, mapped, ... } GWContextReleaseIndication ::= ENUMERATED { true, ... } -- H HandoverRestrictionList ::= SEQUENCE { servingPLMN PLMNidentity, equivalentPLMNs EPLMNs OPTIONAL, forbiddenTAs ForbiddenTAs OPTIONAL, forbiddenLAs ForbiddenLAs OPTIONAL, forbiddenInterRATs ForbiddenInterRATs OPTIONAL, iE-Extensions ProtocolExtensionContainer { {HandoverRestrictionList-ExtIEs} } OPTIONAL, ... } HandoverRestrictionList-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } HandoverType ::= ENUMERATED { intralte, ltetoutran, ltetogeran, utrantolte, gerantolte, ... } HFN ::= INTEGER (0..1048575) HFNModified ::= INTEGER (0..131071) HFNforPDCP-SNlength18 ::= INTEGER (0..16383) -- I Masked-IMEISV ::= BIT STRING (SIZE (64)) ImmediateMDT ::= SEQUENCE { measurementsToActivate MeasurementsToActivate, m1reportingTrigger M1ReportingTrigger, m1thresholdeventA2 M1ThresholdEventA2 OPTIONAL, -- Included in case of event-triggered, or event-triggered periodic reporting for measurement M1 m1periodicReporting M1PeriodicReporting OPTIONAL, -- Included in case of periodic or event-triggered periodic reporting iE-Extensions ProtocolExtensionContainer { { ImmediateMDT-ExtIEs} } OPTIONAL, ... } ImmediateMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { { ID id-M3Configuration CRITICALITY ignore EXTENSION M3Configuration PRESENCE conditional}| { ID id-M4Configuration CRITICALITY ignore EXTENSION M4Configuration PRESENCE conditional}| { ID id-M5Configuration CRITICALITY ignore EXTENSION M5Configuration PRESENCE conditional}| { ID id-MDT-Location-Info CRITICALITY ignore EXTENSION MDT-Location-Info PRESENCE optional}| { ID id-M6Configuration CRITICALITY ignore EXTENSION M6Configuration PRESENCE conditional}| { ID id-M7Configuration CRITICALITY ignore EXTENSION M7Configuration PRESENCE conditional}, ... } IMSI ::= OCTET STRING (SIZE (3..8)) InformationOnRecommendedCellsAndENBsForPaging ::= SEQUENCE { recommendedCellsForPaging RecommendedCellsForPaging, recommendENBsForPaging RecommendedENBsForPaging, iE-Extensions ProtocolExtensionContainer { { InformationOnRecommendedCellsAndENBsForPaging-ExtIEs} } OPTIONAL, ... } InformationOnRecommendedCellsAndENBsForPaging-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } IntegrityProtectionAlgorithms ::= BIT STRING (SIZE (16,...)) IntendedNumberOfPagingAttempts ::= INTEGER (1..16, ...) InterfacesToTrace ::= BIT STRING (SIZE (8)) -- J -- K KillAllWarningMessages ::= ENUMERATED {true} -- L LAC ::= OCTET STRING (SIZE (2)) LAI ::= SEQUENCE { pLMNidentity PLMNidentity, lAC LAC, iE-Extensions ProtocolExtensionContainer { {LAI-ExtIEs} } OPTIONAL, ... } LAI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } LastVisitedCell-Item ::= CHOICE { e-UTRAN-Cell LastVisitedEUTRANCellInformation, uTRAN-Cell LastVisitedUTRANCellInformation, gERAN-Cell LastVisitedGERANCellInformation, ... } LastVisitedEUTRANCellInformation ::= SEQUENCE { global-Cell-ID EUTRAN-CGI, cellType CellType, time-UE-StayedInCell Time-UE-StayedInCell, iE-Extensions ProtocolExtensionContainer { { LastVisitedEUTRANCellInformation-ExtIEs} } OPTIONAL, ... } LastVisitedEUTRANCellInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { -- Extension for Rel-11 to support enhanced granularity for time UE stayed in cell -- { ID id-Time-UE-StayedInCell-EnhancedGranularity CRITICALITY ignore EXTENSION Time-UE-StayedInCell-EnhancedGranularity PRESENCE optional}| { ID id-HO-Cause CRITICALITY ignore EXTENSION Cause PRESENCE optional}, ... } LastVisitedUTRANCellInformation ::= OCTET STRING LastVisitedGERANCellInformation ::= CHOICE { undefined NULL, ... } L3-Information ::= OCTET STRING -- This is a dummy IE used only as a reference to the actual definition in relevant specification. LPPa-PDU ::= OCTET STRING LHN-ID ::= OCTET STRING(SIZE (32..256)) Links-to-log ::= ENUMERATED {uplink, downlink, both-uplink-and-downlink, ...} ListeningSubframePattern ::= SEQUENCE { pattern-period ENUMERATED {ms1280, ms2560, ms5120, ms10240, ...}, pattern-offset INTEGER (0..10239, ...), iE-Extensions ProtocolExtensionContainer { { ListeningSubframePattern-ExtIEs} } OPTIONAL, ... } ListeningSubframePattern-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } LoggedMDT ::= SEQUENCE { loggingInterval LoggingInterval, loggingDuration LoggingDuration, iE-Extensions ProtocolExtensionContainer { {LoggedMDT-ExtIEs} } OPTIONAL, ... } LoggedMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } LoggingInterval ::= ENUMERATED {ms128, ms256, ms512, ms1024, ms2048, ms3072, ms4096, ms6144} LoggingDuration ::= ENUMERATED {m10, m20, m40, m60, m90, m120} LoggedMBSFNMDT ::= SEQUENCE { loggingInterval LoggingInterval, loggingDuration LoggingDuration, mBSFN-ResultToLog MBSFN-ResultToLog OPTIONAL, iE-Extensions ProtocolExtensionContainer { { LoggedMBSFNMDT-ExtIEs } } OPTIONAL, ... } LoggedMBSFNMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- M M3Configuration ::= SEQUENCE { m3period M3period, iE-Extensions ProtocolExtensionContainer { { M3Configuration-ExtIEs} } OPTIONAL, ... } M3Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } M3period ::= ENUMERATED {ms100, ms1000, ms10000, ... } M4Configuration ::= SEQUENCE { m4period M4period, m4-links-to-log Links-to-log, iE-Extensions ProtocolExtensionContainer { { M4Configuration-ExtIEs} } OPTIONAL, ... } M4Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } M4period ::= ENUMERATED {ms1024, ms2048, ms5120, ms10240, min1, ... } M5Configuration ::= SEQUENCE { m5period M5period, m5-links-to-log Links-to-log, iE-Extensions ProtocolExtensionContainer { { M5Configuration-ExtIEs} } OPTIONAL, ... } M5Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } M5period ::= ENUMERATED {ms1024, ms2048, ms5120, ms10240, min1, ... } M6Configuration ::= SEQUENCE { m6report-Interval M6report-Interval, m6delay-threshold M6delay-threshold OPTIONAL, -- This IE shall be present if the M6 Links to log IE is set to "uplink" or to "both-uplink-and-downlink" -- m6-links-to-log Links-to-log, iE-Extensions ProtocolExtensionContainer { { M6Configuration-ExtIEs} } OPTIONAL, ... } M6Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } M6report-Interval ::= ENUMERATED { ms1024, ms2048, ms5120, ms10240, ... } M6delay-threshold ::= ENUMERATED { ms30, ms40, ms50, ms60, ms70, ms80, ms90, ms100, ms150, ms300, ms500, ms750, ... } M7Configuration ::= SEQUENCE { m7period M7period, m7-links-to-log Links-to-log, iE-Extensions ProtocolExtensionContainer { { M7Configuration-ExtIEs} } OPTIONAL, ... } M7Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } M7period ::= INTEGER(1..60, ...) MDT-Activation ::= ENUMERATED { immediate-MDT-only, immediate-MDT-and-Trace, logged-MDT-only, ..., logged-MBSFN-MDT } MDT-Location-Info ::= BIT STRING (SIZE (8)) MDT-Configuration ::= SEQUENCE { mdt-Activation MDT-Activation, areaScopeOfMDT AreaScopeOfMDT, mDTMode MDTMode, iE-Extensions ProtocolExtensionContainer { { MDT-Configuration-ExtIEs} } OPTIONAL, ... } MDT-Configuration-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { { ID id-SignallingBasedMDTPLMNList CRITICALITY ignore EXTENSION MDTPLMNList PRESENCE optional }, ... } ManagementBasedMDTAllowed ::= ENUMERATED {allowed, ...} MBSFN-ResultToLog ::= SEQUENCE (SIZE(1..maxnoofMBSFNAreaMDT)) OF MBSFN-ResultToLogInfo MBSFN-ResultToLogInfo ::= SEQUENCE { mBSFN-AreaId INTEGER (0..255) OPTIONAL, carrierFreq EARFCN, iE-Extensions ProtocolExtensionContainer { { MBSFN-ResultToLogInfo-ExtIEs} } OPTIONAL, ... } MBSFN-ResultToLogInfo-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } MDTPLMNList ::= SEQUENCE (SIZE(1..maxnoofMDTPLMNs)) OF PLMNidentity PrivacyIndicator ::= ENUMERATED { immediate-MDT, logged-MDT, ... } MDTMode ::= CHOICE { immediateMDT ImmediateMDT, loggedMDT LoggedMDT, ..., mDTMode-Extension MDTMode-Extension } MDTMode-Extension ::= ProtocolIE-SingleContainer {{ MDTMode-ExtensionIE }} MDTMode-ExtensionIE S1AP-PROTOCOL-IES ::= { { ID id-LoggedMBSFNMDT CRITICALITY ignore TYPE LoggedMBSFNMDT PRESENCE mandatory} } MeasurementsToActivate ::= BIT STRING (SIZE (8)) MeasurementThresholdA2 ::= CHOICE { threshold-RSRP Threshold-RSRP, threshold-RSRQ Threshold-RSRQ, ... } MessageIdentifier ::= BIT STRING (SIZE (16)) MobilityInformation ::= BIT STRING (SIZE(32)) MMEname ::= PrintableString (SIZE (1..150,...)) MMEPagingTarget ::= CHOICE { global-ENB-ID Global-ENB-ID, tAI TAI, ... } MMERelaySupportIndicator ::= ENUMERATED {true, ...} MME-Group-ID ::= OCTET STRING (SIZE (2)) MME-Code ::= OCTET STRING (SIZE (1)) MME-UE-S1AP-ID ::= INTEGER (0..4294967295) M-TMSI ::= OCTET STRING (SIZE (4)) MSClassmark2 ::= OCTET STRING MSClassmark3 ::= OCTET STRING MutingAvailabilityIndication ::= ENUMERATED { available, unavailable, ... } MutingPatternInformation ::= SEQUENCE { muting-pattern-period ENUMERATED {ms0, ms1280, ms2560, ms5120, ms10240, ...}, muting-pattern-offset INTEGER (0..10239, ...) OPTIONAL, iE-Extensions ProtocolExtensionContainer { {MutingPatternInformation-ExtIEs} } OPTIONAL, ... } MutingPatternInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- N NAS-PDU ::= OCTET STRING NASSecurityParametersfromE-UTRAN ::= OCTET STRING NASSecurityParameterstoE-UTRAN ::= OCTET STRING NB-IoT-DefaultPagingDRX ::= ENUMERATED { v128, v256, v512, v1024, ... } NB-IoT-Paging-eDRXInformation ::= SEQUENCE { nB-IoT-paging-eDRX-Cycle NB-IoT-Paging-eDRX-Cycle, nB-IoT-pagingTimeWindow NB-IoT-PagingTimeWindow OPTIONAL, iE-Extensions ProtocolExtensionContainer { { NB-IoT-Paging-eDRXInformation-ExtIEs} } OPTIONAL, ... } NB-IoT-Paging-eDRXInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } NB-IoT-Paging-eDRX-Cycle ::= ENUMERATED{hf2, hf4, hf6, hf8, hf10, hf12, hf14, hf16, hf32, hf64, hf128, hf256, hf512, hf1024, ...} NB-IoT-PagingTimeWindow ::= ENUMERATED{s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, ...} NB-IoT-UEIdentityIndexValue ::= BIT STRING (SIZE (12)) NextPagingAreaScope ::= ENUMERATED { same, changed, ... } NumberofBroadcastRequest ::= INTEGER (0..65535) NumberOfBroadcasts ::= INTEGER (0..65535) -- O OldBSS-ToNewBSS-Information ::= OCTET STRING -- This is a dummy IE used only as a reference to the actual definition in relevant specification. OverloadAction ::= ENUMERATED { reject-non-emergency-mo-dt, reject-rrc-cr-signalling, permit-emergency-sessions-and-mobile-terminated-services-only, ..., permit-high-priority-sessions-and-mobile-terminated-services-only, reject-delay-tolerant-access, permit-high-priority-sessions-and-exception-reporting-and-mobile-terminated-services-only, not-accept-mo-data-or-delay-tolerant-access-from-CP-CIoT } OverloadResponse ::= CHOICE { overloadAction OverloadAction, ... } -- P PagingAttemptInformation ::= SEQUENCE { pagingAttemptCount PagingAttemptCount, intendedNumberOfPagingAttempts IntendedNumberOfPagingAttempts, nextPagingAreaScope NextPagingAreaScope OPTIONAL, iE-Extensions ProtocolExtensionContainer { { PagingAttemptInformation-ExtIEs} } OPTIONAL, ... } PagingAttemptInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } PagingAttemptCount ::= INTEGER (1..16, ...) Paging-eDRXInformation ::= SEQUENCE { paging-eDRX-Cycle Paging-eDRX-Cycle, pagingTimeWindow PagingTimeWindow OPTIONAL, iE-Extensions ProtocolExtensionContainer { { Paging-eDRXInformation-ExtIEs} } OPTIONAL, ... } Paging-eDRXInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } Paging-eDRX-Cycle ::= ENUMERATED{hfhalf, hf1, hf2, hf4, hf6, hf8, hf10, hf12, hf14, hf16, hf32, hf64, hf128, hf256, ...} PagingTimeWindow ::= ENUMERATED{s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15, s16, ...} PagingDRX ::= ENUMERATED { v32, v64, v128, v256, ... } PagingPriority ::= ENUMERATED { priolevel1, priolevel2, priolevel3, priolevel4, priolevel5, priolevel6, priolevel7, priolevel8, ... } PDCP-SN ::= INTEGER (0..4095) PDCP-SNExtended ::= INTEGER (0..32767) PDCP-SNlength18 ::= INTEGER (0..262143) M1PeriodicReporting ::= SEQUENCE { reportInterval ReportIntervalMDT, reportAmount ReportAmountMDT, iE-Extensions ProtocolExtensionContainer { { M1PeriodicReporting-ExtIEs} } OPTIONAL, ... } M1PeriodicReporting-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } PLMNidentity ::= TBCD-STRING Port-Number ::= OCTET STRING (SIZE (2)) Pre-emptionCapability ::= ENUMERATED { shall-not-trigger-pre-emption, may-trigger-pre-emption } Pre-emptionVulnerability ::= ENUMERATED { not-pre-emptable, pre-emptable } PriorityLevel ::= INTEGER { spare (0), highest (1), lowest (14), no-priority (15) } (0..15) ProSeAuthorized ::= SEQUENCE { proSeDirectDiscovery ProSeDirectDiscovery OPTIONAL, proSeDirectCommunication ProSeDirectCommunication OPTIONAL, iE-Extensions ProtocolExtensionContainer { {ProSeAuthorized-ExtIEs} } OPTIONAL, ... } ProSeAuthorized-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { { ID id-ProSeUEtoNetworkRelaying CRITICALITY ignore EXTENSION ProSeUEtoNetworkRelaying PRESENCE optional}, ... } ProSeDirectDiscovery ::= ENUMERATED { authorized, not-authorized, ... } ProSeUEtoNetworkRelaying ::= ENUMERATED { authorized, not-authorized, ... } ProSeDirectCommunication ::= ENUMERATED { authorized, not-authorized, ... } PS-ServiceNotAvailable ::= ENUMERATED { ps-service-not-available, ... } -- Q QCI ::= INTEGER (0..255) -- R ReceiveStatusofULPDCPSDUs ::= BIT STRING (SIZE(4096)) ReceiveStatusOfULPDCPSDUsExtended ::= BIT STRING (SIZE(1..16384)) ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 ::= BIT STRING (SIZE(1..131072)) RecommendedCellsForPaging ::= SEQUENCE { recommendedCellList RecommendedCellList, iE-Extensions ProtocolExtensionContainer { { RecommendedCellsForPaging-ExtIEs} } OPTIONAL, ... } RecommendedCellsForPaging-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } RecommendedCellList ::= SEQUENCE (SIZE(1.. maxnoofRecommendedCells)) OF ProtocolIE-SingleContainer { { RecommendedCellItemIEs } } RecommendedCellItemIEs S1AP-PROTOCOL-IES ::= { { ID id-RecommendedCellItem CRITICALITY ignore TYPE RecommendedCellItem PRESENCE mandatory }, ... } RecommendedCellItem::= SEQUENCE { eUTRAN-CGI EUTRAN-CGI, timeStayedInCell INTEGER (0..4095) OPTIONAL, iE-Extensions ProtocolExtensionContainer { { RecommendedCellsForPagingItem-ExtIEs} } OPTIONAL, ... } RecommendedCellsForPagingItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } RecommendedENBsForPaging ::= SEQUENCE { recommendedENBList RecommendedENBList, iE-Extensions ProtocolExtensionContainer { { RecommendedENBsForPaging-ExtIEs} } OPTIONAL, ... } RecommendedENBsForPaging-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } RecommendedENBList::= SEQUENCE (SIZE(1.. maxnoofRecommendedENBs)) OF ProtocolIE-SingleContainer { { RecommendedENBItemIEs } } RecommendedENBItemIEs S1AP-PROTOCOL-IES ::= { { ID id-RecommendedENBItem CRITICALITY ignore TYPE RecommendedENBItem PRESENCE mandatory }, ... } RecommendedENBItem ::= SEQUENCE { mMEPagingTarget MMEPagingTarget, iE-Extensions ProtocolExtensionContainer { { RecommendedENBItem-ExtIEs} } OPTIONAL, ... } RecommendedENBItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } RelativeMMECapacity ::= INTEGER (0..255) RelayNode-Indicator ::= ENUMERATED { true, ... } RAC ::= OCTET STRING (SIZE (1)) RAT-Type ::= ENUMERATED { nbiot, ... } ReportAmountMDT ::= ENUMERATED{r1, r2, r4, r8, r16, r32, r64, rinfinity} ReportIntervalMDT ::= ENUMERATED {ms120, ms240, ms480, ms640, ms1024, ms2048, ms5120, ms10240, min1, min6, min12, min30, min60} M1ReportingTrigger ::= ENUMERATED{ periodic, a2eventtriggered, ..., a2eventtriggered-periodic } RequestType ::= SEQUENCE { eventType EventType, reportArea ReportArea, iE-Extensions ProtocolExtensionContainer { { RequestType-ExtIEs} } OPTIONAL, ... } RequestType-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } RIMTransfer ::= SEQUENCE { rIMInformation RIMInformation, rIMRoutingAddress RIMRoutingAddress OPTIONAL, iE-Extensions ProtocolExtensionContainer { { RIMTransfer-ExtIEs} } OPTIONAL, ... } RIMTransfer-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } RIMInformation ::= OCTET STRING RIMRoutingAddress ::= CHOICE { gERAN-Cell-ID GERAN-Cell-ID, ..., targetRNC-ID TargetRNC-ID, eHRPD-Sector-ID OCTET STRING (SIZE(16)) } ReportArea ::= ENUMERATED { ecgi, ... } RepetitionPeriod ::= INTEGER (0..4095) RLFReportInformation ::= SEQUENCE { uE-RLF-Report-Container UE-RLF-Report-Container, uE-RLF-Report-Container-for-extended-bands UE-RLF-Report-Container-for-extended-bands OPTIONAL, iE-Extensions ProtocolExtensionContainer {{ RLFReportInformation-ExtIEs}} OPTIONAL, ... } RLFReportInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } RNC-ID ::= INTEGER (0..4095) RRC-Container ::= OCTET STRING RRC-Establishment-Cause ::= ENUMERATED { emergency, highPriorityAccess, mt-Access, mo-Signalling, mo-Data, ..., delay-TolerantAccess, mo-VoiceCall, mo-ExceptionData } ECGIListForRestart ::= SEQUENCE (SIZE(1..maxnoofCellsforRestart)) OF EUTRAN-CGI Routing-ID ::= INTEGER (0..255) -- S SecurityKey ::= BIT STRING (SIZE(256)) SecurityContext ::= SEQUENCE { nextHopChainingCount INTEGER (0..7), nextHopParameter SecurityKey, iE-Extensions ProtocolExtensionContainer { { SecurityContext-ExtIEs} } OPTIONAL, ... } SecurityContext-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } SerialNumber ::= BIT STRING (SIZE (16)) SONInformation ::= CHOICE{ sONInformationRequest SONInformationRequest, sONInformationReply SONInformationReply, ..., sONInformation-Extension SONInformation-Extension } SONInformation-Extension ::= ProtocolIE-SingleContainer {{ SONInformation-ExtensionIE }} SONInformation-ExtensionIE S1AP-PROTOCOL-IES ::= { { ID id-SON-Information-Report CRITICALITY ignore TYPE SONInformationReport PRESENCE mandatory} } SONInformationRequest ::= ENUMERATED { x2TNL-Configuration-Info, ..., time-Synchronisation-Info, activate-Muting, deactivate-Muting} SONInformationReply ::= SEQUENCE { x2TNLConfigurationInfo X2TNLConfigurationInfo OPTIONAL, iE-Extensions ProtocolExtensionContainer {{SONInformationReply-ExtIEs}} OPTIONAL, ... } SONInformationReply-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { -- Extension for Release 9 to transfer Time synchronisation information -- {ID id-Time-Synchronisation-Info CRITICALITY ignore EXTENSION TimeSynchronisationInfo PRESENCE optional}, ..., {ID id-Muting-Pattern-Information CRITICALITY ignore EXTENSION MutingPatternInformation PRESENCE optional} } SONInformationReport ::= CHOICE{ rLFReportInformation RLFReportInformation, ... } SONConfigurationTransfer ::= SEQUENCE { targeteNB-ID TargeteNB-ID, sourceeNB-ID SourceeNB-ID, sONInformation SONInformation, iE-Extensions ProtocolExtensionContainer { { SONConfigurationTransfer-ExtIEs} } OPTIONAL, ... } SONConfigurationTransfer-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { -- Extension for Release 10 to transfer the IP addresses of the eNB initiating the ANR action -- {ID id-x2TNLConfigurationInfo CRITICALITY ignore EXTENSION X2TNLConfigurationInfo PRESENCE conditional -- This IE shall be present if the SON Information IE contains the SON Information Request IE and the SON Information Request IE is set to "X2TNL Configuration Info" --}| -- Extension for Release 12 to transfer information concerning the source cell of synchronisation and the aggressor cell -- {ID id-Synchronisation-Information CRITICALITY ignore EXTENSION SynchronisationInformation PRESENCE conditional -- This IE shall be present if the SON Information IE contains the SON Information Request IE set to " Activate Muting " --}, ... } SynchronisationInformation ::= SEQUENCE { sourceStratumLevel StratumLevel OPTIONAL, listeningSubframePattern ListeningSubframePattern OPTIONAL, aggressoreCGI-List ECGI-List OPTIONAL, iE-Extensions ProtocolExtensionContainer { {SynchronisationInformation-ExtIEs} } OPTIONAL, ... } SynchronisationInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } Source-ToTarget-TransparentContainer ::= OCTET STRING -- This IE includes a transparent container from the source RAN node to the target RAN node. -- The octets of the OCTET STRING are encoded according to the specifications of the target system. SourceBSS-ToTargetBSS-TransparentContainer ::= OCTET STRING -- This is a dummy IE used only as a reference to the actual definition in relevant specification. SourceeNB-ID ::= SEQUENCE { global-ENB-ID Global-ENB-ID, selected-TAI TAI, iE-Extensions ProtocolExtensionContainer { {SourceeNB-ID-ExtIEs} } OPTIONAL } SourceeNB-ID-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } SRVCCOperationNotPossible ::= ENUMERATED { notPossible, ... } SRVCCOperationPossible ::= ENUMERATED { possible, ... } SRVCCHOIndication ::= ENUMERATED { pSandCS, cSonly, ... } SourceeNB-ToTargeteNB-TransparentContainer ::= SEQUENCE { rRC-Container RRC-Container, e-RABInformationList E-RABInformationList OPTIONAL, targetCell-ID EUTRAN-CGI, subscriberProfileIDforRFP SubscriberProfileIDforRFP OPTIONAL, uE-HistoryInformation UE-HistoryInformation, iE-Extensions ProtocolExtensionContainer { {SourceeNB-ToTargeteNB-TransparentContainer-ExtIEs} } OPTIONAL, ... } SourceeNB-ToTargeteNB-TransparentContainer-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { {ID id-MobilityInformation CRITICALITY ignore EXTENSION MobilityInformation PRESENCE optional}| {ID id-uE-HistoryInformationFromTheUE CRITICALITY ignore EXTENSION UE-HistoryInformationFromTheUE PRESENCE optional}, ... } SourceRNC-ToTargetRNC-TransparentContainer ::= OCTET STRING -- This is a dummy IE used only as a reference to the actual definition in relevant specification. ServedGUMMEIs ::= SEQUENCE (SIZE (1.. maxnoofRATs)) OF ServedGUMMEIsItem ServedGUMMEIsItem ::= SEQUENCE { servedPLMNs ServedPLMNs, servedGroupIDs ServedGroupIDs, servedMMECs ServedMMECs, iE-Extensions ProtocolExtensionContainer { {ServedGUMMEIsItem-ExtIEs} } OPTIONAL, ... } ServedGUMMEIsItem-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } ServedGroupIDs ::= SEQUENCE (SIZE(1.. maxnoofGroupIDs)) OF MME-Group-ID ServedMMECs ::= SEQUENCE (SIZE(1.. maxnoofMMECs)) OF MME-Code ServedPLMNs ::= SEQUENCE (SIZE(1.. maxnoofPLMNsPerMME)) OF PLMNidentity SubscriberProfileIDforRFP ::= INTEGER (1..256) SupportedTAs ::= SEQUENCE (SIZE(1.. maxnoofTACs)) OF SupportedTAs-Item SupportedTAs-Item ::= SEQUENCE { tAC TAC, broadcastPLMNs BPLMNs, iE-Extensions ProtocolExtensionContainer { {SupportedTAs-Item-ExtIEs} } OPTIONAL, ... } SupportedTAs-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { -- Extension for Release 13 to transfer RAT-Type per TAC -- {ID id-RAT-Type CRITICALITY reject EXTENSION RAT-Type PRESENCE optional}, ... } StratumLevel ::= INTEGER (0..3, ...) SynchronisationStatus ::= ENUMERATED { synchronous, asynchronous, ... } TimeSynchronisationInfo ::= SEQUENCE { stratumLevel StratumLevel, synchronisationStatus SynchronisationStatus, iE-Extensions ProtocolExtensionContainer { { TimeSynchronisationInfo-ExtIEs} } OPTIONAL, ... } TimeSynchronisationInfo-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { -- Extension for Release 12 to transfer Muting Availability Indication -- {ID id-Muting-Availability-Indication CRITICALITY ignore EXTENSION MutingAvailabilityIndication PRESENCE optional}, ... } S-TMSI ::= SEQUENCE { mMEC MME-Code, m-TMSI M-TMSI, iE-Extensions ProtocolExtensionContainer { {S-TMSI-ExtIEs} } OPTIONAL, ... } S-TMSI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } -- T TAC ::= OCTET STRING (SIZE (2)) TAIBasedMDT ::= SEQUENCE { tAIListforMDT TAIListforMDT, iE-Extensions ProtocolExtensionContainer { {TAIBasedMDT-ExtIEs} } OPTIONAL, ... } TAIBasedMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } TAIListforMDT ::= SEQUENCE (SIZE(1..maxnoofTAforMDT)) OF TAI TAIListforWarning ::= SEQUENCE (SIZE(1..maxnoofTAIforWarning)) OF TAI TAI ::= SEQUENCE { pLMNidentity PLMNidentity, tAC TAC, iE-Extensions ProtocolExtensionContainer { {TAI-ExtIEs} } OPTIONAL, ... } TAI-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } TAI-Broadcast ::= SEQUENCE (SIZE(1..maxnoofTAIforWarning)) OF TAI-Broadcast-Item TAI-Broadcast-Item ::= SEQUENCE { tAI TAI, completedCellinTAI CompletedCellinTAI, iE-Extensions ProtocolExtensionContainer { {TAI-Broadcast-Item-ExtIEs} } OPTIONAL, ... } TAI-Broadcast-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } TAI-Cancelled ::= SEQUENCE (SIZE(1..maxnoofTAIforWarning)) OF TAI-Cancelled-Item TAI-Cancelled-Item ::= SEQUENCE { tAI TAI, cancelledCellinTAI CancelledCellinTAI, iE-Extensions ProtocolExtensionContainer { {TAI-Cancelled-Item-ExtIEs} } OPTIONAL, ... } TAI-Cancelled-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } TABasedMDT ::= SEQUENCE { tAListforMDT TAListforMDT, iE-Extensions ProtocolExtensionContainer { {TABasedMDT-ExtIEs} } OPTIONAL, ... } TABasedMDT-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } TAListforMDT ::= SEQUENCE (SIZE(1..maxnoofTAforMDT)) OF TAC CompletedCellinTAI ::= SEQUENCE (SIZE(1..maxnoofCellinTAI)) OF CompletedCellinTAI-Item CompletedCellinTAI-Item ::= SEQUENCE{ eCGI EUTRAN-CGI, iE-Extensions ProtocolExtensionContainer { {CompletedCellinTAI-Item-ExtIEs} } OPTIONAL, ... } CompletedCellinTAI-Item-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } TBCD-STRING ::= OCTET STRING (SIZE (3)) TargetID ::= CHOICE { targeteNB-ID TargeteNB-ID, targetRNC-ID TargetRNC-ID, cGI CGI, ... } TargeteNB-ID ::= SEQUENCE { global-ENB-ID Global-ENB-ID, selected-TAI TAI, iE-Extensions ProtocolExtensionContainer { {TargeteNB-ID-ExtIEs} } OPTIONAL, ... } TargeteNB-ID-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } TargetRNC-ID ::= SEQUENCE { lAI LAI, rAC RAC OPTIONAL, rNC-ID RNC-ID, extendedRNC-ID ExtendedRNC-ID OPTIONAL, iE-Extensions ProtocolExtensionContainer { {TargetRNC-ID-ExtIEs} } OPTIONAL, ... } TargetRNC-ID-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } TargeteNB-ToSourceeNB-TransparentContainer ::= SEQUENCE { rRC-Container RRC-Container, iE-Extensions ProtocolExtensionContainer { {TargeteNB-ToSourceeNB-TransparentContainer-ExtIEs} } OPTIONAL, ... } TargeteNB-ToSourceeNB-TransparentContainer-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } Target-ToSource-TransparentContainer ::= OCTET STRING -- This IE includes a transparent container from the target RAN node to the source RAN node. -- The octets of the OCTET STRING are coded according to the specifications of the target system. TargetRNC-ToSourceRNC-TransparentContainer ::= OCTET STRING -- This is a dummy IE used only as a reference to the actual definition in relevant specification. TargetBSS-ToSourceBSS-TransparentContainer ::= OCTET STRING -- This is a dummy IE used only as a reference to the actual definition in relevant specification. M1ThresholdEventA2 ::= SEQUENCE { measurementThreshold MeasurementThresholdA2, iE-Extensions ProtocolExtensionContainer { { M1ThresholdEventA2-ExtIEs} } OPTIONAL, ... } M1ThresholdEventA2-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } Threshold-RSRP ::= INTEGER(0..97) Threshold-RSRQ ::= INTEGER(0..34) TimeToWait ::= ENUMERATED {v1s, v2s, v5s, v10s, v20s, v60s, ...} Time-UE-StayedInCell ::= INTEGER (0..4095) Time-UE-StayedInCell-EnhancedGranularity ::= INTEGER (0..40950) TransportInformation ::= SEQUENCE { transportLayerAddress TransportLayerAddress, uL-GTP-TEID GTP-TEID, ... } TransportLayerAddress ::= BIT STRING (SIZE(1..160, ...)) TraceActivation ::= SEQUENCE { e-UTRAN-Trace-ID E-UTRAN-Trace-ID, interfacesToTrace InterfacesToTrace, traceDepth TraceDepth, traceCollectionEntityIPAddress TransportLayerAddress, iE-Extensions ProtocolExtensionContainer { { TraceActivation-ExtIEs} } OPTIONAL, ... } TraceActivation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { -- Extension for Rel-10 to support MDT -- { ID id-MDTConfiguration CRITICALITY ignore EXTENSION MDT-Configuration PRESENCE optional }, ... } TraceDepth ::= ENUMERATED { minimum, medium, maximum, minimumWithoutVendorSpecificExtension, mediumWithoutVendorSpecificExtension, maximumWithoutVendorSpecificExtension, ... } E-UTRAN-Trace-ID ::= OCTET STRING (SIZE (8)) TrafficLoadReductionIndication ::= INTEGER (1..99) TunnelInformation ::= SEQUENCE { transportLayerAddress TransportLayerAddress, uDP-Port-Number Port-Number OPTIONAL, iE-Extensions ProtocolExtensionContainer { {Tunnel-Information-ExtIEs} } OPTIONAL, ... } Tunnel-Information-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } TypeOfError ::= ENUMERATED { not-understood, missing, ... } TAIListForRestart ::= SEQUENCE (SIZE(1..maxnoofRestartTAIs)) OF TAI -- U UEAggregateMaximumBitrate ::= SEQUENCE { uEaggregateMaximumBitRateDL BitRate, uEaggregateMaximumBitRateUL BitRate, iE-Extensions ProtocolExtensionContainer { {UEAggregate-MaximumBitrates-ExtIEs} } OPTIONAL, ... } UEAggregate-MaximumBitrates-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } UE-RetentionInformation ::= ENUMERATED { ues-retained, ...} UE-S1AP-IDs ::= CHOICE{ uE-S1AP-ID-pair UE-S1AP-ID-pair, mME-UE-S1AP-ID MME-UE-S1AP-ID, ... } UE-S1AP-ID-pair ::= SEQUENCE{ mME-UE-S1AP-ID MME-UE-S1AP-ID, eNB-UE-S1AP-ID ENB-UE-S1AP-ID, iE-Extensions ProtocolExtensionContainer { {UE-S1AP-ID-pair-ExtIEs} } OPTIONAL, ... } UE-S1AP-ID-pair-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } UE-associatedLogicalS1-ConnectionItem ::= SEQUENCE { mME-UE-S1AP-ID MME-UE-S1AP-ID OPTIONAL, eNB-UE-S1AP-ID ENB-UE-S1AP-ID OPTIONAL, iE-Extensions ProtocolExtensionContainer { { UE-associatedLogicalS1-ConnectionItemExtIEs} } OPTIONAL, ... } UE-associatedLogicalS1-ConnectionItemExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } UEIdentityIndexValue ::= BIT STRING (SIZE (10)) UE-HistoryInformation ::= SEQUENCE (SIZE(1..maxnoofCells)) OF LastVisitedCell-Item UE-HistoryInformationFromTheUE ::= OCTET STRING -- This IE is a transparent container and shall be encoded as the VisitedCellInfoList field contained in the UEInformationResponse message as defined in TS 36.331 [16] UEPagingID ::= CHOICE { s-TMSI S-TMSI, iMSI IMSI, ... } UERadioCapability ::= OCTET STRING UERadioCapabilityForPaging ::= OCTET STRING UE-RLF-Report-Container ::= OCTET STRING -- This IE is a transparent container and shall be encoded as the rlf-Report-r9 field contained in the UEInformationResponse message as defined in TS 36.331 [16] UE-RLF-Report-Container-for-extended-bands ::= OCTET STRING -- This IE is a transparent container and shall be encoded as the rlf-Report-v9e0 contained in the UEInformationResponse message as defined in TS 36.331 [16] UESecurityCapabilities ::= SEQUENCE { encryptionAlgorithms EncryptionAlgorithms, integrityProtectionAlgorithms IntegrityProtectionAlgorithms, iE-Extensions ProtocolExtensionContainer { { UESecurityCapabilities-ExtIEs} } OPTIONAL, ... } UESecurityCapabilities-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } UESidelinkAggregateMaximumBitrate ::= SEQUENCE { uESidelinkAggregateMaximumBitRate BitRate, iE-Extensions ProtocolExtensionContainer { {UE-Sidelink-Aggregate-MaximumBitrates-ExtIEs} } OPTIONAL, ... } UE-Sidelink-Aggregate-MaximumBitrates-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } UE-Usage-Type ::= INTEGER (0..255) UL-CP-SecurityInformation ::= SEQUENCE { ul-NAS-MAC UL-NAS-MAC, ul-NAS-Count UL-NAS-Count, iE-Extensions ProtocolExtensionContainer { { UL-CP-SecurityInformation-ExtIEs} } OPTIONAL, ... } UL-CP-SecurityInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } UL-NAS-MAC ::= BIT STRING (SIZE (16)) UL-NAS-Count ::= BIT STRING (SIZE (5)) UserLocationInformation ::= SEQUENCE { eutran-cgi EUTRAN-CGI, tai TAI, iE-Extensions ProtocolExtensionContainer { { UserLocationInformation-ExtIEs} } OPTIONAL, ... } UserLocationInformation-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } UEUserPlaneCIoTSupportIndicator ::= ENUMERATED { supported, ... } -- V VoiceSupportMatchIndicator ::= ENUMERATED { supported, not-supported, ... } V2XServicesAuthorized ::= SEQUENCE { vehicleUE VehicleUE OPTIONAL, pedestrianUE PedestrianUE OPTIONAL, iE-Extensions ProtocolExtensionContainer { {V2XServicesAuthorized-ExtIEs} } OPTIONAL, ... } V2XServicesAuthorized-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } VehicleUE ::= ENUMERATED { authorized, not-authorized, ... } PedestrianUE ::= ENUMERATED { authorized, not-authorized, ... } -- W WarningAreaList ::= CHOICE { cellIDList ECGIList, trackingAreaListforWarning TAIListforWarning, emergencyAreaIDList EmergencyAreaIDList, ... } WarningType ::= OCTET STRING (SIZE (2)) WarningSecurityInfo ::= OCTET STRING (SIZE (50)) WarningMessageContents ::= OCTET STRING (SIZE(1..9600)) -- X X2TNLConfigurationInfo ::= SEQUENCE { eNBX2TransportLayerAddresses ENBX2TLAs, iE-Extensions ProtocolExtensionContainer { { X2TNLConfigurationInfo-ExtIEs} } OPTIONAL, ... } X2TNLConfigurationInfo-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { -- Extension for Release 10 to transfer the IPsec and U-plane addresses during ANR action -- {ID id-eNBX2ExtendedTransportLayerAddresses CRITICALITY ignore EXTENSION ENBX2ExtTLAs PRESENCE optional}| -- Extension for Release 12 to transfer the IP addresses of the X2 GW -- {ID id-eNBIndirectX2TransportLayerAddresses CRITICALITY ignore EXTENSION ENBIndirectX2TransportLayerAddresses PRESENCE optional}, ... } ENBX2ExtTLAs ::= SEQUENCE (SIZE(1.. maxnoofeNBX2ExtTLAs)) OF ENBX2ExtTLA ENBX2ExtTLA ::= SEQUENCE { iPsecTLA TransportLayerAddress OPTIONAL, gTPTLAa ENBX2GTPTLAs OPTIONAL, iE-Extensions ProtocolExtensionContainer { { ENBX2ExtTLA-ExtIEs} } OPTIONAL, ... } ENBX2ExtTLA-ExtIEs S1AP-PROTOCOL-EXTENSION ::= { ... } ENBX2GTPTLAs ::= SEQUENCE (SIZE(1.. maxnoofeNBX2GTPTLAs)) OF TransportLayerAddress ENBIndirectX2TransportLayerAddresses ::= SEQUENCE (SIZE(1..maxnoofeNBX2TLAs)) OF TransportLayerAddress -- Y -- Z END 9.3.5 Common Definitions -- ************************************************************** -- -- 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) ProtocolExtensionID ::= INTEGER (0..65535) ProtocolIE-ID ::= INTEGER (0..65535) TriggeringMessage ::= ENUMERATED { initiating-message, successful-outcome, unsuccessfull-outcome } END 9.3.6 Constant Definitions -- ************************************************************** -- -- 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-DownlinkS1cdma2000tunnelling ProcedureCode ::= 19 id-UplinkS1cdma2000tunnelling 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 id-UERadioCapabilityMatch ProcedureCode ::= 48 id-PWSRestartIndication ProcedureCode ::= 49 id-E-RABModificationIndication ProcedureCode ::= 50 id-PWSFailureIndication ProcedureCode ::= 51 id-RerouteNASRequest ProcedureCode ::= 52 id-UEContextModificationIndication ProcedureCode ::= 53 id-ConnectionEstablishmentIndication ProcedureCode ::= 54 id-UEContextSuspend ProcedureCode ::= 55 id-UEContextResume ProcedureCode ::= 56 id-NASDeliveryIndication ProcedureCode ::= 57 id-RetrieveUEInformation ProcedureCode ::= 58 id-UEInformationTransfer ProcedureCode ::= 59 id-eNBCPRelocationIndication ProcedureCode ::= 60 id-MMECPRelocationIndication ProcedureCode ::= 61 -- ************************************************************** -- -- Extension constants -- -- ************************************************************** maxPrivateIEs INTEGER ::= 65535 maxProtocolExtensions INTEGER ::= 65535 maxProtocolIEs INTEGER ::= 65535 -- ************************************************************** -- -- Lists -- -- ************************************************************** maxnoofCSGs INTEGER ::= 256 maxnoofE-RABs INTEGER ::= 256 maxnoofTAIs INTEGER ::= 256 maxnoofTACs INTEGER ::= 256 maxnoofErrors INTEGER ::= 256 maxnoofBPLMNs INTEGER ::= 6 maxnoofPLMNsPerMME INTEGER ::= 32 maxnoofEPLMNs INTEGER ::= 15 maxnoofEPLMNsPlusOne INTEGER ::= 16 maxnoofForbLACs INTEGER ::= 4096 maxnoofForbTACs INTEGER ::= 4096 maxnoofIndividualS1ConnectionsToReset INTEGER ::= 256 maxnoofCells INTEGER ::= 16 maxnoofCellsineNB INTEGER ::= 256 maxnoofTAIforWarning INTEGER ::= 65535 maxnoofCellID INTEGER ::= 65535 maxnoofDCNs INTEGER ::= 32 maxnoofEmergencyAreaID INTEGER ::= 65535 maxnoofCellinTAI INTEGER ::= 65535 maxnoofCellinEAI INTEGER ::= 65535 maxnoofeNBX2TLAs INTEGER ::= 2 maxnoofeNBX2ExtTLAs INTEGER ::= 16 maxnoofeNBX2GTPTLAs INTEGER ::= 16 maxnoofRATs INTEGER ::= 8 maxnoofGroupIDs INTEGER ::= 65535 maxnoofMMECs INTEGER ::= 256 maxnoofCellIDforMDT INTEGER ::= 32 maxnoofTAforMDT INTEGER ::= 8 maxnoofMDTPLMNs INTEGER ::= 16 maxnoofCellsforRestart INTEGER ::= 256 maxnoofRestartTAIs INTEGER ::= 2048 maxnoofRestartEmergencyAreaIDs INTEGER ::= 256 maxEARFCN INTEGER ::= 262143 maxnoofMBSFNAreaMDT INTEGER ::= 8 maxnoofRecommendedCells INTEGER ::= 16 maxnoofRecommendedENBs INTEGER ::= 16 -- ************************************************************** -- -- 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-Synchronisation-Info ProtocolIE-ID ::= 149 id-PS-ServiceNotAvailable ProtocolIE-ID ::= 150 id-PagingPriority ProtocolIE-ID ::= 151 id-x2TNLConfigurationInfo ProtocolIE-ID ::= 152 id-eNBX2ExtendedTransportLayerAddresses ProtocolIE-ID ::= 153 id-GUMMEIList ProtocolIE-ID ::= 154 id-GW-TransportLayerAddress ProtocolIE-ID ::= 155 id-Correlation-ID ProtocolIE-ID ::= 156 id-SourceMME-GUMMEI ProtocolIE-ID ::= 157 id-MME-UE-S1AP-ID-2 ProtocolIE-ID ::= 158 id-RegisteredLAI ProtocolIE-ID ::= 159 id-RelayNode-Indicator ProtocolIE-ID ::= 160 id-TrafficLoadReductionIndication ProtocolIE-ID ::= 161 id-MDTConfiguration ProtocolIE-ID ::= 162 id-MMERelaySupportIndicator ProtocolIE-ID ::= 163 id-GWContextReleaseIndication ProtocolIE-ID ::= 164 id-ManagementBasedMDTAllowed ProtocolIE-ID ::= 165 id-PrivacyIndicator ProtocolIE-ID ::= 166 id-Time-UE-StayedInCell-EnhancedGranularity ProtocolIE-ID ::= 167 id-HO-Cause ProtocolIE-ID ::= 168 id-VoiceSupportMatchIndicator ProtocolIE-ID ::= 169 id-GUMMEIType ProtocolIE-ID ::= 170 id-M3Configuration ProtocolIE-ID ::= 171 id-M4Configuration ProtocolIE-ID ::= 172 id-M5Configuration ProtocolIE-ID ::= 173 id-MDT-Location-Info ProtocolIE-ID ::= 174 id-MobilityInformation ProtocolIE-ID ::= 175 id-Tunnel-Information-for-BBF ProtocolIE-ID ::= 176 id-ManagementBasedMDTPLMNList ProtocolIE-ID ::= 177 id-SignallingBasedMDTPLMNList ProtocolIE-ID ::= 178 id-ULCOUNTValueExtended ProtocolIE-ID ::= 179 id-DLCOUNTValueExtended ProtocolIE-ID ::= 180 id-ReceiveStatusOfULPDCPSDUsExtended ProtocolIE-ID ::= 181 id-ECGIListForRestart ProtocolIE-ID ::= 182 id-SIPTO-Correlation-ID ProtocolIE-ID ::= 183 id-SIPTO-L-GW-TransportLayerAddress ProtocolIE-ID ::= 184 id-TransportInformation ProtocolIE-ID ::= 185 id-LHN-ID ProtocolIE-ID ::= 186 id-AdditionalCSFallbackIndicator ProtocolIE-ID ::= 187 id-TAIListForRestart ProtocolIE-ID ::= 188 id-UserLocationInformation ProtocolIE-ID ::= 189 id-EmergencyAreaIDListForRestart ProtocolIE-ID ::= 190 id-KillAllWarningMessages ProtocolIE-ID ::= 191 id-Masked-IMEISV ProtocolIE-ID ::= 192 id-eNBIndirectX2TransportLayerAddresses ProtocolIE-ID ::= 193 id-uE-HistoryInformationFromTheUE ProtocolIE-ID ::= 194 id-ProSeAuthorized ProtocolIE-ID ::= 195 id-ExpectedUEBehaviour ProtocolIE-ID ::= 196 id-LoggedMBSFNMDT ProtocolIE-ID ::= 197 id-UERadioCapabilityForPaging ProtocolIE-ID ::= 198 id-E-RABToBeModifiedListBearerModInd ProtocolIE-ID ::= 199 id-E-RABToBeModifiedItemBearerModInd ProtocolIE-ID ::= 200 id-E-RABNotToBeModifiedListBearerModInd ProtocolIE-ID ::= 201 id-E-RABNotToBeModifiedItemBearerModInd ProtocolIE-ID ::= 202 id-E-RABModifyListBearerModConf ProtocolIE-ID ::= 203 id-E-RABModifyItemBearerModConf ProtocolIE-ID ::= 204 id-E-RABFailedToModifyListBearerModConf ProtocolIE-ID ::= 205 id-SON-Information-Report ProtocolIE-ID ::= 206 id-Muting-Availability-Indication ProtocolIE-ID ::= 207 id-Muting-Pattern-Information ProtocolIE-ID ::= 208 id-Synchronisation-Information ProtocolIE-ID ::= 209 id-E-RABToBeReleasedListBearerModConf ProtocolIE-ID ::= 210 id-AssistanceDataForPaging ProtocolIE-ID ::= 211 id-CellIdentifierAndCELevelForCECapableUEs ProtocolIE-ID ::= 212 id-InformationOnRecommendedCellsAndENBsForPaging ProtocolIE-ID ::= 213 id-RecommendedCellItem ProtocolIE-ID ::= 214 id-RecommendedENBItem ProtocolIE-ID ::= 215 id-ProSeUEtoNetworkRelaying ProtocolIE-ID ::= 216 id-ULCOUNTValuePDCP-SNlength18 ProtocolIE-ID ::= 217 id-DLCOUNTValuePDCP-SNlength18 ProtocolIE-ID ::= 218 id-ReceiveStatusOfULPDCPSDUsPDCP-SNlength18 ProtocolIE-ID ::= 219 id-M6Configuration ProtocolIE-ID ::= 220 id-M7Configuration ProtocolIE-ID ::= 221 id-PWSfailedECGIList ProtocolIE-ID ::= 222 id-MME-Group-ID ProtocolIE-ID ::= 223 id-Additional-GUTI ProtocolIE-ID ::= 224 id-S1-Message ProtocolIE-ID ::= 225 id-CSGMembershipInfo ProtocolIE-ID ::= 226 id-Paging-eDRXInformation ProtocolIE-ID ::= 227 id-UE-RetentionInformation ProtocolIE-ID ::= 228 id-UE-Usage-Type ProtocolIE-ID ::= 230 id-extended-UEIdentityIndexValue ProtocolIE-ID ::= 231 id-RAT-Type ProtocolIE-ID ::= 232 id-BearerType ProtocolIE-ID ::= 233 id-NB-IoT-DefaultPagingDRX ProtocolIE-ID ::= 234 id-E-RABFailedToResumeListResumeReq ProtocolIE-ID ::= 235 id-E-RABFailedToResumeItemResumeReq ProtocolIE-ID ::= 236 id-E-RABFailedToResumeListResumeRes ProtocolIE-ID ::= 237 id-E-RABFailedToResumeItemResumeRes ProtocolIE-ID ::= 238 id-NB-IoT-Paging-eDRXInformation ProtocolIE-ID ::= 239 id-V2XServicesAuthorized ProtocolIE-ID ::= 240 id-UEUserPlaneCIoTSupportIndicator ProtocolIE-ID ::= 241 id-CE-mode-B-SupportIndicator ProtocolIE-ID ::= 242 id-SRVCCOperationNotPossible ProtocolIE-ID ::= 243 id-NB-IoT-UEIdentityIndexValue ProtocolIE-ID ::= 244 id-RRC-Resume-Cause ProtocolIE-ID ::= 245 id-DCN-ID ProtocolIE-ID ::= 246 id-ServedDCNs ProtocolIE-ID ::= 247 id-UESidelinkAggregateMaximumBitrate ProtocolIE-ID ::= 248 id-DLNASPDUDeliveryAckRequest ProtocolIE-ID ::= 249 id-Coverage-Level ProtocolIE-ID ::= 250 id-EnhancedCoverageRestricted ProtocolIE-ID ::= 251 id-UE-Level-QoS-Parameters ProtocolIE-ID ::= 252 id-DL-CP-SecurityInformation ProtocolIE-ID ::= 253 id-UL-CP-SecurityInformation ProtocolIE-ID ::= 254 END 9.3.7 Container Definitions -- ************************************************************** -- -- 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 B.2 ASN.1 definition -- ************************************************************** -- -- IE definitions for the SON Transfer application -- The IEs in this ASN.1 module shall be defined and encoded -- using the same rules as applicable for the S1AP-IEs module. -- -- ************************************************************** SonTransfer-IEs DEFINITIONS AUTOMATIC TAGS ::= BEGIN -- -- Generic IEs for the SON Transfer application -- SONtransferApplicationIdentity ::= ENUMERATED { cell-load-reporting, ..., multi-cell-load-reporting, event-triggered-cell-load-reporting, ho-reporting, eutran-cell-activation, energy-savings-indication, failure-event-reporting } SONtransferRequestContainer ::= CHOICE{ cellLoadReporting NULL, ..., multiCellLoadReporting MultiCellLoadReportingRequest, eventTriggeredCellLoadReporting EventTriggeredCellLoadReportingRequest, hOReporting HOReport, eutranCellActivation CellActivationRequest, energySavingsIndication CellStateIndication, failureEventReporting FailureEventReport } SONtransferResponseContainer ::= CHOICE{ cellLoadReporting CellLoadReportingResponse, ..., multiCellLoadReporting MultiCellLoadReportingResponse, eventTriggeredCellLoadReporting EventTriggeredCellLoadReportingResponse, hOReporting NULL, eutranCellActivation CellActivationResponse, energySavingsIndication NULL, failureEventReporting NULL } SONtransferCause ::= CHOICE { cellLoadReporting CellLoadReportingCause, ..., multiCellLoadReporting CellLoadReportingCause, eventTriggeredCellLoadReporting CellLoadReportingCause, hOReporting HOReportingCause, eutranCellActivation CellActivationCause, energySavingsIndication CellStateIndicationCause, failureEventReporting FailureEventReportingCause } CellLoadReportingCause ::= ENUMERATED { application-container-syntax-error, inconsistent-reporting-cell-identifier, unspecified, ... } HOReportingCause ::= ENUMERATED { application-container-syntax-error, inconsistent-reporting-cell-identifier, unspecified, ... } CellActivationCause ::= ENUMERATED { application-container-syntax-error, inconsistent-reporting-cell-identifier, unspecified, ... } CellStateIndicationCause ::= ENUMERATED { application-container-syntax-error, inconsistent-reporting-cell-identifier, unspecified, ... } FailureEventReportingCause ::= ENUMERATED { application-container-syntax-error, inconsistent-reporting-cell-identifier, unspecified, ... } -- -- IEs for Cell Load Reporting application -- CellLoadReportingResponse::= CHOICE{ eUTRAN EUTRANcellLoadReportingResponse, uTRAN OCTET STRING, gERAN OCTET STRING, ..., eHRPD EHRPDSectorLoadReportingResponse } CompositeAvailableCapacityGroup ::= OCTET STRING EUTRANcellLoadReportingResponse ::= SEQUENCE { compositeAvailableCapacityGroup CompositeAvailableCapacityGroup, ... } -- -- IEs for Multi-Cell Load Reporting application -- EUTRANResponse::= SEQUENCE { cell-ID OCTET STRING, eUTRANcellLoadReportingResponse EUTRANcellLoadReportingResponse, ... } EHRPD-Sector-ID ::= OCTET STRING (SIZE (16)) IRAT-Cell-ID ::= CHOICE{ eUTRAN OCTET STRING, uTRAN OCTET STRING, gERAN OCTET STRING, ..., eHRPD EHRPD-Sector-ID } RequestedCellList ::= SEQUENCE (SIZE(1.. maxnoofIRATReportingCells)) OF IRAT-Cell-ID MultiCellLoadReportingRequest::= SEQUENCE { requestedCellList RequestedCellList, ... } ReportingCellList-Item ::= SEQUENCE { cell-ID IRAT-Cell-ID, ... } ReportingCellList ::= SEQUENCE (SIZE(1.. maxnoofIRATReportingCells)) OF ReportingCellList-Item MultiCellLoadReportingResponse ::= SEQUENCE (SIZE(1.. maxnoofIRATReportingCells)) OF MultiCellLoadReportingResponse-Item MultiCellLoadReportingResponse-Item ::= CHOICE{ eUTRANResponse EUTRANResponse, uTRANResponse OCTET STRING, gERANResponse OCTET STRING, ..., eHRPD EHRPDMultiSectorLoadReportingResponseItem } -- -- IEs for Event-triggered Cell Load Reporting application -- NumberOfMeasurementReportingLevels ::= ENUMERATED { rl2, rl3, rl4, rl5, rl10, ... } EventTriggeredCellLoadReportingRequest ::= SEQUENCE { numberOfMeasurementReportingLevels NumberOfMeasurementReportingLevels, ... } OverloadFlag ::= ENUMERATED { overload, ... } EventTriggeredCellLoadReportingResponse ::= SEQUENCE { cellLoadReportingResponse CellLoadReportingResponse, overloadFlag OverloadFlag OPTIONAL, ... } -- -- IEs for HO Reporting application -- HOReport::= SEQUENCE { hoType HoType, hoReportType HoReportType, hosourceID IRAT-Cell-ID, hoTargetID IRAT-Cell-ID, candidateCellList CandidateCellList, ..., candidatePCIList CandidatePCIList OPTIONAL } HoType ::= ENUMERATED { ltetoutran, ltetogeran, ... } HoReportType ::= ENUMERATED { unnecessaryhotoanotherrat, ..., earlyirathandover } CandidateCellList ::= SEQUENCE (SIZE(1..maxnoofcandidateCells)) OF IRAT-Cell-ID CandidatePCIList ::= SEQUENCE (SIZE(1..maxnoofcandidateCells)) OF CandidatePCI CandidatePCI ::= SEQUENCE { pCI INTEGER (0..503), eARFCN OCTET STRING, ... } -- -- IEs for E-UTRAN Cell Activation application -- CellActivationRequest ::= SEQUENCE { cellsToActivateList CellsToActivateList, minimumActivationTime INTEGER (1..60) OPTIONAL, ... } CellsToActivateList ::= SEQUENCE (SIZE(1.. maxnoofCellineNB)) OF CellsToActivateList-Item CellsToActivateList-Item ::= SEQUENCE { cell-ID OCTET STRING, ... } CellActivationResponse ::= SEQUENCE { activatedCellsList ActivatedCellsList, ... } ActivatedCellsList ::= SEQUENCE (SIZE(0.. maxnoofCellineNB)) OF ActivatedCellsList-Item ActivatedCellsList-Item ::= SEQUENCE { cell-ID OCTET STRING, ... } -- -- IEs for Energy Savings Indication application -- CellStateIndication ::= SEQUENCE { notificationCellList NotificationCellList, ... } NotificationCellList ::= SEQUENCE (SIZE(1.. maxnoofCellineNB)) OF NotificationCellList-Item NotificationCellList-Item ::= SEQUENCE { cell-ID OCTET STRING, notifyFlag NotifyFlag, ... } NotifyFlag ::= ENUMERATED { activated, deactivated, ... } FailureEventReport::= CHOICE { tooEarlyInterRATHOReportFromEUTRAN TooEarlyInterRATHOReportReportFromEUTRAN, ... } TooEarlyInterRATHOReportReportFromEUTRAN ::= SEQUENCE { uERLFReportContainer OCTET STRING, -- as defined in TS 36.331 [16] -- mobilityInformation MobilityInformation OPTIONAL, ... } MobilityInformation ::= BIT STRING (SIZE(32)) -- -- IEs for reporting of eHRPD load -- EHRPDCapacityValue ::= INTEGER (0..100) EHRPDSectorCapacityClassValue ::= INTEGER (1..100, ...) EHRPDSectorLoadReportingResponse ::= SEQUENCE { dL-EHRPD-CompositeAvailableCapacity EHRPDCompositeAvailableCapacity, uL-EHRPD-CompositeAvailableCapacity EHRPDCompositeAvailableCapacity, ... } EHRPDCompositeAvailableCapacity ::= SEQUENCE { eHRPDSectorCapacityClassValue EHRPDSectorCapacityClassValue, eHRPDCapacityValue EHRPDCapacityValue, ... } EHRPDMultiSectorLoadReportingResponseItem ::= SEQUENCE { eHRPD-Sector-ID EHRPD-Sector-ID, eHRPDSectorLoadReportingResponse EHRPDSectorLoadReportingResponse, ... } -- ************************************************************** -- -- Constants -- -- ************************************************************** maxnoofIRATReportingCells INTEGER ::= 128 maxnoofcandidateCells INTEGER ::= 16 maxnoofCellineNB INTEGER ::= 256 END nextepc-0.3.10/main.c000066400000000000000000000070001333553357400143410ustar00rootroot00000000000000/** * @file main.c */ /* Core library */ #define TRACE_MODULE _main_ #include "core_general.h" #include "core_debug.h" #include "core_signal.h" /* Server */ #include "common/application.h" #include "app_init.h" #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdate-time" static char *compile_time = __DATE__ " " __TIME__; #pragma GCC diagnostic pop static void show_version() { printf("NextEPC daemon v%s - %s\n", PACKAGE_VERSION, compile_time); } static void show_help(const char *name) { show_version(); printf("\n" "Usage: %s [arguments]\n" "\n" "Arguments:\n" " -v Show version\n" " -h Show help\n" " -d Start as daemon\n" " -f Set configuration file name\n" " -l log_file Log file path to be logged to\n" " -p pid_file PID file path\n" "\n", name); } static int check_signal(int signum) { switch (signum) { case SIGTERM: case SIGINT: { d_info("%s received", signum == SIGTERM ? "SIGTERM" : "SIGINT"); return 1; } case SIGHUP: { d_info("SIGHUP received"); app_logger_restart(); break; } case SIGUSR1: { break; } default: { d_error("Unknown signal number = %d\n", signum); break; } } return 0; } void terminate() { app_terminate(); core_terminate(); } int main(int argc, char *argv[]) { /************************************************************************** * Starting up process. * * Keep the order of starting-up */ status_t rv; char *config_path = NULL; char *log_path = NULL; char *pid_path = NULL; while (1) { int opt = getopt (argc, argv, "vhdf:l:p:"); if (opt == -1) break; switch (opt) { case 'v': show_version(); return EXIT_SUCCESS; case 'h': show_help(argv[0]); return EXIT_SUCCESS; case 'd': { pid_t pid; pid = fork(); d_assert(pid >= 0, return EXIT_FAILURE, "fork() failed"); if (pid != 0) { /* Parent */ return EXIT_SUCCESS; } /* Child */ setsid(); umask(027); break; } case 'f': config_path = optarg; break; case 'l': log_path = optarg; break; case 'p': pid_path = optarg; break; default: show_help(argv[0]); return EXIT_FAILURE; } } show_version(); d_print("\n"); atexit(terminate); core_initialize(); rv = app_initialize(config_path, log_path, pid_path); if (rv != CORE_OK) { if (rv == CORE_EAGAIN) return EXIT_SUCCESS; d_fatal("NextEPC initialization failed. Aborted"); return EXIT_FAILURE; } d_print("\n\n"); d_info("NextEPC daemon start"); signal_thread(check_signal); d_info("NextEPC daemon terminating..."); return EXIT_SUCCESS; } nextepc-0.3.10/src/000077500000000000000000000000001333553357400140435ustar00rootroot00000000000000nextepc-0.3.10/src/Makefile.am000066400000000000000000000030071333553357400160770ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in. SUBDIRS = common mme hss sgw pgw pcrf noinst_LTLIBRARIES = libmme.la libhss.la libsgw.la libpgw.la libpcrf.la libepc.la libmme_la_SOURCES = mme.c libmme_la_DEPENDENCIES = $(top_srcdir)/src/mme/libmme.la libmme_la_LIBADD = $(top_srcdir)/src/mme/libmme.la libhss_la_SOURCES = hss.c libhss_la_DEPENDENCIES = $(top_srcdir)/src/hss/libhss.la libhss_la_LIBADD = $(top_srcdir)/src/hss/libhss.la libsgw_la_SOURCES = sgw.c libsgw_la_DEPENDENCIES = $(top_srcdir)/src/sgw/libsgw.la libsgw_la_LIBADD = $(top_srcdir)/src/sgw/libsgw.la libpgw_la_SOURCES = pgw.c libpgw_la_DEPENDENCIES = $(top_srcdir)/src/pgw/libpgw.la libpgw_la_LIBADD = $(top_srcdir)/src/pgw/libpgw.la libpcrf_la_SOURCES = pcrf.c libpcrf_la_DEPENDENCIES = $(top_srcdir)/src/pcrf/libpcrf.la libpcrf_la_LIBADD = $(top_srcdir)/src/pcrf/libpcrf.la libepc_la_SOURCES = epc.c libepc_la_DEPENDENCIES = \ $(top_srcdir)/src/mme/libmme.la \ $(top_srcdir)/src/hss/libhss.la \ $(top_srcdir)/src/sgw/libsgw.la \ $(top_srcdir)/src/pgw/libpgw.la \ $(top_srcdir)/src/pcrf/libpcrf.la \ $(NULL) libepc_la_LIBADD = \ $(top_srcdir)/src/mme/libmme.la \ $(top_srcdir)/src/hss/libhss.la \ $(top_srcdir)/src/sgw/libsgw.la \ $(top_srcdir)/src/pgw/libpgw.la \ $(top_srcdir)/src/pcrf/libpcrf.la \ $(NULL) AM_CPPFLAGS = \ -I$(top_srcdir)/lib/core/include \ -I$(top_srcdir)/src \ $(NULL) AM_CFLAGS = \ -Wall -Werror \ $(NULL) MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = core *.stackdump nextepc-0.3.10/src/app_init.h000066400000000000000000000014311333553357400160160ustar00rootroot00000000000000#ifndef __APP_INIT_H__ #define __APP_INIT_H__ #include "core.h" #include "core_errno.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(status_t) app_initialize( const char *config_path, const char *log_path, const char *pid_path); CORE_DECLARE(void) app_terminate(void); CORE_DECLARE(status_t) mme_initialize(); CORE_DECLARE(void) mme_terminate(void); CORE_DECLARE(status_t) hss_initialize(); CORE_DECLARE(void) hss_terminate(void); CORE_DECLARE(status_t) sgw_initialize(); CORE_DECLARE(void) sgw_terminate(void); CORE_DECLARE(status_t) pgw_initialize(); CORE_DECLARE(void) pgw_terminate(void); CORE_DECLARE(status_t) pcrf_initialize(); CORE_DECLARE(void) pcrf_terminate(void); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __APP_INIT_H__ */ nextepc-0.3.10/src/common/000077500000000000000000000000001333553357400153335ustar00rootroot00000000000000nextepc-0.3.10/src/common/Makefile.am000066400000000000000000000013131333553357400173650ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in. noinst_LTLIBRARIES = libcommon.la libcommon_la_SOURCES = \ context.h application.h yaml_helper.h \ context.c application.c yaml_helper.c \ $(NULL) libcommon_la_DEPENDENCIES = \ $(top_srcdir)/lib/core/src/libcore.la \ $(NULL) libcommon_la_LIBADD = \ $(top_srcdir)/lib/core/src/libcore.la \ @YAML_LIBS@ \ @MONGOC_LIBS@ \ $(NULL) AM_CPPFLAGS = \ -I$(top_srcdir)/lib/core/include \ @MONGOC_CFLAGS@ \ $(NULL) AM_CFLAGS = \ -Wall -Werror \ $(NULL) DEFS = \ @DEFS@ \ -DSYSCONF_DIR=\"$(sysconfdir)/\" \ -DLOCALSTATE_DIR=\"$(localstatedir)/\" \ $(NULL) MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = core *.stackdump nextepc-0.3.10/src/common/application.c000066400000000000000000000146231333553357400200100ustar00rootroot00000000000000#define TRACE_MODULE _app_init #include "core_debug.h" #include "core_thread.h" #include "core_file.h" #include "core_lib.h" #include "context.h" #include "application.h" #define DEFAULT_CONFIG_FILE_PATH SYSCONF_DIR PACKAGE "/nextepc.conf" #define DEFAULT_RUNTIME_DIR_PATH LOCALSTATE_DIR "run/" static status_t app_logger_init(); static status_t app_logger_final(); static status_t app_logger_start(); static status_t app_logger_stop(); status_t app_will_initialize(const char *config_path, const char *log_path) { status_t rv; int app = 0; context_init(); context_self()->config.path = config_path; if (context_self()->config.path == NULL) context_self()->config.path = DEFAULT_CONFIG_FILE_PATH; rv = context_read_file(); if (rv != CORE_OK) return rv; rv = context_parse_config(); if (rv != CORE_OK) return rv; rv = context_setup_trace_module(); if (rv != CORE_OK) return rv; app = context_self()->logger.trace.app; if (app) { d_trace_level(&_app_init, app); } context_self()->logger.path = log_path; rv = app_logger_init(); if (rv != CORE_OK) return rv; if (context_self()->db_uri) { /* Override configuration if DB_URI environment variable is existed */ if (core_env_get("DB_URI")) context_self()->db_uri = core_env_get("DB_URI"); rv = context_db_init(context_self()->db_uri); if (rv != CORE_OK) return rv; d_print(" MongoDB URI : '%s'\n", context_self()->db_uri); } d_print(" Configuration : '%s'\n", context_self()->config.path); return rv; } status_t app_did_initialize(void) { status_t rv = app_logger_start(); if (rv != CORE_OK) return rv; return rv; } void app_will_terminate(void) { app_logger_stop(); } void app_did_terminate(void) { if (context_self()->db_uri) { d_trace(1, "DB-Client try to terminate\n"); context_db_final(); d_trace(1, "DB-Client terminate...done\n"); } app_logger_final(); context_final(); } status_t app_log_pid(const char *pid_path, const char *app_name) { file_t *pid_file = NULL; file_info_t finfo; static pid_t saved_pid = -1; pid_t mypid; status_t rv; char default_pid_path[MAX_FILEPATH_LEN]; char buf[128]; if (pid_path == NULL) { snprintf(default_pid_path, sizeof(default_pid_path), "%snextepc-%sd/pid", DEFAULT_RUNTIME_DIR_PATH, app_name); pid_path = default_pid_path; } mypid = getpid(); if (mypid != saved_pid && file_stat(&finfo, pid_path, FILE_INFO_MTIME) == CORE_OK) { d_warn("pid file %s overwritten -- Unclean " "shutdown of previous NextEPC run?", pid_path); } if ((rv = file_open(&pid_file, pid_path, FILE_WRITE | FILE_CREATE | FILE_TRUNCATE, FILE_UREAD | FILE_UWRITE | FILE_GREAD | FILE_WREAD)) != CORE_OK) { d_error("CHECK PERMISSION of Installation Directory..."); d_error("Cannot create PID file:`%s`", pid_path); return CORE_ERROR; } snprintf(buf, sizeof(buf), "%" C_PID_T_FMT "\r\n", mypid); file_puts(buf, pid_file); file_close(pid_file); saved_pid = mypid; d_print(" PID[%" C_PID_T_FMT "] : '%s'\n", saved_pid, pid_path); return CORE_OK; } status_t app_logger_restart() { app_logger_stop(); app_logger_final(); app_logger_init(); app_logger_start(); return CORE_OK; } static status_t app_logger_init() { status_t rv; if (context_self()->logger.console >= 0) { rv = d_msg_console_init(context_self()->logger.console); if (rv != CORE_OK) { d_error("console logger init failed : (file:%d)", context_self()->logger.console); return rv; } d_print(" Console Logging : '%d'\n", context_self()->logger.console); } if (context_self()->logger.syslog) { d_msg_syslog_init(context_self()->logger.syslog); d_print(" Syslog Logging : '%s'\n", context_self()->logger.syslog); } if (context_self()->logger.network.file && context_self()->logger.network.unix_domain) { if (context_self()->logger.path) context_self()->logger.network.file = context_self()->logger.path; rv = d_msg_network_init(context_self()->logger.network.unix_domain); if (rv != CORE_OK) { d_error("Network logger init failed : (unix_domain:%s, file:%s)", context_self()->logger.network.unix_domain, context_self()->logger.network.file); return rv; } d_print(" Network Logging : '%s' on %s\n", context_self()->logger.network.file, context_self()->logger.network.unix_domain); } if (context_self()->logger.file) { if (context_self()->logger.path) context_self()->logger.file = context_self()->logger.path; rv = d_msg_file_init(context_self()->logger.file); if (rv != CORE_OK) { d_error("file logger init failed : (file:%s)", context_self()->logger.file); return rv; } d_print(" File Logging : '%s'\n", context_self()->logger.file); } return CORE_OK; } static status_t app_logger_start() { status_t rv; if (context_self()->logger.network.file && context_self()->logger.network.unix_domain) { rv = d_msg_network_start(context_self()->logger.network.file); if (rv != CORE_OK) { d_error("Network logger start failed : (unix_domain:%s, file:%s)", context_self()->logger.network.unix_domain, context_self()->logger.network.file); return rv; } } return CORE_OK; } static status_t app_logger_stop() { if (context_self()->logger.network.file && context_self()->logger.network.unix_domain) { d_msg_network_stop(); } return CORE_OK; } static status_t app_logger_final() { if (context_self()->logger.console >= 0) { d_msg_console_final(); } if (context_self()->logger.syslog) { d_msg_syslog_final(); } if (context_self()->logger.network.file && context_self()->logger.network.unix_domain) { d_msg_network_final(); } if (context_self()->logger.file) { d_msg_file_final(); } return CORE_OK; } nextepc-0.3.10/src/common/application.h000066400000000000000000000013101333553357400200020ustar00rootroot00000000000000#ifndef __APPLICATION_H__ #define __APPLICATION_H__ #include "core.h" #include "core_errno.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(status_t) app_will_initialize( const char *config_path, const char *log_path); CORE_DECLARE(status_t) app_did_initialize(void); CORE_DECLARE(void) app_will_terminate(void); CORE_DECLARE(void) app_did_terminate(void); CORE_DECLARE(status_t) config_initialize(const char *config_path); CORE_DECLARE(void) config_terminate(void); CORE_DECLARE(status_t) app_logger_restart(void); CORE_DECLARE(status_t) app_log_pid(const char *pid_path, const char *app_name); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __APPLICATION_H__ */ nextepc-0.3.10/src/common/context.c000066400000000000000000000342141333553357400171670ustar00rootroot00000000000000#define TRACE_MODULE _context #include "core_file.h" #include "core_debug.h" #include "core_lib.h" #include "core_pkbuf.h" #include #include #include "yaml_helper.h" #include "context.h" #define DEFAULT_SCTP_STREAMS 30 static context_t self; static int context_initialized = 0; status_t context_init() { d_assert(context_initialized == 0, return CORE_ERROR, "Context already has been context_initialized"); memset(&self, 0, sizeof(context_t)); context_initialized = 1; return CORE_OK; } status_t context_final() { d_assert(context_initialized == 1, return CORE_ERROR, "Context already has been finalized"); if (self.config.document) { yaml_document_delete(self.config.document); CORE_FREE(self.config.document); } context_initialized = 0; return CORE_OK; } context_t* context_self() { return &self; } status_t context_read_file() { config_t *config = &self.config; FILE *file; yaml_parser_t parser; yaml_document_t *document = NULL; d_assert(config->path, return CORE_ERROR,); file = fopen(config->path, "rb"); d_assert(file, return CORE_ERROR, "Failed to read configuration file `%s`", config->path); d_assert(yaml_parser_initialize(&parser), return CORE_ERROR,); yaml_parser_set_input_file(&parser, file); document = core_calloc(1, sizeof(yaml_document_t)); if (!yaml_parser_load(&parser, document)) { d_fatal("Failed to parse configuration file '%s'", config->path); switch (parser.error) { case YAML_MEMORY_ERROR: d_error("Memory error: Not enough memory for parsing"); break; case YAML_READER_ERROR: if (parser.problem_value != -1) d_error("Reader error - %s: #%X at %zd", parser.problem, parser.problem_value, parser.problem_offset); else d_error("Reader error - %s at %zd", parser.problem, parser.problem_offset); break; case YAML_SCANNER_ERROR: if (parser.context) d_error("Scanner error - %s at line %lu, column %lu\n" "%s at line %lu, column %lu", parser.context, parser.context_mark.line+1, parser.context_mark.column+1, parser.problem, parser.problem_mark.line+1, parser.problem_mark.column+1); else d_error("Scanner error - %s at line %lu, column %lu", parser.problem, parser.problem_mark.line+1, parser.problem_mark.column+1); break; case YAML_PARSER_ERROR: if (parser.context) d_error("Parser error - %s at line %lu, column %lu\n" "%s at line %lu, column %lu", parser.context, parser.context_mark.line+1, parser.context_mark.column+1, parser.problem, parser.problem_mark.line+1, parser.problem_mark.column+1); else d_error("Parser error - %s at line %lu, column %lu", parser.problem, parser.problem_mark.line+1, parser.problem_mark.column+1); break; default: /* Couldn't happen. */ d_assert(0,, "Internal error"); break; } CORE_FREE(document); yaml_parser_delete(&parser); d_assert(!fclose(file),,); return CORE_ERROR; } config->document = document; yaml_parser_delete(&parser); d_assert(!fclose(file),,); return CORE_OK; } status_t context_setup_trace_module() { int app = context_self()->logger.trace.app; if (app) { extern int _mutex; d_trace_level(&_mutex, app); extern int _pkbuf; d_trace_level(&_pkbuf, app); extern int _timer; d_trace_level(&_timer, app); extern int _context; d_trace_level(&_context, app); } return CORE_OK; } static status_t context_prepare() { self.logger.console = -1; self.parameter.sctp_streams = DEFAULT_SCTP_STREAMS; return CORE_OK; } static status_t context_validation() { if (self.parameter.no_ipv4 == 1 && self.parameter.no_ipv6 == 1) { d_error("Both `no_ipv4` and `no_ipv6` set to `true` in `%s`", context_self()->config.path); return CORE_ERROR; } return CORE_OK; } status_t context_parse_config() { status_t rv; config_t *config = &self.config; yaml_document_t *document = NULL; yaml_iter_t root_iter; d_assert(config, return CORE_ERROR,); document = config->document; d_assert(document, return CORE_ERROR,); rv = context_prepare(); if (rv != CORE_OK) return rv; yaml_iter_init(&root_iter, document); while(yaml_iter_next(&root_iter)) { const char *root_key = yaml_iter_key(&root_iter); d_assert(root_key, return CORE_ERROR,); if (!strcmp(root_key, "db_uri")) { self.db_uri = yaml_iter_value(&root_iter); } else if (!strcmp(root_key, "logger")) { yaml_iter_t logger_iter; yaml_iter_recurse(&root_iter, &logger_iter); while(yaml_iter_next(&logger_iter)) { const char *logger_key = yaml_iter_key(&logger_iter); d_assert(logger_key, return CORE_ERROR,); if (!strcmp(logger_key, "file")) { self.logger.file = yaml_iter_value(&logger_iter); } else if (!strcmp(logger_key, "console")) { const char *v = yaml_iter_value(&logger_iter); if (v) self.logger.console = atoi(v); } else if (!strcmp(logger_key, "syslog")) { self.logger.syslog = yaml_iter_value(&logger_iter); } else if (!strcmp(logger_key, "network")) { yaml_iter_t network_iter; yaml_iter_recurse(&logger_iter, &network_iter); while(yaml_iter_next(&network_iter)) { const char *network_key = yaml_iter_key(&network_iter); d_assert(network_key, return CORE_ERROR,); if (!strcmp(network_key, "file")) { self.logger.network.file = yaml_iter_value(&network_iter); } else if (!strcmp(network_key, "unixDomain")) { self.logger.network.unix_domain = yaml_iter_value(&network_iter); } else d_warn("unknown key `%s`", network_key); } } else if (!strcmp(logger_key, "trace")) { yaml_iter_t trace_iter; yaml_iter_recurse(&logger_iter, &trace_iter); while(yaml_iter_next(&trace_iter)) { const char *trace_key = yaml_iter_key(&trace_iter); d_assert(trace_key, return CORE_ERROR,); if (!strcmp(trace_key, "app")) { const char *v = yaml_iter_value(&trace_iter); if (v) self.logger.trace.app = atoi(v); } else if (!strcmp(trace_key, "s1ap")) { const char *v = yaml_iter_value(&trace_iter); if (v) self.logger.trace.s1ap = atoi(v); } else if (!strcmp(trace_key, "nas")) { const char *v = yaml_iter_value(&trace_iter); if (v) self.logger.trace.nas = atoi(v); } else if (!strcmp(trace_key, "diameter")) { const char *v = yaml_iter_value(&trace_iter); if (v) self.logger.trace.diameter = atoi(v); } else if (!strcmp(trace_key, "gtpv2")) { const char *v = yaml_iter_value(&trace_iter); if (v) self.logger.trace.gtpv2 = atoi(v); } else if (!strcmp(trace_key, "gtp")) { const char *v = yaml_iter_value(&trace_iter); if (v) self.logger.trace.gtp = atoi(v); } else d_warn("unknown key `%s`", trace_key); } } } } else if (!strcmp(root_key, "parameter")) { yaml_iter_t parameter_iter; yaml_iter_recurse(&root_iter, ¶meter_iter); while(yaml_iter_next(¶meter_iter)) { const char *parameter_key = yaml_iter_key(¶meter_iter); d_assert(parameter_key, return CORE_ERROR,); if (!strcmp(parameter_key, "no_hss")) { self.parameter.no_hss = yaml_iter_bool(¶meter_iter); } else if (!strcmp(parameter_key, "no_sgw")) { self.parameter.no_sgw = yaml_iter_bool(¶meter_iter); } else if (!strcmp(parameter_key, "no_pgw")) { self.parameter.no_pgw = yaml_iter_bool(¶meter_iter); } else if (!strcmp(parameter_key, "no_pcrf")) { self.parameter.no_pcrf = yaml_iter_bool(¶meter_iter); } else if (!strcmp(parameter_key, "sctp_streams")) { const char *v = yaml_iter_value(¶meter_iter); if (v) self.parameter.sctp_streams = atoi(v); } else if (!strcmp(parameter_key, "no_ipv4")) { self.parameter.no_ipv4 = yaml_iter_bool(¶meter_iter); } else if (!strcmp(parameter_key, "no_ipv6")) { self.parameter.no_ipv6 = yaml_iter_bool(¶meter_iter); } else if (!strcmp(parameter_key, "prefer_ipv4")) { self.parameter.prefer_ipv4 = yaml_iter_bool(¶meter_iter); } else if (!strcmp(parameter_key, "multicast")) { self.parameter.multicast = yaml_iter_bool(¶meter_iter); } else if (!strcmp(parameter_key, "no_slaac")) { self.parameter.no_slaac = yaml_iter_bool(¶meter_iter); } else d_warn("unknown key `%s`", parameter_key); } } } rv = context_validation(); if (rv != CORE_OK) return rv; return CORE_OK; } /* * We've added it * Because the following function is deprecated in the mongo-c-driver */ static bool context_mongoc_client_get_server_status (mongoc_client_t *client, /* IN */ mongoc_read_prefs_t *read_prefs, /* IN */ bson_t *reply, /* OUT */ bson_error_t *error) /* OUT */ { bson_t cmd = BSON_INITIALIZER; bool ret = false; BSON_ASSERT (client); BSON_APPEND_INT32 (&cmd, "serverStatus", 1); ret = mongoc_client_command_simple ( client, "admin", &cmd, read_prefs, reply, error); bson_destroy (&cmd); return ret; } status_t context_db_init(const char *db_uri) { bson_t reply; bson_error_t error; bson_iter_t iter; const mongoc_uri_t *uri; mongoc_init(); self.db_client = mongoc_client_new(db_uri); if (!self.db_client) { d_error("Failed to parse DB URI [%s]", db_uri); return CORE_ERROR; } #if MONGOC_MAJOR_VERSION >= 1 && MONGOC_MINOR_VERSION >= 4 mongoc_client_set_error_api(self.db_client, 2); #endif uri = mongoc_client_get_uri(self.db_client); d_assert(uri, context_db_final(); return CORE_ERROR, "Database is not defined in DB_URI [%s]", db_uri); self.db_name = (char *)mongoc_uri_get_database(uri); d_assert(self.db_name, context_db_final(); return CORE_ERROR, "Database is not defined in DB_URI [%s]", db_uri); self.database = mongoc_client_get_database(self.db_client, self.db_name); d_assert(self.database, context_db_final(); return CORE_ERROR, "Database is not defined in DB_URI [%s]", db_uri); if (!context_mongoc_client_get_server_status( self.db_client, NULL, &reply, &error)) { d_error("Failed to conect to server [%s]", db_uri); return CORE_EAGAIN; } d_assert(bson_iter_init_find(&iter, &reply, "ok"), bson_destroy(&reply); context_db_final(); return CORE_ERROR, "Invalid reply for server status [%s]", db_uri); bson_destroy(&reply); return CORE_OK; } status_t context_db_final() { if (self.database) { mongoc_database_destroy(self.database); self.database = NULL; } if (self.db_client) { mongoc_client_destroy(self.db_client); self.db_client = NULL; } mongoc_cleanup(); return CORE_OK; } nextepc-0.3.10/src/common/context.h000066400000000000000000000032441333553357400171730ustar00rootroot00000000000000#ifndef __CONTEXT_H__ #define __CONTEXT_H__ #include "core_debug.h" #include "core_param.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define MAX_CONFIG_FILE_SIZE 2048 #define MAX_NUM_OF_CONFIG_TOKEN 256 typedef struct _config_t { const char *path; void *document; } config_t; #define MAX_DB_URI_LEN 256 typedef struct _context_t { config_t config; const char *db_uri; void *db_client; char *db_name; void *database; struct { const char *path; int console; const char *syslog; struct { const char *unix_domain; const char *file; } network; const char *file; struct { int app; int s1ap; int nas; int gtpv2; int gtp; int diameter; } trace; } logger; struct { /* Element */ int no_hss; int no_sgw; int no_pgw; int no_pcrf; /* Network */ int sctp_streams; int no_ipv4; int no_ipv6; int prefer_ipv4; int multicast; int no_slaac; } parameter; } context_t; CORE_DECLARE(status_t) context_init(void); CORE_DECLARE(status_t) context_final(void); CORE_DECLARE(context_t*) context_self(void); CORE_DECLARE(status_t) context_read_file(void); CORE_DECLARE(status_t) context_parse_config(void); CORE_DECLARE(status_t) context_setup_trace_module(void); CORE_DECLARE(status_t) context_db_init(const char *db_uri); CORE_DECLARE(status_t) context_db_final(void); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __CONTEXT_H__ */ nextepc-0.3.10/src/common/yaml_helper.c000066400000000000000000000113441333553357400200030ustar00rootroot00000000000000#define TRACE_MODULE _yaml_helper #include "yaml_helper.h" void yaml_iter_init(yaml_iter_t *iter, yaml_document_t *document) { d_assert(iter, return,); d_assert(document, return,); memset(iter, 0, sizeof(yaml_iter_t)); iter->document = document; iter->node = yaml_document_get_root_node(document); d_assert(iter->node, return,); if (iter->node->type == YAML_MAPPING_NODE) iter->pair = iter->node->data.mapping.pairs.start - 1; else if (iter->node->type == YAML_SEQUENCE_NODE) iter->item = iter->node->data.sequence.items.start - 1; } int yaml_iter_next(yaml_iter_t *iter) { d_assert(iter, return 0,); d_assert(iter->document, return 0,); d_assert(iter->node, return 0,); if (iter->node->type == YAML_MAPPING_NODE) { if (iter->pair) { iter->pair++; if (iter->pair < iter->node->data.mapping.pairs.top) return 1; } } else if (iter->node->type == YAML_SEQUENCE_NODE) { if (iter->item) { iter->item++; if (iter->item < iter->node->data.sequence.items.top) return 1; } } return 0; } void yaml_iter_recurse(yaml_iter_t *parent, yaml_iter_t *iter) { d_assert(parent, return,); d_assert(parent->document, return,); d_assert(parent->node, return,); d_assert(iter, return,); memset(iter, 0, sizeof(yaml_iter_t)); iter->document = parent->document; if (parent->node->type == YAML_MAPPING_NODE) { d_assert(parent->pair, return,); iter->node = yaml_document_get_node( parent->document, parent->pair->value); d_assert(iter->node, return,); if (iter->node->type == YAML_MAPPING_NODE) iter->pair = iter->node->data.mapping.pairs.start - 1; else if (iter->node->type == YAML_SEQUENCE_NODE) iter->item = iter->node->data.sequence.items.start - 1; } else if (parent->node->type == YAML_SEQUENCE_NODE) { d_assert(parent->item, return,); iter->node = yaml_document_get_node(parent->document, *parent->item); d_assert(iter->node, return,); if (iter->node->type == YAML_MAPPING_NODE) iter->pair = iter->node->data.mapping.pairs.start - 1; else if (iter->node->type == YAML_SEQUENCE_NODE) iter->item = iter->node->data.sequence.items.start - 1; } else d_assert(0, return,); } int yaml_iter_type(yaml_iter_t *iter) { d_assert(iter, return 0,); d_assert(iter->node, return 0,); return iter->node->type; } const char *yaml_iter_key(yaml_iter_t *iter) { yaml_node_t *node = NULL; d_assert(iter, return NULL,); d_assert(iter->document, return NULL,); d_assert(iter->node, return NULL,); if (iter->node->type == YAML_MAPPING_NODE) { d_assert(iter->pair, return NULL,); node = yaml_document_get_node(iter->document, iter->pair->key); d_assert(node, return NULL,); d_assert(node->type == YAML_SCALAR_NODE, return NULL,); return (const char *)node->data.scalar.value; } else if (iter->node->type == YAML_SEQUENCE_NODE) { d_assert(iter->item, return NULL,); node = yaml_document_get_node(iter->document, *iter->item); d_assert(node, return NULL,); d_assert(node->type == YAML_SCALAR_NODE, return NULL,); return (const char *)node->data.scalar.value; } else d_assert(0, return 0,); } const char *yaml_iter_value(yaml_iter_t *iter) { d_assert(iter, return NULL,); d_assert(iter->document, return NULL,); d_assert(iter->node, return NULL,); if (iter->node->type == YAML_SCALAR_NODE) { return (const char *)iter->node->data.scalar.value; } else if (iter->node->type == YAML_MAPPING_NODE) { yaml_node_t *node = NULL; d_assert(iter->pair, return NULL,); node = yaml_document_get_node(iter->document, iter->pair->value); d_assert(node, return NULL,); d_assert(node->type == YAML_SCALAR_NODE, return NULL,); return (const char *)node->data.scalar.value; } else if (iter->node->type == YAML_SEQUENCE_NODE) { yaml_node_t *node = NULL; d_assert(iter->item, return NULL,); node = yaml_document_get_node(iter->document, *iter->item); d_assert(node, return NULL,); d_assert(node->type == YAML_SCALAR_NODE, return NULL,); return (const char *)node->data.scalar.value; } else d_assert(0, return NULL,); } int yaml_iter_bool(yaml_iter_t *iter) { const char *v = yaml_iter_value(iter); if (v) { if (!strcasecmp(v, "true") || !strcasecmp(v, "yes")) return 1; if (atoi(v)) return 1; } return 0; } nextepc-0.3.10/src/common/yaml_helper.h000066400000000000000000000013721333553357400200100ustar00rootroot00000000000000#ifndef __YAML_HELPER_H__ #define __YAML_HELPER_H__ #include "core_debug.h" #include typedef struct { yaml_document_t *document; yaml_node_t *node; yaml_node_pair_t *pair; yaml_node_item_t *item; } yaml_iter_t; CORE_DECLARE(void) yaml_iter_init(yaml_iter_t *iter, yaml_document_t *document); CORE_DECLARE(int) yaml_iter_next(yaml_iter_t *iter); CORE_DECLARE(void) yaml_iter_recurse(yaml_iter_t *parent, yaml_iter_t *iter); CORE_DECLARE(int) yaml_iter_type(yaml_iter_t *iter); CORE_DECLARE(const char *) yaml_iter_key(yaml_iter_t *iter); CORE_DECLARE(const char *) yaml_iter_value(yaml_iter_t *iter); CORE_DECLARE(int) yaml_iter_bool(yaml_iter_t *iter); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __YAML_HELPER_H__ */ nextepc-0.3.10/src/epc.c000066400000000000000000000200211333553357400147510ustar00rootroot00000000000000#define TRACE_MODULE _epc_main #include "core_general.h" #include "core_debug.h" #include "core_semaphore.h" #include "common/context.h" #include "common/application.h" #include "app_init.h" static semaphore_id pcrf_sem1 = 0; static semaphore_id pcrf_sem2 = 0; static semaphore_id pgw_sem1 = 0; static semaphore_id pgw_sem2 = 0; static semaphore_id sgw_sem1 = 0; static semaphore_id sgw_sem2 = 0; static semaphore_id hss_sem1 = 0; static semaphore_id hss_sem2 = 0; status_t app_initialize( const char *config_path, const char *log_path, const char *pid_path) { pid_t pid; status_t rv; int app = 0; rv = app_log_pid(pid_path, "epc"); if (rv != CORE_OK) return rv; rv = app_will_initialize(config_path, log_path); if (rv != CORE_OK) return rv; app = context_self()->logger.trace.app; if (app) { d_trace_level(&_epc_main, app); } /************************* PCRF Process **********************/ semaphore_create(&pcrf_sem1, 0); /* copied to PCRF/PGW/SGW/HSS process */ semaphore_create(&pcrf_sem2, 0); /* copied to PCRF/PGW/SGW/HSS process */ if (context_self()->parameter.no_pcrf == 0) { pid = fork(); d_assert(pid >= 0, _exit(EXIT_FAILURE), "fork() failed"); if (pid == 0) { d_trace(1, "PCRF try to initialize\n"); rv = pcrf_initialize(); d_assert(rv == CORE_OK,, "Failed to intialize PCRF"); d_trace(1, "PCRF initialize...done\n"); if (pcrf_sem1) semaphore_post(pcrf_sem1); if (pcrf_sem2) semaphore_wait(pcrf_sem2); if (rv == CORE_OK) { d_trace(1, "PCRF try to terminate\n"); pcrf_terminate(); d_trace(1, "PCRF terminate...done\n"); } if (pcrf_sem1) semaphore_post(pcrf_sem1); /* allocated from parent process */ if (pcrf_sem1) semaphore_delete(pcrf_sem1); if (pcrf_sem2) semaphore_delete(pcrf_sem2); app_did_terminate(); core_terminate(); _exit(EXIT_SUCCESS); } if (pcrf_sem1) semaphore_wait(pcrf_sem1); } /************************* PGW Process **********************/ semaphore_create(&pgw_sem1, 0); /* copied to PGW/SGW/HSS process */ semaphore_create(&pgw_sem2, 0); /* copied to PGW/SGW/HSS process */ if (context_self()->parameter.no_pgw == 0) { pid = fork(); d_assert(pid >= 0, _exit(EXIT_FAILURE), "fork() failed"); if (pid == 0) { /* allocated from parent process */ if (pcrf_sem1) semaphore_delete(pcrf_sem1); if (pcrf_sem2) semaphore_delete(pcrf_sem2); d_trace(1, "PGW try to initialize\n"); rv = pgw_initialize(); d_assert(rv == CORE_OK,, "Failed to intialize PGW"); d_trace(1, "PGW initialize...done\n"); if (pgw_sem1) semaphore_post(pgw_sem1); if (pgw_sem2) semaphore_wait(pgw_sem2); if (rv == CORE_OK) { d_trace(1, "PGW try to terminate\n"); pgw_terminate(); d_trace(1, "PGW terminate...done\n"); } if (pgw_sem1) semaphore_post(pgw_sem1); /* allocated from parent process */ if (pgw_sem1) semaphore_delete(pgw_sem1); if (pgw_sem2) semaphore_delete(pgw_sem2); app_did_terminate(); core_terminate(); _exit(EXIT_SUCCESS); } if (pgw_sem1) semaphore_wait(pgw_sem1); } /************************* SGW Process **********************/ semaphore_create(&sgw_sem1, 0); /* copied to SGW/HSS process */ semaphore_create(&sgw_sem2, 0); /* copied to SGW/HSS process */ if (context_self()->parameter.no_sgw == 0) { pid = fork(); d_assert(pid >= 0, _exit(EXIT_FAILURE), "fork() failed"); if (pid == 0) { /* allocated from parent process */ if (pcrf_sem1) semaphore_delete(pcrf_sem1); if (pcrf_sem2) semaphore_delete(pcrf_sem2); if (pgw_sem1) semaphore_delete(pgw_sem1); if (pgw_sem2) semaphore_delete(pgw_sem2); d_trace(1, "SGW try to initialize\n"); rv = sgw_initialize(); d_assert(rv == CORE_OK,, "Failed to intialize SGW"); d_trace(1, "SGW initialize...done\n"); if (sgw_sem1) semaphore_post(sgw_sem1); if (sgw_sem2) semaphore_wait(sgw_sem2); if (rv == CORE_OK) { d_trace(1, "SGW try to terminate\n"); sgw_terminate(); d_trace(1, "SGW terminate...done\n"); } if (sgw_sem1) semaphore_post(sgw_sem1); /* allocated from parent process */ if (sgw_sem1) semaphore_delete(sgw_sem1); if (sgw_sem2) semaphore_delete(sgw_sem2); app_did_terminate(); core_terminate(); _exit(EXIT_SUCCESS); } if (sgw_sem1) semaphore_wait(sgw_sem1); } /************************* HSS Process **********************/ semaphore_create(&hss_sem1, 0); /* copied to HSS process */ semaphore_create(&hss_sem2, 0); /* copied to HSS process */ if (context_self()->parameter.no_hss == 0) { pid = fork(); d_assert(pid >= 0, _exit(EXIT_FAILURE), "fork() failed"); if (pid == 0) { /* allocated from parent process */ if (pcrf_sem1) semaphore_delete(pcrf_sem1); if (pcrf_sem2) semaphore_delete(pcrf_sem2); if (pgw_sem1) semaphore_delete(pgw_sem1); if (pgw_sem2) semaphore_delete(pgw_sem2); if (sgw_sem1) semaphore_delete(sgw_sem1); if (sgw_sem2) semaphore_delete(sgw_sem2); d_trace(1, "HSS try to initialize\n"); rv = hss_initialize(); d_assert(rv == CORE_OK,, "Failed to intialize HSS"); d_trace(1, "HSS initialize...done\n"); if (hss_sem1) semaphore_post(hss_sem1); if (hss_sem2) semaphore_wait(hss_sem2); if (rv == CORE_OK) { d_trace(1, "HSS try to terminate\n"); hss_terminate(); d_trace(1, "HSS terminate...done\n"); } if (hss_sem1) semaphore_post(hss_sem1); if (hss_sem1) semaphore_delete(hss_sem1); if (hss_sem2) semaphore_delete(hss_sem2); app_did_terminate(); core_terminate(); _exit(EXIT_SUCCESS); } if (hss_sem1) semaphore_wait(hss_sem1); } rv = app_did_initialize(); if (rv != CORE_OK) return rv; d_trace(1, "MME try to initialize\n"); rv = mme_initialize(); d_assert(rv == CORE_OK, return rv, "Failed to intialize MME"); d_trace(1, "MME initialize...done\n"); return CORE_OK;; } void app_terminate(void) { app_will_terminate(); d_trace(1, "MME try to terminate\n"); mme_terminate(); d_trace(1, "MME terminate...done\n"); if (context_self()->parameter.no_hss == 0) { if (hss_sem2) semaphore_post(hss_sem2); if (hss_sem1) semaphore_wait(hss_sem1); } if (hss_sem1) semaphore_delete(hss_sem1); if (hss_sem2) semaphore_delete(hss_sem2); if (context_self()->parameter.no_sgw == 0) { if (sgw_sem2) semaphore_post(sgw_sem2); if (sgw_sem1) semaphore_wait(sgw_sem1); } if (sgw_sem1) semaphore_delete(sgw_sem1); if (sgw_sem2) semaphore_delete(sgw_sem2); if (context_self()->parameter.no_pgw == 0) { if (pgw_sem2) semaphore_post(pgw_sem2); if (pgw_sem1) semaphore_wait(pgw_sem1); } if (pgw_sem1) semaphore_delete(pgw_sem1); if (pgw_sem2) semaphore_delete(pgw_sem2); if (context_self()->parameter.no_pcrf == 0) { if (pcrf_sem2) semaphore_post(pcrf_sem2); if (pcrf_sem1) semaphore_wait(pcrf_sem1); } if (pcrf_sem1) semaphore_delete(pcrf_sem1); if (pcrf_sem2) semaphore_delete(pcrf_sem2); app_did_terminate(); } nextepc-0.3.10/src/hss.c000066400000000000000000000021051333553357400150020ustar00rootroot00000000000000#define TRACE_MODULE _hss_main #include "core_debug.h" #include "core_signal.h" #include "core_semaphore.h" #include "common/context.h" #include "common/application.h" #include "app_init.h" status_t app_initialize( const char *config_path, const char *log_path, const char *pid_path) { status_t rv; int app = 0; rv = app_log_pid(pid_path, "hss"); if (rv != CORE_OK) return rv; rv = app_will_initialize(config_path, log_path); if (rv != CORE_OK) return rv; app = context_self()->logger.trace.app; if (app) { d_trace_level(&_hss_main, app); } d_trace(1, "HSS try to initialize\n"); rv = hss_initialize(); if (rv != CORE_OK) { d_error("Failed to intialize HSS"); return rv; } d_trace(1, "HSS initialize...done\n"); rv = app_did_initialize(); if (rv != CORE_OK) return rv; return CORE_OK; } void app_terminate(void) { app_will_terminate(); d_trace(1, "HSS try to terminate\n"); hss_terminate(); d_trace(1, "HSS terminate...done\n"); app_did_terminate(); } nextepc-0.3.10/src/hss/000077500000000000000000000000001333553357400146405ustar00rootroot00000000000000nextepc-0.3.10/src/hss/Makefile.am000066400000000000000000000013671333553357400167030ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in. noinst_LTLIBRARIES = libhss.la libhss_la_SOURCES = \ milenage.h hss_auc.h hss_context.h hss_fd_path.h \ milenage.c hss_auc.c hss_init.c hss_context.c hss_fd_path.c \ $(NULL) libhss_la_DEPENDENCIES = \ $(top_srcdir)/lib/fd/libfd.la \ $(top_srcdir)/src/common/libcommon.la \ $(NULL) libhss_la_LIBADD = \ $(top_srcdir)/lib/fd/libfd.la \ $(top_srcdir)/src/common/libcommon.la \ $(NULL) AM_CPPFLAGS = \ -I$(top_srcdir)/lib/core/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ -I$(top_srcdir)/lib/@FREEDIAMETER_DIR@/include \ @MONGOC_CFLAGS@ \ $(NULL) AM_CFLAGS = \ -Wall -Werror \ $(NULL) MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = core *.stackdump nextepc-0.3.10/src/hss/hss_auc.c000066400000000000000000000022331333553357400164310ustar00rootroot00000000000000#define TRACE_MODULE _hss_kdf #include "core_debug.h" #include "core_sha2_hmac.h" #include "3gpp_types.h" #include "hss_auc.h" #include "milenage.h" #define FC_VALUE 0x10 void hss_auc_kasme(const c_uint8_t *ck, const c_uint8_t *ik, const c_uint8_t plmn_id[3], const c_uint8_t *sqn, const c_uint8_t *ak, c_uint8_t *kasme) { c_uint8_t s[14]; c_uint8_t k[32]; int i; memcpy(&k[0], ck, 16); memcpy(&k[16], ik, 16); s[0] = FC_VALUE; memcpy(&s[1], plmn_id, 3); s[4] = 0x00; s[5] = 0x03; for (i = 0; i < 6; i++) s[6+i] = sqn[i] ^ ak[i]; s[12] = 0x00; s[13] = 0x06; hmac_sha256(k, 32, s, 14, kasme, 32); } void hss_auc_sqn( const c_uint8_t *opc, const c_uint8_t *k, const c_uint8_t *auts, c_uint8_t *sqn_ms, c_uint8_t *mac_s) { int i; c_uint8_t ak[HSS_AK_LEN]; c_uint8_t amf[2] = { 0, 0 }; const c_uint8_t *rand = auts; const c_uint8_t *conc_sqn_ms = auts + RAND_LEN; milenage_f2345(opc, k, rand, NULL, NULL, NULL, NULL, ak); for (i = 0; i < HSS_SQN_LEN; i++) sqn_ms[i] = ak[i] ^ conc_sqn_ms[i]; milenage_f1(opc, k, auts, sqn_ms, amf, NULL, mac_s); } nextepc-0.3.10/src/hss/hss_auc.h000066400000000000000000000007171333553357400164430ustar00rootroot00000000000000#ifndef __HSS_KDF_H__ #define __HSS_KDF_H__ #include "core.h" #define HSS_SQN_LEN 6 #define HSS_AK_LEN 6 CORE_DECLARE(void) hss_auc_kasme(const c_uint8_t *ck, const c_uint8_t *ik, const c_uint8_t plmn_id[3], const c_uint8_t *sqn, const c_uint8_t *ak, c_uint8_t *kasme); CORE_DECLARE(void) hss_auc_sqn( const c_uint8_t *opc, const c_uint8_t *k, const c_uint8_t *auts, c_uint8_t *sqn_ms, c_uint8_t *mac_s); #endif /* __HSS_KDF_H__ */ nextepc-0.3.10/src/hss/hss_context.c000066400000000000000000000715551333553357400173620ustar00rootroot00000000000000#define TRACE_MODULE _hss_context #include "core_debug.h" #include "core_lib.h" #include "core_network.h" #include #include #include "common/yaml_helper.h" #include "fd/fd_lib.h" #include "common/context.h" #include "hss_context.h" static hss_context_t self; static fd_config_t g_fd_conf; static int context_initialized = 0; hss_context_t* hss_self() { return &self; } status_t hss_context_init(void) { status_t rv; d_assert(context_initialized == 0, return CORE_ERROR, "HSS context already has been context_initialized"); /* Initial FreeDiameter Config */ memset(&g_fd_conf, 0, sizeof(fd_config_t)); /* Initialize HSS context */ memset(&self, 0, sizeof(hss_context_t)); self.fd_config = &g_fd_conf; rv = mutex_create(&self.db_lock, MUTEX_DEFAULT); d_assert(rv == CORE_OK, return CORE_ERROR,); context_initialized = 1; return CORE_OK; } status_t hss_context_final(void) { d_assert(context_initialized == 1, return CORE_ERROR, "HSS context already has been finalized"); mutex_delete(self.db_lock); context_initialized = 0; return CORE_OK; } static status_t hss_context_prepare() { self.fd_config->cnf_port = DIAMETER_PORT; self.fd_config->cnf_port_tls = DIAMETER_SECURE_PORT; return CORE_OK; } static status_t hss_context_validation() { if (self.fd_conf_path == NULL && (self.fd_config->cnf_diamid == NULL || self.fd_config->cnf_diamrlm == NULL || self.fd_config->cnf_addr == NULL)) { d_error("No hss.freeDiameter in '%s'", context_self()->config.path); return CORE_ERROR; } return CORE_OK; } status_t hss_context_parse_config() { status_t rv; config_t *config = &context_self()->config; yaml_document_t *document = NULL; yaml_iter_t root_iter; d_assert(config, return CORE_ERROR,); document = config->document; d_assert(document, return CORE_ERROR,); rv = hss_context_prepare(); if (rv != CORE_OK) return rv; yaml_iter_init(&root_iter, document); while(yaml_iter_next(&root_iter)) { const char *root_key = yaml_iter_key(&root_iter); d_assert(root_key, return CORE_ERROR,); if (!strcmp(root_key, "hss")) { yaml_iter_t hss_iter; yaml_iter_recurse(&root_iter, &hss_iter); while(yaml_iter_next(&hss_iter)) { const char *hss_key = yaml_iter_key(&hss_iter); d_assert(hss_key, return CORE_ERROR,); if (!strcmp(hss_key, "freeDiameter")) { yaml_node_t *node = yaml_document_get_node(document, hss_iter.pair->value); d_assert(node, return CORE_ERROR,); if (node->type == YAML_SCALAR_NODE) { self.fd_conf_path = yaml_iter_value(&hss_iter); } else if (node->type == YAML_MAPPING_NODE) { yaml_iter_t fd_iter; yaml_iter_recurse(&hss_iter, &fd_iter); while(yaml_iter_next(&fd_iter)) { const char *fd_key = yaml_iter_key(&fd_iter); d_assert(fd_key, return CORE_ERROR,); if (!strcmp(fd_key, "identity")) { self.fd_config->cnf_diamid = yaml_iter_value(&fd_iter); } else if (!strcmp(fd_key, "realm")) { self.fd_config->cnf_diamrlm = yaml_iter_value(&fd_iter); } else if (!strcmp(fd_key, "port")) { const char *v = yaml_iter_value(&fd_iter); if (v) self.fd_config->cnf_port = atoi(v); } else if (!strcmp(fd_key, "sec_port")) { const char *v = yaml_iter_value(&fd_iter); if (v) self.fd_config->cnf_port_tls = atoi(v); } else if (!strcmp(fd_key, "no_sctp")) { self.fd_config->cnf_flags.no_sctp = yaml_iter_bool(&fd_iter); } else if (!strcmp(fd_key, "listen_on")) { self.fd_config->cnf_addr = yaml_iter_value(&fd_iter); } else if (!strcmp(fd_key, "load_extension")) { yaml_iter_t ext_array, ext_iter; yaml_iter_recurse(&fd_iter, &ext_array); do { const char *module = NULL; const char *conf = NULL; if (yaml_iter_type(&ext_array) == YAML_MAPPING_NODE) { memcpy(&ext_iter, &ext_array, sizeof(yaml_iter_t)); } else if (yaml_iter_type(&ext_array) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&ext_array)) break; yaml_iter_recurse( &ext_array, &ext_iter); } else if (yaml_iter_type(&ext_array) == YAML_SCALAR_NODE) { break; } else d_assert(0, return CORE_ERROR,); while(yaml_iter_next(&ext_iter)) { const char *ext_key = yaml_iter_key(&ext_iter); d_assert(ext_key, return CORE_ERROR,); if (!strcmp(ext_key, "module")) { module = yaml_iter_value(&ext_iter); } else if (!strcmp(ext_key, "conf")) { conf = yaml_iter_value(&ext_iter); } else d_warn("unknown key `%s`", ext_key); } if (module) { self.fd_config-> ext[self.fd_config->num_of_ext]. module = module; self.fd_config-> ext[self.fd_config->num_of_ext]. conf = conf; self.fd_config->num_of_ext++; } } while(yaml_iter_type(&ext_array) == YAML_SEQUENCE_NODE); } else if (!strcmp(fd_key, "connect")) { yaml_iter_t conn_array, conn_iter; yaml_iter_recurse(&fd_iter, &conn_array); do { const char *identity = NULL; const char *addr = NULL; c_uint16_t port = 0; if (yaml_iter_type(&conn_array) == YAML_MAPPING_NODE) { memcpy(&conn_iter, &conn_array, sizeof(yaml_iter_t)); } else if (yaml_iter_type(&conn_array) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&conn_array)) break; yaml_iter_recurse(&conn_array, &conn_iter); } else if (yaml_iter_type(&conn_array) == YAML_SCALAR_NODE) { break; } else d_assert(0, return CORE_ERROR,); while(yaml_iter_next(&conn_iter)) { const char *conn_key = yaml_iter_key(&conn_iter); d_assert(conn_key, return CORE_ERROR,); if (!strcmp(conn_key, "identity")) { identity = yaml_iter_value(&conn_iter); } else if (!strcmp(conn_key, "addr")) { addr = yaml_iter_value(&conn_iter); } else if (!strcmp(conn_key, "port")) { const char *v = yaml_iter_value(&conn_iter); if (v) port = atoi(v); } else d_warn("unknown key `%s`", conn_key); } if (identity && addr) { self.fd_config-> conn[self.fd_config->num_of_conn]. identity = identity; self.fd_config-> conn[self.fd_config->num_of_conn]. addr = addr; self.fd_config-> conn[self.fd_config->num_of_conn]. port = port; self.fd_config->num_of_conn++; } } while(yaml_iter_type(&conn_array) == YAML_SEQUENCE_NODE); } else d_warn("unknown key `%s`", fd_key); } } } else d_warn("unknown key `%s`", hss_key); } } } rv = hss_context_validation(); if (rv != CORE_OK) return rv; return CORE_OK; } status_t hss_context_setup_trace_module() { int app = context_self()->logger.trace.app; int diameter = context_self()->logger.trace.diameter; if (app) { extern int _hss_context; d_trace_level(&_hss_context, app); } if (diameter) { extern int _hss_fd_path; d_trace_level(&_hss_fd_path, diameter); extern int _fd_init; d_trace_level(&_fd_init, diameter); extern int _fd_logger; d_trace_level(&_fd_logger, diameter); } return CORE_OK; } status_t hss_db_init() { if (context_self()->db_client && context_self()->db_name) { self.subscriberCollection = mongoc_client_get_collection( context_self()->db_client, context_self()->db_name, "subscribers"); d_assert(self.subscriberCollection, return CORE_ERROR, "Couldn't find Subscriber Collection in '%s'", context_self()->db_name); } return CORE_OK; } status_t hss_db_final() { if (self.subscriberCollection) { mongoc_collection_destroy(self.subscriberCollection); } return CORE_OK; } status_t hss_db_auth_info( char *imsi_bcd, hss_db_auth_info_t *auth_info) { status_t rv = CORE_OK; mongoc_cursor_t *cursor = NULL; bson_t *query = NULL; bson_error_t error; const bson_t *document; bson_iter_t iter; bson_iter_t inner_iter; char buf[HSS_KEY_LEN]; char *utf8 = NULL; c_uint32_t length = 0; d_assert(imsi_bcd, return CORE_ERROR, "Null param"); d_assert(auth_info, return CORE_ERROR, "Null param"); mutex_lock(self.db_lock); query = BCON_NEW("imsi", BCON_UTF8(imsi_bcd)); #if MONGOC_MAJOR_VERSION >= 1 && MONGOC_MINOR_VERSION >= 5 cursor = mongoc_collection_find_with_opts( self.subscriberCollection, query, NULL, NULL); #else cursor = mongoc_collection_find(self.subscriberCollection, MONGOC_QUERY_NONE, 0, 0, 0, query, NULL, NULL); #endif if (!mongoc_cursor_next(cursor, &document)) { d_warn("Cannot find IMSI in DB : %s", imsi_bcd); rv = CORE_ERROR; goto out; } if (mongoc_cursor_error(cursor, &error)) { d_error("Cursor Failure: %s", error.message); rv = CORE_ERROR; goto out; } if (!bson_iter_init_find(&iter, document, "security")) { d_error("No 'security' field in this document"); rv = CORE_ERROR; goto out; } memset(auth_info, 0, sizeof(hss_db_auth_info_t)); bson_iter_recurse(&iter, &inner_iter); while(bson_iter_next(&inner_iter)) { const char *key = bson_iter_key(&inner_iter); if (!strcmp(key, "k") && BSON_ITER_HOLDS_UTF8(&inner_iter)) { utf8 = (char *)bson_iter_utf8(&inner_iter, &length); memcpy(auth_info->k, CORE_HEX(utf8, length, buf), HSS_KEY_LEN); } else if (!strcmp(key, "opc") && BSON_ITER_HOLDS_UTF8(&inner_iter)) { utf8 = (char *)bson_iter_utf8(&inner_iter, &length); auth_info->use_opc = 1; memcpy(auth_info->opc, CORE_HEX(utf8, length, buf), HSS_KEY_LEN); } else if (!strcmp(key, "op") && BSON_ITER_HOLDS_UTF8(&inner_iter)) { utf8 = (char *)bson_iter_utf8(&inner_iter, &length); memcpy(auth_info->op, CORE_HEX(utf8, length, buf), HSS_KEY_LEN); } else if (!strcmp(key, "amf") && BSON_ITER_HOLDS_UTF8(&inner_iter)) { utf8 = (char *)bson_iter_utf8(&inner_iter, &length); memcpy(auth_info->amf, CORE_HEX(utf8, length, buf), HSS_AMF_LEN); } else if (!strcmp(key, "rand") && BSON_ITER_HOLDS_UTF8(&inner_iter)) { utf8 = (char *)bson_iter_utf8(&inner_iter, &length); memcpy(auth_info->rand, CORE_HEX(utf8, length, buf), RAND_LEN); } else if (!strcmp(key, "sqn") && BSON_ITER_HOLDS_INT64(&inner_iter)) { auth_info->sqn = bson_iter_int64(&inner_iter); } } out: if (query) bson_destroy(query); if (cursor) mongoc_cursor_destroy(cursor); mutex_unlock(self.db_lock); return rv; } status_t hss_db_update_rand_and_sqn( char *imsi_bcd, c_uint8_t *rand, c_uint64_t sqn) { status_t rv = CORE_OK; bson_t *query = NULL; bson_t *update = NULL; bson_error_t error; char printable_rand[128]; d_assert(rand, return CORE_ERROR, "Null param"); core_hex_to_ascii(rand, RAND_LEN, printable_rand, sizeof(printable_rand)); mutex_lock(self.db_lock); query = BCON_NEW("imsi", BCON_UTF8(imsi_bcd)); update = BCON_NEW("$set", "{", "security.rand", printable_rand, "security.sqn", BCON_INT64(sqn), "}"); if (!mongoc_collection_update(self.subscriberCollection, MONGOC_UPDATE_NONE, query, update, NULL, &error)) { d_error("mongoc_collection_update() failure: %s", error.message); rv = CORE_ERROR; } if (query) bson_destroy(query); if (update) bson_destroy(update); mutex_unlock(self.db_lock); return rv; } status_t hss_db_increment_sqn(char *imsi_bcd) { status_t rv = CORE_OK; bson_t *query = NULL; bson_t *update = NULL; bson_error_t error; c_uint64_t max_sqn = HSS_MAX_SQN; mutex_lock(self.db_lock); query = BCON_NEW("imsi", BCON_UTF8(imsi_bcd)); update = BCON_NEW("$inc", "{", "security.sqn", BCON_INT64(32), "}"); if (!mongoc_collection_update(self.subscriberCollection, MONGOC_UPDATE_NONE, query, update, NULL, &error)) { d_error("mongoc_collection_update() failure: %s", error.message); rv = CORE_ERROR; goto out; } bson_destroy(update); update = BCON_NEW("$bit", "{", "security.sqn", "{", "and", BCON_INT64(max_sqn), "}", "}"); if (!mongoc_collection_update(self.subscriberCollection, MONGOC_UPDATE_NONE, query, update, NULL, &error)) { d_error("mongoc_collection_update() failure: %s", error.message); rv = CORE_ERROR; } out: if (query) bson_destroy(query); if (update) bson_destroy(update); mutex_unlock(self.db_lock); return rv; } status_t hss_db_subscription_data( char *imsi_bcd, s6a_subscription_data_t *subscription_data) { status_t rv = CORE_OK; mongoc_cursor_t *cursor = NULL; bson_t *query = NULL; bson_error_t error; const bson_t *document; bson_iter_t iter; bson_iter_t child1_iter, child2_iter, child3_iter, child4_iter; const char *utf8 = NULL; c_uint32_t length = 0; d_assert(imsi_bcd, return CORE_ERROR, "Null param"); d_assert(subscription_data, return CORE_ERROR, "Null param"); mutex_lock(self.db_lock); query = BCON_NEW("imsi", BCON_UTF8(imsi_bcd)); #if MONGOC_MAJOR_VERSION >= 1 && MONGOC_MINOR_VERSION >= 5 cursor = mongoc_collection_find_with_opts( self.subscriberCollection, query, NULL, NULL); #else cursor = mongoc_collection_find(self.subscriberCollection, MONGOC_QUERY_NONE, 0, 0, 0, query, NULL, NULL); #endif if (!mongoc_cursor_next(cursor, &document)) { d_error("Cannot find IMSI in DB : %s", imsi_bcd); rv = CORE_ERROR; goto out; } if (mongoc_cursor_error(cursor, &error)) { d_error("Cursor Failure: %s", error.message); rv = CORE_ERROR; goto out; } if (!bson_iter_init(&iter, document)) { d_error("bson_iter_init failed in this document"); rv = CORE_ERROR; goto out; } memset(subscription_data, 0, sizeof(s6a_subscription_data_t)); while(bson_iter_next(&iter)) { const char *key = bson_iter_key(&iter); if (!strcmp(key, "access_restriction_data") && BSON_ITER_HOLDS_INT32(&iter)) { subscription_data->access_restriction_data = bson_iter_int32(&iter); } else if (!strcmp(key, "subscriber_status") && BSON_ITER_HOLDS_INT32(&iter)) { subscription_data->subscriber_status = bson_iter_int32(&iter); } else if (!strcmp(key, "network_access_mode") && BSON_ITER_HOLDS_INT32(&iter)) { subscription_data->network_access_mode = bson_iter_int32(&iter); } else if (!strcmp(key, "subscribed_rau_tau_timer") && BSON_ITER_HOLDS_INT32(&iter)) { subscription_data->subscribed_rau_tau_timer = bson_iter_int32(&iter); } else if (!strcmp(key, "ambr") && BSON_ITER_HOLDS_DOCUMENT(&iter)) { bson_iter_recurse(&iter, &child1_iter); while(bson_iter_next(&child1_iter)) { const char *child1_key = bson_iter_key(&child1_iter); if (!strcmp(child1_key, "uplink") && BSON_ITER_HOLDS_INT64(&child1_iter)) { subscription_data->ambr.uplink = bson_iter_int64(&child1_iter) * 1024; } else if (!strcmp(child1_key, "downlink") && BSON_ITER_HOLDS_INT64(&child1_iter)) { subscription_data->ambr.downlink = bson_iter_int64(&child1_iter) * 1024; } } } else if (!strcmp(key, "pdn") && BSON_ITER_HOLDS_ARRAY(&iter)) { int pdn_index = 0; bson_iter_recurse(&iter, &child1_iter); while(bson_iter_next(&child1_iter)) { const char *child1_key = bson_iter_key(&child1_iter); pdn_t *pdn = NULL; d_assert(child1_key, goto out, "PDN is not ARRAY"); pdn_index = atoi(child1_key); d_assert(pdn_index < MAX_NUM_OF_SESS, goto out, "Overflow of PDN number(%d>%d)", pdn_index, MAX_NUM_OF_SESS); pdn = &subscription_data->pdn[pdn_index]; bson_iter_recurse(&child1_iter, &child2_iter); while(bson_iter_next(&child2_iter)) { const char *child2_key = bson_iter_key(&child2_iter); if (!strcmp(child2_key, "apn") && BSON_ITER_HOLDS_UTF8(&child2_iter)) { utf8 = bson_iter_utf8(&child2_iter, &length); core_cpystrn(pdn->apn, utf8, c_min(length, MAX_APN_LEN)+1); } else if (!strcmp(child2_key, "type") && BSON_ITER_HOLDS_INT32(&child2_iter)) { pdn->pdn_type = bson_iter_int32(&child2_iter); } else if (!strcmp(child2_key, "qos") && BSON_ITER_HOLDS_DOCUMENT(&child2_iter)) { bson_iter_recurse(&child2_iter, &child3_iter); while(bson_iter_next(&child3_iter)) { const char *child3_key = bson_iter_key(&child3_iter); if (!strcmp(child3_key, "qci") && BSON_ITER_HOLDS_INT32(&child3_iter)) { pdn->qos.qci = bson_iter_int32(&child3_iter); } else if (!strcmp(child3_key, "arp") && BSON_ITER_HOLDS_DOCUMENT(&child3_iter)) { bson_iter_recurse(&child3_iter, &child4_iter); while(bson_iter_next(&child4_iter)) { const char *child4_key = bson_iter_key(&child4_iter); if (!strcmp(child4_key, "priority_level") && BSON_ITER_HOLDS_INT32(&child4_iter)) { pdn->qos.arp.priority_level = bson_iter_int32(&child4_iter); } else if (!strcmp(child4_key, "pre_emption_capability") && BSON_ITER_HOLDS_INT32(&child4_iter)) { pdn->qos.arp.pre_emption_capability = bson_iter_int32(&child4_iter); } else if (!strcmp(child4_key, "pre_emption_vulnerability") && BSON_ITER_HOLDS_INT32(&child4_iter)) { pdn->qos.arp.pre_emption_vulnerability = bson_iter_int32(&child4_iter); } } } } } else if (!strcmp(child2_key, "ambr") && BSON_ITER_HOLDS_DOCUMENT(&child2_iter)) { bson_iter_recurse(&child2_iter, &child3_iter); while(bson_iter_next(&child3_iter)) { const char *child3_key = bson_iter_key(&child3_iter); if (!strcmp(child3_key, "uplink") && BSON_ITER_HOLDS_INT64(&child3_iter)) { pdn->ambr.uplink = bson_iter_int64(&child3_iter) * 1024; } else if (!strcmp(child3_key, "downlink") && BSON_ITER_HOLDS_INT64(&child3_iter)) { pdn->ambr.downlink = bson_iter_int64(&child3_iter) * 1024; } } } else if (!strcmp(child2_key, "pgw") && BSON_ITER_HOLDS_DOCUMENT(&child2_iter)) { bson_iter_recurse(&child2_iter, &child3_iter); while(bson_iter_next(&child3_iter)) { const char *child3_key = bson_iter_key(&child3_iter); if (!strcmp(child3_key, "addr") && BSON_ITER_HOLDS_UTF8(&child3_iter)) { ipsubnet_t ipsub; const char *v = bson_iter_utf8(&child3_iter, &length); rv = core_ipsubnet(&ipsub, v, NULL); if (rv == CORE_OK) { pdn->pgw_ip.ipv4 = 1; pdn->pgw_ip.both.addr = ipsub.sub[0]; } } else if (!strcmp(child3_key, "addr6") && BSON_ITER_HOLDS_UTF8(&child3_iter)) { ipsubnet_t ipsub; const char *v = bson_iter_utf8(&child3_iter, &length); rv = core_ipsubnet(&ipsub, v, NULL); if (rv == CORE_OK) { pdn->pgw_ip.ipv6 = 1; memcpy(pdn->pgw_ip.both.addr6, ipsub.sub, sizeof(ipsub.sub)); } } } } } pdn_index++; } subscription_data->num_of_pdn = pdn_index; } } out: if (query) bson_destroy(query); if (cursor) mongoc_cursor_destroy(cursor); mutex_unlock(self.db_lock); return rv; } nextepc-0.3.10/src/hss/hss_context.h000066400000000000000000000033011333553357400173470ustar00rootroot00000000000000#ifndef __HSS_CONTEXT_H__ #define __HSS_CONTEXT_H__ #include "core_errno.h" #include "core_mutex.h" #include "fd/s6a/s6a_message.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define HSS_KEY_LEN 16 #define HSS_AMF_LEN 2 #define HSS_MAX_SQN 0x7ffffffffff typedef struct _hss_db_auth_info_t { c_uint8_t k[HSS_KEY_LEN]; c_uint8_t use_opc; c_uint8_t opc[HSS_KEY_LEN]; c_uint8_t op[HSS_KEY_LEN]; c_uint8_t amf[HSS_AMF_LEN]; c_uint8_t rand[RAND_LEN]; c_uint64_t sqn; } hss_db_auth_info_t; typedef struct _fd_config_t fd_config_t; typedef struct _hss_context_t { const char *fd_conf_path; /* HSS freeDiameter conf path */ fd_config_t *fd_config; /* HSS freeDiameter config */ void *subscriberCollection; mutex_id db_lock; } hss_context_t; CORE_DECLARE(status_t) hss_context_init(void); CORE_DECLARE(status_t) hss_context_final(void); CORE_DECLARE(hss_context_t*) hss_self(void); CORE_DECLARE(status_t) hss_context_parse_config(void); CORE_DECLARE(status_t) hss_context_setup_trace_module(void); CORE_DECLARE(status_t) hss_db_init(void); CORE_DECLARE(status_t) hss_db_final(void); CORE_DECLARE(status_t) hss_db_auth_info( char *imsi_bcd, hss_db_auth_info_t *auth_info); CORE_DECLARE(status_t) hss_db_update_rand_and_sqn( char *imsi_bcd, c_uint8_t *rand, c_uint64_t sqn); CORE_DECLARE(status_t) hss_db_increment_sqn(char *imsi_bcd); CORE_DECLARE(status_t) hss_db_subscription_data( char *imsi_bcd, s6a_subscription_data_t *subscription_data); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __HSS_CONTEXT_H__ */ nextepc-0.3.10/src/hss/hss_fd_path.c000066400000000000000000000673241333553357400173020ustar00rootroot00000000000000#define TRACE_MODULE _hss_fd_path #include "core_debug.h" #include "core_lib.h" #include "core_sha2.h" #include "core_network.h" #include "fd/fd_lib.h" #include "fd/s6a/s6a_dict.h" #include "fd/s6a/s6a_message.h" #include "hss_context.h" #include "hss_auc.h" #include "milenage.h" /* handler for fallback cb */ static struct disp_hdl *hdl_s6a_fb = NULL; /* handler for Authentication-Information-Request cb */ static struct disp_hdl *hdl_s6a_air = NULL; /* handler for Update-Location-Request cb */ static struct disp_hdl *hdl_s6a_ulr = NULL; /* Default callback for the application. */ static int hss_s6a_fb_cb(struct msg **msg, struct avp *avp, struct session *session, void *opaque, enum disp_action *act) { /* This CB should never be called */ d_warn("Unexpected message received!"); return ENOTSUP; } /* Callback for incoming Authentication-Information-Request messages */ static int hss_s6a_air_cb( struct msg **msg, struct avp *avp, struct session *session, void *opaque, enum disp_action *act) { int ret; struct msg *ans, *qry; struct avp *avpch; struct avp *avp_e_utran_vector, *avp_xres, *avp_kasme, *avp_rand, *avp_autn; struct avp_hdr *hdr; union avp_value val; c_int8_t imsi_bcd[MAX_IMSI_BCD_LEN+1]; c_uint8_t opc[HSS_KEY_LEN]; c_uint8_t sqn[HSS_SQN_LEN]; c_uint8_t autn[AUTN_LEN]; c_uint8_t ik[HSS_KEY_LEN]; c_uint8_t ck[HSS_KEY_LEN]; c_uint8_t ak[HSS_AK_LEN]; c_uint8_t xres[MAX_RES_LEN]; c_uint8_t kasme[SHA256_DIGEST_SIZE]; size_t xres_len = 8; #define MAC_S_LEN 8 c_uint8_t mac_s[MAC_S_LEN]; hss_db_auth_info_t auth_info; c_uint8_t zero[RAND_LEN]; status_t rv; c_uint32_t result_code = 0; d_assert(msg, return EINVAL,); d_trace(3, "[HSS] Authentication-Information-Request\n"); /* Create answer header */ qry = *msg; ret = fd_msg_new_answer_from_req(fd_g_config->cnf_dict, msg, 0); d_assert(ret == 0, return EINVAL,); ans = *msg; ret = fd_msg_search_avp(qry, fd_user_name, &avp); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return EINVAL,); core_cpystrn(imsi_bcd, (char*)hdr->avp_value->os.data, c_min(hdr->avp_value->os.len, MAX_IMSI_BCD_LEN)+1); rv = hss_db_auth_info(imsi_bcd, &auth_info); if (rv != CORE_OK) { result_code = S6A_DIAMETER_ERROR_USER_UNKNOWN; goto out; } memset(zero, 0, sizeof(zero)); if (memcmp(auth_info.rand, zero, RAND_LEN) == 0) { core_generate_random_bytes(auth_info.rand, RAND_LEN); } if (auth_info.use_opc) memcpy(opc, auth_info.opc, sizeof(opc)); else milenage_opc(auth_info.k, auth_info.op, opc); ret = fd_msg_search_avp(qry, s6a_req_eutran_auth_info, &avp); d_assert(ret == 0, return EINVAL,); if (avp) { ret = fd_avp_search_avp(avp, s6a_re_synchronization_info, &avpch); d_assert(ret == 0, return EINVAL,); if (avpch) { ret = fd_msg_avp_hdr(avpch, &hdr); d_assert(ret == 0, return EINVAL,); hss_auc_sqn(opc, auth_info.k, hdr->avp_value->os.data, sqn, mac_s); if (memcmp(mac_s, hdr->avp_value->os.data + RAND_LEN + HSS_SQN_LEN, MAC_S_LEN) == 0) { core_generate_random_bytes(auth_info.rand, RAND_LEN); auth_info.sqn = core_buffer_to_uint64(sqn, HSS_SQN_LEN); /* 33.102 C.3.4 Guide : IND + 1 */ auth_info.sqn = (auth_info.sqn + 32 + 1) & HSS_MAX_SQN; } else { d_error("Re-synch MAC failed for IMSI:`%s`", imsi_bcd); d_print("MAC_S: "); d_print_hex(mac_s, MAC_S_LEN); d_print_hex(hdr->avp_value->os.data + RAND_LEN + HSS_SQN_LEN, MAC_S_LEN); d_print("SQN: "); d_print_hex(sqn, HSS_SQN_LEN); result_code = S6A_DIAMETER_AUTHENTICATION_DATA_UNAVAILABLE; goto out; } } } rv = hss_db_update_rand_and_sqn(imsi_bcd, auth_info.rand, auth_info.sqn); if (rv != CORE_OK) { d_error("Cannot update rand and sqn for IMSI:'%s'", imsi_bcd); result_code = S6A_DIAMETER_AUTHENTICATION_DATA_UNAVAILABLE; goto out; } rv = hss_db_increment_sqn(imsi_bcd); if (rv != CORE_OK) { d_error("Cannot increment sqn for IMSI:'%s'", imsi_bcd); result_code = S6A_DIAMETER_AUTHENTICATION_DATA_UNAVAILABLE; goto out; } ret = fd_msg_search_avp(qry, s6a_visited_plmn_id, &avp); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return EINVAL,); #if 0 // TODO : check visited_plmn_id memcpy(visited_plmn_id, hdr->avp_value->os.data, hdr->avp_value->os.len); #endif milenage_generate(opc, auth_info.amf, auth_info.k, core_uint64_to_buffer(auth_info.sqn, HSS_SQN_LEN, sqn), auth_info.rand, autn, ik, ck, ak, xres, &xres_len); hss_auc_kasme(ck, ik, hdr->avp_value->os.data, sqn, ak, kasme); /* Set the Authentication-Info */ ret = fd_msg_avp_new(s6a_authentication_info, 0, &avp); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_new(s6a_e_utran_vector, 0, &avp_e_utran_vector); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_new(s6a_rand, 0, &avp_rand); d_assert(ret == 0, return EINVAL,); val.os.data = auth_info.rand; val.os.len = HSS_KEY_LEN; ret = fd_msg_avp_setvalue(avp_rand, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add(avp_e_utran_vector, MSG_BRW_LAST_CHILD, avp_rand); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_new(s6a_xres, 0, &avp_xres); d_assert(ret == 0, return EINVAL,); val.os.data = xres; val.os.len = xres_len; ret = fd_msg_avp_setvalue(avp_xres, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add(avp_e_utran_vector, MSG_BRW_LAST_CHILD, avp_xres); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_new(s6a_autn, 0, &avp_autn); d_assert(ret == 0, return EINVAL,); val.os.data = autn; val.os.len = AUTN_LEN; ret = fd_msg_avp_setvalue(avp_autn, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add(avp_e_utran_vector, MSG_BRW_LAST_CHILD, avp_autn); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_new(s6a_kasme, 0, &avp_kasme); d_assert(ret == 0, return EINVAL,); val.os.data = kasme; val.os.len = SHA256_DIGEST_SIZE; ret = fd_msg_avp_setvalue(avp_kasme, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add(avp_e_utran_vector, MSG_BRW_LAST_CHILD, avp_kasme); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, avp_e_utran_vector); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return EINVAL,); /* Set the Origin-Host, Origin-Realm, andResult-Code AVPs */ ret = fd_msg_rescode_set(ans, "DIAMETER_SUCCESS", NULL, NULL, 1); d_assert(ret == 0, return EINVAL,); /* Set the Auth-Session-State AVP */ ret = fd_msg_avp_new(fd_auth_session_state, 0, &avp); d_assert(ret == 0, return EINVAL,); val.i32 = 1; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return EINVAL,); /* Set Vendor-Specific-Application-Id AVP */ ret = fd_message_vendor_specific_appid_set(ans, S6A_APPLICATION_ID); d_assert(ret == 0, return EINVAL,); /* Send the answer */ ret = fd_msg_send(msg, NULL, NULL); d_assert(ret == 0,,); d_trace(3, "[HSS] Authentication-Information-Answer\n"); /* Add this value to the stats */ d_assert(pthread_mutex_lock(&fd_logger_self()->stats_lock) == 0,,); fd_logger_self()->stats.nb_echoed++; d_assert(pthread_mutex_unlock(&fd_logger_self()->stats_lock) == 0,,); return 0; out: ret = fd_message_experimental_rescode_set(ans, result_code); d_assert(ret == 0, return EINVAL,); /* Set the Auth-Session-State AVP */ ret = fd_msg_avp_new(fd_auth_session_state, 0, &avp); d_assert(ret == 0, return EINVAL,); val.i32 = 1; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return EINVAL,); /* Set Vendor-Specific-Application-Id AVP */ ret = fd_message_vendor_specific_appid_set(ans, S6A_APPLICATION_ID); d_assert(ret == 0, return EINVAL,); ret = fd_msg_send(msg, NULL, NULL); d_assert(ret == 0,,); return 0; } /* Callback for incoming Update-Location-Request messages */ static int hss_s6a_ulr_cb( struct msg **msg, struct avp *avp, struct session *session, void *opaque, enum disp_action *act) { int ret; struct msg *ans, *qry; struct avp_hdr *hdr; union avp_value val; c_int8_t imsi_bcd[MAX_IMSI_BCD_LEN+1]; status_t rv; c_uint32_t result_code = 0; s6a_subscription_data_t subscription_data; struct sockaddr_in sin; struct sockaddr_in6 sin6; d_assert(msg, return EINVAL,); d_trace(3, "[HSS] Update-Location-Request\n"); /* Create answer header */ qry = *msg; ret = fd_msg_new_answer_from_req(fd_g_config->cnf_dict, msg, 0); d_assert(ret == 0, return EINVAL,) ans = *msg; ret = fd_msg_search_avp(qry, fd_user_name, &avp); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return EINVAL,) core_cpystrn(imsi_bcd, (char*)hdr->avp_value->os.data, c_min(hdr->avp_value->os.len, MAX_IMSI_BCD_LEN)+1); rv = hss_db_subscription_data(imsi_bcd, &subscription_data); if (rv != CORE_OK) { d_error("Cannot get Subscription-Data for IMSI:'%s'", imsi_bcd); result_code = S6A_DIAMETER_ERROR_USER_UNKNOWN; goto out; } ret = fd_msg_search_avp(qry, s6a_visited_plmn_id, &avp); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return EINVAL,) #if 0 // TODO : check visited_plmn_id memcpy(visited_plmn_id, hdr->avp_value->os.data, hdr->avp_value->os.len); #endif /* Set the Origin-Host, Origin-Realm, andResult-Code AVPs */ ret = fd_msg_rescode_set(ans, "DIAMETER_SUCCESS", NULL, NULL, 1); d_assert(ret == 0, return EINVAL,) /* Set the Auth-Session-State AVP */ ret = fd_msg_avp_new(fd_auth_session_state, 0, &avp); d_assert(ret == 0, return EINVAL,) val.i32 = 1; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return EINVAL,) /* Set the ULA Flags */ ret = fd_msg_avp_new(s6a_ula_flags, 0, &avp); d_assert(ret == 0, return EINVAL,) val.i32 = S6A_ULA_FLAGS_MME_REGISTERED_FOR_SMS; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return EINVAL,) ret = fd_msg_search_avp(qry, s6a_ulr_flags, &avp); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return EINVAL,) if (!(hdr->avp_value->u32 & S6A_ULR_SKIP_SUBSCRIBER_DATA)) { struct avp *avp_access_restriction_data; struct avp *avp_subscriber_status, *avp_network_access_mode; struct avp *avp_ambr, *avp_max_bandwidth_ul, *avp_max_bandwidth_dl; int i; /* Set the Subscription Data */ ret = fd_msg_avp_new(s6a_subscription_data, 0, &avp); d_assert(ret == 0, return EINVAL,) if (subscription_data.access_restriction_data) { ret = fd_msg_avp_new(s6a_access_restriction_data, 0, &avp_access_restriction_data); d_assert(ret == 0, return EINVAL,) val.i32 = subscription_data.access_restriction_data; ret = fd_msg_avp_setvalue( avp_access_restriction_data, &val); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, avp_access_restriction_data); d_assert(ret == 0, return EINVAL,) } ret = fd_msg_avp_new(s6a_subscriber_status, 0, &avp_subscriber_status); d_assert(ret == 0, return EINVAL,) val.i32 = subscription_data.subscriber_status; ret = fd_msg_avp_setvalue(avp_subscriber_status, &val); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, avp_subscriber_status); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_new(s6a_network_access_mode, 0, &avp_network_access_mode); d_assert(ret == 0, return EINVAL,) val.i32 = subscription_data.network_access_mode; ret = fd_msg_avp_setvalue(avp_network_access_mode, &val); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, avp_network_access_mode); d_assert(ret == 0, return EINVAL,) /* Set the AMBR */ ret = fd_msg_avp_new(s6a_ambr, 0, &avp_ambr); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_new(s6a_max_bandwidth_ul, 0, &avp_max_bandwidth_ul); d_assert(ret == 0, return EINVAL,) val.u32 = subscription_data.ambr.uplink; ret = fd_msg_avp_setvalue(avp_max_bandwidth_ul, &val); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(avp_ambr, MSG_BRW_LAST_CHILD, avp_max_bandwidth_ul); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_new(s6a_max_bandwidth_dl, 0, &avp_max_bandwidth_dl); d_assert(ret == 0, return EINVAL,) val.u32 = subscription_data.ambr.downlink; ret = fd_msg_avp_setvalue(avp_max_bandwidth_dl, &val); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(avp_ambr, MSG_BRW_LAST_CHILD, avp_max_bandwidth_dl); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, avp_ambr); d_assert(ret == 0, return EINVAL,) if (subscription_data.num_of_pdn) { /* Set the APN Configuration Profile */ struct avp *apn_configuration_profile; struct avp *context_identifier; struct avp *all_apn_configuration_included_indicator; ret = fd_msg_avp_new(s6a_apn_configuration_profile, 0, &apn_configuration_profile); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_new(s6a_context_identifier, 0, &context_identifier); d_assert(ret == 0, return EINVAL,) val.i32 = 1; /* Context Identifier : 1 */ ret = fd_msg_avp_setvalue(context_identifier, &val); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(apn_configuration_profile, MSG_BRW_LAST_CHILD, context_identifier); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_new( s6a_all_apn_configuration_included_indicator, 0, &all_apn_configuration_included_indicator); d_assert(ret == 0, return EINVAL,) val.i32 = 0; ret = fd_msg_avp_setvalue( all_apn_configuration_included_indicator, &val); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(apn_configuration_profile, MSG_BRW_LAST_CHILD, all_apn_configuration_included_indicator); d_assert(ret == 0, return EINVAL,) for (i = 0; i < subscription_data.num_of_pdn; i++) { /* Set the APN Configuration */ struct avp *apn_configuration, *context_identifier; struct avp *pdn_type, *service_selection; struct avp *eps_subscribed_qos_profile, *qos_class_identifier; struct avp *allocation_retention_priority, *priority_level; struct avp *pre_emption_capability, *pre_emption_vulnerability; struct avp *mip6_agent_info, *mip_home_agent_address; pdn_t *pdn = &subscription_data.pdn[i]; d_assert(pdn, goto out,); pdn->context_identifier = i+1; ret = fd_msg_avp_new(s6a_apn_configuration, 0, &apn_configuration); d_assert(ret == 0, return EINVAL,) /* Set Context-Identifier */ ret = fd_msg_avp_new(s6a_context_identifier, 0, &context_identifier); d_assert(ret == 0, return EINVAL,) val.i32 = pdn->context_identifier; ret = fd_msg_avp_setvalue(context_identifier, &val); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(apn_configuration, MSG_BRW_LAST_CHILD, context_identifier); d_assert(ret == 0, return EINVAL,) /* Set PDN-Type */ ret = fd_msg_avp_new(s6a_pdn_type, 0, &pdn_type); d_assert(ret == 0, return EINVAL,) val.i32 = pdn->pdn_type; ret = fd_msg_avp_setvalue(pdn_type, &val); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(apn_configuration, MSG_BRW_LAST_CHILD, pdn_type); d_assert(ret == 0, return EINVAL,) /* Set Service-Selection */ ret = fd_msg_avp_new(s6a_service_selection, 0, &service_selection); d_assert(ret == 0, return EINVAL,) val.os.data = (c_uint8_t *)pdn->apn; val.os.len = strlen(pdn->apn); ret = fd_msg_avp_setvalue(service_selection, &val); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(apn_configuration, MSG_BRW_LAST_CHILD, service_selection); d_assert(ret == 0, return EINVAL,) /* Set the EPS Subscribed QoS Profile */ ret = fd_msg_avp_new(s6a_eps_subscribed_qos_profile, 0, &eps_subscribed_qos_profile); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_new(s6a_qos_class_identifier, 0, &qos_class_identifier); d_assert(ret == 0, return EINVAL,) val.i32 = pdn->qos.qci; ret = fd_msg_avp_setvalue(qos_class_identifier, &val); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(eps_subscribed_qos_profile, MSG_BRW_LAST_CHILD, qos_class_identifier); d_assert(ret == 0, return EINVAL,) /* Set Allocation retention priority */ ret = fd_msg_avp_new(s6a_allocation_retention_priority, 0, &allocation_retention_priority); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_new(s6a_priority_level, 0, &priority_level); d_assert(ret == 0, return EINVAL,) val.u32 = pdn->qos.arp.priority_level; ret = fd_msg_avp_setvalue(priority_level, &val); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(allocation_retention_priority, MSG_BRW_LAST_CHILD, priority_level); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_new(s6a_pre_emption_capability, 0, &pre_emption_capability); d_assert(ret == 0, return EINVAL,) val.u32 = pdn->qos.arp.pre_emption_capability; ret = fd_msg_avp_setvalue(pre_emption_capability, &val); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(allocation_retention_priority, MSG_BRW_LAST_CHILD, pre_emption_capability); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_new(s6a_pre_emption_vulnerability, 0, &pre_emption_vulnerability); d_assert(ret == 0, return EINVAL,) val.u32 = pdn->qos.arp.pre_emption_vulnerability; ret = fd_msg_avp_setvalue(pre_emption_vulnerability, &val); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(allocation_retention_priority, MSG_BRW_LAST_CHILD, pre_emption_vulnerability); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(eps_subscribed_qos_profile, MSG_BRW_LAST_CHILD, allocation_retention_priority); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(apn_configuration, MSG_BRW_LAST_CHILD, eps_subscribed_qos_profile); d_assert(ret == 0, return EINVAL,) /* Set MIP6-Agent-Info */ if (pdn->pgw_ip.ipv4 || pdn->pgw_ip.ipv6) { ret = fd_msg_avp_new(fd_mip6_agent_info, 0, &mip6_agent_info); d_assert(ret == 0, return EINVAL,) if (pdn->pgw_ip.ipv4) { ret = fd_msg_avp_new(fd_mip_home_agent_address, 0, &mip_home_agent_address); d_assert(ret == 0, return EINVAL,) sin.sin_family = AF_INET; sin.sin_addr.s_addr = pdn->pgw_ip.both.addr; ret = fd_msg_avp_value_encode ( &sin, mip_home_agent_address ); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(mip6_agent_info, MSG_BRW_LAST_CHILD, mip_home_agent_address); d_assert(ret == 0, return EINVAL,) } if (pdn->pgw_ip.ipv6) { ret = fd_msg_avp_new(fd_mip_home_agent_address, 0, &mip_home_agent_address); d_assert(ret == 0, return EINVAL,) sin6.sin6_family = AF_INET6; memcpy(sin6.sin6_addr.s6_addr, pdn->pgw_ip.both.addr6, sizeof pdn->pgw_ip.both.addr6); ret = fd_msg_avp_value_encode ( &sin6, mip_home_agent_address ); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(mip6_agent_info, MSG_BRW_LAST_CHILD, mip_home_agent_address); d_assert(ret == 0, return EINVAL,) } ret = fd_msg_avp_add(apn_configuration, MSG_BRW_LAST_CHILD, mip6_agent_info); d_assert(ret == 0, return EINVAL,) } /* Set AMBR */ if (pdn->ambr.downlink || pdn->ambr.uplink) { ret = fd_msg_avp_new(s6a_ambr, 0, &avp_ambr); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_new(s6a_max_bandwidth_ul, 0, &avp_max_bandwidth_ul); d_assert(ret == 0, return EINVAL,) val.u32 = pdn->ambr.uplink; ret = fd_msg_avp_setvalue(avp_max_bandwidth_ul, &val); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(avp_ambr, MSG_BRW_LAST_CHILD, avp_max_bandwidth_ul); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_new(s6a_max_bandwidth_dl, 0, &avp_max_bandwidth_dl); d_assert(ret == 0, return EINVAL,) val.u32 = pdn->ambr.downlink; ret = fd_msg_avp_setvalue(avp_max_bandwidth_dl, &val); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(avp_ambr, MSG_BRW_LAST_CHILD, avp_max_bandwidth_dl); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(apn_configuration, MSG_BRW_LAST_CHILD, avp_ambr); d_assert(ret == 0, return EINVAL,) } ret = fd_msg_avp_add(apn_configuration_profile, MSG_BRW_LAST_CHILD, apn_configuration); d_assert(ret == 0, return EINVAL,) } ret = fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, apn_configuration_profile); d_assert(ret == 0, return EINVAL,) } ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return EINVAL,) } ret = fd_msg_avp_new(s6a_subscribed_rau_tau_timer, 0, &avp); d_assert(ret == 0, return EINVAL,) val.i32 = subscription_data.subscribed_rau_tau_timer * 60; /* seconds */ ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return EINVAL,) /* Set Vendor-Specific-Application-Id AVP */ ret = fd_message_vendor_specific_appid_set(ans, S6A_APPLICATION_ID); d_assert(ret == 0, return EINVAL,) /* Send the answer */ ret = fd_msg_send(msg, NULL, NULL); d_assert(ret == 0,,); d_trace(3, "[HSS] Update-Location-Answer\n"); /* Add this value to the stats */ d_assert( pthread_mutex_lock(&fd_logger_self()->stats_lock) == 0,,); fd_logger_self()->stats.nb_echoed++; d_assert( pthread_mutex_unlock(&fd_logger_self()->stats_lock) == 0,,); return 0; out: ret = fd_message_experimental_rescode_set(ans, result_code); d_assert(ret == 0, return EINVAL,) /* Set the Auth-Session-State AVP */ ret = fd_msg_avp_new(fd_auth_session_state, 0, &avp); d_assert(ret == 0, return EINVAL,) val.i32 = 1; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return EINVAL,) ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return EINVAL,) /* Set Vendor-Specific-Application-Id AVP */ ret = fd_message_vendor_specific_appid_set(ans, S6A_APPLICATION_ID); d_assert(ret == 0, return EINVAL,) ret = fd_msg_send(msg, NULL, NULL); d_assert(ret == 0,,); return 0; } status_t hss_fd_init(void) { int ret; struct disp_when data; ret = fd_init(FD_MODE_SERVER, hss_self()->fd_conf_path, hss_self()->fd_config); d_assert(ret == 0, return CORE_ERROR,); /* Install objects definitions for this application */ ret = s6a_dict_init(); d_assert(ret == 0, return CORE_ERROR,); memset(&data, 0, sizeof(data)); data.app = s6a_application; /* Fallback CB if command != unexpected message received */ ret = fd_disp_register(hss_s6a_fb_cb, DISP_HOW_APPID, &data, NULL, &hdl_s6a_fb); d_assert(ret == 0, return CORE_ERROR,); /* Specific handler for Authentication-Information-Request */ data.command = s6a_cmd_air; ret = fd_disp_register(hss_s6a_air_cb, DISP_HOW_CC, &data, NULL, &hdl_s6a_air); d_assert(ret == 0, return CORE_ERROR,); /* Specific handler for Location-Update-Request */ data.command = s6a_cmd_ulr; ret = fd_disp_register(hss_s6a_ulr_cb, DISP_HOW_CC, &data, NULL, &hdl_s6a_ulr); d_assert(ret == 0, return CORE_ERROR,); /* Advertise the support for the application in the peer */ ret = fd_disp_app_support(s6a_application, fd_vendor, 1, 0); d_assert(ret == 0, return CORE_ERROR,); return CORE_OK; } void hss_fd_final(void) { if (hdl_s6a_fb) (void) fd_disp_unregister(&hdl_s6a_fb, NULL); if (hdl_s6a_air) (void) fd_disp_unregister(&hdl_s6a_air, NULL); if (hdl_s6a_ulr) (void) fd_disp_unregister(&hdl_s6a_ulr, NULL); fd_final(); } nextepc-0.3.10/src/hss/hss_fd_path.h000066400000000000000000000004511333553357400172730ustar00rootroot00000000000000#ifndef __HSS_FD_PATH_H__ #define __HSS_FD_PATH_H__ #include "core_errno.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(status_t) hss_fd_init(void); CORE_DECLARE(void) hss_fd_final(void); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __HSS_FD_PATH_H__ */ nextepc-0.3.10/src/hss/hss_init.c000066400000000000000000000012511333553357400166230ustar00rootroot00000000000000#define TRACE_MODULE _hss_init #include "hss_context.h" #include "hss_fd_path.h" static int initialized = 0; status_t hss_initialize(void) { status_t rv; rv = hss_context_init(); if (rv != CORE_OK) return rv; rv = hss_context_parse_config(); if (rv != CORE_OK) return rv; rv = hss_context_setup_trace_module(); if (rv != CORE_OK) return rv; rv = hss_db_init(); if (rv != CORE_OK) return rv; rv = hss_fd_init(); if (rv != CORE_OK) return CORE_ERROR; initialized = 1; return CORE_OK; } void hss_terminate(void) { if (!initialized) return; hss_fd_final(); hss_db_final(); hss_context_final(); return; } nextepc-0.3.10/src/hss/milenage.c000066400000000000000000000250511333553357400165700ustar00rootroot00000000000000/* * 3GPP AKA - Milenage algorithm (3GPP TS 35.205, .206, .207, .208) * Copyright (c) 2006-2007 * * This software may be distributed under the terms of the BSD license. * See README for more details. * * This file implements an example authentication algorithm defined for 3GPP * AKA. This can be used to implement a simple HLR/AuC into hlr_auc_gw to allow * EAP-AKA to be tested properly with real USIM cards. * * This implementations assumes that the r1..r5 and c1..c5 constants defined in * TS 35.206 are used, i.e., r1=64, r2=0, r3=32, r4=64, r5=96, c1=00..00, * c2=00..01, c3=00..02, c4=00..04, c5=00..08. The block cipher is assumed to * be AES (Rijndael). */ #define TRACE_MODULE _milenage #include "core_debug.h" #include "core_aes.h" #include "core_sha2.h" #include "milenage.h" #define os_memcpy memcpy #define os_memcmp memcmp #define os_memcmp_const memcmp int aes_128_encrypt_block(const c_uint8_t *key, const c_uint8_t *in, c_uint8_t *out) { const int key_bits = 128; unsigned int rk[RKLENGTH(128)]; int nrounds; nrounds = aes_setup_enc(rk, key, key_bits); aes_encrypt(rk, nrounds, in, out); return 0; } /** * milenage_f1 - Milenage f1 and f1* algorithms * @opc: OPc = 128-bit value derived from OP and K * @k: K = 128-bit subscriber key * @_rand: RAND = 128-bit random challenge * @sqn: SQN = 48-bit sequence number * @amf: AMF = 16-bit authentication management field * @mac_a: Buffer for MAC-A = 64-bit network authentication code, or %NULL * @mac_s: Buffer for MAC-S = 64-bit resync authentication code, or %NULL * Returns: 0 on success, -1 on failure */ int milenage_f1(const c_uint8_t *opc, const c_uint8_t *k, const c_uint8_t *_rand, const c_uint8_t *sqn, const c_uint8_t *amf, c_uint8_t *mac_a, c_uint8_t *mac_s) { c_uint8_t tmp1[16], tmp2[16], tmp3[16]; int i; /* tmp1 = TEMP = E_K(RAND XOR OP_C) */ for (i = 0; i < 16; i++) tmp1[i] = _rand[i] ^ opc[i]; if (aes_128_encrypt_block(k, tmp1, tmp1)) return -1; /* tmp2 = IN1 = SQN || AMF || SQN || AMF */ os_memcpy(tmp2, sqn, 6); os_memcpy(tmp2 + 6, amf, 2); os_memcpy(tmp2 + 8, tmp2, 8); /* OUT1 = E_K(TEMP XOR rot(IN1 XOR OP_C, r1) XOR c1) XOR OP_C */ /* rotate (tmp2 XOR OP_C) by r1 (= 0x40 = 8 bytes) */ for (i = 0; i < 16; i++) tmp3[(i + 8) % 16] = tmp2[i] ^ opc[i]; /* XOR with TEMP = E_K(RAND XOR OP_C) */ for (i = 0; i < 16; i++) tmp3[i] ^= tmp1[i]; /* XOR with c1 (= ..00, i.e., NOP) */ /* f1 || f1* = E_K(tmp3) XOR OP_c */ if (aes_128_encrypt_block(k, tmp3, tmp1)) return -1; for (i = 0; i < 16; i++) tmp1[i] ^= opc[i]; if (mac_a) os_memcpy(mac_a, tmp1, 8); /* f1 */ if (mac_s) os_memcpy(mac_s, tmp1 + 8, 8); /* f1* */ return 0; } /** * milenage_f2345 - Milenage f2, f3, f4, f5, f5* algorithms * @opc: OPc = 128-bit value derived from OP and K * @k: K = 128-bit subscriber key * @_rand: RAND = 128-bit random challenge * @res: Buffer for RES = 64-bit signed response (f2), or %NULL * @ck: Buffer for CK = 128-bit confidentiality key (f3), or %NULL * @ik: Buffer for IK = 128-bit integrity key (f4), or %NULL * @ak: Buffer for AK = 48-bit anonymity key (f5), or %NULL * @akstar: Buffer for AK = 48-bit anonymity key (f5*), or %NULL * Returns: 0 on success, -1 on failure */ int milenage_f2345(const c_uint8_t *opc, const c_uint8_t *k, const c_uint8_t *_rand, c_uint8_t *res, c_uint8_t *ck, c_uint8_t *ik, c_uint8_t *ak, c_uint8_t *akstar) { c_uint8_t tmp1[16], tmp2[16], tmp3[16]; int i; /* tmp2 = TEMP = E_K(RAND XOR OP_C) */ for (i = 0; i < 16; i++) tmp1[i] = _rand[i] ^ opc[i]; if (aes_128_encrypt_block(k, tmp1, tmp2)) return -1; /* OUT2 = E_K(rot(TEMP XOR OP_C, r2) XOR c2) XOR OP_C */ /* OUT3 = E_K(rot(TEMP XOR OP_C, r3) XOR c3) XOR OP_C */ /* OUT4 = E_K(rot(TEMP XOR OP_C, r4) XOR c4) XOR OP_C */ /* OUT5 = E_K(rot(TEMP XOR OP_C, r5) XOR c5) XOR OP_C */ /* f2 and f5 */ /* rotate by r2 (= 0, i.e., NOP) */ for (i = 0; i < 16; i++) tmp1[i] = tmp2[i] ^ opc[i]; tmp1[15] ^= 1; /* XOR c2 (= ..01) */ /* f5 || f2 = E_K(tmp1) XOR OP_c */ if (aes_128_encrypt_block(k, tmp1, tmp3)) return -1; for (i = 0; i < 16; i++) tmp3[i] ^= opc[i]; if (res) os_memcpy(res, tmp3 + 8, 8); /* f2 */ if (ak) os_memcpy(ak, tmp3, 6); /* f5 */ /* f3 */ if (ck) { /* rotate by r3 = 0x20 = 4 bytes */ for (i = 0; i < 16; i++) tmp1[(i + 12) % 16] = tmp2[i] ^ opc[i]; tmp1[15] ^= 2; /* XOR c3 (= ..02) */ if (aes_128_encrypt_block(k, tmp1, ck)) return -1; for (i = 0; i < 16; i++) ck[i] ^= opc[i]; } /* f4 */ if (ik) { /* rotate by r4 = 0x40 = 8 bytes */ for (i = 0; i < 16; i++) tmp1[(i + 8) % 16] = tmp2[i] ^ opc[i]; tmp1[15] ^= 4; /* XOR c4 (= ..04) */ if (aes_128_encrypt_block(k, tmp1, ik)) return -1; for (i = 0; i < 16; i++) ik[i] ^= opc[i]; } /* f5* */ if (akstar) { /* rotate by r5 = 0x60 = 12 bytes */ for (i = 0; i < 16; i++) tmp1[(i + 4) % 16] = tmp2[i] ^ opc[i]; tmp1[15] ^= 8; /* XOR c5 (= ..08) */ if (aes_128_encrypt_block(k, tmp1, tmp1)) return -1; for (i = 0; i < 6; i++) akstar[i] = tmp1[i] ^ opc[i]; } return 0; } /** * milenage_generate - Generate AKA AUTN,IK,CK,RES * @opc: OPc = 128-bit operator variant algorithm configuration field (encr.) * @amf: AMF = 16-bit authentication management field * @k: K = 128-bit subscriber key * @sqn: SQN = 48-bit sequence number * @_rand: RAND = 128-bit random challenge * @autn: Buffer for AUTN = 128-bit authentication token * @ik: Buffer for IK = 128-bit integrity key (f4), or %NULL * @ck: Buffer for CK = 128-bit confidentiality key (f3), or %NULL * @res: Buffer for RES = 64-bit signed response (f2), or %NULL * @res_len: Max length for res; set to used length or 0 on failure */ void milenage_generate(const c_uint8_t *opc, const c_uint8_t *amf, const c_uint8_t *k, const c_uint8_t *sqn, const c_uint8_t *_rand, c_uint8_t *autn, c_uint8_t *ik, c_uint8_t *ck, c_uint8_t *ak, c_uint8_t *res, size_t *res_len) { int i; c_uint8_t mac_a[8]; if (*res_len < 8) { *res_len = 0; return; } if (milenage_f1(opc, k, _rand, sqn, amf, mac_a, NULL) || milenage_f2345(opc, k, _rand, res, ck, ik, ak, NULL)) { *res_len = 0; return; } *res_len = 8; /* AUTN = (SQN ^ AK) || AMF || MAC */ for (i = 0; i < 6; i++) autn[i] = sqn[i] ^ ak[i]; os_memcpy(autn + 6, amf, 2); os_memcpy(autn + 8, mac_a, 8); } /** * milenage_auts - Milenage AUTS validation * @opc: OPc = 128-bit operator variant algorithm configuration field (encr.) * @k: K = 128-bit subscriber key * @_rand: RAND = 128-bit random challenge * @auts: AUTS = 112-bit authentication token from client * @sqn: Buffer for SQN = 48-bit sequence number * Returns: 0 = success (sqn filled), -1 on failure */ int milenage_auts(const c_uint8_t *opc, const c_uint8_t *k, const c_uint8_t *_rand, const c_uint8_t *auts, c_uint8_t *sqn) { c_uint8_t amf[2] = { 0x00, 0x00 }; /* TS 33.102 v7.0.0, 6.3.3 */ c_uint8_t ak[6], mac_s[8]; int i; if (milenage_f2345(opc, k, _rand, NULL, NULL, NULL, NULL, ak)) return -1; for (i = 0; i < 6; i++) sqn[i] = auts[i] ^ ak[i]; if (milenage_f1(opc, k, _rand, sqn, amf, NULL, mac_s) || os_memcmp_const(mac_s, auts + 6, 8) != 0) return -1; return 0; } /** * gsm_milenage - Generate GSM-Milenage (3GPP TS 55.205) authentication triplet * @opc: OPc = 128-bit operator variant algorithm configuration field (encr.) * @k: K = 128-bit subscriber key * @_rand: RAND = 128-bit random challenge * @sres: Buffer for SRES = 32-bit SRES * @kc: Buffer for Kc = 64-bit Kc * Returns: 0 on success, -1 on failure */ int gsm_milenage(const c_uint8_t *opc, const c_uint8_t *k, const c_uint8_t *_rand, c_uint8_t *sres, c_uint8_t *kc) { c_uint8_t res[8], ck[16], ik[16]; int i; if (milenage_f2345(opc, k, _rand, res, ck, ik, NULL, NULL)) return -1; for (i = 0; i < 8; i++) kc[i] = ck[i] ^ ck[i + 8] ^ ik[i] ^ ik[i + 8]; #ifdef GSM_MILENAGE_ALT_SRES os_memcpy(sres, res, 4); #else /* GSM_MILENAGE_ALT_SRES */ for (i = 0; i < 4; i++) sres[i] = res[i] ^ res[i + 4]; #endif /* GSM_MILENAGE_ALT_SRES */ return 0; } /** * milenage_generate - Generate AKA AUTN,IK,CK,RES * @opc: OPc = 128-bit operator variant algorithm configuration field (encr.) * @k: K = 128-bit subscriber key * @sqn: SQN = 48-bit sequence number * @_rand: RAND = 128-bit random challenge * @autn: AUTN = 128-bit authentication token * @ik: Buffer for IK = 128-bit integrity key (f4), or %NULL * @ck: Buffer for CK = 128-bit confidentiality key (f3), or %NULL * @res: Buffer for RES = 64-bit signed response (f2), or %NULL * @res_len: Variable that will be set to RES length * @auts: 112-bit buffer for AUTS * Returns: 0 on success, -1 on failure, or -2 on synchronization failure */ int milenage_check(const c_uint8_t *opc, const c_uint8_t *k, const c_uint8_t *sqn, const c_uint8_t *_rand, const c_uint8_t *autn, c_uint8_t *ik, c_uint8_t *ck, c_uint8_t *res, size_t *res_len, c_uint8_t *auts) { int i; c_uint8_t mac_a[8], ak[6], rx_sqn[6]; const c_uint8_t *amf; d_trace(1, "Milenage: AUTN\n"); d_trace_hex(1, autn, 16); d_trace(1, "Milenage: RAND\n"); d_trace_hex(1, _rand, 16); if (milenage_f2345(opc, k, _rand, res, ck, ik, ak, NULL)) return -1; *res_len = 8; d_trace(1, "Milenage: RES\n"); d_trace_hex(1, res, *res_len); d_trace(1, "Milenage: CK\n"); d_trace_hex(1, ck, 16); d_trace(1, "Milenage: IK\n"); d_trace_hex(1, ik, 16); d_trace(1, "Milenage: AK\n"); d_trace_hex(1, ak, 6); /* AUTN = (SQN ^ AK) || AMF || MAC */ for (i = 0; i < 6; i++) rx_sqn[i] = autn[i] ^ ak[i]; d_trace(1, "Milenage: SQN\n"); d_trace_hex(1, rx_sqn, 6); if (os_memcmp(rx_sqn, sqn, 6) <= 0) { c_uint8_t auts_amf[2] = { 0x00, 0x00 }; /* TS 33.102 v7.0.0, 6.3.3 */ if (milenage_f2345(opc, k, _rand, NULL, NULL, NULL, NULL, ak)) return -1; d_trace(1, "Milenage: AK*\n"); d_trace_hex(1, ak, 6); for (i = 0; i < 6; i++) auts[i] = sqn[i] ^ ak[i]; if (milenage_f1(opc, k, _rand, sqn, auts_amf, NULL, auts + 6)) return -1; d_trace(1, "Milenage: AUTS*\n"); d_trace_hex(1, auts, 14); return -2; } amf = autn + 6; d_trace(1, "Milenage: AMF\n"); d_trace_hex(1, amf, 2); if (milenage_f1(opc, k, _rand, rx_sqn, amf, mac_a, NULL)) return -1; d_trace(1, "Milenage: MAC_A\n"); d_trace_hex(1, mac_a, 8); if (os_memcmp_const(mac_a, autn + 8, 8) != 0) { d_trace(1, "Milenage: MAC mismatch\n"); d_trace(1, "Milenage: Received MAC_A\n"); d_trace_hex(1, autn + 8, 8); return -1; } return 0; } void milenage_opc(const c_uint8_t *k, const c_uint8_t *op, c_uint8_t *opc) { int i; aes_128_encrypt_block(k, op, opc); for (i = 0; i < 16; i++) { opc[i] ^= op[i]; } } nextepc-0.3.10/src/hss/milenage.h000066400000000000000000000026641333553357400166020ustar00rootroot00000000000000/* * UMTS AKA - Milenage algorithm (3GPP TS 35.205, .206, .207, .208) * Copyright (c) 2006-2007 * * This software may be distributed under the terms of the BSD license. * See README for more details. */ #ifndef __MILENAGE_H__ #define __MILENAGE_H__ #include "core.h" void milenage_generate(const c_uint8_t *opc, const c_uint8_t *amf, const c_uint8_t *k, const c_uint8_t *sqn, const c_uint8_t *_rand, c_uint8_t *autn, c_uint8_t *ik, c_uint8_t *ck, c_uint8_t *ak, c_uint8_t *res, size_t *res_len); int milenage_auts(const c_uint8_t *opc, const c_uint8_t *k, const c_uint8_t *_rand, const c_uint8_t *auts, c_uint8_t *sqn); int gsm_milenage(const c_uint8_t *opc, const c_uint8_t *k, const c_uint8_t *_rand, c_uint8_t *sres, c_uint8_t *kc); int milenage_check(const c_uint8_t *opc, const c_uint8_t *k, const c_uint8_t *sqn, const c_uint8_t *_rand, const c_uint8_t *autn, c_uint8_t *ik, c_uint8_t *ck, c_uint8_t *res, size_t *res_len, c_uint8_t *auts); int milenage_f1(const c_uint8_t *opc, const c_uint8_t *k, const c_uint8_t *_rand, const c_uint8_t *sqn, const c_uint8_t *amf, c_uint8_t *mac_a, c_uint8_t *mac_s); int milenage_f2345(const c_uint8_t *opc, const c_uint8_t *k, const c_uint8_t *_rand, c_uint8_t *res, c_uint8_t *ck, c_uint8_t *ik, c_uint8_t *ak, c_uint8_t *akstar); void milenage_opc(const c_uint8_t *k, const c_uint8_t *op, c_uint8_t *opc); #endif /* __MILENAGE_H__ */ nextepc-0.3.10/src/mme.c000066400000000000000000000021061333553357400147640ustar00rootroot00000000000000#define TRACE_MODULE _mme_main #include "core_debug.h" #include "core_signal.h" #include "core_semaphore.h" #include "common/context.h" #include "common/application.h" #include "app_init.h" status_t app_initialize( const char *config_path, const char *log_path, const char *pid_path) { status_t rv; int app = 0; rv = app_log_pid(pid_path, "mme"); if (rv != CORE_OK) return rv; rv = app_will_initialize(config_path, log_path); if (rv != CORE_OK) return rv; app = context_self()->logger.trace.app; if (app) { d_trace_level(&_mme_main, app); } d_trace(1, "MME try to initialize\n"); rv = mme_initialize(); if (rv != CORE_OK) { d_error("Failed to intialize MME"); return rv; } d_trace(1, "MME initialize...done\n"); rv = app_did_initialize(); if (rv != CORE_OK) return rv; return CORE_OK; } void app_terminate(void) { app_will_terminate(); d_trace(1, "MME try to terminate\n"); mme_terminate(); d_trace(1, "MME terminate...done\n"); app_did_terminate(); } nextepc-0.3.10/src/mme/000077500000000000000000000000001333553357400146215ustar00rootroot00000000000000nextepc-0.3.10/src/mme/Makefile.am000066400000000000000000000032531333553357400166600ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in. noinst_LTLIBRARIES = libmme.la libmme_la_SOURCES = \ mme_kdf.h kasumi.h snow_3g.h zuc.h \ mme_event.h mme_context.h \ s1ap_build.h s1ap_handler.h s1ap_conv.h s1ap_path.h \ mme_fd_path.h mme_s6a_handler.h \ nas_conv.h nas_security.h nas_path.h \ emm_handler.h emm_build.h \ esm_handler.h esm_build.h \ mme_gtp_path.h mme_s11_build.h mme_s11_handler.h \ mme_sm.h mme_path.h \ mme_kdf.c kasumi.c snow_3g.c zuc.c \ mme_init.c mme_event.c mme_context.c \ s1ap_sm.c s1ap_build.c s1ap_handler.c s1ap_conv.c s1ap_path.c \ mme_fd_path.c mme_s6a_handler.c \ nas_conv.c nas_security.c nas_path.c \ emm_sm.c emm_handler.c emm_build.c \ esm_sm.c esm_handler.c esm_build.c \ mme_gtp_path.c mme_s11_build.c mme_s11_handler.c \ mme_sm.c mme_path.c \ $(NULL) if USRSCTP libmme_la_SOURCES += s1ap_usrsctp.c else libmme_la_SOURCES += s1ap_sctp.c endif libmme_la_DEPENDENCIES = \ $(top_srcdir)/lib/s1ap/libs1ap.la \ $(top_srcdir)/lib/nas/libnas.la \ $(top_srcdir)/lib/fd/libfd.la \ $(top_srcdir)/lib/gtp/libgtp.la \ $(top_srcdir)/src/common/libcommon.la \ $(NULL) libmme_la_LIBADD = \ $(top_srcdir)/lib/s1ap/libs1ap.la \ $(top_srcdir)/lib/nas/libnas.la \ $(top_srcdir)/lib/fd/libfd.la \ $(top_srcdir)/lib/gtp/libgtp.la \ $(top_srcdir)/src/common/libcommon.la \ $(NULL) AM_CPPFLAGS = \ -I$(top_srcdir)/lib/core/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ -I$(top_srcdir)/lib/s1ap/asn1c \ -I$(top_srcdir)/lib/@FREEDIAMETER_DIR@/include \ @MONGOC_CFLAGS@ \ $(NULL) AM_CFLAGS = \ -Wall -Werror \ $(NULL) MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = core *.stackdump nextepc-0.3.10/src/mme/emm_build.c000066400000000000000000000420511333553357400167240ustar00rootroot00000000000000#define TRACE_MODULE _emm_build #include "core_debug.h" #include "nas/nas_message.h" #include "nas_security.h" #include "mme_kdf.h" #include "emm_build.h" status_t emm_build_attach_accept( pkbuf_t **emmbuf, mme_ue_t *mme_ue, pkbuf_t *esmbuf) { status_t rv; nas_message_t message; nas_attach_accept_t *attach_accept = &message.emm.attach_accept; nas_eps_attach_result_t *eps_attach_result = &attach_accept->eps_attach_result; nas_gprs_timer_t *t3412_value = &attach_accept->t3412_value; int served_tai_index = 0; nas_eps_mobile_identity_t *guti = &attach_accept->guti; nas_eps_network_feature_support_t *eps_network_feature_support = &attach_accept->eps_network_feature_support; d_assert(mme_ue, return CORE_ERROR, "Null param"); d_assert(esmbuf, return CORE_ERROR, "Null param"); d_trace(3, "[EMM] Attach accept\n"); memset(&message, 0, sizeof(message)); message.h.security_header_type = NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHERED; message.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; message.emm.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; message.emm.h.message_type = NAS_ATTACH_ACCEPT; /* Set T3412 */ eps_attach_result->result = mme_ue->nas_eps.attach.attach_type; t3412_value->unit = NAS_GRPS_TIMER_UNIT_MULTIPLES_OF_DECI_HH; t3412_value->value = 9; d_trace(5, " TAI[PLMN_ID:0x%x,TAC:%d]\n", mme_ue->tai.plmn_id, mme_ue->tai.tac); d_trace(5, " E_CGI[PLMN_ID:0x%x,CELL_ID:%d]\n", mme_ue->e_cgi.plmn_id, mme_ue->e_cgi.cell_id); served_tai_index = mme_find_served_tai(&mme_ue->tai); d_trace(5, " SERVED_TAI_INDEX[%d]\n", served_tai_index); d_assert(served_tai_index >= 0 && served_tai_index < MAX_NUM_OF_SERVED_TAI, return CORE_ERROR, "Cannot find Served TAI. Check 'mme.tai' configuration"); nas_tai_list_build(&attach_accept->tai_list, &mme_self()->served_tai[served_tai_index].list0, &mme_self()->served_tai[served_tai_index].list2); attach_accept->esm_message_container.buffer = esmbuf->payload; attach_accept->esm_message_container.length = esmbuf->len; d_trace(5, " %s GUTI[G:%d,C:%d,M_TMSI:0x%x] IMSI:[%s]\n", mme_ue->guti_present ? "[V]" : "[N]", mme_ue->guti.mme_gid, mme_ue->guti.mme_code, mme_ue->guti.m_tmsi, mme_ue->imsi_bcd); if (mme_ue->guti_present) { attach_accept->presencemask |= NAS_ATTACH_ACCEPT_GUTI_PRESENT; guti->length = sizeof(nas_eps_mobile_identity_guti_t); guti->guti.odd_even = NAS_EPS_MOBILE_IDENTITY_EVEN; guti->guti.type = NAS_EPS_MOBILE_IDENTITY_GUTI; memcpy(&guti->guti.plmn_id, &mme_ue->guti.plmn_id, PLMN_ID_LEN); guti->guti.mme_gid = mme_ue->guti.mme_gid; guti->guti.mme_code = mme_ue->guti.mme_code; guti->guti.m_tmsi = mme_ue->guti.m_tmsi; } mme_ue->guti_present = 0; #if 0 /* Need not to include T3402 */ /* Set T3402 */ attach_accept->presencemask |= NAS_ATTACH_ACCEPT_T3402_VALUE_PRESENT; attach_accept->t3402_value.unit = NAS_GRPS_TIMER_UNIT_MULTIPLES_OF_1_MM; attach_accept->t3402_value.value = 12; #endif /* Set T3423 */ attach_accept->presencemask |= NAS_ATTACH_ACCEPT_T3423_VALUE_PRESENT; attach_accept->t3423_value.unit = NAS_GRPS_TIMER_UNIT_MULTIPLES_OF_DECI_HH; attach_accept->t3423_value.value = 9; attach_accept->presencemask |= NAS_ATTACH_ACCEPT_EPS_NETWORK_FEATURE_SUPPORT_PRESENT; eps_network_feature_support->length = 1; eps_network_feature_support->ims_vops = 1; rv = nas_security_encode(emmbuf, mme_ue, &message); d_assert(rv == CORE_OK && *emmbuf,, "nas_security_encode error"); pkbuf_free(esmbuf); return CORE_OK; } status_t emm_build_attach_reject( pkbuf_t **emmbuf, nas_emm_cause_t emm_cause, pkbuf_t *esmbuf) { status_t rv; nas_message_t message; nas_attach_reject_t *attach_reject = &message.emm.attach_reject; memset(&message, 0, sizeof(message)); message.emm.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; message.emm.h.message_type = NAS_ATTACH_REJECT; attach_reject->emm_cause = emm_cause; if (esmbuf) { attach_reject->presencemask |= NAS_ATTACH_REJECT_ESM_MESSAGE_CONTAINER_PRESENT; attach_reject->esm_message_container.buffer = esmbuf->payload; attach_reject->esm_message_container.length = esmbuf->len; } rv = nas_plain_encode(emmbuf, &message); d_assert(rv == CORE_OK && *emmbuf,, "nas_plain_encode error"); if (esmbuf) { pkbuf_free(esmbuf); } return rv; } status_t emm_build_identity_request( pkbuf_t **emmbuf, mme_ue_t *mme_ue) { status_t rv; nas_message_t message; nas_identity_request_t *identity_request = &message.emm.identity_request; d_assert(mme_ue, return CORE_ERROR, "Null param"); memset(&message, 0, sizeof(message)); message.emm.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; message.emm.h.message_type = NAS_IDENTITY_REQUEST; /* Request IMSI */ d_trace(3, "[EMM] Identity request\n"); d_trace(5, " Identity Type 2 : IMSI\n"); identity_request->identity_type.type = NAS_IDENTITY_TYPE_2_IMSI; rv = nas_plain_encode(emmbuf, &message); d_assert(rv == CORE_OK && *emmbuf,, "nas_plain_encode error"); return rv; } status_t emm_build_authentication_request( pkbuf_t **emmbuf, e_utran_vector_t *e_utran_vector) { status_t rv; nas_message_t message; nas_authentication_request_t *authentication_request = &message.emm.authentication_request; d_assert(e_utran_vector, return CORE_ERROR, "Null param"); memset(&message, 0, sizeof(message)); message.emm.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; message.emm.h.message_type = NAS_AUTHENTICATION_REQUEST; memcpy(authentication_request->authentication_parameter_rand.rand, e_utran_vector->rand, RAND_LEN); memcpy(authentication_request->authentication_parameter_autn.autn, e_utran_vector->autn, AUTN_LEN); authentication_request->authentication_parameter_autn.length = AUTN_LEN; rv = nas_plain_encode(emmbuf, &message); d_assert(rv == CORE_OK && *emmbuf, , "nas encode error"); return rv; } status_t emm_build_authentication_reject(pkbuf_t **emmbuf) { status_t rv; nas_message_t message; memset(&message, 0, sizeof(message)); message.emm.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; message.emm.h.message_type = NAS_AUTHENTICATION_REJECT; rv = nas_plain_encode(emmbuf, &message); d_assert(rv == CORE_OK && *emmbuf,, "nas_plain_encode error"); return rv; } status_t emm_build_security_mode_command( pkbuf_t **emmbuf, mme_ue_t *mme_ue) { status_t rv; int i; nas_message_t message; nas_security_mode_command_t *security_mode_command = &message.emm.security_mode_command; nas_security_algorithms_t *selected_nas_security_algorithms = &security_mode_command->selected_nas_security_algorithms; nas_key_set_identifier_t *nas_key_set_identifier = &security_mode_command->nas_key_set_identifier; nas_ue_security_capability_t *replayed_ue_security_capabilities = &security_mode_command->replayed_ue_security_capabilities; d_assert(mme_ue, return CORE_ERROR, "Null param"); d_trace(3, "[EMM] Security mode command\n"); d_trace(5, " IMSI[%s]\n", mme_ue->imsi_bcd); memset(&message, 0, sizeof(message)); message.h.security_header_type = NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_NEW_SECURITY_CONTEXT; message.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; message.emm.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; message.emm.h.message_type = NAS_SECURITY_MODE_COMMAND; for (i = 0; i < mme_self()->num_of_integrity_order; i++) { if (mme_ue->ue_network_capability.eia & (0x80 >> mme_self()->integrity_order[i])) { mme_ue->selected_int_algorithm = mme_self()->integrity_order[i]; break; } } for (i = 0; i < mme_self()->num_of_ciphering_order; i++) { if (mme_ue->ue_network_capability.eea & (0x80 >> mme_self()->ciphering_order[i])) { mme_ue->selected_enc_algorithm = mme_self()->ciphering_order[i]; break; } } selected_nas_security_algorithms->type_of_integrity_protection_algorithm = mme_ue->selected_int_algorithm; selected_nas_security_algorithms->type_of_ciphering_algorithm = mme_ue->selected_enc_algorithm; nas_key_set_identifier->tsc = 0; nas_key_set_identifier->nas_key_set_identifier = 0; replayed_ue_security_capabilities->eea = mme_ue->ue_network_capability.eea; replayed_ue_security_capabilities->eia = mme_ue->ue_network_capability.eia; replayed_ue_security_capabilities->uea = mme_ue->ue_network_capability.uea; replayed_ue_security_capabilities->uia = mme_ue->ue_network_capability.uia & 0x7f; replayed_ue_security_capabilities->gea = (mme_ue->ms_network_capability.gea1 << 6) | mme_ue->ms_network_capability.extended_gea; replayed_ue_security_capabilities->length = sizeof(replayed_ue_security_capabilities->eea) + sizeof(replayed_ue_security_capabilities->eia); if (replayed_ue_security_capabilities->uea || replayed_ue_security_capabilities->uia) replayed_ue_security_capabilities->length = sizeof(replayed_ue_security_capabilities->eea) + sizeof(replayed_ue_security_capabilities->eia) + sizeof(replayed_ue_security_capabilities->uea) + sizeof(replayed_ue_security_capabilities->uia); if (replayed_ue_security_capabilities->gea) replayed_ue_security_capabilities->length = sizeof(replayed_ue_security_capabilities->eea) + sizeof(replayed_ue_security_capabilities->eia) + sizeof(replayed_ue_security_capabilities->uea) + sizeof(replayed_ue_security_capabilities->uia) + sizeof(replayed_ue_security_capabilities->gea); d_trace(5, " SEC[LEN:%d EEA:0x%x EIA:0x%x UEA:0x%x UIA:0x%x GEA:0x%x]\n", replayed_ue_security_capabilities->length, replayed_ue_security_capabilities->eea, replayed_ue_security_capabilities->eia, replayed_ue_security_capabilities->uea, replayed_ue_security_capabilities->uia, replayed_ue_security_capabilities->gea); mme_kdf_nas(MME_KDF_NAS_INT_ALG, mme_ue->selected_int_algorithm, mme_ue->kasme, mme_ue->knas_int); mme_kdf_nas(MME_KDF_NAS_ENC_ALG, mme_ue->selected_enc_algorithm, mme_ue->kasme, mme_ue->knas_enc); rv = nas_security_encode(emmbuf, mme_ue, &message); d_assert(rv == CORE_OK && *emmbuf, return CORE_ERROR, "emm build error"); return CORE_OK; } status_t emm_build_detach_accept(pkbuf_t **emmbuf, mme_ue_t *mme_ue) { status_t rv; nas_message_t message; d_assert(mme_ue, return CORE_ERROR, "Null param"); memset(&message, 0, sizeof(message)); message.h.security_header_type = NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHERED; message.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; d_trace(3, "[EMM] Detach accept\n"); d_trace(5, " IMSI[%s]\n", mme_ue->imsi_bcd); message.emm.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; message.emm.h.message_type = NAS_DETACH_ACCEPT; rv = nas_security_encode(emmbuf, mme_ue, &message); d_assert(rv == CORE_OK && emmbuf, return CORE_ERROR, "emm build error"); return CORE_OK; } status_t emm_build_tau_accept(pkbuf_t **emmbuf, mme_ue_t *mme_ue) { nas_message_t message; nas_tracking_area_update_accept_t *tau_accept = &message.emm.tracking_area_update_accept; int served_tai_index = 0; mme_sess_t *sess = NULL; d_assert(mme_ue, return CORE_ERROR,); memset(&message, 0, sizeof(message)); message.h.security_header_type = NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHERED; message.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; message.emm.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; message.emm.h.message_type = NAS_TRACKING_AREA_UPDATE_ACCEPT; tau_accept->eps_update_result.result = mme_ue->nas_eps.update.update_type; /* Set T3412 */ tau_accept->presencemask |= NAS_TRACKING_AREA_UPDATE_ACCEPT_T3412_VALUE_PRESENT ; tau_accept->t3412_value.unit = NAS_GRPS_TIMER_UNIT_MULTIPLES_OF_DECI_HH; tau_accept->t3412_value.value = 9; /* Set TAI */ tau_accept->presencemask |= NAS_TRACKING_AREA_UPDATE_ACCEPT_TAI_LIST_PRESENT; d_trace(5, " TAI[PLMN_ID:0x%x,TAC:%d]\n", mme_ue->tai.plmn_id, mme_ue->tai.tac); d_trace(5, " E_CGI[PLMN_ID:0x%x,CELL_ID:%d]\n", mme_ue->e_cgi.plmn_id, mme_ue->e_cgi.cell_id); served_tai_index = mme_find_served_tai(&mme_ue->tai); d_trace(5, " SERVED_TAI_INDEX[%d]\n", served_tai_index); d_assert(served_tai_index >= 0 && served_tai_index < MAX_NUM_OF_SERVED_TAI, return CORE_ERROR, "Cannot find Served TAI. Check 'mme.tai' configuration"); nas_tai_list_build(&tau_accept->tai_list, &mme_self()->served_tai[served_tai_index].list0, &mme_self()->served_tai[served_tai_index].list2); /* Set EPS bearer context status */ tau_accept->presencemask |= NAS_TRACKING_AREA_UPDATE_ACCEPT_EPS_BEARER_CONTEXT_STATUS_PRESENT; tau_accept->eps_bearer_context_status.length = 2; sess = mme_sess_first(mme_ue); while(sess) { mme_bearer_t *bearer = mme_bearer_first(sess); while(bearer) { switch(bearer->ebi) { case 5: tau_accept->eps_bearer_context_status.ebi5 = 1; break; case 6: tau_accept->eps_bearer_context_status.ebi6 = 1; break; case 7: tau_accept->eps_bearer_context_status.ebi7 = 1; break; case 8: tau_accept->eps_bearer_context_status.ebi8 = 1; break; case 9: tau_accept->eps_bearer_context_status.ebi9 = 1; break; case 10: tau_accept->eps_bearer_context_status.ebi10 = 1; break; case 11: tau_accept->eps_bearer_context_status.ebi11 = 1; break; case 12: tau_accept->eps_bearer_context_status.ebi12 = 1; break; case 13: tau_accept->eps_bearer_context_status.ebi13 = 1; break; case 14: tau_accept->eps_bearer_context_status.ebi14 = 1; break; case 15: tau_accept->eps_bearer_context_status.ebi15 = 1; break; default: break; } bearer = mme_bearer_next(bearer); } sess = mme_sess_next(sess); } #if 0 /* Need not to include T3402 */ /* Set T3402 */ tau_accept->presencemask |= NAS_TRACKING_AREA_UPDATE_ACCEPT_T3402_VALUE_PRESENT; tau_accept->t3402_value.unit = NAS_GRPS_TIMER_UNIT_MULTIPLES_OF_1_MM; tau_accept->t3402_value.value = 12; #endif /* Set T3423 */ tau_accept->presencemask |= NAS_TRACKING_AREA_UPDATE_ACCEPT_T3423_VALUE_PRESENT; tau_accept->t3423_value.unit = NAS_GRPS_TIMER_UNIT_MULTIPLES_OF_DECI_HH; tau_accept->t3423_value.value = 9; /* Set EPS network feature support */ tau_accept->presencemask |= NAS_TRACKING_AREA_UPDATE_ACCEPT_EPS_NETWORK_FEATURE_SUPPORT_PRESENT; tau_accept->eps_network_feature_support.length = 1; tau_accept->eps_network_feature_support.ims_vops = 1; d_assert(nas_security_encode(emmbuf, mme_ue, &message) == CORE_OK && *emmbuf,,); return CORE_OK; } status_t emm_build_tau_reject(pkbuf_t **emmbuf, nas_emm_cause_t emm_cause, mme_ue_t *mme_ue) { nas_message_t message; nas_tracking_area_update_reject_t *tau_reject = &message.emm.tracking_area_update_reject; d_assert(mme_ue, return CORE_ERROR,); d_trace(3, "[EMM] Tracking area update reject\n"); d_trace(5, " IMSI[%s] Cause[%d]\n", MME_UE_HAVE_IMSI(mme_ue) ? mme_ue->imsi_bcd : "Unknown", emm_cause); memset(&message, 0, sizeof(message)); message.emm.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; message.emm.h.message_type = NAS_TRACKING_AREA_UPDATE_REJECT; tau_reject->emm_cause = emm_cause; d_assert(nas_plain_encode(emmbuf, &message) == CORE_OK && *emmbuf,,); return CORE_OK; } status_t emm_build_service_reject(pkbuf_t **emmbuf, nas_emm_cause_t emm_cause, mme_ue_t *mme_ue) { nas_message_t message; nas_service_reject_t *service_reject = &message.emm.service_reject; d_assert(mme_ue, return CORE_ERROR, "Null param"); d_trace(3, "[EMM] Service reject\n"); d_trace(5, " Cause[%d]\n", emm_cause); memset(&message, 0, sizeof(message)); message.emm.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; message.emm.h.message_type = NAS_SERVICE_REJECT; service_reject->emm_cause = emm_cause; d_assert(nas_plain_encode(emmbuf, &message) == CORE_OK && *emmbuf,,); return CORE_OK; } nextepc-0.3.10/src/mme/emm_build.h000066400000000000000000000023341333553357400167310ustar00rootroot00000000000000#ifndef __EMM_BUILD_H__ #define __EMM_BUILD_H__ #include "mme_context.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(status_t) emm_build_attach_accept( pkbuf_t **emmbuf, mme_ue_t *mme_ue, pkbuf_t *esmbuf); CORE_DECLARE(status_t) emm_build_attach_reject( pkbuf_t **emmbuf, nas_emm_cause_t emm_cause, pkbuf_t *esmbuf); CORE_DECLARE(status_t) emm_build_identity_request( pkbuf_t **emmbuf, mme_ue_t *mme_ue); CORE_DECLARE(status_t) emm_build_security_mode_command( pkbuf_t **emmbuf, mme_ue_t *mme_ue); CORE_DECLARE(status_t) emm_build_authentication_request( pkbuf_t **emmbuf, e_utran_vector_t *e_utran_vector); CORE_DECLARE(status_t) emm_build_authentication_reject(pkbuf_t **emmbuf); CORE_DECLARE(status_t) emm_build_detach_accept( pkbuf_t **emmbuf, mme_ue_t *mme_ue); CORE_DECLARE(status_t) emm_build_tau_accept(pkbuf_t **emmbuf, mme_ue_t *mme_ue); CORE_DECLARE(status_t) emm_build_tau_reject(pkbuf_t **emmbuf, nas_emm_cause_t emm_cause,mme_ue_t *mme_ue); CORE_DECLARE(status_t) emm_build_service_reject(pkbuf_t **emmbuf, nas_emm_cause_t emm_cause, mme_ue_t *mme_ue); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __EMM_BUILD_H__ */ nextepc-0.3.10/src/mme/emm_handler.c000066400000000000000000000424741333553357400172530ustar00rootroot00000000000000#define TRACE_MODULE _emm_handler #include "core_debug.h" #include "core_lib.h" #include "nas/nas_message.h" #include "mme_event.h" #include "mme_kdf.h" #include "nas_security.h" #include "nas_conv.h" #include "s1ap_path.h" #include "nas_path.h" #include "mme_fd_path.h" #include "mme_gtp_path.h" #include "emm_handler.h" status_t emm_handle_attach_request( mme_ue_t *mme_ue, nas_attach_request_t *attach_request) { int served_tai_index = 0; enb_ue_t *enb_ue = NULL; nas_eps_attach_type_t *eps_attach_type = &attach_request->eps_attach_type; nas_eps_mobile_identity_t *eps_mobile_identity = &attach_request->eps_mobile_identity; nas_esm_message_container_t *esm_message_container = &attach_request->esm_message_container; d_assert(mme_ue, return CORE_ERROR, "Null param"); enb_ue = mme_ue->enb_ue; d_assert(enb_ue, return CORE_ERROR, "Null param"); d_assert(esm_message_container, return CORE_ERROR, "Null param"); d_assert(esm_message_container->length, return CORE_ERROR, "Null param"); /* Set EPS Attach Type */ memcpy(&mme_ue->nas_eps.attach, eps_attach_type, sizeof(nas_eps_attach_type_t)); mme_ue->nas_eps.type = MME_EPS_TYPE_ATTACH_REQUEST; mme_ue->nas_eps.ksi = eps_attach_type->nas_key_set_identifier; d_trace(5, " NAS_EPS TYPE[%d] KSI[%d] ATTACH[0x%x]\n", mme_ue->nas_eps.type, mme_ue->nas_eps.ksi, mme_ue->nas_eps.data); /* * ATTACH_REQUEST * Clear EBI generator * Clear Paging Timer and Message * Update KeNB * * TAU_REQUEST * Clear Paging Timer and Message * * SERVICE_REQUEST * Clear Paging Timer and Message * Update KeNB */ CLEAR_EPS_BEARER_ID(mme_ue); CLEAR_PAGING_INFO(mme_ue); if (SECURITY_CONTEXT_IS_VALID(mme_ue)) { mme_kdf_enb(mme_ue->kasme, mme_ue->ul_count.i32, mme_ue->kenb); mme_kdf_nh(mme_ue->kasme, mme_ue->kenb, mme_ue->nh); mme_ue->nhcc = 1; } d_trace(5, " OLD TAI[PLMN_ID:0x%x,TAC:%d]\n", mme_ue->tai.plmn_id, mme_ue->tai.tac); d_trace(5, " OLD E_CGI[PLMN_ID:0x%x,CELL_ID:%d]\n", mme_ue->e_cgi.plmn_id, mme_ue->e_cgi.cell_id); d_trace(5, " TAI[PLMN_ID:0x%x,TAC:%d]\n", enb_ue->nas.tai.plmn_id, enb_ue->nas.tai.tac); d_trace(5, " E_CGI[PLMN_ID:0x%x,CELL_ID:%d]\n", enb_ue->nas.e_cgi.plmn_id, enb_ue->nas.e_cgi.cell_id); /* Copy TAI and ECGI from enb_ue */ memcpy(&mme_ue->tai, &enb_ue->nas.tai, sizeof(tai_t)); memcpy(&mme_ue->e_cgi, &enb_ue->nas.e_cgi, sizeof(e_cgi_t)); /* Check TAI */ served_tai_index = mme_find_served_tai(&mme_ue->tai); if (served_tai_index < 0) { /* Send Attach Reject */ d_warn("Cannot find Served TAI[PLMN_ID:0x%x,TAC:%d]", mme_ue->tai.plmn_id, mme_ue->tai.tac); nas_send_attach_reject(mme_ue, EMM_CAUSE_TRACKING_AREA_NOT_ALLOWED, ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED); return CORE_ERROR; } d_trace(5, " SERVED_TAI_INDEX[%d]\n", served_tai_index); /* Store UE specific information */ if (attach_request->presencemask & NAS_ATTACH_REQUEST_LAST_VISITED_REGISTERED_TAI_PRESENT) { nas_tracking_area_identity_t *last_visited_registered_tai = &attach_request->last_visited_registered_tai; memcpy(&mme_ue->visited_plmn_id, &last_visited_registered_tai->plmn_id, PLMN_ID_LEN); } else { memcpy(&mme_ue->visited_plmn_id, &mme_ue->tai.plmn_id, PLMN_ID_LEN); } memcpy(&mme_ue->ue_network_capability, &attach_request->ue_network_capability, sizeof(attach_request->ue_network_capability)); if (attach_request->presencemask & NAS_ATTACH_REQUEST_MS_NETWORK_CAPABILITY_PRESENT) { memcpy(&mme_ue->ms_network_capability, &attach_request->ms_network_capability, sizeof(attach_request->ms_network_capability)); } switch(eps_mobile_identity->imsi.type) { case NAS_EPS_MOBILE_IDENTITY_IMSI: { c_int8_t imsi_bcd[MAX_IMSI_BCD_LEN+1]; nas_imsi_to_bcd( &eps_mobile_identity->imsi, eps_mobile_identity->length, imsi_bcd); mme_ue_set_imsi(mme_ue, imsi_bcd); d_trace(5, " IMSI[%s]\n", imsi_bcd); break; } case NAS_EPS_MOBILE_IDENTITY_GUTI: { nas_eps_mobile_identity_guti_t *nas_guti = NULL; nas_guti = &eps_mobile_identity->guti; guti_t guti; guti.plmn_id = nas_guti->plmn_id; guti.mme_gid = nas_guti->mme_gid; guti.mme_code = nas_guti->mme_code; guti.m_tmsi = nas_guti->m_tmsi; d_trace(5, " GUTI[G:%d,C:%d,M_TMSI:0x%x] IMSI[%s]\n", guti.mme_gid, guti.mme_code, guti.m_tmsi, MME_UE_HAVE_IMSI(mme_ue) ? mme_ue->imsi_bcd : "Unknown"); break; } default: { d_warn("Not implemented[%d]", eps_mobile_identity->imsi.type); break; } } NAS_STORE_DATA(&mme_ue->pdn_connectivity_request, esm_message_container); return CORE_OK; } status_t emm_handle_attach_complete( mme_ue_t *mme_ue, nas_attach_complete_t *attach_complete) { status_t rv; pkbuf_t *emmbuf = NULL; nas_message_t message; nas_emm_information_t *emm_information = &message.emm.emm_information; nas_time_zone_and_time_t *universal_time_and_local_time_zone = &emm_information->universal_time_and_local_time_zone; nas_daylight_saving_time_t *network_daylight_saving_time = &emm_information->network_daylight_saving_time; time_exp_t xt_gmt, xt_local; rv = time_exp_gmt(&xt_gmt, time_now()); d_assert(rv == CORE_OK, return CORE_ERROR,); rv = time_exp_lt(&xt_local, time_now()); d_assert(rv == CORE_OK, return CORE_ERROR,); d_assert(mme_ue, return CORE_ERROR, "Null param"); d_trace(5, " GMT Time[Y:M:D H:M:S GMT] - %d:%d:%d, %d:%d:%d, %d\n", xt_gmt.tm_year, xt_gmt.tm_mon, xt_gmt.tm_mday, xt_gmt.tm_hour, xt_gmt.tm_min, xt_gmt.tm_sec, xt_gmt.tm_gmtoff); d_trace(5, " LOCAL Time[Y:M:D H:M:S GMT] - %d:%d:%d, %d:%d:%d, %d\n", xt_local.tm_year, xt_local.tm_mon, xt_local.tm_mday, xt_local.tm_hour, xt_local.tm_min, xt_local.tm_sec, xt_local.tm_gmtoff); rv = nas_send_emm_to_esm(mme_ue, &attach_complete->esm_message_container); d_assert(rv == CORE_OK, return CORE_ERROR, "nas_send_emm_to_esm failed"); memset(&message, 0, sizeof(message)); message.h.security_header_type = NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHERED; message.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; message.emm.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; message.emm.h.message_type = NAS_EMM_INFORMATION; emm_information->presencemask |= NAS_EMM_INFORMATION_UNIVERSAL_TIME_AND_LOCAL_TIME_ZONE_PRESENT; universal_time_and_local_time_zone->year = NAS_TIME_TO_BCD(xt_gmt.tm_year % 100); universal_time_and_local_time_zone->mon = NAS_TIME_TO_BCD(xt_gmt.tm_mon+1); universal_time_and_local_time_zone->mday = NAS_TIME_TO_BCD(xt_gmt.tm_mday); universal_time_and_local_time_zone->hour = NAS_TIME_TO_BCD(xt_gmt.tm_hour); universal_time_and_local_time_zone->min = NAS_TIME_TO_BCD(xt_gmt.tm_min); universal_time_and_local_time_zone->sec = NAS_TIME_TO_BCD(xt_gmt.tm_sec); if (xt_local.tm_gmtoff >= 0) universal_time_and_local_time_zone->sign = 0; else universal_time_and_local_time_zone->sign = 1; /* quarters of an hour */ universal_time_and_local_time_zone->gmtoff = NAS_TIME_TO_BCD(xt_local.tm_gmtoff / 900); emm_information->presencemask |= NAS_EMM_INFORMATION_NETWORK_DAYLIGHT_SAVING_TIME_PRESENT; network_daylight_saving_time->length = 1; if(mme_self()->full_name.length) { emm_information->presencemask |= NAS_EMM_INFORMATION_FULL_NAME_FOR_NETWORK_PRESENT; memcpy(&emm_information->full_name_for_network, &mme_self()->full_name, sizeof(nas_network_name_t)); } if(mme_self()->short_name.length) { emm_information->presencemask |= NAS_EMM_INFORMATION_SHORT_NAME_FOR_NETWORK_PRESENT; memcpy(&emm_information->short_name_for_network, &mme_self()->short_name, sizeof(nas_network_name_t)); } rv = nas_security_encode(&emmbuf, mme_ue, &message); d_assert(rv == CORE_OK && emmbuf, return CORE_ERROR, "emm build error"); d_assert(nas_send_to_downlink_nas_transport(mme_ue, emmbuf) == CORE_OK,,); d_trace(3, "[EMM] EMM information\n"); d_trace(5, " IMSI[%s]\n", mme_ue->imsi_bcd); return CORE_OK; } status_t emm_handle_identity_response( mme_ue_t *mme_ue, nas_identity_response_t *identity_response) { nas_mobile_identity_t *mobile_identity = NULL; enb_ue_t *enb_ue = NULL; d_assert(identity_response, return CORE_ERROR, "Null param"); d_assert(mme_ue, return CORE_ERROR, "Null param"); enb_ue = mme_ue->enb_ue; d_assert(enb_ue, return CORE_ERROR, "Null param"); mobile_identity = &identity_response->mobile_identity; if (mobile_identity->imsi.type == NAS_IDENTITY_TYPE_2_IMSI) { c_int8_t imsi_bcd[MAX_IMSI_BCD_LEN+1]; nas_imsi_to_bcd( &mobile_identity->imsi, mobile_identity->length, imsi_bcd); mme_ue_set_imsi(mme_ue, imsi_bcd); d_assert(mme_ue->imsi_len, return CORE_ERROR, "Can't get IMSI : [LEN:%d]\n", mme_ue->imsi_len); } else { d_warn("Not supported Identity type[%d]", mobile_identity->imsi.type); } return CORE_OK; } status_t emm_handle_detach_request( mme_ue_t *mme_ue, nas_detach_request_from_ue_t *detach_request) { nas_detach_type_t *detach_type = NULL; d_assert(detach_request, return CORE_ERROR, "Null param"); d_assert(mme_ue, return CORE_ERROR, "Null param"); detach_type = &detach_request->detach_type; /* Set EPS Attach Type */ memcpy(&mme_ue->nas_eps.detach, detach_type, sizeof(nas_detach_type_t)); mme_ue->nas_eps.type = MME_EPS_TYPE_DETACH_REQUEST_FROM_UE; mme_ue->nas_eps.ksi = detach_type->nas_key_set_identifier; d_trace(5, " NAS_EPS TYPE[%d] KSI[%d] DETACH[0x%x]\n", mme_ue->nas_eps.type, mme_ue->nas_eps.ksi, mme_ue->nas_eps.data); switch (detach_request->detach_type.detach_type) { /* 0 0 1 : EPS detach */ case NAS_DETACH_TYPE_FROM_UE_EPS_DETACH: d_trace(5, " EPS Detach\n"); break; /* 0 1 0 : IMSI detach */ case NAS_DETACH_TYPE_FROM_UE_IMSI_DETACH: d_trace(5, " IMSI Detach\n"); break; case 6: /* 1 1 0 : reserved */ case 7: /* 1 1 1 : reserved */ d_warn("Unknown Detach type[%d]", detach_request->detach_type.detach_type); break; /* 0 1 1 : combined EPS/IMSI detach */ case NAS_DETACH_TYPE_FROM_UE_COMBINED_EPS_IMSI_DETACH: d_trace(5, " Combined EPS/IMSI Detach\n"); default: /* all other values */ break; } if (detach_request->detach_type.switch_off) d_trace(5, " Switch-Off\n"); return CORE_OK; } status_t emm_handle_service_request( mme_ue_t *mme_ue, nas_service_request_t *service_request) { nas_ksi_and_sequence_number_t *ksi_and_sequence_number = &service_request->ksi_and_sequence_number; d_assert(mme_ue, return CORE_ERROR, "Null param"); /* Set EPS Update Type */ mme_ue->nas_eps.type = MME_EPS_TYPE_SERVICE_REQUEST; mme_ue->nas_eps.ksi = ksi_and_sequence_number->ksi; d_trace(5, " NAS_EPS TYPE[%d] KSI[%d]\n", mme_ue->nas_eps.type, mme_ue->nas_eps.ksi); /* * ATTACH_REQUEST * Clear EBI generator * Clear Paging Timer and Message * Update KeNB * * TAU_REQUEST * Clear Paging Timer and Message * * SERVICE_REQUEST * Clear Paging Timer and Message * Update KeNB */ CLEAR_PAGING_INFO(mme_ue); if (SECURITY_CONTEXT_IS_VALID(mme_ue)) { mme_kdf_enb(mme_ue->kasme, mme_ue->ul_count.i32, mme_ue->kenb); mme_kdf_nh(mme_ue->kasme, mme_ue->kenb, mme_ue->nh); mme_ue->nhcc = 1; } d_trace(5, " GUTI[G:%d,C:%d,M_TMSI:0x%x] IMSI[%s]\n", mme_ue->guti.mme_gid, mme_ue->guti.mme_code, mme_ue->guti.m_tmsi, MME_UE_HAVE_IMSI(mme_ue) ? mme_ue->imsi_bcd : "Unknown"); return CORE_OK; } status_t emm_handle_tau_request( mme_ue_t *mme_ue, nas_tracking_area_update_request_t *tau_request) { int served_tai_index = 0; nas_eps_update_type_t *eps_update_type = &tau_request->eps_update_type; nas_eps_mobile_identity_t *eps_mobile_identity = &tau_request->old_guti; enb_ue_t *enb_ue = NULL; d_assert(mme_ue, return CORE_ERROR, "Null param"); enb_ue = mme_ue->enb_ue; d_assert(enb_ue, return CORE_ERROR, "Null param"); /* Set EPS Update Type */ memcpy(&mme_ue->nas_eps.update, eps_update_type, sizeof(nas_eps_update_type_t)); mme_ue->nas_eps.type = MME_EPS_TYPE_TAU_REQUEST; mme_ue->nas_eps.ksi = eps_update_type->nas_key_set_identifier; d_trace(5, " NAS_EPS TYPE[%d] KSI[%d] UPDATE[0x%x]\n", mme_ue->nas_eps.type, mme_ue->nas_eps.ksi, mme_ue->nas_eps.data); /* * ATTACH_REQUEST * Clear EBI generator * Clear Paging Timer and Message * Update KeNB * * TAU_REQUEST * Clear Paging Timer and Message * * SERVICE_REQUEST * Clear Paging Timer and Message * Update KeNB */ CLEAR_PAGING_INFO(mme_ue); if (BEARER_CONTEXT_IS_ACTIVE(mme_ue)) d_trace(5, " Bearer-Active\n"); else d_trace(5, " Bearer-Inactive\n"); if (mme_ue->nas_eps.update.active_flag) d_trace(5, " Active flag\n"); else d_trace(5, " No Active flag\n"); d_trace(5, " OLD TAI[PLMN_ID:0x%x,TAC:%d]\n", mme_ue->tai.plmn_id, mme_ue->tai.tac); d_trace(5, " OLD E_CGI[PLMN_ID:0x%x,CELL_ID:%d]\n", mme_ue->e_cgi.plmn_id, mme_ue->e_cgi.cell_id); d_trace(5, " TAI[PLMN_ID:0x%x,TAC:%d]\n", enb_ue->nas.tai.plmn_id, enb_ue->nas.tai.tac); d_trace(5, " E_CGI[PLMN_ID:0x%x,CELL_ID:%d]\n", enb_ue->nas.e_cgi.plmn_id, enb_ue->nas.e_cgi.cell_id); /* Copy TAI and ECGI from enb_ue */ memcpy(&mme_ue->tai, &enb_ue->nas.tai, sizeof(tai_t)); memcpy(&mme_ue->e_cgi, &enb_ue->nas.e_cgi, sizeof(e_cgi_t)); /* Check TAI */ served_tai_index = mme_find_served_tai(&mme_ue->tai); if (served_tai_index < 0) { /* Send TAU reject */ d_warn("Cannot find Served TAI[PLMN_ID:0x%x,TAC:%d]", mme_ue->tai.plmn_id, mme_ue->tai.tac); nas_send_tau_reject(mme_ue, EMM_CAUSE_TRACKING_AREA_NOT_ALLOWED); return CORE_ERROR; } d_trace(5, " SERVED_TAI_INDEX[%d]\n", served_tai_index); /* Store UE specific information */ if (tau_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_LAST_VISITED_REGISTERED_TAI_PRESENT) { nas_tracking_area_identity_t *last_visited_registered_tai = &tau_request->last_visited_registered_tai; memcpy(&mme_ue->visited_plmn_id, &last_visited_registered_tai->plmn_id, PLMN_ID_LEN); } else { memcpy(&mme_ue->visited_plmn_id, &mme_ue->tai.plmn_id, PLMN_ID_LEN); } if (tau_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_UE_NETWORK_CAPABILITY_PRESENT) { memcpy(&mme_ue->ue_network_capability, &tau_request->ue_network_capability, sizeof(tau_request->ue_network_capability)); } if (tau_request->presencemask & NAS_TRACKING_AREA_UPDATE_REQUEST_MS_NETWORK_CAPABILITY_PRESENT) { memcpy(&mme_ue->ms_network_capability, &tau_request->ms_network_capability, sizeof(tau_request->ms_network_capability)); } /* TODO: * 1) Consider if MME is changed or not. * 2) Consider if SGW is changed or not. */ switch(eps_mobile_identity->imsi.type) { case NAS_EPS_MOBILE_IDENTITY_GUTI: { nas_eps_mobile_identity_guti_t *nas_guti = NULL; nas_guti = &eps_mobile_identity->guti; guti_t guti; guti.plmn_id = nas_guti->plmn_id; guti.mme_gid = nas_guti->mme_gid; guti.mme_code = nas_guti->mme_code; guti.m_tmsi = nas_guti->m_tmsi; d_trace(5, " GUTI[G:%d,C:%d,M_TMSI:0x%x] IMSI:[%s]\n", guti.mme_gid, guti.mme_code, guti.m_tmsi, MME_UE_HAVE_IMSI(mme_ue) ? mme_ue->imsi_bcd : "Unknown"); break; } default: { d_warn("Not implemented[%d]", eps_mobile_identity->imsi.type); return CORE_OK; } } return CORE_OK; } nextepc-0.3.10/src/mme/emm_handler.h000066400000000000000000000016671333553357400172570ustar00rootroot00000000000000#ifndef __EMM_HANDLER_H__ #define __EMM_HANDLER_H__ #include "nas/nas_message.h" #include "mme_context.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(status_t) emm_handle_attach_request( mme_ue_t *mme_ue, nas_attach_request_t *attach_request); CORE_DECLARE(status_t) emm_handle_attach_complete( mme_ue_t *mme_ue, nas_attach_complete_t *attach_complete); CORE_DECLARE(status_t) emm_handle_identity_response( mme_ue_t *mme_ue, nas_identity_response_t *identity_response); CORE_DECLARE(status_t) emm_handle_detach_request( mme_ue_t *mme_ue, nas_detach_request_from_ue_t *detach_request); CORE_DECLARE(status_t) emm_handle_service_request( mme_ue_t *mme_ue, nas_service_request_t *service_request); CORE_DECLARE(status_t) emm_handle_tau_request( mme_ue_t *mme_ue, nas_tracking_area_update_request_t *tau_request); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __EMM_HANDLER_H__ */ nextepc-0.3.10/src/mme/emm_sm.c000066400000000000000000000661141333553357400162520ustar00rootroot00000000000000#define TRACE_MODULE _emm_sm #include "core_debug.h" #include "nas/nas_message.h" #include "fd/fd_lib.h" #include "fd/s6a/s6a_message.h" #include "mme_event.h" #include "mme_kdf.h" #include "s1ap_handler.h" #include "mme_fd_path.h" #include "emm_handler.h" #include "emm_build.h" #include "esm_handler.h" #include "nas_path.h" #include "s1ap_path.h" #include "mme_gtp_path.h" #include "mme_path.h" #include "mme_sm.h" void emm_state_initial(fsm_t *s, event_t *e) { d_assert(s, return, "Null param"); mme_sm_trace(3, e); FSM_TRAN(s, &emm_state_de_registered); } void emm_state_final(fsm_t *s, event_t *e) { d_assert(s, return, "Null param"); mme_sm_trace(3, e); } static void common_register_state(fsm_t *s, event_t *e); void emm_state_de_registered(fsm_t *s, event_t *e) { d_assert(s, return, "Null param"); d_assert(e, return, "Null param"); mme_sm_trace(3, e); common_register_state(s, e); } void emm_state_registered(fsm_t *s, event_t *e) { d_assert(s, return, "Null param"); d_assert(e, return, "Null param"); mme_sm_trace(3, e); common_register_state(s, e); } static void common_register_state(fsm_t *s, event_t *e) { status_t rv; mme_ue_t *mme_ue = NULL; enb_ue_t *enb_ue = NULL; mme_ue = mme_ue_find(event_get_param1(e)); d_assert(mme_ue, return, "Null param"); switch (event_get(e)) { case FSM_ENTRY_SIG: { return; } case FSM_EXIT_SIG: { return; } case MME_EVT_EMM_MESSAGE: { nas_message_t *message = (nas_message_t *)event_get_param5(e); d_assert(message, return, "Null param"); enb_ue = mme_ue->enb_ue; d_assert(enb_ue, return, "Null param"); if (message->emm.h.security_header_type == NAS_SECURITY_HEADER_FOR_SERVICE_REQUEST_MESSAGE) { d_trace(3, "[EMM] Service request\n"); rv = emm_handle_service_request( mme_ue, &message->emm.service_request); if (rv != CORE_OK) { d_error("emm_handle_service_request() failed"); FSM_TRAN(s, emm_state_exception); return; } if (!MME_UE_HAVE_IMSI(mme_ue)) { d_warn("[EMM] Service request : Unknown UE"); rv = nas_send_service_reject(mme_ue, EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK); d_assert(rv == CORE_OK,, "nas_send_service_reject() failed"); FSM_TRAN(s, &emm_state_exception); return; } if (!SECURITY_CONTEXT_IS_VALID(mme_ue)) { d_warn("No Security Context : IMSI[%s]", mme_ue->imsi_bcd); rv = nas_send_service_reject(mme_ue, EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK); d_assert(rv == CORE_OK,, "nas_send_service_reject() failed"); rv = s1ap_send_ue_context_release_command(enb_ue, S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release, S1AP_UE_CTX_REL_S1_NORMAL_RELEASE, 0); d_assert(rv == CORE_OK,, "s1ap_send_ue_context_release_command() failed"); return; } rv = s1ap_send_initial_context_setup_request(mme_ue); d_assert(rv == CORE_OK, return, "s1ap_send_initial_context_setup_request() failed"); return; } switch(message->emm.h.message_type) { case NAS_IDENTITY_RESPONSE: { d_trace(3, "[EMM] Identity response\n"); rv = emm_handle_identity_response(mme_ue, &message->emm.identity_response); if (rv != CORE_OK) { d_error("emm_handle_identity_response() failed"); FSM_TRAN(s, emm_state_exception); return; } if (!MME_UE_HAVE_IMSI(mme_ue)) { d_error("No IMSI"); FSM_TRAN(s, emm_state_exception); return; } d_trace(5, " IMSI[%s]\n", mme_ue->imsi_bcd); break; } case NAS_ATTACH_REQUEST: { d_trace(3, "[EMM] Attach request\n", mme_ue->imsi_bcd); rv = emm_handle_attach_request( mme_ue, &message->emm.attach_request); if (rv != CORE_OK) { d_error("emm_handle_attach_request() failed"); FSM_TRAN(s, emm_state_exception); return; } break; } case NAS_TRACKING_AREA_UPDATE_REQUEST: { d_trace(3, "[EMM] Tracking area update request\n"); rv = emm_handle_tau_request( mme_ue, &message->emm.tracking_area_update_request); if (rv != CORE_OK) { d_error("emm_handle_tau_request() failed"); FSM_TRAN(s, emm_state_exception); return; } if (!MME_UE_HAVE_IMSI(mme_ue)) { d_warn("[EMM] TAU request : Unknown UE"); rv = nas_send_tau_reject(mme_ue, EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK); d_assert(rv == CORE_OK,, "nas_send_tau_reject() failed"); FSM_TRAN(s, &emm_state_exception); return; } break; } case NAS_TRACKING_AREA_UPDATE_COMPLETE: { d_trace(3, "[EMM] Tracking area update complete\n"); d_trace(5, " IMSI[%s]\n", mme_ue->imsi_bcd); return; } case NAS_EMM_STATUS: { d_warn("[EMM] EMM STATUS : IMSI[%s] Cause[%d]", mme_ue->imsi_bcd, message->emm.emm_status.emm_cause); FSM_TRAN(s, &emm_state_exception); return; } case NAS_DETACH_REQUEST: { d_trace(3, "[EMM] Detach request\n"); d_trace(5, " IMSI[%s]\n", mme_ue->imsi_bcd); rv = emm_handle_detach_request( mme_ue, &message->emm.detach_request_from_ue); if (rv != CORE_OK) { d_error("emm_handle_attach_request() failed"); FSM_TRAN(s, emm_state_exception); return; } rv = mme_send_delete_session_or_detach(mme_ue); d_assert(rv == CORE_OK,, "mme_send_delete_session_or_detach() failed"); FSM_TRAN(s, &emm_state_de_registered); return; } default: { d_warn("Unknown message[%d]", message->emm.h.message_type); return; } } break; } case MME_EVT_EMM_T3413: { if (mme_ue->max_paging_retry >= MAX_NUM_OF_PAGING) { /* Paging failed */ d_warn("[EMM] Paging to IMSI[%s] failed. Stop paging", mme_ue->imsi_bcd); if (mme_ue->last_paging_msg) { pkbuf_free(mme_ue->last_paging_msg); mme_ue->last_paging_msg = NULL; } } else { mme_ue->max_paging_retry++; s1ap_handle_paging(mme_ue); /* Start T3413 */ tm_start(mme_ue->t3413); } return; } default: { d_error("Unknown event[%s]", mme_event_get_name(e)); return; } } if (!MME_UE_HAVE_IMSI(mme_ue)) { rv = nas_send_identity_request(mme_ue); d_assert(rv == CORE_OK, return, "nas_send_identity_request() failed"); return; } enb_ue = mme_ue->enb_ue; d_assert(enb_ue, return, "Null param"); switch(mme_ue->nas_eps.type) { case MME_EPS_TYPE_ATTACH_REQUEST: { if (SECURITY_CONTEXT_IS_VALID(mme_ue)) { rv = nas_send_emm_to_esm(mme_ue, &mme_ue->pdn_connectivity_request); d_assert(rv == CORE_OK,, "nas_send_emm_to_esm() failed"); FSM_TRAN(s, &emm_state_initial_context_setup); } else { if (SESSION_CONTEXT_IS_AVAILABLE(mme_ue)) { rv = mme_gtp_send_delete_all_sessions(mme_ue); d_assert(rv == CORE_OK,, "mme_gtp_send_delete_all_sessions() failed"); } else { mme_s6a_send_air(mme_ue, NULL); } FSM_TRAN(s, &emm_state_authentication); } break; } case MME_EPS_TYPE_TAU_REQUEST: { S1AP_ProcedureCode_t procedureCode = (S1AP_ProcedureCode_t)event_get_param2(e); if (!SESSION_CONTEXT_IS_AVAILABLE(mme_ue)) { d_warn("No PDN Connection : UE[%s]", mme_ue->imsi_bcd); rv = nas_send_tau_reject(mme_ue, EMM_CAUSE_UE_IDENTITY_CANNOT_BE_DERIVED_BY_THE_NETWORK); d_assert(rv == CORE_OK,, "nas_send_tau_reject() failed"); FSM_TRAN(s, emm_state_exception); break; } if (!SECURITY_CONTEXT_IS_VALID(mme_ue)) { mme_s6a_send_air(mme_ue, NULL); FSM_TRAN(&mme_ue->sm, &emm_state_authentication); break; } if (procedureCode == S1AP_ProcedureCode_id_initialUEMessage) { d_trace(5, " Iniital UE Message\n"); if (mme_ue->nas_eps.update.active_flag) { rv = nas_send_tau_accept(mme_ue, S1AP_ProcedureCode_id_InitialContextSetup); d_assert(rv == CORE_OK,, "nas_send_tau_accept() failed"); } else { rv = nas_send_tau_accept(mme_ue, S1AP_ProcedureCode_id_downlinkNASTransport); d_assert(rv == CORE_OK,, "nas_send_tau_accept() failed"); rv = mme_send_release_access_bearer_or_ue_context_release( mme_ue, enb_ue); d_assert(rv == CORE_OK,, "mme_send_release_access_bearer" "_or_ue_context_release() failed"); } } else if (procedureCode == S1AP_ProcedureCode_id_uplinkNASTransport) { d_trace(5, " Uplink NAS Transport\n"); rv = nas_send_tau_accept(mme_ue, S1AP_ProcedureCode_id_downlinkNASTransport); d_assert(rv == CORE_OK,, "nas_send_tau_accept() failed"); } else d_assert(0,, "Invalid Procedure Code[%d]", procedureCode); break; } default: d_assert(0,, "Invalid NAS-EPS[%d]", mme_ue->nas_eps.type); break; } } void emm_state_authentication(fsm_t *s, event_t *e) { status_t rv; mme_ue_t *mme_ue = NULL; d_assert(s, return, "Null param"); d_assert(e, return, "Null param"); mme_sm_trace(3, e); mme_ue = mme_ue_find(event_get_param1(e)); d_assert(mme_ue, return, "Null param"); switch (event_get(e)) { case FSM_ENTRY_SIG: { break; } case FSM_EXIT_SIG: { break; } case MME_EVT_EMM_MESSAGE: { nas_message_t *message = (nas_message_t *)event_get_param5(e); d_assert(message, break, "Null param"); switch(message->emm.h.message_type) { case NAS_AUTHENTICATION_RESPONSE: { nas_authentication_response_t *authentication_response = &message->emm.authentication_response; nas_authentication_response_parameter_t *authentication_response_parameter = &authentication_response-> authentication_response_parameter; d_trace(3, "[EMM] Authentication response\n"); d_trace(5, " IMSI[%s]\n", mme_ue->imsi_bcd); if (authentication_response_parameter->length != mme_ue->xres_len || memcmp(authentication_response_parameter->res, mme_ue->xres, mme_ue->xres_len) != 0) { rv = nas_send_authentication_reject(mme_ue); d_assert(rv == CORE_OK,, "nas send error"); FSM_TRAN(&mme_ue->sm, &emm_state_exception); } else { FSM_TRAN(&mme_ue->sm, &emm_state_security_mode); } break; } case NAS_AUTHENTICATION_FAILURE: { nas_authentication_failure_t *authentication_failure = &message->emm.authentication_failure; nas_authentication_failure_parameter_t *authentication_failure_parameter = &authentication_failure-> authentication_failure_parameter; d_trace(3, "[EMM] Authentication failure\n"); d_trace(5, " IMSI[%s] EMM_CAUSE[%d]\n", mme_ue->imsi_bcd, authentication_failure->emm_cause); switch(authentication_failure->emm_cause) { case EMM_CAUSE_MAC_FAILURE: d_warn("Authentication failure(MAC failure)"); break; case EMM_CAUSE_NON_EPS_AUTHENTICATION_UNACCEPTABLE: d_error("Authentication failure" "(Non-EPS authentication unacceptable)"); break; case EMM_CAUSE_SYNCH_FAILURE: d_warn("Authentication failure(Synch failure)"); mme_s6a_send_air(mme_ue, authentication_failure_parameter); return; default: d_error("Unknown EMM_CAUSE{%d] in Authentication" " failure", authentication_failure->emm_cause); break; } rv = nas_send_authentication_reject(mme_ue); d_assert(rv == CORE_OK,, "nas send error"); FSM_TRAN(&mme_ue->sm, &emm_state_exception); break; } case NAS_ATTACH_REQUEST: { d_warn("[EMM] Attach request", mme_ue->imsi_bcd); d_trace(3, "[EMM] Attach request\n", mme_ue->imsi_bcd); rv = emm_handle_attach_request( mme_ue, &message->emm.attach_request); if (rv != CORE_OK) { d_error("emm_handle_attach_request() failed"); FSM_TRAN(s, emm_state_exception); return; } mme_s6a_send_air(mme_ue, NULL); FSM_TRAN(s, &emm_state_authentication); break; } case NAS_EMM_STATUS: { d_warn("[EMM] EMM STATUS : IMSI[%s] Cause[%d]", mme_ue->imsi_bcd, message->emm.emm_status.emm_cause); FSM_TRAN(s, &emm_state_exception); break; } case NAS_DETACH_REQUEST: { d_trace(3, "[EMM] Detach request\n"); d_trace(5, " IMSI[%s]\n", mme_ue->imsi_bcd); rv = emm_handle_detach_request( mme_ue, &message->emm.detach_request_from_ue); if (rv != CORE_OK) { d_error("emm_handle_attach_request() failed"); FSM_TRAN(s, emm_state_exception); return; } rv = mme_send_delete_session_or_detach(mme_ue); d_assert(rv == CORE_OK,, "mme_send_delete_session_or_detach() failed"); FSM_TRAN(s, &emm_state_de_registered); break; } default: { d_warn("Unknown message[%d]", message->emm.h.message_type); break; } } break; } default: { d_error("Unknown event[%s]", mme_event_get_name(e)); break; } } } void emm_state_security_mode(fsm_t *s, event_t *e) { status_t rv; mme_ue_t *mme_ue = NULL; d_assert(s, return, "Null param"); d_assert(e, return, "Null param"); mme_sm_trace(3, e); mme_ue = mme_ue_find(event_get_param1(e)); d_assert(mme_ue, return, "Null param"); switch (event_get(e)) { case FSM_ENTRY_SIG: { pkbuf_t *emmbuf = NULL; rv = emm_build_security_mode_command(&emmbuf, mme_ue); d_assert(rv == CORE_OK && emmbuf, break, "emm build error"); rv = nas_send_to_downlink_nas_transport(mme_ue, emmbuf); d_assert(rv == CORE_OK && emmbuf, break, "emm send error"); break; } case FSM_EXIT_SIG: { break; } case MME_EVT_EMM_MESSAGE: { nas_message_t *message = (nas_message_t *)event_get_param5(e); d_assert(message, break, "Null param"); switch(message->emm.h.message_type) { case NAS_SECURITY_MODE_COMPLETE: { d_trace(3, "[EMM] Security mode complete\n"); d_trace(5, " IMSI[%s]\n", mme_ue->imsi_bcd); /* Update Kenb */ if (SECURITY_CONTEXT_IS_VALID(mme_ue)) { mme_kdf_enb(mme_ue->kasme, mme_ue->ul_count.i32, mme_ue->kenb); mme_kdf_nh(mme_ue->kasme, mme_ue->kenb, mme_ue->nh); mme_ue->nhcc = 1; } mme_s6a_send_ulr(mme_ue); if (mme_ue->nas_eps.type == MME_EPS_TYPE_ATTACH_REQUEST) { FSM_TRAN(s, &emm_state_initial_context_setup); } else if (mme_ue->nas_eps.type == MME_EPS_TYPE_SERVICE_REQUEST || mme_ue->nas_eps.type == MME_EPS_TYPE_TAU_REQUEST) { FSM_TRAN(s, &emm_state_registered); } else d_assert(0,, "Invalid NAS_EPS[%d]", mme_ue->nas_eps.type); break; } case NAS_SECURITY_MODE_REJECT: { d_warn("[EMM] Security mode reject : IMSI[%s] Cause[%d]", mme_ue->imsi_bcd, message->emm.security_mode_reject.emm_cause); FSM_TRAN(s, &emm_state_exception); break; } case NAS_ATTACH_REQUEST: { d_warn("[EMM] Attach request", mme_ue->imsi_bcd); d_trace(3, "[EMM] Attach request\n", mme_ue->imsi_bcd); rv = emm_handle_attach_request( mme_ue, &message->emm.attach_request); if (rv != CORE_OK) { d_error("emm_handle_attach_request() failed"); FSM_TRAN(s, emm_state_exception); return; } mme_s6a_send_air(mme_ue, NULL); FSM_TRAN(s, &emm_state_authentication); break; } case NAS_EMM_STATUS: { d_warn("[EMM] EMM STATUS : IMSI[%s] Cause[%d]", mme_ue->imsi_bcd, message->emm.emm_status.emm_cause); FSM_TRAN(s, &emm_state_exception); break; } case NAS_DETACH_REQUEST: { d_trace(3, "[EMM] Detach request\n"); d_trace(5, " IMSI[%s]\n", mme_ue->imsi_bcd); rv = emm_handle_detach_request( mme_ue, &message->emm.detach_request_from_ue); if (rv != CORE_OK) { d_error("emm_handle_attach_request() failed"); FSM_TRAN(s, emm_state_exception); return; } rv = mme_send_delete_session_or_detach(mme_ue); d_assert(rv == CORE_OK,, "mme_send_delete_session_or_detach() failed"); FSM_TRAN(s, &emm_state_de_registered); break; } default: { d_warn("Unknown message[%d]", message->emm.h.message_type); break; } } break; } default: { d_error("Unknown event[%s]", mme_event_get_name(e)); break; } } } void emm_state_initial_context_setup(fsm_t *s, event_t *e) { status_t rv; mme_ue_t *mme_ue = NULL; d_assert(s, return, "Null param"); d_assert(e, return, "Null param"); mme_sm_trace(3, e); mme_ue = mme_ue_find(event_get_param1(e)); d_assert(mme_ue, return, "Null param"); switch (event_get(e)) { case FSM_ENTRY_SIG: { break; } case FSM_EXIT_SIG: { break; } case MME_EVT_EMM_MESSAGE: { nas_message_t *message = (nas_message_t *)event_get_param5(e); d_assert(message, break, "Null param"); switch(message->emm.h.message_type) { case NAS_ATTACH_COMPLETE: { d_trace(3, "[EMM] Attach complete\n"); d_trace(5, " IMSI[%s]\n", mme_ue->imsi_bcd); rv = emm_handle_attach_complete( mme_ue, &message->emm.attach_complete); if (rv != CORE_OK) { d_error("emm_handle_attach_complete() failed " "in emm_state_initial_context_setup"); FSM_TRAN(s, emm_state_exception); break; } FSM_TRAN(s, &emm_state_registered); break; } case NAS_ATTACH_REQUEST: { d_warn("[EMM] Attach request", mme_ue->imsi_bcd); d_trace(3, "[EMM] Attach request\n", mme_ue->imsi_bcd); rv = emm_handle_attach_request( mme_ue, &message->emm.attach_request); if (rv != CORE_OK) { d_error("emm_handle_attach_request() failed"); FSM_TRAN(s, emm_state_exception); return; } rv = mme_gtp_send_delete_all_sessions(mme_ue); d_assert(rv == CORE_OK,, "mme_gtp_send_delete_all_sessions() failed"); FSM_TRAN(s, &emm_state_authentication); break; } case NAS_EMM_STATUS: { d_warn("[EMM] EMM STATUS : IMSI[%s] Cause[%d]", mme_ue->imsi_bcd, message->emm.emm_status.emm_cause); FSM_TRAN(s, &emm_state_exception); break; } case NAS_DETACH_REQUEST: { d_trace(3, "[EMM] Detach request\n"); d_trace(5, " IMSI[%s]\n", mme_ue->imsi_bcd); rv = emm_handle_detach_request( mme_ue, &message->emm.detach_request_from_ue); if (rv != CORE_OK) { d_error("emm_handle_attach_request() failed"); FSM_TRAN(s, emm_state_exception); return; } rv = mme_send_delete_session_or_detach(mme_ue); d_assert(rv == CORE_OK,, "mme_send_delete_session_or_detach() failed"); FSM_TRAN(s, &emm_state_de_registered); break; } default: { d_warn("Unknown message[%d]", message->emm.h.message_type); break; } } break; } default: { d_error("Unknown event[%s]", mme_event_get_name(e)); break; } } } void emm_state_exception(fsm_t *s, event_t *e) { mme_sm_trace(3, e); switch (event_get(e)) { case FSM_ENTRY_SIG: { break; } case FSM_EXIT_SIG: { break; } default: { d_error("Unknown event[%s]", mme_event_get_name(e)); break; } } } nextepc-0.3.10/src/mme/esm_build.c000066400000000000000000000322361333553357400167360ustar00rootroot00000000000000#define TRACE_MODULE _esm_build #include "core_debug.h" #include "core_lib.h" #include "nas/nas_message.h" #include "nas_security.h" #include "esm_build.h" #include "mme_sm.h" status_t esm_build_pdn_connectivity_reject( pkbuf_t **pkbuf, mme_sess_t *sess, nas_esm_cause_t esm_cause) { mme_ue_t *mme_ue = NULL; nas_message_t message; nas_pdn_connectivity_reject_t *pdn_connectivity_reject = &message.esm.pdn_connectivity_reject; d_assert(sess, return CORE_ERROR, "Null param"); mme_ue = sess->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); d_trace(3, "[ESM] PDN connectivity reject\n"); d_trace(5, " IMSI[%s] PTI[%d] Cause[%d]\n", mme_ue->imsi_bcd, sess->pti, esm_cause); memset(&message, 0, sizeof(message)); if (FSM_CHECK(&mme_ue->sm, emm_state_registered)) { message.h.security_header_type = NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHERED; message.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; } message.esm.h.eps_bearer_identity = 0; message.esm.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_ESM; message.esm.h.procedure_transaction_identity = sess->pti; message.esm.h.message_type = NAS_PDN_CONNECTIVITY_REJECT; pdn_connectivity_reject->esm_cause = esm_cause; if (FSM_CHECK(&mme_ue->sm, emm_state_registered)) { d_assert(nas_security_encode(pkbuf, mme_ue, &message) == CORE_OK && *pkbuf, return CORE_ERROR,); } else { d_assert(nas_plain_encode(pkbuf, &message) == CORE_OK && *pkbuf, return CORE_ERROR,); } return CORE_OK; } status_t esm_build_information_request(pkbuf_t **pkbuf, mme_bearer_t *bearer) { nas_message_t message; mme_ue_t *mme_ue = NULL; mme_sess_t *sess = NULL; d_assert(bearer, return CORE_ERROR, "Null param"); sess = bearer->sess; d_assert(sess, return CORE_ERROR, "Null param"); mme_ue = bearer->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); d_trace(3, "[ESM] ESM information request\n"); d_trace(5, " IMSI[%s] PTI[%d] EBI[%d]\n", mme_ue->imsi_bcd, sess->pti, bearer->ebi); memset(&message, 0, sizeof(message)); message.h.security_header_type = NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHERED; message.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; message.esm.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_ESM; message.esm.h.procedure_transaction_identity = sess->pti; message.esm.h.message_type = NAS_ESM_INFORMATION_REQUEST; d_assert(nas_security_encode(pkbuf, mme_ue, &message) == CORE_OK && *pkbuf, return CORE_ERROR,); return CORE_OK; } status_t esm_build_activate_default_bearer_context_request( pkbuf_t **pkbuf, mme_sess_t *sess) { nas_message_t message; nas_activate_default_eps_bearer_context_request_t *activate_default_eps_bearer_context_request = &message.esm.activate_default_eps_bearer_context_request; nas_eps_quality_of_service_t *eps_qos = &activate_default_eps_bearer_context_request->eps_qos; nas_access_point_name_t *access_point_name = &activate_default_eps_bearer_context_request->access_point_name; nas_pdn_address_t *pdn_address = &activate_default_eps_bearer_context_request->pdn_address; nas_apn_aggregate_maximum_bit_rate_t *apn_ambr = &activate_default_eps_bearer_context_request->apn_ambr; nas_protocol_configuration_options_t *protocol_configuration_options = &activate_default_eps_bearer_context_request ->protocol_configuration_options; mme_ue_t *mme_ue = NULL; mme_bearer_t *bearer = NULL; pdn_t *pdn = NULL; d_assert(sess, return CORE_ERROR, "Null param"); mme_ue = sess->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); pdn = sess->pdn; d_assert(pdn, return CORE_ERROR, "Null param"); bearer = mme_default_bearer_in_sess(sess); d_assert(bearer, return CORE_ERROR, "Null param"); d_assert(mme_bearer_next(bearer) == NULL, return CORE_ERROR, "there is dedicated bearer"); d_trace(3, "[ESM] Activate default bearer context request\n"); d_trace(5, " IMSI[%s] PTI[%d] EBI[%d]\n", mme_ue->imsi_bcd, sess->pti, bearer->ebi); memset(&message, 0, sizeof(message)); if (FSM_CHECK(&mme_ue->sm, emm_state_registered)) { message.h.security_header_type = NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHERED; message.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; } message.esm.h.eps_bearer_identity = bearer->ebi; message.esm.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_ESM; message.esm.h.procedure_transaction_identity = sess->pti; message.esm.h.message_type = NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST; memcpy(&bearer->qos, &pdn->qos, sizeof(qos_t)); eps_qos_build(eps_qos, bearer->qos.qci, bearer->qos.mbr.downlink, bearer->qos.mbr.uplink, bearer->qos.gbr.downlink, bearer->qos.gbr.uplink); access_point_name->length = strlen(pdn->apn); core_cpystrn(access_point_name->apn, pdn->apn, c_min(access_point_name->length, MAX_APN_LEN) + 1); d_trace(5, " APN[%s]\n", pdn->apn); pdn_address->pdn_type = pdn->paa.pdn_type; if (pdn_address->pdn_type == GTP_PDN_TYPE_IPV4) { pdn_address->addr = pdn->paa.addr; pdn_address->length = NAS_PDN_ADDRESS_IPV4_LEN; d_trace(5, " IPv4\n"); } else if (pdn_address->pdn_type == GTP_PDN_TYPE_IPV6) { memcpy(pdn_address->addr6, pdn->paa.addr6+(IPV6_LEN>>1), IPV6_LEN>>1); pdn_address->length = NAS_PDN_ADDRESS_IPV6_LEN; d_trace(5, " IPv6\n"); } else if (pdn_address->pdn_type == GTP_PDN_TYPE_IPV4V6) { pdn_address->both.addr = pdn->paa.both.addr; memcpy(pdn_address->both.addr6, pdn->paa.both.addr6+(IPV6_LEN>>1), IPV6_LEN>>1); pdn_address->length = NAS_PDN_ADDRESS_IPV4V6_LEN; d_trace(5, " IPv4v6\n"); } else d_assert(0, return CORE_ERROR, "Invalid PDN_TYPE(%d)", pdn->paa.pdn_type); if (pdn->ambr.downlink || pdn->ambr.uplink) { activate_default_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_APN_AMBR_PRESENT; apn_ambr_build(apn_ambr, pdn->ambr.downlink, pdn->ambr.uplink); } if (sess->pgw_pco.presence && sess->pgw_pco.len && sess->pgw_pco.data) { activate_default_eps_bearer_context_request->presencemask |= NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT; protocol_configuration_options->length = sess->pgw_pco.len; memcpy(protocol_configuration_options->buffer, sess->pgw_pco.data, protocol_configuration_options->length); } if (FSM_CHECK(&mme_ue->sm, emm_state_registered)) { d_assert(nas_security_encode(pkbuf, mme_ue, &message) == CORE_OK && *pkbuf, return CORE_ERROR,); } else { d_assert(nas_plain_encode(pkbuf, &message) == CORE_OK && *pkbuf, return CORE_ERROR,); } return CORE_OK; } status_t esm_build_activate_dedicated_bearer_context_request( pkbuf_t **pkbuf, mme_bearer_t *bearer) { mme_ue_t *mme_ue = NULL; mme_bearer_t *linked_bearer = NULL; nas_message_t message; nas_activate_dedicated_eps_bearer_context_request_t *activate_dedicated_eps_bearer_context_request = &message.esm.activate_dedicated_eps_bearer_context_request; nas_linked_eps_bearer_identity_t *linked_ebi = &activate_dedicated_eps_bearer_context_request-> linked_eps_bearer_identity; nas_eps_quality_of_service_t *eps_qos = &activate_dedicated_eps_bearer_context_request->eps_qos; nas_traffic_flow_template_t *tft = &activate_dedicated_eps_bearer_context_request->tft; d_assert(bearer, return CORE_ERROR, "Null param"); mme_ue = bearer->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); linked_bearer = mme_linked_bearer(bearer); d_assert(linked_bearer, return CORE_ERROR, "Null param"); d_trace(3, "[ESM] Activate dedicated bearer context request\n"); d_trace(5, " IMSI[%s] EBI[%d] Linked-EBI[%d]\n", mme_ue->imsi_bcd, bearer->ebi, linked_bearer->ebi); memset(&message, 0, sizeof(message)); message.h.security_header_type = NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHERED; message.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; message.esm.h.eps_bearer_identity = bearer->ebi; message.esm.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_ESM; message.esm.h.procedure_transaction_identity = 0; message.esm.h.message_type = NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_REQUEST; linked_ebi->eps_bearer_identity = linked_bearer->ebi; eps_qos_build(eps_qos, bearer->qos.qci, bearer->qos.mbr.downlink, bearer->qos.mbr.uplink, bearer->qos.gbr.downlink, bearer->qos.gbr.uplink); tft->length = bearer->tft.len; d_assert(tft->length, return CORE_ERROR, "No TFT Len"); d_assert(bearer->tft.data, return CORE_ERROR, "Null param"); memcpy(tft->buffer, bearer->tft.data, tft->length); d_assert(nas_security_encode(pkbuf, mme_ue, &message) == CORE_OK && *pkbuf, return CORE_ERROR,); return CORE_OK; } status_t esm_build_modify_bearer_context_request( pkbuf_t **pkbuf, mme_bearer_t *bearer, int qos_presence, int tft_presence) { mme_ue_t *mme_ue = NULL; mme_sess_t *sess = NULL; nas_message_t message; nas_modify_eps_bearer_context_request_t *modify_eps_bearer_context_request = &message.esm.modify_eps_bearer_context_request; nas_eps_quality_of_service_t *new_eps_qos = &modify_eps_bearer_context_request->new_eps_qos; nas_traffic_flow_template_t *tft = &modify_eps_bearer_context_request->tft; d_assert(bearer, return CORE_ERROR, "Null param"); sess = bearer->sess; d_assert(sess, return CORE_ERROR, "Null param"); mme_ue = bearer->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); d_trace(3, "[ESM] Modify bearer context request\n"); d_trace(5, " IMSI[%s] PTI[%d] EBI[%d]\n", mme_ue->imsi_bcd, sess->pti, bearer->ebi); memset(&message, 0, sizeof(message)); message.h.security_header_type = NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHERED; message.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; message.esm.h.eps_bearer_identity = bearer->ebi; message.esm.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_ESM; message.esm.h.procedure_transaction_identity = sess->pti; message.esm.h.message_type = NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST; if (qos_presence == 1) { modify_eps_bearer_context_request->presencemask |= NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_NEW_EPS_QOS_PRESENT; eps_qos_build(new_eps_qos, bearer->qos.qci, bearer->qos.mbr.downlink, bearer->qos.mbr.uplink, bearer->qos.gbr.downlink, bearer->qos.gbr.uplink); } if (tft_presence == 1) { modify_eps_bearer_context_request->presencemask |= NAS_MODIFY_EPS_BEARER_CONTEXT_REQUEST_TFT_PRESENT; tft->length = bearer->tft.len; d_assert(tft->length, return CORE_ERROR, "No TFT Len"); d_assert(bearer->tft.data, return CORE_ERROR, "Null param"); memcpy(tft->buffer, bearer->tft.data, tft->length); } d_assert(nas_security_encode(pkbuf, mme_ue, &message) == CORE_OK && *pkbuf, return CORE_ERROR,); return CORE_OK; } status_t esm_build_deactivate_bearer_context_request( pkbuf_t **pkbuf, mme_bearer_t *bearer, nas_esm_cause_t esm_cause) { mme_ue_t *mme_ue = NULL; mme_sess_t *sess = NULL; nas_message_t message; nas_deactivate_eps_bearer_context_request_t *deactivate_eps_bearer_context_request = &message.esm.deactivate_eps_bearer_context_request; d_assert(bearer, return CORE_ERROR, "Null param"); sess = bearer->sess; d_assert(sess, return CORE_ERROR, "Null param"); mme_ue = bearer->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); d_trace(3, "[ESM] Deactivate bearer context request\n"); d_trace(5, " IMSI[%s] PTI[%d] EBI[%d]\n", mme_ue->imsi_bcd, sess->pti, bearer->ebi); d_trace(5, " Cause[%d]\n", esm_cause); memset(&message, 0, sizeof(message)); message.h.security_header_type = NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHERED; message.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; message.esm.h.eps_bearer_identity = bearer->ebi; message.esm.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_ESM; message.esm.h.procedure_transaction_identity = sess->pti; message.esm.h.message_type = NAS_DEACTIVATE_EPS_BEARER_CONTEXT_REQUEST; deactivate_eps_bearer_context_request->esm_cause = esm_cause; d_assert(nas_security_encode(pkbuf, mme_ue, &message) == CORE_OK && *pkbuf, return CORE_ERROR,); return CORE_OK; } nextepc-0.3.10/src/mme/esm_build.h000066400000000000000000000020341333553357400167340ustar00rootroot00000000000000#ifndef __ESM_BUILD_H__ #define __ESM_BUILD_H__ #include "mme_context.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(status_t) esm_build_pdn_connectivity_reject(pkbuf_t **pkbuf, mme_sess_t *sess, nas_esm_cause_t esm_cause); CORE_DECLARE(status_t) esm_build_information_request(pkbuf_t **pkbuf, mme_bearer_t *bearer); CORE_DECLARE(status_t) esm_build_activate_default_bearer_context_request( pkbuf_t **pkbuf, mme_sess_t *sess); CORE_DECLARE(status_t) esm_build_activate_dedicated_bearer_context_request( pkbuf_t **pkbuf, mme_bearer_t *bearer); CORE_DECLARE(status_t) esm_build_modify_bearer_context_request( pkbuf_t **pkbuf, mme_bearer_t *bearer, int qos_presence, int tft_presence); CORE_DECLARE(status_t) esm_build_deactivate_bearer_context_request( pkbuf_t **pkbuf, mme_bearer_t *bearer, nas_esm_cause_t esm_cause); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ESM_BUILD_H__ */ nextepc-0.3.10/src/mme/esm_handler.c000066400000000000000000000113071333553357400172500ustar00rootroot00000000000000#define TRACE_MODULE _esm_handler #include "core_debug.h" #include "nas/nas_message.h" #include "mme_context.h" #include "nas_path.h" #include "mme_gtp_path.h" #include "esm_build.h" status_t esm_handle_pdn_connectivity_request(mme_bearer_t *bearer, nas_pdn_connectivity_request_t *pdn_connectivity_request) { status_t rv; mme_ue_t *mme_ue = NULL; mme_sess_t *sess = NULL; c_uint8_t security_protected_required = 0; d_assert(bearer, return CORE_ERROR,); sess = bearer->sess; d_assert(sess, return CORE_ERROR,); mme_ue = sess->mme_ue; d_assert(mme_ue, return CORE_ERROR,); d_assert(pdn_connectivity_request, return CORE_ERROR,); d_assert(MME_UE_HAVE_IMSI(mme_ue), return CORE_ERROR, "No IMSI in PDN_CPNNECTIVITY_REQUEST"); d_assert(SECURITY_CONTEXT_IS_VALID(mme_ue), return CORE_ERROR, "No Security Context in PDN_CPNNECTIVITY_REQUEST"); memcpy(&sess->request_type, &pdn_connectivity_request->request_type, sizeof(sess->request_type)); security_protected_required = 0; if (pdn_connectivity_request->presencemask & NAS_PDN_CONNECTIVITY_REQUEST_ESM_INFORMATION_TRANSFER_FLAG_PRESENT) { nas_esm_information_transfer_flag_t *esm_information_transfer_flag = &pdn_connectivity_request->esm_information_transfer_flag; security_protected_required = esm_information_transfer_flag->security_protected_required; d_trace(5, " EIT(ESM information transfer)[%d]\n", security_protected_required); } if (pdn_connectivity_request->presencemask & NAS_PDN_CONNECTIVITY_REQUEST_ACCESS_POINT_NAME_PRESENT) { sess->pdn = mme_pdn_find_by_apn(mme_ue, pdn_connectivity_request->access_point_name.apn); if (!sess->pdn) { /* Invalid APN */ rv = nas_send_pdn_connectivity_reject( sess, ESM_CAUSE_MISSING_OR_UNKNOWN_APN); d_assert(rv == CORE_OK,, "nas send failed"); return CORE_ERROR; } } if (pdn_connectivity_request->presencemask & NAS_PDN_CONNECTIVITY_REQUEST_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { nas_protocol_configuration_options_t *protocol_configuration_options = &pdn_connectivity_request->protocol_configuration_options; NAS_STORE_DATA(&sess->ue_pco, protocol_configuration_options); } if (security_protected_required) { rv = nas_send_esm_information_request(bearer); d_assert(rv == CORE_OK, return CORE_ERROR, "nas send failed"); return CORE_OK; } if (!sess->pdn) { /* Default APN */ sess->pdn = mme_default_pdn(mme_ue); } if (sess->pdn) { d_trace(5, " APN[%s]\n", sess->pdn->apn); rv = mme_gtp_send_create_session_request(sess); d_assert(rv == CORE_OK, return CORE_ERROR, "gtp send failed"); } else { rv = nas_send_pdn_connectivity_reject( sess, ESM_CAUSE_MISSING_OR_UNKNOWN_APN); d_assert(rv == CORE_OK,, "nas send failed"); return CORE_ERROR; } return CORE_OK; } status_t esm_handle_information_response(mme_sess_t *sess, nas_esm_information_response_t *esm_information_response) { status_t rv; mme_ue_t *mme_ue = NULL; d_assert(sess, return CORE_ERROR, "Null param"); mme_ue = sess->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); if (esm_information_response->presencemask & NAS_ESM_INFORMATION_RESPONSE_ACCESS_POINT_NAME_PRESENT) { sess->pdn = mme_pdn_find_by_apn(mme_ue, esm_information_response->access_point_name.apn); } if (esm_information_response->presencemask & NAS_ESM_INFORMATION_RESPONSE_PROTOCOL_CONFIGURATION_OPTIONS_PRESENT) { nas_protocol_configuration_options_t *protocol_configuration_options = &esm_information_response->protocol_configuration_options; NAS_STORE_DATA(&sess->ue_pco, protocol_configuration_options); } if (sess->pdn) { d_trace(5, " APN[%s]\n", sess->pdn->apn); if (SESSION_CONTEXT_IS_AVAILABLE(mme_ue)) { rv = nas_send_attach_accept(mme_ue); d_assert(rv == CORE_OK, return CORE_ERROR, "nas send failed"); } else { rv = mme_gtp_send_create_session_request(sess); d_assert(rv == CORE_OK, return CORE_ERROR, "gtp send failed"); } } else { rv = nas_send_pdn_connectivity_reject( sess, ESM_CAUSE_MISSING_OR_UNKNOWN_APN); d_assert(rv == CORE_OK,, "nas send failed"); return CORE_ERROR; } return CORE_OK; } nextepc-0.3.10/src/mme/esm_handler.h000066400000000000000000000010321333553357400172470ustar00rootroot00000000000000#ifndef __ESM_HANDLER_H__ #define __ESM_HANDLER_H__ #include "nas/nas_message.h" #include "mme_context.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(status_t) esm_handle_pdn_connectivity_request(mme_bearer_t *bearer, nas_pdn_connectivity_request_t *pdn_connectivity_request); CORE_DECLARE(status_t) esm_handle_information_response(mme_sess_t *sess, nas_esm_information_response_t *bearer_information_response); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __ESM_HANDLER_H__ */ nextepc-0.3.10/src/mme/esm_sm.c000066400000000000000000000267751333553357400162710ustar00rootroot00000000000000#define TRACE_MODULE _esm_sm #include "core_debug.h" #include "nas/nas_message.h" #include "mme_event.h" #include "mme_sm.h" #include "mme_fd_path.h" #include "emm_handler.h" #include "esm_build.h" #include "esm_handler.h" #include "mme_s11_handler.h" #include "nas_path.h" #include "mme_gtp_path.h" void esm_state_initial(fsm_t *s, event_t *e) { d_assert(s, return, "Null param"); mme_sm_trace(3, e); FSM_TRAN(s, &esm_state_inactive); } void esm_state_final(fsm_t *s, event_t *e) { d_assert(s, return, "Null param"); mme_sm_trace(3, e); } void esm_state_inactive(fsm_t *s, event_t *e) { status_t rv; mme_ue_t *mme_ue = NULL; mme_sess_t *sess = NULL; mme_bearer_t *bearer = NULL; d_assert(s, return, "Null param"); d_assert(e, return, "Null param"); mme_sm_trace(3, e); bearer = mme_bearer_find(event_get_param1(e)); d_assert(bearer, return, "Null param"); sess = bearer->sess; d_assert(sess, return, "Null param"); mme_ue = sess->mme_ue; d_assert(mme_ue, return, "Null param"); switch (event_get(e)) { case FSM_ENTRY_SIG: { break; } case FSM_EXIT_SIG: { break; } case MME_EVT_ESM_MESSAGE: { nas_message_t *message = (nas_message_t *)event_get_param3(e); d_assert(message, break, "Null param"); switch(message->esm.h.message_type) { case NAS_PDN_CONNECTIVITY_REQUEST: { d_trace(3, "[ESM] PDN Connectivity request\n"); d_trace(5, " IMSI[%s] PTI[%d] EBI[%d]\n", mme_ue->imsi_bcd, sess->pti, bearer->ebi); rv = esm_handle_pdn_connectivity_request( bearer, &message->esm.pdn_connectivity_request); if (rv != CORE_OK) { FSM_TRAN(s, esm_state_exception); break; } break; } case NAS_ESM_INFORMATION_RESPONSE: { d_trace(3, "[ESM] ESM information response\n"); d_trace(5, " IMSI[%s] PTI[%d] EBI[%d]\n", mme_ue->imsi_bcd, sess->pti, bearer->ebi); rv = esm_handle_information_response( sess, &message->esm.esm_information_response); if (rv != CORE_OK) { FSM_TRAN(s, esm_state_exception); break; } break; } case NAS_ACTIVATE_DEFAULT_EPS_BEARER_CONTEXT_ACCEPT: { d_trace(3, "[ESM] Activate default EPS bearer " "context accept\n"); d_trace(5, " IMSI[%s] PTI[%d] EBI[%d]\n", mme_ue->imsi_bcd, sess->pti, bearer->ebi); /* Check if Initial Context Setup Response or * E-RAB Setup Response is received */ if (MME_HAVE_ENB_S1U_PATH(bearer)) { rv = mme_gtp_send_modify_bearer_request(bearer, 0); d_assert(rv == CORE_OK,, "gtp send failed"); } rv = nas_send_activate_all_dedicated_bearers(bearer); d_assert(rv == CORE_OK,, "nas send failed"); FSM_TRAN(s, esm_state_active); break; } case NAS_ACTIVATE_DEDICATED_EPS_BEARER_CONTEXT_ACCEPT: { d_trace(3, "[ESM] Activate dedicated EPS bearer " "context accept\n"); d_trace(5, " IMSI[%s] PTI[%d] EBI[%d]\n", mme_ue->imsi_bcd, sess->pti, bearer->ebi); /* Check if Initial Context Setup Response or * E-RAB Setup Response is received */ if (MME_HAVE_ENB_S1U_PATH(bearer)) { rv = mme_gtp_send_create_bearer_response(bearer); d_assert(rv == CORE_OK,, "gtp send failed"); } FSM_TRAN(s, esm_state_active); break; } default: { d_error("Unknown message(type:%d)", message->esm.h.message_type); break; } } break; } default: { d_error("Unknown event %s", mme_event_get_name(e)); break; } } } void esm_state_active(fsm_t *s, event_t *e) { status_t rv; mme_ue_t *mme_ue = NULL; mme_sess_t *sess = NULL; mme_bearer_t *bearer = NULL; d_assert(s, return, "Null param"); d_assert(e, return, "Null param"); mme_sm_trace(3, e); bearer = mme_bearer_find(event_get_param1(e)); d_assert(bearer, return, "Null param"); sess = bearer->sess; d_assert(sess, return, "Null param"); mme_ue = sess->mme_ue; d_assert(mme_ue, return, "Null param"); switch (event_get(e)) { case FSM_ENTRY_SIG: { break; } case FSM_EXIT_SIG: { break; } case MME_EVT_ESM_MESSAGE: { nas_message_t *message = (nas_message_t *)event_get_param3(e); d_assert(message, break, "Null param"); switch(message->esm.h.message_type) { case NAS_PDN_CONNECTIVITY_REQUEST: { d_trace(3, "[ESM] PDN Connectivity request\n"); d_trace(5, " IMSI[%s] PTI[%d] EBI[%d]\n", mme_ue->imsi_bcd, sess->pti, bearer->ebi); rv = esm_handle_pdn_connectivity_request( bearer, &message->esm.pdn_connectivity_request); if (rv != CORE_OK) { FSM_TRAN(s, esm_state_exception); break; } FSM_TRAN(s, esm_state_inactive); break; } case NAS_PDN_DISCONNECT_REQUEST: { d_trace(3, "[ESM] PDN disconnect request\n"); d_trace(5, " IMSI[%s] PTI[%d] EBI[%d]\n", mme_ue->imsi_bcd, sess->pti, bearer->ebi); if (MME_HAVE_SGW_S1U_PATH(sess)) { rv = mme_gtp_send_delete_session_request(sess); d_assert(rv == CORE_OK, return, "mme_gtp_send_delete_session_request error"); } else { rv = nas_send_deactivate_bearer_context_request(bearer); d_assert(rv == CORE_OK, return, "nas_send_deactivate_bearer_context_request failed"); } FSM_TRAN(s, esm_state_pdn_will_disconnect); break; } case NAS_MODIFY_EPS_BEARER_CONTEXT_ACCEPT: { d_trace(3, "[ESM] Modify EPS bearer context accept\n"); d_trace(5, " IMSI[%s] PTI[%d] EBI[%d]\n", mme_ue->imsi_bcd, sess->pti, bearer->ebi); rv = mme_gtp_send_update_bearer_response(bearer); d_assert(rv == CORE_OK, return, "mme_gtp_send_update_session_request error"); break; } case NAS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT: { d_trace(3, "[ESM] [A] Deactivate EPS bearer " "context accept\n"); d_trace(5, " IMSI[%s] PTI[%d] EBI[%d]\n", mme_ue->imsi_bcd, sess->pti, bearer->ebi); rv = mme_gtp_send_delete_bearer_response(bearer); d_assert(rv == CORE_OK, return, "mme_gtp_send_delete_session_request error"); FSM_TRAN(s, esm_state_bearer_deactivated); break; } default: { d_error("Unknown message(type:%d)", message->esm.h.message_type); break; } } break; } default: { d_error("Unknown event %s", mme_event_get_name(e)); break; } } } void esm_state_pdn_will_disconnect(fsm_t *s, event_t *e) { mme_ue_t *mme_ue = NULL; mme_sess_t *sess = NULL; mme_bearer_t *bearer = NULL; d_assert(s, return, "Null param"); d_assert(e, return, "Null param"); mme_sm_trace(3, e); bearer = mme_bearer_find(event_get_param1(e)); d_assert(bearer, return, "Null param"); sess = bearer->sess; d_assert(sess, return, "Null param"); mme_ue = sess->mme_ue; d_assert(mme_ue, return, "Null param"); switch (event_get(e)) { case FSM_ENTRY_SIG: { break; } case FSM_EXIT_SIG: { break; } case MME_EVT_ESM_MESSAGE: { nas_message_t *message = (nas_message_t *)event_get_param3(e); d_assert(message, break, "Null param"); switch(message->esm.h.message_type) { case NAS_DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT: { d_trace(3, "[ESM] [D] Deactivate EPS bearer " "context accept\n"); d_trace(5, " IMSI[%s] PTI[%d] EBI[%d]\n", mme_ue->imsi_bcd, sess->pti, bearer->ebi); FSM_TRAN(s, esm_state_pdn_did_disconnect); break; } default: { d_error("Unknown message(type:%d)", message->esm.h.message_type); break; } } break; } default: { d_error("Unknown event %s", mme_event_get_name(e)); break; } } } void esm_state_pdn_did_disconnect(fsm_t *s, event_t *e) { mme_sm_trace(3, e); switch (event_get(e)) { case FSM_ENTRY_SIG: { break; } case FSM_EXIT_SIG: { break; } default: { d_error("Unknown event %s", mme_event_get_name(e)); break; } } } void esm_state_bearer_deactivated(fsm_t *s, event_t *e) { mme_sm_trace(3, e); switch (event_get(e)) { case FSM_ENTRY_SIG: { break; } case FSM_EXIT_SIG: { break; } default: { d_error("Unknown event %s", mme_event_get_name(e)); break; } } } void esm_state_exception(fsm_t *s, event_t *e) { mme_sm_trace(3, e); switch (event_get(e)) { case FSM_ENTRY_SIG: { break; } case FSM_EXIT_SIG: { break; } default: { d_error("Unknown event %s", mme_event_get_name(e)); break; } } } nextepc-0.3.10/src/mme/kasumi.c000066400000000000000000000345171333553357400162700ustar00rootroot00000000000000/*----------------------------------------------------------------------- * kasumi.c *----------------------------------------------------------------------- * * A sample implementation of KASUMI, the core algorithm for the * 3GPP Confidentiality and Integrity algorithms. * * This has been coded for clarity, not necessarily for efficiency. * * This will compile and run correctly on both Intel (little endian) * and Sparc (big endian) machines. (Compilers used supported 32-bit ints). * * Version 1.1 08 May 2000 * *-----------------------------------------------------------------------*/ #include "kasumi.h" /*--------- 16 bit rotate left ------------------------------------------*/ #define ROL16(a,b) (u16)((a<>(16-b))) /*-------- globals: The subkey arrays -----------------------------------*/ static u16 KLi1[8], KLi2[8]; static u16 KOi1[8], KOi2[8], KOi3[8]; static u16 KIi1[8], KIi2[8], KIi3[8]; /*--------------------------------------------------------------------- * FI() * The FI function (fig 3). It includes the S7 and S9 tables. * Transforms a 16-bit value. *---------------------------------------------------------------------*/ static u16 FI( u16 in, u16 subkey ) { u16 nine, seven; static u16 S7[] = { 54, 50, 62, 56, 22, 34, 94, 96, 38, 6, 63, 93, 2, 18,123, 33, 55,113, 39,114, 21, 67, 65, 12, 47, 73, 46, 27, 25,111,124, 81, 53, 9,121, 79, 52, 60, 58, 48,101,127, 40,120,104, 70, 71, 43, 20,122, 72, 61, 23,109, 13,100, 77, 1, 16, 7, 82, 10,105, 98, 117,116, 76, 11, 89,106, 0,125,118, 99, 86, 69, 30, 57,126, 87, 112, 51, 17, 5, 95, 14, 90, 84, 91, 8, 35,103, 32, 97, 28, 66, 102, 31, 26, 45, 75, 4, 85, 92, 37, 74, 80, 49, 68, 29,115, 44, 64,107,108, 24,110, 83, 36, 78, 42, 19, 15, 41, 88,119, 59, 3}; static u16 S9[] = { 167,239,161,379,391,334, 9,338, 38,226, 48,358,452,385, 90,397, 183,253,147,331,415,340, 51,362,306,500,262, 82,216,159,356,177, 175,241,489, 37,206, 17, 0,333, 44,254,378, 58,143,220, 81,400, 95, 3,315,245, 54,235,218,405,472,264,172,494,371,290,399, 76, 165,197,395,121,257,480,423,212,240, 28,462,176,406,507,288,223, 501,407,249,265, 89,186,221,428,164, 74,440,196,458,421,350,163, 232,158,134,354, 13,250,491,142,191, 69,193,425,152,227,366,135, 344,300,276,242,437,320,113,278, 11,243, 87,317, 36, 93,496, 27, 487,446,482, 41, 68,156,457,131,326,403,339, 20, 39,115,442,124, 475,384,508, 53,112,170,479,151,126,169, 73,268,279,321,168,364, 363,292, 46,499,393,327,324, 24,456,267,157,460,488,426,309,229, 439,506,208,271,349,401,434,236, 16,209,359, 52, 56,120,199,277, 465,416,252,287,246, 6, 83,305,420,345,153,502, 65, 61,244,282, 173,222,418, 67,386,368,261,101,476,291,195,430, 49, 79,166,330, 280,383,373,128,382,408,155,495,367,388,274,107,459,417, 62,454, 132,225,203,316,234, 14,301, 91,503,286,424,211,347,307,140,374, 35,103,125,427, 19,214,453,146,498,314,444,230,256,329,198,285, 50,116, 78,410, 10,205,510,171,231, 45,139,467, 29, 86,505, 32, 72, 26,342,150,313,490,431,238,411,325,149,473, 40,119,174,355, 185,233,389, 71,448,273,372, 55,110,178,322, 12,469,392,369,190, 1,109,375,137,181, 88, 75,308,260,484, 98,272,370,275,412,111, 336,318, 4,504,492,259,304, 77,337,435, 21,357,303,332,483, 18, 47, 85, 25,497,474,289,100,269,296,478,270,106, 31,104,433, 84, 414,486,394, 96, 99,154,511,148,413,361,409,255,162,215,302,201, 266,351,343,144,441,365,108,298,251, 34,182,509,138,210,335,133, 311,352,328,141,396,346,123,319,450,281,429,228,443,481, 92,404, 485,422,248,297, 23,213,130,466, 22,217,283, 70,294,360,419,127, 312,377, 7,468,194, 2,117,295,463,258,224,447,247,187, 80,398, 284,353,105,390,299,471,470,184, 57,200,348, 63,204,188, 33,451, 97, 30,310,219, 94,160,129,493, 64,179,263,102,189,207,114,402, 438,477,387,122,192, 42,381, 5,145,118,180,449,293,323,136,380, 43, 66, 60,455,341,445,202,432, 8,237, 15,376,436,464, 59,461}; /* The sixteen bit input is split into two unequal halves, * * nine bits and seven bits - as is the subkey */ nine = (u16)(in>>7); seven = (u16)(in&0x7F); /* Now run the various operations */ nine = (u16)(S9[nine] ^ seven); seven = (u16)(S7[seven] ^ (nine & 0x7F)); seven ^= (subkey>>9); nine ^= (subkey&0x1FF); nine = (u16)(S9[nine] ^ seven); seven = (u16)(S7[seven] ^ (nine & 0x7F)); in = (u16)((seven<<9) + nine); return( in ); } /*--------------------------------------------------------------------- * FO() * The FO() function. * Transforms a 32-bit value. Uses to identify the * appropriate subkeys to use. *---------------------------------------------------------------------*/ static u32 FO( u32 in, int index ) { u16 left, right; /* Split the input into two 16-bit words */ left = (u16)(in>>16); right = (u16) in; /* Now apply the same basic transformation three times */ left ^= KOi1[index]; left = FI( left, KIi1[index] ); left ^= right; right ^= KOi2[index]; right = FI( right, KIi2[index] ); right ^= left; left ^= KOi3[index]; left = FI( left, KIi3[index] ); left ^= right; in = (((u32)right)<<16)+left; return( in ); } /*--------------------------------------------------------------------- * FL() * The FL() function. * Transforms a 32-bit value. Uses to identify the * appropriate subkeys to use. *---------------------------------------------------------------------*/ static u32 FL( u32 in, int index ) { u16 l, r, a, b; /* split out the left and right halves */ l = (u16)(in>>16); r = (u16)(in); /* do the FL() operations */ a = (u16) (l & KLi1[index]); r ^= ROL16(a,1); b = (u16)(r | KLi2[index]); l ^= ROL16(b,1); /* put the two halves back together */ in = (((u32)l)<<16) + r; return( in ); } /*--------------------------------------------------------------------- * kasumi() * the Main algorithm (fig 1). Apply the same pair of operations * four times. Transforms the 64-bit input. *---------------------------------------------------------------------*/ void kasumi( u8 *data ) { u32 left, right, temp; REGISTER32 *d; int n; /* Start by getting the data into two 32-bit words (endian corect) */ d = (REGISTER32*)data; left = (((u32)d[0].b8[0])<<24)+(((u32)d[0].b8[1])<<16) +(d[0].b8[2]<<8)+(d[0].b8[3]); right = (((u32)d[1].b8[0])<<24)+(((u32)d[1].b8[1])<<16) +(d[1].b8[2]<<8)+(d[1].b8[3]); n = 0; do { temp = FL( left, n ); temp = FO( temp, n++ ); right ^= temp; temp = FO( right, n ); temp = FL( temp, n++ ); left ^= temp; } while( n<=7 ); /* return the correct endian result */ d[0].b8[0] = (u8)(left>>24); d[1].b8[0] = (u8)(right>>24); d[0].b8[1] = (u8)(left>>16); d[1].b8[1] = (u8)(right>>16); d[0].b8[2] = (u8)(left>>8); d[1].b8[2] = (u8)(right>>8); d[0].b8[3] = (u8)(left); d[1].b8[3] = (u8)(right); /* strange issue with gcc, where data is not updated with left and right values... give a try like this: data = d; actually not working... */ } /*--------------------------------------------------------------------- * kasumi_key_schedule() * Build the key schedule. Most "key" operations use 16-bit * subkeys so we build u16-sized arrays that are "endian" correct. *---------------------------------------------------------------------*/ void kasumi_key_schedule( u8 *k ) { static u16 C[] = { 0x0123,0x4567,0x89AB,0xCDEF, 0xFEDC,0xBA98,0x7654,0x3210 }; u16 key[8], Kprime[8]; REGISTER16 *k16; int n; /* Start by ensuring the subkeys are endian correct on a 16-bit basis */ k16 = (REGISTER16 *)k; for( n=0; n<8; ++n ) key[n] = (u16)((k16[n].b8[0]<<8) + (k16[n].b8[1])); /* Now build the K'[] keys */ for( n=0; n<8; ++n ) Kprime[n] = (u16)(key[n] ^ C[n]); /* Finally construct the various sub keys */ for( n=0; n<8; ++n ) { KLi1[n] = ROL16(key[n],1); KLi2[n] = Kprime[(n+2)&0x7]; KOi1[n] = ROL16(key[(n+1)&0x7],5); KOi2[n] = ROL16(key[(n+5)&0x7],8); KOi3[n] = ROL16(key[(n+6)&0x7],13); KIi1[n] = Kprime[(n+4)&0x7]; KIi2[n] = Kprime[(n+3)&0x7]; KIi3[n] = Kprime[(n+7)&0x7]; } } /*--------------------------------------------------------------------- * e n d o f k a s u m i . c *---------------------------------------------------------------------*/ /*------------------------------------------------------------------- * F8 - Confidentiality Algorithm *------------------------------------------------------------------- * * A sample implementation of f8, the 3GPP Confidentiality algorithm. * * This has been coded for clarity, not necessarily for efficiency. * * This will compile and run correctly on both Intel (little endian) * and Sparc (big endian) machines. (Compilers used supported 32-bit ints) * * Version 1.0 05 November 1999 * *-------------------------------------------------------------------*/ /*--------------------------------------------------------- * f8() * Given key, count, bearer, direction, data, * and bit length encrypt the bit stream *---------------------------------------------------------*/ void kasumi_f8(u8 *key, u32 count, u32 bearer, u32 dir, u8 *data, int length) { REGISTER64 A; /* the modifier */ REGISTER64 temp; /* The working register */ int i, n; int lastbits = (8-(length%8)) % 8; u8 ModKey[16]; /* Modified key */ u16 blkcnt; /* The block counter */ /* Start by building our global modifier */ temp.b32[0] = temp.b32[1] = 0; A.b32[0] = A.b32[1] = 0; /* initialise register in an endian correct manner*/ A.b8[0] = (u8) (count>>24); A.b8[1] = (u8) (count>>16); A.b8[2] = (u8) (count>>8); A.b8[3] = (u8) (count); A.b8[4] = (u8) (bearer<<3); A.b8[4] |= (u8) (dir<<2); /* Construct the modified key and then "kasumi" A */ for( n=0; n<16; ++n ) ModKey[n] = (u8)(key[n] ^ 0x55); kasumi_key_schedule( ModKey ); kasumi( A.b8 ); /* First encryption to create modifier */ /* Final initialisation steps */ blkcnt = 0; kasumi_key_schedule( key ); /* Now run the block cipher */ while( length > 0 ) { /* First we calculate the next 64-bits of keystream */ /* XOR in A and BLKCNT to last value */ temp.b32[0] ^= A.b32[0]; temp.b32[1] ^= A.b32[1]; temp.b8[7] ^= (u8) blkcnt; temp.b8[6] ^= (u8) (blkcnt>>8); /* KASUMI it to produce the next block of keystream */ kasumi( temp.b8 ); /* Set to the number of bytes of input data * * we have to modify. (=8 if length <= 64) */ if( length >= 64 ) n = 8; else n = (length+7)/8; /* XOR the keystream with the input data stream */ for( i=0; i holds our chaining value... * * is the running XOR of all KASUMI o/ps */ for( n=0; n<4; ++n ) { A.b8[n] = (u8)(count>>(24-(n*8))); A.b8[n+4] = (u8)(fresh>>(24-(n*8))); } kasumi( A.b8 ); B.b32[0] = A.b32[0]; B.b32[1] = A.b32[1]; /* Now run the blocks until we reach the last block */ while( length >= 64 ) { for( n=0; n<8; ++n ) A.b8[n] ^= *data++; kasumi( A.b8 ); length -= 64; B.b32[0] ^= A.b32[0]; /* running XOR across */ B.b32[1] ^= A.b32[1]; /* the block outputs */ } /* Process whole bytes in the last block */ n = 0; while( length >=8 ) { A.b8[n++] ^= *data++; length -= 8; } /* Now add the direction bit to the input bit stream * * If length (which holds the # of data bits in the * * last byte) is non-zero we add it in, otherwise * * it has to start a new byte. */ if( length ) { i = *data; if( dir ) i |= FinalBit[length]; } else i = dir ? 0x80 : 0; A.b8[n++] ^= (u8)i; /* Now add in the final '1' bit. The problem here * * is if the message length happens to be n*64-1. * * If so we need to process this block and then * * create a new input block of 0x8000000000000000. */ if( (length==7) && (n==8) ) /* then we've filled the block */ { kasumi( A.b8 ); B.b32[0] ^= A.b32[0]; /* running XOR across */ B.b32[1] ^= A.b32[1]; /* the block outputs */ A.b8[0] ^= 0x80; /* toggle first bit */ i = 0x80; n = 1; } else { if( length == 7 ) /* we finished off the last byte */ A.b8[n] ^= 0x80; /* so start a new one..... */ else A.b8[n-1] ^= FinalBit[length+1]; } kasumi( A.b8 ); B.b32[0] ^= A.b32[0]; /* running XOR across */ B.b32[1] ^= A.b32[1]; /* the block outputs */ /* Final step is to KASUMI what we have using the * * key XORd with 0xAAAA..... */ for( n=0; n<16; ++n ) ModKey[n] = (u8)*key++ ^ 0xAA; kasumi_key_schedule( ModKey ); kasumi( B.b8 ); /* We return the left-most 32-bits of the result */ for( n=0; n<4; ++n ) mac_i[n] = B.b8[n]; return( mac_i ); } /*----------------------------------------------------------- * e n d o f f 9 . c *-----------------------------------------------------------*/ nextepc-0.3.10/src/mme/kasumi.h000066400000000000000000000031201333553357400162570ustar00rootroot00000000000000/*--------------------------------------------------------- * Kasumi.h *---------------------------------------------------------*/ #ifndef __KASUMI__ #define __KASUMI__ #include "core.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef c_uint8_t u8; typedef c_uint16_t u16; /* original reference is using long, which is 64 bits on 64 bits system I changed to int to make it work on x86 32 / 64 bits system typedef unsigned long u32; */ typedef c_uint32_t u32; /*------- unions: used to remove "endian" issues ------------------------*/ typedef union { u32 b32; u16 b16[2]; u8 b8[4]; } REGISTER32; /* is redefining DWORD */ typedef union { u16 b16; u8 b8[2]; } REGISTER16; /* is redefining WORD */ /*----- a 64-bit structure to help with endian issues -----*/ typedef union { u32 b32[2]; u16 b16[4]; u8 b8[8]; } REGISTER64; /*------------- prototypes -------------------------------- * take care: length (in f8 and f9) is always in bits *---------------------------------------------------------*/ /* initialize the 128 bits key into the cipher */ CORE_DECLARE(void) kasumi_key_schedule( u8 *key ); /* cipher a block of 64 bits */ CORE_DECLARE(void) kasumi( u8 *data ); /* cipher a whole message in 3GPP -counter- mode */ CORE_DECLARE(void) kasumi_f8( u8 *key, u32 count, u32 bearer, u32 dir, \ u8 *data, int length ); /* compute a 3GPP MAC on a message */ CORE_DECLARE(u8*) kasumi_f9( u8 *key, u32 count, u32 fresh, u32 dir, \ u8 *data, int length ); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __KASUMI__ */ nextepc-0.3.10/src/mme/mme_context.c000066400000000000000000003136161333553357400173210ustar00rootroot00000000000000#define TRACE_MODULE _mme_context #include "core_debug.h" #include "core_pool.h" #include "core_lib.h" #include "core_msgq.h" #include "core_fsm.h" #include "core_network.h" #include #include #include "common/yaml_helper.h" #include "s1ap/s1ap_message.h" #include "gtp/gtp_xact.h" #include "gtp/gtp_node.h" #include "gtp/gtp_path.h" #include "fd/fd_lib.h" #include "common/context.h" #include "nas_conv.h" #include "mme_context.h" #include "mme_event.h" #include "s1ap_path.h" #include "mme_sm.h" #define MAX_CELL_PER_ENB 8 static mme_context_t self; static fd_config_t g_fd_conf; index_declare(mme_enb_pool, mme_enb_t, MAX_NUM_OF_ENB); index_declare(mme_ue_pool, mme_ue_t, MAX_POOL_OF_UE); index_declare(enb_ue_pool, enb_ue_t, MAX_POOL_OF_UE); index_declare(mme_sess_pool, mme_sess_t, MAX_POOL_OF_SESS); index_declare(mme_bearer_pool, mme_bearer_t, MAX_POOL_OF_BEARER); static int context_initialized = 0; status_t mme_context_init() { d_assert(context_initialized == 0, return CORE_ERROR, "MME context already has been context_initialized"); /* Initial FreeDiameter Config */ memset(&g_fd_conf, 0, sizeof(fd_config_t)); /* Initialize MME context */ memset(&self, 0, sizeof(mme_context_t)); self.fd_config = &g_fd_conf; list_init(&self.s1ap_list); list_init(&self.s1ap_list6); list_init(&self.gtpc_list); list_init(&self.gtpc_list6); gtp_node_init(); list_init(&self.sgw_list); list_init(&self.pgw_list); index_init(&mme_enb_pool, MAX_NUM_OF_ENB); index_init(&mme_ue_pool, MAX_POOL_OF_UE); index_init(&enb_ue_pool, MAX_POOL_OF_UE); index_init(&mme_sess_pool, MAX_POOL_OF_SESS); index_init(&mme_bearer_pool, MAX_POOL_OF_BEARER); pool_init(&self.m_tmsi, MAX_POOL_OF_UE); self.enb_sock_hash = hash_make(); self.enb_addr_hash = hash_make(); self.enb_id_hash = hash_make(); self.mme_ue_s1ap_id_hash = hash_make(); self.imsi_ue_hash = hash_make(); self.guti_ue_hash = hash_make(); /* Timer value */ self.t3413_value = 2; /* Paging retry timer: 2 secs */ self.s1_holding_timer_value = 30; /* S1 holding timer: 30 secs */ context_initialized = 1; return CORE_OK; } status_t mme_context_final() { d_assert(context_initialized == 1, return CORE_ERROR, "MME context already has been finalized"); mme_enb_remove_all(); mme_ue_remove_all(); if (pool_used(&self.m_tmsi)) { d_error("%d not freed in M-TMSI pool[%d] in MME-Context", pool_used(&self.m_tmsi), pool_size(&self.m_tmsi)); } d_trace(9, "%d not freed in M-TMSI pool[%d] in MME-Context\n", pool_used(&self.m_tmsi), pool_size(&self.m_tmsi)); d_assert(self.enb_sock_hash, , "Null param"); hash_destroy(self.enb_sock_hash); d_assert(self.enb_addr_hash, , "Null param"); hash_destroy(self.enb_addr_hash); d_assert(self.enb_id_hash, , "Null param"); hash_destroy(self.enb_id_hash); d_assert(self.mme_ue_s1ap_id_hash, , "Null param"); hash_destroy(self.mme_ue_s1ap_id_hash); d_assert(self.imsi_ue_hash, , "Null param"); hash_destroy(self.imsi_ue_hash); d_assert(self.guti_ue_hash, , "Null param"); hash_destroy(self.guti_ue_hash); pool_final(&self.m_tmsi); index_final(&mme_bearer_pool); index_final(&mme_sess_pool); index_final(&mme_ue_pool); index_final(&enb_ue_pool); index_final(&mme_enb_pool); gtp_remove_all_nodes(&self.sgw_list); gtp_remove_all_nodes(&self.pgw_list); gtp_node_final(); sock_remove_all_nodes(&self.s1ap_list); sock_remove_all_nodes(&self.s1ap_list6); sock_remove_all_nodes(&self.gtpc_list); sock_remove_all_nodes(&self.gtpc_list6); context_initialized = 0; return CORE_OK; } mme_context_t* mme_self() { return &self; } static status_t mme_context_prepare() { self.relative_capacity = 0xff; self.s1ap_port = S1AP_SCTP_PORT; self.gtpc_port = GTPV2_C_UDP_PORT; self.fd_config->cnf_port = DIAMETER_PORT; self.fd_config->cnf_port_tls = DIAMETER_SECURE_PORT; return CORE_OK; } static status_t mme_context_validation() { if (self.fd_conf_path == NULL && (self.fd_config->cnf_diamid == NULL || self.fd_config->cnf_diamrlm == NULL || self.fd_config->cnf_addr == NULL)) { d_error("No mme.freeDiameter in '%s'", context_self()->config.path); return CORE_ERROR; } if (list_first(&self.s1ap_list) == NULL && list_first(&self.s1ap_list6) == NULL) { d_error("No mme.s1ap in '%s'", context_self()->config.path); return CORE_EAGAIN; } if (list_first(&self.gtpc_list) == NULL && list_first(&self.gtpc_list6) == NULL) { d_error("No mme.gtpc in '%s'", context_self()->config.path); return CORE_EAGAIN; } if (list_first(&self.sgw_list) == NULL) { d_error("No sgw.gtpc in '%s'", context_self()->config.path); return CORE_ERROR; } if (list_first(&self.pgw_list) == NULL) { d_error("No pgw.gtpc in '%s'", context_self()->config.path); return CORE_ERROR; } if (self.max_num_of_served_gummei == 0) { d_error("No mme.gummei in '%s'", context_self()->config.path); return CORE_ERROR; } if (self.served_gummei[0].num_of_plmn_id == 0) { d_error("No mme.gummei.plmn_id in '%s'", context_self()->config.path); return CORE_ERROR; } if (self.served_gummei[0].num_of_mme_gid == 0) { d_error("No mme.gummei.mme_gid in '%s'", context_self()->config.path); return CORE_ERROR; } if (self.served_gummei[0].num_of_mme_code == 0) { d_error("No mme.gummei.mme_code in '%s'", context_self()->config.path); return CORE_ERROR; } if (self.num_of_served_tai == 0) { d_error("No mme.tai in '%s'", context_self()->config.path); return CORE_ERROR; } if (self.served_tai[0].list0.tai[0].num == 0 && self.served_tai[0].list2.num == 0) { d_error("No mme.tai.plmn_id|tac in '%s'", context_self()->config.path); return CORE_ERROR; } if (self.num_of_integrity_order == 0) { d_error("No mme.security.integrity_order in '%s'", context_self()->config.path); return CORE_ERROR; } if (self.num_of_ciphering_order == 0) { d_error("no mme.security.ciphering_order in '%s'", context_self()->config.path); return CORE_ERROR; } return CORE_OK; } status_t mme_context_parse_config() { status_t rv; config_t *config = &context_self()->config; yaml_document_t *document = NULL; yaml_iter_t root_iter; d_assert(config, return CORE_ERROR,); document = config->document; d_assert(document, return CORE_ERROR,); rv = mme_context_prepare(); if (rv != CORE_OK) return rv; yaml_iter_init(&root_iter, document); while(yaml_iter_next(&root_iter)) { const char *root_key = yaml_iter_key(&root_iter); d_assert(root_key, return CORE_ERROR,); if (!strcmp(root_key, "mme")) { yaml_iter_t mme_iter; yaml_iter_recurse(&root_iter, &mme_iter); while(yaml_iter_next(&mme_iter)) { const char *mme_key = yaml_iter_key(&mme_iter); d_assert(mme_key, return CORE_ERROR,); if (!strcmp(mme_key, "freeDiameter")) { yaml_node_t *node = yaml_document_get_node(document, mme_iter.pair->value); d_assert(node, return CORE_ERROR,); if (node->type == YAML_SCALAR_NODE) { self.fd_conf_path = yaml_iter_value(&mme_iter); } else if (node->type == YAML_MAPPING_NODE) { yaml_iter_t fd_iter; yaml_iter_recurse(&mme_iter, &fd_iter); while(yaml_iter_next(&fd_iter)) { const char *fd_key = yaml_iter_key(&fd_iter); d_assert(fd_key, return CORE_ERROR,); if (!strcmp(fd_key, "identity")) { self.fd_config->cnf_diamid = yaml_iter_value(&fd_iter); } else if (!strcmp(fd_key, "realm")) { self.fd_config->cnf_diamrlm = yaml_iter_value(&fd_iter); } else if (!strcmp(fd_key, "port")) { const char *v = yaml_iter_value(&fd_iter); if (v) self.fd_config->cnf_port = atoi(v); } else if (!strcmp(fd_key, "sec_port")) { const char *v = yaml_iter_value(&fd_iter); if (v) self.fd_config->cnf_port_tls = atoi(v); } else if (!strcmp(fd_key, "no_sctp")) { self.fd_config->cnf_flags.no_sctp = yaml_iter_bool(&fd_iter); } else if (!strcmp(fd_key, "listen_on")) { self.fd_config->cnf_addr = yaml_iter_value(&fd_iter); } else if (!strcmp(fd_key, "load_extension")) { yaml_iter_t ext_array, ext_iter; yaml_iter_recurse(&fd_iter, &ext_array); do { const char *module = NULL; const char *conf = NULL; if (yaml_iter_type(&ext_array) == YAML_MAPPING_NODE) { memcpy(&ext_iter, &ext_array, sizeof(yaml_iter_t)); } else if (yaml_iter_type(&ext_array) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&ext_array)) break; yaml_iter_recurse( &ext_array, &ext_iter); } else if (yaml_iter_type(&ext_array) == YAML_SCALAR_NODE) { break; } else d_assert(0, return CORE_ERROR,); while(yaml_iter_next(&ext_iter)) { const char *ext_key = yaml_iter_key(&ext_iter); d_assert(ext_key, return CORE_ERROR,); if (!strcmp(ext_key, "module")) { module = yaml_iter_value(&ext_iter); } else if (!strcmp(ext_key, "conf")) { conf = yaml_iter_value(&ext_iter); } else d_warn("unknown key `%s`", ext_key); } if (module) { self.fd_config-> ext[self.fd_config->num_of_ext]. module = module; self.fd_config-> ext[self.fd_config->num_of_ext]. conf = conf; self.fd_config->num_of_ext++; } } while(yaml_iter_type(&ext_array) == YAML_SEQUENCE_NODE); } else if (!strcmp(fd_key, "connect")) { yaml_iter_t conn_array, conn_iter; yaml_iter_recurse(&fd_iter, &conn_array); do { const char *identity = NULL; const char *addr = NULL; c_uint16_t port = 0; if (yaml_iter_type(&conn_array) == YAML_MAPPING_NODE) { memcpy(&conn_iter, &conn_array, sizeof(yaml_iter_t)); } else if (yaml_iter_type(&conn_array) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&conn_array)) break; yaml_iter_recurse(&conn_array, &conn_iter); } else if (yaml_iter_type(&conn_array) == YAML_SCALAR_NODE) { break; } else d_assert(0, return CORE_ERROR,); while(yaml_iter_next(&conn_iter)) { const char *conn_key = yaml_iter_key(&conn_iter); d_assert(conn_key, return CORE_ERROR,); if (!strcmp(conn_key, "identity")) { identity = yaml_iter_value(&conn_iter); } else if (!strcmp(conn_key, "addr")) { addr = yaml_iter_value(&conn_iter); } else if (!strcmp(conn_key, "port")) { const char *v = yaml_iter_value(&conn_iter); if (v) port = atoi(v); } else d_warn("unknown key `%s`", conn_key); } if (identity && addr) { self.fd_config-> conn[self.fd_config->num_of_conn]. identity = identity; self.fd_config-> conn[self.fd_config->num_of_conn]. addr = addr; self.fd_config-> conn[self.fd_config->num_of_conn]. port = port; self.fd_config->num_of_conn++; } } while(yaml_iter_type(&conn_array) == YAML_SEQUENCE_NODE); } else d_warn("unknown key `%s`", fd_key); } } } else if (!strcmp(mme_key, "relative_capacity")) { const char *v = yaml_iter_value(&mme_iter); if (v) self.relative_capacity = atoi(v); } else if (!strcmp(mme_key, "s1ap")) { yaml_iter_t s1ap_array, s1ap_iter; yaml_iter_recurse(&mme_iter, &s1ap_array); do { int family = AF_UNSPEC; int i, num = 0; const char *hostname[MAX_NUM_OF_HOSTNAME]; c_uint16_t port = self.s1ap_port; const char *dev = NULL; c_sockaddr_t *list = NULL; sock_node_t *node = NULL; if (yaml_iter_type(&s1ap_array) == YAML_MAPPING_NODE) { memcpy(&s1ap_iter, &s1ap_array, sizeof(yaml_iter_t)); } else if (yaml_iter_type(&s1ap_array) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&s1ap_array)) break; yaml_iter_recurse(&s1ap_array, &s1ap_iter); } else if (yaml_iter_type(&s1ap_array) == YAML_SCALAR_NODE) { break; } else d_assert(0, return CORE_ERROR,); while(yaml_iter_next(&s1ap_iter)) { const char *s1ap_key = yaml_iter_key(&s1ap_iter); d_assert(s1ap_key, return CORE_ERROR,); if (!strcmp(s1ap_key, "family")) { const char *v = yaml_iter_value(&s1ap_iter); if (v) family = atoi(v); if (family != AF_UNSPEC && family != AF_INET && family != AF_INET6) { d_warn("Ignore family(%d) : AF_UNSPEC(%d), " "AF_INET(%d), AF_INET6(%d) ", family, AF_UNSPEC, AF_INET, AF_INET6); family = AF_UNSPEC; } } else if (!strcmp(s1ap_key, "addr") || !strcmp(s1ap_key, "name")) { yaml_iter_t hostname_iter; yaml_iter_recurse(&s1ap_iter, &hostname_iter); d_assert(yaml_iter_type(&hostname_iter) != YAML_MAPPING_NODE, return CORE_ERROR,); do { if (yaml_iter_type(&hostname_iter) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&hostname_iter)) break; } d_assert(num <= MAX_NUM_OF_HOSTNAME, return CORE_ERROR,); hostname[num++] = yaml_iter_value(&hostname_iter); } while( yaml_iter_type(&hostname_iter) == YAML_SEQUENCE_NODE); } else if (!strcmp(s1ap_key, "port")) { const char *v = yaml_iter_value(&s1ap_iter); if (v) { port = atoi(v); self.s1ap_port = port; } } else if (!strcmp(s1ap_key, "dev")) { dev = yaml_iter_value(&s1ap_iter); } else d_warn("unknown key `%s`", s1ap_key); } list = NULL; for (i = 0; i < num; i++) { rv = core_addaddrinfo(&list, family, hostname[i], port, 0); d_assert(rv == CORE_OK, return CORE_ERROR,); } if (list) { if (context_self()->parameter.no_ipv4 == 0) { rv = sock_add_node(&self.s1ap_list, &node, list, AF_INET); d_assert(rv == CORE_OK, return CORE_ERROR,); } if (context_self()->parameter.no_ipv6 == 0) { rv = sock_add_node(&self.s1ap_list6, &node, list, AF_INET6); d_assert(rv == CORE_OK, return CORE_ERROR,); } core_freeaddrinfo(list); } if (dev) { rv = sock_probe_node( context_self()->parameter.no_ipv4 ? NULL : &self.s1ap_list, context_self()->parameter.no_ipv6 ? NULL : &self.s1ap_list6, dev, self.s1ap_port); d_assert(rv == CORE_OK, return CORE_ERROR,); } } while(yaml_iter_type(&s1ap_array) == YAML_SEQUENCE_NODE); if (list_first(&self.s1ap_list) == NULL && list_first(&self.s1ap_list6) == NULL) { rv = sock_probe_node( context_self()->parameter.no_ipv4 ? NULL : &self.s1ap_list, context_self()->parameter.no_ipv6 ? NULL : &self.s1ap_list6, NULL, self.s1ap_port); d_assert(rv == CORE_OK, return CORE_ERROR,); } } else if (!strcmp(mme_key, "gtpc")) { yaml_iter_t gtpc_array, gtpc_iter; yaml_iter_recurse(&mme_iter, >pc_array); do { int family = AF_UNSPEC; int i, num = 0; const char *hostname[MAX_NUM_OF_HOSTNAME]; c_uint16_t port = self.gtpc_port; const char *dev = NULL; c_sockaddr_t *list = NULL; sock_node_t *node = NULL; if (yaml_iter_type(>pc_array) == YAML_MAPPING_NODE) { memcpy(>pc_iter, >pc_array, sizeof(yaml_iter_t)); } else if (yaml_iter_type(>pc_array) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(>pc_array)) break; yaml_iter_recurse(>pc_array, >pc_iter); } else if (yaml_iter_type(>pc_array) == YAML_SCALAR_NODE) { break; } else d_assert(0, return CORE_ERROR,); while(yaml_iter_next(>pc_iter)) { const char *gtpc_key = yaml_iter_key(>pc_iter); d_assert(gtpc_key, return CORE_ERROR,); if (!strcmp(gtpc_key, "family")) { const char *v = yaml_iter_value(>pc_iter); if (v) family = atoi(v); if (family != AF_UNSPEC && family != AF_INET && family != AF_INET6) { d_warn("Ignore family(%d) : AF_UNSPEC(%d), " "AF_INET(%d), AF_INET6(%d) ", family, AF_UNSPEC, AF_INET, AF_INET6); family = AF_UNSPEC; } } else if (!strcmp(gtpc_key, "addr") || !strcmp(gtpc_key, "name")) { yaml_iter_t hostname_iter; yaml_iter_recurse(>pc_iter, &hostname_iter); d_assert(yaml_iter_type(&hostname_iter) != YAML_MAPPING_NODE, return CORE_ERROR,); do { if (yaml_iter_type(&hostname_iter) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&hostname_iter)) break; } d_assert(num <= MAX_NUM_OF_HOSTNAME, return CORE_ERROR,); hostname[num++] = yaml_iter_value(&hostname_iter); } while( yaml_iter_type(&hostname_iter) == YAML_SEQUENCE_NODE); } else if (!strcmp(gtpc_key, "port")) { const char *v = yaml_iter_value(>pc_iter); if (v) { port = atoi(v); self.gtpc_port = port; } } else if (!strcmp(gtpc_key, "dev")) { dev = yaml_iter_value(>pc_iter); } else d_warn("unknown key `%s`", gtpc_key); } list = NULL; for (i = 0; i < num; i++) { rv = core_addaddrinfo(&list, family, hostname[i], port, 0); d_assert(rv == CORE_OK, return CORE_ERROR,); } if (list) { if (context_self()->parameter.no_ipv4 == 0) { rv = sock_add_node(&self.gtpc_list, &node, list, AF_INET); d_assert(rv == CORE_OK, return CORE_ERROR,); } if (context_self()->parameter.no_ipv6 == 0) { rv = sock_add_node(&self.gtpc_list6, &node, list, AF_INET6); d_assert(rv == CORE_OK, return CORE_ERROR,); } core_freeaddrinfo(list); } if (dev) { rv = sock_probe_node( context_self()->parameter.no_ipv4 ? NULL : &self.gtpc_list, context_self()->parameter.no_ipv6 ? NULL : &self.gtpc_list6, dev, self.gtpc_port); d_assert(rv == CORE_OK, return CORE_ERROR,); } } while(yaml_iter_type(>pc_array) == YAML_SEQUENCE_NODE); if (list_first(&self.gtpc_list) == NULL && list_first(&self.gtpc_list6) == NULL) { rv = sock_probe_node( context_self()->parameter.no_ipv4 ? NULL : &self.gtpc_list, context_self()->parameter.no_ipv6 ? NULL : &self.gtpc_list6, NULL, self.gtpc_port); d_assert(rv == CORE_OK, return CORE_ERROR,); } } else if (!strcmp(mme_key, "gummei")) { yaml_iter_t gummei_array, gummei_iter; yaml_iter_recurse(&mme_iter, &gummei_array); do { served_gummei_t *gummei = NULL; d_assert(self.max_num_of_served_gummei <= MAX_NUM_OF_SERVED_GUMMEI, return CORE_ERROR,); gummei = &self.served_gummei[ self.max_num_of_served_gummei]; d_assert(gummei, return CORE_ERROR,); if (yaml_iter_type(&gummei_array) == YAML_MAPPING_NODE) { memcpy(&gummei_iter, &gummei_array, sizeof(yaml_iter_t)); } else if (yaml_iter_type(&gummei_array) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&gummei_array)) break; yaml_iter_recurse(&gummei_array, &gummei_iter); } else if (yaml_iter_type(&gummei_array) == YAML_SCALAR_NODE) { break; } else d_assert(0, return CORE_ERROR,); while(yaml_iter_next(&gummei_iter)) { const char *gummei_key = yaml_iter_key(&gummei_iter); d_assert(gummei_key, return CORE_ERROR,); if (!strcmp(gummei_key, "plmn_id")) { yaml_iter_t plmn_id_array, plmn_id_iter; yaml_iter_recurse(&gummei_iter, &plmn_id_array); do { plmn_id_t *plmn_id = NULL; const char *mcc = NULL, *mnc = NULL; d_assert(gummei->num_of_plmn_id <= MAX_PLMN_ID, return CORE_ERROR,); plmn_id = &gummei->plmn_id[ gummei->num_of_plmn_id]; d_assert(plmn_id, return CORE_ERROR,); if (yaml_iter_type(&plmn_id_array) == YAML_MAPPING_NODE) { memcpy(&plmn_id_iter, &plmn_id_array, sizeof(yaml_iter_t)); } else if (yaml_iter_type(&plmn_id_array) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&plmn_id_array)) break; yaml_iter_recurse(&plmn_id_array, &plmn_id_iter); } else if (yaml_iter_type(&plmn_id_array) == YAML_SCALAR_NODE) { break; } else d_assert(0, return CORE_ERROR,); while(yaml_iter_next(&plmn_id_iter)) { const char *plmn_id_key = yaml_iter_key(&plmn_id_iter); d_assert(plmn_id_key, return CORE_ERROR,); if (!strcmp(plmn_id_key, "mcc")) { mcc = yaml_iter_value(&plmn_id_iter); } else if (!strcmp(plmn_id_key, "mnc")) { mnc = yaml_iter_value(&plmn_id_iter); } } if (mcc && mnc) { plmn_id_build(plmn_id, atoi(mcc), atoi(mnc), strlen(mnc)); gummei->num_of_plmn_id++; } } while(yaml_iter_type(&plmn_id_array) == YAML_SEQUENCE_NODE); } else if (!strcmp(gummei_key, "mme_gid")) { yaml_iter_t mme_gid_iter; yaml_iter_recurse(&gummei_iter, &mme_gid_iter); d_assert(yaml_iter_type(&mme_gid_iter) != YAML_MAPPING_NODE, return CORE_ERROR,); do { c_uint16_t *mme_gid = NULL; const char *v = NULL; d_assert(gummei->num_of_mme_gid <= GRP_PER_MME, return CORE_ERROR,); mme_gid = &gummei->mme_gid[ gummei->num_of_mme_gid]; d_assert(mme_gid, return CORE_ERROR,); if (yaml_iter_type(&mme_gid_iter) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&mme_gid_iter)) break; } v = yaml_iter_value(&mme_gid_iter); if (v) { *mme_gid = atoi(v); gummei->num_of_mme_gid++; } } while( yaml_iter_type(&mme_gid_iter) == YAML_SEQUENCE_NODE); } else if (!strcmp(gummei_key, "mme_code")) { yaml_iter_t mme_code_iter; yaml_iter_recurse(&gummei_iter, &mme_code_iter); d_assert(yaml_iter_type(&mme_code_iter) != YAML_MAPPING_NODE, return CORE_ERROR,); do { c_uint8_t *mme_code = NULL; const char *v = NULL; d_assert(gummei->num_of_mme_code <= CODE_PER_MME, return CORE_ERROR,); mme_code = &gummei->mme_code[ gummei->num_of_mme_code]; d_assert(mme_code, return CORE_ERROR,); if (yaml_iter_type(&mme_code_iter) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&mme_code_iter)) break; } v = yaml_iter_value(&mme_code_iter); if (v) { *mme_code = atoi(v); gummei->num_of_mme_code++; } } while( yaml_iter_type(&mme_code_iter) == YAML_SEQUENCE_NODE); } else d_warn("unknown key `%s`", gummei_key); } if (gummei->num_of_plmn_id && gummei->num_of_mme_gid && gummei->num_of_mme_code) { self.max_num_of_served_gummei++; } else { d_warn("Ignore gummei : " "plmn_id(%d), mme_gid(%d), mme_code(%d)", gummei->num_of_plmn_id, gummei->num_of_mme_gid, gummei->num_of_mme_code); gummei->num_of_plmn_id = 0; gummei->num_of_mme_gid = 0; gummei->num_of_mme_code = 0; } } while(yaml_iter_type(&gummei_array) == YAML_SEQUENCE_NODE); } else if (!strcmp(mme_key, "tai")) { int num_of_list0 = 0; tai0_list_t *list0 = NULL; tai2_list_t *list2 = NULL; d_assert(self.num_of_served_tai <= MAX_NUM_OF_SERVED_TAI, return CORE_ERROR,); list0 = &self.served_tai[self.num_of_served_tai].list0; d_assert(list0, return CORE_ERROR,); list2 = &self.served_tai[self.num_of_served_tai].list2; d_assert(list2, return CORE_ERROR,); yaml_iter_t tai_array, tai_iter; yaml_iter_recurse(&mme_iter, &tai_array); do { const char *mcc = NULL, *mnc = NULL; c_uint16_t tac[MAX_NUM_OF_TAI]; int num_of_tac = 0; if (yaml_iter_type(&tai_array) == YAML_MAPPING_NODE) { memcpy(&tai_iter, &tai_array, sizeof(yaml_iter_t)); } else if (yaml_iter_type(&tai_array) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&tai_array)) break; yaml_iter_recurse(&tai_array, &tai_iter); } else if (yaml_iter_type(&tai_array) == YAML_SCALAR_NODE) { break; } else d_assert(0, return CORE_ERROR,); while(yaml_iter_next(&tai_iter)) { const char *tai_key = yaml_iter_key(&tai_iter); d_assert(tai_key, return CORE_ERROR,); if (!strcmp(tai_key, "plmn_id")) { yaml_iter_t plmn_id_iter; yaml_iter_recurse(&tai_iter, &plmn_id_iter); while(yaml_iter_next(&plmn_id_iter)) { const char *plmn_id_key = yaml_iter_key(&plmn_id_iter); d_assert(plmn_id_key, return CORE_ERROR,); if (!strcmp(plmn_id_key, "mcc")) { mcc = yaml_iter_value(&plmn_id_iter); } else if (!strcmp(plmn_id_key, "mnc")) { mnc = yaml_iter_value(&plmn_id_iter); } } } else if (!strcmp(tai_key, "tac")) { yaml_iter_t tac_iter; yaml_iter_recurse(&tai_iter, &tac_iter); d_assert(yaml_iter_type(&tac_iter) != YAML_MAPPING_NODE, return CORE_ERROR,); do { const char *v = NULL; d_assert(num_of_tac <= MAX_NUM_OF_TAI, return CORE_ERROR,); if (yaml_iter_type(&tac_iter) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&tac_iter)) break; } v = yaml_iter_value(&tac_iter); if (v) { tac[num_of_tac] = atoi(v); num_of_tac++; } } while( yaml_iter_type(&tac_iter) == YAML_SEQUENCE_NODE); } else d_warn("unknown key `%s`", tai_key); } if (mcc && mnc && num_of_tac) { if (num_of_tac == 1) { plmn_id_build( &list2->tai[list2->num].plmn_id, atoi(mcc), atoi(mnc), strlen(mnc)); list2->tai[list2->num].tac = tac[0]; list2->num++; if (list2->num > 1) list2->type = TAI2_TYPE; else list2->type = TAI1_TYPE; } else if (num_of_tac > 1) { int i; plmn_id_build( &list0->tai[num_of_list0].plmn_id, atoi(mcc), atoi(mnc), strlen(mnc)); for (i = 0; i < num_of_tac; i++) { list0->tai[num_of_list0].tac[i] = tac[i]; } list0->tai[num_of_list0].num = num_of_tac; list0->tai[num_of_list0].type = TAI0_TYPE; num_of_list0++; } } else { d_warn("Ignore tai : mcc(%p), mnc(%p), " "num_of_tac(%d)", mcc, mnc, num_of_tac); } } while(yaml_iter_type(&tai_array) == YAML_SEQUENCE_NODE); if (list2->num || num_of_list0) { self.num_of_served_tai++; } } else if (!strcmp(mme_key, "security")) { yaml_iter_t security_iter; yaml_iter_recurse(&mme_iter, &security_iter); while(yaml_iter_next(&security_iter)) { const char *security_key = yaml_iter_key(&security_iter); d_assert(security_key, return CORE_ERROR,); if (!strcmp(security_key, "integrity_order")) { yaml_iter_t integrity_order_iter; yaml_iter_recurse(&security_iter, &integrity_order_iter); d_assert(yaml_iter_type(&integrity_order_iter) != YAML_MAPPING_NODE, return CORE_ERROR,); do { const char *v = NULL; if (yaml_iter_type(&integrity_order_iter) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&integrity_order_iter)) break; } v = yaml_iter_value(&integrity_order_iter); if (v) { int integrity_index = self.num_of_integrity_order; if (strcmp(v, "EIA0") == 0) { self.integrity_order[integrity_index] = NAS_SECURITY_ALGORITHMS_EIA0; self.num_of_integrity_order++; } else if (strcmp(v, "EIA1") == 0) { self.integrity_order[integrity_index] = NAS_SECURITY_ALGORITHMS_128_EIA1; self.num_of_integrity_order++; } else if (strcmp(v, "EIA2") == 0) { self.integrity_order[integrity_index] = NAS_SECURITY_ALGORITHMS_128_EIA2; self.num_of_integrity_order++; } else if (strcmp(v, "EIA3") == 0) { self.integrity_order[integrity_index] = NAS_SECURITY_ALGORITHMS_128_EIA3; self.num_of_integrity_order++; } } } while( yaml_iter_type(&integrity_order_iter) == YAML_SEQUENCE_NODE); } else if (!strcmp(security_key, "ciphering_order")) { yaml_iter_t ciphering_order_iter; yaml_iter_recurse(&security_iter, &ciphering_order_iter); d_assert(yaml_iter_type(&ciphering_order_iter) != YAML_MAPPING_NODE, return CORE_ERROR,); do { const char *v = NULL; if (yaml_iter_type(&ciphering_order_iter) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&ciphering_order_iter)) break; } v = yaml_iter_value(&ciphering_order_iter); if (v) { int ciphering_index = self.num_of_ciphering_order; if (strcmp(v, "EEA0") == 0) { self.ciphering_order[ciphering_index] = NAS_SECURITY_ALGORITHMS_EEA0; self.num_of_ciphering_order++; } else if (strcmp(v, "EEA1") == 0) { self.ciphering_order[ciphering_index] = NAS_SECURITY_ALGORITHMS_128_EEA1; self.num_of_ciphering_order++; } else if (strcmp(v, "EEA2") == 0) { self.ciphering_order[ciphering_index] = NAS_SECURITY_ALGORITHMS_128_EEA2; self.num_of_ciphering_order++; } else if (strcmp(v, "EEA3") == 0) { self.ciphering_order[ciphering_index] = NAS_SECURITY_ALGORITHMS_128_EEA3; self.num_of_ciphering_order++; } } } while( yaml_iter_type(&ciphering_order_iter) == YAML_SEQUENCE_NODE); } } } else if(!strcmp(mme_key, "network_name")) { yaml_iter_t network_name_iter; yaml_iter_recurse(&mme_iter, &network_name_iter); while(yaml_iter_next(&network_name_iter)) { const char *network_name_key = yaml_iter_key(&network_name_iter); d_assert(network_name_key, return CORE_ERROR,); if (!strcmp(network_name_key, "full")) { nas_network_name_t *network_full_name = &self.full_name; const char *c_network_name = yaml_iter_value(&network_name_iter); c_uint8_t size = strlen(c_network_name); c_uint8_t i; for(i = 0;iname[i*2] = 0; network_full_name->name[(i*2)+1] = c_network_name[i]; } network_full_name->length = size*2+1; network_full_name->coding_scheme = 1; } else if (!strcmp(network_name_key, "short")) { nas_network_name_t *network_short_name = &self.short_name; const char *c_network_name = yaml_iter_value(&network_name_iter); c_uint8_t size = strlen(c_network_name); c_uint8_t i; for(i = 0;iname[i*2] = 0; network_short_name->name[(i*2)+1] = c_network_name[i]; } network_short_name->length = size*2+1; network_short_name->coding_scheme = 1; } } } else d_warn("unknown key `%s`", mme_key); } } else if (!strcmp(root_key, "sgw")) { yaml_iter_t mme_iter; yaml_iter_recurse(&root_iter, &mme_iter); while(yaml_iter_next(&mme_iter)) { const char *mme_key = yaml_iter_key(&mme_iter); d_assert(mme_key, return CORE_ERROR,); if (!strcmp(mme_key, "gtpc")) { yaml_iter_t gtpc_array, gtpc_iter; yaml_iter_recurse(&mme_iter, >pc_array); do { gtp_node_t *sgw = NULL; c_sockaddr_t *list = NULL; int family = AF_UNSPEC; int i, num = 0; const char *hostname[MAX_NUM_OF_HOSTNAME]; c_uint16_t port = self.gtpc_port; if (yaml_iter_type(>pc_array) == YAML_MAPPING_NODE) { memcpy(>pc_iter, >pc_array, sizeof(yaml_iter_t)); } else if (yaml_iter_type(>pc_array) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(>pc_array)) break; yaml_iter_recurse(>pc_array, >pc_iter); } else if (yaml_iter_type(>pc_array) == YAML_SCALAR_NODE) { break; } else d_assert(0, return CORE_ERROR,); while(yaml_iter_next(>pc_iter)) { const char *gtpc_key = yaml_iter_key(>pc_iter); d_assert(gtpc_key, return CORE_ERROR,); if (!strcmp(gtpc_key, "family")) { const char *v = yaml_iter_value(>pc_iter); if (v) family = atoi(v); if (family != AF_UNSPEC && family != AF_INET && family != AF_INET6) { d_warn("Ignore family(%d) : AF_UNSPEC(%d), " "AF_INET(%d), AF_INET6(%d) ", family, AF_UNSPEC, AF_INET, AF_INET6); family = AF_UNSPEC; } } else if (!strcmp(gtpc_key, "addr") || !strcmp(gtpc_key, "name")) { yaml_iter_t hostname_iter; yaml_iter_recurse(>pc_iter, &hostname_iter); d_assert(yaml_iter_type(&hostname_iter) != YAML_MAPPING_NODE, return CORE_ERROR,); do { if (yaml_iter_type(&hostname_iter) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&hostname_iter)) break; } d_assert(num <= MAX_NUM_OF_HOSTNAME, return CORE_ERROR,); hostname[num++] = yaml_iter_value(&hostname_iter); } while( yaml_iter_type(&hostname_iter) == YAML_SEQUENCE_NODE); } else if (!strcmp(gtpc_key, "port")) { const char *v = yaml_iter_value(>pc_iter); if (v) port = atoi(v); } else d_warn("unknown key `%s`", gtpc_key); } list = NULL; for (i = 0; i < num; i++) { rv = core_addaddrinfo(&list, family, hostname[i], port, 0); d_assert(rv == CORE_OK, return CORE_ERROR,); } rv = gtp_add_node(&self.sgw_list, &sgw, list, context_self()->parameter.no_ipv4, context_self()->parameter.no_ipv6, context_self()->parameter.prefer_ipv4); d_assert(rv == CORE_OK, return CORE_ERROR,); core_freeaddrinfo(list); } while(yaml_iter_type(>pc_array) == YAML_SEQUENCE_NODE); } } } else if (!strcmp(root_key, "pgw")) { yaml_iter_t mme_iter; yaml_iter_recurse(&root_iter, &mme_iter); while(yaml_iter_next(&mme_iter)) { const char *mme_key = yaml_iter_key(&mme_iter); d_assert(mme_key, return CORE_ERROR,); if (!strcmp(mme_key, "gtpc")) { yaml_iter_t gtpc_array, gtpc_iter; yaml_iter_recurse(&mme_iter, >pc_array); do { gtp_node_t *pgw = NULL; c_sockaddr_t *list = NULL; int family = AF_UNSPEC; int i, num = 0; const char *hostname[MAX_NUM_OF_HOSTNAME]; c_uint16_t port = self.gtpc_port; if (yaml_iter_type(>pc_array) == YAML_MAPPING_NODE) { memcpy(>pc_iter, >pc_array, sizeof(yaml_iter_t)); } else if (yaml_iter_type(>pc_array) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(>pc_array)) break; yaml_iter_recurse(>pc_array, >pc_iter); } else if (yaml_iter_type(>pc_array) == YAML_SCALAR_NODE) { break; } else d_assert(0, return CORE_ERROR,); while(yaml_iter_next(>pc_iter)) { const char *gtpc_key = yaml_iter_key(>pc_iter); d_assert(gtpc_key, return CORE_ERROR,); if (!strcmp(gtpc_key, "family")) { const char *v = yaml_iter_value(>pc_iter); if (v) family = atoi(v); if (family != AF_UNSPEC && family != AF_INET && family != AF_INET6) { d_warn("Ignore family(%d) : AF_UNSPEC(%d), " "AF_INET(%d), AF_INET6(%d) ", family, AF_UNSPEC, AF_INET, AF_INET6); family = AF_UNSPEC; } } else if (!strcmp(gtpc_key, "addr") || !strcmp(gtpc_key, "name")) { yaml_iter_t hostname_iter; yaml_iter_recurse(>pc_iter, &hostname_iter); d_assert(yaml_iter_type(&hostname_iter) != YAML_MAPPING_NODE, return CORE_ERROR,); do { if (yaml_iter_type(&hostname_iter) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&hostname_iter)) break; } d_assert(num <= MAX_NUM_OF_HOSTNAME, return CORE_ERROR,); hostname[num++] = yaml_iter_value(&hostname_iter); } while( yaml_iter_type(&hostname_iter) == YAML_SEQUENCE_NODE); } else if (!strcmp(gtpc_key, "port")) { const char *v = yaml_iter_value(>pc_iter); if (v) port = atoi(v); } else d_warn("unknown key `%s`", gtpc_key); } list = NULL; for (i = 0; i < num; i++) { rv = core_addaddrinfo(&list, family, hostname[i], port, 0); d_assert(rv == CORE_OK, return CORE_ERROR,); } rv = gtp_add_node(&self.pgw_list, &pgw, list, context_self()->parameter.no_ipv4, context_self()->parameter.no_ipv6, context_self()->parameter.prefer_ipv4); d_assert(rv == CORE_OK, return CORE_ERROR,); core_freeaddrinfo(list); } while(yaml_iter_type(>pc_array) == YAML_SEQUENCE_NODE); } } } } rv = mme_context_validation(); if (rv != CORE_OK) return rv; return CORE_OK; } status_t mme_context_setup_trace_module() { int app = context_self()->logger.trace.app; int s1ap = context_self()->logger.trace.s1ap; int nas = context_self()->logger.trace.nas; int diameter = context_self()->logger.trace.diameter; int gtpv2 = context_self()->logger.trace.gtpv2; if (app) { extern int _mme_context; d_trace_level(&_mme_context, app); extern int _mme_sm; d_trace_level(&_mme_sm, app); } if (s1ap) { extern int _s1ap_sm; d_trace_level(&_s1ap_sm, s1ap); extern int _s1ap_build; d_trace_level(&_s1ap_build, s1ap); extern int _s1ap_conv; d_trace_level(&_s1ap_conv, s1ap); extern int _s1ap_handler; d_trace_level(&_s1ap_handler, s1ap); extern int _s1ap_sctp; d_trace_level(&_s1ap_sctp, s1ap); extern int _s1ap_path; d_trace_level(&_s1ap_path, s1ap); extern int _s1ap_decoder; d_trace_level(&_s1ap_decoder, s1ap); extern int _s1ap_encoder; d_trace_level(&_s1ap_encoder, s1ap); } if (nas) { extern int _emm_sm; d_trace_level(&_emm_sm, nas); extern int _esm_sm; d_trace_level(&_esm_sm, nas); extern int _emm_build; d_trace_level(&_emm_build, nas); extern int _esm_build; d_trace_level(&_esm_build, nas); extern int _emm_handler; d_trace_level(&_emm_handler, nas); extern int _esm_handler; d_trace_level(&_esm_handler, nas); extern int _nas_path; d_trace_level(&_nas_path, nas); extern int _nas_decoder; d_trace_level(&_nas_decoder, nas); extern int _nas_encoder; d_trace_level(&_nas_encoder, nas); extern int _nas_ies; d_trace_level(&_nas_ies, nas); } if (diameter) { extern int _mme_fd_path; d_trace_level(&_mme_fd_path, diameter); extern int _fd_init; d_trace_level(&_fd_init, diameter); extern int _fd_logger; d_trace_level(&_fd_logger, diameter); } if (gtpv2) { extern int _mme_s11_handler; d_trace_level(&_mme_s11_handler, gtpv2); extern int _mme_gtp_path; d_trace_level(&_mme_gtp_path, gtpv2); extern int _gtp_node; d_trace_level(&_gtp_node, gtpv2); extern int _gtp_message; d_trace_level(&_gtp_message, gtpv2); extern int _gtp_path; d_trace_level(&_gtp_path, gtpv2); extern int _gtp_xact; d_trace_level(&_gtp_xact, gtpv2); extern int _tlv_msg; d_trace_level(&_tlv_msg, gtpv2); } return CORE_OK; } mme_enb_t* mme_enb_add(sock_id sock, c_sockaddr_t *addr) { mme_enb_t *enb = NULL; event_t e; d_assert(sock, return NULL,); d_assert(addr, return NULL,); index_alloc(&mme_enb_pool, &enb); d_assert(enb, return NULL, "Null param"); enb->sock = sock; enb->addr = addr; enb->sock_type = mme_enb_sock_type(enb->sock); enb->outbound_streams = context_self()->parameter.sctp_streams; list_init(&enb->enb_ue_list); hash_set(self.enb_sock_hash, &enb->sock, sizeof(enb->sock), enb); hash_set(self.enb_addr_hash, enb->addr, sizeof(c_sockaddr_t), enb); event_set_param1(&e, (c_uintptr_t)enb->index); fsm_create(&enb->sm, s1ap_state_initial, s1ap_state_final); fsm_init(&enb->sm, &e); return enb; } status_t mme_enb_remove(mme_enb_t *enb) { event_t e; d_assert(enb, return CORE_ERROR, "Null param"); d_assert(enb->sock, return CORE_ERROR, "Null param"); event_set_param1(&e, (c_uintptr_t)enb->index); fsm_final(&enb->sm, &e); fsm_clear(&enb->sm); hash_set(self.enb_sock_hash, &enb->sock, sizeof(enb->sock), NULL); hash_set(self.enb_addr_hash, enb->addr, sizeof(c_sockaddr_t), NULL); if (enb->enb_id) hash_set(self.enb_id_hash, &enb->enb_id, sizeof(enb->enb_id), NULL); enb_ue_remove_in_enb(enb); CORE_FREE(enb->addr); index_free(&mme_enb_pool, enb); return CORE_OK; } status_t mme_enb_remove_all() { hash_index_t *hi = NULL; mme_enb_t *enb = NULL; for (hi = mme_enb_first(); hi; hi = mme_enb_next(hi)) { enb = mme_enb_this(hi); if (enb->sock_type == SOCK_STREAM) s1ap_delete(enb->sock); mme_enb_remove(enb); } return CORE_OK; } mme_enb_t* mme_enb_find(index_t index) { d_assert(index, return NULL, "Invalid Index"); return index_find(&mme_enb_pool, index); } mme_enb_t* mme_enb_find_by_sock(sock_id sock) { d_assert(sock, return NULL,"Invalid param"); return (mme_enb_t *)hash_get(self.enb_sock_hash, &sock, sizeof(sock)); return NULL; } mme_enb_t* mme_enb_find_by_addr(c_sockaddr_t *addr) { d_assert(addr, return NULL,"Invalid param"); return (mme_enb_t *)hash_get(self.enb_addr_hash, addr, sizeof(c_sockaddr_t)); return NULL; } mme_enb_t* mme_enb_find_by_enb_id(c_uint32_t enb_id) { d_assert(enb_id, return NULL,"Invalid param"); return (mme_enb_t *)hash_get(self.enb_id_hash, &enb_id, sizeof(enb_id)); } status_t mme_enb_set_enb_id(mme_enb_t *enb, c_uint32_t enb_id) { d_assert(enb, return CORE_ERROR, "Invalid param"); d_assert(enb_id, return CORE_ERROR, "Invalid param"); enb->enb_id = enb_id; hash_set(self.enb_id_hash, &enb->enb_id, sizeof(enb->enb_id), enb); return CORE_OK; } hash_index_t* mme_enb_first() { d_assert(self.enb_sock_hash, return NULL, "Null param"); return hash_first(self.enb_sock_hash); } hash_index_t* mme_enb_next(hash_index_t *hi) { return hash_next(hi); } mme_enb_t *mme_enb_this(hash_index_t *hi) { d_assert(hi, return NULL, "Null param"); return hash_this_val(hi); } int mme_enb_sock_type(sock_id sock) { sock_node_t *snode = NULL; d_assert(sock, return SOCK_STREAM,); for (snode = list_first(&mme_self()->s1ap_list); snode; snode = list_next(snode)) { if (snode->sock == sock) return SOCK_SEQPACKET; } for (snode = list_first(&mme_self()->s1ap_list6); snode; snode = list_next(snode)) { if (snode->sock == sock) return SOCK_SEQPACKET; } return SOCK_STREAM; } /** enb_ue_context handling function */ enb_ue_t* enb_ue_add(mme_enb_t *enb) { enb_ue_t *enb_ue = NULL; d_assert(self.mme_ue_s1ap_id_hash, return NULL, "Null param"); d_assert(enb, return NULL, "Null param"); index_alloc(&enb_ue_pool, &enb_ue); d_assert(enb_ue, return NULL, "Null param"); enb_ue->enb_ue_s1ap_id = INVALID_UE_S1AP_ID; enb_ue->mme_ue_s1ap_id = NEXT_ID(self.mme_ue_s1ap_id, 1, 0xffffffff); enb_ue->enb = enb; hash_set(self.mme_ue_s1ap_id_hash, &enb_ue->mme_ue_s1ap_id, sizeof(enb_ue->mme_ue_s1ap_id), enb_ue); list_append(&enb->enb_ue_list, enb_ue); /* Create S1 holding timer */ enb_ue->holding_timer = timer_create(&self.tm_service, MME_EVT_S1AP_S1_HOLDING_TIMER, self.s1_holding_timer_value * 1000); d_assert(enb_ue->holding_timer, return NULL, "Null param"); timer_set_param1(enb_ue->holding_timer, enb_ue->index); return enb_ue; } unsigned int enb_ue_count() { d_assert(self.mme_ue_s1ap_id_hash, return 0, "Null param"); return hash_count(self.mme_ue_s1ap_id_hash); } status_t enb_ue_remove(enb_ue_t *enb_ue) { status_t rv; d_assert(self.mme_ue_s1ap_id_hash, return CORE_ERROR, "Null param"); d_assert(enb_ue, return CORE_ERROR, "Null param"); d_assert(enb_ue->enb, return CORE_ERROR, "Null param"); /* De-associate S1 with NAS/EMM */ rv = enb_ue_deassociate(enb_ue); d_assert(rv == CORE_OK,,); /* Delete All Timers */ tm_delete(enb_ue->holding_timer); list_remove(&enb_ue->enb->enb_ue_list, enb_ue); hash_set(self.mme_ue_s1ap_id_hash, &enb_ue->mme_ue_s1ap_id, sizeof(enb_ue->mme_ue_s1ap_id), NULL); index_free(&enb_ue_pool, enb_ue); return CORE_OK; } status_t enb_ue_remove_in_enb(mme_enb_t *enb) { enb_ue_t *enb_ue = NULL, *next_enb_ue = NULL; enb_ue = enb_ue_first_in_enb(enb); while (enb_ue) { next_enb_ue = enb_ue_next_in_enb(enb_ue); enb_ue_remove(enb_ue); enb_ue = next_enb_ue; } return CORE_OK; } status_t enb_ue_switch_to_enb(enb_ue_t *enb_ue, mme_enb_t *new_enb) { d_assert(enb_ue, return CORE_ERROR, "Null param"); d_assert(enb_ue->enb, return CORE_ERROR, "Null param"); d_assert(new_enb, return CORE_ERROR, "Null param"); /* Remove from the old enb */ list_remove(&enb_ue->enb->enb_ue_list, enb_ue); /* Add to the new enb */ list_append(&new_enb->enb_ue_list, enb_ue); /* Switch to enb */ enb_ue->enb = new_enb; return CORE_OK; } enb_ue_t* enb_ue_find(index_t index) { d_assert(index, return NULL, "Invalid Index"); return index_find(&enb_ue_pool, index); } enb_ue_t* enb_ue_find_by_enb_ue_s1ap_id( mme_enb_t *enb, c_uint32_t enb_ue_s1ap_id) { enb_ue_t *enb_ue = NULL; enb_ue = enb_ue_first_in_enb(enb); while (enb_ue) { if (enb_ue_s1ap_id == enb_ue->enb_ue_s1ap_id) break; enb_ue = enb_ue_next_in_enb(enb_ue); } return enb_ue; } enb_ue_t* enb_ue_find_by_mme_ue_s1ap_id(c_uint32_t mme_ue_s1ap_id) { d_assert(self.mme_ue_s1ap_id_hash, return NULL, "Null param"); return hash_get(self.mme_ue_s1ap_id_hash, &mme_ue_s1ap_id, sizeof(mme_ue_s1ap_id)); } enb_ue_t* enb_ue_first_in_enb(mme_enb_t *enb) { return list_first(&enb->enb_ue_list); } enb_ue_t* enb_ue_next_in_enb(enb_ue_t *enb_ue) { return list_next(enb_ue); } static status_t mme_ue_new_guti(mme_ue_t *mme_ue) { served_gummei_t *served_gummei = NULL; d_assert(mme_ue, return CORE_ERROR, "Invalid param"); d_assert(mme_self()->max_num_of_served_gummei > 0, return CORE_ERROR, "Invalid param"); served_gummei = &mme_self()->served_gummei[0]; d_assert(served_gummei->num_of_plmn_id > 0, return CORE_ERROR, "Invalid param"); d_assert(served_gummei->num_of_mme_gid > 0, return CORE_ERROR, "Invalid param"); d_assert(served_gummei->num_of_mme_code > 0, return CORE_ERROR, "Invalid param"); if (mme_ue->m_tmsi) { /* MME has a VALID GUIT * As such, we need to remove previous GUTI in hash table */ hash_set(self.guti_ue_hash, &mme_ue->guti, sizeof(guti_t), NULL); d_assert(mme_m_tmsi_free(mme_ue->m_tmsi) == CORE_OK,,); } memset(&mme_ue->guti, 0, sizeof(guti_t)); /* Use the first configured plmn_id and mme group id */ memcpy(&mme_ue->guti.plmn_id, &served_gummei->plmn_id[0], PLMN_ID_LEN); mme_ue->guti.mme_gid = served_gummei->mme_gid[0]; mme_ue->guti.mme_code = served_gummei->mme_code[0]; mme_ue->m_tmsi = mme_m_tmsi_alloc(); d_assert(mme_ue->m_tmsi, return CORE_ERROR,); mme_ue->guti.m_tmsi = *(mme_ue->m_tmsi); hash_set(self.guti_ue_hash, &mme_ue->guti, sizeof(guti_t), mme_ue); return CORE_OK; } mme_ue_t* mme_ue_add(enb_ue_t *enb_ue) { mme_enb_t *enb = NULL; mme_ue_t *mme_ue = NULL; event_t e; d_assert(enb_ue, return NULL,); enb = enb_ue->enb; d_assert(enb, return NULL,); index_alloc(&mme_ue_pool, &mme_ue); d_assert(mme_ue, return NULL, "Null param"); list_init(&mme_ue->sess_list); mme_ue->mme_s11_teid = mme_ue->index; /* * SCTP output stream identification * Default context_self()->parameter.sctp_streams : 30 * 0 : Non UE signalling * 1-29 : UE specific association */ mme_ue->ostream_id = NEXT_ID(self.ostream_id, 1, enb->outbound_streams-1); /* Create New GUTI */ mme_ue_new_guti(mme_ue); /* Setup SGW with round-robin manner */ if (mme_self()->sgw == NULL) mme_self()->sgw = list_first(&mme_self()->sgw_list); SETUP_GTP_NODE(mme_ue, mme_self()->sgw); mme_self()->sgw = list_next(mme_self()->sgw); /* Create paging retry timer */ mme_ue->t3413 = timer_create(&self.tm_service, MME_EVT_EMM_T3413, self.t3413_value * 1000); d_assert(mme_ue->t3413, return NULL, "Null param"); timer_set_param1(mme_ue->t3413, mme_ue->index); event_set_param1(&e, (c_uintptr_t)mme_ue->index); fsm_create(&mme_ue->sm, emm_state_initial, emm_state_final); fsm_init(&mme_ue->sm, &e); return mme_ue; } status_t mme_ue_remove(mme_ue_t *mme_ue) { status_t rv; event_t e; d_assert(mme_ue, return CORE_ERROR, "Null param"); event_set_param1(&e, (c_uintptr_t)mme_ue->index); fsm_final(&mme_ue->sm, &e); fsm_clear(&mme_ue->sm); /* Clear hash table */ if (mme_ue->m_tmsi) { hash_set(self.guti_ue_hash, &mme_ue->guti, sizeof(guti_t), NULL); d_assert(mme_m_tmsi_free(mme_ue->m_tmsi) == CORE_OK,,); } if (mme_ue->imsi_len != 0) hash_set(self.imsi_ue_hash, mme_ue->imsi, mme_ue->imsi_len, NULL); /* Clear the saved PDN Connectivity Request */ NAS_CLEAR_DATA(&mme_ue->pdn_connectivity_request); /* Clear Paging info : stop t3413, last_paing_msg */ CLEAR_PAGING_INFO(mme_ue); /* Free UeRadioCapability */ S1AP_CLEAR_DATA(&mme_ue->ueRadioCapability); /* Clear Transparent Container */ S1AP_CLEAR_DATA(&mme_ue->container); /* Delete All Timers */ tm_delete(mme_ue->t3413); rv = mme_ue_deassociate(mme_ue); d_assert(rv == CORE_OK,,); mme_sess_remove_all(mme_ue); mme_pdn_remove_all(mme_ue); index_free(&mme_ue_pool, mme_ue); return CORE_OK; } status_t mme_ue_remove_all() { hash_index_t *hi = NULL; mme_ue_t *mme_ue = NULL; for (hi = mme_ue_first(); hi; hi = mme_ue_next(hi)) { mme_ue = mme_ue_this(hi); mme_ue_remove(mme_ue); } return CORE_OK; } mme_ue_t* mme_ue_find(index_t index) { d_assert(index, return NULL, "Invalid Index"); return index_find(&mme_ue_pool, index); } mme_ue_t* mme_ue_find_by_imsi_bcd(c_int8_t *imsi_bcd) { c_uint8_t imsi[MAX_IMSI_LEN]; int imsi_len = 0; d_assert(imsi_bcd, return NULL,"Invalid param"); core_bcd_to_buffer(imsi_bcd, imsi, &imsi_len); return mme_ue_find_by_imsi(imsi, imsi_len); } mme_ue_t* mme_ue_find_by_imsi(c_uint8_t *imsi, int imsi_len) { d_assert(imsi && imsi_len, return NULL,"Invalid param"); return (mme_ue_t *)hash_get(self.imsi_ue_hash, imsi, imsi_len); } mme_ue_t* mme_ue_find_by_guti(guti_t *guti) { d_assert(guti, return NULL,"Invalid param"); return (mme_ue_t *)hash_get(self.guti_ue_hash, guti, sizeof(guti_t)); } mme_ue_t* mme_ue_find_by_teid(c_uint32_t teid) { return mme_ue_find(teid); } hash_index_t *mme_ue_first() { d_assert(self.imsi_ue_hash, return NULL, "Null param"); return hash_first(self.imsi_ue_hash); } hash_index_t *mme_ue_next(hash_index_t *hi) { return hash_next(hi); } mme_ue_t *mme_ue_this(hash_index_t *hi) { d_assert(hi, return NULL, "Null param"); return hash_this_val(hi); } mme_ue_t* mme_ue_find_by_message(nas_message_t *message) { mme_ue_t *mme_ue = NULL; switch(message->emm.h.message_type) { case NAS_ATTACH_REQUEST: { nas_attach_request_t *attach_request = &message->emm.attach_request; nas_eps_mobile_identity_t *eps_mobile_identity = &attach_request->eps_mobile_identity; switch(eps_mobile_identity->imsi.type) { case NAS_EPS_MOBILE_IDENTITY_IMSI: { c_int8_t imsi_bcd[MAX_IMSI_BCD_LEN+1]; nas_imsi_to_bcd( &eps_mobile_identity->imsi, eps_mobile_identity->length, imsi_bcd); mme_ue = mme_ue_find_by_imsi_bcd(imsi_bcd); if (mme_ue) { d_trace(9, "known UE by IMSI[%s]\n", imsi_bcd); } else { d_trace(9, "Unknown UE by IMSI[%s]\n", imsi_bcd); } break; } case NAS_EPS_MOBILE_IDENTITY_GUTI: { nas_eps_mobile_identity_guti_t *nas_guti = NULL; nas_guti = &eps_mobile_identity->guti; guti_t guti; guti.plmn_id = nas_guti->plmn_id; guti.mme_gid = nas_guti->mme_gid; guti.mme_code = nas_guti->mme_code; guti.m_tmsi = nas_guti->m_tmsi; mme_ue = mme_ue_find_by_guti(&guti); if (mme_ue) { d_trace(9, "Known UE by GUTI[G:%d,C:%d,M_TMSI:0x%x]\n", guti.mme_gid, guti.mme_code, guti.m_tmsi); } else { d_warn("Unknown UE by GUTI[G:%d,C:%d,M_TMSI:0x%x]", guti.mme_gid, guti.mme_code, guti.m_tmsi); } break; } default: { d_error("Uknown message imsi type =%d\n", eps_mobile_identity->imsi.type); break; } } break; } case NAS_DETACH_REQUEST: { /* TODO */ break; } case NAS_TRACKING_AREA_UPDATE_REQUEST: { nas_tracking_area_update_request_t *tau_request = &message->emm.tracking_area_update_request; nas_eps_mobile_identity_t *eps_mobile_identity = &tau_request->old_guti; switch(eps_mobile_identity->imsi.type) { case NAS_EPS_MOBILE_IDENTITY_GUTI: { nas_eps_mobile_identity_guti_t *nas_guti = NULL; nas_guti = &eps_mobile_identity->guti; guti_t guti; guti.plmn_id = nas_guti->plmn_id; guti.mme_gid = nas_guti->mme_gid; guti.mme_code = nas_guti->mme_code; guti.m_tmsi = nas_guti->m_tmsi; mme_ue = mme_ue_find_by_guti(&guti); if (mme_ue) { d_trace(9, "Known UE by GUTI[G:%d,C:%d,M_TMSI:0x%x]\n", guti.mme_gid, guti.mme_code, guti.m_tmsi); } else { d_warn("Unknown UE by GUTI[G:%d,C:%d,M_TMSI:0x%x]", guti.mme_gid, guti.mme_code, guti.m_tmsi); } break; } default: { d_error("Uknown message imsi type =%d\n", eps_mobile_identity->imsi.type); break; } } break; } default: { break; } } return mme_ue; } status_t mme_ue_set_imsi(mme_ue_t *mme_ue, c_int8_t *imsi_bcd) { d_assert(mme_ue && imsi_bcd, return CORE_ERROR, "Invalid param"); core_cpystrn(mme_ue->imsi_bcd, imsi_bcd, MAX_IMSI_BCD_LEN+1); core_bcd_to_buffer(mme_ue->imsi_bcd, mme_ue->imsi, &mme_ue->imsi_len); hash_set(self.imsi_ue_hash, mme_ue->imsi, mme_ue->imsi_len, mme_ue); mme_ue->guti_present = 1; return CORE_OK; } int mme_ue_have_indirect_tunnel(mme_ue_t *mme_ue) { mme_sess_t *sess = NULL; sess = mme_sess_first(mme_ue); while(sess) { mme_bearer_t *bearer = mme_bearer_first(sess); while(bearer) { if (MME_HAVE_ENB_DL_INDIRECT_TUNNEL(bearer) || MME_HAVE_ENB_UL_INDIRECT_TUNNEL(bearer) || MME_HAVE_SGW_DL_INDIRECT_TUNNEL(bearer) || MME_HAVE_SGW_UL_INDIRECT_TUNNEL(bearer)) { return 1; } bearer = mme_bearer_next(bearer); } sess = mme_sess_next(sess); } return 0; } status_t mme_ue_clear_indirect_tunnel(mme_ue_t *mme_ue) { mme_sess_t *sess = NULL; d_assert(mme_ue, return CORE_ERROR,); sess = mme_sess_first(mme_ue); while(sess) { mme_bearer_t *bearer = mme_bearer_first(sess); while(bearer) { CLEAR_INDIRECT_TUNNEL(bearer); bearer = mme_bearer_next(bearer); } sess = mme_sess_next(sess); } return CORE_OK; } status_t mme_ue_associate_enb_ue(mme_ue_t *mme_ue, enb_ue_t *enb_ue) { d_assert(mme_ue, return CORE_ERROR, "Null param"); d_assert(enb_ue, return CORE_ERROR, "Null param"); mme_ue->enb_ue = enb_ue; enb_ue->mme_ue = mme_ue; return CORE_OK; } status_t enb_ue_deassociate(enb_ue_t *enb_ue) { d_assert(enb_ue, return CORE_ERROR, "Null param"); enb_ue->mme_ue = NULL; return CORE_OK; } status_t mme_ue_deassociate(mme_ue_t *mme_ue) { d_assert(mme_ue, return CORE_ERROR, "Null param"); mme_ue->enb_ue = NULL; return CORE_OK; } status_t source_ue_associate_target_ue( enb_ue_t *source_ue, enb_ue_t *target_ue) { mme_ue_t *mme_ue = NULL; d_assert(source_ue, return CORE_ERROR, "Null param"); d_assert(target_ue, return CORE_ERROR, "Null param"); mme_ue = source_ue->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); target_ue->mme_ue = mme_ue; target_ue->source_ue = source_ue; source_ue->target_ue = target_ue; return CORE_OK; } status_t source_ue_deassociate_target_ue(enb_ue_t *enb_ue) { enb_ue_t *source_ue = NULL; enb_ue_t *target_ue = NULL; d_assert(enb_ue, return CORE_ERROR,); if (enb_ue->target_ue) { source_ue = enb_ue; target_ue = enb_ue->target_ue; d_assert(source_ue->target_ue, return CORE_ERROR,); d_assert(target_ue->source_ue, return CORE_ERROR,); source_ue->target_ue = NULL; target_ue->source_ue = NULL; } else if (enb_ue->source_ue) { target_ue = enb_ue; source_ue = enb_ue->source_ue; d_assert(source_ue->target_ue, return CORE_ERROR,); d_assert(target_ue->source_ue, return CORE_ERROR,); source_ue->target_ue = NULL; target_ue->source_ue = NULL; } return CORE_OK; } mme_sess_t *mme_sess_add(mme_ue_t *mme_ue, c_uint8_t pti) { mme_sess_t *sess = NULL; mme_bearer_t *bearer = NULL; d_assert(mme_ue, return NULL, "Null param"); d_assert(pti != NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED, return NULL, "Invalid PTI(%d)", pti); index_alloc(&mme_sess_pool, &sess); d_assert(sess, return NULL, "Null param"); list_init(&sess->bearer_list); sess->mme_ue = mme_ue; sess->pti = pti; bearer = mme_bearer_add(sess); d_assert(bearer, mme_sess_remove(sess); return NULL, "Can't add default bearer context"); list_append(&mme_ue->sess_list, sess); return sess; } status_t mme_sess_remove(mme_sess_t *sess) { d_assert(sess, return CORE_ERROR, "Null param"); d_assert(sess->mme_ue, return CORE_ERROR, "Null param"); list_remove(&sess->mme_ue->sess_list, sess); mme_bearer_remove_all(sess); NAS_CLEAR_DATA(&sess->ue_pco); TLV_CLEAR_DATA(&sess->pgw_pco); index_free(&mme_sess_pool, sess); return CORE_OK; } status_t mme_sess_remove_all(mme_ue_t *mme_ue) { mme_sess_t *sess = NULL, *next_sess = NULL; sess = mme_sess_first(mme_ue); while (sess) { next_sess = mme_sess_next(sess); mme_sess_remove(sess); sess = next_sess; } return CORE_OK; } mme_sess_t* mme_sess_find(index_t index) { d_assert(index, return NULL, "Invalid Index"); return index_find(&mme_sess_pool, index); } mme_sess_t* mme_sess_find_by_pti(mme_ue_t *mme_ue, c_uint8_t pti) { mme_sess_t *sess = NULL; sess = mme_sess_first(mme_ue); while(sess) { if (pti == sess->pti) return sess; sess = mme_sess_next(sess); } return NULL; } mme_sess_t* mme_sess_find_by_ebi(mme_ue_t *mme_ue, c_uint8_t ebi) { mme_bearer_t *bearer = NULL; bearer = mme_bearer_find_by_ue_ebi(mme_ue, ebi); if (bearer) return bearer->sess; return NULL; } mme_sess_t* mme_sess_find_by_apn(mme_ue_t *mme_ue, c_int8_t *apn) { mme_sess_t *sess = NULL; sess = mme_sess_first(mme_ue); while(sess) { if (sess->pdn && strcmp(sess->pdn->apn, apn) == 0) return sess; sess = mme_sess_next(sess); } return NULL; } mme_sess_t* mme_sess_first(mme_ue_t *mme_ue) { return list_first(&mme_ue->sess_list); } mme_sess_t* mme_sess_next(mme_sess_t *sess) { return list_next(sess); } unsigned int mme_sess_count(mme_ue_t *mme_ue) { unsigned int count = 0; mme_sess_t *sess = NULL; sess = mme_sess_first(mme_ue); while(sess) { sess = mme_sess_next(sess); count++; } return count; } mme_bearer_t* mme_bearer_add(mme_sess_t *sess) { event_t e; mme_bearer_t *bearer = NULL; mme_ue_t *mme_ue = NULL; d_assert(sess, return NULL, "Null param"); mme_ue = sess->mme_ue; d_assert(mme_ue, return NULL, "Null param"); index_alloc(&mme_bearer_pool, &bearer); d_assert(bearer, return NULL, "Null param"); bearer->ebi = NEXT_ID(mme_ue->ebi, MIN_EPS_BEARER_ID, MAX_EPS_BEARER_ID); bearer->mme_ue = mme_ue; bearer->sess = sess; list_append(&sess->bearer_list, bearer); event_set_param1(&e, (c_uintptr_t)bearer->index); fsm_create(&bearer->sm, esm_state_initial, esm_state_final); fsm_init(&bearer->sm, &e); return bearer; } status_t mme_bearer_remove(mme_bearer_t *bearer) { event_t e; d_assert(bearer, return CORE_ERROR, "Null param"); d_assert(bearer->sess, return CORE_ERROR, "Null param"); event_set_param1(&e, (c_uintptr_t)bearer->index); fsm_final(&bearer->sm, &e); fsm_clear(&bearer->sm); list_remove(&bearer->sess->bearer_list, bearer); TLV_CLEAR_DATA(&bearer->tft); index_free(&mme_bearer_pool, bearer); return CORE_OK; } status_t mme_bearer_remove_all(mme_sess_t *sess) { mme_bearer_t *bearer = NULL, *next_bearer = NULL; d_assert(sess, return CORE_ERROR, "Null param"); bearer = mme_bearer_first(sess); while (bearer) { next_bearer = mme_bearer_next(bearer); mme_bearer_remove(bearer); bearer = next_bearer; } return CORE_OK; } mme_bearer_t* mme_bearer_find(index_t index) { d_assert(index, return NULL, "Invalid Index"); return index_find(&mme_bearer_pool, index); } mme_bearer_t* mme_bearer_find_by_sess_ebi(mme_sess_t *sess, c_uint8_t ebi) { mme_bearer_t *bearer = NULL; bearer = mme_bearer_first(sess); while(bearer) { if (ebi == bearer->ebi) return bearer; bearer = mme_bearer_next(bearer); } return NULL; } mme_bearer_t* mme_bearer_find_by_ue_ebi(mme_ue_t *mme_ue, c_uint8_t ebi) { mme_sess_t *sess = NULL; mme_bearer_t *bearer = NULL; sess = mme_sess_first(mme_ue); while (sess) { bearer = mme_bearer_find_by_sess_ebi(sess, ebi); if (bearer) { return bearer; } sess = mme_sess_next(sess); } return NULL; } mme_bearer_t* mme_bearer_find_or_add_by_message( mme_ue_t *mme_ue, nas_message_t *message) { c_uint8_t pti = NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED; c_uint8_t ebi = NAS_EPS_BEARER_IDENTITY_UNASSIGNED; mme_bearer_t *bearer = NULL; mme_sess_t *sess = NULL; d_assert(mme_ue, return NULL,); d_assert(message, return NULL,); pti = message->esm.h.procedure_transaction_identity; ebi = message->esm.h.eps_bearer_identity; d_trace(9, "mme_bearer_find_or_add_by_message() [PTI:%d, EBI:%d]\n", pti, ebi); if (ebi != NAS_EPS_BEARER_IDENTITY_UNASSIGNED) { bearer = mme_bearer_find_by_ue_ebi(mme_ue, ebi); d_assert(bearer, return NULL, "No Bearer : [EBI:%d]", ebi); return bearer; } d_assert(pti != NAS_PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED, return NULL, "Invalid param : [PTI:%d, EBI:%d]", pti, ebi); if (message->esm.h.message_type == NAS_PDN_CONNECTIVITY_REQUEST) { nas_pdn_connectivity_request_t *pdn_connectivity_request = &message->esm.pdn_connectivity_request; if (pdn_connectivity_request->presencemask & NAS_PDN_CONNECTIVITY_REQUEST_ACCESS_POINT_NAME_PRESENT) sess = mme_sess_find_by_apn(mme_ue, pdn_connectivity_request->access_point_name.apn); else sess = mme_sess_first(mme_ue); if (!sess) sess = mme_sess_add(mme_ue, pti); else sess->pti = pti; d_assert(sess, return NULL, "No Session : [PTI:%d]", pti); } else if (message->esm.h.message_type == NAS_PDN_DISCONNECT_REQUEST) { nas_pdn_disconnect_request_t *pdn_disconnect_request = &message->esm.pdn_disconnect_request; nas_linked_eps_bearer_identity_t *linked_eps_bearer_identity = &pdn_disconnect_request->linked_eps_bearer_identity; bearer = mme_bearer_find_by_ue_ebi(mme_ue, linked_eps_bearer_identity->eps_bearer_identity); d_assert(bearer, return NULL, "No Bearer : [Linked-EBI:%d, PTI:%d, EBI:%d]", linked_eps_bearer_identity->eps_bearer_identity, pti, ebi); sess = bearer->sess; d_assert(sess, return NULL, "No Session : [PTI:%d]", pti); sess->pti = pti; return bearer; } else { sess = mme_sess_find_by_pti(mme_ue, pti); d_assert(sess, return NULL, "No Session : [PTI:%d]", pti); } bearer = mme_default_bearer_in_sess(sess); d_assert(bearer, return NULL, "No Bearer : [EBI:%d]", ebi); return bearer; } mme_bearer_t* mme_default_bearer_in_sess(mme_sess_t *sess) { return mme_bearer_first(sess); } mme_bearer_t* mme_linked_bearer(mme_bearer_t *bearer) { mme_sess_t *sess = NULL; d_assert(bearer, return NULL, "Null param"); sess = bearer->sess; d_assert(sess, return NULL, "Null param"); return mme_default_bearer_in_sess(sess); } mme_bearer_t* mme_bearer_first(mme_sess_t *sess) { d_assert(sess, return NULL, "Null param"); return list_first(&sess->bearer_list); } mme_bearer_t* mme_bearer_next(mme_bearer_t *bearer) { return list_next(bearer); } int mme_bearer_is_inactive(mme_ue_t *mme_ue) { mme_sess_t *sess = NULL; d_assert(mme_ue, return 1,); sess = mme_sess_first(mme_ue); while(sess) { mme_bearer_t *bearer = mme_bearer_first(sess); while(bearer) { if (MME_HAVE_ENB_S1U_PATH(bearer)) { return 0; } bearer = mme_bearer_next(bearer); } sess = mme_sess_next(sess); } return 1; } status_t mme_bearer_set_inactive(mme_ue_t *mme_ue) { mme_sess_t *sess = NULL; d_assert(mme_ue, return CORE_ERROR,); sess = mme_sess_first(mme_ue); while(sess) { mme_bearer_t *bearer = mme_bearer_first(sess); while(bearer) { CLEAR_ENB_S1U_PATH(bearer); bearer = mme_bearer_next(bearer); } sess = mme_sess_next(sess); } return CORE_OK; } status_t mme_pdn_remove_all(mme_ue_t *mme_ue) { s6a_subscription_data_t *subscription_data = NULL; d_assert(mme_ue, return CORE_ERROR, "Null param"); subscription_data = &mme_ue->subscription_data; d_assert(subscription_data, return CORE_ERROR, "Null param"); subscription_data->num_of_pdn = 0; return CORE_OK; } pdn_t* mme_pdn_find_by_apn(mme_ue_t *mme_ue, c_int8_t *apn) { s6a_subscription_data_t *subscription_data = NULL; pdn_t *pdn = NULL; int i = 0; d_assert(mme_ue, return NULL, "Null param"); subscription_data = &mme_ue->subscription_data; d_assert(subscription_data, return NULL, "Null param"); for (i = 0; i < subscription_data->num_of_pdn; i++) { pdn = &subscription_data->pdn[i]; if (strcmp(pdn->apn, apn) == 0) return pdn; } return NULL; } pdn_t* mme_default_pdn(mme_ue_t *mme_ue) { s6a_subscription_data_t *subscription_data = NULL; pdn_t *pdn = NULL; int i = 0; d_assert(mme_ue, return NULL, "Null param"); subscription_data = &mme_ue->subscription_data; d_assert(subscription_data, return NULL, "Null param"); for (i = 0; i < subscription_data->num_of_pdn; i++) { pdn = &subscription_data->pdn[i]; if (pdn->context_identifier == subscription_data->context_identifier) return pdn; } return NULL; } int mme_find_served_tai(tai_t *tai) { int i = 0, j = 0, k = 0; d_assert(tai, return -1,); for (i = 0; i < self.num_of_served_tai; i++) { tai0_list_t *list0 = &self.served_tai[i].list0; d_assert(list0, return -1,); tai2_list_t *list2 = &self.served_tai[i].list2; d_assert(list2, return -1,); for (j = 0; list0->tai[j].num; j++) { d_assert(list0->tai[j].type == TAI0_TYPE, return -1, "type = %d", list0->tai[j].type); d_assert(list0->tai[j].num < MAX_NUM_OF_TAI, return -1, "num = %d", list0->tai[j].num); for (k = 0; k < list0->tai[j].num; k++) { if (memcmp(&list0->tai[j].plmn_id, &tai->plmn_id, PLMN_ID_LEN) == 0 && list0->tai[j].tac[k] == tai->tac) { return i; } } } if (list2->num) { d_assert(list2->type == TAI1_TYPE || list2->type == TAI2_TYPE, return -1, "type = %d", list2->type); d_assert(list2->num < MAX_NUM_OF_TAI, return -1, "num = %d", list2->num); for (j = 0; j < list2->num; j++) { if (memcmp(&list2->tai[j].plmn_id, &tai->plmn_id, PLMN_ID_LEN) == 0 && list2->tai[j].tac == tai->tac) { return i; } } } } return -1; } status_t mme_m_tmsi_pool_generate() { status_t rv; int i, j; int index = 0; d_trace(9, "M-TMSI Pool try to generate...\n"); for (i = 0; index < MAX_POOL_OF_UE; i++) { mme_m_tmsi_t *m_tmsi = NULL; int conflict = 0; m_tmsi = &self.m_tmsi.pool[index]; rv = core_generate_random_bytes((c_uint8_t *)m_tmsi, sizeof(*m_tmsi)); d_assert(rv == CORE_OK, return CORE_ERROR, "Cannot generate random"); /* for mapped-GUTI */ *m_tmsi |= 0xc0000000; *m_tmsi &= 0xff00ffff; for (j = 0; j < index; j++) { if (*m_tmsi == self.m_tmsi.pool[j]) { conflict = 1; d_trace(11, "[M-TMSI CONFLICT] %d:0x%x == %d:0x%x\n", index, *m_tmsi, j, self.m_tmsi.pool[j]); break; } } if (conflict == 1) continue; index++; } self.m_tmsi.size = index; d_trace(9, "M-TMSI Pool generate...done\n"); return CORE_OK; } mme_m_tmsi_t *mme_m_tmsi_alloc() { mme_m_tmsi_t *m_tmsi = NULL; pool_alloc_node(&self.m_tmsi, &m_tmsi); d_assert(m_tmsi, return NULL,); return m_tmsi; } status_t mme_m_tmsi_free(mme_m_tmsi_t *m_tmsi) { d_assert(m_tmsi, return CORE_ERROR,); pool_free_node(&self.m_tmsi, m_tmsi); return CORE_OK; } nextepc-0.3.10/src/mme/mme_context.h000066400000000000000000000571541333553357400173300ustar00rootroot00000000000000#ifndef __MME_CONTEXT__ #define __MME_CONTEXT__ #include "core_list.h" #include "core_index.h" #include "core_errno.h" #include "core_sha2.h" #include "core_hash.h" #include "core_network.h" #include "core_tlv_msg.h" #include "core_fsm.h" #include "core_msgq.h" #include "core_timer.h" #include "3gpp_types.h" #include "s1ap/s1ap_message.h" #include "nas/nas_message.h" #include "fd/s6a/s6a_message.h" /* S1AP */ #include "S1AP_Cause.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define MAX_PLMN_ID 6 #define GRP_PER_MME 256 /* According to spec it is 65535 */ #define CODE_PER_MME 256 /* According to spec it is 256 */ #define MAX_NUM_OF_SERVED_TAI 16 #define MAX_NUM_OF_SERVED_GUMMEI 8 #define MAX_NUM_OF_ALGORITHM 8 #define MAX_NUM_OF_BPLMN 6 typedef struct _enb_ue_t enb_ue_t; typedef struct _mme_ue_t mme_ue_t; typedef struct _gtp_node_t gtp_node_t; typedef struct _gtp_xact_t gtp_xact_t; typedef struct _fd_config_t fd_config_t; typedef c_uint32_t mme_m_tmsi_t; typedef struct _served_gummei { c_uint32_t num_of_plmn_id; plmn_id_t plmn_id[MAX_PLMN_ID]; c_uint32_t num_of_mme_gid; c_uint16_t mme_gid[GRP_PER_MME]; c_uint32_t num_of_mme_code; c_uint8_t mme_code[CODE_PER_MME]; } served_gummei_t; typedef struct _mme_context_t { const char *fd_conf_path; /* MME freeDiameter conf path */ fd_config_t *fd_config; /* MME freeDiameter config */ c_uint16_t s1ap_port; /* Default S1AP Port */ c_uint16_t gtpc_port; /* Default GTPC Port */ list_t s1ap_list; /* MME S1AP IPv4 Server List */ list_t s1ap_list6; /* MME S1AP IPv6 Server List */ list_t gtpc_list; /* MME GTPC IPv4 Server List */ list_t gtpc_list6; /* MME GTPC IPv6 Server List */ sock_id gtpc_sock; /* MME GTPC IPv4 Socket */ sock_id gtpc_sock6; /* MME GTPC IPv6 Socket */ c_sockaddr_t *gtpc_addr; /* MME GTPC IPv4 Address */ c_sockaddr_t *gtpc_addr6; /* MME GTPC IPv6 Address */ list_t sgw_list; /* SGW GTPC Client List */ gtp_node_t *sgw; /* Iterator for SGW round-robin */ list_t pgw_list; /* PGW GTPC Client List */ c_sockaddr_t *pgw_addr; /* First IPv4 Address Selected */ c_sockaddr_t *pgw_addr6; /* First IPv6 Address Selected */ /* Served GUMME */ c_uint8_t max_num_of_served_gummei; served_gummei_t served_gummei[MAX_NUM_OF_SERVED_GUMMEI]; /* Served TAI */ c_uint8_t num_of_served_tai; struct { tai0_list_t list0; tai2_list_t list2; } served_tai[MAX_NUM_OF_SERVED_TAI]; /* defined in 'nas_ies.h' * #define NAS_SECURITY_ALGORITHMS_EIA0 0 * #define NAS_SECURITY_ALGORITHMS_128_EEA1 1 * #define NAS_SECURITY_ALGORITHMS_128_EEA2 2 * #define NAS_SECURITY_ALGORITHMS_128_EEA3 3 */ c_uint8_t num_of_ciphering_order; c_uint8_t ciphering_order[MAX_NUM_OF_ALGORITHM]; /* defined in 'nas_ies.h' * #define NAS_SECURITY_ALGORITHMS_EIA0 0 * #define NAS_SECURITY_ALGORITHMS_128_EIA1 1 * #define NAS_SECURITY_ALGORITHMS_128_EIA1 2 * #define NAS_SECURITY_ALGORITHMS_128_EIA3 3 */ c_uint8_t num_of_integrity_order; c_uint8_t integrity_order[MAX_NUM_OF_ALGORITHM]; /* S1SetupResponse */ c_uint8_t relative_capacity; /* Timer value */ c_uint32_t t3413_value; /* Paging retry timer value */ c_uint32_t s1_holding_timer_value; /* S1 holding timer value */ /* Generator for unique identification */ c_uint32_t mme_ue_s1ap_id; /* mme_ue_s1ap_id generator */ c_uint16_t ostream_id; /* ostream_id generator */ /* M-TMSI Pool */ struct { int head, tail; int size, avail; mutex_id mut; mme_m_tmsi_t *free[MAX_POOL_OF_SESS], pool[MAX_POOL_OF_SESS]; } m_tmsi; hash_t *enb_sock_hash; /* hash table for ENB Socket */ hash_t *enb_addr_hash; /* hash table for ENB Address */ hash_t *enb_id_hash; /* hash table for ENB-ID */ hash_t *mme_ue_s1ap_id_hash; /* hash table for MME-UE-S1AP-ID */ hash_t *imsi_ue_hash; /* hash table (IMSI : MME_UE) */ hash_t *guti_ue_hash; /* hash table (GUTI : MME_UE) */ /* System */ msgq_id queue_id; /* Queue for processing MME control plane */ tm_service_t tm_service; /* Timer Service */ /* Network Name */ nas_network_name_t short_name; /* Network short name */ nas_network_name_t full_name; /* Network Full Name */ } mme_context_t; typedef struct _mme_enb_t { index_t index; /* An index of this node */ fsm_t sm; /* A state machine */ c_uint32_t enb_id; /* eNB_ID received from eNB */ int sock_type; /* SOCK_STREAM or SOCK_SEQPACKET */ sock_id sock; /* eNB S1AP Socket */ c_sockaddr_t *addr; /* eNB S1AP Address */ c_uint16_t outbound_streams; /* SCTP Max number of outbound streams */ c_uint8_t num_of_supported_ta_list; tai_t supported_ta_list[MAX_NUM_OF_TAI * MAX_NUM_OF_BPLMN]; list_t enb_ue_list; } mme_enb_t; struct _enb_ue_t { lnode_t node; /* A node of list_t */ index_t index; /* An index of this node */ /* UE identity */ #define INVALID_UE_S1AP_ID 0xffffffff /* Initial value of enb_ue_s1ap_id */ c_uint32_t enb_ue_s1ap_id; /* eNB-UE-S1AP-ID received from eNB */ c_uint32_t mme_ue_s1ap_id; /* MME-UE-S1AP-ID received from MME */ /* Handover Info */ S1AP_HandoverType_t handover_type; enb_ue_t *source_ue; enb_ue_t *target_ue; /* Use mme_ue->tai, mme_ue->e_cgi. * Do not access enb_ue->nas.tai enb_ue->nas.e_cgi. * * Save TAI and ECGI. And then, this will copy 'mme_ue_t' context later */ struct { tai_t tai; e_cgi_t e_cgi; } nas; /* Store by UE Context Release Command * Retrieve by UE Context Release Complete */ #define S1AP_UE_CTX_REL_INVALID_ACTION 0 #define S1AP_UE_CTX_REL_NO_ACTION 1 #define S1AP_UE_CTX_REL_S1_NORMAL_RELEASE 2 #define S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE 3 #define S1AP_UE_CTX_REL_DELETE_INDIRECT_TUNNEL 4 c_uint8_t ue_ctx_rel_action; /* * S1 holding timer * * When eNodeB sends Attach Request, TAU Request, Service Request repeatly, * S1(enb_ue_t) context is repeatly created. * * NAS(mme_ue_t) context is associated with last created S1(enb_ue_t) * context, and older S1(enb_ue_t) context might not be freed. * * If NAS(mme_ue_t) has already been associated with * older S1(enb_ue_t) context, the holding timer(30secs) is started. * Newly associated S1(enb_ue_t) context holding timer is stopped. * * If the holding timer expires, * S1(enb_ue_t) context will be implicitly deleted. */ tm_block_id holding_timer; /* Related Context */ mme_enb_t *enb; mme_ue_t *mme_ue; }; struct _mme_ue_t { index_t index; /* An index of this node */ fsm_t sm; /* A state machine */ struct { #define MME_EPS_TYPE_ATTACH_REQUEST 1 #define MME_EPS_TYPE_TAU_REQUEST 2 #define MME_EPS_TYPE_SERVICE_REQUEST 3 #define MME_EPS_TYPE_DETACH_REQUEST_FROM_UE 4 #define MME_EPS_TYPE_DETACH_REQUEST_TO_UE 5 c_uint8_t type; c_uint8_t ksi; union { nas_eps_attach_type_t attach; nas_eps_update_type_t update; nas_detach_type_t detach; c_uint8_t data; }; } nas_eps; /* UE identity */ #define MME_UE_HAVE_IMSI(__mME) \ ((__mME) && ((__mME)->imsi_len)) c_uint8_t imsi[MAX_IMSI_LEN]; int imsi_len; c_int8_t imsi_bcd[MAX_IMSI_BCD_LEN+1]; mme_m_tmsi_t *m_tmsi; guti_t guti; int guti_present; c_uint32_t mme_s11_teid; /* MME-S11-TEID is derived from INDEX */ c_uint32_t sgw_s11_teid; /* SGW-S11-TEID is received from SGW */ c_uint16_t ostream_id; /* SCTP output stream identification */ /* UE Info */ tai_t tai; e_cgi_t e_cgi; plmn_id_t visited_plmn_id; #define SECURITY_CONTEXT_IS_VALID(__mME) \ ((__mME) && \ ((__mME)->security_context_available == 1) && \ ((__mME)->mac_failed == 0) && \ ((__mME)->nas_eps.ksi != NAS_KSI_NO_KEY_IS_AVAILABLE)) #define CLEAR_SECURITY_CONTEXT(__mME) \ do { \ d_assert((__mME), break, "Null param"); \ (__mME)->security_context_available = 0; \ (__mME)->mac_failed = 0; \ (__mME)->nas_eps.ksi = 0; \ } while(0) int security_context_available; int mac_failed; /* Security Context */ nas_ue_network_capability_t ue_network_capability; nas_ms_network_capability_t ms_network_capability; c_uint8_t xres[MAX_RES_LEN]; c_uint8_t xres_len; c_uint8_t kasme[SHA256_DIGEST_SIZE]; c_uint8_t rand[RAND_LEN]; c_uint8_t knas_int[SHA256_DIGEST_SIZE/2]; c_uint8_t knas_enc[SHA256_DIGEST_SIZE/2]; c_uint32_t dl_count; union { struct { ED3(c_uint8_t spare;, c_uint16_t overflow;, c_uint8_t sqn;) } __attribute__ ((packed)); c_uint32_t i32; } ul_count; c_uint8_t kenb[SHA256_DIGEST_SIZE]; struct { ED2(c_uint8_t nhcc_spare:5;, c_uint8_t nhcc:3;) /* Next Hop Channing Counter */ }; c_uint8_t nh[SHA256_DIGEST_SIZE]; /* NH Security Key */ /* defined in 'nas_ies.h' * #define NAS_SECURITY_ALGORITHMS_EIA0 0 * #define NAS_SECURITY_ALGORITHMS_128_EEA1 1 * #define NAS_SECURITY_ALGORITHMS_128_EEA2 2 * #define NAS_SECURITY_ALGORITHMS_128_EEA3 3 */ c_uint8_t selected_enc_algorithm; /* defined in 'nas_ies.h' * #define NAS_SECURITY_ALGORITHMS_EIA0 0 * #define NAS_SECURITY_ALGORITHMS_128_EIA1 1 * #define NAS_SECURITY_ALGORITHMS_128_EIA1 2 * #define NAS_SECURITY_ALGORITHMS_128_EIA3 3 */ c_uint8_t selected_int_algorithm; /* HSS Info */ s6a_subscription_data_t subscription_data; /* ESM Info */ #define MIN_EPS_BEARER_ID 5 #define MAX_EPS_BEARER_ID 15 #define CLEAR_EPS_BEARER_ID(__mME) \ do { \ d_assert((__mME), break, "Null param"); \ (__mME)->ebi = MIN_EPS_BEARER_ID - 1; \ } while(0) c_uint8_t ebi; /* EPS Bearer ID generator */ list_t sess_list; #define ECM_CONNECTED(__mME) \ ((__mME) && ((__mME)->enb_ue != NULL) && \ enb_ue_find((__mME)->enb_ue->index)) #define ECM_IDLE(__mME) (!ECM_CONNECTED(__mME)) /* S1 UE context */ enb_ue_t *enb_ue; /* Save PDN Connectivity Request */ nas_esm_message_container_t pdn_connectivity_request; /* Paging */ #define CLEAR_PAGING_INFO(__mME) \ do { \ d_assert((__mME), break, "Null param"); \ \ tm_stop((__mME)->t3413); \ if ((__mME)->last_paging_msg) \ { \ pkbuf_free((__mME)->last_paging_msg); \ (__mME)->last_paging_msg = NULL; \ } \ (__mME)->max_paging_retry = 0; \ } while(0); pkbuf_t *last_paging_msg; tm_block_id t3413; #define MAX_NUM_OF_PAGING 2 c_uint32_t max_paging_retry; /* UE Radio Capability */ OCTET_STRING_t ueRadioCapability; /* S1AP Transparent Container */ OCTET_STRING_t container; /* GTP Request/Response Counter */ #define GTP_COUNTER_INCREMENT(__mME, __tYPE) \ do { \ d_assert((__mME), break,); \ ((__mME)->gtp_counter[__tYPE].request)++; \ } while(0); #define GTP_COUNTER_CHECK(__mME, __tYPE, __eXPR) \ do { \ d_assert((__mME), break,); \ if ((__mME)->gtp_counter[__tYPE].request == 0) break; \ ((__mME)->gtp_counter[__tYPE].response)++; \ if (((__mME)->gtp_counter[__tYPE].request) == \ ((__mME)->gtp_counter[__tYPE].response)) \ { \ ((__mME)->gtp_counter[__tYPE].request) = 0; \ ((__mME)->gtp_counter[__tYPE].response) = 0; \ __eXPR \ } \ } while(0); #define MAX_NUM_OF_GTP_COUNTER 16 #define GTP_COUNTER_MODIFY_BEARER_BY_PATH_SWITCH 1 #define GTP_COUNTER_MODIFY_BEARER_BY_HANDOVER_NOTIFY 2 struct { c_uint8_t request; c_uint8_t response; } gtp_counter[MAX_NUM_OF_GTP_COUNTER]; gtp_node_t *gnode; }; #define MME_HAVE_SGW_S1U_PATH(__sESS) \ ((__sESS) && (mme_bearer_first(__sESS)) && \ ((mme_default_bearer_in_sess(__sESS)->sgw_s1u_teid))) #define CLEAR_SGW_S1U_PATH(__sESS) \ do { \ mme_bearer_t *__bEARER = NULL; \ d_assert((__sESS), break, "Null param"); \ __bEARER = mme_default_bearer_in_sess(__sESS); \ __bEARER->sgw_s1u_teid = 0; \ } while(0) #define SESSION_CONTEXT_IS_AVAILABLE(__mME) \ ((__mME) && ((__mME)->sgw_s11_teid)) #define CLEAR_SESSION_CONTEXT(__mME) \ do { \ d_assert((__mME), break, "Null param"); \ (__mME)->sgw_s11_teid = 0; \ } while(0) typedef struct _mme_sess_t { lnode_t node; /* A node of list_t */ index_t index; /* An index of this node */ c_uint8_t pti; /* Procedure Trasaction Identity */ /* PDN Connectivity Request */ nas_request_type_t request_type; /* mme_bearer_first(sess) : Default Bearer Context */ list_t bearer_list; /* Related Context */ mme_ue_t *mme_ue; #define MME_UE_HAVE_APN(__mME) \ ((__mME) && (mme_sess_first(__mME)) && \ ((mme_sess_first(__mME))->pdn)) pdn_t *pdn; /* Save Protocol Configuration Options from UE */ struct { c_uint8_t length; c_uint8_t *buffer; } ue_pco; /* Save Protocol Configuration Options from PGW */ tlv_octet_t pgw_pco; } mme_sess_t; #define BEARER_CONTEXT_IS_ACTIVE(__mME) \ (mme_bearer_is_inactive(__mME) == 0) #define CLEAR_BEARER_CONTEXT(__mME) \ mme_bearer_set_inactive(__mME) #define MME_HAVE_ENB_S1U_PATH(__bEARER) \ ((__bEARER) && ((__bEARER)->enb_s1u_teid)) #define CLEAR_ENB_S1U_PATH(__bEARER) \ do { \ d_assert((__bEARER), break, "Null param"); \ (__bEARER)->enb_s1u_teid = 0; \ } while(0) #define MME_HAVE_ENB_DL_INDIRECT_TUNNEL(__bEARER) \ ((__bEARER) && ((__bEARER)->enb_dl_teid)) #define MME_HAVE_ENB_UL_INDIRECT_TUNNEL(__bEARER) \ ((__bEARER) && ((__bEARER)->enb_ul_teid)) #define MME_HAVE_SGW_DL_INDIRECT_TUNNEL(__bEARER) \ ((__bEARER) && ((__bEARER)->sgw_dl_teid)) #define MME_HAVE_SGW_UL_INDIRECT_TUNNEL(__bEARER) \ ((__bEARER) && ((__bEARER)->sgw_ul_teid)) #define CLEAR_INDIRECT_TUNNEL(__bEARER) \ do { \ d_assert((__bEARER), break, "Null param"); \ (__bEARER)->enb_dl_teid = 0; \ (__bEARER)->enb_ul_teid = 0; \ (__bEARER)->sgw_dl_teid = 0; \ (__bEARER)->sgw_ul_teid = 0; \ } while(0) typedef struct _mme_bearer_t { lnode_t node; /* A node of list_t */ index_t index; /* An index of this node */ fsm_t sm; /* State Machine */ c_uint8_t ebi; /* EPS Bearer ID */ c_uint32_t enb_s1u_teid; ip_t enb_s1u_ip; c_uint32_t sgw_s1u_teid; ip_t sgw_s1u_ip; c_uint32_t target_s1u_teid; /* Target S1U TEID from HO-Req-Ack */ ip_t target_s1u_ip; /* Target S1U ADDR from HO-Req-Ack */ c_uint32_t enb_dl_teid; ip_t enb_dl_ip; c_uint32_t enb_ul_teid; ip_t enb_ul_ip; c_uint32_t sgw_dl_teid; ip_t sgw_dl_ip; c_uint32_t sgw_ul_teid; ip_t sgw_ul_ip; qos_t qos; tlv_octet_t tft; /* Saved TFT */ /* Related Context */ mme_ue_t *mme_ue; mme_sess_t *sess; gtp_xact_t *xact; } mme_bearer_t; CORE_DECLARE(status_t) mme_context_init(void); CORE_DECLARE(status_t) mme_context_final(void); CORE_DECLARE(mme_context_t*) mme_self(void); CORE_DECLARE(status_t) mme_context_parse_config(void); CORE_DECLARE(status_t) mme_context_setup_trace_module(void); CORE_DECLARE(mme_enb_t*) mme_enb_add(sock_id sock, c_sockaddr_t *addr); CORE_DECLARE(status_t) mme_enb_remove(mme_enb_t *enb); CORE_DECLARE(status_t) mme_enb_remove_all(void); CORE_DECLARE(mme_enb_t*) mme_enb_find(index_t index); CORE_DECLARE(mme_enb_t*) mme_enb_find_by_sock(sock_id sock); CORE_DECLARE(mme_enb_t*) mme_enb_find_by_addr(c_sockaddr_t *addr); CORE_DECLARE(mme_enb_t*) mme_enb_find_by_enb_id(c_uint32_t enb_id); CORE_DECLARE(status_t) mme_enb_set_enb_id( mme_enb_t *enb, c_uint32_t enb_id); CORE_DECLARE(hash_index_t *) mme_enb_first(); CORE_DECLARE(hash_index_t *) mme_enb_next(hash_index_t *hi); CORE_DECLARE(mme_enb_t *) mme_enb_this(hash_index_t *hi); CORE_DECLARE(int) mme_enb_sock_type(sock_id sock); CORE_DECLARE(enb_ue_t*) enb_ue_add(mme_enb_t *enb); CORE_DECLARE(unsigned int) enb_ue_count(); CORE_DECLARE(status_t) enb_ue_remove(enb_ue_t *enb_ue); CORE_DECLARE(status_t) enb_ue_remove_in_enb(mme_enb_t *enb); CORE_DECLARE(status_t) enb_ue_switch_to_enb(enb_ue_t *enb_ue, mme_enb_t *new_enb); CORE_DECLARE(enb_ue_t*) enb_ue_find(index_t index); CORE_DECLARE(enb_ue_t*) enb_ue_find_by_enb_ue_s1ap_id(mme_enb_t *enb, c_uint32_t enb_ue_s1ap_id); CORE_DECLARE(enb_ue_t*) enb_ue_find_by_mme_ue_s1ap_id( c_uint32_t mme_ue_s1ap_id); CORE_DECLARE(enb_ue_t*) enb_ue_first_in_enb(mme_enb_t *enb); CORE_DECLARE(enb_ue_t*) enb_ue_next_in_enb(enb_ue_t *enb_ue); CORE_DECLARE(mme_ue_t*) mme_ue_add(enb_ue_t *enb_ue); CORE_DECLARE(status_t) mme_ue_remove(mme_ue_t *mme_ue); CORE_DECLARE(status_t) mme_ue_remove_all(); CORE_DECLARE(mme_ue_t*) mme_ue_find(index_t index); CORE_DECLARE(mme_ue_t*) mme_ue_find_by_imsi(c_uint8_t *imsi, int imsi_len); CORE_DECLARE(mme_ue_t*) mme_ue_find_by_imsi_bcd(c_int8_t *imsi_bcd); CORE_DECLARE(mme_ue_t*) mme_ue_find_by_guti(guti_t *guti); CORE_DECLARE(mme_ue_t*) mme_ue_find_by_teid(c_uint32_t teid); CORE_DECLARE(mme_ue_t*) mme_ue_find_by_message(nas_message_t *message); CORE_DECLARE(status_t) mme_ue_set_imsi( mme_ue_t *mme_ue, c_int8_t *imsi_bcd); CORE_DECLARE(int) mme_ue_have_indirect_tunnel(mme_ue_t *mme_ue); CORE_DECLARE(status_t) mme_ue_clear_indirect_tunnel(mme_ue_t *mme_ue); /* * o RECV Initial UE-Message : S-TMSI * o RECV Attach Request : IMSI, GUTI * o RECV TAU Request : GUTI * ### MME_UE_ASSOCIATE_ENB_UE() ### * ### MME_UE_ECM_CONNECTED() ### * * o RECV Initial Context Setup Failure in EMM Registered State * ### MME_UE_DEASSOCIATE_ENB_UE() ### * ### ENB_UE_REMOVE() ### * ### MME_UE_DEASSOCIATE() ### * * o SEND UE Context Release Command with NO_ACTION * - RECV UE Context Release Complete * ### ENB_UE_REMOVE() ### * ### MME_UE_DEASSOCIATE() ### * * o SEND UE Context Release Command with REMOVE_MME_UE_CONTEXT * - RECV UE Context Release Complete * ### ENB_UE_REMOVE() ### * ### MME_UE_REMOVE() ### * * * o RECV Handover Required * ### SOURCE_UE_ASSOCIATE_TARGET_UE() #### * - SEND Handover Request * * o RECV Handover Notify * ### MME_UE_ASSOCIATE_ENB_UE(TARGET) ### * ### MME_UE_ECM_CONNECTED(TARGET) ### * - Modify Bearer Request/Response * - UE Context Release Command/Complete * ### SOURCE_UE_DEASSOCIATE_TARGET_UE() #### * ### ENB_UE_REMOVE() #### * - Delete Indirect Data Forwarding Tunnel Request/Response * * o RECV Handover Cancel * - UE Context Release Command/Complete * ### SOURCE_UE_DEASSOCIATE_TARGET_UE() #### * ### ENB_UE_REMOVE() #### * - Delete Indirect Data Forwarding Tunnel Request/Response * * o RECV Handover Failure * - UE Context Release Command/Complete * ### SOURCE_UE_DEASSOCIATE_TARGET_UE() #### * ### ENB_UE_REMOVE() #### * - Delete Indirect Data Forwarding Tunnel Request/Response */ CORE_DECLARE(status_t) mme_ue_associate_enb_ue( mme_ue_t *mme_ue, enb_ue_t *enb_ue); CORE_DECLARE(status_t) enb_ue_deassociate(enb_ue_t *enb_ue); CORE_DECLARE(status_t) mme_ue_deassociate(mme_ue_t *mme_ue); CORE_DECLARE(status_t) source_ue_associate_target_ue( enb_ue_t *source_ue, enb_ue_t *target_ue); CORE_DECLARE(status_t) source_ue_deassociate_target_ue(enb_ue_t *enb_ue); CORE_DECLARE(hash_index_t *) mme_ue_first(); CORE_DECLARE(hash_index_t *) mme_ue_next(hash_index_t *hi); CORE_DECLARE(mme_ue_t *) mme_ue_this(hash_index_t *hi); CORE_DECLARE(mme_sess_t*) mme_sess_add(mme_ue_t *mme_ue, c_uint8_t pti); CORE_DECLARE(status_t ) mme_sess_remove(mme_sess_t *sess); CORE_DECLARE(status_t ) mme_sess_remove_all(mme_ue_t *mme_ue); CORE_DECLARE(mme_sess_t*) mme_sess_find(index_t index); CORE_DECLARE(mme_sess_t*) mme_sess_find_by_pti( mme_ue_t *mme_ue, c_uint8_t pti); CORE_DECLARE(mme_sess_t*) mme_sess_find_by_ebi( mme_ue_t *mme_ue, c_uint8_t ebi); CORE_DECLARE(mme_sess_t*) mme_sess_find_by_apn( mme_ue_t *mme_ue, c_int8_t *apn); CORE_DECLARE(mme_sess_t*) mme_sess_first(mme_ue_t *mme_ue); CORE_DECLARE(mme_sess_t*) mme_sess_next(mme_sess_t *sess); CORE_DECLARE(unsigned int) mme_sess_count(mme_ue_t *mme_ue); CORE_DECLARE(mme_bearer_t*) mme_bearer_add(mme_sess_t *sess); CORE_DECLARE(status_t) mme_bearer_remove(mme_bearer_t *bearer); CORE_DECLARE(status_t) mme_bearer_remove_all(mme_sess_t *sess); CORE_DECLARE(mme_bearer_t*) mme_bearer_find(index_t index); CORE_DECLARE(mme_bearer_t*) mme_bearer_find_by_sess_ebi( mme_sess_t *sess, c_uint8_t ebi); CORE_DECLARE(mme_bearer_t*) mme_bearer_find_by_ue_ebi( mme_ue_t *mme_ue, c_uint8_t ebi); CORE_DECLARE(mme_bearer_t*) mme_bearer_find_or_add_by_message( mme_ue_t *mme_ue, nas_message_t *message); CORE_DECLARE(mme_bearer_t*) mme_default_bearer_in_sess(mme_sess_t *sess); CORE_DECLARE(mme_bearer_t*) mme_linked_bearer(mme_bearer_t *bearer); CORE_DECLARE(mme_bearer_t*) mme_bearer_first(mme_sess_t *sess); CORE_DECLARE(mme_bearer_t*) mme_bearer_next(mme_bearer_t *bearer); CORE_DECLARE(int) mme_bearer_is_inactive(mme_ue_t *mme_ue); CORE_DECLARE(status_t) mme_bearer_set_inactive(mme_ue_t *mme_ue); CORE_DECLARE(pdn_t*) mme_pdn_add(mme_ue_t *mme_ue, c_int8_t *apn); CORE_DECLARE(status_t) mme_pdn_remove_all(mme_ue_t *mme_ue); CORE_DECLARE(pdn_t*) mme_pdn_find_by_apn( mme_ue_t *mme_ue, c_int8_t *apn); CORE_DECLARE(pdn_t*) mme_default_pdn(mme_ue_t *mme_ue); CORE_DECLARE(int) mme_find_served_tai(tai_t *tai); CORE_DECLARE(status_t) mme_m_tmsi_pool_generate(); CORE_DECLARE(mme_m_tmsi_t *) mme_m_tmsi_alloc(); CORE_DECLARE(status_t) mme_m_tmsi_free(mme_m_tmsi_t *tmsi); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __MME_CONTEXT__ */ nextepc-0.3.10/src/mme/mme_event.c000066400000000000000000000027251333553357400167520ustar00rootroot00000000000000#define TRACE_MODULE _mme_event #include "core_debug.h" #include "mme_event.h" char* mme_event_get_name(event_t *e) { if (e == NULL) return FSM_NAME_INIT_SIG; switch (event_get(e)) { case FSM_ENTRY_SIG: return FSM_NAME_ENTRY_SIG; case FSM_EXIT_SIG: return FSM_NAME_EXIT_SIG; case MME_EVT_S1AP_MESSAGE: return "MME_EVT_S1AP_MESSAGE"; case MME_EVT_S1AP_DELAYED_SEND: return "MME_EVT_S1AP_DELAYED_SEND"; case MME_EVT_S1AP_LO_ACCEPT: return "MME_EVT_S1AP_LO_ACCEPT"; case MME_EVT_S1AP_LO_SCTP_COMM_UP: return "MME_EVT_S1AP_LO_SCTP_COMM_UP"; case MME_EVT_S1AP_LO_CONNREFUSED: return "MME_EVT_S1AP_LO_CONNREFUSED"; case MME_EVT_S1AP_S1_HOLDING_TIMER: return "MME_EVT_S1AP_S1_HOLDING_TIMER"; case MME_EVT_EMM_MESSAGE: return "MME_EVT_EMM_MESSAGE"; case MME_EVT_EMM_T3413: return "MME_EVT_EMM_T3413"; case MME_EVT_ESM_MESSAGE: return "MME_EVT_ESM_MESSAGE"; case MME_EVT_S11_MESSAGE: return "MME_EVT_S11_MESSAGE"; case MME_EVT_S11_T3_RESPONSE: return "MME_EVT_S11_T3_RESPONSE"; case MME_EVT_S11_T3_HOLDING: return "MME_EVT_S11_T3_HOLDING"; case MME_EVT_S6A_MESSAGE: return "MME_EVT_S6A_MESSAGE"; default: break; } return EVT_NAME_UNKNOWN; } nextepc-0.3.10/src/mme/mme_event.h000066400000000000000000000015351333553357400167550ustar00rootroot00000000000000#ifndef __MME_EVENT_H__ #define __MME_EVENT_H__ #include "core_event.h" #include "core_fsm.h" #include "core_pkbuf.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /* forward declaration */ typedef enum { MME_EVT_BASE = FSM_USER_SIG, MME_EVT_S1AP_MESSAGE, MME_EVT_S1AP_DELAYED_SEND, MME_EVT_S1AP_LO_ACCEPT, MME_EVT_S1AP_LO_SCTP_COMM_UP, MME_EVT_S1AP_LO_CONNREFUSED, MME_EVT_S1AP_S1_HOLDING_TIMER, MME_EVT_EMM_MESSAGE, MME_EVT_EMM_T3413, MME_EVT_ESM_MESSAGE, MME_EVT_S11_MESSAGE, MME_EVT_S11_T3_RESPONSE, MME_EVT_S11_T3_HOLDING, MME_EVT_S6A_MESSAGE, MME_EVT_TOP, } event_e; #define mme_event_send(__ptr_e) event_send(mme_self()->queue_id, (__ptr_e)) CORE_DECLARE(char*) mme_event_get_name(event_t *e); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __MME_EVENT_H__ */ nextepc-0.3.10/src/mme/mme_fd_path.c000066400000000000000000001135111333553357400172320ustar00rootroot00000000000000#define TRACE_MODULE _mme_fd_path #include "core_debug.h" #include "core_pool.h" #include "core_lib.h" #include "fd/fd_lib.h" #include "fd/s6a/s6a_dict.h" #include "fd/s6a/s6a_message.h" #include "mme_event.h" #include "mme_fd_path.h" static struct session_handler *mme_s6a_reg = NULL; struct sess_state { mme_ue_t *mme_ue; struct timespec ts; /* Time of sending the message */ }; pool_declare(mme_s6a_sess_pool, struct sess_state, MAX_POOL_OF_DIAMETER_SESS); static void mme_s6a_aia_cb(void *data, struct msg **msg); static void mme_s6a_ula_cb(void *data, struct msg **msg); static void state_cleanup(struct sess_state *sess_data, os0_t sid, void *opaque) { pool_free_node(&mme_s6a_sess_pool, sess_data); } /* MME Sends Authentication Information Request to HSS */ void mme_s6a_send_air(mme_ue_t *mme_ue, nas_authentication_failure_parameter_t *authentication_failure_parameter) { int ret; struct msg *req = NULL; struct avp *avp; struct avp *avpch; union avp_value val; struct sess_state *sess_data = NULL, *svg; struct session *session = NULL; c_uint8_t resync[AUTS_LEN + RAND_LEN]; d_assert(mme_ue, return, "Null param"); d_trace(3, "[MME] Authentication-Information-Request\n"); /* Clear Security Context */ CLEAR_SECURITY_CONTEXT(mme_ue); /* Create the random value to store with the session */ pool_alloc_node(&mme_s6a_sess_pool, &sess_data); d_assert(sess_data, return,); sess_data->mme_ue = mme_ue; /* Create the request */ ret = fd_msg_new(s6a_cmd_air, MSGFL_ALLOC_ETEID, &req); d_assert(ret == 0, return,); /* Create a new session */ #define S6A_APP_SID_OPT "app_s6a" ret = fd_msg_new_session(req, (os0_t)S6A_APP_SID_OPT, CONSTSTRLEN(S6A_APP_SID_OPT)); d_assert(ret == 0, return,); ret = fd_msg_sess_get(fd_g_config->cnf_dict, req, &session, NULL); d_assert(ret == 0, return,); /* Set the Auth-Session-State AVP */ ret = fd_msg_avp_new(fd_auth_session_state, 0, &avp); d_assert(ret == 0, return,); val.i32 = 1; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Set Origin-Host & Origin-Realm */ ret = fd_msg_add_origin(req, 0); d_assert(ret == 0, return,); /* Set the Destination-Realm AVP */ ret = fd_msg_avp_new(fd_destination_realm, 0, &avp); d_assert(ret == 0, return,); val.os.data = (unsigned char *)(fd_g_config->cnf_diamrlm); val.os.len = strlen(fd_g_config->cnf_diamrlm); ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Set the User-Name AVP */ ret = fd_msg_avp_new(fd_user_name, 0, &avp); d_assert(ret == 0, return,); val.os.data = (c_uint8_t *)mme_ue->imsi_bcd; val.os.len = strlen(mme_ue->imsi_bcd); ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Add the Authentication-Info */ ret = fd_msg_avp_new(s6a_req_eutran_auth_info, 0, &avp); d_assert(ret == 0, return,); ret = fd_msg_avp_new(s6a_number_of_requested_vectors, 0, &avpch); d_assert(ret == 0, return,); val.u32 = 1; ret = fd_msg_avp_setvalue (avpch, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch); d_assert(ret == 0, return,); ret = fd_msg_avp_new(s6a_immediate_response_preferred, 0, &avpch); d_assert(ret == 0, return,); val.u32 = 1; ret = fd_msg_avp_setvalue(avpch, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, avpch); d_assert(ret == 0, return,); if (authentication_failure_parameter) { ret = fd_msg_avp_new(s6a_re_synchronization_info, 0, &avpch); d_assert(ret == 0, return,); memcpy(resync, mme_ue->rand, RAND_LEN); memcpy(resync+RAND_LEN, authentication_failure_parameter->auts, AUTS_LEN); val.os.len = RAND_LEN+AUTS_LEN; val.os.data = resync; ret = fd_msg_avp_setvalue(avpch, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, avpch); d_assert(ret == 0, return,); } ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Set the Visited-PLMN-Id AVP */ ret = fd_msg_avp_new(s6a_visited_plmn_id, 0, &avp); d_assert(ret == 0, return,); val.os.data = (c_uint8_t *)&mme_ue->visited_plmn_id; val.os.len = PLMN_ID_LEN; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Set Vendor-Specific-Application-Id AVP */ ret = fd_message_vendor_specific_appid_set(req, S6A_APPLICATION_ID); d_assert(ret == 0, return,); ret = clock_gettime(CLOCK_REALTIME, &sess_data->ts); d_assert(ret == 0, return,); /* Keep a pointer to the session data for debug purpose, * in real life we would not need it */ svg = sess_data; /* Store this value in the session */ ret = fd_sess_state_store(mme_s6a_reg, session, &sess_data); d_assert(ret == 0, return,); d_assert(sess_data == 0, return,); /* Send the request */ ret = fd_msg_send(&req, mme_s6a_aia_cb, svg); d_assert(ret == 0,,); /* Increment the counter */ d_assert(pthread_mutex_lock(&fd_logger_self()->stats_lock) == 0,, ); fd_logger_self()->stats.nb_sent++; d_assert(pthread_mutex_unlock(&fd_logger_self()->stats_lock) == 0,, ); } /* MME received Authentication Information Answer from HSS */ static void mme_s6a_aia_cb(void *data, struct msg **msg) { int ret; struct sess_state *sess_data = NULL; struct timespec ts; struct session *session; struct avp *avp, *avpch; struct avp *avp_e_utran_vector, *avp_xres, *avp_kasme, *avp_rand, *avp_autn; struct avp_hdr *hdr; unsigned long dur; int error = 0; int new; event_t e; mme_ue_t *mme_ue = NULL; pkbuf_t *s6abuf = NULL; s6a_message_t *s6a_message = NULL; s6a_aia_message_t *aia_message = NULL; c_uint16_t s6abuf_len = 0; e_utran_vector_t *e_utran_vector = NULL; d_trace(3, "[MME] Authentication-Information-Answer\n"); ret = clock_gettime(CLOCK_REALTIME, &ts); d_assert(ret == 0, return,); /* Search the session, retrieve its data */ ret = fd_msg_sess_get(fd_g_config->cnf_dict, *msg, &session, &new); d_assert(ret == 0, return,); d_assert(new == 0, return, ); ret = fd_sess_state_retrieve(mme_s6a_reg, session, &sess_data); d_assert(ret == 0, return,); d_assert(sess_data && (void *)sess_data == data, return, ); mme_ue = sess_data->mme_ue; d_assert(mme_ue, return, ); s6abuf_len = sizeof(s6a_message_t); d_assert(s6abuf_len < 8192, return, "Not supported size:%d", s6abuf_len); s6abuf = pkbuf_alloc(0, s6abuf_len); d_assert(s6abuf, return, "Null param"); s6a_message = s6abuf->payload; d_assert(s6a_message, return, "Null param"); /* Set Authentication-Information Command */ memset(s6a_message, 0, s6abuf_len); s6a_message->cmd_code = S6A_CMD_CODE_AUTHENTICATION_INFORMATION; aia_message = &s6a_message->aia_message; d_assert(aia_message, return, "Null param"); e_utran_vector = &aia_message->e_utran_vector; d_assert(e_utran_vector, return, "Null param"); /* Value of Result Code */ ret = fd_msg_search_avp(*msg, fd_result_code, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); s6a_message->result_code = hdr->avp_value->i32; d_trace(5, " Result Code: %d\n", hdr->avp_value->i32); } else { ret = fd_msg_search_avp(*msg, fd_experimental_result, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_avp_search_avp(avp, fd_experimental_result_code, &avpch); d_assert(ret == 0, return,); if (avpch) { ret = fd_msg_avp_hdr(avpch, &hdr); d_assert(ret == 0, return,); s6a_message->result_code = hdr->avp_value->i32; d_trace(5, " Experimental Result Code: %d\n", s6a_message->result_code); } } else { d_error("no Result-Code"); error++; } } /* Value of Origin-Host */ ret = fd_msg_search_avp(*msg, fd_origin_host, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); d_trace(5, " From '%.*s'\n", (int)hdr->avp_value->os.len, hdr->avp_value->os.data); } else { d_error("no_Origin-Host "); error++; } /* Value of Origin-Realm */ ret = fd_msg_search_avp(*msg, fd_origin_realm, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); d_trace(5, " ('%.*s')\n", (int)hdr->avp_value->os.len, hdr->avp_value->os.data); } else { d_error("no_Origin-Realm "); error++; } if (s6a_message->result_code != ER_DIAMETER_SUCCESS) { d_warn("ERROR DIAMETER Result Code(%d)", s6a_message->result_code); goto out; } ret = fd_msg_search_avp(*msg, s6a_authentication_info, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); } else { d_error("no_Authentication-Info "); error++; } ret = fd_avp_search_avp(avp, s6a_e_utran_vector, &avp_e_utran_vector); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp_e_utran_vector, &hdr); d_assert(ret == 0, return,); } else { d_error("no_E-UTRAN-Vector-Info "); error++; } ret = fd_avp_search_avp(avp_e_utran_vector, s6a_xres, &avp_xres); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp_xres, &hdr); d_assert(ret == 0, return,); memcpy(e_utran_vector->xres, hdr->avp_value->os.data, hdr->avp_value->os.len); e_utran_vector->xres_len = hdr->avp_value->os.len; } else { d_error("no_XRES"); error++; } ret = fd_avp_search_avp(avp_e_utran_vector, s6a_kasme, &avp_kasme); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp_kasme, &hdr); d_assert(ret == 0, return,); memcpy(e_utran_vector->kasme, hdr->avp_value->os.data, hdr->avp_value->os.len); } else { d_error("no_KASME"); error++; } ret = fd_avp_search_avp(avp_e_utran_vector, s6a_rand, &avp_rand); if (avp) { ret = fd_msg_avp_hdr(avp_rand, &hdr); memcpy(e_utran_vector->rand, hdr->avp_value->os.data, hdr->avp_value->os.len); } else { d_error("no_RAND"); error++; } ret = fd_avp_search_avp(avp_e_utran_vector, s6a_autn, &avp_autn); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp_autn, &hdr); d_assert(ret == 0, return,); memcpy(e_utran_vector->autn, hdr->avp_value->os.data, hdr->avp_value->os.len); } else { d_error("no_AUTN"); error++; } out: if (!error) { event_set(&e, MME_EVT_S6A_MESSAGE); event_set_param1(&e, (c_uintptr_t)mme_ue->index); event_set_param2(&e, (c_uintptr_t)s6abuf); mme_event_send(&e); } /* Free the message */ d_assert(pthread_mutex_lock(&fd_logger_self()->stats_lock) == 0,, ); dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) + ((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000); if (fd_logger_self()->stats.nb_recv) { /* Ponderate in the avg */ fd_logger_self()->stats.avg = (fd_logger_self()->stats.avg * fd_logger_self()->stats.nb_recv + dur) / (fd_logger_self()->stats.nb_recv + 1); /* Min, max */ if (dur < fd_logger_self()->stats.shortest) fd_logger_self()->stats.shortest = dur; if (dur > fd_logger_self()->stats.longest) fd_logger_self()->stats.longest = dur; } else { fd_logger_self()->stats.shortest = dur; fd_logger_self()->stats.longest = dur; fd_logger_self()->stats.avg = dur; } if (error) fd_logger_self()->stats.nb_errs++; else fd_logger_self()->stats.nb_recv++; d_assert(pthread_mutex_unlock(&fd_logger_self()->stats_lock) == 0,, ); /* Display how long it took */ if (ts.tv_nsec > sess_data->ts.tv_nsec) d_trace(9, "in %d.%06ld sec\n", (int)(ts.tv_sec - sess_data->ts.tv_sec), (long)(ts.tv_nsec - sess_data->ts.tv_nsec) / 1000); else d_trace(9, "in %d.%06ld sec\n", (int)(ts.tv_sec + 1 - sess_data->ts.tv_sec), (long)(1000000000 + ts.tv_nsec - sess_data->ts.tv_nsec) / 1000); ret = fd_msg_free(*msg); d_assert(ret == 0,,); *msg = NULL; state_cleanup(sess_data, NULL, NULL); return; } /* MME Sends Update Location Request to HSS */ void mme_s6a_send_ulr(mme_ue_t *mme_ue) { int ret; struct msg *req = NULL; struct avp *avp; union avp_value val; struct sess_state *sess_data = NULL, *svg; struct session *session = NULL; d_assert(mme_ue, return, "Null Param"); d_trace(3, "[MME] Update-Location-Request\n"); /* Create the random value to store with the session */ pool_alloc_node(&mme_s6a_sess_pool, &sess_data); d_assert(sess_data, return,); sess_data->mme_ue = mme_ue; /* Create the request */ ret = fd_msg_new(s6a_cmd_ulr, MSGFL_ALLOC_ETEID, &req); d_assert(ret == 0, return,); /* Create a new session */ #define S6A_APP_SID_OPT "app_s6a" ret = fd_msg_new_session(req, (os0_t)S6A_APP_SID_OPT, CONSTSTRLEN(S6A_APP_SID_OPT)); d_assert(ret == 0, return,); ret = fd_msg_sess_get(fd_g_config->cnf_dict, req, &session, NULL); d_assert(ret == 0, return,); /* Set the Auth-Session-State AVP */ ret = fd_msg_avp_new(fd_auth_session_state, 0, &avp); d_assert(ret == 0, return,); val.i32 = 1; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Set Origin-Host & Origin-Realm */ ret = fd_msg_add_origin(req, 0); d_assert(ret == 0, return,); /* Set the Destination-Realm AVP */ ret = fd_msg_avp_new(fd_destination_realm, 0, &avp); d_assert(ret == 0, return,); val.os.data = (unsigned char *)(fd_g_config->cnf_diamrlm); val.os.len = strlen(fd_g_config->cnf_diamrlm); ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Set the User-Name AVP */ ret = fd_msg_avp_new(fd_user_name, 0, &avp); d_assert(ret == 0, return,); val.os.data = (c_uint8_t *)mme_ue->imsi_bcd; val.os.len = strlen(mme_ue->imsi_bcd); ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Set the RAT-Type */ ret = fd_msg_avp_new(s6a_rat_type, 0, &avp); d_assert(ret == 0, return,); val.u32 = S6A_RAT_TYPE_EUTRAN; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Set the ULR-Flags */ ret = fd_msg_avp_new(s6a_ulr_flags, 0, &avp); d_assert(ret == 0, return,); val.u32 = S6A_ULR_S6A_S6D_INDICATOR; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Set the Visited-PLMN-Id */ ret = fd_msg_avp_new(s6a_visited_plmn_id, 0, &avp); d_assert(ret == 0, return,); val.os.data = (c_uint8_t *)&mme_ue->visited_plmn_id; val.os.len = PLMN_ID_LEN; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Set the UE-SRVCC Capability */ ret = fd_msg_avp_new(s6a_ue_srvcc_capability, 0, &avp); d_assert(ret == 0, return,); val.u32 = S6A_UE_SRVCC_NOT_SUPPORTED; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Set Vendor-Specific-Application-Id AVP */ ret = fd_message_vendor_specific_appid_set( req, S6A_APPLICATION_ID); d_assert(ret == 0, return,); ret = clock_gettime(CLOCK_REALTIME, &sess_data->ts); d_assert(ret == 0, return,); /* Keep a pointer to the session data for debug purpose, * in real life we would not need it */ svg = sess_data; /* Store this value in the session */ ret = fd_sess_state_store(mme_s6a_reg, session, &sess_data); d_assert(ret == 0, return,); d_assert(sess_data == 0, return,); /* Send the request */ ret = fd_msg_send(&req, mme_s6a_ula_cb, svg); d_assert(ret == 0,,); /* Increment the counter */ d_assert(pthread_mutex_lock(&fd_logger_self()->stats_lock) == 0,, ); fd_logger_self()->stats.nb_sent++; d_assert(pthread_mutex_unlock(&fd_logger_self()->stats_lock) == 0,, ); } /* MME received Update Location Answer from HSS */ static void mme_s6a_ula_cb(void *data, struct msg **msg) { int ret; struct sess_state *sess_data = NULL; struct timespec ts; struct session *session; struct avp *avp, *avpch; struct avp *avpch1, *avpch2, *avpch3, *avpch4, *avpch5; struct avp_hdr *hdr; unsigned long dur; int error = 0; int new; event_t e; mme_ue_t *mme_ue = NULL; pkbuf_t *s6abuf = NULL; s6a_message_t *s6a_message = NULL; s6a_ula_message_t *ula_message = NULL; s6a_subscription_data_t *subscription_data = NULL; c_uint16_t s6abuf_len = 0; d_trace(3, "[MME] Update-Location-Answer\n"); ret = clock_gettime(CLOCK_REALTIME, &ts); d_assert(ret == 0, return,); /* Search the session, retrieve its data */ ret = fd_msg_sess_get(fd_g_config->cnf_dict, *msg, &session, &new); d_assert(ret == 0, return,); d_assert(new == 0, return, ); ret = fd_sess_state_retrieve(mme_s6a_reg, session, &sess_data); d_assert(ret == 0, return,); d_assert(sess_data && (void *)sess_data == data, return, ); mme_ue = sess_data->mme_ue; d_assert(mme_ue, return, ); s6abuf_len = sizeof(s6a_message_t); d_assert(s6abuf_len < 8192, return, "Not supported size:%d", s6abuf_len); s6abuf = pkbuf_alloc(0, s6abuf_len); d_assert(s6abuf, return, "Null param"); s6a_message = s6abuf->payload; d_assert(s6a_message, return, "Null param"); /* Set Authentication-Information Command */ memset(s6a_message, 0, s6abuf_len); s6a_message->cmd_code = S6A_CMD_CODE_UPDATE_LOCATION; ula_message = &s6a_message->ula_message; d_assert(ula_message, return, "Null param"); subscription_data = &ula_message->subscription_data; d_assert(subscription_data, return, "Null param"); /* Value of Result Code */ ret = fd_msg_search_avp(*msg, fd_result_code, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); s6a_message->result_code = hdr->avp_value->i32; d_trace(5, " Result Code: %d\n", hdr->avp_value->i32); } else { ret = fd_msg_search_avp(*msg, fd_experimental_result, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_avp_search_avp(avp, fd_experimental_result_code, &avpch); d_assert(ret == 0, return,); if (avpch) { ret = fd_msg_avp_hdr(avpch, &hdr); d_assert(ret == 0, return,); s6a_message->result_code = hdr->avp_value->i32; d_trace(5, " Experimental Result Code: %d\n", s6a_message->result_code); } } else { d_error("no Result-Code"); error++; } } /* Value of Origin-Host */ ret = fd_msg_search_avp(*msg, fd_origin_host, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); d_trace(5, " From '%.*s'\n", (int)hdr->avp_value->os.len, hdr->avp_value->os.data); } else { d_error("no_Origin-Host"); error++; } /* Value of Origin-Realm */ ret = fd_msg_search_avp(*msg, fd_origin_realm, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); d_trace(5, " ('%.*s')\n", (int)hdr->avp_value->os.len, hdr->avp_value->os.data); } else { d_error("no_Origin-Realm"); error++; } ret = fd_msg_search_avp(*msg, s6a_ula_flags, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); ula_message->ula_flags = hdr->avp_value->i32; } else { d_error("no_ULA-Flags"); error++; } ret = fd_msg_search_avp(*msg, s6a_subscription_data, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_avp_search_avp(avp, s6a_ambr, &avpch1); d_assert(ret == 0, return,); if (avpch1) { ret = fd_avp_search_avp( avpch1, s6a_max_bandwidth_ul, &avpch2); d_assert(ret == 0, return,); if (avpch2) { ret = fd_msg_avp_hdr(avpch2, &hdr); d_assert(ret == 0, return,); subscription_data->ambr.uplink = hdr->avp_value->u32; } else { d_error("no_Max-Bandwidth-UL"); error++; } ret = fd_avp_search_avp(avpch1, s6a_max_bandwidth_dl, &avpch2); d_assert(ret == 0, return,); if (avpch2) { ret = fd_msg_avp_hdr(avpch2, &hdr); d_assert(ret == 0, return,); subscription_data->ambr.downlink = hdr->avp_value->u32; } else { d_error("no_Max-Bandwidth-DL"); error++; } } else { d_error("no_AMBR"); error++; } ret = fd_avp_search_avp(avp, s6a_apn_configuration_profile, &avpch1); d_assert(ret == 0, return,); if (avpch1) { ret = fd_msg_browse(avpch1, MSG_BRW_FIRST_CHILD, &avpch2, NULL); d_assert(ret == 0, return,); while(avpch2) { ret = fd_msg_avp_hdr(avpch2, &hdr); d_assert(ret == 0, return,); switch(hdr->avp_code) { case S6A_AVP_CODE_CONTEXT_IDENTIFIER: { subscription_data->context_identifier = hdr->avp_value->i32; break; } case S6A_AVP_CODE_ALL_APN_CONFIG_INC_IND: break; case S6A_AVP_CODE_APN_CONFIGURATION: { pdn_t *pdn = &subscription_data->pdn[ subscription_data->num_of_pdn]; d_assert(pdn, return, ); ret = fd_avp_search_avp( avpch2, s6a_service_selection, &avpch3); d_assert(ret == 0, return,); if (avpch3) { ret = fd_msg_avp_hdr(avpch3, &hdr); core_cpystrn(pdn->apn, (char*)hdr->avp_value->os.data, c_min(hdr->avp_value->os.len, MAX_APN_LEN)+1); } else { d_error("no_Service-Selection"); error++; } ret = fd_avp_search_avp(avpch2, s6a_context_identifier, &avpch3); d_assert(ret == 0, return,); if (avpch3) { ret = fd_msg_avp_hdr(avpch3, &hdr); pdn->context_identifier = hdr->avp_value->i32; } else { d_error("no_Context-Identifier"); error++; } ret = fd_avp_search_avp(avpch2, s6a_pdn_type, &avpch3); d_assert(ret == 0, return,); if (avpch3) { ret = fd_msg_avp_hdr(avpch3, &hdr); pdn->pdn_type = hdr->avp_value->i32; } else { d_error("no_PDN-Type"); error++; } ret = fd_avp_search_avp(avpch2, s6a_eps_subscribed_qos_profile, &avpch3); d_assert(ret == 0, return,); if (avpch3) { ret = fd_avp_search_avp(avpch3, s6a_qos_class_identifier, &avpch4); d_assert(ret == 0, return,); if (avpch4) { ret = fd_msg_avp_hdr(avpch4, &hdr); d_assert(ret == 0, return,); pdn->qos.qci = hdr->avp_value->i32; } else { d_error("no_QoS-Class-Identifier"); error++; } ret = fd_avp_search_avp(avpch3, s6a_allocation_retention_priority, &avpch4); d_assert(ret == 0, return,); if (avpch4) { ret = fd_avp_search_avp(avpch4, s6a_priority_level, &avpch5); d_assert(ret == 0, return,); if (avpch5) { ret = fd_msg_avp_hdr(avpch5, &hdr); d_assert(ret == 0, return,); pdn->qos.arp.priority_level = hdr->avp_value->i32; } else { d_error("no_ARP"); error++; } ret = fd_avp_search_avp(avpch4, s6a_pre_emption_capability, &avpch5); d_assert(ret == 0, return,); if (avpch5) { ret = fd_msg_avp_hdr(avpch5, &hdr); d_assert(ret == 0, return,); pdn->qos.arp.pre_emption_capability = hdr->avp_value->i32; } else { d_error("no_Preemption-Capability"); error++; } ret = fd_avp_search_avp(avpch4, s6a_pre_emption_vulnerability, &avpch5); d_assert(ret == 0, return,); if (avpch5) { ret = fd_msg_avp_hdr(avpch5, &hdr); d_assert(ret == 0, return,); pdn->qos.arp.pre_emption_vulnerability = hdr->avp_value->i32; } else { d_error("no_Preemption-Vulnerability"); error++; } } else { d_error("no_QCI"); error++; } } else { d_error("no_EPS-Subscribed-QoS-Profile"); error++; } ret = fd_avp_search_avp(avpch2, fd_mip6_agent_info, &avpch3); d_assert(ret == 0, return,); if (avpch3) { ret = fd_msg_browse(avpch3, MSG_BRW_FIRST_CHILD, &avpch4, NULL); d_assert(ret == 0, return,); while(avpch4) { ret = fd_msg_avp_hdr(avpch4, &hdr); switch(hdr->avp_code) { case S6A_AVP_CODE_MIP_HOME_AGENT_ADDRESS: { c_sockaddr_t addr; ret = fd_msg_avp_value_interpret(avpch4, &addr.sa); d_assert(ret == 0, return,); if (addr.c_sa_family == AF_INET) { pdn->pgw_ip.ipv4 = 1; pdn->pgw_ip.both.addr = addr.sin.sin_addr.s_addr; } else if (addr.c_sa_family == AF_INET6) { pdn->pgw_ip.ipv6 = 1; memcpy(pdn->pgw_ip.both.addr6, addr.sin6.sin6_addr.s6_addr, IPV6_LEN); } else { d_error("Invald family:%d", addr.c_sa_family); error++; } break; } default: { d_error("Unknown AVP-Code:%d", hdr->avp_code); error++; break; } } fd_msg_browse(avpch4, MSG_BRW_NEXT, &avpch4, NULL); } } ret = fd_avp_search_avp(avpch2, s6a_ambr, &avpch3); d_assert(ret == 0, return,); if (avpch3) { ret = fd_avp_search_avp(avpch3, s6a_max_bandwidth_ul, &avpch4); d_assert(ret == 0, return,); if (avpch4) { ret = fd_msg_avp_hdr(avpch4, &hdr); d_assert(ret == 0, return,); pdn->ambr.uplink = hdr->avp_value->u32; } else { d_error("no_Max-Bandwidth-UL"); error++; } ret = fd_avp_search_avp(avpch3, s6a_max_bandwidth_dl, &avpch4); d_assert(ret == 0, return,); if (avpch4) { ret = fd_msg_avp_hdr(avpch4, &hdr); d_assert(ret == 0, return,); pdn->ambr.downlink = hdr->avp_value->u32; } else { d_error("no_Max-Bandwidth-DL"); error++; } } subscription_data->num_of_pdn++; break; } default: { d_warn("Unknown AVP-code:%d", hdr->avp_code); break; } } fd_msg_browse(avpch2, MSG_BRW_NEXT, &avpch2, NULL); } } else { d_error("no_APN-Configuration-Profile"); error++; } } else { d_error("no_Subscription-Data"); error++; } ret = fd_msg_search_avp(*msg, s6a_subscribed_rau_tau_timer, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); subscription_data->subscribed_rau_tau_timer = hdr->avp_value->i32; } else { d_error("no_Subscribed_RAU-TAU-Timer"); error++; } if (!error) { event_set(&e, MME_EVT_S6A_MESSAGE); event_set_param1(&e, (c_uintptr_t)mme_ue->index); event_set_param2(&e, (c_uintptr_t)s6abuf); mme_event_send(&e); } /* Free the message */ d_assert(pthread_mutex_lock(&fd_logger_self()->stats_lock) == 0,, ); dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) + ((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000); if (fd_logger_self()->stats.nb_recv) { /* Ponderate in the avg */ fd_logger_self()->stats.avg = (fd_logger_self()->stats.avg * fd_logger_self()->stats.nb_recv + dur) / (fd_logger_self()->stats.nb_recv + 1); /* Min, max */ if (dur < fd_logger_self()->stats.shortest) fd_logger_self()->stats.shortest = dur; if (dur > fd_logger_self()->stats.longest) fd_logger_self()->stats.longest = dur; } else { fd_logger_self()->stats.shortest = dur; fd_logger_self()->stats.longest = dur; fd_logger_self()->stats.avg = dur; } if (error) fd_logger_self()->stats.nb_errs++; else fd_logger_self()->stats.nb_recv++; d_assert(pthread_mutex_unlock(&fd_logger_self()->stats_lock) == 0,, ); /* Display how long it took */ if (ts.tv_nsec > sess_data->ts.tv_nsec) d_trace(9, "in %d.%06ld sec\n", (int)(ts.tv_sec - sess_data->ts.tv_sec), (long)(ts.tv_nsec - sess_data->ts.tv_nsec) / 1000); else d_trace(9, "in %d.%06ld sec\n", (int)(ts.tv_sec + 1 - sess_data->ts.tv_sec), (long)(1000000000 + ts.tv_nsec - sess_data->ts.tv_nsec) / 1000); ret = fd_msg_free(*msg); d_assert(ret == 0,,); *msg = NULL; state_cleanup(sess_data, NULL, NULL); return; } status_t mme_fd_init(void) { int ret; pool_init(&mme_s6a_sess_pool, MAX_POOL_OF_DIAMETER_SESS); ret = fd_init(FD_MODE_CLIENT, mme_self()->fd_conf_path, mme_self()->fd_config); d_assert(ret == CORE_OK, return CORE_ERROR,); /* Install objects definitions for this application */ ret = s6a_dict_init(); d_assert(ret == CORE_OK, return CORE_ERROR,); /* Create handler for sessions */ ret = fd_sess_handler_create(&mme_s6a_reg, &state_cleanup, NULL, NULL); d_assert(ret == CORE_OK, return CORE_ERROR,); /* Advertise the support for the application in the peer */ ret = fd_disp_app_support(s6a_application, fd_vendor, 1, 0); d_assert(ret == CORE_OK, return CORE_ERROR,); return 0; } void mme_fd_final(void) { int ret; ret = fd_sess_handler_destroy(&mme_s6a_reg, NULL); d_assert(ret == CORE_OK,,); fd_final(); if (pool_used(&mme_s6a_sess_pool)) d_error("%d not freed in mme_s6a_sess_pool[%d] of GX-SM", pool_used(&mme_s6a_sess_pool), pool_size(&mme_s6a_sess_pool)); d_trace(9, "%d not freed in mme_s6a_sess_pool[%d] of GX-SM\n", pool_used(&mme_s6a_sess_pool), pool_size(&mme_s6a_sess_pool)); pool_final(&mme_s6a_sess_pool); } nextepc-0.3.10/src/mme/mme_fd_path.h000066400000000000000000000011511333553357400172330ustar00rootroot00000000000000#ifndef __MME_FD_PATH_H__ #define __MME_FD_PATH_H__ #include "core_errno.h" #include "mme_context.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(status_t) mme_fd_init(void); CORE_DECLARE(void) mme_fd_final(void); /* MME Sends Authentication Information Request to HSS */ CORE_DECLARE(void) mme_s6a_send_air(mme_ue_t *mme_ue, nas_authentication_failure_parameter_t *authentication_failure_parameter); /* MME Sends Update Location Request to HSS */ CORE_DECLARE(void) mme_s6a_send_ulr(mme_ue_t *mme_ue); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __MME_FD_PATH_H__ */ nextepc-0.3.10/src/mme/mme_gtp_path.c000066400000000000000000000257671333553357400174520ustar00rootroot00000000000000#define TRACE_MODULE _mme_gtp_path #include "core_debug.h" #include "core_pkbuf.h" #include "gtp/gtp_node.h" #include "gtp/gtp_path.h" #include "gtp/gtp_xact.h" #include "mme_event.h" #include "mme_gtp_path.h" #include "mme_s11_build.h" #include "mme_sm.h" static int _gtpv2_c_recv_cb(sock_id sock, void *data) { status_t rv; event_t e; pkbuf_t *pkbuf = NULL; d_assert(sock, return -1, "Null param"); rv = gtp_recv(sock, &pkbuf); if (rv != CORE_OK) { if (errno == EAGAIN) return 0; return -1; } d_trace(50, "[GTPv2] RECV : "); d_trace_hex(50, pkbuf->payload, pkbuf->len); event_set(&e, MME_EVT_S11_MESSAGE); event_set_param1(&e, (c_uintptr_t)pkbuf); rv = mme_event_send(&e); if (rv != CORE_OK) { d_error("mme_event_send error"); pkbuf_free(pkbuf); return -1; } return 0; } static c_sockaddr_t *gtp_addr_find_by_family(list_t *list, int family) { gtp_node_t *gnode = NULL; d_assert(list, return NULL,); for (gnode = list_first(list); gnode; gnode = list_next(gnode)) { c_sockaddr_t *addr = gnode->sa_list; while(addr) { if (addr->c_sa_family == family) { return addr; } addr = addr->next; } } return NULL; } status_t mme_gtp_open() { status_t rv; gtp_node_t *gnode = NULL; rv = gtp_server_list(&mme_self()->gtpc_list, _gtpv2_c_recv_cb); d_assert(rv == CORE_OK, return CORE_ERROR,); rv = gtp_server_list(&mme_self()->gtpc_list6, _gtpv2_c_recv_cb); d_assert(rv == CORE_OK, return CORE_ERROR,); mme_self()->gtpc_sock = gtp_local_sock_first(&mme_self()->gtpc_list); mme_self()->gtpc_sock6 = gtp_local_sock_first(&mme_self()->gtpc_list6); mme_self()->gtpc_addr = gtp_local_addr_first(&mme_self()->gtpc_list); mme_self()->gtpc_addr6 = gtp_local_addr_first(&mme_self()->gtpc_list6); d_assert(mme_self()->gtpc_addr || mme_self()->gtpc_addr6, return CORE_ERROR, "No GTP Server"); mme_self()->pgw_addr = gtp_addr_find_by_family( &mme_self()->pgw_list, AF_INET); mme_self()->pgw_addr6 = gtp_addr_find_by_family( &mme_self()->pgw_list, AF_INET6); d_assert(mme_self()->pgw_addr || mme_self()->pgw_addr6, return CORE_ERROR,); for (gnode = list_first(&mme_self()->sgw_list); gnode; gnode = list_next(gnode)) { rv = gtp_client(gnode); d_assert(rv == CORE_OK, return CORE_ERROR,); } return CORE_OK; } status_t mme_gtp_close() { sock_delete_list(&mme_self()->gtpc_list); sock_delete_list(&mme_self()->gtpc_list6); return CORE_OK; } status_t mme_gtp_send_create_session_request(mme_sess_t *sess) { status_t rv; gtp_header_t h; pkbuf_t *pkbuf = NULL; gtp_xact_t *xact = NULL; mme_ue_t *mme_ue = NULL; mme_ue = sess->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); memset(&h, 0, sizeof(gtp_header_t)); h.type = GTP_CREATE_SESSION_REQUEST_TYPE; h.teid = mme_ue->sgw_s11_teid; rv = mme_s11_build_create_session_request(&pkbuf, h.type, sess); d_assert(rv == CORE_OK, return CORE_ERROR, "S11 build error"); xact = gtp_xact_local_create(mme_ue->gnode, &h, pkbuf); d_assert(xact, return CORE_ERROR, "Null param"); rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK, return CORE_ERROR, "xact_commit error"); return CORE_OK; } status_t mme_gtp_send_modify_bearer_request( mme_bearer_t *bearer, int uli_presence) { status_t rv; gtp_xact_t *xact = NULL; mme_ue_t *mme_ue = NULL; gtp_header_t h; pkbuf_t *pkbuf = NULL; d_assert(bearer, return CORE_ERROR, "Null param"); mme_ue = bearer->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); memset(&h, 0, sizeof(gtp_header_t)); h.type = GTP_MODIFY_BEARER_REQUEST_TYPE; h.teid = mme_ue->sgw_s11_teid; rv = mme_s11_build_modify_bearer_request( &pkbuf, h.type, bearer, uli_presence); d_assert(rv == CORE_OK, return CORE_ERROR, "S11 build error"); xact = gtp_xact_local_create(mme_ue->gnode, &h, pkbuf); d_assert(xact, return CORE_ERROR, "Null param"); rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK, return CORE_ERROR, "xact_commit error"); return CORE_OK; } status_t mme_gtp_send_delete_session_request(mme_sess_t *sess) { status_t rv; pkbuf_t *s11buf = NULL; gtp_header_t h; gtp_xact_t *xact = NULL; mme_ue_t *mme_ue = NULL; d_assert(sess, return CORE_ERROR, "Null param"); mme_ue = sess->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); memset(&h, 0, sizeof(gtp_header_t)); h.type = GTP_DELETE_SESSION_REQUEST_TYPE; h.teid = mme_ue->sgw_s11_teid; rv = mme_s11_build_delete_session_request(&s11buf, h.type, sess); d_assert(rv == CORE_OK, return CORE_ERROR, "S11 build error"); xact = gtp_xact_local_create(mme_ue->gnode, &h, s11buf); d_assert(xact, return CORE_ERROR, "Null param"); GTP_XACT_STORE_SESSION(xact, sess); rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK, return CORE_ERROR, "xact_commit error"); return CORE_OK; } status_t mme_gtp_send_delete_all_sessions(mme_ue_t *mme_ue) { status_t rv; mme_sess_t *sess = NULL, *next_sess = NULL; d_assert(mme_ue, return CORE_ERROR, "Null param"); sess = mme_sess_first(mme_ue); while (sess != NULL) { next_sess = mme_sess_next(sess); if (MME_HAVE_SGW_S1U_PATH(sess)) { mme_bearer_t *bearer = mme_default_bearer_in_sess(sess); d_assert(bearer,, "Null param"); if (bearer && FSM_CHECK(&bearer->sm, esm_state_pdn_will_disconnect)) { d_warn("PDN will disconnect[EBI:%d]", bearer->ebi); } else { rv = mme_gtp_send_delete_session_request(sess); d_assert(rv == CORE_OK, return CORE_ERROR, "mme_gtp_send_delete_session_request error"); } } else { mme_sess_remove(sess); } sess = next_sess; } return CORE_OK; } status_t mme_gtp_send_create_bearer_response(mme_bearer_t *bearer) { status_t rv; gtp_xact_t *xact = NULL; mme_ue_t *mme_ue = NULL; gtp_header_t h; pkbuf_t *pkbuf = NULL; d_assert(bearer, return CORE_ERROR, "Null param"); mme_ue = bearer->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); xact = bearer->xact; d_assert(xact, return CORE_ERROR, "Null param"); memset(&h, 0, sizeof(gtp_header_t)); h.type = GTP_CREATE_BEARER_RESPONSE_TYPE; h.teid = mme_ue->sgw_s11_teid; rv = mme_s11_build_create_bearer_response(&pkbuf, h.type, bearer); d_assert(rv == CORE_OK, return CORE_ERROR, "S11 build error"); rv = gtp_xact_update_tx(xact, &h, pkbuf); d_assert(xact, return CORE_ERROR, "Null param"); rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK, return CORE_ERROR, "xact_commit error"); return CORE_OK; } status_t mme_gtp_send_update_bearer_response(mme_bearer_t *bearer) { status_t rv; gtp_xact_t *xact = NULL; mme_ue_t *mme_ue = NULL; gtp_header_t h; pkbuf_t *pkbuf = NULL; d_assert(bearer, return CORE_ERROR, "Null param"); mme_ue = bearer->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); xact = bearer->xact; d_assert(xact, return CORE_ERROR, "Null param"); memset(&h, 0, sizeof(gtp_header_t)); h.type = GTP_UPDATE_BEARER_RESPONSE_TYPE; h.teid = mme_ue->sgw_s11_teid; rv = mme_s11_build_update_bearer_response(&pkbuf, h.type, bearer); d_assert(rv == CORE_OK, return CORE_ERROR, "S11 build error"); rv = gtp_xact_update_tx(xact, &h, pkbuf); d_assert(xact, return CORE_ERROR, "Null param"); rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK, return CORE_ERROR, "xact_commit error"); return CORE_OK; } status_t mme_gtp_send_delete_bearer_response(mme_bearer_t *bearer) { status_t rv; gtp_xact_t *xact = NULL; mme_ue_t *mme_ue = NULL; gtp_header_t h; pkbuf_t *pkbuf = NULL; d_assert(bearer, return CORE_ERROR, "Null param"); mme_ue = bearer->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); xact = bearer->xact; d_assert(xact, return CORE_ERROR, "Null param"); memset(&h, 0, sizeof(gtp_header_t)); h.type = GTP_DELETE_BEARER_RESPONSE_TYPE; h.teid = mme_ue->sgw_s11_teid; rv = mme_s11_build_delete_bearer_response(&pkbuf, h.type, bearer); d_assert(rv == CORE_OK, return CORE_ERROR, "S11 build error"); rv = gtp_xact_update_tx(xact, &h, pkbuf); d_assert(xact, return CORE_ERROR, "Null param"); rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK, return CORE_ERROR, "xact_commit error"); return CORE_OK; } status_t mme_gtp_send_release_access_bearers_request(mme_ue_t *mme_ue) { status_t rv; gtp_header_t h; pkbuf_t *pkbuf = NULL; gtp_xact_t *xact = NULL; d_assert(mme_ue, return CORE_ERROR, "Null param"); memset(&h, 0, sizeof(gtp_header_t)); h.type = GTP_RELEASE_ACCESS_BEARERS_REQUEST_TYPE; h.teid = mme_ue->sgw_s11_teid; rv = mme_s11_build_release_access_bearers_request(&pkbuf, h.type); d_assert(rv == CORE_OK, return CORE_ERROR, "S11 build error"); xact = gtp_xact_local_create(mme_ue->gnode, &h, pkbuf); d_assert(xact, return CORE_ERROR, "Null param"); rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK, return CORE_ERROR, "xact_commit error"); return CORE_OK; } status_t mme_gtp_send_create_indirect_data_forwarding_tunnel_request( mme_ue_t *mme_ue) { status_t rv; gtp_header_t h; pkbuf_t *pkbuf = NULL; gtp_xact_t *xact = NULL; d_assert(mme_ue, return CORE_ERROR, "Null param"); memset(&h, 0, sizeof(gtp_header_t)); h.type = GTP_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_REQUEST_TYPE; h.teid = mme_ue->sgw_s11_teid; rv = mme_s11_build_create_indirect_data_forwarding_tunnel_request( &pkbuf, h.type, mme_ue); d_assert(rv == CORE_OK, return CORE_ERROR, "S11 build error"); xact = gtp_xact_local_create(mme_ue->gnode, &h, pkbuf); d_assert(xact, return CORE_ERROR, "Null param"); rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK, return CORE_ERROR, "xact_commit error"); return CORE_OK; } status_t mme_gtp_send_delete_indirect_data_forwarding_tunnel_request( mme_ue_t *mme_ue) { status_t rv; gtp_header_t h; pkbuf_t *pkbuf = NULL; gtp_xact_t *xact = NULL; d_assert(mme_ue, return CORE_ERROR, "Null param"); memset(&h, 0, sizeof(gtp_header_t)); h.type = GTP_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_REQUEST_TYPE; h.teid = mme_ue->sgw_s11_teid; pkbuf = pkbuf_alloc(TLV_MAX_HEADROOM, 0); d_assert(pkbuf, return CORE_ERROR, "S11 build error"); xact = gtp_xact_local_create(mme_ue->gnode, &h, pkbuf); d_assert(xact, return CORE_ERROR, "Null param"); rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK, return CORE_ERROR, "xact_commit error"); return CORE_OK; } nextepc-0.3.10/src/mme/mme_gtp_path.h000066400000000000000000000023021333553357400174330ustar00rootroot00000000000000#ifndef __MME_S11_PATH_H__ #define __MME_S11_PATH_H__ #include "core_pkbuf.h" #include "mme_context.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(status_t) mme_gtp_open(); CORE_DECLARE(status_t) mme_gtp_close(); CORE_DECLARE(status_t) mme_gtp_send_create_session_request(mme_sess_t *sess); CORE_DECLARE(status_t) mme_gtp_send_modify_bearer_request( mme_bearer_t *bearer, int uli_presence); CORE_DECLARE(status_t) mme_gtp_send_delete_session_request(mme_sess_t *sess); CORE_DECLARE(status_t) mme_gtp_send_delete_all_sessions(mme_ue_t *mme_ue); CORE_DECLARE(status_t) mme_gtp_send_create_bearer_response(mme_bearer_t *bearer); CORE_DECLARE(status_t) mme_gtp_send_update_bearer_response(mme_bearer_t *bearer); CORE_DECLARE(status_t) mme_gtp_send_delete_bearer_response(mme_bearer_t *bearer); CORE_DECLARE(status_t) mme_gtp_send_release_access_bearers_request(mme_ue_t *mme_ue); CORE_DECLARE(status_t) mme_gtp_send_create_indirect_data_forwarding_tunnel_request( mme_ue_t *mme_ue); CORE_DECLARE(status_t) mme_gtp_send_delete_indirect_data_forwarding_tunnel_request( mme_ue_t *mme_ue); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __MME_S11_PATH_H__ */ nextepc-0.3.10/src/mme/mme_init.c000066400000000000000000000060551333553357400165740ustar00rootroot00000000000000#define TRACE_MODULE _mme_init #include "core_debug.h" #include "core_thread.h" #include "core_msgq.h" #include "core_fsm.h" #include "gtp/gtp_xact.h" #include "common/context.h" #include "mme_event.h" #include "mme_fd_path.h" #include "s1ap_path.h" #include "mme_sm.h" static thread_id sm_thread; static void *THREAD_FUNC sm_main(thread_id id, void *data); static thread_id net_thread; static void *THREAD_FUNC net_main(thread_id id, void *data); static int initialized = 0; status_t mme_initialize() { status_t rv; rv = mme_context_init(); if (rv != CORE_OK) return rv; rv = mme_context_parse_config(); if (rv != CORE_OK) return rv; rv = mme_context_setup_trace_module(); if (rv != CORE_OK) return rv; rv = mme_m_tmsi_pool_generate(); if (rv != CORE_OK) return rv; rv = mme_fd_init(); if (rv != CORE_OK) return CORE_ERROR; #define USRSCTP_LOCAL_UDP_PORT 9899 rv = s1ap_init( context_self()->parameter.sctp_streams, USRSCTP_LOCAL_UDP_PORT); if (rv != CORE_OK) return rv; rv = thread_create(&sm_thread, NULL, sm_main, NULL); if (rv != CORE_OK) return rv; rv = thread_create(&net_thread, NULL, net_main, NULL); if (rv != CORE_OK) return rv; initialized = 1; return CORE_OK; } void mme_terminate(void) { if (!initialized) return; thread_delete(net_thread); thread_delete(sm_thread); mme_fd_final(); mme_context_final(); s1ap_final(); gtp_xact_final(); } static void *THREAD_FUNC sm_main(thread_id id, void *data) { event_t event; fsm_t mme_sm; c_time_t prev_tm, now_tm; status_t rv; memset(&event, 0, sizeof(event_t)); mme_self()->queue_id = event_create(MSGQ_O_BLOCK); d_assert(mme_self()->queue_id, return NULL, "MME event queue creation failed"); tm_service_init(&mme_self()->tm_service); gtp_xact_init(&mme_self()->tm_service, MME_EVT_S11_T3_RESPONSE, MME_EVT_S11_T3_HOLDING); fsm_create(&mme_sm, mme_state_initial, mme_state_final); fsm_init(&mme_sm, 0); prev_tm = time_now(); #define EVENT_LOOP_TIMEOUT 50 /* 50ms */ while ((!thread_should_stop())) { rv = event_timedrecv(mme_self()->queue_id, &event, EVENT_LOOP_TIMEOUT); d_assert(rv != CORE_ERROR, continue, "While receiving a event message, error occurs"); now_tm = time_now(); /* if the gap is over 10 ms, execute preriodic jobs */ if (now_tm - prev_tm > EVENT_LOOP_TIMEOUT * 1000) { tm_execute_tm_service( &mme_self()->tm_service, mme_self()->queue_id); prev_tm = now_tm; } if (rv == CORE_TIMEUP) { continue; } fsm_dispatch(&mme_sm, (fsm_event_t*)&event); } fsm_final(&mme_sm, 0); fsm_clear(&mme_sm); event_delete(mme_self()->queue_id); return NULL; } static void *THREAD_FUNC net_main(thread_id id, void *data) { while (!thread_should_stop()) { sock_select_loop(EVENT_LOOP_TIMEOUT); } return NULL; } nextepc-0.3.10/src/mme/mme_kdf.c000066400000000000000000000017611333553357400163740ustar00rootroot00000000000000#define TRACE_MODULE _mme_kdf #include "core_sha2_hmac.h" void mme_kdf_nas(c_uint8_t algorithm_type_distinguishers, c_uint8_t algorithm_identity, c_uint8_t *kasme, c_uint8_t *knas) { c_uint8_t s[7]; c_uint8_t out[32]; s[0] = 0x15; /* FC Value */ s[1] = algorithm_type_distinguishers; s[2] = 0x00; s[3] = 0x01; s[4] = algorithm_identity; s[5] = 0x00; s[6] = 0x01; hmac_sha256(kasme, 32, s, 7, out, 32); memcpy(knas, out+16, 16); } void mme_kdf_enb(c_uint8_t *kasme, c_uint32_t ul_count, c_uint8_t *kenb) { c_uint8_t s[7]; s[0] = 0x11; /* FC Value */ ul_count = htonl(ul_count); memcpy(s+1, &ul_count, 4); s[5] = 0x00; s[6] = 0x04; hmac_sha256(kasme, 32, s, 7, kenb, 32); } void mme_kdf_nh(c_uint8_t *kasme, c_uint8_t *sync_input, c_uint8_t *kenb) { c_uint8_t s[35]; s[0] = 0x12; /* FC Value */ memcpy(s+1, sync_input, 32); s[33] = 0x00; s[34] = 0x20; hmac_sha256(kasme, 32, s, 35, kenb, 32); } nextepc-0.3.10/src/mme/mme_kdf.h000066400000000000000000000014341333553357400163760ustar00rootroot00000000000000#ifndef __MME_KDF_H__ #define __MME_KDF_H__ #include "core.h" #include "nas/nas_ies.h" /* Algorithm Type Distinguishers */ #define MME_KDF_NAS_ENC_ALG 0x01 #define MME_KDF_NAS_INT_ALG 0x02 /* Algorithm Identity defined in nas_ies.h #define NAS_SECURITY_ALGORITHMS_EIA0_EEA0 0 #define NAS_SECURITY_ALGORITHMS_128_EIA1_EEA1 1 #define NAS_SECURITY_ALGORITHMS_128_EIA1_EEA2 2 #define NAS_SECURITY_ALGORITHMS_128_EIA3_EEA3 3 */ CORE_DECLARE(void) mme_kdf_nas(c_uint8_t algorithm_type_distinguishers, c_uint8_t algorithm_identity, c_uint8_t *kasme, c_uint8_t *knas); CORE_DECLARE(void) mme_kdf_enb( c_uint8_t *kasme, c_uint32_t ul_count, c_uint8_t *kenb); CORE_DECLARE(void) mme_kdf_nh( c_uint8_t *kasme, c_uint8_t *sync_input, c_uint8_t *kenb); #endif /* __MME_KDF_H__ */ nextepc-0.3.10/src/mme/mme_path.c000066400000000000000000000035111333553357400165570ustar00rootroot00000000000000#define TRACE_MODULE _mme_path #include "s1ap_path.h" #include "nas_path.h" #include "mme_gtp_path.h" #include "mme_path.h" status_t mme_send_delete_session_or_detach(mme_ue_t *mme_ue) { status_t rv; d_assert(mme_ue, return CORE_ERROR,); if (SESSION_CONTEXT_IS_AVAILABLE(mme_ue)) { rv = mme_gtp_send_delete_all_sessions(mme_ue); d_assert(rv == CORE_OK,, "mme_gtp_send_delete_all_sessions failed"); } else { rv = nas_send_detach_accept(mme_ue); d_assert(rv == CORE_OK,, "nas_send_detach_accept failed"); } return rv; } status_t mme_send_delete_session_or_ue_context_release( mme_ue_t *mme_ue, enb_ue_t *enb_ue) { status_t rv; d_assert(enb_ue, return CORE_ERROR,); if (SESSION_CONTEXT_IS_AVAILABLE(mme_ue)) { rv = mme_gtp_send_delete_all_sessions(mme_ue); d_assert(rv == CORE_OK,, "mme_gtp_send_delete_all_sessions failed"); } else { rv = s1ap_send_ue_context_release_command(enb_ue, S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release, S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE, 0); d_assert(rv == CORE_OK,, "s1ap send error"); } return rv; } status_t mme_send_release_access_bearer_or_ue_context_release( mme_ue_t *mme_ue, enb_ue_t *enb_ue) { status_t rv; d_assert(enb_ue, return CORE_ERROR,); if (BEARER_CONTEXT_IS_ACTIVE(mme_ue)) { rv = mme_gtp_send_release_access_bearers_request(mme_ue); d_assert(rv == CORE_OK,, "gtp send failed"); } else { rv = s1ap_send_ue_context_release_command(enb_ue, S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release, S1AP_UE_CTX_REL_S1_NORMAL_RELEASE, 0); d_assert(rv == CORE_OK,, "s1ap send error"); } return rv; } nextepc-0.3.10/src/mme/mme_path.h000066400000000000000000000010411333553357400165600ustar00rootroot00000000000000#ifndef __MME_PATH_H__ #define __MME_PATH_H__ #include "core_errno.h" #include "mme_context.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(status_t) mme_send_delete_session_or_detach(mme_ue_t *mme_ue); CORE_DECLARE(status_t) mme_send_delete_session_or_ue_context_release( mme_ue_t *mme_ue, enb_ue_t *enb_ue); CORE_DECLARE(status_t) mme_send_release_access_bearer_or_ue_context_release( mme_ue_t *mme_ue, enb_ue_t *enb_ue); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __MME_PATH_H__ */ nextepc-0.3.10/src/mme/mme_s11_build.c000066400000000000000000000633531333553357400174200ustar00rootroot00000000000000#define TRACE_MODULE _mme_s11_build #include "core_debug.h" #include "3gpp_types.h" #include "gtp/gtp_types.h" #include "gtp/gtp_conv.h" #include "gtp/gtp_message.h" #include "gtp/gtp_node.h" #include "mme_context.h" #include "mme_s11_build.h" status_t mme_s11_build_create_session_request( pkbuf_t **pkbuf, c_uint8_t type, mme_sess_t *sess) { status_t rv; pdn_t *pdn = NULL; mme_ue_t *mme_ue = NULL; mme_bearer_t *bearer = NULL; gtp_message_t gtp_message; gtp_create_session_request_t *req = >p_message.create_session_request; gtp_uli_t uli; char uli_buf[GTP_MAX_ULI_LEN]; gtp_f_teid_t mme_s11_teid, pgw_s5c_teid; int len; gtp_ambr_t ambr; gtp_bearer_qos_t bearer_qos; char bearer_qos_buf[GTP_BEARER_QOS_LEN]; gtp_ue_timezone_t ue_timezone; time_exp_t time_exp; c_int8_t apn[MAX_APN_LEN]; d_assert(sess, return CORE_ERROR, "Null param"); pdn = sess->pdn; d_assert(pdn, return CORE_ERROR, "Null param"); bearer = mme_default_bearer_in_sess(sess); d_assert(bearer, return CORE_ERROR, "Null param"); mme_ue = sess->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); d_trace(3, "[MME] Create Session Request\n"); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", mme_ue->mme_s11_teid, mme_ue->sgw_s11_teid); memset(>p_message, 0, sizeof(gtp_message_t)); d_assert(mme_ue->imsi_len, return CORE_ERROR, "Null param"); req->imsi.presence = 1; req->imsi.data = mme_ue->imsi; req->imsi.len = mme_ue->imsi_len; memset(&uli, 0, sizeof(gtp_uli_t)); uli.flags.e_cgi = 1; uli.flags.tai = 1; memcpy(&uli.tai.plmn_id, &mme_ue->tai.plmn_id, sizeof(uli.tai.plmn_id)); uli.tai.tac = mme_ue->tai.tac; memcpy(&uli.e_cgi.plmn_id, &mme_ue->e_cgi.plmn_id, sizeof(uli.e_cgi.plmn_id)); uli.e_cgi.cell_id = mme_ue->e_cgi.cell_id; req->user_location_information.presence = 1; gtp_build_uli(&req->user_location_information, &uli, uli_buf, GTP_MAX_ULI_LEN); req->serving_network.presence = 1; req->serving_network.data = &mme_ue->visited_plmn_id; req->serving_network.len = sizeof(mme_ue->visited_plmn_id); req->rat_type.presence = 1; req->rat_type.u8 = GTP_RAT_TYPE_EUTRAN; memset(&mme_s11_teid, 0, sizeof(gtp_f_teid_t)); mme_s11_teid.interface_type = GTP_F_TEID_S11_MME_GTP_C; mme_s11_teid.teid = htonl(mme_ue->mme_s11_teid); rv = gtp_sockaddr_to_f_teid( mme_self()->gtpc_addr, mme_self()->gtpc_addr6, &mme_s11_teid, &len); d_assert(rv == CORE_OK, return CORE_ERROR,); req->sender_f_teid_for_control_plane.presence = 1; req->sender_f_teid_for_control_plane.data = &mme_s11_teid; req->sender_f_teid_for_control_plane.len = len; memset(&pgw_s5c_teid, 0, sizeof(gtp_f_teid_t)); pgw_s5c_teid.interface_type = GTP_F_TEID_S5_S8_PGW_GTP_C; if (pdn->pgw_ip.ipv4 || pdn->pgw_ip.ipv6) { pgw_s5c_teid.ipv4 = pdn->pgw_ip.ipv4; pgw_s5c_teid.ipv6 = pdn->pgw_ip.ipv6; if (pgw_s5c_teid.ipv4 && pgw_s5c_teid.ipv6) { pgw_s5c_teid.both.addr = pdn->pgw_ip.both.addr; memcpy(pgw_s5c_teid.both.addr6, pdn->pgw_ip.both.addr6, sizeof pdn->pgw_ip.both.addr6); req->pgw_s5_s8_address_for_control_plane_or_pmip.len = GTP_F_TEID_IPV4V6_LEN; } else if (pgw_s5c_teid.ipv4) { /* pdn->pgw_ip always uses both ip address memory */ pgw_s5c_teid.addr = pdn->pgw_ip.both.addr; req->pgw_s5_s8_address_for_control_plane_or_pmip.len = GTP_F_TEID_IPV4_LEN; } else if (pgw_s5c_teid.ipv6) { /* pdn->pgw_ip always uses both ip address memory */ memcpy(pgw_s5c_teid.addr6, pdn->pgw_ip.both.addr6, sizeof pdn->pgw_ip.both.addr6); req->pgw_s5_s8_address_for_control_plane_or_pmip.len = GTP_F_TEID_IPV6_LEN; } req->pgw_s5_s8_address_for_control_plane_or_pmip.presence = 1; req->pgw_s5_s8_address_for_control_plane_or_pmip.data = &pgw_s5c_teid; } else { rv = gtp_sockaddr_to_f_teid( mme_self()->pgw_addr, mme_self()->pgw_addr6, &pgw_s5c_teid, &len); d_assert(rv == CORE_OK, return CORE_ERROR,); req->pgw_s5_s8_address_for_control_plane_or_pmip.presence = 1; req->pgw_s5_s8_address_for_control_plane_or_pmip.data = &pgw_s5c_teid; req->pgw_s5_s8_address_for_control_plane_or_pmip.len = len; } req->access_point_name.presence = 1; req->access_point_name.len = apn_build(apn, pdn->apn, strlen(pdn->apn)); req->access_point_name.data = apn; req->selection_mode.presence = 1; req->selection_mode.u8 = GTP_SELECTION_MODE_MS_OR_NETWORK_PROVIDED_APN | 0xfc; d_assert(sess->request_type.pdn_type == NAS_PDN_CONNECTIVITY_PDN_TYPE_IPV4 || sess->request_type.pdn_type == NAS_PDN_CONNECTIVITY_PDN_TYPE_IPV6 || sess->request_type.pdn_type == NAS_PDN_CONNECTIVITY_PDN_TYPE_IPV4V6, return CORE_ERROR, "UE PDN Configuration Error(%d)", sess->request_type.pdn_type); if (pdn->pdn_type == HSS_PDN_TYPE_IPV4 || pdn->pdn_type == HSS_PDN_TYPE_IPV6 || pdn->pdn_type == HSS_PDN_TYPE_IPV4V6) { req->pdn_type.u8 = ((pdn->pdn_type + 1) & sess->request_type.pdn_type); d_assert(req->pdn_type.u8 != 0, return CORE_ERROR, "PDN Configuration Error:(%d, %d)", pdn->pdn_type, sess->request_type.pdn_type); } else if (pdn->pdn_type == HSS_PDN_TYPE_IPV4_OR_IPV6) { req->pdn_type.u8 = sess->request_type.pdn_type; } else d_assert(0, return CORE_ERROR, "HSS PDN Confiugration Error(%d)", pdn->pdn_type); req->pdn_type.presence = 1; pdn->paa.pdn_type = req->pdn_type.u8; req->pdn_address_allocation.data = &pdn->paa; if (req->pdn_type.u8 == GTP_PDN_TYPE_IPV4) req->pdn_address_allocation.len = PAA_IPV4_LEN; else if (req->pdn_type.u8 == GTP_PDN_TYPE_IPV6) req->pdn_address_allocation.len = PAA_IPV6_LEN; else if (req->pdn_type.u8 == GTP_PDN_TYPE_IPV4V6) req->pdn_address_allocation.len = PAA_IPV4V6_LEN; else d_assert(0, return CORE_ERROR, "Not supported(%d)", req->pdn_type.u8); req->pdn_address_allocation.presence = 1; req->maximum_apn_restriction.presence = 1; req->maximum_apn_restriction.u8 = GTP_APN_NO_RESTRICTION; if (pdn->ambr.uplink || pdn->ambr.downlink) { memset(&ambr, 0, sizeof(gtp_ambr_t)); ambr.uplink = htonl(pdn->ambr.uplink); ambr.downlink = htonl(pdn->ambr.downlink); req->aggregate_maximum_bit_rate.presence = 1; req->aggregate_maximum_bit_rate.data = &ambr; req->aggregate_maximum_bit_rate.len = sizeof(ambr); } if (sess->ue_pco.length && sess->ue_pco.buffer) { req->protocol_configuration_options.presence = 1; req->protocol_configuration_options.data = sess->ue_pco.buffer; req->protocol_configuration_options.len = sess->ue_pco.length; } req->bearer_contexts_to_be_created.presence = 1; req->bearer_contexts_to_be_created.eps_bearer_id.presence = 1; req->bearer_contexts_to_be_created.eps_bearer_id.u8 = bearer->ebi; memset(&bearer_qos, 0, sizeof(bearer_qos)); bearer_qos.qci = pdn->qos.qci; bearer_qos.priority_level = pdn->qos.arp.priority_level; bearer_qos.pre_emption_capability = pdn->qos.arp.pre_emption_capability; bearer_qos.pre_emption_vulnerability = pdn->qos.arp.pre_emption_vulnerability; req->bearer_contexts_to_be_created.bearer_level_qos.presence = 1; gtp_build_bearer_qos(&req->bearer_contexts_to_be_created.bearer_level_qos, &bearer_qos, bearer_qos_buf, GTP_BEARER_QOS_LEN); /* UE Time Zone */ memset(&ue_timezone, 0, sizeof(ue_timezone)); time_exp_lt(&time_exp, time_now()); if (time_exp.tm_gmtoff >= 0) ue_timezone.sign = 0; else ue_timezone.sign = 1; /* quarters of an hour */ ue_timezone.gmtoff = GTP_TIME_TO_BCD(time_exp.tm_gmtoff / 900); ue_timezone.daylight_saving_time = GTP_UE_TIME_ZONE_NO_ADJUSTMENT_FOR_DAYLIGHT_SAVING_TIME; req->ue_time_zone.presence = 1; req->ue_time_zone.data = &ue_timezone; req->ue_time_zone.len = sizeof(ue_timezone); req->charging_characteristics.presence = 1; req->charging_characteristics.data = (c_uint8_t *)"\x54\x00"; req->charging_characteristics.len = 2; gtp_message.h.type = type; rv = gtp_build_msg(pkbuf, >p_message); d_assert(rv == CORE_OK, return CORE_ERROR, "gtp build failed"); return CORE_OK; } status_t mme_s11_build_modify_bearer_request(pkbuf_t **pkbuf, c_uint8_t type, mme_bearer_t *bearer, int uli_presence) { status_t rv; gtp_message_t gtp_message; gtp_modify_bearer_request_t *req = >p_message.modify_bearer_request; gtp_f_teid_t enb_s1u_teid; int len; gtp_uli_t uli; char uli_buf[GTP_MAX_ULI_LEN]; mme_ue_t *mme_ue = NULL; d_assert(bearer, return CORE_ERROR, "Null param"); mme_ue = bearer->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); d_trace(3, "[MME] Modifty Bearer Request\n"); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", mme_ue->mme_s11_teid, mme_ue->sgw_s11_teid); d_trace(5, " ENB_S1U_TEID[%d] SGW_S1U_TEID[%d]\n", bearer->enb_s1u_teid, bearer->sgw_s1u_teid); memset(>p_message, 0, sizeof(gtp_message_t)); /* Bearer Context : EBI */ req->bearer_contexts_to_be_modified.presence = 1; req->bearer_contexts_to_be_modified.eps_bearer_id.presence = 1; req->bearer_contexts_to_be_modified.eps_bearer_id.u8 = bearer->ebi; /* Data Plane(DL) : ENB-S1U */ memset(&enb_s1u_teid, 0, sizeof(gtp_f_teid_t)); enb_s1u_teid.interface_type = GTP_F_TEID_S1_U_ENODEB_GTP_U; enb_s1u_teid.teid = htonl(bearer->enb_s1u_teid); rv = gtp_ip_to_f_teid(&bearer->enb_s1u_ip, &enb_s1u_teid, &len); d_assert(rv == CORE_OK, return CORE_ERROR,); req->bearer_contexts_to_be_modified.s1_u_enodeb_f_teid.presence = 1; req->bearer_contexts_to_be_modified.s1_u_enodeb_f_teid.data = &enb_s1u_teid; req->bearer_contexts_to_be_modified.s1_u_enodeb_f_teid.len = len; if (uli_presence) { /* User Location Information(ULI) */ memset(&uli, 0, sizeof(gtp_uli_t)); uli.flags.e_cgi = 1; uli.flags.tai = 1; memcpy(&uli.tai.plmn_id, &mme_ue->tai.plmn_id, sizeof(uli.tai.plmn_id)); uli.tai.tac = mme_ue->tai.tac; memcpy(&uli.e_cgi.plmn_id, &mme_ue->e_cgi.plmn_id, sizeof(uli.e_cgi.plmn_id)); uli.e_cgi.cell_id = mme_ue->e_cgi.cell_id; req->user_location_information.presence = 1; gtp_build_uli(&req->user_location_information, &uli, uli_buf, GTP_MAX_ULI_LEN); } gtp_message.h.type = type; rv = gtp_build_msg(pkbuf, >p_message); d_assert(rv == CORE_OK, return CORE_ERROR, "gtp build failed"); return CORE_OK; } status_t mme_s11_build_delete_session_request( pkbuf_t **pkbuf, c_uint8_t type, mme_sess_t *sess) { status_t rv; gtp_message_t gtp_message; gtp_delete_session_request_t *req = >p_message.delete_session_request; gtp_uli_t uli; char uli_buf[GTP_MAX_ULI_LEN]; gtp_indication_t indication; mme_bearer_t *bearer = NULL; mme_ue_t *mme_ue = NULL; d_assert(sess, return CORE_ERROR, "Null param"); mme_ue = sess->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); bearer = mme_default_bearer_in_sess(sess); d_assert(bearer, return CORE_ERROR, "Null param"); d_trace(3, "[MME] Delete Session Request\n"); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", mme_ue->mme_s11_teid, mme_ue->sgw_s11_teid); memset(>p_message, 0, sizeof(gtp_message_t)); req->linked_eps_bearer_id.presence = 1; req->linked_eps_bearer_id.u8 = bearer->ebi; /* User Location Information(ULI) */ memset(&uli, 0, sizeof(gtp_uli_t)); uli.flags.e_cgi = 1; uli.flags.tai = 1; memcpy(&uli.tai.plmn_id, &mme_ue->tai.plmn_id, sizeof(uli.tai.plmn_id)); uli.tai.tac = mme_ue->tai.tac; memcpy(&uli.e_cgi.plmn_id, &mme_ue->e_cgi.plmn_id, sizeof(uli.tai.plmn_id)); uli.e_cgi.cell_id = mme_ue->e_cgi.cell_id; req->user_location_information.presence = 1; gtp_build_uli(&req->user_location_information, &uli, uli_buf, GTP_MAX_ULI_LEN); memset(&indication, 0, sizeof(gtp_indication_t)); indication.oi = 1; req->indication_flags.presence = 1; req->indication_flags.data = &indication; req->indication_flags.len = sizeof(gtp_indication_t); gtp_message.h.type = type; rv = gtp_build_msg(pkbuf, >p_message); d_assert(rv == CORE_OK, return CORE_ERROR, "gtp build failed"); return CORE_OK; } status_t mme_s11_build_create_bearer_response( pkbuf_t **pkbuf, c_uint8_t type, mme_bearer_t *bearer) { status_t rv; gtp_message_t gtp_message; gtp_create_bearer_response_t *rsp = >p_message.create_bearer_response; gtp_cause_t cause; gtp_f_teid_t enb_s1u_teid, sgw_s1u_teid; int len; gtp_uli_t uli; char uli_buf[GTP_MAX_ULI_LEN]; gtp_ue_timezone_t ue_timezone; time_exp_t time_exp; mme_ue_t *mme_ue = NULL; d_assert(bearer, return CORE_ERROR, "Null param"); mme_ue = bearer->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); d_trace(3, "[MME] Create Bearer Response\n"); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", mme_ue->mme_s11_teid, mme_ue->sgw_s11_teid); memset(>p_message, 0, sizeof(gtp_message_t)); /* Set Cause */ memset(&cause, 0, sizeof(cause)); cause.value = GTP_CAUSE_REQUEST_ACCEPTED; rsp->cause.presence = 1; rsp->cause.len = sizeof(cause); rsp->cause.data = &cause; /* Bearer Context : EBI */ rsp->bearer_contexts.presence = 1; rsp->bearer_contexts.eps_bearer_id.presence = 1; rsp->bearer_contexts.eps_bearer_id.u8 = bearer->ebi; /* Data Plane(DL) : ENB-S1U */ memset(&enb_s1u_teid, 0, sizeof(gtp_f_teid_t)); enb_s1u_teid.interface_type = GTP_F_TEID_S1_U_ENODEB_GTP_U; enb_s1u_teid.teid = htonl(bearer->enb_s1u_teid); rv = gtp_ip_to_f_teid(&bearer->enb_s1u_ip, &enb_s1u_teid, &len); d_assert(rv == CORE_OK, return CORE_ERROR,); rsp->bearer_contexts.s1_u_enodeb_f_teid.presence = 1; rsp->bearer_contexts.s1_u_enodeb_f_teid.data = &enb_s1u_teid; rsp->bearer_contexts.s1_u_enodeb_f_teid.len = len; /* Data Plane(UL) : SGW-S1U */ memset(&sgw_s1u_teid, 0, sizeof(gtp_f_teid_t)); sgw_s1u_teid.interface_type = GTP_F_TEID_S1_U_SGW_GTP_U; sgw_s1u_teid.teid = htonl(bearer->sgw_s1u_teid); rv = gtp_ip_to_f_teid(&bearer->sgw_s1u_ip, &sgw_s1u_teid, &len); d_assert(rv == CORE_OK, return CORE_ERROR,); rsp->bearer_contexts.s4_u_sgsn_f_teid.presence = 1; rsp->bearer_contexts.s4_u_sgsn_f_teid.data = &sgw_s1u_teid; rsp->bearer_contexts.s4_u_sgsn_f_teid.len = GTP_F_TEID_IPV4_LEN; /* Bearer Context : Cause */ rsp->bearer_contexts.cause.presence = 1; rsp->bearer_contexts.cause.len = sizeof(cause); rsp->bearer_contexts.cause.data = &cause; /* User Location Information(ULI) */ memset(&uli, 0, sizeof(gtp_uli_t)); uli.flags.e_cgi = 1; uli.flags.tai = 1; memcpy(&uli.tai.plmn_id, &mme_ue->tai.plmn_id, sizeof(uli.tai.plmn_id)); uli.tai.tac = mme_ue->tai.tac; memcpy(&uli.e_cgi.plmn_id, &mme_ue->e_cgi.plmn_id, sizeof(uli.e_cgi.plmn_id)); uli.e_cgi.cell_id = mme_ue->e_cgi.cell_id; rsp->user_location_information.presence = 1; gtp_build_uli(&rsp->user_location_information, &uli, uli_buf, GTP_MAX_ULI_LEN); /* UE Time Zone */ memset(&ue_timezone, 0, sizeof(ue_timezone)); time_exp_lt(&time_exp, time_now()); if (time_exp.tm_gmtoff >= 0) ue_timezone.sign = 0; else ue_timezone.sign = 1; /* quarters of an hour */ ue_timezone.gmtoff = GTP_TIME_TO_BCD(time_exp.tm_gmtoff / 900); ue_timezone.daylight_saving_time = GTP_UE_TIME_ZONE_NO_ADJUSTMENT_FOR_DAYLIGHT_SAVING_TIME; rsp->ue_time_zone.presence = 1; rsp->ue_time_zone.data = &ue_timezone; rsp->ue_time_zone.len = sizeof(ue_timezone); gtp_message.h.type = type; rv = gtp_build_msg(pkbuf, >p_message); d_assert(rv == CORE_OK, return CORE_ERROR, "gtp build failed"); return CORE_OK; } status_t mme_s11_build_update_bearer_response( pkbuf_t **pkbuf, c_uint8_t type, mme_bearer_t *bearer) { status_t rv; gtp_message_t gtp_message; gtp_update_bearer_response_t *rsp = >p_message.update_bearer_response; gtp_cause_t cause; gtp_uli_t uli; char uli_buf[GTP_MAX_ULI_LEN]; gtp_ue_timezone_t ue_timezone; time_exp_t time_exp; mme_ue_t *mme_ue = NULL; d_assert(bearer, return CORE_ERROR, "Null param"); mme_ue = bearer->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); d_trace(3, "[MME] Update Bearer Response\n"); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", mme_ue->mme_s11_teid, mme_ue->sgw_s11_teid); memset(>p_message, 0, sizeof(gtp_message_t)); /* Set Cause */ memset(&cause, 0, sizeof(cause)); cause.value = GTP_CAUSE_REQUEST_ACCEPTED; rsp->cause.presence = 1; rsp->cause.len = sizeof(cause); rsp->cause.data = &cause; /* Bearer Context : EBI */ rsp->bearer_contexts.presence = 1; rsp->bearer_contexts.eps_bearer_id.presence = 1; rsp->bearer_contexts.eps_bearer_id.u8 = bearer->ebi; /* Bearer Context : Cause */ rsp->bearer_contexts.cause.presence = 1; rsp->bearer_contexts.cause.len = sizeof(cause); rsp->bearer_contexts.cause.data = &cause; /* User Location Information(ULI) */ memset(&uli, 0, sizeof(gtp_uli_t)); uli.flags.e_cgi = 1; uli.flags.tai = 1; memcpy(&uli.tai.plmn_id, &mme_ue->tai.plmn_id, sizeof(uli.tai.plmn_id)); uli.tai.tac = mme_ue->tai.tac; memcpy(&uli.e_cgi.plmn_id, &mme_ue->e_cgi.plmn_id, sizeof(uli.e_cgi.plmn_id)); uli.e_cgi.cell_id = mme_ue->e_cgi.cell_id; rsp->user_location_information.presence = 1; gtp_build_uli(&rsp->user_location_information, &uli, uli_buf, GTP_MAX_ULI_LEN); /* UE Time Zone */ memset(&ue_timezone, 0, sizeof(ue_timezone)); time_exp_lt(&time_exp, time_now()); if (time_exp.tm_gmtoff >= 0) ue_timezone.sign = 0; else ue_timezone.sign = 1; /* quarters of an hour */ ue_timezone.gmtoff = GTP_TIME_TO_BCD(time_exp.tm_gmtoff / 900); ue_timezone.daylight_saving_time = GTP_UE_TIME_ZONE_NO_ADJUSTMENT_FOR_DAYLIGHT_SAVING_TIME; rsp->ue_time_zone.presence = 1; rsp->ue_time_zone.data = &ue_timezone; rsp->ue_time_zone.len = sizeof(ue_timezone); gtp_message.h.type = type; rv = gtp_build_msg(pkbuf, >p_message); d_assert(rv == CORE_OK, return CORE_ERROR, "gtp build failed"); return CORE_OK; } status_t mme_s11_build_delete_bearer_response( pkbuf_t **pkbuf, c_uint8_t type, mme_bearer_t *bearer) { status_t rv; gtp_message_t gtp_message; gtp_delete_bearer_response_t *rsp = >p_message.delete_bearer_response; gtp_cause_t cause; gtp_uli_t uli; char uli_buf[GTP_MAX_ULI_LEN]; gtp_ue_timezone_t ue_timezone; time_exp_t time_exp; mme_ue_t *mme_ue = NULL; d_assert(bearer, return CORE_ERROR, "Null param"); mme_ue = bearer->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); d_trace(3, "[MME] Delete Bearer Response\n"); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", mme_ue->mme_s11_teid, mme_ue->sgw_s11_teid); memset(>p_message, 0, sizeof(gtp_message_t)); /* Set Cause */ memset(&cause, 0, sizeof(cause)); cause.value = GTP_CAUSE_REQUEST_ACCEPTED; rsp->cause.presence = 1; rsp->cause.len = sizeof(cause); rsp->cause.data = &cause; /* Bearer Context : EBI */ rsp->bearer_contexts.presence = 1; rsp->bearer_contexts.eps_bearer_id.presence = 1; rsp->bearer_contexts.eps_bearer_id.u8 = bearer->ebi; /* Bearer Context : Cause */ rsp->bearer_contexts.cause.presence = 1; rsp->bearer_contexts.cause.len = sizeof(cause); rsp->bearer_contexts.cause.data = &cause; /* User Location Information(ULI) */ memset(&uli, 0, sizeof(gtp_uli_t)); uli.flags.e_cgi = 1; uli.flags.tai = 1; memcpy(&uli.tai.plmn_id, &mme_ue->tai.plmn_id, sizeof(uli.tai.plmn_id)); uli.tai.tac = mme_ue->tai.tac; memcpy(&uli.e_cgi.plmn_id, &mme_ue->e_cgi.plmn_id, sizeof(uli.e_cgi.plmn_id)); uli.e_cgi.cell_id = mme_ue->e_cgi.cell_id; rsp->user_location_information.presence = 1; gtp_build_uli(&rsp->user_location_information, &uli, uli_buf, GTP_MAX_ULI_LEN); /* UE Time Zone */ memset(&ue_timezone, 0, sizeof(ue_timezone)); time_exp_lt(&time_exp, time_now()); if (time_exp.tm_gmtoff >= 0) ue_timezone.sign = 0; else ue_timezone.sign = 1; /* quarters of an hour */ ue_timezone.gmtoff = GTP_TIME_TO_BCD(time_exp.tm_gmtoff / 900); ue_timezone.daylight_saving_time = GTP_UE_TIME_ZONE_NO_ADJUSTMENT_FOR_DAYLIGHT_SAVING_TIME; rsp->ue_time_zone.presence = 1; rsp->ue_time_zone.data = &ue_timezone; rsp->ue_time_zone.len = sizeof(ue_timezone); gtp_message.h.type = type; rv = gtp_build_msg(pkbuf, >p_message); d_assert(rv == CORE_OK, return CORE_ERROR, "gtp build failed"); return CORE_OK; } status_t mme_s11_build_release_access_bearers_request( pkbuf_t **pkbuf, c_uint8_t type) { status_t rv; gtp_message_t gtp_message; gtp_release_access_bearers_request_t *req = >p_message.release_access_bearers_request; d_trace(3, "[MME] Release Access Bearers Request\n"); memset(>p_message, 0, sizeof(gtp_message_t)); req->originating_node.presence = 1; req->originating_node.u8 = GTP_NODE_TYPE_MME; gtp_message.h.type = type; rv = gtp_build_msg(pkbuf, >p_message); d_assert(rv == CORE_OK, return CORE_ERROR, "gtp build failed"); return CORE_OK; } status_t mme_s11_build_downlink_data_notification_ack( pkbuf_t **pkbuf, c_uint8_t type) { status_t rv; gtp_message_t gtp_message; gtp_downlink_data_notification_acknowledge_t *ack = >p_message.downlink_data_notification_acknowledge; gtp_cause_t cause; d_trace(3, "[MME] Downlink Data Notification Ackknowledge\n"); memset(>p_message, 0, sizeof(gtp_message_t)); memset(&cause, 0, sizeof(cause)); cause.value = GTP_CAUSE_REQUEST_ACCEPTED; ack->cause.presence = 1; ack->cause.data = &cause; ack->cause.len = sizeof(cause); gtp_message.h.type = type; rv = gtp_build_msg(pkbuf, >p_message); d_assert(rv == CORE_OK, return CORE_ERROR, "gtp build failed"); return CORE_OK; } status_t mme_s11_build_create_indirect_data_forwarding_tunnel_request( pkbuf_t **pkbuf, c_uint8_t type, mme_ue_t *mme_ue) { status_t rv; int i; mme_sess_t *sess = NULL; mme_bearer_t *bearer = NULL; gtp_message_t gtp_message; gtp_create_indirect_data_forwarding_tunnel_request_t *req = >p_message.create_indirect_data_forwarding_tunnel_request; tlv_bearer_context_t *bearers[GTP_MAX_NUM_OF_INDIRECT_TUNNEL]; gtp_f_teid_t dl_teid[GTP_MAX_NUM_OF_INDIRECT_TUNNEL]; gtp_f_teid_t ul_teid[GTP_MAX_NUM_OF_INDIRECT_TUNNEL]; int len; d_assert(mme_ue, return CORE_ERROR, "Null param"); d_trace(3, "[MME] Create Indirect Data Forwarding Tunnel Request\n"); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", mme_ue->mme_s11_teid, mme_ue->sgw_s11_teid); gtp_bearers_in_create_indirect_tunnel_request(&bearers, req); memset(>p_message, 0, sizeof(gtp_message_t)); i = 0; sess = mme_sess_first(mme_ue); while (sess != NULL) { bearer = mme_bearer_first(sess); while(bearer != NULL) { if (MME_HAVE_ENB_DL_INDIRECT_TUNNEL(bearer)) { memset(&dl_teid[i], 0, sizeof(gtp_f_teid_t)); dl_teid[i].interface_type = GTP_F_TEID_ENODEB_GTP_U_FOR_DL_DATA_FORWARDING; dl_teid[i].teid = htonl(bearer->enb_dl_teid); rv = gtp_ip_to_f_teid(&bearer->enb_dl_ip, &dl_teid[i], &len); d_assert(rv == CORE_OK, return CORE_ERROR,); d_assert(bearers[i], return CORE_ERROR,); bearers[i]->s1_u_enodeb_f_teid.presence = 1; bearers[i]->s1_u_enodeb_f_teid.data = &dl_teid[i]; bearers[i]->s1_u_enodeb_f_teid.len = len; } if (MME_HAVE_ENB_UL_INDIRECT_TUNNEL(bearer)) { memset(&ul_teid[i], 0, sizeof(gtp_f_teid_t)); ul_teid[i].interface_type = GTP_F_TEID_ENODEB_GTP_U_FOR_UL_DATA_FORWARDING; ul_teid[i].teid = htonl(bearer->enb_ul_teid); rv = gtp_ip_to_f_teid(&bearer->enb_ul_ip, &ul_teid[i], &len); d_assert(rv == CORE_OK, return CORE_ERROR,); d_assert(bearers[i], return CORE_ERROR,); bearers[i]->s12_rnc_f_teid.presence = 1; bearers[i]->s12_rnc_f_teid.data = &ul_teid[i]; bearers[i]->s12_rnc_f_teid.len = len; } if (MME_HAVE_ENB_DL_INDIRECT_TUNNEL(bearer) || MME_HAVE_ENB_UL_INDIRECT_TUNNEL(bearer)) { bearers[i]->presence = 1; bearers[i]->eps_bearer_id.presence = 1; bearers[i]->eps_bearer_id.u8 = bearer->ebi; i++; } bearer = mme_bearer_next(bearer); } sess = mme_sess_next(sess); } gtp_message.h.type = type; rv = gtp_build_msg(pkbuf, >p_message); d_assert(rv == CORE_OK, return CORE_ERROR, "gtp build failed"); return CORE_OK; } nextepc-0.3.10/src/mme/mme_s11_build.h000066400000000000000000000025231333553357400174150ustar00rootroot00000000000000#ifndef __MME_S11_BUILD_H__ #define __MME_S11_BUILD_H__ #include "gtp/gtp_message.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(status_t) mme_s11_build_create_session_request( pkbuf_t **pkbuf, c_uint8_t type, mme_sess_t *sess); CORE_DECLARE(status_t) mme_s11_build_modify_bearer_request(pkbuf_t **pkbuf, c_uint8_t type, mme_bearer_t *bearer, int uli_presense); CORE_DECLARE(status_t) mme_s11_build_delete_session_request( pkbuf_t **pkbuf, c_uint8_t type, mme_sess_t *sess); CORE_DECLARE(status_t) mme_s11_build_create_bearer_response( pkbuf_t **pkbuf, c_uint8_t type, mme_bearer_t *bearer); CORE_DECLARE(status_t) mme_s11_build_update_bearer_response( pkbuf_t **pkbuf, c_uint8_t type, mme_bearer_t *bearer); CORE_DECLARE(status_t) mme_s11_build_delete_bearer_response( pkbuf_t **pkbuf, c_uint8_t type, mme_bearer_t *bearer); CORE_DECLARE(status_t) mme_s11_build_release_access_bearers_request( pkbuf_t **pkbuf, c_uint8_t type); CORE_DECLARE(status_t) mme_s11_build_downlink_data_notification_ack( pkbuf_t **pkbuf, c_uint8_t type); CORE_DECLARE(status_t) mme_s11_build_create_indirect_data_forwarding_tunnel_request( pkbuf_t **pkbuf, c_uint8_t type, mme_ue_t *mme_ue); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __MME_S11_BUILD_H__ */ nextepc-0.3.10/src/mme/mme_s11_handler.c000066400000000000000000000513561333553357400177360ustar00rootroot00000000000000#define TRACE_MODULE _mme_s11_handler #include "core_debug.h" #include "gtp/gtp_types.h" #include "gtp/gtp_conv.h" #include "gtp/gtp_xact.h" #include "mme_event.h" #include "mme_sm.h" #include "mme_context.h" #include "s1ap_path.h" #include "mme_gtp_path.h" #include "nas_path.h" #include "mme_fd_path.h" #include "mme_s11_build.h" #include "mme_s11_handler.h" void mme_s11_handle_create_session_response( gtp_xact_t *xact, mme_ue_t *mme_ue, gtp_create_session_response_t *rsp) { status_t rv; gtp_f_teid_t *sgw_s11_teid = NULL; gtp_f_teid_t *sgw_s1u_teid = NULL; mme_bearer_t *bearer = NULL; mme_sess_t *sess = NULL; pdn_t *pdn = NULL; d_assert(xact, return, "Null param"); d_assert(mme_ue, return, "Null param"); d_assert(rsp, return, "Null param"); d_trace(3, "[MME] Create Session Response\n"); if (rsp->sender_f_teid_for_control_plane.presence == 0) { d_error("No S11 TEID"); return; } if (rsp->pdn_address_allocation.presence == 0) { d_error("No PDN Address Allocation"); return; } if (rsp->bearer_contexts_created.s1_u_enodeb_f_teid.presence == 0) { d_error("No S1U TEID"); return; } if (rsp->bearer_contexts_created.presence == 0) { d_error("No Bearer"); return; } if (rsp->bearer_contexts_created. eps_bearer_id.presence == 0) { d_error("No EPS Bearer ID"); return; } d_assert(mme_ue, return, "Null param"); bearer = mme_bearer_find_by_ue_ebi(mme_ue, rsp->bearer_contexts_created.eps_bearer_id.u8); d_assert(bearer, return, "Null param"); sess = bearer->sess; d_assert(sess, return, "Null param"); pdn = sess->pdn; d_assert(pdn, return, "Null param"); /* Control Plane(UL) : SGW-S11 */ sgw_s11_teid = rsp->sender_f_teid_for_control_plane.data; mme_ue->sgw_s11_teid = ntohl(sgw_s11_teid->teid); memcpy(&pdn->paa, rsp->pdn_address_allocation.data, rsp->pdn_address_allocation.len); /* PCO */ if (rsp->protocol_configuration_options.presence) { TLV_STORE_DATA(&sess->pgw_pco, &rsp->protocol_configuration_options); } /* Data Plane(UL) : SGW-S1U */ sgw_s1u_teid = rsp->bearer_contexts_created.s1_u_enodeb_f_teid.data; bearer->sgw_s1u_teid = ntohl(sgw_s1u_teid->teid); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", mme_ue->mme_s11_teid, mme_ue->sgw_s11_teid); d_trace(5, " ENB_S1U_TEID[%d] SGW_S1U_TEID[%d]\n", bearer->enb_s1u_teid, bearer->sgw_s1u_teid); rv = gtp_f_teid_to_ip(sgw_s1u_teid, &bearer->sgw_s1u_ip); d_assert(rv == CORE_OK, return,); rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK, return, "xact_commit error"); if (FSM_CHECK(&mme_ue->sm, emm_state_initial_context_setup)) { rv = nas_send_attach_accept(mme_ue); d_assert(rv == CORE_OK, return, "nas_send_attach_accept failed"); } else if (FSM_CHECK(&mme_ue->sm, emm_state_registered)) { rv = nas_send_activate_default_bearer_context_request(bearer); d_assert(rv == CORE_OK, return, "nas send failed"); } else d_assert(0,, "Invalid EMM state"); } void mme_s11_handle_modify_bearer_response( gtp_xact_t *xact, mme_ue_t *mme_ue, gtp_modify_bearer_response_t *rsp) { status_t rv; enb_ue_t *source_ue = NULL, *target_ue = NULL; d_assert(mme_ue, return, "Null param"); d_assert(xact, goto cleanup, "Null param"); d_assert(rsp, goto cleanup, "Null param"); d_trace(3, "[MME] Modify Bearer Response\n"); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", mme_ue->mme_s11_teid, mme_ue->sgw_s11_teid); rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK, goto cleanup, "xact_commit error"); GTP_COUNTER_CHECK(mme_ue, GTP_COUNTER_MODIFY_BEARER_BY_PATH_SWITCH, rv = s1ap_send_path_switch_ack(mme_ue); d_assert(rv == CORE_OK,, "s1ap send error"); ); GTP_COUNTER_CHECK(mme_ue, GTP_COUNTER_MODIFY_BEARER_BY_HANDOVER_NOTIFY, target_ue = mme_ue->enb_ue; d_assert(target_ue, return, "Null param"); source_ue = target_ue->source_ue; d_assert(source_ue, return, "Null param"); rv = s1ap_send_ue_context_release_command(source_ue, S1AP_Cause_PR_radioNetwork, S1AP_CauseRadioNetwork_successful_handover, S1AP_UE_CTX_REL_DELETE_INDIRECT_TUNNEL, 300); d_assert(rv == CORE_OK,, "s1ap send error"); ); return; cleanup: GTP_COUNTER_CHECK(mme_ue, GTP_COUNTER_MODIFY_BEARER_BY_PATH_SWITCH,); GTP_COUNTER_CHECK(mme_ue, GTP_COUNTER_MODIFY_BEARER_BY_HANDOVER_NOTIFY,); } void mme_s11_handle_delete_session_response( gtp_xact_t *xact, mme_ue_t *mme_ue, gtp_delete_session_response_t *rsp) { status_t rv; mme_sess_t *sess = NULL; d_assert(mme_ue, return, "Null param"); d_assert(xact, return, "Null param"); sess = GTP_XACT_RETRIEVE_SESSION(xact); d_assert(sess, return, "Null param"); d_assert(rsp, goto cleanup, "Null param"); d_trace(3, "[MME] Delete Session Response\n"); if (rsp->cause.presence == 0) { d_error("No Cause"); goto cleanup; } d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", mme_ue->mme_s11_teid, mme_ue->sgw_s11_teid); rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK, goto cleanup, "xact_commit error"); if (FSM_CHECK(&mme_ue->sm, emm_state_authentication)) { if (mme_sess_count(mme_ue) == 1) /* Last Session */ { mme_s6a_send_air(mme_ue, NULL); } } else if (FSM_CHECK(&mme_ue->sm, emm_state_de_registered)) { if (mme_sess_count(mme_ue) == 1) /* Last Session */ { rv = nas_send_detach_accept(mme_ue); d_assert(rv == CORE_OK,, "nas_send_detach_accept failed"); } } else if (FSM_CHECK(&mme_ue->sm, emm_state_registered)) { mme_bearer_t *bearer = mme_default_bearer_in_sess(sess); d_assert(bearer, goto cleanup, "Null param"); if (FSM_CHECK(&bearer->sm, esm_state_pdn_will_disconnect)) { rv = nas_send_deactivate_bearer_context_request(bearer); d_assert(rv == CORE_OK,, "nas_send_deactivate_bearer_context_request failed"); /* * mme_sess_remove() should not be called here. * * Session will be removed if Deactivate bearer context * accept is received */ CLEAR_SGW_S1U_PATH(sess); return; } else d_assert(0,, "Invalid ESM state"); } else if (FSM_CHECK(&mme_ue->sm, emm_state_initial_context_setup) || FSM_CHECK(&mme_ue->sm, emm_state_exception)) { if (mme_sess_count(mme_ue) == 1) /* Last Session */ { enb_ue_t *enb_ue = NULL; enb_ue = mme_ue->enb_ue; d_assert(enb_ue, goto cleanup, ); rv = s1ap_send_ue_context_release_command(enb_ue, S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release, S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE, 0); d_assert(rv == CORE_OK,, "s1ap send error"); } } else d_assert(0,, "Invalid EMM state"); cleanup: if (mme_sess_count(mme_ue) == 1) /* Last Session */ CLEAR_SESSION_CONTEXT(mme_ue); mme_sess_remove(sess); } void mme_s11_handle_create_bearer_request( gtp_xact_t *xact, mme_ue_t *mme_ue, gtp_create_bearer_request_t *req) { status_t rv; mme_bearer_t *bearer = NULL, *default_bearer = NULL; mme_sess_t *sess = NULL; gtp_f_teid_t *sgw_s1u_teid = NULL; gtp_bearer_qos_t bearer_qos; d_assert(xact, return, "Null param"); d_assert(mme_ue, return, "Null param"); d_assert(req, return, "Null param"); d_trace(3, "[MME] Create Bearer Response\n"); if (req->linked_eps_bearer_id.presence == 0) { d_error("No Linked EBI"); return; } if (req->bearer_contexts.presence == 0) { d_error("No Bearer"); return; } if (req->bearer_contexts.eps_bearer_id.presence == 0) { d_error("No EPS Bearer ID"); return; } if (req->bearer_contexts.s1_u_enodeb_f_teid.presence == 0) { d_error("No GTP TEID"); return; } if (req->bearer_contexts.bearer_level_qos.presence == 0) { d_error("No QoS"); return; } if (req->bearer_contexts.tft.presence == 0) { d_error("No TFT"); return; } d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", mme_ue->mme_s11_teid, mme_ue->sgw_s11_teid); sess = mme_sess_find_by_ebi(mme_ue, req->linked_eps_bearer_id.u8); d_assert(sess, return, "No Session Context(EBI:%d)", req->linked_eps_bearer_id); bearer = mme_bearer_add(sess); d_assert(bearer, return, "No Bearer Context"); /* Data Plane(UL) : SGW-S1U */ sgw_s1u_teid = req->bearer_contexts.s1_u_enodeb_f_teid.data; bearer->sgw_s1u_teid = ntohl(sgw_s1u_teid->teid); rv = gtp_f_teid_to_ip(sgw_s1u_teid, &bearer->sgw_s1u_ip); d_assert(rv == CORE_OK, return,); /* Bearer QoS */ d_assert(gtp_parse_bearer_qos(&bearer_qos, &req->bearer_contexts.bearer_level_qos) == req->bearer_contexts.bearer_level_qos.len, return,); bearer->qos.qci = bearer_qos.qci; bearer->qos.arp.priority_level = bearer_qos.priority_level; bearer->qos.arp.pre_emption_capability = bearer_qos.pre_emption_capability; bearer->qos.arp.pre_emption_vulnerability = bearer_qos.pre_emption_vulnerability; bearer->qos.mbr.downlink = bearer_qos.dl_mbr; bearer->qos.mbr.uplink = bearer_qos.ul_mbr; bearer->qos.gbr.downlink = bearer_qos.dl_gbr; bearer->qos.gbr.uplink = bearer_qos.ul_gbr; /* Save Bearer TFT */ TLV_STORE_DATA(&bearer->tft, &req->bearer_contexts.tft); /* Save Transaction. will be handled after EMM-attached */ bearer->xact = xact; /* Before Activate DEDICATED bearer, we'll check DEFAULT bearer status */ default_bearer = mme_default_bearer_in_sess(sess); d_assert(default_bearer, return,); if (/* Check if Activate Default Bearer Accept is received */ FSM_CHECK(&default_bearer->sm, esm_state_active) && /* Check if Initial Context Setup Response or * E-RAB Setup Response is received */ MME_HAVE_ENB_S1U_PATH(default_bearer)) { rv = nas_send_activate_dedicated_bearer_context_request(bearer); d_assert(rv == CORE_OK, return, "nas_send_activate_dedicated_bearer_context failed"); } } void mme_s11_handle_update_bearer_request( gtp_xact_t *xact, mme_ue_t *mme_ue, gtp_update_bearer_request_t *req) { status_t rv; mme_bearer_t *bearer = NULL; gtp_bearer_qos_t bearer_qos; d_assert(xact, return, "Null param"); d_assert(mme_ue, return, "Null param"); d_assert(req, return, "Null param"); d_trace(3, "[MME] Update Bearer Request\n"); if (req->bearer_contexts.presence == 0) { d_error("No Bearer"); return; } if (req->bearer_contexts.eps_bearer_id.presence == 0) { d_error("No EPS Bearer ID"); return; } d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", mme_ue->mme_s11_teid, mme_ue->sgw_s11_teid); bearer = mme_bearer_find_by_ue_ebi(mme_ue, req->bearer_contexts.eps_bearer_id.u8); d_assert(bearer, return, "No Bearer Context(EBI:%d)", req->bearer_contexts.eps_bearer_id.u8); /* Save Transaction. will be handled after EMM-attached */ bearer->xact = xact; if (/* Check if Activate Default/Dedicated Bearer Accept is received */ FSM_CHECK(&bearer->sm, esm_state_active) && /* Check if Initial Context Setup Response or * E-RAB Setup Response is received */ MME_HAVE_ENB_S1U_PATH(bearer)) { if (req->bearer_contexts.bearer_level_qos.presence == 1) { /* Bearer QoS */ d_assert(gtp_parse_bearer_qos(&bearer_qos, &req->bearer_contexts.bearer_level_qos) == req->bearer_contexts.bearer_level_qos.len, return,); bearer->qos.qci = bearer_qos.qci; bearer->qos.arp.priority_level = bearer_qos.priority_level; bearer->qos.arp.pre_emption_capability = bearer_qos.pre_emption_capability; bearer->qos.arp.pre_emption_vulnerability = bearer_qos.pre_emption_vulnerability; bearer->qos.mbr.downlink = bearer_qos.dl_mbr; bearer->qos.mbr.uplink = bearer_qos.ul_mbr; bearer->qos.gbr.downlink = bearer_qos.dl_gbr; bearer->qos.gbr.uplink = bearer_qos.ul_gbr; } if (req->bearer_contexts.tft.presence == 1) { /* Save Bearer TFT */ TLV_STORE_DATA(&bearer->tft, &req->bearer_contexts.tft); } if (req->bearer_contexts.bearer_level_qos.presence == 1 || req->bearer_contexts.tft.presence == 1) { rv = nas_send_modify_bearer_context_request( bearer, req->bearer_contexts.bearer_level_qos.presence, req->bearer_contexts.tft.presence); d_assert(rv == CORE_OK, return, "nas_send_deactivate_bearer_context_request failed"); } else { d_warn("[IGNORE] Update Bearer Request : " "Both QoS and TFT is NULL"); rv = mme_gtp_send_update_bearer_response(bearer); d_assert(rv == CORE_OK, return, "mme_gtp_send_delete_session_request error"); } } else { if (!FSM_CHECK(&bearer->sm, esm_state_active)) { d_assert(0,, "Invalid Bearer State"); } else if (!MME_HAVE_ENB_S1U_PATH(bearer)) { d_assert(0,, "No ENB S1U PATH"); } else d_assert(0,,); } } void mme_s11_handle_delete_bearer_request( gtp_xact_t *xact, mme_ue_t *mme_ue, gtp_delete_bearer_request_t *req) { status_t rv; mme_bearer_t *bearer = NULL; d_assert(xact, return, "Null param"); d_assert(mme_ue, return, "Null param"); d_assert(req, return, "Null param"); d_trace(3, "[MME] Delete Bearer Request\n"); if (req->linked_eps_bearer_id.presence == 1) { bearer = mme_bearer_find_by_ue_ebi(mme_ue, req->linked_eps_bearer_id.u8); d_assert(bearer, return, "No Bearer Context(EBI:%d)", req->linked_eps_bearer_id.u8); } else if (req->eps_bearer_ids.presence == 1) { bearer = mme_bearer_find_by_ue_ebi( mme_ue, req->eps_bearer_ids.u8); d_assert(bearer, return, "No Bearer Context(EBI:%d)", req->eps_bearer_ids.u8); } else { d_error("No Linked EBI or EPS Bearer ID"); return; } d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", mme_ue->mme_s11_teid, mme_ue->sgw_s11_teid); /* Save Transaction. will be handled after EMM-attached */ bearer->xact = xact; if (/* Check if Activate Default/Dedicated Bearer Accept is received */ FSM_CHECK(&bearer->sm, esm_state_active) && /* Check if Initial Context Setup Response or * E-RAB Setup Response is received */ MME_HAVE_ENB_S1U_PATH(bearer)) { rv = nas_send_deactivate_bearer_context_request(bearer); d_assert(rv == CORE_OK, return, "nas_send_deactivate_bearer_context_request failed"); } else { if (!FSM_CHECK(&bearer->sm, esm_state_active)) { d_assert(0,, "Invalid Bearer State"); } else if (!MME_HAVE_ENB_S1U_PATH(bearer)) { d_assert(0,, "No ENB S1U PATH"); } else d_assert(0,,); } } void mme_s11_handle_release_access_bearers_response( gtp_xact_t *xact, mme_ue_t *mme_ue, gtp_release_access_bearers_response_t *rsp) { status_t rv; enb_ue_t *enb_ue = NULL; d_assert(xact, return, "Null param"); d_assert(mme_ue, return, "Null param"); d_assert(rsp, return, "Null param"); d_trace(3, "[MME] Release Access Bearers Response\n"); enb_ue = mme_ue->enb_ue; d_assert(enb_ue, return, "Null param"); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", mme_ue->mme_s11_teid, mme_ue->sgw_s11_teid); rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK,, "xact_commit error"); if (rsp->cause.presence == 0) { d_error("No Cause"); return; } rv = CLEAR_BEARER_CONTEXT(mme_ue); d_assert(rv == CORE_OK,, "MME_BEARER_SET_INACTIVE failed"); rv = s1ap_send_ue_context_release_command(enb_ue, S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release, S1AP_UE_CTX_REL_S1_NORMAL_RELEASE, 0); d_assert(rv == CORE_OK,, "s1ap send error"); } void mme_s11_handle_downlink_data_notification( gtp_xact_t *xact, mme_ue_t *mme_ue, gtp_downlink_data_notification_t *noti) { status_t rv; gtp_header_t h; pkbuf_t *s11buf = NULL; d_assert(xact, return, "Null param"); d_assert(mme_ue, return, "Null param"); d_assert(noti, return, "Null param"); d_trace(3, "[MME] Downlink Data Notification\n"); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", mme_ue->mme_s11_teid, mme_ue->sgw_s11_teid); /* Build Downlink data notification ack */ memset(&h, 0, sizeof(gtp_header_t)); h.type = GTP_DOWNLINK_DATA_NOTIFICATION_ACKNOWLEDGE_TYPE; h.teid = mme_ue->sgw_s11_teid; rv = mme_s11_build_downlink_data_notification_ack(&s11buf, h.type); d_assert(rv == CORE_OK, return, "S11 build error"); rv = gtp_xact_update_tx(xact, &h, s11buf); d_assert(rv == CORE_OK, return, "xact_update_tx error"); rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK, return, "xact_commit error"); } void mme_s11_handle_create_indirect_data_forwarding_tunnel_response( gtp_xact_t *xact, mme_ue_t *mme_ue, gtp_create_indirect_data_forwarding_tunnel_response_t *rsp) { status_t rv; mme_bearer_t *bearer = NULL; enb_ue_t *source_ue = NULL; int i; tlv_bearer_context_t *bearers[GTP_MAX_NUM_OF_INDIRECT_TUNNEL]; gtp_f_teid_t *teid = NULL; d_assert(xact, return, "Null param"); d_assert(mme_ue, return, "Null param"); d_assert(rsp, return, "Null param"); source_ue = mme_ue->enb_ue; d_assert(source_ue, return, "Null param"); d_trace(3, "[MME] Create Indirect Data Forwarding Tunnel Response\n"); if (rsp->cause.presence == 0) { d_error("No Cause"); return; } d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", mme_ue->mme_s11_teid, mme_ue->sgw_s11_teid); rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK, return, "xact_commit error"); gtp_bearers_in_create_indirect_tunnel_response(&bearers, rsp); for (i = 0; bearers[i]->presence; i++) { if (bearers[i]->eps_bearer_id.presence == 0) { d_error("No EBI"); return; } bearer = mme_bearer_find_by_ue_ebi(mme_ue, bearers[i]->eps_bearer_id.u8); d_assert(bearer, return, "No Bearer Context"); if (bearers[i]->s4_u_sgsn_f_teid.presence) { teid = bearers[i]->s4_u_sgsn_f_teid.data; d_assert(teid, return,); bearer->sgw_dl_teid = ntohl(teid->teid); rv = gtp_f_teid_to_ip(teid, &bearer->sgw_dl_ip); d_assert(rv == CORE_OK, return,); } if (bearers[i]->s2b_u_epdg_f_teid_5.presence) { teid = bearers[i]->s2b_u_epdg_f_teid_5.data; d_assert(teid, return,); bearer->sgw_ul_teid = ntohl(teid->teid); rv = gtp_f_teid_to_ip(teid, &bearer->sgw_ul_ip); d_assert(rv == CORE_OK, return,); } } rv = s1ap_send_handover_command(source_ue); d_assert(rv == CORE_OK,, "s1ap send error"); } void mme_s11_handle_delete_indirect_data_forwarding_tunnel_response( gtp_xact_t *xact, mme_ue_t *mme_ue, gtp_delete_indirect_data_forwarding_tunnel_response_t *rsp) { status_t rv; d_assert(xact, return, "Null param"); d_assert(mme_ue, return, "Null param"); d_assert(rsp, return, "Null param"); d_trace(3, "[MME] Delete Indirect Data Forwarding Tunnel Response\n"); if (rsp->cause.presence == 0) { d_error("No Cause"); return; } d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", mme_ue->mme_s11_teid, mme_ue->sgw_s11_teid); rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK,, "xact_commit error"); rv = mme_ue_clear_indirect_tunnel(mme_ue); d_assert(rv == CORE_OK,, "mme_ue_clear_indirect_tunnel() failed"); } nextepc-0.3.10/src/mme/mme_s11_handler.h000066400000000000000000000034041333553357400177320ustar00rootroot00000000000000#ifndef __MME_S11_HANDLER_H__ #define __MME_S11_HANDLER_H__ #include "gtp/gtp_message.h" #include "mme_context.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(void) mme_s11_handle_create_session_response( gtp_xact_t *xact, mme_ue_t *mme_ue, gtp_create_session_response_t *rsp); CORE_DECLARE(void) mme_s11_handle_modify_bearer_response( gtp_xact_t *xact, mme_ue_t *mme_ue, gtp_modify_bearer_response_t *rsp); CORE_DECLARE(void) mme_s11_handle_delete_session_response( gtp_xact_t *xact, mme_ue_t *mme_ue, gtp_delete_session_response_t *rsp); CORE_DECLARE(void) mme_s11_handle_create_bearer_request( gtp_xact_t *xact, mme_ue_t *mme_ue, gtp_create_bearer_request_t *rsp); CORE_DECLARE(void) mme_s11_handle_update_bearer_request( gtp_xact_t *xact, mme_ue_t *mme_ue, gtp_update_bearer_request_t *rsp); CORE_DECLARE(void) mme_s11_handle_delete_bearer_request( gtp_xact_t *xact, mme_ue_t *mme_ue, gtp_delete_bearer_request_t *rsp); CORE_DECLARE(void) mme_s11_handle_release_access_bearers_response( gtp_xact_t *xact, mme_ue_t *mme_ue, gtp_release_access_bearers_response_t *rsp); CORE_DECLARE(void) mme_s11_handle_downlink_data_notification( gtp_xact_t *xact, mme_ue_t *mme_ue, gtp_downlink_data_notification_t *noti); CORE_DECLARE(void) mme_s11_handle_create_indirect_data_forwarding_tunnel_response( gtp_xact_t *xact, mme_ue_t *mme_ue, gtp_create_indirect_data_forwarding_tunnel_response_t *rsp); CORE_DECLARE(void) mme_s11_handle_delete_indirect_data_forwarding_tunnel_response( gtp_xact_t *xact, mme_ue_t *mme_ue, gtp_delete_indirect_data_forwarding_tunnel_response_t *rsp); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __MME_S11_HANDLER_H__ */ nextepc-0.3.10/src/mme/mme_s6a_handler.c000066400000000000000000000024661333553357400200210ustar00rootroot00000000000000#define TRACE_MODULE _mme_s6a_handler #include "core_debug.h" #include "fd/s6a/s6a_message.h" #include "nas_path.h" #include "s1ap_path.h" #include "mme_sm.h" #include "mme_s6a_handler.h" void mme_s6a_handle_aia(mme_ue_t *mme_ue, s6a_aia_message_t *aia_message) { status_t rv; e_utran_vector_t *e_utran_vector = NULL; d_assert(mme_ue, return, "Null param"); d_assert(aia_message, return, "Null param"); e_utran_vector = &aia_message->e_utran_vector; d_assert(e_utran_vector, return, "Null param"); mme_ue->xres_len = e_utran_vector->xres_len; memcpy(mme_ue->xres, e_utran_vector->xres, mme_ue->xres_len); memcpy(mme_ue->kasme, e_utran_vector->kasme, SHA256_DIGEST_SIZE); memcpy(mme_ue->rand, e_utran_vector->rand, RAND_LEN); rv = nas_send_authentication_request(mme_ue, e_utran_vector); d_assert(rv == CORE_OK,, "nas send failed"); } void mme_s6a_handle_ula(mme_ue_t *mme_ue, s6a_ula_message_t *ula_message) { s6a_subscription_data_t *subscription_data = NULL; d_assert(mme_ue, return, "Null param"); d_assert(ula_message, return, "Null param"); subscription_data = &ula_message->subscription_data; d_assert(subscription_data, return, "Null param"); memcpy(&mme_ue->subscription_data, subscription_data, sizeof(s6a_subscription_data_t)); } nextepc-0.3.10/src/mme/mme_s6a_handler.h000066400000000000000000000007101333553357400200140ustar00rootroot00000000000000#ifndef __MME_S6A_HANDLER_H__ #define __MME_S6A_HANDLER_H__ #include "fd/s6a/s6a_message.h" #include "mme_context.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(void) mme_s6a_handle_aia( mme_ue_t *mme_ue, s6a_aia_message_t *aia_message); CORE_DECLARE(void) mme_s6a_handle_ula( mme_ue_t *mme_ue, s6a_ula_message_t *ula_message); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __MME_S6A_HANDLER_H__ */ nextepc-0.3.10/src/mme/mme_sm.c000066400000000000000000000540471333553357400162540ustar00rootroot00000000000000#define TRACE_MODULE _mme_sm #include "core_debug.h" #include "core_lib.h" #include "s1ap/s1ap_message.h" #include "nas/nas_message.h" #include "gtp/gtp_xact.h" #include "fd/fd_lib.h" #include "mme_event.h" #include "mme_sm.h" #include "s1ap_handler.h" #include "s1ap_path.h" #include "nas_security.h" #include "nas_path.h" #include "emm_handler.h" #include "esm_handler.h" #include "mme_gtp_path.h" #include "mme_s11_handler.h" #include "mme_fd_path.h" #include "mme_s6a_handler.h" #include "mme_path.h" void mme_state_initial(fsm_t *s, event_t *e) { mme_sm_trace(3, e); d_assert(s, return, "Null param"); FSM_TRAN(s, &mme_state_operational); } void mme_state_final(fsm_t *s, event_t *e) { mme_sm_trace(3, e); d_assert(s, return, "Null param"); } void mme_state_operational(fsm_t *s, event_t *e) { status_t rv; char buf[CORE_ADDRSTRLEN]; mme_sm_trace(3, e); d_assert(s, return, "Null param"); switch (event_get(e)) { case FSM_ENTRY_SIG: { rv = mme_gtp_open(); if (rv != CORE_OK) { d_error("Can't establish S11-GTP path"); break; } rv = s1ap_open(); if (rv != CORE_OK) { d_error("Can't establish S1AP path"); break; } break; } case FSM_EXIT_SIG: { rv = mme_gtp_close(); if (rv != CORE_OK) { d_error("Can't close S11-GTP path"); } rv = s1ap_close(); if (rv != CORE_OK) { d_error("Can't close S1AP path"); } break; } case MME_EVT_S1AP_LO_ACCEPT: { sock_id sock = (sock_id)event_get_param1(e); d_assert(sock, break,); c_sockaddr_t *addr = (c_sockaddr_t *)event_get_param2(e); d_assert(addr, break,); mme_enb_t *enb = NULL; d_trace(1, "eNB-S1 accepted[%s] in master_sm module\n", CORE_ADDR(addr, buf)); enb = mme_enb_find_by_addr(addr); if (!enb) { #if USE_USRSCTP != 1 status_t rv; rv = sock_register(sock, s1ap_recv_handler, NULL); d_assert(rv == CORE_OK, break, "register s1ap_recv_cb failed"); #endif enb = mme_enb_add(sock, addr); d_assert(enb, break, "Null param"); } else { d_warn("eNB context duplicated with IP-address [%s]!!!", CORE_ADDR(addr, buf)); sock_delete(sock); d_warn("S1 Socket Closed"); } break; } case MME_EVT_S1AP_LO_SCTP_COMM_UP: { mme_enb_t *enb = NULL; sock_id sock = 0; c_sockaddr_t *addr = NULL; c_uint16_t outbound_streams = 0; sock = (sock_id)event_get_param1(e); d_assert(sock, break, "Null param"); addr = (c_sockaddr_t *)event_get_param2(e); d_assert(addr, break, "Null param"); outbound_streams = (c_uint16_t)event_get_param4(e); enb = mme_enb_find_by_addr(addr); if (!enb) { #if USE_USRSCTP != 1 status_t rv; rv = sock_register(sock, s1ap_recv_handler, NULL); d_assert(rv == CORE_OK, break, "register s1ap_recv_cb failed"); #endif enb = mme_enb_add(sock, addr); d_assert(enb, break, "Null param"); } else { CORE_FREE(addr); } enb->outbound_streams = c_min(outbound_streams, enb->outbound_streams); d_trace(3, "eNB-S1 SCTP_COMM_UP[%s] Outbound Streams[%d]\n", CORE_ADDR(addr, buf), enb->outbound_streams); break; } case MME_EVT_S1AP_LO_CONNREFUSED: { mme_enb_t *enb = NULL; sock_id sock = 0; c_sockaddr_t *addr = NULL; sock = (sock_id)event_get_param1(e); d_assert(sock, break, "Null param"); addr = (c_sockaddr_t *)event_get_param2(e); d_assert(addr, break, "Null param"); enb = mme_enb_find_by_addr(addr); CORE_FREE(addr); if (enb) { d_trace(1, "eNB-S1[%x] connection refused!!!\n", enb->enb_id); mme_enb_remove(enb); } else { d_warn("Socket connection refused, Already Removed!"); } break; } case MME_EVT_S1AP_MESSAGE: { s1ap_message_t message; mme_enb_t *enb = NULL; sock_id sock = 0; c_sockaddr_t *addr = NULL; pkbuf_t *pkbuf = NULL; sock = (sock_id)event_get_param1(e); d_assert(sock, break, "Null param"); addr = (c_sockaddr_t *)event_get_param2(e); d_assert(addr, break, "Null param"); pkbuf = (pkbuf_t *)event_get_param3(e); d_assert(pkbuf, break, "Null param"); enb = mme_enb_find_by_addr(addr); CORE_FREE(addr); d_assert(enb, pkbuf_free(pkbuf); break, "No eNB context"); d_assert(FSM_STATE(&enb->sm), pkbuf_free(pkbuf); break, "No S1AP State Machine"); rv = s1ap_decode_pdu(&message, pkbuf); if (rv != CORE_OK) { d_print_hex(pkbuf->payload, pkbuf->len); d_assert(0, s1ap_free_pdu(&message); pkbuf_free(pkbuf); break, "Can't decode S1AP_PDU"); } event_set_param1(e, (c_uintptr_t)enb->index); event_set_param4(e, (c_uintptr_t)&message); fsm_dispatch(&enb->sm, (fsm_event_t*)e); s1ap_free_pdu(&message); pkbuf_free(pkbuf); break; } case MME_EVT_S1AP_DELAYED_SEND: { enb_ue_t *enb_ue = NULL; pkbuf_t *pkbuf = NULL; tm_block_id timer = 0; enb_ue = enb_ue_find(event_get_param1(e)); d_assert(enb_ue, break,); pkbuf = (pkbuf_t *)event_get_param2(e); d_assert(pkbuf, break,); timer = event_get_param3(e); d_assert(timer, pkbuf_free(pkbuf); break,); rv = s1ap_send_to_enb_ue(enb_ue, pkbuf); d_assert(rv == CORE_OK, pkbuf_free(pkbuf),); tm_delete(timer); break; } case MME_EVT_S1AP_S1_HOLDING_TIMER: { enb_ue_t *enb_ue = NULL; enb_ue = enb_ue_find(event_get_param1(e)); d_assert(enb_ue, break, "No ENB UE context"); d_warn("Implicit S1 release"); d_warn(" ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]", enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id); rv = enb_ue_remove(enb_ue); d_assert(rv == CORE_OK,,); break; } case MME_EVT_EMM_MESSAGE: { nas_message_t message; pkbuf_t *pkbuf = NULL; enb_ue_t *enb_ue = NULL; mme_ue_t *mme_ue = NULL; enb_ue = enb_ue_find(event_get_param1(e)); d_assert(enb_ue, break, "No ENB UE context"); pkbuf = (pkbuf_t *)event_get_param4(e); d_assert(pkbuf, break, "Null param"); d_assert(nas_emm_decode(&message, pkbuf) == CORE_OK, pkbuf_free(pkbuf); break, "Can't decode NAS_EMM"); mme_ue = enb_ue->mme_ue; if (!mme_ue) { mme_ue = mme_ue_find_by_message(&message); if (!mme_ue) { mme_ue = mme_ue_add(enb_ue); d_assert(mme_ue, pkbuf_free(pkbuf); break, "Null param"); } else { /* Here, if the MME_UE Context is found, * the integrity check is not performed * For example, ATTACH_REQUEST, * TRACKING_AREA_UPDATE_REQUEST message * * Now, We will check the MAC in the NAS message*/ nas_security_header_type_t h; h.type = (c_uint8_t)event_get_param3(e); if (h.integrity_protected) { /* Decryption was performed in S1AP handler. * So, we disabled 'ciphered' * not to decrypt NAS message */ h.ciphered = 0; d_assert( nas_security_decode(mme_ue, h, pkbuf) == CORE_OK, pkbuf_free(pkbuf); return, "nas_security_decode failed"); } } /* If NAS(mme_ue_t) has already been associated with * older S1(enb_ue_t) context */ if (ECM_CONNECTED(mme_ue)) { #if 1 /* IMPLICIT_S1_RELEASE */ /* Implcit S1 release */ d_trace(5, "Implicit S1 release\n"); d_trace(5, " ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", mme_ue->enb_ue->enb_ue_s1ap_id, mme_ue->enb_ue->mme_ue_s1ap_id); rv = enb_ue_remove(mme_ue->enb_ue); d_assert(rv == CORE_OK,,); #else /* S1_HOLDING_TIMER */ /* Previous S1(enb_ue_t) context the holding timer(30secs) * is started. * Newly associated S1(enb_ue_t) context holding timer * is stopped. */ d_trace(5, "Start S1 Holding Timer\n"); d_trace(5, " ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", mme_ue->enb_ue->enb_ue_s1ap_id, mme_ue->enb_ue->mme_ue_s1ap_id); tm_start(mme_ue->enb_ue->holding_timer); /* De-associate S1 with NAS/EMM */ rv = enb_ue_deassociate(mme_ue->enb_ue); d_assert(rv == CORE_OK,,); #endif } tm_stop(enb_ue->holding_timer); mme_ue_associate_enb_ue(mme_ue, enb_ue); } d_assert(mme_ue, pkbuf_free(pkbuf); break, "No MME UE context"); d_assert(FSM_STATE(&mme_ue->sm), pkbuf_free(pkbuf); break, "No EMM State Machine"); event_set_param1(e, (c_uintptr_t)mme_ue->index); event_set_param5(e, (c_uintptr_t)&message); fsm_dispatch(&mme_ue->sm, (fsm_event_t*)e); if (FSM_CHECK(&mme_ue->sm, emm_state_exception)) { rv = mme_send_delete_session_or_ue_context_release( mme_ue, enb_ue); d_assert(rv == CORE_OK,, "mme_send_delete_session_or_ue_context_release() failed"); } pkbuf_free(pkbuf); break; } case MME_EVT_EMM_T3413: { mme_ue_t *mme_ue = mme_ue_find(event_get_param1(e)); d_assert(mme_ue, break, "No UE context"); d_assert(FSM_STATE(&mme_ue->sm), break, "No EMM State Machine"); fsm_dispatch(&mme_ue->sm, (fsm_event_t*)e); break; } case MME_EVT_ESM_MESSAGE: { nas_message_t message; mme_ue_t *mme_ue = NULL; mme_bearer_t *bearer = NULL; mme_bearer_t *default_bearer = NULL; mme_sess_t *sess = NULL; pkbuf_t *pkbuf = NULL; mme_ue = mme_ue_find(event_get_param1(e)); d_assert(mme_ue, break, "No UE context"); pkbuf = (pkbuf_t *)event_get_param2(e); d_assert(pkbuf, break, "Null param"); d_assert(nas_esm_decode(&message, pkbuf) == CORE_OK, pkbuf_free(pkbuf); break, "Can't decode NAS_ESM"); bearer = mme_bearer_find_or_add_by_message(mme_ue, &message); d_assert(bearer, pkbuf_free(pkbuf); break, "No Bearer context"); sess = bearer->sess; d_assert(sess, pkbuf_free(pkbuf); break, "Null param"); default_bearer = mme_default_bearer_in_sess(sess); d_assert(default_bearer, pkbuf_free(pkbuf); break, "Null param"); event_set_param1(e, (c_uintptr_t)bearer->index); event_set_param3(e, (c_uintptr_t)&message); fsm_dispatch(&bearer->sm, (fsm_event_t*)e); if (FSM_CHECK(&bearer->sm, esm_state_bearer_deactivated) || FSM_CHECK(&bearer->sm, esm_state_exception)) { if (default_bearer->ebi == bearer->ebi) { /* if the bearer is a default bearer, * remove all session context linked the default bearer */ mme_sess_remove(sess); } else { /* if the bearer is not a default bearer, * just remove the bearer context */ mme_bearer_remove(bearer); } } else if (FSM_CHECK(&bearer->sm, esm_state_pdn_did_disconnect)) { d_assert(default_bearer->ebi == bearer->ebi, pkbuf_free(pkbuf); break, "Bearer[%d] is not Default Bearer", default_bearer->ebi, bearer->ebi); mme_sess_remove(sess); } pkbuf_free(pkbuf); break; } case MME_EVT_S6A_MESSAGE: { status_t rv; mme_ue_t *mme_ue = mme_ue_find(event_get_param1(e)); pkbuf_t *s6abuf = (pkbuf_t *)event_get_param2(e); s6a_message_t *s6a_message = NULL; d_assert(mme_ue, return, "Null param"); d_assert(s6abuf, return, "Null param"); s6a_message = s6abuf->payload; d_assert(s6a_message, return, "Null param"); if (s6a_message->result_code != ER_DIAMETER_SUCCESS) { enb_ue_t *enb_ue = NULL; rv = nas_send_attach_reject(mme_ue, EMM_CAUSE_IMSI_UNKNOWN_IN_HSS, ESM_CAUSE_PROTOCOL_ERROR_UNSPECIFIED); d_assert(rv == CORE_OK,, "nas_send_attach_reject failed"); d_warn("EMM_CAUSE : IMSI Unknown in HSS"); enb_ue = mme_ue->enb_ue; d_assert(enb_ue, break, "No ENB UE context"); rv = s1ap_send_ue_context_release_command(enb_ue, S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release, S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE, 0); d_assert(rv == CORE_OK,, "s1ap send error"); pkbuf_free(s6abuf); break; } switch(s6a_message->cmd_code) { case S6A_CMD_CODE_AUTHENTICATION_INFORMATION: { mme_s6a_handle_aia(mme_ue, &s6a_message->aia_message); break; } case S6A_CMD_CODE_UPDATE_LOCATION: { mme_s6a_handle_ula(mme_ue, &s6a_message->ula_message); if (FSM_CHECK(&mme_ue->sm, emm_state_initial_context_setup)) { if (mme_ue->nas_eps.type == MME_EPS_TYPE_ATTACH_REQUEST) { rv = nas_send_emm_to_esm(mme_ue, &mme_ue->pdn_connectivity_request); d_assert(rv == CORE_OK,, "nas_send_emm_to_esm() failed"); } else d_assert(0,, "Invalid Type[%d]", mme_ue->nas_eps.type); } else if (FSM_CHECK(&mme_ue->sm, emm_state_registered)) { if (mme_ue->nas_eps.type == MME_EPS_TYPE_TAU_REQUEST) { rv = nas_send_tau_accept(mme_ue, S1AP_ProcedureCode_id_InitialContextSetup); d_assert(rv == CORE_OK,, "nas_send_tau_accept() failed"); } else if (mme_ue->nas_eps.type == MME_EPS_TYPE_SERVICE_REQUEST) { rv = s1ap_send_initial_context_setup_request( mme_ue); d_assert(rv == CORE_OK,, "s1ap_send_initial_context_setup_request()" "failed"); } else d_assert(0,, "Invalid EPS-Type[%d]", mme_ue->nas_eps.type); } else d_assert(0,, "Invaild EMM state for EPS-Type[%d]", mme_ue->nas_eps.type); break; } default: { d_error("Invalid Type[%d]", event_get_param2(e)); break; } } pkbuf_free(s6abuf); break; } case MME_EVT_S11_MESSAGE: { status_t rv; pkbuf_t *pkbuf = (pkbuf_t *)event_get_param1(e); gtp_xact_t *xact = NULL; gtp_message_t message; mme_ue_t *mme_ue = NULL; d_assert(pkbuf, break, "Null param"); rv = gtp_parse_msg(&message, pkbuf); d_assert(rv == CORE_OK, pkbuf_free(pkbuf); break, "parse error"); mme_ue = mme_ue_find_by_teid(message.h.teid); d_assert(mme_ue, pkbuf_free(pkbuf); break, "No UE Context(TEID:%d)", message.h.teid); rv = gtp_xact_receive(mme_ue->gnode, &message.h, &xact); if (rv != CORE_OK) { pkbuf_free(pkbuf); break; } switch(message.h.type) { case GTP_CREATE_SESSION_RESPONSE_TYPE: mme_s11_handle_create_session_response( xact, mme_ue, &message.create_session_response); break; case GTP_MODIFY_BEARER_RESPONSE_TYPE: mme_s11_handle_modify_bearer_response( xact, mme_ue, &message.modify_bearer_response); break; case GTP_DELETE_SESSION_RESPONSE_TYPE: mme_s11_handle_delete_session_response( xact, mme_ue, &message.delete_session_response); break; case GTP_CREATE_BEARER_REQUEST_TYPE: mme_s11_handle_create_bearer_request( xact, mme_ue, &message.create_bearer_request); break; case GTP_UPDATE_BEARER_REQUEST_TYPE: mme_s11_handle_update_bearer_request( xact, mme_ue, &message.update_bearer_request); break; case GTP_DELETE_BEARER_REQUEST_TYPE: mme_s11_handle_delete_bearer_request( xact, mme_ue, &message.delete_bearer_request); break; case GTP_RELEASE_ACCESS_BEARERS_RESPONSE_TYPE: mme_s11_handle_release_access_bearers_response( xact, mme_ue, &message.release_access_bearers_response); break; case GTP_DOWNLINK_DATA_NOTIFICATION_TYPE: mme_s11_handle_downlink_data_notification( xact, mme_ue, &message.downlink_data_notification); /* * 5.3.4.2 in Spec 23.401 * Under certain conditions, the current UE triggered Service Request * procedure can cause unnecessary Downlink Packet Notification messages * which increase the load of the MME. * * This can occur when uplink data sent in step 6 causes a response * on the downlink which arrives at the Serving GW before the Modify Bearer * Request message, step 8. This data cannot be forwarded from the Serving GW * to the eNodeB and hence it triggers a Downlink Data Notification message. * * If the MME receives a Downlink Data Notification after step 2 and * before step 9, the MME shall not send S1 interface paging messages */ if (ECM_IDLE(mme_ue)) { s1ap_handle_paging(mme_ue); /* Start T3413 */ tm_start(mme_ue->t3413); } break; case GTP_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE: mme_s11_handle_create_indirect_data_forwarding_tunnel_response( xact, mme_ue, &message.create_indirect_data_forwarding_tunnel_response); break; case GTP_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE: mme_s11_handle_delete_indirect_data_forwarding_tunnel_response( xact, mme_ue, &message.delete_indirect_data_forwarding_tunnel_response); break; default: d_warn("Not implmeneted(type:%d)", message.h.type); break; } pkbuf_free(pkbuf); break; } case MME_EVT_S11_T3_RESPONSE: case MME_EVT_S11_T3_HOLDING: { gtp_xact_timeout(event_get_param1(e), event_get(e)); break; } default: { d_error("No handler for event %s", mme_event_get_name(e)); break; } } } nextepc-0.3.10/src/mme/mme_sm.h000066400000000000000000000031361333553357400162520ustar00rootroot00000000000000#ifndef __MME_SM_H__ #define __MME_SM_H__ #include "core_param.h" #include "core_fsm.h" #include "core_event.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ void mme_state_initial(fsm_t *s, event_t *e); void mme_state_final(fsm_t *s, event_t *e); void mme_state_operational(fsm_t *s, event_t *e); void mme_state_exception(fsm_t *s, event_t *e); void s1ap_state_initial(fsm_t *s, event_t *e); void s1ap_state_final(fsm_t *s, event_t *e); void s1ap_state_operational(fsm_t *s, event_t *e); void s1ap_state_exception(fsm_t *s, event_t *e); void emm_state_initial(fsm_t *s, event_t *e); void emm_state_final(fsm_t *s, event_t *e); void emm_state_de_registered(fsm_t *s, event_t *e); void emm_state_authentication(fsm_t *s, event_t *e); void emm_state_security_mode(fsm_t *s, event_t *e); void emm_state_initial_context_setup(fsm_t *s, event_t *e); void emm_state_registered(fsm_t *s, event_t *e); void emm_state_exception(fsm_t *s, event_t *e); void esm_state_initial(fsm_t *s, event_t *e); void esm_state_final(fsm_t *s, event_t *e); void esm_state_inactive(fsm_t *s, event_t *e); void esm_state_active(fsm_t *s, event_t *e); void esm_state_pdn_will_disconnect(fsm_t *s, event_t *e); void esm_state_pdn_did_disconnect(fsm_t *s, event_t *e); void esm_state_bearer_deactivated(fsm_t *s, event_t *e); void esm_state_exception(fsm_t *s, event_t *e); #define mme_sm_print(__pe) \ d_print("%s(): %s\n", __func__, mme_event_get_name(__pe)) #define mme_sm_trace(__l, __pe) \ d_trace(__l, "%s(): %s\n", __func__, mme_event_get_name(__pe)) #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* !__MME_SM_H__ */ nextepc-0.3.10/src/mme/nas_conv.c000066400000000000000000000040261333553357400165750ustar00rootroot00000000000000#define TRACE_MODULE _nas_conv #include "core_debug.h" #include "nas_conv.h" void nas_imsi_to_bcd( nas_mobile_identity_imsi_t *imsi, c_uint8_t imsi_len, c_int8_t *bcd) { int bcd_len; bcd[0] = '0' + imsi->digit1; bcd[1] = '0' + imsi->digit2; bcd[2] = '0' + imsi->digit3; bcd[3] = '0' + imsi->digit4; bcd[4] = '0' + imsi->digit5; bcd[5] = '0' + imsi->digit6; bcd[6] = '0' + imsi->digit7; bcd[7] = '0' + imsi->digit8; bcd[8] = '0' + imsi->digit9; bcd[9] = '0' + imsi->digit10; bcd[10] = '0' + imsi->digit11; bcd[11] = '0' + imsi->digit12; bcd[12] = '0' + imsi->digit13; bcd[13] = '0' + imsi->digit14; bcd[14] = '0' + imsi->digit15; bcd_len = imsi_len * 2 - 1; if (!imsi->odd_even) /* if bcd length is even */ { if (bcd[bcd_len] != 0xf) d_warn("Spec warning : bcd[%d] = 0x%x", bcd_len, bcd[bcd_len]); (bcd_len)--; } bcd[bcd_len] = 0; } void nas_imsi_to_buffer( nas_mobile_identity_imsi_t *imsi, c_uint8_t imsi_len, c_uint8_t *buf, c_uint8_t *buf_len) { buf[0] = ((('0' + imsi->digit2) << 4) & 0xf0) | (('0' + imsi->digit1) & 0x0f); buf[1] = ((('0' + imsi->digit4) << 4) & 0xf0) | (('0' + imsi->digit3) & 0x0f); buf[2] = ((('0' + imsi->digit6) << 4) & 0xf0) | (('0' + imsi->digit5) & 0x0f); buf[3] = ((('0' + imsi->digit8) << 4) & 0xf0) | (('0' + imsi->digit7) & 0x0f); buf[4] = ((('0' + imsi->digit10) << 4) & 0xf0) | (('0' + imsi->digit9) & 0x0f); buf[5] = ((('0' + imsi->digit12) << 4) & 0xf0) | (('0' + imsi->digit11) & 0x0f); buf[6] = ((('0' + imsi->digit14) << 4) & 0xf0) | (('0' + imsi->digit13) & 0x0f); buf[7] = ((('0' + imsi->digit15)) & 0x0f); *buf_len = imsi_len; if (!imsi->odd_even) /* if imsi length is even */ { (*buf_len)--; if ((buf[*buf_len] & 0xf) != 0xf) d_warn("Spec warning : buf[%d] = 0x%x", *buf_len, buf[*buf_len]); } } nextepc-0.3.10/src/mme/nas_conv.h000066400000000000000000000007161333553357400166040ustar00rootroot00000000000000#ifndef __NAS_CONV_H__ #define __NAS_CONV_H__ #include "nas/nas_message.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(void) nas_imsi_to_buffer( nas_mobile_identity_imsi_t *imsi, c_uint8_t imsi_len, c_uint8_t *buf, c_uint8_t *buf_len); CORE_DECLARE(void) nas_imsi_to_bcd( nas_mobile_identity_imsi_t *imsi, c_uint8_t imsi_len, c_int8_t *bcd); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __NAS_CONV_H__ */ nextepc-0.3.10/src/mme/nas_path.c000066400000000000000000000341631333553357400165710ustar00rootroot00000000000000#define TRACE_MODULE _nas_path #include "core_debug.h" #include "s1ap_path.h" #include "s1ap_build.h" #include "esm_build.h" #include "emm_build.h" #include "nas_path.h" #include "mme_event.h" #include "mme_sm.h" status_t nas_send_to_enb(mme_ue_t *mme_ue, pkbuf_t *pkbuf) { enb_ue_t *enb_ue = NULL; d_assert(mme_ue, return CORE_ERROR, "Null param"); enb_ue = mme_ue->enb_ue; d_assert(enb_ue, return CORE_ERROR, "Null param"); return s1ap_send_to_enb_ue(enb_ue, pkbuf); } status_t nas_send_emm_to_esm( mme_ue_t *mme_ue, nas_esm_message_container_t *esm_message_container) { pkbuf_t *esmbuf = NULL; d_assert(mme_ue, return CORE_ERROR, "Null param"); d_assert(esm_message_container, return CORE_ERROR, "Null param"); d_assert(esm_message_container->length, return CORE_ERROR, "Null param"); /* The Packet Buffer(pkbuf_t) for NAS message MUST make a HEADROOM. * When calculating AES_CMAC, we need to use the headroom of the packet. */ esmbuf = pkbuf_alloc(NAS_HEADROOM, esm_message_container->length); d_assert(esmbuf, return CORE_ERROR, "Null param"); memcpy(esmbuf->payload, esm_message_container->buffer, esm_message_container->length); d_assert(s1ap_send_to_esm(mme_ue, esmbuf) == CORE_OK, return CORE_ERROR, "s1ap_send_to_esm failed"); return CORE_OK; } status_t nas_send_to_downlink_nas_transport(mme_ue_t *mme_ue, pkbuf_t *pkbuf) { status_t rv; pkbuf_t *s1apbuf = NULL; enb_ue_t *enb_ue = NULL; d_assert(mme_ue, return CORE_ERROR, "Null param"); enb_ue = mme_ue->enb_ue; d_assert(enb_ue, return CORE_ERROR, "Null param"); rv = s1ap_build_downlink_nas_transport(&s1apbuf, enb_ue, pkbuf); d_assert(rv == CORE_OK && s1apbuf, pkbuf_free(pkbuf); return CORE_ERROR, "s1ap build error"); rv = nas_send_to_enb(mme_ue, s1apbuf); d_assert(rv == CORE_OK, return CORE_ERROR, "nas send error"); return CORE_OK; } status_t nas_send_attach_accept(mme_ue_t *mme_ue) { status_t rv; mme_sess_t *sess = NULL; mme_bearer_t *bearer = NULL; pkbuf_t *esmbuf = NULL, *emmbuf = NULL, *s1apbuf = NULL; d_assert(mme_ue, return CORE_ERROR, "Null param"); sess = mme_sess_first(mme_ue); d_assert(sess, return CORE_ERROR, "Null param"); d_assert(mme_sess_next(sess) == NULL, return CORE_ERROR, "there is another session"); bearer = mme_default_bearer_in_sess(sess); d_assert(bearer, return CORE_ERROR, "Null param"); d_assert(mme_bearer_next(bearer) == NULL, return CORE_ERROR, "there is dedicated bearer"); rv = esm_build_activate_default_bearer_context_request(&esmbuf, sess); d_assert(rv == CORE_OK && esmbuf, return CORE_ERROR, "esm build error"); rv = emm_build_attach_accept(&emmbuf, mme_ue, esmbuf); d_assert(rv == CORE_OK && emmbuf, pkbuf_free(esmbuf); return CORE_ERROR, "emm build error"); rv = s1ap_build_initial_context_setup_request(&s1apbuf, mme_ue, emmbuf); d_assert(rv == CORE_OK && s1apbuf, pkbuf_free(emmbuf); return CORE_ERROR, "s1ap build error"); rv = nas_send_to_enb(mme_ue, s1apbuf); d_assert(rv == CORE_OK, return CORE_ERROR, "nas send error"); return CORE_OK; } status_t nas_send_attach_reject(mme_ue_t *mme_ue, nas_emm_cause_t emm_cause, nas_esm_cause_t esm_cause) { status_t rv; mme_sess_t *sess = NULL; pkbuf_t *esmbuf = NULL, *emmbuf = NULL; d_assert(mme_ue, return CORE_ERROR, "Null param"); d_trace(3, "[EMM] Attach reject\n"); d_trace(5, " IMSI[%s] Cause[%d]\n", mme_ue->imsi_bcd, emm_cause); sess = mme_sess_first(mme_ue); if (sess) { rv = esm_build_pdn_connectivity_reject(&esmbuf, sess, esm_cause); d_assert(rv == CORE_OK && esmbuf, return CORE_ERROR, "esm build error"); } rv = emm_build_attach_reject(&emmbuf, emm_cause, esmbuf); d_assert(rv == CORE_OK && emmbuf, esmbuf ? pkbuf_free(esmbuf) : 1; return CORE_ERROR, "emm build error"); rv = nas_send_to_downlink_nas_transport(mme_ue, emmbuf); d_assert(rv == CORE_OK, esmbuf ? pkbuf_free(esmbuf) : 1; return CORE_ERROR, "nas send error"); return rv; } status_t nas_send_identity_request(mme_ue_t *mme_ue) { status_t rv; pkbuf_t *emmbuf = NULL; d_assert(mme_ue, return CORE_ERROR, "Null param"); rv = emm_build_identity_request(&emmbuf, mme_ue); d_assert(rv == CORE_OK && emmbuf, return CORE_ERROR, "nas_build_detach_accept failed"); rv = nas_send_to_downlink_nas_transport(mme_ue, emmbuf); d_assert(rv == CORE_OK,, "nas send failed"); return rv; } status_t nas_send_authentication_request( mme_ue_t *mme_ue, e_utran_vector_t *e_utran_vector) { status_t rv; pkbuf_t *emmbuf = NULL; d_assert(mme_ue, return CORE_ERROR, "Null param"); d_assert(e_utran_vector, return CORE_ERROR, "Null param"); d_trace(3, "[EMM] Authentication request\n"); d_trace(5, " IMSI[%s]\n", mme_ue->imsi_bcd); rv = emm_build_authentication_request(&emmbuf, e_utran_vector); d_assert(rv == CORE_OK && emmbuf, return CORE_ERROR, "nas_build_detach_accept failed"); rv = nas_send_to_downlink_nas_transport(mme_ue, emmbuf); d_assert(rv == CORE_OK,, "nas send failed"); return rv; } status_t nas_send_authentication_reject(mme_ue_t *mme_ue) { status_t rv; pkbuf_t *emmbuf = NULL; d_assert(mme_ue, return CORE_ERROR, "Null param"); d_trace(3, "[EMM] Authentication reject\n"); d_trace(5, " IMSI[%s]\n", mme_ue->imsi_bcd); rv = emm_build_authentication_reject(&emmbuf); d_assert(rv == CORE_OK && emmbuf, return CORE_ERROR, "nas_build_detach_accept failed"); rv = nas_send_to_downlink_nas_transport(mme_ue, emmbuf); d_assert(rv == CORE_OK,, "nas send failed"); return CORE_OK; } status_t nas_send_detach_accept(mme_ue_t *mme_ue) { status_t rv; enb_ue_t *enb_ue = NULL; pkbuf_t *emmbuf = NULL; d_assert(mme_ue, return CORE_ERROR, "Null param"); enb_ue = mme_ue->enb_ue; d_assert(enb_ue, return CORE_ERROR, "Null param"); /* reply with detach accept */ if (mme_ue->nas_eps.detach.switch_off == 0) { rv = emm_build_detach_accept(&emmbuf, mme_ue); d_assert(rv == CORE_OK && emmbuf, return CORE_ERROR, "nas_build_detach_accept failed"); rv = nas_send_to_downlink_nas_transport(mme_ue, emmbuf); d_assert(rv == CORE_OK, return CORE_ERROR, "nas send failed"); } rv = s1ap_send_ue_context_release_command(enb_ue, S1AP_Cause_PR_nas, S1AP_CauseNas_detach, S1AP_UE_CTX_REL_S1_NORMAL_RELEASE, 0); d_assert(rv == CORE_OK, return CORE_ERROR, "s1ap send error"); return CORE_OK; } status_t nas_send_pdn_connectivity_reject( mme_sess_t *sess, nas_esm_cause_t esm_cause) { status_t rv; mme_ue_t *mme_ue; pkbuf_t *esmbuf = NULL; d_assert(sess, return CORE_ERROR, "Null param"); mme_ue = sess->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); rv = esm_build_pdn_connectivity_reject(&esmbuf, sess, esm_cause); d_assert(rv == CORE_OK && esmbuf, return CORE_ERROR, "esm build error"); rv = nas_send_to_downlink_nas_transport(mme_ue, esmbuf); d_assert(rv == CORE_OK, return CORE_ERROR, "nas_send_to_downlink_nas_transport"); return CORE_OK; } status_t nas_send_esm_information_request(mme_bearer_t *bearer) { status_t rv; mme_ue_t *mme_ue = NULL; pkbuf_t *esmbuf = NULL; d_assert(bearer, return CORE_ERROR, "Null param"); mme_ue = bearer->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); rv = esm_build_information_request(&esmbuf, bearer); d_assert(rv == CORE_OK && esmbuf, return CORE_ERROR, "esm build error"); rv = nas_send_to_downlink_nas_transport(mme_ue, esmbuf); d_assert(rv == CORE_OK, return CORE_ERROR, "nas_send_to_downlink_nas_transport"); return CORE_OK; } status_t nas_send_activate_default_bearer_context_request(mme_bearer_t *bearer) { status_t rv; pkbuf_t *esmbuf = NULL, *s1apbuf = NULL; mme_sess_t *sess = NULL; mme_ue_t *mme_ue = NULL; d_assert(bearer, return CORE_ERROR, "Null param"); sess = bearer->sess; d_assert(sess, return CORE_ERROR, "Null param"); mme_ue = bearer->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); rv = esm_build_activate_default_bearer_context_request(&esmbuf, sess); d_assert(rv == CORE_OK && esmbuf, return CORE_ERROR, "esm build error"); rv = s1ap_build_e_rab_setup_request(&s1apbuf, bearer, esmbuf); d_assert(rv == CORE_OK && s1apbuf, pkbuf_free(esmbuf); return CORE_ERROR, "s1ap build error"); rv = nas_send_to_enb(mme_ue, s1apbuf); d_assert(rv == CORE_OK, return CORE_ERROR, "nas send error"); return CORE_OK; } status_t nas_send_activate_dedicated_bearer_context_request( mme_bearer_t *bearer) { status_t rv; pkbuf_t *esmbuf = NULL, *s1apbuf = NULL; mme_ue_t *mme_ue = NULL; d_assert(bearer, return CORE_ERROR, "Null param"); mme_ue = bearer->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); rv = esm_build_activate_dedicated_bearer_context_request(&esmbuf, bearer); d_assert(rv == CORE_OK && esmbuf, return CORE_ERROR, "esm build error"); rv = s1ap_build_e_rab_setup_request(&s1apbuf, bearer, esmbuf); d_assert(rv == CORE_OK && s1apbuf, pkbuf_free(esmbuf); return CORE_ERROR, "s1ap build error"); rv = nas_send_to_enb(mme_ue, s1apbuf); d_assert(rv == CORE_OK, return CORE_ERROR, "nas send error"); return CORE_OK; } status_t nas_send_activate_all_dedicated_bearers(mme_bearer_t *default_bearer) { status_t rv; d_assert(default_bearer, return CORE_ERROR, "Null param"); mme_bearer_t *dedicated_bearer = mme_bearer_next(default_bearer); while(dedicated_bearer) { rv = nas_send_activate_dedicated_bearer_context_request( dedicated_bearer); d_assert(rv == CORE_OK, return CORE_ERROR, "nas_send_activate_dedicated_bearer_context failed"); dedicated_bearer = mme_bearer_next(dedicated_bearer); } return CORE_OK; } status_t nas_send_modify_bearer_context_request( mme_bearer_t *bearer, int qos_presence, int tft_presence) { status_t rv; pkbuf_t *esmbuf = NULL, *s1apbuf = NULL; mme_ue_t *mme_ue = NULL; d_assert(bearer, return CORE_ERROR, "Null param"); mme_ue = bearer->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); rv = esm_build_modify_bearer_context_request( &esmbuf, bearer, qos_presence, tft_presence); d_assert(rv == CORE_OK && esmbuf, return CORE_ERROR, "esm build error"); if (qos_presence == 1) { rv = s1ap_build_e_rab_modify_request(&s1apbuf, bearer, esmbuf); d_assert(rv == CORE_OK && s1apbuf, pkbuf_free(esmbuf); return CORE_ERROR, "s1ap build error"); rv = nas_send_to_enb(mme_ue, s1apbuf); d_assert(rv == CORE_OK, return CORE_ERROR, "nas send error"); } else { rv = nas_send_to_downlink_nas_transport(mme_ue, esmbuf); d_assert(rv == CORE_OK, return CORE_ERROR, "nas send failed"); } return CORE_OK; } status_t nas_send_deactivate_bearer_context_request(mme_bearer_t *bearer) { status_t rv; pkbuf_t *esmbuf = NULL, *s1apbuf = NULL; mme_ue_t *mme_ue = NULL; d_assert(bearer, return CORE_ERROR, "Null param"); mme_ue = bearer->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); rv = esm_build_deactivate_bearer_context_request( &esmbuf, bearer, ESM_CAUSE_REGULAR_DEACTIVATION); d_assert(rv == CORE_OK && esmbuf, return CORE_ERROR, "esm build error"); rv = s1ap_build_e_rab_release_command(&s1apbuf, bearer, esmbuf, S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release); d_assert(rv == CORE_OK && s1apbuf, pkbuf_free(esmbuf); return CORE_ERROR, "s1ap build error"); rv = nas_send_to_enb(mme_ue, s1apbuf); d_assert(rv == CORE_OK, return CORE_ERROR, "nas send error"); return CORE_OK; } status_t nas_send_tau_accept( mme_ue_t *mme_ue, S1AP_ProcedureCode_t procedureCode) { status_t rv; pkbuf_t *emmbuf = NULL; d_assert(mme_ue, return CORE_ERROR,); d_trace(3, "[EMM] Tracking area update accept\n"); d_trace(5, " IMSI[%s]\n", mme_ue->imsi_bcd); rv = emm_build_tau_accept(&emmbuf, mme_ue); d_assert(rv == CORE_OK, return CORE_ERROR, "emm build error"); if (procedureCode == S1AP_ProcedureCode_id_InitialContextSetup) { pkbuf_t *s1apbuf = NULL; rv = s1ap_build_initial_context_setup_request(&s1apbuf, mme_ue, emmbuf); d_assert(rv == CORE_OK && s1apbuf, pkbuf_free(emmbuf); return CORE_ERROR, "s1ap build error"); rv = nas_send_to_enb(mme_ue, s1apbuf); d_assert(rv == CORE_OK,, "nas send error"); } else if (procedureCode == S1AP_ProcedureCode_id_downlinkNASTransport) { rv = nas_send_to_downlink_nas_transport(mme_ue, emmbuf); d_assert(rv == CORE_OK,, "nas_send_to_downlink_nas_transport"); } else d_assert(0, pkbuf_free(emmbuf); return CORE_ERROR, "Invalid Procedure Code[%d]", procedureCode); return rv; } status_t nas_send_tau_reject(mme_ue_t *mme_ue, nas_emm_cause_t emm_cause) { status_t rv; pkbuf_t *emmbuf = NULL; d_assert(mme_ue, return CORE_ERROR, "Null param"); /* Build TAU reject */ rv = emm_build_tau_reject(&emmbuf, emm_cause, mme_ue); d_assert(rv == CORE_OK, return CORE_ERROR, "emm build error"); rv = nas_send_to_downlink_nas_transport(mme_ue, emmbuf); d_assert(rv == CORE_OK, return CORE_ERROR, "nas dl send error"); return CORE_OK; } status_t nas_send_service_reject(mme_ue_t *mme_ue, nas_emm_cause_t emm_cause) { status_t rv; pkbuf_t *emmbuf = NULL; d_assert(mme_ue, return CORE_ERROR, "Null param"); /* Build Service Reject */ rv = emm_build_service_reject(&emmbuf, emm_cause, mme_ue); d_assert(rv == CORE_OK, return CORE_ERROR, "emm build error"); rv = nas_send_to_downlink_nas_transport(mme_ue, emmbuf); d_assert(rv == CORE_OK, return CORE_ERROR, "nas dl send error"); return CORE_OK; } nextepc-0.3.10/src/mme/nas_path.h000066400000000000000000000040131333553357400165650ustar00rootroot00000000000000#ifndef __NAS_PATH_H__ #define __NAS_PATH_H__ #include "core_pkbuf.h" #include "mme_context.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(status_t) nas_send_to_enb(mme_ue_t *mme_ue, pkbuf_t *pkbuf); CORE_DECLARE(status_t) nas_send_emm_to_esm( mme_ue_t *mme_ue, nas_esm_message_container_t *esm_message_container); CORE_DECLARE(status_t) nas_send_to_downlink_nas_transport( mme_ue_t *mme_ue, pkbuf_t *pkbuf); CORE_DECLARE(status_t) nas_send_attach_accept(mme_ue_t *mme_ue); CORE_DECLARE(status_t) nas_send_attach_reject(mme_ue_t *mme_ue, nas_emm_cause_t emm_cause, nas_esm_cause_t esm_cause); CORE_DECLARE(status_t) nas_send_identity_request(mme_ue_t *mme_ue); CORE_DECLARE(status_t) nas_send_authentication_request( mme_ue_t *mme_ue, e_utran_vector_t *e_utran_vector); CORE_DECLARE(status_t) nas_send_authentication_reject(mme_ue_t *mme_ue); CORE_DECLARE(status_t) nas_send_detach_accept(mme_ue_t *mme_ue); CORE_DECLARE(status_t) nas_send_pdn_connectivity_reject( mme_sess_t *sess, nas_esm_cause_t esm_cause); CORE_DECLARE(status_t) nas_send_esm_information_request(mme_bearer_t *bearer); CORE_DECLARE(status_t) nas_send_activate_default_bearer_context_request( mme_bearer_t *bearer); CORE_DECLARE(status_t) nas_send_activate_dedicated_bearer_context_request( mme_bearer_t *bearer); CORE_DECLARE(status_t) nas_send_activate_all_dedicated_bearers( mme_bearer_t *default_bearer); CORE_DECLARE(status_t) nas_send_modify_bearer_context_request( mme_bearer_t *bearer, int qos_presence, int tft_presence); CORE_DECLARE(status_t) nas_send_deactivate_bearer_context_request( mme_bearer_t *bearer); CORE_DECLARE(status_t) nas_send_tau_accept( mme_ue_t *mme_ue, S1AP_ProcedureCode_t procedureCode); CORE_DECLARE(status_t) nas_send_tau_reject( mme_ue_t *mme_ue, nas_esm_cause_t emm_cause); CORE_DECLARE(status_t) nas_send_service_reject( mme_ue_t *mme_ue, nas_emm_cause_t emm_cause); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __NAS_PATH_H__ */ nextepc-0.3.10/src/mme/nas_security.c000066400000000000000000000266461333553357400175130ustar00rootroot00000000000000#define TRACE_MODULE _nas_sec #include "core_debug.h" #include "nas/nas_message.h" #include "nas_security.h" status_t nas_security_encode( pkbuf_t **pkbuf, mme_ue_t *mme_ue, nas_message_t *message) { int integrity_protected = 0; int new_security_context = 0; int ciphered = 0; d_assert(mme_ue, return CORE_ERROR, "Null param"); d_assert(message, return CORE_ERROR, "Null param"); switch(message->h.security_header_type) { case NAS_SECURITY_HEADER_PLAIN_NAS_MESSAGE: return nas_plain_encode(pkbuf, message); case NAS_SECURITY_HEADER_INTEGRITY_PROTECTED: integrity_protected = 1; break; case NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHERED: integrity_protected = 1; ciphered = 1; break; case NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_NEW_SECURITY_CONTEXT: integrity_protected = 1; new_security_context = 1; break; case NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHTERD_WITH_NEW_INTEGRITY_CONTEXT: integrity_protected = 1; new_security_context = 1; ciphered = 1; break; default: d_warn("Not implemented(securiry header type:0x%x)", message->h.security_header_type); return CORE_ERROR; } if (new_security_context) { mme_ue->dl_count = 0; mme_ue->ul_count.i32 = 0; } if (mme_ue->selected_enc_algorithm == 0) ciphered = 0; if (mme_ue->selected_int_algorithm == 0) integrity_protected = 0; if (ciphered || integrity_protected) { nas_security_header_t h; pkbuf_t *new = NULL; memset(&h, 0, sizeof(h)); h.security_header_type = message->h.security_header_type; h.protocol_discriminator = message->h.protocol_discriminator; h.sequence_number = (mme_ue->dl_count & 0xff); d_assert(nas_plain_encode(&new, message) == CORE_OK, return CORE_ERROR, "NAS encoding error"); if (ciphered) { /* encrypt NAS message */ nas_encrypt(mme_ue->selected_enc_algorithm, mme_ue->knas_enc, mme_ue->dl_count, NAS_SECURITY_BEARER, NAS_SECURITY_DOWNLINK_DIRECTION, new); } /* encode sequence number */ d_assert(CORE_OK == pkbuf_header(new, 1), pkbuf_free(new);return CORE_ERROR, "pkbuf_header error"); *(c_uint8_t *)(new->payload) = h.sequence_number; if (integrity_protected) { c_uint8_t mac[NAS_SECURITY_MAC_SIZE]; /* calculate NAS MAC(message authentication code) */ nas_mac_calculate(mme_ue->selected_int_algorithm, mme_ue->knas_int, mme_ue->dl_count, NAS_SECURITY_BEARER, NAS_SECURITY_DOWNLINK_DIRECTION, new, mac); memcpy(&h.message_authentication_code, mac, sizeof(mac)); } /* increase dl_count */ mme_ue->dl_count = (mme_ue->dl_count + 1) & 0xffffff; /* Use 24bit */ /* encode all security header */ d_assert(CORE_OK == pkbuf_header(new, 5), pkbuf_free(new);return CORE_ERROR, "pkbuf_header error"); memcpy(new->payload, &h, sizeof(nas_security_header_t)); *pkbuf = new; mme_ue->security_context_available = 1; } return CORE_OK; } status_t nas_security_decode(mme_ue_t *mme_ue, nas_security_header_type_t security_header_type, pkbuf_t *pkbuf) { d_assert(mme_ue, return CORE_ERROR, "Null param"); d_assert(pkbuf, return CORE_ERROR, "Null param"); d_assert(pkbuf->payload, return CORE_ERROR, "Null param"); if (security_header_type.service_request) { #define SHORT_MAC_SIZE 2 nas_ksi_and_sequence_number_t *ksi_and_sequence_number = pkbuf->payload + 1; c_uint16_t original_pkbuf_len = pkbuf->len; c_uint8_t original_mac[SHORT_MAC_SIZE]; c_uint8_t estimated_sequence_number; c_uint8_t sequence_number_high_3bit; c_uint8_t mac[NAS_SECURITY_MAC_SIZE]; if (mme_ue->selected_int_algorithm == 0) { d_warn("integrity algorithm is not defined"); return CORE_ERROR; } d_assert(ksi_and_sequence_number, return CORE_ERROR, "Null param"); estimated_sequence_number = ksi_and_sequence_number->sequence_number; sequence_number_high_3bit = mme_ue->ul_count.sqn & 0xe0; if ((mme_ue->ul_count.sqn & 0x1f) > estimated_sequence_number) { sequence_number_high_3bit += 0x20; } estimated_sequence_number += sequence_number_high_3bit; if (mme_ue->ul_count.sqn > estimated_sequence_number) mme_ue->ul_count.overflow++; mme_ue->ul_count.sqn = estimated_sequence_number; pkbuf->len = 2; memcpy(original_mac, pkbuf->payload + 2, SHORT_MAC_SIZE); nas_mac_calculate(mme_ue->selected_int_algorithm, mme_ue->knas_int, mme_ue->ul_count.i32, NAS_SECURITY_BEARER, NAS_SECURITY_UPLINK_DIRECTION, pkbuf, mac); pkbuf->len = original_pkbuf_len; memcpy(pkbuf->payload + 2, original_mac, SHORT_MAC_SIZE); if (memcmp(mac + 2, pkbuf->payload + 2, 2) != 0) { d_warn("NAS MAC verification failed"); mme_ue->mac_failed = 1; } return CORE_OK; } if (!mme_ue->security_context_available) { security_header_type.integrity_protected = 0; security_header_type.new_security_context = 0; security_header_type.ciphered = 0; } if (security_header_type.new_security_context) { mme_ue->ul_count.i32 = 0; } if (mme_ue->selected_enc_algorithm == 0) security_header_type.ciphered = 0; if (mme_ue->selected_int_algorithm == 0) security_header_type.integrity_protected = 0; if (security_header_type.ciphered || security_header_type.integrity_protected) { nas_security_header_t *h = NULL; /* NAS Security Header */ d_assert(CORE_OK == pkbuf_header(pkbuf, 6), return CORE_ERROR, "pkbuf_header error"); h = pkbuf->payload; /* NAS Security Header.Sequence_Number */ d_assert(CORE_OK == pkbuf_header(pkbuf, -5), return CORE_ERROR, "pkbuf_header error"); /* calculate ul_count */ if (mme_ue->ul_count.sqn > h->sequence_number) mme_ue->ul_count.overflow++; mme_ue->ul_count.sqn = h->sequence_number; if (security_header_type.integrity_protected) { c_uint8_t mac[NAS_SECURITY_MAC_SIZE]; c_uint32_t mac32; c_uint32_t original_mac = h->message_authentication_code; /* calculate NAS MAC(message authentication code) */ nas_mac_calculate(mme_ue->selected_int_algorithm, mme_ue->knas_int, mme_ue->ul_count.i32, NAS_SECURITY_BEARER, NAS_SECURITY_UPLINK_DIRECTION, pkbuf, mac); h->message_authentication_code = original_mac; memcpy(&mac32, mac, NAS_SECURITY_MAC_SIZE); if (h->message_authentication_code != mac32) { d_warn("NAS MAC verification failed(0x%x != 0x%x)", ntohl(h->message_authentication_code), ntohl(mac32)); mme_ue->mac_failed = 1; } } /* NAS EMM Header or ESM Header */ d_assert(CORE_OK == pkbuf_header(pkbuf, -1), return CORE_ERROR, "pkbuf_header error"); if (security_header_type.ciphered) { /* decrypt NAS message */ nas_encrypt(mme_ue->selected_enc_algorithm, mme_ue->knas_enc, mme_ue->ul_count.i32, NAS_SECURITY_BEARER, NAS_SECURITY_UPLINK_DIRECTION, pkbuf); } } return CORE_OK; } void nas_mac_calculate(c_uint8_t algorithm_identity, c_uint8_t *knas_int, c_uint32_t count, c_uint8_t bearer, c_uint8_t direction, pkbuf_t *pkbuf, c_uint8_t *mac) { d_assert(knas_int, return, "Null param"); d_assert(bearer >= 0 && bearer <= 0x1f, return, "Invalid param"); d_assert(direction == 0 || direction == 1, return, "Invalid param"); d_assert(pkbuf, return, "Null param"); d_assert(pkbuf->payload, return, "Null param"); d_assert(pkbuf->len, return, "Null param"); d_assert(mac, return, "Null param"); switch(algorithm_identity) { case NAS_SECURITY_ALGORITHMS_128_EIA1: { snow_3g_f9(knas_int, count, (bearer << 27), direction, pkbuf->payload, (pkbuf->len << 3), mac); break; } case NAS_SECURITY_ALGORITHMS_128_EIA2: { count = htonl(count); c_uint8_t *ivec = NULL;; c_uint8_t cmac[16]; pkbuf_header(pkbuf, 8); ivec = pkbuf->payload; memset(ivec, 0, 8); memcpy(ivec + 0, &count, sizeof(count)); ivec[4] = (bearer << 3) | (direction << 2); aes_cmac_calculate(cmac, knas_int, pkbuf->payload, pkbuf->len); memcpy(mac, cmac, 4); pkbuf_header(pkbuf, -8); break; } case NAS_SECURITY_ALGORITHMS_128_EIA3: { c_uint32_t mac32; zuc_eia3(knas_int, count, bearer, direction, (pkbuf->len << 3), pkbuf->payload, &mac32); mac32 = ntohl(mac32); memcpy(mac, &mac32, sizeof(c_uint32_t)); break; } case NAS_SECURITY_ALGORITHMS_EIA0: { d_error("Invalid identity : NAS_SECURITY_ALGORITHMS_EIA0"); break; } default: { d_assert(0, return, "Unknown algorithm identity(%d)", algorithm_identity); break; } } } void nas_encrypt(c_uint8_t algorithm_identity, c_uint8_t *knas_enc, c_uint32_t count, c_uint8_t bearer, c_uint8_t direction, pkbuf_t *pkbuf) { d_assert(knas_enc, return, "Null param"); d_assert(bearer >= 0 && bearer <= 0x1f, return, "Invalid param"); d_assert(direction == 0 || direction == 1, return, "Invalid param"); d_assert(pkbuf, return, "Null param"); d_assert(pkbuf->payload, return, "Null param"); d_assert(pkbuf->len, return, "Null param"); switch(algorithm_identity) { case NAS_SECURITY_ALGORITHMS_128_EEA1: { snow_3g_f8(knas_enc, count, bearer, direction, pkbuf->payload, (pkbuf->len << 3)); break; } case NAS_SECURITY_ALGORITHMS_128_EEA2: { count = htonl(count); c_uint8_t ivec[16]; memset(ivec, 0, 16); memcpy(ivec + 0, &count, sizeof(count)); ivec[4] = (bearer << 3) | (direction << 2); aes_ctr128_encrypt(knas_enc, ivec, pkbuf->payload, pkbuf->len, pkbuf->payload); break; } case NAS_SECURITY_ALGORITHMS_128_EEA3: { zuc_eea3(knas_enc, count, bearer, direction, (pkbuf->len << 3), pkbuf->payload, pkbuf->payload); break; } case NAS_SECURITY_ALGORITHMS_EEA0: { d_error("Invalid identity : NAS_SECURITY_ALGORITHMS_EEA0"); break; } default: { d_assert(0, return, "Unknown algorithm identity(%d)", algorithm_identity); break; } } } nextepc-0.3.10/src/mme/nas_security.h000066400000000000000000000027011333553357400175020ustar00rootroot00000000000000#ifndef __NAS_SECURITY_H__ #define __NAS_SECURITY_H__ #include "core_pkbuf.h" #include "core_aes.h" #include "core_aes_cmac.h" #include "mme_context.h" #include "snow_3g.h" #include "zuc.h" #define NAS_SECURITY_BEARER 0 #define NAS_SECURITY_DOWNLINK_DIRECTION 1 #define NAS_SECURITY_UPLINK_DIRECTION 0 #define NAS_SECURITY_MAC_SIZE 4 #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _nas_security_header_type_t { union { struct { ED5(c_uint8_t integrity_protected:1;, c_uint8_t ciphered:1;, c_uint8_t new_security_context:1;, c_uint8_t service_request:1;, c_uint8_t reserved:4;) }; c_uint8_t type; }; } __attribute__ ((packed)) nas_security_header_type_t; CORE_DECLARE(status_t) nas_security_encode( pkbuf_t **pkbuf, mme_ue_t *mme_ue, nas_message_t *message); CORE_DECLARE(status_t) nas_security_decode(mme_ue_t *mme_ue, nas_security_header_type_t security_header_type, pkbuf_t *pkbuf); CORE_DECLARE(void) nas_mac_calculate(c_uint8_t algorithm_identity, c_uint8_t *knas_int, c_uint32_t count, c_uint8_t bearer, c_uint8_t direction, pkbuf_t *pkbuf, c_uint8_t *mac); CORE_DECLARE(void) nas_encrypt(c_uint8_t algorithm_identity, c_uint8_t *knas_enc, c_uint32_t count, c_uint8_t bearer, c_uint8_t direction, pkbuf_t *pkbuf); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __NAS_SECURITY_H__ */ nextepc-0.3.10/src/mme/s1ap_build.c000066400000000000000000002532441333553357400170220ustar00rootroot00000000000000#define TRACE_MODULE _s1ap_build #include "core_debug.h" #include "fd/s6a/s6a_message.h" #include "mme_context.h" #include "mme_kdf.h" #include "s1ap_build.h" #include "s1ap_conv.h" status_t s1ap_build_setup_rsp(pkbuf_t **pkbuf) { status_t rv; int i, j; S1AP_S1AP_PDU_t pdu; S1AP_SuccessfulOutcome_t *successfulOutcome = NULL; S1AP_S1SetupResponse_t *S1SetupResponse = NULL; S1AP_S1SetupResponseIEs_t *ie = NULL; S1AP_ServedGUMMEIs_t *ServedGUMMEIs = NULL; S1AP_RelativeMMECapacity_t *RelativeMMECapacity = NULL; memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_successfulOutcome; pdu.choice.successfulOutcome = core_calloc(1, sizeof(S1AP_SuccessfulOutcome_t)); successfulOutcome = pdu.choice.successfulOutcome; successfulOutcome->procedureCode = S1AP_ProcedureCode_id_S1Setup; successfulOutcome->criticality = S1AP_Criticality_reject; successfulOutcome->value.present = S1AP_SuccessfulOutcome__value_PR_S1SetupResponse; S1SetupResponse = &successfulOutcome->value.choice.S1SetupResponse; ie = core_calloc(1, sizeof(S1AP_S1SetupResponseIEs_t)); ASN_SEQUENCE_ADD(&S1SetupResponse->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_ServedGUMMEIs; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_S1SetupResponseIEs__value_PR_ServedGUMMEIs; ServedGUMMEIs = &ie->value.choice.ServedGUMMEIs; ie = core_calloc(1, sizeof(S1AP_S1SetupResponseIEs_t)); ASN_SEQUENCE_ADD(&S1SetupResponse->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_RelativeMMECapacity; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_S1SetupResponseIEs__value_PR_RelativeMMECapacity; RelativeMMECapacity = &ie->value.choice.RelativeMMECapacity; for (i = 0; i < mme_self()->max_num_of_served_gummei; i++) { S1AP_ServedGUMMEIsItem_t *ServedGUMMEIsItem = NULL; ServedGUMMEIsItem = (S1AP_ServedGUMMEIsItem_t *) core_calloc(1, sizeof(S1AP_ServedGUMMEIsItem_t)); served_gummei_t *served_gummei = &mme_self()->served_gummei[i]; for (j = 0; j < served_gummei->num_of_plmn_id; j++) { S1AP_PLMNidentity_t *PLMNidentity = NULL; PLMNidentity = (S1AP_PLMNidentity_t *) core_calloc(1, sizeof(S1AP_PLMNidentity_t)); s1ap_buffer_to_OCTET_STRING( &served_gummei->plmn_id[j], PLMN_ID_LEN, PLMNidentity); ASN_SEQUENCE_ADD( &ServedGUMMEIsItem->servedPLMNs.list, PLMNidentity); d_trace(5, " PLMN_ID[MCC:%d MNC:%d]\n", plmn_id_mcc(&served_gummei->plmn_id[j]), plmn_id_mnc(&served_gummei->plmn_id[j])); } for (j = 0; j < served_gummei->num_of_mme_gid; j++) { S1AP_MME_Group_ID_t *MME_Group_ID = NULL; MME_Group_ID = (S1AP_MME_Group_ID_t *) core_calloc(1, sizeof(S1AP_MME_Group_ID_t)); s1ap_uint16_to_OCTET_STRING( served_gummei->mme_gid[j], MME_Group_ID); ASN_SEQUENCE_ADD( &ServedGUMMEIsItem->servedGroupIDs.list, MME_Group_ID); d_trace(5, " MME Group[%d]\n", served_gummei->mme_gid[j]); } for (j = 0; j < served_gummei->num_of_mme_code; j++) { S1AP_MME_Code_t *MME_Code = NULL ; MME_Code = (S1AP_MME_Code_t *) core_calloc(1, sizeof(S1AP_MME_Code_t)); s1ap_uint8_to_OCTET_STRING(served_gummei->mme_code[j], MME_Code); ASN_SEQUENCE_ADD(&ServedGUMMEIsItem->servedMMECs.list, MME_Code); d_trace(5, " MME Code[%d]\n", served_gummei->mme_code[j]); } ASN_SEQUENCE_ADD(&ServedGUMMEIs->list, ServedGUMMEIsItem); } *RelativeMMECapacity = mme_self()->relative_capacity; rv = s1ap_encode_pdu(pkbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } status_t s1ap_build_setup_failure( pkbuf_t **pkbuf, S1AP_Cause_PR group, long cause, long time_to_wait) { status_t rv; S1AP_S1AP_PDU_t pdu; S1AP_UnsuccessfulOutcome_t *unsuccessfulOutcome = NULL; S1AP_S1SetupFailure_t *S1SetupFailure = NULL; S1AP_S1SetupFailureIEs_t *ie = NULL; S1AP_Cause_t *Cause = NULL; S1AP_TimeToWait_t *TimeToWait = NULL; d_trace(5, " Group[%d] Cause[%d] TimeToWait[%ld]\n", group, cause, time_to_wait); memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_unsuccessfulOutcome; pdu.choice.unsuccessfulOutcome = core_calloc(1, sizeof(S1AP_UnsuccessfulOutcome_t)); unsuccessfulOutcome = pdu.choice.unsuccessfulOutcome; unsuccessfulOutcome->procedureCode = S1AP_ProcedureCode_id_S1Setup; unsuccessfulOutcome->criticality = S1AP_Criticality_reject; unsuccessfulOutcome->value.present = S1AP_UnsuccessfulOutcome__value_PR_S1SetupFailure; S1SetupFailure = &unsuccessfulOutcome->value.choice.S1SetupFailure; ie = core_calloc(1, sizeof(S1AP_S1SetupFailureIEs_t)); ASN_SEQUENCE_ADD(&S1SetupFailure->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_Cause; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_S1SetupFailureIEs__value_PR_Cause; Cause = &ie->value.choice.Cause; if (time_to_wait > -1) { ie = core_calloc(1, sizeof(S1AP_S1SetupFailureIEs_t)); ASN_SEQUENCE_ADD(&S1SetupFailure->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_TimeToWait; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_S1SetupFailureIEs__value_PR_TimeToWait; TimeToWait = &ie->value.choice.TimeToWait; } Cause->present = group; Cause->choice.radioNetwork = cause; if (TimeToWait) *TimeToWait = time_to_wait; rv = s1ap_encode_pdu(pkbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } status_t s1ap_build_downlink_nas_transport( pkbuf_t **s1apbuf, enb_ue_t *enb_ue, pkbuf_t *emmbuf) { status_t rv; S1AP_S1AP_PDU_t pdu; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_DownlinkNASTransport_t *DownlinkNASTransport = NULL; S1AP_DownlinkNASTransport_IEs_t *ie = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_NAS_PDU_t *NAS_PDU = NULL; d_assert(emmbuf, return CORE_ERROR, "Null param"); d_assert(enb_ue, return CORE_ERROR, "Null param"); d_trace(3, "[MME] Downlink NAS transport\n"); memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_initiatingMessage; pdu.choice.initiatingMessage = core_calloc(1, sizeof(S1AP_InitiatingMessage_t)); initiatingMessage = pdu.choice.initiatingMessage; initiatingMessage->procedureCode = S1AP_ProcedureCode_id_downlinkNASTransport; initiatingMessage->criticality = S1AP_Criticality_ignore; initiatingMessage->value.present = S1AP_InitiatingMessage__value_PR_DownlinkNASTransport; DownlinkNASTransport = &initiatingMessage->value.choice.DownlinkNASTransport; ie = core_calloc(1, sizeof(S1AP_DownlinkNASTransport_IEs_t)); ASN_SEQUENCE_ADD(&DownlinkNASTransport->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_DownlinkNASTransport_IEs__value_PR_MME_UE_S1AP_ID; MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_DownlinkNASTransport_IEs_t)); ASN_SEQUENCE_ADD(&DownlinkNASTransport->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_DownlinkNASTransport_IEs__value_PR_ENB_UE_S1AP_ID; ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_DownlinkNASTransport_IEs_t)); ASN_SEQUENCE_ADD(&DownlinkNASTransport->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_NAS_PDU; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_DownlinkNASTransport_IEs__value_PR_NAS_PDU; NAS_PDU = &ie->value.choice.NAS_PDU; d_trace(5, " ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id); *MME_UE_S1AP_ID = enb_ue->mme_ue_s1ap_id; *ENB_UE_S1AP_ID = enb_ue->enb_ue_s1ap_id; NAS_PDU->size = emmbuf->len; NAS_PDU->buf = core_calloc(NAS_PDU->size, sizeof(c_uint8_t)); memcpy(NAS_PDU->buf, emmbuf->payload, NAS_PDU->size); pkbuf_free(emmbuf); rv = s1ap_encode_pdu(s1apbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } status_t s1ap_build_initial_context_setup_request( pkbuf_t **s1apbuf, mme_ue_t *mme_ue, pkbuf_t *emmbuf) { status_t rv; S1AP_S1AP_PDU_t pdu; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_InitialContextSetupRequest_t *InitialContextSetupRequest = NULL; S1AP_InitialContextSetupRequestIEs_t *ie = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_UEAggregateMaximumBitrate_t *UEAggregateMaximumBitrate = NULL; S1AP_E_RABToBeSetupListCtxtSUReq_t *E_RABToBeSetupListCtxtSUReq = NULL; S1AP_UESecurityCapabilities_t *UESecurityCapabilities = NULL; S1AP_SecurityKey_t *SecurityKey = NULL; enb_ue_t *enb_ue = NULL; mme_sess_t *sess = NULL; mme_bearer_t *bearer = NULL; s6a_subscription_data_t *subscription_data = NULL; d_assert(mme_ue, return CORE_ERROR, "Null param"); enb_ue = mme_ue->enb_ue; d_assert(enb_ue, return CORE_ERROR, "Null param"); subscription_data = &mme_ue->subscription_data; d_assert(subscription_data, return CORE_ERROR, "Null param"); d_trace(3, "[MME] Initial context setup request\n"); memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_initiatingMessage; pdu.choice.initiatingMessage = core_calloc(1, sizeof(S1AP_InitiatingMessage_t)); initiatingMessage = pdu.choice.initiatingMessage; initiatingMessage->procedureCode = S1AP_ProcedureCode_id_InitialContextSetup; initiatingMessage->criticality = S1AP_Criticality_reject; initiatingMessage->value.present = S1AP_InitiatingMessage__value_PR_InitialContextSetupRequest; InitialContextSetupRequest = &initiatingMessage->value.choice.InitialContextSetupRequest; ie = core_calloc(1, sizeof(S1AP_InitialContextSetupRequestIEs_t)); ASN_SEQUENCE_ADD(&InitialContextSetupRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_InitialContextSetupRequestIEs__value_PR_MME_UE_S1AP_ID; MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_InitialContextSetupRequestIEs_t)); ASN_SEQUENCE_ADD(&InitialContextSetupRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_InitialContextSetupRequestIEs__value_PR_ENB_UE_S1AP_ID; ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_InitialContextSetupRequestIEs_t)); ASN_SEQUENCE_ADD(&InitialContextSetupRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_uEaggregateMaximumBitrate; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_InitialContextSetupRequestIEs__value_PR_UEAggregateMaximumBitrate; UEAggregateMaximumBitrate = &ie->value.choice.UEAggregateMaximumBitrate; ie = core_calloc(1, sizeof(S1AP_InitialContextSetupRequestIEs_t)); ASN_SEQUENCE_ADD(&InitialContextSetupRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_E_RABToBeSetupListCtxtSUReq; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_InitialContextSetupRequestIEs__value_PR_E_RABToBeSetupListCtxtSUReq; E_RABToBeSetupListCtxtSUReq = &ie->value.choice.E_RABToBeSetupListCtxtSUReq; ie = core_calloc(1, sizeof(S1AP_InitialContextSetupRequestIEs_t)); ASN_SEQUENCE_ADD(&InitialContextSetupRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_UESecurityCapabilities; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_InitialContextSetupRequestIEs__value_PR_UESecurityCapabilities; UESecurityCapabilities = &ie->value.choice.UESecurityCapabilities; ie = core_calloc(1, sizeof(S1AP_InitialContextSetupRequestIEs_t)); ASN_SEQUENCE_ADD(&InitialContextSetupRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_SecurityKey; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_InitialContextSetupRequestIEs__value_PR_SecurityKey; SecurityKey = &ie->value.choice.SecurityKey; d_trace(5, " ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id); *MME_UE_S1AP_ID = enb_ue->mme_ue_s1ap_id; *ENB_UE_S1AP_ID = enb_ue->enb_ue_s1ap_id; asn_uint642INTEGER( &UEAggregateMaximumBitrate->uEaggregateMaximumBitRateUL, subscription_data->ambr.uplink); asn_uint642INTEGER( &UEAggregateMaximumBitrate->uEaggregateMaximumBitRateDL, subscription_data->ambr.downlink); sess = mme_sess_first(mme_ue); while(sess) { bearer = mme_bearer_first(sess); while(bearer) { S1AP_E_RABToBeSetupItemCtxtSUReqIEs_t *item = NULL; S1AP_E_RABToBeSetupItemCtxtSUReq_t *e_rab = NULL; S1AP_GBR_QosInformation_t *gbrQosInformation = NULL; S1AP_NAS_PDU_t *nasPdu = NULL; item = core_calloc( 1, sizeof(S1AP_E_RABToBeSetupItemCtxtSUReqIEs_t)); ASN_SEQUENCE_ADD(&E_RABToBeSetupListCtxtSUReq->list, item); item->id = S1AP_ProtocolIE_ID_id_E_RABToBeSetupItemCtxtSUReq; item->criticality = S1AP_Criticality_reject; item->value.present = S1AP_E_RABToBeSetupItemCtxtSUReqIEs__value_PR_E_RABToBeSetupItemCtxtSUReq; e_rab = &item->value.choice.E_RABToBeSetupItemCtxtSUReq; e_rab->e_RAB_ID = bearer->ebi; e_rab->e_RABlevelQoSParameters.qCI = bearer->qos.qci; d_trace(5, " EBI[%d] QCI[%d] SGW-S1U-TEID[%d]\n", bearer->ebi, bearer->qos.qci, bearer->sgw_s1u_teid); e_rab->e_RABlevelQoSParameters.allocationRetentionPriority. priorityLevel = bearer->qos.arp.priority_level; e_rab->e_RABlevelQoSParameters.allocationRetentionPriority. pre_emptionCapability = !(bearer->qos.arp.pre_emption_capability); e_rab->e_RABlevelQoSParameters.allocationRetentionPriority. pre_emptionVulnerability = !(bearer->qos.arp.pre_emption_vulnerability); if (bearer->qos.mbr.downlink || bearer->qos.mbr.uplink || bearer->qos.gbr.downlink || bearer->qos.gbr.uplink) { if (bearer->qos.mbr.downlink == 0) bearer->qos.mbr.downlink = MAX_BIT_RATE; if (bearer->qos.mbr.uplink == 0) bearer->qos.mbr.uplink = MAX_BIT_RATE; if (bearer->qos.gbr.downlink == 0) bearer->qos.gbr.downlink = MAX_BIT_RATE; if (bearer->qos.gbr.uplink == 0) bearer->qos.gbr.uplink = MAX_BIT_RATE; gbrQosInformation = core_calloc(1, sizeof(struct S1AP_GBR_QosInformation)); asn_uint642INTEGER(&gbrQosInformation->e_RAB_MaximumBitrateDL, bearer->qos.mbr.downlink); asn_uint642INTEGER(&gbrQosInformation->e_RAB_MaximumBitrateUL, bearer->qos.mbr.uplink); asn_uint642INTEGER(&gbrQosInformation-> e_RAB_GuaranteedBitrateDL, bearer->qos.gbr.downlink); asn_uint642INTEGER(&gbrQosInformation-> e_RAB_GuaranteedBitrateUL, bearer->qos.gbr.uplink); e_rab->e_RABlevelQoSParameters.gbrQosInformation = gbrQosInformation; } rv = s1ap_ip_to_BIT_STRING( &bearer->sgw_s1u_ip, &e_rab->transportLayerAddress); d_assert(rv == CORE_OK, return CORE_ERROR,); s1ap_uint32_to_OCTET_STRING(bearer->sgw_s1u_teid, &e_rab->gTP_TEID); if (emmbuf && emmbuf->len) { nasPdu = (S1AP_NAS_PDU_t *)core_calloc( 1, sizeof(S1AP_NAS_PDU_t)); nasPdu->size = emmbuf->len; nasPdu->buf = core_calloc(nasPdu->size, sizeof(c_uint8_t)); memcpy(nasPdu->buf, emmbuf->payload, nasPdu->size); e_rab->nAS_PDU = nasPdu; pkbuf_free(emmbuf); } bearer = mme_bearer_next(bearer); } sess = mme_sess_next(sess); } UESecurityCapabilities->encryptionAlgorithms.size = 2; UESecurityCapabilities->encryptionAlgorithms.buf = core_calloc(UESecurityCapabilities->encryptionAlgorithms.size, sizeof(c_uint8_t)); UESecurityCapabilities->encryptionAlgorithms.bits_unused = 0; UESecurityCapabilities->encryptionAlgorithms.buf[0] = (mme_ue->ue_network_capability.eea << 1); UESecurityCapabilities->integrityProtectionAlgorithms.size = 2; UESecurityCapabilities->integrityProtectionAlgorithms.buf = core_calloc(UESecurityCapabilities-> integrityProtectionAlgorithms.size, sizeof(c_uint8_t)); UESecurityCapabilities->integrityProtectionAlgorithms.bits_unused = 0; UESecurityCapabilities->integrityProtectionAlgorithms.buf[0] = (mme_ue->ue_network_capability.eia << 1); SecurityKey->size = SHA256_DIGEST_SIZE; SecurityKey->buf = core_calloc(SecurityKey->size, sizeof(c_uint8_t)); SecurityKey->bits_unused = 0; memcpy(SecurityKey->buf, mme_ue->kenb, SecurityKey->size); /* Set UeRadioCapability if exists */ if (mme_ue->ueRadioCapability.buf && mme_ue->ueRadioCapability.size) { S1AP_UERadioCapability_t *UERadioCapability = NULL; ie = core_calloc(1, sizeof(S1AP_InitialContextSetupRequestIEs_t)); ASN_SEQUENCE_ADD(&InitialContextSetupRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_UERadioCapability; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_InitialContextSetupRequestIEs__value_PR_UERadioCapability; UERadioCapability = &ie->value.choice.UERadioCapability; d_assert(UERadioCapability, return CORE_ERROR,); s1ap_buffer_to_OCTET_STRING( mme_ue->ueRadioCapability.buf, mme_ue->ueRadioCapability.size, UERadioCapability); } rv = s1ap_encode_pdu(s1apbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } status_t s1ap_build_e_rab_setup_request( pkbuf_t **s1apbuf, mme_bearer_t *bearer, pkbuf_t *esmbuf) { status_t rv; S1AP_S1AP_PDU_t pdu; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_E_RABSetupRequest_t *E_RABSetupRequest = NULL; S1AP_E_RABSetupRequestIEs_t *ie = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_E_RABToBeSetupListBearerSUReq_t *E_RABToBeSetupListBearerSUReq = NULL; S1AP_E_RABToBeSetupItemBearerSUReqIEs_t *item = NULL; S1AP_E_RABToBeSetupItemBearerSUReq_t *e_rab = NULL; S1AP_GBR_QosInformation_t *gbrQosInformation = NULL; S1AP_NAS_PDU_t *nasPdu = NULL; mme_ue_t *mme_ue = NULL; enb_ue_t *enb_ue = NULL; d_assert(esmbuf, return CORE_ERROR, "Null param"); d_assert(bearer, return CORE_ERROR, "Null param"); mme_ue = bearer->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); enb_ue = mme_ue->enb_ue; d_assert(enb_ue, return CORE_ERROR, "Null param"); memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_initiatingMessage; pdu.choice.initiatingMessage = core_calloc(1, sizeof(S1AP_InitiatingMessage_t)); initiatingMessage = pdu.choice.initiatingMessage; initiatingMessage->procedureCode = S1AP_ProcedureCode_id_E_RABSetup; initiatingMessage->criticality = S1AP_Criticality_reject; initiatingMessage->value.present = S1AP_InitiatingMessage__value_PR_E_RABSetupRequest; E_RABSetupRequest = &initiatingMessage->value.choice.E_RABSetupRequest; ie = core_calloc(1, sizeof(S1AP_E_RABSetupRequestIEs_t)); ASN_SEQUENCE_ADD(&E_RABSetupRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_E_RABSetupRequestIEs__value_PR_MME_UE_S1AP_ID; MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_E_RABSetupRequestIEs_t)); ASN_SEQUENCE_ADD(&E_RABSetupRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_E_RABSetupRequestIEs__value_PR_ENB_UE_S1AP_ID; ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_E_RABSetupRequestIEs_t)); ASN_SEQUENCE_ADD(&E_RABSetupRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_E_RABToBeSetupListBearerSUReq; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_E_RABSetupRequestIEs__value_PR_E_RABToBeSetupListBearerSUReq; E_RABToBeSetupListBearerSUReq = &ie->value.choice.E_RABToBeSetupListBearerSUReq; d_trace(5, " ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id); *MME_UE_S1AP_ID = enb_ue->mme_ue_s1ap_id; *ENB_UE_S1AP_ID = enb_ue->enb_ue_s1ap_id; item = core_calloc(1, sizeof(S1AP_E_RABToBeSetupItemBearerSUReqIEs_t)); ASN_SEQUENCE_ADD(&E_RABToBeSetupListBearerSUReq->list, item); item->id = S1AP_ProtocolIE_ID_id_E_RABToBeSetupItemBearerSUReq; item->criticality = S1AP_Criticality_reject; item->value.present = S1AP_E_RABToBeSetupItemBearerSUReqIEs__value_PR_E_RABToBeSetupItemBearerSUReq; e_rab = &item->value.choice.E_RABToBeSetupItemBearerSUReq; e_rab->e_RAB_ID = bearer->ebi; e_rab->e_RABlevelQoSParameters.qCI = bearer->qos.qci; d_trace(5, " EBI[%d] QCI[%d]\n", bearer->ebi, bearer->qos.qci); e_rab->e_RABlevelQoSParameters.allocationRetentionPriority. priorityLevel = bearer->qos.arp.priority_level; e_rab->e_RABlevelQoSParameters.allocationRetentionPriority. pre_emptionCapability = !(bearer->qos.arp.pre_emption_capability); e_rab->e_RABlevelQoSParameters.allocationRetentionPriority. pre_emptionVulnerability = !(bearer->qos.arp.pre_emption_vulnerability); if (bearer->qos.mbr.downlink || bearer->qos.mbr.uplink || bearer->qos.gbr.downlink || bearer->qos.gbr.uplink) { if (bearer->qos.mbr.downlink == 0) bearer->qos.mbr.downlink = MAX_BIT_RATE; if (bearer->qos.mbr.uplink == 0) bearer->qos.mbr.uplink = MAX_BIT_RATE; if (bearer->qos.gbr.downlink == 0) bearer->qos.gbr.downlink = MAX_BIT_RATE; if (bearer->qos.gbr.uplink == 0) bearer->qos.gbr.uplink = MAX_BIT_RATE; gbrQosInformation = core_calloc(1, sizeof(S1AP_GBR_QosInformation_t)); asn_uint642INTEGER(&gbrQosInformation->e_RAB_MaximumBitrateDL, bearer->qos.mbr.downlink); asn_uint642INTEGER(&gbrQosInformation->e_RAB_MaximumBitrateUL, bearer->qos.mbr.uplink); asn_uint642INTEGER(&gbrQosInformation->e_RAB_GuaranteedBitrateDL, bearer->qos.gbr.downlink); asn_uint642INTEGER(&gbrQosInformation->e_RAB_GuaranteedBitrateUL, bearer->qos.gbr.uplink); e_rab->e_RABlevelQoSParameters.gbrQosInformation = gbrQosInformation; } rv = s1ap_ip_to_BIT_STRING( &bearer->sgw_s1u_ip, &e_rab->transportLayerAddress); d_assert(rv == CORE_OK, return CORE_ERROR,); s1ap_uint32_to_OCTET_STRING(bearer->sgw_s1u_teid, &e_rab->gTP_TEID); d_trace(5, " SGW-S1U-TEID[%d]\n", bearer->sgw_s1u_teid); nasPdu = &e_rab->nAS_PDU; nasPdu->size = esmbuf->len; nasPdu->buf = core_calloc(nasPdu->size, sizeof(c_uint8_t)); memcpy(nasPdu->buf, esmbuf->payload, nasPdu->size); pkbuf_free(esmbuf); rv = s1ap_encode_pdu(s1apbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } status_t s1ap_build_e_rab_modify_request( pkbuf_t **s1apbuf, mme_bearer_t *bearer, pkbuf_t *esmbuf) { status_t rv; S1AP_S1AP_PDU_t pdu; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_E_RABModifyRequest_t *E_RABModifyRequest = NULL; S1AP_E_RABModifyRequestIEs_t *ie = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_E_RABToBeModifiedListBearerModReq_t *E_RABToBeModifiedListBearerModReq = NULL; S1AP_E_RABToBeModifiedItemBearerModReqIEs_t *item = NULL; S1AP_E_RABToBeModifiedItemBearerModReq_t *e_rab = NULL; S1AP_GBR_QosInformation_t *gbrQosInformation = NULL; S1AP_NAS_PDU_t *nasPdu = NULL; mme_ue_t *mme_ue = NULL; enb_ue_t *enb_ue = NULL; d_assert(esmbuf, return CORE_ERROR, "Null param"); d_assert(bearer, return CORE_ERROR, "Null param"); mme_ue = bearer->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); enb_ue = mme_ue->enb_ue; d_assert(enb_ue, return CORE_ERROR, "Null param"); d_trace(3, "[MME] E-RAB modify request\n"); memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_initiatingMessage; pdu.choice.initiatingMessage = core_calloc(1, sizeof(S1AP_InitiatingMessage_t)); initiatingMessage = pdu.choice.initiatingMessage; initiatingMessage->procedureCode = S1AP_ProcedureCode_id_E_RABModify; initiatingMessage->criticality = S1AP_Criticality_reject; initiatingMessage->value.present = S1AP_InitiatingMessage__value_PR_E_RABModifyRequest; E_RABModifyRequest = &initiatingMessage->value.choice.E_RABModifyRequest; ie = core_calloc(1, sizeof(S1AP_E_RABModifyRequestIEs_t)); ASN_SEQUENCE_ADD(&E_RABModifyRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_E_RABModifyRequestIEs__value_PR_MME_UE_S1AP_ID; MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_E_RABModifyRequestIEs_t)); ASN_SEQUENCE_ADD(&E_RABModifyRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_E_RABModifyRequestIEs__value_PR_ENB_UE_S1AP_ID; ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_E_RABModifyRequestIEs_t)); ASN_SEQUENCE_ADD(&E_RABModifyRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_E_RABToBeModifiedListBearerModReq; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_E_RABModifyRequestIEs__value_PR_E_RABToBeModifiedListBearerModReq; E_RABToBeModifiedListBearerModReq = &ie->value.choice.E_RABToBeModifiedListBearerModReq; d_trace(5, " ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id); *MME_UE_S1AP_ID = enb_ue->mme_ue_s1ap_id; *ENB_UE_S1AP_ID = enb_ue->enb_ue_s1ap_id; item = core_calloc(1, sizeof(S1AP_E_RABToBeModifiedItemBearerModReqIEs_t)); ASN_SEQUENCE_ADD(&E_RABToBeModifiedListBearerModReq->list, item); item->id = S1AP_ProtocolIE_ID_id_E_RABToBeModifiedItemBearerModReq; item->criticality = S1AP_Criticality_reject; item->value.present = S1AP_E_RABToBeModifiedItemBearerModReqIEs__value_PR_E_RABToBeModifiedItemBearerModReq; e_rab = &item->value.choice.E_RABToBeModifiedItemBearerModReq; e_rab->e_RAB_ID = bearer->ebi; e_rab->e_RABLevelQoSParameters.qCI = bearer->qos.qci; d_trace(5, " EBI[%d] QCI[%d]\n", bearer->ebi, bearer->qos.qci); e_rab->e_RABLevelQoSParameters.allocationRetentionPriority. priorityLevel = bearer->qos.arp.priority_level; e_rab->e_RABLevelQoSParameters.allocationRetentionPriority. pre_emptionCapability = !(bearer->qos.arp.pre_emption_capability); e_rab->e_RABLevelQoSParameters.allocationRetentionPriority. pre_emptionVulnerability = !(bearer->qos.arp.pre_emption_vulnerability); if (bearer->qos.mbr.downlink || bearer->qos.mbr.uplink || bearer->qos.gbr.downlink || bearer->qos.gbr.uplink) { if (bearer->qos.mbr.downlink == 0) bearer->qos.mbr.downlink = MAX_BIT_RATE; if (bearer->qos.mbr.uplink == 0) bearer->qos.mbr.uplink = MAX_BIT_RATE; if (bearer->qos.gbr.downlink == 0) bearer->qos.gbr.downlink = MAX_BIT_RATE; if (bearer->qos.gbr.uplink == 0) bearer->qos.gbr.uplink = MAX_BIT_RATE; gbrQosInformation = core_calloc(1, sizeof(S1AP_GBR_QosInformation_t)); asn_uint642INTEGER(&gbrQosInformation->e_RAB_MaximumBitrateDL, bearer->qos.mbr.downlink); asn_uint642INTEGER(&gbrQosInformation->e_RAB_MaximumBitrateUL, bearer->qos.mbr.uplink); asn_uint642INTEGER(&gbrQosInformation->e_RAB_GuaranteedBitrateDL, bearer->qos.gbr.downlink); asn_uint642INTEGER(&gbrQosInformation->e_RAB_GuaranteedBitrateUL, bearer->qos.gbr.uplink); e_rab->e_RABLevelQoSParameters.gbrQosInformation = gbrQosInformation; } nasPdu = &e_rab->nAS_PDU; nasPdu->size = esmbuf->len; nasPdu->buf = core_calloc(nasPdu->size, sizeof(c_uint8_t)); memcpy(nasPdu->buf, esmbuf->payload, nasPdu->size); pkbuf_free(esmbuf); rv = s1ap_encode_pdu(s1apbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } status_t s1ap_build_e_rab_release_command(pkbuf_t **s1apbuf, mme_bearer_t *bearer, pkbuf_t *esmbuf, S1AP_Cause_PR group, long cause) { status_t rv; S1AP_S1AP_PDU_t pdu; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_E_RABReleaseCommand_t *E_RABReleaseCommand = NULL; S1AP_E_RABReleaseCommandIEs_t *ie = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_UEAggregateMaximumBitrate_t *UEAggregateMaximumBitrate = NULL; S1AP_E_RABList_t *E_RABList = NULL; S1AP_NAS_PDU_t *nasPdu = NULL; S1AP_E_RABItemIEs_t *item = NULL; S1AP_E_RABItem_t *e_rab = NULL; mme_ue_t *mme_ue = NULL; enb_ue_t *enb_ue = NULL; s6a_subscription_data_t *subscription_data = NULL; d_assert(esmbuf, return CORE_ERROR, "Null param"); d_assert(bearer, return CORE_ERROR, "Null param"); mme_ue = bearer->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); enb_ue = mme_ue->enb_ue; d_assert(enb_ue, return CORE_ERROR, "Null param"); subscription_data = &mme_ue->subscription_data; d_assert(subscription_data, return CORE_ERROR, "Null param"); d_trace(3, "[MME] E-RAB release command\n"); memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_initiatingMessage; pdu.choice.initiatingMessage = core_calloc(1, sizeof(S1AP_InitiatingMessage_t)); initiatingMessage = pdu.choice.initiatingMessage; initiatingMessage->procedureCode = S1AP_ProcedureCode_id_E_RABRelease; initiatingMessage->criticality = S1AP_Criticality_reject; initiatingMessage->value.present = S1AP_InitiatingMessage__value_PR_E_RABReleaseCommand; E_RABReleaseCommand = &initiatingMessage->value.choice.E_RABReleaseCommand; ie = core_calloc(1, sizeof(S1AP_E_RABReleaseCommandIEs_t)); ASN_SEQUENCE_ADD(&E_RABReleaseCommand->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_E_RABReleaseCommandIEs__value_PR_MME_UE_S1AP_ID; MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_E_RABReleaseCommandIEs_t)); ASN_SEQUENCE_ADD(&E_RABReleaseCommand->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_E_RABReleaseCommandIEs__value_PR_ENB_UE_S1AP_ID; ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_E_RABReleaseCommandIEs_t)); ASN_SEQUENCE_ADD(&E_RABReleaseCommand->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_uEaggregateMaximumBitrate; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_E_RABReleaseCommandIEs__value_PR_UEAggregateMaximumBitrate; UEAggregateMaximumBitrate = &ie->value.choice.UEAggregateMaximumBitrate; ie = core_calloc(1, sizeof(S1AP_E_RABReleaseCommandIEs_t)); ASN_SEQUENCE_ADD(&E_RABReleaseCommand->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_E_RABToBeReleasedList; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_E_RABReleaseCommandIEs__value_PR_E_RABList; E_RABList = &ie->value.choice.E_RABList; ie = core_calloc(1, sizeof(S1AP_E_RABReleaseCommandIEs_t)); ASN_SEQUENCE_ADD(&E_RABReleaseCommand->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_NAS_PDU; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_E_RABReleaseCommandIEs__value_PR_NAS_PDU; nasPdu = &ie->value.choice.NAS_PDU; d_trace(5, " ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id); *MME_UE_S1AP_ID = enb_ue->mme_ue_s1ap_id; *ENB_UE_S1AP_ID = enb_ue->enb_ue_s1ap_id; asn_uint642INTEGER( &UEAggregateMaximumBitrate->uEaggregateMaximumBitRateUL, subscription_data->ambr.uplink); asn_uint642INTEGER( &UEAggregateMaximumBitrate->uEaggregateMaximumBitRateDL, subscription_data->ambr.downlink); item = core_calloc(1, sizeof(S1AP_E_RABItemIEs_t)); ASN_SEQUENCE_ADD(&E_RABList->list, item); item->id = S1AP_ProtocolIE_ID_id_E_RABItem; item->criticality = S1AP_Criticality_ignore; item->value.present = S1AP_E_RABItemIEs__value_PR_E_RABItem; e_rab = &item->value.choice.E_RABItem; e_rab->e_RAB_ID = bearer->ebi; e_rab->cause.present = group; e_rab->cause.choice.radioNetwork = cause; d_trace(5, " EBI[%d] Gruop[%d] Cause[%d]\n", bearer->ebi, group, cause); nasPdu->size = esmbuf->len; nasPdu->buf = core_calloc(nasPdu->size, sizeof(c_uint8_t)); memcpy(nasPdu->buf, esmbuf->payload, nasPdu->size); pkbuf_free(esmbuf); rv = s1ap_encode_pdu(s1apbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } status_t s1ap_build_ue_context_release_command( pkbuf_t **s1apbuf, enb_ue_t *enb_ue, S1AP_Cause_PR group, long cause) { status_t rv; S1AP_S1AP_PDU_t pdu; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_UEContextReleaseCommand_t *UEContextReleaseCommand = NULL; S1AP_UEContextReleaseCommand_IEs_t *ie = NULL; S1AP_UE_S1AP_IDs_t *UE_S1AP_IDs = NULL; S1AP_Cause_t *Cause = NULL; d_assert(enb_ue, return CORE_ERROR, "Null param"); if (enb_ue->mme_ue_s1ap_id == 0) { d_error("invalid mme ue s1ap id (idx: %d)", enb_ue->index); return CORE_ERROR; } memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_initiatingMessage; pdu.choice.initiatingMessage = core_calloc(1, sizeof(S1AP_InitiatingMessage_t)); initiatingMessage = pdu.choice.initiatingMessage; initiatingMessage->procedureCode = S1AP_ProcedureCode_id_UEContextRelease; initiatingMessage->criticality = S1AP_Criticality_reject; initiatingMessage->value.present = S1AP_InitiatingMessage__value_PR_UEContextReleaseCommand; UEContextReleaseCommand = &initiatingMessage->value.choice.UEContextReleaseCommand; ie = core_calloc(1, sizeof(S1AP_UEContextReleaseCommand_IEs_t)); ASN_SEQUENCE_ADD(&UEContextReleaseCommand->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_UE_S1AP_IDs; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_UEContextReleaseCommand_IEs__value_PR_UE_S1AP_IDs; UE_S1AP_IDs = &ie->value.choice.UE_S1AP_IDs; ie = core_calloc(1, sizeof(S1AP_UEContextReleaseCommand_IEs_t)); ASN_SEQUENCE_ADD(&UEContextReleaseCommand->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_Cause; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_UEContextReleaseCommand_IEs__value_PR_Cause; Cause = &ie->value.choice.Cause; if (enb_ue->enb_ue_s1ap_id == INVALID_UE_S1AP_ID) { UE_S1AP_IDs->present = S1AP_UE_S1AP_IDs_PR_mME_UE_S1AP_ID; UE_S1AP_IDs->choice.mME_UE_S1AP_ID = enb_ue->mme_ue_s1ap_id; } else { UE_S1AP_IDs->present = S1AP_UE_S1AP_IDs_PR_uE_S1AP_ID_pair; UE_S1AP_IDs->choice.uE_S1AP_ID_pair = core_calloc(1, sizeof(S1AP_UE_S1AP_ID_pair_t)); UE_S1AP_IDs->choice.uE_S1AP_ID_pair->mME_UE_S1AP_ID = enb_ue->mme_ue_s1ap_id; UE_S1AP_IDs->choice.uE_S1AP_ID_pair->eNB_UE_S1AP_ID = enb_ue->enb_ue_s1ap_id; } Cause->present = group; Cause->choice.radioNetwork = cause; rv = s1ap_encode_pdu(s1apbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } status_t s1ap_build_paging(pkbuf_t **s1apbuf, mme_ue_t *mme_ue) { status_t rv; S1AP_S1AP_PDU_t pdu; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_Paging_t *Paging = NULL; S1AP_PagingIEs_t *ie = NULL; S1AP_UEIdentityIndexValue_t *UEIdentityIndexValue = NULL; S1AP_UEPagingID_t *UEPagingID = NULL; S1AP_CNDomain_t *CNDomain = NULL; S1AP_TAIList_t *TAIList = NULL; S1AP_TAIItemIEs_t *item = NULL; S1AP_TAIItem_t *tai_item = NULL; c_uint16_t index_value; c_uint64_t ue_imsi_value = 0; int i = 0; d_assert(mme_ue, return CORE_ERROR, "Null param"); d_trace(3, "[MME] Paging\n"); memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_initiatingMessage; pdu.choice.initiatingMessage = core_calloc(1, sizeof(S1AP_InitiatingMessage_t)); initiatingMessage = pdu.choice.initiatingMessage; initiatingMessage->procedureCode = S1AP_ProcedureCode_id_Paging; initiatingMessage->criticality = S1AP_Criticality_ignore; initiatingMessage->value.present = S1AP_InitiatingMessage__value_PR_Paging; Paging = &initiatingMessage->value.choice.Paging; ie = core_calloc(1, sizeof(S1AP_PagingIEs_t)); ASN_SEQUENCE_ADD(&Paging->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_UEIdentityIndexValue; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_PagingIEs__value_PR_UEIdentityIndexValue; UEIdentityIndexValue = &ie->value.choice.UEIdentityIndexValue; ie = core_calloc(1, sizeof(S1AP_PagingIEs_t)); ASN_SEQUENCE_ADD(&Paging->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_UEPagingID; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_PagingIEs__value_PR_UEPagingID; UEPagingID = &ie->value.choice.UEPagingID; ie = core_calloc(1, sizeof(S1AP_PagingIEs_t)); ASN_SEQUENCE_ADD(&Paging->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_CNDomain; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_PagingIEs__value_PR_CNDomain; CNDomain = &ie->value.choice.CNDomain; ie = core_calloc(1, sizeof(S1AP_PagingIEs_t)); ASN_SEQUENCE_ADD(&Paging->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_TAIList; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_PagingIEs__value_PR_TAIList; TAIList = &ie->value.choice.TAIList; /* Set UE Identity Index value : IMSI mod 4096 */ UEIdentityIndexValue->size = 2; UEIdentityIndexValue->buf = core_calloc(UEIdentityIndexValue->size, sizeof(c_uint8_t)); /* Conver string to value */ for (i = 0; i < strlen(mme_ue->imsi_bcd); i++) { ue_imsi_value = ue_imsi_value*10 + (mme_ue->imsi_bcd[i] - '0'); } /* index(10bit) = ue_imsi_value mod 1024 */ index_value = ue_imsi_value % 1024; UEIdentityIndexValue->buf[0] = index_value >> 2; UEIdentityIndexValue->buf[1] = (index_value & 0x3f) << 6; UEIdentityIndexValue->bits_unused = 6; /* Set Paging Identity */ UEPagingID->present = S1AP_UEPagingID_PR_s_TMSI; UEPagingID->choice.s_TMSI = core_calloc(1, sizeof(S1AP_S_TMSI_t)); s1ap_uint8_to_OCTET_STRING(mme_ue->guti.mme_code, &UEPagingID->choice.s_TMSI->mMEC); s1ap_uint32_to_OCTET_STRING(mme_ue->guti.m_tmsi, &UEPagingID->choice.s_TMSI->m_TMSI); d_trace(5, " MME_CODE[%d] M_TMSI[0x%x]\n", mme_ue->guti.mme_code, mme_ue->guti.m_tmsi); *CNDomain = S1AP_CNDomain_ps; item = core_calloc(1, sizeof(S1AP_TAIItemIEs_t)); ASN_SEQUENCE_ADD(&TAIList->list, item); item->id = S1AP_ProtocolIE_ID_id_TAIItem; item->criticality = S1AP_Criticality_ignore; item->value.present = S1AP_TAIItemIEs__value_PR_TAIItem; tai_item = &item->value.choice.TAIItem; s1ap_buffer_to_OCTET_STRING(&mme_ue->tai.plmn_id, sizeof(plmn_id_t), &tai_item->tAI.pLMNidentity); s1ap_uint16_to_OCTET_STRING(mme_ue->tai.tac, &tai_item->tAI.tAC); rv = s1ap_encode_pdu(s1apbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } status_t s1ap_build_mme_configuration_transfer( pkbuf_t **s1apbuf, S1AP_SONConfigurationTransfer_t *son_configuration_transfer) { status_t rv; S1AP_S1AP_PDU_t pdu; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_MMEConfigurationTransfer_t *MMEConfigurationTransfer = NULL; S1AP_MMEConfigurationTransferIEs_t *ie = NULL; S1AP_SONConfigurationTransfer_t *SONConfigurationTransfer = NULL; d_assert(s1apbuf, return CORE_ERROR,); d_assert(son_configuration_transfer, return CORE_ERROR,); d_trace(3, "[MME] MME Configuration Transfer\n"); memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_initiatingMessage; pdu.choice.initiatingMessage = core_calloc(1, sizeof(S1AP_InitiatingMessage_t)); initiatingMessage = pdu.choice.initiatingMessage; initiatingMessage->procedureCode = S1AP_ProcedureCode_id_MMEConfigurationTransfer; initiatingMessage->criticality = S1AP_Criticality_ignore; initiatingMessage->value.present = S1AP_InitiatingMessage__value_PR_MMEConfigurationTransfer; MMEConfigurationTransfer = &initiatingMessage->value.choice.MMEConfigurationTransfer; ie = core_calloc(1, sizeof(S1AP_MMEConfigurationTransferIEs_t)); ASN_SEQUENCE_ADD(&MMEConfigurationTransfer->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_SONConfigurationTransferMCT; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_MMEConfigurationTransferIEs__value_PR_SONConfigurationTransfer; SONConfigurationTransfer = &ie->value.choice.SONConfigurationTransfer; rv = s1ap_copy_ie(&asn_DEF_S1AP_SONConfigurationTransfer, son_configuration_transfer, SONConfigurationTransfer); d_assert(rv == CORE_OK, return CORE_ERROR,); rv = s1ap_encode_pdu(s1apbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } status_t s1ap_build_path_switch_ack(pkbuf_t **s1apbuf, mme_ue_t *mme_ue) { status_t rv; S1AP_S1AP_PDU_t pdu; S1AP_SuccessfulOutcome_t *successfulOutcome = NULL; S1AP_PathSwitchRequestAcknowledge_t *PathSwitchRequestAcknowledge = NULL; S1AP_PathSwitchRequestAcknowledgeIEs_t *ie = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_SecurityContext_t *SecurityContext = NULL; enb_ue_t *enb_ue = NULL; d_assert(mme_ue, return CORE_ERROR, "Null param"); enb_ue = mme_ue->enb_ue; d_assert(enb_ue, return CORE_ERROR, "Null param"); d_trace(3, "[MME] Path switch acknowledge\n"); memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_successfulOutcome; pdu.choice.successfulOutcome = core_calloc(1, sizeof(S1AP_SuccessfulOutcome_t)); successfulOutcome = pdu.choice.successfulOutcome; successfulOutcome->procedureCode = S1AP_ProcedureCode_id_PathSwitchRequest; successfulOutcome->criticality = S1AP_Criticality_reject; successfulOutcome->value.present = S1AP_SuccessfulOutcome__value_PR_PathSwitchRequestAcknowledge; PathSwitchRequestAcknowledge = &successfulOutcome->value.choice.PathSwitchRequestAcknowledge; ie = core_calloc(1, sizeof(S1AP_PathSwitchRequestAcknowledgeIEs_t)); ASN_SEQUENCE_ADD(&PathSwitchRequestAcknowledge->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_PathSwitchRequestAcknowledgeIEs__value_PR_MME_UE_S1AP_ID; MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_PathSwitchRequestAcknowledgeIEs_t)); ASN_SEQUENCE_ADD(&PathSwitchRequestAcknowledge->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_PathSwitchRequestAcknowledgeIEs__value_PR_ENB_UE_S1AP_ID; ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_PathSwitchRequestAcknowledgeIEs_t)); ASN_SEQUENCE_ADD(&PathSwitchRequestAcknowledge->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_SecurityContext; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_PathSwitchRequestAcknowledgeIEs__value_PR_SecurityContext; SecurityContext = &ie->value.choice.SecurityContext; d_trace(5, " ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id); *MME_UE_S1AP_ID = enb_ue->mme_ue_s1ap_id; *ENB_UE_S1AP_ID = enb_ue->enb_ue_s1ap_id; SecurityContext->nextHopChainingCount = mme_ue->nhcc; SecurityContext->nextHopParameter.size = SHA256_DIGEST_SIZE; SecurityContext->nextHopParameter.buf = core_calloc(SecurityContext->nextHopParameter.size, sizeof(c_uint8_t)); SecurityContext->nextHopParameter.bits_unused = 0; memcpy(SecurityContext->nextHopParameter.buf, mme_ue->nh, SecurityContext->nextHopParameter.size); rv = s1ap_encode_pdu(s1apbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } status_t s1ap_build_path_switch_failure(pkbuf_t **s1apbuf, c_uint32_t enb_ue_s1ap_id, c_uint32_t mme_ue_s1ap_id, S1AP_Cause_PR group, long cause) { status_t rv; S1AP_S1AP_PDU_t pdu; S1AP_UnsuccessfulOutcome_t *unsuccessfulOutcome = NULL; S1AP_PathSwitchRequestFailure_t *PathSwitchRequestFailure = NULL; S1AP_PathSwitchRequestFailureIEs_t *ie = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_Cause_t *Cause = NULL; d_trace(3, "[MME] Path switch failure\n"); memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_unsuccessfulOutcome; pdu.choice.unsuccessfulOutcome = core_calloc(1, sizeof(S1AP_UnsuccessfulOutcome_t)); unsuccessfulOutcome = pdu.choice.unsuccessfulOutcome; unsuccessfulOutcome->procedureCode = S1AP_ProcedureCode_id_PathSwitchRequest; unsuccessfulOutcome->criticality = S1AP_Criticality_reject; unsuccessfulOutcome->value.present = S1AP_UnsuccessfulOutcome__value_PR_PathSwitchRequestFailure; PathSwitchRequestFailure = &unsuccessfulOutcome->value.choice.PathSwitchRequestFailure; ie = core_calloc(1, sizeof(S1AP_PathSwitchRequestFailureIEs_t)); ASN_SEQUENCE_ADD(&PathSwitchRequestFailure->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_PathSwitchRequestFailureIEs__value_PR_MME_UE_S1AP_ID; MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_PathSwitchRequestFailureIEs_t)); ASN_SEQUENCE_ADD(&PathSwitchRequestFailure->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_PathSwitchRequestFailureIEs__value_PR_ENB_UE_S1AP_ID; ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_PathSwitchRequestFailureIEs_t)); ASN_SEQUENCE_ADD(&PathSwitchRequestFailure->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_Cause; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_PathSwitchRequestFailureIEs__value_PR_Cause; Cause = &ie->value.choice.Cause; d_trace(5, " ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", enb_ue_s1ap_id, mme_ue_s1ap_id); d_trace(5, " Group[%d] Cause[%d]\n", group, cause); *MME_UE_S1AP_ID = mme_ue_s1ap_id; *ENB_UE_S1AP_ID = enb_ue_s1ap_id; Cause->present = group; Cause->choice.radioNetwork = cause; rv = s1ap_encode_pdu(s1apbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } status_t s1ap_build_handover_command(pkbuf_t **s1apbuf, enb_ue_t *source_ue) { status_t rv; S1AP_S1AP_PDU_t pdu; S1AP_SuccessfulOutcome_t *successfulOutcome = NULL; S1AP_HandoverCommand_t *HandoverCommand = NULL; S1AP_HandoverCommandIEs_t *ie = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_HandoverType_t *HandoverType = NULL; S1AP_E_RABSubjecttoDataForwardingList_t *E_RABSubjecttoDataForwardingList = NULL; S1AP_Target_ToSource_TransparentContainer_t *Target_ToSource_TransparentContainer = NULL; mme_ue_t *mme_ue = NULL; mme_sess_t *sess = NULL; mme_bearer_t *bearer = NULL; d_assert(source_ue, return CORE_ERROR, "Null param"); mme_ue = source_ue->mme_ue; d_trace(3, "[MME] Handover command\n"); memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_successfulOutcome; pdu.choice.successfulOutcome = core_calloc(1, sizeof(S1AP_SuccessfulOutcome_t)); successfulOutcome = pdu.choice.successfulOutcome; successfulOutcome->procedureCode = S1AP_ProcedureCode_id_HandoverPreparation; successfulOutcome->criticality = S1AP_Criticality_reject; successfulOutcome->value.present = S1AP_SuccessfulOutcome__value_PR_HandoverCommand; HandoverCommand = &successfulOutcome->value.choice.HandoverCommand; d_assert(HandoverCommand, return CORE_ERROR,); ie = core_calloc(1, sizeof(S1AP_HandoverCommandIEs_t)); ASN_SEQUENCE_ADD(&HandoverCommand->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_HandoverCommandIEs__value_PR_MME_UE_S1AP_ID; MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_HandoverCommandIEs_t)); ASN_SEQUENCE_ADD(&HandoverCommand->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_HandoverCommandIEs__value_PR_ENB_UE_S1AP_ID; ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_HandoverCommandIEs_t)); ASN_SEQUENCE_ADD(&HandoverCommand->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_HandoverType; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_HandoverCommandIEs__value_PR_HandoverType; HandoverType = &ie->value.choice.HandoverType; *MME_UE_S1AP_ID = source_ue->mme_ue_s1ap_id; *ENB_UE_S1AP_ID = source_ue->enb_ue_s1ap_id; *HandoverType = source_ue->handover_type; d_trace(5, " ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", source_ue->enb_ue_s1ap_id, source_ue->mme_ue_s1ap_id); sess = mme_sess_first(mme_ue); while(sess) { bearer = mme_bearer_first(sess); while(bearer) { S1AP_E_RABDataForwardingItem_t *e_rab = NULL; if (MME_HAVE_SGW_DL_INDIRECT_TUNNEL(bearer) || MME_HAVE_SGW_UL_INDIRECT_TUNNEL(bearer)) { S1AP_E_RABDataForwardingItemIEs_t *item = NULL; if (E_RABSubjecttoDataForwardingList == NULL) { ie = core_calloc(1, sizeof(S1AP_HandoverCommandIEs_t)); d_assert(ie, return CORE_ERROR,); ASN_SEQUENCE_ADD(&HandoverCommand->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_E_RABSubjecttoDataForwardingList; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_HandoverCommandIEs__value_PR_E_RABSubjecttoDataForwardingList; E_RABSubjecttoDataForwardingList = &ie->value.choice.E_RABSubjecttoDataForwardingList; } d_assert(E_RABSubjecttoDataForwardingList, return CORE_ERROR,); item = core_calloc( 1, sizeof(S1AP_E_RABDataForwardingItemIEs_t)); d_assert(item, return CORE_ERROR,); ASN_SEQUENCE_ADD(&E_RABSubjecttoDataForwardingList->list, item); item->id = S1AP_ProtocolIE_ID_id_E_RABDataForwardingItem; item->criticality = S1AP_Criticality_ignore; item->value.present = S1AP_E_RABDataForwardingItemIEs__value_PR_E_RABDataForwardingItem; e_rab = &item->value.choice.E_RABDataForwardingItem; d_assert(e_rab, return CORE_ERROR,); e_rab->e_RAB_ID = bearer->ebi; } if (MME_HAVE_SGW_DL_INDIRECT_TUNNEL(bearer)) { d_assert(e_rab, return CORE_ERROR,); e_rab->dL_transportLayerAddress = (S1AP_TransportLayerAddress_t *) core_calloc(1, sizeof(S1AP_TransportLayerAddress_t)); rv = s1ap_ip_to_BIT_STRING( &bearer->sgw_dl_ip, e_rab->dL_transportLayerAddress); d_assert(rv == CORE_OK, return CORE_ERROR,); e_rab->dL_gTP_TEID = (S1AP_GTP_TEID_t *) core_calloc(1, sizeof(S1AP_GTP_TEID_t)); s1ap_uint32_to_OCTET_STRING( bearer->sgw_dl_teid, e_rab->dL_gTP_TEID); d_trace(5, " SGW-DL-TEID[%d]\n", bearer->sgw_dl_teid); } if (MME_HAVE_SGW_UL_INDIRECT_TUNNEL(bearer)) { d_assert(e_rab, return CORE_ERROR,); e_rab->uL_TransportLayerAddress = (S1AP_TransportLayerAddress_t *) core_calloc(1, sizeof(S1AP_TransportLayerAddress_t)); rv = s1ap_ip_to_BIT_STRING( &bearer->sgw_ul_ip, e_rab->uL_TransportLayerAddress); d_assert(rv == CORE_OK, return CORE_ERROR,); e_rab->uL_GTP_TEID = (S1AP_GTP_TEID_t *) core_calloc(1, sizeof(S1AP_GTP_TEID_t)); s1ap_uint32_to_OCTET_STRING( bearer->sgw_ul_teid, e_rab->uL_GTP_TEID); d_trace(5, " SGW-UL-TEID[%d]\n", bearer->sgw_dl_teid); } bearer = mme_bearer_next(bearer); } sess = mme_sess_next(sess); } ie = core_calloc(1, sizeof(S1AP_HandoverCommandIEs_t)); ASN_SEQUENCE_ADD(&HandoverCommand->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_Target_ToSource_TransparentContainer; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_HandoverCommandIEs__value_PR_Target_ToSource_TransparentContainer; Target_ToSource_TransparentContainer = &ie->value.choice.Target_ToSource_TransparentContainer; s1ap_buffer_to_OCTET_STRING(mme_ue->container.buf, mme_ue->container.size, Target_ToSource_TransparentContainer); rv = s1ap_encode_pdu(s1apbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } status_t s1ap_build_handover_preparation_failure( pkbuf_t **s1apbuf, enb_ue_t *source_ue, S1AP_Cause_t *cause) { status_t rv; S1AP_S1AP_PDU_t pdu; S1AP_UnsuccessfulOutcome_t *unsuccessfulOutcome = NULL; S1AP_HandoverPreparationFailure_t *HandoverPreparationFailure = NULL; S1AP_HandoverPreparationFailureIEs_t *ie = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_Cause_t *Cause = NULL; d_assert(s1apbuf, return CORE_ERROR,); d_assert(source_ue, return CORE_ERROR,); d_assert(cause, return CORE_ERROR,); d_trace(3, "[MME] Handover preparation failure\n"); memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_unsuccessfulOutcome; pdu.choice.unsuccessfulOutcome = core_calloc(1, sizeof(S1AP_UnsuccessfulOutcome_t)); unsuccessfulOutcome = pdu.choice.unsuccessfulOutcome; unsuccessfulOutcome->procedureCode = S1AP_ProcedureCode_id_HandoverPreparation; unsuccessfulOutcome->criticality = S1AP_Criticality_reject; unsuccessfulOutcome->value.present = S1AP_UnsuccessfulOutcome__value_PR_HandoverPreparationFailure; HandoverPreparationFailure = &unsuccessfulOutcome->value.choice.HandoverPreparationFailure; ie = core_calloc(1, sizeof(S1AP_HandoverPreparationFailureIEs_t)); ASN_SEQUENCE_ADD(&HandoverPreparationFailure->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_HandoverPreparationFailureIEs__value_PR_MME_UE_S1AP_ID; MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_HandoverPreparationFailureIEs_t)); ASN_SEQUENCE_ADD(&HandoverPreparationFailure->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_HandoverPreparationFailureIEs__value_PR_ENB_UE_S1AP_ID; ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_HandoverPreparationFailureIEs_t)); ASN_SEQUENCE_ADD(&HandoverPreparationFailure->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_Cause; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_HandoverPreparationFailureIEs__value_PR_Cause; Cause = &ie->value.choice.Cause; d_trace(5, " ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", source_ue->enb_ue_s1ap_id, source_ue->mme_ue_s1ap_id); d_trace(5, " Group[%d] Cause[%d]\n", cause->present, cause->choice.radioNetwork); *MME_UE_S1AP_ID = source_ue->mme_ue_s1ap_id; *ENB_UE_S1AP_ID = source_ue->enb_ue_s1ap_id; Cause->present = cause->present; Cause->choice.radioNetwork = cause->choice.radioNetwork; rv = s1ap_encode_pdu(s1apbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } status_t s1ap_build_handover_request( pkbuf_t **s1apbuf, mme_ue_t *mme_ue, enb_ue_t *target_ue, S1AP_ENB_UE_S1AP_ID_t *enb_ue_s1ap_id, S1AP_MME_UE_S1AP_ID_t *mme_ue_s1ap_id, S1AP_HandoverType_t *handovertype, S1AP_Cause_t *cause, S1AP_Source_ToTarget_TransparentContainer_t *source_totarget_transparentContainer) { status_t rv; S1AP_S1AP_PDU_t pdu; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_HandoverRequest_t *HandoverRequest = NULL; S1AP_HandoverRequestIEs_t *ie = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_HandoverType_t *HandoverType = NULL; S1AP_Cause_t *Cause = NULL; S1AP_UEAggregateMaximumBitrate_t *UEAggregateMaximumBitrate = NULL; S1AP_E_RABToBeSetupListHOReq_t *E_RABToBeSetupListHOReq = NULL; S1AP_Source_ToTarget_TransparentContainer_t *Source_ToTarget_TransparentContainer = NULL; S1AP_UESecurityCapabilities_t *UESecurityCapabilities = NULL; S1AP_SecurityContext_t *SecurityContext = NULL; mme_sess_t *sess = NULL; mme_bearer_t *bearer = NULL; s6a_subscription_data_t *subscription_data = NULL; d_assert(handovertype, return CORE_ERROR,); d_assert(cause, return CORE_ERROR,); d_assert(source_totarget_transparentContainer, return CORE_ERROR,); d_assert(target_ue, return CORE_ERROR, "Null param"); d_assert(mme_ue, return CORE_ERROR, "Null param"); subscription_data = &mme_ue->subscription_data; d_assert(subscription_data, return CORE_ERROR, "Null param"); memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_initiatingMessage; pdu.choice.initiatingMessage = core_calloc(1, sizeof(S1AP_InitiatingMessage_t)); initiatingMessage = pdu.choice.initiatingMessage; initiatingMessage->procedureCode = S1AP_ProcedureCode_id_HandoverResourceAllocation; initiatingMessage->criticality = S1AP_Criticality_reject; initiatingMessage->value.present = S1AP_InitiatingMessage__value_PR_HandoverRequest; HandoverRequest = &initiatingMessage->value.choice.HandoverRequest; ie = core_calloc(1, sizeof(S1AP_HandoverRequestIEs_t)); ASN_SEQUENCE_ADD(&HandoverRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_HandoverRequestIEs__value_PR_MME_UE_S1AP_ID; MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_HandoverRequestIEs_t)); ASN_SEQUENCE_ADD(&HandoverRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_HandoverType; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_HandoverRequestIEs__value_PR_HandoverType; HandoverType = &ie->value.choice.HandoverType; ie = core_calloc(1, sizeof(S1AP_HandoverRequestIEs_t)); ASN_SEQUENCE_ADD(&HandoverRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_Cause; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_HandoverRequestIEs__value_PR_Cause; Cause = &ie->value.choice.Cause; ie = core_calloc(1, sizeof(S1AP_HandoverRequestIEs_t)); ASN_SEQUENCE_ADD(&HandoverRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_uEaggregateMaximumBitrate; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_HandoverRequestIEs__value_PR_UEAggregateMaximumBitrate; UEAggregateMaximumBitrate = &ie->value.choice.UEAggregateMaximumBitrate; ie = core_calloc(1, sizeof(S1AP_HandoverRequestIEs_t)); ASN_SEQUENCE_ADD(&HandoverRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_E_RABToBeSetupListHOReq; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_HandoverRequestIEs__value_PR_E_RABToBeSetupListHOReq; E_RABToBeSetupListHOReq = &ie->value.choice.E_RABToBeSetupListHOReq; ie = core_calloc(1, sizeof(S1AP_HandoverRequestIEs_t)); ASN_SEQUENCE_ADD(&HandoverRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_Source_ToTarget_TransparentContainer; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_HandoverRequestIEs__value_PR_Source_ToTarget_TransparentContainer; Source_ToTarget_TransparentContainer = &ie->value.choice.Source_ToTarget_TransparentContainer; ie = core_calloc(1, sizeof(S1AP_HandoverRequestIEs_t)); ASN_SEQUENCE_ADD(&HandoverRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_UESecurityCapabilities; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_HandoverRequestIEs__value_PR_UESecurityCapabilities; UESecurityCapabilities = &ie->value.choice.UESecurityCapabilities; ie = core_calloc(1, sizeof(S1AP_HandoverRequestIEs_t)); ASN_SEQUENCE_ADD(&HandoverRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_SecurityContext; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_HandoverRequestIEs__value_PR_SecurityContext; SecurityContext = &ie->value.choice.SecurityContext; *MME_UE_S1AP_ID = target_ue->mme_ue_s1ap_id; *HandoverType = *handovertype; Cause->present = cause->present; Cause->choice.radioNetwork = cause->choice.radioNetwork; asn_uint642INTEGER( &UEAggregateMaximumBitrate->uEaggregateMaximumBitRateUL, subscription_data->ambr.uplink); asn_uint642INTEGER( &UEAggregateMaximumBitrate->uEaggregateMaximumBitRateDL, subscription_data->ambr.downlink); sess = mme_sess_first(mme_ue); while(sess) { bearer = mme_bearer_first(sess); while(bearer) { S1AP_E_RABToBeSetupItemHOReqIEs_t *item = NULL; S1AP_E_RABToBeSetupItemHOReq_t *e_rab = NULL; S1AP_GBR_QosInformation_t *gbrQosInformation = NULL; item = core_calloc(1, sizeof(S1AP_E_RABToBeSetupItemHOReqIEs_t)); ASN_SEQUENCE_ADD(&E_RABToBeSetupListHOReq->list, item); item->id = S1AP_ProtocolIE_ID_id_E_RABToBeSetupItemHOReq; item->criticality = S1AP_Criticality_reject; item->value.present = S1AP_E_RABToBeSetupItemHOReqIEs__value_PR_E_RABToBeSetupItemHOReq; e_rab = &item->value.choice.E_RABToBeSetupItemHOReq; e_rab->e_RAB_ID = bearer->ebi; e_rab->e_RABlevelQosParameters.qCI = bearer->qos.qci; e_rab->e_RABlevelQosParameters.allocationRetentionPriority. priorityLevel = bearer->qos.arp.priority_level; e_rab->e_RABlevelQosParameters.allocationRetentionPriority. pre_emptionCapability = !(bearer->qos.arp.pre_emption_capability); e_rab->e_RABlevelQosParameters.allocationRetentionPriority. pre_emptionVulnerability = !(bearer->qos.arp.pre_emption_vulnerability); if (bearer->qos.mbr.downlink || bearer->qos.mbr.uplink || bearer->qos.gbr.downlink || bearer->qos.gbr.uplink) { if (bearer->qos.mbr.downlink == 0) bearer->qos.mbr.downlink = MAX_BIT_RATE; if (bearer->qos.mbr.uplink == 0) bearer->qos.mbr.uplink = MAX_BIT_RATE; if (bearer->qos.gbr.downlink == 0) bearer->qos.gbr.downlink = MAX_BIT_RATE; if (bearer->qos.gbr.uplink == 0) bearer->qos.gbr.uplink = MAX_BIT_RATE; gbrQosInformation = core_calloc(1, sizeof(struct S1AP_GBR_QosInformation)); asn_uint642INTEGER(&gbrQosInformation->e_RAB_MaximumBitrateDL, bearer->qos.mbr.downlink); asn_uint642INTEGER(&gbrQosInformation->e_RAB_MaximumBitrateUL, bearer->qos.mbr.uplink); asn_uint642INTEGER(&gbrQosInformation-> e_RAB_GuaranteedBitrateDL, bearer->qos.gbr.downlink); asn_uint642INTEGER(&gbrQosInformation-> e_RAB_GuaranteedBitrateUL, bearer->qos.gbr.uplink); e_rab->e_RABlevelQosParameters.gbrQosInformation = gbrQosInformation; } rv = s1ap_ip_to_BIT_STRING( &bearer->sgw_s1u_ip, &e_rab->transportLayerAddress); d_assert(rv == CORE_OK, return CORE_ERROR,); s1ap_uint32_to_OCTET_STRING(bearer->sgw_s1u_teid, &e_rab->gTP_TEID); d_trace(5, " SGW-S1U-TEID[%d]\n", bearer->sgw_s1u_teid); bearer = mme_bearer_next(bearer); } sess = mme_sess_next(sess); } s1ap_buffer_to_OCTET_STRING( source_totarget_transparentContainer->buf, source_totarget_transparentContainer->size, Source_ToTarget_TransparentContainer); UESecurityCapabilities->encryptionAlgorithms.size = 2; UESecurityCapabilities->encryptionAlgorithms.buf = core_calloc(UESecurityCapabilities->encryptionAlgorithms.size, sizeof(c_uint8_t)); UESecurityCapabilities->encryptionAlgorithms.bits_unused = 0; UESecurityCapabilities->encryptionAlgorithms.buf[0] = (mme_ue->ue_network_capability.eea << 1); UESecurityCapabilities->integrityProtectionAlgorithms.size = 2; UESecurityCapabilities->integrityProtectionAlgorithms.buf = core_calloc(UESecurityCapabilities-> integrityProtectionAlgorithms.size, sizeof(c_uint8_t)); UESecurityCapabilities->integrityProtectionAlgorithms.bits_unused = 0; UESecurityCapabilities->integrityProtectionAlgorithms.buf[0] = (mme_ue->ue_network_capability.eia << 1); SecurityContext->nextHopChainingCount = mme_ue->nhcc; SecurityContext->nextHopParameter.size = SHA256_DIGEST_SIZE; SecurityContext->nextHopParameter.buf = core_calloc(SecurityContext->nextHopParameter.size, sizeof(c_uint8_t)); SecurityContext->nextHopParameter.bits_unused = 0; memcpy(SecurityContext->nextHopParameter.buf, mme_ue->nh, SecurityContext->nextHopParameter.size); rv = s1ap_encode_pdu(s1apbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } status_t s1ap_build_handover_cancel_ack(pkbuf_t **s1apbuf, enb_ue_t *source_ue) { status_t rv; S1AP_S1AP_PDU_t pdu; S1AP_SuccessfulOutcome_t *successfulOutcome = NULL; S1AP_HandoverCancelAcknowledge_t *HandoverCancelAcknowledge = NULL; S1AP_HandoverCancelAcknowledgeIEs_t *ie = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; d_assert(source_ue, return CORE_ERROR, "Null param"); d_trace(3, "[MME] Handover cancel acknowledge\n"); memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_successfulOutcome; pdu.choice.successfulOutcome = core_calloc(1, sizeof(S1AP_SuccessfulOutcome_t)); successfulOutcome = pdu.choice.successfulOutcome; successfulOutcome->procedureCode = S1AP_ProcedureCode_id_HandoverCancel; successfulOutcome->criticality = S1AP_Criticality_reject; successfulOutcome->value.present = S1AP_SuccessfulOutcome__value_PR_HandoverCancelAcknowledge; HandoverCancelAcknowledge = &successfulOutcome->value.choice.HandoverCancelAcknowledge; ie = core_calloc(1, sizeof(S1AP_HandoverCancelAcknowledgeIEs_t)); ASN_SEQUENCE_ADD(&HandoverCancelAcknowledge->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_HandoverCancelAcknowledgeIEs__value_PR_MME_UE_S1AP_ID; MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_HandoverCancelAcknowledgeIEs_t)); ASN_SEQUENCE_ADD(&HandoverCancelAcknowledge->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_HandoverCancelAcknowledgeIEs__value_PR_ENB_UE_S1AP_ID; ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; *MME_UE_S1AP_ID = source_ue->mme_ue_s1ap_id; *ENB_UE_S1AP_ID = source_ue->enb_ue_s1ap_id; d_trace(5, " Source : ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", source_ue->enb_ue_s1ap_id, source_ue->mme_ue_s1ap_id); rv = s1ap_encode_pdu(s1apbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } status_t s1ap_build_mme_status_transfer(pkbuf_t **s1apbuf, enb_ue_t *target_ue, S1AP_ENB_StatusTransfer_TransparentContainer_t *enb_statustransfer_transparentContainer) { status_t rv; S1AP_S1AP_PDU_t pdu; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_MMEStatusTransfer_t *MMEStatusTransfer = NULL; S1AP_MMEStatusTransferIEs_t *ie = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_ENB_StatusTransfer_TransparentContainer_t *ENB_StatusTransfer_TransparentContainer = NULL; d_assert(target_ue, return CORE_ERROR,); d_assert(enb_statustransfer_transparentContainer, return CORE_ERROR,); d_trace(3, "[MME] MME status transfer\n"); memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_initiatingMessage; pdu.choice.initiatingMessage = core_calloc(1, sizeof(S1AP_InitiatingMessage_t)); initiatingMessage = pdu.choice.initiatingMessage; initiatingMessage->procedureCode = S1AP_ProcedureCode_id_MMEStatusTransfer; initiatingMessage->criticality = S1AP_Criticality_ignore; initiatingMessage->value.present = S1AP_InitiatingMessage__value_PR_MMEStatusTransfer; MMEStatusTransfer = &initiatingMessage->value.choice.MMEStatusTransfer; ie = core_calloc(1, sizeof(S1AP_MMEStatusTransferIEs_t)); ASN_SEQUENCE_ADD(&MMEStatusTransfer->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_MMEStatusTransferIEs__value_PR_MME_UE_S1AP_ID; MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_MMEStatusTransferIEs_t)); ASN_SEQUENCE_ADD(&MMEStatusTransfer->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_MMEStatusTransferIEs__value_PR_ENB_UE_S1AP_ID; ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_MMEStatusTransferIEs_t)); ASN_SEQUENCE_ADD(&MMEStatusTransfer->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_eNB_StatusTransfer_TransparentContainer; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_MMEStatusTransferIEs__value_PR_ENB_StatusTransfer_TransparentContainer; ENB_StatusTransfer_TransparentContainer = &ie->value.choice.ENB_StatusTransfer_TransparentContainer; *MME_UE_S1AP_ID = target_ue->mme_ue_s1ap_id; *ENB_UE_S1AP_ID = target_ue->enb_ue_s1ap_id; d_trace(5, " Target : ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", target_ue->enb_ue_s1ap_id, target_ue->mme_ue_s1ap_id); rv = s1ap_copy_ie( &asn_DEF_S1AP_ENB_StatusTransfer_TransparentContainer, enb_statustransfer_transparentContainer, ENB_StatusTransfer_TransparentContainer); d_assert(rv == CORE_OK, return CORE_ERROR,); rv = s1ap_encode_pdu(s1apbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } status_t s1ap_build_error_indication( pkbuf_t **s1apbuf, S1AP_MME_UE_S1AP_ID_t *mme_ue_s1ap_id, S1AP_ENB_UE_S1AP_ID_t *enb_ue_s1ap_id, S1AP_Cause_PR group, long cause) { status_t rv; S1AP_S1AP_PDU_t pdu; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_ErrorIndication_t *ErrorIndication = NULL; S1AP_ErrorIndicationIEs_t *ie = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_Cause_t *Cause = NULL; d_trace(3, "[MME] Error Indication\n"); memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_initiatingMessage; pdu.choice.initiatingMessage = core_calloc(1, sizeof(S1AP_InitiatingMessage_t)); initiatingMessage = pdu.choice.initiatingMessage; initiatingMessage->procedureCode = S1AP_ProcedureCode_id_ErrorIndication; initiatingMessage->criticality = S1AP_Criticality_ignore; initiatingMessage->value.present = S1AP_InitiatingMessage__value_PR_ErrorIndication; ErrorIndication = &initiatingMessage->value.choice.ErrorIndication; if (mme_ue_s1ap_id) { ie = core_calloc(1, sizeof(S1AP_ErrorIndicationIEs_t)); ASN_SEQUENCE_ADD(&ErrorIndication->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_ErrorIndicationIEs__value_PR_MME_UE_S1AP_ID; MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; *MME_UE_S1AP_ID = *mme_ue_s1ap_id; d_trace(5, " MME_UE_S1AP_ID[%d]\n", mme_ue_s1ap_id); } if (enb_ue_s1ap_id) { ie = core_calloc(1, sizeof(S1AP_ErrorIndicationIEs_t)); ASN_SEQUENCE_ADD(&ErrorIndication->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_ErrorIndicationIEs__value_PR_ENB_UE_S1AP_ID; ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; *ENB_UE_S1AP_ID = *enb_ue_s1ap_id; d_trace(5, " ENB_UE_S1AP_ID[%d]\n", enb_ue_s1ap_id); } ie = core_calloc(1, sizeof(S1AP_ErrorIndicationIEs_t)); ASN_SEQUENCE_ADD(&ErrorIndication->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_Cause; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_ErrorIndicationIEs__value_PR_Cause; Cause = &ie->value.choice.Cause; Cause->present = group; Cause->choice.radioNetwork = cause; d_trace(5, " Group[%d] Cause[%d]\n", Cause->present, Cause->choice.radioNetwork); rv = s1ap_encode_pdu(s1apbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } status_t s1ap_build_s1_reset( pkbuf_t **s1apbuf, S1AP_Cause_PR group, long cause, S1AP_UE_associatedLogicalS1_ConnectionListRes_t *partOfS1_Interface) { status_t rv; S1AP_S1AP_PDU_t pdu; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_Reset_t *Reset = NULL; S1AP_ResetIEs_t *ie = NULL; S1AP_Cause_t *Cause = NULL; S1AP_ResetType_t *ResetType = NULL; d_trace(3, "[MME] Reset\n"); memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_initiatingMessage; pdu.choice.initiatingMessage = core_calloc(1, sizeof(S1AP_InitiatingMessage_t)); initiatingMessage = pdu.choice.initiatingMessage; initiatingMessage->procedureCode = S1AP_ProcedureCode_id_Reset; initiatingMessage->criticality = S1AP_Criticality_ignore; initiatingMessage->value.present = S1AP_InitiatingMessage__value_PR_Reset; Reset = &initiatingMessage->value.choice.Reset; ie = core_calloc(1, sizeof(S1AP_ResetIEs_t)); ASN_SEQUENCE_ADD(&Reset->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_Cause; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_ResetIEs__value_PR_Cause; Cause = &ie->value.choice.Cause; ie = core_calloc(1, sizeof(S1AP_ResetIEs_t)); ASN_SEQUENCE_ADD(&Reset->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_ResetType; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_ResetIEs__value_PR_ResetType; ResetType = &ie->value.choice.ResetType; Cause->present = group; Cause->choice.radioNetwork = cause; d_trace(5, " Group[%d] Cause[%d] partOfS1_Interface[%p]\n", Cause->present, Cause->choice.radioNetwork, partOfS1_Interface); if (partOfS1_Interface) { ResetType->present = S1AP_ResetType_PR_partOfS1_Interface; ResetType->choice.partOfS1_Interface = partOfS1_Interface; } else { ResetType->present = S1AP_ResetType_PR_s1_Interface; ResetType->choice.s1_Interface = S1AP_ResetAll_reset_all; } rv = s1ap_encode_pdu(s1apbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } status_t s1ap_build_s1_reset_partial( pkbuf_t **s1apbuf, S1AP_Cause_PR group, long cause, S1AP_MME_UE_S1AP_ID_t *mme_ue_s1ap_id, S1AP_ENB_UE_S1AP_ID_t *enb_ue_s1ap_id) { S1AP_UE_associatedLogicalS1_ConnectionListRes_t *partOfS1_Interface = NULL; S1AP_UE_associatedLogicalS1_ConnectionItemRes_t *ie2 = NULL; S1AP_UE_associatedLogicalS1_ConnectionItem_t *item = NULL; partOfS1_Interface = core_calloc(1, sizeof(S1AP_UE_associatedLogicalS1_ConnectionListRes_t)); d_assert(partOfS1_Interface, return CORE_ERROR,); ie2 = core_calloc(1, sizeof(S1AP_UE_associatedLogicalS1_ConnectionItemRes_t)); ASN_SEQUENCE_ADD(&partOfS1_Interface->list, ie2); ie2->id = S1AP_ProtocolIE_ID_id_UE_associatedLogicalS1_ConnectionItem; ie2->criticality = S1AP_Criticality_reject; ie2->value.present = S1AP_UE_associatedLogicalS1_ConnectionItemRes__value_PR_UE_associatedLogicalS1_ConnectionItem; item = &ie2->value.choice.UE_associatedLogicalS1_ConnectionItem; item->mME_UE_S1AP_ID = mme_ue_s1ap_id; item->eNB_UE_S1AP_ID = enb_ue_s1ap_id; return s1ap_build_s1_reset(s1apbuf, group, cause, partOfS1_Interface); } status_t s1ap_build_s1_reset_ack( pkbuf_t **s1apbuf, S1AP_UE_associatedLogicalS1_ConnectionListRes_t *partOfS1_Interface) { status_t rv; S1AP_S1AP_PDU_t pdu; S1AP_SuccessfulOutcome_t *successfulOutcome = NULL; S1AP_ResetAcknowledge_t *ResetAcknowledge = NULL; S1AP_ResetAcknowledgeIEs_t *ie = NULL; d_trace(3, "[MME] ResetAcknowledge\n"); memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_successfulOutcome; pdu.choice.successfulOutcome = core_calloc(1, sizeof(S1AP_SuccessfulOutcome_t)); successfulOutcome = pdu.choice.successfulOutcome; successfulOutcome->procedureCode = S1AP_ProcedureCode_id_Reset; successfulOutcome->criticality = S1AP_Criticality_reject; successfulOutcome->value.present = S1AP_SuccessfulOutcome__value_PR_ResetAcknowledge; ResetAcknowledge = &successfulOutcome->value.choice.ResetAcknowledge; if (partOfS1_Interface && partOfS1_Interface->list.count) { int i = 0; S1AP_UE_associatedLogicalS1_ConnectionListResAck_t *list = NULL; ie = core_calloc(1, sizeof(S1AP_ResetAcknowledgeIEs_t)); ASN_SEQUENCE_ADD(&ResetAcknowledge->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_UE_associatedLogicalS1_ConnectionListResAck; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_ResetAcknowledgeIEs__value_PR_UE_associatedLogicalS1_ConnectionListResAck; list = &ie->value.choice.UE_associatedLogicalS1_ConnectionListResAck; for (i = 0; i < partOfS1_Interface->list.count; i++) { S1AP_UE_associatedLogicalS1_ConnectionItemRes_t *ie1 = NULL; S1AP_UE_associatedLogicalS1_ConnectionItem_t *item1 = NULL; S1AP_UE_associatedLogicalS1_ConnectionItemResAck_t *ie2 = NULL; S1AP_UE_associatedLogicalS1_ConnectionItem_t *item2 = NULL; ie1 = (S1AP_UE_associatedLogicalS1_ConnectionItemRes_t *) partOfS1_Interface->list.array[i]; d_assert(ie1, return CORE_ERROR,); item1 = &ie1->value.choice.UE_associatedLogicalS1_ConnectionItem; d_assert(item1, return CORE_ERROR,); if (item1->mME_UE_S1AP_ID == NULL && item1->eNB_UE_S1AP_ID == NULL) { d_warn("No MME_UE_S1AP_ID & ENB_UE_S1AP_ID"); continue; } ie2 = core_calloc(1, sizeof(S1AP_UE_associatedLogicalS1_ConnectionItemResAck_t)); d_assert(ie2, return CORE_ERROR,); ASN_SEQUENCE_ADD(&list->list, ie2); ie2->id = S1AP_ProtocolIE_ID_id_UE_associatedLogicalS1_ConnectionItem; ie2->criticality = S1AP_Criticality_ignore; ie2->value.present = S1AP_UE_associatedLogicalS1_ConnectionItemResAck__value_PR_UE_associatedLogicalS1_ConnectionItem; item2 = &ie2->value.choice.UE_associatedLogicalS1_ConnectionItem; d_assert(item2, return CORE_ERROR,); if (item1->mME_UE_S1AP_ID) { item2->mME_UE_S1AP_ID = core_calloc(1, sizeof(S1AP_MME_UE_S1AP_ID_t)); d_assert(item2->mME_UE_S1AP_ID, return CORE_ERROR,); *item2->mME_UE_S1AP_ID = *item1->mME_UE_S1AP_ID; } if (item1->eNB_UE_S1AP_ID) { item2->eNB_UE_S1AP_ID = core_calloc(1, sizeof(S1AP_ENB_UE_S1AP_ID_t)); d_assert(item2->eNB_UE_S1AP_ID, return CORE_ERROR,); *item2->eNB_UE_S1AP_ID = *item1->eNB_UE_S1AP_ID; } d_trace(5, " MME_UE_S1AP_ID[%d] ENB_UE_S1AP_ID[%d]\n", item2->mME_UE_S1AP_ID ? *item2->mME_UE_S1AP_ID : -1, item2->eNB_UE_S1AP_ID ? *item2->eNB_UE_S1AP_ID : -1); } } rv = s1ap_encode_pdu(s1apbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } nextepc-0.3.10/src/mme/s1ap_build.h000066400000000000000000000065431333553357400170250ustar00rootroot00000000000000#ifndef __S1AP_BUILD_H__ #define __S1AP_BUILD_H__ #include "s1ap/s1ap_message.h" #include "mme_context.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(status_t) s1ap_build_setup_rsp(pkbuf_t **pkbuf); CORE_DECLARE(status_t) s1ap_build_setup_failure( pkbuf_t **pkbuf, S1AP_Cause_PR group, long cause, long time_to_wait); CORE_DECLARE(status_t) s1ap_build_downlink_nas_transport( pkbuf_t **s1apbuf, enb_ue_t *enb_ue, pkbuf_t *emmbuf); CORE_DECLARE(status_t) s1ap_build_initial_context_setup_request( pkbuf_t **s1apbuf, mme_ue_t *mme_ue, pkbuf_t *emmbuf); CORE_DECLARE(status_t) s1ap_build_e_rab_setup_request( pkbuf_t **s1apbuf, mme_bearer_t *bearer, pkbuf_t *esmbuf); CORE_DECLARE(status_t) s1ap_build_e_rab_modify_request( pkbuf_t **s1apbuf, mme_bearer_t *bearer, pkbuf_t *esmbuf); CORE_DECLARE(status_t) s1ap_build_e_rab_release_command(pkbuf_t **s1apbuf, mme_bearer_t *bearer, pkbuf_t *esmbuf, S1AP_Cause_PR group, long cause); CORE_DECLARE(status_t) s1ap_build_ue_context_release_command( pkbuf_t **s1apbuf, enb_ue_t *enb_ue, S1AP_Cause_PR group, long cause); CORE_DECLARE(status_t) s1ap_build_paging(pkbuf_t **s1apbuf, mme_ue_t *mme_ue); CORE_DECLARE(status_t) s1ap_build_mme_configuration_transfer( pkbuf_t **s1apbuf, S1AP_SONConfigurationTransfer_t *son_configuration_transfer); CORE_DECLARE(status_t) s1ap_build_path_switch_ack( pkbuf_t **s1apbuf, mme_ue_t *mme_ue); CORE_DECLARE(status_t) s1ap_build_path_switch_failure(pkbuf_t **s1apbuf, c_uint32_t enb_ue_s1ap_id, c_uint32_t mme_ue_s1ap_id, S1AP_Cause_PR group, long cause); CORE_DECLARE(status_t) s1ap_build_handover_command( pkbuf_t **s1apbuf, enb_ue_t *source_ue); CORE_DECLARE(status_t) s1ap_build_handover_preparation_failure( pkbuf_t **s1apbuf, enb_ue_t *source_ue, S1AP_Cause_t *cause); CORE_DECLARE(status_t) s1ap_build_handover_request( pkbuf_t **s1apbuf, mme_ue_t *mme_ue, enb_ue_t *target_ue, S1AP_ENB_UE_S1AP_ID_t *enb_ue_s1ap_id, S1AP_MME_UE_S1AP_ID_t *mme_ue_s1ap_id, S1AP_HandoverType_t *handovertype, S1AP_Cause_t *cause, S1AP_Source_ToTarget_TransparentContainer_t *source_totarget_transparentContainer); CORE_DECLARE(status_t) s1ap_build_handover_cancel_ack( pkbuf_t **s1apbuf, enb_ue_t *source_ue); CORE_DECLARE(status_t) s1ap_build_mme_status_transfer(pkbuf_t **s1apbuf, enb_ue_t *target_ue, S1AP_ENB_StatusTransfer_TransparentContainer_t *enb_statustransfer_transparentContainer); CORE_DECLARE(status_t) s1ap_build_error_indication( pkbuf_t **s1apbuf, S1AP_MME_UE_S1AP_ID_t *mme_ue_s1ap_id, S1AP_ENB_UE_S1AP_ID_t *enb_ue_s1ap_id, S1AP_Cause_PR group, long cause); CORE_DECLARE(status_t) s1ap_build_s1_reset( pkbuf_t **s1apbuf, S1AP_Cause_PR group, long cause, S1AP_UE_associatedLogicalS1_ConnectionListRes_t *partOfS1_Interface); CORE_DECLARE(status_t) s1ap_build_s1_reset_partial( pkbuf_t **s1apbuf, S1AP_Cause_PR group, long cause, S1AP_MME_UE_S1AP_ID_t *mme_ue_s1ap_id, S1AP_ENB_UE_S1AP_ID_t *enb_ue_s1ap_id); CORE_DECLARE(status_t) s1ap_build_s1_reset_ack( pkbuf_t **s1apbuf, S1AP_UE_associatedLogicalS1_ConnectionListRes_t *partOfS1_Interface); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __S1AP_BUILD_H__ */ nextepc-0.3.10/src/mme/s1ap_conv.c000066400000000000000000000142041333553357400166570ustar00rootroot00000000000000#define TRACE_MODULE _s1ap_conv #include "core_debug.h" #include "core_network.h" #include "3gpp_types.h" #include "s1ap_conv.h" void s1ap_uint8_to_OCTET_STRING(c_uint8_t uint8, OCTET_STRING_t *octet_string) { octet_string->size = 1; octet_string->buf = core_calloc(octet_string->size, sizeof(c_uint8_t)); octet_string->buf[0] = uint8; } void s1ap_uint16_to_OCTET_STRING(c_uint16_t uint16, OCTET_STRING_t *octet_string) { octet_string->size = 2; octet_string->buf = core_calloc(octet_string->size, sizeof(c_uint8_t)); octet_string->buf[0] = uint16 >> 8; octet_string->buf[1] = uint16; } void s1ap_uint32_to_OCTET_STRING(c_uint32_t uint32, OCTET_STRING_t *octet_string) { octet_string->size = 4; octet_string->buf = core_calloc(octet_string->size, sizeof(c_uint8_t)); octet_string->buf[0] = uint32 >> 24; octet_string->buf[1] = uint32 >> 16; octet_string->buf[2] = uint32 >> 8; octet_string->buf[3] = uint32; } void s1ap_buffer_to_OCTET_STRING( void *buf, int size, S1AP_TBCD_STRING_t *tbcd_string) { tbcd_string->size = size; tbcd_string->buf = core_calloc(tbcd_string->size, sizeof(c_uint8_t)); memcpy(tbcd_string->buf, buf, size); } void s1ap_uint32_to_ENB_ID( S1AP_ENB_ID_PR present, c_uint32_t enb_id, S1AP_ENB_ID_t *eNB_ID) { d_assert(eNB_ID, return, "Null param"); eNB_ID->present = present; if (present == S1AP_ENB_ID_PR_macroENB_ID) { BIT_STRING_t *bit_string = &eNB_ID->choice.macroENB_ID; d_assert(bit_string, return, "Null param"); bit_string->size = 3; bit_string->buf = core_calloc(bit_string->size, sizeof(c_uint8_t)); bit_string->buf[0] = enb_id >> 12; bit_string->buf[1] = enb_id >> 4; bit_string->buf[2] = (enb_id & 0xf) << 4; bit_string->bits_unused = 4; } else if (present == S1AP_ENB_ID_PR_homeENB_ID) { BIT_STRING_t *bit_string = &eNB_ID->choice.homeENB_ID; d_assert(bit_string, return, "Null param"); bit_string->size = 4; bit_string->buf = core_calloc(bit_string->size, sizeof(c_uint8_t)); bit_string->buf[0] = enb_id >> 20; bit_string->buf[1] = enb_id >> 12; bit_string->buf[2] = enb_id >> 4; bit_string->buf[3] = (enb_id & 0xf) << 4; bit_string->bits_unused = 4; } else { d_assert(0, return, "Invalid param"); } } void s1ap_ENB_ID_to_uint32(S1AP_ENB_ID_t *eNB_ID, c_uint32_t *uint32) { d_assert(uint32, return, "Null param"); d_assert(eNB_ID, return, "Null param"); if (eNB_ID->present == S1AP_ENB_ID_PR_homeENB_ID) { c_uint8_t *buf = eNB_ID->choice.homeENB_ID.buf; d_assert(buf, return, "Null param"); *uint32 = (buf[0] << 20) + (buf[1] << 12) + (buf[2] << 4) + ((buf[3] & 0xf0) >> 4); } else if (eNB_ID->present == S1AP_ENB_ID_PR_macroENB_ID) { c_uint8_t *buf = eNB_ID->choice.macroENB_ID.buf; d_assert(buf, return, "Null param"); *uint32 = (buf[0] << 12) + (buf[1] << 4) + ((buf[2] & 0xf0) >> 4); } else { d_assert(0, return, "Invalid param"); } } status_t s1ap_BIT_STRING_to_ip(BIT_STRING_t *bit_string, ip_t *ip) { char buf[CORE_ADDRSTRLEN], buf2[CORE_ADDRSTRLEN]; d_assert(bit_string, return CORE_ERROR,); d_assert(ip, return CORE_ERROR,); if (bit_string->size == IPV4V6_LEN) { ip->ipv4 = 1; ip->ipv6 = 1; memcpy(&ip->both.addr, bit_string->buf, IPV4_LEN); memcpy(&ip->both.addr6, bit_string->buf+IPV4_LEN, IPV6_LEN); d_trace(5, " IPv4[%s] IPv6[%s]\n", INET_NTOP(&ip->both.addr, buf), INET6_NTOP(&ip->both.addr6, buf2)); } else if (bit_string->size == IPV4_LEN) { ip->ipv4 = 1; memcpy(&ip->addr, bit_string->buf, IPV4_LEN); d_trace(5, " IPv4[%s]\n", INET_NTOP(&ip->addr, buf)); } else if (bit_string->size == IPV6_LEN) { ip->ipv6 = 1; memcpy(&ip->addr6, bit_string->buf, IPV6_LEN); d_trace(5, " IPv6[%s]\n", INET_NTOP(&ip->addr6, buf)); } else d_assert(0, return CORE_ERROR, "Invalid Length(%d)", bit_string->size); ip->len = bit_string->size; return CORE_OK; } status_t s1ap_ip_to_BIT_STRING(ip_t *ip, BIT_STRING_t *bit_string) { char buf[CORE_ADDRSTRLEN], buf2[CORE_ADDRSTRLEN]; d_assert(ip, return CORE_ERROR,); d_assert(bit_string, return CORE_ERROR,); if (ip->ipv4 && ip->ipv6) { bit_string->size = IPV4V6_LEN; bit_string->buf = core_calloc(bit_string->size, sizeof(c_uint8_t)); memcpy(bit_string->buf, &ip->both.addr, IPV4_LEN); memcpy(bit_string->buf+IPV4_LEN, &ip->both.addr6, IPV6_LEN); d_trace(5, " IPv4[%s] IPv6[%s]\n", INET_NTOP(&ip->both.addr, buf), INET6_NTOP(&ip->both.addr6, buf2)); } else if (ip->ipv4) { bit_string->size = IPV4_LEN; bit_string->buf = core_calloc(bit_string->size, sizeof(c_uint8_t)); memcpy(bit_string->buf, &ip->addr, IPV4_LEN); d_trace(5, " IPv4[%s]\n", INET_NTOP(&ip->addr, buf)); } else if (ip->ipv6) { bit_string->size = IPV6_LEN; bit_string->buf = core_calloc(bit_string->size, sizeof(c_uint8_t)); memcpy(bit_string->buf, &ip->addr6, IPV6_LEN); d_trace(5, " IPv6[%s]\n", INET_NTOP(&ip->addr6, buf)); } else d_assert(0, return CORE_ERROR,); return CORE_OK; } status_t s1ap_copy_ie(const asn_TYPE_descriptor_t *td, void *src, void *dst) { asn_enc_rval_t enc_ret = {0}; asn_dec_rval_t dec_ret = {0}; c_uint8_t buffer[MAX_SDU_LEN]; d_assert(td, return CORE_ERROR,); d_assert(src, return CORE_ERROR,); d_assert(dst, return CORE_ERROR,); enc_ret = aper_encode_to_buffer(td, NULL, src, buffer, MAX_SDU_LEN); if (enc_ret.encoded < 0) { d_error("aper_encode_to_buffer() failed[%d]", enc_ret.encoded); return CORE_ERROR; } dec_ret = aper_decode(NULL, td, (void **)&dst, buffer, (enc_ret.encoded >> 3), 0, 0); if (dec_ret.code != RC_OK) { d_error("aper_decode() failed[%d]", dec_ret.code); return CORE_ERROR; } return CORE_OK; } nextepc-0.3.10/src/mme/s1ap_conv.h000066400000000000000000000021651333553357400166670ustar00rootroot00000000000000#ifndef __S1AP_CONV_H__ #define __S1AP_CONV_H__ #include "s1ap/s1ap_message.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(void) s1ap_uint8_to_OCTET_STRING( c_uint8_t uint8, OCTET_STRING_t *octet_string); CORE_DECLARE(void) s1ap_uint16_to_OCTET_STRING( c_uint16_t uint16, OCTET_STRING_t *octet_string); CORE_DECLARE(void) s1ap_uint32_to_OCTET_STRING( c_uint32_t uint32, OCTET_STRING_t *octet_string); CORE_DECLARE(void) s1ap_buffer_to_OCTET_STRING( void *buf, int size, S1AP_TBCD_STRING_t *tbcd_string); CORE_DECLARE(void) s1ap_uint32_to_ENB_ID( S1AP_ENB_ID_PR present, c_uint32_t enb_id, S1AP_ENB_ID_t *eNB_ID); CORE_DECLARE(void) s1ap_ENB_ID_to_uint32( S1AP_ENB_ID_t *eNB_ID, c_uint32_t *uint32); CORE_DECLARE(status_t) s1ap_BIT_STRING_to_ip( BIT_STRING_t *bit_string, ip_t *ip); CORE_DECLARE(status_t) s1ap_ip_to_BIT_STRING( ip_t *ip, BIT_STRING_t *bit_string); CORE_DECLARE(status_t) s1ap_copy_ie( const asn_TYPE_descriptor_t *td, void *src, void *dst); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __S1AP_CONV_H__ */ nextepc-0.3.10/src/mme/s1ap_handler.c000066400000000000000000002171671333553357400173440ustar00rootroot00000000000000#define TRACE_MODULE _s1ap_handler #include "core_debug.h" #include "mme_event.h" #include "mme_kdf.h" #include "s1ap_conv.h" #include "s1ap_path.h" #include "nas_path.h" #include "mme_gtp_path.h" #include "mme_s11_build.h" #include "s1ap_build.h" #include "s1ap_handler.h" #include "mme_path.h" #include "mme_sm.h" void s1ap_handle_s1_setup_request(mme_enb_t *enb, s1ap_message_t *message) { char buf[CORE_ADDRSTRLEN]; int i, j; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_S1SetupRequest_t *S1SetupRequest = NULL; S1AP_S1SetupRequestIEs_t *ie = NULL; S1AP_Global_ENB_ID_t *Global_ENB_ID = NULL; S1AP_SupportedTAs_t *SupportedTAs = NULL; S1AP_PagingDRX_t *PagingDRX = NULL; pkbuf_t *s1apbuf = NULL; c_uint32_t enb_id; S1AP_Cause_PR group = S1AP_Cause_PR_NOTHING; long cause = 0; d_assert(enb, return,); d_assert(enb->sock, return,); d_assert(message, return,); initiatingMessage = message->choice.initiatingMessage; d_assert(initiatingMessage, return,); S1SetupRequest = &initiatingMessage->value.choice.S1SetupRequest; d_assert(S1SetupRequest, return,); d_trace(3, "[MME] S1-Setup request\n"); for (i = 0; i < S1SetupRequest->protocolIEs.list.count; i++) { ie = S1SetupRequest->protocolIEs.list.array[i]; switch(ie->id) { case S1AP_ProtocolIE_ID_id_Global_ENB_ID: Global_ENB_ID = &ie->value.choice.Global_ENB_ID; break; case S1AP_ProtocolIE_ID_id_SupportedTAs: SupportedTAs = &ie->value.choice.SupportedTAs; break; case S1AP_ProtocolIE_ID_id_DefaultPagingDRX: PagingDRX = &ie->value.choice.PagingDRX; break; default: break; } } d_assert(Global_ENB_ID, return,); s1ap_ENB_ID_to_uint32(&Global_ENB_ID->eNB_ID, &enb_id); d_trace(5, " IP[%s] ENB_ID[%d]\n", CORE_ADDR(enb->addr, buf), enb_id); if (PagingDRX) d_trace(5, " PagingDRX[%ld]\n", *PagingDRX); mme_enb_set_enb_id(enb, enb_id); d_assert(SupportedTAs, return,); /* Parse Supported TA */ enb->num_of_supported_ta_list = 0; for (i = 0; i < SupportedTAs->list.count; i++) { S1AP_SupportedTAs_Item_t *SupportedTAs_Item = NULL; S1AP_TAC_t *tAC = NULL; SupportedTAs_Item = (S1AP_SupportedTAs_Item_t *)SupportedTAs->list.array[i]; d_assert(SupportedTAs_Item, return,); tAC = &SupportedTAs_Item->tAC; d_assert(tAC, return,); for (j = 0; j < SupportedTAs_Item->broadcastPLMNs.list.count; j++) { S1AP_PLMNidentity_t *pLMNidentity = NULL; pLMNidentity = (S1AP_PLMNidentity_t *) SupportedTAs_Item->broadcastPLMNs.list.array[j]; d_assert(pLMNidentity, return,); memcpy(&enb->supported_ta_list[enb->num_of_supported_ta_list].tac, tAC->buf, sizeof(c_uint16_t)); enb->supported_ta_list[enb->num_of_supported_ta_list].tac = ntohs(enb->supported_ta_list [enb->num_of_supported_ta_list].tac); memcpy(&enb->supported_ta_list [enb->num_of_supported_ta_list].plmn_id, pLMNidentity->buf, sizeof(plmn_id_t)); d_trace(5, " PLMN_ID[MCC:%d MNC:%d] TAC[%d]\n", plmn_id_mcc(&enb->supported_ta_list [enb->num_of_supported_ta_list].plmn_id), plmn_id_mnc(&enb->supported_ta_list [enb->num_of_supported_ta_list].plmn_id), enb->supported_ta_list[enb->num_of_supported_ta_list].tac); enb->num_of_supported_ta_list++; } } if (enb->num_of_supported_ta_list == 0) { d_warn("S1-Setup failure:"); d_warn(" No supported TA exist in S1-Setup request"); group = S1AP_Cause_PR_misc; cause = S1AP_CauseMisc_unspecified; } else { int served_tai_index = -1; for (i = 0; i < enb->num_of_supported_ta_list; i++) { served_tai_index = mme_find_served_tai(&enb->supported_ta_list[i]); if (served_tai_index >= 0 && served_tai_index < MAX_NUM_OF_SERVED_TAI) { d_trace(5, " SERVED_TAI_INDEX[%d]\n", served_tai_index); break; } } if (served_tai_index < 0) { d_warn("S1-Setup failure:"); d_warn(" Cannot find Served TAI. Check 'mme.tai' configuration"); group = S1AP_Cause_PR_misc; cause = S1AP_CauseMisc_unknown_PLMN; } } if (group == S1AP_Cause_PR_NOTHING) { d_trace(3, "[MME] S1-Setup response\n"); d_assert(s1ap_build_setup_rsp(&s1apbuf) == CORE_OK, return, "s1ap_build_setup_rsp() failed"); } else { d_trace(3, "[MME] S1-Setup failure\n"); d_assert(s1ap_build_setup_failure( &s1apbuf, group, cause, S1AP_TimeToWait_v10s) == CORE_OK, return, "s1ap_build_setup_failure() failed"); } d_assert(s1ap_send_to_enb(enb, s1apbuf, S1AP_NON_UE_SIGNALLING) == CORE_OK,, "s1ap_send_to_enb() failed"); } void s1ap_handle_initial_ue_message(mme_enb_t *enb, s1ap_message_t *message) { status_t rv; int i; char buf[CORE_ADDRSTRLEN]; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_InitialUEMessage_t *InitialUEMessage = NULL; S1AP_InitialUEMessage_IEs_t *ie = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_NAS_PDU_t *NAS_PDU = NULL; S1AP_TAI_t *TAI = NULL; S1AP_EUTRAN_CGI_t *EUTRAN_CGI = NULL; S1AP_S_TMSI_t *S_TMSI = NULL; S1AP_PLMNidentity_t *pLMNidentity = NULL; S1AP_TAC_t *tAC = NULL; S1AP_CellIdentity_t *cell_ID = NULL; enb_ue_t *enb_ue = NULL; d_assert(enb, return,); d_assert(enb->sock, return,); d_assert(message, return,); initiatingMessage = message->choice.initiatingMessage; d_assert(initiatingMessage, return,); InitialUEMessage = &initiatingMessage->value.choice.InitialUEMessage; d_assert(InitialUEMessage, return,); d_trace(3, "[MME] Initial UE Message\n"); for (i = 0; i < InitialUEMessage->protocolIEs.list.count; i++) { ie = InitialUEMessage->protocolIEs.list.array[i]; switch(ie->id) { case S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID: ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; break; case S1AP_ProtocolIE_ID_id_NAS_PDU: NAS_PDU = &ie->value.choice.NAS_PDU; break; case S1AP_ProtocolIE_ID_id_TAI: TAI = &ie->value.choice.TAI; break; case S1AP_ProtocolIE_ID_id_EUTRAN_CGI: EUTRAN_CGI = &ie->value.choice.EUTRAN_CGI; break; case S1AP_ProtocolIE_ID_id_S_TMSI: S_TMSI = &ie->value.choice.S_TMSI; break; default: break; } } d_trace(5, " IP[%s] ENB_ID[%d]\n", CORE_ADDR(enb->addr, buf), enb->enb_id); d_assert(ENB_UE_S1AP_ID, return,); enb_ue = enb_ue_find_by_enb_ue_s1ap_id(enb, *ENB_UE_S1AP_ID); if (!enb_ue) { enb_ue = enb_ue_add(enb); d_assert(enb_ue, return, "Null param"); enb_ue->enb_ue_s1ap_id = *ENB_UE_S1AP_ID; /* Find MME_UE if S_TMSI included */ if (S_TMSI) { served_gummei_t *served_gummei = &mme_self()->served_gummei[0]; guti_t guti; mme_ue_t *mme_ue = NULL; memset(&guti, 0, sizeof(guti_t)); /* Use the first configured plmn_id and mme group id */ memcpy(&guti.plmn_id, &served_gummei->plmn_id[0], PLMN_ID_LEN); guti.mme_gid = served_gummei->mme_gid[0]; /* size must be 1 */ memcpy(&guti.mme_code, S_TMSI->mMEC.buf, S_TMSI->mMEC.size); /* size must be 4 */ memcpy(&guti.m_tmsi, S_TMSI->m_TMSI.buf, S_TMSI->m_TMSI.size); guti.m_tmsi = ntohl(guti.m_tmsi); mme_ue = mme_ue_find_by_guti(&guti); if (!mme_ue) { d_warn("Unknown UE by S_TMSI[G:%d,C:%d,M_TMSI:0x%x]", guti.mme_gid, guti.mme_code, guti.m_tmsi); } else { d_trace(5, " S_TMSI[G:%d,C:%d,M_TMSI:0x%x] IMSI:[%s]\n", mme_ue->guti.mme_gid, mme_ue->guti.mme_code, mme_ue->guti.m_tmsi, MME_UE_HAVE_IMSI(mme_ue) ? mme_ue->imsi_bcd : "Unknown"); /* If NAS(mme_ue_t) has already been associated with * older S1(enb_ue_t) context */ if (ECM_CONNECTED(mme_ue)) { #if 1 /* IMPLICIT_S1_RELEASE */ /* Implcit S1 release */ d_trace(5, "Implicit S1 release\n"); d_trace(5, " ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", mme_ue->enb_ue->enb_ue_s1ap_id, mme_ue->enb_ue->mme_ue_s1ap_id); rv = enb_ue_remove(mme_ue->enb_ue); d_assert(rv == CORE_OK,,); #else /* S1_HOLDING_TIMER */ /* Previous S1(enb_ue_t) context the holding timer(30secs) * is started. * Newly associated S1(enb_ue_t) context holding timer * is stopped. */ d_trace(5, "Start S1 Holding Timer\n"); d_trace(5, " ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", mme_ue->enb_ue->enb_ue_s1ap_id, mme_ue->enb_ue->mme_ue_s1ap_id); /* De-associate S1 with NAS/EMM */ rv = enb_ue_deassociate(mme_ue->enb_ue); d_assert(rv == CORE_OK,,); tm_start(mme_ue->enb_ue->holding_timer); #endif } tm_stop(enb_ue->holding_timer); mme_ue_associate_enb_ue(mme_ue, enb_ue); } } } d_assert(TAI, return,); pLMNidentity = &TAI->pLMNidentity; d_assert(pLMNidentity && pLMNidentity->size == sizeof(plmn_id_t), return,); tAC = &TAI->tAC; d_assert(tAC && tAC->size == sizeof(c_uint16_t), return,); memcpy(&enb_ue->nas.tai.plmn_id, pLMNidentity->buf, sizeof(enb_ue->nas.tai.plmn_id)); memcpy(&enb_ue->nas.tai.tac, tAC->buf, sizeof(enb_ue->nas.tai.tac)); enb_ue->nas.tai.tac = ntohs(enb_ue->nas.tai.tac); d_assert(EUTRAN_CGI, return,); pLMNidentity = &EUTRAN_CGI->pLMNidentity; d_assert(pLMNidentity && pLMNidentity->size == sizeof(plmn_id_t), return,); cell_ID = &EUTRAN_CGI->cell_ID; d_assert(cell_ID, return,); memcpy(&enb_ue->nas.e_cgi.plmn_id, pLMNidentity->buf, sizeof(enb_ue->nas.e_cgi.plmn_id)); memcpy(&enb_ue->nas.e_cgi.cell_id, cell_ID->buf, sizeof(enb_ue->nas.e_cgi.cell_id)); enb_ue->nas.e_cgi.cell_id = (ntohl(enb_ue->nas.e_cgi.cell_id) >> 4); d_trace(5, " ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d] TAC[%d]\n", enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id, enb_ue->nas.tai.tac); d_assert(s1ap_send_to_nas(enb_ue, S1AP_ProcedureCode_id_initialUEMessage, NAS_PDU) == CORE_OK,, "s1ap_send_to_nas failed"); } void s1ap_handle_uplink_nas_transport( mme_enb_t *enb, s1ap_message_t *message) { char buf[CORE_ADDRSTRLEN]; int i; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_UplinkNASTransport_t *UplinkNASTransport = NULL; S1AP_UplinkNASTransport_IEs_t *ie = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_NAS_PDU_t *NAS_PDU = NULL; enb_ue_t *enb_ue = NULL; d_assert(enb, return,); d_assert(enb->sock, return,); d_assert(message, return,); initiatingMessage = message->choice.initiatingMessage; d_assert(initiatingMessage, return,); UplinkNASTransport = &initiatingMessage->value.choice.UplinkNASTransport; d_assert(UplinkNASTransport, return,); d_trace(3, "[MME] Uplink NAS transport\n"); for (i = 0; i < UplinkNASTransport->protocolIEs.list.count; i++) { ie = UplinkNASTransport->protocolIEs.list.array[i]; switch(ie->id) { case S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID: ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; break; case S1AP_ProtocolIE_ID_id_NAS_PDU: NAS_PDU = &ie->value.choice.NAS_PDU; break; default: break; } } d_trace(5, " IP[%s] ENB_ID[%d]\n", CORE_ADDR(enb->addr, buf), enb->enb_id); d_assert(ENB_UE_S1AP_ID, return,); enb_ue = enb_ue_find_by_enb_ue_s1ap_id(enb, *ENB_UE_S1AP_ID); d_assert(enb_ue, return, "No UE Context[ENB_UE_S1AP_ID:%d]", *ENB_UE_S1AP_ID); d_trace(5, " ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id); d_assert(s1ap_send_to_nas(enb_ue, S1AP_ProcedureCode_id_uplinkNASTransport, NAS_PDU) == CORE_OK,, "s1ap_send_to_nas failed"); } void s1ap_handle_ue_capability_info_indication( mme_enb_t *enb, s1ap_message_t *message) { char buf[CORE_ADDRSTRLEN]; int i; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_UECapabilityInfoIndication_t *UECapabilityInfoIndication = NULL; S1AP_UECapabilityInfoIndicationIEs_t *ie = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_UERadioCapability_t *UERadioCapability = NULL; enb_ue_t *enb_ue = NULL; d_assert(enb, return,); d_assert(enb->sock, return,); d_assert(message, return,); initiatingMessage = message->choice.initiatingMessage; d_assert(initiatingMessage, return,); UECapabilityInfoIndication = &initiatingMessage->value.choice.UECapabilityInfoIndication; d_assert(UECapabilityInfoIndication, return,); d_trace(3, "[MME] UE capability info indication\n"); for (i = 0; i < UECapabilityInfoIndication->protocolIEs.list.count; i++) { ie = UECapabilityInfoIndication->protocolIEs.list.array[i]; switch(ie->id) { case S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID: ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; break; case S1AP_ProtocolIE_ID_id_UERadioCapability: UERadioCapability = &ie->value.choice.UERadioCapability; break; default: break; } } d_trace(5, " IP[%s] ENB_ID[%d]\n", CORE_ADDR(enb->addr, buf), enb->enb_id); d_assert(ENB_UE_S1AP_ID, return,); enb_ue = enb_ue_find_by_enb_ue_s1ap_id(enb, *ENB_UE_S1AP_ID); d_assert(enb_ue, return, "No UE Context[%d]", *ENB_UE_S1AP_ID); d_trace(5, " ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id); if (enb_ue->mme_ue) { d_assert(UERadioCapability, return,); S1AP_STORE_DATA(&enb_ue->mme_ue->ueRadioCapability, UERadioCapability); } } void s1ap_handle_initial_context_setup_response( mme_enb_t *enb, s1ap_message_t *message) { status_t rv; char buf[CORE_ADDRSTRLEN]; int i; S1AP_SuccessfulOutcome_t *successfulOutcome = NULL; S1AP_InitialContextSetupResponse_t *InitialContextSetupResponse = NULL; S1AP_InitialContextSetupResponseIEs_t *ie = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_E_RABSetupListCtxtSURes_t *E_RABSetupListCtxtSURes = NULL; mme_ue_t *mme_ue = NULL; enb_ue_t *enb_ue = NULL; d_assert(enb, return,); d_assert(enb->sock, return,); d_assert(message, return,); successfulOutcome = message->choice.successfulOutcome; d_assert(successfulOutcome, return,); InitialContextSetupResponse = &successfulOutcome->value.choice.InitialContextSetupResponse; d_assert(InitialContextSetupResponse, return,); d_trace(3, "[MME] Initial context setup response\n"); for (i = 0; i < InitialContextSetupResponse->protocolIEs.list.count; i++) { ie = InitialContextSetupResponse->protocolIEs.list.array[i]; switch(ie->id) { case S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID: ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; break; case S1AP_ProtocolIE_ID_id_E_RABSetupListCtxtSURes: E_RABSetupListCtxtSURes = &ie->value.choice.E_RABSetupListCtxtSURes; break; default: break; } } d_trace(5, " IP[%s] ENB_ID[%d]\n", CORE_ADDR(enb->addr, buf), enb->enb_id); d_assert(ENB_UE_S1AP_ID, return,); enb_ue = enb_ue_find_by_enb_ue_s1ap_id(enb, *ENB_UE_S1AP_ID); d_assert(enb_ue, return, "No UE Context[%d]", *ENB_UE_S1AP_ID); mme_ue = enb_ue->mme_ue; d_assert(mme_ue, return,); d_trace(5, " ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id); d_assert(E_RABSetupListCtxtSURes, return,); for (i = 0; i < E_RABSetupListCtxtSURes->list.count; i++) { S1AP_E_RABSetupItemCtxtSUResIEs_t *ie2 = NULL; S1AP_E_RABSetupItemCtxtSURes_t *e_rab = NULL; mme_sess_t *sess = NULL; mme_bearer_t *bearer = NULL; ie2 = (S1AP_E_RABSetupItemCtxtSUResIEs_t *) E_RABSetupListCtxtSURes->list.array[i]; d_assert(ie2, return,); e_rab = &ie2->value.choice.E_RABSetupItemCtxtSURes; d_assert(e_rab, return, "Null param"); sess = mme_sess_find_by_ebi(mme_ue, e_rab->e_RAB_ID); d_assert(sess, return, "Null param"); bearer = mme_default_bearer_in_sess(sess); d_assert(bearer, return, "Null param"); memcpy(&bearer->enb_s1u_teid, e_rab->gTP_TEID.buf, sizeof(bearer->enb_s1u_teid)); bearer->enb_s1u_teid = ntohl(bearer->enb_s1u_teid); rv = s1ap_BIT_STRING_to_ip( &e_rab->transportLayerAddress, &bearer->enb_s1u_ip); d_assert(rv == CORE_OK, return,); d_trace(5, " EBI[%d] ENB-S1U-TEID[%d]\n", bearer->ebi, bearer->enb_s1u_teid); if (FSM_CHECK(&bearer->sm, esm_state_active)) { d_trace(5, " NAS_EPS Type[%d]\n", mme_ue->nas_eps.type); int uli_presence = 0; if (mme_ue->nas_eps.type != MME_EPS_TYPE_ATTACH_REQUEST) { d_trace(5, " ### ULI PRESENT ###\n"); uli_presence = 1; } rv = mme_gtp_send_modify_bearer_request(bearer, uli_presence); d_assert(rv == CORE_OK, return, "gtp send failed"); } } } void s1ap_handle_initial_context_setup_failure( mme_enb_t *enb, s1ap_message_t *message) { status_t rv; char buf[CORE_ADDRSTRLEN]; int i; S1AP_UnsuccessfulOutcome_t *unsuccessfulOutcome = NULL; S1AP_InitialContextSetupFailure_t *InitialContextSetupFailure = NULL; S1AP_InitialContextSetupFailureIEs_t *ie = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_Cause_t *Cause = NULL; mme_ue_t *mme_ue = NULL; enb_ue_t *enb_ue = NULL; d_assert(enb, return,); d_assert(enb->sock, return,); d_assert(message, return,); unsuccessfulOutcome = message->choice.unsuccessfulOutcome; d_assert(unsuccessfulOutcome, return,); InitialContextSetupFailure = &unsuccessfulOutcome->value.choice.InitialContextSetupFailure; d_assert(InitialContextSetupFailure, return,); d_trace(3, "[MME] Initial context setup failure\n"); for (i = 0; i < InitialContextSetupFailure->protocolIEs.list.count; i++) { ie = InitialContextSetupFailure->protocolIEs.list.array[i]; switch(ie->id) { case S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID: ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; break; case S1AP_ProtocolIE_ID_id_Cause: Cause = &ie->value.choice.Cause; break; default: break; } } d_trace(5, " IP[%s] ENB_ID[%d]\n", CORE_ADDR(enb->addr, buf), enb->enb_id); d_assert(ENB_UE_S1AP_ID, return,); d_assert(Cause, return,); enb_ue = enb_ue_find_by_enb_ue_s1ap_id(enb, *ENB_UE_S1AP_ID); if (enb_ue == NULL) { d_warn("Initial context setup failure : cannot find eNB-UE-S1AP-ID[%d]", *ENB_UE_S1AP_ID); return; } mme_ue = enb_ue->mme_ue; d_trace(5, " ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id); d_trace(5, " Cause[Group:%d Cause:%d]\n", Cause->present, Cause->choice.radioNetwork); d_assert(mme_ue,,); if (mme_ue && FSM_CHECK(&mme_ue->sm, emm_state_registered)) { d_trace(5, " EMM-Registered\n"); /* * 19.2.2.3 in Spec 36.300 * * In case of failure, eNB and MME behaviours are not mandated. * * Both implicit release (local release at each node) and * explicit release (MME-initiated UE Context Release procedure) * may in principle be adopted. The eNB should ensure * that no hanging resources remain at the eNB. */ } else { d_trace(5, " NOT EMM-Registered\n"); d_assert(mme_ue,,); rv = mme_send_delete_session_or_ue_context_release(mme_ue, enb_ue); d_assert(rv == CORE_OK,, "mme_send_delete_session_or_ue_context_release() failed"); } } void s1ap_handle_e_rab_setup_response( mme_enb_t *enb, s1ap_message_t *message) { status_t rv; char buf[CORE_ADDRSTRLEN]; int i; S1AP_SuccessfulOutcome_t *successfulOutcome = NULL; S1AP_E_RABSetupResponse_t *E_RABSetupResponse = NULL; S1AP_E_RABSetupResponseIEs_t *ie = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_E_RABSetupListBearerSURes_t *E_RABSetupListBearerSURes = NULL; enb_ue_t *enb_ue = NULL; mme_ue_t *mme_ue = NULL; d_assert(enb, return,); d_assert(enb->sock, return,); d_assert(message, return,); successfulOutcome = message->choice.successfulOutcome; d_assert(successfulOutcome, return,); E_RABSetupResponse = &successfulOutcome->value.choice.E_RABSetupResponse; d_assert(E_RABSetupResponse, return,); d_trace(3, "[MME] E-RAB setup response\n"); for (i = 0; i < E_RABSetupResponse->protocolIEs.list.count; i++) { ie = E_RABSetupResponse->protocolIEs.list.array[i]; switch(ie->id) { case S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID: ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; break; case S1AP_ProtocolIE_ID_id_E_RABSetupListBearerSURes: E_RABSetupListBearerSURes = &ie->value.choice.E_RABSetupListBearerSURes; break; default: break; } } d_trace(5, " IP[%s] ENB_ID[%d]\n", CORE_ADDR(enb->addr, buf), enb->enb_id); d_assert(ENB_UE_S1AP_ID, return,); enb_ue = enb_ue_find_by_enb_ue_s1ap_id(enb, *ENB_UE_S1AP_ID); d_assert(enb_ue, return, "No UE Context[%d]", *ENB_UE_S1AP_ID); mme_ue = enb_ue->mme_ue; d_assert(mme_ue, return,); d_trace(5, " ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id); d_assert(E_RABSetupListBearerSURes, return,); for (i = 0; i < E_RABSetupListBearerSURes->list.count; i++) { S1AP_E_RABSetupItemBearerSUResIEs_t *ie2 = NULL; S1AP_E_RABSetupItemBearerSURes_t *e_rab = NULL; mme_bearer_t *bearer = NULL; ie2 = (S1AP_E_RABSetupItemBearerSUResIEs_t *) E_RABSetupListBearerSURes->list.array[i]; d_assert(ie2, return,); e_rab = &ie2->value.choice.E_RABSetupItemBearerSURes; d_assert(e_rab, return, "Null param"); bearer = mme_bearer_find_by_ue_ebi(mme_ue, e_rab->e_RAB_ID); d_assert(bearer, return, "Null param"); memcpy(&bearer->enb_s1u_teid, e_rab->gTP_TEID.buf, sizeof(bearer->enb_s1u_teid)); bearer->enb_s1u_teid = ntohl(bearer->enb_s1u_teid); rv = s1ap_BIT_STRING_to_ip( &e_rab->transportLayerAddress, &bearer->enb_s1u_ip); d_assert(rv == CORE_OK, return,); d_trace(5, " EBI[%d]\n", bearer->ebi); if (FSM_CHECK(&bearer->sm, esm_state_active)) { status_t rv; mme_bearer_t *linked_bearer = mme_linked_bearer(bearer); d_assert(linked_bearer, return, "Null param"); d_trace(5, " Linked-EBI[%d]\n", linked_bearer->ebi); if (bearer->ebi == linked_bearer->ebi) { rv = mme_gtp_send_modify_bearer_request(bearer, 0); d_assert(rv == CORE_OK, return, "gtp send failed"); } else { rv = mme_gtp_send_create_bearer_response(bearer); d_assert(rv == CORE_OK, return, "gtp send failed"); } } } } void s1ap_handle_ue_context_release_request( mme_enb_t *enb, s1ap_message_t *message) { status_t rv; char buf[CORE_ADDRSTRLEN]; int i; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_UEContextReleaseRequest_t *UEContextReleaseRequest = NULL; S1AP_UEContextReleaseRequest_IEs_t *ie = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_Cause_t *Cause = NULL; enb_ue_t *enb_ue = NULL; mme_ue_t *mme_ue = NULL; d_assert(enb, return,); d_assert(enb->sock, return,); d_assert(message, return,); initiatingMessage = message->choice.initiatingMessage; d_assert(initiatingMessage, return,); UEContextReleaseRequest = &initiatingMessage->value.choice.UEContextReleaseRequest; d_assert(UEContextReleaseRequest, return,); d_trace(3, "[MME] UE Context release request\n"); for (i = 0; i < UEContextReleaseRequest->protocolIEs.list.count; i++) { ie = UEContextReleaseRequest->protocolIEs.list.array[i]; switch(ie->id) { case S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID: MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; break; case S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID: ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; break; case S1AP_ProtocolIE_ID_id_Cause: Cause = &ie->value.choice.Cause; break; default: break; } } d_trace(5, " IP[%s] ENB_ID[%d]\n", CORE_ADDR(enb->addr, buf), enb->enb_id); d_assert(MME_UE_S1AP_ID, return,); enb_ue = enb_ue_find_by_mme_ue_s1ap_id(*MME_UE_S1AP_ID); if (!enb_ue) { d_warn("No ENB UE Context : MME_UE_S1AP_ID[%d]", *MME_UE_S1AP_ID); rv = s1ap_send_error_indication(enb, MME_UE_S1AP_ID, ENB_UE_S1AP_ID, S1AP_Cause_PR_radioNetwork, S1AP_CauseRadioNetwork_unknown_mme_ue_s1ap_id); d_assert(rv == CORE_OK, return, "s1ap send error"); return; } d_trace(5, " ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id); d_assert(Cause, return,); d_trace(5, " Cause[Group:%d Cause:%d]\n", Cause->present, Cause->choice.radioNetwork); switch(Cause->present) { case S1AP_Cause_PR_radioNetwork: case S1AP_Cause_PR_transport: case S1AP_Cause_PR_protocol: case S1AP_Cause_PR_misc: break; case S1AP_Cause_PR_nas: d_warn("NAS-Cause[%d]", Cause->choice.nas); default: d_warn("Invalid cause group[%d]", Cause->present); break; } mme_ue = enb_ue->mme_ue; if (mme_ue) { if (FSM_CHECK(&mme_ue->sm, emm_state_registered)) { d_trace(5, " EMM-Registered\n"); rv = mme_send_release_access_bearer_or_ue_context_release( mme_ue, enb_ue); d_assert(rv == CORE_OK,, "mme_send_release_access_bearer_or_" "ue_context_release() failed"); } else { d_trace(5, " NOT EMM-Registered\n"); rv = mme_send_delete_session_or_ue_context_release(mme_ue, enb_ue); d_assert(rv == CORE_OK,, "mme_send_delete_session_or_ue_context_release() failed"); } } else { d_trace(5, " S1 Context Not Associated\n"); rv = s1ap_send_ue_context_release_command(enb_ue, S1AP_Cause_PR_nas, S1AP_CauseNas_normal_release, S1AP_UE_CTX_REL_NO_ACTION, 0); d_assert(rv == CORE_OK,, "s1ap send error"); } } void s1ap_handle_ue_context_release_complete( mme_enb_t *enb, s1ap_message_t *message) { status_t rv; char buf[CORE_ADDRSTRLEN]; int i; S1AP_SuccessfulOutcome_t *successfulOutcome = NULL; S1AP_UEContextReleaseComplete_t *UEContextReleaseComplete = NULL; S1AP_UEContextReleaseComplete_IEs_t *ie = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; mme_ue_t *mme_ue = NULL; enb_ue_t *enb_ue = NULL; d_assert(enb, return,); d_assert(enb->sock, return,); d_assert(message, return,); successfulOutcome = message->choice.successfulOutcome; d_assert(successfulOutcome, return,); UEContextReleaseComplete = &successfulOutcome->value.choice.UEContextReleaseComplete; d_assert(UEContextReleaseComplete, return,); d_trace(3, "[MME] UE Context release complete\n"); for (i = 0; i < UEContextReleaseComplete->protocolIEs.list.count; i++) { ie = UEContextReleaseComplete->protocolIEs.list.array[i]; switch(ie->id) { case S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID: MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; break; default: break; } } d_trace(5, " IP[%s] ENB_ID[%d]\n", CORE_ADDR(enb->addr, buf), enb->enb_id); d_assert(MME_UE_S1AP_ID, return,); enb_ue = enb_ue_find_by_mme_ue_s1ap_id(*MME_UE_S1AP_ID); if (!enb_ue) { d_warn("No ENB UE Context : MME_UE_S1AP_ID[%d]", *MME_UE_S1AP_ID); rv = s1ap_send_error_indication(enb, MME_UE_S1AP_ID, NULL, S1AP_Cause_PR_radioNetwork, S1AP_CauseRadioNetwork_unknown_mme_ue_s1ap_id); d_assert(rv == CORE_OK, return, "s1ap send error"); return; } mme_ue = enb_ue->mme_ue; d_trace(5, " ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id); switch (enb_ue->ue_ctx_rel_action) { case S1AP_UE_CTX_REL_NO_ACTION: { d_trace(5, " No Action\n"); rv = enb_ue_remove(enb_ue); d_assert(rv == CORE_OK,, "enb_ue_remove() failed"); break; } case S1AP_UE_CTX_REL_S1_NORMAL_RELEASE: { d_trace(5, " Action: S1 normal release\n"); rv = enb_ue_remove(enb_ue); d_assert(rv == CORE_OK,, "enb_ue_remove() failed"); d_assert(mme_ue,,); rv = mme_ue_deassociate(mme_ue); d_assert(rv == CORE_OK,, "mme_ue_deassociate() failed"); break; } case S1AP_UE_CTX_REL_UE_CONTEXT_REMOVE: { d_trace(5, " Action: UE context remove()\n"); rv = enb_ue_remove(enb_ue); d_assert(rv == CORE_OK,, "enb_ue_removeI() failed"); d_assert(mme_ue,,); rv = mme_ue_remove(mme_ue); d_assert(rv == CORE_OK,, "mme_ue_remove() failed"); break; } case S1AP_UE_CTX_REL_DELETE_INDIRECT_TUNNEL: { d_trace(5, " Action: Delete indirect tunnel\n"); rv = source_ue_deassociate_target_ue(enb_ue); d_assert(rv == CORE_OK,, "source_ue_deassociate_target_ue() failed"); rv = enb_ue_remove(enb_ue); d_assert(rv == CORE_OK,, "enb_ue_removeI() failed"); d_assert(mme_ue,,); if (mme_ue_have_indirect_tunnel(mme_ue)) { rv = mme_gtp_send_delete_indirect_data_forwarding_tunnel_request(mme_ue); d_assert(rv == CORE_OK,, "mme_gtp_send_delete_indirect_data_" "forwarding_tunnel_request() failed"); } else { d_warn("Check your eNodeB"); d_warn(" There is no INDIRECT TUNNEL"); d_warn(" Packet could be dropped during S1-Handover"); rv = mme_ue_clear_indirect_tunnel(mme_ue); d_assert(rv == CORE_OK,, "mme_ue_clear_indirect_tunnel() failed"); } break; } default: { d_assert(0,, "Invalid Action[%d]", enb_ue->ue_ctx_rel_action); break; } } } void s1ap_handle_paging(mme_ue_t *mme_ue) { pkbuf_t *s1apbuf = NULL; hash_index_t *hi = NULL; mme_enb_t *enb = NULL; int i; status_t rv; /* Find enB with matched TAI */ for (hi = mme_enb_first(); hi; hi = mme_enb_next(hi)) { enb = mme_enb_this(hi); for (i = 0; i < enb->num_of_supported_ta_list; i++) { if (!memcmp(&enb->supported_ta_list[i], &mme_ue->tai, sizeof(tai_t))) { if (mme_ue->last_paging_msg) { s1apbuf = mme_ue->last_paging_msg; /* Save it for later use */ mme_ue->last_paging_msg = pkbuf_copy(s1apbuf); } else { /* Buidl S1Ap Paging message */ rv = s1ap_build_paging(&s1apbuf, mme_ue); d_assert(rv == CORE_OK && s1apbuf, return, "s1ap build error"); /* Save it for later use */ mme_ue->last_paging_msg = pkbuf_copy(s1apbuf); } /* Send to enb */ d_assert(s1ap_send_to_enb( enb, s1apbuf, S1AP_NON_UE_SIGNALLING) == CORE_OK, return, "s1ap send error"); } } } } void s1ap_handle_path_switch_request( mme_enb_t *enb, s1ap_message_t *message) { status_t rv; char buf[CORE_ADDRSTRLEN]; int i; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_PathSwitchRequest_t *PathSwitchRequest = NULL; S1AP_PathSwitchRequestIEs_t *ie = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_E_RABToBeSwitchedDLList_t *E_RABToBeSwitchedDLList = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_EUTRAN_CGI_t *EUTRAN_CGI = NULL; S1AP_TAI_t *TAI = NULL; S1AP_UESecurityCapabilities_t *UESecurityCapabilities = NULL; S1AP_PLMNidentity_t *pLMNidentity = NULL; S1AP_CellIdentity_t *cell_ID = NULL; S1AP_TAC_t *tAC = NULL; S1AP_EncryptionAlgorithms_t *encryptionAlgorithms = NULL; S1AP_IntegrityProtectionAlgorithms_t *integrityProtectionAlgorithms = NULL; c_uint16_t eea = 0, eia = 0; enb_ue_t *enb_ue = NULL; mme_ue_t *mme_ue = NULL; pkbuf_t *s1apbuf = NULL; d_assert(enb, return,); d_assert(enb->sock, return,); d_assert(message, return,); initiatingMessage = message->choice.initiatingMessage; d_assert(initiatingMessage, return,); PathSwitchRequest = &initiatingMessage->value.choice.PathSwitchRequest; d_assert(PathSwitchRequest, return,); d_trace(3, "[MME] Path switch request\n"); for (i = 0; i < PathSwitchRequest->protocolIEs.list.count; i++) { ie = PathSwitchRequest->protocolIEs.list.array[i]; switch(ie->id) { case S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID: ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; break; case S1AP_ProtocolIE_ID_id_E_RABToBeSwitchedDLList: E_RABToBeSwitchedDLList = &ie->value.choice.E_RABToBeSwitchedDLList; break; case S1AP_ProtocolIE_ID_id_SourceMME_UE_S1AP_ID: MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; break; case S1AP_ProtocolIE_ID_id_EUTRAN_CGI: EUTRAN_CGI = &ie->value.choice.EUTRAN_CGI; break; case S1AP_ProtocolIE_ID_id_TAI: TAI = &ie->value.choice.TAI; break; case S1AP_ProtocolIE_ID_id_UESecurityCapabilities: UESecurityCapabilities = &ie->value.choice.UESecurityCapabilities; break; default: break; } } d_trace(5, " IP[%s] ENB_ID[%d]\n", CORE_ADDR(enb->addr, buf), enb->enb_id); d_assert(EUTRAN_CGI, return,); pLMNidentity = &EUTRAN_CGI->pLMNidentity; d_assert(pLMNidentity && pLMNidentity->size == sizeof(plmn_id_t), return,); cell_ID = &EUTRAN_CGI->cell_ID; d_assert(cell_ID, return,); d_assert(TAI, return,); pLMNidentity = &TAI->pLMNidentity; d_assert(pLMNidentity && pLMNidentity->size == sizeof(plmn_id_t), return,); tAC = &TAI->tAC; d_assert(tAC && tAC->size == sizeof(c_uint16_t), return,); d_assert(UESecurityCapabilities, return,); encryptionAlgorithms = &UESecurityCapabilities->encryptionAlgorithms; integrityProtectionAlgorithms = &UESecurityCapabilities->integrityProtectionAlgorithms; d_assert(MME_UE_S1AP_ID, return,); d_assert(ENB_UE_S1AP_ID, return,); enb_ue = enb_ue_find_by_mme_ue_s1ap_id(*MME_UE_S1AP_ID); if (!enb_ue) { d_error("Cannot find UE from sourceMME-UE-S1AP-ID[%d] and eNB[%s:%d]", *MME_UE_S1AP_ID, CORE_ADDR(enb->addr, buf), enb->enb_id); rv = s1ap_build_path_switch_failure(&s1apbuf, *ENB_UE_S1AP_ID, *MME_UE_S1AP_ID, S1AP_Cause_PR_radioNetwork, S1AP_CauseRadioNetwork_unknown_mme_ue_s1ap_id); d_assert(rv == CORE_OK && s1apbuf, return, "s1ap build error"); rv = s1ap_send_to_enb(enb, s1apbuf, S1AP_NON_UE_SIGNALLING); d_assert(rv == CORE_OK,, "s1ap send error"); return; } d_trace(5, " ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id); mme_ue = enb_ue->mme_ue; d_assert(mme_ue, return, "Null param"); if (SECURITY_CONTEXT_IS_VALID(mme_ue)) { mme_ue->nhcc++; mme_kdf_nh(mme_ue->kasme, mme_ue->nh, mme_ue->nh); } else { rv = s1ap_build_path_switch_failure(&s1apbuf, *ENB_UE_S1AP_ID, *MME_UE_S1AP_ID, S1AP_Cause_PR_nas, S1AP_CauseNas_authentication_failure); d_assert(rv == CORE_OK && s1apbuf, return, "s1ap build error"); rv = s1ap_send_to_enb_ue(enb_ue, s1apbuf); d_assert(rv == CORE_OK,, "s1ap send error"); return; } enb_ue->enb_ue_s1ap_id = *ENB_UE_S1AP_ID; memcpy(&enb_ue->nas.tai.plmn_id, pLMNidentity->buf, sizeof(enb_ue->nas.tai.plmn_id)); memcpy(&enb_ue->nas.tai.tac, tAC->buf, sizeof(enb_ue->nas.tai.tac)); enb_ue->nas.tai.tac = ntohs(enb_ue->nas.tai.tac); memcpy(&enb_ue->nas.e_cgi.plmn_id, pLMNidentity->buf, sizeof(enb_ue->nas.e_cgi.plmn_id)); memcpy(&enb_ue->nas.e_cgi.cell_id, cell_ID->buf, sizeof(enb_ue->nas.e_cgi.cell_id)); enb_ue->nas.e_cgi.cell_id = (ntohl(enb_ue->nas.e_cgi.cell_id) >> 4); d_trace(5, " OLD TAI[PLMN_ID:0x%x,TAC:%d]\n", mme_ue->tai.plmn_id, mme_ue->tai.tac); d_trace(5, " OLD E_CGI[PLMN_ID:0x%x,CELL_ID:%d]\n", mme_ue->e_cgi.plmn_id, mme_ue->e_cgi.cell_id); d_trace(5, " TAI[PLMN_ID:0x%x,TAC:%d]\n", enb_ue->nas.tai.plmn_id, enb_ue->nas.tai.tac); d_trace(5, " E_CGI[PLMN_ID:0x%x,CELL_ID:%d]\n", enb_ue->nas.e_cgi.plmn_id, enb_ue->nas.e_cgi.cell_id); /* Copy TAI and ECGI from enb_ue */ memcpy(&mme_ue->tai, &enb_ue->nas.tai, sizeof(tai_t)); memcpy(&mme_ue->e_cgi, &enb_ue->nas.e_cgi, sizeof(e_cgi_t)); memcpy(&eea, encryptionAlgorithms->buf, sizeof(eea)); eea = ntohs(eea); mme_ue->ue_network_capability.eea = eea >> 9; mme_ue->ue_network_capability.eea0 = 1; memcpy(&eia, integrityProtectionAlgorithms->buf, sizeof(eia)); eia = ntohs(eia); mme_ue->ue_network_capability.eia = eia >> 9; mme_ue->ue_network_capability.eia0 = 0; d_assert(E_RABToBeSwitchedDLList, return,); for (i = 0; i < E_RABToBeSwitchedDLList->list.count; i++) { S1AP_E_RABToBeSwitchedDLItemIEs_t *ie2 = NULL; S1AP_E_RABToBeSwitchedDLItem_t *e_rab = NULL; mme_bearer_t *bearer = NULL; ie2 = (S1AP_E_RABToBeSwitchedDLItemIEs_t *) E_RABToBeSwitchedDLList->list.array[i]; d_assert(ie2, return,); e_rab = &ie2->value.choice.E_RABToBeSwitchedDLItem; d_assert(e_rab, return, "Null param"); bearer = mme_bearer_find_by_ue_ebi(mme_ue, e_rab->e_RAB_ID); d_assert(bearer, return, "Cannot find e_RAB_ID[%d]", e_rab->e_RAB_ID); memcpy(&bearer->enb_s1u_teid, e_rab->gTP_TEID.buf, sizeof(bearer->enb_s1u_teid)); bearer->enb_s1u_teid = ntohl(bearer->enb_s1u_teid); rv = s1ap_BIT_STRING_to_ip( &e_rab->transportLayerAddress, &bearer->enb_s1u_ip); d_assert(rv == CORE_OK, return,); GTP_COUNTER_INCREMENT( mme_ue, GTP_COUNTER_MODIFY_BEARER_BY_PATH_SWITCH); rv = mme_gtp_send_modify_bearer_request(bearer, 1); d_assert(rv == CORE_OK, return, "gtp send failed"); } /* Switch to enb */ enb_ue_switch_to_enb(enb_ue, enb); } void s1ap_handle_enb_configuration_transfer( mme_enb_t *enb, s1ap_message_t *message, pkbuf_t *pkbuf) { status_t rv; char buf[CORE_ADDRSTRLEN]; int i; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_ENBConfigurationTransfer_t *ENBConfigurationTransfer = NULL; S1AP_ENBConfigurationTransferIEs_t *ie = NULL; S1AP_SONConfigurationTransfer_t *SONConfigurationTransfer = NULL; d_assert(enb, return,); d_assert(enb->sock, return,); d_assert(message, return,); initiatingMessage = message->choice.initiatingMessage; d_assert(initiatingMessage, return,); ENBConfigurationTransfer = &initiatingMessage->value.choice.ENBConfigurationTransfer; d_assert(ENBConfigurationTransfer, return,); d_trace(3, "[MME] ENB configuration transfer\n"); for (i = 0; i < ENBConfigurationTransfer->protocolIEs.list.count; i++) { ie = ENBConfigurationTransfer->protocolIEs.list.array[i]; switch(ie->id) { case S1AP_ProtocolIE_ID_id_SONConfigurationTransferECT: SONConfigurationTransfer = &ie->value.choice.SONConfigurationTransfer; break; default: break; } } d_trace(5, " IP[%s] ENB_ID[%d]\n", CORE_ADDR(enb->addr, buf), enb->enb_id); if (SONConfigurationTransfer) { S1AP_TargeteNB_ID_t *targeteNB_ID = &SONConfigurationTransfer->targeteNB_ID; S1AP_SourceeNB_ID_t *sourceeNB_ID = &SONConfigurationTransfer->sourceeNB_ID; mme_enb_t *target_enb = NULL; c_uint32_t source_enb_id, target_enb_id; c_uint16_t source_tac, target_tac; s1ap_ENB_ID_to_uint32( &sourceeNB_ID->global_ENB_ID.eNB_ID, &source_enb_id); s1ap_ENB_ID_to_uint32( &targeteNB_ID->global_ENB_ID.eNB_ID, &target_enb_id); memcpy(&source_tac, sourceeNB_ID->selected_TAI.tAC.buf, sizeof(source_tac)); source_tac = ntohs(source_tac); memcpy(&target_tac, targeteNB_ID->selected_TAI.tAC.buf, sizeof(target_tac)); target_tac = ntohs(target_tac); d_trace(5, " Source : ENB_ID[%s:%d], TAC[%d]\n", sourceeNB_ID->global_ENB_ID.eNB_ID.present == S1AP_ENB_ID_PR_homeENB_ID ? "Home" : sourceeNB_ID->global_ENB_ID.eNB_ID.present == S1AP_ENB_ID_PR_macroENB_ID ? "Macro" : "Others", source_enb_id, source_tac); d_trace(5, " Target : ENB_ID[%s:%d], TAC[%d]\n", targeteNB_ID->global_ENB_ID.eNB_ID.present == S1AP_ENB_ID_PR_homeENB_ID ? "Home" : targeteNB_ID->global_ENB_ID.eNB_ID.present == S1AP_ENB_ID_PR_macroENB_ID ? "Macro" : "Others", target_enb_id, target_tac); target_enb = mme_enb_find_by_enb_id(target_enb_id); if (target_enb == NULL) { d_warn("eNB configuration transfer : cannot find target eNB-id[%d]", target_enb_id); return; } rv = s1ap_send_mme_configuration_transfer( target_enb, SONConfigurationTransfer); d_assert(rv == CORE_OK,,); } } void s1ap_handle_handover_required(mme_enb_t *enb, s1ap_message_t *message) { status_t rv; char buf[CORE_ADDRSTRLEN]; int i; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_HandoverRequired_t *HandoverRequired = NULL; S1AP_HandoverRequiredIEs_t *ie = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_HandoverType_t *HandoverType = NULL; S1AP_Cause_t *Cause = NULL; S1AP_TargetID_t *TargetID = NULL; S1AP_Source_ToTarget_TransparentContainer_t *Source_ToTarget_TransparentContainer = NULL; d_assert(enb, return,); d_assert(enb->sock, return,); d_assert(message, return,); initiatingMessage = message->choice.initiatingMessage; d_assert(initiatingMessage, return,); HandoverRequired = &initiatingMessage->value.choice.HandoverRequired; d_assert(HandoverRequired, return,); enb_ue_t *source_ue = NULL; mme_ue_t *mme_ue = NULL; mme_enb_t *target_enb = NULL; c_uint32_t target_enb_id = 0; d_trace(3, "[MME] Handover required\n"); for (i = 0; i < HandoverRequired->protocolIEs.list.count; i++) { ie = HandoverRequired->protocolIEs.list.array[i]; switch(ie->id) { case S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID: ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; break; case S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID: MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; break; case S1AP_ProtocolIE_ID_id_HandoverType: HandoverType = &ie->value.choice.HandoverType; break; case S1AP_ProtocolIE_ID_id_Cause: Cause = &ie->value.choice.Cause; break; case S1AP_ProtocolIE_ID_id_TargetID: TargetID = &ie->value.choice.TargetID; break; case S1AP_ProtocolIE_ID_id_Source_ToTarget_TransparentContainer: Source_ToTarget_TransparentContainer = &ie->value.choice.Source_ToTarget_TransparentContainer; break; default: break; } } d_trace(5, " IP[%s] ENB_ID[%d]\n", CORE_ADDR(enb->addr, buf), enb->enb_id); d_assert(TargetID, return,); switch(TargetID->present) { case S1AP_TargetID_PR_targeteNB_ID: { s1ap_ENB_ID_to_uint32( &TargetID->choice.targeteNB_ID->global_ENB_ID.eNB_ID, &target_enb_id); break; } default: { d_error("Not implemented(%d)", TargetID->present); return; } } target_enb = mme_enb_find_by_enb_id(target_enb_id); if (target_enb == NULL) { d_warn("Handover required : cannot find target eNB-id[%d]", target_enb_id); return; } d_assert(ENB_UE_S1AP_ID, return,); d_assert(MME_UE_S1AP_ID, return,); source_ue = enb_ue_find_by_enb_ue_s1ap_id(enb, *ENB_UE_S1AP_ID); d_assert(source_ue, return, "Cannot find UE for eNB-UE-S1AP-ID[%d] and eNB[%s:%d]", *ENB_UE_S1AP_ID, CORE_ADDR(enb->addr, buf), enb->enb_id); d_assert(source_ue->mme_ue_s1ap_id == *MME_UE_S1AP_ID, return, "Conflict MME-UE-S1AP-ID : %d != %d\n", source_ue->mme_ue_s1ap_id, *MME_UE_S1AP_ID); d_trace(5, " Source : ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", source_ue->enb_ue_s1ap_id, source_ue->mme_ue_s1ap_id); mme_ue = source_ue->mme_ue; d_assert(mme_ue, return,); if (SECURITY_CONTEXT_IS_VALID(mme_ue)) { mme_ue->nhcc++; mme_kdf_nh(mme_ue->kasme, mme_ue->nh, mme_ue->nh); } else { d_assert(Cause, return,); rv = s1ap_send_handover_preparation_failure(source_ue, Cause); d_assert(rv == CORE_OK, return, "s1ap send error"); return; } d_assert(HandoverType, return,); source_ue->handover_type = *HandoverType; rv = s1ap_send_handover_request(mme_ue, target_enb, ENB_UE_S1AP_ID, MME_UE_S1AP_ID, HandoverType, Cause, Source_ToTarget_TransparentContainer); d_assert(rv == CORE_OK,, "s1ap send error"); } void s1ap_handle_handover_request_ack(mme_enb_t *enb, s1ap_message_t *message) { status_t rv; char buf[CORE_ADDRSTRLEN]; int i; S1AP_SuccessfulOutcome_t *successfulOutcome = NULL; S1AP_HandoverRequestAcknowledge_t *HandoverRequestAcknowledge = NULL; S1AP_HandoverRequestAcknowledgeIEs_t *ie = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_E_RABAdmittedList_t *E_RABAdmittedList = NULL; S1AP_Target_ToSource_TransparentContainer_t *Target_ToSource_TransparentContainer = NULL; enb_ue_t *source_ue = NULL; enb_ue_t *target_ue = NULL; mme_ue_t *mme_ue = NULL; d_assert(enb, return,); d_assert(enb->sock, return,); d_assert(message, return,); successfulOutcome = message->choice.successfulOutcome; d_assert(successfulOutcome, return,); HandoverRequestAcknowledge = &successfulOutcome->value.choice.HandoverRequestAcknowledge; d_assert(HandoverRequestAcknowledge, return,); d_trace(3, "[MME] Handover request acknowledge\n"); for (i = 0; i < HandoverRequestAcknowledge->protocolIEs.list.count; i++) { ie = HandoverRequestAcknowledge->protocolIEs.list.array[i]; switch(ie->id) { case S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID: MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; break; case S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID: ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; break; case S1AP_ProtocolIE_ID_id_E_RABAdmittedList: E_RABAdmittedList = &ie->value.choice.E_RABAdmittedList; break; case S1AP_ProtocolIE_ID_id_Target_ToSource_TransparentContainer: Target_ToSource_TransparentContainer = &ie->value.choice.Target_ToSource_TransparentContainer; break; default: break; } } d_trace(5, " IP[%s] ENB_ID[%d]\n", CORE_ADDR(enb->addr, buf), enb->enb_id); d_assert(MME_UE_S1AP_ID, return,); d_assert(ENB_UE_S1AP_ID, return,); d_assert(E_RABAdmittedList, return,); d_assert(Target_ToSource_TransparentContainer, return,); target_ue = enb_ue_find_by_mme_ue_s1ap_id(*MME_UE_S1AP_ID); d_assert(target_ue, return, "Cannot find UE for MME-UE-S1AP-ID[%d] and eNB[%s:%d]", *MME_UE_S1AP_ID, CORE_ADDR(enb->addr, buf), enb->enb_id); target_ue->enb_ue_s1ap_id = *ENB_UE_S1AP_ID; source_ue = target_ue->source_ue; d_assert(source_ue, return,); mme_ue = source_ue->mme_ue; d_assert(mme_ue, return,); d_trace(5, " Source : ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", source_ue->enb_ue_s1ap_id, source_ue->mme_ue_s1ap_id); d_trace(5, " Target : ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", target_ue->enb_ue_s1ap_id, target_ue->mme_ue_s1ap_id); for (i = 0; i < E_RABAdmittedList->list.count; i++) { S1AP_E_RABAdmittedItemIEs_t *ie2 = NULL; S1AP_E_RABAdmittedItem_t *e_rab = NULL; mme_bearer_t *bearer = NULL; ie2 = (S1AP_E_RABAdmittedItemIEs_t *)E_RABAdmittedList->list.array[i]; d_assert(ie2, return,); e_rab = &ie2->value.choice.E_RABAdmittedItem; d_assert(e_rab, return,); bearer = mme_bearer_find_by_ue_ebi(mme_ue, e_rab->e_RAB_ID); d_assert(bearer, return,); memcpy(&bearer->target_s1u_teid, e_rab->gTP_TEID.buf, sizeof(bearer->target_s1u_teid)); bearer->target_s1u_teid = ntohl(bearer->target_s1u_teid); rv = s1ap_BIT_STRING_to_ip( &e_rab->transportLayerAddress, &bearer->target_s1u_ip); d_assert(rv == CORE_OK, return,); if (e_rab->dL_transportLayerAddress && e_rab->dL_gTP_TEID) { d_assert(e_rab->dL_gTP_TEID->buf, return,); d_assert(e_rab->dL_transportLayerAddress->buf, return,); memcpy(&bearer->enb_dl_teid, e_rab->dL_gTP_TEID->buf, sizeof(bearer->enb_dl_teid)); bearer->enb_dl_teid = ntohl(bearer->enb_dl_teid); rv = s1ap_BIT_STRING_to_ip( e_rab->dL_transportLayerAddress, &bearer->enb_dl_ip); d_assert(rv == CORE_OK, return,); } if (e_rab->uL_TransportLayerAddress && e_rab->uL_GTP_TEID) { d_assert(e_rab->uL_GTP_TEID->buf, return,); d_assert(e_rab->uL_TransportLayerAddress->buf, return,); memcpy(&bearer->enb_ul_teid, e_rab->uL_GTP_TEID->buf, sizeof(bearer->enb_ul_teid)); bearer->enb_ul_teid = ntohl(bearer->enb_ul_teid); rv = s1ap_BIT_STRING_to_ip( e_rab->uL_TransportLayerAddress, &bearer->enb_ul_ip); d_assert(rv == CORE_OK, return,); } } S1AP_STORE_DATA(&mme_ue->container, Target_ToSource_TransparentContainer); if (mme_ue_have_indirect_tunnel(mme_ue) == 1) { rv = mme_gtp_send_create_indirect_data_forwarding_tunnel_request( mme_ue); d_assert(rv == CORE_OK, return, "gtp send failed"); } else { rv = s1ap_send_handover_command(source_ue); d_assert(rv == CORE_OK, return, "gtp send failed"); } } void s1ap_handle_handover_failure(mme_enb_t *enb, s1ap_message_t *message) { status_t rv; char buf[CORE_ADDRSTRLEN]; int i; S1AP_UnsuccessfulOutcome_t *unsuccessfulOutcome = NULL; S1AP_HandoverFailure_t *HandoverFailure = NULL; S1AP_HandoverFailureIEs_t *ie = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_Cause_t *Cause = NULL; enb_ue_t *target_ue = NULL; enb_ue_t *source_ue = NULL; d_assert(enb, return,); d_assert(enb->sock, return,); d_assert(message, return,); unsuccessfulOutcome = message->choice.unsuccessfulOutcome; d_assert(unsuccessfulOutcome, return,); HandoverFailure = &unsuccessfulOutcome->value.choice.HandoverFailure; d_assert(HandoverFailure, return,); d_trace(3, "[MME] Handover failure\n"); for (i = 0; i < HandoverFailure->protocolIEs.list.count; i++) { ie = HandoverFailure->protocolIEs.list.array[i]; switch(ie->id) { case S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID: MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; break; case S1AP_ProtocolIE_ID_id_Cause: Cause = &ie->value.choice.Cause; break; default: break; } } d_trace(5, " IP[%s] ENB_ID[%d]\n", CORE_ADDR(enb->addr, buf), enb->enb_id); d_assert(MME_UE_S1AP_ID, return,); d_assert(Cause, return,); target_ue = enb_ue_find_by_mme_ue_s1ap_id(*MME_UE_S1AP_ID); d_assert(target_ue, return, "Cannot find UE for MME-UE-S1AP-ID[%d] and eNB[%s:%d]", *MME_UE_S1AP_ID, CORE_ADDR(enb->addr, buf), enb->enb_id); source_ue = target_ue->source_ue; d_assert(source_ue, return,); d_trace(5, " Source : ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", source_ue->enb_ue_s1ap_id, source_ue->mme_ue_s1ap_id); d_trace(5, " Target : ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", target_ue->enb_ue_s1ap_id, target_ue->mme_ue_s1ap_id); rv = s1ap_send_handover_preparation_failure(source_ue, Cause); d_assert(rv == CORE_OK, return, "s1ap send error"); rv = s1ap_send_ue_context_release_command( target_ue, S1AP_Cause_PR_radioNetwork, S1AP_CauseRadioNetwork_ho_failure_in_target_EPC_eNB_or_target_system, S1AP_UE_CTX_REL_DELETE_INDIRECT_TUNNEL, 0); d_assert(rv == CORE_OK, return, "s1ap send error"); } void s1ap_handle_handover_cancel(mme_enb_t *enb, s1ap_message_t *message) { status_t rv; char buf[CORE_ADDRSTRLEN]; int i; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_HandoverCancel_t *HandoverCancel = NULL; S1AP_HandoverCancelIEs_t *ie = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_Cause_t *Cause = NULL; enb_ue_t *source_ue = NULL; enb_ue_t *target_ue = NULL; d_assert(enb, return,); d_assert(enb->sock, return,); d_assert(message, return,); initiatingMessage = message->choice.initiatingMessage; d_assert(initiatingMessage, return,); HandoverCancel = &initiatingMessage->value.choice.HandoverCancel; d_assert(HandoverCancel, return,); d_trace(3, "[MME] Handover cancel\n"); for (i = 0; i < HandoverCancel->protocolIEs.list.count; i++) { ie = HandoverCancel->protocolIEs.list.array[i]; switch(ie->id) { case S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID: MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; break; case S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID: ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; break; case S1AP_ProtocolIE_ID_id_Cause: Cause = &ie->value.choice.Cause; break; default: break; } } d_trace(5, " IP[%s] ENB_ID[%d]\n", CORE_ADDR(enb->addr, buf), enb->enb_id); d_assert(MME_UE_S1AP_ID, return,); d_assert(ENB_UE_S1AP_ID, return,); d_assert(Cause, return,); source_ue = enb_ue_find_by_enb_ue_s1ap_id(enb, *ENB_UE_S1AP_ID); d_assert(source_ue, return, "Cannot find UE for eNB-UE-S1AP-ID[%d] and eNB[%s:%d]", *ENB_UE_S1AP_ID, CORE_ADDR(enb->addr, buf), enb->enb_id); d_assert(source_ue->mme_ue_s1ap_id == *MME_UE_S1AP_ID, return, "Conflict MME-UE-S1AP-ID : %d != %d\n", source_ue->mme_ue_s1ap_id, *MME_UE_S1AP_ID); target_ue = source_ue->target_ue; d_assert(target_ue, return,); d_trace(5, " Source : ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", source_ue->enb_ue_s1ap_id, source_ue->mme_ue_s1ap_id); d_trace(5, " Target : ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", target_ue->enb_ue_s1ap_id, target_ue->mme_ue_s1ap_id); rv = s1ap_send_handover_cancel_ack(source_ue); d_assert(rv == CORE_OK,, "s1ap send error"); rv = s1ap_send_ue_context_release_command( target_ue, S1AP_Cause_PR_radioNetwork, S1AP_CauseRadioNetwork_handover_cancelled, S1AP_UE_CTX_REL_DELETE_INDIRECT_TUNNEL, 300); d_assert(rv == CORE_OK, return, "s1ap send error"); d_trace(3, "[MME] Handover Cancel : " "UE[eNB-UE-S1AP-ID(%d)] --> eNB[%s:%d]\n", source_ue->enb_ue_s1ap_id, CORE_ADDR(enb->addr, buf), enb->enb_id); } void s1ap_handle_enb_status_transfer(mme_enb_t *enb, s1ap_message_t *message) { status_t rv; char buf[CORE_ADDRSTRLEN]; int i; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_ENBStatusTransfer_t *ENBStatusTransfer = NULL; S1AP_ENBStatusTransferIEs_t *ie = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_ENB_StatusTransfer_TransparentContainer_t *ENB_StatusTransfer_TransparentContainer = NULL; enb_ue_t *source_ue = NULL, *target_ue = NULL; d_assert(enb, return,); d_assert(enb->sock, return,); d_assert(message, return,); initiatingMessage = message->choice.initiatingMessage; d_assert(initiatingMessage, return,); ENBStatusTransfer = &initiatingMessage->value.choice.ENBStatusTransfer; d_assert(ENBStatusTransfer, return,); d_trace(3, "[MME] ENB status transfer\n"); for (i = 0; i < ENBStatusTransfer->protocolIEs.list.count; i++) { ie = ENBStatusTransfer->protocolIEs.list.array[i]; switch(ie->id) { case S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID: MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; break; case S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID: ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; break; case S1AP_ProtocolIE_ID_id_eNB_StatusTransfer_TransparentContainer: ENB_StatusTransfer_TransparentContainer = &ie->value.choice.ENB_StatusTransfer_TransparentContainer; break; default: break; } } d_trace(5, " IP[%s] ENB_ID[%d]\n", CORE_ADDR(enb->addr, buf), enb->enb_id); d_assert(MME_UE_S1AP_ID, return,); d_assert(ENB_UE_S1AP_ID, return,); d_assert(ENB_StatusTransfer_TransparentContainer, return,); source_ue = enb_ue_find_by_enb_ue_s1ap_id(enb, *ENB_UE_S1AP_ID); d_assert(source_ue, return, "Cannot find UE for eNB-UE-S1AP-ID[%d] and eNB[%s:%d]", *ENB_UE_S1AP_ID, CORE_ADDR(enb->addr, buf), enb->enb_id); d_assert(source_ue->mme_ue_s1ap_id == *MME_UE_S1AP_ID, return, "Conflict MME-UE-S1AP-ID : %d != %d\n", source_ue->mme_ue_s1ap_id, *MME_UE_S1AP_ID); target_ue = source_ue->target_ue; d_assert(target_ue, return,); d_trace(5, " Source : ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", source_ue->enb_ue_s1ap_id, source_ue->mme_ue_s1ap_id); d_trace(5, " Target : ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", target_ue->enb_ue_s1ap_id, target_ue->mme_ue_s1ap_id); rv = s1ap_send_mme_status_transfer(target_ue, ENB_StatusTransfer_TransparentContainer); d_assert(rv == CORE_OK,,); } void s1ap_handle_handover_notification(mme_enb_t *enb, s1ap_message_t *message) { status_t rv; char buf[CORE_ADDRSTRLEN]; int i; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_HandoverNotify_t *HandoverNotify = NULL; S1AP_HandoverNotifyIEs_t *ie = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_EUTRAN_CGI_t *EUTRAN_CGI = NULL; S1AP_TAI_t *TAI = NULL; S1AP_PLMNidentity_t *pLMNidentity = NULL; S1AP_CellIdentity_t *cell_ID = NULL; S1AP_TAC_t *tAC = NULL; enb_ue_t *source_ue = NULL; enb_ue_t *target_ue = NULL; mme_ue_t *mme_ue = NULL; mme_sess_t *sess = NULL; mme_bearer_t *bearer = NULL; d_assert(enb, return,); d_assert(enb->sock, return,); d_assert(message, return,); initiatingMessage = message->choice.initiatingMessage; d_assert(initiatingMessage, return,); HandoverNotify = &initiatingMessage->value.choice.HandoverNotify; d_assert(HandoverNotify, return,); d_trace(3, "[MME] Handover notification\n"); for (i = 0; i < HandoverNotify->protocolIEs.list.count; i++) { ie = HandoverNotify->protocolIEs.list.array[i]; switch(ie->id) { case S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID: MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; break; case S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID: ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; break; case S1AP_ProtocolIE_ID_id_EUTRAN_CGI: EUTRAN_CGI = &ie->value.choice.EUTRAN_CGI; break; case S1AP_ProtocolIE_ID_id_TAI: TAI = &ie->value.choice.TAI; break; default: break; } } d_trace(5, " IP[%s] ENB_ID[%d]\n", CORE_ADDR(enb->addr, buf), enb->enb_id); d_assert(EUTRAN_CGI, return,); pLMNidentity = &EUTRAN_CGI->pLMNidentity; d_assert(pLMNidentity && pLMNidentity->size == sizeof(plmn_id_t), return,); cell_ID = &EUTRAN_CGI->cell_ID; d_assert(cell_ID, return,); d_assert(TAI, return,); pLMNidentity = &TAI->pLMNidentity; d_assert(pLMNidentity && pLMNidentity->size == sizeof(plmn_id_t), return,); tAC = &TAI->tAC; d_assert(tAC && tAC->size == sizeof(c_uint16_t), return,); d_assert(ENB_UE_S1AP_ID, return,); d_assert(MME_UE_S1AP_ID, return,); target_ue = enb_ue_find_by_enb_ue_s1ap_id(enb, *ENB_UE_S1AP_ID); d_assert(target_ue, return, "Cannot find UE for eNB-UE-S1AP-ID[%d] and eNB[%s:%d]", *ENB_UE_S1AP_ID, CORE_ADDR(enb->addr, buf), enb->enb_id); d_assert(target_ue->mme_ue_s1ap_id == *MME_UE_S1AP_ID, return, "Conflict MME-UE-S1AP-ID : %d != %d\n", target_ue->mme_ue_s1ap_id, *MME_UE_S1AP_ID); source_ue = target_ue->source_ue; d_assert(source_ue, return,); mme_ue = source_ue->mme_ue; d_assert(mme_ue, return,); d_trace(5, " Source : ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", source_ue->enb_ue_s1ap_id, source_ue->mme_ue_s1ap_id); d_trace(5, " Target : ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", target_ue->enb_ue_s1ap_id, target_ue->mme_ue_s1ap_id); mme_ue_associate_enb_ue(mme_ue, target_ue); memcpy(&target_ue->nas.tai.plmn_id, pLMNidentity->buf, sizeof(target_ue->nas.tai.plmn_id)); memcpy(&target_ue->nas.tai.tac, tAC->buf, sizeof(target_ue->nas.tai.tac)); target_ue->nas.tai.tac = ntohs(target_ue->nas.tai.tac); memcpy(&target_ue->nas.e_cgi.plmn_id, pLMNidentity->buf, sizeof(target_ue->nas.e_cgi.plmn_id)); memcpy(&target_ue->nas.e_cgi.cell_id, cell_ID->buf, sizeof(target_ue->nas.e_cgi.cell_id)); target_ue->nas.e_cgi.cell_id = (ntohl(target_ue->nas.e_cgi.cell_id) >> 4); d_trace(5, " OLD TAI[PLMN_ID:0x%x,TAC:%d]\n", mme_ue->tai.plmn_id, mme_ue->tai.tac); d_trace(5, " OLD E_CGI[PLMN_ID:0x%x,CELL_ID:%d]\n", mme_ue->e_cgi.plmn_id, mme_ue->e_cgi.cell_id); d_trace(5, " TAI[PLMN_ID:0x%x,TAC:%d]\n", target_ue->nas.tai.plmn_id, target_ue->nas.tai.tac); d_trace(5, " E_CGI[PLMN_ID:0x%x,CELL_ID:%d]\n", target_ue->nas.e_cgi.plmn_id, target_ue->nas.e_cgi.cell_id); /* Copy TAI and ECGI from enb_ue */ memcpy(&mme_ue->tai, &target_ue->nas.tai, sizeof(tai_t)); memcpy(&mme_ue->e_cgi, &target_ue->nas.e_cgi, sizeof(e_cgi_t)); sess = mme_sess_first(mme_ue); while(sess) { bearer = mme_bearer_first(sess); while(bearer) { bearer->enb_s1u_teid = bearer->target_s1u_teid; memcpy(&bearer->enb_s1u_ip, &bearer->target_s1u_ip, sizeof(ip_t)); GTP_COUNTER_INCREMENT( mme_ue, GTP_COUNTER_MODIFY_BEARER_BY_HANDOVER_NOTIFY); rv = mme_gtp_send_modify_bearer_request(bearer, 1); d_assert(rv == CORE_OK, return, "gtp send failed"); bearer = mme_bearer_next(bearer); } sess = mme_sess_next(sess); } } void s1ap_handle_s1_reset( mme_enb_t *enb, s1ap_message_t *message) { status_t rv; char buf[CORE_ADDRSTRLEN]; int i; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_Reset_t *Reset = NULL; S1AP_ResetIEs_t *ie = NULL; S1AP_Cause_t *Cause = NULL; S1AP_ResetType_t *ResetType = NULL; S1AP_UE_associatedLogicalS1_ConnectionListRes_t *partOfS1_Interface = NULL; d_assert(enb, return,); d_assert(enb->sock, return,); d_assert(message, return,); initiatingMessage = message->choice.initiatingMessage; d_assert(initiatingMessage, return,); Reset = &initiatingMessage->value.choice.Reset; d_assert(Reset, return,); d_trace(3, "[MME] Reset\n"); for (i = 0; i < Reset->protocolIEs.list.count; i++) { ie = Reset->protocolIEs.list.array[i]; switch(ie->id) { case S1AP_ProtocolIE_ID_id_Cause: Cause = &ie->value.choice.Cause; break; case S1AP_ProtocolIE_ID_id_ResetType: ResetType = &ie->value.choice.ResetType; break; default: break; } } d_trace(5, " IP[%s] ENB_ID[%d]\n", CORE_ADDR(enb->addr, buf), enb->enb_id); d_assert(Cause, return,); d_trace(5, " Cause[Group:%d Cause:%d]\n", Cause->present, Cause->choice.radioNetwork); switch(Cause->present) { case S1AP_Cause_PR_radioNetwork: case S1AP_Cause_PR_transport: case S1AP_Cause_PR_protocol: case S1AP_Cause_PR_misc: break; case S1AP_Cause_PR_nas: d_warn("NAS-Cause[%d]", Cause->choice.nas); default: d_warn("Invalid cause group[%d]", Cause->present); break; } d_assert(ResetType, return,); switch(ResetType->present) { case S1AP_ResetType_PR_s1_Interface: { d_trace(5, " S1AP_ResetType_PR_s1_Interface\n"); rv = enb_ue_remove_in_enb(enb); d_assert(rv == CORE_OK,,); break; } case S1AP_ResetType_PR_partOfS1_Interface: { d_trace(5, " S1AP_ResetType_PR_partOfS1_Interface\n"); partOfS1_Interface = ResetType->choice.partOfS1_Interface; d_assert(partOfS1_Interface, return,); for (i = 0; i < partOfS1_Interface->list.count; i++) { S1AP_UE_associatedLogicalS1_ConnectionItemRes_t *ie2 = NULL; S1AP_UE_associatedLogicalS1_ConnectionItem_t *item = NULL; enb_ue_t *enb_ue = NULL; ie2 = (S1AP_UE_associatedLogicalS1_ConnectionItemRes_t *) partOfS1_Interface->list.array[i]; d_assert(ie2, return,); item = &ie2->value.choice.UE_associatedLogicalS1_ConnectionItem; d_assert(item, return,); d_trace(5, " MME_UE_S1AP_ID[%d] ENB_UE_S1AP_ID[%d]\n", item->mME_UE_S1AP_ID ? *item->mME_UE_S1AP_ID : -1, item->eNB_UE_S1AP_ID ? *item->eNB_UE_S1AP_ID : -1); if (item->mME_UE_S1AP_ID) enb_ue = enb_ue_find_by_mme_ue_s1ap_id( *item->mME_UE_S1AP_ID); else if (item->eNB_UE_S1AP_ID) enb_ue = enb_ue_find_by_enb_ue_s1ap_id(enb, *item->eNB_UE_S1AP_ID); if (enb_ue == NULL) { d_warn("Cannot find S1 Context " "(MME_UE_S1AP_ID[%d] ENB_UE_S1AP_ID[%d])\n", item->mME_UE_S1AP_ID ? *item->mME_UE_S1AP_ID : -1, item->eNB_UE_S1AP_ID ? *item->eNB_UE_S1AP_ID : -1); continue; } rv = enb_ue_remove(enb_ue); d_assert(rv == CORE_OK,,); } break; } default: d_warn("Invalid ResetType[%d]", ResetType->present); break; } rv = s1ap_send_s1_reset_ack(enb, partOfS1_Interface); d_assert(rv == CORE_OK,,); } nextepc-0.3.10/src/mme/s1ap_handler.h000066400000000000000000000042271333553357400173400ustar00rootroot00000000000000#ifndef __S1AP_HANDLER_H__ #define __S1AP_HANDLER_H__ #include "s1ap/s1ap_message.h" #include "mme_context.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(void) s1ap_handle_s1_setup_request( mme_enb_t *enb, s1ap_message_t *message); CORE_DECLARE(void) s1ap_handle_initial_ue_message( mme_enb_t *enb, s1ap_message_t *message); CORE_DECLARE(void) s1ap_handle_uplink_nas_transport( mme_enb_t *enb, s1ap_message_t *message); CORE_DECLARE(void) s1ap_handle_ue_capability_info_indication( mme_enb_t *enb, s1ap_message_t *message); CORE_DECLARE(void) s1ap_handle_initial_context_setup_response( mme_enb_t *enb, s1ap_message_t *message); CORE_DECLARE(void) s1ap_handle_initial_context_setup_failure( mme_enb_t *enb, s1ap_message_t *message); CORE_DECLARE(void) s1ap_handle_e_rab_setup_response( mme_enb_t *enb, s1ap_message_t *message); CORE_DECLARE(void) s1ap_handle_ue_context_release_request( mme_enb_t *enb, s1ap_message_t *message); CORE_DECLARE(void) s1ap_handle_ue_context_release_complete( mme_enb_t *enb, s1ap_message_t *message); CORE_DECLARE(void) s1ap_handle_paging(mme_ue_t *mme_ue); CORE_DECLARE(void) s1ap_handle_path_switch_request( mme_enb_t *enb, s1ap_message_t *message); CORE_DECLARE(void) s1ap_handle_handover_required( mme_enb_t *enb, s1ap_message_t *message); CORE_DECLARE(void) s1ap_handle_handover_request_ack( mme_enb_t *enb, s1ap_message_t *message); CORE_DECLARE(void) s1ap_handle_handover_failure( mme_enb_t *enb, s1ap_message_t *message); CORE_DECLARE(void) s1ap_handle_handover_cancel( mme_enb_t *enb, s1ap_message_t *message); CORE_DECLARE(void) s1ap_handle_enb_status_transfer( mme_enb_t *enb, s1ap_message_t *message); CORE_DECLARE(void) s1ap_handle_enb_configuration_transfer( mme_enb_t *enb, s1ap_message_t *message, pkbuf_t *pkbuf); CORE_DECLARE(void) s1ap_handle_handover_notification( mme_enb_t *enb, s1ap_message_t *message); CORE_DECLARE(void) s1ap_handle_s1_reset( mme_enb_t *enb, s1ap_message_t *message); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __S1AP_HANDLER_H__ */ nextepc-0.3.10/src/mme/s1ap_path.c000066400000000000000000000341301333553357400166460ustar00rootroot00000000000000#define TRACE_MODULE _s1ap_path #include "core_debug.h" #include "core_thread.h" #include "mme_event.h" #include "nas_security.h" #include "nas_path.h" #include "s1ap_conv.h" #include "s1ap_build.h" #include "s1ap_path.h" static status_t s1ap_server_list(list_t *list, int type); static status_t s1ap_delete_list(list_t *list); status_t s1ap_open(void) { status_t rv; #if USE_USRSCTP != 1 int type = SOCK_STREAM; #else int type = SOCK_SEQPACKET; #endif rv = s1ap_server_list(&mme_self()->s1ap_list, type); d_assert(rv == CORE_OK, return CORE_ERROR,); rv = s1ap_server_list(&mme_self()->s1ap_list6, type); d_assert(rv == CORE_OK, return CORE_ERROR,); return CORE_OK; } status_t s1ap_close() { s1ap_delete_list(&mme_self()->s1ap_list); s1ap_delete_list(&mme_self()->s1ap_list6); return CORE_OK; } static status_t s1ap_server_list(list_t *list, int type) { status_t rv; sock_node_t *snode = NULL; d_assert(list, return CORE_ERROR,); for (snode = list_first(list); snode; snode = list_next(snode)) { rv = s1ap_server(snode, type); d_assert(rv == CORE_OK, return CORE_ERROR,); } return CORE_OK; } static status_t s1ap_delete_list(list_t *list) { sock_node_t *snode = NULL; for (snode = list_first(list); snode; snode = list_next(snode)) { s1ap_delete(snode->sock); } return CORE_OK; } status_t s1ap_send_to_enb(mme_enb_t *enb, pkbuf_t *pkbuf, c_uint16_t stream_no) { char buf[CORE_ADDRSTRLEN]; status_t rv; d_assert(enb, return CORE_ERROR,); d_assert(pkbuf, return CORE_ERROR,); d_assert(enb->sock, return CORE_ERROR,); d_trace(5, " IP[%s] ENB_ID[%d]\n", CORE_ADDR(enb->addr, buf), enb->enb_id); rv = s1ap_send(enb->sock, pkbuf, enb->sock_type == SOCK_STREAM ? NULL : enb->addr, stream_no); if (rv != CORE_OK) { d_error("s1_send error"); pkbuf_free(pkbuf); } return CORE_OK;; } status_t s1ap_send_to_enb_ue(enb_ue_t *enb_ue, pkbuf_t *pkbuf) { mme_enb_t *enb = NULL; mme_ue_t *mme_ue = NULL; d_assert(enb_ue, return CORE_ERROR,); enb = enb_ue->enb; d_assert(enb, return CORE_ERROR,); mme_ue = enb_ue->mme_ue; d_assert(mme_ue, return CORE_ERROR,); return s1ap_send_to_enb(enb, pkbuf, mme_ue->ostream_id); } status_t s1ap_delayed_send_to_enb_ue( enb_ue_t *enb_ue, pkbuf_t *pkbuf, c_uint32_t duration) { tm_block_id timer = 0; d_assert(enb_ue, return CORE_ERROR,); d_assert(pkbuf, return CORE_ERROR,); if (duration) { timer = timer_create( &mme_self()->tm_service, MME_EVT_S1AP_DELAYED_SEND, duration); d_assert(timer, return CORE_ERROR,); timer_set_param1(timer, (c_uintptr_t)enb_ue->index); timer_set_param2(timer, (c_uintptr_t)pkbuf); timer_set_param3(timer, timer); tm_start(timer); return CORE_OK; } else { mme_enb_t *enb = NULL; enb = enb_ue->enb; d_assert(enb, return CORE_ERROR,); return s1ap_send_to_enb_ue(enb_ue, pkbuf); } } status_t s1ap_send_to_esm(mme_ue_t *mme_ue, pkbuf_t *esmbuf) { event_t e; d_assert(mme_ue, return CORE_ERROR, "Null param"); d_assert(esmbuf, return CORE_ERROR, "Null param"); event_set(&e, MME_EVT_ESM_MESSAGE); event_set_param1(&e, (c_uintptr_t)mme_ue->index); event_set_param2(&e, (c_uintptr_t)esmbuf); mme_event_send(&e); return CORE_OK; } status_t s1ap_send_to_nas(enb_ue_t *enb_ue, S1AP_ProcedureCode_t procedureCode, S1AP_NAS_PDU_t *nasPdu) { nas_security_header_t *sh = NULL; nas_security_header_type_t security_header_type; nas_emm_header_t *h = NULL; pkbuf_t *nasbuf = NULL; event_t e; d_assert(enb_ue, return CORE_ERROR, "Null param"); d_assert(nasPdu, return CORE_ERROR, "Null param"); /* The Packet Buffer(pkbuf_t) for NAS message MUST make a HEADROOM. * When calculating AES_CMAC, we need to use the headroom of the packet. */ nasbuf = pkbuf_alloc(NAS_HEADROOM, nasPdu->size); d_assert(nasbuf, return CORE_ERROR, "Null param"); memcpy(nasbuf->payload, nasPdu->buf, nasPdu->size); sh = nasbuf->payload; d_assert(sh, return CORE_ERROR, "Null param"); memset(&security_header_type, 0, sizeof(nas_security_header_type_t)); switch(sh->security_header_type) { case NAS_SECURITY_HEADER_PLAIN_NAS_MESSAGE: break; case NAS_SECURITY_HEADER_FOR_SERVICE_REQUEST_MESSAGE: security_header_type.service_request = 1; break; case NAS_SECURITY_HEADER_INTEGRITY_PROTECTED: security_header_type.integrity_protected = 1; d_assert(pkbuf_header(nasbuf, -6) == CORE_OK, return CORE_ERROR, "pkbuf_header error"); break; case NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHERED: security_header_type.integrity_protected = 1; security_header_type.ciphered = 1; d_assert(pkbuf_header(nasbuf, -6) == CORE_OK, return CORE_ERROR, "pkbuf_header error"); break; case NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_NEW_SECURITY_CONTEXT: security_header_type.integrity_protected = 1; security_header_type.new_security_context = 1; d_assert(pkbuf_header(nasbuf, -6) == CORE_OK, return CORE_ERROR, "pkbuf_header error"); break; case NAS_SECURITY_HEADER_INTEGRITY_PROTECTED_AND_CIPHTERD_WITH_NEW_INTEGRITY_CONTEXT: security_header_type.integrity_protected = 1; security_header_type.ciphered = 1; security_header_type.new_security_context = 1; d_assert(pkbuf_header(nasbuf, -6) == CORE_OK, return CORE_ERROR, "pkbuf_header error"); break; default: d_error("Not implemented(securiry header type:0x%x)", sh->security_header_type); return CORE_ERROR; } if (enb_ue->mme_ue) { d_assert(nas_security_decode( enb_ue->mme_ue, security_header_type, nasbuf) == CORE_OK, pkbuf_free(nasbuf);return CORE_ERROR, "nas_security_decode failed"); } h = nasbuf->payload; d_assert(h, pkbuf_free(nasbuf); return CORE_ERROR, "Null param"); if (h->protocol_discriminator == NAS_PROTOCOL_DISCRIMINATOR_EMM) { event_set(&e, MME_EVT_EMM_MESSAGE); event_set_param1(&e, (c_uintptr_t)enb_ue->index); event_set_param2(&e, (c_uintptr_t)procedureCode); event_set_param3(&e, (c_uintptr_t)security_header_type.type); event_set_param4(&e, (c_uintptr_t)nasbuf); mme_event_send(&e); } else if (h->protocol_discriminator == NAS_PROTOCOL_DISCRIMINATOR_ESM) { mme_ue_t *mme_ue = enb_ue->mme_ue; d_assert(mme_ue, return CORE_ERROR, "Null param"); s1ap_send_to_esm(mme_ue, nasbuf); } else d_assert(0, pkbuf_free(nasbuf); return CORE_ERROR, "Unknown protocol:%d", h->protocol_discriminator); return CORE_OK; } status_t s1ap_send_initial_context_setup_request(mme_ue_t *mme_ue) { status_t rv; pkbuf_t *s1apbuf = NULL; d_assert(mme_ue, return CORE_ERROR, "Null param"); rv = s1ap_build_initial_context_setup_request(&s1apbuf, mme_ue, NULL); d_assert(rv == CORE_OK && s1apbuf, return CORE_ERROR, "s1ap build error"); rv = nas_send_to_enb(mme_ue, s1apbuf); d_assert(rv == CORE_OK, return CORE_ERROR, "s1ap send error"); return CORE_OK; } status_t s1ap_send_ue_context_release_command( enb_ue_t *enb_ue, S1AP_Cause_PR group, long cause, c_uint8_t action, c_uint32_t delay) { status_t rv; pkbuf_t *s1apbuf = NULL; d_assert(action != S1AP_UE_CTX_REL_INVALID_ACTION, return CORE_ERROR, "Should give valid action for UE Context Release Command"); d_assert(enb_ue, return CORE_ERROR, "Null param"); enb_ue->ue_ctx_rel_action = action; d_trace(3, "[MME] UE Context release command\n"); d_trace(5, " ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", enb_ue->enb_ue_s1ap_id, enb_ue->mme_ue_s1ap_id); d_trace(5, " Group[%d] Cause[%d] Action[%d] Delay[%d]\n", group, cause, action, delay); rv = s1ap_build_ue_context_release_command(&s1apbuf, enb_ue, group, cause); d_assert(rv == CORE_OK && s1apbuf, return CORE_ERROR, "s1ap build error"); rv = s1ap_delayed_send_to_enb_ue(enb_ue, s1apbuf, delay); d_assert(rv == CORE_OK,, "s1ap send error"); return CORE_OK; } status_t s1ap_send_mme_configuration_transfer( mme_enb_t *target_enb, S1AP_SONConfigurationTransfer_t *SONConfigurationTransfer) { status_t rv; pkbuf_t *s1apbuf = NULL; d_assert(target_enb, return CORE_ERROR,); d_assert(SONConfigurationTransfer, return CORE_ERROR,); rv = s1ap_build_mme_configuration_transfer( &s1apbuf, SONConfigurationTransfer); d_assert(rv == CORE_OK && s1apbuf, return CORE_ERROR, "s1ap build error"); rv = s1ap_send_to_enb(target_enb, s1apbuf, S1AP_NON_UE_SIGNALLING); d_assert(rv == CORE_OK,, "s1ap send error"); return rv; } status_t s1ap_send_path_switch_ack(mme_ue_t *mme_ue) { status_t rv; pkbuf_t *s1apbuf = NULL; d_assert(mme_ue, return CORE_ERROR, "Null param"); rv = s1ap_build_path_switch_ack(&s1apbuf, mme_ue); d_assert(rv == CORE_OK && s1apbuf, return CORE_ERROR, "s1ap build error"); rv = nas_send_to_enb(mme_ue, s1apbuf); d_assert(rv == CORE_OK, return CORE_ERROR, "s1ap send error"); return CORE_OK; } status_t s1ap_send_handover_command(enb_ue_t *source_ue) { status_t rv; pkbuf_t *s1apbuf = NULL; d_assert(source_ue, return CORE_ERROR,); rv = s1ap_build_handover_command(&s1apbuf, source_ue); d_assert(rv == CORE_OK && s1apbuf, return CORE_ERROR, "s1ap build error"); rv = s1ap_send_to_enb_ue(source_ue, s1apbuf); d_assert(rv == CORE_OK,, "s1ap send error"); return rv; } status_t s1ap_send_handover_preparation_failure( enb_ue_t *source_ue, S1AP_Cause_t *cause) { status_t rv; pkbuf_t *s1apbuf = NULL; d_assert(source_ue, return CORE_ERROR,); d_assert(cause, return CORE_ERROR,); rv = s1ap_build_handover_preparation_failure(&s1apbuf, source_ue, cause); d_assert(rv == CORE_OK && s1apbuf, return CORE_ERROR, "s1ap build error"); rv = s1ap_send_to_enb_ue(source_ue, s1apbuf); d_assert(rv == CORE_OK,, "s1ap send error"); return rv; } status_t s1ap_send_handover_cancel_ack(enb_ue_t *source_ue) { status_t rv; pkbuf_t *s1apbuf = NULL; d_assert(source_ue, return CORE_ERROR,); rv = s1ap_build_handover_cancel_ack(&s1apbuf, source_ue); d_assert(rv == CORE_OK && s1apbuf, return CORE_ERROR, "s1ap build error"); rv = s1ap_send_to_enb_ue(source_ue, s1apbuf); d_assert(rv == CORE_OK,, "s1ap send error"); return rv; } status_t s1ap_send_handover_request( mme_ue_t *mme_ue, mme_enb_t *target_enb, S1AP_ENB_UE_S1AP_ID_t *enb_ue_s1ap_id, S1AP_MME_UE_S1AP_ID_t *mme_ue_s1ap_id, S1AP_HandoverType_t *handovertype, S1AP_Cause_t *cause, S1AP_Source_ToTarget_TransparentContainer_t *source_totarget_transparentContainer) { status_t rv; pkbuf_t *s1apbuf = NULL; enb_ue_t *source_ue = NULL, *target_ue = NULL; d_trace(3, "[MME] Handover request\n"); d_assert(target_enb, return CORE_ERROR, "Cannot find target eNB"); d_assert(mme_ue, return CORE_ERROR,); source_ue = mme_ue->enb_ue; d_assert(source_ue, return CORE_ERROR,); d_assert(source_ue->target_ue == NULL, return CORE_ERROR, "Handover Required Duplicated"); target_ue = enb_ue_add(target_enb); d_assert(target_ue, return CORE_ERROR,); d_trace(5, " Source : ENB_UE_S1AP_ID[%d] MME_UE_S1AP_ID[%d]\n", source_ue->enb_ue_s1ap_id, source_ue->mme_ue_s1ap_id); d_trace(5, " Target : ENB_UE_S1AP_ID[Unknown] MME_UE_S1AP_ID[%d]\n", target_ue->mme_ue_s1ap_id); rv = source_ue_associate_target_ue(source_ue, target_ue); d_assert(rv == CORE_OK, return CORE_ERROR,); rv = s1ap_build_handover_request(&s1apbuf, mme_ue, target_ue, enb_ue_s1ap_id, mme_ue_s1ap_id, handovertype, cause, source_totarget_transparentContainer); d_assert(rv == CORE_OK && s1apbuf, return CORE_ERROR, "s1ap build error"); rv = s1ap_send_to_enb_ue(target_ue, s1apbuf); d_assert(rv == CORE_OK,, "s1ap send error"); return rv; } status_t s1ap_send_mme_status_transfer( enb_ue_t *target_ue, S1AP_ENB_StatusTransfer_TransparentContainer_t *enb_statustransfer_transparentContainer) { status_t rv; pkbuf_t *s1apbuf = NULL; d_assert(target_ue, return CORE_ERROR,); rv = s1ap_build_mme_status_transfer(&s1apbuf, target_ue, enb_statustransfer_transparentContainer); d_assert(rv == CORE_OK && s1apbuf, return CORE_ERROR, "s1ap build error"); rv = s1ap_send_to_enb_ue(target_ue, s1apbuf); d_assert(rv == CORE_OK,, "s1ap send error"); return rv; } status_t s1ap_send_error_indication( mme_enb_t *enb, S1AP_MME_UE_S1AP_ID_t *mme_ue_s1ap_id, S1AP_ENB_UE_S1AP_ID_t *enb_ue_s1ap_id, S1AP_Cause_PR group, long cause) { status_t rv; pkbuf_t *s1apbuf = NULL; d_assert(enb, return CORE_ERROR,); rv = s1ap_build_error_indication(&s1apbuf, mme_ue_s1ap_id, enb_ue_s1ap_id, group, cause); d_assert(rv == CORE_OK && s1apbuf, return CORE_ERROR, "s1ap build error"); rv = s1ap_send_to_enb(enb, s1apbuf, S1AP_NON_UE_SIGNALLING); d_assert(rv == CORE_OK,, "s1ap send error"); return rv; } status_t s1ap_send_s1_reset_ack( mme_enb_t *enb, S1AP_UE_associatedLogicalS1_ConnectionListRes_t *partOfS1_Interface) { status_t rv; pkbuf_t *s1apbuf = NULL; d_assert(enb, return CORE_ERROR,); rv = s1ap_build_s1_reset_ack(&s1apbuf, partOfS1_Interface); d_assert(rv == CORE_OK && s1apbuf, return CORE_ERROR, "s1ap build error"); rv = s1ap_send_to_enb(enb, s1apbuf, S1AP_NON_UE_SIGNALLING); d_assert(rv == CORE_OK,, "s1ap send error"); return rv; } nextepc-0.3.10/src/mme/s1ap_path.h000066400000000000000000000057051333553357400166610ustar00rootroot00000000000000#ifndef __S1AP_PATH_H__ #define __S1AP_PATH_H__ #include "core_pkbuf.h" #include "mme_context.h" #include "s1ap/s1ap_message.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define S1AP_NON_UE_SIGNALLING 0 CORE_DECLARE(status_t) s1ap_init(int sctp_streams, c_uint16_t port); CORE_DECLARE(status_t) s1ap_final(); CORE_DECLARE(status_t) s1ap_open(); CORE_DECLARE(status_t) s1ap_close(); CORE_DECLARE(status_t) s1ap_server(sock_node_t *snode, int type); CORE_DECLARE(status_t) s1ap_delete(sock_id sock); CORE_DECLARE(int) s1ap_recv_handler(sock_id sock, void *data); CORE_DECLARE(status_t) s1ap_send(sock_id sock, pkbuf_t *pkbuf, c_sockaddr_t *addr, c_uint16_t stream_no); CORE_DECLARE(status_t) s1ap_recv(sock_id id, pkbuf_t *pkbuf); CORE_DECLARE(status_t) s1ap_send_to_enb( mme_enb_t *enb, pkbuf_t *pkb, c_uint16_t stream_no); CORE_DECLARE(status_t) s1ap_send_to_enb_ue(enb_ue_t *enb_ue, pkbuf_t *pkbuf); CORE_DECLARE(status_t) s1ap_delayed_send_to_enb_ue(enb_ue_t *enb_ue, pkbuf_t *pkbuf, c_uint32_t duration); CORE_DECLARE(status_t) s1ap_send_to_nas(enb_ue_t *enb_ue, S1AP_ProcedureCode_t procedureCode, S1AP_NAS_PDU_t *nasPdu); CORE_DECLARE(status_t) s1ap_send_to_esm(mme_ue_t *mme_ue, pkbuf_t *esmbuf); CORE_DECLARE(status_t) s1ap_send_initial_context_setup_request( mme_ue_t *mme_ue); CORE_DECLARE(status_t) s1ap_send_ue_context_release_command( enb_ue_t *enb_ue, S1AP_Cause_PR group, long cause, c_uint8_t action, c_uint32_t delay); CORE_DECLARE(status_t) s1ap_send_mme_configuration_transfer( mme_enb_t *target_enb, S1AP_SONConfigurationTransfer_t *SONConfigurationTransfer); CORE_DECLARE(status_t) s1ap_send_path_switch_ack(mme_ue_t *mme_ue); CORE_DECLARE(status_t) s1ap_send_handover_command(enb_ue_t *source_ue); CORE_DECLARE(status_t) s1ap_send_handover_preparation_failure( enb_ue_t *source_ue, S1AP_Cause_t *cause); CORE_DECLARE(status_t) s1ap_send_handover_request( mme_ue_t *mme_ue, mme_enb_t *target_enb, S1AP_ENB_UE_S1AP_ID_t *enb_ue_s1ap_id, S1AP_MME_UE_S1AP_ID_t *mme_ue_s1ap_id, S1AP_HandoverType_t *handovertype, S1AP_Cause_t *cause, S1AP_Source_ToTarget_TransparentContainer_t *source_totarget_transparentContainer); CORE_DECLARE(status_t) s1ap_send_handover_cancel_ack(enb_ue_t *source_ue); CORE_DECLARE(status_t) s1ap_send_mme_status_transfer( enb_ue_t *target_ue, S1AP_ENB_StatusTransfer_TransparentContainer_t *enb_statustransfer_transparentContainer); CORE_DECLARE(status_t) s1ap_send_error_indication( mme_enb_t *enb, S1AP_MME_UE_S1AP_ID_t *mme_ue_s1ap_id, S1AP_ENB_UE_S1AP_ID_t *enb_ue_s1ap_id, S1AP_Cause_PR group, long cause); CORE_DECLARE(status_t) s1ap_send_s1_reset_ack( mme_enb_t *enb, S1AP_UE_associatedLogicalS1_ConnectionListRes_t *partOfS1_Interface); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* !__S1_PATH_H__ */ nextepc-0.3.10/src/mme/s1ap_sctp.c000066400000000000000000000221661333553357400166710ustar00rootroot00000000000000#define TRACE_MODULE _s1ap_sctp #include "core_debug.h" #include "core_thread.h" #if HAVE_NETINET_SCTP_H #include #endif #include "mme_event.h" #include "s1ap_path.h" static int s1ap_accept_handler(sock_id sock, void *data); status_t s1ap_init(int sctp_streams, c_uint16_t port) { sctp_set_num_ostreams(sctp_streams); return CORE_OK; } status_t s1ap_final() { return CORE_OK; } status_t s1ap_server(sock_node_t *snode, int type) { status_t rv; char buf[CORE_ADDRSTRLEN]; d_assert(snode, return CORE_ERROR,); rv = sctp_server(&snode->sock, type, snode->list); d_assert(rv == CORE_OK, return CORE_ERROR,); rv = sock_register(snode->sock, s1ap_accept_handler, NULL); d_assert(rv == CORE_OK, return CORE_ERROR,); d_trace(1, "s1ap_server() [%s]:%d\n", CORE_ADDR(snode->list, buf), CORE_PORT(snode->list)); return CORE_OK; } status_t s1ap_delete(sock_id sock) { d_assert(sock, return CORE_ERROR,); return sock_delete(sock); } status_t s1ap_send(sock_id sock, pkbuf_t *pkbuf, c_sockaddr_t *addr, c_uint16_t stream_no) { int sent; d_assert(sock, return CORE_ERROR,); d_assert(pkbuf, return CORE_ERROR,); sent = core_sctp_sendmsg(sock, pkbuf->payload, pkbuf->len, addr, SCTP_S1AP_PPID, stream_no); d_trace(50, "[S1AP] SEND[%d] : ", sent); d_trace_hex(50, pkbuf->payload, pkbuf->len); if (sent < 0 || sent != pkbuf->len) { d_error("core_sctp_sendmsg error (%d:%s)", errno, strerror(errno)); return CORE_ERROR; } pkbuf_free(pkbuf); return CORE_OK; } status_t s1ap_recv(sock_id id, pkbuf_t *pkbuf) { int size; size = core_sctp_recvdata(id, pkbuf->payload, MAX_SDU_LEN, NULL, NULL); if (size <= 0) { d_error("s1ap_recv() failed"); return CORE_ERROR; } pkbuf->len = size; return CORE_OK;; } static int s1ap_accept_handler(sock_id id, void *data) { char buf[CORE_ADDRSTRLEN]; status_t rv; sock_id new; d_assert(id, return -1, "Null param"); rv = sock_accept(&new, id); if (rv == CORE_OK) { c_sockaddr_t *addr = NULL; event_t e; addr = core_calloc(1, sizeof(c_sockaddr_t)); d_assert(addr, return -1,); memcpy(addr, sock_remote_addr(new), sizeof(c_sockaddr_t)); d_trace(1, "eNB-S1 accepted[%s]:%d in s1_path module\n", CORE_ADDR(addr, buf), CORE_PORT(addr)); event_set(&e, MME_EVT_S1AP_LO_ACCEPT); event_set_param1(&e, (c_uintptr_t)new); event_set_param2(&e, (c_uintptr_t)addr); if (mme_event_send(&e) != CORE_OK) { CORE_FREE(addr); } return 0; } else { d_error("sock accept failed(%d:%s)", errno, strerror(errno)); return -1; } } int s1ap_recv_handler(sock_id sock, void *data) { pkbuf_t *pkbuf; int size; event_t e; c_sockaddr_t *addr = NULL; sctp_info_t sinfo; int flags = 0; d_assert(sock, return -1, "Null param"); pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (pkbuf == NULL) { char tmp_buf[MAX_SDU_LEN]; d_fatal("Can't allocate pkbuf"); /* Read data from socket to exit from select */ core_recv(sock, tmp_buf, MAX_SDU_LEN, 0); return -1; } size = core_sctp_recvmsg( sock, pkbuf->payload, pkbuf->len, NULL, &sinfo, &flags); if (size < 0) { d_error("core_sctp_recvmsg(%d) failed(%d:%s)", size, errno, strerror(errno)); return size; } if (flags & MSG_NOTIFICATION) { union sctp_notification *not = (union sctp_notification *)pkbuf->payload; switch(not->sn_header.sn_type) { case SCTP_ASSOC_CHANGE : { d_trace(5, "SCTP_ASSOC_CHANGE:" "[T:%d, F:0x%x, S:%d, I/O:%d/%d]\n", not->sn_assoc_change.sac_type, not->sn_assoc_change.sac_flags, not->sn_assoc_change.sac_state, not->sn_assoc_change.sac_inbound_streams, not->sn_assoc_change.sac_outbound_streams); if (not->sn_assoc_change.sac_state == SCTP_COMM_UP) { d_trace(5, "SCTP_COMM_UP\n"); addr = core_calloc(1, sizeof(c_sockaddr_t)); d_assert(addr, pkbuf_free(pkbuf); return -1,); memcpy(addr, sock_remote_addr(sock), sizeof(c_sockaddr_t)); event_set(&e, MME_EVT_S1AP_LO_SCTP_COMM_UP); event_set_param1(&e, (c_uintptr_t)sock); event_set_param2(&e, (c_uintptr_t)addr); event_set_param3(&e, (c_uintptr_t)not->sn_assoc_change.sac_inbound_streams); event_set_param4(&e, (c_uintptr_t)not->sn_assoc_change.sac_outbound_streams); if (mme_event_send(&e) != CORE_OK) { d_error("Event MME_EVT_S1AP_LO_SCTP_COMM_UP failed"); CORE_FREE(addr); } } else if (not->sn_assoc_change.sac_state == SCTP_SHUTDOWN_COMP || not->sn_assoc_change.sac_state == SCTP_COMM_LOST) { if (not->sn_assoc_change.sac_state == SCTP_SHUTDOWN_COMP) d_trace(5, "SCTP_SHUTDOWN_COMP\n"); if (not->sn_assoc_change.sac_state == SCTP_COMM_LOST) d_trace(5, "SCTP_COMM_LOST\n"); addr = core_calloc(1, sizeof(c_sockaddr_t)); d_assert(addr, pkbuf_free(pkbuf); return -1,); memcpy(addr, sock_remote_addr(sock), sizeof(c_sockaddr_t)); event_set(&e, MME_EVT_S1AP_LO_CONNREFUSED); event_set_param1(&e, (c_uintptr_t)sock); event_set_param2(&e, (c_uintptr_t)addr); if (mme_event_send(&e) != CORE_OK) { d_error("Event MME_EVT_S1AP_LO_CONNREFUSED failed"); CORE_FREE(addr); } sock_delete(sock); } break; } case SCTP_SHUTDOWN_EVENT : { d_trace(5, "SCTP_SHUTDOWN_EVENT:[T:%d, F:0x%x, L:%d]\n", not->sn_shutdown_event.sse_type, not->sn_shutdown_event.sse_flags, not->sn_shutdown_event.sse_length); addr = core_calloc(1, sizeof(c_sockaddr_t)); d_assert(addr, pkbuf_free(pkbuf); return -1,); memcpy(addr, sock_remote_addr(sock), sizeof(c_sockaddr_t)); event_set(&e, MME_EVT_S1AP_LO_CONNREFUSED); event_set_param1(&e, (c_uintptr_t)sock); event_set_param2(&e, (c_uintptr_t)addr); if (mme_event_send(&e) != CORE_OK) { d_error("Event MME_EVT_S1AP_LO_CONNREFUSED failed"); CORE_FREE(addr); } sock_delete(sock); break; } case SCTP_PEER_ADDR_CHANGE: { d_warn("SCTP_PEER_ADDR_CHANGE:[T:%d, F:0x%x, S:%d]\n", not->sn_paddr_change.spc_type, not->sn_paddr_change.spc_flags, not->sn_paddr_change.spc_error); break; } case SCTP_REMOTE_ERROR: { d_warn("SCTP_REMOTE_ERROR:[T:%d, F:0x%x, S:%d]\n", not->sn_remote_error.sre_type, not->sn_remote_error.sre_flags, not->sn_remote_error.sre_error); break; } case SCTP_SEND_FAILED : { d_error("SCTP_SEND_FAILED:[T:%d, F:0x%x, S:%d]\n", not->sn_send_failed.ssf_type, not->sn_send_failed.ssf_flags, not->sn_send_failed.ssf_error); break; } default : { d_error("Discarding event with unknown flags:0x%x type:0x%x", flags, not->sn_header.sn_type); break; } } } else if (flags & MSG_EOR) { addr = core_calloc(1, sizeof(c_sockaddr_t)); d_assert(addr, pkbuf_free(pkbuf); return -1,); memcpy(addr, sock_remote_addr(sock), sizeof(c_sockaddr_t)); event_set(&e, MME_EVT_S1AP_MESSAGE); event_set_param1(&e, (c_uintptr_t)sock); event_set_param2(&e, (c_uintptr_t)addr); event_set_param3(&e, (c_uintptr_t)pkbuf); if (mme_event_send(&e) != CORE_OK) { d_error("Event MME_EVT_S1AP_MESSAGE failed"); pkbuf_free(pkbuf); CORE_FREE(addr); } return 0; } else { d_assert(0, pkbuf_free(pkbuf); return -1, "Unknown flags : 0x%x", flags); } pkbuf_free(pkbuf); return 0; } nextepc-0.3.10/src/mme/s1ap_sm.c000066400000000000000000000213751333553357400163400ustar00rootroot00000000000000#define TRACE_MODULE _s1ap_sm #include "core_debug.h" #include "nas/nas_message.h" #include "gtp/gtp_message.h" #include "s1ap_build.h" #include "s1ap_handler.h" #include "mme_event.h" #include "mme_sm.h" void s1ap_state_initial(fsm_t *s, event_t *e) { d_assert(s, return, "Null param"); mme_sm_trace(3, e); FSM_TRAN(s, &s1ap_state_operational); } void s1ap_state_final(fsm_t *s, event_t *e) { d_assert(s, return, "Null param"); mme_sm_trace(3, e); } void s1ap_state_operational(fsm_t *s, event_t *e) { mme_enb_t *enb = NULL; d_assert(s, return, "Null param"); d_assert(e, return, "Null param"); mme_sm_trace(3, e); enb = mme_enb_find(event_get_param1(e)); d_assert(enb, return,); switch (event_get(e)) { case FSM_ENTRY_SIG: { break; } case FSM_EXIT_SIG: { break; } case MME_EVT_S1AP_MESSAGE: { S1AP_S1AP_PDU_t *pdu = (S1AP_S1AP_PDU_t *)event_get_param4(e); d_assert(pdu, break, "Null param"); switch(pdu->present) { case S1AP_S1AP_PDU_PR_initiatingMessage : { S1AP_InitiatingMessage_t *initiatingMessage = pdu->choice.initiatingMessage; d_assert(initiatingMessage, break, "Null param"); switch(initiatingMessage->procedureCode) { case S1AP_ProcedureCode_id_S1Setup : { s1ap_handle_s1_setup_request(enb, pdu); break; } case S1AP_ProcedureCode_id_initialUEMessage : { s1ap_handle_initial_ue_message(enb, pdu); break; } case S1AP_ProcedureCode_id_uplinkNASTransport : { s1ap_handle_uplink_nas_transport(enb, pdu); break; } case S1AP_ProcedureCode_id_UECapabilityInfoIndication : { s1ap_handle_ue_capability_info_indication( enb, pdu); break; } case S1AP_ProcedureCode_id_UEContextReleaseRequest: { s1ap_handle_ue_context_release_request( enb, pdu); break; } case S1AP_ProcedureCode_id_PathSwitchRequest: { s1ap_handle_path_switch_request(enb, pdu); break; } case S1AP_ProcedureCode_id_eNBConfigurationTransfer: { pkbuf_t *pkbuf = (pkbuf_t *)event_get_param3(e); d_assert(pkbuf, break, "Null param"); s1ap_handle_enb_configuration_transfer( enb, pdu, pkbuf); break; } case S1AP_ProcedureCode_id_HandoverPreparation: { s1ap_handle_handover_required(enb, pdu); break; } case S1AP_ProcedureCode_id_HandoverCancel: { s1ap_handle_handover_cancel(enb, pdu); break; } case S1AP_ProcedureCode_id_eNBStatusTransfer: { s1ap_handle_enb_status_transfer(enb, pdu); break; } case S1AP_ProcedureCode_id_HandoverNotification: { s1ap_handle_handover_notification(enb, pdu); break; } case S1AP_ProcedureCode_id_Reset: { s1ap_handle_s1_reset(enb, pdu); break; } default: { d_warn("Not implemented(choice:%d, proc:%d)", pdu->present, initiatingMessage->procedureCode); break; } } break; } case S1AP_S1AP_PDU_PR_successfulOutcome : { S1AP_SuccessfulOutcome_t *successfulOutcome = pdu->choice.successfulOutcome; d_assert(successfulOutcome, break, "Null param"); switch(successfulOutcome->procedureCode) { case S1AP_ProcedureCode_id_InitialContextSetup : { s1ap_handle_initial_context_setup_response( enb, pdu); break; } case S1AP_ProcedureCode_id_E_RABSetup : { s1ap_handle_e_rab_setup_response(enb, pdu); break; } case S1AP_ProcedureCode_id_E_RABModify : { break; } case S1AP_ProcedureCode_id_E_RABRelease : { break; } case S1AP_ProcedureCode_id_UEContextRelease : { s1ap_handle_ue_context_release_complete( enb, pdu); break; } case S1AP_ProcedureCode_id_HandoverResourceAllocation: { s1ap_handle_handover_request_ack(enb, pdu); break; } default: { d_warn("Not implemented(choice:%d, proc:%d)", pdu->present, successfulOutcome->procedureCode); break; } } break; } case S1AP_S1AP_PDU_PR_unsuccessfulOutcome : { S1AP_UnsuccessfulOutcome_t *unsuccessfulOutcome = pdu->choice.unsuccessfulOutcome; d_assert(unsuccessfulOutcome, break, "Null param"); switch(unsuccessfulOutcome->procedureCode) { case S1AP_ProcedureCode_id_InitialContextSetup : { s1ap_handle_initial_context_setup_failure( enb, pdu); break; } case S1AP_ProcedureCode_id_HandoverResourceAllocation : { s1ap_handle_handover_failure(enb, pdu); break; } default: { d_warn("Not implemented(choice:%d, proc:%d)", pdu->present, unsuccessfulOutcome->procedureCode); break; } } break; } default: { d_warn("Not implemented(choice:%d)", pdu->present); break; } } break; } default: { d_error("Unknown event %s", mme_event_get_name(e)); break; } } } void s1ap_state_exception(fsm_t *s, event_t *e) { d_assert(s, return, "Null param"); d_assert(e, return, "Null param"); mme_sm_trace(3, e); switch (event_get(e)) { case FSM_ENTRY_SIG: { break; } case FSM_EXIT_SIG: { break; } default: { d_error("Unknown event %s", mme_event_get_name(e)); break; } } } nextepc-0.3.10/src/mme/s1ap_usrsctp.c000066400000000000000000000426061333553357400174240ustar00rootroot00000000000000#define TRACE_MODULE _s1ap_sctp #include "core_debug.h" #include "core_thread.h" #include "mme_event.h" #include "s1ap_path.h" #if HAVE_NETDB_H #include #endif #if HAVE_USRSCTP_H #ifndef INET #define INET 1 #endif #ifndef INET6 #define INET6 1 #endif #include #endif static status_t s1ap_usrsctp_socket(sock_id *new, int family, int type, int (*receive_cb)(struct socket *sock, union sctp_sockstore addr, void *data, size_t datalen, struct sctp_rcvinfo, int flags, void *ulp_info)); static status_t s1ap_usrsctp_bind(sock_id id, c_sockaddr_t *sa); static status_t s1ap_usrsctp_connect(sock_id id, c_sockaddr_t *sa); static status_t s1ap_usrsctp_listen(sock_id id); static int s1ap_usrsctp_recv_handler(struct socket *sock, union sctp_sockstore addr, void *data, size_t datalen, struct sctp_rcvinfo rcv, int flags, void *ulp_info); static c_sockaddr_t *usrsctp_remote_addr(union sctp_sockstore *store); static void debug_printf(const char *format, ...); static int sctp_num_ostreams = -1; status_t s1ap_init(int sctp_streams, c_uint16_t port) { usrsctp_init(port, NULL, debug_printf); #ifdef SCTP_DEBUG usrsctp_sysctl_set_sctp_debug_on(SCTP_DEBUG_ALL); #endif usrsctp_sysctl_set_sctp_blackhole(2); usrsctp_sysctl_set_sctp_enable_sack_immediately(1); sctp_num_ostreams = sctp_streams; return CORE_OK; } status_t s1ap_final() { while(usrsctp_finish() != 0) { d_error("try to finsih SCTP\n"); core_sleep(time_from_msec(1000)); } return CORE_OK; } status_t s1ap_delete(sock_id sock) { d_assert(sock, return CORE_ERROR,); usrsctp_close((struct socket *)sock); return CORE_OK; } status_t s1ap_server(sock_node_t *snode, int type) { status_t rv; char buf[CORE_ADDRSTRLEN]; d_assert(snode, return CORE_ERROR,); rv = sctp_server(&snode->sock, type, snode->list); d_assert(rv == CORE_OK, return CORE_ERROR,); d_trace(1, "s1ap_server() [%s]:%d\n", CORE_ADDR(snode->list, buf), CORE_PORT(snode->list)); return CORE_OK; } status_t sctp_server(sock_id *new, int type, c_sockaddr_t *sa_list) { status_t rv; c_sockaddr_t *addr; char buf[CORE_ADDRSTRLEN]; addr = sa_list; while(addr) { rv = s1ap_usrsctp_socket(new, addr->c_sa_family, type, s1ap_usrsctp_recv_handler); if (rv == CORE_OK) { if (s1ap_usrsctp_bind(*new, addr) == CORE_OK) { d_trace(9, "sctp_server [%s]:%d\n", CORE_ADDR(addr, buf), CORE_PORT(addr)); break; } rv = s1ap_delete(*new); d_assert(rv == CORE_OK, return CORE_ERROR,); } addr = addr->next; } if (addr == NULL) { d_error("sctp_server [%s]:%d failed", CORE_ADDR(addr, buf), CORE_PORT(addr)); return CORE_ERROR; } rv = s1ap_usrsctp_listen(*new); d_assert(rv == CORE_OK, return CORE_ERROR,); return CORE_OK; } status_t sctp_client(sock_id *new, int type, c_sockaddr_t *sa_list) { status_t rv; c_sockaddr_t *addr; char buf[CORE_ADDRSTRLEN]; addr = sa_list; while(addr) { rv = s1ap_usrsctp_socket(new, addr->c_sa_family, type, NULL); if (rv == CORE_OK) { if (s1ap_usrsctp_connect(*new, addr) == CORE_OK) { d_trace(9, "sctp_client [%s]:%d\n", CORE_ADDR(addr, buf), CORE_PORT(addr)); break; } rv = s1ap_delete(*new); d_assert(rv == CORE_OK, return CORE_ERROR,); } addr = addr->next; } if (addr == NULL) { d_error("sctp_client [%s]:%d failed", CORE_ADDR(addr, buf), CORE_PORT(addr)); return CORE_ERROR; } return CORE_OK; } status_t s1ap_send(sock_id id, pkbuf_t *pkbuf, c_sockaddr_t *addr, c_uint16_t stream_no) { ssize_t sent; struct socket *sock = (struct socket *)id; struct sctp_sndinfo sndinfo; d_assert(id, return CORE_ERROR, "Null param"); d_assert(pkbuf, return CORE_ERROR, "Null param"); memset((void *)&sndinfo, 0, sizeof(struct sctp_sndinfo)); sndinfo.snd_ppid = htonl(SCTP_S1AP_PPID); sndinfo.snd_sid = stream_no; sent = usrsctp_sendv(sock, pkbuf->payload, pkbuf->len, addr ? &addr->sa : NULL, addr ? 1 : 0, (void *)&sndinfo, (socklen_t)sizeof(struct sctp_sndinfo), SCTP_SENDV_SNDINFO, 0); d_trace(50, "[S1AP] SEND[%d] : ", sent); d_trace_hex(50, pkbuf->payload, pkbuf->len); if (sent < 0 || sent != pkbuf->len) { d_error("sent : %d, pkbuf->len : %d\n", sent, pkbuf->len); return CORE_ERROR; } pkbuf_free(pkbuf); return CORE_OK; } status_t s1ap_recv(sock_id id, pkbuf_t *pkbuf) { struct socket *sock = (struct socket *)id; c_sockaddr_t addr; ssize_t n = 0; int flags = 0; socklen_t from_len; socklen_t infolen; struct sctp_rcvinfo rcv_info; unsigned int infotype = 0; while(1) { n = usrsctp_recvv(sock, pkbuf->payload, MAX_SDU_LEN, &addr.sa, &from_len, (void *)&rcv_info, &infolen, &infotype, &flags); if (n > 0) { #undef MSG_NOTIFICATION #define MSG_NOTIFICATION 0x2000 if (flags & MSG_NOTIFICATION) { /* Nothing to do */ } else if (flags & MSG_EOR) { break; } } } pkbuf->len = n; return CORE_OK; } static status_t s1ap_usrsctp_socket(sock_id *new, int family, int type, int (*receive_cb)(struct socket *sock, union sctp_sockstore store, void *data, size_t datalen, struct sctp_rcvinfo, int flags, void *ulp_info)) { struct socket *sock = NULL; const int on = 1; struct sctp_event event; c_uint16_t event_types[] = { SCTP_ASSOC_CHANGE, SCTP_PEER_ADDR_CHANGE, SCTP_REMOTE_ERROR, SCTP_SHUTDOWN_EVENT, SCTP_ADAPTATION_INDICATION, SCTP_PARTIAL_DELIVERY_EVENT }; struct sctp_initmsg initmsg; socklen_t socklen; int i; if (!(sock = usrsctp_socket(family, type, IPPROTO_SCTP, receive_cb, NULL, 0, NULL))) { d_error("usrsctp_socket failed"); return CORE_ERROR; } if (usrsctp_setsockopt(sock, IPPROTO_SCTP, SCTP_RECVRCVINFO, &on, sizeof(int)) < 0) { d_error("usrsctp_setsockopt SCTP_RECVRCVINFO failed"); return CORE_ERROR; } memset(&event, 0, sizeof(event)); event.se_assoc_id = SCTP_FUTURE_ASSOC; event.se_on = 1; for (i = 0; i < (int)(sizeof(event_types)/sizeof(c_uint16_t)); i++) { event.se_type = event_types[i]; if (usrsctp_setsockopt(sock, IPPROTO_SCTP, SCTP_EVENT, &event, sizeof(struct sctp_event)) < 0) { d_error("usrsctp_setsockopt SCTP_EVENT failed"); return CORE_ERROR; } } memset(&initmsg, 0, sizeof(struct sctp_initmsg)); socklen = sizeof(struct sctp_initmsg); if (usrsctp_getsockopt(sock, IPPROTO_SCTP, SCTP_INITMSG, &initmsg, &socklen) != 0) { d_error("getsockopt for SCTP_INITMSG failed(%d:%s)", errno, strerror( errno )); return CORE_ERROR; } d_trace(3, "Old INITMSG (numout:%d maxin:%d maxattempt:%d maxinit_to:%d)\n", initmsg.sinit_num_ostreams, initmsg.sinit_max_instreams, initmsg.sinit_max_attempts, initmsg.sinit_max_init_timeo); /* * INITMSG * * max number of input streams : 65535 * max attemtps : 4 * max initial timeout : 8 secs */ d_assert(sctp_num_ostreams > 1, return CORE_ERROR, "Invalid SCTP number of output streams = %d\n", sctp_num_ostreams); initmsg.sinit_num_ostreams = sctp_num_ostreams; initmsg.sinit_max_instreams = 65535; initmsg.sinit_max_attempts = 4; initmsg.sinit_max_init_timeo = 8000; if (usrsctp_setsockopt(sock, IPPROTO_SCTP, SCTP_INITMSG, &initmsg, sizeof(initmsg)) != 0) { d_error("setsockopt for SCTP_INITMSG failed(%d:%s)", errno, strerror( errno )); return CORE_ERROR; } d_trace(3,"New INITMSG (numout:%d maxin:%d maxattempt:%d maxinit_to:%d)\n", initmsg.sinit_num_ostreams, initmsg.sinit_max_instreams, initmsg.sinit_max_attempts, initmsg.sinit_max_init_timeo); *new = (sock_id)sock; return CORE_OK; } static status_t s1ap_usrsctp_bind(sock_id id, c_sockaddr_t *sa) { struct socket *sock = (struct socket *)id; char buf[CORE_ADDRSTRLEN]; socklen_t addrlen; d_assert(sock, return CORE_ERROR,); d_assert(sa, return CORE_ERROR,); addrlen = sockaddr_len(sa); d_assert(addrlen, return CORE_ERROR,); if (usrsctp_bind(sock, &sa->sa, addrlen) != 0) { d_error("usrsctp_bind [%s]:%d failed", CORE_ADDR(sa, buf), CORE_PORT(sa)); return CORE_ERROR; } d_trace(9, "usrsctp_bind [%s]:%d\n", CORE_ADDR(sa, buf), CORE_PORT(sa)); return CORE_OK; } static status_t s1ap_usrsctp_connect(sock_id id, c_sockaddr_t *sa) { struct socket *sock = (struct socket *)id; char buf[CORE_ADDRSTRLEN]; socklen_t addrlen; d_assert(sock, return CORE_ERROR,); d_assert(sa, return CORE_ERROR,); addrlen = sockaddr_len(sa); d_assert(addrlen, return CORE_ERROR,); if (usrsctp_connect(sock, &sa->sa, addrlen) != 0) { d_error("usrsctp_connect [%s]:%d", CORE_ADDR(sa, buf), CORE_PORT(sa)); return CORE_ERROR; } d_trace(9, "usrsctp_connect [%s]:%d\n", CORE_ADDR(sa, buf), CORE_PORT(sa)); return CORE_OK; } static status_t s1ap_usrsctp_listen(sock_id id) { int rc; struct socket *sock = (struct socket *)id; d_assert(sock, return CORE_ERROR,); rc = usrsctp_listen(sock, 5); if (rc < 0) { d_error("usrsctp_listen failed"); return CORE_ERROR; } return CORE_OK; } static int s1ap_usrsctp_recv_handler(struct socket *sock, union sctp_sockstore store, void *data, size_t datalen, struct sctp_rcvinfo rcv, int flags, void *ulp_info) { if (data) { event_t e; #undef MSG_NOTIFICATION #define MSG_NOTIFICATION 0x2000 if (flags & MSG_NOTIFICATION) { union sctp_notification *not = (union sctp_notification *)data; if (not->sn_header.sn_length == (c_uint32_t)datalen) { switch(not->sn_header.sn_type) { case SCTP_ASSOC_CHANGE : { d_trace(5, "SCTP_ASSOC_CHANGE:" "[T:%d, F:0x%x, S:%d, I/O:%d/%d]\n", not->sn_assoc_change.sac_type, not->sn_assoc_change.sac_flags, not->sn_assoc_change.sac_state, not->sn_assoc_change.sac_inbound_streams, not->sn_assoc_change.sac_outbound_streams); if (not->sn_assoc_change.sac_state == SCTP_SHUTDOWN_COMP || not->sn_assoc_change.sac_state == SCTP_COMM_LOST) { c_sockaddr_t *addr = usrsctp_remote_addr(&store); d_assert(addr, return 1,); if (not->sn_assoc_change.sac_state == SCTP_SHUTDOWN_COMP) d_trace(5, "SCTP_SHUTDOWN_COMP\n"); if (not->sn_assoc_change.sac_state == SCTP_COMM_LOST) d_trace(5, "SCTP_COMM_LOST\n"); event_set(&e, MME_EVT_S1AP_LO_CONNREFUSED); event_set_param1(&e, (c_uintptr_t)sock); event_set_param2(&e, (c_uintptr_t)addr); if (mme_event_send(&e) != CORE_OK) { CORE_FREE(addr); } } else if (not->sn_assoc_change.sac_state == SCTP_COMM_UP) { c_sockaddr_t *addr = usrsctp_remote_addr(&store); d_assert(addr, return 1,); d_trace(5, "SCTP_COMM_UP\n"); event_set(&e, MME_EVT_S1AP_LO_SCTP_COMM_UP); event_set_param1(&e, (c_uintptr_t)sock); event_set_param2(&e, (c_uintptr_t)addr); event_set_param3(&e, (c_uintptr_t) not->sn_assoc_change.sac_inbound_streams); event_set_param4(&e, (c_uintptr_t) not->sn_assoc_change.sac_outbound_streams); if (mme_event_send(&e) != CORE_OK) { CORE_FREE(addr); } } break; } case SCTP_SHUTDOWN_EVENT : { c_sockaddr_t *addr = usrsctp_remote_addr(&store); d_assert(addr, return 1,); d_trace(5, "SCTP_SHUTDOWN_EVENT:" "[T:0x%x, F:0x%x, L:0x%x]\n", not->sn_shutdown_event.sse_type, not->sn_shutdown_event.sse_flags, not->sn_shutdown_event.sse_length); event_set(&e, MME_EVT_S1AP_LO_CONNREFUSED); event_set_param1(&e, (c_uintptr_t)sock); event_set_param2(&e, (c_uintptr_t)addr); if (mme_event_send(&e) != CORE_OK) { CORE_FREE(addr); } break; } case SCTP_PEER_ADDR_CHANGE: { d_warn("SCTP_PEER_ADDR_CHANGE:" "[T:%d, F:0x%x, S:%d]\n", not->sn_paddr_change.spc_type, not->sn_paddr_change.spc_flags, not->sn_paddr_change.spc_error); break; } case SCTP_REMOTE_ERROR: { d_warn("SCTP_REMOTE_ERROR:[T:%d, F:0x%x, S:%d]\n", not->sn_remote_error.sre_type, not->sn_remote_error.sre_flags, not->sn_remote_error.sre_error); break; } case SCTP_SEND_FAILED : { d_error("SCTP_SEND_FAILED:[T:%d, F:0x%x, S:%d]\n", not->sn_send_failed_event.ssfe_type, not->sn_send_failed_event.ssfe_flags, not->sn_send_failed_event.ssfe_error); break; } default : d_error("Discarding event with " "unknown flags:0x%x type:0x%x", flags, not->sn_header.sn_type); break; } } } else if (flags & MSG_EOR) { pkbuf_t *pkbuf; c_sockaddr_t *addr = NULL; pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); d_assert(pkbuf, return 1, ); addr = usrsctp_remote_addr(&store); d_assert(addr, return 1,); pkbuf->len = datalen; memcpy(pkbuf->payload, data, pkbuf->len); d_trace(50, "[S1AP] RECV : "); d_trace_hex(50, pkbuf->payload, pkbuf->len); event_set(&e, MME_EVT_S1AP_MESSAGE); event_set_param1(&e, (c_uintptr_t)sock); event_set_param2(&e, (c_uintptr_t)addr); event_set_param3(&e, (c_uintptr_t)pkbuf); if (mme_event_send(&e) != CORE_OK) { pkbuf_free(pkbuf); CORE_FREE(addr); } } else { d_error("Not engough buffer. Need more recv : 0x%x", flags); } free(data); } return (1); } static c_sockaddr_t *usrsctp_remote_addr(union sctp_sockstore *store) { c_sockaddr_t *addr = NULL; d_assert(store, return NULL,); addr = core_calloc(1, sizeof(c_sockaddr_t)); d_assert(addr, return NULL,); addr->c_sa_family = store->sin.sin_family; switch(addr->c_sa_family) { case AF_INET: memcpy(&addr->sin, &store->sin, sizeof(struct sockaddr_in)); break; case AF_INET6: memcpy(&addr->sin6, &store->sin6, sizeof(struct sockaddr_in6)); break; default: d_assert(0, return NULL,); } return addr; } static void debug_printf(const char *format, ...) { va_list ap; va_start(ap, format); vprintf(format, ap); va_end(ap); } nextepc-0.3.10/src/mme/snow_3g.c000066400000000000000000000362211333553357400163500ustar00rootroot00000000000000/*------------------------------------------------------------------------ * SNOW_3G.c *------------------------------------------------------------------------*/ #include "core_pkbuf.h" #include "snow_3g.h" /* LFSR */ static u32 LFSR_S0 = 0x00; static u32 LFSR_S1 = 0x00; static u32 LFSR_S2 = 0x00; static u32 LFSR_S3 = 0x00; static u32 LFSR_S4 = 0x00; static u32 LFSR_S5 = 0x00; static u32 LFSR_S6 = 0x00; static u32 LFSR_S7 = 0x00; static u32 LFSR_S8 = 0x00; static u32 LFSR_S9 = 0x00; static u32 LFSR_S10 = 0x00; static u32 LFSR_S11 = 0x00; static u32 LFSR_S12 = 0x00; static u32 LFSR_S13 = 0x00; static u32 LFSR_S14 = 0x00; static u32 LFSR_S15 = 0x00; /* FSM */ static u32 FSM_R1 = 0x00; static u32 FSM_R2 = 0x00; static u32 FSM_R3 = 0x00; /* Rijndael S-box SR */ static u8 SR[256] = { 0x63,0x7C,0x77,0x7B,0xF2,0x6B,0x6F,0xC5,0x30,0x01,0x67,0x2B,0xFE,0xD7,0xAB,0x76, 0xCA,0x82,0xC9,0x7D,0xFA,0x59,0x47,0xF0,0xAD,0xD4,0xA2,0xAF,0x9C,0xA4,0x72,0xC0, 0xB7,0xFD,0x93,0x26,0x36,0x3F,0xF7,0xCC,0x34,0xA5,0xE5,0xF1,0x71,0xD8,0x31,0x15, 0x04,0xC7,0x23,0xC3,0x18,0x96,0x05,0x9A,0x07,0x12,0x80,0xE2,0xEB,0x27,0xB2,0x75, 0x09,0x83,0x2C,0x1A,0x1B,0x6E,0x5A,0xA0,0x52,0x3B,0xD6,0xB3,0x29,0xE3,0x2F,0x84, 0x53,0xD1,0x00,0xED,0x20,0xFC,0xB1,0x5B,0x6A,0xCB,0xBE,0x39,0x4A,0x4C,0x58,0xCF, 0xD0,0xEF,0xAA,0xFB,0x43,0x4D,0x33,0x85,0x45,0xF9,0x02,0x7F,0x50,0x3C,0x9F,0xA8, 0x51,0xA3,0x40,0x8F,0x92,0x9D,0x38,0xF5,0xBC,0xB6,0xDA,0x21,0x10,0xFF,0xF3,0xD2, 0xCD,0x0C,0x13,0xEC,0x5F,0x97,0x44,0x17,0xC4,0xA7,0x7E,0x3D,0x64,0x5D,0x19,0x73, 0x60,0x81,0x4F,0xDC,0x22,0x2A,0x90,0x88,0x46,0xEE,0xB8,0x14,0xDE,0x5E,0x0B,0xDB, 0xE0,0x32,0x3A,0x0A,0x49,0x06,0x24,0x5C,0xC2,0xD3,0xAC,0x62,0x91,0x95,0xE4,0x79, 0xE7,0xC8,0x37,0x6D,0x8D,0xD5,0x4E,0xA9,0x6C,0x56,0xF4,0xEA,0x65,0x7A,0xAE,0x08, 0xBA,0x78,0x25,0x2E,0x1C,0xA6,0xB4,0xC6,0xE8,0xDD,0x74,0x1F,0x4B,0xBD,0x8B,0x8A, 0x70,0x3E,0xB5,0x66,0x48,0x03,0xF6,0x0E,0x61,0x35,0x57,0xB9,0x86,0xC1,0x1D,0x9E, 0xE1,0xF8,0x98,0x11,0x69,0xD9,0x8E,0x94,0x9B,0x1E,0x87,0xE9,0xCE,0x55,0x28,0xDF, 0x8C,0xA1,0x89,0x0D,0xBF,0xE6,0x42,0x68,0x41,0x99,0x2D,0x0F,0xB0,0x54,0xBB,0x16 }; /* S-box SQ */ static u8 SQ[256] = { 0x25,0x24,0x73,0x67,0xD7,0xAE,0x5C,0x30,0xA4,0xEE,0x6E,0xCB,0x7D,0xB5,0x82,0xDB, 0xE4,0x8E,0x48,0x49,0x4F,0x5D,0x6A,0x78,0x70,0x88,0xE8,0x5F,0x5E,0x84,0x65,0xE2, 0xD8,0xE9,0xCC,0xED,0x40,0x2F,0x11,0x28,0x57,0xD2,0xAC,0xE3,0x4A,0x15,0x1B,0xB9, 0xB2,0x80,0x85,0xA6,0x2E,0x02,0x47,0x29,0x07,0x4B,0x0E,0xC1,0x51,0xAA,0x89,0xD4, 0xCA,0x01,0x46,0xB3,0xEF,0xDD,0x44,0x7B,0xC2,0x7F,0xBE,0xC3,0x9F,0x20,0x4C,0x64, 0x83,0xA2,0x68,0x42,0x13,0xB4,0x41,0xCD,0xBA,0xC6,0xBB,0x6D,0x4D,0x71,0x21,0xF4, 0x8D,0xB0,0xE5,0x93,0xFE,0x8F,0xE6,0xCF,0x43,0x45,0x31,0x22,0x37,0x36,0x96,0xFA, 0xBC,0x0F,0x08,0x52,0x1D,0x55,0x1A,0xC5,0x4E,0x23,0x69,0x7A,0x92,0xFF,0x5B,0x5A, 0xEB,0x9A,0x1C,0xA9,0xD1,0x7E,0x0D,0xFC,0x50,0x8A,0xB6,0x62,0xF5,0x0A,0xF8,0xDC, 0x03,0x3C,0x0C,0x39,0xF1,0xB8,0xF3,0x3D,0xF2,0xD5,0x97,0x66,0x81,0x32,0xA0,0x00, 0x06,0xCE,0xF6,0xEA,0xB7,0x17,0xF7,0x8C,0x79,0xD6,0xA7,0xBF,0x8B,0x3F,0x1F,0x53, 0x63,0x75,0x35,0x2C,0x60,0xFD,0x27,0xD3,0x94,0xA5,0x7C,0xA1,0x05,0x58,0x2D,0xBD, 0xD9,0xC7,0xAF,0x6B,0x54,0x0B,0xE0,0x38,0x04,0xC8,0x9D,0xE7,0x14,0xB1,0x87,0x9C, 0xDF,0x6F,0xF9,0xDA,0x2A,0xC4,0x59,0x16,0x74,0x91,0xAB,0x26,0x61,0x76,0x34,0x2B, 0xAD,0x99,0xFB,0x72,0xEC,0x33,0x12,0xDE,0x98,0x3B,0xC0,0x9B,0x3E,0x18,0x10,0x3A, 0x56,0xE1,0x77,0xC9,0x1E,0x9E,0x95,0xA3,0x90,0x19,0xA8,0x6C,0x09,0xD0,0xF0,0x86 }; /* MULx. * Input V: an 8-bit input. * Input c: an 8-bit input. * Output : an 8-bit output. * See section 3.1.1 for details. */ u8 MULx(u8 V, u8 c) { if ( V & 0x80 ) return ( (V << 1) ^ c); else return ( V << 1); } /* MULxPOW. * Input V: an 8-bit input. * Input i: a positive integer. * Input c: an 8-bit input. * Output : an 8-bit output. * See section 3.1.2 for details. */ u8 MULxPOW(u8 V, u8 i, u8 c) { if ( i == 0) return V; else return MULx( MULxPOW( V, i-1, c ), c); } /* The function MUL alpha. * Input c: 8-bit input. * Output : 32-bit output. * See section 3.4.2 for details. */ u32 MULalpha(u8 c) { return ( ( ((u32)MULxPOW(c, 23, 0xa9)) << 24 ) | ( ((u32)MULxPOW(c, 245, 0xa9)) << 16 ) | ( ((u32)MULxPOW(c, 48, 0xa9)) << 8 ) | ( ((u32)MULxPOW(c, 239, 0xa9)) ) ) ; } /* The function DIV alpha. * Input c: 8-bit input. * Output : 32-bit output. * See section 3.4.3 for details. */ u32 DIValpha(u8 c) { return ( ( ((u32)MULxPOW(c, 16, 0xa9)) << 24 ) | ( ((u32)MULxPOW(c, 39, 0xa9)) << 16 ) | ( ((u32)MULxPOW(c, 6, 0xa9)) << 8 ) | ( ((u32)MULxPOW(c, 64, 0xa9)) ) ) ; } /* The 32x32-bit S-Box S1 * Input: a 32-bit input. * Output: a 32-bit output of S1 box. * See section 3.3.1. */ u32 S1(u32 w) { u8 r0=0, r1=0, r2=0, r3=0; u8 srw0 = SR[ (u8)((w >> 24) & 0xff) ]; u8 srw1 = SR[ (u8)((w >> 16) & 0xff) ]; u8 srw2 = SR[ (u8)((w >> 8) & 0xff) ]; u8 srw3 = SR[ (u8)((w) & 0xff) ]; r0 = ( ( MULx( srw0 , 0x1b) ) ^ ( srw1 ) ^ ( srw2 ) ^ ( (MULx( srw3, 0x1b)) ^ srw3 ) ); r1 = ( ( ( MULx( srw0 , 0x1b) ) ^ srw0 ) ^ ( MULx(srw1, 0x1b) ) ^ ( srw2 ) ^ ( srw3 ) ); r2 = ( ( srw0 ) ^ ( ( MULx( srw1 , 0x1b) ) ^ srw1 ) ^ ( MULx(srw2, 0x1b) ) ^ ( srw3 ) ); r3 = ( ( srw0 ) ^ ( srw1 ) ^ ( ( MULx( srw2 , 0x1b) ) ^ srw2 ) ^ ( MULx( srw3, 0x1b) ) ); return ( ( ((u32)r0) << 24 ) | ( ((u32)r1) << 16 ) | ( ((u32)r2) << 8 ) | ( ((u32)r3) ) ); } /* The 32x32-bit S-Box S2 * Input: a 32-bit input. * Output: a 32-bit output of S2 box. * See section 3.3.2. */ u32 S2(u32 w) { u8 r0=0, r1=0, r2=0, r3=0; u8 sqw0 = SQ[ (u8)((w >> 24) & 0xff) ]; u8 sqw1 = SQ[ (u8)((w >> 16) & 0xff) ]; u8 sqw2 = SQ[ (u8)((w >> 8) & 0xff) ]; u8 sqw3 = SQ[ (u8)((w) & 0xff) ]; r0 = ( ( MULx( sqw0 , 0x69) ) ^ ( sqw1 ) ^ ( sqw2 ) ^ ( (MULx( sqw3, 0x69)) ^ sqw3 ) ); r1 = ( ( ( MULx( sqw0 , 0x69) ) ^ sqw0 ) ^ ( MULx(sqw1, 0x69) ) ^ ( sqw2 ) ^ ( sqw3 ) ); r2 = ( ( sqw0 ) ^ ( ( MULx( sqw1 , 0x69) ) ^ sqw1 ) ^ ( MULx(sqw2, 0x69) ) ^ ( sqw3 ) ); r3 = ( ( sqw0 ) ^ ( sqw1 ) ^ ( ( MULx( sqw2 , 0x69) ) ^ sqw2 ) ^ ( MULx( sqw3, 0x69) ) ); return ( ( ((u32)r0) << 24 ) | ( ((u32)r1) << 16 ) | ( ((u32)r2) << 8 ) | ( ((u32)r3) ) ); } /* Clocking LFSR in initialization mode. * LFSR Registers S0 to S15 are updated as the LFSR receives a single clock. * Input F: a 32-bit word comes from output of FSM. * See section 3.4.4. */ void ClockLFSRInitializationMode(u32 F) { u32 v = ( ( (LFSR_S0 << 8) & 0xffffff00 ) ^ ( MULalpha( (u8)((LFSR_S0>>24) & 0xff) ) ) ^ ( LFSR_S2 ) ^ ( (LFSR_S11 >> 8) & 0x00ffffff ) ^ ( DIValpha( (u8)( ( LFSR_S11) & 0xff ) ) ) ^ ( F ) ); LFSR_S0 = LFSR_S1; LFSR_S1 = LFSR_S2; LFSR_S2 = LFSR_S3; LFSR_S3 = LFSR_S4; LFSR_S4 = LFSR_S5; LFSR_S5 = LFSR_S6; LFSR_S6 = LFSR_S7; LFSR_S7 = LFSR_S8; LFSR_S8 = LFSR_S9; LFSR_S9 = LFSR_S10; LFSR_S10 = LFSR_S11; LFSR_S11 = LFSR_S12; LFSR_S12 = LFSR_S13; LFSR_S13 = LFSR_S14; LFSR_S14 = LFSR_S15; LFSR_S15 = v; } /* Clocking LFSR in keystream mode. * LFSR Registers S0 to S15 are updated as the LFSR receives a single clock. * See section 3.4.5. */ void ClockLFSRKeyStreamMode() { u32 v = ( ( (LFSR_S0 << 8) & 0xffffff00 ) ^ ( MULalpha( (u8)((LFSR_S0>>24) & 0xff) ) ) ^ ( LFSR_S2 ) ^ ( (LFSR_S11 >> 8) & 0x00ffffff ) ^ ( DIValpha( (u8)( ( LFSR_S11) & 0xff ) ) ) ); LFSR_S0 = LFSR_S1; LFSR_S1 = LFSR_S2; LFSR_S2 = LFSR_S3; LFSR_S3 = LFSR_S4; LFSR_S4 = LFSR_S5; LFSR_S5 = LFSR_S6; LFSR_S6 = LFSR_S7; LFSR_S7 = LFSR_S8; LFSR_S8 = LFSR_S9; LFSR_S9 = LFSR_S10; LFSR_S10 = LFSR_S11; LFSR_S11 = LFSR_S12; LFSR_S12 = LFSR_S13; LFSR_S13 = LFSR_S14; LFSR_S14 = LFSR_S15; LFSR_S15 = v; } /* Clocking FSM. * Produces a 32-bit word F. * Updates FSM registers R1, R2, R3. * See Section 3.4.6. */ u32 ClockFSM() { u32 F = ( ( LFSR_S15 + FSM_R1 ) & 0xffffffff ) ^ FSM_R2 ; u32 r = ( FSM_R2 + ( FSM_R3 ^ LFSR_S5 ) ) & 0xffffffff ; FSM_R3 = S2(FSM_R2); FSM_R2 = S1(FSM_R1); FSM_R1 = r; return F; } /* Initialization. * Input k[4]: Four 32-bit words making up 128-bit key. * Input IV[4]: Four 32-bit words making 128-bit initialization variable. * Output: All the LFSRs and FSM are initialized for key generation. * See Section 4.1. */ void snow_3g_initialize(u32 k[4], u32 IV[4]) { u8 i=0; u32 F = 0x0; LFSR_S15 = k[3] ^ IV[0]; LFSR_S14 = k[2]; LFSR_S13 = k[1]; LFSR_S12 = k[0] ^ IV[1]; LFSR_S11 = k[3] ^ 0xffffffff; LFSR_S10 = k[2] ^ 0xffffffff ^ IV[2]; LFSR_S9 = k[1] ^ 0xffffffff ^ IV[3]; LFSR_S8 = k[0] ^ 0xffffffff; LFSR_S7 = k[3]; LFSR_S6 = k[2]; LFSR_S5 = k[1]; LFSR_S4 = k[0]; LFSR_S3 = k[3] ^ 0xffffffff; LFSR_S2 = k[2] ^ 0xffffffff; LFSR_S1 = k[1] ^ 0xffffffff; LFSR_S0 = k[0] ^ 0xffffffff; FSM_R1 = 0x0; FSM_R2 = 0x0; FSM_R3 = 0x0; for(i=0;i<32;i++) { F = ClockFSM(); ClockLFSRInitializationMode(F); } } /* Generation of Keystream. * input n: number of 32-bit words of keystream. * input z: space for the generated keystream, assumes * memory is allocated already. * output: generated keystream which is filled in z * See section 4.2. */ void snow_3g_generate_key_stream(u32 n, u32 *ks) { u32 t = 0; u32 F = 0x0; ClockFSM(); /* Clock FSM once. Discard the output. */ ClockLFSRKeyStreamMode(); /* Clock LFSR in keystream mode once. */ for ( t=0; t #include #include */ /* f8. * Input key: 128 bit Confidentiality Key. * Input count:32-bit Count, Frame dependent input. * Input bearer: 5-bit Bearer identity (in the LSB side). * Input dir:1 bit, direction of transmission. * Input data: length number of bits, input bit stream. * Input length: 32 bit Length, i.e., the number of bits to be encrypted or * decrypted. * Output data: Output bit stream. Assumes data is suitably memory * allocated. * Encrypts/decrypts blocks of data between 1 and 2^32 bits in length as * defined in Section 3. */ void snow_3g_f8(u8 *key, u32 count, u32 bearer, u32 dir, u8 *data, u32 length) { u32 K[4],IV[4]; int n = ( length + 31 ) / 32; int i=0; int lastbits = (8-(length%8)) % 8; u32 *KS; /*Initialisation*/ /* Load the confidentiality key for SNOW 3G initialization as in section 3.4. */ for (i=0; i<4; i++) K[3-i] = (key[4*i] << 24) ^ (key[4*i+1] << 16) ^ (key[4*i+2] << 8) ^ (key[4*i+3]); /* Prepare the initialization vector (IV) for SNOW 3G initialization as in section 3.4. */ IV[3] = count; IV[2] = (bearer << 27) | ((dir & 0x1) << 26); IV[1] = IV[3]; IV[0] = IV[2]; /* Run SNOW 3G algorithm to generate sequence of key stream bits KS*/ snow_3g_initialize(K,IV); KS = (u32 *)core_malloc(4*n); snow_3g_generate_key_stream(n,(u32*)KS); /* Exclusive-OR the input data with keystream to generate the output bit stream */ for (i=0; i> 24) & 0xff; data[4*i+1] ^= (u8) (KS[i] >> 16) & 0xff; data[4*i+2] ^= (u8) (KS[i] >> 8) & 0xff; data[4*i+3] ^= (u8) (KS[i] ) & 0xff; } CORE_FREE(KS); /* zero last bits of data in case its length is not byte-aligned this is an addition to the C reference code, which did not handle it */ if (lastbits) data[length/8] &= 256 - (1<>i ) & 0x1 ) result ^= MUL64xPOW(V,i,c); } return result; } /* mask8bit. * Input n: an integer in 1-7. * Output : an 8 bit mask. * Prepares an 8 bit mask with required number of 1 bits on the MSB side. */ u8 mask8bit(int n) { return 0xFF ^ ((1<<(8-n)) - 1); } /* f9. * Input key: 128 bit Integrity Key. * Input count:32-bit Count, Frame dependent input. * Input fresh: 32-bit Random number. * Input dir:1 bit, direction of transmission (in the LSB). * Input data: length number of bits, input bit stream. * Input length: 64 bit Length, i.e., the number of bits to be MAC'd. * Output : 32 bit block used as MAC * Generates 32-bit MAC using UIA2 algorithm as defined in Section 4. */ void snow_3g_f9(u8* key, u32 count, u32 fresh, u32 dir, u8 *data, u64 length, u8 *out) { u32 K[4],IV[4], z[5]; u32 i=0, D; u64 EVAL; u64 V; u64 P; u64 Q; u64 c; u64 M_D_2; int rem_bits = 0; /* Load the Integrity Key for SNOW3G initialization as in section 4.4. */ for (i=0; i<4; i++) { K[3-i] = (key[4*i] << 24) ^ (key[4*i+1] << 16) ^ (key[4*i+2] << 8) ^ (key[4*i+3]); } /* Prepare the Initialization Vector (IV) for SNOW3G initialization as in section 4.4. */ IV[3] = count; IV[2] = fresh; IV[1] = count ^ ( dir << 31 ) ; IV[0] = fresh ^ (dir << 15); z[0] = z[1] = z[2] = z[3] = z[4] = 0; /* Run SNOW 3G to produce 5 keystream words z_1, z_2, z_3, z_4 and z_5. */ snow_3g_initialize(K, IV); snow_3g_generate_key_stream(5, z); P = (u64)z[0] << 32 | (u64)z[1]; Q = (u64)z[2] << 32 | (u64)z[3]; /* Calculation */ if ((length % 64) == 0) D = (length>>6) + 1; else D = (length>>6) + 2; EVAL = 0; c = 0x1b; /* for 0 <= i <= D-3 */ for (i=0; i 7) { M_D_2 |= (u64)data[8*(D-2)+i] << (8*(7-i)); rem_bits -= 8; i++; } if (rem_bits > 0) M_D_2 |= (u64)(data[8*(D-2)+i] & mask8bit(rem_bits)) << (8*(7-i)); V = EVAL ^ M_D_2; EVAL = MUL64(V,P,c); /* for D-1 */ EVAL ^= length; /* Multiply by Q */ EVAL = MUL64(EVAL,Q,c); /* XOR with z_5: this is a modification to the reference C code, which forgot to XOR z[5] */ for (i=0; i<4; i++) /* MAC_I[i] = (mac32 >> (8*(3-i))) & 0xff; */ out[i] = ((EVAL >> (56-(i*8))) ^ (z[4] >> (24-(i*8)))) & 0xff; } /* End of f9.c */ /*------------------------------------------------------------------------*/ nextepc-0.3.10/src/mme/snow_3g.h000066400000000000000000000037731333553357400163630ustar00rootroot00000000000000#ifndef __SNOW_3G__ #define __SNOW_3G__ #include "core.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef c_uint8_t u8; typedef c_uint32_t u32; typedef c_uint64_t u64; /* Initialization. * Input k[4]: Four 32-bit words making up 128-bit key. * Input IV[4]: Four 32-bit words making 128-bit initialization variable. * Output: All the LFSRs and FSM are initialized for key generation. * See Section 4.1. */ CORE_DECLARE(void) snow_3g_initialize(u32 k[4], u32 IV[4]); /* Generation of Keystream. * input n: number of 32-bit words of keystream. * input z: space for the generated keystream, assumes * memory is allocated already. * output: generated keystream which is filled in z * See section 4.2. */ CORE_DECLARE(void) snow_3g_generate_key_stream(u32 n, u32 *z); /* f8. * Input key: 128 bit Confidentiality Key. * Input count:32-bit Count, Frame dependent input. * Input bearer: 5-bit Bearer identity (in the LSB side). * Input dir:1 bit, direction of transmission. * Input data: length number of bits, input bit stream. * Input length: 32 bit Length, i.e., the number of bits to be encrypted or * decrypted. * Output data: Output bit stream. Assumes data is suitably memory * allocated. * Encrypts/decrypts blocks of data between 1 and 2^32 bits in length as * defined in Section 3. */ CORE_DECLARE(void) snow_3g_f8( u8 *key, u32 count, u32 bearer, u32 dir, u8 *data, u32 length ); /* f9. * Input key: 128 bit Integrity Key. * Input count:32-bit Count, Frame dependent input. * Input fresh: 32-bit Random number. * Input dir:1 bit, direction of transmission (in the LSB). * Input data: length number of bits, input bit stream. * Input length: 64 bit Length, i.e., the number of bits to be MAC'd. * Output : 32 bit block used as MAC * Generates 32-bit MAC using UIA2 algorithm as defined in Section 4. */ CORE_DECLARE(void) snow_3g_f9( u8* key, u32 count, u32 fresh, u32 dir, u8 *data, u64 length, u8 *out); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __SNOW_3G__ */ nextepc-0.3.10/src/mme/zuc.c000066400000000000000000000240551333553357400155740ustar00rootroot00000000000000/*--------------------------------------------- * ZUC / EEA3 / EIA3 : LTE security algorithm *--------------------------------------------*/ #include "core_pkbuf.h" #include "zuc.h" /*-------------------------------------------- * ZUC keystream generator algorithm *------------------------------------------*/ /* the state registers of LFSR */ static u32 LFSR_S0; static u32 LFSR_S1; static u32 LFSR_S2; static u32 LFSR_S3; static u32 LFSR_S4; static u32 LFSR_S5; static u32 LFSR_S6; static u32 LFSR_S7; static u32 LFSR_S8; static u32 LFSR_S9; static u32 LFSR_S10; static u32 LFSR_S11; static u32 LFSR_S12; static u32 LFSR_S13; static u32 LFSR_S14; static u32 LFSR_S15; /* the registers of F */ static u32 F_R1; static u32 F_R2; /* the outputs of BitReorganization */ static u32 BRC_X0; static u32 BRC_X1; static u32 BRC_X2; static u32 BRC_X3; /* the s-boxes */ static u8 S0[256] = { 0x3e,0x72,0x5b,0x47,0xca,0xe0,0x00,0x33,0x04,0xd1,0x54,0x98,0x09,0xb9,0x6d,0xcb, 0x7b,0x1b,0xf9,0x32,0xaf,0x9d,0x6a,0xa5,0xb8,0x2d,0xfc,0x1d,0x08,0x53,0x03,0x90, 0x4d,0x4e,0x84,0x99,0xe4,0xce,0xd9,0x91,0xdd,0xb6,0x85,0x48,0x8b,0x29,0x6e,0xac, 0xcd,0xc1,0xf8,0x1e,0x73,0x43,0x69,0xc6,0xb5,0xbd,0xfd,0x39,0x63,0x20,0xd4,0x38, 0x76,0x7d,0xb2,0xa7,0xcf,0xed,0x57,0xc5,0xf3,0x2c,0xbb,0x14,0x21,0x06,0x55,0x9b, 0xe3,0xef,0x5e,0x31,0x4f,0x7f,0x5a,0xa4,0x0d,0x82,0x51,0x49,0x5f,0xba,0x58,0x1c, 0x4a,0x16,0xd5,0x17,0xa8,0x92,0x24,0x1f,0x8c,0xff,0xd8,0xae,0x2e,0x01,0xd3,0xad, 0x3b,0x4b,0xda,0x46,0xeb,0xc9,0xde,0x9a,0x8f,0x87,0xd7,0x3a,0x80,0x6f,0x2f,0xc8, 0xb1,0xb4,0x37,0xf7,0x0a,0x22,0x13,0x28,0x7c,0xcc,0x3c,0x89,0xc7,0xc3,0x96,0x56, 0x07,0xbf,0x7e,0xf0,0x0b,0x2b,0x97,0x52,0x35,0x41,0x79,0x61,0xa6,0x4c,0x10,0xfe, 0xbc,0x26,0x95,0x88,0x8a,0xb0,0xa3,0xfb,0xc0,0x18,0x94,0xf2,0xe1,0xe5,0xe9,0x5d, 0xd0,0xdc,0x11,0x66,0x64,0x5c,0xec,0x59,0x42,0x75,0x12,0xf5,0x74,0x9c,0xaa,0x23, 0x0e,0x86,0xab,0xbe,0x2a,0x02,0xe7,0x67,0xe6,0x44,0xa2,0x6c,0xc2,0x93,0x9f,0xf1, 0xf6,0xfa,0x36,0xd2,0x50,0x68,0x9e,0x62,0x71,0x15,0x3d,0xd6,0x40,0xc4,0xe2,0x0f, 0x8e,0x83,0x77,0x6b,0x25,0x05,0x3f,0x0c,0x30,0xea,0x70,0xb7,0xa1,0xe8,0xa9,0x65, 0x8d,0x27,0x1a,0xdb,0x81,0xb3,0xa0,0xf4,0x45,0x7a,0x19,0xdf,0xee,0x78,0x34,0x60 }; static u8 S1[256] = { 0x55,0xc2,0x63,0x71,0x3b,0xc8,0x47,0x86,0x9f,0x3c,0xda,0x5b,0x29,0xaa,0xfd,0x77, 0x8c,0xc5,0x94,0x0c,0xa6,0x1a,0x13,0x00,0xe3,0xa8,0x16,0x72,0x40,0xf9,0xf8,0x42, 0x44,0x26,0x68,0x96,0x81,0xd9,0x45,0x3e,0x10,0x76,0xc6,0xa7,0x8b,0x39,0x43,0xe1, 0x3a,0xb5,0x56,0x2a,0xc0,0x6d,0xb3,0x05,0x22,0x66,0xbf,0xdc,0x0b,0xfa,0x62,0x48, 0xdd,0x20,0x11,0x06,0x36,0xc9,0xc1,0xcf,0xf6,0x27,0x52,0xbb,0x69,0xf5,0xd4,0x87, 0x7f,0x84,0x4c,0xd2,0x9c,0x57,0xa4,0xbc,0x4f,0x9a,0xdf,0xfe,0xd6,0x8d,0x7a,0xeb, 0x2b,0x53,0xd8,0x5c,0xa1,0x14,0x17,0xfb,0x23,0xd5,0x7d,0x30,0x67,0x73,0x08,0x09, 0xee,0xb7,0x70,0x3f,0x61,0xb2,0x19,0x8e,0x4e,0xe5,0x4b,0x93,0x8f,0x5d,0xdb,0xa9, 0xad,0xf1,0xae,0x2e,0xcb,0x0d,0xfc,0xf4,0x2d,0x46,0x6e,0x1d,0x97,0xe8,0xd1,0xe9, 0x4d,0x37,0xa5,0x75,0x5e,0x83,0x9e,0xab,0x82,0x9d,0xb9,0x1c,0xe0,0xcd,0x49,0x89, 0x01,0xb6,0xbd,0x58,0x24,0xa2,0x5f,0x38,0x78,0x99,0x15,0x90,0x50,0xb8,0x95,0xe4, 0xd0,0x91,0xc7,0xce,0xed,0x0f,0xb4,0x6f,0xa0,0xcc,0xf0,0x02,0x4a,0x79,0xc3,0xde, 0xa3,0xef,0xea,0x51,0xe6,0x6b,0x18,0xec,0x1b,0x2c,0x80,0xf7,0x74,0xe7,0xff,0x21, 0x5a,0x6a,0x54,0x1e,0x41,0x31,0x92,0x35,0xc4,0x33,0x07,0x0a,0xba,0x7e,0x0e,0x34, 0x88,0xb1,0x98,0x7c,0xf3,0x3d,0x60,0x6c,0x7b,0xca,0xd3,0x1f,0x32,0x65,0x04,0x28, 0x64,0xbe,0x85,0x9b,0x2f,0x59,0x8a,0xd7,0xb0,0x25,0xac,0xaf,0x12,0x03,0xe2,0xf2 }; /* the constants D */ static u32 EK_d[16] = { 0x44D7, 0x26BC, 0x626B, 0x135E, 0x5789, 0x35E2, 0x7135, 0x09AF, 0x4D78, 0x2F13, 0x6BC4, 0x1AF1, 0x5E26, 0x3C4D, 0x789A, 0x47AC }; /* - */ /* c = a + b mod (2^31 1) */ u32 AddM(u32 a, u32 b) { u32 c = a + b; return (c & 0x7FFFFFFF) + (c >> 31); } /* LFSR with initialization mode */ #define MulByPow2(x, k) ((((x) << k) | ((x) >> (31 - k))) & 0x7FFFFFFF) void LFSRWithInitialisationMode(u32 u) { u32 f, v; f = LFSR_S0; v = MulByPow2(LFSR_S0, 8); f = AddM(f, v); v = MulByPow2(LFSR_S4, 20); f = AddM(f, v); v = MulByPow2(LFSR_S10, 21); f = AddM(f, v); v = MulByPow2(LFSR_S13, 17); f = AddM(f, v); v = MulByPow2(LFSR_S15, 15); f = AddM(f, v); f = AddM(f, u); /* update the state */ LFSR_S0 = LFSR_S1; LFSR_S1 = LFSR_S2; LFSR_S2 = LFSR_S3; LFSR_S3 = LFSR_S4; LFSR_S4 = LFSR_S5; LFSR_S5 = LFSR_S6; LFSR_S6 = LFSR_S7; LFSR_S7 = LFSR_S8; LFSR_S8 = LFSR_S9; LFSR_S9 = LFSR_S10; LFSR_S10 = LFSR_S11; LFSR_S11 = LFSR_S12; LFSR_S12 = LFSR_S13; LFSR_S13 = LFSR_S14; LFSR_S14 = LFSR_S15; LFSR_S15 = f; } /* LFSR with work mode */ void LFSRWithWorkMode() { u32 f, v; f = LFSR_S0; v = MulByPow2(LFSR_S0, 8); f = AddM(f, v); v = MulByPow2(LFSR_S4, 20); f = AddM(f, v); v = MulByPow2(LFSR_S10, 21); f = AddM(f, v); v = MulByPow2(LFSR_S13, 17); f = AddM(f, v); v = MulByPow2(LFSR_S15, 15); f = AddM(f, v); /* update the state */ LFSR_S0 = LFSR_S1; LFSR_S1 = LFSR_S2; LFSR_S2 = LFSR_S3; LFSR_S3 = LFSR_S4; LFSR_S4 = LFSR_S5; LFSR_S5 = LFSR_S6; LFSR_S6 = LFSR_S7; LFSR_S7 = LFSR_S8; LFSR_S8 = LFSR_S9; LFSR_S9 = LFSR_S10; LFSR_S10 = LFSR_S11; LFSR_S11 = LFSR_S12; LFSR_S12 = LFSR_S13; LFSR_S13 = LFSR_S14; LFSR_S14 = LFSR_S15; LFSR_S15 = f; } /* BitReorganization */ void BitReorganization() { BRC_X0 = ((LFSR_S15 & 0x7FFF8000) << 1) | (LFSR_S14 & 0xFFFF); BRC_X1 = ((LFSR_S11 & 0xFFFF) << 16) | (LFSR_S9 >> 15); BRC_X2 = ((LFSR_S7 & 0xFFFF) << 16) | (LFSR_S5 >> 15); BRC_X3 = ((LFSR_S2 & 0xFFFF) << 16) | (LFSR_S0 >> 15); } #define ROT(a, k) (((a) << k) | ((a) >> (32 - k))) /* L1 */ u32 L1(u32 X) { return (X ^ ROT(X, 2) ^ ROT(X, 10) ^ ROT(X, 18) ^ ROT(X, 24)); } /* L2 */ u32 L2(u32 X) { return (X ^ ROT(X, 8) ^ ROT(X, 14) ^ ROT(X, 22) ^ ROT(X, 30)); } #define MAKEU32(a, b, c, d) (((u32)(a) << 24) | ((u32)(b) << 16) | ((u32)(c) << 8) | ((u32)(d))) /* F */ u32 F() { u32 W, W1, W2, u, v; W = (BRC_X0 ^ F_R1) + F_R2; W1 = F_R1 + BRC_X1; W2 = F_R2 ^ BRC_X2; u = L1((W1 << 16) | (W2 >> 16)); v = L2((W2 << 16) | (W1 >> 16)); F_R1 = MAKEU32(S0[u >> 24], S1[(u >> 16) & 0xFF], S0[(u >> 8) & 0xFF], S1[u & 0xFF]); F_R2 = MAKEU32(S0[v >> 24], S1[(v >> 16) & 0xFF], S0[(v >> 8) & 0xFF], S1[v & 0xFF]); return W; } #define MAKEU31(a, b, c) (((u32)(a) << 23) | ((u32)(b) << 8) | (u32)(c)) /* initialize */ void zuc_initialize(u8* k, u8* iv) { u32 w, nCount; /* expand key */ LFSR_S0 = MAKEU31(k[0], EK_d[0], iv[0]); LFSR_S1 = MAKEU31(k[1], EK_d[1], iv[1]); LFSR_S2 = MAKEU31(k[2], EK_d[2], iv[2]); LFSR_S3 = MAKEU31(k[3], EK_d[3], iv[3]); LFSR_S4 = MAKEU31(k[4], EK_d[4], iv[4]); LFSR_S5 = MAKEU31(k[5], EK_d[5], iv[5]); LFSR_S6 = MAKEU31(k[6], EK_d[6], iv[6]); LFSR_S7 = MAKEU31(k[7], EK_d[7], iv[7]); LFSR_S8 = MAKEU31(k[8], EK_d[8], iv[8]); LFSR_S9 = MAKEU31(k[9], EK_d[9], iv[9]); LFSR_S10 = MAKEU31(k[10], EK_d[10], iv[10]); LFSR_S11 = MAKEU31(k[11], EK_d[11], iv[11]); LFSR_S12 = MAKEU31(k[12], EK_d[12], iv[12]); LFSR_S13 = MAKEU31(k[13], EK_d[13], iv[13]); LFSR_S14 = MAKEU31(k[14], EK_d[14], iv[14]); LFSR_S15 = MAKEU31(k[15], EK_d[15], iv[15]); /* set F_R1 and F_R2 to zero */ F_R1 = 0; F_R2 = 0; nCount = 32; while (nCount > 0) { BitReorganization(); w = F(); LFSRWithInitialisationMode(w >> 1); nCount --; } } void zuc_generate_key_stream(u32* pKeystream, u32 KeystreamLen) { int i; BitReorganization(); F(); /* discard the output of F */ LFSRWithWorkMode(); for (i = 0; i < KeystreamLen; i ++) { BitReorganization(); pKeystream[i] = F() ^ BRC_X3; LFSRWithWorkMode(); } } /* The ZUC algorithm, see ref. [3]*/ void ZUC(u8* k, u8* iv, u32* ks, u32 len) { /* The initialization of ZUC, see page 17 of ref. [3]*/ zuc_initialize(k, iv); /* The procedure of generating keystream of ZUC, see page 18 of ref. [3]*/ zuc_generate_key_stream(ks, len); } /* end of ZUC.c */ /*----------------------------------------------------- * EEA3 *---------------------------------------------------*/ /* * EEA3: LTE Encryption Algorithm 3 * EEA3.c */ void zuc_eea3(u8* CK, u32 COUNT, u32 BEARER, u32 DIRECTION, u32 LENGTH, u8* M, u8* C) { u32 *z, L, L8, i; u8 IV[16]; u32 lastbits = (8-(LENGTH%8))%8; L = (LENGTH+31)/32; z = (u32 *) core_malloc(L*sizeof(u32)); L8 = (LENGTH+7)/8; IV[0] = (COUNT>>24) & 0xFF; IV[1] = (COUNT>>16) & 0xFF; IV[2] = (COUNT>>8) & 0xFF; IV[3] = COUNT & 0xFF; IV[4] = ((BEARER << 3) | ((DIRECTION&1)<<2)) & 0xFC; IV[5] = 0; IV[6] = 0; IV[7] = 0; IV[8] = IV[0]; IV[9] = IV[1]; IV[10] = IV[2]; IV[11] = IV[3]; IV[12] = IV[4]; IV[13] = IV[5]; IV[14] = IV[6]; IV[15] = IV[7]; ZUC(CK, IV, z, L); for (i=0; i> (3-i%4)*8) & 0xff); } /* zero last bits of data in case its length is not word-aligned (32 bits) this is an addition to the C reference code, which did not handle it */ if (lastbits) i--; C[i] &= 0x100 - (1<>(32-ti)); return WORD; } u8 GET_BIT(u8 * DATA, u32 i) { return (DATA[i/8] & (1<<(7-(i%8)))) ? 1 : 0; } void zuc_eia3(u8* IK, u32 COUNT, u32 BEARER, u32 DIRECTION, u32 LENGTH, u8* M, u32* MAC) { u32 *z, N, L, T, i; u8 IV[16]; IV[0] = (COUNT>>24) & 0xFF; IV[1] = (COUNT>>16) & 0xFF; IV[2] = (COUNT>>8) & 0xFF; IV[3] = COUNT & 0xFF; IV[4] = (BEARER << 3) & 0xF8; IV[5] = IV[6] = IV[7] = 0; IV[8] = ((COUNT>>24) & 0xFF) ^ ((DIRECTION&1)<<7); IV[9] = (COUNT>>16) & 0xFF; IV[10] = (COUNT>>8) & 0xFF; IV[11] = COUNT & 0xFF; IV[12] = IV[4]; IV[13] = IV[5]; IV[14] = IV[6] ^ ((DIRECTION&1)<<7); IV[15] = IV[7]; N = LENGTH + 64; L = (N + 31) / 32; z = (u32 *) core_malloc(L*sizeof(u32)); ZUC(IK, IV, z, L); T = 0; for (i=0; ilogger.trace.app; if (app) { d_trace_level(&_pcrf_main, app); } d_trace(1, "PCRF try to initialize\n"); rv = pcrf_initialize(); if (rv != CORE_OK) { d_error("Failed to intialize PCRF"); return rv; } d_trace(1, "PCRF initialize...done\n"); rv = app_did_initialize(); if (rv != CORE_OK) return rv; return CORE_OK; } void app_terminate(void) { app_will_terminate(); d_trace(1, "PCRF try to terminate\n"); pcrf_terminate(); d_trace(1, "PCRF terminate...done\n"); app_did_terminate(); } nextepc-0.3.10/src/pcrf/000077500000000000000000000000001333553357400147755ustar00rootroot00000000000000nextepc-0.3.10/src/pcrf/Makefile.am000066400000000000000000000013511333553357400170310ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in. noinst_LTLIBRARIES = libpcrf.la libpcrf_la_SOURCES = \ pcrf_context.h pcrf_fd_path.h \ pcrf_init.c pcrf_context.c pcrf_fd_path.c pcrf_gx_path.c pcrf_rx_path.c \ $(NULL) libpcrf_la_DEPENDENCIES = \ $(top_srcdir)/lib/fd/libfd.la \ $(top_srcdir)/src/common/libcommon.la \ $(NULL) libpcrf_la_LIBADD = \ $(top_srcdir)/lib/fd/libfd.la \ $(top_srcdir)/src/common/libcommon.la \ $(NULL) AM_CPPFLAGS = \ -I$(top_srcdir)/lib/core/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ -I$(top_srcdir)/lib/@FREEDIAMETER_DIR@/include \ @MONGOC_CFLAGS@ \ $(NULL) AM_CFLAGS = \ -Wall -Werror MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = core *.stackdump nextepc-0.3.10/src/pcrf/pcrf_context.c000066400000000000000000001061621333553357400176450ustar00rootroot00000000000000#define TRACE_MODULE _pcrf_context #include "core_debug.h" #include "core_pkbuf.h" #include "core_lib.h" #include #include #include "common/yaml_helper.h" #include "fd/fd_lib.h" #include "common/context.h" #include "pcrf_context.h" static pcrf_context_t self; static fd_config_t g_fd_conf; static int context_initialized = 0; pcrf_context_t* pcrf_self() { return &self; } status_t pcrf_context_init(void) { status_t rv; d_assert(context_initialized == 0, return CORE_ERROR, "PCRF context already has been context_initialized"); /* Initial FreeDiameter Config */ memset(&g_fd_conf, 0, sizeof(fd_config_t)); /* Initialize PCRF context */ memset(&self, 0, sizeof(pcrf_context_t)); self.fd_config = &g_fd_conf; rv = mutex_create(&self.db_lock, MUTEX_DEFAULT); d_assert(rv == CORE_OK, return CORE_ERROR, ); rv = mutex_create(&self.hash_lock, MUTEX_DEFAULT); d_assert(rv == CORE_OK, return CORE_ERROR, ); self.ip_hash = hash_make(); context_initialized = 1; return CORE_OK; } status_t pcrf_context_final(void) { d_assert(context_initialized == 1, return CORE_ERROR, "PCRF context already has been finalized"); d_assert(self.ip_hash,, ); hash_destroy(self.ip_hash); mutex_delete(self.hash_lock); mutex_delete(self.db_lock); context_initialized = 0; return CORE_OK; } static status_t pcrf_context_prepare() { self.fd_config->cnf_port = DIAMETER_PORT; self.fd_config->cnf_port_tls = DIAMETER_SECURE_PORT; return CORE_OK; } static status_t pcrf_context_validation() { if (self.fd_conf_path == NULL && (self.fd_config->cnf_diamid == NULL || self.fd_config->cnf_diamrlm == NULL || self.fd_config->cnf_addr == NULL)) { d_error("No pcrf.freeDiameter in '%s'", context_self()->config.path); return CORE_ERROR; } return CORE_OK; } status_t pcrf_context_parse_config() { status_t rv; config_t *config = &context_self()->config; yaml_document_t *document = NULL; yaml_iter_t root_iter; d_assert(config, return CORE_ERROR,); document = config->document; d_assert(document, return CORE_ERROR,); rv = pcrf_context_prepare(); if (rv != CORE_OK) return rv; yaml_iter_init(&root_iter, document); while(yaml_iter_next(&root_iter)) { const char *root_key = yaml_iter_key(&root_iter); d_assert(root_key, return CORE_ERROR,); if (!strcmp(root_key, "pcrf")) { yaml_iter_t pcrf_iter; yaml_iter_recurse(&root_iter, &pcrf_iter); while(yaml_iter_next(&pcrf_iter)) { const char *pcrf_key = yaml_iter_key(&pcrf_iter); d_assert(pcrf_key, return CORE_ERROR,); if (!strcmp(pcrf_key, "freeDiameter")) { yaml_node_t *node = yaml_document_get_node(document, pcrf_iter.pair->value); d_assert(node, return CORE_ERROR,); if (node->type == YAML_SCALAR_NODE) { self.fd_conf_path = yaml_iter_value(&pcrf_iter); } else if (node->type == YAML_MAPPING_NODE) { yaml_iter_t fd_iter; yaml_iter_recurse(&pcrf_iter, &fd_iter); while(yaml_iter_next(&fd_iter)) { const char *fd_key = yaml_iter_key(&fd_iter); d_assert(fd_key, return CORE_ERROR,); if (!strcmp(fd_key, "identity")) { self.fd_config->cnf_diamid = yaml_iter_value(&fd_iter); } else if (!strcmp(fd_key, "realm")) { self.fd_config->cnf_diamrlm = yaml_iter_value(&fd_iter); } else if (!strcmp(fd_key, "port")) { const char *v = yaml_iter_value(&fd_iter); if (v) self.fd_config->cnf_port = atoi(v); } else if (!strcmp(fd_key, "sec_port")) { const char *v = yaml_iter_value(&fd_iter); if (v) self.fd_config->cnf_port_tls = atoi(v); } else if (!strcmp(fd_key, "no_sctp")) { self.fd_config->cnf_flags.no_sctp = yaml_iter_bool(&fd_iter); } else if (!strcmp(fd_key, "listen_on")) { self.fd_config->cnf_addr = yaml_iter_value(&fd_iter); } else if (!strcmp(fd_key, "load_extension")) { yaml_iter_t ext_array, ext_iter; yaml_iter_recurse(&fd_iter, &ext_array); do { const char *module = NULL; const char *conf = NULL; if (yaml_iter_type(&ext_array) == YAML_MAPPING_NODE) { memcpy(&ext_iter, &ext_array, sizeof(yaml_iter_t)); } else if (yaml_iter_type(&ext_array) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&ext_array)) break; yaml_iter_recurse( &ext_array, &ext_iter); } else if (yaml_iter_type(&ext_array) == YAML_SCALAR_NODE) { break; } else d_assert(0, return CORE_ERROR,); while(yaml_iter_next(&ext_iter)) { const char *ext_key = yaml_iter_key(&ext_iter); d_assert(ext_key, return CORE_ERROR,); if (!strcmp(ext_key, "module")) { module = yaml_iter_value(&ext_iter); } else if (!strcmp(ext_key, "conf")) { conf = yaml_iter_value(&ext_iter); } else d_warn("unknown key `%s`", ext_key); } if (module) { self.fd_config-> ext[self.fd_config->num_of_ext]. module = module; self.fd_config-> ext[self.fd_config->num_of_ext]. conf = conf; self.fd_config->num_of_ext++; } } while(yaml_iter_type(&ext_array) == YAML_SEQUENCE_NODE); } else if (!strcmp(fd_key, "connect")) { yaml_iter_t conn_array, conn_iter; yaml_iter_recurse(&fd_iter, &conn_array); do { const char *identity = NULL; const char *addr = NULL; c_uint16_t port = 0; if (yaml_iter_type(&conn_array) == YAML_MAPPING_NODE) { memcpy(&conn_iter, &conn_array, sizeof(yaml_iter_t)); } else if (yaml_iter_type(&conn_array) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&conn_array)) break; yaml_iter_recurse(&conn_array, &conn_iter); } else if (yaml_iter_type(&conn_array) == YAML_SCALAR_NODE) { break; } else d_assert(0, return CORE_ERROR,); while(yaml_iter_next(&conn_iter)) { const char *conn_key = yaml_iter_key(&conn_iter); d_assert(conn_key, return CORE_ERROR,); if (!strcmp(conn_key, "identity")) { identity = yaml_iter_value(&conn_iter); } else if (!strcmp(conn_key, "addr")) { addr = yaml_iter_value(&conn_iter); } else if (!strcmp(conn_key, "port")) { const char *v = yaml_iter_value(&conn_iter); if (v) port = atoi(v); } else d_warn("unknown key `%s`", conn_key); } if (identity && addr) { self.fd_config-> conn[self.fd_config->num_of_conn]. identity = identity; self.fd_config-> conn[self.fd_config->num_of_conn]. addr = addr; self.fd_config-> conn[self.fd_config->num_of_conn]. port = port; self.fd_config->num_of_conn++; } } while(yaml_iter_type(&conn_array) == YAML_SEQUENCE_NODE); } else d_warn("unknown key `%s`", fd_key); } } } else d_warn("unknown key `%s`", pcrf_key); } } } rv = pcrf_context_validation(); if (rv != CORE_OK) return rv; return CORE_OK; } status_t pcrf_context_setup_trace_module() { int app = context_self()->logger.trace.app; int diameter = context_self()->logger.trace.diameter; if (app) { extern int _pcrf_context; d_trace_level(&_pcrf_context, app); } if (diameter) { extern int _pcrf_fd_path; d_trace_level(&_pcrf_fd_path, diameter); extern int _pcrf_gx_path; d_trace_level(&_pcrf_gx_path, diameter); extern int _pcrf_rx_path; d_trace_level(&_pcrf_rx_path, diameter); extern int _fd_init; d_trace_level(&_fd_init, diameter); extern int _fd_logger; d_trace_level(&_fd_logger, diameter); } return CORE_OK; } status_t pcrf_db_init() { if (context_self()->db_client && context_self()->db_name) { self.subscriberCollection = mongoc_client_get_collection( context_self()->db_client, context_self()->db_name, "subscribers"); d_assert(self.subscriberCollection, return CORE_ERROR, "Couldn't find Subscriber Collection in '%s'", context_self()->db_name); } return CORE_OK; } status_t pcrf_db_final() { if (self.subscriberCollection) { mongoc_collection_destroy(self.subscriberCollection); } return CORE_OK; } status_t pcrf_db_qos_data( c_int8_t *imsi_bcd, c_int8_t *apn, gx_message_t *gx_message) { status_t rv = CORE_OK; mongoc_cursor_t *cursor = NULL; bson_t *query = NULL; bson_t *opts = NULL; bson_error_t error; const bson_t *document; bson_iter_t iter; bson_iter_t child1_iter, child2_iter, child3_iter; bson_iter_t child4_iter, child5_iter, child6_iter; const char *utf8 = NULL; c_uint32_t length = 0; d_assert(imsi_bcd, return CORE_ERROR, "Null param"); d_assert(apn, return CORE_ERROR, "Null param"); d_assert(gx_message, return CORE_ERROR, "Null param"); mutex_lock(self.db_lock); query = BCON_NEW( "imsi", BCON_UTF8(imsi_bcd), "pdn.apn", BCON_UTF8(apn)); #if MONGOC_MAJOR_VERSION >= 1 && MONGOC_MINOR_VERSION >= 5 opts = BCON_NEW( "projection", "{", "imsi", BCON_INT64(1), "pdn.$", BCON_INT64(1), "}" ); cursor = mongoc_collection_find_with_opts( self.subscriberCollection, query, opts, NULL); #else opts = BCON_NEW( "imsi", BCON_INT64(1), "pdn.$", BCON_INT64(1) ); cursor = mongoc_collection_find(self.subscriberCollection, MONGOC_QUERY_NONE, 0, 0, 0, query, opts, NULL); #endif if (!mongoc_cursor_next(cursor, &document)) { d_error("Cannot find IMSI(%s)+APN(%s) in DB", imsi_bcd, apn); rv = CORE_ERROR; goto out; } if (mongoc_cursor_error(cursor, &error)) { d_error("Cursor Failure: %s", error.message); rv = CORE_ERROR; goto out; } if (!bson_iter_init(&iter, document)) { d_error("bson_iter_init failed in this document"); rv = CORE_ERROR; goto out; } while(bson_iter_next(&iter)) { const char *key = bson_iter_key(&iter); if (!strcmp(key, "pdn") && BSON_ITER_HOLDS_ARRAY(&iter)) { int pdn_index = 0; bson_iter_recurse(&iter, &child1_iter); while(bson_iter_next(&child1_iter)) { const char *child1_key = bson_iter_key(&child1_iter); pdn_t *pdn = NULL; d_assert(child1_key, goto out, "PDN is not ARRAY"); pdn_index = atoi(child1_key); d_assert(pdn_index == 0, goto out, "Invalid PDN Index(%d)", pdn_index); pdn = &gx_message->pdn; bson_iter_recurse(&child1_iter, &child2_iter); while(bson_iter_next(&child2_iter)) { const char *child2_key = bson_iter_key(&child2_iter); if (!strcmp(child2_key, "apn") && BSON_ITER_HOLDS_UTF8(&child2_iter)) { utf8 = bson_iter_utf8(&child2_iter, &length); core_cpystrn(pdn->apn, utf8, c_min(length, MAX_APN_LEN)+1); } else if (!strcmp(child2_key, "type") && BSON_ITER_HOLDS_INT32(&child2_iter)) { pdn->pdn_type = bson_iter_int32(&child2_iter); } else if (!strcmp(child2_key, "qos") && BSON_ITER_HOLDS_DOCUMENT(&child2_iter)) { bson_iter_recurse(&child2_iter, &child3_iter); while(bson_iter_next(&child3_iter)) { const char *child3_key = bson_iter_key(&child3_iter); if (!strcmp(child3_key, "qci") && BSON_ITER_HOLDS_INT32(&child3_iter)) { pdn->qos.qci = bson_iter_int32(&child3_iter); } else if (!strcmp(child3_key, "arp") && BSON_ITER_HOLDS_DOCUMENT(&child3_iter)) { bson_iter_recurse(&child3_iter, &child4_iter); while(bson_iter_next(&child4_iter)) { const char *child4_key = bson_iter_key(&child4_iter); if (!strcmp(child4_key, "priority_level") && BSON_ITER_HOLDS_INT32(&child4_iter)) { pdn->qos.arp.priority_level = bson_iter_int32(&child4_iter); } else if (!strcmp(child4_key, "pre_emption_capability") && BSON_ITER_HOLDS_INT32(&child4_iter)) { pdn->qos.arp.pre_emption_capability = bson_iter_int32(&child4_iter); } else if (!strcmp(child4_key, "pre_emption_vulnerability") && BSON_ITER_HOLDS_INT32(&child4_iter)) { pdn->qos.arp.pre_emption_vulnerability = bson_iter_int32(&child4_iter); } } } } } else if (!strcmp(child2_key, "ambr") && BSON_ITER_HOLDS_DOCUMENT(&child2_iter)) { bson_iter_recurse(&child2_iter, &child3_iter); while(bson_iter_next(&child3_iter)) { const char *child3_key = bson_iter_key(&child3_iter); if (!strcmp(child3_key, "uplink") && BSON_ITER_HOLDS_INT64(&child3_iter)) { pdn->ambr.uplink = bson_iter_int64(&child3_iter) * 1024; } else if (!strcmp(child3_key, "downlink") && BSON_ITER_HOLDS_INT64(&child3_iter)) { pdn->ambr.downlink = bson_iter_int64(&child3_iter) * 1024; } } } else if (!strcmp(child2_key, "pcc_rule") && BSON_ITER_HOLDS_ARRAY(&child2_iter)) { int pcc_rule_index = 0; bson_iter_recurse(&child2_iter, &child3_iter); while(bson_iter_next(&child3_iter)) { const char *child3_key = bson_iter_key(&child3_iter); pcc_rule_t *pcc_rule = NULL; d_assert(child3_key, goto out, "PCC RULE is not ARRAY"); pcc_rule_index = atoi(child3_key); d_assert(pcc_rule_index < MAX_NUM_OF_PCC_RULE, goto out, "Overflow of PCC RULE number(%d>%d)", pcc_rule_index, MAX_NUM_OF_PCC_RULE); pcc_rule = &gx_message->pcc_rule[pcc_rule_index]; bson_iter_recurse(&child3_iter, &child4_iter); while(bson_iter_next(&child4_iter)) { const char *child4_key = bson_iter_key(&child4_iter); if (!strcmp(child4_key, "qos") && BSON_ITER_HOLDS_DOCUMENT(&child4_iter)) { bson_iter_recurse( &child4_iter, &child5_iter); while(bson_iter_next(&child5_iter)) { const char *child5_key = bson_iter_key(&child5_iter); if (!strcmp(child5_key, "qci") && BSON_ITER_HOLDS_INT32(&child5_iter)) { pcc_rule->qos.qci = bson_iter_int32(&child5_iter); } else if (!strcmp(child5_key, "arp") && BSON_ITER_HOLDS_DOCUMENT( &child5_iter)) { bson_iter_recurse( &child5_iter, &child6_iter); while(bson_iter_next(&child6_iter)) { const char *child6_key = bson_iter_key(&child6_iter); if (!strcmp(child6_key, "priority_level") && BSON_ITER_HOLDS_INT32( &child6_iter)) { pcc_rule->qos.arp. priority_level = bson_iter_int32( &child6_iter); } else if (!strcmp(child6_key, "pre_emption_capability") && BSON_ITER_HOLDS_INT32( &child6_iter)) { pcc_rule->qos.arp. pre_emption_capability = bson_iter_int32( &child6_iter); } else if (!strcmp(child6_key, "pre_emption_vulnerability") && BSON_ITER_HOLDS_INT32(&child6_iter)) { pcc_rule->qos.arp. pre_emption_vulnerability = bson_iter_int32( &child6_iter); } } } else if (!strcmp(child5_key, "mbr") && BSON_ITER_HOLDS_DOCUMENT( &child5_iter)) { bson_iter_recurse( &child5_iter, &child6_iter); while(bson_iter_next(&child6_iter)) { const char *child6_key = bson_iter_key(&child6_iter); if (!strcmp(child6_key, "downlink") && BSON_ITER_HOLDS_INT64( &child6_iter)) { pcc_rule->qos.mbr.downlink = bson_iter_int64( &child6_iter) * 1024; } else if (!strcmp(child6_key, "uplink") && BSON_ITER_HOLDS_INT64( &child6_iter)) { pcc_rule->qos.mbr.uplink = bson_iter_int64( &child6_iter) * 1024; } } } else if (!strcmp(child5_key, "gbr") && BSON_ITER_HOLDS_DOCUMENT( &child5_iter)) { bson_iter_recurse(&child5_iter, &child6_iter); while(bson_iter_next(&child6_iter)) { const char *child6_key = bson_iter_key(&child6_iter); if (!strcmp(child6_key, "downlink") && BSON_ITER_HOLDS_INT64( &child6_iter)) { pcc_rule->qos.gbr.downlink = bson_iter_int64( &child6_iter) * 1024; } else if (!strcmp(child6_key, "uplink") && BSON_ITER_HOLDS_INT64( &child6_iter)) { pcc_rule->qos.gbr.uplink = bson_iter_int64( &child6_iter) * 1024; } } } } } else if (!strcmp(child4_key, "flow") && BSON_ITER_HOLDS_ARRAY(&child4_iter)) { int flow_index = 0; bson_iter_recurse(&child4_iter, &child5_iter); while(bson_iter_next(&child5_iter)) { const char *child5_key = bson_iter_key(&child5_iter); flow_t *flow = NULL; d_assert(child5_key, goto out, "FLOW is not ARRAY"); flow_index = atoi(child5_key); d_assert(flow_index < MAX_NUM_OF_FLOW, goto out, "Overflow of FLOW number(%d>%d)", flow_index, MAX_NUM_OF_FLOW); flow = &pcc_rule->flow[flow_index]; bson_iter_recurse( &child5_iter, &child6_iter); while(bson_iter_next(&child6_iter)) { const char *child6_key = bson_iter_key(&child6_iter); if (!strcmp(child6_key, "direction") && BSON_ITER_HOLDS_INT32( &child6_iter)) { flow->direction = bson_iter_int32( &child6_iter); } else if (!strcmp(child6_key, "description") && BSON_ITER_HOLDS_UTF8( &child6_iter)) { utf8 = bson_iter_utf8( &child6_iter, &length); flow->description = core_malloc(length+1); core_cpystrn( (char*)flow->description, utf8, length+1); } } flow_index++; } pcc_rule->num_of_flow = flow_index; } } /* Charing-Rule-Name is automatically configured */ if (pcc_rule->name) { d_error("PCC Rule Name has already " "been defined"); CORE_FREE(pcc_rule->name); } pcc_rule->name = core_calloc( 1, MAX_PCC_RULE_NAME_LEN); d_assert(pcc_rule->name, goto out,); snprintf(pcc_rule->name, MAX_PCC_RULE_NAME_LEN, "%s%d", apn, pcc_rule_index+1); pcc_rule->precedence = pcc_rule_index+1; pcc_rule->flow_status = FLOW_STATUS_ENABLED; pcc_rule_index++; } gx_message->num_of_pcc_rule = pcc_rule_index; } } } } } out: if (query) bson_destroy(query); if (opts) bson_destroy(opts); if (cursor) mongoc_cursor_destroy(cursor); mutex_unlock(self.db_lock); return rv; } status_t pcrf_sess_set_ipv4(const void *key, c_uint8_t *sid) { d_assert(self.ip_hash, return CORE_ERROR,); mutex_lock(self.hash_lock); hash_set(self.ip_hash, key, IPV4_LEN, sid); mutex_unlock(self.hash_lock); return CORE_OK; } status_t pcrf_sess_set_ipv6(const void *key, c_uint8_t *sid) { d_assert(self.ip_hash, return CORE_ERROR,); mutex_lock(self.hash_lock); hash_set(self.ip_hash, key, IPV6_LEN, sid); mutex_unlock(self.hash_lock); return CORE_OK; } c_uint8_t *pcrf_sess_find_by_ipv4(const void *key) { c_uint8_t *sid = NULL; d_assert(key, return NULL,); mutex_lock(self.hash_lock); sid = (c_uint8_t *)hash_get(self.ip_hash, key, IPV4_LEN); mutex_unlock(self.hash_lock); return sid; } c_uint8_t *pcrf_sess_find_by_ipv6(const void *key) { c_uint8_t *sid = NULL; d_assert(key, return NULL,); mutex_lock(self.hash_lock); sid = (c_uint8_t *)hash_get(self.ip_hash, key, IPV6_LEN); mutex_unlock(self.hash_lock); return sid; } nextepc-0.3.10/src/pcrf/pcrf_context.h000066400000000000000000000027241333553357400176510ustar00rootroot00000000000000#ifndef __PCRF_CONTEXT_H__ #define __PCRF_CONTEXT_H__ #include "core_errno.h" #include "core_mutex.h" #include "core_hash.h" #include "3gpp_types.h" #include "fd/gx/gx_message.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _fd_config_t fd_config_t; struct session; typedef struct _pcrf_context_t { const char *fd_conf_path; /* PCRF freeDiameter conf path */ fd_config_t *fd_config; /* PCRF freeDiameter config */ void *subscriberCollection; mutex_id db_lock; hash_t *ip_hash; /* hash table for Gx Frame IPv4/IPv6 */ mutex_id hash_lock; } pcrf_context_t; CORE_DECLARE(status_t) pcrf_context_init(void); CORE_DECLARE(status_t) pcrf_context_final(void); CORE_DECLARE(pcrf_context_t*) pcrf_self(void); CORE_DECLARE(status_t) pcrf_context_parse_config(void); CORE_DECLARE(status_t) pcrf_context_setup_trace_module(void); CORE_DECLARE(status_t) pcrf_db_init(void); CORE_DECLARE(status_t) pcrf_db_final(void); CORE_DECLARE(status_t) pcrf_db_qos_data( c_int8_t *imsi_bcd, c_int8_t *apn, gx_message_t *gx_message); CORE_DECLARE(status_t) pcrf_sess_set_ipv4(const void *key, c_uint8_t *sid); CORE_DECLARE(status_t) pcrf_sess_set_ipv6(const void *key, c_uint8_t *sid); CORE_DECLARE(c_uint8_t *) pcrf_sess_find_by_ipv4(const void *key); CORE_DECLARE(c_uint8_t *) pcrf_sess_find_by_ipv6(const void *key); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __PCRF_CONTEXT_H__ */ nextepc-0.3.10/src/pcrf/pcrf_fd_path.c000066400000000000000000000011401333553357400175540ustar00rootroot00000000000000#define TRACE_MODULE _pcrf_fd_path #include "core_debug.h" #include "fd/fd_lib.h" #include "pcrf_context.h" #include "pcrf_fd_path.h" status_t pcrf_fd_init(void) { status_t rv; int ret = fd_init(FD_MODE_CLIENT|FD_MODE_SERVER, pcrf_self()->fd_conf_path, pcrf_self()->fd_config); d_assert(ret == 0, return CORE_ERROR,); rv = pcrf_gx_init(); d_assert(rv == CORE_OK, return CORE_ERROR,); rv = pcrf_rx_init(); d_assert(rv == CORE_OK, return CORE_ERROR,); return CORE_OK; } void pcrf_fd_final(void) { pcrf_gx_final(); pcrf_rx_final(); fd_final(); } nextepc-0.3.10/src/pcrf/pcrf_fd_path.h000066400000000000000000000013441333553357400175670ustar00rootroot00000000000000#ifndef __PCRF_FD_PATH_H__ #define __PCRF_FD_PATH_H__ #include "core_errno.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ struct sess_state; typedef struct _rx_message_t rx_message_t; CORE_DECLARE(status_t) pcrf_fd_init(void); CORE_DECLARE(void) pcrf_fd_final(void); CORE_DECLARE(status_t) pcrf_gx_init(void); CORE_DECLARE(void) pcrf_gx_final(void); CORE_DECLARE(status_t) pcrf_rx_init(void); CORE_DECLARE(void) pcrf_rx_final(void); CORE_DECLARE(status_t) pcrf_gx_send_rar( c_uint8_t *gx_sid, c_uint8_t *rx_sid, rx_message_t *rx_message); CORE_DECLARE(status_t) pcrf_rx_send_asr( c_uint8_t *rx_sid, c_uint32_t abort_cause); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __PCRF_FD_PATH_H__ */ nextepc-0.3.10/src/pcrf/pcrf_gx_path.c000066400000000000000000001545671333553357400176270ustar00rootroot00000000000000#define TRACE_MODULE _pcrf_gx_path #include "core_lib.h" #include "core_debug.h" #include "core_pool.h" #include "core_pkbuf.h" #include "fd/fd_lib.h" #include "fd/gx/gx_dict.h" #include "fd/rx/rx_dict.h" #include "fd/gx/gx_message.h" #include "fd/rx/rx_message.h" #include "pcrf_context.h" #include "pcrf_fd_path.h" struct rx_sess_state { lnode_t node; os0_t sid; /* Rx Session-Id */ pcc_rule_t pcc_rule[MAX_NUM_OF_PCC_RULE]; int num_of_pcc_rule; struct sess_state *gx; }; struct sess_state { os0_t sid; /* Gx Session-Id */ c_uint32_t cc_request_type; /* CC-Request-Type */ os0_t peer_host; /* Peer Host */ c_int8_t *imsi_bcd; c_int8_t *apn; ED3(c_uint8_t ipv4:1;, c_uint8_t ipv6:1;, c_uint8_t reserved:6;) c_uint32_t addr; /* Framed-IPv4-Address */ c_uint8_t addr6[IPV6_LEN]; /* Framed-IPv6-Prefix */ list_t rx_list; struct timespec ts; /* Time of sending the message */ }; static struct session_handler *pcrf_gx_reg = NULL; static struct disp_hdl *hdl_gx_fb = NULL; static struct disp_hdl *hdl_gx_ccr = NULL; pool_declare(pcrf_gx_sess_pool, struct sess_state, MAX_POOL_OF_DIAMETER_SESS); pool_declare(pcrf_gx_rx_sess_pool, struct rx_sess_state, MAX_POOL_OF_DIAMETER_SESS); static void pcrf_gx_raa_cb(void *data, struct msg **msg); static status_t encode_pcc_rule_definition( struct avp *avp, pcc_rule_t *pcc_rule, int flow_presence); static int matched_flow( pcc_rule_t *pcc_rule, rx_media_component_t *media_component); static status_t install_flow( pcc_rule_t *pcc_rule, rx_media_component_t *media_component); static status_t update_qos( pcc_rule_t *pcc_rule, rx_media_component_t *media_component); static __inline__ struct sess_state *new_state(os0_t sid) { struct sess_state *new = NULL; d_assert(sid, return NULL,); pool_alloc_node(&pcrf_gx_sess_pool, &new); d_assert(new, return NULL,); memset(new, 0, sizeof *new); new->sid = (os0_t)core_strdup((char *)sid); d_assert(new->sid, return NULL,); list_init(&new->rx_list); return new; } static struct rx_sess_state *add_rx_state(struct sess_state *gx, os0_t sid) { struct rx_sess_state *new = NULL; d_assert(gx, return NULL,); d_assert(sid, return NULL,); pool_alloc_node(&pcrf_gx_rx_sess_pool, &new); d_assert(new, return NULL,); memset(new, 0, sizeof *new); new->sid = (os0_t)core_strdup((char *)sid); d_assert(new->sid, return NULL,); new->gx = gx; list_append(&gx->rx_list, new); return new; } static status_t remove_rx_state(struct rx_sess_state *rx_sess_data) { struct sess_state *gx = NULL; int i; d_assert(rx_sess_data, return CORE_ERROR,); gx = rx_sess_data->gx; for (i = 0; i < rx_sess_data->num_of_pcc_rule; i++) { PCC_RULE_FREE(&rx_sess_data->pcc_rule[i]); } if (rx_sess_data->sid) CORE_FREE(rx_sess_data->sid); list_remove(&gx->rx_list, rx_sess_data); pool_free_node(&pcrf_gx_rx_sess_pool, rx_sess_data); return CORE_OK; } static status_t remove_rx_state_all(struct sess_state *gx) { struct rx_sess_state *rx_sess_data = NULL, *next_rx_sess_data = NULL; d_assert(gx, return CORE_ERROR,); rx_sess_data = list_first(&gx->rx_list); while(rx_sess_data) { next_rx_sess_data = list_next(rx_sess_data); remove_rx_state(rx_sess_data); rx_sess_data = next_rx_sess_data; } return CORE_OK; } static struct rx_sess_state *find_rx_state(struct sess_state *gx, os0_t sid) { struct rx_sess_state *rx_sess_data = NULL; d_assert(gx, return NULL,); d_assert(sid, return NULL,); rx_sess_data = list_first(&gx->rx_list); while(rx_sess_data) { if (!strcmp((char *)rx_sess_data->sid, (char *)sid)) return rx_sess_data; rx_sess_data = list_next(rx_sess_data); } return NULL; } static void state_cleanup(struct sess_state *sess_data, os0_t sid, void *opaque) { d_assert(sess_data, return,); if (sess_data->peer_host) CORE_FREE(sess_data->peer_host); if (sess_data->imsi_bcd) CORE_FREE(sess_data->imsi_bcd); if (sess_data->apn) CORE_FREE(sess_data->apn); if (sess_data->ipv4) pcrf_sess_set_ipv4(&sess_data->addr, NULL); if (sess_data->ipv6) pcrf_sess_set_ipv6(sess_data->addr6, NULL); if (sess_data->sid) CORE_FREE(sess_data->sid); remove_rx_state_all(sess_data); pool_free_node(&pcrf_gx_sess_pool, sess_data); } static int pcrf_gx_fb_cb(struct msg **msg, struct avp *avp, struct session *sess, void *opaque, enum disp_action *act) { /* This CB should never be called */ d_warn("Unexpected message received!"); return ENOTSUP; } static int pcrf_gx_ccr_cb( struct msg **msg, struct avp *avp, struct session *sess, void *opaque, enum disp_action *act) { status_t rv; int ret = 0, i; struct msg *ans, *qry; struct avp *avpch1, *avpch2; struct avp_hdr *hdr; union avp_value val; struct sess_state *sess_data = NULL; gx_message_t gx_message; c_uint32_t cc_request_number = 0; c_uint32_t result_code = FD_DIAMETER_MISSING_AVP; d_trace(3, "[PCRF] Credit-Control-Request\n"); d_assert(msg, return EINVAL,); ret = fd_sess_state_retrieve(pcrf_gx_reg, sess, &sess_data); d_assert(ret == 0, return EINVAL,); if (!sess_data) { os0_t sid; size_t sidlen; ret = fd_sess_getsid(sess, &sid, &sidlen); d_assert(ret == 0, return EINVAL,); sess_data = new_state(sid); d_assert(sess_data, return EINVAL,); } /* Initialize Message */ memset(&gx_message, 0, sizeof(gx_message_t)); /* Create answer header */ qry = *msg; ret = fd_msg_new_answer_from_req(fd_g_config->cnf_dict, msg, 0); d_assert(ret == 0, return EINVAL,); ans = *msg; /* Get Origin-Host */ ret = fd_msg_search_avp(qry, fd_origin_host, &avp); d_assert(ret == 0, return EINVAL,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return EINVAL,); if (sess_data->peer_host) CORE_FREE(sess_data->peer_host); sess_data->peer_host = (os0_t)core_strdup((char *)hdr->avp_value->os.data); d_assert(sess_data->peer_host, return CORE_ERROR,); } else { d_error("no_CC-Request-Type "); result_code = FD_DIAMETER_MISSING_AVP; goto out; } /* Get CC-Request-Type */ ret = fd_msg_search_avp(qry, gx_cc_request_type, &avp); d_assert(ret == 0, return EINVAL,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return EINVAL,); sess_data->cc_request_type = hdr->avp_value->i32; } else { d_error("no_CC-Request-Type "); result_code = FD_DIAMETER_MISSING_AVP; goto out; } /* Get CC-Request-Number */ ret = fd_msg_search_avp(qry, gx_cc_request_number, &avp); d_assert(ret == 0, return EINVAL,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return EINVAL,); cc_request_number = hdr->avp_value->i32; } /* Get Framed-IP-Address */ ret = fd_msg_search_avp(qry, gx_framed_ip_address, &avp); d_assert(ret == 0, return EINVAL,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return EINVAL,); memcpy(&sess_data->addr, hdr->avp_value->os.data, sizeof sess_data->addr); pcrf_sess_set_ipv4(&sess_data->addr, sess_data->sid); sess_data->ipv4 = 1; } /* Get Framed-IPv6-Prefix */ ret = fd_msg_search_avp(qry, gx_framed_ipv6_prefix, &avp); d_assert(ret == 0, return EINVAL,); if (avp) { paa_t *paa = NULL; ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return EINVAL,); paa = (paa_t *)hdr->avp_value->os.data; d_assert(paa, return EINVAL,); d_assert(paa->len == IPV6_LEN * 8 /* 128bit */, return EINVAL, "Invalid Framed-IPv6-Prefix Length:%d", paa->len); memcpy(sess_data->addr6, paa->addr6, sizeof sess_data->addr6); pcrf_sess_set_ipv6(sess_data->addr6, sess_data->sid); sess_data->ipv6 = 1; } /* Set the Auth-Application-Id AVP */ ret = fd_msg_avp_new(fd_auth_application_id, 0, &avp); d_assert(ret == 0, return EINVAL,); val.i32 = GX_APPLICATION_ID; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return EINVAL,); /* Set CC-Request-Type */ ret = fd_msg_avp_new(gx_cc_request_type, 0, &avp); d_assert(ret == 0, return EINVAL,); val.i32 = sess_data->cc_request_type; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return EINVAL,); /* Set CC-Request-Number */ ret = fd_msg_avp_new(gx_cc_request_number, 0, &avp); d_assert(ret == 0, return EINVAL,); val.i32 = cc_request_number; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return EINVAL,); /* Get IMSI + APN */ ret = fd_msg_search_avp(qry, gx_subscription_id, &avp); d_assert(ret == 0, return EINVAL,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return EINVAL,); ret = fd_avp_search_avp(avp, gx_subscription_id_type, &avpch1); d_assert(ret == 0, return EINVAL,); if (avpch1) { ret = fd_msg_avp_hdr(avpch1, &hdr); d_assert(ret == 0, return EINVAL,); if (hdr->avp_value->i32 != GX_SUBSCRIPTION_ID_TYPE_END_USER_IMSI) { d_error("Not implemented Subscription-Id-Type(%d)", hdr->avp_value->i32); result_code = FD_DIAMETER_AVP_UNSUPPORTED; goto out; } } else { d_error("no_Subscription-Id-Type"); result_code = FD_DIAMETER_MISSING_AVP; goto out; } ret = fd_avp_search_avp(avp, gx_subscription_id_data, &avpch1); d_assert(ret == 0, return EINVAL,); if (avpch1) { ret = fd_msg_avp_hdr(avpch1, &hdr); d_assert(ret == 0, return EINVAL,); if (sess_data->imsi_bcd) CORE_FREE(sess_data->imsi_bcd); sess_data->imsi_bcd = core_strdup((char *)hdr->avp_value->os.data); d_assert(sess_data->imsi_bcd, return CORE_ERROR,); } else { d_error("no_Subscription-Id-Data"); result_code = FD_DIAMETER_MISSING_AVP; goto out; } } if (sess_data->imsi_bcd == NULL) { d_error("no_Subscription-Id"); result_code = FD_DIAMETER_MISSING_AVP; goto out; } ret = fd_msg_search_avp(qry, gx_called_station_id, &avp); d_assert(ret == 0, return EINVAL,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return EINVAL,); if (sess_data->apn) CORE_FREE(sess_data->apn); sess_data->apn = core_strdup((char *)hdr->avp_value->os.data); d_assert(sess_data->apn, return CORE_ERROR,); } if (sess_data->apn == NULL) { d_error("no_Called-Station-Id"); result_code = FD_DIAMETER_MISSING_AVP; goto out; } /* Retrieve QoS Data from Database */ rv = pcrf_db_qos_data(sess_data->imsi_bcd, sess_data->apn, &gx_message); if (rv != CORE_OK) { d_error("Cannot get data for IMSI(%s)+APN(%s)'\n", sess_data->imsi_bcd, sess_data->apn); result_code = FD_DIAMETER_UNKNOWN_SESSION_ID; goto out; } if (sess_data->cc_request_type == GX_CC_REQUEST_TYPE_INITIAL_REQUEST || sess_data->cc_request_type == GX_CC_REQUEST_TYPE_UPDATE_REQUEST) { int charging_rule = 0; for (i = 0; i < gx_message.num_of_pcc_rule; i++) { pcc_rule_t *pcc_rule = &gx_message.pcc_rule[i]; if (pcc_rule->num_of_flow) { if (charging_rule == 0) { ret = fd_msg_avp_new(gx_charging_rule_install, 0, &avp); d_assert(ret == 0, return CORE_ERROR,); charging_rule = 1; } rv = encode_pcc_rule_definition(avp, pcc_rule, 1); d_assert(rv == CORE_OK, return EINVAL,); } } if (charging_rule) { ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return CORE_ERROR,); } /* Set QoS-Information */ if (gx_message.pdn.ambr.downlink || gx_message.pdn.ambr.uplink) { ret = fd_msg_avp_new(gx_qos_information, 0, &avp); d_assert(ret == 0, return EINVAL,); if (gx_message.pdn.ambr.uplink) { ret = fd_msg_avp_new(gx_apn_aggregate_max_bitrate_ul, 0, &avpch1); d_assert(ret == 0, return EINVAL,); val.u32 = gx_message.pdn.ambr.uplink; ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return EINVAL,); } if (gx_message.pdn.ambr.downlink) { ret = fd_msg_avp_new(gx_apn_aggregate_max_bitrate_dl, 0, &avpch1); d_assert(ret == 0, return EINVAL,); val.u32 = gx_message.pdn.ambr.downlink; ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return EINVAL,); } ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return EINVAL,); } /* Set Default-EPS-Bearer-QoS */ ret = fd_msg_avp_new(gx_default_eps_bearer_qos, 0, &avp); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_new(gx_qos_class_identifier, 0, &avpch1); d_assert(ret == 0, return EINVAL,); val.u32 = gx_message.pdn.qos.qci; ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_new(gx_allocation_retention_priority, 0, &avpch1); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_new(gx_priority_level, 0, &avpch2); d_assert(ret == 0, return EINVAL,); val.u32 = gx_message.pdn.qos.arp.priority_level; ret = fd_msg_avp_setvalue (avpch2, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add (avpch1, MSG_BRW_LAST_CHILD, avpch2); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_new(gx_pre_emption_capability, 0, &avpch2); d_assert(ret == 0, return EINVAL,); val.u32 = gx_message.pdn.qos.arp.pre_emption_capability; ret = fd_msg_avp_setvalue (avpch2, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add (avpch1, MSG_BRW_LAST_CHILD, avpch2); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_new(gx_pre_emption_vulnerability, 0, &avpch2); d_assert(ret == 0, return EINVAL,); val.u32 = gx_message.pdn.qos.arp.pre_emption_vulnerability; ret = fd_msg_avp_setvalue (avpch2, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add (avpch1, MSG_BRW_LAST_CHILD, avpch2); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return EINVAL,); /* Set Supported Features */ ret = fd_msg_avp_new(gx_supported_features, 0, &avp); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_new(gx_feature_list_id, 0, &avpch1); d_assert(ret == 0, return EINVAL,); val.i32 = 1; ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_new(gx_feature_list, 0, &avpch1); d_assert(ret == 0, return EINVAL,); val.u32 = 0x0000000b; ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return EINVAL,); } else if (sess_data->cc_request_type == GX_CC_REQUEST_TYPE_TERMINATION_REQUEST) { struct rx_sess_state *rx_sess_data = NULL, *next_rx_sess_data = NULL; rx_sess_data = list_first(&sess_data->rx_list); while(rx_sess_data) { next_rx_sess_data = list_next(rx_sess_data); rv = pcrf_rx_send_asr( rx_sess_data->sid, RX_ABORT_CAUSE_BEARER_RELEASED); d_assert(rv == CORE_OK,,); remove_rx_state(rx_sess_data); rx_sess_data = next_rx_sess_data; } } /* Set the Origin-Host, Origin-Realm, andResult-Code AVPs */ ret = fd_msg_rescode_set(ans, "DIAMETER_SUCCESS", NULL, NULL, 1); d_assert(ret == 0, return EINVAL,); if (sess_data->cc_request_type != GX_CC_REQUEST_TYPE_TERMINATION_REQUEST) { /* Store this value in the session */ ret = fd_sess_state_store(pcrf_gx_reg, sess, &sess_data); d_assert(ret == 0,,); d_assert(sess_data == NULL,,); } else { state_cleanup(sess_data, NULL, NULL); } /* Send the answer */ ret = fd_msg_send(msg, NULL, NULL); d_assert(ret == 0,,); d_trace(3, "[PCRF] Credit-Control-Answer\n"); /* Add this value to the stats */ d_assert(pthread_mutex_lock(&fd_logger_self()->stats_lock) == 0,,); fd_logger_self()->stats.nb_echoed++; d_assert(pthread_mutex_unlock(&fd_logger_self()->stats_lock) ==0,, ); gx_message_free(&gx_message); return 0; out: /* Set the Result-Code */ if (result_code == FD_DIAMETER_AVP_UNSUPPORTED) { ret = fd_msg_rescode_set(ans, "DIAMETER_AVP_UNSUPPORTED", NULL, NULL, 1); d_assert(ret == 0, return EINVAL,); } else if (result_code == FD_DIAMETER_UNKNOWN_SESSION_ID) { ret = fd_msg_rescode_set(ans, "DIAMETER_UNKNOWN_SESSION_ID", NULL, NULL, 1); d_assert(ret == 0, return EINVAL,); } else if (result_code == FD_DIAMETER_MISSING_AVP) { ret = fd_msg_rescode_set(ans, "DIAMETER_MISSING_AVP", NULL, NULL, 1); d_assert(ret == 0, return EINVAL,); } else { ret = fd_message_experimental_rescode_set(ans, result_code); d_assert(ret == 0, return EINVAL,); } if (sess_data->cc_request_type != GX_CC_REQUEST_TYPE_TERMINATION_REQUEST) { /* Store this value in the session */ ret = fd_sess_state_store(pcrf_gx_reg, sess, &sess_data); d_assert(sess_data == NULL,,); } else { state_cleanup(sess_data, NULL, NULL); } ret = fd_msg_send(msg, NULL, NULL); d_assert(ret == 0,,); gx_message_free(&gx_message); return 0; } status_t pcrf_gx_send_rar( c_uint8_t *gx_sid, c_uint8_t *rx_sid, rx_message_t *rx_message) { status_t rv; int ret = 0, i, j; int count = 0; struct msg *req = NULL; struct avp *avp, *avpch1; union avp_value val; struct sess_state *sess_data = NULL, *svg; struct rx_sess_state *rx_sess_data = NULL; struct session *session = NULL; int new; size_t sidlen; gx_message_t gx_message; int charging_rule = 0; d_assert(gx_sid, return CORE_ERROR,); d_assert(rx_sid, return CORE_ERROR,); d_assert(rx_message, return CORE_ERROR,); d_trace(3, "[PCRF] Re-Auth-Request\n"); /* Initialize Message */ memset(&gx_message, 0, sizeof(gx_message_t)); /* Set default error result code */ rx_message->result_code = FD_DIAMETER_UNKNOWN_SESSION_ID; /* Create the request */ ret = fd_msg_new(gx_cmd_rar, MSGFL_ALLOC_ETEID, &req); d_assert(ret == 0, return CORE_ERROR,); { struct msg_hdr * h; ret = fd_msg_hdr( req, &h ); d_assert(ret == 0, return CORE_ERROR,); h->msg_appl = GX_APPLICATION_ID; } /* Retrieve session by Session-Id */ sidlen = strlen((char *)gx_sid); ret = fd_sess_fromsid_msg((os0_t)gx_sid, sidlen, &session, &new); d_assert(ret == 0, return CORE_ERROR,); if (new) { d_error("No session data"); ret = fd_msg_free(req); d_assert(ret == 0,,); rx_message->result_code = FD_DIAMETER_UNKNOWN_PEER; return CORE_ERROR; } /* Add Session-Id to the message */ ret = fd_message_session_id_set(req, (os0_t)gx_sid, sidlen); d_assert(ret == 0, return CORE_ERROR,); /* Save the session associated with the message */ ret = fd_msg_sess_set(req, session); d_assert(ret == 0, return CORE_ERROR,); /* Retrieve session state in this session */ ret = fd_sess_state_retrieve(pcrf_gx_reg, session, &sess_data); d_assert(ret == 0, return CORE_ERROR,); if (sess_data == NULL) { d_error("No session data"); ret = fd_msg_free(req); d_assert(ret == 0,,); rx_message->result_code = FD_DIAMETER_UNKNOWN_SESSION_ID; return CORE_ERROR; } /* Find RX session state */ rx_sess_data = find_rx_state(sess_data, rx_sid); if (rx_message->cmd_code == RX_CMD_CODE_AA) { if (!rx_sess_data) { rx_sess_data = add_rx_state(sess_data, rx_sid); d_assert(rx_sess_data, return CORE_ERROR,); } /* Retrieve QoS Data from Database */ rv = pcrf_db_qos_data(sess_data->imsi_bcd, sess_data->apn, &gx_message); if (rv != CORE_OK) { d_error("Cannot get data for IMSI(%s)+APN(%s)'\n", sess_data->imsi_bcd, sess_data->apn); rx_message->result_code = RX_DIAMETER_IP_CAN_SESSION_NOT_AVAILABLE; goto out; } /* Match Media-Component with PCC Rule */ for (i = 0; i < rx_message->num_of_media_component; i++) { int flow_presence = 0; pcc_rule_t *pcc_rule = NULL; pcc_rule_t *db_pcc_rule = NULL; c_uint8_t qci = 0; rx_media_component_t *media_component = &rx_message->media_component[i]; if (media_component->media_component_number == 0) { continue; } switch(media_component->media_type) { case RX_MEDIA_TYPE_AUDIO: { qci = PDN_QCI_1; break; } default: { d_error("Not implemented : [Media-Type:%d]", media_component->media_type); rx_message->result_code = FD_DIAMETER_INVALID_AVP_VALUE; goto out; } } for (j = 0; j < gx_message.num_of_pcc_rule; j++) { if (gx_message.pcc_rule[j].qos.qci == qci) { db_pcc_rule = &gx_message.pcc_rule[j]; break; } } if (!db_pcc_rule) { d_error("CHECK WEBUI : No PCC Rule in DB [QCI:%d]", qci); d_error("Please add PCC Rule using WEBUI"); rx_message->result_code = RX_DIAMETER_REQUESTED_SERVICE_NOT_AUTHORIZED; goto out; } for (j = 0; j < rx_sess_data->num_of_pcc_rule; j++) { if (rx_sess_data->pcc_rule[j].qos.qci == qci) { pcc_rule = &rx_sess_data->pcc_rule[j]; break; } } if (!pcc_rule) { pcc_rule = &rx_sess_data->pcc_rule[rx_sess_data->num_of_pcc_rule]; /* Device PCC Rule Info from DB Profile */ pcc_rule->name = core_strdup(db_pcc_rule->name); d_assert(pcc_rule->name, return CORE_ERROR,); memcpy(&pcc_rule->qos, &db_pcc_rule->qos, sizeof(qos_t)); pcc_rule->flow_status = db_pcc_rule->flow_status; pcc_rule->precedence = db_pcc_rule->precedence; /* Install Flow */ flow_presence = 1; rv = install_flow(pcc_rule, media_component); if (rv != CORE_OK) { rx_message->result_code = RX_DIAMETER_FILTER_RESTRICTIONS; d_error("install_flow() failed"); goto out; } rx_sess_data->num_of_pcc_rule++; } else { d_assert(strcmp(pcc_rule->name, db_pcc_rule->name) == 0, return CORE_ERROR, "Mismatch Rule Name [%s:%s]", pcc_rule->name, db_pcc_rule->name); /* Check Flow */ count = matched_flow(pcc_rule, media_component); if (count == -1) { rx_message->result_code = RX_DIAMETER_FILTER_RESTRICTIONS; d_error("matched_flow() failed"); goto out; } if (pcc_rule->num_of_flow != count) { /* Re-install Flow */ flow_presence = 1; rv = install_flow(pcc_rule, media_component); if (rv != CORE_OK) { rx_message->result_code = RX_DIAMETER_FILTER_RESTRICTIONS; d_error("install_flow() failed"); goto out; } } } /* Update QoS */ rv = update_qos(pcc_rule, media_component); if (rv != CORE_OK) { rx_message->result_code = RX_DIAMETER_REQUESTED_SERVICE_NOT_AUTHORIZED; d_error("update_qos() failed"); goto out; } /* if we failed to get QoS from IMS, apply WEBUI QoS */ if (pcc_rule->qos.mbr.downlink == 0) pcc_rule->qos.mbr.downlink = db_pcc_rule->qos.mbr.downlink; if (pcc_rule->qos.mbr.uplink == 0) pcc_rule->qos.mbr.uplink = db_pcc_rule->qos.mbr.uplink; if (pcc_rule->qos.gbr.downlink == 0) pcc_rule->qos.gbr.downlink = db_pcc_rule->qos.gbr.downlink; if (pcc_rule->qos.gbr.uplink == 0) pcc_rule->qos.gbr.uplink = db_pcc_rule->qos.gbr.uplink; if (charging_rule == 0) { ret = fd_msg_avp_new(gx_charging_rule_install, 0, &avp); d_assert(ret == 0, return CORE_ERROR,); charging_rule = 1; } rv = encode_pcc_rule_definition(avp, pcc_rule, flow_presence); d_assert(rv == CORE_OK, return CORE_ERROR,); } if (charging_rule == 1) { ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return CORE_ERROR,); } } else if (rx_message->cmd_code == RX_CMD_CODE_SESSION_TERMINATION) { d_assert(rx_sess_data, return CORE_ERROR,); for (i = 0; i < rx_sess_data->num_of_pcc_rule; i++) { d_assert(rx_sess_data->pcc_rule[i].name,,); if (charging_rule == 0) { ret = fd_msg_avp_new(gx_charging_rule_remove, 0, &avp); d_assert(ret == 0, return CORE_ERROR,); charging_rule = 1; } ret = fd_msg_avp_new(gx_charging_rule_name, 0, &avpch1); d_assert(ret == 0, return CORE_ERROR,); val.os.data = (c_uint8_t *)rx_sess_data->pcc_rule[i].name; val.os.len = strlen(rx_sess_data->pcc_rule[i].name); ret = fd_msg_avp_setvalue(avpch1, &val); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return CORE_ERROR,); } if (charging_rule == 1) { ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return CORE_ERROR,); } remove_rx_state(rx_sess_data); } else d_assert(0, return CORE_ERROR, "Invalid Command Code(%d)", rx_message->cmd_code); if (charging_rule == 0) { rx_message->result_code = ER_DIAMETER_SUCCESS; goto out; } /* Set Origin-Host & Origin-Realm */ ret = fd_msg_add_origin(req, 0); d_assert(ret == 0, return CORE_ERROR,); /* Set the Destination-Realm AVP */ ret = fd_msg_avp_new(fd_destination_realm, 0, &avp); d_assert(ret == 0, return CORE_ERROR,); val.os.data = (unsigned char *)(fd_g_config->cnf_diamrlm); val.os.len = strlen(fd_g_config->cnf_diamrlm); ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return CORE_ERROR,); /* Set the Destination-Host AVP */ ret = fd_msg_avp_new(fd_destination_host, 0, &avp); d_assert(ret == 0, return CORE_ERROR,); val.os.data = sess_data->peer_host; val.os.len = strlen((char *)sess_data->peer_host); ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return CORE_ERROR,); /* Set the Auth-Application-Id AVP */ ret = fd_msg_avp_new(fd_auth_application_id, 0, &avp); d_assert(ret == 0, return CORE_ERROR,); val.i32 = GX_APPLICATION_ID; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return CORE_ERROR,); /* Set the Re-Auth-Request-Type */ ret = fd_msg_avp_new(fd_re_auth_request_type, 0, &avp); d_assert(ret == 0, return CORE_ERROR,); val.i32 = FD_RE_AUTH_REQUEST_TYPE_AUTHORIZE_ONLY; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return CORE_ERROR,); ret = clock_gettime(CLOCK_REALTIME, &sess_data->ts); d_assert(ret == 0, return CORE_ERROR,); /* Keep a pointer to the session data for debug purpose, * in real life we would not need it */ svg = sess_data; /* Store this value in the session */ ret = fd_sess_state_store(pcrf_gx_reg, session, &sess_data); d_assert(ret == 0, return CORE_ERROR,); d_assert(sess_data == NULL, return CORE_ERROR,); /* Send the request */ ret = fd_msg_send(&req, pcrf_gx_raa_cb, svg); d_assert(ret == 0, return CORE_ERROR,); /* Increment the counter */ d_assert(pthread_mutex_lock(&fd_logger_self()->stats_lock) == 0,,); fd_logger_self()->stats.nb_sent++; d_assert(pthread_mutex_unlock(&fd_logger_self()->stats_lock) == 0,, ); /* Set no error */ rx_message->result_code = ER_DIAMETER_SUCCESS; gx_message_free(&gx_message); return CORE_OK; out: /* Store this value in the session */ ret = fd_sess_state_store(pcrf_gx_reg, session, &sess_data); d_assert(sess_data == NULL,,); gx_message_free(&gx_message); return CORE_ERROR; } static void pcrf_gx_raa_cb(void *data, struct msg **msg) { int ret; struct sess_state *sess_data = NULL; struct timespec ts; struct session *session; struct avp *avp, *avpch1; struct avp_hdr *hdr; unsigned long dur; int error = 0; int new; c_uint32_t result_code; d_trace(3, "[PCRF] Re-Auth-Answer\n"); ret = clock_gettime(CLOCK_REALTIME, &ts); d_assert(ret == 0, return,); /* Search the session, retrieve its data */ ret = fd_msg_sess_get(fd_g_config->cnf_dict, *msg, &session, &new); d_assert(ret == 0, return,); d_assert(new == 0, return, ); ret = fd_sess_state_retrieve(pcrf_gx_reg, session, &sess_data); d_assert(ret == 0, return,); d_assert(sess_data && (void *)sess_data == data, return, ); /* Value of Result Code */ ret = fd_msg_search_avp(*msg, fd_result_code, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); result_code = hdr->avp_value->i32; d_trace(5, " Result Code: %d\n", hdr->avp_value->i32); } else { ret = fd_msg_search_avp(*msg, fd_experimental_result, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_avp_search_avp(avp, fd_experimental_result_code, &avpch1); d_assert(ret == 0, return,); if (avpch1) { ret = fd_msg_avp_hdr(avpch1, &hdr); d_assert(ret == 0, return,); result_code = hdr->avp_value->i32; d_trace(5, " Experimental Result Code: %d\n", result_code); } } else { d_error("no Result-Code"); error++; } } /* Value of Origin-Host */ ret = fd_msg_search_avp(*msg, fd_origin_host, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); d_trace(5, " From '%.*s'\n", (int)hdr->avp_value->os.len, hdr->avp_value->os.data); } else { d_error("no_Origin-Host"); error++; } /* Value of Origin-Realm */ ret = fd_msg_search_avp(*msg, fd_origin_realm, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); d_trace(5, " ('%.*s')\n", (int)hdr->avp_value->os.len, hdr->avp_value->os.data); } else { d_error("no_Origin-Realm"); error++; } /* Free the message */ d_assert(pthread_mutex_lock(&fd_logger_self()->stats_lock) == 0,,); dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) + ((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000); if (fd_logger_self()->stats.nb_recv) { /* Ponderate in the avg */ fd_logger_self()->stats.avg = (fd_logger_self()->stats.avg * fd_logger_self()->stats.nb_recv + dur) / (fd_logger_self()->stats.nb_recv + 1); /* Min, max */ if (dur < fd_logger_self()->stats.shortest) fd_logger_self()->stats.shortest = dur; if (dur > fd_logger_self()->stats.longest) fd_logger_self()->stats.longest = dur; } else { fd_logger_self()->stats.shortest = dur; fd_logger_self()->stats.longest = dur; fd_logger_self()->stats.avg = dur; } if (error) fd_logger_self()->stats.nb_errs++; else fd_logger_self()->stats.nb_recv++; d_assert(pthread_mutex_unlock(&fd_logger_self()->stats_lock) == 0,,); /* Display how long it took */ if (ts.tv_nsec > sess_data->ts.tv_nsec) d_trace(15, "in %d.%06ld sec\n", (int)(ts.tv_sec - sess_data->ts.tv_sec), (long)(ts.tv_nsec - sess_data->ts.tv_nsec) / 1000); else d_trace(15, "in %d.%06ld sec\n", (int)(ts.tv_sec + 1 - sess_data->ts.tv_sec), (long)(1000000000 + ts.tv_nsec - sess_data->ts.tv_nsec) / 1000); ret = fd_sess_state_store(pcrf_gx_reg, session, &sess_data); d_assert(ret == 0, return,); d_assert(sess_data == NULL, return,); ret = fd_msg_free(*msg); d_assert(ret == 0,,); *msg = NULL; return; } status_t pcrf_gx_init(void) { int ret; struct disp_when data; pool_init(&pcrf_gx_sess_pool, MAX_POOL_OF_DIAMETER_SESS); pool_init(&pcrf_gx_rx_sess_pool, MAX_POOL_OF_DIAMETER_SESS); /* Install objects definitions for this application */ ret = gx_dict_init(); d_assert(ret == 0, return CORE_ERROR,); /* Create handler for sessions */ ret = fd_sess_handler_create(&pcrf_gx_reg, state_cleanup, NULL, NULL); d_assert(ret == 0, return CORE_ERROR,); memset(&data, 0, sizeof(data)); data.app = gx_application; ret = fd_disp_register(pcrf_gx_fb_cb, DISP_HOW_APPID, &data, NULL, &hdl_gx_fb); d_assert(ret == 0, return CORE_ERROR,); data.command = gx_cmd_ccr; ret = fd_disp_register(pcrf_gx_ccr_cb, DISP_HOW_CC, &data, NULL, &hdl_gx_ccr); d_assert(ret == 0, return CORE_ERROR,); /* Advertise the support for the application in the peer */ ret = fd_disp_app_support(gx_application, fd_vendor, 1, 0); d_assert(ret == 0, return CORE_ERROR,); return CORE_OK; } void pcrf_gx_final(void) { int ret; ret = fd_sess_handler_destroy(&pcrf_gx_reg, NULL); d_assert(ret == 0,,); if (hdl_gx_fb) (void) fd_disp_unregister(&hdl_gx_fb, NULL); if (hdl_gx_ccr) (void) fd_disp_unregister(&hdl_gx_ccr, NULL); if (pool_used(&pcrf_gx_sess_pool)) d_error("%d not freed in pcrf_gx_sess_pool[%d] of GX-SM", pool_used(&pcrf_gx_sess_pool), pool_size(&pcrf_gx_sess_pool)); d_trace(9, "%d not freed in pcrf_gx_sess_pool[%d] of GX-SM\n", pool_used(&pcrf_gx_sess_pool), pool_size(&pcrf_gx_sess_pool)); if (pool_used(&pcrf_gx_rx_sess_pool)) d_error("%d not freed in pcrf_gx_rx_sess_pool[%d] of GX-SM", pool_used(&pcrf_gx_rx_sess_pool), pool_size(&pcrf_gx_rx_sess_pool)); d_trace(9, "%d not freed in pcrf_gx_rx_sess_pool[%d] of GX-SM\n", pool_used(&pcrf_gx_rx_sess_pool), pool_size(&pcrf_gx_rx_sess_pool)); pool_final(&pcrf_gx_sess_pool); pool_final(&pcrf_gx_rx_sess_pool); } static status_t encode_pcc_rule_definition( struct avp *avp, pcc_rule_t *pcc_rule, int flow_presence) { struct avp *avpch1, *avpch2, *avpch3, *avpch4; union avp_value val; int ret = 0, i; d_assert(avp, return CORE_ERROR,); d_assert(pcc_rule, return CORE_ERROR,); ret = fd_msg_avp_new(gx_charging_rule_definition, 0, &avpch1); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_new(gx_charging_rule_name, 0, &avpch2); d_assert(ret == 0, return CORE_ERROR,); val.os.data = (c_uint8_t *)pcc_rule->name; val.os.len = strlen(pcc_rule->name); ret = fd_msg_avp_setvalue(avpch2, &val); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add(avpch1, MSG_BRW_LAST_CHILD, avpch2); d_assert(ret == 0, return CORE_ERROR,); if (flow_presence == 1) { for (i = 0; i < pcc_rule->num_of_flow; i++) { flow_t *flow = &pcc_rule->flow[i]; ret = fd_msg_avp_new(gx_flow_information, 0, &avpch2); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_new(gx_flow_direction, 0, &avpch3); d_assert(ret == 0, return CORE_ERROR,); val.i32 = flow->direction; ret = fd_msg_avp_setvalue(avpch3, &val); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add(avpch2, MSG_BRW_LAST_CHILD, avpch3); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_new(gx_flow_description, 0, &avpch3); d_assert(ret == 0, return CORE_ERROR,); val.os.data = (c_uint8_t *)flow->description; val.os.len = strlen(flow->description); ret = fd_msg_avp_setvalue(avpch3, &val); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add(avpch2, MSG_BRW_LAST_CHILD, avpch3); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add(avpch1, MSG_BRW_LAST_CHILD, avpch2); d_assert(ret == 0, return CORE_ERROR,); } } ret = fd_msg_avp_new(gx_flow_status, 0, &avpch2); d_assert(ret == 0, return CORE_ERROR,); val.i32 = pcc_rule->flow_status; ret = fd_msg_avp_setvalue(avpch2, &val); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add(avpch1, MSG_BRW_LAST_CHILD, avpch2); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_new(gx_qos_information, 0, &avpch2); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_new(gx_qos_class_identifier, 0, &avpch3); d_assert(ret == 0, return CORE_ERROR,); val.u32 = pcc_rule->qos.qci; ret = fd_msg_avp_setvalue (avpch3, &val); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add (avpch2, MSG_BRW_LAST_CHILD, avpch3); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_new(gx_allocation_retention_priority, 0, &avpch3); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_new(gx_priority_level, 0, &avpch4); d_assert(ret == 0, return CORE_ERROR,); val.u32 = pcc_rule->qos.arp.priority_level; ret = fd_msg_avp_setvalue (avpch4, &val); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add (avpch3, MSG_BRW_LAST_CHILD, avpch4); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_new(gx_pre_emption_capability, 0, &avpch4); d_assert(ret == 0, return CORE_ERROR,); val.u32 = pcc_rule->qos.arp.pre_emption_capability; ret = fd_msg_avp_setvalue (avpch4, &val); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add (avpch3, MSG_BRW_LAST_CHILD, avpch4); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_new(gx_pre_emption_vulnerability, 0, &avpch4); d_assert(ret == 0, return CORE_ERROR,); val.u32 = pcc_rule->qos.arp.pre_emption_vulnerability; ret = fd_msg_avp_setvalue (avpch4, &val); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add (avpch3, MSG_BRW_LAST_CHILD, avpch4); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add (avpch2, MSG_BRW_LAST_CHILD, avpch3); d_assert(ret == 0, return CORE_ERROR,); if (pcc_rule->qos.mbr.uplink) { ret = fd_msg_avp_new(gx_max_requested_bandwidth_ul, 0, &avpch3); d_assert(ret == 0, return CORE_ERROR,); val.u32 = pcc_rule->qos.mbr.uplink; ret = fd_msg_avp_setvalue (avpch3, &val); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add (avpch2, MSG_BRW_LAST_CHILD, avpch3); d_assert(ret == 0, return CORE_ERROR,); } if (pcc_rule->qos.mbr.downlink) { ret = fd_msg_avp_new(gx_max_requested_bandwidth_dl, 0, &avpch3); d_assert(ret == 0, return CORE_ERROR,); val.u32 = pcc_rule->qos.mbr.downlink; ret = fd_msg_avp_setvalue (avpch3, &val); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add (avpch2, MSG_BRW_LAST_CHILD, avpch3); d_assert(ret == 0, return CORE_ERROR,); } if (pcc_rule->qos.gbr.uplink) { ret = fd_msg_avp_new(gx_guaranteed_bitrate_ul, 0, &avpch3); d_assert(ret == 0, return CORE_ERROR,); val.u32 = pcc_rule->qos.gbr.uplink; ret = fd_msg_avp_setvalue (avpch3, &val); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add (avpch2, MSG_BRW_LAST_CHILD, avpch3); d_assert(ret == 0, return CORE_ERROR,); } if (pcc_rule->qos.gbr.downlink) { ret = fd_msg_avp_new(gx_guaranteed_bitrate_dl, 0, &avpch3); d_assert(ret == 0, return CORE_ERROR,); val.u32 = pcc_rule->qos.gbr.downlink; ret = fd_msg_avp_setvalue (avpch3, &val); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add (avpch2, MSG_BRW_LAST_CHILD, avpch3); d_assert(ret == 0, return CORE_ERROR,); } ret = fd_msg_avp_add(avpch1, MSG_BRW_LAST_CHILD, avpch2); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_new(gx_precedence, 0, &avpch2); d_assert(ret == 0, return CORE_ERROR,); val.u32 = pcc_rule->precedence; ret = fd_msg_avp_setvalue (avpch2, &val); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add(avpch1, MSG_BRW_LAST_CHILD, avpch2); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add(avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return CORE_ERROR,); return CORE_OK; } static status_t flow_rx_to_gx(flow_t *rx_flow, flow_t *gx_flow) { int len; d_assert(rx_flow, return CORE_ERROR,); d_assert(gx_flow, return CORE_ERROR,); if (!strncmp(rx_flow->description, "permit out", strlen("permit out"))) { gx_flow->direction = FLOW_DOWNLINK_ONLY; len = strlen(rx_flow->description)+1; gx_flow->description = core_malloc(len); core_cpystrn(gx_flow->description, rx_flow->description, len); } else if (!strncmp(rx_flow->description, "permit in", strlen("permit in"))) { gx_flow->direction = FLOW_UPLINK_ONLY; /* 'permit in' should be changed * 'permit out' in Gx Diameter */ len = strlen(rx_flow->description)+2; gx_flow->description = core_malloc(len); strcpy(gx_flow->description, "permit out"); strcat(gx_flow->description, &rx_flow->description[strlen("permit in")]); d_assert(len == strlen(gx_flow->description)+1, return CORE_ERROR,); } else { d_error("Invalid Flow Descripton : [%s]", rx_flow->description); return CORE_ERROR; } return CORE_OK; } static int matched_flow( pcc_rule_t *pcc_rule, rx_media_component_t *media_component) { status_t rv; int i, j, k; int matched = 0; int new = 0; d_assert(pcc_rule, return CORE_ERROR,); d_assert(media_component, return CORE_ERROR,); for (i = 0; i < media_component->num_of_sub; i++) { rx_media_sub_component_t *sub = &media_component->sub[i]; if (sub->flow_number == 0) { continue; } for (j = 0; j < sub->num_of_flow; j++) { new++; } } if (new == 0) { /* No new flow in Media-Component */ return pcc_rule->num_of_flow; } for (i = 0; i < media_component->num_of_sub; i++) { rx_media_sub_component_t *sub = &media_component->sub[i]; if (sub->flow_number == 0) { continue; } for (j = 0; j < sub->num_of_flow; j++) { flow_t gx_flow; flow_t *rx_flow = &sub->flow[j]; rv = flow_rx_to_gx(rx_flow, &gx_flow); if (rv != CORE_OK) { d_error("flow reformatting error"); return CORE_ERROR; } for (k = 0; k < pcc_rule->num_of_flow; k++) { if (gx_flow.direction == pcc_rule->flow[k].direction && !strcmp(gx_flow.description, pcc_rule->flow[k].description)) { matched++; break; } } FLOW_FREE(&gx_flow); } } return matched; } static status_t install_flow( pcc_rule_t *pcc_rule, rx_media_component_t *media_component) { status_t rv; int i, j; d_assert(pcc_rule, return CORE_ERROR,); d_assert(media_component, return CORE_ERROR,); /* Remove Flow from PCC Rule */ for (i = 0; i < pcc_rule->num_of_flow; i++) { FLOW_FREE(&pcc_rule->flow[i]); } pcc_rule->num_of_flow = 0; for (i = 0; i < media_component->num_of_sub; i++) { rx_media_sub_component_t *sub = &media_component->sub[i]; if (sub->flow_number == 0) { continue; } /* Copy Flow to PCC Rule */ for (j = 0; j < sub->num_of_flow; j++) { flow_t *rx_flow = &sub->flow[j]; flow_t *gx_flow = &pcc_rule->flow[pcc_rule->num_of_flow]; rv = flow_rx_to_gx(rx_flow, gx_flow); if (rv != CORE_OK) { d_error("flow reformatting error"); return CORE_ERROR; } pcc_rule->num_of_flow++; } } return CORE_OK; } static status_t update_qos( pcc_rule_t *pcc_rule, rx_media_component_t *media_component) { status_t rv; int i, j; d_assert(pcc_rule, return CORE_ERROR,); d_assert(media_component, return CORE_ERROR,); pcc_rule->qos.mbr.downlink = 0; pcc_rule->qos.mbr.uplink = 0; pcc_rule->qos.gbr.downlink = 0; pcc_rule->qos.gbr.uplink = 0; for (i = 0; i < media_component->num_of_sub; i++) { rx_media_sub_component_t *sub = &media_component->sub[i]; if (sub->flow_number == 0) { continue; } for (j = 0; j < sub->num_of_flow; j++) { flow_t gx_flow; flow_t *rx_flow = &sub->flow[j]; rv = flow_rx_to_gx(rx_flow, &gx_flow); if (rv != CORE_OK) { d_error("flow reformatting error"); return CORE_ERROR; } if (gx_flow.direction == FLOW_DOWNLINK_ONLY) { if (sub->flow_usage == RX_FLOW_USAGE_RTCP) { if (media_component->rr_bandwidth && media_component->rs_bandwidth) { pcc_rule->qos.mbr.downlink += (media_component->rr_bandwidth + media_component->rs_bandwidth); } else if (media_component->max_requested_bandwidth_dl) { if (media_component->rr_bandwidth && !media_component->rs_bandwidth) { pcc_rule->qos.mbr.downlink += c_max(0.05 * media_component->max_requested_bandwidth_dl, media_component->rr_bandwidth); } if (!media_component->rr_bandwidth && media_component->rs_bandwidth) { pcc_rule->qos.mbr.downlink += c_max(0.05 * media_component->max_requested_bandwidth_dl, media_component->rs_bandwidth); } if (!media_component->rr_bandwidth && !media_component->rs_bandwidth) { pcc_rule->qos.mbr.downlink += 0.05 * media_component->max_requested_bandwidth_dl; } } } else { if (gx_flow.description) { pcc_rule->qos.mbr.downlink += media_component->max_requested_bandwidth_dl; pcc_rule->qos.gbr.downlink += media_component->min_requested_bandwidth_dl; } } } else if (gx_flow.direction == FLOW_UPLINK_ONLY) { if (sub->flow_usage == RX_FLOW_USAGE_RTCP) { if (media_component->rr_bandwidth && media_component->rs_bandwidth) { pcc_rule->qos.mbr.uplink += (media_component->rr_bandwidth + media_component->rs_bandwidth); } else if (media_component->max_requested_bandwidth_ul) { if (media_component->rr_bandwidth && !media_component->rs_bandwidth) { pcc_rule->qos.mbr.uplink += c_max(0.05 * media_component->max_requested_bandwidth_ul, media_component->rr_bandwidth); } if (!media_component->rr_bandwidth && media_component->rs_bandwidth) { pcc_rule->qos.mbr.uplink += c_max(0.05 * media_component->max_requested_bandwidth_ul, media_component->rs_bandwidth); } if (!media_component->rr_bandwidth && !media_component->rs_bandwidth) { pcc_rule->qos.mbr.uplink += 0.05 * media_component->max_requested_bandwidth_ul; } } } else { if (gx_flow.description) { pcc_rule->qos.mbr.uplink += media_component->max_requested_bandwidth_ul; pcc_rule->qos.gbr.uplink += media_component->min_requested_bandwidth_ul; } } } else d_assert(0, return CORE_ERROR, "Invalid Direction(%d)", gx_flow.direction); FLOW_FREE(&gx_flow); } } if (pcc_rule->qos.mbr.downlink == 0) { pcc_rule->qos.mbr.downlink += media_component->max_requested_bandwidth_dl; pcc_rule->qos.mbr.downlink += (media_component->rr_bandwidth + media_component->rs_bandwidth); } if (pcc_rule->qos.mbr.uplink == 0) { pcc_rule->qos.mbr.uplink += media_component->max_requested_bandwidth_ul; pcc_rule->qos.mbr.uplink += (media_component->rr_bandwidth + media_component->rs_bandwidth); } if (pcc_rule->qos.gbr.downlink == 0) pcc_rule->qos.gbr.downlink = pcc_rule->qos.mbr.downlink; if (pcc_rule->qos.gbr.uplink == 0) pcc_rule->qos.gbr.uplink = pcc_rule->qos.mbr.uplink; return CORE_OK; } nextepc-0.3.10/src/pcrf/pcrf_init.c000066400000000000000000000012661333553357400171230ustar00rootroot00000000000000#define TRACE_MODULE _pcrf_init #include "pcrf_context.h" #include "pcrf_fd_path.h" static int initialized = 0; status_t pcrf_initialize(void) { status_t rv; rv = pcrf_context_init(); if (rv != CORE_OK) return rv; rv = pcrf_context_parse_config(); if (rv != CORE_OK) return rv; rv = pcrf_context_setup_trace_module(); if (rv != CORE_OK) return rv; rv = pcrf_db_init(); if (rv != CORE_OK) return rv; rv = pcrf_fd_init(); if (rv != CORE_OK) return CORE_ERROR; initialized = 1; return CORE_OK; } void pcrf_terminate(void) { if (!initialized) return; pcrf_fd_final(); pcrf_db_final(); pcrf_context_final(); return; } nextepc-0.3.10/src/pcrf/pcrf_rx_path.c000066400000000000000000000661301333553357400176260ustar00rootroot00000000000000#define TRACE_MODULE _pcrf_rx_path #include "core_debug.h" #include "core_pool.h" #include "core_pkbuf.h" #include "core_network.h" #include "core_lib.h" #include "fd/fd_lib.h" #include "fd/rx/rx_dict.h" #include "fd/rx/rx_message.h" #include "pcrf_context.h" #include "pcrf_fd_path.h" struct sess_state { os0_t rx_sid; /* Rx Session-Id */ os0_t gx_sid; /* Gx Session-Id */ os0_t peer_host; /* Peer Host */ #define SESSION_ABORTED 1 int state; int abort_cause; int termination_cause; struct timespec ts; /* Time of sending the message */ }; static struct session_handler *pcrf_rx_reg = NULL; static struct disp_hdl *hdl_rx_fb = NULL; static struct disp_hdl *hdl_rx_aar = NULL; static struct disp_hdl *hdl_rx_str = NULL; pool_declare(pcrf_rx_sess_pool, struct sess_state, MAX_POOL_OF_DIAMETER_SESS); static void pcrf_rx_asa_cb(void *data, struct msg **msg); static __inline__ struct sess_state *new_state(os0_t sid) { struct sess_state *new = NULL; pool_alloc_node(&pcrf_rx_sess_pool, &new); d_assert(new, return NULL,); memset(new, 0, sizeof *new); new->rx_sid = (os0_t)core_strdup((char *)sid); d_assert(new->rx_sid, return NULL,); return new; } static void state_cleanup(struct sess_state *sess_data, os0_t sid, void *opaque) { d_assert(sess_data, return,); if (sess_data->rx_sid) CORE_FREE((char *)sess_data->rx_sid); if (sess_data->gx_sid) CORE_FREE((char *)sess_data->gx_sid); if (sess_data->peer_host) CORE_FREE(sess_data->peer_host); pool_free_node(&pcrf_rx_sess_pool, sess_data); } static int pcrf_rx_fb_cb(struct msg **msg, struct avp *avp, struct session *sess, void *opaque, enum disp_action *act) { /* This CB should never be called */ d_warn("Unexpected message received!"); return ENOTSUP; } static int pcrf_rx_aar_cb( struct msg **msg, struct avp *avp, struct session *sess, void *opaque, enum disp_action *act) { status_t rv; int ret; struct msg *ans, *qry; struct avp *avpch1, *avpch2, *avpch3; struct avp_hdr *hdr; union avp_value val; struct sess_state *sess_data = NULL; size_t sidlen; rx_message_t rx_message; char buf[CORE_ADDRSTRLEN]; os0_t gx_sid = NULL; c_uint32_t result_code = RX_DIAMETER_IP_CAN_SESSION_NOT_AVAILABLE; d_trace(3, "[PCRF] AA-Request\n"); d_assert(msg, return EINVAL,); d_assert(sess, return EINVAL,); ret = fd_sess_state_retrieve(pcrf_rx_reg, sess, &sess_data); d_assert(ret == 0, return EINVAL,); if (!sess_data) { os0_t sid = NULL; ret = fd_sess_getsid(sess, &sid, &sidlen); d_assert(ret == 0, return EINVAL,); sess_data = new_state(sid); d_assert(sess_data, return EINVAL,); } /* Initialize Message */ memset(&rx_message, 0, sizeof(rx_message_t)); rx_message.cmd_code = RX_CMD_CODE_AA; /* Create answer header */ qry = *msg; ret = fd_msg_new_answer_from_req(fd_g_config->cnf_dict, msg, 0); d_assert(ret == 0, return EINVAL,); ans = *msg; /* Set the Auth-Application-Id AVP */ ret = fd_msg_avp_new(fd_auth_application_id, 0, &avp); d_assert(ret == 0, return EINVAL,); val.i32 = RX_APPLICATION_ID; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return EINVAL,); /* Set the Auth-Request-Type AVP */ ret = fd_msg_avp_new(fd_auth_request_type, 0, &avp); d_assert(ret == 0, return EINVAL,); val.i32 = 1; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return EINVAL,); /* Get Framed-IP-Address */ ret = fd_msg_search_avp(qry, rx_framed_ip_address, &avp); d_assert(ret == 0, return EINVAL,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return EINVAL,); gx_sid = (os0_t)pcrf_sess_find_by_ipv4(hdr->avp_value->os.data); if (!gx_sid) { d_warn("Cannot find Gx Sesson for IPv4:%s\n", INET_NTOP(hdr->avp_value->os.data, buf)); } } if (!gx_sid) { /* Get Framed-IPv6-Prefix */ ret = fd_msg_search_avp(qry, rx_framed_ipv6_prefix, &avp); d_assert(ret == 0, return EINVAL,); if (avp) { paa_t *paa = NULL; ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return EINVAL,); paa = (paa_t *)hdr->avp_value->os.data; d_assert(paa, goto out,); d_assert(paa->len == IPV6_LEN * 8 /* 128bit */, goto out, "Invalid Framed-IPv6-Prefix Length:%d", paa->len); gx_sid = (os0_t)pcrf_sess_find_by_ipv6(paa->addr6); if (!gx_sid) { d_warn("Cannot find Gx Sesson for IPv6:%s\n", INET6_NTOP(hdr->avp_value->os.data, buf)); } } } if (!gx_sid) { d_error("No Gx Session"); goto out; } ret = fd_msg_browse(qry, MSG_BRW_FIRST_CHILD, &avpch1, NULL); d_assert(ret == 0, return EINVAL,); while(avpch1) { ret = fd_msg_avp_hdr(avpch1, &hdr); d_assert(ret == 0, return EINVAL,); switch(hdr->avp_code) { case AC_SESSION_ID: case AC_ORIGIN_HOST: { if (sess_data->peer_host) CORE_FREE(sess_data->peer_host); sess_data->peer_host = (os0_t)core_strdup((char *)hdr->avp_value->os.data); d_assert(sess_data->peer_host, return CORE_ERROR,); break; } case AC_ORIGIN_REALM: case AC_DESTINATION_REALM: case AC_ROUTE_RECORD: case AC_PROXY_INFO: case AC_AUTH_APPLICATION_ID: case FD_AVP_CODE_FRAME_IP_ADDRESS: case FD_AVP_CODE_FRAME_IPV6_PREFIX: case RX_AVP_CODE_SUBSCRIPTION_ID: break; /* Gwt Specific-Action */ case RX_AVP_CODE_SPECIFIC_ACTION: break; /* Gwt Media-Component-Description */ case RX_AVP_CODE_MEDIA_COMPONENT_DESCRIPTION: { rx_media_component_t *media_component = &rx_message. media_component[rx_message.num_of_media_component]; ret = fd_msg_browse(avpch1, MSG_BRW_FIRST_CHILD, &avpch2, NULL); d_assert(ret == 0, return EINVAL,); while(avpch2) { ret = fd_msg_avp_hdr(avpch2, &hdr); d_assert(ret == 0, return EINVAL,); switch(hdr->avp_code) { case RX_AVP_CODE_MEDIA_COMPONENT_NUMBER: { media_component->media_component_number = hdr->avp_value->i32; break; } case RX_AVP_CODE_MEDIA_TYPE: { media_component->media_type = hdr->avp_value->i32; break; } case RX_AVP_CODE_MAX_REQUESTED_BANDWIDTH_DL: { media_component->max_requested_bandwidth_dl = hdr->avp_value->i32; break; } case RX_AVP_CODE_MAX_REQUESTED_BANDWIDTH_UL: { media_component->max_requested_bandwidth_ul = hdr->avp_value->i32; break; } case RX_AVP_CODE_RR_BANDWIDTH: { media_component->rr_bandwidth = hdr->avp_value->i32; break; } case RX_AVP_CODE_RS_BANDWIDTH: { media_component->rs_bandwidth = hdr->avp_value->i32; break; } case RX_AVP_CODE_MIN_REQUESTED_BANDWIDTH_DL: { media_component->min_requested_bandwidth_dl = hdr->avp_value->i32; break; } case RX_AVP_CODE_MIN_REQUESTED_BANDWIDTH_UL: { media_component->min_requested_bandwidth_ul = hdr->avp_value->i32; break; } case RX_AVP_CODE_MEDIA_SUB_COMPONENT: { rx_media_sub_component_t *sub = &media_component-> sub[media_component->num_of_sub]; ret = fd_msg_browse(avpch2, MSG_BRW_FIRST_CHILD, &avpch3, NULL); d_assert(ret == 0, return EINVAL,); while(avpch3) { ret = fd_msg_avp_hdr(avpch3, &hdr); d_assert(ret == 0, return EINVAL,); switch(hdr->avp_code) { case RX_AVP_CODE_FLOW_NUMBER: sub->flow_number = hdr->avp_value->i32; break; case RX_AVP_CODE_FLOW_USAGE: { sub->flow_usage = hdr->avp_value->i32; break; } case RX_AVP_CODE_FLOW_DESCRIPTION: { flow_t *flow = &sub->flow [sub->num_of_flow]; flow->description = core_malloc( hdr->avp_value->os.len+1); core_cpystrn( flow->description, (char*)hdr->avp_value->os.data, hdr->avp_value->os.len+1); sub->num_of_flow++; break; } default: { d_error("Not supported(%d)", hdr->avp_code); break; } } fd_msg_browse(avpch3, MSG_BRW_NEXT, &avpch3, NULL); } media_component->num_of_sub++; break; } default: { d_warn("Not supported(%d)", hdr->avp_code); break; } } fd_msg_browse(avpch2, MSG_BRW_NEXT, &avpch2, NULL); } rx_message.num_of_media_component++; break; } default: { d_warn("Not supported(%d)", hdr->avp_code); break; } } fd_msg_browse(avpch1, MSG_BRW_NEXT, &avpch1, NULL); } /* Send Re-Auth Request */ rv = pcrf_gx_send_rar(gx_sid, sess_data->rx_sid, &rx_message); if (rv != CORE_OK) { result_code = rx_message.result_code; if (result_code != ER_DIAMETER_SUCCESS) { d_error("pcrf_gx_send_rar() failed"); goto out; } } /* Store Gx Session-Id in this session */ if (!sess_data->gx_sid) sess_data->gx_sid = (os0_t)core_strdup((char *)gx_sid); d_assert(sess_data->gx_sid, goto out,); /* Set IP-Can-Type */ ret = fd_msg_avp_new(rx_ip_can_type, 0, &avp); d_assert(ret == 0, return EINVAL,); val.i32 = RX_IP_CAN_TYPE_3GPP_EPS; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return EINVAL,); /* Set RAT-Type */ ret = fd_msg_avp_new(rx_rat_type, 0, &avp); d_assert(ret == 0, return EINVAL,); val.i32 = RX_RAT_TYPE_EUTRAN; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return EINVAL,); /* Set the Origin-Host, Origin-Realm, andResult-Code AVPs */ ret = fd_msg_rescode_set(ans, "DIAMETER_SUCCESS", NULL, NULL, 1); d_assert(ret == 0, return EINVAL,); /* Store this value in the session */ ret = fd_sess_state_store(pcrf_rx_reg, sess, &sess_data); d_assert(ret == 0,,); d_assert(sess_data == NULL,,); /* Send the answer */ ret = fd_msg_send(msg, NULL, NULL); d_assert(ret == 0,,); d_trace(3, "[PCRF] AA-Answer\n"); /* Add this value to the stats */ d_assert(pthread_mutex_lock(&fd_logger_self()->stats_lock) == 0,,); fd_logger_self()->stats.nb_echoed++; d_assert(pthread_mutex_unlock(&fd_logger_self()->stats_lock) == 0,,); rx_message_free(&rx_message); return 0; out: if (result_code == FD_DIAMETER_AVP_UNSUPPORTED) { ret = fd_msg_rescode_set(ans, "DIAMETER_AVP_UNSUPPORTED", NULL, NULL, 1); d_assert(ret == 0, return EINVAL,); } else if (result_code == FD_DIAMETER_UNKNOWN_SESSION_ID) { ret = fd_msg_rescode_set(ans, "DIAMETER_UNKNOWN_SESSION_ID", NULL, NULL, 1); d_assert(ret == 0, return EINVAL,); } else if (result_code == FD_DIAMETER_MISSING_AVP) { ret = fd_msg_rescode_set(ans, "DIAMETER_MISSING_AVP", NULL, NULL, 1); d_assert(ret == 0, return EINVAL,); } else { ret = fd_message_experimental_rescode_set(ans, result_code); d_assert(ret == 0, return EINVAL,); } ret = fd_msg_send(msg, NULL, NULL); d_assert(ret == 0,,); state_cleanup(sess_data, NULL, NULL); rx_message_free(&rx_message); return 0; } status_t pcrf_rx_send_asr(c_uint8_t *rx_sid, c_uint32_t abort_cause) { int ret; struct msg *req = NULL; struct avp *avp; union avp_value val; struct sess_state *sess_data = NULL, *svg; struct session *session = NULL; int new; size_t sidlen; d_assert(rx_sid, return CORE_ERROR,); d_trace(3, "[PCRF] Abort-Session-Request\n"); /* Create the request */ ret = fd_msg_new(rx_cmd_asr, MSGFL_ALLOC_ETEID, &req); d_assert(ret == 0, return CORE_ERROR,); { struct msg_hdr * h; ret = fd_msg_hdr( req, &h ); d_assert(ret == 0, return CORE_ERROR,); h->msg_appl = RX_APPLICATION_ID; } /* Retrieve session by Session-Id */ sidlen = strlen((char *)rx_sid); ret = fd_sess_fromsid_msg((os0_t)(rx_sid), sidlen, &session, &new); d_assert(ret == 0, return CORE_ERROR,); d_assert(new == 0, return CORE_ERROR,); /* Add Session-Id to the message */ ret = fd_message_session_id_set(req, (os0_t)(rx_sid), sidlen); d_assert(ret == 0, return CORE_ERROR,); /* Save the session associated with the message */ ret = fd_msg_sess_set(req, session); /* Retrieve session state in this session */ ret = fd_sess_state_retrieve(pcrf_rx_reg, session, &sess_data); d_assert(sess_data, return CORE_ERROR,); /* Update State */ sess_data->state = SESSION_ABORTED; sess_data->abort_cause = abort_cause; /* Set Origin-Host & Origin-Realm */ ret = fd_msg_add_origin(req, 0); d_assert(ret == 0, return CORE_ERROR,); /* Set the Destination-Realm AVP */ ret = fd_msg_avp_new(fd_destination_realm, 0, &avp); d_assert(ret == 0, return CORE_ERROR,); val.os.data = (unsigned char *)(fd_g_config->cnf_diamrlm); val.os.len = strlen(fd_g_config->cnf_diamrlm); ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return CORE_ERROR,); /* Set the Destination-Host AVP */ ret = fd_msg_avp_new(fd_destination_host, 0, &avp); d_assert(ret == 0, return CORE_ERROR,); val.os.data = sess_data->peer_host; val.os.len = strlen((char *)sess_data->peer_host); ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return CORE_ERROR,); /* Set the Auth-Application-Id AVP */ ret = fd_msg_avp_new(fd_auth_application_id, 0, &avp); d_assert(ret == 0, return CORE_ERROR,); val.i32 = RX_APPLICATION_ID; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return CORE_ERROR,); /* Set the Abort-Cause AVP */ ret = fd_msg_avp_new(rx_abort_cause, 0, &avp); d_assert(ret == 0, return CORE_ERROR,); val.i32 = sess_data->abort_cause; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return CORE_ERROR,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return CORE_ERROR,); /* Keep a pointer to the session data for debug purpose, * in real life we would not need it */ svg = sess_data; /* Store this value in the session */ ret = fd_sess_state_store(pcrf_rx_reg, session, &sess_data); d_assert(ret == 0, return CORE_ERROR,); d_assert(sess_data == NULL,,); /* Send the request */ ret = fd_msg_send(&req, pcrf_rx_asa_cb, svg); d_assert(ret == 0,,); /* Increment the counter */ d_assert(pthread_mutex_lock(&fd_logger_self()->stats_lock) == 0,,); fd_logger_self()->stats.nb_sent++; d_assert(pthread_mutex_unlock(&fd_logger_self()->stats_lock) == 0,,); return CORE_OK; } static void pcrf_rx_asa_cb(void *data, struct msg **msg) { int ret; struct session *session; struct avp *avp, *avpch1; struct avp_hdr *hdr; int new; c_int32_t result_code = 0; d_trace(3, "[PCRF] Abort-Session-Answer\n"); /* Search the session, retrieve its data */ ret = fd_msg_sess_get(fd_g_config->cnf_dict, *msg, &session, &new); d_assert(ret == 0, return,); d_assert(new == 0, return, ); /* Value of Result Code */ ret = fd_msg_search_avp(*msg, fd_result_code, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); result_code = hdr->avp_value->i32; d_trace(5, " Result Code: %d\n", hdr->avp_value->i32); } else { ret = fd_msg_search_avp(*msg, fd_experimental_result, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_avp_search_avp(avp, fd_experimental_result_code, &avpch1); d_assert(ret == 0, return,); if (avpch1) { ret = fd_msg_avp_hdr(avpch1, &hdr); d_assert(ret == 0, return,); result_code = hdr->avp_value->i32; d_trace(5, " Experimental Result Code: %d\n", result_code); } } else { d_error("no Result-Code"); } } /* Value of Origin-Host */ ret = fd_msg_search_avp(*msg, fd_origin_host, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); d_trace(5, " From '%.*s'\n", (int)hdr->avp_value->os.len, hdr->avp_value->os.data); } else { d_error("no_Origin-Host "); } /* Value of Origin-Realm */ ret = fd_msg_search_avp(*msg, fd_origin_realm, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); d_trace(5, " ('%.*s')\n", (int)hdr->avp_value->os.len, hdr->avp_value->os.data); } else { d_error("no_Origin-Realm "); } if (result_code != ER_DIAMETER_SUCCESS) { d_error("ERROR DIAMETER Result Code(%d)", result_code); } ret = fd_msg_free(*msg); d_assert(ret == 0,,); *msg = NULL; return; } static int pcrf_rx_str_cb( struct msg **msg, struct avp *avp, struct session *sess, void *opaque, enum disp_action *act) { status_t rv; int ret; struct msg *ans, *qry; struct avp_hdr *hdr; union avp_value val; struct sess_state *sess_data = NULL; rx_message_t rx_message; c_uint32_t result_code = RX_DIAMETER_IP_CAN_SESSION_NOT_AVAILABLE; d_trace(3, "[PCRF] Session-Termination-Request\n"); d_assert(msg, return EINVAL,); d_assert(sess, return EINVAL,); ret = fd_sess_state_retrieve(pcrf_rx_reg, sess, &sess_data); d_assert(ret == 0, return EINVAL,); d_assert(sess_data, return EINVAL,); d_assert(sess_data->rx_sid, return EINVAL,); d_assert(sess_data->gx_sid, return EINVAL,); /* Initialize Message */ memset(&rx_message, 0, sizeof(rx_message_t)); rx_message.cmd_code = RX_CMD_CODE_SESSION_TERMINATION; /* Create answer header */ qry = *msg; ret = fd_msg_new_answer_from_req(fd_g_config->cnf_dict, msg, 0); d_assert(ret == 0, return EINVAL,); ans = *msg; /* Set the Auth-Application-Id AVP */ ret = fd_msg_avp_new(fd_auth_application_id, 0, &avp); d_assert(ret == 0, return EINVAL,); val.i32 = RX_APPLICATION_ID; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return EINVAL,); /* Set the Auth-Request-Type AVP */ ret = fd_msg_avp_new(fd_auth_request_type, 0, &avp); d_assert(ret == 0, return EINVAL,); val.i32 = 1; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return EINVAL,); /* Get Termination-Cause */ ret = fd_msg_search_avp(qry, rx_termination_cause, &avp); d_assert(ret == 0, return EINVAL,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return EINVAL,); sess_data->termination_cause = hdr->avp_value->i32; switch(sess_data->termination_cause) { case RX_TERMINATION_CAUSE_DIAMETER_LOGOUT: break; default: d_error("Termination-Cause Error : [%d]", sess_data->termination_cause); break; } } else { d_error("no_Termination-Cause"); } if (sess_data->state != SESSION_ABORTED) { /* Send Re-Auth Request if Abort-Session-Request is not initaited */ rv = pcrf_gx_send_rar(sess_data->gx_sid, sess_data->rx_sid, &rx_message); if (rv != CORE_OK) { result_code = rx_message.result_code; d_error("pcrf_gx_send_rar() failed"); goto out; } } /* Set the Origin-Host, Origin-Realm, andResult-Code AVPs */ ret = fd_msg_rescode_set(ans, "DIAMETER_SUCCESS", NULL, NULL, 1); d_assert(ret == 0, return EINVAL,); /* Send the answer */ ret = fd_msg_send(msg, NULL, NULL); d_assert(ret == 0,,); d_trace(3, "[PCRF] Session-Termination-Answer\n"); /* Add this value to the stats */ d_assert(pthread_mutex_lock(&fd_logger_self()->stats_lock) == 0,,); fd_logger_self()->stats.nb_echoed++; d_assert(pthread_mutex_unlock(&fd_logger_self()->stats_lock) == 0,,); state_cleanup(sess_data, NULL, NULL); rx_message_free(&rx_message); return 0; out: if (result_code == FD_DIAMETER_AVP_UNSUPPORTED) { ret = fd_msg_rescode_set(ans, "DIAMETER_AVP_UNSUPPORTED", NULL, NULL, 1); d_assert(ret == 0, return EINVAL,); } else if (result_code == FD_DIAMETER_UNKNOWN_SESSION_ID) { ret = fd_msg_rescode_set(ans, "DIAMETER_UNKNOWN_SESSION_ID", NULL, NULL, 1); d_assert(ret == 0, return EINVAL,); } else if (result_code == FD_DIAMETER_MISSING_AVP) { ret = fd_msg_rescode_set(ans, "DIAMETER_MISSING_AVP", NULL, NULL, 1); d_assert(ret == 0, return EINVAL,); } else { ret = fd_msg_rescode_set(ans, "DIAMETER_MISSING_AVP", NULL, NULL, 1); d_assert(ret == 0, return EINVAL,); } ret = fd_msg_send(msg, NULL, NULL); d_assert(ret == 0,,); d_trace(3, "[PCRF] Session-Termination-Answer\n"); state_cleanup(sess_data, NULL, NULL); rx_message_free(&rx_message); return 0; } status_t pcrf_rx_init(void) { int ret; struct disp_when data; pool_init(&pcrf_rx_sess_pool, MAX_POOL_OF_DIAMETER_SESS); /* Install objects definitions for this application */ ret = rx_dict_init(); d_assert(ret == 0, return CORE_ERROR,); /* Create handler for sessions */ ret = fd_sess_handler_create(&pcrf_rx_reg, state_cleanup, NULL, NULL); d_assert(ret == 0, return CORE_ERROR,); /* Fallback CB if command != unexpected message received */ memset(&data, 0, sizeof(data)); data.app = rx_application; ret = fd_disp_register(pcrf_rx_fb_cb, DISP_HOW_APPID, &data, NULL, &hdl_rx_fb); d_assert(ret == 0, return CORE_ERROR,); /* Specific handler for AA-Request */ data.command = rx_cmd_aar; ret = fd_disp_register(pcrf_rx_aar_cb, DISP_HOW_CC, &data, NULL, &hdl_rx_aar); d_assert(ret == 0, return CORE_ERROR,); /* Specific handler for STR-Request */ data.command = rx_cmd_str; ret = fd_disp_register(pcrf_rx_str_cb, DISP_HOW_CC, &data, NULL, &hdl_rx_str); d_assert(ret == 0, return CORE_ERROR,); /* Advertise the support for the application in the peer */ ret = fd_disp_app_support(rx_application, fd_vendor, 1, 0); d_assert(ret == 0, return CORE_ERROR,); return CORE_OK; } void pcrf_rx_final(void) { int ret; ret = fd_sess_handler_destroy(&pcrf_rx_reg, NULL); d_assert(ret == 0,,); if (hdl_rx_fb) (void) fd_disp_unregister(&hdl_rx_fb, NULL); if (hdl_rx_aar) (void) fd_disp_unregister(&hdl_rx_aar, NULL); if (hdl_rx_str) (void) fd_disp_unregister(&hdl_rx_str, NULL); if (pool_used(&pcrf_rx_sess_pool)) d_error("%d not freed in pcrf_rx_sess_pool[%d] of GX-SM", pool_used(&pcrf_rx_sess_pool), pool_size(&pcrf_rx_sess_pool)); d_trace(9, "%d not freed in pcrf_rx_sess_pool[%d] of GX-SM\n", pool_used(&pcrf_rx_sess_pool), pool_size(&pcrf_rx_sess_pool)); pool_final(&pcrf_rx_sess_pool); } nextepc-0.3.10/src/pgw.c000066400000000000000000000021051333553357400150020ustar00rootroot00000000000000#define TRACE_MODULE _pgw_main #include "core_debug.h" #include "core_signal.h" #include "core_semaphore.h" #include "common/context.h" #include "common/application.h" #include "app_init.h" status_t app_initialize( const char *config_path, const char *log_path, const char *pid_path) { status_t rv; int app = 0; rv = app_log_pid(pid_path, "pgw"); if (rv != CORE_OK) return rv; rv = app_will_initialize(config_path, log_path); if (rv != CORE_OK) return rv; app = context_self()->logger.trace.app; if (app) { d_trace_level(&_pgw_main, app); } d_trace(1, "PGW try to initialize\n"); rv = pgw_initialize(); if (rv != CORE_OK) { d_error("Failed to intialize PGW"); return rv; } d_trace(1, "PGW initialize...done\n"); rv = app_did_initialize(); if (rv != CORE_OK) return rv; return CORE_OK; } void app_terminate(void) { app_will_terminate(); d_trace(1, "PGW try to terminate\n"); pgw_terminate(); d_trace(1, "PGW terminate...done\n"); app_did_terminate(); } nextepc-0.3.10/src/pgw/000077500000000000000000000000001333553357400146405ustar00rootroot00000000000000nextepc-0.3.10/src/pgw/Makefile.am000066400000000000000000000021051333553357400166720ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in. noinst_LTLIBRARIES = libpgw.la libpgw_la_SOURCES = \ pgw_ipfw.h \ pgw_event.h pgw_context.h pgw_sm.h \ pgw_gtp_path.h pgw_s5c_build.h pgw_s5c_handler.h \ pgw_fd_path.h pgw_gx_handler.h \ pgw_ipfw.c \ pgw_init.c pgw_event.c pgw_context.c pgw_sm.c \ pgw_gtp_path.c pgw_s5c_build.c pgw_s5c_handler.c \ pgw_fd_path.c pgw_gx_handler.c \ $(NULL) libpgw_la_DEPENDENCIES = \ $(top_srcdir)/lib/fd/libfd.la \ $(top_srcdir)/lib/gtp/libgtp.la \ $(top_srcdir)/lib/ipfw/libipfw.la \ $(top_srcdir)/src/common/libcommon.la \ $(NULL) libpgw_la_LIBADD = \ $(top_srcdir)/lib/fd/libfd.la \ $(top_srcdir)/lib/gtp/libgtp.la \ $(top_srcdir)/lib/ipfw/libipfw.la \ $(top_srcdir)/src/common/libcommon.la \ $(NULL) AM_CPPFLAGS = \ -I$(top_srcdir)/lib/core/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ -I$(top_srcdir)/lib/@FREEDIAMETER_DIR@/include \ @MONGOC_CFLAGS@ \ $(NULL) AM_CFLAGS = \ -Wall -Werror \ $(NULL) MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = core *.stackdump nextepc-0.3.10/src/pgw/pgw_context.c000066400000000000000000001607161333553357400173600ustar00rootroot00000000000000#define TRACE_MODULE _pgw_context #include "core_debug.h" #include "core_pool.h" #include "core_index.h" #include "core_lib.h" #include "core_network.h" #include #include #include "common/yaml_helper.h" #include "gtp/gtp_types.h" #include "gtp/gtp_conv.h" #include "gtp/gtp_node.h" #include "gtp/gtp_path.h" #include "gtp/gtp_xact.h" #include "fd/fd_lib.h" #include "common/context.h" #include "pgw_context.h" static pgw_context_t self; static fd_config_t g_fd_conf; pool_declare(pgw_dev_pool, pgw_dev_t, MAX_NUM_OF_DEV); pool_declare(pgw_subnet_pool, pgw_subnet_t, MAX_NUM_OF_SUBNET); index_declare(pgw_sess_pool, pgw_sess_t, MAX_POOL_OF_SESS); index_declare(pgw_bearer_pool, pgw_bearer_t, MAX_POOL_OF_BEARER); pool_declare(pgw_pf_pool, pgw_pf_t, MAX_POOL_OF_PF); static int context_initiaized = 0; status_t pgw_context_init() { d_assert(context_initiaized == 0, return CORE_ERROR, "PGW context already has been initialized"); /* Initial FreeDiameter Config */ memset(&g_fd_conf, 0, sizeof(fd_config_t)); /* Initialize PGW context */ memset(&self, 0, sizeof(pgw_context_t)); self.fd_config = &g_fd_conf; list_init(&self.gtpc_list); list_init(&self.gtpc_list6); list_init(&self.gtpu_list); list_init(&self.gtpu_list6); gtp_node_init(); list_init(&self.sgw_s5c_list); list_init(&self.sgw_s5u_list); list_init(&self.dev_list); pool_init(&pgw_dev_pool, MAX_NUM_OF_DEV); list_init(&self.subnet_list); pool_init(&pgw_subnet_pool, MAX_NUM_OF_SUBNET); index_init(&pgw_sess_pool, MAX_POOL_OF_SESS); index_init(&pgw_bearer_pool, MAX_POOL_OF_BEARER); pool_init(&pgw_pf_pool, MAX_POOL_OF_PF); self.sess_hash = hash_make(); context_initiaized = 1; return CORE_OK; } status_t pgw_context_final() { d_assert(context_initiaized == 1, return CORE_ERROR, "PGW context already has been finalized"); pgw_sess_remove_all(); d_assert(self.sess_hash, , "Null param"); hash_destroy(self.sess_hash); if (index_used(&pgw_sess_pool)) d_error("%d not freed in pgw_sess_pool[%d] in PGW-Context", index_used(&pgw_sess_pool), index_size(&pgw_sess_pool)); d_trace(9, "%d not freed in pgw_sess_pool[%d] in PGW-Context\n", index_used(&pgw_sess_pool), index_size(&pgw_sess_pool)); pgw_dev_remove_all(); pgw_subnet_remove_all(); index_final(&pgw_bearer_pool); index_final(&pgw_sess_pool); pool_final(&pgw_pf_pool); pool_final(&pgw_dev_pool); pool_final(&pgw_subnet_pool); gtp_remove_all_nodes(&self.sgw_s5c_list); gtp_remove_all_nodes(&self.sgw_s5u_list); gtp_node_final(); sock_remove_all_nodes(&self.gtpc_list); sock_remove_all_nodes(&self.gtpc_list6); sock_remove_all_nodes(&self.gtpu_list); sock_remove_all_nodes(&self.gtpu_list6); context_initiaized = 0; return CORE_OK; } pgw_context_t* pgw_self() { return &self; } static status_t pgw_context_prepare() { self.gtpc_port = GTPV2_C_UDP_PORT; self.gtpu_port = GTPV1_U_UDP_PORT; self.fd_config->cnf_port = DIAMETER_PORT; self.fd_config->cnf_port_tls = DIAMETER_SECURE_PORT; self.tun_ifname = "pgwtun"; return CORE_OK; } static status_t pgw_context_validation() { if (self.fd_conf_path == NULL && (self.fd_config->cnf_diamid == NULL || self.fd_config->cnf_diamrlm == NULL || self.fd_config->cnf_addr == NULL)) { d_error("No pgw.freeDiameter in '%s'", context_self()->config.path); return CORE_ERROR; } if (list_first(&self.gtpc_list) == NULL && list_first(&self.gtpc_list6) == NULL) { d_error("No pgw.gtpc in '%s'", context_self()->config.path); return CORE_ERROR; } if (list_first(&self.gtpu_list) == NULL && list_first(&self.gtpu_list6) == NULL) { d_error("No pgw.gtpu in '%s'", context_self()->config.path); return CORE_ERROR; } if (self.dns[0] == NULL && self.dns6[0] == NULL) { d_error("No pgw.dns in '%s'", context_self()->config.path); return CORE_ERROR; } return CORE_OK; } status_t pgw_context_parse_config() { status_t rv; config_t *config = &context_self()->config; yaml_document_t *document = NULL; yaml_iter_t root_iter; d_assert(config, return CORE_ERROR,); document = config->document; d_assert(document, return CORE_ERROR,); rv = pgw_context_prepare(); if (rv != CORE_OK) return rv; yaml_iter_init(&root_iter, document); while(yaml_iter_next(&root_iter)) { const char *root_key = yaml_iter_key(&root_iter); d_assert(root_key, return CORE_ERROR,); if (!strcmp(root_key, "pgw")) { yaml_iter_t pgw_iter; yaml_iter_recurse(&root_iter, &pgw_iter); while(yaml_iter_next(&pgw_iter)) { const char *pgw_key = yaml_iter_key(&pgw_iter); d_assert(pgw_key, return CORE_ERROR,); if (!strcmp(pgw_key, "freeDiameter")) { yaml_node_t *node = yaml_document_get_node(document, pgw_iter.pair->value); d_assert(node, return CORE_ERROR,); if (node->type == YAML_SCALAR_NODE) { self.fd_conf_path = yaml_iter_value(&pgw_iter); } else if (node->type == YAML_MAPPING_NODE) { yaml_iter_t fd_iter; yaml_iter_recurse(&pgw_iter, &fd_iter); while(yaml_iter_next(&fd_iter)) { const char *fd_key = yaml_iter_key(&fd_iter); d_assert(fd_key, return CORE_ERROR,); if (!strcmp(fd_key, "identity")) { self.fd_config->cnf_diamid = yaml_iter_value(&fd_iter); } else if (!strcmp(fd_key, "realm")) { self.fd_config->cnf_diamrlm = yaml_iter_value(&fd_iter); } else if (!strcmp(fd_key, "port")) { const char *v = yaml_iter_value(&fd_iter); if (v) self.fd_config->cnf_port = atoi(v); } else if (!strcmp(fd_key, "sec_port")) { const char *v = yaml_iter_value(&fd_iter); if (v) self.fd_config->cnf_port_tls = atoi(v); } else if (!strcmp(fd_key, "no_sctp")) { self.fd_config->cnf_flags.no_sctp = yaml_iter_bool(&fd_iter); } else if (!strcmp(fd_key, "listen_on")) { self.fd_config->cnf_addr = yaml_iter_value(&fd_iter); } else if (!strcmp(fd_key, "load_extension")) { yaml_iter_t ext_array, ext_iter; yaml_iter_recurse(&fd_iter, &ext_array); do { const char *module = NULL; const char *conf = NULL; if (yaml_iter_type(&ext_array) == YAML_MAPPING_NODE) { memcpy(&ext_iter, &ext_array, sizeof(yaml_iter_t)); } else if (yaml_iter_type(&ext_array) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&ext_array)) break; yaml_iter_recurse( &ext_array, &ext_iter); } else if (yaml_iter_type(&ext_array) == YAML_SCALAR_NODE) { break; } else d_assert(0, return CORE_ERROR,); while(yaml_iter_next(&ext_iter)) { const char *ext_key = yaml_iter_key(&ext_iter); d_assert(ext_key, return CORE_ERROR,); if (!strcmp(ext_key, "module")) { module = yaml_iter_value(&ext_iter); } else if (!strcmp(ext_key, "conf")) { conf = yaml_iter_value(&ext_iter); } else d_warn("unknown key `%s`", ext_key); } if (module) { self.fd_config-> ext[self.fd_config->num_of_ext]. module = module; self.fd_config-> ext[self.fd_config->num_of_ext]. conf = conf; self.fd_config->num_of_ext++; } } while(yaml_iter_type(&ext_array) == YAML_SEQUENCE_NODE); } else if (!strcmp(fd_key, "connect")) { yaml_iter_t conn_array, conn_iter; yaml_iter_recurse(&fd_iter, &conn_array); do { const char *identity = NULL; const char *addr = NULL; c_uint16_t port = 0; if (yaml_iter_type(&conn_array) == YAML_MAPPING_NODE) { memcpy(&conn_iter, &conn_array, sizeof(yaml_iter_t)); } else if (yaml_iter_type(&conn_array) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&conn_array)) break; yaml_iter_recurse(&conn_array, &conn_iter); } else if (yaml_iter_type(&conn_array) == YAML_SCALAR_NODE) { break; } else d_assert(0, return CORE_ERROR,); while(yaml_iter_next(&conn_iter)) { const char *conn_key = yaml_iter_key(&conn_iter); d_assert(conn_key, return CORE_ERROR,); if (!strcmp(conn_key, "identity")) { identity = yaml_iter_value(&conn_iter); } else if (!strcmp(conn_key, "addr")) { addr = yaml_iter_value(&conn_iter); } else if (!strcmp(conn_key, "port")) { const char *v = yaml_iter_value(&conn_iter); if (v) port = atoi(v); } else d_warn("unknown key `%s`", conn_key); } if (identity && addr) { self.fd_config-> conn[self.fd_config->num_of_conn]. identity = identity; self.fd_config-> conn[self.fd_config->num_of_conn]. addr = addr; self.fd_config-> conn[self.fd_config->num_of_conn]. port = port; self.fd_config->num_of_conn++; } } while(yaml_iter_type(&conn_array) == YAML_SEQUENCE_NODE); } else d_warn("unknown key `%s`", fd_key); } } } else if (!strcmp(pgw_key, "gtpc")) { yaml_iter_t gtpc_array, gtpc_iter; yaml_iter_recurse(&pgw_iter, >pc_array); do { int family = AF_UNSPEC; int i, num = 0; const char *hostname[MAX_NUM_OF_HOSTNAME]; c_uint16_t port = self.gtpc_port; const char *dev = NULL; c_sockaddr_t *list = NULL; sock_node_t *node = NULL; if (yaml_iter_type(>pc_array) == YAML_MAPPING_NODE) { memcpy(>pc_iter, >pc_array, sizeof(yaml_iter_t)); } else if (yaml_iter_type(>pc_array) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(>pc_array)) break; yaml_iter_recurse(>pc_array, >pc_iter); } else if (yaml_iter_type(>pc_array) == YAML_SCALAR_NODE) { break; } else d_assert(0, return CORE_ERROR,); while(yaml_iter_next(>pc_iter)) { const char *gtpc_key = yaml_iter_key(>pc_iter); d_assert(gtpc_key, return CORE_ERROR,); if (!strcmp(gtpc_key, "family")) { const char *v = yaml_iter_value(>pc_iter); if (v) family = atoi(v); if (family != AF_UNSPEC && family != AF_INET && family != AF_INET6) { d_warn("Ignore family(%d) : AF_UNSPEC(%d), " "AF_INET(%d), AF_INET6(%d) ", family, AF_UNSPEC, AF_INET, AF_INET6); family = AF_UNSPEC; } } else if (!strcmp(gtpc_key, "addr") || !strcmp(gtpc_key, "name")) { yaml_iter_t hostname_iter; yaml_iter_recurse(>pc_iter, &hostname_iter); d_assert(yaml_iter_type(&hostname_iter) != YAML_MAPPING_NODE, return CORE_ERROR,); do { if (yaml_iter_type(&hostname_iter) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&hostname_iter)) break; } d_assert(num <= MAX_NUM_OF_HOSTNAME, return CORE_ERROR,); hostname[num++] = yaml_iter_value(&hostname_iter); } while( yaml_iter_type(&hostname_iter) == YAML_SEQUENCE_NODE); } else if (!strcmp(gtpc_key, "port")) { const char *v = yaml_iter_value(>pc_iter); if (v) { port = atoi(v); self.gtpc_port = port; } } else if (!strcmp(gtpc_key, "dev")) { dev = yaml_iter_value(>pc_iter); } else d_warn("unknown key `%s`", gtpc_key); } list = NULL; for (i = 0; i < num; i++) { rv = core_addaddrinfo(&list, family, hostname[i], port, 0); d_assert(rv == CORE_OK, return CORE_ERROR,); } if (list) { if (context_self()->parameter.no_ipv4 == 0) { rv = sock_add_node(&self.gtpc_list, &node, list, AF_INET); d_assert(rv == CORE_OK, return CORE_ERROR,); } if (context_self()->parameter.no_ipv6 == 0) { rv = sock_add_node(&self.gtpc_list6, &node, list, AF_INET6); d_assert(rv == CORE_OK, return CORE_ERROR,); } core_freeaddrinfo(list); } if (dev) { rv = sock_probe_node( context_self()->parameter.no_ipv4 ? NULL : &self.gtpc_list, context_self()->parameter.no_ipv6 ? NULL : &self.gtpc_list6, dev, self.gtpc_port); d_assert(rv == CORE_OK, return CORE_ERROR,); } } while(yaml_iter_type(>pc_array) == YAML_SEQUENCE_NODE); if (list_first(&self.gtpc_list) == NULL && list_first(&self.gtpc_list6) == NULL) { rv = sock_probe_node( context_self()->parameter.no_ipv4 ? NULL : &self.gtpc_list, context_self()->parameter.no_ipv6 ? NULL : &self.gtpc_list6, NULL, self.gtpc_port); d_assert(rv == CORE_OK, return CORE_ERROR,); } } else if (!strcmp(pgw_key, "gtpu")) { yaml_iter_t gtpu_array, gtpu_iter; yaml_iter_recurse(&pgw_iter, >pu_array); do { int family = AF_UNSPEC; int i, num = 0; const char *hostname[MAX_NUM_OF_HOSTNAME]; c_uint16_t port = self.gtpu_port; const char *dev = NULL; c_sockaddr_t *list = NULL; sock_node_t *node = NULL; if (yaml_iter_type(>pu_array) == YAML_MAPPING_NODE) { memcpy(>pu_iter, >pu_array, sizeof(yaml_iter_t)); } else if (yaml_iter_type(>pu_array) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(>pu_array)) break; yaml_iter_recurse(>pu_array, >pu_iter); } else if (yaml_iter_type(>pu_array) == YAML_SCALAR_NODE) { break; } else d_assert(0, return CORE_ERROR,); while(yaml_iter_next(>pu_iter)) { const char *gtpu_key = yaml_iter_key(>pu_iter); d_assert(gtpu_key, return CORE_ERROR,); if (!strcmp(gtpu_key, "family")) { const char *v = yaml_iter_value(>pu_iter); if (v) family = atoi(v); if (family != AF_UNSPEC && family != AF_INET && family != AF_INET6) { d_warn("Ignore family(%d) : AF_UNSPEC(%d), " "AF_INET(%d), AF_INET6(%d) ", family, AF_UNSPEC, AF_INET, AF_INET6); family = AF_UNSPEC; } } else if (!strcmp(gtpu_key, "addr") || !strcmp(gtpu_key, "name")) { yaml_iter_t hostname_iter; yaml_iter_recurse(>pu_iter, &hostname_iter); d_assert(yaml_iter_type(&hostname_iter) != YAML_MAPPING_NODE, return CORE_ERROR,); do { if (yaml_iter_type(&hostname_iter) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&hostname_iter)) break; } d_assert(num <= MAX_NUM_OF_HOSTNAME, return CORE_ERROR,); hostname[num++] = yaml_iter_value(&hostname_iter); } while( yaml_iter_type(&hostname_iter) == YAML_SEQUENCE_NODE); } else if (!strcmp(gtpu_key, "port")) { const char *v = yaml_iter_value(>pu_iter); if (v) { port = atoi(v); self.gtpu_port = port; } } else if (!strcmp(gtpu_key, "dev")) { dev = yaml_iter_value(>pu_iter); } else d_warn("unknown key `%s`", gtpu_key); } list = NULL; for (i = 0; i < num; i++) { rv = core_addaddrinfo(&list, family, hostname[i], port, 0); d_assert(rv == CORE_OK, return CORE_ERROR,); } if (list) { if (context_self()->parameter.no_ipv4 == 0) { rv = sock_add_node(&self.gtpu_list, &node, list, AF_INET); d_assert(rv == CORE_OK, return CORE_ERROR,); } if (context_self()->parameter.no_ipv6 == 0) { rv = sock_add_node(&self.gtpu_list6, &node, list, AF_INET6); d_assert(rv == CORE_OK, return CORE_ERROR,); } core_freeaddrinfo(list); } if (dev) { rv = sock_probe_node( context_self()->parameter.no_ipv4 ? NULL : &self.gtpu_list, context_self()->parameter.no_ipv6 ? NULL : &self.gtpu_list6, dev, self.gtpu_port); d_assert(rv == CORE_OK, return CORE_ERROR,); } } while(yaml_iter_type(>pu_array) == YAML_SEQUENCE_NODE); if (list_first(&self.gtpu_list) == NULL && list_first(&self.gtpu_list6) == NULL) { rv = sock_probe_node( context_self()->parameter.no_ipv4 ? NULL : &self.gtpu_list, context_self()->parameter.no_ipv6 ? NULL : &self.gtpu_list6, NULL, self.gtpu_port); d_assert(rv == CORE_OK, return CORE_ERROR,); } } else if (!strcmp(pgw_key, "ue_pool")) { yaml_iter_t ue_pool_array, ue_pool_iter; yaml_iter_recurse(&pgw_iter, &ue_pool_array); do { pgw_subnet_t *subnet = NULL; const char *ipstr = NULL; const char *mask_or_numbits = NULL; const char *apn = NULL; const char *dev = self.tun_ifname; if (yaml_iter_type(&ue_pool_array) == YAML_MAPPING_NODE) { memcpy(&ue_pool_iter, &ue_pool_array, sizeof(yaml_iter_t)); } else if (yaml_iter_type(&ue_pool_array) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&ue_pool_array)) break; yaml_iter_recurse(&ue_pool_array, &ue_pool_iter); } else if (yaml_iter_type(&ue_pool_array) == YAML_SCALAR_NODE) { break; } else d_assert(0, return CORE_ERROR,); while(yaml_iter_next(&ue_pool_iter)) { const char *ue_pool_key = yaml_iter_key(&ue_pool_iter); d_assert(ue_pool_key, return CORE_ERROR,); if (!strcmp(ue_pool_key, "addr")) { char *v = (char *)yaml_iter_value(&ue_pool_iter); if (v) { ipstr = (const char *)strsep(&v, "/"); if (ipstr) { mask_or_numbits = (const char *)v; } } } else if (!strcmp(ue_pool_key, "apn")) { apn = yaml_iter_value(&ue_pool_iter); } else if (!strcmp(ue_pool_key, "dev")) { dev = yaml_iter_value(&ue_pool_iter); } else d_warn("unknown key `%s`", ue_pool_key); } if (ipstr && mask_or_numbits) { subnet = pgw_subnet_add( ipstr, mask_or_numbits, apn, dev); d_assert(subnet, return CORE_ERROR,); } else { d_warn("Ignore : addr(%s/%s), apn(%s)", ipstr, mask_or_numbits, apn); } } while(yaml_iter_type(&ue_pool_array) == YAML_SEQUENCE_NODE); } else if (!strcmp(pgw_key, "dns")) { yaml_iter_t dns_iter; yaml_iter_recurse(&pgw_iter, &dns_iter); d_assert(yaml_iter_type(&dns_iter) != YAML_MAPPING_NODE, return CORE_ERROR,); do { const char *v = NULL; if (yaml_iter_type(&dns_iter) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&dns_iter)) break; } v = yaml_iter_value(&dns_iter); if (v) { ipsubnet_t ipsub; rv = core_ipsubnet(&ipsub, v, NULL); d_assert(rv == CORE_OK, return CORE_ERROR,); if (ipsub.family == AF_INET) { if (self.dns[0] && self.dns[1]) d_warn("Ignore DNS : %s", v); else if (self.dns[0]) self.dns[1] = v; else self.dns[0] = v; } else if (ipsub.family == AF_INET6) { if (self.dns6[0] && self.dns6[1]) d_warn("Ignore DNS : %s", v); else if (self.dns6[0]) self.dns6[1] = v; else self.dns6[0] = v; } else d_warn("Ignore DNS : %s", v); } } while( yaml_iter_type(&dns_iter) == YAML_SEQUENCE_NODE); } else if (!strcmp(pgw_key, "p-cscf")) { yaml_iter_t dns_iter; yaml_iter_recurse(&pgw_iter, &dns_iter); d_assert(yaml_iter_type(&dns_iter) != YAML_MAPPING_NODE, return CORE_ERROR,); self.num_of_p_cscf = 0; self.num_of_p_cscf6 = 0; do { const char *v = NULL; if (yaml_iter_type(&dns_iter) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&dns_iter)) break; } v = yaml_iter_value(&dns_iter); if (v) { ipsubnet_t ipsub; rv = core_ipsubnet(&ipsub, v, NULL); d_assert(rv == CORE_OK, return CORE_ERROR,); if (ipsub.family == AF_INET) { if (self.num_of_p_cscf >= MAX_NUM_OF_P_CSCF) d_warn("Ignore P-CSCF : %s", v); else self.p_cscf[self.num_of_p_cscf++] = v; } else if (ipsub.family == AF_INET6) { if (self.num_of_p_cscf6 >= MAX_NUM_OF_P_CSCF) d_warn("Ignore P-CSCF : %s", v); else self.p_cscf6[self.num_of_p_cscf6++] = v; } else d_warn("Ignore P-CSCF : %s", v); } } while( yaml_iter_type(&dns_iter) == YAML_SEQUENCE_NODE); } else d_warn("unknown key `%s`", pgw_key); } } } rv = pgw_context_validation(); if (rv != CORE_OK) return rv; return CORE_OK; } status_t pgw_context_setup_trace_module() { int app = context_self()->logger.trace.app; int diameter = context_self()->logger.trace.diameter; int gtpv2 = context_self()->logger.trace.gtpv2; int gtp = context_self()->logger.trace.gtp; if (app) { extern int _pgw_context; d_trace_level(&_pgw_context, app); } if (diameter) { extern int _pgw_fd_path; d_trace_level(&_pgw_fd_path, diameter); extern int _fd_init; d_trace_level(&_fd_init, diameter); extern int _fd_logger; d_trace_level(&_fd_logger, diameter); } if (gtpv2) { extern int _pgw_sm; d_trace_level(&_pgw_sm, gtpv2); extern int _pgw_s5c_build; d_trace_level(&_pgw_s5c_build, gtpv2); extern int _pgw_s5c_handler; d_trace_level(&_pgw_s5c_handler, gtpv2); extern int _gtp_node; d_trace_level(&_gtp_node, gtpv2); extern int _gtp_message; d_trace_level(&_gtp_message, gtpv2); extern int _gtp_path; d_trace_level(&_gtp_path, gtpv2); extern int _gtp_xact; d_trace_level(&_gtp_xact, gtpv2); extern int _tlv_msg; d_trace_level(&_tlv_msg, gtpv2); } if (gtp) { extern int _pgw_gtp_path; d_trace_level(&_pgw_gtp_path, gtp); extern int _pgw_ipfw; d_trace_level(&_pgw_ipfw, gtp); } return CORE_OK; } static void *sess_hash_keygen(c_uint8_t *out, int *out_len, c_uint8_t *imsi, int imsi_len, c_int8_t *apn) { memcpy(out, imsi, imsi_len); core_cpystrn((char*)(out+imsi_len), apn, MAX_APN_LEN+1); *out_len = imsi_len+strlen((char*)(out+imsi_len)); return out; } pgw_sess_t *pgw_sess_add( c_uint8_t *imsi, int imsi_len, c_int8_t *apn, c_uint8_t pdn_type, c_uint8_t ebi) { char buf1[CORE_ADDRSTRLEN]; char buf2[CORE_ADDRSTRLEN]; pgw_sess_t *sess = NULL; pgw_bearer_t *bearer = NULL; pgw_subnet_t *subnet6 = NULL; index_alloc(&pgw_sess_pool, &sess); d_assert(sess, return NULL, "Null param"); sess->gnode = NULL; sess->pgw_s5c_teid = sess->index; /* derived from an index */ /* Set IMSI */ sess->imsi_len = imsi_len; memcpy(sess->imsi, imsi, sess->imsi_len); core_buffer_to_bcd(sess->imsi, sess->imsi_len, sess->imsi_bcd); /* Set APN */ core_cpystrn(sess->pdn.apn, apn, MAX_APN_LEN+1); list_init(&sess->bearer_list); core_cpystrn(sess->pdn.apn, apn, MAX_APN_LEN+1); bearer = pgw_bearer_add(sess); d_assert(bearer, pgw_sess_remove(sess); return NULL, "Can't add default bearer context"); bearer->ebi = ebi; sess->pdn.paa.pdn_type = pdn_type; if (pdn_type == GTP_PDN_TYPE_IPV4) { sess->ipv4 = pgw_ue_ip_alloc(AF_INET, apn); d_assert(sess->ipv4, pgw_sess_remove(sess); return NULL, "Can't allocate IPv4 Pool"); sess->pdn.paa.addr = sess->ipv4->addr[0]; } else if (pdn_type == GTP_PDN_TYPE_IPV6) { sess->ipv6 = pgw_ue_ip_alloc(AF_INET6, apn); d_assert(sess->ipv6, pgw_sess_remove(sess); return NULL, "Can't allocate IPv6 Pool"); subnet6 = sess->ipv6->subnet; d_assert(subnet6, pgw_sess_remove(sess); return NULL, "No IPv6 subnet"); sess->pdn.paa.len = subnet6->prefixlen; memcpy(sess->pdn.paa.addr6, sess->ipv6->addr, IPV6_LEN); } else if (pdn_type == GTP_PDN_TYPE_IPV4V6) { sess->ipv4 = pgw_ue_ip_alloc(AF_INET, apn); d_assert(sess->ipv4, pgw_sess_remove(sess); return NULL, "Can't allocate IPv4 Pool"); sess->ipv6 = pgw_ue_ip_alloc(AF_INET6, apn); d_assert(sess->ipv6, pgw_sess_remove(sess); return NULL, "Can't allocate IPv6 Pool"); subnet6 = sess->ipv6->subnet; d_assert(subnet6, pgw_sess_remove(sess); return NULL, "No IPv6 subnet"); sess->pdn.paa.both.addr = sess->ipv4->addr[0]; sess->pdn.paa.both.len = subnet6->prefixlen; memcpy(sess->pdn.paa.both.addr6, sess->ipv6->addr, IPV6_LEN); } else d_assert(0, return NULL, "Unsupported PDN Type(%d)", pdn_type); d_trace(1, "UE IPv4:[%s] IPv6:[%s]\n", sess->ipv4 ? INET_NTOP(&sess->ipv4->addr, buf1) : "", sess->ipv6 ? INET6_NTOP(&sess->ipv6->addr, buf2) : ""); /* Generate Hash Key : IMSI + APN */ sess_hash_keygen(sess->hash_keybuf, &sess->hash_keylen, imsi, imsi_len, apn); hash_set(self.sess_hash, sess->hash_keybuf, sess->hash_keylen, sess); return sess; } status_t pgw_sess_remove(pgw_sess_t *sess) { d_assert(self.sess_hash, return CORE_ERROR, "Null param"); d_assert(sess, return CORE_ERROR, "Null param"); hash_set(self.sess_hash, sess->hash_keybuf, sess->hash_keylen, NULL); if (sess->ipv4) pgw_ue_ip_free(sess->ipv4); if (sess->ipv6) pgw_ue_ip_free(sess->ipv6); pgw_bearer_remove_all(sess); index_free(&pgw_sess_pool, sess); return CORE_OK; } status_t pgw_sess_remove_all() { hash_index_t *hi = NULL; pgw_sess_t *sess = NULL; for (hi = pgw_sess_first(); hi; hi = pgw_sess_next(hi)) { sess = pgw_sess_this(hi); pgw_sess_remove(sess); } return CORE_OK; } pgw_sess_t* pgw_sess_find(index_t index) { d_assert(index, return NULL, "Invalid Index"); return index_find(&pgw_sess_pool, index); } pgw_sess_t* pgw_sess_find_by_teid(c_uint32_t teid) { return pgw_sess_find(teid); } pgw_sess_t* pgw_sess_find_by_imsi_apn( c_uint8_t *imsi, int imsi_len, c_int8_t *apn) { c_uint8_t keybuf[MAX_IMSI_LEN+MAX_APN_LEN+1]; int keylen = 0; d_assert(self.sess_hash, return NULL, "Null param"); sess_hash_keygen(keybuf, &keylen, imsi, imsi_len, apn); return (pgw_sess_t *)hash_get(self.sess_hash, keybuf, keylen); } gtp_node_t *pgw_sgw_add_by_message(gtp_message_t *message) { status_t rv; gtp_node_t *sgw = NULL; gtp_f_teid_t *sgw_s5c_teid = NULL; gtp_create_session_request_t *req = &message->create_session_request; if (req->sender_f_teid_for_control_plane.presence == 0) { d_error("No Sender F-TEID"); return NULL; } sgw_s5c_teid = req->sender_f_teid_for_control_plane.data; d_assert(sgw_s5c_teid, return NULL,); sgw = gtp_find_node(&pgw_self()->sgw_s5c_list, sgw_s5c_teid); if (!sgw) { sgw = gtp_add_node_with_teid(&pgw_self()->sgw_s5c_list, sgw_s5c_teid, pgw_self()->gtpc_port, context_self()->parameter.no_ipv4, context_self()->parameter.no_ipv6, context_self()->parameter.prefer_ipv4); d_assert(sgw, return NULL,); rv = gtp_client(sgw); d_assert(rv == CORE_OK, return NULL,); } return sgw; } pgw_sess_t *pgw_sess_add_by_message(gtp_message_t *message) { pgw_sess_t *sess = NULL; c_int8_t apn[MAX_APN_LEN]; gtp_create_session_request_t *req = &message->create_session_request; if (req->imsi.presence == 0) { d_error("No IMSI"); return NULL; } if (req->access_point_name.presence == 0) { d_error("No APN"); return NULL; } if (req->bearer_contexts_to_be_created.presence == 0) { d_error("No Bearer"); return NULL; } if (req->bearer_contexts_to_be_created.eps_bearer_id.presence == 0) { d_error("No EPS Bearer ID"); return NULL; } if (req->pdn_type.presence == 0) { d_error("No PDN Type"); return NULL; } apn_parse(apn, req->access_point_name.data, req->access_point_name.len); d_trace(9, "pgw_sess_add_by_message() [APN:%s, PDN:%d, EDI:%d]\n", apn, req->pdn_type.u8, req->bearer_contexts_to_be_created.eps_bearer_id.u8); sess = pgw_sess_find_by_imsi_apn(req->imsi.data, req->imsi.len, apn); if (!sess) { sess = pgw_sess_add(req->imsi.data, req->imsi.len, apn, req->pdn_type.u8, req->bearer_contexts_to_be_created.eps_bearer_id.u8); d_assert(sess, return NULL, "No Session Context"); } return sess; } hash_index_t* pgw_sess_first() { d_assert(self.sess_hash, return NULL, "Null param"); return hash_first(self.sess_hash); } hash_index_t* pgw_sess_next(hash_index_t *hi) { return hash_next(hi); } pgw_sess_t *pgw_sess_this(hash_index_t *hi) { d_assert(hi, return NULL, "Null param"); return hash_this_val(hi); } pgw_bearer_t* pgw_bearer_add(pgw_sess_t *sess) { pgw_bearer_t *bearer = NULL; d_assert(sess, return NULL, "Null param"); index_alloc(&pgw_bearer_pool, &bearer); d_assert(bearer, return NULL, "Bearer context allocation failed"); bearer->name = NULL; list_init(&bearer->pf_list); bearer->pgw_s5u_teid = bearer->index; bearer->sess = sess; bearer->gnode = NULL; list_append(&sess->bearer_list, bearer); return bearer; } status_t pgw_bearer_remove(pgw_bearer_t *bearer) { d_assert(bearer, return CORE_ERROR, "Null param"); d_assert(bearer->sess, return CORE_ERROR, "Null param"); list_remove(&bearer->sess->bearer_list, bearer); if (bearer->name) CORE_FREE(bearer->name); pgw_pf_remove_all(bearer); index_free(&pgw_bearer_pool, bearer); return CORE_OK; } status_t pgw_bearer_remove_all(pgw_sess_t *sess) { pgw_bearer_t *bearer = NULL, *next_bearer = NULL; d_assert(sess, return CORE_ERROR, "Null param"); bearer = list_first(&sess->bearer_list); while (bearer) { next_bearer = list_next(bearer); pgw_bearer_remove(bearer); bearer = next_bearer; } return CORE_OK; } pgw_bearer_t* pgw_bearer_find(index_t index) { d_assert(index, return NULL, "Invalid Index"); return index_find(&pgw_bearer_pool, index); } pgw_bearer_t* pgw_bearer_find_by_pgw_s5u_teid(c_uint32_t pgw_s5u_teid) { return pgw_bearer_find(pgw_s5u_teid); } pgw_bearer_t* pgw_bearer_find_by_ebi(pgw_sess_t *sess, c_uint8_t ebi) { pgw_bearer_t *bearer = NULL; d_assert(sess, return NULL, "Null param"); bearer = pgw_bearer_first(sess); while (bearer) { if (bearer->ebi == ebi) break; bearer = pgw_bearer_next(bearer); } return bearer; } pgw_bearer_t* pgw_bearer_find_by_name(pgw_sess_t *sess, c_int8_t *name) { pgw_bearer_t *bearer = NULL; d_assert(sess, return NULL, "Null param"); d_assert(name, return NULL, "Null param"); bearer = pgw_bearer_first(sess); while (bearer) { if (bearer->name && strcmp(bearer->name, name) == 0) return bearer; bearer = pgw_bearer_next(bearer); } return NULL; } pgw_bearer_t* pgw_bearer_find_by_qci_arp(pgw_sess_t *sess, c_uint8_t qci, c_uint8_t priority_level, c_uint8_t pre_emption_capability, c_uint8_t pre_emption_vulnerability) { pgw_bearer_t *bearer = NULL; d_assert(sess, return NULL, "Null param"); bearer = pgw_default_bearer_in_sess(sess); if (!bearer) return NULL; if (sess->pdn.qos.qci == qci && sess->pdn.qos.arp.priority_level == priority_level && sess->pdn.qos.arp.pre_emption_capability == pre_emption_capability && sess->pdn.qos.arp.pre_emption_vulnerability == pre_emption_vulnerability) { return bearer; } bearer = pgw_bearer_next(bearer); while(bearer) { if (bearer->qos.qci == qci && bearer->qos.arp.priority_level == priority_level && bearer->qos.arp.pre_emption_capability == pre_emption_capability && bearer->qos.arp.pre_emption_vulnerability == pre_emption_vulnerability) { return bearer; } bearer = pgw_bearer_next(bearer); } return NULL; } pgw_bearer_t* pgw_default_bearer_in_sess(pgw_sess_t *sess) { return pgw_bearer_first(sess); } pgw_bearer_t* pgw_bearer_first(pgw_sess_t *sess) { d_assert(sess, return NULL, "Null param"); return list_first(&sess->bearer_list); } pgw_bearer_t* pgw_bearer_next(pgw_bearer_t *bearer) { return list_next(bearer); } pgw_pf_t *pgw_pf_add(pgw_bearer_t *bearer, c_uint32_t precedence) { pgw_pf_t *pf = NULL; d_assert(bearer, return NULL, "Null param"); pool_alloc_node(&pgw_pf_pool, &pf); d_assert(pf, return NULL, "Null param"); pf->identifier = NEXT_ID(bearer->pf_identifier, 1, 15); pf->bearer = bearer; list_append(&bearer->pf_list, pf); return pf; } status_t pgw_pf_remove(pgw_pf_t *pf) { d_assert(pf, return CORE_ERROR, "Null param"); d_assert(pf->bearer, return CORE_ERROR, "Null param"); list_remove(&pf->bearer->pf_list, pf); pool_free_node(&pgw_pf_pool, pf); return CORE_OK; } status_t pgw_pf_remove_all(pgw_bearer_t *bearer) { pgw_pf_t *pf = NULL, *next_pf = NULL; d_assert(bearer, return CORE_ERROR, "Null param"); pf = pgw_pf_first(bearer); while (pf) { next_pf = pgw_pf_next(pf); pgw_pf_remove(pf); pf = next_pf; } return CORE_OK; } pgw_pf_t* pgw_pf_find_by_id(pgw_bearer_t *bearer, c_uint8_t id) { pgw_pf_t *pf = NULL; pf = pgw_pf_first(bearer); while (pf) { if (pf->identifier == id) return pf; pf = pgw_pf_next(pf); } return CORE_OK; } pgw_pf_t* pgw_pf_first(pgw_bearer_t *bearer) { return list_first(&bearer->pf_list); } pgw_pf_t* pgw_pf_next(pgw_pf_t *pf) { return list_next(pf); } status_t pgw_ue_pool_generate() { int j; pgw_subnet_t *subnet = NULL; for (subnet = pgw_subnet_first(); subnet; subnet = pgw_subnet_next(subnet)) { int index = 0; c_uint32_t mask_count; c_uint32_t broadcast[4]; if (subnet->family == AF_INET) { if (subnet->prefixlen == 32) mask_count = 1; else if (subnet->prefixlen < 32) mask_count = (0xffffffff >> subnet->prefixlen) + 1; else d_assert(0, return CORE_ERROR,); } else if (subnet->family == AF_INET6) { if (subnet->prefixlen == 128) mask_count = 1; else if (subnet->prefixlen > 96 && subnet->prefixlen < 128) mask_count = (0xffffffff >> (subnet->prefixlen - 96)) + 1; else if (subnet->prefixlen <= 96) mask_count = 0xffffffff; else d_assert(0, return CORE_ERROR,); } else d_assert(0, return CORE_ERROR,); for (j = 0; j < 4; j++) { broadcast[j] = subnet->sub.sub[j] + ~subnet->sub.mask[j]; } for (j = 0; j < mask_count && index < MAX_POOL_OF_SESS; j++) { pgw_ue_ip_t *ue_ip = NULL; int maxbytes = 0; int lastindex = 0; ue_ip = &subnet->pool.pool[index]; d_assert(ue_ip, return CORE_ERROR,); memset(ue_ip, 0, sizeof *ue_ip); if (subnet->family == AF_INET) { maxbytes = 4; lastindex = 0; } else if (subnet->family == AF_INET6) { maxbytes = 16; lastindex = 3; } memcpy(ue_ip->addr, subnet->sub.sub, maxbytes); ue_ip->addr[lastindex] += htonl(j); ue_ip->subnet = subnet; /* Exclude Network Address */ if (memcmp(ue_ip->addr, subnet->sub.sub, maxbytes) == 0) continue; /* Exclude Broadcast Address */ if (memcmp(ue_ip->addr, broadcast, maxbytes) == 0) continue; /* Exclude TUN IP Address */ if (memcmp(ue_ip->addr, subnet->gw.sub, maxbytes) == 0) continue; index++; } subnet->pool.size = subnet->pool.avail = index; } return CORE_OK; } static pgw_subnet_t *find_subnet(int family, const char *apn) { pgw_subnet_t *subnet = NULL; d_assert(apn, return NULL,); d_assert(family == AF_INET || family == AF_INET6, return NULL,); for (subnet = pgw_subnet_first(); subnet; subnet = pgw_subnet_next(subnet)) { if (strlen(subnet->apn)) { if (subnet->family == family && strcmp(subnet->apn, apn) == 0 && pool_avail(&subnet->pool)) { return subnet; } } } for (subnet = pgw_subnet_first(); subnet; subnet = pgw_subnet_next(subnet)) { if (strlen(subnet->apn) == 0) { if (subnet->family == family && pool_avail(&subnet->pool)) { return subnet; } } } if (subnet == NULL) d_error("CHECK CONFIGURATION: Cannot find UE Pool"); return subnet; } pgw_ue_ip_t *pgw_ue_ip_alloc(int family, const char *apn) { pgw_subnet_t *subnet = NULL; pgw_ue_ip_t *ue_ip = NULL; d_assert(apn, return NULL,); subnet = find_subnet(family, apn); d_assert(subnet, return NULL,); pool_alloc_node(&subnet->pool, &ue_ip); d_assert(ue_ip, return NULL,); return ue_ip; } status_t pgw_ue_ip_free(pgw_ue_ip_t *ue_ip) { pgw_subnet_t *subnet = NULL; d_assert(ue_ip, return CORE_ERROR,); subnet = ue_ip->subnet; d_assert(subnet, return CORE_ERROR,); pool_free_node(&subnet->pool, ue_ip); return CORE_OK; } pgw_dev_t *pgw_dev_add(const char *ifname) { pgw_dev_t *dev = NULL; d_assert(ifname, return NULL,); pool_alloc_node(&pgw_dev_pool, &dev); d_assert(dev, return NULL,); memset(dev, 0, sizeof *dev); strcpy(dev->ifname, ifname); list_append(&self.dev_list, dev); return dev; } status_t pgw_dev_remove(pgw_dev_t *dev) { d_assert(dev, return CORE_ERROR, "Null param"); list_remove(&self.dev_list, dev); if (dev->link_local_addr) core_freeaddrinfo(dev->link_local_addr); pool_free_node(&pgw_dev_pool, dev); return CORE_OK; } status_t pgw_dev_remove_all() { pgw_dev_t *dev = NULL, *next_dev = NULL; dev = pgw_dev_first(); while (dev) { next_dev = pgw_dev_next(dev); pgw_dev_remove(dev); dev = next_dev; } return CORE_OK; } pgw_dev_t* pgw_dev_find_by_ifname(const char *ifname) { pgw_dev_t *dev = NULL; d_assert(ifname, return NULL,); dev = pgw_dev_first(); while (dev) { if (strcmp(dev->ifname, ifname) == 0) return dev; dev = pgw_dev_next(dev); } return CORE_OK; } pgw_dev_t* pgw_dev_first() { return list_first(&self.dev_list); } pgw_dev_t* pgw_dev_next(pgw_dev_t *dev) { return list_next(dev); } pgw_subnet_t *pgw_subnet_add( const char *ipstr, const char *mask_or_numbits, const char *apn, const char *ifname) { status_t rv; pgw_dev_t *dev = NULL; pgw_subnet_t *subnet = NULL; d_assert(ipstr, return NULL,); d_assert(mask_or_numbits, return NULL,); d_assert(ifname, return NULL,); dev = pgw_dev_find_by_ifname(ifname); if (!dev) dev = pgw_dev_add(ifname); d_assert(dev, return NULL,); pool_alloc_node(&pgw_subnet_pool, &subnet); d_assert(subnet, return NULL,); memset(subnet, 0, sizeof *subnet); subnet->dev = dev; rv = core_ipsubnet(&subnet->gw, ipstr, NULL); d_assert(rv == CORE_OK, return NULL,); rv = core_ipsubnet(&subnet->sub, ipstr, mask_or_numbits); d_assert(rv == CORE_OK, return NULL,); if (apn) strcpy(subnet->apn, apn); subnet->family = subnet->gw.family; subnet->prefixlen = atoi(mask_or_numbits); pool_init(&subnet->pool, MAX_POOL_OF_SESS); list_append(&self.subnet_list, subnet); return subnet; } status_t pgw_subnet_remove(pgw_subnet_t *subnet) { d_assert(subnet, return CORE_ERROR, "Null param"); list_remove(&self.subnet_list, subnet); if (pool_used(&subnet->pool)) { d_warn("%d not freed in ue_ip_pool[%d] in PGW-Context", pool_used(&subnet->pool), pool_size(&subnet->pool)); } d_trace(9, "%d not freed in ue_ip_pool[%d] in PGW-Context\n", pool_used(&subnet->pool), pool_size(&subnet->pool)); pool_final(&subnet->pool); pool_free_node(&pgw_subnet_pool, subnet); return CORE_OK; } status_t pgw_subnet_remove_all() { pgw_subnet_t *subnet = NULL, *next_subnet = NULL; subnet = pgw_subnet_first(); while (subnet) { next_subnet = pgw_subnet_next(subnet); pgw_subnet_remove(subnet); subnet = next_subnet; } return CORE_OK; } pgw_subnet_t* pgw_subnet_first() { return list_first(&self.subnet_list); } pgw_subnet_t* pgw_subnet_next(pgw_subnet_t *subnet) { return list_next(subnet); } nextepc-0.3.10/src/pgw/pgw_context.h000066400000000000000000000224531333553357400173600ustar00rootroot00000000000000#ifndef __PGW_CONTEXT_H__ #define __PGW_CONTEXT_H__ #include "core_list.h" #include "core_index.h" #include "core_errno.h" #include "core_hash.h" #include "core_network.h" #include "core_msgq.h" #include "core_timer.h" #include "gtp/gtp_types.h" #include "gtp/gtp_message.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define MAX_NUM_OF_DEV 16 #define MAX_NUM_OF_SUBNET 16 typedef struct _gtp_node_t gtp_node_t; typedef struct _fd_config_t fd_config_t; typedef struct _pgw_context_t { const char* fd_conf_path; /* PGW freeDiameter conf path */ fd_config_t *fd_config; /* PGW freeDiameter config */ c_uint32_t gtpc_port; /* Default: PGW GTP-C local port */ c_uint32_t gtpu_port; /* Default: PGW GTP-U local port */ const char *tun_ifname; /* Default:: pgwtun */ list_t gtpc_list; /* PGW GTPC IPv4 Server List */ list_t gtpc_list6; /* PGW GTPC IPv6 Server List */ sock_id gtpc_sock; /* PGW GTPC IPv4 Socket */ sock_id gtpc_sock6; /* PGW GTPC IPv6 Socket */ c_sockaddr_t *gtpc_addr; /* PGW GTPC IPv4 Address */ c_sockaddr_t *gtpc_addr6; /* PGW GTPC IPv6 Address */ list_t gtpu_list; /* PGW GTPU IPv4 Server List */ list_t gtpu_list6; /* PGW GTPU IPv6 Server List */ sock_id gtpu_sock; /* PGW GTPU IPv4 Socket */ sock_id gtpu_sock6; /* PGW GTPU IPv6 Socket */ c_sockaddr_t *gtpu_addr; /* PGW GTPU IPv4 Address */ c_sockaddr_t *gtpu_addr6; /* PGW GTPU IPv6 Address */ list_t dev_list; /* PGW Tun Device List */ list_t subnet_list; /* PGW UE Subnet List */ msgq_id queue_id; /* Qsesssess for processing PGW control plane */ tm_service_t tm_service; /* Timer Service */ #define MAX_NUM_OF_DNS 2 const char *dns[MAX_NUM_OF_DNS]; const char *dns6[MAX_NUM_OF_DNS]; #define MAX_NUM_OF_P_CSCF 16 const char *p_cscf[MAX_NUM_OF_P_CSCF]; int num_of_p_cscf; int p_cscf_index; const char *p_cscf6[MAX_NUM_OF_P_CSCF]; int num_of_p_cscf6; int p_cscf6_index; list_t sgw_s5c_list; /* SGW GTPC Node List */ list_t sgw_s5u_list; /* SGW GTPU Node List */ list_t ip_pool_list; hash_t *sess_hash; /* hash table (IMSI+APN) */ } pgw_context_t; typedef struct _pgw_subnet_t pgw_subnet_t; typedef struct _pgw_ue_ip_t { c_uint32_t addr[4]; /* Related Context */ pgw_subnet_t *subnet; } pgw_ue_ip_t; typedef struct _pgw_dev_t { lnode_t node; c_int8_t ifname[IFNAMSIZ]; sock_id sock; c_sockaddr_t *link_local_addr; } pgw_dev_t; typedef struct _pgw_subnet_t { lnode_t node; ipsubnet_t sub; /* Subnet : cafe::0/64 */ ipsubnet_t gw; /* Gateway : cafe::1 */ c_int8_t apn[MAX_APN_LEN]; /* APN : "internet", "volte", .. */ int family; /* AF_INET or AF_INET6 */ c_uint8_t prefixlen; /* prefixlen */ struct { int head, tail; int size, avail; mutex_id mut; pgw_ue_ip_t *free[MAX_POOL_OF_SESS], pool[MAX_POOL_OF_SESS]; } pool; /* Related Context */ pgw_dev_t *dev; } pgw_subnet_t; typedef struct _pgw_sess_t { index_t index; /**< An index of this node */ c_uint32_t pgw_s5c_teid; /* PGW-S5C-TEID is derived from INDEX */ c_uint32_t sgw_s5c_teid; /* SGW-S5C-TEID is received from SGW */ c_int8_t *gx_sid; /* Gx Session ID */ /* IMSI */ c_uint8_t imsi[MAX_IMSI_LEN]; int imsi_len; c_int8_t imsi_bcd[MAX_IMSI_BCD_LEN+1]; /* APN Configuration */ pdn_t pdn; pgw_ue_ip_t* ipv4; pgw_ue_ip_t* ipv6; /* User-Lication-Info */ tai_t tai; e_cgi_t e_cgi; /* Hash Key : IMSI+APN */ c_uint8_t hash_keybuf[MAX_IMSI_LEN+MAX_APN_LEN+1]; int hash_keylen; list_t bearer_list; /* Related Context */ gtp_node_t *gnode; } pgw_sess_t; typedef struct _pgw_bearer_t { lnode_t node; /**< A node of list_t */ index_t index; c_uint8_t ebi; c_uint32_t pgw_s5u_teid; /* PGW_S5U is derived from INDEX */ c_uint32_t sgw_s5u_teid; /* SGW_S5U is received from SGW */ c_int8_t *name; /* PCC Rule Name */ qos_t qos; /* QoS Infomration */ /* Packet Filter Identifier Generator(1~15) */ c_uint8_t pf_identifier; /* Packet Filter List */ list_t pf_list; pgw_sess_t *sess; gtp_node_t *gnode; } pgw_bearer_t; typedef struct _pgw_rule_t { c_uint8_t proto; ED5(c_uint8_t ipv4_local:1;, c_uint8_t ipv4_remote:1;, c_uint8_t ipv6_local:1;, c_uint8_t ipv6_remote:1;, c_uint8_t reserved:4;) struct { struct { c_uint32_t addr[4]; c_uint32_t mask[4]; } local; struct { c_uint32_t addr[4]; c_uint32_t mask[4]; } remote; } ip; struct { struct { c_uint16_t low; c_uint16_t high; } local; struct { c_uint16_t low; c_uint16_t high; } remote; } port; } pgw_rule_t; typedef struct _pgw_pf_t { lnode_t node; ED3(c_uint8_t spare:2;, c_uint8_t direction:2;, c_uint8_t identifier:4;) pgw_rule_t rule; pgw_bearer_t *bearer; } pgw_pf_t; CORE_DECLARE(status_t) pgw_context_init(void); CORE_DECLARE(status_t) pgw_context_final(void); CORE_DECLARE(pgw_context_t*) pgw_self(void); CORE_DECLARE(status_t) pgw_context_parse_config(void); CORE_DECLARE(status_t) pgw_context_setup_trace_module(void); CORE_DECLARE(gtp_node_t *) pgw_sgw_add_by_message(gtp_message_t *message); CORE_DECLARE(pgw_sess_t *) pgw_sess_add_by_message(gtp_message_t *message); CORE_DECLARE(pgw_sess_t*) pgw_sess_add( c_uint8_t *imsi, int imsi_len, c_int8_t *apn, c_uint8_t pdn_type, c_uint8_t ebi); CORE_DECLARE(status_t ) pgw_sess_remove(pgw_sess_t *sess); CORE_DECLARE(status_t ) pgw_sess_remove_all(); CORE_DECLARE(pgw_sess_t*) pgw_sess_find(index_t index); CORE_DECLARE(pgw_sess_t*) pgw_sess_find_by_teid(c_uint32_t teid); CORE_DECLARE(pgw_sess_t*) pgw_sess_find_by_imsi_apn( c_uint8_t *imsi, int imsi_len, c_int8_t *apn); CORE_DECLARE(hash_index_t *) pgw_sess_first(); CORE_DECLARE(hash_index_t *) pgw_sess_next(hash_index_t *hi); CORE_DECLARE(pgw_sess_t *) pgw_sess_this(hash_index_t *hi); CORE_DECLARE(pgw_bearer_t*) pgw_bearer_add(pgw_sess_t *sess); CORE_DECLARE(status_t) pgw_bearer_remove(pgw_bearer_t *bearer); CORE_DECLARE(status_t) pgw_bearer_remove_all(pgw_sess_t *sess); CORE_DECLARE(pgw_bearer_t*) pgw_bearer_find(index_t index); CORE_DECLARE(pgw_bearer_t*) pgw_bearer_find_by_pgw_s5u_teid( c_uint32_t pgw_s5u_teid); CORE_DECLARE(pgw_bearer_t*) pgw_bearer_find_by_ebi( pgw_sess_t *sess, c_uint8_t ebi); CORE_DECLARE(pgw_bearer_t*) pgw_bearer_find_by_name( pgw_sess_t *sess, c_int8_t *name); CORE_DECLARE(pgw_bearer_t*) pgw_bearer_find_by_qci_arp(pgw_sess_t *sess, c_uint8_t qci, c_uint8_t priority_level, c_uint8_t pre_emption_capability, c_uint8_t pre_emption_vulnerability); CORE_DECLARE(pgw_bearer_t*) pgw_default_bearer_in_sess(pgw_sess_t *sess); CORE_DECLARE(pgw_bearer_t*) pgw_bearer_first(pgw_sess_t *sess); CORE_DECLARE(pgw_bearer_t*) pgw_bearer_next(pgw_bearer_t *bearer); CORE_DECLARE(pgw_pf_t*) pgw_pf_add( pgw_bearer_t *bearer, c_uint32_t precedence); CORE_DECLARE(status_t ) pgw_pf_remove(pgw_pf_t *pf); CORE_DECLARE(status_t ) pgw_pf_remove_all(pgw_bearer_t *bearer); CORE_DECLARE(pgw_pf_t*) pgw_pf_find_by_id( pgw_bearer_t *pgw_bearer, c_uint8_t id); CORE_DECLARE(pgw_pf_t*) pgw_pf_first(pgw_bearer_t *bearer); CORE_DECLARE(pgw_pf_t*) pgw_pf_next(pgw_pf_t *pf); CORE_DECLARE(status_t ) pgw_ue_pool_generate(); CORE_DECLARE(pgw_ue_ip_t *) pgw_ue_ip_alloc(int family, const char *apn); CORE_DECLARE(status_t) pgw_ue_ip_free(pgw_ue_ip_t *ip); CORE_DECLARE(pgw_dev_t*) pgw_dev_add(const char *ifname); CORE_DECLARE(status_t ) pgw_dev_remove(pgw_dev_t *dev); CORE_DECLARE(status_t ) pgw_dev_remove_all(); CORE_DECLARE(pgw_dev_t*) pgw_dev_find_by_ifname(const char *ifname); CORE_DECLARE(pgw_dev_t*) pgw_dev_first(); CORE_DECLARE(pgw_dev_t*) pgw_dev_next(pgw_dev_t *dev); CORE_DECLARE(pgw_subnet_t*) pgw_subnet_add( const char *ipstr, const char *mask_or_numbits, const char *apn, const char *ifname); CORE_DECLARE(status_t ) pgw_subnet_remove(pgw_subnet_t *subnet); CORE_DECLARE(status_t ) pgw_subnet_remove_all(); CORE_DECLARE(pgw_subnet_t*) pgw_subnet_first(); CORE_DECLARE(pgw_subnet_t*) pgw_subnet_next(pgw_subnet_t *subnet); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __PGW_CONTEXT_H__ */ nextepc-0.3.10/src/pgw/pgw_event.c000066400000000000000000000013421333553357400170020ustar00rootroot00000000000000#define TRACE_MODULE _pgw_event #include "pgw_event.h" #include "pgw_context.h" char* pgw_event_get_name(event_t *e) { if (e == NULL) return FSM_NAME_INIT_SIG; switch (event_get(e)) { case FSM_ENTRY_SIG: return FSM_NAME_ENTRY_SIG; case FSM_EXIT_SIG: return FSM_NAME_EXIT_SIG; case PGW_EVT_S5C_MESSAGE: return "PGW_EVT_S5C_MESSAGE"; case PGW_EVT_S5C_T3_RESPONSE: return "PGW_EVT_S5C_T3_RESPONSE"; case PGW_EVT_S5C_T3_HOLDING: return "PGW_EVT_S5C_T3_HOLDING"; case PGW_EVT_GX_MESSAGE: return "PGW_EVT_GX_SESSION_MSG"; default: break; } return EVT_NAME_UNKNOWN; } nextepc-0.3.10/src/pgw/pgw_event.h000066400000000000000000000010431333553357400170050ustar00rootroot00000000000000#ifndef __PGW_EVENT_H__ #define __PGW_EVENT_H__ #include "core_event.h" #include "core_fsm.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef enum { PGW_EVT_BASE = FSM_USER_SIG, PGW_EVT_S5C_MESSAGE, PGW_EVT_S5C_T3_RESPONSE, PGW_EVT_S5C_T3_HOLDING, PGW_EVT_GX_MESSAGE, PGW_EVT_TOP, } event_e; #define pgw_event_send(__ptr_e) event_send(pgw_self()->queue_id, (__ptr_e)) CORE_DECLARE(char*) pgw_event_get_name(event_t *e); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __PGW_EVENT_H__ */ nextepc-0.3.10/src/pgw/pgw_fd_path.c000066400000000000000000001233571333553357400173010ustar00rootroot00000000000000#define TRACE_MODULE _pgw_fd_path #include "core_debug.h" #include "core_pool.h" #include "core_lib.h" #include "gtp/gtp_xact.h" #include "fd/fd_lib.h" #include "fd/gx/gx_dict.h" #include "fd/gx/gx_message.h" #include "pgw_event.h" #include "pgw_fd_path.h" static struct session_handler *pgw_gx_reg = NULL; static struct disp_hdl *hdl_gx_fb = NULL; static struct disp_hdl *hdl_gx_rar = NULL; struct sess_state { os0_t gx_sid; /* Gx Session-Id */ pgw_sess_t *sess; gtp_xact_t *xact; pkbuf_t *gtpbuf; c_uint32_t cc_request_type; c_uint32_t cc_request_number; struct timespec ts; /* Time of sending the message */ }; pool_declare(pgw_gx_sess_pool, struct sess_state, MAX_POOL_OF_DIAMETER_SESS); static status_t decode_pcc_rule_definition( pcc_rule_t *pcc_rule, struct avp *avpch1, int *perror); static void pgw_gx_cca_cb(void *data, struct msg **msg); static __inline__ struct sess_state *new_state(os0_t sid) { struct sess_state *new = NULL; pool_alloc_node(&pgw_gx_sess_pool, &new); d_assert(new, return NULL,); memset(new, 0, sizeof *new); new->gx_sid = (os0_t)core_strdup((char *)sid); d_assert(new->gx_sid, return NULL,); return new; } static void state_cleanup(struct sess_state *sess_data, os0_t sid, void *opaque) { if (sess_data->gx_sid) CORE_FREE(sess_data->gx_sid); pool_free_node(&pgw_gx_sess_pool, sess_data); } void pgw_gx_send_ccr(pgw_sess_t *sess, gtp_xact_t *xact, pkbuf_t *gtpbuf, c_uint32_t cc_request_type) { int ret; struct msg *req = NULL; struct avp *avp; struct avp *avpch1, *avpch2; union avp_value val; struct sess_state *sess_data = NULL, *svg; struct session *session = NULL; int new; gtp_message_t *message = NULL; paa_t paa; /* For changing Framed-IPv6-Prefix Length to 128 */ d_assert(sess, return,); d_assert(sess->ipv4 || sess->ipv6, return,); d_assert(gtpbuf, return, ); message = gtpbuf->payload; d_assert(message, return, ); d_trace(3, "[PGW] Credit-Control-Request\n"); /* Create the request */ ret = fd_msg_new(gx_cmd_ccr, MSGFL_ALLOC_ETEID, &req); d_assert(ret == 0, return,); /* Find Diameter Gx Session */ if (sess->gx_sid) { /* Retrieve session by Session-Id */ size_t sidlen = strlen(sess->gx_sid); ret = fd_sess_fromsid_msg((os0_t)sess->gx_sid, sidlen, &session, &new); d_assert(ret == 0, return,); d_assert(new == 0, return,); /* Add Session-Id to the message */ ret = fd_message_session_id_set(req, (os0_t)sess->gx_sid, sidlen); d_assert(ret == 0, return,); /* Save the session associated with the message */ ret = fd_msg_sess_set(req, session); } else { /* Create a new session */ #define GX_APP_SID_OPT "app_gx" ret = fd_msg_new_session(req, (os0_t)GX_APP_SID_OPT, CONSTSTRLEN(GX_APP_SID_OPT)); d_assert(ret == 0, return,); ret = fd_msg_sess_get(fd_g_config->cnf_dict, req, &session, NULL); d_assert(ret == 0, return,); } /* Retrieve session state in this session */ ret = fd_sess_state_retrieve(pgw_gx_reg, session, &sess_data); if (!sess_data) { os0_t sid; size_t sidlen; ret = fd_sess_getsid(session, &sid, &sidlen); d_assert(ret == 0, return,); /* Allocate new session state memory */ sess_data = new_state(sid); d_assert(sess_data, return,); /* Save Session-Id to PGW Session Context */ sess->gx_sid = (c_int8_t *)sess_data->gx_sid; } /* Update session state */ sess_data->sess = sess; sess_data->xact = xact; sess_data->gtpbuf = gtpbuf; sess_data->cc_request_type = cc_request_type; if (cc_request_type == GX_CC_REQUEST_TYPE_INITIAL_REQUEST || cc_request_type == GX_CC_REQUEST_TYPE_EVENT_REQUEST) sess_data->cc_request_number = 0; else sess_data->cc_request_number++; /* Set Origin-Host & Origin-Realm */ ret = fd_msg_add_origin(req, 0); d_assert(ret == 0, return,); /* Set the Destination-Realm AVP */ ret = fd_msg_avp_new(fd_destination_realm, 0, &avp); d_assert(ret == 0, return,); val.os.data = (unsigned char *)(fd_g_config->cnf_diamrlm); val.os.len = strlen(fd_g_config->cnf_diamrlm); ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Set the Auth-Application-Id AVP */ ret = fd_msg_avp_new(fd_auth_application_id, 0, &avp); d_assert(ret == 0, return,); val.i32 = GX_APPLICATION_ID; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Set CC-Request-Type, CC-Request-Number */ ret = fd_msg_avp_new(gx_cc_request_type, 0, &avp); d_assert(ret == 0, return,); val.i32 = sess_data->cc_request_type; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); ret = fd_msg_avp_new(gx_cc_request_number, 0, &avp); d_assert(ret == 0, return,); val.i32 = sess_data->cc_request_number; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Set Subscription-Id */ ret = fd_msg_avp_new(gx_subscription_id, 0, &avp); d_assert(ret == 0, return,); ret = fd_msg_avp_new(gx_subscription_id_type, 0, &avpch1); d_assert(ret == 0, return,); val.i32 = GX_SUBSCRIPTION_ID_TYPE_END_USER_IMSI; ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return,); ret = fd_msg_avp_new(gx_subscription_id_data, 0, &avpch1); d_assert(ret == 0, return,); val.os.data = (c_uint8_t *)sess->imsi_bcd; val.os.len = strlen(sess->imsi_bcd); ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); if (cc_request_type != GX_CC_REQUEST_TYPE_TERMINATION_REQUEST) { /* Set Supported-Features */ ret = fd_msg_avp_new(gx_supported_features, 0, &avp); d_assert(ret == 0, return,); ret = fd_msg_avp_new(gx_feature_list_id, 0, &avpch1); d_assert(ret == 0, return,); val.i32 = 1; ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return,); ret = fd_msg_avp_new(gx_feature_list, 0, &avpch1); d_assert(ret == 0, return,); val.u32 = 0x0000000b; ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Set Network-Request-Support */ ret = fd_msg_avp_new(gx_network_request_support, 0, &avp); d_assert(ret == 0, return,); val.i32 = 1; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Set Framed-IP-Address */ if (sess->ipv4) { ret = fd_msg_avp_new(gx_framed_ip_address, 0, &avp); d_assert(ret == 0, return,); val.os.data = (c_uint8_t*)&sess->ipv4->addr; val.os.len = IPV4_LEN; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); } /* Set Framed-IPv6-Prefix */ if (sess->ipv6) { ret = fd_msg_avp_new(gx_framed_ipv6_prefix, 0, &avp); d_assert(ret == 0, return,); memcpy(&paa, &sess->pdn.paa, PAA_IPV6_LEN); #define FRAMED_IPV6_PREFIX_LENGTH 128 /* from spec document */ paa.len = FRAMED_IPV6_PREFIX_LENGTH; val.os.data = (c_uint8_t*)&paa; val.os.len = PAA_IPV6_LEN; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); } /* Set IP-Can-Type */ ret = fd_msg_avp_new(gx_ip_can_type, 0, &avp); d_assert(ret == 0, return,); val.i32 = GX_IP_CAN_TYPE_3GPP_EPS; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Set RAT-Type */ ret = fd_msg_avp_new(gx_rat_type, 0, &avp); d_assert(ret == 0, return,); val.i32 = GX_RAT_TYPE_EUTRAN; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Set QoS-Information */ if (sess->pdn.ambr.downlink || sess->pdn.ambr.uplink) { ret = fd_msg_avp_new(gx_qos_information, 0, &avp); d_assert(ret == 0, return,); if (sess->pdn.ambr.uplink) { ret = fd_msg_avp_new(gx_apn_aggregate_max_bitrate_ul, 0, &avpch1); d_assert(ret == 0, return,); val.u32 = sess->pdn.ambr.uplink; ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return,); } if (sess->pdn.ambr.downlink) { ret = fd_msg_avp_new(gx_apn_aggregate_max_bitrate_dl, 0, &avpch1); d_assert(ret == 0, return,); val.u32 = sess->pdn.ambr.downlink; ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return,); } ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); } /* Set Default-EPS-Bearer-QoS */ ret = fd_msg_avp_new(gx_default_eps_bearer_qos, 0, &avp); d_assert(ret == 0, return,); ret = fd_msg_avp_new(gx_qos_class_identifier, 0, &avpch1); d_assert(ret == 0, return,); val.u32 = sess->pdn.qos.qci; ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return,); ret = fd_msg_avp_new(gx_allocation_retention_priority, 0, &avpch1); d_assert(ret == 0, return,); ret = fd_msg_avp_new(gx_priority_level, 0, &avpch2); d_assert(ret == 0, return,); val.u32 = sess->pdn.qos.arp.priority_level; ret = fd_msg_avp_setvalue (avpch2, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avpch1, MSG_BRW_LAST_CHILD, avpch2); d_assert(ret == 0, return,); ret = fd_msg_avp_new(gx_pre_emption_capability, 0, &avpch2); d_assert(ret == 0, return,); val.u32 = sess->pdn.qos.arp.pre_emption_capability; ret = fd_msg_avp_setvalue (avpch2, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avpch1, MSG_BRW_LAST_CHILD, avpch2); d_assert(ret == 0, return,); ret = fd_msg_avp_new(gx_pre_emption_vulnerability, 0, &avpch2); d_assert(ret == 0, return,); val.u32 = sess->pdn.qos.arp.pre_emption_vulnerability; ret = fd_msg_avp_setvalue (avpch2, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avpch1, MSG_BRW_LAST_CHILD, avpch2); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Set 3GPP-User-Location-Info */ { struct gx_uli_t { c_uint8_t type; tai_t tai; e_cgi_t e_cgi; } gx_uli; memset(&gx_uli, 0, sizeof(gx_uli)); gx_uli.type = GX_3GPP_USER_LOCATION_INFO_TYPE_TAI_AND_ECGI; memcpy(&gx_uli.tai.plmn_id, &sess->tai.plmn_id, sizeof(sess->tai.plmn_id)); gx_uli.tai.tac = htons(sess->tai.tac); memcpy(&gx_uli.e_cgi.plmn_id, &sess->e_cgi.plmn_id, sizeof(sess->e_cgi.plmn_id)); gx_uli.e_cgi.cell_id = htonl(sess->e_cgi.cell_id); ret = fd_msg_avp_new(gx_3gpp_user_location_info, 0, &avp); d_assert(ret == 0, return,); val.os.data = (c_uint8_t*)&gx_uli; val.os.len = sizeof(gx_uli); ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); } /* Set 3GPP-MS-Timezone */ if (message->create_session_request.ue_time_zone.presence) { ret = fd_msg_avp_new(gx_3gpp_ms_timezone, 0, &avp); d_assert(ret == 0, return,); val.os.data = message->create_session_request.ue_time_zone.data; val.os.len = message->create_session_request.ue_time_zone.len; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); } } /* Set Called-Station-Id */ ret = fd_msg_avp_new(gx_called_station_id, 0, &avp); d_assert(ret == 0, return,); val.os.data = (c_uint8_t*)sess->pdn.apn; val.os.len = strlen(sess->pdn.apn); ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); ret = clock_gettime(CLOCK_REALTIME, &sess_data->ts); /* Keep a pointer to the session data for debug purpose, * in real life we would not need it */ svg = sess_data; /* Store this value in the session */ ret = fd_sess_state_store(pgw_gx_reg, session, &sess_data); d_assert(ret == 0, return,); d_assert(sess_data == NULL,,); /* Send the request */ ret = fd_msg_send(&req, pgw_gx_cca_cb, svg); d_assert(ret == 0,,); /* Increment the counter */ d_assert(pthread_mutex_lock(&fd_logger_self()->stats_lock) == 0,,); fd_logger_self()->stats.nb_sent++; d_assert(pthread_mutex_unlock(&fd_logger_self()->stats_lock) == 0,,); } static void pgw_gx_cca_cb(void *data, struct msg **msg) { status_t rv; int ret; struct sess_state *sess_data = NULL; struct timespec ts; struct session *session; struct avp *avp, *avpch1, *avpch2; struct avp_hdr *hdr; unsigned long dur; int error = 0; int new; event_t e; gtp_xact_t *xact = NULL; pgw_sess_t *sess = NULL; pkbuf_t *gxbuf = NULL, *gtpbuf = NULL; gx_message_t *gx_message = NULL; c_uint16_t gxbuf_len = 0; d_trace(3, "[PGW] Credit-Control-Answer\n"); ret = clock_gettime(CLOCK_REALTIME, &ts); d_assert(ret == 0, return,); /* Search the session, retrieve its data */ ret = fd_msg_sess_get(fd_g_config->cnf_dict, *msg, &session, &new); d_assert(ret == 0, return,); d_assert(new == 0, return, ); ret = fd_sess_state_retrieve(pgw_gx_reg, session, &sess_data); d_assert(ret == 0, return,); d_assert(sess_data && (void *)sess_data == data, return, ); xact = sess_data->xact; d_assert(xact, return, "Null param"); sess = sess_data->sess; d_assert(sess, return, "Null param"); gtpbuf = sess_data->gtpbuf; d_assert(gtpbuf, return, "Null param"); gxbuf_len = sizeof(gx_message_t); d_assert(gxbuf_len < 8192, return, "Not supported size:%d", gxbuf_len); gxbuf = pkbuf_alloc(0, gxbuf_len); d_assert(gxbuf, return, "Null param"); gx_message = gxbuf->payload; d_assert(gx_message, return, "Null param"); /* Set Credit Control Command */ memset(gx_message, 0, gxbuf_len); gx_message->cmd_code = GX_CMD_CODE_CREDIT_CONTROL; /* Value of Result Code */ ret = fd_msg_search_avp(*msg, fd_result_code, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); gx_message->result_code = hdr->avp_value->i32; d_trace(5, " Result Code: %d\n", hdr->avp_value->i32); } else { ret = fd_msg_search_avp(*msg, fd_experimental_result, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_avp_search_avp(avp, fd_experimental_result_code, &avpch1); d_assert(ret == 0, return,); if (avpch1) { ret = fd_msg_avp_hdr(avpch1, &hdr); d_assert(ret == 0, return,); gx_message->result_code = hdr->avp_value->i32; d_trace(5, " Experimental Result Code: %d\n", gx_message->result_code); } } else { d_error("no Result-Code"); error++; } } /* Value of Origin-Host */ ret = fd_msg_search_avp(*msg, fd_origin_host, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); d_trace(5, " From '%.*s'\n", (int)hdr->avp_value->os.len, hdr->avp_value->os.data); } else { d_error("no_Origin-Host"); error++; } /* Value of Origin-Realm */ ret = fd_msg_search_avp(*msg, fd_origin_realm, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); d_trace(5, " ('%.*s')\n", (int)hdr->avp_value->os.len, hdr->avp_value->os.data); } else { d_error("no_Origin-Realm"); error++; } if (gx_message->result_code != ER_DIAMETER_SUCCESS) { d_warn("ERROR DIAMETER Result Code(%d)", gx_message->result_code); goto out; } ret = fd_msg_search_avp(*msg, gx_cc_request_type, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); gx_message->cc_request_type = hdr->avp_value->i32; } else { d_error("no_CC-Request-Type"); error++; } ret = fd_msg_search_avp(*msg, gx_qos_information, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_avp_search_avp(avp, gx_apn_aggregate_max_bitrate_ul, &avpch1); d_assert(ret == 0, return,); if (avpch1) { ret = fd_msg_avp_hdr(avpch1, &hdr); d_assert(ret == 0, return,); gx_message->pdn.ambr.uplink = hdr->avp_value->u32; } ret = fd_avp_search_avp(avp, gx_apn_aggregate_max_bitrate_dl, &avpch1); d_assert(ret == 0, return,); if (avpch1) { ret = fd_msg_avp_hdr(avpch1, &hdr); d_assert(ret == 0, return,); gx_message->pdn.ambr.downlink = hdr->avp_value->u32; } } ret = fd_msg_search_avp(*msg, gx_default_eps_bearer_qos, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_avp_search_avp(avp, gx_qos_class_identifier, &avpch1); d_assert(ret == 0, return,); if (avpch1) { ret = fd_msg_avp_hdr(avpch1, &hdr); d_assert(ret == 0, return,); gx_message->pdn.qos.qci = hdr->avp_value->u32; } ret = fd_avp_search_avp(avp, gx_allocation_retention_priority, &avpch1); d_assert(ret == 0, return,); if (avpch1) { ret = fd_avp_search_avp(avpch1, gx_priority_level, &avpch2); d_assert(ret == 0, return,); if (avpch2) { ret = fd_msg_avp_hdr(avpch2, &hdr); d_assert(ret == 0, return,); gx_message->pdn.qos.arp.priority_level = hdr->avp_value->u32; } ret = fd_avp_search_avp(avpch1, gx_pre_emption_capability, &avpch2); d_assert(ret == 0, return,); if (avpch2) { ret = fd_msg_avp_hdr(avpch2, &hdr); d_assert(ret == 0, return,); gx_message->pdn.qos.arp.pre_emption_capability = hdr->avp_value->u32; } ret = fd_avp_search_avp(avpch1, gx_pre_emption_vulnerability, &avpch2); d_assert(ret == 0, return,); if (avpch2) { ret = fd_msg_avp_hdr(avpch2, &hdr); d_assert(ret == 0, return,); gx_message->pdn.qos.arp.pre_emption_vulnerability = hdr->avp_value->u32; } } } ret = fd_msg_browse(*msg, MSG_BRW_FIRST_CHILD, &avp, NULL); d_assert(ret == 0, return,); while(avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); switch(hdr->avp_code) { case AC_SESSION_ID: case AC_ORIGIN_HOST: case AC_ORIGIN_REALM: case AC_DESTINATION_REALM: case AC_RESULT_CODE: case AC_ROUTE_RECORD: case AC_PROXY_INFO: case AC_AUTH_APPLICATION_ID: break; case GX_AVP_CODE_CC_REQUEST_TYPE: case GX_AVP_CODE_CC_REQUEST_NUMBER: case GX_AVP_CODE_SUPPORTED_FEATURES: break; case GX_AVP_CODE_QOS_INFORMATION: case GX_AVP_CODE_DEFAULT_EPS_BEARER_QOS: break; case GX_AVP_CODE_CHARGING_RULE_INSTALL: { ret = fd_msg_browse(avp, MSG_BRW_FIRST_CHILD, &avpch1, NULL); d_assert(ret == 0, return,); while(avpch1) { ret = fd_msg_avp_hdr(avpch1, &hdr); d_assert(ret == 0, return,); switch(hdr->avp_code) { case GX_AVP_CODE_CHARGING_RULE_DEFINITION: { pcc_rule_t *pcc_rule = &gx_message->pcc_rule [gx_message->num_of_pcc_rule]; rv = decode_pcc_rule_definition( pcc_rule, avpch1, &error); d_assert(rv == CORE_OK, return,); pcc_rule->type = PCC_RULE_TYPE_INSTALL; gx_message->num_of_pcc_rule++; break; } default: { d_error("Not supported(%d)", hdr->avp_code); break; } } fd_msg_browse(avpch1, MSG_BRW_NEXT, &avpch1, NULL); } break; } default: { d_warn("Not supported(%d)", hdr->avp_code); break; } } fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL); } out: if (!error) { event_set(&e, PGW_EVT_GX_MESSAGE); event_set_param1(&e, (c_uintptr_t)sess->index); event_set_param2(&e, (c_uintptr_t)gxbuf); event_set_param3(&e, (c_uintptr_t)xact->index); event_set_param4(&e, (c_uintptr_t)gtpbuf); pgw_event_send(&e); } else { gx_message_free(gx_message); pkbuf_free(gxbuf); pkbuf_free(gtpbuf); } /* Free the message */ d_assert(pthread_mutex_lock(&fd_logger_self()->stats_lock) == 0,,); dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) + ((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000); if (fd_logger_self()->stats.nb_recv) { /* Ponderate in the avg */ fd_logger_self()->stats.avg = (fd_logger_self()->stats.avg * fd_logger_self()->stats.nb_recv + dur) / (fd_logger_self()->stats.nb_recv + 1); /* Min, max */ if (dur < fd_logger_self()->stats.shortest) fd_logger_self()->stats.shortest = dur; if (dur > fd_logger_self()->stats.longest) fd_logger_self()->stats.longest = dur; } else { fd_logger_self()->stats.shortest = dur; fd_logger_self()->stats.longest = dur; fd_logger_self()->stats.avg = dur; } if (error) fd_logger_self()->stats.nb_errs++; else fd_logger_self()->stats.nb_recv++; d_assert(pthread_mutex_unlock(&fd_logger_self()->stats_lock) == 0,,); /* Display how long it took */ if (ts.tv_nsec > sess_data->ts.tv_nsec) d_trace(15, "in %d.%06ld sec\n", (int)(ts.tv_sec - sess_data->ts.tv_sec), (long)(ts.tv_nsec - sess_data->ts.tv_nsec) / 1000); else d_trace(15, "in %d.%06ld sec\n", (int)(ts.tv_sec + 1 - sess_data->ts.tv_sec), (long)(1000000000 + ts.tv_nsec - sess_data->ts.tv_nsec) / 1000); if (sess_data->cc_request_type != GX_CC_REQUEST_TYPE_TERMINATION_REQUEST) { ret = fd_sess_state_store(pgw_gx_reg, session, &sess_data); d_assert(ret == 0, return,); d_assert(sess_data == NULL, return,); } else { state_cleanup(sess_data, NULL, NULL); } ret = fd_msg_free(*msg); d_assert(ret == 0,,); *msg = NULL; return; } static int pgw_gx_fb_cb(struct msg **msg, struct avp *avp, struct session *sess, void *opaque, enum disp_action *act) { /* This CB should never be called */ d_warn("Unexpected message received!"); return ENOTSUP; } static int pgw_gx_rar_cb( struct msg **msg, struct avp *avp, struct session *session, void *opaque, enum disp_action *act) { status_t rv; int ret; struct msg *ans, *qry; struct avp *avpch1; struct avp_hdr *hdr; union avp_value val; struct sess_state *sess_data = NULL; event_t e; c_uint16_t gxbuf_len = 0; pkbuf_t *gxbuf = NULL; pgw_sess_t *sess = NULL; gx_message_t *gx_message = NULL; c_uint32_t result_code = FD_DIAMETER_UNKNOWN_SESSION_ID; d_assert(msg, return EINVAL,); d_trace(3, "[PGW] Re-Auth-Request\n"); gxbuf_len = sizeof(gx_message_t); d_assert(gxbuf_len < 8192, return EINVAL, "Not supported size:%d", gxbuf_len); gxbuf = pkbuf_alloc(0, gxbuf_len); d_assert(gxbuf, return EINVAL, "Null param"); gx_message = gxbuf->payload; d_assert(gx_message, return EINVAL, "Null param"); /* Set Credit Control Command */ memset(gx_message, 0, gxbuf_len); gx_message->cmd_code = GX_CMD_RE_AUTH; /* Create answer header */ qry = *msg; ret = fd_msg_new_answer_from_req(fd_g_config->cnf_dict, msg, 0); d_assert(ret == 0, return EINVAL,); ans = *msg; ret = fd_sess_state_retrieve(pgw_gx_reg, session, &sess_data); d_assert(ret == 0, return EINVAL,); if (!sess_data) { d_error("No Session Data"); goto out; } /* Get Session Information */ sess = sess_data->sess; d_assert(sess, return EINVAL,); ret = fd_msg_browse(qry, MSG_BRW_FIRST_CHILD, &avp, NULL); d_assert(ret == 0, return EINVAL,); while(avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return EINVAL,); switch(hdr->avp_code) { case AC_SESSION_ID: case AC_ORIGIN_HOST: case AC_ORIGIN_REALM: case AC_DESTINATION_REALM: case AC_DESTINATION_HOST: case AC_ROUTE_RECORD: case AC_PROXY_INFO: case AC_AUTH_APPLICATION_ID: break; case GX_AVP_CODE_RE_AUTH_REQUEST_TYPE: break; case GX_AVP_CODE_CHARGING_RULE_INSTALL: { ret = fd_msg_browse(avp, MSG_BRW_FIRST_CHILD, &avpch1, NULL); d_assert(ret == 0, return EINVAL,); while(avpch1) { ret = fd_msg_avp_hdr(avpch1, &hdr); d_assert(ret == 0, return EINVAL,); switch(hdr->avp_code) { case GX_AVP_CODE_CHARGING_RULE_DEFINITION: { pcc_rule_t *pcc_rule = &gx_message->pcc_rule [gx_message->num_of_pcc_rule]; rv = decode_pcc_rule_definition( pcc_rule, avpch1, NULL); d_assert(rv == CORE_OK, return EINVAL,); pcc_rule->type = PCC_RULE_TYPE_INSTALL; gx_message->num_of_pcc_rule++; break; } default: { d_error("Not supported(%d)", hdr->avp_code); break; } } fd_msg_browse(avpch1, MSG_BRW_NEXT, &avpch1, NULL); } break; } case GX_AVP_CODE_CHARGING_RULE_REMOVE: { ret = fd_msg_browse(avp, MSG_BRW_FIRST_CHILD, &avpch1, NULL); d_assert(ret == 0, return EINVAL,); while(avpch1) { ret = fd_msg_avp_hdr(avpch1, &hdr); d_assert(ret == 0, return EINVAL,); switch(hdr->avp_code) { case GX_AVP_CODE_CHARGING_RULE_NAME: { pcc_rule_t *pcc_rule = &gx_message->pcc_rule [gx_message->num_of_pcc_rule]; pcc_rule->name = core_strdup((char*)hdr->avp_value->os.data); d_assert(pcc_rule->name, return CORE_ERROR,); pcc_rule->type = PCC_RULE_TYPE_REMOVE; gx_message->num_of_pcc_rule++; break; } default: { d_error("Not supported(%d)", hdr->avp_code); break; } } fd_msg_browse(avpch1, MSG_BRW_NEXT, &avpch1, NULL); } break; } default: { d_warn("Not supported(%d)", hdr->avp_code); break; } } fd_msg_browse(avp, MSG_BRW_NEXT, &avp, NULL); } /* Send Gx Event to PGW State Machine */ event_set(&e, PGW_EVT_GX_MESSAGE); event_set_param1(&e, (c_uintptr_t)sess->index); event_set_param2(&e, (c_uintptr_t)gxbuf); pgw_event_send(&e); /* Set the Auth-Application-Id AVP */ ret = fd_msg_avp_new(fd_auth_application_id, 0, &avp); d_assert(ret == 0, return EINVAL,); val.i32 = GX_APPLICATION_ID; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return EINVAL,); /* Set the Origin-Host, Origin-Realm, andResult-Code AVPs */ ret = fd_msg_rescode_set(ans, "DIAMETER_SUCCESS", NULL, NULL, 1); d_assert(ret == 0, return EINVAL,); /* Store this value in the session */ ret = fd_sess_state_store(pgw_gx_reg, session, &sess_data); d_assert(ret == 0, return EINVAL,); d_assert(sess_data == NULL,,); /* Send the answer */ ret = fd_msg_send(msg, NULL, NULL); d_assert(ret == 0,,); d_trace(3, "[PGW] Re-Auth-Answer\n"); /* Add this value to the stats */ d_assert(pthread_mutex_lock(&fd_logger_self()->stats_lock) == 0,,); fd_logger_self()->stats.nb_echoed++; d_assert(pthread_mutex_unlock(&fd_logger_self()->stats_lock) == 0,,); return 0; out: if (result_code == FD_DIAMETER_UNKNOWN_SESSION_ID) { ret = fd_msg_rescode_set(ans, "DIAMETER_UNKNOWN_SESSION_ID", NULL, NULL, 1); d_assert(ret == 0, return EINVAL,); } else { ret = fd_message_experimental_rescode_set(ans, result_code); d_assert(ret == 0, return EINVAL,); } /* Store this value in the session */ ret = fd_sess_state_store(pgw_gx_reg, session, &sess_data); d_assert(ret == 0, return EINVAL,); d_assert(sess_data == NULL,,); ret = fd_msg_send(msg, NULL, NULL); d_assert(ret == 0,,); gx_message_free(gx_message); pkbuf_free(gxbuf); return 0; } status_t pgw_fd_init(void) { int ret; struct disp_when data; pool_init(&pgw_gx_sess_pool, MAX_POOL_OF_DIAMETER_SESS); ret = fd_init(FD_MODE_CLIENT|FD_MODE_SERVER, pgw_self()->fd_conf_path, pgw_self()->fd_config); d_assert(ret == 0, return CORE_ERROR,); /* Install objects definitions for this application */ ret = gx_dict_init(); d_assert(ret == 0, return CORE_ERROR,); /* Create handler for sessions */ ret = fd_sess_handler_create(&pgw_gx_reg, state_cleanup, NULL, NULL); d_assert(ret == 0, return CORE_ERROR,); memset(&data, 0, sizeof(data)); data.app = gx_application; ret = fd_disp_register(pgw_gx_fb_cb, DISP_HOW_APPID, &data, NULL, &hdl_gx_fb); d_assert(ret == 0, return CORE_ERROR,); data.command = gx_cmd_rar; ret = fd_disp_register(pgw_gx_rar_cb, DISP_HOW_CC, &data, NULL, &hdl_gx_rar); d_assert(ret == 0, return CORE_ERROR,); /* Advertise the support for the application in the peer */ ret = fd_disp_app_support(gx_application, fd_vendor, 1, 0); return CORE_OK; } void pgw_fd_final(void) { int ret; ret = fd_sess_handler_destroy(&pgw_gx_reg, NULL); d_assert(ret == 0,,); if (hdl_gx_fb) (void) fd_disp_unregister(&hdl_gx_fb, NULL); if (hdl_gx_rar) (void) fd_disp_unregister(&hdl_gx_rar, NULL); fd_final(); if (pool_used(&pgw_gx_sess_pool)) d_error("%d not freed in pgw_gx_sess_pool[%d] of GX-SM", pool_used(&pgw_gx_sess_pool), pool_size(&pgw_gx_sess_pool)); d_trace(9, "%d not freed in pgw_gx_sess_pool[%d] of GX-SM\n", pool_used(&pgw_gx_sess_pool), pool_size(&pgw_gx_sess_pool)); pool_final(&pgw_gx_sess_pool); } static status_t decode_pcc_rule_definition( pcc_rule_t *pcc_rule, struct avp *avpch1, int *perror) { int ret = 0, error = 0; struct avp *avpch2, *avpch3, *avpch4; struct avp_hdr *hdr; d_assert(pcc_rule, return CORE_ERROR,); d_assert(avpch1, return CORE_ERROR,); ret = fd_msg_browse(avpch1, MSG_BRW_FIRST_CHILD, &avpch2, NULL); d_assert(ret == 0, return CORE_ERROR,); while(avpch2) { ret = fd_msg_avp_hdr(avpch2, &hdr); d_assert(ret == 0, return CORE_ERROR,); switch(hdr->avp_code) { case GX_AVP_CODE_CHARGING_RULE_NAME: { if (pcc_rule->name) { d_error("PCC Rule Name has already been defined"); CORE_FREE(pcc_rule->name); } pcc_rule->name = core_strdup((char*)hdr->avp_value->os.data); d_assert(pcc_rule->name, return CORE_ERROR,); break; } case GX_AVP_CODE_FLOW_INFORMATION: { flow_t *flow = &pcc_rule->flow[pcc_rule->num_of_flow]; ret = fd_avp_search_avp(avpch2, gx_flow_direction, &avpch3); d_assert(ret == 0, return CORE_ERROR,); if (avpch3) { ret = fd_msg_avp_hdr( avpch3, &hdr); d_assert(ret == 0, return CORE_ERROR,); flow->direction = hdr->avp_value->i32; } ret = fd_avp_search_avp(avpch2, gx_flow_description, &avpch3); d_assert(ret == 0, return CORE_ERROR,); if (avpch3) { ret = fd_msg_avp_hdr(avpch3, &hdr); d_assert(ret == 0, return CORE_ERROR,); flow->description = core_malloc(hdr->avp_value->os.len+1); core_cpystrn(flow->description, (char*)hdr->avp_value->os.data, hdr->avp_value->os.len+1); } pcc_rule->num_of_flow++; break; } case GX_AVP_CODE_FLOW_STATUS: { pcc_rule->flow_status = hdr->avp_value->i32; break; } case GX_AVP_CODE_QOS_INFORMATION: { ret = fd_avp_search_avp(avpch2, gx_qos_class_identifier, &avpch3); d_assert(ret == 0, return CORE_ERROR,); if (avpch3) { ret = fd_msg_avp_hdr(avpch3, &hdr); d_assert(ret == 0, return CORE_ERROR,); pcc_rule->qos.qci = hdr->avp_value->u32; } else { d_error("no_QCI"); error++; } ret = fd_avp_search_avp(avpch2, gx_allocation_retention_priority, &avpch3); d_assert(ret == 0, return CORE_ERROR,); if (avpch3) { ret = fd_avp_search_avp(avpch3, gx_priority_level, &avpch4); d_assert(ret == 0, return CORE_ERROR,); if (avpch4) { ret = fd_msg_avp_hdr(avpch4, &hdr); d_assert(ret == 0, return CORE_ERROR,); pcc_rule->qos.arp.priority_level = hdr->avp_value->u32; } else { d_error("no_Priority-Level"); error++; } ret = fd_avp_search_avp(avpch3, gx_pre_emption_capability, &avpch4); d_assert(ret == 0, return CORE_ERROR,); if (avpch4) { ret = fd_msg_avp_hdr(avpch4, &hdr); d_assert(ret == 0, return CORE_ERROR,); pcc_rule->qos.arp.pre_emption_capability = hdr->avp_value->u32; } else { d_error("no_Preemption-Capability"); error++; } ret = fd_avp_search_avp(avpch3, gx_pre_emption_vulnerability, &avpch4); d_assert(ret == 0, return CORE_ERROR,); if (avpch4) { ret = fd_msg_avp_hdr(avpch4, &hdr); d_assert(ret == 0, return CORE_ERROR,); pcc_rule->qos.arp.pre_emption_vulnerability = hdr->avp_value->u32; } else { d_error("no_Preemption-Vulnerability"); error++; } } else { d_error("no_ARP"); error++; } ret = fd_avp_search_avp(avpch2, gx_max_requested_bandwidth_ul, &avpch3); d_assert(ret == 0, return CORE_ERROR,); if (avpch3) { ret = fd_msg_avp_hdr(avpch3, &hdr); d_assert(ret == 0, return CORE_ERROR,); pcc_rule->qos.mbr.uplink = hdr->avp_value->u32; } ret = fd_avp_search_avp(avpch2, gx_max_requested_bandwidth_dl, &avpch3); d_assert(ret == 0, return CORE_ERROR,); if (avpch3) { ret = fd_msg_avp_hdr(avpch3, &hdr); d_assert(ret == 0, return CORE_ERROR,); pcc_rule->qos.mbr.downlink = hdr->avp_value->u32; } ret = fd_avp_search_avp(avpch2, gx_guaranteed_bitrate_ul, &avpch3); d_assert(ret == 0, return CORE_ERROR,); if (avpch3) { ret = fd_msg_avp_hdr(avpch3, &hdr); d_assert(ret == 0, return CORE_ERROR,); pcc_rule->qos.gbr.uplink = hdr->avp_value->u32; } ret = fd_avp_search_avp(avpch2, gx_guaranteed_bitrate_dl, &avpch3); d_assert(ret == 0, return CORE_ERROR,); if (avpch3) { ret = fd_msg_avp_hdr(avpch3, &hdr); d_assert(ret == 0, return CORE_ERROR,); pcc_rule->qos.gbr.downlink = hdr->avp_value->u32; } break; } case GX_AVP_CODE_PRECEDENCE: { pcc_rule->precedence = hdr->avp_value->i32; break; } default: { d_error("Not implemented(%d)", hdr->avp_code); break; } } fd_msg_browse(avpch2, MSG_BRW_NEXT, &avpch2, NULL); } if (perror) *perror = error; return CORE_OK; } nextepc-0.3.10/src/pgw/pgw_fd_path.h000066400000000000000000000007511333553357400172760ustar00rootroot00000000000000#ifndef __PGW_FD_PATH_H__ #define __PGW_FD_PATH_H__ #include "core_errno.h" #include "pgw_context.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _gtp_xact_t gtp_xact_t; CORE_DECLARE(status_t) pgw_fd_init(void); CORE_DECLARE(void) pgw_fd_final(void); CORE_DECLARE(void) pgw_gx_send_ccr(pgw_sess_t *sess, gtp_xact_t *xact, pkbuf_t *gtpbuf, c_uint32_t cc_request_type); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __PGW_FD_PATH_H__ */ nextepc-0.3.10/src/pgw/pgw_gtp_path.c000066400000000000000000000363161333553357400175000ustar00rootroot00000000000000#define TRACE_MODULE _pgw_gtp_path #include "core_debug.h" #include "core_pkbuf.h" #include "3gpp_types.h" #include "gtp/gtp_node.h" #include "gtp/gtp_path.h" #include "common/context.h" #include "pgw_context.h" #include "pgw_event.h" #include "pgw_gtp_path.h" #include "pgw_ipfw.h" #define PGW_GTP_HANDLED 1 c_uint16_t in_cksum(c_uint16_t *addr, int len); static status_t pgw_gtp_handle_multicast(pkbuf_t *recvbuf); static status_t pgw_gtp_handle_slaac(pgw_sess_t *sess, pkbuf_t *recvbuf); static status_t pgw_gtp_send_to_bearer(pgw_bearer_t *bearer, pkbuf_t *sendbuf); static status_t pgw_gtp_send_router_advertisement( pgw_sess_t *sess, c_uint8_t *ip6_dst); static int _gtpv1_tun_recv_cb(sock_id sock, void *data) { pkbuf_t *recvbuf = NULL; int n; status_t rv; pgw_bearer_t *bearer = NULL; recvbuf = pkbuf_alloc(GTPV1U_HEADER_LEN, MAX_SDU_LEN); d_assert(recvbuf, return -1, "pkbuf_alloc error"); n = sock_read(sock, recvbuf->payload, recvbuf->len); if (n <= 0) { pkbuf_free(recvbuf); return -1; } recvbuf->len = n; d_trace(50, "[TUN] RECV : "); d_trace_hex(50, recvbuf->payload, recvbuf->len); /* Find the bearer by packet filter */ bearer = pgw_bearer_find_by_packet(recvbuf); if (bearer) { /* Unicast */ rv = pgw_gtp_send_to_bearer(bearer, recvbuf); d_assert(rv == CORE_OK,, "pgw_gtp_send_to_bearer() failed"); } else { if (context_self()->parameter.multicast) { rv = pgw_gtp_handle_multicast(recvbuf); d_assert(rv != CORE_ERROR,, "pgw_gtp_handle_multicast() failed"); } } pkbuf_free(recvbuf); return 0; } static int _gtpv2_c_recv_cb(sock_id sock, void *data) { event_t e; status_t rv; pkbuf_t *pkbuf = NULL; d_assert(sock, return -1, "Null param"); rv = gtp_recv(sock, &pkbuf); if (rv != CORE_OK) { if (errno == EAGAIN) return 0; return -1; } event_set(&e, PGW_EVT_S5C_MESSAGE); event_set_param1(&e, (c_uintptr_t)pkbuf); rv = pgw_event_send(&e); if (rv != CORE_OK) { d_error("pgw_event_send error"); pkbuf_free(pkbuf); return 0; } return 0; } static int _gtpv1_u_recv_cb(sock_id sock, void *data) { status_t rv; pkbuf_t *pkbuf = NULL; c_uint32_t size = GTPV1U_HEADER_LEN; gtp_header_t *gtp_h = NULL; struct ip *ip_h = NULL; c_uint32_t teid; pgw_bearer_t *bearer = NULL; pgw_sess_t *sess = NULL; pgw_subnet_t *subnet = NULL; pgw_dev_t *dev = NULL; d_assert(sock, return -1, "Null param"); rv = gtp_recv(sock, &pkbuf); if (rv != CORE_OK) { if (errno == EAGAIN) return 0; return -1; } d_assert(pkbuf, return 0,); d_assert(pkbuf->payload, goto cleanup,); d_trace(50, "[PGW] RECV : "); d_trace_hex(50, pkbuf->payload, pkbuf->len); gtp_h = pkbuf->payload; if (gtp_h->flags & GTPU_FLAGS_S) size += 4; teid = ntohl(gtp_h->teid); d_trace(3, "[PGW] RECV GPU-U from SGW : TEID[0x%x]\n", teid); /* Remove GTP header and send packets to TUN interface */ d_assert(pkbuf_header(pkbuf, -size) == CORE_OK, goto cleanup,); ip_h = pkbuf->payload; d_assert(ip_h, goto cleanup,); bearer = pgw_bearer_find_by_pgw_s5u_teid(teid); d_assert(bearer, goto cleanup,); sess = bearer->sess; d_assert(sess, goto cleanup,); if (ip_h->ip_v == 4 && sess->ipv4) subnet = sess->ipv4->subnet; else if (ip_h->ip_v == 6 && sess->ipv6) subnet = sess->ipv6->subnet; if (!subnet) { d_trace_hex(9, pkbuf->payload, pkbuf->len); d_trace(9, "[DROP] Cannot find subnet V:%d, IPv4:%p, IPv6:%p\n", ip_h->ip_v, sess->ipv4, sess->ipv6); goto cleanup; } /* Check IPv6 */ if (context_self()->parameter.no_slaac == 0 && ip_h->ip_v == 6) { rv = pgw_gtp_handle_slaac(sess, pkbuf); if (rv == PGW_GTP_HANDLED) { pkbuf_free(pkbuf); return 0; } d_assert(rv == CORE_OK,, "pgw_gtp_handle_slaac() failed"); } dev = subnet->dev; d_assert(dev, goto cleanup,); if (sock_write(dev->sock, pkbuf->payload, pkbuf->len) <= 0) d_error("sock_write() failed"); cleanup: pkbuf_free(pkbuf); return 0; } status_t pgw_gtp_open() { status_t rv; pgw_dev_t *dev = NULL; pgw_subnet_t *subnet = NULL; int rc; rv = gtp_server_list(&pgw_self()->gtpc_list, _gtpv2_c_recv_cb); d_assert(rv == CORE_OK, return CORE_ERROR,); rv = gtp_server_list(&pgw_self()->gtpc_list6, _gtpv2_c_recv_cb); d_assert(rv == CORE_OK, return CORE_ERROR,); pgw_self()->gtpc_sock = gtp_local_sock_first(&pgw_self()->gtpc_list); pgw_self()->gtpc_sock6 = gtp_local_sock_first(&pgw_self()->gtpc_list6); pgw_self()->gtpc_addr = gtp_local_addr_first(&pgw_self()->gtpc_list); pgw_self()->gtpc_addr6 = gtp_local_addr_first(&pgw_self()->gtpc_list6); d_assert(pgw_self()->gtpc_addr || pgw_self()->gtpc_addr6, return CORE_ERROR, "No GTP Server"); rv = gtp_server_list(&pgw_self()->gtpu_list, _gtpv1_u_recv_cb); d_assert(rv == CORE_OK, return CORE_ERROR,); rv = gtp_server_list(&pgw_self()->gtpu_list6, _gtpv1_u_recv_cb); d_assert(rv == CORE_OK, return CORE_ERROR,); pgw_self()->gtpu_sock = gtp_local_sock_first(&pgw_self()->gtpu_list); pgw_self()->gtpu_sock6 = gtp_local_sock_first(&pgw_self()->gtpu_list6); pgw_self()->gtpu_addr = gtp_local_addr_first(&pgw_self()->gtpu_list); pgw_self()->gtpu_addr6 = gtp_local_addr_first(&pgw_self()->gtpu_list6); d_assert(pgw_self()->gtpu_addr || pgw_self()->gtpu_addr6, return CORE_ERROR, "No GTP Server"); /* NOTE : tun device can be created via following command. * * $ sudo ip tuntap add name pgwtun mode tun * * Also, before running pgw, assign the one IP from IP pool of UE * to pgwtun. The IP should not be assigned to UE * * $ sudo ifconfig pgwtun 45.45.0.1/16 up * */ /* Open Tun interface */ for (dev = pgw_dev_first(); dev; dev = pgw_dev_next(dev)) { rc = tun_open(&dev->sock, (char *)dev->ifname, 0); if (rc != 0) { d_error("tun_open(dev:%s) failed", dev->ifname); return CORE_ERROR; } rc = sock_register(dev->sock, _gtpv1_tun_recv_cb, NULL); if (rc != 0) { d_error("sock_register(dev:%s) failed", dev->ifname); sock_delete(dev->sock); return CORE_ERROR; } } /* * On Linux, it is possible to create a persistent tun/tap * interface which will continue to exist even if nextepc quit, * although this is normally not required. * It can be useful to set up a tun/tap interface owned * by a non-root user, so nextepc can be started without * needing any root privileges at all. */ /* Set P-to-P IP address with Netmask * Note that Linux will skip this configuration */ for (subnet = pgw_subnet_first(); subnet; subnet = pgw_subnet_next(subnet)) { d_assert(subnet->dev, return CORE_ERROR,); rc = tun_set_ip(subnet->dev->sock, &subnet->gw, &subnet->sub); if (rc != 0) { d_error("tun_set_ip(dev:%s) failed", subnet->dev->ifname); return CORE_ERROR; } } /* Link-Local Address for PGW_TUN */ for (dev = pgw_dev_first(); dev; dev = pgw_dev_next(dev)) dev->link_local_addr = core_link_local_addr_by_dev(dev->ifname); return CORE_OK; } status_t pgw_gtp_close() { pgw_dev_t *dev = NULL; sock_delete_list(&pgw_self()->gtpc_list); sock_delete_list(&pgw_self()->gtpc_list6); sock_delete_list(&pgw_self()->gtpu_list); sock_delete_list(&pgw_self()->gtpu_list6); for (dev = pgw_dev_first(); dev; dev = pgw_dev_next(dev)) sock_delete(dev->sock); return CORE_OK; } static status_t pgw_gtp_handle_multicast(pkbuf_t *recvbuf) { status_t rv; struct ip *ip_h = NULL; struct ip6_hdr *ip6_h = NULL; ip_h = (struct ip *)recvbuf->payload; if (ip_h->ip_v == 6) { #if COMPILE_ERROR_IN_MAC_OS_X /* Compiler error in Mac OS X platform */ ip6_h = (struct ip6_hdr *)recvbuf->payload; if (IN6_IS_ADDR_MULTICAST(&ip6_h->ip6_dst)) #else struct in6_addr ip6_dst; ip6_h = (struct ip6_hdr *)recvbuf->payload; memcpy(&ip6_dst, &ip6_h->ip6_dst, sizeof(struct in6_addr)); if (IN6_IS_ADDR_MULTICAST(&ip6_dst)) #endif { hash_index_t *hi = NULL; /* IPv6 Multicast */ for (hi = pgw_sess_first(); hi; hi = pgw_sess_next(hi)) { pgw_sess_t *sess = pgw_sess_this(hi); d_assert(sess, return CORE_ERROR,); if (sess->ipv6) { /* PDN IPv6 is avaiable */ pgw_bearer_t *bearer = pgw_default_bearer_in_sess(sess); d_assert(bearer, return CORE_ERROR,); rv = pgw_gtp_send_to_bearer(bearer, recvbuf); d_assert(rv == CORE_OK,, "pgw_gtp_send_to_bearer failed"); return PGW_GTP_HANDLED; } } } } return CORE_OK; } static status_t pgw_gtp_handle_slaac(pgw_sess_t *sess, pkbuf_t *recvbuf) { status_t rv; struct ip *ip_h = NULL; d_assert(sess, return CORE_ERROR,); d_assert(recvbuf, return CORE_ERROR,); d_assert(recvbuf->payload, return CORE_ERROR,); ip_h = (struct ip *)recvbuf->payload; if (ip_h->ip_v == 6) { struct ip6_hdr *ip6_h = (struct ip6_hdr *)recvbuf->payload; if (ip6_h->ip6_nxt == IPPROTO_ICMPV6) { struct icmp6_hdr *icmp_h = (struct icmp6_hdr *)(recvbuf->payload + sizeof(struct ip6_hdr)); if (icmp_h->icmp6_type == ND_ROUTER_SOLICIT) { d_trace(5, "[PGW] Router Solict\n"); if (sess->ipv6) { rv = pgw_gtp_send_router_advertisement( sess, ip6_h->ip6_src.s6_addr); d_assert(rv == CORE_OK,,"send router advertisement failed"); } return PGW_GTP_HANDLED; } } } return CORE_OK; } static status_t pgw_gtp_send_to_bearer(pgw_bearer_t *bearer, pkbuf_t *sendbuf) { char buf[CORE_ADDRSTRLEN]; status_t rv; gtp_header_t *gtp_h = NULL; d_assert(bearer, pkbuf_free(sendbuf); return CORE_ERROR,); d_assert(bearer->gnode, pkbuf_free(sendbuf); return CORE_ERROR,); d_assert(bearer->gnode->sock, pkbuf_free(sendbuf); return CORE_ERROR,); /* Add GTP-U header */ rv = pkbuf_header(sendbuf, GTPV1U_HEADER_LEN); if (rv != CORE_OK) { d_error("pkbuf_header error"); pkbuf_free(sendbuf); return CORE_ERROR; } gtp_h = (gtp_header_t *)sendbuf->payload; /* Bits 8 7 6 5 4 3 2 1 * +--+--+--+--+--+--+--+--+ * |version |PT| 1| E| S|PN| * +--+--+--+--+--+--+--+--+ * 0 0 1 1 0 0 0 0 */ gtp_h->flags = 0x30; gtp_h->type = GTPU_MSGTYPE_GPDU; gtp_h->length = htons(sendbuf->len - GTPV1U_HEADER_LEN); gtp_h->teid = htonl(bearer->sgw_s5u_teid); /* Send to SGW */ d_trace(50, "[PGW] SEND : "); d_trace_hex(50, sendbuf->payload, sendbuf->len); d_trace(3, "[PGW] SEND GPU-U to SGW[%s] : TEID[0x%x]\n", CORE_ADDR(sock_remote_addr(bearer->gnode->sock), buf), bearer->sgw_s5u_teid); rv = gtp_send(bearer->gnode, sendbuf); return rv; } static status_t pgw_gtp_send_router_advertisement( pgw_sess_t *sess, c_uint8_t *ip6_dst) { status_t rv; pkbuf_t *pkbuf = NULL; pgw_bearer_t *bearer = NULL; pgw_ue_ip_t *ue_ip = NULL; pgw_subnet_t *subnet = NULL; pgw_dev_t *dev = NULL; ipsubnet_t src_ipsub; c_uint16_t plen = 0; c_uint8_t nxt = 0; c_uint8_t *p = NULL; struct ip6_hdr *ip6_h = NULL; struct nd_router_advert *advert_h = NULL; struct nd_opt_prefix_info *prefix = NULL; d_assert(sess, return CORE_ERROR,); bearer = pgw_default_bearer_in_sess(sess); d_assert(bearer, return CORE_ERROR,); ue_ip = sess->ipv6; d_assert(ue_ip, return CORE_ERROR,); subnet = ue_ip->subnet; d_assert(subnet, return CORE_ERROR,); dev = subnet->dev; d_assert(dev, return CORE_ERROR,); pkbuf = pkbuf_alloc(GTPV1U_HEADER_LEN, 200); d_assert(pkbuf, return CORE_ERROR,); pkbuf->len = sizeof *ip6_h + sizeof *advert_h + sizeof *prefix; memset(pkbuf->payload, 0, pkbuf->len); p = (c_uint8_t *)pkbuf->payload; ip6_h = (struct ip6_hdr *)p; advert_h = (struct nd_router_advert *)((c_uint8_t *)ip6_h + sizeof *ip6_h); prefix = (struct nd_opt_prefix_info *) ((c_uint8_t*)advert_h + sizeof *advert_h); rv = core_ipsubnet(&src_ipsub, "fe80::1", NULL); d_assert(rv == CORE_OK, return CORE_ERROR,); if (dev->link_local_addr) memcpy(src_ipsub.sub, dev->link_local_addr->sin6.sin6_addr.s6_addr, sizeof src_ipsub.sub); advert_h->nd_ra_type = ND_ROUTER_ADVERT; advert_h->nd_ra_code = 0; advert_h->nd_ra_curhoplimit = 64; advert_h->nd_ra_flags_reserved = 0; advert_h->nd_ra_router_lifetime = htons(64800); /* 64800s */ advert_h->nd_ra_reachable = 0; advert_h->nd_ra_retransmit = 0; prefix->nd_opt_pi_type = ND_OPT_PREFIX_INFORMATION; prefix->nd_opt_pi_len = 4; /* 32bytes */ prefix->nd_opt_pi_prefix_len = subnet->prefixlen; prefix->nd_opt_pi_flags_reserved = ND_OPT_PI_FLAG_ONLINK|ND_OPT_PI_FLAG_AUTO; prefix->nd_opt_pi_valid_time = htonl(0xffffffff); /* Infinite */ prefix->nd_opt_pi_preferred_time = htonl(0xffffffff); /* Infinite */ memcpy(prefix->nd_opt_pi_prefix.s6_addr, subnet->sub.sub, sizeof prefix->nd_opt_pi_prefix.s6_addr); /* For IPv6 Pseudo-Header */ plen = htons(sizeof *advert_h + sizeof *prefix); nxt = IPPROTO_ICMPV6; memcpy(p, src_ipsub.sub, sizeof src_ipsub.sub); p += sizeof src_ipsub.sub; memcpy(p, ip6_dst, IPV6_LEN); p += IPV6_LEN; p += 2; memcpy(p, &plen, 2); p += 2; p += 3; *p = nxt; p += 1; advert_h->nd_ra_cksum = in_cksum((c_uint16_t *)pkbuf->payload, pkbuf->len); ip6_h->ip6_flow = htonl(0x60000001); ip6_h->ip6_plen = plen; ip6_h->ip6_nxt = nxt; /* ICMPv6 */ ip6_h->ip6_hlim = 0xff; memcpy(ip6_h->ip6_src.s6_addr, src_ipsub.sub, sizeof src_ipsub.sub); memcpy(ip6_h->ip6_dst.s6_addr, ip6_dst, IPV6_LEN); rv = pgw_gtp_send_to_bearer(bearer, pkbuf); d_assert(rv == CORE_OK,, "pgw_gtp_send_to_bearer() faild"); d_trace(5, "[PGW] Router Advertisement\n"); pkbuf_free(pkbuf); return rv; } c_uint16_t in_cksum(c_uint16_t *addr, int len) { int nleft = len; c_uint32_t sum = 0; c_uint16_t *w = addr; c_uint16_t answer = 0; // Adding 16 bits sequentially in sum while (nleft > 1) { sum += *w; nleft -= 2; w++; } // If an odd byte is left if (nleft == 1) { *(c_uint8_t *) (&answer) = *(c_uint8_t *) w; sum += answer; } sum = (sum >> 16) + (sum & 0xffff); sum += (sum >> 16); answer = ~sum; return answer; } nextepc-0.3.10/src/pgw/pgw_gtp_path.h000066400000000000000000000004371333553357400175000ustar00rootroot00000000000000#ifndef __PGW_PATH_H__ #define __PGW_PATH_H__ #include "gtp/gtp_xact.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(status_t) pgw_gtp_open(); CORE_DECLARE(status_t) pgw_gtp_close(); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __PGW_PATH_H__ */ nextepc-0.3.10/src/pgw/pgw_gx_handler.c000066400000000000000000000211161333553357400177750ustar00rootroot00000000000000#define TRACE_MODULE _pgw_gx_handler #include "core_debug.h" #include "pgw_context.h" #include "fd/gx/gx_message.h" #include "pgw_gtp_path.h" #include "pgw_s5c_build.h" #include "pgw_ipfw.h" static status_t bearer_binding(pgw_sess_t *sess, gx_message_t *gx_message); void pgw_gx_handle_cca_initial_request( pgw_sess_t *sess, gx_message_t *gx_message, gtp_xact_t *xact, gtp_create_session_request_t *req) { status_t rv; gtp_header_t h; pkbuf_t *pkbuf = NULL; d_assert(sess, return, "Null param"); d_assert(gx_message, return, "Null param"); d_assert(xact, return, "Null param"); d_assert(req, return, "Null param"); /* Send Create Session Request with Creating Default Bearer */ memset(&h, 0, sizeof(gtp_header_t)); h.type = GTP_CREATE_SESSION_RESPONSE_TYPE; h.teid = sess->sgw_s5c_teid; rv = pgw_s5c_build_create_session_response( &pkbuf, h.type, sess, gx_message, req); d_assert(rv == CORE_OK, return, "S11 build error"); rv = gtp_xact_update_tx(xact, &h, pkbuf); d_assert(rv == CORE_OK, return, "gtp_xact_update_tx error"); rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK, return, "xact_commit error"); rv = bearer_binding(sess, gx_message); d_assert(rv == CORE_OK, return,); } void pgw_gx_handle_cca_termination_request( pgw_sess_t *sess, gx_message_t *gx_message, gtp_xact_t *xact, gtp_delete_session_request_t *req) { status_t rv; gtp_header_t h; pkbuf_t *pkbuf = NULL; c_uint32_t sgw_s5c_teid; d_assert(xact, return, "Null param"); d_assert(sess, return, "Null param"); d_assert(gx_message, return, "Null param"); d_assert(req, return, "Null param"); /* backup sgw_s5c_teid in session context */ sgw_s5c_teid = sess->sgw_s5c_teid; d_trace(3, "[PGW] Delete Session Response\n"); d_trace(5, " SGW_S5C_TEID[0x%x] PGW_S5C_TEID[0x%x]\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); /* Remove a pgw session */ pgw_sess_remove(sess); memset(&h, 0, sizeof(gtp_header_t)); h.type = GTP_DELETE_SESSION_RESPONSE_TYPE; h.teid = sgw_s5c_teid; rv = pgw_s5c_build_delete_session_response( &pkbuf, h.type, gx_message, req); d_assert(rv == CORE_OK, return, "S11 build error"); rv = gtp_xact_update_tx(xact, &h, pkbuf); d_assert(rv == CORE_OK, return, "gtp_xact_update_tx error"); rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK, return, "xact_commit error"); } void pgw_gx_handle_re_auth_request( pgw_sess_t *sess, gx_message_t *gx_message) { status_t rv; rv = bearer_binding(sess, gx_message); d_assert(rv == CORE_OK, return,); } static status_t bearer_binding(pgw_sess_t *sess, gx_message_t *gx_message) { status_t rv; int i, j; d_assert(sess, return CORE_ERROR,); d_assert(gx_message, return CORE_ERROR,); for (i = 0; i < gx_message->num_of_pcc_rule; i++) { gtp_xact_t *xact = NULL; gtp_header_t h; pkbuf_t *pkbuf = NULL; pgw_bearer_t *bearer = NULL; pcc_rule_t *pcc_rule = &gx_message->pcc_rule[i]; int bearer_created = 0; int qos_presence = 0; int tft_presence = 0; d_assert(pcc_rule, return CORE_ERROR,); if (pcc_rule->name == NULL) { d_error("No PCC Rule Name"); continue; } if (pcc_rule->type == PCC_RULE_TYPE_INSTALL) { bearer = pgw_bearer_find_by_qci_arp(sess, pcc_rule->qos.qci, pcc_rule->qos.arp.priority_level, pcc_rule->qos.arp.pre_emption_capability, pcc_rule->qos.arp.pre_emption_vulnerability); if (!bearer) { bearer = pgw_bearer_add(sess); d_assert(bearer, return CORE_ERROR, "Null param"); bearer->name = core_strdup(pcc_rule->name); d_assert(bearer->name, return CORE_ERROR,); memcpy(&bearer->qos, &pcc_rule->qos, sizeof(qos_t)); d_assert(pcc_rule->num_of_flow, return CORE_ERROR, "No Flow! [QCI:%d, ARP:%d,%d,%d]", pcc_rule->qos.qci, pcc_rule->qos.arp.priority_level, pcc_rule->qos.arp.pre_emption_capability, pcc_rule->qos.arp.pre_emption_vulnerability); bearer_created = 1; } else { d_assert(strcmp(bearer->name, pcc_rule->name) == 0, return CORE_ERROR, "PCC Rule Name Mismatched! [%s:%s]", bearer->name, pcc_rule->name); if (pcc_rule->num_of_flow) { /* Remove all previous flow */ pgw_pf_remove_all(bearer); /* Update Bearer Request will encode updated TFT */ tft_presence = 1; } if ((pcc_rule->qos.mbr.downlink && bearer->qos.mbr.downlink != pcc_rule->qos.mbr.downlink) || (pcc_rule->qos.mbr.uplink && bearer->qos.mbr.uplink != pcc_rule->qos.mbr.uplink) || (pcc_rule->qos.gbr.downlink && bearer->qos.gbr.downlink != pcc_rule->qos.gbr.downlink) || (pcc_rule->qos.gbr.uplink && bearer->qos.gbr.uplink != pcc_rule->qos.gbr.uplink)) { /* Update QoS parameter */ memcpy(&bearer->qos, &pcc_rule->qos, sizeof(qos_t)); /* Update Bearer Request will encode updated QoS parameter */ qos_presence = 1; } if (tft_presence == 0 && qos_presence == 0) { d_warn("[IGNORE] Update Bearer Request : " "Both QoS and TFT is NULL"); continue; } } for (j = 0; j < pcc_rule->num_of_flow; j++) { flow_t *flow = &pcc_rule->flow[j]; pgw_rule_t rule; pgw_pf_t *pf = NULL; d_assert(flow, return CORE_ERROR, "Null param"); d_assert(flow->description, return CORE_ERROR, "Null param"); rv = pgw_compile_packet_filter(&rule, flow->description); d_assert(rv == CORE_OK, return CORE_ERROR, "Failed to compile packet filter"); pf = pgw_pf_add(bearer, pcc_rule->precedence); d_assert(pf, return CORE_ERROR, "Null param"); memcpy(&pf->rule, &rule, sizeof(pgw_rule_t)); pf->direction = flow->direction; } memset(&h, 0, sizeof(gtp_header_t)); if (bearer_created == 1) { h.type = GTP_CREATE_BEARER_REQUEST_TYPE; h.teid = sess->sgw_s5c_teid; rv = pgw_s5c_build_create_bearer_request(&pkbuf, h.type, bearer); d_assert(rv == CORE_OK, return CORE_ERROR, "S11 build error"); } else { h.type = GTP_UPDATE_BEARER_REQUEST_TYPE; h.teid = sess->sgw_s5c_teid; rv = pgw_s5c_build_update_bearer_request( &pkbuf, h.type, bearer, qos_presence, tft_presence); d_assert(rv == CORE_OK, return CORE_ERROR, "S11 build error"); } xact = gtp_xact_local_create(sess->gnode, &h, pkbuf); d_assert(xact, return CORE_ERROR, "Null param"); rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK, return CORE_ERROR, "xact_commit error"); } else if (pcc_rule->type == PCC_RULE_TYPE_REMOVE) { bearer = pgw_bearer_find_by_name(sess, pcc_rule->name); d_assert(bearer, return CORE_ERROR,); memset(&h, 0, sizeof(gtp_header_t)); h.type = GTP_DELETE_BEARER_REQUEST_TYPE; h.teid = sess->sgw_s5c_teid; rv = pgw_s5c_build_delete_bearer_request(&pkbuf, h.type, bearer); d_assert(rv == CORE_OK, return CORE_ERROR, "S11 build error"); xact = gtp_xact_local_create(sess->gnode, &h, pkbuf); d_assert(xact, return CORE_ERROR, "Null param"); rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK, return CORE_ERROR, "xact_commit error"); return CORE_OK; } else d_assert(0, return CORE_ERROR, "Invalid type(%d)", pcc_rule->type); } return CORE_OK; } nextepc-0.3.10/src/pgw/pgw_gx_handler.h000066400000000000000000000012721333553357400200030ustar00rootroot00000000000000#ifndef __PGW_GX_HANDLER_H__ #define __PGW_GX_HANDLER_H__ #include "gtp/gtp_message.h" #include "pgw_context.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(void) pgw_gx_handle_cca_initial_request( pgw_sess_t *sess, gx_message_t *gx_message, gtp_xact_t *xact, gtp_create_session_request_t *req); CORE_DECLARE(void) pgw_gx_handle_cca_termination_request( pgw_sess_t *sess, gx_message_t *gx_message, gtp_xact_t *xact, gtp_delete_session_request_t *req); CORE_DECLARE(void) pgw_gx_handle_re_auth_request( pgw_sess_t *sess, gx_message_t *gx_message); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __PGW_GX_HANDLER_H__ */ nextepc-0.3.10/src/pgw/pgw_init.c000066400000000000000000000050601333553357400166250ustar00rootroot00000000000000#define TRACE_MODULE _pgw_init #include "core_debug.h" #include "core_thread.h" #include "gtp/gtp_xact.h" #include "pgw_context.h" #include "pgw_event.h" #include "pgw_sm.h" #include "pgw_fd_path.h" static thread_id pgw_thread; static void *THREAD_FUNC pgw_main(thread_id id, void *data); static int initialized = 0; status_t pgw_initialize() { status_t rv; rv = pgw_context_init(); if (rv != CORE_OK) return rv; rv = pgw_context_parse_config(); if (rv != CORE_OK) return rv; rv = pgw_context_setup_trace_module(); if (rv != CORE_OK) return rv; rv = pgw_ue_pool_generate(); if (rv != CORE_OK) return rv; rv = pgw_fd_init(); if (rv != 0) return CORE_ERROR; rv = thread_create(&pgw_thread, NULL, pgw_main, NULL); if (rv != CORE_OK) return rv; initialized = 1; return CORE_OK; } void pgw_terminate(void) { if (!initialized) return; thread_delete(pgw_thread); pgw_fd_final(); pgw_context_final(); gtp_xact_final(); } static void *THREAD_FUNC pgw_main(thread_id id, void *data) { event_t event; fsm_t pgw_sm; c_time_t prev_tm, now_tm; status_t rv; memset(&event, 0, sizeof(event_t)); pgw_self()->queue_id = event_create(MSGQ_O_NONBLOCK); d_assert(pgw_self()->queue_id, return NULL, "PGW event queue creation failed"); tm_service_init(&pgw_self()->tm_service); gtp_xact_init(&pgw_self()->tm_service, PGW_EVT_S5C_T3_RESPONSE, PGW_EVT_S5C_T3_HOLDING); fsm_create(&pgw_sm, pgw_state_initial, pgw_state_final); fsm_init(&pgw_sm, 0); prev_tm = time_now(); #define EVENT_LOOP_TIMEOUT 10 /* 10ms */ while ((!thread_should_stop())) { sock_select_loop(EVENT_LOOP_TIMEOUT); do { rv = event_recv(pgw_self()->queue_id, &event); d_assert(rv != CORE_ERROR, continue, "While receiving a event message, error occurs"); now_tm = time_now(); /* if the gap is over event_loop timeout, execute preriodic jobs */ if (now_tm - prev_tm > (EVENT_LOOP_TIMEOUT * 1000)) { tm_execute_tm_service( &pgw_self()->tm_service, pgw_self()->queue_id); prev_tm = now_tm; } if (rv == CORE_EAGAIN) { continue; } fsm_dispatch(&pgw_sm, (fsm_event_t*)&event); } while(rv == CORE_OK); } fsm_final(&pgw_sm, 0); fsm_clear(&pgw_sm); event_delete(pgw_self()->queue_id); return NULL; } nextepc-0.3.10/src/pgw/pgw_ipfw.c000066400000000000000000000375301333553357400166360ustar00rootroot00000000000000#define TRACE_MODULE _pgw_ipfw #include "core_network.h" #include "pgw_ipfw.h" #include "ipfw/ipfw2.h" #include "ipfw/objs/include_e/netinet/ip_fw.h" #define MAX_NUM_OF_TOKEN 32 #define MAX_NUM_OF_RULE_BUFFER 1024 void compile_rule(char *av[], uint32_t *rbuf, int *rbufsize, void *tstate); status_t pgw_compile_packet_filter(pgw_rule_t *pgw_rule, c_int8_t *description) { pgw_rule_t zero_rule; char *token, *dir; char *saveptr; int i = 2; char *av[MAX_NUM_OF_TOKEN]; uint32_t rulebuf[MAX_NUM_OF_RULE_BUFFER]; int rbufsize; struct ip_fw_rule *rule = (struct ip_fw_rule *)rulebuf; int l; ipfw_insn *cmd; d_assert(pgw_rule, return CORE_ERROR, "Null param"); d_assert(description, return CORE_ERROR, "Null param"); rbufsize = sizeof(rulebuf); memset(rulebuf, 0, rbufsize); av[0] = NULL; /* ACTION */ token = strtok_r(description, " ", &saveptr); if (strcmp(token, "permit") != 0) { d_error("Not begins with reserved keyword : 'permit'"); return CORE_ERROR; } av[1] = token; /* Save DIRECTION */ dir = token = strtok_r(NULL, " ", &saveptr); if (strcmp(token, "out") != 0) { d_error("Not begins with reserved keyword : 'permit out'"); return CORE_ERROR; } /* ADDR */ token = strtok_r(NULL, " ", &saveptr); while(token != NULL) { av[i++] = token; token = strtok_r(NULL, " ", &saveptr); } /* Add DIRECTION */ av[i++] = dir; av[i] = NULL; compile_rule(av, (uint32_t *)rule, &rbufsize, NULL); memset(pgw_rule, 0, sizeof(pgw_rule_t)); for (l = rule->act_ofs, cmd = rule->cmd; l > 0 ; l -= F_LEN(cmd) , cmd += F_LEN(cmd)) { switch(cmd->opcode) { case O_PROTO: pgw_rule->proto = cmd->arg1; break; case O_IP_SRC: case O_IP_SRC_MASK: { uint32_t *a = ((ipfw_insn_u32 *)cmd)->d; pgw_rule->ipv4_local = 1; pgw_rule->ip.local.addr[0] = a[0]; if (cmd->opcode == O_IP_SRC_MASK) pgw_rule->ip.local.mask[0] = a[1]; else pgw_rule->ip.local.mask[0] = 0xffffffff; break; } case O_IP_DST: case O_IP_DST_MASK: { uint32_t *a = ((ipfw_insn_u32 *)cmd)->d; pgw_rule->ipv4_remote = 1; pgw_rule->ip.remote.addr[0] = a[0]; if (cmd->opcode == O_IP_DST_MASK) pgw_rule->ip.remote.mask[0] = a[1]; else pgw_rule->ip.remote.mask[0] = 0xffffffff; break; } case O_IP6_SRC: case O_IP6_SRC_MASK: { uint32_t *a = ((ipfw_insn_u32 *)cmd)->d; pgw_rule->ipv6_local = 1; memcpy(pgw_rule->ip.local.addr, a, IPV6_LEN); if (cmd->opcode == O_IP6_SRC_MASK) memcpy(pgw_rule->ip.local.mask, a+4, IPV6_LEN); else n2mask((struct in6_addr *)pgw_rule->ip.local.mask, 128); break; } case O_IP6_DST: case O_IP6_DST_MASK: { uint32_t *a = ((ipfw_insn_u32 *)cmd)->d; pgw_rule->ipv6_remote = 1; memcpy(pgw_rule->ip.remote.addr, a, IPV6_LEN); if (cmd->opcode == O_IP6_DST_MASK) memcpy(pgw_rule->ip.remote.mask, a+4, IPV6_LEN); else n2mask((struct in6_addr *)pgw_rule->ip.remote.mask, 128); break; } case O_IP_SRCPORT: { uint16_t *p = ((ipfw_insn_u16 *)cmd)->ports; pgw_rule->port.local.low = p[0]; pgw_rule->port.local.high = p[1]; break; } case O_IP_DSTPORT: { uint16_t *p = ((ipfw_insn_u16 *)cmd)->ports; pgw_rule->port.remote.low = p[0]; pgw_rule->port.remote.high = p[1]; break; } } } memset(&zero_rule, 0, sizeof(pgw_rule_t)); if (memcmp(pgw_rule, &zero_rule, sizeof(pgw_rule_t)) == 0) { d_error("Cannot find Flow-Description"); return CORE_ERROR; } return CORE_OK; } static status_t decode_ipv6_header( struct ip6_hdr *ip6_h, c_uint8_t *proto, c_uint16_t *hlen) { int done = 0; c_uint8_t *p, *jp, *endp; c_uint8_t nxt; /* Next Header */ d_assert(ip6_h, return CORE_ERROR,); d_assert(proto, return CORE_ERROR,); d_assert(hlen, return CORE_ERROR,); nxt = ip6_h->ip6_nxt; p = (c_uint8_t *)ip6_h + sizeof(*ip6_h); endp = p + ntohs(ip6_h->ip6_plen); jp = p + sizeof(struct ip6_hbh); while(p == endp) /* Jumbo Frame */ { c_uint32_t jp_len = 0; struct ip6_opt_jumbo *jumbo = NULL; d_assert(nxt == 0, return CORE_ERROR,); jumbo = (struct ip6_opt_jumbo *)jp; memcpy(&jp_len, jumbo->ip6oj_jumbo_len, sizeof(jp_len)); jp_len = ntohl(jp_len); switch(jumbo->ip6oj_type) { case IP6OPT_JUMBO: endp = p + jp_len; break; case 0: jp++; break; default: jp += (sizeof(struct ip6_opt) + jp_len); break; } } while(p < endp) { struct ip6_ext *ext = (struct ip6_ext *)p; switch(nxt) { case IPPROTO_HOPOPTS: case IPPROTO_ROUTING: case IPPROTO_DSTOPTS: case 135: /* mobility */ case 139: /* host identity, experimental */ case 140: /* shim6 */ case 253: /* testing, experimental */ case 254: /* testing, experimental */ p += ((ext->ip6e_len << 3) + 8); break; case IPPROTO_FRAGMENT: p += sizeof(struct ip6_frag); break; case IPPROTO_AH: p += ((ext->ip6e_len + 2) << 2); break; default: /* Upper Layer */ done = 1; break; } if (done) break; nxt = ext->ip6e_nxt; } *proto = nxt; *hlen = p - (c_uint8_t *)ip6_h; return CORE_OK; } pgw_bearer_t *pgw_bearer_find_by_packet(pkbuf_t *pkt) { hash_index_t *hi = NULL; struct ip *ip_h = NULL; struct ip6_hdr *ip6_h = NULL; c_uint32_t *src_addr = NULL; c_uint32_t *dst_addr = NULL; int addr_len = 0; c_uint8_t proto = 0; c_uint16_t ip_hlen = 0; char buf[CORE_ADDRSTRLEN]; d_assert(pkt, return NULL, "pkt is NULL"); d_assert(pkt->payload, return NULL, "pkt is NULL"); ip_h = (struct ip *)pkt->payload; if (ip_h->ip_v == 4) { ip_h = (struct ip *)pkt->payload; ip6_h = NULL; proto = ip_h->ip_p; ip_hlen = (ip_h->ip_hl)*4; src_addr = &ip_h->ip_src.s_addr; dst_addr = &ip_h->ip_dst.s_addr; addr_len = 4; } else if (ip_h->ip_v == 6) { ip_h = NULL; ip6_h = (struct ip6_hdr *)pkt->payload; decode_ipv6_header(ip6_h, &proto, &ip_hlen); src_addr = (c_uint32_t *)ip6_h->ip6_src.s6_addr; dst_addr = (c_uint32_t *)ip6_h->ip6_dst.s6_addr; addr_len = 16; } else d_error("Invalid IP version = %d\n", ip_h->ip_v); d_trace(5, "[PGW] PROTO:%d SRC:%08x %08x %08x %08x\n", proto, ntohl(src_addr[0]), ntohl(src_addr[1]), ntohl(src_addr[2]), ntohl(src_addr[3])); d_trace(5, "[PGW] HLEN:%d DST:%08x %08x %08x %08x\n", ip_hlen, ntohl(dst_addr[0]), ntohl(dst_addr[1]), ntohl(dst_addr[2]), ntohl(dst_addr[3])); /* TODO: Need to use the method of FAST matching algorithm and * implementation . * Until be ready, linear searching will be use to find the bearer. */ for (hi = pgw_sess_first(); hi; hi = pgw_sess_next(hi)) { pgw_sess_t *sess = pgw_sess_this(hi); d_assert(sess, return NULL,); if (sess->ipv4) d_trace(5, "[PGW] PAA IPv4:%s\n", INET_NTOP(&sess->ipv4->addr, buf)); if (sess->ipv6) d_trace(5, "[PGW] PAA IPv6:%s\n", INET6_NTOP(&sess->ipv6->addr, buf)); if ((sess->ipv4 && memcmp(dst_addr, sess->ipv4->addr, addr_len) == 0) || (sess->ipv6 && memcmp(dst_addr, sess->ipv6->addr, addr_len) == 0)) { pgw_bearer_t *default_bearer = NULL; pgw_bearer_t *bearer = NULL; /* Save the default bearer */ default_bearer = pgw_default_bearer_in_sess(sess); d_assert(default_bearer, return NULL, "No default Bearer"); /* Found */ d_trace(5, "[PGW] Found Session : EBI[%d]\n", default_bearer->ebi); bearer = pgw_bearer_next(default_bearer); /* Find the bearer with matched */ for (; bearer; bearer = pgw_bearer_next(bearer)) { pgw_pf_t *pf = NULL; if (bearer->ebi == 0) { /* Create Bearer Response is not received */ continue; } for (pf = pgw_pf_first(bearer); pf; pf = pgw_pf_next(pf)) { int k; c_uint32_t src_mask[4]; c_uint32_t dst_mask[4]; d_trace(5, "DIR:%d PROTO:%d SRC:%d-%d DST:%d-%d\n", pf->direction, pf->rule.proto, pf->rule.port.local.low, pf->rule.port.local.high, pf->rule.port.remote.low, pf->rule.port.remote.high); d_trace(5, "SRC:%08x %08x %08x %08x/%08x %08x %08x %08x\n", ntohl(pf->rule.ip.local.addr[0]), ntohl(pf->rule.ip.local.addr[1]), ntohl(pf->rule.ip.local.addr[2]), ntohl(pf->rule.ip.local.addr[3]), ntohl(pf->rule.ip.local.mask[0]), ntohl(pf->rule.ip.local.mask[1]), ntohl(pf->rule.ip.local.mask[2]), ntohl(pf->rule.ip.local.mask[3])); d_trace(5, "DST:%08x %08x %08x %08x/%08x %08x %08x %08x\n", ntohl(pf->rule.ip.remote.addr[0]), ntohl(pf->rule.ip.remote.addr[1]), ntohl(pf->rule.ip.remote.addr[2]), ntohl(pf->rule.ip.remote.addr[3]), ntohl(pf->rule.ip.remote.mask[0]), ntohl(pf->rule.ip.remote.mask[1]), ntohl(pf->rule.ip.remote.mask[2]), ntohl(pf->rule.ip.remote.mask[3])); if (pf->direction != 1) { continue; } for (k = 0; k < 4; k++) { src_mask[k] = src_addr[k] & pf->rule.ip.local.mask[k]; dst_mask[k] = dst_addr[k] & pf->rule.ip.remote.mask[k]; } if (memcmp(src_mask, pf->rule.ip.local.addr, addr_len) == 0 && memcmp(dst_mask, pf->rule.ip.remote.addr, addr_len) == 0) { /* Protocol match */ if (pf->rule.proto == 0) /* IP */ { /* No need to match port */ break; } if (pf->rule.proto == proto) { if (pf->rule.proto == IPPROTO_TCP) { struct tcphdr *tcph = (struct tcphdr *) ((char *)pkt->payload + ip_hlen); /* Source port */ if (pf->rule.port.local.low && ntohs(tcph->th_sport) < pf->rule.port.local.low) { continue; } if (pf->rule.port.local.high && ntohs(tcph->th_sport) > pf->rule.port.local.high) { continue; } /* Dst Port*/ if (pf->rule.port.remote.low && ntohs(tcph->th_dport) < pf->rule.port.remote.low) { continue; } if (pf->rule.port.remote.high && ntohs(tcph->th_dport) > pf->rule.port.remote.high) { continue; } /* Matched */ break; } else if (pf->rule.proto == IPPROTO_UDP) { struct udphdr *udph = (struct udphdr *) ((char *)pkt->payload + ip_hlen); /* Source port */ if (pf->rule.port.local.low && ntohs(udph->uh_sport) < pf->rule.port.local.low) { continue; } if (pf->rule.port.local.high && ntohs(udph->uh_sport) > pf->rule.port.local.high) { continue; } /* Dst Port*/ if (pf->rule.port.remote.low && ntohs(udph->uh_dport) < pf->rule.port.remote.low) { continue; } if (pf->rule.port.remote.high && ntohs(udph->uh_dport) > pf->rule.port.remote.high) { continue; } /* Matched */ break; } else { /* No need to match port */ break; } } } } if (pf) { bearer = pf->bearer; d_trace(5, "Found Dedicated Bearer : EBI[%d]\n", bearer->ebi); break; } } return (bearer ? bearer : default_bearer); } } return NULL; } nextepc-0.3.10/src/pgw/pgw_ipfw.h000066400000000000000000000004471333553357400166400ustar00rootroot00000000000000#ifndef __PGW_IPFW_H__ #define __PGW_IPFW_H__ #include "core_debug.h" #include "pgw_context.h" CORE_DECLARE(status_t) pgw_compile_packet_filter( pgw_rule_t *pf, c_int8_t *description); CORE_DECLARE(pgw_bearer_t*) pgw_bearer_find_by_packet(pkbuf_t *pkt); #endif /* __PGW_IPFW_H__ */ nextepc-0.3.10/src/pgw/pgw_s5c_build.c000066400000000000000000000553131333553357400175410ustar00rootroot00000000000000#define TRACE_MODULE _pgw_s5c_build #include "core_debug.h" #include "3gpp_types.h" #include "gtp/gtp_types.h" #include "gtp/gtp_conv.h" #include "gtp/gtp_message.h" #include "fd/gx/gx_message.h" #include "ipfw/ipfw2.h" #include "pgw_context.h" static c_int16_t pgw_pco_build(c_uint8_t *pco_buf, tlv_pco_t *tlv_pco); status_t pgw_s5c_build_create_session_response( pkbuf_t **pkbuf, c_uint8_t type, pgw_sess_t *sess, gx_message_t *gx_message, gtp_create_session_request_t *req) { status_t rv; pgw_bearer_t *bearer = NULL; gtp_message_t gtp_message; gtp_create_session_response_t *rsp = NULL; gtp_cause_t cause; gtp_f_teid_t pgw_s5c_teid, pgw_s5u_teid; int len; c_uint8_t pco_buf[MAX_PCO_LEN]; c_int16_t pco_len; d_trace(3, "[PGW] Create Session Response\n"); d_assert(sess, return CORE_ERROR, "Null param"); d_assert(req, return CORE_ERROR, "Null param"); bearer = pgw_default_bearer_in_sess(sess); d_assert(bearer, return CORE_ERROR, "Null param"); d_trace(5, " SGW_S5C_TEID[0x%x] PGW_S5C_TEID[0x%x]\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); d_trace(5, " SGW_S5U_TEID[%d] PGW_S5U_TEID[%d]\n", bearer->sgw_s5u_teid, bearer->pgw_s5u_teid); rsp = >p_message.create_session_response; memset(>p_message, 0, sizeof(gtp_message_t)); /* Set Cause */ memset(&cause, 0, sizeof(cause)); cause.value = GTP_CAUSE_REQUEST_ACCEPTED; rsp->cause.presence = 1; rsp->cause.len = sizeof(cause); rsp->cause.data = &cause; /* Control Plane(UL) : PGW-S5C */ memset(&pgw_s5c_teid, 0, sizeof(gtp_f_teid_t)); pgw_s5c_teid.interface_type = GTP_F_TEID_S5_S8_PGW_GTP_C; pgw_s5c_teid.teid = htonl(sess->pgw_s5c_teid); rv = gtp_sockaddr_to_f_teid( pgw_self()->gtpc_addr, pgw_self()->gtpc_addr6, &pgw_s5c_teid, &len); d_assert(rv == CORE_OK, return CORE_ERROR,); rsp->pgw_s5_s8__s2a_s2b_f_teid_for_pmip_based_interface_or_for_gtp_based_control_plane_interface. presence = 1; rsp->pgw_s5_s8__s2a_s2b_f_teid_for_pmip_based_interface_or_for_gtp_based_control_plane_interface. data = &pgw_s5c_teid; rsp->pgw_s5_s8__s2a_s2b_f_teid_for_pmip_based_interface_or_for_gtp_based_control_plane_interface. len = len; /* PDN Address Allocation */ rsp->pdn_address_allocation.data = &sess->pdn.paa; if (sess->ipv4 && sess->ipv6) rsp->pdn_address_allocation.len = PAA_IPV4V6_LEN; else if (sess->ipv4) rsp->pdn_address_allocation.len = PAA_IPV4_LEN; else if (sess->ipv6) rsp->pdn_address_allocation.len = PAA_IPV6_LEN; else d_assert(0, return CORE_ERROR, "No IP Pool"); rsp->pdn_address_allocation.presence = 1; /* APN Restriction */ rsp->apn_restriction.presence = 1; rsp->apn_restriction.u8 = GTP_APN_NO_RESTRICTION; /* TODO : APN-AMBR * if PCRF changes APN-AMBR, this should be included. */ /* PCO */ if (req->protocol_configuration_options.presence == 1) { pco_len = pgw_pco_build(pco_buf, &req->protocol_configuration_options); d_assert(pco_len > 0, return CORE_ERROR, "pco build failed"); rsp->protocol_configuration_options.presence = 1; rsp->protocol_configuration_options.data = pco_buf; rsp->protocol_configuration_options.len = pco_len; } /* Bearer EBI */ rsp->bearer_contexts_created.presence = 1; rsp->bearer_contexts_created.eps_bearer_id.presence = 1; rsp->bearer_contexts_created.eps_bearer_id.u8 = bearer->ebi; /* TODO : Bearer QoS * if PCRF changes Bearer QoS, this should be included. */ /* Data Plane(UL) : PGW-S5U */ memset(&pgw_s5u_teid, 0, sizeof(gtp_f_teid_t)); pgw_s5u_teid.interface_type = GTP_F_TEID_S5_S8_PGW_GTP_U; pgw_s5u_teid.teid = htonl(bearer->pgw_s5u_teid); rv = gtp_sockaddr_to_f_teid( pgw_self()->gtpu_addr, pgw_self()->gtpu_addr6, &pgw_s5u_teid, &len); d_assert(rv == CORE_OK, return CORE_ERROR,); rsp->bearer_contexts_created.s5_s8_u_sgw_f_teid.presence = 1; rsp->bearer_contexts_created.s5_s8_u_sgw_f_teid.data = &pgw_s5u_teid; rsp->bearer_contexts_created.s5_s8_u_sgw_f_teid.len = len; gtp_message.h.type = type; rv = gtp_build_msg(pkbuf, >p_message); d_assert(rv == CORE_OK, return CORE_ERROR, "gtp build failed"); return CORE_OK; } status_t pgw_s5c_build_delete_session_response( pkbuf_t **pkbuf, c_uint8_t type, gx_message_t *gx_message, gtp_delete_session_request_t *req) { status_t rv; gtp_message_t gtp_message; gtp_delete_session_response_t *rsp = NULL; gtp_cause_t cause; c_uint8_t pco_buf[MAX_PCO_LEN]; c_int16_t pco_len; d_assert(gx_message, return CORE_ERROR, "Null param"); d_assert(req, return CORE_ERROR, "Null param"); /* prepare cause */ memset(&cause, 0, sizeof(cause)); cause.value = GTP_CAUSE_REQUEST_ACCEPTED; rsp = >p_message.delete_session_response; memset(>p_message, 0, sizeof(gtp_message_t)); /* Cause */ rsp->cause.presence = 1; rsp->cause.len = sizeof(cause); rsp->cause.data = &cause; /* Recovery */ /* PCO */ if (req->protocol_configuration_options.presence == 1) { pco_len = pgw_pco_build(pco_buf, &req->protocol_configuration_options); d_assert(pco_len > 0, return CORE_ERROR, "pco build failed"); rsp->protocol_configuration_options.presence = 1; rsp->protocol_configuration_options.data = pco_buf; rsp->protocol_configuration_options.len = pco_len; } /* Private Extension */ /* build */ gtp_message.h.type = type; rv = gtp_build_msg(pkbuf, >p_message); d_assert(rv == CORE_OK, return CORE_ERROR, "gtp build failed"); return CORE_OK; } static void encode_traffic_flow_template(gtp_tft_t *tft, pgw_bearer_t *bearer) { int i, j, len; pgw_pf_t *pf = NULL; d_assert(tft, return,); d_assert(bearer, return,); memset(tft, 0, sizeof(*tft)); tft->code = GTP_TFT_CODE_CREATE_NEW_TFT; i = 0; pf = pgw_pf_first(bearer); while(pf) { tft->pf[i].direction = pf->direction; tft->pf[i].identifier = pf->identifier - 1; tft->pf[i].precedence = i+1; j = 0, len = 0; if (pf->rule.proto) { tft->pf[i].component[j].type = GTP_PACKET_FILTER_PROTOCOL_IDENTIFIER_NEXT_HEADER_TYPE; tft->pf[i].component[j].proto = pf->rule.proto; j++; len += 2; } if (pf->rule.ipv4_local) { tft->pf[i].component[j].type = GTP_PACKET_FILTER_IPV4_LOCAL_ADDRESS_TYPE; tft->pf[i].component[j].ipv4.addr = pf->rule.ip.local.addr[0]; tft->pf[i].component[j].ipv4.mask = pf->rule.ip.local.mask[0]; j++; len += 9; } if (pf->rule.ipv4_remote) { tft->pf[i].component[j].type = GTP_PACKET_FILTER_IPV4_REMOTE_ADDRESS_TYPE; tft->pf[i].component[j].ipv4.addr = pf->rule.ip.remote.addr[0]; tft->pf[i].component[j].ipv4.mask = pf->rule.ip.remote.mask[0]; j++; len += 9; } if (pf->rule.ipv6_local) { tft->pf[i].component[j].type = GTP_PACKET_FILTER_IPV6_LOCAL_ADDRESS_PREFIX_LENGTH_TYPE; memcpy(tft->pf[i].component[j].ipv6.addr, pf->rule.ip.local.addr, sizeof pf->rule.ip.local.addr); tft->pf[i].component[j].ipv6.prefixlen = contigmask((c_uint8_t *)pf->rule.ip.local.mask, 128); j++; len += 18; } if (pf->rule.ipv6_remote) { tft->pf[i].component[j].type = GTP_PACKET_FILTER_IPV6_REMOTE_ADDRESS_PREFIX_LENGTH_TYPE; memcpy(tft->pf[i].component[j].ipv6.addr, pf->rule.ip.remote.addr, sizeof pf->rule.ip.remote.addr); tft->pf[i].component[j].ipv6.prefixlen = contigmask((c_uint8_t *)pf->rule.ip.remote.mask, 128); j++; len += 18; } if (pf->rule.port.local.low) { if (pf->rule.port.local.low == pf->rule.port.local.high) { tft->pf[i].component[j].type = GTP_PACKET_FILTER_SINGLE_LOCAL_PORT_TYPE; tft->pf[i].component[j].port.low = pf->rule.port.local.low; j++; len += 3; } else { tft->pf[i].component[j].type = GTP_PACKET_FILTER_LOCAL_PORT_RANGE_TYPE; tft->pf[i].component[j].port.low = pf->rule.port.local.low; tft->pf[i].component[j].port.high = pf->rule.port.local.high; j++; len += 5; } } if (pf->rule.port.remote.low) { if (pf->rule.port.remote.low == pf->rule.port.remote.high) { tft->pf[i].component[j].type = GTP_PACKET_FILTER_SINGLE_REMOTE_PORT_TYPE; tft->pf[i].component[j].port.low = pf->rule.port.remote.low; j++; len += 3; } else { tft->pf[i].component[j].type = GTP_PACKET_FILTER_REMOTE_PORT_RANGE_TYPE; tft->pf[i].component[j].port.low = pf->rule.port.remote.low; tft->pf[i].component[j].port.high = pf->rule.port.remote.high; j++; len += 5; } } tft->pf[i].num_of_component = j; tft->pf[i].length = len; i++; pf = pgw_pf_next(pf); } tft->num_of_packet_filter = i; } status_t pgw_s5c_build_create_bearer_request( pkbuf_t **pkbuf, c_uint8_t type, pgw_bearer_t *bearer) { status_t rv; pgw_sess_t *sess = NULL; pgw_bearer_t *linked_bearer = NULL; gtp_message_t gtp_message; gtp_create_bearer_request_t *req = NULL; gtp_f_teid_t pgw_s5u_teid; gtp_bearer_qos_t bearer_qos; char bearer_qos_buf[GTP_BEARER_QOS_LEN]; gtp_tft_t tft; int len; char tft_buf[GTP_MAX_TRAFFIC_FLOW_TEMPLATE]; d_assert(bearer, return CORE_ERROR, "Null param"); sess = bearer->sess; d_assert(sess, return CORE_ERROR, "Null param"); linked_bearer = pgw_default_bearer_in_sess(sess); d_assert(linked_bearer, return CORE_ERROR, "Null param"); d_trace(3, "[PGW] Create Bearer Request\n"); d_trace(5, " SGW_S5C_TEID[0x%x] PGW_S5C_TEID[0x%x]\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); req = >p_message.create_bearer_request; memset(>p_message, 0, sizeof(gtp_message_t)); /* Linked EBI */ req->linked_eps_bearer_id.presence = 1; req->linked_eps_bearer_id.u8 = linked_bearer->ebi; /* Bearer EBI */ req->bearer_contexts.presence = 1; req->bearer_contexts.eps_bearer_id.presence = 1; req->bearer_contexts.eps_bearer_id.u8 = bearer->ebi; /* Data Plane(UL) : PGW_S5U */ memset(&pgw_s5u_teid, 0, sizeof(gtp_f_teid_t)); pgw_s5u_teid.interface_type = GTP_F_TEID_S5_S8_PGW_GTP_U; pgw_s5u_teid.teid = htonl(bearer->pgw_s5u_teid); rv = gtp_sockaddr_to_f_teid( pgw_self()->gtpu_addr, pgw_self()->gtpu_addr6, &pgw_s5u_teid, &len); d_assert(rv == CORE_OK, return CORE_ERROR,); req->bearer_contexts.s5_s8_u_sgw_f_teid.presence = 1; req->bearer_contexts.s5_s8_u_sgw_f_teid.data = &pgw_s5u_teid; req->bearer_contexts.s5_s8_u_sgw_f_teid.len = len; /* Bearer QoS */ memset(&bearer_qos, 0, sizeof(bearer_qos)); bearer_qos.qci = bearer->qos.qci; bearer_qos.priority_level = bearer->qos.arp.priority_level; bearer_qos.pre_emption_capability = bearer->qos.arp.pre_emption_capability; bearer_qos.pre_emption_vulnerability = bearer->qos.arp.pre_emption_vulnerability; bearer_qos.dl_mbr = bearer->qos.mbr.downlink; bearer_qos.ul_mbr = bearer->qos.mbr.uplink; bearer_qos.dl_gbr = bearer->qos.gbr.downlink; bearer_qos.ul_gbr = bearer->qos.gbr.uplink; req->bearer_contexts.bearer_level_qos.presence = 1; gtp_build_bearer_qos(&req->bearer_contexts.bearer_level_qos, &bearer_qos, bearer_qos_buf, GTP_BEARER_QOS_LEN); /* Bearer TFT */ encode_traffic_flow_template(&tft, bearer); req->bearer_contexts.tft.presence = 1; gtp_build_tft(&req->bearer_contexts.tft, &tft, tft_buf, GTP_MAX_TRAFFIC_FLOW_TEMPLATE); gtp_message.h.type = type; rv = gtp_build_msg(pkbuf, >p_message); d_assert(rv == CORE_OK, return CORE_ERROR, "gtp build failed"); return CORE_OK; } status_t pgw_s5c_build_update_bearer_request( pkbuf_t **pkbuf, c_uint8_t type, pgw_bearer_t *bearer, int qos_presence, int tft_presence) { status_t rv; pgw_sess_t *sess = NULL; pgw_bearer_t *linked_bearer = NULL; gtp_message_t gtp_message; gtp_update_bearer_request_t *req = NULL; gtp_bearer_qos_t bearer_qos; char bearer_qos_buf[GTP_BEARER_QOS_LEN]; gtp_tft_t tft; char tft_buf[GTP_MAX_TRAFFIC_FLOW_TEMPLATE]; d_assert(bearer, return CORE_ERROR, "Null param"); sess = bearer->sess; d_assert(sess, return CORE_ERROR, "Null param"); linked_bearer = pgw_default_bearer_in_sess(sess); d_assert(linked_bearer, return CORE_ERROR, "Null param"); d_trace(3, "[PGW] Update Bearer Request\n"); d_trace(5, " SGW_S5C_TEID[0x%x] PGW_S5C_TEID[0x%x]\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); req = >p_message.update_bearer_request; memset(>p_message, 0, sizeof(gtp_message_t)); /* Bearer EBI */ req->bearer_contexts.presence = 1; req->bearer_contexts.eps_bearer_id.presence = 1; req->bearer_contexts.eps_bearer_id.u8 = bearer->ebi; /* Bearer QoS */ if (qos_presence == 1) { memset(&bearer_qos, 0, sizeof(bearer_qos)); bearer_qos.qci = bearer->qos.qci; bearer_qos.priority_level = bearer->qos.arp.priority_level; bearer_qos.pre_emption_capability = bearer->qos.arp.pre_emption_capability; bearer_qos.pre_emption_vulnerability = bearer->qos.arp.pre_emption_vulnerability; bearer_qos.dl_mbr = bearer->qos.mbr.downlink; bearer_qos.ul_mbr = bearer->qos.mbr.uplink; bearer_qos.dl_gbr = bearer->qos.gbr.downlink; bearer_qos.ul_gbr = bearer->qos.gbr.uplink; req->bearer_contexts.bearer_level_qos.presence = 1; gtp_build_bearer_qos(&req->bearer_contexts.bearer_level_qos, &bearer_qos, bearer_qos_buf, GTP_BEARER_QOS_LEN); } /* Bearer TFT */ if (tft_presence == 1) { encode_traffic_flow_template(&tft, bearer); req->bearer_contexts.tft.presence = 1; gtp_build_tft(&req->bearer_contexts.tft, &tft, tft_buf, GTP_MAX_TRAFFIC_FLOW_TEMPLATE); } gtp_message.h.type = type; rv = gtp_build_msg(pkbuf, >p_message); d_assert(rv == CORE_OK, return CORE_ERROR, "gtp build failed"); return CORE_OK; } status_t pgw_s5c_build_delete_bearer_request( pkbuf_t **pkbuf, c_uint8_t type, pgw_bearer_t *bearer) { status_t rv; pgw_sess_t *sess = NULL; pgw_bearer_t *linked_bearer = NULL; gtp_message_t gtp_message; gtp_delete_bearer_request_t *req = NULL; d_assert(bearer, return CORE_ERROR, "Null param"); sess = bearer->sess; d_assert(sess, return CORE_ERROR, "Null param"); linked_bearer = pgw_default_bearer_in_sess(sess); d_assert(linked_bearer, return CORE_ERROR, "Null param"); d_trace(3, "[PGW] Delete Bearer Request\n"); d_trace(5, " SGW_S5C_TEID[0x%x] PGW_S5C_TEID[0x%x]\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); req = >p_message.delete_bearer_request; memset(>p_message, 0, sizeof(gtp_message_t)); if (bearer->ebi == linked_bearer->ebi) { /* Linked EBI */ req->linked_eps_bearer_id.presence = 1; req->linked_eps_bearer_id.u8 = bearer->ebi; } else { /* Bearer EBI */ req->eps_bearer_ids.presence = 1; req->eps_bearer_ids.u8 = bearer->ebi; } gtp_message.h.type = type; rv = gtp_build_msg(pkbuf, >p_message); d_assert(rv == CORE_OK, return CORE_ERROR, "gtp build failed"); return CORE_OK; } static c_int16_t pgw_pco_build(c_uint8_t *pco_buf, tlv_pco_t *tlv_pco) { status_t rv; pco_t ue, pgw; pco_ipcp_t pco_ipcp; ipsubnet_t dns_primary, dns_secondary, dns6_primary, dns6_secondary; ipsubnet_t p_cscf, p_cscf6; c_int8_t size = 0; int i = 0; d_assert(pco_buf, return -1, "Null param"); d_assert(tlv_pco, return -1, "Null param"); size = pco_parse(&ue, tlv_pco->data, tlv_pco->len); d_assert(size, return -1, "pco parse failed"); memset(&pgw, 0, sizeof(pco_t)); pgw.ext = ue.ext; pgw.configuration_protocol = ue.configuration_protocol; for(i = 0; i < ue.num_of_id; i++) { c_uint8_t *data = ue.ids[i].data; switch(ue.ids[i].id) { case PCO_ID_CHALLENGE_HANDSHAKE_AUTHENTICATION_PROTOCOL: { if (data[0] == 2) /* Code : Response */ { pgw.ids[pgw.num_of_id].id = ue.ids[i].id; pgw.ids[pgw.num_of_id].len = 4; pgw.ids[pgw.num_of_id].data = (c_uint8_t *)"\x03\x00\x00\x04"; /* Code : Success */ pgw.num_of_id++; } break; } case PCO_ID_INTERNET_PROTOCOL_CONTROL_PROTOCOL: { if (data[0] == 1) /* Code : Configuration Request */ { c_uint16_t len = 16; memset(&pco_ipcp, 0, sizeof(pco_ipcp_t)); pco_ipcp.code = 2; /* Code : Configuration Ack */ pco_ipcp.len = htons(len); /* Primary DNS Server IP Address */ if (pgw_self()->dns[0]) { rv = core_ipsubnet( &dns_primary, pgw_self()->dns[0], NULL); d_assert(rv == CORE_OK, return CORE_ERROR,); pco_ipcp.options[0].type = 129; pco_ipcp.options[0].len = 6; pco_ipcp.options[0].addr = dns_primary.sub[0]; } /* Secondary DNS Server IP Address */ if (pgw_self()->dns[1]) { rv = core_ipsubnet( &dns_secondary, pgw_self()->dns[1], NULL); d_assert(rv == CORE_OK, return CORE_ERROR,); pco_ipcp.options[1].type = 131; pco_ipcp.options[1].len = 6; pco_ipcp.options[1].addr = dns_secondary.sub[0]; } pgw.ids[pgw.num_of_id].id = ue.ids[i].id; pgw.ids[pgw.num_of_id].len = len; pgw.ids[pgw.num_of_id].data = (c_uint8_t *)&pco_ipcp; pgw.num_of_id++; } break; } case PCO_ID_DNS_SERVER_IPV4_ADDRESS_REQUEST: { if (pgw_self()->dns[0]) { rv = core_ipsubnet( &dns_primary, pgw_self()->dns[0], NULL); d_assert(rv == CORE_OK, return CORE_ERROR,); pgw.ids[pgw.num_of_id].id = ue.ids[i].id; pgw.ids[pgw.num_of_id].len = IPV4_LEN; pgw.ids[pgw.num_of_id].data = dns_primary.sub; pgw.num_of_id++; } if (pgw_self()->dns[1]) { rv = core_ipsubnet( &dns_secondary, pgw_self()->dns[1], NULL); d_assert(rv == CORE_OK, return CORE_ERROR,); pgw.ids[pgw.num_of_id].id = ue.ids[i].id; pgw.ids[pgw.num_of_id].len = IPV4_LEN; pgw.ids[pgw.num_of_id].data = dns_secondary.sub; pgw.num_of_id++; } break; } case PCO_ID_DNS_SERVER_IPV6_ADDRESS_REQUEST: { if (pgw_self()->dns6[0]) { rv = core_ipsubnet( &dns6_primary, pgw_self()->dns6[0], NULL); d_assert(rv == CORE_OK, return CORE_ERROR,); pgw.ids[pgw.num_of_id].id = ue.ids[i].id; pgw.ids[pgw.num_of_id].len = IPV6_LEN; pgw.ids[pgw.num_of_id].data = dns6_primary.sub; pgw.num_of_id++; } if (pgw_self()->dns6[1]) { rv = core_ipsubnet( &dns6_secondary, pgw_self()->dns6[1], NULL); d_assert(rv == CORE_OK, return CORE_ERROR,); pgw.ids[pgw.num_of_id].id = ue.ids[i].id; pgw.ids[pgw.num_of_id].len = IPV6_LEN; pgw.ids[pgw.num_of_id].data = dns6_secondary.sub; pgw.num_of_id++; } break; } case PCO_ID_P_CSCF_IPV4_ADDRESS_REQUEST: { if (pgw_self()->num_of_p_cscf) { rv = core_ipsubnet(&p_cscf, pgw_self()->p_cscf[pgw_self()->p_cscf_index], NULL); d_assert(rv == CORE_OK, return CORE_ERROR,); pgw.ids[pgw.num_of_id].id = ue.ids[i].id; pgw.ids[pgw.num_of_id].len = IPV4_LEN; pgw.ids[pgw.num_of_id].data = p_cscf.sub; pgw.num_of_id++; pgw_self()->p_cscf_index++; pgw_self()->p_cscf_index %= pgw_self()->num_of_p_cscf; } break; } case PCO_ID_P_CSCF_IPV6_ADDRESS_REQUEST: { if (pgw_self()->num_of_p_cscf6) { rv = core_ipsubnet(&p_cscf6, pgw_self()->p_cscf6[pgw_self()->p_cscf6_index], NULL); d_assert(rv == CORE_OK, return CORE_ERROR,); pgw.ids[pgw.num_of_id].id = ue.ids[i].id; pgw.ids[pgw.num_of_id].len = IPV6_LEN; pgw.ids[pgw.num_of_id].data = p_cscf6.sub; pgw.num_of_id++; pgw_self()->p_cscf6_index++; pgw_self()->p_cscf6_index %= pgw_self()->num_of_p_cscf6; } break; } case PCO_ID_IP_ADDRESS_ALLOCATION_VIA_NAS_SIGNALLING: /* TODO */ break; case PCO_ID_IPV4_LINK_MTU_REQUEST: /* TODO */ break; default: d_warn("Unknown PCO ID:(0x%x)", ue.ids[i].id); } } size = pco_build(pco_buf, MAX_PCO_LEN, &pgw); return size; } nextepc-0.3.10/src/pgw/pgw_s5c_build.h000066400000000000000000000017561333553357400175500ustar00rootroot00000000000000#ifndef __PGW_S5C_BUILD_H__ #define __PGW_S5C_BUILD_H__ #include "gtp/gtp_message.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(status_t) pgw_s5c_build_create_session_response( pkbuf_t **pkbuf, c_uint8_t type, pgw_sess_t *sess, gx_message_t *gx_message, gtp_create_session_request_t *req); CORE_DECLARE(status_t) pgw_s5c_build_delete_session_response( pkbuf_t **pkbuf, c_uint8_t type, gx_message_t *gx_message, gtp_delete_session_request_t *req); CORE_DECLARE(status_t) pgw_s5c_build_create_bearer_request( pkbuf_t **pkbuf, c_uint8_t type, pgw_bearer_t *bearer); CORE_DECLARE(status_t) pgw_s5c_build_update_bearer_request( pkbuf_t **pkbuf, c_uint8_t type, pgw_bearer_t *bearer, int qos_presence, int tft_presence); CORE_DECLARE(status_t) pgw_s5c_build_delete_bearer_request( pkbuf_t **pkbuf, c_uint8_t type, pgw_bearer_t *bearer); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __PGW_S5C_BUILD_H__ */ nextepc-0.3.10/src/pgw/pgw_s5c_handler.c000066400000000000000000000212671333553357400200600ustar00rootroot00000000000000#define TRACE_MODULE _pgw_s5c_handler #include "core_debug.h" #include "core_lib.h" #include "gtp/gtp_types.h" #include "gtp/gtp_node.h" #include "gtp/gtp_path.h" #include "common/context.h" #include "pgw_event.h" #include "pgw_context.h" #include "pgw_gtp_path.h" #include "pgw_s5c_handler.h" void pgw_s5c_handle_create_session_request( pgw_sess_t *sess, gtp_xact_t *xact, gtp_create_session_request_t *req) { status_t rv; gtp_f_teid_t *sgw_s5c_teid, *sgw_s5u_teid; gtp_node_t *sgw = NULL; pgw_bearer_t *bearer = NULL; gtp_bearer_qos_t bearer_qos; gtp_ambr_t *ambr = NULL; gtp_uli_t uli; c_uint16_t decoded = 0; d_assert(xact, return, "Null param"); d_assert(sess, return, "Null param"); d_assert(req, return, "Null param"); bearer = pgw_default_bearer_in_sess(sess); d_assert(bearer, return, "Null param"); d_trace(3, "[PGW] Create Session Reqeust\n"); if (req->imsi.presence == 0) { d_error("No IMSI"); return; } if (req->sender_f_teid_for_control_plane.presence == 0) { d_error("No TEID"); return; } if (req->bearer_contexts_to_be_created.presence == 0) { d_error("No Bearer"); return; } if (req->bearer_contexts_to_be_created.bearer_level_qos.presence == 0) { d_error("No EPS Bearer QoS"); return; } if (req->bearer_contexts_to_be_created.s5_s8_u_sgw_f_teid.presence == 0) { d_error("No TEID"); return; } if (req->user_location_information.presence == 0) { d_error("No User Location Inforamtion"); return; } /* Set IMSI */ sess->imsi_len = req->imsi.len; memcpy(sess->imsi, req->imsi.data, sess->imsi_len); core_buffer_to_bcd(sess->imsi, sess->imsi_len, sess->imsi_bcd); /* Control Plane(DL) : SGW-S5C */ sgw_s5c_teid = req->sender_f_teid_for_control_plane.data; d_assert(sgw_s5c_teid, return, "Null param"); sess->sgw_s5c_teid = ntohl(sgw_s5c_teid->teid); /* Control Plane(DL) : SGW-S5U */ sgw_s5u_teid = req->bearer_contexts_to_be_created.s5_s8_u_sgw_f_teid.data; d_assert(sgw_s5u_teid, return, "Null param"); bearer->sgw_s5u_teid = ntohl(sgw_s5u_teid->teid); d_trace(5, " SGW_S5C_TEID[0x%x] PGW_S5C_TEID[0x%x]\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); d_trace(5, " SGW_S5U_TEID[%d] PGW_S5U_TEID[%d]\n", bearer->sgw_s5u_teid, bearer->pgw_s5u_teid); sgw = gtp_find_node(&pgw_self()->sgw_s5u_list, sgw_s5u_teid); if (!sgw) { sgw = gtp_add_node_with_teid(&pgw_self()->sgw_s5u_list, sgw_s5u_teid, pgw_self()->gtpu_port, context_self()->parameter.no_ipv4, context_self()->parameter.no_ipv6, context_self()->parameter.prefer_ipv4); d_assert(sgw, return,); rv = gtp_client(sgw); d_assert(rv == CORE_OK, return,); } /* Setup GTP Node */ SETUP_GTP_NODE(bearer, sgw); decoded = gtp_parse_bearer_qos(&bearer_qos, &req->bearer_contexts_to_be_created.bearer_level_qos); d_assert(req->bearer_contexts_to_be_created.bearer_level_qos.len == decoded, return,); sess->pdn.qos.qci = bearer_qos.qci; sess->pdn.qos.arp.priority_level = bearer_qos.priority_level; sess->pdn.qos.arp.pre_emption_capability = bearer_qos.pre_emption_capability; sess->pdn.qos.arp.pre_emption_vulnerability = bearer_qos.pre_emption_vulnerability; /* Set AMBR if available */ if (req->aggregate_maximum_bit_rate.presence) { ambr = req->aggregate_maximum_bit_rate.data; sess->pdn.ambr.downlink = ntohl(ambr->downlink); sess->pdn.ambr.uplink = ntohl(ambr->uplink); } /* Set User Location Information */ decoded = gtp_parse_uli(&uli, &req->user_location_information); d_assert(req->user_location_information.len == decoded, return,); memcpy(&sess->tai.plmn_id, &uli.tai.plmn_id, sizeof(uli.tai.plmn_id)); sess->tai.tac = uli.tai.tac; memcpy(&sess->e_cgi.plmn_id, &uli.e_cgi.plmn_id, sizeof(uli.e_cgi.plmn_id)); sess->e_cgi.cell_id = uli.e_cgi.cell_id; } void pgw_s5c_handle_delete_session_request( pgw_sess_t *sess, gtp_xact_t *xact, gtp_delete_session_request_t *req) { d_assert(sess, return, "Null param"); d_trace(3, "[PGW] Delete Session Request\n"); d_trace(5, " SGW_S5C_TEID[0x%x] PGW_S5C_TEID[0x%x]\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); } void pgw_s5c_handle_create_bearer_response( pgw_sess_t *sess, gtp_xact_t *xact, gtp_create_bearer_response_t *req) { status_t rv; gtp_f_teid_t *sgw_s5u_teid, *pgw_s5u_teid; gtp_node_t *sgw = NULL; pgw_bearer_t *bearer = NULL; d_assert(xact, return, "Null param"); d_assert(sess, return, "Null param"); d_assert(req, return, "Null param"); d_trace(3, "[PGW] Create Bearer Response\n"); d_trace(5, " SGW_S5C_TEID[0x%x] PGW_S5C_TEID[0x%x]\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); if (req->bearer_contexts.presence == 0) { d_error("No Bearer"); return; } if (req->bearer_contexts.eps_bearer_id.presence == 0) { d_error("No EPS Bearer ID"); return; } if (req->bearer_contexts.s5_s8_u_pgw_f_teid.presence == 0) { d_error("No PGW TEID"); return; } if (req->bearer_contexts.s5_s8_u_sgw_f_teid.presence == 0) { d_error("No SGW TEID"); return; } /* Correlate with PGW-S%U-TEID */ pgw_s5u_teid = req->bearer_contexts.s5_s8_u_pgw_f_teid.data; d_assert(pgw_s5u_teid, return, "Null param"); /* Find the Bearer by PGW-S5U-TEID */ bearer = pgw_bearer_find_by_pgw_s5u_teid(ntohl(pgw_s5u_teid->teid)); d_assert(bearer, return, "Null param"); /* Set EBI */ bearer->ebi = req->bearer_contexts.eps_bearer_id.u8; /* Data Plane(DL) : SGW-S5U */ sgw_s5u_teid = req->bearer_contexts.s5_s8_u_sgw_f_teid.data; bearer->sgw_s5u_teid = ntohl(sgw_s5u_teid->teid); sgw = gtp_find_node(&pgw_self()->sgw_s5u_list, sgw_s5u_teid); if (!sgw) { sgw = gtp_add_node_with_teid(&pgw_self()->sgw_s5u_list, sgw_s5u_teid, pgw_self()->gtpu_port, context_self()->parameter.no_ipv4, context_self()->parameter.no_ipv6, context_self()->parameter.prefer_ipv4); d_assert(sgw, return,); rv = gtp_client(sgw); d_assert(rv == CORE_OK, return,); } /* Setup GTP Node */ SETUP_GTP_NODE(bearer, sgw); rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK, return, "xact_commit error"); d_trace(3, "[PGW] Create Bearer Response : SGW[0x%x] --> PGW[0x%x]\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); } void pgw_s5c_handle_update_bearer_response( pgw_sess_t *sess, gtp_xact_t *xact, gtp_update_bearer_response_t *req) { status_t rv; d_assert(xact, return, "Null param"); d_assert(sess, return, "Null param"); d_assert(req, return, "Null param"); d_trace(3, "[PGW] Update Bearer Request\n"); d_trace(5, " SGW_S5C_TEID[0x%x] PGW_S5C_TEID[0x%x]\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); if (req->bearer_contexts.presence == 0) { d_error("No Bearer"); return; } if (req->bearer_contexts.eps_bearer_id.presence == 0) { d_error("No EPS Bearer ID"); return; } rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK, return, "xact_commit error"); d_trace(3, "[PGW] Update Bearer Response : SGW[0x%x] --> PGW[0x%x]\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); } void pgw_s5c_handle_delete_bearer_response( pgw_sess_t *sess, gtp_xact_t *xact, gtp_delete_bearer_response_t *req) { status_t rv; pgw_bearer_t *bearer = NULL; d_assert(xact, return, "Null param"); d_assert(sess, return, "Null param"); d_assert(req, return, "Null param"); d_trace(3, "[PGW] Delete Bearer Request\n"); d_trace(5, " SGW_S5C_TEID[0x%x] PGW_S5C_TEID[0x%x]\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); if (req->bearer_contexts.presence == 0) { d_error("No Bearer"); return; } if (req->bearer_contexts.eps_bearer_id.presence == 0) { d_error("No EPS Bearer ID"); return; } bearer = pgw_bearer_find_by_ebi( sess, req->bearer_contexts.eps_bearer_id.u8); d_assert(bearer, return, "No Bearer Context[EBI:%d]", req->bearer_contexts.eps_bearer_id); rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK, return, "xact_commit error"); d_trace(3, "[PGW] Delete Bearer Response : SGW[0x%x] --> PGW[0x%x]\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); pgw_bearer_remove(bearer); } nextepc-0.3.10/src/pgw/pgw_s5c_handler.h000066400000000000000000000016641333553357400200640ustar00rootroot00000000000000#ifndef __PGW_S5C_HANDLER_H__ #define __PGW_S5C_HANDLER_H__ #include "gtp/gtp_message.h" #include "pgw_context.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(void) pgw_s5c_handle_create_session_request( pgw_sess_t *sess, gtp_xact_t *xact, gtp_create_session_request_t *req); CORE_DECLARE(void) pgw_s5c_handle_delete_session_request( pgw_sess_t *sess, gtp_xact_t *xact, gtp_delete_session_request_t *req); CORE_DECLARE(void) pgw_s5c_handle_create_bearer_response( pgw_sess_t *sess, gtp_xact_t *xact, gtp_create_bearer_response_t *req); CORE_DECLARE(void) pgw_s5c_handle_update_bearer_response( pgw_sess_t *sess, gtp_xact_t *xact, gtp_update_bearer_response_t *req); CORE_DECLARE(void) pgw_s5c_handle_delete_bearer_response( pgw_sess_t *sess, gtp_xact_t *xact, gtp_delete_bearer_response_t *req); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __PGW_S5C_HANDLER_H__ */ nextepc-0.3.10/src/pgw/pgw_sm.c000066400000000000000000000171431333553357400163060ustar00rootroot00000000000000#define TRACE_MODULE _pgw_sm #include "core_debug.h" #include "core_lib.h" #include "gtp/gtp_node.h" #include "fd/fd_lib.h" #include "fd/gx/gx_message.h" #include "pgw_sm.h" #include "pgw_context.h" #include "pgw_event.h" #include "pgw_gtp_path.h" #include "pgw_s5c_handler.h" #include "pgw_gx_handler.h" #include "pgw_fd_path.h" void pgw_state_initial(fsm_t *s, event_t *e) { pgw_sm_trace(3, e); d_assert(s, return, "Null param"); FSM_TRAN(s, &pgw_state_operational); } void pgw_state_final(fsm_t *s, event_t *e) { pgw_sm_trace(3, e); d_assert(s, return, "Null param"); } void pgw_state_operational(fsm_t *s, event_t *e) { status_t rv; pgw_sm_trace(3, e); d_assert(s, return, "Null param"); switch (event_get(e)) { case FSM_ENTRY_SIG: { rv = pgw_gtp_open(); if (rv != CORE_OK) { d_error("Can't establish PGW path"); break; } break; } case FSM_EXIT_SIG: { rv = pgw_gtp_close(); if (rv != CORE_OK) { d_error("Can't close PGW path"); break; } break; } case PGW_EVT_S5C_MESSAGE: { status_t rv; pkbuf_t *recvbuf = (pkbuf_t *)event_get_param1(e); pkbuf_t *copybuf = NULL; c_uint16_t copybuf_len = 0; gtp_xact_t *xact = NULL; gtp_message_t *message = NULL; pgw_sess_t *sess = NULL; d_assert(recvbuf, break, "Null param"); copybuf_len = sizeof(gtp_message_t); copybuf = pkbuf_alloc(0, copybuf_len); d_assert(copybuf, break, "Null param"); message = copybuf->payload; d_assert(message, break, "Null param"); rv = gtp_parse_msg(message, recvbuf); d_assert(rv == CORE_OK, pkbuf_free(recvbuf); pkbuf_free(copybuf); break, "parse error"); if (message->h.teid == 0) { gtp_node_t *sgw = pgw_sgw_add_by_message(message); d_assert(sgw, pkbuf_free(recvbuf);pkbuf_free(copybuf); break,); sess = pgw_sess_add_by_message(message); SETUP_GTP_NODE(sess, sgw); } else { sess = pgw_sess_find_by_teid(message->h.teid); } d_assert(sess, pkbuf_free(recvbuf); pkbuf_free(copybuf); break, "No Session Context"); rv = gtp_xact_receive(sess->gnode, &message->h, &xact); if (rv != CORE_OK) { pkbuf_free(recvbuf); pkbuf_free(copybuf); break; } switch(message->h.type) { case GTP_CREATE_SESSION_REQUEST_TYPE: pgw_s5c_handle_create_session_request( sess, xact, &message->create_session_request); pgw_gx_send_ccr(sess, xact, copybuf, GX_CC_REQUEST_TYPE_INITIAL_REQUEST); break; case GTP_DELETE_SESSION_REQUEST_TYPE: pgw_s5c_handle_delete_session_request( sess, xact, &message->delete_session_request); pgw_gx_send_ccr(sess, xact, copybuf, GX_CC_REQUEST_TYPE_TERMINATION_REQUEST); break; case GTP_CREATE_BEARER_RESPONSE_TYPE: pgw_s5c_handle_create_bearer_response( sess, xact, &message->create_bearer_response); pkbuf_free(copybuf); break; case GTP_UPDATE_BEARER_RESPONSE_TYPE: pgw_s5c_handle_update_bearer_response( sess, xact, &message->update_bearer_response); pkbuf_free(copybuf); break; case GTP_DELETE_BEARER_RESPONSE_TYPE: pgw_s5c_handle_delete_bearer_response( sess, xact, &message->delete_bearer_response); pkbuf_free(copybuf); break; default: d_warn("Not implmeneted(type:%d)", message->h.type); pkbuf_free(copybuf); break; } pkbuf_free(recvbuf); break; } case PGW_EVT_S5C_T3_RESPONSE: case PGW_EVT_S5C_T3_HOLDING: { gtp_xact_timeout(event_get_param1(e), event_get(e)); break; } case PGW_EVT_GX_MESSAGE: { index_t sess_index = event_get_param1(e); pgw_sess_t *sess = NULL; pkbuf_t *gxbuf = (pkbuf_t *)event_get_param2(e); gx_message_t *gx_message = NULL; d_assert(sess_index, return, "Null param"); sess = pgw_sess_find(sess_index); d_assert(sess, return, "Null param"); d_assert(gxbuf, return, "Null param"); gx_message = gxbuf->payload; d_assert(gx_message, return, "Null param"); switch(gx_message->cmd_code) { case GX_CMD_CODE_CREDIT_CONTROL: { index_t xact_index = event_get_param3(e); gtp_xact_t *xact = NULL; pkbuf_t *gtpbuf = (pkbuf_t *)event_get_param4(e); gtp_message_t *message = NULL; d_assert(xact_index, return, "Null param"); xact = gtp_xact_find(xact_index); d_assert(xact, return, "Null param"); d_assert(gtpbuf, return, "Null param"); message = gtpbuf->payload; if (gx_message->result_code != ER_DIAMETER_SUCCESS) { d_error("Diameter Error(%d)", gx_message->result_code); break; } switch(gx_message->cc_request_type) { case GX_CC_REQUEST_TYPE_INITIAL_REQUEST: { pgw_gx_handle_cca_initial_request( sess, gx_message, xact, &message->create_session_request); break; } case GX_CC_REQUEST_TYPE_TERMINATION_REQUEST: { pgw_gx_handle_cca_termination_request( sess, gx_message, xact, &message->delete_session_request); break; } default: { d_error("Not implemented(%d)", event_get_param4(e)); break; } } pkbuf_free(gtpbuf); break; } case GX_CMD_RE_AUTH: { pgw_gx_handle_re_auth_request(sess, gx_message); break; } default: { d_error("Invalid type(%d)", event_get_param3(e)); break; } } gx_message_free(gx_message); pkbuf_free(gxbuf); break; } default: { d_error("No handler for event %s", pgw_event_get_name(e)); break; } } } nextepc-0.3.10/src/pgw/pgw_sm.h000066400000000000000000000011651333553357400163100ustar00rootroot00000000000000#ifndef __PGW_SM_H__ #define __PGW_SM_H__ #include "core_param.h" #include "core_fsm.h" #include "core_event.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ void pgw_state_initial(fsm_t *s, event_t *e); void pgw_state_final(fsm_t *s, event_t *e); void pgw_state_operational(fsm_t *s, event_t *e); void pgw_state_exception(fsm_t *s, event_t *e); #define pgw_sm_print(__pe) \ d_print("%s(): %s\n", __func__, pgw_event_get_name(__pe)) #define pgw_sm_trace(__l, __pe) \ d_trace(__l, "%s(): %s\n", __func__, pgw_event_get_name(__pe)) #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* !__PGW_SM_H__ */ nextepc-0.3.10/src/sgw.c000066400000000000000000000021051333553357400150050ustar00rootroot00000000000000#define TRACE_MODULE _sgw_main #include "core_debug.h" #include "core_signal.h" #include "core_semaphore.h" #include "common/context.h" #include "common/application.h" #include "app_init.h" status_t app_initialize( const char *config_path, const char *log_path, const char *pid_path) { status_t rv; int app = 0; rv = app_log_pid(pid_path, "sgw"); if (rv != CORE_OK) return rv; rv = app_will_initialize(config_path, log_path); if (rv != CORE_OK) return rv; app = context_self()->logger.trace.app; if (app) { d_trace_level(&_sgw_main, app); } d_trace(1, "SGW try to initialize\n"); rv = sgw_initialize(); if (rv != CORE_OK) { d_error("Failed to intialize SGW"); return rv; } d_trace(1, "SGW initialize...done\n"); rv = app_did_initialize(); if (rv != CORE_OK) return rv; return CORE_OK; } void app_terminate(void) { app_will_terminate(); d_trace(1, "SGW try to terminate\n"); sgw_terminate(); d_trace(1, "SGW terminate...done\n"); app_did_terminate(); } nextepc-0.3.10/src/sgw/000077500000000000000000000000001333553357400146435ustar00rootroot00000000000000nextepc-0.3.10/src/sgw/Makefile.am000066400000000000000000000014241333553357400167000ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in. noinst_LTLIBRARIES = libsgw.la libsgw_la_SOURCES = \ sgw_event.h sgw_context.h \ sgw_gtp_path.h sgw_sm.h sgw_s11_handler.h sgw_s5c_handler.h \ sgw_init.c sgw_event.c sgw_context.c \ sgw_gtp_path.c sgw_sm.c sgw_s11_handler.c sgw_s5c_handler.c \ $(NULL) libsgw_la_DEPENDENCIES = \ $(top_srcdir)/lib/gtp/libgtp.la \ $(top_srcdir)/src/common/libcommon.la \ $(NULL) libsgw_la_LIBADD = \ $(top_srcdir)/lib/gtp/libgtp.la \ $(top_srcdir)/src/common/libcommon.la \ $(NULL) AM_CPPFLAGS = \ -I$(top_srcdir)/lib/core/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ @MONGOC_CFLAGS@ \ $(NULL) AM_CFLAGS = \ -Wall -Werror MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = core *.stackdump nextepc-0.3.10/src/sgw/sgw_context.c000066400000000000000000000736111333553357400173630ustar00rootroot00000000000000#define TRACE_MODULE _sgw_context #include "core_debug.h" #include "core_pool.h" #include "core_index.h" #include "core_lib.h" #include #include #include "common/yaml_helper.h" #include "gtp/gtp_types.h" #include "gtp/gtp_conv.h" #include "gtp/gtp_node.h" #include "gtp/gtp_path.h" #include "gtp/gtp_xact.h" #include "common/context.h" #include "sgw_context.h" static sgw_context_t self; index_declare(sgw_ue_pool, sgw_ue_t, MAX_POOL_OF_UE); index_declare(sgw_sess_pool, sgw_sess_t, MAX_POOL_OF_SESS); index_declare(sgw_bearer_pool, sgw_bearer_t, MAX_POOL_OF_BEARER); index_declare(sgw_tunnel_pool, sgw_tunnel_t, MAX_POOL_OF_TUNNEL); static int context_initialized = 0; status_t sgw_context_init() { d_assert(context_initialized == 0, return CORE_ERROR, "SGW context already has been initialized"); memset(&self, 0, sizeof(sgw_context_t)); list_init(&self.gtpc_list); list_init(&self.gtpc_list6); list_init(&self.gtpu_list); list_init(&self.gtpu_list6); gtp_node_init(); list_init(&self.mme_s11_list); list_init(&self.pgw_s5c_list); list_init(&self.enb_s1u_list); list_init(&self.pgw_s5u_list); index_init(&sgw_ue_pool, MAX_POOL_OF_UE); index_init(&sgw_sess_pool, MAX_POOL_OF_SESS); index_init(&sgw_bearer_pool, MAX_POOL_OF_BEARER); index_init(&sgw_tunnel_pool, MAX_POOL_OF_TUNNEL); self.imsi_ue_hash = hash_make(); context_initialized = 1; return CORE_OK; } status_t sgw_context_final() { d_assert(context_initialized == 1, return CORE_ERROR, "SGW context already has been finalized"); sgw_ue_remove_all(); d_assert(self.imsi_ue_hash, , "Null param"); hash_destroy(self.imsi_ue_hash); index_final(&sgw_tunnel_pool); index_final(&sgw_bearer_pool); index_final(&sgw_sess_pool); index_final(&sgw_ue_pool); gtp_remove_all_nodes(&self.mme_s11_list); gtp_remove_all_nodes(&self.pgw_s5c_list); gtp_remove_all_nodes(&self.enb_s1u_list); gtp_remove_all_nodes(&self.pgw_s5u_list); gtp_node_final(); sock_remove_all_nodes(&self.gtpc_list); sock_remove_all_nodes(&self.gtpc_list6); sock_remove_all_nodes(&self.gtpu_list); sock_remove_all_nodes(&self.gtpu_list6); context_initialized = 0; return CORE_OK; } sgw_context_t* sgw_self() { return &self; } static status_t sgw_context_prepare() { self.gtpc_port = GTPV2_C_UDP_PORT; self.gtpu_port = GTPV1_U_UDP_PORT; return CORE_OK; } static status_t sgw_context_validation() { if (list_first(&self.gtpc_list) == NULL && list_first(&self.gtpc_list6) == NULL) { d_error("No sgw.gtpc in '%s'", context_self()->config.path); return CORE_ERROR; } if (list_first(&self.gtpu_list) == NULL && list_first(&self.gtpu_list6) == NULL) { d_error("No sgw.gtpu in '%s'", context_self()->config.path); return CORE_EAGAIN; } return CORE_OK; } status_t sgw_context_parse_config() { status_t rv; config_t *config = &context_self()->config; yaml_document_t *document = NULL; yaml_iter_t root_iter; d_assert(config, return CORE_ERROR,); document = config->document; d_assert(document, return CORE_ERROR,); rv = sgw_context_prepare(); if (rv != CORE_OK) return rv; yaml_iter_init(&root_iter, document); while(yaml_iter_next(&root_iter)) { const char *root_key = yaml_iter_key(&root_iter); d_assert(root_key, return CORE_ERROR,); if (!strcmp(root_key, "sgw")) { yaml_iter_t sgw_iter; yaml_iter_recurse(&root_iter, &sgw_iter); while(yaml_iter_next(&sgw_iter)) { const char *sgw_key = yaml_iter_key(&sgw_iter); d_assert(sgw_key, return CORE_ERROR,); if (!strcmp(sgw_key, "gtpc")) { yaml_iter_t gtpc_array, gtpc_iter; yaml_iter_recurse(&sgw_iter, >pc_array); do { int family = AF_UNSPEC; int i, num = 0; const char *hostname[MAX_NUM_OF_HOSTNAME]; c_uint16_t port = self.gtpc_port; const char *dev = NULL; c_sockaddr_t *list = NULL; sock_node_t *node = NULL; if (yaml_iter_type(>pc_array) == YAML_MAPPING_NODE) { memcpy(>pc_iter, >pc_array, sizeof(yaml_iter_t)); } else if (yaml_iter_type(>pc_array) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(>pc_array)) break; yaml_iter_recurse(>pc_array, >pc_iter); } else if (yaml_iter_type(>pc_array) == YAML_SCALAR_NODE) { break; } else d_assert(0, return CORE_ERROR,); while(yaml_iter_next(>pc_iter)) { const char *gtpc_key = yaml_iter_key(>pc_iter); d_assert(gtpc_key, return CORE_ERROR,); if (!strcmp(gtpc_key, "family")) { const char *v = yaml_iter_value(>pc_iter); if (v) family = atoi(v); if (family != AF_UNSPEC && family != AF_INET && family != AF_INET6) { d_warn("Ignore family(%d) : AF_UNSPEC(%d), " "AF_INET(%d), AF_INET6(%d) ", family, AF_UNSPEC, AF_INET, AF_INET6); family = AF_UNSPEC; } } else if (!strcmp(gtpc_key, "addr") || !strcmp(gtpc_key, "name")) { yaml_iter_t hostname_iter; yaml_iter_recurse(>pc_iter, &hostname_iter); d_assert(yaml_iter_type(&hostname_iter) != YAML_MAPPING_NODE, return CORE_ERROR,); do { if (yaml_iter_type(&hostname_iter) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&hostname_iter)) break; } d_assert(num <= MAX_NUM_OF_HOSTNAME, return CORE_ERROR,); hostname[num++] = yaml_iter_value(&hostname_iter); } while( yaml_iter_type(&hostname_iter) == YAML_SEQUENCE_NODE); } else if (!strcmp(gtpc_key, "port")) { const char *v = yaml_iter_value(>pc_iter); if (v) { port = atoi(v); self.gtpc_port = port; } } else if (!strcmp(gtpc_key, "dev")) { dev = yaml_iter_value(>pc_iter); } else d_warn("unknown key `%s`", gtpc_key); } list = NULL; for (i = 0; i < num; i++) { rv = core_addaddrinfo(&list, family, hostname[i], port, 0); d_assert(rv == CORE_OK, return CORE_ERROR,); } if (list) { if (context_self()->parameter.no_ipv4 == 0) { rv = sock_add_node(&self.gtpc_list, &node, list, AF_INET); d_assert(rv == CORE_OK, return CORE_ERROR,); } if (context_self()->parameter.no_ipv6 == 0) { rv = sock_add_node(&self.gtpc_list6, &node, list, AF_INET6); d_assert(rv == CORE_OK, return CORE_ERROR,); } core_freeaddrinfo(list); } if (dev) { rv = sock_probe_node( context_self()->parameter.no_ipv4 ? NULL : &self.gtpc_list, context_self()->parameter.no_ipv6 ? NULL : &self.gtpc_list6, dev, self.gtpc_port); d_assert(rv == CORE_OK, return CORE_ERROR,); } } while(yaml_iter_type(>pc_array) == YAML_SEQUENCE_NODE); if (list_first(&self.gtpc_list) == NULL && list_first(&self.gtpc_list6) == NULL) { rv = sock_probe_node( context_self()->parameter.no_ipv4 ? NULL : &self.gtpc_list, context_self()->parameter.no_ipv6 ? NULL : &self.gtpc_list6, NULL, self.gtpc_port); d_assert(rv == CORE_OK, return CORE_ERROR,); } } else if (!strcmp(sgw_key, "gtpu")) { yaml_iter_t gtpu_array, gtpu_iter; yaml_iter_recurse(&sgw_iter, >pu_array); do { int family = AF_UNSPEC; int i, num = 0; const char *hostname[MAX_NUM_OF_HOSTNAME]; c_uint16_t port = self.gtpu_port; const char *dev = NULL; c_sockaddr_t *list = NULL; sock_node_t *node = NULL; if (yaml_iter_type(>pu_array) == YAML_MAPPING_NODE) { memcpy(>pu_iter, >pu_array, sizeof(yaml_iter_t)); } else if (yaml_iter_type(>pu_array) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(>pu_array)) break; yaml_iter_recurse(>pu_array, >pu_iter); } else if (yaml_iter_type(>pu_array) == YAML_SCALAR_NODE) { break; } else d_assert(0, return CORE_ERROR,); while(yaml_iter_next(>pu_iter)) { const char *gtpu_key = yaml_iter_key(>pu_iter); d_assert(gtpu_key, return CORE_ERROR,); if (!strcmp(gtpu_key, "family")) { const char *v = yaml_iter_value(>pu_iter); if (v) family = atoi(v); if (family != AF_UNSPEC && family != AF_INET && family != AF_INET6) { d_warn("Ignore family(%d) : AF_UNSPEC(%d), " "AF_INET(%d), AF_INET6(%d) ", family, AF_UNSPEC, AF_INET, AF_INET6); family = AF_UNSPEC; } } else if (!strcmp(gtpu_key, "addr") || !strcmp(gtpu_key, "name")) { yaml_iter_t hostname_iter; yaml_iter_recurse(>pu_iter, &hostname_iter); d_assert(yaml_iter_type(&hostname_iter) != YAML_MAPPING_NODE, return CORE_ERROR,); do { if (yaml_iter_type(&hostname_iter) == YAML_SEQUENCE_NODE) { if (!yaml_iter_next(&hostname_iter)) break; } d_assert(num <= MAX_NUM_OF_HOSTNAME, return CORE_ERROR,); hostname[num++] = yaml_iter_value(&hostname_iter); } while( yaml_iter_type(&hostname_iter) == YAML_SEQUENCE_NODE); } else if (!strcmp(gtpu_key, "port")) { const char *v = yaml_iter_value(>pu_iter); if (v) { port = atoi(v); self.gtpu_port = port; } } else if (!strcmp(gtpu_key, "dev")) { dev = yaml_iter_value(>pu_iter); } else d_warn("unknown key `%s`", gtpu_key); } list = NULL; for (i = 0; i < num; i++) { rv = core_addaddrinfo(&list, family, hostname[i], port, 0); d_assert(rv == CORE_OK, return CORE_ERROR,); } if (list) { if (context_self()->parameter.no_ipv4 == 0) { rv = sock_add_node(&self.gtpu_list, &node, list, AF_INET); d_assert(rv == CORE_OK, return CORE_ERROR,); } if (context_self()->parameter.no_ipv6 == 0) { rv = sock_add_node(&self.gtpu_list6, &node, list, AF_INET6); d_assert(rv == CORE_OK, return CORE_ERROR,); } core_freeaddrinfo(list); } if (dev) { rv = sock_probe_node( context_self()->parameter.no_ipv4 ? NULL : &self.gtpu_list, context_self()->parameter.no_ipv6 ? NULL : &self.gtpu_list6, dev, self.gtpu_port); d_assert(rv == CORE_OK, return CORE_ERROR,); } } while(yaml_iter_type(>pu_array) == YAML_SEQUENCE_NODE); if (list_first(&self.gtpu_list) == NULL && list_first(&self.gtpu_list6) == NULL) { rv = sock_probe_node( context_self()->parameter.no_ipv4 ? NULL : &self.gtpu_list, context_self()->parameter.no_ipv6 ? NULL : &self.gtpu_list6, NULL, self.gtpu_port); d_assert(rv == CORE_OK, return CORE_ERROR,); } } else d_warn("unknown key `%s`", sgw_key); } } } rv = sgw_context_validation(); if (rv != CORE_OK) return rv; return CORE_OK; } status_t sgw_context_setup_trace_module() { int app = context_self()->logger.trace.app; int gtpv2 = context_self()->logger.trace.gtpv2; int gtp = context_self()->logger.trace.gtp; if (app) { extern int _sgw_context; d_trace_level(&_sgw_context, app); } if (gtpv2) { extern int _sgw_sm; d_trace_level(&_sgw_sm, gtpv2); extern int _sgw_s11_handler; d_trace_level(&_sgw_s11_handler, gtpv2); extern int _sgw_s5c_handler; d_trace_level(&_sgw_s5c_handler, gtpv2); extern int _gtp_node; d_trace_level(&_gtp_node, gtpv2); extern int _gtp_message; d_trace_level(&_gtp_message, gtpv2); extern int _gtp_path; d_trace_level(&_gtp_path, gtpv2); extern int _gtp_xact; d_trace_level(&_gtp_xact, gtpv2); extern int _tlv_msg; d_trace_level(&_tlv_msg, gtpv2); } if (gtp) { extern int _sgw_gtp_path; d_trace_level(&_sgw_gtp_path, gtp); } return CORE_OK; } gtp_node_t *sgw_mme_add_by_message(gtp_message_t *message) { status_t rv; gtp_node_t *mme = NULL; gtp_f_teid_t *mme_s11_teid = NULL; gtp_create_session_request_t *req = &message->create_session_request; if (req->sender_f_teid_for_control_plane.presence == 0) { d_error("No Sender F-TEID"); return NULL; } mme_s11_teid = req->sender_f_teid_for_control_plane.data; d_assert(mme_s11_teid, return NULL,); mme = gtp_find_node(&sgw_self()->mme_s11_list, mme_s11_teid); if (!mme) { mme = gtp_add_node_with_teid(&sgw_self()->mme_s11_list, mme_s11_teid, sgw_self()->gtpc_port, context_self()->parameter.no_ipv4, context_self()->parameter.no_ipv6, context_self()->parameter.prefer_ipv4); d_assert(mme, return NULL,); rv = gtp_client(mme); d_assert(rv == CORE_OK, return NULL,); } return mme; } sgw_ue_t *sgw_ue_add_by_message(gtp_message_t *message) { sgw_ue_t *sgw_ue = NULL; gtp_create_session_request_t *req = &message->create_session_request; if (req->imsi.presence == 0) { d_error("No IMSI"); return NULL; } d_trace(9, "sgw_ue_add_by_message() - IMSI "); d_trace_hex(9, req->imsi.data, req->imsi.len); sgw_ue = sgw_ue_find_by_imsi(req->imsi.data, req->imsi.len); if (!sgw_ue) { sgw_ue = sgw_ue_add(req->imsi.data, req->imsi.len); d_assert(sgw_ue, return NULL,); } return sgw_ue; } sgw_ue_t *sgw_ue_add(c_uint8_t *imsi, int imsi_len) { sgw_ue_t *sgw_ue = NULL; d_assert(imsi, return NULL, "Null param"); d_assert(imsi_len, return NULL, "Null param"); index_alloc(&sgw_ue_pool, &sgw_ue); d_assert(sgw_ue, return NULL, "Null param"); sgw_ue->sgw_s11_teid = sgw_ue->index; /* Set IMSI */ sgw_ue->imsi_len = imsi_len; memcpy(sgw_ue->imsi, imsi, sgw_ue->imsi_len); core_buffer_to_bcd(sgw_ue->imsi, sgw_ue->imsi_len, sgw_ue->imsi_bcd); list_init(&sgw_ue->sess_list); hash_set(self.imsi_ue_hash, sgw_ue->imsi, sgw_ue->imsi_len, sgw_ue); return sgw_ue; } status_t sgw_ue_remove(sgw_ue_t *sgw_ue) { d_assert(sgw_ue, return CORE_ERROR, "Null param"); /* Clear hash table */ if (sgw_ue->imsi_len != 0) hash_set(self.imsi_ue_hash, sgw_ue->imsi, sgw_ue->imsi_len, NULL); sgw_sess_remove_all(sgw_ue); index_free(&sgw_ue_pool, sgw_ue); return CORE_OK; } status_t sgw_ue_remove_all() { hash_index_t *hi = NULL; sgw_ue_t *sgw_ue = NULL; for (hi = sgw_ue_first(); hi; hi = sgw_ue_next(hi)) { sgw_ue = sgw_ue_this(hi); sgw_ue_remove(sgw_ue); } return CORE_OK; } static sgw_ue_t* sgw_ue_find(index_t index) { d_assert(index, return NULL, "Invalid index = 0x%x", index); return index_find(&sgw_ue_pool, index); } sgw_ue_t* sgw_ue_find_by_imsi_bcd(c_int8_t *imsi_bcd) { c_uint8_t imsi[MAX_IMSI_LEN]; int imsi_len = 0; d_assert(imsi_bcd, return NULL,"Invalid param"); core_bcd_to_buffer(imsi_bcd, imsi, &imsi_len); return sgw_ue_find_by_imsi(imsi, imsi_len); } sgw_ue_t* sgw_ue_find_by_imsi(c_uint8_t *imsi, int imsi_len) { d_assert(imsi && imsi_len, return NULL,"Invalid param"); return (sgw_ue_t *)hash_get(self.imsi_ue_hash, imsi, imsi_len); } sgw_ue_t* sgw_ue_find_by_teid(c_uint32_t teid) { return sgw_ue_find(teid); } hash_index_t *sgw_ue_first() { d_assert(self.imsi_ue_hash, return NULL, "Null param"); return hash_first(self.imsi_ue_hash); } hash_index_t *sgw_ue_next(hash_index_t *hi) { return hash_next(hi); } sgw_ue_t *sgw_ue_this(hash_index_t *hi) { d_assert(hi, return NULL, "Null param"); return hash_this_val(hi); } sgw_sess_t *sgw_sess_add( sgw_ue_t *sgw_ue, c_int8_t *apn, c_uint8_t ebi) { sgw_sess_t *sess = NULL; sgw_bearer_t *bearer = NULL; d_assert(sgw_ue, return NULL, "Null param"); d_assert(ebi, return NULL, "Invalid EBI(%d)", ebi); index_alloc(&sgw_sess_pool, &sess); d_assert(sess, return NULL, "Null param"); sess->sgw_s5c_teid = SGW_S5C_INDEX_TO_TEID(sess->index); /* Set APN */ core_cpystrn(sess->pdn.apn, apn, MAX_APN_LEN+1); sess->sgw_ue = sgw_ue; sess->gnode = NULL; list_init(&sess->bearer_list); bearer = sgw_bearer_add(sess); d_assert(bearer, sgw_sess_remove(sess); return NULL, "Can't add default bearer context"); bearer->ebi = ebi; list_append(&sgw_ue->sess_list, sess); return sess; } status_t sgw_sess_remove(sgw_sess_t *sess) { d_assert(sess, return CORE_ERROR, "Null param"); d_assert(sess->sgw_ue, return CORE_ERROR, "Null param"); list_remove(&sess->sgw_ue->sess_list, sess); sgw_bearer_remove_all(sess); index_free(&sgw_sess_pool, sess); return CORE_OK; } status_t sgw_sess_remove_all(sgw_ue_t *sgw_ue) { sgw_sess_t *sess = NULL, *next_sess = NULL; sess = sgw_sess_first(sgw_ue); while (sess) { next_sess = sgw_sess_next(sess); sgw_sess_remove(sess); sess = next_sess; } return CORE_OK; } static sgw_sess_t* sgw_sess_find(index_t index) { d_assert(index, return NULL, "Invalid Index"); return index_find(&sgw_sess_pool, index); } sgw_sess_t* sgw_sess_find_by_teid(c_uint32_t teid) { return sgw_sess_find(SGW_S5C_TEID_TO_INDEX(teid)); } sgw_sess_t* sgw_sess_find_by_apn(sgw_ue_t *sgw_ue, c_int8_t *apn) { sgw_sess_t *sess = NULL; sess = sgw_sess_first(sgw_ue); while (sess) { if (strcmp(sess->pdn.apn, apn) == 0) return sess; sess = sgw_sess_next(sess); } return NULL; } sgw_sess_t* sgw_sess_find_by_ebi(sgw_ue_t *sgw_ue, c_uint8_t ebi) { sgw_bearer_t *bearer = NULL; bearer = sgw_bearer_find_by_ue_ebi(sgw_ue, ebi); if (bearer) return bearer->sess; return NULL; } sgw_sess_t* sgw_sess_first(sgw_ue_t *sgw_ue) { return list_first(&sgw_ue->sess_list); } sgw_sess_t* sgw_sess_next(sgw_sess_t *sess) { return list_next(sess); } sgw_bearer_t* sgw_bearer_add(sgw_sess_t *sess) { sgw_bearer_t *bearer = NULL; sgw_tunnel_t *tunnel = NULL; sgw_ue_t *sgw_ue = NULL; d_assert(sess, return NULL, "Null param"); sgw_ue = sess->sgw_ue; d_assert(sgw_ue, return NULL, "Null param"); index_alloc(&sgw_bearer_pool, &bearer); d_assert(bearer, return NULL, "Bearer context allocation failed"); bearer->sgw_ue = sgw_ue; bearer->sess = sess; list_init(&bearer->tunnel_list); tunnel = sgw_tunnel_add(bearer, GTP_F_TEID_S1_U_SGW_GTP_U); d_assert(tunnel, return NULL, "Tunnel context allocation failed"); tunnel = sgw_tunnel_add(bearer, GTP_F_TEID_S5_S8_SGW_GTP_U); d_assert(tunnel, return NULL, "Tunnel context allocation failed"); list_append(&sess->bearer_list, bearer); return bearer; } status_t sgw_bearer_remove(sgw_bearer_t *bearer) { int i; d_assert(bearer, return CORE_ERROR, "Null param"); d_assert(bearer->sess, return CORE_ERROR, "Null param"); list_remove(&bearer->sess->bearer_list, bearer); sgw_tunnel_remove_all(bearer); /* Free the buffered packets */ for (i = 0; i < bearer->num_buffered_pkt; i++) pkbuf_free(bearer->buffered_pkts[i]); index_free(&sgw_bearer_pool, bearer); return CORE_OK; } status_t sgw_bearer_remove_all(sgw_sess_t *sess) { sgw_bearer_t *bearer = NULL, *next_bearer = NULL; d_assert(sess, return CORE_ERROR, "Null param"); bearer = list_first(&sess->bearer_list); while (bearer) { next_bearer = list_next(bearer); sgw_bearer_remove(bearer); bearer = next_bearer; } return CORE_OK; } sgw_bearer_t* sgw_bearer_find(index_t index) { d_assert(index && index < MAX_POOL_OF_BEARER, return NULL, "Invalid Index(%d)",index); return index_find(&sgw_bearer_pool, index); } sgw_bearer_t* sgw_bearer_find_by_sgw_s5u_teid(c_uint32_t sgw_s5u_teid) { return sgw_bearer_find(sgw_s5u_teid); } sgw_bearer_t* sgw_bearer_find_by_sess_ebi(sgw_sess_t *sess, c_uint8_t ebi) { sgw_bearer_t *bearer = NULL; bearer = sgw_bearer_first(sess); while(bearer) { if (ebi == bearer->ebi) return bearer; bearer = sgw_bearer_next(bearer); } return NULL; } sgw_bearer_t* sgw_bearer_find_by_ue_ebi(sgw_ue_t *sgw_ue, c_uint8_t ebi) { sgw_sess_t *sess = NULL; sgw_bearer_t *bearer = NULL; sess = sgw_sess_first(sgw_ue); while (sess) { bearer = sgw_bearer_find_by_sess_ebi(sess, ebi); if (bearer) { return bearer; } sess = sgw_sess_next(sess); } return NULL; } sgw_bearer_t* sgw_default_bearer_in_sess(sgw_sess_t *sess) { return sgw_bearer_first(sess); } sgw_bearer_t* sgw_bearer_first(sgw_sess_t *sess) { d_assert(sess, return NULL, "Null param"); return list_first(&sess->bearer_list); } sgw_bearer_t* sgw_bearer_next(sgw_bearer_t *bearer) { return list_next(bearer); } sgw_tunnel_t* sgw_tunnel_add(sgw_bearer_t *bearer, c_uint8_t interface_type) { sgw_tunnel_t *tunnel = NULL; d_assert(bearer, return NULL, "Null param"); index_alloc(&sgw_tunnel_pool, &tunnel); d_assert(tunnel, return NULL, "Tunnel context allocation failed"); tunnel->interface_type = interface_type; tunnel->local_teid = tunnel->index; tunnel->bearer = bearer; tunnel->gnode = NULL; list_append(&bearer->tunnel_list, tunnel); return tunnel; } status_t sgw_tunnel_remove(sgw_tunnel_t *tunnel) { d_assert(tunnel, return CORE_ERROR, "Null param"); d_assert(tunnel->bearer, return CORE_ERROR, "Null param"); list_remove(&tunnel->bearer->tunnel_list, tunnel); index_free(&sgw_tunnel_pool, tunnel); return CORE_OK; } status_t sgw_tunnel_remove_all(sgw_bearer_t *bearer) { sgw_tunnel_t *tunnel = NULL, *next_tunnel = NULL; d_assert(bearer, return CORE_ERROR, "Null param"); tunnel = sgw_tunnel_first(bearer); while (tunnel) { next_tunnel = sgw_tunnel_next(tunnel); sgw_tunnel_remove(tunnel); tunnel = next_tunnel; } return CORE_OK; } sgw_tunnel_t* sgw_tunnel_find(index_t index) { d_assert(index && index < MAX_POOL_OF_TUNNEL, return NULL, "Invalid Index(%d)",index); return index_find(&sgw_tunnel_pool, index); } sgw_tunnel_t* sgw_tunnel_find_by_teid(c_uint32_t teid) { return sgw_tunnel_find(teid); } sgw_tunnel_t* sgw_tunnel_find_by_interface_type( sgw_bearer_t *bearer, c_uint8_t interface_type) { sgw_tunnel_t *tunnel = NULL; d_assert(bearer, return NULL,); tunnel = sgw_tunnel_first(bearer); while(tunnel) { if (tunnel->interface_type == interface_type) { return tunnel; } tunnel = sgw_tunnel_next(tunnel); } return NULL; } sgw_tunnel_t* sgw_s1u_tunnel_in_bearer(sgw_bearer_t *bearer) { return sgw_tunnel_find_by_interface_type( bearer, GTP_F_TEID_S1_U_SGW_GTP_U); } sgw_tunnel_t* sgw_s5u_tunnel_in_bearer(sgw_bearer_t *bearer) { return sgw_tunnel_find_by_interface_type( bearer, GTP_F_TEID_S5_S8_SGW_GTP_U); } sgw_tunnel_t* sgw_tunnel_first(sgw_bearer_t *bearer) { d_assert(bearer, return NULL, "Null param"); return list_first(&bearer->tunnel_list); } sgw_tunnel_t* sgw_tunnel_next(sgw_tunnel_t *tunnel) { return list_next(tunnel); } nextepc-0.3.10/src/sgw/sgw_context.h000066400000000000000000000167361333553357400173750ustar00rootroot00000000000000#ifndef __SGW_CONTEXT_H__ #define __SGW_CONTEXT_H__ #include "core_list.h" #include "core_index.h" #include "core_errno.h" #include "core_event.h" #include "core_hash.h" #include "core_network.h" #include "3gpp_types.h" #include "gtp/gtp_types.h" #include "gtp/gtp_message.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef struct _sgw_tunnel_t sgw_tunnel_t; typedef struct _gtp_node_t gtp_node_t; typedef struct _sgw_context_t { c_uint32_t gtpc_port; /* Default GTPC port */ c_uint32_t gtpu_port; /* Default GTPU port */ list_t gtpc_list; /* SGW GTPC IPv4 Server List */ list_t gtpc_list6; /* SGW GTPC IPv6 Server List */ sock_id gtpc_sock; /* SGW GTPC IPv4 Socket */ sock_id gtpc_sock6; /* SGW GTPC IPv6 Socket */ c_sockaddr_t *gtpc_addr; /* SGW GTPC IPv4 Address */ c_sockaddr_t *gtpc_addr6; /* SGW GTPC IPv6 Address */ list_t gtpu_list; /* SGW GTPU IPv4 Server List */ list_t gtpu_list6; /* SGW GTPU IPv6 Server List */ sock_id gtpu_sock; /* SGW GTPU IPv4 Socket */ sock_id gtpu_sock6; /* SGW GTPU IPv6 Socket */ c_sockaddr_t *gtpu_addr; /* SGW GTPU IPv4 Address */ c_sockaddr_t *gtpu_addr6; /* SGW GTPU IPv6 Address */ msgq_id queue_id; /* Queue for processing SGW control plane */ tm_service_t tm_service;/* Timer Service */ list_t mme_s11_list; /* MME GTPC Node List */ list_t pgw_s5c_list; /* PGW GTPC Node List */ list_t enb_s1u_list; /* eNB GTPU Node List */ list_t pgw_s5u_list; /* PGW GTPU Node List */ hash_t *imsi_ue_hash; /* hash table (IMSI : SGW_UE) */ } sgw_context_t; typedef struct _sgw_ue_t { index_t index; /* An index of this node */ c_uint32_t sgw_s11_teid; /* SGW-S11-TEID is derived from INDEX */ c_uint32_t mme_s11_teid; /* MME-S11-TEID is received from MME */ /* UE identity */ c_uint8_t imsi[MAX_IMSI_LEN]; int imsi_len; c_int8_t imsi_bcd[MAX_IMSI_BCD_LEN+1]; #define SGW_S1U_INACTIVE 0x0001 #define SGW_DL_NOTI_SENT 0x0002 #define SGW_GET_UE_STATE(__uE) ((__uE)->state) #define SGW_SET_UE_STATE(__uE,__sTATE) ((__uE)->state |= (__sTATE)) #define SGW_RESET_UE_STATE(__uE, __sTATE) ((__uE)->state &= ~(__sTATE)) c_uint32_t state; list_t sess_list; gtp_node_t *gnode; } sgw_ue_t; typedef struct _sgw_sess_t { lnode_t node; /* A node of list_t */ index_t index; /* An index of this node */ /* * SGW-S5C-TEID = INDEX | 0x80000000 * INDEX = SGW-S5C-TEID & ~0x80000000 */ #define SGW_S5C_TEID(__tEID) (__tEID & 0x80000000) #define SGW_S5C_TEID_TO_INDEX(__iNDEX) (__iNDEX & ~0x80000000) #define SGW_S5C_INDEX_TO_TEID(__iNDEX) (__iNDEX | 0x80000000) c_uint32_t sgw_s5c_teid; /* SGW-S5C-TEID is derived from INDEX */ c_uint32_t pgw_s5c_teid; /* PGW-S5C-TEID is received from PGW */ /* APN Configuration */ pdn_t pdn; list_t bearer_list; /* Related Context */ gtp_node_t *gnode; sgw_ue_t *sgw_ue; } sgw_sess_t; typedef struct _sgw_bearer_t { lnode_t node; /**< A node of list_t */ index_t index; c_uint8_t ebi; /* User-Lication-Info */ tai_t tai; e_cgi_t e_cgi; /* Pkts which will be buffered in case of UE-IDLE */ c_uint32_t num_buffered_pkt; /* FIXME: The value should be depdendant on the clbuf number. */ #define MAX_NUM_BUFFER_PKT 10 pkbuf_t* buffered_pkts[MAX_NUM_BUFFER_PKT]; list_t tunnel_list; sgw_sess_t *sess; sgw_ue_t *sgw_ue; } sgw_bearer_t; typedef struct _sgw_tunnel_t { lnode_t node; /**< A node of list_t */ index_t index; c_uint8_t interface_type; c_uint32_t local_teid; c_uint32_t remote_teid; /* Related Context */ sgw_bearer_t *bearer; gtp_node_t *gnode; } sgw_tunnel_t; CORE_DECLARE(status_t) sgw_context_init(void); CORE_DECLARE(status_t) sgw_context_final(void); CORE_DECLARE(sgw_context_t*) sgw_self(void); CORE_DECLARE(status_t) sgw_context_parse_config(void); CORE_DECLARE(status_t) sgw_context_setup_trace_module(void); CORE_DECLARE(gtp_node_t *) sgw_mme_add_by_message(gtp_message_t *message); CORE_DECLARE(sgw_ue_t *) sgw_ue_add_by_message(gtp_message_t *message); CORE_DECLARE(sgw_ue_t*) sgw_ue_add(c_uint8_t *imsi, int imsi_len); CORE_DECLARE(status_t) sgw_ue_remove(sgw_ue_t *sgw_ue); CORE_DECLARE(status_t) sgw_ue_remove_all(); CORE_DECLARE(sgw_ue_t*) sgw_ue_find_by_imsi(c_uint8_t *imsi, int imsi_len); CORE_DECLARE(sgw_ue_t*) sgw_ue_find_by_imsi_bcd(c_int8_t *imsi_bcd); CORE_DECLARE(sgw_ue_t*) sgw_ue_find_by_teid(c_uint32_t teid); CORE_DECLARE(hash_index_t *) sgw_ue_first(); CORE_DECLARE(hash_index_t *) sgw_ue_next(hash_index_t *hi); CORE_DECLARE(sgw_ue_t *) sgw_ue_this(hash_index_t *hi); CORE_DECLARE(sgw_sess_t*) sgw_sess_add(sgw_ue_t *sgw_ue, c_int8_t *apn, c_uint8_t ebi); CORE_DECLARE(status_t ) sgw_sess_remove(sgw_sess_t *sess); CORE_DECLARE(status_t ) sgw_sess_remove_all(sgw_ue_t *sgw_ue); CORE_DECLARE(sgw_sess_t*) sgw_sess_find_by_apn( sgw_ue_t *sgw_ue, c_int8_t *apn); CORE_DECLARE(sgw_sess_t*) sgw_sess_find_by_ebi( sgw_ue_t *sgw_ue, c_uint8_t ebi); CORE_DECLARE(sgw_sess_t*) sgw_sess_find_by_teid(c_uint32_t teid); CORE_DECLARE(sgw_sess_t*) sgw_sess_first(sgw_ue_t *sgw_ue); CORE_DECLARE(sgw_sess_t*) sgw_sess_next(sgw_sess_t *sess); CORE_DECLARE(sgw_bearer_t*) sgw_bearer_add(sgw_sess_t *sess); CORE_DECLARE(status_t) sgw_bearer_remove(sgw_bearer_t *bearer); CORE_DECLARE(status_t) sgw_bearer_remove_all(sgw_sess_t *sess); CORE_DECLARE(sgw_bearer_t*) sgw_bearer_find(index_t index); CORE_DECLARE(sgw_bearer_t*) sgw_bearer_find_by_sgw_s5u_teid( c_uint32_t sgw_s5u_teid); CORE_DECLARE(sgw_bearer_t*) sgw_bearer_find_by_sess_ebi( sgw_sess_t *sess, c_uint8_t ebi); CORE_DECLARE(sgw_bearer_t*) sgw_bearer_find_by_ue_ebi( sgw_ue_t *sgw_ue, c_uint8_t ebi); CORE_DECLARE(sgw_bearer_t*) sgw_default_bearer_in_sess(sgw_sess_t *sess); CORE_DECLARE(sgw_bearer_t*) sgw_bearer_first(sgw_sess_t *sess); CORE_DECLARE(sgw_bearer_t*) sgw_bearer_next(sgw_bearer_t *bearer); CORE_DECLARE(sgw_bearer_t*) sgw_bearer_find(index_t index); CORE_DECLARE(sgw_tunnel_t*) sgw_tunnel_add( sgw_bearer_t *bearer, c_uint8_t interface_type); CORE_DECLARE(status_t) sgw_tunnel_remove(sgw_tunnel_t *tunnel); CORE_DECLARE(status_t) sgw_tunnel_remove_all(sgw_bearer_t *bearer); CORE_DECLARE(sgw_tunnel_t*) sgw_tunnel_find(index_t index); CORE_DECLARE(sgw_tunnel_t*) sgw_tunnel_find_by_teid(c_uint32_t teid); CORE_DECLARE(sgw_tunnel_t*) sgw_tunnel_find_by_interface_type( sgw_bearer_t *bearer, c_uint8_t interface_type); CORE_DECLARE(sgw_tunnel_t*) sgw_s1u_tunnel_in_bearer(sgw_bearer_t *bearer); CORE_DECLARE(sgw_tunnel_t*) sgw_s5u_tunnel_in_bearer(sgw_bearer_t *bearer); CORE_DECLARE(sgw_tunnel_t*) sgw_tunnel_first(sgw_bearer_t *bearer); CORE_DECLARE(sgw_tunnel_t*) sgw_tunnel_next(sgw_tunnel_t *tunnel); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __SGW_CONTEXT_H__ */ nextepc-0.3.10/src/sgw/sgw_event.c000066400000000000000000000013201333553357400170040ustar00rootroot00000000000000#define TRACE_MODULE _sgw_event #include "sgw_event.h" #include "sgw_context.h" char* sgw_event_get_name(event_t *e) { if (e == NULL) return FSM_NAME_INIT_SIG; switch (event_get(e)) { case FSM_ENTRY_SIG: return FSM_NAME_ENTRY_SIG; case FSM_EXIT_SIG: return FSM_NAME_EXIT_SIG; case SGW_EVT_S11_MESSAGE: return "SGW_EVT_S11_MESSAGE"; case SGW_EVT_S5C_MESSAGE: return "SGW_EVT_S5C_MESSAGE"; case SGW_EVT_T3_RESPONSE: return "SGW_EVT_T3_RESPONSE"; case SGW_EVT_T3_HOLDING: return "SGW_EVT_T3_HOLDING"; default: break; } return EVT_NAME_UNKNOWN; } nextepc-0.3.10/src/sgw/sgw_event.h000066400000000000000000000010711333553357400170140ustar00rootroot00000000000000#ifndef __SGW_EVENT_H__ #define __SGW_EVENT_H__ #include "core_event.h" #include "core_fsm.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ typedef enum { SGW_EVT_BASE = FSM_USER_SIG, SGW_EVT_S11_MESSAGE, SGW_EVT_S5C_MESSAGE, SGW_EVT_T3_RESPONSE, SGW_EVT_T3_HOLDING, SGW_EVT_LO_DLDATA_NOTI, SGW_EVT_TOP, } event_e; #define sgw_event_send(__ptr_e) event_send(sgw_self()->queue_id, (__ptr_e)) CORE_DECLARE(char*) sgw_event_get_name(event_t *e); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __SGW_EVENT_H__ */ nextepc-0.3.10/src/sgw/sgw_gtp_path.c000066400000000000000000000263411333553357400175030ustar00rootroot00000000000000#define TRACE_MODULE _sgw_gtp_path #include "core_debug.h" #include "core_pkbuf.h" #include "3gpp_types.h" #include "gtp/gtp_types.h" #include "gtp/gtp_node.h" #include "gtp/gtp_path.h" #include "sgw_context.h" #include "sgw_event.h" #include "sgw_gtp_path.h" static int _gtpv2_c_recv_cb(sock_id sock, void *data) { event_t e; status_t rv; gtp_header_t *gtp_h = NULL; c_uint32_t teid = 0; pkbuf_t *pkbuf = NULL; d_assert(sock, return -1, "Null param"); rv = gtp_recv(sock, &pkbuf); if (rv != CORE_OK) { if (errno == EAGAIN) return 0; return -1; } gtp_h = (gtp_header_t *)pkbuf->payload; d_assert(gtp_h, return -1, "Null param"); d_assert(gtp_h->teid_presence, return -1,); teid = ntohl(gtp_h->teid); if (SGW_S5C_TEID(teid)) { event_set(&e, SGW_EVT_S5C_MESSAGE); } else { event_set(&e, SGW_EVT_S11_MESSAGE); } event_set_param1(&e, (c_uintptr_t)pkbuf); rv = sgw_event_send(&e); if (rv != CORE_OK) { d_error("sgw_event_send error"); pkbuf_free(pkbuf); return -1; } return 0; } static int _gtpv1_u_recv_cb(sock_id sock, void *data) { char buf[CORE_ADDRSTRLEN]; status_t rv; pkbuf_t *pkbuf = NULL; c_sockaddr_t from; gtp_header_t *gtp_h = NULL; sgw_bearer_t *bearer = NULL; sgw_tunnel_t *tunnel = NULL; c_uint32_t teid; int i; d_assert(sock, return -1, "Null param"); rv = gtp_recvfrom(sock, &pkbuf, &from); if (rv != CORE_OK) { if (errno == EAGAIN) return 0; return -1; } d_trace(50, "[SGW] RECV : "); d_trace_hex(50, pkbuf->payload, pkbuf->len); gtp_h = (gtp_header_t *)pkbuf->payload; if (gtp_h->type == GTPU_MSGTYPE_ECHO_REQ) { pkbuf_t *echo_rsp; d_trace(3, "[SGW] RECV Echo Request from [%s]\n", CORE_ADDR(&from, buf)); echo_rsp = gtp_handle_echo_req(pkbuf); if (echo_rsp) { ssize_t sent; /* Echo reply */ d_trace(3, "[SGW] SEND Echo Response to [%s]\n", CORE_ADDR(&from, buf)); sent = core_sendto(sock, echo_rsp->payload, echo_rsp->len, 0, &from); if (sent < 0 || sent != echo_rsp->len) { d_error("core_sendto failed(%d:%s)", errno, strerror(errno)); } pkbuf_free(echo_rsp); } } else if (gtp_h->type == GTPU_MSGTYPE_GPDU || gtp_h->type == GTPU_MSGTYPE_END_MARKER) { teid = ntohl(gtp_h->teid); if (gtp_h->type == GTPU_MSGTYPE_GPDU) d_trace(3, "[SGW] RECV GPU-U from [%s] : TEID[0x%x]\n", CORE_ADDR(&from, buf), teid); else if (gtp_h->type == GTPU_MSGTYPE_END_MARKER) d_trace(3, "[SGW] RECV End Marker from [%s] : TEID[0x%x]\n", CORE_ADDR(&from, buf), teid); tunnel = sgw_tunnel_find_by_teid(teid); if (!tunnel) { if (gtp_h->type == GTPU_MSGTYPE_GPDU) d_warn("[SGW] RECV GPU-U from [%s] : No TEID[0x%x]", CORE_ADDR(&from, buf), teid); else if (gtp_h->type == GTPU_MSGTYPE_END_MARKER) d_warn("[SGW] RECV End Marker from [%s] : No TEID[0x%x]", CORE_ADDR(&from, buf), teid); pkbuf_free(pkbuf); return 0; } bearer = tunnel->bearer; d_assert(bearer, pkbuf_free(pkbuf); return 0, "Null param"); /* Convert TEID */ if (tunnel->interface_type == GTP_F_TEID_S1_U_SGW_GTP_U) { sgw_tunnel_t *s5u_tunnel = NULL; s5u_tunnel = sgw_s5u_tunnel_in_bearer(bearer); d_assert(s5u_tunnel, pkbuf_free(pkbuf); return 0,); d_assert(s5u_tunnel->gnode, pkbuf_free(pkbuf); return 0,); d_assert(s5u_tunnel->gnode->sock, pkbuf_free(pkbuf); return 0,); d_trace(3, "[SGW] SEND GPU-U to PGW[%s]: TEID[0x%x]\n", CORE_ADDR(sock_remote_addr(s5u_tunnel->gnode->sock), buf), s5u_tunnel->remote_teid); gtp_h->teid = htonl(s5u_tunnel->remote_teid); gtp_send(s5u_tunnel->gnode, pkbuf); } else if (tunnel->interface_type == GTP_F_TEID_SGW_GTP_U_FOR_DL_DATA_FORWARDING || tunnel->interface_type == GTP_F_TEID_SGW_GTP_U_FOR_UL_DATA_FORWARDING) { sgw_tunnel_t *indirect_tunnel = NULL; indirect_tunnel = sgw_tunnel_find_by_interface_type(bearer, tunnel->interface_type); d_assert(indirect_tunnel, pkbuf_free(pkbuf); return 0,); d_assert(indirect_tunnel->gnode, pkbuf_free(pkbuf); return 0,); d_assert(indirect_tunnel->gnode->sock, pkbuf_free(pkbuf); return 0,); d_trace(3, "[SGW] SEND GPU-U to Indirect Tunnel[%s]: TEID[0x%x]\n", CORE_ADDR(sock_remote_addr(indirect_tunnel->gnode->sock), buf), indirect_tunnel->remote_teid); gtp_h->teid = htonl(indirect_tunnel->remote_teid); gtp_send(indirect_tunnel->gnode, pkbuf); } else if (tunnel->interface_type == GTP_F_TEID_S5_S8_SGW_GTP_U) { sgw_tunnel_t *s1u_tunnel = NULL; s1u_tunnel = sgw_s1u_tunnel_in_bearer(bearer); d_assert(s1u_tunnel, pkbuf_free(pkbuf); return 0, "Null param"); if (s1u_tunnel->remote_teid) { d_assert(s1u_tunnel->gnode, pkbuf_free(pkbuf); return 0,); d_assert(s1u_tunnel->gnode->sock, pkbuf_free(pkbuf); return 0,); d_trace(3, "[SGW] SEND GPU-U to ENB[%s]: TEID[0x%x]\n", CORE_ADDR(sock_remote_addr(s1u_tunnel->gnode->sock), buf), s1u_tunnel->remote_teid); /* If there is buffered packet, send it first */ for (i = 0; i < bearer->num_buffered_pkt; i++) { gtp_header_t *gtp_h = NULL; gtp_h = (gtp_header_t *)bearer->buffered_pkts[i]->payload; gtp_h->teid = htonl(s1u_tunnel->remote_teid); gtp_send(s1u_tunnel->gnode, bearer->buffered_pkts[i]); pkbuf_free(bearer->buffered_pkts[i]); } bearer->num_buffered_pkt = 0; gtp_h->teid = htonl(s1u_tunnel->remote_teid); gtp_send(s1u_tunnel->gnode, pkbuf); } else { /* S1U path is deactivated. * Send downlink_data_notification to MME. * */ sgw_ue_t *sgw_ue = NULL; d_assert(bearer->sess, pkbuf_free(pkbuf); return 0, "Session is NULL"); d_assert(bearer->sess->sgw_ue, pkbuf_free(pkbuf); return 0, "SGW_UE is NULL"); sgw_ue = bearer->sess->sgw_ue; d_trace(3, "[SGW] S1U PATH deactivated : STATE[0x%x]\n", SGW_GET_UE_STATE(sgw_ue)); if ((SGW_GET_UE_STATE(sgw_ue) & SGW_S1U_INACTIVE)) { d_trace(5, " SGW-S1U Inactive\n"); if (!(SGW_GET_UE_STATE(sgw_ue) & SGW_DL_NOTI_SENT)) { event_t e; status_t rv; d_trace(5, " EVENT DL Data Notification\n"); event_set(&e, SGW_EVT_LO_DLDATA_NOTI); event_set_param1(&e, (c_uintptr_t)bearer->index); rv = sgw_event_send(&e); if (rv != CORE_OK) { d_error("sgw_event_send error"); pkbuf_free(pkbuf); return 0; } SGW_SET_UE_STATE(sgw_ue, SGW_DL_NOTI_SENT); } /* Buffer the packet */ if (bearer->num_buffered_pkt < MAX_NUM_BUFFER_PKT) { bearer->buffered_pkts[bearer->num_buffered_pkt++] = pkbuf; return 0; } } else { /* UE is S1U_ACTIVE state but there is no s1u teid */ d_trace(5, "[SGW] UE is ACITVE but there is no matched " "ENB_S1U_TEID[%d]", teid); /* Just drop it */ } } } } pkbuf_free(pkbuf); return 0; } status_t sgw_gtp_open() { status_t rv; rv = gtp_server_list(&sgw_self()->gtpc_list, _gtpv2_c_recv_cb); d_assert(rv == CORE_OK, return CORE_ERROR,); rv = gtp_server_list(&sgw_self()->gtpc_list6, _gtpv2_c_recv_cb); d_assert(rv == CORE_OK, return CORE_ERROR,); sgw_self()->gtpc_sock = gtp_local_sock_first(&sgw_self()->gtpc_list); sgw_self()->gtpc_sock6 = gtp_local_sock_first(&sgw_self()->gtpc_list6); sgw_self()->gtpc_addr = gtp_local_addr_first(&sgw_self()->gtpc_list); sgw_self()->gtpc_addr6 = gtp_local_addr_first(&sgw_self()->gtpc_list6); d_assert(sgw_self()->gtpc_addr || sgw_self()->gtpc_addr6, return CORE_ERROR, "No GTP Server"); rv = gtp_server_list(&sgw_self()->gtpu_list, _gtpv1_u_recv_cb); d_assert(rv == CORE_OK, return CORE_ERROR,); rv = gtp_server_list(&sgw_self()->gtpu_list6, _gtpv1_u_recv_cb); d_assert(rv == CORE_OK, return CORE_ERROR,); sgw_self()->gtpu_sock = gtp_local_sock_first(&sgw_self()->gtpu_list); sgw_self()->gtpu_sock6 = gtp_local_sock_first(&sgw_self()->gtpu_list6); sgw_self()->gtpu_addr = gtp_local_addr_first(&sgw_self()->gtpu_list); sgw_self()->gtpu_addr6 = gtp_local_addr_first(&sgw_self()->gtpu_list6); d_assert(sgw_self()->gtpu_addr || sgw_self()->gtpu_addr6, return CORE_ERROR, "No GTP Server"); return CORE_OK; } status_t sgw_gtp_close() { sock_delete_list(&sgw_self()->gtpc_list); sock_delete_list(&sgw_self()->gtpc_list6); sock_delete_list(&sgw_self()->gtpu_list); sock_delete_list(&sgw_self()->gtpu_list6); return CORE_OK; } status_t sgw_gtp_send_end_marker(sgw_tunnel_t *s1u_tunnel) { char buf[CORE_ADDRSTRLEN]; status_t rv; pkbuf_t *pkbuf = NULL; gtp_header_t *h = NULL; d_assert(s1u_tunnel, return CORE_ERROR,); d_assert(s1u_tunnel->gnode, return CORE_ERROR,); d_assert(s1u_tunnel->gnode->sock, return CORE_ERROR,); d_trace(3, "[SGW] SEND End Marker to ENB[%s]: TEID[0x%x]\n", CORE_ADDR(sock_remote_addr(s1u_tunnel->gnode->sock), buf), s1u_tunnel->remote_teid); pkbuf = pkbuf_alloc(0, 100 /* enough for END_MARKER; use smaller buffer */); d_assert(pkbuf, return CORE_ERROR,); h = (gtp_header_t *)pkbuf->payload; memset(h, 0, GTPV1U_HEADER_LEN); /* * Flags * 0x20 - Version : GTP release 99 version (1) * 0x10 - Protocol Type : GTP (1) */ h->flags = 0x30; h->type = GTPU_MSGTYPE_END_MARKER; h->teid = htonl(s1u_tunnel->remote_teid); rv = gtp_send(s1u_tunnel->gnode, pkbuf); d_assert(rv == CORE_OK,, "gtp send failed"); pkbuf_free(pkbuf); return rv; } nextepc-0.3.10/src/sgw/sgw_gtp_path.h000066400000000000000000000005521333553357400175040ustar00rootroot00000000000000#ifndef __SGW_PATH_H__ #define __SGW_PATH_H__ #include "gtp/gtp_xact.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(status_t) sgw_gtp_open(); CORE_DECLARE(status_t) sgw_gtp_close(); CORE_DECLARE(status_t) sgw_gtp_send_end_marker(sgw_tunnel_t *s1u_tunnel); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __SGW_PATH_H__ */ nextepc-0.3.10/src/sgw/sgw_init.c000066400000000000000000000045701333553357400166400ustar00rootroot00000000000000#define TRACE_MODULE _sgw_init #include "core_debug.h" #include "core_thread.h" #include "gtp/gtp_xact.h" #include "sgw_context.h" #include "sgw_sm.h" #include "sgw_event.h" static thread_id sgw_thread; static void *THREAD_FUNC sgw_main(thread_id id, void *data); static int initialized = 0; status_t sgw_initialize() { status_t rv; rv = sgw_context_init(); if (rv != CORE_OK) return rv; rv = sgw_context_parse_config(); if (rv != CORE_OK) return rv; rv = sgw_context_setup_trace_module(); if (rv != CORE_OK) return rv; rv = thread_create(&sgw_thread, NULL, sgw_main, NULL); if (rv != CORE_OK) return rv; initialized = 1; return CORE_OK; } void sgw_terminate(void) { if (!initialized) return; thread_delete(sgw_thread); sgw_context_final(); gtp_xact_final(); } static void *THREAD_FUNC sgw_main(thread_id id, void *data) { event_t event; fsm_t sgw_sm; c_time_t prev_tm, now_tm; status_t rv; memset(&event, 0, sizeof(event_t)); sgw_self()->queue_id = event_create(MSGQ_O_NONBLOCK); d_assert(sgw_self()->queue_id, return NULL, "SGW event queue creation failed"); tm_service_init(&sgw_self()->tm_service); gtp_xact_init(&sgw_self()->tm_service, SGW_EVT_T3_RESPONSE, SGW_EVT_T3_HOLDING); fsm_create(&sgw_sm, sgw_state_initial, sgw_state_final); fsm_init(&sgw_sm, 0); prev_tm = time_now(); #define EVENT_LOOP_TIMEOUT 10 /* 10ms */ while ((!thread_should_stop())) { sock_select_loop(EVENT_LOOP_TIMEOUT); do { rv = event_recv(sgw_self()->queue_id, &event); d_assert(rv != CORE_ERROR, continue, "While receiving a event message, error occurs"); now_tm = time_now(); /* if the gap is over event_loop timeout, execute preriodic jobs */ if (now_tm - prev_tm > (EVENT_LOOP_TIMEOUT * 1000)) { tm_execute_tm_service( &sgw_self()->tm_service, sgw_self()->queue_id); prev_tm = now_tm; } if (rv == CORE_EAGAIN) { continue; } fsm_dispatch(&sgw_sm, (fsm_event_t*)&event); } while(rv == CORE_OK); } fsm_final(&sgw_sm, 0); fsm_clear(&sgw_sm); event_delete(sgw_self()->queue_id); return NULL; } nextepc-0.3.10/src/sgw/sgw_s11_handler.c000066400000000000000000001027131333553357400177740ustar00rootroot00000000000000#define TRACE_MODULE _sgw_s11_handler #include "core_debug.h" #include "core_lib.h" #include "gtp/gtp_types.h" #include "gtp/gtp_conv.h" #include "gtp/gtp_node.h" #include "gtp/gtp_path.h" #include "common/context.h" #include "sgw_event.h" #include "sgw_context.h" #include "sgw_gtp_path.h" #include "sgw_s11_handler.h" void sgw_s11_handle_create_session_request( gtp_xact_t *s11_xact, sgw_ue_t *sgw_ue, gtp_message_t *gtp_message) { status_t rv; c_uint16_t decoded; gtp_create_session_request_t *req = NULL; pkbuf_t *pkbuf = NULL; gtp_f_teid_t *mme_s11_teid = NULL; gtp_f_teid_t *pgw_s5c_teid = NULL; int len = 0; gtp_node_t *pgw = NULL; gtp_f_teid_t sgw_s5c_teid, sgw_s5u_teid; gtp_uli_t uli; gtp_xact_t *s5c_xact = NULL; sgw_sess_t *sess = NULL; sgw_bearer_t *bearer = NULL; sgw_tunnel_t *s5u_tunnel = NULL; d_assert(s11_xact, return, "Null param"); d_assert(gtp_message, return, "Null param"); req = >p_message->create_session_request; d_trace(3, "[SGW] Create Session Reqeust\n"); if (req->bearer_contexts_to_be_created.presence == 0) { d_error("No Bearer"); return; } if (req->bearer_contexts_to_be_created.eps_bearer_id.presence == 0) { d_error("No EPS Bearer ID"); return; } d_assert(sgw_ue, return, "Null param"); sess = sgw_sess_find_by_ebi(sgw_ue, req->bearer_contexts_to_be_created.eps_bearer_id.u8); if (!sess) { c_int8_t apn[MAX_APN_LEN]; if (req->access_point_name.presence == 0) { d_error("No APN"); return; } apn_parse(apn, req->access_point_name.data, req->access_point_name.len); sess = sgw_sess_add(sgw_ue, apn, req->bearer_contexts_to_be_created.eps_bearer_id.u8); d_assert(sess, return, "Null param"); } if (req->sender_f_teid_for_control_plane.presence == 0) { d_error("No Sender F-TEID"); return; } if (req->pgw_s5_s8_address_for_control_plane_or_pmip.presence == 0) { d_error("No PGW IP"); return; } if (req->user_location_information.presence == 0) { d_error("No User Location Inforamtion"); return; } d_assert(sess, return, "Null param"); bearer = sgw_default_bearer_in_sess(sess); d_assert(bearer, return, "Null param"); s5u_tunnel = sgw_s5u_tunnel_in_bearer(bearer); d_assert(s5u_tunnel, return, "Null param"); /* Receive Control Plane(DL) : MME-S11 */ mme_s11_teid = req->sender_f_teid_for_control_plane.data; d_assert(mme_s11_teid, return, "Null param"); sgw_ue->mme_s11_teid = ntohl(mme_s11_teid->teid); /* Send Control Plane(DL) : SGW-S5C */ memset(&sgw_s5c_teid, 0, sizeof(gtp_f_teid_t)); sgw_s5c_teid.interface_type = GTP_F_TEID_S5_S8_SGW_GTP_C; sgw_s5c_teid.teid = htonl(sess->sgw_s5c_teid); rv = gtp_sockaddr_to_f_teid( sgw_self()->gtpc_addr, sgw_self()->gtpc_addr6, &sgw_s5c_teid, &len); d_assert(rv == CORE_OK, return,); req->sender_f_teid_for_control_plane.presence = 1; req->sender_f_teid_for_control_plane.data = &sgw_s5c_teid; req->sender_f_teid_for_control_plane.len = len; d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", sgw_ue->mme_s11_teid, sgw_ue->sgw_s11_teid); d_trace(5, " SGW_S5C_TEID[0x%x] PGW_S5C_TEID[0x%x]\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); d_trace(5, " SGW_S5U_TEID[%d] PGW_S5U_TEID[%d]\n", s5u_tunnel->local_teid, s5u_tunnel->remote_teid); pgw_s5c_teid = req->pgw_s5_s8_address_for_control_plane_or_pmip.data; d_assert(pgw_s5c_teid, return, "Null param"); pgw = gtp_find_node(&sgw_self()->pgw_s5c_list, pgw_s5c_teid); if (!pgw) { pgw = gtp_add_node_with_teid(&sgw_self()->pgw_s5c_list, pgw_s5c_teid, sgw_self()->gtpc_port, context_self()->parameter.no_ipv4, context_self()->parameter.no_ipv6, context_self()->parameter.prefer_ipv4); d_assert(pgw, return,); rv = gtp_client(pgw); d_assert(rv == CORE_OK, return,); } /* Setup GTP Node */ SETUP_GTP_NODE(sess, pgw); /* Remove PGW-S5C */ req->pgw_s5_s8_address_for_control_plane_or_pmip.presence = 0; /* Data Plane(DL) : SGW-S5U */ memset(&sgw_s5u_teid, 0, sizeof(gtp_f_teid_t)); sgw_s5u_teid.teid = htonl(s5u_tunnel->local_teid); sgw_s5u_teid.interface_type = GTP_F_TEID_S5_S8_SGW_GTP_U; rv = gtp_sockaddr_to_f_teid( sgw_self()->gtpu_addr, sgw_self()->gtpu_addr6, &sgw_s5u_teid, &len); d_assert(rv == CORE_OK, return,); req->bearer_contexts_to_be_created.s5_s8_u_sgw_f_teid.presence = 1; req->bearer_contexts_to_be_created.s5_s8_u_sgw_f_teid.data = &sgw_s5u_teid; req->bearer_contexts_to_be_created.s5_s8_u_sgw_f_teid.len = len; /* Set User Location Information */ decoded = gtp_parse_uli(&uli, &req->user_location_information); d_assert(req->user_location_information.len == decoded, return,); memcpy(&bearer->tai.plmn_id, &uli.tai.plmn_id, sizeof(uli.tai.plmn_id)); bearer->tai.tac = uli.tai.tac; memcpy(&bearer->e_cgi.plmn_id, &uli.e_cgi.plmn_id, sizeof(uli.e_cgi.plmn_id)); bearer->e_cgi.cell_id = uli.e_cgi.cell_id; gtp_message->h.type = GTP_CREATE_SESSION_REQUEST_TYPE; gtp_message->h.teid = sess->pgw_s5c_teid; rv = gtp_build_msg(&pkbuf, gtp_message); d_assert(rv == CORE_OK, return, "gtp build failed"); s5c_xact = gtp_xact_local_create(sess->gnode, >p_message->h, pkbuf); d_assert(s5c_xact, return, "Null param"); gtp_xact_associate(s11_xact, s5c_xact); rv = gtp_xact_commit(s5c_xact); d_assert(rv == CORE_OK, return, "xact_commit error"); } CORE_DECLARE(void) sgw_s11_handle_modify_bearer_request(gtp_xact_t *s11_xact, sgw_ue_t *sgw_ue, gtp_modify_bearer_request_t *req) { status_t rv; char buf[CORE_ADDRSTRLEN]; c_uint16_t decoded; gtp_node_t *enb = NULL; sgw_bearer_t *bearer = NULL; sgw_tunnel_t *s1u_tunnel = NULL; gtp_modify_bearer_response_t *rsp = NULL; pkbuf_t *pkbuf = NULL; gtp_message_t gtp_message; gtp_cause_t cause; gtp_f_teid_t *enb_s1u_teid = NULL; gtp_uli_t uli; d_assert(s11_xact, return, "Null param"); d_assert(sgw_ue, return, "Null param"); d_assert(req, return, "Null param"); d_trace(3, "[SGW] Modify Bearer Reqeust\n"); if (req->bearer_contexts_to_be_modified.presence == 0) { d_error("No Bearer"); return; } if (req->bearer_contexts_to_be_modified.eps_bearer_id.presence == 0) { d_error("No EPS Bearer ID"); return; } if (req->bearer_contexts_to_be_modified.s1_u_enodeb_f_teid.presence == 0) { d_error("No eNB TEID"); return; } bearer = sgw_bearer_find_by_ue_ebi(sgw_ue, req->bearer_contexts_to_be_modified.eps_bearer_id.u8); d_assert(bearer, return, "No Bearer Context"); s1u_tunnel = sgw_s1u_tunnel_in_bearer(bearer); d_assert(s1u_tunnel, return, "No S1U Tunnel Context"); /* Data Plane(DL) : eNB-S1U */ enb_s1u_teid = req->bearer_contexts_to_be_modified.s1_u_enodeb_f_teid.data; s1u_tunnel->remote_teid = ntohl(enb_s1u_teid->teid); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", sgw_ue->mme_s11_teid, sgw_ue->sgw_s11_teid); d_trace(5, " ENB_S1U_TEID[%d] SGW_S1U_TEID[%d]\n", s1u_tunnel->remote_teid, s1u_tunnel->local_teid); enb = gtp_find_node(&sgw_self()->enb_s1u_list, enb_s1u_teid); if (!enb) { enb = gtp_add_node_with_teid(&sgw_self()->enb_s1u_list, enb_s1u_teid, sgw_self()->gtpu_port, context_self()->parameter.no_ipv4, context_self()->parameter.no_ipv6, context_self()->parameter.prefer_ipv4); d_assert(enb, return,); #if UNBOUNDED_UDP_SOCKET rv = gtp_connect(sgw_self()->gtpu_sock, sgw_self()->gtpu_sock6, enb); #else rv = gtp_client(enb); #endif d_assert(rv == CORE_OK, return,); } #if ULI_END_MARKER /* if ULI's Cell ID changes, End Marker is sent out or not */ if (req->user_location_information.presence == 1) { /* Set User Location Information */ decoded = gtp_parse_uli(&uli, &req->user_location_information); d_assert(req->user_location_information.len == decoded, return,); memcpy(&bearer->tai.plmn_id, &uli.tai.plmn_id, sizeof(uli.tai.plmn_id)); bearer->tai.tac = uli.tai.tac; memcpy(&bearer->e_cgi.plmn_id, &uli.e_cgi.plmn_id, sizeof(uli.e_cgi.plmn_id)); d_trace(5, " ULI Presence: CellID[OLD:0x%x, NEW:0x%x]\n", bearer->e_cgi.cell_id, uli.e_cgi.cell_id); if (bearer->e_cgi.cell_id != uli.e_cgi.cell_id) { d_trace(3, "[SGW] SEND End Marker to ENB[%s]: TEID[0x%x]\n", CORE_ADDR(sock_remote_addr(s1u_tunnel->gnode->sock), buf), s1u_tunnel->remote_teid); rv = sgw_gtp_send_end_marker(s1u_tunnel); if (rv != CORE_OK) d_error("gtp send end marker failed"); bearer->e_cgi.cell_id = uli.e_cgi.cell_id; } } #else /* GNODE_END_MARKER */ /* if GTP Node changes, End Marker is sent out or not */ if (req->user_location_information.presence == 1) { /* Set User Location Information */ decoded = gtp_parse_uli(&uli, &req->user_location_information); d_assert(req->user_location_information.len == decoded, return,); memcpy(&bearer->tai.plmn_id, &uli.tai.plmn_id, sizeof(uli.tai.plmn_id)); bearer->tai.tac = uli.tai.tac; memcpy(&bearer->e_cgi.plmn_id, &uli.e_cgi.plmn_id, sizeof(uli.e_cgi.plmn_id)); bearer->e_cgi.cell_id = uli.e_cgi.cell_id; d_trace(5, " TAI[PLMN_ID:0x%x,TAC:%d]\n", bearer->tai.plmn_id, bearer->tai.tac); d_trace(5, " E_CGI[PLMN_ID:0x%x,CELL_ID:%d]\n", bearer->e_cgi.plmn_id, bearer->e_cgi.cell_id); } if (s1u_tunnel->gnode && s1u_tunnel->gnode != enb) { d_assert(s1u_tunnel->gnode->sock, return,); d_trace(3, "[SGW] SEND End Marker to ENB[%s]: TEID[0x%x]", CORE_ADDR(sock_remote_addr(s1u_tunnel->gnode->sock), buf), s1u_tunnel->remote_teid); rv = sgw_gtp_send_end_marker(s1u_tunnel); if (rv != CORE_OK) d_error("gtp send end marker failed"); } #endif /* Setup GTP Node */ SETUP_GTP_NODE(s1u_tunnel, enb); /* Reset UE state */ SGW_RESET_UE_STATE(sgw_ue, SGW_S1U_INACTIVE); rsp = >p_message.modify_bearer_response; memset(>p_message, 0, sizeof(gtp_message_t)); memset(&cause, 0, sizeof(cause)); cause.value = GTP_CAUSE_REQUEST_ACCEPTED; rsp->cause.presence = 1; rsp->cause.data = &cause; rsp->cause.len = sizeof(cause); gtp_message.h.type = GTP_MODIFY_BEARER_RESPONSE_TYPE; gtp_message.h.teid = sgw_ue->mme_s11_teid; rv = gtp_build_msg(&pkbuf, >p_message); d_assert(rv == CORE_OK, return, "gtp build failed"); rv = gtp_xact_update_tx(s11_xact, >p_message.h, pkbuf); d_assert(rv == CORE_OK, return, "gtp_xact_update_tx error"); rv = gtp_xact_commit(s11_xact); d_assert(rv == CORE_OK, return, "xact_commit error"); } void sgw_s11_handle_delete_session_request(gtp_xact_t *s11_xact, sgw_ue_t *sgw_ue, gtp_message_t *gtp_message) { status_t rv; pkbuf_t *pkbuf = NULL; gtp_xact_t *s5c_xact = NULL; sgw_sess_t *sess = NULL; gtp_delete_session_request_t *req = NULL; d_assert(s11_xact, return, "Null param"); d_assert(sgw_ue, return, "Null param"); d_assert(gtp_message, return, "Null param"); req = >p_message->delete_session_request; d_assert(req, return, "Null param"); d_trace(3, "[SGW] Delete Session Reqeust\n"); if (req->linked_eps_bearer_id.presence == 0) { d_error("No EPS Bearer ID"); return; } sess = sgw_sess_find_by_ebi(sgw_ue, req->linked_eps_bearer_id.u8); d_assert(sess, return, "Null param"); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", sgw_ue->mme_s11_teid, sgw_ue->sgw_s11_teid); d_trace(5, " SGW_S5C_TEID[0x%x] PGW_S5C_TEID[0x%x]\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); gtp_message->h.type = GTP_DELETE_SESSION_REQUEST_TYPE; gtp_message->h.teid = sess->pgw_s5c_teid; rv = gtp_build_msg(&pkbuf, gtp_message); d_assert(rv == CORE_OK, return, "gtp build failed"); s5c_xact = gtp_xact_local_create(sess->gnode, >p_message->h, pkbuf); d_assert(s5c_xact, return, "Null param"); gtp_xact_associate(s11_xact, s5c_xact); rv = gtp_xact_commit(s5c_xact); d_assert(rv == CORE_OK, return, "xact_commit error"); } void sgw_s11_handle_create_bearer_response(gtp_xact_t *s11_xact, sgw_ue_t *sgw_ue, gtp_message_t *gtp_message) { status_t rv; c_uint16_t decoded; pkbuf_t *pkbuf = NULL; gtp_node_t *enb = NULL; gtp_xact_t *s5c_xact = NULL; sgw_sess_t *sess = NULL; sgw_bearer_t *bearer = NULL; sgw_tunnel_t *s1u_tunnel = NULL, *s5u_tunnel = NULL; gtp_create_bearer_response_t *req = NULL; gtp_f_teid_t *sgw_s1u_teid = NULL, *enb_s1u_teid = NULL; gtp_f_teid_t sgw_s5u_teid, pgw_s5u_teid; int len; gtp_uli_t uli; d_assert(s11_xact, return, "Null param"); d_assert(sgw_ue, return, "Null param"); d_assert(gtp_message, return, "Null param"); s5c_xact = s11_xact->assoc_xact; d_assert(s5c_xact, return, "Null param"); d_trace(3, "[SGW] Cerate Bearer Reqeust\n"); req = >p_message->create_bearer_response; d_assert(req, return, "Null param"); if (req->bearer_contexts.presence == 0) { d_error("No Bearer"); return; } if (req->bearer_contexts.eps_bearer_id.presence == 0) { d_error("No EPS Bearer ID"); return; } if (req->bearer_contexts.s1_u_enodeb_f_teid.presence == 0) { d_error("No eNB TEID"); return; } if (req->bearer_contexts.s4_u_sgsn_f_teid.presence == 0) { d_error("No SGW TEID"); return; } if (req->user_location_information.presence == 0) { d_error("No User Location Inforamtion"); return; } /* Correlate with SGW-S1U-TEID */ sgw_s1u_teid = req->bearer_contexts.s4_u_sgsn_f_teid.data; d_assert(sgw_s1u_teid, return, "Null param"); req->bearer_contexts.s4_u_sgsn_f_teid.presence = 0; /* Find the Tunnel by SGW-S1U-TEID */ s1u_tunnel = sgw_tunnel_find_by_teid(ntohl(sgw_s1u_teid->teid)); d_assert(s1u_tunnel, return, "Null param"); bearer = s1u_tunnel->bearer; d_assert(bearer, return, "Null param"); s5u_tunnel = sgw_s5u_tunnel_in_bearer(bearer); d_assert(s5u_tunnel, return, "Null param"); sess = bearer->sess; d_assert(sess, return, "Null param"); /* Set EBI */ bearer->ebi = req->bearer_contexts.eps_bearer_id.u8; /* Data Plane(DL) : eNB-S1U */ enb_s1u_teid = req->bearer_contexts.s1_u_enodeb_f_teid.data; s1u_tunnel->remote_teid = ntohl(enb_s1u_teid->teid); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", sgw_ue->mme_s11_teid, sgw_ue->sgw_s11_teid); d_trace(5, " SGW_S5C_TEID[0x%x] PGW_S5C_TEID[0x%x]\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); d_trace(5, " ENB_S1U_TEID[%d] SGW_S1U_TEID[%d]\n", s1u_tunnel->remote_teid, s1u_tunnel->local_teid); d_trace(5, " SGW_S5U_TEID[%d] PGW_S5U_TEID[%d]\n", s5u_tunnel->local_teid, s5u_tunnel->remote_teid); enb = gtp_find_node(&sgw_self()->enb_s1u_list, enb_s1u_teid); if (!enb) { enb = gtp_add_node_with_teid(&sgw_self()->enb_s1u_list, enb_s1u_teid, sgw_self()->gtpu_port, context_self()->parameter.no_ipv4, context_self()->parameter.no_ipv6, context_self()->parameter.prefer_ipv4); d_assert(enb, return,); rv = gtp_client(enb); d_assert(rv == CORE_OK, return,); } /* Setup GTP Node */ SETUP_GTP_NODE(s1u_tunnel, enb); /* Remove S1U-F-TEID */ req->bearer_contexts.s1_u_enodeb_f_teid.presence = 0; decoded = gtp_parse_uli(&uli, &req->user_location_information); d_assert(req->user_location_information.len == decoded, return,); memcpy(&bearer->tai.plmn_id, &uli.tai.plmn_id, sizeof(uli.tai.plmn_id)); bearer->tai.tac = uli.tai.tac; memcpy(&bearer->e_cgi.plmn_id, &uli.e_cgi.plmn_id, sizeof(uli.e_cgi.plmn_id)); bearer->e_cgi.cell_id = uli.e_cgi.cell_id; /* Reset UE state */ SGW_RESET_UE_STATE(sgw_ue, SGW_S1U_INACTIVE); /* Data Plane(DL) : SGW-S5U */ memset(&sgw_s5u_teid, 0, sizeof(gtp_f_teid_t)); sgw_s5u_teid.interface_type = GTP_F_TEID_S5_S8_SGW_GTP_U; sgw_s5u_teid.teid = htonl(s5u_tunnel->local_teid); rv = gtp_sockaddr_to_f_teid( sgw_self()->gtpu_addr, sgw_self()->gtpu_addr6, &sgw_s5u_teid, &len); d_assert(rv == CORE_OK, return,); req->bearer_contexts.s5_s8_u_sgw_f_teid.presence = 1; req->bearer_contexts.s5_s8_u_sgw_f_teid.data = &sgw_s5u_teid; req->bearer_contexts.s5_s8_u_sgw_f_teid.len = len; /* Data Plane(DL) : PGW-S5U */ d_assert(s5u_tunnel->gnode, return,); pgw_s5u_teid.interface_type = GTP_F_TEID_S5_S8_PGW_GTP_U; pgw_s5u_teid.teid = htonl(s5u_tunnel->remote_teid); rv = gtp_ip_to_f_teid(&s5u_tunnel->gnode->ip, &pgw_s5u_teid, &len); req->bearer_contexts.s5_s8_u_pgw_f_teid.presence = 1; req->bearer_contexts.s5_s8_u_pgw_f_teid.data = &pgw_s5u_teid; req->bearer_contexts.s5_s8_u_pgw_f_teid.len = len; gtp_message->h.type = GTP_CREATE_BEARER_RESPONSE_TYPE; gtp_message->h.teid = sess->pgw_s5c_teid; rv = gtp_build_msg(&pkbuf, gtp_message); d_assert(rv == CORE_OK, return, "gtp build failed"); rv = gtp_xact_update_tx(s5c_xact, >p_message->h, pkbuf); d_assert(s5c_xact, return, "Null param"); rv = gtp_xact_commit(s5c_xact); d_assert(rv == CORE_OK, return, "xact_commit error"); } void sgw_s11_handle_update_bearer_response(gtp_xact_t *s11_xact, sgw_ue_t *sgw_ue, gtp_message_t *gtp_message) { status_t rv; pkbuf_t *pkbuf = NULL; gtp_xact_t *s5c_xact = NULL; sgw_sess_t *sess = NULL; sgw_bearer_t *bearer = NULL; gtp_update_bearer_response_t *req = NULL; d_assert(s11_xact, return, "Null param"); d_assert(sgw_ue, return, "Null param"); d_assert(gtp_message, return, "Null param"); s5c_xact = s11_xact->assoc_xact; d_assert(s5c_xact, return, "Null param"); req = >p_message->update_bearer_response; d_assert(req, return, "Null param"); d_trace(3, "[SGW] Update Bearer Reqeust\n"); if (req->bearer_contexts.presence == 0) { d_error("No Bearer"); return; } if (req->bearer_contexts.eps_bearer_id.presence == 0) { d_error("No EPS Bearer ID"); return; } bearer = sgw_bearer_find_by_ue_ebi( sgw_ue, req->bearer_contexts.eps_bearer_id.u8); d_assert(bearer, return, "No Bearer Context[EBI:%d]", req->bearer_contexts.eps_bearer_id); sess = bearer->sess; d_assert(sess, return, "Null param"); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", sgw_ue->mme_s11_teid, sgw_ue->sgw_s11_teid); d_trace(5, " SGW_S5C_TEID[0x%x] PGW_S5C_TEID[0x%x]\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); gtp_message->h.type = GTP_UPDATE_BEARER_RESPONSE_TYPE; gtp_message->h.teid = sess->pgw_s5c_teid; rv = gtp_build_msg(&pkbuf, gtp_message); d_assert(rv == CORE_OK, return, "gtp build failed"); rv = gtp_xact_update_tx(s5c_xact, >p_message->h, pkbuf); d_assert(s5c_xact, return, "Null param"); rv = gtp_xact_commit(s5c_xact); d_assert(rv == CORE_OK, return, "xact_commit error"); } void sgw_s11_handle_delete_bearer_response(gtp_xact_t *s11_xact, sgw_ue_t *sgw_ue, gtp_message_t *gtp_message) { status_t rv; pkbuf_t *pkbuf = NULL; gtp_xact_t *s5c_xact = NULL; sgw_sess_t *sess = NULL; sgw_bearer_t *bearer = NULL; gtp_delete_bearer_response_t *req = NULL; d_assert(s11_xact, return, "Null param"); d_assert(sgw_ue, return, "Null param"); d_assert(gtp_message, return, "Null param"); s5c_xact = s11_xact->assoc_xact; d_assert(s5c_xact, return, "Null param"); req = >p_message->delete_bearer_response; d_assert(req, return, "Null param"); d_trace(3, "[SGW] Delete Bearer Response\n"); if (req->bearer_contexts.presence == 0) { d_error("No Bearer"); return; } if (req->bearer_contexts.eps_bearer_id.presence == 0) { d_error("No EPS Bearer ID"); return; } bearer = sgw_bearer_find_by_ue_ebi( sgw_ue, req->bearer_contexts.eps_bearer_id.u8); d_assert(bearer, return, "No Bearer Context[EBI:%d]", req->bearer_contexts.eps_bearer_id); sess = bearer->sess; d_assert(sess, return, "Null param"); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", sgw_ue->mme_s11_teid, sgw_ue->sgw_s11_teid); d_trace(5, " SGW_S5C_TEID[0x%x] PGW_S5C_TEID[0x%x]\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); gtp_message->h.type = GTP_DELETE_BEARER_RESPONSE_TYPE; gtp_message->h.teid = sess->pgw_s5c_teid; rv = gtp_build_msg(&pkbuf, gtp_message); d_assert(rv == CORE_OK, return, "gtp build failed"); rv = gtp_xact_update_tx(s5c_xact, >p_message->h, pkbuf); d_assert(s5c_xact, return, "Null param"); rv = gtp_xact_commit(s5c_xact); d_assert(rv == CORE_OK, return, "xact_commit error"); sgw_bearer_remove(bearer); } void sgw_s11_handle_release_access_bearers_request(gtp_xact_t *s11_xact, sgw_ue_t *sgw_ue, gtp_release_access_bearers_request_t *req) { status_t rv; gtp_release_access_bearers_response_t *rsp = NULL; pkbuf_t *pkbuf = NULL; gtp_message_t gtp_message; sgw_bearer_t *bearer = NULL, *next_bearer = NULL; sgw_tunnel_t *s1u_tunnel = NULL; sgw_sess_t *sess = NULL; gtp_cause_t cause; d_assert(sgw_ue, return, "Null param"); d_assert(s11_xact, return, "Null param"); d_assert(req, return, "Null param"); d_trace(3, "[SGW] Release Access Bearers Request\n"); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", sgw_ue->mme_s11_teid, sgw_ue->sgw_s11_teid); /* Set UE state to S1UE_INACTIVE */ SGW_SET_UE_STATE(sgw_ue, SGW_S1U_INACTIVE); /* ReSet UE state to S1UE_INACTIVE */ SGW_RESET_UE_STATE(sgw_ue, SGW_DL_NOTI_SENT); /* Release S1U(DL) path */ sess = sgw_sess_first(sgw_ue); while (sess) { bearer = list_first(&sess->bearer_list); while (bearer) { next_bearer = list_next(bearer); s1u_tunnel = sgw_s1u_tunnel_in_bearer(bearer); d_assert(s1u_tunnel, return, "Null param"); s1u_tunnel->remote_teid = 0; bearer = next_bearer; } sess = sgw_sess_next(sess); } rsp = >p_message.release_access_bearers_response; memset(>p_message, 0, sizeof(gtp_message_t)); memset(&cause, 0, sizeof(cause)); cause.value = GTP_CAUSE_REQUEST_ACCEPTED; rsp->cause.presence = 1; rsp->cause.data = &cause; rsp->cause.len = sizeof(cause); gtp_message.h.type = GTP_RELEASE_ACCESS_BEARERS_RESPONSE_TYPE; gtp_message.h.teid = sgw_ue->mme_s11_teid; rv = gtp_build_msg(&pkbuf, >p_message); d_assert(rv == CORE_OK, return, "gtp build failed"); rv = gtp_xact_update_tx(s11_xact, >p_message.h, pkbuf); d_assert(rv == CORE_OK, return, "gtp_xact_update_tx error"); rv = gtp_xact_commit(s11_xact); d_assert(rv == CORE_OK, return, "xact_commit error"); } void sgw_s11_handle_lo_dldata_notification(sgw_bearer_t *bearer) { status_t rv; gtp_downlink_data_notification_t *noti = NULL; pkbuf_t *pkbuf = NULL; gtp_message_t gtp_message; sgw_ue_t *sgw_ue = NULL; gtp_xact_t *xact = NULL; /* FIXME : ARP should be retrieved from ? */ c_uint8_t arp = 0x61; d_assert(bearer, return, "Null param"); sgw_ue = bearer->sgw_ue; d_assert(sgw_ue, return, "Null param"); d_trace(3, "[SGW] Downlink Data Notification\n"); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", sgw_ue->mme_s11_teid, sgw_ue->sgw_s11_teid); /* Build downlink notification message */ noti = >p_message.downlink_data_notification; memset(>p_message, 0, sizeof(gtp_message_t)); noti->eps_bearer_id.presence = 1; noti->eps_bearer_id.u8 = bearer->ebi; /* FIXME : ARP should be retrieved from ? */ noti->allocation_retention_priority.presence = 1; noti->allocation_retention_priority.data = &arp; noti->allocation_retention_priority.len = sizeof(arp); gtp_message.h.type = GTP_DOWNLINK_DATA_NOTIFICATION_TYPE; gtp_message.h.teid = sgw_ue->mme_s11_teid; rv = gtp_build_msg(&pkbuf, >p_message); d_assert(rv == CORE_OK, return, "gtp build failed"); xact = gtp_xact_local_create(sgw_ue->gnode, >p_message.h, pkbuf); d_assert(xact, return, "Null param"); rv = gtp_xact_commit(xact); d_assert(rv == CORE_OK, return, "xact_commit error"); } void sgw_s11_handle_downlink_data_notification_ack( gtp_xact_t *s11_xact, sgw_ue_t *sgw_ue, gtp_downlink_data_notification_acknowledge_t *ack) { status_t rv; d_assert(sgw_ue, return, "Null param"); d_assert(s11_xact, return, "Null param"); d_trace(3, "[SGW] Downlink Data Notification Acknowledge\n"); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", sgw_ue->mme_s11_teid, sgw_ue->sgw_s11_teid); rv = gtp_xact_commit(s11_xact); d_assert(rv == CORE_OK, return, "xact_commit error"); } void sgw_s11_handle_create_indirect_data_forwarding_tunnel_request( gtp_xact_t *s11_xact, sgw_ue_t *sgw_ue, gtp_create_indirect_data_forwarding_tunnel_request_t *req) { status_t rv; gtp_create_indirect_data_forwarding_tunnel_response_t *rsp = NULL; pkbuf_t *pkbuf = NULL; gtp_message_t gtp_message; int i; gtp_node_t *enb = NULL; sgw_bearer_t *bearer = NULL; sgw_tunnel_t *tunnel = NULL; gtp_cause_t cause; tlv_bearer_context_t *req_bearers[GTP_MAX_NUM_OF_INDIRECT_TUNNEL]; tlv_bearer_context_t *rsp_bearers[GTP_MAX_NUM_OF_INDIRECT_TUNNEL]; gtp_f_teid_t *req_teid = NULL; gtp_f_teid_t rsp_dl_teid[GTP_MAX_NUM_OF_INDIRECT_TUNNEL]; gtp_f_teid_t rsp_ul_teid[GTP_MAX_NUM_OF_INDIRECT_TUNNEL]; int len; d_assert(sgw_ue, return, "Null param"); d_assert(s11_xact, return, "Null param"); d_assert(req, return, "Null param"); d_trace(3, "[SGW] Create Indirect Data Forwarding Tunnel Request\n"); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", sgw_ue->mme_s11_teid, sgw_ue->sgw_s11_teid); rsp = >p_message.create_indirect_data_forwarding_tunnel_response; memset(>p_message, 0, sizeof(gtp_message_t)); gtp_bearers_in_create_indirect_tunnel_request(&req_bearers, req); gtp_bearers_in_create_indirect_tunnel_response(&rsp_bearers, rsp); memset(&cause, 0, sizeof(cause)); cause.value = GTP_CAUSE_REQUEST_ACCEPTED; rsp->cause.presence = 1; rsp->cause.data = &cause; rsp->cause.len = sizeof(cause); for (i = 0; req_bearers[i]->presence; i++) { if (req_bearers[i]->eps_bearer_id.presence == 0) { d_error("No EBI"); return; } bearer = sgw_bearer_find_by_ue_ebi(sgw_ue, req_bearers[i]->eps_bearer_id.u8); d_assert(bearer, return, "No Bearer Context"); if (req_bearers[i]->s1_u_enodeb_f_teid.presence) { req_teid = req_bearers[i]->s1_u_enodeb_f_teid.data; d_assert(req_teid, return,); tunnel = sgw_tunnel_add(bearer, GTP_F_TEID_SGW_GTP_U_FOR_DL_DATA_FORWARDING); d_assert(tunnel, return, "No Tunnel Context"); tunnel->remote_teid = ntohl(req_teid->teid); enb = gtp_find_node(&sgw_self()->enb_s1u_list, req_teid); if (!enb) { enb = gtp_add_node_with_teid( &sgw_self()->enb_s1u_list, req_teid, sgw_self()->gtpu_port, context_self()->parameter.no_ipv4, context_self()->parameter.no_ipv6, context_self()->parameter.prefer_ipv4); d_assert(enb, return,); rv = gtp_client(enb); d_assert(rv == CORE_OK, return,); } /* Setup GTP Node */ SETUP_GTP_NODE(tunnel, enb); memset(&rsp_dl_teid[i], 0, sizeof(gtp_f_teid_t)); rsp_dl_teid[i].interface_type = tunnel->interface_type; rsp_dl_teid[i].teid = htonl(tunnel->local_teid); rv = gtp_sockaddr_to_f_teid(sgw_self()->gtpu_addr, sgw_self()->gtpu_addr6, &rsp_dl_teid[i], &len); d_assert(len > 0, return,); rsp_bearers[i]->s4_u_sgsn_f_teid.presence = 1; rsp_bearers[i]->s4_u_sgsn_f_teid.data = &rsp_dl_teid[i]; rsp_bearers[i]->s4_u_sgsn_f_teid.len = len; d_trace(5, " SGW_DL_TEID[%d] ENB_DL_TEID[%d]\n", tunnel->local_teid, tunnel->remote_teid); } if (req_bearers[i]->s12_rnc_f_teid.presence) { req_teid = req_bearers[i]->s12_rnc_f_teid.data; d_assert(req_teid, return,); tunnel = sgw_tunnel_add(bearer, GTP_F_TEID_SGW_GTP_U_FOR_UL_DATA_FORWARDING); d_assert(tunnel, return, "No Tunnel Context"); tunnel->remote_teid = ntohl(req_teid->teid); enb = gtp_find_node(&sgw_self()->enb_s1u_list, req_teid); if (!enb) { enb = gtp_add_node_with_teid( &sgw_self()->enb_s1u_list, req_teid, sgw_self()->gtpu_port, context_self()->parameter.no_ipv4, context_self()->parameter.no_ipv6, context_self()->parameter.prefer_ipv4); d_assert(enb, return,); rv = gtp_client(enb); d_assert(rv == CORE_OK, return,); } /* Setup GTP Node */ SETUP_GTP_NODE(tunnel, enb); memset(&rsp_ul_teid[i], 0, sizeof(gtp_f_teid_t)); rsp_ul_teid[i].teid = htonl(tunnel->local_teid); rsp_ul_teid[i].interface_type = tunnel->interface_type; rv = gtp_sockaddr_to_f_teid(sgw_self()->gtpu_addr, sgw_self()->gtpu_addr6, &rsp_ul_teid[i], &len); d_assert(rv == CORE_OK, return,); rsp_bearers[i]->s2b_u_epdg_f_teid_5.presence = 1; rsp_bearers[i]->s2b_u_epdg_f_teid_5.data = &rsp_ul_teid[i]; rsp_bearers[i]->s2b_u_epdg_f_teid_5.len = len; d_trace(5, " SGW_UL_TEID[%d] ENB_UL_TEID[%d]\n", tunnel->local_teid, tunnel->remote_teid); } if (req_bearers[i]->s1_u_enodeb_f_teid.presence || req_bearers[i]->s12_rnc_f_teid.presence) { rsp_bearers[i]->presence = 1; rsp_bearers[i]->eps_bearer_id.presence = 1; rsp_bearers[i]->eps_bearer_id.u8 = bearer->ebi; } } gtp_message.h.type = GTP_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE; gtp_message.h.teid = sgw_ue->mme_s11_teid; rv = gtp_build_msg(&pkbuf, >p_message); d_assert(rv == CORE_OK, return, "gtp build failed"); rv = gtp_xact_update_tx(s11_xact, >p_message.h, pkbuf); d_assert(rv == CORE_OK, return, "gtp_xact_update_tx error"); rv = gtp_xact_commit(s11_xact); d_assert(rv == CORE_OK, return, "xact_commit error"); } void sgw_s11_handle_delete_indirect_data_forwarding_tunnel_request( gtp_xact_t *s11_xact, sgw_ue_t *sgw_ue) { status_t rv; gtp_delete_indirect_data_forwarding_tunnel_response_t *rsp = NULL; pkbuf_t *pkbuf = NULL; gtp_message_t gtp_message; sgw_sess_t *sess = NULL; sgw_bearer_t *bearer = NULL; sgw_tunnel_t *tunnel = NULL, *next_tunnel; gtp_cause_t cause; d_assert(sgw_ue, return, "Null param"); d_assert(s11_xact, return, "Null param"); d_trace(3, "[SGW] Delete Indirect Data Forwarding Tunnel Request\n"); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", sgw_ue->mme_s11_teid, sgw_ue->sgw_s11_teid); /* Delete Indirect Tunnel */ sess = sgw_sess_first(sgw_ue); while (sess) { bearer = sgw_bearer_first(sess); while (bearer) { tunnel = sgw_tunnel_first(bearer); while(tunnel) { next_tunnel = sgw_tunnel_next(tunnel); if (tunnel->interface_type == GTP_F_TEID_SGW_GTP_U_FOR_DL_DATA_FORWARDING || tunnel->interface_type == GTP_F_TEID_SGW_GTP_U_FOR_UL_DATA_FORWARDING) sgw_tunnel_remove(tunnel); tunnel = next_tunnel; } bearer = sgw_bearer_next(bearer); } sess = sgw_sess_next(sess); } rsp = >p_message.delete_indirect_data_forwarding_tunnel_response; memset(>p_message, 0, sizeof(gtp_message_t)); memset(&cause, 0, sizeof(cause)); cause.value = GTP_CAUSE_REQUEST_ACCEPTED; rsp->cause.presence = 1; rsp->cause.data = &cause; rsp->cause.len = sizeof(cause); gtp_message.h.type = GTP_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_RESPONSE_TYPE; gtp_message.h.teid = sgw_ue->mme_s11_teid; rv = gtp_build_msg(&pkbuf, >p_message); d_assert(rv == CORE_OK, return, "gtp build failed"); rv = gtp_xact_update_tx(s11_xact, >p_message.h, pkbuf); d_assert(rv == CORE_OK, return, "gtp_xact_update_tx error"); rv = gtp_xact_commit(s11_xact); d_assert(rv == CORE_OK, return, "xact_commit error"); } nextepc-0.3.10/src/sgw/sgw_s11_handler.h000066400000000000000000000034361333553357400200030ustar00rootroot00000000000000#ifndef __SGW_S11_HANDLER_H__ #define __SGW_S11_HANDLER_H__ #include "gtp/gtp_message.h" #include "sgw_context.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(void) sgw_s11_handle_create_session_request(gtp_xact_t *s11_xact, sgw_ue_t *sgw_ue, gtp_message_t *gtp_message); CORE_DECLARE(void) sgw_s11_handle_modify_bearer_request(gtp_xact_t *s11_xact, sgw_ue_t *sgw_ue, gtp_modify_bearer_request_t *req); CORE_DECLARE(void) sgw_s11_handle_delete_session_request(gtp_xact_t *s11_xact, sgw_ue_t *sgw_ue, gtp_message_t *gtp_message); CORE_DECLARE(void) sgw_s11_handle_create_bearer_response(gtp_xact_t *s11_xact, sgw_ue_t *sgw_ue, gtp_message_t *gtp_message); CORE_DECLARE(void) sgw_s11_handle_update_bearer_response(gtp_xact_t *s11_xact, sgw_ue_t *sgw_ue, gtp_message_t *gtp_message); CORE_DECLARE(void) sgw_s11_handle_delete_bearer_response(gtp_xact_t *s11_xact, sgw_ue_t *sgw_ue, gtp_message_t *gtp_message); CORE_DECLARE(void) sgw_s11_handle_release_access_bearers_request( gtp_xact_t *s11_xact, sgw_ue_t *sgw_ue, gtp_release_access_bearers_request_t *req); CORE_DECLARE(void) sgw_s11_handle_lo_dldata_notification(sgw_bearer_t *bearer); CORE_DECLARE(void) sgw_s11_handle_downlink_data_notification_ack( gtp_xact_t *s11_xact, sgw_ue_t *sgw_ue, gtp_downlink_data_notification_acknowledge_t *ack); CORE_DECLARE(void) sgw_s11_handle_create_indirect_data_forwarding_tunnel_request( gtp_xact_t *s11_xact, sgw_ue_t *sgw_ue, gtp_create_indirect_data_forwarding_tunnel_request_t *req); CORE_DECLARE(void) sgw_s11_handle_delete_indirect_data_forwarding_tunnel_request( gtp_xact_t *s11_xact, sgw_ue_t *sgw_ue); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __SGW_S11_HANDLER_H__ */ nextepc-0.3.10/src/sgw/sgw_s5c_handler.c000066400000000000000000000340731333553357400200650ustar00rootroot00000000000000#define TRACE_MODULE _sgw_s5c_handler #include "core_debug.h" #include "core_lib.h" #include "gtp/gtp_conv.h" #include "gtp/gtp_types.h" #include "gtp/gtp_node.h" #include "gtp/gtp_path.h" #include "common/context.h" #include "sgw_event.h" #include "sgw_context.h" #include "sgw_gtp_path.h" #include "sgw_s5c_handler.h" void sgw_s5c_handle_create_session_response(gtp_xact_t *s5c_xact, sgw_sess_t *sess, gtp_message_t *gtp_message) { status_t rv; gtp_node_t *pgw = NULL; gtp_xact_t *s11_xact = NULL; sgw_bearer_t *bearer = NULL; sgw_tunnel_t *s1u_tunnel = NULL, *s5u_tunnel = NULL; gtp_create_session_response_t *rsp = NULL; pkbuf_t *pkbuf = NULL; sgw_ue_t *sgw_ue = NULL; gtp_f_teid_t *pgw_s5c_teid = NULL; gtp_f_teid_t sgw_s11_teid; gtp_f_teid_t *pgw_s5u_teid = NULL; gtp_f_teid_t sgw_s1u_teid; int len; d_assert(sess, return, "Null param"); sgw_ue = sess->sgw_ue; d_assert(sgw_ue, return, "Null param"); d_assert(s5c_xact, return, "Null param"); s11_xact = s5c_xact->assoc_xact; d_assert(s11_xact, return, "Null param"); d_assert(gtp_message, return, "Null param"); d_trace(3, "[SGW] Create Session Response\n"); rsp = >p_message->create_session_response; if (rsp->pgw_s5_s8__s2a_s2b_f_teid_for_pmip_based_interface_or_for_gtp_based_control_plane_interface. presence == 0) { d_error("No GTP TEID"); return; } if (rsp->bearer_contexts_created.presence == 0) { d_error("No Bearer"); return; } if (rsp->bearer_contexts_created.eps_bearer_id.presence == 0) { d_error("No EPS Bearer ID"); return; } if (rsp->bearer_contexts_created.s5_s8_u_sgw_f_teid.presence == 0) { d_error("No GTP TEID"); return; } bearer = sgw_bearer_find_by_sess_ebi(sess, rsp->bearer_contexts_created.eps_bearer_id.u8); d_assert(bearer, return, "No Bearer Context"); s1u_tunnel = sgw_s1u_tunnel_in_bearer(bearer); d_assert(s1u_tunnel, return, "No Tunnel Context"); s5u_tunnel = sgw_s5u_tunnel_in_bearer(bearer); d_assert(s5u_tunnel, return, "No Tunnel Context"); /* Receive Control Plane(UL) : PGW-S5C */ pgw_s5c_teid = rsp->pgw_s5_s8__s2a_s2b_f_teid_for_pmip_based_interface_or_for_gtp_based_control_plane_interface. data; d_assert(pgw_s5c_teid, return, "Null param"); sess->pgw_s5c_teid = ntohl(pgw_s5c_teid->teid); rsp->pgw_s5_s8__s2a_s2b_f_teid_for_pmip_based_interface_or_for_gtp_based_control_plane_interface. presence = 0; /* Receive Data Plane(UL) : PGW-S5U */ pgw_s5u_teid = rsp->bearer_contexts_created.s5_s8_u_sgw_f_teid.data; d_assert(pgw_s5u_teid, return, "Null param"); s5u_tunnel->remote_teid = ntohl(pgw_s5u_teid->teid); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", sgw_ue->mme_s11_teid, sgw_ue->sgw_s11_teid); d_trace(5, " SGW_S5C_TEID[0x%x] PGW_S5C_TEID[0x%x]\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); d_trace(5, " ENB_S1U_TEID[%d] SGW_S1U_TEID[%d]\n", s1u_tunnel->remote_teid, s1u_tunnel->local_teid); d_trace(5, " SGW_S5U_TEID[%d] PGW_S5U_TEID[%d]\n", s5u_tunnel->local_teid, s5u_tunnel->remote_teid); pgw = gtp_find_node(&sgw_self()->pgw_s5u_list, pgw_s5u_teid); if (!pgw) { pgw = gtp_add_node_with_teid(&sgw_self()->pgw_s5u_list, pgw_s5u_teid, sgw_self()->gtpu_port, context_self()->parameter.no_ipv4, context_self()->parameter.no_ipv6, context_self()->parameter.prefer_ipv4); d_assert(pgw, return,); rv = gtp_client(pgw); d_assert(rv == CORE_OK, return,); } /* Setup GTP Node */ SETUP_GTP_NODE(s5u_tunnel, pgw); /* Remove S5C-F-TEID */ rsp->bearer_contexts_created.s5_s8_u_sgw_f_teid.presence = 0; /* Send Control Plane(UL) : SGW-S11 */ memset(&sgw_s11_teid, 0, sizeof(gtp_f_teid_t)); sgw_s11_teid.interface_type = GTP_F_TEID_S11_S4_SGW_GTP_C; sgw_s11_teid.teid = htonl(sgw_ue->sgw_s11_teid); rv = gtp_sockaddr_to_f_teid( sgw_self()->gtpc_addr, sgw_self()->gtpc_addr6, &sgw_s11_teid, &len); d_assert(rv == CORE_OK, return,); rsp->sender_f_teid_for_control_plane.presence = 1; rsp->sender_f_teid_for_control_plane.data = &sgw_s11_teid; rsp->sender_f_teid_for_control_plane.len = len; /* Send Data Plane(UL) : SGW-S1U */ memset(&sgw_s1u_teid, 0, sizeof(gtp_f_teid_t)); sgw_s1u_teid.interface_type = s1u_tunnel->interface_type; sgw_s1u_teid.teid = htonl(s1u_tunnel->local_teid); rv = gtp_sockaddr_to_f_teid( sgw_self()->gtpu_addr, sgw_self()->gtpu_addr6, &sgw_s1u_teid, &len); d_assert(rv == CORE_OK, return,); rsp->bearer_contexts_created.s1_u_enodeb_f_teid.presence = 1; rsp->bearer_contexts_created.s1_u_enodeb_f_teid.data = &sgw_s1u_teid; rsp->bearer_contexts_created.s1_u_enodeb_f_teid.len = len; rv = gtp_xact_commit(s5c_xact); d_assert(rv == CORE_OK, return, "xact_commit error"); gtp_message->h.type = GTP_CREATE_SESSION_RESPONSE_TYPE; gtp_message->h.teid = sgw_ue->mme_s11_teid; rv = gtp_build_msg(&pkbuf, gtp_message); d_assert(rv == CORE_OK, return, "gtp build failed"); rv = gtp_xact_update_tx(s11_xact, >p_message->h, pkbuf); d_assert(rv == CORE_OK, return, "gtp_xact_update_tx error"); rv = gtp_xact_commit(s11_xact); d_assert(rv == CORE_OK, return, "xact_commit error"); } void sgw_s5c_handle_delete_session_response(gtp_xact_t *s5c_xact, sgw_sess_t *sess, gtp_message_t *gtp_message) { status_t rv; gtp_xact_t *s11_xact = NULL; gtp_delete_session_response_t *rsp = NULL; pkbuf_t *pkbuf = NULL; c_uint32_t mme_s11_teid; gtp_cause_t *cause = NULL; sgw_ue_t *sgw_ue = NULL; d_assert(sess, return, "Null param"); sgw_ue = sess->sgw_ue; d_assert(s5c_xact, return, "Null param"); s11_xact = s5c_xact->assoc_xact; d_assert(s11_xact, return, "Null param"); d_assert(gtp_message, return, "Null param"); rsp = >p_message->delete_session_response; if (rsp->cause.presence == 0) { d_error("No Cause"); return; } cause = rsp->cause.data; d_assert(cause, return, "Null param"); /* Remove a pgw session */ if (sess) { d_trace(3, "[SGW] Delete Session Response\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", sgw_ue->mme_s11_teid, sgw_ue->sgw_s11_teid); d_trace(5, " SGW_S5C_TEID[0x%x] PGW_S5C_TEID[0x%x]\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); /* backup sgw_s5c_teid in session context */ mme_s11_teid = sgw_ue->mme_s11_teid; if (sgw_sess_remove(sess) != CORE_OK) { d_error("Error on PGW session %d removal", sess->index); cause->value = GTP_CAUSE_CONTEXT_NOT_FOUND; } } else { cause->value = GTP_CAUSE_INVALID_PEER; } rv = gtp_xact_commit(s5c_xact); d_assert(rv == CORE_OK, return, "xact_commit error"); gtp_message->h.type = GTP_DELETE_SESSION_RESPONSE_TYPE; gtp_message->h.teid = mme_s11_teid; rv = gtp_build_msg(&pkbuf, gtp_message); d_assert(rv == CORE_OK, return, "gtp build failed"); rv = gtp_xact_update_tx(s11_xact, >p_message->h, pkbuf); d_assert(rv == CORE_OK, return, "gtp_xact_update_tx error"); rv = gtp_xact_commit(s11_xact); d_assert(rv == CORE_OK, return, "xact_commit error"); } void sgw_s5c_handle_create_bearer_request(gtp_xact_t *s5c_xact, sgw_sess_t *sess, gtp_message_t *gtp_message) { status_t rv; gtp_node_t *pgw = NULL; gtp_xact_t *s11_xact = NULL; sgw_bearer_t *bearer = NULL; sgw_tunnel_t *s1u_tunnel = NULL, *s5u_tunnel = NULL; gtp_create_bearer_request_t *req = NULL; pkbuf_t *pkbuf = NULL; sgw_ue_t *sgw_ue = NULL; gtp_f_teid_t *pgw_s5u_teid = NULL; gtp_f_teid_t sgw_s1u_teid; int len; d_assert(sess, return, "Null param"); sgw_ue = sess->sgw_ue; d_assert(sgw_ue, return, "Null param"); d_assert(s5c_xact, return, "Null param"); d_assert(gtp_message, return, "Null param"); req = >p_message->create_bearer_request; d_trace(3, "[SGW] Create Bearer Request\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", sgw_ue->mme_s11_teid, sgw_ue->sgw_s11_teid); d_trace(5, " SGW_S5C_TEID[0x%x] PGW_S5C_TEID[0x%x]\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); if (req->linked_eps_bearer_id.presence == 0) { d_error("No Linked EBI"); return; } if (req->bearer_contexts.presence == 0) { d_error("No Bearer"); return; } if (req->bearer_contexts.eps_bearer_id.presence == 0) { d_error("No EPS Bearer ID"); return; } if (req->bearer_contexts.s5_s8_u_sgw_f_teid.presence == 0) { d_error("No GTP TEID"); return; } bearer = sgw_bearer_add(sess); d_assert(bearer, return, "No Bearer Context"); s1u_tunnel = sgw_s1u_tunnel_in_bearer(bearer); d_assert(s1u_tunnel, return, "No Tunnel Context"); s5u_tunnel = sgw_s5u_tunnel_in_bearer(bearer); d_assert(s5u_tunnel, return, "No Tunnel Context"); /* Receive Data Plane(UL) : PGW-S5U */ pgw_s5u_teid = req->bearer_contexts.s5_s8_u_sgw_f_teid.data; d_assert(pgw_s5u_teid, return, "Null param"); s5u_tunnel->remote_teid = ntohl(pgw_s5u_teid->teid); pgw = gtp_find_node(&sgw_self()->pgw_s5u_list, pgw_s5u_teid); if (!pgw) { pgw = gtp_add_node_with_teid(&sgw_self()->pgw_s5u_list, pgw_s5u_teid, sgw_self()->gtpu_port, context_self()->parameter.no_ipv4, context_self()->parameter.no_ipv6, context_self()->parameter.prefer_ipv4); d_assert(pgw, return,); rv = gtp_client(pgw); d_assert(rv == CORE_OK, return,); } /* Setup GTP Node */ SETUP_GTP_NODE(s5u_tunnel, pgw); /* Remove S5U-F-TEID */ req->bearer_contexts.s5_s8_u_sgw_f_teid.presence = 0; /* Send Data Plane(UL) : SGW-S1U */ memset(&sgw_s1u_teid, 0, sizeof(gtp_f_teid_t)); sgw_s1u_teid.interface_type = s1u_tunnel->interface_type; sgw_s1u_teid.teid = htonl(s1u_tunnel->local_teid); rv = gtp_sockaddr_to_f_teid( sgw_self()->gtpu_addr, sgw_self()->gtpu_addr6, &sgw_s1u_teid, &len); d_assert(rv == CORE_OK, return,); req->bearer_contexts.s1_u_enodeb_f_teid.presence = 1; req->bearer_contexts.s1_u_enodeb_f_teid.data = &sgw_s1u_teid; req->bearer_contexts.s1_u_enodeb_f_teid.len = len; gtp_message->h.type = GTP_CREATE_BEARER_REQUEST_TYPE; gtp_message->h.teid = sgw_ue->mme_s11_teid; rv = gtp_build_msg(&pkbuf, gtp_message); d_assert(rv == CORE_OK, return, "gtp build failed"); s11_xact = gtp_xact_local_create(sgw_ue->gnode, >p_message->h, pkbuf); d_assert(s11_xact, return, "Null param"); gtp_xact_associate(s5c_xact, s11_xact); rv = gtp_xact_commit(s11_xact); d_assert(rv == CORE_OK, return, "xact_commit error"); } void sgw_s5c_handle_update_bearer_request(gtp_xact_t *s5c_xact, sgw_sess_t *sess, gtp_message_t *gtp_message) { status_t rv; gtp_xact_t *s11_xact = NULL; gtp_update_bearer_request_t *req = NULL; pkbuf_t *pkbuf = NULL; sgw_ue_t *sgw_ue = NULL; d_assert(sess, return, "Null param"); sgw_ue = sess->sgw_ue; d_assert(sgw_ue, return, "Null param"); d_assert(s5c_xact, return, "Null param"); d_assert(gtp_message, return, "Null param"); d_trace(3, "[SGW] Update Bearer Request\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", sgw_ue->mme_s11_teid, sgw_ue->sgw_s11_teid); d_trace(5, " SGW_S5C_TEID[0x%x] PGW_S5C_TEID[0x%x]\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); req = >p_message->update_bearer_request; if (req->bearer_contexts.presence == 0) { d_error("No Bearer"); return; } if (req->bearer_contexts.eps_bearer_id.presence == 0) { d_error("No EPS Bearer ID"); return; } gtp_message->h.type = GTP_UPDATE_BEARER_REQUEST_TYPE; gtp_message->h.teid = sgw_ue->mme_s11_teid; rv = gtp_build_msg(&pkbuf, gtp_message); d_assert(rv == CORE_OK, return, "gtp build failed"); s11_xact = gtp_xact_local_create(sgw_ue->gnode, >p_message->h, pkbuf); d_assert(s11_xact, return, "Null param"); gtp_xact_associate(s5c_xact, s11_xact); rv = gtp_xact_commit(s11_xact); d_assert(rv == CORE_OK, return, "xact_commit error"); d_trace(3, "[SGW] Update Bearer Request : SGW <-- PGW\n"); } void sgw_s5c_handle_delete_bearer_request(gtp_xact_t *s5c_xact, sgw_sess_t *sess, gtp_message_t *gtp_message) { status_t rv; gtp_xact_t *s11_xact = NULL; gtp_delete_bearer_request_t *req = NULL; pkbuf_t *pkbuf = NULL; sgw_ue_t *sgw_ue = NULL; d_assert(sess, return, "Null param"); sgw_ue = sess->sgw_ue; d_assert(sgw_ue, return, "Null param"); d_assert(s5c_xact, return, "Null param"); d_assert(gtp_message, return, "Null param"); req = >p_message->delete_bearer_request; d_trace(3, "[SGW] Delete Bearer Request\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); d_trace(5, " MME_S11_TEID[%d] SGW_S11_TEID[%d]\n", sgw_ue->mme_s11_teid, sgw_ue->sgw_s11_teid); d_trace(5, " SGW_S5C_TEID[0x%x] PGW_S5C_TEID[0x%x]\n", sess->sgw_s5c_teid, sess->pgw_s5c_teid); if (req->linked_eps_bearer_id.presence == 0 && req->eps_bearer_ids.presence == 0) { d_error("No Linked EBI or EPS Bearer ID"); return; } gtp_message->h.type = GTP_DELETE_BEARER_REQUEST_TYPE; gtp_message->h.teid = sgw_ue->mme_s11_teid; rv = gtp_build_msg(&pkbuf, gtp_message); d_assert(rv == CORE_OK, return, "gtp build failed"); s11_xact = gtp_xact_local_create(sgw_ue->gnode, >p_message->h, pkbuf); d_assert(s11_xact, return, "Null param"); gtp_xact_associate(s5c_xact, s11_xact); rv = gtp_xact_commit(s11_xact); d_assert(rv == CORE_OK, return, "xact_commit error"); } nextepc-0.3.10/src/sgw/sgw_s5c_handler.h000066400000000000000000000016311333553357400200640ustar00rootroot00000000000000#ifndef __SGW_S5C_HANDLER_H__ #define __SGW_S5C_HANDLER_H__ #include "gtp/gtp_message.h" #include "sgw_context.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(void) sgw_s5c_handle_create_session_response(gtp_xact_t *s5c_xact, sgw_sess_t *sess, gtp_message_t *gtp_message); CORE_DECLARE(void) sgw_s5c_handle_delete_session_response(gtp_xact_t *s5c_xact, sgw_sess_t *sess, gtp_message_t *gtp_message); CORE_DECLARE(void) sgw_s5c_handle_create_bearer_request(gtp_xact_t *s5c_xact, sgw_sess_t *sess, gtp_message_t *gtp_message); CORE_DECLARE(void) sgw_s5c_handle_update_bearer_request(gtp_xact_t *s5c_xact, sgw_sess_t *sess, gtp_message_t *gtp_message); CORE_DECLARE(void) sgw_s5c_handle_delete_bearer_request(gtp_xact_t *s5c_xact, sgw_sess_t *sess, gtp_message_t *gtp_message); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __SGW_S5C_HANDLER_H__ */ nextepc-0.3.10/src/sgw/sgw_sm.c000066400000000000000000000161141333553357400163110ustar00rootroot00000000000000#define TRACE_MODULE _sgw_sm #include "core_debug.h" #include "gtp/gtp_node.h" #include "sgw_context.h" #include "sgw_event.h" #include "sgw_sm.h" #include "sgw_gtp_path.h" #include "sgw_s11_handler.h" #include "sgw_s5c_handler.h" void sgw_state_initial(fsm_t *s, event_t *e) { sgw_sm_trace(3, e); d_assert(s, return, "Null param"); FSM_TRAN(s, &sgw_state_operational); } void sgw_state_final(fsm_t *s, event_t *e) { sgw_sm_trace(3, e); d_assert(s, return, "Null param"); } void sgw_state_operational(fsm_t *s, event_t *e) { status_t rv; sgw_sm_trace(3, e); d_assert(s, return, "Null param"); switch (event_get(e)) { case FSM_ENTRY_SIG: { rv = sgw_gtp_open(); if (rv != CORE_OK) { d_error("Can't establish SGW path"); break; } break; } case FSM_EXIT_SIG: { rv = sgw_gtp_close(); if (rv != CORE_OK) { d_error("Can't close SGW path"); break; } break; } case SGW_EVT_S11_MESSAGE: { status_t rv; pkbuf_t *pkbuf = (pkbuf_t *)event_get_param1(e); gtp_xact_t *xact = NULL; gtp_message_t message; sgw_ue_t *sgw_ue = NULL; d_assert(pkbuf, break,); rv = gtp_parse_msg(&message, pkbuf); d_assert(rv == CORE_OK, pkbuf_free(pkbuf); break,); if (message.h.teid == 0) { gtp_node_t *mme = sgw_mme_add_by_message(&message); d_assert(mme, pkbuf_free(pkbuf); break,); sgw_ue = sgw_ue_add_by_message(&message); SETUP_GTP_NODE(sgw_ue, mme); } else { sgw_ue = sgw_ue_find_by_teid(message.h.teid); } d_assert(sgw_ue, pkbuf_free(pkbuf); break,); rv = gtp_xact_receive(sgw_ue->gnode, &message.h, &xact); if (rv != CORE_OK) { pkbuf_free(pkbuf); break; } switch(message.h.type) { case GTP_CREATE_SESSION_REQUEST_TYPE: sgw_s11_handle_create_session_request(xact, sgw_ue, &message); break; case GTP_MODIFY_BEARER_REQUEST_TYPE: sgw_s11_handle_modify_bearer_request(xact, sgw_ue, &message.modify_bearer_request); break; case GTP_DELETE_SESSION_REQUEST_TYPE: sgw_s11_handle_delete_session_request(xact, sgw_ue, &message); break; case GTP_CREATE_BEARER_RESPONSE_TYPE: sgw_s11_handle_create_bearer_response(xact, sgw_ue, &message); break; case GTP_UPDATE_BEARER_RESPONSE_TYPE: sgw_s11_handle_update_bearer_response(xact, sgw_ue, &message); break; case GTP_DELETE_BEARER_RESPONSE_TYPE: sgw_s11_handle_delete_bearer_response(xact, sgw_ue, &message); break; case GTP_RELEASE_ACCESS_BEARERS_REQUEST_TYPE: sgw_s11_handle_release_access_bearers_request(xact, sgw_ue, &message.release_access_bearers_request); break; case GTP_DOWNLINK_DATA_NOTIFICATION_ACKNOWLEDGE_TYPE: sgw_s11_handle_downlink_data_notification_ack(xact, sgw_ue, &message.downlink_data_notification_acknowledge); break; case GTP_CREATE_INDIRECT_DATA_FORWARDING_TUNNEL_REQUEST_TYPE: sgw_s11_handle_create_indirect_data_forwarding_tunnel_request( xact, sgw_ue, &message. create_indirect_data_forwarding_tunnel_request); break; case GTP_DELETE_INDIRECT_DATA_FORWARDING_TUNNEL_REQUEST_TYPE: sgw_s11_handle_delete_indirect_data_forwarding_tunnel_request( xact, sgw_ue); break; default: d_warn("Not implmeneted(type:%d)", message.h.type); break; } pkbuf_free(pkbuf); break; } case SGW_EVT_S5C_MESSAGE: { status_t rv; pkbuf_t *pkbuf = (pkbuf_t *)event_get_param1(e); gtp_xact_t *xact = NULL; gtp_message_t message; sgw_sess_t *sess = NULL; d_assert(pkbuf, break, "Null param"); rv = gtp_parse_msg(&message, pkbuf); d_assert(rv == CORE_OK, pkbuf_free(pkbuf); break,); sess = sgw_sess_find_by_teid(message.h.teid); d_assert(sess, pkbuf_free(pkbuf); break,); rv = gtp_xact_receive(sess->gnode, &message.h, &xact); if (rv != CORE_OK) { pkbuf_free(pkbuf); break; } switch(message.h.type) { case GTP_CREATE_SESSION_RESPONSE_TYPE: sgw_s5c_handle_create_session_response(xact, sess, &message); break; case GTP_DELETE_SESSION_RESPONSE_TYPE: sgw_s5c_handle_delete_session_response(xact, sess, &message); break; case GTP_CREATE_BEARER_REQUEST_TYPE: sgw_s5c_handle_create_bearer_request(xact, sess, &message); break; case GTP_UPDATE_BEARER_REQUEST_TYPE: sgw_s5c_handle_update_bearer_request(xact, sess, &message); break; case GTP_DELETE_BEARER_REQUEST_TYPE: sgw_s5c_handle_delete_bearer_request(xact, sess, &message); break; default: d_warn("Not implmeneted(type:%d)", message.h.type); break; } pkbuf_free(pkbuf); break; } case SGW_EVT_T3_RESPONSE: case SGW_EVT_T3_HOLDING: { gtp_xact_timeout(event_get_param1(e), event_get(e)); break; } case SGW_EVT_LO_DLDATA_NOTI: { index_t index = (index_t)event_get_param1(e); sgw_bearer_t* bearer = sgw_bearer_find(index); if (!bearer) { d_error("Can not find bearer with index(%d)",index); break; } sgw_s11_handle_lo_dldata_notification(bearer); break; } default: { d_error("No handler for event %s", sgw_event_get_name(e)); break; } } } nextepc-0.3.10/src/sgw/sgw_sm.h000066400000000000000000000011651333553357400163160ustar00rootroot00000000000000#ifndef __SGW_SM_H__ #define __SGW_SM_H__ #include "core_param.h" #include "core_fsm.h" #include "core_event.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ void sgw_state_initial(fsm_t *s, event_t *e); void sgw_state_final(fsm_t *s, event_t *e); void sgw_state_operational(fsm_t *s, event_t *e); void sgw_state_exception(fsm_t *s, event_t *e); #define sgw_sm_print(__pe) \ d_print("%s(): %s\n", __func__, sgw_event_get_name(__pe)) #define sgw_sm_trace(__l, __pe) \ d_trace(__l, "%s(): %s\n", __func__, sgw_event_get_name(__pe)) #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* !__SGW_SM_H__ */ nextepc-0.3.10/support/000077500000000000000000000000001333553357400147705ustar00rootroot00000000000000nextepc-0.3.10/support/Makefile.am000066400000000000000000000002711333553357400170240ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in SUBDIRS = config freeDiameter systemd logrotate newsyslog MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump nextepc-0.3.10/support/README.md000066400000000000000000000003301333553357400162430ustar00rootroot00000000000000 * Network Configuration user@host ~/Documents/git/nextepc/support$ \ sudo ./network/restart.sh * Generate Key & Cert for Diameter user@host ~/Documents/git/nextepc/support$ \ ./make_certs.sh ./freeDiameter nextepc-0.3.10/support/config/000077500000000000000000000000001333553357400162355ustar00rootroot00000000000000nextepc-0.3.10/support/config/Makefile.am000066400000000000000000000003531333553357400202720ustar00rootroot00000000000000configfiles = \ nextepc.conf \ mme.conf \ sgw.conf \ pgw.conf \ hss.conf \ pcrf.conf \ $(NULL) configdir = ${sysconfdir}/nextepc config_DATA = ${configfiles} MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump nextepc-0.3.10/support/config/hss.conf.in000066400000000000000000000003371333553357400203110ustar00rootroot00000000000000### For reference, see `nextepc.conf` db_uri: mongodb://localhost/nextepc logger: file: @LOCALSTATE_DIR@/log/nextepc/hss.log trace: app: 1 diameter: 1 parameter: hss: freeDiameter: hss.conf nextepc-0.3.10/support/config/mme.conf.in000066400000000000000000000012401333553357400202640ustar00rootroot00000000000000### For reference, see `nextepc.conf` logger: file: @LOCALSTATE_DIR@/log/nextepc/mme.log trace: app: 1 s1ap: 1 nas: 1 diameter: 1 gtpv2: 1 parameter: mme: freeDiameter: mme.conf s1ap: gtpc: gummei: plmn_id: mcc: 001 mnc: 01 mme_gid: 2 mme_code: 1 tai: plmn_id: mcc: 001 mnc: 01 tac: 12345 security: integrity_order : [ EIA1, EIA2, EIA0 ] ciphering_order : [ EEA0, EEA1, EEA2 ] network_name: full: NextEPC sgw: gtpc: addr: 127.0.0.2 pgw: gtpc: addr: - 127.0.0.3 - ::1 nextepc-0.3.10/support/config/nextepc.conf.in000066400000000000000000000150631333553357400211640ustar00rootroot00000000000000db_uri: mongodb://localhost/nextepc logger: file: @LOCALSTATE_DIR@/log/nextepc/nextepc.log trace: app: 1 s1ap: 1 nas: 1 diameter: 1 gtpv2: 1 gtp: 1 # # parameter: # # o Number of output streams per SCTP associations. # sctp_streams: 30 # # o Disable use of IPv4 addresses (only IPv6) # no_ipv4: true # # o Disable use of IPv6 addresses (only IPv4) # no_ipv6: true # # o Prefer IPv4 instead of IPv6 for estabishing new GTP connections. # prefer_ipv4: true # # o Enable Multicast traffic to the UE # multicast: true # # o Disable Stateless Address Autoconfiguration for IPv6 # no_slaac: true # # parameter: no_ipv6: true mme: freeDiameter: mme.conf # # > # # o S1AP Server(all address avaiable) # s1ap: # # o S1AP Server(0.0.0.0:36412) # s1ap: # addr: 0.0.0.0 # # o S1AP Server(127.0.0.1:36412, [::1]:36412) # s1ap: # - addr: 127.0.0.1 # - addr: ::1 # o S1AP Server(different port) # s1ap: # - addr: 127.0.0.1 # port: 36413 # # o S1AP Server(address avaiable in `eth0` interface) # s1ap: # dev: eth0 # s1ap: # # > # # o GTP-C Server(all address avaiable) # gtpc: # # o GTP-C Server(127.0.0.1:2123, [::1]:2123) # gtpc: # - addr: 127.0.0.1 # - addr: ::1 # gtpc: # # # # o Multiple GUMMEI # gummei: # - plmn_id: # mcc: 001 # mnc: 01 # mme_gid: 2 # mme_code: 1 # - plmn_id: # - mcc: 002 # mnc: 02 # - mcc: 003 # mnc: 03 # mme_gid: [3, 4] # mme_code: # - 2 # - 3 # gummei: plmn_id: mcc: 001 mnc: 01 mme_gid: 2 mme_code: 1 # # # # o Multiple TAI # tai: # - plmn_id: # mcc: 001 # mnc: 01 # tac: [1, 2, 3] # tai: # - plmn_id: # mcc: 002 # mnc: 02 # tac: 4 # - plmn_id: # mcc: 003 # mnc: 03 # tac: 5 # tai: # - plmn_id: # mcc: 004 # mnc: 04 # tac: [6, 7] # - plmn_id: # mcc: 005 # mnc: 05 # tac: 8 # - plmn_id: # mcc: 006 # mnc: 06 # tac: [9, 10] # tai: plmn_id: mcc: 001 mnc: 01 tac: 12345 security: integrity_order : [ EIA1, EIA2, EIA0 ] ciphering_order : [ EEA0, EEA1, EEA2 ] # # # network_name: # full: NextEPC # short: Next # network_name: full: NextEPC hss: freeDiameter: hss.conf sgw: # # ------------------------ MME -------------------------- # # o Specify SGW addresses the GTP-C must connect to # # o One SGW is defined. If prefer_ipv4 is not true, [fe80::2%@LO_DEV@] is selected. # gtpc: # addr: # - 127.0.0.2 # - fe80::2%@LO_DEV@ # # o Two SGW are defined. MME selects SGW with round-robin manner per UE # gtpc: # - addr: 127.0.0.2 # - addr: fe80::2%@LO_DEV@ # # o Three SGW are defined. MME selects SGW with round-robin manner per UE # gtpc: # - addr # - 127.0.0.2 # - fe80::2%@LO_DEV@ # - addr # - 127.0.0.12 # - fe80::12%@LO_DEV@ # - name: sgw3.nextepc.org # # ------------------------ SGW -------------------------- # # o GTP-C Server(127.0.0.2:2123, [fe80::2%@LO_DEV@]:2123) # gtpc: # addr: # - 127.0.0.2 # - fe80::2%@LO_DEV@ # # o On SGW, Same Configuration(127.0.0.2:2123, [fe80::2%@LO_DEV@]:2123) as below. # gtpc: # - addr: 127.0.0.2 # - addr: fe80::2%@LO_DEV@ # gtpc: addr: 127.0.0.2 # # > # # o GTP-U Server(all address avaiable) # gtpu: # gtpu: pgw: freeDiameter: pgw.conf # # ------------------------ MME -------------------------- # # o Only first node is attempted. Others are ignored. # o if HSS provide PGW addresss(per-UE), DB overwrites YAML-configuration. # # o Two PGW are defined. 127.0.0.3:2123 is attempted. [fe80::3%@LO_DEV@]:2123 is ignored. # gtpc: # - addr: 127.0.0.3 # - addr: fe80::3%@LO_DEV@ # # o One PGW is defined. if prefer_ipv4 is not true, [fe80::3%@LO_DEV@] is selected. # gtpc: # - addr: # - 127.0.0.3 # - fe80::3%@LO_DEV@ # # ------------------------ PGW -------------------------- # # o GTP-C Server(127.0.0.3:2123, [fe80::3%@LO_DEV@]:2123) # gtpc: # addr: # - 127.0.0.3 # - fe80::3%@LO_DEV@ # # o On PGW, Same configuration(127.0.0.3:2123, [fe80::3%@LO_DEV@]:2123) as below. # gtpc: # - addr: 127.0.0.3 # - addr: fe80::3%@LO_DEV@ # gtpc: addr: - 127.0.0.3 - ::1 # # > # # o GTP-U Server(127.0.0.3:2152, [::1]:2152) # gtpu: # - addr: 127.0.0.3 # - addr: ::1 # # o Same configuration(127.0.0.3:2152, [::1]:2152) as below. # gtpu: # name: localhost # gtpu: - addr: 127.0.0.3 - addr: ::1 # # # # o IPv4 Pool # $ sudo ip addr add 45.45.0.1/16 dev pgwtun # # ue_pool: # addr: 45.45.0.1/16 # # o IPv4/IPv6 Pool # $ sudo ip addr add 45.45.0.1/16 dev pgwtun # $ sudo ip addr add cafe:1::1/64 dev pgwtun # # ue_pool: # - addr: 45.45.0.1/16 # - addr: cafe:1::1/64 # # # o Specific APN(e.g 'volte') uses 45.46.0.1/16, cafe:2::1/64 # All other APNs use 45.45.0.1/16, cafe:1::1/64 # $ sudo ip addr add 45.45.0.1/16 dev pgwtun # $ sudo ip addr add 45.46.0.1/16 dev pgwtun # $ sudo ip addr add cafe:1::1/64 dev pgwtun # $ sudo ip addr add cafe:2::1/64 dev pgwtun # # ue_pool: # - addr: 45.45.0.1/16 # - addr: cafe:1::1/64 # - addr: 45.46.0.1/16 # apn: volte # - addr: cafe:2::1/64 # apn: volte # # o Multiple Devices (default: pgwtun) # $ sudo ip addr add 45.45.0.1/16 dev pgwtun # $ sudo ip addr add cafe:1::1/64 dev pgwtun2 # $ sudo ip addr add 45.46.0.1/16 dev pgwtun3 # $ sudo ip addr add cafe:2::1/64 dev pgwtun3 # # ue_pool: # - addr: 45.45.0.1/16 # - addr: cafe:1::1/64 # dev: pgwtun2 # - addr: 45.46.0.1/16 # apn: volte # dev: pgwtun3 # - addr: cafe:2::1/64 # apn: volte # dev: pgwtun3 # ue_pool: - addr: 45.45.0.1/16 - addr: cafe::1/64 # # # # o Primary/Secondary can be configured. Others are ignored. # dns: - 8.8.8.8 - 8.8.4.4 - 2001:4860:4860::8888 - 2001:4860:4860::8844 # # # # o Proxy Call Session Control Function # # p-cscf: # - 127.0.0.1 # - ::1 # pcrf: freeDiameter: pcrf.conf nextepc-0.3.10/support/config/pcrf.conf.in000066400000000000000000000003421333553357400204420ustar00rootroot00000000000000### For reference, see `nextepc.conf` db_uri: mongodb://localhost/nextepc logger: file: @LOCALSTATE_DIR@/log/nextepc/pcrf.log trace: app: 1 diameter: 1 parameter: pcrf: freeDiameter: pcrf.conf nextepc-0.3.10/support/config/pgw.conf.in000066400000000000000000000007521333553357400203120ustar00rootroot00000000000000### For reference, see `nextepc.conf` logger: file: @LOCALSTATE_DIR@/log/nextepc/pgw.log trace: app: 1 diameter: 1 gtpv2: 1 gtp: 1 parameter: pgw: freeDiameter: pgw.conf gtpc: addr: - 127.0.0.3 - ::1 gtpu: - addr: 127.0.0.3 - addr: ::1 ue_pool: - addr: 45.45.0.1/16 - addr: cafe::1/64 dns: - 8.8.8.8 - 8.8.4.4 - 2001:4860:4860::8888 - 2001:4860:4860::8844 nextepc-0.3.10/support/config/sgw.conf.in000066400000000000000000000003471333553357400203150ustar00rootroot00000000000000### For reference, see `nextepc.conf` logger: file: @LOCALSTATE_DIR@/log/nextepc/sgw.log trace: app: 1 gtpv2: 1 gtp: 1 parameter: no_ipv6: true sgw: gtpc: addr: 127.0.0.2 gtpu: nextepc-0.3.10/support/docker/000077500000000000000000000000001333553357400162375ustar00rootroot00000000000000nextepc-0.3.10/support/docker/README.md000066400000000000000000000027541333553357400175260ustar00rootroot00000000000000Docker running example =========================================== * Build Image $ docker-compose build * Development $ docker-compose run dev * Runtime $ docker-compose \ -f docker-compose.yml -f docker-compose.run.yml run run * Test $ docker-compose \ -f docker-compose.yml -f docker-compose.test.yml run test * Test(ubuntu:artful) $ TAG=artful docker-compose build $ TAG=artful docker-compose \ -f docker-compose.yml -f docker-compose.test.yml run test * Development(fedora:latest) $ DIST=fedora docker-compose build $ DIST=fedora docker-compose run dev * Runtime(debian:jessie) $ DIST=debian TAG=jessie docker-compose build $ DIST=debian TAG=jessie docker-compose -f docker-compose.yml -f docker-compose.run.yml run run * All Test with All Environment $ ./check.sh * Run WebUI $ docker-compose up -d For Debian Package Release =========================================== * Run Docker $ docker-compose run dev * Setup Debian Environment export DEBFULLNAME='Sukchan Lee' export DEBEMAIL='acetcom@gmail.com' * Transfer GPG key $ gpg --export-secret-keys --armor --output private.asc $ gpg --import private.asc $ gpg --export > public.asc $ gpg --import public.asc * Upload LaunchPad $ dch -i $ debuild -S $ dput ppa:acetcom/nextepc *.source.changes * Build pckage $ dpkg-buildpackage For Mac OS X (SCTP-patch) =========================================== * /Applications/Docker.app/Contents/Resources/moby Update linuxkit-kernel, vmlinuz64 nextepc-0.3.10/support/docker/build/000077500000000000000000000000001333553357400173365ustar00rootroot00000000000000nextepc-0.3.10/support/docker/build/Dockerfile000066400000000000000000000011331333553357400213260ustar00rootroot00000000000000ARG dist=ubuntu ARG tag=latest ARG username=acetcom FROM ${username}/${dist}-${tag}-nextepc-base MAINTAINER Sukchan Lee WORKDIR /root COPY setup.sh /root ARG USER=acetcom ARG REPO=nextepc ARG BRANCH=master RUN git clone https://github.com/$USER/$REPO ADD https://api.github.com/repos/$USER/$REPO/git/refs/heads/$BRANCH /root/nextepc-ver.json RUN cd nextepc && \ git fetch && git checkout -f -B master origin/master && \ autoreconf -f -i && \ ./configure \ --prefix=/usr \ --sysconfdir=/etc \ --localstatedir=/var && \ make -j `nproc` install nextepc-0.3.10/support/docker/build/setup.sh000077500000000000000000000004441333553357400210370ustar00rootroot00000000000000#!/bin/sh if ! grep "pgwtun" /proc/net/dev > /dev/null; then ip tuntap add name pgwtun mode tun fi ip addr del 45.45.0.1/16 dev pgwtun 2> /dev/null ip addr add 45.45.0.1/16 dev pgwtun ip addr del cafe::1/64 dev pgwtun 2> /dev/null ip addr add cafe::1/64 dev pgwtun ip link set pgwtun up nextepc-0.3.10/support/docker/centos/000077500000000000000000000000001333553357400175325ustar00rootroot00000000000000nextepc-0.3.10/support/docker/centos/7/000077500000000000000000000000001333553357400177005ustar00rootroot00000000000000nextepc-0.3.10/support/docker/centos/7/base/000077500000000000000000000000001333553357400206125ustar00rootroot00000000000000nextepc-0.3.10/support/docker/centos/7/base/Dockerfile000066400000000000000000000007431333553357400226100ustar00rootroot00000000000000ARG dist=centos ARG tag=latest FROM ${dist}:${tag} MAINTAINER Sukchan Lee RUN yum -y install \ autoconf \ libtool \ gcc \ flex \ bison \ git \ lksctp-tools-devel \ libidn-devel \ gnutls-devel \ libgcrypt-devel \ openssl-devel \ cyrus-sasl-devel \ libyaml-devel \ iproute RUN yum -y install epel-release && \ yum -y install mongo-c-driver-devel nextepc-0.3.10/support/docker/centos/7/dev/000077500000000000000000000000001333553357400204565ustar00rootroot00000000000000nextepc-0.3.10/support/docker/centos/7/dev/Dockerfile000066400000000000000000000007411333553357400224520ustar00rootroot00000000000000ARG dist=centos ARG tag=latest ARG username=acetcom FROM ${username}/${dist}-${tag}-nextepc-base MAINTAINER Sukchan Lee RUN yum -y install \ cscope \ vim \ sudo \ iputils \ net-tools COPY setup.sh /root ARG username=acetcom RUN useradd -m --uid=1000 ${username} && \ echo "${username} ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/${username} && \ chmod 0440 /etc/sudoers.d/${username} WORKDIR /home/${username} nextepc-0.3.10/support/docker/centos/7/dev/setup.sh000077500000000000000000000004441333553357400221570ustar00rootroot00000000000000#!/bin/sh if ! grep "pgwtun" /proc/net/dev > /dev/null; then ip tuntap add name pgwtun mode tun fi ip addr del 45.45.0.1/16 dev pgwtun 2> /dev/null ip addr add 45.45.0.1/16 dev pgwtun ip addr del cafe::1/64 dev pgwtun 2> /dev/null ip addr add cafe::1/64 dev pgwtun ip link set pgwtun up nextepc-0.3.10/support/docker/centos/latest0000777000000000000000000000000013335533574002103527ustar00rootroot00000000000000nextepc-0.3.10/support/docker/check.sh000077500000000000000000000012621333553357400176540ustar00rootroot00000000000000#!/bin/sh docker-compose build docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test TAG=artful docker-compose build TAG=artful docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test DIST=fedora docker-compose build DIST=fedora docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test DIST=centos docker-compose build DIST=centos docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test DIST=debian TAG=jessie docker-compose build DIST=debian TAG=jessie docker-compose -f docker-compose.yml -f docker-compose.test.yml run --rm test docker rm $(docker ps -qa --no-trunc --filter "status=exited") nextepc-0.3.10/support/docker/debian/000077500000000000000000000000001333553357400174615ustar00rootroot00000000000000nextepc-0.3.10/support/docker/debian/jessie/000077500000000000000000000000001333553357400207435ustar00rootroot00000000000000nextepc-0.3.10/support/docker/debian/jessie/base/000077500000000000000000000000001333553357400216555ustar00rootroot00000000000000nextepc-0.3.10/support/docker/debian/jessie/base/Dockerfile000066400000000000000000000016031333553357400236470ustar00rootroot00000000000000ARG dist=debian ARG tag=jessie FROM ${dist}:${tag} MAINTAINER Sukchan Lee RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y --no-install-recommends \ autoconf \ automake \ libtool \ gcc \ flex \ bison \ git \ libsctp-dev \ libgnutls28-dev \ libgcrypt-dev \ libssl-dev \ libidn11-dev \ libyaml-dev \ build-essential \ iproute2 \ ca-certificates \ netbase \ curl \ pkg-config && \ apt-get clean WORKDIR /root RUN curl -SLO "https://github.com/mongodb/mongo-c-driver/releases/download/1.9.2/mongo-c-driver-1.9.2.tar.gz"; \ tar xzf mongo-c-driver-1.9.2.tar.gz; \ cd mongo-c-driver-1.9.2; \ ./configure --disable-automatic-init-and-cleanup; \ make -j `nproc` install; \ ldconfig; nextepc-0.3.10/support/docker/debian/jessie/dev000077700000000000000000000000001333553357400253532../../ubuntu/bionic/devustar00rootroot00000000000000nextepc-0.3.10/support/docker/debian/latest000077700000000000000000000000001333553357400222722stretchustar00rootroot00000000000000nextepc-0.3.10/support/docker/debian/stable000077700000000000000000000000001333553357400222502stretchustar00rootroot00000000000000nextepc-0.3.10/support/docker/debian/stretch/000077500000000000000000000000001333553357400211355ustar00rootroot00000000000000nextepc-0.3.10/support/docker/debian/stretch/base/000077500000000000000000000000001333553357400220475ustar00rootroot00000000000000nextepc-0.3.10/support/docker/debian/stretch/base/Dockerfile000066400000000000000000000016001333553357400240360ustar00rootroot00000000000000ARG dist=debian ARG tag=stable FROM ${dist}:${tag} MAINTAINER Sukchan Lee ARG tag=stable RUN apt-get update && \ apt-get install -y netselect-apt && \ apt-get clean && \ if [ "x$tag" = "xlatest" ]; then \ netselect-apt -o /etc/apt/sources.list; \ else \ netselect-apt ${tag} -o /etc/apt/sources.list; \ fi RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y --no-install-recommends \ autoconf \ automake \ libtool \ gcc \ flex \ bison \ git \ libsctp-dev \ libgnutls28-dev \ libgcrypt-dev \ libssl-dev \ libidn11-dev \ libmongoc-dev \ libbson-dev \ libyaml-dev \ build-essential \ iproute2 \ ca-certificates \ netbase \ pkg-config && \ apt-get clean nextepc-0.3.10/support/docker/debian/stretch/dev000077700000000000000000000000001333553357400255452../../ubuntu/bionic/devustar00rootroot00000000000000nextepc-0.3.10/support/docker/docker-compose.run.yml000066400000000000000000000007061333553357400225020ustar00rootroot00000000000000version: '3' services: run: network_mode: "host" image: ${USER}/${DIST-ubuntu}-${TAG-latest}-nextepc-build depends_on: - mongodb - build cap_add: - NET_ADMIN devices: - "/dev/net/tun:/dev/net/tun" sysctls: - net.ipv6.conf.all.disable_ipv6=0 volumes: - config:/etc/nextepc hostname: nextepc-run command: /bin/bash -c "/root/setup.sh; /usr/bin/nextepc-epcd" volumes: config: {} nextepc-0.3.10/support/docker/docker-compose.test.yml000066400000000000000000000006431333553357400226550ustar00rootroot00000000000000version: '3' services: test: image: ${USER}/${DIST-ubuntu}-${TAG-latest}-nextepc-build depends_on: - mongodb - build environment: DB_URI: mongodb://mongodb/nextepc cap_add: - NET_ADMIN devices: - "/dev/net/tun:/dev/net/tun" sysctls: - net.ipv6.conf.all.disable_ipv6=0 hostname: nextepc-test command: /bin/bash -c "/root/setup.sh; /usr/bin/testepc" nextepc-0.3.10/support/docker/docker-compose.yml000066400000000000000000000034331333553357400216770ustar00rootroot00000000000000version: '3' services: mongodb: image: mongo container_name: nextepc-mongodb ports: - "27017:27017" volumes: - mongodb:/data/db webui: build: webui image: ${USER}/nextepc-webui container_name: nextepc-webui depends_on: - mongodb ports: - "3000:3000" depends_on: - mongodb environment: DB_URI: mongodb://mongodb/nextepc base: build: context: ./${DIST-ubuntu}/${TAG-latest}/base args: dist: ${DIST-ubuntu} tag: ${TAG-latest} image: ${USER}/${DIST-ubuntu}-${TAG-latest}-nextepc-base command: /bin/bash -c "echo 'base' services" build: build: context: ./build args: dist: ${DIST-ubuntu} tag: ${TAG-latest} username: ${USER} image: ${USER}/${DIST-ubuntu}-${TAG-latest}-nextepc-build depends_on: - base command: /bin/bash -c "echo 'build' services" dev: build: context: ./${DIST-ubuntu}/${TAG-latest}/dev args: dist: ${DIST-ubuntu} tag: ${TAG-latest} username: ${USER} image: ${USER}/${DIST-ubuntu}-${TAG-latest}-nextepc-dev depends_on: - mongodb - base environment: - DB_URI=mongodb://mongodb/nextepc - DISPLAY=docker.for.mac.localhost:0 cap_add: - NET_ADMIN devices: - "/dev/net/tun:/dev/net/tun" sysctls: - net.ipv6.conf.all.disable_ipv6=0 volumes: - home:/home/${USER} - ${HOME}:/mnt - /tmp/.X11-unix:/tmp/.X11-unix hostname: nextepc-dev user: ${USER} entrypoint: /bin/bash -c "/bin/bash -c \"$${@}\"" command: | /bin/bash -c " sudo chmod 666 /dev/net/tun sudo /root/setup.sh /bin/bash || exit 0 " volumes: mongodb: {} home: {} nextepc-0.3.10/support/docker/fedora/000077500000000000000000000000001333553357400174775ustar00rootroot00000000000000nextepc-0.3.10/support/docker/fedora/27/000077500000000000000000000000001333553357400177275ustar00rootroot00000000000000nextepc-0.3.10/support/docker/fedora/27/base/000077500000000000000000000000001333553357400206415ustar00rootroot00000000000000nextepc-0.3.10/support/docker/fedora/27/base/Dockerfile000066400000000000000000000007321333553357400226350ustar00rootroot00000000000000ARG dist=fedora ARG tag=latest FROM ${dist}:${tag} MAINTAINER Sukchan Lee RUN dnf -y install \ autoconf \ libtool \ gcc \ make \ flex \ bison \ git \ lksctp-tools-devel \ libidn-devel \ gnutls-devel \ libgcrypt-devel \ mongo-c-driver-devel \ openssl-devel \ cyrus-sasl-devel \ snappy-devel \ libyaml-devel \ iproute nextepc-0.3.10/support/docker/fedora/27/dev/000077500000000000000000000000001333553357400205055ustar00rootroot00000000000000nextepc-0.3.10/support/docker/fedora/27/dev/Dockerfile000066400000000000000000000007411333553357400225010ustar00rootroot00000000000000ARG dist=fedora ARG tag=latest ARG username=acetcom FROM ${username}/${dist}-${tag}-nextepc-base MAINTAINER Sukchan Lee RUN dnf -y install \ cscope \ vim \ sudo \ iputils \ net-tools COPY setup.sh /root ARG username=acetcom RUN useradd -m --uid=1000 ${username} && \ echo "${username} ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/${username} && \ chmod 0440 /etc/sudoers.d/${username} WORKDIR /home/${username} nextepc-0.3.10/support/docker/fedora/27/dev/setup.sh000077500000000000000000000004441333553357400222060ustar00rootroot00000000000000#!/bin/sh if ! grep "pgwtun" /proc/net/dev > /dev/null; then ip tuntap add name pgwtun mode tun fi ip addr del 45.45.0.1/16 dev pgwtun 2> /dev/null ip addr add 45.45.0.1/16 dev pgwtun ip addr del cafe::1/64 dev pgwtun 2> /dev/null ip addr add cafe::1/64 dev pgwtun ip link set pgwtun up nextepc-0.3.10/support/docker/fedora/latest00007770000000000000000000000000133355335740021064227ustar00rootroot00000000000000nextepc-0.3.10/support/docker/package/000077500000000000000000000000001333553357400176325ustar00rootroot00000000000000nextepc-0.3.10/support/docker/package/Dockerfile000066400000000000000000000003501333553357400216220ustar00rootroot00000000000000ARG tag=latest FROM ubuntu:${tag} RUN apt-get update && \ apt-get -y install software-properties-common && \ add-apt-repository ppa:acetcom/nextepc && \ apt-get update && \ apt-get install -y nextepc WORKDIR /root nextepc-0.3.10/support/docker/ubuntu/000077500000000000000000000000001333553357400175615ustar00rootroot00000000000000nextepc-0.3.10/support/docker/ubuntu/artful000077700000000000000000000000001333553357400221622bionicustar00rootroot00000000000000nextepc-0.3.10/support/docker/ubuntu/bionic/000077500000000000000000000000001333553357400210245ustar00rootroot00000000000000nextepc-0.3.10/support/docker/ubuntu/bionic/base/000077500000000000000000000000001333553357400217365ustar00rootroot00000000000000nextepc-0.3.10/support/docker/ubuntu/bionic/base/Dockerfile000066400000000000000000000011631333553357400237310ustar00rootroot00000000000000ARG dist=ubuntu ARG tag=latest FROM ${dist}:${tag} MAINTAINER Sukchan Lee RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y --no-install-recommends \ autoconf \ automake \ libtool \ gcc \ flex \ bison \ git \ libsctp-dev \ libgnutls28-dev \ libgcrypt-dev \ libssl-dev \ libidn11-dev \ libmongoc-dev \ libbson-dev \ libyaml-dev \ build-essential \ iproute2 \ ca-certificates \ netbase \ pkg-config && \ apt-get clean nextepc-0.3.10/support/docker/ubuntu/bionic/dev/000077500000000000000000000000001333553357400216025ustar00rootroot00000000000000nextepc-0.3.10/support/docker/ubuntu/bionic/dev/Dockerfile000066400000000000000000000014251333553357400235760ustar00rootroot00000000000000ARG dist=ubuntu ARG tag=latest ARG username=acetcom FROM ${username}/${dist}-${tag}-nextepc-base MAINTAINER Sukchan Lee RUN apt-get update && \ apt-get upgrade -y && \ DEBIAN_FRONTEND=noninteractive \ apt-get install -y --no-install-recommends \ debhelper \ devscripts \ dput \ dh-autoreconf \ dh-systemd \ manpages-dev \ fakeroot \ cscope \ vim \ sudo \ iputils-ping \ wireshark \ net-tools && \ apt-get clean COPY setup.sh /root ARG username=acetcom RUN useradd -m --uid=1000 ${username} && \ echo "${username} ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/${username} && \ chmod 0440 /etc/sudoers.d/${username} WORKDIR /home/${username} nextepc-0.3.10/support/docker/ubuntu/bionic/dev/setup.sh000077500000000000000000000004441333553357400233030ustar00rootroot00000000000000#!/bin/sh if ! grep "pgwtun" /proc/net/dev > /dev/null; then ip tuntap add name pgwtun mode tun fi ip addr del 45.45.0.1/16 dev pgwtun 2> /dev/null ip addr add 45.45.0.1/16 dev pgwtun ip addr del cafe::1/64 dev pgwtun 2> /dev/null ip addr add cafe::1/64 dev pgwtun ip link set pgwtun up nextepc-0.3.10/support/docker/ubuntu/latest000077700000000000000000000000001333553357400221612bionicustar00rootroot00000000000000nextepc-0.3.10/support/docker/ubuntu/trusty/000077500000000000000000000000001333553357400211335ustar00rootroot00000000000000nextepc-0.3.10/support/docker/ubuntu/trusty/base/000077500000000000000000000000001333553357400220455ustar00rootroot00000000000000nextepc-0.3.10/support/docker/ubuntu/trusty/base/Dockerfile000066400000000000000000000016031333553357400240370ustar00rootroot00000000000000ARG dist=ubuntu ARG tag=latest FROM ${dist}:${tag} MAINTAINER Sukchan Lee RUN apt-get update && \ apt-get upgrade -y && \ apt-get install -y --no-install-recommends \ autoconf \ automake \ libtool \ gcc \ flex \ bison \ git \ libsctp-dev \ libgnutls28-dev \ libgcrypt-dev \ libssl-dev \ libidn11-dev \ libyaml-dev \ build-essential \ iproute2 \ ca-certificates \ netbase \ curl \ pkg-config && \ apt-get clean WORKDIR /root RUN curl -SLO "https://github.com/mongodb/mongo-c-driver/releases/download/1.9.2/mongo-c-driver-1.9.2.tar.gz"; \ tar xzf mongo-c-driver-1.9.2.tar.gz; \ cd mongo-c-driver-1.9.2; \ ./configure --disable-automatic-init-and-cleanup; \ make -j `nproc` install; \ ldconfig; nextepc-0.3.10/support/docker/ubuntu/trusty/dev000077700000000000000000000000001333553357400240232../xenial/devustar00rootroot00000000000000nextepc-0.3.10/support/docker/ubuntu/xenial000077700000000000000000000000001333553357400221452bionicustar00rootroot00000000000000nextepc-0.3.10/support/docker/webui/000077500000000000000000000000001333553357400173525ustar00rootroot00000000000000nextepc-0.3.10/support/docker/webui/Dockerfile000066400000000000000000000006371333553357400213520ustar00rootroot00000000000000FROM node:carbon MAINTAINER Sukchan Lee ARG PACKAGE=nextepc ARG VERSION=0.3.3 RUN set -e; \ cd /usr/src; \ rm -rf ./$PACKAGE; \ curl -SLO "https://github.com/acetcom/$PACKAGE/archive/v$VERSION.tar.gz"; \ tar -xvf v$VERSION.tar.gz; \ mv ./$PACKAGE-$VERSION/ ./$PACKAGE; WORKDIR /usr/src/nextepc/webui RUN npm install && \ npm run build CMD npm run start EXPOSE 3000 nextepc-0.3.10/support/freeDiameter/000077500000000000000000000000001333553357400173645ustar00rootroot00000000000000nextepc-0.3.10/support/freeDiameter/Makefile.am000066400000000000000000000006351333553357400214240ustar00rootroot00000000000000configfiles = \ mme.conf \ hss.conf \ pgw.conf \ pcrf.conf \ $(NULL) pemfiles = \ cacert.pem \ mme.key.pem \ mme.cert.pem \ hss.key.pem \ hss.cert.pem \ pgw.key.pem \ pgw.cert.pem \ pcrf.key.pem \ pcrf.cert.pem \ $(NULL) freeDiameterdir = ${sysconfdir}/nextepc/freeDiameter freeDiameter_DATA = ${configfiles} ${pemfiles} MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump nextepc-0.3.10/support/freeDiameter/cacert.pem000066400000000000000000000017151333553357400213340ustar00rootroot00000000000000-----BEGIN CERTIFICATE----- MIICoTCCAgqgAwIBAgIJAM4pPqS92AJcMA0GCSqGSIb3DQEBCwUAMGgxFzAVBgNV BAMMDmNhLmxvY2FsZG9tYWluMQswCQYDVQQGEwJLTzEOMAwGA1UECAwFU2VvdWwx DjAMBgNVBAcMBU5vd29uMRAwDgYDVQQKDAdOZXh0RVBDMQ4wDAYDVQQLDAVUZXN0 czAeFw0xODA4MTcwMDU4MjFaFw0yODA4MTQwMDU4MjFaMGgxFzAVBgNVBAMMDmNh LmxvY2FsZG9tYWluMQswCQYDVQQGEwJLTzEOMAwGA1UECAwFU2VvdWwxDjAMBgNV BAcMBU5vd29uMRAwDgYDVQQKDAdOZXh0RVBDMQ4wDAYDVQQLDAVUZXN0czCBnzAN BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwED2MQYt+dCEa0jSZjmkpEMTy0KQHKUr K9nXcd3T63tol6KlSoQ4vkiND0J867JW6K0oNPjfPL+n/j7q6OKWfN10ew/jgQdn ZsE7gOs/EZYNvXrsKw0ArOC10gCWBuRbXkWMiiTHgYebicG6zFLwSWCCcv1mS7gU kQ+5QbetJJECAwEAAaNTMFEwHQYDVR0OBBYEFF4SJr4d4t8o0Y0Izj3/FkB+GESu MB8GA1UdIwQYMBaAFF4SJr4d4t8o0Y0Izj3/FkB+GESuMA8GA1UdEwEB/wQFMAMB Af8wDQYJKoZIhvcNAQELBQADgYEAOMqRnLyCf/KrPpsFDgPfUGeYtTSrEp2n4oiN 7/IrT+bZm8JU7L7TEuzaR+rFqjAeJKftv0VPQIA5DvlsfSI015G433ZpO81oIJzu a1fqKT2zyh8Er+HRf/sdQkKM7HGh61ZCipqiamNYbzlacq42W15wXJCDxr0yYzvi B+VE1mQ= -----END CERTIFICATE----- nextepc-0.3.10/support/freeDiameter/hss.cert.pem000066400000000000000000000060141333553357400216210ustar00rootroot00000000000000Certificate: Data: Version: 3 (0x2) Serial Number: 2 (0x2) Signature Algorithm: sha256WithRSAEncryption Issuer: CN=ca.localdomain, C=KO, ST=Seoul, L=Nowon, O=NextEPC, OU=Tests Validity Not Before: Aug 17 00:58:21 2018 GMT Not After : Aug 14 00:58:21 2028 GMT Subject: C=KO, ST=Seoul, O=NextEPC, OU=Tests, CN=hss.localdomain Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (1024 bit) Modulus: 00:e4:c5:4e:3a:92:46:30:6a:6b:b1:c9:e8:9a:40: 35:57:6c:3b:4f:88:3e:bf:69:aa:71:24:a9:54:96: 2f:6f:ca:77:a2:d9:3a:cb:d5:71:cc:89:46:c1:94: 51:a8:a8:88:5b:58:8b:f2:b7:c7:66:c9:5e:93:b9: 92:7f:c3:bd:9a:b9:93:6c:b9:c3:6a:cd:19:17:b9: 36:b7:11:db:1b:a1:b0:8e:76:46:53:a8:0f:e5:89: f7:2d:c1:6d:8e:12:35:c9:7f:16:6f:83:22:eb:e1: b3:8c:d5:a4:75:3d:63:70:d5:6f:40:c3:ab:86:9c: 43:53:6e:f2:a9:60:a8:11:2d Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Basic Constraints: CA:FALSE Netscape Comment: OpenSSL Generated Certificate X509v3 Subject Key Identifier: 36:1B:B0:35:30:C2:27:9D:F8:9C:19:0C:72:81:9B:D1:EB:4F:FA:77 X509v3 Authority Key Identifier: keyid:5E:12:26:BE:1D:E2:DF:28:D1:8D:08:CE:3D:FF:16:40:7E:18:44:AE Signature Algorithm: sha256WithRSAEncryption 4f:54:46:2a:0c:79:5d:e3:78:b5:90:96:9e:9d:1c:b3:01:87: da:f6:d5:b1:ca:e8:0b:21:2f:b9:4f:06:0a:67:12:64:5d:b8: 4b:a2:1e:66:72:2d:74:50:4f:ce:18:14:ee:77:e5:13:0d:f6: cf:96:9e:0f:44:6b:a0:1b:ab:70:91:f8:af:7e:fc:e0:71:1a: a0:96:7c:81:17:8e:3f:60:89:70:45:30:83:bb:76:da:2a:2a: 01:40:bb:26:f3:69:19:64:da:78:ac:a5:bb:05:ca:7d:9b:b7: 80:e6:38:04:17:f2:38:ab:38:f8:db:88:2a:bf:2a:a0:35:9d: 30:b4 -----BEGIN CERTIFICATE----- MIICsjCCAhugAwIBAgIBAjANBgkqhkiG9w0BAQsFADBoMRcwFQYDVQQDDA5jYS5s b2NhbGRvbWFpbjELMAkGA1UEBhMCS08xDjAMBgNVBAgMBVNlb3VsMQ4wDAYDVQQH DAVOb3dvbjEQMA4GA1UECgwHTmV4dEVQQzEOMAwGA1UECwwFVGVzdHMwHhcNMTgw ODE3MDA1ODIxWhcNMjgwODE0MDA1ODIxWjBZMQswCQYDVQQGEwJLTzEOMAwGA1UE CAwFU2VvdWwxEDAOBgNVBAoMB05leHRFUEMxDjAMBgNVBAsMBVRlc3RzMRgwFgYD VQQDDA9oc3MubG9jYWxkb21haW4wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB AOTFTjqSRjBqa7HJ6JpANVdsO0+IPr9pqnEkqVSWL2/Kd6LZOsvVccyJRsGUUaio iFtYi/K3x2bJXpO5kn/DvZq5k2y5w2rNGRe5NrcR2xuhsI52RlOoD+WJ9y3BbY4S Ncl/Fm+DIuvhs4zVpHU9Y3DVb0DDq4acQ1Nu8qlgqBEtAgMBAAGjezB5MAkGA1Ud EwQCMAAwLAYJYIZIAYb4QgENBB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmlj YXRlMB0GA1UdDgQWBBQ2G7A1MMInnficGQxygZvR60/6dzAfBgNVHSMEGDAWgBRe Eia+HeLfKNGNCM49/xZAfhhErjANBgkqhkiG9w0BAQsFAAOBgQBPVEYqDHld43i1 kJaenRyzAYfa9tWxyugLIS+5TwYKZxJkXbhLoh5mci10UE/OGBTud+UTDfbPlp4P RGugG6twkfivfvzgcRqglnyBF44/YIlwRTCDu3baKioBQLsm82kZZNp4rKW7Bcp9 m7eA5jgEF/I4qzj424gqvyqgNZ0wtA== -----END CERTIFICATE----- nextepc-0.3.10/support/freeDiameter/hss.conf.in000066400000000000000000000256251333553357400214470ustar00rootroot00000000000000# This is a sample configuration file for freeDiameter daemon. # Most of the options can be omitted, as they default to reasonable values. # Only TLS-related options must be configured properly in usual setups. # It is possible to use "include" keyword to import additional files # e.g.: include "/etc/freeDiameter.d/*.conf" # This is exactly equivalent as copy & paste the content of the included file(s) # where the "include" keyword is found. ############################################################## ## Peer identity and realm # The Diameter Identity of this daemon. # This must be a valid FQDN that resolves to the local host. # Default: hostname's FQDN #Identity = "aaa.koganei.freediameter.net"; Identity = "hss.localdomain"; # The Diameter Realm of this daemon. # Default: the domain part of Identity (after the first dot). #Realm = "koganei.freediameter.net"; Realm = "localdomain"; ############################################################## ## Transport protocol configuration # The port this peer is listening on for incoming connections (TCP and SCTP). # Default: 3868. Use 0 to disable. #Port = 3868; # The port this peer is listening on for incoming TLS-protected connections (TCP and SCTP). # See TLS_old_method for more information about TLS flavours. # Note: we use TLS/SCTP instead of DTLS/SCTP at the moment. This will change in future version of freeDiameter. # Default: 5868. Use 0 to disable. #SecPort = 5868; # Use RFC3588 method for TLS protection, where TLS is negociated after CER/CEA exchange is completed # on the unsecure connection. The alternative is RFC6733 mechanism, where TLS protects also the # CER/CEA exchange on a dedicated secure port. # This parameter only affects outgoing connections. # The setting can be also defined per-peer (see Peers configuration section). # Default: use RFC6733 method with separate port for TLS. #TLS_old_method; # Disable use of TCP protocol (only listen and connect over SCTP) # Default : TCP enabled #No_TCP; # Disable use of SCTP protocol (only listen and connect over TCP) # Default : SCTP enabled #No_SCTP; No_SCTP; # This option is ignored if freeDiameter is compiled with DISABLE_SCTP option. # Prefer TCP instead of SCTP for establishing new connections. # This setting may be overwritten per peer in peer configuration blocs. # Default : SCTP is attempted first. #Prefer_TCP; # Default number of streams per SCTP associations. # This setting may be overwritten per peer basis. # Default : 30 streams #SCTP_streams = 30; ############################################################## ## Endpoint configuration # Disable use of IP addresses (only IPv6) # Default : IP enabled #No_IP; # Disable use of IPv6 addresses (only IP) # Default : IPv6 enabled #No_IPv6; # Specify local addresses the server must bind to # Default : listen on all addresses available. #ListenOn = "202.249.37.5"; #ListenOn = "2001:200:903:2::202:1"; #ListenOn = "fe80::21c:5ff:fe98:7d62%eth0"; ListenOn = "127.0.0.4"; ############################################################## ## Server configuration # How many Diameter peers are allowed to be connecting at the same time ? # This parameter limits the number of incoming connections from the time # the connection is accepted until the first CER is received. # Default: 5 unidentified clients in paralel. #ThreadsPerServer = 5; ############################################################## ## TLS Configuration # TLS is managed by the GNUTLS library in the freeDiameter daemon. # You may find more information about parameters and special behaviors # in the relevant documentation. # http://www.gnu.org/software/gnutls/manual/ # Credentials of the local peer # The X509 certificate and private key file to use for the local peer. # The files must contain PKCS-1 encoded RSA key, in PEM format. # (These parameters are passed to gnutls_certificate_set_x509_key_file function) # Default : NO DEFAULT #TLS_Cred = "" , ""; #TLS_Cred = "/etc/ssl/certs/freeDiameter.pem", "/etc/ssl/private/freeDiameter.key"; TLS_Cred = "@SYSCONF_DIR@/nextepc/freeDiameter/hss.cert.pem", "@SYSCONF_DIR@/nextepc/freeDiameter/hss.key.pem"; # Certificate authority / trust anchors # The file containing the list of trusted Certificate Authorities (PEM list) # (This parameter is passed to gnutls_certificate_set_x509_trust_file function) # The directive can appear several times to specify several files. # Default : GNUTLS default behavior #TLS_CA = ""; TLS_CA = "@SYSCONF_DIR@/nextepc/freeDiameter/cacert.pem"; # Certificate Revocation List file # The information about revoked certificates. # The file contains a list of trusted CRLs in PEM format. They should have been verified before. # (This parameter is passed to gnutls_certificate_set_x509_crl_file function) # Note: openssl CRL format might have interoperability issue with GNUTLS format. # Default : GNUTLS default behavior #TLS_CRL = ""; # GNU TLS Priority string # This string allows to configure the behavior of GNUTLS key exchanges # algorithms. See gnutls_priority_init function documentation for information. # You should also refer to the Diameter required TLS support here: # http://tools.ietf.org/html/rfc6733#section-13.1 # Default : "NORMAL" # Example: TLS_Prio = "NONE:+VERS-TLS1.1:+AES-128-CBC:+RSA:+SHA1:+COMP-NULL"; #TLS_Prio = "NORMAL"; # Diffie-Hellman parameters size # Set the number of bits for generated DH parameters # Valid value should be 768, 1024, 2048, 3072 or 4096. # (This parameter is passed to gnutls_dh_params_generate2 function, # it usually should match RSA key size) # Default : 1024 #TLS_DH_Bits = 1024; # Alternatively, you can specify a file to load the PKCS#3 encoded # DH parameters directly from. This accelerates the daemon start # but is slightly less secure. If this file is provided, the # TLS_DH_Bits parameters has no effect. # Default : no default. #TLS_DH_File = ""; ############################################################## ## Timers configuration # The Tc timer of this peer. # It is the delay before a new attempt is made to reconnect a disconnected peer. # The value is expressed in seconds. The recommended value is 30 seconds. # Default: 30 #TcTimer = 30; # The Tw timer of this peer. # It is the delay before a watchdog message is sent, as described in RFC 3539. # The value is expressed in seconds. The default value is 30 seconds. Value must # be greater or equal to 6 seconds. See details in the RFC. # Default: 30 #TwTimer = 30; ############################################################## ## Applications configuration # Disable the relaying of Diameter messages? # For messages not handled locally, the default behavior is to forward the # message to another peer if any is available, according to the routing # algorithms. In addition the "0xffffff" application is advertised in CER/CEA # exchanges. # Default: Relaying is enabled. #NoRelay; # Number of server threads that can handle incoming messages at the same time. # Default: 4 #AppServThreads = 4; # Other applications are configured by loaded extensions. ############################################################## ## Extensions configuration # The freeDiameter framework merely provides support for # Diameter Base Protocol. The specific application behaviors, # as well as advanced functions, are provided # by loadable extensions (plug-ins). # These extensions may in addition receive the name of a # configuration file, the format of which is extension-specific. # # Format: #LoadExtension = "/path/to/extension" [ : "/optional/configuration/file" ] ; # # Examples: #LoadExtension = "extensions/sample.fdx"; #LoadExtension = "extensions/sample.fdx":"conf/sample.conf"; # Extensions are named as follow: # dict_* for extensions that add content to the dictionary definitions. # dbg_* for extensions useful only to retrieve more information on the framework execution. # acl_* : Access control list, to control which peers are allowed to connect. # rt_* : routing extensions that impact how messages are forwarded to other peers. # app_* : applications, these extensions usually register callbacks to handle specific messages. # test_* : dummy extensions that are useful only in testing environments. # The dbg_msg_dump.fdx extension allows you to tweak the way freeDiameter displays some # information about some events. This extension does not actually use a configuration file # but receives directly a parameter in the string passed to the extension. Here are some examples: ## LoadExtension = "dbg_msg_dumps.fdx" : "0x1111"; # Removes all default hooks, very quiet even in case of errors. ## LoadExtension = "dbg_msg_dumps.fdx" : "0x2222"; # Display all events with few details. ## LoadExtension = "dbg_msg_dumps.fdx" : "0x0080"; # Dump complete information about sent and received messages. # The four digits respectively control: connections, routing decisions, sent/received messages, errors. # The values for each digit are: # 0 - default - keep the default behavior # 1 - quiet - remove any specific log # 2 - compact - display only a summary of the information # 4 - full - display the complete information on a single long line # 8 - tree - display the complete information in an easier to read format spanning several lines. LoadExtension = "dbg_msg_dumps.so" : "0x8888"; LoadExtension = "dict_rfc5777.so"; LoadExtension = "dict_mip6i.so"; LoadExtension = "dict_nasreq.so"; LoadExtension = "dict_nas_mipv6.so"; LoadExtension = "dict_dcca.so"; LoadExtension = "dict_dcca_3gpp.so"; LoadExtension = "dict_s6a.so"; ############################################################## ## Peers configuration # The local server listens for incoming connections. By default, # all unknown connecting peers are rejected. Extensions can override this behavior (e.g., acl_wl). # # In addition to incoming connections, the local peer can # be configured to establish and maintain connections to some # Diameter nodes and allow connections from these nodes. # This is achieved with the ConnectPeer directive described below. # # Note that the configured Diameter Identity MUST match # the information received inside CEA, or the connection will be aborted. # # Format: #ConnectPeer = "diameterid" [ { parameter1; parameter2; ...} ] ; # Parameters that can be specified in the peer's parameter list: # No_TCP; No_SCTP; No_IP; No_IPv6; Prefer_TCP; TLS_old_method; # No_TLS; # assume transparent security instead of TLS. DTLS is not supported yet (will change in future versions). # Port = 5868; # The port to connect to # TcTimer = 30; # TwTimer = 30; # ConnectTo = "202.249.37.5"; # ConnectTo = "2001:200:903:2::202:1"; # TLS_Prio = "NORMAL"; # Realm = "realm.net"; # Reject the peer if it does not advertise this realm. # Examples: #ConnectPeer = "aaa.wide.ad.jp"; #ConnectPeer = "old.diameter.serv" { TcTimer = 60; TLS_old_method; No_SCTP; Port=3868; } ; ConnectPeer = "mme.localdomain" { ConnectTo = "127.0.0.2"; No_TLS; }; ############################################################## nextepc-0.3.10/support/freeDiameter/hss.key.pem000066400000000000000000000015671333553357400214640ustar00rootroot00000000000000-----BEGIN RSA PRIVATE KEY----- MIICWwIBAAKBgQDkxU46kkYwamuxyeiaQDVXbDtPiD6/aapxJKlUli9vynei2TrL 1XHMiUbBlFGoqIhbWIvyt8dmyV6TuZJ/w72auZNsucNqzRkXuTa3EdsbobCOdkZT qA/lifctwW2OEjXJfxZvgyLr4bOM1aR1PWNw1W9Aw6uGnENTbvKpYKgRLQIDAQAB AoGAGQrYI2U7tbUQkOevRKNes3EvlOcvJzjj5XrD5nSCQNSDABqTaxi0WlV0n2Aj CDlao9UvjKQ9eaz1Y2pe9QlySbanPwlg9Btd3aGs3/eAi3YHZ7Mo/fGAh5ZNNz3g avH1CJffRwfojwm8mplAlS1NN4pV+c3pVdgFjy3oVZxcXIECQQDyaW4nJqAvcrZh CSTK+yhk/TvGyBw6DU3ZwMBRI1V9lEa7U2xudOUAGcftLlS77DmH1ATPtNxeLgGO OVg/Oq8dAkEA8Zggqioev40UfyCYVGqoIvoPJoL1d6DHQv1ZRg0+Ikx9qkmnHYtO z3xabk6lCrGjFgb/Ag3MGCLojnP2rnP9UQJAe6FpnG4GpCxM95BCQ4N0Ro0gP3Ev dCv02GmFq9vpbfKBYGhblLnpUPPVExHeBTmk3bE0AvqqqR2tjWuRpi23wQJAS1TH IqgdjFbeREGSngffw4A7RyPgjFuqpj2/H3Ozoxg8uuNaY4DzowjAXdLR7YK0OoMV 8rsAn6oK35hTG9R48QJAdTYLTnmfxyu5OwHM7TyUdND02xSfnAOz1doc9pibfn0G BvFY/YBF/q/0JJ7a1WZCFqPLDZiFyIF0HWOJSfjbTQ== -----END RSA PRIVATE KEY----- nextepc-0.3.10/support/freeDiameter/make_certs.sh000077500000000000000000000032101333553357400220340ustar00rootroot00000000000000#!/bin/sh if [ 1 -ne $# ] then echo You must specify output directory : ./make_certs.sh ./freeDiameter exit; fi rm -rf demoCA mkdir demoCA echo 01 > demoCA/serial touch demoCA/index.txt # CA self certificate openssl req -new -batch -x509 -days 3650 -nodes -newkey rsa:1024 -out $1/cacert.pem -keyout cakey.pem -subj /CN=ca.localdomain/C=KO/ST=Seoul/L=Nowon/O=NextEPC/OU=Tests #mme openssl genrsa -out $1/mme.key.pem 1024 openssl req -new -batch -out mme.csr.pem -key $1/mme.key.pem -subj /CN=mme.localdomain/C=KO/ST=Seoul/L=Nowon/O=NextEPC/OU=Tests openssl ca -cert $1/cacert.pem -days 3650 -keyfile cakey.pem -in mme.csr.pem -out $1/mme.cert.pem -outdir . -batch #hss openssl genrsa -out $1/hss.key.pem 1024 openssl req -new -batch -out hss.csr.pem -key $1/hss.key.pem -subj /CN=hss.localdomain/C=KO/ST=Seoul/L=Nowon/O=NextEPC/OU=Tests openssl ca -cert $1/cacert.pem -days 3650 -keyfile cakey.pem -in hss.csr.pem -out $1/hss.cert.pem -outdir . -batch #pgw openssl genrsa -out $1/pgw.key.pem 1024 openssl req -new -batch -out pgw.csr.pem -key $1/pgw.key.pem -subj /CN=pgw.localdomain/C=KO/ST=Seoul/L=Nowon/O=NextEPC/OU=Tests openssl ca -cert $1/cacert.pem -days 3650 -keyfile cakey.pem -in pgw.csr.pem -out $1/pgw.cert.pem -outdir . -batch #pcrf openssl genrsa -out $1/pcrf.key.pem 1024 openssl req -new -batch -out pcrf.csr.pem -key $1/pcrf.key.pem -subj /CN=pcrf.localdomain/C=KO/ST=Seoul/L=Nowon/O=NextEPC/OU=Tests openssl ca -cert $1/cacert.pem -days 3650 -keyfile cakey.pem -in pcrf.csr.pem -out $1/pcrf.cert.pem -outdir . -batch rm -rf demoCA rm -f 01.pem 02.pem 03.pem 04.pem rm -f cakey.pem rm -f mme.csr.pem hss.csr.pem pgw.csr.pem pcrf.csr.pem nextepc-0.3.10/support/freeDiameter/mme.cert.pem000066400000000000000000000060141333553357400216020ustar00rootroot00000000000000Certificate: Data: Version: 3 (0x2) Serial Number: 1 (0x1) Signature Algorithm: sha256WithRSAEncryption Issuer: CN=ca.localdomain, C=KO, ST=Seoul, L=Nowon, O=NextEPC, OU=Tests Validity Not Before: Aug 17 00:58:21 2018 GMT Not After : Aug 14 00:58:21 2028 GMT Subject: C=KO, ST=Seoul, O=NextEPC, OU=Tests, CN=mme.localdomain Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (1024 bit) Modulus: 00:af:81:46:f0:74:9f:46:e0:e5:c1:35:2f:0b:4b: fb:4c:ba:b4:6d:be:01:d5:2b:4c:ad:e0:06:ab:00: c5:f4:be:db:fe:9d:7a:aa:32:81:98:06:47:b1:5b: 7b:cb:25:0a:54:f9:74:3f:10:57:05:1a:2f:d1:32: 8f:ad:21:dd:e1:f8:b4:fd:5d:67:d6:60:d2:d9:27: 2a:75:36:55:82:9f:ed:4c:6f:99:b5:43:14:9b:27: 83:2e:d6:05:ec:1e:8e:9e:b0:d1:84:83:49:20:fa: 5a:12:5d:6c:b7:79:6a:81:25:19:1b:db:36:cb:1b: 7d:3a:82:93:60:42:59:28:55 Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Basic Constraints: CA:FALSE Netscape Comment: OpenSSL Generated Certificate X509v3 Subject Key Identifier: F9:F2:22:94:BC:0C:02:A3:CE:53:07:AA:55:FC:B8:17:B9:EC:A2:D4 X509v3 Authority Key Identifier: keyid:5E:12:26:BE:1D:E2:DF:28:D1:8D:08:CE:3D:FF:16:40:7E:18:44:AE Signature Algorithm: sha256WithRSAEncryption a8:23:e3:25:7d:ca:05:6d:d9:43:43:8d:88:de:86:1a:26:a8: 24:6d:d2:3f:4e:b5:19:00:c4:0f:15:58:7c:e5:5d:b4:17:c8: 93:ba:45:c9:9d:5a:e8:95:c2:a1:f5:b9:d0:2d:7b:0e:51:80: 72:1f:bf:9b:ed:9a:40:4a:1e:0f:e1:45:4e:3f:6a:11:80:73: cf:70:d9:66:26:17:c6:c0:22:b2:de:da:70:21:48:37:5f:1a: 9a:f5:60:36:cd:58:5e:88:c3:dc:c7:92:a4:74:f8:6b:ad:ba: c7:b7:de:00:51:67:72:5c:ca:f3:aa:a8:9b:ff:15:71:3b:e6: 75:53 -----BEGIN CERTIFICATE----- MIICsjCCAhugAwIBAgIBATANBgkqhkiG9w0BAQsFADBoMRcwFQYDVQQDDA5jYS5s b2NhbGRvbWFpbjELMAkGA1UEBhMCS08xDjAMBgNVBAgMBVNlb3VsMQ4wDAYDVQQH DAVOb3dvbjEQMA4GA1UECgwHTmV4dEVQQzEOMAwGA1UECwwFVGVzdHMwHhcNMTgw ODE3MDA1ODIxWhcNMjgwODE0MDA1ODIxWjBZMQswCQYDVQQGEwJLTzEOMAwGA1UE CAwFU2VvdWwxEDAOBgNVBAoMB05leHRFUEMxDjAMBgNVBAsMBVRlc3RzMRgwFgYD VQQDDA9tbWUubG9jYWxkb21haW4wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB AK+BRvB0n0bg5cE1LwtL+0y6tG2+AdUrTK3gBqsAxfS+2/6deqoygZgGR7Fbe8sl ClT5dD8QVwUaL9Eyj60h3eH4tP1dZ9Zg0tknKnU2VYKf7UxvmbVDFJsngy7WBewe jp6w0YSDSSD6WhJdbLd5aoElGRvbNssbfTqCk2BCWShVAgMBAAGjezB5MAkGA1Ud EwQCMAAwLAYJYIZIAYb4QgENBB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmlj YXRlMB0GA1UdDgQWBBT58iKUvAwCo85TB6pV/LgXueyi1DAfBgNVHSMEGDAWgBRe Eia+HeLfKNGNCM49/xZAfhhErjANBgkqhkiG9w0BAQsFAAOBgQCoI+MlfcoFbdlD Q42I3oYaJqgkbdI/TrUZAMQPFVh85V20F8iTukXJnVrolcKh9bnQLXsOUYByH7+b 7ZpASh4P4UVOP2oRgHPPcNlmJhfGwCKy3tpwIUg3Xxqa9WA2zVheiMPcx5KkdPhr rbrHt94AUWdyXMrzqqib/xVxO+Z1Uw== -----END CERTIFICATE----- nextepc-0.3.10/support/freeDiameter/mme.conf.in000066400000000000000000000256261333553357400214310ustar00rootroot00000000000000# This is a sample configuration file for freeDiameter daemon. # Most of the options can be omitted, as they default to reasonable values. # Only TLS-related options must be configured properly in usual setups. # It is possible to use "include" keyword to import additional files # e.g.: include "/etc/freeDiameter.d/*.conf" # This is exactly equivalent as copy & paste the content of the included file(s) # where the "include" keyword is found. ############################################################## ## Peer identity and realm # The Diameter Identity of this daemon. # This must be a valid FQDN that resolves to the local host. # Default: hostname's FQDN #Identity = "aaa.koganei.freediameter.net"; Identity = "mme.localdomain"; # The Diameter Realm of this daemon. # Default: the domain part of Identity (after the first dot). #Realm = "koganei.freediameter.net"; Realm = "localdomain"; ############################################################## ## Transport protocol configuration # The port this peer is listening on for incoming connections (TCP and SCTP). # Default: 3868. Use 0 to disable. #Port = 3868; # The port this peer is listening on for incoming TLS-protected connections (TCP and SCTP). # See TLS_old_method for more information about TLS flavours. # Note: we use TLS/SCTP instead of DTLS/SCTP at the moment. This will change in future version of freeDiameter. # Default: 5868. Use 0 to disable. #SecPort = 5868; # Use RFC3588 method for TLS protection, where TLS is negociated after CER/CEA exchange is completed # on the unsecure connection. The alternative is RFC6733 mechanism, where TLS protects also the # CER/CEA exchange on a dedicated secure port. # This parameter only affects outgoing connections. # The setting can be also defined per-peer (see Peers configuration section). # Default: use RFC6733 method with separate port for TLS. #TLS_old_method; # Disable use of TCP protocol (only listen and connect over SCTP) # Default : TCP enabled #No_TCP; # Disable use of SCTP protocol (only listen and connect over TCP) # Default : SCTP enabled #No_SCTP; No_SCTP; # This option is ignored if freeDiameter is compiled with DISABLE_SCTP option. # Prefer TCP instead of SCTP for establishing new connections. # This setting may be overwritten per peer in peer configuration blocs. # Default : SCTP is attempted first. #Prefer_TCP; # Default number of streams per SCTP associations. # This setting may be overwritten per peer basis. # Default : 30 streams #SCTP_streams = 30; ############################################################## ## Endpoint configuration # Disable use of IP addresses (only IPv6) # Default : IP enabled #No_IP; # Disable use of IPv6 addresses (only IP) # Default : IPv6 enabled #No_IPv6; # Specify local addresses the server must bind to # Default : listen on all addresses available. #ListenOn = "202.249.37.5"; #ListenOn = "2001:200:903:2::202:1"; #ListenOn = "fe80::21c:5ff:fe98:7d62%eth0"; ListenOn = "127.0.0.2"; ############################################################## ## Server configuration # How many Diameter peers are allowed to be connecting at the same time ? # This parameter limits the number of incoming connections from the time # the connection is accepted until the first CER is received. # Default: 5 unidentified clients in paralel. #ThreadsPerServer = 5; ############################################################## ## TLS Configuration # TLS is managed by the GNUTLS library in the freeDiameter daemon. # You may find more information about parameters and special behaviors # in the relevant documentation. # http://www.gnu.org/software/gnutls/manual/ # Credentials of the local peer # The X509 certificate and private key file to use for the local peer. # The files must contain PKCS-1 encoded RSA key, in PEM format. # (These parameters are passed to gnutls_certificate_set_x509_key_file function) # Default : NO DEFAULT #TLS_Cred = "" , ""; #TLS_Cred = "/etc/ssl/certs/freeDiameter.pem", "/etc/ssl/private/freeDiameter.key"; TLS_Cred = "@SYSCONF_DIR@/nextepc/freeDiameter/mme.cert.pem", "@SYSCONF_DIR@/nextepc/freeDiameter/mme.key.pem"; # Certificate authority / trust anchors # The file containing the list of trusted Certificate Authorities (PEM list) # (This parameter is passed to gnutls_certificate_set_x509_trust_file function) # The directive can appear several times to specify several files. # Default : GNUTLS default behavior #TLS_CA = ""; TLS_CA = "@SYSCONF_DIR@/nextepc/freeDiameter/cacert.pem"; # Certificate Revocation List file # The information about revoked certificates. # The file contains a list of trusted CRLs in PEM format. They should have been verified before. # (This parameter is passed to gnutls_certificate_set_x509_crl_file function) # Note: openssl CRL format might have interoperability issue with GNUTLS format. # Default : GNUTLS default behavior #TLS_CRL = ""; # GNU TLS Priority string # This string allows to configure the behavior of GNUTLS key exchanges # algorithms. See gnutls_priority_init function documentation for information. # You should also refer to the Diameter required TLS support here: # http://tools.ietf.org/html/rfc6733#section-13.1 # Default : "NORMAL" # Example: TLS_Prio = "NONE:+VERS-TLS1.1:+AES-128-CBC:+RSA:+SHA1:+COMP-NULL"; #TLS_Prio = "NORMAL"; # Diffie-Hellman parameters size # Set the number of bits for generated DH parameters # Valid value should be 768, 1024, 2048, 3072 or 4096. # (This parameter is passed to gnutls_dh_params_generate2 function, # it usually should match RSA key size) # Default : 1024 #TLS_DH_Bits = 1024; # Alternatively, you can specify a file to load the PKCS#3 encoded # DH parameters directly from. This accelerates the daemon start # but is slightly less secure. If this file is provided, the # TLS_DH_Bits parameters has no effect. # Default : no default. #TLS_DH_File = ""; ############################################################## ## Timers configuration # The Tc timer of this peer. # It is the delay before a new attempt is made to reconnect a disconnected peer. # The value is expressed in seconds. The recommended value is 30 seconds. # Default: 30 #TcTimer = 30; # The Tw timer of this peer. # It is the delay before a watchdog message is sent, as described in RFC 3539. # The value is expressed in seconds. The default value is 30 seconds. Value must # be greater or equal to 6 seconds. See details in the RFC. # Default: 30 #TwTimer = 30; ############################################################## ## Applications configuration # Disable the relaying of Diameter messages? # For messages not handled locally, the default behavior is to forward the # message to another peer if any is available, according to the routing # algorithms. In addition the "0xffffff" application is advertised in CER/CEA # exchanges. # Default: Relaying is enabled. #NoRelay; # Number of server threads that can handle incoming messages at the same time. # Default: 4 #AppServThreads = 4; # Other applications are configured by loaded extensions. ############################################################## ## Extensions configuration # The freeDiameter framework merely provides support for # Diameter Base Protocol. The specific application behaviors, # as well as advanced functions, are provided # by loadable extensions (plug-ins). # These extensions may in addition receive the name of a # configuration file, the format of which is extension-specific. # # Format: #LoadExtension = "/path/to/extension" [ : "/optional/configuration/file" ] ; # # Examples: #LoadExtension = "extensions/sample.fdx"; #LoadExtension = "extensions/sample.fdx":"conf/sample.conf"; # Extensions are named as follow: # dict_* for extensions that add content to the dictionary definitions. # dbg_* for extensions useful only to retrieve more information on the framework execution. # acl_* : Access control list, to control which peers are allowed to connect. # rt_* : routing extensions that impact how messages are forwarded to other peers. # app_* : applications, these extensions usually register callbacks to handle specific messages. # test_* : dummy extensions that are useful only in testing environments. # The dbg_msg_dump.fdx extension allows you to tweak the way freeDiameter displays some # information about some events. This extension does not actually use a configuration file # but receives directly a parameter in the string passed to the extension. Here are some examples: ## LoadExtension = "dbg_msg_dumps.fdx" : "0x1111"; # Removes all default hooks, very quiet even in case of errors. ## LoadExtension = "dbg_msg_dumps.fdx" : "0x2222"; # Display all events with few details. ## LoadExtension = "dbg_msg_dumps.fdx" : "0x0080"; # Dump complete information about sent and received messages. # The four digits respectively control: connections, routing decisions, sent/received messages, errors. # The values for each digit are: # 0 - default - keep the default behavior # 1 - quiet - remove any specific log # 2 - compact - display only a summary of the information # 4 - full - display the complete information on a single long line # 8 - tree - display the complete information in an easier to read format spanning several lines. LoadExtension = "dbg_msg_dumps.so" : "0x8888"; LoadExtension = "dict_rfc5777.so"; LoadExtension = "dict_mip6i.so"; LoadExtension = "dict_nasreq.so"; LoadExtension = "dict_nas_mipv6.so"; LoadExtension = "dict_dcca.so"; LoadExtension = "dict_dcca_3gpp.so"; LoadExtension = "dict_s6a.so"; ############################################################## ## Peers configuration # The local server listens for incoming connections. By default, # all unknown connecting peers are rejected. Extensions can override this behavior (e.g., acl_wl). # # In addition to incoming connections, the local peer can # be configured to establish and maintain connections to some # Diameter nodes and allow connections from these nodes. # This is achieved with the ConnectPeer directive described below. # # Note that the configured Diameter Identity MUST match # the information received inside CEA, or the connection will be aborted. # # Format: #ConnectPeer = "diameterid" [ { parameter1; parameter2; ...} ] ; # Parameters that can be specified in the peer's parameter list: # No_TCP; No_SCTP; No_IP; No_IPv6; Prefer_TCP; TLS_old_method; # No_TLS; # assume transparent security instead of TLS. DTLS is not supported yet (will change in future versions). # Port = 5868; # The port to connect to # TcTimer = 30; # TwTimer = 30; # ConnectTo = "202.249.37.5"; # ConnectTo = "2001:200:903:2::202:1"; # TLS_Prio = "NORMAL"; # Realm = "realm.net"; # Reject the peer if it does not advertise this realm. # Examples: #ConnectPeer = "aaa.wide.ad.jp"; #ConnectPeer = "old.diameter.serv" { TcTimer = 60; TLS_old_method; No_SCTP; Port=3868; } ; ConnectPeer = "hss.localdomain" { ConnectTo = "127.0.0.4"; No_TLS; }; ############################################################## nextepc-0.3.10/support/freeDiameter/mme.key.pem000066400000000000000000000015671333553357400214450ustar00rootroot00000000000000-----BEGIN RSA PRIVATE KEY----- MIICXAIBAAKBgQCvgUbwdJ9G4OXBNS8LS/tMurRtvgHVK0yt4AarAMX0vtv+nXqq MoGYBkexW3vLJQpU+XQ/EFcFGi/RMo+tId3h+LT9XWfWYNLZJyp1NlWCn+1Mb5m1 QxSbJ4Mu1gXsHo6esNGEg0kg+loSXWy3eWqBJRkb2zbLG306gpNgQlkoVQIDAQAB AoGAb/s0oEhJOJhXAKhGlBavCY43ga4yzSkLjAXdO08K/9an2BXzJpWDStT2+Zs9 qajApudj3Lk4TPEggYKZWga5411xbmnuY0JDv9q89w5RMpNveOo7t3tvaU/yeNHq nNhArPQ2awZuc76pC1GmQpdSx9NUEWDkRN3IDHEjQvI6uQECQQDo+g4VdmlesAIC +RE8Q/uz/tmbZBw1TbqL9m2KpBtFQjBx4SFre65x8I3Tw0fjaPeAsXZbHH4pM4H9 6iGoa9GJAkEAwNlGyAk+3lciYOTtYnwYKE6QDrU4VJqGTIcRr9xczlfPbykCMBX3 3U7cxt9uU85QQNxgqHlHmG9evLEnWlIpbQJAAv5DdA8jZ24HeJZOnGGbOELL9O0i V6T6ApZV7fQRzZ/+E1h7H3BlW11l1RSrNcbBd0vQY3dIP6tDvkllyU4pUQJAL35T HDiKrx8ubEZ03+hH2sVeXQDsWomjwX0SMglHIdomT+39h/IhFPOzE5c7CJCq2w5r D5Kuuy/SWQ4X7vqFEQJBAMdvn/B2B3mFKpovYtv02wN00icGIpjEg7VGGiT4LVpM RpRw+tgDq+zdOmZiLdoZhvuoo90age6QZ8xc7VXYEFM= -----END RSA PRIVATE KEY----- nextepc-0.3.10/support/freeDiameter/pcrf.cert.pem000066400000000000000000000060151333553357400217570ustar00rootroot00000000000000Certificate: Data: Version: 3 (0x2) Serial Number: 4 (0x4) Signature Algorithm: sha256WithRSAEncryption Issuer: CN=ca.localdomain, C=KO, ST=Seoul, L=Nowon, O=NextEPC, OU=Tests Validity Not Before: Aug 17 00:58:21 2018 GMT Not After : Aug 14 00:58:21 2028 GMT Subject: C=KO, ST=Seoul, O=NextEPC, OU=Tests, CN=pcrf.localdomain Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (1024 bit) Modulus: 00:bf:fc:c9:c1:5d:17:84:70:15:bb:f5:ee:be:61: aa:fe:65:ae:0d:93:1f:5c:42:75:71:3b:4b:06:5a: 18:d7:46:05:be:a0:0e:c9:b8:1c:22:d0:49:71:c2: 55:21:7a:d1:15:91:d7:45:19:4a:44:de:fd:28:47: ec:e3:ea:36:7e:bc:bb:c3:50:6b:ae:9e:00:5e:5d: 7c:bf:65:ca:8a:1d:a7:6c:40:4e:7c:e6:74:88:8f: 2a:f5:2e:f3:77:55:7a:72:ce:e6:5a:ef:db:1b:ef: 47:8f:86:f5:4d:9d:ce:66:52:83:5d:73:d7:71:a7: ab:74:a5:c3:88:15:2c:e3:4d Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Basic Constraints: CA:FALSE Netscape Comment: OpenSSL Generated Certificate X509v3 Subject Key Identifier: 1C:27:03:08:96:FD:B9:5F:EE:90:A7:B4:CD:E8:EB:A1:AB:B6:21:1D X509v3 Authority Key Identifier: keyid:5E:12:26:BE:1D:E2:DF:28:D1:8D:08:CE:3D:FF:16:40:7E:18:44:AE Signature Algorithm: sha256WithRSAEncryption 10:b7:d1:be:d7:2f:ac:a8:58:95:3a:83:a9:9e:8e:46:7d:7e: 12:34:1b:3d:5e:39:e7:fb:b8:66:3e:3d:ce:fb:10:bf:2a:ec: f6:e6:76:28:47:56:0d:fb:98:df:d9:e1:dd:bb:30:05:60:06: 3e:38:63:af:06:67:9a:4d:7d:29:20:d9:2b:88:50:c9:a0:52: b2:27:0c:2f:b7:be:a3:dc:51:93:a9:c5:43:99:a3:70:5e:11: a6:92:ec:e2:92:1a:17:fd:f5:c8:ed:2f:fa:cf:1d:3a:ad:ee: 5c:9a:54:1f:82:64:23:ee:52:af:8d:1c:7e:e6:1a:ec:72:c6: af:f0 -----BEGIN CERTIFICATE----- MIICszCCAhygAwIBAgIBBDANBgkqhkiG9w0BAQsFADBoMRcwFQYDVQQDDA5jYS5s b2NhbGRvbWFpbjELMAkGA1UEBhMCS08xDjAMBgNVBAgMBVNlb3VsMQ4wDAYDVQQH DAVOb3dvbjEQMA4GA1UECgwHTmV4dEVQQzEOMAwGA1UECwwFVGVzdHMwHhcNMTgw ODE3MDA1ODIxWhcNMjgwODE0MDA1ODIxWjBaMQswCQYDVQQGEwJLTzEOMAwGA1UE CAwFU2VvdWwxEDAOBgNVBAoMB05leHRFUEMxDjAMBgNVBAsMBVRlc3RzMRkwFwYD VQQDDBBwY3JmLmxvY2FsZG9tYWluMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB gQC//MnBXReEcBW79e6+Yar+Za4Nkx9cQnVxO0sGWhjXRgW+oA7JuBwi0ElxwlUh etEVkddFGUpE3v0oR+zj6jZ+vLvDUGuungBeXXy/ZcqKHadsQE585nSIjyr1LvN3 VXpyzuZa79sb70ePhvVNnc5mUoNdc9dxp6t0pcOIFSzjTQIDAQABo3sweTAJBgNV HRMEAjAAMCwGCWCGSAGG+EIBDQQfFh1PcGVuU1NMIEdlbmVyYXRlZCBDZXJ0aWZp Y2F0ZTAdBgNVHQ4EFgQUHCcDCJb9uV/ukKe0zejroau2IR0wHwYDVR0jBBgwFoAU XhImvh3i3yjRjQjOPf8WQH4YRK4wDQYJKoZIhvcNAQELBQADgYEAELfRvtcvrKhY lTqDqZ6ORn1+EjQbPV455/u4Zj49zvsQvyrs9uZ2KEdWDfuY39nh3bswBWAGPjhj rwZnmk19KSDZK4hQyaBSsicML7e+o9xRk6nFQ5mjcF4RppLs4pIaF/31yO0v+s8d Oq3uXJpUH4JkI+5Sr40cfuYa7HLGr/A= -----END CERTIFICATE----- nextepc-0.3.10/support/freeDiameter/pcrf.conf.in000066400000000000000000000255711333553357400216040ustar00rootroot00000000000000# This is a sample configuration file for freeDiameter daemon. # Most of the options can be omitted, as they default to reasonable values. # Only TLS-related options must be configured properly in usual setups. # It is possible to use "include" keyword to import additional files # e.g.: include "/etc/freeDiameter.d/*.conf" # This is exactly equivalent as copy & paste the content of the included file(s) # where the "include" keyword is found. ############################################################## ## Peer identity and realm # The Diameter Identity of this daemon. # This must be a valid FQDN that resolves to the local host. # Default: hostname's FQDN #Identity = "aaa.koganei.freediameter.net"; Identity = "pcrf.localdomain"; # The Diameter Realm of this daemon. # Default: the domain part of Identity (after the first dot). #Realm = "koganei.freediameter.net"; Realm = "localdomain"; ############################################################## ## Transport protocol configuration # The port this peer is listening on for incoming connections (TCP and SCTP). # Default: 3868. Use 0 to disable. #Port = 3868; # The port this peer is listening on for incoming TLS-protected connections (TCP and SCTP). # See TLS_old_method for more information about TLS flavours. # Note: we use TLS/SCTP instead of DTLS/SCTP at the moment. This will change in future version of freeDiameter. # Default: 5868. Use 0 to disable. #SecPort = 5868; # Use RFC3588 method for TLS protection, where TLS is negociated after CER/CEA exchange is completed # on the unsecure connection. The alternative is RFC6733 mechanism, where TLS protects also the # CER/CEA exchange on a dedicated secure port. # This parameter only affects outgoing connections. # The setting can be also defined per-peer (see Peers configuration section). # Default: use RFC6733 method with separate port for TLS. #TLS_old_method; # Disable use of TCP protocol (only listen and connect over SCTP) # Default : TCP enabled #No_TCP; # Disable use of SCTP protocol (only listen and connect over TCP) # Default : SCTP enabled #No_SCTP; No_SCTP; # This option is ignored if freeDiameter is compiled with DISABLE_SCTP option. # Prefer TCP instead of SCTP for establishing new connections. # This setting may be overwritten per peer in peer configuration blocs. # Default : SCTP is attempted first. #Prefer_TCP; # Default number of streams per SCTP associations. # This setting may be overwritten per peer basis. # Default : 30 streams #SCTP_streams = 30; ############################################################## ## Endpoint configuration # Disable use of IP addresses (only IPv6) # Default : IP enabled #No_IP; # Disable use of IPv6 addresses (only IP) # Default : IPv6 enabled #No_IPv6; # Specify local addresses the server must bind to # Default : listen on all addresses available. #ListenOn = "202.249.37.5"; #ListenOn = "2001:200:903:2::202:1"; #ListenOn = "fe80::21c:5ff:fe98:7d62%eth0"; ListenOn = "127.0.0.5"; ############################################################## ## Server configuration # How many Diameter peers are allowed to be connecting at the same time ? # This parameter limits the number of incoming connections from the time # the connection is accepted until the first CER is received. # Default: 5 unidentified clients in paralel. #ThreadsPerServer = 5; ############################################################## ## TLS Configuration # TLS is managed by the GNUTLS library in the freeDiameter daemon. # You may find more information about parameters and special behaviors # in the relevant documentation. # http://www.gnu.org/software/gnutls/manual/ # Credentials of the local peer # The X509 certificate and private key file to use for the local peer. # The files must contain PKCS-1 encoded RSA key, in PEM format. # (These parameters are passed to gnutls_certificate_set_x509_key_file function) # Default : NO DEFAULT #TLS_Cred = "" , ""; #TLS_Cred = "/etc/ssl/certs/freeDiameter.pem", "/etc/ssl/private/freeDiameter.key"; TLS_Cred = "@SYSCONF_DIR@/nextepc/freeDiameter/pcrf.cert.pem", "@SYSCONF_DIR@/nextepc/freeDiameter/pcrf.key.pem"; # Certificate authority / trust anchors # The file containing the list of trusted Certificate Authorities (PEM list) # (This parameter is passed to gnutls_certificate_set_x509_trust_file function) # The directive can appear several times to specify several files. # Default : GNUTLS default behavior #TLS_CA = ""; TLS_CA = "@SYSCONF_DIR@/nextepc/freeDiameter/cacert.pem"; # Certificate Revocation List file # The information about revoked certificates. # The file contains a list of trusted CRLs in PEM format. They should have been verified before. # (This parameter is passed to gnutls_certificate_set_x509_crl_file function) # Note: openssl CRL format might have interoperability issue with GNUTLS format. # Default : GNUTLS default behavior #TLS_CRL = ""; # GNU TLS Priority string # This string allows to configure the behavior of GNUTLS key exchanges # algorithms. See gnutls_priority_init function documentation for information. # You should also refer to the Diameter required TLS support here: # http://tools.ietf.org/html/rfc6733#section-13.1 # Default : "NORMAL" # Example: TLS_Prio = "NONE:+VERS-TLS1.1:+AES-128-CBC:+RSA:+SHA1:+COMP-NULL"; #TLS_Prio = "NORMAL"; # Diffie-Hellman parameters size # Set the number of bits for generated DH parameters # Valid value should be 768, 1024, 2048, 3072 or 4096. # (This parameter is passed to gnutls_dh_params_generate2 function, # it usually should match RSA key size) # Default : 1024 #TLS_DH_Bits = 1024; # Alternatively, you can specify a file to load the PKCS#3 encoded # DH parameters directly from. This accelerates the daemon start # but is slightly less secure. If this file is provided, the # TLS_DH_Bits parameters has no effect. # Default : no default. #TLS_DH_File = ""; ############################################################## ## Timers configuration # The Tc timer of this peer. # It is the delay before a new attempt is made to reconnect a disconnected peer. # The value is expressed in seconds. The recommended value is 30 seconds. # Default: 30 #TcTimer = 30; # The Tw timer of this peer. # It is the delay before a watchdog message is sent, as described in RFC 3539. # The value is expressed in seconds. The default value is 30 seconds. Value must # be greater or equal to 6 seconds. See details in the RFC. # Default: 30 #TwTimer = 30; ############################################################## ## Applications configuration # Disable the relaying of Diameter messages? # For messages not handled locally, the default behavior is to forward the # message to another peer if any is available, according to the routing # algorithms. In addition the "0xffffff" application is advertised in CER/CEA # exchanges. # Default: Relaying is enabled. #NoRelay; # Number of server threads that can handle incoming messages at the same time. # Default: 4 #AppServThreads = 4; # Other applications are configured by loaded extensions. ############################################################## ## Extensions configuration # The freeDiameter framework merely provides support for # Diameter Base Protocol. The specific application behaviors, # as well as advanced functions, are provided # by loadable extensions (plug-ins). # These extensions may in addition receive the name of a # configuration file, the format of which is extension-specific. # # Format: #LoadExtension = "/path/to/extension" [ : "/optional/configuration/file" ] ; # # Examples: #LoadExtension = "extensions/sample.fdx"; #LoadExtension = "extensions/sample.fdx":"conf/sample.conf"; # Extensions are named as follow: # dict_* for extensions that add content to the dictionary definitions. # dbg_* for extensions useful only to retrieve more information on the framework execution. # acl_* : Access control list, to control which peers are allowed to connect. # rt_* : routing extensions that impact how messages are forwarded to other peers. # app_* : applications, these extensions usually register callbacks to handle specific messages. # test_* : dummy extensions that are useful only in testing environments. # The dbg_msg_dump.fdx extension allows you to tweak the way freeDiameter displays some # information about some events. This extension does not actually use a configuration file # but receives directly a parameter in the string passed to the extension. Here are some examples: ## LoadExtension = "dbg_msg_dumps.fdx" : "0x1111"; # Removes all default hooks, very quiet even in case of errors. ## LoadExtension = "dbg_msg_dumps.fdx" : "0x2222"; # Display all events with few details. ## LoadExtension = "dbg_msg_dumps.fdx" : "0x0080"; # Dump complete information about sent and received messages. # The four digits respectively control: connections, routing decisions, sent/received messages, errors. # The values for each digit are: # 0 - default - keep the default behavior # 1 - quiet - remove any specific log # 2 - compact - display only a summary of the information # 4 - full - display the complete information on a single long line # 8 - tree - display the complete information in an easier to read format spanning several lines. LoadExtension = "dbg_msg_dumps.so" : "0x8888"; LoadExtension = "dict_rfc5777.so"; LoadExtension = "dict_mip6i.so"; LoadExtension = "dict_nasreq.so"; LoadExtension = "dict_nas_mipv6.so"; LoadExtension = "dict_dcca.so"; LoadExtension = "dict_dcca_3gpp.so"; ############################################################## ## Peers configuration # The local server listens for incoming connections. By default, # all unknown connecting peers are rejected. Extensions can override this behavior (e.g., acl_wl). # # In addition to incoming connections, the local peer can # be configured to establish and maintain connections to some # Diameter nodes and allow connections from these nodes. # This is achieved with the ConnectPeer directive described below. # # Note that the configured Diameter Identity MUST match # the information received inside CEA, or the connection will be aborted. # # Format: #ConnectPeer = "diameterid" [ { parameter1; parameter2; ...} ] ; # Parameters that can be specified in the peer's parameter list: # No_TCP; No_SCTP; No_IP; No_IPv6; Prefer_TCP; TLS_old_method; # No_TLS; # assume transparent security instead of TLS. DTLS is not supported yet (will change in future versions). # Port = 5868; # The port to connect to # TcTimer = 30; # TwTimer = 30; # ConnectTo = "202.249.37.5"; # ConnectTo = "2001:200:903:2::202:1"; # TLS_Prio = "NORMAL"; # Realm = "realm.net"; # Reject the peer if it does not advertise this realm. # Examples: #ConnectPeer = "aaa.wide.ad.jp"; #ConnectPeer = "old.diameter.serv" { TcTimer = 60; TLS_old_method; No_SCTP; Port=3868; } ; ConnectPeer = "pgw.localdomain" { ConnectTo = "127.0.0.3"; No_TLS; }; ############################################################## nextepc-0.3.10/support/freeDiameter/pcrf.key.pem000066400000000000000000000015671333553357400216210ustar00rootroot00000000000000-----BEGIN RSA PRIVATE KEY----- MIICXQIBAAKBgQC//MnBXReEcBW79e6+Yar+Za4Nkx9cQnVxO0sGWhjXRgW+oA7J uBwi0ElxwlUhetEVkddFGUpE3v0oR+zj6jZ+vLvDUGuungBeXXy/ZcqKHadsQE58 5nSIjyr1LvN3VXpyzuZa79sb70ePhvVNnc5mUoNdc9dxp6t0pcOIFSzjTQIDAQAB AoGAEWRkHplBVSUWQvXPj/2nEO7DKsWmNKRsoTpe3I9y6qWURaWYUVvVaK33yU9y iNrocAzLNJ5K5RxSUMDbS/Zew0ng0tpr1uG2sH0rFiF4jw2IchQymqQ6UahjV8Mj DQhvRhxxcHO0Iz0ZhvftLJX9mEKfxH1Mx6agKPrS6XTsRWECQQD/jaEfSJ/ht6rR Die8QZnjCkikfiMFWf+mCobgXrsDqWnqBo0Xi9ofKQHsrHRicaUoObGUUZ2egTWb V1TRDNs5AkEAwFK13YqpFEQfOVDp0uZbCCSB+CVuwaDQSTJcsYxR7EzZpblChRtY Al0Sx2yooRLANQX4D+8rzzh+IAe4S/EEtQJAI375pU3CH2kSie0sacK27ElOY8K9 fI3Oq7KEn3+o/E44zu/QAzhCuNdKVCR0GgRtC1RQLSjU+uI5nvUXa94cSQJBAIv3 pgQl9geZzF+aU5H5tCao6y39kC27K9sZm/xbcwPWqk/CFHdq/xI5SoF4wwD29Iui XHa8SdX191S4SZh7QEECQQD2QGc+/e9tcmgTqBJxEW6pXg12ll9SEQnG1bCcTarZ k0YLvAkw/Ve2Q7V4S3nzQWhoQVtEYXrTdsMojV/H0xYi -----END RSA PRIVATE KEY----- nextepc-0.3.10/support/freeDiameter/pgw.cert.pem000066400000000000000000000060141333553357400216210ustar00rootroot00000000000000Certificate: Data: Version: 3 (0x2) Serial Number: 3 (0x3) Signature Algorithm: sha256WithRSAEncryption Issuer: CN=ca.localdomain, C=KO, ST=Seoul, L=Nowon, O=NextEPC, OU=Tests Validity Not Before: Aug 17 00:58:21 2018 GMT Not After : Aug 14 00:58:21 2028 GMT Subject: C=KO, ST=Seoul, O=NextEPC, OU=Tests, CN=pgw.localdomain Subject Public Key Info: Public Key Algorithm: rsaEncryption Public-Key: (1024 bit) Modulus: 00:ae:db:dc:af:a4:f7:f1:da:e0:34:3c:ff:9e:60: 12:b5:05:ce:5c:b3:5f:80:12:99:48:41:94:cd:87: 64:f0:17:e0:2f:83:ab:cb:dc:83:59:f2:fa:1f:e3: d2:72:9b:b8:65:63:38:80:50:69:0e:6e:66:02:b5: 19:7a:81:62:0a:63:34:4b:3a:11:46:06:42:9e:89: f0:a5:a4:3e:74:00:c3:62:32:32:b4:d8:41:b0:15: e4:eb:c7:1f:b3:ea:7b:5e:03:c8:44:4a:a1:35:9f: b1:3c:a5:e0:83:d8:ff:6c:6f:45:5b:eb:9e:4b:cb: a0:42:88:8d:81:ea:c7:4a:cd Exponent: 65537 (0x10001) X509v3 extensions: X509v3 Basic Constraints: CA:FALSE Netscape Comment: OpenSSL Generated Certificate X509v3 Subject Key Identifier: F3:FE:FA:87:88:75:6B:4E:94:73:D8:2A:A4:EC:79:13:91:D4:62:F8 X509v3 Authority Key Identifier: keyid:5E:12:26:BE:1D:E2:DF:28:D1:8D:08:CE:3D:FF:16:40:7E:18:44:AE Signature Algorithm: sha256WithRSAEncryption ad:13:60:47:a5:23:13:d9:5e:14:24:cb:ec:4f:4b:e2:41:55: b5:79:a6:b5:de:05:24:87:05:51:ed:c6:7c:9a:65:b8:7a:bd: fd:ee:92:98:38:97:29:6f:e2:f3:a7:48:7a:77:d9:7d:22:d1: 6d:0e:61:49:e7:e1:72:d9:9a:b2:d8:ef:9b:3a:b2:71:37:43: 6d:0d:de:84:48:c4:e6:6c:cb:7c:05:8c:af:26:cf:aa:2b:e1: d7:f2:65:f8:0d:45:33:ec:b7:9a:2a:bf:16:f1:4f:76:c7:2a: 1d:14:f4:9a:30:14:8d:72:30:e7:f4:9c:1e:09:34:5b:79:26: 4a:d9 -----BEGIN CERTIFICATE----- MIICsjCCAhugAwIBAgIBAzANBgkqhkiG9w0BAQsFADBoMRcwFQYDVQQDDA5jYS5s b2NhbGRvbWFpbjELMAkGA1UEBhMCS08xDjAMBgNVBAgMBVNlb3VsMQ4wDAYDVQQH DAVOb3dvbjEQMA4GA1UECgwHTmV4dEVQQzEOMAwGA1UECwwFVGVzdHMwHhcNMTgw ODE3MDA1ODIxWhcNMjgwODE0MDA1ODIxWjBZMQswCQYDVQQGEwJLTzEOMAwGA1UE CAwFU2VvdWwxEDAOBgNVBAoMB05leHRFUEMxDjAMBgNVBAsMBVRlc3RzMRgwFgYD VQQDDA9wZ3cubG9jYWxkb21haW4wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGB AK7b3K+k9/Ha4DQ8/55gErUFzlyzX4ASmUhBlM2HZPAX4C+Dq8vcg1ny+h/j0nKb uGVjOIBQaQ5uZgK1GXqBYgpjNEs6EUYGQp6J8KWkPnQAw2IyMrTYQbAV5OvHH7Pq e14DyERKoTWfsTyl4IPY/2xvRVvrnkvLoEKIjYHqx0rNAgMBAAGjezB5MAkGA1Ud EwQCMAAwLAYJYIZIAYb4QgENBB8WHU9wZW5TU0wgR2VuZXJhdGVkIENlcnRpZmlj YXRlMB0GA1UdDgQWBBTz/vqHiHVrTpRz2Cqk7HkTkdRi+DAfBgNVHSMEGDAWgBRe Eia+HeLfKNGNCM49/xZAfhhErjANBgkqhkiG9w0BAQsFAAOBgQCtE2BHpSMT2V4U JMvsT0viQVW1eaa13gUkhwVR7cZ8mmW4er397pKYOJcpb+Lzp0h6d9l9ItFtDmFJ 5+Fy2Zqy2O+bOrJxN0NtDd6ESMTmbMt8BYyvJs+qK+HX8mX4DUUz7LeaKr8W8U92 xyodFPSaMBSNcjDn9JweCTRbeSZK2Q== -----END CERTIFICATE----- nextepc-0.3.10/support/freeDiameter/pgw.conf.in000066400000000000000000000255701333553357400214460ustar00rootroot00000000000000# This is a sample configuration file for freeDiameter daemon. # Most of the options can be omitted, as they default to reasonable values. # Only TLS-related options must be configured properly in usual setups. # It is possible to use "include" keyword to import additional files # e.g.: include "/etc/freeDiameter.d/*.conf" # This is exactly equivalent as copy & paste the content of the included file(s) # where the "include" keyword is found. ############################################################## ## Peer identity and realm # The Diameter Identity of this daemon. # This must be a valid FQDN that resolves to the local host. # Default: hostname's FQDN #Identity = "aaa.koganei.freediameter.net"; Identity = "pgw.localdomain"; # The Diameter Realm of this daemon. # Default: the domain part of Identity (after the first dot). #Realm = "koganei.freediameter.net"; Realm = "localdomain"; ############################################################## ## Transport protocol configuration # The port this peer is listening on for incoming connections (TCP and SCTP). # Default: 3868. Use 0 to disable. #Port = 3868; # The port this peer is listening on for incoming TLS-protected connections (TCP and SCTP). # See TLS_old_method for more information about TLS flavours. # Note: we use TLS/SCTP instead of DTLS/SCTP at the moment. This will change in future version of freeDiameter. # Default: 5868. Use 0 to disable. #SecPort = 5868; # Use RFC3588 method for TLS protection, where TLS is negociated after CER/CEA exchange is completed # on the unsecure connection. The alternative is RFC6733 mechanism, where TLS protects also the # CER/CEA exchange on a dedicated secure port. # This parameter only affects outgoing connections. # The setting can be also defined per-peer (see Peers configuration section). # Default: use RFC6733 method with separate port for TLS. #TLS_old_method; # Disable use of TCP protocol (only listen and connect over SCTP) # Default : TCP enabled #No_TCP; # Disable use of SCTP protocol (only listen and connect over TCP) # Default : SCTP enabled #No_SCTP; No_SCTP; # This option is ignored if freeDiameter is compiled with DISABLE_SCTP option. # Prefer TCP instead of SCTP for establishing new connections. # This setting may be overwritten per peer in peer configuration blocs. # Default : SCTP is attempted first. #Prefer_TCP; # Default number of streams per SCTP associations. # This setting may be overwritten per peer basis. # Default : 30 streams #SCTP_streams = 30; ############################################################## ## Endpoint configuration # Disable use of IP addresses (only IPv6) # Default : IP enabled #No_IP; # Disable use of IPv6 addresses (only IP) # Default : IPv6 enabled #No_IPv6; # Specify local addresses the server must bind to # Default : listen on all addresses available. #ListenOn = "202.249.37.5"; #ListenOn = "2001:200:903:2::202:1"; #ListenOn = "fe80::21c:5ff:fe98:7d62%eth0"; ListenOn = "127.0.0.3"; ############################################################## ## Server configuration # How many Diameter peers are allowed to be connecting at the same time ? # This parameter limits the number of incoming connections from the time # the connection is accepted until the first CER is received. # Default: 5 unidentified clients in paralel. #ThreadsPerServer = 5; ############################################################## ## TLS Configuration # TLS is managed by the GNUTLS library in the freeDiameter daemon. # You may find more information about parameters and special behaviors # in the relevant documentation. # http://www.gnu.org/software/gnutls/manual/ # Credentials of the local peer # The X509 certificate and private key file to use for the local peer. # The files must contain PKCS-1 encoded RSA key, in PEM format. # (These parameters are passed to gnutls_certificate_set_x509_key_file function) # Default : NO DEFAULT #TLS_Cred = "" , ""; #TLS_Cred = "/etc/ssl/certs/freeDiameter.pem", "/etc/ssl/private/freeDiameter.key"; TLS_Cred = "@SYSCONF_DIR@/nextepc/freeDiameter/pgw.cert.pem", "@SYSCONF_DIR@/nextepc/freeDiameter/pgw.key.pem"; # Certificate authority / trust anchors # The file containing the list of trusted Certificate Authorities (PEM list) # (This parameter is passed to gnutls_certificate_set_x509_trust_file function) # The directive can appear several times to specify several files. # Default : GNUTLS default behavior #TLS_CA = ""; TLS_CA = "@SYSCONF_DIR@/nextepc/freeDiameter/cacert.pem"; # Certificate Revocation List file # The information about revoked certificates. # The file contains a list of trusted CRLs in PEM format. They should have been verified before. # (This parameter is passed to gnutls_certificate_set_x509_crl_file function) # Note: openssl CRL format might have interoperability issue with GNUTLS format. # Default : GNUTLS default behavior #TLS_CRL = ""; # GNU TLS Priority string # This string allows to configure the behavior of GNUTLS key exchanges # algorithms. See gnutls_priority_init function documentation for information. # You should also refer to the Diameter required TLS support here: # http://tools.ietf.org/html/rfc6733#section-13.1 # Default : "NORMAL" # Example: TLS_Prio = "NONE:+VERS-TLS1.1:+AES-128-CBC:+RSA:+SHA1:+COMP-NULL"; #TLS_Prio = "NORMAL"; # Diffie-Hellman parameters size # Set the number of bits for generated DH parameters # Valid value should be 768, 1024, 2048, 3072 or 4096. # (This parameter is passed to gnutls_dh_params_generate2 function, # it usually should match RSA key size) # Default : 1024 #TLS_DH_Bits = 1024; # Alternatively, you can specify a file to load the PKCS#3 encoded # DH parameters directly from. This accelerates the daemon start # but is slightly less secure. If this file is provided, the # TLS_DH_Bits parameters has no effect. # Default : no default. #TLS_DH_File = ""; ############################################################## ## Timers configuration # The Tc timer of this peer. # It is the delay before a new attempt is made to reconnect a disconnected peer. # The value is expressed in seconds. The recommended value is 30 seconds. # Default: 30 #TcTimer = 30; # The Tw timer of this peer. # It is the delay before a watchdog message is sent, as described in RFC 3539. # The value is expressed in seconds. The default value is 30 seconds. Value must # be greater or equal to 6 seconds. See details in the RFC. # Default: 30 #TwTimer = 30; ############################################################## ## Applications configuration # Disable the relaying of Diameter messages? # For messages not handled locally, the default behavior is to forward the # message to another peer if any is available, according to the routing # algorithms. In addition the "0xffffff" application is advertised in CER/CEA # exchanges. # Default: Relaying is enabled. #NoRelay; # Number of server threads that can handle incoming messages at the same time. # Default: 4 #AppServThreads = 4; # Other applications are configured by loaded extensions. ############################################################## ## Extensions configuration # The freeDiameter framework merely provides support for # Diameter Base Protocol. The specific application behaviors, # as well as advanced functions, are provided # by loadable extensions (plug-ins). # These extensions may in addition receive the name of a # configuration file, the format of which is extension-specific. # # Format: #LoadExtension = "/path/to/extension" [ : "/optional/configuration/file" ] ; # # Examples: #LoadExtension = "extensions/sample.fdx"; #LoadExtension = "extensions/sample.fdx":"conf/sample.conf"; # Extensions are named as follow: # dict_* for extensions that add content to the dictionary definitions. # dbg_* for extensions useful only to retrieve more information on the framework execution. # acl_* : Access control list, to control which peers are allowed to connect. # rt_* : routing extensions that impact how messages are forwarded to other peers. # app_* : applications, these extensions usually register callbacks to handle specific messages. # test_* : dummy extensions that are useful only in testing environments. # The dbg_msg_dump.fdx extension allows you to tweak the way freeDiameter displays some # information about some events. This extension does not actually use a configuration file # but receives directly a parameter in the string passed to the extension. Here are some examples: ## LoadExtension = "dbg_msg_dumps.fdx" : "0x1111"; # Removes all default hooks, very quiet even in case of errors. ## LoadExtension = "dbg_msg_dumps.fdx" : "0x2222"; # Display all events with few details. ## LoadExtension = "dbg_msg_dumps.fdx" : "0x0080"; # Dump complete information about sent and received messages. # The four digits respectively control: connections, routing decisions, sent/received messages, errors. # The values for each digit are: # 0 - default - keep the default behavior # 1 - quiet - remove any specific log # 2 - compact - display only a summary of the information # 4 - full - display the complete information on a single long line # 8 - tree - display the complete information in an easier to read format spanning several lines. LoadExtension = "dbg_msg_dumps.so" : "0x8888"; LoadExtension = "dict_rfc5777.so"; LoadExtension = "dict_mip6i.so"; LoadExtension = "dict_nasreq.so"; LoadExtension = "dict_nas_mipv6.so"; LoadExtension = "dict_dcca.so"; LoadExtension = "dict_dcca_3gpp.so"; ############################################################## ## Peers configuration # The local server listens for incoming connections. By default, # all unknown connecting peers are rejected. Extensions can override this behavior (e.g., acl_wl). # # In addition to incoming connections, the local peer can # be configured to establish and maintain connections to some # Diameter nodes and allow connections from these nodes. # This is achieved with the ConnectPeer directive described below. # # Note that the configured Diameter Identity MUST match # the information received inside CEA, or the connection will be aborted. # # Format: #ConnectPeer = "diameterid" [ { parameter1; parameter2; ...} ] ; # Parameters that can be specified in the peer's parameter list: # No_TCP; No_SCTP; No_IP; No_IPv6; Prefer_TCP; TLS_old_method; # No_TLS; # assume transparent security instead of TLS. DTLS is not supported yet (will change in future versions). # Port = 5868; # The port to connect to # TcTimer = 30; # TwTimer = 30; # ConnectTo = "202.249.37.5"; # ConnectTo = "2001:200:903:2::202:1"; # TLS_Prio = "NORMAL"; # Realm = "realm.net"; # Reject the peer if it does not advertise this realm. # Examples: #ConnectPeer = "aaa.wide.ad.jp"; #ConnectPeer = "old.diameter.serv" { TcTimer = 60; TLS_old_method; No_SCTP; Port=3868; } ; ConnectPeer = "pcrf.localdomain" { ConnectTo = "127.0.0.5"; No_TLS; }; ############################################################## nextepc-0.3.10/support/freeDiameter/pgw.key.pem000066400000000000000000000015731333553357400214610ustar00rootroot00000000000000-----BEGIN RSA PRIVATE KEY----- MIICXgIBAAKBgQCu29yvpPfx2uA0PP+eYBK1Bc5cs1+AEplIQZTNh2TwF+Avg6vL 3INZ8vof49Jym7hlYziAUGkObmYCtRl6gWIKYzRLOhFGBkKeifClpD50AMNiMjK0 2EGwFeTrxx+z6nteA8hESqE1n7E8peCD2P9sb0Vb655Ly6BCiI2B6sdKzQIDAQAB AoGAERK4npHN/9huMcuO7ejVisVRW+3LslaejtaQb+z7ZxH9usXxfUs/rAW0dG6r OrOHsqaYerbfOyB+Z19FaJe/ebi2LQxUvUA7wFDYnrw/jvS8IDJrIcCg3BTVJGHQ W4yTbVzPgEeW768eGuJ4YJJbnZhMgV+ia/A5mwrXoJZ4kAUCQQDl9Y54uVeXmLuh CnnWt8xcacmeEIOXQ+UXArLQdeBzGX6Z5BuCbjjZjPnIo93RQedl4PJ3CGdL4IoA 9vL3rpoXAkEAwqj2qf0DjoItnhcJFSpaLZuwZo2kcQOve9BzfpM1PojNHwuFl8hw lwXQ+8BOtQo2qvk1UlkuH+mEQ3h/GmqkuwJBAI+v7cP1W4v3/VVU7GiEFAeyei5v 9ylvXRgRsZWb8hE5XufdpmrLYG5fLjx2V8XHPkVkV1yVPaYluVV8+LhWuyUCQQCr Qe/RWhIY/JqZrXaGMn6oBYNKlm8IJs/qxFf4EhcT71NXbtGX2faER8+2zVfxmwzB mwK4clFMLiv5GDfqy8wlAkEA08d6Z0/MW7bYOQIDfkmw26wJfuSIbqO5GHMuJOKh NufvnoLYLVoPWxONVIVrP8mfQk7EJH8JpKOIFY5Vw8p7BA== -----END RSA PRIVATE KEY----- nextepc-0.3.10/support/logrotate/000077500000000000000000000000001333553357400167705ustar00rootroot00000000000000nextepc-0.3.10/support/logrotate/Makefile.am000066400000000000000000000001341333553357400210220ustar00rootroot00000000000000EXTRA_DIST = nextepc.in MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump nextepc-0.3.10/support/logrotate/nextepc.in000066400000000000000000000005761333553357400207760ustar00rootroot00000000000000@LOCALSTATE_DIR@/log/nextepc/*.log { daily sharedscripts missingok compress rotate 14 create 640 nextepc nextepc postrotate for i in pcrfd pgwd sgwd hssd mmed epcd; do if [ -e @LOCALSTATE_DIR@/run/nextepc-$i/pid ] ; then kill -HUP `cat @LOCALSTATE_DIR@/run/nextepc-$i/pid` fi done endscript } nextepc-0.3.10/support/macosx/000077500000000000000000000000001333553357400162625ustar00rootroot00000000000000nextepc-0.3.10/support/macosx/README.md000066400000000000000000000025111333553357400175400ustar00rootroot00000000000000Install SCTP for Mac OS X 10.11(El Captian) =========================================== - Reference : https://github.com/sctplab/SCTP_NKE_ElCapitan - Start up in OS X Recovery by holding down Command-R while the Mac is starting up Choose Terminal from the Utilities menu. Type 'csrutil disable' in Terminal and Reboot - Download SCTP_NKE_ElCapitan_Install_01.dmg xcode-select --install sudo cp -R /Volumes/SCTP_NKE_ElCapitan_01/SCTPSupport.kext /Library/Extensions sudo cp -R /Volumes/SCTP_NKE_ElCapitan_01/SCTP.kext /Library/Extensions sudo cp /Volumes/SCTP_NKE_ElCapitan_01/socket.h /usr/include/sys/ sudo cp /Volumes/SCTP_NKE_ElCapitan_01/sctp.h /usr/include/netinet/ sudo cp /Volumes/SCTP_NKE_ElCapitan_01/sctp_uio.h /usr/include/netinet/ sudo cp /Volumes/SCTP_NKE_ElCapitan_01/libsctp.dylib /usr/lib/ sudo kextload /Library/Extensions/SCTP.kext Install Tuntap for Mac OS X =========================================== - brew tap caskroom/cask - brew cask install tuntap - Install tuntap_20150118.pkg in /usr/local/Caskroom/tuntap/20150118 - sudo kextload /Library/Extensions/tun.kext Install FreeDiameter, MongoDB C driver =========================================== - brew install freediamter - brew install mongo-c-driver Enable IP Fowarding ==================== - sysctl -w net.inet.ip.forwarding=1 nextepc-0.3.10/support/network/000077500000000000000000000000001333553357400164615ustar00rootroot00000000000000nextepc-0.3.10/support/network/99-nextepc.netdev000066400000000000000000000000361333553357400215740ustar00rootroot00000000000000[NetDev] Name=pgwtun Kind=tun nextepc-0.3.10/support/network/99-nextepc.network000066400000000000000000000001071333553357400217770ustar00rootroot00000000000000[Match] Name=pgwtun [Network] Address=45.45.0.1/16 Address=cafe::1/64 nextepc-0.3.10/support/network/ipv6_restart.sh000077500000000000000000000025261333553357400214550ustar00rootroot00000000000000#!/bin/sh SYSTEM=`uname`; if [ "$SYSTEM" = "Linux" ]; then if ! grep "pgwtun" /proc/net/dev > /dev/null; then ip tuntap add name pgwtun mode tun fi ip addr del 45.45.0.1/16 dev pgwtun 2> /dev/null ip addr add 45.45.0.1/16 dev pgwtun ip addr del cafe::1/64 dev pgwtun 2> /dev/null ip addr add cafe::1/64 dev pgwtun ip link set pgwtun up ip addr del fe80::2 dev lo 2> /dev/null ip addr del fe80::3 dev lo 2> /dev/null ip addr del fe80::4 dev lo 2> /dev/null ip addr del fe80::5 dev lo 2> /dev/null ip addr add fe80::2 dev lo ip addr add fe80::3 dev lo ip addr add fe80::4 dev lo ip addr add fe80::5 dev lo else ifconfig lo0 alias 127.0.0.2 netmask 255.255.255.255 ifconfig lo0 alias 127.0.0.3 netmask 255.255.255.255 ifconfig lo0 alias 127.0.0.4 netmask 255.255.255.255 ifconfig lo0 alias 127.0.0.5 netmask 255.255.255.255 ifconfig lo0 inet6 delete fe80::2 prefixlen 128 2> /dev/null ifconfig lo0 inet6 delete fe80::3 prefixlen 128 2> /dev/null ifconfig lo0 inet6 delete fe80::4 prefixlen 128 2> /dev/null ifconfig lo0 inet6 delete fe80::5 prefixlen 128 2> /dev/null ifconfig lo0 inet6 add fe80::2 prefixlen 128 ifconfig lo0 inet6 add fe80::3 prefixlen 128 ifconfig lo0 inet6 add fe80::4 prefixlen 128 ifconfig lo0 inet6 add fe80::5 prefixlen 128 fi nextepc-0.3.10/support/network/restart.sh000077500000000000000000000021251333553357400205040ustar00rootroot00000000000000#!/bin/sh SYSTEM=`uname`; if [ "$SYSTEM" = "Linux" ]; then if ! grep "pgwtun" /proc/net/dev > /dev/null; then ip tuntap add name pgwtun mode tun fi if test "x`sysctl -n net.ipv6.conf.pgwtun.disable_ipv6`" = x1; then echo "net.ipv6.conf.pgwtun.disable_ipv6=0" > /etc/sysctl.d/30-nextepc.conf sysctl -p /etc/sysctl.d/30-nextepc.conf fi ip addr del 45.45.0.1/16 dev pgwtun 2> /dev/null ip addr add 45.45.0.1/16 dev pgwtun ip addr del cafe::1/64 dev pgwtun 2> /dev/null ip addr add cafe::1/64 dev pgwtun ip link set pgwtun up else sysctl -w net.inet.ip.forwarding=1 ifconfig lo0 alias 127.0.0.2 netmask 255.255.255.255 ifconfig lo0 alias 127.0.0.3 netmask 255.255.255.255 ifconfig lo0 alias 127.0.0.4 netmask 255.255.255.255 ifconfig lo0 alias 127.0.0.5 netmask 255.255.255.255 if [ "$SYSTEM" = "Darwin" ]; then if ! test -f /etc/pf.anchors/org.nextepc; then sudo sh -c "echo 'nat on {en0} from 45.45.0.0/16 to any -> {en0}' > /etc/pf.anchors/org.nextepc" fi pfctl -e -f /etc/pf.anchors/org.nextepc fi fi nextepc-0.3.10/support/newsyslog/000077500000000000000000000000001333553357400170225ustar00rootroot00000000000000nextepc-0.3.10/support/newsyslog/Makefile.am000066400000000000000000000001411333553357400210520ustar00rootroot00000000000000EXTRA_DIST = nextepc.conf.in MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump nextepc-0.3.10/support/newsyslog/nextepc.conf.in000066400000000000000000000016261333553357400217510ustar00rootroot00000000000000# truncate rails logs every day at midnight, keep 14 previous logs, compress previous logs # # logfilename [owner:group] mode count size when flags [/pid_file] [sig_num] @LOCALSTATE_DIR@/log/nextepc/pcrf.log 644 14 * $D0 GZ @LOCALSTATE_DIR@/run/nextepc-pcrfd/pid` @LOCALSTATE_DIR@/log/nextepc/pgw.log 644 14 * $D0 GZ @LOCALSTATE_DIR@/run/nextepc-pgwd/pid` @LOCALSTATE_DIR@/log/nextepc/sgw.log 644 14 * $D0 GZ @LOCALSTATE_DIR@/run/nextepc-sgwd/pid` @LOCALSTATE_DIR@/log/nextepc/hss.log 644 14 * $D0 GZ @LOCALSTATE_DIR@/run/nextepc-hssd/pid` @LOCALSTATE_DIR@/log/nextepc/mme.log 644 14 * $D0 GZ @LOCALSTATE_DIR@/run/nextepc-mmed/pid` @LOCALSTATE_DIR@/log/nextepc/nextepc.log 644 14 * $D0 GZ @LOCALSTATE_DIR@/run/nextepc-epcd/pid` nextepc-0.3.10/support/radvd/000077500000000000000000000000001333553357400160705ustar00rootroot00000000000000nextepc-0.3.10/support/radvd/README.md000066400000000000000000000003001333553357400173400ustar00rootroot00000000000000IPv6 Routing Daemon(radvd) =========================================== - sudo apt-get install radvd - sudo cp support/radvd/radvd.conf.example /etc/radvd.conf - sudo systemctl start radvd nextepc-0.3.10/support/radvd/radvd.conf.example000066400000000000000000000025331333553357400214740ustar00rootroot00000000000000# # NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE # NOTE NOTE # NOTE This is an EXAMPLE, which serves only to demonstrate the NOTE # NOTE syntax of radvd.conf, and is not meant to be used for a NOTE # NOTE real radvd configuration. NOTE # NOTE NOTE # NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE # interface pgwtun { AdvSendAdvert on; # This may be needed on some interfaces which are not active when # radvd starts, but become available later on; see man page for details. # IgnoreIfMissing on; # # These settings cause advertisements to be sent every 3-10 seconds. This # range is good for 6to4 with a dynamic IPv4 address, but can be greatly # increased when not using 6to4 prefixes. # MinRtrAdvInterval 3; MaxRtrAdvInterval 10; # # You can use AdvDefaultPreference setting to advertise the preference of # the router for the purposes of default router determination. # NOTE: This feature is still being specified and is not widely supported! # AdvDefaultPreference low; # # Disable Mobile IPv6 support # AdvHomeAgentFlag off; # # NextEPC pgwtun prefix # prefix cafe::/64 { AdvOnLink on; AdvAutonomous on; AdvRouterAddr off; }; }; nextepc-0.3.10/support/systemd/000077500000000000000000000000001333553357400164605ustar00rootroot00000000000000nextepc-0.3.10/support/systemd/Makefile.am000066400000000000000000000003441333553357400205150ustar00rootroot00000000000000EXTRA_DIST = \ nextepc-mmed.service.in \ nextepc-pgwd.service.in \ nextepc-hssd.service.in \ nextepc-pcrfd.service.in \ nextepc-sgwd.service.in \ $(NULL) MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = *.stackdump nextepc-0.3.10/support/systemd/nextepc-hssd.service.in000066400000000000000000000006001333553357400230500ustar00rootroot00000000000000[Unit] Description=NextEPC HSS Daemon BindTo=mongodb.service After=networking.service mongodb.service [Service] Type=simple User=nextepc Group=nextepc RuntimeDirectory=nextepc-hssd PIDFile=@LIB_DIR@/run/nextepc-hssd/pid Restart=always ExecStart=@BIN_DIR@/nextepc-hssd -f @SYSCONF_DIR@/nextepc/hss.conf RestartSec=2 RestartPreventExitStatus=1 [Install] WantedBy=multi-user.target nextepc-0.3.10/support/systemd/nextepc-mmed.service.in000066400000000000000000000005311333553357400230340ustar00rootroot00000000000000[Unit] Description=NextEPC MME Daemon After=networking.service [Service] Type=simple User=nextepc Group=nextepc RuntimeDirectory=nextepc-mmed PIDFile=@LIB_DIR@/run/nextepc-mmed/pid Restart=always ExecStart=@BIN_DIR@/nextepc-mmed -f @SYSCONF_DIR@/nextepc/mme.conf RestartSec=2 RestartPreventExitStatus=1 [Install] WantedBy=multi-user.target nextepc-0.3.10/support/systemd/nextepc-pcrfd.service.in000066400000000000000000000006051333553357400232120ustar00rootroot00000000000000[Unit] Description=NextEPC PCRF Daemon BindTo=mongodb.service After=networking.service mongodb.service [Service] Type=simple User=nextepc Group=nextepc RuntimeDirectory=nextepc-pcrfd PIDFile=@LIB_DIR@/run/nextepc-pcrfd/pid Restart=always ExecStart=@BIN_DIR@/nextepc-pcrfd -f @SYSCONF_DIR@/nextepc/pcrf.conf RestartSec=2 RestartPreventExitStatus=1 [Install] WantedBy=multi-user.target nextepc-0.3.10/support/systemd/nextepc-pgwd.service.in000066400000000000000000000005321333553357400230540ustar00rootroot00000000000000[Unit] Description=NextEPC P-GW Daemon After=networking.service [Service] Type=simple User=nextepc Group=nextepc RuntimeDirectory=nextepc-pgwd PIDFile=@LIB_DIR@/run/nextepc-pgwd/pid Restart=always ExecStart=@BIN_DIR@/nextepc-pgwd -f @SYSCONF_DIR@/nextepc/pgw.conf RestartSec=2 RestartPreventExitStatus=1 [Install] WantedBy=multi-user.target nextepc-0.3.10/support/systemd/nextepc-sgwd.service.in000066400000000000000000000005321333553357400230570ustar00rootroot00000000000000[Unit] Description=NextEPC S-GW Daemon After=networking.service [Service] Type=simple User=nextepc Group=nextepc RuntimeDirectory=nextepc-sgwd PIDFile=@LIB_DIR@/run/nextepc-sgwd/pid Restart=always ExecStart=@BIN_DIR@/nextepc-sgwd -f @SYSCONF_DIR@/nextepc/sgw.conf RestartSec=2 RestartPreventExitStatus=1 [Install] WantedBy=multi-user.target nextepc-0.3.10/support/systemd/systemctl.sh000077500000000000000000000004221333553357400210440ustar00rootroot00000000000000if [ 1 -ne $# ] then echo "You must specify argument : ./systemctl.sh {start|stop|force-stop|restart|force-reload|status}" exit; fi systemctl $1 nextepc-mmed systemctl $1 nextepc-sgwd systemctl $1 nextepc-pgwd systemctl $1 nextepc-hssd systemctl $1 nextepc-pcrfd nextepc-0.3.10/support/valgrind/000077500000000000000000000000001333553357400165765ustar00rootroot00000000000000nextepc-0.3.10/support/valgrind/README.md000066400000000000000000000013511333553357400200550ustar00rootroot00000000000000 * Memory Leak Check user@host ~/Documents/git/nextepc$ \ sudo valgrind --leak-check=full --show-leak-kinds=all \ --suppressions=support/valgrind/mongoc.suppressions \ --suppressions=support/valgrind/freeDiameter.suppressions \ ./test/testepc * Generate Suppression File user@host ~/Documents/git/nextepc$ \ sudo valgrind --leak-check=full --show-reachable=yes --error-limit=no \ --gen-suppressions=all --log-file=support/valgrind/test.log \ --suppressions=support/valgrind/mongoc.suppressions \ ./test/testepc user@host ~/Documents/git/nextepc/support/valgrind$ \ sudo chown user:user test.log user@host ~/Documents/git/nextepc/support/valgrind$ \ cat ./test.log | ./parse_suppressions.sh > test.supp nextepc-0.3.10/support/valgrind/freeDiameter.suppressions000066400000000000000000001254301333553357400236760ustar00rootroot00000000000000{ Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:strdup fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:fddalloc obj:/usr/lib/libfdcore.so.1.2.0 fun:fddlex fun:fddparse fun:fd_conf_parse fun:fd_core_parseconf fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:strdup fun:fd_log_threadname fun:fd_core_initialize fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: definite fun:malloc fun:os0dup_int fun:fd_dict_new obj:* obj:* fun:fd_ext_load fun:fd_core_parseconf fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc fun:_dlerror_run fun:dlopen@@GLIBC_2.1 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_initialize_registered fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:hss_s6a_init fun:hss_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 fun:gcry_check_version obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:hss_s6a_init fun:hss_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 fun:gcry_check_version obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 fun:gnutls_global_init fun:fd_core_initialize fun:fd_init } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 fun:gcry_control obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:hss_s6a_init } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 fun:gcry_prime_generate obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 fun:gnutls_dh_params_generate2 fun:fd_conf_parse fun:fd_core_parseconf fun:fd_init } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:fddalloc fun:fdd_create_buffer fun:fddlex fun:fddparse fun:fd_conf_parse fun:fd_core_parseconf fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 fun:gcry_prime_generate obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 fun:gnutls_dh_params_generate2 } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:realloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 fun:gcry_prime_generate obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:_dl_signal_error fun:_dl_signal_cerror fun:_dl_lookup_symbol_x fun:do_sym fun:_dl_sym fun:dlsym_doit fun:_dl_catch_error fun:_dlerror_run fun:dlsym fun:fd_ext_load fun:fd_core_parseconf } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 fun:gcry_check_version obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 fun:gnutls_global_init } { Memcheck:Leak match-leak-kinds: possible fun:malloc fun:fd_hook_register obj:* obj:* fun:fd_ext_load fun:fd_core_parseconf fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 fun:gcry_prime_generate obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 fun:gnutls_dh_params_generate2 fun:fd_conf_parse fun:fd_core_parseconf fun:fd_init } { Memcheck:Leak match-leak-kinds: reachable fun:calloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_initialize_registered fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 fun:gcry_create_nonce obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 fun:gnutls_global_init } { Memcheck:Leak match-leak-kinds: definite fun:malloc fun:fd_dump_extend obj:/usr/lib/libfdproto.so.1.2.0 obj:/usr/lib/libfdproto.so.1.2.0 obj:* fun:fd_hook_call obj:/usr/lib/libfdcore.so.1.2.0 fun:start_thread fun:clone } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:strdup fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:mme_s6a_init fun:mme_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:fddalloc obj:/usr/lib/libfdcore.so.1.2.0 fun:fddlex fun:fddparse fun:fd_conf_parse fun:fd_core_parseconf fun:fd_init fun:mme_s6a_init fun:mme_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:mme_s6a_init fun:mme_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:strdup fun:fd_log_threadname fun:fd_core_initialize fun:fd_init fun:mme_s6a_init fun:mme_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: definite fun:malloc fun:os0dup_int fun:fd_dict_new obj:* obj:* fun:fd_ext_load fun:fd_core_parseconf fun:fd_init fun:mme_s6a_init fun:mme_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:mme_s6a_init fun:mme_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:mme_s6a_init fun:mme_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:mme_s6a_init fun:mme_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc fun:_dlerror_run fun:dlopen@@GLIBC_2.1 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_initialize_registered fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:mme_s6a_init fun:mme_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 fun:gcry_check_version obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:mme_s6a_init fun:mme_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 fun:gcry_control obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:mme_s6a_init } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:mme_s6a_init fun:mme_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:fddalloc fun:fdd_create_buffer fun:fddlex fun:fddparse fun:fd_conf_parse fun:fd_core_parseconf fun:fd_init fun:mme_s6a_init fun:mme_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:realloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:mme_s6a_init fun:mme_initialize fun:app_initialize } { Memcheck:Leak match-leak-kinds: possible fun:malloc fun:fd_hook_register obj:* obj:* fun:fd_ext_load fun:fd_core_parseconf fun:fd_init fun:mme_s6a_init fun:mme_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: definite fun:malloc fun:fd_dump_extend obj:/usr/lib/libfdproto.so.1.2.0 obj:/usr/lib/libfdproto.so.1.2.0 obj:* fun:fd_hook_call obj:/usr/lib/libfdcore.so.1.2.0 fun:fd_out_send fun:fd_p_ce_handle_newcnx obj:/usr/lib/libfdcore.so.1.2.0 fun:start_thread fun:clone } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:strdup fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:fddalloc obj:/usr/lib/libfdcore.so.1.2.0 fun:fddlex fun:fddparse fun:fd_conf_parse fun:fd_core_parseconf fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:strdup fun:fd_log_threadname fun:fd_core_initialize fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: definite fun:malloc fun:os0dup_int fun:fd_dict_new obj:* obj:* fun:fd_ext_load fun:fd_core_parseconf fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc fun:_dlerror_run fun:dlopen@@GLIBC_2.1 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_initialize_registered fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 fun:gcry_check_version obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 fun:gcry_control obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pcrf_gx_init } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:fddalloc fun:fdd_create_buffer fun:fddlex fun:fddparse fun:fd_conf_parse fun:fd_core_parseconf fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:realloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize } { Memcheck:Leak match-leak-kinds: possible fun:malloc fun:fd_hook_register obj:* obj:* fun:fd_ext_load fun:fd_core_parseconf fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_initialize_registered fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:strdup fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:fddalloc obj:/usr/lib/libfdcore.so.1.2.0 fun:fddlex fun:fddparse fun:fd_conf_parse fun:fd_core_parseconf fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:strdup fun:fd_log_threadname fun:fd_core_initialize fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: definite fun:malloc fun:os0dup_int fun:fd_dict_new obj:* obj:* fun:fd_ext_load fun:fd_core_parseconf fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc fun:_dlerror_run fun:dlopen@@GLIBC_2.1 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_initialize_registered fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pgw_gx_init fun:pgw_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 fun:gcry_check_version obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pgw_gx_init fun:pgw_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 obj:/lib/i386-linux-gnu/libgcrypt.so.11.8.2 fun:gcry_control obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pgw_gx_init } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:fddalloc fun:fdd_create_buffer fun:fddlex fun:fddparse fun:fd_conf_parse fun:fd_core_parseconf fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:realloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize } { Memcheck:Leak match-leak-kinds: possible fun:malloc fun:fd_hook_register obj:* obj:* fun:fd_ext_load fun:fd_core_parseconf fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_initialize_registered fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:strdup fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:fddalloc obj:/usr/lib/libfdcore.so.1.2.0 fun:fddlex fun:fddparse fun:fd_conf_parse fun:fd_core_parseconf fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:test_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:strdup fun:fd_log_threadname fun:fd_core_initialize fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: definite fun:malloc fun:os0dup_int fun:fd_dict_new obj:* obj:* fun:fd_ext_load fun:fd_core_parseconf fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:test_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:calloc fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:test_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:fddalloc fun:fdd_create_buffer fun:fddlex fun:fddparse fun:fd_conf_parse fun:fd_core_parseconf fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:test_initialize } { Memcheck:Leak match-leak-kinds: possible fun:malloc fun:fd_hook_register obj:* obj:* fun:fd_ext_load fun:fd_core_parseconf fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_initialize_registered fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pgw_gx_init fun:pgw_initialize fun:app_initialize fun:test_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:strdup fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:fddalloc obj:/usr/lib/libfdcore.so.1.2.0 fun:fddlex fun:fddparse fun:fd_conf_parse fun:fd_core_parseconf fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:test_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:strdup fun:fd_log_threadname fun:fd_core_initialize fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: definite fun:malloc fun:os0dup_int fun:fd_dict_new obj:* obj:* fun:fd_ext_load fun:fd_core_parseconf fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:test_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:calloc fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:test_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:fddalloc fun:fdd_create_buffer fun:fddlex fun:fddparse fun:fd_conf_parse fun:fd_core_parseconf fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:test_initialize } { Memcheck:Leak match-leak-kinds: possible fun:malloc fun:fd_hook_register obj:* obj:* fun:fd_ext_load fun:fd_core_parseconf fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_initialize_registered fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:hss_s6a_init fun:hss_initialize fun:app_initialize fun:test_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:strdup fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:fddalloc obj:/usr/lib/libfdcore.so.1.2.0 fun:fddlex fun:fddparse fun:fd_conf_parse fun:fd_core_parseconf fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:test_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:strdup fun:fd_log_threadname fun:fd_core_initialize fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: definite fun:malloc fun:os0dup_int fun:fd_dict_new obj:* obj:* fun:fd_ext_load fun:fd_core_parseconf fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:test_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:calloc fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:test_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:fddalloc fun:fdd_create_buffer fun:fddlex fun:fddparse fun:fd_conf_parse fun:fd_core_parseconf fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:test_initialize } { Memcheck:Leak match-leak-kinds: possible fun:malloc fun:fd_hook_register obj:* obj:* fun:fd_ext_load fun:fd_core_parseconf fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_initialize_registered fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:pcrf_gx_init fun:pcrf_initialize fun:app_initialize fun:test_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:strdup fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:mme_s6a_init fun:mme_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:fddalloc obj:/usr/lib/libfdcore.so.1.2.0 fun:fddlex fun:fddparse fun:fd_conf_parse fun:fd_core_parseconf fun:fd_init fun:mme_s6a_init fun:mme_initialize fun:app_initialize fun:test_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libgnutls.so.26.22.6 fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:mme_s6a_init fun:mme_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:strdup fun:fd_log_threadname fun:fd_core_initialize fun:fd_init fun:mme_s6a_init fun:mme_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: definite fun:malloc fun:os0dup_int fun:fd_dict_new obj:* obj:* fun:fd_ext_load fun:fd_core_parseconf fun:fd_init fun:mme_s6a_init fun:mme_initialize fun:app_initialize fun:test_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:calloc fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:mme_s6a_init fun:mme_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:mme_s6a_init fun:mme_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:calloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:mme_s6a_init fun:mme_initialize fun:app_initialize fun:test_initialize } { Memcheck:Leak match-leak-kinds: reachable fun:malloc obj:/usr/lib/i386-linux-gnu/libp11-kit.so.0.0.0 fun:p11_kit_pin_register_callback fun:gnutls_pkcs11_init fun:gnutls_global_init fun:fd_core_initialize fun:fd_init fun:mme_s6a_init fun:mme_initialize fun:app_initialize fun:test_initialize fun:main } { Memcheck:Leak match-leak-kinds: reachable fun:malloc fun:fddalloc fun:fdd_create_buffer fun:fddlex fun:fddparse fun:fd_conf_parse fun:fd_core_parseconf fun:fd_init fun:mme_s6a_init fun:mme_initialize fun:app_initialize fun:test_initialize } { Memcheck:Leak match-leak-kinds: possible fun:malloc fun:fd_hook_register obj:* obj:* fun:fd_ext_load fun:fd_core_parseconf fun:fd_init fun:mme_s6a_init fun:mme_initialize fun:app_initialize fun:test_initialize fun:main } nextepc-0.3.10/support/valgrind/mongoc.suppressions000066400000000000000000000016611333553357400225630ustar00rootroot00000000000000{ ignore_libcrypto_conditional_jump_errors_in_leak Memcheck:Leak ... obj:*/libcrypto.so.* } { ignore_libcrypto_conditional_jump_errors_in_cond Memcheck:Cond ... obj:*/libcrypto.so.* } { ignore_libssl_conditional_jump_errors_in_cond Memcheck:Cond ... obj:*/libssl.so.* } { ignore_libcrypto_conditional_jump_errors_in_value8 Memcheck:Value8 ... obj:*/libcrypto.so.* } { ignore_scram_nonce_uninitialized_warning_cond Memcheck:Cond fun:mongoc_b64_ntop ... fun:_mongoc_scram_step ... } { ignore_scram_nonce_uninitialized_warning_value8 Memcheck:Value8 fun:mongoc_b64_ntop ... fun:_mongoc_scram_step ... } { ignore_libcrypto_conditional_jump_errors_in_param Memcheck:Param sendmsg(msg.msg_iov[0]) ... obj:*/libcrypto.so.* } { ignore_sasl_load_plugin_reachable_warnings Memcheck:Leak ... fun:_sasl_get_plugin ... fun:_mongoc_do_init } nextepc-0.3.10/support/valgrind/parse_suppressions.sh000077500000000000000000000051171333553357400231100ustar00rootroot00000000000000#! /usr/bin/awk -f # A script to extract the actual suppression info from the output of (for example) valgrind --leak-check=full --show-reachable=yes --error-limit=no --gen-suppressions=all ./minimal # The desired bits are between ^{ and ^} (including the braces themselves). # The combined output should either be appended to /usr/lib/valgrind/default.supp, or placed in a .supp of its own # If the latter, either tell valgrind about it each time with --suppressions=, or add that line to ~/.valgrindrc # NB This script uses the |& operator, which I believe is gawk-specific. In case of failure, check that you're using gawk rather than some other awk # The script looks for suppressions. When it finds one it stores it temporarily in an array, # and also feeds it line by line to the external app 'md5sum' which generates a unique checksum for it. # The checksum is used as an index in a different array. If an item with that index already exists the suppression must be a duplicate and is discarded. BEGIN { suppression=0; md5sum = "md5sum" } # If the line begins with '{', it's the start of a supression; so set the var and initialise things /^{/ { suppression=1; i=0; next } # If the line begins with '}' its the end of a suppression /^}/ { if (suppression) { suppression=0; close(md5sum, "to") # We've finished sending data to md5sum, so close that part of the pipe ProcessInput() # Do the slightly-complicated stuff in functions delete supparray # We don't want subsequent suppressions to append to it! } } # Otherwise, it's a normal line. If we're inside a supression, store it, and pipe it to md5sum. Otherwise it's cruft, so ignore it { if (suppression) { supparray[++i] = $0 print |& md5sum } } function ProcessInput() { # Pipe the result from md5sum, then close it md5sum |& getline result close(md5sum) # gawk can't cope with enormous ints like $result would be, so stringify it first by prefixing a definite string resultstring = "prefix"result if (! (resultstring in chksum_array) ) { chksum_array[resultstring] = 0; # This checksum hasn't been seen before, so add it to the array OutputSuppression() # and output the contents of the suppression } } function OutputSuppression() { # A suppression is surrounded by '{' and '}'. Its data was stored line by line in the array print "{" for (n=1; n <= i; ++n) { print supparray[n] } print "}" } nextepc-0.3.10/test/000077500000000000000000000000001333553357400142335ustar00rootroot00000000000000nextepc-0.3.10/test/Makefile.am000066400000000000000000000055011333553357400162700ustar00rootroot00000000000000## Process this file with automake to produce Makefile.in. bin_PROGRAMS = testepc testvolte configdir = ${sysconfdir}/nextepc/test config_DATA = sample.conf sample-volte.conf testepc_SOURCES = \ common/abts.h common/abts.c \ common/testpacket.h common/testpacket.c common/testutil.h \ basic/testutil.c basic/s1ap_message_test.c basic/nas_message_test.c \ basic/gtp_message_test.c basic/security_test.c basic/s1setup_test.c \ basic/attach_test.c basic/volte_test.c basic/handover_test.c \ $(NULL) testvolte_SOURCES = \ common/abts.h common/abts.c \ common/testpacket.h common/testpacket.c common/testutil.h \ volte/testutil.c volte/testapp.h volte/testapp.c volte/pcscf_fd_path.c \ volte/volte_test.c \ $(NULL) LDADD = \ $(top_srcdir)/src/libepc.la \ $(NULL) DEPENDENCIES = \ $(top_srcdir)/src/libepc.la \ $(NULL) AM_CPPFLAGS = \ -I$(top_srcdir)/lib/core/include \ -I$(top_srcdir)/lib \ -I$(top_srcdir)/src \ -I$(top_srcdir)/lib/s1ap/asn1c \ -I$(top_srcdir)/lib/@FREEDIAMETER_DIR@/include \ -I$(top_srcdir)/test/common \ @MONGOC_CFLAGS@ \ $(NULL) AM_CFLAGS = \ -Wall -Werror \ -Wno-unused-function -Wno-unused-variable -Wno-deprecated-declarations \ @OSCPPFLAGS@ \ $(NULL) DEFS = \ @DEFS@ \ -DFD_EXT_DIR=\"$(abs_top_builddir)/lib/@FREEDIAMETER_DIR@/extensions\" \ $(NULL) TESTSUITE = $(srcdir)/testsuite check-local: atconfig $(TESTSUITE) $(SHELL) '$(TESTSUITE)' $(TESTSUITEFLAGS) #installcheck-local: atconfig $(TESTSUITE) # $(SHELL) '$(TESTSUITE)' AUTOTEST_PATH='$(bindir)' \ # $(TESTSUITEFLAGS) clean-local: test ! -f '$(TESTSUITE)' || \ $(SHELL) '$(TESTSUITE)' --clean AUTOM4TE = $(SHELL) $(top_srcdir)/build-aux/missing --run autom4te AUTOTEST = $(AUTOM4TE) --language=autotest $(TESTSUITE): $(srcdir)/testsuite.at $(srcdir)/package.m4 $(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at mv $@.tmp $@ # The `:;' works around a Bash 3.2 bug when the output is not writeable. $(srcdir)/package.m4: $(top_srcdir)/configure.ac :;{ \ echo '# Signature of the current package.' && \ echo 'm4_define([AT_PACKAGE_NAME],' && \ echo ' [$(PACKAGE_NAME)])' && \ echo 'm4_define([AT_PACKAGE_TARNAME],' && \ echo ' [$(PACKAGE_TARNAME)])' && \ echo 'm4_define([AT_PACKAGE_VERSION],' && \ echo ' [$(PACKAGE_VERSION)])' && \ echo 'm4_define([AT_PACKAGE_STRING],' && \ echo ' [$(PACKAGE_STRING)])' && \ echo 'm4_define([AT_PACKAGE_BUGREPORT],' && \ echo ' [$(PACKAGE_BUGREPORT)])'; \ echo 'm4_define([AT_PACKAGE_URL],' && \ echo ' [$(PACKAGE_URL)])'; \ } >'$(srcdir)/package.m4' EXTRA_DIST = testsuite.at $(srcdir)/package.m4 $(TESTSUITE) MAINTAINERCLEANFILES = Makefile.in MOSTLYCLEANFILES = core *.stackdump nextepc-0.3.10/test/basic/000077500000000000000000000000001333553357400153145ustar00rootroot00000000000000nextepc-0.3.10/test/basic/attach_test.c000066400000000000000000001673701333553357400200010ustar00rootroot00000000000000 #include "core_debug.h" #include "core_pkbuf.h" #include "core_lib.h" #include #include "common/context.h" #include "mme/mme_context.h" #include "mme/s1ap_build.h" #include "s1ap/s1ap_message.h" #include "testutil.h" #include "testpacket.h" /************************************************************** * eNB : MACRO * UE : IMSI * Protocol Configuration Options in ESM information response */ static void attach_test1(abts_case *tc, void *data) { status_t rv; sock_id sock; sock_id gtpu; pkbuf_t *sendbuf; pkbuf_t *recvbuf; s1ap_message_t message; int i; int msgindex = 0; enb_ue_t *enb_ue = NULL; mme_ue_t *mme_ue = NULL; c_uint32_t m_tmsi = 0; c_uint8_t tmp[MAX_SDU_LEN]; char *_authentication_request = "000b403b00000300 000005c00100009d 000800020001001a 0025240752002008" "0c3818183b522614 162c07601d0d10f1 1b89a2a8de8000ad 0ccf7f55e8b20d"; char *_security_mode_command = "000b402700000300 000005c00100009d 000800020001001a 00111037f933b5d5" "00075d010005e060 c04070"; char *_esm_information_request = "000b402000000300 000005c00100009d 000800020001001a 000a092779012320" "010221d9"; char *_initial_context_setup_request = "00090080d8000006 00000005c0010000 9d00080002000100 42000a183e800000" "603e800000001800 8086000034008080 450009200f807f00 0002000000017127" "4db5d98302074202 49064000f1105ba0 00485221c1010909 08696e7465726e65" "7405012d2d00025e 06fefeeeee030327 2980c22304030000 0480211002000010" "8106080808088306 08080404000d0408 080808000d040808 0404500bf600f110" "0002010000000153 12172c5949640125 006b000518000c00 00004900203311c6" "03c6a6d67f695e5a c02bb75b381b693c 3893a6d932fd9182 3544e3e79b"; char *_emm_information = "000b403b00000300 000005c00100009d 000800020001001a 002524271f9b491e" "030761430f10004e 0065007800740045 0050004347812072 11240563490100"; mongoc_collection_t *collection = NULL; bson_t *doc = NULL; c_int64_t count = 0; bson_error_t error; const char *json = "{" "\"_id\" : { \"$oid\" : \"597223158b8861d7605378c6\" }, " "\"imsi\" : \"001010123456819\", " "\"pdn\" : [" "{" "\"apn\" : \"internet\", " "\"_id\" : { \"$oid\" : \"597223158b8861d7605378c7\" }, " "\"ambr\" : {" "\"uplink\" : { \"$numberLong\" : \"1024000\" }, " "\"downlink\" : { \"$numberLong\" : \"1024000\" } " "}," "\"qos\" : { " "\"qci\" : 9, " "\"arp\" : { " "\"priority_level\" : 8," "\"pre_emption_vulnerability\" : 1, " "\"pre_emption_capability\" : 1" "} " "}, " "\"type\" : 2" "}" "]," "\"ambr\" : { " "\"uplink\" : { \"$numberLong\" : \"1024000\" }, " "\"downlink\" : { \"$numberLong\" : \"1024000\" } " "}," "\"subscribed_rau_tau_timer\" : 12," "\"network_access_mode\" : 2, " "\"subscriber_status\" : 0, " "\"access_restriction_data\" : 32, " "\"security\" : { " "\"k\" : \"465B5CE8 B199B49F AA5F0A2E E238A6BC\", " "\"opc\" : \"E8ED289D EBA952E4 283B54E8 8E6183CA\", " "\"amf\" : \"8000\", " "\"sqn\" : { \"$numberLong\" : \"64\" }, " "\"rand\" : \"20080C38 18183B52 2614162C 07601D0D\" " "}, " "\"__v\" : 0 " "}"; core_sleep(time_from_msec(300)); /* eNB connects to MME */ rv = tests1ap_enb_connect(&sock); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* eNB connects to SGW */ rv = testgtpu_enb_connect(>pu); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Send S1-Setup Reqeust */ rv = tests1ap_build_setup_req( &sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f64); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive S1-Setup Response */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = s1ap_decode_pdu(&message, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); s1ap_free_pdu(&message); pkbuf_free(recvbuf); collection = mongoc_client_get_collection( context_self()->db_client, context_self()->db_name, "subscribers"); ABTS_PTR_NOTNULL(tc, collection); /********** Insert Subscriber in Database */ doc = bson_new_from_json((const uint8_t *)json, -1, &error);; ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_insert(collection, MONGOC_INSERT_NONE, doc, NULL, &error)); bson_destroy(doc); doc = BCON_NEW("imsi", BCON_UTF8("001010123456819")); ABTS_PTR_NOTNULL(tc, doc); do { count = mongoc_collection_count ( collection, MONGOC_QUERY_NONE, doc, 0, 0, NULL, &error); } while (count == 0); bson_destroy(doc); /*********************************************************************** * Attach Request : Known IMSI, Integrity Protected, No Security Context * Send Initial-UE Message + Attach Request + PDN Connectivity */ core_sleep(time_from_msec(300)); mme_self()->mme_ue_s1ap_id = 16777372; rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Authentication Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_TRUE(tc, memcmp(recvbuf->payload, CORE_HEX(_authentication_request, strlen(_authentication_request), tmp), recvbuf->len) == 0); pkbuf_free(recvbuf); /* Send Authentication Response */ rv = tests1ap_build_authentication_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Security mode Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_TRUE(tc, memcmp(recvbuf->payload, CORE_HEX(_security_mode_command, strlen(_security_mode_command), tmp), recvbuf->len) == 0); pkbuf_free(recvbuf); /* Send Security mode Complete */ rv = tests1ap_build_security_mode_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive ESM Information Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_TRUE(tc, memcmp(recvbuf->payload, CORE_HEX(_esm_information_request, strlen(_security_mode_command), tmp), recvbuf->len) == 0); pkbuf_free(recvbuf); /* Send ESM Information Response */ rv = tests1ap_build_esm_information_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Initial Context Setup Request + * Attach Accept + * Activate Default Bearer Context Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* * We cannot check it since SGW S1U ADDR is changed * from configuration file */ #if 0 ABTS_TRUE(tc, memcmp(recvbuf->payload, CORE_HEX(_initial_context_setup_request, strlen(_initial_context_setup_request), tmp), recvbuf->len) == 0); #endif pkbuf_free(recvbuf); /* Send UE Capability Info Indication */ rv = tests1ap_build_ue_capability_info_indication(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Initial Context Setup Response */ rv = tests1ap_build_initial_context_setup_response(&sendbuf, 16777373, 1, 5, 1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Send Attach Complete + Activate default EPS bearer cotext accept */ rv = tests1ap_build_attach_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive EMM information */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); CORE_HEX(_emm_information, strlen(_emm_information), tmp); ABTS_TRUE(tc, memcmp(recvbuf->payload, tmp, 28) == 0); ABTS_TRUE(tc, memcmp(recvbuf->payload+32, tmp+32, 20) == 0); pkbuf_free(recvbuf); #if TEST_INITIAL_CONTEXT_SETUP_FAILURE /* Send Initial Context Setup Failure */ rv = tests1ap_build_initial_context_setup_failure(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); #endif core_sleep(time_from_msec(300)); rv = testgtpu_build_slacc_rs(&sendbuf, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = testgtpu_enb_send(sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = testgtpu_enb_read(gtpu, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send GTP-U ICMP Packet */ rv = testgtpu_build_ping(&sendbuf, "45.45.0.2", "45.45.0.1"); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = testgtpu_enb_send(sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive GTP-U ICMP Packet */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = testgtpu_enb_read(gtpu, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); #if LINUX == 1 rv = testgtpu_build_ping(&sendbuf, "cafe::2", "cafe::1"); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = testgtpu_enb_send(sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive GTP-U ICMP Packet */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = testgtpu_enb_read(gtpu, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); #endif /* Retreive M-TMSI */ enb_ue = enb_ue_find_by_mme_ue_s1ap_id(16777373); d_assert(enb_ue, goto out,); mme_ue = enb_ue->mme_ue; d_assert(mme_ue, goto out,); m_tmsi = mme_ue->guti.m_tmsi; /***************************************************************** * Attach Request : Known GUTI, Integrity Protected, MAC Matched * Send Initial-UE Message + Attach Request + PDN Connectivity */ core_sleep(time_from_msec(300)); rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex+1); /* Update M-TMSI */ m_tmsi = htonl(m_tmsi); memcpy(sendbuf->payload + 36, &m_tmsi, 4); /* Update NAS MAC */ void snow_3g_f9(c_uint8_t* key, c_uint32_t count, c_uint32_t fresh, c_uint32_t dir, c_uint8_t *data, c_uint64_t length, c_uint8_t *out); snow_3g_f9(mme_ue->knas_int, 7, 0, 0, sendbuf->payload + 24, (109 << 3), sendbuf->payload+20); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive ESM Information Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); #if 1 /* IMPLICIT_S1_RELEASE */ /* Send UE Context Release Request */ rv = tests1ap_build_ue_context_release_request(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Error Indicaation */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); #else /* S1_HOLDING_TIMER */ /* Send UE Context Release Request */ rv = tests1ap_build_ue_context_release_request(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive UE Context Release Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send UE Context Release Complete */ rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex+3); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); #endif /* Send ESM Information Response */ rv = tests1ap_build_esm_information_response(&sendbuf, msgindex+1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Initial Context Setup Request + * Attach Accept + * Activate Default Bearer Context Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Attach Complete + * Activate Default EPS Bearer Context Accept */ rv = tests1ap_build_attach_complete(&sendbuf, msgindex+1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive EMM information */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); core_sleep(time_from_msec(300)); /* Send Detach Request */ rv = tests1ap_build_detach_request(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive UE Context Release Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send UE Context Release Complete */ rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /***************************************************************** * Attach Request : Unknown GUTI, Integrity Protected * Send Initial-UE Message + Attach Request + PDN Connectivity */ core_sleep(time_from_msec(300)); rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex+2); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Identity Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /********** Remove Subscriber in Database */ doc = BCON_NEW("imsi", BCON_UTF8("001010123456819")); ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_remove(collection, MONGOC_REMOVE_SINGLE_REMOVE, doc, NULL, &error)) bson_destroy(doc); mongoc_collection_destroy(collection); /* Send Identity Response */ rv = tests1ap_build_identity_response(&sendbuf, msgindex+2); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Attach Reject */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Receive UE Release Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send UE Release Complete */ rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex+2); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* eNB disonncect from MME */ rv = tests1ap_enb_close(sock); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* eNB disonncect from SGW */ rv = testgtpu_enb_close(gtpu); ABTS_INT_EQUAL(tc, CORE_OK, rv); return; out: /********** Remove Subscriber in Database */ doc = BCON_NEW("imsi", BCON_UTF8("001010123456819")); ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_remove(collection, MONGOC_REMOVE_SINGLE_REMOVE, doc, NULL, &error)) bson_destroy(doc); mongoc_collection_destroy(collection); core_sleep(time_from_msec(300)); /* eNB disonncect from MME */ rv = tests1ap_enb_close(sock); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* eNB disonncect from SGW */ rv = testgtpu_enb_close(gtpu); ABTS_INT_EQUAL(tc, CORE_OK, rv); } /************************************************************** * eNB : HOME * UE : IMSI * Protocol Configuration Options in PDN Connectivity Request */ static void attach_test2(abts_case *tc, void *data) { status_t rv; sock_id sock; pkbuf_t *sendbuf; pkbuf_t *recvbuf; s1ap_message_t message; int i; int msgindex = 3; mongoc_collection_t *collection = NULL; c_int64_t count = 0; bson_t *doc = NULL; bson_error_t error; const char *json = "{" "\"_id\" : { \"$oid\" : \"597223158b8861d7605378c6\" }, " "\"imsi\" : \"001010123456826\", " "\"pdn\" : [" "{" "\"apn\" : \"internet\", " "\"_id\" : { \"$oid\" : \"597223158b8861d7605378c7\" }, " "\"ambr\" : {" "\"uplink\" : { \"$numberLong\" : \"1024000\" }, " "\"downlink\" : { \"$numberLong\" : \"1024000\" } " "}," "\"qos\" : { " "\"qci\" : 9, " "\"arp\" : { " "\"priority_level\" : 8," "\"pre_emption_vulnerability\" : 1, " "\"pre_emption_capability\" : 1" "} " "}, " "\"type\" : 2" "}" "]," "\"ambr\" : { " "\"uplink\" : { \"$numberLong\" : \"1024000\" }, " "\"downlink\" : { \"$numberLong\" : \"1024000\" } " "}," "\"subscribed_rau_tau_timer\" : 12," "\"network_access_mode\" : 2, " "\"subscriber_status\" : 0, " "\"access_restriction_data\" : 32, " "\"security\" : { " "\"k\" : \"465B5CE8 B199B49F AA5F0A2E E238A6BC\", " "\"opc\" : \"E8ED289D EBA952E4 283B54E8 8E6183CA\", " "\"amf\" : \"8000\", " "\"sqn\" : { \"$numberLong\" : \"64\" }, " "\"rand\" : \"2AE4FC02 1DD4D1C2 E0A277C2 317C2E67\" " "}, " "\"__v\" : 0 " "}"; const char *json2 = "{" "\"_id\" : { \"$oid\" : \"597223158b8861d7605378c7\" }, " "\"imsi\" : \"001010000000003\", " "\"pdn\" : [" "{" "\"apn\" : \"internet\", " "\"_id\" : { \"$oid\" : \"597223158b8861d7605378c8\" }, " "\"ambr\" : {" "\"uplink\" : { \"$numberLong\" : \"1024000\" }, " "\"downlink\" : { \"$numberLong\" : \"1024000\" } " "}," "\"qos\" : { " "\"qci\" : 9, " "\"arp\" : { " "\"priority_level\" : 8," "\"pre_emption_vulnerability\" : 1, " "\"pre_emption_capability\" : 1" "} " "}, " "\"type\" : 2" "}" "]," "\"ambr\" : { " "\"uplink\" : { \"$numberLong\" : \"1024000\" }, " "\"downlink\" : { \"$numberLong\" : \"1024000\" } " "}," "\"subscribed_rau_tau_timer\" : 12," "\"network_access_mode\" : 2, " "\"subscriber_status\" : 0, " "\"access_restriction_data\" : 32, " "\"security\" : { " "\"k\" : \"00112233 44556677 8899AABB CCDDEEFF\", " "\"opc\" : \"00010203 04050607 08090A0B 0C0D0E0F\", " "\"amf\" : \"9001\", " "\"sqn\" : { \"$numberLong\" : \"96\" }, " "\"rand\" : \"1c92dd6e dcd676e8 7b590ba2 20c1874e\" " "}, " "\"__v\" : 0 " "}"; c_uint8_t tmp[MAX_SDU_LEN]; core_sleep(time_from_msec(300)); /* eNB connects to MME */ rv = tests1ap_enb_connect(&sock); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Send S1-Setup Reqeust */ rv = tests1ap_build_setup_req( &sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x002343d); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive S1-Setup Response */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = s1ap_decode_pdu(&message, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); s1ap_free_pdu(&message); pkbuf_free(recvbuf); collection = mongoc_client_get_collection( context_self()->db_client, context_self()->db_name, "subscribers"); ABTS_PTR_NOTNULL(tc, collection); /********** Insert Subscriber in Database */ doc = bson_new_from_json((const uint8_t *)json, -1, &error);; ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_insert(collection, MONGOC_INSERT_NONE, doc, NULL, &error)); bson_destroy(doc); doc = BCON_NEW("imsi", BCON_UTF8("001010123456826")); ABTS_PTR_NOTNULL(tc, doc); do { count = mongoc_collection_count ( collection, MONGOC_QUERY_NONE, doc, 0, 0, NULL, &error); } while (count == 0); bson_destroy(doc); doc = bson_new_from_json((const uint8_t *)json2, -1, &error);; ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_insert(collection, MONGOC_INSERT_NONE, doc, NULL, &error)); bson_destroy(doc); doc = BCON_NEW("imsi", BCON_UTF8("001010000000003")); ABTS_PTR_NOTNULL(tc, doc); do { count = mongoc_collection_count ( collection, MONGOC_QUERY_NONE, doc, 0, 0, NULL, &error); } while (count == 0); bson_destroy(doc); /***************************************************************** * Attach Request : Known IMSI, Plain NAS message * Send Initial-UE Message + Attach Request + PDN Connectivity */ core_sleep(time_from_msec(300)); mme_self()->mme_ue_s1ap_id = 0; rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Authentication Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Authentication Response */ rv = tests1ap_build_authentication_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Security mode Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Security mode Complete */ rv = tests1ap_build_security_mode_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive ESM Information Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send ESM Information Response */ rv = tests1ap_build_esm_information_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Initial Context Setup Request + * Attach Accept + * Activate Default Bearer Context Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send UE Capability Info Indication */ rv = tests1ap_build_ue_capability_info_indication(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Initial Context Setup Response */ rv = tests1ap_build_initial_context_setup_response(&sendbuf, 1, 31, 5, 1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Send Attach Complete + Activate default EPS bearer cotext accept */ rv = tests1ap_build_attach_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive EMM information */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); core_sleep(time_from_msec(300)); /***************************************************************** * Attach Request : IMSI, Integrity Protected, MAC Matched * Send Initial-UE Message + Attach Request + PDN Connectivity */ core_sleep(time_from_msec(300)); rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex+1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive ESM Information Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send ESM Information Response */ rv = tests1ap_build_esm_information_response(&sendbuf, msgindex+1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Initial Context Setup Request + * Attach Accept + * Activate Default Bearer Context Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Attach Complete + * Activate Default EPS Bearer Context Accept */ rv = tests1ap_build_attach_complete(&sendbuf, msgindex+1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive EMM information */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /***************************************************************** * Attach Request : Unknown IMSI, Integrity Protected * Send Initial-UE Message + Attach Request + PDN Connectivity */ core_sleep(time_from_msec(300)); rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex+2); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Authentication Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Authentication Authentication Failure */ rv = tests1ap_build_authentication_failure(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Authentication Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Authentication Authentication Failure */ rv = tests1ap_build_authentication_failure(&sendbuf, msgindex+1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Authentication Reject */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Receive UE Context Release Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send UE Context Release Complete */ rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex+2); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); doc = BCON_NEW("imsi", BCON_UTF8("001010123456826")); ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_remove(collection, MONGOC_REMOVE_SINGLE_REMOVE, doc, NULL, &error)) bson_destroy(doc); doc = BCON_NEW("imsi", BCON_UTF8("001010000000003")); ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_remove(collection, MONGOC_REMOVE_SINGLE_REMOVE, doc, NULL, &error)) bson_destroy(doc); mongoc_collection_destroy(collection); /* eNB disonncect from MME */ rv = tests1ap_enb_close(sock); ABTS_INT_EQUAL(tc, CORE_OK, rv); } /************************************************************** * Attach -> Release -> Service Request -> TAU Request */ static void attach_test3(abts_case *tc, void *data) { status_t rv; sock_id sock; pkbuf_t *sendbuf; pkbuf_t *recvbuf; s1ap_message_t message; int i; int msgindex = 6; enb_ue_t *enb_ue = NULL; mme_ue_t *mme_ue = NULL; c_uint32_t m_tmsi = 0; c_uint8_t tmp[MAX_SDU_LEN]; char *_authentication_request = "000b" "403b000003000000 05c0020000c80008 00020002001a0025 2407520042200639" "1c0021554d444928 4a1a062e10e543cb 257f1f800021f4f9 2d522a5b87"; char *_security_mode_command = "000b402400000300 000005c0020000c8 000800020002001a 000e0d37a3761a13" "00075d010002f0f0"; char *_esm_information_request = "000b" "4020000003000000 05c0020000c80008 00020002001a000a 09277330e06c0102" "01d9"; char *_initial_context_setup_request = "00090080c8000006 00000005c0020000 c800080002000200 42000a183e800000" "603e800000001800 7700003400724540 0920000000000000 00000f800a0123d8" "000000035b27a23a 27b4020742024906 4000f1102b670032 5201c10509ffffff" "ff0908696e746572 6e657405012d2d2d 035e060000000004 04270f80000d0408" "080808000d040404 0404500bf600f110 0002010000000353 12172c5949640125" "006b00051e000e00 000049002040964d eb63a0afb5d0d374 c1da505f6252d1f9" "05ff9c6791b8503a 032c6effa7"; char *_emm_information = "000b403b00000300 000005c0020000c8 000800020002001a 002524276782702a" "030761430f10004e 0065007800740045 0050004347812072 11941563490100"; char *_ue_context_release_command = "0017" "0013000002006300 070c020000c80002 0002400120"; mongoc_collection_t *collection = NULL; c_int64_t count = 0; bson_t *doc = NULL; bson_error_t error; const char *json = "{" "\"_id\" : { \"$oid\" : \"597223158b8861d7605378c6\" }, " "\"imsi\" : \"001010123456797\", " "\"pdn\" : [" "{" "\"apn\" : \"internet\", " "\"_id\" : { \"$oid\" : \"597223158b8861d7605378c7\" }, " "\"ambr\" : {" "\"uplink\" : { \"$numberLong\" : \"1024000\" }, " "\"downlink\" : { \"$numberLong\" : \"1024000\" } " "}," "\"qos\" : { " "\"qci\" : 9, " "\"arp\" : { " "\"priority_level\" : 8," "\"pre_emption_vulnerability\" : 1, " "\"pre_emption_capability\" : 1" "} " "}, " "\"type\" : 2" "}" "]," "\"ambr\" : { " "\"uplink\" : { \"$numberLong\" : \"1024000\" }, " "\"downlink\" : { \"$numberLong\" : \"1024000\" } " "}," "\"subscribed_rau_tau_timer\" : 12," "\"network_access_mode\" : 2, " "\"subscriber_status\" : 0, " "\"access_restriction_data\" : 32, " "\"security\" : { " "\"k\" : \"465B5CE8 B199B49F AA5F0A2E E238A6BC\", " "\"op\" : \"5F1D289C 5D354D0A 140C2548 F5F3E3BA\", " "\"amf\" : \"8000\", " "\"sqn\" : { \"$numberLong\" : \"64\" }, " "\"rand\" : \"42200639 1c002155 4d444928 4a1a062e\" " "}, " "\"__v\" : 0 " "}"; core_sleep(time_from_msec(300)); /* eNB connects to MME */ rv = tests1ap_enb_connect(&sock); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Send S1-Setup Reqeust */ rv = tests1ap_build_setup_req( &sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f64); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive S1-Setup Response */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = s1ap_decode_pdu(&message, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); s1ap_free_pdu(&message); pkbuf_free(recvbuf); doc = bson_new_from_json((const uint8_t *)json, -1, &error);; ABTS_PTR_NOTNULL(tc, doc); collection = mongoc_client_get_collection( context_self()->db_client, context_self()->db_name, "subscribers"); ABTS_PTR_NOTNULL(tc, collection); /********** Insert Subscriber in Database */ ABTS_TRUE(tc, mongoc_collection_insert(collection, MONGOC_INSERT_NONE, doc, NULL, &error)); bson_destroy(doc); doc = BCON_NEW("imsi", BCON_UTF8("001010123456797")); ABTS_PTR_NOTNULL(tc, doc); do { count = mongoc_collection_count ( collection, MONGOC_QUERY_NONE, doc, 0, 0, NULL, &error); } while (count == 0); bson_destroy(doc); /***************************************************************** * Attach Request : Known IMSI, Plain NAS message * Send Initial-UE Message + Attach Request + PDN Connectivity */ core_sleep(time_from_msec(300)); mme_self()->mme_ue_s1ap_id = 33554631; rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Authentication Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_TRUE(tc, memcmp(recvbuf->payload, CORE_HEX(_authentication_request, strlen(_authentication_request), tmp), recvbuf->len) == 0); pkbuf_free(recvbuf); /* Send Authentication Response */ rv = tests1ap_build_authentication_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Security mode Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_TRUE(tc, memcmp(recvbuf->payload, CORE_HEX(_security_mode_command, strlen(_security_mode_command), tmp), recvbuf->len) == 0); pkbuf_free(recvbuf); /* Send Security mode Complete */ rv = tests1ap_build_security_mode_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive ESM Information Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_TRUE(tc, memcmp(recvbuf->payload, CORE_HEX(_esm_information_request, strlen(_security_mode_command), tmp), recvbuf->len) == 0); pkbuf_free(recvbuf); /* Send ESM Information Response */ rv = tests1ap_build_esm_information_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Initial Context Setup Request + * Attach Accept + * Activate Default Bearer Context Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send UE Capability Info Indication */ rv = tests1ap_build_ue_capability_info_indication(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Initial Context Setup Response */ rv = tests1ap_build_initial_context_setup_response(&sendbuf, 33554632, 2, 5, 1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Send Attach Complete + Activate default EPS bearer cotext accept */ rv = tests1ap_build_attach_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive EMM information */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); CORE_HEX(_emm_information, strlen(_emm_information), tmp); ABTS_TRUE(tc, memcmp(recvbuf->payload, tmp, 28) == 0); ABTS_TRUE(tc, memcmp(recvbuf->payload+32, tmp+32, 20) == 0); pkbuf_free(recvbuf); /* Retreive M-TMSI */ enb_ue = enb_ue_find_by_mme_ue_s1ap_id(33554632); d_assert(enb_ue, goto out,); mme_ue = enb_ue->mme_ue; d_assert(mme_ue, goto out,); m_tmsi = mme_ue->guti.m_tmsi; /* Send UE Context Release Request */ rv = tests1ap_build_ue_context_release_request(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive UE Context Release Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_TRUE(tc, memcmp(recvbuf->payload, CORE_HEX(_ue_context_release_command, strlen(_ue_context_release_command), tmp), recvbuf->len) == 0); pkbuf_free(recvbuf); /* Send UE Context Release Complete */ rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Send Service Request */ core_sleep(time_from_msec(300)); rv = tests1ap_build_service_request(&sendbuf, 0x000400, 4, 0xd4b8, m_tmsi); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Initial Context Setup Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send UE Capability Info Indication */ rv = tests1ap_build_ue_capability_info_indication(&sendbuf, msgindex+1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Initial Context Setup Response */ rv = tests1ap_build_initial_context_setup_response(&sendbuf, 33554633, 4, 5, 1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send TAU Request */ rv = tests1ap_build_tau_request(&sendbuf, 0, 0, 0x003600, 1, m_tmsi, 7, 0xe73ce7c, mme_ue->knas_int); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive TAU Accept */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Initial Context Setup Response */ rv = tests1ap_build_initial_context_setup_response(&sendbuf, 33554634, 54, 5, 1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send TAU Request */ rv = tests1ap_build_tau_request(&sendbuf, 0, 0, 0x002600, 0, m_tmsi, 8, 0x972dc6f8, mme_ue->knas_int); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive TAU Accept */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Receive UE Context Release Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send UE Context Release Complete */ rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex+1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); out: doc = BCON_NEW("imsi", BCON_UTF8("001010123456797")); ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_remove(collection, MONGOC_REMOVE_SINGLE_REMOVE, doc, NULL, &error)) bson_destroy(doc); mongoc_collection_destroy(collection); /* eNB disonncect from MME */ rv = tests1ap_enb_close(sock); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); } /************************************************************** * eNB : MACRO * UE : IMSI * Protocol Configuration Options without default APN */ static void attach_test4(abts_case *tc, void *data) { status_t rv; sock_id sock; sock_id gtpu; pkbuf_t *sendbuf; pkbuf_t *recvbuf; s1ap_message_t message; int i; int msgindex = 8; c_uint8_t tmp[MAX_SDU_LEN]; mongoc_collection_t *collection = NULL; bson_t *doc = NULL; c_int64_t count = 0; bson_error_t error; const char *json = "{" "\"_id\" : { \"$oid\" : \"597223258b8861d7605378c7\" }, " "\"imsi\" : \"001010000000002\", " "\"pdn\" : [" "{" "\"apn\" : \"internet\", " "\"_id\" : { \"$oid\" : \"598223158b8861d7605378c8\" }, " "\"ambr\" : {" "\"uplink\" : { \"$numberLong\" : \"1024000\" }, " "\"downlink\" : { \"$numberLong\" : \"1024000\" } " "}," "\"qos\" : { " "\"qci\" : 9, " "\"arp\" : { " "\"priority_level\" : 8," "\"pre_emption_vulnerability\" : 1, " "\"pre_emption_capability\" : 1" "} " "}, " "\"type\" : 2" "}" "]," "\"ambr\" : { " "\"uplink\" : { \"$numberLong\" : \"1024000\" }, " "\"downlink\" : { \"$numberLong\" : \"1024000\" } " "}," "\"subscribed_rau_tau_timer\" : 12," "\"network_access_mode\" : 2, " "\"subscriber_status\" : 0, " "\"access_restriction_data\" : 32, " "\"security\" : { " "\"k\" : \"00112233 44556677 8899AABB CCDDEEFF\", " "\"opc\" : \"00010203 04050607 08090A0B 0C0D0E0F\", " "\"amf\" : \"9001\", " "\"sqn\" : { \"$numberLong\" : \"96\" }, " "\"rand\" : \"9bdbfb93 16be4d52 80153094 38326671\" " "}, " "\"__v\" : 0 " "}"; core_sleep(time_from_msec(300)); /* eNB connects to MME */ rv = tests1ap_enb_connect(&sock); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* eNB connects to SGW */ rv = testgtpu_enb_connect(>pu); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Send S1-Setup Reqeust */ rv = tests1ap_build_setup_req( &sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f64); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive S1-Setup Response */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = s1ap_decode_pdu(&message, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); s1ap_free_pdu(&message); pkbuf_free(recvbuf); collection = mongoc_client_get_collection( context_self()->db_client, context_self()->db_name, "subscribers"); ABTS_PTR_NOTNULL(tc, collection); /********** Insert Subscriber in Database */ doc = bson_new_from_json((const uint8_t *)json, -1, &error);; ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_insert(collection, MONGOC_INSERT_NONE, doc, NULL, &error)); bson_destroy(doc); doc = BCON_NEW("imsi", BCON_UTF8("001010000000002")); ABTS_PTR_NOTNULL(tc, doc); do { count = mongoc_collection_count ( collection, MONGOC_QUERY_NONE, doc, 0, 0, NULL, &error); } while (count == 0); bson_destroy(doc); /*********************************************************************** * Attach Request : Known IMSI, Integrity Protected, No Security Context * Send Initial-UE Message + Attach Request + PDN Connectivity */ core_sleep(time_from_msec(300)); mme_self()->mme_ue_s1ap_id = 0; rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Authentication Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Authentication Response */ rv = tests1ap_build_authentication_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Security mode Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Security mode Complete */ rv = tests1ap_build_security_mode_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Initial Context Setup Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); #if 0 rv = testgtpu_build_slacc_rs(&sendbuf, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = testgtpu_enb_send(sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = testgtpu_enb_read(gtpu, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); #endif /* Send EMM Status */ rv = tests1ap_build_emm_status(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive UE Context Release Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send UE Context Release Complete */ rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); doc = BCON_NEW("imsi", BCON_UTF8("001010000000002")); ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_remove(collection, MONGOC_REMOVE_SINGLE_REMOVE, doc, NULL, &error)) bson_destroy(doc); mongoc_collection_destroy(collection); /* eNB disonncect from MME */ rv = tests1ap_enb_close(sock); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* eNB disonncect from SGW */ rv = testgtpu_enb_close(gtpu); ABTS_INT_EQUAL(tc, CORE_OK, rv); } static void attach_test5(abts_case *tc, void *data) { status_t rv; sock_id sock; sock_id gtpu; pkbuf_t *sendbuf; pkbuf_t *recvbuf; s1ap_message_t message; int i; int msgindex = 12; enb_ue_t *enb_ue = NULL; mme_ue_t *mme_ue = NULL; c_uint32_t m_tmsi = 0; mongoc_collection_t *collection = NULL; bson_t *doc = NULL; c_int64_t count = 0; bson_error_t error; const char *json = "{" "\"_id\" : { \"$oid\" : \"597223158b8861d7605378c6\" }, " "\"imsi\" : \"001010123456937\", " "\"pdn\" : [" "{" "\"apn\" : \"internet\", " "\"_id\" : { \"$oid\" : \"597223158b8861d7605378c7\" }, " "\"ambr\" : {" "\"uplink\" : { \"$numberLong\" : \"1024000\" }, " "\"downlink\" : { \"$numberLong\" : \"1024000\" } " "}," "\"qos\" : { " "\"qci\" : 9, " "\"arp\" : { " "\"priority_level\" : 8," "\"pre_emption_vulnerability\" : 1, " "\"pre_emption_capability\" : 1" "} " "}, " "\"type\" : 2" "}" "]," "\"ambr\" : { " "\"uplink\" : { \"$numberLong\" : \"1024000\" }, " "\"downlink\" : { \"$numberLong\" : \"1024000\" } " "}," "\"subscribed_rau_tau_timer\" : 12," "\"network_access_mode\" : 2, " "\"subscriber_status\" : 0, " "\"access_restriction_data\" : 32, " "\"security\" : { " "\"k\" : \"465B5CE8 B199B49F AA5F0A2E E238A6BC\", " "\"opc\" : \"E8ED289D EBA952E4 283B54E8 8E6183CA\", " "\"amf\" : \"8000\", " "\"sqn\" : { \"$numberLong\" : \"768\" }, " "\"rand\" : \"2e815f03 cc54b55f 00933008 5cab5ca3\" " "}, " "\"__v\" : 0 " "}"; core_sleep(time_from_msec(300)); /* eNB connects to MME */ rv = tests1ap_enb_connect(&sock); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Send S1-Setup Reqeust */ rv = tests1ap_build_setup_req( &sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x787b0); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive S1-Setup Response */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); collection = mongoc_client_get_collection( context_self()->db_client, context_self()->db_name, "subscribers"); ABTS_PTR_NOTNULL(tc, collection); /********** Insert Subscriber in Database */ doc = bson_new_from_json((const uint8_t *)json, -1, &error);; ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_insert(collection, MONGOC_INSERT_NONE, doc, NULL, &error)); bson_destroy(doc); doc = BCON_NEW("imsi", BCON_UTF8("001010123456937")); ABTS_PTR_NOTNULL(tc, doc); do { count = mongoc_collection_count ( collection, MONGOC_QUERY_NONE, doc, 0, 0, NULL, &error); } while (count == 0); bson_destroy(doc); core_sleep(time_from_msec(300)); /* Send Service request */ mme_self()->mme_ue_s1ap_id = 0; rv = tests1ap_build_service_request(&sendbuf, 0x40072c, 17, 0x9551, 0x12345678); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Service reject */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Receive Initial Context Setup Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send UE Context Release Complete */ rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /*********************************************************************** * Attach Request : Known IMSI, Integrity Protected, No Security Context * Send Initial-UE Message + Attach Request + PDN Connectivity */ rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Authentication Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Authentication Response */ rv = tests1ap_build_authentication_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Security mode Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Security mode Complete */ rv = tests1ap_build_security_mode_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive ESM Information Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send ESM Information Response */ rv = tests1ap_build_esm_information_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Initial Context Setup Request + * Attach Accept + * Activate Default Bearer Context Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send UE Capability Info Indication */ rv = tests1ap_build_ue_capability_info_indication(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Initial Context Setup Response */ rv = tests1ap_build_initial_context_setup_response(&sendbuf, 2, 1837, 5, 0x1000908); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Send Attach Complete + Activate default EPS bearer cotext accept */ rv = tests1ap_build_attach_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive EMM information */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Retreive M-TMSI */ enb_ue = enb_ue_find_by_mme_ue_s1ap_id(2); d_assert(enb_ue, goto out,); mme_ue = enb_ue->mme_ue; d_assert(mme_ue, goto out,); m_tmsi = mme_ue->guti.m_tmsi; #if 0 rv = tests1ap_build_s1_reset(&sendbuf, 0); #elif 0 rv = s1ap_build_s1_reset(&sendbuf, S1AP_Cause_PR_radioNetwork, S1AP_CauseRadioNetwork_release_due_to_eutran_generated_reason, NULL); #elif 0 { S1AP_UE_associatedLogicalS1_ConnectionListRes_t *partOfS1_Interface = NULL; S1AP_UE_associatedLogicalS1_ConnectionItemRes_t *ie = NULL; S1AP_UE_associatedLogicalS1_ConnectionItem_t *item = NULL; partOfS1_Interface = core_calloc(1, sizeof(S1AP_UE_associatedLogicalS1_ConnectionListRes_t)); d_assert(partOfS1_Interface, goto out,); ie = core_calloc(1, sizeof(S1AP_UE_associatedLogicalS1_ConnectionItemRes_t)); ASN_SEQUENCE_ADD(&partOfS1_Interface->list, ie); ie->id = S1AP_ProtocolIE_ID_id_UE_associatedLogicalS1_ConnectionItem; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_UE_associatedLogicalS1_ConnectionItemRes__value_PR_UE_associatedLogicalS1_ConnectionItem; item = &ie->value.choice.UE_associatedLogicalS1_ConnectionItem; item->mME_UE_S1AP_ID = core_calloc(1, sizeof(S1AP_MME_UE_S1AP_ID_t)); d_assert(item->mME_UE_S1AP_ID, goto out,); *item->mME_UE_S1AP_ID = 100; item->eNB_UE_S1AP_ID = core_calloc(1, sizeof(S1AP_ENB_UE_S1AP_ID_t)); d_assert(item->eNB_UE_S1AP_ID, goto out,); *item->eNB_UE_S1AP_ID = 4; ie = core_calloc(1, sizeof(S1AP_UE_associatedLogicalS1_ConnectionItemRes_t)); ASN_SEQUENCE_ADD(&partOfS1_Interface->list, ie); ie->id = S1AP_ProtocolIE_ID_id_UE_associatedLogicalS1_ConnectionItem; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_UE_associatedLogicalS1_ConnectionItemRes__value_PR_UE_associatedLogicalS1_ConnectionItem; item = &ie->value.choice.UE_associatedLogicalS1_ConnectionItem; item->mME_UE_S1AP_ID = core_calloc(1, sizeof(S1AP_MME_UE_S1AP_ID_t)); d_assert(item->mME_UE_S1AP_ID, goto out,); *item->mME_UE_S1AP_ID = 2; item->eNB_UE_S1AP_ID = core_calloc(1, sizeof(S1AP_ENB_UE_S1AP_ID_t)); d_assert(item->eNB_UE_S1AP_ID, goto out,); *item->eNB_UE_S1AP_ID = 3; ie = core_calloc(1, sizeof(S1AP_UE_associatedLogicalS1_ConnectionItemRes_t)); ASN_SEQUENCE_ADD(&partOfS1_Interface->list, ie); ie->id = S1AP_ProtocolIE_ID_id_UE_associatedLogicalS1_ConnectionItem; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_UE_associatedLogicalS1_ConnectionItemRes__value_PR_UE_associatedLogicalS1_ConnectionItem; item = &ie->value.choice.UE_associatedLogicalS1_ConnectionItem; item->mME_UE_S1AP_ID = core_calloc(1, sizeof(S1AP_MME_UE_S1AP_ID_t)); d_assert(item->mME_UE_S1AP_ID, goto out,); *item->mME_UE_S1AP_ID = 44; rv = s1ap_build_s1_reset(&sendbuf, S1AP_Cause_PR_radioNetwork, S1AP_CauseRadioNetwork_release_due_to_eutran_generated_reason, partOfS1_Interface); } #else { S1AP_MME_UE_S1AP_ID_t *mme_ue_s1ap_id = NULL; mme_ue_s1ap_id = core_calloc(1, sizeof(S1AP_MME_UE_S1AP_ID_t)); d_assert(mme_ue_s1ap_id, goto out,); *mme_ue_s1ap_id = 2; rv = s1ap_build_s1_reset_partial(&sendbuf, S1AP_Cause_PR_radioNetwork, S1AP_CauseRadioNetwork_release_due_to_eutran_generated_reason, mme_ue_s1ap_id, NULL); } #endif ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive S1 Reset Acknowledge */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Service request */ rv = tests1ap_build_service_request(&sendbuf, 0x40072e, 4, 0xda67, m_tmsi); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Service Reject */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Receive UE Context Release Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send UE Context Release Complete */ rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex+1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); out: /********** Remove Subscriber in Database */ doc = BCON_NEW("imsi", BCON_UTF8("001010123456937")); ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_remove(collection, MONGOC_REMOVE_SINGLE_REMOVE, doc, NULL, &error)) bson_destroy(doc); mongoc_collection_destroy(collection); /* eNB disonncect from MME */ rv = tests1ap_enb_close(sock); ABTS_INT_EQUAL(tc, CORE_OK, rv); } abts_suite *test_attach(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, attach_test1, NULL); abts_run_test(suite, attach_test2, NULL); abts_run_test(suite, attach_test3, NULL); abts_run_test(suite, attach_test4, NULL); abts_run_test(suite, attach_test5, NULL); return suite; } nextepc-0.3.10/test/basic/gtp_message_test.c000066400000000000000000000300531333553357400210160ustar00rootroot00000000000000#include "core_pkbuf.h" #include "core_lib.h" #include "core_debug.h" #include "core_network.h" #include "3gpp_types.h" #include "gtp/gtp_types.h" #include "gtp/gtp_message.h" #include "testutil.h" static void gtp_message_test1(abts_case *tc, void *data) { status_t rv; /* Create Session Request */ char *_payload = "0100080055153011 340010f44c000600 9471527600414b00 0800536120009178" "840056000d001855 f501102255f50100 019d015300030055 f501520001000657" "0009008a80000084 0a32360a57000901 87000000000a3236 254700220005766f" "6c7465036e673204 6d6e6574066d6e63 303130066d636335 3535046770727380" "000100fc63000100 014f000500010000 00007f0001000048 000800000003e800" "0007d04e001a0080 8021100100001081 0600000000830600 000000000d00000a" "005d001f00490001 0005500016004505 0000000000000000 0000000000000000" "0000000072000200 40005f0002005400"; char *_value = NULL; char hexbuf[MAX_SDU_LEN]; gtp_create_session_request_t req; gtp_uli_t uli; char ulibuf[GTP_MAX_ULI_LEN]; plmn_id_t serving_network; char apnbuf[34]; gtp_f_teid_t s11, s5; paa_t paa; gtp_ambr_t ambr; pco_t pco; char pcobuf[MAX_PCO_LEN]; gtp_bearer_qos_t bearer_qos; char bearer_qos_buf[GTP_BEARER_QOS_LEN]; gtp_ue_timezone_t ue_timezone; c_int16_t size = 0; pkbuf_t *pkbuf = NULL; c_sockaddr_t sa; memset(&req, 0, sizeof(gtp_create_session_request_t)); req.imsi.presence = 1; req.imsi.data = (c_uint8_t *)"\x55\x15\x30\x11\x34\x00\x10\xf4"; req.imsi.len = 8; req.msisdn.presence = 1; req.msisdn.data = (c_uint8_t *)"\x94\x71\x52\x76\x00\x41"; req.msisdn.len = 6; req.me_identity.presence = 1; req.me_identity.data = (c_uint8_t *)"\x53\x61\x20\x00\x91\x78\x84\x00"; req.me_identity.len = 8; memset(&uli, 0, sizeof(gtp_uli_t)); uli.flags.e_cgi = 1; uli.flags.tai = 1; plmn_id_build(&uli.tai.plmn_id, 555, 10, 2); uli.tai.tac = 4130; plmn_id_build(&uli.e_cgi.plmn_id, 555, 10, 2); uli.e_cgi.cell_id = 105729; req.user_location_information.presence = 1; size = gtp_build_uli(&req.user_location_information, &uli, ulibuf, GTP_MAX_ULI_LEN); ABTS_INT_EQUAL(tc, 13, req.user_location_information.len); req.serving_network.presence = 1; req.serving_network.data = plmn_id_build(&serving_network, 555, 10, 2); req.serving_network.len = sizeof(serving_network); req.rat_type.presence = 1; req.rat_type.u8 = GTP_RAT_TYPE_EUTRAN; memset(&s11, 0, sizeof(gtp_f_teid_t)); s11.ipv4 = 1; s11.interface_type = GTP_F_TEID_S11_MME_GTP_C; s11.teid = htonl(0x80000084); core_inet_pton(AF_INET, "10.50.54.10", &sa); s11.addr = sa.sin.sin_addr.s_addr; req.sender_f_teid_for_control_plane.presence = 1; req.sender_f_teid_for_control_plane.data = &s11; req.sender_f_teid_for_control_plane.len = GTP_F_TEID_IPV4_LEN; memset(&s5, 0, sizeof(gtp_f_teid_t)); s5.ipv4 = 1; s5.interface_type = GTP_F_TEID_S5_S8_PGW_GTP_C; core_inet_pton(AF_INET, "10.50.54.37", &sa); s5.addr = sa.sin.sin_addr.s_addr; req.pgw_s5_s8_address_for_control_plane_or_pmip.presence = 1; req.pgw_s5_s8_address_for_control_plane_or_pmip.data = &s5; req.pgw_s5_s8_address_for_control_plane_or_pmip.len = GTP_F_TEID_IPV4_LEN; _value = "05766f6c7465036e 6732046d6e657406 6d6e63303130066d 6363353535046770 7273"; req.access_point_name.presence = 1; req.access_point_name.data = CORE_HEX(_value, strlen(_value), apnbuf); req.access_point_name.len = sizeof(apnbuf); req.selection_mode.presence = 1; req.selection_mode.u8 = GTP_SELECTION_MODE_MS_OR_NETWORK_PROVIDED_APN | 0xfc; req.pdn_type.presence = 1; req.pdn_type.u8 = GTP_PDN_TYPE_IPV4; memset(&paa, 0, sizeof(paa_t)); paa.pdn_type = GTP_PDN_TYPE_IPV4; req.pdn_address_allocation.presence = 1; req.pdn_address_allocation.data = &paa; req.pdn_address_allocation.len = PAA_IPV4_LEN; req.maximum_apn_restriction.presence = 1; req.maximum_apn_restriction.u8 = GTP_APN_NO_RESTRICTION; memset(&ambr, 0, sizeof(gtp_ambr_t)); ambr.uplink = htonl(1000); ambr.downlink = htonl(2000); req.aggregate_maximum_bit_rate.presence = 1; req.aggregate_maximum_bit_rate.data = &ambr; req.aggregate_maximum_bit_rate.len = sizeof(ambr); memset(&pco, 0, sizeof(pco_t)); pco.ext = 1; pco.configuration_protocol = PCO_PPP_FOR_USE_WITH_IP_PDP_TYPE_OR_IP_PDN_TYPE; pco.num_of_id = 3; pco.ids[0].id = PCO_ID_INTERNET_PROTOCOL_CONTROL_PROTOCOL; pco.ids[0].data = (c_uint8_t *)"\x01\x00\x00\x10\x81\x06\x00\x00\x00\x00\x83\x06\x00\x00\x00\x00"; pco.ids[0].len = 16; pco.ids[1].id = PCO_ID_DNS_SERVER_IPV4_ADDRESS_REQUEST; pco.ids[1].len = 0; pco.ids[2].id = PCO_ID_IP_ADDRESS_ALLOCATION_VIA_NAS_SIGNALLING; pco.ids[2].len = 0; req.protocol_configuration_options.presence = 1; req.protocol_configuration_options.data = &pcobuf; req.protocol_configuration_options.len = pco_build(pcobuf, MAX_PCO_LEN, &pco); req.bearer_contexts_to_be_created.presence = 1; req.bearer_contexts_to_be_created.eps_bearer_id.presence = 1; req.bearer_contexts_to_be_created.eps_bearer_id.u8 = 5; memset(&bearer_qos, 0, sizeof(bearer_qos)); bearer_qos.pre_emption_vulnerability = 1; bearer_qos.priority_level = 1; bearer_qos.pre_emption_capability = 1; bearer_qos.qci = 5; req.bearer_contexts_to_be_created.bearer_level_qos.presence = 1; size = gtp_build_bearer_qos( &req.bearer_contexts_to_be_created.bearer_level_qos, &bearer_qos, bearer_qos_buf, GTP_BEARER_QOS_LEN); memset(&ue_timezone, 0, sizeof(ue_timezone)); ue_timezone.gmtoff = 0x40; ue_timezone.daylight_saving_time = GTP_UE_TIME_ZONE_NO_ADJUSTMENT_FOR_DAYLIGHT_SAVING_TIME; req.ue_time_zone.presence = 1; req.ue_time_zone.data = &ue_timezone; req.ue_time_zone.len = sizeof(ue_timezone); req.charging_characteristics.presence = 1; req.charging_characteristics.data = (c_uint8_t *)"\x54\x00"; req.charging_characteristics.len = 2; rv = tlv_build_msg(&pkbuf, &tlv_desc_create_session_request, &req, TLV_MODE_T1_L2_I1); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_TRUE(tc, memcmp(pkbuf->payload, CORE_HEX(_payload, strlen(_payload), hexbuf), pkbuf->len) == 0); memset(&req, 0, sizeof(req)); rv = tlv_parse_msg(&req, &tlv_desc_create_session_request, pkbuf, TLV_MODE_T1_L2_I1); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(pkbuf); ABTS_INT_EQUAL(tc, 1, req.imsi.presence); ABTS_INT_EQUAL(tc, 8, req.imsi.len); _value = "55153011 340010f4"; ABTS_TRUE(tc, memcmp(CORE_HEX(_value, strlen(_value), hexbuf), req.imsi.data, req.imsi.len) == 0); ABTS_INT_EQUAL(tc, 1, req.msisdn.presence); ABTS_INT_EQUAL(tc, 6, req.msisdn.len); _value = "94715276 0041"; ABTS_TRUE(tc, memcmp(CORE_HEX(_value, strlen(_value), hexbuf), req.msisdn.data, req.msisdn.len) == 0); ABTS_INT_EQUAL(tc, 1, req.me_identity.presence); ABTS_INT_EQUAL(tc, 8, req.me_identity.len); _value = "53612000 91788400"; ABTS_TRUE(tc, memcmp(CORE_HEX(_value, strlen(_value), hexbuf), req.me_identity.data, req.me_identity.len) == 0); ABTS_INT_EQUAL(tc, 1, req.user_location_information.presence); size = gtp_parse_uli(&uli, &req.user_location_information); ABTS_INT_EQUAL(tc, 13, size); ABTS_INT_EQUAL(tc, 0, uli.flags.lai); ABTS_INT_EQUAL(tc, 1, uli.flags.e_cgi); ABTS_INT_EQUAL(tc, 105729, uli.e_cgi.cell_id); ABTS_INT_EQUAL(tc, 1, uli.flags.tai); ABTS_INT_EQUAL(tc, 4130, uli.tai.tac); ABTS_INT_EQUAL(tc, 0, uli.flags.rai); ABTS_INT_EQUAL(tc, 0, uli.flags.sai); ABTS_INT_EQUAL(tc, 0, uli.flags.cgi); ABTS_INT_EQUAL(tc, 1, req.serving_network.presence); ABTS_INT_EQUAL(tc, 1, req.rat_type.presence); ABTS_INT_EQUAL(tc, 0, req.indication_flags.presence); ABTS_INT_EQUAL(tc, 1, req.sender_f_teid_for_control_plane.presence); ABTS_INT_EQUAL(tc, 1, req.pgw_s5_s8_address_for_control_plane_or_pmip. presence); ABTS_INT_EQUAL(tc, 1, req.access_point_name.presence); ABTS_INT_EQUAL(tc, 1, req.selection_mode.presence); ABTS_INT_EQUAL(tc, 1, req.pdn_type.presence); ABTS_INT_EQUAL(tc, 1, req.pdn_address_allocation.presence); ABTS_INT_EQUAL(tc, 1, req.maximum_apn_restriction.presence); ABTS_INT_EQUAL(tc, 1, req.aggregate_maximum_bit_rate.presence); ABTS_INT_EQUAL(tc, 0, req.linked_eps_bearer_id.presence); ABTS_INT_EQUAL(tc, 0, req.trusted_wlan_mode_indication.presence); ABTS_INT_EQUAL(tc, 1, req.protocol_configuration_options.presence); size = pco_parse(&pco, req.protocol_configuration_options.data, req.protocol_configuration_options.len); ABTS_INT_EQUAL(tc, 26, size); ABTS_INT_EQUAL(tc, 1, pco.ext); ABTS_INT_EQUAL(tc, 0, pco.configuration_protocol); ABTS_INT_EQUAL(tc, 3, pco.num_of_id); ABTS_INT_EQUAL(tc, PCO_ID_INTERNET_PROTOCOL_CONTROL_PROTOCOL, pco.ids[0].id); ABTS_INT_EQUAL(tc, 16, pco.ids[0].len); ABTS_TRUE(tc, memcmp( "\x01\x00\x00\x10\x81\x06\x00\x00\x00\x00\x83\x06\x00\x00\x00\x00", pco.ids[0].data, pco.ids[0].len) == 0); ABTS_INT_EQUAL(tc, PCO_ID_DNS_SERVER_IPV4_ADDRESS_REQUEST, pco.ids[1].id); ABTS_INT_EQUAL(tc, 0, pco.ids[1].len); ABTS_INT_EQUAL(tc, PCO_ID_IP_ADDRESS_ALLOCATION_VIA_NAS_SIGNALLING, pco.ids[2].id); ABTS_INT_EQUAL(tc, 0, pco.ids[2].len); ABTS_INT_EQUAL(tc, 1, req.bearer_contexts_to_be_created.presence); ABTS_INT_EQUAL(tc, 1, req. bearer_contexts_to_be_created.eps_bearer_id.presence); ABTS_INT_EQUAL(tc, 0x05, req.bearer_contexts_to_be_created.eps_bearer_id.u8); ABTS_INT_EQUAL(tc, 0, req. bearer_contexts_to_be_created.tft.presence); ABTS_INT_EQUAL(tc, 0, req. bearer_contexts_to_be_created.s1_u_enodeb_f_teid.presence); ABTS_INT_EQUAL(tc, 0, req. bearer_contexts_to_be_created.s2b_u_epdg_f_teid_5.presence); ABTS_INT_EQUAL(tc, 0, req. bearer_contexts_to_be_created.s2a_u_twan_f_teid_6.presence); ABTS_INT_EQUAL(tc, 1, req. bearer_contexts_to_be_created.bearer_level_qos.presence); ABTS_INT_EQUAL(tc, 22, req.bearer_contexts_to_be_created.bearer_level_qos.len); size = gtp_parse_bearer_qos(&bearer_qos, &req.bearer_contexts_to_be_created.bearer_level_qos); ABTS_INT_EQUAL(tc, 22, size); ABTS_INT_EQUAL(tc, 1, bearer_qos.pre_emption_vulnerability); ABTS_INT_EQUAL(tc, 1, bearer_qos.priority_level); ABTS_INT_EQUAL(tc, 1, bearer_qos.pre_emption_capability); ABTS_INT_EQUAL(tc, 5, bearer_qos.qci); ABTS_INT_EQUAL(tc, 0, req. bearer_contexts_to_be_created.s11_u_mme_f_teid.presence); ABTS_INT_EQUAL(tc, 0, req. bearer_contexts_to_be_created.cause.presence); ABTS_INT_EQUAL(tc, 0, req. bearer_contexts_to_be_created.transaction_identifier.presence); ABTS_INT_EQUAL(tc, 0, req. bearer_contexts_to_be_created.packet_flow_id.presence); ABTS_INT_EQUAL(tc, 0, req.bearer_contexts_to_be_removed.presence); ABTS_INT_EQUAL(tc, 0, req.recovery.presence); ABTS_INT_EQUAL(tc, 0, req.mme_fq_csid.presence); ABTS_INT_EQUAL(tc, 0, req.sgw_fq_csid.presence); ABTS_INT_EQUAL(tc, 0, req.epdg_fq_csid.presence); ABTS_INT_EQUAL(tc, 0, req.twan_fq_csid.presence); ABTS_INT_EQUAL(tc, 1, req.ue_time_zone.presence); ABTS_INT_EQUAL(tc, 0, req.user_csg_information.presence); ABTS_INT_EQUAL(tc, 1, req.charging_characteristics.presence); ABTS_INT_EQUAL(tc, 0, req.mme_s4_sgsn_ldn.presence); ABTS_INT_EQUAL(tc, 0, req.sgw_ldn.presence); ABTS_INT_EQUAL(tc, 0, req.epdg_ldn.presence); ABTS_INT_EQUAL(tc, 0, req.mo_exception_data_counter.presence); ABTS_INT_EQUAL(tc, 0, req.ue_tcp_port.presence); } abts_suite *test_gtp_message(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, gtp_message_test1, NULL); return suite; } nextepc-0.3.10/test/basic/handover_test.c000066400000000000000000000732311333553357400203330ustar00rootroot00000000000000 #include "core_debug.h" #include "core_pkbuf.h" #include "core_lib.h" #include #include "common/context.h" #include "mme/mme_context.h" #include "s1ap/s1ap_message.h" #include "testutil.h" #include "testpacket.h" static void handover_test1(abts_case *tc, void *data) { status_t rv; sock_id sock1, sock2; sock_id gtpu1, gtpu2; pkbuf_t *sendbuf; pkbuf_t *recvbuf; s1ap_message_t message; int i; int msgindex = 9; c_uint8_t tmp[MAX_SDU_LEN]; char *_nh1 = "10" "3715a966536b75b4 d46e99774dcdb344 5ce5e893fbbf28f4 9f58508c36f827cc"; char *_nh2 = "18" "a29ed36339514717 481992f77f47a9af 934a7b763afcec39 edf5071461db6ae8"; mongoc_collection_t *collection = NULL; bson_t *doc = NULL; c_int64_t count = 0; bson_error_t error; const char *json = "{" "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2b\" }," "\"imsi\" : \"001010123456801\"," "\"pdn\" : [" "{ \"apn\" : \"internet.ng2.mnet\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd32\" }," "\"qos\" : {" "\"qci\" : 9," "\"arp\" : {" "\"priority_level\" : 8," "\"pre_emption_vulnerability\" : 1," "\"pre_emption_capability\" : 1 } }," "\"type\" : 2 }," "{ \"apn\" : \"internet\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2c\" }," "\"pcc_rule\" : [" "{ \"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2d\" }," "\"qos\" : {" "\"qci\" : 1," "\"gbr\" : {" "\"downlink\" : { \"$numberLong\" : \"64\" }," "\"uplink\" : { \"$numberLong\" : \"44\" } }," "\"mbr\" : {" "\"downlink\" : { \"$numberLong\" : \"64\" }," "\"uplink\" : { \"$numberLong\" : \"44\" } }," "\"arp\" : {" "\"priority_level\" : 3," "\"pre_emption_vulnerability\" : 0," "\"pre_emption_capability\" : 0 } }," "\"flow\" : [" "{ \"direction\" : 2," "\"description\" : \"permit out udp from any 1-65535 to 10.200.136.98/32 23454\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd31\" } }," "{ \"direction\" : 1," "\"description\" : \"permit out udp from any 50020 to 10.200.136.98/32 1-65535\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd30\" } }," "{ \"direction\" : 2," "\"description\" : \"permit out udp from any 1-65535 to 10.200.136.98/32 23455\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2f\" } }," "{ \"direction\" : 1," "\"description\" : \"permit out udp from any 50021 to 10.200.136.98/32 1-65535\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2e\" } } ]" "} ]," "\"ambr\" : {" "\"downlink\" : { \"$numberLong\" : \"35840\" }," "\"uplink\" : { \"$numberLong\" : \"15360\" } }," "\"qos\" : {" "\"qci\" : 7," "\"arp\" : {" "\"priority_level\" : 1," "\"pre_emption_vulnerability\" : 0," "\"pre_emption_capability\" : 1 } }," "\"type\" : 2 }" "]," "\"ambr\" : {" "\"downlink\" : { \"$numberLong\" : \"1024000\" }," "\"uplink\" : { \"$numberLong\" : \"1024000\" } }," "\"subscribed_rau_tau_timer\" : 12," "\"network_access_mode\" : 2," "\"subscriber_status\" : 0," "\"access_restriction_data\" : 32," "\"security\" : {" "\"k\" : \"465B5CE8 B199B49F AA5F0A2E E238A6BC\"," "\"op\" : \"5F1D289C 5D354D0A 140C2548 F5F3E3BA\"," "\"amf\" : \"8000\"," "\"sqn\" : { \"$numberLong\" : \"32\" }, " "\"rand\" : \"0a303a1e 63603f61 404c1241 30320f39\" }, " "\"__v\" : 0" "}"; mme_self()->mme_ue_s1ap_id = 16777689; /* Two eNB connects to MME */ rv = tests1ap_enb_connect(&sock1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_connect(&sock2); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* eNB connects to SGW */ rv = testgtpu_enb_connect(>pu1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = testgtpu_enb2_connect(>pu2); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* S1-Setup Reqeust/Response for Source eNB */ rv = tests1ap_build_setup_req( &sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f64); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* S1-Setup Reqeust/Response for Target eNB */ rv = tests1ap_build_setup_req( &sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f65); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock2, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock2, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); collection = mongoc_client_get_collection( context_self()->db_client, context_self()->db_name, "subscribers"); ABTS_PTR_NOTNULL(tc, collection); doc = bson_new_from_json((const uint8_t *)json, -1, &error);; ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_insert(collection, MONGOC_INSERT_NONE, doc, NULL, &error)); bson_destroy(doc); doc = BCON_NEW("imsi", BCON_UTF8("001010123456801")); ABTS_PTR_NOTNULL(tc, doc); do { count = mongoc_collection_count ( collection, MONGOC_QUERY_NONE, doc, 0, 0, NULL, &error); } while (count == 0); bson_destroy(doc); /*********************************************************************** * Attach Request : Known IMSI, Integrity Protected, No Security Context * Send Initial-UE Message + Attach Request + PDN Connectivity */ rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Authentication Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Authentication Response */ rv = tests1ap_build_authentication_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Security mode Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Security mode Complete */ rv = tests1ap_build_security_mode_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive ESM Information Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send ESM Information Response */ rv = tests1ap_build_esm_information_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Initial Context Setup Request + * Attach Accept + * Activate Default Bearer Context Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send UE Capability Info Indication */ rv = tests1ap_build_ue_capability_info_indication(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Initial Context Setup Response */ rv = tests1ap_build_initial_context_setup_response(&sendbuf, 16777690, 1, 5, 1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Send Attach Complete + Activate default EPS bearer cotext accept */ rv = tests1ap_build_attach_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive EMM information */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Receive E-RAB Setup Request + * Activate dedicated EPS bearer context request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send E-RAB Setup Response */ rv = tests1ap_build_e_rab_setup_response(&sendbuf, 33554492, 1, 6, 2); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Activate dedicated EPS bearer context accept */ rv = tests1ap_build_activate_dedicated_bearer_accept(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Path Switch Request */ rv = tests1ap_build_path_switch_request(&sendbuf, 1, 16777690, 1, 2, 5, 1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock2, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Path Switch Ack */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock2, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_TRUE(tc, memcmp(recvbuf->payload + 26, CORE_HEX(_nh1, strlen(_nh1), tmp), 33) == 0); pkbuf_free(recvbuf); /* Receive End Mark */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = testgtpu_enb_read(gtpu1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Receive End Mark */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = testgtpu_enb_read(gtpu1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Path Switch Request */ rv = tests1ap_build_path_switch_request(&sendbuf, 0, 16777690, 2, 2, 5, 1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive End Mark */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = testgtpu_enb_read(gtpu2, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Receive End Mark */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = testgtpu_enb_read(gtpu2, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Receive Path Switch Ack */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_TRUE(tc, memcmp(recvbuf->payload + 26, CORE_HEX(_nh2, strlen(_nh2), tmp), 33) == 0); pkbuf_free(recvbuf); /********** Remove Subscriber in Database */ doc = BCON_NEW("imsi", BCON_UTF8("001010123456801")); ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_remove(collection, MONGOC_REMOVE_SINGLE_REMOVE, doc, NULL, &error)) bson_destroy(doc); mongoc_collection_destroy(collection); /* Two eNB disonncect from MME */ rv = tests1ap_enb_close(sock1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_close(sock2); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* eNB disonncect from SGW */ rv = testgtpu_enb_close(gtpu1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = testgtpu_enb_close(gtpu2); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); } static void handover_test2(abts_case *tc, void *data) { status_t rv; sock_id sock1, sock2; sock_id gtpu1, gtpu2; pkbuf_t *sendbuf; pkbuf_t *recvbuf; s1ap_message_t message; int i; int msgindex = 10; enb_ue_t *enb_ue = NULL; mme_ue_t *mme_ue = NULL; c_uint32_t m_tmsi = 0; mongoc_collection_t *collection = NULL; bson_t *doc = NULL; c_int64_t count = 0; bson_error_t error; const char *json = "{" "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2b\" }," "\"imsi\" : \"001010123456815\"," "\"pdn\" : [" "{ \"apn\" : \"internet.ng2.mnet\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd32\" }," "\"qos\" : {" "\"qci\" : 9," "\"arp\" : {" "\"priority_level\" : 8," "\"pre_emption_vulnerability\" : 1," "\"pre_emption_capability\" : 1 } }," "\"type\" : 2 }," "{ \"apn\" : \"internet\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2c\" }," "\"pcc_rule\" : [" "{ \"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2d\" }," "\"qos\" : {" "\"qci\" : 1," "\"gbr\" : {" "\"downlink\" : { \"$numberLong\" : \"976\" }," "\"uplink\" : { \"$numberLong\" : \"976\" } }," "\"mbr\" : {" "\"downlink\" : { \"$numberLong\" : \"976\" }," "\"uplink\" : { \"$numberLong\" : \"976\" } }," "\"arp\" : {" "\"priority_level\" : 1," "\"pre_emption_vulnerability\" : 0," "\"pre_emption_capability\" : 0 } }," "\"flow\" : [" "{ \"direction\" : 2," "\"description\" : \"permit out udp from any 1-65535 to 10.200.136.98/32 23454\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd31\" } }," "{ \"direction\" : 1," "\"description\" : \"permit out udp from any 50020 to 10.200.136.98/32 1-65535\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd30\" } }," "{ \"direction\" : 2," "\"description\" : \"permit out udp from any 1-65535 to 10.200.136.98/32 23455\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2f\" } }," "{ \"direction\" : 1," "\"description\" : \"permit out udp from any 50021 to 10.200.136.98/32 1-65535\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2e\" } } ]" "} ]," "\"ambr\" : {" "\"downlink\" : { \"$numberLong\" : \"35840\" }," "\"uplink\" : { \"$numberLong\" : \"15360\" } }," "\"qos\" : {" "\"qci\" : 7," "\"arp\" : {" "\"priority_level\" : 1," "\"pre_emption_vulnerability\" : 1," "\"pre_emption_capability\" : 0 } }," "\"type\" : 2 }" "]," "\"ambr\" : {" "\"downlink\" : { \"$numberLong\" : \"202400\" }," "\"uplink\" : { \"$numberLong\" : \"202400\" } }," "\"subscribed_rau_tau_timer\" : 12," "\"network_access_mode\" : 2," "\"subscriber_status\" : 0," "\"access_restriction_data\" : 32," "\"security\" : {" "\"k\" : \"465B5CE8 B199B49F AA5F0A2E E238A6BC\"," "\"op\" : \"5F1D289C 5D354D0A 140C2548 F5F3E3BA\"," "\"amf\" : \"8000\"," "\"sqn\" : { \"$numberLong\" : \"161\" }, " "\"rand\" : \"160b4726 39115e14 075f4731 50355216\" }, " "\"__v\" : 0" "}"; mme_self()->mme_ue_s1ap_id = 33554627; /* Two eNB connects to MME */ rv = tests1ap_enb_connect(&sock1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_connect(&sock2); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* eNB connects to SGW */ rv = testgtpu_enb_connect(>pu1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = testgtpu_enb2_connect(>pu2); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* S1-Setup Reqeust/Response for Source eNB */ rv = tests1ap_build_setup_req( &sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x001f2); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* S1-Setup Reqeust/Response for Target eNB */ rv = tests1ap_build_setup_req( &sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x00043); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock2, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock2, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); collection = mongoc_client_get_collection( context_self()->db_client, context_self()->db_name, "subscribers"); ABTS_PTR_NOTNULL(tc, collection); doc = bson_new_from_json((const uint8_t *)json, -1, &error);; ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_insert(collection, MONGOC_INSERT_NONE, doc, NULL, &error)); bson_destroy(doc); doc = BCON_NEW("imsi", BCON_UTF8("001010123456815")); ABTS_PTR_NOTNULL(tc, doc); do { count = mongoc_collection_count ( collection, MONGOC_QUERY_NONE, doc, 0, 0, NULL, &error); } while (count == 0); bson_destroy(doc); /*********************************************************************** * Attach Request : Known IMSI, No Security Context * Send Initial-UE Message + Attach Request + PDN Connectivity */ rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Identity Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Identity Response */ rv = tests1ap_build_identity_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Authentication Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Authentication Response */ rv = tests1ap_build_authentication_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Security mode Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Security mode Complete */ rv = tests1ap_build_security_mode_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive ESM Information Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send ESM Information Response */ rv = tests1ap_build_esm_information_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Initial Context Setup Request + * Attach Accept + * Activate Default Bearer Context Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send UE Capability Info Indication */ rv = tests1ap_build_ue_capability_info_indication(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Initial Context Setup Response */ rv = tests1ap_build_initial_context_setup_response(&sendbuf, 33554628, 12, 5, 1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Send Attach Complete + Activate default EPS bearer cotext accept */ rv = tests1ap_build_attach_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive EMM information */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Retreive M-TMSI */ enb_ue = enb_ue_find_by_mme_ue_s1ap_id(33554628); d_assert(enb_ue, goto out,); mme_ue = enb_ue->mme_ue; d_assert(mme_ue, goto out,); m_tmsi = mme_ue->guti.m_tmsi; /* Receive E-RAB Setup Request + * Activate dedicated EPS bearer context request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send E-RAB Setup Response */ rv = tests1ap_build_e_rab_setup_response(&sendbuf, 33554628, 12, 6, 2); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Activate dedicated EPS bearer context accept */ rv = tests1ap_build_activate_dedicated_bearer_accept(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send ENB configuration transfer */ rv = tests1ap_build_enb_configuration_transfer(&sendbuf, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive MME configuration transfer */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock2, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send ENB configuration transfer */ rv = tests1ap_build_enb_configuration_transfer(&sendbuf, 1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock2, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive MME configuration transfer */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Handover Required */ rv = tests1ap_build_handover_required(&sendbuf, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Handover Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock2, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); #if TEST_HANDOVER_FAILURE /* Send Handover Failure */ rv = tests1ap_build_handover_failure(&sendbuf, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); #endif /* Send Handover Request Ack */ rv = tests1ap_build_handover_request_ack(&sendbuf, 1, 33554629, 8, 2, 5, 1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock2, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Handover Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send eNB Status Transfer */ rv = tests1ap_build_enb_status_transfer(&sendbuf, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive MME Status Transfer */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock2, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Handover Notify */ rv = tests1ap_build_handover_notify(&sendbuf, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock2, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive End Mark */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = testgtpu_enb_read(gtpu1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Receive End Mark */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = testgtpu_enb_read(gtpu1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Tracking Area Update Request */ rv = tests1ap_build_tau_request(&sendbuf, 1, 0x000300, 0x000800, 0, m_tmsi, 4, 0, mme_ue->knas_int); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock2, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Tracking Area Update Accept */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock2, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Receive UE Context Release Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send UE Context Release Complete */ rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex-1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Handover Required */ rv = tests1ap_build_handover_required(&sendbuf, 1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock2, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Handover Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Handover Request Ack */ rv = tests1ap_build_handover_request_ack(&sendbuf, 0, 33554630, 13, 2, 5, 1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Handover Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock2, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send eNB Status Transfer */ rv = tests1ap_build_enb_status_transfer(&sendbuf, 1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock2, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive MME Status Transfer */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Handover Notify */ rv = tests1ap_build_handover_notify(&sendbuf, 1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive End Mark */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = testgtpu_enb_read(gtpu2, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Receive End Mark */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = testgtpu_enb_read(gtpu2, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Receive UE Context Release Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock2, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send UE Context Release Complete */ rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock2, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Handover Required */ rv = tests1ap_build_handover_required(&sendbuf, 2); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Handover Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock2, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Handover Request Ack */ rv = tests1ap_build_handover_request_ack(&sendbuf, 0, 33554631, 9, 2, 5, 1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock2, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Handover Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Handover Cancel */ rv = tests1ap_build_handover_cancel(&sendbuf, 0); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock1, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Recv Handover Cancel Ack */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock1, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Recv UE Context Relase Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock2, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send UE Context Release Complete */ rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex+1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock2, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); out: /********** Remove Subscriber in Database */ doc = BCON_NEW("imsi", BCON_UTF8("001010123456815")); ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_remove(collection, MONGOC_REMOVE_SINGLE_REMOVE, doc, NULL, &error)) bson_destroy(doc); mongoc_collection_destroy(collection); /* Two eNB disonncect from MME */ rv = tests1ap_enb_close(sock1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_close(sock2); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* eNB disonncect from SGW */ rv = testgtpu_enb_close(gtpu1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = testgtpu_enb_close(gtpu2); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); } abts_suite *test_handover(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, handover_test1, NULL); abts_run_test(suite, handover_test2, NULL); return suite; } nextepc-0.3.10/test/basic/nas_message_test.c000066400000000000000000000243211333553357400210060ustar00rootroot00000000000000#include "core_pkbuf.h" #include "core_lib.h" #include "3gpp_types.h" #include "nas/nas_message.h" #include "mme/nas_security.h" #include "testutil.h" static void nas_message_test1(abts_case *tc, void *data) { /* Attach Request */ char *payload = "0741020bf600f110000201030003e605" "f07000001000050215d011d15200f110" "30395c0a003103e5e0349011035758a6" "5d0100e0c1"; nas_message_t message; pkbuf_t *pkbuf; status_t rv; char hexbuf[MAX_SDU_LEN]; pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); ABTS_PTR_NOTNULL(tc, pkbuf); pkbuf->len = 53; memcpy(pkbuf->payload, CORE_HEX(payload, strlen(payload), hexbuf), pkbuf->len); rv = nas_emm_decode(&message, pkbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(pkbuf); } static void nas_message_test2(abts_case *tc, void *data) { /* Attach Accept */ char *payload = "07420223060014f799303900325201c1" "01090908696e7465726e657405010ae1" "000a271b80802110020200108106c0a8" "a8018306c0a8a801000d04c0a8a80150" "0bf614f7992345e1000004561300f120" "fffd2305f400e102d4640123"; char buffer[92]; char *esm_payload = "5201c101090908696e7465726e657405" "010ae1000a271b808021100202001081" "06c0a8a8018306c0a8a801000d04c0a8" "a801"; char esm_buffer[50]; nas_message_t message; nas_attach_accept_t *attach_accept = &message.emm.attach_accept; tai0_list_t tai0_list; tai2_list_t tai2_list; pkbuf_t *pkbuf = NULL; status_t rv; memset(&message, 0, sizeof(message)); message.emm.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; message.emm.h.message_type = NAS_ATTACH_ACCEPT; attach_accept->eps_attach_result.result = NAS_ATTACH_RESULT_COMBINED_EPS_IMSI_ATTACH; attach_accept->t3412_value.unit = NAS_GRPS_TIMER_UNIT_MULTIPLES_OF_1_MM; attach_accept->t3412_value.value = 3; memset(&tai0_list, 0, sizeof(tai0_list_t)); memset(&tai2_list, 0, sizeof(tai2_list_t)); tai0_list.tai[0].type = TAI0_TYPE; tai0_list.tai[0].num = 1; plmn_id_build(&tai0_list.tai[0].plmn_id, 417, 99, 2); tai0_list.tai[0].tac[0] = 12345; nas_tai_list_build(&attach_accept->tai_list, &tai0_list, &tai2_list); attach_accept->esm_message_container.length = sizeof(esm_buffer); attach_accept->esm_message_container.buffer = CORE_HEX(esm_payload, strlen(esm_payload), esm_buffer); attach_accept->presencemask |= NAS_ATTACH_ACCEPT_GUTI_PRESENT; attach_accept->guti.length = 11; attach_accept->guti.guti.type = NAS_EPS_MOBILE_IDENTITY_GUTI; plmn_id_build(&attach_accept->guti.guti.plmn_id, 417, 99, 2); attach_accept->guti.guti.mme_gid = 9029; attach_accept->guti.guti.mme_code = 225; attach_accept->guti.guti.m_tmsi = 0x00000456; attach_accept->presencemask |= NAS_ATTACH_ACCEPT_LOCATION_AREA_IDENTIFICATION_PRESENT; plmn_id_build( &attach_accept->location_area_identification.plmn_id, 1, 2, 2); attach_accept->location_area_identification.lac = 0xfffd; attach_accept->presencemask |= NAS_ATTACH_ACCEPT_MS_IDENTITY_PRESENT; attach_accept->ms_identity.length = 5; attach_accept->ms_identity.tmsi.type = NAS_MOBILE_IDENTITY_TMSI; attach_accept->ms_identity.tmsi.tmsi = 0x00e102d4; attach_accept->presencemask |= NAS_ATTACH_ACCEPT_EPS_NETWORK_FEATURE_SUPPORT_PRESENT; attach_accept->eps_network_feature_support.length = 1; attach_accept->eps_network_feature_support.esr_ps = 1; attach_accept->eps_network_feature_support.emc_bs = 1; attach_accept->eps_network_feature_support.ims_vops = 1; rv = nas_plain_encode(&pkbuf, &message); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_INT_EQUAL(tc, sizeof(buffer), pkbuf->len); ABTS_TRUE(tc, memcmp(CORE_HEX(payload, strlen(payload), buffer), pkbuf->payload, pkbuf->len) == 0); pkbuf_free(pkbuf); } static void nas_message_test3(abts_case *tc, void *data) { char *payload = "074300035200c2"; nas_message_t message; pkbuf_t *pkbuf; status_t rv; char hexbuf[MAX_SDU_LEN]; pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); ABTS_PTR_NOTNULL(tc, pkbuf); pkbuf->len = 7; memcpy(pkbuf->payload, CORE_HEX(payload, strlen(payload), hexbuf), pkbuf->len); rv = nas_emm_decode(&message, pkbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(pkbuf); } static void nas_message_test4(abts_case *tc, void *data) { /* Attach Reject */ char *payload = "074411"; char buffer[3]; nas_message_t message; nas_attach_reject_t *attach_reject = &message.emm.attach_reject; pkbuf_t *pkbuf = NULL; status_t rv; memset(&message, 0, sizeof(message)); message.emm.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; message.emm.h.message_type = NAS_ATTACH_REJECT; attach_reject->emm_cause = EMM_CAUSE_NETWORK_FAILURE; rv = nas_plain_encode(&pkbuf, &message); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_INT_EQUAL(tc, sizeof(buffer), pkbuf->len); ABTS_TRUE(tc, memcmp(CORE_HEX(payload, strlen(payload), buffer), pkbuf->payload, pkbuf->len) == 0); pkbuf_free(pkbuf); } static void nas_message_test5(abts_case *tc, void *data) { mme_ue_t ue; ue.ul_count.i32 = 0x123456; ABTS_INT_EQUAL(tc, 0x1234, ue.ul_count.overflow); ABTS_INT_EQUAL(tc, 0x56, ue.ul_count.sqn); ABTS_INT_EQUAL(tc, 0, ue.ul_count.spare); ue.ul_count.overflow = 0xabcd; ue.ul_count.sqn = 0xef; ABTS_INT_EQUAL(tc, 0xabcdef, ue.ul_count.i32); } static void nas_message_test6(abts_case *tc, void *data) { /* Identity Request */ char *payload = "075501"; char hexbuf[MAX_SDU_LEN]; nas_message_t message; nas_identity_request_t *identity_request = &message.emm.identity_request; pkbuf_t *pkbuf; status_t rv; pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); ABTS_PTR_NOTNULL(tc, pkbuf); pkbuf->len = 3; memcpy(pkbuf->payload, CORE_HEX(payload, strlen(payload), hexbuf), pkbuf->len); rv = nas_emm_decode(&message, pkbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_INT_EQUAL(tc, NAS_PROTOCOL_DISCRIMINATOR_EMM, message.emm.h.protocol_discriminator); ABTS_INT_EQUAL(tc, NAS_IDENTITY_REQUEST, message.emm.h.message_type); ABTS_INT_EQUAL(tc, NAS_IDENTITY_TYPE_2_IMSI, identity_request->identity_type.type); pkbuf_free(pkbuf); } static void nas_message_test7(abts_case *tc, void *data) { /* Identity Response */ char *payload = "0756080910101032548651"; char buffer[11]; nas_message_t message; nas_identity_response_t *identity_response = &message.emm.identity_response; pkbuf_t *pkbuf = NULL; status_t rv; memset(&message, 0, sizeof(message)); message.emm.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; message.emm.h.message_type = NAS_IDENTITY_RESPONSE; identity_response->mobile_identity.length = 8; identity_response->mobile_identity.imsi.digit1 = 0; identity_response->mobile_identity.imsi.type = NAS_IDENTITY_TYPE_2_IMSI; identity_response->mobile_identity.imsi.odd_even = 1; identity_response->mobile_identity.imsi.digit2 = 0; identity_response->mobile_identity.imsi.digit3 = 1; identity_response->mobile_identity.imsi.digit4 = 0; identity_response->mobile_identity.imsi.digit5 = 1; identity_response->mobile_identity.imsi.digit6 = 0; identity_response->mobile_identity.imsi.digit7 = 1; identity_response->mobile_identity.imsi.digit8 = 2; identity_response->mobile_identity.imsi.digit9 = 3; identity_response->mobile_identity.imsi.digit10 = 4; identity_response->mobile_identity.imsi.digit11 = 5; identity_response->mobile_identity.imsi.digit12 = 6; identity_response->mobile_identity.imsi.digit13 = 8; identity_response->mobile_identity.imsi.digit14 = 1; identity_response->mobile_identity.imsi.digit15 = 5; rv = nas_plain_encode(&pkbuf, &message); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_INT_EQUAL(tc, sizeof(buffer), pkbuf->len); ABTS_TRUE(tc, memcmp(CORE_HEX(payload, strlen(payload), buffer), pkbuf->payload, pkbuf->len) == 0); pkbuf_free(pkbuf); } static void nas_message_test8(abts_case *tc, void *data) { /* Security Request */ char *payload = "c7a8640c"; char buffer[4]; nas_message_t message; pkbuf_t *pkbuf; status_t rv; char hexbuf[MAX_SDU_LEN]; nas_service_request_t *service_request = &message.emm.service_request; nas_ksi_and_sequence_number_t *ksi_and_sequence_number = &service_request->ksi_and_sequence_number; pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); ABTS_PTR_NOTNULL(tc, pkbuf); pkbuf->len = 4; memcpy(pkbuf->payload, CORE_HEX(payload, strlen(payload), hexbuf), pkbuf->len); /* Decode service request */ rv = nas_emm_decode(&message, pkbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_INT_EQUAL(tc, 5, ksi_and_sequence_number->ksi); ABTS_INT_EQUAL(tc, 8, ksi_and_sequence_number->sequence_number); ABTS_INT_EQUAL(tc, 0x640c, service_request->message_authentication_code); pkbuf_free(pkbuf); /* Encode service request */ memset(&message, 0, sizeof(message)); message.emm.h.protocol_discriminator = NAS_PROTOCOL_DISCRIMINATOR_EMM; message.emm.h.security_header_type = NAS_SECURITY_HEADER_FOR_SERVICE_REQUEST_MESSAGE; ksi_and_sequence_number->ksi = 5; ksi_and_sequence_number->sequence_number = 8; service_request->message_authentication_code = 0x640c; rv = nas_plain_encode(&pkbuf, &message); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_INT_EQUAL(tc, sizeof(buffer), pkbuf->len); ABTS_TRUE(tc, memcmp(CORE_HEX(payload, strlen(payload), buffer), pkbuf->payload, pkbuf->len) == 0); pkbuf_free(pkbuf); } abts_suite *test_nas_message(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, nas_message_test1, NULL); abts_run_test(suite, nas_message_test2, NULL); abts_run_test(suite, nas_message_test3, NULL); abts_run_test(suite, nas_message_test4, NULL); abts_run_test(suite, nas_message_test5, NULL); abts_run_test(suite, nas_message_test6, NULL); abts_run_test(suite, nas_message_test7, NULL); abts_run_test(suite, nas_message_test8, NULL); return suite; } nextepc-0.3.10/test/basic/s1ap_message_test.c000066400000000000000000000113331333553357400210700ustar00rootroot00000000000000#include "core_debug.h" #include "core_pkbuf.h" #include "core_lib.h" #include "3gpp_types.h" #include "mme/s1ap_build.h" #include "mme/s1ap_conv.h" #include "testutil.h" #include "testpacket.h" static void s1ap_message_test1(abts_case *tc, void *data) { /* S1SetupRequest */ char *payload = "0011002d000004003b00090000f11040" "54f64010003c400903004a4c542d3632" "3100400007000c0e4000f11000894001" "00"; s1ap_message_t message; pkbuf_t *pkbuf; int result; char hexbuf[MAX_SDU_LEN]; pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); ABTS_PTR_NOTNULL(tc, pkbuf); pkbuf->len = 49; memcpy(pkbuf->payload, CORE_HEX(payload, strlen(payload), hexbuf), pkbuf->len); result = s1ap_decode_pdu(&message, pkbuf); ABTS_INT_EQUAL(tc, 0, result); s1ap_free_pdu(&message); pkbuf_free(pkbuf); } static void s1ap_message_test2(abts_case *tc, void *data) { /* InitialUE(Attach Request) */ char *payload = "000c406f000006000800020001001a00" "3c3b17df675aa8050741020bf600f110" "000201030003e605f070000010000502" "15d011d15200f11030395c0a003103e5" "e0349011035758a65d0100e0c1004300" "060000f1103039006440080000f1108c" "3378200086400130004b00070000f110" "000201"; s1ap_message_t message; pkbuf_t *pkbuf; int result; char hexbuf[MAX_SDU_LEN]; pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); ABTS_PTR_NOTNULL(tc, pkbuf); pkbuf->len = 115; memcpy(pkbuf->payload, CORE_HEX(payload, strlen(payload), hexbuf), pkbuf->len); result = s1ap_decode_pdu(&message, pkbuf); ABTS_INT_EQUAL(tc, 0, result); s1ap_free_pdu(&message); pkbuf_free(pkbuf); } static void s1ap_message_test3(abts_case *tc, void *data) { /* initial context setup response */ char *payload = "2009002500000300004005c0020000bf" "0008400200010033400f000032400a0a" "1f0a0123c601000908"; s1ap_message_t message; pkbuf_t *pkbuf; int result; char hexbuf[MAX_SDU_LEN]; pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); ABTS_PTR_NOTNULL(tc, pkbuf); pkbuf->len = 41; memcpy(pkbuf->payload, CORE_HEX(payload, strlen(payload), hexbuf), pkbuf->len); result = s1ap_decode_pdu(&message, pkbuf); ABTS_INT_EQUAL(tc, 0, result); s1ap_free_pdu(&message); pkbuf_free(pkbuf); } static void s1ap_message_test4(abts_case *tc, void *data) { s1ap_message_t message; status_t rv; pkbuf_t *pkbuf; int result; rv = s1ap_build_setup_rsp(&pkbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_PTR_NOTNULL(tc, pkbuf); ABTS_PTR_NOTNULL(tc, pkbuf->payload); ABTS_INT_EQUAL(tc, 27, pkbuf->len); result = s1ap_decode_pdu(&message, pkbuf); ABTS_INT_EQUAL(tc, 0, result); s1ap_free_pdu(&message); pkbuf_free(pkbuf); } static void s1ap_message_test5(abts_case *tc, void *data) { s1ap_message_t message; status_t rv; pkbuf_t *pkbuf; int result; rv = tests1ap_build_setup_req(&pkbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f64); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_PTR_NOTNULL(tc, pkbuf); ABTS_PTR_NOTNULL(tc, pkbuf->payload); ABTS_INT_EQUAL(tc, 35, pkbuf->len); result = s1ap_decode_pdu(&message, pkbuf); ABTS_INT_EQUAL(tc, 0, result); s1ap_free_pdu(&message); pkbuf_free(pkbuf); } static void s1ap_message_test6(abts_case *tc, void *data) { status_t rv; pkbuf_t *s1apbuf = NULL, *emmbuf = NULL; enb_ue_t enb_ue; int i; s1ap_message_t message; char buffer[1024]; char *_result = "000b4080 8c000003 00000002 00010008 00020001 001a0079 78efefef efefefef" "efefefef efefefef efefefef efefefef efefefef efefefef efefefef efefefef" "efefefef efefefef efefefef efefefef efefefef efefefef efefefef efefefef" "efefefef efefefef efefefef efefefef efefefef efefefef efefefef efefefef" "efefefef efefefef efefefef efefefef ef"; enb_ue.mme_ue_s1ap_id = 1; enb_ue.enb_ue_s1ap_id = 1; emmbuf = pkbuf_alloc(0, 120); for (i = 0; i < emmbuf->len; i++) ((char *)emmbuf->payload)[i] = 0xef; rv = s1ap_build_downlink_nas_transport(&s1apbuf, &enb_ue, emmbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); ABTS_TRUE(tc, memcmp(CORE_HEX(_result, strlen(_result), buffer), s1apbuf->payload, s1apbuf->len) == 0); pkbuf_free(s1apbuf); } abts_suite *test_s1ap_message(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, s1ap_message_test1, NULL); abts_run_test(suite, s1ap_message_test2, NULL); abts_run_test(suite, s1ap_message_test3, NULL); abts_run_test(suite, s1ap_message_test4, NULL); abts_run_test(suite, s1ap_message_test5, NULL); abts_run_test(suite, s1ap_message_test6, NULL); return suite; } nextepc-0.3.10/test/basic/s1setup_test.c000066400000000000000000000051001333553357400201170ustar00rootroot00000000000000#include "core_debug.h" #include "core_pkbuf.h" #include "3gpp_types.h" #include "mme/s1ap_build.h" #include "mme/s1ap_conv.h" #include "testutil.h" #include "testpacket.h" #define NUM_OF_TEST_DUPLICATED_ENB 4 static void s1setup_test1(abts_case *tc, void *data) { status_t rv; sock_id sock[NUM_OF_TEST_DUPLICATED_ENB]; pkbuf_t *sendbuf; pkbuf_t *recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); s1ap_message_t message; int i; for (i = 0; i < NUM_OF_TEST_DUPLICATED_ENB; i++) { rv = tests1ap_enb_connect(&sock[i]); ABTS_INT_EQUAL(tc, CORE_OK, rv); } for (i = 0; i < NUM_OF_TEST_DUPLICATED_ENB; i++) { rv = tests1ap_build_setup_req( &sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f64); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock[i], sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_read(sock[i], recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = s1ap_decode_pdu(&message, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); s1ap_free_pdu(&message); } for (i = 0; i < NUM_OF_TEST_DUPLICATED_ENB; i++) { rv = tests1ap_enb_close(sock[i]); ABTS_INT_EQUAL(tc, CORE_OK, rv); } pkbuf_free(recvbuf); core_sleep(time_from_msec(300)); } #define NUM_OF_TEST_ENB 4 static void s1setup_test2(abts_case *tc, void *data) { status_t rv; sock_id sock[NUM_OF_TEST_ENB]; pkbuf_t *sendbuf; pkbuf_t *recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); s1ap_message_t message; int i; for (i = 0; i < NUM_OF_TEST_ENB; i++) { rv = tests1ap_enb_connect(&sock[i]); ABTS_INT_EQUAL(tc, CORE_OK, rv); } for (i = 0; i < NUM_OF_TEST_ENB; i++) { rv = tests1ap_build_setup_req( &sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f64+i); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock[i], sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_read(sock[i], recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = s1ap_decode_pdu(&message, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); s1ap_free_pdu(&message); } for (i = 0; i < NUM_OF_TEST_ENB; i++) { rv = tests1ap_enb_close(sock[i]); ABTS_INT_EQUAL(tc, CORE_OK, rv); } pkbuf_free(recvbuf); core_sleep(time_from_sec(1)); } abts_suite *test_s1setup(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, s1setup_test1, NULL); abts_run_test(suite, s1setup_test2, NULL); return suite; } nextepc-0.3.10/test/basic/security_test.c000066400000000000000000000311641333553357400203730ustar00rootroot00000000000000#include "core_lib.h" #include "core_debug.h" #include "core_sha2_hmac.h" #include "core_pkbuf.h" #include "nas/nas_message.h" #include "hss/milenage.h" #include "hss/hss_auc.h" #include "mme/nas_security.h" #include "testutil.h" static void security_test1(abts_case *tc, void *data) { char *_k = "465b5ce8 b199b49f aa5f0a2e e238a6bc"; char *_rand = "23553cbe 9637a89d 218ae64d ae47bf35"; char *_sqn = "ff9bb4d0 b607"; char *_amf = "b9b9"; char *_op = "cdc202d5 123e20f6 2b6d676a c72cb318"; char *_opc = "cd63cb71 954a9f4e 48a5994e 37a02baf"; char *_mac_a = "4a9ffac3 54dfafb3"; char *_mac_s = "01cfaf9e c4e871e9"; char *_res = "a54211d5 e3ba50bf"; char *_ck = "b40ba9a3 c58b2a05 bbf0d987 b21bf8cb"; char *_ik = "f769bcd7 51044604 12767271 1c6d3441"; char *_ak = "aa689c64 8370"; char *_akstar = "451e8bec a43b"; c_uint8_t k[16]; c_uint8_t rand[16]; c_uint8_t op[16]; c_uint8_t opc[16]; c_uint8_t sqn[6]; c_uint8_t amf[2]; c_uint8_t mac_a[8]; c_uint8_t mac_s[8]; c_uint8_t res[8]; c_uint8_t ck[16]; c_uint8_t ik[16]; c_uint8_t ak[6]; c_uint8_t akstar[6]; c_uint8_t tmp[16]; milenage_opc(CORE_HEX(_k, strlen(_k), k), CORE_HEX(_op, strlen(_op), op), opc); ABTS_TRUE(tc, memcmp(opc, CORE_HEX(_opc, strlen(_opc), tmp), 16) == 0); milenage_f1(opc, k, CORE_HEX(_rand, strlen(_rand), rand), CORE_HEX(_sqn, strlen(_sqn), sqn), CORE_HEX(_amf, strlen(_amf), amf), mac_a, mac_s); ABTS_TRUE(tc, memcmp(mac_a, CORE_HEX(_mac_a, strlen(_mac_a), tmp), 8) == 0); ABTS_TRUE(tc, memcmp(mac_s, CORE_HEX(_mac_s, strlen(_mac_s), tmp), 8) == 0); milenage_f2345(opc, k, rand, res, ck, ik, ak, akstar); ABTS_TRUE(tc, memcmp(res, CORE_HEX(_res, strlen(_res), tmp), 8) == 0); ABTS_TRUE(tc, memcmp(ck, CORE_HEX(_ck, strlen(_ck), tmp), 16) == 0); ABTS_TRUE(tc, memcmp(ik, CORE_HEX(_ik, strlen(_ik), tmp), 16) == 0); ABTS_TRUE(tc, memcmp(ak, CORE_HEX(_ak, strlen(_ak), tmp), 6) == 0); ABTS_TRUE(tc, memcmp(akstar, CORE_HEX(_akstar, strlen(_akstar), tmp), 6) == 0); } static void security_test2(abts_case *tc, void *data) { char *_key = "4a656665"; char *_message = "7768617420646f2079612077616e7420666f72206e6f7468696e673f"; char *_hmac = "5bdcc146bf60754e6a042426089575c75a003f089d2739839dec58b964ec3843"; c_uint8_t key[4]; c_uint8_t message[28]; c_uint8_t hmac[32]; c_uint8_t tmp[32]; hmac_sha256(CORE_HEX(_key, strlen(_key), key), 4, CORE_HEX(_message, strlen(_message), message), 28, hmac, 32); ABTS_TRUE(tc, memcmp(hmac, CORE_HEX(_hmac, strlen(_hmac), tmp), 32) == 0); } static void security_test3(abts_case *tc, void *data) { char *_ck = "b40ba9a3c58b2a05 bbf0d987b21bf8cb"; char *_ik = "f769bcd751044604 127672711c6d3441"; char *_plmn_id = "024830"; char *_sqn = "fd8eef40df7d"; char *_ak = "aa689c648370"; char *_kasme = "238e457e0f758bad bca8d34bb2612c10 428d426757cb5553 b2b184fa64bfc549"; c_uint8_t ck[16]; c_uint8_t ik[16]; c_uint8_t plmn_id[3]; c_uint8_t sqn[6]; c_uint8_t ak[6]; c_uint8_t kasme[32]; c_uint8_t tmp[32]; hss_auc_kasme( CORE_HEX(_ck, strlen(_ck), ck), CORE_HEX(_ik, strlen(_ik), ik), CORE_HEX(_plmn_id, strlen(_plmn_id), plmn_id), CORE_HEX(_sqn, strlen(_sqn), sqn), CORE_HEX(_ak, strlen(_ak), ak), kasme); ABTS_TRUE(tc, memcmp(kasme, CORE_HEX(_kasme, strlen(_kasme), tmp), 32) == 0); } static void security_test4(abts_case *tc, void *data) { #define SECURITY_TEST4_BIT_LEN 88 #define SECURITY_TEST4_LEN ((SECURITY_TEST4_BIT_LEN+7)/8) char *_ik = "2bd6459f 82c5b300 952c4910 4881ff48"; char *_message = "33323462 63393861 37347900 00000000"; char *_mact = "731f1165"; c_uint8_t ik[16]; c_uint8_t message[SECURITY_TEST4_LEN]; c_uint8_t mact[4]; c_uint8_t tmp[4]; c_uint8_t mac[4]; pkbuf_t *pkbuf = NULL; snow_3g_f9(CORE_HEX(_ik, strlen(_ik), ik), 0x38a6f056, (0x1f << 27), 0, CORE_HEX(_message, strlen(_message), message), SECURITY_TEST4_BIT_LEN, mact); ABTS_TRUE(tc, memcmp(mact, CORE_HEX(_mact, strlen(_mact), tmp), 4) == 0); pkbuf = pkbuf_alloc(NAS_HEADROOM, SECURITY_TEST4_LEN); ABTS_PTR_NOTNULL(tc, pkbuf); memcpy(pkbuf->payload, message, pkbuf->len); nas_mac_calculate(NAS_SECURITY_ALGORITHMS_128_EIA1, ik, 0x38a6f056, 0x1f, 0, pkbuf, mac); ABTS_TRUE(tc, memcmp(mac, tmp, 4) == 0); pkbuf_free(pkbuf); } static void security_test5(abts_case *tc, void *data) { #define SECURITY_TEST5_BIT_LEN 800 #define SECURITY_TEST5_LEN ((SECURITY_TEST5_BIT_LEN+7)/8) char *_ck = "2bd6459f 82c5b300 952c4910 4881ff48"; char *_plain = "7ec61272 743bf161 4726446a 6c38ced1" "66f6ca76 eb543004 4286346c ef130f92" "922b0345 0d3a9975 e5bd2ea0 eb55ad8e" "1b199e3e c4316020 e9a1b285 e7627953" "59b7bdfd 39bef4b2 484583d5 afe082ae" "e638bf5f d5a60619 3901a08f 4ab41aab" "9b134880"; char *_cipher = "8ceba629 43dced3a 0990b06e a1b0a2c4" "fb3cedc7 1b369f42 ba64c1eb 6665e72a" "a1c9bb0d eaa20fe8 6058b8ba ee2c2e7f" "0becce48 b52932a5 3c9d5f93 1a3a7c53" "2259af43 25e2a65e 3084ad5f 6a513b7b" "ddc1b65f 0aa0d97a 053db55a 88c4c4f9" "605e4143"; c_uint8_t ck[16]; c_uint8_t plain[SECURITY_TEST5_LEN]; c_uint8_t tmp[SECURITY_TEST5_LEN]; pkbuf_t *pkbuf = NULL; snow_3g_f8( CORE_HEX(_ck, strlen(_ck), ck), 0x72a4f20f, 0x0c, 1, CORE_HEX(_plain, strlen(_plain), plain), SECURITY_TEST5_BIT_LEN); ABTS_TRUE(tc, memcmp(plain, CORE_HEX(_cipher, strlen(_cipher), tmp), SECURITY_TEST5_LEN) == 0); pkbuf = pkbuf_alloc(NAS_HEADROOM, SECURITY_TEST5_LEN); ABTS_PTR_NOTNULL(tc, pkbuf); memcpy(pkbuf->payload, plain, pkbuf->len); nas_encrypt(NAS_SECURITY_ALGORITHMS_128_EEA1, ck, 0x72a4f20f, 0x0c, 1, pkbuf); ABTS_TRUE(tc, memcmp(pkbuf->payload, CORE_HEX(_plain, strlen(_plain), tmp), SECURITY_TEST5_LEN) == 0); pkbuf_free(pkbuf); } static void security_test6(abts_case *tc, void *data) { #define SECURITY_TEST6_BIT_LEN 64 #define SECURITY_TEST6_LEN ((SECURITY_TEST6_BIT_LEN+7)/8) char *_ik = "d3c5d592 327fb11c 4035c668 0af8c6d1"; char *_message = "484583d5 afe082ae"; char *_mact = "b93787e6"; c_uint8_t ik[16]; c_uint8_t message[SECURITY_TEST6_LEN]; c_uint8_t mact[16]; c_uint8_t tmp[4]; c_uint8_t *m = NULL; c_uint32_t count = htonl(0x398a59b4); int msg_len = SECURITY_TEST6_LEN; int m_len = 8+msg_len; c_uint8_t mac[4]; pkbuf_t *pkbuf = NULL; m = core_calloc(m_len, sizeof(c_uint8_t)); memcpy(m, &count, sizeof(c_uint32_t)); m[4] = ((0x1a << 3) | (1 << 2)); memcpy(m+8, CORE_HEX(_message, strlen(_message), message), msg_len); aes_cmac_calculate(mact, CORE_HEX(_ik, strlen(_ik), ik), m, m_len); CORE_FREE(m); ABTS_TRUE(tc, memcmp(mact, CORE_HEX(_mact, strlen(_mact), tmp), 4) == 0); pkbuf = pkbuf_alloc(NAS_HEADROOM, SECURITY_TEST6_LEN); ABTS_PTR_NOTNULL(tc, pkbuf); memcpy(pkbuf->payload, message, pkbuf->len); nas_mac_calculate(NAS_SECURITY_ALGORITHMS_128_EIA2, ik, 0x398a59b4, 0x1a, 1, pkbuf, mac); ABTS_TRUE(tc, memcmp(mac, tmp, 4) == 0); pkbuf_free(pkbuf); } static void security_test7(abts_case *tc, void *data) { #define SECURITY_TEST7_BIT_LEN 800 #define SECURITY_TEST7_LEN ((SECURITY_TEST7_BIT_LEN+7)/8) char *_ck = "2bd6459f 82c440e0 952c4910 4805ff48"; char *_plain = "7ec61272 743bf161 4726446a 6c38ced1 66f6ca76 eb543004 4286346c ef130f92" "922b0345 0d3a9975 e5bd2ea0 eb55ad8e 1b199e3e c4316020 e9a1b285 e7627953" "59b7bdfd 39bef4b2 484583d5 afe082ae e638bf5f d5a60619 3901a08f 4ab41aab" "9b134880"; char *_cipher = "59616053 53c64bdc a15b195e 288553a9 10632506 d6200aa7 90c4c806 c99904cf" "2445cc50 bb1cf168 a4967373 4e081b57 e324ce52 59c0e78d 4cd97b87 0976503c" "0943f2cb 5ae8f052 c7b7d392 239587b8 956086bc ab188360 42e2e6ce 42432a17" "105c53d3"; c_uint8_t ck[16]; c_uint8_t plain[SECURITY_TEST7_LEN+100]; c_uint8_t cipher[SECURITY_TEST7_LEN+100]; c_uint8_t tmp[SECURITY_TEST7_LEN+100]; pkbuf_t *pkbuf = NULL; c_uint8_t ivec[16]; c_uint32_t count = htonl(0xc675a64b); memset(ivec, 0, sizeof(ivec)); memcpy(ivec+0, &count, sizeof(count)); ivec[4] = (0x0c << 3) | (1 << 2); aes_ctr128_encrypt( CORE_HEX(_ck, strlen(_ck), ck), ivec, CORE_HEX(_plain, strlen(_plain), plain), SECURITY_TEST7_LEN, cipher); ABTS_TRUE(tc, memcmp(cipher, CORE_HEX(_cipher, strlen(_cipher), tmp), SECURITY_TEST7_LEN) == 0); memset(ivec, 0, sizeof(ivec)); memcpy(ivec+0, &count, sizeof(count)); ivec[4] = (0x0c << 3) | (1 << 2); aes_ctr128_encrypt(CORE_HEX(_ck, strlen(_ck), ck), ivec, cipher, SECURITY_TEST7_LEN, cipher); ABTS_TRUE(tc, memcmp(cipher, plain, SECURITY_TEST7_LEN) == 0); pkbuf = pkbuf_alloc(NAS_HEADROOM, SECURITY_TEST7_LEN); ABTS_PTR_NOTNULL(tc, pkbuf); memcpy(pkbuf->payload, plain, pkbuf->len); nas_encrypt(NAS_SECURITY_ALGORITHMS_128_EEA2, ck, 0xc675a64b, 0x0c, 1, pkbuf); ABTS_TRUE(tc, memcmp(pkbuf->payload, CORE_HEX(_cipher, strlen(_cipher), tmp), SECURITY_TEST7_LEN) == 0); pkbuf_free(pkbuf); } static void security_test8(abts_case *tc, void *data) { #define SECURITY_TEST8_BIT_LEN 584 #define SECURITY_TEST8_LEN ((SECURITY_TEST8_BIT_LEN+7)/8) char *_ik = "c9 e6 ce c4 60 7c 72 db 00 0a ef a8 83 85 ab 0a"; char *_message = "983b41d4 7d780c9e 1ad11d7e b70391b1 de0b35da 2dc62f83 e7b78d63 06ca0ea0" "7e941b7b e91348f9 fcb170e2 217fecd9 7f9f68ad b16e5d7d 21e569d2 80ed775c" "ebde3f40 93c53881 00000000"; char *_mact = "24a842b3"; c_uint8_t ik[16]; c_uint8_t message[SECURITY_TEST8_LEN]; c_uint8_t mact[4]; c_uint32_t mac32; pkbuf_t *pkbuf = NULL; c_uint8_t mac[4]; zuc_eia3( CORE_HEX(_ik, strlen(_ik), ik), 0xa94059da, 0xa, 1, SECURITY_TEST8_BIT_LEN, CORE_HEX(_message, strlen(_message), message), &mac32); mac32 = ntohl(mac32); ABTS_TRUE(tc, memcmp(&mac32, CORE_HEX(_mact, strlen(_mact), mact), 4) == 0); pkbuf = pkbuf_alloc(NAS_HEADROOM, SECURITY_TEST8_LEN); ABTS_PTR_NOTNULL(tc, pkbuf); memcpy(pkbuf->payload, message, pkbuf->len); nas_mac_calculate(NAS_SECURITY_ALGORITHMS_128_EIA3, ik, 0xa94059da, 0xa, 1, pkbuf, mac); ABTS_TRUE(tc, memcmp(mac, mact, 4) == 0); pkbuf_free(pkbuf); } static void security_test9(abts_case *tc, void *data) { #define SECURITY_TEST9_BIT_LEN 200 #define SECURITY_TEST9_LEN ((SECURITY_TEST9_BIT_LEN+7)/8) char *_ck = "17 3d 14 ba 50 03 73 1d 7a 60 04 94 70 f0 0a 29"; char *_plain = "6cf65340 735552ab 0c9752fa 6f9025fe 0bd675d9 005875b2 00000000"; char *_cipher = "a6c85fc6 6afb8533 aafc2518 dfe78494 0ee1e4b0 30238cc8 10000000"; c_uint8_t ck[16]; c_uint8_t plain[SECURITY_TEST9_LEN]; c_uint8_t cipher[SECURITY_TEST9_LEN]; c_uint8_t tmp[SECURITY_TEST9_LEN]; pkbuf_t *pkbuf = NULL; CORE_HEX(_plain, strlen(_plain), plain); zuc_eea3( CORE_HEX(_ck, strlen(_ck), ck), 0x66035492, 0xf, 0, SECURITY_TEST9_BIT_LEN, plain, plain); ABTS_TRUE(tc, memcmp(plain, CORE_HEX(_cipher, strlen(_cipher), tmp), SECURITY_TEST9_LEN) == 0); zuc_eea3( CORE_HEX(_ck, strlen(_ck), ck), 0x66035492, 0xf, 0, SECURITY_TEST9_BIT_LEN, CORE_HEX(_plain, strlen(_plain), plain), cipher); ABTS_TRUE(tc, memcmp(cipher, CORE_HEX(_cipher, strlen(_cipher), tmp), SECURITY_TEST9_LEN) == 0); pkbuf = pkbuf_alloc(NAS_HEADROOM, SECURITY_TEST9_LEN); ABTS_PTR_NOTNULL(tc, pkbuf); memcpy(pkbuf->payload, plain, pkbuf->len); nas_encrypt(NAS_SECURITY_ALGORITHMS_128_EEA3, ck, 0x66035492, 0xf, 0, pkbuf); ABTS_TRUE(tc, memcmp(pkbuf->payload, CORE_HEX(_cipher, strlen(_cipher), tmp), SECURITY_TEST9_LEN) == 0); pkbuf_free(pkbuf); } abts_suite *test_security(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, security_test1, NULL); abts_run_test(suite, security_test2, NULL); abts_run_test(suite, security_test3, NULL); abts_run_test(suite, security_test4, NULL); abts_run_test(suite, security_test5, NULL); abts_run_test(suite, security_test6, NULL); abts_run_test(suite, security_test7, NULL); abts_run_test(suite, security_test8, NULL); abts_run_test(suite, security_test9, NULL); return suite; } nextepc-0.3.10/test/basic/testutil.c000066400000000000000000000051661333553357400173450ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "core_general.h" #include "core_debug.h" #include "core_semaphore.h" #include "fd/fd_lib.h" #include "common/application.h" #include "common/context.h" #include "app_init.h" #include "testpacket.h" #include "abts.h" #include "testutil.h" abts_suite *test_s1ap_message(abts_suite *suite); abts_suite *test_nas_message(abts_suite *suite); abts_suite *test_gtp_message(abts_suite *suite); abts_suite *test_security(abts_suite *suite); abts_suite *test_s1setup(abts_suite *suite); abts_suite *test_attach(abts_suite *suite); abts_suite *test_volte(abts_suite *suite); abts_suite *test_handover(abts_suite *suite); const struct testlist alltests[] = { {test_s1ap_message}, {test_nas_message}, {test_gtp_message}, {test_security}, {test_s1setup}, {test_attach}, {test_volte}, {test_handover}, {NULL}, }; static int connected_count = 0; static void test_fd_logger_handler(enum fd_hook_type type, struct msg * msg, struct peer_hdr * peer, void * other, struct fd_hook_permsgdata *pmd, void * regdata) { if (type == HOOK_PEER_CONNECT_SUCCESS) { connected_count++; } } void test_terminate(void) { testpacket_final(); app_terminate(); d_trace_global_on(); core_terminate(); } status_t test_initialize(int argc, const char *const argv[], char *config_path) { status_t rv; fd_logger_register(test_fd_logger_handler); atexit(test_terminate); core_initialize(); rv = app_initialize(config_path, NULL, NULL); if (rv != CORE_OK) { d_error("app_initialize() failed"); return CORE_ERROR; } rv = testpacket_init(); if (rv != CORE_OK) { d_error("testpacket() failed"); return CORE_ERROR; } while(1) { if (connected_count == 1) break; core_sleep(time_from_msec(50)); } return rv; } nextepc-0.3.10/test/basic/volte_test.c000066400000000000000000000505431333553357400176570ustar00rootroot00000000000000 #include "core_debug.h" #include "core_pkbuf.h" #include "core_lib.h" #include #include "common/context.h" #include "mme/mme_context.h" #include "s1ap/s1ap_message.h" #include "testutil.h" #include "testpacket.h" static void volte_test1(abts_case *tc, void *data) { status_t rv; sock_id sock; pkbuf_t *sendbuf; pkbuf_t *recvbuf; s1ap_message_t message; int i; int msgindex = 0; mongoc_collection_t *collection = NULL; bson_t *doc = NULL; c_int64_t count = 0; bson_error_t error; const char *json = "{" "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2b\" }," "\"imsi\" : \"001010123456819\"," "\"pdn\" : [" "{ \"apn\" : \"internet\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd32\" }," "\"qos\" : {" "\"qci\" : 9," "\"arp\" : {" "\"priority_level\" : 8," "\"pre_emption_vulnerability\" : 1," "\"pre_emption_capability\" : 1 } }," "\"type\" : 2 }," "{ \"apn\" : \"internet.ng2.mnet\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2c\" }," "\"pcc_rule\" : [" "{ \"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2d\" }," "\"qos\" : {" "\"qci\" : 1," "\"gbr\" : {" "\"downlink\" : { \"$numberLong\" : \"64\" }," "\"uplink\" : { \"$numberLong\" : \"44\" } }," "\"mbr\" : {" "\"downlink\" : { \"$numberLong\" : \"64\" }," "\"uplink\" : { \"$numberLong\" : \"44\" } }," "\"arp\" : {" "\"priority_level\" : 3," "\"pre_emption_vulnerability\" : 0," "\"pre_emption_capability\" : 0 } }," "\"flow\" : [" "{ \"direction\" : 2," "\"description\" : \"permit out udp from any 1-65535 to 10.200.136.98/32 23454\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd31\" } }," "{ \"direction\" : 1," "\"description\" : \"permit out udp from any 50020 to 10.200.136.98/32 1-65535\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd30\" } }," "{ \"direction\" : 2," "\"description\" : \"permit out udp from any 1-65535 to 10.200.136.98/32 23455\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2f\" } }," "{ \"direction\" : 1," "\"description\" : \"permit out udp from any 50021 to 10.200.136.98/32 1-65535\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2e\" } } ]" "} ]," "\"ambr\" : {" "\"downlink\" : { \"$numberLong\" : \"35840\" }," "\"uplink\" : { \"$numberLong\" : \"15360\" } }," "\"qos\" : {" "\"qci\" : 6," "\"arp\" : {" "\"priority_level\" : 6," "\"pre_emption_vulnerability\" : 1," "\"pre_emption_capability\" : 1 } }," "\"type\" : 2 }" "]," "\"ambr\" : {" "\"downlink\" : { \"$numberLong\" : \"1024000\" }," "\"uplink\" : { \"$numberLong\" : \"1024000\" } }," "\"subscribed_rau_tau_timer\" : 12," "\"network_access_mode\" : 2," "\"subscriber_status\" : 0," "\"access_restriction_data\" : 32," "\"security\" : {" "\"k\" : \"465B5CE8 B199B49F AA5F0A2E E238A6BC\"," "\"op\" : \"5F1D289C 5D354D0A 140C2548 F5F3E3BA\"," "\"amf\" : \"8000\"," "\"sqn\" : { \"$numberLong\" : \"64\" }, " "\"rand\" : \"20080C38 18183B52 2614162C 07601D0D\" }, " "\"__v\" : 0" "}"; /* eNB connects to MME */ rv = tests1ap_enb_connect(&sock); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Send S1-Setup Reqeust */ rv = tests1ap_build_setup_req( &sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f64); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive S1-Setup Response */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = s1ap_decode_pdu(&message, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); s1ap_free_pdu(&message); pkbuf_free(recvbuf); collection = mongoc_client_get_collection( context_self()->db_client, context_self()->db_name, "subscribers"); ABTS_PTR_NOTNULL(tc, collection); doc = bson_new_from_json((const uint8_t *)json, -1, &error);; ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_insert(collection, MONGOC_INSERT_NONE, doc, NULL, &error)); bson_destroy(doc); doc = BCON_NEW("imsi", BCON_UTF8("001010123456819")); ABTS_PTR_NOTNULL(tc, doc); do { count = mongoc_collection_count ( collection, MONGOC_QUERY_NONE, doc, 0, 0, NULL, &error); } while (count == 0); bson_destroy(doc); /*********************************************************************** * Attach Request : Known IMSI, Integrity Protected, No Security Context * Send Initial-UE Message + Attach Request + PDN Connectivity */ rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Authentication Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Authentication Response */ rv = tests1ap_build_authentication_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Security mode Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Security mode Complete */ rv = tests1ap_build_security_mode_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive ESM Information Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send ESM Information Response */ rv = tests1ap_build_esm_information_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Initial Context Setup Request + * Attach Accept + * Activate Default Bearer Context Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send UE Capability Info Indication */ rv = tests1ap_build_ue_capability_info_indication(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Initial Context Setup Response */ rv = tests1ap_build_initial_context_setup_response(&sendbuf, 1, 1, 5, 1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Attach Complete + Activate default EPS bearer cotext accept */ rv = tests1ap_build_attach_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive EMM information */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send PDN Connectivity Request */ rv = tests1ap_build_pdn_connectivity_request(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive E-RAB Setup Request + * Activate default EPS bearer context request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send E-RAB Setup Response */ rv = tests1ap_build_e_rab_setup_response(&sendbuf, 1, 1, 6, 2); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Activate default EPS bearer context accept */ rv = tests1ap_build_activate_default_bearer_accept(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive E-RAB Setup Request + * Activate dedicated EPS bearer context request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Activate dedicated EPS bearer context accept */ rv = tests1ap_build_activate_dedicated_bearer_accept(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send E-RAB Setup Response */ rv = tests1ap_build_e_rab_setup_response(&sendbuf, 1, 1, 7, 3); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send PDN disconnectivity request */ rv = tests1ap_build_pdn_disconnectivity_request(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive E-RAB Release Command + * Deactivate EPS bearer context request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send E-RAB Release Response */ rv = tests1ap_build_e_rab_release_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(1000)); /* Deactivate EPS bearer context accept */ rv = tests1ap_build_deactivate_bearer_accept(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send INVALID PDN Connectivity Request */ rv = tests1ap_build_pdn_connectivity_request(&sendbuf, msgindex+1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive PDN Connectivity Reject */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /********** Remove Subscriber in Database */ doc = BCON_NEW("imsi", BCON_UTF8("001010123456819")); ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_remove(collection, MONGOC_REMOVE_SINGLE_REMOVE, doc, NULL, &error)) bson_destroy(doc); mongoc_collection_destroy(collection); /* eNB disonncect from MME */ rv = tests1ap_enb_close(sock); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); } static void volte_test2(abts_case *tc, void *data) { status_t rv; sock_id sock; pkbuf_t *sendbuf; pkbuf_t *recvbuf; s1ap_message_t message; int i; int msgindex = 0; mongoc_collection_t *collection = NULL; bson_t *doc = NULL; c_int64_t count = 0; bson_error_t error; const char *json = "{" "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2b\" }," "\"imsi\" : \"001010123456819\"," "\"pdn\" : [" "{ \"apn\" : \"internet.ng2.mnet\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd32\" }," "\"qos\" : {" "\"qci\" : 9," "\"arp\" : {" "\"priority_level\" : 8," "\"pre_emption_vulnerability\" : 1," "\"pre_emption_capability\" : 1 } }," "\"type\" : 2 }," "{ \"apn\" : \"internet\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2c\" }," "\"pcc_rule\" : [" "{ \"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2d\" }," "\"qos\" : {" "\"qci\" : 1," "\"gbr\" : {" "\"downlink\" : { \"$numberLong\" : \"64\" }," "\"uplink\" : { \"$numberLong\" : \"44\" } }," "\"mbr\" : {" "\"downlink\" : { \"$numberLong\" : \"64\" }," "\"uplink\" : { \"$numberLong\" : \"44\" } }," "\"arp\" : {" "\"priority_level\" : 3," "\"pre_emption_vulnerability\" : 0," "\"pre_emption_capability\" : 0 } }," "\"flow\" : [" "{ \"direction\" : 2," "\"description\" : \"permit out udp from any 1-65535 to 10.200.136.98/32 23454\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd31\" } }," "{ \"direction\" : 1," "\"description\" : \"permit out ip from 45.45.0.1 to any\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd30\" } }," "{ \"direction\" : 2," "\"description\" : \"permit out udp from any 1-65535 to 10.200.136.98/24 23455\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2f\" } }," "{ \"direction\" : 1," "\"description\" : \"permit out ip from cafe::1 to any\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2e\" } } ]" "} ]," "\"ambr\" : {" "\"downlink\" : { \"$numberLong\" : \"35840\" }," "\"uplink\" : { \"$numberLong\" : \"15360\" } }," "\"qos\" : {" "\"qci\" : 6," "\"arp\" : {" "\"priority_level\" : 6," "\"pre_emption_vulnerability\" : 1," "\"pre_emption_capability\" : 1 } }," "\"type\" : 2 }" "]," "\"ambr\" : {" "\"downlink\" : { \"$numberLong\" : \"1024000\" }," "\"uplink\" : { \"$numberLong\" : \"1024000\" } }," "\"subscribed_rau_tau_timer\" : 12," "\"network_access_mode\" : 2," "\"subscriber_status\" : 0," "\"access_restriction_data\" : 32," "\"security\" : {" "\"k\" : \"465B5CE8 B199B49F AA5F0A2E E238A6BC\"," "\"op\" : \"5F1D289C 5D354D0A 140C2548 F5F3E3BA\"," "\"amf\" : \"8000\"," "\"sqn\" : { \"$numberLong\" : \"64\" }, " "\"rand\" : \"20080C38 18183B52 2614162C 07601D0D\" }, " "\"__v\" : 0" "}"; /* eNB connects to MME */ rv = tests1ap_enb_connect(&sock); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Send S1-Setup Reqeust */ rv = tests1ap_build_setup_req( &sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f64); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive S1-Setup Response */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = s1ap_decode_pdu(&message, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); s1ap_free_pdu(&message); pkbuf_free(recvbuf); collection = mongoc_client_get_collection( context_self()->db_client, context_self()->db_name, "subscribers"); ABTS_PTR_NOTNULL(tc, collection); doc = bson_new_from_json((const uint8_t *)json, -1, &error);; ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_insert(collection, MONGOC_INSERT_NONE, doc, NULL, &error)); bson_destroy(doc); doc = BCON_NEW("imsi", BCON_UTF8("001010123456819")); ABTS_PTR_NOTNULL(tc, doc); do { count = mongoc_collection_count ( collection, MONGOC_QUERY_NONE, doc, 0, 0, NULL, &error); } while (count == 0); bson_destroy(doc); /*********************************************************************** * Attach Request : Known IMSI, Integrity Protected, MAC failed * Send Initial-UE Message + Attach Request + PDN Connectivity */ rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Authentication Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Authentication Response */ rv = tests1ap_build_authentication_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Security mode Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Security mode Complete */ rv = tests1ap_build_security_mode_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive ESM Information Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send ESM Information Response */ rv = tests1ap_build_esm_information_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Initial Context Setup Request + * Attach Accept + * Activate Default Bearer Context Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send UE Capability Info Indication */ rv = tests1ap_build_ue_capability_info_indication(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Initial Context Setup Response */ rv = tests1ap_build_initial_context_setup_response(&sendbuf, 16777373, 1, 5, 1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Attach Complete + Activate default EPS bearer cotext accept */ rv = tests1ap_build_attach_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive EMM information */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Receive E-RAB Setup Request + * Activate dedicated EPS bearer context request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send E-RAB Setup Response */ rv = tests1ap_build_e_rab_setup_response(&sendbuf, 33554492, 1, 6, 2); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Activate dedicated EPS bearer context accept */ rv = tests1ap_build_activate_dedicated_bearer_accept(&sendbuf, msgindex+1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); #if 0 /* TFT Rule Tester */ core_sleep(time_from_msec(300)); /* Send GTP-U ICMP Packet */ #if 1 rv = testgtpu_build_ping(&sendbuf, "45.45.0.2", "45.45.0.1"); #else rv = testgtpu_build_ping(&sendbuf, "cafe::2", "cafe::1"); #endif rv = testgtpu_enb_send(sendbuf); core_sleep(time_from_msec(300)); #endif /********** Remove Subscriber in Database */ doc = BCON_NEW("imsi", BCON_UTF8("001010123456819")); ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_remove(collection, MONGOC_REMOVE_SINGLE_REMOVE, doc, NULL, &error)) bson_destroy(doc); mongoc_collection_destroy(collection); /* eNB disonncect from MME */ rv = tests1ap_enb_close(sock); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); } abts_suite *test_volte(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, volte_test1, NULL); abts_run_test(suite, volte_test2, NULL); return suite; } nextepc-0.3.10/test/common/000077500000000000000000000000001333553357400155235ustar00rootroot00000000000000nextepc-0.3.10/test/common/abts.c000066400000000000000000000271711333553357400166300ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "abts.h" #include "testutil.h" #include "core_debug.h" #include "core_pkbuf.h" #define ABTS_STAT_SIZE 6 static char status[ABTS_STAT_SIZE] = {'|', '/', '-', '|', '\\', '-'}; static int curr_char; static int verbose = 1; static int exclude = 0; static int quiet = 0; static int list_tests = 0; int test_only_control_plane = 0; const char **testlist = NULL; extern const struct testlist alltests[]; static int find_test_name(const char *testname) { int i; for (i = 0; testlist[i] != NULL; i++) { if (!strcmp(testlist[i], testname)) { return 1; } } return 0; } /* Determine if the test should be run at all */ static int should_test_run(const char *testname) { int found = 0; if (list_tests == 1) { return 0; } if (testlist == NULL) { return 1; } found = find_test_name(testname); if ((found && !exclude) || (!found && exclude)) { return 1; } return 0; } static void reset_status(void) { curr_char = 0; } static void update_status(void) { if (!quiet) { curr_char = (curr_char + 1) % ABTS_STAT_SIZE; fprintf(stdout, "\b%c", status[curr_char]); fflush(stdout); } } static void end_suite(abts_suite *suite) { if (suite != NULL) { sub_suite *last = suite->tail; if (!quiet) { fprintf(stdout, "\b"); fflush(stdout); } if (last->failed == 0) { fprintf(stdout, "SUCCESS\n"); fflush(stdout); } else { fprintf(stdout, "FAILED %d of %d\n", last->failed, last->num_test); fflush(stdout); } } } abts_suite *abts_add_suite(abts_suite *suite, const char *suite_name_full) { sub_suite *subsuite; char *p; const char *suite_name; curr_char = 0; /* Only end the suite if we actually ran it */ if (suite && suite->tail &&!suite->tail->not_run) { end_suite(suite); } subsuite = core_malloc(sizeof(*subsuite)); subsuite->num_test = 0; subsuite->failed = 0; subsuite->next = NULL; /* suite_name_full may be an absolute path depending on __FILE__ * expansion */ suite_name = strrchr(suite_name_full, '/'); if (suite_name) { suite_name++; } else { suite_name = suite_name_full; } p = strrchr(suite_name, '.'); if (p) { subsuite->name = memcpy(core_calloc(p - suite_name + 1, 1), suite_name, p - suite_name); } else { subsuite->name = suite_name; } if (list_tests) { fprintf(stdout, "%s\n", subsuite->name); } subsuite->not_run = 0; if (suite == NULL) { suite = core_malloc(sizeof(*suite)); suite->head = subsuite; suite->tail = subsuite; } else { suite->tail->next = subsuite; suite->tail = subsuite; } if (!should_test_run(subsuite->name)) { subsuite->not_run = 1; return suite; } reset_status(); fprintf(stdout, "%-20s: ", subsuite->name); update_status(); fflush(stdout); return suite; } void abts_run_test(abts_suite *ts, test_func f, void *value) { abts_case tc; sub_suite *ss; if (!should_test_run(ts->tail->name)) { return; } ss = ts->tail; tc.failed = 0; tc.suite = ss; ss->num_test++; update_status(); f(&tc, value); if (tc.failed) { ss->failed++; } } static int report(abts_suite *suite) { int count = 0; sub_suite *dptr; if (suite && suite->tail &&!suite->tail->not_run) { end_suite(suite); } for (dptr = suite->head; dptr; dptr = dptr->next) { count += dptr->failed; } if (list_tests) { return 0; } if (count == 0) { printf("All tests passed.\n"); return 0; } dptr = suite->head; fprintf(stdout, "%-15s\t\tTotal\tFail\tFailed %%\n", "Failed Tests"); fprintf(stdout, "===================================================\n"); while (dptr != NULL) { if (dptr->failed != 0) { float percent = ((float)dptr->failed / (float)dptr->num_test); fprintf(stdout, "%-15s\t\t%5d\t%4d\t%6.2f%%\n", dptr->name, dptr->num_test, dptr->failed, percent * 100); } dptr = dptr->next; } return 1; } static void abts_free(abts_suite *suite) { sub_suite *ptr = NULL, *next_ptr = NULL; ptr = suite->head; while (ptr != NULL) { next_ptr = ptr->next; CORE_FREE((void*)ptr->name); CORE_FREE(ptr); ptr = next_ptr; } CORE_FREE(suite); } void abts_log_message(const char *fmt, ...) { va_list args; update_status(); if (verbose) { va_start(args, fmt); vfprintf(stderr, fmt, args); va_end(args); fprintf(stderr, "\n"); fflush(stderr); } } void abts_int_equal(abts_case *tc, const int expected, const int actual, int lineno) { update_status(); if (tc->failed) return; if (expected == actual) return; tc->failed = TRUE; if (verbose) { fprintf(stderr, "Line %d: expected <%d>, but saw <%d>\n", lineno, expected, actual); fflush(stderr); } } void abts_int_nequal(abts_case *tc, const int expected, const int actual, int lineno) { update_status(); if (tc->failed) return; if (expected != actual) return; tc->failed = TRUE; if (verbose) { fprintf(stderr, "Line %d: expected <%d>, but saw <%d>\n", lineno, expected, actual); fflush(stderr); } } void abts_size_equal(abts_case *tc, size_t expected, size_t actual, int lineno) { update_status(); if (tc->failed) return; if (expected == actual) return; tc->failed = TRUE; if (verbose) { /* Note that the comparison is type-exact, reporting must be a best-fit */ fprintf(stderr, "Line %d: expected %lu, but saw %lu\n", lineno, (unsigned long)expected, (unsigned long)actual); fflush(stderr); } } void abts_str_equal(abts_case *tc, const char *expected, const char *actual, int lineno) { update_status(); if (tc->failed) return; if (!expected && !actual) return; if (expected && actual) if (!strcmp(expected, actual)) return; tc->failed = TRUE; if (verbose) { fprintf(stderr, "Line %d: expected <%s>, but saw <%s>\n", lineno, expected, actual); fflush(stderr); } } void abts_str_nequal(abts_case *tc, const char *expected, const char *actual, size_t n, int lineno) { update_status(); if (tc->failed) return; if (!strncmp(expected, actual, n)) return; tc->failed = TRUE; if (verbose) { fprintf(stderr, "Line %d: expected <%s>, but saw <%s>\n", lineno, expected, actual); fflush(stderr); } } void abts_ptr_null(abts_case *tc, const void *ptr, int lineno) { update_status(); if (tc->failed) return; if (ptr == NULL) return; tc->failed = TRUE; if (verbose) { fprintf(stderr, "Line %d: Expected NULL, but saw <%p>\n", lineno, ptr); fflush(stderr); } } void abts_ptr_notnull(abts_case *tc, const void *ptr, int lineno) { update_status(); if (tc->failed) return; if (ptr != NULL) return; tc->failed = TRUE; if (verbose) { fprintf(stderr, "Line %d: Expected not NULL, but saw <%p>\n", lineno, ptr); fflush(stderr); } } void abts_ptr_equal(abts_case *tc, const void *expected, const void *actual, int lineno) { update_status(); if (tc->failed) return; if (expected == actual) return; tc->failed = TRUE; if (verbose) { fprintf(stderr, "Line %d: expected <%p>, but saw <%p>\n", lineno, expected, actual); fflush(stderr); } } void abts_fail(abts_case *tc, const char *message, int lineno) { update_status(); if (tc->failed) return; tc->failed = TRUE; if (verbose) { fprintf(stderr, "Line %d: %s\n", lineno, message); fflush(stderr); } } void abts_assert(abts_case *tc, const char *message, int condition, int lineno) { update_status(); if (tc->failed) return; if (condition) return; tc->failed = TRUE; if (verbose) { fprintf(stderr, "Line %d: %s\n", lineno, message); fflush(stderr); } } void abts_true(abts_case *tc, int condition, int lineno) { update_status(); if (tc->failed) return; if (condition) return; tc->failed = TRUE; if (verbose) { fprintf(stderr, "Line %d: Condition is false, but expected true\n", lineno); fflush(stderr); } } void abts_false(abts_case *tc, int condition, int lineno) { update_status(); if (tc->failed) return; if (!condition) return; tc->failed = TRUE; if (verbose) { fprintf(stderr, "Line %d: Condition is true, but expected false\n", lineno); fflush(stderr); } } void abts_not_impl(abts_case *tc, const char *message, int lineno) { update_status(); tc->suite->not_impl++; if (verbose) { fprintf(stderr, "Line %d: %s\n", lineno, message); fflush(stderr); } } int main(int argc, const char *const argv[]) { int i; int rv; int list_provided = 0; abts_suite *suite = NULL; const char *config_path = NULL; d_trace_global_off(); d_log_set_level(D_MSG_TO_STDOUT, D_LOG_LEVEL_ERROR); quiet = !isatty(STDOUT_FILENO); for (i = 1; i < argc; i++) { if (!strcmp(argv[i], "-v")) { verbose = 1; continue; } if (!strcmp(argv[i], "-x")) { exclude = 1; continue; } if (!strcmp(argv[i], "-l")) { list_tests = 1; continue; } if (!strcmp(argv[i], "-q")) { quiet = 1; continue; } if (!strcmp(argv[i], "-t")) { d_trace_global_on(); d_log_set_level(D_MSG_TO_STDOUT, D_LOG_LEVEL_FULL); continue; } if (!strcmp(argv[i], "-f")) { config_path = argv[++i]; continue; } if (!strcmp(argv[i], "-c")) { test_only_control_plane = 1; continue; } if (argv[i][0] == '-') { fprintf(stderr, "Invalid option: `%s'\n", argv[i]); exit(1); } list_provided = 1; } rv = test_initialize(argc, argv, (char*)config_path); if (rv != CORE_OK) return EXIT_FAILURE; if (list_provided) { /* Waste a little space here, because it is easier than counting the * number of tests listed. Besides it is at most three char *. */ testlist = core_calloc(argc + 1, sizeof(char *)); for (i = 1; i < argc; i++) { testlist[i - 1] = argv[i]; } } for (i = 0; alltests[i].func; i++) { suite = alltests[i].func(suite); } rv = report(suite); abts_free(suite); CORE_FREE(testlist); return rv; } nextepc-0.3.10/test/common/abts.h000066400000000000000000000074761333553357400166430ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifdef __cplusplus extern "C" { #endif #include #include #include #include #ifdef WIN32 #include #else #include #endif #ifndef ABTS_H #define ABTS_H #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif struct sub_suite { const char *name; int num_test; int failed; int not_run; int not_impl; struct sub_suite *next; }; typedef struct sub_suite sub_suite; struct abts_suite { sub_suite *head; sub_suite *tail; }; typedef struct abts_suite abts_suite; struct abts_case { int failed; sub_suite *suite; }; typedef struct abts_case abts_case; struct testlist { abts_suite *(*func)(abts_suite *suite); }; typedef void (*test_func)(abts_case *tc, void *data); #define ADD_SUITE(suite) abts_add_suite(suite, __FILE__); abts_suite *abts_add_suite(abts_suite *suite, const char *suite_name); void abts_run_test(abts_suite *ts, test_func f, void *value); void abts_log_message(const char *fmt, ...); void abts_int_equal(abts_case *tc, const int expected, const int actual, int lineno); void abts_int_nequal(abts_case *tc, const int expected, const int actual, int lineno); void abts_str_equal(abts_case *tc, const char *expected, const char *actual, int lineno); void abts_str_nequal(abts_case *tc, const char *expected, const char *actual, size_t n, int lineno); void abts_ptr_null(abts_case *tc, const void *ptr, int lineno); void abts_ptr_notnull(abts_case *tc, const void *ptr, int lineno); void abts_ptr_equal(abts_case *tc, const void *expected, const void *actual, int lineno); void abts_true(abts_case *tc, int condition, int lineno); void abts_false(abts_case *tc, int condition, int lineno); void abts_fail(abts_case *tc, const char *message, int lineno); void abts_not_impl(abts_case *tc, const char *message, int lineno); void abts_assert(abts_case *tc, const char *message, int condition, int lineno); void abts_size_equal(abts_case *tc, size_t expected, size_t actual, int lineno); /* Convenience macros. Ryan hates these! */ #define ABTS_INT_EQUAL(a, b, c) abts_int_equal(a, b, c, __LINE__) #define ABTS_INT_NEQUAL(a, b, c) abts_int_nequal(a, b, c, __LINE__) #define ABTS_STR_EQUAL(a, b, c) abts_str_equal(a, b, c, __LINE__) #define ABTS_STR_NEQUAL(a, b, c, d) abts_str_nequal(a, b, c, d, __LINE__) #define ABTS_PTR_NULL(a, b) abts_ptr_null(a, b, __LINE__) #define ABTS_PTR_NOTNULL(a, b) abts_ptr_notnull(a, b, __LINE__) #define ABTS_PTR_EQUAL(a, b, c) abts_ptr_equal(a, b, c, __LINE__) #define ABTS_TRUE(a, b) abts_true(a, b, __LINE__); #define ABTS_FALSE(a, b) abts_false(a, b, __LINE__); #define ABTS_FAIL(a, b) abts_fail(a, b, __LINE__); #define ABTS_NOT_IMPL(a, b) abts_not_impl(a, b, __LINE__); #define ABTS_ASSERT(a, b, c) abts_assert(a, b, c, __LINE__); #define ABTS_SIZE_EQUAL(a, b, c) abts_size_equal(a, b, c, __LINE__) abts_suite *run_tests(abts_suite *suite); abts_suite *run_tests1(abts_suite *suite); #endif #ifdef __cplusplus } #endif nextepc-0.3.10/test/common/testpacket.c000066400000000000000000002234021333553357400200410ustar00rootroot00000000000000#define TRACE_MODULE _testpacket #include "core_debug.h" #include "core_lib.h" #include "mme/s1ap_build.h" #include "mme/s1ap_conv.h" #include "mme/s1ap_path.h" #include "mme/snow_3g.h" #include "gtp/gtp_message.h" #include "gtp/gtp_conv.h" #include "gtp/gtp_node.h" #include "gtp/gtp_path.h" #include "common/context.h" extern int test_only_control_plane; #define TEST_ENB1_ADDR "127.0.0.5" #define TEST_ENB2_ADDR "127.0.0.4" #if LINUX == 1 #define TEST_ENB1_ADDR6 "fe80::1%lo" #else #define TEST_ENB1_ADDR6 "fe80::1%lo0" #endif static c_sockaddr_t *test_enb1_addr = NULL; static c_sockaddr_t *test_enb1_addr6 = NULL; static c_sockaddr_t *test_enb2_addr = NULL; static c_sockaddr_t *test_enb2_addr6 = NULL; static list_t s1ap_list; static list_t s1ap_list6; status_t testpacket_init() { status_t rv; rv = core_getaddrinfo(&test_enb1_addr, AF_INET, TEST_ENB1_ADDR, GTPV1_U_UDP_PORT, 0); d_assert(rv == CORE_OK, return CORE_ERROR,); /* There is no default link-local address, * If you want to test it, you need set the IPv6 address in some interface */ #if LINUX != 1 rv = core_getaddrinfo(&test_enb1_addr6, AF_INET6, TEST_ENB1_ADDR6, GTPV1_U_UDP_PORT, 0); d_assert(rv == CORE_OK, return CORE_ERROR,); #endif rv = core_getaddrinfo(&test_enb2_addr, AF_INET, TEST_ENB2_ADDR, GTPV1_U_UDP_PORT, 0); d_assert(rv == CORE_OK, return CORE_ERROR,); list_init(&s1ap_list); list_init(&s1ap_list6); rv = sock_probe_node(&s1ap_list, &s1ap_list6, NULL, 36412); d_assert(rv == CORE_OK, return CORE_ERROR,); return CORE_OK; } status_t testpacket_final() { if (test_enb1_addr) { core_freeaddrinfo(test_enb1_addr); test_enb1_addr = NULL; } if (test_enb1_addr6) { core_freeaddrinfo(test_enb1_addr6); test_enb1_addr6 = NULL; } if (test_enb2_addr) { core_freeaddrinfo(test_enb2_addr); test_enb2_addr = NULL; } sock_remove_all_nodes(&s1ap_list); sock_remove_all_nodes(&s1ap_list6); return CORE_OK; } status_t tests1ap_enb_connect(sock_id *new) { status_t rv; sock_node_t *snode = NULL; snode = list_first(&s1ap_list); if (!snode) snode = list_first(&s1ap_list6); d_assert(snode, return CORE_ERROR,); rv = sctp_client(new, SOCK_STREAM, snode->list); d_assert(rv == CORE_OK, return CORE_ERROR,); return CORE_OK; } status_t tests1ap_enb_close(sock_id id) { return s1ap_delete(id); } status_t tests1ap_enb_read(sock_id id, pkbuf_t *recvbuf) { return s1ap_recv(id, recvbuf); } status_t tests1ap_enb_send(sock_id id, pkbuf_t *sendbuf) { return s1ap_send(id, sendbuf, NULL, 0); } status_t tests1ap_build_setup_req( pkbuf_t **pkbuf, S1AP_ENB_ID_PR present, c_uint32_t enb_id) { status_t rv; int tac = 12345; plmn_id_t plmn_id; S1AP_S1AP_PDU_t pdu; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_S1SetupRequest_t *S1SetupRequest = NULL; S1AP_S1SetupRequestIEs_t *ie = NULL; S1AP_Global_ENB_ID_t *Global_ENB_ID = NULL; S1AP_SupportedTAs_t *SupportedTAs = NULL; S1AP_SupportedTAs_Item_t *SupportedTAs_Item = NULL; S1AP_PLMNidentity_t *PLMNidentity = NULL; S1AP_PagingDRX_t *PagingDRX = NULL; memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_initiatingMessage; pdu.choice.initiatingMessage = core_calloc(1, sizeof(S1AP_InitiatingMessage_t)); initiatingMessage = pdu.choice.initiatingMessage; initiatingMessage->procedureCode = S1AP_ProcedureCode_id_S1Setup; initiatingMessage->criticality = S1AP_Criticality_reject; initiatingMessage->value.present = S1AP_InitiatingMessage__value_PR_S1SetupRequest; S1SetupRequest = &initiatingMessage->value.choice.S1SetupRequest; ie = core_calloc(1, sizeof(S1AP_S1SetupRequestIEs_t)); ASN_SEQUENCE_ADD(&S1SetupRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_Global_ENB_ID; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_S1SetupRequestIEs__value_PR_Global_ENB_ID; Global_ENB_ID = &ie->value.choice.Global_ENB_ID; ie = core_calloc(1, sizeof(S1AP_S1SetupRequestIEs_t)); ASN_SEQUENCE_ADD(&S1SetupRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_SupportedTAs; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_S1SetupRequestIEs__value_PR_SupportedTAs; SupportedTAs = &ie->value.choice.SupportedTAs; ie = core_calloc(1, sizeof(S1AP_S1SetupRequestIEs_t)); ASN_SEQUENCE_ADD(&S1SetupRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_DefaultPagingDRX; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_S1SetupRequestIEs__value_PR_PagingDRX; PagingDRX = &ie->value.choice.PagingDRX; plmn_id_build(&plmn_id, 1, 1, 2); s1ap_uint32_to_ENB_ID(present, enb_id, &Global_ENB_ID->eNB_ID); s1ap_buffer_to_OCTET_STRING( &plmn_id, PLMN_ID_LEN, &Global_ENB_ID->pLMNidentity); SupportedTAs_Item = (S1AP_SupportedTAs_Item_t *) core_calloc(1, sizeof(S1AP_SupportedTAs_Item_t)); s1ap_uint16_to_OCTET_STRING(tac, &SupportedTAs_Item->tAC); PLMNidentity = (S1AP_PLMNidentity_t *) core_calloc(1, sizeof(S1AP_PLMNidentity_t)); s1ap_buffer_to_OCTET_STRING( &plmn_id, PLMN_ID_LEN, PLMNidentity); ASN_SEQUENCE_ADD(&SupportedTAs_Item->broadcastPLMNs.list, PLMNidentity); ASN_SEQUENCE_ADD(&SupportedTAs->list, SupportedTAs_Item); *PagingDRX = S1AP_PagingDRX_v64; rv = s1ap_encode_pdu(pkbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } #define TESTS1AP_MAX_MESSAGE 32 status_t tests1ap_build_initial_ue_msg(pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "000c405800000500 0800020001001a00 302f177ca0b38802 0741020809101010" "3254869104e060c0 4000050221d031d1 5c0a003103e5e034 9011035758a65d01" "00004300060000f1 1030390064400800 00f1101079baf000 86400130", "000c40809b000005 000800020002001a 00737217400466af 070741020bf600f1" "10000201fd001710 05e060c040010021 0221d011d1271a80 8021100100001081" "0600000000830600 000000000d00000a 005255f50110225c 0a003103e5c03e13" "55f501aaaa110357 58a6200b601404ef 65233b8878d29040 080402600400021f" "025d0107e0004300 060000f110303900 6440080055f50100 19d0100086400130", "000c40809b00" "0005000800020003 001a007372178c 3e3cff070741020b f600f11000020100" "00000905e060c040 0100210204d011d1 271a808021100100 0010810600000000" "830600000000000d 00000a005255f501 10225c0a003103e5 c03e1355f501aaaa" "11035758a6200b60 1404ef65233b8878 d290400804026004 00021f025d0107e0" "004300060000f110 3039006440080055 f5010019d0100086 400130", "000c406800000500 080002001f001a00 403f074172080910 10103254866202e0" "600021023cd011d1 271a808021100100 0010810600000000 830600000000000d" "00000a005c0a0090 11034f18a6f15d01 00004300060000f1 1030390064400800" "00f110002343d000 86400130", "000c405200000500 0800020011001a 002a2917acba67c4 8207410108091010" "103254866205f0f0 000000000e023cd0 11d1270780000a00 000d00c100430006" "0000f11030390064 40080000f1109d67 aa500086400130", "000c405200000500 0800020021001a 002a2917bcba67c4 8207410108091010" "000000003005f0f0 000000000e023cd0 11d1270780000a00 000d00c100430006" "0000f11030390064 40080000f1109d67 aa500086400130", "000c" "404c000005000800 020002001a002423 0741710809101010 3254767905f0f000" "0000000e0201d011 d1270780000a0000 0d00c10043000600 00f1103039006440" "080000f11054f640 100086400130", "", "000c" "4070000005000800 020001001a004847 0741720809101000 0000002004f07000" "000023020ed03127 1d80802110010000 1081060000000083 0600000000000d00" "000300000a005c0a 003103e5e0349011 035758a65d010000 4300060000f11030" "39006440080000f1 100019b010008640 0130", "000c" "4068000005000800 020001001a00403f 0741720809101010 3254861002e06000" "210207d011d1271a 8080211001000010 8106000000008306 00000000000d0000" "0a005c0a00901103 4f18a6f15d010000 4300060000f11030 39006440080000f1" "1004615380008640 0130", "000c" "4080830000060008 0002000c001a0050 4f1744b524490507 41020bf600f11000" "0201010003e802e0 6000210204d011d1 271a808021100100 0010810600000000" "830600000000000d 00000a005200f110 30395c0a00901103 4f18a6f15d0100e0" "004300060000f110 3039006440080000 f110001f20a00086 400130004b000700" "00f110000201", "", "000c" "4080810000050008 000340072d001a00 5857074172080910 10103254967305e0" "60c0401100270209 d031d12720808021 1001000010810600 0000008306000000" "00000d0000030000 0a000010005c0a00 3103e5e02e901103 5758a64008040260" "0000021f005d0103 c1004300060000f1 1030390064400800 00f1100787b80000" "86400130", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 92, 160, 160, 108, 86, 86, 80, 0, 116, 108, 136, 0, 134, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_identity_response(pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "", "", "000d" "403e000005000000 05c00100009f0008 00020003001a00 121117d7e3248b57" "0756080910101032 5486510064400800 00f11054f6401000 4340060000f1105b" "a0", "", "", "", "", "", "", "", "000d" "403e000005000000 05c0020000c40008 0002000c001a0012 1117c07eb5f50607" "5608091010103254 8651006440080000 f110001f20a00043 40060000f1103039", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 0, 0, 66, 0, 0, 0, 0, 0, 0, 0, 66, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_authentication_response(pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "000d403e00000500 000005c00100009d 000800020001001a 001211177c0bca9d" "030753086a91970e 838fd07900644008 0000f1101079baf0 004340060000f110" "5ba0", "", "", "000d403500000500 0000020001000800 02001f001a000c0b 07530831c964f076" "1378760064400800 00f110002343d000 4340060000f11030 39", "", "", "000d" "4038000005000000 05c0020000c80008 00020002001a000c 0b0753087dc78e7c" "421f9eb900644008 0000f11054f64010 004340060000f110 2b67", "", "000d" "4035000005000000 0200010008000200 01001a000c0b0753 08d8b388ddacaa1f" "36006440080000f1 100019b010004340 060000f1100001", "000d" "4038000005000000 05c0010001da0008 00020001001a000c 0b0753084ce11ef1" "24b1854500644008 0000f11004615380 004340060000f110 5ba0", "000d" "403e000005000000 05c0020000c40008 0002000c001a0012 1117deff957c0707" "5308e3b925330735 7093006440080000 f110001f20a00043 40060000f1103039", "", "000d" "4036000005000000 0200020008000340 072d001a000c0b07 5308e2b7921bc6fe" "b4c9006440080000 f1100787b8000043 40060000f1103039", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 66, 0, 0, 57, 0, 0, 60, 0, 57, 60, 66, 0, 58, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_authentication_failure(pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "", "", "", "000d" "403d000005000000 0200030008000200 21001a001413075c 15300e61640edcfb" "605d25911423ee1f 9e006440080000f1 100019b010004340 060000f1100001", "000d" "402d000005000000 0200030008000200 21001a00040307 5c14006440080000" "f1101a2d10100043 40060000f1100001", "", "", "", "", "", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 0, 0, 0, 65, 49, 0, 0, 0, 0, 0, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_security_mode_complete(pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "000d403500000500 000005c00100009d 000800020001001a 000908476b8f5f64" "00075e0064400800 00f1101079baf000 4340060000f1105b a0", "", "", "000d403200000500 0000020001000800 02001f001a000908 473c0c819e00075e" "006440080000f110 002343d000434006 0000f1103039", "", "", "000d" "4035000005000000 05c0020000c80008 00020002001a0009 0847c0eb1eb80007" "5e006440080000f1 1054f64010004340 060000f1102b67", "", "000d" "4032000005000000 0200010008000200 01001a00090847c8 38f8d700075e0064" "40080000f1100019 b010004340060000 f1100001", "000d" "4035000005000000 05c0010001da0008 00020001001a0009 0847d3b0ef030007" "5e006440080000f1 1004615380004340 060000f1105ba0", "000d" "4035000005000000 05c0020000c40008 0002000c001a0009 084790282df90007" "5e006440080000f1 10001f20a0004340 060000f1103039", "", "000d" "4033000005000000 0200020008000340 072d001a00090847 aaaf94cf00075e00" "6440080000f11007 87b8000043400600 00f1103039", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 57, 0, 0, 54, 0, 0, 57, 0, 54, 57, 57, 0, 55, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_esm_information_response(pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "000d40808d000005 00000005c0010000 9d00080002000100 1a006160275c0667" "58010221da280908 696e7465726e6574 274a80c223150100 001510c09a2626c0" "9a2626c09a2626c0 9a2626c223150200 0015103d3dda5c72 4cc497354ae64653" "45a8088021100100 0010810600000000 830600000000000d 00000a0000644008" "0000f1101079baf0 004340060000f110 5ba0", "000d40808d000005 00000005c0010000 9e00080002000200 1a00616027c963b5" "1b010221da280908 696e7465726e6574 274a80c223150100 001510c09a2626c0" "9a2626c09a2626c0 9a2626c223150200 0015103d3dda5c72 4cc497354ae64653" "45a8088021100100 0010810600000000 830600000000000d 00000a0000644008" "0000f1101079baf0 004340060000f110 5ba0", "", "000d403e00000500 0000020001000800 02001f001a001514 27505a0b5301023c" "da280908696e7465 726e657400644008 0000f110002343d0 004340060000f110" "3039", "000d403e00000500 0000020002000800 020011001a001514 27b531c64f01023c" "da280908696e7465 726e657400644008 0000f110002343d0 004340060000f110" "3039", "", "000d" "4041000005000000 05c0020000c80008 00020002001a0015 142793b2bedc0102" "01da280908696e74 65726e6574006440 080000f11054f640 10004340060000f1" "102b67", "", "", "000d" "4041000005000000 05c0010001da0008 00020001001a0015 14279a2476c80102" "07da280908696e74 65726e6574006440 080000f110046153 80004340060000f1" "105ba0", "000d" "4041000005000000 05c0020000c40008 0002000c001a0015 14274f280bff0102" "04da280908696e74 65726e6574006440 080000f110001f20 a0004340060000f1" "103039", "", "000d" "403f000005000000 0200020008000340 072d001a00151427 c4a524d8010209da" "280908696e746572 6e65740064400800 00f1100787b80000 4340060000f11030" "39", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 146, 146, 0, 66, 66, 0, 69, 0, 0, 69, 69, 0, 67, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_ue_capability_info_indication(pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "0016" "40809c0000030000 0005c00100009d00 0800020001004a40 8085808304040003" "04ec598007000820 81839b4e1e3ff8ff f1ffc7ff8ffe3ffc 7ff1ffe3ff8fff1f" "fc7ff8ffe3ffc7ff 1ffdfd3ffa7a2060 090e194e9525c8c2 fd80000000e03fe7" "ff5f60000000384f e9ffd3d800000002 1033035758a66014 042f6513b8800d2f" "0831c1a53432b259 ef989007000cdd9c 6331200e0019a332 c662401c003200", "", "", "0016402d00000300 0000020001000800 02001f004a401a19 00b801014c598080" "9c000bf06ec4d001 40302c0000000000 000000", "", "", "0016" "403f000003000000 05c0020000c80008 00020002004a4029 28013001023cd980" "00bc000ff06ec4d0 0141b82c00000000 07d404000ef08020 00012a0300008800" "00", "0016" "403f000003000000 05c0020000c70008 00020004004a4029 28013001023cd980" "00bc000ff06ec4d0 0141b82c00000000 07d404000ef08020 00012a0300008800" "00", "", "0016" "4030000003000000 05c0010001da0008 00020001004a401a 1900b801014c5980" "809c000bf06ec4d0 0140302c00000000 0000", "0016" "4030000003000000 05c0020000c40008 0002000c004a401a 1900b801014c5980" "0018000bf06ec4d0 0100302c00000000 0000", "", "0016" "4080800000030000 0002000200080003 40072d004a406c6b 034803042c998001" "08201838bfc1c5fd bd3ffa8a20400902 3a54930382c60000 00001c4083840008" "0881001c40004042 080060e2ff0717f0 0040000203fa0000 0007e8000000020f" "33035758a6601404 e09c100125600031 218d3432b2386200 40008d17960c4008" "001100", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 161, 0, 0, 51, 0, 0, 67, 67, 0, 52, 52, 0, 133, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_initial_context_setup_response( pkbuf_t **pkbuf, c_uint32_t mme_ue_s1ap_id, c_uint32_t enb_ue_s1ap_id, c_uint8_t ebi, c_uint32_t teid) { status_t rv; S1AP_S1AP_PDU_t pdu; S1AP_SuccessfulOutcome_t *successfulOutcome = NULL; S1AP_InitialContextSetupResponse_t *InitialContextSetupResponse = NULL; S1AP_InitialContextSetupResponseIEs_t *ie = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_E_RABSetupListCtxtSURes_t *E_RABSetupListCtxtSURes = NULL; S1AP_E_RABSetupItemCtxtSUResIEs_t *item = NULL; S1AP_E_RABSetupItemCtxtSURes_t *e_rab = NULL; gtp_f_teid_t f_teid; ip_t ip; int len; memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_successfulOutcome; pdu.choice.successfulOutcome = core_calloc(1, sizeof(S1AP_SuccessfulOutcome_t)); successfulOutcome = pdu.choice.successfulOutcome; successfulOutcome->procedureCode = S1AP_ProcedureCode_id_InitialContextSetup; successfulOutcome->criticality = S1AP_Criticality_reject; successfulOutcome->value.present = S1AP_SuccessfulOutcome__value_PR_InitialContextSetupResponse; InitialContextSetupResponse = &successfulOutcome->value.choice.InitialContextSetupResponse; ie = core_calloc(1, sizeof(S1AP_InitialContextSetupResponseIEs_t)); ASN_SEQUENCE_ADD(&InitialContextSetupResponse->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_InitialContextSetupResponseIEs__value_PR_MME_UE_S1AP_ID; MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_InitialContextSetupResponseIEs_t)); ASN_SEQUENCE_ADD(&InitialContextSetupResponse->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_InitialContextSetupResponseIEs__value_PR_ENB_UE_S1AP_ID; ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_InitialContextSetupResponseIEs_t)); ASN_SEQUENCE_ADD(&InitialContextSetupResponse->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_E_RABSetupListCtxtSURes; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_InitialContextSetupResponseIEs__value_PR_E_RABSetupListCtxtSURes; E_RABSetupListCtxtSURes = &ie->value.choice.E_RABSetupListCtxtSURes; *MME_UE_S1AP_ID = mme_ue_s1ap_id; *ENB_UE_S1AP_ID = enb_ue_s1ap_id; item = core_calloc(1, sizeof(S1AP_E_RABSetupItemCtxtSUResIEs_t)); ASN_SEQUENCE_ADD(&E_RABSetupListCtxtSURes->list, item); item->id = S1AP_ProtocolIE_ID_id_E_RABSetupItemCtxtSURes; item->criticality = S1AP_Criticality_ignore; item->value.present = S1AP_E_RABSetupItemCtxtSUResIEs__value_PR_E_RABSetupItemCtxtSURes; e_rab = &item->value.choice.E_RABSetupItemCtxtSURes; e_rab->e_RAB_ID = ebi; rv = gtp_sockaddr_to_f_teid(test_enb1_addr, test_enb1_addr6, &f_teid, &len); d_assert(rv == CORE_OK, return CORE_ERROR,); rv = gtp_f_teid_to_ip(&f_teid, &ip); d_assert(rv == CORE_OK, return CORE_ERROR,); rv = s1ap_ip_to_BIT_STRING(&ip, &e_rab->transportLayerAddress); d_assert(rv == CORE_OK, return CORE_ERROR,); s1ap_uint32_to_OCTET_STRING(teid, &e_rab->gTP_TEID); rv = s1ap_encode_pdu(pkbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } status_t tests1ap_build_initial_context_setup_failure(pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "4009 0015000003000040 0200020008400200 01000240020000", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 25, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_attach_complete(pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "000d" "403a000005000000 05c00100009d0008 00020001001a000e 0d27c183eb950207" "4300035200c20064 40080000f1101079 baf0004340060000 f1105ba0", "000d" "403a000005000000 05c00100009e0008 00020002001a000e 0d27e8a2a3f10207" "4300035200c20064 40080000f1101079 baf0004340060000 f1105ba0", "", "000d" "403a000005000000 05c0000000010008 0002001f001a000e 0d27127c47860207" "4300035200c20064 40080000f1101079 baf0004340060000 f1105ba0", "000d" "403a000005000000 05c0010000020008 00020011001a000e 0d27225d92bb0207" "4300035200c20064 40080000f1101079 baf0004340060000 f1105ba0", "", "000d" "403a000005000000 05c0020000c80008 00020002001a000e 0d27f190fc2b0207" "4300035200c20064 40080000f11054f6 4010004340060000 f1102b67", "", "", "000d" "403a000005000000 05c0010001da0008 00020001001a000e 0d272e3456f70207" "4300035200c20064 40080000f1100461 5380004340060000 f1105ba0", "000d" "403a000005000000 05c0020000c40008 0002000c001a000e 0d276a543e560207" "4300035200c20064 40080000f110001f 20a0004340060000 f1103039", "", "000d" "4038000005000000 0200020008000340 072d001a000e0d27 600bbd3802074300" "035200c200644008 0000f1100787b800 004340060000f110 3039", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 62, 62, 0, 62, 62, 0, 62, 0, 0, 62, 62, 0, 60, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_emm_status(pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "", "", "", "", "", "", "", "", "000d403300000500 0000020001000800 020001001a000a09 276941dec8020760" "65006440080000f1 10002343d0004340 060000f1103039", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 0, 0, 0, 0, 0, 0, 0, 0, 55, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_detach_request(pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "000c404800000600 0800020002001a 001615172ba435db 040745090bf600f1" "10000201020003e6 004300060000f110 2b67006440080000 f1109d67aa500086" "4001300060000600 40020003e6", "000c404800000600 0800020001001a 00161517ba258500 040745090bf600f1" "10000201020003e6 004300060000f110 2b67006440080000 f1109d67aa500086" "4001300060000600 40020003e6", "", "" "" "" "", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 76, 76, 0, 0, 0, 0, 0, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_ue_context_release_request(pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "0012" "4018000003000000 05c00100009d0008 0002000100024002 0280", "", "", "", "", "", "0012" "4018000003000000 05c0020000c80008 0002000200024002 0280", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 28, 0, 0, 0, 0, 0, 28, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_ue_context_release_complete(pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "2017001300000200 004005c00100009e 00084003400002", "2017001300000200 004005c000000001 00084003400001", "2017001200000200 004005c00100009f 000840020003", "2017001300000200 004005c00100009d 00084003400001", "", "2017001300000200 004005c000000003 00084003400021", "2017" "0012000002000040 05c0020000c80008 40020002", "2017" "0012000002000040 05c0020000cb0008 40020026", "2017001200000200 004005c000000001 00084002001f", "2017" "0012000002000040 05c0020000c40008 4002000c", "2017" "0012000002000040 05c0020000c50008 40020008", "2017" "0012000002000040 05c0020000c70008 40020008", "2017" "0010000002000040 0200010008400340 072c", "2017" "0010000002000040 0200030008400340 072e", 0, }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 23, 23, 22, 23, 0, 23, 22, 22, 22, 22, 22, 22, 20, 20, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_service_request(pkbuf_t **pkbuf, c_uint32_t enb_ue_s1ap_id, c_uint8_t seq, c_uint16_t mac, c_uint32_t m_tmsi) { char *payload[TESTS1AP_MAX_MESSAGE] = { "000c" "4037000006000800 020004001a0005 04c7049551004300 060000f110303900" "6440080000f11007 87b8000086400140 0060000600400000 0001", "000c" "4038000006000800 03400700001a0005 04c7049551004300 060000f110303900" "6440080000f11007 87b8000086400140 0060000600400000 0001", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 59, 60, }; char hexbuf[MAX_SDU_LEN]; int i = 0; if (enb_ue_s1ap_id & 0x400000) i = 1; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); enb_ue_s1ap_id = htonl(enb_ue_s1ap_id << 8); memcpy((*pkbuf)->payload + 11, &enb_ue_s1ap_id, 2+i); mac = htons(mac); memcpy((*pkbuf)->payload + 19+i, &seq, 1); memcpy((*pkbuf)->payload + 20+i, &mac, 2); m_tmsi = htonl(m_tmsi); memcpy((*pkbuf)->payload + 55+i, &m_tmsi, 4); return CORE_OK; } status_t tests1ap_build_tau_request(pkbuf_t **pkbuf, int i, c_uint32_t mme_ue_s1ap_id, c_uint32_t enb_ue_s1ap_id, c_uint8_t active_flag, c_uint32_t m_tmsi, c_uint8_t seq, c_uint32_t mac, c_uint8_t *knas_int) { char *payload[TESTS1AP_MAX_MESSAGE] = { /* Initial UE Message */ "000c" "406d000006000800 020035001a003b3a 1797c955d80a0748 010bf600f1100002" "01d900a79e5805f0 f0c040005200f110 30395c1004570220 003103e561249011" "033358a25d0103d0 e0c1004300060000 f110303900644008 0000f11054f64010" "0086400130006000 060040d900a79e", /* Uplink NAS Transport */ "000d" "4063000005000000 0200030008000200 01001a003a39178a c93785030748010b" "f600f110000201d6 004ae05805f070c0 40185200f110303a 5c0a005702200031" "03e5e03490110357 58a65d0100e0c100 6440080000f11000 02cf900043400600" "00f1103039", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 113, 103, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); if (i == 0) { enb_ue_s1ap_id = htonl(enb_ue_s1ap_id << 8); memcpy((*pkbuf)->payload + 11, &enb_ue_s1ap_id, 3); if (active_flag) { char *active_buf = (*pkbuf)->payload + 26; *active_buf |= 0x08; } mac = htonl(mac); memcpy((*pkbuf)->payload + 19, &mac, 4); memcpy((*pkbuf)->payload + 23, &seq, 1); m_tmsi = htonl(m_tmsi); memcpy((*pkbuf)->payload + 109, &m_tmsi, 4); } else if (i == 1) { d_assert(knas_int, return CORE_ERROR,); mme_ue_s1ap_id = htonl(mme_ue_s1ap_id << 8); memcpy((*pkbuf)->payload + 11, &mme_ue_s1ap_id, 3); enb_ue_s1ap_id = htonl(enb_ue_s1ap_id << 8); memcpy((*pkbuf)->payload + 17, &enb_ue_s1ap_id, 3); memcpy((*pkbuf)->payload + 29, &seq, 1); m_tmsi = htonl(m_tmsi); memcpy((*pkbuf)->payload + 41, &m_tmsi, 4); snow_3g_f9(knas_int, seq, (0 << 27), 0, (*pkbuf)->payload + 29, (52 << 3), (*pkbuf)->payload + 25); } else d_assert(0,,); return CORE_OK; } status_t tests1ap_build_pdn_connectivity_request( pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "000d40640000" "0500000002 0001000800020001 001a003b3a277c 81dab50a0205d011" "281208696e746572 6e6574036e673204 6d6e6574271a8080 2110010000108106" "0000000083060000 0000000d00000a00 006440080055f501 0019d01000434006" "0055f5011022", "000d40640000" "0500000002 0001000800020001 001a003b3a2710 3fdafa0a0209d011" "281208706e746572 6e6574036e673204 6d6e6574271a8080 2110010000108106" "0000000083060000 0000000d00000a00 006440080055f501 0019d01000434006" "0055f5011022", "", "", "", "", "", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 108, 108, 0, 0, 0, 0, 0, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_pdn_disconnectivity_request( pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "000d40370000" "0500000005c08000 0108000800020001 001a000b0a2732 423c53040206d206" "006440080055f501 0019d01000434006 0055f5011022", "000d40370000" "0500000005c08000 0108000800020001 001a000b0a2777 693066040206d206" "006440080055f501 0019d01000434006 0055f5011022", "", "", "", "", "", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 59, 59, 0, 0, 0, 0, 0, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_e_rab_setup_response( pkbuf_t **pkbuf, c_uint32_t mme_ue_s1ap_id, c_uint32_t enb_ue_s1ap_id, c_uint8_t ebi, c_uint32_t teid) { status_t rv; S1AP_S1AP_PDU_t pdu; S1AP_SuccessfulOutcome_t *successfulOutcome = NULL; S1AP_E_RABSetupResponse_t *E_RABSetupResponse = NULL; S1AP_E_RABSetupResponseIEs_t *ie = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_E_RABSetupListBearerSURes_t *E_RABSetupListBearerSURes = NULL; S1AP_E_RABSetupItemBearerSUResIEs_t *item = NULL; S1AP_E_RABSetupItemBearerSURes_t *e_rab = NULL; gtp_f_teid_t f_teid; ip_t ip; int len; memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_successfulOutcome; pdu.choice.successfulOutcome = core_calloc(1, sizeof(S1AP_SuccessfulOutcome_t)); successfulOutcome = pdu.choice.successfulOutcome; successfulOutcome->procedureCode = S1AP_ProcedureCode_id_E_RABSetup; successfulOutcome->criticality = S1AP_Criticality_reject; successfulOutcome->value.present = S1AP_SuccessfulOutcome__value_PR_E_RABSetupResponse; E_RABSetupResponse = &successfulOutcome->value.choice.E_RABSetupResponse; ie = core_calloc(1, sizeof(S1AP_E_RABSetupResponseIEs_t)); ASN_SEQUENCE_ADD(&E_RABSetupResponse->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_E_RABSetupResponseIEs__value_PR_MME_UE_S1AP_ID; MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_E_RABSetupResponseIEs_t)); ASN_SEQUENCE_ADD(&E_RABSetupResponse->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_E_RABSetupResponseIEs__value_PR_ENB_UE_S1AP_ID; ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_E_RABSetupResponseIEs_t)); ASN_SEQUENCE_ADD(&E_RABSetupResponse->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_E_RABSetupListBearerSURes; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_E_RABSetupResponseIEs__value_PR_E_RABSetupListBearerSURes; E_RABSetupListBearerSURes = &ie->value.choice.E_RABSetupListBearerSURes; *MME_UE_S1AP_ID = mme_ue_s1ap_id; *ENB_UE_S1AP_ID = enb_ue_s1ap_id; item = core_calloc(1, sizeof(S1AP_E_RABSetupItemBearerSUResIEs_t)); ASN_SEQUENCE_ADD(&E_RABSetupListBearerSURes->list, item); item->id = S1AP_ProtocolIE_ID_id_E_RABSetupItemBearerSURes; item->criticality = S1AP_Criticality_ignore; item->value.present = S1AP_E_RABSetupItemBearerSUResIEs__value_PR_E_RABSetupItemBearerSURes; e_rab = &item->value.choice.E_RABSetupItemBearerSURes; e_rab->e_RAB_ID = ebi; rv = gtp_sockaddr_to_f_teid(test_enb1_addr, test_enb1_addr6, &f_teid, &len); d_assert(rv == CORE_OK, return CORE_ERROR,); rv = gtp_f_teid_to_ip(&f_teid, &ip); d_assert(rv == CORE_OK, return CORE_ERROR,); rv = s1ap_ip_to_BIT_STRING(&ip, &e_rab->transportLayerAddress); d_assert(rv == CORE_OK, return CORE_ERROR,); s1ap_uint32_to_OCTET_STRING(teid, &e_rab->gTP_TEID); rv = s1ap_encode_pdu(pkbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } status_t tests1ap_build_e_rab_modify_response(pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "2006" "001b000003000040 0480000001000840 020001001f400600 002500010e", "", "", "", "", "", "", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 31, 0, 0, 0, 0, 0, 0, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_e_rab_release_response(pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "200700190000" "0300004002 0001000840020001 0045400600000f 40010c", "200700190000" "0300004002 0001000840020001 0045400600000f 40010e", "", "", "", "", "", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 29, 29, 0, 0, 0, 0, 0, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_activate_default_bearer_accept( pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "000d40360000" "0500000005c08000 0107000800020001 001a000a0927e7 f5bb400b6200c200" "6440080055f50100 19d0100043400600 55f5011022", "", "", "", "", "", "", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 58, 0, 0, 0, 0, 0, 59, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_activate_dedicated_bearer_accept( pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "000d403600000500" "000005c000000001 00080002000100 1a000a0927078a5f 34037200c6006440" "080000f1109d67aa 50004340060000f1 102b67", "000d403600000500" "000005c000000001 00080002000100 1a000a0927c035da 96036200c6006440" "080000f1109d67aa 50004340060000f1 102b67", "", "", "", "", "", "", "", "000d403600000500" "000005c00200003c 00080002000100 1a000a0927a27f49 d6036200c6006440" "080000f1109d67aa 50004340060000f1 102b67", "000d" "4036000005000000 05c0020000c40008 0002000c001a000a 0927e3c77e000362" "00c6006440080000 f110001f20a00043 40060000f1103039", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 58, 58, 0, 0, 0, 0, 0, 0, 0, 58, 58, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_modify_bearer_accept( pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "000d" "4035000005000000 0480000001000800 020001001a000a09 27a5c0d564067200" "ca006440080064f0 430020a000004340 060064f043020a", "", "", "", "", "", "", "", "", "", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_deactivate_bearer_accept( pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "000d40330000" "0500000002 0001000800020001 001a000a09274c b2ebbd056200ce00" "6440080055f50100 19d0100043400600 55f5011022", "000d40330000" "0500000002 0001000800020001 001a000a0927a9 a1b2bd057200ce00" "6440080055f50100 19d0100043400600 55f5011022", "000d40330000" "0500000002 0001000800020001 001a000a09277d 7f1f80056200ce00" "6440080055f50100 19d0100043400600 55f5011022", "", "", "", "", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 59, 59, 59, 0, 0, 0, 0, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_path_switch_request( pkbuf_t **pkbuf, int target, c_uint32_t mme_ue_s1ap_id, c_uint32_t enb_ue_s1ap_id, int num_of_bearer, c_uint8_t ebi, c_uint32_t teid) { status_t rv; int i; S1AP_S1AP_PDU_t pdu; S1AP_InitiatingMessage_t *initiatingMessage = NULL; S1AP_PathSwitchRequest_t *PathSwitchRequest = NULL; S1AP_PathSwitchRequestIEs_t *ie = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_E_RABToBeSwitchedDLList_t *E_RABToBeSwitchedDLList = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_EUTRAN_CGI_t *EUTRAN_CGI = NULL; S1AP_TAI_t *TAI = NULL; S1AP_UESecurityCapabilities_t *UESecurityCapabilities = NULL; enb_ue_t *enb_ue = NULL; mme_ue_t *mme_ue = NULL; memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_initiatingMessage; pdu.choice.initiatingMessage = core_calloc(1, sizeof(S1AP_InitiatingMessage_t)); initiatingMessage = pdu.choice.initiatingMessage; initiatingMessage->procedureCode = S1AP_ProcedureCode_id_PathSwitchRequest; initiatingMessage->criticality = S1AP_Criticality_reject; initiatingMessage->value.present = S1AP_InitiatingMessage__value_PR_PathSwitchRequest; PathSwitchRequest = &initiatingMessage->value.choice.PathSwitchRequest; ie = core_calloc(1, sizeof(S1AP_PathSwitchRequestIEs_t)); ASN_SEQUENCE_ADD(&PathSwitchRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_PathSwitchRequestIEs__value_PR_ENB_UE_S1AP_ID; ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_PathSwitchRequestIEs_t)); ASN_SEQUENCE_ADD(&PathSwitchRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_E_RABToBeSwitchedDLList; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_PathSwitchRequestIEs__value_PR_E_RABToBeSwitchedDLList; E_RABToBeSwitchedDLList = &ie->value.choice.E_RABToBeSwitchedDLList; ie = core_calloc(1, sizeof(S1AP_PathSwitchRequestIEs_t)); ASN_SEQUENCE_ADD(&PathSwitchRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_SourceMME_UE_S1AP_ID; ie->criticality = S1AP_Criticality_reject; ie->value.present = S1AP_PathSwitchRequestIEs__value_PR_MME_UE_S1AP_ID; MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_PathSwitchRequestIEs_t)); ASN_SEQUENCE_ADD(&PathSwitchRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_EUTRAN_CGI; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_PathSwitchRequestIEs__value_PR_EUTRAN_CGI; EUTRAN_CGI = &ie->value.choice.EUTRAN_CGI; ie = core_calloc(1, sizeof(S1AP_PathSwitchRequestIEs_t)); ASN_SEQUENCE_ADD(&PathSwitchRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_TAI; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_PathSwitchRequestIEs__value_PR_TAI; TAI = &ie->value.choice.TAI; ie = core_calloc(1, sizeof(S1AP_PathSwitchRequestIEs_t)); ASN_SEQUENCE_ADD(&PathSwitchRequest->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_UESecurityCapabilities; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_PathSwitchRequestIEs__value_PR_UESecurityCapabilities; UESecurityCapabilities = &ie->value.choice.UESecurityCapabilities; *ENB_UE_S1AP_ID = enb_ue_s1ap_id; *MME_UE_S1AP_ID = mme_ue_s1ap_id; enb_ue = enb_ue_find_by_mme_ue_s1ap_id(mme_ue_s1ap_id); d_assert(enb_ue, return CORE_ERROR,); mme_ue = enb_ue->mme_ue; d_assert(mme_ue, return CORE_ERROR,); for (i = 0; i < num_of_bearer; i++) { S1AP_E_RABToBeSwitchedDLItemIEs_t *item = NULL; S1AP_E_RABToBeSwitchedDLItem_t *e_rab = NULL; gtp_f_teid_t f_teid; ip_t ip; int len; item = core_calloc( 1, sizeof(S1AP_E_RABToBeSwitchedDLItemIEs_t)); ASN_SEQUENCE_ADD(&E_RABToBeSwitchedDLList->list, item); item->id = S1AP_ProtocolIE_ID_id_E_RABToBeSwitchedDLItem; item->criticality = S1AP_Criticality_reject; item->value.present = S1AP_E_RABToBeSwitchedDLItemIEs__value_PR_E_RABToBeSwitchedDLItem; e_rab = &item->value.choice.E_RABToBeSwitchedDLItem; e_rab->e_RAB_ID = ebi+i; if (target == 0) rv = gtp_sockaddr_to_f_teid( test_enb1_addr, test_enb1_addr6, &f_teid, &len); else rv = gtp_sockaddr_to_f_teid( test_enb2_addr, NULL, &f_teid, &len); d_assert(rv == CORE_OK, return CORE_ERROR,); rv = gtp_f_teid_to_ip(&f_teid, &ip); d_assert(rv == CORE_OK, return CORE_ERROR,); rv = s1ap_ip_to_BIT_STRING(&ip, &e_rab->transportLayerAddress); d_assert(rv == CORE_OK, return CORE_ERROR,); s1ap_uint32_to_OCTET_STRING(teid+i, &e_rab->gTP_TEID); } s1ap_buffer_to_OCTET_STRING( &mme_ue->e_cgi.plmn_id, PLMN_ID_LEN, &EUTRAN_CGI->pLMNidentity); EUTRAN_CGI->cell_ID.size = 4; EUTRAN_CGI->cell_ID.buf = core_calloc( EUTRAN_CGI->cell_ID.size, sizeof(c_uint8_t)); d_assert(EUTRAN_CGI->cell_ID.buf, return CORE_ERROR,); EUTRAN_CGI->cell_ID.buf[0] = (mme_ue->e_cgi.cell_id >> 24); EUTRAN_CGI->cell_ID.buf[1] = (mme_ue->e_cgi.cell_id >> 16); EUTRAN_CGI->cell_ID.buf[2] = (mme_ue->e_cgi.cell_id >> 8); EUTRAN_CGI->cell_ID.buf[3] = (mme_ue->e_cgi.cell_id); EUTRAN_CGI->cell_ID.bits_unused = 4; s1ap_uint16_to_OCTET_STRING( mme_ue->tai.tac, &TAI->tAC); s1ap_buffer_to_OCTET_STRING( &mme_ue->tai.plmn_id, PLMN_ID_LEN, &TAI->pLMNidentity); UESecurityCapabilities->encryptionAlgorithms.size = 2; UESecurityCapabilities->encryptionAlgorithms.buf = core_calloc(UESecurityCapabilities->encryptionAlgorithms.size, sizeof(c_uint8_t)); UESecurityCapabilities->encryptionAlgorithms.bits_unused = 0; UESecurityCapabilities->encryptionAlgorithms.buf[0] = (mme_ue->ue_network_capability.eea << 1); UESecurityCapabilities->integrityProtectionAlgorithms.size = 2; UESecurityCapabilities->integrityProtectionAlgorithms.buf = core_calloc(UESecurityCapabilities-> integrityProtectionAlgorithms.size, sizeof(c_uint8_t)); UESecurityCapabilities->integrityProtectionAlgorithms.bits_unused = 0; UESecurityCapabilities->integrityProtectionAlgorithms.buf[0] = (mme_ue->ue_network_capability.eia << 1); rv = s1ap_encode_pdu(pkbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } status_t tests1ap_build_handover_required( pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "0000" "0081030000060000 0005c0020000c400 080002000c000100 0100000240020220" "0004000d0000f110 0000043000f11030 3900680080d080ce 4080ab0f1014c598" "00018000bf06ec4d 00100302c0000000 000015a800140672 0af00348f10013d0" "3bc58414903bc588 09401de2c2100440 13f212249010127d ad808fd50398381c" "08fd503983805f50 37868baa010c846f b057874162d62e82 1f42f2e159f821d0" "9c0009e28aa1a001 2d888026d0600040 8008066072003e41 5250d46210208184" "3423c135002214d6 dfb0a0b06502c402 000004008177faab 4677235334a0e867" "213e804030000100 4e40024500004e40 0246000000f11000 043a000000f11000" "1f20a0000022", "0000" "00810e0000060000 0005c0020000c500 0800020008000100 0100000240020220" "0004000d0000f110 00001f2000f11030 3900680080db80d9 4080ab0f1014c598" "00018000bf06ec4d 00100302c0000000 000015a800140672 0af003e8f10013d0" "3bc58414903bc588 09401de2c2100440 13f212249010127d ad808fd50398381c" "08fd503983805f50 37868baa010c846f b057874162d62e82 1f42f2e159f821d0" "9c0009e28aa1a001 2d888050d1bc0040 8008066072000874 1250d46210208184" "3423c135002214d6 dfb0a0b06502c402 000004008177faab 4677235334a0e867" "2134804030000100 4e40024500004e40 0246000000f11000 1f20a10000f11000" "043a000000350000 f110001f20a00000 22", "0000" "0081190000060000 0005c0020000c600 080002000d000100 0100000240020220" "0004000d0000f110 0000043000f11030 3900680080e680e4 4080ab0f1014c598" "00018000bf06ec4d 00100302c0000000 000015a800140672 0af00348f10013d0" "3bc58414903bc588 09401de2c2100440 13f212249010127d ad808fd50398381c" "08fd503983805f50 37868baa010c846f b057874162d62e82 1f42f2e159f821d0" "9c0009e28aa1a001 2d888050514c0040 8008066072003e41 5250d46210208184" "3423c135002214d6 dfb0a0b06502c402 000004008177faab 4677235334a0e867" "213e804030000100 4e40024500004e40 0246000000f11000 043a020000f11000" "1f20a00000340000 f11000043a000000 350000f110001f20 a0000022", "", "", "", "", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 264, 275, 286, 0, 0, 0, 0, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_handover_failure(pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "4001 0012000002000040 05c0020000c5 000240020000", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 22, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } CORE_DECLARE(status_t) tests1ap_build_handover_request_ack( pkbuf_t **pkbuf, int target, c_uint32_t mme_ue_s1ap_id, c_uint32_t enb_ue_s1ap_id, int num_of_bearer, c_uint8_t ebi, c_uint32_t teid) { status_t rv; int i; S1AP_S1AP_PDU_t pdu; S1AP_SuccessfulOutcome_t *successfulOutcome = NULL; S1AP_HandoverRequestAcknowledge_t *HandoverRequestAcknowledge = NULL; S1AP_HandoverRequestAcknowledgeIEs_t *ie = NULL; S1AP_MME_UE_S1AP_ID_t *MME_UE_S1AP_ID = NULL; S1AP_ENB_UE_S1AP_ID_t *ENB_UE_S1AP_ID = NULL; S1AP_E_RABAdmittedList_t *E_RABAdmittedList = NULL; S1AP_E_RABFailedtoSetupListHOReqAck_t *E_RABFailedtoSetupListHOReqAck = NULL; S1AP_Target_ToSource_TransparentContainer_t *Target_ToSource_TransparentContainer = NULL; char hexbuf[MAX_SDU_LEN]; char *payload = "00 80810bf900d8af40 00a0339057801f47 88009e81de2c20a4" "81de2c404a00ef16 2000010044013f21 2249008093efd243 3914cd2aa0a0142f" "f2214d6dfb82c194 0b10080000020040 bbfd55aeab41ad80 8fd50398381c08fd" "503983804d037868 baa016423342bc3a 18b58fa084ca833f a17970acfc10e84e" "0004f14550d00096 c88900"; memset(&pdu, 0, sizeof (S1AP_S1AP_PDU_t)); pdu.present = S1AP_S1AP_PDU_PR_successfulOutcome; pdu.choice.successfulOutcome = core_calloc(1, sizeof(S1AP_SuccessfulOutcome_t)); successfulOutcome = pdu.choice.successfulOutcome; successfulOutcome->procedureCode = S1AP_ProcedureCode_id_HandoverResourceAllocation; successfulOutcome->criticality = S1AP_Criticality_reject; successfulOutcome->value.present = S1AP_SuccessfulOutcome__value_PR_HandoverRequestAcknowledge; HandoverRequestAcknowledge = &successfulOutcome->value.choice.HandoverRequestAcknowledge; ie = core_calloc(1, sizeof(S1AP_HandoverRequestAcknowledgeIEs_t)); ASN_SEQUENCE_ADD(&HandoverRequestAcknowledge->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_HandoverRequestAcknowledgeIEs__value_PR_MME_UE_S1AP_ID; MME_UE_S1AP_ID = &ie->value.choice.MME_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_HandoverRequestAcknowledgeIEs_t)); ASN_SEQUENCE_ADD(&HandoverRequestAcknowledge->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_HandoverRequestAcknowledgeIEs__value_PR_ENB_UE_S1AP_ID; ENB_UE_S1AP_ID = &ie->value.choice.ENB_UE_S1AP_ID; ie = core_calloc(1, sizeof(S1AP_HandoverRequestAcknowledgeIEs_t)); ASN_SEQUENCE_ADD(&HandoverRequestAcknowledge->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_E_RABAdmittedList; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_HandoverRequestAcknowledgeIEs__value_PR_E_RABAdmittedList; E_RABAdmittedList = &ie->value.choice.E_RABAdmittedList; ie = core_calloc(1, sizeof(S1AP_HandoverRequestAcknowledgeIEs_t)); ASN_SEQUENCE_ADD(&HandoverRequestAcknowledge->protocolIEs, ie); ie->id = S1AP_ProtocolIE_ID_id_Target_ToSource_TransparentContainer; ie->criticality = S1AP_Criticality_ignore; ie->value.present = S1AP_HandoverRequestAcknowledgeIEs__value_PR_Target_ToSource_TransparentContainer; Target_ToSource_TransparentContainer = &ie->value.choice.Target_ToSource_TransparentContainer; *MME_UE_S1AP_ID = mme_ue_s1ap_id; *ENB_UE_S1AP_ID = enb_ue_s1ap_id; for (i = 0; i < num_of_bearer; i++) { S1AP_E_RABAdmittedItemIEs_t *item = NULL; S1AP_E_RABAdmittedItem_t *e_rab = NULL; gtp_f_teid_t f_teid; ip_t ip; int len; item = core_calloc(1, sizeof(S1AP_E_RABAdmittedItemIEs_t)); ASN_SEQUENCE_ADD(&E_RABAdmittedList->list, item); item->id = S1AP_ProtocolIE_ID_id_E_RABAdmittedItem; item->criticality = S1AP_Criticality_ignore; item->value.present = S1AP_E_RABAdmittedItemIEs__value_PR_E_RABAdmittedItem; e_rab = &item->value.choice.E_RABAdmittedItem; e_rab->e_RAB_ID = ebi+i; if (target == 0) rv = gtp_sockaddr_to_f_teid( test_enb1_addr, test_enb1_addr6, &f_teid, &len); else rv = gtp_sockaddr_to_f_teid( test_enb2_addr, NULL, &f_teid, &len); d_assert(rv == CORE_OK, return CORE_ERROR,); rv = gtp_f_teid_to_ip(&f_teid, &ip); d_assert(rv == CORE_OK, return CORE_ERROR,); rv = s1ap_ip_to_BIT_STRING(&ip, &e_rab->transportLayerAddress); d_assert(rv == CORE_OK, return CORE_ERROR,); s1ap_uint32_to_OCTET_STRING(teid+i, &e_rab->gTP_TEID); e_rab->dL_transportLayerAddress = (S1AP_TransportLayerAddress_t *) core_calloc(1, sizeof(S1AP_TransportLayerAddress_t)); rv = s1ap_ip_to_BIT_STRING(&ip, e_rab->dL_transportLayerAddress); d_assert(rv == CORE_OK, return CORE_ERROR,); e_rab->dL_gTP_TEID = (S1AP_GTP_TEID_t *) core_calloc(1, sizeof(S1AP_GTP_TEID_t)); s1ap_uint32_to_OCTET_STRING(teid+i+10, e_rab->dL_gTP_TEID); e_rab->uL_TransportLayerAddress = (S1AP_TransportLayerAddress_t *) core_calloc(1, sizeof(S1AP_TransportLayerAddress_t)); rv = s1ap_ip_to_BIT_STRING(&ip, e_rab->uL_TransportLayerAddress); d_assert(rv == CORE_OK, return CORE_ERROR,); e_rab->uL_GTP_TEID = (S1AP_GTP_TEID_t *) core_calloc(1, sizeof(S1AP_GTP_TEID_t)); s1ap_uint32_to_OCTET_STRING(teid+i+20, e_rab->uL_GTP_TEID); } s1ap_buffer_to_OCTET_STRING( CORE_HEX(payload, strlen(payload), hexbuf), 132, Target_ToSource_TransparentContainer); rv = s1ap_encode_pdu(pkbuf, &pdu); s1ap_free_pdu(&pdu); if (rv != CORE_OK) { d_error("s1ap_encode_pdu() failed"); return CORE_ERROR; } return CORE_OK; } status_t tests1ap_build_handover_request_ack_static( pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "2001" "0080e80000040000 4005c0020000c500 0840020008001240 47010014401f78a1" "f07f000001010007 080f807f00000101 0007090f807f0000 010100070a001440" "1f78c1f07f000001 010007100f807f00 0001010007110f80 7f00000101000712" "007b008086808400 80810bf900d8af40 00a0339057801f47 88009e81de2c20a4" "81de2c404a00ef16 2000010044013f21 2249008093efd243 3914cd2aa0a0142f" "f2214d6dfb82c194 0b10080000020040 bbfd55aeab41ad80 8fd50398381c08fd" "503983804d037868 baa016423342bc3a 18b58fa084ca833f a17970acfc10e84e" "0004f14550d00096 c88900", "2001" "0080e80000040000 4005c0020000c600 084002000d001240 47010014401f78a1" "f00a01237b010009 080f800a01237b01 0009090f800a0123 7b0100090a001440" "1f78c1f00a01237b 010009100f800a01 237b010009110f80 0a01237b01000912" "007b008086808400 80810bf900d8af40 00a0339057801a47 88009e81de2c20a4" "81de2c404a00ef16 2000010044013f21 2249008093effa43 3914cd2aa0a0140f" "f2214d6dfb82c194 0b10080000020040 bbfd55aeab01ad80 8fd50398381c08fd" "503983804d037868 baa016423342bc3a 18b58fa084ca833f a17970acfc10e84e" "0004f14550d00096 c88980", "2001" "0080e80000040000 4005c0020000c700 0840020009001240 47010014401f78a1" "f00a01237c010008 080f800a01237c01 0008090f800a0123 7c0100080a001440" "1f78c1f00a01237c 010008100f800a01 237c010008110f80 0a01237c01000812" "007b008086808400 80810bf900d8af40 00a0339057801f47 88009e81de2c20a4" "81de2c404a00ef16 2000010044013f21 2249008093efd243 3914cd2aa0a0144f" "f2214d6dfb82c194 0b10080000020040 bbfd55aeab81ad80 8fd50398381c08fd" "503983804d037868 baa016423342bc3a 18b58fa084ca833f a17970acfc10e84e" "0004f14550d00096 c88a00", "", "", "", "", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 237, 237, 237, 0, 0, 0, 0, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_enb_status_transfer( pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "0018" "4027000003000000 05c0020000c40008 0002000c005a0011 00000059400b0500" "004b000000001100 00", "0018" "4027000003000000 05c0020000c50008 00020008005a0011 00000059400b0500" "00a8000000004100 00", "", "", "", "", "", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 43, 43, 0, 0, 0, 0, 0, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_enb_configuration_transfer( pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "0028" "403b000001008140 3440049699000004 3004969900020004 969900001f200496" "9900020000000098 401341f0ac110e02 0000009940070200 f8ac110e02", "0028" "403b000001008140 344004969900001f 2004969900020004 9699000004300496" "9900020000000098 401341f0ac110e02 0000009940070200 f8ac110e02", "", "", "", "", "", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 63, 63, 0, 0, 0, 0, 0, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_handover_notify(pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "0002" "4028000004000000 05c0020000c50008 0002000800644008 0000f11000043a00" "004340060000f110 3039", "0002" "4028000004000000 05c0020000c60008 0002000d00644008 0000f110001f20a0" "004340060000f110 3039", "", "", "", "", "", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 44, 44, 0, 0, 0, 0, 0, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_handover_cancel(pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "0004" "0018000003000000 05c0020000c60008 0002000d00024002 0120", "", "", "", "", "", "", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 28, 0, 0, 0, 0, 0, 0, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t tests1ap_build_s1_reset(pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "000e001500000200 0240020060005c00 084000005b000220 04", "", "", "", "", "", "", "", "", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 25, 0, 0, 0, 0, 0, 0, 0, 0, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } status_t testgtpu_enb_connect(sock_id *new) { char buf[INET_ADDRSTRLEN]; status_t rv; c_sockaddr_t *addr = NULL; int family = AF_UNSPEC; if (test_only_control_plane) return CORE_OK; family = AF_INET6; if (context_self()->parameter.no_ipv6) family = AF_INET; else if (context_self()->parameter.prefer_ipv4) family = AF_INET; else if (test_enb1_addr6 == NULL) family = AF_INET; rv = udp_socket(new, family); d_assert(rv == CORE_OK, return CORE_ERROR,); if (family == AF_INET) addr = test_enb1_addr; else if (family == AF_INET6) addr = test_enb1_addr6; else d_assert(0, return CORE_ERROR,); d_assert(addr, return CORE_ERROR,); rv = sock_bind(*new, addr); d_assert(rv == CORE_OK, return CORE_ERROR,); return CORE_OK; } status_t testgtpu_enb2_connect(sock_id *new) { status_t rv; int family = AF_UNSPEC; if (test_only_control_plane) return CORE_OK; family = AF_INET; rv = udp_socket(new, family); d_assert(rv == CORE_OK, return CORE_ERROR,); d_assert(test_enb2_addr, return CORE_ERROR,); rv = sock_bind(*new, test_enb2_addr); d_assert(rv == CORE_OK, return CORE_ERROR,); return CORE_OK; } status_t testgtpu_enb_close(sock_id sock) { if (test_only_control_plane) return CORE_OK; return sock_delete(sock); } status_t testgtpu_enb_send(pkbuf_t *sendbuf) { status_t rv; sock_id sock = 0; hash_index_t *hi = NULL; mme_ue_t *mme_ue = NULL; mme_sess_t *sess = NULL; mme_bearer_t *bearer = NULL; c_sockaddr_t sgw; ssize_t sent; if (test_only_control_plane) return 0; hi = mme_ue_first(); d_assert(hi, return -1,); mme_ue = mme_ue_this(hi); d_assert(mme_ue, return -1,); sess = mme_sess_first(mme_ue); d_assert(sess, return -1,); bearer = mme_bearer_first(sess); d_assert(bearer, return -1,); memset(&sgw, 0, sizeof(c_sockaddr_t)); sgw.c_sa_port = htons(GTPV1_U_UDP_PORT); if (bearer->sgw_s1u_ip.ipv6) { sgw.c_sa_family = AF_INET6; if (bearer->sgw_s1u_ip.ipv4) memcpy(sgw.sin6.sin6_addr.s6_addr, bearer->sgw_s1u_ip.both.addr6, IPV6_LEN); else memcpy(sgw.sin6.sin6_addr.s6_addr, bearer->sgw_s1u_ip.addr6, IPV6_LEN); rv = sock_fill_scope_id_in_local(&sgw); d_assert(rv == CORE_OK, return CORE_ERROR,); } else { sgw.c_sa_family = AF_INET; sgw.sin.sin_addr.s_addr = bearer->sgw_s1u_ip.addr; } rv = udp_client(&sock, &sgw); d_assert(rv == CORE_OK, return CORE_ERROR,); sent = core_send(sock, sendbuf->payload, sendbuf->len, 0); pkbuf_free(sendbuf); if (sent < 0 || sent != sendbuf->len) return CORE_ERROR; sock_delete(sock); return CORE_OK; } status_t testgtpu_enb_read(sock_id sock, pkbuf_t *recvbuf) { int rc = 0; if (test_only_control_plane) return 0; while(1) { rc = core_recv(sock, recvbuf->payload, recvbuf->len, 0); if (rc == -2) { continue; } else if (rc <= 0) { if (errno == EAGAIN) { continue; } break; } else { break; } } recvbuf->len = rc; return CORE_OK; } c_uint16_t in_cksum(c_uint16_t *addr, int len); /* from pgw_gtp_path.c */ status_t testgtpu_build_ping( pkbuf_t **sendbuf, const char *src_ip, const char *dst_ip) { status_t rv; pkbuf_t *pkbuf = NULL; gtp_header_t *gtp_h = NULL; ipsubnet_t src_ipsub, dst_ipsub; if (test_only_control_plane) return CORE_OK; d_assert(src_ip, return CORE_ERROR,); d_assert(dst_ip, return CORE_ERROR,); rv = core_ipsubnet(&src_ipsub, src_ip, NULL); d_assert(rv == CORE_OK, return CORE_ERROR,); rv = core_ipsubnet(&dst_ipsub, dst_ip, NULL); d_assert(rv == CORE_OK, return CORE_ERROR,); pkbuf = pkbuf_alloc(0, 200 /* enough for ICMP; use smaller buffer */); d_assert(pkbuf, return CORE_ERROR,); memset(pkbuf->payload, 0, pkbuf->len); gtp_h = (gtp_header_t *)pkbuf->payload; gtp_h->flags = 0x30; gtp_h->type = GTPU_MSGTYPE_GPDU; gtp_h->teid = htonl(1); if (dst_ipsub.family == AF_INET) { struct ip *ip_h = NULL; struct icmp *icmp_h = NULL; gtp_h->length = htons(sizeof *ip_h + ICMP_MINLEN); ip_h = (struct ip *)(pkbuf->payload + GTPV1U_HEADER_LEN); icmp_h = (struct icmp *)((c_uint8_t *)ip_h + sizeof *ip_h); ip_h->ip_v = 4; ip_h->ip_hl = 5; ip_h->ip_tos = 0; ip_h->ip_id = rand(); ip_h->ip_off = 0; ip_h->ip_ttl = 255; ip_h->ip_p = IPPROTO_ICMP; ip_h->ip_len = gtp_h->length; ip_h->ip_src.s_addr = src_ipsub.sub[0]; ip_h->ip_dst.s_addr = dst_ipsub.sub[0]; ip_h->ip_sum = in_cksum((c_uint16_t *)ip_h, sizeof *ip_h); icmp_h->icmp_type = 8; icmp_h->icmp_seq = rand(); icmp_h->icmp_id = rand(); icmp_h->icmp_cksum = in_cksum((c_uint16_t *)icmp_h, ICMP_MINLEN); } else if (dst_ipsub.family == AF_INET6) { struct ip6_hdr *ip6_h = NULL; struct icmp6_hdr *icmp6_h = NULL; c_uint16_t plen = 0; c_uint8_t nxt = 0; c_uint8_t *p = NULL; gtp_h->length = htons(sizeof *ip6_h + sizeof *icmp6_h); plen = htons(sizeof *icmp6_h); nxt = IPPROTO_ICMPV6; p = (c_uint8_t *)pkbuf->payload + GTPV1U_HEADER_LEN; ip6_h = (struct ip6_hdr *)p; icmp6_h = (struct icmp6_hdr *)((c_uint8_t *)ip6_h + sizeof *ip6_h); memcpy(p, src_ipsub.sub, sizeof src_ipsub.sub); p += sizeof src_ipsub.sub; memcpy(p, dst_ipsub.sub, sizeof dst_ipsub.sub); p += sizeof dst_ipsub.sub; p += 2; memcpy(p, &plen, 2); p += 2; p += 3; *p = nxt; p += 1; icmp6_h->icmp6_type = ICMP6_ECHO_REQUEST; icmp6_h->icmp6_seq = rand(); icmp6_h->icmp6_id = rand(); icmp6_h->icmp6_cksum = in_cksum( (c_uint16_t *)ip6_h, sizeof *ip6_h + sizeof *icmp6_h); ip6_h->ip6_flow = htonl(0x60000001); ip6_h->ip6_plen = plen; ip6_h->ip6_nxt = nxt;; ip6_h->ip6_hlim = 0xff; memcpy(ip6_h->ip6_src.s6_addr, src_ipsub.sub, sizeof src_ipsub.sub); memcpy(ip6_h->ip6_dst.s6_addr, dst_ipsub.sub, sizeof dst_ipsub.sub); } else d_assert(0, return CORE_ERROR,); *sendbuf = pkbuf; return CORE_OK; } status_t testgtpu_build_slacc_rs(pkbuf_t **pkbuf, int i) { char *payload[TESTS1AP_MAX_MESSAGE] = { "32ff003400000001 00000000 6000000000083aff fe80000000000000 0000000000000002" "ff02000000000000 0000000000000002 85007d3500000000", }; c_uint16_t len[TESTS1AP_MAX_MESSAGE] = { 60, }; char hexbuf[MAX_SDU_LEN]; *pkbuf = pkbuf_alloc(0, MAX_SDU_LEN); if (!(*pkbuf)) return CORE_ERROR; (*pkbuf)->len = len[i]; memcpy((*pkbuf)->payload, CORE_HEX(payload[i], strlen(payload[i]), hexbuf), (*pkbuf)->len); return CORE_OK; } nextepc-0.3.10/test/common/testpacket.h000066400000000000000000000117411333553357400200470ustar00rootroot00000000000000#ifndef __TESTS1AP_H__ #define __TESTS1AP_H__ #include "core_network.h" #include "core_pkbuf.h" #include "s1ap/s1ap_message.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(status_t) testpacket_init(); CORE_DECLARE(status_t) testpacket_final(); CORE_DECLARE(status_t) tests1ap_enb_connect(sock_id *new); CORE_DECLARE(status_t) tests1ap_enb_close(sock_id id); CORE_DECLARE(status_t) tests1ap_enb_send(sock_id id, pkbuf_t *sendbuf); CORE_DECLARE(status_t) tests1ap_enb_read(sock_id id, pkbuf_t *recvbuf); CORE_DECLARE(status_t) tests1ap_build_setup_req( pkbuf_t **pkbuf, S1AP_ENB_ID_PR present, c_uint32_t enb_id); CORE_DECLARE(status_t) tests1ap_build_initial_ue_msg(pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_identity_response(pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_authentication_response( pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_authentication_failure( pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_security_mode_complete( pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_esm_information_response( pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_ue_capability_info_indication( pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_initial_context_setup_response( pkbuf_t **pkbuf, c_uint32_t mme_ue_s1ap_id, c_uint32_t enb_ue_s1ap_id, c_uint8_t ebi, c_uint32_t teid); CORE_DECLARE(status_t) tests1ap_build_initial_context_setup_failure( pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_attach_complete(pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_emm_status(pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_detach_request(pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_ue_context_release_request( pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_ue_context_release_complete( pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_service_request(pkbuf_t **pkbuf, c_uint32_t enb_ue_s1ap_id, c_uint8_t seq, c_uint16_t mac, c_uint32_t m_tmsi); CORE_DECLARE(status_t) tests1ap_build_tau_request(pkbuf_t **pkbuf, int i, c_uint32_t mme_ue_s1ap_id, c_uint32_t enb_ue_s1ap_id, c_uint8_t active_flag, c_uint32_t m_tmsi, c_uint8_t seq, c_uint32_t mac, c_uint8_t *knas_int); CORE_DECLARE(status_t) tests1ap_build_pdn_connectivity_request( pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_pdn_disconnectivity_request( pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_e_rab_setup_response( pkbuf_t **pkbuf, c_uint32_t mme_ue_s1ap_id, c_uint32_t enb_ue_s1ap_id, c_uint8_t ebi, c_uint32_t teid); CORE_DECLARE(status_t) tests1ap_build_e_rab_modify_response( pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_e_rab_release_response( pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_activate_default_bearer_accept( pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_activate_dedicated_bearer_accept( pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_modify_bearer_accept( pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_deactivate_bearer_accept( pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_path_switch_request( pkbuf_t **pkbuf, int target, c_uint32_t mme_ue_s1ap_id, c_uint32_t enb_ue_s1ap_id, int num_of_bearer, c_uint8_t ebi, c_uint32_t teid); CORE_DECLARE(status_t) tests1ap_build_handover_required(pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_handover_failure(pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_handover_request_ack( pkbuf_t **pkbuf, int target, c_uint32_t mme_ue_s1ap_id, c_uint32_t enb_ue_s1ap_id, int num_of_bearer, c_uint8_t ebi, c_uint32_t teid); CORE_DECLARE(status_t) tests1ap_build_handover_request_ack_static( pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_enb_status_transfer( pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_enb_configuration_transfer( pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_handover_notify(pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_handover_cancel(pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) tests1ap_build_s1_reset(pkbuf_t **pkbuf, int i); CORE_DECLARE(status_t) testgtpu_enb_connect(sock_id *new); CORE_DECLARE(status_t) testgtpu_enb2_connect(sock_id *new); CORE_DECLARE(status_t) testgtpu_enb_close(sock_id sock); CORE_DECLARE(status_t) testgtpu_enb_read(sock_id sock, pkbuf_t *recvbuf); CORE_DECLARE(status_t) testgtpu_enb_send(pkbuf_t *sendbuf); CORE_DECLARE(status_t) testgtpu_build_ping(pkbuf_t **sendbuf, const char *src_ip, const char *dst_ip); CORE_DECLARE(status_t) testgtpu_build_slacc_rs(pkbuf_t **sendbuf, int i); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __TESTS1AP_H__ */ nextepc-0.3.10/test/common/testutil.h000066400000000000000000000033601333553357400175530ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "core_general.h" #include "abts.h" #ifndef __TEST_UTIL__ #define __TEST_UTIL__ /* XXX: FIXME - these all should become much more utilitarian * and part of core, itself */ #ifdef WIN32 #ifdef BINPATH #define TESTBINPATH APR_STRINGIFY(BINPATH) "/" #else #define TESTBINPATH "" #endif #else #define TESTBINPATH "./" #endif #ifdef WIN32 #define EXTENSION ".exe" #elif NETWARE #define EXTENSION ".nlm" #else #define EXTENSION #endif #define STRING_MAX 8096 /* Some simple functions to make the test apps easier to write and * a bit more consistent... */ /* Assert that RV is an CORE_OK value; else fail giving strerror * for RV and CONTEXT message. */ void core_assert_ok(abts_case* tc, const char *context, status_t rv, int lineno); #define CORE_ASSERT_OK(tc, ctxt, rv) \ core_assert_ok(tc, ctxt, rv, __LINE__) status_t test_initialize(int argc, const char *const argv[], char *config_path); #endif /* __TESTUTIL_H__ */ nextepc-0.3.10/test/sample-volte.conf.in000066400000000000000000000123701333553357400201220ustar00rootroot00000000000000db_uri: mongodb://localhost/nextepc logger: trace: app: 1 s1ap: 1 nas: 1 diameter: 1 gtpv2: 1 gtp: 1 parameter: mme: freeDiameter: identity: mme.open-ims.test realm: open-ims.test no_sctp: true # port: 3868 # sec_port: 5868 listen_on: 127.0.0.2 load_extension: - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dbg_msg_dumps/.libs/dbg_msg_dumps.so conf: 0x8888 - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_rfc5777/.libs/dict_rfc5777.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_mip6i/.libs/dict_mip6i.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_nasreq/.libs/dict_nasreq.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_nas_mipv6/.libs/dict_nas_mipv6.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_dcca/.libs/dict_dcca.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_dcca_3gpp/.libs/dict_dcca_3gpp.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_s6a/.libs/dict_s6a.so connect: - identity: hss.open-ims.test addr: 127.0.0.4 # port: 3868 s1ap: gtpc: gummei: plmn_id: mcc: 001 mnc: 01 mme_gid: 2 mme_code: 1 tai: plmn_id: mcc: 001 mnc: 01 tac: 12345 security: integrity_order : [ EIA1, EIA2, EIA0 ] ciphering_order : [ EEA0, EEA1, EEA2 ] hss: freeDiameter: identity: hss.open-ims.test realm: open-ims.test no_sctp: true # port: 3868 # sec_port: 5868 listen_on: 127.0.0.4 load_extension: - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dbg_msg_dumps/.libs/dbg_msg_dumps.so conf: 0x8888 - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_rfc5777/.libs/dict_rfc5777.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_mip6i/.libs/dict_mip6i.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_nasreq/.libs/dict_nasreq.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_nas_mipv6/.libs/dict_nas_mipv6.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_dcca/.libs/dict_dcca.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_dcca_3gpp/.libs/dict_dcca_3gpp.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_s6a/.libs/dict_s6a.so connect: - identity: mme.open-ims.test addr: 127.0.0.2 # port: 3868 sgw: gtpc: addr: 127.0.0.2 gtpu: pgw: freeDiameter: identity: pgw.open-ims.test realm: open-ims.test no_sctp: true # port: 3868 # sec_port: 5868 listen_on: 127.0.0.3 load_extension: - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dbg_msg_dumps/.libs/dbg_msg_dumps.so conf: 0x8888 - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_rfc5777/.libs/dict_rfc5777.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_mip6i/.libs/dict_mip6i.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_nasreq/.libs/dict_nasreq.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_nas_mipv6/.libs/dict_nas_mipv6.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_dcca/.libs/dict_dcca.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_dcca_3gpp/.libs/dict_dcca_3gpp.so connect: - identity: pcrf.open-ims.test addr: 127.0.0.5 # port: 3868 gtpc: addr: - 127.0.0.3 - ::1 gtpu: - addr: 127.0.0.3 - addr: ::1 ue_pool: - addr: 45.45.0.1/16 - addr: cafe::1/64 dns: - 8.8.8.8 - 8.8.4.4 - 2001:4860:4860::8888 - 2001:4860:4860::8844 # # # # o Proxy Call Session Control Function # # p-cscf: # - 127.0.0.1 # - ::1 # pcrf: freeDiameter: identity: pcrf.open-ims.test realm: open-ims.test no_sctp: true # port: 3868 # sec_port: 5868 listen_on: 127.0.0.5 load_extension: - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dbg_msg_dumps/.libs/dbg_msg_dumps.so conf: 0x8888 - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_rfc5777/.libs/dict_rfc5777.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_mip6i/.libs/dict_mip6i.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_nasreq/.libs/dict_nasreq.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_nas_mipv6/.libs/dict_nas_mipv6.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_dcca/.libs/dict_dcca.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_dcca_3gpp/.libs/dict_dcca_3gpp.so connect: - identity: pgw.open-ims.test addr: 127.0.0.3 - identity: pcscf.open-ims.test addr: 127.0.0.1 nextepc-0.3.10/test/sample.conf.in000066400000000000000000000115431333553357400167740ustar00rootroot00000000000000db_uri: mongodb://localhost/nextepc logger: trace: app: 1 s1ap: 1 nas: 1 diameter: 1 gtpv2: 1 gtp: 1 parameter: no_ipv6: true mme: freeDiameter: identity: mme.localdomain realm: localdomain no_sctp: true listen_on: 127.0.0.2 load_extension: - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dbg_msg_dumps/.libs/dbg_msg_dumps.so conf: 0x8888 - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_rfc5777/.libs/dict_rfc5777.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_mip6i/.libs/dict_mip6i.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_nasreq/.libs/dict_nasreq.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_nas_mipv6/.libs/dict_nas_mipv6.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_dcca/.libs/dict_dcca.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_dcca_3gpp/.libs/dict_dcca_3gpp.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_s6a/.libs/dict_s6a.so connect: - identity: hss.localdomain addr: 127.0.0.4 s1ap: gtpc: gummei: plmn_id: mcc: 001 mnc: 01 mme_gid: 2 mme_code: 1 tai: plmn_id: mcc: 001 mnc: 01 tac: 12345 security: integrity_order : [ EIA1, EIA2, EIA0 ] ciphering_order : [ EEA0, EEA1, EEA2 ] hss: freeDiameter: identity: hss.localdomain realm: localdomain no_sctp: true listen_on: 127.0.0.4 load_extension: - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dbg_msg_dumps/.libs/dbg_msg_dumps.so conf: 0x8888 - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_rfc5777/.libs/dict_rfc5777.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_mip6i/.libs/dict_mip6i.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_nasreq/.libs/dict_nasreq.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_nas_mipv6/.libs/dict_nas_mipv6.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_dcca/.libs/dict_dcca.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_dcca_3gpp/.libs/dict_dcca_3gpp.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_s6a/.libs/dict_s6a.so connect: - identity: mme.localdomain addr: 127.0.0.2 sgw: gtpc: addr: 127.0.0.2 gtpu: pgw: freeDiameter: identity: pgw.localdomain realm: localdomain no_sctp: true listen_on: 127.0.0.3 load_extension: - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dbg_msg_dumps/.libs/dbg_msg_dumps.so conf: 0x8888 - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_rfc5777/.libs/dict_rfc5777.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_mip6i/.libs/dict_mip6i.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_nasreq/.libs/dict_nasreq.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_nas_mipv6/.libs/dict_nas_mipv6.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_dcca/.libs/dict_dcca.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_dcca_3gpp/.libs/dict_dcca_3gpp.so connect: - identity: pcrf.localdomain addr: 127.0.0.5 gtpc: addr: - 127.0.0.3 - ::1 gtpu: - addr: 127.0.0.3 - addr: ::1 ue_pool: - addr: 45.45.0.1/16 - addr: cafe::1/64 dns: - 8.8.8.8 - 8.8.4.4 - 2001:4860:4860::8888 - 2001:4860:4860::8844 pcrf: freeDiameter: identity: pcrf.localdomain realm: localdomain no_sctp: true listen_on: 127.0.0.5 load_extension: - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dbg_msg_dumps/.libs/dbg_msg_dumps.so conf: 0x8888 - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_rfc5777/.libs/dict_rfc5777.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_mip6i/.libs/dict_mip6i.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_nasreq/.libs/dict_nasreq.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_nas_mipv6/.libs/dict_nas_mipv6.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_dcca/.libs/dict_dcca.so - module: @abs_top_builddir@/lib/@FREEDIAMETER_DIR@/extensions/dict_dcca_3gpp/.libs/dict_dcca_3gpp.so connect: - identity: pgw.localdomain addr: 127.0.0.3 nextepc-0.3.10/test/testsuite.at000066400000000000000000000016061333553357400166150ustar00rootroot00000000000000AT_INIT AT_BANNER([NextEPC Amazing Tests.]) AT_SETUP([basic]) AT_KEYWORDS([basic]) AT_CHECK_UNQUOTED( [$abs_top_builddir/test/testepc -f $abs_top_builddir/test/sample.conf], [0], [dnl MongoDB URI : 'mongodb://localhost/nextepc' Configuration : '$abs_top_builddir/test/sample.conf' s1ap_message_test : SUCCESS nas_message_test : SUCCESS gtp_message_test : SUCCESS security_test : SUCCESS s1setup_test : SUCCESS attach_test : SUCCESS volte_test : SUCCESS handover_test : SUCCESS All tests passed. ]) AT_CLEANUP AT_SETUP([volte]) AT_KEYWORDS([volte]) AT_CHECK_UNQUOTED( [$abs_top_builddir/test/testvolte -f $abs_top_builddir/test/sample-volte.conf], [0], [dnl MongoDB URI : 'mongodb://localhost/nextepc' Configuration : '$abs_top_builddir/test/sample-volte.conf' volte_test : SUCCESS All tests passed. ]) AT_CLEANUP nextepc-0.3.10/test/volte/000077500000000000000000000000001333553357400153645ustar00rootroot00000000000000nextepc-0.3.10/test/volte/pcscf_fd_path.c000066400000000000000000000763071333553357400203300ustar00rootroot00000000000000#define TRACE_MODULE _pcscf_fd_path #include "core_debug.h" #include "core_pool.h" #include "core_lib.h" #include "core_network.h" #include "3gpp_types.h" #include "gtp/gtp_xact.h" #include "fd/fd_lib.h" #include "fd/rx/rx_dict.h" #include "fd/rx/rx_message.h" #include "pcscf_fd_path.h" #define MAX_NUM_SESSION_STATE 32 static struct session_handler *pcscf_rx_reg = NULL; static struct disp_hdl *hdl_rx_fb = NULL; static struct disp_hdl *hdl_rx_asr = NULL; static fd_config_t fd_config; struct sess_state { os0_t sid; /* Rx Session-Id */ struct timespec ts; /* Time of sending the message */ }; pool_declare(pcscf_rx_sess_pool, struct sess_state, MAX_NUM_SESSION_STATE); static void pcscf_rx_aaa_cb(void *data, struct msg **msg); static void pcscf_rx_sta_cb(void *data, struct msg **msg); static __inline__ struct sess_state *new_state(os0_t sid) { struct sess_state *new = NULL; pool_alloc_node(&pcscf_rx_sess_pool, &new); d_assert(new, return NULL,); memset(new, 0, sizeof *new); new->sid = (os0_t)core_strdup((char *)sid); d_assert(new->sid, return NULL,); return new; } static void state_cleanup(struct sess_state *sess_data, os0_t sid, void *opaque) { if (sess_data->sid) CORE_FREE(sess_data->sid); pool_free_node(&pcscf_rx_sess_pool, sess_data); } static int pcscf_rx_fb_cb(struct msg **msg, struct avp *avp, struct session *sess, void *opaque, enum disp_action *act) { /* This CB should never be called */ d_warn("Unexpected message received!"); return ENOTSUP; } void pcscf_rx_send_aar(c_uint8_t **rx_sid, const char *ip, int qos_type, int flow_presence) { status_t rv; int ret; struct msg *req = NULL; struct avp *avp; struct avp *avpch1, *avpch2; union avp_value val; struct sess_state *sess_data = NULL, *svg; struct session *session = NULL; int new; paa_t paa; ipsubnet_t ipsub; d_assert(rx_sid, return,); d_assert(ip, return,); rv = core_ipsubnet(&ipsub, ip, NULL); d_assert(rv == CORE_OK, return,); /* Create the request */ ret = fd_msg_new(rx_cmd_aar, MSGFL_ALLOC_ETEID, &req); d_assert(ret == 0, return,); { struct msg_hdr * h; ret = fd_msg_hdr( req, &h ); d_assert(ret == 0, return,); h->msg_appl = RX_APPLICATION_ID; } /* Find Diameter Rx Session */ if (*rx_sid) { /* Retrieve session by Session-Id */ size_t sidlen = strlen((char *)*rx_sid); ret = fd_sess_fromsid_msg(*rx_sid, sidlen, &session, &new); d_assert(ret == 0, return,); d_assert(new == 0, return,); /* Add Session-Id to the message */ ret = fd_message_session_id_set(req, *rx_sid, sidlen); d_assert(ret == 0, return,); /* Save the session associated with the message */ ret = fd_msg_sess_set(req, session); } else { /* Create a new session */ #define RX_APP_SID_OPT "app_rx" ret = fd_msg_new_session(req, (os0_t)RX_APP_SID_OPT, CONSTSTRLEN(RX_APP_SID_OPT)); d_assert(ret == 0, return,); ret = fd_msg_sess_get(fd_g_config->cnf_dict, req, &session, NULL); d_assert(ret == 0, return,); } /* Retrieve session state in this session */ ret = fd_sess_state_retrieve(pcscf_rx_reg, session, &sess_data); if (!sess_data) { os0_t sid; size_t sidlen; ret = fd_sess_getsid(session, &sid, &sidlen); d_assert(ret == 0, return,); /* Allocate new session state memory */ sess_data = new_state(sid); d_assert(sess_data, return,); /* Save Session-Id to PGW Session Context */ *rx_sid = sess_data->sid; } /* Set Origin-Host & Origin-Realm */ ret = fd_msg_add_origin(req, 0); d_assert(ret == 0, return,); /* Set the Destination-Realm AVP */ ret = fd_msg_avp_new(fd_destination_realm, 0, &avp); d_assert(ret == 0, return,); val.os.data = (unsigned char *)(fd_g_config->cnf_diamrlm); val.os.len = strlen(fd_g_config->cnf_diamrlm); ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Set the Auth-Application-Id AVP */ ret = fd_msg_avp_new(fd_auth_application_id, 0, &avp); d_assert(ret == 0, return,); val.i32 = RX_APPLICATION_ID; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Set Subscription-Id */ ret = fd_msg_avp_new(rx_subscription_id, 0, &avp); d_assert(ret == 0, return,); ret = fd_msg_avp_new(rx_subscription_id_type, 0, &avpch1); d_assert(ret == 0, return,); val.i32 = RX_SUBSCRIPTION_ID_TYPE_END_USER_IMSI; ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return,); #define RX_APP_IMSI_BCD "0123456789012345" ret = fd_msg_avp_new(rx_subscription_id_data, 0, &avpch1); d_assert(ret == 0, return,); val.os.data = (c_uint8_t *)RX_APP_IMSI_BCD; val.os.len = strlen(RX_APP_IMSI_BCD); ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); if (ipsub.family == AF_INET) { /* Set Framed-IP-Address */ ret = fd_msg_avp_new(rx_framed_ip_address, 0, &avp); d_assert(ret == 0, return,); val.os.data = (c_uint8_t*)ipsub.sub; val.os.len = IPV4_LEN; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); } else if (ipsub.family == AF_INET6) { /* Set Framed-IPv6-Prefix */ ret = fd_msg_avp_new(rx_framed_ipv6_prefix, 0, &avp); d_assert(ret == 0, return,); memset(&paa, 0, sizeof(paa_t)); memcpy(paa.addr6, ipsub.sub, IPV6_LEN); paa.pdn_type = 0x03; #define FRAMED_IPV6_PREFIX_LENGTH 128 /* from spec document */ paa.len = FRAMED_IPV6_PREFIX_LENGTH; val.os.data = (c_uint8_t*)&paa; val.os.len = PAA_IPV6_LEN; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); } /* Set Media-Component-Description */ ret = fd_msg_avp_new(rx_media_component_description, 0, &avp); d_assert(ret == 0, return,); ret = fd_msg_avp_new(rx_media_component_number, 0, &avpch1); d_assert(ret == 0, return,); val.i32 = 1; ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return,); ret = fd_msg_avp_new(rx_media_type, 0, &avpch1); d_assert(ret == 0, return,); val.i32 = RX_MEDIA_TYPE_AUDIO; ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return,); if (qos_type == 1) { ret = fd_msg_avp_new(rx_max_requested_bandwidth_dl, 0, &avpch1); d_assert(ret == 0, return,); val.i32 = 96000; ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return,); ret = fd_msg_avp_new(rx_max_requested_bandwidth_ul, 0, &avpch1); d_assert(ret == 0, return,); val.i32 = 96000; ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return,); ret = fd_msg_avp_new(rx_rr_bandwidth, 0, &avpch1); d_assert(ret == 0, return,); val.i32 = 2400; ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return,); ret = fd_msg_avp_new(rx_rs_bandwidth, 0, &avpch1); d_assert(ret == 0, return,); val.i32 = 2400; ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return,); } else if (qos_type == 2) { ret = fd_msg_avp_new(rx_max_requested_bandwidth_dl, 0, &avpch1); d_assert(ret == 0, return,); val.i32 = 96000; ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return,); ret = fd_msg_avp_new(rx_max_requested_bandwidth_ul, 0, &avpch1); d_assert(ret == 0, return,); val.i32 = 96000; ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return,); ret = fd_msg_avp_new(rx_min_requested_bandwidth_dl, 0, &avpch1); d_assert(ret == 0, return,); val.i32 = 88000; ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return,); ret = fd_msg_avp_new(rx_min_requested_bandwidth_ul, 0, &avpch1); d_assert(ret == 0, return,); val.i32 = 88000; ret = fd_msg_avp_setvalue (avpch1, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return,); } if (flow_presence) { /* Set Media-Sub-Component #1 */ ret = fd_msg_avp_new(rx_media_sub_component, 0, &avpch1); ret = fd_msg_avp_new(rx_flow_number, 0, &avpch2); d_assert(ret == 0, return,); val.i32 = 1; ret = fd_msg_avp_setvalue (avpch2, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avpch1, MSG_BRW_LAST_CHILD, avpch2); d_assert(ret == 0, return,); ret = fd_msg_avp_new(rx_flow_description, 0, &avpch2); d_assert(ret == 0, return,); #define TEST_RX_FLOW_DESC1 \ "permit out 17 from 172.20.166.84 to 172.18.128.20 20001" val.os.data = (c_uint8_t *)TEST_RX_FLOW_DESC1; val.os.len = strlen(TEST_RX_FLOW_DESC1); ret = fd_msg_avp_setvalue (avpch2, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avpch1, MSG_BRW_LAST_CHILD, avpch2); d_assert(ret == 0, return,); ret = fd_msg_avp_new(rx_flow_description, 0, &avpch2); d_assert(ret == 0, return,); #define TEST_RX_FLOW_DESC2 \ "permit in 17 from 172.18.128.20 to 172.20.166.84 20360" val.os.data = (c_uint8_t *)TEST_RX_FLOW_DESC2; val.os.len = strlen(TEST_RX_FLOW_DESC2); ret = fd_msg_avp_setvalue (avpch2, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avpch1, MSG_BRW_LAST_CHILD, avpch2); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return,); /* Set Media-Sub-Component #2 */ ret = fd_msg_avp_new(rx_media_sub_component, 0, &avpch1); ret = fd_msg_avp_new(rx_flow_number, 0, &avpch2); d_assert(ret == 0, return,); val.i32 = 2; ret = fd_msg_avp_setvalue (avpch2, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avpch1, MSG_BRW_LAST_CHILD, avpch2); d_assert(ret == 0, return,); ret = fd_msg_avp_new(rx_flow_usage, 0, &avpch2); d_assert(ret == 0, return,); val.i32 = RX_FLOW_USAGE_RTCP; ret = fd_msg_avp_setvalue (avpch2, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avpch1, MSG_BRW_LAST_CHILD, avpch2); d_assert(ret == 0, return,); ret = fd_msg_avp_new(rx_flow_description, 0, &avpch2); d_assert(ret == 0, return,); #define TEST_RX_FLOW_DESC3 \ "permit out 17 from 172.20.166.84 to 172.18.128.20 20002" val.os.data = (c_uint8_t *)TEST_RX_FLOW_DESC3; val.os.len = strlen(TEST_RX_FLOW_DESC3); ret = fd_msg_avp_setvalue (avpch2, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avpch1, MSG_BRW_LAST_CHILD, avpch2); d_assert(ret == 0, return,); ret = fd_msg_avp_new(rx_flow_description, 0, &avpch2); d_assert(ret == 0, return,); #define TEST_RX_FLOW_DESC4 \ "permit in 17 from 172.18.128.20 to 172.20.166.84 20361" val.os.data = (c_uint8_t *)TEST_RX_FLOW_DESC4; val.os.len = strlen(TEST_RX_FLOW_DESC4); ret = fd_msg_avp_setvalue (avpch2, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avpch1, MSG_BRW_LAST_CHILD, avpch2); d_assert(ret == 0, return,); ret = fd_msg_avp_add (avp, MSG_BRW_LAST_CHILD, avpch1); d_assert(ret == 0, return,); } ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); ret = clock_gettime(CLOCK_REALTIME, &sess_data->ts); d_assert(ret == 0, return,); /* Keep a pointer to the session data for debug purpose, * in real life we would not need it */ svg = sess_data; /* Store this value in the session */ ret = fd_sess_state_store(pcscf_rx_reg, session, &sess_data); d_assert(ret == 0, return,); d_assert(sess_data == NULL,,); /* Send the request */ ret = fd_msg_send(&req, pcscf_rx_aaa_cb, svg); d_assert(ret == 0,,); /* Increment the counter */ d_assert(pthread_mutex_lock(&fd_logger_self()->stats_lock) == 0,,); fd_logger_self()->stats.nb_sent++; d_assert(pthread_mutex_unlock(&fd_logger_self()->stats_lock) == 0,,); } static void pcscf_rx_aaa_cb(void *data, struct msg **msg) { int ret; struct sess_state *sess_data = NULL; struct timespec ts; struct session *session; struct avp *avp, *avpch1; struct avp_hdr *hdr; unsigned long dur; int error = 0; int new; c_int32_t result_code = 0; ret = clock_gettime(CLOCK_REALTIME, &ts); d_assert(ret == 0, return,); /* Search the session, retrieve its data */ ret = fd_msg_sess_get(fd_g_config->cnf_dict, *msg, &session, &new); d_assert(ret == 0, return,); d_assert(new == 0, return, ); ret = fd_sess_state_retrieve(pcscf_rx_reg, session, &sess_data); d_assert(ret == 0, return,); d_assert(sess_data && (void *)sess_data == data, return, ); /* Value of Result Code */ ret = fd_msg_search_avp(*msg, fd_result_code, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); result_code = hdr->avp_value->i32; d_trace(3, "Result Code: %d\n", hdr->avp_value->i32); } else { ret = fd_msg_search_avp(*msg, fd_experimental_result, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_avp_search_avp(avp, fd_experimental_result_code, &avpch1); d_assert(ret == 0, return,); if (avpch1) { ret = fd_msg_avp_hdr(avpch1, &hdr); d_assert(ret == 0, return,); result_code = hdr->avp_value->i32; d_trace(3, "Experimental Result Code: %d\n", result_code); } } else { d_error("no Result-Code"); error++; } } /* Value of Origin-Host */ ret = fd_msg_search_avp(*msg, fd_origin_host, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); d_trace(3, "From '%.*s' ", (int)hdr->avp_value->os.len, hdr->avp_value->os.data); } else { d_error("no_Origin-Host "); error++; } /* Value of Origin-Realm */ ret = fd_msg_search_avp(*msg, fd_origin_realm, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); d_trace(3, "('%.*s') ", (int)hdr->avp_value->os.len, hdr->avp_value->os.data); } else { d_error("no_Origin-Realm "); error++; } if (result_code != ER_DIAMETER_SUCCESS) { d_warn("ERROR DIAMETER Result Code(%d)", result_code); error++; goto out; } out: /* Free the message */ d_assert(pthread_mutex_lock(&fd_logger_self()->stats_lock) == 0,, ); dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) + ((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000); if (fd_logger_self()->stats.nb_recv) { /* Ponderate in the avg */ fd_logger_self()->stats.avg = (fd_logger_self()->stats.avg * fd_logger_self()->stats.nb_recv + dur) / (fd_logger_self()->stats.nb_recv + 1); /* Min, max */ if (dur < fd_logger_self()->stats.shortest) fd_logger_self()->stats.shortest = dur; if (dur > fd_logger_self()->stats.longest) fd_logger_self()->stats.longest = dur; } else { fd_logger_self()->stats.shortest = dur; fd_logger_self()->stats.longest = dur; fd_logger_self()->stats.avg = dur; } if (error) fd_logger_self()->stats.nb_errs++; else fd_logger_self()->stats.nb_recv++; d_assert(pthread_mutex_unlock(&fd_logger_self()->stats_lock) == 0,, ); /* Display how long it took */ if (ts.tv_nsec > sess_data->ts.tv_nsec) d_trace(3, "in %d.%06ld sec\n", (int)(ts.tv_sec - sess_data->ts.tv_sec), (long)(ts.tv_nsec - sess_data->ts.tv_nsec) / 1000); else d_trace(3, "in %d.%06ld sec\n", (int)(ts.tv_sec + 1 - sess_data->ts.tv_sec), (long)(1000000000 + ts.tv_nsec - sess_data->ts.tv_nsec) / 1000); ret = fd_sess_state_store(pcscf_rx_reg, session, &sess_data); d_assert(ret == 0, return,); d_assert(sess_data == NULL, return,); ret = fd_msg_free(*msg); d_assert(ret == 0,,); *msg = NULL; return; } static int pcscf_rx_asr_cb( struct msg **msg, struct avp *avp, struct session *sess, void *opaque, enum disp_action *act) { status_t rv; int ret; struct msg *ans, *qry; struct avp *avpch1, *avpch2, *avpch3; struct avp_hdr *hdr; union avp_value val; struct sess_state *sess_data = NULL; os0_t sid; size_t sidlen; d_assert(msg, return EINVAL,); d_assert(sess, return EINVAL,); ret = fd_sess_state_retrieve(pcscf_rx_reg, sess, &sess_data); d_assert(ret == 0, return EINVAL,); d_assert(sess_data, return EINVAL,); /* Create answer header */ qry = *msg; ret = fd_msg_new_answer_from_req(fd_g_config->cnf_dict, msg, 0); d_assert(ret == 0, return EINVAL,); ans = *msg; /* Set the Auth-Application-Id AVP */ ret = fd_msg_avp_new(fd_auth_application_id, 0, &avp); d_assert(ret == 0, return EINVAL,); val.i32 = RX_APPLICATION_ID; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return EINVAL,); /* Set the Auth-Request-Type AVP */ ret = fd_msg_avp_new(fd_auth_request_type, 0, &avp); d_assert(ret == 0, return EINVAL,); val.i32 = 1; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return EINVAL,); ret = fd_msg_avp_add(ans, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return EINVAL,); /* Get Abort-Cause */ ret = fd_msg_search_avp(qry, rx_abort_cause, &avp); d_assert(ret == 0, return EINVAL,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return EINVAL,); } else { d_error("no_Abort-Cause "); } /* Set the Origin-Host, Origin-Realm, andResult-Code AVPs */ ret = fd_msg_rescode_set(ans, "DIAMETER_SUCCESS", NULL, NULL, 1); d_assert(ret == 0, return EINVAL,); /* Store this value in the session */ sid = sess_data->sid; d_assert(sid,,); ret = fd_sess_state_store(pcscf_rx_reg, sess, &sess_data); d_assert(ret == 0,,); d_assert(sess_data == NULL,,); /* Send the answer */ ret = fd_msg_send(msg, NULL, NULL); d_assert(ret == 0,,); /* Add this value to the stats */ d_assert(pthread_mutex_lock(&fd_logger_self()->stats_lock) == 0,,); fd_logger_self()->stats.nb_echoed++; d_assert(pthread_mutex_unlock(&fd_logger_self()->stats_lock) == 0,,); pcscf_rx_send_str(sid); return 0; } void pcscf_rx_send_str(c_uint8_t *rx_sid) { status_t rv; int ret; struct msg *req = NULL; struct avp *avp; struct avp *avpch1, *avpch2; union avp_value val; struct sess_state *sess_data = NULL, *svg; struct session *session = NULL; int new; d_assert(rx_sid, return,); /* Create the request */ ret = fd_msg_new(rx_cmd_str, MSGFL_ALLOC_ETEID, &req); d_assert(ret == 0, return,); { struct msg_hdr * h; ret = fd_msg_hdr( req, &h ); d_assert(ret == 0, return,); h->msg_appl = RX_APPLICATION_ID; } /* Retrieve session by Session-Id */ size_t sidlen = strlen((char*)rx_sid); ret = fd_sess_fromsid_msg(rx_sid, sidlen, &session, &new); d_assert(ret == 0, return,); d_assert(new == 0, return,); /* Add Session-Id to the message */ ret = fd_message_session_id_set(req, rx_sid, sidlen); d_assert(ret == 0, return,); /* Save the session associated with the message */ ret = fd_msg_sess_set(req, session); /* Retrieve session state in this session */ ret = fd_sess_state_retrieve(pcscf_rx_reg, session, &sess_data); d_assert(ret == 0, return,); d_assert(sess_data, return,); /* Set Origin-Host & Origin-Realm */ ret = fd_msg_add_origin(req, 0); d_assert(ret == 0, return,); /* Set the Destination-Realm AVP */ ret = fd_msg_avp_new(fd_destination_realm, 0, &avp); d_assert(ret == 0, return,); val.os.data = (unsigned char *)(fd_g_config->cnf_diamrlm); val.os.len = strlen(fd_g_config->cnf_diamrlm); ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Set the Auth-Application-Id AVP */ ret = fd_msg_avp_new(fd_auth_application_id, 0, &avp); d_assert(ret == 0, return,); val.i32 = RX_APPLICATION_ID; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Set the Termination-Cause AVP */ ret = fd_msg_avp_new(rx_termination_cause, 0, &avp); d_assert(ret == 0, return,); val.i32 = RX_TERMINATION_CAUSE_DIAMETER_LOGOUT; ret = fd_msg_avp_setvalue(avp, &val); d_assert(ret == 0, return,); ret = fd_msg_avp_add(req, MSG_BRW_LAST_CHILD, avp); d_assert(ret == 0, return,); /* Keep a pointer to the session data for debug purpose, * in real life we would not need it */ svg = sess_data; /* Store this value in the session */ ret = fd_sess_state_store(pcscf_rx_reg, session, &sess_data); d_assert(ret == 0, return,); d_assert(sess_data == NULL,,); /* Send the request */ ret = fd_msg_send(&req, pcscf_rx_sta_cb, svg); d_assert(ret == 0,,); /* Increment the counter */ d_assert(pthread_mutex_lock(&fd_logger_self()->stats_lock) == 0,,); fd_logger_self()->stats.nb_sent++; d_assert(pthread_mutex_unlock(&fd_logger_self()->stats_lock) == 0,,); } static void pcscf_rx_sta_cb(void *data, struct msg **msg) { int ret; struct sess_state *sess_data = NULL; struct timespec ts; struct session *session; struct avp *avp, *avpch1; struct avp_hdr *hdr; unsigned long dur; int error = 0; int new; c_int32_t result_code = 0; ret = clock_gettime(CLOCK_REALTIME, &ts); d_assert(ret == 0, return,); /* Search the session, retrieve its data */ ret = fd_msg_sess_get(fd_g_config->cnf_dict, *msg, &session, &new); d_assert(ret == 0, return,); d_assert(new == 0, return, ); ret = fd_sess_state_retrieve(pcscf_rx_reg, session, &sess_data); d_assert(ret == 0, return,); d_assert(sess_data && (void *)sess_data == data, return, ); /* Value of Result Code */ ret = fd_msg_search_avp(*msg, fd_result_code, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); result_code = hdr->avp_value->i32; d_trace(3, "Result Code: %d\n", hdr->avp_value->i32); } else { ret = fd_msg_search_avp(*msg, fd_experimental_result, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_avp_search_avp(avp, fd_experimental_result_code, &avpch1); d_assert(ret == 0, return,); if (avpch1) { ret = fd_msg_avp_hdr(avpch1, &hdr); d_assert(ret == 0, return,); result_code = hdr->avp_value->i32; d_trace(3, "Experimental Result Code: %d\n", result_code); } } else { d_error("no Result-Code"); error++; } } /* Value of Origin-Host */ ret = fd_msg_search_avp(*msg, fd_origin_host, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); d_trace(3, "From '%.*s' ", (int)hdr->avp_value->os.len, hdr->avp_value->os.data); } else { d_error("no_Origin-Host "); error++; } /* Value of Origin-Realm */ ret = fd_msg_search_avp(*msg, fd_origin_realm, &avp); d_assert(ret == 0, return,); if (avp) { ret = fd_msg_avp_hdr(avp, &hdr); d_assert(ret == 0, return,); d_trace(3, "('%.*s') ", (int)hdr->avp_value->os.len, hdr->avp_value->os.data); } else { d_error("no_Origin-Realm "); error++; } if (result_code != ER_DIAMETER_SUCCESS) { d_warn("ERROR DIAMETER Result Code(%d)", result_code); error++; goto out; } out: /* Free the message */ d_assert(pthread_mutex_lock(&fd_logger_self()->stats_lock) == 0,, ); dur = ((ts.tv_sec - sess_data->ts.tv_sec) * 1000000) + ((ts.tv_nsec - sess_data->ts.tv_nsec) / 1000); if (fd_logger_self()->stats.nb_recv) { /* Ponderate in the avg */ fd_logger_self()->stats.avg = (fd_logger_self()->stats.avg * fd_logger_self()->stats.nb_recv + dur) / (fd_logger_self()->stats.nb_recv + 1); /* Min, max */ if (dur < fd_logger_self()->stats.shortest) fd_logger_self()->stats.shortest = dur; if (dur > fd_logger_self()->stats.longest) fd_logger_self()->stats.longest = dur; } else { fd_logger_self()->stats.shortest = dur; fd_logger_self()->stats.longest = dur; fd_logger_self()->stats.avg = dur; } if (error) fd_logger_self()->stats.nb_errs++; else fd_logger_self()->stats.nb_recv++; d_assert(pthread_mutex_unlock(&fd_logger_self()->stats_lock) == 0,, ); /* Display how long it took */ if (ts.tv_nsec > sess_data->ts.tv_nsec) d_trace(3, "in %d.%06ld sec\n", (int)(ts.tv_sec - sess_data->ts.tv_sec), (long)(ts.tv_nsec - sess_data->ts.tv_nsec) / 1000); else d_trace(3, "in %d.%06ld sec\n", (int)(ts.tv_sec + 1 - sess_data->ts.tv_sec), (long)(1000000000 + ts.tv_nsec - sess_data->ts.tv_nsec) / 1000); state_cleanup(sess_data, NULL, NULL); ret = fd_msg_free(*msg); d_assert(ret == 0,,); *msg = NULL; return; } void pcscf_fd_config() { memset(&fd_config, 0, sizeof(fd_config_t)); fd_config.cnf_diamid = "pcscf.open-ims.test"; fd_config.cnf_diamrlm = "open-ims.test"; fd_config.cnf_port = DIAMETER_PORT; fd_config.cnf_port_tls = DIAMETER_SECURE_PORT; fd_config.cnf_flags.no_sctp = 1; fd_config.cnf_addr = "127.0.0.1"; fd_config.ext[fd_config.num_of_ext].module = FD_EXT_DIR "/dbg_msg_dumps/.libs/dbg_msg_dumps.so"; fd_config.ext[fd_config.num_of_ext].conf = "0x8888"; fd_config.num_of_ext++; fd_config.ext[fd_config.num_of_ext].module = FD_EXT_DIR "/dict_rfc5777/.libs/dict_rfc5777.so"; fd_config.num_of_ext++; fd_config.ext[fd_config.num_of_ext].module = FD_EXT_DIR "/dict_mip6i/.libs/dict_mip6i.so"; fd_config.num_of_ext++; fd_config.ext[fd_config.num_of_ext].module = FD_EXT_DIR "/dict_nasreq/.libs/dict_nasreq.so"; fd_config.num_of_ext++; fd_config.ext[fd_config.num_of_ext].module = FD_EXT_DIR "/dict_nas_mipv6/.libs/dict_nas_mipv6.so"; fd_config.num_of_ext++; fd_config.ext[fd_config.num_of_ext].module = FD_EXT_DIR "/dict_dcca/.libs/dict_dcca.so"; fd_config.num_of_ext++; fd_config.ext[fd_config.num_of_ext].module = FD_EXT_DIR "/dict_dcca_3gpp/.libs/dict_dcca_3gpp.so"; fd_config.num_of_ext++; fd_config.conn[fd_config.num_of_conn].identity = "pcrf.open-ims.test"; fd_config.conn[fd_config.num_of_conn].addr = "127.0.0.5"; fd_config.num_of_conn++; } status_t pcscf_fd_init(void) { int ret; struct disp_when data; pool_init(&pcscf_rx_sess_pool, MAX_NUM_SESSION_STATE); pcscf_fd_config(); ret = fd_init(FD_MODE_CLIENT, NULL, &fd_config); d_assert(ret == 0, return CORE_ERROR,); /* Install objects definitions for this application */ ret = rx_dict_init(); d_assert(ret == 0, return CORE_ERROR,); /* Create handler for sessions */ ret = fd_sess_handler_create(&pcscf_rx_reg, state_cleanup, NULL, NULL); d_assert(ret == 0, return CORE_ERROR,); /* Fallback CB if command != unexpected message received */ memset(&data, 0, sizeof(data)); data.app = rx_application; ret = fd_disp_register(pcscf_rx_fb_cb, DISP_HOW_APPID, &data, NULL, &hdl_rx_fb); d_assert(ret == 0, return CORE_ERROR,); /* Specific handler for Abort-Session-Request */ data.command = rx_cmd_asr; ret = fd_disp_register(pcscf_rx_asr_cb, DISP_HOW_CC, &data, NULL, &hdl_rx_asr); d_assert(ret == 0, return CORE_ERROR,); /* Advertise the support for the application in the peer */ ret = fd_disp_app_support(rx_application, fd_vendor, 1, 0); d_assert(ret == 0, return CORE_ERROR,); return 0; } void pcscf_fd_final(void) { int ret; ret = fd_sess_handler_destroy(&pcscf_rx_reg, NULL); d_assert(ret == 0,,); if (hdl_rx_fb) (void) fd_disp_unregister(&hdl_rx_fb, NULL); if (hdl_rx_asr) (void) fd_disp_unregister(&hdl_rx_asr, NULL); fd_final(); if (pool_used(&pcscf_rx_sess_pool)) d_error("%d not freed in pcscf_rx_sess_pool[%d] of S6A-SM", pool_used(&pcscf_rx_sess_pool), pool_size(&pcscf_rx_sess_pool)); d_trace(5, "%d not freed in pcscf_rx_sess_pool[%d] of S6A-SM\n", pool_used(&pcscf_rx_sess_pool), pool_size(&pcscf_rx_sess_pool)); pool_final(&pcscf_rx_sess_pool); } nextepc-0.3.10/test/volte/pcscf_fd_path.h000066400000000000000000000007401333553357400203210ustar00rootroot00000000000000#ifndef __PCSCF_FD_PATH_H__ #define __PCSCF_FD_PATH_H__ #include "core_errno.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(status_t) pcscf_fd_init(void); CORE_DECLARE(void) pcscf_fd_final(void); CORE_DECLARE(void) pcscf_rx_send_aar(c_uint8_t **rx_sid, const char *ip, int qos_type, int flow_presence); CORE_DECLARE(void) pcscf_rx_send_str(c_uint8_t *rx_sid); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __PCSCF_FD_PATH_H__ */ nextepc-0.3.10/test/volte/testapp.c000066400000000000000000000232231333553357400172120ustar00rootroot00000000000000#define TRACE_MODULE _testapp #include "core_general.h" #include "core_debug.h" #include "core_semaphore.h" #include "common/context.h" #include "common/application.h" #include "app_init.h" static semaphore_id pcrf_sem1 = 0; static semaphore_id pcrf_sem2 = 0; static semaphore_id pgw_sem1 = 0; static semaphore_id pgw_sem2 = 0; static semaphore_id sgw_sem1 = 0; static semaphore_id sgw_sem2 = 0; static semaphore_id hss_sem1 = 0; static semaphore_id hss_sem2 = 0; static semaphore_id mme_sem1 = 0; static semaphore_id mme_sem2 = 0; status_t test_app_initialize( const char *config_path, const char *log_path, const char *pid_path) { pid_t pid; status_t rv; int app = 0; rv = app_will_initialize(config_path, log_path); if (rv != CORE_OK) return rv; app = context_self()->logger.trace.app; if (app) { d_trace_level(&_testapp, app); } /************************* PCRF Process **********************/ semaphore_create(&pcrf_sem1, 0); /* copied to PCRF/PGW/SGW/HSS process */ semaphore_create(&pcrf_sem2, 0); /* copied to PCRF/PGW/SGW/HSS process */ if (context_self()->parameter.no_pcrf == 0) { pid = fork(); d_assert(pid >= 0, _exit(EXIT_FAILURE), "fork() failed"); if (pid == 0) { d_trace(1, "PCRF try to initialize\n"); rv = pcrf_initialize(); d_assert(rv == CORE_OK,, "Failed to intialize PCRF"); d_trace(1, "PCRF initialize...done\n"); if (pcrf_sem1) semaphore_post(pcrf_sem1); if (pcrf_sem2) semaphore_wait(pcrf_sem2); if (rv == CORE_OK) { d_trace(1, "PCRF try to terminate\n"); pcrf_terminate(); d_trace(1, "PCRF terminate...done\n"); } if (pcrf_sem1) semaphore_post(pcrf_sem1); /* allocated from parent process */ if (pcrf_sem1) semaphore_delete(pcrf_sem1); if (pcrf_sem2) semaphore_delete(pcrf_sem2); app_did_terminate(); core_terminate(); _exit(EXIT_SUCCESS); } if (pcrf_sem1) semaphore_wait(pcrf_sem1); } /************************* PGW Process **********************/ semaphore_create(&pgw_sem1, 0); /* copied to PGW/SGW/HSS process */ semaphore_create(&pgw_sem2, 0); /* copied to PGW/SGW/HSS process */ if (context_self()->parameter.no_pgw == 0) { pid = fork(); d_assert(pid >= 0, _exit(EXIT_FAILURE), "fork() failed"); if (pid == 0) { /* allocated from parent process */ if (pcrf_sem1) semaphore_delete(pcrf_sem1); if (pcrf_sem2) semaphore_delete(pcrf_sem2); d_trace(1, "PGW try to initialize\n"); rv = pgw_initialize(); d_assert(rv == CORE_OK,, "Failed to intialize PGW"); d_trace(1, "PGW initialize...done\n"); if (pgw_sem1) semaphore_post(pgw_sem1); if (pgw_sem2) semaphore_wait(pgw_sem2); if (rv == CORE_OK) { d_trace(1, "PGW try to terminate\n"); pgw_terminate(); d_trace(1, "PGW terminate...done\n"); } if (pgw_sem1) semaphore_post(pgw_sem1); /* allocated from parent process */ if (pgw_sem1) semaphore_delete(pgw_sem1); if (pgw_sem2) semaphore_delete(pgw_sem2); app_did_terminate(); core_terminate(); _exit(EXIT_SUCCESS); } if (pgw_sem1) semaphore_wait(pgw_sem1); } /************************* SGW Process **********************/ semaphore_create(&sgw_sem1, 0); /* copied to SGW/HSS process */ semaphore_create(&sgw_sem2, 0); /* copied to SGW/HSS process */ if (context_self()->parameter.no_sgw == 0) { pid = fork(); d_assert(pid >= 0, _exit(EXIT_FAILURE), "fork() failed"); if (pid == 0) { /* allocated from parent process */ if (pcrf_sem1) semaphore_delete(pcrf_sem1); if (pcrf_sem2) semaphore_delete(pcrf_sem2); if (pgw_sem1) semaphore_delete(pgw_sem1); if (pgw_sem2) semaphore_delete(pgw_sem2); d_trace(1, "SGW try to initialize\n"); rv = sgw_initialize(); d_assert(rv == CORE_OK,, "Failed to intialize SGW"); d_trace(1, "SGW initialize...done\n"); if (sgw_sem1) semaphore_post(sgw_sem1); if (sgw_sem2) semaphore_wait(sgw_sem2); if (rv == CORE_OK) { d_trace(1, "SGW try to terminate\n"); sgw_terminate(); d_trace(1, "SGW terminate...done\n"); } if (sgw_sem1) semaphore_post(sgw_sem1); /* allocated from parent process */ if (sgw_sem1) semaphore_delete(sgw_sem1); if (sgw_sem2) semaphore_delete(sgw_sem2); app_did_terminate(); core_terminate(); _exit(EXIT_SUCCESS); } if (sgw_sem1) semaphore_wait(sgw_sem1); } /************************* HSS Process **********************/ semaphore_create(&hss_sem1, 0); /* copied to HSS process */ semaphore_create(&hss_sem2, 0); /* copied to HSS process */ if (context_self()->parameter.no_hss == 0) { pid = fork(); d_assert(pid >= 0, _exit(EXIT_FAILURE), "fork() failed"); if (pid == 0) { /* allocated from parent process */ if (pcrf_sem1) semaphore_delete(pcrf_sem1); if (pcrf_sem2) semaphore_delete(pcrf_sem2); if (pgw_sem1) semaphore_delete(pgw_sem1); if (pgw_sem2) semaphore_delete(pgw_sem2); if (sgw_sem1) semaphore_delete(sgw_sem1); if (sgw_sem2) semaphore_delete(sgw_sem2); d_trace(1, "HSS try to initialize\n"); rv = hss_initialize(); d_assert(rv == CORE_OK,, "Failed to intialize HSS"); d_trace(1, "HSS initialize...done\n"); if (hss_sem1) semaphore_post(hss_sem1); if (hss_sem2) semaphore_wait(hss_sem2); if (rv == CORE_OK) { d_trace(1, "HSS try to terminate\n"); hss_terminate(); d_trace(1, "HSS terminate...done\n"); } if (hss_sem1) semaphore_post(hss_sem1); if (hss_sem1) semaphore_delete(hss_sem1); if (hss_sem2) semaphore_delete(hss_sem2); app_did_terminate(); core_terminate(); _exit(EXIT_SUCCESS); } if (hss_sem1) semaphore_wait(hss_sem1); } /************************* MME Process **********************/ semaphore_create(&mme_sem1, 0); /* copied to MME process */ semaphore_create(&mme_sem2, 0); /* copied to MME process */ /* if (context_self()->parameter.no_mme == 0) */ { pid = fork(); d_assert(pid >= 0, _exit(EXIT_FAILURE), "fork() failed"); if (pid == 0) { /* allocated from parent process */ if (pcrf_sem1) semaphore_delete(pcrf_sem1); if (pcrf_sem2) semaphore_delete(pcrf_sem2); if (pgw_sem1) semaphore_delete(pgw_sem1); if (pgw_sem2) semaphore_delete(pgw_sem2); if (sgw_sem1) semaphore_delete(sgw_sem1); if (sgw_sem2) semaphore_delete(sgw_sem2); if (hss_sem1) semaphore_delete(hss_sem1); if (hss_sem2) semaphore_delete(hss_sem2); d_trace(1, "MME try to initialize\n"); rv = mme_initialize(); d_assert(rv == CORE_OK,, "Failed to intialize MME"); d_trace(1, "MME initialize...done\n"); if (mme_sem1) semaphore_post(mme_sem1); if (mme_sem2) semaphore_wait(mme_sem2); if (rv == CORE_OK) { d_trace(1, "MME try to terminate\n"); mme_terminate(); d_trace(1, "MME terminate...done\n"); } if (mme_sem1) semaphore_post(mme_sem1); if (mme_sem1) semaphore_delete(mme_sem1); if (mme_sem2) semaphore_delete(mme_sem2); app_did_terminate(); core_terminate(); _exit(EXIT_SUCCESS); } if (mme_sem1) semaphore_wait(mme_sem1); } rv = app_did_initialize(); if (rv != CORE_OK) return rv; return CORE_OK;; } void test_app_terminate(void) { app_will_terminate(); /* if (context_self()->parameter.no_mme == 0) */ { if (mme_sem2) semaphore_post(mme_sem2); if (mme_sem1) semaphore_wait(mme_sem1); } if (mme_sem1) semaphore_delete(mme_sem1); if (mme_sem2) semaphore_delete(mme_sem2); if (context_self()->parameter.no_hss == 0) { if (hss_sem2) semaphore_post(hss_sem2); if (hss_sem1) semaphore_wait(hss_sem1); } if (hss_sem1) semaphore_delete(hss_sem1); if (hss_sem2) semaphore_delete(hss_sem2); if (context_self()->parameter.no_sgw == 0) { if (sgw_sem2) semaphore_post(sgw_sem2); if (sgw_sem1) semaphore_wait(sgw_sem1); } if (sgw_sem1) semaphore_delete(sgw_sem1); if (sgw_sem2) semaphore_delete(sgw_sem2); if (context_self()->parameter.no_pgw == 0) { if (pgw_sem2) semaphore_post(pgw_sem2); if (pgw_sem1) semaphore_wait(pgw_sem1); } if (pgw_sem1) semaphore_delete(pgw_sem1); if (pgw_sem2) semaphore_delete(pgw_sem2); if (context_self()->parameter.no_pcrf == 0) { if (pcrf_sem2) semaphore_post(pcrf_sem2); if (pcrf_sem1) semaphore_wait(pcrf_sem1); } if (pcrf_sem1) semaphore_delete(pcrf_sem1); if (pcrf_sem2) semaphore_delete(pcrf_sem2); app_did_terminate(); } nextepc-0.3.10/test/volte/testapp.h000066400000000000000000000006041333553357400172150ustar00rootroot00000000000000#ifndef __TESTAPP_H__ #define __TESTAPP_H__ #include "core.h" #include "core_errno.h" #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ CORE_DECLARE(status_t) test_app_initialize( const char *config_path, const char *log_path, const char *pid_path); CORE_DECLARE(void) test_app_terminate(void); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* __TESTAPP_H__ */ nextepc-0.3.10/test/volte/testutil.c000066400000000000000000000052611333553357400174110ustar00rootroot00000000000000/* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "core_general.h" #include "core_debug.h" #include "core_semaphore.h" #include "core_file.h" #include "fd/fd_lib.h" #include "common/application.h" #include "common/context.h" #include "testpacket.h" #include "testapp.h" #include "abts.h" #include "testutil.h" #include "pcscf_fd_path.h" abts_suite *test_volte(abts_suite *suite); const struct testlist alltests[] = { {test_volte}, {NULL}, }; static int connected_count = 0; static void test_fd_logger_handler(enum fd_hook_type type, struct msg * msg, struct peer_hdr * peer, void * other, struct fd_hook_permsgdata *pmd, void * regdata) { if (type == HOOK_PEER_CONNECT_SUCCESS) { connected_count++; } } void test_terminate(void) { pcscf_fd_final(); testpacket_final(); test_app_terminate(); d_trace_global_on(); core_terminate(); } status_t test_initialize(int argc, const char *const argv[], char *config_path) { status_t rv; char dir[C_PATH_MAX/2]; char conf[C_PATH_MAX]; if (config_path) { strcpy(conf, config_path); } else { path_remove_last_component(dir, argv[0]); if (strstr(dir, ".libs")) path_remove_last_component(dir, dir); sprintf(conf, "%s/sample-volte.conf", dir); } fd_logger_register(test_fd_logger_handler); atexit(test_terminate); core_initialize(); rv = test_app_initialize(conf, NULL, NULL); if (rv != CORE_OK) { d_error("test_app_initialize() failed"); return CORE_ERROR; } rv = pcscf_fd_init(); if (rv != CORE_OK) { d_error("pcscf_fd_init() failed"); return CORE_ERROR; } rv = testpacket_init(); if (rv != CORE_OK) { d_error("testpacket() failed"); return CORE_ERROR; } while(1) { if (connected_count == 1) break; core_sleep(time_from_msec(50)); } return rv; } nextepc-0.3.10/test/volte/volte_test.c000066400000000000000000000556571333553357400177420ustar00rootroot00000000000000 #include "core_debug.h" #include "core_pkbuf.h" #include "core_lib.h" #include "3gpp_types.h" #include #include "s1ap/s1ap_message.h" #include "common/context.h" #include "testutil.h" #include "testpacket.h" #include "pcscf_fd_path.h" static void volte_test1(abts_case *tc, void *data) { status_t rv; sock_id sock; pkbuf_t *sendbuf; pkbuf_t *recvbuf; s1ap_message_t message; int i; int msgindex = 0; c_uint8_t *rx_sid = NULL; mongoc_collection_t *collection = NULL; bson_t *doc = NULL; c_int64_t count = 0; bson_error_t error; const char *json = "{" "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2b\" }," "\"imsi\" : \"001010123456819\"," "\"pdn\" : [" "{ \"apn\" : \"internet\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd32\" }," "\"qos\" : {" "\"qci\" : 9," "\"arp\" : {" "\"priority_level\" : 8," "\"pre_emption_vulnerability\" : 1," "\"pre_emption_capability\" : 1 } }," "\"type\" : 2 }," "{ \"apn\" : \"internet.ng2.mnet\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2c\" }," "\"pcc_rule\" : [" "{ \"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2d\" }," "\"qos\" : {" "\"qci\" : 1," "\"gbr\" : {" "\"downlink\" : { \"$numberLong\" : \"64\" }," "\"uplink\" : { \"$numberLong\" : \"44\" } }," "\"mbr\" : {" "\"downlink\" : { \"$numberLong\" : \"64\" }," "\"uplink\" : { \"$numberLong\" : \"44\" } }," "\"arp\" : {" "\"priority_level\" : 3," "\"pre_emption_vulnerability\" : 0," "\"pre_emption_capability\" : 0 } }" "} ]," "\"ambr\" : {" "\"downlink\" : { \"$numberLong\" : \"35840\" }," "\"uplink\" : { \"$numberLong\" : \"15360\" } }," "\"qos\" : {" "\"qci\" : 6," "\"arp\" : {" "\"priority_level\" : 6," "\"pre_emption_vulnerability\" : 1," "\"pre_emption_capability\" : 1 } }," "\"type\" : 2 }" "]," "\"ambr\" : {" "\"downlink\" : { \"$numberLong\" : \"1024000\" }," "\"uplink\" : { \"$numberLong\" : \"1024000\" } }," "\"subscribed_rau_tau_timer\" : 12," "\"network_access_mode\" : 2," "\"subscriber_status\" : 0," "\"access_restriction_data\" : 32," "\"security\" : {" "\"k\" : \"465B5CE8 B199B49F AA5F0A2E E238A6BC\"," "\"op\" : \"5F1D289C 5D354D0A 140C2548 F5F3E3BA\"," "\"amf\" : \"8000\"," "\"sqn\" : { \"$numberLong\" : \"64\" }, " "\"rand\" : \"20080C38 18183B52 2614162C 07601D0D\" }, " "\"__v\" : 0" "}"; /* eNB connects to MME */ rv = tests1ap_enb_connect(&sock); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Send S1-Setup Reqeust */ rv = tests1ap_build_setup_req( &sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f64); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive S1-Setup Response */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = s1ap_decode_pdu(&message, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); s1ap_free_pdu(&message); pkbuf_free(recvbuf); collection = mongoc_client_get_collection( context_self()->db_client, context_self()->db_name, "subscribers"); ABTS_PTR_NOTNULL(tc, collection); doc = bson_new_from_json((const uint8_t *)json, -1, &error);; ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_insert(collection, MONGOC_INSERT_NONE, doc, NULL, &error)); bson_destroy(doc); doc = BCON_NEW("imsi", BCON_UTF8("001010123456819")); ABTS_PTR_NOTNULL(tc, doc); do { count = mongoc_collection_count ( collection, MONGOC_QUERY_NONE, doc, 0, 0, NULL, &error); } while (count == 0); bson_destroy(doc); /*********************************************************************** * Attach Request : Known IMSI, Integrity Protected, No Security Context * Send Initial-UE Message + Attach Request + PDN Connectivity */ rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Authentication Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Authentication Response */ rv = tests1ap_build_authentication_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Security mode Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Security mode Complete */ rv = tests1ap_build_security_mode_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive ESM Information Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send ESM Information Response */ rv = tests1ap_build_esm_information_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Initial Context Setup Request + * Attach Accept + * Activate Default Bearer Context Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send UE Capability Info Indication */ rv = tests1ap_build_ue_capability_info_indication(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Initial Context Setup Response */ rv = tests1ap_build_initial_context_setup_response(&sendbuf, 1, 1, 5, 1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Send Attach Complete + Activate default EPS bearer cotext accept */ rv = tests1ap_build_attach_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive EMM information */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send PDN Connectivity Request */ rv = tests1ap_build_pdn_connectivity_request(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Receive E-RAB Setup Request + * Activate default EPS bearer context request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send E-RAB Setup Response */ rv = tests1ap_build_e_rab_setup_response(&sendbuf, 1, 1, 6, 2); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Activate default EPS bearer context accept */ rv = tests1ap_build_activate_default_bearer_accept(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send AA-Request */ pcscf_rx_send_aar(&rx_sid, "45.45.0.3", 1, 1); /* Receive E-RAB Setup Request + * Activate dedicated EPS bearer context request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send E-RAB Setup Response */ rv = tests1ap_build_e_rab_setup_response(&sendbuf, 1, 1, 7, 3); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Activate dedicated EPS bearer context accept */ rv = tests1ap_build_activate_dedicated_bearer_accept(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send AA-Request without Flow */ pcscf_rx_send_aar(&rx_sid, "45.45.0.3", 2, 1); /* Receive E-RAB Modify Request + * Modify EPS bearer context request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send E-RAB Modify Response */ rv = tests1ap_build_e_rab_modify_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Modify EPS bearer context accept */ rv = tests1ap_build_modify_bearer_accept(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Session-Termination-Request */ pcscf_rx_send_str(rx_sid); /* Receive E-RAB Release Command + * Dectivate EPS bearer context request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send E-RAB Release Response */ rv = tests1ap_build_e_rab_release_response(&sendbuf, msgindex+1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Deactivate EPS bearer context accept */ rv = tests1ap_build_deactivate_bearer_accept(&sendbuf, msgindex+1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Detach Request */ rv = tests1ap_build_detach_request(&sendbuf, msgindex+1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive UE Context Release Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send UE Context Release Complete */ rv = tests1ap_build_ue_context_release_complete(&sendbuf, msgindex+1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /********** Remove Subscriber in Database */ doc = BCON_NEW("imsi", BCON_UTF8("001010123456819")); ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_remove(collection, MONGOC_REMOVE_SINGLE_REMOVE, doc, NULL, &error)) bson_destroy(doc); mongoc_collection_destroy(collection); /* eNB disonncect from MME */ rv = tests1ap_enb_close(sock); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); } static void volte_test2(abts_case *tc, void *data) { status_t rv; sock_id sock; pkbuf_t *sendbuf; pkbuf_t *recvbuf; s1ap_message_t message; int i; int msgindex = 0; c_uint8_t *rx_sid = NULL; mongoc_collection_t *collection = NULL; bson_t *doc = NULL; c_int64_t count = 0; bson_error_t error; const char *json = "{" "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2b\" }," "\"imsi\" : \"001010123456819\"," "\"pdn\" : [" "{ \"apn\" : \"internet\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd32\" }," "\"qos\" : {" "\"qci\" : 9," "\"arp\" : {" "\"priority_level\" : 8," "\"pre_emption_vulnerability\" : 1," "\"pre_emption_capability\" : 1 } }," "\"type\" : 2 }," "{ \"apn\" : \"internet.ng2.mnet\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2c\" }," "\"pcc_rule\" : [" "{ \"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2d\" }," "\"qos\" : {" "\"qci\" : 1," "\"gbr\" : {" "\"downlink\" : { \"$numberLong\" : \"64\" }," "\"uplink\" : { \"$numberLong\" : \"44\" } }," "\"mbr\" : {" "\"downlink\" : { \"$numberLong\" : \"64\" }," "\"uplink\" : { \"$numberLong\" : \"44\" } }," "\"arp\" : {" "\"priority_level\" : 3," "\"pre_emption_vulnerability\" : 0," "\"pre_emption_capability\" : 0 } }," "\"flow\" : [" "{ \"direction\" : 2," "\"description\" : \"permit out udp from any 1-65535 to 10.200.136.98/32 23454\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd31\" } }," "{ \"direction\" : 1," "\"description\" : \"permit out udp from any 50020 to 10.200.136.98/32 1-65535\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd30\" } }," "{ \"direction\" : 2," "\"description\" : \"permit out udp from any 1-65535 to 10.200.136.98/32 23455\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2f\" } }," "{ \"direction\" : 1," "\"description\" : \"permit out udp from any 50021 to 10.200.136.98/32 1-65535\"," "\"_id\" : { \"$oid\" : \"599eb929c850caabcbfdcd2e\" } } ]" "} ]," "\"ambr\" : {" "\"downlink\" : { \"$numberLong\" : \"35840\" }," "\"uplink\" : { \"$numberLong\" : \"15360\" } }," "\"qos\" : {" "\"qci\" : 6," "\"arp\" : {" "\"priority_level\" : 6," "\"pre_emption_vulnerability\" : 1," "\"pre_emption_capability\" : 1 } }," "\"type\" : 2 }" "]," "\"ambr\" : {" "\"downlink\" : { \"$numberLong\" : \"1024000\" }," "\"uplink\" : { \"$numberLong\" : \"1024000\" } }," "\"subscribed_rau_tau_timer\" : 12," "\"network_access_mode\" : 2," "\"subscriber_status\" : 0," "\"access_restriction_data\" : 32," "\"security\" : {" "\"k\" : \"465B5CE8 B199B49F AA5F0A2E E238A6BC\"," "\"op\" : \"5F1D289C 5D354D0A 140C2548 F5F3E3BA\"," "\"amf\" : \"8000\"," "\"sqn\" : { \"$numberLong\" : \"64\" }, " "\"rand\" : \"20080C38 18183B52 2614162C 07601D0D\" }, " "\"__v\" : 0" "}"; /* eNB connects to MME */ rv = tests1ap_enb_connect(&sock); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Send S1-Setup Reqeust */ rv = tests1ap_build_setup_req( &sendbuf, S1AP_ENB_ID_PR_macroENB_ID, 0x54f64); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive S1-Setup Response */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = s1ap_decode_pdu(&message, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); s1ap_free_pdu(&message); pkbuf_free(recvbuf); collection = mongoc_client_get_collection( context_self()->db_client, context_self()->db_name, "subscribers"); ABTS_PTR_NOTNULL(tc, collection); doc = bson_new_from_json((const uint8_t *)json, -1, &error);; ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_insert(collection, MONGOC_INSERT_NONE, doc, NULL, &error)); bson_destroy(doc); doc = BCON_NEW("imsi", BCON_UTF8("001010123456819")); ABTS_PTR_NOTNULL(tc, doc); do { count = mongoc_collection_count ( collection, MONGOC_QUERY_NONE, doc, 0, 0, NULL, &error); } while (count == 0); bson_destroy(doc); /*********************************************************************** * Attach Request : Known IMSI, Integrity Protected, No Security Context * Send Initial-UE Message + Attach Request + PDN Connectivity */ rv = tests1ap_build_initial_ue_msg(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Authentication Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Authentication Response */ rv = tests1ap_build_authentication_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Security mode Command */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Security mode Complete */ rv = tests1ap_build_security_mode_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive ESM Information Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send ESM Information Response */ rv = tests1ap_build_esm_information_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive Initial Context Setup Request + * Attach Accept + * Activate Default Bearer Context Request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send UE Capability Info Indication */ rv = tests1ap_build_ue_capability_info_indication(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Initial Context Setup Response */ rv = tests1ap_build_initial_context_setup_response(&sendbuf, 1, 1, 5, 1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Send Attach Complete + Activate default EPS bearer cotext accept */ rv = tests1ap_build_attach_complete(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive EMM information */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send PDN Connectivity Request */ rv = tests1ap_build_pdn_connectivity_request(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Receive E-RAB Setup Request + * Activate default EPS bearer context request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send E-RAB Setup Response */ rv = tests1ap_build_e_rab_setup_response(&sendbuf, 1, 1, 6, 2); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Activate default EPS bearer context accept */ rv = tests1ap_build_activate_default_bearer_accept(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive E-RAB Setup Request + * Activate dedicated EPS bearer context request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Activate dedicated EPS bearer context accept */ rv = tests1ap_build_activate_dedicated_bearer_accept(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send E-RAB Setup Response */ rv = tests1ap_build_e_rab_setup_response(&sendbuf, 1, 1, 7, 3); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send AA-Request */ pcscf_rx_send_aar(&rx_sid, "45.45.0.5", 0, 1); /* Receive downlink NAS transport + * Modify EPS bearer context request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send Modify EPS bearer context accept */ rv = tests1ap_build_modify_bearer_accept(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send PDN disconnectivity request */ rv = tests1ap_build_pdn_disconnectivity_request(&sendbuf, msgindex+1); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); /* Receive E-RAB Release Command + * Deactivate EPS bearer context request */ recvbuf = pkbuf_alloc(0, MAX_SDU_LEN); rv = tests1ap_enb_read(sock, recvbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); pkbuf_free(recvbuf); /* Send E-RAB Release Response */ rv = tests1ap_build_e_rab_release_response(&sendbuf, msgindex); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /* Send Deactivate EPS bearer context accept */ rv = tests1ap_build_deactivate_bearer_accept(&sendbuf, msgindex+2); ABTS_INT_EQUAL(tc, CORE_OK, rv); rv = tests1ap_enb_send(sock, sendbuf); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); /********** Remove Subscriber in Database */ doc = BCON_NEW("imsi", BCON_UTF8("001010123456819")); ABTS_PTR_NOTNULL(tc, doc); ABTS_TRUE(tc, mongoc_collection_remove(collection, MONGOC_REMOVE_SINGLE_REMOVE, doc, NULL, &error)) bson_destroy(doc); mongoc_collection_destroy(collection); /* eNB disonncect from MME */ rv = tests1ap_enb_close(sock); ABTS_INT_EQUAL(tc, CORE_OK, rv); core_sleep(time_from_msec(300)); } abts_suite *test_volte(abts_suite *suite) { suite = ADD_SUITE(suite) abts_run_test(suite, volte_test1, NULL); abts_run_test(suite, volte_test2, NULL); return suite; } nextepc-0.3.10/webui/000077500000000000000000000000001333553357400143675ustar00rootroot00000000000000nextepc-0.3.10/webui/.babelrc000066400000000000000000000003701333553357400157620ustar00rootroot00000000000000{ "presets": [ "next/babel" ], "plugins": [ ["styled-components", { "ssr": true, "displayName": false, "preprocess": false }], ["polished"], ["module-resolver", { "root": ["./src"] }] ] } nextepc-0.3.10/webui/package-lock.json000066400000000000000000007155061333553357400176210ustar00rootroot00000000000000{ "name": "nextepc", "version": "0.3.10", "lockfileVersion": 1, "requires": true, "dependencies": { "@babel/helper-annotate-as-pure": { "version": "7.0.0-rc.1", "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0-rc.1.tgz", "integrity": "sha512-GOV2UExs9gAvSrZF4rcgocXXeLJplq2kL2AsCrn6DmGwMUEfo/KB7FhedN3X6cVh0gOqqKkVKXrz3Li1wQ84xQ==", "requires": { "@babel/types": "7.0.0-rc.1" } }, "@babel/runtime": { "version": "7.0.0-beta.42", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.0.0-beta.42.tgz", "integrity": "sha512-iOGRzUoONLOtmCvjUsZv3mZzgCT6ljHQY5fr1qG1QIiJQwtM7zbPWGGpa3QWETq+UqwWyJnoi5XZDZRwZDFciQ==", "requires": { "core-js": "^2.5.3", "regenerator-runtime": "^0.11.1" } }, "@babel/types": { "version": "7.0.0-rc.1", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.0.0-rc.1.tgz", "integrity": "sha512-MBwO1JQKin9BwKTGydrYe4VDJbStCUy35IhJzeZt3FByOdx/q3CYaqMRrH70qVD2RA7+Xk8e3RN0mzKZkYBYuQ==", "requires": { "esutils": "^2.0.2", "lodash": "^4.17.10", "to-fast-properties": "^2.0.0" } }, "abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, "accepts": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", "requires": { "mime-types": "~2.1.18", "negotiator": "0.6.1" } }, "acorn": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.1.tgz", "integrity": "sha512-d+nbxBUGKg7Arpsvbnlq61mc12ek3EY8EQldM3GPAhWJ1UVxC6TDGbIvUMNU6obBX3i1+ptCIzV4vq0gFPEGVQ==" }, "acorn-dynamic-import": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-2.0.2.tgz", "integrity": "sha1-x1K9IQvvZ5UBtsbLf8hPj0cVjMQ=", "requires": { "acorn": "^4.0.3" }, "dependencies": { "acorn": { "version": "4.0.13", "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=" } } }, "ajv": { "version": "5.5.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", "requires": { "co": "^4.6.0", "fast-deep-equal": "^1.0.0", "fast-json-stable-stringify": "^2.0.0", "json-schema-traverse": "^0.3.0" } }, "ajv-keywords": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-2.1.1.tgz", "integrity": "sha1-YXmX/F9gV2iUxDX5QNgZ4TW4B2I=" }, "align-text": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", "repeat-string": "^1.5.2" } }, "amdefine": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" }, "ansi-html": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/ansi-html/-/ansi-html-0.0.7.tgz", "integrity": "sha1-gTWEAhliqenm/QOflA0S9WynhZ4=" }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" }, "ansi-styles": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=" }, "any-promise": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=" }, "anymatch": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", "requires": { "micromatch": "^3.1.4", "normalize-path": "^2.1.1" } }, "arr-diff": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" }, "arr-flatten": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" }, "arr-union": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" }, "array-differ": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=" }, "array-flatten": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" }, "array-union": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz", "integrity": "sha1-mjRBDk9OPaI96jdb5b5w8kd47Dk=", "requires": { "array-uniq": "^1.0.1" } }, "array-uniq": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=" }, "array-unique": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" }, "arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=" }, "asap": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" }, "asn1.js": { "version": "4.10.1", "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", "requires": { "bn.js": "^4.0.0", "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0" } }, "assert": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", "requires": { "util": "0.10.3" }, "dependencies": { "inherits": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" }, "util": { "version": "0.10.3", "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "requires": { "inherits": "2.0.1" } } } }, "assign-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" }, "async": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", "integrity": "sha512-e+lJAJeNWuPCNyxZKOBdaJGyLGHugXVQtrAwtuAe2vhxTYxFTKE73p8JuTmdH0qdQZtDvI4dhJwjZc5zsfIsYw==", "requires": { "lodash": "^4.14.0" } }, "async-each": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.1.tgz", "integrity": "sha1-GdOGodntxufByF04iu28xW0zYC0=" }, "atob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.1.tgz", "integrity": "sha1-ri1acpR38onWDdf5amMUoi3Wwio=" }, "axios": { "version": "0.16.2", "resolved": "https://registry.npmjs.org/axios/-/axios-0.16.2.tgz", "integrity": "sha1-uk+S8XFn37q0CYN4VFS5rBScPG0=", "requires": { "follow-redirects": "^1.2.3", "is-buffer": "^1.1.5" } }, "babel-code-frame": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", "requires": { "chalk": "^1.1.3", "esutils": "^2.0.2", "js-tokens": "^3.0.2" } }, "babel-core": { "version": "6.25.0", "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.25.0.tgz", "integrity": "sha1-fdQrBGPHQunVKW3rPsZ6kyLa1yk=", "requires": { "babel-code-frame": "^6.22.0", "babel-generator": "^6.25.0", "babel-helpers": "^6.24.1", "babel-messages": "^6.23.0", "babel-register": "^6.24.1", "babel-runtime": "^6.22.0", "babel-template": "^6.25.0", "babel-traverse": "^6.25.0", "babel-types": "^6.25.0", "babylon": "^6.17.2", "convert-source-map": "^1.1.0", "debug": "^2.1.1", "json5": "^0.5.0", "lodash": "^4.2.0", "minimatch": "^3.0.2", "path-is-absolute": "^1.0.0", "private": "^0.1.6", "slash": "^1.0.0", "source-map": "^0.5.0" } }, "babel-generator": { "version": "6.25.0", "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.25.0.tgz", "integrity": "sha1-M6GvcNXyiQrrRlpKd5PB32qeqfw=", "requires": { "babel-messages": "^6.23.0", "babel-runtime": "^6.22.0", "babel-types": "^6.25.0", "detect-indent": "^4.0.0", "jsesc": "^1.3.0", "lodash": "^4.2.0", "source-map": "^0.5.0", "trim-right": "^1.0.1" } }, "babel-helper-builder-binary-assignment-operator-visitor": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz", "integrity": "sha1-zORReto1b0IgvK6KAsKzRvmlZmQ=", "requires": { "babel-helper-explode-assignable-expression": "^6.24.1", "babel-runtime": "^6.22.0", "babel-types": "^6.24.1" } }, "babel-helper-builder-react-jsx": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz", "integrity": "sha1-Of+DE7dci2Xc7/HzHTg+D/KkCKA=", "requires": { "babel-runtime": "^6.26.0", "babel-types": "^6.26.0", "esutils": "^2.0.2" } }, "babel-helper-call-delegate": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz", "integrity": "sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340=", "requires": { "babel-helper-hoist-variables": "^6.24.1", "babel-runtime": "^6.22.0", "babel-traverse": "^6.24.1", "babel-types": "^6.24.1" } }, "babel-helper-define-map": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz", "integrity": "sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8=", "requires": { "babel-helper-function-name": "^6.24.1", "babel-runtime": "^6.26.0", "babel-types": "^6.26.0", "lodash": "^4.17.4" } }, "babel-helper-explode-assignable-expression": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz", "integrity": "sha1-8luCz33BBDPFX3BZLVdGQArCLKo=", "requires": { "babel-runtime": "^6.22.0", "babel-traverse": "^6.24.1", "babel-types": "^6.24.1" } }, "babel-helper-function-name": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz", "integrity": "sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=", "requires": { "babel-helper-get-function-arity": "^6.24.1", "babel-runtime": "^6.22.0", "babel-template": "^6.24.1", "babel-traverse": "^6.24.1", "babel-types": "^6.24.1" } }, "babel-helper-get-function-arity": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz", "integrity": "sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=", "requires": { "babel-runtime": "^6.22.0", "babel-types": "^6.24.1" } }, "babel-helper-hoist-variables": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz", "integrity": "sha1-HssnaJydJVE+rbyZFKc/VAi+enY=", "requires": { "babel-runtime": "^6.22.0", "babel-types": "^6.24.1" } }, "babel-helper-optimise-call-expression": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz", "integrity": "sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc=", "requires": { "babel-runtime": "^6.22.0", "babel-types": "^6.24.1" } }, "babel-helper-regex": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz", "integrity": "sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI=", "requires": { "babel-runtime": "^6.26.0", "babel-types": "^6.26.0", "lodash": "^4.17.4" } }, "babel-helper-remap-async-to-generator": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz", "integrity": "sha1-XsWBgnrXI/7N04HxySg5BnbkVRs=", "requires": { "babel-helper-function-name": "^6.24.1", "babel-runtime": "^6.22.0", "babel-template": "^6.24.1", "babel-traverse": "^6.24.1", "babel-types": "^6.24.1" } }, "babel-helper-replace-supers": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz", "integrity": "sha1-v22/5Dk40XNpohPKiov3S2qQqxo=", "requires": { "babel-helper-optimise-call-expression": "^6.24.1", "babel-messages": "^6.23.0", "babel-runtime": "^6.22.0", "babel-template": "^6.24.1", "babel-traverse": "^6.24.1", "babel-types": "^6.24.1" } }, "babel-helpers": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz", "integrity": "sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI=", "requires": { "babel-runtime": "^6.22.0", "babel-template": "^6.24.1" } }, "babel-loader": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-7.1.1.tgz", "integrity": "sha1-uHE0yLEuPkwqlOBUYIW8aAorhIg=", "requires": { "find-cache-dir": "^1.0.0", "loader-utils": "^1.0.2", "mkdirp": "^0.5.1" } }, "babel-messages": { "version": "6.23.0", "resolved": "https://registry.npmjs.org/babel-messages/-/babel-messages-6.23.0.tgz", "integrity": "sha1-8830cDhYA1sqKVHG7F7fbGLyYw4=", "requires": { "babel-runtime": "^6.22.0" } }, "babel-plugin-check-es2015-constants": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz", "integrity": "sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o=", "requires": { "babel-runtime": "^6.22.0" } }, "babel-plugin-module-resolver": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/babel-plugin-module-resolver/-/babel-plugin-module-resolver-2.6.2.tgz", "integrity": "sha1-ZoRciFWGXdf9TVJWvpMnLj0WcB0=", "requires": { "find-babel-config": "^1.0.1", "glob": "^7.1.1", "resolve": "^1.3.2" } }, "babel-plugin-polished": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/babel-plugin-polished/-/babel-plugin-polished-1.1.0.tgz", "integrity": "sha1-f2kCq46cIPwUy1PVlt2FiIDjV9M=", "requires": { "polished": "^1.0.0" } }, "babel-plugin-react-require": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/babel-plugin-react-require/-/babel-plugin-react-require-3.0.0.tgz", "integrity": "sha1-Lk57RJa5OmVKHIAEInbeTk7rIOM=" }, "babel-plugin-styled-components": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-1.5.1.tgz", "integrity": "sha1-MdvraW0TVNFYXmDWbHkF9eR0r80=", "requires": { "@babel/helper-annotate-as-pure": "^7.0.0-beta.37", "babel-types": "^6.26.0", "stylis": "^3.0.0" } }, "babel-plugin-syntax-async-functions": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz", "integrity": "sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU=" }, "babel-plugin-syntax-class-properties": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz", "integrity": "sha1-1+sjt5oxf4VDlixQW4J8fWysJ94=" }, "babel-plugin-syntax-dynamic-import": { "version": "6.18.0", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz", "integrity": "sha1-jWomIpyDdFqZgqRBBRVyyqF5sdo=" }, "babel-plugin-syntax-exponentiation-operator": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz", "integrity": "sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4=" }, "babel-plugin-syntax-flow": { "version": "6.18.0", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz", "integrity": "sha1-TDqyCiryaqIM0lmVw5jE63AxDI0=" }, "babel-plugin-syntax-jsx": { "version": "6.18.0", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz", "integrity": "sha1-CvMqmm4Tyno/1QaeYtew9Y0NiUY=" }, "babel-plugin-syntax-object-rest-spread": { "version": "6.13.0", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz", "integrity": "sha1-/WU28rzhODb/o6VFjEkDpZe7O/U=" }, "babel-plugin-syntax-trailing-function-commas": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz", "integrity": "sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM=" }, "babel-plugin-transform-async-to-generator": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz", "integrity": "sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E=", "requires": { "babel-helper-remap-async-to-generator": "^6.24.1", "babel-plugin-syntax-async-functions": "^6.8.0", "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-class-properties": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz", "integrity": "sha1-anl2PqYdM9NvN7YRqp3vgagbRqw=", "requires": { "babel-helper-function-name": "^6.24.1", "babel-plugin-syntax-class-properties": "^6.8.0", "babel-runtime": "^6.22.0", "babel-template": "^6.24.1" } }, "babel-plugin-transform-es2015-arrow-functions": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz", "integrity": "sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE=", "requires": { "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-block-scoped-functions": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz", "integrity": "sha1-u8UbSflk1wy42OC5ToICRs46YUE=", "requires": { "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-block-scoping": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz", "integrity": "sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8=", "requires": { "babel-runtime": "^6.26.0", "babel-template": "^6.26.0", "babel-traverse": "^6.26.0", "babel-types": "^6.26.0", "lodash": "^4.17.4" }, "dependencies": { "babel-template": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", "requires": { "babel-runtime": "^6.26.0", "babel-traverse": "^6.26.0", "babel-types": "^6.26.0", "babylon": "^6.18.0", "lodash": "^4.17.4" } } } }, "babel-plugin-transform-es2015-classes": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz", "integrity": "sha1-WkxYpQyclGHlZLSyo7+ryXolhNs=", "requires": { "babel-helper-define-map": "^6.24.1", "babel-helper-function-name": "^6.24.1", "babel-helper-optimise-call-expression": "^6.24.1", "babel-helper-replace-supers": "^6.24.1", "babel-messages": "^6.23.0", "babel-runtime": "^6.22.0", "babel-template": "^6.24.1", "babel-traverse": "^6.24.1", "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-computed-properties": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz", "integrity": "sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM=", "requires": { "babel-runtime": "^6.22.0", "babel-template": "^6.24.1" } }, "babel-plugin-transform-es2015-destructuring": { "version": "6.23.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz", "integrity": "sha1-mXux8auWf2gtKwh2/jWNYOdlxW0=", "requires": { "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-duplicate-keys": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz", "integrity": "sha1-c+s9MQypaePvnskcU3QabxV2Qj4=", "requires": { "babel-runtime": "^6.22.0", "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-for-of": { "version": "6.23.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz", "integrity": "sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE=", "requires": { "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-function-name": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz", "integrity": "sha1-g0yJhTvDaxrw86TF26qU/Y6sqos=", "requires": { "babel-helper-function-name": "^6.24.1", "babel-runtime": "^6.22.0", "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-literals": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz", "integrity": "sha1-T1SgLWzWbPkVKAAZox0xklN3yi4=", "requires": { "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-modules-amd": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz", "integrity": "sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ=", "requires": { "babel-plugin-transform-es2015-modules-commonjs": "^6.24.1", "babel-runtime": "^6.22.0", "babel-template": "^6.24.1" } }, "babel-plugin-transform-es2015-modules-commonjs": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.24.1.tgz", "integrity": "sha1-0+MQtA72ZKNmIiAAl8bUQCmPK/4=", "requires": { "babel-plugin-transform-strict-mode": "^6.24.1", "babel-runtime": "^6.22.0", "babel-template": "^6.24.1", "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-modules-systemjs": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz", "integrity": "sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM=", "requires": { "babel-helper-hoist-variables": "^6.24.1", "babel-runtime": "^6.22.0", "babel-template": "^6.24.1" } }, "babel-plugin-transform-es2015-modules-umd": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz", "integrity": "sha1-rJl+YoXNGO1hdq22B9YCNErThGg=", "requires": { "babel-plugin-transform-es2015-modules-amd": "^6.24.1", "babel-runtime": "^6.22.0", "babel-template": "^6.24.1" } }, "babel-plugin-transform-es2015-object-super": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz", "integrity": "sha1-JM72muIcuDp/hgPa0CH1cusnj40=", "requires": { "babel-helper-replace-supers": "^6.24.1", "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-parameters": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz", "integrity": "sha1-V6w1GrScrxSpfNE7CfZv3wpiXys=", "requires": { "babel-helper-call-delegate": "^6.24.1", "babel-helper-get-function-arity": "^6.24.1", "babel-runtime": "^6.22.0", "babel-template": "^6.24.1", "babel-traverse": "^6.24.1", "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-shorthand-properties": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz", "integrity": "sha1-JPh11nIch2YbvZmkYi5R8U3jiqA=", "requires": { "babel-runtime": "^6.22.0", "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-spread": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz", "integrity": "sha1-1taKmfia7cRTbIGlQujdnxdG+NE=", "requires": { "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-sticky-regex": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz", "integrity": "sha1-AMHNsaynERLN8M9hJsLta0V8zbw=", "requires": { "babel-helper-regex": "^6.24.1", "babel-runtime": "^6.22.0", "babel-types": "^6.24.1" } }, "babel-plugin-transform-es2015-template-literals": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz", "integrity": "sha1-qEs0UPfp+PH2g51taH2oS7EjbY0=", "requires": { "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-typeof-symbol": { "version": "6.23.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz", "integrity": "sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I=", "requires": { "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-es2015-unicode-regex": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz", "integrity": "sha1-04sS9C6nMj9yk4fxinxa4frrNek=", "requires": { "babel-helper-regex": "^6.24.1", "babel-runtime": "^6.22.0", "regexpu-core": "^2.0.0" } }, "babel-plugin-transform-exponentiation-operator": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz", "integrity": "sha1-KrDJx/MJj6SJB3cruBP+QejeOg4=", "requires": { "babel-helper-builder-binary-assignment-operator-visitor": "^6.24.1", "babel-plugin-syntax-exponentiation-operator": "^6.8.0", "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-flow-strip-types": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz", "integrity": "sha1-hMtnKTXUNxT9wyvOhFaNh0Qc988=", "requires": { "babel-plugin-syntax-flow": "^6.18.0", "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-object-rest-spread": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.22.0.tgz", "integrity": "sha1-HUGbVeaNLk9kpf8zc71n1zyOg7w=", "requires": { "babel-plugin-syntax-object-rest-spread": "^6.8.0", "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-react-display-name": { "version": "6.25.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz", "integrity": "sha1-Z+K/Hx6ck6sI25Z5LgU5K/LMKNE=", "requires": { "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-react-jsx": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz", "integrity": "sha1-hAoCjn30YN/DotKfDA2R9jduZqM=", "requires": { "babel-helper-builder-react-jsx": "^6.24.1", "babel-plugin-syntax-jsx": "^6.8.0", "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-react-jsx-self": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz", "integrity": "sha1-322AqdomEqEh5t3XVYvL7PBuY24=", "requires": { "babel-plugin-syntax-jsx": "^6.8.0", "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-react-jsx-source": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz", "integrity": "sha1-ZqwSFT9c0tF7PBkmj0vwGX9E7NY=", "requires": { "babel-plugin-syntax-jsx": "^6.8.0", "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-react-remove-prop-types": { "version": "0.4.5", "resolved": "https://registry.npmjs.org/babel-plugin-transform-react-remove-prop-types/-/babel-plugin-transform-react-remove-prop-types-0.4.5.tgz", "integrity": "sha1-edGVhDeuI9T7wLEdGgQUmN2yOHc=", "requires": { "babel-traverse": "^6.24.1" } }, "babel-plugin-transform-regenerator": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz", "integrity": "sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8=", "requires": { "regenerator-transform": "^0.10.0" } }, "babel-plugin-transform-runtime": { "version": "6.22.0", "resolved": "https://registry.npmjs.org/babel-plugin-transform-runtime/-/babel-plugin-transform-runtime-6.22.0.tgz", "integrity": "sha1-EJaNdgu/ZRckMIHux3jhD6goVRw=", "requires": { "babel-runtime": "^6.22.0" } }, "babel-plugin-transform-strict-mode": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz", "integrity": "sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g=", "requires": { "babel-runtime": "^6.22.0", "babel-types": "^6.24.1" } }, "babel-preset-env": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/babel-preset-env/-/babel-preset-env-1.6.0.tgz", "integrity": "sha512-OVgtQRuOZKckrILgMA5rvctvFZPv72Gua9Rt006AiPoB0DJKGN07UmaQA+qRrYgK71MVct8fFhT0EyNWYorVew==", "requires": { "babel-plugin-check-es2015-constants": "^6.22.0", "babel-plugin-syntax-trailing-function-commas": "^6.22.0", "babel-plugin-transform-async-to-generator": "^6.22.0", "babel-plugin-transform-es2015-arrow-functions": "^6.22.0", "babel-plugin-transform-es2015-block-scoped-functions": "^6.22.0", "babel-plugin-transform-es2015-block-scoping": "^6.23.0", "babel-plugin-transform-es2015-classes": "^6.23.0", "babel-plugin-transform-es2015-computed-properties": "^6.22.0", "babel-plugin-transform-es2015-destructuring": "^6.23.0", "babel-plugin-transform-es2015-duplicate-keys": "^6.22.0", "babel-plugin-transform-es2015-for-of": "^6.23.0", "babel-plugin-transform-es2015-function-name": "^6.22.0", "babel-plugin-transform-es2015-literals": "^6.22.0", "babel-plugin-transform-es2015-modules-amd": "^6.22.0", "babel-plugin-transform-es2015-modules-commonjs": "^6.23.0", "babel-plugin-transform-es2015-modules-systemjs": "^6.23.0", "babel-plugin-transform-es2015-modules-umd": "^6.23.0", "babel-plugin-transform-es2015-object-super": "^6.22.0", "babel-plugin-transform-es2015-parameters": "^6.23.0", "babel-plugin-transform-es2015-shorthand-properties": "^6.22.0", "babel-plugin-transform-es2015-spread": "^6.22.0", "babel-plugin-transform-es2015-sticky-regex": "^6.22.0", "babel-plugin-transform-es2015-template-literals": "^6.22.0", "babel-plugin-transform-es2015-typeof-symbol": "^6.23.0", "babel-plugin-transform-es2015-unicode-regex": "^6.22.0", "babel-plugin-transform-exponentiation-operator": "^6.22.0", "babel-plugin-transform-regenerator": "^6.22.0", "browserslist": "^2.1.2", "invariant": "^2.2.2", "semver": "^5.3.0" } }, "babel-preset-flow": { "version": "6.23.0", "resolved": "https://registry.npmjs.org/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz", "integrity": "sha1-5xIYiHCFrpoktb5Baa/7WZgWxJ0=", "requires": { "babel-plugin-transform-flow-strip-types": "^6.22.0" } }, "babel-preset-react": { "version": "6.24.1", "resolved": "https://registry.npmjs.org/babel-preset-react/-/babel-preset-react-6.24.1.tgz", "integrity": "sha1-umnfrqRfw+xjm2pOzqbhdwLJE4A=", "requires": { "babel-plugin-syntax-jsx": "^6.3.13", "babel-plugin-transform-react-display-name": "^6.23.0", "babel-plugin-transform-react-jsx": "^6.24.1", "babel-plugin-transform-react-jsx-self": "^6.22.0", "babel-plugin-transform-react-jsx-source": "^6.22.0", "babel-preset-flow": "^6.23.0" } }, "babel-register": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz", "integrity": "sha1-btAhFz4vy0htestFxgCahW9kcHE=", "requires": { "babel-core": "^6.26.0", "babel-runtime": "^6.26.0", "core-js": "^2.5.0", "home-or-tmp": "^2.0.0", "lodash": "^4.17.4", "mkdirp": "^0.5.1", "source-map-support": "^0.4.15" }, "dependencies": { "babel-core": { "version": "6.26.3", "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz", "integrity": "sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA==", "requires": { "babel-code-frame": "^6.26.0", "babel-generator": "^6.26.0", "babel-helpers": "^6.24.1", "babel-messages": "^6.23.0", "babel-register": "^6.26.0", "babel-runtime": "^6.26.0", "babel-template": "^6.26.0", "babel-traverse": "^6.26.0", "babel-types": "^6.26.0", "babylon": "^6.18.0", "convert-source-map": "^1.5.1", "debug": "^2.6.9", "json5": "^0.5.1", "lodash": "^4.17.4", "minimatch": "^3.0.4", "path-is-absolute": "^1.0.1", "private": "^0.1.8", "slash": "^1.0.0", "source-map": "^0.5.7" } }, "babel-generator": { "version": "6.26.1", "resolved": "https://registry.npmjs.org/babel-generator/-/babel-generator-6.26.1.tgz", "integrity": "sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==", "requires": { "babel-messages": "^6.23.0", "babel-runtime": "^6.26.0", "babel-types": "^6.26.0", "detect-indent": "^4.0.0", "jsesc": "^1.3.0", "lodash": "^4.17.4", "source-map": "^0.5.7", "trim-right": "^1.0.1" } }, "babel-template": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.26.0.tgz", "integrity": "sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI=", "requires": { "babel-runtime": "^6.26.0", "babel-traverse": "^6.26.0", "babel-types": "^6.26.0", "babylon": "^6.18.0", "lodash": "^4.17.4" } } } }, "babel-runtime": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "requires": { "core-js": "^2.4.0", "regenerator-runtime": "^0.11.0" } }, "babel-template": { "version": "6.25.0", "resolved": "https://registry.npmjs.org/babel-template/-/babel-template-6.25.0.tgz", "integrity": "sha1-ZlJBFmt8KqTGGdceGSlpVSsQwHE=", "requires": { "babel-runtime": "^6.22.0", "babel-traverse": "^6.25.0", "babel-types": "^6.25.0", "babylon": "^6.17.2", "lodash": "^4.2.0" } }, "babel-traverse": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz", "integrity": "sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=", "requires": { "babel-code-frame": "^6.26.0", "babel-messages": "^6.23.0", "babel-runtime": "^6.26.0", "babel-types": "^6.26.0", "babylon": "^6.18.0", "debug": "^2.6.8", "globals": "^9.18.0", "invariant": "^2.2.2", "lodash": "^4.17.4" } }, "babel-types": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz", "integrity": "sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=", "requires": { "babel-runtime": "^6.26.0", "esutils": "^2.0.2", "lodash": "^4.17.4", "to-fast-properties": "^1.0.3" }, "dependencies": { "to-fast-properties": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" } } }, "babylon": { "version": "6.18.0", "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz", "integrity": "sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ==" }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" }, "base": { "version": "0.11.2", "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", "requires": { "cache-base": "^1.0.1", "class-utils": "^0.3.5", "component-emitter": "^1.2.1", "define-property": "^1.0.0", "isobject": "^3.0.1", "mixin-deep": "^1.2.0", "pascalcase": "^0.1.1" }, "dependencies": { "define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { "kind-of": "^6.0.0" } }, "is-data-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { "kind-of": "^6.0.0" } }, "is-descriptor": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", "kind-of": "^6.0.2" } }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" } } }, "base64-js": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.0.tgz", "integrity": "sha512-ccav/yGvoa80BQDljCxsmmQ3Xvx60/UpBIij5QN21W3wBi/hhIC9OoO+KLpu9IJTS9j4DRVJ3aDDF9cMSoa2lw==" }, "basic-auth": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.0.tgz", "integrity": "sha1-AV2z81PgLlY3d1X5YnQuiYHnu7o=", "requires": { "safe-buffer": "5.1.1" } }, "big.js": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/big.js/-/big.js-3.2.0.tgz", "integrity": "sha512-+hN/Zh2D08Mx65pZ/4g5bsmNiZUuChDiQfTUQ7qJr4/kuopCr88xZsAXv6mBoZEsUI4OuGHlX59qE94K2mMW8Q==" }, "binary-extensions": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=" }, "bluebird": { "version": "3.5.1", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" }, "bn.js": { "version": "4.11.8", "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" }, "body-parser": { "version": "1.18.3", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", "requires": { "bytes": "3.0.0", "content-type": "~1.0.4", "debug": "2.6.9", "depd": "~1.1.2", "http-errors": "~1.6.3", "iconv-lite": "0.4.23", "on-finished": "~2.3.0", "qs": "6.5.2", "raw-body": "2.3.3", "type-is": "~1.6.16" }, "dependencies": { "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" }, "iconv-lite": { "version": "0.4.23", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", "requires": { "safer-buffer": ">= 2.1.2 < 3" } } } }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "braces": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", "requires": { "arr-flatten": "^1.1.0", "array-unique": "^0.3.2", "extend-shallow": "^2.0.1", "fill-range": "^4.0.0", "isobject": "^3.0.1", "repeat-element": "^1.1.2", "snapdragon": "^0.8.1", "snapdragon-node": "^2.0.1", "split-string": "^3.0.2", "to-regex": "^3.0.1" }, "dependencies": { "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { "is-extendable": "^0.1.0" } } } }, "brorand": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" }, "browserify-aes": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "requires": { "buffer-xor": "^1.0.3", "cipher-base": "^1.0.0", "create-hash": "^1.1.0", "evp_bytestokey": "^1.0.3", "inherits": "^2.0.1", "safe-buffer": "^5.0.1" } }, "browserify-cipher": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", "requires": { "browserify-aes": "^1.0.4", "browserify-des": "^1.0.0", "evp_bytestokey": "^1.0.0" } }, "browserify-des": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", "requires": { "cipher-base": "^1.0.1", "des.js": "^1.0.0", "inherits": "^2.0.1", "safe-buffer": "^5.1.2" }, "dependencies": { "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" } } }, "browserify-rsa": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "requires": { "bn.js": "^4.1.0", "randombytes": "^2.0.1" } }, "browserify-sign": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", "requires": { "bn.js": "^4.1.1", "browserify-rsa": "^4.0.0", "create-hash": "^1.1.0", "create-hmac": "^1.1.2", "elliptic": "^6.0.0", "inherits": "^2.0.1", "parse-asn1": "^5.0.0" } }, "browserify-zlib": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", "requires": { "pako": "~1.0.5" } }, "browserslist": { "version": "2.11.3", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-2.11.3.tgz", "integrity": "sha512-yWu5cXT7Av6mVwzWc8lMsJMHWn4xyjSuGYi4IozbVTLUOEYPSagUB8kiMDUHA1fS3zjr8nkxkn9jdvug4BBRmA==", "requires": { "caniuse-lite": "^1.0.30000792", "electron-to-chromium": "^1.3.30" } }, "bson": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/bson/-/bson-1.0.4.tgz", "integrity": "sha1-k8ENOeqltYQVy8QFLz5T5WKwtyw=" }, "buffer": { "version": "4.9.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", "requires": { "base64-js": "^1.0.2", "ieee754": "^1.1.4", "isarray": "^1.0.0" } }, "buffer-shims": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/buffer-shims/-/buffer-shims-1.0.0.tgz", "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=" }, "buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" }, "builtin-status-codes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" }, "bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" }, "cache-base": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "requires": { "collection-visit": "^1.0.0", "component-emitter": "^1.2.1", "get-value": "^2.0.6", "has-value": "^1.0.0", "isobject": "^3.0.1", "set-value": "^2.0.0", "to-object-path": "^0.3.0", "union-value": "^1.0.0", "unset-value": "^1.0.0" } }, "camelcase": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=" }, "caniuse-lite": { "version": "1.0.30000876", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000876.tgz", "integrity": "sha512-v+Q2afhJJ1oydQnEB4iHhxDz5x9lWPbRnQBQlM3FgtZxqLO8KDSdu4txUrFwC1Ws9I2kQi/QImkvj17NbVpNAg==" }, "case-sensitive-paths-webpack-plugin": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/case-sensitive-paths-webpack-plugin/-/case-sensitive-paths-webpack-plugin-2.1.1.tgz", "integrity": "sha1-PSnO2MHxJL9vU4Rvs/WJRzH9yQk=" }, "center-align": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", "requires": { "align-text": "^0.1.3", "lazy-cache": "^1.0.3" } }, "chain-function": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/chain-function/-/chain-function-1.0.0.tgz", "integrity": "sha1-DUqzfn4Y6tC9xHuSB2QRjOWHM9w=" }, "chalk": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "requires": { "ansi-styles": "^2.2.1", "escape-string-regexp": "^1.0.2", "has-ansi": "^2.0.0", "strip-ansi": "^3.0.0", "supports-color": "^2.0.0" } }, "chokidar": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", "integrity": "sha512-z9n7yt9rOvIJrMhvDtDictKrkFHeihkNl6uWMmZlmL6tJtX9Cs+87oK+teBx+JIgzvbX3yZHT3eF8vpbDxHJXQ==", "requires": { "anymatch": "^2.0.0", "async-each": "^1.0.0", "braces": "^2.3.0", "fsevents": "^1.2.2", "glob-parent": "^3.1.0", "inherits": "^2.0.1", "is-binary-path": "^1.0.0", "is-glob": "^4.0.0", "lodash.debounce": "^4.0.8", "normalize-path": "^2.1.1", "path-is-absolute": "^1.0.0", "readdirp": "^2.0.0", "upath": "^1.0.5" } }, "cipher-base": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" } }, "class-utils": { "version": "0.3.6", "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "requires": { "arr-union": "^3.1.0", "define-property": "^0.2.5", "isobject": "^3.0.0", "static-extend": "^0.1.1" }, "dependencies": { "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { "is-descriptor": "^0.1.0" } } } }, "cliui": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", "requires": { "center-align": "^0.1.1", "right-align": "^0.1.1", "wordwrap": "0.0.2" } }, "co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "collection-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", "requires": { "map-visit": "^1.0.0", "object-visit": "^1.0.0" } }, "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" }, "component-emitter": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" }, "connect-mongo": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/connect-mongo/-/connect-mongo-1.3.2.tgz", "integrity": "sha1-fL9Y3/8mdg5eAOAX0KhbS8kLnTc=", "requires": { "bluebird": "^3.0", "mongodb": ">= 1.2.0 <3.0.0" } }, "console-browserify": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", "requires": { "date-now": "^0.1.4" } }, "constants-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" }, "content-disposition": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" }, "content-type": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" }, "convert-source-map": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.5.1.tgz", "integrity": "sha1-uCeAl7m8IpNl3lxiz1/K7YtVmeU=" }, "cookie": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" }, "cookie-signature": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" }, "copy-descriptor": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" }, "core-js": { "version": "2.5.7", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.7.tgz", "integrity": "sha512-RszJCAxg/PP6uzXVXL6BsxSXx/B05oJAQ2vkJRjyjrEcNVycaqOmNb5OTxZPE3xa5gwZduqza6L9JOCenh/Ecw==" }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "crc": { "version": "3.4.4", "resolved": "https://registry.npmjs.org/crc/-/crc-3.4.4.tgz", "integrity": "sha1-naHpgOO9RPxck79as9ozeNheRms=" }, "create-ecdh": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.3.tgz", "integrity": "sha512-GbEHQPMOswGpKXM9kCWVrremUcBmjteUaQ01T9rkKCPDXfUHX0IoP9LpHYo2NPFampa4e+/pFDc3jQdxrxQLaw==", "requires": { "bn.js": "^4.1.0", "elliptic": "^6.0.0" } }, "create-hash": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "requires": { "cipher-base": "^1.0.1", "inherits": "^2.0.1", "md5.js": "^1.3.4", "ripemd160": "^2.0.1", "sha.js": "^2.4.0" } }, "create-hmac": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "requires": { "cipher-base": "^1.0.3", "create-hash": "^1.1.0", "inherits": "^2.0.1", "ripemd160": "^2.0.0", "safe-buffer": "^5.0.1", "sha.js": "^2.4.8" } }, "create-react-class": { "version": "15.6.2", "resolved": "https://registry.npmjs.org/create-react-class/-/create-react-class-15.6.2.tgz", "integrity": "sha1-zx7RXxKq1/FO9fLf4F5sQvke8Co=", "requires": { "fbjs": "^0.8.9", "loose-envify": "^1.3.1", "object-assign": "^4.1.1" } }, "cross-spawn": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", "requires": { "lru-cache": "^4.0.1", "shebang-command": "^1.2.0", "which": "^1.2.9" } }, "crypto-browserify": { "version": "3.12.0", "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", "requires": { "browserify-cipher": "^1.0.0", "browserify-sign": "^4.0.0", "create-ecdh": "^4.0.0", "create-hash": "^1.1.0", "create-hmac": "^1.1.0", "diffie-hellman": "^5.0.0", "inherits": "^2.0.1", "pbkdf2": "^3.0.3", "public-encrypt": "^4.0.0", "randombytes": "^2.0.0", "randomfill": "^1.0.3" } }, "css-color-keywords": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz", "integrity": "sha1-/qJhbcZ2spYmhrOvjb2+GAskTgU=" }, "css-to-react-native": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-2.2.1.tgz", "integrity": "sha512-v++LRcf633phJiYZBDqtmGPj3+BVof0isd2jgwYLWZJ5YSuhCkrfYtDsNhM6oJthiEco0f9tDVJ1vUkDJNgGEA==", "requires": { "css-color-keywords": "^1.0.0", "fbjs": "^0.8.5", "postcss-value-parser": "^3.3.0" } }, "css-tree": { "version": "1.0.0-alpha17", "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha17.tgz", "integrity": "sha1-erlatyxTORevi+VDE/7IGEHFIjo=", "requires": { "source-map": "^0.5.3" } }, "d": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/d/-/d-1.0.0.tgz", "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=", "requires": { "es5-ext": "^0.10.9" } }, "date-now": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=" }, "debug": { "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { "ms": "2.0.0" } }, "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" }, "decode-uri-component": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" }, "define-properties": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.2.tgz", "integrity": "sha1-g6c/L+pWmJj7c3GTyPhzyvbUXJQ=", "requires": { "foreach": "^2.0.5", "object-keys": "^1.0.8" } }, "define-property": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", "requires": { "is-descriptor": "^1.0.2", "isobject": "^3.0.1" }, "dependencies": { "is-accessor-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { "kind-of": "^6.0.0" } }, "is-data-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { "kind-of": "^6.0.0" } }, "is-descriptor": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", "kind-of": "^6.0.2" } }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" } } }, "del": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", "requires": { "globby": "^6.1.0", "is-path-cwd": "^1.0.0", "is-path-in-cwd": "^1.0.0", "p-map": "^1.1.1", "pify": "^3.0.0", "rimraf": "^2.2.8" } }, "depd": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" }, "des.js": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", "requires": { "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0" } }, "destroy": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" }, "detect-indent": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-4.0.0.tgz", "integrity": "sha1-920GQ1LN9Docts5hnE7jqUdd4gg=", "requires": { "repeating": "^2.0.0" } }, "diffie-hellman": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "requires": { "bn.js": "^4.1.0", "miller-rabin": "^4.0.0", "randombytes": "^2.0.0" } }, "dom-helpers": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/dom-helpers/-/dom-helpers-3.2.1.tgz", "integrity": "sha1-MgPgf+0he9H0JLAZc1WC/Deyglo=" }, "dom-walk": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/dom-walk/-/dom-walk-0.1.1.tgz", "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=" }, "domain-browser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==" }, "ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "electron-to-chromium": { "version": "1.3.57", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.57.tgz", "integrity": "sha512-YYpZlr6mzR8cK5VRmTZydEt5Mp+WMg1/syrO40PoQzl76vJ+oQchL2d3FmEcWzw3FYqJVYJP/kYYSzTa7FLXwg==" }, "elliptic": { "version": "6.4.1", "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", "requires": { "bn.js": "^4.4.0", "brorand": "^1.0.1", "hash.js": "^1.0.0", "hmac-drbg": "^1.0.0", "inherits": "^2.0.1", "minimalistic-assert": "^1.0.0", "minimalistic-crypto-utils": "^1.0.0" } }, "emitter-mixin": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/emitter-mixin/-/emitter-mixin-0.0.3.tgz", "integrity": "sha1-WUjLKG8uSO3DslGnz8H3iDOW1lw=" }, "emojis-list": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=" }, "encodeurl": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" }, "encoding": { "version": "0.1.12", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", "requires": { "iconv-lite": "~0.4.13" } }, "enhanced-resolve": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-3.4.1.tgz", "integrity": "sha1-BCHjOf1xQZs9oT0Smzl5BAIwR24=", "requires": { "graceful-fs": "^4.1.2", "memory-fs": "^0.4.0", "object-assign": "^4.0.1", "tapable": "^0.2.7" } }, "ensure-array": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/ensure-array/-/ensure-array-0.0.5.tgz", "integrity": "sha1-NVvsw4LI65nWikm0UK6eboEQJxU=" }, "errno": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.7.tgz", "integrity": "sha512-MfrRBDWzIWifgq6tJj60gkAwtLNb6sQPlcFrSOflcP1aFmmruKQ2wRnze/8V6kgyz7H3FF8Npzv78mZ7XLLflg==", "requires": { "prr": "~1.0.1" } }, "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", "requires": { "is-arrayish": "^0.2.1" } }, "error-stack-parser": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.0.2.tgz", "integrity": "sha512-E1fPutRDdIj/hohG0UpT5mayXNCxXP9d+snxFsPU9X0XgccOumKraa3juDMwTUyi7+Bu5+mCGagjg4IYeNbOdw==", "requires": { "stackframe": "^1.0.4" } }, "es5-ext": { "version": "0.10.45", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.45.tgz", "integrity": "sha512-FkfM6Vxxfmztilbxxz5UKSD4ICMf5tSpRFtDNtkAhOxZ0EKtX6qwmXNyH/sFyIbX2P/nU5AMiA9jilWsUGJzCQ==", "requires": { "es6-iterator": "~2.0.3", "es6-symbol": "~3.1.1", "next-tick": "1" } }, "es6-iterator": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", "requires": { "d": "1", "es5-ext": "^0.10.35", "es6-symbol": "^3.1.1" } }, "es6-map": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/es6-map/-/es6-map-0.1.5.tgz", "integrity": "sha1-kTbgUD3MBqMBaQ8LsU/042TpSfA=", "requires": { "d": "1", "es5-ext": "~0.10.14", "es6-iterator": "~2.0.1", "es6-set": "~0.1.5", "es6-symbol": "~3.1.1", "event-emitter": "~0.3.5" } }, "es6-promise": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-3.2.1.tgz", "integrity": "sha1-7FYjOGgDKQkgcXDDlEjiREndH8Q=" }, "es6-set": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/es6-set/-/es6-set-0.1.5.tgz", "integrity": "sha1-0rPsXU2ADO2BjbU40ol02wpzzLE=", "requires": { "d": "1", "es5-ext": "~0.10.14", "es6-iterator": "~2.0.1", "es6-symbol": "3.1.1", "event-emitter": "~0.3.5" } }, "es6-symbol": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.1.tgz", "integrity": "sha1-vwDvT9q2uhtG7Le2KbTH7VcVzHc=", "requires": { "d": "1", "es5-ext": "~0.10.14" } }, "es6-weak-map": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.2.tgz", "integrity": "sha1-XjqzIlH/0VOKH45f+hNXdy+S2W8=", "requires": { "d": "1", "es5-ext": "^0.10.14", "es6-iterator": "^2.0.1", "es6-symbol": "^3.1.1" } }, "escape-html": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "escope": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/escope/-/escope-3.6.0.tgz", "integrity": "sha1-4Bl16BJ4GhY6ba392AOY3GTIicM=", "requires": { "es6-map": "^0.1.3", "es6-weak-map": "^2.0.1", "esrecurse": "^4.1.0", "estraverse": "^4.1.1" } }, "esrecurse": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", "requires": { "estraverse": "^4.1.0" } }, "estraverse": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" }, "esutils": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" }, "etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, "event-emitter": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", "requires": { "d": "1", "es5-ext": "~0.10.14" } }, "events": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" }, "evp_bytestokey": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", "requires": { "md5.js": "^1.3.4", "safe-buffer": "^5.1.1" } }, "expand-brackets": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", "requires": { "debug": "^2.3.3", "define-property": "^0.2.5", "extend-shallow": "^2.0.1", "posix-character-classes": "^0.1.0", "regex-not": "^1.0.0", "snapdragon": "^0.8.1", "to-regex": "^3.0.1" }, "dependencies": { "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { "is-descriptor": "^0.1.0" } }, "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { "is-extendable": "^0.1.0" } } } }, "express": { "version": "4.16.3", "resolved": "https://registry.npmjs.org/express/-/express-4.16.3.tgz", "integrity": "sha1-avilAjUNsyRuzEvs9rWjTSL37VM=", "requires": { "accepts": "~1.3.5", "array-flatten": "1.1.1", "body-parser": "1.18.2", "content-disposition": "0.5.2", "content-type": "~1.0.4", "cookie": "0.3.1", "cookie-signature": "1.0.6", "debug": "2.6.9", "depd": "~1.1.2", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", "finalhandler": "1.1.1", "fresh": "0.5.2", "merge-descriptors": "1.0.1", "methods": "~1.1.2", "on-finished": "~2.3.0", "parseurl": "~1.3.2", "path-to-regexp": "0.1.7", "proxy-addr": "~2.0.3", "qs": "6.5.1", "range-parser": "~1.2.0", "safe-buffer": "5.1.1", "send": "0.16.2", "serve-static": "1.13.2", "setprototypeof": "1.1.0", "statuses": "~1.4.0", "type-is": "~1.6.16", "utils-merge": "1.0.1", "vary": "~1.1.2" }, "dependencies": { "body-parser": { "version": "1.18.2", "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", "requires": { "bytes": "3.0.0", "content-type": "~1.0.4", "debug": "2.6.9", "depd": "~1.1.1", "http-errors": "~1.6.2", "iconv-lite": "0.4.19", "on-finished": "~2.3.0", "qs": "6.5.1", "raw-body": "2.3.2", "type-is": "~1.6.15" } }, "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" }, "qs": { "version": "6.5.1", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" }, "raw-body": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", "requires": { "bytes": "3.0.0", "http-errors": "1.6.2", "iconv-lite": "0.4.19", "unpipe": "1.0.0" }, "dependencies": { "depd": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" }, "http-errors": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", "requires": { "depd": "1.1.1", "inherits": "2.0.3", "setprototypeof": "1.0.3", "statuses": ">= 1.3.1 < 2" } }, "setprototypeof": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" } } }, "statuses": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" } } }, "express-restify-mongoose": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/express-restify-mongoose/-/express-restify-mongoose-4.3.0.tgz", "integrity": "sha512-9ygnIetF0bwG+ooZc95XkI0FDMdyTUxnVt/N2vGHl4bFxPqdUsV1jAFqzSbZpsvawid4e26CtBjFyZxNzLeNtA==", "requires": { "async": "~2.5.0", "bluebird": "~3.5.0", "ensure-array": "0.0.5", "is-coordinates": "~2.0.0", "lodash.clone": "~4.5.0", "lodash.defaults": "~4.2.0", "lodash.get": "~4.4.2", "lodash.has": "~4.5.2", "lodash.isplainobject": "~4.0.6", "lodash.map": "~4.6.0", "mongoose-detective": "~0.1.0", "moredots": "~0.1.0", "serialize-error": "~2.1.0", "weedout": "~0.1.0" } }, "express-session": { "version": "1.15.6", "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.15.6.tgz", "integrity": "sha512-r0nrHTCYtAMrFwZ0kBzZEXa1vtPVrw0dKvGSrKP4dahwBQ1BJpF2/y1Pp4sCD/0kvxV4zZeclyvfmw0B4RMJQA==", "requires": { "cookie": "0.3.1", "cookie-signature": "1.0.6", "crc": "3.4.4", "debug": "2.6.9", "depd": "~1.1.1", "on-headers": "~1.0.1", "parseurl": "~1.3.2", "uid-safe": "~2.1.5", "utils-merge": "1.0.1" } }, "extend-shallow": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", "requires": { "assign-symbols": "^1.0.0", "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "requires": { "is-plain-object": "^2.0.4" } } } }, "extglob": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", "requires": { "array-unique": "^0.3.2", "define-property": "^1.0.0", "expand-brackets": "^2.1.4", "extend-shallow": "^2.0.1", "fragment-cache": "^0.2.1", "regex-not": "^1.0.0", "snapdragon": "^0.8.1", "to-regex": "^3.0.1" }, "dependencies": { "define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { "is-descriptor": "^1.0.0" } }, "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { "is-extendable": "^0.1.0" } }, "is-accessor-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { "kind-of": "^6.0.0" } }, "is-data-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { "kind-of": "^6.0.0" } }, "is-descriptor": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", "kind-of": "^6.0.2" } }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" } } }, "fast-deep-equal": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz", "integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ=" }, "fast-json-stable-stringify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" }, "fbjs": { "version": "0.8.16", "resolved": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.16.tgz", "integrity": "sha1-XmdDL1UNxBtXK/VYR7ispk5TN9s=", "requires": { "core-js": "^1.0.0", "isomorphic-fetch": "^2.1.1", "loose-envify": "^1.0.0", "object-assign": "^4.1.0", "promise": "^7.1.1", "setimmediate": "^1.0.5", "ua-parser-js": "^0.7.9" }, "dependencies": { "core-js": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" } } }, "filesize": { "version": "3.6.1", "resolved": "https://registry.npmjs.org/filesize/-/filesize-3.6.1.tgz", "integrity": "sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==" }, "fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", "requires": { "extend-shallow": "^2.0.1", "is-number": "^3.0.0", "repeat-string": "^1.6.1", "to-regex-range": "^2.1.0" }, "dependencies": { "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { "is-extendable": "^0.1.0" } } } }, "finalhandler": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", "requires": { "debug": "2.6.9", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "on-finished": "~2.3.0", "parseurl": "~1.3.2", "statuses": "~1.4.0", "unpipe": "~1.0.0" }, "dependencies": { "statuses": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" } } }, "find-babel-config": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/find-babel-config/-/find-babel-config-1.1.0.tgz", "integrity": "sha1-rMAQQ6Z0n+w0Qpvmtk9ULrtdY1U=", "requires": { "json5": "^0.5.1", "path-exists": "^3.0.0" } }, "find-cache-dir": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-1.0.0.tgz", "integrity": "sha1-kojj6ePMN0hxfTnq3hfPcfww7m8=", "requires": { "commondir": "^1.0.1", "make-dir": "^1.0.0", "pkg-dir": "^2.0.0" } }, "find-up": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", "requires": { "locate-path": "^2.0.0" } }, "follow-redirects": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.2.5.tgz", "integrity": "sha512-lMhwQTryFbG+wYsAIEKC1Kf5IGDlVNnONRogIBllh7LLoV7pNIxW0z9fhjRar9NBql+hd2Y49KboVVNxf6GEfg==", "requires": { "debug": "^2.6.9" } }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" }, "foreach": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" }, "foreachasync": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/foreachasync/-/foreachasync-3.0.0.tgz", "integrity": "sha1-VQKYfchxS+M5IJfzLgBxyd7gfPY=" }, "forwarded": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" }, "fragment-cache": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", "requires": { "map-cache": "^0.2.2" } }, "fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" }, "friendly-errors-webpack-plugin": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/friendly-errors-webpack-plugin/-/friendly-errors-webpack-plugin-1.5.0.tgz", "integrity": "sha1-8ogliQkk1sPw2OxTRpdoaIMpBUo=", "requires": { "chalk": "^1.1.3", "error-stack-parser": "^2.0.0", "string-length": "^1.0.1" } }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, "fsevents": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz", "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", "optional": true, "requires": { "nan": "^2.9.2", "node-pre-gyp": "^0.10.0" }, "dependencies": { "abbrev": { "version": "1.1.1", "bundled": true, "optional": true }, "ansi-regex": { "version": "2.1.1", "bundled": true, "optional": true }, "aproba": { "version": "1.2.0", "bundled": true, "optional": true }, "are-we-there-yet": { "version": "1.1.4", "bundled": true, "optional": true, "requires": { "delegates": "^1.0.0", "readable-stream": "^2.0.6" } }, "balanced-match": { "version": "1.0.0", "bundled": true, "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, "chownr": { "version": "1.0.1", "bundled": true, "optional": true }, "code-point-at": { "version": "1.1.0", "bundled": true, "optional": true }, "concat-map": { "version": "0.0.1", "bundled": true, "optional": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, "optional": true }, "core-util-is": { "version": "1.0.2", "bundled": true, "optional": true }, "debug": { "version": "2.6.9", "bundled": true, "optional": true, "requires": { "ms": "2.0.0" } }, "deep-extend": { "version": "0.5.1", "bundled": true, "optional": true }, "delegates": { "version": "1.0.0", "bundled": true, "optional": true }, "detect-libc": { "version": "1.0.3", "bundled": true, "optional": true }, "fs-minipass": { "version": "1.2.5", "bundled": true, "optional": true, "requires": { "minipass": "^2.2.1" } }, "fs.realpath": { "version": "1.0.0", "bundled": true, "optional": true }, "gauge": { "version": "2.7.4", "bundled": true, "optional": true, "requires": { "aproba": "^1.0.3", "console-control-strings": "^1.0.0", "has-unicode": "^2.0.0", "object-assign": "^4.1.0", "signal-exit": "^3.0.0", "string-width": "^1.0.1", "strip-ansi": "^3.0.1", "wide-align": "^1.1.0" } }, "glob": { "version": "7.1.2", "bundled": true, "optional": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "has-unicode": { "version": "2.0.1", "bundled": true, "optional": true }, "iconv-lite": { "version": "0.4.21", "bundled": true, "optional": true, "requires": { "safer-buffer": "^2.1.0" } }, "ignore-walk": { "version": "3.0.1", "bundled": true, "optional": true, "requires": { "minimatch": "^3.0.4" } }, "inflight": { "version": "1.0.6", "bundled": true, "optional": true, "requires": { "once": "^1.3.0", "wrappy": "1" } }, "inherits": { "version": "2.0.3", "bundled": true, "optional": true }, "ini": { "version": "1.3.5", "bundled": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, "optional": true, "requires": { "number-is-nan": "^1.0.0" } }, "isarray": { "version": "1.0.0", "bundled": true, "optional": true }, "minimatch": { "version": "3.0.4", "bundled": true, "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", "bundled": true, "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" } }, "minizlib": { "version": "1.1.0", "bundled": true, "optional": true, "requires": { "minipass": "^2.2.1" } }, "mkdirp": { "version": "0.5.1", "bundled": true, "optional": true, "requires": { "minimist": "0.0.8" } }, "ms": { "version": "2.0.0", "bundled": true, "optional": true }, "needle": { "version": "2.2.0", "bundled": true, "optional": true, "requires": { "debug": "^2.1.2", "iconv-lite": "^0.4.4", "sax": "^1.2.4" } }, "node-pre-gyp": { "version": "0.10.0", "bundled": true, "optional": true, "requires": { "detect-libc": "^1.0.2", "mkdirp": "^0.5.1", "needle": "^2.2.0", "nopt": "^4.0.1", "npm-packlist": "^1.1.6", "npmlog": "^4.0.2", "rc": "^1.1.7", "rimraf": "^2.6.1", "semver": "^5.3.0", "tar": "^4" } }, "nopt": { "version": "4.0.1", "bundled": true, "optional": true, "requires": { "abbrev": "1", "osenv": "^0.1.4" } }, "npm-bundled": { "version": "1.0.3", "bundled": true, "optional": true }, "npm-packlist": { "version": "1.1.10", "bundled": true, "optional": true, "requires": { "ignore-walk": "^3.0.1", "npm-bundled": "^1.0.1" } }, "npmlog": { "version": "4.1.2", "bundled": true, "optional": true, "requires": { "are-we-there-yet": "~1.1.2", "console-control-strings": "~1.1.0", "gauge": "~2.7.3", "set-blocking": "~2.0.0" } }, "number-is-nan": { "version": "1.0.1", "bundled": true, "optional": true }, "object-assign": { "version": "4.1.1", "bundled": true, "optional": true }, "once": { "version": "1.4.0", "bundled": true, "optional": true, "requires": { "wrappy": "1" } }, "os-homedir": { "version": "1.0.2", "bundled": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", "bundled": true, "optional": true }, "osenv": { "version": "0.1.5", "bundled": true, "optional": true, "requires": { "os-homedir": "^1.0.0", "os-tmpdir": "^1.0.0" } }, "path-is-absolute": { "version": "1.0.1", "bundled": true, "optional": true }, "process-nextick-args": { "version": "2.0.0", "bundled": true, "optional": true }, "rc": { "version": "1.2.7", "bundled": true, "optional": true, "requires": { "deep-extend": "^0.5.1", "ini": "~1.3.0", "minimist": "^1.2.0", "strip-json-comments": "~2.0.1" }, "dependencies": { "minimist": { "version": "1.2.0", "bundled": true, "optional": true } } }, "readable-stream": { "version": "2.3.6", "bundled": true, "optional": true, "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "rimraf": { "version": "2.6.2", "bundled": true, "optional": true, "requires": { "glob": "^7.0.5" } }, "safe-buffer": { "version": "5.1.1", "bundled": true, "optional": true }, "safer-buffer": { "version": "2.1.2", "bundled": true, "optional": true }, "sax": { "version": "1.2.4", "bundled": true, "optional": true }, "semver": { "version": "5.5.0", "bundled": true, "optional": true }, "set-blocking": { "version": "2.0.0", "bundled": true, "optional": true }, "signal-exit": { "version": "3.0.2", "bundled": true, "optional": true }, "string-width": { "version": "1.0.2", "bundled": true, "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", "strip-ansi": "^3.0.0" } }, "string_decoder": { "version": "1.1.1", "bundled": true, "optional": true, "requires": { "safe-buffer": "~5.1.0" } }, "strip-ansi": { "version": "3.0.1", "bundled": true, "optional": true, "requires": { "ansi-regex": "^2.0.0" } }, "strip-json-comments": { "version": "2.0.1", "bundled": true, "optional": true }, "tar": { "version": "4.4.1", "bundled": true, "optional": true, "requires": { "chownr": "^1.0.1", "fs-minipass": "^1.2.5", "minipass": "^2.2.4", "minizlib": "^1.1.0", "mkdirp": "^0.5.0", "safe-buffer": "^5.1.1", "yallist": "^3.0.2" } }, "util-deprecate": { "version": "1.0.2", "bundled": true, "optional": true }, "wide-align": { "version": "1.1.2", "bundled": true, "optional": true, "requires": { "string-width": "^1.0.2" } }, "wrappy": { "version": "1.0.2", "bundled": true, "optional": true }, "yallist": { "version": "3.0.2", "bundled": true, "optional": true } } }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, "generaterr": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/generaterr/-/generaterr-1.5.0.tgz", "integrity": "sha1-sM62zFFk3yoGEzjMNAqGFTlcUvw=" }, "get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==" }, "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" }, "glob": { "version": "7.1.1", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.1.tgz", "integrity": "sha1-gFIR3wT6rxxjo2ADBs31reULLsg=", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.0.2", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "glob-parent": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", "requires": { "is-glob": "^3.1.0", "path-dirname": "^1.0.0" }, "dependencies": { "is-glob": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", "requires": { "is-extglob": "^2.1.0" } } } }, "glob-promise": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/glob-promise/-/glob-promise-3.1.0.tgz", "integrity": "sha1-GYiCo4F759wsVfkmI6qeez+C0es=" }, "global": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/global/-/global-4.3.2.tgz", "integrity": "sha1-52mJJopsdMOJCLEwWxD8DjlOnQ8=", "requires": { "min-document": "^2.19.0", "process": "~0.5.1" } }, "globals": { "version": "9.18.0", "resolved": "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz", "integrity": "sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==" }, "globby": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", "requires": { "array-union": "^1.0.1", "glob": "^7.0.3", "object-assign": "^4.0.1", "pify": "^2.0.0", "pinkie-promise": "^2.0.0" }, "dependencies": { "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" } } }, "graceful-fs": { "version": "4.1.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "requires": { "function-bind": "^1.1.1" } }, "has-ansi": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", "requires": { "ansi-regex": "^2.0.0" } }, "has-flag": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=" }, "has-symbols": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=" }, "has-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", "requires": { "get-value": "^2.0.6", "has-values": "^1.0.0", "isobject": "^3.0.0" } }, "has-values": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", "requires": { "is-number": "^3.0.0", "kind-of": "^4.0.0" }, "dependencies": { "kind-of": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", "requires": { "is-buffer": "^1.1.5" } } } }, "hash-base": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" } }, "hash.js": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.5.tgz", "integrity": "sha512-eWI5HG9Np+eHV1KQhisXWwM+4EPPYe5dFX1UZZH7k/E3JzDEazVH+VGlZi6R94ZqImq+A3D1mCEtrFIfg/E7sA==", "requires": { "inherits": "^2.0.3", "minimalistic-assert": "^1.0.1" } }, "hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", "requires": { "hash.js": "^1.0.3", "minimalistic-assert": "^1.0.0", "minimalistic-crypto-utils": "^1.0.1" } }, "hoist-non-react-statics": { "version": "2.5.5", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz", "integrity": "sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw==" }, "home-or-tmp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/home-or-tmp/-/home-or-tmp-2.0.0.tgz", "integrity": "sha1-42w/LSyufXRqhX440Y1fMqeILbg=", "requires": { "os-homedir": "^1.0.0", "os-tmpdir": "^1.0.1" } }, "hooks-fixed": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hooks-fixed/-/hooks-fixed-2.0.2.tgz", "integrity": "sha512-YurCM4gQSetcrhwEtpQHhQ4M7Zo7poNGqY4kQGeBS6eZtOcT3tnNs01ThFa0jYBByAiYt1MjMjP/YApG0EnAvQ==" }, "hosted-git-info": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==" }, "html-entities": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz", "integrity": "sha1-DfKTUfByEWNRXfueVUPl9u7VFi8=" }, "htmlescape": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=" }, "http-errors": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", "requires": { "depd": "~1.1.2", "inherits": "2.0.3", "setprototypeof": "1.1.0", "statuses": ">= 1.4.0 < 2" }, "dependencies": { "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" } } }, "http-status": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/http-status/-/http-status-1.0.1.tgz", "integrity": "sha1-3EMAGov8UKyH1IWokvdXiWS8lKI=" }, "https-browserify": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" }, "iconv-lite": { "version": "0.4.19", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" }, "ieee754": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", "integrity": "sha512-GguP+DRY+pJ3soyIiGPTvdiVXjZ+DbXOxGpXn3eMvNW4x4irjqXm4wHKscC+TfxSJ0yw/S1F24tqdMNsMZTiLA==" }, "immutable": { "version": "3.8.2", "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz", "integrity": "sha1-wkOZUUVbs5kT2vKBN28VMOEErfM=" }, "indexof": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=" }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "requires": { "once": "^1.3.0", "wrappy": "1" } }, "inherits": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, "interpret": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", "integrity": "sha1-ftGxQQxqDg94z5XTuEQMY/eLhhQ=" }, "invariant": { "version": "2.2.4", "resolved": "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz", "integrity": "sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==", "requires": { "loose-envify": "^1.0.0" } }, "invert-kv": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" }, "ipaddr.js": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=" }, "is-accessor-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", "requires": { "kind-of": "^3.0.2" } }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" }, "is-binary-path": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", "requires": { "binary-extensions": "^1.0.0" } }, "is-buffer": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz", "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=" }, "is-builtin-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "requires": { "builtin-modules": "^1.0.0" } }, "is-coordinates": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-coordinates/-/is-coordinates-2.0.2.tgz", "integrity": "sha1-wxO7bs4k7Tm2rT/fz26Ok64Rc3A=" }, "is-data-descriptor": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", "requires": { "kind-of": "^3.0.2" } }, "is-descriptor": { "version": "0.1.6", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", "requires": { "is-accessor-descriptor": "^0.1.6", "is-data-descriptor": "^0.1.4", "kind-of": "^5.0.0" }, "dependencies": { "kind-of": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } }, "is-extendable": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" }, "is-finite": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", "integrity": "sha1-zGZ3aVYCvlUO8R6LSqYwU0K20Ko=", "requires": { "number-is-nan": "^1.0.0" } }, "is-fullwidth-code-point": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "requires": { "number-is-nan": "^1.0.0" } }, "is-glob": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.0.tgz", "integrity": "sha1-lSHHaEXMJhCoUgPd8ICpWML/q8A=", "requires": { "is-extglob": "^2.1.1" } }, "is-number": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", "requires": { "kind-of": "^3.0.2" } }, "is-path-cwd": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-1.0.0.tgz", "integrity": "sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0=" }, "is-path-in-cwd": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz", "integrity": "sha512-FjV1RTW48E7CWM7eE/J2NJvAEEVektecDBVBE5Hh3nM1Jd0kvhHtX68Pr3xsDf857xt3Y4AkwVULK1Vku62aaQ==", "requires": { "is-path-inside": "^1.0.0" } }, "is-path-inside": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz", "integrity": "sha1-jvW33lBDej/cprToZe96pVy0gDY=", "requires": { "path-is-inside": "^1.0.1" } }, "is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "requires": { "isobject": "^3.0.1" } }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" }, "is-utf8": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=" }, "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, "isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" }, "isomorphic-fetch": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", "requires": { "node-fetch": "^1.0.1", "whatwg-fetch": ">=0.10.0" } }, "js-tokens": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" }, "jsesc": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-1.3.0.tgz", "integrity": "sha1-RsP+yMGJKxKwgz25vHYiF226s0s=" }, "json-loader": { "version": "0.5.4", "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.4.tgz", "integrity": "sha1-i6oTZaYy9Yo8RtIBdfxgAsluN94=" }, "json-schema-traverse": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" }, "json5": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" }, "jsonschema": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.2.0.tgz", "integrity": "sha512-XDJApzBauMg0TinJNP4iVcJl99PQ4JbWKK7nwzpOIkAOVveDKgh/2xm41T3x7Spu4PWMhnnQpNJmUSIUgl6sKg==" }, "junk": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/junk/-/junk-1.0.3.tgz", "integrity": "sha1-h75jSIZJy9ym9Tqzm+yczSNH9ZI=" }, "kareem": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/kareem/-/kareem-1.5.0.tgz", "integrity": "sha1-4+QQHZ3P3imXadr0tNtk2JXRdEg=" }, "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "requires": { "is-buffer": "^1.1.5" } }, "lazy-cache": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=" }, "lcid": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", "requires": { "invert-kv": "^1.0.0" } }, "load-json-file": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "requires": { "graceful-fs": "^4.1.2", "parse-json": "^2.2.0", "pify": "^2.0.0", "pinkie-promise": "^2.0.0", "strip-bom": "^2.0.0" }, "dependencies": { "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" } } }, "loader-runner": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=" }, "loader-utils": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.1.0.tgz", "integrity": "sha1-yYrvSIvM7aL/teLeZG1qdUQp9c0=", "requires": { "big.js": "^3.1.3", "emojis-list": "^2.0.0", "json5": "^0.5.0" } }, "locate-path": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", "requires": { "p-locate": "^2.0.0", "path-exists": "^3.0.0" } }, "lodash": { "version": "4.17.10", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" }, "lodash-es": { "version": "4.17.4", "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.4.tgz", "integrity": "sha1-3MHXVS4VCgZABzupyzHXDwMpUOc=" }, "lodash.camelcase": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", "integrity": "sha1-soqmKIorn8ZRA1x3EfZathkDMaY=" }, "lodash.clone": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-4.5.0.tgz", "integrity": "sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y=" }, "lodash.curry": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.curry/-/lodash.curry-4.1.1.tgz", "integrity": "sha1-JI42By7ekGUB11lmIAqG2riyMXA=" }, "lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=" }, "lodash.defaults": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz", "integrity": "sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw=" }, "lodash.get": { "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=" }, "lodash.has": { "version": "4.5.2", "resolved": "https://registry.npmjs.org/lodash.has/-/lodash.has-4.5.2.tgz", "integrity": "sha1-0Z9NwQlQWMzL4rDN9O4P5Ko3yGI=" }, "lodash.isplainobject": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" }, "lodash.map": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/lodash.map/-/lodash.map-4.6.0.tgz", "integrity": "sha1-dx7Hg540c9nEzeKLGTlMNWL09tM=" }, "lodash.topath": { "version": "4.5.2", "resolved": "https://registry.npmjs.org/lodash.topath/-/lodash.topath-4.5.2.tgz", "integrity": "sha1-NhY1Hzu6YZlKCTGYlmC9AyVP0Ak=" }, "longest": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" }, "loose-envify": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", "requires": { "js-tokens": "^3.0.0" } }, "lru-cache": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", "requires": { "pseudomap": "^1.0.2", "yallist": "^2.1.2" } }, "lusca": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/lusca/-/lusca-1.6.1.tgz", "integrity": "sha512-+JzvUMH/rsE/4XfHdDOl70bip0beRcHSviYATQM0vtls59uVtdn1JMu4iD7ZShBpAmFG8EnaA+PrYG9sECMIOQ==", "requires": { "tsscmp": "^1.0.5" } }, "make-dir": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", "integrity": "sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ==", "requires": { "pify": "^3.0.0" } }, "map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" }, "map-visit": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", "requires": { "object-visit": "^1.0.0" } }, "maximatch": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/maximatch/-/maximatch-0.1.0.tgz", "integrity": "sha1-hs2NawTJ8wfAWmuUGZBtA2D7E6I=", "requires": { "array-differ": "^1.0.0", "array-union": "^1.0.1", "arrify": "^1.0.0", "minimatch": "^3.0.0" } }, "md5-file": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/md5-file/-/md5-file-3.1.1.tgz", "integrity": "sha1-2zySwJu9pcLeiD+lSQ3XEf3burk=" }, "md5.js": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", "requires": { "hash-base": "^3.0.0", "inherits": "^2.0.1" } }, "media-typer": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" }, "memory-fs": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/memory-fs/-/memory-fs-0.4.1.tgz", "integrity": "sha1-OpoguEYlI+RHz7x+i7gO1me/xVI=", "requires": { "errno": "^0.1.3", "readable-stream": "^2.0.1" } }, "merge-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" }, "method-override": { "version": "2.3.10", "resolved": "https://registry.npmjs.org/method-override/-/method-override-2.3.10.tgz", "integrity": "sha1-49r41d7hDdLc59SuiNYrvud0drQ=", "requires": { "debug": "2.6.9", "methods": "~1.1.2", "parseurl": "~1.3.2", "vary": "~1.1.2" } }, "methods": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" }, "micromatch": { "version": "3.1.10", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", "requires": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", "braces": "^2.3.1", "define-property": "^2.0.2", "extend-shallow": "^3.0.2", "extglob": "^2.0.4", "fragment-cache": "^0.2.1", "kind-of": "^6.0.2", "nanomatch": "^1.2.9", "object.pick": "^1.3.0", "regex-not": "^1.0.0", "snapdragon": "^0.8.1", "to-regex": "^3.0.2" }, "dependencies": { "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" } } }, "miller-rabin": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", "requires": { "bn.js": "^4.0.0", "brorand": "^1.0.1" } }, "mime": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" }, "mime-db": { "version": "1.35.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.35.0.tgz", "integrity": "sha512-JWT/IcCTsB0Io3AhWUMjRqucrHSPsSf2xKLaRldJVULioggvkJvggZ3VXNNSRkCddE6D+BUI4HEIZIA2OjwIvg==" }, "mime-types": { "version": "2.1.19", "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.19.tgz", "integrity": "sha512-P1tKYHVSZ6uFo26mtnve4HQFE3koh1UWVkp8YUC+ESBHe945xWSoXuHHiGarDqcEZ+whpCDnlNw5LON0kLo+sw==", "requires": { "mime-db": "~1.35.0" } }, "min-document": { "version": "2.19.0", "resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz", "integrity": "sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU=", "requires": { "dom-walk": "^0.1.0" } }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" }, "minimalistic-crypto-utils": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" }, "minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=" }, "mixin-deep": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.1.tgz", "integrity": "sha512-8ZItLHeEgaqEvd5lYBXfm4EZSFCX29Jb9K+lAHhDKzReKBQKj3R+7NOF6tjqYi9t4oI8VUfaWITJQm86wnXGNQ==", "requires": { "for-in": "^1.0.2", "is-extendable": "^1.0.1" }, "dependencies": { "is-extendable": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", "requires": { "is-plain-object": "^2.0.4" } } } }, "mkdirp": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "requires": { "minimist": "0.0.8" }, "dependencies": { "minimist": { "version": "0.0.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=" } } }, "mkdirp-then": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mkdirp-then/-/mkdirp-then-1.2.0.tgz", "integrity": "sha1-pJLIecpNhz9e5FAI+PVf0BUN48U=", "requires": { "any-promise": "^1.1.0", "mkdirp": "^0.5.0" } }, "moment": { "version": "2.22.2", "resolved": "https://registry.npmjs.org/moment/-/moment-2.22.2.tgz", "integrity": "sha1-PCV/mDn8DpP/UxSWMiOeuQeD/2Y=" }, "mongodb": { "version": "2.2.33", "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-2.2.33.tgz", "integrity": "sha1-tTfEcdNKZlG0jzb9vyl1A0Dgi1A=", "requires": { "es6-promise": "3.2.1", "mongodb-core": "2.1.17", "readable-stream": "2.2.7" } }, "mongodb-core": { "version": "2.1.17", "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-2.1.17.tgz", "integrity": "sha1-pBizN6FKFJkPtRC5I97mqBMXPfg=", "requires": { "bson": "~1.0.4", "require_optional": "~1.0.0" } }, "mongoose": { "version": "4.13.14", "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-4.13.14.tgz", "integrity": "sha512-20zynb1fvCO37AP+0iTPGDbt4dJJkzM9fNK5BwKf5n+gFU5YYdXpnhxs9Kf8C+Fe0xY8vpUKV8wA7VGWcmDaFw==", "requires": { "async": "2.6.0", "bson": "~1.0.4", "hooks-fixed": "2.0.2", "kareem": "1.5.0", "lodash.get": "4.4.2", "mongodb": "2.2.34", "mpath": "0.3.0", "mpromise": "0.5.5", "mquery": "2.3.3", "ms": "2.0.0", "muri": "1.3.0", "regexp-clone": "0.0.1", "sliced": "1.0.1" }, "dependencies": { "async": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", "requires": { "lodash": "^4.14.0" } }, "mongodb": { "version": "2.2.34", "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-2.2.34.tgz", "integrity": "sha1-o09Zu+thdUrsQy3nLD/iFSakTBo=", "requires": { "es6-promise": "3.2.1", "mongodb-core": "2.1.18", "readable-stream": "2.2.7" } }, "mongodb-core": { "version": "2.1.18", "resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-2.1.18.tgz", "integrity": "sha1-TEYTm986HwMt7ZHbSfOO7AFlkFA=", "requires": { "bson": "~1.0.4", "require_optional": "~1.0.0" } } } }, "mongoose-detective": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/mongoose-detective/-/mongoose-detective-0.1.1.tgz", "integrity": "sha1-hTsF4vwQDBz65tUhcfYmJt5oH84=" }, "mongoose-long": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/mongoose-long/-/mongoose-long-0.1.1.tgz", "integrity": "sha1-zDLgWwz1DIXiWhk1nUOpNv6VBaM=" }, "moredots": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/moredots/-/moredots-0.1.1.tgz", "integrity": "sha1-EycT7sQKDNjHNml1d2GxSVz6Jt8=", "requires": { "lodash.isplainobject": "~4.0.0" } }, "morgan": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.9.0.tgz", "integrity": "sha1-0B+mxlhZt2/PMbPLU6OCGjEdgFE=", "requires": { "basic-auth": "~2.0.0", "debug": "2.6.9", "depd": "~1.1.1", "on-finished": "~2.3.0", "on-headers": "~1.0.1" } }, "mpath": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.3.0.tgz", "integrity": "sha1-elj3iem1/TyUUgY0FXlg8mvV70Q=" }, "mpromise": { "version": "0.5.5", "resolved": "https://registry.npmjs.org/mpromise/-/mpromise-0.5.5.tgz", "integrity": "sha1-9bJCWddjrMIlewoMjG2Gb9UXMuY=" }, "mquery": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/mquery/-/mquery-2.3.3.tgz", "integrity": "sha512-NC8L14kn+qxJbbJ1gbcEMDxF0sC3sv+1cbRReXXwVvowcwY1y9KoVZFq0ebwARibsadu8lx8nWGvm3V0Pf0ZWQ==", "requires": { "bluebird": "3.5.0", "debug": "2.6.9", "regexp-clone": "0.0.1", "sliced": "0.0.5" }, "dependencies": { "bluebird": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz", "integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw=" }, "sliced": { "version": "0.0.5", "resolved": "https://registry.npmjs.org/sliced/-/sliced-0.0.5.tgz", "integrity": "sha1-XtwETKTrb3gW1Qui/GPiXY/kcH8=" } } }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, "muri": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/muri/-/muri-1.3.0.tgz", "integrity": "sha512-FiaFwKl864onHFFUV/a2szAl7X0fxVlSKNdhTf+BM8i8goEgYut8u5P9MqQqIYwvaMxjzVESsoEm/2kfkFH1rg==" }, "mv": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/mv/-/mv-2.1.1.tgz", "integrity": "sha1-rmzg1vbV4KT32JN5jQPB6pVZtqI=", "requires": { "mkdirp": "~0.5.1", "ncp": "~2.0.0", "rimraf": "~2.4.0" }, "dependencies": { "glob": { "version": "6.0.4", "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", "requires": { "inflight": "^1.0.4", "inherits": "2", "minimatch": "2 || 3", "once": "^1.3.0", "path-is-absolute": "^1.0.0" } }, "rimraf": { "version": "2.4.5", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.4.5.tgz", "integrity": "sha1-7nEM5dk6j9uFb7Xqj/Di11k0sto=", "requires": { "glob": "^6.0.1" } } } }, "mz": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/mz/-/mz-2.6.0.tgz", "integrity": "sha1-yLhSHZWN8KTydoAl22nHGe5O8c4=", "requires": { "any-promise": "^1.0.0", "object-assign": "^4.0.1", "thenify-all": "^1.0.0" } }, "nan": { "version": "2.10.0", "resolved": "https://registry.npmjs.org/nan/-/nan-2.10.0.tgz", "integrity": "sha512-bAdJv7fBLhWC+/Bls0Oza+mvTaNQtP+1RyhhhvD95pgUJz6XM5IzgmxOkItJ9tkoCiplvAnXI1tNmmUD/eScyA==", "optional": true }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", "requires": { "arr-diff": "^4.0.0", "array-unique": "^0.3.2", "define-property": "^2.0.2", "extend-shallow": "^3.0.2", "fragment-cache": "^0.2.1", "is-windows": "^1.0.2", "kind-of": "^6.0.2", "object.pick": "^1.3.0", "regex-not": "^1.0.0", "snapdragon": "^0.8.1", "to-regex": "^3.0.1" }, "dependencies": { "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" } } }, "ncp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ncp/-/ncp-2.0.0.tgz", "integrity": "sha1-GVoh1sRuNh0vsSgbo4uR6d9727M=" }, "negotiator": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" }, "neo-async": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.5.1.tgz", "integrity": "sha512-3KL3fvuRkZ7s4IFOMfztb7zJp3QaVWnBeGoJlgB38XnCRPj/0tLzzLG5IB8NYOHbJ8g8UGrgZv44GLDk6CxTxA==" }, "next": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/next/-/next-3.2.3.tgz", "integrity": "sha512-oJ8qi+t+rsEY3vll7jc5zDEoRyUzGsKoSi1Tx7vYYHYIjdmcG3fgjLBuHp5YkP6nzhldzs+tJhK36fJzM1Uh6w==", "requires": { "ansi-html": "0.0.7", "babel-core": "6.25.0", "babel-generator": "6.25.0", "babel-loader": "7.1.1", "babel-plugin-module-resolver": "2.6.2", "babel-plugin-react-require": "3.0.0", "babel-plugin-syntax-dynamic-import": "6.18.0", "babel-plugin-transform-class-properties": "6.24.1", "babel-plugin-transform-es2015-modules-commonjs": "6.24.1", "babel-plugin-transform-object-rest-spread": "6.22.0", "babel-plugin-transform-react-jsx-source": "6.22.0", "babel-plugin-transform-react-remove-prop-types": "0.4.5", "babel-plugin-transform-runtime": "6.22.0", "babel-preset-env": "1.6.0", "babel-preset-react": "6.24.1", "babel-runtime": "6.23.0", "babel-template": "6.25.0", "case-sensitive-paths-webpack-plugin": "2.1.1", "cross-spawn": "5.1.0", "del": "3.0.0", "etag": "1.8.0", "fresh": "0.5.0", "friendly-errors-webpack-plugin": "1.5.0", "glob": "7.1.1", "glob-promise": "3.1.0", "hoist-non-react-statics": "^2.2.2", "htmlescape": "1.1.1", "http-status": "1.0.1", "json-loader": "0.5.4", "loader-utils": "1.1.0", "md5-file": "3.1.1", "minimist": "1.2.0", "mkdirp-then": "1.2.0", "mv": "2.1.1", "mz": "2.6.0", "path-match": "1.2.4", "pkg-up": "2.0.0", "prop-types": "15.5.10", "prop-types-exact": "^1.1.1", "react-hot-loader": "3.0.0-beta.7", "recursive-copy": "^2.0.6", "send": "^0.15.3", "source-map-support": "0.4.15", "strip-ansi": "3.0.1", "styled-jsx": "^1.0.8", "touch": "3.1.0", "unfetch": "3.0.0", "url": "0.11.0", "uuid": "3.1.0", "walk": "^2.3.9", "webpack": "3.3.0", "webpack-dev-middleware": "1.11.0", "webpack-hot-middleware": "2.18.2", "write-file-webpack-plugin": "4.1.0", "xss-filters": "1.2.7" }, "dependencies": { "babel-runtime": { "version": "6.23.0", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.23.0.tgz", "integrity": "sha1-CpSJ8UTecO+zzkMArM2zKeL8VDs=", "requires": { "core-js": "^2.4.0", "regenerator-runtime": "^0.10.0" } }, "etag": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.0.tgz", "integrity": "sha1-b2Ma7zNtbEY2K1F2QETOIWvjwFE=" }, "fresh": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.0.tgz", "integrity": "sha1-9HTKXmqSRtb9jglTz6m5yAWvp44=" }, "mime": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz", "integrity": "sha1-EV+eO2s9rylZmDyzjxSaLUDrXVM=" }, "prop-types": { "version": "15.5.10", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.5.10.tgz", "integrity": "sha1-J5ffwxJhguOpXj37suiT3ddFYVQ=", "requires": { "fbjs": "^0.8.9", "loose-envify": "^1.3.1" } }, "regenerator-runtime": { "version": "0.10.5", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", "integrity": "sha1-M2w+/BIgrc7dosn6tntaeVWjNlg=" }, "send": { "version": "0.15.6", "resolved": "https://registry.npmjs.org/send/-/send-0.15.6.tgz", "integrity": "sha1-IPI6nJJbdiq4JwX+L52yUqzkfjQ=", "requires": { "debug": "2.6.9", "depd": "~1.1.1", "destroy": "~1.0.4", "encodeurl": "~1.0.1", "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", "http-errors": "~1.6.2", "mime": "1.3.4", "ms": "2.0.0", "on-finished": "~2.3.0", "range-parser": "~1.2.0", "statuses": "~1.3.1" }, "dependencies": { "etag": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" }, "fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" } } }, "statuses": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" } } }, "next-redux-wrapper": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/next-redux-wrapper/-/next-redux-wrapper-1.3.5.tgz", "integrity": "sha512-VZFl/CIIujxCGDlBM99W8pDYkSr5o10UMUt5/pZHZVgnaEqpFSsRsKz9yAkx/8C3RYFhGK4MHiNaf9+LtUUemA==", "requires": { "object.assign": "^4.0.4" } }, "next-tick": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=" }, "node-fetch": { "version": "1.7.3", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.3.tgz", "integrity": "sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ==", "requires": { "encoding": "^0.1.11", "is-stream": "^1.0.1" } }, "node-libs-browser": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.1.0.tgz", "integrity": "sha512-5AzFzdoIMb89hBGMZglEegffzgRg+ZFoUmisQ8HI4j1KDdpx13J0taNp2y9xPbur6W61gepGDDotGBVQ7mfUCg==", "requires": { "assert": "^1.1.1", "browserify-zlib": "^0.2.0", "buffer": "^4.3.0", "console-browserify": "^1.1.0", "constants-browserify": "^1.0.0", "crypto-browserify": "^3.11.0", "domain-browser": "^1.1.1", "events": "^1.0.0", "https-browserify": "^1.0.0", "os-browserify": "^0.3.0", "path-browserify": "0.0.0", "process": "^0.11.10", "punycode": "^1.2.4", "querystring-es3": "^0.2.0", "readable-stream": "^2.3.3", "stream-browserify": "^2.0.1", "stream-http": "^2.7.2", "string_decoder": "^1.0.0", "timers-browserify": "^2.0.4", "tty-browserify": "0.0.0", "url": "^0.11.0", "util": "^0.10.3", "vm-browserify": "0.0.4" }, "dependencies": { "process": { "version": "0.11.10", "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" }, "process-nextick-args": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" }, "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" }, "dependencies": { "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { "safe-buffer": "~5.1.0" } } } } } }, "nopt": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", "requires": { "abbrev": "1" } }, "normalize-package-data": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", "requires": { "hosted-git-info": "^2.1.4", "is-builtin-module": "^1.0.0", "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" } }, "normalize-path": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", "requires": { "remove-trailing-separator": "^1.0.1" } }, "nprogress": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/nprogress/-/nprogress-0.2.0.tgz", "integrity": "sha1-y480xTIT2JVyP8urkH6UIq28r7E=" }, "number-is-nan": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, "object-copy": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", "requires": { "copy-descriptor": "^0.1.0", "define-property": "^0.2.5", "kind-of": "^3.0.3" }, "dependencies": { "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { "is-descriptor": "^0.1.0" } } } }, "object-keys": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.12.tgz", "integrity": "sha512-FTMyFUm2wBcGHnH2eXmz7tC6IwlqQZ6mVZ+6dm6vZ4IQIHjs6FdNsQBuKGPuUUUY6NfJw2PshC08Tn6LzLDOag==" }, "object-visit": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", "requires": { "isobject": "^3.0.0" } }, "object.assign": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", "requires": { "define-properties": "^1.1.2", "function-bind": "^1.1.1", "has-symbols": "^1.0.0", "object-keys": "^1.0.11" } }, "object.pick": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "requires": { "isobject": "^3.0.1" } }, "on-finished": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", "requires": { "ee-first": "1.1.1" } }, "on-headers": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=" }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "requires": { "wrappy": "1" } }, "open-color": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/open-color/-/open-color-1.6.3.tgz", "integrity": "sha512-UAnb19odLDupaVDSioSHZZlWEkJvKHDE7CxB3Zg1vS0FpHAc72AkzfH0wCSwYK5TKg6bjtmFSfmQF9FcjQANZA==" }, "os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" }, "os-homedir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" }, "os-locale": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "requires": { "lcid": "^1.0.0" } }, "os-tmpdir": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" }, "p-limit": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "requires": { "p-try": "^1.0.0" } }, "p-locate": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", "requires": { "p-limit": "^1.1.0" } }, "p-map": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/p-map/-/p-map-1.2.0.tgz", "integrity": "sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA==" }, "p-try": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" }, "pako": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==" }, "parse-asn1": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", "requires": { "asn1.js": "^4.0.0", "browserify-aes": "^1.0.0", "create-hash": "^1.1.0", "evp_bytestokey": "^1.0.0", "pbkdf2": "^3.0.3" } }, "parse-json": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", "requires": { "error-ex": "^1.2.0" } }, "parseurl": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" }, "pascalcase": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" }, "passport": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/passport/-/passport-0.4.0.tgz", "integrity": "sha1-xQlWkTR71a07XhgCOMORTRbwWBE=", "requires": { "passport-strategy": "1.x.x", "pause": "0.0.1" } }, "passport-local": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/passport-local/-/passport-local-1.0.0.tgz", "integrity": "sha1-H+YyaMkudWBmJkN+O5BmYsFbpu4=", "requires": { "passport-strategy": "1.x.x" } }, "passport-local-mongoose": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/passport-local-mongoose/-/passport-local-mongoose-4.5.0.tgz", "integrity": "sha512-fd5dUdTcN37DA+CCL/7kGQ57ACs6NXyuNmWjrTj4kvTOFa7SA+msEYPYwpgwbc3Nc+4RUeMtEQW4fPMx7nDObQ==", "requires": { "debug": "^3.1.0", "generaterr": "^1.5.0", "passport-local": "^1.0.0", "scmp": "^2.0.0", "semver": "^5.4.1" }, "dependencies": { "debug": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", "requires": { "ms": "2.0.0" } } } }, "passport-strategy": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/passport-strategy/-/passport-strategy-1.0.0.tgz", "integrity": "sha1-tVOaqPwiWj0a0XlHbd8ja0QPUuQ=" }, "path-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=" }, "path-dirname": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=" }, "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" }, "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" }, "path-is-inside": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=" }, "path-match": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/path-match/-/path-match-1.2.4.tgz", "integrity": "sha1-pidH88fgwlFHYml/JEQ1hbCRAOo=", "requires": { "http-errors": "~1.4.0", "path-to-regexp": "^1.0.0" }, "dependencies": { "http-errors": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.4.0.tgz", "integrity": "sha1-bAJC3qaz33r9oVPHEImzHG6Cqr8=", "requires": { "inherits": "2.0.1", "statuses": ">= 1.2.1 < 2" } }, "inherits": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" }, "isarray": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" }, "path-to-regexp": { "version": "1.7.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.7.0.tgz", "integrity": "sha1-Wf3g9DW62suhA6hOnTvGTpa5k30=", "requires": { "isarray": "0.0.1" } } } }, "path-parse": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" }, "path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" }, "path-type": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "requires": { "graceful-fs": "^4.1.2", "pify": "^2.0.0", "pinkie-promise": "^2.0.0" }, "dependencies": { "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" } } }, "pause": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz", "integrity": "sha1-HUCLP9t2kjuVQ9lvtMnf1TXZy10=" }, "pbkdf2": { "version": "3.0.16", "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", "requires": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", "ripemd160": "^2.0.1", "safe-buffer": "^5.0.1", "sha.js": "^2.4.8" } }, "pify": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" }, "pinkie": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=" }, "pinkie-promise": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", "requires": { "pinkie": "^2.0.0" } }, "pkg-dir": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", "requires": { "find-up": "^2.1.0" } }, "pkg-up": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", "requires": { "find-up": "^2.1.0" } }, "polished": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/polished/-/polished-1.8.1.tgz", "integrity": "sha512-0DJUKvma7rdAIhntPxZpRNGFbvMtk+9i4mttF+mBc9DRy3agw44H3GDnh0R2AgBce/D226uKEvztjRQptP9jBg==" }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" }, "postcss-value-parser": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz", "integrity": "sha1-h/OPnxj3dKSrTIojL1xc6IcqnRU=" }, "private": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/private/-/private-0.1.8.tgz", "integrity": "sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg==" }, "process": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/process/-/process-0.5.2.tgz", "integrity": "sha1-FjjYqONML0QKkduVq5rrZ3/Bhc8=" }, "process-nextick-args": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, "promise": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", "requires": { "asap": "~2.0.3" } }, "prop-types": { "version": "15.6.2", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz", "integrity": "sha512-3pboPvLiWD7dkI3qf3KbUe6hKFKa52w+AE0VCqECtf+QHAKgOL37tTaNCnuX1nAAQ4ZhyP+kYVKf8rLmJ/feDQ==", "requires": { "loose-envify": "^1.3.1", "object-assign": "^4.1.1" } }, "prop-types-exact": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/prop-types-exact/-/prop-types-exact-1.2.0.tgz", "integrity": "sha512-K+Tk3Kd9V0odiXFP9fwDHUYRyvK3Nun3GVyPapSIs5OBkITAm15W0CPFD/YKTkMUAbc0b9CUwRQp2ybiBIq+eA==", "requires": { "has": "^1.0.3", "object.assign": "^4.1.0", "reflect.ownkeys": "^0.2.0" } }, "proxy-addr": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", "requires": { "forwarded": "~0.1.2", "ipaddr.js": "1.8.0" } }, "prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=" }, "pseudomap": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" }, "public-encrypt": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", "requires": { "bn.js": "^4.1.0", "browserify-rsa": "^4.0.0", "create-hash": "^1.1.0", "parse-asn1": "^5.0.0", "randombytes": "^2.0.1" } }, "punycode": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" }, "qs": { "version": "6.5.2", "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" }, "querystring": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" }, "querystring-es3": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" }, "random-bytes": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", "integrity": "sha1-T2ih3Arli9P7lYSMMDJNt11kNgs=" }, "randombytes": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", "requires": { "safe-buffer": "^5.1.0" } }, "randomfill": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", "requires": { "randombytes": "^2.0.5", "safe-buffer": "^5.1.0" } }, "range-parser": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" }, "raw-body": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", "requires": { "bytes": "3.0.0", "http-errors": "1.6.3", "iconv-lite": "0.4.23", "unpipe": "1.0.0" }, "dependencies": { "iconv-lite": { "version": "0.4.23", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", "requires": { "safer-buffer": ">= 2.1.2 < 3" } } } }, "react": { "version": "15.6.2", "resolved": "https://registry.npmjs.org/react/-/react-15.6.2.tgz", "integrity": "sha1-26BDSrQ5z+gvEI8PURZjkIF5qnI=", "requires": { "create-react-class": "^15.6.0", "fbjs": "^0.8.9", "loose-envify": "^1.1.0", "object-assign": "^4.1.0", "prop-types": "^15.5.10" }, "dependencies": { "prop-types": { "version": "15.6.0", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.0.tgz", "integrity": "sha1-zq8IMCL8RrSjX2nhPvda7Q1jmFY=", "requires": { "fbjs": "^0.8.16", "loose-envify": "^1.3.1", "object-assign": "^4.1.1" } } } }, "react-deep-force-update": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/react-deep-force-update/-/react-deep-force-update-2.1.1.tgz", "integrity": "sha1-jqQmPNZFWgULN0RbPwj9g52G6Qk=" }, "react-dom": { "version": "15.6.2", "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-15.6.2.tgz", "integrity": "sha1-Qc+t9pO3V/rycIRDodH9WgK+9zA=", "requires": { "fbjs": "^0.8.9", "loose-envify": "^1.1.0", "object-assign": "^4.1.0", "prop-types": "^15.5.10" }, "dependencies": { "prop-types": { "version": "15.6.0", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.0.tgz", "integrity": "sha1-zq8IMCL8RrSjX2nhPvda7Q1jmFY=", "requires": { "fbjs": "^0.8.16", "loose-envify": "^1.3.1", "object-assign": "^4.1.1" } } } }, "react-event-listener": { "version": "0.5.10", "resolved": "https://registry.npmjs.org/react-event-listener/-/react-event-listener-0.5.10.tgz", "integrity": "sha512-YZklRszh9hq3WP3bdNLjFwJcTCVe7qyTf5+LWNaHfZQaZrptsefDK2B5HHpOsEEaMHvjllUPr0+qIFVTSsurow==", "requires": { "@babel/runtime": "7.0.0-beta.42", "fbjs": "^0.8.16", "prop-types": "^15.6.0", "warning": "^3.0.0" } }, "react-hot-loader": { "version": "3.0.0-beta.7", "resolved": "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-3.0.0-beta.7.tgz", "integrity": "sha1-1YR7gWXXMcTVsw2G1dRxYieg+oM=", "requires": { "babel-template": "^6.7.0", "global": "^4.3.0", "react-deep-force-update": "^2.0.1", "react-proxy": "^3.0.0-alpha.0", "redbox-react": "^1.3.6", "source-map": "^0.4.4" }, "dependencies": { "source-map": { "version": "0.4.4", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", "requires": { "amdefine": ">=0.0.4" } } } }, "react-icon-base": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/react-icon-base/-/react-icon-base-2.1.0.tgz", "integrity": "sha1-oZbjP98eeqof2jrvu2i9rZ6Cp50=" }, "react-icons": { "version": "2.2.7", "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-2.2.7.tgz", "integrity": "sha512-0n4lcGqzJFcIQLoQytLdJCE0DKSA9dkwEZRYoGrIDJZFvIT6Hbajx5mv9geqhqFiNjUgtxg8kPyDfjlhymbGFg==", "requires": { "react-icon-base": "2.1.0" } }, "react-jsonschema-form": { "version": "0.50.1", "resolved": "https://registry.npmjs.org/react-jsonschema-form/-/react-jsonschema-form-0.50.1.tgz", "integrity": "sha512-pjhbIQhLmaezfRXZDYgEpM3Ua5m7Pz+jGiQBmRlBjSQ056uegUCKehxY7h4C6qJL8xH3RagteYDuHXxg2yYyww==", "requires": { "jsonschema": "^1.2.0", "lodash.topath": "^4.5.2", "prop-types": "^15.5.8", "setimmediate": "^1.0.5" }, "dependencies": { "prop-types": { "version": "15.6.0", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.0.tgz", "integrity": "sha1-zq8IMCL8RrSjX2nhPvda7Q1jmFY=", "requires": { "fbjs": "^0.8.16", "loose-envify": "^1.3.1", "object-assign": "^4.1.1" } } } }, "react-notification-system": { "version": "0.2.17", "resolved": "https://registry.npmjs.org/react-notification-system/-/react-notification-system-0.2.17.tgz", "integrity": "sha1-pg7du2IiWtj5/F14N1Rr9s2zaBg=", "requires": { "create-react-class": "^15.5.1", "object-assign": "^4.0.1", "prop-types": "^15.5.6" } }, "react-onclickoutside": { "version": "6.7.1", "resolved": "https://registry.npmjs.org/react-onclickoutside/-/react-onclickoutside-6.7.1.tgz", "integrity": "sha512-p84kBqGaMoa7VYT0vZ/aOYRfJB+gw34yjpda1Z5KeLflg70HipZOT+MXQenEhdkPAABuE2Astq4zEPdMqUQxcg==" }, "react-proxy": { "version": "3.0.0-alpha.1", "resolved": "https://registry.npmjs.org/react-proxy/-/react-proxy-3.0.0-alpha.1.tgz", "integrity": "sha1-RABCa8+oDKpnJMd1VpUxUgn6Swc=", "requires": { "lodash": "^4.6.1" } }, "react-redux": { "version": "5.0.7", "resolved": "https://registry.npmjs.org/react-redux/-/react-redux-5.0.7.tgz", "integrity": "sha512-5VI8EV5hdgNgyjfmWzBbdrqUkrVRKlyTKk1sGH3jzM2M2Mhj/seQgPXaz6gVAj2lz/nz688AdTqMO18Lr24Zhg==", "requires": { "hoist-non-react-statics": "^2.5.0", "invariant": "^2.0.0", "lodash": "^4.17.5", "lodash-es": "^4.17.5", "loose-envify": "^1.1.0", "prop-types": "^15.6.0" }, "dependencies": { "lodash-es": { "version": "4.17.10", "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.10.tgz", "integrity": "sha512-iesFYPmxYYGTcmQK0sL8bX3TGHyM6b2qREaB4kamHfQyfPJP0xgoGxp19nsH16nsfquLdiyKyX3mQkfiSGV8Rg==" } } }, "react-transition-group": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-1.2.1.tgz", "integrity": "sha512-CWaL3laCmgAFdxdKbhhps+c0HRGF4c+hdM4H23+FI1QBNUyx/AMeIJGWorehPNSaKnQNOAxL7PQmqMu78CDj3Q==", "requires": { "chain-function": "^1.0.0", "dom-helpers": "^3.2.0", "loose-envify": "^1.3.1", "prop-types": "^15.5.6", "warning": "^3.0.0" }, "dependencies": { "prop-types": { "version": "15.6.0", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.6.0.tgz", "integrity": "sha1-zq8IMCL8RrSjX2nhPvda7Q1jmFY=", "requires": { "fbjs": "^0.8.16", "loose-envify": "^1.3.1", "object-assign": "^4.1.1" } } } }, "read-pkg": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "requires": { "load-json-file": "^1.0.0", "normalize-package-data": "^2.3.2", "path-type": "^1.0.0" } }, "read-pkg-up": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "requires": { "find-up": "^1.0.0", "read-pkg": "^1.0.0" }, "dependencies": { "find-up": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "requires": { "path-exists": "^2.0.0", "pinkie-promise": "^2.0.0" } }, "path-exists": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", "requires": { "pinkie-promise": "^2.0.0" } } } }, "readable-stream": { "version": "2.2.7", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.7.tgz", "integrity": "sha1-BwV6y+JGeyIELTb5jFrVBwVOlbE=", "requires": { "buffer-shims": "~1.0.0", "core-util-is": "~1.0.0", "inherits": "~2.0.1", "isarray": "~1.0.0", "process-nextick-args": "~1.0.6", "string_decoder": "~1.0.0", "util-deprecate": "~1.0.1" } }, "readdirp": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.1.0.tgz", "integrity": "sha1-TtCtBg3zBzMAxIRANz9y0cxkLXg=", "requires": { "graceful-fs": "^4.1.2", "minimatch": "^3.0.2", "readable-stream": "^2.0.2", "set-immediate-shim": "^1.0.1" } }, "recursive-copy": { "version": "2.0.9", "resolved": "https://registry.npmjs.org/recursive-copy/-/recursive-copy-2.0.9.tgz", "integrity": "sha512-0AkHV+QtfS/1jW01z3m2t/TRTW56Fpc+xYbsoa/bqn8BCYPwmsaNjlYmUU/dyGg9w8MmGoUWihU5W+s+qjxvBQ==", "requires": { "del": "^2.2.0", "emitter-mixin": "0.0.3", "errno": "^0.1.2", "graceful-fs": "^4.1.4", "junk": "^1.0.1", "maximatch": "^0.1.0", "mkdirp": "^0.5.1", "pify": "^2.3.0", "promise": "^7.0.1", "slash": "^1.0.0" }, "dependencies": { "del": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/del/-/del-2.2.2.tgz", "integrity": "sha1-wSyYHQZ4RshLyvhiz/kw2Qf/0ag=", "requires": { "globby": "^5.0.0", "is-path-cwd": "^1.0.0", "is-path-in-cwd": "^1.0.0", "object-assign": "^4.0.1", "pify": "^2.0.0", "pinkie-promise": "^2.0.0", "rimraf": "^2.2.8" } }, "globby": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/globby/-/globby-5.0.0.tgz", "integrity": "sha1-69hGZ8oNuzMLmbz8aOrCvFQ3Dg0=", "requires": { "array-union": "^1.0.1", "arrify": "^1.0.0", "glob": "^7.0.3", "object-assign": "^4.0.1", "pify": "^2.0.0", "pinkie-promise": "^2.0.0" } }, "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" } } }, "redbox-react": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/redbox-react/-/redbox-react-1.6.0.tgz", "integrity": "sha512-mLjM5eYR41yOp5YKHpd3syFeGq6B4Wj5vZr64nbLvTZW5ZLff4LYk7VE4ITpVxkZpCY6OZuqh0HiP3A3uEaCpg==", "requires": { "error-stack-parser": "^1.3.6", "object-assign": "^4.0.1", "prop-types": "^15.5.4", "sourcemapped-stacktrace": "^1.1.6" }, "dependencies": { "error-stack-parser": { "version": "1.3.6", "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-1.3.6.tgz", "integrity": "sha1-4Oc7k+QXE40c18C3RrGkoUhUwpI=", "requires": { "stackframe": "^0.3.1" } }, "stackframe": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-0.3.1.tgz", "integrity": "sha1-M6qE8Rd6VUjIk1Uzy/6zQgl19aQ=" } } }, "reduce-reducers": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/reduce-reducers/-/reduce-reducers-0.1.5.tgz", "integrity": "sha512-uoVmQnZQ+BtKKDKpBdbBri5SLNyIK9ULZGOA504++VbHcwouWE+fJDIo8AuESPF9/EYSkI0v05LDEQK6stCbTA==" }, "redux": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/redux/-/redux-3.7.2.tgz", "integrity": "sha512-pNqnf9q1hI5HHZRBkj3bAngGZW/JMCmexDlOxw4XagXY2o1327nHH54LoTjiPJ0gizoqPDRqWyX/00g0hD6w+A==", "requires": { "lodash": "^4.2.1", "lodash-es": "^4.2.1", "loose-envify": "^1.1.0", "symbol-observable": "^1.0.3" }, "dependencies": { "lodash": { "version": "4.17.4", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" } } }, "redux-actions": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/redux-actions/-/redux-actions-2.6.1.tgz", "integrity": "sha1-QsBulHOfvm2zXbNgWrsQW9s3JNg=", "requires": { "invariant": "^2.2.1", "lodash.camelcase": "^4.3.0", "lodash.curry": "^4.1.1", "reduce-reducers": "^0.1.0" } }, "redux-saga": { "version": "0.15.6", "resolved": "https://registry.npmjs.org/redux-saga/-/redux-saga-0.15.6.tgz", "integrity": "sha1-hjjcUi3mxsCklv6LK1RmKHrC3E0=" }, "reflect.ownkeys": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/reflect.ownkeys/-/reflect.ownkeys-0.2.0.tgz", "integrity": "sha1-dJrO7H8/34tj+SegSAnpDFwLNGA=" }, "regenerate": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.0.tgz", "integrity": "sha512-1G6jJVDWrt0rK99kBjvEtziZNCICAuvIPkSiUFIQxVP06RCVpq3dmDo2oi6ABpYaDYaTRr67BEhL8r1wgEZZKg==" }, "regenerator-runtime": { "version": "0.11.1", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz", "integrity": "sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg==" }, "regenerator-transform": { "version": "0.10.1", "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.10.1.tgz", "integrity": "sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q==", "requires": { "babel-runtime": "^6.18.0", "babel-types": "^6.19.0", "private": "^0.1.6" } }, "regex-not": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", "requires": { "extend-shallow": "^3.0.2", "safe-regex": "^1.1.0" } }, "regexp-clone": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-0.0.1.tgz", "integrity": "sha1-p8LgmJH9vzj7sQ03b7cwA+aKxYk=" }, "regexpu-core": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-2.0.0.tgz", "integrity": "sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA=", "requires": { "regenerate": "^1.2.1", "regjsgen": "^0.2.0", "regjsparser": "^0.1.4" } }, "regjsgen": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.2.0.tgz", "integrity": "sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc=" }, "regjsparser": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.1.5.tgz", "integrity": "sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw=", "requires": { "jsesc": "~0.5.0" }, "dependencies": { "jsesc": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=" } } }, "remove-trailing-separator": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" }, "repeat-element": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=" }, "repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" }, "repeating": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", "integrity": "sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo=", "requires": { "is-finite": "^1.0.0" } }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, "require-main-filename": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=" }, "require_optional": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", "requires": { "resolve-from": "^2.0.0", "semver": "^5.1.0" } }, "resolve": { "version": "1.8.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", "requires": { "path-parse": "^1.0.5" } }, "resolve-from": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" }, "resolve-url": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" }, "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" }, "right-align": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", "requires": { "align-text": "^0.1.1" } }, "rimraf": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "requires": { "glob": "^7.0.5" } }, "ripemd160": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", "requires": { "hash-base": "^3.0.0", "inherits": "^2.0.1" } }, "safe-buffer": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" }, "safe-regex": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", "requires": { "ret": "~0.1.10" } }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, "scmp": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/scmp/-/scmp-2.0.0.tgz", "integrity": "sha1-JHEQ7yLM+JexOj8KvdtSeCOTzWo=" }, "semver": { "version": "5.4.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.4.1.tgz", "integrity": "sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg==" }, "send": { "version": "0.16.2", "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", "requires": { "debug": "2.6.9", "depd": "~1.1.2", "destroy": "~1.0.4", "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "etag": "~1.8.1", "fresh": "0.5.2", "http-errors": "~1.6.2", "mime": "1.4.1", "ms": "2.0.0", "on-finished": "~2.3.0", "range-parser": "~1.2.0", "statuses": "~1.4.0" }, "dependencies": { "depd": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" }, "statuses": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" } } }, "serialize-error": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-2.1.0.tgz", "integrity": "sha1-ULZ51WNc34Rme9yOWa9OW4HV9go=" }, "serve-static": { "version": "1.13.2", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", "requires": { "encodeurl": "~1.0.2", "escape-html": "~1.0.3", "parseurl": "~1.3.2", "send": "0.16.2" } }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" }, "set-immediate-shim": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz", "integrity": "sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E=" }, "set-value": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.0.tgz", "integrity": "sha512-hw0yxk9GT/Hr5yJEYnHNKYXkIA8mVJgd9ditYZCe16ZczcaELYYcfvaXesNACk2O8O0nTiPQcQhGUQj8JLzeeg==", "requires": { "extend-shallow": "^2.0.1", "is-extendable": "^0.1.1", "is-plain-object": "^2.0.3", "split-string": "^3.0.1" }, "dependencies": { "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { "is-extendable": "^0.1.0" } } } }, "setimmediate": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" }, "setprototypeof": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" }, "sha.js": { "version": "2.4.11", "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "requires": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" } }, "shebang-command": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", "requires": { "shebang-regex": "^1.0.0" } }, "shebang-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" }, "slash": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz", "integrity": "sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=" }, "sliced": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz", "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=" }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", "requires": { "base": "^0.11.1", "debug": "^2.2.0", "define-property": "^0.2.5", "extend-shallow": "^2.0.1", "map-cache": "^0.2.2", "source-map": "^0.5.6", "source-map-resolve": "^0.5.0", "use": "^3.1.0" }, "dependencies": { "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { "is-descriptor": "^0.1.0" } }, "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { "is-extendable": "^0.1.0" } } } }, "snapdragon-node": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", "requires": { "define-property": "^1.0.0", "isobject": "^3.0.0", "snapdragon-util": "^3.0.1" }, "dependencies": { "define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", "requires": { "is-descriptor": "^1.0.0" } }, "is-accessor-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", "requires": { "kind-of": "^6.0.0" } }, "is-data-descriptor": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", "requires": { "kind-of": "^6.0.0" } }, "is-descriptor": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", "requires": { "is-accessor-descriptor": "^1.0.0", "is-data-descriptor": "^1.0.0", "kind-of": "^6.0.2" } }, "kind-of": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.2.tgz", "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==" } } }, "snapdragon-util": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", "requires": { "kind-of": "^3.2.0" } }, "source-list-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==" }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" }, "source-map-resolve": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.2.tgz", "integrity": "sha512-MjqsvNwyz1s0k81Goz/9vRBe9SZdB09Bdw+/zYyO+3CuPk6fouTaxscHkgtE8jKvf01kVfl8riHzERQ/kefaSA==", "requires": { "atob": "^2.1.1", "decode-uri-component": "^0.2.0", "resolve-url": "^0.2.1", "source-map-url": "^0.4.0", "urix": "^0.1.0" } }, "source-map-support": { "version": "0.4.15", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.15.tgz", "integrity": "sha1-AyAt9lwG0r2MfsI2KhkwVv7407E=", "requires": { "source-map": "^0.5.6" } }, "source-map-url": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=" }, "sourcemapped-stacktrace": { "version": "1.1.8", "resolved": "https://registry.npmjs.org/sourcemapped-stacktrace/-/sourcemapped-stacktrace-1.1.8.tgz", "integrity": "sha512-OkVoI7GQOLl/laR1qsSo1c87tS8kF2VXhQq2SrQCDdXufBAcm8FgXogWso96ciMYoDtTw1Dn70CVdwYzoYs6Pg==", "requires": { "source-map": "0.5.6" }, "dependencies": { "source-map": { "version": "0.5.6", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=" } } }, "spdx-correct": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.0.tgz", "integrity": "sha512-N19o9z5cEyc8yQQPukRCZ9EUmb4HUpnrmaL/fxS2pBo2jbfcFRVuFZ/oFC+vZz0MNNk0h80iMn5/S6qGZOL5+g==", "requires": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" } }, "spdx-exceptions": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==" }, "spdx-expression-parse": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", "requires": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, "spdx-license-ids": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz", "integrity": "sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA==" }, "split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", "requires": { "extend-shallow": "^3.0.0" } }, "stackframe": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-1.0.4.tgz", "integrity": "sha512-to7oADIniaYwS3MhtCa/sQhrxidCCQiF/qp4/m5iN3ipf0Y7Xlri0f6eG29r08aL7JYl8n32AF3Q5GYBZ7K8vw==" }, "static-extend": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "requires": { "define-property": "^0.2.5", "object-copy": "^0.1.0" }, "dependencies": { "define-property": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", "requires": { "is-descriptor": "^0.1.0" } } } }, "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" }, "stream-browserify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", "requires": { "inherits": "~2.0.1", "readable-stream": "^2.0.2" } }, "stream-http": { "version": "2.8.3", "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", "requires": { "builtin-status-codes": "^3.0.0", "inherits": "^2.0.1", "readable-stream": "^2.3.6", "to-arraybuffer": "^1.0.0", "xtend": "^4.0.0" }, "dependencies": { "process-nextick-args": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" }, "readable-stream": { "version": "2.3.6", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "requires": { "core-util-is": "~1.0.0", "inherits": "~2.0.3", "isarray": "~1.0.0", "process-nextick-args": "~2.0.0", "safe-buffer": "~5.1.1", "string_decoder": "~1.1.1", "util-deprecate": "~1.0.1" } }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "requires": { "safe-buffer": "~5.1.0" } } } }, "string-hash": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string-hash/-/string-hash-1.1.1.tgz", "integrity": "sha1-joW+0pHgdjuPaAnZwzaP6gSNs9w=" }, "string-length": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/string-length/-/string-length-1.0.1.tgz", "integrity": "sha1-VpcPscOFWOnnC3KL894mmsRa36w=", "requires": { "strip-ansi": "^3.0.0" } }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", "strip-ansi": "^3.0.0" } }, "string_decoder": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", "requires": { "safe-buffer": "~5.1.0" } }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "requires": { "ansi-regex": "^2.0.0" } }, "strip-bom": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", "requires": { "is-utf8": "^0.2.0" } }, "styled-components": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/styled-components/-/styled-components-2.4.1.tgz", "integrity": "sha1-ZjvQSF1LarRvlGIQ3APSOY0a3nQ=", "requires": { "buffer": "^5.0.3", "css-to-react-native": "^2.0.3", "fbjs": "^0.8.9", "hoist-non-react-statics": "^1.2.0", "is-plain-object": "^2.0.1", "prop-types": "^15.5.4", "stylis": "^3.4.0", "supports-color": "^3.2.3" }, "dependencies": { "buffer": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.0.tgz", "integrity": "sha512-nUJyfChH7PMJy75eRDCCKtszSEFokUNXC1hNVSe+o+VdcgvDPLs20k3v8UXI8ruRYAJiYtyRea8mYyqPxoHWDw==", "requires": { "base64-js": "^1.0.2", "ieee754": "^1.1.4" } }, "hoist-non-react-statics": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz", "integrity": "sha1-qkSM8JhtVcxAdzsXF0t90GbLfPs=" }, "supports-color": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "requires": { "has-flag": "^1.0.0" } } } }, "styled-jsx": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-1.0.11.tgz", "integrity": "sha1-hFTwaRbZ1Xoumu1qnC5pUXeCIEU=", "requires": { "babel-plugin-syntax-jsx": "6.18.0", "babel-traverse": "6.21.0", "babel-types": "6.23.0", "babylon": "6.14.1", "convert-source-map": "1.3.0", "css-tree": "1.0.0-alpha17", "escape-string-regexp": "1.0.5", "source-map": "0.5.6", "string-hash": "1.1.1", "stylis": "3.2.18" }, "dependencies": { "babel-traverse": { "version": "6.21.0", "resolved": "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.21.0.tgz", "integrity": "sha1-acY2WATxpPaesSE/hbAKgYuMIa0=", "requires": { "babel-code-frame": "^6.20.0", "babel-messages": "^6.8.0", "babel-runtime": "^6.20.0", "babel-types": "^6.21.0", "babylon": "^6.11.0", "debug": "^2.2.0", "globals": "^9.0.0", "invariant": "^2.2.0", "lodash": "^4.2.0" } }, "babel-types": { "version": "6.23.0", "resolved": "https://registry.npmjs.org/babel-types/-/babel-types-6.23.0.tgz", "integrity": "sha1-uxcXnXU4utOM0MnhFdNA935+ms8=", "requires": { "babel-runtime": "^6.22.0", "esutils": "^2.0.2", "lodash": "^4.2.0", "to-fast-properties": "^1.0.1" } }, "babylon": { "version": "6.14.1", "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.14.1.tgz", "integrity": "sha1-lWJ1+rcnU62bNDXXr+WPi/CimBU=" }, "convert-source-map": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.3.0.tgz", "integrity": "sha1-6fPpxuJyjvwmdmlqcOs4L3MQamc=" }, "source-map": { "version": "0.5.6", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.6.tgz", "integrity": "sha1-dc449SvwczxafwwRjYEzSiu19BI=" }, "stylis": { "version": "3.2.18", "resolved": "https://registry.npmjs.org/stylis/-/stylis-3.2.18.tgz", "integrity": "sha512-Zd5jC5rqBLp0xoq/m7r2tYsJNIIikN6mTbfrD7qfvwOzbUOk16nI7U/rrJ/dkLiVnSMGxGcsW5R4DQhW8kt0eA==" }, "to-fast-properties": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-1.0.3.tgz", "integrity": "sha1-uDVx+k2MJbguIxsG46MFXeTKGkc=" } } }, "stylis": { "version": "3.5.3", "resolved": "https://registry.npmjs.org/stylis/-/stylis-3.5.3.tgz", "integrity": "sha512-TxU0aAscJghF9I3V9q601xcK3Uw1JbXvpsBGj/HULqexKOKlOEzzlIpLFRbKkCK990ccuxfXUqmPbIIo7Fq/cQ==" }, "supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=" }, "symbol-observable": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz", "integrity": "sha1-Kb9hXUqnEhvdiYsi1LP5vE4qoD0=" }, "tapable": { "version": "0.2.8", "resolved": "https://registry.npmjs.org/tapable/-/tapable-0.2.8.tgz", "integrity": "sha1-mTcqXJmb8t8WCvwNdL7U9HlIzSI=" }, "thenify": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz", "integrity": "sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=", "requires": { "any-promise": "^1.0.0" } }, "thenify-all": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", "requires": { "thenify": ">= 3.1.0 < 4" } }, "timers-browserify": { "version": "2.0.10", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.10.tgz", "integrity": "sha512-YvC1SV1XdOUaL6gx5CoGroT3Gu49pK9+TZ38ErPldOWW4j49GI1HKs9DV+KGq/w6y+LZ72W1c8cKz2vzY+qpzg==", "requires": { "setimmediate": "^1.0.4" } }, "to-arraybuffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" }, "to-object-path": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", "requires": { "kind-of": "^3.0.2" } }, "to-regex": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", "requires": { "define-property": "^2.0.2", "extend-shallow": "^3.0.2", "regex-not": "^1.0.2", "safe-regex": "^1.1.0" } }, "to-regex-range": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", "requires": { "is-number": "^3.0.0", "repeat-string": "^1.6.1" } }, "touch": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/touch/-/touch-3.1.0.tgz", "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==", "requires": { "nopt": "~1.0.10" } }, "traverse": { "version": "0.6.6", "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=" }, "trim-right": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/trim-right/-/trim-right-1.0.1.tgz", "integrity": "sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM=" }, "tsscmp": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.6.tgz", "integrity": "sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==" }, "tty-browserify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" }, "type-is": { "version": "1.6.16", "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", "requires": { "media-typer": "0.3.0", "mime-types": "~2.1.18" } }, "ua-parser-js": { "version": "0.7.17", "resolved": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.17.tgz", "integrity": "sha512-uRdSdu1oA1rncCQL7sCj8vSyZkgtL7faaw9Tc9rZ3mGgraQ7+Pdx7w5mnOSF3gw9ZNG6oc+KXfkon3bKuROm0g==" }, "uglify-js": { "version": "2.8.29", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", "requires": { "source-map": "~0.5.1", "uglify-to-browserify": "~1.0.0", "yargs": "~3.10.0" }, "dependencies": { "yargs": { "version": "3.10.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", "requires": { "camelcase": "^1.0.2", "cliui": "^2.1.0", "decamelize": "^1.0.0", "window-size": "0.1.0" } } } }, "uglify-to-browserify": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", "optional": true }, "uglifyjs-webpack-plugin": { "version": "0.4.6", "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-0.4.6.tgz", "integrity": "sha1-uVH0q7a9YX5m9j64kUmOORdj4wk=", "requires": { "source-map": "^0.5.6", "uglify-js": "^2.8.29", "webpack-sources": "^1.0.1" } }, "uid-safe": { "version": "2.1.5", "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", "integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==", "requires": { "random-bytes": "~1.0.0" } }, "unfetch": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/unfetch/-/unfetch-3.0.0.tgz", "integrity": "sha1-jR4FE6Ts0OX/LUGmund3Gq6LZII=" }, "union-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", "integrity": "sha1-XHHDTLW61dzr4+oM0IIHulqhrqQ=", "requires": { "arr-union": "^3.1.0", "get-value": "^2.0.6", "is-extendable": "^0.1.1", "set-value": "^0.4.3" }, "dependencies": { "extend-shallow": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { "is-extendable": "^0.1.0" } }, "set-value": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", "requires": { "extend-shallow": "^2.0.1", "is-extendable": "^0.1.1", "is-plain-object": "^2.0.1", "to-object-path": "^0.3.0" } } } }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" }, "unset-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", "requires": { "has-value": "^0.3.1", "isobject": "^3.0.0" }, "dependencies": { "has-value": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", "requires": { "get-value": "^2.0.3", "has-values": "^0.1.4", "isobject": "^2.0.0" }, "dependencies": { "isobject": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", "requires": { "isarray": "1.0.0" } } } }, "has-values": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" } } }, "upath": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/upath/-/upath-1.1.0.tgz", "integrity": "sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw==" }, "urix": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" }, "url": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", "requires": { "punycode": "1.3.2", "querystring": "0.2.0" } }, "use": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" }, "util": { "version": "0.10.4", "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", "requires": { "inherits": "2.0.3" } }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "utils-merge": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" }, "uuid": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", "requires": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" } }, "vary": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" }, "vm-browserify": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", "requires": { "indexof": "0.0.1" } }, "walk": { "version": "2.3.14", "resolved": "https://registry.npmjs.org/walk/-/walk-2.3.14.tgz", "integrity": "sha512-5skcWAUmySj6hkBdH6B6+3ddMjVQYH5Qy9QGbPmN8kVmLteXk+yVXg+yfk1nbX30EYakahLrr8iPcCxJQSCBeg==", "requires": { "foreachasync": "^3.0.0" } }, "warning": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/warning/-/warning-3.0.0.tgz", "integrity": "sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w=", "requires": { "loose-envify": "^1.0.0" } }, "watchpack": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz", "integrity": "sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA==", "requires": { "chokidar": "^2.0.2", "graceful-fs": "^4.1.2", "neo-async": "^2.5.0" } }, "webpack": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.3.0.tgz", "integrity": "sha1-zi+eB2Vmq6kfdIhxM6iD/X2hh7w=", "requires": { "acorn": "^5.0.0", "acorn-dynamic-import": "^2.0.0", "ajv": "^5.1.5", "ajv-keywords": "^2.0.0", "async": "^2.1.2", "enhanced-resolve": "^3.3.0", "escope": "^3.6.0", "interpret": "^1.0.0", "json-loader": "^0.5.4", "json5": "^0.5.1", "loader-runner": "^2.3.0", "loader-utils": "^1.1.0", "memory-fs": "~0.4.1", "mkdirp": "~0.5.0", "node-libs-browser": "^2.0.0", "source-map": "^0.5.3", "supports-color": "^3.1.0", "tapable": "~0.2.5", "uglifyjs-webpack-plugin": "^0.4.6", "watchpack": "^1.4.0", "webpack-sources": "^1.0.1", "yargs": "^6.0.0" }, "dependencies": { "supports-color": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", "requires": { "has-flag": "^1.0.0" } } } }, "webpack-dev-middleware": { "version": "1.11.0", "resolved": "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-1.11.0.tgz", "integrity": "sha1-CWkdCXOjCtH4Ksc6EuIIfwpHVPk=", "requires": { "memory-fs": "~0.4.1", "mime": "^1.3.4", "path-is-absolute": "^1.0.0", "range-parser": "^1.0.3" } }, "webpack-hot-middleware": { "version": "2.18.2", "resolved": "https://registry.npmjs.org/webpack-hot-middleware/-/webpack-hot-middleware-2.18.2.tgz", "integrity": "sha512-dB7uOnUWsojZIAC6Nwi5v3tuaQNd2i7p4vF5LsJRyoTOgr2fRYQdMKQxRZIZZaz0cTPBX8rvcWU1A6/n7JTITg==", "requires": { "ansi-html": "0.0.7", "html-entities": "^1.2.0", "querystring": "^0.2.0", "strip-ansi": "^3.0.0" } }, "webpack-sources": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.1.0.tgz", "integrity": "sha512-aqYp18kPphgoO5c/+NaUvEeACtZjMESmDChuD3NBciVpah3XpMEU9VAAtIaB1BsfJWWTSdv8Vv1m3T0aRk2dUw==", "requires": { "source-list-map": "^2.0.0", "source-map": "~0.6.1" }, "dependencies": { "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" } } }, "weedout": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/weedout/-/weedout-0.1.3.tgz", "integrity": "sha1-y/KoQsPmWr94WEgN4hZo2M+H0wA=" }, "whatwg-fetch": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz", "integrity": "sha1-nITsLc9oGH/wC8ZOEnS0QhduHIQ=" }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", "requires": { "isexe": "^2.0.0" } }, "which-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=" }, "window-size": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=" }, "wordwrap": { "version": "0.0.2", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=" }, "wrap-ansi": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "requires": { "string-width": "^1.0.1", "strip-ansi": "^3.0.1" } }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, "write-file-webpack-plugin": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/write-file-webpack-plugin/-/write-file-webpack-plugin-4.1.0.tgz", "integrity": "sha512-KkFZtNeeuSjig5sACrd0n1ybrpd4CS8P5J2TGEklS7UGGlz+iISAxJf426XwaQ2TTlTAq1LTXRBWTTEYjy5e4A==", "requires": { "chalk": "^1.1.1", "debug": "^2.6.8", "filesize": "^3.2.1", "lodash": "^4.5.1", "mkdirp": "^0.5.1", "moment": "^2.11.2" } }, "xss-filters": { "version": "1.2.7", "resolved": "https://registry.npmjs.org/xss-filters/-/xss-filters-1.2.7.tgz", "integrity": "sha1-Wfod4gHzby80cNysX1jMwoMLCpo=" }, "xtend": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" }, "y18n": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" }, "yallist": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" }, "yargs": { "version": "6.6.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-6.6.0.tgz", "integrity": "sha1-eC7CHvQDNF+DCoCMo9UTr1YGUgg=", "requires": { "camelcase": "^3.0.0", "cliui": "^3.2.0", "decamelize": "^1.1.1", "get-caller-file": "^1.0.1", "os-locale": "^1.4.0", "read-pkg-up": "^1.0.1", "require-directory": "^2.1.1", "require-main-filename": "^1.0.1", "set-blocking": "^2.0.0", "string-width": "^1.0.2", "which-module": "^1.0.0", "y18n": "^3.2.1", "yargs-parser": "^4.2.0" }, "dependencies": { "camelcase": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" }, "cliui": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", "requires": { "string-width": "^1.0.1", "strip-ansi": "^3.0.1", "wrap-ansi": "^2.0.0" } } } }, "yargs-parser": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-4.2.1.tgz", "integrity": "sha1-KczqwNxPA8bIe0qfIX3RjJ90hxw=", "requires": { "camelcase": "^3.0.0" }, "dependencies": { "camelcase": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=" } } } } } nextepc-0.3.10/webui/package.json000066400000000000000000000027671333553357400166710ustar00rootroot00000000000000{ "name": "nextepc", "version": "0.3.10", "description": "NextEPC", "main": "index.js", "repository": "https://github.com/acetcom/nextepc", "author": "NextEPC Group", "license": "GPL-3.0", "dependencies": { "axios": "^0.16.2", "babel-plugin-polished": "^1.1.0", "babel-plugin-styled-components": "^1.5.1", "body-parser": "^1.18.3", "connect-mongo": "^1.3.2", "express": "^4.16.3", "express-restify-mongoose": "^4.3.0", "express-session": "^1.15.2", "immutable": "^3.8.1", "lodash": "^4.17.10", "lusca": "^1.6.0", "method-override": "^2.3.9", "mongoose": "^4.13.14", "mongoose-long": "^0.1.1", "morgan": "^1.8.2", "next": "^3.2.3", "next-redux-wrapper": "^1.3.5", "nprogress": "^0.2.0", "open-color": "^1.6.3", "passport": "^0.4.0", "passport-local": "^1.0.0", "passport-local-mongoose": "^4.5.0", "prop-types": "^15.6.2", "react": "^15.6.1", "react-dom": "^15.6.1", "react-event-listener": "^0.5.9", "react-icons": "^2.2.5", "react-jsonschema-form": "^0.50.1", "react-notification-system": "^0.2.17", "react-onclickoutside": "^6.7.1", "react-redux": "^5.0.7", "react-transition-group": "^1.1.3", "redux": "^3.7.2", "redux-actions": "^2.4.0", "redux-saga": "^0.15.6", "styled-components": "^2.4.1", "traverse": "^0.6.6" }, "scripts": { "dev": "node server/index.js", "build": "next build", "start": "NODE_ENV=production node server/index.js" } } nextepc-0.3.10/webui/pages/000077500000000000000000000000001333553357400154665ustar00rootroot00000000000000nextepc-0.3.10/webui/pages/_document.js000066400000000000000000000024111333553357400177770ustar00rootroot00000000000000import Document, { Head, Main, NextScript } from 'next/document' import { ServerStyleSheet } from 'styled-components' const description = 'an implementation of 3GPP EPC(MME, SGW, PGW, HSS)' export default class MyDocument extends Document { render () { const sheet = new ServerStyleSheet() const main = sheet.collectStyles(

) const styleTags = sheet.getStyleElement() return ( NextEPC {styleTags}
{main}
) } } nextepc-0.3.10/webui/pages/index.js000066400000000000000000000011611333553357400171320ustar00rootroot00000000000000import PropTypes from 'prop-types'; import withRedux from 'next-redux-wrapper'; import { initStore } from 'modules/store.js'; import withSession from 'helpers/with-session'; import Auth from 'containers/Auth'; import App from 'containers/App'; const Restricted = (Component) => { const checkAuth = (props) => { return props.isLoggedIn ? : } return withSession(checkAuth); } const Index = Restricted(({session}) => (
) ) Index.propTypes = { session: PropTypes.object.isRequired }; export default withRedux(initStore)(Index); nextepc-0.3.10/webui/server/000077500000000000000000000000001333553357400156755ustar00rootroot00000000000000nextepc-0.3.10/webui/server/index.js000066400000000000000000000050161333553357400173440ustar00rootroot00000000000000process.env.DB_URI = process.env.DB_URI || 'mongodb://localhost/nextepc'; const co = require('co'); const next = require('next'); const dev = process.env.NODE_ENV !== 'production'; const app = next({ dev }); const handle = app.getRequestHandler(); const express = require('express'); const bodyParser = require('body-parser'); const methodOverride = require('method-override'); const morgan = require('morgan'); const session = require('express-session'); const mongoose = require('mongoose'); const MongoStore = require('connect-mongo')(session); const passport = require('passport'); const LocalStrategy = require('passport-local').Strategy; const csrf = require('lusca').csrf(); const secret = process.env.SECRET_KEY || 'change-me'; const api = require('./routes'); const Account = require('./models/account.js'); co(function* () { yield app.prepare(); mongoose.Promise = global.Promise; if (dev) { mongoose.set('debug', true); } const db = yield mongoose.connect(process.env.DB_URI, { useMongoClient: true, /* other options */ }) Account.count((err, count) => { if (err) { console.error(err); throw err; } if (!count) { const newAccount = new Account(); newAccount.username = 'admin'; newAccount.roles = [ 'admin' ]; Account.register(newAccount, '1423', err => { if (err) { console.error(err); throw err; } }) } }) const server = express(); server.use(bodyParser.json()); server.use(bodyParser.urlencoded({ extended: true })); server.use(methodOverride()); server.use(session({ secret: secret, store: new MongoStore({ mongooseConnection: mongoose.connection, ttl: 60 * 60 * 24 * 7 * 2 }), resave: false, rolling: true, saveUninitialized: true, httpOnly: true, cookie: { maxAge: 1000 * 60 * 60 * 24 * 7 * 2 // 2 weeks } })); server.use((req, res, next) => { req.db = db; next(); }) server.use(csrf); server.use(passport.initialize()); server.use(passport.session()); passport.use(new LocalStrategy(Account.authenticate())); passport.serializeUser(Account.serializeUser()); passport.deserializeUser(Account.deserializeUser()); server.use('/api', api); server.get('*', (req, res) => { return handle(req, res); }); if (dev) { server.use(morgan('tiny')); } server.listen(3000, err => { if (err) throw err; console.log('> Ready on http://localhost:3000'); }); }) .catch(error => console.error(error.stack)); nextepc-0.3.10/webui/server/models/000077500000000000000000000000001333553357400171605ustar00rootroot00000000000000nextepc-0.3.10/webui/server/models/account.js000066400000000000000000000004311333553357400211500ustar00rootroot00000000000000const mongoose = require('mongoose'); const Schema = mongoose.Schema; const passportLocalMongoose = require('passport-local-mongoose'); const Account = new Schema({ roles: [String] }); Account.plugin(passportLocalMongoose); module.exports = mongoose.model('Account', Account);nextepc-0.3.10/webui/server/models/profile.js000066400000000000000000000031651333553357400211630ustar00rootroot00000000000000const mongoose = require('mongoose'); const Schema = mongoose.Schema; require('mongoose-long')(mongoose); const Profile = new Schema({ title: { $type: String, required: true }, security: { k: String, op: String, opc: String, amf: String, }, ambr: { downlink: Schema.Types.Long, uplink: Schema.Types.Long }, pdn: [{ apn: { $type: String, required: true }, type: { $type: Number, default: 2 // IPv4, IPv6 and dualstack IPv4v6 }, qos: { qci: Number, arp: { priority_level: Number, pre_emption_capability: { $type: Number, default: 1 // Capability Disabled }, pre_emption_vulnerability: { $type : Number, default: 1 // Vulnerability Disabled } } }, ambr: { downlink: Schema.Types.Long, uplink: Schema.Types.Long }, pgw: { addr: String, addr6: String }, pcc_rule: [{ flow: [{ direction: Number, description: String }], qos: { qci: Number, arp: { priority_level: Number, pre_emption_capability: { $type: Number, default: 1 // Capability Disabled }, pre_emption_vulnerability: { $type : Number, default: 1 // Vulnerability Disabled } }, mbr: { downlink: Schema.Types.Long, uplink: Schema.Types.Long }, gbr: { downlink: Schema.Types.Long, uplink: Schema.Types.Long }, }, }] }] }, { typeKey: '$type' }); module.exports = mongoose.model('Profile', Profile); nextepc-0.3.10/webui/server/models/subscriber.js000066400000000000000000000040371333553357400216650ustar00rootroot00000000000000const mongoose = require('mongoose'); const Schema = mongoose.Schema; require('mongoose-long')(mongoose); const Subscriber = new Schema({ imsi: { $type: String, unique: true, required: true }, security: { k: String, op: String, opc: String, amf: String, rand: String, sqn: Schema.Types.Long }, access_restriction_data: { $type: Number, default: 32 // Handover to Non-3GPP Access Not Allowed }, subscriber_status: { $type: Number, default: 0 // Service Granted }, network_access_mode: { $type: Number, default: 2 // Only Packet }, subscribed_rau_tau_timer: { $type: Number, default: 12 // minites }, ambr: { downlink: Schema.Types.Long, uplink: Schema.Types.Long }, pdn: [{ apn: { $type: String, required: true }, type: { $type: Number, default: 2 // IPv4, IPv6 and dualstack IPv4v6 }, qos: { qci: Number, arp: { priority_level: Number, pre_emption_capability: { $type: Number, default: 1 // Capability Disabled }, pre_emption_vulnerability: { $type : Number, default: 1 // Vulnerability Disabled } } }, ambr: { downlink: Schema.Types.Long, uplink: Schema.Types.Long }, pgw: { addr: String, addr6: String }, pcc_rule: [{ flow: [{ direction: Number, description: String }], qos: { qci: Number, arp: { priority_level: Number, pre_emption_capability: { $type: Number, default: 1 // Capability Disabled }, pre_emption_vulnerability: { $type : Number, default: 1 // Vulnerability Disabled } }, mbr: { downlink: Schema.Types.Long, uplink: Schema.Types.Long }, gbr: { downlink: Schema.Types.Long, uplink: Schema.Types.Long }, }, }] }] }, { typeKey: '$type' }); module.exports = mongoose.model('Subscriber', Subscriber); nextepc-0.3.10/webui/server/routes/000077500000000000000000000000001333553357400172165ustar00rootroot00000000000000nextepc-0.3.10/webui/server/routes/auth.js000066400000000000000000000011331333553357400205130ustar00rootroot00000000000000const express = require('express'); const router = express.Router(); const passport = require('passport'); router.get('/csrf', (req, res) => { return res.json({csrfToken: res.locals._csrf}); }) router.get('/session', (req, res) => { let session = { clientMaxAge: 60000, // 60 seconds csrfToken: res.locals._csrf } if (req.user) { session.user = req.user } return res.json(session) }) router.post('/login', passport.authenticate('local', { successRedirect: '/' })); router.post('/logout', (req, res) => { req.logout(); res.redirect('/'); }); module.exports = router;nextepc-0.3.10/webui/server/routes/db.js000066400000000000000000000010341333553357400201370ustar00rootroot00000000000000const express = require('express'); const router = express.Router(); const restify = require('express-restify-mongoose') const Subscriber = require('../models/subscriber'); restify.serve(router, Subscriber, { prefix: '', version: '', idProperty: 'imsi' }); const Profile = require('../models/profile'); restify.serve(router, Profile, { prefix: '', version: '' }); const Account = require('../models/account'); restify.serve(router, Account, { prefix: '', version: '', idProperty: 'username' }); module.exports = router;nextepc-0.3.10/webui/server/routes/index.js000066400000000000000000000003151333553357400206620ustar00rootroot00000000000000const express = require('express'); const auth = require('./auth'); const db = require('./db') const router = express.Router(); router.use('/auth', auth); router.use('/db', db); module.exports = router;nextepc-0.3.10/webui/src/000077500000000000000000000000001333553357400151565ustar00rootroot00000000000000nextepc-0.3.10/webui/src/components/000077500000000000000000000000001333553357400173435ustar00rootroot00000000000000nextepc-0.3.10/webui/src/components/Account/000077500000000000000000000000001333553357400207375ustar00rootroot00000000000000nextepc-0.3.10/webui/src/components/Account/Edit.js000066400000000000000000000063311333553357400221650ustar00rootroot00000000000000import { Component } from 'react'; import PropTypes from 'prop-types'; import withWidth, { SMALL } from 'helpers/with-width'; import { Form } from 'components'; const schema = { "title": "", "type": "object", "properties": { "username": { "type": "string", "title": "Username*", "required": true, "maxLength": 24 }, "roles": { "type" : "array", "title" : "", "items": { "type": "string", "title": "Role", "enum": [ "user", "admin" ], "required": true, }, }, "password1": { "type": "string", "title": "Password*", }, "password2": { "type": "string", "title": "Confirm Password*", }, } }; const uiSchema = { "password1" : { "classNames" : "col-xs-6", "ui:widget": "password", }, "password2" : { "classNames" : "col-xs-6", "ui:widget": "password", }, } class Edit extends Component { static propTypes = { visible: PropTypes.bool, action: PropTypes.string, formData: PropTypes.object, isLoading: PropTypes.bool, validate: PropTypes.func, onHide: PropTypes.func, onSubmit: PropTypes.func, onError: PropTypes.func } constructor(props) { super(props); this.state = this.getStateFromProps(props); } componentWillReceiveProps(nextProps) { this.setState(this.getStateFromProps(nextProps)); } getStateFromProps(props) { const { session, action, width, formData, } = props; const { username, roles } = session.user; let state = { schema, uiSchema, formData, }; if (action === 'update' && (roles.indexOf('admin') === -1 || formData.username === username)) { state.uiSchema = Object.assign(state.uiSchema, { "roles": { "ui:disabled": true, "ui:options": { "addable": false, "orderable": false, "removable": false } }, }); } else { state.uiSchema = Object.assign(state.uiSchema, { "roles": { "ui:options": { "addable": false, "orderable": false, "removable": false } }, }); } if (action === 'update') { state.uiSchema = Object.assign(state.uiSchema, { "username": { "ui:disabled": true }, }); } else if (width !== SMALL) { state.uiSchema = Object.assign(state.uiSchema, { "username": { "ui:autofocus": true } }); } return state; } render() { const { visible, action, isLoading, validate, onHide, onSubmit, onError } = this.props; const { formData } = this.state; return (
) } } export default withWidth()(Edit); nextepc-0.3.10/webui/src/components/Account/Item.js000066400000000000000000000061461333553357400222020ustar00rootroot00000000000000import { Component } from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import oc from 'open-color'; import { media } from 'helpers/style-utils'; import EditIcon from 'react-icons/lib/md/edit'; import DeleteIcon from 'react-icons/lib/md/delete'; import { Tooltip, Spinner } from 'components'; const Card = styled.div` position: relative; display: flex; padding: 0.5rem; cursor: pointer; ${p => p.disabled && 'opacity: 0.5; cursor: not-allowed; pointer-events: none;'}; .actions { position: absolute; top: 0; right: 0; width: 8rem; height: 100%; display: flex; align-items: center; justify-content: center; opacity: 0; } &:hover { background: ${oc.gray[1]}; .actions { ${p => p.disabled ? 'opacity: 0;' : 'opacity: 1;'}; } } `; const CircleButton = styled.div` height: 2rem; width: 2rem; display: flex; align-items: center; justify-content: center; margin: 1px; color: ${oc.gray[6]}; border-radius: 1rem; font-size: 1.5rem; &:hover { color: ${oc.indigo[6]}; } &.delete { &:hover { color: ${oc.pink[6]}; } } ` const Account = styled.div` display: flex; flex-direction: row; flex:1; line-height: 2.5rem; margin : 0 2rem; .username { font-size: 1.25rem; color: ${oc.gray[8]}; width: 320px; } .role { font-size: 1.1rem; color: ${oc.gray[6]}; width: 240px; } `; const SpinnerWrapper = styled.div` position: absolute; top: 0; right: 0; width: 4rem; height: 100%; display: flex; align-items: center; justify-content: center; ` const propTypes = { account: PropTypes.shape({ username: PropTypes.string }), onEdit: PropTypes.func, onDelete: PropTypes.func } class Item extends Component { static propTypes = { account: PropTypes.shape({ username: PropTypes.string }), onEdit: PropTypes.func, onDelete: PropTypes.func } handleEdit = e => { e.stopPropagation(); const { account, onEdit, } = this.props; const { username } = account; onEdit(username) } handleDelete = e => { e.stopPropagation(); const { account, onDelete } = this.props; const { username } = account; onDelete(username) } render() { const { handleEdit, handleDelete } = this; const { session, disabled, spinner, account, onEdit, onDelete } = this.props; return (
{account.username}
{account.roles[0]}
{session.user.username !== account.username &&
} {spinner && }
) } } export default Item; nextepc-0.3.10/webui/src/components/Account/List.js000066400000000000000000000021011333553357400222020ustar00rootroot00000000000000import PropTypes from 'prop-types'; import styled from 'styled-components'; import oc from 'open-color'; import { media } from 'helpers/style-utils'; import { Layout, Blank } from 'components'; import Item from './Item'; const Wrapper = styled.div` display: block; margin: 2rem; ${media.mobile` margin: 0.5rem 0.25rem; `} ` const propTypes = { accounts: PropTypes.arrayOf(PropTypes.object), onEdit: PropTypes.func, onDelete: PropTypes.func, } const List = ({ accounts, deletedId, onEdit, onDelete, session }) => { const { username, roles } = session.user; const accountList = accounts .map(account => ); return ( {accountList} ) } List.propTypes = propTypes; export default List; nextepc-0.3.10/webui/src/components/Account/index.js000066400000000000000000000001221333553357400223770ustar00rootroot00000000000000import List from './List'; import Edit from './Edit'; export { List, Edit }; nextepc-0.3.10/webui/src/components/Base/000077500000000000000000000000001333553357400202155ustar00rootroot00000000000000nextepc-0.3.10/webui/src/components/Base/Header.js000066400000000000000000000024541333553357400217500ustar00rootroot00000000000000import PropTypes from 'prop-types'; import styled from 'styled-components'; import oc from 'open-color'; import { CircleIcon, Tooltip } from 'components'; import MenuIcon from 'react-icons/lib/md/menu'; import PersonIcon from 'react-icons/lib/md/person'; const Wrapper = styled.div` display: flex; align-items: center; height: 4rem; color: white; background: ${oc.indigo[9]}; `; const Menu = styled.div` display: inline-flex; margin: 0 1.5rem; cursor: pointer; font-size: 1.5rem; `; const Title = styled.div` margin: 0 0.5rem; font-size: 1.5rem; font-family: 'Ubuntu', sans-serif; `; const Thumbnail = styled.div` padding: 1rem 0; position: absolute; right: 2rem; cursor: pointer; `; const propTypes = { onSidebarToggle: PropTypes.func.isRequired, onLogoutRequest: PropTypes.func.isRequired } const Header = ({ onSidebarToggle, onLogoutRequest }) => ( Next.EPC ) Header.propTypes = propTypes; export default Header;nextepc-0.3.10/webui/src/components/Base/Layout.js000066400000000000000000000016741333553357400220400ustar00rootroot00000000000000import PropTypes from 'prop-types'; import Head from 'next/head'; import styled from 'styled-components'; import oc from 'open-color'; import Header from 'containers/Header'; import Sidebar from 'containers/Sidebar'; import Package from '../../../package'; const Body = styled.div` display: flex; height: calc(100vh - 4rem); ` const propTypes = { title: PropTypes.string } const defaultProps = { title: `Next.EPC ${Package.version}` } const Layout = ({ title, children }) => (
{title}
{children}
) Layout.propTypes = propTypes; Layout.defaultProps = defaultProps; const ContainerWrapper = styled.div` flex: 1; overflow-y: scroll; `; Layout.Container = ({visible, children}) => visible ? ( {children} ) : null; Layout.Content = styled.div` `; export default Layout;nextepc-0.3.10/webui/src/components/Base/Login.js000066400000000000000000000102221333553357400216200ustar00rootroot00000000000000import { Component } from 'react'; import Head from 'next/head'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import oc from 'open-color'; import { media } from 'helpers/style-utils'; import { CircleIcon } from 'components'; import PersonIcon from 'react-icons/lib/md/person'; import CloseIcon from 'react-icons/lib/md/close'; const Wrapper = styled.div` position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); border: 1px solid ${oc.gray[4]}; box-shadow: 1px 1px 2px ${oc.gray[4]}; width: ${props => props.width}; ${media.mobile` top: 0; left: 0; transform: translate(0, 0); width: 100%; `} `; Wrapper.propTypes = { width: PropTypes.string } const ErrorWrapper = styled.div` display: flex; align-items: center; font-size: 1rem; line-height: 3rem; color: ${oc.gray[7]}; background-color: ${oc.pink[2]}; border-bottom: 1px solid ${oc.pink[3]}; box-shadow: 1px 1px 2px ${oc.pink[3]}; `; const ErrorMessage = styled.div` padding-left: 1rem; `; const ErrorClose = styled.div` position: absolute; right: 1rem; `; const ErrorBar = ({ visible, message, onClose }) => visible ? ( {message} ) : null; ErrorBar.propTypes = { visible: PropTypes.bool, message: PropTypes.string, onClose: PropTypes.func }; const Thumbnail = styled.div` display: flex; justify-content: center; padding: 3rem 0; background: white; `; const Form = styled.div` padding: 1rem; background: ${oc.gray[0]}; `; const InputWrapper = styled.div` padding: 0.5rem 0; `; const Title = styled.div` margin-bottom: 0.5rem; text-align: left; font-size: 1rem; font-weight: bold; color: ${oc.gray[8]}; `; const Input = styled.input` padding: 0.5rem; width: 100%; border: 1px solid ${oc.gray[2]}; font-size: 1rem; line-height: 1.5rem; transition: all .25s; outline: none; &:focus { border: 1px solid ${oc.blue[7]}; } `; Input.propTypes = { type: PropTypes.string, name: PropTypes.string, value: PropTypes.string, placeholder: PropTypes.string, onChange: PropTypes.func }; const Button = styled.button` margin-top: 1rem; padding: 1rem 0; width: 100%; text-align: center; font-weight: 500; font-size: 1.2rem; color: white; background: ${props => oc[props.color][7]}; border: 1px solid ${props => oc[props.color][10]}; outline: none; cursor: pointer; transition: all .3s; &:hover { background: ${props => oc[props.color][6]}; } &:active { background: ${props => oc[props.color][8]}; border: 1px solid ${oc.blue[7]}; } `; Button.propTypes = { color: PropTypes.string, onClick: PropTypes.func }; const Login = ({ width, form, error, innerRef, onChange, onSubmit, onKeyPress, onErrorReset }) => (
NextEPC - Login Username {innerRef(comp)}} /> Password
); Login.propTypes = { width: PropTypes.string } Login.defaultProps = { width: '360px' } export default Login; nextepc-0.3.10/webui/src/components/Base/Logout.js000066400000000000000000000043521333553357400220300ustar00rootroot00000000000000import PropTypes from 'prop-types'; import styled from 'styled-components'; import oc from 'open-color'; import { Modal } from 'components'; import { media, transitions } from 'helpers/style-utils'; import PersonIcon from 'react-icons/lib/md/person'; const Wrapper = styled.div` width: 300px; ${media.mobile` width: calc(100vw - 2rem); `} `; const TitleWrapper = styled.div` padding-left: 1rem; line-height: 3rem; font-size: 1.2rem; color: white; background-color: ${oc.red[7]}; `; const ContentWrapper = styled.div` padding: 1rem 0 0 1rem; height: 5rem; font-size: 1rem; color: ${oc.gray[7]}; background-color: ${oc.gray[1]}; `; const ButtonWrapper = styled.div` display: flex; justify-content: flex-end; background-color: ${oc.gray[2]}; `; const Button = styled.button` margin: 0.5rem; padding: 0.3rem; width: 4rem; text-align: center; font-size: 0.9rem; border-radius: 3px; outline: none; cursor: pointer; transition: all .3s; `; const YesButton = Button.extend` border: 1px solid ${oc.red[9]}; color: white; background: ${oc.red[7]}; &:hover { background: ${oc.red[5]} } &:active { background: ${oc.red[8]} } `; const NoButton = Button.extend` border: 1px solid ${oc.gray[5]}; color: black; background: ${oc.gray[3]}; &:hover { background: ${oc.gray[2]} } &:active { background: ${oc.gray[4]} } `; const propTypes = { visible: PropTypes.bool, onHide: PropTypes.func, onLogout: PropTypes.func, }; const Logout = ({ visible, onHide, onLogout }) => ( Logout Are you sure you want to logout? Yes No ) Logout.propTypes = propTypes; export default Logout; nextepc-0.3.10/webui/src/components/Base/Sidebar.js000066400000000000000000000046031333553357400221270ustar00rootroot00000000000000import PropTypes from 'prop-types'; import styled from 'styled-components'; import { media, transitions } from 'helpers/style-utils'; import oc from 'open-color'; import SubscriberIcon from 'react-icons/lib/md/person-add'; import ProfileIcon from 'react-icons/lib/md/content-copy'; import AccountIcon from 'react-icons/lib/md/vpn-key'; const Menu = styled.div` display: block; width: ${p => p.visible ? p.width : '0' }; transition: width .2s ease-in-out; overflow: hidden; position: relative; z-index: 1; ${media.mobile` position: absolute; top: 4rem; left: 0; width: ${p => p.visible ? '100%' : '0'}; height: ${p => p.visible ? '100%' : '0'}; transition: height .2s ease-in-out; `} background-color: ${oc.indigo[5]}; box-shadow: 3px 3px 6px rgba(0,0,0,0.1), 3px 3px 6px rgba(0,0,0,0.2); `; const StyledItem = styled.div` display: flex; align-items: center; padding : 1rem; transition: all .3s; cursor: pointer; color: white; background: ${p => p.active ? oc.indigo[7] : oc.indigo[5]}; border-left: ${p => p.active ? `12px solid ${oc.indigo[6]}` : `12px solid ${oc.indigo[4]}`}; &:hover { background: ${p => p.active ? oc.indigo[7] : oc.indigo[6]}; } `; const Icon = styled.div` display: inline-flex; padding-left: 1rem; font-size: 1.5rem; `; const Title = styled.div` padding-left: 2rem; font-size: 1.2rem; `; const Item = ({ children, selected, name, onSelect }) => ( onSelect(name)} active={name===selected}> {children} ) const propTypes = { isOpen: PropTypes.bool, width: PropTypes.string, selectedView: PropTypes.string, onSelectView: PropTypes.func } const defaultProps = { width: "16rem", } const Sidebar = ({ isOpen, width, selectedView, onSelectView }) => ( Subscriber Profile Account ) Sidebar.propTypes = propTypes; Sidebar.defaultProps = defaultProps; export default Sidebar; nextepc-0.3.10/webui/src/components/Profile/000077500000000000000000000000001333553357400207435ustar00rootroot00000000000000nextepc-0.3.10/webui/src/components/Profile/Edit.js000066400000000000000000000311631333553357400221720ustar00rootroot00000000000000import { Component } from 'react'; import PropTypes from 'prop-types'; import withWidth, { SMALL } from 'helpers/with-width'; import { Form } from 'components'; const schema = { "title": "Profile Configuration", "type": "object", "properties": { "title": { "type": "string", "title": "Title*", "required": true, "maxLength": 24 }, "security": { "title": "", "type": "object", "properties": { "k": { "type": "string", "title": "Profile Key (K)*", "required": true, "pattern": "^[0-9a-fA-F\\s]+$", "messages": { "pattern": "Only hexadecimal digits are allowed" } }, "amf": { "type": "string", "title": "Authentication Management Field (AMF)*", "required": true, "pattern": "^[0-9a-fA-F\\s]+$", "messages": { "pattern": "Only hexadecimal digits are allowed" } }, "op_type": { "type": "number", "title": "USIM Type", "enum": [0, 1], "enumNames": ["OPc", "OP"], "default": 0, }, "op_value": { "type": "string", "title": "Operator Key (OPc/OP)*", "required": true, "pattern": "^[0-9a-fA-F\\s]+$", "messages": { "pattern": "Only hexadecimal digits are allowed" } }, } }, "ambr": { "type": "object", "title": "", "properties": { "downlink": { "type": "number", "title": "UE-AMBR Downlink (Kbps)*", "required": true }, "uplink": { "type": "number", "title": "UE-AMBR Uplink (Kbps)*", "required": true } } }, "pdn": { "type": "array", "title": "APN Configurations", "minItems": 1, "maxItems": 4, "messages": { "minItems": "At least 1 APN is required", "maxItems": "4 APNs are supported" }, "items": { "type": "object", "properties": { "apn": { "type": "string", "title": "Access Point Name (APN)*", "required": true }, "qos": { "type": "object", "title": "", "properties": { "qci": { "type": "number", "title": "QoS Class Identifier (QCI)*", "enum": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 65, 66, 69, 70 ], "default": 9, }, "arp" : { "type": "object", "title": "", "properties": { "priority_level": { "type": "number", "title": "ARP Priority Level (1-15)*", "default": 8, "minimum": 1, "maximum": 15, "required": true }, "pre_emption_capability": { "type": "number", "title": "Capability*", "enum": [1, 0], "enumNames": ["Disabled", "Enabled"], "default": 1, }, "pre_emption_vulnerability": { "type": "number", "title": "Vulnerability*", "enum": [1, 0], "enumNames": ["Disabled", "Enabled"], "default": 1, }, } } } }, "ambr": { "type": "object", "title": "", "properties": { "downlink": { "type": "number", "title": "APN-AMBR Downlink (Kbps)", }, "uplink": { "type": "number", "title": "APN-AMBR Uplink (Kbps)", }, } }, "pgw": { "type": "object", "title": "", "properties": { "addr": { "type": "string", "title": "PGW IPv4 Address", "format" : "ipv4" }, "addr6": { "type": "string", "title": "PGW IPv6 Address", "format" : "ipv6" }, } }, "pcc_rule": { "type": "array", "title": "PCC Rules", "maxItems": 8, "messages": { "maxItems": "8 PCC Rules are supported" }, "items": { "type": "object", "properties": { "flow": { "type": "array", "title": "", "maxItems": 8, "messages": { "maxItems": "8 Flows are supported" }, "items": { "type": "object", "properties": { "direction": { "type": "number", "title": "Flow Direction*", "enum": [1, 2], "enumNames": ["Downlink", "Uplink"], "default": 1, }, "description": { "type": "string", "title": "Description*", "default": "permit out udp from any 1-65535 to 45.45.45.45", "required": true, "pattern": "^permit\\s+out", "messages": { "pattern": "Begin with reserved keyword 'permit out'." } } } } }, "qos": { "type": "object", "title": "", "properties": { "qci": { "type": "number", "title": "QoS Class Identifier (QCI)*", "enum": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 65, 66, 69, 70 ], "default": 9, }, "arp" : { "type": "object", "title": "", "properties": { "priority_level": { "type": "number", "title": "ARP Priority Level (1-15)*", "default": 8, "minimum": 1, "maximum": 15, "required": true }, "pre_emption_capability": { "type": "number", "title": "Capability*", "enum": [1, 0], "enumNames": ["Disabled", "Enabled"], "default": 1, }, "pre_emption_vulnerability": { "type": "number", "title": "Vulnerability*", "default": 1, "minimum": 0, "maximum": 1, "enum": [1, 0], "enumNames": ["Disabled", "Enabled"], "default": 1, }, } }, "mbr": { "type": "object", "title": "", "properties": { "downlink": { "type": "number", "title": "MBR Downlink (Kbps)", }, "uplink": { "type": "number", "title": "MBR Uplink (Kbps)", }, } }, "gbr": { "type": "object", "title": "", "properties": { "downlink": { "type": "number", "title": "GBR Downlink (Kbps)", }, "uplink": { "type": "number", "title": "GBR Uplink (Kbps)", }, } }, }, }, } } } } } } } }; const uiSchema = { "title" : { classNames: "col-xs-12", }, "security" : { "k" : { classNames: "col-xs-7", }, "amf" : { classNames: "col-xs-5", }, "op_type" : { classNames: "col-xs-3", }, "op_value" : { classNames: "col-xs-8", }, }, "ambr" : { "downlink" : { classNames: "col-xs-6" }, "uplink" : { classNames: "col-xs-6" }, }, "pdn": { "items": { "qos": { "qci": { "ui:widget": "radio", "ui:options": { "inline": true }, }, "arp": { "priority_level": { classNames: "col-xs-6" }, "pre_emption_capability": { classNames: "col-xs-3" }, "pre_emption_vulnerability": { classNames: "col-xs-3" } } }, "ambr" : { "downlink" : { classNames: "col-xs-6" }, "uplink" : { classNames: "col-xs-6" }, }, "pgw" : { "addr" : { classNames: "col-xs-6" }, "addr6" : { classNames: "col-xs-6" }, }, "pcc_rule": { "items": { "flow": { "items": { "direction": { classNames: "col-xs-12" }, "description": { classNames: "col-xs-12", "ui:help": "Hint: Flow-Description(TS29.212), IPFilterRule(RFC 3588)", }, }, }, "qos": { "qci": { "ui:widget": "radio", "ui:options": { "inline": true }, }, "arp": { "priority_level": { classNames: "col-xs-6" }, "pre_emption_capability": { classNames: "col-xs-3" }, "pre_emption_vulnerability": { classNames: "col-xs-3" } }, "mbr": { "downlink": { classNames: "col-xs-6" }, "uplink": { classNames: "col-xs-6" } }, "gbr": { "downlink": { classNames: "col-xs-6" }, "uplink": { classNames: "col-xs-6" } } } } } } } } class Edit extends Component { static propTypes = { visible: PropTypes.bool, action: PropTypes.string, formData: PropTypes.object, isLoading: PropTypes.bool, validate: PropTypes.func, onHide: PropTypes.func, onSubmit: PropTypes.func, onError: PropTypes.func } constructor(props) { super(props); this.state = this.getStateFromProps(props); } componentWillReceiveProps(nextProps) { this.setState(this.getStateFromProps(nextProps)); } getStateFromProps(props) { const { action, width, } = props; let state = { schema, uiSchema }; if (action === 'update') { state = { ...state, uiSchema : { ...uiSchema, "title": { "ui:disabled": true } } } } else if (width !== SMALL) { state = { ...state, uiSchema : { ...uiSchema, "title": { "ui:autofocus": true } } } } return state; } render() { const { visible, action, formData, isLoading, validate, onHide, onSubmit, onError } = this.props; return (
) } } export default withWidth()(Edit); nextepc-0.3.10/webui/src/components/Profile/Item.js000066400000000000000000000066221333553357400222050ustar00rootroot00000000000000import { Component } from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import oc from 'open-color'; import { media } from 'helpers/style-utils'; import EditIcon from 'react-icons/lib/md/edit'; import DeleteIcon from 'react-icons/lib/md/delete'; import { Tooltip, Spinner } from 'components'; const Card = styled.div` position: relative; display: flex; padding : 0.5rem; cursor: pointer; ${p => p.disabled && 'opacity: 0.5; cursor: not-allowed; pointer-events: none;'} .actions { position: absolute; top: 0; right: 0; width: 8rem; height: 100%; display: flex; align-items: center; justify-content: center; opacity: 0; } &:hover { background: ${oc.gray[1]}; .actions { ${p => p.disabled ? 'opacity: 0;' : 'opacity: 1;'}; } } `; const CircleButton = styled.div` height: 2rem; width: 2rem; display: flex; align-items: center; justify-content: center; margin: 1px 4px; color: ${oc.gray[6]}; border-radius: 1rem; font-size: 1.5rem; &:hover { color: ${oc.indigo[6]}; } &.delete { &:hover { color: ${oc.pink[6]}; } } ` const Profile = styled.div` display: flex; flex-direction: row; flex:1; line-height: 2.5rem; margin : 0 2rem; .title { font-size: 1.25rem; color: ${oc.gray[8]}; width: 320px; } .ambr { font-size: 1.1rem; color: ${oc.gray[6]}; width: 240px; } .apn { font-size: 1.1rem; color: ${oc.gray[6]}; width: 120px; } `; const SpinnerWrapper = styled.div` position: absolute; top: 0; right: 0; width: 4rem; height: 100%; display: flex; align-items: center; justify-content: center; ` const propTypes = { profile: PropTypes.shape({ title: PropTypes.string }), onView: PropTypes.func, onEdit: PropTypes.func, onDelete: PropTypes.func } class Item extends Component { static propTypes = { profile: PropTypes.shape({ title: PropTypes.string }), onView: PropTypes.func, onEdit: PropTypes.func, onDelete: PropTypes.func } handleEdit = e => { e.stopPropagation(); const { profile, onEdit, } = this.props; const { _id } = profile; onEdit(_id) } handleDelete = e => { e.stopPropagation(); const { profile, onDelete } = this.props; const { _id } = profile; onDelete(_id) } render() { const { handleEdit, handleDelete } = this; const { disabled, profile, onView, onEdit, onDelete } = this.props; const { _id, title, pdn, ambr } = profile; return ( onView(_id)}>
{title}
{ambr.downlink}/{ambr.uplink}
{pdn[0].apn}
{disabled && }
) } } export default Item; nextepc-0.3.10/webui/src/components/Profile/List.js000066400000000000000000000016421333553357400222170ustar00rootroot00000000000000import PropTypes from 'prop-types'; import styled from 'styled-components'; import oc from 'open-color'; import { media } from 'helpers/style-utils'; import { Layout, Blank } from 'components'; import Item from './Item'; const Wrapper = styled.div` display: block; margin: 2rem; ${media.mobile` margin: 0.5rem 0.25rem; `} ` const propTypes = { profiles: PropTypes.arrayOf(PropTypes.object), onView: PropTypes.func, onEdit: PropTypes.func, onDelete: PropTypes.func, } const List = ({ profiles, deletedId, onView, onEdit, onDelete }) => { const profileList = profiles .map(profile => ); return ( {profileList} ) } List.propTypes = propTypes; export default List; nextepc-0.3.10/webui/src/components/Profile/View.js000066400000000000000000000254321333553357400222210ustar00rootroot00000000000000import PropTypes from 'prop-types'; import styled from 'styled-components'; import oc from 'open-color'; import { media } from 'helpers/style-utils'; import EditIcon from 'react-icons/lib/md/edit'; import DeleteIcon from 'react-icons/lib/md/delete'; import CloseIcon from 'react-icons/lib/md/close'; import SecurityIcon from 'react-icons/lib/md/security'; import PdnIcon from 'react-icons/lib/md/cast'; import KeyboardControlIcon from 'react-icons/lib/md/keyboard-control'; import { Modal, Tooltip, Dimmed } from 'components'; const Wrapper = styled.div` display: flex; flex-direction: column; postion: relative; width: 900px; ${media.mobile` width: calc(100vw - 4rem); `} background: white; box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); ` const Header = styled.div` position: relative; display: flex; background: ${oc.gray[1]}; .title { padding: 1.5rem; color: ${oc.gray[8]}; font-size: 1.5rem; } .actions { position: absolute; top: 0; right: 0; width: 8rem; height: 100%; display: flex; align-items: center; justify-content: center; } `; const CircleButton = styled.div` height: 2rem; width: 2rem; display: flex; align-items: center; justify-content: center; margin: 1px; color: ${oc.gray[6]}; border-radius: 1rem; font-size: 1.5rem; &:hover { color: ${oc.indigo[6]}; } &.delete { &:hover { color: ${oc.pink[6]}; } } ` const Body = styled.div` display: block; margin: 0.5rem; height: 500px; ${media.mobile` height: calc(100vh - 16rem); `} overflow: scroll; ` const Profile = styled.div` display: flex; flex-direction: column; margin: 0, auto; color: ${oc.gray[9]}; .header { margin: 12px; font-size: 16px; } .body { display: flex; flex-direction: row; flex:1; margin: 6px; .left { width: 80px; text-align: center; font-size: 18px; color: ${oc.gray[6]}; } .right { display: flex; flex-direction: column; flex:1; .data { flex:1; font-size: 12px; margin: 4px; } } } ` const Pdn = styled.div` display: flex; flex-direction: column; margin: 0 auto; color: ${oc.gray[9]}; .header { margin: 12px; font-size: 16px; } .body { display: flex; flex-direction: row; flex:1; margin: 0px 32px; .small_data { width: 50px; font-size: 12px; margin: 4px; } .medium_data { width: 80px; font-size: 12px; margin: 4px; } .large_data { width: 140px; font-size: 12px; margin: 4px; } } ` const View = ({ visible, disableOnClickOutside, profile, onEdit, onDelete, onHide }) => { const _id = (profile || {})._id; const title = (profile || {}).title; const security = ((profile || {}).security || {}); const ambr = ((profile || {}).ambr || {}); const pdns = ((profile || {}).pdn || []); return (
{title}
onEdit(_id)}> onDelete(_id)}>
Profile Configuration
{security.k} K
{security.opc &&
{security.opc} OPc
} {security.op &&
{security.op} OP
}
{security.amf} AMF
{security.rand &&
{security.rand} RAND
} {security.sqn &&
{security.sqn} SQN
}
{ambr.downlink} Kbps UL
{ambr.uplink} Kbps DL
APN Configrations
APN
QCI
ARP
Capability
Vulnerablility
MBR DL/UL(Kbps)
GBR DL/UL(Kbps)
PGW IP
{pdns.map(pdn =>
{pdn.apn}
{pdn.qos.qci}
{pdn.qos.arp.priority_level}
{pdn.qos.arp.pre_emption_capability === 1 ? "Disabled" : "Enabled"}
{pdn.qos.arp.pre_emption_vulnerability === 1 ? "Disabled" : "Enabled"}
{pdn['ambr'] === undefined ?
unlimited/unlimited
:
{pdn.ambr['downlink'] === undefined ? "unlimited" : pdn.ambr.downlink} / {pdn.ambr['uplink'] === undefined ? "unlimited" : pdn.ambr.uplink}
}
{(pdn.pgw || {}).addr}
{(pdn.pgw || {}).addr6}
{pdn['pcc_rule'] !== undefined && pdn.pcc_rule.map((pcc_rule, index) =>
{pcc_rule.qos.qci}
{pcc_rule.qos.arp.priority_level}
{pcc_rule.qos.arp.pre_emption_capability === 1 ? "Disabled" : "Enabled"}
{pcc_rule.qos.arp.pre_emption_vulnerability === 1 ? "Disabled" : "Enabled"}
{pcc_rule.qos['mbr'] === undefined ?
unlimited/unlimited
:
{pcc_rule.qos.mbr['downlink'] === undefined ? "unlimited" : pcc_rule.qos.mbr.downlink} / {pcc_rule.qos.mbr['uplink'] === undefined ? "unlimited" : pcc_rule.qos.mbr.uplink}
} {pcc_rule.qos['gbr'] === undefined ?
unlimited/unlimited
:
{pcc_rule.qos.gbr['downlink'] === undefined ? "unlimited" : pcc_rule.qos.gbr.downlink} / {pcc_rule.qos.gbr['uplink'] === undefined ? "unlimited" : pcc_rule.qos.gbr.uplink}
}
{pcc_rule['flow'] !== undefined && pcc_rule.flow.map((flow, index) =>
{flow.direction == 1 && "Downlink"} {flow.direction == 2 && "Uplink"}
{flow.description}
) }
) }
)}
) } export default View; nextepc-0.3.10/webui/src/components/Profile/index.js000066400000000000000000000001641333553357400224110ustar00rootroot00000000000000import List from './List'; import Edit from './Edit'; import View from './View'; export { List, Edit, View };nextepc-0.3.10/webui/src/components/Shared/000077500000000000000000000000001333553357400205515ustar00rootroot00000000000000nextepc-0.3.10/webui/src/components/Shared/Blank.js000066400000000000000000000023051333553357400221360ustar00rootroot00000000000000import PropTypes from 'prop-types'; import styled from 'styled-components'; import oc from 'open-color'; import { CircleIcon } from 'components'; import SchoolIcon from 'react-icons/lib/md/import-contacts' const Wrapper = styled.div` position: relative; display: block; margin-top : 6rem; ` const StyledTitle = styled.div` display: block; margin-top: 2rem; text-align: center; font-size: 1rem; font-weight: bold; color: ${oc.indigo[8]}; cursor: pointer; `; const StyledBody = styled.div` display: block; margin-top: 2rem; text-align: center; font-size: 1rem; font-weight: 300; color: ${oc.gray[6]}; cursor: default; `; const Blank = ({visible, title, body, onTitle}) => visible ? ( {body} {title} ) : null; Blank.propTypes = { visible: PropTypes.bool, title: PropTypes.string, body: PropTypes.string, onTitle: PropTypes.func }; Blank.defaultProps = { visible: false, title: "ADD A DATA", body: "You have no data... yet!" }; export default Blank;nextepc-0.3.10/webui/src/components/Shared/Button.js000066400000000000000000000063751333553357400223750ustar00rootroot00000000000000import React from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import oc from 'open-color'; import withRipple from './withRipple'; function getBgColor(props) { let color = oc.indigo[7]; let colorDark = oc.indigo[8]; // Determine color based on props if (props.secondary) { color = oc.violet[7]; colorDark = oc.violet[8]; } if (props.info) { color = oc.gray[7]; colorDark = oc.gray[8]; } if (props.danger) { color = oc.red[7]; colorDark = oc.red[8]; } if (props.success) { color = oc.lime[7]; colorDark = oc.lime[8]; } if (props.outline || props.clear) { color = 'transparent'; colorDark = 'transparent'; } /* eslint-disable max-len */ return `background: ${color}; background: linear-gradient(to bottom, ${color} 0%, ${colorDark} 100%);`; /* eslint-enable max-len */ } function getHoverColor(props) { let color = oc.indigo[8]; if (props.secondary) color = oc.violet[8]; if (props.info) color = oc.gray[8]; if (props.danger) color = oc.red[8]; if (props.success) color = oc.lime[8]; if (props.clear) color = 'transparent'; return color; } function getActiveColor(props) { let color = oc.indigo[9]; if (props.secondary) color = oc.violet[9]; if (props.info) color = oc.gray[9]; if (props.danger) color = oc.red[9]; if (props.success) color = oc.lime[9]; return color; } function getColor(props) { if (props.primary) return oc.indigo[7]; if (props.secondary) return oc.violet[7]; if (props.info) return oc.gray[7]; if (props.danger) return oc.red[7]; if (props.success) return oc.lime[7]; return oc.indigo[7]; // default } const ButtonWrapper = styled.button` outline: none; font-size: 1rem; padding: 8px 16px; font-weight: normal; width: ${props => props.w || 'auto'}; text-shadow: 1px 1px 2px rgba(0,0,0,0.1); border-style: solid; border-width: ${props => props.outline && !props.clear ? '1px' : '0px'}; border-radius: 4px; border-color: ${props => getColor(props)}; color: ${props => props.outline || props.clear ? getColor(props) : '#fff'}; ${props => (!props.outline && !props.clear && !props.flat) && 'box-shadow: 1px 3px 6px rgba(0,0,0,0.1);' } ${props => getBgColor(props)}; ${props => props.disabled && 'opacity: 0.5; cursor: not-allowed;'}; ${props => props.small && 'padding: 4px 8px;'} ${props => props.large && 'padding: 12px 20px;'} ${props => props.small && 'font-size: 0.8rem;'} ${props => props.large && 'font-size: 1.5rem;'} &:hover { background: ${props => getHoverColor(props)}; ${props => !props.clear && 'color: #fff;'} ${props => !props.disabled && 'cursor: pointer;'} } &:active { background: ${props => !props.clear && getActiveColor(props)}; color: ${props => props.clear && getActiveColor(props)}; } `; const ButtonContent = styled.div` display: flex; flex-direction: row; align-items: center; justify-content: center; width: 100%; ${props => props.disabled && 'pointer-events: none;'}; `; const Button = ({ children, ...rest }) => ( {children} ); Button.propTypes = { children: PropTypes.any, }; export default withRipple(Button); nextepc-0.3.10/webui/src/components/Shared/CircleIcon.js000066400000000000000000000016311333553357400231220ustar00rootroot00000000000000import PropTypes from 'prop-types'; import styled from 'styled-components'; import oc from 'open-color'; const Wrapper = styled.div` width: ${p => p.size}; height: ${p => p.size}; margin: 0 auto; display: flex; align-items: center; justify-content: center; border-radius: calc(${p => p.size} * 0.5 ); font-size: calc(${p => p.size} * 0.75); background: ${p => p.background}; color: ${p => p.color}; `; Wrapper.propTypes = { size: PropTypes.string, background: PropTypes.string, color: PropTypes.string }; const CircleIcon = ({ children, size, background, color }) => ( {children} ) CircleIcon.propTypes = { size: PropTypes.string, background: PropTypes.string, color: PropTypes.string }; CircleIcon.defaultProps = { size: '4rem', background: '#000', color: 'white' }; export default CircleIcon;nextepc-0.3.10/webui/src/components/Shared/Confirm.js000066400000000000000000000030701333553357400225040ustar00rootroot00000000000000import PropTypes from 'prop-types'; import styled from 'styled-components'; import oc from 'open-color'; import { media, transitions } from 'helpers/style-utils'; import Modal from './Modal'; import Button from './Button'; import Dimmed from './Dimmed'; const Wrapper = styled.div` display: flex; flex-direction: column; postion: relative; width: 300px; ${media.mobile` width: calc(100vw - 2rem); `} background: white; box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); ` const Message = styled.div` padding: 2rem; ` const Buttons = styled.div` display: flex; justify-content: flex-end; padding: 1rem; ` const Confirm = ({ visible, onOutside, message, buttons }) => { const buttonList = buttons .map(button => ); return (
{message} {buttonList}
) } Confirm.propTypes = { visible: PropTypes.bool, disabled: PropTypes.bool, onOutside: PropTypes.func, } Confirm.defaultProps = { visible: false, disabled: true, onOutside: () => {}, } export default Confirm;nextepc-0.3.10/webui/src/components/Shared/Dimmed.js000066400000000000000000000007741333553357400223160ustar00rootroot00000000000000import styled from 'styled-components'; import PropTypes from 'prop-types'; const Black = styled.div` position: fixed; top: 0px; left: 0px; right: 0px; bottom: 0px; z-index: ${p => p.zindex}; background: rgba(0,0,0,0.3); `; const Dimmed = ({ visible, zindex }) => (
{visible && }
); Dimmed.propTypes = { visible: PropTypes.bool, zindex: PropTypes.string }; Dimmed.defaultProps = { visible: false, zindex: '300' } export default Dimmed;nextepc-0.3.10/webui/src/components/Shared/FloatingButton.js000066400000000000000000000014131333553357400240450ustar00rootroot00000000000000import PropTypes from 'prop-types'; import styled from 'styled-components'; import oc from 'open-color'; import AddIcon from 'react-icons/lib/md/add'; const Wrapper = styled.div` position: fixed; bottom: 2rem; right: 2rem; width: 4rem; height: 4rem; border: 1px solid ${oc.pink[9]}; color: white; background: ${oc.pink[8]}; border-radius: 2rem; font-size: 2rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s; &:hover { transform: translateY(-0.5rem); background: ${oc.pink[6]}; } `; const FloatingButton = ({onClick}) => ( ); FloatingButton.propTypes = { onClick: PropTypes.func } export default FloatingButton;nextepc-0.3.10/webui/src/components/Shared/Form.js000066400000000000000000000154431333553357400220210ustar00rootroot00000000000000import { Component } from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import oc from 'open-color'; import { media } from 'helpers/style-utils'; import JsonSchemaForm from 'react-jsonschema-form'; import Modal from './Modal'; import Button from './Button'; import Spinner from './Spinner'; import Confirm from './Confirm'; const Wrapper = styled.div` display: flex; flex-direction: column; postion: relative; width: ${p => p.width || `1050px`}; ${media.mobile` width: calc(100vw - 2rem); `} background: white; box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); ` const Header = styled.div` display: flex; justify-content: flex-start; padding: 1rem; font-size: 1.5rem; background: ${oc.gray[1]}; ` const Body = styled.div` padding: 2rem; font-size: 14px; height: ${p => p.height || `500px`}; ${media.mobile` height: calc(100vh - 16rem); `} overflow: scroll; ` const Footer = styled.div` display: flex; justify-content: flex-end; padding: 1rem; ` /* We can UI design with styled-componented. Later! */ const REQUIRED_FIELD_SYMBOL = "*"; const CustomTitleField = props => { const { id, title, required } = props; const legend = required ? title + REQUIRED_FIELD_SYMBOL : title; return {legend}; }; const fields = { TitleField: CustomTitleField, }; function Label(props) { const { label, required, id } = props; if (!label) { // See #312: Ensure compatibility with old versions of React. return
; } return ( ); } const CustomFieldTemplate = props => { const { id, classNames, label, children, errors, help, description, hidden, required, displayLabel, } = props; if (hidden) { return children; } return (
{displayLabel &&
); } const transformErrors = errors => { return errors.map(error => { // use error messages from JSON schema if any if (error.schema.messages && error.schema.messages[error.name]) { return { ...error, message: error.schema.messages[error.name] }; } return error; }); }; class Form extends Component { static propTypes = { visible: PropTypes.bool, title: PropTypes.string, schema: PropTypes.object, uiSchema: PropTypes.object, formData: PropTypes.object, isLoading: PropTypes.bool, valdate: PropTypes.func, onHide: PropTypes.func, onSubmit: PropTypes.func, onError: PropTypes.func }; static defaultProps = { visible: false, title: "" }; state = {}; componentWillReceiveProps(nextProps) { if (this.props.visible === false && nextProps.visible === true) { // Initialize State Variable when form view is visible for the first time this.setState({ formData: nextProps.formData, disabled: false, editing: false, confirm: false, disableSubmitButton: true }) } } handleChange = data => { const { onChange } = this.props; let formDataChanged = null; if (onChange) { formDataChanged = onChange(data.formData); } this.setState({ editing: true, disableSubmitButton: (Object.keys(data.errors).length > 0), formData: formDataChanged ? formDataChanged : data.formData }) } handleSubmit = data => { const { onSubmit } = this.props; onSubmit(data.formData); } handleSubmitButton = () => { this.setState({ disabled: true, disableSubmitButton: true }) this.submitButton.click(); } handleOutside = () => { const { onHide } = this.props; if (this.state.editing === true) { this.setState({ confirm: true }) } else { onHide(); } } handleClose = () => { const { onHide } = this.props; this.setState({ confirm: false }) onHide(); } render() { const { handleChange, handleSubmit, handleSubmitButton, handleOutside, handleClose } = this; const { visible, title, schema, uiSchema, isLoading, validate, onSubmit, onError } = this.props; const { disabled, disableSubmitButton, formData } = this.state; return (
{title}
{isLoading && } {!isLoading &&
}
this.setState({ confirm: false })} ]}/>
) } } export default Form;nextepc-0.3.10/webui/src/components/Shared/Modal.js000066400000000000000000000046071333553357400221520ustar00rootroot00000000000000import { Component } from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import onClickOutside from 'react-onclickoutside'; import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup'; import { media, transitions } from 'helpers/style-utils'; const Wrapper = styled.div` position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: ${p => p.zindex}; .modal-enter { animation: ${p => p.transitionEnter}; animation-fill-mode: forwards; } .modal-leave { animation: ${p => p.transitionLeave}; animation-fill-mode: forwards; } `; class Modal extends Component { static propTypes = { visible: PropTypes.bool, onOutside: PropTypes.func, zindex: PropTypes.string, transitionEnter: PropTypes.string, transitionLeave: PropTypes.string, transitionEnterTimeout: PropTypes.number, transitionLeaveTimeout: PropTypes.number } static defaultProps = { zindex: '500', transitionEnter: `${transitions.stretchOut} .25s ease-in`, transitionLeave: `${transitions.shrinkIn} .25s ease-in`, transitionEnterTimeout: 300, transitionLeaveTimeout: 150 } handleClickOutside = (e) => { const { visible, onOutside } = this.props; if (!visible) return null; onOutside(); } handleKeyUp = (e) => { const { onOutside } = this.props if (e.keyCode === 27) { onOutside(); } } componentDidUpdate(prevProps, prevState) { if(prevProps.visible !== this.props.visible) { if(this.props.visible) { document.body.addEventListener('keyup', this.handleKeyUp); } else { document.body.removeEventListener('keyup', this.handleKeyUp); } } } render() { const { visible, children, zindex, transitionEnter, transitionLeave, transitionEnterTimeout, transitionLeaveTimeout } = this.props; return ( { visible && (
{children}
) }
); } } export default onClickOutside(Modal); nextepc-0.3.10/webui/src/components/Shared/Spinner.js000066400000000000000000000034431333553357400225310ustar00rootroot00000000000000import PropTypes from 'prop-types'; import styled, { keyframes } from 'styled-components'; import oc from 'open-color'; const circleAnim = keyframes` 0% { transform: rotate(0deg); } 50% { transform: rotate(180deg); } 100% { transform: rotate(360deg); } `; const getIconSize = ({ small, medium, large }) => { if (small) return '16px'; if (medium) return '64px'; if (large) return '96px'; return '32px'; }; const getBorderWidth = ({ small, medium, large }) => { if (small) return '1px'; if (medium) return '4px'; if (large) return '6px'; return '2px'; }; const Circle = styled.div` width: ${props => getIconSize(props)}; height: ${props => getIconSize(props)}; position: relative; display: inline-block; box-sizing: border-box; font-size: 0px; color: ${props => props.color || oc.indigo[8]}; `; const CircleInner = styled.div` position: relative; box-sizing: border-box; display: inline-block; float: none; width: ${props => getIconSize(props)}; height: ${props => getIconSize(props)}; background: transparent; border: ${props => getBorderWidth(props)} solid currentColor; border-bottom-color: transparent; border-Radius: 100%; animation: ${circleAnim} 0.75s linear infinite; `; const Wrapper = styled.div` text-align: ${props => props.align || 'center'}; padding: ${props => props.padding || '2rem'}; ` const Spinner = ({ sm, md, lg, color, align, padding }) => ( ); Spinner.propTypes = { sm: PropTypes.bool, md: PropTypes.bool, lg: PropTypes.bool, color: PropTypes.string, }; export default Spinner; nextepc-0.3.10/webui/src/components/Shared/Tooltip.js000066400000000000000000000115521333553357400225450ustar00rootroot00000000000000import PropTypes from 'prop-types'; import React, { Component } from 'react'; import styled from 'styled-components'; // ============================ const tooltipArrowHeight = 6; // const TooltipWrapperButton = styled.button` // display: inline-block; // outline: none; // border: none; // background: none; // padding: 0; // `; const TooltipWrapperDiv = styled.div` display: inline-block; outline: none; border: none; background: none; padding: 0; `; const TooltipContainer = styled.div` display: block; position: relative; `; const TooltipBubble = styled.div` position: absolute; text-align: center; left: ${props => `${props.leftPosition}px`}; ${props => props.top && `bottom: calc(100% + ${tooltipArrowHeight}px);`}; ${props => props.bottom && `top: calc(100% + ${tooltipArrowHeight}px);`}; ${props => (!props.top && !props.bottom) && `bottom: calc(100% + ${tooltipArrowHeight}px);` }; display: inline-block; border-radius: 3px; min-height: ${props => props.height ? props.height : "30px" }; min-width: ${props => props.width ? props.width : "100px" }; padding: ${props => props.padding ? props.padding : "8px" }; z-index: 999; line-height: 1.5; font-size: 0.8rem; box-sizing: border-box; box-shadow: 0px 2px 10px rgba(0,0,0,0.2); color: ${props => props.textColor || '#fff'}; background-color: ${props => props.bgColor || 'rgba(0,0,0,0.8)'}; border-color: ${props => props.bgColor || 'rgba(0,0,0,0.8)'}; visibility: ${props => props.show ? 'visible' : 'hidden'}; ${props => !props.show && 'pointer-events: none;'} transition: transform 0.2s ease, opacity 0.3s ease; transform: ${props => props.show ? 'translateY(0px)' : `translateY(${props.bottom ? -10 : 10}px)` }; opacity: ${props => props.show ? 1 : 0}; `; const TooltipArrow = styled.span` width: 0px; height: 0px; border-left: ${`${tooltipArrowHeight}px solid transparent`}; border-right: ${`${tooltipArrowHeight}px solid transparent`}; border-top: ${`${tooltipArrowHeight}px solid`}; border-top-color: inherit; position: absolute; ${props => props.top && `bottom: -${tooltipArrowHeight}px;`} ${props => props.bottom && `top: -${tooltipArrowHeight}px;`} ${props => (!props.top && !props.bottom) && `bottom: -${tooltipArrowHeight}px;` } ${props => props.bottom && 'transform: rotate(180deg);'} left: ${`calc(50% - ${tooltipArrowHeight}px)`}; `; class Tooltip extends Component { static propTypes = { children: PropTypes.any.isRequired, content: PropTypes.any, color: PropTypes.string, bg: PropTypes.string, show: PropTypes.bool, } static defaultProps = { content: 'tooltip content', show: null, } constructor(props) { super(props); this.showTooltip = this.showTooltip.bind(this); this.hideTooltip = this.hideTooltip.bind(this); this.handleMouseEnter = this.handleMouseEnter.bind(this); this.handleMouseLeave = this.handleMouseLeave.bind(this); const disableHoverChanges = props.show != null; this.state = { showTooltip: false, lPos: null, disableHoverChanges, }; } componentWillReceiveProps(nextProps) { // if (nextProps.show !== this.props.show) { if (nextProps.show) this.showTooltip(); else this.hideTooltip(); // } } shouldComponentUpdate(nextProps, nextState) { const { showTooltip } = this.state; return nextState.showTooltip !== showTooltip; } handleMouseEnter() { if (!this.state.disableHoverChanges) this.showTooltip(); } handleMouseLeave() { if (!this.state.disableHoverChanges) this.hideTooltip(); } showTooltip() { const tipNode = this.tooltipRef; const tipWrapNode = this.tooltipWrapRef; const lPos = -(tipNode.offsetWidth / 2) + (tipWrapNode.offsetWidth / 2); this.setState({ showTooltip: true, lPos }); } hideTooltip() { this.setState({ showTooltip: false }); } render() { const { content, children, bg, color, ...rest } = this.props; const { showTooltip, lPos } = this.state; // NOTE: Use `button` wrapper when we need to control tooltip visibility // with focus / blur. // const Wrapper = disableHoverChanges ? // TooltipWrapperButton : // TooltipWrapperDiv; return ( { this.tooltipWrapRef = ref; }} onMouseEnter={this.handleMouseEnter} onMouseLeave={this.handleMouseLeave} > { this.tooltipRef = ref; }} leftPosition={lPos || 0} show={showTooltip} bgColor={bg} textColor={color} > {content} {children} ); } } export default Tooltip; nextepc-0.3.10/webui/src/components/Shared/withRipple.js000066400000000000000000000025301333553357400232360ustar00rootroot00000000000000import React, { Component } from 'react'; import styled from 'styled-components'; function getAlignement(props) { if (props.align === 'center') return '0px auto'; if (props.align === 'right') return '0px 0px 0px auto'; if (props.align === 'left') return '0px auto 0px 0px'; return '0px'; } const RippleWrapper = styled.div` position: relative; overflow: hidden; transform: translate3d(0, 0, 0); display: inline-block; align-self: flex-start; margin: ${props => getAlignement(props)}; &:after { content: ""; display: block; position: absolute; width: 100%; height: 100%; top: 0; left: 0; pointer-events: none; background-image: radial-gradient(circle, #000 10%, transparent 10.01%); background-repeat: no-repeat; background-position: 50%; transform: scale(10,10); opacity: 0; transition: transform .5s, opacity 1s; } &:active:after { transform: scale(0,0); opacity: .2; transition: 0s; } `; /* eslint-disable react/prefer-stateless-function */ const withRipple = (Comp) => { return class RippleProvider extends Component { render() { return ( ); } }; }; /* eslint-enable react/prefer-stateless-function */ export default withRipple; nextepc-0.3.10/webui/src/components/Subscriber/000077500000000000000000000000001333553357400214465ustar00rootroot00000000000000nextepc-0.3.10/webui/src/components/Subscriber/Edit.js000066400000000000000000000357001333553357400226760ustar00rootroot00000000000000import { Component } from 'react'; import PropTypes from 'prop-types'; import withWidth, { SMALL } from 'helpers/with-width'; import { Form } from 'components'; import traverse from 'traverse'; const schema = { "title": "Subscriber Configuration", "type": "object", "properties": { "imsi": { "type": "string", "title": "IMSI*", "required": true, "pattern": "^\\d+$", "maxLength": 15, "messages": { "pattern": "Only digits are allowed" } }, "security": { "title": "", "type": "object", "properties": { "k": { "type": "string", "title": "Subscriber Key (K)*", "required": true, "pattern": "^[0-9a-fA-F\\s]+$", "messages": { "pattern": "Only hexadecimal digits are allowed" } }, "amf": { "type": "string", "title": "Authentication Management Field (AMF)*", "required": true, "pattern": "^[0-9a-fA-F\\s]+$", "messages": { "pattern": "Only hexadecimal digits are allowed" } }, "op_type": { "type": "number", "title": "USIM Type", "enum": [0, 1], "enumNames": ["OPc", "OP"], "default": 0, }, "op_value": { "type": "string", "title": "Operator Key (OPc/OP)*", "required": true, "pattern": "^[0-9a-fA-F\\s]+$", "messages": { "pattern": "Only hexadecimal digits are allowed" } }, } }, "ambr": { "type": "object", "title": "", "properties": { "downlink": { "type": "number", "title": "UE-AMBR Downlink (Kbps)*", "required": true }, "uplink": { "type": "number", "title": "UE-AMBR Uplink (Kbps)*", "required": true } } }, "pdn": { "type": "array", "title": "APN Configurations", "minItems": 1, "maxItems": 4, "messages": { "minItems": "At least 1 APN is required", "maxItems": "4 APNs are supported" }, "items": { "type": "object", "properties": { "apn": { "type": "string", "title": "Access Point Name (APN)*", "required": true }, "qos": { "type": "object", "title": "", "properties": { "qci": { "type": "number", "title": "QoS Class Identifier (QCI)*", "enum": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 65, 66, 69, 70 ], "default": 9, }, "arp" : { "type": "object", "title": "", "properties": { "priority_level": { "type": "number", "title": "ARP Priority Level (1-15)*", "default": 8, "minimum": 1, "maximum": 15, "required": true }, "pre_emption_capability": { "type": "number", "title": "Capability*", "enum": [1, 0], "enumNames": ["Disabled", "Enabled"], "default": 1, }, "pre_emption_vulnerability": { "type": "number", "title": "Vulnerability*", "enum": [1, 0], "enumNames": ["Disabled", "Enabled"], "default": 1, }, } } } }, "ambr": { "type": "object", "title": "", "properties": { "downlink": { "type": "number", "title": "APN-AMBR Downlink (Kbps)", }, "uplink": { "type": "number", "title": "APN-AMBR Uplink (Kbps)", }, } }, "pgw": { "type": "object", "title": "", "properties": { "addr": { "type": "string", "title": "PGW IPv4 Address", "format" : "ipv4" }, "addr6": { "type": "string", "title": "PGW IPv6 Address", "format" : "ipv6" }, } }, "pcc_rule": { "type": "array", "title": "PCC Rules", "maxItems": 8, "messages": { "maxItems": "8 PCC Rules are supported" }, "items": { "type": "object", "properties": { "flow": { "type": "array", "title": "", "maxItems": 8, "messages": { "maxItems": "8 Flows are supported" }, "items": { "type": "object", "properties": { "direction": { "type": "number", "title": "Flow Direction*", "enum": [1, 2], "enumNames": ["Downlink", "Uplink"], "default": 1, }, "description": { "type": "string", "title": "Description*", "default": "permit out udp from any 1-65535 to 45.45.45.45", "required": true, "pattern": "^permit\\s+out", "messages": { "pattern": "Begin with reserved keyword 'permit out'." } } } } }, "qos": { "type": "object", "title": "", "properties": { "qci": { "type": "number", "title": "QoS Class Identifier (QCI)*", "enum": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 65, 66, 69, 70 ], "default": 9, }, "arp" : { "type": "object", "title": "", "properties": { "priority_level": { "type": "number", "title": "ARP Priority Level (1-15)*", "default": 8, "minimum": 1, "maximum": 15, "required": true }, "pre_emption_capability": { "type": "number", "title": "Capability*", "enum": [1, 0], "enumNames": ["Disabled", "Enabled"], "default": 1, }, "pre_emption_vulnerability": { "type": "number", "title": "Vulnerability*", "default": 1, "minimum": 0, "maximum": 1, "enum": [1, 0], "enumNames": ["Disabled", "Enabled"], "default": 1, }, } }, "mbr": { "type": "object", "title": "", "properties": { "downlink": { "type": "number", "title": "MBR Downlink (Kbps)", }, "uplink": { "type": "number", "title": "MBR Uplink (Kbps)", }, } }, "gbr": { "type": "object", "title": "", "properties": { "downlink": { "type": "number", "title": "GBR Downlink (Kbps)", }, "uplink": { "type": "number", "title": "GBR Uplink (Kbps)", }, } }, }, }, } } } } } } } }; const uiSchema = { "imsi" : { classNames: "col-xs-12", }, "security" : { "k" : { classNames: "col-xs-7", }, "amf" : { classNames: "col-xs-5", }, "op_type" : { classNames: "col-xs-3", }, "op_value" : { classNames: "col-xs-8", }, }, "ambr" : { "downlink" : { classNames: "col-xs-6" }, "uplink" : { classNames: "col-xs-6" }, }, "pdn": { "items": { "qos": { "qci": { "ui:widget": "radio", "ui:options": { "inline": true }, }, "arp": { "priority_level": { classNames: "col-xs-6" }, "pre_emption_capability": { classNames: "col-xs-3" }, "pre_emption_vulnerability": { classNames: "col-xs-3" } } }, "ambr" : { "downlink" : { classNames: "col-xs-6" }, "uplink" : { classNames: "col-xs-6" }, }, "pgw" : { "addr" : { classNames: "col-xs-6" }, "addr6" : { classNames: "col-xs-6" }, }, "pcc_rule": { "items": { "flow": { "items": { "direction": { classNames: "col-xs-12" }, "description": { classNames: "col-xs-12", "ui:help": "Hint: Flow-Description(TS29.212), IPFilterRule(RFC 3588)", }, }, }, "qos": { "qci": { "ui:widget": "radio", "ui:options": { "inline": true }, }, "arp": { "priority_level": { classNames: "col-xs-6" }, "pre_emption_capability": { classNames: "col-xs-3" }, "pre_emption_vulnerability": { classNames: "col-xs-3" } }, "mbr": { "downlink": { classNames: "col-xs-6" }, "uplink": { classNames: "col-xs-6" } }, "gbr": { "downlink": { classNames: "col-xs-6" }, "uplink": { classNames: "col-xs-6" } } } } } } } } class Edit extends Component { static propTypes = { visible: PropTypes.bool, action: PropTypes.string, formData: PropTypes.object, isLoading: PropTypes.bool, validate: PropTypes.func, onHide: PropTypes.func, onSubmit: PropTypes.func, onError: PropTypes.func } constructor(props) { super(props); this.state = this.getStateFromProps(props); } componentWillReceiveProps(nextProps) { this.setState(this.getStateFromProps(nextProps)); } getStateFromProps(props) { const { action, profiles, width, formData, } = props; let state = { schema, uiSchema, formData, }; if (action === 'create' && Object.keys(profiles).length > 0) { if (this.state.profile === undefined) { state = Object.assign(state, { profile : profiles[0]._id }) } else { state = Object.assign(state, { profile : this.state.profile }) } state = { ...state, "schema" : { ...schema, "properties": { profile: { type: "string", title: "Profile*", enum: profiles.map(profile => profile._id), enumNames: profiles.map(profile => profile.title), default: state.profile }, ...schema.properties } } } state = Object.assign(state, { formData : this.getFormDataFromProfile(state.profile) }) delete state.uiSchema.profile; } else { delete state.schema.properties.profile; } if (action === 'update') { state.uiSchema = Object.assign(state.uiSchema, { "imsi": { "ui:disabled": true } }); } else if (width !== SMALL) { state.uiSchema = Object.assign(state.uiSchema, { "imsi": { "ui:autofocus": true } }); } return state; } getFormDataFromProfile(profile) { let formData; formData = Object.assign({}, this.props.profiles.filter(p => p._id === profile)[0]); formData = Object.assign(formData, { profile }); delete formData.title; delete formData._id; delete formData.__v; traverse(formData).forEach(function(x) { if (this.key == 'downlink') this.update(Number(x)); if (this.key == 'uplink') this.update(Number(x)); }) if (formData.security) { if (formData.security.opc) { formData.security.op_type = 0; formData.security.op_value = formData.security.opc; } else { formData.security.op_type = 1; formData.security.op_value = formData.security.op; } } return formData; } handleChange = (formData) => { const { action, profiles } = this.props; if (action === 'create' && Object.keys(profiles).length > 0) { if (this.state.profile !== formData.profile) { let data = this.getFormDataFromProfile(formData.profile) this.setState({ profile: formData.profile, formData : data }); return data; } } return undefined; } render() { const { handleChange } = this; const { visible, action, isLoading, validate, onHide, onSubmit, onError } = this.props; const { formData } = this.state; return ( ) } } export default withWidth()(Edit); nextepc-0.3.10/webui/src/components/Subscriber/Item.js000066400000000000000000000066501333553357400227110ustar00rootroot00000000000000import { Component } from 'react'; import PropTypes from 'prop-types'; import styled from 'styled-components'; import oc from 'open-color'; import { media } from 'helpers/style-utils'; import EditIcon from 'react-icons/lib/md/edit'; import DeleteIcon from 'react-icons/lib/md/delete'; import { Tooltip, Spinner } from 'components'; const Sizer = styled.div` display: inline-block; width: 33.3%; padding: 0.5rem; ${p => p.disabled && 'opacity: 0.5; cursor: not-allowed;'}; ${media.desktop` width: 50%; `} ${media.tablet` width: 100%; `} `; const Card = styled.div` position: relative; display: flex; background: white; box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); transition: all 0.3s cubic-bezier(.25,.8,.25,1); cursor: pointer; ${p => p.disabled && 'pointer-events: none;'} .actions { position: absolute; top: 0; right: 0; width: 6rem; height: 100%; display: flex; align-items: center; justify-content: center; opacity: 0; } &:hover { box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); .actions { ${p => p.disabled ? 'opacity: 0;' : 'opacity: 1;'}; } } `; const CircleButton = styled.div` height: 2rem; width: 2rem; display: flex; align-items: center; justify-content: center; margin: 1px; background: white; color: ${oc.gray[6]}; border-radius: 1rem; font-size: 1.5rem; &:hover { color: ${oc.indigo[6]}; } &.delete { &:hover { color: ${oc.pink[6]}; } } ` const Imsi = styled.div` padding-left: 1rem; color: ${oc.gray[8]}; font-size: 1.25rem; line-height : 3rem; `; const SpinnerWrapper = styled.div` position: absolute; top: 0; right: 0; width: 4rem; height: 100%; display: flex; align-items: center; justify-content: center; ` const propTypes = { subscriber: PropTypes.shape({ imsi: PropTypes.string }), onView: PropTypes.func, onEdit: PropTypes.func, onDelete: PropTypes.func } class Item extends Component { static propTypes = { subscriber: PropTypes.shape({ imsi: PropTypes.string }), onView: PropTypes.func, onEdit: PropTypes.func, onDelete: PropTypes.func } handleEdit = e => { e.stopPropagation(); const { subscriber, onEdit, } = this.props; const { imsi } = subscriber; onEdit(imsi) } handleDelete = e => { e.stopPropagation(); const { subscriber, onDelete } = this.props; const { imsi } = subscriber; onDelete(imsi) } render() { const { handleEdit, handleDelete } = this; const { disabled, subscriber, onView, onEdit, onDelete } = this.props; const { imsi } = subscriber; return ( onView(imsi)}> {imsi}
{disabled && }
) } } export default Item; nextepc-0.3.10/webui/src/components/Subscriber/List.js000066400000000000000000000032341333553357400227210ustar00rootroot00000000000000import PropTypes from 'prop-types'; import styled from 'styled-components'; import oc from 'open-color'; import { media, transitions } from 'helpers/style-utils'; import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup'; import { Layout, Blank } from 'components'; import Item from './Item'; const Wrapper = styled.div` display: block; margin: 1rem 0.5rem; ${media.mobile` margin: 0.5rem 0.25rem; `} .subscriber-enter { animation: ${transitions.stretchOut} .3s ease-in; animation-fill-mode: forwards; } .subscriber-leave { animation: ${transitions.shrinkIn} .15s ease-in; animation-fill-mode: forwards; } ` const propTypes = { subscribers: PropTypes.arrayOf(PropTypes.object), onView: PropTypes.func, onEdit: PropTypes.func, onDelete: PropTypes.func, search: PropTypes.string } const List = ({ subscribers, deletedImsi, onView, onEdit, onDelete, search }) => { const subscriberList = subscribers .filter(s => s.imsi.indexOf(search) !== -1) .sort( (a,b) => { if(a.imsi > b.imsi) return 1; if (a.imsi < b.imsi) return -1; return 0; } ) .map(subscriber => ); return ( {subscriberList} ) } List.propTypes = propTypes; export default List;nextepc-0.3.10/webui/src/components/Subscriber/Search.js000066400000000000000000000030501333553357400232070ustar00rootroot00000000000000import PropTypes from 'prop-types'; import styled from 'styled-components'; import oc from 'open-color'; import { media } from 'helpers/style-utils'; import SearchIcon from 'react-icons/lib/md/search'; import ClearIcon from 'react-icons/lib/md/clear'; const Wrapper = styled.div` display: flex; align-items: center; width: 700px; margin: 2rem auto 1rem auto; background: white; color: ${oc.gray[6]}; box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); transition: all 0.3s cubic-bezier(.25,.8,.25,1); &:hover { box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); } ${media.tablet` width: 400px; `} ${media.mobile` margin: 0rem auto; width: 100%; `} `; const SearchIconWrapper = styled.div` display: inline-flex; margin-left: 1rem; font-size: 1.5rem; ` const Input = styled.input` padding : 1rem; margin: 0 auto; width: 100%; font-size: 1.5rem; cursor: text; border: none; outline: none; ` const ClearIconWrapper = styled.div` display: inline-flex; margin-right: 1rem; font-size: 1.5rem; cursor: pointer; ` const Search = ({ value, onChange, onClear }) => ( {value !== '' && } ) Search.propTypes = { value: PropTypes.string, onChange: PropTypes.func, onClear: PropTypes.func }; export default Search;nextepc-0.3.10/webui/src/components/Subscriber/View.js000066400000000000000000000254211333553357400227220ustar00rootroot00000000000000import PropTypes from 'prop-types'; import styled from 'styled-components'; import oc from 'open-color'; import { media } from 'helpers/style-utils'; import EditIcon from 'react-icons/lib/md/edit'; import DeleteIcon from 'react-icons/lib/md/delete'; import CloseIcon from 'react-icons/lib/md/close'; import SecurityIcon from 'react-icons/lib/md/security'; import PdnIcon from 'react-icons/lib/md/cast'; import KeyboardControlIcon from 'react-icons/lib/md/keyboard-control'; import { Modal, Tooltip, Dimmed } from 'components'; const Wrapper = styled.div` display: flex; flex-direction: column; postion: relative; width: 900px; ${media.mobile` width: calc(100vw - 4rem); `} background: white; box-shadow: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23); ` const Header = styled.div` position: relative; display: flex; background: ${oc.gray[1]}; .title { padding: 1.5rem; color: ${oc.gray[8]}; font-size: 1.5rem; } .actions { position: absolute; top: 0; right: 0; width: 8rem; height: 100%; display: flex; align-items: center; justify-content: center; } `; const CircleButton = styled.div` height: 2rem; width: 2rem; display: flex; align-items: center; justify-content: center; margin: 1px; color: ${oc.gray[6]}; border-radius: 1rem; font-size: 1.5rem; &:hover { color: ${oc.indigo[6]}; } &.delete { &:hover { color: ${oc.pink[6]}; } } ` const Body = styled.div` display: block; margin: 0.5rem; height: 500px; ${media.mobile` height: calc(100vh - 16rem); `} overflow: scroll; ` const Subscriber = styled.div` display: flex; flex-direction: column; margin: 0, auto; color: ${oc.gray[9]}; .header { margin: 12px; font-size: 16px; } .body { display: flex; flex-direction: row; flex:1; margin: 6px; .left { width: 80px; text-align: center; font-size: 18px; color: ${oc.gray[6]}; } .right { display: flex; flex-direction: column; flex:1; .data { flex:1; font-size: 12px; margin: 4px; } } } ` const Pdn = styled.div` display: flex; flex-direction: column; margin: 0 auto; color: ${oc.gray[9]}; .header { margin: 12px; font-size: 16px; } .body { display: flex; flex-direction: row; flex:1; margin: 0px 32px; .small_data { width: 50px; font-size: 12px; margin: 4px; } .medium_data { width: 80px; font-size: 12px; margin: 4px; } .large_data { width: 140px; font-size: 12px; margin: 4px; } } ` const View = ({ visible, disableOnClickOutside, subscriber, onEdit, onDelete, onHide }) => { const imsi = (subscriber || {}).imsi; const security = ((subscriber || {}).security || {}); const ambr = ((subscriber || {}).ambr || {}); const pdns = ((subscriber || {}).pdn || []); return (
{imsi}
onEdit(imsi)}> onDelete(imsi)}>
Subscriber Configuration
{security.k} K
{security.opc &&
{security.opc} OPc
} {security.op &&
{security.op} OP
}
{security.amf} AMF
{security.rand &&
{security.rand} RAND
} {security.sqn &&
{security.sqn} SQN
}
{ambr.downlink} Kbps UL
{ambr.uplink} Kbps DL
APN Configrations
APN
QCI
ARP
Capability
Vulnerablility
MBR DL/UL(Kbps)
GBR DL/UL(Kbps)
PGW IP
{pdns.map(pdn =>
{pdn.apn}
{pdn.qos.qci}
{pdn.qos.arp.priority_level}
{pdn.qos.arp.pre_emption_capability === 1 ? "Disabled" : "Enabled"}
{pdn.qos.arp.pre_emption_vulnerability === 1 ? "Disabled" : "Enabled"}
{pdn['ambr'] === undefined ?
unlimited/unlimited
:
{pdn.ambr['downlink'] === undefined ? "unlimited" : pdn.ambr.downlink} / {pdn.ambr['uplink'] === undefined ? "unlimited" : pdn.ambr.uplink}
}
{(pdn.pgw || {}).addr}
{(pdn.pgw || {}).addr6}
{pdn['pcc_rule'] !== undefined && pdn.pcc_rule.map((pcc_rule, index) =>
{pcc_rule.qos.qci}
{pcc_rule.qos.arp.priority_level}
{pcc_rule.qos.arp.pre_emption_capability === 1 ? "Disabled" : "Enabled"}
{pcc_rule.qos.arp.pre_emption_vulnerability === 1 ? "Disabled" : "Enabled"}
{pcc_rule.qos['mbr'] === undefined ?
unlimited/unlimited
:
{pcc_rule.qos.mbr['downlink'] === undefined ? "unlimited" : pcc_rule.qos.mbr.downlink} / {pcc_rule.qos.mbr['uplink'] === undefined ? "unlimited" : pcc_rule.qos.mbr.uplink}
} {pcc_rule.qos['gbr'] === undefined ?
unlimited/unlimited
:
{pcc_rule.qos.gbr['downlink'] === undefined ? "unlimited" : pcc_rule.qos.gbr.downlink} / {pcc_rule.qos.gbr['uplink'] === undefined ? "unlimited" : pcc_rule.qos.gbr.uplink}
}
{pcc_rule['flow'] !== undefined && pcc_rule.flow.map((flow, index) =>
{flow.direction == 1 && "Downlink"} {flow.direction == 2 && "Uplink"}
{flow.description}
) }
) }
)}
) } export default View; nextepc-0.3.10/webui/src/components/Subscriber/index.js000066400000000000000000000002351333553357400231130ustar00rootroot00000000000000import List from './List'; import Search from './Search'; import Edit from './Edit'; import View from './View'; export { List, Search, Edit, View };nextepc-0.3.10/webui/src/components/index.js000066400000000000000000000017161333553357400210150ustar00rootroot00000000000000import Layout from './Base/Layout'; import Header from './Base/Header'; import Sidebar from './Base/Sidebar'; import Login from './Base/Login'; import Logout from './Base/Logout'; import Modal from './Shared/Modal'; import CircleIcon from './Shared/CircleIcon'; import Dimmed from './Shared/Dimmed'; import Spinner from './Shared/Spinner'; import FloatingButton from './Shared/FloatingButton'; import Tooltip from './Shared/Tooltip'; import Blank from './Shared/Blank'; import Button from './Shared/Button'; import withRipple from './Shared/withRipple'; import Form from './Shared/Form'; import Confirm from './Shared/Confirm'; import * as Subscriber from './Subscriber'; import * as Profile from './Profile'; import * as Account from './Account'; export { Layout, Header, Sidebar, Login, Logout, Modal, CircleIcon, Dimmed, Spinner, FloatingButton, Tooltip, Blank, Button, withRipple, Form, Confirm, Subscriber, Profile, Account } nextepc-0.3.10/webui/src/containers/000077500000000000000000000000001333553357400173235ustar00rootroot00000000000000nextepc-0.3.10/webui/src/containers/Account/000077500000000000000000000000001333553357400207175ustar00rootroot00000000000000nextepc-0.3.10/webui/src/containers/Account/Collection.js000066400000000000000000000107741333553357400233610ustar00rootroot00000000000000import { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { MODEL, fetchAccounts, deleteAccount } from 'modules/crud/account'; import { clearActionStatus } from 'modules/crud/actions'; import { select, selectActionStatus } from 'modules/crud/selectors'; import * as Notification from 'modules/notification/actions'; import { Layout, Account, Spinner, FloatingButton, Blank, Dimmed, Confirm } from 'components'; import Document from './Document'; class Collection extends Component { state = { document: { action: '', visible: false, dimmed: false }, confirm: { visible: false, username: '' }, }; componentWillMount() { const { accounts, dispatch } = this.props if (accounts.needsFetch) { dispatch(accounts.fetch) } } componentWillReceiveProps(nextProps) { const { accounts, status } = nextProps const { dispatch } = this.props if (accounts.needsFetch) { dispatch(accounts.fetch) } if (status.response) { dispatch(Notification.success({ title: 'Account', message: `${status.id} has been deleted` })); dispatch(clearActionStatus(MODEL, 'delete')); } if (status.error) { let title = 'Unknown Code'; let message = 'Unknown Error'; if (response.data && response.data.name && response.data.message) { title = response.data.name; message = response.data.message; } else { title = response.status; message = response.statusText; } dispatch(Notification.error({ title, message, autoDismiss: 0, action: { label: 'Dismiss' } })); dispatch(clearActionStatus(MODEL, 'delete')); } } documentHandler = { show: (action, payload) => { this.setState({ document: { action, visible: true, dimmed: true, ...payload } }) }, hide: () => { this.setState({ document: { action: '', visible: false, dimmed: false }, }) }, actions: { create: () => { this.documentHandler.show('create'); }, update: (username) => { this.documentHandler.show('update', { username }); } } } confirmHandler = { show: (username) => { this.setState({ confirm: { visible: true, username, } }) }, hide: () => { this.setState({ confirm: { ...this.state.confirm, visible: false } }) }, actions : { delete: () => { const { dispatch } = this.props if (this.state.confirm.visible === true) { this.confirmHandler.hide(); this.documentHandler.hide(); dispatch(deleteAccount(this.state.confirm.username)); } } } } render() { const { handleSearchChange, handleSearchClear, documentHandler, confirmHandler } = this; const { document } = this.state; const { session, accounts, status } = this.props const { username, roles } = session.user; const { isLoading, data } = accounts; return ( {isLoading && } {roles.indexOf('admin') !== -1 && } ) } } Collection = connect( (state) => ({ accounts: select(fetchAccounts(), state.crud), status: selectActionStatus(MODEL, state.crud, 'delete') }) )(Collection); export default Collection; nextepc-0.3.10/webui/src/containers/Account/Document.js000066400000000000000000000130301333553357400230300ustar00rootroot00000000000000import { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import NProgress from 'nprogress'; import { MODEL, fetchAccounts, fetchAccount, createAccount, updateAccount } from 'modules/crud/account'; import { clearActionStatus } from 'modules/crud/actions'; import { select, selectActionStatus } from 'modules/crud/selectors'; import * as Notification from 'modules/notification/actions'; import { Account } from 'components'; import traverse from 'traverse'; import crypto from 'crypto'; const formData = { "roles": [ "user" ], } class Document extends Component { static propTypes = { action: PropTypes.string, visible: PropTypes.bool, onHide: PropTypes.func } state = { formData } componentWillMount() { const { account, dispatch } = this.props if (account.needsFetch) { dispatch(account.fetch) } } componentWillReceiveProps(nextProps) { const { account, status } = nextProps const { dispatch, action, onHide } = this.props if (account.needsFetch) { dispatch(account.fetch) } if (account.data) { this.setState({ formData: account.data }) } else { this.setState({ formData }); } if (status.response) { NProgress.configure({ parent: 'body', trickleSpeed: 5 }); NProgress.done(true); const message = action === 'create' ? "New account created" : `${status.id} account updated`; dispatch(Notification.success({ title: 'Account', message })); dispatch(clearActionStatus(MODEL, action)); onHide(); } if (status.error) { NProgress.configure({ parent: 'body', trickleSpeed: 5 }); NProgress.done(true); const response = ((status || {}).error || {}).response || {}; let title = 'Unknown Code'; let message = 'Unknown Error'; if (response.data && response.data.name && response.data.message) { title = response.data.name; message = response.data.message; } else { title = response.status; message = response.statusText; } dispatch(Notification.error({ title, message, autoDismiss: 0, action: { label: 'Dismiss', callback: () => onHide() } })); dispatch(clearActionStatus(MODEL, action)); } } validate = (formData, errors) => { const { accounts, action, status } = this.props; const { username, password1, password2 } = formData; if (action === 'create' && accounts && accounts.data && accounts.data.filter(account => account.username === username).length > 0) { errors.username.addError(`'${username}' is duplicated`); } if (action === 'create') { if (password1 === undefined) { errors.password1.addError(`is required`); } if (password2 === undefined) { errors.password2.addError(`is required`); } } if (password1 != password2) { if (Object.keys(errors.password1.__errors).length == 0) errors.password1.addError(`is not matched`); if (Object.keys(errors.password2.__errors).length == 0) errors.password2.addError(`is not matched`); } return errors; } generatePassword = function(password, cb) { crypto.randomBytes(32, function(randomBytesErr, buf) { if (randomBytesErr) { return cb(randomBytesErr); } var salt = buf.toString('hex'); crypto.pbkdf2(password, salt, 25000, 512, 'sha256', function(pbkdf2Err, hashRaw) { if (pbkdf2Err) { return cb(pbkdf2Err); } var hash = new Buffer(hashRaw, 'binary').toString('hex'); cb(null, salt, hash); }); }); }; submit = (formData) => { const { dispatch, action } = this.props; NProgress.configure({ parent: '#nprogress-base-form', trickleSpeed: 5 }); NProgress.start(); if (action === 'create') { dispatch(createAccount({}, formData)); } else if (action === 'update') { dispatch(updateAccount(formData.username, {}, formData)); } else { throw new Error(`Action type '${action}' is invalid.`); } } handleSubmit = (formData) => { if (formData.password1 === undefined) { this.submit(formData); } else { this.generatePassword(formData.password1, (err, salt, hash) => { if (err) throw err formData = Object.assign(formData, { salt, hash, }) this.submit(formData); }) } } handleError = errors => { const { dispatch } = this.props; errors.map(error => dispatch(Notification.error({ title: 'Validation Error', message: error.stack })) ) } render() { const { validate, handleSubmit, handleError } = this; const { session, visible, action, status, account, onHide } = this.props return ( ) } } Document = connect( (state, props) => ({ accounts: select(fetchAccounts(), state.crud), account: select(fetchAccount(props.username), state.crud), status: selectActionStatus(MODEL, state.crud, props.action) }) )(Document); export default Document; nextepc-0.3.10/webui/src/containers/Account/index.js000066400000000000000000000001571333553357400223670ustar00rootroot00000000000000import Collection from './Collection'; import Document from './Document'; export { Collection, Document };nextepc-0.3.10/webui/src/containers/App.js000066400000000000000000000033731333553357400204070ustar00rootroot00000000000000import { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { bindActionCreators, compose } from 'redux'; import * as sidebarActions from 'modules/sidebar'; import withWidth, { SMALL } from 'helpers/with-width'; import { Layout } from 'components'; import Notification from 'containers/Notification'; import * as Subscriber from 'containers/Subscriber'; import * as Profile from 'containers/Profile'; import * as Account from 'containers/Account'; class App extends Component { static propTypes = { session: PropTypes.object.isRequired, view: PropTypes.string.isRequired, width: PropTypes.number.isRequired } componentWillMount() { const { width, SidebarActions } = this.props; if (width !== SMALL) { SidebarActions.setVisibility(true); } } render() { const { view, session } = this.props; if (view === "subscriber") { document.body.style.backgroundColor = "#e9ecef"; } else { document.body.style.backgroundColor = "white"; } return ( ) } } const enhance = compose( withWidth(), connect( (state) => ({ view: state.sidebar.view }), (dispatch) => ({ SidebarActions: bindActionCreators(sidebarActions, dispatch) }) ) ); export default enhance(App); nextepc-0.3.10/webui/src/containers/Auth.js000066400000000000000000000045731333553357400205730ustar00rootroot00000000000000import { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import Router from 'next/router'; import NProgress from 'nprogress'; import Session from 'modules/auth/session'; import { Login } from 'components'; class Auth extends Component { state = { error: null, form: { username: '', password: '' }, session: {} }; static async getInitialProps({req}) { const session = new Session({req}) return {session: await session.getSession(true)} } async componentDidMount() { const session = new Session() this.setState({ session: await session.getSession(true) }); this.input.focus(); } setInnerRef = (comp) => { this.input = comp; } handleChange = (e) => { this.setState({ form: { ...this.state.form, [e.target.name]: e.target.value } }); } handleKeyPress = (e) => { if (e.charCode === 13) { this.handleSubmit(); } } handleSubmit = (e) => { const { username, password } = this.state.form; const { loginRequest } = this.props; NProgress.configure({ parent: '#nprogress-base-login', trickleSpeed: 5 }); NProgress.start(); const session = new Session() session.signin(username, password) .then(() => { NProgress.configure({ parent: 'body', trickleSpeed: 5 }); NProgress.done(); Router.push('/'); }) .catch(err => { NProgress.configure({ parent: 'body', trickleSpeed: 5 }); NProgress.done(); this.setState({ error: { message: err.message } }); this.input.focus(); }) } handleErrorReset = (e) => { this.setState({ error: null }); } render() { const { form, error } = this.state; const { setInnerRef, handleChange, handleSubmit, handleKeyPress, handleErrorReset } = this; return ( ); } } export default Auth;nextepc-0.3.10/webui/src/containers/Header.js000066400000000000000000000033611333553357400210540ustar00rootroot00000000000000import { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { bindActionCreators } from 'redux'; import * as sidebarActions from 'modules/sidebar'; import Session from 'modules/auth/session'; import { Header, Logout, Dimmed } from 'components'; class HeaderContainer extends Component { state = { logout: { visible: false, dimmed: false } }; logoutHandler = { show: () => { this.setState({ logout: { visible: true, dimmed: true } }) }, hide: () => { this.setState({ logout: { visible: false, dimmed: false } }) }, logout: async () => { this.setState({ logout: { visible: false, } }) const session = new Session() await session.signout() // @FIXME next/router not working reliably so using window.location window.location = '/' } }; handleSidebarToggle = () => { const { SidebarActions } = this.props; SidebarActions.toggle(); } render() { const { handleSidebarToggle, logoutHandler } = this; const { logout } = this.state; return (
) } } HeaderContainer = connect( null, (dispatch) => ({ SidebarActions: bindActionCreators(sidebarActions, dispatch) }) )(HeaderContainer); export default HeaderContainer;nextepc-0.3.10/webui/src/containers/Notification.js000066400000000000000000000030341333553357400223070ustar00rootroot00000000000000import { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import NotificationSystem from 'react-notification-system'; import * as actions from 'modules/notification/actions'; class Notification extends Component { componentWillReceiveProps(nextProps) { const { dispatch } = this.props; const { notifications } = nextProps; const notificationIds = notifications.map(notification => notification.uid); const systemNotifications = this.system.state.notifications || []; if (notifications.length > 0) { systemNotifications.forEach(notification => { if (notificationIds.indexOf(notification.uid) < 0) { this.system.removeNotification(notification.uid); } }); notifications.forEach(notification => { this.system.addNotification({ ...notification, onRemove: () => { dispatch(actions.hide(notification.uid)); notification.onRemove && notification.onRemove(); } }); }); } if ((this.props.notifications !== notifications) && notifications.length === 0) { this.system.clearNotifications(); } } shouldComponentUpdate(nextProps) { return this.props !== nextProps; } render() { const { notifications, ...rest} = this.props; return this.system = ref} { ...rest } /> } } Notification = connect( (state) => ({ notifications: state.notifications }) )(Notification); export default Notification;nextepc-0.3.10/webui/src/containers/Profile/000077500000000000000000000000001333553357400207235ustar00rootroot00000000000000nextepc-0.3.10/webui/src/containers/Profile/Collection.js000066400000000000000000000133651333553357400233640ustar00rootroot00000000000000import { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { MODEL, fetchProfiles, deleteProfile } from 'modules/crud/profile'; import { clearActionStatus } from 'modules/crud/actions'; import { select, selectActionStatus } from 'modules/crud/selectors'; import * as Notification from 'modules/notification/actions'; import { Layout, Profile, Spinner, FloatingButton, Blank, Dimmed, Confirm } from 'components'; import Document from './Document'; class Collection extends Component { state = { document: { action: '', visible: false, dimmed: false }, confirm: { visible: false, _id: '' }, view: { visible: false, disableOnClickOutside: false, _id: '' } }; componentWillMount() { const { profiles, dispatch } = this.props if (profiles.needsFetch) { dispatch(profiles.fetch) } } componentWillReceiveProps(nextProps) { const { profiles, status } = nextProps const { dispatch } = this.props if (profiles.needsFetch) { dispatch(profiles.fetch) } if (status.response) { dispatch(Notification.success({ title: 'Profile', // message: `${status.id} has been deleted` message: `This profile has been deleted` })); dispatch(clearActionStatus(MODEL, 'delete')); } if (status.error) { let title = 'Unknown Code'; let message = 'Unknown Error'; if (response.data && response.data.name && response.data.message) { title = response.data.name; message = response.data.message; } else { title = response.status; message = response.statusText; } dispatch(Notification.error({ title, message, autoDismiss: 0, action: { label: 'Dismiss' } })); dispatch(clearActionStatus(MODEL, 'delete')); } } documentHandler = { show: (action, payload) => { this.setState({ document: { action, visible: true, dimmed: true, ...payload }, view: { ...this.state.view, disableOnClickOutside: true } }) }, hide: () => { this.setState({ document: { action: '', visible: false, dimmed: false }, view: { ...this.state.view, disableOnClickOutside: false } }) }, actions: { create: () => { this.documentHandler.show('create'); }, update: (_id) => { this.documentHandler.show('update', { _id }); } } } confirmHandler = { show: (_id) => { this.setState({ confirm: { visible: true, _id, }, view: { ...this.state.view, disableOnClickOutside: true } }) }, hide: () => { this.setState({ confirm: { ...this.state.confirm, visible: false }, view: { ...this.state.view, disableOnClickOutside: false } }) }, actions : { delete: () => { const { dispatch } = this.props if (this.state.confirm.visible === true) { this.confirmHandler.hide(); this.documentHandler.hide(); this.viewHandler.hide(); dispatch(deleteProfile(this.state.confirm._id)); } } } } viewHandler = { show: (_id) => { this.setState({ view: { _id, visible: true, disableOnClickOutside: false } }); }, hide: () => { this.setState({ view: { ...this.state.view, visible: false } }) } } render() { const { documentHandler, viewHandler, confirmHandler } = this; const { document } = this.state; const { profiles, status } = this.props const { isLoading, data } = profiles; return ( {isLoading && } 0)} title="ADD A PROFILE" body="You have no profiles... yet!" onTitle={documentHandler.actions.create} /> profile._id === this.state.view._id)[0]} disableOnClickOutside={this.state.view.disableOnClickOutside} onEdit={documentHandler.actions.update} onDelete={confirmHandler.show} onHide={viewHandler.hide}/> ) } } Collection = connect( (state) => ({ profiles: select(fetchProfiles(), state.crud), status: selectActionStatus(MODEL, state.crud, 'delete') }) )(Collection); export default Collection; nextepc-0.3.10/webui/src/containers/Profile/Document.js000066400000000000000000000144271333553357400230470ustar00rootroot00000000000000import { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import NProgress from 'nprogress'; import { MODEL, fetchProfiles, fetchProfile, createProfile, updateProfile } from 'modules/crud/profile'; import { clearActionStatus } from 'modules/crud/actions'; import { select, selectActionStatus } from 'modules/crud/selectors'; import * as Notification from 'modules/notification/actions'; import { Profile } from 'components'; import traverse from 'traverse'; const formData = { "security": { k: "465B5CE8 B199B49F AA5F0A2E E238A6BC", amf: "8000", op_value: "E8ED289D EBA952E4 283B54E8 8E6183CA", }, "ambr": { "downlink": 1024000, "uplink": 1024000 }, "pdn": [ { "apn": "internet", "qos": { "qci": 9, "arp": { "priority_level": 8, "pre_emption_capability": 1, "pre_emption_vulnerability": 1 } }, } ] } class Document extends Component { static propTypes = { action: PropTypes.string, visible: PropTypes.bool, onHide: PropTypes.func } state = { formData } componentWillMount() { const { profile, dispatch } = this.props if (profile.needsFetch) { dispatch(profile.fetch) } } componentWillReceiveProps(nextProps) { const { profile, status } = nextProps const { dispatch, action, onHide } = this.props if (profile.needsFetch) { dispatch(profile.fetch) } if (profile.data) { // Mongoose library has a problem for 64bit-long type // // FETCH : the library returns 'Number' type for 64bit-long type // CREATE/UPDATE : the library returns 'String' type for 64bit-long type // // In this case, I cannot avoid json-schema validation function // So, I've changed the type from 'String' to 'Number' if the key name is 'downlink' and 'uplink' // // The followings are changed from 'String' to 'Number' after DB CREATE or UPDATE // - ambr.downlink, ambr.uplink, qos.mbr.downlink, qos.mbr.uplink, qos.gbr.downlink, qos.gbr.uplink // traverse(profile.data).forEach(function(x) { if (this.key == 'downlink') this.update(Number(x)); if (this.key == 'uplink') this.update(Number(x)); }) if (profile.data.security) { if (profile.data.security.opc) { profile.data.security.op_type = 0; profile.data.security.op_value = profile.data.security.opc; } else { profile.data.security.op_type = 1; profile.data.security.op_value = profile.data.security.op; } } this.setState({ formData: profile.data }) } else { this.setState({ formData }); } if (status.response) { NProgress.configure({ parent: 'body', trickleSpeed: 5 }); NProgress.done(true); // const message = action === 'create' ? "New profile created" : `${status.id} profile updated`; const message = action === 'create' ? "New profile created" : `This profile updated`; dispatch(Notification.success({ title: 'Profile', message })); dispatch(clearActionStatus(MODEL, action)); onHide(); } if (status.error) { NProgress.configure({ parent: 'body', trickleSpeed: 5 }); NProgress.done(true); const response = ((status || {}).error || {}).response || {}; let title = 'Unknown Code'; let message = 'Unknown Error'; if (response.data && response.data.name && response.data.message) { title = response.data.name; message = response.data.message; } else { title = response.status; message = response.statusText; } dispatch(Notification.error({ title, message, autoDismiss: 0, action: { label: 'Dismiss', callback: () => onHide() } })); dispatch(clearActionStatus(MODEL, action)); } } validate = (formData, errors) => { const { profiles, action, status } = this.props; if (formData.pdn) { let apns = formData.pdn.map(pdn => { return pdn.apn } ) let duplicates = {}; for (let i = 0; i < apns.length; i++) { if (duplicates.hasOwnProperty(apns[i])) { duplicates[apns[i]].push(i); } else if (apns.lastIndexOf(apns[i]) !== i) { duplicates[apns[i]] = [i]; } } for (let key in duplicates) { duplicates[key].forEach(index => errors.pdn[index].apn.addError(`'${key}' is duplicated`)); } } return errors; } handleSubmit = (formData) => { const { dispatch, action } = this.props; if (formData.security) { if (formData.security.op_type === 1) { formData.security.op = formData.security.op_value; formData.security.opc = null; } else { formData.security.op = null; formData.security.opc = formData.security.op_value; } } NProgress.configure({ parent: '#nprogress-base-form', trickleSpeed: 5 }); NProgress.start(); if (action === 'create') { dispatch(createProfile({}, formData)); } else if (action === 'update') { dispatch(updateProfile(formData._id, {}, formData)); } else { throw new Error(`Action type '${action}' is invalid.`); } } handleError = errors => { const { dispatch } = this.props; errors.map(error => dispatch(Notification.error({ title: 'Validation Error', message: error.stack })) ) } render() { const { validate, handleSubmit, handleError } = this; const { visible, action, status, profile, onHide } = this.props return ( ) } } Document = connect( (state, props) => ({ profiles: select(fetchProfiles(), state.crud), profile: select(fetchProfile(props._id), state.crud), status: selectActionStatus(MODEL, state.crud, props.action) }) )(Document); export default Document; nextepc-0.3.10/webui/src/containers/Profile/index.js000066400000000000000000000001571333553357400223730ustar00rootroot00000000000000import Collection from './Collection'; import Document from './Document'; export { Collection, Document };nextepc-0.3.10/webui/src/containers/Sidebar.js000066400000000000000000000023421333553357400212330ustar00rootroot00000000000000import { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { bindActionCreators, compose } from 'redux'; import withWidth, { SMALL } from 'helpers/with-width'; import * as sidebarActions from 'modules/sidebar'; import { Sidebar } from 'components'; class SidebarContainer extends Component { static propTypes = { width: PropTypes.number.isRequired, isOpen: PropTypes.bool.isRequired, view: PropTypes.string.isRequired } handleSelectView = (view) => { const { width, SidebarActions } = this.props; SidebarActions.selectView(view); if (width === SMALL) { SidebarActions.toggle(); } } render() { const { isOpen, view } = this.props; const { handleSelectView } = this; return ( ) } } const enhance = compose( withWidth(), connect( (state) => ({ isOpen: state.sidebar.isOpen, view: state.sidebar.view }), (dispatch) => ({ SidebarActions: bindActionCreators(sidebarActions, dispatch) }) ) ); export default enhance(SidebarContainer);nextepc-0.3.10/webui/src/containers/Subscriber/000077500000000000000000000000001333553357400214265ustar00rootroot00000000000000nextepc-0.3.10/webui/src/containers/Subscriber/Collection.js000066400000000000000000000143331333553357400240630ustar00rootroot00000000000000import { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { MODEL, fetchSubscribers, deleteSubscriber } from 'modules/crud/subscriber'; import { clearActionStatus } from 'modules/crud/actions'; import { select, selectActionStatus } from 'modules/crud/selectors'; import * as Notification from 'modules/notification/actions'; import { Layout, Subscriber, Spinner, FloatingButton, Blank, Dimmed, Confirm } from 'components'; import Document from './Document'; class Collection extends Component { state = { search: '', document: { action: '', visible: false, dimmed: false }, confirm: { visible: false, imsi: '' }, view: { visible: false, disableOnClickOutside: false, imsi: '' } }; componentWillMount() { const { subscribers, dispatch } = this.props if (subscribers.needsFetch) { dispatch(subscribers.fetch) } } componentWillReceiveProps(nextProps) { const { subscribers, status } = nextProps const { dispatch } = this.props if (subscribers.needsFetch) { dispatch(subscribers.fetch) } if (status.response) { dispatch(Notification.success({ title: 'Subscriber', message: `${status.id} has been deleted` })); dispatch(clearActionStatus(MODEL, 'delete')); } if (status.error) { let title = 'Unknown Code'; let message = 'Unknown Error'; if (response.data && response.data.name && response.data.message) { title = response.data.name; message = response.data.message; } else { title = response.status; message = response.statusText; } dispatch(Notification.error({ title, message, autoDismiss: 0, action: { label: 'Dismiss' } })); dispatch(clearActionStatus(MODEL, 'delete')); } } handleSearchChange = (e) => { this.setState({ search: e.target.value }); } handleSearchClear = (e) => { this.setState({ search: '' }); } documentHandler = { show: (action, payload) => { this.setState({ document: { action, visible: true, dimmed: true, ...payload }, view: { ...this.state.view, disableOnClickOutside: true } }) }, hide: () => { this.setState({ document: { action: '', visible: false, dimmed: false }, view: { ...this.state.view, disableOnClickOutside: false } }) }, actions: { create: () => { this.documentHandler.show('create'); }, update: (imsi) => { this.documentHandler.show('update', { imsi }); } } } confirmHandler = { show: (imsi) => { this.setState({ confirm: { visible: true, imsi, }, view: { ...this.state.view, disableOnClickOutside: true } }) }, hide: () => { this.setState({ confirm: { ...this.state.confirm, visible: false }, view: { ...this.state.view, disableOnClickOutside: false } }) }, actions : { delete: () => { const { dispatch } = this.props if (this.state.confirm.visible === true) { this.confirmHandler.hide(); this.documentHandler.hide(); this.viewHandler.hide(); dispatch(deleteSubscriber(this.state.confirm.imsi)); } } } } viewHandler = { show: (imsi) => { this.setState({ view: { imsi, visible: true, disableOnClickOutside: false } }); }, hide: () => { this.setState({ view: { ...this.state.view, visible: false } }) } } render() { const { handleSearchChange, handleSearchClear, documentHandler, viewHandler, confirmHandler } = this; const { search, document } = this.state; const { subscribers, status } = this.props const { isLoading, data } = subscribers; return ( {Object.keys(data).length > 0 && } {isLoading && } 0)} title="ADD A SUBSCRIBER" body="You have no subscribers... yet!" onTitle={documentHandler.actions.create} /> subscriber.imsi === this.state.view.imsi)[0]} disableOnClickOutside={this.state.view.disableOnClickOutside} onEdit={documentHandler.actions.update} onDelete={confirmHandler.show} onHide={viewHandler.hide}/> ) } } Collection = connect( (state) => ({ subscribers: select(fetchSubscribers(), state.crud), status: selectActionStatus(MODEL, state.crud, 'delete') }) )(Collection); export default Collection;nextepc-0.3.10/webui/src/containers/Subscriber/Document.js000066400000000000000000000155171333553357400235530ustar00rootroot00000000000000import { Component } from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import NProgress from 'nprogress'; import { MODEL, fetchSubscribers, fetchSubscriber, createSubscriber, updateSubscriber } from 'modules/crud/subscriber'; import { fetchProfiles } from 'modules/crud/profile'; import { clearActionStatus } from 'modules/crud/actions'; import { select, selectActionStatus } from 'modules/crud/selectors'; import * as Notification from 'modules/notification/actions'; import { Subscriber } from 'components'; import traverse from 'traverse'; const formData = { "security": { k: "465B5CE8 B199B49F AA5F0A2E E238A6BC", amf: "8000", op_value: "E8ED289D EBA952E4 283B54E8 8E6183CA", }, "ambr": { "downlink": 1024000, "uplink": 1024000 }, "pdn": [ { "apn": "internet", "qos": { "qci": 9, "arp": { "priority_level": 8, "pre_emption_capability": 1, "pre_emption_vulnerability": 1 } }, } ] } class Document extends Component { static propTypes = { action: PropTypes.string, visible: PropTypes.bool, onHide: PropTypes.func } state = { formData } componentWillMount() { const { subscriber, profiles, dispatch } = this.props if (subscriber.needsFetch) { dispatch(subscriber.fetch) } if (profiles.needsFetch) { dispatch(profiles.fetch) } } componentWillReceiveProps(nextProps) { const { subscriber, profiles, status } = nextProps const { dispatch, action, onHide } = this.props if (subscriber.needsFetch) { dispatch(subscriber.fetch) } if (profiles.needsFetch) { dispatch(profiles.fetch) } if (subscriber.data) { // Mongoose library has a problem for 64bit-long type // // FETCH : the library returns 'Number' type for 64bit-long type // CREATE/UPDATE : the library returns 'String' type for 64bit-long type // // In this case, I cannot avoid json-schema validation function // So, I've changed the type from 'String' to 'Number' if the key name is 'downlink' and 'uplink' // // The followings are changed from 'String' to 'Number' after DB CREATE or UPDATE // - ambr.downlink, ambr.uplink, qos.mbr.downlink, qos.mbr.uplink, qos.gbr.downlink, qos.gbr.uplink // traverse(subscriber.data).forEach(function(x) { if (this.key == 'downlink') this.update(Number(x)); if (this.key == 'uplink') this.update(Number(x)); }) if (subscriber.data.security) { if (subscriber.data.security.opc) { subscriber.data.security.op_type = 0; subscriber.data.security.op_value = subscriber.data.security.opc; } else { subscriber.data.security.op_type = 1; subscriber.data.security.op_value = subscriber.data.security.op; } } this.setState({ formData: subscriber.data }) } else { this.setState({ formData }); } if (status.response) { NProgress.configure({ parent: 'body', trickleSpeed: 5 }); NProgress.done(true); const message = action === 'create' ? "New subscriber created" : `${status.id} subscriber updated`; dispatch(Notification.success({ title: 'Subscriber', message })); dispatch(clearActionStatus(MODEL, action)); onHide(); } if (status.error) { NProgress.configure({ parent: 'body', trickleSpeed: 5 }); NProgress.done(true); const response = ((status || {}).error || {}).response || {}; let title = 'Unknown Code'; let message = 'Unknown Error'; if (response.data && response.data.name && response.data.message) { title = response.data.name; message = response.data.message; } else { title = response.status; message = response.statusText; } dispatch(Notification.error({ title, message, autoDismiss: 0, action: { label: 'Dismiss', callback: () => onHide() } })); dispatch(clearActionStatus(MODEL, action)); } } validate = (formData, errors) => { const { subscribers, action, status } = this.props; const { imsi } = formData; if (action === 'create' && subscribers && subscribers.data && subscribers.data.filter(subscriber => subscriber.imsi === imsi).length > 0) { errors.imsi.addError(`'${imsi}' is duplicated`); } if (formData.pdn) { let apns = formData.pdn.map(pdn => { return pdn.apn } ) let duplicates = {}; for (let i = 0; i < apns.length; i++) { if (duplicates.hasOwnProperty(apns[i])) { duplicates[apns[i]].push(i); } else if (apns.lastIndexOf(apns[i]) !== i) { duplicates[apns[i]] = [i]; } } for (let key in duplicates) { duplicates[key].forEach(index => errors.pdn[index].apn.addError(`'${key}' is duplicated`)); } } return errors; } handleSubmit = (formData) => { const { dispatch, action } = this.props; if (formData.security) { if (formData.security.op_type === 1) { formData.security.op = formData.security.op_value; formData.security.opc = null; } else { formData.security.op = null; formData.security.opc = formData.security.op_value; } } NProgress.configure({ parent: '#nprogress-base-form', trickleSpeed: 5 }); NProgress.start(); if (action === 'create') { dispatch(createSubscriber({}, formData)); } else if (action === 'update') { dispatch(updateSubscriber(formData.imsi, {}, formData)); } else { throw new Error(`Action type '${action}' is invalid.`); } } handleError = errors => { const { dispatch } = this.props; errors.map(error => dispatch(Notification.error({ title: 'Validation Error', message: error.stack })) ) } render() { const { validate, handleSubmit, handleError } = this; const { visible, action, status, subscriber, profiles, onHide } = this.props return ( ) } } Document = connect( (state, props) => ({ subscribers: select(fetchSubscribers(), state.crud), subscriber: select(fetchSubscriber(props.imsi), state.crud), profiles: select(fetchProfiles(), state.crud), status: selectActionStatus(MODEL, state.crud, props.action) }) )(Document); export default Document;nextepc-0.3.10/webui/src/containers/Subscriber/index.js000066400000000000000000000001571333553357400230760ustar00rootroot00000000000000import Collection from './Collection'; import Document from './Document'; export { Collection, Document };nextepc-0.3.10/webui/src/helpers/000077500000000000000000000000001333553357400166205ustar00rootroot00000000000000nextepc-0.3.10/webui/src/helpers/style-utils.js000066400000000000000000000021251333553357400214540ustar00rootroot00000000000000import {css, keyframes} from 'styled-components'; export const media = ({ desktop: (...args) => css` @media (max-width: 1200px) { ${ css(...args) } } `, tablet: (...args) => css` @media (max-width: 992px) { ${ css(...args) } } `, mobile: (...args) => css` @media (max-width: 768px) { ${ css(...args) } } ` }); export const transitions = { slideDown: keyframes` 0% { opacity: 0; transform: translateY(-100vh); } 75% { opacity: 1; transform: translateY(50px); } 100% { transform: translateY(0px); } `, slideUp: keyframes` 0% { transform: translateY(0px); opacity: 1; } 25% { opacity: 1; transform: translateY(50px); } 100% { opacity: 0; transform: translateY(-100vh); } `, stretchOut: keyframes` 0% { transform: scale(0.25,0.25); } 100% { transform: scale(1,1); } `, shrinkIn: keyframes` 0% { transform: scale(1, 1); } 100% { transform: scale(0.25,0.25); } ` } nextepc-0.3.10/webui/src/helpers/with-session.js000066400000000000000000000012231333553357400216100ustar00rootroot00000000000000import React from 'react'; import Session from 'modules/auth/session'; export default (Component) => class extends React.Component { static async getInitialProps (ctx) { const session = new Session({req: ctx.req}); let initialProps = {}; if (Component.getInitialProps) { initialProps = Component.getInitialProps({...ctx, session}); } const sessionData = await session.getSession(); let isLoggedIn = false; if (sessionData.user && sessionData.user.username) { isLoggedIn = true; } return {session: sessionData, isLoggedIn, ...initialProps}; } render () { return } }nextepc-0.3.10/webui/src/helpers/with-width.js000066400000000000000000000037401333553357400212520ustar00rootroot00000000000000import React, {Component} from 'react'; import EventListener from 'react-event-listener'; export const SMALL = 1; export const MEDIUM = 2; export const LARGE = 3; export default function withWidth(options = {}) { const { largeWidth = 992, mediumWidth = 768, resizeInterval = 166, // Corresponds to 10 frames at 60 Hz. } = options; return (MyComponent) => { return class WithWidth extends Component { state = { width: null, }; componentDidMount() { this.updateWidth(); } componentWillUnmount() { clearTimeout(this.deferTimer); } handleResize = () => { clearTimeout(this.deferTimer); this.deferTimer = setTimeout(() => { this.updateWidth(); }, resizeInterval); }; updateWidth() { const innerWidth = window.innerWidth; let width; if (innerWidth >= largeWidth) { width = LARGE; } else if (innerWidth >= mediumWidth) { width = MEDIUM; } else { // innerWidth < 768 width = SMALL; } if (width !== this.state.width) { this.setState({ width: width, }); } } render() { const width = this.state.width; /** * When rendering the component on the server, * we have no idea about the screen width. * In order to prevent blinks and help the reconciliation * we are not rendering the component. * * A better alternative would be to send client hints. * But the browser support of this API is low: * http://caniuse.com/#search=client%20hint */ if (width === null) { return null; } return ( ); } }; }; } nextepc-0.3.10/webui/src/modules/000077500000000000000000000000001333553357400166265ustar00rootroot00000000000000nextepc-0.3.10/webui/src/modules/auth/000077500000000000000000000000001333553357400175675ustar00rootroot00000000000000nextepc-0.3.10/webui/src/modules/auth/session.js000066400000000000000000000102071333553357400216100ustar00rootroot00000000000000/** * A class to handle signing in and out and caching session data in sessionStore * * Note: We use XMLHttpRequest() here rather than fetch because fetch() uses * Service Workers and they cannot share cookies with the browser session * yet (!) so if we tried to get or pass the CSRF token it would mismatch. */ import axios from 'axios'; const authApi = (method, url, csrf, data) => { return axios({ baseURL: '/api/auth', headers: { 'X-CSRF-TOKEN': csrf }, method, url, data }); } export default class Session { constructor({req} = {}) { this.session = {} try { if (req) { // If running on server we can access the server side environment this.session = { csrfToken: req.connection._httpMessage.locals._csrf } if (req.user) { this.session.user = req.user } } else { // If running on client, attempt to load session from localStorage this.session = this.getLocalStore('session') } } catch (err) { console.log(err); } } static async getCsrfToken() { return new Promise((resolve, reject) => { if (typeof window === 'undefined') { return reject(Error('This method should only be called on the client')) } authApi( 'get', '/csrf' ).then( response => resolve(response.data.csrfToken) ).catch( error => reject(Error('Unexpected response when trying to get CSRF token')) ) }) } async getSession(forceUpdate) { if (typeof window === 'undefined') { return new Promise(resolve => { resolve(this.session) }) } if (forceUpdate === true) { this.session = {} this.removeLocalStore('session') } this.session = this.getLocalStore('session') if (this.session && Object.keys(this.session).length > 0 && this.session.expires && this.session.expires > Date.now()) { return new Promise(resolve => { resolve(this.session) }) } return new Promise((resolve, reject) => { authApi( 'get', '/session' ).then( response => { this.session = response.data; this.session.expires = Date.now() + this.session.clientMaxAge this.saveLocalStore('session', this.session) resolve(this.session) } ).catch( error => reject(Error('XMLHttpRequest failed: Unable to get session')) ) }) } async signin(username, password) { return new Promise(async (resolve, reject) => { if (typeof window === 'undefined') { return reject(Error('This method should only be called on the client')) } const csrf = await Session.getCsrfToken() authApi( 'post', '/login', csrf, { username, password } ).then( async response => { if (response.status !== 200) { return reject(Error('XMLHttpRequest error: Unable to login')) } this.session = await this.getSession(true) resolve(true) } ).catch( error => reject(Error('Incorrect username or password.')) ) }) } async signout() { return new Promise(async (resolve, reject) => { if (typeof window === 'undefined') { return reject(Error('This method should only be called on the client')) } // We aren't checking for success, just completion await authApi('post', '/logout', this.session.csrfToken) this.session = await this.getSession(true) resolve(true) }) } // The Web Storage API is widely supported, but not always available (e.g. // it can be restricted in private browsing mode, triggering an exception). // We handle that silently by just returning null here. getLocalStore(name) { try { return JSON.parse(localStorage.getItem(name)) } catch (err) { return null } } saveLocalStore(name, data) { try { localStorage.setItem(name, JSON.stringify(data)) return true } catch (err) { return false } } removeLocalStore(name) { try { localStorage.removeItem(name) return true } catch (err) { return false } } } nextepc-0.3.10/webui/src/modules/crud/000077500000000000000000000000001333553357400175635ustar00rootroot00000000000000nextepc-0.3.10/webui/src/modules/crud/account.js000066400000000000000000000016621333553357400215620ustar00rootroot00000000000000import { fetchCollection, fetchDocument, createDocument, updateDocument, deleteDocument } from './actions' export const MODEL = 'accounts'; export const URL = '/Account'; export const fetchAccounts = (params = {}) => { return fetchCollection(MODEL, URL, params, { idProperty: 'username' }); } export const fetchAccount = (username, params = {}) => { return fetchDocument(MODEL, username, `${URL}/${username}`, params, { idProperty: 'username' }); } export const createAccount = (params = {}, data = {}) => { return createDocument(MODEL, URL, params, data, { idProperty: 'username' }); } export const updateAccount = (username, params = {}, data = {}) => { return updateDocument(MODEL, username, `${URL}/${username}`, params, data, { idProperty: 'username' }); } export const deleteAccount = (username, params = {}) => { return deleteDocument(MODEL, username, `${URL}/${username}`, params, { idProperty: 'username' }); } nextepc-0.3.10/webui/src/modules/crud/actions.js000066400000000000000000000051261333553357400215650ustar00rootroot00000000000000export const CRUD = { FETCH: 'crud/FETCH', FETCH_SUCCESS: 'crud/FETCH_SUCCESS', FETCH_FAILURE: 'crud/FETCH_FAILURE', FETCH_ONE: 'crud/FETCH_ONE', FETCH_ONE_SUCCESS: 'crud/FETCH_ONE_SUCCESS', FETCH_ONE_FAILURE: 'crud/FETCH_ONE_FAILURE', CREATE: 'crud/CREATE', CREATE_SUCCESS: 'crud/CREATE_SUCCESS', CREATE_FAILURE: 'crud/CREATE_FAILURE', UPDATE: 'crud/UPDATE', UPDATE_SUCCESS: 'crud/UPDATE_SUCCESS', UPDATE_FAILURE: 'crud/UPDATE_FAILURE', DELETE: 'crud/DELETE', DELETE_SUCCESS: 'crud/DELETE_SUCCESS', DELETE_FAILURE: 'crud/DELETE_FAILURE', CLEAR_ACTION_STATUS: 'crud/CLEAR_ACTION_STATUS', }; export const fetchCollection = (model, url, params = {}, options = {}) => { const idProperty = options.idProperty || '_id'; return { type: CRUD.FETCH, meta: { success: CRUD.FETCH_SUCCESS, failure: CRUD.FETCH_FAILURE, model, idProperty, params }, payload: { method: 'get', url, params } } } export const fetchDocument = (model, id, url, params = {}, options = {}) => { const idProperty = options.idProperty || '_id'; return { type: CRUD.FETCH_ONE, meta: { success: CRUD.FETCH_ONE_SUCCESS, failure: CRUD.FETCH_ONE_FAILURE, model, idProperty, id }, payload: { method: 'get', url, params } } } export const createDocument = (model, url, params = {}, data = {}, options = {}) => { const idProperty = options.idProperty || '_id'; return { type: CRUD.CREATE, meta: { success: CRUD.CREATE_SUCCESS, failure: CRUD.CREATE_FAILURE, model, idProperty, }, payload: { method: 'post', url, params, data } } } export const updateDocument = (model, id, url, params = {}, data = {}, options = {}) => { const idProperty = options.idProperty || '_id'; return { type: CRUD.UPDATE, meta: { success: CRUD.UPDATE_SUCCESS, failure: CRUD.UPDATE_FAILURE, model, idProperty, id }, payload: { method: 'patch', url, params, data } } } export const deleteDocument = (model, id, url, params = {}, options = {}) => { const idProperty = options.idProperty || '_id'; return { type: CRUD.DELETE, meta: { success: CRUD.DELETE_SUCCESS, failure: CRUD.DELETE_FAILURE, model, idProperty, id }, payload: { method: 'delete', url, params } } } export const clearActionStatus = (model, action) => { return { type: CRUD.CLEAR_ACTION_STATUS, payload: { model, action } } }nextepc-0.3.10/webui/src/modules/crud/profile.js000066400000000000000000000013711333553357400215630ustar00rootroot00000000000000import { fetchCollection, fetchDocument, createDocument, updateDocument, deleteDocument } from './actions' export const MODEL = 'profiles'; export const URL = '/Profile'; export const fetchProfiles = (params = {}) => { return fetchCollection(MODEL, URL, params); } export const fetchProfile = (_id, params = {}) => { return fetchDocument(MODEL, _id, `${URL}/${_id}`, params); } export const createProfile = (params = {}, data = {}) => { return createDocument(MODEL, URL, params, data); } export const updateProfile = (_id, params = {}, data = {}) => { return updateDocument(MODEL, _id, `${URL}/${_id}`, params, data); } export const deleteProfile = (_id, params = {}) => { return deleteDocument(MODEL, _id, `${URL}/${_id}`, params); } nextepc-0.3.10/webui/src/modules/crud/reducers.js000066400000000000000000000202131333553357400217330ustar00rootroot00000000000000import { CRUD } from './actions'; import { fromJS, toJS } from 'immutable'; import { isEqual } from 'lodash/lang'; const byIdInitialState = fromJS({}); const collectionInitialState = fromJS({ params: {}, otherInfo: {}, ids: [], fetchedAt: null, error: null }); const collectionsInitialState = fromJS([]); const actionStatusInitialState = fromJS({ create: {}, update: {}, delete: {} }); const modelInitialState = fromJS({ byId: byIdInitialState, collections: collectionsInitialState, actionStatus: actionStatusInitialState }); const initialState = fromJS({}); function byIdReducer(state = byIdInitialState, action) { const idProperty = action.meta ? action.meta.idProperty : '_id'; const id = action.meta ? action.meta.id : undefined; switch(action.type) { case CRUD.FETCH_SUCCESS: const data = state.toJS(); action.payload.data.forEach((document) => { data[document[idProperty]] = { document, fetchedAt: action.meta.fetchedAt, error: null } }) return fromJS(data); case CRUD.FETCH_ONE: return state.setIn([id, 'fetchedAt'], 0) .setIn([id, 'error'], null) case CRUD.FETCH_ONE_SUCCESS: return state.setIn([id, 'fetchedAt'], action.meta.fetchedAt) .setIn([id, 'error'], null) .setIn([id, 'document'], fromJS(action.payload.data)) case CRUD.FETCH_ONE_FAILURE: return state.setIn([id, 'fetchedAt'], action.meta.fetchedAt) .setIn([id, 'error'], action.payload) .setIn([id, 'document'], null) case CRUD.CREATE_SUCCESS: return state.set(action.payload.data[idProperty], fromJS({ document: action.payload.data, fetchedAt: action.meta.fetchedAt, error: null })) case CRUD.UPDATE: return state.setIn([id, 'fetchedAt'], 0); case CRUD.UPDATE_SUCCESS: return state.set(id, fromJS({ document: action.payload.data, fetchedAt: action.meta.fetchedAt, error: null })) case CRUD.DELETE_SUCCESS: return state.delete(id) default: return state; } } function collectionReducer(state = collectionInitialState, action) { switch(action.type) { case CRUD.FETCH: return state.set('params', fromJS(action.meta.params)) .set('fetchedAt', 0) .set('error', null); case CRUD.FETCH_SUCCESS: const idProperty = action.meta ? action.meta.idProperty : '_id'; const data = action.payload.data; const ids = data.map((document) => document[idProperty]); return state.set('params', fromJS(action.meta.params)) .set('ids', fromJS(ids)) .set('otherInfo', fromJS(action.payload).delete('data')) .set('error', null) .set('fetchedAt', action.meta.fetchedAt); case CRUD.FETCH_FAILURE: return state.set('params', fromJS(action.meta.params)) .set('error', action.payload); default: return state; } } function collectionsReducer(state = collectionsInitialState, action) { switch(action.type) { case CRUD.FETCH: case CRUD.FETCH_SUCCESS: case CRUD.FETCH_FAILURE: const index = state.findIndex(collection => ( isEqual(collection.toJS().params, action.meta.params) )); if (index < 0) { return state.push(collectionReducer(undefined, action)); } return state.update(index, s => collectionReducer(s, action)); case CRUD.CREATE_SUCCESS: const idProperty = action.meta ? action.meta.idProperty : '_id'; /* At this point, the ID is stored in the 0-index collection. Later you will need to find the collection to which you want to add the ID. */ return state.update(0, item => ( item.set('ids', item.get('ids').push(action.payload.data[idProperty])) )) case CRUD.DELETE_SUCCESS: const id = action.meta ? action.meta.id : undefined; /* Find ID from all collections and delete them if they exist. */ return state.map((item, idx) => ( item.set('ids', item.get('ids').filter(x => x !== id)) )) default: return state; } } function actionStatusReducer(state = actionStatusInitialState, action) { const idProperty = action.meta ? action.meta.idProperty : '_id'; const id = action.meta ? action.meta.id : undefined; switch(action.type) { case CRUD.CLEAR_ACTION_STATUS: return state.set(action.payload.action, fromJS({})) case CRUD.CREATE: return state.set('create', fromJS({ pending: true, id: null })) case CRUD.CREATE_SUCCESS: return state.set('create', fromJS({ pending: false, id: action.payload.data[idProperty], isSuccess: !action.error, payload: action.payload })) case CRUD.CREATE_FAILURE: return state.set('create', fromJS({ pending: false, id: null, isSuccess: !action.error, payload: action.payload })) case CRUD.UPDATE: return state.set('update', fromJS({ pending: true, id: id })) case CRUD.UPDATE_SUCCESS: case CRUD.UPDATE_FAILURE: return state.set('update', fromJS({ pending: false, id: id, isSuccess: !action.error, payload: action.payload })) case CRUD.DELETE: return state.set('delete', fromJS({ pending: true, id: id })) case CRUD.DELETE_SUCCESS: case CRUD.DELETE_FAILURE: return state.set('delete', fromJS({ pending: false, id: id, isSuccess: !action.error, payload: action.payload })) default: return state; } } function crud(state = initialState, action) { switch(action.type) { case CRUD.FETCH: case CRUD.FETCH_SUCCESS: case CRUD.FETCH_FAILURE: return state.updateIn([action.meta.model, 'byId'], (s) => byIdReducer(s, action)) .updateIn([action.meta.model, 'collections'], (s) => collectionsReducer(s, action)) case CRUD.FETCH_ONE: case CRUD.FETCH_ONE_SUCCESS: case CRUD.FETCH_ONE_FAILURE: return state.updateIn([action.meta.model, 'byId'], (s) => byIdReducer(s, action)) case CRUD.CREATE: case CRUD.CREATE_FAILURE: return state.updateIn([action.meta.model, 'actionStatus'], (s) => actionStatusReducer(s, action)) case CRUD.CREATE_SUCCESS: return state.updateIn([action.meta.model, 'byId'], (s) => byIdReducer(s, action)) .updateIn([action.meta.model, 'collections'], fromJS([]), (s) => collectionsReducer(s, action)) .updateIn([action.meta.model, 'actionStatus'], (s) => actionStatusReducer(s, action)) case CRUD.UPDATE: case CRUD.UPDATE_SUCCESS: return state.updateIn([action.meta.model, 'byId'], (s) => byIdReducer(s, action)) .updateIn([action.meta.model, 'actionStatus'], (s) => actionStatusReducer(s, action)) case CRUD.UPDATE_FAILURE: return state.updateIn([action.meta.model, 'actionStatus'], (s) => actionStatusReducer(s, action)) case CRUD.DELETE: case CRUD.DELETE_FAILURE: return state.updateIn([action.meta.model, 'actionStatus'], (s) => actionStatusReducer(s, action)) case CRUD.DELETE_SUCCESS: return state.updateIn([action.meta.model, 'byId'], (s) => byIdReducer(s, action)) .updateIn([action.meta.model, 'collections'], fromJS([]), (s) => collectionsReducer(s, action)) .updateIn([action.meta.model, 'actionStatus'], (s) => actionStatusReducer(s, action)) case CRUD.CLEAR_ACTION_STATUS: return state.updateIn([action.payload.model, 'actionStatus'], (s) => actionStatusReducer(s, action)) default: return state; } } export default crud;nextepc-0.3.10/webui/src/modules/crud/sagas.js000066400000000000000000000033121333553357400212160ustar00rootroot00000000000000import axios from 'axios'; import { all, takeEvery, put, call, take, fork } from 'redux-saga/effects'; import { CRUD } from './actions'; import Session from 'modules/auth/session'; const crudApi = (method, url, csrf, { params, data } = {} ) => { return axios({ baseURL: '/api/db', headers: { 'X-CSRF-TOKEN': csrf }, method, url, params, data }); } function* crudEntity(action) { const { method, url, params, data } = action.payload; const { success, failure } = action.meta; const meta = { ...action.meta, fetchedAt: Date.now() } try { const sessionData = new Session(); const csrf = ((sessionData || {}).session || {}).csrfToken; const response = yield call(crudApi, method, url, csrf, { params, data }) yield put({ meta, type: success, payload: response }) } catch (error) { yield put({ meta, type: failure, payload: error, error: true }) } } function* watchFetch() { while(true) { const action = yield take(CRUD.FETCH); yield fork(crudEntity, action); } } function* watchFetchOne() { while(true) { const action = yield take(CRUD.FETCH_ONE); yield fork(crudEntity, action); } } function* watchCreate() { while(true) { const action = yield take(CRUD.CREATE); yield fork(crudEntity, action); } } function* watchUpdate() { while(true) { const action = yield take(CRUD.UPDATE); yield fork(crudEntity, action); } } function* watchDelete() { while(true) { const action = yield take(CRUD.DELETE); yield fork(crudEntity, action); } } export default function* () { yield all([ fork(watchFetch), fork(watchFetchOne), fork(watchCreate), fork(watchUpdate), fork(watchDelete) ]) } nextepc-0.3.10/webui/src/modules/crud/selectors.js000066400000000000000000000066541333553357400221370ustar00rootroot00000000000000import { fromJS, Map, List } from 'immutable'; import { isEqual } from 'lodash/lang'; import { CRUD } from './actions'; function recent(fetchedAt) { if (fetchedAt === null) return false; const interval = 10 * 60 * 1000; // 10 minutes return ((Date.now() - interval) < fetchedAt); } export function selectCollection(modelName, crud, params) { const model = crud.getIn([modelName], Map()); const collection = model.get('collections', List()).find(collection => ( isEqual(collection.get('params').toJS(), params) )); const isLoading = ({ needsFetch }) => ({ otherInfo: {}, data: [], isLoading: true, ...(collection ? { error: collection.get('error') } : {}), needsFetch }); if (collection === undefined) { return isLoading({ needsFetch: true }); } const fetchedAt = collection.get('fetchedAt'); if (fetchedAt === 0) { return isLoading({ needsFetch: false }); } else if (!recent(fetchedAt)) { return isLoading({ needsFetch: true }); } let documentThatNeedsFetch = null; collection.get('ids', fromJS([])).forEach((id) => { const document = model.getIn(['byId', id], Map()); const documentFetchedAt = document.get('fetchedAt'); if (documentFetchedAt !== 0 && !recent(document.get('fetchedAt'))) { documentThatNeedsFetch = document; return false; } }) if (documentThatNeedsFetch) { return isLoading({ needsFetch: true }); } const data = collection.get('ids', fromJS([])).map((id) => model.getIn(['byId', id, 'document']) ).toJS(); return { otherInfo: collection.get('otherInfo', Map()).toJS(), data, isLoading: false, needsFetch: false, ...(collection ? { error: collection.get('error') } : {}) } } export function selectDocument(modelName, id, crud, params) { const model = crud.getIn([modelName, 'byId', id]); if (model && model.get('fetchedAt') === 0) { return { isLoading: true, needsFetch: false, error: new Error('Loading...') } } if (id === undefined || model == undefined || !recent(model.get('fetchedAt'))) { return { isLoading: true, needsFetch: true, error: new Error('Loading...') } } if (model.get('error') !== null) { return { isLoading: false, needsFetch: false, error: model.get('error') } } return { isLoading: false, needsFetch: false, data: model.get('document').toJS() } } export function select(action, crud) { const model = action.meta.model; const params = action.meta.params; let selection = {}; switch (action.type) { case CRUD.FETCH: selection = selectCollection(model, crud, params); break; case CRUD.FETCH_ONE: if (action.meta.id === undefined) { return selection; } selection = selectDocument(model, action.meta.id, crud, params); break; default: throw new Error(`Action type '${action.type}' is not a fetch action.`); } selection.fetch = action; return selection; } export function selectActionStatus(modelName, crud, action) { const rawStatus = (crud.getIn([modelName, 'actionStatus', action]) || fromJS({})).toJS(); const { pending = false, id = null, isSuccess = null, payload = null } = rawStatus; if (pending === true) { return { id, pending } } if (isSuccess === true) { return { id, pending, response: payload } } return { id, pending, error: payload } }nextepc-0.3.10/webui/src/modules/crud/subscriber.js000066400000000000000000000016171333553357400222710ustar00rootroot00000000000000import { fetchCollection, fetchDocument, createDocument, updateDocument, deleteDocument } from './actions' export const MODEL = 'subscribers'; export const URL = '/Subscriber'; export const fetchSubscribers = (params = {}) => { return fetchCollection(MODEL, URL, params, { idProperty: 'imsi' }); } export const fetchSubscriber = (imsi, params = {}) => { return fetchDocument(MODEL, imsi, `${URL}/${imsi}`, params, { idProperty: 'imsi' }); } export const createSubscriber = (params = {}, data = {}) => { return createDocument(MODEL, URL, params, data, { idProperty: 'imsi' }); } export const updateSubscriber = (imsi, params = {}, data = {}) => { return updateDocument(MODEL, imsi, `${URL}/${imsi}`, params, data, { idProperty: 'imsi' }); } export const deleteSubscriber = (imsi, params = {}) => { return deleteDocument(MODEL, imsi, `${URL}/${imsi}`, params, { idProperty: 'imsi' }); } nextepc-0.3.10/webui/src/modules/notification/000077500000000000000000000000001333553357400213145ustar00rootroot00000000000000nextepc-0.3.10/webui/src/modules/notification/actions.js000066400000000000000000000014361333553357400233160ustar00rootroot00000000000000export const NOTIFICATION = { SHOW: 'notification/SHOW', HIDE: 'notification/HIDE', CLEAR: 'notification/CLEAR', } export function show(opts = {}, level = 'success') { return { type: NOTIFICATION.SHOW, ...opts, uid: opts.uid || Date.now(), position: opts.position || 'bc', autoDismiss: opts.autoDismiss === undefined ? 2 : opts.autoDismiss, level }; } export function success(opts) { return show(opts, 'success'); } export function error(opts) { return show(opts, 'error'); } export function warning(opts) { return show(opts, 'warning'); } export function info(opts) { return show(opts, 'info'); } export function hide(uid) { return { type: NOTIFICATION.HIDE, uid }; } export function clear() { return { type: NOTIFICATION.CLEAR }; } nextepc-0.3.10/webui/src/modules/notification/reducers.js000066400000000000000000000010141333553357400234620ustar00rootroot00000000000000import { NOTIFICATION } from './actions'; const initialState = []; function notifications(state = initialState, action) { switch(action.type) { case NOTIFICATION.SHOW: const { type, ...rest } = action; return [ ...state, { ...rest, uid: action.uid } ]; case NOTIFICATION.HIDE: return state.filter(notification => { return notification.uid !== action.uid; }); case NOTIFICATION.CLEAR: return []; } return state; } export default notifications; nextepc-0.3.10/webui/src/modules/reducers.js000066400000000000000000000003551333553357400210030ustar00rootroot00000000000000import { combineReducers } from 'redux'; import crud from './crud/reducers'; import sidebar from './sidebar'; import notifications from './notification/reducers'; export default combineReducers({ crud, sidebar, notifications }); nextepc-0.3.10/webui/src/modules/sagas.js000066400000000000000000000002341333553357400202610ustar00rootroot00000000000000import { all, fork } from 'redux-saga/effects'; import crud from './crud/sagas'; export default function* rootSaga() { yield all([ fork(crud) ]) } nextepc-0.3.10/webui/src/modules/sidebar/000077500000000000000000000000001333553357400202375ustar00rootroot00000000000000nextepc-0.3.10/webui/src/modules/sidebar/index.js000066400000000000000000000017201333553357400217040ustar00rootroot00000000000000import { createAction } from 'redux-actions'; import { handleActions } from 'redux-actions'; export const SIDEBAR = { TOGGLE: 'sidebar/TOGGLE', SET_VISIBILITY: 'sidebar/SET_VISIBILITY', SELECT_VIEW: 'sidebar/SELECT_VIEW' } /* UIAction.toggleSidebar payload : null UIAction.setSidebarVisibiliy payload : { isOpen } UIAction.selectView payload : { view } */ export const toggle = createAction(SIDEBAR.TOGGLE); export const setVisibility = createAction(SIDEBAR.SET_VISIBILITY); export const selectView = createAction(SIDEBAR.SELECT_VIEW); const initialState = { isOpen: false, view: "subscriber" } export default handleActions({ [SIDEBAR.TOGGLE]: (state, action) => ({ ...state, isOpen: !state.isOpen }), [SIDEBAR.SET_VISIBILITY]: (state, action) => ({ ...state, isOpen: action.payload }), [SIDEBAR.SELECT_VIEW]: (state, action) => ({ ...state, view: action.payload }) }, initialState); nextepc-0.3.10/webui/src/modules/store.js000066400000000000000000000012341333553357400203200ustar00rootroot00000000000000import { createStore, applyMiddleware, compose } from 'redux'; import createSagaMiddleware from 'redux-saga'; import reducers from './reducers'; import rootSaga from './sagas'; export const initStore = () => { const composeEnhancers = process.env.NODE_ENV === 'development' && typeof window === 'object' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({ }) : compose; const sagaMiddleware = createSagaMiddleware(); const enhancer = composeEnhancers( applyMiddleware(sagaMiddleware) ); const store = createStore(reducers, enhancer); sagaMiddleware.run(rootSaga); return store; } nextepc-0.3.10/webui/static/000077500000000000000000000000001333553357400156565ustar00rootroot00000000000000nextepc-0.3.10/webui/static/css/000077500000000000000000000000001333553357400164465ustar00rootroot00000000000000nextepc-0.3.10/webui/static/css/bootstrap.min.css000066400000000000000000003545601333553357400217740ustar00rootroot00000000000000/*! * Bootstrap v3.3.7 (http://getbootstrap.com) * Copyright 2011-2016 Twitter, Inc. * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:hidden;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} /*# sourceMappingURL=bootstrap.min.css.map */nextepc-0.3.10/webui/static/css/index.css000066400000000000000000000013361333553357400202720ustar00rootroot00000000000000/* @import url('https://fonts.googleapis.com/css?family=Roboto'); */ @font-face { font-family: 'Roboto'; src: url('../fonts/Roboto-Regular.ttf') format('truetype'); } @font-face { font-family: 'Ubuntu'; src: url('../fonts/Ubuntu-Regular.ttf') format('truetype'); } html, body { margin: 0; padding: 0; box-sizing: border-box; -webkit-appearance: none; -moz-appearance: none; -o-appearance: none; -ms-appearance: none; -webkit-font-smoothing: subpixel-antialiased; -moz-font-smoothing: subpixel-antialiased; -o-font-smoothing: subpixel-antialiased; -ms-font-smoothing: subpixel-antialiased; font-family: 'Roboto', sans-serif; font-size: 16px; background: white; } * { box-sizing: inherit; } nextepc-0.3.10/webui/static/css/nprogress.css000066400000000000000000000026621333553357400212100ustar00rootroot00000000000000/* Make clicks pass-through */ #nprogress { pointer-events: none; } #nprogress .bar { background: #29d; position: fixed; z-index: 1031; top: 0; left: 0; width: 100%; height: 2px; } /* Fancy blur effect */ #nprogress .peg { display: block; position: absolute; right: 0px; width: 100px; height: 100%; box-shadow: 0 0 10px #29d, 0 0 5px #29d; opacity: 1.0; -webkit-transform: rotate(3deg) translate(0px, -4px); -ms-transform: rotate(3deg) translate(0px, -4px); transform: rotate(3deg) translate(0px, -4px); } /* Remove these to get rid of the spinner */ #nprogress .spinner { display: block; position: fixed; z-index: 1031; top: 15px; right: 15px; } #nprogress .spinner-icon { width: 18px; height: 18px; box-sizing: border-box; border: solid 2px transparent; border-top-color: #29d; border-left-color: #29d; border-radius: 50%; -webkit-animation: nprogress-spinner 400ms linear infinite; animation: nprogress-spinner 400ms linear infinite; } .nprogress-custom-parent { overflow: hidden; position: relative; } .nprogress-custom-parent #nprogress .spinner, .nprogress-custom-parent #nprogress .bar { position: absolute; } @-webkit-keyframes nprogress-spinner { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); } } @keyframes nprogress-spinner { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } nextepc-0.3.10/webui/static/favicon.ico000066400000000000000000000021761333553357400200050ustar00rootroot00000000000000 h(    Ժ䅾onnnnnnnnp䆿ԺԺwmnnmmmmmmnnmwӺ䆿mnnquvvvvuonnm䆿onnlzmnnpnnnlvmnnnnnnljkklnnnnnnnnljllmnnnnnnnnlpnnnnnnnltmnnnnnnl}~~zonnnnnnnlikkknnnnnnnnlsnnnnonnl|mnno䆿mnnxqnnm䅾ԺwmnmlllllmnnmwԺԺ䆿onnnnnnnno䆿Ժnextepc-0.3.10/webui/static/fonts/000077500000000000000000000000001333553357400170075ustar00rootroot00000000000000nextepc-0.3.10/webui/static/fonts/Roboto-Regular.ttf000066400000000000000000005172341333553357400224050ustar00rootroot00000000000000 GDEFB(bGPOS+@]GSUBY OS/2`cmapwXXFcvt +0Tfpgmw`-gasp( glyf& ;lhdmxUz`z@headjz,6hhea d$hmtxr8locaw0 maxp>  name$&postmd( prepf/\I#pH_<.R 0s l IJ 0T$33fP [ GOOG@f : dw~nieeg&rN5%L~s~~]~^~5~~~M~p~d)Hd.K/j85w?lsz-j5Nv mP10=9VH( X@y9Zm}0\_=]<}`hj[}_ _ i!+)X@q`i[i3ZXeI[fnJZFaB>{CtzzfU5P9oDzDYvN~G[_sO")"hDa]~e[7bjy*2{^Z~o^'8  qsqg>2xEMZRqd.`Pc%mzn%e)Me`,Q]W_zyBHJ*d{1> 2CP/M,Szd'Yla[. XR,(dYgx6XMdd/hMg'+V+(F   #PLqg[ .qg[$~+2uGdtgqf, Vca ~D>1qm9*),4\gojo/? Z/,O>]hi:;.9@)WYdV6+1IRyDu?ve# Fd/, o)) \04%4%@? `0$Oh<$iFWZ~RDflfY;6`z[Uv+~_"*t H]Ozh:g&TdcjYjE?:b ed>/+Ln\<n<<<<_3[5\BzPU`Br0NNc#G+ T&1g|t&( CJY\`T+c C30 g`g>?g``ur&|`A'Ot(Y$. ?GN'"(j=QN{KvP Gy 7#`_ &a&j=j^?G`30B"(>6[V:OI:dL$=|`Pn^iiP6[V:OI~~~~X>ke.Jg`;s#wv7~_pPx ;}2\[[Z[=]}`yWg9 `05%]]188888885w----vvvvv0000ZmZmZmZmZmZmZm0\=]=]=]=]j[[[[[iiii8Zm8Zm8Zm5w0\5w0\5w0\5w0\?_=]=]=]=]=]sz}`sz}`sz}`sz}`h-----j5NNWNNjjjjv[v[v[ScP _P _P _P _P _1 1 1 0i0i0i0i0i0i=+VXVXVXzNv[&(|``````|t|t|t|t+ |`|`|`|`cccc+T```JJJ C C C C&(&(&(|t|t|t|t|t|t1+ + #G#G#G8)7-=2f8V-v 19-dPc]s[!)][]zsP--j5$M8sv 5w19Zm=][}0\)=][ _R=+=+=+eg08Zm=]Z_ Y[ IvPX5w0\.-C -8Zm8ZmzN=]]7b7bC PXv[qg[qg[dMdMMMzYg6_8Zm8Zm8Zm8Z8Zm8Zm8Zm8Zm8Zm8Zm8Zm8Zm=]=]=]=]==]=]=]--v[v[v[Gv[v[v[~e[~e[~e[~e[~e[0i0i_1(zYgs[/?hs[8'.9)Pcl?~]~^~5~dsz}`j8Z9_=)- v3U0i+}?_?_hNjv }P _1 0!!=+VX2"c$gP#GT`\&(+ T&+  C+T"P`\|`&(T&?G|`+ "g`9 ` C111+ 8Zm=]                    nt ~%'0S_g~7Y #%/EOboy?M    " ' 0 3 : < D t  !!!!"!&!.!^"""""""+"H"`"e% &(1T`h7Y #&0FPcpz>M    % 0 2 9 < D t  !!!!"!&!.!["""""""+"H"`"d%eD# (%^S~|}rsolkiaYP!ߔyMߪެߞߝߖߓ߇kTQ 222tt~lt0Rb{z|  }~+,-.   ()*+,-./012345678wxLM}~NOPQRSTUyzVWXYZ{|[\]^_opv   ~xcyo{z%&&''|(01127889@ABCIJKLQRST_`a befg}h~+ 77YY  ##      "#$%%&/0014556899:=>>??@ABBCCDDEEFOPPQQRRSSTTUXY[\\]]^^_abbco pqruvwxxyyz(,159wCL}NyVXY{[_`o>?pMM r }         " % ' 0 0 2 3 9 : < < D D t t      v    !!!!!!!"!"!&!&!.!.![!^"""""""""""""+"+"H"H"`"`"d"e%%,K PXY _^-, EiD`-,*!-, F%FRX#Y Id F had%F hadRX#eY/ SXi TX!@Yi TX!@eYY:-, F%FRX#Y F jad%F jadRX#Y/-,K &PXQXD@DY!! EPXD!YY-, EiD` E}iD`-,*-,K &SX@Y &SX#!#Y &SX#!#Y &SX#!#Y &SX#!@#Y &SX%EPX#!#!%E#!#!Y!YD- ,KSXED!!Y- ,(E- ,)E- ,' SX@cTX(pY#SX TX(pYYY- ,@ ZX)D)DY- ++++:0%+H;.!+XH8(+RC4%+^M<++6,"+q]F2+w\:#+~gP9+ TE6&+ v`K6+ dN:#+ ٲc<+  +<2'+@4)+PA.!+ + E}iD?s_ss/tOtottttu?u_uussst_tttt?uou/ so s*xdNZ`V4<` ! :aaaaa:@?rUJQ~[pJ 5 0 r  a |  ( v  T  u3Xoq$?9dco 9M-a1.? P p !!B!t!!!!""{"###$`% %%&U&','''(A((),)*L*}*+L+,,l,,-Z----..?.u../+/H/e/n///0 0N0Z001,1Y112 2~23A34.4a45B556k667c788l899J9::x:;D;<<= =~=>>i>?1??@8@@A(AmAABMBBC}DDkDETE{EFFFFGRGGH?HnHI&I\IIJ JxJK&KL L|LMwMN]NOOdOP.PQNQQRTRS9ST5TURUVpVW/WuWXJYYZAZ[[a[[[\\\]]]x]]^Y^^_(_~____``[`aasaaab@bbcd9dEdQddddeNeefPfgggghhhhhhi$iiijjjjijkUkl6llmkmn`no@oop8ppppppppppppppppppqqqq2qVqzqqqqrrGrrrrs sstt+t?tuuv?vKw+wx xyyyzQ{{j||^|||}}*}}}~~M~",erˁ4ÃÅv2^}y>ĊK{ċLuԍs!dVgƐ&@?r^J͘f)i gכUv؝9,=3uJ!;ңEUܥYϦ5z%=ĩN Jd(pbv­٭IhѯP=dձoҲ 3DUh{ͳسHĵ%xٶTfʸCK3hֻ''/Z1H_x׽5Le|ؾ6Of}ٿ !8Ng}3Lcz3—/F]tÊáø-DZqĈğĶ ŦŽ.E\hƖƨƿ2=H_kwǎǥDZǽMYe|ȓȟȫ1Hazɑɨɴ2HT`lxʏʥʱʽ/F\sˊˣ˼L̳'>Ul͚̓Ͱ /Wj΁Θή%F]sۊۡ۸/7?Kbj܁ܘܤܰ 5NZfr~݊ݖݞݦݮ+DLTkނޛޣ޼6Le~ߗ߰߸ #:Pi&2>Ul0Ke~-Hco{ 8Qi !-D[t:Tk #/;Ri ,8DPg~ (+k.x!x2Kd},E^jv(4@LXz5AMYeq} %-5=EMf~ #+BJRZbjrz Z&2>JVbnzd( q 9 а а  а  EX/>YEX/>Y9999 9 9 01!!!!5!(<6 }wx^^^{ 0EX/>YEX / >Y +X!Y901#3462"&[ 7l88l7-==Z;;# / 9/а01#3#3ooxwEX / >YEX/>YEX/>YEX/>Y 9|/ +X!Yаа а / +X!Y а аааа01!##5!!5!3!33#3##!!PP ERRRREPEfb``f#bn0+iEX / >YEX"/">Y" 9  а а  +X!Y +X!Y"а"&а") +X!Y014&'&&546753#4&#"#5&&53326Xÿrw~1Q˷ӹw\~3Aѡ͍{nfycwjƋ~i &48|EX/>YEX#/#>Y а / +X!Y +X!Y#а/#* +X!Y1 +X!Y5#95/7#97/014632#"&5326554&"46  &5326554&#"'iXJGWVV;XJHVWIGYiiGNebUINffRуGOecUJOdcTBrBe'3EX / >YEX/>YEX/>Y" 9* 9"*9*"9 9 9 99 +X!Y!9 1 +X!Y01467&&54632653#'#"$2776654&#"euaBĨYokDD{aJgדz!"vvD2dLR`iuvGXRO}sBEKp{v`S0W>CYog!/9/01#3*k //0147&'y& Uu&yOTFzp4U~`qJT&*7k //01'654'77u'Xb'wEgIqv/ iPqIdaU EX/>Y/  /01%73%'J.. ).|}ZpXn[^ [N4  /а  +X!Y01!!#!5!3jj 4̯4 / +X!Yа/01'6753i^cHe% / +X!Y01!5! v EX/>Y +X!Y017462"&9r;;r9a0@@0.>>/EX/>Y01#3`}-s  ;EX / >YEX/>Y  +X!Y +X!Y01#"532'4&#"3267 m53A8 :EX/>YEX/>Y9/ +X!Y901!#5%3ٺщ]3OEX/>YEX/>Y +X!Yв9  +X!Y в901!!56654&#"#4$32!3FpUszۅ0UrձY^&{EX / >YEX/>Y 9/]q/]_r  +X!Y  а& +X!Y&9а +X!Y013665#"#4632 $5332654&'#x{jxf~2rq_,&޶s5P JEX / >YEX/>Y 9/ +X!Yа в 9 9013##!53!ʺiRm9(-dEX/>YEX / >Y +X!Y 9/ +X!Y9 а  +X!Y01!!632#"&'332654&#"J,kvyE1֫s?ֽ}5(!QEX/>YEX / >Y +X!Y 9/ +X!Y  +X!Y01#632#"55%"32654&O"sǾWS_y}AGprVDܸM%3EX/>YEX/>Y +X!Y901#!5!%YHp!+dEX/>YEX / >Y' 9'/'] +X!Y'9'9  +X!Y" +X!Y01#"&5467&&546324&"326"264&sbrrap헛mޅ4m01wv10lztoތd$[EX / >YEX/>Y 9/ 9 +X!Y +X!Y  +X!Y01#"&&546632#5366%26754&#">:`~fö$']$yzET|ሒ|6WyrTJ仙mD&sEX / >Y01)UD's EX/>Y01HzJEX/>Yа/015r2{z'/а/ +X!Y +X!Y01!5!!5!BB.KEX/>Yа/0155kVKv!SEX/>YEX / >Y +X!Y99  +X!Y в9016677654&#"#6632462"&e2MTnif|㶽ӢmI7l88l7wT_miwl[˱lQ-==Z;;j;5Bl2/EX/>Yв29/99 +X!Yа2 +X!Y*а*/# +X!Y@ +X!Y01#"'#"&766323267!"3267#"$$3232677&#" ص56JyiQP4qȴ 'Z<%>i |dQXYEX/>YEX/>Y9/ +X!Y 901!#3#!,-M|PXEX/>YEX/>Y9/ +X!Y9 +X!Y +X!Y013!2#!265!%!2654&#!tdv="~f+!z~lxmwGEX / >YEX/>Y а  +X!Y +X!Y01# 54$32#&&#"3267ɑ Ʋr64宜葴 ;EX/>YEX/>Y  +X!Y  +X!Y013!232554'$]ʦUF QEX/>YEX/>Y 9 / +X!Y +X!Y +X!Y01!!!!!!c-w,/ BEX/>YEX/>Y 9 / +X!Y +X!Y01!#!!!:c}zlEX / >YEX/>Y а  +X!Y +X!Y 9/]]?O] +X!Y01%#"$'5!2#!"3267!5!J36l5ji4Ij!w09G gEX/>YEX / >YEX/>YEX/>Y а / ] q q/ ] r +X!Y01!#!#3!3"_rwEX/>YEX/>Y01!#3w5/EX/>YEX/>Y а  +X!Y013#"&533267 w} tEX/>YEX/>YEX/>YEX / >Y9@JZjz]9]9@6FVfv ]01#33#j0})EX/>YEX/>Y +X!Y01%!!3jRYEX/>YEX/>YEX/>YEX/>YEX / >Y99 901 3###"#\P7de L 9EX/>YEX/>YEX/>YEX/>Y9901!##33#߿bgv ;EX / >YEX/>Y  +X!Y +X!Y01#"$'54$32'#"327   лӹ9iBk O 9  EX/>YEX/>Y 9 / +X!Y +X!Y01#!2#%!2654&'!iY:坑m "O#$9EX/>YEX/>Y9 +X!Y  +X!Y01%#"$'54$32'#" 7yHP  ;tVy9iBkc9EX/>YEX/>YEX / >Y9/ +X!Y 9 +X!Y01!#!2#!2654&'! Vn'Mֈ2 |Pr&d'(9EX/>YEX/>Y а +X!Y&9& +X!Yа" +X!Y01&&54$32#4&#"#"$&533264&VܖkcãGϘty}oY{f{os|u1/EX/>YEX/>Y +X!Y01!#!5!,-f=9EX/>YEX / >YEX/>Y +X!Y01"'332653"&89EX/>YEX/>YEX/>Y901%3#3P=YEX/>YEX/>YEX/>YEX / >YEX/>Y 9 9  9017373#'#3) (ɯP%oo9 kEX/>YEX / >YEX/>YEX/>Y9@ ]9@ ]9 9013##3]43.."81EX/>YEX/>YEX/>Y9013#3e| oVz FEX/>YEX/>Y +X!Y9 +X!Y 901%!!5!5!9A $// +X!Y +X!Y01#3!! yx(8/EX/>Y013#(` '// +X!Y +X!Y01!!53# zH@'9EX/>Yв9/01#3#+*)iEX/>Y +X!Y01!5!l9#/]/а/]01#3ڟ&mN(|)*9 EX/>YEX/>YEX/>Y9 9 / +X!Y 9 +X!Y # +X!Y01!&'#"&54$3354&#"#46632%2675# ( tqcsv& W#t RUasdGQXXZHWb f9/EX / >YEX/>YEX/>Y9 9  +X!Y +X!Y01#"'#36 '4&#"326 p pṒPUӑ}ËΪ,\NK9EX/>YEX/>Y +X!Yаа +X!Y01%2673#"546632#&&#">cvntٔixZ]d'ڮi#_f9/EX/>YEX / >YEX/>Y 9  9  +X!Y +X!Y014323#'#"5327&#"_쿾o oƼQS&/4t4О]Nl9EX/>YEX/>Y9/]  +X!Y +X!Y9 +X!Y01"5546632!3267"!5&&M{݁#b3qp!"MPBXʣ<e9EX/ >YEX/>YEX/>YEX/>Y +X!Y  +X!Yа013#5354632&#"3#竫@? /5Zbo ibrU`VN$"%&9" EX/>YEX/>YEX / >YEX/>Y9 9  +X!Y9 +X!Y" +X!Y0143273#"&'732655#"7327&#"`o u;`wo뺖RU&+xdWo]2џJ 9/EX/>YEX/>YEX/>Y9  +X!Y0163 #&&#"#3E{WioZ&}5up`Nh ? 9EX/>YEX/>Y а / +X!Y01!#3462"&U7l88l7:->>Z<<KY K9EX / >YEX/>Y +X!Y а/ +X!Y01!"'532654632"&K=4 4>A75688l6:ICS,?>Z<<  uEX/ >YEX/>YEX/>YEX / >Y9@:JZjz ]9@6FVfv ]01#373#tcQ[y_wd<UEX/ >YEX/>Y01!#3UxNx9EX/>YEX/>YEX/>YEX / >YEX/>YEX/>Y 9 9 +X!Y01632663 #4&#"#4#"#:wR6vdj}g C:xN`+ts{h2:NT 9EX/>YEX/>YEX/>YEX/>Y9  +X!Y0163 #&&#"#;|WioZ&:}5up`N:[4NE 9 EX/>YEX / >Y +X!Y +X!Y0146632#"532654&#"[}ߏyﺧ' 2 Dz`Np9 EX / >YEX / >YEX/>YEX/>Y 9 9  +X!Y +X!Y01#"'#3632'4&#"326q q㹜TS}xԕ_`Nm9EX/>YEX/>YEX/>YEX / >Y 9  9 +X!Y +X!Y0143273##"5327&#"_op鹝WX&)m&x1ԒN G9EX / >YEX/>YEX/>Y  +X!Y 901&#"#3632*1A[6:}_N&d '(9EX / >YEX/>Y 9  а  +X!Y +X!Y!а$ +X!Y014&$&&54632#4&#"#"&&53326qO᯸庁berjS蹂qriKSVyW\`]mU V@a9EX/>YEX/>YEX / >Yа/ +X!Y  +X!Yа013#327#"&5#536A 8IE|~@aAA :T 9EX/>YEX / >YEX/>YEX/>Y 9  +X!Y01%#"&'33273#(lѭFkE!:89EX/>YEX/>YEX/>Y901%3#3 |x?:+: ` 9EX/>YEX/>YEX / >YEX/>YEX/>Y 9 9 901%3##33JйŖƸ;4:*): SEX/>YEX / >YEX/>YEX/>Y 9 99 9013##3mmk#K:J9EX/>YEX/>YEX/>Y9  +X!Y 013#''526773Me#E2^i")~+ Len.X: FEX/>YEX/>Y +X!Y9 +X!Y 901%!!5!5!:yU4@=29 // 9/] +X!Y901&&554#5255667x&ѧ2з3sCYZBD/EX/>Y01#3Dr=29 // 9/] +X!Y9016547&55'73"&ԵA TRCs2ʼ2"D9EX/>Yаа/ +X!Y +X!Y 01#".#"4632265ﻉHJ*NTL@L_ 5$k^@ t_fM 3 9/EX / >Y +X!Y9013#"&462 7l88l7L->>Z<<i &!T"#9EX/>YEX / >Yб +X!Y ааа +X!Y01%2673#5&554753#&&#"JdƐʱiyY~"#!Ԗi#[h!"#9EX/>YEX/>Y9/_rq] +X!Y +X!Yаа ааа +X!Y01!!536675'#534632#4&#"!>M(2 Ⱦ޿oi ?nܚ[ `ݝԱk|}i[*A+,9'EX/>Yа/ +X!Y' +X!Y01%#"''7&547'7632726654&&#"Oϟhpğnf`sqqpqspΣxyğ{{z{{zyx$q9EX/>YEX / >Y 9 9/а/ +X!Y  +X!Y аааа013!!!!#!5!5!5!34D>0}|B|}M/EX/>Y+013#3Zy4D#EF9#5/EX#/#>Y#9? +X!Y?9а +X!Y0#907 +X!Y709#'а#* +X!Y01#"&'&5732654&'.547&&54$32#4&#"%&'6654&yEHpFѶ]BG 8q:ZKPK6,NTU1d89qu`Yi>0ooX1d}sbEPAPHaeEFPBReEXme/ +X!Y аа/01462"&%462"&e7l88l77l88l7[-==Z<<+->>Z<<[*9':;9'а'6EX./.>YEX6/6>Y6.9/] .69 /  ] 9 +X!Y +X!Y 96  +X!Y.' +X!Y01#"&554632#4&#"3265% $54$#"4$ #"$__[^ll^\]@sKJUӶnӤcU{qxTeۦ%"ܪZX%o&'9EX/>Y&9/в9 9 / +X!Y 9 +X!Y   +X!Y01&'#"&5463354#"'4632%2675#j Lwl|EO+XpSY"&V|gox463 gaQ{(?3^fd&Dw /а/ +X!Y01#!5!{?wZ4=6>?96 а6а6#EX/>YEX / >Y +X!Y +X!Y 9 /" 9"/""]5 "95/5]55] +X!Y(59 /а//"= +X!Y014$ #"$732$54$#"#!2#&4'&''36654&##ZKJs졠zsHXNdZXǬۦ"!Q}{A2=V&$`B6I=.9/ +X!Y01!5!.`| 1EX/>Y а /  +X!Y +X!Y014632#"&2654&#"jhhi6JJ67KKhijG9:KOlJa H /EX / >Y а  +X!Yа  +X!Y9 ]01!!#!5!3!5!lACVb BV9EX/>YEX/>Y +X!Yв9 +X!Y в901!5654&#"#46 !,m@& '(9EX/>YEX/>Y9/o]?q/]_r +X!Y 9& +X!Y&99  +X!Y0132654&#"#4632#"&5332654'# TJH?F9K|FBOCFIXf=0-:3)b{yh7[)j}~k-<<3q{#/]а/]/013#<`:Q 9EX/>YEX/>YEX/>YEX / >Y +X!Y  9013273#'#"'#Sgt> ]Q: sI+C@ + 9EX/>YEX/>Y901!#"$54$3!T  PkyI  9/ +XY01462"&9r;;r90@@0/??tMB9EX/>YEX/>Y#]9 +XY 01!#'2654&'7 OW@b 4aqk4/,* zA9EX/>YEX/>Y9/ +X!Y901#5%3cY9uz' B9EX/>Y 9 / +X!Y +X!Y014632 &5326554&#"z̾aTS_aSQ`cJ¥drseNcrnafx& jU'' EX/>Y01P''EX / >Y01o'' 21EX!/!>Y01DxM"Y #$9 /EX!/!>Y!99  +X!Y в9! +X!Y0132653#"&547765"&5462L)` tmd}֠mB7l88l7jvc%msq[ɳqN=->>-,<<W{EX/>YEX/>YEX/>Y9/ +X!Y +X!Y 9 /  +X!Y +X!Y901!!!#!!!!!!WpMNa)xYc 8/ 9 / 9 9 9в 9  017YJwIIwJwIPO{O{{Qv )h*+9а&EX/>YEX/>Y9#9#а +X!Y$а& +X!Y01#"'#7&54$3273&#"4'327 a ֔g,b4f8[yRhSB}co @] Y 9 EX/>YEX / >Y 9/ 9/  +X!Y +X!Y01!2#!#!2654&'`wi~Cޗx{j*k!+,9EX/ >YEX/>YEX/>Y 99 +X!Y 9#9( +X!Y01!#4632#"&'732654.54654&#"DϺŀKV˶Q&+15kqJWhXW볟}E3_L, ,^R4`QYT^kN|N*5=ʲ>?9.а9EX/>YEX/>YEX/>YEX/>Y9 9 / ] +X!Y 99:9:/::]! +X!Y% +X!Y(9+а / +X!Y601 '#"&5463354&#"'46326632!3277%2675#"!54&A⍧nhis2?i(y/@ H2ujPsV^Uk{nQSSOWsLyJ6nSM]4~-,+V,-9(EX/ >YEX/>Y9/9" +X!Y( +X!Y01#"&&546632&''7&'77'&&#"32654u؆ypρy0I9ﯽIh!\}g]rÍc[16d8=IG- S9а/ +X!Y +XY +XY +XY +XY01!5!462"&462"&-9r;;r99r;;r9X:0@@0/>>0@@0.??[z4&e'(9а#EX/>YEX/>Y# +X!Y!#9!а +X!Y9 014663273#"'#7&&#"4'3265[{n^I|f|hVJ|d͹aW>HfW7B'*͚#˕7o ڵoP۹`'f9 /EX / >YEX/>YEX/>Y 9 9  +X!Y +X!Y01#"'#3632'4&#"326'qq㹜TS}ʄԕ_"/EX / >YEX/>YEX/>Y]/]9/ +X!Yв 9 9а +X!Y   +X!Y01##'#"55432!5!533327&#" oƼ쿾olQS/t4/ОmEX/>YEX/>Y9/9/а +X!Yаа +X!Y а а013##!##533!3!5!#b#_""U:EX/>YEX/>Y01!#3U:?: iEX/>YEX/>YEX/>YEX / >Yа/]]/]] +X!Y 901##333#k[<3:6" ]EX / >YEX/>Y 9/а +X!Yа +X!Yа а а 01%!!573iKT}Tϝ*}*"  KEX / >YEX/>Y 9/а +X!Yааа а017#573le={=7{7K[9EX/>YEX/>YEX/>YEX/>Y  +X!Y 9901#"'73255#3=6%=3GjhKNc 9EX/>YEX/>YEX / >YEX/>Y9  +X!Y +X!Y01632#"'73254&#"#7 t˳=6#Bo}Q: :h #$%9EX / >YEX/>YEX/>YEX/>Y +X!Y9/ +X!Y +X!Y +X!Y  +X!Y01!!#"&'4632!!!!!27&#" r|F-wqfml5,aN ,4569&а0EX/>YEX / >YEX/>YEX/>Y 91 91/ +X!Y +X!Y 9 9$а* +X!Y-01466326632!327#"&'#"532654&#"%"!54&ayێ=Ap2xJ?>dž-c'udfstl~pdcq0 ζ֣} 3 9EX/ >YEX/>Y  +X!Y0136632&#";T(3 `]^ !9EX/>YEX/>Y9/  +X!Y +X!Y +X!Y01 5!5#"'763 '27!ݥ=/.dꧩYEu: XT"Kt 9EX/ >YEX/>YEX/>YEX/>Y +X!Y  +X!Yаа +X!Y01##"'73265#5356632&#"3`˨=2CAG;T&< h\x ze7%U&'9"EX / >YEX/>Y 9а  +X!Y" +X!Y01#"$'54$326653#"32 `]aϽӹ>dA=k[#U$%9EX/>YEX/>Y9 а +X!Y! +X!Y01466326653#"5326554&#"[{ψG@I|񹧍'd33 ۹M 9EX/>YEX/>YEX / >Y 9а  +X!Y016653"'33265saI ~&a9EX/>YEX / >YEX/>YEX/>Y9в9 +X!Y01#'#"&'33273>5lѭFDDkE#HlKe: )EX/>YEX/>Y  +X!Y01#"'73265e;4CAH:m h\bOh9EX/>YEX/>Y 9 / +X!Y9 +X!Y  +X!Y012'"&55!&&#"'6267!|z{IbO$tl}5}4/а/]9//в901#'#53p  /а/]9а/0173#53qU  .p /01 ' 9/]  +X!Yа/ 01 &533265إLIFOyxFONGh 9/ +X!Y01462"&7l88l7W->>Z<<y'P *9 /а/?] а01#"&4623264&#"'|[\{{{C10DC12BWuvzzV/DBbEF2O829/EX / >Y +X!Y@ /?]01!327#"&5467~:qN04 FZYg{-[VHy,hVY8{>@/а/] а / +X!Y +X!Y01#".#"'46323265>{\) ?1k:D-^,;/а/]/а/а//013#3#]mږ/~k 4/@  0@] а /@ 0 @ P ` ] ]а014632#"&72654&#"~dJGb`ILbW4F00#%2Fa`GF]^E#00#$24H//а/]01#3H&o/а/]/013#0N^t./]а/@ /?]в9 901'664HtKF[KNMٙN'jgU=P G'7//а/а//]а//01#3#3  8v/ +X!Y01462"&87l88l7->>Z<<?/а/]9/013#tp?q 8 /а/а//  +X!Yа а/013#462"&%462"&e7l88l777l88l7%-==Z<<+->>Z<<kyIx/010,EX/>YEX/>Y +X!Y01!#!0Bs0EX/>YEX/>Y +X!Y9013!%!CLgP(g#z$%9а EX/>YEX/>Y9/]]/]q +X!Y +X!Y  +X!Y01!5!#"$'54$32#"327: лѻª9iB k21EX/>YEX/>YEX/>Y901#3#fwPx! REX/>YEX/>Y +X!Yа//] +X!Y  +X!Y017!!!!!!xWWSl?9EX/>YEX/>YEX/>Y +X!Y01!#!#!2OED >EX/>YEX/>Y +X!Yа  +X!Y01!!55!!C$ϝJGMt#n $%9 а  EX/>YEX / >Y 9/в 9/ а! +X!Yа +X!Y 01#5&546767534&'66B}t²/IW" ʵZ!]9EX/>YEX/>YEX/>YEX / >Y 9/а  +X!Y 016653#&'33 ת j*q$^%&9EX/>YEX/>YEX#/#>Y +X!Y аа +X!Y!а"01%6754& !53&5546323!ኚjxxjqf3o$䴂fdwN!"#9EX/>YEX/>YEX/>YEX / >Y +X!Y 99  +X!Y +X!Y01327#"'#"55327327&#"N0J&kk̒RU:"=úM*l+,9/EX/>YEX / >Y( 9(/% +X!Y%(9 9 +X!Y  +X!Y012#"'#4664&#"32654&'#5326]bX{͵xzgkl,^mUx~ۮ[.-Â_5lk{fk4?vw.`:8 9EX/>YEX/>YEX/>Y9013#3 &'`'*a+,9"EX/ >YEX/>Y +X!Y9/( +X!Y а" +X!Y014632&#"#"5547'&&32654&'"˯|Vevۑck>}7;H>l'' #'cƈcM%r&'9EX/>YEX / >Y +X!Y а "а"//"]"]# +X!Y#"9"9 +X!Y0132653#"&547&&54632#4&#"33#vqXbʺkp0MbnQB$zIFe[JmM !9/EX/>Y +X!Yв 99 +X!Y901'6654$'&&547!5fCRQGlCb/36g[xUZaHXNE6T5U-DN-@CaNT 9EX/>YEX/>YEX/>YEX/>Y9  +X!Y01632#4&#"#8 xȾl\":Q|WN:z  9аEX / >YEX/>Y 9/_]]qq/q]/]q  +X!Y +X!Y +X!Y01#"532!54&#"! 67!%%ےL4=N,7'K: )EX/>YEX / >Y +X!Y01327#"|7@0'FI:?@ & %;R9/EX / >YEX/>Y  +X!Y 9а +X!Y01237#"&&'#'&&#'6bx!-#&$*MN>`5-/*P_3' %VPQ8. ew-Y./9/EX+/+>Y +X!Y.+9/  +X!Y.+9 +X!Y% 901&#"!3#'7654.5467&&54$32raMǐ| OhHk91LwAvp$gUۘpA%1i@=T@<>'.3Bio.*`'):^ 9EX/>YEX / >YEX/>Y +X!Y  +X!Y ааа01#327#"!##5!q6A0'FIoHr@A &_`NY9EX/>YEX / >YEX/>Y 9 +X!Y +X!Y012#"'#46632654&#"P rq̈́SuNB|ȓةeN"K#$9/EX/>YEX/>Yа +X!Y  +X!Y012#4&#"'7654&'&55466=篆o@bPcJb/1FVwNմn۳ c&`P?>U6YEX/>Y +X!Y +X!Y01!#"554667!32654&#"{z݌vٌ@/ ׷ˬQ:K 9EX/>YEX / >Y +X!Y  +X!Y а01!327#"&'!5!i+1*Lj}ui4:=9EX/>YEX/>YEX/>Y +X!Y013265&3#"&'IɁvq:y!W"L:"^#$9/EX/>YEX/>YEX/>Yа +X!Y а  +X!Y01$5474632#665&&#"le qB3Wi}3fޤR_(C:Y9 /EX/>YEX/>YEX/>YEX / >Y +X!Y а01665&3#&3zv:N96z:#[$%9EX/>YEX/>YEX/>YEX/>Y +X!Y 9в901326533265&3#"'#"7ĊrjlqqkjrÇϼU)wχ:㭦-Τuy1yy(q)*9&EX/>YEX/>Y9/ +X!Y 9 +X!Yа#а& +X!Y01#"&5732655&5463267&#"yYEX/>YEX / >Y 9  +X!Y016632&#"#&#"'632$+kWH4$ 'F$׿'C' $4GXk*cXOw<OT]J:&r'(9EX/>YEX/>YEX / >Y +X!Y9аааа  +X!Y 9$01##"'#"47#5!&'!32673326@SS@tJK`XiqqjV`0ȩ㧢*d9EX/>YEX / >Y +X!Y 9/   +X!Y +X!Yа01!632#'265&&#"#!5!aj90N㖑.Z{ !9EX / >YEX/>Y а  +X!Y 9/q]q]/]_rr +X!Y +X!Y01# 54$32#&&#"!!3267ɏ :Ʋr65嬞葴1;!w "#9 EX/>YEX/>YEX/>Y9/  +X!Y +X!Y +X!Yа01!!!#57>7!2654&'iY?(]d4 w_܉k-M9EX/>YEX/>YEX/>YEX / >Y9/ 9/ +X!Y +X!Y  +X!Y01!3!!!#3!2654&'rj2_9w⽿dzt>_9EX/>YEX/>YEX/>Y +X!Y9/  +X!Yа01!632#&&#"#!5!hhP(-Θ*> I /EX/>YEX/>YEX/>YEX / >Y +X!Y013!3!#!@2Pg ^9EX / >YEX / >Y  +X!Y 9/  +X!Y  +X!Y01!!!!!2654&'!BjB_Lݘ{2]9 /EX / >YEX/>Yа +X!Y аааа  +X!Y01#!#367!3!!!ǿw^o g kejeouT5EX / >YEX / >YEX/>YEX/>YEX/>YEX/>Yа//]] +X!Yв9 в901####33333#d<<hhxxQPj(u)*9EX / >YEX/>Y  +X!Y в% 9%/%]%q$ +X!Y$%9а +X!Y014&#"#46632#"&&533265%#5366|oô)thtge0Vgsx~ ]EX/>YEX/>YEX/>YEX/>Y9@ ] 9@ ]013##3?3Pb/O9EX/>YEX/>YEX / >Y +X!Y   +X!Y01#!#57>7Y?(]d4 P܉kMK9EX/>YEX/>YEX/>Y9  +X!Y9013#"'72?3O4Zy[O[i3&cMCta3 e4Y6S!*] +,9  а " // 9/в 9 / а +X!Y $ +X!Yа"013##5#"$$3353"33332654&#x#ּڿĘ N g < /EX/>YEX/>YEX / >Y +X!Y013!33#!_G9EX/>YEX / >YEX/>Y9/ +X!Y01##"&'3327inP[26 IEX/>YEX/>YEX/>YEX / >Y +X!Yа01!3!3!qPjU /EX/>YEX/>YEX/>YEX / >Y +X!Yаа а а01!3!33#!q _ a9 EX/>YEX / >Y 9/  +X!Y  +X!Y  +X!Y01!!2!!!2654&'[Zf[_ݘ{0 o9аEX / >YEX/>YEX/>YEX/>Y 9/  +X!Y  +X!Y01!!3!2654&'#3rj_W^ݘ{@ O 9 EX / >YEX/>Y 9/  +X!Y  +X!Y01!!3!2654&'cj_^ݘ{ !9EX/>YEX/>Yа +X!Y9/q]/qqq]/]_rr +X!Y  +X!Y01327!5!4#"#632#"$'T=Ϻ δɑ̥%!&'9!EX/>YEX / >YEX/>YEX / >Y 9/_]]O_qq/q]/]q +X!Y +X!Y" +X!Y01#"$'##336$32'#"327ڐ  лӹ*d7kYd c9 EX / >YEX/>YEX/>Y 9/ +X!Y 9  +X!Y01!!#$4$3!!!"R7loP>a((d)*9EX/ >YEX/>Y9/999 +X!Y# +X!Y012#"55766536"32654&gvݐbq|#ZU,H?}'ę):9аEX/>YEX/>Y9/]q]q/?]or +X!Y9 +X!Y +X!Y013!2#!2654#%3 '#ZXbw2ts:Ky ]VN0G:,EX/>YEX/>Y +X!Y01!#!G _:.:]9 /EX/>YEX / >Y +X!Yаа  ааа +X!Y01776!3#!#!!!@l / O]+>:EX / >YEX / >YEX/>YEX/>YEX/>YEX/>Yа/]]/]q +X!Yв9 в901####33333#낹~**0 @@XM&'(9EX / >YEX/>Y  +X!Y% 9%//%?%]%%]%%qo%%r% 9" +X!Y"%9 9 +X!Y014&#"#4632#"&5332654&##536teb챾XQijmsɽLYfEIz$@OqbN[O: EEX/>YEX/>YEX/>YEX/>Y9 9013##3H ::?: xEX/>YEX/>YEX/>YEX / >Yа/]]qq]/]or +X!Y 901##333#݇ylT3:6,:O9EX/>YEX/>YEX/>Y +X!Y  +X!Y01#!#57667J5ZN :k R: YEX/>YEX / >YEX/>YEX/>YEX / >Y 9 9 901%3###3pE$:: EX/>YEX / >YEX/>YEX/>Y а /o ] ]? q q r q ] q ]/ ]o  r +X!Y01!#!#3!32:+:9EX/>YEX/>YEX/>Y +X!Y01!#!#!e_:(:2EX/>YEX/>Y +X!Yа01!#!5!\d`i%0129 а+/EX/>YEX / >YEX/>YEX/>YEX/>Y  +X!Y# +X!Y)а.01323632#"'##"5%4&#"326%327&#"dҷU@F^ѷaEBUL{?/-C|mz:/*=z 6+# U: </EX/>YEX/>YEX / >Y +X!Y013!33#!:]](Ag;G9EX/>YEX/>YEX/>Y 9 / +X!Y01!##"&'33273zz C : IEX/>YEX/>YEX/>YEX / >Y +X!Yа01!3!3!V:]]:m:L /EX/>YEX/>YEX/>YEX / >Y +X!Yа 01!3!33#!K:]]](A:: a9 EX/>YEX / >Y 9/  +X!Y  +X!Y  +X!Y01!!#!!!2654&'ܺ6hrod:ik]Zs: o9 аEX / >YEX / >YEX/>YEX / >Y 9/ +X!Y +X!Y01!#!3#3!2654&'Vܺ6)hrod::ik]Zs: O9 EX / >YEX/>Y 9/  +X!Y  +X!Y01!#!3!2654&'Vܺ6hrod:ik]ZsdN !9EX/>YEX/>Y +X!Y9//?]]qor99 +X!Y +X!Y01"#46632#"&533267!5!&&cvjw׊fw j~V]ef0N !9 EX/>YEX/>YEX/>YEX / >Y9/]q]q/?]_or +X!Y  +X!Y +X!Y01!632#"'!#3 654&#"V  |o:):״Ʊ/: c9 EX/>YEX/>YEX/>Y9/ +X!Y9 +X!Y01#!#&&5467!!"Ǻho޺lY&gz:[&jOageK" #$9/EX/>YEX/>YEX / >Y]/]]9/!б +X!Y9  +X!Y +X!Y01!63 #"'72654&#"##5353!c{W=6#HipZ&}ܪ h\ xr`NgN !9EX/>YEX/>Y +X!Y99/r]qq]q/?]orr9 +X!Y +X!Y01%2673#"546632#&&#"!!Hcxnuؔh l xZ^c(ڮi':} !9 EX/>YEX/>YEX/>Y9/  +X!Y +X!Y +X!Y +X!Y01!!!#57667!2654&'ӷ)A6UM eurc:dZ iVQ`:~9EX/>YEX/>YEX / >YEX/>Y 9/а  +X!Y +X!Y  +X!Y01!3!#!!#3!2654&'V"ٽ6eurcc :iVQ`{ 9/EX/>YEX/>YEX/>Y]/]]9/ +X!Y9  +X!Yа01!63 #&&#"##5353!y{WioZ&4}5up`N: F/EX/>YEX/>YEX/>YEX / >Y +X!Y01!3!#!V:]d:u a!"9EX/>YEX/>YEX/>YEX/>YEX / >Y9 +X!Y01#"&'#"&'3326533265um14qrbr|ijzWYYW&{|#}}":a 9EX/>YEX / >YEX/>YEX/>YEX/>Y9 +X!Y01#"'#"&'3326533267ʮY_Χ[Sboe\Ye:'Ɣð#fuxg'gxuft9EX/ >YEX/>Y9/ +X!Y9/ а а +X!Y +X!Y01!!!#533!!2654&'Է*Aiqod::EEwda}&'(9EX/>YEX&/&>YEX/>YEX#/#>Y9/а а  +X!Y +X!Y +X!Yа!0136$32#&&#"!!32673# 5##3xƲ@&謞蓲r6WN$Dz%&9EX/>YEX$/$>YEX!/!>YEX/>Y9/]?Oqqrq]q/?]orв9  +X!Y +X!Y +X!Y9013632#&&#"!!32673#"'##3SѶh K cxngڮixZ^c0:( WEX/>YEX/>YEX/>YEX / >Y 9 / +X!Yв901####3#! JJPZI%: WEX/>YEX/>YEX/>YEX / >Y 9 / +X!Yв901####3#!'u|w/)):;YY}EX/>YEX/>YEX/>YEX/>YEX / >YEX/>Y9/а +X!Y ав901!3#####!#3!5ŖŞEYWPJJHI:EX/>YEX/>YEX/>YEX/>YEX / >YEX/>Y9/б +X!Y ааав901!3#######3!'vzu|wyѺ/y))(:;YY?!x"#9EX/>YEX/>YEX / >YEX/>Y 9/  +X!Yааа  +X!Y0132#&&'##'#"#6633!3!A| *x*x#v{|~zK:u !9EX/>YEX/>YEX/>YEX / >Y9/аб +X!Yа +X!Y0135667!#5&&###'#"3!s5 >u! ЭO ~\Fr"&&'(9&EX/>YEX / >YEX/>YEX"/">YEX/>YEX/>Y 9 / +X!Y #а ааа & +X!Y01!67!#3!!32#&&'##'#"3!ObYyx|xil|zx%u{|*;:!%&'9%EX/>YEX / >YEX/>YEX/>YEX/>YEX/>Y 9 / +X!Yа  аа "а $ +X!Y01!567!#3!!#5&&###'#3!Fs5 Koh<:"! ЭO \FPF)2*349*/./EX/>YEX/>Y +X!Y(9(/% +X!Y %(9 +X!Y.].+а+/++]*.+92014&#!5!2##&&54673665%#53 73#53ڝ+s4Jz4?r*nزg-)miB}5czy  LFv0)2.349././EX/>YEX/>Y +X!Y(9(//(]((]((qo((r% +X!Y %(9 +X!Y.+а+/++]*.+92014&'!5!2##&&5467367654%#53 73#53p'f[2K|6rC?虈ٗr CSIw$BmiB}7az0.H  g !9аEX / >YEX/>Y  +X!Y 9//]]/q]_]O_qq +X!Y +X!Y01#"$'54$32"!&27! ζª9iB  p[4N9аEX/>YEX / >Y 9/]q]q/?]q +X!Y  +X!Y +X!Y0146632#"5! 6"!&&[{ | }^':3DyG9EX/>YEX/>YEX / >Y 9 +X!Y017663"#3C!#3g.@@|v?xYEX/>YEX/>Y9  +X!Y017632&#"#3MG# <׍YEX/>Yа б +X!Yа$ +X!Y!01#5&5753'4'#55365#q#`$vvx% #ad]fd" [4%Z&'9EX/>YEX/>Yа а# +X!Yа +X!Y014753#5&56654&'#553[ԹݶFcvtebrqc'*"po kl'yͫ ba!Х"foQ,@I JK9 2а IEX/>YEX / >Yа в 9 +X!Y  +X!Y  9%а,а8а8//б- +X!Y/4а4/< +X!Y8DаIаI/012#"&'#"&'463"3265332654&##".#"#546326753ۻٻp44pؽcqrbrscpodh+P4qn(Hj@B[;UXXUJ񞝉Č|Tz:"P p$nlRPYEX / >Yа в 9 +X!Y  +X!Y 9$а+а7а7/-а-/, +X!Y-3а3/; +X!Y7CаC/HаH/012#"'#"&'463"32655332654&##".#"#546326753B_/bR]\SbopaQ]]Q,O~0ro)JmAA[;DڕKJл2ۘ|{xggu}!| R o$nlPN?hf2u u ()*9'EX/>YEX/>YEX / >YEX / >Yв 9  +X!Yа'а'/(а(/" +X!Y(%а%/01#"&'#"&'3326533265%5!!#5um14qrbr|ijzB,WYYW&{|#}}"kk}}&'(9#EX / >YEX/>YEX/>YEX/>Yа/ 9 +X!Yа %а%/&а&/  +X!Y&#а#/01#"'#"&'33265332675!!#5ʮY_Χ[Sboe\Ye,:'Ɣð#fuxg'gxuf kkuK9/EX / >YEX/>Y а  +X!Y +X!Y01#&554$32#&&#"3 ŝ|lV dNK9/EX / >YEX/>Y а  +X!Y +X!Y01#&5546632#4&#"3w׋emp&#eڵt>/EX/>Y01%#%7%73%X!DݶD%F#%H{{m}Khzg'/ +X!Y01'7!' #}lqd0/а/ +X!Yа/ +X!Y012#54#"#52>vor*-ovY +X!YEаEL +X!YаSаSZ +X!Y%а`+а`g +X!Y2а8? +X!Y01462#4&#"4632#4&#"4632#4&"4632#4&#"462#4&#"462#4&#"4632#4&"4632#4&#"stp30.3t]_uq5.,3Hu]_tp5\3t]_tp5.-3Ostp30.3Mttp30.3u]_tp5\35u]_uq5.-3ThhT.750ThgU1450 UghT147.ThhT147.ThhT.77.ThhT.750 UghT147.UggU1450,ck "'9!// //&/EX/>YEX/>YEX/>Y01#'37%%57%'%'7/ z`F: z`F Mu Z@DE&+A`B<aR |bG; |bGDEFEG+&'1BEX/>Y 01&'EX/>Y 01qw9EX / >YEX/>YEX/>Y +X!Y 9/ а а +X!Y +X!Y01!!!#5353!!2654&'Է*AiqodEwda}V9EX/>YEX/>Y9/ +X!Y 9 +X!Y01#!2'#654&'!!27'7ig~mv%XbEnn:˺pg7A[yf`#N"w#$9EX/>YEX / >YEX / >YEX/>Y9 99 +X!Y +X!Y01'#"'#3632'4&#"327'76jonnYsq q㹜TSRYEX/>Y +X!Y01#!#!3#BȹPBv//EX/>YEX/>Y +X!Y01!#!3B _:<|^ 9 /EX/>YEX/>Y +X!Y 9/   +X!Y +X!Y01!3 #'265&&###!0B<ε/a:^ 9 /EX/>YEX/>Y +X!Y 9/   +X!Y +X!Y01!32'6654&###!> lbu0xpbȆ!y:&Qa=:&QD&,Q#:&Q`cEX/>YEX / >YEX/>YEX / >Yа//]] +X!Y9а01 ###5##3333pPhhMCNr:|EX / >YEX/>YEX / >YEX/>Y а/]]q]/]or  +X!Y 9а01 ###5##33533Zw2ee*:3:6DmEX/>YEX / >YEX/>YEX / >Y9//]] +X!Y +X!Y 901##!5!33#%Vr~?>}:EX/>YEX / >YEX/>YEX / >Y а / ] ] q ]/ ]o r +X!Y +X!Y 901##!5!33#eUzkS36&,Q:&Q `EX/>YEX / >YEX/>YEX / >Yа//] +X!Y +X!Y01!!!#!#3i=">r_i: EX/>YEX / >YEX/>YEX / >Yа/o]]?qqrq]q]/]or +X!Y +X!Y01!!!#!#3K-eՙ_2:k9/EX/>YEX/>YEX/>Y9/ +X!Y +X!Y +X!Y013 #'265&&###!#!v<y2OAa:k9/EX/>YEX/>YEX/>Y9/  +X!Y +X!Y +X!Y0132'6654&###!#!"љ0|{e& }_:q(6789)EX / >YEX/>YEX/>Yа/9/  +X!Y +X!Y, +X!Y,9&,9( +X!Y3 +X!Y01"'#"$55463"327&5546632366554&#"׳u҄vF8yhvofhy}xubhycazIBBĬ"٦ a_4JHҲmO$/019%EX / >YEX/>YEX/>YEX/>Y9/   +X!Y +X!Y' +X!Y'9$ +X!Y"'$9, +X!Y01"'#"&5543"327&5463236754&"vśI].,OafIxF 9B:8 ^btsuz9&<Q):&\Q4]/EX/>YEX / >YEX/>Y +X!Yаааа  +X!Y01!5!53!!!33#!w_:M /EX/>YEX/>Y +X!Yа +X!Yа 01!5!#!33#!1](Ag&QFg_;&Q>P9EX/>YEX / >YEX / >Y 9/а +X!Y0133673##5"&'Wyxr26 !P[" ;P9EX / >YEX/>YEX/>Y9/ +X!Yа01!##5&&'33673ٺFSTE ̵C G9EX/>YEX/>YEX / >Y9/ +X!Y0133632#&&#"5.͘7L?%g&'9$EX/>YEX/>Y9/ +X!Yа а +X!Y# +X!Y01 5&&53463 !327!54&#"PW̳/@Q)[ŢZ}l]S-5Z!cN!u"#9EX / >YEX/>Y 9/] +X!Yа а +X!Y 9  +X!Y01"5&&53>32!327"!5&&xwep#oqp!0nMŒXʣ_9/EX/>YEX/>YEX/>Y9/а +X!Y +X!Y01!#333#'265&&'!d q:{ 9/EX/>YEX/>YEX/>Yа/]]q]/]qа +X!Y +X!Y01'654&'##333dp0[d]|9抒3:6/&t,:&K 9EX/>YEX/>YEX/>YEX/>Yа/_]]qoqqrqqOq]]/]?r  +X!Y +X!Y01!3#"'73265!#r<6%=AH4ng\K: 9EX/>YEX/>YEX/>YEX/>Yа/o]]?qqrq]q]/]or +X!Y +X!Y01!3#"'7265!#K񹫘<4<BH:+mh\'2:&,:&&1:&]a !9EX/>YEX/>Y 9 / +X!Y +X!Y  +X!Y01 # 5!5#"'7627!.dݥ=/!TYEu: X"h,j 9EX/>YEX / >Y +X!Yв 9/ а  +X!Y +X!Y01!5!#"&&5332654&##5vkkv{}irxiu(:] 9 /EX/>Y +X!Yв 9/ а  +X!Y +X!Y01!5!#"&&533265%#5 erބz}ɠvfqy":Kt&D&&@T;K:&O&&T]019K&<T)K:&\TWe R9 EX/>YEX/>Y9/  +X!Y  +X!Y013!"$5467!"ms=P*8Yg\ !9EX/>YEX/>Y9/ +X!Y в9 +X!Y01!"$54$7!376676'3#%!"GjXor@/={Dn8dn+,-9*EX/ >YEX/>YEX/>YEX/>Y9  +X!Y99" +X!Y( +X!Y0132336676'7#'#"5&#"327'dķj_NA)yىNlRS =MA_xнff1ޭ>6'f()9EX / >YEX!/!>Y( 9/ +X!Y  +X!Y9! +X!Y! 901536654!!5!36676'3#54&'kSAtA0uy{bEPO[ιXM@x1:'c()9EX/>YEX/>Y +X!Y9(9/ +X!Y +X!Y%901%36676'3#&'54##'36654&#!'!_pvB-縇zn}uܼX9pGWJU]J4R!` "#9/EX / >YEX/>Y" 9/ +X!Y  +X!Y9 +XY0153665!!5!3'67#&'54&#!aMjQk<wy}dFa@Hsn4~y: ` !"9/EX/>YEX/>Y!9/ +X!Y +X!Y9 +XY01'3654#!5!3'67#&'54#'lVbMiT g3gSI5La>Ht}!^Dp#e$%9EX/>YEX / >YEX/>Y +X!Y +X!Y  +X!Y 901!#57>7!32676'7"&5'Y?(]d4 _YO?).܉k`tͼff?::!e "#9EX / >YEX/>YEX/>Y  +X!Y +X!Y +X!Y 901!#57667!32676'3#"&'1A6UM ZOl{A0lxZ !`yP|yq9EX/>YEX/>YEX/>YEX/>Y +X!Y 9а/q_]]qoqqqOq]]/]r?r +X!Y0136676'7#&'!#3!]JB+{؊Beoͺbg'nM:9EX/>YEX/>YEX/>YEX/>Yа/o]]?qqrq]q]/]or +X!Y  +X!Y901!#3!336676'3#&'C\Ml|A0滧3:*!duSyv"I#$9EX / >YEX/>Y  +X!Y +X!Y 901"$'4$32&#"36676'3 ܇;bq5&{XDuϳ[[meNF 9EX/>YEX / >Y +X!Y 9 +X!Y01%6674'3#"5546632&#"Q`Zĭv֋`,cPYzrV2B:ܳ#GO9EX/>YEX/>Y +X!Yаа  +X!Y901!5!!366'7#&'%\LB+yىH`rnbgF:O9EX/>YEX/>Y +X!Yаа  +X!Y901!5!!36676'3#&'^Mqw@*蹪ct}<)r$*+9EX/>YEX / >Y +X!Y в% 9%/%]%q& +X!Y&%9а +X!Y0132653# $54%&&54$!2#4&#"3#Xϰx%­ıxtgV0eeugvu}~/K&TE,K:&TTop # /а/а/ а//013#3&5tYިPIBR[{U;_% % "FL@"Fff@ k+01!5!5!5!llkg`1x! 9EX/ >Y 9/01#546j]aHtf0G! 9EX/ >Y 9/01'6753i]aHd$; 9 / +X!Yа/01'6753i[cIvdeOg /а/01&&'5]jM_H@ah1&C<& ?$d1 9 / +X!Yа/ а / 01'6753'6753i[ci[aHl@HkF$ LEX/>YEX/>YEX / >YEX/>Y  +X!Yа01!#!5!3!$lp_vW`4~EX / >YEX / >YEX/>YEX/>YEX/>YEX/>Y +X!Y +X!Y аааа01!!#!5!!5!3!!!4jssj` v"  9/ +XY014632#"&5o\[rn^]oWpm]%WnoX/&&'XR,  9/  +X!Y014632#"&R66688666k-==--<<DW#'5CQRS9а&а(а6аIEX/>YEX/>Yа/а/а/ а /$9$/&9&/+ +X!Y2 +X!Y+9а2@а G +X!YN +X!Y014632632#"'#"&54632#"&5'326554&#"326554&#"326554&#"7MOOL ihhXJHVWIGYXIHVWIHWBXJGWVJHXeyyGxx{HBrB7OecUJOdcTJOefRJOddSNebUINfeSl /9/01#53'&sY/9/01#'َ{{;nj" //017'hhnBrB6 EX / >Y 01zT 9EX/>YEX/>YEX / >YEX/>Y 9  +X!Y0163 #&#"#Jn,{ m [h)!*+9EX/>YEX/>Y)9)/ +X!Y +X!Yа аа)а)а//] +X!Yа  +X!Y$а&01!!!536675'#53'#53'4632#4&#"!!!>M(2Ⱦ޿oi\SD[ `E}}Աk|}}6#&)EX/>YEX/>YEX / >YEX / >Y 9/а/]$а$/а/а/ +X!Yа#ааа/ а /а/ +X!Y а)ав& 9' 9013#3##!##535#533!3!'#35!%3'5#WbQa;aLwwh蘔Д(#)*9#EX/>YEX/>YEX/>YEX / >YEX/>Y +X!Y  +X!Yав!9!/ +X!Yа/' +X!Y01#327#"&5###!233332654&'#6A#4IF|~ɹybaAA &6WU#'+05:9;<99а9"а9'а9+а9-а93EX/>YEX / >YEX/>Y 9/а/а +X!Y  +X!Yа ааааааа а"а$а&а(а*а -в0 9 2в5 96в9 901333#3#####53'#5333337#37#3'#7#%7#3''Xe)fVXg)e[VHp#ql$ܮ"h7e52$˜˜$ : fEX/>YEX/>YEX / >YEX/>Y +X!Y9/  +X!Y 9/012#4&'!#3!2673eo>qg:Lx_:u~N_#$%9EX/>YEX / >Y# 9#/ +X!Y  +X!Y а#а#а//]  +X!Yаа +X!Y01!327#"#535#5332&#"!!!Qtfxx jmn"% |}#˼}#(EX / >YEX/>Y ( +X!Y$(9$/p$q$$ $] +X!Yа/pq ]  +X!Y!а!/p!q !] +X!Y аа/а$ а$ааа/01##535#535!23#3#!'!!!!2!&#!6kDm?YJT:0^p2,4^YV*iEX/>YEX / >Y +X!Yаа/а +X!Yаа/  +X!Y 901#3###'3667!7!&'!7!@.}.0/Qu i}k\ EX/>YEX/>Y9/а/] +X!Yаа аа а а +X!Yа а аааа +X!Y9/01#"'5755737765PldǦZooooYssss X]:]9EX/>YEX/>YEX / >YEX/>Y 9/  +X!Y а01#5&'##5753߹q!ڷ 4!m"pEX / >YEX/>Y 9/ +X!Yа а /  ]  +X!Yаа а  +X!Y01!##535#53!2!!!2654&'!OZ&z'59:;9а(а8EX / >YEX%/%>Y а/ 9*:J]  +X!Y +X!Y 96F]%]%а/%+ +X!Y2 +X!Y6% 96/8 %98/01#"&554632#4&#"326546  &5326554&#"'{z{yIBAMOA=LXJHVWIGYiinGo:MfRINeL:GGOecUJOdcTBrBhj!g"#9EX / >YEX/>Y 9/ +X!Yа +X!Yа  +X!Y01"&5#5276632366554&#"bnq_xΫkpYg0&g#$ƭ%kbcU{'RL()*9ааEX'/'>YEX%/%>YEX/>YEX"/">YEX / >Y аа/] +X!Y  +X!Y +X!Y!% 9& %901!5!46 #"&5326754&#"##33gu8_VT]_UT_T=]bkj`eakkcnqg8 nEX/>YEX / >YEX/>Y9/ 99в 9 а +XYа а01##33####5!ތ4ZppZ [!vwq8QNe9EX / >YEX/>Y 9/ +X!Y +X!Y 9  +X!Y01%#"&54632!327"!&wĬzs^r>nz*zqT''$EX/>Y01dS'&'$EX/>Y01cI'!'$EX/>Y01Y'#' $^EX/>Y01j2*^+,9# /EX/>Y 9/9  +X!Y +X!Y# +X!Y012.#"'763 #"554"32655'&&<]:i`1txސ䌟MDy;0Nn2֥#=Zj+(/EX/>Yа +X!Y01#!#!6<E 7/EX/>Y +X!Yа  +X!Y01!!55!!kaFAJҐB"EX/>Y +X!Y01!5!C?= 9/EX/>YEX/>Y9 +X!Y013##5!0;PtbN,<q=>9$а4EX/>YEX / >Yа/а/99   +X!Y) +X!Y0а 901#"&'#"&5546326632326775.#"%4&#"3265~߉PQ쐉ހ~߈QPPr4 rPs5 uP ܼ'*caܹ߽*a`޸K?9EX/ >YEX/>Y +X!Y +X!Y01#"'73254632&#"e9:.!=f a@9wEX/>YEX/>Y01Pf"s@9vEX/>YEX/>Y01+ 8 9EX/>YEX/>Y99013# pl')'%%$ny3:,EX/>YEX/>Yа/а01#3#38y?\_W  9 /а/@P]а/01'6753iHOHm\L[<&JJ,9EX/ >YEX/>YEX/>YEX/>YEX/>YEX/>Y +X!Y  +X!Yа013#5354632&#"3#!#3ʫϽp}qwiI\=2kk^U:<^EX/ >YEX/>YEX / >YEX/>Y +X!Y +X!Y а01&#"3###5356632#0|L繫e+ckUv=(<2'+EX/ >YEX/ >YEX / >YEX/>YEX/>YEX*/*>YEX)/)>YEX#/#>YEX'/'>Y ! +X!Y%аа  +X!Y013#5354632&#"!54632&#"3##!!#3竫@? /5ZbϽp}rwi޹po ibr\=2jl^UU:<2(lEX/ >YEX!/!>YEX(/(>Y!" +X!Y&аа!аа  +X!Yа(%аа 013#5354632&#"!56632#&#"3##!竫@? /5Zbe+|Lpo ibrv=(ckUU<&vEX!/! >YEX/>YEX/>YEX / >Yа%б +X!Y  +X!Yа! +X!Y01#327#"&5#53&''"##535463236A#4IF|~=f]ZaAA `p9,_TLͲMN9EXG/G >YEX/>YEXK/K>YEX@/@>YEX / >YEX,/,>YK +X!Y  +X!Y аG +X!Y@,9@  +X!Y:,@9:% +X!Y1,@9,4 +X!Y01#327#"&5#5354&#"#4&#"#"&&5332654&$&&54632&546323Ow#4MBvfbX\%berjS蹂qriqO`V,ʛ~ UruXF;ip|LLnXGCD>VyW\`]mUGKSаFаJаPаWа[аaаcаgаmаpаwа{аааа=/EXF/F>Y~I+z{+w+:+ =F9 /а/а/ а/P9P/o +X!YPo9  +X!Y% +X!Y)а)/.а./4 +X!Y=< +X!Y=kаgаcа>а<lаhаdа?а:AаF`а\аXаKбJ +X!YZа^аbаGаINаQ +X!Yv +X!Ywаzа{а~аа01#"&'5463232#4&#"32653#"&53326533!5353!#%5!#53254'5!!5!!5!5!!5!!5!3254&###535#53#53%#535#53#539df~heCbrT24JA@JJB@I\iRXm]h)6q(om56o\~gb[\ [\]v:<]qqqqqq"oooooobyx^u_|x^%IMT F-HENNEpENNEON]QS[6,;qqttSRJtttttt8qqqqqqP)~~~\s $(R++ +а!/%/+%а/!а/ 9 /9/01 4676654&#"36632#33#3#AD$J\:+98][/KR11::'J34@4_YEX/>Y +X!Yв99 +X!Y 01!!5654&#"#46 !,m@YEX/>Y9/ +X!Y01!#5%3cY9uP H9EX / >YEX/>Y  +X!Y +X!Y01#"&'54632'4#"327EµU TEX/>YEX/>Y9/ +X!Y +X!Y +X!Y01#"&54632#53$26754&#"e)#Oih|nװ?xO@Blm`!,eEX/>YEX / >Y*а*/*]*] +X!Y*9*9  +X!Y% +X!Y01 &5467&&546 4&#"3264&#"26cUbsqbU`bڜlknmt]^nopZV&&bc'&VXVnlX[dgeNdaQPbcB:9EX/>YEX/>Y +X!Y901#!5!F~$r e!"9EX/>YEX/>Y +X!Y9/9 +X!Y +X!Y01#6632#"&55!"264&4N߾@

YEX / >Y +X!Y 9/ +X!Y9 а  +X!Y01!!632#"&'332654&#"E%csī bpysiB)CJ0Ҵұ[Vqj*0 P9 EX / >YEX/>Y 9/ +X!Yа в 9013##!'3!5Bs/N& '(9EX/>YEX/>Y9/]q]/]or +X!Y а% +X!Y%9а  +X!Y0132654&#"#4632#"&5332654!#`zvlpb泼e[깃lpqcTS`[MO%@њOcb[NV 9EX/>YEX/>Y +X!Yв9  +X!Y в901!!56654&#"#4632!g]t^yöc~^ARipkκQA9EX/>YEX/>Y9/ +X!Y901!#5%3cc H9EX / >YEX/>Y  +X!Y +X!Y01#"'5432'#"32zrI᧨SG FEX/>YEX/>Y +X!Y9 +X!Y 901%!!5!5!/gqx|xy 1EX/>YEX/>YEX/>Y9013#38RXJC i&1 SEX/>YEX / >YEX/>YEX/>Y999 9013##3(usEKB1`9EX/>YEX/>YEX/>YEX / >YEX/>Y 9 9  9017373#'#3  Ƹ֮׷&P@w;PeskS1EX/>YEX/>YEX/>Y90173#3@77$^\kst =9EX/>YEX/>YEX/>Y  +X!Y01#"&'33265 Ӷy{ (/EX/>YEX/>Y +X!Y01!#!5!qs C%]EX / >YEX/>Y 9  а  +X!Y +X!Y а# +X!Y014&$'&54632#4&#"#"$53326#yVyq{8Vﺚ~*PXJ+bȜbkYPAXPe[ˢfr[% c9EX/>YEX/>YEX / >Y9/ +X!Y 9 +X!Y01!#!2#32654&##Z u~?Y Xm]dnY6W!O"#9EX/>YEX/>Y9 +X!Y +X!Y01%#"54632'4&#"3265Upf|6F$Fo 1>ϹU O 9  EX/>YEX/>Y 9 / +X!Y +X!Y01#!2#%!2654&'!C|wJǨjd`w`Z H9EX / >YEX/>Y  +X!Y +X!Y01#"5324&#"3265Z$2>4BX EEX/>YEX/>YEX/>YEX/>Y9901!##33X]lmw`9EX/>YEX/>YEX/>YEX/>YEX / >Y99 901 3###zrsqsZo)EX/>YEX/>Y +X!Y01%!!3CHW LEX/>YEX/>YEX/>YEX / >Y99 901#373#֓!Րz+M69EX/>YEX/>Y а  +X!Y013#"&533265Աۺqr\nŝŷ^fm_QEX/>YEX/>Y01!#3QX TEX/>YEX / >YEX/>YEX/>Y 9| / ] +X!Y01!#!#3!3X\c5b 9EX / >YEX/>Y 9/  9  +X!Y +X!Y +X!Y01%#"'532#&#"3275!5!5B &QіSS*Z'TJ CEX/>YEX/>Y а / ] +X!Y +X!Y01!#!!!K Cs+iEX / >YEX"/">Y" 9  а а  +X!Y +X!Y"а"&а") +X!Y014&$'&546753#4&#"#5&&53326#yV˦ƹyq{8Véߺ~*PXJ+bˆbkYPAXPe[”fr[0 cEX/>YEX/>Y9/ +X!Yа +X!Yаа +X!Y01!!!53677'#53'&632#4&#"!p8 O ˵ʹh`]h"oF"y{̷pw{ m9EX/>YEX / >Y 9 9/а/ +XY +XYаааа0133!!!#5!5!5!533M@yDxxKyt39EX/>YEX/>Y +X!Y01!#! S= 9EX/>YEX/>Y9 +X!Y01!!3'!Sɭ=C\^0`ZaEX/>YEX/>Y9|/`pq`p] +X!Y +X!Y +X!Y01!5!#"5324&#"3265Un2>4BS8 9EX/>YEX/>YEX/>Y9013#3#'ɭsj\^>K f 9а EX / >YEX/>Y +X!Y 9/] +X!Y  +X!Y01!!5!!5!!5!K CwC {ID@ 9EX/>YEX/>YEX/>Y +X!Y01!#!#!D ? E 9EX/>YEX/>Y +X!Yа  +X!Y01!!55!!owQWJ:__`^EX/>YEX/>Y9/в 9 /а  +X!Y +X!Yа01#5&$54$7534&'66?6 nn vr `]9EX/>YEX/>YEX/>YEX / >Y 9/а  +X!Y01$3#&'33ٺ3k4K-u~!^"#9EX/>YEX/>YEX / >Y +X!Yаа +X!Yа01%66554&#"!53&54323!>=&! :#˜&,n9EX/>YEX/>YEX/>Y +X!Yав9/ +X!Y +X!Y01!5!!632#52654&#"#}1ľmxy2`0 9EX / >YEX/>Y 9  +X!Y 9|/]`p]0q`pq +X!Y +X!Y 901#"546632#&&#"!!32670{~Ay'^ӻtïo' z!"9EX/>YEX/>YEX / >Y +X!Y  +X!Y9/ +X!Y +X!Y01!!#7766!!%!2654&#+^ M{;.`Q $;rsneu J-Yuc_p 9EX/>YEX/>YEX / >YEX/>Y 9|/] 9/  +X!Y +X!Y  +X!Y01!3!!!#3!2654&'CH$+s}nJYwa[q(.\9EX/>YEX / >YEX/>Y +X!Yав 9/ +X!Y01!5!!632#4&#"#}1dy2C P 9/EX/>YEX / >YEX/>YEX/>Y +X!Y 01!!#!3!3CGe  a9 EX / >YEX / >Y  +X!Y 9/   +X!Y +X!Y01!!2!!2654&'!+ s}nĥ wa[qY.]9 /EX/>YEX / >Y +X!Yаа  ааа +X!Y0177667!3#!#!!!)GG.Bd 1V T\9EX / >YEX / >YEX/>YEX/>YEX/>YEX/>Y 9|/]`p] +X!Yв9а 01####33333#cd,YY,  Q<G($)*9EX / >YEX/>Y  +X!Y 9' 9'/'/']']'']$ +X!Y$'9 9 +X!Y014&#"#4632#"&'&5332654%#536}nngvq[=yyPT]XOV)$[,.YV``Xa L 9EX/>YEX/>YEX/>YEX/>Y9 9013##3st, i 9EX/>YEX/>YEX/>YEX / >Y9|/]`p] +X!Y 901##333#jd5 '6O9EX/>YEX/>YEX/>Y +X!Y  +X!Y01#!#776676^ D)^P s^" D9EX/>YEX/>YEX/>Y9  +X!Y013"'72673-^%P&P\1I f0xEI 1; F 9/EX/>YEX / >YEX/>Y +X!Yа 01%3#!3!3DPGT =G9EX/>YEX/>YEX/>Y 9 / +X!Y01!##"&'33273߹~0py21 P 9EX/>YEX/>YEX / >YEX/>Y +X!Yа 01!!3!3!3Ĺ  uY 9/EX/>YEX / >YEX/>YEX/>Y +X!Yа а а 01%3#!3!3!3Ǯ͹T   a9EX/>YEX/>Y +X!Y 9 / +X!Y  +X!Y01!!5!!22654&#!* hQrsnJXuc_pYg& R9 EX/>YEX/>Y9/  +X!Y +X!Y01!3!22654&'!+Ps}nnJwa[qYK} 9EX/>YEX/>Y9 +X!Y 9| / ]` p ]0 q` p q +X!Y  +X!Y9013267!5!&&#"#6632#"&'A~xyotuλ!"#9EX/>YEX / >YEX/>YEX/>Y  9| /` p q ]` p ] +X!Y +X!Y +X!Y01#"'##336324&#"3265 ع$ BP c9EX/>YEX/>YEX / >Y9/  +X!Y 9 +X!Y013&&5467!#!!!"P"zqѹ. &hs!0|  R9EX/>YEX/>Y 9 / +X!Yа а  +X!Y01###53!!3"9EX/>YEX/>YEX/>YEX / >YEX / >YEX/>Y 9|/]`p]`pq +X!Y9 +X!Y в9013######33333c&zcd,YY,Z<T  Q<N9/EX / >YEX/>YEX / >YEX/>Y 9| /` p q ]` p ] +X!Y 9 +X!Y013####333AoiqjdRDT y 9EX/>YEX/>YEX / >YEX/>Y9|/]`p]`pqа +X!Y9 0135333###5##3DP<4qAP #9EX/>YEX / >YEX/>YEX / >Y9|/]`p]`pq +X!Y +X!Y 901##!5!33#i c4 `[#./09$EX / >YEX/>YEX/>YEX/>Y9/   +X!Y +X!Y& +X!Y&9!&9, +X!Y01"'# 53"327&54323654&#"[٦~62ϵͶ^vbj;<E*(!E'8ڲy8 &&D ]01&ql 9/EX/>YEX/>YEX / >YEX / >Y 9 9 9  +X!Y 901353###3(u1tsJTEKB&^ 9/EX/>YEX/>YEX/>Y +X!Y +X!Y а а а 01%3#!!5!!!3DPFT=P9EX / >YEX/>YEX/>Y 9/ +X!Yа01!##5&&'353673߹cighge! ɺm{x "1,G9EX/>YEX/>YEX/>Y9/  +X!Y013632#4&#"#~>1dy3k$l%&9EX/>YEX/>Y!9!/!] +X!Yа! а +X!Y +X!Y01"5&&53>32!3267"!54&Φ_fLP9<" ƨ^w ((/¤^ia 9EX/>YEX/>Y 9 / +X!Y +X!Y  +X!Y012#"5!54&#"'66267!G)R9AgH)/ơGp9EX/>YEX / >Y +X!Y9 9/ 9  +X!Y +X!Y901!5!#"&'&5332654&##58YYEX/>Y +X!Y 9|/]`p]`pq +X!Y  +X!Y01#"532267!"!&&Z v  $2>4wì0'()9EX/>YEX / >Y 9/q]Oqа/@ /?O]] +X!Y +X!Y   +X!Yааааав!9$ +X!Y01!!!!!!5367#535'#53'&632#4&#"nl $ ?˵ʹh`]hy]yjGy]y@̷pwB!"#9EX/>YEX/>Y!9!/!]! !] +X!Y +X!Y а! а!а/@ /?O]] +X!Y +X!Yа01!!27#"&'#535#536632&# !!!/h bhvo`Yy dymyym()*9ааEX'/'>YEX%/%>YEX/>YEX"/">YEX / >Y а /а/] +X!Y  +X!Y +X!Y!' 9& '901%!5!46 #"&5326554&#"##33n-4^WT^aSRa]PYji\RZhg^lm(f !9EX / >YEX/>Y 9/ +X!Yаа а /@   / ? ] ] +X!Yа а  +X!Y01%!#5#535#53!2!!%!2654&#!rp괴YP̨Yxbdz> &tEX/>YEX/>Y9|/] +X!Y 9& +X!Y&9  +X!Y& 90132654&#"#4632#"&5332654'# TJH?F9K|FBOCFIX=0-:3)b{yh7[)j}~k-<<3q6 JEX / >YEX/>Y 9/ +X!Yа в 9 9013##5!'33Pkky+f![dEX/>YEX / >Y +X!Y 9/ +X!Y9 а  +X!Y01!!632#"&'332654&#"p2AJy AHNJI;y|~ecKD>M+VQEX/>YEX / >Y +X!Y 9/ +X!Y  +X!Y01#632#"&55467"3264&(Hrv~3MS?=NGMwt3n, "TUO|L:3EX/>YEX/>Y +X!Y901#!5!];kEO (}EX/>YEX/>Y$9$/$$$]$$/$]$q$$r +X!Y$9 $9 +X!Y +X!Y01 &5467&546324&#"26"264&wJ@w}~N>?KL~L7??p?@Cv7;jyyjBa7vgvv:4::45::50.88\7I ]EX/>YEX/>Y9//] +X!Y +X!Y +X!Y01#"&54632526'2754&#"Eevs7{^*O<;LJ@A~y=dbGYа/@ ?O_o]а/?O_]а/@/?O_o]/  +X!Y +X!Y013#4632#"&732654&#"rdHDcaFHdU3$#00#%2rFa^IG\^E#21$&24 WEX/>YEX/>Y а / ] ] +X!Y +X!Y +X!Y01!!!!!!WkJN)7DEX&/&>YEX/>Y&)а)/ +X!Y&9/9/]7 +X!Y79 &90 +X!Y; +X!Y&B +X!Y01##"'3#"&5467&547&554632!32654&'#326554&":oxOI4z΍^T8sPGo<8YEX / >YEX/>YEX/>Y 9 9 +X!Y  +X!Y01%!"553 73#325&&#"l l"jquHk=$c 9EX/>YEX/>YEX/>Y9/ +X!Y 9 +X!Y01#!2#&'54&#%!265!!rA;9tcE=6x| iEX/>YEX/>YEX/>YEX / >Y9|/cs]3C]] +X!Y 901##333##Ur~> TEX/ >YEX/>YEX/>YEX / >Y9/ +X!Y 901##333#̀~;  LEX/>YEX/>YEX/>YEX / >Y99 901#333#r ckKy; LEX/ >YEX/>YEX/>YEX / >Y99 901##333#P+ u  H9EX/>YEX/>Y  +X!Y  +X!Y013!2!326554&#iƽM@`0N9EX / >YEX/>Y а  +X!Y +X!Y01#"546632#&&#"32670{~y'^ӻt˽jokEX/>YEX/>Y9/]/]] +X!Y9 +X!Y +X!Y013!2!2654#%32654'#_Xctszl|Q~!ebUčUSp GEX/>YEX/>YEX/>Y 9 / +X!Y 901!#3#!Fnߦؼs; /а/01#546+k;T;ScoM `/а/@ /?O_]  +X!Y а /а/а/@/?O_o]/01#"&533265%3#ਇOIGOpe_rr_7=?5/]]p]а/@ /?O] а / +X!Y +X!Yаа/@?O_o ]а/@ /?O]/01#"&&#"'46323265'3#`F5q"#/T`F/,#0x}JiB 3&KkK3&nX ]/]а/а//]/9/ а /а//]   /013#'#3#"ũ"ɍ^F ]/]//а/а//]9а// а /  / ]01#'#3#3FŪ"ϞUis/а//]9/аа/9|/@ /?O_]а/@ /?O_] в 9901#'#3'6654#72FũA;J<人|!C\XI;B<iF/а/а/@ /?]9/в9 а /? O ] а /@   / ? O _ ] а/  +X!Y  +X!Y01#'#%37#"&#"'46323265Fũ-`A6n(6M`@*|&4䞞>^G.?bF-3 9EX/>YEX/>Y +X!Y013!#!̹B0  `/а/@ /?O_]  +X!Y а /а/а/@/?O_o]/01#"&533265'3#ਇOIGO`f_rr_7=?5 f/а/@ /?O_]  +X!Y а /а/а/@/?O_o]в9901#"&533265''6654#72ʡJIELJBQD^rs]5>=6|;RNB2;>PEX / >Y016 EX / >Y 01[!EX/>Y01V"EX/>Y01:#EX/>Y01O$EX/>Yа01I%EX/>Y01~N  9EX / >YEX/>Y а  +X!Y +X!Y01#"$'54$32#&&#"3267/n}GDJ㣨7~"p #$9EX / >YEX/>Y 9/  +X!Y +X!Y" 9"/?"O"]""] +X!Y01%#"$'54$32#&&#"3267!5!C㰻֨!" xӅr*arG-NڕF:0F H9EX/>YEX/>Y  +X!Y  +X!Y013!23254#8>*$(~_"H#$9EX / >YEX/>Y  +X!Y +X!Y01#"$'54$324&#"325_⯫! n}xrqyJ7O5;~_&O'(9#EX/>YEX/>Y9 +X!Y# +X!Y01%#"$'54$32'4&#"325_9<"!n}xqqyZy F:P3;3EX/>YEX/>Y9/ +X!Y01!#5%3ɹ  V 9EX/>YEX/>Y +X!Yв99  +X!Y 01!!56774&#"#46632! } }fzx~xsT5TluplQ /EX/>Y +X!Yв 9/  +X!Y +X!Y901!5!#"'732654&##5tr4׹<vlgXʥg> LEX / >YEX/>YEX/>Y +X!Yа/ в 901%3##!53!ź< Im! 5eQ /EX/>Y +X!Y 9/ +X!Y9  +X!Y01!!676#"'732654&#"f~6o:әju"tt@reϤ:SJ&/EX/>Y +X!Y901#!5!W#? !~/а/@ /?O_]  +X!Y а /а/а/@ /?O]а/ +X!Y +X!Y!01#"&533265#"&#"'46323265ҡJHGJ`F:w,"0S`E0,#0_vv_6@@6 JiK3&KkK3&g!/а/а/01#3!`m9 EX / >YEX / >YEX/>YEX/>Y   +X!Yа/]] +X!Y +X!Y +X!Y  +X!Y01!!"53!!!!!7'"mc[l얯2>4 g B?%N/EX / >Y +X!Y 9/ 9 +X!Y   +X!Y01267#"546632#"'726754&#"߱wu҄v&zi"i~<2\RëKg ( /EX/>Y  +X!Y  а /01%#"'73255g;4C ; L,EX/>Y01sNEX/>Y01#MEX/>Y 01wKEX/>Y01vO,EX/>Y017HeEX/>Y01~EX/>Y01_SEX / >Y 01pEX/>Yа"01JTKe:Ke:U:EX/>Y01YZ:& U:!fEX/>YEX/>YEX/>Y +X!Y9//] +XY а  +X!Y01%32654&##5&#"#6632#"'RXarTNcke׵wh3{cbU'>Ub1x ;EX/>YEX/>Y +X!Y +X!Y01 5 '4&#"3267"<<> 4;3EX/>YEX/>Y +X!Y901#!5!@%H4f9 /EX / >YEX/>YEX/>Y 9 9  +X!Y +X!Y01#"'#3632'4&#"3264oɀpp񹣌PUË֪,\NK9EX/>YEX/>Y +X!Yаа +X!Y01%2673#"5546632#&&#"@cxnvۓhxZ^c* ڮiο![f9/EX/>YEX / >YEX / >Y 9  9  +X!Y +X!Y01466323#'#"&&'7327&#"[q΀oo|uRS&4x؟[VN&'(9 EX/>YEX/>YEX / >YEX/>Y9  +X!Y9 +X!Y$ +X!Y0143273#"&'732655#"5327&#"[oVH7?OoSS&272*2(8١ZDN8EX/>YEX / >Y +X!Y +X!Y0146632#"&&'732654&#"Z~咏' į`2Np9 EX / >YEX / >YEX/>YEX/>Y 9 9  +X!Y +X!Y01#"'#36324&#"3262nȁqt TS}}'ە[`Nm9EX/>YEX/>YEX/>YEX / >Y 9  9 +X!Y +X!Y0143273##"5327&#"[opVX%4r&x5ߓ]Ne9EX/>YEX/>Y9/]  +X!Y +X!Y +X!Y01"''46632!327"!54&q |݀$™x9s NtZrʠ`VN%#&'9# EX/>YEX/>YEX / >YEX/>Y9  +X!Y9 +X!Y# +X!Y0143273#"&'732655#"5327&#"`pRA7zo뺕RU%/-)I:2ӠWg&2,349,а,EX / >YEX/>YEX/>Y* 9! 9*!9!*9 +X!Y 9 9 99 9 0 +X!Y01"&54677'&54632653#''277654&#"NhKK]I E^ёjdLk?6BSHB8HVK6Ohlspo4taqK3I;TI]:F90YEX/>Y  9 / +X!Yа +X!Yаа  а а01!!573%MH U[,},,U 9EX / >YEX/>YEX/>Y 9/ +X!Y +X!Y 9/ +X!Y   +X!Y 901!!!!#!!!!5&& f) ;D-2 Y9 EX/>YEX / >Y 9/ 9/  +X!Y  +X!Y0133###32654&'ִwŦ*Zlb`w`Z'j()9а$EX/>YEX/>Y99 +X!Y!9"9$ +X!Y01#"'#7&53273&#"%4'3265քtK{E=Or4;Jj>Gp ?4Ngni;b\409EX / >YEX/>YEX/>YEX/>Y 9/] +X!Y 9/ +X!Yа аа01##!##5353!533!5![ZZ\[\OOKX[9EX / >YEX/>YEX/>YEX / >Y +X!Y 9 901"'73255#33<4 #@]K Qkm% iEX/>YEX/>Y9/]/]q +X!Yа +X!Y +X!Y013#53!2#32754'#3$)]ʦ]iEX/>YEX/>Y9/]/]q +X!Yа +X!Y +X!Y013#53!2#32754'#3$)]ʦ]l/EX/>YEX/>YEX/>Y/]]9/ +X!Yв9  +X!Y01#63 #&&#"##53533^{WioZ&ȹ}5up`Nҗ1NEX / >YEX/>Y 9/ +X!Yаа  +X!Y 01###53!5!!3-f,77Dp@vEX/>YEX/>Yа/ +X!Yа/] +X!Y  +X!Yааа013#3#327#"&5#535#536A 8IE|~@AA N6&%D06EX/>Y 016&%u6EX/>Y 016&%6EX/>Y01"&%:EX/>Y01&%j6EX/>Y01&%PAEX/>Y01&%'Z"wD&'yFB&)DBEX/>Y 01FB&)uBEX/>Y01FB&)BEX/>Y01F&)jBEX/>Y01B&-DBEX/>Y01QB&-u5BEX/>Y01FB&-@BEX/>Y01^&-jpBEX/>Y 01"&2:EX/>Y 01v 8&3DR8EX / >Y!01v 8&3u8EX / >Y"01v 8&38EX / >Y"01v $&3<EX / >Y#01v &3j8EX / >Y'0016&9D+6EX / >Y016&9u6EX/>Y016&96EX / >Y01&9j6EX / >Y#016&=u6EX/>Y 01m&EDEX/>Y* 01m&EudEX/>Y+ 01m&EnEX/>Y+01m&EjEX/>Y,01m&EjEX/>Y0901m[&E EX/>Y,601m_&E'\DN&Gy?]&IDEX/>Y 01]&IuTEX/>Y 01]&I^EX/>Y 01]&IjEX/>Y%.01g&DEX/>Y 017&uEX/>Y 01,&&EX/>Y01D&jVEX/>Y 01&RaEX/>Y01[4&SDEX/>Y 01[4&Su^EX/>Y 01[4&ShEX/>Y01[4&SdEX/>Y01[4&SjEX/>Y#,01&YDEX/>Y 01&YuVEX / >Y 01&Y`EX/>Y01&YjEX/>Y!01K&]uEX/>Y 01K&]jUEX/>Y 01&%p>EX/>Y 01m&EplEX/>Y*01&%7EX/>Y 01m&EEX/>Y+01OiEX/>YEX/>YEX/>YEX / >Y +X!Yа/9/ +X!Y901#327#"&547!#!-&:qN04 FZYg,P-[VHy,hVlsjmON-7EX/>YEX/>YEX/>YEX)/)>Yа/9 9 / +X!Y 9)$ +X!Y. +X!Y 3 +X!Y01%&'#"&54$3354&#"#46632#327#"&54'2675# $tqcsv&!:qN04 FZYgW#t&EUasdGQXX-[VHy,hVZHWbwW&'uWEX / >Y01\&Gu3EX/>Y 01wW&'WEX / >Y01\&G=EX/>Y 01w&'WEX / >Y#01\&GEX/>Y$01wW&'XEX / >Y!01\&GREX/>Y"01B&(CEX/>Y01_+&HHr]]qqr_rOq]O_]`]q]01F&)pJEX/>Y 01]&Ip\EX/>Y01F&)CEX/>Y01]&IEX/>Y!01F&)qBEX/>Y01]&I;EX/>Y%01OFzEX/>YEX/>YEX/>YEX/>Y9/ +X!Y +X!Y  +X!Y +X!Y01!!#327#"&547!!!!I:qN04 FZYg]-w-[VHy,hVi,]hN%-~EX/>YEX / >YEX/>Yа  +X!Y*9*/**] +X!Y" +X!Y%9& +X!Y01%3327#"&547&5546632!3267"!5&&Gs:qN04 FZYgb{݁#b3pn6-[VHy,hVlZ!!MPBFB&)CEX/>Y01]&IsEX/>Y"01zW&+WEX / >Y"01`V&KUEX/>Y'01z/&+XEX / >Y"01`V&KEX/>Y'01z&+WEX / >Y'01`V&K2EX/>Y,01z&+`V&K4+XEX/>Y*01B&,BEX/>Y01A&LA /01z.&-<FEX/>Y01`&"EX/>Y01l&-p>JEX/>Y01R&p$EX/>Y01C&-kCEX/>Y01)&QEX/>Y01Xx&- Oh&M&-BEX/>Y 01&-.-KJ&MN55&.|5EX/>Y01K9&3EX / >Y01X&/E &O1&0u&1EX/>Y014&PuEX/ >Y 01 &0lW U&P&0EX / >Y01&PVP]]/qq/?rr_orqOq]O_]`]r01&0&P86&2u6EX/>Y 01&Ru[EX/>Y 01 &2 N&R36&27EX/>Y01&RzEX/>Y01&R`/O]]01v &3p@EX / >Y!01[4&SpfEX/>Y01v &39EX / >Y"01[4&SEX/>Y01v 7&3k8EX / >Y&"01[4&SEX/>Y" 016&6u6EX/>Y01&VuEX / >Y 01 &6cS N&V6&67EX/>Y01c&VEX / >Y01Pr8&7u8EX/>Y)01_&WuQEX / >Y) 01Pr8&78EX/>Y)01_&W[EX / >Y)01PMr&7y_EN&Wy]Pr&7u_N&W3Pr8&79EX/>Y+01_&WpEX / >Y+011&8f V@&X1M&8y M@&Xy16&87EX/>Y 01 y&X]]O]01"&9:EX/>Y01&Y\EX / >Y01&9p>EX/>Y01&Yp^EX/>Y01&97EX / >Y01&YEX/>Y01&9KAEX / >Y 01[&Y EX/>Y015&9D6EX/>Y01 &YEX / >Y 01{ UEX/>YEX / >YEX/>Y в 9  +X!Y +X!Y01327#"&547"'33265N04 FZYgO!;r`Hy,hVaS&O:oEX/>YEX/>YEX/>YEX/>YEX / >Y +X!Yа/9 +X!Y01!327#"&547'#"&'33273:qN04 FZYglѭF-[VHy,hVjeE=6&;6EX/>Y01+&[$EX / >Y016&=6EX/>Y 01K&]%EX/>Y01&=j6EX/>Y01Vz6&>u6EX/>Y 01X&^u!EX/>Y 01Vz&>n6EX/>Y01X&^EX/>Y01Vz6&>7EX/>Y01X&^@EX/>Y01WB&uBEX/>Y01N|&uzEX/>Y@ 01v&uEX/>Y,01[z4&u7EX/>Y) 01&0&/x,qq/]rOq]_]01&0&/x6]Oqrrorqq_]/]01(&&E  ] ]01p&3DEX/>Y 01p&3udEX/>Y 01p&3nEX/>Y01p &3j"EX/>Y01p&3jEX/>Y01py&3)EX/>Y01p|&3' `J0&1yt&(DEX/>Y 01&(u7EX/>Y01&(AEX/>Y01&(jqEX/>Y01_&DEX/>Y01/&uEX/>Y01$&EX/>Y01<&jNEX/>Y 01X &"EX/>Y 01`Z&DEX / >Y01`Z&u}EX / >Y01`Z&EX / >Y 01`Z &"EX / >Y01`Z&jEX / >Y#,01t &DEX / >Y01t &u^EX/>Y01t &hEX / >Y01t &jEX / >Y"01 &u3EX/>Y 01p&3pl&EX/>Y 01p&3EX/>Y01OpiEX/>YEX/>YEX/>YEX / >Y +X!Yа/9/ +X!Y901#327#"&547!#!&:qN04 FZYghnxs-[VHy,hVl !`0&1uiEX / >Y01`0&1sEX / >Y!01`0&1PEX / >Y#01`0&1EX / >Y!01&01EX/>Y01&(p?&EX/>Y 01&(lEX/>Y01&(EX/>Y01O|EX/>YEX/>YEX/>Yа/]] +X!Y +X!Yа  +X!Y +X!Y01!!#327#"&547!!!!Wk=:qN04 FZYg-[VHy,hVi&(VEX/>Y01c5&qEX / >Y 01c5&EX / >Y 01c5&NEX / >Y%01c5&OX&EX/>Y01X &"EX/>Y01J&p&EX/>Y01!&IEX/>Y01Of&c&EX/>Y 01+ &EX/>Y01W&&uEX/>Y01&&~EX / >Y01&f7X&uEX/>Y 01X&lX&EX/>Y01`Z&p&EX / >Y01`Z&EX / >Y01`Z&EX / >Y"01%&u'EX/>Y01%& %&FEX/>Y01C&u>EX / >Y(01C&HEX / >Y*01CM&ySC&]EX / >Y*01(&(&PEX/>Y 01(O&y>t  &d"EX/>Y01t &pf&EX / >Y01t &EX / >Y01t y&)EX / >Y01t&EX/>Y01tt  UEX/>YEX/>YEX/>Y в 9  +X!Y +X!Y01327#"&547"&'33265 xo2lN04 FZYgZz0([RHy,hVhVθy{ 1&;EX/>Y01 &=EX/>Y 01 &jmEX/>Y01G&u3EX/>Y 01G&EX/>Y01G&REX/>Y01?&%)F?&)r7A&,=w@&-?&3/?&=d]?&2t&*EX / >Yа!01%&F)Vz>,w-/R12v 3418=9<^&-jpBEX/>Y 01&=j6EX/>Y01dw:&uEX/>Y$01c9&+EX/>Y(01a:&FEX/>Y01K%&*EX / >Y01t&!EX/>Yа'01?:[4NS`:v!:ZZLtInEX/>YEX/>YEX/>YEX/>Y999  +X!Y9 +X!Y012337#"&'#&#'6®X=DH/%[x>IkDDI/^rn&jEX / >Y01&jwEX/>Y#01[4:&SCEX/>Y01%&"EX/>Y01z"&SEX/>Y&01F&)jBEX/>Y010B&uBEX/>Y01Pr&d'(9EX/>YEX/>Y а +X!Y&9& +X!Yа" +X!Y01&&54$32#4&#"#"$&533264&VܖkcãGϘty}oY{f{os|uw-^&-jpBEX/>Y 015.,0&/u{0EX/>Y01M&CEX/>Y01%&0F)&1CEX/>Y 01R1,v 34w'189<mNE]NI&EX/>Y 01[4NS`NT\NK9EX/>YEX/>Y +X!Yаа +X!Y01%2673#"546632#&&#">cvntٔixZ]d'ڮi#K:]):\]&IjEX/>Y%.01G&uEX/>Y 01_NWhMD&jVEX/>Y 01KYN?&u;EX/>Y 01K&]PEX/>Y01=6&;D,6EX/>Y01+&[DEX / >Y 01=6&;u6EX/>Y01+&[uEX / >Y 01=&;j6EX/>Y#01+&[jTEX / >Y016&=D6EX/>Y 01K&]DEX/>Y 01g! #&K?&HEX / >Y010GR6&1u6EX/>Y01x&QuEX/>Y 01k&%mkN&EFB&)DBEX/>Y 01B&DmBEX/>Y 01]&IDEX/>Y 01&DEX/>Y 01Z!_(C:&9EX/>Y01 &EX/>Y 01[K@N&S]vK 0&3]PQj&QXRM&QCwQ&'Q\QN&GQR=.`:w-5&CEX / >Y01&_EX / >Y01w-&%7EX/>Y01m&EEX/>Y,01&%j6EX/>Y01m&EjEX/>Y0901WN|NF&)CEX/>Y01]&IEX/>Y!01]&XjEX/>Y'001bOb&jEX/>Y$-015&jBEX / >Y&01&jdEX / >Y&01Pj&jWEX / >Y0901X&j^EX / >Y.701&pJEX/>Y 01&puEX/>Y 01&j6BEX/>Y01&jEX/>Y01v &3j8EX / >Y'001[4&SjEX/>Y#,01g[4Ng&j'=EX / >Y'001[4&jEX/>Y$-01&j XEX/>Y'001d&j|EX/>Y'001M&pJEX/>Y01K&]p#EX/>Y01M&jBEX/>Y"01K&]jUEX/>Y 01MA&/BEX/>Y01K&]EX/>Y 01&j BEX / >Y#01g&jdEX / >Y!010&'-jBEX / >Y(01&'*jmEX / >Y(01_H&%mN&EJ&%FEX/>Y 01m&EEX/>Y)01&%7.EX/>Y 01m&E7hEX/>Y,201&%8=EX/>Y 01&E8lEX/>Y,101&%9EX/>Y 01mY&E9mEX/>Y*001&%:EX/>Y 01m&E:lEX/>Y*3016&%'6EX/>Y01m&E&nJEX/>Y-01&%<-EX/>Y01m&E<EX/>Y,901&%5-EX/>Y01m&E5EX/>Y,:01@&%==EX/>Y'01m &E=EX/>Y,E01&%PEEX/>Y01m&EPEX/>Y,:01&%'7EX/>Y01m&E'JEX/>Y,01F&) ]N&IF&)REX/>Y 01]&IEX/>Y01F.&)FEX/>Y01]&IZEX/>Y!01&)7:EX/>Y 01]&I7XEX/>Y!'01F&)8IEX/>Y 01&I8\EX/>Y!&01&)9'EX/>Y 01]I&I9]EX/>Y%01F&):EX/>Y 01]&I:\EX/>Y!(01FB&)'B EX/>Y01]&I&^EX/>Y 01&-dREX/>Y01&JEX/>Y01~&-k h&MM v &3[4N&Sv &3HEX / >Y.01[4&SEX/>Y*01v=&370EX / >Y# )01[&S7bEX/>Y%01G &38?EX / >Y! (014&S8fEX/>Y$01v &39EX / >Y! '01[S&S9gEX/>Y#01v &3:EX / >Y! *01[4&S:fEX/>Y&01v 8&3'8EX / >Y"01[4&S&hEX/>Y01e1&u1EX / >Y(01[&ueEX/>Y& 01e1&DN1EX / >Y'01[&DEX/>Y% 01e& AEX / >Y401[&EX/>Y201e&5EX / >Y)01[&kEX/>Y'01e7& [&&9:&YQ&9FEX / >Y01&YEX/>Y01B&uBEX/>Y01&ucEX/>Y 01B&DEBEX/>Y01&DEX / >Y 01&REX/>Y)01p&EX/>Y(01.&FEX/>Y01&iEX/>Y01& &&=:&]c&=FEX/>Y 01K&]JEX/>Y01"&=:EX/>Y 01K&]!EX/>Y01_&H'&GCd/]011&8Q?(:&Q&Qg;&Q0&QG:&Q?U&LQYcN&MQLdEX/>YEX / >Y 9/9/  +X!Yаа +X!Y  +X!Y01#!!#53533!2654&'Pj_PPݘ{dEX/>YEX / >Y 9/9/ +X!Y аа +X!Y  +X!Y01#!!#53533!2654&'Pj_PPݘ{0 PEX/>YEX/>Y 9 /z ] +X!Yа а  +X!Y01!##53!!!B Tm1G: KEX/>YEX/>Y 9 / +X!Yа а  +X!Y01!##53!!!xܺ $!ߗę1EX/>YEX/>YEX/>YEX/>Y9//]] +X!Y9/ +X!Y а в901###53533#33#7Ur7>(vEX/ >YEX/>YEX/>YEX/>Y9/ +X!Y9/ +X!Y а в901###53533#33#~; W 9EX/>YEX / >YEX/>Y9/ +X!Yв 901###53333۔Qz|Q  %.`:d 9EX/>YEX / >YEX/>YEX/>YEX/>Y +X!Y 9 а01###53333Jܿ k&R9dEX / >YEX/>YEX/>YEX/>Y 9/ +X!Y 9а в 901####53333Ĥk_]kb8{.):dEX / >YEX/>YEX/>YEX/>Y9/ +X!Y9а в 901####53333<AA֧ku>cM/&*&"Fff@]3^5P-0"dzW&+uWEX / >Y"01`V&KuKEX/>Y' 016&2Df6EX/>Y 01&RDEX/>Y 01 &%m2EX/>Y 019&EEX/>Y* .01_F,&)8>EX/>Y 01)&IEX/>Y #01 ,&->EX/>Y 01&EX/>Y 01v "&34EX / >Y!%0134&S EX/>Y !01U &6.2EX/>Y01&VdEX / >Y 01 &9h2EX / >Y01+&YEX/>Y 01?&d&&  &F&( _&H &(e]01_&Hi&, &L 0&/u{0EX/>Y01 A&OuDA /01&/Y &OeF&0 a&PN R&1 xN&Q &2$ N&R v &36 S*EX / >Y#ܲ#q#qO#q/#q701B&4u|BEX/>Y01`&TuEX / >Y 01&6 N&VJ Pr&7_N&W1&8 V@&X&96QEX/>Yܰ*01.&:FEX/>Y 01!&ZEX/>Y 01&: !:&ZM =&; +:&[S Vz&> X:&^b 2O&3Fqp&3c&(<&<&<d& X&<d& 7p32(GXQWwX`Z( &1<&jNEX/>Y 01 &jmEX/>Y01&(jqEX/>Y01&u4EX/>Y01CQ<&jNEX/>Y 01+MW&u%EX/>Y01" &gEX/>Y01p32(a&EX/>Y 01wX`ZD`01(&1GP)EX / >YEX/>YEX/>Y  +X!Y 9' 9|'/']'q']`'p']0'q`'p'q& +X!Y&'9в 9  +X!Y014&#"#4632#&&5332654%#536}nngvq˯yPT]XOV)$[[V``X_/EX / >YEX/>YEX/>Y  9| / ] +X!Y  а +X!Y01##!#3!33\g `V0ZEX/>YEX/>YEX/>Yаа +X!Y +X!Y01#&5546632#&&#"32670˩{~y`aӻt˽jo Qk&Qa&p&EX/>Y 01" &p:&EX/>Y01`5& &su`Z&uu}C&)1&D1&u11&jk &DO&%|mON&EYF&): ]ON&IOp&3W&(`:&M >//5//<O ] }   .* ^  V b  V  V &p  @   & \8 TCopyright 2011 Google Inc. All Rights Reserved.RobotoRegularVersion 2.137; 2017Roboto-RegularRoboto is a trademark of Google.GoogleGoogle.comChristian RobertsonLicensed under the Apache License, Version 2.0http://www.apache.org/licenses/LICENSE-2.0Copyright 2011 Google Inc. All Rights Reserved.RobotoRegularVersion 2.137; 2017Roboto-RegularRoboto is a trademark of Google.GoogleGoogle.comChristian RobertsonLicensed under the Apache License, Version 2.0http://www.apache.org/licenses/LICENSE-2.0jd(Y%>E^yy  "$%*+3466;<ADGHKMQQTX]^bbddhhjlnnpp  ((++--03_cz|  ,$%&'y 2LDFLTcyrlgreklatncpspkern $H %&'()*+,-./0123456789:;<=>eg/3579;ACEIKLXYz{}   "$%')+- }  :44^67497zd88788898D  89X9469 F7\8f5 8:8:8:78f8|9v&5<9v@8f956969v8:xjp55!8"`#^4%885B888&585(@)))*5+n5<3F+-r8f11:3$3$8f2p23$3$3$679X9v3F8f5545<777845<889545<43p444:44`:499:9999949499998666666647z7z7z7z888889999967\7\7\7\7\7\7\55558:777779v9v67\67\67\444497z57z57z57z57z588:888887888888:88:88:8:9797978|8|8|888969v6999:::9999999:::::999:94444::::67z8896677z98878898D864868:79v77z588775B6757z8898D4847\578f9v5<559v99969v44488:67\7z59X9v469v845<867\67\7z55545<9778f5B9v5B9v5B9v67\67\67\67\67\67\67\67\67\67\67\67\7z57z57z57z57z57z57z57z58897979797979797769v69v69v8558:557688:67\7z8978|78f9988:77888:88:98D8f8|89X9v9X9v9999:99:99:: %*,- /6 88:?EFIJLL OO!QT"VV&XX'Z](__,-./0589;=@HITdehjm  p  qr""u.0v35y77|99};;~CDTTVVXX\^0033EEGHz{}}  "%''))/8CGMOTTeimoxx!"(89:;<>@GJPRVXYZ^deghrt  xz{FHHJW__puww{| 89Ew:;= "$prt %V.8EGHIKSUVYZ]VV V"9BE`ak3VVVVVVVVVV#2345678MNOVVVVVV V V!"V#$V%&V'(V)*V+,V-.V/0V12V34V579;=?ACEKMOQSUWY[]_acegikmoqsuwV38:;=9E3 "$2345678MNOprtw8:=9E"$prtw.9bdM  AGHIKUa"B`ak79;=?ACEY[]a@GHIKU"B`ak79;=?ACEY[]aS KMOQSUW_.9bd  Z]#qsu?'+35 !AjEFHI-  JLNPRTVXZ\^`@'+35!AjEFHI-  JLNPRTVXZ\^`8%<= 3C]"$ "$&(*,.024prt(%  "$&(*,.024GHIKQRSTUYZ]"+6<>BSUW\`ak#  79;=?ACEKMOQSUWY[]_acegikmoqsu|| GHIKUYZ]"B`ak#79;=?ACEY[]acegikmoqsu< JYZ] #cegikmoqsuAGHIKU"B`ak79;=?ACEY[]a:m  GHIJ KSUZ ]  "B`ak        13  # 23456789CDEFGL MNOPQRSZ[\]mnostuvx               79;=?ACEKMOQSUWY[]_aq s u       \^4D^&(* \^4D^&(*"Z\]^4D^#&(*qsu 8:<=QRTZ\]  +3469:<>CDEGISUW\]^bcdlm"#$ pqrstuwy|(8Z]  9:ELcm#qsuw?8:<=\349:CDEGI]^bdlm"$prtwy%'+358:= !9AEGHIJMPQXbdfjlnopEFHI"$-   "$&(*,.024JLNPRTVXZ\^`prtwyz58:<=39CEP]bdflo"$prtwj%8:<=  39:CEGHIJLPQ]bdflmop"$     "$&(*,.024prtwyz18<=39CEPQ]flop"$prtw$8<39CEPQ]fopw8=9E"$prtw9QRT\  +46:<>DSUW\^m |# Z] :m#qsu :HJmzvGHIKSU"B`ak19CDEFGPQRSZ[\]mno 79;=?ACEKMOQSUWY[]_a EGHIJ KSUZ ]   "BQ`ac e kp        13  # 23456789CDEFGL MNOPQRSZ[\]mnostuvx               !#%')+-/13579;=?ACEKMOQSUWY[]_aq s u        :HJQmpzMG H I K U :   " :B HJQ` a k mp                               7 9 ; = ? A C E Y [ ] a z   "Z\]4DQ^p#qsu    :PJcemL  (L O P SW[     KMOQSUW_   LxLx[  AaM:JLMXb d mn1.08@JM_il :ILbdlm/Vm[m|}+KaFRIh < .0<8:j@IJ L?MX_c1e_i lm0n AJVXam| 1#X[:IQJ{LMXbudlOm  :cemJ[   :cm l[  :JXcemn1[T1IJLbdlX_:mJX2[3V[m|(M~gejs^t}y}  .08}:@J|LMlX_kcei{lmn1 AVa1J  A Va1[1l1  h&% x -&~| v8{q?;QyVD3DK>,r'jzb m %),4 8>EGIILLQTVV"ZZ#\^$'()-./02347>?@ABD  F  GH.0K35N77Q99R;;SCDTTTVVVWXXX\^Y\cefgilm00p33qEErGHsz{u}}wx  "*/8CGMOTTeimoxx  "#$%&(25;BDEFJPQS_a  eghFoHHJW__bbddpuww{|t !!%%&&''(()).. // 0033448899 ::;;<<== >>EEFFGGIILLQRSSTTVVZZ \\]] ^^"  %      ..//"00334455 77 99 CCDDXX\\]]^^!!!# $ 00 33EEGHz{}}             "" ## $$ %%&&''(())**/0 11#28CG MOTT eefi$mo xx#     "  %"           % % %   !!""##$$%%&&''(())**++,,--..//00112233445566778899::;;<<==>>??@@AABBCCDDEEJJKKLLMMNNOOPPQQRRSSTTUUVVWW__bb dd pp qq rr ss tt uu ww{{"|| "        # ##       " !   !$     #         $    #"      " " " !   !        bDFLTcyrlgreklatnH .AZE CRT FRA ZMOL NAV ROM TRK      c2scccmpdligdnomfracligaligaligalnumloclloclloclnumronumpnumsmcpss01ss02ss03 ss04ss05ss06ss07$tnum*        60nL`tflq3210(sutvrwR   ; /0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwyxz{|}~    %&'()*+,-./0123456789:;<=>eg/3579;ACEIKLXYz{}   "$%')+- } q3210(ds0ut/rwR   ; v123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abdefghijklmnopqrstuvwyxz{|}~    EFGHIJKLMNOPQRSTUVWXYZ[\]^0468:<BDFJMZ|~   !#&(*,.~ *BZrMxN`H0I$'a_bc` MNI26rJd~"<N$.8J| <Fh.8BLV( &,   &,68:  &,HF  $$*06JL   $*06bd  $prt % &,!  &,79;I  $ &,KM    &,ce  $qsu &+-,. $G $X`Z\^ $Ya[]_ $fnhjl $goikm%)+-/46;=>EIKMOTV[$]^*,-./015     OX{@JMMJPPJ*  JXXJWKo6,- .//O EGFHIghijklm '(+35FGHKSTU nooIKj.Z^XUWV[Y]\OJKLMNSeff pp  .pfLNMKOeSJU^ .[]^XUWVY\ZJKLMNOSefp.pfJOSSU^ eel%<  !"#$% >zst?@ABCDnextepc-0.3.10/webui/static/fonts/Ubuntu-Regular.ttf000066400000000000000000012572141333553357400224230ustar00rootroot00000000000000PDSIGExGPOS+f/GSUBmCv6LTSH25OS/2.`VDMXcmap~7|cvt -$$ˀfpgmvDh#gasp ޼glyfhZ XQ,hdmxVk1head (\6hheaH$hmtxa8kern2{rlocaP~͔maxp  nameJ\ postXԝ,prepAFȌԼ׳_<ɊX2(YC  C Y]  /Y ZO P [DAMA@G8 V 2GH14=Z2.HDND%45&+8424]48474(4A4?4<47438&454545AVl:V;VV:V VuVVgCV :`V :uV!5Q wV=!I`I4/x= +MP3M3/3PB3;PB PN]P>PN3MPM3P(J>J $M(`M4*4-!!b''x42!#:<!<!h4x(#(3VG4V4<4,4`+x#.A&45+.Ax.L45gg xDP+8xEg2+(j2j2j l:;V;V;V;V  D  V : : : : :4P :QQQQVaVoP + + + + + +[,3/3/3/3/3<M3>PN3N3N3N3N345N3>J>J>J>JMP + + +l:3l:3l:3l:3Vn3M3;V/3;V/3;V/3;V/3;V/3:B3:B3:B3:B3V;5;      KPBVBuV PVPV;V'VNVqNV>PV>PV>PH>V>P :N3 :N3 :N3uVPuVuVP!(!(!(5J5J5JQ>JQ>JQ>JQ>JQ>JQ>J V=!$=!$=!$P!(5Jxtx4x.x9xxUxGx$   VYggg(g%g%g ggg2gg gg(g%g%g gAj2jj2j j(j%j2jj jj2j(j2jj jj(j%j2jjj(j%j I)V445Y84 Lq4*454545(PPPPP PP42u"3&1"/gg2gg gg(g%g%g ggg2gg gg(g%g%g gx@xDND+AI`IM(M#h4#(G(MkVMPM ll:3.q.M3F3;%8<3:{PxVEV PV>P : :N3953MPuV'3!JPJ5QUJ4Q:=!$772(!(/;P``9,G VV(3VVNVV?P +  :N3Q>JQ>JQ>JQ>JQ>J/3 + +[,:N3:B3uV 5 :N3 :N37 VV(3:B3!VVV>P +[, :N3 + +;V/3;V/3   :N3 :N3uTuVPQ>JQ>J V;5V31O4=!$ +;V/3 :N3 :N3 :N3 :N3VP33 :3l#& SV>3#:M3jx6xx_x!x=xxxx"x]xAxAxxx;V;VVl:! V  VuVVKVkVVV;V<VVuV gCV :V`Vl:5K`8wVw:VVXVhVlV{$ +S>$PP[/3,UPUPPV CJPN3BPMP32JP.7PBPVPP"+P$/3/3;P3(B_ SP;PUP?PL3V :N3 4V`Pu `VMPVP pV P<,V"PVkP,_VUP/VPV\P:a3l:35VV N: .~:'V;PC C  VwV P a VJPVUP~A.CC V + +[,;V/38/68/6<,7VUPVUP :N3 :N3 :N3l"KKKw:.VPXVPjV4%4(404x*VV;V=!V : VuVgCV(% :V`V3!5V`8w/A4^3cPM374>PZ7NPDP2N3BPSJ3e3@J3JF9zQ #V&^37>P9N3@J@J@JF9xxwx^3^3^3^3^3^3^3^3 777777zz8)"=>P>P>P>P>P>P>P>Pqq>/LL N3N3N3N3N3N38@J@J@J@J@J@J@J@JcMF9F9F9F9F9F9F9F9:e^3^377>P>P+N3N3@J@JF9F9^3^3^3^3^3^3^3^3">P>P>P>P>P>P>P>PF9F9F9F9F9F9F9F9,O z^3^3^3^3^3^3^3xxZxxx6x!>P>P>P>P>P::Vxxx7  xxx7@J@J@J@JSJSJ@J@JVVxxx/F9F9F9F9F9qBsE%4xnxo qq:eV44CI   /( & ^z* !(x Zd   z //////z dd/ / / !!!!(((ĸĸĸĸ -+     ^Zzd* * *  ^Z^Z^Zzd0-+1KK  /(7f   -z*  ( / / /  !  (!/  / / ĸ   ((* / zd  /   / d (&T2 &  h/U!d = .( (d f& & #g`/ {+ zz # (dh#( |B/ /  ((dh/ ddd  /*( 1&zT=-. 2 ! /w/"z2///w//#/1 &0////////!wwwwwwww +//ww, wwwwwwww////ȸ//////zz('wwwww///  +/(-(Z$ 8 L  !!"!#"$$%%&%'&('))**+*,+-,.-/.0/102131425364768798:9;:<;=<><?>@?A@BBCBDCEDFEGEHGIGJHKILJMKNKOMPMQORPSPTQURVSWUXVYVZW[X\Y]Z^[_\`^a^b_c`daeafbgchfifjgkhlimjnkokplqmrnsotpuqvrwsxtyuzw{x|y}y~z{|}}~  !!"!#"$$%%&%'&('))**+*,+-,.-/.0/102131425364768798:9;:<;=<><?>@?A@BBCBDCEDFEGEHGIGJHKILJMKNKOMPMQORPSPTQURVSWUXVYVZW[X\Y]Z^[_\`^a^b_c`daeafbgchfifjgkhlimjnkokplqmrnsotpuqvrwsxtyuzw{x|y}y~z{|}}~  !!"!#"$$%%&%'&('))**+*,+-,.-/.0/102131425364768798:9;:<;=<><?>@?A@BBCBDCEDFEGEHGIGJHKILJMKNKOMPMQORPSPTQURVSWUXVYVZW[X\Y]Z^[_\`^a^b_c`daeafbgchfifjgkhlimjnkokplqmrnsotpuqvrwsxtyuzw{x|y}y~z{|}}~! % * - 1 49>BEIMPVY^afimquy} !"#$%&'()*+,-./0123456789:;<=>?@AB C DEFGH!I%J)K.L1M6N:O=PAQFRJSMTRUVVYW]XaYeZj[m\q]v^y_}`abcdefghijklmnopqrstuvwxyz{|}~ "'*.26:>AGINRVZ^bfknsvz~~||{{zxxxvuuurrrqqonnlllkiihh gfeecb"b  !!"!#"$$%%&%'&('))**+*,+-,.-/.0/102131425364768798:9;:<;=<><?>@?A@BBCBDCEDFEGEHGIGJHKILJMKNKOMPMQORPSPTQURVSWUXVYVZW[X\Y]Z^[_\`^a^b_c`daeafbgchfifjgkhlimjnkokplqmrnsotpuqvrwsxtyuzw{x|y}y~z{|}}~ '                                                                                                                    ' *                                                                                                                                              * .                                                                                                                                                                                           .5                                                                                                                                                                             58                                                                                                                                                                           8<                                                                                                                                                            <C                                                                                                                                                                                                     C F                                                                                                                                                                                                                "F J                                                                                                                                                                                                                         #J Q                                                                                                                                                                                                                         'Q T                                                                                                                                                                             (T X                                                                                                                                                             *X _               !                                                     # ! #                                        !!!!##!"       -_ b               "                                               $!" $!                                #""# $$"# !      /b f               $                                               %"$ %"                         !         $##$"" &%#$!"      1f i              %                                            '$ % '$                         "          %%$%## !'&%%"#      2i p                '                                !"        !    )&"!'  )&""     !!     !! !   !   $         !  "! !!!(''(%%"#))'(%&   " ! 6p!t               ! ( ! !                              "#    !    !"    +'#"(! +'##   !!    "" !" "  %!         !! "!  #"!""")(()&&#$+*()&'   #   "! 8t#{    !       # + # #  !       !            !  $%  ! #   !$   -*%$+" ! -*%%! !!   %$!##$ !$ !  !!(#      "!!" ##!" $#!" !!%%#$!!%%++*+))%'--+,()! "   % "!!"$#!";#{%     # #    !  %- %  % #        #         #  ### "  &'   #  % !  #&   0,'&-$ #  0,''#  ##  '&##% & #&  #  # # *%    ###$!! &%#$ "&%#$ ! ##''%&##''.--.++()0/-.*+# $ !!'###$!!&%#$ !>&& !   $ "#      &/ & & $     !!!$ !        #  ####!!!!!!!!!!!!!!!!!!!!!!!! '(  $  & !  $'   1-('/%  $! 1-(($! &&  ('"""%&!'  ! "'!    "# $!"!+& ""      $$$%!! '&$%!# '&$%!"  $$((&'$$((/../,, )*11./,-$ %  ! " ($$$%!!'&$%!"@&( "   & "%    "  (1 ( ( &  ! !  ###% "       "%  %%%%######################## )*  &  ( !$  ()!   40+)1'! %" 40+*%" ((  *)$""&(")  !  #"%!)""!! $# %"$"-( ""!   "   "! !&&%'##  !)(&'#%""""""""" !)(&'#$ ""&&**()&&**1112..""""""""+,4312./& !!' """""#!#!*&&%'## !)(&'#$C(* $   ( &!!'  $!  *4 * *  (  " " %%%' !!!!!!$       #!!!'!  '!'!'!'%%%%%%%%%%%%%%%%%%%%%%%%! !+,  ( * "% *!!+" !  62-+!4)# !'$!! 62-,'$! !!!!!!(( !  ,+&&!$**$+  "# " $$!' "+$!$## & ( '$& !!!$ /*! &!$!!   "  "" "!  #""# (('(%% !#+*()$'#""""""""!#+*()%& ""'',,*+'(,,433411""""""""-.663401' ##) !"""""%#%#-!   (('(%%!#+*()%&!!G(. '   ,! (!$$ +  ($  .8 . .# ,  % % (((+ !!$$$$$$ ( !! " # "    !!!'!$$$      +$  +$+$+$+(((((((((((((((((((((((( $ $00  , . "!% ( ,!$$/&! !$   ;71/$8-& $     +( $$ ;711!+($ $$   !$$$$!,,! $# 0/"! !*!!!( $ &!,.!'/$!"&&#% ('!$#"+% "!%/($'&& *$! !*# +(  *$!!$$$'#4. $ (!$ &%$ "$&$ %!% &$#!#&%%&##,++,)) $&/.+- (*'&&&&&&&&$&/.+-() &&++10./+,00988955&&&&&&&&13;;8956+  &&- "$&&&&&)&)'1$#!###,++,))$&/.+-() $$M,2 !+!    0! $"# -$''"#/  +' 2=2 2&/ )) ,,,!!!!!!/ $$''''''""""+ !!!$$""""#% & %$$$*$'''""""""/' /'/'/'/,,,,,,,,,,,,,,,,,,,,,,,,!#' ' !!45 02%!$)#"!,!1$''3)$$'#!A;53'=1*! '"""""!!/+#"'' A;5"5 $!/+'!! ''""#"$"!''''$11! !$!' & 43%$#! $-$$#-#'#+ $ 12$+4 '#'(*&) ++$'&%-'!# %$)!4+'!*!!  *"*" -' $#$ .% !!/+##-'$$''' +&92! !#' !-$'#+ )'''+! ' ($(+!!'&$&!" )(()&&0//0,,')32/0#+.*++++++++()32/1+-++//5423/044>==>::++++++++57A@=>9;!!!!/##))1 %'"+++++,*,*5!!'&$&!"&&0//0,,()32/1+-!#''T16 $.$    3$#!'$&"/'*!*"%%3"   / ) 6B6 6)3 ,,# ///$$$$$$2!''******%%%%!".    $$$!!!!'"' $$$$&'     )"('''-'* * * """%%%%%%3)3)3)3)2//////////////////////// #&*  *####89 36 (! !!$'," &$#/$5'** 7,& " & *%#F@97*B5-$ * %%%%%$$2.& $"* * F@9$9#'$2.* $$  * * ""%%&%'$ $* * * * '33$#!#'# * #!)!87("' &$!#'1''"&/&*&!! /"'"56'.!!8" !)  )  + .- ), /.  ' * )(!"! "2*#&!#(!' ,#8.*!!#.$#"#-$-$1)"'!& ' "1)$$2.&&1)' ' * * * !   ".)=6$##&*"#/'*&!/"-*!! !  !++-$"*+',! -!!!!!!!!$$*)')$$""-,+-))433400 +-7634&/2.--------+-7634/0!! --!!!!!!!!3398683388CBBC??--------:?!!!!!!!$$$$3%%--5 (*$-----0-0-9$$*)')$$))433400+-7634/0$&**[5: '!2'!!!!!!!!!!!!!!7&%$)!')$2*-#-$"((6%"!!"" "!3!"""!-!!:G::,7" !!!"/!/!"%333&&&&&&6$!!!!**-----!-(((("#$2 "!"""""!"!!!!"&&&$$$$)$*"! ! ! ! ! '"'"'"'")!*!-$+*!*!*!1!*!-"-"-"$$$"""(!(!(!(!(!(!6-"!!!"6-6-6-" 6333333333333333333333333"&(-! !"!!!! -%%''<=!  7:"+$""$$&*/$""!)!'&3'8*!--";0)"$!#")#-(&!!!! !!KE>;-G90&-"(!(!(!(!(! &&62)"'"$-"-"!KE>'"=%*!&62-"&&! ! -"-"$$(!(!)!'*'"!&! -"-"-"-""*99&%$&)&#!."%$!!,$=<+$*")&$%*!4!**$)2)-)#$""2%*%::*2$$<%# # -###+""""-"/0#,/ !21!#!"*#-"-!+#$#"$ 5-!& )%% +#*#/&<2.#$"""&1&& %%!0'0'4-% *#)"*#%4,&&62! ) ) 4-!!*#*#-"-"-"$"""%2,B:! !!&%&!!)-$&2* -)#!""2%.-##"!#"""#$!-//&%-/*"/#!"!!!/########&&-,*,&'%%0//0!!!!!!!!--876833"""""".0;:78!!!!!!!!)251////////.0;:7824##!!""!!//########77==:<77!!!!!!!!==HGFHCC////////>@KJGHBD#######&&&&7!!!!!((009!!!!##!!""+-'/////3031>&&-,*,&'--876833.0;:7824&)-!-b8C"-&9- &&&&&&&&&&&&&&@,+*0&$-/"*#;14)4*$'.->*'&&!#''%'&#<&(''&"4"! &&C R$C!C3?'&&&'!7!&7&'+!;;;,,,,,,?*&&&&1144444&4....')*######:%%%%'&(((((&(&&&&!'!,#,#,#****0*1'&%&%&%&%&%-'-'-'-'/&1&3""*#2$####$1&1&1&8&1&4(4(4(***$$$'''.&.&.&.&.&.&>4'!& & & $'>4>4>4'! >;;;;;;;;;;;;;;;;;;;;;;;;',/#5& &'&&&&%4++--EG&!"$!% %%@!C!!'2)''**,"17*''&/&$-,<,#"C1&44(E70'*$&('0(5/-&& && %$!& &VPGD4$RB8,#4(.&.&.&.&.&%,#,#?:/(-'*#4(4(& VPG-'G+1&,#?:4(,#,#&%&%4(4(**.&.&$/&-1-(& ,#&%4(4(4(4('!0BB,+ $* ,0,(&#5'+)# &&2"*$"FE2*1'/,)+"0&=&11*/;/4/)*'';*0*BC19)*E+#(%(%4!(($(0'(''!4"'$68(3#!6%%%&!:9&$(!''1(4(3&2)*#)'"#*$>4&!,%0)+%2)1(7,E:5)*''"'",#9,,$+$+&8-8-=4*$1)/'0(+$=2,#,#?:&%/%/%=4&!& 1(1(4(4(4(*!'!'!'!*$"93LC&'&&,+",&&/4*,;1%4/)&'';*75))"'"&($"'"('()'4"68,*461'6)"&('''8)))))))),,4312,-""""""**7668&&&&&&&&33@??A;;#""#((((((57DC?A''''''''/:>98888888857DC?A:<))""&&((''88))))))))??GFCE?@&&&&&&&&FFSRQSNN88888888HJWVRTMO))))))),,,,?&&&&&..77B''''((''''24-88888;8;8G,,4312,-33@??A;;57DC?A:<,/5&4qCH ~17HQS_aw67O_cuEMWY[]}    " & 0 : D p y !!!"!&!.!^""""""""+"H"`"e%  28IRT`bx78br HPY[]_    & 0 9 D p t !!!"!&!.!S""""""""+"H"`"d%feAa&`HH z@:*߶1mTxSߘߕߍߋ߈߅y]FC# mykwzRSTUVWXi_abcduestnocpqeghrlx   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ag}~rv|df{mystpqnoznblxhcej iuabced_@?XUTSRQPONMLKJIHGFEDCBA@?>=<;:98765/.-,(&%$#" ,E#F` &`&#HH-,E#F#a &a&#HH-,E#F` a F`&#HH-,E#F#a ` &a a&#HH-,E#F`@a f`&#HH-,E#F#a@` &a@a&#HH-, <<-, E# D# ZQX# D#Y QX# MD#Y &QX# D#Y!!-, EhD ` EFvhE`D-, C#Ce -, C#C -,(#p(>(#p(E: -, E%EadPQXED!!Y-, EC`D-,CCe -, i@a ,b`+ d#da\XaY-,E+)#D)z-,Ee,#DE+#D-,KRXED!!Y-,%# `#-,%# a#-,%-, ` <<-, a <<-,CC -,!! d#d@b-,!QX d#d b@/+Y`-,!QX d#dUb/+Y`-, d#d@b`#!-,E#E`#E`#E`#vhb -,&&%%E#E &`bch &ae#DD-, ETX@D E@aD!!Y-,E0/E#Ea``iD-,KQX/#p#B!!Y-,KQX %EiSXD!!Y!!Y-,EC`c`iD-,/ED-,E# E`D-,E#E`D-,K#QX34 34YDD-,CX&EXdf`d `f X!@YaY#XeY)#D#)!!!!!Y-,CX%Ed `f X!@Ya#XeY)#D%% XY%% F%#B<%% F%`#B< XY%%)%%)%% XY%%CH%%`CH!Y!!!!!!!-,CX%Ed `f X!@Ya#XeY)#D%% XY%% F%#B<%%%% F%`#B< XY%%)) EeD%%)%% XY%%CH%%%%`CH!Y!!!!!!!-,% F%#B%%EH!!!!-,% %%CH!!!-,E# E P X#e#Y#h @PX!@Y#XeY`D-,KS#KQZX E`D!!Y-,KTX E`D!!Y-,KS#KQZX8!!Y-,KTX8!!Y-,CTXF+!!!!Y-,CTXG+!!!Y-,CTXH+!!!!Y-,CTXI+!!!Y-, #KSKQZX#8!!Y-, IQX@# 84!!Y-,F#F`#Fa#  Fab@@pE`h:-, #Id#SX<!Y-,KRX}zY-,KKTB-,B#Q@SZX TXBYY-,Eh#KQX# E d@PX|Yh`YD-,%%#>#> #eB #B#?#? #eB#B-dA  0P`69F AU UU/(F@F߳@@ F@P`` }G2}HdOo@8;F}>"d 0P`@ʇ69Fυ ~y3}{7|yd{-z_yoyyxtwu~vsdu}t`spss sssr~oUq~pUh[[Ug[_Uf[]Ud[ZUc[\Ub[YUXCVUWCUUSMURKUQJUPIUONU/NIIIG[CUF[BUE[AUoATSKRKP[%S@QZUZ[XYBKSXYKHSX@YKSXBY++s+++ss++++++++++++++++tu++++++t++++++t++++++s+++tu++++++++stu+++++++++++++++++++++++++stts+ssss++ss++++t+++tu+EEGGGo GbHNgCDh;aIfNO :TCn]D`LETPk=\`3LQuY2EH]O>Bn /rRn=*X<R5NPH>b]`TP DDDD$X0  t p x@0` th$  l ""l"#h$$&'|()+D,D-.P.01334d445(556H789:<<<>8>?d@ A`ACtD0EEGGIDIJKOPR RSlSTlU,VVWWWXdY Yp[L[x[\]@]]]^$^P^_4`X``bbPbPbcdefgii|k$lLldllnnop`q,rrlrststttu0uHuhuuvvvww@wty0z{||<|l|||}(}\~H~t~~~(\LxDp<8@lt@p, Hp(T|(T|@PT4\$LxDp<(T|,X 4D\tPXHt` Hp0 $Lx8`4\|hhP,T$H|HpHt0XP0xLL|8l4XŠƈƜư(<Pd<|ɼ,ʜ |˼<|,lͬ,lά\ϴ dмD4DX֐ 8 0@P`pۀې۠۰ 0@P`p܄ܘܬ$8l<tބޔޤ޴$4DTdxߐߨ߼d(Xd xpH |Ld Xx      t8 8d|,<T  4 L d |    !!D!l!!!""L"""#,#d##$$%(%\%%%'(\((() *,,H,p,,,-- -8-d-.@.//@1D1l11122L2223 3@3p3344,4T44455D5x556686d6799D9p9;h<=>?L?x?@BTBBBC(CTC|CCD D4EF|GpHIKMN\NOQtRXS\T`UVVWYPZZ\X]H^@^`0abcdcde<efghiijXjkxl4mmLmnnppppppqrspssstXthtxttudutwxxyyyz\zlz|zzzz{ |P|`|p|}l~<~DPdLdt( `p  lXD\t $lpPP, D<`0T<8 Ĕ 0@ƴ,ːL|8hx\׀אר`pH$|,x(hx(| ,D\t $<Tll ` 0@P`pP`pPdP<( p 0P   P    $ x    8 `    $ T |  8|(TP4<(T0H`x,`$<Tl<p<p0XLd|0`(XpH|  L d |     ! !8!`!!!""4"`"""##8#d##$($p$%%H%%%%&&0&P&p&&''D''((D(((())$)D)d))**D**++X++++,,<,\,|,,,-4-\--...4.L.d.|../X/0011<1d11111223d404\4455,5h555567,788<8t8899,9d9999:::;;H;l;;<<(<@><>\>|>>>>??<?\?|????@@<@T@l@ACCK|OQ,2@  //103!'!222vG #@   c[??9/3210#.=3#"&54632 : d$$$$TDDT((((HZ&  1j@              ?        /!0 yA y B BA???]?]]]+}]]+}10]]3733#3##7##7#537#537337##T#Xg"#T##T#Xf"#TT#JJJJL=3@4))(W%%h Y  +) `'+- $ $s  $ 0'--0'''''5 104jw & f   10,*--g-w--Jx?O/]3]3]2?]]33299]]]]]]2^]]]]9/99+}2/]2]10]]]]]]]]]]]%2654.'.546753.#"#5.'7M>-;;.UQS,LH6,GW ~ K2(3?C@fCA@ABCBCB@B@*  )  : 44)44?***&**E  &  & )DCABBAB@A%}7=}/F}}E??????^]]]]]]]99//+}104>32#".74&#"3264>32#".74&#"326#2+:"":++:"":+*''**''*+:"":++:"":+*''**''*7&54>3267#.'#".73267'4&#">.)6J/A'(?+'2" M!#;b #)lFAV5] 3&1S %-',/D''=1%JO(@,(8#8.&?M )a0&J#*)3%9D!*#$! #0Q"/5'A> ")H @   Z?9/10#.= 7 21k55k21NG= a@B *           m }   W db?3?3]]]]]]]]q2]]qq210.5467JHBN__NBHJ+]-__-]G a@B % brX bd?3?3]]]]]]]]q2]]qq2104&'7'>JHBN__NBHJ+]-__-]%7,@yvxi#@]H#""t@{ H,,**' .- 7' !'##+de+[?2/2]3]9/93233]339/33333/3/3/3+3/]3]]3/]]3]]3/3+10]]]]>?'.''7>7./7.=3$F)(P*!:I##I:!*P()F$Z*M)&T 5#3$G&&G$3#5 T&)M*55! 1@ P  /]3/9/2103533##5#5PPSO&ar .@ H  ? O  /3/]9/322+107'>54&'% Hr?{83i.  W-@@@ $H/+]10^]3#WW8y " @ H  c?q+q107#"&54632$$$$6((((G'@ddbb????/և+}10#3G_S]2 ݵMM@ MM @M M MMM@*M M M @M@ML L!MML L M @M WMMX?++?++++++++++10++++++++++++4632#"&%4.#"32>2{mm{{mm{n 4&&4 4&&4 [9fL--Lf99fL--Lf]q P@5 _o 0 P ` p  UV??9/]3]]9/^]]3910>73#]9l-B] #)-&E4K4 8,@/ @M@ L.$%k {  -$M$M$@M$ML LLM %L% M%*L*M* L*@ M*X U??++++3++99+++++2+++q2++99//+}10!!&454>7>54.#"'>320<-(?\2>-# +0&. $2>$mm$CA?.2.O /QH@//2* B e78@!!!MM6M4M@bMYi#####+{&]&m& & &5jIY++++:659&& 65M50L0W LX?+32?+3+29/9=/22^]]]]]99//]]]]]10+++++]]]72654.+532>54.#"'>32#".'7YM 4E$!5,!+0C$ %.57P4>,2%AbC70$ODF;&4 L -"( G 1C'6M.<%-M8  Q( k@?(+(8   ;_o   UV?3?9/3/22r^]22/^]]q210^]]7>733##5!3(BS_0YRRZ6=:3,u|x0HL OVZ+A'@ M M M@;MM"j)##    (#" LMM@ M M V M LW?+3+2?9/+++++229+}^]]10+++++#".'732>54.#>7!#Ǘ?`B6.$M8-=&BnTNxg.N8  Q"-&;(1VRQ-O374?--M$MM @9MMW0Y++w/  !GW. &@ L&WMX?+?+9/32]2]2]]9/]]310]+++++4>7>32#"&7"32>54&?8g\;aL4 A#;R45R8rw#< 4(!. Aej7N4S= $;M*&PB*  ,N;#,3DH<%@U V?2?9/103>7!5!-BO&!PG3P-QM&]7!3E2M2@ M.M MLEM@M4@!LCA A1//M/A / A//A@7MP M_   ,vG>L" M F 9 LX'M'@ M LW?+++?+9/3/++]]99//]+]++}++10+++++++%#".54>7&54>3232>54.'4.#">9V8AW4)b7N08P3%v 2&"3 -?(-1 , - "7&*2*G5%8C5.%8m&E4"5@3," 8'!( 0$ J0$%,& C3-@ $ M MMMMMM@) M ! L!wOh/+M+@M+M. @ M &M&XMW?+?+9/+32+++^]]9/]]]3+2210++++++++'2>7#".54>322676454.#"?eL3 B#;R45R89W;#> 4(!. AN5T= #;M*%PB*(Lm  +O;#+3DG8&@  PO++4&a&@ PO++45L `@& M@ MP/]++//+}/+}10%5%cP+MPM5.@ ?O0@/]]9/33/3107!!!!566O$O5L d@"@ M MP/]++///+}+}107'%5PcMPMy!- M MM@6L"(@8H((Xhx ' 7  ///. ++%cMLh?3+2+?q2]]]9/^]3/+10++++"'>32#&54>54&#"&54632B?"U09I,&.&N$($6 $$$$w"H0;"5.*-5!  4-'(,*5((((AguEU@DCCg?U?X5)##i IM.//VxYAAAAAAWS y  v&&&'&7&W&&777VMP3232>54.#"3267#".54>32'267.=.#" *>0O: ;U63U' ,RuIIzX14]L;M Y3YvEDsTRn@4H+"GFD+ ;V90U?$ $:I&?oT01[TXY-J3iplk65eZDhG$Q  XCGTܹ@4 M     L s  @C M s  @py_o B A AB????99//]32^]]]q9/+}++}+10+!.'!#>73.'%?e(FCB$Y$BCF( ?"#?-W-nKKnWKKWVP)8W0vML@ M$v@ L@L@ M0M::@ M8s985| *y)) E|F?22?39/922+++++++2+10]".'>3232>54.#'32>54.#"11001032.#"3267IxV/5ZxD+E3  "+37X>!:W:CX$6H0\WW\0 P &Hg@>fI( P V@L M MMv@ MM@L@ Ms M| M E@ M|MF?+3+2?+3+2++++++++10#"&'>322654&#"8fU*e))e*Uf8)- -[ZW+  +WV 5@   s y y ByA??9/2^]103!!!!!V"_SQSV (@ s y ByA??9/2103!!!!VSR:^'ѵ M@,M M's@M@M))@M)@ M)M@ Mv @M M @ M @M (@M M|@ LME'$M$ M$|F?3++2?+3+9/+2+++++++]++]++210+++3#".54>32.#"3267a -;F$IxV/5ZyE/I4!`25W=";W;*; U 0\WW\0 Q&Hg@>fI( Vk 7@ s  s yABBA????9/2^]103#!#3! aaaaSK@V$@MsBA??]+103#VaaKy@ Mgs@ M@ M @ M @ M  A @M|  L MMMF?+++3++2?^]++2+]+10]+%#".'7326535YC"9." &C2HBa2VA%  M!IYVo@`MYy M   M H  (  s Ms)9 @/M0 P `  sA{AB BA????9/]q9qq?22]+]]+}]q+3^]++10]]]]+]+#.'#3>7WNUT%+`\QrNWY*aa#TRI"SWT$Xdh//_WJ!STMV@ sAyB??10%!3_aTTC%)J%M$M!@Hf!! fMW@9M i iWs+ M+ Ls@$ H"sO)vO@& H  L s  *@H|))BAAA" M"L@ H|A B??]+]+2+????9/+^]++]]]]]]2+++]]210]]]]]]q]]]]+]+]]]]+++%.'#>73>73#&' !&+&! _  U>>::>>U"_ !&+&! `JV[Q@vZK,x66x,v@Q[VJV@  w  s  s@ L@C Ms BzkZIbr@P4A A ABB?????99]]_]]]]]]]?^]+++}_]10]]!.'#3319BGFB_M/ki] _%\cf_T 25K:' M M@M MMM M MMMM@MM Mv @ M M @M @ M ))M@ Mv@MMM@M(M M@ M|F#M# M# M#|E?+++?+++++++++]++++++10++++++++++++4>32#".732>54.#":5[yDCwZ55ZwCDy[5f ;U55T; ;T55U; [Y[..[YY[..[Y?gH''Hg??gH''HgV=R M M Mv@L s y B| E?22?9/2+10+++2+#>"32>54.+QtIMa)e2>!I2P75Fon32.'.732>54.#":5[yDCwZ5(G_6'32"32>54.143j/0/ Wa)e*I>!E2P73E"AOV(&NG> nmEb- 3*'4 !0@9'  &"%!!!s!!v%L% L%@a Mp%%2v M M M  M .-@H-1y=M tBG..g|-MX--(FwV|@MwVE?3]]]+2]]?3]+]2]99//]]^]]]]+2++++]+++99+}]]]]]210]]]]]]7254.'.54632.#"#".'7.;!&D2|m?gS70$(5 -K7y)E6' ^Eh -! !->,[fO  %& $2E1[b P %:@$ sByA??^]]]]]10###5%aTaTQ_Y@. M M M MssAA | M MF?++??]^]10++++".5332>53XDd@a\J%=,aAc*Id:Xh^0K4M:dI* @*xg7 G w   x 8H@0 L s  L  s   LHs@L   A A ABBA??????^]]+++]Ƈ+}++}+]]10]]]]]]]]]#.'367&EBA"["ACF%k6h77h5nKKn܀% ^@$8  M8x7w @ Mt@U Ls""7 6s { L s@`M6)IY sp   !BBA Mxf ` D T  AAABB?????99]]]]]]+3???^]]]qՇ+}]]]q+]+}+]]q]q+}]]q]]]+}+]q+10]]]]]q]q+]q#&'3>73>73#.*V+a5Q#f (Z'T'\( c$Q4a,TֆlTN9ii8Nlc㳠@, HM        L L@ L  s  @H LM Ls@P`/   BAAAA B BB????????^]]]]+}+++և+}+++10]+]+]!.'#>733*2661+k-wCpoDx.IOO##OOIX`GaYP @R L  s  o  s Lso B A AAAB??????9/3/^]]2+}+]3+}+103.'3>73Ez6r&^21^'l6zDkdRNNRdj!M@*   s yA y B?2?3^]և+}ć10!!5>7!5!=DHE> 9AFEAhIYced-SA(`df^RS`GA@  //103#3#`ኊIIG)@bbdd????/Ƈ+}103#]S_8G@  //10#53#53ኊI6I/;l@B8hx7gwJZ/]23/3/3/2/2/10]]]]]]] 'CJJ&&TG@ K?3/3/10!! jO=D7@ LM M/+++10'y/*+5@ ! M,M"M@M M)M)@ L@ M8 L7723@ L3 @ LM@MP L@M6)$@M@ M@L@MQ2/3P?32?329/++++32++++++2]++++10+++++%2675.#"2#".54>3254.#"'>!3 - /'@/8M/ +6?,J6#&-# MP! M@+ MMMM L#!"N L M Q!L!@ LMP?+3+2+?++32?22++++10++>32#"&'732654.#"E-8W<%D`32.#"32672?_A #@]9#F 7NS)@.%< &+ (Hc<32@&(9$ZK&3] dA<`D%32!3267#".%6&#"3(BV-ipRW1C U6Dc@eA9 1"EgD"QTN )Hcn?Q(4PD@!  J ILMO?+2+2??210]^]2.#"3##46);  , A4]b P G<-NF7dm3D-( M' M#س MMM M @ M-@ L@ L/%M% M%@ M%@ LL@M@ MHM.@!LR" P- L-* L/^]3+2+?32?+32++++++++2++210+++++++%#".54>32#"&'73265.#"3267 E./S>$"A^;Aa!|~1W Q,SI/(KQ'3%>4?^A9_E'0xl Q BHbQ-@*Pn MK L@,M  @ L @ L OJ JMPN??+2??2]q++10++]+37>32#4.#"P];>R1] 2%  #?X50D*PB3@ @ H SIJ???+22^]103#3'"&54632]]/####^!!!!EO L@M  @ HS IR?22??+32^]10++"&'732653"&54632 &  0)][,####L;9da!!!!!P@M MM M @ M  M  M MMMLMM@LM M LL@MMMM@" H I LIN J JJJ??????9/+?+++++}+++++++2++10++++++++++#.'#7>73 CA:m7<>]]:82m6:;DOQ##IC8&:<7<==N =@ ML  L @ H  N Q??+10+++.57VH] FJp P-!@# ML MLMгM L M سM M @M M MLMLMгMM/ L/@7 M/@M O+-.,JJJ+&&M M L P?+3+3/32+2/3???^]q29]+++10+++++++++++++++++++>32>32#4.#"#4.#"#P iE2D,6".B,IPn@M M MMM@M J JMP?+32??]^]10++++++>32#4.#"#P jE>R1] 2% ]#?X50D*I3س M@ M( M( MM!!@#M @ L @ L MMPMMQ?++?+++++]+10++++#".54>324&#"326$AZ55ZA$$AZ55ZA$aODDOODDO>dH''Hd>=eH''He=XggXXggPG!z@X  M MM0 MMMMMM L#"PK L  LQ?3+2+??322++++++10++++4&#"32>7#"&'#>32ZK*/@&(9$a32#5#".$9(&@/*KZa%D`  3(3]!bQ K (-:%س M%@M 0 M @M M+@M& L%M"M"M"@ M!M!M! M L @ M M M@BMMLM L!!!$/?/ *.MM+M+@M+*'QMP?+32?32++99++]]99+}10+++++++++++++++++++++++72654&'.54632.#"#"&'7976>7(fX,&@-': (%:)kcENFC!"( "0#EQP! $3%HJPJ^@/? M  @ H O @L  L MQI??++3+22]+310+]3#3267#".57 $*3 F-5E*]N'3 M6O4JP@!MT  I I@ LLQ?+3+2??]^]10]+%#".5332>73 iE7'i1T1i'd !%&&%! jj 1omf((fmo1$@ @&MMM MM@M(MM#M@ MM$ M$L$ L$@ M@$4$$&*H$@ %Hr$@$P$`$$@H$  !$!$&!M!M!M@J M ML M M[ (+H}_oJM@M(M M@ M LMM@ MM@M M M@ M6vdRF?OM MLM M MO;@&*H %H}O_o H    M@ MMLLM MT@'+HvDd@HMM M M@MM ML M M6 gVJ?O_@`@    %$J!I II$dt+k{I I IJJJ??????99]]]q]q3????^]q]q]q+}]]]qqqqqqrr+++++++++++qqqq+r++++++++}+qq++rr++++++]q+}]]qqqqqqqrr++++++++++++++]qqqqqqqqq+r++++++++Ƈ+}+qq++rr++++10+++++++++++q!.'#&'3>73>73?>Q.X'd "! M !!  `'X.HddHg/nnf&/ikg--gki/&fnn/g@$F  I      L@ L    @0 L L   JIIII J JJ????????^]Ƈ+}++և+}++qq10!.'#>7'373 &((% `#a0i|}c0e#698996D@AED MM@ MMM  M "@L@ M M@ M    &M '*H       ! RII I I?????329q^]2+}++++++Ƈ+}210+]++]+]++3267&'3>73#".' #7>?m$d &,&8`$X3+4A) a 17x -hnn3imv-A*$A@%  I J??^]]և+}10!!5>7!5!EOOsFMIwTfp3N>,ji] N(GE(Z@   @( H((b(r(("" H")(  //9/3/+]2]]+2210^]]2>=4>;"3#".=4.#(" ,I691# #196I, "O#)@+I):BHHB:)I,@)#`G//9/103#`WW8G%(^@$g    H"m}@ H*((  //9/3/+]]]3+2210^]]]"+526=467.=4Ȕ3%" ,I691# #196I, "#)@,I):BHHB:)I+@)#*~!X@: y!Pp$ )"!  /223/]]]10^]]]]]#"&'.#"'>3232>7 1#32 @1#32 e0+ 1+ -'3@y'X&.!"53*G1+(....F...4!!!%11((+"""%%Q T?]]3]]2]?]3]99//23/33/^]22]]]]2222]2222]22299//3310]]>32.#"3#3#3267#"&'#53&45<7#5j,:9&9)YC*=T3uZRRuu P (9#H   HYF O qH   H!r 4@ H  ? O   /]3/]9/322+107'>54&'&Hr  4f,,Z'  E_@  M(M L@$M M R IO?22??3222210+++++2.#"3##"'7326546';  -D4[Q)  /(a P F=-NPda L;9.dm!er&ccby&*'w'oF@* O_    L?//9///^]]]]210#.=#53533 . PTDDTMM'ox@L O_O_    L?////9/////^]]]]]]]]223310%#.5#535#53533#3 . PQCCQMMMM4FD.@P_/3]3/2/]2/]10'''aa',XX,23?CWc@CA@ABCBCB@B@*  )  : 44)44?***$** DD)DD^ XX)XX&NNNNe  &  & )dCABBAB@AI%}[7a=}S/F}}E??3222????^]]]]]]]]]]]]99//+}104>32#".74&#"3264>32#".74&#"326# 4>32#".74&#"3262+:"":++:"":+*''**''*+:"":++:"":+*''**''*32!!!!!!&Gf?! ,?fG&Qe9:eQ8P`9[@dE%%Ed_,XYYX,QOQ< KM@&M: + @  /?o/]]3/]22^]]310++<7>7<&H  4f,,Z'  ! )@  / ? o  @/]3/]]3210'>54&'&H  4e--Y'  <&nn!e&oo44 /9/10#".54>324!//!!//!a.""./""/S/10!! SOS/1010!!SOg`U@7iy/  4D9I/]3/3]]]3/32^]210]#"&'.#"'>323267`## 0##   h0D0@SH0  p  p++"K&@H&%!!!!"10[%[+t++[" /33?229/3]]??]]+9/]]]]+9/]10###5!#.'#.'#>73>7.iEi F 1 E B ==3{99832, ,23899{308::80(&V_#@ .2*#P 3O++4(?(@@H/322+22107'7'7iAooA?##3}'3<@hw$%<V.f..  =<gP7I+Y++P$!!F1V11Q%hQ?]22?]23?]2?]39/^]]]]99//]]]]2]99310]"&'#".54>32>32!32674&#"326%6&#"Oi b?5ZA$$AZ5?c!e6hqSV1C UODDOODDObA9 1! :368'Hd>=eH';386  PUN XggXXgg?Q(4Pz&<o@% POO+++44GG #@   PK??9/321074673#4632#"&X : d$$$$TDDT~((((V$l@C@H &&V%FV  J IY P?^]33]2?]33]2]]]229/+32104>753.#"3267#5.V1H-S:47NS)@.%< D$S0H0#1VD. M ^Z(C0L -CV<"M@TMMM M M$"s L 0#|y gEy B??]39/^]3/22]]+29/210]++++++3#!!>=#5354>32&#"!v ]]9P0,<5<,uK2n2PGGKSJa9 P&@0,mI2@`4/4O4 e u   jz))3jz eu$$$$..../]]3]]3223]]3]3]]32]23]]310^]47'76327'#"&''7&%4.#"32>YI:J/;;.K:JJ:K096J:I7 ++  ++ [=-J:KK:J5 4J:JJ:I->.!!.-!!-$@n s os  s  o   yyBAA A AB??????9/3/222^]]22]3]+}2]3]+}2]1035#535#53.'3>733#3#6a+g$T-,Q%e,a6jGfGXRNHHNSWGfGj`G@  ZY??9/21073#3#`WWWW+;Q @%67++(WE7 7432/e+  JM-58 6* *27227--S?B;#8R w?2 22J*v**k*V*?z?m?J z i Z  J?*S;;8Q?32]?3]9]]]]]]]]]]]]3^]]3]]2/]2]22]2]]99]]2210]]]]]]]]]]]]]]]]32654&'.54>7.54632.#"#"&'.'>54.DH8896@$A1 aX3XE4'9 ($A1$jbCW $)8! $(4 !$#' (8(-% 4"EQM !! (8(,$ 8%KM 3# 2##hU )@ H@ H  //3/++10"&546323"&54632]########h!!!!!!!!A'I@7EEhwXh( K>>>>>w--gwW g   &  J88;}7p2a22}gHXEDA}E(n((#####}hGWF?]]]]]]]22?]]]]]]]22]^]]]]]]]]_]]_]]]]]210#".54>324.#"32>".54>32.#"32678^|DD|^88^|DD|^8I(Gc;;cG((Gc;;cG(+F34F'+  5#3D><'3"+[U]11]UU]11]UBmN**NmBBmN**Nm4M21L5 <GD>O< &IP1@*HXHW%%%%Wg&6F3/@ H/  IYi@$ H2.+%""" /h?39/]^]22+]]+]]]10]]]]]2675.#"2#".54>3254.#"'>, "#/")8#R)!7(,: " 7 =d ;$3  , , ? ?&ll55@ //99//10#!5POWA'=HE@V757E754E4U4 w4((BBBBw5+++88==5j5'5W55w(Xh J,HHHHu.Y.i..@.)..w  & V f  I>>>{8 +0+++-E}2a2U22F22}gIYE=-n--I-Y--#####}hFVF?]]]]]]]2?]]]]]]]]9/]3]^]]]]]]]]2_]]]]]]]2}/23]]2}/10_]]]]]]]#".54>324.#"32>.'##>32'32654&#"8^|DD|^88^|DD|^8I(Gc;;cG((Gc;;cG(9CG<VZ'$  &-<9(  [U]11]UU]11]UBmN**NmBBmN**Nm-Q@A%7 $,0'%.J@0/]]3/2/10!!.H2i@H   @ H  ! F=&h H/+]?]]]]]99//+^]]]]10#".54>324&#"3262&33&&33&C++++} 4$$4 4$$4 #))##))5l `@:   /P   \ @O  _?]]]3/?9///]]]3]23103533##5#!!5PP6OO;8!_@; # 3 gwV    #"I  fvUFq?]3]]]299//33/3/]]10]3!&>7>54&#"'>32( *!&"+!$E-EBV(''! ?!3*#1 1#: 36-g@$$7gv" *"@H"/+`**. +*'q?32229/9]22+9/]310]^]]2654.+532>54&#"'>32#"&'75((%.C"I=7#)(?,@1q!9 7 ;.1 3#+! < D;8@@L@M M/+++10'7;/͉*PG8@    IK0 HQ I??3+??99//21032>73#"&'#>E ] e<7A\_L9g+G!1@uu CEC??]?9///10"#.54>32#.No|-TxJ*`)N*o hf7R8 #8iEC2@  ij??29/9/310#"&'73254&/>73 (+ $ @%! 9   "2; .@   { p?2]]9/]210>73#2&J1F9m )~&+HZ@>     ! hg??99//^]]]]]]]10#".54>324&#"3260B''B00B''B0J73287337+F22F++G11G+8CC87DD(?&xx2R&'nkp2;&'nV R&'nzpD!-a@>f "((p/@ H.+%Py  )  R?]3]2?+]29/3/^]10]]327#".54>5<'34632#"&~71B?"U06H-&+&N!(!%$$$$&1"H,7!4/*/4!  4-((*((((&$C@ P O++4&$@ P O++4&$i@ P O++4{&$u@ (P 'O++4z&$@-P %O O+++44G '3" M @H .@H..1@H(@RH((11 !"#$$$s'&%$$s$$5@5p5554HW@- H+1 y'@!!!$$z$Y$i$!$!$1ABB???2/99//]]]]]32+]+^]]]9/+}+}ć33/++3/++10+7#>7.54>32#./.'4&#"326?e%B?=!%%!>?B&j ?"#?fG*%%)Gg-X-OWKKX@F Hs syy   yAyB?3/3/?299//329/32+}+10!!!!!5!#>7!3i FZ/h9mhe2s5r=dOQ,Y-lGLHj:CS@@LB@ Hd.S.B.#.3...U*#*3*C***h)9j/z//.s***b*E*U*@~H*>:>>4,::"#BvhWA18>)J"Z"j""Wg|J#Z#j##h&x&&W&&FEUeXh|EUe g X  E?]]]3]]]2]?]]33]]2]]]]]22/39/]10+]]]]]]]^]]]]]]]]]]+.54>32.#"3267#"&'73254&/>J>dG'5ZxD+E3  "+37X>!:W:CXkR (+ $ 7[}OW\0 P &Hg@>fI( P  ! 9  V&(C@  PO++4V&(~@ # P O++4V&(im@  PO++4Vz&(m@  PO O+++44&,C@ PO++4D&,@ PO++4&,i@  PO++4 z&,@POO+++44%w@M)iy vVf''p''# s & y !!| WE#|XF?]3]2?]3]29/3233]]]]^]]]10#"&'#53>322654&#"3#8fU*e)PP)e*Uf8)- -[ZW+ 9K +WKV{&1u@ # P "O++4:&2C@ +) P*O++4:&2@ *( P)O++4:&2i@ -) P*O++4:{&2u@ 7( P6O++4:z&2@*< P4O(O+++44Pa @X `          /3]qr33]qr3/]23/]r39/3]qr3]qr3/]33/]r310%''7'77888a888:$/l@&E.e.6-f-,xh9(JddfMY  @TMF j l My..Z-Z,f)U(H#VETWejY j w)9 L@ MMMM@ M % M M- M @ M.-  @ L @ M*M*M* M*v M @M @ M 11M@ MvM@MM@M0L..%M% M% M%|@=L MMMF-L- M  M  M | L  M MME?++33+2++++23+?++33+2++++23+++++++]++++++99//+992+}++++333++++++]10]]]]]]]]]]]]]]]]]]]+]]]+]+]]]]]]]]]]]4>327#"&''7.7&#"2>54&':5[yDjR;>@'-5ZwC5_):>>(.f,?7O5U; 5T; 5[Y[.8M.S-RY[.K.P-TmF+'Hg'Hg?5W#e)Q_&8C@ PO++4Q_&8@ PO++4Q_&8i@ PO++4Q_z&8@,P$OO+++44P&<j@  PO++4V=RM@#Mvs | y  AB??99//299//22310++732>54.#*5>3 +#I2P78N/')7+QtIMa 6*(5 q54&#"#4>32  /#af*$!'20.9!+ ,  44C=]6P46N1h'! ! '5%NT Q ,%'2(6 ,1LC*2R: +;+&DCR@ 97P8O++4+&DE@ +86P7O++4+&DiK@ ;7P8O++4+&DuL@ E6PDO++4+&DK@8JPBO6O+++44+ &DcK ?6P+44,%;LU @VRc4T4w+%H y, M9-''fUG%'UUfUUF22B?JJ! w---{;   - -WV0WU111BEEEP'w*h***P !$P?<Q859Q?22?32?32?^]]]39/]323/]]9///]_]]]]_]]33]2]]99]]]]]]_]10]]]]]_]]]]]"&'#".54>3254.#"'>32>32!3267%267.'.#"%6&#"e9U !.9"2O8#&-# M/*-,  PUN O @$!3&?Q(43C:@ O<_<<<@H@ H &`666<<W--@DMW;'X*I**&#P5W2F22  H 6M )iyQ?2^]+22+2]]2?3]]2]]+]]]9/]10++]#"&'73254&/>7.54>32.#"3267>  (+ $3M4#@]9#F 7NS)@.%< "' ! 9  "-F[632&''7&'774&5.#"32>4k ,8_H;Y;!327&#"4'326$AZ5O:156$AZ5'E15}$1EO("3EO#]9>dH')@(F#^9=eH'@(A-gY>/gJ&XCg@ P O++4J&XZ@ P O++4J&Xi`@ P O++4J&X`@*P "O O+++44D&\C@ .#! P "O++4PG%h@E#ZIX)9I'&!PNK  Q?3]2]???3222]]]]]]]10]]4&#"32>7#"&'#7>32ZK @&(9$a733267#"&5467>.'&?e(FCB$Y$BBF( (  #86 W ?"#?-Y-nKKm=)#+ WKKW+EK@u(7&0 HB8)& '''!!??'M/MH I0I@II 555,555L!$ 0?:-0QHEIP?32?3329/^]]3222]_]]_]]2]]]]]]10]]]]]+]%2675.#"23267#"&5467>7#".54>3254.#"'>!3 - /'@/8M/ (  #861,J6#&-# M:S&&@ B*(#P )O++43&F]@ @$"P #O++4:S&&i@ (-)#P *O++43&Fic@ ''#P $O++4:S|&&b@ (*0#P (O++43&Fbc@ '$*P "O++4:S&&_@ ((,#P -O++43&F_c@ '"&P 'O++4V&'_@ "P #O++43&G#@"@H"@H"@H"@ H"@H+++++103G)@^  7 G '%+VfVf*(((('%%%"""P  QN??3]2?^]3]2]2]2]]]]3310]]].#"326773##".54>325#53@&(9$ZK&3]JJ dA<`D%7V"_ (  #86 SQQ=)#+ 3E09۵%0H@M.M% ML@ M)&&&  @M1;_;9M9 M M@ L:#,9  ),@MG,,Q4M4 M4P?++?]+339/]2^]++++]+2]2]210++++++4>32!32673267#"&5467#".%6&#"3(BV-ipRW1C "  &3;!Dc@eA9 1"EgD"QTN   =$(4)Hcn?Q(4V&(_d@  PO++43&H_b@ $(P*O++4:^&*i@ +-) P*O++43D&Jis@ 3/P 0O++4:^&*a@ +,: P(O++43D&Jap@ 2@P .O++4:^|&*b@ +*0 P(O++43D&Jbs@ 06P .O++4:D^&* 4* P+43D &J@ 708P .O++4Vk&+i@  PO++456Kf@>s   Ps y yB BAA????9/^]2222]322]]22210]353!533##!##)!PaSaPPaaPSRccccG@ w!@DL@###_##  "!JJ   @LPN??^]+]2]22??]323]q]10]]+]3#53573#>32#4.#"PJJ];>R1] 2% fEM]El #?X5 0D*T,{&,u@ PO++4$& u@ PO++4c&,>M@&M@ L@ L@ L@ LPO++4++++++ & >M@&M@ L@ L@ L@ LPO++4++++++ &,a@ PO++4& a@ PO++4E7@!0Hs BA??3]]]10+33267#"&5467>7Va  ( *95 K = )#+  E$S@ 0H  &&&"%@ HSI J?222??+22^]]]10+33267#"&5467>73'"&54632( *95]/####= )#* ^!!!!K|&,b@  PO++4P@IJ??^]103#3]]BLV&,-BE&LM&-i@ PO++4G&]i@ J P O++4VDo&. ˴' P+4PD&N д' P+4V&.n-@@H@H@H@ H++++10P @%z Wi 6 ) i (  h@RH$+vtf Ie)9II J JJJ??????9/]3]?]]Ƈ+}]]]q]q2+10q]]]]]]]]]]]#.'#3>73HE<n;@B]]>?6l;?>CNQ#"GB8=?9=@?V&/@ PO++4;6OVD&/ P+4'D&O Ѵ P+4V&/{?@H@H@H@H@H@!"H@%%HP+4+++++++10NJ&O[ H @ H++10V&/b dP+4Ns&Ob{ H @ H++10  `@;j {i sv    )  A yB??99]]]]3]3]222210]]]%!'737 _I!jat TT%B6D-V&>6 V&1@  P O++4P&Q`@ PO++4VD&1   P+4PD&Q $P+4V&1_@  P O++4P&Q_f@ PO++4&1p^&Q^&@ #PO++4VE @/ Hg  s  s"s!@H]K@ I@P`4A AAB?3]322???99]]+]]]+2+}]210+%.'#33#"&'73265##]db(_M/ki] _ :-% %9-25K.F/I1-PE%fh ж H@'L''#%&$JR J#LP?+32??32?]^]210+]+]>32#"&'732654.#"#P jE>R1 !:-% % 2% ]#?X5.F/I1-!0D*I:c&2@ () P*O++43&Rk@  ! P"O++4:&2a@ ,: P(O++43&Rah@ $2 P O++4:&2e@**, P-O)O+++443&Re@*"$ P%O!O+++44Vc&5d@ +)P*O++4Px&U$@ PO++4VDc&5 δ5+P+4Dx&U |P+4Vc&5_j@ )-P.O++4Px&U_)@ PO++4!&6R@ "31-$P2O++4(&V!@ 0.*#P /O++4!&6iX@  62-$P3O++4(&Vi'@ 3/*#P 0O++4!CI8.@DH "54>,))))(A (%:: %!!!s!!v%@ M%%%@_ H%%Kv M   GF@HFJ18>Ay=MRGGGg|FMXFF(AFwV|@MwVE?3]]]+2]]?33]+]2]99//^]]]]]]+2]]+]+]+99+}]]]]]29/993]210]]+7254.'.54632.#"#"&'73254&/>7.'7.;!&D2|m?gS70$(5 -K7kd  (+ $ &?2$ ^Eh -! !->,[fO  %& $2E1Q` ! 9   P (CH/@H%%   F&*&:&v"!r!% 5  zh)956?-g*w**'BE'$;;E$!!!!$J EI29?zFFFE'BQP?]32?332]]99]]]99+}9/993]210]]]]]]]]]]]]]^]]]]+72654&'.54632.#"#"&'73254&/>7.'7976>7(fX,&@-': ($:*PK (+ $ ?G FC!"( "0#EQP! $3%>H ! 9  PC%#@OM L( L!! % s$   ByyAB???22^]]]2]]993310]+++#"&'73254&/>7##5!##& (+ $ %! 9 (aTT JC2l@O4 H00 ",-@H-4#3,)0  -0Q" I??332222+29/2333310+]]#"&'73254&/>7.573#3267 (+ $ (5 ] $*3  9&%! 9  ! 4I/N'3 M %&7_^@  P O++4J&W^!@H@ H@ H@ H++++10%J@,s B  yA?22?^]]]32]]10#3###535#5%ڂaTK>KTJ]@ @ H @)H  ( QI??]]3]29/22+2210^]+3#3#3267#".57 $*3 F-5E*]NF"'3 M6O4Q_{&8u@ 'P&O++4J&Xuc@ %P $O++4Q_c&8@ PO++4J&X`@ P O++4Q_&8a@ *PO++4J&Xa]@ (P O++4Q_&8c !P+44J &Xc` P+44Q_&8e@*POO+++44J&Xez@*P O O+++44QE_+'0HȳM@LMI';'++i+y++(((!"" `s-s,AA"%! | M M MF?+++22??^]9/]993]2]2]]10]]+++".5332>533267#"&5467XDd@a\J%=,a;?%(  #86%*Id:Xh^0K4MQ~$=)#3JE-p@J  )0H  +---/" .,I!I+F&V&&  iyQ?]3]322]2??^]]]210+]]%3267#"&5467>7#".5332>73 (  #86154&'"C  3U&&I& 4JD4@_Pp/]23/3/]3/]310774'aa',XX,.J9bE.@ @H (/^]+]210".7332>731%<<%1b#4!  !4#f @ @ H /9/+10"&54632####f!!!!U?# t@'@H@H     ! @&H/mHk?+]q?^]qq+]q99//]]++10#".54>324&#"326#%%%%2%%%%GE/@0 H   B/22?9/3]2210+"&5467>73326786 ] (  #)#+ =$DtT@+@DT/3]222]]10]]]]'7'7{0s{0sЌ$8$&:C@ $"P#O++4&ZC@ (& !P 'O++4&:@ #!P"O++4&Z@ '% !P &O++4z&:@#5P-O!O+++44&Z@'9 !P 1O %O+++44P&<Cv@  PO++4D&\CP@ $" P %O++4Y7'@ABBA????/ԇ+}10 #7yWK3I <@& !   q?^]]]]]104632#"&74.#"32>PFFPPFFPahhaahha3&&32&&2;OF@(p p?]2/22]]]222103##5#5>7322D,4:@v;]].@DAS Q&(3>_@  @+ H#30 p?229/]2^]_]+10]_]#"&'732654.#>73#>PT A35))D4 ؜^V5E <# 2f/?(A%3I(l@J&&p6FV *6 F V  ) &!)9IYq?]]9/3]22]]]]10]]4>7>32#"&7"32>54&%$D_<!=2#%&6!#5$KM'$0$7V;= $#,.%Wk7C  "%;CD@+MziO_o  p?2]]2]]]+9/10>7#5!_'/2-";*[VKA7GYd2 3F+7@a75,&o 9)2   O_8555)) k { 4 D T  # H0 H/ H Hq?++++9/]]]3]3]3]]2]]2]]2]]210]#".5467.54>3232654&'74&#">FLH*8"$$2$4!$)#93%%*/2? '1/(%-.#  " &  9C#z@O :JZ4kZK$%"L\9$*  &q?]]9/]3]_]]]]]9/]32_]]10]#'>7#".54>322676&#"CIh%&6!#5$KM'$0!px=0/#,-&Wj7D  AIo28 6Op(>q%Ir%Cs FtCu#1@X   7GW% 'w?  3"# $1s!P  2H!"!#$|,E|F?3]2?9]+]2222]210^]]]]]]]]]74>323267#".='7>54.#"l.;!*5 6M//3 +%H02B)B$?I !EZ4 1=5aYS',EA E2B$/5:U! !;0Ac!3G@&" 5-54*$$'0!!'y'''T Q?22/?]]9/339/210"32673#".54>32'4'.#"3!25 0|IO09ER\0Sl??lSSm? 0|HG~/Q 38A6 3$9aKKb99bK 06:0 29&'nV HH@ H+++109&'nk& H&H&@ H+++102I&'nVtM; H- H H;H-H@H;@ H-@ H@ H+++++++++10 I&'nktM^ HP H2 H^HPH2@H^@ HP@ H2@ H+++++++++10(I&q'nktMN H@ H" HNH@H"@HN@ H@@ H"@ H+++++++++10%I&s'nBtM? H1 H H?H1H@H?@ H1@ H@ H+++++++++102A&'nVq HH@ H+++10A&'nzq& H&H&@ H+++10 A&'nkq2 H2H2@ H+++10A&p'nuq HH@ H+++102L&'nkr5* H H*H@ H*@ H@ H++++++10(L&q'nvr5= H" H=H"@ H=@ H"@ H++++++102F&'nNs HH@ H+++10F&'nks& H&H&@ H+++10 F&'ncs2 H2H2@ H+++10F&p'ncs HH@ H+++10(F&q'ncs" H"H"@ H+++10%F&r'ncs- H-H-@ H+++102F&'nVu5& H H&H@ H&@ H@ H++++++10F&'nsu5= H& H=H&@ H=@ H&@ H++++++10F&p'nsu5/ H H/H@ H/@ H@ H++++++10(F&q'nku59 H" H9H"@ H9@ H"@ H++++++10%F&s'nBu5* H H*H@ H*@ H@ H++++++10 F&t'nku5S H< HSH<@ HS@ H<@ H++++++10)"2@u.y.u*)H%!!K!  y hYLJ Ey    0  4(30##v++QT?22?]9/32]^]]210]]]]]]]]]]]]]]]]]]]]]]]"'>32#".54>32."32>7.@ P#WqBAkO/N9 #B_=2H2N/@(I74C'G O @jKFtJ:T6@jK)!7Y?##9H&MG;Yi- @~H Xudszks  Iiy*s 0 ` p  &Ffvsy B  } l D #  AAB???]]]]]q?22]]]2]]]9/]]]]]]]]]10]]3>73!."ABE'Y'EBA"dFFdlRRlF-Vc%@  /9/9/10#!#caa2"cMM@&M vvv A/2?9/322]9/10+++!!5>7.'5!!d>v-o!({B@<409?0TQSCN\-ZUK?TGRW45N/3/10!!56NOY7n8i @@Cx            //9/3/99//+}+}ć+}10]73#.'  RT D$YZ4'EFJ,UN. 3?@ ==@3H 7**D*t****$*D*T******t***@D H*A k{\8H, @444= = %/////:::%/3]2/^]393]2]_]]]]+]]]qr9/]+q]9=/3107267.#"7#".54>32>32#".72654&#",,++  &0++0&   &0++0& p++,,#**#'&&'  !7))7!   !7))7! '&&'#**#GiH@.  Ry'O?^]]]?]]]9///10463:#"#*'53265bi ?7bi ?77dmPE9dmPE9*o6ala5:i@Ay v     /33229/33/399=//^]]10]]]]]]737#5!73#3!'7#5DBB0qDBB0qO$_OO$_5N6D5N6!D #n@GO  !O$@ H p!!!Q!0!@!!/]]]222+]^]]]]222]]10>7.%.'>#@<::<@##@<::<@i&$$$$&*F&&F[7aXS))SXa77aXS))SXa7"<7447<"Dk44kP&IIP@#@1wf !%`%p%%%%/% $@ HSIJJ IhxO?]2]2?????+2^]]22]210]]]]2.#"3##46#3'"&54632#2 &A4]b]]/#### P G<-NF7dm^!!!!P@P{@wf  H @ !@. H pPNQJ IhxO?]2]2????/]]]+210^]+]]]2.#"3##46.57#2 &A4]bVH] P G<-NF7dmFJp PP&IP&I2#31/I=ox25x8=x 6=xO5px(>5qx%I7rx%C5sx F=txC=uxIoN2 N8N 6NO pN(> qN%I rN%C sN FtNCuN)@ N?9/210#5>D4@H  @ /^]9/]10+3#"&'52>5UY +  2  , 8 @a &@Y @ /2/]210]#&454>7Y!(! a $5$- #F@Z?9/]10#5>Nv=> /v> ///v>/Au #D`vA>>/v>?/v>@/(vE>^/v%>`/}7l>44r3s/3t/(}7x>G|}7&l>l>(}7&x>x>)@Wh!!h9IY+)*N V f  Q)))&hYP?^]]]3]222]?]]32?3223]]]]]10>32#"&'#53573#32654.#"E-8W<%D`|3y22E#(|F?22?9/93]2]^]]]]_]]2]10]_]]".'.54>32232>54.#'32>54.#"+v110[M:cH54.+2VIsP*110'G6 6O2R  $b5S32#"&'!32654.#"E-8W<%D`32#"&''>732654.#"E-8W<%D`>3 #"&''>7 9O0'  #'H7!);*e)F$U.*8  5 pp !L$ 2% Mv@LM@ M' @ L &@ LM L|M M!M!@ M!E  L M@ L| M  M MMF?++3++++2+?++3++++2++22++++10#".'732>54.#"'>322/VwI*H7$WB:W;:X;BU#6G*IxV/[U]1 P (If>>fI( M 1]:3ߵ''@ Hw x  .//?/o///5W&&&&vhW4EUe!!X!h!!| |W  U u F  g X  EJ.Z.j..++W+g++|J/Z/j//hxF?]2]]2]?]]]3]]]]]22]2]]]]]]]]^]22/323/]10]]+]".54>3>32.#".#"3267IxV/5ZxD)8??&    ",37X>!:W:CX$6H0\WW\0 4.G$- &Hg@>fI( P 30u0e@?6$F$%$$$"(/o2F1),@(%I" PF  Q?3]2?3]222]^]10]]]].#"3267#".54>32>32.#""NS)@.%< &+?_A #@]9>;$ b^*F2N (Hc<322654&#"#28fU*e)\M;bGUf8-1  #[ZW+ VH ;@+W.#?@$s%FvY  $y|FyA??329/]]]2105!#"&54>;5:767#"o020*PsIVb$  R2O6 6GdQUon325@&(9$ZK&3 dA<`D%32>54.#"+<$!,5D$2,!J404*7ES8_H;X:" 6'#5#.;! "#E?42&$2  L&lT*YH.*DW  )3:!;-1;,$% @@ s   y y y A B??9/9/9/9/9/1035!5!5!5!5!%_"SQSK8)"@MM M MȳM MML!M @'M)MLM M Lv@ M@L@ M+ +*M@Mv@MM@M M M@M*y))$|@ MF| M M E?3++2?+9/++++++++9/++++++++10++++++++++.#"'>32#"&546732>7" wz 5* $4D'WT)0TqBc-C,3K2r} P 6`M\\-O1R;!(?P(38"M4 M$M#M#L#M@$MM M88+:2v!vMM@ M MPM9,@M,/|&7y+M+&@L&E |MM MF?++3+2?+3+9/92++++++29/10+++++++++#"32>7#".54>7.54>32.#";>-M9!_U8.%  (6D&?hI))7;=$@X4=3) X7@M$8D!4F 3(D9 P 2O7(<-T0/E- O 9-#. E8@s| y  H GyA??+39/2210!!!!#"&'73265V !:-% %QO.F/I1-:5@}  x !#o##W###_5s7?7o77g-&--vx g   6##u#T#E##((||FgXE5W222|hF?]3]]2?]]3]9/22]2]]]]^]]]]]]]]23/]]]3]310]]]3#".54>32>32.#".#"3267a -;F$IxV/4YxE-:??&    #.75VfI( H'3@91s+s""$(2* * )* *%&' $   $2 $* $ s * *322s22$  54*$2$t$$?$O$$.y) C A A?.??^]]9]]333]99+}ćć+}]3/3/10]%.'3>73#".54>732654'!@@B%e5i;;h6c%C@?!  "8))8"?':zQrttsQx:1,*1((1*,15@ '' P1)@'&)++$+T+d++++:++++4+T+t++++++++@+`+/+++++ +@+p+++++! *!M$L$@  L$P NJ@MMM LQI??++++???+++322]]]]qqq_qqqqrrr^]9/10^]]_]]%32653#".=4.#"#7>329<<9].RAAR. 1%: ]]6?Q/XIIX,TA''AT,30D* P #?X5Vp0@   s|  H FA??+32210^]33267#"&5Va/0#  9"`R>6 P ak7 0@s  y BA??9/3/29/3210333###daddad&KDV$@dy '$#"! +;M$4Ks  I :  (  /OM H(s@BMD0& s % |tE;   {6 A BB???9/]]9]]]?33]]]322]]+2^]++]2]]]+}]]]q+q10]]]#.'#3>7>32.#"+c`SrPY\*aa59<7-*:,%9UtYdi//_WJAED #E:fP(@# F 9 8  xL#M#@]L M LLt#$##$* )$I9I#I&6O J JJJ?????^]]32?9/]?]2]+}]+++++2+10q]q]]]q]]#.'#4>32.#">73 CA:m7<>] !:-% %:82m6:;DOQ##IC8M.F/I1-:<7<==G@ 8  H @ H   NQ??9/3232+10+].=#5373#VHNN]\\ FJFCF '@Vf3 $    #!$$ $% %     %  ' %%$%$$$  W0  ?$$)0(%J$J  OJJ???392333]??qq9/9q]3+}ć+}ćć+}]^]10]]]]]]]]]#>7''7.#"'>327#./' _,6? jd' %5$?"K;0+?)R?^Vy/j@D///|/x1)s''s s 0(AA A*--'"V"f""Vf|F?^]3]22]333???]]10]]]]%#".5332>7.5332>73#"& %1<"EW1a 5*+$ a 5)$"a%zE3P- )Jf<j9R5  M'j9R5cW E!@1wss@ #s"@Hm[@*IP`pD!BAAA|  H   GB??^]+32????99]]+]]]+]2+}]10!.'#"&'732653319BGFB :-% %M/ki] _%\cf_T .F/I1-25KPGL@ L J KXLP?+3]2??^]10+]>32#4.#"#P jE>R1] 2% ]#?X5#0D*I:%@LMM M M@ M MM@M!M!MM Mv @M @ M  '' M MM@" MvM@M&! yM@ M|MFM|ME?++?+++9/]2^]+++++2+q]+++++2+10+++++++++4>32#".2>7!"!.:5[yDCwZ55ZwCDy[5K1P:#: wddv #;O[Y[..[YY[..["?Y8p*~o7W>!:!5@\))$/h )  v,hw77g&vx$$$$63,X |g)))EW|hF?]]]?]]]33^]]]]q]]22]2]]29331032>54.#"#".54>32>54&'3 ;U54U; ;U45U; 1)&$*5ZwCDy[55[yD7d*^[?gH''Hg??gH''Hgc0V$-|OY[..[YY[. 5#  3Et ,x @= M Y'i''*.V!f!!-G$W$$$QH*X***@ L[P?3]+3]?]^]]3933]+2104>32>54&'3#".732654&#"3$AZ5.P\R$AZ55ZA$aNEENNEEN=eH'3#  eI P.>dH''Hd>XggXXgg9';@n y yv v--)-i---=< s ==&7f77v##<((|x)iF BIY|fv22|w&fE?]]]3/]]3]2??]]]^]]]9/]]3210]]]]]2>32#4.#"#".54>2>54.#"w3_'U:ES-a 0" 1!'2WsAAsW33Wt@3P77P33P88P(&Ec32>32#4.#"4&#"326$?W33W@$$@W3'EI,dH''Hd>=eH'#@X4#.B, "T2XggXXgg(u@K( GW$vGWg*0** s s P p  )y B |@E?23?9/]]]222]]]10]]^]]2+#.54>"#32>54.t+QtIMa\M;bO..I2P75Fon7#"&'#4>32.#">32ZK @&(9$a54.8AFhHz'aa%2M ,E2P73E$MhG.RkmDa+ 3*'4 0-M)M(M( M@M M  M M M@L(L(,,(s(,M@ M, Mv%M%M%M% L% H2/M/vMM@M M L @ L HM 1M|"M M@M,M,, MML"M"@M"E|L M F?+3+2?++3+++99//++++2+++++++++++++++99+++}++10+++++++++%267#"&54>7>54.#"'>32D^ '6E)y7K-6($07Sg?m|2D&!;.E P b[1E2$ &%  Of[,>-! !- h'+@wv'v& 8'$ 6F%'   :J+ !$' $ '$'$ ''''  0-)   ,8''PQ?32?399]2^]2]299]]+}10]]]]]]]]]]]]]]7267#"&54>7>54&#"'>32:FNEbl*:$75:'-@&+Xf(7>67CPJH%3$$#!PQE#0" ("!! @aWV    s   s   z  wy AyB?2?9/2^]]]9]+}ć+}ćć10]]!!5>7.'5!!t7|/y5=@=91-5:iHCSIDIL'&LG>=S9AGE(V@. H (( @  ) @%OgwHR?+]?23/310^]+.5#".54>32'4&#"3267 VH!+"1 !7*UF]"" !  NFJ9%0/*`U(+)  JE|,R@1  H$  .,*-  $ '')''QR,I??32?]3]2232210+3#3267#"&'732654&=#"&57 $+:  6,$ & "UI]N'3 +E1D2-gi@9@!  * su@   ByA?22?^]10]".54>3!##*2P 1=ad+% -;"QdJ#j@D v  %#$h  vO  ( QI??]]3]2?^]]]3]22310]]]3#3267#".54632.#" $+2 F-5E*aj*:  , A4N'3 L6O4ndm P G<E%Z@;  ( O_syA|  H G?+32?2^]]]]2]]10]3267#".5#5!#K% %-:! -1I/F.dQQQ!(K@.s% s @   **s@)({!AA|I'7F?]]??]^]]]10#".5332>532654&' 1$AcDDd@a,=%%=,I#! .':dI**Id:X4K00K4"$ Jkt$f@1 M"!@M@M@ L& &@%"II@ L L Q?+3+2??]+++2210+#".5332>732654&'3k 1$ iE7#5!32>54.'5!#AuY5$. 6( :R22R: (7 .$5Yv+U~S/VJ=RD=JY6;^A""A^;6YJ=DR=JV/S~U+Qt#[@;e V IJs(8Hvh% s $|A A'7|F?]??]]]10]]]]]]]#".5332654&#"'>32tCpUEa>a*9!aaAM @V4dBkB*Id:X4K0Q3[} @[MsK[k8$ "ss!(H B|EAAB????322?9]3^]Ň+}2]]]]+}10+3.'3>7>32.#"Ez6r'^1 ')#4/,:0+.,jdRNKLA +,!BLVSG8/@ g&&.-7"G"""'((@YH""((hW6F%10.(-*P II K?32??99?333^]]9]]]]]]]+}]+}+]210]]]]"#".'732>7&'3>7>32&A&*4A)  #*! ?m$d &,  :>)vY-@)K 'w-hno3'LMQ,7>H !y@?   s      yy A y B?2?9/3223333^]Ƈ+}ć103#!!5>7#53>7!5! \1,O S/w-T#h$qDK?|8QA7EK?n(Q$y@A          I J??9/322333^]]Ƈ+}ć103#!!5>7#53>7!5!A%p9"s=#X8wK0B*T'L:)^0B)FL,~@OX sx  H&X&&vwi.-{Y+++#|XIF yA?2?3]]29/]2^]]]]9/]+}10]]>7!5!#".'732654.+74..8<-Q<#)Ih?&D6(  %.8U_!9M-<<8Q::?@1J16O3 P :D(5 2,@P'''#s,',,',&.#viyV7-'#&y%,{YH%A |IYF?3]2?9/]]222]]]9/3+}^]]]]10]#"32>7#".54>7.'5!!-M9!_U8.%  (6D&?hI)#7.'5!!_&H8!VQ/R]7;`E% 7K*50) )/2 1'AG P 6Q61E-AA;6N7=<C-@&  ,Z7H W | #"! $  <   $ $ $ $$  x  h //*.wfx$$5$$$$+   0  +I?2/9/]]]99]]]^]]]]]2]]]]]]]9+}qr^]^]+}^]10]]^]]]]]]]]4>7>54&'5>7!5!.'2$B3Xk3S W60H/%AW2"I r!) ' -/>-SN9)[0&8'0;'  $(*@] !)X))$v7###,,!v%%*$+%!y#y))#By  h  |&E?]3]]]]2]?9/3/2223]^]]99]]9910]]3>54.#"'>323#!!&>7#U#1)!4(.'2?&gq) W8*<?W*9ti#I,* Da\*O&I9+K Q.OF?+@hX%vc@B I@--'s" ###,yH)9&y"y$A|h  HHF?+]3]2?9/]]+^]222]]+_]10]_]#".'732>54.#>7#5!!Ř CfE;3&!+5/A)GtUawg.N8  R "-&:(&D@> QQ274)U@2(+$ *$HI Q?32?9/+2^]222]10]%#".'732654.+>7#5!#32up91$+3GC2T@2Q9]B$KW N +)' 8Z0JJ !# +B/%@f$#x 9" "" " " ""   e  %''%&J ;  *: QI??399]^]]]22]]99]]]+}10]]]]]]]73##"&'732654&'.5J^ %$:*qbESL:9<6>4%M& $2%HJP!") &9,PG  T@4 g{  WgwPvGiK?]]]?]3222^]10]]]4&#">7#>32NF*/,ZH-a8`~F] dA9Z?",EO r(>W3232>7(BV-hqdSV1C U6Dc@A9 1!EgD"PUN )Hdm?Q(4&$@-P,3O %O O++++444+"&DK@8JPHPOBO6O++++444&$@%&P'O O+++44+"&DK@BCP32.#"32675#53aPP -;F$IxV/4YxE/J5"b45VfI( pI3G@"5M@sMM"44#17W)g)F)7))UeHI6fvR#& 43 P111./^]3]2]?39/322?]32+]]]]]]2]]32]210+]]++%#".54>323##"&'73265.#"32675#53 E./S>$"A^;Aa!NN|~1W Q,SI/(KQ'3%>pp4?^A9_E'Dxl Q BHbQ-@*jD:^&*_@ ,(, P-O++43D&J_e@ .2P 3O++4Vo&._@  P O++45&N@  P O++4:E,@*@*M. >   I:i @ L!@L!'@M 7M7 M7v M @M @ M BB-M-@+ M-vMM@MAL LM2M2 M2@$ M2|(M(M(F<M< M< M<|MME?+++++?++3+++++++++++]+++++9/9+9++210]]]^]]+4>323267#"&5467>7#".732>54.#":5[yDCwZ52D)&(  #86Dy[5f ;U55T; ;T55U; [Y[..[Y@iT< =)#+.[Y?gH''Hg??gH''Hg3E(4@i(<L\ +@ Y)i))6V/f//5H,X,,,$PYi G2W222Q?3]2]2?]^]]]9/92]2]10]]]]3267#"&5467>7.54>324&#"326F<+(  #86 2S<"$AZ55ZA$aODDOODDOV =)#+ *Ga;=eH''He=XggXXgg:Ec&O@ AB PCO++43E&Pk@ 56P#7O++4&_[@ -1P2O++4G&_@ )-P.O++4G &]_@ L P O++4V&'=V~&']3&G]Q:^&*@ L*( P)O++43D&Jd@ .0.P /O++4VX@4s ss  yBu f U F  |F IAA????]]]]]?9/9///2103!332653#".=!#VaSa=II=`4YEDY5a"Nb[[b7]D&&D]7SVGSM@-   vsI|B9I|EC??3]2?99//]]2210]]#>325>54&#"a19@!@oWAqS0cU0<G ~WjQ![=QmKQWV&1C@  P O++4P&QCm@ PO++4#/3e@ M20Hwew e $122 @zH ****-300@H@$$$$--   s#"!  s 5@5p55540H03211 HW  @- H '-y#@  z Y i   -ABB???2/99//]]]]]32+]+2/+^]]]9/+}+}ć33/]+]2/33/]+2/3]10]]]]+]+7#>7.54632#./.'4&#"3267'7?e%C?>!7&%8!>?C&j ?"#?-gG $+11+# Gg-X-OXKKX<7N+&DK@ ?6P+444&w@ PO++4,%&@ XV ,P#WO++4:&@ 20 P1O++43&e@ -+P,O++4&$j@ P O O+++44+&D!@ =7P54.+532>54&#"'>32#"&'7O9lT4-BN!&(I8!ME7Sh?6ZA%!2LUCoN & d,I92A&N%9&BH O6S:60( rHPlBT G3@lK:Uw  wvw ((w5t  ""54./4g  #!!wR.+/P?22?]]9/2]^]229/9]]]]10]]]]]]]]]]]]]]]]2#'>54.+52>54&#"'>,L7 ) 2"DlA>?=/'7> =/;6-J *.,C0+' *1F\6O "1"&,M , 05P Vk&+_@  PO++45&K@  PO++4VGS?@&WDEs s  | 7GE BC???]32^]10]]]#4&#"#>32SbRZ(&" b7AH&Hb>Org )Jf<3D(7D3@e H4'$G3iX&(# ###77;BGF711E%$? KO)),f W  P8874Q?32^]?]]3]2]??2]]]2223]]310]]]]]]]]+]%#".54>327>32#"&''7&4.#"3267"32654&8<`D%54.7#".54>7.5467332654&'3O)C23C%%C32D-03%MlF &20- ^ ELLE ^ O 1"#22#"1 9T +9#bq7N1$8+ T90D&#F#CGGC#F#&D4 9e@>637 ;*-)#&:#v00D0T00RI6N)NF V  Q?]??9/]]]]99^]22222210%4&#"326#".54>7.5467332654&'3ODDOODDO>0',!$AY55ZA$!,'0 [;:9;[ MZZMMZZ9X )7C'8[A$$A[8'C7) X9*Q*#G#QHHQ#G#*Q!E#a@7v   s%!$ !y"Ay  H GyB?32?+?3^]և+}]10!#"&'7326=!5>7!5!#cje$ :-% %f9AFEAh&~CQ.F/I1-A(`ef^SQ$E!e@:##" I  H RJ?3?+32?^]]և+}_]210!#"&'7326=!5>7!5!EOO 6,$ &FMIwTfp3N+E1D2->,ji] N|&$b@ !P O++4+&DbK@ 8>P6O++4VC'|@K H @$''@ H    )s( H$@ H$ y y ByA??39/+^]+2]9/+23/]10+3!!!!!##"&'73254&/>7V"_  (+ $SQS ! 9 (3C6? @  HcD@M4M944*4 4  HL@"M2//&%++@M7 A?M? M M@- L@%"H"&)/@ H/?  2@MQ:M:P?+?+339/]2+2+2^]+++++29/]3/2]10+++]]]++]]+4>32!3267#"&'73254&/>7.%6&#"3(BV-hqSV1C K1 (+ $8P5eA9 1!EgD"  PUN ! 9  "-G\h?Q(4:&2@*< P:BO4O(O++++4443"&Rk@"4 P2:O,O O++++444:&2@7( P32#"&''7&457"32654&,1#$8'9HK0h]L"(##%$H'43*/)[*~$,+*PD,9@fvdt  vvD117;p;O;+:+J{ %5   ---4 K*X%%P?3]2?]]33]]3]3]]?]]]2222]310^]]]]]]]]]]]]>32>32#"&''7&454.#"#%"32654&P jE>R1,1#$8'9HK0h 2% ]"(##%$#?X5'43*/)[*~0D*I$,+*D)x@J  ''++  *IS& J$    R?]33/?^]]2]]]2??2]22/3]10]]]7>32#"&''7&4573#"32654&,1#$8'9HK0h]L"(##%$H'43*/)[*~Ne$,+*3j@@=B433!BB< P11 P)A4117  L .7@L7P3N!$$ LQ?+23333??+3+22333]2/]]93/310^]%32654.#"#.#"3267"&'#".54>327>323&KZ$9(&@]@&(9$ZK&3-NM-<`D%32>32>54&#"$9(&@/*KZ<`D%73737.'-[6ehD__?c(FCB$V/FE#CaSV  .j-X-nKfNX=z:a %0@ *)h)W#$ $k{9Y)* $% %$ $ %$ @ H2a202$&&&&vhV1))IY|$#i[IkW!!F*V,|FV XE?]333]2]22?]3]3]]]322]2]]]]]]]++}]]210]]]]]]7.54>327.'3267#"''&#"BK4ZvB/ G '5B[%8I*@4+G&&3T327#"   u"%@ (,%#>==#@]9  >nNSN N PQ!}S '"',,("+'()I"!JZjI:K?]]]]>]2?^]]2/+}10]3267#".'.+5>7!5!EOQ!(  !#' & !1($ !*6 FKIwRgs7 "O$ >,ji] N'@T  iyJDsi y  v)(yH"6"("""|@ HEBB???3+29/]]]^]2]]]9/]]10]]]]]]]3#54>7>54.#"'>32a!1!!&27X )5<sy#/% );/% !%  P _S&7*! * %@eJ;J%%2  '&vE h 7    wVfPJJ???3]]29]]]^]]]]]]2]9/]10]]]]]]]]3#54>7>54&#"'>32Y*.@/,)"  '27bg&  !0'+&  M MD.#  ]1B@bH*g8vgsf,vgw D DPDD" Bs CB=|2y1y    1 1 E"'|F?22?399//^]3292323]]]]]_]]2]10_]]".'5#53>323#232>54.#'32>54.#"110PP011=!KaLaKKAcDDd@KR%=,\KS:dI**Id:S0K4HHh^V3@d()  )8H* s9( y y ByA?3?3339/32223323]]2^]]]+}]10]]3'7#!73#!37#37#1E&XzFFgfYfv\EMP3g%,15@u# '&54#" "" &   10 ! ?!! ! -7?72,VfG66"!G444W1&,5# @ HQ0Y'' v e  IP?]33]]2]2?+3339/]3322]]222]2^]]]]]99//]3}]]]3210]]4>327#3267#"''7.?&!4&'73)DX0  >|3'2GY62*>>90%:)*/)EgD"TP4 $  SU#{}+91>DT,e@= swh yyA |  L  M MF?+3++2?99//9////]]210^]%#".'7326=#5333#5YC"9." &C2HBaPP2VA%  M!IY\K&KE#e@)!   %$   @ HSIR???+99//9///^]32310]"&'7326=#53533#"&54632 &  0)\\]NNZ+####L;9FFda!!!!!:E?$8@  L  L$@L$M$ M$s%M% M% M%v/@L/M/ LL@ M//:94M4|@ L ME*@M*|LL@ MFy G?2?++3++?+++9///++++++++3+++210++3267#".=#".54>32!32>54.#"% %-:! 3>D!Dy[55[yDCvY4 ;U54U; ;U45U; -1I/F.c*.[YY[..[Y?gH''Hg??gH''Hg3Es/a@<  H/'''''10( 8  G,W,,P" H"QR?2?+3?]]99//^]3210+3267.#"3267#".=#".54>32$9(&@/*KZi% %-:! E-8W<%D`32"#32>54.243j/0/aPP)e*L#  X.H33E$BOV(&OH?KM nmDa+ 3('4 :@ J  P?2222?9/32332102.#"3##5#535>  3(3]JJ!bQ FF Z$@"!   $ s     s  s  & &P&&&%By B A AAA?????9/923/3?^]2/]]2/9/2+}3+}ć103.'33>733##.'#>7#S)n&'h*T~:a ;}($# &J%%J&&J%%J&I0`01a0w: :G*/y%M@M.+*- &*)&* *   +++ &  &+&+&&&&& &   vU7G 101@1p111 *0 #*&6@ K I III?????39/]9]232^]22]]29]]]]+}+}10]++]3&'33>733##".'73267.'#67#K&a  ]BX0*4@*  #6? ;eu;jc-i73e56d3DH<-@)K .7<CLOTG(@e     H( 8 X   "vi 0**)g((K I?2?329/]^]3]]]]]]+9+}]]10]]]]]]7>7!5!#"&'732654.+x2/()05*K7 %E`;7]R/QV"7H&<=7N6;AA-E16Q6 P GA'1 6bB.@@H'  /3]^]+102#.#"#&>1%<<%1#4!  !4#DdG@#DT/32]2]2]]10/'s0{ms0{$8$_?t@ HiH@@H  iH H @ HH/++++]2/++2/]10+'7#"&546324&#"3268%&77&%8-E<7N+11++11+!KW" A@H @H  @H/+/3/+]+]10"&546323"&54632'3#W K@=K;" 1@ @H@  H /+9/+10"&54632'3#  K@K\V @,tE4%Dt6$T1A"@; IKktcT@wVv~o @.H@H  @Od@H/+]]]/3/++9/]]]]]]]]]]]10]^]+]]]]]]]]]]]]]"&546323"&54632'R `-oK &K\V @Lv  Huv v@ H{o @%H@H  @O@H/+]]/3/++9/]10]]]]_^]+]]]]]]+]_]"&546323"&54632'R L323267'3#U " - "      j@]30@ZzM@/10+]'7o<7NA67:@  @/]3339/^]2]210]''{^^_-==-A675@ @/]]9/32210^]]77A^^{-==-_zp@yjy @"H@H  @/329/3/2/2/++10]]^]]]]]'"&546323"&54632`-o  &zb@Ue@H @H  @/329/3/2/2/++10]^]]'7"&54632!"&54632$o-`\ &z @@6H@`@H@ ` xH~xI]N0 H/+]]+_]+3/3/3++10]]]]"&546323"&54632%774 ^^{-==-_V&(C@  PO++4Vz&(m@  PO O+++44'MM@%MM L`pvs@0M@`)(#| MyyAB |F?32??9/+29////^]]+22]]]10+++++%#"&'732654&#"##5!#>323K1 <;^T#Ca $&DeB!,M9 MJ9LF aTT 32.#"!!3267IxU//VxI*G6#UB5R:!0!;S6BW$7H1]VU]1 M !&v (ssI Y   21 I Y  1) ,||%% FyA??339/2223/]39///]2210^]]#'>7>5!>3 #"&'%4.#*32>  )=S8 FM)4*NpF*`*|8M.'/%F5 bpZ-O;$THJU8T8 *8  5V)T@/v&ssIY+*y|##AAB| F????9/23/9///]22210>32#"&'!#3!32>54.#"\)*NpF*`*aaDa[%F5 8M.'/ls8T8 M 5**6 t@Jf  ss|wVfHyyABB???9/]]]^]29////]]]]]2210]#>32#54&#"##5, $&D[7`DS#CaT 7!3#5!l\I37W\,(= :VbB;V(r1 @,$$ssr$$% %3'', && ,''s--'  s} s%%%----2-B,B&B %BBBAA A AAA?????????9/3???^]]]2]]q+}+}3/}]3/99}3]]q+}]+}10]].'33>73#.'##>6IIEq=EG ]GE>pEIH(PKBnDHI!]!JHCmBKQp#UWT"LSU%5%UTK"TWT#$Y`d0.]WLKLW].0d`X 8@!!fgO8_888) Mv@ M0L2vM@L: *)))9y77*@ M*/|)M)$F | L L M ME?+3+++2?3+2+9/2^]22+++++39/]10]]]]]32>54&#"'>32#".'732654.+4!D8$M@7X )3< 4X@$=;7))Ih?&D6(  %.8U_!9M-> .#-9 O -E/0T-<(7O2 P 9D(3 V@   v   s s   @Ps B B;   H9 *    AAA$rc@P2#B?2]]]]]_]]]q2???33^]_]]+]q??]q]+}ć10]]]]]]]33>73#V_ ]ik/M_BFGB952K T_fc\%V&@  PO++4Vo. mO@2(s s    ByA F  y F?]]??^]2]9/]10]'>7>5!#C)=S8 FMab8ic^--O;$THJTKbC%0Vk+:2Ve*@s sBByA???^]10#!#eaaKbV=3:S&%7C$@sXs $! cs4DT' &&o& &P&&& % AXAAA | F?32.???9]?^]2/3]]]]9]]]]]]]}+}]+}ԇ10]%#".'732>7.'3>73+;S=  %-$ ,NB6n!g?(I i....Q<"R 'Gw2Wu[lHuo8(c;VG 1@s s s AAyBC??2??9/2/10%3#5!3!3eW\aMaSb:!L@, s s|y A B A???9/^]]399//]]31032>73##".=3%?0'$ aaO-L`7`*?)_K #A]9V @w s s s o       0 P p 90 P   0 p   0 P ` yy AA A B????]qr^]^]qr_]q9/9/9/1033!3!3VaaabbKVG]@9 s sssp_ @ yyB C AAA?????2^]]]]]9///2/1033!3!33#5VaaaW\bb M@-v sYi"! |y A|F??9/29///^]]]2210%#"&'#5!>3 4.#*32>*d*);f 9O0'- 'H7!pp XS*8  5V $O@-"s$VvsI$$&%&|!#B!AA |F????9/2]9///]22]10%4.#*232>7#"&'3>3 73#8M.'""%F5 f*NpF*`*a)4iaa*8  5*8T8 KVC <@ v sVI  |A|F??9/299//]]2210%#"&'3>3 4.#*32>C*d*a);f 9O0'- 'H7!pp *8  52(@$v&W gy )vh)vM@MM*    )@ L|$yM L$M$@ M$E  L M@!M| M M  M MMF?++3+++++2+?++3++9/]2+^]22+++]]]]9/10]]]]#".'732>7!5!.#"'>322/VwI*H7$WB6S;!0!:R5BU#6G*IxV/[U]1 P #@Y7R4T2>54.#"@sW32WsA?pU5aa8Tk;3P77P33P88P.[YY[.+T}SKrL''Hf??fH''Hf??fH'$%/@3 s 11vx&&+0 M+@Hl+/+?+O+++ s!@! H!!!0H&&y BB | ||E???9/33]^]+3/]_]++3]2]]10_]";"'.'2##"&'#>7.54>c&E6 __d  #010aS**)f,/+2**Opg 4'J9UU@HN%'TLA.E06R7+D>"7@WV&%f-Y-i--95#f##g8g OW(F(( Q5I22P?3]2?]]?^]]]]]]]22]]9/310]]]]>32#".54>7>732>54.#"S&ps;Z>G^7Bu\) -$cj !8,&6" "9+*Mz4`J,4ZxCWrK T b/T@%2C&"@2$ (P6b@<4&*/',7,, 2x222 228#7'/ $'P# Q?32?39/222]]]]]310]^]732>54.+72>54.#""&'>325'$1oc-!'1/a;dd;)N<%& +3%AXF!!E  !9*&6;5/>&P@ IJ??10##!]BFoFX@4  GW L J LI???22?]9///]32]2/1073>7!3#5!#%#8!'UFXzX!L0fmwBDݑn/_]Y*3H- @'$$###g#w##*-- *)*)     4));(hx '('(/ (.-I)I(I$I#IJJJJ J JI??????????9/3??^]2/99}]3]]q+}]3/3]]q+}]]9ć+}]]+}10#.'#5#>7.'353>7267@=8h7;;Y;;7g7=@762g$^?Y?^$;?>DIM$!ID;;DI!$LID>?;-nHHn-,6@ M%   M@< M& 87' G  8127 !Q1,2P?22?329/]2^]22]]29/10]]++]]]+2#"&'732654.+532>54.#"'>-N8  .5xg?[S:?B&,WT'! +*( "+0$6$&G6JH O''#J  P P@8y   ZjI I I J @I a q R 4 D  JJJI????3]]]]+????3]]]2/2]^]22/]]10##3>7ZHHBSZBGG&fmj)+ge]"P6kP  N@'8H      JI H Q?+??^]2]9/]10]'>7>5!# !0@+ 19Z]!KKI 8+N 6'"V]^*C$@K)9I +&&&   & 6 F   $%JJII0@@&+H| I? O  @&+H |  IJJ???9/+q?+q2????2/^]3]]322]2/]33]]10#>73>73#.'#. Y U V88V V \ *)$ N %)*cW=<4vv4<=WcWZRR[WP ;@"      IIJJ????9/2]^]210!#5##3353]]]]3RP*@ IJJ???^]10!###!]]FPGS3F.@ JI??^]]]10###5]NFND\2G /@/1**% /$"##0 @3M&6//v//J)9"y%%%%I#$OKK???3?]3]2?]]3]]+2^]]]}}]]10>54.'#5.54>7574G))G4)G44G)Z;hO..Oh;Z:iO..Oi:,D/r/D/D,+D/$Ca>>aC$$Ca>>aC$[Po5 1@   IIJL??2??9/2/10%3#5!333FXs]]MޑE.T@3)        I JI???9/]32]^]310]]]]326753#5#".=<4&3]]!$+G3;/*E4P @s    ? O   H     0 @ ` : P p  P p   @ ` p  @BEH II I J????+^]qr^]^]qr^]_^]r9/9/9/10333333P]]]EEPo-_@;  0`p J L III?????2]]]_]]9///2/103333333#5P]]]FXEEEޑ8'b@> &)"@ ( "#QI??329/32^]]22]]]10]#53>32#"&'72654.#""+L9" 32#"&'#33 =B#,]A)J8! :R1/`-V]].3$ )A-/B* P%P@0'' &  #QI??329/3222]^]]]]10]%2654.#"3>32#"&;D#.9]"+L9" 32@`@8V %(QQ MK)> !'*?_@!32#".'##34&#"326r)>P.3W@$$@W30S>'q]]MAAMMAAM14T< 'He=>dH'#?Z7XggXXgg'u@L ) )   ##(& JJ PJJ???32??9/^]33]]]2]]2]210]]%"&'#>7.54>32#=.#";' ;^ !"$ !:O/B\\ 3!9FH9]0m/=:4 $),B+ /32&36HCi36HbE/@  H @IL#@111_1 .0/J R.h)) @LPN??^]+32]2]2?32?]323]q]210]]+]+]3#53573#>32#"&'732654.#"PJJ];>R1 !:-% % 2% fEM]Ek #?X5.F/I1-0D*SP6J3$]@ &P&W@ H%  Q  P?32?39/2^]+2]]229/104>32.#"3#32>7#".3!@_?+'! =*KM QQ)% U9A_@9bJ* K OCKKU O )Id(VBL6 @POO+++44EM A7r@F8+)+7"#66"6"6. 9-..8"7I.f.v... -!Q?3322]]?9/32]2]99//]210]]"32654.'>32#"&'#'>7>5!g3 =B#,zA)J8! :R1/_- !0@+ 19Y.3$ @)A-/B* !KKI 8+N 6'"V]^*P5+Z@7  '&-, IIJ$ Q????9/3/2^]9/]3210]2#"&'5##3353>"32654.i)J8! :R1/_-]]\A3 =B#,M)A-/B* L.3$ P 6[P6CxD6\FPo 8@      IIJJ????^]9/10!##5#333X]]E3(8@&''* 0WE4%$#"&"..i.W.,&&&",&,"&"&"", i))/:hf11   9v"""7"G"g"",NF6V666Q?]?3299]]^]]]]]99+}]]]]]10]]]]]]]]]#".54>7.5463267#"4.'326;\A=[<*9" -]NAKI-0:  .T@%`.5AL#8'HK3bK.)G]3-OB5;+EKO# 1AY@1F1 sJ"@1h)r@D$s+Yivw+*y### yD%| B?32?]22/9/^]]]]]99//]2310#32#".'#535332>54.+2VIsP*110ak'G6 6O2R  $B5S32#"&'#2654.#"]"+L9" 32#".%267.#">32".#"3267:5[yDCwZ55ZwCDy[5-#:Q23R;"<-$<99$<99!&<t\^t.[Y[..[YY[..[T9]A#$C`;L%bowf 3$5s@0!8Hx(Y"i""7.Vf   61@H1@H%%Y++PFVQ?]?]9/++^]]2]210]]#".54>32".#"3267'267.#">32$AZ55ZA$$AZ55ZA$&$#& L<>M ! LdH''Hd>=eH''HerEOVK B FPVK  @V(7hs   vG  s    s  A B B |E?222???^]]]2+}]]]+}10]]]]2.#"#.'3>!9+  ["ACF%k6h7 $2F &0Kn܀ 4&:@R(x     PIIJJ?????322^]]]+}]+}210]]]!#&'3>32&#"%T1i'd !%&f *)! j 1omf(3+H VC-!@/x-, v+*#$$ ss  s  /@/P///s. yBG; H9* A#+$****'''' AA$rc@P2#B?2]]]]]_]]]q2??]]22?33^]_]]+]q?3?]q]2/2]+}ć9/10]]]]]]]]]]]33>733'>7#"&'73267V_ ]ik/M\!-C TBFGB9>PG&!!&FO52#JHA* ', T_fc\%@9 (( 9@PZ^+@f- )(!""y -P--,ZjI!)"((((%%%%IIJ@IaqR4DJJKI??3??3]]]]+???]]22?3]]]2/2]^]]222/]]9/10]]3'>7##3>7'"&'73267X'@RHHBSZBGG>PG&!!&FOE#E?7("'&fmj)+ge]"T@9 (( 9@P(d@3 #"&'#535334.#*232>F);*e)PPa 9O0'  #'H7!fpp IMMq*8  5"+k@ '@4 H-,$  0  QPP???39/]32222]32]3+]10]3533#>32#"&'#"32654.J\A)K9"!;S1/_-J3 =E#.EEAa'?-/A( +3# V=$@\H"6F  s0 vGWg& s%6vy 6  B|E?22?9/9933]322]32]99]+}10^]]]2'+#>"3:7'7>54.FA@@K3Ma)e2>!I.?:&(5FonN_o% UP&e:1(4 PG'@eeu     ZIX)9I)( #PK  Q?333]2]23??322]]]]]]]99+}ć10]]4&#"327'7>7'#"&'#>32ZK*/@&;==a416>9 $-E]!cA<`D%[bg%kO0Mx#\$b  &FeV9#@s syABB???1053!#XaP)@  IJJ???^]1053##HT]F 0@s  y y AB??9/323310!3###53ʛaPPTK>K, 6@    IJ??9/^]323310#3##5#535!咒]JJBFFVGJ'@V/Iiyv8))s(8|##yABB7 &  yC?]]???9/3]22]]^]]]10]]]]]%#"&'732>54&#"#!!>32J$Ec@ (D1gQ#Fa $&DgE"AqU1O;V8rp S,PsPF"a@=vg%/?  gV$#IJJR????9/322]]^]]10]]]]2#"&'732654&#"#!!> si6P4   ?EEK6]b"@x6]E'JW]_PMG39@ +&&s% % %3.33s .-.- sr--s    }  , 55  +,+,   s ,s43A-A ,A&A%ABBBBy B CA??????????9/3??^]]]2/]]]]]99}3/]]]3]]q+}3/3]]q+}9ć+}]և+}10]]3#5#.'##>7.'33>7bFJG>{3S\3DHI!]!JHCmCJP'GJGq?EF]FE>"SWT$:N.]WLKLW].0c`Y$$TWT"KSU&5&USKo/5@11)&&% % %g%w%%,// ,+,+  H x   4++  ;    *   HH)*)*1W*0/I+I *I&I%IJJJJ J LI??????????9/3??^]2/]]99}]+]3]]q+}]3/3]]q+}]]9ć+}]]+}10]3#5#.'#5#>7.'353>7267-_)GX$7;;Y;;7g7=@762g$^?Y?^$;?>+k8ޑ!ID;;DI!$LID>?;-nHHn-C S@==&<<3-,@ H6''%''!---{-\-l-K-fg32*8OS_SS8S8DXvMvfvU EDDDTyRRGEEJ|?2/36'54&#"'>32#"&'73254&/>7".'732654.+4!D8$M@7X )3< 4X@$=;7)9Q1 (+ $ &C6'  %.8U_!9M-> .#-9 O -E/0T-<(0H2 ! 9   P 9D(3 ,CQ@H%)5)))5('2#sRbC5#%5SE@Q H  4&$;$;SRB G5  SLM/...R <:::/2+"(.+QLGMP?22?332229/]2^]22]]299//210]]]]]+]]]]]]]]]]]]]]]]]]]2#"&'73254&/>7.'732654.+532>54.#"'>-N8  .5[Q (+ $ 9US:?B&,WT'! +*( "+0$6$&G6@G! 9   O''#J  P VG@)ss  s @$HT  sCAA AABByB??????9/??2}3]+ć+}2+}ć10]!.'#3>733#5NWY*aa#TRIuNUT%"JKGR\/_WJ!STM"SWT$AKR(Po@`          p d  IIJ JJII????9/???2]]299}^]ć+}]2/}+}]10>733#5#.'#3>?6l;?>453EX%;AB]])=?9=@?/6<ޑ"GB8V"@    /""   s   s    $o !s#AAB"! BBBAA?????9/3/22???222]}+}qև+}q3qq10^]]>73#.'#5##3353?B@8pEIH(PKBm?DDH@aa@H$PNF"TWT#$Y`d0-YRI֘P] @;4  4    4   " !9   t + ;    IIJ JJJII?????9/3/???/_^]]]]]q22]}+}q]+}q3qq10_]>73#.'#5##335.9R"f267@=8h146D=]]=lAf*;?>DIM$D@:srs{"@\Yy M   M H  (  s !"""M""s"")9 @8M0 P `  $s#"A{AB BA????9/]9]2]2?323]+]]+}]+3^]++10]]]]+]#.'##53533#>7cNUT%+`\QrNWY*`PP`aa#TRI"SWT$Xdh//_WJ"FMMF!STM""@ !"  $+ ++;6tf$$    #III J JJJ?????22?9/3/?239}]]]]+}]]]q]]]q+}ć10]#.'##53533#>73!HE<l;CG"]JJ]NNC@6l;?>CNQ#"HC;@EE@B@:=@?@xYy     H (   s  s)9Y 0 P `  sA{yAB BA????9/]9qq?22]]]]]+}q^]]]q3]]+]10]]]]]]]]#.'##5!>7NUT%+`\QrNWY*a#TRI"SWT$Xdh//_WJbS!STMQ@*z Wi 6 ) i (  h@\H$+vtf Ie)9II J JJJ??????9/]3]]]?]]Ƈ+}]]]q]q2+10q]]]]]]]]]]]]#.'##53>73THE<l;AB]>?6l;?>CNQ#"GB8N=?9=@?VGE@'ss s  A A B ByyBCAA????9/????221033#5#!#3! aW\\aaS@Po@H@*   I IJJL?????9/2]^]210%3#5#5##3353FXK]]]MޑV ;@! s s  y ABByA????9/2^]10!##!#3! aaaST@P ?@$      IIJJ????9/2]^]210!#5##3353#]]]NVG)}@RvY#i#y#(#8##v(8+s*&6yC)&y  yABB???9/]32?]]]]]]9/3^]210]!#!#!>32#"&'732>54&#"Qaa $&DgE"$Ec@ (D1gQ#Fb,PsFAqU1O;V8rp PF>"`@9"!i$!#v!IJJV R?3]2???9/^]]32]]29/310>32#"&'732654&#"###!Bsi6P4   ?EEK4]]1 x6]E'JW]_PF:H5E@M*vDvC+*y*wv6A>v(( gv-f-"65--56"GFG@\H|;;;;;# |5522Eg  wAAA&A6AFAAyw(g((((FW""y#W###G?^]]]]?]]3]]]2]?]3]]]29/]]]+]]9/////]]33]2]]]210]]]]]]].#".54>32.'.54>324.#">C"9^C%cX 1O:6M0"A[9:@; 'WRGExX37^~G/ZB (96 *F2Y $FgDp&Z47bJ+(DZ12]L6 % N)@.2ZVW\0 o!:,]d9V##7I3p3 A@d< 6'!fv$ A#))%44V9/9.A99A.CB I>&6   @% H 4A>PFfw)))4Q.w///L?]]?3]]2?39/+]]]]]]29/////^]]]33]22]310]]]]]]%>54&#"7.#".54>32.'.54>32L :F('%*&"=-?< &=+(;&.B*+-* C@85YA$)E[24&>V<->>1I1Pe>$+J61A%'G:* D 2#'EcABdC# :CS3CG% G@,s s   yBC yA???^]]]]]10#3#5##5%Y\^TaTo ;@"    JL I???^]]]10#3#5##5FXKNޑNP<G@RG(       __    IKI??9/3/?^]]]]]+}]+}]10]#5&'3>7&g0]0f&d !%&&%! jj1omf((fmo1P@O  sos  soyBAAAAB??????9/3/2^]]3+}]3+}1035#53.'3>733#Cx5r&^21^'l6xBJicRNNRciJG@qyD3:J(x_ 5E     _   IK  JI??3/2??^]]]+}]]]]]]+}]]]]]]103##5#53.'3>7"X,r]s,Y!d !%&&%! ~bDDb1nme((emn1GZ@@MM7'W MM@8MMMx        s  @M{m\K=+ GgMsMtbZC: )so   CAAAA B ByB????????^]]]]_]]_]]]]]]++}]+]]]]]]]]]++}]10]]+++++]]]+]+]!.'#>7333#5*2661+k-wCpo4_)R\IOO##OOIX`GKEo@LF  I        | Hv@N Hz\l+;K    LIIII J JJ????????^]]]]]]]]]]+}+]]]]+]]+}qq10]!.'#>7'3733#5 &((% `#a0i|}c#I FX698996D@0f4ޑG<B@%ss s  A yyA yBC????9/////10%3#5!#5!#!3W\MaSaTTboB@%   I I JL????9/////10%3#5!#5!#33:FXsn]MޑNN:Gx\@8s s s|yA yB A???9/^]]399//]]310]32>733#5##".=3%?0'$ aW\\O-L`7`*?)_ #A]9.o l@D)     @/I J LI????9/]32^]]]310]]]]]3267533#5#5#".=<4&3]FXK!$+G3;/Eޑ*E4:(o@B  s us/f|yAB A???9/^]]332]]9///]]32310]53>73##5.=3 ,!K&;aa;&K@R.`$9({~ _K'@X6'|@L)     +; wp I J I???9/]33]2]3_]]^]39/3210_]]]]53>753#5#5.=*&E%]] )E'?.23_` ^\*C1VEI@(fs s  |VHAB B???9/]]3299//2210^]]>32#54.#"#3Q-Mb8`'@1'Maa $B^;+A* PK /:@:g)8**u*)u)7) Hx& 0v/',,,<:@LMv"W;""0y@X55|''7'g'w'''EY&|Z  hxW(F?]]]3]2]]?]]9/3/]22/22]2+2]2210^]]]+]]]]]]]]32>7#".'.5467>32'4.#"! wz 5* $4D'T~T+&?.M,36Qi32!3267#".%6&#"!8'IM,?M)hqSV1C U6A`A!bA9 1!#5& F 7R6  PUN &C\}?Q(4G 2=@Cg);--u-,u,7, Hxs/3v 2'///?=@RMv%W">%%3y@X88|'*7*g*w***ECY&|Z  hxW(F?]]]3]3]2]]??]]9/3/]22/22]2+2]229/]]10^]]]+]]]]]]]]32>7#5.'.5467>32'4.#"! wz 5* "2@%[@_@"&?.M,36Qi32!3267#5.%6&#"!8'IM,?M)hqSV1C I0X/G/cA9 1!#5& F 7R6  PUN ,?Qv?Q(4V,r66VGL+!@ #LM MM@ M7MLMM@2M  s   L( M L  M vMM@ L@ M- @,L M ()s+,*B(%y )ByCAAA????]?9/2?2}3++3/]3+++++++++}ć10+++++]+++++>73#"&'732654.#"#!QPHrEJM#;gL,!Aa@ Oa2KU$a"VWQ!MPP#"BgI73#"&'732654&#"#3??9m7;:gv7Q4   ?Ia[#]]%=?;797r0WC'JUQ_X C!l@C H(s ss###    "yBG!yA F  y F?]]??3?^]2]9/3]]310]+'>7>5!3'>7#C)=S8 FM\!-C Vb8ic^--O;$THJT#JHA* ',b Z^#k@8H8H!  "!%`%%    $!JY#I H Q?+??3?^]2]]9/]3310]+'>7>5!3'>7# !0@+ 19ZX&@U!KKI 8+N 6'"V]^*E#GA6("'VEkU@/ H ssyAB y GA??32??9/2^]210]]+3#"&'73265!#3! a !:-% %aaSK.F/I1-QPE]@5 H&  IIJ R?32???9/2]^]2210]]+!#"&'7326=##3353 !:-% %]]].F/I1-VC`@; Hss ssyAByB GA??3???9/2^]]]2]]310+33'>7#!#3! a\!-C VaaS#JHA* ',@PZSW@5 H  0IIJ JK?3????9/2^]]23210+%3'>7#5##3353X'@U]]]M#E?7("'AG(T@2s s ss|y ACy B A????9/^]]3]99//]1032>73##35#".=3%?0'$ a\\WO-L`7`*?)_K  #A]9.o_@;)       I L JI????9/]32]^]10]]]]326753##535#".=<4&3]KXF!$+G3;/}*E4CC~6D.@cHf..-j))(fW i iWs&%%%8,s s++@* LO+_++/s@ MW6v@ M@6 LX 0 s  7@H|66 y,B&%GAAA/L@ H|A B??]+]+2????3?9/+^]]]]++]]]+]2]+2/]3]3]]210]]]]]]q]]]]]]]]]]]+%.'#>73>733'>7#&' !&+&! _  U>>::>>U\!-C P !&+&! `JV[Q@vZK,x66x,ў#JHA* ',v@Q[VJCZ0@b0H)9I &&+&&&#2p222""",+  & 6 F   $1#J"JKII&0@@&+H| I? O  @&+H |,, IJJ???9/+q?+q2???3??2/^]3]]322]2/]332/]33]]10+#>73>733'>7#.'#. Y U V88V V X'@Q *)$ N %)*cW=<4vv43nrr6#E?7("'WcWZRR[WV,6$+6DHz6$+6DK,%V6(a36H[8)@*& M&M(MM0M8L0 M MLM@ MMM) M)v @ M@:L@ M+v@ML@M*y))$|L MF| LE?+32?++9/++++++9/3+2+10++++++++++++.#"'>32#"&546732>7" wz 5* $4D'WT)0TqBc-C,3K2r} P 6`M\\-O1R;!(?P(6#@Y!x e!j x #I#Y##%x$  gXPhWQ?]]?]]39/]2^]]9/3]]210]]]]]]]#"&=47!.#"'>3232>7(BV-hqdSV1C U6Dc@A9 1!EgD"PUN )Hdm?Q(48z6u66vUrz66 z6C,6+GVc6P6qVz6P6q:z6236Rk:3!o@MXh8H#Wg7G   "P`@PIYPFVQ?]?]9|/]q^]]]]]10#".54>32267!"!.$AZ55ZA$$AZ55ZA$?MM?dH''Hd>=eH''HeXLLX~QFFQ:z636j2z6>"6 Cc6vD6\ICz6vD6\IC6eD6\ec:!z6x.6=VG &@ ss y AyBC???10!3#5#W\\TPo &@  IJL???10#3#5#!FXKBޑVz6P6 V2'37@uGg H5(((9?97...o    sxs s 8775 )1 ++)++##&##EA ABB?????^]]]]22]+}ć]]]]]10]]]!.'#33#".54>324&#"326!!6+g&w&&|/ 7{8{@,///F  |  E?]]3]]2?]]39|/]3222]2++2]210]]]]]^]]]]]]]5!654.#"'>323#!!32>7#".547#53>?%U"+3E*O);Q1 4[A&,?H/'#.e0BV4 5]H-%C'  Q !4C!C)C!/6 J0>"&C)( @U''   s      ByA??9/333]222222]222^]]]2222]]22222310]]#77#5'75'75#5 tt[ttP7?Es7?E6?Ds6?DP0 1@s  y y AB??29/////10###5%!5[+NFNNN )x@JH#x#"Y"i"% % H%   %+*X  `_U?]2/2]2/2?9/////+2^]10]]]%!#5#535#53>32+"32>54.[RRRR'_))MoE:[&,50L5.=GjjGfHJ ji9O2f5'&2 *\U 6@       i?]]2210^]"&'73267?OG&!!&FN\@9 (( 9@$VP%VV(!=Vk+:'+@ )h)v M @M @ M  -(M@, MvMM@M,+y))?)O))))M M@# M|MMF#M# M# M#|MME?+++++?+++++9/^]]+++++]+++]]104>32#".732>54.#"!!:5[yDCwZ55ZwCDy[5f ;U54U; ;U45U; Q'[Y[..[YY[..[Y?gH''Hg??gH''HgPV,Vo.y@I7w8 x w  s   s @p BIYAB??33]?^]]]9/+}+}10]]]3>73#&'%FBA"["ACE&k6h77h5nKKn$۞C%0V1% 3@     y yByA??9/10^]!5!!!!!6,"6raTTT:2VeV=3! %7P<8( $/@@ /%$" #1x9s0s0w*6**v0$B/L| "M"L"@ M"#BD %L%|LMD?++2+2??+++2+2?^]]]]]]]]]]3}310%2>54.#".54>753##"30S=$$=S0^@w[77[w@^@v\77\v@^0S=$$=S05M22M5&IkEEjI&PP&IjEEkI&TB5M22M5c;A@Mss s @H  dK$48$4T$DT @/ L M @ L |MMAAAB????9/+3/++++2^]]]]_]]qrrr^]]]]]q9///+^]210+!#5".=33326=3#_QpG^k^_^k^GpQ+Kh54.#"!53.54>@vY5$.7( :R22R: (6 .$5Yu+U~S/VJ=RD>JY6;^A""A^;6YJ>DR=JV/S~U+3I,a@: YJ! o.P.(-  Q"%(%8%%P?2]]2?3/322]]2210]]]^]2"&'#".54>267&5.#";92)  -=N6;Y<%Eb*)?5P[$9 # N!(Hc;?eF&3 !  b[(E3PG085M5@ M" M @M))0M0 @.L %M%::89 (**J3M3MMOK??+++?39/3/22]+++9/10++++#4>32#"&'532>54&+532>54&#"]5T;.M863);%%E`;)A=3!<-]c5';:#02U?#1H0-U +8@!:W: V $7%LYL-1B*9!G^@+H8H IKK@ HQ I II????+???^]9/]]+9310>73#.'z "" +% ] #3E-X%'%$eru3+ioo12~FVX:uf'3>@*F*WC404*,,**,:Y i  0@( fW:::?Vf5Q#O,v,, ,,7WI?^]]]3]]]?3]2?]]]]]]99+}qq210]]]]]]]]32>54.'.54632.#"#".54>-HR$8'$7%)2`&/eW1( ", #3-'K:#;\A=[=/AmK$C30A&-C0#=>+FF J  +7DX=/[I-*H`6.P@079@` +&7710 0000+)+"#;5---:?00""w#(Q  P?2]2?3]2]9/3/]q^]2210]]]qqq]]]2.#";#"32>7#".5467.54>$0)&,6J&Y[,"6-! &4C'$N@*2) 9QO #&I !S M  ">1(F$%8&4D(@25(E(#((('I :I: hx)@T HU 0 H9I W!w!!!xg  *)*NW&& R?3/]?2]9/////^]]]]3]]+]10]]+]]]]]]]]]]]]]]]'>54&'.54>7#5!P 9A3H/32#4.#"#P jE>R1] 2% ]#?X5#0D*I7#)f@Cx%+w$*$'7g H  Q(8GO?]]]?]]]9/^]2]]10]]2#".54>2>7!"!.-=]==]=>\==\>'8$$8('7$-$77g[\g77g\[g7:(JhAAhJ(t&Ec==cE&N ;@    @ @ H  I  HQ?+?+^]10].53VH] FJ P "@ ! L L Mس M M@2 M  !"    LسM@" M$# JJO JJ??/?32??9^]29/++++}ć+}10++++++#>7.#"'>32#./' _,7> $ %"5( Jp$aA6sog+:>*A,K$1^PGY2D>@sW>:W: j FV5$v g  5&fv@@v//ihV<G<<?'*#755&#OJ R?3??39/3/2^]]]]2]]]2]]2]]10]]]]]]]]]]]%'>54&'.54>7.54>32.#";#").@'P 8Bdd.5+"<3RPJG !w@Oif hXI#!"XI PKziFVziQ?]2]]]]]2]]]??]]2]]10]]]^]"&'#4>32'32>54&#"1,I]9R6w =YB(:&DQ?D  6X?#;cH)z3F([bR[3D)h@EEU$4fvTf T  +7%G%%Xh*"PJ R?3??^]]]9/3]]2]]]10]]%'>54&'.54>32.#"1&4!P (->R2 @_?#C6RT+9Q +&G  +>R58dL, O iW4?&3U']@;Yh)) W    (HI%F%%Q?]]?]2^]]]2210]]]]]%#".54>3!#4&'#"326#@Y52XA&-Kd6 _.&!<5#'5DN:]A#$D`;JhBN.5:>l"*M>)B.[J@,   @    I HQ?+32?^]]]210]%#".=#5!#3267)5B' !! 4O4NN'3 J:@%IIW g  yQ?^]]]??]10".5332653 AS0]=<<=]0S 'AT,+XIIX,TA'3G$q@&L L"L@ L%K!@LQ" L P?+?+?^]++22++105.54>324.'>%TBkK)/W|LQ|U,0I3f\"aaaa)E_;?fF&&Ff?v (C3 } fPPe  i[JGR@ II L@ LQ KI???++??2^]10>=3#5.53S]]BfFZGeB]\T?^j9bI++Ib9j^9 8@6++.L.M.@M.)M) M):/L/гM/@!M/44 L MMM@G M L0M M   9./PP& MM MLMQ?++3+++?3?3^]2+++++2+++]9]2+++++2+++10]]]]"&'#".54>732>=332654.'7=7SS7-L8"S:9(+\+(9:S #8L 1,,1?cH0WH7 /AQ-Sa.@EE@.aS-QA/ 7HW0Hd>6$H H++10U&(?l@ @H @H @ H+++10&+Dl@ @H @H @ H+++10&,Dl@@H@H@ H+++10 z&,@POO+++44&2l(@H( H( H+++10&<~l9@H@ H@H@ H@H@H H+++++++10Pz&<o@% POO+++44&l0H0 H0 H+++103I&[@ /- P.O++47&7@ <:,#P;O++4PG&J@ PO++49&@   P O++4&@   PO O+++44E &!@ POO O++++4443&RS@ " P!O++4J&d@*P"OO+++44J&L@ PO++4J &d@("P&OOO++++4449 &@ ;9 3P:O++4?F;@"BR@H@/]+^]]10'7F6qݞ&w)@A`?]?9/]q10'7DD.B Q @,H @H@H /O/]^]+]++10'7"&54632!"&54632 h4Y 3I &u@ -8 P>O++43I &p@ 1> P-O++43I&x@ -? P@O=O+++443I&Y@ 1? P@O-O+++443I&@-> P?O=O+++443I&x@ 1> P?O-O+++443Iq&s@ LB P5DO=O+++443Iq&s@ LB P5DO-O+++44&$c@$%HHH@ H@ H&'H&'HHHH H+++++++++++10&$Π@$%HHH@ H@ H@ ''H@%%HHHHHH H H H+++++++++++++++10&$vǹ*@$%H*H*H*@H*@ H@$%HHH@H@ H/@H/@H/H/H/@ H/@ H/@ H/@H*$&H$&H*HH*HH*HH* H H++++++++++++++++++++++++++++10&$gH*@$%H*H*H*@H*@ H@$%HHH@H@ H/@""H/@ H/@H/H/H/@ H/@H/H/@ H/@H*03H03H*''H''H* !H !H*HH*HH*HH*HH*HH* H H++++++++++++++++++++++++++++++++++++++10&$>T*@$%H*H*H*@H*@ H@$%HHHH@ H++++++++++10&$Y̹6$!1O+&$ !1O+7 &U@  :E,#PKO++47 &P@ >K,#P:O++47&X@:L,#PMOJO+++447&9@ >L,#PMO:O+++447&x@(:K,#PLOJO+++447&X@>K,#PLO:O+++44U&(?_U&(?m'(ǹ'(¹'('(̹PG &h@ #P)O++4PG &c@ )PO++4PG&k@*P+O(O+++44PG&L@ *P+OO+++44PG&@%)P*O(O+++44PG&k@)P*OO+++44PGq&f@7-P /O(O+++44PGq&f@7-P /OO+++44&+?_&+?mh'+ǹY'+¹R'+m'+̹'+'+> &@  PO++4/ &@  P O++40&@  POO+++44&@  PO O+++44E&@  POO+++440&@  PO O+++44q&@ +! P#OO+++44q&@ +! P#O O+++44&,?_&,?m',ǹ',¹',',̹g',g',3 &Rm@  + P1O++43 &Ri@ $1 P O++43&Rp@ 2 P3O0O+++443&RR@ $2 P3O O+++443&R@% 1 P2O0O+++443&Rx@ $1 P2O O+++44&2 _&2.m'2ǹ'2¹s'2'2̹J &f@ !P'O++4J &a@ 'PO++4J&i@(P)O&O+++44J&J@ (P)OO+++44J&@%'P(O&O+++44J&i@'P(OO+++44Jq&d@5+P-O&O+++44Jq&d@5+P-OO+++44&ONQ P-8 P+4+4+3DI &&p-O@ NQ P1> P+4+4+3DI&&x&@ @O=OPT P-? P++444++3DI&&Y&@ @O-OPT P״1? P+44+4++3DI&'&@ ?O=OPT P״-> P+44+4++3DI&&x&@ ?O-OPT P1> P+44+4++3DIq&&s&ad P@ LB P5DO=O+++44+43DIq&&q&ad P@ LB P5DO-O+++44+4&$&&$&δ &$v&ǹ&$g&¹&$>&&$Y&̹&$&&$ &PD &&h@9<P #P)O++4+4PD &&c9<P@ )PO++4+4PD&&k @'&ǹ'&¹'&'&̹b&U&i&r&3I&ap@ 1? P-O++43I&s@ -. P/O++43DI&&y?C P@ 0. P/O++4+43DI& :? P+43DI&&m@@C P /- P.O+++443I&s@ ?1 P2O++43DI&&sRU P@ ?1 P2O++4+46$ac6$6$C6$&$x?  ZD!@ H@ 10+3#".5<73  + Y? 8 ,  x?  .@  H H  /++]10>7.54632x !$'a &&$6bB1@@H& H /+^]+102#.#"#&>2$<<$2#4!  !4#!KWa +W@ Hp %p&&&@H ,@H"@ H"%O /]+++2/]]+10"&546323"&546322#.#"#54>W {0%5&((&5%0K.)).PD&&l+.PP+4+4PD&'*P%P+4+PD&&`'*Pݴ%+P+4+4PG&f@ *PO++4PD&&f@=@P*PO++4+4&(yC'b(y&+yC'b+yV&+?hT@ H  @H /2/3/3/3/+]+10>7&546327' $"%m4~a% &&$Ъ&?]f@ Hd$4D  @H /2/3/3/3/+]^]]]]+10>7&54632%'7 $"%~4ma% &&$&7?Aq$Z@/  @H %@H@ H/^]+]++qq3/]1067.546322#.#"#54>l) '40%5&((&5%0a " 2.)).&a@  P O++4 &@  PO++4E &!@$ POOO++++444E &!@ POO O++++444&@  PO++4a&!@  P*OO O++++444&,a@ PO++4c&,@ PO++40&,yC0'b,y?^V@0FV@ @H /2/3/3/3/+]]]10].546327'&"$ Lm4~?$&& %&?hT@/JZ@ @H /2/3/3/3/+]10]]].546327'7w&"$ ~4m?$&& %|&7?Aq$R@# @H &@H@ H/^]+]++qq3/10.546322#.#"#54>' )P0%5&((&5%0? " .)).J&aa@ (PO++4J&d@ PO++4J &d@.P&OOO++++444J &d@("P&OOO++++444JG  &s@ "- P 3O++4JG  &n@ &3 P "O++4J&d@ (PO++4Ja&d@*P4O"OO++++444P&<al@ # PO++4Pc&<o@  PO++4'<C'b<|&3?mB Y@H @ H@H/O  /]^]]+]++10'"&54632!"&54632Y4hB   tB /D @ </10]'d(49D &'LO P@ <: 3P;O++4+49D & HK P+49D &'@LO P;9 3P:O++4+49 &@ K= 3P>O++49D &'@^a PK= 3P>O++4+47&2gC'b28?&cC'b54 &nDI-@3 H@/]+]10'7I(4o? (@@H@ H /++]10.54632'$! ?$&& D6$&D6$&δD&$v&ǹ9D&$g&¹*D&$>&D&$Y&̹D6$&D&$ &D&+?'_D&+?'mDh'+&ǹDY'+&¹DR'+&Dm'+&̹D'+&D'+&D&'_D&*'m*D'&ǹD'&¹D{'&D'&̹D1&U&UDN&r&rD6$VDk6+4D6C&)MMLMMM@M s+#MMM@# M"s$)*y))y 0@@314H 0`p_$B#ByA?2??9/]]]qqqqq+qr2/9/32++++3222210+++++++32>7!5!.+5!#3##.'C]=6) !%/E:1HY/?C@mAB@d %H&HH2H,=&BMR&'OI?+?Xs@)]<#0Wz EF??910#".54>32"32654&4&#"326%467'7.76323.'#".'.#"3267>32>7##"&2654&#"8bLKb99bKLb8!&.  .&!1! 1&F!   1 !/   !F&1ZKa99aKLb88b%=<?' &>>=<#.&F :  F)0#-!t'o'g't]'o+I #'+/37@&6Ff= &6Ff= &f&fIYIY i i6f 6 f  9  9=11i1y111@ H 11/4;H/(((,/H(@#(+H((i(y(((@ H (($4;H$$$@!+/H $$$$$i$y$$$@ H $$6@ 4;H6652@ H2'2722+@-1H1+ +++++@ H+'+7++'-1H'@(,H'@ H'''7''  "/ ;^[Ly  ; ? o =O   { L   9 i   /_ ;{L8 f3`=PSDv 0`=ArD@=f7  0 = !   T   F   9@ 4EH",585@91;Ha5@5P5!5155555555555c5s5T5C555@ H55'55"@H"""""3,,@@ &HK,[,<,,@H,,,,H,@ H,2EH11&40;H4,/H4@-#+H|44k4\4K44H4@ H4#+#;##H#)+B-$'H-#H-H-@H-@ H- -@2EH$&A @P`;`!Arc$D6Ff'  <wC i3/?<O `@*IL\l )i AL\  /O_o;Oo.Ll| +Ii8) >xK f  3 B `=AScDe@:' APA`p A?r2_]_q_qqrrrr^]2^]]]qqqqrr^]?^]]2^]]qqrrr^]2^]]]]]]qqqrrrr^]9/]3^]]]qqqrr^]3^]]]]qq+rrrr^]]^]]2^]]qqrrr^]]2^]]]qqqqqqrrrr^]]]?2+2^]+++++?2+q2++qqqq+++9/3+3++]+qq+q2]]+2]+]qqqqqqqrrrrr+22+22r22]]]]qqqrr^]2^]]]]qqqrr^]2^]]]qqqqr^]^]]2^]]qqqrrr^]]2^]]]qqqqrr^]2^]2^]]]qqqqrr^]]^]22]+++2]+qrrr+2]+]+2]+]]qr+r+2]+]]++r2+2]+]]10^]]]]]]]]]]]]^]^]^]^]335!5!35!3335!5!35!3j444555k**yhk**L**yhk** (7Me}@LL[ LTMSMDMD@L=M=M1(M.M.гMM @LMM~{igfXA VNdKM@B/7&A (  @ A8ov}ifd X ^QcNLBF;(,#4 ???????????????????9910++++++++++++++++%#".5332>73>32#"&'732654.#"#".5332>73>32#4.#"#3#3267#".57#".5332>73%#".54>32"32654&32654&#"'467'7.723&'#"&'&#"6"'327>3267#72654&#" iER1] 2% ]u $*3 F-5E*] iE32"32654&32654&#"'467'7.723&'#"&'&#"6"'327>3267#72654&#"":O--N:"":N--O:"    T"/)##)/(  0-N:"":N--O:"":O    u$ $%  $$ $j- 0! ## !0 -  {n` ` $ & * - 2 4 9 : = z        E u }       P & * 2 4 6 7 8 9 <       E K Y u     $ & * - 2 4 6 7 9 : ; < =              E K u }          $ & * - ;         u }    -79;<=EKu}$&*-246789:; <= EKYu $&*-2479 :;<"= EK" "&*24789:<Ku#$#&#*#-#2#4#6#7#8#9#:#;#<#=##################K#}#########$ $ $ $$$#$$!$&$*$-$2$4$6$7$8$9$:$;$<$=$@$F$G$H$J$R$T$V $X$Y$Z$[$\$]$^$`$c$l$n$o$"$$$ $!$$$$$$$$$}$% % % % %%%%"%9%:%;%<%@%]%`%%%%%}& &&&"&#&$&&&*&-&2&4&6 &7&9&; &<&= &>&F&G&H&J&R&T&X&Y&Z&[&\&^&c&l&o &&&&&&&&&&&'' ' ' '''"'#'$'-'6'7'9':';'<'='>'@'D'`'c'n'o'''''''''''' '!'}''( ( ( ( (#($(&(*(-(2(4(8(>(@(F(G(H(J(R(T(W(X(Y(Z([ (\(^(`(l(n((((((((((((()) ))))" )#)$)&)*)-)2)4)7)9)<)>)@)D)F)G)H)J)Q)R)S)T)U)X)[)])c)x)))))))))))B)* * *@*Y*\*`**++,,- ---$---=-@-]-`-c------. . ...." .#.$".&.*.-.2.4.7.9.: .;.<.=.@.F.G.H.J.R.T.V.X.Y.Z.[.\.].^.c.l.#... . .. ..".........B/ / / u/// /$/&/*/-/2/4/6/7/8/9/:/;/</=/@/F/G/H/J/R/T/Y/Z/[/\/] /^/`/c/l/n/o/x ///////////}/090<01122 2 2 222"2#2$2-2627292:2;2<2=2>2@2D2`2c2n2o222222222222!2}233 3 333$3-3;3>3@3D3F3G3H3J3R3T3Y 3Z 3\ 3`3c3l3o 3333 33333 3344 4 44"4#4$4-4647494:4;4<4=4>4D4M4c4n4o44444444!45 55 5"5#5$5&5*5-5254595;5<5=5@5[5] 5^5`5c5l55555566 7 7 77777"7#7$7&7*7-727477797:7;7<7@7D7F7G7H7J7Q7R7S7T7U7V7X7Y7Z7[7\7]7^7c7l7x77777377 7)77777777B8 8888$8-8=8@8D8]8^8`8c8888889 9 9 99999"9#9$9&9*9-90929497999:9;9<!9@9D9F9G9H9J9Q9R9S9T9U9V9X9]9^9c9l9n9o9x99 9 99)99 9)9999999B: : ::::":#:$:&:*:-:2:4:7:9:: :; :<:@:D:F:G:H:J:Q:R:S:T:U:V:X:^:c:l:n:o:::: :):::::; ; ;; ; ;#;$;&;*;-;2;4;7 ;9;;;<;= ;@;F;G;H;J;R;T;X;Y;Z;[;\;^;c ;l;;;;;;;;;;;;;;;;B< < <<<<<"<#<$<&<*<-<0<2<4<7<9!<:<;<<#<= <@<D<F<G<H<J<Q<R<S<T<U<V<X<[<]<^<c<l<n <o<x<<)<<(< <)<< <<<<"<<<<B= == =#=$=&=*=-=2=4=8=9 =< =>=@=F=G=H=J=R=T=W=X=Y=Z=[ =\=^=`=l== == ===== ==========>$>&>*>->2>4>6>7>8>9>:>;><>=>@P>>>>>>>>>>>>>>>>E>K>Y>u>}>>>>>>>>>@&@*@2@4@:@;@=@@@@@@@@E@u@@@@D D D D"D@DYDZD\D`DoE E EE"E@EYEZE[E\E]E`EnEoEE#EFF F@FGFJFRFY FZ F[F\ F^FlFI 'I IIII"I@'IYIZI[I\I`'IcIlIoIx II(II(II(K K K K"K@KYKZK\K`KnKoLMM NN N#N@NFNGNHNJNRNTN[N^NlNNNOQ Q Q Q"Q@QYQZQ\Q`QnQoR R R RR"R@RYRZR[R\R]R`RnRoRR#RS S S SS"S@SYSZS[S\S]S`SnSoSS#STMU UUUU"U@UTUYUZU[U\UcUlUoUWW W@WFWGWHWJWRWTW[W^WlWY YYY"Y@YFYGYHYJYRYTYYYZY[Y\YcYo YYZ ZZZ"Z@ZFZRZYZZZ[Z\ZcZo ZZ[@[F[G[H[J[R[T[[[^[l[[[]@]F]G]H]I]J]R]T]W]X]^]`]l]]]]]^$^&^*^-^2^4^6^8^=^`P^^^^^^^^^^E^Y^u^}^^^^^^`$`-`6`7`8`9`:`;`<`=``````````````K`}```````bbbbc$c&c*c-c2c4c6c7c8c9c:c; c<c=ccccccc cKccccccccc l7l9l<llKlln$n&n*n-n2n4n9n:n< n|nnnnnK nnnnn nx$x-x6x7x9x:x;x<x=xxxxxxxxxxxxxxxKxYx}xxxxxxx|7|8|9|:|<|=~~~~~~~~$&*-246789:;<= "$-79;<=>@D`cno# !} "@YZ\`no~"@ ` "@YZ[\]`no#  <"-?Z@FDEFGHJKLMNOQRSTUVW X`Fo>VfffN(M(]) ) )")Y)Z)n)o}}}}   } }} }}$&*24< P#EK Yqu $9;<=K`q}%&'()*+,-./0 1234578;<=EKYqu}$&*-2479:;<!= EK!q   !$-9;<=K`q}$%&'()*+,-./0123456789:;<=P#EKWYqu}$"&*-246789:;<=#"4EKYq#u}""" E&*24P#EWu7;=Y }7Y$-79;<=Kq}$&*-"246;=:;[][]#&*248FGHJRTWXYZ\~$79:;<=&*24789:<JYZ\}~YZ\~9< F G H J R T   &*24FGHJRTXYZ\~$-D[] $-9;<=D !#}MYZ[\~&*248FGHJRTXYZ\~> 9 < M O W X       } !Y!Z!\!!~#$[$]$$$\$\-\;\<\=\D\E\I\K\L\M\N\Q\S\U\\\\(\\\\\\\\ \\\\}9}<}(}}}}}}}}9<&*24789:<FGHRTXYZ???&*24789:<YZ\}~$&*-24DFGHJQRSTUVXYZ[\]) "$~DFGHRT$-=D    "L~    "#>@` "*ELXYu~   #@^`clno !!  "EKLYZu}~   ">@` "*LY~    ">@`K  "#@^clx   **EFLZrv|~   *@^`l"3""AEu}~    #>@^`ln  "EFLu~   ">@`  " #@^cl ""  "EFLYZuv}~    "#>@`K   "#>@`cnoK}  >@`clo   *L Yr "#>^clo   EFKLZu~  "#@^clx   **EFKLZrv|~   "#@^clnox    ) EFrv   "#>@`cno Xr}    #@^c l  "FKLZv~   *@^`l"3""FEu}~    "#>@`cno}   "@`oL   >   "@` "@^`l *LZ~  "@`~   ">@`oL   #@^lFv   "@`  #@^lF   "@`no L    ">@`noL @^`l  L  "@^`l *LZ~ "@`co   *L~   ">@`no ~ "#@^`lF  "@`T~    " @ `     L ~        " @ ` n o         "@`no    "#>  "#>@^`lF  "@^`    "#>@`" " " """@"`""" "L"~% % %%%%"%%#%@%`%l%x%%%%(%%%%%%%%%%&%!%%%%!%%%%%%%%%%%%%%%%%%%%%% % % %%%,%%%,%%*%E%F%L%Z%r%v%}%~& &&&&"&@&l&x&&&&!&!&&& !& &*&L!&Z&~2 2 2 2"2D D D"DDDD DLDZEE E E EEEE"E>E EEEEEEEEEEEEEEEEEEEEE E EEEEEEXE}F F FFF"F>FFFF FLK K KKKKK"K#K@K^KcKlKn KoKxKK KKKK"KKKKKKKKKKKKKKKKKKKKKKKKKKKKK K KKK!KKK!KK*KFKK#KZKrKvL L LLL"L@L`LcLo LLLLLLLLL L*LLL~WW W W W W"W>W@W`WWWWWWYX X X X X"X#X>X@X`XXY Y Y YYY"Y>Y@Y`YY YYYYYYYYYYYYYrYvY}Z Z Z ZZZZZ"Z>Z@Z`Z``a a"a^ale e e"eeFqqqqqqr r r rrrrr"r>r@r`ruu u u uuuu"u#u>u@u`ucunuouuuuuuuuuuuuuuuuKv v v vvvvv"v@v`vnvovvvvv vL} } }}}}>}@}`}}}}}}}}} }}}}"}*}L}Y}~~ ~ ~"~#~^~l~~~F   #@^`clno !!!!    ">@`  "#@^clx4h?O/  P Q*^^ 4   #@^`clno !!!!    #>@^`ln 4  #>@^`l   I  " #@^cl """"?)?4 >I !    "#>@`    #>@^`ln  I   "#>@`cno  >@`clo     #>@^l*S?I  "#@^clx*SII>PQ)^^4  "#@^cln ox " #*S)T 4P)^^*   "#>@`cno    #@^c l   >>> #>@`l*   "#>@`no     "@^`lno  "@`co     ">cno  #@^`l # ,"@&`&cl##4^   "#no  @`c   @^`lno  #@^`l   #@^`no   "#>@`n  "@`co    ">@`cno  ">@`n    ">@`cno "@^`cl "@`c  "@^`l  "@`cn    ">@`cno "#@^`l   "#>@`cn   "@`cno&IIOVn|@        0       4 4Copyright 2011 Canonical Ltd. Licensed under the Ubuntu Font Licence 1.0UbuntuRegular0.83;DAMA;Ubuntu-RegularUbuntu Regular0.83Ubuntu-RegularUbuntu and Canonical are registered trademarks of Canonical Ltd.Dalton Maag Ltdhttp://www.daltonmaag.com/Copyright 2011 Canonical Ltd. Licensed under the Ubuntu Font Licence 1.0UbuntuRegular0.83;DAMA;Ubuntu-RegularUbuntu Regular0.83Ubuntu-RegularUbuntu and Canonical are registered trademarks of Canonical Ltd.Dalton Maag Ltdhttp://www.daltonmaag.com/O  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghjikmlnoqprsutvwxzy{}|~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~.nullEurouni00A0uni00ADmacronperiodcenteredAmacronamacronAbreveabreveAogonekaogonek Ccircumflex ccircumflex Cdotaccent cdotaccentDcarondcaronDcroatdcroatEmacronemacronEbreveebreve Edotaccent edotaccentEogonekeogonekEcaronecaron Gcircumflex gcircumflex Gdotaccent gdotaccent Gcommaaccent gcommaaccent Hcircumflex hcircumflexHbarhbarItildeitildeImacronimacronIbreveibreveIogonekiogonek Idotaccenti.loclIJij Jcircumflex jcircumflex Kcommaaccent kcommaaccentkgreenlandic.case kgreenlandicLacutelacute Lcommaaccent lcommaaccentLcaronlcaronLdotldotNacutenacute Ncommaaccent ncommaaccentNcaronncaronnapostrophe.case napostropheEngengOmacronomacronObreveobreve Ohungarumlaut ohungarumlautRacuteracute Rcommaaccent rcommaaccentRcaronrcaronSacutesacute Scircumflex scircumflexuni0162uni0163TcarontcaronTbartbarUtildeutildeUmacronumacronUbreveubreveUringuring Uhungarumlaut uhungarumlautUogonekuogonek Wcircumflex wcircumflex Ycircumflex ycircumflexZacutezacute Zdotaccent zdotaccentlongs Scommaaccent scommaaccentuni021Auni021Bdotlessj apostropheuni02C9WgravewgraveWacutewacute Wdieresis wdieresisYgraveygrave zerosuperior foursuperior fivesuperior sixsuperior sevensuperior eightsuperior ninesuperior zeroinferior oneinferior twoinferior threeinferior fourinferior fiveinferior sixinferior seveninferior eightinferior nineinferior afii61289 estimatedonethird twothirds oneeighth threeeighths fiveeighths seveneighthsonefifth twofifths threefifths fourfifthsonesixth fivesixths oneseventh twosevenths threesevenths foursevenths fivesevenths sixseventhsoneninth twoninths fourninths fiveninths sevenninths eightninthsDeltauni2126uni2215uni2219f_ff_if_lf_f_if_f_lzero.altone.alttwo.alt three.altfour.altfive.altsix.alt seven.alt eight.altnine.alt zero.supsone.supstwo.sups three.sups four.sups five.supssix.sups seven.sups eight.sups nine.sups zero.sinfone.sinftwo.sinf three.sinf four.sinf five.sinfsix.sinf seven.sinf eight.sinf nine.sinf caron.alt commaaccentrevcommaaccentcaron.alt.short Parenleft ParenrightHyphenSlashAt Bracketleft Backslash Bracketright Braceleft Braceright GuilsinglleftBulletEndashEmdashGuilsinglright Exclamdown GuillemotleftGuillemotright Questiondownuni0180uni0181uni0182uni0183uni0184uni0185uni0186uni0187uni0188uni0189uni018Auni018Buni018Cuni018Duni018Euni018Funi0190uni0191uni0193uni0194uni0195uni0196uni0197uni0198uni0199uni019Auni019Buni019Cuni019Duni019Euni019FOhornohornuni01A2uni01A3uni01A4uni01A5uni01A6uni01A7uni01A8uni01A9uni01AAuni01ABuni01ACuni01ADuni01AEUhornuhornuni01B1uni01B2uni01B3uni01B4uni01B5uni01B6uni01B7uni01B8uni01B9uni01BAuni01BBuni01BCuni01BDuni01BEuni01BFuni01C0uni01C1uni01C2uni01C3uni01C4uni01C5uni01C6uni01C7uni01C8uni01C9uni01CAuni01CBuni01CCuni01CDuni01CEuni01CFuni01D0uni01D1uni01D2uni01D3uni01D4uni01D5uni01D6uni01D7uni01D8uni01D9uni01DAuni01DBuni01DCuni01DDuni01DEuni01DFuni01E0uni01E1uni01E2uni01E3uni01E4uni01E5Gcarongcaronuni01E8uni01E9uni01EAuni01EBuni01ECuni01EDuni01EEuni01EFuni01F0uni01F1uni01F2uni01F3uni01F4uni01F5uni01F6uni01F7uni01F8uni01F9 Aringacute aringacuteAEacuteaeacute Oslashacute oslashacuteuni0200uni0201uni0202uni0203uni0204uni0205uni0206uni0207uni0208uni0209uni020Auni020Buni020Cuni020Duni020Euni020Funi0210uni0211uni0212uni0213uni0214uni0215uni0216uni0217uni021Cuni021Duni021Euni021Funi0220uni0221uni0222uni0223uni0224uni0225uni0226uni0227uni0228uni0229uni022Auni022Buni022Cuni022Duni022Euni022Funi0230uni0231uni0232uni0233uni0234uni0235uni0236uni0238uni0239uni023Auni023Buni023Cuni023Duni023Euni023Funi0240uni0241uni0242uni0243uni0244uni0245uni0246uni0247uni0248uni0249uni024Auni024Buni024Cuni024Duni024Euni024Funi0292breve_inverted double_grave ring_acutedieresis_macron dot_macrondieresis_gravedieresis_acutedieresis_breve tilde_macron acute.asccircumflex.asc caron.ascdieresis_grave.capdieresis_acute.capdieresis_breve.capuni0400 afii10023 afii10051 afii10052 afii10053 afii10054 afii10055 afii10056 afii10057 afii10058 afii10059 afii10060 afii10061uni040D afii10062 afii10145 afii10017 afii10018 afii10019 afii10020 afii10021 afii10022 afii10024 afii10025 afii10026 afii10027 afii10028 afii10029 afii10030 afii10031 afii10032 afii10033 afii10034 afii10035 afii10036 afii10037 afii10038 afii10039 afii10040 afii10041 afii10042 afii10043 afii10044 afii10045 afii10046 afii10047 afii10048 afii10049 afii10065 afii10066 afii10067 afii10068 afii10069 afii10070 afii10072 afii10073 afii10074 afii10075 afii10076 afii10077 afii10078 afii10079 afii10080 afii10081 afii10082 afii10083 afii10084 afii10085 afii10086 afii10087 afii10088 afii10089 afii10090 afii10091 afii10092 afii10093 afii10094 afii10095 afii10096 afii10097uni0450 afii10071 afii10099 afii10100 afii10101 afii10102 afii10103 afii10104 afii10105 afii10106 afii10107 afii10108 afii10109uni045D afii10110 afii10193afii10066.locluni0462uni0463uni0472uni0473uni0474uni0475uni048Auni048Buni048Cuni048Duni048Euni048F afii10050 afii10098uni0492uni0493uni0494uni0495uni0496uni0497uni0498uni0499uni049Auni049Buni049Cuni049Duni049Euni049Funi04A0uni04A1uni04A2uni04A3uni04A4uni04A5uni04A6uni04A7uni04A8uni04A9uni04AAuni04ABuni04ACuni04ADuni04AEuni04AFuni04B0uni04B1uni04B2uni04B3uni04B4uni04B5uni04B6uni04B7uni04B8uni04B9uni04BAuni04BBuni04BCuni04BDuni04BEuni04BFuni04C0uni04C1uni04C2uni04C3uni04C4uni04C5uni04C6uni04C7uni04C8uni04C9uni04CAuni04CBuni04CCuni04CDuni04CEuni04CFuni04D0uni04D1uni04D2uni04D3uni04D4uni04D5uni04D6uni04D7uni04D8uni04D9uni04DAuni04DBuni04DCuni04DDuni04DEuni04DFuni04E0uni04E1uni04E2uni04E3uni04E4uni04E5uni04E6uni04E7uni04E8uni04E9uni04EAuni04EBuni04ECuni04EDuni04EEuni04EFuni04F0uni04F1uni04F2uni04F3uni04F4uni04F5uni04F6uni04F7uni04F8uni04F9 afii61352 afii00208uni20B4uni20AEtengeroublekratkaAlphaBetaGammauni0394EpsilonZetaEtaThetaIotaKappaLambdaMuNuXiOmicronPiRhoSigmaTauUpsilonPhiChiPsialphabetagammadeltaepsilonzetaetathetaiotakappalambdauni03BCnuxiomicronrhosigma1sigmatauupsilonphichipsiomega Alphatonos EpsilontonosEtatonos Iotatonos Iotadieresis Omicrontonos UpsilontonosUpsilondieresis Omegatonos alphatonos epsilontonosetatonos iotatonos iotadieresisiotadieresistonos omicrontonosupsilondieresis upsilontonosupsilondieresistonos omegatonostonos tonos.cap dieresistonosuni1F00uni1F01uni1F02uni1F03uni1F04uni1F05uni1F06uni1F07uni1F08uni1F09uni1F0Auni1F0Buni1F0Cuni1F0Duni1F0Euni1F0Funi1F10uni1F11uni1F12uni1F13uni1F14uni1F15uni1F18uni1F19uni1F1Auni1F1Buni1F1Cuni1F1Duni1F20uni1F21uni1F22uni1F23uni1F24uni1F25uni1F26uni1F27uni1F28uni1F29uni1F2Auni1F2Buni1F2Cuni1F2Duni1F2Euni1F2Funi1F30uni1F31uni1F32uni1F33uni1F34uni1F35uni1F36uni1F37uni1F38uni1F39uni1F3Auni1F3Buni1F3Cuni1F3Duni1F3Euni1F3Funi1F40uni1F41uni1F42uni1F43uni1F44uni1F45uni1F48uni1F49uni1F4Auni1F4Buni1F4Cuni1F4Duni1F50uni1F51uni1F52uni1F53uni1F54uni1F55uni1F56uni1F57uni1F59uni1F5Buni1F5Duni1F5Funi1F60uni1F61uni1F62uni1F63uni1F64uni1F65uni1F66uni1F67uni1F68uni1F69uni1F6Auni1F6Buni1F6Cuni1F6Duni1F6Euni1F6Funi1F70uni1F71uni1F72uni1F73uni1F74uni1F75uni1F76uni1F77uni1F78uni1F79uni1F7Auni1F7Buni1F7Cuni1F7Duni1F80uni1F81uni1F82uni1F83uni1F84uni1F85uni1F86uni1F87uni1F88uni1F89uni1F8Auni1F8Buni1F8Cuni1F8Duni1F8Euni1F8Funi1F90uni1F91uni1F92uni1F93uni1F94uni1F95uni1F96uni1F97uni1F98uni1F99uni1F9Auni1F9Buni1F9Cuni1F9Duni1F9Euni1F9Funi1FA0uni1FA1uni1FA2uni1FA3uni1FA4uni1FA5uni1FA6uni1FA7uni1FA8uni1FA9uni1FAAuni1FABuni1FACuni1FADuni1FAEuni1FAFuni1FB0uni1FB1uni1FB2uni1FB3uni1FB4uni1FB6uni1FB7uni1FB8uni1FB9uni1FBAuni1FBBuni1FBCuni1FBDuni1FBEuni1FBFuni1FC0uni1FC1uni1FC2uni1FC3uni1FC4uni1FC6uni1FC7uni1FC8uni1FC9uni1FCAuni1FCBuni1FCCuni1FCDuni1FCEuni1FCFuni1FD0uni1FD1uni1FD2uni1FD3uni1FD6uni1FD7uni1FD8uni1FD9uni1FDAuni1FDBuni1FDDuni1FDEuni1FDFuni1FE0uni1FE1uni1FE2uni1FE3uni1FE4uni1FE5uni1FE6uni1FE7uni1FE8uni1FE9uni1FEAuni1FEBuni1FECuni1FEDuni1FEEuni1FEFuni1FF2uni1FF3uni1FF4uni1FF6uni1FF7uni1FF8uni1FF9uni1FFAuni1FFBuni1FFCuni1FFDuni1FFE uni1F88.alt uni1F89.alt uni1F8A.alt uni1F8B.alt uni1F8C.alt uni1F8D.alt uni1F8E.alt uni1F8F.alt uni1F98.alt uni1F99.alt uni1F9A.alt uni1F9B.alt uni1F9C.alt uni1F9D.alt uni1F9E.alt uni1F9F.alt uni1FA8.alt uni1FA9.alt uni1FAA.alt uni1FAB.alt uni1FAC.alt uni1FAD.alt uni1FAE.alt uni1FAF.alt uni1FBC.alt uni1FCC.alt uni1FFC.altuni20B9uniE0FFuniEFFDuniF000ubuntuuniF0FF Bcyrlgrek latn,kernkern&kern6  $,4<DLTH-^|i .8Ndr*4>H^t~,6@N\jp~DJTZ|.Pfpv| "(.4:@FLDJPV\TZ`flrx~  3  )  )(   (((((()( )( >VfffN    >VfffN3 3 3  )(       (((3    )( ((( )   3 3 )(         )( )( *|)*|*|)*|*|*|*|)))*|4h?O/  P Q*^^ 44I?)?4 >II *S?I*SII>PQ)^^4*S)T 4P)^^* >>>*4^4*S)T 4P)^^**S)T 4P)^^*444444*S)T 4P)^^**S)T 4P)^^**S)T 4P)^^**S)T 4P)^^*44*S)T 4P)^^**S)T 4P)^^**S)T 4P)^^**S)T 4P)^^* Lp.g  ' ''      <-FF Z !" !      "# "u       lP!      !#"    #P PPz |    "  P ! P#"P" ???>zx@NPRTVX[fhjl)MV-/AI    6789P$9DFIIKUWW%Y[&]])dd*kk+mm,-DIPQ\]^opqrstuvw'x)688::<BDDFFHHJJLLOOSSUUWY[]ggiikk  *8::<<>>@@BGIIKKMRUUWY]a cikkmy{{#$&*278:t #9:;<=>@^`bceflnpstxz|~(NPRTVfhjl  !#$)STV\}%  ## >> @@ ^^``ccefllnnppstxx&)+CLT Z!b(-j69pBIt| $, 2:"'B.5H:Pi #>@^`ceflnpstx!#-/13579;=AGI]^blmosy{q     $%'()*,.0468:<>?@ABCEHIJKMOPQRSTUWY[_`cdfghjknpqtuwz|} "&2DFLNXZ\aervx~$ !"#$%&'()*+,- * %&&&&&&,,,,      !!""#####% % % % & & & ) ) ) ***+++,,,,,,*+&&-"% &' )++!! & ,,,,, "& & % &   & & ) ) ,,& & & &  )V? ++!@67Af89B:;<=C>DS*50$/.-,334 12%&  B8 2>@@@@@@E6888888;;;;>5555555....3&&&&@5@5@566667777//.......A-,,,,,3333a888111B2B2B2:%:%:%;&;&;&;&;&;&=>DDD$B2:% ===>$$$$$$$PLTMNQRU^OTT`O`000\6c"]K8<_-#F3888dW%':;&GH>DXe(YZ,3@5.8;&;&;&;&;&b@5@5E577-88X(73@5E58@5@5..8811;&;&I)/D@58888>3 @6[2J@>(n    ##::;;<<==>> @@ ^^ `` bbcceeffllnnppstxxzz||~~((NNPPRRTTVVffhhjjll*+,-./0123 !"#$%&' ('()45<=6>?7  @ABC8DEFG  H!!I##J$$K))SSDTTGVV\\L}}MN:;O9GLm7''!`#abc$de"fg@h%i&jUB:D (z)*+{,|}T~x--./012E5896 C T 'mU %2 .l !!!!!!#bbbbeeeeah%%%%%%BBBBk((((((()++++}}}}-......66!(!(!(#)#)#)#)a**b+b+b+b+b+$,$,$,$,d|d|e}e}e}e}e}}e}"Tf~fgxgxgxgxgxh-h-h-h-%.%.%.j1j1j1U2U2U2EEEBBBBBB86:::{U2ET8886{{{{{{{XY_VZW\^[]A> ?K>>zzzR#)43tS=;c%Ff~qGh-%%.%.vME<Bno6:NyrpwOsaa*ggxgg-!(e}%.BBBBB!(!(($,$,f~%.%.NpTaa*$,h-!((%.!(!(b+b+e}e}%.%.j1j1BBPud|*:!(b+%.%.%.%.6H-H*0!#)IQ2J!b+6p$)* .))))))+  )))*!       ...   "( #, .-$%&')     ))+-%)+))  .)))%Y      ##>>@@^^``cc ee ff ll nnppst xx  !"#$%&'()*+,-./01234!#%+04! #!%(-+690BI4!#%0-+4#44O( ( " : #@#+9"";##>><@@^^``cc'ee'ff#llnn%oo&pp%qq&st@xx??^^&47K82Q56L=3KJ3J     >P.ABNC/DE-F M!GH*)0,$1I>BCD!,I>B CD"'!.5,:AIJK>LMBNOCPQDRS!TU,VWIX_>hoCxI>CD,H,I<       "' .5:AJKLMNOPQRS TUVWX_`ghopwxP"    #"" ##&>>$@@^^``cceeffllnnoo ppqq st ^^ '!,*( +)% ',*%', *"'.5%:AJK'LM,NO*RSTU%VWX_'ho*x'*%%b      ##>>@@^^``cc ee ff ll nnppst xx " ,)&%) !"#$%&'()*)+,-))*!!##*-- // 1133#55$77&99&;;&==&AA-GG,II-]])^^#bb'll)mmooss"yy#{{$%%*** )L, , ' M !(I(-N""O##">>P@@%^^#``$cc+ee+ff(ll&nn)oo*pp)qq*stIxxS&S^^*ECgHBFGhQDgfDf      V;W[5.6JXY7Z[/\]0<123[=^  _  >  [  8`9.T[a:iR7[UYX1b  ;!!""?##$$/%%&&1((X**K,,]--..[//00[1122[33 4465566J77 88Y99 ::Y;; <<Y== >>Y??@@[AABB[CCDD[EEFFcGGHH0IIJJ<KKLL4MMNN4OO PP3QQRR<SSTT=UUVV=WWYYZZ@[[\\@]]^^ __6``aa[bbcc7ddee[ffgg[hhii=kkZllmm nnVoo ppVqqrrdsstt.uu vveww xxeyy zz6{{||J}}~~AXX///J111=[[   !"#$%%&&'&&"%&% ! $%%% %%"""M6 6 / 0 W1.17+""2##(>>L@@*^^)``Kcc5ee5ff1ll,nn3oo4pp3qq4st.xx-,-^^4JHIU V%$a%!GS"#$%&']%`:;<=>NO?@ABCDEXFY          >8  PQA9@?X   ;!!%""\###$$C%%&&X((?**,,D..002233G44N55S66O88@::@<<@>>@@@BBDDEEFFGG$HHEII%JJKKZLL[MMZNN[OO'PPYQQ%RRSS]TTUU]VVXXRYY_ZZ[[_\\^^G__NaabbccAeegghh]iikkBmm!nn:oo!pp:rrtt>uu^vvww^xxyyGzzN{{S||O}}T~~??#C#C#COXXX]""&&22DD FF LL NN XX ZZ \\ aaeerrvvxx~~Q   "" ##>>@@ ^^``cc)ee)ffllnn oo pp qq stxx&&^^ '(#    (  $$&&**$4466FFHHJJLL!NN!PPRRTT#VV#ZZ%\\%__cc(ii#ttzz||~~"# ZcyrlgreklatnBGR 0MKD JSRB d -9FS^i  '.:GT_j  (/;HU`k  )0<IVal   1=DJQWbm"AZE BCRT ^MOL zROM TRK !28>EKRXcn "*3?LYdo #+4@MZep $5AN[fq %6BO\gr &,7CP]hstcasecasecasecasecasecasecasecasecasednomdnomdnomdnomdnomdnom dnom&dnom,dnom2dnom8dnom>fracDfracPfrac\frachfractfracfracfracfracfracfracligaligaligaligaligaligaligaligalocllocllocllocl loclloclnumrnumr"numr(numr.numr4numr:numr@numrFnumrLnumrRnumrXordn^pnumdpnumjpnumppnumvpnum|pnumpnumpnumpnumpnumpnumsaltsaltsinfsinfsinfsinfsinfsinfsinfsinfsinfsinfsinfss01ss01subssubssubssubs"subs(subs.subs4subs:subs@subsFsubsLsupsRsupsXsups^supsdsupsjsupspsupsvsups|supssupssupstnumtnumtnumtnumtnumtnumtnumtnumtnumtnumtnum                                             8@HPX`hpx*,R)l))**+*+X++++++++/+/+/++b+2opqrstuopqrstuopqrstuopqrstuopqrstu+d+b2vwxyz{|}~xywvz{|}~vwxyz{|}~vwxyz{|}~vwxyz{|}~+2*2*n2*&nn*$0fH:, F 8 v .TtfX>rd  Z"<#.$ $%&&0bjrz "*2:BJRZbjrznnnnnnnnnnnpnqnrnsntnunxnynzn{n|n}n~nnnnnnnnnnnnnnnnnnnnnnnnn2:BJRZbjrznnnnnnqnsnunyn{n}nnnnnnnnnnnnn2:BJRZbjrznnnnnpnqnsntnzn{n}n~nnnnnnnnnnnn&.6>FNV^fnv~nnnnqnsnun{n}nnnnnnnnnn2:BJRZbjrznnnnnrnsntnun|n}n~nnnnnnnnnnnnn&.6nnsn}nnn "*2:BJRZbjrnnntnun~nnnnnnn&.6nnunnnn2:BJRZbjrznnnnnnqnsnunyn{n}nnnnnnnnnnnnn2:BJRZbjrznnnnnpnqnsntnzn{n}n~nnnnnnnnnnnn0bjrz "*2:BJRZbjrznnnnnnnnnnnpnqnrnsntnunxnynzn{n|n}n~nnnnnnnnnnnnnnnnnnnnnnnnn&.6>FNV^fnv~nnnnqnsnun{n}nnnnnnnnnn2:BJRZbjrznnnnnrnsntnun|n}n~nnnnnnnnnnnnn&.6nnsn}nnn "*2:BJRZbjrnnntnun~nnnnnnn&.6nnunnnn0bjrz "*2:BJRZbjrznnnnnnnnnnnpnqnrnsntnunxnynzn{n|n}n~nnnnnnnnnnnnnnnnnnnnnnnnn2:BJRZbjrznnnnnnqnsnunyn{n}nnnnnnnnnnnnn2:BJRZbjrznnnnnpnqnsntnzn{n}n~nnnnnnnnnnnn&.6>FNV^fnv~nnnnqnsnun{n}nnnnnnnnnn2:BJRZbjrznnnnnrnsntnun|n}n~nnnnnnnnnnnnn&.6nnsn}nnn "*2:BJRZbjrnnntnun~nnnnnnn&.6nnunnnn0bjrz "*2:BJRZbjrznnnnnnnnnnnpnqnrnsntnunxnynzn{n|n}n~nnnnnnnnnnnnnnnnnnnnnnnnn2:BJRZbjrznnnnnnqnsnunyn{n}nnnnnnnnnnnnn2:BJRZbjrznnnnnpnqnsntnzn{n}n~nnnnnnnnnnnn&.6>FNV^fnv~nnnnqnsnun{n}nnnnnnnnnn2:BJRZbjrznnnnnrnsntnun|n}n~nnnnnnnnnnnnn&.6nnsn}nnn "*2:BJRZbjrnnntnun~nnnnnnn&.6nnunnnn0bjrz "*2:BJRZbjrznnnnnnnnnnnpnqnrnsntnunxnynzn{n|n}n~nnnnnnnnnnnnnnnnnnnnnnnnn2:BJRZbjrznnnnnnqnsnunyn{n}nnnnnnnnnnnnn2:BJRZbjrznnnnnpnqnsntnzn{n}n~nnnnnnnnnnnn&.6>FNV^fnv~nnnnqnsnun{n}nnnnnnnnnn2:BJRZbjrznnnnnrnsntnun|n}n~nnnnnnnnnnnnn&.6nnsn}nnn "*2:BJRZbjrnnntnun~nnnnnnn&.6nnunnnn0bjrz "*2:BJRZbjrznnnnnnnnnnnpnqnrnsntnunxnynzn{n|n}n~nnnnnnnnnnnnnnnnnnnnnnnnn2:BJRZbjrznnnnnnqnsnunyn{n}nnnnnnnnnnnnn2:BJRZbjrznnnnnpnqnsntnzn{n}n~nnnnnnnnnnnn&.6>FNV^fnv~nnnnqnsnun{n}nnnnnnnnnn2:BJRZbjrznnnnnrnsntnun|n}n~nnnnnnnnnnnnn&.6nnsn}nnn "*2:BJRZbjrnnntnun~nnnnnnn&.6nnunnnn2opqrstuopqrstuopqrstuopqrstuopqrstu0LP6-N$%&'()*+,-./0123456789:;<=kmz   "$&(*,.02468:<>@BDFHJLNPRTVY[fhjlL "(ILIOILO "(ILIOILO "(ILIOILO    xywvz{|}~Lv DR ou  o ( o  pt w~ (nnvou #>?@^`lrstx|X]DEFGHIJKLMNOPQRSTUVWXYZ[\]wy  !#%')+-/13579;=?ACEGIKMOQSUWZ\gikmI`gpw0 *H 01 0 +0a +7S0Q0, +7<<<Obsolete>>>0!0 +Faܶ9eՔǠb040l.60  *H 01 0 UUS10UArizona10U Scottsdale1%0#U Starfield Technologies, Inc.1:08U 1http://certificates.starfieldtech.com/repository/1604U-Starfield Services Root Certificate Authority0 150316070000Z 200316070000Z01 0 UUS10UArizona10U Scottsdale1%0#U Starfield Technologies, Inc.1402U+Starfield Services Timestamp Authority - G10"0  *H 0 xo(QQ`L~&aF=Ӌd="?\̈bDطl=HSN̢A;C) (TXA-Nفk1 ag,4L{I hEKbK!(7pOX_Μ8Bk[4e/ ^S7AboB \ 2%|cA˫FkT240BpN0J0 U00U0U% 0 +0U O fer0U#0C̛u]/KQ0:+.0,0*+0http://ocsp.starfieldtech.com/0DU=0;09753http://crl.starfieldtech.com/repository/sfsroot.crl0PU I0G0E `Hn0604+(http://crl.starfieldtech.com/repository/0  *H 33%ýB6,phiDmBϯi e̷JݙadrmDҺ?03ݶ")fPNwqcZ>,/H t87ޞ[Vb4˖ }{Z+Rrc"r(^&a D{-RķT=ayP[,e՞^T\m?^a_+}R00Ơ0  *H 0c1 0 UUS1!0U The Go Daddy Group, Inc.110/U (Go Daddy Class 2 Certification Authority0 061116015437Z 261116015437Z01 0 UUS10UArizona10U Scottsdale10U GoDaddy.com, Inc.1301U *http://certificates.godaddy.com/repository100.U'Go Daddy Secure Certification Authority10U079692870"0  *H 0 -&L25_YZaY;pc=*3y:<0#0=Tߙ %!e)~5T29&UXמ* BΧ?Rifھ],fkQJ/Hǘuع)fm x|z%.enjDSp0Ü+X+=tJQL'Xk5ŝ1 6:%IgE96~7qt0? O20.0Ua2lE_vh0U#0İґLqa=ݨj0U003+'0%0#+0http://ocsp.godaddy.com0FU?0=0;975http://certificates.godaddy.com/repository/gdroot.crl0KU D0B0@U 0806+*http://certificates.godaddy.com/repository0U0  *H ҆gf :PrJtS7DIk3ٖV0<2!{ $F%#go]{z̟X*Ğ!ZFc/))r,)7'Oh! SY ;$IHE:6oEEADN>tvբU,ƇuLn=qQ@"(IK4Zц6d5oownP^S#c͹c:h5S000  *H 0c1 0 UUS1!0U The Go Daddy Group, Inc.110/U (Go Daddy Class 2 Certification Authority0 040629170620Z 340629170620Z0c1 0 UUS1!0U The Go Daddy Group, Inc.110/U (Go Daddy Class 2 Certification Authority0 0  *H  0ޝWI[_HgehWq^wIp=Vco?T"Tزu=Kw>x k/j+ň~ĻE'o7X&-r6N?e*n] :-؎_=\e8E``tArbbo_BQe#jxMZ@^s wyg ݠXD{ >b(_ASX~8tit00UİґLqa=ݨj0U#0İґLqa=ݨjge0c1 0 UUS1!0U The Go Daddy Group, Inc.110/U (Go Daddy Class 2 Certification Authority0 U00  *H 2K>ơw3\= ni04cr8(1zT1Xb۔EsE$Ղ#yiML3#An 剞;p~& T%ns! l l a+r9 ͗nN&s+L&qatJWuH.Qia@LĬC Օb ψ2 +E (*ZW7۽0@0(5y0  *H 01 0 UUS10UArizona10U Scottsdale10U GoDaddy.com, Inc.1301U *http://certificates.godaddy.com/repository100.U'Go Daddy Secure Certification Authority10U079692870 120807154320Z 150924134423Z0k1 0 UGB10 ULondon10 ULondon10U Dalton Maag Limited10UDalton Maag Limited0"0  *H 0 YZ=&ȯ p)ZrYyW ,=|QQ7 Ex>+3>L woZ"Cs0J1*#\>xOh+w{wܘe,̵>%]D@E*v1,g6Fpgm# O8(z;+uKXF[cK d^<3 MD4ݽP;t#wE EiP%~"9":I00U00U% 0 +0U03U,0*0(&$"http://crl.godaddy.com/gds5-16.crl0SU L0J0H `Hm0907++http://certificates.godaddy.com/repository/0+t0r0$+0http://ocsp.godaddy.com/0J+0>http://certificates.godaddy.com/repository/gd_intermediate.crt0U#0a2lE_vh0U=QCo vڧԚ)0  *H !.w*=`oi e̦d`zBe+kCz~KMO> !X0jVfjݥ!rewQY!ivԣpƠkOw?szg9ӽd\:Nz %[n@Ԝ7*暹мmew"ɳ0oH;@']&l6$FM: Ej?:,aAr%'l3YZ5F9QY10001 0 UUS10UArizona10U Scottsdale10U GoDaddy.com, Inc.1301U *http://certificates.godaddy.com/repository100.U'Go Daddy Secure Certification Authority10U079692875y0 +0 +7 100 +7(10 *H  1  +70 +7 10  +70# *H  1?{s.dpL0  *H ֏R:"hLrOT{q+; <58+,i @^aΰ=W~)hau>#^"s1PQ+nextepc-0.3.10/webui/static/fonts/glyphicons-halflings-regular.eot000066400000000000000000000472371333553357400253200ustar00rootroot00000000000000NAMLP',(GLYPHICONS HalflingsRegularxVersion 1.009;PS 001.009;hotconv 1.0.70;makeotf.lib2.5.583298GLYPHICONS Halflings RegularBSGPMMF٣(uʌ<0DB/X N CC^ rmR2skPJ"5+glW*iW/E4#ԣU~fUDĹJ1/!/s7k(hN8od$yq19@-HGS"Fjؠ6C3&W51BaQaRU/{*=@dh$1Tۗnc+cA Zɀ@Qcal2>Km' CHMĬfBX,Ype U*Ҕz miO1nE. hx!aC XTV‹ R%|IHP5"bN=r/_R_ %҄uzҘ52ġP)F7SqF{nia@Ds;}9⬥?ź R{Tk;޵ǜU\NZQ-^s7f 0S3A _n`W7Ppi!g/_pZ-=ץ~WZ#/4 KF` z0| Dѵ&däIÏ;M{'omm I !wi9|H:ۧ{~qO, L]&J09/9&Y 蓰{;'3`e@vHyDZ$3Dx28 W Cx5xwB`$C$'ElyhԀ DJ $(pQAA܉A@'$ hp0V0 `se$4$"t2=f4A{Tk0|rH`L&sh]A<`R'!1N;_t3# V *veF`E O${)W=p:F`22ړC^.ćG<.pNe2ִ+Ysl:˼ ܫu5tu^86ȄTmyQ%u~%~1rҘawߚ^_ZZa0!N`. uqYB\ᨀ[e:@J'Eہ,3ubj@pfeW9( ޅ=lG7gj SM609OˑlBa݁ <Bՙ(VRApf^+g9qMt]تpEr@]@VkV ud^X R@?EY2]#Ǽ4JK'dPC|mmn#$+48u'e&[n[L%{BCDL:^!bƙ:&g3-3ub iLZڂWFSId6.k5Pl77UzT:NN.")['|U"AIvwptdk9嫫9nDmq7I|6Kbc]MBABȪ_JT q  6@Fhd`GT:M7'L,IhFP ~j $¡„ 3hA-S^چ-%qe~Qqln"i&Qe?FlK"As(3Y;"Let'RzM1 0{=) K%$C 9M4c EotjVGD)l8,\w !%$3t TBzҴ iUJ[xgdBr$!eq"J> )\~3(^ R€8#>bHG'7_ fӫcκtDoAA߃(qB<``VΫ֘*buP4v@+.Qԥ$V@C0 RܐP[z:XH#e s>?EWO>@I$|si ES)0A?9ab,@K̩o&Q% ϞLu+ +H|Ɛ?NK4CnPt 'OT.j5Ĵ8vw֜I&+`yScaO[#gQd[KI矗`ČLP # )27aTi@c\ސ 0nCpߖ運4͵x*RzYbT[\kUvHʈqp঄IIŗ) bB XPNtz 2 I== ;}bqjiކa#" >11Ap1POOuxQ Fϲ(h݄O'MDxLK$ȵh& 14SirHJPtDM;rM+ *ؗ5u2$f3K %ѳb (@,2f,~"7R;E;HX(42Z'Tۿ2J+^!#oY~4-׃GW*!A0&8f{`W=DP8'= R g}iP>#4EBRY^4eN8V,[BĨD#X],LBsNC> +o^x jC.4Ya_{eA2=r+9POA!! }YPJeGn%x1/}RgHa ^3- 5 |qSaWK{ 1al`I1 Qf_yyCZ)L3X] W6@DMT<.uGK8DsбWr\7Z\V"ISd>CUjeD 3MtWcPӉ6#3QnቩJ\7#磱`؀K lV6 &T ~l. @61`! ` wYk/a0A¹ԁYhdxk:fEao̟^<IwYgq7s[ -y1ع5aMKאRBYFq}8*Nt'.YbZvK (]&ɜ(ՙ2:0 oΏхPKiBH4UX,[$ 0mXش f50VR 8%ާDtUs`-BPzPsvI8z-t1DiB "˶YTJ .?07jLN[2tĮ̎ #6?E׻:ɞY;A&qSIR)ss 9*x0Bj)mHAhyЏhMm&4Ŋ4 gV&tYOCS0Yd7MvNj)wA(o "͢[ E`7ezď-Q]6+Bca@^I:һ=sSnc 6 OB4LGpBq/>O pwj A*@JC[h&3B Qbϩ8 :%f~v/lS00a"B8(f uGoǚgyt_y~͔ %mL !I$Xt0~ePz]Ug Н=_?.j#+`li BM5 őGp7a ֒%Y[UG9@\bDY{{ED0 $Q+FvC`ݨ3Q E\uC9![$l 6DoDgG*+X!%#Cq ?8ZUB)U@opgީZq89|uccAќW;@">Ph_9}.6V/O:3}ZS {:~ykcO6;OB=bV. Rk o ^GV= }oI"+ ]wFzϷ`<30h3]Rf859s`KM8 XUq<\ZOssM&j&  .%PBL~^Gˈ3pD:Z<\ǠiW̆"(:zX~0PG]8RQMNTqfW~!0R%Ց0xvGFy/F-wu/*+ \8@6c<L;c[º nr QS'oQuT{qҐ_ͿSdA*ð:m8Yuz2PB Hh`lkpLLh cEb6eۏҋ ?!>| *=VK@rx0G`%ryr[6Y37 f**n%9df11ޢځ^'] Rq.,^%l e#wWs56!=!q[ %Ԯ]5^:m5)?V b|u7fw,:Ye R% [ o gFAzFPx{dxíw8ٔ{{L> d2CLL,L,(mS$=|%֝lu& ą83 N Xx \VnJ[)Iw/鹻 |GźYDH*Sp60cJ2@W%Ѧc_^$#*:G6n>D;~`9hXB UJB_вˈ%w'$v|#T<68KMϑ-5U+'B ĪNbJOv'|+*Mk(d }C˱@q&aR%} !VЃs3w2a2awHz/Q0F ]~;ä NDP mK3xke_ S!V&=v_PL9؃Yi NU_)J69f*S  17F|BR$y,Ʊ.&=uqsODBR=ɳeؽɇBH 2lu'h7^#S)Xi2..Pe/@FK$](%|2Y1pC8tI11N//+\pjdWmI=߽YZxMЉP81/ JG^U ,Pd1O^ypql2h$jvI%]V .'[+WU8[D,߻-=[ O wE)3J&dقݶR¡S\. 5J$I&oHȳ~ lz> Ux/Hu;?Gt{?;TH L|F8}{p:2t͆aѧp65Y"LD.rVS_ k]n&Hz~9æ p $4ق'{&M\ΰч!qi (.h' B T|{I6cL.빍iI꫿\!;g`1 j%C o3*60E؎]t.-%0 YK_nft] *VFCtJT+\WZ8gF^ ޞf 5I=#6.@2z;W`B/ęQghjyJNAX3, K66ڲM0T@O{4kj|"ftџۄU<-a5b)^R8:ilKa6@!]buvΏ$ oUœ~:.Lte JξP l$S[z~Rq39钺9Q/m"%ʤ7 5MKL鑧"IߏG XTގXLFݧV jp^/Mgۻ{w *9Oʈ<"aAq.M2@mp^'wߕmkxO8 $[&|YZy`2_|%r/J?QṈl3ÞKE$wvCh a@U1M%0?1* $GZ{!|ʿ$ە-٪Ev;͓:`Bl˸쌧ɬoQ0&,F?^s,ch˕$Ecl0w`⏺ň@/r^l8cT3k@JݔuP&ʪNdJjTKi *uX{tj~ɡ}i\BKenȵ|N u#]@lCZ$iPa㸩t04y20 s֪,Au!QBϖ^@Vsɑ\Za7쾉ш6-TrU u~1HJ(<αbRԖqi J?eG *jVħ ":Y);-Fd!HG~ux cb6m)&;0dU?8X~12ۼtIx5{(z '[ŃkZЅi,b1̇`(mHNeK/ [(#QGduT^m%!(7KgP=hϕkɐU+.[eC"GDΨ<*Ř 9&܂?)\<&Ŏ5 LJu@Y,냲ھ_w0^17p޻*>D8_)$UźR!jOF>{ t,-bP,m`D"/zA ͔إQZG&U]xejxLwv~=)@B6?!;53/ps@tOZS7ؙnlxZ?Zj a{6L41 2Qi&֥l]o=7ļ ofЖr MEV@H/aD٦HlK5)ŒZ OE3IG'г;D'zl(E$.ٜ-W R'\w+)w3꺾 @%R).~9;].šg+)%ȝk҉^NW>b1z:soD K2w[|>9vWMFu`axchիU`*ʆe]OV'6xd?H]_rA+zdFH ʋ<ǴkUsFzaH9-gvb=L/E).x9j%B)$AB t b.bAEZRbH(Jya9Wj0fF'Xz $DQ6q` o i={#4FYH@J3 3i~tYТhkHP17YD"pĦ;'16fpu>FoDQin̒- @P# hj ނŀfC 7°T5HVXpklĭ]yXr)?ͺBNJ B#9e&&_0=pZ6h) ̗a b=(p);.N,W^ *hԺCm}E7i6aIvͲxp*Ac#4N&`)ĉHWey7jloEh_n3 jp?4p2WE'kT_ &!ȖjVlHӻ_kɚʳaY s@[G"bYLܫXi Cq8&zVaY{#I@2m!d[1 AƢnKeם/>dmuX:xʷ\pNl+H+ctSǶC[~3e}6 \,Ʉ|Yݧv]'|&M2 ddsx-((76aXm=ӊQ<$Q†\ qiH阇i'i$"{S*VwF/tfQCWUZ{S;Nx}H&* 9׸qU1 a`(M-aG}n̽0 pmcn ɘ_\l} 9FvHþkJZNO mZQҤ aSf )QC+2 d[ H"t* c*bڢq,#S#u'Ҭ:4asCDMF|ɸm_1L]Y\*X>tgDd@&[)8;<{8<+VG\H^aae-4sJA \ hM[\`#pD5Z97g;BWmqTXX%0v&]E 4]FIJ&S_4R0D+meY gO+M{03v'ͅft:;ر Nn\ǔ^,)1laBZZ[  ZSUYh߆wS\/*?zQЋ`X4gr[CWG.Y0Q|RԃE[wy),ш$NK@c/b -#ZI G$ƗtmH#)XwPZAD|S ofTH)>M1b 7ɆSuq jK4[s xL Ǣ]5 !M!AdƧN><:ǻZ(8)e /W| bDDŃtT7rur0Ң`ܴh5 5S}4hrvalc!ZjB]xDbTxzYS6_)op>#@PS*bS\q ƋxYfQ><" Y6IEr_7Ұ VH!IrEL6!Nq"'daqMvA% v n.;A/2ʲa8D$GWv#̏ 9k'o؟o@ (]gk+}/ (nqK(f Ɵиp23YwpDdGq2$}KӯA"E&Ntg'Nes!Ю4qo}쿝S,ojr/s TMT&Qf\12h'&ctN'Tx7]2 ;G ʅ|T++:%/ 1T  ˀ<4͔˗ ,0~!WO' :suҦن(^ﮎ )7fmlҹ1ūtZh L0 6X"J҂ 49 ֩B}ԭ``Ӓ #Jn_F H|$OK=œi17o-Hqp[ɫ%%:Ɉi3۠G CLL4S:dBj|pYSDP>pv5KLe{t0yEND$*;z5NBIgn.N|׶nRaSZJcH mXek;_ 6,yb0#ZA e|wG U1lLD7ÄVqt[xuEQULPBlZSh.1Q0Uٱ8Rip;{H#GON!?t>Q |pkq!gT,j2sǍ4툊tjnƛ/IOE!ˋnF4M&1x$ew+vS  bm]e%8 P !s_06)Q2JB [t9'Ԝ,[fÆג]BB@r&Bs|Q gOC1J D&LJiC`A^#X8tH?daĖTSTaH0@U)^e}Jb7%ܔ%:ƿ@M+ysqL Y00ÔGD >ĩAW 2I:F 32ʠq:6S]K"g[ ϑHB5VEqLJX{CB!PIq9Llxʪ7>֤]@!@9H!pə$ ?)܎l/"́+@`}}:\ 8zQgS+򒤿C}R:HUF\Xg/AZ%c1wlETwX ZNhyf2D ø&vLq47z\iJyJ-kN3 -sJ5)V0N0d\ӛd0d-E[mf\UmxCR<(`ѕp4^!hQ `!l ~ƙ:JɠlW9˸ZXB=l)`jeVJUG!s1?Ƽ3Ê.}bIa6ʕ t?SxZJ'p i,.R2T`5-R BxrWH JPe#Bb|-[PEh‹(5Sfr/]IƊ dE#OS39ӻ]eۮɹ.9_beM9b#e(- 0Ra9"U,%~X܀z۽{'6[@t[W%* .d'vR {h!AedCE}x=E[|B$7J* B- ,=k7[_-I J5e̶{ ( ;WMw`~pAz 8f))(@ Īم<.a%N n@bz>%T*?lgbd<ĵw9Na8;<^*%y:tDҕZ<@0q4l\ 1`/$IJ ғsN);:A;)$ו Wwy%KrIv\bV\nd{6tv/~*O 7U>8rAC<jE-j牷xs)D1Ì/qp**̸$ّ,  Bȼpk MhpK7U]h&-$鎻Y;q6wzW˄֭AhD^R"s5fw +Q&/9ȂwNbz{Y> ]NEc,ߞ# BF:0/-EȾŒ׃F\I{tAZCORuk i)ytkdN&vA P{P'>xƆ`.%,;:Կ:aFoTQ}v#ףQk's~z5hMQʒY>CʍiUNF#J0uC8k! fv {E/IKIE> pyde ʾ=z:@7J|5g8x 3O 3H1؄F.yfzWIM j[.w%i?҆Uf|}@+[8k7CxSEOޯp$Q+:<]K3T-y[Nz;y-HZY^.M*'h8A.N2rLB 7:Or}CS˚S9Jq#WI}*8D!# g#Y>8` В ?a2H,^'?^nhOƒi<Ya2+6aFaMG-Gkè1TbL `*ـVX *xe§֊Z*c`VSbJU*6TK@zqPhg*ߔU(QU49L cM*TR!R,BȅE*C|TzpF@4*텰جXbL.T2y`Upb T,%@` #?@tGLŞS)ÿztϲFy׎ 14Lhfe(.)pK@\ Xe@TbvhD&0-IbD d@ZD1@ DyѧCN| 94Ӛ#Nc l;, `cX@(2$0 "@- $B@<$А8p7C b(@ PA@F 0tGORIJITySMW52\ToRKV0Ȏ( -$ !6wHGO r~e~/]V~/P~7SzKFv`;`9v# JBN,ӭ'`'`\LTApBs)r! ( i`nextepc-0.3.10/webui/static/fonts/glyphicons-halflings-regular.svg000066400000000000000000003243021333553357400253170ustar00rootroot00000000000000 nextepc-0.3.10/webui/static/fonts/glyphicons-halflings-regular.ttf000066400000000000000000001305341333553357400253170ustar00rootroot00000000000000pFFTMm*GDEFD OS/2gk8`cmapڭrcvt ( gaspglyf}]oheadM/6hhea D$hmtx `tlocao0maxpj name,post5 webfTPT=vuvs Z 2UKWN@ { , h, h@( + / _ "#%&&' ' )9IY`iy )9FIYiy !'9IY` * / _ "#%&&' ' 0@P`bp 0@HP`p !#0@P`fbߵiY!     |vpjdc]WQKED 5 *+  / / _ _  ""##%%&&&&' ' '' !& )009:@IDPYN``XbiYpyaku } )09@FHIPY`ipy !!#'09@IPY `` ((h ./<2<2/<2<23!%3#(@ (ddLL[27>32+&/#"&/.=/&6?#"&'&546?>;'.?654676X& j  j )"& j  j )L j )"& j  j )"& j LL#32!2#!+"&5!"&=463!46^^L^^p@LE32!2+!2++"&=!"&?>;5!"&?>;&'&6;22?69  x } x }  x } x v L   d    d  l d;2#4.#"!!!!32>53#"'.'#7367#73>76p<#4@9+820{dd 09B49@4#bkv$B dpd>uhi-K0! .O2d22dJtB+"0J+ku0wd/5dW%{L>G!2+!2++"&=!"&?>;5!"&?>;4632654&#^CjB0  0BjC x  x u x u@--@$?2O*$ $*P2@%d    d   BVT@L!2#!"&=46 %A+32!546;5467.=#"&=!54&'.467>=2cQQc22cQQc2A7 7AA7 7Ad[##[[##[dd76!' Pԇ $ op zy#%**%$ pdL #7!2"'&6&546 6'&4#!"&7622?62~   \l lL 7  &   l 2'7' & c_"fn &\`tfjpO32!546;! 22&&L%6.676.67646p'0SFO$WOHBXAO$WOHB"7Q)mr *`)nq&* )2"'#'".4>"2>4&ȶNN;)wdNNrVVVVNdy%:MNȶ[VVVdXD>.54>0{xuX6Cy>>xC8ZvxyDH-Sv@9yUUy9@vS-H^{62!2'%&7%&63 a o  ^{"62!2'%&7%&63#7'7#'JJN a o  d⋌&2##!"&=467%>="&=46X|>& f   f &>|.hK  ]  ]  Kh.| L#'+/37GKOSW!2#!"&54635)"3!2654&33535!3535!35!"3!2654&35!3535!35~  Ud  & sdd dd d  & d dd dL   ddd  ^ ddddddddddd  ^ dddddddddLL/?!2#!"&546)2#!"&546!2#!"&546)2#!"&5462pmppmpLpppp LL/?O_o32+"&=46!32+"&=46!32+"&=4632+"&=46!32+"&=46!32+"&=4632+"&=46!32+"&=46!32+"&=462LppL/?O_32+"&=46)2#!"&=4632+"&=46)2#!"&=4632+"&=46)2#!"&=462DDDLpp&,  62"'&4?622;;nnBB# "' "/&47 &4?62 62    ;    %I2"'#".4>"2>4&3232++"&=#"&=46;546ijMN,mwbMMoXXXX K  K K  KMbyl+MMijMXXX# K K  K K %52"'#".4>"2>4&!2#!"&=46ijMN,mwbMMoXXXXX^  Mbyl+MMijMXXX  -32+"&5465".5472>54&&dd[֛[ҧg|rr|p>ٸu֛[[u'>7xtrrtxd/?32+"&54632+"&54632+"&54632+"&=46  ޖ  ޖ  ޖ    ~ p     >     GO27'#"/&/&'7'&/&54?6?'6776?6"264X!)&1-=+PP08,2&+!)&1-<,P  P/:-1&+x~~~P09,1&+"(&1,=,QQ09-0&* !(&0-=,P~~~d!%)-1!2!2!5463!546!5#!"&53333333,);  ;),,;)D);dddddddd;)d KK d);ddd);;) dDDDD 62++"&5!+"&5#"&l`    j`  w  ? d3!#!"&5463#"&=X;),Rp);vLp02".4>"2>4&3232+"&546֛[[֛[[rrrr|2   [֛[[֛;rrr   2  ^  )#!3333))p,p,d/3232"'&6;4632#!"&546;2!546& & T2   2 >p  ^  12".4>"2>4&3232"'&6;46֛[[֛[[rrrr|  & [֛[[֛;rrr   12".4>"2>4&%++"&5#"&762֛[[֛[[rrrr   &[֛[[֛;rrr  9!2#!"&'&547>!";2;26?>;26'.    W & & W tW    >     '2".4>"2>4&&546֛[[֛[[rrrr[֛[[֛;rrr] $  (76#!"&?&#"2>53".4>32  mtrrr[֛[[u$  Lrrrtu֛[[֛[576#!"&?&#"#4>323#"'&5463!232>  ntr[u[u  h ntr$  Krtu֛[u֛[v h  Lr d/?O_o!2#!"&546!"3!2654&32+"&=463!2#!"&=4632+"&=463!2#!"&=4632+"&=463!2#!"&=4632+"&=463!2#!"&=46}    R 2  2   > 2  2   > 2  2   > 2  2   >   ~   R d 2  2  2  2  2  2  2  2  2  2  2  2  2  2  2  2 L#54&#!"#"3!2654&#!546;2uSRvd);;));;) SuvR;));;)X);dLL 732#462#".'.#"#"'&5>763276}2 d!C@1?*'),GUKx;(.9)-EgPL 3 0[;P$ 97W W!1A2+"&54. +"&54>32+"&546!32+"&546ޣc 2  2 c*  `  ct  ,rr  ,tޣ 4  4  G9%6'%&+"&546;2762"/"/&4?'&4?62A   Xx"xx"xx"ww".   ^ x"xx"ww"xx"r/%6'%&+"&546;2%3"/.7654'&6?6A    `Z  HN.   ^ d  g~jb1K3#"/.7654&'&6?6%6'%&+"&546;2%3"/.7654'&6?6 D@  *o;7 *    `Z  HN iT "ZG !   ^ d  g~j  !%-;?CGKO3#!#!#3!##5!!!!#53#533!3533##5#535#5!!#53#53#53!5!ddpddX,,ddddD dddd,D,ddddd dd,dddX d,,d,,ddd dddddd,dddddd  #7#3#3#3#3#3!5!#53#53#53ddddddd,,dddd,Pdd[[[[[   "'463&"260V C;S;;S;V0 ;;T;;  ! "'463!"/ &"260V 08D;S;;S;V0 V08;;T;;d&!2&54&#!"3!2#!"&54?6,9K@  D@   K|@  @  J  L !2 46 >>CEU!"3!26?6'.#"#!"&/.+";26=463!2;2654&!"3!26/.6D N9  >SV N N      & X & l l- p  v       dL!)13232#!"&546;>35"264$2"&48]4$);;));;) '3]dϾV<?!(% _5,Ry:" *28 T2*BBW-ޑY". BB % Zd'2;#!5>54.'52%32654.+32654&+50;*7Xml0 ); !9uc>--Ni*S>vPR}^3:R.CuN7Y3(;  G)IsC3[:+ 1aJ);4ePZo!56764.'&'5mSB ,J   95(1(aaR@ 9%/#4.+!52>5#"#!#3'3#72 &2p"& 2KK}}KK} dd R ,১ !%/#4.+!52>5#"#!5!'7!5L2 &2p"& 2C১  vdd  ,}KK}}KKL/?!2#!"&=46!2#!"&=46!2#!"&=46!2#!"&=462X LLddddddddL/?!2#!"&=46!2#!"&=46!2#!"&=46!2#!"&=46DLDLLddddddddL/?5463!2#!"&5463!2#!"&5463!2#!"&5463!2#!"&Xp LddddddddL/?!2#!"&=46!2#!"&=46!2#!"&=46!2#!"&=462LLLLLddddddddL/?O_o32+"&=46)2#!"&=4632+"&=46)2#!"&=4632+"&=46)2#!"&=4632+"&=46)2#!"&=462ddA ddA ddA ddA LddddddddddddddddL#*:J!#;2+"&=46!2#!"&=465#535!2#!"&=46!2#!"&=46dddd ,XLdddd}KdKddddL#*:J32+"&=46#3!2#!"&=463#'7!2#!"&=46!2#!"&=462ddgdd /ȧ,XLddLdddK}}dddd!2#!"&546 K,,,,,,v,,,D,,L!2#!"&5467'2"&4,XJ*J%pNNpNL d>tNoOOo62.'&54>"264usFE66 !^Xm)!fhHuXyHÂ2".4>"֛[[֛[[Ktrr[֛[[֛oVrru5.54>6?6&'.'&76#&*IOWN>%3Vp}?T|J$?LWPI)(!1 )  HuwsuEG^F&:cYEvsxv!K:%A'# " A)Y l */7>%!2!"3!26=7#!"&546 7l l27);;));Ȼp87cs* s ;) );;)2cL6!#"3!2657#!"&546&'5&>75>^i4);;));ȹpS 9dTX .9I@F* L6;) );;)g  0!;bA4 L5!2!"3!26=7#!"&546 62"/&4?622^^  Ȫ   ȯ  ȭ   ȭ   L326'+"&546d0dLJJL#3266''+"&5462d00dLJJJJ3''&47660J*J36 &546.2   d32+"&546!32+"&546  dL#!"&5463!2L  346&5&5460d * ;O#72#"&5&5&5464646dd12N: 9  > =,L32+"&5&54646Rdd0L;;dH  #!"&762!2#!"&=46  *9HdduJ  u`((&;(J ' 7(a#aa32".4>#"#";;26=326=4&+54&֛[[֛[[}dd[֛[[֛dd2".4>!"3!26=4&֛[[֛[[E [֛[[֛~dd32".4>"'&"2?2?64/764/֛[[֛[[ xx  xx  xx  xx [֛[[֛ xx  xx  xx  xx  $2".4>'&"2764/&"֛[[֛[[Tw[֛[[֛1Uw;K2".4>";7>32";2>54.#";26=4&֛[[֛[[?2".4>#";26=4&#";#"3!26=4&+4&֛[[֛[[    KK  ^  K[֛[[֛V   2  2  2  /_3232++"&=.'#"&=46;>7546+"&=32+546;2>7#"&=46;. g  g g  g Df  fD Df  f g g  g g ͨ  fD Df  fD Df?2".4>"2>4&"/"/&4?'&4?62762֛[[֛[[rrrr@||@||@||@||[֛[[֛;rrrZ@||@||@||@||02".4>"2>4&"/&4?62762֛[[֛[[rrrrjjO[֛[[֛;rrr}jjO!2".4>"&32>54֛[[֛[[KtrAKihstr[֛[[֛;rtxiKA>rtsS6!2#!'&4' &F   &S &5!"&=463!46 &U & U ## ] #!+"&5!"&762   && ]32!2"'&63!46&# U & U # &] &5>746 ^$,[~UU & U #$DuMiqF +!2/"/&4?'&6!"&546762R,^j^!^j^^j^P,^j^IIgg+#!"&546762!2/"/&4?'&6j^^ ,^j^`j^,^^j^/2".4>#";2676&#";26=4&֛[[֛[[:#6#:1  [֛[[֛.   IUaho276?67632;2+"!#!54&+"&=46;2654?67>;26/.'&;26!"&5)#!  &0  =  2 pp 2  =   353  X  v  v !{,  2  ,ԯ  2 0y    r w  +I6.'&&&547>7>'.>7>&67>7>7>-BlabD8=3*U  :1'Ra\{%&=>8\tYR-!q[Fak[)ȕX1 "@&J<7_?3J5%#/D &/q!!6ROg58<'([@1%@_U2]rO.>7'&767>.'&'.'&>77>.'&>' '8GB    `H  >JS>H7 '+" NA 5M[`/Pg!;('2"&"IbYCe\D9$ 886#1%)*J7gG:    8G\au9hoK$]54<&"&5476&2>76&'&6?6&'&'.{nO9:On{{nO:9On{FZ  2Z__Z2  Z# %8-#,- "F-I\b\I*I\b\I--I\b\I*I\b\I9>||;7Es1$F^D10E^E$1u$/D0 "%,I';L!#7.54>327377>76&'&%7.5476&6?'&'.P[vY,9On{R=A &/l'PjR.Mv&  6QFZ  *HLh5)k|# %8- ,- "xatzbI\b\I-yRU4Zrnc1?1FrEs11) ]@ @] )1ES>L'+/37;?CGKOSW[_c3232!546;546;2!546#!"&5353353353353353533533533533535335335335335Rd22ddddddddddd|ddddddddd|ddddddddd2222pddddddddddddddddddddddddddddddw%7&=#!"&=46;3546'#"&=463!&=#'73546oXz#z*dXzdM*zL!2#!#"&546d);;)d);;L;));,;)X);dL ?32!546!32!546".5!2>&54=(LffL(, '6B6'p)IjV\>((>\VjI), +'%! !%'*L 'L'a'M 7 Maa'aQd_)!232"/&6;!%+!!"&5#"&?62**p&032!2#!!2+"&=!"&=#"&/#"&468^&d,!02**6%%+*2222 *L !53463!2!!P;),);DPdd);;)L 3463!2!!;),*:,P, pX);;)dDEk+32"/&6;#"&?62{**YDk&=!/&4?6!546X`)  )   !.#!"!"3!26=4&53353$`$-);;));;ddd-(d;)d);;)d);dddddL #12"&54%##"+"&'=454>;%".=4>7i**d]&/T7 " LRQ  )2( Jf,53232#"./.46;7>7'&6327"&)^Sz?vdjO9t\U>/ v?zS$2451 7F8%M)(  ()GM~ 1==7'''7'7'7'77 N괴N--N괴N-N--N괴N--N괴d!-=32!2+"&/#"&54?>335!7532+"&5462(<H(<,F=-7` 1dd>2vddQ,}Q,d-!2$'$(ddw} L 0<32#!+"&/&546;632+"&546!#35'!5X,<(<(21 `7-=|dd_dd22L!-d,Qv,Q($'$dd dԯ}wdO7G%6!2+#!"&5467!>;26&#!*.'&?'32+"&546dkn  T.TlnTj:d%8   VOddip &yLN(  % H YS(22S dO6F#!"&'#"&463!'&6?6*#!32!7%32+"&546n jUmlT.U  nJ   %&jPddO (SNLy& pd(Y aL7G2#!"&/&?>454&/!7%.!2#!"&=46ސNS( % p &y22SY( nTjkn  T.T8   Vd% dd-I!26=4&#!""&5&/&7>3!2766=467%'^ NLy& p  (S22(SYLddjTnlT.T  nk V   8%d%2".4>%&!"3!7%64֛[[֛[[  [֛[[֛9   &%2".4> 6=!26=4&#!54&֛[[֛[[%  [֛[[֛ &   %2".4>&";;265326֛[[֛[[K &   [֛[[֛@  %2".4>#"#"276&+4&֛[[֛[[  & [֛[[֛  2".4>%&277>7.'.'"'&65.'6.'&767>'&>7>7&72267.'4>&'?6.'.'>72>՛\\՛\\d+: =?1 " "/ ?9 #hu!$ 0 E.(,3)  (     *!A 7 ,8 !?*  \՛\\՛  ' "r"v G  .&* r$>   #1    %  *  '"  $  g2( % 67'"/&47&6PM<;+oX"O\e~Y+" n+We`#'7;!2#!"&=46#3!2#!"&=46!!!2#!"&=46!!d);;));;);;));; );;));;,;)d);;)d);dd;)d);;)d);dd;)d);;)d);dddL !2#!"&46!|;**Dd%32!2!5#!463!54635#!"&=);,); ;),;);));;)d;)pdd);d);dddD);;)+AW!2"/&546)2/"/&4?'&6#!"&54676276#!"&?'&4?622,^j^5,^j^/j^^^^j^j^,^j^&j^,^^^j#;CK2".4>"2>4&$2"&4$2#"'"&546?&542"&4$2"&4ݟ__ݠ^^oooo-- - L- 73H3)z - - - - _ݠ^^ݟWooo -!!- -! $33$ 1~ - - - -Z[%676&'&#"3276'.#"&477>32#"&'&6767632'."[v_"A0?! -  Y7J3$$ )G"#A.,= # (wnkV8@Fv"0DG([kPHNg8B*[eb2!5(7>B3$$' )M"#!7)/c# *xnfL@9NDH7!$W]B$&dXDD>.54>"".#"2>767>54&0{xuX6Cy>>xC8Zvxy#!?2-*!')-?"CoA23:+1! "3)@ +)?jDH-Sv@9yUUy9@vS-H-&65&&56&oM8J41<*.0(@  )*D*2Om9w.2&/7'/&477"/&4?BB8"._{iBBi BBBBBB7._BB^*k"5._{jBBFi BBBBBB77/_2#!"&54>!"264d:;));XV==V=.2G);;)3-D=V==V "/''!'&462*$3, #**#4$*' 2@K#.'#5&'.'3'.54>75>4.&ER<, 3'@" MOW(kVMbO/9X6FpH*M6&+  4C4%dfJ2#4.#"3#>36327#".'>7>'#53&'.>761T^'<;%T)-6"b "S5268 jt&'V7  0 $ݦ -$aPN(?",9J0* d2>2 ""   7Gd/9+DAL!X32"/&6;3+##"&?62*Ȗ*,|%#5##!32"/&6;3353!57#5!ddd,*dc,dd|ddd!%32"/&6;33!57#5!#5##!35*X,ddd,d,ddPdddL32"/&6;3##53#5#!35*Xdddd,d, dPddL32"/&6;3#5#!35##53*d,ddd, ddd32"/&6;3#53!5!!5!!5!*d,dpd , 32"/&6;3!5!!5!!5!#53* dpd,d, LL!2#!"&546!"3!2654&^pg );;));;Lp;) );;));LL+!2#!"&546!"3!2654&&546^pd );;));;oLp;) );;)); $  LL+!2#!"&546!"3!2654&!2"/&6^pg );;));; $ Lp;) );;));LL+!2#!"&546!"3!2654&#!"&?62^pg );;));; p $Lp;) );;));L5!2#!"&=463!2654&#!"&=46&=#"&=46;546&p);;)>DLpd;));d&  #%2"+'&7>?!"'&766763 ,  P'' K    S#  nnV/L5!2#!"3!2#!"&546&=#"&=46;546^>);;)pDLd;) );d&  1!2/"/&47'&6#"3!26=7#!"&5463!m)8m);;));Ȼp,pm)8m;) );;)֥#2".4>"2>4&2"&4ٝ]]ٝ]]qqqq{rrr]ٝ]]ٝGqqqsrrrL#3232"'&6;46!2!54635 ' gdV^|d22L# ++"&=#"&7>!2!54635Gz " 'gdM !d22LK" 62"'&4?62!2!54635qgdq#d22L #'762'&476#"&?'7!2!54635*MMК=gdML*Л:d22L#'/'7'&6"/&4?!2!54635^WЛԛL*MgdКԚPM*MXd22% ! q3gqdL+!#"&546;!3#53LDdddp,E/'&"!#"&546;!3#53"/&4?6262L_  Ȗdddj\jO)_ p,j[jO) >'.!#"&546;!3#53"/"/&4?'&4?62762Lg%dddFF))FF))gp,F))FF))F/!"!#"&546;!3#533232"/&6;546L dddd*p,/'&"!#"&546;!3#53++"&=#"&?62L*ndddd*pp,L !2!546#!"&5!52LPdL&}-1;&=!5!546#"&=46;#5376!!/&4#5;2+p/22ddpddd33*ȖdȖ*yddQ%6+"&5.546%2+"&5.54>323<>3234>^%"% "  d d 1t5gD >?1) A..@  ^  ^ dL3"!5265!3!52>54&/5!"!4"2pK Kp"2KKL8 88 %v% 88 x88 %v% 8LL  $(4!2#5'!7!!2#!"&546!55%!5#!!'!73wipdw%,);;));;),p,ddibbd;) );;));dfdd&767>".'.7.wfw3 .1LOefx;JwF2 1vev/ 5Cc;J|sU@L#A2/.=& &=>2#!"&=46754>ud?,  1;ftpR&mm&L!((" """" '$+  222/2 ! '!'3353353!2+!7#"&46!2!546L J LP*dd*22dL #"!4&#"!4&!46;2d);,;gd);,;;)d);L;));;)D););;)L%)!2#!"&546!#3!535#!#33||D| ,dddL| |||Dddd,ddd,L%)!2#!"&546!#5##3353#33||D| dddddddddL| |||Dddd,L#!2#!"&546!#3!!#3!!||D| ,,L| |||DdddL!2#!"&546!- ||D| ,L| |||D ,L )!2#!"&546!!!#";32654&#||D|dDd&96) )69&L| |||DdVAAT,TAAVL%)!2#!"&546!#3!535#!##53#53||D| ,ddddL| |||Dddd, d dL#'!2#!"&546!3!3##5335#53||D|DdXddd,ddL| |||Dp ddL"&!2#!"&546!#575#5!##53#53||D| d,ddddL| |||Dp2Ȗd d d %2".4>"2>4&!!!'57!۞^^۞^^qqqql,dd,^۞^^۞Lqqqddd '+2".4>"2>4&#'##!35۞^^۞^^qqqql2dddd,^۞^^۞Lqqqd2d2dddddA 62632+54&#!"#"&5467&54>3232"/&6;46n,,.xxPpVAbz  & AwasOEkdb  A32632&"#"&5467&54>++"&5#"&76762n,+.yxZ % OqVAb   AwaxchsOEkdc  dLm%5!33 33!#"!54&#Ԫ2dd,,Md22y7/2#"'2!54635#"&547.546324&546X^Y{;2 iJ7--7Ji/9iJqYZ=gJi22iJX5Jit'*BJb{"&'&7>2"3276767>/&'&"327>7>/&'&&"267"327>76&/&"327>76&/&oOOoSSoOOoS=y" $GF`   Pu "Q9   ccccVQ:   Pu "GF`   y" $ooSWWSo++oSWW"y  `FG # uP  :Q # cccc:Q # uP  $`FG # "y  d "!#5!!463!#53'353!"&5+, ?,dԢdu       d !! 463!#5##5#7!"&=)+5, ?,>dԪ |  ^G |d 77 P#3!#732!!34>3!!ddԢ!,d!s, d,+$d$+ppLL293232#!"&=46;54652#!"'74633!265#535d22s);;);)X>,>XL2dd2;));FD);>XXԢddL6=3232#!"&=46;54652#3#!"&54633!265#535d22s);!);;)X>,>XL2dd2;) $+;) );>XXԢd  #!"&762#";2676&35} ,, }@D:#6#:&77&P'L. dd LL/?O_o32+"&=4632+"&=46!32+"&=4632+"&=46!32+"&=46!32+"&=4632+"&=46!32+"&=46!32+"&=46                  L                  )33#!2!&/&63!5#5353!2+!7#"&46!2!546dd^>1B)(()B1>^dd> J LPdO7S33S7Odd|*dd*22+52#4!!2!'&63!&54!2+!%5#"&46!2!5460P9<:H)"Z" )HJLP;))%&!!&**22$.2"&432!65463!2+!7#"&46!2!546 jjj."+''+# J LPjjj9:LkkL:9r*dd*22,62"&5477'632!65463!2+!7#"&46!2!546X/[3oo"o"."+''+# J LPk6NooN>Qo 9:LkkL:9r*dd*22",!!.54>7!2+!7#"&46!2!546X,%??M<=BmJ J LP9fQ?HSTTvK~*dd*22)2!546754!2#3#3#3#!"&546/R;.6p6.d6\uSpSuu;)N\6226\N)G6.dddddSuuSSudLL/3!2#!"&546!2#!"/!"&4?!"&=46!'|  % XW & dDdL D 2  % XX %  2 dddL#-7!2#4&+"#4&+"#546!2!46+"&=!+"&= Sud;));d;));du);P;ddLuS);;));;)Su ;),); 2222  !&4762 !2!546 'YV/ |UYY(n0U22!/.#!"3!26=326!546;546;33232!'p'q*}20/222,2 "!#!5463!#5!#!"&5463!#5,  w,, v  w, O,T    dGFV32676'&7>++"&?+"'+"&?&/.=46;67'&6;6#";26=4&KjI C   )V=>8'"d 1*) "dT,| -otE  GAkI ! "% ,=?W7|&F@Je5&2WO_e_ 2  2 ~ $4<Rb%6%32!2&'&#!"&=46#";2654&'&"2647>?&/&6%?6'.'.. +jCHf7" *:>XXP* @--@- -?0 !3P/|)( )f!% =  &* x"62&CX>>X83 D-@--@ۂ # =I+E( //}X&+ 5!H d9Q`o322#+"&=#+"&=#"&=46;#"&=46;546;23546!2>574.#!2>574.#q Oh ..40:*"6-@# d   KK   d)  )k)  ) m!mJ.M-(2N-;]<* K  KK  K X K  KK  "p "),!2#!"&'.546"!7.# Vz$RR(z }VG+0 )IU!zV`3BBWwvXZ3Vz&--% ,(1#32#!"&546+"&=ۖgT)>)TH66g )TT)g6633#!"&546+"&=`T)>)TH66B)TT)g66 %'5754&>?' %5%Ndd/\^^<ǔȖ  (Abd 2"&4$2"&4$2"&4|XX|X|XX|X|XX|X X|XX|XX|XX|XX|XX|L2"&42"&42"&4|XX|XX|XX|XX|XX|XLX|XX|X|XX|X|XX|ddLL/!2#!"&=46!2#!"&=46!2#!"&=46}  J    J    J L  p  p  /3!2#!"&546!"3!2654&!2#!"&546!5^ );;)X);; G ;));;)X);d,dddL;!2+32+32+32#!"&46;5#"&46;5#"&46;5#"&46222222222222L********, *.62"&%#462"&%#46"&=32W??WW??||||||*(CBB||||԰||||ӐB76+2+"47&"+".543#"&'&676/!'.6E*  '?) T 0I' *L #3{,# n  6F82 *5#"#!#4.+3#525#"#5!2 &2p"& 2D d 2d  dd R , W 22 L 05"'./#!5"&?!##!"&=463!2E  1;E%= !'y,2 " # 22+."A2VddGJ!2#!"&546#"3!26=4&#"'&?!#"3!26=4&'"'&'#&#2LFF &  7 ? 9   9 gLR   2 2  2 2 $ #'!5!!2#!"&546)2#!"&546!PpmpG,Ld|pd,#'!2#!"&546!2#!"&546!!5!2pmpG,P| pd,dd'+!235463!23##!"&=##!"&546!2dddpdp,d ,'3#3!2#!"&546!!2#!"&546dddpG,|dpd, pdL'+32+!2#!"&5463!5#"&546;53!X|^d,Lpdpdd,'!#3!2#!"&546!!2#!"&546ddvpG,|dpd, p,0o #"&54632a5*A2~ 6'&4O**{))*2A~ !2"'&6d)***2,~o #!"&762{))*a**( 5-5!5!Lc d 1#3!35#5!34>;!5".5323!,P2 &d2"d& 2dd,dd  dd & ,L%1#4.+!52>5#"#!#3!35#5! 2 &d2p"d& 2 ,, dd & ,dd,ddfrJ32 +"'&476 0  ) J 00   >fJ32+"&7 &6S )  0 J ))   fJr"'&=46 4 ))  w  )  0f>J ' &=4762j  00  )  0  =:#463267>"&#""'./.>'&6|Vd&O "(P3G*+*3M, :I G79_7&%*>7F1 ||5KmCKG\JBktl$#?hI7 !2+&5#"&546!5X,p dddL!2%!#4675'=DXDd dQ,[u}4]ddMo__<vsvsQQ(dpEHEd{ d&ndd ddddd5d!u ,d;I]ddQEJadd9'dddd dy'dddddddd,d,A22>ff****NNNNNNNNNNNNNN"~Fn2b\r bb 6 ( L 0  X * ^ h(T*v 8|t*<6`R.j(h6h^2Dl.vb F !2!v!"@""##"#8#z##$$0$^$$%4%`%&&~&'P''(4(p())*&*J*+ +z,,h,,---.(.f..//F/~//0>0011`112$2^223"3>3h344`445,556>6|677N7788B889 9J99::l::;;<:>>?(?n??@H@@AA~BBBCCBCvCCDD`DDEZEFFtFFG6GvGGHH2HNHjHHII8I^IIJJ.JR@. j (|  L 8 x6 6   $ $4 $X | 0 www.glyphicons.comCopyright 2014 by Jan Kovarik. All rights reserved.GLYPHICONS HalflingsRegular1.009;UKWN;GLYPHICONSHalflings-RegularGLYPHICONS Halflings RegularVersion 1.009;PS 001.009;hotconv 1.0.70;makeotf.lib2.5.58329GLYPHICONSHalflings-RegularJan KovarikJan Kovarikwww.glyphicons.comwww.glyphicons.comwww.glyphicons.comWebfont 1.0Wed Oct 29 06:36:07 2014Font Squirrel2       !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~     glyph1glyph2uni00A0uni2000uni2001uni2002uni2003uni2004uni2005uni2006uni2007uni2008uni2009uni200Auni202Funi205FEurouni20BDuni231Buni25FCuni2601uni26FAuni2709uni270FuniE001uniE002uniE003uniE005uniE006uniE007uniE008uniE009uniE010uniE011uniE012uniE013uniE014uniE015uniE016uniE017uniE018uniE019uniE020uniE021uniE022uniE023uniE024uniE025uniE026uniE027uniE028uniE029uniE030uniE031uniE032uniE033uniE034uniE035uniE036uniE037uniE038uniE039uniE040uniE041uniE042uniE043uniE044uniE045uniE046uniE047uniE048uniE049uniE050uniE051uniE052uniE053uniE054uniE055uniE056uniE057uniE058uniE059uniE060uniE062uniE063uniE064uniE065uniE066uniE067uniE068uniE069uniE070uniE071uniE072uniE073uniE074uniE075uniE076uniE077uniE078uniE079uniE080uniE081uniE082uniE083uniE084uniE085uniE086uniE087uniE088uniE089uniE090uniE091uniE092uniE093uniE094uniE095uniE096uniE097uniE101uniE102uniE103uniE104uniE105uniE106uniE107uniE108uniE109uniE110uniE111uniE112uniE113uniE114uniE115uniE116uniE117uniE118uniE119uniE120uniE121uniE122uniE123uniE124uniE125uniE126uniE127uniE128uniE129uniE130uniE131uniE132uniE133uniE134uniE135uniE136uniE137uniE138uniE139uniE140uniE141uniE142uniE143uniE144uniE145uniE146uniE148uniE149uniE150uniE151uniE152uniE153uniE154uniE155uniE156uniE157uniE158uniE159uniE160uniE161uniE162uniE163uniE164uniE165uniE166uniE167uniE168uniE169uniE170uniE171uniE172uniE173uniE174uniE175uniE176uniE177uniE178uniE179uniE180uniE181uniE182uniE183uniE184uniE185uniE186uniE187uniE188uniE189uniE190uniE191uniE192uniE193uniE194uniE195uniE197uniE198uniE199uniE200uniE201uniE202uniE203uniE204uniE205uniE206uniE209uniE210uniE211uniE212uniE213uniE214uniE215uniE216uniE218uniE219uniE221uniE223uniE224uniE225uniE226uniE227uniE230uniE231uniE232uniE233uniE234uniE235uniE236uniE237uniE238uniE239uniE240uniE241uniE242uniE243uniE244uniE245uniE246uniE247uniE248uniE249uniE250uniE251uniE252uniE253uniE254uniE255uniE256uniE257uniE258uniE259uniE260uniF8FFu1F511u1F6AATPnextepc-0.3.10/webui/static/fonts/glyphicons-halflings-regular.woff000066400000000000000000000556001333553357400254630ustar00rootroot00000000000000wOFF[\FFTMXm*GDEFt DOS/2E`gkcmaprڭcvt (gaspglyfM}]oheadQ46M/hheaQ$ DhmtxROt `locaS`'0omaxpU jnameU,postWH- Ѻ5webf[xTP=vuvsxc`d``b `b`d`d,`HJxc`fft! B3.a0b ?@u" @aF$% 1 x?hSAiSm߽44,qPK q XE](2 .ԩ] "ED i]DԡZJ\8wwV"FpUԯ.Χ(gK4O n;NR{g`'!PMUHEՠJʫ*Yq9c<U9!QIYׅ-KC+ դU)Q94JYp]Nq9.qyVV n)9[{vVכ־FWb++{>׍a|*gQ,K<'W@Ex̢D&Ud# & x Mx2c 5*.lN/h]GtT(xŽ |յ0>wm#Ye[%Y-YR'rYjD% ,@BKZjHڤ@b-R+nhK~룼$;h^fܹsn{ι ˴0 kb8Fd:%Lה"1AՔ AY>,ؔ#pZ4؟5made ?Ȝy=I:C D(nIxL .1!P'JDtHj@L4Ph' )b)vHX,f1c\'cGu>1 ~t?!xT_q?qBF#L%Dћ"?Yǯj??8>NSkemAYDb4 J);@jP$ 'qh8`;aX6CF*dYc"'?hLV㗌,>ce3eVh =C~xC\((qb@ 4xK&hׁ 4\2DZ6N1|-;j Yu@jѫxi䊧mK ٍDEwq3̷.cAw@4t.gkgr{~Wl~{lW2} 276a2\6oz@$HSH gbtX70Ktc1,7B oLƏ66[,%iZ ,l>TpKSGg\> #A#3Eyk6v;u3!ZI8Mk?8CWq{`C*h>H1_skh)ojOO' !~dXgB(0< kOYxeƧĭ5k =d ϧ> +tC-o Ǫ/_koܶs+fOztpu7-}d9 se \9.H4!0S\ ʱk2"?ip7\2zlްt=W\!KyOXimUnov 6: 2 LZkAA^qCޔ &PaFI0>&Q #FQl> A·q*OȦ_@27l,sf 6p7ܩ?M1vA2]$j";vlk~va0gjzRD:gc6yw%g(þ#'uB#=_@?>FVb0a!aL4tXv:Fh9j^xތz}Wn}7}jΚiHitKSaXEEbbBQ1ftxFȮ -"dqA\~F`6i䁕+ Ԣ^Ȳ}ש׆k&Ĺ<- \;g1>w00v^x 7l#Ot^5+xe.^]׼G8^ m(t1 sbfJ %<4H@e8C,5<(kc5YIA]|ךl6+=HVcbKՋB6i4 #_|&>NvQk#pW=u7HɰR$ [5싙 g %19}&@$&l=1RI}9#ςz??1z&ı_ac|PI[:u;l->k4GYm|Zw }HnR=-B ~m.ِ .Mz^,0%8EG**|sg|ozO֬0sz.WN^ yHk<v3t{8-|' ea~H94xA-@y bT4@0b#]DDljDSio:AgSP z:;-|yH"r {B{\5RLi6AAtM]taRKC!1CgC샂 +1EG!Xzٛnzv@x-#i^x*$)W=O\f[WX~V? `Lei::v4$?=Ra#c]8YFJb&'{%LCE Cf]^$/fߪM;À; 6CXV#X~ F< :vCcyBpLv1Fv#9 /8VF01_K?x>}#G7т\Wp!.@bwɡ+{o#ԍPQҮnī66 cZD(. u;nM}?vtxF{+` ="rPπlDV̶?Z@H䰅][35%O )\^ Z;>Ftf-IzӮ yu1uo<:oa:uqwykk ⋜}0?jvX+}VG$s ?26YI5c$Cfb!X*|F^$p7p55߶6[mjgl>* KO& 8ܝ:ǰokKm~oS-*4E}P/% k:e"1AJCAX8= LŢ>ܱav{|K.3 :\Bxwbeb>1ۿvH?f58 %6$ɲ'pL^HXbpIVqnA8Kg'i!UzSEI5N=hpV?(E Vr?޴7Vڋɿ.O;p 4NRZm.O> MuL'j5`;MtAQܶMyV<` $m)yڳXDa:݁q1JFq15-l\3~X-2pFDe/f!2i:=h{%{t^ *PBͽ]YD3jd *w|GLϽ}ˑk7Ç=06oz*zo1~Jw00SePw%#@BJB %+ ';%!& )Hq 7fqH.!Eǎf,9՚$9 H{~i Z)O|!"D.KQ a2 %2Wɂ\{*B{7,9.'ew U^W&$r9rcGBwll<ʷSQゅh! iѨvJ :Y?#_m4q[ },EA{VПP|Dg?9MId?{)/ /\[ Jҏ[f4G>QK^ m O -7w]„<U3jƏ,:Yq~0/mŵ@CCFq{,Θ쬷ΘQSo lsɿh?A2q`5Z&*X1L5:6ς+O]uej%?ۼ&aW?{2[}W?JbΙk-\b7sIkf&Λfx~nO-9V ~cW"ȗy)b\)2MrWf;MU7'[-c/.ؾuMl&.9) G!!W* 60Cф#qrqOKZOWq,8́/XpTȑg<>¤)[J8o` ;S\S%h~p|J˾F~K=E0NQX*8;D7Q1QC% *Eyy} UG?>I`>'6<+3IVgϮyOQ$WBvH v[Ϗ 2+ 'ø6N߆<ɕ 2S娚9X1\┣df>B~-t>W]pPrZ['+ƌl9]8qC!' @AAOuШ !?M\JMͭfǞ)ߕ=w?AN>¼}jQ<ǏpǠ^(}1+2q F4RiHďITr8^!gm>'ڸhE`s̊ol!(9~ o%#)~ƃj$@ՔLpGOa{߿fé)zؔY<~^cs潺ݴNRURTY%8Ks3qd]^QTb' zx)HFҩPmUZjQ&XƁo<0jYGz]$8c&hyݼwΞ{9^sf߹m[vӣ!(ZAsۧyB8RiԣBg6{UmtyW!bpǮd n/ŷʼ@v/%cxEn:4Y²,yZ-krcH&^ȩC'Ȯ'^T5r)((IJU&#݌! +YM.JEX^|Lw@ھZsgY洺\xԟxyLCyo?eV"_[Q/5Y|qI/\9diEBh$v wOL fpa ,?HgHf2RbL v >USo^1/,ēvcYGmŨ~Amz ?/40yj̸pk2H eERb/"M 75ul[drC&Y͐&I `!>p;J-b--.VM4>Fj/5σt5}>C*<'d?,cdGf2ҁ0w6Lh"fKζp;ǿ϶Pdc1EOi%Ř(DCWV2I)TiMFTz0U S7V mBW6;nYZUzSTg>(hF"޽T뽷R]L۶|Lx[s,'NU|E<4)Rp*vU#g*gjə*=~܃ASēA JHw3@NurbwȀʌx}[`7ZtPlh L.)NU}kq'vFQr׷{ˤS]ZL(@*Sf^+uPe_k#.8ɂ%ՠ,@TKх t`ߑXAD;b|pA7}q2 @Y`~iԬK0jY( R~^ҧ8>=F"˜A[DqvQCX|ZsO \/f.F;kPbdz7ԐeͶ-6bybaWjnh7YLF!4wssFCnh_0> MZ nC *#5/OUN\(3o@[7`Mg8xge;f\y|f֤ޑ]i5q5q&>'353kYꭑ=W7+΋yxIeOYǏs(p6[B/t爁*̠-n: <Ц) +ް~q_}oxt>LV FG@d9[2?2ȳ8笞={fgcsCmre#E>45qo:JX^ioP,xf:/yn9VѥS7=u-\%KϦUv,ⳀZ=vkN*+_.ڊ֞iڃ=w @lmr>Oo,VԲɝz &:'45!9pI 0@I[PU""sInvR>A9t$3/|k8yiE c8E!Q\ۂ} %Af4s*A8A΀>D=5uwjnG z?2Q/I=fH4n]澀YmG"2PEHfvZn<šPiA_q/PDտ $$~%NyhrOdM\-m(@\#ƼNJO>a+ uJ*(%¢FPJW,$))} B\_wV] 0TOCÊQ}5{Ho*;;葞rǨMc54S : M7(kY:z`gp Jstˉv'eG^~iD16dA @'N ֭N.?f…1bzJD V o@7R@6<%IF0mj= [}Nۊ57pyv4@<mЭ9Tp?R70қQG[jzib~/)wC? רa-/Cn.ĕH j63pKrhXIƎj o19 f\~:-ѓK47BY̆y%DC~em@]%rs4T G-Ug>HOpVB]{9&^6|m _PLLI7ǒi "'T }? 4|[Fǭtu/_y;Z?HK0Wzc#)~.rĥ+B&JG0[.ΡrOk;VCoX K۝S߳rt:zX\xmJhxNh5 K`;ydp.Ec4XD<-llip.^p: u/.Y[rl_4kz$~Dq]7/T_<菵4K$Ɩ &w S7|K^7MsMGhw㢴0]?fja5aiЦ6C2no• f=)d^v qNcԎl=u]?;f-E~nv}5%Oջd덿=Z%v  nKu ̓*J#1hu1Hr o}SZu=w;nϗU `FȶEn?߫k&l9YdgA8NSGD09MAK{ހK3݊[_]%W4zۈu9\~n3~zir X3k`Psn=m]ԃJksT9deYN`}/]U#b;Rt,lh*#JB+ (iGx\}~IֳFv@Tu֭J @-LwzYgw`wx-(d٢]F3_XcYmQԃWb-F K5d-0b球—֨T+_Zxcj*`}|x~LF*S*oMتAT1p71?R t>R'"Ey)oP7%$rv QeE+nzlVlFrkt''?R'ZCEIKy ga0^}pE;Kq{T/?i"%1ޒb-Ծqƛ˵+ 8]rIڣV{dȪ͜\AQvOS]0.NX9svb?OE~FPU}o[YKrA̓U%7Dw q b/h AhPbQؓJB8I ?I%=XtO;(PhLd S 'hݱ>|TV?,O"\`7.2>D fmg;-C'u, zA`-ټ$x vck2[xp\cbl΀ihsivaÛM,gĨlMz7JvˑVRWϋNo4(-XB^Cl&Vnnn D4[k6N&}f3YQw@$U$(Ǫo:-ZG#&/} ?N}ƥ7A!MhW>?iXprA١b?uϱι-h6;SB#/@ѿJ !%Q)Dq:{JI^ޑˡPY7UG(h?HmъvREH=N`P)QG9FMSMG@2E$Q $s~TkN"9Ն8cF^"?+G٠ ^*gUlFVxUpoC.XCƵ׵͉qK[k[K(l; ӡn%^Rj,$) 1n.G:Cf(,;ĴR—F_~^;իD;6|/jGGSSGGӎļDzbR/X?Up14u$`[ߜH477I~~Irߙs#6+heW6@wK̸h6, 1C"=meA =@z sls];kklr^"s青>&Մ-[{JiҴ9[ݵȩ-]dޢc An۹g}ꒇ6hTɖ?3s^kLcY 1Zn[bݴE߆դwk3f> fMDՠaD ~}&@5u gnOȢ<'` &bӬ-6;X"d*awYvtLXָkUߩa=HR_@+j2T*£%/͸oƤy 19/7 ~7_o+$DүsIH:r yiF:v(dO":omdM8 ;Z9uʩHCg\K/*ԙg*-I_ERqR'[f?GUAovb A$e]/Կo?|ԐQm4G7G833+ 74z*)$݋JpDNj5pqeDf/>%gW{U:g,nlU\t'%E}͝uCꘒܻߺp}U+^b'o(5gVBIOEm>5yzg}AP-P/ޫ6)x5/t;1p1L9Aܳ|)X]mkFEH/4}:,oLMo6]YM50u[yҫfVh?E-A_i﫝j . 6|5`#Z-svfqӟs͚>w7C{ A]Bz,iH'dv?`E x,mz`F[2avhp%(̒ʂ5Ԧ;Gюh\y";|"ٝʖrxzsPHCTvP$ly}iyhvMCr)#x-.(t%fu€(ۅeUUo pqeˡ啗syi Xk`>X@2P. 2͌>n|,/4} ?A&Jr+ɐCV]{Z0- A= F$+%UZyޗٲR B)wT8(aRΣ*-sr5v !^tZ:/K,'F  9=G<Cu"$-FS2(F 0Q+Xw,]=bh[qBQI ;)"Ō926r?}lV =b[j4AzKkQ?T[%$KQ-l_@l/ &;차Dr?P_dE1~z^I~breufP/պ# E+S\G-R4 SSV俑; *`G*5'dL ~ 5Fhb` ꁜ4[b$~GNAX$~ }[W}_z×6m&~O%j/r&|_Sy<-*Lϛ,JQzͤ𫷣|V|GVW~z  HE YnH4r7P?99ߡ|O-5 %4 dzO/4L_PsT>LQD( J8F+)jCb Mu2Xc8$t}&@Qr-֤U_o6q7P1ˤ+rc6I \ (*v24Uc(A ̣93]z;0'=*,e56Va,qh*P@wȬG/Oj|FIm #Pz;Jwʎ}< z Tt~`ȱGP%;? 5((u# vՊI#9,?Gb4K]Qgԟ]E[ phʯG+`Ęp?@>!}" ҽr=CD5 62ZY? iA T(E UJu;"}պ#LcӗVWO&CIԙu8*烞QaQ^*z(L|Jӏ^fp104~CUx*rV*N9π׳Pūsp_L3Z"}&rO|l~kC/Wj><SxMbSg(]J(Z#x\$OC68-f:{Sҳ蚨o4:)Wb"uiuh~d%BAM sWH.gv%4v+=¿ SGϋjWHWu>[B{[uɶs;laziW߭\zC|\fte&ߕ+Bk/t  CM /@S>Tm G`v`?G(,zb" eAAi7QR<"iX:I܋(aV;4R]}^1vԵ7=p|[Jοeµ{)e#ief0KJq"*F#(GjJFhX#шݍk5ERP΋ ^pCeoe:{6۬5͝sƙ8X K6V[=}V+hͧJlZZ5W;TeV-@HID<͙[)֐l^bXeNN"K]@b?.HH gzXaْA}MOeXHNrڟW;htgttOyu3=*פؿCFGsh9JͽZ-k]L-~hii.49Qr5I,Vݓ^jf_},Q6?5NV ޞˍYٜN%ezqƨ>Z Nt1 a %= yhޙ HJZ? hvrk@mY`^insF\*|Lz!/?)(0 MS4(ȗh{-'ho7cCҞ?6'|ubգ@!bÙf{tz1UA?=@ t%䕉iu[ NiD GT@:p<(cXUm2ϱ7zOM^FϴYUfwGs#t:/~Os]Fݑ((^?L$Sʽ WzT>m'_d:5Lh;H7WgzgZZb3{2d5Jj9c+\vqzDbbƶg "l@צpQBbS Q>+d p%}L!cdwHopx(Tpxp#:dvQ qdAQFdLKmPR pU?l zg-jPbGaR&^q>u8p&Ӯф `MGSܵaoWܛZaâٟݰV5Rs2NX qGB OKg BW)Sg\ӡl]z<߲o-_- AKMqӭ!æSigy۰]K;ST'kPqee7cZT{~*7b\H?jٵl3P оwT2jY;)l DueytOTjöUHXgɬ,WϢ^u![]vF| QGh`(# R'5XDQqM6gc'bu:'H( ?yյ6~.e[n *UyZst9R!GMM$xz$]{L<}4JZ~MVՕhy >@u +]2FqO8jѥWCQqrw.䄫ޥ\_y\On)IKGRHŁqI. d+u@ϴ kŤ}9Tv6*xge7?ì}S-AU OMlJ pժݧYwhi6\fAZc,rjFTMj8kO51TqW_n`7%KWsd0:`OXs$4?:SI1W-Pr}² 9.&P^f 8(WI``@5a}ziV pPԽ+:d\j"=aj)W$q{͜p)V|7hj$L֡9\ځn[ k{lG.m m~TEbȭm` wnyP&:PLJY_pNWzVS׃]7Ed%i癬| EWM7r HB6`UGZ 9N2l2ɅHY(ŗiwݓ[`cZR;Yz=TrvH9c. ֲG6*p΅'[:/ҪXCYхMt-']n,{@ cObIN.xN F9뛝NK[Xr=Wm ݏƦY+?sJgXuP%ȗV^[ W;W xvi/XS3ȼ2ԩZ f2/y?8M@Q*˄CXk?MzTy?ZYu׳)]͕1-a7j~ .d  'VztXK2k̹d?zzK.>,BZ`q'kHqy5j>a\C#H;#p7l4} IR7ފ0$=V#_.vs{g>h!Ab/p7=zmi%͟3)^Oj<_UNY63dsIr8EjU* 33|v ;OB@,,\cwd}6k.ukF9'26D]exGJK.׽}S$@ t";2ɩ*41_x7QbjX9Q;#{9eI -奐br B<9dpzIVQ:l+si #=T+R(MDC$ a̱ ONgj19gqXk}FdcG,&..^ɷwwc>E_]3U|t{Jf窂u_.\*W=}lNo+^Ṿ vP>~sTjWz~_ogS}-DTd -TAaYf3,PATcm ռ4g}mE$BwŪ8>9JW⁩O/9PJCXA{,@c,tEJTj98Q& HPl~K%ƞ1ѻ -eD zxNXuz.9}Mc&:Z5ә8% յսmomCB:l8~ܦEjTYHYvnV^IN]]ŽCXkg#s cSB$Ý=$k}cG&/z}_v6<7IVGGg*l\RXST)šE%Yu~Q~>XЅ`9Wk*@_ՊpM]0*%a3X팁KM|{FԔ 췾d7[nlͬD@m8e cż#gHdd@~.jllɛeRcxE(( Km¼GXA7S@[l.%գnMDs]n_Q 5i?zGTG3T@e i,r O2<l+/,%m ۚXn|E]lí[m<|#z+5 7&\5S-{AE^tK M^rq]FmC%2vJ)W-}OM"`9l+=%"T'8zH3QҐѩYP~VزNi 7ۛ ?w1xc`d```d?oAePBYt?;"@.Hc xc`d`` &]aA_x}SJAS<` b)6 >@D"X\o!ι{,_oggg #JVYp>uC4&*<=$g9W@.0q- ;:pt"HUe5 Vg([Ax9!޴EMߗ4N&ӞwjtԞeσLp>w>Gpfz`|^aż>)o oMg+RmRq,RJ1XTN7t{IE\F8U mb:fN&j9Yxc``ЂM /^0Kؘژ0=avcca>bĒIJk ."/ I888qqpnǥ5w)^-8 ||||[5? JPKLpPa) "Z"WDmDWc3K O~/cLuNN+9K8;99/p>"k676-nܷ0h8)iʋK+s9@.xڭNAwh /"TD#J$rqr|!'O3XFާ0wY 1fg;73;3xE0C q=qX4GA$x ZB8ڃ Dw!IaSX w.0?oN؍gڍ@\A`sb k`sݡ},0Ya DȵȵMyFMvYdS20~>/qJG i<#c0C~G9ee Kvв[ڷ{&V(Ө1j1MZqr7,gKܥX0QY{ MYжz=a:[jEݢ BZZ=ns`+ȍxmUSgFB]9I$uw-J;mPwwwwwwwwlޕ]<3)e׿7R^ VV_@$zГ^З~g`0m[czf`(3233 23s2s32  eD*954XXeXX14i++ kk [[ ۲3Qfvd ;1qgg& nLdOboa_c@`PpHhXxNDNdNarsgrgsrsrs rsWrWs rs7r7s rswrwsrOO // oo __ ?? f,˺eݳYϬW;MelP68s䘉GE{RαM 7nܺp;ڛZ[ݛƵ? ѵֵykx~yj?\3V+wE5=QMjzTӣ(vN؉k/셽d/Kd/Kdbbbbbbbbbbjjjjjjjjjj/r{^n/+v ;NaS)ԼffffffffnnnnnnnnnnaaaaaaaChQN-ܩ?C?C?C?C?݇C}>t݇C}C?C?C?C?vNjHMp[qn???????>>=<<<<<:::::::U>::::::::=;;;;;;;;;;;;}VhSoTPnextepc-0.3.10/webui/static/fonts/glyphicons-halflings-regular.woff2000066400000000000000000000431541333553357400255460ustar00rootroot00000000000000wOF2Fl\F M?FFTM `r $e6$t 0 "Q?webfe5옏@? t,3+2q FYO&>bm5ZH$Y{H jd Չ %٧y"+@]e{vNc)n?~?萤h_&iѝ?>^K v-cۍ12Ky,'n(3EwiB& Tlh0M҆dYrﲬnti]yurVXsjgMnәHW r2>iT`V7R(+o6'cB4ι㿚T ]a[Qd<3wq8,rTI80>E?*E痦#7'S ocʷ_7&#*+)+4aA6cy٣f(bF$;{ YA1vP-tG"Cf- WԙuKְK#*K< (Z`٫ [%YT{%Ɋ$s{oջvt"p4`ߩϤ}o `'ne> G5sz_N PKӦvmU ɾ{z"3`l W#Ԑ^@+,ckoAOpnuzzJ)Υ1}O=xR`J`qUs/+kv1xljlEl\nDƶVjg{Zdz7 5!xm5o[u&1ڂHBkAqrR (\gh7Ҋy=HZUPh$8RgzgͭN:1u$܅>R]"f7 K^'3+E/^YU5]NB.ʋ8+͏8,|{M|Aua|a˅՝% lKGP,Nukc8mX@d̘?Y&{?P(G]Or-\LF9,&y8r3ܟ?p>~sDz1?\U5q=tzԒ&Znj%mM"}tkDwh-=mB76&:һqt" 1:Еu;"K_/Jdc0l0'^B8VCzg[ ;d Ybȃuu;@*}y| .'C>\g=9VŐ[o|g^ >d 9 *E|A*M[[*mOQz?Pn?R)YoT&[U*5S MB [ oYDh{,}1f?NN ]O/^;\J BEsJrĚ'g/B%o Cn7:|yKt&$s|wP\i]$Z@+ Հ90x]r%+RUEm+ܰ;wu9/I77զQlu\yWN)8ܰvY*umm( fEG8 j#IRz #q߷ )Y$ Лc_%m-{!0-` ;公hyV]Hv! ta\K[1{"j 6@3T0%Θ"ԙZIGS.ΣpӬS1eٓ؛ Yv8d\BlSR)ӆ {Iӆ%>0Ўڦ\'cg2%4QD 0͒3B"MՎ&ۊhIڧRgME I(5UD] }b8$8>X h"l΀j.%ۀHH- Iݸ#1C4Y7YݖV o>P]6O47f ~AJdYF€.oy) 8l 22e1H[t@!ȅ 2\@5ٓ%Zkޒa@.`n3OFR(󅥶ZkLkF HWjY I5*6eSbk.5F,.N0ԙ|V||~N( 4],Jp|~xeA5/ڻSvy?'_v|rXHQēB@= XB94TBBcHP+_YH#$`FB;+BPR4̼ t:t"ZEJ^!XǓq4_dTW(5܀IUŇAz@U6n.WGXHRK&'swMjʎ<3)`#F@  F Ԣvob$x +u&}|X&[٪8F-E&/>/G.az^/})'x$O=<zoA9M؝&~3r3g'8ң\-MDzk5A G9|1-! 87[,mRu|57 =X,aJ^tN4\fЄ]AzH^7F&k"LU>}>rBX(ۂT% JdhKPKTFaA3HHC[r;ad54 lLkjG{8h~ fR@9wB0 zS'a7@@Nƹlbj3hNXF/es'DsQjw}Jz^:V.:ڋ{ͼ(ȲBɦx<Db#"S{PHuN/{r6;wUsPО p8+6g_2lΡ6H džH: dBtGNmx@j |{s9=wR/oDJs5z>;'xEq^r^=G?9AA_K%Dɮ:uikjkIeG՝#*)jm|t}`JZ؈H=4{g߁)qXMA,H71V"o,Y#hݨS_;a_ԗZ^cn4HE?} ȝ٤=}BWvުUehGF;@2S@f n2#fY:]JyH]-G׌wgv'|0e _7Ґn+fٸY<( ?y%wm+j&&!c^u'b&hm6¤*2 ?AIƲ5FWؙ[ƜBUzIE!m:xheǮnz|]% mrUFگ1 };!n F&gP;&$$F).tBQ3(C=Xes;iي@~NΡE SRh\BeobTnΒju g@'qQ딎nx.u6bVU& ];!C_  5*zɺmRQuqPZ0}mn^nOrT:U'h0nZp^R|DF_b\@mDE8{oGM᠜q}Sd C,iܚE/Ë[d8],MCI_u,]Vc"pg@`"y),;B^el2'.(Ęy>-|hw;jՍiԽ_o|!@)ɢ=̌SPz*!z})|ƧT}jEtCZný*՞4ۆ׽[ 9Юݓz`Wmeo|j8j59@.EV/ZW@|f_\"${v/;a:Sei3TG*]ơ/h2C32$1}DNXt?Fϝ~n,Pj9.>ף{ 9EN-v|3hCиE XT;P$=J-gݕigz~q(A<:h193N̽Q}CLWߧ׎~ b"|4u}cy62[ \d,ҎճbkD%0Tx{=;Է(i LS13Nh/6?'E^~P{sZZKĞB{Dt&z)Uoa5Q3ȗr~ F]$<tm(} MB@[GxFh8#},#u Laz(Qh4%xm`Uչ.Ev1a4_'/[d{FxI59 D<&8VEFg 芘#I䟍2S_]QqAn_Q>bޘ4g-0&E#ci8 vR/4rP7KsOWN3ՏvE\bqQ5ZڽVy5]h/ i)-/kNю#e)"P {KSQx>a&, _g-mc<n]Ч-52cz 7d PzVOPvfR Rఓ9Z -dC`,at=k?v4#P Bإ/[s.-bH)ɺz '}׶w!rXZ .:Vn;->: 6rUcs4kVW{#5ߑ0B`ܝ0u".QdB0Cr]#Q9lqN^ֳh~NU\ 16 ~SnTl\THҲڛ-~G~)$oQ7-C}q%/avO|[q4~Bc-$N76w{V餃.&(o*n NeRi4!3R"4nbm-y[X."!QKE\N4gՠםaNp >k)90BZBs yrer)vDtrv\v[>rJm a̼~uՏ>rMZcB<`)\yt|ۍr'<>[Îh7Z8caI! p⢟̮,G k5@`iw nО8pv *'O A[.rhT pR?+;\*HsLqUf:ql-ć *6!h+ˬ{h- jgkMMP#:}{/VŶC]옙&[W$ګ^#4fWa\ 5躺M[6)T3~ :. Z`si(RQ|/` il^L#f-;-C;_*{@EMCooÂ_7TrqzF%ׯ|UEƫUs^ݜv{fQ<ĐVPTfͦ?mpP*&QG{cJEPe2)xP0AMɪZHj"׻"AC+zqmVzᖞU%C:@1W [y)J@ob% jA>)Nǀi$At`>?f0gH36p6D|M 4N 4JJڃ jƇ\ p38Я6pV?:$sDNƹ2n,HO\[ոK-)W~im?T:޺UeY-#dJe)Z5?$\dW<,Ɇ;ط5SոTT̄f(PYv=Q ~DX*8辩s- ˨΀55 XRl QC l|5{ӦT\t꼕+en۸Psl3UO[ZS3*,:ÛZLS'̵**@ı~xgno2- WV;pZ9?~$6҄xJ>\QA_Cihbl] 64*A˯ɰqX7YX.-ոaɇVhiKgqNRĆN(r']%٘@3̀jZJ.;nm,S0xͻOF33ҧ<$'GE+}'1f3y5/&Z\RB7dm]8\3߂Ȫ@oT3eu^W@e7l!B,s1$Z&?dC (YЦSm>J"&pt܈P㇄BF4G5 t^Ć$j-a㠍g^ʐCAsT=kTS,|r9IBϘЬ'vGA@thQNj&T=xt;2]P|T- LÞe1ݽWZŚ*MrH5?=o"9K5='k-*AE| qҔ_?\7%|M6f++S*}W_]3fmܮ˳m w!.R#鬪;qq71$•ݙկ_iK&JάMemV5P0> Q5WHIh&4ҍIlE7}sm[cȾ|d^ %Uv1D>.T7*=tZ_㟾1Х:=0pZ6ҋNt(uƝ; B]$kڌ.{F*/UZN砦|oqKG;^侞9NexK \wh~ZpHb䉸 [k8k.bX.QXpxYa^"#Bwnbum5F~>8bN:p4 [gv^ BFUz)?60F8/2C8>N8G%l%5FH{46h4%# 7x oN t\'Ȩ E0#jNãVӹd?WlcW žֵu-}22EN}#䵵2H^a3rqs-S3&f퇣fwl.=W8,cHjcTWנs90ZDMC2ZMdjt"8:g{.Ʊ1Fb618"yԦ> W9 V `jT򔔑r,ni d qN .g+ S Q KaB?_QE rjh>Eӛ;C׭7^q `Ue#-;oJċԝ>) ;Jg׭9R;OgiI7}8Kہqjeؓ+ٗ'nϷk3eFρ0V#pMAzb^PVu~1uғwn ^.II_vdW[Q,+Lbćq 9V} ΏVw4qU3&jıHYb ttT7ρarBwP9?)uT/aA19kM \Psq+=[5͔?9W+^o^E8s)f 2aQxi& NE>"^Naa;f9]NE& t^CLz'e8ZRs&67_ãcyJ1 @TZ?SD2 |POӌ\dR7zH9iQ#zrc.4GR4qx<2~Xhnੳ2auBNC+kX0 aj5n>މe3vާ<>_ uH:XR%~9!4oѼ38? 1d#A&{A!i6 /Xa㇤=W;|) g~ ?*悽 }ڧKt>5|E.A Q6 (6 6є7<9_C f1Ўi8, V4$uti,.`v6r P gFBɎ t C3; ,oÂx| /KMp1S_X.fV#U>Ȓ#B] AIVoІϵGTV1nr+OXS% ³fOZ[_9P߰ {Gln%#hdwH= ye/W>,IP,*MV~ºK&eċM콣=)qFS"GTF*LX,h[wweWQEx ?{^چExhiׂJH|^͓e*^Я.uxEb#;ԝ<]z]\wNhochqE=4Q17W̓lÕ6᧿HE_̣qy YR۫9~l4sVy`Uߛ,#_u+DeM~hq벇#Yz$; 5ͯ9$ z> *jO$$O/xRtf-}*oɦ|3M;xިUl/.~XǎY4x3&x";$KI5dڭ ~w[M9O%4Q}S^t@w[Y;-s;bwH-* imI-1e/~TNN.p)H$W~ƦO (9, ]gM6r+#%/swA$q4O> d9}+$s?0a,>yڈs<=,c_*\D}2MT8/4g'ڦ8'}"C*\9#Y>z$7c[s|"$} ymzQx 5%o$jkp)x-:И|?ofgFr2SZq}q o,wyOgCF1l'L5T33yM92"s5uD6-JUbs O)wR -2/5frϛf@=BFCB&'F}@&yubC?'S49+ÓCIî+f/RU C Fu:C*} T:}{ݽⲷue[!>? ڸ"M 8gz0\HkZ:h~@+#N fjyio!B R'5>`[!T`mC Iѝ}n >W!M}Uav43)!kcȂm? dwv!ה;Xϡۨ}8vt"Ӽ# kvXJ[l[ZݙMÀXC3l[ TaVjʻѬ"œ t:(<cZveQTqHi{銀Q埓'ÖiP■mKAIBF =Tᅽ(&TS?/؁A:ַОV(@wFa^]o]*99Ri_2vM`Pf{QYH#V7v7Ұq>@~uɘ׆Ax/xB3Ġtyb0nG` EDٍA: PwI7nW2ED}.(h"U]9Ih_V@GZ0C pb :L 3tN*N 2!3 Cayn.ɋW`̳}QBCi 8*{57O#aTBUoi0 _^ ChrU}~rL 1z>..=%GG o EuPPsؘ޸8Pu&;*|i&Pbțh;[|y*cVhҼ(~_AqU2GIQ3`^v=@K'ЇZ#4sJ=:sY sڥbyj S_E܃"@~>86#y[cSŬ#SJGZyvvSя扝pwaT/, 9'Jkv%%.~o[ 衧RBjSȀ*$'腁pçSu +9\_f+8u\,tpэkخJ0h(]NQvW7 86:ݣ WcY_i>"R(e]6RA%U6&F]7@̳k3X h?KQ2Bk[?..KKAb65ke+]FeWHU0Oק5 e3Hco>l]02cH9{Z {sO!A,7?ŷ3w俎A Fj8B&8U$G$Y5FL5n1> q2.6e +@/kb{(7i={l͍݂濦81g(%h/EfMҍt5̼vgo ~ਜ਼WKi父UأݖwRSEFT% `=|*=1*SX^w)lfQH(YSSˌK1W]f7ך^&p@T'.%3 5zaTf6A5LX̡|L-ηTg{A)F."hjA;.~o% G#}&]׾c`ChH9xnNY lc\+v\EƧ1D9KX)2b.NWQש$/|6tð32ԛ72иyu0e)Nuh'd~xY ># b"k3 :9v$ПC:)H> զz;ed\jmfOa%9cKxۥ!k%HDn{Y"{n_} )9= _/Z(>lYVgQ#߭:Qbw$zwٮ#U?|Ghz{o$wϜ)|Vh? ZV7%Go/׆E"KӲlp76-z !l4n>$\zV?szqejQ]m^=^ !lHB4sL i9}2^K5OB)O v^~݀xrm\K&G^5CL}&FB]Kn3|sGjykObsܽaW?R6Jfh2 lBS\=jV*Y^˺^E)*\ rr(a@6nԌ?}dLgIvqNcaƮkmLcA!hdVwc=憖s_:җsLg>1*4-%&0Ub)Eܬ*b51 ++;<`!qfM*,[/GK+{,>CLR%%c~'EGAG=h䟔8:IDN)W̻AF)ucw'qhXèL@a~6Pc2L"A2bU & 9A#QLO:E9kfKFb93tL$cˬpLz5dp۰>$`.~X=?NͰ/LPNo0p b8AR4r Jj} Ӳ04ˋquۏAFP 'HfXDIVTM7Lv\(N,/ʪnڮi^m?~ QU Ӳ04ˋquۏb$tV&gϖr>